summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2000-09-18 16:07:07 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2000-09-18 16:07:07 +0000
commitf5b2b8667807673ee6e999f13ba7477efab32aa1 (patch)
treee7db8e756f4fd005bddcb9b694991cce5e37dc33
parent9b5f06483e07c3254475f84080995290e30e9242 (diff)
initial import
-rw-r--r--sfx2/inc/about.hxx122
-rw-r--r--sfx2/inc/arrdecl.hxx130
-rw-r--r--sfx2/inc/basmgr.hxx170
-rw-r--r--sfx2/inc/bitset.hxx293
-rw-r--r--sfx2/inc/configmgr.hxx73
-rw-r--r--sfx2/inc/dinfedt.hxx120
-rw-r--r--sfx2/inc/docvor.hxx183
-rw-r--r--sfx2/inc/frmload.hxx221
-rw-r--r--sfx2/inc/idpool.hxx97
-rw-r--r--sfx2/inc/imgmgr.hxx155
-rw-r--r--sfx2/inc/inettbc.hxx163
-rw-r--r--sfx2/inc/mieclip.hxx130
-rw-r--r--sfx2/inc/minfitem.hxx115
-rw-r--r--sfx2/inc/msgnodei.hxx269
-rw-r--r--sfx2/inc/orgmgr.hxx133
-rw-r--r--sfx2/inc/progind.hxx127
-rw-r--r--sfx2/inc/resmgr.hxx109
-rw-r--r--sfx2/inc/sfxbasic.hxx76
-rw-r--r--sfx2/inc/sfxhelp.hxx311
-rw-r--r--sfx2/inc/sfxresid.hxx92
-rw-r--r--sfx2/inc/stbitem.hxx143
-rw-r--r--sfx2/inc/tplpitem.hxx92
-rw-r--r--sfx2/inc/viewfac.hxx102
-rw-r--r--sfx2/prj/d.lst148
-rw-r--r--sfx2/sdi/appslots.sdi375
-rw-r--r--sfx2/sdi/docslots.sdi408
-rw-r--r--sfx2/sdi/frmslots.sdi696
-rw-r--r--sfx2/sdi/makefile.mk105
-rw-r--r--sfx2/sdi/mdislots.sdi404
-rw-r--r--sfx2/sdi/sfx.sdi9267
-rw-r--r--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 0000000000..1821a545bb
--- /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 0000000000..b240d8ec73
--- /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 0000000000..10e0dbfa0d
--- /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 0000000000..90e60ee8d8
--- /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 0000000000..2ba4d20f6f
--- /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 0000000000..d85fa309ee
--- /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 0000000000..2334628397
--- /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 0000000000..d65b590970
--- /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 0000000000..350b295c23
--- /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 0000000000..e59a6390d8
--- /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 0000000000..b9e44721d7
--- /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 0000000000..c682202c86
--- /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 0000000000..02c2f29cd8
--- /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 0000000000..95497c10a2
--- /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 0000000000..c7a3f61811
--- /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 0000000000..f5fe305927
--- /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 0000000000..afebbf3fa4
--- /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 0000000000..4ec7d082a2
--- /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 0000000000..796305f2cf
--- /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 0000000000..f362dc87cd
--- /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 0000000000..c3d2c8dd9e
--- /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 0000000000..2f2f5e9148
--- /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 0000000000..d9d3aadf50
--- /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 0000000000..0cec228437
--- /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 0000000000..063f99aa03
--- /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 0000000000..4d508d7eaf
--- /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 0000000000..33f002c805
--- /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 0000000000..2e489d83cd
--- /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 0000000000..b09665203d
--- /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 0000000000..9ddd161c09
--- /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 0000000000..2eb7c7050f
--- /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 0000000000..a5ea49c15f
--- /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 0000000000..917989efa3
--- /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 0000000000..e02c7e6551
--- /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 0000000000..3320c4dd51
--- /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 indlæst og blev aktiveret." ;
+ Message [ french ] = "Document déjà 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¿ za³adowany i uaktywniony.";
+ Message[ japanese ] = "ÄÞ·­ÒÝÄ‚Í‚·‚Å‚É“Ç‚Ýž‚܂걸èÌÞ‚É‚È‚Á‚Ä‚¢‚Ü‚·B";
+ Message[ chinese_traditional ] = "¤w¸g¸Ë¸ü³o­ÓÀɮרóB©ó¿E¬¡ª¬ºA¡C";
+ Message[ arabic ] = "ÇáãáÝ ßÇä ãÍãáÇð ÈÇáÝÚá æÊã ÊäÔíØå.";
+ Message[ dutch ] = "Document is reeds geladen en geactiveerd.";
+ Message[ chinese_simplified ] = "ÒѾ­×°ÔØÕâ¸öÎļþ²¢´¦ÓÚ¼¤»î״̬¡£";
+ Message[ greek ] = "Ôï Ýããñáöï åß÷å Þäç öïñôùèåß êáé åíåñãïðïéÞèçêå.";
+ Message[ korean ] = "¹®¼­°¡ ÀÌ¹Ì ¿­·ÁÀÖ½À´Ï´Ù.";
+ Message[ turkish ] = "Belge zaten yüklü ve açýk.";
+ 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 ] = "Não consigo abrir o documento." ;
+ Message [ portuguese ] = "Impossível abrir o documento." ;
+ Message [ finnish ] = "Asiakirjaa ei voi avata." ;
+ Message [ danish ] = "Det er ikke muligt at indlæse 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 mo¿e byæ za³adowany.";
+ Message[ japanese ] = "ÄÞ·­ÒÝÄ‚Í“Ç‚Ýž‚Ý‚Å‚«‚Ü‚¹‚ñB";
+ Message[ chinese_traditional ] = "µLªk¸Ë¸ü³o­ÓÀɮסC";
+ Message[ arabic ] = "áÇ íãßä ÊÍãíá ÇáãÓÊäÏ.";
+ Message[ dutch ] = "Het document kan niet worden geopend.";
+ Message[ chinese_simplified ] = "ÎÞ·¨×°ÔØÕâ¸öÎĵµ¡£";
+ Message[ greek ] = "Äåí åßíáé äõíáôüí íá áíïé÷èåß ôï Ýããñáöï.";
+ Message[ korean ] = "¹®¼­¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù.";
+ Message[ turkish ] = "Belge yüklenemiyor.";
+ 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 configuração." ;
+ Message [ portuguese ] = "Erro durante a leitura do ficheiro de configuração." ;
+ Message [ finnish ] = "Virhe asetustiedostoa luettaessa." ;
+ Message [ danish ] = "Fejl under læsning af konfiguration." ;
+ Message [ french ] = "Erreur de lecture de la configuration." ;
+ Message [ swedish ] = "Fel vid läsning av konfiguration." ;
+ Message [ dutch ] = "Fout bij het lezen van het configuratiebestand." ;
+ Message [ spanish ] = "Error al leer el archivo de configuración." ;
+ Message [ english_us ] = "Error reading configuration file." ;
+ Message[ chinese_simplified ] = "ÔÚ¶ÁÈ¡ÅäÖÃÎļþʱ·¢Éú´íÎó¡£";
+ Message[ russian ] = "Îøèáêà ïðè ÷òåíèè ôàéëà êîíôèãóðàöèè.";
+ Message[ polish ] = "B³¹d przy odczycie konfiguracji.";
+ Message[ japanese ] = "Ý’è‚ð“Ç‚ÝŽæ‚éÛ‚Ì´×°¡";
+ Message[ chinese_traditional ] = "¦bŪ¨ú°t¸mÀɮ׮ɵo¥Í¿ù»~¡C";
+ Message[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÞÑÇÁÉ ãáÝ ÇáÊßæíä.";
+ Message[ dutch ] = "Fout bij het lezen van het configuratiebestand.";
+ Message[ chinese_simplified ] = "ÔÚ¶ÁÈ¡ÅäÖÃÎļþʱ·¢Éú´íÎó¡£";
+ Message[ greek ] = "ÓöÜëìá êáôÜ ôçí áíÜãíùóç ôïõ áñ÷åßïõ äéáìüñöùóçò";
+ Message[ korean ] = "±¸¼º ÆÄÀÏ Àб⠿À·ù.";
+ Message[ turkish ] = "Konfigürasyon dosyasý okunurken hata oluþtu.";
+ 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 configuração." ;
+ Message [ portuguese ] = "Erro ao gravar o ficheiro de configuração." ;
+ 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 configuración." ;
+ Message [ english_us ] = "Error writing configuration file." ;
+ Message[ chinese_simplified ] = "ÔÚдÈëÅäÖÃÎļþʱ·¢³ö´íÎó¡£";
+ Message[ russian ] = "Îøèáêà ïðè çàïèñè êîíôèãóðàöèè.";
+ Message[ polish ] = "B³¹d przy zapisie konfiguracji.";
+ Message[ japanese ] = "Ý’è‚Ì“Ç‚Ýž‚Ý‚ÌÛ‚Ì´×°¡";
+ Message[ chinese_traditional ] = "¦b¼g¤J°t¸mÀɮ׮ɵo¥X¿ù»~¡C";
+ Message[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ßÊÇÈÉ ãáÝ ÇáÊßæíä.";
+ Message[ dutch ] = "Fout bij het schrijven van het configuratiebestand.";
+ Message[ chinese_simplified ] = "ÔÚдÈëÅäÖÃÎļþʱ·¢³ö´íÎó¡£";
+ Message[ greek ] = "ÓöÜëìá êáôÜ ôçí åããñáöÞ ôïõ áñ÷åßïõ äéáìüñöùóçò.";
+ Message[ korean ] = "±¸¼º ÆÄÀÏ ¾²±â ¿À·ù.";
+ Message[ turkish ] = "Konfigürasyon dosyasýna yazýlýrken hata oluþtu.";
+ 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 configuração." ;
+ Message [ portuguese ] = "Erro ao abrir o ficheiro de configuração." ;
+ 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 configuración." ;
+ Message [ english_us ] = "Error opening configuration file." ;
+ Message[ chinese_simplified ] = "ÔÚ´ò¿ªÅäÖÃÎļþʱ·¢Éú´íÎó¡£";
+ Message[ russian ] = "Îøèáêà ïðè îòêðûòèè ôàéëà êîíôèãóðàöèè.";
+ Message[ polish ] = "B³¹d przy otwieraniu konfiguracji.";
+ Message[ japanese ] = "Ý’è‚ðŠJ‚­Û‚Ì´×°¡";
+ Message[ chinese_traditional ] = "¦b¶}±Ò°t¸mÀɮɵo¥Í¿ù»~¡C";
+ Message[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÝÊÍ ãáÝ ÇáÊßæíä.";
+ Message[ dutch ] = "Fout bij het openen van het configuratiebestand.";
+ Message[ chinese_simplified ] = "ÔÚ´ò¿ªÅäÖÃÎļþʱ·¢Éú´íÎó¡£";
+ Message[ greek ] = "ÓöÜëìá êáôÜ ôï Üíïéãìá ôïõ áñ÷åßïõ äéáìüñöùóçò.";
+ Message[ korean ] = "±¸¼º ÆÄÀÏ ¿­±â ¿À·ù.";
+ Message[ turkish ] = "Konfigürasyon dosyasý açýlýrken hata oluþtu.";
+ 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 não é um arquivo de configuração." ;
+ Message [ portuguese ] = "Este ficheiro não é um ficheiro de configuração." ;
+ 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 configuración." ;
+ 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 ] = "Àɮפ£¬O°t¸mÀɮסC";
+ Message[ arabic ] = "åÐÇ ÇáãáÝ áíÓ ãáÝ Êßæíä.";
+ Message[ dutch ] = "Dit bestand is geen configuratiebestand.";
+ Message[ chinese_simplified ] = "Îļþ²»ÊÇÅäÖÃÎļþ¡£";
+ Message[ greek ] = "Ôï áñ÷åßï äåí åßíáé áñ÷åßï äéáìüñöùóçò.";
+ Message[ korean ] = "±¸¼º ÆÄÀÏÀÌ ¾Æ´Õ´Ï´Ù.";
+ Message[ turkish ] = "Dosya, konfigürasyon dosyasý deðil.";
+ 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 ] = "Versão errada do arquivo de configuração." ;
+ Message [ portuguese ] = "Versão errada do ficheiro de configuração." ;
+ Message [ finnish ] = "Asetustiedoston versio on väärä." ;
+ 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 configuración tiene una versión falsa." ;
+ Message [ english_us ] = "Configuration file contains the wrong version." ;
+ Message[ chinese_simplified ] = "ÅäÖÃÎļþ°æ±¾´íÎó¡£";
+ Message[ russian ] = "Êîíôèãóðàöèîííûé ôàéë ñîäåðæèò íåïðàâèëüíóþ âåðñèþ.";
+ Message[ polish ] = "Plik konfiguracji zawiera nieprawid³ow¹ wersjê.";
+ Message[ japanese ] = "Ý’ȩ̀²Ù‚Í ³‚µ‚­‚È‚¢ÊÞ°¼Þ®Ý‚Å‚·B";
+ Message[ chinese_traditional ] = "°t¸mÀɮת©¥»¿ù»~¡C";
+ Message[ arabic ] = "ÅÕÏÇÑ ÎÇØÆ áãáÝ ÇáÊßæíä.";
+ Message[ dutch ] = "Verkeerde versie van configuratiebestand.";
+ Message[ chinese_simplified ] = "ÅäÖÃÎļþ°æ±¾´íÎó¡£";
+ Message[ greek ] = "ËÜèïò Ýêäïóç ôïõ áñ÷åßï äéáìüñöùóçò.";
+ Message[ korean ] = "±¸¼º ÆÄÀÏÀÌ À߸øµÈ ¹öÁ¯À» Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù.";
+ Message[ turkish ] = "Konfigürasyon dosyasýnýn sürümü 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 bibliothèque 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 ] = "B³¹d przy zapisie biblioteki BASIC w in\n'@'.";
+ Message[ japanese ] = "\n'@'‚Å‚ÌBASIC ײÌÞ×Ø‚Ì“Ç‚Ýž‚Ý‚ÌÛ‚Ì´×°¡";
+ Message[ chinese_traditional ] = "BASIC ®w¦b¼g¤J\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'@' içine kaydedilirken hata oluþtu.";
+ Message[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_SIGNAL
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_YES ;
+ Message = "Es ist ein unerwarter Anwendungsfehler aufgetreten!\nSie können 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 beëindigd?" ;
+ Message [ swedish ] = "Ett oväntat programfel har uppstått!\nDu kan nu på eget bevåg försöka\nspara alla öppna dokument!\n\nVill Du försöka spara alla ändringar i dokumenten innan programmet avslutas?" ;
+ Message [ danish ] = "Der opstod en uventet programfejl\nDu kan på eget ansvar prøve på at\ngemme alle åbne dokumenter!\n\nVil du prøve på at gemme dine dokumenter, før 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 aplicación!\nUsted puede ahora, a riesgo propio, intentar\nsalvar todos los documentos abiertos!\n\n¿Desea guardar su trabajo antes de cerrar la aplicación?" ;
+ Message [ french ] = "Erreur d'application inattendue !\nVous pouvez tout de même 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 próprio risco, \ntentar guardar todos os documentos abertos.\nTentar guardar o seu trabalho antes que a aplicação seja fechada?" ;
+ Message [ portuguese_brazilian ] = "Es ist ein unerwarter Anwendungsfehler aufgetreten!\nSie können 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 ] = "·¢ÉúÁËÒ»¸öÒâÍâµÄ³ÌÐò´íÎó£¡\nÄúÏÖÔÚ¿ÉÒÔ³¢ÊÔ±£´æËùÓб»´ò¿ªµÄÎļþ£¡\nÄúÒªÔڹرÕÕâ¸öÓ¦ÓóÌÐò֮ǰ±£´æËùÓеÄÎļþÂð£¿";
+ Message[ russian ] = "Ïðîèçîøëà íåîæèäàííàÿ îøèáêà ïðèëîæåíèÿ!\nÂû ìîæåòå ñåé÷àñ ïîïûòàòüñÿ ïîä Âàøó îòâåòñòâåííîñòü,\n ñîõðàíèòü âñå îòêðûòûå äîêóìåíòû!\n\nÏîïûòàòüñÿ ñîõðàíèòü Âàøó ðàáîòó äî âûõîäà èç ïðèëîæåíèÿ?";
+ Message[ polish ] = "Wyst¹pi³ nieoczekiwany b³¹d w programie!\nNa w³asn¹ odpowiedzialnoœæ mo¿esz spróbowaæ \nzapisaæ wszystkie otwarte dokumenty!\n\nCzy spróbowaæ zapisaæ twojê pracê przed zamkniêciem aplikacji?";
+ Message[ japanese ] = "—\\Šú‚µ‚È‚¢ÌßÛ¸Þ×Ñ ´×°‚ª”­¶‚µ‚Ü‚µ‚½B\nؽ¸‚Í‚ ‚è‚Ü‚·‚ª\nŠJ‚©‚ê‚Ä‚¢‚éÄÞ·­ÒÝÄ‚Í‚·‚ׂĕۑ¶‚µ‚Ä‚Ý‚Ä‚­‚¾‚³‚¢B\n\n±Ìßع°¼®Ý‚ðI—¹‚·‚é‘O‚ÉAì‹Æ’†‚ÌÄÞ·­ÒÝÄ‚ð•Û‘¶‚µ‚Ä‚Ý‚Ü‚·‚©H";
+ Message[ chinese_traditional ] = "µo¥Í¤F¤@­Ó·N¥~ªºµ{¦¡¿ù»~¡I\n±z²{¦b¥i¥H¹Á¸Õ«O¦s©Ò¦³³Q¶}±ÒªºÀɮסI\n±z­n¦bÃö³¬³o­ÓÀ³¥Îµ{¦¡¤§«eÀx¦s©Ò¦³ªºÀɮס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 beëindigd?";
+ Message[ chinese_simplified ] = "·¢ÉúÁËÒ»¸öÒâÍâµÄ³ÌÐò´íÎó£¡\nÄúÏÖÔÚ¿ÉÒÔ³¢ÊÔ±£´æËùÓб»´ò¿ªµÄÎļþ£¡\nÄúÒªÔڹرÕÕâ¸öÓ¦ÓóÌÐò֮ǰ±£´æËùÓеÄÎļþÂð£¿";
+ Message[ greek ] = "ÐáñïõóéÜóôçêå ìç áíáìåíüìåíï óöÜëìá åöáñìïãÞò!\n\nÈÝëåôå íá ãßíåé åðé÷åßñçóç (ìå äéêÞ óáò åõèýíç) íá áðïèçêåõôïýí üëá ôá áíïé÷ôÜ Ýããñáöá ðñéí ôåñìáôéóôåß ç åöáñìïãÞ;";
+ Message[ korean ] = "¿¹±âÄ¡ ¾ÊÀº ÀÀ¿ë ÇÁ·Î±×·¥ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù.\n\nÁö±Ý À§ÇèÀ» ¹«¸¨¾²°í ¸ðµç ¿­¸° ¹®¼­ÀÇ ÀúÀåÀ» ½ÃµµÇØ º¼ ¼ö ÀÖ½À´Ï´Ù. ÀÀ¿ë ÇÁ·Î±×·¥À» Á¾·áÇϱâ Àü¿¡ ÀÛ¾÷ÇÑ °ÍÀÇ ÀúÀåÀ» ½ÃµµÇØ º¸½Ã°Ú½À´Ï±î?";
+ Message[ turkish ] = "Beklenmeyen bir program hatasý oluþtu!\nÞu an açýk olan tüm belgeleri\nkaydetmeyi deneyebilirsiniz!\n\nUygulama kapatýlmadan önce belgeleriniz kaydedilmeye çalýþýlsýn 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 können voraussichtlich beim nächsten\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 irrecuperável. Contudo, todos os ficheiros \nmodificados foram guardados e poderão 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 können voraussichtlich beim nächsten\nProgrammstart wiederhergestellt werden." ;
+ Message [ swedish ] = "Ett icke reparerbart fel har uppträtt.\n\nAlla ändrade filer sparades\noch kan förmodligen återupprättas\nvid nästa programstart." ;
+ Message [ danish ] = "Der opstod en irreparabel fejl.\n\nAlle ændrede filer er dog\nblevet gemt og kan sandsynligvis gendannes\nved næste 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 quizás podrán recuperarse\nal iniciar de nuevo el programa." ;
+ Message [ french ] = "Une erreur fatale est survenue.\n\nTous les fichiers édités ont été sauvegardés\net devraient être restaurés au\nredémarrage 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£±§Ç¸£¬ÄúµÄ²Ù×÷Òý·¢ÁËÒ»¸öÎÞ·¨ÅųýµÄ´íÎó¡£\nÄú¸Õ²ÅÐ޸ĹýµÄÎļþÒѾ­±»±£´æ¡£\nÔÚÏÂÒ»´ÎÆô¶¯³ÌÐòʱºÜ¿ÉÄÜÖØлָ´ÕâЩÎļþ¡£";
+ Message[ russian ] = "Ïðîèçîøëà íåóñòðàíèìàÿ îøèáêà.\n\nÂñå èçìåíåííûå ôàéëû áóäóò ñîõðàíåíû\nè èõ ìîæíî áóäåò âîññòàíîâèòü ïðè ñëåäóþùåì\nçàïóñêå ïðîãðàììû.";
+ Message[ polish ] = "Wyst¹pi³ nieodwracalny b³¹d.\n\nWszystkie zmodyfikowane pliki zosta³y jednak\nzabezpieczone i zostan¹ prawdopodobnie przywrócone przy nastêpnym rozpoczêciu programu.\n.";
+ Message[ japanese ] = "œ‹Ž‚Å‚«‚È‚¢´×°‚ª”­¶‚µ‚Ü‚µ‚½B\n\n•ÏX‚µ‚½Ì§²Ù‚Ì‚·‚ׂĂª•Û‘¶‚³‚ê‚Ä‚¢‚Ü‚·‚©‚ç\nŽŸ‚ÉÌßÛ¸Þ×Ñ‚ðŠJŽn‚·‚éÛ‚É‚Í•œŒ³‚³‚ê‚é‚Í‚¸‚Å‚·B";
+ Message[ chinese_traditional ] = "¯u¬O«D±`©êºp¡M±zªº¾Þ§@¤Þµo¤F¤@­ÓµLªk±Æ°£ªº¿ù»~¡C\n±z¥ý«e­×§ï¹LªºÀɮפw¸gÀx¦s¡C\n¦b¤U¤@¦¸±Ò°Êµ{¦¡®É«Ü¥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£±§Ç¸£¬ÄúµÄ²Ù×÷Òý·¢ÁËÒ»¸öÎÞ·¨ÅųýµÄ´íÎó¡£\nÄú¸Õ²ÅÐ޸ĹýµÄÎļþÒѾ­±»±£´æ¡£\nÔÚÏÂÒ»´ÎÆô¶¯³ÌÐòʱºÜ¿ÉÄÜÖØлָ´ÕâЩÎļþ¡£";
+ Message[ greek ] = "ÐáñïõóéÜóôçêå áíåðáíüñèùôï óöÜëìá.\n\n¼ëá ôá ôñïðïðïéçìÝíá áñ÷åßá áðïèçêåýôçêáí þóôå \níá åßíáé ðéèáíþò äõíáôÞ ç åðáíáöïñÜ ôïõò ìå ôçí åðüìåíç \nåêêßíçóç ôïõ ðñïãñÜììáôïò.";
+ Message[ korean ] = "±¸Á¦ ºÒ°¡´ÉÇÑ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù.\n\n±×·¯³ª º¯°æµÈ ÆÄÀÏÀº \nÀúÀåµÇ¾úÀ¸¹Ç·Î ¾Æ¸¶µµ ´ÙÀ½¿¡ \nÇÁ·Î±×·¥À» ½ÃÀÛÇÒ ¶§´Â º¹¿øµÉ ¼ö ÀÖÀ» °ÍÀÔ´Ï´Ù.";
+ Message[ turkish ] = "Düzeltilemeyen bir hata oluþtu.\n\nDeðiþtirilen tüm dosyalar\nkaydedildi ve muhtemelen uygulama yeniden baþlatýldýðýnda\nkurtarýlabilecek.";
+ 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 Empfänger 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 formulário será enviado por e-mail.\nO seu endereço electrónico será fornecido ao destinatário." ;
+ 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 Empfänger Ihre E-Mail-Adresse bekannt." ;
+ Message [ swedish ] = "Ett formulär skall skickas per e-post.\nDärigenom får mottagaren reda på Din e-postadress." ;
+ Message [ danish ] = "Du vil sende en formular via e-mail.\nBemærk at modtageren herved får 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 electrónico.\nCon ello se dará a conocer al destinatario su dirección electrónica." ;
+ 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æ wys³any jako e-mail.\nPrzez to adresat otrzyma twój adres e-mail.";
+ Message[ japanese ] = "—pŽ†‚ªE-mail‚Å‘—M‚³‚ê‚Ü‚·B\n‚±‚ê‚ð’Ê‚µ‚ÄŽóMŽÒ‚ÉÕ°»Þ°‚ÌE-mail±ÄÞÚ½‚ª’m‚ç‚ê‚邱‚Æ‚É‚È‚è‚Ü‚·B";
+ Message[ chinese_traditional ] = "À³¸Ó³z¹L¹q¤l¶l¥ó±Hµoªí³æ¡C\n³o¼Ë±zªº¹q¤l¶l¥ó¦a§}¤]´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 gönderilecek.\nBu þekilde alýcý e-posta adresinizi de görecektir.";
+ 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 ] = "Filåterställande" ;
+ 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 plików";
+ 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 ] = "±z­n­×´_³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 ] = "Sisäinen" ;
+ 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 ] = "Wewnêtrzny";
+ 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 ] = "Aplicação" ;
+ Text [ finnish ] = "Sovellus" ;
+ Text [ danish ] = "Applikation" ;
+ Text [ french ] = "Application" ;
+ Text [ swedish ] = "Tillämpning" ;
+ Text [ dutch ] = "Applicatie" ;
+ Text [ spanish ] = "Aplicación" ;
+ 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 ] = "Näytä" ;
+ 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 ] = "Görünüm";
+ 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 ] = "Düzenle";
+ 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 ] = "Opções" ;
+ Text [ portuguese ] = "Ferramentas" ;
+ Text [ finnish ] = "Määritykset" ;
+ 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 ] = "Narzêdzia";
+ Text[ japanese ] = "Ú×Ý’è";
+ Text[ chinese_traditional ] = "¨ä¥¦";
+ Text[ arabic ] = "ÎíÇÑÇÊ";
+ Text[ dutch ] = "Extra";
+ Text[ chinese_simplified ] = "ÆäËü";
+ Text[ greek ] = "Åñãáëåßá";
+ Text[ korean ] = "¿É¼Ç";
+ Text[ turkish ] = "Araçlar";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_MATH
+{
+ Text = "Math" ;
+ Text [ ENGLISH ] = "Formula" ;
+ Text [ norwegian ] = "Formel" ;
+ Text [ italian ] = "Math" ;
+ Text [ portuguese_brazilian ] = "Fórmula" ;
+ 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 = "Einfügen" ;
+ Text [ english ] = "Insert" ;
+ Text [ dutch ] = "Invoegen" ;
+ Text [ english_us ] = "Insert" ;
+ Text [ italian ] = "Inserisci" ;
+ Text [ spanish ] = "Insertar" ;
+ Text [ french ] = "Insérer" ;
+ Text [ swedish ] = "Infoga" ;
+ Text [ danish ] = "Indsæt" ;
+ Text [ portuguese ] = "Inserir" ;
+ Text [ portuguese_brazilian ] = "Einfügen" ;
+ 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 ] = "Modèles" ;
+ 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 ] = "Çerçeve";
+ 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 ] = "Numeración" ;
+ Text [ french ] = "Numérotation" ;
+ Text [ swedish ] = "Numrering" ;
+ Text [ danish ] = "Nummerering" ;
+ Text [ portuguese ] = "Numeração" ;
+ 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 ] = "Données" ;
+ 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 spéciales" ;
+ Text [ dutch ] = "Speciale functies" ;
+ Text [ swedish ] = "Specialfunktioner" ;
+ Text [ danish ] = "Specialfunktioner" ;
+ Text [ portuguese ] = "Funções 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 iþlevler";
+ 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 ] = "Förbindelse" ;
+ 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 ] = "Baðlayýcý";
+ 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 ] = "Deðiþtir";
+ 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 ] = "Éléments de contrôle" ;
+ 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 ] = "Opções" ;
+ Text [ portuguese ] = "Opções" ;
+ Text [ finnish ] = "Määritykset" ;
+ 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 général" ;
+ Text [ swedish ] = "Allmänt" ;
+ Text [ dutch ] = "Algemeen" ;
+ Text [ spanish ] = "General" ;
+ Text [ english_us ] = "General" ;
+ PageResID = 256 ;
+ Text[ chinese_simplified ] = "³£¹æ";
+ Text[ russian ] = "Îáùåå";
+ Text[ polish ] = "Ogólne";
+ 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 ] = "Àx¦s";
+ 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 ] = "Sökvägar" ;
+ Text [ dutch ] = "Pad" ;
+ Text [ spanish ] = "Rutas" ;
+ Text [ english_us ] = "Paths" ;
+ PageResID = 258 ;
+ Text[ chinese_simplified ] = "·¾¶";
+ Text[ russian ] = "Ïóòè";
+ Text[ polish ] = "Œcie¿ki";
+ 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 = "Rechtschreibprüfung" ;
+ Text [ English ] = "Spellchecker" ;
+ Text [ norwegian ] = "Spellchecker" ;
+ Text [ italian ] = "Controllo ortografico" ;
+ Text [ portuguese_brazilian ] = "Corretor Ortográfico" ;
+ Text [ portuguese ] = "Verificar ortografia" ;
+ Text [ finnish ] = "Korjausluku" ;
+ Text [ danish ] = "Stavekontrol" ;
+ Text [ french ] = "Vérification orthographique" ;
+ Text [ swedish ] = "Rättstavningskontroll" ;
+ Text [ dutch ] = "Spellingcontrole" ;
+ Text [ spanish ] = "Revisión ortográfica" ;
+ 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 ] = "Yazým 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 ] = "Seçenekler";
+ Text[ language_user1 ] = " ";
+};
+
+InfoBox MSG_CANT_QUIT
+{
+ Message = "Die Anwendung kann zur Zeit nicht beendet werden.\nBitte warten Sie das Ende aller Druckaufträge und/oder\nOLE-Aktivierungen ab und schließen 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 ] = "Não 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 é impossível sair desta aplicação.\nAguarde a impressão de todos os documentos\n e/ou o fim das activações OLE e feche todos os diálogos." ;
+ Message [ french ] = "Impossible de quitter l'application maintenant.\nVeuillez attendre la fin des activités d'impression et/ou des activations OLE\net fermez tous les dialogues." ;
+ Message [ dutch ] = "De applicatie kan op dit moment niet worden beëindigd.\nWacht tot alle drukopdrachten en/of\nOLE-activiteiten zijn beëindigd en \nsluit alle dialogen." ;
+ Message [ spanish ] = "La aplicación no se puede cerrar por el momento. \nPor favor espere hasta que finalice la impresión de\n todos los documentos y/o activaciones OLE\ny cierre todos los diálogos." ;
+ 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 för tillfället.\nVänta tills alla utskriftsuppdrag och/eller\nOLE-aktiveringar är utförda och stäng 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 mo¿na zakoñczyæ.\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 ] = "²{¦bµLªkµ²§ô³o­ÓÀ³¥Îµ{¦¡¡C\n½Ðµ¥­Ô©Ò¦³¦C¦L¥ô°È©ÎOLE¿E¬¡ª¬ºA¤w¸gµ²§ô¡M\nµM«á¦AÃö³¬©Ò¦³ªº¹ï¸Ü¤è¶ô¡C";
+ Message[ arabic ] = "áÇ íãßä ÅäåÇÁ ÇáÊØÈíÞ ÍÇáíÇð.\nÇáÑÌÇÁ ÇáÇäÊÙÇÑ ÍÊì ÇäÊåÇÁ ßá ãåÇã ÇáØÈÇÚÉ¡ æ/Ãæ\nÊäÔíØÇÊ OLE¡ Ëã Þã ÈÅÛáÇÞ ßá ãÑÈÚÇÊ ÇáÍæÇÑ.";
+ Message[ dutch ] = "De applicatie kan op dit moment niet worden beëindigd.\nWacht tot alle drukopdrachten en/of\nOLE-activiteiten zijn beëindigd en \nsluit alle dialogen.";
+ Message[ chinese_simplified ] = "ÏÖÔÚÎÞ·¨½áÊøÕâ¸öÓ¦ÓóÌÐò¡£\nÇëÄúÉÔµÈÖ±µ½³ÌÐòÍê³ÉËùÓдòÓ¡ÈÎÎñ»òOLE¼¤»î״̬½áÊø£¬\nÈ»ºóÔٹرÕËùÓжԻ°¿ò¡£";
+ Message[ greek ] = "Ðñïò ôï ðáñüí åßíáé áäýíáôïí íá ôåñìáôéóôåß áõôÞ ç åöáñìïãÞ.\nÐáñáêáëþ ðåñéìÝíåôå ìÝ÷ñé íá åêôåëåóôïýí üëåò ïé åñãáóßåò åêôýðùóçò êáé/Þ\nïé åíÝñãåéåò ôïõ OLE êáé êëåßóôå üëïõò ôïõò äéáëüãïõò.";
+ Message[ korean ] = "ÀÀ¿ë ÇÁ·Î±×·¥À» ÇöÀç Á¾·áÇÒ ¼ö ¾ø½À´Ï´Ù.\nÀμâ ÀÛ¾÷ÀÌ ¸ðµÎ ³¡³¯ ¶§±îÁö ±×¸®°í/¶Ç´Â \nOLE°¡ È°¼ºÈ­µÉ ¶§±îÁö ±â´Ù·È´Ù°¡ ¸ðµç ´ëÈ­»óÀÚ¸¦ ´ÝÀ¸½Ê½Ã¿À.";
+ Message[ turkish ] = "Þu an uygulamadan çýkýlamýyor.\nTüm yazdýrma iþlerinin ve/veya\nOLE iþlemlerinin bitmesini bekleyip tüm diyaloglarý kapatýnýz.";
+ 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 aplicação está ainda activa como servidor de objecto ou da impressora.\nMesmo assim, finalizar?" ;
+ Message [ finnish ] = "Tämä sovellus on aktiivinen lähdesovellus.\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 ] = "Tillämpningen är fortfarande aktiv antingen som objekt- eller skrivarserver.\nVill Du trots det stänga den?" ;
+ Message [ dutch ] = "Deze toepassing is nog actief als object- of afdrukserver.\nToch afsluiten ?" ;
+ Message [ spanish ] = "Esta aplicación está aún activa como servidor de objeto o de impresión.\n¿Desea 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­ÓÀ³¥Îµ{¦¡§@¬°ª«¥ó©Î¦C¦L¦øªA¾¹ÁÙ³B©ó¿E¬¡ª¬ºA¡C\n±zÁÙ¬O­nÃö³¬¥¦¡H";
+ 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 yazdýrma sunucusu olarak çalýþýyor.\nYine de kapatýlsýn 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 können nicht mehrfach\ngestartet werden." ;
+ Text [ swedish ] = "StarOffice kan inte startas flera gånger 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 más 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 não pode ser inicializado mais do que uma vez." ;
+ Text[ chinese_simplified ] = "ÎÞ·¨Í¬Ê±¶à´ÎÆô¶¯ StarOffice ¡£";
+ Text[ russian ] = "Ìíîãîêðàòíûé çàïóñê StarOffice íåâîçìîæåí.";
+ Text[ polish ] = "StarOffice nie mo¿na kilkakrotnie uruchomiæ.";
+ Text[ japanese ] = "StarOffice‚Í ‰½‰ñ‚à½À°Ä‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªk¦P®É¦h¦¸±Ò°ÊStarOffice¡C";
+ 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 için birden fazla oturum açýlamaz.";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_NOPRINTER
+{
+ TEXT = "Einige StarOffice-Funktionen können 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 ] = "Några StarOffice-funktioner kan inte arbeta korrekt utan en skrivardrivrutin.\nVar vänlig 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 können ohne Druckertreiber nicht korrekt arbeiten.\nBitte installieren Sie einen Druckertreiber." ;
+ Text [ portuguese ] = "Algumas das funções do StarOffice não podem funcionar correctamente sem um controlador de impressora.\nFaça a respectiva instalação." ;
+ Text[ chinese_simplified ] = "ÒòΪûÓа²×°´òÓ¡»úÇý¶¯³ÌÐò£¬Ò»Ð©StarOffice¹¦ÄÜ¿ÉÄܲ»»áÕý³£ÔËת¡£\nÇëÄú°²×°Ò»¸ö´òÓ¡»úÇý¶¯³ÌÐò¡£";
+ Text[ russian ] = "Áåç äðàéâåðà ïå÷àòè íåêîòîðûå ôóíêöèè StarOffice ìîãóò íåïðàâèëüíî ðàáîòàòü.\nÈíñòàëëèðóéòå, ïîæàëóéñòà, äðàéâåð ïå÷àòè.";
+ Text[ polish ] = "Niektóre funkcje w StarOffice nie mog¹ poprawnie pracowaæ bez sterownika drukarki.\nZainstaluj sterownik drukarki.";
+ Text[ japanese ] = "StarOffice ‚Ì‚¢‚­‚‚©‚Ì‹@”\\‚Í ÌßØÝÀ ÄÞײÌÞ‚È‚µ‚ų‚µ‚­‹N“®‚µ‚Ü‚¹‚ñB\nÌßØÝÀ ÄÞײÊÞ‚ð²Ý½Ä°Ù‚µ‚Ä‚­‚¾‚³‚¢B";
+ Text[ chinese_traditional ] = "¨S¦³¦w¸Ë¦C¦LÅX°Êµ{¦¡¡M¤@¨ÇStarOffice¥\\¯à¹BÂण·|¥¿±`¡C\n½Ð±z¦w¸Ë¤@­Ó¦C¦LÅX°Êµ{¦¡¡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 iþlevleri yazýcý sürücüsü olmadan doðru çalýþamaz.\nBir yazýcý sürücüsü kurun.";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_NOMODUL
+{
+ TEXT = "Applikationsmodule können 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 módulos de aplicación no pueden ser\niniciados como aplicaciones si el escritorio (StarOffice Desktop) está activo." ;
+ Text [ french ] = "Impossible de démarrer 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 ] = "Tillämpningsmoduler kan inte startas som\ntillämpningar när StarOffice Desktop är aktiv." ;
+ Text [ danish ] = "Det er ikke muligt at starte applikationsmoduler som applikationer,\når StarOffice Desktop er aktiv." ;
+ Text [ portuguese_brazilian ] = "Applikationsmodule können nicht als Applikationen\ngestartet werden, wenn der StarOffice Desktop aktiv ist." ;
+ Text [ portuguese ] = "Impossível iniciar os módulos como aplicações quando o StarOffice Desktop se encontra activo." ;
+ Text[ chinese_simplified ] = "Èç¹ûStarOffice Desktop´¦ÓÚ¼¤»î״̬\n£¬Ó¦ÓóÌÐòµÄÄ£¿é²»Äܹ»µ±×÷Ó¦ÓóÌÐòÆô¶¯ÔËÐС£";
+ Text[ russian ] = "Çàïóñê ìîäóëåé ïðèëîæåíèÿ â êà÷åñòâå ïðèëîæåíèé íåâîçìîæåí,\nåñëè àêòèâèðîâàí StarDesktoð.";
+ Text[ polish ] = "Modu³y aplikacji nie mog¹ zostaæ uruchomione jako aplikacje\n, jeœli jest w³¹czony pulpit StarOffice Desktop.";
+ Text[ japanese ] = "StarOffice Desktop ‚ª±¸Ã¨ÌÞ‚Ì‚Æ‚«‚ÍA±Ìßع°¼®Ý‚Æ‚µ‚ıÌßع°¼®Ý Ó¼Þ­°Ù‚ð\nŠJŽn‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "¦bStarOffice Desktop³B¤_¿E¬¡ª¬ºA®É\n¡MÀ³¥Îµ{§Çªº¼Ò¶ô¤£¯à°÷·í§@À³¥Îµ{¦¡±Ò°Ê¹B¦æ¡C";
+ 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 modülleri, StarOffice masaüstü etkinken uygulama olarak\nçalýþtýrýlamaz.";
+ 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 aplicación." ;
+ 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\nnär StarOffice Writer-tillämpningsmodulen\nhar startats som tillämpning." ;
+ Text [ danish ] = "Det er ikke muligt at starte StarOffice Desktop,\nnår 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 ] = "Impossível iniciar o StarOffice Desktop quando o módulo da\naplicação StarOffice Writer é iniciado\ncomo aplicação." ;
+ Text[ chinese_simplified ] = "ÔÚStarOffice WriterÓ¦ÓóÌÐòÄ£¿é±»µ±×÷\nÓ¦ÓóÌÐòÆô¶¯ÔËÐÐʱÎÞ·¨Æô¶¯StarOffice Desktop ¡£";
+ Text[ russian ] = "Çàïóñòèòü StarOffice Desktop íåâîçìîæíî,\nåñëè ìîäóëü ïðèëîæåíèÿ StarOffice Writer çàïóùåí â êà÷åñòâå\nïðèëîæåíèÿ.";
+ Text[ polish ] = "Pulpitu StarOffice Desktop nie mo¿na uruchomiæ, \njeœli modu³ aplikacji StarOffice Writer \nzosta³ uruchomiony jako aplikacja.";
+ Text[ japanese ] = "StarOffice Writer ±Ìßع°¼®Ý Ó¼Þ­°Ù‚ª\n±Ìßع°¼®Ý‚Æ‚µ‚ÄŠJŽn‚³‚ê‚Ä‚¢‚鎞‚ÍA\nStarOffice Desktop‚ÍŠJŽn‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "¦bStarOffice WriterÀ³¥Îµ{¦¡¼Ò¶ô³Q·í§@\nÀ³¥Îµ{¦¡±Ò°Ê¹B¦æ®ÉµLªk±Ò°ÊStarOffice Desktop¡C";
+ 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 masaüstü, StarOffice Writer uygulama modulü\nuygulama olarak çalýþtýrýlmýþsa baþlatýlamaz.";
+ 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 modificações como " ;
+ TEXT [ portuguese ] = "Guardar modificações em %1?" ;
+ TEXT [ finnish ] = "Tallenetaanko muutokset" ;
+ TEXT [ danish ] = "Skal ændringer gemmes i %1?" ;
+ TEXT [ french ] = "Souhaitez-vous enregistrer les modifications apportées à %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 ] = "Àx¦sÅܧó %1 ¡H";
+ TEXT[ arabic ] = "åá ÊÑíÏ ÍÝÙ ÇáÊÛííÑÇÊ Ýí %1¿";
+ TEXT[ dutch ] = "Wijzigingen opslaan in %1?";
+ TEXT[ chinese_simplified ] = "Òª´æÅ̸ü¸Ä %1 £¿";
+ TEXT[ greek ] = "ÈÝëåôå íá áðïèçêåõôïýí ïé áëëáãÝò óôï %1;";
+ TEXT[ korean ] = "%1ÀÇ º¯°æ»çÇ×À» ÀúÀåÇϽðڽÀ´Ï±î?";
+ TEXT[ turkish ] = "%1 içinde yapýlan deðiþiklikler kaydedilsin mi?";
+};
+
+String STR_AUTOSAVE
+{
+ TEXT = "Automatisch speichern" ;
+ TEXT [ English ] = "Automatic save" ;
+ TEXT [ norwegian ] = "Automatisk lagring" ;
+ TEXT [ italian ] = "Salva automaticamente" ;
+ TEXT [ portuguese_brazilian ] = "Gravação Automática" ;
+ 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 automáticamente" ;
+ TEXT [ english_us ] = "AutoSave" ;
+ TEXT[ chinese_simplified ] = "×Ô¶¯´æÅÌ";
+ TEXT[ russian ] = "Ñîõðàíèòü àâòîìàòè÷åñêè";
+ TEXT[ polish ] = "Zapisz automatycznie";
+ TEXT[ japanese ] = "Ž©“®“I‚É•Û‘¶";
+ TEXT[ chinese_traditional ] = "¦Û°ÊÀx¦s";
+ TEXT[ arabic ] = "ÍÝÙ ÊáÞÇÆí";
+ TEXT[ dutch ] = "Automatisch opslaan";
+ TEXT[ chinese_simplified ] = "×Ô¶¯´æÅÌ";
+ TEXT[ greek ] = "Áõôüìáôç áðïèÞêåõóç";
+ TEXT[ korean ] = "ÀÚµ¿ ÀúÀå";
+ TEXT[ turkish ] = "Otomatik kayýt";
+ TEXT[ language_user1 ] = " ";
+};
+
+String STR_RESWARNING
+{
+ TEXT = "Die Systemresourcen werden knapp. Bitte beenden Sie andere Applikationen oder schließen 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 før du fortsetter." ;
+ TEXT [ italian ] = "Risorse insufficienti. Uscire dalle altre applicazioni o chiudere alcune finestre prima di continuare." ;
+ TEXT [ portuguese_brazilian ] = "Não 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 eivät riitä. Lopeta muita sovelluksia tai sulje ikkunoita ennen kuin jatkat." ;
+ TEXT [ danish ] = "Begrænsede systemressourcer. Afslut venligst andre applikationer eller luk nogle vinduer, før du fortsætter." ;
+ TEXT [ french ] = "Ressources insuffisantes. Veuillez quitter les autres applications ou fermer certaines fenêtres avant de continuer." ;
+ TEXT [ swedish ] = "Inte tillräckligt med resurser. Stäng andra program eller stäng några fönster innan Du fortsätter." ;
+ 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 ] = "ϵͳ×ÊÔ´²»×ã¡£ÇëÄú¹Ø±ÕÆäËüµÄ³ÌÐò»òÕ߹رÕһЩÊÓ´°£¬È»ºóÖØг¢ÊÔÖ´ÐÐÃüÁî¡£";
+ TEXT[ russian ] = "Ðåñóðñû ñèñòåìû îãðàíè÷åíû. Ïðåæäå ÷åì ïðîäîëæèòü ðàáîòó, âûéäèòå, ïîæàëóéñòà, èç äðóãèõ ïðèëîæåíèé èëè çàêðîéòå íåêîòîðûå îêíà.";
+ TEXT[ polish ] = "Zasoby systemu s¹ ograniczone. Przed kontynuacj¹ pracy zakoñcz kilka aplikacji lub zamknij kilka okien.";
+ TEXT[ japanese ] = "¼½ÃÑ Ø¿°½‚ª‚¬‚肬‚è‚Å‚·Bì‹Æ‚𑱂¯‚é‘O‚ɤ‘¼‚̱Ìßع°¼®Ý‚ðI—¹‚·‚é‚© ‚¢‚­‚‚©‚̳¨ÝÄÞ³‚ð•Â‚¶‚ĉº‚³‚¢B";
+ TEXT[ chinese_traditional ] = "¨t²Î¸ê·½¤£¨¬¡C½ÐÃö³¬¨ä¥¦ªºµ{¦¡©ÎªÌÃö³¬¤@¨Çµøµ¡¡MµM«á­«·s¹Á¸Õ°õ¦æ©R¥O¡C";
+ TEXT[ arabic ] = "ãÕÇÏÑ ÇáäÕ ÊÊÖÇÁá. ÇáÑÌÇÁ ÅäåÇÁ ÊØÈíÞÇÊ ÃÎÑì¡ Ãæ ÅÛáÇÞ ÈÚÖ ÇáäæÇÝС ÞÈá ãæÇÕáÉ ÇáÚãá.";
+ TEXT[ dutch ] = "Onvoldoende systeemgeheugen beschikbaar. Sluit andere toepassingen af.of sluit een aantal vensters voordat u uw werkvoortzet.";
+ TEXT[ chinese_simplified ] = "ϵͳ×ÊÔ´²»×ã¡£ÇëÄú¹Ø±ÕÆäËüµÄ³ÌÐò»òÕ߹رÕһЩÊÓ´°£¬È»ºóÖØг¢ÊÔÖ´ÐÐÃüÁî¡£";
+ TEXT[ greek ] = "Ïé ðüñïé ôïõ óõóôÞìáôïò åßíáé åëÜ÷éóôïé. Ðáñáêáëþ ôåñìáôßóôå Üëëåò åöáñìïãÝò Þ êëåßóôå ìåñéêÜ ðáñÜèõñá ðñéí óõíå÷ßóåôå.";
+ TEXT[ korean ] = "½Ã½ºÅÛ ÀÚ¿øÀÌ ºÎÁ·ÇÕ´Ï´Ù .°è¼Ó ÇϽñâÀü¿¡ ´Ù¸¥ ÀÀ¿ëÇÁ·Î±×·¥À» ÁßÁöÇϰųª ¿­·ÁÀִ âÀ» ´ÝÀ¸½Ê½Ã¿À.";
+ TEXT[ turkish ] = "Sistem kaynaklarý azalýyor. Çalýþmaya devam etmeden önce diðer uygulamalarý ya da bir kaç pencere kapatýn.";
+ TEXT[ language_user1 ] = " ";
+};
+String STR_RESEXCEPTION
+{
+ TEXT = "Wichtige Programmteile nicht gefunden. Bitte überprüfen 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 configuração do aplicativo." ;
+ TEXT [ portuguese ] = "Faltam alguns ficheiros importantes. Por favor, verifique a configuração 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 vérifier le paramétrage 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 instalación." ;
+ TEXT [ english_us ] = "There are files missing. Please check application setup." ;
+ TEXT[ chinese_simplified ] = "ûÓÐÕÒµ½±ØÒªµÄ³ÌÐò²¿¼þ¡£Çë¼ì²éÄúµÄ°²×°¡£";
+ TEXT[ russian ] = "Íå íàéäåíû âàæíûå ÷àñòè ïðîãðàììû. Ïðîâåðüòå, ïîæàëóéñòà, óñòàíîâêó ïðèëîæåíèÿ.";
+ TEXT[ polish ] = "Wa¿ne czêœci programu nie zosta³y znalezione.SprawdŸ instalacjê aplikacji.";
+ TEXT[ japanese ] = "d—v‚ÈÌßÛ¸Þ×т̈ꕔ‚ªŒ©‚‚©‚è‚Ü‚¹‚ñB²Ý½Ä°Ù‚ðÁª¯¸‚µ‚ĉº‚³‚¢B";
+ TEXT[ chinese_traditional ] = "¨S¦³§ä¨ì¥²­nªºµ{¦¡³¡¥ó¡C½ÐÀˬd±zªº¦w¸Ë¡C";
+ TEXT[ arabic ] = "ÊÚÐÑ ÇáÚËæÑ Úáì ÃÌÒÇÁ åÇãÉ ãä ÇáÈÑäÇãÌ. ÇáÑÌÇÁ ÇáÊÍÞÞ ãä ÕÍÉ ÚãáíÉ ÇáÊËÈíÊ ÚäÏß.";
+ TEXT[ dutch ] = "Er ontbreken belangrijke programmaonderdelen. Controleer of de installatie juist is doorgevoerd.";
+ TEXT[ chinese_simplified ] = "ûÓÐÕÒµ½±ØÒªµÄ³ÌÐò²¿¼þ¡£Çë¼ì²éÄúµÄ°²×°¡£";
+ TEXT[ greek ] = "Äåí âñÝèçêáí ïñéóìÝíá óçìáíôéêÜ ôìÞìáôá ôïõ ðñïãñÜììáôïò. Ðáñáêáëþ åëÝãîôå ôçí åãêáôÜóôáóÞ óáò.";
+ TEXT[ korean ] = "»ç¶óÁø ÆÄÀÏÀÌ ÀÖ½À´Ï´Ù. ¼³Á¤À» È®ÀÎÇϽʽÿÀ.";
+ TEXT[ turkish ] = "Önemli program öðeleri bulunamadý. Kurulumunuzu kontrol edin.";
+ TEXT[ language_user1 ] = " ";
+};
+
+String STR_DOUBLEEXCEPTION
+{
+ Text = "Während der Alarmdatensicherung ist ein weiterer Systemfehler aufgetreten.\nDie Daten sind evtl. unvollständig 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 ] = "Während der Alarmdatensicherung ist ein weiterer Systemfehler aufgetreten.\nDie Daten sind evtl. unvollständig gesichert.";
+ TEXT[ portuguese ] = "Surgiu mais um erro no sistema enquanto se executava o backup de segurança.\nProvavelmente, foi impossível guardar os dados de forma completa.";
+ TEXT[ danish ] = "Der opstod en yderligere systemfejl ved alarmdatasikringen.\nAlle data er muligvis ikke gemt fuldstændigt.";
+ TEXT[ french ] = "Au cours de la sauvegarde, une nouvelle erreur système s'est produite.\nIl n'est par certain que toutes les données aient pas pu être enregistrées correctement.";
+ TEXT[ swedish ] = "Ytterligare ett systemfel uppstod när alarmdata sparades.\nEventuellt har inte alla data sparats fullständigt.";
+ 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 wyst¹pi³ dalszy b³¹d w systemie.\nDane s¹ event. niekompletnie zabezpieczone.";
+ TEXT[ japanese ] = "Œx̧²Ù•ÛŒì‚ÌÛ‚É‘¼‚̼½ÃÑ´×°‚ª”­¶‚µ‚Ü‚µ‚½B\nÃÞ°À‚Í‚¨‚»‚ç‚­Š®‘S‚É•Û‘¶‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB";
+ TEXT[ chinese_traditional ] = "¦b­×´_Àx¦s®Éµo¥Í¤F¤@­Ó¿ù»~¡C\n¸ê®ÆÀx¦s«Ü¦³¥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ý sýrasýnda baþka bir sistem hatasý oluþtu.\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 aplicación." ;
+ Text [ french ] = "Les ressources du système sont épuisées. Veuillez relancer l'application ." ;
+ Text [ dutch ] = "De systeemresources zijn verbruikt. Start de applicatie opnieuw." ;
+ Text [ swedish ] = "Inte tillräckligt 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 aplicação." ;
+ Text[ chinese_simplified ] = "ϵͳ×ÊÔ´ÒѾ­ÓÃÍê¡£ÇëÄúÖØÐÂÆô¶¯Ó¦ÓóÌÐò¡£";
+ Text[ russian ] = "Ñèñòåìíûå ðåñóðñû èçðàñõîäîâàíû. Ïåðåçàïóñòèòå ïðèëîæåíèå.";
+ Text[ polish ] = "Zasoby systemu s¹ zu¿yte. Rozpocznij aplikacjê ponownie.";
+ Text[ japanese ] = "¼½ÃÑ Ø¿°½‚ª‚¢‚Á‚Ï‚¢‚Å‚·BÌßÛ¸Þ×Ñ‚ðV‚µ‚­½À°Ä‚µ‚ĉº‚³‚¢B";
+ Text[ chinese_traditional ] = "¨t²Î¸ê·½¤w¸g¥Î§¹¡C½Ð±z­«·s±Ò°ÊÀ³¥Îµ{¦¡¡C";
+ Text[ arabic ] = "Êã ÇÓÊåáÇß ßá ãÕÇÏÑ ÇáäÙÇã. ÇáÑÌÇÁ ÈÏÁ ÇáÊØÈíÞ ãä ÌÏíÏ.";
+ Text[ dutch ] = "De systeemresources zijn verbruikt. Start de applicatie opnieuw.";
+ Text[ chinese_simplified ] = "ϵͳ×ÊÔ´ÒѾ­ÓÃÍê¡£ÇëÄúÖØÐÂÆô¶¯Ó¦ÓóÌÐò¡£";
+ Text[ greek ] = "Ïé ðüñïé ôïõ óõóôÞìáôïò åîáíôëÞèçêáí. Ðáñáêáëþ åðáíåêêéíÞóôå ôçí åöáñìïãÞ.";
+ Text[ korean ] = "½Ã½ºÅÛ ÀÚ¿øÀÌ ¼Ò¸ðµÇ¾ú½À´Ï´Ù. ÀÀ¿ëÇÁ·Î±×·¥À» ´Ù½Ã ½ÃÀÛ ÇϽʽÿÀ.";
+ Text[ turkish ] = "Sistem kaynaklarý tükendi. Uygulamayý yeniden baþlatýnýz.";
+ 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 objektijärjestelmää alustettaessa." ;
+ Message [ danish ] = "Fejl ved initialisering af objekt-systemet." ;
+ Message [ french ] = "Erreur lors de l'initialisation du système 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 ] = "B³¹d inicjalizacji systemu obiektów.";
+ Message[ japanese ] = "µÌÞ¼Þª¸Ä ¼½Ãт̉Šú‰»‚ÌÛ‚Ì´×°¡";
+ Message[ chinese_traditional ] = "¦bªì©l¤Æª«¥ó¨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 baþlatýlýrken hata oluþtu.";
+ 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) não existe." ;
+ Text [ portuguese ] = "O ficheiro $(FILE) não 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)¤£¦s¦b¡C";
+ Text[ arabic ] = "ÇáãáÝ $(FILE) ÛíÑ ãæÌæÏ.";
+ Text[ dutch ] = "Bestand $(FILE) bestaat niet.";
+ Text[ chinese_simplified ] = "Îļþ$(FILE)²»´æÔÚ¡£";
+ Text[ greek ] = "Ôï áñ÷åßï $(FILE) äåí õðÜñ÷åé.";
+ Text[ korean ] = "ÆÄÀÏ $(FILE) °¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.";
+ Text[ turkish ] = "$(FILE) dosyasý mevcut deðil.";
+ 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) não existe." ;
+ Text [ portuguese ] = "O atalho para o ficheiro $(FILE) não 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 ] = "Sökvägen 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 ] = "Œcie¿ka do pliku $(FILE) nie istnieje.";
+ Text[ japanese ] = "̧²Ù$(FILE)‚Ö‚ÌÊß½‚Í‚ ‚è‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "«ü¦VÀÉ®× $(FILE) ªº¸ô®|¤£¦s¦b¡C";
+ Text[ arabic ] = "ÇáãÓÇÑ Åáì ÇáãáÝ $(FILE) ÛíÑ ãæÌæÏ.";
+ Text[ dutch ] = "Pad naar bestand $(FILE) bestaat niet.";
+ Text[ chinese_simplified ] = "Ö¸ÏòÎļþ $(FILE) µÄ·¾¶²»´æÔÚ¡£";
+ Text[ greek ] = "Ç äéáäñïìÞ ðñïò ôï áñ÷åßï $(FILE) äåí õðÜñ÷åé.";
+ Text[ korean ] = "ÆÄÀÏ $(FILE)ÀÇ °æ·Î°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.";
+ Text[ turkish ] = "$(FILE) dosyasýnýn veri yolu mevcut deðil.";
+ Text[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_TOO_MANY_OPEN_FILES
+{
+ Text = "Die Datei $(FILE) konnte nicht geöffnet werden,\nda zur Zeit zu viele Dateien offen sind.\nSchließen 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 filhåndtak tilgjengelig.\nLukk noen filer og prøv 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) não pode ser aberto\npor que não existem mais alças de arquivo disponíveis.\nFeche alguns arquivos e tent" ;
+ Text [ portuguese ] = "Foi impossível 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 prøv 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 réessayer." ;
+ Text [ swedish ] = "Filen $(FILE) kunde inte öppnas\npå grund av att för många filer är öppna för tillfället.\nStäng några filer och försök 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 inténtelo 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 móg³ zostaæ otwarty,\nponiewa¿ w tym czasie by³o otwarte za du¿o plików.\nZamknij kilka plików i spróbuj je otworzyæ ponownie.";
+ Text[ japanese ] = "\n‚½‚¾‚¢‚Ü‚½‚­‚³‚ñ‚Ì̧²Ù‚ªŠJ‚©‚ê‰ß‚¬‚ÅA̧²Ù$(FILE)‚ÍŠJ‚©‚ê‚Ü‚¹‚ñB\n‚¢‚­‚‚©‚Ì̧²Ù‚ð•Â‚¶ Ä“xŽŽ‚Ý‚Ä‚­‚¾‚³‚¢B";
+ Text[ chinese_traditional ] = "µLªk¶}±ÒÀÉ®×$(FILE) ¡M\n¦]¬°¤w¸g¶}±Ò¤Ó¦hªºÀɮסC\n½ÐÃö³¬¤@¨ÇÀɮסMµM«á¦b­«·s¹Á¸Õ¡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 açýk olduðu\niçin açýlamýyor.\nBirkaç dosyayý kapatýp 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 ] = "Impossível o acesso ao ficheiro $(FILE) devido a direitos de acesso inexistentes." ;
+ Text [ finnish ] = "Tiedostoa $(FILE) ei voi avata, koska käyttöoikeudet 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'accès manquants." ;
+ Text [ swedish ] = "Filen $(FILE) kunde inte öppnas eftersom åtkomsträttigheter 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 dostêpu do pliku $(FILE) z powodu brakuj¹cych praw dostêpu.";
+ Text[ japanese ] = "̧²Ù $(FILE)‚É‚Í Œ —˜‚ª‚È‚¢‚̂ű¸¾½‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "¦]¬°¨S¦³Åª¨úÅv§Q¦ÓµLªkŪ¨úÀÉ®×$(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ý, eriþim haklarýnýn olmamasý nedeniyle açýlamadý.";
+ 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 ] = "Impossível o acesso ao ficheiro $(FILE)." ;
+ Text [ finnish ] = "Tiedostoa $(FILE) ei voi avata, koska käyttöoikeudet eivät 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'accès incorrects." ;
+ Text [ swedish ] = "Det var inte möjligt 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 dostêpu do pliku $(FILE).";
+ Text[ japanese ] = "̧²Ù$(FILE)‚ɂͱ¸¾½‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªkŪ¨úÀÉ®× $(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) dosyasýna eriþilemedi.";
+ Text[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_INVALID_HANDLE
+{
+ Text = "Die Datei $(FILE) konnte wegen einer ungültiger Dateidescriptors nicht geöffnet 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) não pode ser aberto devido a uma alça de arquivo inválida." ;
+ Text [ portuguese ] = "Foi impossível 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 numérisation." ;
+ 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 válido." ;
+ 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 mo¿na by³o otworzyæ z powodu nieprawid³owego dojœcia.";
+ Text[ japanese ] = "̧²Ù$(FILE)‚Í–³Œø‚Ȩ̀²Ù‹LqŒê‚Ì‚½‚ß‚ÉŠJ‚©‚ê‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "¦]µL®ÄªºÀÉ®×¼ÐÃѭȦӵLªk¶}±ÒÀÉ®×$(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ý geçersiz bir dosya tutamacý nedeniyle açýlamadý.";
+ 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) não pode ser criado." ;
+ Text [ portuguese ] = "Foi impossível 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 mo¿na by³o utworzyæ.";
+ Text[ japanese ] = "̧²Ù$(FILE)‚Í쬂ł«‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ chinese_traditional ] = "µLªk¶}±Ò·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ý oluþturulamadý.";
+ 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 ] = "Violação de compartilhamento durante o acesso do $(FILE)." ;
+ Text [ portuguese ] = "Erro durante o acesso compartilhado ao ficheiro $(FILE)." ;
+ Text [ finnish ] = "Yhteiskäyttövirhe tiedostossa $(FILE)." ;
+ Text [ danish ] = "Fejl under fælles adgang til filen $(FILE)." ;
+ Text [ french ] = "Violation du partage pendant l'accès 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 wspólnego dostêpu do pliku $(FILE).";
+ Text[ japanese ] = "̧²Ù$(FILE)‚Ö‚Ì‹¤—L±¸¾½‚ÌÛ‚Ì´×°¡";
+ Text[ chinese_traditional ] = "¦b¦P®ÉŪ¨úÀÉ®×$(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) dosyasýna paylaþýlan eriþimde hata oluþtu.";
+ 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'entrée/sortie générale lors de l'accès au fichier $(FILE)." ;
+ Text [ swedish ] = "Allmänt 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'entrée/sortie générale lors de l'accès au fichier $(FILE)." ;
+ Text [ danish ] = "Generel I/O fejl ved adgang til $(FILE)." ;
+ Text [ portuguese ] = "Erro geral de acesso/saída ao tentar entrar em $(FILE)." ;
+ Text[ chinese_simplified ] = "ÔÚ¶ÁÈ¡$(FILE)ʱ·¢ÉúÒ»¸öÒ»°ãµÄÊäÈë/Êä³ö´íÎó¡£";
+ Text[ russian ] = "Îáùàÿ îøèáêà ââîäà âûâîäà ïðè äîñòóïå ê ôàéëó $(FILE).";
+ Text[ polish ] = "Ogólny b³¹d dostêpu We/Wy podczas dostêpu do $(FILE).";
+ Text[ japanese ] = "$(FILE)‚ւ̱¸¾½‚Ìۂ̈ê”Ê“I‚ÈI/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) dosyasýna eriþimde genel girdi/çýktý hatasý oluþtu..";
+ 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 näyttö";
+ Text [danish] = "Helskærm";
+ Text [french] = "Plein écran";
+ Text [swedish] = "Helskärm";
+ 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 reçu" ;
+ Text [ dutch ] = "Bericht ontvangen" ;
+ Text [ portuguese ] = "Mensagem recebida" ;
+ Text[ chinese_simplified ] = "еĵç×ÓÓʼþ";
+ Text[ russian ] = "Ñîîáùåíèå ïîëó÷åíî";
+ Text[ polish ] = "Nadesz³a wiadomoœæ";
+ Text[ japanese ] = "Ò¯¾°¼Þ‚ÌŽóMŽž";
+ Text[ chinese_traditional ] = "·sªº¹q¤l¶l¥ó";
+ Text[ arabic ] = "æÕáÊ ÑÓÇáÉ";
+ Text[ dutch ] = "Bericht ontvangen";
+ Text[ chinese_simplified ] = "еĵç×ÓÓʼþ";
+ Text[ greek ] = "ËÞøç ìçíýìáôïò";
+ Text[ korean ] = "¸Þ¼¼Áö°¡ ¼ö½ÅµÇ¾ú½À´Ï´Ù.";
+ Text[ turkish ] = "Ýleti alýndý";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_STARTAPP
+{
+ Text = "Programmstart" ;
+ Text [ ENGLISH ] = "Start Application" ;
+ Text [ norwegian ] = "Start Applikasjon" ;
+ Text [ italian ] = "Avvia applicazione" ;
+ Text [ portuguese_brazilian ] = "Início 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 aplicación" ;
+ Text [ ENGLISH_US ] = "Start Application" ;
+ Text[ chinese_simplified ] = "Æô¶¯³ÌÐò";
+ Text[ russian ] = "Çàïóñê ïðîãðàììû";
+ Text[ polish ] = "Pocz¹tek programu";
+ Text[ japanese ] = "ÌßÛ¸Þ×Ñ‚ÌŠJŽnŽž";
+ Text[ chinese_traditional ] = "±Ò°Êµ{¦¡";
+ Text[ arabic ] = "ÈÏÁ ÇáÈÑäÇãÌ";
+ Text[ dutch ] = "Programma starten";
+ Text[ chinese_simplified ] = "Æô¶¯³ÌÐò";
+ Text[ greek ] = "Åêêßíçóç åöáñìïãÞò";
+ Text[ korean ] = "ÀÀ¿ëÇÁ·Î±×·¥ ½ÃÀÛ";
+ Text[ turkish ] = "Programý çalýþtýr";
+ 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- / Ausführungsfehler" ;
+ Text [ swedish ] = "Javascript runtime error" ;
+ Text [ danish ] = "JavaScript-runtimefejl" ;
+ Text [ italian ] = "Errore di runtime JavaScript" ;
+ Text [ spanish ] = "Error de ejecución Javascript" ;
+ Text [ french ] = "Runtime error JavaScript" ;
+ Text [ dutch ] = "Javascript runtime error" ;
+ Text [ portuguese ] = "Erro na execução de JavaScript" ;
+ Text[ chinese_simplified ] = "Javascript-ÔËÐÐʱ¼ä´íÎó";
+ Text[ russian ] = "Îøèáêà ïðè âûïîëíåíèè Javascript";
+ Text[ polish ] = "B³¹d 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 yürütüm süresi 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 beëindigen" ;
+ Text [ spanish ] = "Cerrar aplicación" ;
+ 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 beëindigen";
+ 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 ] = "Créer 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 ] = "Utwórz dokument";
+ Text[ japanese ] = "ÄÞ·­ÒÝÄ‚Ì쬎ž";
+ Text[ chinese_traditional ] = "«Ø¥ß¤å¥ó";
+ Text[ arabic ] = "ÅäÔÇÁ ãÓÊäÏ";
+ Text[ dutch ] = "Document maken";
+ Text[ chinese_simplified ] = "½¨Á¢Îĵµ";
+ Text[ greek ] = "Äçìéïõñãßá åããñÜöïõ";
+ Text[ korean ] = "¹®¼­ ¸¸µé±â";
+ Text[ turkish ] = "Belge oluþtur";
+ 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 stängs" ;
+ 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 schließen" ;
+ 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 ] = "Stäng 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 ] = "Otwórz 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 ] = "«O¦s¤å¥ó";
+ 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 ] = "ÄÞ·­ÒÝÄ‚É–¼‘O‚ð•t‚¯‚Ä•Û‘¶‚·‚鎞";
+ Text[ chinese_traditional ] = "¥t¦s¤å¥ó";
+ 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 ] = "¤å¥ó¤w¸gÀx¦s";
+ 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 ] = "ÄÞ·­ÒÝÄ‚É–¼‘O‚ð•t‚¯‚Ä•Û‘¶‚µ‚½Žž";
+ Text[ korean ] = "¹®¼­°¡ ´ÙÀ½ÀÇ À̸§À¸·Î ÀúÀåµÇ¾ú½À´Ï´Ù";
+ Text[ chinese_simplified ] = "ÎĵµÒѾ­´æÅÌΪ";
+ Text[ chinese_traditional ] = "¤å¥ó¤w¸gÀx¦s¬°";
+ 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 etkinleþtir";
+ 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 ] = "Désactiver 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 ] = "¦C¦L¤å¥ó";
+ Text[ arabic ] = "ØÈÇÚÉ ÇáãÓÊäÏ";
+ Text[ dutch ] = "Document afdrukken";
+ Text[ chinese_simplified ] = "´òÓ¡Îĵµ";
+ Text[ greek ] = "Åêôýðùóç åããñÜöïõ";
+ Text[ korean ] = "¹®¼­ Àμâ";
+ Text[ turkish ] = "Belgeyi yazdýr";
+ 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 modèle 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 nieprawid³owy 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 ] = "Seçilen þablonun formatý yanlýþ";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ERR_NOFILE
+{
+ Text = "Die Datei $ kann nicht geöffnet 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 geöffnet werden." ;
+ Text [ portuguese ] = "Foi impossível abrir o ficheiro $." ;
+ Text[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÎļþ $ ¡£";
+ Text[ russian ] = "Ôàéë $ îòêðûòü íå óäàåòñÿ.";
+ Text[ polish ] = "Plik $ nie mo¿e zostaæ otworzony.";
+ Text[ japanese ] = "̧²Ù$‚ÍŠJ‚­‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªk¶}±ÒÀÉ®× $ ¡C";
+ Text[ arabic ] = "áÇ íãßä ÝÊÍ ÇáãáÝ $.";
+ Text[ dutch ] = "Het bestand $ kan niet worden geopend.";
+ Text[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÎļþ $ ¡£";
+ Text[ greek ] = "Äåí åßíáé äõíáôüí íá áíïé÷èåß ôï áñ÷åßï $.";
+ Text[ korean ] = "ÆÄÀÏ $¸¦ ¿­¼ö ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "$ dosyasý açýlamýyor.";
+ 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 ] = "~Beëindigen" ;
+ Text [ swedish ] = "A~vsluta" ;
+ Text [ danish ] = "Afslut" ;
+ Text [ portuguese_brazilian ] = "~Beenden" ;
+ Text [ portuguese ] = "~Sair" ;
+ Text[ chinese_simplified ] = "½áÊø(~X)";
+ Text[ russian ] = "Âûõîä";
+ Text[ polish ] = "Za~koñcz";
+ Text[ japanese ] = "I—¹(~X)";
+ Text[ chinese_traditional ] = "µ²§ô(~X)";
+ Text[ arabic ] = "ÅäåÇÁ";
+ Text[ dutch ] = "~Beëindigen";
+ Text[ chinese_simplified ] = "½áÊø(~X)";
+ Text[ greek ] = "¸îïäïò";
+ Text[ korean ] = "Á¾·á(~X)";
+ Text[ turkish ] = "~Çýkýþ";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EXITANDRETURN
+{
+ Text = "~Beenden & zurück zu " ;
+ Text [ ENGLISH ] = "E~xit & return to " ;
+ Text [ dutch ] = "~Beëindigen & 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 & zurück zu " ;
+ Text [ portuguese ] = "~Sair & Regressar a " ;
+ Text[ chinese_simplified ] = "½áÊøºÍ·µ»Ø(~X)";
+ Text[ russian ] = "Âûõîä & íàçàä ê ";
+ Text[ polish ] = "Zakoñcz & Powróæ do ";
+ Text[ japanese ] = "I—¹&–ß‚é(~X)";
+ Text[ chinese_traditional ] = "µ²§ô©Mªð¦^(~X)";
+ Text[ arabic ] = "ÅäåÇÁ æÇáÚæÏÉ Åáì ";
+ Text[ dutch ] = "~Beëindigen & terug naar ";
+ Text[ chinese_simplified ] = "½áÊøºÍ·µ»Ø(~X)";
+ Text[ greek ] = "¸~îïäïò êáé åðéóôñïöÞ óå ";
+ Text[ korean ] = "³¡³»±â & µ¹¾Æ°¡±â (~X)";
+ Text[ turkish ] = "~Çýk ve dön: ";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EXTHELPSTATUS
+{
+ Text = "Wählen Sie einen Befehl oder klicken Sie, um ein Thema auszuwählen." ;
+ 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 ] = "Sélectionnez une commande ou cliquez pour choisir une rubrique." ;
+ Text [ dutch ] = "Kies een optie of klik om een onderwerp te kiezen." ;
+ Text [ swedish ] = "Välj ett kommando eller klicka för att välja ett tema." ;
+ Text [ danish ] = "Vælg en kommando eller klik for udvælge et emne." ;
+ Text [ portuguese_brazilian ] = "Wählen Sie einen Befehl oder klicken Sie, um ein Thema auszuwählen." ;
+ 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¿ï¾Ü©ÎªÌ«ö¤@­Ó©R¥O¡M¿ï¾Ü¤@­Ó¥DÃD¡C";
+ 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 seçin ya da bir konu seçmek için týklayýn.";
+ 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 ] = "Sähköposti" ;
+ 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 ] = "¹q¤l¶l¥ó";
+ 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 ] = "Endereços" ;
+ 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 ] = "Hjälp" ;
+ Text [ danish ] = "Hjælp" ;
+ 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 ] = "Yardým";
+ 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 automáticamente con 'XX'" ;
+ Text [ french ] = "Ne pas lancer automatiquement pour la fonction 'XX'" ;
+ Text [ dutch ] = "Bij 'XX' niet automatisch starten" ;
+ Text [ portuguese ] = "Não iniciar 'XX' automaticamente." ;
+ Text[ chinese_simplified ] = "ÔÚ 'XX' ʱ²»×Ô¶¯ÔËÐС£";
+ Text[ russian ] = "Íåàâòîìàòè÷åñêèé çàïóñê ïðè 'XX'";
+ Text[ polish ] = "Przy 'XX' nie startuj automatycznie";
+ Text[ japanese ] = "'XX'‚ÅŽ©“®“I‚ÉŠJŽn‚µ‚È‚¢B";
+ Text[ chinese_traditional ] = "¦b 'XX' ®É¤£¦Û°Ê¹B¦æ¡C";
+ Text[ arabic ] = "ÚÏã ÈÏÁ ÊáÞÇÆíÇð ÚäÏ 'XX'";
+ Text[ dutch ] = "Bij 'XX' niet automatisch starten";
+ Text[ chinese_simplified ] = "ÔÚ 'XX' ʱ²»×Ô¶¯ÔËÐС£";
+ Text[ greek ] = "¼÷é áõôüìáôç åêêßíçóç óôï 'XX'";
+ Text[ korean ] = "'XX'¿¡¼­ ÀÚµ¿ ½ÃÀÛÀÌ ¾ÈµË´Ï´Ù.";
+ Text[ turkish ] = "'XX' olduðunda otomatik baþlatma yapýlmasýn";
+ 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 más las sugerencias" ;
+ Text [ french ] = "Ne plus afficher les astuces" ;
+ Text [ dutch ] = "Tips niet meer weergeven" ;
+ Text [ portuguese ] = "Não mostrar sugestões" ;
+ Text[ chinese_simplified ] = "²»ÔÙÏÔʾÌáʾ";
+ Text[ russian ] = "Ñîâåòû áîëüøå íå ïîêàçûâàòü";
+ Text[ polish ] = "Nie wyœwietlaj porad";
+ Text[ japanese ] = "ËÝÄ‚ð•\\Ž¦‚µ‚È‚¢";
+ Text[ chinese_traditional ] = "¤£­n¦AÅã¥Ü´£¥Ü";
+ Text[ arabic ] = "ÚÏã ÅÙåÇÑ ÇáÊáãíÍÇÊ ãÑÉ ÃÎÑì";
+ Text[ dutch ] = "Tips niet meer weergeven";
+ Text[ chinese_simplified ] = "²»ÔÙÏÔʾÌáʾ";
+ Text[ greek ] = "Íá ìçí åìöáíéóôïýí Üëëåò õðïäåßîåéò";
+ Text[ korean ] = "ÆÁÀ» Ç¥½ÃÇÏÁö ¾ÊÀ½";
+ Text[ turkish ] = "Öneri görüntüleme";
+ 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 ] = "Hjälplist" ;
+ Text [ danish ] = "Hjælp-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 ] = "Yardým çubuðu";
+ 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 hjälp installerad för detta ämne." ;
+ Text [ danish ] = "Der er ikke installeret Hjælp 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 geïnstalleerd." ;
+ Text [ portuguese ] = "O ficheiro de ajuda para este tópico não está instalado." ;
+ Text[ chinese_simplified ] = "ûÓа²×°ÓйØÕâ¸öÖ÷ÌâµÄÇóÖúÎļþ¡£";
+ Text[ russian ] = "Ïî ýòîé òåìå ñïðàâêà íå èíñòàëëèðîâàíà.";
+ Text[ polish ] = "Dla tego tematu nie zainstalowano pliku pomocy.";
+ Text[ japanese ] = "‚±‚ÌðςɊւ·‚éÍÙÌ߂Ͳݽİق³‚ê‚Ä‚¢‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "¨S¦³¦w¸ËÃö©ó³o­Ó¥DÃDªº»¡©úÀɮסC";
+ Text[ arabic ] = "ãáÝ ÇáãÓÇÚÏÉ ÇáÎÇÕ ÈåÐÇ ÇáãæÖæÚ ÛíÑ ãËÈÊ.";
+ Text[ dutch ] = "Bij dit onderwerp werd geen Help geïnstalleerd.";
+ Text[ chinese_simplified ] = "ûÓа²×°ÓйØÕâ¸öÖ÷ÌâµÄÇóÖúÎļþ¡£";
+ Text[ greek ] = "Äåí Ý÷åé ãßíåé åãêáôÜóôáóç ôçò âïÞèåéáò ãéá áõôü ôï èÝìá.";
+ Text[ korean ] = "ÀÌ ÁÖÁ¦ÀÇ µµ¿ò¸» ÆÄÀÏÀÌ ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù.";
+ Text[ turkish ] = "Bu konu ile ilgili yardým 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 aplicación de ayuda." ;
+ Text [ french ] = "Impossible de lancer l'application d'aide" ;
+ Text [ swedish ] = "Hjälptillämpningen kunde inte startas" ;
+ Text [ danish ] = "Det var ikke muligt at starte Hjælp-applikationen" ;
+ Text [ portuguese ] = "Foi impossível iniciar o sistema de ajuda." ;
+ Text [ portuguese_brazilian ] = "Die Hilfeapplikation konnte nicht gestartet werden" ;
+ Text[ chinese_simplified ] = "ÎÞ·¨Æô¶¯ÇóÖúÓ¦ÓóÌÐò¡£";
+ Text[ russian ] = "Íå óäàåòñÿ çàïóñòèòü ïðèëîæåíèå ñïðàâêè";
+ Text[ polish ] = "Systemu pomocy nie mo¿na by³o uruchomiæ";
+ Text[ japanese ] = "ÍÙÌß±Ìßع°¼®Ý‚ðŠJŽn‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½";
+ Text[ chinese_traditional ] = "µLªk±Ò°Ê»¡©úÀ³¥Îµ{¦¡¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÈÏÁ ÊØÈíÞ ÇáãÓÇÚÏÉ";
+ Text[ dutch ] = "De Help-applicatie kon niet worden opgestart";
+ Text[ chinese_simplified ] = "ÎÞ·¨Æô¶¯ÇóÖúÓ¦ÓóÌÐò¡£";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá åêêéíÞóåé ç åöáñìïãÞ âïÞèåéáò";
+ Text[ korean ] = "µµ¿ò¸» ½Ã½ºÅÛÀÌ ½ÃÀÛµÇÁö ¾Ê¾Ò½À´Ï´Ù.";
+ Text[ turkish ] = "Yardým uygulamasý baþlatýlamadý";
+ 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 funções" ;
+ Text[ chinese_simplified ] = "¹¤¾ßÀ¸";
+ Text[ russian ] = "Ïàíåëü ôóíêöèé";
+ Text[ polish ] = "Pasek funkcji";
+ Text[ japanese ] = "̧ݸ¼®Ý ÊÞ°";
+ Text[ chinese_traditional ] = "¤u¨ã¦C";
+ Text[ arabic ] = "ÔÑíØ ÇáãåÇã";
+ Text[ dutch ] = "Werkbalk";
+ Text[ chinese_simplified ] = "¹¤¾ßÀ¸";
+ Text[ greek ] = "ÃñáììÞ ëåéôïõñãéþí";
+ Text[ korean ] = "±â´É ¸ðÀ½";
+ Text[ turkish ] = "Ýþlev çubuðu";
+ 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 configuração 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 upptäckts i specialkonfigurationen.\nKontakta Din administratör!" ;
+ 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 configuración especial se ha detectado un error.\nPóngase por favor en contacto con su administrador." ;
+ Text [ french ] = "Une erreur a été détectée dans la configuration spéciale.\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 b³¹d.\nZwróæ siê do swojego administratora!";
+ Text[ japanese ] = "“ÁŽê‚ÈÝ’è‚Å´×°‚ª”­¶‚µ‚Ü‚µ‚½B\n±ÄÞÐƽÄÚ°À‚ɘA—‚µ‚Ä‚­‚¾‚³‚¢B";
+ Text[ chinese_traditional ] = "¦b¤@­Ó¯S®íªº°t¸mÀɮפºµo²{¤@­Ó¿ù»~¡C½Ð©MºÞ²z­ûÁpµ¸¡T";
+ 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 konfigürasyonda bir hata bulundu.\nLütfen sistem yöneticinize baþvurun!";
+};
+
+
+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 ] = "W³¹cz 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 etkinleþtir";
+ 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 ] = "~Düzenle";
+ 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 ] = "Otwórz";
+ 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 impossível iniciar a importação dos componentes do programa correctamente.\nInicie o programa de instalação (Setup) com a opção /repair.";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá ãßíåé óùóôÞ áíáãíþñéóç ïñéóìÝíùí óçìáíôéêþí óôïé÷åßùí ôïõ ðñïãñÜììáôïò.\nÐáñáêáëþ åêêéíÞóôå ôï ðñüãñáììá åãêáôÜóôáóçò ìå ôçí åðéëïãÞ /repair..";
+ Text[ dutch ] = "Belangrijke programmaonderdelen konden niet correct worden geïnitialiseerd.\nStart het setup programma met de optie /Repareren.";
+ Text[ french ] = "Certains composants importants du programme n'ont pas pu être initialisés. Veuillez activer le programme d'installation (Setup) et y activer l'option de réparation (Repair).";
+ Text[ spanish ] = "Algunos componentes importantes del programa no se pudieron instalar.\nInicie por favor el programa de instalación con la opción /repair.";
+ Text[ swedish ] = "Viktiga programdelar kunde inte initialiseras korrekt.\nVar vänlig 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 ] = "Wa¿ne czêœci programu nie mog³y zostaæ prawid³owo zainstalowane.\nProszê uruchomiæ program instalacyjny u¿ywaj¹c 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•œ‚ÅŠJŽn‚µ‚ĉº‚³‚¢B";
+ Text[ korean ] = "ÇÁ·Î±×·¥ÀÇ Áß¿ä ºÎºÐÀ» Á¦´ë·Î ÃʱâÈ­ÇÏÁö ¸øÇß½À´Ï´Ù. \n¿É¼Ç/º¹±¸·Î SetupÀ» ½ÃÀÛÇϽʽÿÀ.";
+ Text[ chinese_simplified ] = "ÎÞ·¨ÕýÈ·³õʼ»¯ÖØÒªµÄ³Ì²¿¼þ¡£\nÇëÄúÆô¶¯°²×°³ÌÐò£¬Ö´ÐÐÑ¡ÏîÐÞ²¹¡£";
+ Text[ chinese_traditional ] = "µLªk¥¿Ú̪ì©l¤Æ­«­nªºµ{¦¡³¡¥ó¡C½Ð±z±Ò°Ê¦w¸Ëµ{¦¡¡A°õ¦æ­×Î`¿ï¶µ¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÊËÈíÊ ÈÚÖ ÚäÇÕÑ ÇáÈÑäÇãÌ ÇáåÇãÉ ÈÔßá ÕÍíÍ.\nÇáÑÌÇÁ ÈÏÁ ÈÑäÇãÌ ÇáÅÚÏÇÏ ÈÇáÎíÇÑ /repair.";
+ Text[ turkish ] = "Önemli program öðeleri doðru bir þekilde baþlatýlamadý.\nKurulumu /repair seçeneði ile baþlatýn.";
+};
+
+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 referência não será guardada: ";
+ Text [ danish ] = "Referencen bliver ikke gemt: ";
+ Text [ french ] = "Impossible d'enregistrer la référence : ";
+ 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 ] = "Odwo³anie nie zosta³o zapisane: ";
+ Text[ japanese ] = "ŽQÆ‚Í•Û‘¶‚³‚ê‚Ü‚¹‚ñ: ";
+ Text[ chinese_traditional ] = "¤£Àx¦s°Ñ·Ó¡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 0000000000..f9bc0cf71a
--- /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 0000000000..96ae5f36f6
--- /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 0000000000..16612e120b
--- /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 0000000000..703c1dbc8d
--- /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 während 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 0000000000..d58004d0a2
--- /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 0000000000..24f521cd33
--- /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 0000000000..d920481dcb
--- /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 0000000000..5a4fea5163
--- /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 0000000000..e0645c2db0
--- /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 0000000000..d4b2335653
--- /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 0000000000..61a010c7ef
--- /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 0000000000..8afc1b96d2
--- /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 0000000000..94a1c54986
--- /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 0000000000..8ca86f5cde
--- /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 0000000000..900d0349df
--- /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 0000000000..43429e86de
--- /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 0000000000..dbcb92ac8c
--- /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 ] = "nimetön" ;
+ Text [ danish ] = "ikke-navngivet" ;
+ Text [ french ] = "Sans nom" ;
+ Text [ swedish ] = "namnlös" ;
+ 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 ] = "¥¼©R¦W";
+ Text[ arabic ] = "ÈÏæä ÚäæÇä";
+ Text[ greek ] = "Äß÷ùò üíïìá";
+ Text[ korean ] = "Á¦¸ñ¾øÀ½";
+ Text[ turkish ] = "Adsýz";
+};
+
+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 = "Schließen" ;
+ 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 ] = "Stäng" ;
+ 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 ] = "Automático" ;
+ TEXT [ portuguese ] = "Automático" ;
+ TEXT [ finnish ] = "Automaattinen" ;
+ TEXT [ danish ] = "Automatisk" ;
+ TEXT [ french ] = "Automatique" ;
+ TEXT [ swedish ] = "Automatisk" ;
+ TEXT [ dutch ] = "Automatisch" ;
+ TEXT [ spanish ] = "Automático" ;
+ 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 ] = "Käytetyt tyylit" ;
+ TEXT [ danish ] = "Anvendte typografier" ;
+ TEXT [ french ] = "Styles utilisés" ;
+ TEXT [ swedish ] = "Använda mallar" ;
+ TEXT [ dutch ] = "Gebruikte opmaakprofielen" ;
+ TEXT [ spanish ] = "Estilos utilizados" ;
+ TEXT [ english_us ] = "Applied Styles" ;
+ TEXT[ chinese_simplified ] = "ʹÓõÄÑùʽ";
+ TEXT[ russian ] = "Ïðèìåíåííûå ñòèëè";
+ TEXT[ polish ] = "U¿ywane style";
+ TEXT[ japanese ] = "Žg—p‚µ‚½½À²Ù";
+ TEXT[ chinese_traditional ] = "¨Ï¥Îªº¼Ë¦¡";
+ TEXT[ arabic ] = "ÃäãÇØ ÞíÏ ÇáÇÓÊÎÏÇã";
+ TEXT[ greek ] = "ÅöáñìïóìÝíá ðñüôõðá";
+ TEXT[ korean ] = "À¯ÇüÀÌ Àû¿ëµÇ¾ú½À´Ï´Ù.";
+ TEXT[ turkish ] = "Kullanýlan biçimler";
+};
+
+
+
+String STR_STYLE_FILTER_USERDEF
+{
+ TEXT = "Benutzervorlagen" ;
+ TEXT [ English ] = "User styles" ;
+ TEXT [ norwegian ] = "Brukerstiler" ;
+ TEXT [ italian ] = "Modelli utente" ;
+ TEXT [ portuguese_brazilian ] = "Estilos do usuário" ;
+ TEXT [ portuguese ] = "Estilos do utilizador" ;
+ TEXT [ finnish ] = "Käyttäjän tyylit" ;
+ TEXT [ danish ] = "Brugertypografier" ;
+ TEXT [ french ] = "Styles personnalisés" ;
+ TEXT [ swedish ] = "Användardefinierade formatmallar" ;
+ TEXT [ dutch ] = "Eigen opmaakprofielen" ;
+ TEXT [ spanish ] = "Estilos del usuario" ;
+ TEXT [ english_us ] = "Custom Styles" ;
+ TEXT[ chinese_simplified ] = "Óû§Ñùʽ";
+ TEXT[ russian ] = "Ñòèëè ïîëüçîâàòåëÿ";
+ TEXT[ polish ] = "Style u¿ytkownika";
+ TEXT[ japanese ] = "Õ°»Þ°’è‹`‚̽À²Ù";
+ TEXT[ chinese_traditional ] = "¦Û­q¼Ë¦¡";
+ TEXT[ arabic ] = "ÃäãÇØ ãÎÕÕÉ";
+ TEXT[ greek ] = "Óôõë ÷ñÞóôç";
+ TEXT[ korean ] = "»ç¿ëÀÚ Á¤ÀÇ À¯Çü";
+ TEXT[ turkish ] = "Kullanýcý tanýmlý biçimler";
+};
+
+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 ] = "Tüm biçimler";
+};
+
+String STR_STANDARD
+{
+ Text = "Standard" ;
+ Text [ English ] = "Standard" ;
+ Text [ english_us ] = "Standard" ;
+ Text[ portuguese ] = "Padrão";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ dutch ] = "Standaard";
+ Text[ french ] = "Par défaut";
+ Text[ spanish ] = "Predeterminado";
+ Text[ italian ] = "Standard";
+ Text[ danish ] = "Standard";
+ Text[ swedish ] = "Standard";
+ Text[ polish ] = "Domyœlnie";
+ 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 ] = "<Tümü>";
+};
+
+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? Rückgängig: : R³ckgõngig: */
+ Text = "Rückgängig: " ;
+ 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 ] = "ºM®ø©R¥O¡G ";
+ 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 ] = "Återställ: " ;
+ Text [ danish ] = "Gendan: " ;
+ Text [ italian ] = "Ripristina: " ;
+ Text [ spanish ] = "Restaurar: " ;
+ Text [ french ] = "Restaurer : " ;
+ Text [ dutch ] = "Herstellen: " ;
+ Text[ chinese_simplified ] = "»Ö¸´³·ÏûÃüÁî (~D)";
+ Text[ russian ] = "Âîññòàíîâèòü: ";
+ Text[ polish ] = "Ponów: ";
+ Text[ japanese ] = "‚â‚è’¼‚µ: (~D)";
+ Text[ chinese_traditional ] = "«ì´_ºM®ø©R¥O (~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 ] = "~Répéter : " ;
+ Text [ dutch ] = "~Herhalen: " ;
+ Text[ chinese_simplified ] = "ÉÏÒ»¸öÃüÁî(~R)";
+ Text[ russian ] = "Ïîâòîðèòü: ";
+ Text[ polish ] = "Ostatnie polecenie: ";
+ Text[ japanese ] = "ŒJ‚è•Ô‚µ:(~R) ";
+ Text[ chinese_traditional ] = "¤W¤@­Ó©R¥O(~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 tâche";
+ 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 ] = "·s¼Wµ¡¤f";
+ Text[ arabic ] = "ãåãÉ ÌÏíÏÉ";
+ Text[ greek ] = "ÍÝá åñãáóßá";
+ Text[ korean ] = "»õ·Î¿î ÀÛ¾÷";
+ Text[ turkish ] = "Yeni görev";
+};
+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 modificações?" ;
+ Message [ portuguese ] = "Cancelar todas as modificações?" ;
+ 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 ] = "Tüm deðiþiklikleri iptal et?";
+};
+
diff --git a/sfx2/source/appl/sfxdll.cxx b/sfx2/source/appl/sfxdll.cxx
new file mode 100644
index 0000000000..a03f8c3c6b
--- /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 0000000000..c0a871c969
--- /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 0000000000..c20f85e009
--- /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 führt 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 führt 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 0000000000..775a7e059f
--- /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 0000000000..fccc51dc3c
--- /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 aufgelöst 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 résoudre le nom de l'ordinateur\n" ;
+ Text [ swedish ] = "Datornamnet kunde inte lösas upp\n" ;
+ Text [ danish ] = "Det var ikke muligt at fortolke computernavnet\n" ;
+ Text [ portuguese ] = "Impossível resolver o nome do computador.\n" ;
+ Text [ portuguese_brazilian ] = "Der Rechnername konnte nicht aufgelöst werden\n" ;
+ Text[ chinese_simplified ] = "ÎÞ·¨ÕÒµ½Ö÷»úµØÖ·\n";
+ Text[ russian ] = "Îïðåäåëèòü èìÿ êîìïþòåðà íå óäàåòñÿ\n";
+ Text[ polish ] = "Nazwy komputera nie mo¿na by³o przetworzyæ\n";
+ Text[ japanese ] = "νĖ¼‚ÍŒ©‚‚©‚è‚Ü‚¹‚ñ‚Å‚µ‚½\n";
+ Text[ chinese_traditional ] = "µLªk§ä¨ì¥D¹q¸£¦ì§}¡C\n";
+ Text[ arabic ] = "ÊÚÐÑ ÊÍáíá ÇÓã ÇáÍÇÓÈ\n";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí ãßíåé áíÜëõóç ôïõ ïíüìáôïò ôïõ õðïëïãéóôÞ $(ARG1)";
+ Text[ korean ] = "ÄÄÇ»ÅÍ À̸§À» È®ÀÎÇÏÁö ¸øÇß½À´Ï´Ù \n";
+ Text[ turkish ] = "Bilgisayarýn adý çözülemedi\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 conexión Internet" ;
+ Text [ french ] = "Impossible d'établir la connexion Internet" ;
+ Text [ swedish ] = "Det gick inte att upprätta en Internet-förbindelse" ;
+ Text [ danish ] = "Det var ikke muligt at oprette en forbindelse til Internettet" ;
+ Text [ portuguese_brazilian ] = "Die Internetverbindung konnte nicht hergestellt werden" ;
+ Text [ portuguese ] = "Impossível estabelecer a ligação com a Internet." ;
+ Text[ chinese_simplified ] = "ÎÞ·¨ºÍ¹ú¼Ê»¥ÁªÍø½¨Á¢Á¬½Ó";
+ Text[ russian ] = "Óñòàíîâèòü ñâÿçü ñ Èíòåðíåòîì íå óäàåòñÿ";
+ Text[ polish ] = "Nie mo¿na by³o uzyskaæ po³¹czenia z sieci¹ Internetu";
+ Text[ japanese ] = "²ÝÀ°È¯Ä‚ÌÚ‘±‚ª‚Å‚«‚Ä‚¢‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªk©M Internet «Ø¥ß³sµ²¡C";
+ Text[ arabic ] = "ÊÚÐÑ Úãá ÇÊÕÇá ÅäÊÑäÊ";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá ðñáãìáôïðïéçèåß ç óýíäåóç ìå ôï Internet";
+ Text[ korean ] = "ÀÎÅÍ³Ý Á¢¼ÓÀÌ ¿Ï¼ºµÇÁö ¾Ê¾Ò½À´Ï´Ù.";
+ Text[ turkish ] = "Internet baðlantýsý gerçekleþtirilemedi.";
+};
+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 través de Internet.\nMensaje de error del servidor: $(ARG1)" ;
+ Text [ french ] = "Impossible de lire des données via Internet.\nMessage d'erreur du serveur : $(ARG1)" ;
+ Text [ swedish ] = "Data kunde inte läsas via Internet.\nServerfelmeddelande: $(ARG1)" ;
+ Text [ danish ] = "Det var ikke muligt at indlæse data over Internettet.\nServerfejlmelding: $(ARG1)" ;
+ Text [ portuguese ] = "Foi impossível 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 mo¿na odczytaæ przez Internet. \nKomunikat o b³êdzie serwera: $(ARG1)";
+ Text[ japanese ] = "ÃÞ°À‚ͲÝÀ°È¯Ä‚©‚ç‚Í“Ç‚ÝŽæ‚ê‚Ü‚¹‚ñ‚Å‚µ‚½\nB»°ÊÞ° ´×° Ò¯¾°¼Þ: $(ARG1)";
+ Text[ chinese_traditional ] = "µLªk³z¹L Internet Ū¨ú¸ê®Æ¡C\n¦øªA¾¹³ø§i¿ù»~¡G$(ARG1)";
+ Text[ arabic ] = "ÊÚÐÑ ÞÑÇÁÉ ÇáÈíÇäÇÊ ÚÈÑ ÇáÅäÊÑäÊ.\nÑÓÇáÉ ÎØà ãä ÇáãÒæøÏ: $(ARG1)";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí áíÜãíùóç äåäïìÝíùí áðü ôï Internet.\nÌÞíõìá óöÜëìáôïò ôïõ äéáêïìéóôÞ: $(ARG1)";
+ Text[ korean ] = "ÀÎÅͳݿ¡¼­ µ¥ÀÌÅÍ Àб⠿À·ù\n.¼­¹ö ¿À·ù ¸Þ¼¼Áö: $(ARG1)";
+ Text[ turkish ] = "Internet üzerinden veri okunurken hata oluþtu.\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 données à l'Internet.\nMessage d'erreur du serveur : $(ARG1)" ;
+ Text [ swedish ] = "Data kunde inte överföras till Internet.\nServerfelmeddelande: $(ARG1)" ;
+ Text [ danish ] = "Det var ikke muligt at overføre data til Internettet.\nServerfejlmelding: $(ARG1)" ;
+ Text [ portuguese ] = "Foi impossível 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 mo¿na przes³aæ przez Internet.\nKomunikat o b³êdzie z serwera: $(ARG1)";
+ Text[ japanese ] = "ÃÞ°À‚ͲÝÀ°È¯Ä‚É“]‘—‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½\nB»°ÊÞ° ´×° Ò¯¾°¼Þ: $(ARG1)";
+ Text[ chinese_traditional ] = "µLªk¦V Internet ¶Ç»¼¸ê®Æ¡C\n¦øªA¾¹³ø§i¿ù»~¡G$(ARG1)";
+ Text[ arabic ] = "ÊÚÐÑ äÞá ÇáÈíÇäÇÊ Åáì ÇáÅäÊÑäÊ.\nÑÓÇáÉ ÎØà ãä ÇáãÒæøÏ: $(ARG1)";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí ìåôÜäïóç äåäïìÝíùí ìÝóù ôïõ Internet.\nÌÞíõìá óöÜëìáôïò ôïõ äéáêïìéóôÞ: $(ARG1)";
+ Text[ korean ] = "ÀÎÅͳݿ¡¼­ µ¥ÀÌÅÍ º¯È¯ ¿À·ù.\n¼­¹ö ¿À·ù ¸Þ¼¼Áö: $(ARG1)";
+ Text[ turkish ] = "Veriler Internet üzerinden aktarýlamadý.\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 générale Internet" ;
+ Text [ swedish ] = "Ett allmänt 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 ] = "Wyst¹pi³ ogólny b³¹d w sieci Internetu";
+ Text[ japanese ] = "²ÝÀ°È¯Ä—̈æ‚̈ê”Ê“I‚È´×°‚Ì”­¶";
+ Text[ chinese_traditional ] = "¦b Internet ³sµ²­S³ò¤ºµ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 errónea\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 ] = "B³¹d 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 overførsler.\nEr du sikker på, at du vil annullere?\n";
+ Text[ french ] = "Vous avez des téléchargements 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 ] = "Todavía existen descargas activas.\n¿Desea 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 ] = "ÁÙ¥¿¦b¤U¸üÀɮסC\n¯u­n¤¤Â_¡H\n";
+ Text[ arabic ] = "ãÇÒÇáÊ åäÇß ÚãáíÇÊ ÊäÒíá äÔØÉ.\nåá ÊÑíÏ ÇáÅäåÇÁ ÝÚáÇð¿\n";
+ Text[ greek ] = "Åêôåëïýíôáé áêüìç ëÞøåéò äåäïìÝíùí.\nÈÝëåôå ðñáãìáôéêÜ íá ôåñìáôßóåôå ôç äéáäéêáóßá;\n";
+ Text[ korean ] = "´Ù¿î·Îµå°¡ ÁøÇàÁßÀÔ´Ï´Ù.\n±×·¡µµ ÁßÁö ÇϽðڽÀ´Ï±î?\n";
+ Text[ turkish ] = "Þu an devam eden veri indirme iþleri var.\nGerçekten çý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 overførsler 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 ] = "Todavía hay documentos para descargar.\n¿Desea realmente cancelar?\n" ;
+ Text [ french ] = "Il y a des téléchargements dans la file d'attente.\nÊtes-vous sûr de vouloir quitter ?\n" ;
+ Text [ dutch ] = "Er staan nog downloads op de wachtlijst.\nWilt u werkelijk beëindigen?\n" ;
+ Text[ chinese_simplified ] = "»¹ÓÐÏÂÔØÃüÁîµÈºò´¦Àí¡£\nÄúÕæÒª½áÊøÂð£¿\n";
+ Text[ russian ] = "Íà î÷åðåäè åùå ñòîÿò çàãðóçêè.\nÂû äåéñòâèòåëüíî õîòèòå çàêîí÷èòü?\n";
+ Text[ polish ] = "Dokumenty czekaj¹ jeszcze na za³adowanie.\nCzy chcesz na pewno zakoñczyæ?\n";
+ Text[ japanese ] = "ÀÞ³ÝÛ°ÄÞ‚Í‚Ü‚¾‘Ò‹@’†‚Å‚·B\nI—¹‚µ‚Ä‚à‚æ‚낵‚¢‚Å‚·‚©?\n";
+ Text[ chinese_traditional ] = "ÁÙ¥¿¦b¤U¸üÀɮסC\n¯u­nµ²§ô¡H\n";
+ Text[ arabic ] = "ãÇÒÇáÊ åäÇß ÚãáíÇÊ ÊäÒíá Úáì ÞÇÆãÉ ÇáÇäÊÙÇÑ.\nåá ÊÑíÏ ÇáÅäåÇÁ ÝÚáÇõ¿\n";
+ Text[ greek ] = "ÕðÜñ÷ïõí áêüìç ëÞøåéò äåäïìÝíùí óôç óåéñÜ áíáìïíÞò.\nÈÝëåôå óßãïõñá íá ôåñìáôßóåôå ôç äéáäéêáóßá;\n";
+ Text[ korean ] = "´Ù¿î·Îµå°¡ ÁøÇà ÁßÀÔ´Ï´Ù.\n±×·¡µµ ÁßÁöÇϽðڽÀ´Ï±î?\n";
+ Text[ turkish ] = "Bekleme sýrasýnda veri indirme iþleri var.\nGerçekten çý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.\n¿Desea copiarlo de todas maneras?" ;
+ Text [ french ] = "Ce fichier existe déjà sur votre disque dur.\nSouhaitez-vous tout de même la copier?" ;
+ Text [ dutch ] = "Het bestand bevindt zich reeds op uw computer.\nWilt u het toch kopiëren?" ;
+ 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­ÓÀɮפw¸gÀx¦s¦bºÏºÐ¤W¡C\nÁÙ¬O­n½Æ»s¥¦¡H";
+ Text[ arabic ] = "åÐÇ ÇáãáÝ ãæÌæÏ ÈÇáÝÚá Ýí ßãÈíæÊÑß.\nåá ÊÑíÏ äÓÎå Úáì ÇáÑÛã ãä Ðáß¿";
+ Text[ greek ] = "Ôï áñ÷åßï õðÜñ÷åé Þäç ôïðéêÜ óôïí õðïëïãéóôÞ óáò.\nÈÝëåôå íá ôçí áíôéãñÜøåôå ðáñ' üëá áõôÜ;";
+ Text[ korean ] = "ÆÄÀÏÀÌ ÀÌ¹Ì Á¸ÀçÇÕ´Ï´Ù.\n±×·¡µµ º¹»çÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Dosya bilgisayarýnýzda zaten mevcut.\nYine de kopyalansýn mý?";
+};
+String ERR_FILENAMECHECK83
+{
+ Text = "Der eingegebene Dateiname ist ungültig.\nBitte beachten sie, dass der Dateiname maximal 8 Zeichen\nund die Dateierweiterung maximal 3 Zeichen lang sein dürfen." ;
+ Text [ english ] = "Der eingegebene Dateiname ist ungültig.\nBitte beachten sie, daß der Dateiname maximal 8 Zeichen\n und die Dateierweiterung maximal 3 Zeichen lang sein dürfen." ;
+ 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 não é válido.\nO nome do ficheiro deverá ter no máximo 8 caracteres\n e a respectiva extensão o máximo de 3." ;
+ Text [ portuguese_brazilian ] = "Der eingegebene Dateiname ist ungültig.\nBitte beachten sie, daß der Dateiname maximal 8 Zeichen\n und die Dateierweiterung maximal 3 Zeichen lang sein dürfen." ;
+ Text [ swedish ] = "Det inmatade filnamnet är ogiltigt.\nVar vänlig och se till att filnamnet innehåller maximalt 8 tecken\n och filnamnstillägget maximalt 3 tecken." ;
+ Text [ danish ] = "Det indtastede navn er ugyldigt.\nBemærk venligst at filnavnet højst må indeholde 8 tegn \nog filypenavnet højst 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 válido.\\Tenga en cuenta que el nombre debe tener un máximo de 8 caracteres\ny la terminación 3." ;
+ Text [ french ] = "Le nom de fichier indiqué est incorrect.\nIl peut comporter au maximum 8 caractères\net l'extension de fichier au maximum 3 caractères." ;
+ 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 nieprawid³owa.\nProszê uwzglêdniæ, ¿e nazwa pliku mo¿e zawieraæ maksym. 8 znaków\n,a rozszerzenie pliku maksym. 3 znaki.";
+ Text[ japanese ] = "Žw’肵‚½Ì§²Ù–¼‚ª–³Œø‚Å‚·B\ņ²Ù–¼‚ÍÅ‚8•¶Žš‚Ü‚Å\ņ²ÙŠg’£Žq‚ÍÅ‚3•¶Žš‚Ü‚Å‚Å‚È‚­‚Ä‚Í‚¢‚¯‚È‚¢‚±‚Æ‚É’ˆÓ‚µ‚ĉº‚³‚¢B";
+ Text[ chinese_traditional ] = "¿é¤JªºÀɮצWµL®Ä¡C\n½Ð±z¯d·NÀɮצW¤£±o¶W¹L8­Ó¦r¤¸¡C\n°ÆÀɦW¤£±o¶W¹L 3 ­Ó¦r¤¸¡C";
+ Text[ arabic ] = "ÇÓã ÇáãáÝ ÇáãõÏÎá ÛíÑ ÕÇáÍ.\n ÇáÑÌÇÁ ãáÇÍÙÉ Ãä ÇÓã ÇáãáÝ íÌÈ ÃáÇ íÒíÏ Úä\nËãÇäíÉ ÍÑæÝ æÇãÊÏÇÏå Úä ËáÇËÉ.";
+ Text[ greek ] = "Ôï åðéëåãìÝíï üíïìá áñ÷åßïõ äåí åßíáé Ýãêõñï.\nÐáñáêáëþ ðñïóÝîôå üôé äåí åðéôñÝðåôáé ôï üíïìá ôïõ áñ÷åßïõ íá õðåñâáßíåé ôïõò 8 ÷áñáêôÞñåò\n êáé ç åðÝêôáóç íá ðåñéÝ÷åé ðÜíù áðü 3 ÷áñáêôÞñåò.";
+ Text[ korean ] = "ÁöÁ¤µÈ ÆÄÀÏ À̸§ÀÌ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù.\nÆÄÀÏÀÇ À̸§ÀÌ 8¹®ÀÚ¸¦ ÃÊ°úÇÒ ¼ö ¾ø´Ù´Â°Í°ú \n È®ÀåÀÚ°¡3¹®ÀÚ¸¦ ÃÊ°ú ÇÒ¼ö ¾ø´Ù´Â°ÍÀ» À¯ÀÇÇϽʽÿÀ.";
+ Text[ turkish ] = "Girilen dosya adý geçerli deðil.\nDosya adý en fazla 8 ve dosyan\\uzantýsý en fazla 3 karakter uzunluðunda olabilir.";
+};
+String ERR_INSUFFICIENTDISKSPACE
+{
+ Text = "Die Datei %1 wird größer als der zur Verfügung 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 größer als der zur Verfügung stehende Plattenplatz.\nWollen Sie fortfahren ?\n";
+ Text[ portuguese ] = "O ficheiro %1 excede o espaço disponível no disco.\nContinuar?\n";
+ Text[ danish ] = "Filen %1 overskrider den tilgængelige diskplads.\nVil du fortsætte alligevel?\n";
+ Text[ french ] = "La taille du fichier %1 dépasse l'espace libre sur votre disque dur.\nSouhaitez-vous poursuivre ?\n";
+ Text[ swedish ] = "Filen %1 blir större än det tillgängliga diskutrymmet.\nVill Du ändå fortsätta?\n";
+ Text[ dutch ] = "Bestand %1 wordt groter dan de beschikbare schuifruimte.\nWilt u doorgaan ?\n";
+ Text[ spanish ] = "El tamaño del archivo %1 excederá al del disponible en el disco.\n¿Desea continuar?\n";
+ Text[ chinese_simplified ] = "Îļþ %1 ËùÐè¿Õ¼ä´óÓÚÏÖÓеĿÉÓÿռ䡣\nÄúÒª¼ÌÐøÂð£¿\n";
+ Text[ russian ] = "Îáúåì ôàéëà %1 áîëüøå, ÷åì îáúåì äîñòóïíîãî íà äèñêå ìåñòà.\nÂñå ðàâíî ïðîäîëæàòü?\n";
+ Text[ polish ] = "Plik %1 przewy¿sza iloœæ miejsca na dysku.\nKontynuowaæ ?\n";
+ Text[ japanese ] = "̧²Ù %1‚Í‹ó‚«ÃÞ½¸—e—ʗ̈æ‚ð‰z‚¦‚Ä‚¢‚Ü‚·¡\n‘±s‚µ‚Ü‚·‚©?\n";
+ Text[ chinese_traditional ] = "ÀÉ®× %1 ©Ò»ÝªÅ¶¡¤j©ó²{¦sªº¥i¥ÎªÅ¶¡¡C\n­nÄ~Äò¡S\n";
+ Text[ arabic ] = "ÓæÝ íÕÈÍ ÇáãáÝ %1 ÃßÈÑ ãä ÇáãÓÇÍÉ ÇáãÊÇÍÉ Úáì ÇáÞÑÕ.\nåá ÊÑíÏ ÇáãÊÇÈÚÉ¿\n";
+ Text[ greek ] = "Ôï áñ÷åßï %1 õðåñâáßíåé ôïí äéáèÝóéìï ÷þñï áðïèÞêåõóçò.\nÈÝëåôå íá óõíå÷ßóåôå;\n";
+ Text[ korean ] = "ÆÄÀÏ %1°¡ °¡´ÉÇÑ µð½ºÅ©ÀÇ °ø°£À» ÃÊ°úÇß½À´Ï´Ù.\n±×·¡µµ °è¼ÓÇϽðڽÀ´Ï±î?\n";
+ Text[ turkish ] = "%1 dosyasý mevcut disk alanýný aþýyor.\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 ] = "Källa" ;
+ Text [ danish ] = "Kilde" ;
+ Text [ portuguese ] = "Fonte" ;
+ Text [ portuguese_brazilian ] = "Quelle" ;
+ Text [ chinese_simplified ] = "Ô´";
+ Text [ russian ] = "Èñòî÷íèê";
+ Text [ polish ] = "ród³o";
+ 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 ] = "Mål" ;
+ Text [ danish ] = "Mål" ;
+ 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 ] = "Pozosta³y czas";
+ Text [ japanese ] = "Žc‚莞ŠÔ";
+ Text [ chinese_traditional ] = "³Ñ¾l®É¶¡";
+ Text [ arabic ] = "ÇáæÞÊ ÇáãÊÈÞí";
+ Text[ greek ] = "×ñüíïò ðïõ áðïìÝíåé";
+ Text[ korean ] = "³²Àº ½Ã°£";
+ Text[ turkish ] = "Kalan süre";
+};
+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 0000000000..677dd3738e
--- /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 0000000000..0644666681
--- /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 wäre 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 0000000000..453b62e85c
--- /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. Möchten 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. Möchten Sie StarOffice jetzt in den Offline Modus umschalten?" ;
+ Text [ swedish ] = "Denna prenumeration skall enligt inställningarna läsas i offlineläget.\n\nMen StarOffice är i onlineläge. Vill Du växla till offlineläget nu?" ;
+ Text [ danish ] = "Dette abonnement skal ifølge indstillingerne læses 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 suscripción se debe poder leer en modo desconectado (Offline).\n\nStarOffice se encuentra sin embargo en modo en línea. ¿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 déconnecter 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 subscrição 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 ] = "Wed³ug ustawieñ ta subskrypcja ma zostaæ odczytana w trybie offline.\n\n StarOffice znajduje siê w trybie online. Czy prze³¹czyæ na tryb offline?";
+ Text[ japanese ] = "‚±‚Ìw“ǂ͵Ì×²Ý Ó°ÄÞ‚Å‚ÌÝ’è‚É]‚Á‚Ä“Ç‚ÝŽæ‚ç‚ê‚Ü‚·B\n\nStarOffice‚Í Œ»ÝµÝ×²Ý Ó°ÄÞ‚É‚È‚Á‚Ä‚¢‚Ü‚·BStarOffice‚ð¡ µÌ×²Ý Ó°ÄÞ‚É؂芷‚¦‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "«ö·Ó³]©w¨Ï¥ÎªÌ¨Ï¥Î³s½u¾\\Ū¼Ò¦¡¡C\n\nStarOffice ²{¦b³B©ó½u¤Wª¬ºA¡C±z­nÅý StarOffice Âà¨ì³s½u¼Ò¦¡¡H";
+ Text[ arabic ] = "íÌÈ Ãä íÞÑà åÐÇ ÇáÇÔÊÑÇß¡ ÍÓÈ ÇáÅÚÏÇÏÇÊ¡ Ýí æÖÚ ÇáÇäÝÕÇá.\n\nStarOfficeÍÇáíÇð Ýí æÖÚ ÇáÇÊÕÇá. åá ÊÑíÏ ÊÛííÑ StarOffice ÇáÂä Åáì æÖÚ ÇáÇäÝÕÇá¿";
+ Text[ greek ] = "¸÷åé ïñéóôåß ç áíÜãíùóç áõôÞò ôçò óõíäñïìÞò íá ãßíåôáé óå êáôÜóôáóç åêôüò óýíäåóçò.\n\nÔï StarOffice âñßóêåôáé üìùò óå êáôÜóôáóç áð' åõèåßáò óýíäåóçò. ÈÝëåôå íá ãßíåé ç áëëáãÞ óå êáôÜóôáóç ÷ùñßò óýíäåóç ôþñá;";
+ Text[ korean ] = "¾Ë¸²½ÅûÀº ¿ÀÇÁ¶óÀÎ ¸ðµå¿¡¼­¸¸ Àб⠼³Á¤ÀÌ µË´Ï´Ù.\n\nStarOffice ÇöÀç ¿Â¶óÀθðµåÀÔ´Ï´Ù.Áö±Ý ¿ÀÇÁ¶óÀÎ ¸ðµå·Î ÀüȯÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Bu üyelik, çevrimdýþý kipte okunmak üzere ayarlanmýþtýr.\n\nStarOffice þu an çevrimiçi kipinde. StarOffice, çevrimdýþý kipe geçsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILTER_EXTERNAL
+{
+ Text = "Andere Anwendung" ;
+ Text [ english ] = "Other application" ;
+ Text [ english_us ] = "Other application" ;
+ Text [ portuguese ] = "Outra aplicação" ;
+ Text [ portuguese_brazilian ] = "Andere Anwendung" ;
+ Text [ swedish ] = "Annan tillämpning" ;
+ Text [ danish ] = "Anden applikation" ;
+ Text [ italian ] = "Altra applicazione" ;
+ Text [ spanish ] = "Otra aplicación" ;
+ 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 ] = "Diðer 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 ] = "Sk³adnik 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 bileþeni";
+};
+
+String STR_FILTER_NOT_INSTALLED
+{
+ Text = "Der ausgewählte Filter $(FILTER) ist nicht installiert.\nMöchten 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) não está instalado.\nInstalar agora?";
+ Text[ russian ] = "Âûáðàííûé ôèëüòð $(FILTER) íå èíñòàëëèðîâàí.\nÂû õîòèòå ñåé÷àñ ýòî ñäåëàòü ?";
+ Text[ dutch ] = "De gekozen filter $(FILTER) is niet geïnstalleerd.\nWilt u dat nu doen ?";
+ Text[ french ] = "Le filtre $(FILTER) que vous avez sélectionné n'est pas installé\nSouhaitez-vous l'installer ?";
+ Text[ spanish ] = "El filtro seleccionado $(FILTER) no ha sido instalado.\n¿Desea 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 göra 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¿ï¾Üªº¹LÂo¾¹ $(FILTER)ÁÙ¨S¦³¦w¸Ë¦n¡C\n²{¦b­n¦w¸Ë¡H";
+ Text[ arabic ] = "ÇáÝáÊÑ $(FILTER)¡ ÇáÐí Êã ÇÎÊíÇÑå¡ ÛíÑ ãËÈÊ.\nåá ÊÑíÏ ÅÌÑÇÁ ÇáÊËÈíÊ ÇáÂä¿";
+ Text[ greek ] = "Ôï åðéëåãìÝíï ößëôñï $(FILTER) äåí Ý÷åé åãêáôáóôáèåß.\nÈÝëåôå íá åãêáôáóôáèåß ôþñá;";
+ Text[ korean ] = "¼±ÅÃµÈ ÇÊÅÍ $(FILTER)´Â ¼³Ä¡µÇ¾î ÀÕÁö ¾Ê½À´Ï´Ù.\nÁö±Ý ¼³Ä¡ ÇϽðڽÀ´Ï±î ?";
+ Text[ turkish ] = "Seçilen $(FILTER) filtresi kurulu deðil.\nÞimdi kurmak ister misiniz ?";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_FILTER_CONSULT_SERVICE
+{
+ Text = "Der ausgewählte Filter $(FILTER) ist in Ihrer Edition nicht enthalten.\nInformationen zu Bestellmöglichkeiten 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) não está incluído na sua versão.\nEncontrará as informações necessárias para uma possível encomenda na nossa página 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 sélectionné n'est pas inclus dans votre version.\nVous trouverez les renseignements nécessaires à une éventuelle commande sur notre page d'accueil.";
+ Text[ spanish ] = "El filtro seleccionado $(FILTER) no está incluido en su edición.\nEn nuestra página 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 beställningsmöjligheter på vår hemsida.";
+ Text[ polish ] = "Wybrany filtr $(FILTER) nie jest zawarty w twoim edytorze. \nInformacje dotycz¹ce zamówienia 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)‚ÍÕ°»Þ°‚ÌŽg—p”Å‚ÉŠÜ‚Ü‚ê‚Ä‚Ü‚¹‚ñB\n’•¶‰Â”\\‚Èî•ñ‚͂킪ŽÐ‚ÌΰÑÍß°¼‚ÅŽè‚É“ü‚ê‚ç‚ê‚Ü‚·B";
+ Text[ chinese_simplified ] = "Õâ¸ö°æ±¾»¹Ã»ÓÐÌṩÄúËùÑ¡ÔñµÄ¹ýÂËÆ÷ $(FILTER)¡£\nÄú²ÎÔÄÎÒÃǹ«Ë¾µÄÍøÒ³Ìṩ¶¨¹ºÈí¼þµÄÐÅÏ¢¡£";
+ Text[ chinese_traditional ] = "³o­Óª©¥»ÁÙ¨S¦³´£¨Ñ±z©Ò¿ï¾Üªº¹LÂo¾¹ $(FILTER)¡C\n½Ð°Ñ¾\\§Ú­Ìªººô­¶´£¨Ñªº©wÁʳnÅ骺¸ê°T¡C";
+ Text[ arabic ] = "áÇ ÊÍÊæí äÓÎÊß Úáì ÇáÝáÊÑ $(FILTER)¡ ÇáÐí Êã ÇÎÊíÇÑå.\níãßäß ÇáÍÕæá Úáì ãÚáæãÇÊ Úä ÅãßÇäíÉ ØáÈ ÇáÝáÊÑ Ýí ãæÞÚäÇ Úáì ÇáÅäÊÑäÊ.";
+ Text[ greek ] = "Ôï åðéëåãìÝíï ößëôñï $(FILTER) äåí ðåñéÝ÷åôáé óôçí ÝêäïóÞ óáò.\nÐëçñïöïñßåò ãéá äõíáôüôçôåò ðáñáããåëßáò èá âñåßôå óôçí êåíôñéêÞ ìáò óåëßäá.";
+ Text[ korean ] = "¼±ÅÃÇÑ ÇÊÅÍ$(FILTER)´Â ÀÌ ¹öÀü¿¡ µé¾î ÀÖÁö ¾Ê½À´Ï´Ù.\nÁÖ¹® ½Åû °¡´É¼º¿¡ ´ëÇÑ Á¤º¸¸¦ ¾òÀ¸·Á¸é ÀúÈñ ȨÆäÀÌÁö¸¦ º¸½Ê½Ã¿À.";
+ Text[ turkish ] = "Seçilen $(FILTER) filtresi sürümünüzde bulunmuyor.\nSipariþ etmek için 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 0000000000..f4a12705f6
--- /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 0000000000..24a66cfaa2
--- /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 0000000000..bf9ccca25f
--- /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 0000000000..e6fcee81c3
--- /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 0000000000..1b5b6dccf2
--- /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 0000000000..9bd98fe1fe
--- /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 0000000000..47d9b462bd
--- /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 0000000000..47777d019a
--- /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 0000000000..8df6cefa9a
--- /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 0000000000..b118288a44
--- /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 0000000000..a8dad31f2e
--- /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 0000000000..92789dd273
--- /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 ] = "Diðer";
+ 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 événement" ;
+ Text [ dutch ] = "Gebeurtenis toewijzen" ;
+ Text [ swedish ] = "Händelsetilldelning" ;
+ Text [ danish ] = "Tildel begivenheder" ;
+ Text [ portuguese ] = "Atribuir eventos" ;
+ Text [ portuguese_brazilian ] = "Ereigniszuordnung" ;
+ Text[ chinese_simplified ] = "Ö¸¶¨Ê¼þ";
+ Text[ russian ] = "Óïîðÿäî÷åíèå ñîáûòèÿ";
+ Text[ polish ] = "Przyporz¹dkowanie wydarzeñ";
+ Text[ japanese ] = "ŽÀsŒ_‹@‚Ì”z’u";
+ 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 ] = "Configuración" ;
+ Text [ french ] = "Configuration" ;
+ Text [ dutch ] = "Configuratie" ;
+ Text [ swedish ] = "Konfiguration" ;
+ Text [ danish ] = "Konfiguration" ;
+ Text [ portuguese ] = "Configuração" ;
+ Text [ portuguese_brazilian ] = "Konfiguration" ;
+ Text[ chinese_simplified ] = "ÅäÖÃ";
+ Text[ russian ] = "Êîíôèãóðàöèÿ";
+ Text[ polish ] = "Konfiguracja";
+ Text[ japanese ] = "Ý’è";
+ Text[ chinese_traditional ] = "°t¸m";
+ Text[ arabic ] = "Êßæíä";
+ Text[ dutch ] = "Configuratie";
+ Text[ chinese_simplified ] = "ÅäÖÃ";
+ Text[ greek ] = "ÐáñÜìåôñïé";
+ Text[ korean ] = "±¸¼º";
+ Text[ turkish ] = "Konfigürasyon";
+ Text[ language_user1 ] = " ";
+};
+ModalDialog DLG_MACROQUERY
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Moveable = TRUE ;
+ Size = MAP_APPFONT ( 163 , 94 ) ;
+ Text = "Makro ausführen" ;
+ Text [ english ] = "Execute Macro" ;
+ Text [ english_us ] = "Execute Macro" ;
+ Text [ french ] = "Exécuter la macro" ;
+ TEXT[ italian ] = "Esegui macro";
+ TEXT[ portuguese_brazilian ] = "Makro ausführen";
+ TEXT[ portuguese ] = "Executar macro";
+ TEXT[ danish ] = "Udfør makro";
+ TEXT[ swedish ] = "Utför 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 ausgelöst, auf das ein Makro konfiguriert wurde. Möchten Sie dieses Makro ausführen?" ;
+ Text [ English ] = "Es wurde ein Ereignis ausgelöst, auf das ein Makro konfiguriert wurde. Möchten Sie dieses Makro ausführen?" ;
+ 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 ausgelöst, auf das ein Makro konfiguriert wurde. Möchten Sie dieses Makro ausführen?" ;
+ Text [ swedish ] = "En händelse utlöstes för vilket ett makro konfigurerades. Skall detta makro utföras?" ;
+ Text [ danish ] = "Der blev udløst en handling, som en makro er konfigureret til. Vil du udføre 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 événement s'est produit pour lequel une macro a été configurée. Désirez-vous l'exécuter?" ;
+ 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 ] = "Zosta³o uruchomione wydarzenie, do którego zosta³o skonfigurowane makro. Czy chcesz wykonaæ to makro?";
+ Text[ japanese ] = "ϸۂÅݒ肵‚½ŽÀsŒ_‹@‚ªŠJŽn‚³‚ê‚Ü‚µ‚½B‚±‚ÌϸۂðŽÀs‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "¾Þ§@«ü¥Oª½±µ¨Ó¦Û¤@­Ó¥¨¶°¡M±z­n°õ¦æ³o­Ó¥¨¶°¡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 ] = "Baþlatýlan olay ile ilgili bir yapýlandýrýlmýþ bir makro mevcut. Bu makroyu çalýþtýrmak istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_WARNING
+ {
+ Pos = MAP_APPFONT ( 6 , 58 ) ;
+ Size = MAP_APPFONT ( 151 , 10 ) ;
+ Text = " Für dieses Dokument nicht mehr warnen" ;
+ Text [ ENGLISH ] = " Für dieses Dokument nicht mehr warnen" ;
+ Text [ portuguese ] = "Não avisar mais para este documento" ;
+ Text [ english_us ] = "Do not warn again for this document" ;
+ Text [ portuguese_brazilian ] = "Für dieses Dokument nicht mehr warnen" ;
+ Text [ swedish ] = "Varna inte mer för det här 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 wiêcej ostrze¿enia dla tego dokumentu";
+ Text[ japanese ] = "‚±‚ÌÄÞ·­ÒÝÄ‚Ì‚½‚ß‚É‚à‚¤Œx‚Í‚µ‚È‚¢‚ʼnº‚³‚¢";
+ Text[ chinese_traditional ] = "¤£­n¦A¦¸¬°³o­Ó¤å¥ó´£¥Xĵ§i";
+ Text[ arabic ] = "ÚÏã ÇáÊÍÐíÑ ãÑÉ ÃÎÑì ÈÇáäÓÈÉ áåÐÇ ÇáãÓÊäÏ";
+ Text[ dutch ] = "Voor dit document niet meer waarschuwen";
+ Text[ chinese_simplified ] = "²»ÒªÔÙ´ÎΪÕâ¸öÎĵµÌá³ö¾¯¸æ";
+ Text[ greek ] = "¼÷é Üëëç ðñïåéäïðïßçóç ãéá áõôü ôï Ýããñáöï";
+ Text[ korean ] = "ÀÌ ¹®¼­¿¡´Â ´õ ÀÌ»ó °æ°í ¾ÈÇÔ";
+ Text[ turkish ] = "Bu belge için bir daha uyarý görüntüleme";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 44 , 74 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Ausführen" ;
+ Text [ ENGLISH ] = "Execute" ;
+ Text [ portuguese ] = "Executar" ;
+ Text [ english_us ] = "Execute" ;
+ Text [ portuguese_brazilian ] = "Ausführen" ;
+ Text [ swedish ] = "Utför" ;
+ Text [ danish ] = "Udfør" ;
+ Text [ italian ] = "Esegui" ;
+ Text [ spanish ] = "Ejecutar" ;
+ Text [ french ] = "Exécuter" ;
+ 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 ] = "Çalýþtýr";
+ Text[ language_user1 ] = " ";
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 97 , 74 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text = "Nicht Ausführen" ;
+ Text [ ENGLISH ] = "Don't execute" ;
+ Text [ english_us ] = "Don't execute" ;
+ Text [ portuguese_brazilian ] = "Nicht Ausführen" ;
+ Text [ swedish ] = "Utför inte" ;
+ Text [ danish ] = "Udfør ikke" ;
+ Text [ italian ] = "Non eseguire" ;
+ Text [ spanish ] = "No ejecutar" ;
+ Text [ french ] = "Ne pas lancer" ;
+ Text [ dutch ] = "Niet uitvoeren" ;
+ Text [ portuguese ] = "Não 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 ] = "Çalýþtýrma";
+ Text[ language_user1 ] = " ";
+ };
+ TEXT[ dutch ] = "Macro uitvoeren";
+ TEXT[ chinese_simplified ] = "Ö´Ðкê";
+ TEXT[ greek ] = "ÅêôÝëåóç ìáêñïåíôïëþí";
+ TEXT[ korean ] = "¸ÅÅ©·Î ½ÇÇà";
+ TEXT[ turkish ] = "Makroyu çalýþtýr";
+ TEXT[ language_user1 ] = " ";
+};
+
+
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
new file mode 100644
index 0000000000..3108ad886b
--- /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 0000000000..acc016f966
--- /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 0000000000..216779d75a
--- /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 0000000000..dfdbef20c4
--- /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 0000000000..de710e048e
--- /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 unterstützt!
+// 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 0000000000..a37c6204b1
--- /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 0000000000..01f683d082
--- /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 0000000000..53723b82ce
--- /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 0000000000..cbb2374f68
--- /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 0000000000..028f05b17a
--- /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 0000000000..cd33e183aa
--- /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 0000000000..d9c9330d76
--- /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 0000000000..28c6715030
--- /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 0000000000..d6c1813f23
--- /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 0000000000..92c522cf59
--- /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 0000000000..1031f8a116
--- /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 0000000000..f022260836
--- /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 0000000000..78d24f324f
--- /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 0000000000..c6161d06ac
--- /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 0000000000..7add482669
--- /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 0000000000..2a1fcf926a
--- /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 0000000000..13d9dfb3d8
--- /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 0000000000..4e27dffd3a
--- /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 ] = "Àx¦s(~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 ] = "~Återställ" ; \
+ Text [ danish ] = "Nulstil" ; \
+ Text [ portuguese_brazilian ] = "~Zurücksetzen" ; \
+ 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 ] = "Baþa 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 ] = "Indlæs..." ; \
+ 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 ] = "Yükle..."; \
+ Text[ language_user1 ] = " ";
+
+#define PUSHBUTTON_TEXT_REMOVE \
+/* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */\
+ Text = "~Löschen" ; \
+ 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 ] = "Deðiþtir"; \
+ 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 ] = "V‹Kì¬(~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 ] = "Område" ; \
+ Text [ french ] = "~Catégorie" ; \
+ 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 ] = "~Função" ; \
+ Text [ portuguese ] = "~Função" ; \
+ Text [ finnish ] = "~Funktio" ; \
+ Text [ danish ] = "Funktion" ; \
+ Text [ french ] = "~Fonction" ; \
+ Text [ swedish ] = "~Funktion" ; \
+ Text [ dutch ] = "~Functie" ; \
+ Text [ spanish ] = "~Función" ; \
+ 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 ] = "Funções" ; \
+ Text [ portuguese ] = "Funções" ; \
+ 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 ] = "V‹Kì¬(~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 mönü";
+ 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 ] = "Deðiþtir";
+ 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? ~Löschen : ~L÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ 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 ] = "~Zurücksetzen" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~ücksetzen : ~Zurücksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~ücksetzen : Zur~³cksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~ücksetzen : Zur~³cksetzen */
+ Text = "Zur~ücksetzen" ;
+ Text [ swedish ] = "~Återställ" ;
+ 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 ] = "Baþa 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 ] = "Indlæs..." ;
+ 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 ] = "Yükle...";
+ 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 ] = "Àx¦s(~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 ] = "Mönü";
+ 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 ] = "Område" ;
+ Text [ italian ] = "Area" ;
+ Text [ spanish ] = "~Área" ;
+ Text [ french ] = "~Catégorie" ;
+ 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 ] = "~Função" ;
+ Text [ english_us ] = "~Function" ;
+ Text [ portuguese_brazilian ] = "~Função" ;
+ Text = "~Funktion" ;
+ Text [ swedish ] = "~Funktion" ;
+ Text [ danish ] = "Funktion" ;
+ Text [ italian ] = "~Funzione" ;
+ Text [ spanish ] = "~Función" ;
+ 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 ] = "Funções" ;
+ Text [ english_us ] = "Functions" ;
+ Text [ portuguese_brazilian ] = "Funções" ;
+ 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 ] = "Deðiþtir";
+ 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? ~Löschen : ~L÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ 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 ] = "Näppäimistö" ;
+ 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 ] = "Område" ;
+ Text [ italian ] = "Area" ;
+ Text [ spanish ] = "~Área" ;
+ Text [ french ] = "~Catégorie" ;
+ 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 ] = "~Função" ;
+ Text [ english_us ] = "~Function" ;
+ Text [ portuguese_brazilian ] = "~Função" ;
+ Text = "~Funktion" ;
+ Text [ swedish ] = "~Funktion" ;
+ Text [ danish ] = "Funktion" ;
+ Text [ italian ] = "~Funzione" ;
+ Text [ spanish ] = "~Función" ;
+ 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 ] = "~Näppäimet" ;
+ 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~uþlar";
+ 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 ] = "Funções" ;
+ Text = "Funktionen" ;
+ Text [ swedish ] = "Funktioner" ;
+ Text [ danish ] = "Funktioner" ;
+ Text [ italian ] = "Funzioni" ;
+ Text [ spanish ] = "Funciones" ;
+ Text [ french ] = "Ensemble de fonctions" ;
+ Text [ dutch ] = "Functies" ;
+ Text [ portuguese ] = "Funções" ;
+ 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 ] = "~Zurücksetzen" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~ücksetzen : ~Zurücksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~ücksetzen : Zur~³cksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~ücksetzen : Zur~³cksetzen */
+ Text = "Zur~ücksetzen" ;
+ Text [ swedish ] = "~Återställ" ;
+ 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 ] = "Baþa 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 ] = "Indlæs..." ;
+ 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 ] = "Yükle...";
+ 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 ] = "Àx¦s(~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 ] = "ª¬ºA¦C ";
+ Text[ arabic ] = "ÔÑíØ ÇáãÚáæãÇÊ ";
+ Text[ greek ] = "ÃñáììÞ êáôÜóôáóçò ";
+ Text[ korean ] = "»óÅ ¸ðÀ½ ";
+ Text[ turkish ] = "Durum çubuðu ";
+ 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 ] = "~Zurücksetzen" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~ücksetzen : ~Zurücksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~ücksetzen : Zur~³cksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~ücksetzen : Zur~³cksetzen */
+ Text = "Zur~ücksetzen" ;
+ Text [ swedish ] = "~Återställ" ;
+ 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 ] = "Baþa 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 ] = "Indlæs..." ;
+ 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 ] = "Yükle...";
+ 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 ] = "Àx¦s(~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 ] = "Configuração" ;
+ Text [ portuguese ] = "Configuração" ;
+ 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 ] = "Mönü";
+ 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 ] = "Näppäimistö" ;
+ 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 ] = "ª¬ºA¦C";
+ Text[ arabic ] = "ÔÑíØ ÇáãÚáæãÇÊ";
+ Text[ greek ] = "ÃñáììÞ êáôÜóôáóçò";
+ Text[ korean ] = "»óŸðÀ½";
+ Text[ turkish ] = "Durum çubuðu";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = TP_CONFIG_OBJECTBAR ;
+ Text = "Symbolleisten" ;
+ Text [ ENGLISH ] = "Toolbox Options" ;
+ Text [ norwegian ] = "Verktøyalternativer" ;
+ Text [ italian ] = "Barre dei simboli" ;
+ Text [ portuguese_brazilian ] = "Opções do Quadro de Ferramentas" ;
+ Text [ portuguese ] = "Barras de ferramentas" ;
+ Text [ finnish ] = "Työkalurivin määritykset" ;
+ Text [ danish ] = "Ikonlinjer" ;
+ Text [ french ] = "Barres d'outils" ;
+ Text [ swedish ] = "Symbollister" ;
+ Text [ dutch ] = "Werkbalken" ;
+ Text [ spanish ] = "Barras de símbolos" ;
+ 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 ] = "Événements" ;
+ Text [ swedish ] = "Händelser" ;
+ 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 ] = "°t¸m";
+ Text[ arabic ] = "ÊÎÕíÕ";
+ Text[ greek ] = "ÐñïóáñìïãÞ";
+ Text[ korean ] = "±¸¼º";
+ Text[ turkish ] = "Özelleþtir";
+ 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 ] = "V‹Kì¬";
+ 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 ] = "Otwórz";
+ 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 ] = "Àx¦s";
+ 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 ] = "–¼‘O‚ð•t‚¯‚Ä•Û‘¶";
+ Text[ chinese_traditional ] = "¥t¦s·sÀÉ";
+ 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 ] = "¦C¦L";
+ Text[ arabic ] = "ØÈÇÚÉ";
+ Text[ greek ] = "Åêôýðùóç";
+ Text[ korean ] = "Àμâ";
+ Text[ turkish ] = "Yazdýr";
+ 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 ] = "Zakoñcz";
+ 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 ] = "Kopiëren" ;
+ 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? Einfügen : Einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */
+ Text = "Einfügen" ;
+ Text [ ENGLISH ] = "Paste" ;
+ Text [ norwegian ] = "Paste" ;
+ Text [ italian ] = "Incolla" ;
+ Text [ portuguese_brazilian ] = "Colar" ;
+ Text [ portuguese ] = "Colar" ;
+ Text [ finnish ] = "Liitä" ;
+ Text [ danish ] = "Indsæt" ;
+ 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 ] = "Yapýþtýr";
+ Text[ language_user1 ] = " ";
+};
+String STR_DELETE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Löschen : L÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Löschen : L÷schen */
+ Text = "Löschen" ;
+ 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 ] = "Søke" ;
+ Text [ italian ] = "Cerca" ;
+ Text [ portuguese_brazilian ] = "Procurar" ;
+ Text [ portuguese ] = "Localizar" ;
+ Text [ finnish ] = "Etsi" ;
+ Text [ danish ] = "Søg" ;
+ Text [ french ] = "Rechercher" ;
+ Text [ swedish ] = "Sök" ;
+ 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? Rückwärts suchen : R³ckwõrts suchen */
+ /* ### ACHTUNG: Neuer Text in Resource? Rückwärts suchen : R³ckwõrts suchen */
+ Text = "Rückwärts suchen" ;
+ Text [ ENGLISH ] = "Find backward" ;
+ Text [ norwegian ] = "Søk bakover" ;
+ Text [ italian ] = "Cerca all'indietro" ;
+ Text [ portuguese_brazilian ] = "Procurar Para Trás" ;
+ Text [ portuguese ] = "Localizar para trás" ;
+ Text [ finnish ] = "Etsi taaksepäin" ;
+ Text [ danish ] = "Søg baglæns" ;
+ Text [ french ] = "Recherche vers le haut" ;
+ Text [ swedish ] = "Sök bakåt" ;
+ Text [ dutch ] = "Achterwaarts zoeken" ;
+ Text [ spanish ] = "Buscar hacia atrás" ;
+ Text [ english_us ] = "Search backward" ;
+ Text[ chinese_simplified ] = "ÏòºóËÑÑ°";
+ Text[ russian ] = "Èñêàòü â îáðàòíîì ïîðÿäêå";
+ Text[ polish ] = "Szukaj wstecz";
+ Text[ japanese ] = "ŒŸõ –ß‚é";
+ Text[ chinese_traditional ] = "¦V«á´M§ä";
+ Text[ arabic ] = "ÇáÈÍË Åáì ÇáÎáÝ";
+ Text[ greek ] = "ÁíáæÞôçóç ðßóù";
+ Text[ korean ] = "µÚ·Î ã±â";
+ Text[ turkish ] = "Geriye doðru 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 ] = "Propriétés" ;
+ Text [ swedish ] = "Egenskaper" ;
+ Text [ dutch ] = "Eigenschappen" ;
+ Text [ spanish ] = "Propiedades" ;
+ Text [ english_us ] = "Properties" ;
+ Text[ chinese_simplified ] = "ÊôÐÔ";
+ Text[ russian ] = "Ñâîéñòâà";
+ Text[ polish ] = "W³aœciwoœci";
+ 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 ] = "Framåt" ;
+ 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 ] = "¦V«e";
+ 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 Funções indefinidas (???).\n\nContinuar de qualquer forma?" ;
+ Message [ portuguese ] = "Ainda existem funções indefinidas (???).\n\nDeseja continuar?" ;
+ Message [ finnish ] = "Määrittämättömiä toimintoja on vieläkin (???).\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é définies (???).\n\nPoursuivre malgré tout ?" ;
+ Message [ swedish ] = "Det finns fortfarande odefinierade funktioner (???). \n\nVill Du ändå överta den här konfigurationen?" ;
+ Message [ dutch ] = "Er zijn nog ongedefinieerde functies (???).\n\nWilt u deze configuratie toch overnemen?" ;
+ Message [ spanish ] = "Todavía hay funciones no definidas (???).\n\n¿Desea de todas formas aceptar esta configuración?" ;
+ 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 ] = "ÁÙ¦s¦b¥¼©w¸qªº¥\\¯à¡C\n\nÁÙ¬O­n±µ¨ü³o­Ó°t¸m¡H";
+ Message[ arabic ] = "ãÇÒÇáÊ åäÇáß ãåÇã ÛíÑ ãÚÑÝÉ (???).\n\nåá ÊÑíÏ ÞÈæá åÐÇ ÇáÊßæíä Úáì ÇáÑÛã ãä Ðáß¿";
+ Message[ greek ] = "ÕðÜñ÷ïõí áêüìç ëåéôïõñãßåò ðïõ äåí Ý÷ïõí ïñéóôåß (???).\n\nÈÝëåôå íá áðïäå÷ôåßôå ôç äéáìüñöùóç áõôÞ;";
+ Message[ korean ] = "Á¤ÀǵÇÁö ¾ÊÀº ±â´ÉµéÀÌ ¾ÆÁ÷ ÀÖ½À´Ï´Ù. (???).\n\n±×·¡µµ ÀÌ ±¸¼ºÀ» Àû¿ëÇϽðڽÀ´Ï±î?";
+ Message[ turkish ] = "Hala tanýmlanmamýþ iþlevler mevcut (???).\n\nBu konfigürasyonu 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 Einträge mit Funktionen, die nur Popups zugewiesen werden können.\n\nWollen Sie diese Konfiguration trotzdem übernehmen? : Es existieren noch Eintrõge mit Funktionen, die nur Popups zugewiesen werden k÷nnen.\n\nWollen Sie diese Konfiguration trotzdem ³bernehmen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Es existieren noch Einträge mit Funktionen, die nur Popups zugewiesen werden können.\n\nWollen Sie diese Konfiguration trotzdem übernehmen? : Es existieren noch Eintrõge mit Funktionen, die nur Popups zugewiesen werden k÷nnen.\n\nWollen Sie diese Konfiguration trotzdem ³bernehmen? */
+ Message = "Es existieren noch Einträge mit Funktionen, die nur Popups zugewiesen werden können.\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 oppføringer 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 Funções que só podem ser atribuidas a popupps.\n\nContinuar de qualquer forma?" ;
+ Message [ portuguese ] = "Existem ainda entradas com funções que só podem ser atribuídas a janelas instantâneas.\n\nContinuar?" ;
+ Message [ finnish ] = "Luettelossa on vieläkin 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 entrées sont encore associées à des fonctions réservées à des menus déroulants\n\nPoursuivre malgré tout ?" ;
+ Message [ swedish ] = "Det finns fortfarande poster med funktioner som bara kan tilldelas popups.\n\nVill Du ändå överta den här 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 ] = "Todavía hay entradas con funciones que solo pueden ser asignadas a emergentes.\n\n¿Desea 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, które mog¹ zostaæ przypisane tylko oknom typu popup. n\nCzy chcesz mimo to zastosowaæ tê konfiguracjê?";
+ Message[ japanese ] = "‚Ü‚¾Î߯Ìß±¯Ìß‚Ì‚Ý‚ÉŠ„‚è“–‚Ä‚ç‚ê‚é‹@”\\‚Ì€–Ú‚ª‚ ‚è‚Ü‚·B\n\n‚±‚ÌÝ’è‚ð“K—p‚µ‚Ä‚à‚¢‚¢‚Å‚·‚©?";
+ Message[ chinese_traditional ] = "ÁÙ¦s¦b¤@¨Ç¥u¯à«ü©wµ¹§Ö³t¥\\¯àªí°õ¦æªº¨ã¦³¬YºØ¥\\¯àªº¶µ¥Ø¡C\n±zÁÙ¬O­n±µ¨ü³o­Ó°t¸m¡H";
+ Message[ arabic ] = "ãÇÒÇáÊ åäÇáß ÅÏÎÇáÇÊ ÈåÇ ãåÇã áÇ íãßä ÊÚííäåÇ ÅáÇ áÞæÇÆã ÇäÈËÇÞíÉ ÝÞØ.\n\nåá ÊÑíÏ ÞÈæá ÇáÊßæíä Úáì ÇáÑÛã ãä Ðáß¿";
+ Message[ greek ] = "ÕðÜñ÷ïõí áêüìç åããñáöÝò ìå ëåéôïõñãßåò ôùí ïðïßùí ìðïñåß íá ãßíåé ìüíï áíôéóôïß÷éóç ìå áíáäõüìåíá ðáñÜèõñá.\n\nÈÝëåôå íá áðïäå÷ôåßôå ôç äéáìüñöùóç áõôÞ;";
+ Message[ korean ] = "Æ˾÷¿¡¸¸ ÁöÁ¤µÉ ¼ö ÀÖ´Â ±â´ÉµéÀ» Áö´Ñ Ç׸ñµéÀÌ ¾ÆÁ÷ ÀÖ½À´Ï´Ù. \n\n±×·¡µµ ÀÌ ±¸¼ºÀ» Àû¿ëÇϽðڽÀ´Ï±î?";
+ Message[ turkish ] = "Yalnýzca açýlan mönülere atanabilen iþlevleri olan giriþler mevcut.\n\nBu konfigürasyon 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 função já está incluída neste popup." ;
+ Message [ portuguese ] = "A função já está incluída neste menu instantâneo." ;
+ Message [ finnish ] = "Toiminto on jo lisätty tähän kohovalikkoon." ;
+ Message [ danish ] = "Funktionen er allerede indeholdt i denne popup." ;
+ Message [ french ] = "Cette fonction est déjà incluse dans la liste Menu." ;
+ Message [ swedish ] = "Funktionen ingår redan i denna snabbmeny." ;
+ Message [ dutch ] = "Deze functie komt al voor in dit menu." ;
+ Message [ spanish ] = "La función 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 podrêcznym.";
+ Message[ japanese ] = "‹@”\\‚Í‚·‚Å‚É‚±‚ÌÎ߯Ìß±¯Ìß‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚·B";
+ Message[ chinese_traditional ] = "³o­Ó§Ö³t¥\\¯àªí¤w¸g¥]§t¤F³o­Ó¥\\¯à¡C";
+ Message[ arabic ] = "ÇáãåãÉ ãæÌæÏÉ ãÓÈÞÇð Ýí åÐå ÇáÞÇÆãÉ ÇáãäÈËÞÉ.";
+ Message[ greek ] = "Ç óõíÜñôçóç ðåñéÝ÷åôáé Þäç óå áõôü ôï áíáäõüìåíï êåßìåíï.";
+ Message[ korean ] = "±â´ÉÀÌ ÀÌ¹Ì ÀÌ Æ˾÷¿¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù.";
+ Message[ turkish ] = "Ýþlev zaten bu açýlan mönüde mevcut.";
+ Message[ language_user1 ] = " ";
+};
+String STR_LOADMENUCONFIG
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Menükonfiguration laden : Men³konfiguration laden */
+ /* ### ACHTUNG: Neuer Text in Resource? Menükonfiguration laden : Men³konfiguration laden */
+ Text = "Menükonfiguration laden" ;
+ Text [ ENGLISH ] = "Load Menu Configuration" ;
+ Text [ english_us ] = "Load Menu Configuration" ;
+ Text [ italian ] = "Carica configurazione menu" ;
+ Text [ spanish ] = "Cargar configuración del menú" ;
+ Text [ french ] = "Charger config. du menu" ;
+ Text [ dutch ] = "Menuconfiguratie laden" ;
+ Text [ swedish ] = "Ladda menykonfiguration" ;
+ Text [ danish ] = "Indlæs menukonfiguration" ;
+ Text [ portuguese_brazilian ] = "Menükonfiguration laden" ;
+ Text [ portuguese ] = "Carregar configuração do menu" ;
+ Text[ chinese_simplified ] = "×°Ôز˵¥ÃüÁîÅäÖÃ";
+ Text[ russian ] = "Çàãðóçèòü êîíôèãóðàöèþ ìåíþ";
+ Text[ polish ] = "£aduj konfiguracjê menu";
+ Text[ japanese ] = "ÒÆ­°Ý’è‚Ì“Ç‚Ýž‚Ý";
+ Text[ chinese_traditional ] = "¸Ë¸ü¥\\¯àªí°t¸m";
+ Text[ arabic ] = "ÊÍãíá Êßæíä ÇáÞÇÆãÉ";
+ Text[ greek ] = "Öüñôùóç äéáìüñöùóçò ìåíïý";
+ Text[ korean ] = "¸Þ´º ±¸¼º ·Îµå";
+ Text[ turkish ] = "Mönü konfigürasyonunu yükle";
+ Text[ language_user1 ] = " ";
+};
+String STR_SAVEMENUCONFIG
+{
+ Text = "Menükonfiguration speichern" ;
+ Text [ ENGLISH ] = "Save Menu Configuration" ;
+ Text [ english_us ] = "Save Menu Configuration" ;
+ Text [ italian ] = "Salva configurazione menu" ;
+ Text [ spanish ] = "Guardar configuración del menú" ;
+ Text [ french ] = "Enregistrer la configuration du menu" ;
+ Text [ dutch ] = "Menuconfiguratie opslaan" ;
+ Text [ swedish ] = "Spara menykonfiguration" ;
+ Text [ danish ] = "Gem menukonfiguration" ;
+ Text [ portuguese_brazilian ] = "Menükonfiguration speichern" ;
+ Text [ portuguese ] = "Guardar configuração do menu" ;
+ Text[ chinese_simplified ] = "´æÅ̲˵¥ÅäÖÃ";
+ Text[ russian ] = "Ñîõðàíèòü êîíôèãóðàöèþ ìåíþ";
+ Text[ polish ] = "Zapisz konfiguracjê menu";
+ Text[ japanese ] = "ÒÆ­°Ý’è‚Ìã‘‚«•Û‘¶";
+ Text[ chinese_traditional ] = "Àx¦sµæ³æ°t¸m";
+ Text[ arabic ] = "ÍÝÙ Êßæíä ÇáÞÇÆãÉ";
+ Text[ greek ] = "ÁðïèÞêåõóç äéáìüñöùóçò ìåíïý";
+ Text[ korean ] = "¸Þ´º±¸¼º ÀúÀå";
+ Text[ turkish ] = "Mönü konfigürasyonunu 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 configuración del teclado" ;
+ Text [ french ] = "Charger configuration du clavier" ;
+ Text [ swedish ] = "Ladda tangentbordskonfiguration" ;
+ Text [ danish ] = "Indlæs tastaturkonfiguration" ;
+ Text [ portuguese_brazilian ] = "Tastaturkonfiguration laden" ;
+ Text [ portuguese ] = "Carregar configuração do teclado" ;
+ Text[ chinese_simplified ] = "×°ÔؼüÅÌÅäÖÃ";
+ Text[ russian ] = "Çàãðóçèòü êîíôèãóðàöèþ êëàâèàòóðû";
+ Text[ polish ] = "£aduj konfiguracjê klawiatury";
+ Text[ japanese ] = "·°ÎÞ°ÄÞÝ’è‚Ì“Ç‚Ýž‚Ý";
+ Text[ chinese_traditional ] = "¸Ë¸üÁä½L°t¸m";
+ Text[ arabic ] = "ÊÍãíá Êßæíä áæÍÉ ÇáãÝÇÊíÍ";
+ Text[ greek ] = "Öüñôùóç äéáìüñöùóçò ðëçêôñïëïãßïõ";
+ Text[ korean ] = "Å°º¸µå ±¸¼º ·Îµå";
+ Text[ turkish ] = "Klavye konfigürasyonunu yükle";
+ 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 configuración 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 configuração do teclado" ;
+ Text[ chinese_simplified ] = "´æÅ̼üÅÌÅäÖÃ";
+ Text[ russian ] = "Ñîõðàíèòü êîíôèãóðàöèþ êëàâèàòóðû";
+ Text[ polish ] = "Zapisz konfiguracjê klawiatury";
+ Text[ japanese ] = "·°ÎÞ°ÄÞÝ’è‚Ìã‘‚«•Û‘¶";
+ Text[ chinese_traditional ] = "Àx¦sÁä½L°t¸m";
+ Text[ arabic ] = "ÍÝÙ Êßæíä áæÍÉ ÇáãÝÇÊíÍ";
+ Text[ greek ] = "ÁðïèÞêåõóç äéáìüñöùóçò ðëçêôñïëïãßïõ";
+ Text[ korean ] = "Å°º¸µå±¸¼º ÀúÀå";
+ Text[ turkish ] = "Klavye konfigürasyonunu 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 configuración de la barra de estado" ;
+ Text [ french ] = "Chargement de la configuration de la barre d'état" ;
+ Text [ swedish ] = "Ladda statuslistkonfiguration" ;
+ Text [ danish ] = "Indlæs statuslinjekonfiguration" ;
+ Text [ portuguese_brazilian ] = "Statusleistenkonfiguration laden" ;
+ Text [ portuguese ] = "Carregar configuração da barra de estado" ;
+ Text[ chinese_simplified ] = "×°ÔØ״̬À¸ÅäÖÃ";
+ Text[ russian ] = "Çàãðóçèòü êîíôèãóðàöèþ ñòðîêè ñîñòîÿíèÿ";
+ Text[ polish ] = "£aduj konfiguracjê paska stanu";
+ Text[ japanese ] = "½Ã°À½ ÊÞ°Ý’è‚Ì“Ç‚Ýž‚Ý";
+ Text[ chinese_traditional ] = "¸Ë¸üª¬ºA¦C°t¸m";
+ Text[ arabic ] = "ÊÍãíá Êßæíä ÔÑíØ ÇáãÚáæãÇÊ";
+ Text[ greek ] = "Öüñôùóç äéáìüñöùóçò ãñáììÞò êáôÜóôáóçò";
+ Text[ korean ] = "»óŸðÀ½ ±¸¼º ·Îµå";
+ Text[ turkish ] = "Durum çubuðu konfigürasyonunu yükle";
+ 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 configuración 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 configuração da barra de estado" ;
+ Text[ chinese_simplified ] = "´æÅÌ״̬À¸ÅäÖÃ";
+ Text[ russian ] = "Ñîõðàíèòü êîíôèãóðàöèþ ñòðîêè ñîñòîÿíèÿ";
+ Text[ polish ] = "Zapisz konfiguracjê paska stanu";
+ Text[ japanese ] = "½Ã°À½ ÊÞ°Ý’è‚Ìã‘‚«•Û‘¶";
+ Text[ chinese_traditional ] = "Àx¦sª¬ºAÄæ°t¸m";
+ Text[ arabic ] = "ÍÝÙ Êßæíä ÔÑíØ ÇáãÚáæãÇÊ";
+ Text[ greek ] = "ÁðïèÞêåõóç äéáìüñöùóçò ãñáììÞò êáôÜóôáóçò";
+ Text[ korean ] = "»óŸðÀ½ ±¸¼º ÀúÀå";
+ Text[ turkish ] = "Durum çubuðu konfigürasyonunu 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 ] = "Mönü";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
new file mode 100644
index 0000000000..d824075719
--- /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 0000000000..a81af3881d
--- /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 = "~Zurück" ;
+ 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 ] = "~Réinitialisation" ;
+ 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 Básico" ;
+ Text [ portuguese ] = "Formato ~básico" ;
+ 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 ] = "Lösenord" ;
+ Text [ dutch ] = "~Wachtwoord" ;
+ Text [ spanish ] = "~Contraseña" ;
+ Text [ english_us ] = "~Password" ;
+ Text[ chinese_simplified ] = "¿ÚÁî(~P)";
+ Text[ russian ] = "Ïàðîëü";
+ Text[ polish ] = "Has³o";
+ Text[ japanese ] = "Ê߽ܰÄÞ(~P)";
+ Text[ chinese_traditional ] = "±K½X(~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 ] = "Système ~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 plików";
+ 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 ] = "Mened¿er...";
+ Text[ japanese ] = "ÏÈ°¼Þ¬(~M)...";
+ Text[ chinese_traditional ] = "ºÞ²z¾¹(~M)...";
+ Text[ arabic ] = "ÇáãÏíÑ...";
+ Text[ greek ] = "Äéá÷åéñéóôÞò...";
+ Text[ korean ] = "°ü¸®ÀÚ(~M)...";
+ Text[ turkish ] = "~Yönetici...";
+ 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 ] = "~Padrão" ;
+ Text [ finnish ] = "~Vakio" ;
+ Text [ danish ] = "Standa~rd" ;
+ Text [ french ] = "~Par défaut" ;
+ 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 diretório" ;
+ Text [ portuguese ] = "O directório '" ;
+ Text [ finnish ] = "Hakemistoa '" ;
+ Text [ danish ] = "Biblioteket '" ;
+ Text [ french ] = "Le répertoire '" ;
+ 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 ] = "' não existe." ;
+ Text [ portuguese ] = "' não 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 ] = "' ¤£¦s¦b¡C";
+ Text[ arabic ] = "' ÛíÑ ãæÌæÏ.";
+ Text[ greek ] = "' äåí õðÜñ÷åé.";
+ Text[ korean ] = "' ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "' mevcut deðil.";
+ 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 não combina." ;
+ MESSAGE [ portuguese ] = "A senha não é válida." ;
+ MESSAGE [ finnish ] = "Salasana ei kelpaa." ;
+ MESSAGE [ danish ] = "Ugyldig adgangskode" ;
+ MESSAGE [ french ] = "Mot de passe incorrect." ;
+ MESSAGE [ swedish ] = "Felaktigt lösenord." ;
+ MESSAGE [ dutch ] = "Wachtwoord niet juist" ;
+ MESSAGE [ spanish ] = "Contraseña no válida." ;
+ MESSAGE [ english_us ] = "Invalid password." ;
+ MESSAGE[ chinese_simplified ] = "´íÎóµÄ¿ÚÁî¡£";
+ MESSAGE[ russian ] = "Íåïðàâèëüíûé ïàðîëü.";
+ MESSAGE[ polish ] = "Nieprawid³owe has³o.";
+ MESSAGE[ japanese ] = "³‚µ‚­‚È‚¢Ê߽ܰÄÞ¡";
+ MESSAGE[ chinese_traditional ] = "±K½XµL®Ä¡C";
+ MESSAGE[ arabic ] = "ßáãÉ ÇáÓÑ ÛíÑ ÕÇáÍÉ.";
+ MESSAGE[ greek ] = "ÅóöáëìÝíïò êùäéêüò ðñüóâáóçò.";
+ MESSAGE[ korean ] = "Æнº¿öµå°¡ Ʋ¸³´Ï´Ù.";
+ MESSAGE[ turkish ] = "Yanlýþ þifre";
+ MESSAGE[ language_user1 ] = " ";
+};
+String STR_FILEDLG_INSERT
+{
+ Text = "Datei einfügen" ;
+ 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 ] = "Indsæt fil" ;
+ Text [ french ] = "Insérer 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 ] = "Käsittele" ;
+ Text [ danish ] = "Administrer" ;
+ Text [ french ] = "Gérer" ;
+ Text [ swedish ] = "Organisera" ;
+ Text [ dutch ] = "Beheren" ;
+ Text [ spanish ] = "Administrar" ;
+ Text [ english_us ] = "Organizer" ;
+ Text[ chinese_simplified ] = "¹ÜÀí";
+ Text[ russian ] = "Îðãàíèçàöèÿ";
+ Text[ polish ] = "Zarz¹dzaj";
+ Text[ japanese ] = "ŠÇ—";
+ Text[ chinese_traditional ] = "ºÞ²z";
+ Text[ arabic ] = "ÅÏÇÑÉ";
+ Text[ greek ] = "Äéá÷åßñéóç";
+ Text[ korean ] = "°ü¸®";
+ Text[ turkish ] = "Yönet";
+ Text[ language_user1 ] = " ";
+};
+InfoBox MSG_TABPAGE_INVALIDNAME
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Der Name wird bereits für 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 ] = "Tämä nimi on jo käytössä." ;
+ Message [ danish ] = "Navnet er allerede i brug som navn på en typografi." ;
+ Message [ french ] = "Ce nom a déjà été attribué." ;
+ Message [ swedish ] = "Namnet används redan för 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 zosta³a ju¿ u¿yta dla stylu.";
+ Message[ japanese ] = "‚±‚Ì–¼‘O‚Í‚·‚Å‚ÉA‚ ‚é½À²Ù‚ÉŽg‚í‚ê‚Ä‚¢‚Ü‚·B";
+ Message[ chinese_traditional ] = "¦³¤@­Ó¼Ë¦¡¤w¸g¨Ï¥Î³o­Ó¦WºÙ¡C";
+ Message[ arabic ] = "åÐÇ ÇáÇÓã íõÓÊÎÏã ÈÇáÝÚá áÃÍÏ ÇáäãÇÐÌ.";
+ Message[ greek ] = "Ôï üíïìá áõôü ÷ñçóéìïðïéåßôáé Þäç ãéá Ýíá ðñüôõðï.";
+ Message[ korean ] = "ÀÌ À̸§Àº ÀÌ¹Ì ¼­½ÄÆÄÀÏ¿¡ »ç¿ëÁßÀÔ´Ï´Ù.";
+ Message[ turkish ] = "Bu ad bir þablon adý olarak kullanýlýyor.";
+ 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 não existe." ;
+ Message [ portuguese ] = "Este modelo não existe." ;
+ Message [ finnish ] = "Tyyliä ei ole." ;
+ Message [ danish ] = "Denne typografi eksisterer ikke." ;
+ Message [ french ] = "Style inexistant." ;
+ Message [ swedish ] = "Den här 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­Ó¼Ë¦¡¤£¦s¦b¡C";
+ Message[ arabic ] = "åÐÇ ÇáäãØ ÛíÑ ãæÌæÏ.";
+ Message[ greek ] = "Ôï ðñüôõðï äåí õðÜñ÷åé.";
+ Message[ korean ] = "ÀÌ ¼­½ÄÆÄÀÏÀº ¾ø½À´Ï´Ù.";
+ Message[ turkish ] = "Bu þablon mevcut deðil.";
+ 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 würde." ;
+ 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 forårsake en sirkulær forbindelse." ;
+ Message [ italian ] = "Impossibile usare lo stile come principale;\ncauserebbe una connessione circolare." ;
+ Message [ portuguese_brazilian ] = "O estilo não pode ser usado como superior;\nisto provocaria uma conex o circular." ;
+ Message [ portuguese ] = "Este modelo não pode ser usado como modelo-base,\numa vez que provocaria uma referência 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 forårsage en rekursion." ;
+ Message [ french ] = "Ce style ne peut pas être utilisé comme style de base\ncar il entraînerait une référence récursive." ;
+ Message [ swedish ] = "Denna mall kan inte användas 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 podría 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 mo¿esz u¿yæ jako szablonu podstawowego,\nponiewa¿ mog³a by powstaæ rekurencja.";
+ Message[ japanese ] = "‚±‚̽À²Ù‚ÍÍÞ°½ ½À²Ù‚Æ‚µ‚ÄŽg—p‚Å‚«‚Ü‚¹‚ñ¡\n´×°‚ª”­¶‚µ‚Ü‚·B";
+ Message[ chinese_traditional ] = "³o­Ó¼Ë¦¡µLªk³Q·í§@¼Ë¦¡¤å¥ó¡M\n§_«h·|¤Þ°_»¼Âk¤Þ¥Î¡C";
+ Message[ arabic ] = "áÇ íãßä ÇÓÊÎÏÇã åÐÇ ÇáÞÇáÈ ßÞÇáÈ ÃÓÇÓí¡\náÃä åÐÇ ÓæÝ íÄÏí áäÔæÁ ãÑÌÚ ãÊÑÏÏ (¿).";
+ Message[ greek ] = "Äåí åßíáé äõíáôüí íá ÷ñçóéìïðïéçèåß áõôü ðñüôõðï ùò âáóéêü ðñüôõðï;\nåðåéäÞ ðñïêýðôåé ìßá áíáäñïìéêÞ ëåéôïõñãßá.";
+ Message[ korean ] = "ÀÌ ¼­½ÄÆÄÀÏÀº ±âº»¼­½ÄÆÄÀÏ·Î »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù. \n¹Ýº¹ÀûÀÎ ÂüÁ¶°¡ ¾ß±âµÉ ¼öµµ Àֱ⠶§¹®ÀÔ´Ï´Ù.";
+ Message[ turkish ] = "Bu þablon (özyineleme nedeniyle)\n temel þablon olarak kullanýlamaz.";
+ 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 padrão.\nEscolha outro nome por favor." ;
+ MESSAGE [ finnish ] = "Nimeä käytetään jo oletustyylissä.\nKirjoita toinen nimi." ;
+ MESSAGE [ danish ] = "Navnet er allerede i brug som navn på en standardtypografi.\nVælg venligst et andet navn." ;
+ MESSAGE [ french ] = "Ce nom a déjà attribué à un style par défaut.\nVeuillez en choisir un autre." ;
+ MESSAGE [ swedish ] = "Namnet används redan för en standardmall.\nVälj 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 domyœlnego .\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 kullanýlýyor.\nBaþka bir ad seçin.";
+ 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 määritetty. Korvataanko se?" ;
+ Message [ danish ] = "Typografi eksisterer allerede. Skal den overskrives?" ;
+ Message [ french ] = "Ce style existe déjà. 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 zast¹piæ?";
+ Message[ japanese ] = "‚±‚̽À²Ù‚Í‚·‚Å‚É‘¶Ý‚µ‚Ä‚¢‚Ü‚·Bã‘‚«‚µ‚Ü‚·‚©H";
+ Message[ chinese_traditional ] = "¼Ë¦¡¤w¸g¦s¦b¡C±z­nÂмg¥¦¡S";
+ Message[ arabic ] = "åÐÇ ÇáäãØ ãæÌæÏ ÈÇáÝÚá. åá ÊÑíÏ ÇáßÊÇÈÉ ÝæÞå¿";
+ Message[ greek ] = "Ôï ðñüôõðï õðÜñ÷åé Þäç. Íá äéáãñáöåß;";
+ Message[ korean ] = "¼­½ÄÆÄÀÏÀÌ ÀÌ¹Ì ÀÖ½À´Ï´Ù. °ãÃÄ ¾µ±î¿ä?";
+ Message[ turkish ] = "Þablon mevcut durumda. Üzerine yazýlsýn mý?";
+ Message[ language_user1 ] = " ";
+};
+String STR_DELETE_STYLE
+{
+ Text = "Wollen Sie die Vorlage $1 wirklich löschen?" ;
+ 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 löschen?" ;
+ 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 modèle $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 ] = "±z¯uªº­n§R°£¼Ë¦¡ $1 ¡S";
+ Text[ arabic ] = "åá ÊÑíÏ ÈÇáÝÚá ÍÐÝ ÇáäãØ $1¿";
+ Text[ greek ] = "ÈÝëåôå óßãïõñá íá äéáãñÜøåôå ôï ðñüôõðï $1?";
+ Text[ korean ] = "¼­½ÄÆÄÀÏ$1À» Á¤¸»·Î »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "$1 þablonlarýný gerçekten 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 löschen 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 använd formatmall!\n" ;
+ Text [ danish ] = "Du sletter en anvendt typografi!\n" ;
+ Text [ portuguese ] = "Está a eliminar um estilo usado!\n" ;
+ Text [ portuguese_brazilian ] = "Sie löschen eine benutzte Vorlage!\n" ;
+ Text[ chinese_simplified ] = "ÄúҪɾ³ýµÄÊÇÒ»¸öʹÓõÄÑùʽ£¡\n";
+ Text[ russian ] = "Âû óäàëÿåòå èñïîëüçóåìûé ñòèëü!\n";
+ Text[ polish ] = "Usuwasz zastosowany styl!\n";
+ Text[ japanese ] = "Žg—p‚µ‚½½À²Ù‚ð휂µ‚悤‚Æ‚µ‚Ä‚¢‚Ü‚·!\n";
+ Text[ chinese_traditional ] = "±z­n§R°£ªº¬O¤@­Ó¨Ï¥Îªº¼Ë¦¡¡T\n";
+ Text[ arabic ] = "ÃäÊ ÇáÂä ÈÕÏÏ ÍÐÝ äãØ ÞíÏ ÇáÇÓÊÎÏÇã!\n";
+ Text[ greek ] = "ÄéáãñÜöåôå Ýíá ðñüôõðï ðïõ åöáñìüóôçêå!\n";
+ Text[ korean ] = "Àû¿ëµÈ ¼­½ÄÆÄÀÏÀ» »èÁ¦ÇÏ°í ÀÖ½À´Ï´Ù!\n";
+ Text[ turkish ] = "Kullanýlan 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 ] = "V‹Kì¬...";
+ 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 ] = "Deðiþtir...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_DELETE ;
+ Text = "Löschen..." ;
+ 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 Básico" ;
+ TEXT [ portuguese ] = "Macros BASIC" ;
+ TEXT [ finnish ] = "Basic Macros" ;
+ TEXT [ danish ] = "BASIC-makroer" ;
+ TEXT [ french ] = "Macros BASIC" ;
+ TEXT [ swedish ] = "BASIC-makron" ;
+ TEXT [ dutch ] = "BASIC- macro´s" ;
+ 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 configuração." ;
+ MESSAGE [ finnish ] = "Luetaan asiakirjat ilman asetttelua." ;
+ MESSAGE [ danish ] = "Indlæser 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 diseño." ;
+ MESSAGE [ english_us ] = "Loading document without layout." ;
+ MESSAGE[ chinese_simplified ] = "²»´ø°æʽµØ×°ÔØÎļþ¡£";
+ MESSAGE[ russian ] = "Äîêóìåíò çàãðóæåòñÿ áåç ðàçìåòêè.";
+ MESSAGE[ polish ] = "Dokument jest ³adowany bez uk³adu.";
+ MESSAGE[ japanese ] = "ÄÞ·­ÒÝÄ‚ÍÚ²±³Ä‚È‚µ‚Å“Ç‚Ýž‚Ü‚ê‚Ü‚·B";
+ MESSAGE[ chinese_traditional ] = "¸Ë¸ü¤å¥ó¡A¤£ªþ±aª©¦¡¡C";
+ MESSAGE[ arabic ] = "ÓíÊã ÊÍãíá ÇáãáÝ ÈÏæä ÊÎØíØ.";
+ MESSAGE[ greek ] = "Öüñôùóç åããñÜöïõ ÷ùñßò ôç äéÜôáîç.";
+ MESSAGE[ korean ] = "¹®¼­¸¦ ·¹À̾ƿô ¾øÀÌ ·Îµå ÁßÀÔ´Ï´Ù.";
+ MESSAGE[ turkish ] = "Belge sayfa düzeni olmadan yükleniyor.";
+ 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 información 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 från dokument i det här\nfilformatet kan inte redigeras." ;
+ Message [ danish ] = "Dokumenters dokumentinformation med dette \nfilformat kan ikke redigeres." ;
+ Message [ portuguese ] = "Impossível editar a informação 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 dokumentów nie mog¹ \nbyæ edytowane w tym formacie pliku.";
+ Message[ japanese ] = "‚±‚Ì̧²Ù‘Ž®‚ÌÄÞ·­ÒÝÄ‚ÌÄÞ·­ÒÝÄî•ñ‚Í\n•ÒW‚Å‚«‚Ü‚¹‚ñB";
+ Message[ chinese_traditional ] = "µLªk½s¿è³o­Ó¤å¥ó®æ¦¡ªº¤å¥ó¸ê°T¡C";
+ Message[ arabic ] = "áÇ íãßä ÊÍÑíÑ ãÚáæãÇÊ ÇáãÓÊäÏ ááãÓÊäÏÇÊ\nÝí ÊäÓíÞ ÇáãáÝ åÐÇ.";
+ Message[ greek ] = "Äåí åßíáé äõíáôÞ ç åðåîåñãáóßá ôçò ðëçñïöïñßáò åããñÜöïõ ôùí åããñÜöùí \n óå áõôÞ ôç ìïñöÞ.";
+ Message[ korean ] = "ÀÌ \nÆÄÀϼ­½ÄÀ¸·Î µÈ ¹®¼­ÀÇ ¹®¼­Á¤º¸´Â ÆíÁýÇÒ ¼ö ¾ø½À´Ï´Ù.";
+ Message[ turkish ] = "Bu dosya formatýndaki belgelerin belge bilgileri iþlenemez";
+ 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 información acerca de los documentos que se están editando\nno puede ser editada por el administrador de documentos." ;
+ Message [ french ] = "Impossible de modifier les propriétés 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 från 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 Informação sobre Documentos dos documentos que\n estão a ser editados não poder ser modificada pelo gestor de documentos." ;
+ Message[ chinese_simplified ] = "ÎĵµÒѾ­´¦Óڱ༭״̬£¬\nÎĵµ¹ÜÀíÆ÷ÎÞ·¨´¦ÀíÕâЩÎĵµ¡£";
+ Message[ russian ] = "Äèñïåò÷åð äîêóìåíòîâ íå ìîæåò ðåäàêòèðîâàòü\nèíôîðìàöèþ î äîêóìåíòàõ, íàõîäÿùèõñÿ â îáðàáîòêå\n";
+ Message[ polish ] = "Informacja o dokumencie dla edytowanych dokumentów\nnie mo¿e byæ edytowana przez mened¿era dokumentów.";
+ Message[ japanese ] = "•ÒW’†‚ÌÄÞ·­ÒÝÄ‚©‚ç‚ÌÄÞ·­ÒÝÄî•ñ‚Í\nÄÞ·­ÒÝÄ ÏÈ°¼Þ¬‚©‚ç•ÒW‚ª‚Å‚«‚Ü‚¹‚ñB";
+ Message[ chinese_traditional ] = "¤å¥ó¤w¸g³B©ó½s¿èª¬ºA¡M\n¤å¥óºÞ²z¾¹µLªk³B²z³o¨Ç¤å¥ó¡C";
+ Message[ arabic ] = "áÇ íãßä áÅÏÇÑÉ ÇáãÓÊäÏÇÊ ÊÚÏíá ãÚáæãÇÊ ÇáãÓÊäÏ\nááãÓÊäÏÇÊ ÇáÊí íÊã ÊÍÑíÑåÇ ÍÇáíÇð.";
+ Message[ greek ] = "Äåí åßíáé äõíáôÞ ç åðåîåñãáóßá ìå ôïí äéá÷åéñéóôÞ åããñÜöùí ôçò ðëçñïöïñßáò åããñÜöïõ ãéá \n Ýããñáöá ôá ïðïßá åßíáé õðü åðåîåñãáóßá.";
+ Message[ korean ] = "ÇöÀç ÆíÁýÁßÀÎ \n¹®¼­ÀÇ ¹®¼­Á¤º¸´Â ¹®¼­°ü¸®ÀÚ¿¡ ÀÇÇØ ÆíÁýµÉ ¼ö ¾ø½À´Ï´Ù.";
+ Message[ turkish ] = "Þu an kullanýlan belgelerin belge bilgileri belge yöneticisi tarafýndan iþlenemez.";
+ 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 ] = "Dölj" ;
+ 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 ] = "Não ocultar" ;
+ Text [ english_us ] = "Don't Hide" ;
+ Text [ portuguese_brazilian ] = "Nicht verstecken" ;
+ Text [ swedish ] = "Dölj 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 ] = "Navigatör";
+ Text[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_ERROR_WRONG_CONFIRM
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ MESSAGE = "Fehlerhafte Bestätigung des Passwortes" ;
+ MESSAGE [ English ] = "Wrong confirmation of the password" ;
+ MESSAGE[ english_us ] = "Faulty password confirmation";
+ MESSAGE[ portuguese ] = "Confirmação errada da senha";
+ MESSAGE[ russian ] = "Ïîäòâåðæäåíèå ïàðîëÿ ñîäåðæèò îøèáêè";
+ MESSAGE[ greek ] = "ÅóöáëìÝíç åðéâåâáßùóç ôïõ êùäéêïý ðñüóâáóçò";
+ MESSAGE[ dutch ] = "Foutieve bevestiging van wachtwoord";
+ MESSAGE[ french ] = "Confirmation du mot de passe erronée !";
+ MESSAGE[ spanish ] = "Confirmación errónea de la contraseña";
+ MESSAGE[ italian ] = "Conferma errata della password";
+ MESSAGE[ danish ] = "Forkert bekræftelse af adgangskoden";
+ MESSAGE[ swedish ] = "Felaktig bekräftelse av lösenordet";
+ MESSAGE[ polish ] = "Nieprawid³owe potwierdzenie has³a";
+ MESSAGE[ portuguese_brazilian ] = "Wrong confirmation of the password";
+ MESSAGE[ japanese ] = "Ê߽ܰÄÞ‚ÌŠm”F‚ª‚Å‚«‚Ä‚¢‚Ü‚¹‚ñ";
+ MESSAGE[ korean ] = "Æнº¿öµå È®ÀÎÀÌ À߸øµÇ¾ú½À´Ï´Ù.";
+ MESSAGE[ chinese_simplified ] = "È·ÈÏ¿ÚÁîʱ³ö´í";
+ MESSAGE[ chinese_traditional ] = "Åçµý±K½XµL®Ä";
+ 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 0000000000..0f632448ff
--- /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 0000000000..ad85b985d6
--- /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 0000000000..a25251139c
--- /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 ] = "~T¡tulo" ;
+ Text [ portuguese ] = "~Título" ;
+ Text [ finnish ] = "~Arvo" ;
+ Text [ danish ] = "Titel" ;
+ Text [ french ] = "~Titre" ;
+ Text [ swedish ] = "~Rubrik" ;
+ Text [ dutch ] = "~Titel" ;
+ Text [ spanish ] = "~Título" ;
+ 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 ] = "~Baþlýk";
+ 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 ] = "¥DÃD(~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 = "~Schlüsselwörter" ;
+ Text [ ENGLISH ] = "~Keywords" ;
+ Text [ norwegian ] = "~Nøkkelord" ;
+ Text [ italian ] = "~Parole chiave" ;
+ Text [ portuguese_brazilian ] = "~Palavras-chave" ;
+ Text [ portuguese ] = "~Palavras-chave" ;
+ Text [ finnish ] = "A~vainsanat" ;
+ Text [ danish ] = "Nøgleord" ;
+ Text [ french ] = "~Mots-clés" ;
+ Text [ swedish ] = "~Nyckelord" ;
+ Text [ dutch ] = "~Sleutelwoorden" ;
+ Text [ spanish ] = "~Palabras clave" ;
+ Text [ english_us ] = "~Keywords" ;
+ Text[ chinese_simplified ] = "¹Ø¼ü×Ö(~K)";
+ Text[ russian ] = "Êëþ÷åâûå ñëîâà";
+ Text[ polish ] = "S³owa kluczowe";
+ Text[ japanese ] = "·°Ü°ÄÞ(~K)";
+ Text[ chinese_traditional ] = "ÃöÁä¦r(~K)";
+ Text[ greek ] = "ËÝîåéò-êëåéäéÜ";
+ Text[ korean ] = "Å°¿öµå(~K)";
+ Text[ arabic ] = "ÇáßáãÇÊ ÇáÃÓÇÓíÉ";
+ Text[ turkish ] = "~Anahtar sözcükler";
+ 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 ] = "~DescriçÆo" ;
+ Text [ portuguese ] = "~Descrição" ;
+ Text [ finnish ] = "~Kuvaus" ;
+ Text [ danish ] = "Beskrivelse" ;
+ Text [ french ] = "~Description" ;
+ Text [ swedish ] = "~Beskrivning" ;
+ Text [ dutch ] = "~Beschrijving" ;
+ Text [ spanish ] = "~Descripción" ;
+ Text [ english_us ] = "~Comment" ;
+ Text[ chinese_simplified ] = "˵Ã÷(~C)";
+ Text[ russian ] = "Îïèñàíèå";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "ºÒÝÄ(~C)";
+ Text[ chinese_traditional ] = "´y­z(~C)";
+ Text[ greek ] = "ÐåñéãñáöÞ";
+ Text[ korean ] = "¼³¸í(~C)";
+ Text[ arabic ] = "ÇáæÕÝ";
+ Text[ turkish ] = "~Taným";
+ 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 = "~Schreibgeschützt" ;
+ Text [ ENGLISH ] = "~Readonly" ;
+ Text [ english_us ] = "~Read-only" ;
+ Text [ portuguese_brazilian ] = "~Schreibgeschützt" ;
+ 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 ] = "Ubicación:" ;
+ 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 ] = "¦ì¸m¡G";
+ 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 = "Größe:" ;
+ Text [ ENGLISH ] = "Size:" ;
+ Text [ english_us ] = "Size:" ;
+ Text [ italian ] = "Dimensione:" ;
+ Text [ spanish ] = "Tamaño:" ;
+ Text [ french ] = "Taille :" ;
+ Text [ dutch ] = "Grootte:" ;
+ Text [ swedish ] = "Storlek:" ;
+ Text [ danish ] = "Størrelse:" ;
+ Text [ portuguese_brazilian ] = "Größe:" ;
+ Text [ portuguese ] = "Tamanho:" ;
+ Text[ chinese_simplified ] = "´óС£º";
+ Text[ russian ] = "Ðàçìåð:";
+ Text[ polish ] = "Rozmiar:";
+ Text[ japanese ] = "»²½Þ:";
+ Text[ chinese_traditional ] = "¤j¤p¡G";
+ Text[ greek ] = "ÌÝãåèïò:";
+ Text[ korean ] = "Å©±â:";
+ Text[ arabic ] = "ÇáÍÌã:";
+ Text[ turkish ] = "Büyüklük:";
+ 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 ] = "Oluþturma 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 ] = "Durée 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 ] = "½s¿è¡G";
+ Text[ greek ] = "ÅðåîåñãÜóôçêå:";
+ Text[ korean ] = "ÆíÁý:";
+ Text[ arabic ] = "ãÍÑÑ:";
+ Text[ turkish ] = "Dünzleme:";
+ 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 = "Geändert 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 ] = "Geändert 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 ] = "Deðiþtirme 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 ] = "N£mero do documento:" ;
+ Text [ swedish ] = "Version:" ;
+ Text [ danish ] = "Version:" ;
+ Text [ italian ] = "Versione:" ;
+ Text [ spanish ] = "Versión:" ;
+ Text [ french ] = "Version :" ;
+ Text [ dutch ] = "Versie:" ;
+ Text [ portuguese ] = "Versão:" ;
+ Text[ chinese_simplified ] = "°æ±¾£º";
+ Text[ russian ] = "Âåðñèÿ:";
+ Text[ polish ] = "Wersja:";
+ Text[ japanese ] = "ÊÞ°¼Þ®Ý:";
+ Text[ chinese_traditional ] = "ª©¥»¡G";
+ Text[ greek ] = "¸êäïóç:";
+ Text[ korean ] = "¹öÀü:";
+ Text[ arabic ] = "ÇáÅÕÏÇÑ:";
+ Text[ turkish ] = "Sürüm:";
+ 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 ] = "¦C¦L¤é´Á¡G";
+ Text[ greek ] = "Åêôõðþèçêå ôç:";
+ Text[ korean ] = "ÀμâÀÏ:";
+ Text[ arabic ] = "ÊÇÑíÎ ÇáØÈÇÚÉ:";
+ Text[ turkish ] = "Yazdýrma 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 = "~Löschen";
+ 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 données d'identité";
+ Text [ italian ] = "Usa i dati utente" ;
+ Text [ dutch ] = "~Gebruikersgegevens toepassen" ;
+ Text [ spanish ] = "Utilice los ~datos del usuario" ;
+ Text [ swedish ] = "Använd ~användardata" ;
+ 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 u¿ytkownika";
+ Text[ japanese ] = "Õ°»Þ° ÃÞ°À‚ðŽg—p‚·‚é";
+ Text[ chinese_traditional ] = "±Ä¥Î¨Ï¥ÎªÌ¸ê®Æ(~A)";
+ Text[ greek ] = "×ñÞóç ~ðñïóùðéêþí äåäïìÝíùí";
+ Text[ korean ] = "»ç¿ëÀÚ µ¥ÀÌÅÍ ÀÌ¿ë(~A)";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ÈíÇäÇÊ ÇáãÓÊÎÏã";
+ Text[ turkish ] = "~Kullanýcý 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 ] = "Modèle :" ;
+ 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 ] = "okänd" ;
+ 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 informação" ;
+ Text [ finnish ] = "Tietokentät..." ;
+ Text [ danish ] = "Infofelter..." ;
+ Text [ french ] = "~Champs d'information..." ;
+ Text [ swedish ] = "~Infofält..." ;
+ Text [ dutch ] = "~Infovelden..." ;
+ Text [ spanish ] = "Ca~mpo información..." ;
+ 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 ] = "Autogenindlæs efter" ;
+ Text [ portuguese_brazilian ] = "~Autoreload alle" ;
+ Text [ portuguese ] = "~Autocarregar cada" ;
+ Text[ chinese_simplified ] = "È«²¿ÖØÐÂ×Ô¶¯×°ÔØ(~A)";
+ Text[ russian ] = "~Àâòîçàãðóçêà êàæäûå";
+ Text[ polish ] = "Prze³a~duj automatycznie co";
+ Text[ japanese ] = "Ž©“®“I‚ÉXV(~A)";
+ Text[ chinese_traditional ] = "¥þ³¡­«·s¦Û°Ê¸Ë¸ü(~A)";
+ Text[ greek ] = "~Áõôüìáôç öüñôùóç êÜèå";
+ Text[ korean ] = "¸ðµÎ ÀÚµ¿À¸·Î ´Ù½Ã ·Îµå(~A)";
+ Text[ arabic ] = "ÅÚÇÏÉ ÊÍãíá ÊáÞÇÆí ááßá";
+ Text[ turkish ] = "~Otm. yeniden yükleme";
+ 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 ] = "Propriétés de " ;
+ Text [ dutch ] = "Eigenschappen van " ;
+ Text [ swedish ] = "Egenskaper för " ;
+ Text [ danish ] = "Egenskaber af " ;
+ Text [ portuguese_brazilian ] = "Eigenschaften von " ;
+ Text [ portuguese ] = "Propriedades de " ;
+ Text[ chinese_simplified ] = "ÊôÐÔ£º ";
+ Text[ russian ] = "Ñâîéñòâà ";
+ Text[ polish ] = "W³aœciwoœci ";
+ 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 ] = "Général" ;
+ Text [ dutch ] = "Algemeen" ;
+ Text [ swedish ] = "Allmänt" ;
+ Text [ danish ] = "Generelt" ;
+ Text [ portuguese_brazilian ] = "Allgemein" ;
+ Text [ portuguese ] = "Geral" ;
+ Text[ chinese_simplified ] = "³£¹æ";
+ Text[ russian ] = "Îáùåå";
+ Text[ polish ] = "Ogólne";
+ 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 ] = "Descripción" ;
+ Text [ french ] = "Description" ;
+ Text [ dutch ] = "Beschrijving" ;
+ Text [ swedish ] = "Beskrivning" ;
+ Text [ danish ] = "Beskrivelse" ;
+ Text [ portuguese_brazilian ] = "Beschreibung" ;
+ Text [ portuguese ] = "Descrição" ;
+ Text[ chinese_simplified ] = "˵Ã÷";
+ Text[ russian ] = "Îïèñàíèå";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "ŠT—v";
+ Text[ chinese_traditional ] = "´y­z";
+ Text[ greek ] = "ÐåñéãñáöÞ";
+ Text[ korean ] = "¼³¸í";
+ Text[ arabic ] = "ÇáæÕÝ";
+ Text[ turkish ] = "Taným";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = TP_DOCINFOUSER ;
+ Text = "Benutzer" ;
+ Text [ English ] = "User" ;
+ Text [ norwegian ] = "User" ;
+ Text [ italian ] = "Utente" ;
+ Text [ portuguese_brazilian ] = "Usu rio" ;
+ Text [ portuguese ] = "Utilizador" ;
+ Text [ finnish ] = "Käyttäjä" ;
+ Text [ danish ] = "Bruger" ;
+ Text [ french ] = "Utilisateur" ;
+ Text [ swedish ] = "Användare" ;
+ Text [ dutch ] = "Gebruiker" ;
+ Text [ spanish ] = "Usuario" ;
+ Text [ english_us ] = "User Defined" ;
+ Text[ chinese_simplified ] = "ʹÓÃÕß";
+ Text[ russian ] = "Ïîëüçîâàòåëü";
+ Text[ polish ] = "U¿ytkownik";
+ Text[ japanese ] = "Õ°»Þ°";
+ Text[ chinese_traditional ] = "¨Ï¥ÎªÌ";
+ Text[ greek ] = "×ñÞóôçò";
+ Text[ korean ] = "»ç¿ëÀÚ Á¤ÀÇ";
+ Text[ arabic ] = "ÇáãÓÊÎÏã";
+ Text[ turkish ] = "Kullanýcý";
+ 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 0000000000..ebbb0b1303
--- /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 0000000000..db23347026
--- /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 0000000000..87ad39e69a
--- /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 informações" ;
+ 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 ] = "½s¿è¼ÐÃD";
+ Text[ arabic ] = "ÊÍÑíÑ ÈØÇÞÇÊ ÇáãÚáæãÇÊ";
+ Text[ greek ] = "Åðåîåñãáóßá ïíüìáôïò ðëçñïöïñßáò";
+ Text[ korean ] = "Á¤º¸À̸§ ÆíÁý";
+ Text[ turkish ] = "Etiketleri düzenle";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
new file mode 100644
index 0000000000..bb7e4fbbd4
--- /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 0000000000..88dbbb0a56
--- /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 0000000000..08a1b55d76
--- /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 0000000000..186f524954
--- /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 0000000000..9ed2ff8ff3
--- /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 ] = "Événement" ;
+ Text [ dutch ] = "Gebeurtenis" ;
+ Text [ swedish ] = "Händelse" ;
+ 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 ] = "~Upphäv" ;
+ 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 ] = "~Kaldýr";
+ };
+ 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 ] = "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 , 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 ] = "Événement" ;
+ Text [ dutch ] = "Gebeurtenis" ;
+ Text [ swedish ] = "Händelse" ;
+ 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 ] = "~Upphäv" ;
+ 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 ] = "~Kaldýr";
+ };
+ 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 0000000000..c53f510eac
--- /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 0000000000..3f404b95ae
--- /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 ] = "µo°e";
+ Text[ turkish ] = "Send";
+ Text[ arabic ] = "Send";
+ };
+ PushButton PB_MAILWIN_CLOSE
+ {
+ Pos = MAP_APPFONT( 6, 23 );
+ Size = MAP_APPFONT( 50, 14 );
+ Text = "S~chließen";
+ 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 cachée" ; 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 ] = "¥D¦®¡G";
+ 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 = "~Priorität:";
+ 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 ] = "d—v“x:";
+ 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 ] =
+ {
+ < "Très élevée" ; 5 ; > ;
+ < "Élevée" ; 5 ; > ;
+ < "Normale" ; 5 ; > ;
+ < "Faible" ; 5 ; > ;
+ < "Très 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 høj" ; 5 ; > ;
+ < "Høj" ; 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 0000000000..de2146fdc6
--- /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 0000000000..44584e5b4f
--- /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 0000000000..1bbaa7c09d
--- /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 0000000000..61c6340667
--- /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 automáticamente" ;
+ 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 güncelleme";
+ 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 ] = "~Próximo" ;
+ Text [ portuguese ] = "~Estilo seguinte" ;
+ Text [ finnish ] = "~Seuraava" ;
+ Text [ danish ] = "Næste typografi" ;
+ Text [ french ] = "~Style suivant" ;
+ Text [ swedish ] = "Nästa ~formatmall" ;
+ Text [ dutch ] = "~Volgend profiel" ;
+ Text [ spanish ] = "~Estilo siguiente" ;
+ Text [ english_us ] = "Ne~xt Style" ;
+ Text[ chinese_simplified ] = "ÏÂÒ»¸öÑùʽ(~X)";
+ Text[ russian ] = "Ñëåäóþùèé ñòèëü";
+ Text[ polish ] = "Nastêpny styl";
+ Text[ japanese ] = "ŽŸ‚É‘±‚­½À²Ù(~X)";
+ Text[ chinese_traditional ] = "¤U¤@­Ó¼Ë¦¡(~X)";
+ Text[ arabic ] = "äãØ ÊÇáí";
+ Text[ greek ] = "Åðüìåíï ðñüôõðï";
+ Text[ korean ] = "´ÙÀ½ À¯Çü(~X)";
+ Text[ turkish ] = "Sonraki biçim";
+ 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? ~Verknüpft mit : ~Verkn³pft mit */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Verknüpft mit : ~Verkn³pft mit */
+ Text = "~Verknüpft 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 ] = "Kædet med" ;
+ Text [ french ] = "~Lié à" ;
+ Text [ swedish ] = "~Länkad med" ;
+ Text [ dutch ] = "~Gebaseerd op" ;
+ Text [ spanish ] = "~Vinculado con" ;
+ Text [ english_us ] = "~Based on" ;
+ Text[ chinese_simplified ] = "Á´½Óµ½(~B)";
+ Text[ russian ] = "Ñâÿçàí ñ";
+ Text[ polish ] = "Po³¹czony z";
+ Text[ japanese ] = "Øݸæ(~B)";
+ Text[ chinese_traditional ] = "³sµ²¨ì(~B)";
+ Text[ arabic ] = "ãÑÊÈØ ÈÜ";
+ Text[ greek ] = "~Óýíäåóç ìå";
+ Text[ korean ] = "¿¬°áµÈ ´ë»ó(~B)";
+ Text[ turkish ] = "~Baðlanýlan";
+ 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 ] = "~Område" ;
+ Text [ italian ] = "~Area" ;
+ Text [ portuguese_brazilian ] = "~Região" ;
+ Text [ portuguese ] = "~Categoria" ;
+ Text [ finnish ] = "~Alue" ;
+ Text [ danish ] = "Område" ;
+ Text [ french ] = "~Catégorie" ;
+ Text [ swedish ] = "~Område" ;
+ 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 = "Enthält" ;
+ Text [ ENGLISH ] = "Contains" ;
+ Text [ norwegian ] = "Inneholder" ;
+ Text [ italian ] = "Contiene" ;
+ Text [ portuguese_brazilian ] = "Contém" ;
+ Text [ portuguese ] = "Contém" ;
+ Text [ finnish ] = "Sisältää" ;
+ Text [ danish ] = "Indeholder" ;
+ Text [ french ] = "Contient" ;
+ Text [ swedish ] = "Innehåller" ;
+ 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 0000000000..51ddef881e
--- /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 0000000000..7f2afc8565
--- /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 0000000000..8b72c9adfa
--- /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 0000000000..c952fa92ed
--- /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 ] = "Création 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 ] = "Biçim 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 déjà. 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. Zast¹piæ innym?";
+ Message[ japanese ] = "½À²Ù‚Í‚·‚Å‚É‚ ‚è‚Ü‚·Bã‘‚«‚µ‚Ü‚·‚©?";
+ Message[ chinese_traditional ] = "¼Ë¦¡¤w¸g¦s¦b¡C­nÂмg¡H";
+ Message[ arabic ] = "åÐÇ ÇáäãØ ãæÌæÏ ãÓÈÞÇð. åá ÊÑíÏ ÇáßÊÇÈÉ ÝæÞå¿";
+ Message[ greek ] = "Ôï ðñüôõðï õðÜñ÷åé Þäç. Íá äéáãñáöåß;";
+ Message[ korean ] = "¼­½ÄÆÄÀÏÀÌ ÀÌ¹Ì ÀÖ½À´Ï´Ù. °ãÃÄ ¾²½Ã°Ú½À´Ï±î?";
+ Message[ turkish ] = "Biçim mevcut durumda. Üzerine yazýlsýn mý?";
+ Message[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "Éú³ÉÑùʽ";
+ Text[ russian ] = "Ñîçäàòü ñòèëü";
+ Text[ polish ] = "Utwórz styl";
+ Text[ japanese ] = "½À²Ù‚Ìì¬";
+ Text[ chinese_traditional ] = "¥Í¦¨¼Ë¦¡";
+ Text[ arabic ] = "ÅäÔÇÁ äãØ";
+ Text[ greek ] = "Äçìéïõñãßá ðñïôýðïõ";
+ Text[ korean ] = "¼­½ÄÆÄÀÏ ÀÛ¼º";
+ Text[ turkish ] = "Biçim oluþtur";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
new file mode 100644
index 0000000000..1b536d2b00
--- /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 0000000000..c4d3a4128d
--- /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 0000000000..80d7a6e59e
--- /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 0000000000..1abb012dc4
--- /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 lösenord" ;
+ Text [ dutch ] = "Wachtwoord invoeren" ;
+ Text [ spanish ] = "Introduzca la contraseña" ;
+ Text [ english_us ] = "Enter Password" ;
+ Text[ chinese_simplified ] = "ÊäÈë¿ÚÁî";
+ Text[ russian ] = "Ââåñòè ïàðîëü";
+ Text[ polish ] = "WprowadŸ has³o";
+ Text[ japanese ] = "Ê߽ܰÄÞ‚Ì“ü—Í";
+ Text[ chinese_traditional ] = "¿é¤J±K½X";
+ 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 ] = "Användare";
+ Text[ polish ] = "U¿ytkownik";
+ Text[ portuguese_brazilian ] = "User";
+ Text[ japanese ] = "Õ°»Þ°(~U)";
+ Text[ korean ] = "»ç¿ëÀÚ(~U)";
+ Text[ chinese_simplified ] = "ʹÓÃÃû(~U)";
+ Text[ chinese_traditional ] = "¨Ï¥ÎªÌ(~U)";
+ Text[ arabic ] = "ÇáãÓÊÎÏã";
+ Text[ turkish ] = "~Kullanýcý";
+ 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 ] = "~Contraseña";
+ Text[ italian ] = "~Password";
+ Text[ danish ] = "Adgangskode";
+ Text[ swedish ] = "Lösenord";
+ Text[ polish ] = "Has³o";
+ Text[ portuguese_brazilian ] = "Password";
+ Text[ japanese ] = "Ê߽ܰÄÞ(~P)";
+ Text[ korean ] = "Æнº¿öµå(~P)";
+ Text[ chinese_simplified ] = "¿ÚÁî(~P)";
+ Text[ chinese_traditional ] = "±K½X(~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 = "~Bestätigen";
+ 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 ] = "Bekræft";
+ Text[ swedish ] = "Bekräfta";
+ Text[ polish ] = "PotwierdŸ";
+ Text[ portuguese_brazilian ] = "Confirm";
+ Text[ japanese ] = "Šm”F(~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 ] = "Lösenord" ;
+ Text [ dutch ] = "Wachtwoord" ;
+ Text [ spanish ] = "Contraseña" ;
+ Text [ english_us ] = "Password" ;
+ Text[ chinese_simplified ] = "¿ÚÁî";
+ Text[ russian ] = "Ïàðîëü";
+ Text[ polish ] = "Has³o";
+ Text[ japanese ] = "Ê߽ܰÄÞ";
+ Text[ chinese_traditional ] = "±K½X";
+ 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 bestätigen" ;
+ 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 ] = "Bekræft adgangskode" ;
+ Text [ french ] = "Confirmer le mot de passe" ;
+ Text [ swedish ] = "Bekräfta lösenord" ;
+ Text [ dutch ] = "Wachtwoord bevestigen" ;
+ Text [ spanish ] = "Confirmar contraseña" ;
+ Text [ english_us ] = "Confirm password" ;
+ Text[ chinese_simplified ] = "È·ÈÏ¿ÚÁî";
+ Text[ russian ] = "Ïîäòâåðäèòü ïàðîëü";
+ Text[ polish ] = "PotwierdŸ has³o";
+ Text[ japanese ] = "Ê߽ܰÄÞ‚ÌŠm”F";
+ Text[ chinese_traditional ] = "½T»{±K½X";
+ 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 0000000000..3205fe1b73
--- /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 0000000000..891d8b3f53
--- /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 0000000000..0aaa4485f9
--- /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 0000000000..aad5fa0996
--- /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 0000000000..c933134d2a
--- /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 0000000000..a8155b4b88
--- /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 0000000000..0e17f6350a
--- /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 0000000000..98f0c56fc5
--- /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 ] = "Catálogo de estilos" ;
+ Text [ french ] = "Catalogue de styles" ;
+ Text [ dutch ] = "Catalogus opmaakprofielen" ;
+ Text [ spanish ] = "Catálogo 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 ] = "~Gérer..." ;
+ Text [ dutch ] = "Be~heren..." ;
+ Text [ spanish ] = "~Administrar..." ;
+ Text [ danish ] = "Administrer..." ;
+ Text [ swedish ] = "~Förvalta..." ;
+ Text [ finnish ] = "~Organize..." ;
+ Text [ english_us ] = "~Organizer..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "¹ÜÀí(~O)...";
+ Text[ russian ] = "Îðãàíèçàöèÿ...";
+ Text[ polish ] = "Zarz¹dzaj...";
+ Text[ japanese ] = "ŠÇ—(~O)...";
+ Text[ chinese_traditional ] = "ºÞ²z(~O)...";
+ Text[ arabic ] = "ÇáÅÏÇÑÉ...";
+ Text[ greek ] = "Äéá÷åßñéóç...";
+ Text[ korean ] = "°ü¸®(~O)...";
+ Text[ turkish ] = "~Yönet...";
+ };
+ PushButton BT_DEL
+ {
+ Pos = MAP_APPFONT ( 123 , 78 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen... : ~L÷schen... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen... : ~L÷schen... */
+ Text = "~Löschen..." ;
+ 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 ] = "~Deðiþtir...";
+ };
+ 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 ] = "V‹Kì¬(~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 stylów";
+ Text[ japanese ] = "½À²Ù‚̶ÀÛ¸Þ";
+ Text[ chinese_traditional ] = "¼Ë¦¡¥Ø¿ý";
+ Text[ arabic ] = "ßÊÇáæÌ ÇáÃäãÇØ";
+ Text[ greek ] = "ÊáôÜëïãïò ðñïôýðùí";
+ Text[ korean ] = "À¯Çü Ä«Å»·Î±×";
+ Text[ turkish ] = "Biçim kataloðu";
+};
+ // 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 ] = "Hierárquico" ;
+ TEXT [ finnish ] = "Hierarchical" ;
+ TEXT [ danish ] = "Hierarkisk" ;
+ TEXT [ french ] = "Hiérarchique" ;
+ TEXT [ swedish ] = "Hierarkiskt" ;
+ TEXT [ dutch ] = "Hiërarchisch" ;
+ TEXT [ spanish ] = "Jerárquico" ;
+ TEXT [ english_us ] = "Hierarchical" ;
+ TEXT[ chinese_simplified ] = "µÈ¼¶Ê½";
+ TEXT[ russian ] = "Ïî èåðàðõèè";
+ TEXT[ polish ] = "Hierarchiczny";
+ TEXT[ japanese ] = "ŠK‘w";
+ TEXT[ chinese_traditional ] = "µ¥¯Å¦¡";
+ TEXT[ arabic ] = "åíßáí";
+ TEXT[ greek ] = "Éåñáñ÷éêÜ";
+ TEXT[ korean ] = "°èÃþÀû";
+ TEXT[ turkish ] = "Hiyerarþik";
+};
+ // 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? Gießkannenmodus : Gie˜kannenmodus */
+ /* ### ACHTUNG: Neuer Text in Resource? Gießkannenmodus : Gie˜kannenmodus */
+ Text = "Gießkannenmodus" ;
+ 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 ] = "Vattenkanneläge" ;
+ Text [ dutch ] = "Gietermodus" ;
+ Text [ spanish ] = "Modo regadera" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Vorlagen im Gießkannenmodus anwenden : Vorlagen im Gie˜kannenmodus anwenden */
+ /* ### ACHTUNG: Neuer Text in Resource? Vorlagen im Gie˜kannenmodus anwenden : Vorlagen im GieÃkannenmodus 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 selecção" ;
+ 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 sélection" ;
+ Text [ swedish ] = "Ny formatmall från markeringen" ;
+ Text [ dutch ] = "Nieuw opmaakprofiel uit selectie" ;
+ Text [ spanish ] = "Nuevo estilo a partir de selección" ;
+ Text[ chinese_simplified ] = "Ñ¡ÖеÄÐÂÑùʽ";
+ Text[ russian ] = "Ñîçäàòü ñòèëü èç âûáðàííîãî";
+ Text[ polish ] = "Nowy styl z selekcji";
+ Text[ japanese ] = "‘I‘ð½À²Ù‚©‚çV‹Kì¬";
+ Text[ chinese_traditional ] = "·s¼Ë¦¡±q¿ï¾Ü";
+ Text[ arabic ] = "äãØ ÌÏíÏ ãä ÇáÊÍÏíÏ";
+ Text[ greek ] = "ÍÝï ðñüôõðï áðü åðéëïãÞ";
+ Text[ korean ] = "¼±Åÿµ¿ªÀÇ »õ À¯Çü";
+ Text[ turkish ] = "Yeni biçim seçimi";
+ };
+ 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 ] = "Päivitä 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 ] = "Biçimi güncelle";
+ };
+ };
+ };
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
new file mode 100644
index 0000000000..450e5f150c
--- /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 0000000000..1290603a7a
--- /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 0000000000..4b20216de8
--- /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 0000000000..ac7b35d548
--- /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 0000000000..659da76934
--- /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 versões" ;
+ 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 sürümler";
+ 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 versión nueva" ;
+ Text [ french ] = "~Enregistrer une nouvelle version" ;
+ Text [ dutch ] = "~Nieuwe versie opslaan" ;
+ Text [ portuguese ] = "~Guardar nova versão" ;
+ Text[ chinese_simplified ] = "±£´æа汾(~S)";
+ Text[ russian ] = "Ñîõðàíèòü íîâóþ âåðñèþ";
+ Text[ polish ] = "Zapisz now¹ wersjê";
+ Text[ japanese ] = "V‚µ‚¢ÊÞ°¼Þ®Ý‚Ì•Û‘¶(~S)";
+ Text[ chinese_traditional ] = "«O¦s·sª©¥»(~S)";
+ Text[ arabic ] = "ÍÝÙ ÇáÅÕÏÇÑ ÇáÌÏíÏ";
+ Text[ greek ] = "ÁðïèÞêåõóç íÝáò Ýêäïóçò";
+ Text[ korean ] = "»õ ¹öÀü ÀúÀå(~N)";
+ Text[ turkish ] = "~Yeni sürümü kaydet";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_SAVEONCLOSE
+ {
+ Pos = MAP_APPFONT ( 131 , 16 ) ;
+ Size = MAP_APPFONT ( 144 , 10 ) ;
+ Text = "~Beim Schließen 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 Schließen immer Version speichern" ;
+ Text [ swedish ] = "~Spara alltid en version vid stängning" ;
+ Text [ danish ] = "Gem version altid ved lukning" ;
+ Text [ italian ] = "~Salva sempre la versione quando chiudi" ;
+ Text [ spanish ] = "Guardar ~versión 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 versão ao fechar" ;
+ Text[ chinese_simplified ] = "ÔڹرÕʱ×ÜÊDZ£´æ°æ±¾ÐÅÏ¢(~A)";
+ Text[ russian ] = "Ïðè çàêðûòèè âñåãäà ñîõðàíÿòü âåðñèþ";
+ Text[ polish ] = "Zawsze zapisuj wersjê przy zamykaniu";
+ Text[ japanese ] = "•Â‚¶‚é‚Æ‚«Aí‚ÉÊÞ°¼Þ®Ý‚Ì•Û‘¶(~A)";
+ Text[ chinese_traditional ] = "¦bÃö³¬®ÉÁ`¬O«O¦sª©¥»¸ê°T(~A)";
+ Text[ arabic ] = "ÍÝÙ ÇáÅÕÏÇÑ ÏÇÆãÇð ÚäÏ ÇáÅÛáÇÞ";
+ Text[ greek ] = "ÊáôÜ ôï êëåßóéìï íá áðïèçêåýåôáé ðÜíôá ç Ýêäïóç";
+ Text[ korean ] = "´ÝÀ» ¶§ Ç×»ó ¹öÀü ÀúÀå(~A)";
+ Text[ turkish ] = "~Kapatýrken daima sürümü 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 ] = "Versões existentes" ;
+ Text[ chinese_simplified ] = "ÏÖ´æµÄ°æ±¾";
+ Text[ russian ] = "Èìåþùàÿñÿ âåðñèÿ";
+ Text[ polish ] = "Istniej¹ce wersje";
+ Text[ japanese ] = "Šù¬‚ÌÊÞ°¼Þ®Ý";
+ Text[ chinese_traditional ] = "²{¦sªºª©¥»";
+ Text[ arabic ] = "ÇáÅÕÏÇÑÇÊ ÇáãæÌæÏÉ";
+ Text[ greek ] = "ÕðÜñ÷ïõóåò åêäüóåéò";
+ Text[ korean ] = "±âÁ¸ ¹öÀü";
+ Text[ turkish ] = "Mevcut sürümler";
+ 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 klokkeslæt" ;
+ 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 ] = "Enregistrée 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 ] = "Comentário" ;
+ Text[ chinese_simplified ] = "×¢½â";
+ Text[ russian ] = "Êîììåíòàðèé";
+ Text[ polish ] = "Komentarz";
+ Text[ japanese ] = "ºÒÝÄ";
+ Text[ chinese_traditional ] = "ª`¸Ñ";
+ Text[ arabic ] = "ÊÚáíÞ";
+ Text[ greek ] = "Ó÷üëéï";
+ Text[ korean ] = "¼³¸í";
+ Text[ turkish ] = "Açýklama";
+ 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 = "Schließen" ;
+ Text [ English ] = "Close" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Close" ;
+ Text [ portuguese_brazilian ] = "Schließen" ;
+ Text [ swedish ] = "Stäng" ;
+ 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 ] = "Otwórz";
+ 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 ] = "~Görüntüle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_DELETE
+ {
+ Pos = MAP_APPFONT ( 284 , 60 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Löschen" ;
+ Text [ English ] = "~Delete" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ portuguese_brazilian ] = "~Löschen" ;
+ 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 ] = "~Jämför" ;
+ 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 ] = "Porów~naj";
+ Text[ japanese ] = "”äŠr";
+ Text[ chinese_traditional ] = "¤ñ¸û";
+ Text[ arabic ] = "ãÞÇÑäÉ";
+ Text[ greek ] = "Óýãêñéóç";
+ Text[ korean ] = "ºñ±³";
+ Text[ turkish ] = "Karþýlaþtýr";
+ Text[ language_user1 ] = " ";
+ };
+ HelpButton PB_HELP
+ {
+ Pos = MAP_APPFONT ( 284 , 97 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Text [ portuguese ] = "Versões 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 sürümler:";
+};
+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 klokkeslæt: " ;
+ 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 = "~Schließen" ;
+ Text [ English ] = "~Close" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Close" ;
+ Text [ portuguese_brazilian ] = "~Schließen" ;
+ Text [ swedish ] = "~Stäng" ;
+ 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 ] = "Indsæt versionskommentar" ;
+ Text [ italian ] = "Inserisci commento versioni" ;
+ Text [ spanish ] = "Escribir comentario sobre la versión" ;
+ Text [ french ] = "Saisie du commentaire de version (facultatif)" ;
+ Text [ dutch ] = "Versiecommentaar invoeren" ;
+ Text [ portuguese ] = "Inserir comentário sobre versão" ;
+ 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 ] = "Sürüm açýklamasý ekle";
+ Text[ language_user1 ] = " ";
+};
+String DLG_COMMENTS
+{
+ Text = "Versionskommentar" ;
+ Text [ English ] = "Version comment" ;
+ Text [ portuguese ] = "Comentário sobre versão" ;
+ Text [ english_us ] = "Version comment" ;
+ Text [ portuguese_brazilian ] = "Versionskommentar" ;
+ Text [ swedish ] = "Versionskommentar" ;
+ Text [ danish ] = "Versionskommentar" ;
+ Text [ italian ] = "Commento versioni" ;
+ Text [ spanish ] = "Comentario sobre la versión" ;
+ 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 ] = "Sürüm açýklamasý";
+ Text[ language_user1 ] = " ";
+};
diff --git a/sfx2/source/doc/doc.hrc b/sfx2/source/doc/doc.hrc
new file mode 100644
index 0000000000..592be95e20
--- /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 0000000000..f54c436fa4
--- /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 schließen?" ;
+ Message [ English ] = "Saving in foreign formats might have caused\nlossage of information. Close anyway?" ;
+ Message [ norwegian ] = "Lagring i ukjent format kan forårsake\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 Informações." ;
+ Message [ portuguese ] = "Ao guardar em formatos estranhos poderá provocar \na perda de informações. Mesmo assim, guardar?" ;
+ Message [ finnish ] = "Tallentaminen vieraaseen muotoon voi\naiheuttaa tietojen katoamista." ;
+ Message [ danish ] = "Lagring i fremmedformater kan have forårsaget\ninformationstab. Vil du lukke alligevel?" ;
+ Message [ french ] = "L'enregistrement dans un format externe peut entraîner\nune perte de certaines informations. Voulez-vous vraiment poursuivre ?" ;
+ Message [ swedish ] = "Sparar Du i ett främmande format kan\ninformation gå förlorad. Stänga ändå?" ;
+ Message [ dutch ] = "Bij het opslaan in een extern formaat kan\ninformatie verloren gegaan zijn. Toch sluiten?" ;
+ Message [ spanish ] = "Al guardar en formatos extraños podría haberse provocado una pérdida\nde información. ¿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\nmo¿e dojœæ do utraty informacji. Mimo to zamkn¹æ?";
+ Message[ japanese ] = "ŠO•”‘Ž®‚Å•Û‘¶‚·‚é‚Æ\nî•ñ‚ªŽ¸‚í‚ê‚é‰Â”\\«‚ª‚ ‚è‚Ü‚·B•Â‚¶‚Ä‚à‚æ‚낵‚¢‚Å‚·‚©?";
+ Message[ chinese_traditional ] = "¦b¤å¥óÀx¦s¦¨¤@­Ó¥~¨Óªº®æ¦¡®É\n¥¼¯à°T®§¥i¯à·|¬y¥¢¡C\nÁÙ¬O­nÃö³¬³o­Ó¤å¥ó¡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ý oluþmuþ 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 käytössä.\nOhitetaanko asiakirjamalli?" ;
+ Message [ danish ] = "Der eksisterer allerede et dokument med dette navn.\nSkal det erstattes?" ;
+ Message [ french ] = "Un modèle de ce nom existe déjà.\nRemplacer le modèle existant ?" ;
+ Message [ swedish ] = "Det finns redan en mall med det här 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.\n¿Desea 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 zast¹piæ innym?";
+ Message[ japanese ] = "‚·‚Å‚É‚±‚Ì–¼‘O‚ÌÃÝÌßÚ°Ä‚ª‚ ‚è‚Ü‚·B\nã‘‚«‚µ‚Ä‚à‚æ‚낵‚¢‚Å‚·‚©?";
+ Message[ chinese_traditional ] = "¤@­Ó¦P¦Wªº¼Ë¦¡¤w¸g¦s¦b¡C\n±z­nÂмg¥¦¡H";
+ 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ý taþýyan bir þablon zaten mevcut.\nBu þablonun üzerine yazýlsýn 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 não 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 utilisés 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.\n¿Desea 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 här dokumentets formatmall stämmer inte överens med den aktuella mallen. Skall Din aktuella mall användas i det här 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Œ»Ý‚̽À²Ù‚ð‚±‚ÌÄÞ·­ÒÝÄ‚É“K—p‚µ‚Ü‚·‚©H";
+ MESSAGE[ chinese_simplified ] = "Õâ¸öÎĵµµÄ¸ñʽÑùʽÒѾ­±»¸ü¸Ä¡£\nÄúÒªÓõ±Ç°µÄÐÂÑùʽÀ´¸²Ð´Õâ¸öÎĵµÂð£¿";
+ MESSAGE[ chinese_traditional ] = "³o­ÓÀɮ׼˦¡¤w¸gÅܧó¡C\n±z­n§ó·s³o­Ó¼Ë¦¡¡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 biçimleri, yürürlükteki biçimlerle örtüþmüyor. Yürürlükteki biçimler bu belgenize uygulansýn mý?";
+ MESSAGE[ language_user1 ] = " ";
+};
+String STR_DELETE_REGION
+{
+ TEXT = "Soll der Bereich \"$1\" gelöscht 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 området \"$1\" raderas?" ;
+ Text [ danish ] = "Er du sikker på, at du vil slette området \"$1\"?" ;
+ Text [ italian ] = "Eliminare la categoria \"$1\"?" ;
+ Text [ spanish ] = "¿Desea eliminar el área \"$1\"?" ;
+ Text [ french ] = "Voulez-vous vraiment supprimer la catégorie $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 ] = "­n§R°£³o­Ó°Ï°ì $1¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ÈÇáÝÚá ÍÐÝ ÇáäØÇÞ \"$1\"¿";
+ Text[ dutch ] = "Wilt u het bereik \"$1\" wissen?";
+ Text[ chinese_simplified ] = "Ҫɾ³ýÇøÓò¡° $1¡± £¿";
+ Text[ greek ] = "ÈÝëåôå óßãïõñá íá äéáãñáöåß ç êáôçãïñßá $1?";
+ Text[ korean ] = "¿µ¿ª$1À» »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "\"$1\" bölümü silinsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String STR_DELETE_TEMPLATE
+{
+ TEXT = "Soll der Eintrag \"$1\" gelöscht 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'entrée $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 ] = "­n§R°£³o­Ó¶µ¥Ø $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\" giriþi silinsin mi?";
+ Text[ language_user1 ] = " ";
+};
+QueryBox MSG_REGION_NOTEMPTY
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ Message = "Der Bereich ist nicht leer.\nTrotzdem löschen?" ;
+ Message [ English ] = "Region not empty.\nDelete anyway?" ;
+ Message [ norwegian ] = "Området er ikke tomt.\nSlett likevel?" ;
+ Message [ italian ] = "L'area non è vuota.\nVolete eliminarla lo stesso?" ;
+ Message [ portuguese_brazilian ] = "Regiao não está vazia.\nApagar de qualquer modo?" ;
+ Message [ portuguese ] = "A categoria não está vazia.\nMesmo assim, eliminar?" ;
+ Message [ finnish ] = "Alue ei ole tyhjä.\nPoistetaanko se silti?" ;
+ Message [ danish ] = "Området er ikke tomt.\nVil du slette alligevel?" ;
+ Message [ french ] = "La catégorie n'est pas vide.\nSupprimer quand même ?" ;
+ Message [ swedish ] = "Området är ej tomt.\nRadera ändå?" ;
+ Message [ dutch ] = "Het bereik is niet leeg.\nToch verwijderen?" ;
+ Message [ spanish ] = "El área no está vacía.\n¿Desea 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ÁÙ¬O­n§R°£¥¦¡H";
+ 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þ deðil.\nYine de silinsin mi?";
+ Message[ language_user1 ] = " ";
+};
+String STR_QUERY_SAVE_DOCUMENT
+{
+ Text = "Das Dokument \"$(DOC)\" wurde geändert.\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 modificações?" ;
+ Text [ portuguese ] = "O documento \"$(DOC)\" foi modificado.\nGuardar modificações?" ;
+ 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 apportées ?" ;
+ 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.\n¿Desea 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)¡¨¤w¸gÅܧó¡C\n­nÀx¦s³o¨ÇÅܧó¡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)\" deðiþtirildi.\nDeðiþiklikler 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 ] = "Biçimler";
+ 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 ] = "Configuração" ;
+ Text [ portuguese ] = "Configuração" ;
+ Text [ finnish ] = "Asetukset" ;
+ Text [ danish ] = "Konfiguration" ;
+ Text [ french ] = "Paramètres" ;
+ Text [ swedish ] = "Konfiguration" ;
+ Text [ dutch ] = "Configuratie" ;
+ Text [ spanish ] = "Configuración" ;
+ Text [ english_us ] = "Configuration" ;
+ Text[ chinese_simplified ] = "ÅäÖÃ";
+ Text[ russian ] = "Êîíôèãóðàöèÿ";
+ Text[ polish ] = "Konfiguracja";
+ Text[ japanese ] = "Ý’è";
+ Text[ chinese_traditional ] = "°t¸m";
+ Text[ arabic ] = "ÇáÊßæíä";
+ Text[ dutch ] = "Configuratie";
+ Text[ chinese_simplified ] = "ÅäÖÃ";
+ Text[ greek ] = "ÐáñÜìåôñïé";
+ Text[ korean ] = "±¸¼º";
+ Text[ turkish ] = "Konfigürasyon";
+ 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 ] = "Biçimler: ";
+ 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 impressão" ;
+ Text [ portuguese ] = "Estilos de impressão" ;
+ 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 impresión" ;
+ Text [ english_us ] = "Printing Styles" ;
+ Text[ chinese_simplified ] = "´òÓ¡¸ñʽÑùʽ";
+ Text[ russian ] = "Ïå÷àòü ñòèëåé ôîðìàòà";
+ Text[ polish ] = "Drukuj style formatu";
+ Text[ japanese ] = "ˆóü‘Ž®½À²Ù";
+ Text[ chinese_traditional ] = "¦C¦L®æ¦¡¼Ë¦¡";
+ Text[ arabic ] = "ØÈÇÚÉ äãÇÐÌ ÇáÊäÓíÞ";
+ Text[ dutch ] = "Opmaakprofielen afdrukken";
+ Text[ chinese_simplified ] = "´òÓ¡¸ñʽÑùʽ";
+ Text[ greek ] = "Åêôýðùóç ðñïôýðùí ìïñöïðïßçóçò";
+ Text[ korean ] = "¼­½Ä À¯ÇüÀ» ÀμâÁß";
+ Text[ turkish ] = "Biçimler yazdýrýlýyor";
+ 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 serviço de impressão não pode ser iniciado." ;
+ Message [ portuguese ] = "Impossível iniciar a impressão." ;
+ Message [ finnish ] = "Tulostustyötä 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 påbörjas." ;
+ Message [ dutch ] = "De afdrukopdracht kan niet worden gestart." ;
+ Message [ spanish ] = "No se pudo inicializar la impresión." ;
+ Message [ english_us ] = "The print job could not be started." ;
+ Message[ chinese_simplified ] = "ÎÞ·¨Æô¶¯´òÓ¡²Ù×÷¡£";
+ Message[ russian ] = "Íå óäàåòñÿ çàïóñòèòü ïðîöåññ ïå÷àòè.";
+ Message[ polish ] = "Zadanie wydruku nie mog³o zostaæ rozpoczête.";
+ Message[ japanese ] = "ˆóüˆ—‚ÍŠJŽn‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Message[ chinese_traditional ] = "µLªk°õ¦æ¦C¦L¾Þ§@¡C";
+ Message[ arabic ] = "áã íãßä ÈÏÁ ÚãáíÉ ÇáØÈÇÚÉ";
+ Message[ dutch ] = "De afdrukopdracht kan niet worden gestart.";
+ Message[ chinese_simplified ] = "ÎÞ·¨Æô¶¯´òÓ¡²Ù×÷¡£";
+ Message[ greek ] = "Äåí Þôáí äõíáôüí íá ãßíåé åêêßíçóç ôçò äéáäéêáóßáò åêôýðùóçò.";
+ Message[ korean ] = "Àμâ ÀÛ¾÷À» ½ÃÀÛÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Message[ turkish ] = "Yazdýrma iþlemi baþlatýlamadý.";
+ Message[ language_user1 ] = " ";
+};
+String STR_BACKUP_COPY
+{
+ Text = " Kopie" ;
+ Text [ English ] = " Copy" ;
+ Text [ norwegian ] = "Kopi" ;
+ Text [ italian ] = "Copia" ;
+ Text [ portuguese_brazilian ] = "Copiar" ;
+ Text [ portuguese ] = "Cópia" ;
+ 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 ] = "Não pude criar cópia em backup." ;
+ Message [ portuguese ] = "Impossível criar cópia de segurança." ;
+ Message [ finnish ] = "Varmistuskopiota ei voi tehdä." ;
+ Message [ danish ] = "Det var ikke muligt at oprette sikkerhedskopi." ;
+ Message [ french ] = "Création de la copie de sauvegarde impossible." ;
+ Message [ swedish ] = "Säkerhetskopia 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 mo¿na by³o utworzyæ.";
+ Message[ japanese ] = "ÊÞ¯¸±¯Ìß ºËß°‚Í쬂ł«‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Message[ chinese_traditional ] = "µLªk«Ø¥ß¦w¥þ³Æ¥ó¡C";
+ Message[ arabic ] = "ÊÚÐÑ Úãá äÓÎÉ ÇÍÊíÇØíÉ.";
+ Message[ dutch ] = "Reservekopie kon niet worden gemaakt.";
+ Message[ chinese_simplified ] = "ÎÞ·¨½¨Á¢°²È«±¸¼þ¡£";
+ Message[ greek ] = "Äåí Þôáí äõíáôüí íá äçìéïõñãçèåß áíôßãñáöï áóöáëåßáò.";
+ Message[ korean ] = "¹é¾÷ º¹»ç¸¦ ÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Message[ turkish ] = "Yedekleme kopyasý oluþturulamadý.";
+ Message[ language_user1 ] = " ";
+};
+InfoBox MSG_CANT_OPEN_TEMPLATE
+{
+ Message = "Die Dokumentvorlage kann nicht geöffnet 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 não pode ser aberto." ;
+ Message [ portuguese ] = "Não é possível 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 modèle 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 mo¿na otworzyæ.";
+ Message[ japanese ] = "ÄÞ·­ÒÝÄ ÃÝÌßÚ°Ä‚ÍŠJ‚­‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB";
+ Message[ chinese_traditional ] = "µLªk¶}±Ò¤å¥ó¼Ë¦¡¡@";
+ Message[ arabic ] = "áÇ íãßä ÝÊÍ ÞÇáÈ ÇáãÓÊäÏ.";
+ Message[ dutch ] = "De documentsjabloon kan niet worden geopend.";
+ Message[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÎļþÑùʽ¡¡";
+ Message[ greek ] = "Äåí Þôáí äõíáôüí íá áíïé÷èåß ôï ðñüôõðï åããñÜöïõ.";
+ Message[ korean ] = "¹®¼­ÀÇ ¼­½Ä ÆÄÀÏÀ» ¿­Áö ¸øÇß½À´Ï´Ù.";
+ Message[ turkish ] = "Belge þablonu açýlamýyor.";
+ Message[ language_user1 ] = " ";
+};
+InfoBox MSG_VIEW_OPEN_CANT_SAVE
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ MESSAGE = "Das Dokument ist bereits zur Bearbeitung geöffnet." ;
+ 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 déjà ouvert pour l'édition." ;
+ MESSAGE [ swedish ] = "Dokumentet är redan öppnat för 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 ] = "ÄÞ·­ÒÝÄ‚Í‚·‚Å‚É•ÒW—p‚ÉŠJ‚©‚ê‚Ä‚¢‚Ü‚·B";
+ MESSAGE[ chinese_traditional ] = "³o­ÓÀɮפw¸g¶}±Ò½s¿è¡C";
+ MESSAGE[ arabic ] = "ÇáãÓÊäÏ ãÝÊæÍ ÈÔßá ãÓÈÞ ááÊÍÑíÑ.";
+ MESSAGE[ dutch ] = "Dit document is reeds geopend.";
+ MESSAGE[ chinese_simplified ] = "Õâ¸öÎļþÒѾ­±»´ò¿ª±à¼­¡£";
+ MESSAGE[ greek ] = "Ôï Ýããñáöï åßíáé Þäç áíïé÷ôü ãéá ôçí åðåîåñãáóßá.";
+ MESSAGE[ korean ] = "¹®¼­°¡ ÆíÁýÀ» À§ÇØ ÀÌ¹Ì ¿­·Á ÀÖ½À´Ï´Ù.";
+ MESSAGE[ turkish ] = "Belge zaten düzenlenmek üzere açýldý.";
+ 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 ] = "B³¹d przy zapisie dokumentu ";
+ Text[ japanese ] = "ÄÞ·­ÒÝĂ̈ړ®‚ÌÛ‚Ì´×° ";
+ Text[ chinese_traditional ] = "¦b¼g¤J¤å¥ó®Éµo¥Í¤@­Ó¿ù»~ ";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ßÊÇÈÉ ÇáãÓÊäÏ ";
+ Text[ dutch ] = "Fout bij schrijven van document ";
+ Text[ chinese_simplified ] = "ÔÚдÈëÎĵµÊ±·¢ÉúÒ»¸ö´íÎó ";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí åããñáöÞ ôïõ åããñÜöïõ ";
+ Text[ korean ] = "¹®¼­ ±â·Ï½Ã ¿À·ù ¹ß»ý. ";
+ Text[ turkish ] = "Belge yazýlýrken hata oluþtu ";
+ 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 ] = "Modèles de document" ;
+ Text [ swedish ] = "Dokumentmallar" ;
+ Text [ dutch ] = "Sjablonen" ;
+ Text [ spanish ] = "Plantillas" ;
+ Text [ english_us ] = "Templates" ;
+ Text[ chinese_simplified ] = "ÎĵµÑùʽ";
+ Text[ russian ] = "Øàáëîíû äîêóìåíòîâ";
+ Text[ polish ] = "Szablony dokumentów";
+ 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É possível 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 modèle \"$1\".\nIl se peut qu'il existe déjà." ;
+ Text [ swedish ] = "Fel vid kopiering av mallen \"$1\".\nEventuellt existerar mallen redan." ;
+ Text [ dutch ] = "Fout bij kopiëren 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 ] = "B³¹d podczas kopiowania szablonu \"$1\".\nSzablon ju¿ byæ mo¿e istnieje.";
+ Text[ japanese ] = "ÃÝÌßÚ°Ä\"$1\"‚ðºËß°‚·‚éÛ‚Ì´×°¡\n‚¨‚»‚ç‚­‚±‚ÌÃÝÌßÚ°Ä‚Í‚·‚Å‚É‚ ‚è‚Ü‚·B";
+ Text[ chinese_traditional ] = "¦b½Æ»s¼Ë¦¡®Éµo¥Í¤@­Ó¿ù»~¡C\n¥i¯à¼Ë¦¡¤w¸g¦s¦b¡C";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ äÓÎ ÇáÞÇáÈ \"$1\".\nãä ÇáãÍÊãá Ãä åÐÇ ÇáÞÇáÈ ãæÌæÏ ÈÇáÝÚá.";
+ Text[ dutch ] = "Fout bij kopiëren van sjabloon \"$1\".\nEventueel bestaat deze reeds.";
+ Text[ chinese_simplified ] = "ÔÚ¸´ÖÆÑùʽ¡°$1¡±Ê±·¢Éú´íÎó¡£\n¿ÉÄÜÑùʽÒѾ­´æÔÚ¡£";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí áíôéãñáöÞ ôïõ ðñïôýðïõ \"$1\". \nºóùò ôï ðñüôõðï áõôü íá õðÜñ÷åé Þäç.";
+ Text[ korean ] = "¼­½ÄÆÄÀÏ\"$1\" º¹»ç ¿À·ù. \nÀÌ ¼­½ÄÆÄÀÏÀÌ ÀÌ¹Ì ÀÖÀ» Áöµµ ¸ð¸¨´Ï´Ù.";
+ Text[ turkish ] = "\"$1\" þablonu kopyalanýrken hata oluþtu.\nBu þablon zaten mevcut olabilir.";
+ Text[ language_user1 ] = " ";
+};
+String STR_ERROR_DELETE_TEMPLATE
+{
+ Text = "Die Vorlage \"$1\" kann nicht gelöscht 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 gelöscht 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 modèle \"$1\"." ;
+ Text [ dutch ] = "De sjabloon \"$1\" kan niet worden gewist." ;
+ Text [ portuguese ] = "Impossível eliminar o modelo \"$1\"." ;
+ Text[ chinese_simplified ] = "ÎÞ·¨É¾³ýÑùʽ¡° $1¡±¡£";
+ Text[ russian ] = "Óäàëèòü øàáëîí \"$1\" íå óäàåòñÿ.";
+ Text[ polish ] = "Szablonu \"$1\" nie mo¿na usun¹æ.";
+ Text[ japanese ] = "ÃÝÌßÚ°Ä\"$1\"‚Í휂ł«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªk§R°£³o­Ó¼Ë¦¡ $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 siirrettäessä mallia \"$1\"." ;
+ Text [ danish ] = "Fejl under flytning af skabelonen \"$1\"." ;
+ Text [ french ] = "Erreur lors du déplacement du modèle \"$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 ] = "B³¹d 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 taþýnýrken hata oluþtu.";
+ 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 atualizações não puderam ser gravadas." ;
+ Message [ portuguese ] = "As actualizações não puderam ser guardadas." ;
+ Message [ finnish ] = "Päivityksiä 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 mog³y zostaæ zapisane.";
+ Message[ japanese ] = "XV‚Í•Û‘¶‚Å‚«‚Ä‚¢‚Ü‚¹‚ñB";
+ Message[ chinese_traditional ] = "µLªkÀx¦s§ó·s¤º®e¡C";
+ Message[ arabic ] = "ÊÚÐÑ ÍÝÙ ÇáÊÍÏíËÇÊ.";
+ Message[ dutch ] = "De wijzigingen kunnen niet worden opgeslagen.";
+ Message[ chinese_simplified ] = "ÎÞ·¨´æÅ̸üС£";
+ Message[ greek ] = "Äåí Þôáí äõíáôüí íá áðïèçêåõôïýí ôá äåäïìÝíá ôùí åíçìåñþóåùí.";
+ Message[ korean ] = "¾÷µ¥ÀÌÆ®¸¦ ÀúÀåÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Message[ turkish ] = "Güncellemeler 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 modèle " ;
+ 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 ] = "B³¹d przy zapisie szablonu ";
+ Text[ japanese ] = "ÃÝÌßڰĂ̈ړ®‚ÌÛ‚Ì´×° ";
+ Text[ chinese_traditional ] = "¦b¼g¤J¼Ë¦¡®Éµo¥Í¤@­Ó¿ù»~ ";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ßÊÇÈÉ ÇáÞÇáÈ ";
+ Text[ dutch ] = "Fout bij schrijven van sjabloon ";
+ Text[ chinese_simplified ] = "ÔÚдÈëÑùʽʱ·¢ÉúÒ»¸ö´íÎó ";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí åããñáöÞ ôïõ ðñïôýðïõ ";
+ Text[ korean ] = "¼­½Ä ÆÄÀÏ ±â·Ï½Ã ¿À·ù ¹ß»ý ";
+ Text[ turkish ] = "Þablon yazýlýrken hata oluþtu ";
+ 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 nimettäessä." ;
+ Message [ danish ] = "Fejl under omdøbning af skabelonen." ;
+ Message [ french ] = "Erreur lors du changement du nom du modèle." ;
+ Message [ swedish ] = "Fel vid namnändring 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 ] = "B³¹d przy zmianie nazwy szablonu.";
+ Message[ japanese ] = "ÃÝÌßÚ°Ä‚Ì–¼‘O•ÏX‚ÌÛ‚Ì´×°¡";
+ Message[ chinese_traditional ] = "­«·s©R¦W¼Ë¦¡®Éµo¥Í¿ù»~¡C";
+ Message[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÅÚÇÏÉ ÊÓãíÉ ÇáÞÇáÈ.";
+ Message[ dutch ] = "Fout bij de naamswijziging van de sjabloon.";
+ Message[ chinese_simplified ] = "ÖØÃüÃûÑùʽʱ·¢Éú´íÎó¡£";
+ Message[ greek ] = "ÓöÜëìá êáôÜ ôçí ìåôïíïìáóßá ôïõ ðñïôýðïõ.";
+ Message[ korean ] = "¼­½Ä ÆÄÀÏ À̸§ º¯°æ½Ã ¿À·ù ¹ß»ý.";
+ Message[ turkish ] = "Þablon yeniden adlandýrýlýrken hata oluþtu.";
+ 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 malområde." ;
+ Message [ italian ] = "Errore durante la rinominazione dell'area." ;
+ Message [ portuguese_brazilian ] = "Erro ao renomear a regiao do modelo." ;
+ Message [ portuguese ] = "Erro ao renomear a região do modelo." ;
+ Message [ finnish ] = "Virhe mallialuetta nimettäessä." ;
+ Message [ danish ] = "Fejl under omdøbning af området." ;
+ Message [ french ] = "Erreur du changement du nom de la catégorie." ;
+ Message [ swedish ] = "Fel vid namnändring på mallområde." ;
+ 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 ] = "B³¹d przy zmianie nazwy obszaru.";
+ Message[ japanese ] = "”͈̖͂¼‘O•ÏX‚ÌÛ‚Ì´×°¡";
+ Message[ chinese_traditional ] = "­«·s©R¦W°Ï°ì®Éµo¥Í¿ù»~¡C";
+ Message[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÅÚÇÏÉ ÊÓãíÉ äØÇÞ ÇáÞÇáÈ.";
+ Message[ dutch ] = "Fout bij de naamsverandering van het bereik.";
+ Message[ chinese_simplified ] = "ÖØÃüÃûÇøÓòʱ·¢Éú´íÎó¡£";
+ Message[ greek ] = "ÓöÜëìá êáôÜ ôçí ìåôïíïìáóßá ôçò êáôçãïñßáò.";
+ Message[ korean ] = "¿µ¿ª À̸§ º¯°æ½Ã ¿À·ù ¹ß»ý.";
+ Message[ turkish ] = "Kategori yeniden adlandýrýlýrken hata oluþtu.";
+ 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 ] = "É necessário 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 måste 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 ] = "–¼‘O‚ðŽw’肵‚ĉº‚³‚¢B";
+ Message[ chinese_traditional ] = "±z¥²¶·¿é¤J¤@­Ó¦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 maiúsculas ou minúsculas podem ser usadas." ;
+ Message [ portuguese ] = "É necessário especificar um nome unívoco.\nNão há distinção entre maiúsculas e minúsculas." ;
+ Message [ finnish ] = "Sinun on annettava yksikäsitteinen nimi.\nIsoilla ja pienillä kirjaimilla ei ole eroa." ;
+ Message [ danish ] = "Du skal angive et entydigt navn.\nDer gøres 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 måste anges.\nDet görs ingen skillnad på små och stora bokstäver." ;
+ 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 mayúsculas y minúsculas." ;
+ 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 rozró¿niania du¿ych i ma³ych liter.";
+ Message[ japanese ] = "–¾Šm‚È–¼‘O‚ðŽw’肵‚ĉº‚³‚¢B\n‘啶Žš‚Ƭ•¶Žš‚Í‹æ•Ê‚³‚ê‚Ü‚¹‚ñB";
+ Message[ chinese_traditional ] = "±z¥²¶·¿é¤J¤@­Ó¥¿½Tªº¦WºÙ¡C\n±z¤£¥²°Ï§O¦r¥À¤j¤p¼g¡C";
+ 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 büyük/küçük harf duyarlý olmamalýdýr.";
+ 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 padrão?" ;
+ TEXT [ finnish ] = "Valitaanko malli \"$(TEXT)\" oletusmalliksi?" ;
+ TEXT [ danish ] = "Vil du definere skabelonen \"$(TEKST)\" som standardskabelon?" ;
+ TEXT [ french ] = "Souhaitez-vous faire du modèle \"$(TEXT)\" le modèle par défaut ?" ;
+ TEXT [ swedish ] = "Skall mallen \"$(TEXT)\" göras 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 przekszta³ciæ \"$(TEXT)\" na szablon domyœlny?";
+ TEXT[ japanese ] = "ÃÝÌßÚ°Ä\"$(TEXT)\"‚ð•W€½À²Ù‚É‚µ‚Ü‚·‚©?";
+ TEXT[ chinese_traditional ] = "­n±N³o­Ó¼Ë¦¡¡§$(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 zurücksetzen?" ;
+ 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 padrão?" ;
+ Message [ portuguese ] = "Deseja redefinir o modelo padrão?" ;
+ Message [ finnish ] = "Haluatko palauttaa oletusmallin?" ;
+ Message [ danish ] = "Vil du nulstille standardskabelonen?" ;
+ Message [ french ] = "Souhaitez-vous restaurer le modèle par défaut ?" ;
+ Message [ swedish ] = "Vill Du återställa 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 domyœlny?";
+ Message[ japanese ] = "•W€½À²Ù‚ðؾ¯Ä‚µ‚Ü‚·‚©?";
+ Message[ chinese_traditional ] = "±z­n­«³]¼Ð·Ç¼Ë¦¡Àɮס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 baþa 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 diretório modelo\n$(DIR)\nnão existe." ;
+ Message [ portuguese ] = "O directório dos modelos\n$(DIR)\nnão existe." ;
+ Message [ finnish ] = "Mallihakemistoa\n$(DIR)\nei ole." ;
+ Message [ danish ] = "Skabelonbiblioteket\n$(DIR)\neksisterer ikke." ;
+ Message [ french ] = "Ce répertoire de modèles\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 stylów \n$(DIR)\nnie istnieje.";
+ Message[ japanese ] = "ÃÝÌßÚ°Ä€–Ú‚Í\n$(DIR)\n‚ ‚è‚Ü‚¹‚ñB";
+ Message[ chinese_traditional ] = "³o­Ó¼Ë¦¡¥Ø¿ý\n$(DIR)\n¤£¦s¦b¡C";
+ 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)\nþablon dizini mevcut deðil.";
+ Message[ language_user1 ] = " ";
+};
+InfoBox MSG_DOCINFO_CANTREAD
+{
+ Message = "Die Dokumenteigenschaften können 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 läsas." ;
+ Message [ danish ] = "Det er ikke muligt at læse dokumentegenskaberne." ;
+ Message [ portuguese ] = "Não é possível ler as propriedades do documento." ;
+ Message [ portuguese_brazilian ] = "Die Dokumenteigenschaften können nicht gelesen werden." ;
+ Message[ chinese_simplified ] = "ÎÞ·¨¶ÁÈ¡ÎĵµÊôÐÔ¡£";
+ Message[ russian ] = "Íå óäàåòñÿ ïðî÷èòàòü ñâîéñòâà äîêóìåíòà";
+ Message[ polish ] = "W³aœciwoœci dokumentu nie mo¿na odczytaæ.";
+ Message[ japanese ] = "ÄÞ·­ÒÝÄ‚Ì‘®«‚Í“Ç‚ÝŽæ‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Message[ chinese_traditional ] = "µLªkŪ¨ú¤å¥óÄÝ©Ê¡C";
+ Message[ arabic ] = "áÇ íãßä ÞÑÇÁÉ ÎÕÇÆÕ ÇáãÓÊäÏ.";
+ Message[ dutch ] = "De documentinformatie kon niet worden gelezen.";
+ Message[ chinese_simplified ] = "ÎÞ·¨¶ÁÈ¡ÎĵµÊôÐÔ¡£";
+ Message[ greek ] = "Äåí åßíáé äõíáôüí íá ãßíåé áíÜãíùóç ôùí éäéïôÞôùí ôïõ åããñÜöïõ.";
+ Message[ korean ] = "¹®¼­ µî·ÏÁ¤º¸¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù.";
+ Message[ turkish ] = "Belge özellikleri okunamýyor.";
+ Message[ language_user1 ] = " ";
+};
+String STR_ERROR_NOSTORAGE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die ausgewählte Datei besitzt ein falsches Format. : Die ausgewõhlte Datei besitzt ein falsches Format. */
+ /* ### ACHTUNG: Neuer Text in Resource? Die ausgewählte Datei besitzt ein falsches Format. : Die ausgewõhlte Datei besitzt ein falsches Format. */
+ Text = "Die ausgewählte 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 sélectionné 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 nieprawid³owy 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 ] = "Seçilen dosyanýn formatý yanlýþ.";
+ Text[ language_user1 ] = " ";
+};
+String STR_QUERY_SAVEOWNFORMAT
+{
+ Text = "Dieses Dokument kann Formatierungen und Informationen\nenthalten, die nicht im $(FORMAT) Format gespeichert\nwerden können. Möchten 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).\n¿Desea guardar los cambios en formato\n$(OWNFORMAT)?" ;
+ Text [ french ] = "Ce document peut contenir des formatages et des informations,\nqui ne peuvent pas être enregistrés au format $(FORMAT).\nSouhaitez-vous enregistrer les modifications au format\n$(OWNFORMAT) ?" ;
+ Text [ swedish ] = "Detta dokument kan innehålla 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 informações que não podem ser guardados no\nformato $(FORMAT). Guardar as modificações no\nformato $(OWNFORMAT)?" ;
+ Text [ portuguese_brazilian ] = "Dieses Dokument kann Formatierungen und Informationen\nenthalten, die nicht im $(FORMAT) Format gespeichert\nwerden können. Möchten Sie die Änderungen im\n$(OWNFORMAT) Format speichern?" ;
+ Text[ chinese_simplified ] = "Õâ¸öÎĵµ¿ÉÄܺ¬ÓÐһЩÎÞ·¨Óà $(FORMAT) ¸ñʽ´æÅ̵ĸñʽºÍÐÅÏ¢¡£\nÄúҪʹÓà $(OWNFORMAT) ¸ñʽ´æÅÌÎĵµµÄ¸ü¸ÄÂð£¿";
+ Text[ russian ] = "Âîçìîæíî, ÷òî â ýòîì äîêóìåíòå ñîäåðæàòñÿ ôîðìàòèðîâàíèÿ è èíôîðìàöèÿ, êîòîðûå íåâîçìîæíî ñîõðàíèòü â ôîðìàòå $(FORMAT). Âû õîòèòå ñîõðàíèòü èçìåíåíèÿ â\nôîðìàòå$(OWNFORMAT)?";
+ Text[ polish ] = "Dokument ten mo¿e zawieraæ formatowania\ni informacje, których nie bêdzie mo¿na zapisaæ\nw formacie $(FORMAT). Czy chcesz zapisaæ\nzmiany w formacie $(OWNFORMAT)?";
+ Text[ japanese ] = "‚±‚ÌÄÞ·­ÒÝÄ‚Í $(FORMAT) ‘Ž®‚Å•Û‘¶‚Å‚«‚È‚¢‘Ž®Ý’è‚Æî•ñ‚ð\nŠÜ‚ñ‚Å‚¢‚Ü‚·B•ÏX‚ð\n$(OWNFORMAT) ‘Ž®‚É•Û‘¶‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "³o­Ó¤å¥ó¥i¯à§t¦³¤@¨ÇµLªk¥Î $(FORMAT) ®æ¦¡Àx¦sªº®æ¦¡¡C\n±z­n¨Ï¥Î $(OWNFORMAT) ®æ¦¡Àx¦s¤å¥óªºÅܧó¡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) formatýnda kaydedilemeyen\n formatlamalar ve bilgiler bulunabilir. Deðiþiklikleri \n$(OWNFORMAT) formatýnda kaydetmek istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+String STR_QUERY_MUSTOWNFORMAT
+{
+ Text = "Dokumente können nicht im $(FORMAT) Format gespeichert\nwerden. Möchten 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).\n¿Desea 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 können nicht im $(FORMAT) Format gespeichert\nwerden. Möchten Sie das Dokument im $(OWNFORMAT) Format\nspeichern?" ;
+ Text [ portuguese ] = "Impossível 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 mo¿na zapisaæ dokumentów w formacie $(FORMAT).\nCzy chcesz zapisaæ dokument\nw formacie $(OWNFORMAT) ?";
+ Text[ japanese ] = "ÄÞ·­ÒÝÄ‚Í $(FORMAT) ‘Ž®‚É\n•Û‘¶‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½BÄÞ·­ÒÝÄ‚ð $(OWNFORMAT) ‘Ž®‚É\n•Û‘¶‚µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "µLªk¥Î $(FORMAT) ®æ¦¡Àx¦s¤å¥ó¡C\n±z­n¨Ï¥Î $(OWNFORMAT) ®æ¦¡Àx¦s¡H";
+ 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) formatýnda kaydedilemiyor\n. Belgeyi $(OWNFORMAT) formatýnda\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 ] = "Àx¦s(~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~zación" ;
+ 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 ] = "Gün~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 ] = "–¼‘O‚ð•t‚¯‚Ä•Û‘¶(~A)...";
+ Text[ chinese_traditional ] = "¥t¦s·sÀÉ(~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 ~cópia como..." ;
+ Text[ chinese_simplified ] = "¸´¼þÁí´æΪ(~A)...";
+ Text[ russian ] = "Ñîõðàíèòü êîïèþ êàê...";
+ Text[ polish ] = "Zapisz kopiê jako...";
+ Text[ japanese ] = "ºËß°‚É–¼‘O‚ð•t‚¯‚Ä•Û‘¶(~A)...";
+ Text[ chinese_traditional ] = "´_¥ó¥t¦s·sÀÉ(~A)...";
+ Text[ arabic ] = "ÍÝÙ ÇáäÓÎÉ ÈÇÓã...";
+ Text[ dutch ] = "~Kopie opslaan als...";
+ Text[ chinese_simplified ] = "¸´¼þÁí´æΪ(~A)...";
+ Text[ greek ] = "ÁðïèÞêåõóç áíôéãñÜöïõ ùò...";
+ Text[ korean ] = "º¹»ç¸¦ ´Ù¸¥ À̸§À¸·Î ÀúÀå(~A)...";
+ Text[ turkish ] = "Kopyasýný farklý ka~ydet...";
+ Text[ language_user1 ] = " ";
+};
+String STR_CLOSEDOC
+{
+ Text = "S~chließen" ;
+ 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~chließen" ;
+ 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~chließen & zurück zu : S~chlie˜en & zur³ck zu */
+ /* ### ACHTUNG: Neuer Text in Resource? S~chließen & zurück zu : S~chlie˜en & zur³ck zu */
+ Text = "S~chließen & zurück 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~chließen & zurück 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 dön ";
+ 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 ] = "Paramètres" ;
+ Text [ swedish ] = "Konfigurationer" ;
+ Text [ danish ] = "Konfigurationer" ;
+ Text [ portuguese_brazilian ] = "Konfigurationen" ;
+ Text [ portuguese ] = "Configurações" ;
+ Text[ chinese_simplified ] = "ÅäÖÃ";
+ Text[ russian ] = "Êîíôèãóðàöèè";
+ Text[ polish ] = "Konfiguracje";
+ Text[ japanese ] = "Ý’è";
+ Text[ chinese_traditional ] = "°t¸m";
+ Text[ arabic ] = "ÊßæíäÇÊ";
+ Text[ dutch ] = "Configuraties";
+ Text[ chinese_simplified ] = "ÅäÖÃ";
+ Text[ greek ] = "Äéáìïñöþóåéò";
+ Text[ korean ] = "±¸¼º";
+ Text[ turkish ] = "Konfigürasyonlar";
+ 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 ] = "Bibilothèques 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 kitaplýklarý";
+ 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)\" ersättas?" ;
+ 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 ] = "Zast¹piæ styl \"$(ARG1)\"?";
+ Text[ japanese ] = "½À²Ù\"$(ARG1)\"‚ð’uŠ·‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "­n´À¥N¼Ë¦¡¡§$(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)\" biçimi baþkasý ile deðiþtirilsin 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 ] = "Indlæser 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 yükleniyor";
+ 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 ] = "Conexión con: $(HOST). Esperando respuesta..." ;
+ Text [ french ] = "Connexion : $(HOST). Attend réponse..." ;
+ Text [ swedish ] = "Ansluter till: $(HOST). Väntar på svar..." ;
+ Text [ danish ] = "Forbindelse til: $(HOST). Venter på svar..." ;
+ Text [ portuguese_brazilian ] = "Verbindung zu: $(HOST). Warten auf Antwort..." ;
+ Text [ portuguese ] = "Ligação com: $(HOST). Esperando resposta..." ;
+ Text[ chinese_simplified ] = "Á¬½Óµ½£º$(HOST)¡£ÕýÔڵȺò´ð¸´...";
+ Text[ russian ] = "Ïîäêëþ÷åíèå ê: $(HOST). Æäèòå îòâåòà...";
+ Text[ polish ] = "Po³¹czenie z: $(HOST). Czekanie na odpowiedŸ...";
+ Text[ japanese ] = "Ú‘±:$(HOST)B‰ž“š‚ð‘Ò‚Á‚Ä‚¢‚Ü‚·...";
+ Text[ chinese_traditional ] = "³s½u¨ì$(HOST)¡C¥¿¦bµ¥­Ôµª´_...";
+ Text[ arabic ] = "ÇáÇÊÕÇá ÈÜ: $(HOST). Ýí ÇäÊÙÇÑ ÇáÑÏ...";
+ Text[ dutch ] = "Verbinding met: $(HOST). Wacht op antwoord...";
+ Text[ chinese_simplified ] = "Á¬½Óµ½£º$(HOST)¡£ÕýÔڵȺò´ð¸´...";
+ Text[ greek ] = "Óýíäåóç ìå: $(HOST). ÐåñéìÝíïíôáò áðÜíôçóç...";
+ Text[ korean ] = "¿¬°á ´ë»ó: $(HOST). ȸ´äÀ» ±â´Ù¸®½Ê½Ã¿À...";
+ Text[ turkish ] = "Baðlanýlan: $(HOST). Yanýt bekleniyor...";
+ Text[ language_user1 ] = " ";
+ };
+ String INET_CONNECT_START
+ {
+ Text = "Geöffnet 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 ] = "Geöffnet 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 ] = "Açýlan: $(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). Leído: $(BYTE)" ;
+ Text [ french ] = "$(TARGET) de $(HOST) transféré. Chargé : $(BYTE)" ;
+ Text [ dutch ] = "Geladen wordt: $(TARGET) van $(HOST). Gelezen: $(BYTE)" ;
+ Text [ swedish ] = "$(TARGET) överförs från $(HOST). Läst: $(BYTE)" ;
+ Text [ danish ] = "Overfører: $(TARGET) fra$(HOST). Indlæst: $(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). Za³adowano: $(BYTE)";
+ Text[ japanese ] = "“]‘—‚·‚é:$(HOST)‚Ì$(TARGET)B “Ç‚ÝŽæ‚è: $(BYTE)";
+ Text[ chinese_traditional ] = "¶Ç»¼¡G$(HOST)ªº$(TARGET)¡C¤w¸g¾\\Ū¡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 ] = "Aktarýlan: $(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 ] = "Déconnecté" ;
+ Text [ swedish ] = "Nedkoppling" ;
+ Text [ danish ] = "Forbindelse afbrudt" ;
+ Text [ portuguese ] = "Ligação cancelada" ;
+ Text [ portuguese_brazilian ] = "Verbindung abgebaut" ;
+ Text[ chinese_simplified ] = "ÒѾ­½áÊøÁ¬½Ó";
+ Text[ russian ] = "Ñâÿçü îòêëþ÷åíà";
+ Text[ polish ] = "Po³¹czenie roz³¹czone";
+ Text[ japanese ] = "Ú‘±‚ª’†Ž~‚³‚ê‚Ü‚µ‚½";
+ Text[ chinese_traditional ] = "¤w¸gµ²§ô³s½u";
+ Text[ arabic ] = "Êã ÞØÚ ÇáÇÊÕÇá";
+ Text[ dutch ] = "Verbinding verbroken";
+ Text[ chinese_simplified ] = "ÒѾ­½áÊøÁ¬½Ó";
+ Text[ greek ] = "Ôåñìáôéóìüò óýíäåóçò";
+ Text[ korean ] = "¿¬°á ÇØÁ¦";
+ Text[ turkish ] = "Baðlantý 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 ] = "Conexión con: $(HOST). Esperando respuesta..." ;
+ Text [ french ] = "Connexion à : $(HOST). Attend réponse..." ;
+ Text [ swedish ] = "Ansluter till: $(HOST). Väntar på svar..." ;
+ Text [ danish ] = "Forbindelse til: $(HOST). Venter på svar..." ;
+ Text [ portuguese_brazilian ] = "Verbindung zu: $(HOST). Warten auf Antwort..." ;
+ Text [ portuguese ] = "Ligação com: $(HOST). Esperando resposta ..." ;
+ Text[ chinese_simplified ] = "Á¬½Ó£º$(HOST)¡£ÕýÔڵȺò´ð¸´...";
+ Text[ russian ] = "Ïîäêëþ÷åíèå ê: $(HOST). Æäèòå îòâåòà...";
+ Text[ polish ] = "Po³¹czenie z: $(HOST). Czekanie na odpowiedŸ...";
+ Text[ japanese ] = "Ú‘±:$(HOST)B‰ž“š‚ð‘Ò‚Á‚Ä‚¢‚Ü‚·...";
+ Text[ chinese_traditional ] = "³s½u¡G$(HOST)¡C¥¿¦bµ¥­Ôµª´_...";
+ Text[ arabic ] = "ÇáÇÊÕÇá ÈÜ: $(HOST). Ýí ÇäÊÙÇÑ ÇáÑÏ...";
+ Text[ dutch ] = "Verbinding met: $(HOST). Wacht op antwoord...";
+ Text[ chinese_simplified ] = "Á¬½Ó£º$(HOST)¡£ÕýÔڵȺò´ð¸´...";
+ Text[ greek ] = "Óýíäåóç ìå: $(HOST). ÐåñéìÝíïíôáò áðÜíôçóç...";
+ Text[ korean ] = "¿¬°á ´ë»ó: $(HOST). ȸ´äÀ» ±â´Ù¸®½Ê½Ã¿À...";
+ Text[ turkish ] = "Baðlanýlan: $(HOST). Yanýt bekleniyor...";
+ Text[ language_user1 ] = " ";
+ };
+ String SVBINDSTATUS_CONNECTING
+ {
+ Text = "Geöffnet 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 ] = "Geöffnet 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 ] = "Açýlan: $(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) Leído: $(BYTE)" ;
+ Text [ french ] = "En cours de transfert : $(TARGET) Lu : $(BYTE)" ;
+ Text [ dutch ] = "Geladen wordt: $(TARGET) Gelezen: $(BYTE)" ;
+ Text [ swedish ] = "Överförs: $(TARGET) Läst: $(BYTE)" ;
+ Text [ danish ] = "Overfører: $(TARGET) Indlæst: $(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) Za³adowano: $(BYTE)";
+ Text[ japanese ] = "“]‘—‚·‚é:$(TARGET) “Ç‚ÝŽæ‚è:$(BYTE)";
+ Text[ chinese_traditional ] = "¶Ç»¼¡G$(TARGET)¤w¸g¾\\Ū¡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 ] = "Aktarýlan: $(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 ] = "Déconnexion connexion" ;
+ Text [ dutch ] = "Verbinding verbroken" ;
+ Text [ swedish ] = "Nedkopplad" ;
+ Text [ danish ] = "Forbindelse afbrudt" ;
+ Text [ portuguese_brazilian ] = "Verbindung abgebaut" ;
+ Text [ portuguese ] = "Ligação cancelada" ;
+ Text[ chinese_simplified ] = "ÒѾ­½áÊøÁ¬½Ó";
+ Text[ russian ] = "Ñâÿçü îòêëþ÷åíà";
+ Text[ polish ] = "Po³¹czenie roz³¹czone";
+ Text[ japanese ] = "Ú‘±‚ª’†Ž~‚³‚ê‚Ü‚µ‚½";
+ Text[ chinese_traditional ] = "¤w¸gµ²§ô³s½u";
+ Text[ arabic ] = "Êã ÞØÚ ÇáÇÊÕÇá";
+ Text[ dutch ] = "Verbinding verbroken";
+ Text[ chinese_simplified ] = "ÒѾ­½áÊøÁ¬½Ó";
+ Text[ greek ] = "Ôåñìáôéóìüò óýíäåóçò";
+ Text[ korean ] = "¿¬°á ÇØÁ¦";
+ Text[ turkish ] = "Baðlantý kesildi";
+ Text[ language_user1 ] = " ";
+ };
+};
+QueryBox MSG_OPEN_READONLY
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_YES ;
+ MESSAGE = "Das Dokument kann nicht zur Bearbeitung geöffnet werden.\nMöchten 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 não pode ser aberto para gravação.\nDeseja abri-lo como só leitura?" ;
+ MESSAGE [ portuguese ] = "Impossível 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 för redigering. \nVill Du öppna det för läsning?" ;
+ MESSAGE [ dutch ] = "Dit document is schrijfbeveiligd.\nWilt u het alleen-lezen?" ;
+ MESSAGE [ spanish ] = "El documento no se puede abrir para editar.\n¿Desea 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 mo¿na otworzyæ do edycji.\nCzy chcesz go otworzyæ do odczytu?";
+ MESSAGE[ japanese ] = "ÄÞ·­ÒÝÄ‚Í•ÒW—p‚ÉŠJ‚­‚±‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB\n“Ç‚ÝŽæ‚è—p‚ÉŠJ‚«‚Ü‚·‚©?";
+ MESSAGE[ chinese_traditional ] = "±z¤£¯à½s¿è³o­ÓÀɮסC\n­n¶}±Ò¾\\Ū¥¦¡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 düzenleme için açýlamýyor.\nBelge okuma için açýlsýn 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 ] = "Düzenle";
+ 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 ] = "~Propriétés ..." ;
+ Text [ dutch ] = "~Eigenschappen ..." ;
+ Text [ portuguese_brazilian ] = "~Eigenschaften ..." ;
+ Text [ portuguese ] = "~Propriedades ..." ;
+ Text[ chinese_simplified ] = "ÊôÐÔ(~I)...";
+ Text[ russian ] = "Ñâîéñòâà ...";
+ Text[ polish ] = "W³aœciwoœci ...";
+ 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 ursprünglichem 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 ursprünglichem 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 ursprünglichem 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 fortsättningsvis användas 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 ubicación original. Una plantilla con el mismo nombre se encontró en \"$(FOUND)\". ¿Desea utilizar esta plantilla al sincronizar en el futuro?" ;
+ Text [ french ] = "Le modèle \"$(TEMPLATE)\" n'a pas été trouvé à son emplacement d'origine. Un modèle du même nom a été détecté sur le chemin \"$(FOUND)\". Voulez-vous que ce modèle soit utilisé à l'avenir en remplacement du modèle 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)\" não foi encontrado no seu lugar original. Já existe um modelo com o mesmo nome em \"$(FOUND)\". Deseja usar este modelo para actualizações 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 u¿yæ w przysz³oœci tego szablonu do aktualizacji?";
+ Text[ japanese ] = "ÃÝÌßÚ°Ä\"$(TEMPLATE)\"‚Í Œ³‚ÌꊂɌ©‚‚©‚è‚Ü‚¹‚ñ‚Å‚µ‚½B“¯‚¶–¼‘O‚ÌÃÝÌßÚ°Ä‚ª \"$(FOUND)\"‚É‚ ‚è‚Ü‚·B‚±‚ÌÃÝÌßÚ°Ä‚ð¡Œã ¼Ý¸Û‚ÉŽg‚¢‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "¨S¦³¦b­ì¨Óªº¦ì¸m§ä¨ì³o­Ó¼Ë¦¡$(TEMPLATE)¡C¦³¤@­Ó¦P¦Wªº¼Ë¦¡¦b $(FOUND) ¡C¤µ«á±z­n¤ñ¸û³o­Ó¼Ë¦¡¡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 asýl yerinde bulunamadý. Ayný adlý þablonun bulunduðu yerin adý: \"$(FOUND)\". Bu þablon gelecekte karþýlaþtýrma için kullanýlsýn 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 sökas nästa gång dokumentet öppnas?" ;
+ Text [ danish ] = "Skabelonen \"$(TEMPLATE)\" blev ikke fundet. Skal der søges efter den igen, næste 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 próxima vez que abra el documento?" ;
+ Text [ french ] = "Le modèle $(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)\" não 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 ] = "µLªk§ä¨ì³o­Ó¼Ë¦¡ $(TEMPLATE) ¡C¤µ«á­nÄ~Äò´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 aransýn 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 ] = "Versión guardada automáticamente" ;
+ Text [ french ] = "Version enregistrée automatiquement" ;
+ Text [ dutch ] = "Automatisch opgeslagen versie" ;
+ Text [ portuguese ] = "Versão guardada automaticamente" ;
+ Text[ chinese_simplified ] = "×Ô¶¯´æÅ̵İ汾";
+ Text[ russian ] = "Àâòîìàòè÷åñêè ñîõðàíåííàÿ âåðñèÿ";
+ Text[ polish ] = "Autoomatycznie zapisana wersja";
+ Text[ japanese ] = "Ž©“®•Û‘¶ÊÞ°¼Þ®Ý";
+ Text[ chinese_traditional ] = "¦Û°ÊÀx¦sªºª©¥»";
+ Text[ arabic ] = "ÅÕÏÇÑ Êã ÍÝÙå ÊáÞÇÆíÇð";
+ Text[ dutch ] = "Automatisch opgeslagen versie";
+ Text[ chinese_simplified ] = "×Ô¶¯´æÅ̵İ汾";
+ Text[ greek ] = "ÁõôïìÜôùò áðïèçêåõìÝíç Ýêäïóç";
+ Text[ korean ] = "ÀÚµ¿ ÀúÀåµÈ ¹öÀü";
+ Text[ turkish ] = "Otomatik kaydedilen sürüm";
+ 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 maître";
+ Text[ spanish ] = "Documento maestro";
+ Text[ italian ] = "Documento master";
+ Text[ danish ] = "Hoveddokument";
+ Text[ swedish ] = "Samlingsdokument";
+ Text[ polish ] = "Dokument g³ówny";
+ 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 cálculo";
+ Text[ russian ] = "Äîêóìåíò ýëåêòðîííîé òàáëèöû";
+ Text[ greek ] = "Êåßìåíï ðßíáêá";
+ Text[ dutch ] = "Werkbladdocument";
+ Text[ french ] = "Classeur";
+ Text[ spanish ] = "Hoja de cálculo";
+ Text[ italian ] = "Foglio elettronico";
+ Text[ danish ] = "Regneark";
+ Text[ swedish ] = "Tabelldokument";
+ Text[ polish ] = "Arkusz kalkulacyjny";
+ Text[ portuguese_brazilian ] = "Spreadsheet";
+ Text[ japanese ] = "•\\ŒvŽZÄÞ·­ÒÝÄ";
+ Text[ korean ] = "Spreadsheet";
+ Text[ chinese_simplified ] = "¹¤×÷±íÎĵµ";
+ Text[ chinese_traditional ] = "¤u§@ªí¤å¥ó";
+ Text[ turkish ] = "Hesap tablosu";
+ Text[ arabic ] = "ãÓÊäÏ ÌÏæá";
+};
+
+String STR_DOCTYPENAME_SI
+{
+ Text = "Präsentation";
+ Text [ ENGLISH ] = "Presentation" ;
+ Text[ english_us ] = "Presentation";
+ Text[ portuguese ] = "Apresentação";
+ Text[ russian ] = "Ïðåçåíòàöèÿ";
+ Text[ greek ] = "Ðáñïõóßáóç";
+ Text[ dutch ] = "Presentatie";
+ Text[ french ] = "Présentation";
+ Text[ spanish ] = "Presentación";
+ Text[ italian ] = "Presentazione";
+ Text[ danish ] = "Præsentation";
+ 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 ] = "¹q¤l¶l¥ó";
+ 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 Datenträger 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'accéder au média 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å tillgång till det aktuella datamediet.";
+ Text[ polish ] = "Nie mo¿na by³o dostaæ siê do aktualnego noœnika danych.";
+ Text[ portuguese_brazilian ] = "It was not posiible to access the media.";
+ Text[ japanese ] = "ÄÞײÌނɱ¸¾½‚Å‚«‚Ü‚¹‚ñ";
+ Text[ korean ] = "ÇöÀç µ¥ÀÌÅÍ ¸Åü¿¡ ¾×¼¼½º°¡ ºÒ°¡´ÉÇÕ´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨¶ÁÈ¡µ±Ç°µÄÈíÅÌ¡£";
+ Text[ chinese_traditional ] = "µLªkŪ¨ú·í«eªº¼ÆÕuºÏ¤ù¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÇáæÕæá Åáì ÇáÞÑÕ ÇáÍÇáí.";
+ Text[ turkish ] = "Kullanýlan veri taþýyýcýsýna eriþim saðlanamadý.";
+};
+
+String STR_PACKNGO_NEWMEDIUM
+{
+ Text = "Legen Sie den nächsten Datenträger ein und betätigen 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 ] = "Insérez le média suivant et cliquez sur OK.";
+ Text[ spanish ] = "Inserte el siguiente medio y pulse el botón Aceptar.";
+ Text[ italian ] = "Inserite il supporto dati successivo, quindi confermate con OK.";
+ Text[ danish ] = "Indsæt det næste datamedie og tryk på OK.";
+ Text[ swedish ] = "Lägg in nästa datamedium och tryck OK.";
+ Text[ polish ] = "Wsuñ nastêpny noœnik danych i naciœnij 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 ] = "½Ð±z©ñ¤J¤U¤@­ÓºÏ¤ù¡AµM¦Z«ö¤@¤U½T©w¡C";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇáÞÑÕ ÇáÊÇáí¡ Ëã ÇáäÞÑ ÝæÞ ÇáÒÑ \"ÍÓäÇð\".";
+ Text[ turkish ] = "Bir sonraki veri taþýyýcýsýný takýp Tamam düðmesine týklayýnýz.";
+};
+
+// ******************************************************************* EOF
+
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
new file mode 100644
index 0000000000..6c87560817
--- /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 0000000000..f69bf1017f
--- /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 0000000000..3b6f30afa5
--- /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 0000000000..6e9190e760
--- /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 0000000000..ac1fa42981
--- /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 0000000000..d987e10ae7
--- /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 0000000000..d5468f6553
--- /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 ] = "Modèles 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 modèle 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 ] = "~Ryhmät" ;
+ Text [ danish ] = "Områder" ;
+ Text [ french ] = "~Catégories" ;
+ 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 modèles" ;
+ 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 ] = "Modèles 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 ] = "~Düzenle";
+ 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 ] = "~Käsittele..." ;
+ Text [ danish ] = "Administrer..." ;
+ Text [ french ] = "~Gérer..." ;
+ Text [ swedish ] = "~Förvalta..." ;
+ Text [ dutch ] = "Be~heren..." ;
+ Text [ spanish ] = "~Administrar..." ;
+ Text [ english_us ] = "~Organizer..." ;
+ Text[ chinese_simplified ] = "¹ÜÀí(~O)...";
+ Text[ russian ] = "Îðãàíèçîâàòü...";
+ Text[ polish ] = "Zarz¹dzaj...";
+ Text[ japanese ] = "ŠÇ—(~O)...";
+ Text[ chinese_traditional ] = "ºÞ²z(~O)...";
+ Text[ arabic ] = "ÇáÅÏÑÇÉ...";
+ Text[ greek ] = "Äéá÷åßñéóç...";
+ Text[ korean ] = "°ü¸®(~O)...";
+ Text[ turkish ] = "Yönet...";
+ 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 0000000000..fadc75ca9c
--- /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 0000000000..caa59dad3a
--- /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 0000000000..e55c8ad0e9
--- /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 0000000000..91c41d2875
--- /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 modèles de documents" ;
+ Text [ swedish ] = "Förvalta 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? Schließen : Schlie˜en */
+ /* ### ACHTUNG: Neuer Text in Resource? Schließen : Schlie˜en */
+ Text = "Schließen" ;
+ 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 ] = "Stäng" ;
+ 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 ] =
+ {
+ < "Modèles 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 dokumentów" ; 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 ] =
+ {
+ < "Modèles 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 dokumentów" ; 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 ] = "V‹Kì¬(~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? ~Löschen : ~L÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ 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 ] = "~Düzenle";
+ 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 modèle..." ;
+ 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 içe 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 modèle..." ;
+ 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 dýþa 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 ] = "¦C¦L(~P)";
+ Text[ arabic ] = "ØÈÇÚÉ";
+ Text[ greek ] = "Åê~ôýðùóç";
+ Text[ korean ] = "Àμâ(~P)";
+ Text[ turkish ] = "~Yazdýr";
+ 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 ] = "~Configuração da impressora..." ;
+ Text [ french ] = "~Paramètres de l'imprimante..." ;
+ Text [ dutch ] = "Printerinstellin~gen..." ;
+ Text [ spanish ] = "~Configuración de la impresora..." ;
+ Text [ danish ] = "Udskriftsindstillin~ger..." ;
+ Text [ swedish ] = "~Skrivarinställningar..." ;
+ Text [ finnish ] = "~Printer Setup..." ;
+ Text [ english_us ] = "Printer Settings..." ;
+ Text[ chinese_simplified ] = "É趨´òÓ¡»ú...";
+ Text[ russian ] = "Íàñòðîéêè ïðèíòåðà...";
+ Text[ polish ] = "Ustawienia drukarki...";
+ Text[ japanese ] = "ÌßØÝÀ‚ÌÝ’è...";
+ Text[ chinese_traditional ] = "³]©w¦Lªí¾÷...";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ ÇáØÇÈÚÉ...";
+ Text[ greek ] = "Ñõèìßóåéò å~êôõðùôÞ...";
+ Text[ korean ] = "ÇÁ¸°ÅÍ ¼³Á¤...";
+ Text[ turkish ] = "Yazýcý 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 ] = "Güncelle";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "ÃüÁî";
+ Text[ russian ] = "Êîìàíäû";
+ Text[ polish ] = "Pole~cenia";
+ Text[ japanese ] = "ºÏÝÄÞ";
+ Text[ chinese_traditional ] = "©R¥O";
+ 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 padrão:" ;
+ Text [ portuguese ] = "Modelo padrão:" ;
+ Text [ finnish ] = "Oletusmalli:" ;
+ Text [ danish ] = "Standardskabelon:" ;
+ Text [ french ] = "Modèle par défaut :" ;
+ Text [ swedish ] = "Standardmall:" ;
+ Text [ dutch ] = "Standaardsjabloon:" ;
+ Text [ spanish ] = "Plantilla estándar:" ;
+ 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 ] = "Zarz¹dzaj szablonami dokumentów";
+ 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 0000000000..6295f0b30c
--- /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 0000000000..be9da34394
--- /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 0000000000..83c5f76517
--- /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 0000000000..3294b4f632
--- /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 0000000000..87686b9779
--- /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 ] = "~Områder" ;
+ Text [ italian ] = "~Categorie" ;
+ Text [ portuguese_brazilian ] = "~Regiões" ;
+ Text [ portuguese ] = "~Categorias" ;
+ Text [ finnish ] = "~Alueet" ;
+ Text [ danish ] = "Områder" ;
+ Text [ french ] = "~Catégories" ;
+ 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 ] = "~Modèles" ;
+ 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? ~Zusätze : ~Zusõtze */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Zusätze : ~Zusõtze */
+ Text = "~Zusätze" ;
+ Text [ ENGLISH ] = "~More" ;
+ Text [ norwegian ] = "~Mer" ;
+ Text [ italian ] = "E~xtra" ;
+ Text [ portuguese_brazilian ] = "~Mais" ;
+ Text [ portuguese ] = "~Outros" ;
+ Text [ finnish ] = "~Enemmän" ;
+ 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 ] = "~Araçlar";
+ 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~håndsvisning" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ portuguese_brazilian ] = "E~xaminar" ;
+ Text [ portuguese ] = "~Previsualização" ;
+ Text [ finnish ] = "~Esikatselu" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ french ] = "~Aperçu" ;
+ Text [ swedish ] = "Förhandsvi~sning" ;
+ Text [ dutch ] = "~Voorbeeld" ;
+ Text [ spanish ] = "Pre~visualización" ;
+ Text [ english_us ] = "Pre~view" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ(~V)";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Po~dgl¹d";
+ 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 ] = "Descripción" ;
+ Text [ french ] = "Description" ;
+ Text [ dutch ] = "Beschrijving" ;
+ Text [ swedish ] = "Beskrivning" ;
+ Text [ danish ] = "Beskrivelse" ;
+ Text [ portuguese_brazilian ] = "Beschreibung" ;
+ Text [ portuguese ] = "Descrição" ;
+ Text[ chinese_simplified ] = "˵Ã÷";
+ Text[ russian ] = "Îïèñàíèå";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "—v–ñ";
+ Text[ chinese_traditional ] = "´y­z";
+ Text[ arabic ] = "ÇáæÕÝ";
+ Text[ greek ] = "ÐåñéãñáöÞ";
+ Text[ korean ] = "¼³¸í";
+ Text[ turkish ] = "Taným";
+ 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 ] = "Título" ;
+ Text [ portuguese ] = "~Título" ;
+ Text [ finnish ] = "Otsikko" ;
+ Text [ danish ] = "Titel" ;
+ Text [ french ] = "~Titre" ;
+ Text [ swedish ] = "~Rubrik" ;
+ Text [ dutch ] = "~Titel" ;
+ Text [ spanish ] = "~Título" ;
+ 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 ] = "~Baþlýk";
+ 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 ] = "¥DÃD";
+ 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~chlüsselworte : S~chl³sselworte */
+ /* ### ACHTUNG: Neuer Text in Resource? S~chlüsselworte : S~chl³sselworte */
+ Text = "S~chlüsselworte" ;
+ Text [ ENGLISH ] = "~Keywords" ;
+ Text [ norwegian ] = "Nøkkelord" ;
+ Text [ italian ] = "Parole chiave" ;
+ Text [ portuguese_brazilian ] = "Palavras-chave" ;
+ Text [ portuguese ] = "~Palavras-chave" ;
+ Text [ finnish ] = "Avainsanat" ;
+ Text [ danish ] = "Nøgleord" ;
+ 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 ] = "S³owa kluczowe";
+ Text[ japanese ] = "·°Ü°ÄÞ(~K)";
+ Text[ chinese_traditional ] = "ÃöÁä¦r(~K)";
+ Text[ arabic ] = "ÇáßáãÇÊ ÇáÃÓÇÓíÉ";
+ Text[ greek ] = "ËÝîåéò-êëåéäéÜ";
+ Text[ korean ] = "Å°¿öµå(~K)";
+ Text[ turkish ] = "A~nahtar sözcükler";
+ 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 ] = "Descrição" ;
+ Text [ portuguese ] = "~Descrição" ;
+ Text [ finnish ] = "Kuvaus" ;
+ Text [ danish ] = "Beskrivelse" ;
+ Text [ french ] = "~Description" ;
+ Text [ swedish ] = "B~eskrivning" ;
+ Text [ dutch ] = "Be~schrijving" ;
+ Text [ spanish ] = "~Descripción" ;
+ Text [ english_us ] = "~Description" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "˵Ã÷(~D)";
+ Text[ russian ] = "Îïèñàíèå";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "—v–ñ(~D)";
+ Text[ chinese_traditional ] = "´y­z(~D)";
+ Text[ arabic ] = "ÇáæÕÝ";
+ Text[ greek ] = "ÐåñéãñáöÞ";
+ Text[ korean ] = "¼³¸í(~D)";
+ Text[ turkish ] = "~Taným";
+ 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 ] = "V‹Kì¬";
+ 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 0000000000..f798e0257c
--- /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 0000000000..653f7e2874
--- /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 0000000000..a79f5e0367
--- /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 0000000000..ac3a47b470
--- /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 anschließend 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 0000000000..fde6976511
--- /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 0000000000..2761efeec7
--- /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 0000000000..f7c967b744
--- /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 0000000000..8eb0e6d99e
--- /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 unterstützt!
+ // 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 unterstützt!
+// 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 unterstützt!
+// 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 unterstützt!
+// 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 unterstützt!
+// 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 unterstützt!
+// 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 unterstützt!
+// 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 unterstützt!
+// 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 unterstützt!
+// 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 unterstützt!
+// 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 unterstützt!
+// 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 unterstützt!
+// 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 unterstützt!
+// 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 0000000000..11943408a7
--- /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 0000000000..7b223285f3
--- /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 0000000000..d14ba75b2c
--- /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 0000000000..2eca845b99
--- /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 0000000000..90ec76b904
--- /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 0000000000..21dfad8deb
--- /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 0000000000..adf15074ac
--- /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 0000000000..4217c4e1fb
--- /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 0000000000..fccd5104b5
--- /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 0000000000..f65837e7de
--- /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 0000000000..cd914b4aeb
--- /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 0000000000..b61dd4cf50
--- /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 0000000000..46dfa9cbea
--- /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 0000000000..66f8fb0e7f
--- /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 0000000000..d06bb4bb1e
--- /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 0000000000..1623608864
--- /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 0000000000..57cf0b7d5d
--- /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 0000000000..6161ac3722
--- /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 0000000000..b73aa1e1a4
--- /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 0000000000..0b189626e5
--- /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 0000000000..e5d8e6d47b
--- /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 0000000000..62e988aece
--- /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 0000000000..f31d49e8a5
--- /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 0000000000..068e0285d5
--- /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 0000000000..51410d917b
--- /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 0000000000..ac7f4b27a2
--- /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 0000000000..b64c778fd9
--- /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 0000000000..6252c550e1
--- /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 0000000000..81055cc96f
--- /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 0000000000..521fc35306
--- /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 0000000000..42308d400e
--- /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 0000000000..7c2d1e515a
--- /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 0000000000..483b504f68
--- /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 0000000000..2f6caa0834
--- /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 ergänzt 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 0000000000..1eaf30fdcf
--- /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 0000000000..cdd44c5d0c
--- /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 0000000000..601d04a2d0
--- /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 0000000000..8540af820d
--- /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 Configuração" ;
+ TEXT [ portuguese ] = "Menu de configuração" ;
+ TEXT [ finnish ] = "Määritysvalikko" ;
+ 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 ] = "Mönü";
+};
+
+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 ] = "~Kopiëren" ;
+ 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 ] = "~Kopiëren";
+ Text[ chinese_simplified ] = "¸´ÖÆ";
+ Text[ greek ] = "Áíôé~ãñáöÞ";
+ Text[ korean ] = "º¹»ç(~C)";
+ Text[ turkish ] = "Kopyala";
+ };
+ MenuItem
+ {
+ Identifier = SID_PASTE ;
+ HelpID = SID_PASTE ;
+ Text = "E~infügen" ;
+ Text [ English ] = "~Paste" ;
+ Text [ norwegian ] = "~Paste" ;
+ Text [ italian ] = "~Incolla" ;
+ Text [ portuguese_brazilian ] = "~Colar" ;
+ Text [ portuguese ] = "Co~lar" ;
+ Text [ finnish ] = "L~iitä" ;
+ Text [ danish ] = "Sæt 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 ] = "Yapýþtýr";
+ };
+ };
+};
+
+#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 0000000000..8f6845e4be
--- /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 0000000000..b0e9579d16
--- /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 0000000000..96136c7812
--- /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 0000000000..ceeb8f3e73
--- /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 0000000000..aa6a60d76e
--- /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 0000000000..e3dca5e8ed
--- /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 0000000000..311747a217
--- /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 0000000000..964c184341
--- /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 0000000000..4d4068ca90
--- /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 0000000000..1db17e38db
--- /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 0000000000..fba7e3b555
--- /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 0000000000..bbf51e7dfd
--- /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 0000000000..3080f580f4
--- /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 Abräumen 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 0000000000..8a04a097f2
--- /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 0000000000..57aaf76b23
--- /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 0000000000..11225793ce
--- /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 0000000000..59773abd0a
--- /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 0000000000..9cc236f5a8
--- /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 0000000000..a2896ac122
--- /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 0000000000..64394b4b7b
--- /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 0000000000..7271e772af
--- /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 0000000000..2be07bf5e6
--- /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 0000000000..9b1d46a335
--- /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 0000000000..f1e814e652
--- /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 wählen 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 prøv 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 padrão encontrada.\nEscolha uma impressora e tente novamente." ;
+ TEXT [ finnish ] = "Oletuskirjoitinta ei löydy.\nValitse kirjoitin ja yritä uudelleen." ;
+ TEXT [ danish ] = "Der blev ikke fundet nogen standardprinter.\nVælg venligst en printer og prøv igen." ;
+ TEXT [ french ] = "Impossible de détecter l'imprimante par défaut.\nVeuillez sélectionner une imprimante et recommencer." ;
+ TEXT [ swedish ] = "Ingen standardskrivare hittades.\nVälj en skrivare och försök 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 inténtelo 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 domyœlnej.\nProszê wybraæ drukarkê i spróbowaæ jeszcze raz.";
+ TEXT[ japanese ] = "•W€ÌßØÝÀ‚ªŒ©‚‚©‚è‚Ü‚¹‚ñ‚Å‚µ‚½B\nÌßØÝÀ‚ð‘I‘ð‚µ Ä“xŽŽ‚Ý‚Ä‚­‚¾‚³‚¢B";
+ TEXT[ chinese_traditional ] = "¨S¦³§ä¨ìÀq»{¦Lªí¾÷¡C\n½Ð¿ï¾Ü¤@­Ó¦Lªí¾÷¡MµM«á¦A­«¸Õ¦C¦L¡C";
+ TEXT[ language_user1 ] = " ";
+ TEXT[ greek ] = "Äåí âñÝèçêå ðñïåðéëåãìÝíïò åêôõðùôÞò.\nÐáñáêáëþ åðéëÝîôå Ýíáí åêôõðùôÞ êáé îáíáðñïóðáèÞóôå.";
+ TEXT[ korean ] = "±âº» ÇÁ¸°Å͸¦ ãÁö ¸øÇß½À´Ï´Ù. \nÇÁ¸°Å͸¦ ¼±ÅÃÇÏ¿© Àç½ÃµµÇϽʽÿÀ.";
+ TEXT[ arabic ] = "áã íÊã ÇáÚËæÑ Úáì ØÇÈÚÉ ÞíÇÓíÉ. ãä ÝÖáß ÇÎÊÑ ØÇÈÚÉ Ëã ÍÇæá ãÑÉ ÃÎÑì";
+ TEXT[ turkish ] = "Standart yazýcý bulunamadý.\nBir yazýcý seçip yeniden deneyin.";
+};
+String STR_NOSTARTPRINTER
+{
+ TEXT = "Der Drucker konnte nicht gestartet werden.\nBitte überprüfen 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 ] = "Não consegui iniciar a impressora.\nVerifique a configuração da impressora." ;
+ TEXT [ portuguese ] = "Foi impossível iniciar a impressora.\nPor favor, verifique a configuração da impressora." ;
+ TEXT [ finnish ] = "Kirjoitinta ei voi käynnistää.\nTarkista kirjoittimen asetukset." ;
+ TEXT [ danish ] = "Det var ikke muligt at starte printeren.\nKontroller venligst din printerkonfiguration." ;
+ TEXT [ french ] = "Démarrage de l'imprimante impossible.\nVeuillez contrôler 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 configuración 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 mo¿na by³o uruchomiæ.\nSprawdŸ proszê konfiguracjê drukarki.";
+ TEXT[ japanese ] = "ÌßØÝÀ‚͈óüŠJŽn‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B\nÕ°»Þ°‚ÌÌßØÝÀÝ’è‚ðÁª¯¸‚µ‚ĉº‚³‚¢B";
+ TEXT[ chinese_traditional ] = "µLªk±Ò°Ê¦Lªí¾÷¡C\n½ÐÀˬd¦Lªí¾÷ªº°t¸m¡C";
+ TEXT[ greek ] = "Äåí Þôáí äõíáôüí íá ôåèåß óå ëåéôïõñãßá ï åêôõðùôÞò.\nÐáñáêáëþ åëÝãîôå ôéò ñõèìßóåéò ôïõ.";
+ TEXT[ korean ] = "ÇÁ¸°ÅÍ°¡ ½Ãµ¿µÇÁö ¸øÇß½À´Ï´Ù.\nÇÁ¸°Åͱ¸¼ºÀ» °ËÅäÇØ º¸½Ê½Ã¿À.";
+ TEXT[ arabic ] = "ÊÚÐÑ ÊÔÛíá ÇáØÇÈÚÉ. ÇáÑÌÇÁ ÝÍÕ\nÊßæíä ÇáØÇÈÚÉ.";
+ TEXT[ turkish ] = "Yazýcý çalýþtýrýlamadý.\nYazýcý konfigürasyonunu kontrol edin.";
+ TEXT[ language_user1 ] = " ";
+};
+String STR_PRINTER_NOTAVAIL
+{
+ TEXT = "Das Dokument wurde für 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 não está disponível.\nUsar a impressora padrão $2?" ;
+ TEXT [ finnish ] = "Tämä asiakirja on aiemmin muotoiltu kirjoittimelle " ;
+ TEXT [ danish ] = "Dette dokument er formateret til printeren $1. Denne printer er ikke tilgængelig.\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 défaut ?" ;
+ TEXT [ swedish ] = "Dokumentet har formaterats för skrivaren $1. Denna skrivare är inte tillgänglig.\nSkall standardskrivaren $2 användas?" ;
+ 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.\n¿Desea 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.\nU¿yæ drukarki domyœlnej $2?";
+ TEXT[ japanese ] = "ÄÞ·­ÒÝÄ‚ÍÌßØÝÀ $1—p‚É‘Ž®Ý’肳‚ê‚Ü‚µ‚½BÌßØÝÀ‚Í‚ ‚è‚Ü‚¹‚ñB\n•W€ÌßØÝÀ $2‚ðŽg—p‚µ‚Ä‚à‚æ‚낵‚¢‚Å‚µ‚傤‚©?";
+ TEXT[ chinese_traditional ] = "³o­Ó¤å¥ó®æ¦¡¬O±Mªù¬°¦Lªí¾÷ $1 ³]©wªº¡C\n¦ý¬O³o­Ó¦Lªí¾÷¤£¦s¦b¡C±z­n¨Ï¥ÎÀq»{¦Lªí¾÷ $2 ¡H";
+ TEXT[ greek ] = "Ôï Ýããñáöï Ý÷åé äéáìïñöùðïéçèåß ãéá ôïí åêôõðùôÞ $1. Ï åêôõðùôÞò áõôüò äåí åßíáé \näéáèÝóéìïò. Íá ÷ñçóéìïðïéçèåß ï ðñïåðéëåãìÝíïò åêôõðùôÞò $2 ;";
+ TEXT[ korean ] = "ÀÌ ¹®¼­´Â ÇÁ¸°ÅÍ$1¿ëÀ¸·Î Æ÷¸ËµÇ¾ú½À´Ï´Ù. ÁöÁ¤µÈ ÇÁ¸°ÅÍ°¡ ¾ø½À´Ï´Ù. \n±âº» ÇÁ¸°ÅÍ$2¸¦ »ç¿ëÇϽðڽÀ´Ï±î?";
+ TEXT[ arabic ] = "Êã ÊäÓíÞ ÇáãÓÊäÏ ááØÇÈÚÉ $1. ÅáÇ Ãä åÐå ÇáØÇÈÚÉ ÛíÑ ãæÌæÏÉ.\nåá ÊÑíÏ ÇÓÊÎÏÇã ÇáØÇÈÚÉ ÇáÇÝÊÑÇÖíÉ $2¿";
+ TEXT[ turkish ] = "Belge, $1 yazýcýsý için formatlandý. Belirtilen yazýcý bulunamadý.\nStandart yazýcý $2 kullanýlsýn 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 ] = "·s¹q¤l¶l¥ó(~M)";
+ Text[ greek ] = "Äçìéïõñãßá ìçíýìáôïò";
+ Text[ korean ] = "»õ ¸ÞÀÏ(~M)";
+ Text[ arabic ] = "ÑÓÇáÉ ÌÏíÏÉ";
+ Text[ turkish ] = "Y~eni ileti";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_OPTIONS
+{
+ Text = "Zusätze..." ;
+ Text [ ENGLISH ] = "Options..." ;
+ Text [ norwegian ] = "Valg..." ;
+ Text [ italian ] = "Opzioni..." ;
+ Text [ portuguese_brazilian ] = "Opções..." ;
+ Text [ portuguese ] = "Opções..." ;
+ Text [ finnish ] = "Määritykset..." ;
+ 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 ] = "Seçenekler...";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_OPTIONS_TITLE
+{
+ Text = "Drucker Zusätze" ;
+ Text [ ENGLISH ] = "Printer Options" ;
+ Text [ norwegian ] = "Skriveralternativer" ;
+ Text [ italian ] = "Opzioni stampante" ;
+ Text [ portuguese_brazilian ] = "Opções de Impressora" ;
+ Text [ portuguese ] = "Opções de impressão" ;
+ Text [ finnish ] = "Kirjoittimen asetukset" ;
+ Text [ danish ] = "Printerindstillinger" ;
+ Text [ french ] = "Options d'impression" ;
+ Text [ swedish ] = "Skrivaralternativ" ;
+ Text [ dutch ] = "Printeropties" ;
+ Text [ spanish ] = "Opciones de impresión" ;
+ 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 ] = "Yazýcý seçenekleri";
+ 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 occupée" ;
+ 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 ] = "¦Lªí¾÷¤w¸g¹B§@";
+ Text[ greek ] = "Ï åêôõðùôÞò åßíáé áðáó÷ïëçìÝíïò";
+ Text[ korean ] = "ÇÁ¸°ÅÍ ÀÌ¹Ì ÀÛµ¿Áß";
+ Text[ arabic ] = "ÇáØÇÈÚÉ ãÔÛæáÉ ÍÇáíÇ";
+ Text[ turkish ] = "Yazýcý þu an kullanýlýyor";
+ 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 ] = "B³¹d podczas drukowania";
+ Text[ japanese ] = "ˆóü’†‚É´×°‚ª”­¶‚µ‚Ü‚µ‚½B";
+ Text[ chinese_traditional ] = "¦C¦L¿ù»~";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí åêôýðùóç";
+ Text[ korean ] = "Àμâ½Ã ¿À·ù ¹ß»ý";
+ Text[ arabic ] = "ÎØà ÃËäÇÁ ÇáØÈÇÚÉ";
+ Text[ turkish ] = "Yazdýrma hatasý";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINTING
+{
+ Text = "Drucke" ;
+ Text [ ENGLISH ] = "Printing" ;
+ Text [ norwegian ] = "Printing" ;
+ Text [ italian ] = "Stampa" ;
+ Text [ portuguese_brazilian ] = "Impressão" ;
+ 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 ] = "¥¿¦b¦C¦L";
+ Text[ greek ] = "Åêôýðùóç";
+ Text[ korean ] = "Àμâ";
+ Text[ arabic ] = "ØÈÇÚÉ";
+ Text[ turkish ] = "Yazdýr";
+ Text[ language_user1 ] = " ";
+};
+String STR_PAGE
+{
+ Text = "Seite " ;
+ Text [ English ] = "Page " ;
+ Text [ norwegian ] = "Side " ;
+ Text [ italian ] = "Pagina " ;
+ Text [ portuguese_brazilian ] = "Página " ;
+ Text [ portuguese ] = "Página " ;
+ Text [ finnish ] = "Sivu " ;
+ Text [ danish ] = "Side " ;
+ Text [ french ] = "Page " ;
+ Text [ swedish ] = "Sida " ;
+ Text [ dutch ] = "Pagina " ;
+ Text [ spanish ] = "Página " ;
+ 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 ] = "Fenêtre MDI" ;
+ Text [ swedish ] = "MDI-fönster" ;
+ 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 modèle " ;
+ 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 ] = "B³¹d przy zapisywaniu szablonu ";
+ Text[ japanese ] = "ÃÝÌßÚ°Ä‚Ì‘‚«ž‚ÝŽž‚Ì´×° ";
+ Text[ chinese_traditional ] = "¼g¤J¼Ë¦¡®Éµo¥Í¤@­Ó¿ù»~ ";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí åããñáöÞ ôïõ ðñïôýðïõ ";
+ Text[ korean ] = "¼­½ÄÆÄÀÏ ¾²±â¿¡ ¿À·ù ¹ß»ý ";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ßÊÇÈÉ ÇáÞÇáÈ ";
+ Text[ turkish ] = "Þablon hazýrlamada hata ";
+ Text[ language_user1 ] = " ";
+};
+String STR_READONLY
+{
+ Text = " (schreibgeschützt)" ;
+ 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 geändert.\nSollen die geänderten Einstellungen in das Dokument\nübernommen 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-oriëntatie 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 orientación de la página ha sido modificada.\n¿Desea aplicar las modificaciones al documento\n actual?" ;
+ Text [ french ] = "Vous avez modifié l'orientation de page.\nVoulez-vous enregistrer\n les modifications de paramètres pour le document ?" ;
+ Text [ swedish ] = "Du har ändrat inställningen av sidorienteringen.\nSka de ändrade inställningarna\növertas till dokumentet?" ;
+ Text [ danish ] = "Indstillingerne for sideretningen er blevet ændret.\nSkal ændringerne overtages i dokumentet?" ;
+ Text [ portuguese_brazilian ] = "Sie haben die Seitenorientierungseinstellung geändert.\nSollen die geänderten Einstellungen in das Dokument\nübernommen werden?" ;
+ Text [ portuguese ] = "Você modificou a orientação da página.\nDeseja aplicar as novas definições\nao documento activo?" ;
+ Text[ chinese_simplified ] = "Äú¸ü¸ÄÁËÒ³ÃæÉ趨¡£\nÕâ¸öÎĵµÒª½ÓÊÕ¸ü¸ÄµÄÉ趨Âð£¿";
+ Text[ russian ] = "Âû èçìåíèëè óñòàíîâêó îðèåíòàöèè ñòðàíèöû.\nÑîõðàíèòü ýòè èçìåíèÿ\nâ òåêóùåì äîêóìåíòå?";
+ Text[ polish ] = "Zmieni³eœ ustawienia strony.\nCzy te zmienione ustawienia maj¹ zostaæ \nzapisane w dokumencie?";
+ Text[ japanese ] = "Íß°¼Þ•ûŒü‚Ìݒ肪•ÏX‚³‚ê‚Ä‚¢‚Ü‚·B\n•ÏX‚³‚ꂽݒè‚ðŒ»Ý‚ÌÄÞ·­ÒÝÄ‚É\n“K—p‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "±z§ó§ï¤F­¶­±³]©w¡C\n³o­Ó¤åÀÉ­n±µ¦¬§ó§ïªº³]©w¶Ü¡S";
+ Text[ greek ] = "¸÷åôå áëëÜîåé ôçí ñýèìéóç ãéá ôïí ðñïóáíáôïëéóìü ôçò óåëßäáò.\nÈÝëåôå íá åöáñìïóôïýí ïé áëëáãÝò \nóôï êåßìåíï;";
+ Text[ korean ] = "ÆäÀÌÁö ¹æÇâ¼³Á¤ÀÌ º¯°æµÇ¾ú½À´Ï´Ù.\nº¯°æµÈ ¼³Á¤À» ¹®¼­¿¡ Àû¿ëÇϽðڽÀ´Ï±î?";
+ Text[ arabic ] = "áÞÏ ÞãÊ ÈÊÛííÑ ÅÚÏÇÏÇÊ ÇÊÌÇå ÇáÕÝÍÉ.\nåá ÊÑíÏ ÊØÈíÞ ÇáÅÚÏÇÏÇÊ ÇáÌÏíÏÉ\nÚáì ÇáãÓÊäÏ¿";
+ Text[ turkish ] = "Sayfa duruþ ayarýný deðiþtirdiniz.\nDeðiþtirilen ayar\nbelgede kullanýlsýn mý?";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_NEWSIZE
+{
+ Text = "Sie haben die Seitengröße geändert.\nSollen die geänderten 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 tamaño de la página se ha modificado.\n¿Desea aplicar las modificaciones al documento\nactual?" ;
+ Text [ french ] = "Vous avez modifié le format de la page.\nVoulez-vous enregistrer les paramètres modifiés 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 inställningarna\növertas till dokumentet?" ;
+ Text [ danish ] = "Sidestørrelsen er blevet ændret.\nSkal ændringerne overtages i dokumentet?" ;
+ Text [ portuguese_brazilian ] = "Sie haben die Seitengröße geändert.\nSollen die geänderten Einstellungen in das\nDokument übernommen werden?" ;
+ Text [ portuguese ] = "Você modificou o tamanho da página.\n Deseja aplicar as novas definições \nao documento activo?" ;
+ Text[ chinese_simplified ] = "ÄúÒѾ­¸ü¸ÄÒ³Ãæ´óС¡£\nÄúµÄÎĵµÒª²ÉÓÃÕâ¸öÉ趨Âð£¿";
+ Text[ russian ] = "Âû èçìåíèëè ðàçìåð ñòðàíèöû.\nÑîõðàíèòü ýòè èçìåíåíèÿ\nâ òåêóùåì äîêóìåíòå?";
+ Text[ polish ] = "Zmieni³eœ rozmiar strony. \nCzy zmiany maj¹ zostaæ zapisane \nw aktywnym dokumencie?";
+ Text[ japanese ] = "Íß°¼Þ »²½Þ‚ª•ÏX‚³‚ê‚Ä‚¢‚Ü‚·B\n•ÏX‚³‚ꂽݒè‚ðŒ»Ý‚ÌÄÞ·­ÒÝÄ‚É\n“K—p‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "±z¤w¸g§ó§ï­¶­±¤j¤p¡C\n±zªº¤å¥ó­n±Ä¥Î³o­Ó³]©w¡H";
+ Text[ greek ] = "ÁëëÜîáôå ôï ìÝãåèïò ôçò óåëßäáò.\nÈÝëåôå íá åöáñìïóôåß áõôÞ ç áëëáãÞ\nóôï Ýããñáöï;";
+ Text[ korean ] = "ÆäÀÌÁö Å©±â°¡ º¯°æµÇ¾ú½À´Ï´Ù.\nº¯°æµÈ ¼³Á¤À» ¹®¼­¿¡ Àû¿ëÇϽðڽÀ´Ï±î?";
+ Text[ arabic ] = "áÞÏ ÞãÊ ÈÊÛííÑ ÍÌã ÇáÕÝÍÉ.\nåá ÊÑíÏ ÊØÈíÞ ÇáÅÚÏÇÏÇÊ ÇáÌÏíÏÉ Úáì ÇáãÓÊäÏ¿";
+ Text[ turkish ] = "Sayfa boyutunu deðiþtirdiniz.\nDeðiþtirilen ayarlar\nbelgede kullanýlsýn mý?";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_NEWORISIZE
+{
+ Text = "Sie haben die Seitengröße und die\nSeitenorientierung geändert. Sollen\ndie geänderten 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-oriëntering 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 tamaño y orientación de la página 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 paramètres modifiés\n dans le \ndocument?" ;
+ Text [ swedish ] = "Du har ändrat sidstorleken och\nsidorienteringen.Ska\nde ändrade inställningarna övertas\ntill dokumentet?" ;
+ Text [ danish ] = "Sidestørrelsen og sideretningen er blevet ændret.\nSkal ændringerne overtages i dokumentet?" ;
+ Text [ portuguese_brazilian ] = "Sie haben die Seitengröße und die\nSeitenorientierung geändert. Sollen\ndie geänderten Einstellungen in das\nDokument übernommen werden?" ;
+ Text [ portuguese ] = "Você modificou o tamanho e a orientação da página.\n Deseja aplicar as novas definições\nao documento activo?" ;
+ Text[ chinese_simplified ] = "ÄúÒѾ­¸ü¸ÄÒ³Ãæ´óСºÍÒ³Ãæ·½Ïò¡£\nÄúµÄÎĵµÒª²ÉÓÃÕâЩ¸ü¸ÄÂð£¿";
+ Text[ russian ] = "Âû èçìåíèëè ðàçìåð è îðèåíòàöèþ ñòðàíèöû\n. Ñîõðàíèòü\nýòè èçìåíåíèÿ â\nòåêóùåì äîêóìåíòå?";
+ Text[ polish ] = "Zmieni³eœ rozmiar strony i \norientacjê strony. Czy nowe ustawienia \nmaj¹ zostaæ zapisane \nw aktywnym dokumencie?";
+ Text[ japanese ] = "Íß°¼Þ »²½Þ‚Æ\nÍß°¼Þ•ûŒü‚ª•ÏX‚³‚ê‚Ä‚¢‚Ü‚·¡\n•ÏX‚³‚ꂽݒè‚ðŒ»Ý‚ÌÄÞ·­ÒÝÄ‚É\n“K—p‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "±z¤w¸gÅܧ󭶭±¤j¤p©M­¶­±¤è¦V¡C\n±zªº¤å¥ó­n±Ä¥Î³o¨ÇÅܧó¡H";
+ Text[ greek ] = "¸÷åôå áëëÜîåé ôï ìÝãåèïò ôçò óåëßäáò\nêáé ôïí ðñïóáíáôïëéóìü ôçò óåëßäáò.\nÈÝëåôå íá åöáñìïóôïýí ïé áëëáãÝò \nóôï êåßìåíï;";
+ Text[ korean ] = "ÆäÀÌÁö Å©±â¿Í \nÆäÀÌÁö ¹æÇâÀÌ º¯°æµÇ¾ú½À´Ï´Ù. º¯°æµÈ ¼³Á¤À» ¹®¼­¿¡ Àû¿ëÇϽðڽÀ´Ï±î?";
+ Text[ arabic ] = "áÞÏ ÞãÊ ÈÊÛííÑ ÍÌã ÇáÕÝÍÉ æÇÊÌÇååÇ.\nåá ÊÑíÏ ÊØÈíÞ ÇáÅÚÏÇÏÇÊ ÇáÌÏíÏÉ Úáì ÇáãÓÊäÏ¿";
+ Text[ turkish ] = "Sayfa boyutunu ve sayfa duruþunu deðiþtirdiniz. Deðiþtirilen\n ayarlar\nbelgede kullanýlsýn 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-værktøjslinje" ;
+ 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 narzêdzi pulpitu";
+ Text[ japanese ] = "ÃÞ½¸Ä¯Ìß‚Ì•W€Â°ÙÊÞ°";
+ Text[ chinese_traditional ] = "®à­±¤u¨ã¦C";
+ Text[ greek ] = "ÃñáììÞ åñãáëåéþí Desktop";
+ Text[ korean ] = "¹ÙÅÁÈ­¸é µµ±¸¸ðÀ½";
+ Text[ arabic ] = "ÔÑíØ ÃÏæÇÊ ÓØÍ ÇáãßÊÈ";
+ Text[ turkish ] = "Masaüstü araç çubuðu";
+ 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>Nøgleord:</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>Título:</b><dd>$(TITULO)<dt><b>Tema:</b><dd>$(THEME)<dt><b>Contraseñas:</b><dd>$(KEYWORDS)<dt><b>Descripción:</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-clés :</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>Título:</b><dd>$(TITLE)<dt><b>Tema:</b><dd>$(THEME)<dt><b>Palavras-chave:</b><dd>$(KEYWORDS)<dt><b>Descrição:</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>S³owa 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>¼ÐÃD¡G</b><dd>$(TITEL)<dt><b>¥DÃD¡G</b><dd>$(THEME)<dt><b>ÃöÁä¦r¡G</b><dd>$(KEYWORDS)<dt><b>´y­z¡G</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 sözcük:</b><dd>$(KEYWORDS)<dt><b>Taným:</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 não 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 w³aœciwoœci dokumentów.</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>¤å¥óÄݩʤ£¦s¦b¡C</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 läuft." ;
+ 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 todavía 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 stängas för tillfället\neftersom ett utskriftsuppdrag fortfarande utförs." ;
+ Message [ danish ] = "Det er for tiden ikke muligt at afslutte programmet,\nfordi et udskriftsjob udføres." ;
+ Message [ portuguese_brazilian ] = "Das Dokument kann zur Zeit nicht geschlossen werden,\nda noch ein Druckauftrag läuft." ;
+ Message [ portuguese ] = "De momento é impossível fechar o documento,\n por ainda estar a ser impresso." ;
+ Message[ chinese_simplified ] = "Ä¿Ç°ÎÞ·¨¹Ø±ÕÕâ¸öÎļþ£¬\nÒòΪÕýÔÚÖ´ÐÐÒ»¸ö´òÓ¡ÈÎÎñ¡£";
+ Message[ russian ] = "Çàêðûòü ýòîò äîêóìåíò ïîêà íåâîçìîæíî,\nò.ê. ôóíêöèÿ ïå÷àòè íàõîäèòñÿ åùå â äåéñòâèè.";
+ Message[ polish ] = "Dokumentu nie mo¿na teraz zamkn¹æ,\nponiewa¿ wykonywane s¹ zadania wydruku.";
+ Message[ japanese ] = "ˆóü’†‚Ì‚½‚ß\n¡ÄÞ·­ÒÝÄ‚ð•Â‚¶‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB";
+ Message[ chinese_traditional ] = "¥¿¦b°õ¦æ¤@­Ó¦C¦L¤u§@¡A\nµLªkÃö³¬³o­Ó¤å¥ó¡C";
+ Message[ greek ] = "Äåí åßíáé äõíáôüí íá êëåßóåôå áõôü ôï Ýããñáöï\n åðåéäÞ åêôåëåßôáé ìéá åñãáóßá åêôýðùóçò.";
+ Message[ korean ] = "ÀμâÀÛ¾÷ÀÌ ¾ÆÁ÷ ÁøÇàÁßÀ̱⠶§¹®¿¡ \n Áö±ÝÀº ¹®¼­¸¦ ´ÝÀ» ¼ö ¾ø½À´Ï´Ù.";
+ Message[ arabic ] = "áÇ íãßä ÅÛáÇÞ ÇáãÓÊäÏ ÍÇáíÇð¡\náÃä åäÇáß ÚãáíÉ ØÈÇÚÉ ÞíÏ ÇáÊäÝíÐ.";
+ Message[ turkish ] = "Belge, devam eden bir yazdýrma iþi nedeniyle\nþu an kapatýlamýyor.";
+ 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 impresión" ; \
+ Text [ french ] = "Moniteur d'impression" ; \
+ Text [ swedish ] = "Utskriftsmonitor" ; \
+ Text [ danish ] = "Udskriftsskærm" ; \
+ Text [ portuguese_brazilian ] = "O monitor de impressão" ; \
+ Text [ portuguese ] = "Monitor de impressão" ; \
+ TEXT [ finnish ] = "Tulostuksen tarkkailu" ; \
+ TEXT[ chinese_simplified ] = "´òÓ¡¼àÊÓÆ÷"; \
+ TEXT[ russian ] = "Ìîíèòîð ïå÷àòè"; \
+ TEXT[ polish ] = "Monitor wydruku"; \
+ TEXT[ japanese ] = "ˆóüÓÆÀ°"; \
+ TEXT[ chinese_traditional ] = "¦C¦LºÊµø¾¹"; \
+ TEXT[ greek ] = "Ïèüíç åêôýðùóçò"; \
+ TEXT[ korean ] = "Àμ⠸ð´ÏÅÍ"; \
+ TEXT[ arabic ] = "ãÑÇÞÈ ÇáØÇÈÚÉ"; \
+ TEXT[ turkish ] = "Yazýcý 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 ] = "bêdzie przedstawiony jako";
+ TEXT[ japanese ] = "ˆóü‚³‚ê‚éÌßØÝÀ‚Í";
+ TEXT[ chinese_traditional ] = "ªº¦C¦L³]³Æ¬O";
+ TEXT[ greek ] = "åêôõðþíåôáé óôï";
+ TEXT[ korean ] = "Ãâ·ÂµÉ °÷";
+ TEXT[ arabic ] = "ÓæÝ íõØÈÚ Úáì";
+ TEXT[ turkish ] = "çýktýnýn alýndýðý 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 sähköpostia lähetettäessä." ;
+ MESSAGE [ danish ] = "Fejl ved afsendelse af meddelelsen." ;
+ MESSAGE [ french ] = "Erreur lors de l'envoi du message." ;
+ MESSAGE [ swedish ] = "Fel vid sändning 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 ] = "B³¹d przy przesy³aniu wiadomoœci.";
+ MESSAGE[ japanese ] = "Ò¯¾°¼Þ‚Ì‘—MŽž‚Ì´×°¡";
+ MESSAGE[ chinese_traditional ] = "¦b¶Ç°e³o­Ó¤å¥ó®Éµo¥Í¤@­Ó¿ù»~¡C";
+ MESSAGE[ greek ] = "ÓöÜëìá êáôÜ ôçí áðïóôïëÞ ìçíýìáôïò.";
+ MESSAGE[ korean ] = "¸Þ½ÃÁö¸¦ º¸³¾ ¶§ ¿À·ù ¹ß»ý";
+ MESSAGE[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÅÑÓÇá ÇáÑÓÇáÉ ";
+ MESSAGE[ turkish ] = "Posta gönderirken hata oluþtu.";
+ 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? ~Anhängen : ~Anhõngen */
+ Text = "~Anhängen" ;
+ Text [ English ] = "~Attach" ;
+ Text [ english_us ] = "~Attach" ;
+ Text [ swedish ] = "Bifog~a" ;
+ Text [ danish ] = "Vedhæft" ;
+ Text [ italian ] = "~Allega" ;
+ Text [ spanish ] = "~Adjuntar" ;
+ Text [ french ] = "~Joindre" ;
+ Text [ dutch ] = "~Toevoegen" ;
+ Text [ portuguese_brazilian ] = "~Anhängen" ;
+ Text [ portuguese ] = "A~nexar" ;
+ Text[ chinese_simplified ] = "¸½¼þ(~A)";
+ Text[ russian ] = "Ïðèêðåïèòü";
+ Text[ polish ] = "Za³¹cz";
+ Text[ japanese ] = "“Y•t‚·‚é(~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 ] = "Wyœlij wiadomoœæ";
+ Text[ japanese ] = "Ò¯¾°¼Þ‚Ì‘—M";
+ Text[ chinese_traditional ] = "¶Ç°e¹q¤l¶l¥ó";
+ RadioButton BTN_SAVE_AND_ATTACH
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ Text = "~Speichern und anhängen" ;
+ Text [ English ] = "~Save and attach" ;
+ Text [ english_us ] = "~Save and attach" ;
+ Text [ swedish ] = "~Spara och bifoga" ;
+ Text [ danish ] = "Gem og vedhæft" ;
+ 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 anhängen" ;
+ Text [ portuguese ] = "~Guardar e anexar" ;
+ Text[ chinese_simplified ] = "´æÅ̺ͼӸ½¼þ(~S)";
+ Text[ russian ] = "Ñîõðàíèòü è ïðèêðåïèòü";
+ Text[ polish ] = "~Zapisz i za³¹cz";
+ Text[ japanese ] = "•Û‘¶‚µ‚Ä“Y•t(~S)";
+ Text[ chinese_traditional ] = "Àx¦s©Mªþ¥[(~S)";
+ Text[ greek ] = "ÁðïèÞêåõ~óç êáé åðéóýíáøç";
+ Text[ korean ] = "ÀúÀåÇÏ°í ÷ºÎÇϱâ(~S)";
+ Text[ arabic ] = "ÍÝÙ æÅÑÝÇÞ";
+ Text[ turkish ] = "~Kaydet ve iliþtir";
+ };
+ 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 ] = "Använd som medde~landeinnehåll" ;
+ 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 conteúdo de mensagens" ;
+ Text[ chinese_simplified ] = "µ±×÷µç×ÓÓʼþÕýÎÄ(~M)";
+ Text[ russian ] = "Êàê ñîäåðæèìîå ñîîáùåíèÿ";
+ Text[ polish ] = "Zastosuj jako treœæ wiadomoœci";
+ Text[ japanese ] = "Ò¯¾°¼Þ‚Ì“à—e‚Æ‚µ‚ÄŽg—p‚·‚é(~M)";
+ Text[ chinese_traditional ] = "·í§@¶l¥ó¤º®e¨Ï¥Î(~M)";
+ Text[ greek ] = "×ñÞóç ùò ðåñéå÷üìåíï ìçíýìáôïò";
+ Text[ korean ] = "¸ÞÀÏ ³»¿ëÀ¸·Î »ç¿ë(~M)";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ßãÍÊæíÇÊ ÑÓÇáÉ";
+ Text[ turkish ] = "Posta içeriði 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 använd som meddelandeinnehåll" ;
+ 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 conteúdo de mensagem" ;
+ Text [ english_us ] = "Sa~ve and use as mail content" ;
+ Text[ chinese_simplified ] = "´æÅ̲¢ÇÒµ±×÷µç×ÓÓʼþÕýÎÄʹÓÃ(~V)";
+ Text[ russian ] = "Ñîõðàíèòü è èñïîëüçîâàòü êàê ñîäåðæàíèå ñîîáùåíèÿ";
+ Text[ polish ] = "Zapisz i u¿yj jako zawartoœci wiadomoœci";
+ Text[ japanese ] = "•Û‘¶‚µ‚ÄÒ¯¾°¼Þ“à—e‚Æ‚µ‚ÄŽg—p(~V)";
+ Text[ chinese_traditional ] = "Àx¦s©M·í§@¹q¤l¶l¥ó¤º®e¨Ï¥Î(~V)";
+ Text[ greek ] = "ÁðïèÞêåõóç êáé ÷ñÞóç ùò ~ðåñéå÷üìåíï ìçíýìáôïò";
+ Text[ korean ] = "ÀúÀåÇÏ°í ¸ÞÀÏ ³»¿ëÀ¸·Î »ç¿ë(~V)";
+ Text[ arabic ] = "ÍÝÙ æÇÓÊÎÏÇã ßãÍÊæì ÑÓÇáÉ";
+ Text[ turkish ] = "Kaydet ve ileti içeriði 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 ] = "Använd ~urval" ;
+ Text [ danish ] = "Anvend udvalg" ;
+ Text [ italian ] = "Usa selezione" ;
+ Text [ spanish ] = "Utilizar la ~selección" ;
+ Text [ french ] = "Utiliser uniquement la ~sélection" ;
+ Text [ dutch ] = "~Selectie gebruiken" ;
+ Text [ portuguese ] = "Usar s~elecção" ;
+ Text[ chinese_simplified ] = "ʹÓÃÑ¡ÖеÄÄÚÈÝ(~U)";
+ Text[ russian ] = "Ïðèìåíèòü âûáîð";
+ Text[ polish ] = "Zastosuj wybór";
+ Text[ japanese ] = "‘I‘ð‚ÌŽg—p(~U)";
+ Text[ chinese_traditional ] = "¨Ï¥Î¿ï¨úªº¤º®e(~U)";
+ Text[ greek ] = "×~ñÞóç åðéëïãÞò";
+ Text[ korean ] = "¼±Åà »ç¿ëÇϱâ(~U)";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ÇáÊÍÏíÏ";
+ Text[ turkish ] = "Seçimi 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 ] = "Använd 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 ] = "~Não usar" ;
+ Text[ chinese_simplified ] = "²»²ÉÓÃ(~D)";
+ Text[ russian ] = "Íå ïðèìåíÿòü";
+ Text[ polish ] = "Nie u¿ywaj";
+ Text[ japanese ] = "Žg—p‚µ‚È‚¢(~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 gönder";
+ 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 benötigt.\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 benötigt.\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 benötigt.\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 ben÷tigt.\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 benötigt.\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 benötigt.\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 ] = "För att ett meddelande skall kunna skickas via Internet,\nbehövs Din e-postadress och en SMTP-server.\nVar vänlig och för in dessa inställningar under\n\"Verktyg\\Alternativ\\Allmänt...\\Användardata\\E-post\" och\n\"Verktyg\\Alternativ\\Internet\\E-post/Nyheter\\Meddelandesändning\"\ninnan Du skickar ett meddelande igen." ;
+ Message [ danish ] = "For at kunne sende en meddelelse over Internet\nkræves 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\",\nfør 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 través de Internet\nse necesitan su dirección de correo electrónico y un servidor SMTP para el envío.\nAntes de enviar el próximo 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 nécessite une adresse e-mail et un serveur SMTP.\nVeuillez indiquer ces paramètres sous \n\"Outils\\Options\\Général...\\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 são necessários\\ o seu endereço electrónico e um servidor SMTP. Digite o seu endereço em\n\"Ferramentas\\\\Opções\\\\Geral...\\\\Dados do utilizador\\\\e-mail\" e\n\"Ferramentas\\\\Opções\\\\Internet\\\\Correio/Notícias\"\nantes de reenviar a mensagem." ;
+ Message[ chinese_simplified ] = "½èÖú¹ú¼Ê»¥ÁªÍø¼Ä·¢µç×ÓÓʼþʱ\nÐèÒªÄúµÄµç×ÓÓʼþµØÖ·ºÍÒ»¸öSMTP·þÎñÆ÷¡£\nÇëÔڼķ¢µç×ÓÓʼþ֮ǰ°´»÷²Ëµ¥ÃüÁî\n¡°¹¤¾ß\\Ñ¡Ïî...\\³£¹æ\\Óû§×ÊÁÏ\\µç×ÓÓʼþ¡±\nºÍ¡°¹¤¾ß\\Ñ¡Ïî\\¹ú¼Ê»¥ÁªÍø\\µç×ÓÓʼþ/ÐÂÎÅ\\¼Ä·¢µç×ÓÓʼþ¡±£¬ÌîÈëÓйØÉ趨Êý¾Ý¡£";
+ Message[ russian ] = "×òîáû îòïðàâèòü ñîîáùåíèå ïî Èíòåðíåòó,\níåîáõîäèì Âàø àäðåñ ýëåêòðîííîé ïî÷òû è ñåðâåð SMTP äëÿ äîñòàâêè ïî÷òû.\nÂâåäèòå, ïîæàëóéñòà, ýòè óñòàíîâêè â\n\"Ñåðâèñ\\Ïàðàìåòðû\\Îáùèå...\\Äàííûå ïîëüçîâàòåëÿ\\Ýë. ïî÷òà\" è â\n\"Ñåðâèñ\\Ïàðàìåòðû\\Èíòåðíåò\\Ïî÷òà/Íîâîñòè\\Äîñòàâêà íîâîñòåé\",\nïðåæäå ÷åì Âû îïÿòü îòïðàâèòå ñîîáùåíèå.";
+ Message[ polish ] = "Aby wys³aæ wiadomoœæ via Internet,\nwymagany jest twój adres e-mail i serwer SMTP.\nProszê wprowadŸ te ustawienia w \n\"Narzêdzia\\\\Opcje\\\\Ogólne...\\\\Dane u¿ytkownika\\\\e-mail\" i\n\"Narzêdzia\\\\Opcje\\\\Internet\\\\Poczta/Wiadomoœci\\\\Wysy³anie wiadomoœci\",\nzanim ponownie wyœlesz wiadomoœæ.";
+ Message[ japanese ] = "²ÝÀ°È¯Ä‚ÅÒ¯¾°¼Þ‚ð‘—M‚·‚é‚É‚Í\nE-mail±ÄÞÚ½‚ÆSMTP »°ÊÞ°‚ª•K—v‚Å‚·B\nÒ¯¾°¼Þ‚ðÄ‘—M‚·‚é‘O‚É\n‚±‚ÌÝ’è‚ð\n[°Ù\\µÌß¼®Ý\\‘S”Ê...\\Õ°»Þ°ÃÞ°À \\E-mail]‚¨‚æ‚Ñ\n[°Ù\\µÌß¼®Ý\\²ÝÀ°È¯Ä\\Ò°Ù/Æ­°½\\Ò¯¾°¼Þ‘—M]‚É“o˜^‚µ‚ĉº‚³‚¢B";
+ Message[ chinese_traditional ] = "³z¹L Internet ¶Ç°e¹q¤l¶l¥ó\n»Ý­n±zªº¹q¤l¶l¥ó¦a§}©M¤@­Ó SMTP ¦øªA¾¹¡C\n½Ð¦b­«·s¶Ç°e¹q¤l¶l¥ó¤§«e¦b\n¡§¤u¨ã\\¿ï¶µ\\¤@¯ë...\\¨Ï¥ÎªÌ¸ê®Æ¡¨©M¡§¤u¨ã\\¿ï¶µ\\Internet\\¹q¤l¶l¥ó/·s»D\\¶Ç°e¹q¤l¶l¥ó¡¨³B§@¬ÛÃöªº³]©w¡C";
+ 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 gönderebilmek için önce\n e-posta adresinizi ve bir SMTP sunucusu belirtmeniz gerekiyor.\nÝleti göndermeden önce bu ayarlar için,\n\"Araçlar\\Seçenekler\\Genel...\\Kullanýcý\\E-Posta\" ve\n\"Araçlar\\Seçenekler\\Internet\\E-Posta/Haber Grubu\\Giden Posta\" \nalanlarýna girin.";
+};
+ErrorBox ERRBOX_SFX_NO_OUTBOX
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Für die von Ihnen gewählte Aktion wird ein Ausgangskorb benötigt.\nBitte legen Sie einen Ausgangskorb an, bevor Sie diese Aktion erneut ausführen." ;
+ 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 ] = "Für die von Ihnen gewählte Aktion wird ein Ausgangskorb benötigt.\nBitte legen Sie einen Ausgangskorb an, bevor Sie diese Aktion erneut ausführen." ;
+ Message [ swedish ] = "Du behöver en utkorg för åtgärden som Du har valt.\nVar vänlig och skapa en utkorg innan Du utför den här åtgärden igen." ;
+ Message [ danish ] = "Du har brug for en udbakke for at kunne udføre denne handling.\nOpret venligst en udbakke, før 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 acción.\nPor favor cree una carpeta de salida antes de reiniciar la acción." ;
+ Message [ french ] = "Une boîte d'envoi est nécessaire pour exécuter cette action.\nCréez une boîte d'envoi avant de réessayer." ;
+ 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 ] = "É necessária uma caixa de envio para executar esta acção.\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ê utwórz skrzynkê nadawcz¹, zanim wykonasz ponownie tê akcjê.";
+ Message[ japanese ] = "‘I‘ð‚³‚ê‚½±¸¼®Ý‚ðŽÀs‚·‚é‚Ì‚É‘—MÄÚ²‚ª•K—v‚Å‚·B\n‚±‚̱¸¼®Ý‚ðÄŽÀs‚·‚é‘O‚ÉA‘—MÄÚ²‚ðŠi”[‚µ‚ĉº‚³‚¢B";
+ Message[ chinese_traditional ] = "°õ¦æ³o­Ó¾Þ§@­n¨D±z°t¸m¤@­Ó±H¥ó§X¡C\n½Ð±z«Ø¥ß¤@­Ó±H¥ó§X¡AµM¦Z¦b­«·s°õ¦æ³o­Ó©R¥O¡C";
+ Message[ greek ] = "Ãéá íá åêôåëåóôåß áõôÞ ç åíÝñãåéá áðáéôåßôáé ï öÜêåëïò 'Åîåñ÷üìåíá'\nÐáñáêáëþ äçìéïõñãÞóôå áõôüí ôïí öÜêåëï ðñéí ôçí åðüìåíç åêôÝëåóç áõôÞò ôçò åíÝñãåéáò.";
+ Message[ korean ] = "¼±ÅÃÇÑ ÀÛ¾÷¿¡´Â º¸³¾ÆíÁöÇÔÀÌ ÇÊ¿äÇÕ´Ï´Ù. \nÀÌ ÀÛ¾÷À» Àç½ÇÇàÇϱâ Àü¿¡ º¸³¾ÆíÁöÇÔÀ» ¸¸µå½Ê½Ã¿À.";
+ Message[ arabic ] = "ÊäÝíÐ ÇáÅÌÑÇÁ ÇáÐí ÞãÊ ÈÇÎÊíÇÑå íÍÊÇÌ Åáì ÓáÉ ÕÇÏÑÇÊ.\nÇáÑÌÇÁ ÅäÔÇÁ ÓáÉ ÕÇÏÑÇÊ¡ ÞÈá ãÍÇæáÉ ÊäÝíÐ åÐÇ ÇáÅÌÑÇÁ ãÌÏÏÇð.";
+ Message[ turkish ] = "Seçtiðiniz iþlem için giden kutusu gerekiyor.\nBu iþlemi yeniden yürütmeden önce giden kutusunu oluþturun.";
+ 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 geöffnet werden. Soll es als Vorlage\nfür ein neues Dokument verwendet werden? : Das Dokument kann (z.B. aufgrund fehlernder Rechte)\nnicht zum bearbeiten geöffnet werden. Soll es als Vorlage\nfür ein neues Dokument verwendet werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Das Dokument kann (z.B. aufgrund fehlender Rechte)\nnicht zum Bearbeiten geöffnet werden. Soll es als Vorlage\nfür ein neues Dokument verwendet werden? : Das Dokument kann (z.B. aufgrund fehlernder Rechte)\nnicht zum bearbeiten geöffnet werden. Soll es als Vorlage\nfür ein neues Dokument verwendet werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Das Dokument kann (z.B. aufgrund fehlender Rechte)\nnicht zum Bearbeiten geöffnet werden. Soll es als Vorlage\nfür ein neues Dokument verwendet werden? : Das Dokument kann (z.B. aufgrund fehlender Rechte)\nnicht zum Bearbeiten ge÷ffnet werden. Soll es als Vorlage\nf³r ein neues Dokument verwendet werden? */
+ Message = "Das Dokument kann (z.B. aufgrund fehlender Rechte)\nnicht zum Bearbeiten geöffnet werden. Soll es als Vorlage\nfür 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 não pode ser aberto para edição (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 geöffnet werden. Soll es als Vorlage\nfür ein neues Dokument verwendet werden?" ;
+ Message [ swedish ] = "Dokumentet kan inte öppnas för redigering\n(t ex därför att rättigheter saknas). Skall det användas\n som mall för 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 edición (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'accès insuffisants). Souhaitez-vous l'utiliser comme\nmodèle pour créer 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 mo¿na (n.p. z powodu brakuj¹cych praw)\notworzyæ do edycji. Czy u¿yæ tego dokumentu jako szablonu \ndla nowego dokumentu?";
+ Message[ japanese ] = "ÄÞ·­ÒÝÄ‚Í(±¸¾½Œ ‚È‚µ‚È‚Ç‚Å)\n•ÒW—p‚ÉŠJ‚¯‚Ü‚¹‚ñBV‚µ‚¢ÄÞ·­ÒÝÄ—p\nÃÝÌßÚ°Ä‚Æ‚µ‚ÄŽg‚¢‚Ü‚·‚©?";
+ Message[ chinese_traditional ] = "µLªk¶}±Ò½s¿è³o­Ó¤å¥ó(¯Ê¤ÖŪ¨úÅv¤O)¡C\n±z­n¨Ï¥Î³o­Ó¼Ë¦¡¨Ó«Ø¥ß¤@­Ó·s¤å¥ó¡H";
+ Message[ greek ] = "Äåí åßíáé äõíáôüí íá áíïé÷ôåß ôï Ýããñáöï ðñïò\nåðåîåñãáóßá (ð.÷. ëüãù Ýëëåéøçò äéêáéùìÜôùí ðñüóâáóçò). ÈÝëåôå\níá ÷ñçóéìïðïéçèåß ùò ðñüôõðï ãéá Ýíá íÝï Ýããñáöï;";
+ Message[ korean ] = "ÀÌ ¹®¼­´Â (¿¹¸¦ µé¾î ¾×¼¼½º ±ÇÇÑÀÌ ¾øÀ½À¸·Î ÀÎÇØ)\n ÆíÁýÀ» À§ÇØ ¿­ ¼ö ¾ø½À´Ï´Ù. »õ ¹®¼­¸¦ À§ÇÑ ¼­½ÄÆÄÀÏ·Î »ç¿ëÇϽðڽÀ´Ï±î?";
+ Message[ arabic ] = "áÇ íãßä ÝÊÍ ÇáãÓÊäÏ ááÊÍÑíÑ (áÚÏã ÊæÝÑ ÇáÍÞæÞ ÇááÇÒãÉ\nÚáì ÓÈíá ÇáãËÇá). åá ÊÑíÏ ÇÓÊÎÏÇãå\nßÞÇáÈ áãÓÊäÏ ÌÏíÏ¿";
+ Message[ turkish ] = "Belge (muhtemelen eriþim hakký olmamasý nedeniyle)\n düzenleme için açýlamýyor. Belgeyi yeni bir\nbelge için þablon olarak kullanmak istiyor musunuz?";
+ Message[ language_user1 ] = " ";
+};
+String STR_FRAMESIZE
+{
+ Text = "Frame-Größe" ;
+ Text [ english_us ] = "Frame Size" ;
+ Text [ portuguese_brazilian ] = "Frame-Größe" ;
+ Text [ swedish ] = "Ramstorlek" ;
+ Text [ danish ] = "Frame-størrelse" ;
+ Text [ italian ] = "Dimensione frame" ;
+ Text [ spanish ] = "Tamaño 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®Ø¤j¤p";
+ 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 funções" ;
+ Text[ chinese_simplified ] = "¹¤¾ßÀ¸";
+ Text[ russian ] = "Ïàíåëü ôóíêöèé";
+ Text[ polish ] = "Pasek funkcji";
+ Text[ japanese ] = "̧ݸ¼®Ý ÊÞ°";
+ Text[ chinese_traditional ] = "¤u¨ã¦C";
+ Text[ greek ] = "ÃñáììÞ ëåéôïõñãéþí";
+ Text[ korean ] = "±â´É ¸ðÀ½";
+ Text[ arabic ] = "ÔÑíØ ÇáãåÇã";
+ Text[ turkish ] = "Araç çubuðu";
+ 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 règle.\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 ifølge en regel.\nDen oprindelige meddelelse er vedhæftet.";
+ Text[ swedish ] = "Meddelande som vidarebefordrats per regel.\nOriginalmeddelandet som bilaga.";
+ Text[ polish ] = "Wiadomoœæ przes³ana dalej wed³ug regu³y.\nOrygina³ wiadomoœci jako za³¹cznik.";
+ Text[ portuguese_brazilian ] = "Per Regel weitergeleitete Nachricht.\nDie Originalnachricht als Anhang.";
+ Text[ japanese ] = "ٰقœ]‘—‚³‚ꂽү¾°¼ÞB\nµØ¼ÞÅÙ‚ÌÒ¯¾°¼Þ‚Í“Y•t‚Æ‚µ‚ÄB";
+ Text[ korean ] = "±ÔÄ¢¿¡ ÀÇÇØ Àü´ÞµÈ ¸Þ½ÃÁö. \n¿ø·¡ ¸Þ¼¼Áö´Â ÷ºÎ·Î.";
+ Text[ chinese_simplified ] = "°´³£¹æת¼ÄµÄµç×ÓÓʼþ¡£\nµç×ÓÓʼþÔ­¼þ×÷Ϊ¸½¼þ¡£";
+ Text[ chinese_traditional ] = "³z¹L³W«hÂà±Hªº¹q¤l¶l¥ó¡C\n·½¹q¤l¶l¥ó·í§@ªþ¥[¡C";
+ Text[ arabic ] = "ÑÓÇáÉ Êã ÊãÑíÑåÇ ÍÓÈ ÇáÞÇÚÏÉ.\nÇáÑÓÇáÉ ÇáÃÕáíÉ ßãÑÝÞÇÊ.";
+ Text[ turkish ] = "Kurala göre aktarýlan ileti.\nEk olarak özgün ileti.";
+};
+
+
diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx
new file mode 100644
index 0000000000..f3d5395dfe
--- /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 0000000000..df3fd5e7f4
--- /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 0000000000..c10314bfa8
--- /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 0000000000..6e401cb754
--- /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 0000000000..094c614ed6
--- /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 Gr”áe
+ 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 Gr”áe
+ 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 0000000000..401e6e5e55
--- /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 0000000000..d25dad24a6
--- /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 0000000000..b692fa43e5
--- /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 0000000000..2a7863918b
--- /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 0000000000..fd4a2d9cec
--- /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 0000000000..06fb6e712e
--- /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 0000000000..e0643765f6
--- /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 0000000000..aeefecbdad
--- /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 0000000000..e1a442067d
--- /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 0000000000..5c3e956863
--- /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 0000000000..93fe39c7a4
--- /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 0000000000..c9546f1e4d
--- /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 0000000000..13e96131e3
--- /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 0000000000..6520abaa10
--- /dev/null
+++ b/sj2/doc/Todo.txt
@@ -0,0 +1,108 @@
+Erkenntnisse aus sj/sj1, die in sj2 beachtet werden müssen
+
+
+- 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 0000000000..49f336b131
--- /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 0000000000..1a11f912ac
--- /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 0000000000..e0246462b8
--- /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 0000000000..40321a27eb
--- /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 0000000000..9b2d65e9ea
--- /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 0000000000..4b008d28b5
--- /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 0000000000..401a8332f5
--- /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 0000000000..0a8f5527ae
--- /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 0000000000..735d3456e5
--- /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 0000000000..c2019046be
--- /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 0000000000..e37d74f724
--- /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 0000000000..aa0f441c0e
--- /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 0000000000..631101a873
--- /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 0000000000..63f69e07e4
--- /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 0000000000..67ee62ce7e
--- /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 0000000000..59be33af94
--- /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 0000000000..6adfa52db4
--- /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 0000000000..d7e24350f6
--- /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 0000000000..bb272aa5d2
--- /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 0000000000..564375cbf7
--- /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 für 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 0000000000..6a2b2402cf
--- /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 0000000000..e58bc9c850
--- /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 0000000000..44bfeb2ec5
--- /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 0000000000..14d238d98e
--- /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 0000000000..f36e7c0312
--- /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 0000000000..af6cc99902
--- /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 0000000000..958e0960df
--- /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 0000000000..7d573d5c3f
--- /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 0000000000..9db057068b
--- /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 0000000000..b1a5c28848
--- /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 0000000000..a33662bfc9
--- /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 0000000000..45e929c545
--- /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 0000000000..214c16db7b
--- /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 0000000000..be568f9c12
--- /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 0000000000..66ae66f5c3
--- /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 0000000000..8f05f9bf9e
--- /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 0000000000..c311a45110
--- /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 0000000000..5be017328d
--- /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 0000000000..6644940936
--- /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 0000000000..66ca11220a
--- /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 0000000000..f42d63bd66
--- /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 0000000000..9a142caf0f
--- /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 0000000000..b0a25f11b9
--- /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 0000000000..f293c1bf08
--- /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 0000000000..008cd0c7a3
--- /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 0000000000..5ead83de72
--- /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 0000000000..5310e29939
--- /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 0000000000..2505575272
--- /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 0000000000..672fb436ba
--- /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 0000000000..cca474c8ac
--- /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 0000000000..5c00f6f37a
--- /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 0000000000..c49acdaf70
--- /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 0000000000..fe95ecd773
--- /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 0000000000..ec9c50a8a7
--- /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 0000000000..a03ae733bc
--- /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 0000000000..8270f242da
--- /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 0000000000..e088b7a018
--- /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 0000000000..4e1e702286
--- /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 0000000000..2e1d6ca092
--- /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 0000000000..4d300d28da
--- /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 0000000000..c629d553b9
--- /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 0000000000..6f2213f1ee
--- /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 0000000000..f747db12d6
--- /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 0000000000..fde942e4f0
--- /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 0000000000..590e3cc62a
--- /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 0000000000..358ae09d34
--- /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 0000000000..c9a0262430
--- /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 0000000000..77652128bf
--- /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 0000000000..baf291a811
--- /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 0000000000..91aeb6a78e
--- /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 0000000000..378a3c365d
--- /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 0000000000..228e4dd9c9
--- /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 0000000000..a863adab75
--- /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 0000000000..5072a5959b
--- /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 0000000000..6cb233ee66
--- /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 0000000000..3324264e08
--- /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 0000000000..7d4a84c5dc
--- /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 0000000000..b0487ac24d
--- /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 0000000000..37f7bee293
--- /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 0000000000..550618e17d
--- /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 0000000000..7bd7c5fba5
--- /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 0000000000..5f8dae6af4
--- /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 0000000000..e37e54945f
--- /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 0000000000..dc9fce042a
--- /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 0000000000..45230e83e7
--- /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 0000000000..6a52d9f48f
--- /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 0000000000..1b4052117a
--- /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 0000000000..d26022b740
--- /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 0000000000..e55157fd68
--- /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 0000000000..3544e7a06b
--- /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 0000000000..15049fc639
--- /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 0000000000..6883e2001e
--- /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 0000000000..9e0c474a8c
--- /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 0000000000..3bed82d4c0
--- /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 0000000000..6b81c51537
--- /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 0000000000..e8e5840537
--- /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 0000000000..7d757b099f
--- /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 0000000000..3c26ee5807
--- /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 0000000000..b5efda0132
--- /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 0000000000..88b8da3117
--- /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 0000000000..bdcd69c1bb
--- /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 0000000000..4c666c441c
--- /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 0000000000..ba3e114262
--- /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 0000000000..dcd7dd3653
--- /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 0000000000..210eb9a8b7
--- /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 0000000000..63c08a1fb3
--- /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 0000000000..0729e8e933
--- /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 0000000000..8df6f337cb
--- /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 0000000000..4ff62fcb25
--- /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 0000000000..d7c2ba9d28
--- /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 0000000000..3fefc43ebc
--- /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 0000000000..e1c2c4da25
--- /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 0000000000..4c7bf4c918
--- /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 0000000000..71745e7a23
--- /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 Rückgabetyp 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 0000000000..7fb71c6633
--- /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 0000000000..99b6b971e3
--- /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 0000000000..9e93d01130
--- /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 0000000000..7a0e48f00c
--- /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 0000000000..a9860881ce
--- /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 0000000000..2d1bcd7776
--- /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 0000000000..9144e87415
--- /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 0000000000..8065b7f1a4
--- /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 0000000000..de499b320a
--- /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 0000000000..1eed6194dd
--- /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 0000000000..c30173b13e
--- /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 0000000000..a77cba276c
--- /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 0000000000..85e5caa826
--- /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 0000000000..c7cb7aa1e4
--- /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 0000000000..5e920a9ce2
--- /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 0000000000..9fda18a461
--- /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 0000000000..60c60d67e2
--- /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 0000000000..18c27cecf7
--- /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 0000000000..c65dd0f67d
--- /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 0000000000..943b072f96
--- /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 0000000000..163b351995
--- /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 0000000000..83e394abfe
--- /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 ] = "Alineación" ;
+ 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 ] = "~Padrão" ;
+ Text [ portuguese ] = "~Padrão" ;
+ 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 ] = "Højre" ;
+ 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 ] = "¦V¥k(~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 ] = "Sangría" ;
+ Text [ french ] = "Retrait" ;
+ Text [ dutch ] = "Inspringing" ;
+ Text [ portuguese_brazilian ] = "Einzu~g" ;
+ Text [ portuguese ] = "Avanço" ;
+ Text[ chinese_simplified ] = "Ëõ½ø(~I)";
+ Text[ russian ] = "Îòñòóï";
+ Text[ polish ] = "Wciêcie";
+ 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 ] = "~Padrão" ;
+ Text [ portuguese ] = "~Padrão" ;
+ 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 ] = "~Ylös" ;
+ 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 ~górze";
+ Text[ japanese ] = "ã(~T)";
+ Text[ chinese_traditional ] = "¦V¤W(~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 ] = "¦V¤U(~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 ] = "~Degrés" ;
+ 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 référence" ;
+ Text [ dutch ] = "~Invalshoek" ;
+ Text [ portuguese ] = "Borda de ~referência" ;
+ Text[ chinese_simplified ] = "ÒýÓñß(~F)";
+ Text[ russian ] = "Êðàé ññûëêè";
+ Text[ polish ] = "KrawêdŸ 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 ] = "Orientação" ;
+ Text [ portuguese ] = "Orientação" ;
+ Text [ finnish ] = "Suunta" ;
+ Text [ danish ] = "Skriveretning" ;
+ Text [ french ] = "Sens d'écriture" ;
+ Text [ swedish ] = "Skrivriktning" ;
+ Text [ dutch ] = "Schrijfrichting" ;
+ Text [ spanish ] = "Dirección 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 yönü";
+ 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 ] = "Vänster" ;
+ 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 ] = "Højre" ;
+ Text [ french ] = "À droite" ;
+ Text [ swedish ] = "~Höger" ;
+ 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 ] = "¦V¥k(~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 górze";
+ Text[ japanese ] = "ã(~P)";
+ Text[ chinese_traditional ] = "¦V¤W(~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 ] = "¦V¤U(~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 quadrícula" ;
+ 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 cuadrícula" ;
+ Text [ english_us ] = "Spacing to grid lines" ;
+ Text[ chinese_simplified ] = "ÖÁÍø¸ñÏߵľàÀë";
+ Text[ russian ] = "Ðàññòîÿíèå îò ëèíèé ñåòêè";
+ Text[ polish ] = "Odstêp do linii siatki";
+ Text[ japanese ] = "¸ÞدÄÞü‚Ü‚Å‚ÌŠÔŠu";
+ Text[ chinese_traditional ] = "¦Üºô®æ½uªº¶ZÂ÷";
+ Text[ arabic ] = "ÇáãÓÇÝÉ ÍÊì ÎØæØ ÇáÔÈßÉ";
+ Text[ dutch ] = "Afstand tot rasterlijnen";
+ Text[ chinese_simplified ] = "ÖÁÍø¸ñÏߵľàÀë";
+ Text[ greek ] = "Áðüóôáóç áðü ãñáììÝò ðëÝãìáôïò";
+ Text[ korean ] = "±¥¼±°úÀÇ °£°Ý";
+ Text[ turkish ] = "Kýlavuz çizgilere uzaklýk";
+ 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 ~línea" ;
+ 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 ] = "Satýr 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 ] = "Textflöde" ;
+ Text [ danish ] = "Tekstretning" ;
+ Text [ italian ] = "Flusso di testo" ;
+ Text [ spanish ] = "Flujo del texto" ;
+ Text [ french ] = "Enchaînements" ;
+ 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 ] = "Textutsträckning från nedre cellkanten." ;
+ Text [ danish ] = "Tekstudstrækning ud fra nederste cellekant" ;
+ Text [ italian ] = "Estensione del testo dal bordo inferiore della cella." ;
+ Text [ spanish ] = "Expansión del texto a partir del borde inferior de la celda." ;
+ Text [ french ] = "Extension de texte à partir du bord inférieur de la cellule" ;
+ Text [ dutch ] = "Inhoud uitbreiden vanaf onderkant cel." ;
+ Text [ portuguese ] = "Expansão do texto a partir do canto inferior da célula." ;
+ Text[ chinese_simplified ] = "ÎÄ×Ö´Óµ¥Ôª¸ñϱßÔµÑÓÉì¡£";
+ Text[ russian ] = "Ðàñòÿæåíèå òåêñòà îò íèæíåãî êàíòà ÿ÷åéêè.";
+ Text[ polish ] = "Rozci¹gniêcie tekstu od dolnej krawêdzi komórki.";
+ Text[ japanese ] = "¾Ù‚̉º‰‚ðŠî€‚ÉŒX‚¯‚é";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "¤å¦r±qÀx¦s®æ¤UÃä½t©µ¦ù¡C";
+ Text[ arabic ] = "ÊãÏíÏ ÇáäÕ ÇäØáÇÞÇð ãä ÇáÍÇÝÉ ÇáÓÝáì ááÎáíÉ.";
+ Text[ dutch ] = "Inhoud uitbreiden vanaf onderkant cel.";
+ Text[ chinese_simplified ] = "ÎÄ×Ö´Óµ¥Ôª¸ñϱßÔµÑÓÉì¡£";
+ Text[ greek ] = "ÅðéìÞêõíóç êåéìÝíïõ áðü êÜôù Üêñç êåëéïý.";
+ Text[ korean ] = "¼¿ ¾Æ·¡ Å׵θ®¿¡¼­ ºÎÅÍ ÅؽºÆ® È®Àå";
+ Text[ turkish ] = "Hücre alt kenarýndan metin geniþlemesi";
+ };
+ 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 ] = "Textutsträckning från övre cellkanten." ;
+ Text [ danish ] = "Tekstudstrækning ud fra øverste cellerand." ;
+ Text [ italian ] = "Estensione del testo dal bordo superiore della cella." ;
+ Text [ spanish ] = "Expansión del texto a partir del borde superior de la celda." ;
+ Text [ french ] = "Extension de texte à partir du bord supérieur de la cellule" ;
+ Text [ dutch ] = "Inhoud uitbreiden vanaf bovenkant cel." ;
+ Text [ portuguese ] = "Expansão do texto a partir do canto superior da célula." ;
+ Text[ chinese_simplified ] = "ÎÄ×Ö´Óµ¥Ôª¸ñÉϱßÔµÑÓÉì¡£";
+ Text[ russian ] = "Ðàñòÿæåíèå òåêñòà îò âåðõíåãî êàíòà ÿ÷åéêè.";
+ Text[ polish ] = "Rozci¹gniêcie tekstu od górnej krawêdzi komórki.";
+ Text[ japanese ] = "¾Ù‚Ì㉂ðŠî€‚ÉŒX‚¯‚é";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "¤å¦r±qÀx¦s®æ¤WÃä½t©µ¦ù¡C";
+ Text[ arabic ] = "ÊãÏíÏ ÇáäÕ ÇäØáÇÞÇð ãä ÇáÍÇÝÉ ÇáÚáíÇ ááÎáíÉ.";
+ Text[ dutch ] = "Inhoud uitbreiden vanaf bovenkant cel.";
+ Text[ chinese_simplified ] = "ÎÄ×Ö´Óµ¥Ôª¸ñÉϱßÔµÑÓÉì¡£";
+ Text[ greek ] = "ÅðéìÞêõíóç êåéìÝíïõ áðü ðÜíù Üêñç êåëéïý.";
+ Text[ korean ] = "¼¿ À­Å׵θ®¿¡¼­ ºÎÅÍ ÅؽºÆ® È®Àå";
+ Text[ turkish ] = "Hücre üst kenarýndan metin geniþlemesi.";
+ };
+ 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 ] = "Textutsträckning endast inom cellen." ;
+ Text [ danish ] = "Tekstudstrækning kun indenfor cellen." ;
+ Text [ italian ] = "Estensione del testo solo all'interno della cella." ;
+ Text [ spanish ] = "Expansión del texto solo dentro de la celda." ;
+ Text [ french ] = "Extension de texte uniquement à l'intérieur de la cellule." ;
+ Text [ dutch ] = "Inhoud uitbreiden alleen binnen cel." ;
+ Text [ portuguese ] = "Expansão do texto apenas dentro da célula." ;
+ Text[ chinese_simplified ] = "ÎÄ×ÖÖ»ÔÚµ¥Ôª¸ñÄÚÑÓÉì¡£";
+ Text[ russian ] = "Ðàñòÿæåíèå òåêñòà òîëüêî âíóòðè ÿ÷åéêè.";
+ Text[ polish ] = "Rozci¹gniêcie tekstu tylko wewn¹trz komórki.";
+ Text[ japanese ] = "÷½Ä‚Ì‚ÝŒX‚¯‚é";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "¤å¦r¥u¦bÀx¦s®æ¤º©µ¦ù¡C";
+ Text[ arabic ] = "ÊãÏíÏ ÇáäÕ ÏÇÎá ÇáÎáíÉ ÝÞØ.";
+ Text[ dutch ] = "Inhoud uitbreiden alleen binnen cel.";
+ Text[ chinese_simplified ] = "ÎÄ×ÖÖ»ÔÚµ¥Ôª¸ñÄÚÑÓÉì¡£";
+ Text[ greek ] = "ÅðéìÞêõíóç êåéìÝíïõ ìüíï óôï åóùôåñéêü ôïõ êåëéïý.";
+ Text[ korean ] = "¼¿ ¾È¿¡¼­¸¸ ÅؽºÆ® È®Àå";
+ Text[ turkish ] = "Yalnýzca hücre içinde metin geniþlemesi";
+ };
+ Text[ chinese_simplified ] = "¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå";
+ Text[ polish ] = "Wyrównanie";
+ Text[ japanese ] = "”z’u";
+ 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 0000000000..b750caedba
--- /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 0000000000..ce02f4978d
--- /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 0000000000..53dda3c42b
--- /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 = "unverknüpfte Grafik" ; \
+ Text [ ENGLISH ] = "unlinked image" ; \
+ Text [ ENGLISH_US ] = "Unlinked graphic" ; \
+ text [ italian ] = "Immagine non collegata" ; \
+ text [ spanish ] = "Imagen no vinculada" ; \
+ text [ french ] = "Image non liée" ; \
+ text [ dutch ] = "Niet-gekoppelde afbeelding" ; \
+ text [ swedish ] = "ej länkad grafik" ; \
+ text [ danish ] = "Ikke-kædet grafik" ; \
+ text [ portuguese_brazilian ] = "unverknüpfte Grafik" ; \
+ text [ portuguese ] = "Imagem não ligada" ; \
+ text[ chinese_simplified ] = "δÁ´½ÓµÄͼÐÎ"; \
+ text[ russian ] = "Íåñâÿçàííàÿ ãðàôèêà"; \
+ text[ polish ] = "Nie po³¹czona grafika"; \
+ text[ japanese ] = "Øݸ‚³‚ê‚Ä‚¢‚È‚¢¸Þ×̨¯¸"; \
+ text[ chinese_traditional ] = "¥¼³sµ²ªº¹Ï¤ù"; \
+ text[ arabic ] = "ÕæÑÉ ÛíÑ ãÑÊÈØÉ"; \
+ text[ greek ] = "Ãñáöéêü ÷ùñßò óýíäåóç"; \
+ text[ korean ] = "¿¬°áµÇÁö ¾ÊÀº ±×·¡ÇÈ"; \
+ text[ turkish ] = "Baðlantýsýz 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 ] = "Arrière-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 ] =
+ {
+ < "Färg" ; 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 ] = "—p“r(~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" ; > ;
+ < "Række" ; > ;
+ < "Tabel" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Cella" ; > ;
+ < "Riga" ; > ;
+ < "Tabella" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Celda" ; > ;
+ < "Fila" ; > ;
+ < "Tabla" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Cellule" ; > ;
+ < "Ligne" ; > ;
+ < "Tableau" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Cel" ; > ;
+ < "Rij" ; > ;
+ < "Tabel" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Célula" ; > ;
+ < "Linha" ; > ;
+ < "Tabela" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "µ¥Ôª¸ñ" ; > ;
+ < "ÐÐ" ; > ;
+ < "±í¸ñ" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "ß÷åéêà" ; > ;
+ < "Ñòðîêà" ; > ;
+ < "Òàáëèöà" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Komórka" ; > ;
+ < "Wiersz" ; > ;
+ < "Tabela" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "¾Ù" ; > ;
+ < "s" ; > ;
+ < "•\\" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "Àx¦s®æ" ; > ;
+ < "Àx¦s®æ" ; > ;
+ < "ªí®æ" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÎáíÉ" ; > ;
+ < "ÕÝ" ; > ;
+ < "ÌÏæá" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "Êåëß" ; > ;
+ < "ÃñáììÞ" ; > ;
+ < "Ðßíáêáò" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "¼¿" ; > ;
+ < "Çà" ; > ;
+ < "Å×À̺í" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Hücre" ; > ;
+ < "Satýr" ; > ;
+ < "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 ] =
+ {
+ < "Párrafo" ; > ;
+ < "Carácter" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Paragraphe" ; > ;
+ < "Caractère" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Alinea" ; > ;
+ < "Teken" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Parágrafo" ; > ;
+ < "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'arrière-plan" ;
+ Text [ ITALIAN ] = "Colore di sfondo" ;
+ Text [ DUTCH ] = "Achtergrondkleur" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Background Color" ;
+ Text [ SWEDISH ] = "Bakgrundsfärg" ;
+ Text [ PORTUGUESE ] = "Cor de fundo" ;
+ Text[ chinese_simplified ] = "±³¾°ÑÕÉ«";
+ Text[ russian ] = "Öâåò ôîíà";
+ Text[ polish ] = "Kolor t³a";
+ Text[ japanese ] = "”wŒiF";
+ Text[ chinese_traditional ] = "­I´ºÃC¦â";
+ 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 ] = "Previsualización" ;
+ Text [ FINNISH ] = "Esikatselu" ;
+ Text [ FRENCH ] = "Aperçu" ;
+ Text [ ITALIAN ] = "Anteprima" ;
+ Text [ DUTCH ] = "Voorbeeld" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Examinar" ;
+ Text [ SWEDISH ] = "Förhandsvisning" ;
+ Text [ PORTUGUESE ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ 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? ~Verknüpfen : ~Verkn³pfen */
+ Text = "~Verknüpfen" ;
+ Text [ ENGLISH ] = "~Link" ;
+ Text [ ENGLISH_US ] = "~Link" ;
+ Text [ dutch ] = "~Koppelen" ;
+ Text [ italian ] = "Collega" ;
+ Text [ spanish ] = "~Vincular" ;
+ Text [ french ] = "~Lien" ;
+ Text [ swedish ] = "Län~ka" ;
+ Text [ danish ] = "Kæd" ;
+ Text [ portuguese_brazilian ] = "~Verknüpfen" ;
+ 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 ] = "Baðla";
+ 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~zación" ;
+ Text [ french ] = "A~perçu" ;
+ 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~odgl¹d";
+ 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~swählen..." ;
+ Text [ ENGLISH ] = "~Select..." ;
+ Text [ english_us ] = "~Browse..." ;
+ Text [ portuguese_brazilian ] = "~Durchsuchen..." ;
+ Text [ swedish ] = "~Välj 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 ] = "Przegl¹d~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 ] = "~Posición" ;
+ Text [ french ] = "P~osition" ;
+ Text [ dutch ] = "~Positie" ;
+ Text [ swedish ] = "~Position" ;
+ Text [ danish ] = "Placering" ;
+ Text [ portuguese_brazilian ] = "~Position" ;
+ Text [ portuguese ] = "~Posição" ;
+ 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? ~Fläche : ~Flõche */
+ Text = "~Fläche" ;
+ 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 ] = "~Fläche" ;
+ 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 ] = "P³yt~ka";
+ Text[ japanese ] = "À²Ù(~T)";
+ Text[ chinese_traditional ] = "¥­¾Q(~T)";
+ Text[ arabic ] = "ÈáÇØÉ";
+ Text[ greek ] = "Óå ðáñÜèåóç";
+ Text[ korean ] = "¹ÙµÏÆǽÄ(~T)";
+ Text[ turkish ] = "~Döþe";
+ 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 ] = "Tür";
+ 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 ] = "Previsualización" ;
+ Text [ french ] = "Aperçu" ;
+ Text [ dutch ] = "Afbeeldingvoorbeeld" ;
+ Text [ swedish ] = "Grafikförhandsvisning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ portuguese_brazilian ] = "Grafikvorschau" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "ͼÐÎÔ¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð ãðàôèêè";
+ Text[ polish ] = "Podgl¹d 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 ] = "Sök grafik" ;
+ Text [ danish ] = "Søg 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 ] = "T³o";
+ Text[ japanese ] = "”wŒi";
+ 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 0000000000..4a800828a7
--- /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 0000000000..f221733383
--- /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 / Arrière-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 ] = "ŠO˜g";
+ Text[ chinese_traditional ] = "Ãä®Ø";
+ Text[ arabic ] = "ÇáÍÏæÏ";
+ Text[ greek ] = "Ðåñßãñáììá";
+ Text[ korean ] = "Å׵θ®";
+ Text[ turkish ] = "Kenarlýk";
+ 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 ] = "Arrière-plan" ;
+ Text [ swedish ] = "Bakgrund" ;
+ Text [ dutch ] = "Achtergrond" ;
+ Text [ spanish ] = "Fondo" ;
+ Text [ english_us ] = "Background" ;
+ Text[ chinese_simplified ] = "±³¾°";
+ Text[ russian ] = "Ôîí";
+ Text[ polish ] = "T³o";
+ Text[ japanese ] = "”wŒi";
+ Text[ chinese_traditional ] = "­I´º";
+ Text[ arabic ] = "ÇáÎáÝíÉ";
+ Text[ greek ] = "Öüíôï";
+ Text[ korean ] = "¹è°æ";
+ Text[ turkish ] = "Artalan";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "±ß¿ò/±³¾°";
+ Text[ russian ] = "Îáðàìëåíèå / Ôîí";
+ Text[ polish ] = "Obramowanie / T³o";
+ Text[ japanese ] = "ŠO˜g/”wŒi";
+ Text[ chinese_traditional ] = "Ãä®Ø/­I´º";
+ Text[ arabic ] = "ÇáÍÏæÏ / ÇáÎáÝíÉ";
+ Text[ greek ] = "Ðëáßóéï / Öüíôï";
+ Text[ korean ] = "Å׵θ® / ¹è°æ";
+ Text[ turkish ] = "Kenarlýk / Artalan";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/bmpmask.hrc b/svx/source/dialog/bmpmask.hrc
new file mode 100644
index 0000000000..09a9966404
--- /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 0000000000..e99be6d2a8
--- /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 ] = "Färger" ;
+ 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 ] = "Källfärg" ;
+ 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 ] = "Tolérance" ;
+ Text [ dutch ] = "Tolerantie" ;
+ Text [ swedish ] = "Tolerans" ;
+ Text [ danish ] = "Tolerance" ;
+ Text [ portuguese_brazilian ] = "Toleranz" ;
+ Text [ portuguese ] = "Tolerância" ;
+ 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 ] = "Ersätt 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 ] = "Transparência" ;
+ Text[ chinese_simplified ] = "͸Ã÷";
+ Text[ russian ] = "Ïðîçðà÷íîñòü";
+ Text[ polish ] = "PrzezroczystoϾ";
+ Text[ japanese ] = "“§‰ß«";
+ Text[ chinese_traditional ] = "³z©ú";
+ Text[ arabic ] = "ÔÝÇÝíÉ";
+ Text[ greek ] = "ÄéáöÜíåéá";
+ Text[ korean ] = "Åõ¸í(~A)";
+ Text[ turkish ] = "Saydamlýk";
+ 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 ] = "Ersätt" ;
+ 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 ] = "Deðiþtir";
+ 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 örneði 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 örneði 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 ] = "PrzeŸroczysty";
+ 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 0000000000..2418476753
--- /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 0000000000..d441af256c
--- /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 0000000000..ce9dd8747e
--- /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 ] = "Predefinições" ;
+ Text [ finnish ] = "Määritykset" ;
+ Text [ danish ] = "Forudindstillinger" ;
+ Text [ french ] = "Valeurs prédéfinies" ;
+ Text [ swedish ] = "Förinställningar" ;
+ Text [ dutch ] = "Standaard" ;
+ Text [ spanish ] = "Predeterminados" ;
+ Text [ english_us ] = "Presets" ;
+ Text[ chinese_simplified ] = "Ô¤ÖÃ";
+ Text[ russian ] = "Çàäàííûå óñòàíîâêè";
+ Text[ polish ] = "Ustawienia domyœlne";
+ Text[ japanese ] = "Ìßؾ¯Ä";
+ Text[ chinese_traditional ] = "¹w¸m";
+ 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 = "~Abstände" ;
+ Text [ ENGLISH ] = "Distances" ;
+ Text[ english_us ] = "Sp~acing";
+ Text[ portuguese ] = "E~spaçamento";
+ Text[ russian ] = "Èíòåðâàëû";
+ Text[ greek ] = "AðïóôÜóåéò";
+ Text[ dutch ] = "~Afstanden";
+ Text[ french ] = "É~carts";
+ Text[ spanish ] = "E~spacios";
+ Text[ italian ] = "Dis~tanze";
+ Text[ danish ] = "Afstand";
+ Text[ swedish ] = "Avstånd";
+ Text[ polish ] = "~Odstêpy";
+ Text[ portuguese_brazilian ] = "Distances";
+ Text[ japanese ] = "ŠÔŠu";
+ Text[ korean ] = "°£°Ý(~A)";
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ chinese_traditional ] = "¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏÇÊ";
+ Text[ turkish ] = "~Aralýklar";
+ Text[ language_user1 ] = " ";
+ };
+ ModalDialog DLG_DISTANCE
+ {
+ Helpid = HID_BORDER_DISTANCE_DLG;
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 225 , 96 ) ;
+ Text = "Abstände" ;
+ 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 ] = "~Vänster";
+ 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 ] = "Højre";
+ Text[ swedish ] = "Hög~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 górze";
+ 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 ] = "¦P¨B¤Æ";
+ Text[ arabic ] = "ÊÒÇãä";
+ Text[ turkish ] = "~Eþitle";
+ 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 ] = "Predefinições";
+ Text[ russian ] = "Íàñòðîéêè";
+ Text[ greek ] = "Ñõèìßóåéò";
+ Text[ dutch ] = "Instellingen";
+ Text[ french ] = "Paramètres";
+ Text[ spanish ] = "Configuración";
+ Text[ italian ] = "Impostazioni";
+ Text[ danish ] = "Indstillinger";
+ Text[ swedish ] = "Inställningar";
+ 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 ] = "Espaçamento";
+ Text[ russian ] = "Èíòåðâàëû";
+ Text[ greek ] = "AðïóôÜóåéò";
+ Text[ dutch ] = "Afstanden";
+ Text[ french ] = "Écarts";
+ Text[ spanish ] = "Espacios";
+ Text[ italian ] = "Distanze";
+ Text[ danish ] = "Afstand";
+ Text[ swedish ] = "Avstånd";
+ Text[ polish ] = "Odstêpy";
+ Text[ portuguese_brazilian ] = "Distances";
+ Text[ japanese ] = "ŠÔŠu";
+ Text[ korean ] = "°£°Ý";
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ chinese_traditional ] = "¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏÇÊ";
+ Text[ turkish ] = "Aralýklar";
+ 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 ] = "Çerçeve";
+ 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 ] = "~Biçim";
+ 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 ] = "~Väri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "~Couleur" ;
+ Text [ swedish ] = "~Färg" ;
+ 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 ] = "Línea" ;
+ 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 ] = "~Posição" ;
+ Text [ portuguese ] = "~Posição" ;
+ Text [ finnish ] = "A~sema" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "~Position" ;
+ Text [ swedish ] = "~Position" ;
+ Text [ dutch ] = "~Positie" ;
+ Text [ spanish ] = "~Posición" ;
+ 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? ~Größe : ~Gr÷˜e */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Größe : ~Gr÷˜e */
+ Text = "~Größe" ;
+ Text [ ENGLISH ] = "Si~ze" ;
+ Text [ norwegian ] = "Si~ze" ;
+ Text [ italian ] = "~Dimensione" ;
+ Text [ portuguese_brazilian ] = "Ta~manho" ;
+ Text [ portuguese ] = "~Tamanho" ;
+ Text [ finnish ] = "~Koko" ;
+ Text [ danish ] = "Størrelse" ;
+ Text [ french ] = "~Taille" ;
+ Text [ swedish ] = "St~orlek" ;
+ Text [ dutch ] = "~Grootte" ;
+ Text [ spanish ] = "~Tamaño" ;
+ Text [ english_us ] = "Si~ze" ;
+ Text[ chinese_simplified ] = "´óС(~Z)";
+ Text[ russian ] = "Ðàçìåð";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "»²½Þ(~Z)";
+ Text[ chinese_traditional ] = "¤j¤p(~Z)";
+ Text[ arabic ] = "ÇáÍÌã";
+ Text[ greek ] = "ÌÝãåèïò";
+ Text[ korean ] = "Å©±â(~Z)";
+ Text[ turkish ] = "~Büyüklük";
+ 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 ] = "Gölge";
+ 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 ] = "Kenarlýk";
+ Text[ language_user1 ] = " ";
+};
+ // **********************************************************************
+
diff --git a/svx/source/dialog/chardlg.cxx b/svx/source/dialog/chardlg.cxx
new file mode 100644
index 0000000000..74da7da004
--- /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 0000000000..e44c4811ae
--- /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 0000000000..dd21dd200a
--- /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 0000000000..a99181df5f
--- /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 ] = "Yazýtipi";
+ 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 ] = "PrzeŸroczysty";
+ 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 deðil";
+ };
+
+ 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 ] = "~Biçim";
+ 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" ;
+ "Itálico" ;
+ "Negrito" ;
+ "Negrito Itálico" ;
+ };
+ StringList [ portuguese ] =
+ {
+ "Padrão" ;
+ "Itálico" ;
+ "Negrito" ;
+ "Negrito Itálico" ;
+ };
+ 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" ;
+ "Kalýn" ;
+ "Kalýn italik" ;
+ };
+ };
+ FixedText FT_SIZE
+ {
+ Pos = MAP_APPFONT ( 222 , 2 ) ;
+ Size = MAP_APPFONT ( 33 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Größe : ~Gr÷˜e */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Größe : ~Gr÷˜e */
+ Text = "~Größe" ;
+ 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 ] = "Størrelse" ;
+ Text [ french ] = "Ta~ille" ;
+ Text [ swedish ] = "~Storlek" ;
+ Text [ dutch ] = "G~rootte" ;
+ Text [ spanish ] = "~Tamaño" ;
+ Text [ english_us ] = "S~ize" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "´óС(~I)";
+ Text[ russian ] = "Ðàçìåð";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "»²½Þ(~I)";
+ Text[ chinese_traditional ] = "¤j¤p(~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~odkreœl";
+ Text[ japanese ] = "伟(~U)";
+ Text[ chinese_traditional ] = "¤U¹º½u(~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~eœl";
+ Text[ japanese ] = "Žæ‚èÁ‚µü(~T)";
+ Text[ chinese_traditional ] = "§R°£½u(~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 ] = "Wyró¿nienia";
+ 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 ] = "~Väri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "~Couleur" ;
+ Text [ swedish ] = "~Färg" ;
+ 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'arrière-plan";
+ Text[ swedish ] = "~Bakgrundsfärg";
+ Text[ dutch ] = "~Achtergrondkleur";
+ Text[ spanish ] = "~Color de fondo";
+ Text[ english_us ] = "~Fill color";
+ Text[ chinese_simplified ] = "±³¾°ÑÕÉ«(~F)";
+ Text[ russian ] = "Öâåò ôîíà";
+ Text[ polish ] = "Kolor t³a";
+ Text[ japanese ] = "”wŒiF(~F)";
+ Text[ chinese_traditional ] = "­I´ºÃC¦â(~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 ] = "~Língua" ;
+ Text [ finnish ] = "K~ieli" ;
+ Text [ danish ] = "Sprog" ;
+ Text [ french ] = "~Langue" ;
+ Text [ swedish ] = "S~pråk" ;
+ Text [ dutch ] = "~Taal" ;
+ Text [ spanish ] = "I~dioma" ;
+ Text [ english_us ] = "~Language" ;
+ Text[ chinese_simplified ] = "ÓïÑÔ(~L)";
+ Text[ russian ] = "ßçûê";
+ Text[ polish ] = "Jêzyk";
+ 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 ] = "Przyk³ad";
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ 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 ] = "Extensão de Caracter" ;
+ Text [ portuguese ] = "Efeitos do tipo de letra" ;
+ Text [ finnish ] = "Merkin tehosteet" ;
+ Text [ danish ] = "Skrifteffekt" ;
+ Text [ french ] = "Effet de caractère" ;
+ 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 ] = "Yazýtipi 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 ; > ;
+ < "Kapitälchen" ; 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 ; > ;
+ < "Kapitälchen" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "None" ; Default ; > ;
+ < "Capitals" ; Default ; > ;
+ < "Lowercase" ; Default ; > ;
+ < "Title" ; Default ; > ;
+ < "Small Capitals" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Nenhum(a)" ; Default ; > ;
+ < "Maiúsculas" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitälchen" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitälchen" ; 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 ; > ;
+ < "Caractères du titre" ; Default ; > ;
+ < "Petites majuscules" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitälchen" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitälchen" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Ingen" ; Default ; > ;
+ < "Store bogstaver" ; Default ; > ;
+ < "Små bogstaver" ; Default ; > ;
+ < "Titelskrift" ; Default ; > ;
+ < "Kapitæler" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitälchen" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitälchen" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitälchen" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "‚È‚µ" ; Default ; > ;
+ < "‘啶Žš" ; Default ; > ;
+ < "¬•¶Žš" ; Default ; > ;
+ < "À²ÄÙ•¶Žš" ; Default ; > ;
+ < "¬Œ^‘啶Žš" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitälchen" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ÎÞ" ; Default ; > ;
+ < "´óд×Öĸ" ; Default ; > ;
+ < "Сд×Öĸ" ; Default ; > ;
+ < "±êÌâ" ; Default ; > ;
+ < "СÐÍ´óд×Öĸ" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "µL" ; Default ; > ;
+ < "¤j¼g¦r¥À" ; Default ; > ;
+ < "¤p¼g¦r¥À" ; Default ; > ;
+ < "¼ÐÃD¤å¦r" ; Default ; > ;
+ < "¤p«¬¤j¼g¦r¥À" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitälchen" ; 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 ] = "~Maiúsculas" ;
+ Text [ finnish ] = "I~soin kirjaimin" ;
+ Text [ danish ] = "Store bogst." ;
+ Text [ french ] = "Ma~juscules" ;
+ Text [ swedish ] = "~Versaler" ;
+ Text [ dutch ] = "~Hoofdletters" ;
+ Text [ spanish ] = "Ma~yúsculas" ;
+ Text [ english_us ] = "~All caps" ;
+ Text[ chinese_simplified ] = "´óд×Öĸ(~A)";
+ Text[ russian ] = "Ïðîïèñíûå";
+ Text[ polish ] = "Wersaliki";
+ Text[ japanese ] = "‘啶Žš(~A)";
+ Text[ chinese_traditional ] = "¤j¼g¦r¥À(~A)";
+ Text[ arabic ] = "ÃÍÑÝ ßÈíÑÉ";
+ Text[ greek ] = "Êåöáëáßá";
+ Text[ korean ] = "¸ðµÎ ´ë¹®ÀÚ(~A)";
+ Text[ turkish ] = "~Büyük 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 ] = "Minús~culas" ;
+ Text [ finnish ] = "~Pienin kirjaimin" ;
+ Text [ danish ] = "Små bogst." ;
+ Text [ french ] = "Minuscu~les" ;
+ Text [ swedish ] = "~Gemener" ;
+ Text [ dutch ] = "~Kleine letters" ;
+ Text [ spanish ] = "~Minúsculas" ;
+ Text [ english_us ] = "~Lower case" ;
+ Text[ chinese_simplified ] = "Сд(~L)";
+ Text[ russian ] = "Ñòðî÷íûå";
+ Text[ polish ] = "Ma³~e litery";
+ Text[ japanese ] = "¬•¶Žš(~L)";
+ Text[ chinese_traditional ] = "¤p¼g(~L)";
+ Text[ arabic ] = "ÃÍÑÝ ÕÛíÑÉ";
+ Text[ greek ] = "ÐåæÜ";
+ Text[ korean ] = "¾Æ·¡ ´ë/¼Ò¹®ÀÚ(~L)";
+ Text[ turkish ] = "~Küçük harflerle";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_SMALLCAPS
+ {
+ Pos = MAP_APPFONT ( 53 , 12 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? K~apitälchen : K~apitõlchen */
+ /* ### ACHTUNG: Neuer Text in Resource? K~apitälchen : K~apitõlchen */
+ Text = "K~apitälchen" ;
+ 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 ] = "Kapitæler" ;
+ Text [ french ] = "Petites ~majusc." ;
+ Text [ swedish ] = "Små k~apitäler" ;
+ 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 ] = "¤p«¬¤j¼g¦r¥À(~M)";
+ Text[ arabic ] = "ÍÑÝ ÈÏÇíÉ ÃßÈÑ";
+ Text[ greek ] = "ÌéêñÜ êåöáëáßá";
+ Text[ korean ] = "¼Ò¹®ÀÚ(~M)";
+ Text[ turkish ] = "Kü~çük büyük 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 ] = "~Título" ;
+ Text [ portuguese ] = "~Título" ;
+ Text [ finnish ] = "~Arvo" ;
+ Text [ danish ] = "Titelskrift" ;
+ Text [ french ] = "~Caractères du titre" ;
+ Text [ swedish ] = "~Titel" ;
+ Text [ dutch ] = "~Titel" ;
+ Text [ spanish ] = "Carácter títu~lo" ;
+ Text [ english_us ] = "~Title" ;
+ Text[ chinese_simplified ] = "±êÌâ(~T)";
+ Text[ russian ] = "Êàê çàãîëîâîê";
+ Text[ polish ] = "Czcionk~a tytu³owa";
+ Text[ japanese ] = "À²ÄÙ•¶Žš(~T)";
+ Text[ chinese_traditional ] = "¼ÐÃD(~T)";
+ Text[ arabic ] = "ÎØ ÚäæÇä";
+ Text[ greek ] = "Ôßôëïò";
+ Text[ korean ] = "Á¦¸ñ(~T)";
+ Text[ turkish ] = "~Ýlk harf büyük";
+ 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 ] = "~Yanýp sönen 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 ] = "Más efectos" ;
+ Text [ english_us ] = "More effects" ;
+ Text[ chinese_simplified ] = "ÆäËûЧ¹û";
+ Text[ russian ] = "Äîïîëíèòåëüíûå ýôôåêòû";
+ Text[ polish ] = "Inne wyró¿nienia";
+ Text[ japanese ] = "‚»‚Ì‘¼‚Ì•¶Žšü‚è";
+ Text[ chinese_traditional ] = "¨ä¥L®ÄªG";
+ Text[ arabic ] = "ÇáãÒíÏ ãä ÇáÊÃËíÑÇÊ";
+ Text[ greek ] = "ÅðéëïãÝò";
+ Text[ korean ] = "±âŸ È¿°ú";
+ Text[ turkish ] = "Diðer 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~läindeksi" ;
+ Text [ danish ] = "Hævet" ;
+ Text [ french ] = "Expo~sant" ;
+ Text [ swedish ] = "Upphöj~d" ;
+ Text [ dutch ] = "~Superscript" ;
+ Text [ spanish ] = "Superínd~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 ] = "~Padrão" ;
+ 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 ] = "Sænket" ;
+ Text [ french ] = "Indi~ce" ;
+ Text [ swedish ] = "~Nedsänkt" ;
+ Text [ dutch ] = "Subs~cript" ;
+ Text [ spanish ] = "Subíndic~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 ] = "Posição";
+ Text[ russian ] = "Ïîçèöèÿ";
+ Text[ dutch ] = "Positie";
+ Text[ french ] = "Position";
+ Text[ spanish ] = "Posición";
+ 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 ] = "Hæv/sænk" ;
+ Text [ french ] = "~Exposant/Indice" ;
+ Text [ swedish ] = "~Höj/sänk" ;
+ Text [ dutch ] = "Sup~er/Subscript" ;
+ Text [ spanish ] = "Super/subíndice 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 ] = "Yük~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? ~Schriftgröße rel. : ~Schriftgr÷˜e rel. */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Schriftgröße rel. : ~Schriftgr÷˜e rel. */
+ Text = "~Schriftgröße 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 størrelse" ;
+ 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 ] = "¬Û¹ïªº¦r«¬¤j¤p(~E)";
+ Text[ arabic ] = "ÇáÍÌã ÇáäÓÈí ááÎØ";
+ Text[ greek ] = "Ãñáììáôï~óåéñÜ ó÷åô.";
+ Text[ korean ] = "»ó´ëÀû ±Û²Ã Å©±â(~E)";
+ Text[ turkish ] = "~Gör. 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 ] = "~Automático" ;
+ Text [ french ] = "A~utomatique" ;
+ Text [ dutch ] = "A~utomatisch" ;
+ Text [ swedish ] = "A~utomatisk" ;
+ Text [ danish ] = "Automatisk" ;
+ Text [ portuguese ] = "A~utomático" ;
+ 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? Positionszusätze : Positionszusõtze */
+ /* ### ACHTUNG: Neuer Text in Resource? Positionszusätze : Positionszusõtze */
+ Text = "Positionszusätze" ;
+ Text [ ENGLISH ] = "Position Options" ;
+ Text [ norwegian ] = "Position Options" ;
+ Text [ italian ] = "Opzioni posizione" ;
+ Text [ portuguese_brazilian ] = "Opções de posição" ;
+ Text [ portuguese ] = "Opções de posição" ;
+ Text [ finnish ] = "Sijaintiasetukset" ;
+ Text [ danish ] = "Positionsindstillinger" ;
+ Text [ french ] = "Options de position" ;
+ Text [ swedish ] = "Placeringsalternativ" ;
+ Text [ dutch ] = "Positieopties" ;
+ Text [ spanish ] = "Opciones de posición" ;
+ 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 seçenekleri";
+ 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 ] =
+ {
+ < "Padrão" ; 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 ; > ;
+ < "Spärrat" ; 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 ; > ;
+ < "W¹ski" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "•W€" ; Default ; > ;
+ < "L‚°‚é" ; Default ; > ;
+ < "‹·‚ß‚é" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¼Ð·Ç" ; Default ; > ;
+ < "ÂX®i" ; Default ; > ;
+ < "ºòÁY" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÞíÇÓí" ; Default ; > ;
+ < "ãæÓÚ" ; Default ; > ;
+ < "ÑÝíÚ" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÐñïåðéëïãÞ" ; Default ; > ;
+ < "ÅêôåôáìÝíá" ; Default ; > ;
+ < "ÓõìðõêíùìÝíá" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "Ç¥ÁØ" ; Default ; > ;
+ < "Æó¼â" ; Default ; > ;
+ < "Á¼°Ô" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Standart" ; Default ; > ;
+ < "Aralýðý büyüt" ; Default ; > ;
+ < "Aralýðý küçült" ; 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 ] = "~määrä" ;
+ 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 ] = "Espaçamento por ~pares" ;
+ Text [ finnish ] = "~Parien välistys" ;
+ Text [ danish ] = "Parvis knibning" ;
+ Text [ french ] = "~Crénage 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 ] = "¦r¶Z½Õ¾ã(~P)";
+ Text[ arabic ] = "ÊÞäíä ÃÍÑÝ ÒæÌí";
+ Text[ greek ] = "~ÄéáãñáììÜôùóç áíÜ æåýãç";
+ Text[ korean ] = "½ÖÀ¸·Î Ä¿´×(~P)";
+ Text[ turkish ] = "~Aralýk 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 ] = "Espaçamento" ;
+ Text [ portuguese ] = "Espaçamento" ;
+ Text [ finnish ] = "Väli" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ french ] = "Espacement" ;
+ Text [ swedish ] = "Avstånd" ;
+ Text [ dutch ] = "Spatiëring" ;
+ Text [ spanish ] = "Espacios" ;
+ Text [ english_us ] = "Spacing" ;
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ polish ] = "Odstêpy";
+ 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 ] = "Podkreœlenie";
+ Text[ japanese ] = "伟";
+ Text[ chinese_traditional ] = "¤U¹º½u(~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; > ;
+ < "Traço"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Traço negrito"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Traço longo"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Traço longo negrito"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Ponto traço"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Ponto traço negrito"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Ponto ponto traço"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Ponto ponto traço negrito"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Ondulação"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Ondulação negrito"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Ondulação 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; > ;
+ < "Bølge"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Bølge (fed)"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Dobbelt bølge"; 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 långt"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Streck fet långt"; 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; > ;
+ < "Våg"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Våg fet"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Dubbel våg"; 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 ; > ;
+ < "Podwójne" ; 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; > ;
+ < "D³uga kreska "; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "D³uga 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 podwójna"; 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; > ;
+ < "ÂI¹º½u"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "²Ê«¬ÂI¹º½u"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "ÂIÂI¹º½u"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "²Ê«¬ÂIÂI¹º½u"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "ªi®ö½u"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "²Ê«¬ªi®ö½u"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Âùªi®ö½u"; 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 ; > ;
+ < "Kalýn"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Noktalý" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Kalýn noktalý" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Çizgi"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Kalýn çizgi"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Uzun çizgi"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Kalýn uçun çizgi"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Nokta çizgi"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Kalýn nokta çizgi"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Nokta nokta çizgi"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Kalýn nokta nokta çizgi"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Dalga"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Kalýn 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 ] = "~Traçado" ;
+ 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 ] = "Przekreœlenie";
+ Text[ japanese ] = "Žæ‚èÁ‚µü(~K)";
+ Text[ chinese_traditional ] = "§R°£½u(~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 ; > ;
+ < "Podwójne" ; 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 ; > ;
+ < "X•t‚«" ; 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 ; > ;
+ < "Kalýn" ; 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 ] = "³v¦r(~I)";
+ Text[ arabic ] = "ßáãÇÊ ÝÑÏíÉ";
+ Text[ greek ] = "ÊáôÜ ëÝîç";
+ Text[ korean ] = "°³º° ´Ü¾î(~I)";
+ Text[ turkish ] = "~Yalnýzca sözcükler";
+ 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 ] = "Przyk³ad";
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ 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 ] = "Usuário" ;
+ Text [ portuguese ] = "Utilizador" ;
+ Text [ finnish ] = "Käyttäjä" ;
+ Text [ danish ] = "Bruger" ;
+ Text [ french ] = "Utilisateur" ;
+ Text [ swedish ] = "Användare" ;
+ Text [ dutch ] = "Gebruiker" ;
+ Text [ spanish ] = "Usuario" ;
+ Text [ english_us ] = "User" ;
+ Text[ chinese_simplified ] = "Óû§";
+ Text[ russian ] = "Ïîëüçîâàòåëü";
+ Text[ polish ] = "U¿ytkownik";
+ Text[ japanese ] = "Õ°»Þ°";
+ Text[ chinese_traditional ] = "¨Ï¥ÎªÌ";
+ Text[ arabic ] = "ÇáãÓÊÎÏã";
+ Text[ greek ] = "×ñÞóôçò";
+ Text[ korean ] = "»ç¿ëÀÚ";
+ Text[ turkish ] = "Kullanýcý";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
new file mode 100644
index 0000000000..64313fd7ba
--- /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 0000000000..7a002101a5
--- /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 0000000000..975e1cbd9c
--- /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 ] = "Símbolo";
+ Text[ portuguese ] = "Caracteres especiais";
+ Text[ danish ] = "Specialtegn";
+ Text[ french ] = "Caractères spéciaux";
+ Text[ swedish ] = "Specialtecken";
+ Text[ dutch ] = "Speciale tekens";
+ Text[ spanish ] = "Símbolos";
+ Text[ english_us ] = "Special Character";
+ Text[ chinese_simplified ] = "ÌØÊâ×Ö·û";
+ Text[ russian ] = "Ñïåöèàëüíûå ñèìâîëû";
+ Text[ polish ] = "Znaki specjalne";
+ Text[ japanese ] = "‹L†‚Æ“ÁŽê•¶Žš";
+ Text[ chinese_traditional ] = "¯S®í¦r¤¸";
+ 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 ] = "~Yazýtipi";
+ 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 ] = "Caractères :";
+ Text[ swedish ] = "Tecken:";
+ Text[ dutch ] = "Tekens:";
+ Text[ spanish ] = "Carácter:";
+ Text[ english_us ] = "Characters:";
+ Text[ chinese_simplified ] = "×ÖÌ壺";
+ Text[ russian ] = "Çíàêè:";
+ Text[ polish ] = "Znaki:";
+ Text[ japanese ] = "•¶Žš:";
+ Text[ chinese_traditional ] = "¦r¤¸¡G";
+ 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= "~Löschen";
+ 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 0000000000..49ef3f1b1c
--- /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 0000000000..eda8b86ff3
--- /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 0000000000..5fdb5db171
--- /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 0000000000..fb4af1e0d5
--- /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 ] = "Förbindelse" ;
+ 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 ] = "Linjeavstånd" ;
+ Text [ danish ] = "Linjeafstand" ;
+ Text [ italian ] = "Distanza tra le linee" ;
+ Text [ spanish ] = "Distancia entre líneas" ;
+ Text [ french ] = "Interligne" ;
+ Text [ dutch ] = "Lijnafstand" ;
+ Text [ portuguese ] = "Intervalo entre linhas" ;
+ Text[ chinese_simplified ] = "Ïß¼ä¸ô";
+ Text[ russian ] = "Ïðîìåæóòîê ìåæäó ëèíèÿìè";
+ Text[ polish ] = "Odstêp wierszy";
+ Text[ japanese ] = "üŠÔŠu";
+ Text[ chinese_traditional ] = "½u¶¡¹j";
+ 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 ] = "Linjeförskjutning" ;
+ Text [ danish ] = "Linjeforskydning" ;
+ Text [ italian ] = "Spostamento linea" ;
+ Text [ spanish ] = "Desplazamiento de líneas" ;
+ Text [ french ] = "Décalage de ligne" ;
+ Text [ dutch ] = "Lijnopvulling" ;
+ Text [ portuguese ] = "Transposição de linhas" ;
+ Text[ chinese_simplified ] = "ÏßÆ«Àë";
+ Text[ russian ] = "Ñìåùåíèå ëèíèè";
+ Text[ polish ] = "Przesuniêcie linii";
+ Text[ japanese ] = "ü‚Ì‚¸‚ê";
+ Text[ chinese_traditional ] = "½u°¾Â÷";
+ Text[ arabic ] = "ÊÎÇáÝ ÇáÎØæØ";
+ Text[ greek ] = "Ìåôáôüðéóç ãñáììÞò";
+ Text[ korean ] = "¼± ºø±è";
+ Text[ turkish ] = "Çizgi eðriliði";
+ 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 ] = "Förhandsvisning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ french ] = "Aperçu" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ 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 ] = "Línea ~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 ] = "Línea ~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 ] = "Línea~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 ] = "Début h~orizontal" ;
+ Text [ dutch ] = "Begin h~orizontaal" ;
+ Text [ portuguese ] = "Início h~orizontal" ;
+ Text[ chinese_simplified ] = "½ÓÍ·²¿·ÖÊÇˮƽ·½Ïò(~B)";
+ Text[ russian ] = "Íà÷àëî ãîðèçîíòàëüíî";
+ Text[ polish ] = "Pocz¹tek poziomo";
+ Text[ japanese ] = "‰¡ü‚ÌŽn“_(~B)";
+ Text[ chinese_traditional ] = "¶}ÀY³¡¤À¬O¤ô¥­¤è¦V(~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 ] = "µ²§À³¡¤À¬O¤ô¥­¤è¦V(~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 ] = "Début ~vertical" ;
+ Text [ dutch ] = "Begin ~verticaal" ;
+ Text [ portuguese ] = "Início ~vertical" ;
+ Text[ chinese_simplified ] = "¿ªÍ·²¿·ÖÊÇ´¹Ö±·½Ïò(~V)";
+ Text[ russian ] = "Íà÷àëî âåðòèêàëüíî";
+ Text[ polish ] = "Pocz¹tek pionowo";
+ Text[ japanese ] = "cü‚ÌŽn“_(~V)";
+ Text[ chinese_traditional ] = "¶}ÀY³¡¤À¬O««ª½¤è¦V(~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 ] = "µ²§À³¡¤À¬O««ª½¤è¦V(~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 ] = "Baðlayýcý";
+ Text[ language_user1 ] = " ";
+};
+ // ******************************************************************* EOF
diff --git a/svx/source/dialog/contdlg.hrc b/svx/source/dialog/contdlg.hrc
new file mode 100644
index 0000000000..8c5a3bd7f8
--- /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 0000000000..21f7aa8cd3
--- /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 ] = "“K—p";
+ 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 ] = "Arbetsområde" ;
+ Text [ danish ] = "Arbejdsområde" ;
+ 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 ] = "Çalýþma 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 ] = "Selección" ;
+ Text [ french ] = "Sélection" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Marker" ;
+ Text [ portuguese ] = "Seleccionar" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Objekte auswählen : Objekte auswõhlen */
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûáîð";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÇÎÊíÇÑ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçim";
+ 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 ] = "Rectángulo" ;
+ Text [ french ] = "Rectangle" ;
+ Text [ swedish ] = "Rektangel" ;
+ Text [ danish ] = "Rektangel" ;
+ Text [ portuguese ] = "Rectângulo" ;
+ Text [ portuguese_brazilian ] = "Rechteck" ;
+ Text[ chinese_simplified ] = "¾ØÐÎ";
+ Text[ russian ] = "Ïðÿìîóãîëüíèê";
+ Text[ polish ] = "Prostok¹t";
+ Text[ japanese ] = "ŽlŠpŒ`";
+ Text[ chinese_traditional ] = "¯x§Î";
+ Text[ arabic ] = "ãÓÊØíá";
+ Text[ greek ] = "Ïñèïãþíéï";
+ Text[ korean ] = "»ç°¢Çü";
+ Text[ turkish ] = "Dikdörtgen";
+ 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 ] = "Polígono" ;
+ Text [ french ] = "Polygone" ;
+ Text [ dutch ] = "Veelhoek" ;
+ Text [ swedish ] = "Polygon" ;
+ Text [ danish ] = "Polygon" ;
+ Text [ portuguese ] = "Polígono" ;
+ Text [ portuguese_brazilian ] = "Polygon" ;
+ Text[ chinese_simplified ] = "¶à±ßÐÎ";
+ Text[ russian ] = "Ìíîãîóãîëüíèê";
+ Text[ polish ] = "Wielok¹t";
+ 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 düzenle";
+ 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 ] = "Déplacer 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 einfügen : Punkte einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte einfügen : Punkte einf³gen */
+ Text = "Punkte einfügen" ;
+ 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 ] = "Indsæt punkter" ;
+ Text [ french ] = "Insérer 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 einfügen oder anhängen : Neue Punkte einf³gen oder anhõngen */
+ Text[ chinese_simplified ] = "²åÈëµã";
+ Text[ russian ] = "Âñòàâèòü òî÷êè";
+ Text[ polish ] = "Wstaw punkty";
+ Text[ japanese ] = "§Œä“_‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤JÂI";
+ 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 löschen : Punkte l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte löschen : Punkte l÷schen */
+ Text = "Punkte löschen" ;
+ 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 löschen : Markierte Punkte l÷schen */
+ Text[ chinese_simplified ] = "ɾ³ýµã";
+ Text[ russian ] = "Óäàëèòü òî÷êè";
+ Text[ polish ] = "Usuñ punkty";
+ Text[ japanese ] = "§Œä“_‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£ÂI";
+ 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 automático" ;
+ 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 = "Rückgängig " ;
+ 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 ] = "«ì´_ºM®ø©R¥O ";
+ 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 örneði 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 ] = "Tolerância de cor" ;
+ CustomUnitText [ portuguese_brazilian ] = "%" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbtoleranz" ;
+ CustomUnitText [ swedish ] = "%" ;
+ QuickHelpText [ swedish ] = "Färgtolerans" ;
+ CustomUnitText [ danish ] = "%" ;
+ QuickHelpText [ danish ] = "Farbtoleranz" ;
+ CustomUnitText [ italian ] = "%" ;
+ QuickHelpText [ italian ] = "Tolleranza colore" ;
+ CustomUnitText [ spanish ] = "%" ;
+ QuickHelpText [ spanish ] = "Tolerancia del color" ;
+ CustomUnitText [ french ] = "%" ;
+ QuickHelpText [ french ] = "Tolérance 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 konturów";
+ Text[ japanese ] = "—ÖŠs´ÃÞ¨À";
+ Text[ chinese_traditional ] = "¹Ï¤ù½ü¹ø½s¿è¾¹";
+ Text[ arabic ] = "ãÍÑÑ ÇáÎØ ÇáßÝÇÝí";
+ Text[ greek ] = "ÅðåîåñãáóôÞò ðåñéãñÜììáôïò";
+ Text[ korean ] = "¿ÜÇü¼± ÆíÁý±â";
+ Text[ turkish ] = "Kontur editörü";
+ Text[ language_user1 ] = " ";
+};
+/******************************************************************************/
+String STR_CONTOURDLG_MODIFY
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die Kontur wurde geändert.\nSollen die Änderungen übernommen werden? : Die Kontur wurde geõndert.\nSollen die Žnderungen ³bernommen werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die Kontur wurde geändert.\nSollen die Änderungen übernommen werden? : Die Kontur wurde geõndert.\nSollen die Žnderungen ³bernommen werden? */
+ Text = "Die Kontur wurde geändert.\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 geändert.\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.\n¿Desea 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 modificações?" ;
+ Text[ chinese_simplified ] = "Õâ¸öÂÖÀªÒѾ­±»¸ü¸Ä¡£\nÄúÒª½ÓÊÜÕâ¸ö¸ü¸ÄÂð£¿";
+ Text[ russian ] = "Êîíòóð èçìåíåí.\nÏðèíÿòü èçìåíåíèÿ?";
+ Text[ polish ] = "Kontur zosta³ zmieniony.\nCzy zapisaæ zmiany?";
+ Text[ japanese ] = "—ÖŠsü‚ª•ÏX‚³‚ê‚Ü‚µ‚½B\n•ÏX‚ðˆø‚«Œp‚¬‚Ü‚·‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "³o­Ó¹Ï¤ù½ü¹ø¤w¸gÅܧó¡C\n±z­n±µ¨ü³o­ÓÅܧó¡H";
+ Text[ arabic ] = "Êã ÊÛííÑ ÇáÎØ ÇáßÝÇÝí.\nåá ÊÑíÏ ÍÝÙ ÇáÊÛííÑÇÊ¿";
+ Text[ greek ] = "Ôï ðåñßãñáììá ôñïðïðïéÞèçêå.\nÈÝëåôå íá áðïèçêåýóåôå ôéò áëëáãÝò;";
+ Text[ korean ] = "¿ÜÇü¼±ÀÌ ¼öÁ¤µÇ¾ú½À´Ï´Ù. \nº¯°æÀ» ÀúÀåÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Kontur deðiþtirildi.\nDeðiþiklikler kaydedilsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String STR_CONTOURDLG_NEWPIPETTE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie eine neue Kontur erzeugen? : M÷chten Sie eine neue Kontur erzeugen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie eine neue Kontur erzeugen? : M÷chten Sie eine neue Kontur erzeugen? */
+ Text = "Möchten 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 ] = "Möchten 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 créer 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 ] = "±z­n¨î§@¤@­Ó·sªº½ü¹ø¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ÅäÔÇÁ ÎØ ßÝÇÝí ÌÏíÏ¿";
+ Text[ greek ] = "ÈÝëåôå íá äçìéïõñãÞóåôå Ýíá íÝï ðåñßãñáììá;";
+ Text[ korean ] = "»õ·Î¿î ¿ÜÇü¼±À» ¸¸µå½Ã°Ú½À´Ï±î?";
+ Text[ turkish ] = "Yeni bir kontur oluþturmak istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+String STR_CONTOURDLG_WORKPLACE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Das Setzen eines neuen Arbeitsbereiches\nführt zu einem Löschen der Kontur.\nMöchten sie wirklich fortfahren? : Das Setzen eines neuen Arbeitsbereiches\nf³hrt zu einem L÷schen der Kontur.\nM÷chten sie wirklich fortfahren? */
+ /* ### ACHTUNG: Neuer Text in Resource? Das Setzen eines neuen Arbeitsbereiches\nführt zu einem Löschen der Kontur.\nMöchten sie wirklich fortfahren? : Das Setzen eines neuen Arbeitsbereiches\nf³hrt zu einem L÷schen der Kontur.\nM÷chten sie wirklich fortfahren? */
+ Text = "Das Setzen eines neuen Arbeitsbereiches\nführt zu einem Löschen der Kontur.\nMöchten 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\nführt zu einem Löschen der Kontur.\nMöchten sie wirklich fortfahren?" ;
+ Text [ swedish ] = "Definition av ett nytt arbetsområde\nleder till att konturen raderas.\nVill Du fortsätta ändå?" ;
+ Text [ danish ] = "Hvis du definerer et nyt arbejdsområde\nbliver konturen slettet.\nEr du sikker på at du vil fortsætte?" ;
+ 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.\n¿Desea 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 usuniêcia konturu.\nCzy chcesz kontynuowaæ?";
+ Text[ japanese ] = "V‚µ‚¢ì‹Æ—̈æ‚ÌÝ’è‚É‚æ‚Á‚ÄA\n—ÖŠsü‚ªíœ‚³‚ê‚Ü‚·B\n‘±s‚µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "©w¸q¤@­Ó·sªº½s¿è°Ï°ì·|²M°£½ü¹ø¡C\n±z¯u­nÄ~Äò¡H";
+ Text[ arabic ] = "ÊÚííä ãÓÇÍÉ Úãá ÌÏíÏÉ ÓæÝ\níÄÏí Åáì ÍÐÝ ÇáÎØ ÇáßÝÇÝí. \nåá ÊÑíÏ ÇáãÊÇÈÚÉ ÈÇáÝÚá¿";
+ Text[ greek ] = "Ï ïñéóìüò ìéáò íÝáò ðåñéï÷Þò åñãáóßáò\nÝ÷åé ùò áðïôÝëåóìá ôç äéáãñáöÞ ôïõ ðåñéãñÜììáôïò.\nÈÝëåôå ðñáãìáôéêÜ íá óõíå÷ßóåôå;";
+ Text[ korean ] = "»õÀÛ¾÷¿µ¿ªÀ» ¼³Á¤ÇÏ°Ô µÇ¸é\n À±°ûÀÌ »èÁ¦µË´Ï´Ù. ±×·¡µµ °è¼ÓÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Yeni bir çalýþma 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 verknüpft. Möchten Sie die Verknüpfung aufheben, um die Grafik zu bearbeiten? : Diese Grafik ist mit dem Dokument verkn³pft. M÷chten Sie die Verkn³pfung aufheben, um die Grafik zu bearbeiten? */
+ /* ### ACHTUNG: Neuer Text in Resource? Diese Grafik ist mit dem Dokument verknüpft. Möchten Sie die Verknüpfung aufheben, um die Grafik zu bearbeiten? : Diese Grafik ist mit dem Dokument verkn³pft. M÷chten Sie die Verkn³pfung aufheben, um die Grafik zu bearbeiten? */
+ Text = "Diese Grafik ist mit dem Dokument verknüpft. Möchten Sie die Verknüpfung 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 ligação 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 kædet til dokumentet. Vil du ophæve kæden for at redigere denne grafik?" ;
+ Text [ french ] = "Cette image est liée à un document. Désirez-vous supprimer le lien pour pouvoir éditer l'image ?" ;
+ Text [ swedish ] = "Den här grafiken är länkad till ett dokument. Vill Du upphäva länken för 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 vínculo para editar la imagen?" ;
+ Text[ chinese_simplified ] = "Õâ¸öͼÐÎÊǺÍÎĵµÁ´½ÓµÄ¡£ÄúҪȡÏûÕâ¸öÁ´½Ó£¬±à¼­Õâ¸öͼÐÎÂð£¿";
+ Text[ russian ] = "Ýòîò ðèñóíîê ññûëàåòñÿ íà äîêóìåíò. Âû õîòèòå ñíÿòü ññûëêó, ÷òîáû îòðåäàêòèðîâàòü ðèñóíîê?";
+ Text[ polish ] = "Grafika jest po³¹czona z dokumentem. Czy chcesz usun¹æ ³¹cze, aby edytowaæ grafikê?";
+ Text[ japanese ] = "‚±‚̸Þ×̨¯¸‚ÍÄÞ·­ÒÝÄ‚ÉØݸ‚µ‚Ä‚¢‚Ü‚·B¸Þ×̨¯¸‚ð•ÒW‚·‚邽‚ß‚ÉØݸ‚ð‰ðœ‚µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "³o­Ó¹Ï¤ù¬O©M¤å¥ó³sµ²ªº¡C±z­n¨ú®ø³o­Ó³sµ²¡M½s¿è³o­Ó¹Ï¤ù¡H";
+ Text[ arabic ] = "åÐå ÇáÑÓãÉ ãÑÊÈØÉ ÈÇáãÓÊäÏ. åá ÊÑíÏ ÅÒÇáÉ ÇáÇÑÊÈÇØ áßí ÊÊãßä ãä ÊÍÑíÑ ÇáÑÓãÉ¿";
+ Text[ greek ] = "Ôï ãñáöéêü áõôü åßíáé óõíäåäåìÝíï ìå ôï Ýããñáöï. ÈÝëåôå íá êáôáñãçèåß ç óýíäåóç ãéá íá åðåîåñãÜóåôå ôï ãñáöéêü;";
+ Text[ korean ] = "ÀÌ ±×·¡ÇÈÀº ¹®¼­¿¡ ¿¬°áµÇ¾î ÀÖ½À´Ï´Ù. ÆíÁýÀ» À§ÇÏ¿© ±×·¡ÇÈ ¿¬°áÀ» ÇØÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Bu grafik, belge ile baðlantýlý. Grafiði düzenlemek için bu baðlantýyý kaldýrmak istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+/******************************************************************************/
diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx
new file mode 100644
index 0000000000..b2166ce297
--- /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 0000000000..ce69cd1fca
--- /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 0000000000..6d568bc25f
--- /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 0000000000..a8107660e1
--- /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 0000000000..e469e185c7
--- /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 0000000000..787dd64ef6
--- /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 ] =
+ {
+ < "før 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 ; > ;
+ < "différent 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 ; > ;
+ < "równy" ; Default ; > ;
+ < "nierówny" ; Default ; > ;
+ < "miêdzy" ; Default ; > ;
+ < "od zapisu" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "ˆÈ‘O" ; Default ; > ;
+ < "ˆÈ—ˆ" ; Default ; > ;
+ < "“™‚µ‚¢" ; Default ; > ;
+ < "“™‚µ‚­‚È‚¢" ; Default ; > ;
+ < "ŠÔ" ; Default ; > ;
+ < "•Û‘¶ˆÈ—ˆ" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¦­©ó" ; Default ; > ;
+ < "±q" ; Default ; > ;
+ < "µ¥¦P¤_" ; Default ; > ;
+ < "¤£µ¥©ó" ; Default ; > ;
+ < "¤¤¶¡©ó" ; Default ; > ;
+ < "¦bÀx¦s«á" ; 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 ; > ;
+ < "eþittir" ; Default ; > ;
+ < "eþit deðildir" ; Default ; > ;
+ < "Aralýk" ; Default ; > ;
+ < "Kayýttan 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 ] = "Ställ in datum/klockslag" ;
+ QuickHelpText [ danish ] = "Indstil dato/klokkeslæt" ;
+ 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 ] = "Ställ in datum/klockslag" ;
+ QuickHelpText [ danish ] = "Indstil dato/klokkeslæt" ;
+ 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 ] = "Förf~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 ] = "~Område" ;
+ Text [ danish ] = "Område" ;
+ 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 ] = "~Aralýk";
+ 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~cção" ;
+ Text [ english_us ] = "A~ction" ;
+ Text [ portuguese_brazilian ] = "A~ktion" ;
+ Text [ swedish ] = "Åt~gärd" ;
+ Text [ danish ] = "Handling" ;
+ Text [ italian ] = "Opera~zione" ;
+ Text [ spanish ] = "~Acción" ;
+ 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 ] = "Ställ 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 référence" ;
+ Text [ dutch ] = "..." ;
+ QuickHelpText [ dutch ] = "Tabellenreferentie instellen" ;
+ Text [ portuguese ] = "..." ;
+ QuickHelpText [ portuguese ] = "Definir referência" ;
+ Text [ english_us ] = "..." ;
+ Text[ chinese_simplified ] = "...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "...";
+ Text[ japanese ] = "...";
+ Text[ chinese_traditional ] = "...";
+ Text[ arabic ] = "...";
+ QuickHelpText[ russian ] = "Óñòàíîâèòü ññûëêó";
+ QuickHelpText[ polish ] = "Ustaw tabelê odwo³añ";
+ QuickHelpText[ japanese ] = "•\\‚ÌŽQÆ‚ðÝ’è";
+ QuickHelpText[ chinese_simplified ] = "É趨±í¸ñÒýÓÃ";
+ QuickHelpText[ chinese_traditional ] = "³]©w¤u§@ªí°Ñ·Ó";
+ 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~escrição";
+ Text[ danish ] = "Beskrivelse";
+ Text[ french ] = "~Description";
+ Text[ swedish ] = "Be~skrivning";
+ Text[ dutch ] = "~Commentaar";
+ Text[ spanish ] = "~Descripción";
+ Text[ english_us ] = "Comment";
+ Text[ chinese_simplified ] = "˵Ã÷";
+ Text[ russian ] = "Îïèñàíèå";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "ºÒÝÄ";
+ Text[ chinese_traditional ] = "´y­z";
+ Text[ arabic ] = "ÇáæÕÝ";
+ Text[ greek ] = "ÐåñéãñáöÞ";
+ Text[ korean ] = "¼³¸í";
+ Text[ turkish ] = "Açýk~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~böja" ;
+ 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 ] = "‚·‚ׂij”F(~A)";
+ Text[ chinese_traditional ] = "¥þ³¡±µ¨ü(~A)";
+ Text[ arabic ] = "ÞÈæá Çáßá";
+ Text[ greek ] = "Áðïäï~÷Þ üëùí";
+ Text[ korean ] = "¸ðµÎ ¼ö¶ô(~A)";
+ Text[ turkish ] = "~Tümünü 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~vböj 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 ] = "Tümünü ~reddet";
+ Text[ language_user1 ] = " ";
+ };
+
+ PushButton PB_UNDO
+ {
+ HelpId = HID_REDLINING_VIEW_PB_UNDO ;
+ Text = "~Rückgängig" ;
+ 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 ] = "Åtgärd" ;
+ Text [ danish ] = "Handling" ;
+ Text [ italian ] = "Operazione" ;
+ Text [ spanish ] = "Acción" ;
+ Text [ french ] = "Action" ;
+ Text [ dutch ] = "Activiteit" ;
+ Text [ portuguese ] = "Acção" ;
+ 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 ] = "Posición" ;
+ Text [ french ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ portuguese ] = "Posição" ;
+ 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 ] = "Författare" ;
+ 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 ] = "Descripción" ;
+ Text [ french ] = "Description" ;
+ Text [ dutch ] = "Omschrijviing" ;
+ Text [ portuguese ] = "Comentário" ;
+ Text[ chinese_simplified ] = "˵Ã÷";
+ Text[ russian ] = "Îïèñàíèå";
+ Text[ polish ] = "Komentarz";
+ Text[ japanese ] = "ºÒÝÄ";
+ Text[ chinese_traditional ] = "´y­z";
+ Text[ arabic ] = "ÇáæÕÝ";
+ Text[ greek ] = "ÐåñéãñáöÞ";
+ Text[ korean ] = "¼³¸í";
+ Text[ turkish ] = "Açýklama";
+ Text[ language_user1 ] = " ";
+ };
+};
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
new file mode 100644
index 0000000000..b28a3110b8
--- /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 k”nnen
+
+ 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 0000000000..07e85b010e
--- /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 zurück
+|*
+\************************************************************************/
+
+RECT_POINT SvxRectCtl::GetActualRP() const
+{
+ return( eRP );
+}
+
+/*************************************************************************
+|*
+|* Gibt den aktuell ausgewaehlten RECT_POINT zurück
+|*
+\************************************************************************/
+
+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 0000000000..14c3ee7241
--- /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 0000000000..99c4e0b168
--- /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 0000000000..965a499a34
--- /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 0000000000..beb5c2abd1
--- /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 0000000000..2f0ed20411
--- /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 0000000000..0f58ec3f4f
--- /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 0000000000..9aefe1e722
--- /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 0000000000..1a376920fc
--- /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 ] = "Vänster";
+ 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 ] = "Poœrodku";
+ 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 ] = "Distância";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ greek ] = "Áðüóôáóç";
+ Text[ dutch ] = "Afstand";
+ Text[ french ] = "Écart";
+ Text[ spanish ] = "Espacio";
+ Text[ italian ] = "Distanza";
+ Text[ danish ] = "Afstand";
+ Text[ swedish ] = "Avstånd";
+ Text[ polish ] = "Odstêp";
+ Text[ portuguese_brazilian ] = "Distance";
+ Text[ japanese ] = "ŠÔŠu";
+ Text[ korean ] = "°£°Ý";
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ chinese_traditional ] = "¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ";
+ Text[ turkish ] = "Aralýk";
+ };
+
+ 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 ] = "Højre";
+ Text[ swedish ] = "Höger";
+ 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 góry";
+ 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 ] = "Poœrodku";
+ 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 ] = "Distância";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ greek ] = "Áðüóôáóç";
+ Text[ dutch ] = "Afstand";
+ Text[ french ] = "Écart";
+ Text[ spanish ] = "Espacio";
+ Text[ italian ] = "Distanza";
+ Text[ danish ] = "Afstand";
+ Text[ swedish ] = "Avstånd";
+ Text[ polish ] = "Odstêp";
+ Text[ portuguese_brazilian ] = "Distance";
+ Text[ japanese ] = "ŠÔŠu";
+ Text[ korean ] = "°£°Ý";
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ chinese_traditional ] = "¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ";
+ Text[ turkish ] = "Aralýk";
+ };
+
+ 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 ] = "Aperçu";
+ Text[ spanish ] = "Previsualización";
+ Text[ italian ] = "Anteprima";
+ Text[ danish ] = "Eksempel";
+ Text[ swedish ] = "Förhandsvisning";
+ Text[ polish ] = "Podgl¹d";
+ Text[ portuguese_brazilian ] = "Preview";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ÇáãÚÇíäÉ";
+ Text[ turkish ] = "Önizleme";
+ };
+ Text[ portuguese ] = "Distribuição...";
+ Text[ russian ] = "Ðàñïðåäåëåíèå";
+ Text[ greek ] = "ÊáôáíïìÞ..";
+ Text[ dutch ] = "Verdeling";
+ Text[ french ] = "Répartition";
+ Text[ spanish ] = "Distribución";
+ Text[ italian ] = "Distribuzione";
+ Text[ danish ] = "Distribution";
+ Text[ swedish ] = "Fördelning";
+ Text[ polish ] = "Rozmieszczenie";
+ Text[ portuguese_brazilian ] = "Distribution..";
+ Text[ japanese ] = "•ª•z...";
+ Text[ korean ] = "¹èºÐ";
+ Text[ chinese_simplified ] = "·Ö²¼";
+ Text[ chinese_traditional ] = "¤À¥¬";
+ Text[ arabic ] = "ÊæÒíÚ";
+ Text[ turkish ] = "Daðýtým";
+};
+
+// ********************************************************************** EOF
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
new file mode 100644
index 0000000000..bc927ef35e
--- /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 0000000000..9dbfb28496
--- /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
+#* zurück.
+#*
+#* 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
+#* zurück.
+#*
+#* 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 0000000000..379e69126d
--- /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 0000000000..75a2b469cb
--- /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 0000000000..789339bd4a
--- /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 ] = "Désactivé" ;
+ Text [ swedish ] = "Av" ;
+ Text [ danish ] = "Deaktiver" ;
+ Text [ portuguese ] = "Desactivar" ;
+ Text [ portuguese_brazilian ] = "Aus" ;
+ Text[ chinese_simplified ] = "ʧ»î";
+ Text[ russian ] = "Âûêë.";
+ Text[ polish ] = "Wy³¹cz";
+ 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 ] = "Upprätt" ;
+ 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 ] = "Hæld 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 ] = "¤ô¥­¶b¦V¶É±×";
+ Text[ arabic ] = "ÅãÇáÉ ÃÝÞíÉ";
+ Text[ greek ] = "ÁíáôñïðÞ ïñéæüíôéá";
+ Text[ korean ] = "¼öÆòÀ¸·Î ±â¿ï±â";
+ Text[ turkish ] = "Yatay eðim";
+ 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 ] = "Hæld 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 ] = "««ª½¶b¦V¶É±×";
+ Text[ arabic ] = "ÅãÇáÉ ÑÃÓíÉ";
+ Text[ greek ] = "ÁíáôñïðÞ êáôáêüñõöá";
+ Text[ korean ] = "¼öÁ÷À¸·Î ±â¿ï±â";
+ Text[ turkish ] = "Dikey eðim";
+ 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 ] = "Orientación" ;
+ Text [ french ] = "Orientation" ;
+ Text [ swedish ] = "Löpriktning" ;
+ Text [ danish ] = "Retning" ;
+ Text [ portuguese ] = "Orientação" ;
+ 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 yönü";
+ 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? Linksbündig : Linksb³ndig */
+ /* ### ACHTUNG: Neuer Text in Resource? Linksbündig : Linksb³ndig */
+ Text = "Linksbündig" ;
+ 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 ] = "Vänsterjusterad" ;
+ Text [ danish ] = "Venstrejusteret" ;
+ Text [ portuguese ] = "À esquerda" ;
+ Text [ portuguese_brazilian ] = "Linksbündig" ;
+ Text[ chinese_simplified ] = "Ïò×ó¶ÔÆë";
+ Text[ russian ] = "Âûðîâíÿòü ïî ëåâîìó êðàþ";
+ Text[ polish ] = "Wyrównaj 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 ] = "Wyœrodkuj";
+ 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? Rechtsbündig : Rechtsb³ndig */
+ /* ### ACHTUNG: Neuer Text in Resource? Rechtsbündig : Rechtsb³ndig */
+ Text = "Rechtsbündig" ;
+ 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 ] = "Högerjusterad" ;
+ Text [ danish ] = "Højrejusteret" ;
+ Text [ portuguese ] = "À direita" ;
+ Text [ portuguese_brazilian ] = "Rechtsbündig" ;
+ Text[ chinese_simplified ] = "ÓÒ¶ÔÆë";
+ Text[ russian ] = "Âûðîâíÿòü ïî ïðàâîìó êðàþ";
+ Text[ polish ] = "Wyrównaj do prawej";
+ Text[ japanese ] = "‰E‘µ‚¦";
+ Text[ chinese_traditional ] = "¦V¥k¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ Åáì Çáíãíä";
+ Text[ greek ] = "Óôïß÷éóç äåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ ¹è¿­";
+ Text[ turkish ] = "Saða 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-Textgröße : Auto-Textgr÷˜e */
+ /* ### ACHTUNG: Neuer Text in Resource? Auto-Textgröße : Auto-Textgr÷˜e */
+ Text = "Auto-Textgröße" ;
+ 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 ] = "Tamaño automático de texto" ;
+ Text [ french ] = "Taille du texte adaptée" ;
+ Text [ swedish ] = "AutoTextstorlek" ;
+ Text [ danish ] = "AutoTekststørrelse" ;
+ Text [ portuguese ] = "Tamanho automático - texto" ;
+ Text [ portuguese_brazilian ] = "Auto-Textgröße" ;
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷ÕûÎÄ×Ö´óС";
+ Text[ russian ] = "Àâòîðàçìåð òåêñòà";
+ Text[ polish ] = "Rozmiar autotekstu";
+ Text[ japanese ] = "Ž©“®Ã·½Ä»²½Þ";
+ Text[ chinese_traditional ] = "¦Û°Ê¤å¦r¤j¤p";
+ 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 ] = "Distância" ;
+ QuickHelpText [ portuguese_brazilian ] = "Abstand" ;
+ QuickHelpText [ swedish ] = "Avstånd" ;
+ 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 ] = "Sangría" ;
+ CustomUnitText [ french ] = "-" ;
+ QuickHelpText [ french ] = "Retrait" ;
+ QuickHelpText [ dutch ] = "1e regel inspringen" ;
+ QuickHelpText [ portuguese ] = "Avanço" ;
+ 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 ] = "Désactivé" ;
+ Text [ dutch ] = "Uit" ;
+ Text [ swedish ] = "Av" ;
+ Text [ danish ] = "Deaktiver" ;
+ Text [ portuguese ] = "Desactivar" ;
+ Text [ portuguese_brazilian ] = "Aus" ;
+ Text[ chinese_simplified ] = "È¡ÏûÒõÓ°";
+ Text[ russian ] = "Âûêë.";
+ Text[ polish ] = "Wy³¹cz";
+ 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 ] = "Lodrätt" ;
+ 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 ] = "Hæld" ;
+ 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 ] = "Eðim";
+ 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 ] = "degrés" ;
+ 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 ] = "Distância X" ;
+ QuickHelpText [ portuguese_brazilian ] = "Abstand X" ;
+ QuickHelpText [ swedish ] = "Avstånd 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 ] = "Distância Y" ;
+ QuickHelpText [ portuguese_brazilian ] = "Abstand Y" ;
+ CustomUnitText [ portuguese ] = "%" ;
+ CustomUnitText [ english_us ] = "%" ;
+ CustomUnitText [ portuguese_brazilian ] = "%" ;
+ CustomUnitText [ swedish ] = "%" ;
+ QuickHelpText [ swedish ] = "Avstånd 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 färg" ;
+ 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 ] = "³±¼vÃC¦â";
+ 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 ] = "¬ü³N¦r«¬";
+ 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-círculo superior" ;
+ Text [ french ] = "Demi-cercle supérieur" ;
+ Text [ dutch ] = "Bovenste halve cirkel" ;
+ Text [ spanish ] = "Semicírculo 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 ] = "Górne pó³kole";
+ Text[ japanese ] = "㔼‰~";
+ Text[ chinese_traditional ] = "¤W¥b¶ê";
+ Text[ arabic ] = "äÕÝ ÇáÏÇÆÑÉ ÇáÃÚáì";
+ Text[ greek ] = "¢íù çìéêýêëéï";
+ Text[ korean ] = "À§ÂÊ ¹Ý¿ø";
+ Text[ turkish ] = "Üst yarým 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-círculo inferior" ;
+ Text [ french ] = "Demi-cercle inférieur" ;
+ Text [ dutch ] = "Onderste halve cirkel" ;
+ Text [ spanish ] = "Semicírculo 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 pó³kole";
+ Text[ japanese ] = "‰º”¼‰~";
+ Text[ chinese_traditional ] = "¤U¥b¶ê";
+ Text[ arabic ] = "äÕÝ ÇáÏÇÆÑÉ ÇáÃÏäì";
+ Text[ greek ] = "ÊÜôù çìéêýêëéï";
+ Text[ korean ] = "¾Æ·¡ÂÊ ¹Ý¿ø";
+ Text[ turkish ] = "Alt yarým 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-círculo esquerdo" ;
+ Text [ french ] = "Demi-cercle gauche" ;
+ Text [ dutch ] = "Linker halve cirkel" ;
+ Text [ spanish ] = "Semicírculo izquierdo" ;
+ Text [ danish ] = "Venstre halvcirkel" ;
+ Text [ swedish ] = "Vänster halvcirkel" ;
+ Text [ finnish ] = "Left half circle" ;
+ Text [ english_us ] = "Left Semicircle" ;
+ Text[ chinese_simplified ] = "×ó°ëÔ²";
+ Text[ russian ] = "Ëåâûé ïîëóêðóã";
+ Text[ polish ] = "Lewe pó³kole";
+ Text[ japanese ] = "¶”¼‰~";
+ Text[ chinese_traditional ] = "¥ª¥b¶ê";
+ Text[ arabic ] = "äÕÝ ÏÇÆÑÉ ÃíÓÑ";
+ Text[ greek ] = "Áñéóôåñü çìéêýêëéï";
+ Text[ korean ] = "¿ÞÂÊ ¹Ý¿ø";
+ Text[ turkish ] = "Sol yarým 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-círculo direito" ;
+ Text [ french ] = "Demi-cercle droit" ;
+ Text [ dutch ] = "Rechter halve cirkel" ;
+ Text [ spanish ] = "Semicírculo derecho" ;
+ Text [ danish ] = "Højre halvcirkel" ;
+ Text [ swedish ] = "Höger halvcirkel" ;
+ Text [ finnish ] = "Right half circle" ;
+ Text [ english_us ] = "Right Semicircle" ;
+ Text[ chinese_simplified ] = "ÓÒ°ëÔ²";
+ Text[ russian ] = "Ïðàâûé ïîëóêðóã";
+ Text[ polish ] = "Prawe pó³kole";
+ Text[ japanese ] = "‰E”¼‰~";
+ Text[ chinese_traditional ] = "¥k¥b¶ê";
+ Text[ arabic ] = "äÕÝ ÏÇÆÑÉ Ãíãä";
+ Text[ greek ] = "Äåîéü çìéêýêëéï";
+ Text[ korean ] = "¿À¸¥ÂÊ ¹Ý¿ø";
+ Text[ turkish ] = "Sað yarým 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 supérieur" ;
+ Text [ dutch ] = "Bovenste boog" ;
+ Text [ spanish ] = "Arco superior de círculo" ;
+ Text [ danish ] = "Buet opad" ;
+ Text [ swedish ] = "Övre cirkelbåge" ;
+ Text [ finnish ] = "Top arc" ;
+ Text [ english_us ] = "Upper Arc" ;
+ Text[ chinese_simplified ] = "ÉÏÔ²»¡";
+ Text[ russian ] = "Âåðõíÿÿ äóãà";
+ Text[ polish ] = "Górny ³uk ko³a";
+ 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 inférieur" ;
+ Text [ dutch ] = "Onderste boog" ;
+ Text [ spanish ] = "Arco inferior de círculo" ;
+ Text [ danish ] = "Buet nedad" ;
+ Text [ swedish ] = "Undre cirkelbåge" ;
+ Text [ finnish ] = "Bottom arc" ;
+ Text [ english_us ] = "Lower Arc" ;
+ Text[ chinese_simplified ] = "ÏÂÔ²»¡";
+ Text[ russian ] = "Íèæíÿÿ äóãà";
+ Text[ polish ] = "Dolny ³uk ko³a";
+ 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 círculo" ;
+ Text [ danish ] = "Venstre bue" ;
+ Text [ swedish ] = "Vänster cirkelbåge" ;
+ Text [ finnish ] = "Left arc" ;
+ Text [ english_us ] = "Left Arc" ;
+ Text[ chinese_simplified ] = "×óÔ²»¡";
+ Text[ russian ] = "Ëåâàÿ äóãà";
+ Text[ polish ] = "Lewy ³uk ko³a";
+ 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 círculo" ;
+ Text [ danish ] = "Højre bue" ;
+ Text [ swedish ] = "Höger cirkelbåge" ;
+ Text [ finnish ] = "Right arc" ;
+ Text [ english_us ] = "Right Arc" ;
+ Text[ chinese_simplified ] = "ÓÒÔ²»¡";
+ Text[ russian ] = "Ïðàâàÿ äóãà";
+ Text[ polish ] = "Prawy ³uk ko³a";
+ 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 ] = "Círculo 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 ko³o";
+ Text[ japanese ] = "㉺‰~ŒÊ";
+ Text[ chinese_traditional ] = "¤£«Ê³¬ªº¶ê§Î";
+ Text[ arabic ] = "ÏÇÆÑÉ ãÝÊæÍÉ";
+ Text[ greek ] = "Áíïé÷ôüò êýêëïò";
+ Text[ korean ] = "¿­¸° ¿ø";
+ Text[ turkish ] = "Açýk 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 ] = "Círculo cerrado" ;
+ Text [ danish ] = "Cirkulær" ;
+ Text [ swedish ] = "Stängd cirkel" ;
+ Text [ finnish ] = "Closed circle" ;
+ Text [ english_us ] = "Closed Circle" ;
+ Text[ chinese_simplified ] = "·â±ÕµÄÔ²ÐÎ";
+ Text[ russian ] = "Çàìêíóòûé êðóã";
+ Text[ polish ] = "Zamkniête ko³o";
+ 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 ] = "Círculo fechado II" ;
+ Text [ french ] = "Cercle fermé II" ;
+ Text [ dutch ] = "Gesloten cirkel II" ;
+ Text [ spanish ] = "Círculo cerrado II" ;
+ Text [ danish ] = "Cirkulær II" ;
+ Text [ swedish ] = "Stängd cirkel II" ;
+ Text [ finnish ] = "Closed circle II" ;
+ Text [ english_us ] = "Closed Circle II" ;
+ Text[ chinese_simplified ] = "·â±ÕµÄÔ² II";
+ Text[ russian ] = "Çàìêíóòûé êðóã II";
+ Text[ polish ] = "Zamkniête ko³o 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 ] = "Círculo aberto vertical" ;
+ Text [ french ] = "Cercle ouvert vertical" ;
+ Text [ dutch ] = "Open cirkel verticaal" ;
+ Text [ spanish ] = "Círculo abierto vertical" ;
+ Text [ danish ] = "Åben cirkel lodret" ;
+ Text [ swedish ] = "Öppen cirkel lodrätt" ;
+ Text [ finnish ] = "Open circle vertical" ;
+ Text [ english_us ] = "Open Circle Vertical" ;
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò²»·â±ÕµÄÔ²ÐÎ";
+ Text[ russian ] = "Âåðòèêàëüíûé íåçàìêíóòûé êðóã";
+ Text[ polish ] = "Otwarte ko³o w pionie";
+ Text[ japanese ] = "¶‰E‰~ŒÊ";
+ Text[ chinese_traditional ] = "««ª½ªº¤£«Ê³¬ªº¶ê§Î";
+ Text[ arabic ] = "ÏÇÆÑÉ ãÝÊæÍÉ ÑÃÓíÇð";
+ Text[ greek ] = "Áíïé÷ôüò êýêëïò êáôáêüñõöá";
+ Text[ korean ] = "¼öÁ÷ ¿­¸° ¿ø";
+ Text[ turkish ] = "Dikey açýk 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 ] = "Créer 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 ] = "Utwórz obiekt FontWork";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸ µÌÞ¼Þª¸Ä‚Ìì¬";
+ Text[ chinese_traditional ] = "¥Í¦¨¬ü³N¦r«¬ª«¥ó";
+ Text[ arabic ] = "ÅäÔÇÁ ßÇÆä FontWork";
+ Text[ greek ] = "Äçìéïõñãßá áíôéêåéìÝíïõ FontWork";
+ Text[ korean ] = "FontWork °³Ã¼ »ý¼º";
+ Text[ turkish ] = "FontWork nesnesi oluþtur";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
new file mode 100644
index 0000000000..827bbc4417
--- /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 0000000000..b3e63bd36e
--- /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 0000000000..e4ec3b2681
--- /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 0000000000..e3924bb5fb
--- /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 0000000000..899ba2ce26
--- /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 0000000000..4db48c5d06
--- /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 = "Größe" ;
+ Text [ ENGLISH ] = "Size" ;
+ Text [ norwegian ] = "Størrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ finnish ] = "Koko" ;
+ Text [ danish ] = "Størrelse" ;
+ Text [ french ] = "Taille" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ spanish ] = "Tamaño" ;
+ Text [ english_us ] = "Size" ;
+ Text[ chinese_simplified ] = "´óС";
+ Text[ russian ] = "Ðàçìåð";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "»²½Þ";
+ Text[ chinese_traditional ] = "¤j¤p";
+ 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 ] = "~Geniþlik";
+ };
+ 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 = "Höh~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 ] = "Højde" ;
+ 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 ] = "~Yükseklik";
+ };
+ 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 = "Maßstab" ;
+ Text [ ENGLISH ] = "Zoom" ;
+ Text [ english_us ] = "Scale" ;
+ Text [ italian ] = "Scala" ;
+ Text [ spanish ] = "Escala" ;
+ Text [ french ] = "Échelle" ;
+ Text [ dutch ] = "Schaal" ;
+ Text [ swedish ] = "Skala" ;
+ Text [ danish ] = "Målestok" ;
+ Text [ portuguese_brazilian ] = "Maßstab" ;
+ Text [ portuguese ] = "Escala" ;
+ Text[ chinese_simplified ] = "¿Ì¶È";
+ Text[ russian ] = "Ìàñøòàá";
+ Text[ polish ] = "Skala";
+ Text[ japanese ] = "½¹°Ù";
+ Text[ chinese_traditional ] = "Åã¥Ü¤ñ¨Ò";
+ Text[ arabic ] = "ÊßÈíÑ/ÊÕÛíÑ";
+ Text[ greek ] = "Êëßìáêá";
+ Text[ korean ] = "¹èÀ²";
+ Text[ turkish ] = "Ölçek";
+ };
+ 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~eniþlik";
+ };
+ 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 ] = "Højde" ;
+ 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 ] = "Skär till" ;
+ Text [ danish ] = "Beskær" ;
+ 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 ] = "Kýrp";
+ };
+ 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 ] = "~Vänster" ;
+ 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 ] = "~Höger" ;
+ Text [ danish ] = "Højre" ;
+ 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 górze";
+ 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 = "Größe beibehal~ten" ;
+ Text [ ENGLISH ] = "Keep size" ;
+ Text [ english_us ] = "Keep si~ze" ;
+ Text [ italian ] = "Mantieni dimensione" ;
+ Text [ spanish ] = "~Mantener el tamaño" ;
+ Text [ french ] = "Même ~taille" ;
+ Text [ dutch ] = "M~et behoud v. grootte" ;
+ Text [ swedish ] = "Bibehåll s~torlek" ;
+ Text [ danish ] = "Bevar størrelse" ;
+ Text [ portuguese_brazilian ] = "Größe beibehalten" ;
+ Text [ portuguese ] = "~Manter tamanho" ;
+ Text[ chinese_simplified ] = "±£³Ö´óС(~Z)";
+ Text[ russian ] = "Ñîõðàíèòü ðàçìåð";
+ Text[ polish ] = "Za~chowaj rozmiar";
+ Text[ japanese ] = "»²½Þ•ÛŽ(~Z)";
+ Text[ chinese_traditional ] = "«O«ù¤j¤p(~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 = "~Maßstab beibehalten" ;
+ Text [ ENGLISH ] = "Keep Zoom" ;
+ Text [ english_us ] = "Keep ~scale" ;
+ Text [ italian ] = "Mantieni scala" ;
+ Text [ spanish ] = "Mantener la ~escala" ;
+ Text [ french ] = "Même ~échelle" ;
+ Text [ dutch ] = "~Met behoud van schaal" ;
+ Text [ swedish ] = "Bibehåll s~kala" ;
+ Text [ danish ] = "Bevar målestok" ;
+ Text [ portuguese_brazilian ] = "Maßstab 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 ] = "~Orantýyý 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ 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~ginalgröße" ;
+ Text [ ENGLISH ] = "Real Size" ;
+ Text [ english_us ] = "~Original Size" ;
+ Text [ italian ] = "Dimens. ori~ginale" ;
+ Text [ spanish ] = "Tamaño ori~ginal" ;
+ Text [ french ] = "Taille d'~origine" ;
+ Text [ dutch ] = "~Originele grootte" ;
+ Text [ swedish ] = "Ori~ginalstorlek" ;
+ Text [ danish ] = "Oprindelig størrelse" ;
+ Text [ portuguese_brazilian ] = "Originalgröße" ;
+ Text [ portuguese ] = "Tamanho ~original" ;
+ Text[ chinese_simplified ] = "Ô­¼þ´óС(~O)";
+ Text[ russian ] = "Èñõîäíûé ðàçìåð";
+ Text[ polish ] = "~Rozmiar oryginalny";
+ Text[ japanese ] = "Œ³‚Ì»²½Þ(~O)";
+ Text[ chinese_traditional ] = "­ì¥ó¤j¤p(~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 0000000000..bdbe336d71
--- /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 0000000000..7a8411de00
--- /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 0000000000..287fb58086
--- /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 ] = "Cabeçalho" ;
+ Text [ portuguese ] = "Cabeçalho" ;
+ Text [ finnish ] = "Yläteksti" ;
+ Text [ danish ] = "Sidehoved" ;
+ Text [ french ] = "En-tête" ;
+ 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 ] = "Cabeçalho, ~com distância" ;
+ Text [ portuguese ] = "Activar ~cabeçalho" ;
+ Text [ finnish ] = "Yläteksti ~etäisyydellä" ;
+ Text [ danish ] = "Aktiver sidehoved" ;
+ Text [ french ] = "Activer l'~en-tête " ;
+ 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 ] = "~W³¹cz nag³ówek";
+ Text[ japanese ] = "ͯÀÞ‚ð•t‚¯‚é(~H)";
+ Text[ chinese_traditional ] = "Åã¥Ü­¶­º(~H)";
+ Text[ arabic ] = "ÅÙåÇÑ ÑÃÓ ÇáÕÝÍÉ";
+ Text[ greek ] = "Åíåñãïðïßçóç êåöáëßäáò";
+ Text[ korean ] = "¸Ó¸®±Û »ðÀÔ(~D)";
+ Text[ turkish ] = "~Üstbilgi oluþtur";
+ 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 ] = "~Höhe" ;
+ Text [ swedish ] = "A~vstånd" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ italian ] = "~Distanza" ;
+ Text [ spanish ] = "~Espacio" ;
+ Text [ french ] = "~Écart" ;
+ Text [ dutch ] = "~Afstand" ;
+ Text [ portuguese ] = "~Espaçamento" ;
+ Text[ chinese_simplified ] = "¼ä¸ô(~S)";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ polish ] = "Odstêp";
+ Text[ japanese ] = "ŠÔŠu(~S)";
+ Text[ chinese_traditional ] = "¶¡¹j(~S)";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ";
+ Text[ greek ] = "Á~ðüóôáóç";
+ Text[ korean ] = "°£°Ý(~S)";
+ Text[ turkish ] = "U~zaklýk";
+ 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? ~Höhe : ~H÷he */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Höhe : ~H÷he */
+ Text = "~Höhe" ;
+ Text [ ENGLISH ] = "~Height" ;
+ Text [ english_us ] = "~Height" ;
+ Text [ portuguese_brazilian ] = "~Höhe" ;
+ Text [ swedish ] = "~Höjd" ;
+ Text [ danish ] = "Højde" ;
+ 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? Höhe ~dynamisch anpassen : H÷he ~dynamisch anpassen */
+ /* ### ACHTUNG: Neuer Text in Resource? Höhe ~dynamisch anpassen : H÷he ~dynamisch anpassen */
+ Text = "Höhe ~dynamisch anpassen" ;
+ Text [ ENGLISH ] = "~Dynamic height adjustment" ;
+ Text [ dutch ] = "Hoogte ~dynamisch aanpassen" ;
+ Text [ english_us ] = "~AutoFit height" ;
+ Text [ swedish ] = "An~passa höjd dynamiskt" ;
+ Text [ danish ] = "Juster højde dynamisk" ;
+ Text [ italian ] = "Adatta altezza din~amicamente" ;
+ Text [ spanish ] = "Ajus~te dinámico de la altura" ;
+ Text [ french ] = "Adaptation ~dynamique de la hauteur" ;
+ Text [ portuguese ] = "Ajuste ~dinâmico da altura" ;
+ Text [ portuguese_brazilian ] = "Höhe ~dynamisch anpassen" ;
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷Õû¸ß¶È(~A)";
+ Text[ russian ] = "Àâòîïîäáîð âûñîòû";
+ Text[ polish ] = "Autodopasowanie wysokoœci";
+ Text[ japanese ] = "‚‚³Ž©“®’²®(~A)";
+ Text[ chinese_traditional ] = "¦Û°Ê½Õ¾ã°ª«×(~A)";
+ Text[ arabic ] = "ãáÇÁãÉ ÇáÇÑÊÝÇÚ ÊáÞÇÆíÇð";
+ Text[ greek ] = "ÄõíáìéêÞ ðñïóáñìïãÞ ýøïõò";
+ Text[ korean ] = "³ôÀÌ ÀÚµ¿ ¸ÂÃã(~A)";
+ Text[ turkish ] = "Yüksekliði 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 ] = "~Cabeçalho da Margem Esquerda" ;
+ Text [ portuguese ] = "Margem ~esquerda" ;
+ Text [ finnish ] = "~Vasemman reunan yläteksti" ;
+ Text [ danish ] = "Venstre margen" ;
+ Text [ french ] = "Marge ~gauche" ;
+ Text [ swedish ] = "Vänstermargina~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 Cabeçalho" ;
+ Text [ portuguese ] = "Margem ~direita" ;
+ Text [ finnish ] = "~Oikean reunan yläteksti" ;
+ Text [ danish ] = "Højre margen" ;
+ Text [ french ] = "Marge ~droite" ;
+ Text [ swedish ] = "Höge~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 ~conteúdo esquerda/direita" ;
+ Text [ portuguese ] = "Mesmo ~conteúdo esquerda/direita" ;
+ Text [ finnish ] = "Sama ~sisältö vasemmalla/oikealla" ;
+ Text [ danish ] = "Ens indhold venstre/højre" ;
+ Text [ french ] = "~Contenu identique gauche/droite" ;
+ Text [ swedish ] = "Samma ~innehåll höger/vänster" ;
+ 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 ] = "¤º®e¥ª¥k¬Û¦P(~C)";
+ Text[ arabic ] = "äÝÓ ÇáãÍÊæíÇÊ Úáì ÇáíÓÇÑ/Çáíãíä";
+ Text[ greek ] = "ºäéï ðåñéå÷üìåíï áñéóôåñÜ/äåîéÜ";
+ Text[ korean ] = "³»¿ë ¿ÞÂÊ/¿À¸¥ÂÊ °°°Ô(~C)";
+ Text[ turkish ] = "Sol/sað içerik 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 ] = "Cabeçalho" ;
+ Text [ portuguese ] = "Cabeçalho" ;
+ Text [ finnish ] = "Yläteksti" ;
+ Text [ danish ] = "Sidehoved" ;
+ Text [ french ] = "En-tête" ;
+ Text [ swedish ] = "Sidhuvud" ;
+ Text [ dutch ] = "Koptekst" ;
+ Text [ spanish ] = "Encabezamiento" ;
+ Text [ english_us ] = "Headers" ;
+ Text[ chinese_simplified ] = "ҳü";
+ Text[ russian ] = "Âåðõíèé êîëîíòèòóë";
+ Text[ polish ] = "Nag³ówek";
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ 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 ] = "Opçõe~s..." ;
+ Text [ portuguese ] = "~Outros..." ;
+ Text [ finnish ] = "~Määritykset..." ;
+ 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~ýntýlar...";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ҳü";
+ Text[ russian ] = "Âåðõíèé êîëîíòèòóë";
+ Text[ polish ] = "Nag³ówek";
+ 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? Fußzeile : Fu˜zeile */
+ /* ### ACHTUNG: Neuer Text in Resource? Fußzeile : Fu˜zeile */
+ Text = "Fußzeile" ;
+ 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 página" ;
+ 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? ~Fußzeile einschalten : ~Fu˜zeile einschalten */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Fußzeile einschalten : ~Fu˜zeile einschalten */
+ Text = "~Fußzeile einschalten" ;
+ Text [ ENGLISH ] = "~Turn on Footer" ;
+ Text [ norwegian ] = "~Footer, with distance" ;
+ Text [ italian ] = "~Attiva piè di pagina" ;
+ Text [ portuguese_brazilian ] = "~Rodapé com distância" ;
+ Text [ portuguese ] = "Activar ~rodapé" ;
+ Text [ finnish ] = "~Alatekstin etäisyys" ;
+ 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 página" ;
+ Text [ english_us ] = "~Footer on" ;
+ Text[ chinese_simplified ] = "ÏÔʾҳ½Å(~F)";
+ Text[ russian ] = "Âêë. íèæíèé êîëîíòèòóë";
+ Text[ polish ] = "W³¹cz stopkê";
+ Text[ japanese ] = "̯À‚ð•t‚¯‚é(~‚e)";
+ Text[ chinese_traditional ] = "Åã¥Ü­¶§À(~F)";
+ Text[ arabic ] = "ÅÙåÇÑ ÊÐííá ÇáÕÝÍÉ";
+ Text[ greek ] = "Åíåñãïðïßçóç õðïóÝëéäï";
+ Text[ korean ] = "¹Ù´Ú±Û »ðÀÔ(~F)";
+ Text[ turkish ] = "A~ltbilgi oluþtur";
+ 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 ] = "~Höhe" ;
+ Text [ swedish ] = "A~vstånd" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ italian ] = "~Distanza" ;
+ Text [ spanish ] = "Es~pacio" ;
+ Text [ french ] = "~Écart" ;
+ Text [ dutch ] = "~Afstand" ;
+ Text [ portuguese ] = "~Espaçamento" ;
+ Text[ chinese_simplified ] = "¼ä¸ô(~S)";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ polish ] = "Odstêp";
+ Text[ japanese ] = "ŠÔŠu(~S)";
+ Text[ chinese_traditional ] = "¶¡¹j(~S)";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ";
+ Text[ greek ] = "Á~ðüóôáóç";
+ Text[ korean ] = "°£°Ý(~S)";
+ Text[ turkish ] = "~Uzaklýk";
+ 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? ~Höhe : ~H÷he */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Höhe : ~H÷he */
+ Text = "~Höhe" ;
+ Text [ ENGLISH ] = "~Height" ;
+ Disable = TRUE ;
+ Text [ english_us ] = "~Height" ;
+ Text [ portuguese_brazilian ] = "~Höhe" ;
+ Text [ swedish ] = "~Höjd" ;
+ Text [ danish ] = "Højde" ;
+ 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? Höhe ~dynamisch anpassen : H÷he ~dynamisch anpassen */
+ /* ### ACHTUNG: Neuer Text in Resource? Höhe ~dynamisch anpassen : H÷he ~dynamisch anpassen */
+ Text = "Höhe ~dynamisch anpassen" ;
+ Text [ ENGLISH ] = "~Dynamic height adjustment" ;
+ Text [ norwegian ] = "Footer height ~dynamic" ;
+ Text [ italian ] = "Adatta altezza din~amicamente" ;
+ Text [ portuguese_brazilian ] = "Rodapé dinâmica da ~altura" ;
+ Text [ portuguese ] = "Ajuste dinâmico da altura" ;
+ Text [ finnish ] = "Alatekstin korkeus ~dynaaminen" ;
+ Text [ danish ] = "Juster højde dynamisk" ;
+ Text [ french ] = "Adaptation ~dynamique de la hauteur" ;
+ Text [ swedish ] = "An~passa höjd dynamiskt" ;
+ Text [ dutch ] = "Hoogte ~dynamisch aanpassen" ;
+ Text [ spanish ] = "Aj~uste dinámico de la altura" ;
+ Text [ english_us ] = "~AutoFit height" ;
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷Õû¸ß¶È(~A)";
+ Text[ russian ] = "Àâòîïîäáîð âûñîòû";
+ Text[ polish ] = "Autodopasowanie wysokoœci";
+ Text[ japanese ] = "‚‚³Ž©“®’²®(~A)";
+ Text[ chinese_traditional ] = "¦Û°Ê½Õ¾ã°ª«×(~A)";
+ Text[ arabic ] = "ãáÇÁãÉ ÇáÇÑÊÝÇÚ ÊáÞÇÆíÇð";
+ Text[ greek ] = "ÄõíáìéêÞ ðñïóáñìïãÞ ýøïõò";
+ Text[ korean ] = "³ôÀÌ ÀÚµ¿Á¶Àý(~A)";
+ Text[ turkish ] = "Yüksekliði 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 ] = "Vänstermargina~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 ] = "Højre margen" ;
+ Text [ french ] = "Marge dro~ite" ;
+ Text [ swedish ] = "Höge~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 ~conteúdo esquerda/direita" ;
+ Text [ portuguese ] = "Mesmo ~conteúdo esquerda/direita" ;
+ Text [ finnish ] = "Sama ~sisältö vasemmalla/oikealla" ;
+ Text [ danish ] = "Ens indhold venstre/højre" ;
+ Text [ french ] = "~Contenu identique gauche/droite" ;
+ Text [ swedish ] = "Samma ~innehåll höger/vänster" ;
+ 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 ] = "¤º®e¥ª¥k¬Û¦P(~C)";
+ Text[ arabic ] = "äÝÓ ÇáãÍÊæíÇÊ Úáì ÇáíÓÇÑ/Çáíãíä";
+ Text[ greek ] = "ºäéï ðåñéå÷üìåíï áñéóôåñÜ/äåîéÜ";
+ Text[ korean ] = "³»¿ë ¿ÞÂÊ/¿À¸¥ÂÊ °°°Ô(~C)";
+ Text[ turkish ] = "Sol/sað içerik ay~ný";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_FRAME
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 157 , 125 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fußzeile : Fu˜zeile */
+ /* ### ACHTUNG: Neuer Text in Resource? Fußzeile : Fu˜zeile */
+ Text = "Fußzeile" ;
+ 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 página" ;
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ 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 ] = "~Opções..." ;
+ Text [ portuguese ] = "~Outros..." ;
+ Text [ finnish ] = "Määr~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~ýntýlar...";
+ 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 Fußzeilen löscht vorhandenen Text.\nMöchten Sie den Inhalt löschen? : Das Ausschalten der Kopf- oder Fu˜zeilen l÷scht vorhandenen Text.\nM÷chten Sie den Inhalt l÷schen? */
+ Message = "Das Ausschalten der Kopf- oder Fußzeilen löscht vorhandenen Text.\nMöchten Sie den Inhalt löschen?" ;
+ 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 cabeçalho ou o rodapé apagar seu conteúdo.\nTem certeza que deseja apagar este texto?" ;
+ Message [ portuguese ] = "Ao desactivar o cabeçalho ou o rodapé apaga o respectivo conteúdo.\nDeseja realmente eliminar o texto?" ;
+ Message [ finnish ] = "Jos poistat ylä/alatekstin, sen sisältö katoaa.\nHaluatko varmasti poistaa tämän tekstin?" ;
+ Message [ danish ] = "Hvis sidehoved eller sidefod deaktiveres, slettes indholdet.\nVil du slette indholdet?" ;
+ Message [ french ] = "Désactivez l'en-tête ou le pied de page pour supprimer son contenu.\nÊtes-vous sûr de vouloir supprimer ce texte ?" ;
+ Message [ swedish ] = "Deaktivering av sidhuvud eller sidfot raderar innehållet. \nVill Du radera innehållet?" ;
+ 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 página se eliminará su contenido.\n¿Desea 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 ] = "Wy³¹czenie stopki i nag³ówka spowoduje usuniêcie istniej¹cego tekstu. \nChcesz skasowaæ ten tekst?";
+ Message[ japanese ] = "ͯÀÞ‚Ü‚½‚Í̯À‚ðŠO‚·‚ÆŠY“–•”•ª‚Ì“à—e‚à휂³‚ê‚Ü‚·B\n휂µ‚Ä‚à‚æ‚낵‚¢‚Å‚·‚©?";
+ Message[ chinese_traditional ] = "¥¢¬¡­¶­º©Î­¶§À´N·|§R°£·í«e²{¦sªº¤å¦r¡C\n±z­n§R°£³o¨Ç¤å¦r¡H";
+ Message[ arabic ] = "ÅÎÝÇÁ ÑÃÓ/ ÊÐííá ÇáÕÝÍÉ ÓæÝ íÄÏí Åáì ÍÐÝ ÇáäÕ ÇáãæÌæÏ Ýíå.\nåá ÊÑíÏ ÈÇáÝÚá ÍÐÝ åÐÇ ÇáäÕ¿";
+ Message[ greek ] = "Ìå ôçí áðåíåñãïðïßçóç ôçò êåöáëßäáò Þ ôçò õðïêåöáëßäáò äéáãñÜöåôáé ôï õðÜñ÷ïí êåßìåíï. ÈÝëåôå íá \näéáãñáöåß ôï ðåñéå÷üìåíï;";
+ Message[ korean ] = "¸Ó¸®±ÛÀ̳ª ¹Ù´Ú±ÛÀ» ¾ø¾Ö¸é ±âÁ¸ÀÇ ÅؽºÆ®°¡ »èÁ¦µË´Ï´Ù. \n³»¿ëÀ» »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Message[ turkish ] = "Üstbilgi ve altbilginin kaldýrýlmasý ile mevcut metin silinecek.\nÝçeriði 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 0000000000..bbda8cb490
--- /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 0000000000..62166ec8b4
--- /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 0000000000..7ac29cecb2
--- /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 0000000000..c755cbfa60
--- /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 0000000000..1313d41912
--- /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 geöffnet 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 0000000000..2eae119713
--- /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 ] = "“K—p";
+ 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 = "Schließen";
+ 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 ] = "Stäng";
+ 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'intérieur du document";
+ Text[ spanish ] = "Destino en documento";
+ Text[ italian ] = "Destinazione nel documento";
+ Text[ danish ] = "Mål i dokumentet";
+ Text[ swedish ] = "Mål 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 içindeki 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 mål i dokumentet.";
+ Text[ swedish ] = "Det finns inga mål 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 içermiyor.";
+};
+
+String RID_SVXSTR_HYPDLG_ERR_LERR_DOCNOTOPEN
+{
+ Text = "Das Dokument konnte nicht geöffnet werden.";
+ Text [ ENGLISH ] = "Couldn't open the document." ;
+ Text [ english_us ] = "Couldn't open the document." ;
+ Text[ portuguese ] = "Foi impossível 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 mo¿na by³o otworzyæ dokumentu.";
+ Text[ portuguese_brazilian ] = "Couldn't open the document.";
+ Text[ japanese ] = "ÄÞ·­ÒÝÄ‚ÍŠJ‚¯‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ korean ] = "¹®¼­¸¦ ¿­Áö ¸øÇß½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÕâ¸öÎĵµ¡£";
+ Text[ chinese_traditional ] = "µLªk¶}±Ò¤å¥ó¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÝÊÍ ÇáãÓÊäÏ.";
+ Text[ turkish ] = "Belge açýlamadý.";
+};
+
diff --git a/svx/source/dialog/hltpbase.cxx b/svx/source/dialog/hltpbase.cxx
new file mode 100644
index 0000000000..fd3c327fde
--- /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 Adreßdatenbank 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 0000000000..93289b62d3
--- /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 0000000000..9456f06fb8
--- /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 hiperligação";
+ 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 hyperlänk";
+ Text[ polish ] = "Typ hiper³¹cza";
+ Text[ portuguese_brazilian ] = "Link Typ";
+ Text[ japanese ] = "ʲÊß°Øݸ‚ÌŽí—Þ";
+ Text[ korean ] = "ÇÏÀÌÆÛ¸µÅ©ÀÇ Á¾·ù";
+ Text[ chinese_simplified ] = "³¬Á´½ÓÀàÐÍ";
+ Text[ chinese_traditional ] = "±¶®|Ãþ«¬";
+ Text[ arabic ] = "äæÚ ÇáÇÑÊÈÇØ ÇáÊÔÚÈí";
+ Text[ turkish ] = "Hyperlink türü";
+ };
+ 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 ] = "Mål";
+ 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 açma 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 ] = "~Contraseña";
+ Text[ italian ] = "~Password";
+ Text[ danish ] = "Adgangskode";
+ Text[ swedish ] = "Lösen~ord";
+ Text[ polish ] = "Has³o";
+ Text[ portuguese_brazilian ] = "~Password";
+ Text[ japanese ] = "Ê߽ܰÄÞ(~P)";
+ Text[ korean ] = "Æнº¿öµå(~P)";
+ Text[ chinese_simplified ] = "¿ÚÁî(~P)";
+ Text[ chinese_traditional ] = "±K½X(~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 anónimo";
+ Text[ russian ] = "Àíîíèìíûé ïîëüçîâàòåëü";
+ Text[ greek ] = "Áíþíõìïò ÷ñÞóôçò";
+ Text[ dutch ] = "Anonieme gebr~uiker";
+ Text[ french ] = "Utilisateur ~Anonymous";
+ Text[ spanish ] = "Usuario ~anónimo";
+ Text[ italian ] = "~Utente anonimo";
+ Text[ danish ] = "Anonymous bruger";
+ Text[ swedish ] = "Anonym användare";
+ Text[ polish ] = "Anonimowy u¿ytkownik";
+ 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 ~kullanýcý";
+ 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 ] = "Przegl¹darka 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'intérieur du document";
+ QuickHelpText[ spanish ] = "Target";
+ QuickHelpText[ italian ] = "Destinazione";
+ QuickHelpText[ danish ] = "Mål i dokumentet";
+ QuickHelpText[ swedish ] = "Mål";
+ QuickHelpText[ polish ] = "Cel";
+ QuickHelpText[ portuguese_brazilian ] = "Target";
+ QuickHelpText[ japanese ] = "ÄÞ·­ÒÝÄ‚É‚ ‚éÀ°¹Þ¯Ä";
+ QuickHelpText[ korean ] = "Target";
+ QuickHelpText[ chinese_simplified ] = "Ä¿±ê";
+ QuickHelpText[ chinese_traditional ] = "¤å¥ó¤ºªº¥Ø¼Ð";
+ QuickHelpText[ arabic ] = "ÇáåÏÝ Ýí ÇáãÓÊäÏ";
+ };
+
+ Text[ portuguese ] = "Hiperligação";
+ Text[ russian ] = "Ãèïåðññûëêà";
+ Text[ greek ] = "Õðåñ-óýíäåóç";
+ Text[ dutch ] = "Hyperlink";
+ Text[ french ] = "Hyperlien";
+ Text[ spanish ] = "Hiperenlace";
+ Text[ italian ] = "Hyperlink";
+ Text[ danish ] = "Hyperlink";
+ Text[ swedish ] = "Hyperlänk";
+ Text[ polish ] = "Hiper³¹cze";
+ Text[ portuguese_brazilian ] = "Hyperlink";
+ Text[ japanese ] = "ʲÊß°Øݸ";
+ Text[ korean ] = "ÇÏÀÌÆÛ¸µÅ©";
+ Text[ chinese_simplified ] = "³¬Á´½Ó";
+ Text[ chinese_traditional ] = "¶W³sµ²";
+ 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 opções";
+ Text[ russian ] = "Äîïîëíèòåëüíûå íàñòðîéêè";
+ Text[ greek ] = "Ðåñéóóüôåñåò ñõèìßóåéò";
+ Text[ dutch ] = "Verdere opties";
+ Text[ french ] = "Autres paramètres";
+ Text[ spanish ] = "Otras opciones";
+ Text[ italian ] = "Ulteriori impostazioni";
+ Text[ danish ] = "Flere indstillinger";
+ Text[ swedish ] = "Fler inställningar";
+ Text[ polish ] = "Dodatkowe ustawienia";
+ Text[ portuguese_brazilian ] = "More options";
+ Text[ japanese ] = "‚»‚Ì‘¼‚ÌÝ’è";
+ Text[ korean ] = "±×¹ÛÀÇ ¼³Á¤";
+ Text[ chinese_simplified ] = "¸½¼ÓÉ趨";
+ Text[ chinese_traditional ] = "¨ä¥¦³]©w";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ ÅÖÇÝíÉ";
+ Text[ turkish ] = "Diðer 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 ; > ;
+ < "Botão" ; 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 ; > ;
+ < "Botón" ; 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 ; > ;
+ < "Düðme" ; 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~dicación";
+ Text[ italian ] = "Nota";
+ Text[ danish ] = "Tekst";
+ Text[ swedish ] = "Hän~visning";
+ Text[ polish ] = "Wskazówka";
+ Text[ portuguese_brazilian ] = "In~dication";
+ Text[ japanese ] = "•¶Žš—ñ(~K)";
+ Text[ korean ] = "Âü°í(~N)";
+ Text[ chinese_simplified ] = "ÌáʾÎÄ×Ö(~N)";
+ Text[ chinese_traditional ] = "¤å¦r(~K)";
+ Text[ arabic ] = "ÇáäÕ";
+ Text[ turkish ] = "~Baðlantý 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 ] = "Événements";
+ QuickHelpText[ spanish ] = "Script";
+ QuickHelpText[ italian ] = "Eventi";
+ QuickHelpText[ danish ] = "Begivenheder";
+ QuickHelpText[ swedish ] = "Händelser";
+ 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 & wiadomoœci";
+ Text[ portuguese_brazilian ] = "Mail & News";
+ Text[ japanese ] = "Mail & Æ­°½";
+ Text[ korean ] = "¸ÞÀÏ & ´º½º";
+ Text[ chinese_simplified ] = "µç×ÓÓʼþºÍÐÂÎÅ×é";
+ Text[ chinese_traditional ] = "¹q¤l¶l¥ó©M·s»D¸s²Õ";
+ 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 ] = "¹q¤l¶l¥ó(~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~moœci";
+ Text[ portuguese_brazilian ] = "~News";
+ Text[ japanese ] = "Æ­°½(~N)";
+ Text[ korean ] = "´º½º(~N)";
+ Text[ chinese_simplified ] = "ÐÂÎÅ(~N)";
+ Text[ chinese_traditional ] = "·s»D(~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~mpfänger";
+ Text [ ENGLISH ] = "Re~ceiver" ;
+ Text [ english_us ] = "Re~ceiver" ;
+ Text[ portuguese ] = "D~estinatário";
+ 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~lýcý";
+ };
+ 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~gående";
+ 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 ] = "Ksi¹¿ka adresowa";
+ QuickHelpText[ portuguese_brazilian ] = "Adressbook";
+ QuickHelpText[ japanese ] = "±ÄÞÚ½’£";
+ QuickHelpText[ korean ] = "Adressbook";
+ QuickHelpText[ chinese_simplified ] = "ͨѶ²¾";
+ QuickHelpText[ chinese_traditional ] = "³q°T¿ý";
+ 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 opções";
+ Text[ russian ] = "Äîïîëíèòåëüíûå íàñòðîéêè";
+ Text[ greek ] = "Ðåñéóóüôåñåò ñõèìßóåéò";
+ Text[ dutch ] = "Verdere opties";
+ Text[ french ] = "Autres paramètres";
+ Text[ spanish ] = "Otras opciones";
+ Text[ italian ] = "Ulteriori impostazioni";
+ Text[ danish ] = "Flere indstillinger";
+ Text[ swedish ] = "Fler inställningar";
+ Text[ polish ] = "Dodatkowe ustawienia";
+ Text[ portuguese_brazilian ] = "More options";
+ Text[ japanese ] = "‚»‚Ì‘¼‚ÌÝ’è";
+ Text[ korean ] = "±×¹ÛÀÇ ¼³Á¤";
+ Text[ chinese_simplified ] = "¸½¼ÓÉ趨";
+ Text[ chinese_traditional ] = "¨ä¥¦³]©w";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ ÅÖÇÝíÉ";
+ Text[ turkish ] = "Diðer 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 ; > ;
+ < "Botão" ; 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 ; > ;
+ < "Botón" ; 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 ; > ;
+ < "Düðme" ; 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~dicación";
+ Text[ italian ] = "Nota";
+ Text[ danish ] = "Tekst";
+ Text[ swedish ] = "Hän~visning";
+ Text[ polish ] = "Wskazówka";
+ Text[ portuguese_brazilian ] = "In~dication";
+ Text[ japanese ] = "•¶Žš—ñ(~K)";
+ Text[ korean ] = "Âü°í(~N)";
+ Text[ chinese_simplified ] = "ÌáʾÎÄ×Ö(~N)";
+ Text[ chinese_traditional ] = "¤å¦r(~K)";
+ Text[ arabic ] = "ÇáäÕ";
+ Text[ turkish ] = "~Baðlantý 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 ] = "Événements";
+ QuickHelpText[ spanish ] = "Script";
+ QuickHelpText[ italian ] = "Eventi";
+ QuickHelpText[ danish ] = "Begivenheder";
+ QuickHelpText[ swedish ] = "Händelser";
+ QuickHelpText[ polish ] = "Wydarzenia";
+ QuickHelpText[ portuguese_brazilian ] = "Script";
+ QuickHelpText[ japanese ] = "²ÍÞÝÄ";
+ QuickHelpText[ korean ] = "Script";
+ QuickHelpText[ chinese_simplified ] = "ʼþ";
+ QuickHelpText[ chinese_traditional ] = "¨Æ¥ó";
+ QuickHelpText[ arabic ] = "ÃÍÏÇË";
+ };
+
+ Text[ portuguese ] = "Hiperligação";
+ Text[ russian ] = "Ãèïåðññûëêà";
+ Text[ greek ] = "Õðåñ-óýíäåóç";
+ Text[ dutch ] = "Hyperlink";
+ Text[ french ] = "Hyperlien";
+ Text[ spanish ] = "Hiperenlace";
+ Text[ italian ] = "Hyperlink";
+ Text[ danish ] = "Hyperlink";
+ Text[ swedish ] = "Hyperlänk";
+ Text[ polish ] = "Hiper³¹cze";
+ Text[ portuguese_brazilian ] = "Hyperlink";
+ Text[ japanese ] = "ʲÊß°Øݸ";
+ Text[ korean ] = "ÇÏÀÌÆÛ¸µÅ©";
+ Text[ chinese_simplified ] = "³¬Á´½Ó";
+ Text[ chinese_traditional ] = "¶W³sµ²";
+ 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ö~kväg";
+ Text[ polish ] = "Œcie¿ka";
+ 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 ] = "Otwórz 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'intérieur du document";
+ Text[ spanish ] = "Destino en el documento";
+ Text[ italian ] = "Destinazione all'interno del documento";
+ Text[ danish ] = "Mål i dokumentet";
+ Text[ swedish ] = "Mål 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 içindeki 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 ] = "Mål";
+ 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 próbny";
+ 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'intérieur du document";
+ QuickHelpText[ spanish ] = "Target in document";
+ QuickHelpText[ italian ] = "Destinazione nel documento";
+ QuickHelpText[ danish ] = "Mål i dokumentet";
+ QuickHelpText[ swedish ] = "Mål 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 opções";
+ Text[ russian ] = "Äîïîëíèòåëüíûå íàñòðîéêè";
+ Text[ greek ] = "Ðåñéóóüôåñåò ñõèìßóåéò";
+ Text[ dutch ] = "Verdere opties";
+ Text[ french ] = "Autres paramètres";
+ Text[ spanish ] = "Otras opciones";
+ Text[ italian ] = "Ulteriori impostazioni";
+ Text[ danish ] = "Flere indstillinger";
+ Text[ swedish ] = "Fler inställningar";
+ Text[ polish ] = "Dodatkowe ustawienia";
+ Text[ portuguese_brazilian ] = "More options";
+ Text[ japanese ] = "‚»‚Ì‘¼‚ÌÝ’è";
+ Text[ korean ] = "±×¹ÛÀÇ ¼³Á¤";
+ Text[ chinese_simplified ] = "¸½¼ÓÉ趨";
+ Text[ chinese_traditional ] = "¨ä¥¦³]©w";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ ÅÖÇÝíÉ";
+ Text[ turkish ] = "Diðer 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 ; > ;
+ < "Botão" ; 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 ; > ;
+ < "Botón" ; 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 ; > ;
+ < "Düðme" ; 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~dicación";
+ Text[ italian ] = "Nota";
+ Text[ danish ] = "Tekst";
+ Text[ swedish ] = "Hän~visning";
+ Text[ polish ] = "Wskazówka";
+ Text[ portuguese_brazilian ] = "In~dication";
+ Text[ japanese ] = "•¶Žš—ñ(~K)";
+ Text[ korean ] = "Âü°í(~N)";
+ Text[ chinese_simplified ] = "ÌáʾÎÄ×Ö(~N)";
+ Text[ chinese_traditional ] = "¤å¦r(~K)";
+ Text[ arabic ] = "ÇáäÕ";
+ Text[ turkish ] = "~Baðlantý 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 ] = "Événements";
+ QuickHelpText[ spanish ] = "Script";
+ QuickHelpText[ italian ] = "Eventi";
+ QuickHelpText[ danish ] = "Begivenheder";
+ QuickHelpText[ swedish ] = "Händelser";
+ QuickHelpText[ polish ] = "Wydarzenia";
+ QuickHelpText[ portuguese_brazilian ] = "Script";
+ QuickHelpText[ japanese ] = "²ÍÞÝÄ";
+ QuickHelpText[ korean ] = "Script";
+ QuickHelpText[ chinese_simplified ] = "ʼþ";
+ QuickHelpText[ chinese_traditional ] = "¨Æ¥ó";
+ QuickHelpText[ arabic ] = "ÃÍÏÇË";
+ };
+ Text[ portuguese ] = "Hiperligação";
+ Text[ russian ] = "Ãèïåðññûëêà";
+ Text[ greek ] = "Õðåñ-óýíäåóç";
+ Text[ dutch ] = "Hyperlink";
+ Text[ french ] = "Hyperlien";
+ Text[ spanish ] = "Hiperenlace";
+ Text[ italian ] = "Hyperlink";
+ Text[ danish ] = "Hyperlink";
+ Text[ swedish ] = "Hyperlänk";
+ Text[ polish ] = "Hiper³¹cze";
+ Text[ portuguese_brazilian ] = "Hyperlink";
+ Text[ japanese ] = "ʲÊß°Øݸ";
+ Text[ korean ] = "ÇÏÀÌÆÛ¸µÅ©";
+ Text[ chinese_simplified ] = "³¬Á´½Ó";
+ Text[ chinese_traditional ] = "¶W³sµ²";
+ 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 ] = "V‹KÄÞ·­ÒÝÄ";
+ 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 düzenle";
+ };
+ RadioButton RB_EDITLATER
+ {
+ Pos = MAP_APPFONT( 114, 13 );
+ Size = MAP_APPFONT( 59, 10 );
+ Text = "~Später 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 más tarde";
+ Text[ italian ] = "Modifica dopo";
+ Text[ danish ] = "Rediger senere";
+ Text[ swedish ] = "Redigera ~senare";
+ Text[ polish ] = "Edytuj póŸniej";
+ Text[ portuguese_brazilian ] = "Edit ~later";
+ Text[ japanese ] = "Œã‚Å•ÒW(~L)";
+ Text[ korean ] = "³ªÁß¿¡ ÆíÁý(~L)";
+ Text[ chinese_simplified ] = "ÒÔºó±à¼­(~L)";
+ Text[ chinese_traditional ] = "¥H«á½s¿è(~L)";
+ Text[ arabic ] = "ÊÍÑíÑ ÝíãÇ ÈÚÏ";
+ Text[ turkish ] = "~Sonra düzenle";
+ };
+ 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 auswählen" ;
+ 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 auswählen" */
+ QuickHelpText[ portuguese ] = "Create";
+ QuickHelpText[ russian ] = "Âûáðàòü ïóòü";
+ QuickHelpText[ greek ] = "ÅðéëïãÞ äéáäñïìÞò";
+ QuickHelpText[ dutch ] = "Pad selecteren";
+ QuickHelpText[ french ] = "Sélectionner le chemin";
+ QuickHelpText[ spanish ] = "Create";
+ QuickHelpText[ italian ] = "Seleziona percorso";
+ QuickHelpText[ danish ] = "Vælg sti";
+ QuickHelpText[ swedish ] = "Välj ut sökväg";
+ QuickHelpText[ polish ] = "Wybierz œcie¿kê";
+ 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 opções";
+ Text[ russian ] = "Äîïîëíèòåëüíûå íàñòðîéêè";
+ Text[ greek ] = "Ðåñéóóüôåñåò ñõèìßóåéò";
+ Text[ dutch ] = "Verdere opties";
+ Text[ french ] = "Autres paramètres";
+ Text[ spanish ] = "Otras opciones";
+ Text[ italian ] = "Ulteriori impostazioni";
+ Text[ danish ] = "Flere indstillinger";
+ Text[ swedish ] = "Fler inställningar";
+ Text[ polish ] = "Dodatkowe ustawienia";
+ Text[ portuguese_brazilian ] = "More options";
+ Text[ japanese ] = "‚»‚Ì‘¼‚ÌÝ’è";
+ Text[ korean ] = "±×¹ÛÀÇ ¼³Á¤";
+ Text[ chinese_simplified ] = "¸½¼ÓÉ趨";
+ Text[ chinese_traditional ] = "¨ä¥¦³]©w";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ ÅÖÇÝíÉ";
+ Text[ turkish ] = "Diðer 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 ; > ;
+ < "Botão" ; 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 ; > ;
+ < "Botón" ; 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 ; > ;
+ < "Düðme" ; 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~dicación";
+ Text[ italian ] = "Nota";
+ Text[ danish ] = "Tekst";
+ Text[ swedish ] = "Hän~visning";
+ Text[ polish ] = "Wskazówka";
+ Text[ portuguese_brazilian ] = "In~dication";
+ Text[ japanese ] = "•¶Žš—ñ(~K)";
+ Text[ korean ] = "Âü°í(~N)";
+ Text[ chinese_simplified ] = "ÌáʾÎÄ×Ö(~N)";
+ Text[ chinese_traditional ] = "¤å¦r(~K)";
+ Text[ arabic ] = "ÇáäÕ";
+ Text[ turkish ] = "~Baðlantý 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 ] = "Événements";
+ QuickHelpText[ spanish ] = "Script";
+ QuickHelpText[ italian ] = "Eventi";
+ QuickHelpText[ danish ] = "Begivenheder";
+ QuickHelpText[ swedish ] = "Händelser";
+ QuickHelpText[ polish ] = "Wydarzenia";
+ QuickHelpText[ portuguese_brazilian ] = "Script";
+ QuickHelpText[ japanese ] = "²ÍÞÝÄ";
+ QuickHelpText[ korean ] = "Script";
+ QuickHelpText[ chinese_simplified ] = "ʼþ";
+ QuickHelpText[ chinese_traditional ] = "¨Æ¥ó";
+ QuickHelpText[ arabic ] = "ÃÍÏÇË";
+ };
+ Text[ portuguese ] = "Hiperligação";
+ Text[ russian ] = "Ãèïåðññûëêà";
+ Text[ greek ] = "Õðåñ-óýíäåóç";
+ Text[ dutch ] = "Hyperlink";
+ Text[ french ] = "Hyperlien";
+ Text[ spanish ] = "Hiperenlace";
+ Text[ italian ] = "Hyperlink";
+ Text[ danish ] = "Hyperlink";
+ Text[ swedish ] = "Hyperlänk";
+ Text[ polish ] = "Hiper³¹cze";
+ Text[ portuguese_brazilian ] = "Hyperlink";
+ Text[ japanese ] = "ʲÊß°Øݸ";
+ Text[ korean ] = "ÇÏÀÌÆÛ¸µÅ©";
+ Text[ chinese_simplified ] = "³¬Á´½Ó";
+ Text[ chinese_traditional ] = "¶W³sµ²";
+ 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 ] = "Hiperligação";
+ Text[ russian ] = "Ãèïåðññûëêà";
+ Text[ greek ] = "Õðåñ-óýíäåóç";
+ Text[ dutch ] = "Hyperlink";
+ Text[ french ] = "Hyperlien";
+ Text[ spanish ] = "Hiperenlace";
+ Text[ italian ] = "Hyperlink";
+ Text[ danish ] = "Hyperlink";
+ Text[ swedish ] = "Hyperlänk";
+ Text[ polish ] = "Hiper³¹cze";
+ Text[ portuguese_brazilian ] = "Hyperlink";
+ Text[ japanese ] = "ʲÊß°Øݸ";
+ Text[ korean ] = "ÇÏÀÌÆÛ¸µÅ©";
+ Text[ chinese_simplified ] = "³¬Á´½Ó";
+ Text[ chinese_traditional ] = "¶W³sµ²";
+ 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 ] = "“K—p";
+ Text[ korean ] = "Àû¿ë";
+ Text[ chinese_simplified ] = "Ì×ÓÃ";
+ Text[ chinese_traditional ] = "®M¥Î";
+ Text[ arabic ] = "ÊØÈíÞ";
+ Text[ turkish ] = "Uygula";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HYPDLG_CLOSEBUT
+{
+ Text = "Schließen" ;
+ 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 ] = "Stäng";
+ 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 ] = "Ratón 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 auslösen" ;
+ Text [ ENGLISH ] = "Release hyperlink" ;
+ Text [ english_us ] = "Execute hyperlink" ;
+ Text[ portuguese ] = "Executar hiperligação";
+ Text[ russian ] = "Âûïîëíèòü ãèïåðññûëêó";
+ Text[ greek ] = "ÁðïäÝóìåõóç õðåñ-óýíäåóçò";
+ Text[ dutch ] = "Hyperlink uitvoeren";
+ Text[ french ] = "Déclencher l'hyperlien";
+ Text[ spanish ] = "Ejecutar hiperenlace";
+ Text[ italian ] = "Esegui hyperlink";
+ Text[ danish ] = "Udfør hyperlink";
+ Text[ swedish ] = "Utför hyperlänk";
+ Text[ polish ] = "Wykonaj hiper³¹cze";
+ Text[ portuguese_brazilian ] = "Release hyperlink";
+ Text[ japanese ] = "ʲÊß°Øݸ‚ð‰ðœ";
+ Text[ korean ] = "ÇÏÀÌÆÛ¸µÅ© ½ÇÇà";
+ Text[ chinese_simplified ] = "Ö´Ðг¬Á´½Ó";
+ Text[ chinese_traditional ] = "°õ¦æ¶W³sµ²";
+ Text[ arabic ] = "ÊäÝíÐ ÇáÇÑÊÈÇØ ÇáÊÔÚÈí";
+ Text[ turkish ] = "Hyperlink'i etkinleþtir";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HYPDLG_MACROACT3
+{
+ Text = "Maus verlässt 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 ] = "Ratón fuera de objeto";
+ Text[ italian ] = "Mouse fuori dall'oggetto";
+ Text[ danish ] = "Mus forlader objekt";
+ Text[ swedish ] = "Mus lämnar 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 ayrýlýyor";
+};
+
+String RID_SVXSTR_HYPDLG_NOVALIDFILENAME
+{
+ Text = "Geben Sie bitte einen gültigen 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 válido.";
+ 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 válido 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ê prawid³ow¹ nazwê pliku.";
+ Text[ portuguese_brazilian ] = "Please type in a valid filename.";
+ Text[ japanese ] = "—LŒø‚Ȩ̀²Ù–¼‚ð“ü—Í‚µ‚ĉº‚³‚¢B";
+ Text[ korean ] = "À¯È¿ÇÑ ÆÄÀϸíÀ» ÀÔ·ÂÇϽʽÿÀ.";
+ Text[ chinese_simplified ] = "Çë¼üÈëÒ»¸öÓÐЧµÄÎļþÃû¡£";
+ Text[ chinese_traditional ] = "½Ð¿é¤J¤@­Ó¦³®ÄªºÀɮצW¡C";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇÓã ãáÝ ÕÇáÍ.";
+ Text[ turkish ] = "Geçerli 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 & wiadomoœci";
+ Text[ portuguese_brazilian ] = "Mail & News";
+ Text[ japanese ] = "Ò°Ù & Æ­°½";
+ Text[ korean ] = "¸ÞÀÏ & ´º½º";
+ Text[ chinese_simplified ] = "µç×ÓÓʼþºÍÐÂÎÅ×é";
+ Text[ chinese_traditional ] = "¹q¤l¶l¥ó©M·s»D";
+ 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 ] = "V‹Kì¬ÄÞ·­ÒÝÄ";
+ 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 ] = "Botão" ;
+ Text [ russian ] = "Êíîïêà" ;
+ Text [ greek ] = "Ðåäßï åðéëïãÞò" ;
+ Text [ dutch ] = "Knop" ;
+ Text [ french ] = "Bouton" ;
+ Text [ spanish ] = "Botón" ;
+ 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 ] = "Düðme" ;
+};
+
+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 0000000000..c6f36ccc80
--- /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 0000000000..d817c5215b
--- /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 0000000000..e0bd71c979
--- /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 0000000000..ff14ac6afb
--- /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 ] = "Hifenação" ;
+ Text [ portuguese ] = "Divisão silábica" ;
+ Text [ finnish ] = "Tavutus" ;
+ Text [ danish ] = "Orddeling" ;
+ Text [ french ] = "Coupure de mots" ;
+ Text [ swedish ] = "Avstavning" ;
+ Text [ dutch ] = "Woordafbreking" ;
+ Text [ spanish ] = "Separación silábica" ;
+ 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 ] = "S³owo";
+ TEXT[ japanese ] = "’PŒê";
+ TEXT[ chinese_traditional ] = "¦r";
+ TEXT[ arabic ] = "ÇáßáãÉ";
+ TEXT[ greek ] = "ËÝîç";
+ TEXT[ korean ] = "´Ü¾î";
+ TEXT[ turkish ] = "Sözcük";
+ 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 ] = "~Nästa" ;
+ Text [ danish ] = "Næste" ;
+ 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 ] = "~Kaldýr";
+ 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 ] = "³s¦r²Å(~H)";
+ TEXT[ arabic ] = "ÝÕá ÇáãÞÇØÚ";
+ TEXT[ greek ] = "Óõëëáâéóìüò";
+ TEXT[ korean ] = "ÇÏÀÌÇ ³Ö±â(~H)";
+ TEXT[ turkish ] = "~Ayýr";
+ 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 wyrazów";
+ Text[ japanese ] = "ʲÌÈ°¼®Ý";
+ Text[ chinese_traditional ] = "³s¦r²Å";
+ 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 0000000000..86f59e92ec
--- /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 0000000000..af44c93fcf
--- /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 einfügen : Hyperlink einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Hyperlink einfügen : Hyperlink einf³gen */
+ Text = "Hyperlink einfügen" ;
+ 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 für Internet-URLs : Sammelbox f³r Internet-URLs */
+ /* ### ACHTUNG: Neuer Text in Resource? Sammelbox für Internet-URLs : Sammelbox f³r Internet-URLs */
+ QuickHelpText = "Sammelbox für 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 ] = "Boîte centrale pour les URLs d'Internet" ;
+ QuickHelpText [ portuguese_brazilian ] = "Sammelbox für 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 ] = "Länk" ;
+ Text [ danish ] = "Kæde" ;
+ Text [ portuguese ] = "Hiperligação" ;
+ Text [ portuguese_brazilian ] = "Link" ;
+ Text[ chinese_simplified ] = "³¬Á´½Ó";
+ Text[ russian ] = "Ãèïåðññûëêà";
+ Text[ polish ] = "£¹cze";
+ Text[ japanese ] = "Øݸ";
+ Text[ chinese_traditional ] = "¶W³sµ²";
+ 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 ] = "Bokmärke" ;
+ Text [ danish ] = "Bogmærke" ;
+ Text [ portuguese ] = "Marcador" ;
+ Text [ portuguese_brazilian ] = "Bookmark" ;
+ Text[ chinese_simplified ] = "ÊéÇ©";
+ Text[ russian ] = "Çàêëàäêà";
+ Text[ polish ] = "Zak³adka";
+ Text[ japanese ] = "ÌÞ¯¸Ï°¸";
+ Text[ chinese_traditional ] = "®ÑÅÒ";
+ Text[ arabic ] = "ÅÔÇÑÉ ãÑÌÚíÉ";
+ Text[ greek ] = "Óåëéäïäåßêôçò";
+ Text[ korean ] = "Ã¥ °¥ÇÇ";
+ Text[ turkish ] = "Yer iþareti";
+ 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 ] = "Sök" ;
+ Text [ danish ] = "Søg" ;
+ 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 ] = "Insérer un hyperlien" ;
+ Text [ dutch ] = "Hyperlink invoegen" ;
+ Text [ swedish ] = "Infoga hyperlänk" ;
+ Text [ danish ] = "Indsæt hyperlink" ;
+ Text [ portuguese_brazilian ] = "Hyperlink einfügen" ;
+ Text [ portuguese ] = "Inserir hiperligação" ;
+ Text[ chinese_simplified ] = "ÐÂÔö³¬Á´½Ó";
+ Text[ russian ] = "Âñòàâèòü ãèïåðññûëêó";
+ Text[ polish ] = "Wstaw hiper³¹cze";
+ Text[ japanese ] = "ʲÊß°Øݸ‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "·s¼W¶W³sµ²";
+ 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 ~botón" ;
+ Text [ french ] = "Comme bouton" ;
+ Text [ swedish ] = "Som ~knapp" ;
+ Text [ danish ] = "Som knap" ;
+ Text [ portuguese ] = "Como ~botão" ;
+ 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 ] = "Düðme 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 geprüft werden.\nSoll die Verbindung aufgebaut werden? : Die URL kann erst nach Aufbau einer Verbindung gepr³ft werden.\nSoll die Verbindung aufgebaut werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die URL kann erst nach Aufbau einer Verbindung geprüft werden.\nSoll die Verbindung aufgebaut werden? : Die URL kann erst nach Aufbau einer Verbindung gepr³ft werden.\nSoll die Verbindung aufgebaut werden? */
+ MESSAGE = "Die URL kann erst nach Aufbau einer Verbindung geprüft 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 después de haberse establecido una conexión.\n¿Desea establecer la conexión?" ;
+ Message [ french ] = "L'URL ne peut être vérifié qu'après 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 först prövas när en förbindelse har upprättats.\nSka en förbindelse upprättas?" ;
+ Message [ danish ] = "URL kan først testes når en forbindelse er blevet oprettet.\nSkal der oprettes en forbindelse?" ;
+ Message [ portuguese_brazilian ] = "Die URL kann erst nach Aufbau einer Verbindung geprüft werden.\nSoll die Verbindung aufgebaut werden?" ;
+ Message [ portuguese ] = "O URL pode apenas ser verificado depois de efectuar uma ligação.\nDeseja iniciá-la?" ;
+ Message[ chinese_simplified ] = "Ö»ÓÐÔÚ½¨Á¢Á¬½Óºó²ÅÄÜÈ·¶¨Õâ¸ö URL ÊÇ·ñÕýÈ·¡£\nÄúÒªÏÖÔÚ½¨Á¢Á¬½ÓÂð£¿";
+ Message[ russian ] = "Ïðîâåðèòü URL âîçìîæíî òîëüêî ïîñëå ïîäêëþ÷åíèÿ.nÓñòàíîâèòü ïîäêëþ÷åíèå?";
+ Message[ polish ] = "URL mo¿e zostaæ sprawdzony dopiero po ustanowieniu po³¹czenia.\nCzy utworzyæ po³¹czenie?";
+ Message[ japanese ] = "‚±‚ÌURL‚ÍÚ‘±Ý’èŒã‚É‚µ‚©Ã½Ä‚Å‚«‚Ü‚¹‚ñB\nÚ‘±‚ðݒ肵‚Ü‚·‚©?";
+ Message[ chinese_traditional ] = "¥u¦³¦b«Ø¥ß³s½u«á¤~¯à½T©w³o­Ó URL ¬O§_¥¿½T¡C\n±z­n²{¦b³s½u¨ì Internet¡S";
+ Message[ arabic ] = "áÇ íãßä ÝÍÕ ÇáÚäæÇä (URL)¡ ÅáÇ ÈÚÏ ÅÞÇãÉ ÇáÇÊÕÇá.\nåá ÊÑíÏ ÅÞÇãÉ ÇáÇÊÕÇá¿";
+ Message[ greek ] = "Ï Ýëåã÷ïò áõôïý ôïõ URL åßíáé äõíáôüí íá ãßíåé ìåôÜ ôçí óýíäåóç.\nÈÝëåôå íá óõíäåèåßôå;";
+ Message[ korean ] = "ÀÌ URL Á¢¼ÓÀÌ ÀÌ·ç¾îÁø ÀÌÈÄ¿¡ À¯È¿¼ºÀÌ ÀÔÁõµÉ ¼ö ÀÖ½À´Ï´Ù.Á¢¼ÓÀ» ¸¸µå½Ã°Ú½À´Ï±î?";
+ Message[ turkish ] = "Bu URL baðlantý kurulduktan sonra kontrol edilebilir.\nBaðlantý 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 eingefügt werden? : Die URL existiert nicht.\nSoll sie trotzdem eingef³gt werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die URL existiert nicht.\nSoll sie trotzdem eingefügt werden? : Die URL existiert nicht.\nSoll sie trotzdem eingef³gt werden? */
+ MESSAGE = "Die URL existiert nicht.\nSoll sie trotzdem eingefügt 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.\n¿Desea insertarla de todas formas?" ;
+ Message [ french ] = "L'URL n'existe pas.\nVoulez-vous l'insérer tout de même ?" ;
+ Message [ swedish ] = "Denna URL existerar inte.\nSka den infogas ändå?" ;
+ Message [ danish ] = "URL eksisterer ikke.\nSkal den tilføjes alligevel?" ;
+ Message [ portuguese_brazilian ] = "Die URL existiert nicht.\nSoll sie trotzdem eingefügt werden?" ;
+ Message [ portuguese ] = "O URL não 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 ¤£¦s¦b¡C\n±zÁÙ¬O­n¥[¤J¥¦¡S";
+ Message[ arabic ] = "åÐÇ ÇáÜ URL ÛíÑ ãæÌæÏ.\nåá ÊÑíÏ ÅÏÎÇáå Úáì ÇáÑÛã ãä Ðáß¿";
+ Message[ greek ] = "Ôï URL äåí õðÜñ÷åé.\nÈÝëåôå íá åéóá÷èåß ðáñ´ üëá áõôÜ;";
+ Message[ korean ] = "ÀÌ URLÀº Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.±×·¡µµ »ðÀÔÇϽðڽÀ´Ï±î?";
+ Message[ turkish ] = "Bu URL mevcut deðil.\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 0000000000..e1dfa21e92
--- /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 0000000000..42c92c12be
--- /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 = "~Zurück" ;
+ Text [ ENGLISH ] = "~Reset" ;
+ Text [ english_us ] = "~Back" ;
+ Text[ portuguese ] = "~Anterior";
+ Text[ russian ] = "Íàçàä";
+ Text[ greek ] = "~Ðßóù";
+ Text[ dutch ] = "~Vorige";
+ Text[ french ] = "~Précédent";
+ 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 0000000000..b29e359efd
--- /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 0000000000..82b7b4f4dc
--- /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 0000000000..cef513f249
--- /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 ] = "“K—p";
+ 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 ] = "Otwórz...";
+ 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 ] = "Àx¦s...";
+ 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 ] = "Selección" ;
+ Text [ french ] = "Sélection" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Marker" ;
+ Text [ portuguese ] = "Seleccionar" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Objekte auswählen : Objekte auswõhlen */
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûáîð";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÊÍÏíÏ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçim";
+ 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 ] = "Rectángulo" ;
+ Text [ french ] = "Rectangle" ;
+ Text [ swedish ] = "Rektangel" ;
+ Text [ danish ] = "Rektangel" ;
+ Text [ portuguese ] = "Rectângulo" ;
+ Text [ portuguese_brazilian ] = "Rechteck" ;
+ Text[ chinese_simplified ] = "³¤·½ÐÎ";
+ Text[ russian ] = "Ïðÿìîóãîëüíèê";
+ Text[ polish ] = "Prostok¹t";
+ Text[ japanese ] = "ŽlŠpŒ`";
+ Text[ chinese_traditional ] = "ªø¤è§Î";
+ Text[ arabic ] = "ãÓÊØíá";
+ Text[ greek ] = "Ïñèïãþíéï";
+ Text[ korean ] = "»ç°¢Çü";
+ Text[ turkish ] = "Dikdörtgen";
+ 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 ] = "Polígono" ;
+ Text [ french ] = "Polygone" ;
+ Text [ dutch ] = "Veelhoek" ;
+ Text [ swedish ] = "Polygon" ;
+ Text [ danish ] = "Polygon" ;
+ Text [ portuguese ] = "Polígono" ;
+ Text [ portuguese_brazilian ] = "Polygon" ;
+ Text[ chinese_simplified ] = "¶à±ßÐÎ";
+ Text[ russian ] = "Ìíîãîóãîëüíèê";
+ Text[ polish ] = "Wielok¹t";
+ 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 ] = "Polígono, forma livre" ;
+ Text [ portuguese_brazilian ] = "Freihandpolygon" ;
+ Text [ swedish ] = "Frihandspolygon" ;
+ Text [ danish ] = "Frihåndspolygon" ;
+ Text [ italian ] = "Poligono a mano libera" ;
+ Text [ spanish ] = "Polígono a mano alzada" ;
+ Text [ french ] = "Polygone à main levée" ;
+ Text [ dutch ] = "Vrije hand-veelhoek" ;
+ Text[ chinese_simplified ] = "×ÔÓɶà±ßÐÎ";
+ Text[ russian ] = "Ðèñîâàííûé ìíîãîóãîëüíèê";
+ Text[ polish ] = "Dowolny wielok¹t";
+ 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ý düzenle";
+ 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 ] = "Déplacer 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ý kaydýr";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLYINSERT ;
+ HelpId = HID_IMAPDLG_POLYINSERT ;
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte einfügen : Punkte einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte einfügen : Punkte einf³gen */
+ Text = "Punkte einfügen" ;
+ 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 ] = "Indsæt punkter" ;
+ Text [ french ] = "Insérer 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 einfügen oder anhängen : Neue Punkte einf³gen oder anhõngen */
+ Text[ chinese_simplified ] = "²åÈëµã";
+ Text[ russian ] = "Âñòàâèòü òî÷êè";
+ Text[ polish ] = "Wstaw punkty";
+ Text[ japanese ] = "§Œä“_‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤JÂI";
+ 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 löschen : Punkte l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte löschen : Punkte l÷schen */
+ Text = "Punkte löschen" ;
+ 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 löschen : Markierte Punkte l÷schen */
+ Text[ chinese_simplified ] = "ɾ³ýµã";
+ Text[ russian ] = "Óäàëèòü òî÷êè";
+ Text[ polish ] = "Usuñ punkty";
+ Text[ japanese ] = "§Œä“_‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£ÂI";
+ 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 = "Rückgängig " ;
+ 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 ] = "Återställ " ;
+ Text [ danish ] = "Gendan " ;
+ Text [ italian ] = "Ripristina " ;
+ Text [ spanish ] = "Restaurar " ;
+ Text [ french ] = "Restaurer " ;
+ Text [ dutch ] = "Herstellen " ;
+ Text[ chinese_simplified ] = "»Ö¸´³·ÏûÃüÁî ";
+ Text[ russian ] = "Âåðíóòü ";
+ Text[ polish ] = "Ponów ";
+ 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 ] = "Propriétés..." ;
+ Text [ dutch ] = "Eigenschappen..." ;
+ Text[ chinese_simplified ] = "ÊôÐÔ...";
+ Text[ russian ] = "Ñâîéñòâà...";
+ Text[ polish ] = "W³aœciwoœci...";
+ 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 ] = "Dirección:" ;
+ Text [ french ] = "Adresse :" ;
+ Text [ dutch ] = "Adres:" ;
+ Text [ swedish ] = "Adress:" ;
+ Text [ danish ] = "Adresse:" ;
+ Text [ portuguese ] = "Endereço:" ;
+ 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 ] = "¼v¹³¬M®g½s¿è¾¹";
+ Text[ arabic ] = "Image Map Editor";
+ Text[ greek ] = "ÅðåîåñãáóôÞò ImageMap";
+ Text[ korean ] = "À̹ÌÁö ¸Ê ¿¡µðÅÍ";
+ Text[ turkish ] = "ImageMap editörü";
+ 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 ] = "~Descripción..." ;
+ Text [ french ] = "~Description..." ;
+ Text [ dutch ] = "~Beschrijving..." ;
+ Text [ swedish ] = "~Beskrivning..." ;
+ Text [ danish ] = "Beskrivelse..." ;
+ Text [ portuguese_brazilian ] = "~Beschreibung..." ;
+ Text [ portuguese ] = "~Descrição..." ;
+ Text[ chinese_simplified ] = "˵Ã÷...";
+ Text[ russian ] = "Îïèñàíèå...";
+ Text[ polish ] = "Opis...";
+ Text[ japanese ] = "à–¾...";
+ Text[ chinese_traditional ] = "´y­z...";
+ Text[ arabic ] = "...ÇáæÕÝ";
+ Text[ greek ] = "~ÐåñéãñáöÞ...";
+ Text[ korean ] = "¼³¸í...";
+ Text[ turkish ] = "Açýklama...";
+ 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 ] = "~Disposição" ;
+ Text [ finnish ] = "J~ärjestä" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "~Disposition" ;
+ Text [ swedish ] = "~Placering" ;
+ Text [ dutch ] = "~Positie" ;
+ Text [ spanish ] = "~Posición" ;
+ 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 ] = "Längst ~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 ] = "Längre fra~m" ;
+ Text [ dutch ] = "Naar v~oren" ;
+ Text [ spanish ] = "Traer ~más adelante" ;
+ Text [ english_us ] = "Bring ~Forward" ;
+ Text[ chinese_simplified ] = "ÔÙÇ°ÖÃ(~F)";
+ Text[ russian ] = "Ïåðåìåñòèòü ~âïåðåä";
+ Text[ polish ] = "Przesuñ do przodu";
+ Text[ japanese ] = "‚³‚ç‚É‘O‚Ö(~F)";
+ Text[ chinese_traditional ] = "¦A«e¸m(~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'arrière" ;
+ Text [ swedish ] = "Längre ba~k" ;
+ Text [ dutch ] = "Naar a~chteren" ;
+ Text [ spanish ] = "Enviar hacia a~trás" ;
+ Text [ english_us ] = "Send Back~ward" ;
+ Text[ chinese_simplified ] = "ÔÙºóÖÃ(~W)";
+ Text[ russian ] = "Ïåðåìåñòèòü ~íàçàä";
+ Text[ polish ] = "Przesuñ do ty³u";
+ Text[ japanese ] = "‚³‚ç‚ÉŒã‚Ö(~W)";
+ Text[ chinese_traditional ] = "¦A«á¸m(~W)";
+ Text[ arabic ] = "ÅÑÓÇá ÎáÝÇó";
+ Text[ greek ] = "~ÌåôáöïñÜ ðßóù";
+ Text[ korean ] = "µÚ·Î º¸³»±â(~W)";
+ Text[ turkish ] = "Bir alta gönder";
+ 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 ~trás" ;
+ Text [ finnish ] = "T~austalle" ;
+ Text [ danish ] = "Placer ~bagest" ;
+ Text [ french ] = "Tout à l'a~rrière" ;
+ Text [ swedish ] = "Längst ~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 spód";
+ Text[ japanese ] = "Å”w–Ê‚ÖˆÚ“®(~S)";
+ Text[ chinese_traditional ] = "¸m©ó©³¼h(~S)";
+ Text[ arabic ] = "ÅÑÓÇá Åáì ÇáÎáÝ";
+ Text[ greek ] = "ÌåôáöïñÜ óå ~äåýôåñï ðëÜíï";
+ Text[ korean ] = "¸Ç µÚ·Î(~S)";
+ Text[ turkish ] = "En alta gönder";
+ 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 ] = "Sýralama";
+ 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 ] = "~Välj 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 ] = "Tümünü seç";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_DELETE ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ 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 löschen : Die Selektion l÷schen */
+ 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 ] = "Descripción" ;
+ 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 ] = "Endereço (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 ] = "Hyperlänk" ;
+ Text [ danish ] = "Hyperlink" ;
+ Text [ portuguese_brazilian ] = "Hyperlink" ;
+ Text [ portuguese ] = "Hiperligação" ;
+ Text[ chinese_simplified ] = "³¬Á´½Ó";
+ Text[ russian ] = "Ãèïåðññûëêà";
+ Text[ polish ] = "Hiper³¹cze";
+ Text[ japanese ] = "ʲÊß°Øݸ";
+ Text[ chinese_traditional ] = "¶W³sµ²";
+ 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 ] = "Descrição" ;
+ Text [ portuguese_brazilian ] = "Beschreibung" ;
+ Text[ chinese_simplified ] = "˵Ã÷";
+ Text[ russian ] = "Îïèñàíèå";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "à–¾";
+ Text[ chinese_traditional ] = "´y­z";
+ Text[ arabic ] = "ÇáæÕÝ";
+ Text[ greek ] = "ÐåñéãñáöÞ";
+ Text[ korean ] = "¼³¸í";
+ Text[ turkish ] = "Açýklama";
+ Text[ language_user1 ] = " ";
+};
+/******************************************************************************/
+String STR_IMAPDLG_SAVE
+{
+ Text= "Die ImageMap wurde geändert.\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 zosta³a zmieniona.\nCzy zmiany maj¹ byæ zapisane?";
+ Text[ japanese ] = "²Ò°¼ÞϯÌß‚ª•ÏX‚³‚ê‚Ä‚¢‚Ü‚·B\n•ÏX‚ð•Û‘¶‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "¼v¹³¬M®g¤w¸g³QÅܧó¡C\n±z­nÀx¦sÅܧó¡H";
+ Text[ arabic ] = "Êã ÊÛííÑ ÇáÜ ImageMap.\nåá ÊÑíÏ ÍÝÙ ÇáÊÛííÑÇÊ¿";
+ Text [ italian ] = "L'ImageMap è stata cambiata.\nSalvare le modifiche?" ;
+ Text [ spanish ] = "Se ha modificado el ImageMap.\n¿Desea guardar los cambios?" ;
+ Text [ french ] = "L'imageMap a été modifiée.\nDésirez-vous sauvegarder les modifications?" ;
+ Text [ dutch ] = "De ImageMap werd gewijzigd.\nWilt u de wijzigingen opslaan?" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Die ImageMap wurde geändert.\nSollen die Änderungen gespeichert werden? : Die ImageMap wurde geõndert.\nSollen die Žnderungen gespeichert werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die ImageMap wurde geändert.\nSollen die Änderungen gespeichert werden? : Die ImageMap wurde geõndert.\nSollen die Žnderungen gespeichert werden? */
+ Text = "Die ImageMap wurde geändert.\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 geändert.\nSollen die Änderungen gespeichert werden?" ;
+ Text [ portuguese ] = "O ImageMap foi modificado.\nDeseja guardar as modificações?" ;
+ Text[ greek ] = "Ôï ImageMap ôñïðïðïéÞèçêå.\nÈÝëåôå íá áðïèçêåõôïýí ïé áëëáãÝò;";
+ Text[ korean ] = "À̹ÌÁö ¸ÊÀÌ ¼öÁ¤µÇ¾ú½À´Ï´Ù.\nº¯°æµÈ ³»¿ëÀ» ÀúÀåÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "ImageMap deðiþtirildi.\nDeðiþiklikler kaydedilsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String STR_IMAPDLG_MODIFY
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die ImageMap wurde geändert.\nSollen die Änderungen übernommen werden? : Die ImageMap wurde geõndert.\nSollen die Žnderungen ³bernommen werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die ImageMap wurde geändert.\nSollen die Änderungen übernommen werden? : Die ImageMap wurde geõndert.\nSollen die Žnderungen ³bernommen werden? */
+ Text = "Die ImageMap wurde geändert.\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.\n¿Desea guardar las modificaciones?" ;
+ Text [ french ] = "L'imageMap a été modifiée.\nAppliquer les modifications ?" ;
+ Text [ dutch ] = "De ImageMap werd gewijzigd.\nWilt u de wijzigingen overnemen?" ;
+ Text [ portuguese_brazilian ] = "Die ImageMap wurde geändert.\nSollen die Änderungen übernommen werden?" ;
+ Text [ portuguese ] = "O ImageMap foi modificado.\nDeseja aplicar as modificações?" ;
+ Text[ chinese_simplified ] = "ͼÏñÓ³ÉäÒѾ­±»¸Ä¶¯¡£\nÄúÒª½ÓÊܸü¸ÄÂð£¿";
+ Text[ russian ] = "Image Map èçìåíåí.\nÏðèíÿòü ýòè èçìåíåíèÿ?";
+ Text[ polish ] = "Mapa obrazkowa zosta³a zmieniona.\nCzy zmiany maj¹ byæ zapisane?";
+ Text[ japanese ] = "²Ò°¼ÞϯÌß‚ª•ÏX‚³‚ê‚Ä‚¢‚Ü‚·B\n•ÏX‚ð•Û‘¶‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "¼v¹³¬M®g¤w¸g³QÅܧó¡C\n±z­n±µ¨üÅܧó¡S";
+ Text[ arabic ] = "Êã ÊÛííÑ ÇáÜ ImageMap.\nåá ÊÑíÏ ÍÝÙ ÇáÊÛííÑÇÊ¿";
+ Text[ greek ] = "Ôï ImageMap ôñïðïðïéÞèçêå.\nÈÝëåôå íá åöáñìïóôïýí ïé áëëáãÝò;";
+ Text[ korean ] = "À̹ÌÁö ¸ÊÀÌ ¼öÁ¤µÇ¾ú½À´Ï´Ù.\nº¯°æµÈ ³»¿ëÀ» ÀúÀåÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "ImageMap deðiþtirildi.\nDeðiþiklikler kaydedilsin mi?";
+ Text[ language_user1 ] = " ";
+};
+/******************************************************************************/
diff --git a/svx/source/dialog/imapimp.hxx b/svx/source/dialog/imapimp.hxx
new file mode 100644
index 0000000000..5098dfcce2
--- /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 0000000000..db93b095b7
--- /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 0000000000..0c103948af
--- /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 0000000000..8ef9ada5d2
--- /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 0000000000..0bd9aaca19
--- /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 0000000000..3929b00d50
--- /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 ] = "<Tüm 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 ] = "<Tüm 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 ] = "Okänt 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 ] = "•s–¾‚Ȩ̀²Ù‘Ž®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 diretório" ;
+ Text [ portuguese ] = "O directório '" ;
+ Text [ finnish ] = "Hakemistoa '" ;
+ Text [ danish ] = "Biblioteket '" ;
+ Text [ french ] = "Le répertoire '" ;
+ 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 ] = "' não existe." ;
+ Text [ portuguese ] = "' não 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 ] = "' ¤£¦s¦b¡C";
+ Text[ arabic ] = "' ÛíÑ ãæÌæÏ";
+ Text[ greek ] = "' äåí õðÜñ÷åé.";
+ Text[ korean ] = "' °¡(ÀÌ) ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "' mevcut deðil.";
+ 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 geöffnet 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 ] = "Não consigo abrir arquivo gráfico" ;
+ TEXT [ portuguese ] = "Impossível abrir ficheiro gráfico" ;
+ 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 gráfico" ;
+ TEXT [ english_us ] = "Graphics file cannot be opened" ;
+ TEXT[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÍ¼ÐÎÎļþ";
+ TEXT[ russian ] = "Îòêðûòü ãðàôè÷åñêèé ôàéë íå óäàåòñÿ";
+ TEXT[ polish ] = "Pliku graficznego nie mo¿na otworzyæ";
+ TEXT[ japanese ] = "¸Þ×̨¯¸ ̧²Ù‚ðŠJ‚­‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB";
+ TEXT[ chinese_traditional ] = "µLªk¶}±Ò¹Ï§ÎÀÉ®×";
+ TEXT[ arabic ] = "áÇ íãßä ÝÊÍ ãáÝ ÇáÑÓæãÇÊ";
+ TEXT[ greek ] = "Ôï áñ÷åßï ãñáöéêïý äåí åßíáé äõíáôüí íá áíïé÷ôåß";
+ TEXT[ korean ] = "±×·¡ÇÈÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù";
+ TEXT[ turkish ] = "Grafik dosyasý açýlamýyor";
+ 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 ] = "Não consigo ler arquivo gráfico" ;
+ TEXT [ portuguese ] = "Impossível ler ficheiro gráfico" ;
+ TEXT [ finnish ] = "Grafiikkatiedostoa ei voi lukea" ;
+ TEXT [ danish ] = "Det er ikke muligt at læse grafikfilen" ;
+ TEXT [ french ] = "Lecture du fichier graphique impossible" ;
+ TEXT [ swedish ] = "Grafikfil kan inte läsas" ;
+ TEXT [ dutch ] = "Grafisch bestand is onleesbaar" ;
+ TEXT [ spanish ] = "No es posible leer el archivo gráfico" ;
+ TEXT [ english_us ] = "Graphics file cannot be read" ;
+ TEXT[ chinese_simplified ] = "ÎÞ·¨¶Á³öͼÐÎÎļþ";
+ TEXT[ russian ] = "Ïðî÷èòàòü ãðàôè÷åñêèé ôàéë íå óäàåòñÿ";
+ TEXT[ polish ] = "Pliku graficznego nie mo¿na otworzyæ";
+ TEXT[ japanese ] = "¸Þ×̨¯¸ ̧²Ù‚ª“Ç‚ß‚Ü‚¹‚ñB";
+ TEXT[ chinese_traditional ] = "µLªkŪ¥X¹Ï¤ùÀÉ®×";
+ TEXT[ arabic ] = "áÇ íãßä ÞÑÇÁÉ ãáÝ ÇáÑÓæãÇÊ";
+ TEXT[ greek ] = "Ç áíÜãíùóç ôïõ áñ÷åßïõ ãñáöéêïý äåí åßíáé äõíáôÞ";
+ TEXT[ korean ] = "±×·¡ÇÈÆÄÀÏÀ» ÀÐÀ» ¼ö ¾ø½À´Ï´Ù";
+ TEXT[ turkish ] = "Grafik dosyasý okunamýyor";
+ 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 gráfico desconhecido" ;
+ TEXT [ portuguese ] = "Formato gráfico desconhecido" ;
+ TEXT [ finnish ] = "Tuntematon grafiikkamuoto" ;
+ TEXT [ danish ] = "Ukendt grafikformat" ;
+ TEXT [ french ] = "Format d'image inconnu" ;
+ TEXT [ swedish ] = "Okänt 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 unterstützt" ;
+ 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 ] = "Versão de arquivo gráfico não suportada" ;
+ TEXT [ portuguese ] = "Versão do ficheiro gráfico não tem suporte" ;
+ TEXT [ finnish ] = "Ei tukea grafiikkatiedoston versiolle" ;
+ TEXT [ danish ] = "Grafikfilens version understøttes ikke" ;
+ TEXT [ french ] = "Version du fichier graphique non supportée" ;
+ TEXT [ swedish ] = "Grafikfilens version stöds inte" ;
+ TEXT [ dutch ] = "Deze versie van het grafisch bestand wordt niet ondersteund" ;
+ TEXT [ spanish ] = "No se apoya la versión del archivo gráfico" ;
+ TEXT [ english_us ] = "Cannot support version of graphic file" ;
+ TEXT[ chinese_simplified ] = "²»Ö§³ÖÕâ¸öͼÐÎÎļþ°æ±¾";
+ TEXT[ russian ] = "Âåðñèÿ ãðàôè÷åñêîãî ôàéëà íå ïîääåðæèâàåòñÿ";
+ TEXT[ polish ] = "Wersja pliku graficznego nie bêdzie obs³ugiwana";
+ TEXT[ japanese ] = "¸Þ×̨¯¸ ̧²Ù‚ÌÊÞ°¼Þ®Ý‚ª»Îß°Ä‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB";
+ TEXT[ chinese_traditional ] = "¤£¤ä«ù³o­Ó¹Ï¤ùÀɮת©¥»";
+ TEXT[ arabic ] = "áä íÊã ÏÚã ÅÕÏÇÑ ãáÝ ÇáÑÓæãÇÊ";
+ TEXT[ greek ] = "Äåí õðïóôçñßæåôáé ç Ýêäïóç áõôïý ôïõ ãñáöéêïý áñ÷åßïõ.";
+ TEXT[ korean ] = "±×·¡ÇÈÆÄÀÏÀÇ ¹öÀüÀ» Áö¿øÇÒ ¼ö ¾øÀ½";
+ TEXT[ turkish ] = "Grafik dosyasýnýn sürümü 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 gráfico não encontrado" ;
+ TEXT [ portuguese ] = "Filtro gráfico não encontrado" ;
+ TEXT [ finnish ] = "Grafiikkasuodinta ei löydy" ;
+ 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 imágenes" ;
+ 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¦³§ä¨ì¹Ï¤ù¹LÂo¾¹";
+ TEXT[ arabic ] = "ÊÚÐÑ ÇáÚËæÑ Úáì ÝáÊÑ ÇáÑÓæãÇÊ";
+ TEXT[ greek ] = "Ôï ößëôñï ãñáöéêþí äåí âñÝèçêå";
+ TEXT[ korean ] = "±×·¡ÇÈÇÊÅ͸¦ ãÁö ¸øÇßÀ½";
+ TEXT[ turkish ] = "Grafik filtresi bulunamadý";
+ TEXT[ language_user1 ] = " ";
+ };
+ String STR_GRFILTER_TOOBIG
+ {
+ TEXT = "Nicht genug Speicher zum Einfügen 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 ] = "Memória insuficiente para inserir o gráfico" ;
+ TEXT [ portuguese ] = "Memória insuficiente para inserir a imagem." ;
+ TEXT [ finnish ] = "Muisti ei riitä grafiikan lisäämiseen" ;
+ TEXT [ danish ] = "Ikke tilstrækkelig hukommelse til at indsætte grafik" ;
+ TEXT [ french ] = "Mémoire insuffisante pour l'insertion de l'image" ;
+ TEXT [ swedish ] = "Inte tillräckligt med minne för 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 pamiêci do wstawienia grafiki";
+ TEXT[ japanese ] = "¸Þ×̨¯¸‘}“ü‚Ì‚½‚ß‚ÌÒÓØ‚ª•s[•ª‚Å‚·B";
+ TEXT[ chinese_traditional ] = "°O¾ÐÅ餣¨¬¡MµLªk´¡¤J¹Ï¤ù";
+ TEXT[ arabic ] = "áÇ íæÌÏ ÐÇßÑÉ ßÇÝíÉ áÅÏÑÇÌ ÇáÑÓã";
+ TEXT[ greek ] = "Äåí õðÜñ÷åé áñêåôÞ ìíÞìç ãéá ôçí åéóáãùãÞ ôïõ ãñáöéêïý";
+ TEXT[ korean ] = "±×·¡ÇÈ »ðÀÔÀ» À§ÇÑ ¸Þ¸ð¸®°¡ ºÎÁ·ÇÕ´Ï´Ù";
+ TEXT[ turkish ] = "Grafiðin eklenmesi için yeterli bellek mevcut deðil";
+ 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 ] = "~Propriétés..." ;
+ Text [ swedish ] = "~Egenskaper..." ;
+ Text [ dutch ] = "Eigens~chappen..." ;
+ Text [ spanish ] = "Prop~iedades..." ;
+ Text [ english_us ] = "~Properties..." ;
+ Text[ chinese_simplified ] = "ÊôÐÔ(~P)...";
+ Text[ russian ] = "Ñâîéñòâà...";
+ Text[ polish ] = "W³aœciwoœci...";
+ 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 ] = "~Padrão" ;
+ 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 = "~Verknüpfen" ;
+ Text [ English ] = "~Link" ;
+ Text [ norwegian ] = "~Link" ;
+ Text [ italian ] = "~Collega" ;
+ Text [ portuguese_brazilian ] = "~Ligação" ;
+ Text [ portuguese ] = "~Ligar" ;
+ Text [ finnish ] = "~Linkki" ;
+ Text [ danish ] = "Kæd" ;
+ Text [ french ] = "~Lien" ;
+ Text [ swedish ] = "~Länka" ;
+ Text [ dutch ] = "~Koppelen" ;
+ Text [ spanish ] = "~Vincular" ;
+ Text [ english_us ] = "~Link" ;
+ Text[ chinese_simplified ] = "Á´½Ó(~L)";
+ Text[ russian ] = "Ñâÿçàòü";
+ Text[ polish ] = "Po³¹cz";
+ Text[ japanese ] = "Øݸ(~L)";
+ Text[ chinese_traditional ] = "³sµ²(~L)";
+ Text[ arabic ] = "ÑÈØ";
+ Text[ greek ] = "Óýíäåóç";
+ Text[ korean ] = "¿¬°á(~L)";
+ Text[ turkish ] = "~Baðlantý oluþtur";
+ 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~perçu" ;
+ Text [ swedish ] = "~Förhandsvisning" ;
+ Text [ dutch ] = "~Voorbeeld" ;
+ Text [ spanish ] = "~Previsualización" ;
+ Text [ english_us ] = "Pr~eview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ(~E)";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ 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 0000000000..07c40d6765
--- /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 0000000000..75816c4fd5
--- /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 0000000000..b7a6ea138e
--- /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 ] = "Légende" ;
+ Text [ dutch ] = "Legenda" ;
+ Text [ swedish ] = "Förklaring" ;
+ 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 ] = "~Avstånd" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ portuguese_brazilian ] = "~Abstand" ;
+ Text [ portuguese ] = "~Espaçamento" ;
+ Text[ chinese_simplified ] = "¼ä¸ô(~S)";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ polish ] = "Odstêp";
+ Text[ japanese ] = "ŠÔŠu(~S)";
+ Text[ chinese_traditional ] = "¶¡¹j(~S)";
+ Text[ arabic ] = "ÊÈÇÚÏ";
+ Text[ greek ] = "~Áðüóôáóç";
+ Text[ korean ] = "°£°Ý(~S)";
+ Text[ turkish ] = "~Uzaklýk";
+ 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 ] = "~K¹t";
+ Text[ japanese ] = "Šp“x(~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 degrés" ; 3000 ; > ;
+ < "45 degrés" ; 4500 ; > ;
+ < "60 degrés" ; 6000 ; > ;
+ < "90 degrés" ; 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 ; > ;
+ < "30“x" ; 3000 ; > ;
+ < "45“x" ; 4500 ; > ;
+ < "60“x" ; 6000 ; > ;
+ < "90“x" ; 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 ] = "Tilhæftning" ;
+ Text [ portuguese_brazilian ] = "A~nsatz" ;
+ Text [ portuguese ] = "E~xtensão" ;
+ Text[ chinese_simplified ] = "À©Õ¹(~E)";
+ Text[ russian ] = "Ðàñøèðåíèå";
+ Text[ polish ] = "Rozszerzenie";
+ Text[ japanese ] = "Šg’£(~E)";
+ Text[ chinese_traditional ] = "ÂX®i(~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 ; > ;
+ < "Uppifrån" ; 3 ; > ;
+ < "Från vänster" ; 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 góry" ; 3 ; > ;
+ < "Z lewej" ; 3 ; > ;
+ < "Poziomo" ; 1 ; > ;
+ < "Pionowo" ; 2 ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "Å“K" ; 4 ; > ;
+ < "ã‚©‚ç" ; 3 ; > ;
+ < "¶‚©‚ç" ; 3 ; > ;
+ < "¶‰E" ; 1 ; > ;
+ < "㉺" ; 2 ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "³ÌÓì" ; 4 ; > ;
+ < "±q¤W" ; 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 ] = "~Deðer";
+ 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 ] = "~Posición" ;
+ Text [ french ] = "~Position" ;
+ Text [ swedish ] = "~Position" ;
+ Text [ danish ] = "Placering" ;
+ Text [ portuguese_brazilian ] = "~Position" ;
+ Text [ portuguese ] = "~Posição" ;
+ 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? ~Länge : ~Lõnge */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Länge : ~Lõnge */
+ Text = "~Länge" ;
+ Text [ English ] = "~Length" ;
+ Text [ english_us ] = "~Length" ;
+ Text [ italian ] = "~Lungh." ;
+ Text [ spanish ] = "Longitud" ;
+ Text [ french ] = "~Longueur" ;
+ Text [ dutch ] = "~Lengte" ;
+ Text [ swedish ] = "~Längd" ;
+ Text [ danish ] = "Længde" ;
+ Text [ portuguese_brazilian ] = "~Länge" ;
+ Text [ portuguese ] = "~Comprimento" ;
+ Text[ chinese_simplified ] = "³¤¶È(~L)";
+ Text[ russian ] = "Äëèíà";
+ Text[ polish ] = "D³ugoœæ";
+ 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 ] = "Línea 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 ] = "Düz ç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 ] = "Línea 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 ] = "Açýlý ç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 ] = "Línea acodada con un solo ángulo" ;
+ Text [ french ] = "Ligne en angle fléchie" ;
+ Text [ dutch ] = "Lijn met enkele hoek" ;
+ Text [ swedish ] = "Vinklad linje med en knick" ;
+ Text [ danish ] = "Vinklet linje med et knæk" ;
+ 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 za³amana";
+ Text[ japanese ] = "1‚‚̊p‚ð‚à‚Âü";
+ Text[ chinese_traditional ] = "³æ³s¨¤§Î½u";
+ Text[ arabic ] = "ÎØ ÑÇÈØ Ðæ ÒÇæíÉ æÇÍÏÉ";
+ Text[ greek ] = "ÃñáììÞ óýíäåóçò õðü ãùíßá";
+ Text[ korean ] = "°¢Áø ¼±À» Çѹø ²ªÀ½";
+ Text[ turkish ] = "Tek açýlý ç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 ] = "Línea acodada con dos ángulos" ;
+ Text [ french ] = "Ligne en angle doublement fléchie" ;
+ Text [ dutch ] = "Lijn met dubbele hoek" ;
+ Text [ swedish ] = "Vinklad linje med två knickar" ;
+ Text [ danish ] = "Vinklet linje med to knæk" ;
+ Text [ portuguese_brazilian ] = "Abgewinkelte Linie doppelt geknickt" ;
+ Text [ portuguese ] = "Linha angular com ângulo duplo" ;
+ Text[ chinese_simplified ] = "Ë«Á¬½ÇÐÎÏß";
+ Text[ russian ] = "Ëîìàíàÿ ëèíèÿ ñ äâîéíûì èçãèáîì";
+ Text[ polish ] = "Zakrzywiona linia podwójnie za³amana";
+ Text[ japanese ] = "2‚‚̊p‚ð‚à‚Âü";
+ Text[ chinese_traditional ] = "Âù³s¨¤§Î½u";
+ Text[ arabic ] = "ÎØ ãÒÏæÌ ÇáÒæÇíÇ";
+ Text[ greek ] = "ÃñáììÞ - 2 ãùíßåò";
+ Text[ korean ] = "°¢Áø ¼±À» µÎ¹ø ²ªÀ½";
+ Text[ turkish ] = "Çift açýlý ç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 górze, 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 ] = "Vänster;mitten;höger" ;
+ Text [ danish ] = "Venstre;Centreret;Højre" ;
+ 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 ] = "Légende" ;
+ Text [ dutch ] = "Legenda" ;
+ Text [ swedish ] = "Förklaring" ;
+ 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 ] = "Posição" ;
+ Text [ portuguese ] = "Posição" ;
+ Text [ finnish ] = "Sijainti" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "Position" ;
+ Text [ swedish ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posición" ;
+ 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? Größe : Gr÷˜e */
+ /* ### ACHTUNG: Neuer Text in Resource? Größe : Gr÷˜e */
+ Text = "Größe" ;
+ Text [ ENGLISH ] = "Size" ;
+ Text [ norwegian ] = "Størrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ finnish ] = "Koko" ;
+ Text [ danish ] = "Størrelse" ;
+ Text [ french ] = "Taille" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ spanish ] = "Tamaño" ;
+ Text [ english_us ] = "Size" ;
+ PageResID = RID_SVXPAGE_SIZE ;
+ Text[ chinese_simplified ] = "´óС";
+ Text[ russian ] = "Ðàçìåð";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "»²½Þ";
+ Text[ chinese_traditional ] = "¤j¤p";
+ 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 ] = "Légende" ;
+ Text [ swedish ] = "Förklaring" ;
+ 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 0000000000..3ea4cf0138
--- /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 0000000000..db59da8258
--- /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 ] = "[Tümü]";
+};
+
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/lingu.src b/svx/source/dialog/lingu.src
new file mode 100644
index 0000000000..bbc0591a53
--- /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 dicionário de sinónimos?" ;
+ MESSAGE [ finnish ] = "Vältä tätä sanaa! Käytetäänkö 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 här ordet! Starta synonymordbok?" ;
+ MESSAGE [ dutch ] = "Dit woord is niet zo geschikt. Thesaurus starten?" ;
+ MESSAGE [ spanish ] = "¡Evite por favor esta palabra! ¿Desea iniciar la búsqueda de sinónimos?" ;
+ 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 s³owa! W³¹czyæ Tezaurus?";
+ MESSAGE[ japanese ] = "‚±‚Ì’PŒê‚Í”ð‚¯‚Ä‰º‚³‚¢!@—ތꎫ“T‚ð‹N“®‚µ‚Ü‚·‚©?";
+ MESSAGE[ chinese_traditional ] = "±zÀ³¸ÓÁקK¨Ï¥Î³o­Ó¦r¡T­n±Ò°Êµü¨å¡H";
+ MESSAGE[ arabic ] = "íÌÈ Úáíß ÊÌäÈ ÇÓÊÎÏÇã åÐå ÇáßáãÉ! åá ÊÑíÏ ÈÏÁ ÊÔÛíá ÞÇãæÓ ÇáãÑÇÏÝÇÊ¿";
+ MESSAGE[ greek ] = "Ç ëÝîç áõôÞ áíÞêåé óå áõôÝò ðïõ èÝëåôå íá áðïöýãåôå! Íá åêêéíÞóåé ï èçóáõñüò ëÝîåùí;";
+ MESSAGE[ korean ] = "ÀÌ ´Ü¾î´Â ȸÇÇ´Ü¾î ¸ñ·Ï¿¡ ÀÖ½À´Ï´Ù. µ¿ÀÇ¾î »çÀüÀ» ½ÃÀÛÇÒ±î¿ä?";
+ MESSAGE[ turkish ] = "Bu sözcüðü kullanmaktan kaçýnmalýsýnýz! Eþ anlamlýlar sözlüðü baþlatýlsýn mý?";
+ MESSAGE[ language_user1 ] = " ";
+};
+QueryBox RID_SVXQB_CONTINUE
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_YES ;
+ /* ### ACHTUNG: Neuer Text in Resource? Überprüfung am Anfang des Dokumentes fortsetzen? : šberpr³fung am Anfang des Dokumentes fortsetzen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Überprüfung am Anfang des Dokumentes fortsetzen? : šberpr³fung am Anfang des Dokumentes fortsetzen? */
+ MESSAGE = "Überprüfung 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 verificação no início do documento?" ;
+ MESSAGE [ portuguese ] = "Deseja continuar com a verificação no início do documento?" ;
+ MESSAGE [ finnish ] = "Jatketaanko tarkistamista asiakirjan alusta?" ;
+ MESSAGE [ danish ] = "Vil du fortsætte kontrollen fra dokumentets begyndelse?" ;
+ MESSAGE [ french ] = "Voulez-vous continuer la vérification depuis le début du document?" ;
+ MESSAGE [ swedish ] = "Fortsätta kontroll i början på dokumentet?" ;
+ MESSAGE [ dutch ] = "Controle aan het begin van het document voortzetten ?" ;
+ MESSAGE [ spanish ] = "¿Desea continuar la revisión desde el inicio del documento?" ;
+ MESSAGE [ english_us ] = "Continue checking at beginning of document?" ;
+ MESSAGE[ chinese_simplified ] = "´ÓÎĵµ¿ª¶Ë¼ÌÐøËÑÑ°£¿";
+ MESSAGE[ russian ] = "Ïðîäîëæèòü ïðîâåðêó â íà÷àëå äîêóìåíòà?";
+ MESSAGE[ polish ] = "Kontuynuowaæ sprawdzanie na pocz¹tku dokumentu?";
+ MESSAGE[ japanese ] = "•¶“ª‚ÅÁª¯¸‚ð‘±s‚µ‚Ü‚·‚©H";
+ MESSAGE[ chinese_traditional ] = "±q¤å¥ó¶}ºÝÄ~Äò´M§ä¡H";
+ MESSAGE[ arabic ] = "åá ÊÑíÏ ãÊÇÈÚÉ ÇáÊÏÞíÞ ÚäÏ ÈÏÇíÉ ÇáãÓÊäÏ¿";
+ MESSAGE[ greek ] = "Íá óõíå÷éóôåß ï Ýëåã÷ïò áðü ôçí áñ÷Þ ôïõ åããñÜöïõ;";
+ MESSAGE[ korean ] = "¹®¼­ óÀ½¿¡¼­ °Ë»ç¸¦ °è¼ÓÇÒ±î¿ä?";
+ MESSAGE[ turkish ] = "Denetlemeye, belge baþýnda devam edilsin mi?";
+ MESSAGE[ language_user1 ] = " ";
+};
+QueryBox RID_SVXQB_BW_CONTINUE
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_YES ;
+ /* ### ACHTUNG: Neuer Text in Resource? Überprüfung am Ende des Dokumentes fortsetzen? : šberpr³fung am Ende des Dokumentes fortsetzen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Überprüfung am Ende des Dokumentes fortsetzen? : šberpr³fung am Ende des Dokumentes fortsetzen? */
+ MESSAGE = "Überprüfung 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 revisión al final del documento?" ;
+ Message [ french ] = "Continuer la vérification à la fin du document ?" ;
+ Message [ dutch ] = "Controle aan het einde van het document voortzetten?" ;
+ Message [ swedish ] = "Fortsätta kontroll vid slutet av dokumentet?" ;
+ Message [ danish ] = "Vil du fortsætte kontrollen fra dokumentets slutning?" ;
+ Message [ portuguese ] = "Continuar a verificação no fim do documento?" ;
+ Message [ portuguese_brazilian ] = "Überprüfung am Ende des Dokumentes fortsetzen?" ;
+ Message[ chinese_simplified ] = "´ÓÎĵµÎ²¶Ë¼ÌÐøËÑÑ°£¿";
+ Message[ russian ] = "Ïðîäîëæèòü ïðîâåðêó â êîíöå äîêóìåíòà?";
+ Message[ polish ] = "Kontynuowaæ sprawdzanie na koñcu dokumentu?";
+ Message[ japanese ] = "ÄÞ·­ÒÝÄ‚ÌÅŒã‚ÅÁª¯¸‚µ‚Ü‚·‚©H";
+ Message[ chinese_traditional ] = "±q¤å¥ó§ÀºÝÄ~Äò´M§ä¡H";
+ 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? Möchten Sie den Haupttext prüfen? : Wollen Sie den Haupttext prüfen?
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie den Haupttext prüfen? : M÷chten Sie den Haupttext pr³fen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie den Haupttext prüfen? : M÷chten Sie den Haupttext pr³fen? */
+ MESSAGE = "Möchten Sie den Haupttext prüfen?" ;
+ 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 brødteksten?" ;
+ MESSAGE [ french ] = "Voulez-vous vérifier 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 g³ówny?";
+ MESSAGE[ japanese ] = "Ò²Ý Ã·½Ä‚ðÁª¯¸‚µ‚Ü‚·‚©?";
+ MESSAGE[ chinese_traditional ] = "±z·Q­nÀˬd¤º¤å¡H";
+ 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 prüfen? : Sonderbereiche pr³fen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Sonderbereiche prüfen? : Sonderbereiche pr³fen? */
+ MESSAGE = "Sonderbereiche prüfen?" ;
+ 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 Regiões especiais?" ;
+ MESSAGE [ portuguese ] = "Deseja verificar as regiões especiais?" ;
+ MESSAGE [ finnish ] = "Haluatko tarkistaa erikoisalueet?" ;
+ MESSAGE [ danish ] = "Vil du kontrollere særområderne?" ;
+ MESSAGE [ french ] = "Voulez-vous vérifier les zones spéciales?" ;
+ MESSAGE [ swedish ] = "Vill Du kontrollera specialområden?" ;
+ 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 ] = "Àˬd¯S®í°Ï°ì¡H";
+ MESSAGE[ arabic ] = "åá ÊÑíÏ ÇáÊÏÞíÞ Ýí ÇáãäÇØÞ ÇáÎÇÕÉ¿";
+ MESSAGE[ greek ] = "ÈÝëåôå íá ãßíåé Ýëåã÷ïò ôùí åéäéêþí ðåñéï÷þí;";
+ MESSAGE[ korean ] = "Ư¼ö ¿µ¿ªÀ» °Ë»çÇϽðڽÀ´Ï±î?";
+ MESSAGE[ turkish ] = "Özel bölümler denetlensin mi?";
+ MESSAGE[ language_user1 ] = " ";
+};
+QueryBox RID_SVXQB_SPECIAL_FORCED
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Sonderbereichprüfung ist ausgeschaltet, Trotzdem prüfen? : Sonderbereichpr³fung ist ausgeschaltet, Trotzdem pr³fen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Sonderbereichprüfung ist ausgeschaltet, Trotzdem prüfen? : Sonderbereichpr³fung ist ausgeschaltet, Trotzdem pr³fen? */
+ MESSAGE = "Sonderbereichprüfung ist ausgeschaltet, Trotzdem prüfen?" ;
+ 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 ] = "Verificação de Regiões especiais está desativada, Verificar assim mesmo?" ;
+ MESSAGE [ portuguese ] = "A revisão de áreas especiais está desactivada. Mesmo assim prosseguir?" ;
+ MESSAGE [ finnish ] = "Erikoisalueiden tarkistus ei ole käytössä. Korjausluetaanko silti?" ;
+ MESSAGE [ danish ] = "Stavekontrol i særområder er slået fra, skal der kontrolleres alligevel?" ;
+ MESSAGE [ french ] = "La vérification dans les zones spéciales est désactivée. Vérifier tout de même ?" ;
+ MESSAGE [ swedish ] = "Kontroll av specialområden är avstängd. Kontrollera ändå?" ;
+ MESSAGE [ dutch ] = "De functie 'Speciale bereiken controleren' is uitgeschakeld. Controle toch uitvoeren?" ;
+ MESSAGE [ spanish ] = "La verificación 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 obszarów specjalnych jest wy³¹czone. Mimo to sprawdzaæ?";
+ MESSAGE[ japanese ] = "“ÁŽê’nˆæ‚ÌÁª¯¸‚ªµÌ‚É‚È‚Á‚Ä‚¢‚Ü‚·B‚»‚ê‚Å‚àÁª¯¸‚µ‚Ü‚·‚©?";
+ MESSAGE[ chinese_traditional ] = "¤w¸g¥¢¬¡Àˬd¯S®í°Ï°ì¡M±zÁÙ¬O­n°õ¦æÀˬd¡H";
+ MESSAGE[ arabic ] = "ÊÏÞíÞ ÇáãäÇØÞ ÇáÎÇÕÉ ÛíÑ äÔØ. åá ÊÑíÏ ÇáÊÏÞíÞ ÈÇáÑÛã ãä Ðáß¿";
+ MESSAGE[ greek ] = "Ï Ýëåã÷ïò åéäéêþí ðåñéï÷þí åßíáé áðåíåñãïðïéçìÝíïò. ÈÝëåôå íá ãßíåé ï Ýëåã÷ïò ðáñ´üëá áõôÜ;";
+ MESSAGE[ korean ] = "Ư¼ö¿µ¿ªÀÌ ºñÈ°¼º»óÅÂÀÔ´Ï´Ù. ±×·¡µµ °Ë»çÇϽðڽÀ´Ï±î?";
+ MESSAGE[ turkish ] = "Özel bölüm denetleme etkin deðil, 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 ] = "S³owo jest napisane poprawnie";
+ Text[ japanese ] = "‚±‚Ì’PŒê‚̽ÍßقͳŠm‚Å‚·B";
+ Text[ chinese_traditional ] = "³o­Ó¦rªº¼gªk¥¿½T";
+ Text[ arabic ] = "ÇáßáãÉ ãßÊæÈÉ ÈÔßá ÕÍíÍ";
+ Text[ greek ] = "Ç ïñèïãñáößá åßíáé óùóôÞ";
+ Text[ korean ] = "´Ü¾îÀÇ ¸ÂÃã¹ýÀÌ Á¤È®ÇÕ´Ï´Ù";
+ Text[ turkish ] = "Sözcüðün imlasý doðru";
+ 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 ] = "Não use esta palavra" ;
+ Text [ portuguese ] = "Tente evitar esta palavra." ;
+ Text [ finnish ] = "Älä käytä tätä sanaa" ;
+ Text [ danish ] = "Undgå venligst dette ord" ;
+ Text [ french ] = "N'utilisez pas ce mot" ;
+ Text [ swedish ] = "Undvik det här ordet" ;
+ Text [ dutch ] = "Vermijd het gebruik van dit woord" ;
+ Text [ spanish ] = "Debería evitar esta palabra" ;
+ Text [ english_us ] = "Avoid using this word" ;
+ Text[ chinese_simplified ] = "½¨ÒéÄú²»ÒªÊ¹ÓÃÕâ¸ö×Ö";
+ Text[ russian ] = "Ýòî ñëîâî íåîáõîäèìî èçáåãàòü";
+ Text[ polish ] = "Proszê unikaæ tego s³owa";
+ Text[ japanese ] = "‚±‚Ì’PŒê‚ÌŽg—p‚Í”ð‚¯‚Ä‚­‚¾‚³‚¢B";
+ Text[ chinese_traditional ] = "«Øij±z¤£­n¨Ï¥Î³o­Ó¦r";
+ Text[ arabic ] = "íÌÈ Úáíß ÊÌäÈ ÇÓÊÎÏÇã åÐå ÇáßáãÉ";
+ Text[ greek ] = "Åßíáé ðñïôéìüôåñï íá áðïöåõ÷èåß ç ÷ñÞóç áõôÞò ôçò ëÝîçò";
+ Text[ korean ] = "ÀÌ ´Ü¾î »ç¿ëÀ» ÇÇÇϽʽÿÀ";
+ Text[ turkish ] = "Bu sözcüðü kullanmaktan kaçýnmalýsýnýz";
+ 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 ] = "Okänt ord." ;
+ Text [ dutch ] = "Onbekend woord." ;
+ Text [ spanish ] = "Palabra desconocida." ;
+ Text [ english_us ] = "Unknown word." ;
+ Text[ chinese_simplified ] = "Õâ¸ö×Ö²»Ã÷¡£";
+ Text[ russian ] = "Ýòî ñëîâî íåçíàêîìî.";
+ Text[ polish ] = "Nieznane s³owo.";
+ Text[ japanese ] = "‚±‚Ì’PŒê‚Í•s–¾‚Å‚·B";
+ Text[ chinese_traditional ] = "³o­Ó¦r¤£©ú¡C";
+ Text[ arabic ] = "ÇáßáãÉ ÛíÑ ãÚÑæÝÉ.";
+ Text[ greek ] = "Ç ëÝîç åßíáé Üãíùóôç.";
+ Text[ korean ] = "¾Ë·ÁÁöÁö ¾ÊÀº ´Ü¾îÀÔ´Ï´Ù.";
+ Text[ turkish ] = "Sözcük 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 maiúsculas" ;
+ Text [ portuguese ] = "Erro de maiúsculas/minúsculas" ;
+ Text [ finnish ] = "Väärä iso kirjain" ;
+ Text [ danish ] = "Retskrivningsfejl store/små bogstaver" ;
+ Text [ french ] = "Erreur majuscule/minuscule" ;
+ Text [ swedish ] = "Fel användning av versaler" ;
+ Text [ dutch ] = "Fout bij gebruik hoofdletter/kleine letters" ;
+ Text [ spanish ] = "Error de mayúsculas/minúsculas" ;
+ Text [ english_us ] = "Capitalization error" ;
+ Text[ chinese_simplified ] = "×Öĸ´óСд - ´íÎó";
+ Text[ russian ] = "Îøèáêà â íàïèñàíèè ïðîïèñíûõ è ñòðî÷íûõ áóêâ";
+ Text[ polish ] = "B³êdy w pisowni du¿ych i ma³ych liter";
+ Text[ japanese ] = "‘啶Žš/¬•¶Žš‚Ì´×°";
+ Text[ chinese_traditional ] = "¦r¥À¤j¤p¼g¿ù»~";
+ Text[ arabic ] = "ÎØà Ýí ÇáßÊÇÈÉ ÈÃÍÑÝ ßÈíÑÉ/ÕÛíÑÉ";
+ Text[ greek ] = "ÓöÜëìá ãñáöÞò (ÐåæÜ-Êåöáëáßá)";
+ Text[ korean ] = "´ë/¼Ò¹®ÀÚ ¿À·ù";
+ Text[ turkish ] = "Büyük /küçük harf hatasý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMSTATUS_INVALID_LANG
+{
+ Text = "Sprache wird nicht unterstützt" ;
+ Text [ ENGLISH ] = "Language is not supported" ;
+ Text[ english_us ] = "Language not supported";
+ Text[ portuguese ] = "Língua sem suporte";
+ Text[ russian ] = "ßçûê íå ïîääåðæèâàåòñÿ";
+ Text[ greek ] = "Ç ãëþóóá äåí õðïóôçñßæåôáé";
+ Text[ dutch ] = "Taal wordt niet ondersteund";
+ Text[ french ] = "Cette langue n'est pas supportée";
+ Text[ spanish ] = "No se apoya este idioma";
+ Text[ italian ] = "La lingua non viene supportata";
+ Text[ danish ] = "Sproget understøttes ikke";
+ Text[ swedish ] = "Språket går inte att använda";
+ Text[ polish ] = "Jêzyk nie jest obs³ugiwany";
+ 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 für die Prüfung nicht verfügbar. \nÜberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte Sprache : ist f³r die Pr³fung nicht verf³gbar. \nšberpr³fen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gew³nschte Sprache */
+ /* ### ACHTUNG: Neuer Text in Resource? ist für die Prüfung nicht verfügbar. \nÜberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte Sprache : ist f³r die Pr³fung nicht verf³gbar. \nšberpr³fen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gew³nschte Sprache */
+ TEXT = " ist für die Prüfung nicht verfügbar. \nÜberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte 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 språket du ønsker\n" ;
+ TEXT [ italian ] = "non è disponibile per il controllo ortografico\nVerificare l'installazione ed installare la lingua desiderata" ;
+ TEXT [ portuguese_brazilian ] = "não está disponível para verificação de ortografia\nPor favor confira sua instalação e instale o idioma desejado\n" ;
+ TEXT [ portuguese ] = "não está disponível para a verificação ortográfica.\nConfira a sua instalação e, se necessário, instale a língua desejada\n" ;
+ TEXT [ finnish ] = " ei ole käytettävissä korjauslukua varten\nTarkista asennus ja asenna tarvitsemasi kieli\n" ;
+ TEXT [ danish ] = "står ikke til rådighed for stavekontrollen.\nKontroller venligst din installation og installer i\ngivet fald det ønskede sprog" ;
+ TEXT [ french ] = "n'est pas disponible pour la vérification. Veuillez vérifier l'installation et installer, le cas échéant, la langue souhaitée" ;
+ TEXT [ swedish ] = "är inte tillgänglig för stavningskontroll\nKontrollera Din installation och installera\neventuellt önskat språk" ;
+ TEXT [ dutch ] = "is niet beschikbaar voor spellingcontrole\nControleer uw installatie en installeer\neventueel de gewenste taal." ;
+ TEXT [ spanish ] = "no está disponible para la revisión ortográfica.\nRevise su instalación 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ÇëÄú¼ì²é°²×°µÄ³ÌÐò£¬ÈçÓбØÒª£¬\nÇëÄú°²×°ÒªÊ¹ÓõÄÓïÑÔ°æ±¾¡£";
+ TEXT[ russian ] = "äëÿ ïðîâåðêè íåäîñòóïíî. \nÏðîâåðüòå, ïîæàëóéñòà, Âàøó èíñòàëëÿöèþ è â ñëó÷àå íåîáõîäèìîñòè\nèñòàëëèðóéòå æåëàåìûé ÿçûê";
+ TEXT[ polish ] = "jest niedostêpne do sprawdzania. \nProszê sprawdziæ instalacjê i zainstalowaæ \n ewentualnie potrzebny jêzyk.";
+ TEXT[ japanese ] = "‚ͽÍßÙÁª¯¸‚ÉŽg—p‚Å‚«‚Ü‚¹‚ñB\nÌßÛ¸Þ×т̲ݽİقðÁª¯¸‚µ‚Ä\nꇂɂæ‚Á‚Ä‚Í‚²Šó–]‚ÌŒ¾Œê‚ð²Ý½Ä°Ù‚µ‚Ä‚­‚¾‚³‚¢B";
+ TEXT[ chinese_traditional ] = "µLªk´£¨Ñ«÷¦r¥\\¯à¡C\n½Ð±zÀˬd¦w¸Ëªºµ{¦¡¡M­Y¦³¥²­n¡M\n½Ð±z¦w¸Ë­n¨Ï¥Îªº»y¨¥ª©¥»¡C";
+ TEXT[ arabic ] = "ÛíÑ ãÊæÝÑÉ ááÊÏÞíÞ ÇáÅãáÇÆí. \nÇáÑÌÇÁ ÝÍÕ ÇáÊËÈíÊ ÇáÎÇÕ Èß¡ æÊËÈíÊ ÇááÛÉ ÇáãØáæÈÉ¡ ÅÐÇ áÒã ÇáÃãÑ";
+ TEXT[ greek ] = "äåí åßíáé äéáèÝóéìïò ãéá ôïí Ýëåã÷ï. \nÐáñáêáëþ åëÝãîôå ôçí åãêáôÜóôáóç êáé, áí ÷ñåéáóôåß, \nåêôåëÝóôå ôçí åãêáôÜóôáóç ôçò ãëþóóáò ðïõ åðéèõìåßôå";
+ TEXT[ korean ] = "¸ÂÃã¹ý °Ë»ç¿¡ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù. \n¼³Ä¡ »óŸ¦ Á¡°ËÇÏ°í \nÇÊ¿ä¿¡ µû¶ó ¿øÇÏ´Â ¾ð¾î¸¦ ¼³Ä¡ÇϽʽÿÀ.";
+ TEXT[ turkish ] = "denetlenemiyor. \nKurulumunuzu kontrol edip gerekirse\nistenen dili yükleyin.";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMERR_ADDWORD
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Das Wort konnte nicht ins Wörterbuch aufgenommen werden. : Das Wort konnte nicht ins W÷rterbuch aufgenommen werden. */
+ /* ### ACHTUNG: Neuer Text in Resource? Das Wort konnte nicht ins Wörterbuch aufgenommen werden. : Das Wort konnte nicht ins W÷rterbuch aufgenommen werden. */
+ Text = "Das Wort konnte nicht ins Wörterbuch 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 ] = "Não é possível acrescentar palavra ao dicionário" ;
+ Text [ portuguese ] = "Foi impossível acrescentar a palavra no dicionário." ;
+ Text [ finnish ] = "Sanastoon ei voi lisätä" ;
+ Text [ danish ] = "Det var ikke muligt at tilføje dette ord til ordbogen." ;
+ Text [ french ] = "Impossible d'ajouter ce mot au dictionnaire" ;
+ Text [ swedish ] = "Ordet kunde inte läggas in i ordboken." ;
+ Text [ dutch ] = "Woord kan niet in woordenboek worden opgenomen" ;
+ Text [ spanish ] = "No se pudo añadir la palabra al diccionario." ;
+ Text [ english_us ] = "The word could not be added to dictionary" ;
+ Text[ chinese_simplified ] = "ÎÞ·¨ÊÕ¼Õâ¸ö×Ö¡£";
+ Text[ russian ] = "Âêëþ÷èòü ýòî ñëîâî â ñëîâàðü íåâîçìîæíî.";
+ Text[ polish ] = "To s³owo nie mog³o zostaæ wpisane do s³ownika.";
+ Text[ japanese ] = "‚±‚Ì’PŒê‚ÍŽ«‘‚ɉÁ‚¦‚ç‚ê‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªk¦¬¿ý³o­Ó¦r¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÅÖÇÝÉ ÇáßáãÉ Åáì ÇáÞÇãæÓ.";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá êáôá÷ùñçèåß ç ëÝîç óôï ëåîéêü";
+ Text[ korean ] = "´Ü¾î¸¦ »çÀü¿¡ Ãß°¡ÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Text[ turkish ] = "Sözcük, sözlüðe eklenemedi.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMERR_HYPH
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die Trennhilfe ist nicht verfügbar : Die Trennhilfe ist nicht verf³gbar */
+ /* ### ACHTUNG: Neuer Text in Resource? Die Trennhilfe ist nicht verfügbar : Die Trennhilfe ist nicht verf³gbar */
+ TEXT = "Die Trennhilfe ist nicht verfügbar" ;
+ TEXT [ English ] = "Hyphenation is not available" ;
+ TEXT [ norwegian ] = "Orddeling er ikke tilgjengelig" ;
+ TEXT [ italian ] = "La sillabazione non è disponibile" ;
+ TEXT [ portuguese_brazilian ] = "Hifenação não está disponível" ;
+ TEXT [ portuguese ] = "Divisão silábica não se encontra disponível" ;
+ TEXT [ finnish ] = "Tavutus ei ole käytettävissä" ;
+ TEXT [ danish ] = "Orddelingen står ikke til rådighed" ;
+ TEXT [ french ] = "Césure non disponible" ;
+ TEXT [ swedish ] = "Avstavningshjälpen är inte tillgänglig" ;
+ TEXT [ dutch ] = "Afbrekingshulp is niet beschikbaar" ;
+ TEXT [ spanish ] = "No está disponible la separación silábica" ;
+ TEXT [ english_us ] = "Hyphenation not available" ;
+ TEXT[ chinese_simplified ] = "Á¬×Ö·û²»´æÔÚ";
+ TEXT[ russian ] = "Ïîìîùü â ðàññòàíîâêå ïåðåíîñîâ íåäîñòóïíà";
+ TEXT[ polish ] = "Dzielenie wyrazów nie jest mo¿liwe";
+ TEXT[ japanese ] = "ʲÌÈ°¼®Ý‚ªŽg—p‚Å‚«‚Ü‚¹‚ñB";
+ TEXT[ chinese_traditional ] = "³s¦r²Å¤£¦s¦b";
+ TEXT[ arabic ] = "ãÓÇÚÏÉ ÝÕá ÇáãÞÇØÚ ÛíÑ ãÊæÝÑÉ";
+ TEXT[ greek ] = "Ç âïÞèåéá óõëëáâéóìïý äåí åßíáé äéáèÝóéìç";
+ TEXT[ korean ] = "ÇÏÀÌÇ »ç¿ë ºÒ°¡´É";
+ TEXT[ turkish ] = "Heceleme kullanýlamýyor";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMERR_THESAURUS
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Ein Thesaurus für die eingestellte Sprache ist nicht verfügbar. \nÜberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte Sprache : Ein Thesaurus f³r die eingestellte Sprache ist nicht verf³gbar. \nšberpr³fen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gew³nschte Sprache */
+ /* ### ACHTUNG: Neuer Text in Resource? Ein Thesaurus für die eingestellte Sprache ist nicht verfügbar. \nÜberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte Sprache : Ein Thesaurus f³r die eingestellte Sprache ist nicht verf³gbar. \nšberpr³fen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gew³nschte Sprache */
+ TEXT = "Ein Thesaurus für die eingestellte Sprache ist nicht verfügbar. \nÜberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte 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 språket 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 não há Thesaurus disponível. \nPor favor confira sua instalação e instale o idioma desejado\n" ;
+ TEXT [ portuguese ] = "O dicionário de sinónimos não está disponível para a língua seleccionada. \nConfira a sua instalação e, se necessário, instale a língua desejada.\n" ;
+ TEXT [ finnish ] = "Nykyiselle kielelle ei ole synonyymisanastoa. \nTarkista asennus ja asenna tarvitsemasi kieli\n" ;
+ TEXT [ danish ] = "Synonymordbogen står ikke til rådighed 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 sélectionnée.\nVeuillez vérifiez l'installation et installer\nle cas échéant la langue concernée." ;
+ TEXT [ swedish ] = "Ingen synonymordbok är tillgänglig för det inställda språket. \nKontrollera Din installation och installera\neventuellt önskat språk." ;
+ 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 sinónimos para el idioma seleccionado. \nCompruebe por favor su instalación\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 niedostêpny dla wybranego jêzyka. \nProszê sprawdziæ instalacjê i zainstalowaæ \newentualnie potrzebny jêzyk.";
+ TEXT[ japanese ] = "‘I‘ð‚³‚ê‚½Œ¾Œê—p‚̗ތꎫ“T‚ÍŽg—p‚Å‚«‚Ü‚¹‚ñB\nÌßÛ¸Þ×т̲ݽİقðÁª¯¸‚µ‚ÄA\nꇂɂæ‚Á‚Ä‚Í‚²Šó–]‚ÌŒ¾Œê‚ð²Ý½Ä°Ù‚µ‚ĉº‚³‚¢B";
+ TEXT[ chinese_traditional ] = "±z³]©wªº»y¨¥ª©¥»¨S¦³ªþ¥[µü¨å¥\\¯à¡C\n½Ð±zÀˬd¦w¸Ëªºµ{¦¡¡C\n­Y¦³¥²­n¡M½Ð±z¦w¸Ë­n¨Ï¥Îªº»y¨¥ª©¥»¡C";
+ TEXT[ arabic ] = "áÇ íæÌÏ ÞÇãæÓ ãÑÇÏÝÇÊ ááÛÉ ÇáÊí Êã ÊÍÏíÏåÇ. \nÇáÑÌÇÁ ÝÍÕ ÇáÊËÈíÊ ÇáÎÇÕ Èß¡\nËã ÇáÞíÇã ÊËÈíÊ ÇááÛÉ ÇáãØáæÈÉ¡ ÅÐÇ áÒã ÇáÃãÑ";
+ TEXT[ greek ] = "Äåí õðÜñ÷åé äéáèÝóéìïò èçóáõñüò ëÝîåùí ãéá ôçí åðéëåãìÝíç \nãëþóóá. Ðáñáêáëþ åëÝãîôå ôçí åãêáôÜóôáóç êáé, áí ÷ñåéáóôåß,\n åêôåëÝóôå ôçí åãêáôÜóôáóç ôçò ãëþóóáò ðïõ åðéèõìåßôå";
+ TEXT[ korean ] = "¼³Á¤µÈ ¾ð¾î¿¡ µ¿ÀǾî»çÀüÀ» »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù. \n¼³Ä¡ »óŸ¦ Á¡°ËÇÏ°í \nÇÊ¿ä¿¡ µû¶ó ¿øÇÏ´Â ¾ð¾î¸¦ ¼³Ä¡ÇϽʽÿÀ.";
+ TEXT[ turkish ] = "Ayarlanan dil için eþ anlamlýlar sözlüðü mevcut deðil. \nKurulumunuzu kontrol edip gerekirse\nistenen dili yükleyin.";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DIC_ERR_UNKNOWN
+{
+ Text = "Das Wort konnte aus einem unbekanntem Grund\nnicht ins Wörterbuch 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 impossível adicionar a palavra ao\ndicionário por razões 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'insérer le mot dans le dictionnaire.";
+ Text[ spanish ] = "No se puede recoger en el diccionario la\npalabra debido a una razón desconocida.";
+ Text[ italian ] = "Non è stato possibile inserire la parola nel dizionario.\nErrore sconosciuto.";
+ Text[ danish ] = "Det var af en ukendt grund ikke muligt\nat tilføje ordet til ordbogen.";
+ Text[ swedish ] = "Ordet kunde av okänd anledning\ninte tas upp i ordboken.";
+ Text[ polish ] = "Z nieznanej przyczyny\nwyrazu nie mo¿na by³o przej¹æ do s³ownika.";
+ 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 ] = "¦r¨åµLªk¦¬¿ý³o­Ó¦r¡A­ì¦]¤£©ú¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÅÖÇÝÉ ÇáßáãÉ Åáì ÇáÞÇãæÓ\náÓÈÈ ÛíÑ ãÚÑæÝ.";
+ Text[ turkish ] = "Sözcük bilinmeyen bir nedenden dolayý\nsözlüðe eklenemedi.";
+};
+String RID_SVXSTR_DIC_ERR_FULL
+{
+ Text = "Das Wörterbuch ist bereits voll." ;
+ Text [ ENGLISH ] = "The dictionary is already full." ;
+ Text[ english_us ] = "The dictionary is already full.";
+ Text[ portuguese ] = "O dicionário 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 ] = "S³ownik jest przepe³niony.";
+ Text[ portuguese_brazilian ] = "The dictionary is already full.";
+ Text[ japanese ] = "Ž«‘‚Í‚·‚Å‚É‚¢‚Á‚Ï‚¢‚Å‚·B";
+ Text[ korean ] = "»çÀüÀÌ ÀÌ¹Ì ²Ë Â÷ ÀÖ½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "´ÊµäÒѾ­×°Âú¡£";
+ Text[ chinese_traditional ] = "¦r¨å¤wº¡¡C";
+ Text[ arabic ] = "ÇáÞÇãæÓ ããÊáÆ ÈÇáÝÚá.";
+ Text[ turkish ] = "Sözlük doldu.";
+};
+String RID_SVXSTR_DIC_ERR_READONLY
+{
+ Text = "Das Wörterbuch ist schreibgeschützt." ;
+ Text [ ENGLISH ] = "The dictionary is readonly." ;
+ Text[ english_us ] = "The dictionary is read only.";
+ Text[ portuguese ] = "O dicionário é 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 ] = "S³ownik jest tylko do odczytu.";
+ Text[ portuguese_brazilian ] = "The dictionary is readonly.";
+ Text[ japanese ] = "Ž«‘‚Í“Ç‚ÝŽæ‚èê—p‚Å‚·B";
+ Text[ korean ] = "»çÀüÀº ¾²±â º¸È£µÇ¾î ÀÖ½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "Õâ¸ö´ÊµäÊÇ·À¸²Ð´µÄ(Ö»¹©¶ÁÈ¡)¡£";
+ Text[ chinese_traditional ] = "¦r¨å¬O°ßŪªº¡C";
+ Text[ arabic ] = "ÇáÞÇãæÓ ãÍãí ÖÏ ÇáßÊÇÈÉ.";
+ Text[ turkish ] = "Sözlük yazmaya karþý korumalýdýr.";
+};
+
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk
new file mode 100644
index 0000000000..a7a7566102
--- /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 0000000000..12cff8e1c6
--- /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 0000000000..651750585a
--- /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 0000000000..4fcbab81f3
--- /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 0000000000..abea277db4
--- /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 = "Bemaßung" ;
+ 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 ] = "Bemaßung" ;
+ 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 líneas" ;
+ Text [ french ] = "Écart des l~ignes" ;
+ Text [ dutch ] = "~Lijnafstand" ;
+ Text [ swedish ] = "L~injeavstånd" ;
+ Text [ danish ] = "Linjeafstand" ;
+ Text [ portuguese_brazilian ] = "L~iniendistanz" ;
+ Text [ portuguese ] = "~Espaço entre linhas" ;
+ Text[ chinese_simplified ] = "ÏßÌõ¼ä¸ô(~D)";
+ Text[ russian ] = "Ïðîìåæóòîê ìåæäó ëèíèÿìè";
+ Text[ polish ] = "Odleg³oœæ linii pomocniczych";
+ Text[ japanese ] = "ü‚ÌŠÔŠu(~D)";
+ Text[ chinese_traditional ] = "½u±ø¶¡¹j(~D)";
+ Text[ arabic ] = "ÈõÚÏ ÇáÎØ";
+ Text[ greek ] = "Áðüóôáóç ìåôáîý ãñáììþí";
+ Text[ korean ] = "¼± °Å¸®(~D)";
+ Text[ turkish ] = "~Nesneye uzaklýk";
+ 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 ] = "Guías ~sobresalientes" ;
+ Text [ french ] = "D~épassement des repères" ;
+ Text [ dutch ] = "Hulplijn ~overhangend" ;
+ Text [ swedish ] = "Hjälplinje~överhäng" ;
+ Text [ danish ] = "Hjælpelinjeoverhæng" ;
+ Text [ portuguese_brazilian ] = "Hilfslinien~überhang" ;
+ Text [ portuguese ] = "Linhas auxiliares realçadas" ;
+ Text[ chinese_simplified ] = "¸¨ÖúÏßÑÓ³¤(~O)";
+ Text[ russian ] = "Âûñòóï íàïðàâëÿþùèõ ëèíèé";
+ Text[ polish ] = "Nawis linii pomocniczych";
+ Text[ japanese ] = "•â•ü‚Ì’£‚èo‚µ(~O)";
+ Text[ chinese_traditional ] = "»²§U½u©µªø(~O)";
+ Text[ arabic ] = "ÇáÒíÇÏÉ Ýí ÎØæØ ÇáãÓÇÚÏÉ";
+ Text[ greek ] = "Ðñïå~îï÷Þ âïçèçôéêÞò ãñáììÞò";
+ Text[ korean ] = "¾È³»¼± µ¹Ãâ(~O)";
+ Text[ turkish ] = "Kýlavuz çizgi ~taþmasý";
+ 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 guías" ;
+ Text [ french ] = "~Écart des repères" ;
+ Text [ dutch ] = "Afstand ~hulplijnen" ;
+ Text [ swedish ] = "Hjälplinjeavstån~d" ;
+ Text [ danish ] = "Hjælpelinjeafstand" ;
+ Text [ portuguese_brazilian ] = "Hilfslinien~distanz" ;
+ Text [ portuguese ] = "Esp. entre linhas auxiliares" ;
+ Text[ chinese_simplified ] = "¸¨ÖúÏß¼ä¸ô(~G)";
+ Text[ russian ] = "Ïðîìåæóòîê ìåæäó íàïðàâëÿþùèìè ëèíèÿìè";
+ Text[ polish ] = "Odleg³oœæ linii pomocniczych";
+ Text[ japanese ] = "•â•ü‚Ì‹——£(~G)";
+ Text[ chinese_traditional ] = "»²§U½u¶¡¹j(~G)";
+ Text[ arabic ] = "ÈõÚÏ ÎØæØ ÇáãÓÇÚÏÉ";
+ Text[ greek ] = "Áðüóôáóç âïçèçôéêþí ãñáììþí";
+ Text[ korean ] = "¾È³»¼± °Å¸®(~G)";
+ Text[ turkish ] = "Kýlavuz ç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 ] = "Línea auxiliar i~zquierda" ;
+ Text [ french ] = "Repère ~gauche" ;
+ Text [ dutch ] = "Linker h~ulplijn" ;
+ Text [ swedish ] = "Vänster hjälp~linje" ;
+ Text [ danish ] = "Venstre hjælpelinje" ;
+ 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 ] = "¥ª»²§U½u(~L)";
+ Text[ arabic ] = "ÇáÎØ ÇáãÓÇÚÏ ÇáÃíÓÑ";
+ Text[ greek ] = "ÁñéóôåñÞ âïçèçôéêÞ ãñáììÞ";
+ Text[ korean ] = "¿ÞÂÊ ¾È³»¼±(~L)";
+ Text[ turkish ] = "~Sol kýlavuz ç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 ] = "Línea au~xiliar derecha" ;
+ Text [ french ] = "Repère ~droit" ;
+ Text [ dutch ] = "~Rechter hulplijn" ;
+ Text [ swedish ] = "Höge~r hjälplinje" ;
+ Text [ danish ] = "Højre hjælpelinje" ;
+ 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 ] = "¥k»²§U½u(~R)";
+ Text[ arabic ] = "ÇáÎØ ÇáãÓÇÚÏ ÇáÃíãä";
+ Text[ greek ] = "ÄåîéÜ âïçèçôéêÞ ãñáììÞ";
+ Text[ korean ] = "¿À¸¥ÂÊ ¾È³»¼±(~R)";
+ Text[ turkish ] = "Sa~ð kýlavuz ç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 métrica" ;
+ Text [ french ] = "Afficher l'~unité" ;
+ Text [ swedish ] = "Visa ~metrik" ;
+ Text [ danish ] = "Vis metrik" ;
+ Text [ portuguese ] = "Mostrar ~métrica" ;
+ 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 ] = "~Ölçüm birimlerini görüntüle";
+ 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 ~nedanför" ;
+ Text [ danish ] = "Vis nedenfor" ;
+ Text [ portuguese ] = "Mostrar ~abaixo" ;
+ Text [ portuguese_brazilian ] = "Anzeige ~unterhalb" ;
+ Text[ chinese_simplified ] = "Ï·½ÏÔʾ(~B)";
+ Text[ russian ] = "Ïîêàç íèæå";
+ Text[ polish ] = "Poka¿ poni¿ej";
+ Text[ japanese ] = "‰º•û‚É•\\Ž¦(~B)";
+ Text[ chinese_traditional ] = "¤U¤èÅã¥Ü(~B)";
+ Text[ arabic ] = "ÅÙåÇÑ ÇáÞíÇÓ ÈÇáÃÓÝá";
+ Text[ greek ] = "ÅìöÜíéóç êÜôù áðü";
+ Text[ korean ] = "¾Æ·¡¿¡ Ç¥½Ã(~B)";
+ Text[ turkish ] = "Altta ~görüntüle";
+ 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 ~parallèle" ;
+ 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¿ równolegle";
+ Text[ japanese ] = "•½s‚É•\\Ž¦(~P)";
+ Text[ chinese_traditional ] = "¥­¦æÅã¥Ü(~P)";
+ Text[ arabic ] = "ÅÙåÇÑ ÇáÞíÇÓ ãÊæÇÒíÇð";
+ Text[ greek ] = "ÐáñÜëëçëç ðñïâïëÞ";
+ Text[ korean ] = "ÆòÇàÀ¸·Î Ç¥½Ã(~P)";
+ Text[ turkish ] = "Paralel ~görüntüle";
+ 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 automáticamente";
+ 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 automáticamente";
+ 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 ] = "Posición del texto" ;
+ Text [ french ] = "Position du texte" ;
+ Text [ swedish ] = "Textposition" ;
+ Text [ danish ] = "Tekstplacering" ;
+ Text [ portuguese_brazilian ] = "Textposition" ;
+ Text [ portuguese ] = "Posição do texto" ;
+ Text[ chinese_simplified ] = "ÕýÎÄλÖÃ";
+ Text[ russian ] = "Ïîëîæåíèå òåêñòà";
+ Text[ polish ] = "Pozycja tekstu";
+ Text[ japanese ] = "÷½Ä‚̈ʒu";
+ Text[ chinese_traditional ] = "¤å¦r¦ì¸m";
+ 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 ] = "Previsualización" ;
+ Text [ french ] = "Aperçu" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ portuguese_brazilian ] = "Vorschau" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ 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 ] = "Automático" ;
+ 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 0000000000..d60e954875
--- /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 0000000000..381f115d31
--- /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 0000000000..8fb45bf7a7
--- /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 números" ;
+ Text [ finnish ] = "Numberformat" ;
+ Text [ danish ] = "Talformat" ;
+ Text [ french ] = "Format numérique" ;
+ Text [ swedish ] = "Talformat" ;
+ Text [ dutch ] = "Getalnotatie" ;
+ Text [ spanish ] = "Formato numérico" ;
+ 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 ] = "~Catégorie" ;
+ Text [ swedish ] = "~Kategori" ;
+ Text [ dutch ] = "~Categorie" ;
+ Text [ spanish ] = "~Categoría" ;
+ 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 : Währung*/
+ < "Währung" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Zeit" ; Default ; > ;
+ < "Wissenschaft" ; Default ; > ;
+ < "Bruch" ; Default ; > ;
+ < "Wahrheitswert" ; Default ; > ;
+ < "Text" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Benutzerdefiniert" ; Default ; > ;
+ < "Zahl" ; Default ; > ;
+ < "Prozent" ; Default ; > ;
+ < "Währung" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Zeit" ; Default ; > ;
+ < "Wissenschaft" ; Default ; > ;
+ < "Bruch" ; Default ; > ;
+ < "Wahrheitswert" ; Default ; > ;
+ < "Text" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Benutzerdefiniert" ; Default ; > ;
+ < "Zahl" ; Default ; > ;
+ < "Prozent" ; Default ; > ;
+ < "Währung" ; 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 ; > ;
+ < "Währung" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Zeit" ; Default ; > ;
+ < "Wissenschaft" ; Default ; > ;
+ < "Bruch" ; Default ; > ;
+ < "Wahrheitswert" ; Default ; > ;
+ < "Texto" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Tudo" ; Default ; > ;
+ < "Defenido pelo utilizador" ; Default ; > ;
+ < "Número" ; Default ; > ;
+ < "Percentagem" ; Default ; > ;
+ < "Moeda" ; Default ; > ;
+ < "Data" ; Default ; > ;
+ < "Hora" ; Default ; > ;
+ < "Científico" ; Default ; > ;
+ < "Fracção" ; Default ; > ;
+ < "Valor lógico" ; Default ; > ;
+ < "Texto" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Benutzerdefiniert" ; Default ; > ;
+ < "Zahl" ; Default ; > ;
+ < "Prozent" ; Default ; > ;
+ < "Währung" ; 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 ; > ;
+ < "Klokkeslæt" ; Default ; > ;
+ < "Videnskabelig" ; Default ; > ;
+ < "Brøk" ; Default ; > ;
+ < "Logisk værdi" ; Default ; > ;
+ < "Tekst" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Tout" ; Default ; > ;
+ < "Défini par l'utilisateur" ; Default ; > ;
+ < "Nombre" ; Default ; > ;
+ < "Pourcentage" ; Default ; > ;
+ < "Monétaire" ; Default ; > ;
+ < "Date" ; Default ; > ;
+ < "Heure" ; Default ; > ;
+ < "Scientifique" ; Default ; > ;
+ < "Fraction" ; Default ; > ;
+ < "Valeur logique" ; Default ; > ;
+ < "Texte" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Alla" ; Default ; > ;
+ < "Användardefinierad" ; Default ; > ;
+ < "Tal" ; Default ; > ;
+ < "Procent" ; Default ; > ;
+ < "Valuta" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Tid" ; Default ; > ;
+ < "Vetenskap" ; Default ; > ;
+ < "Bråk" ; 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 ; > ;
+ < "Número" ; Default ; > ;
+ < "Porcentaje" ; Default ; > ;
+ < "Moneda" ; Default ; > ;
+ < "Fecha" ; Default ; > ;
+ < "Hora" ; Default ; > ;
+ < "Ciencia" ; Default ; > ;
+ < "Fracción" ; Default ; > ;
+ < "Valor lógico" ; 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 u¿ytk." ; Default ; > ;
+ < "Liczba" ; Default ; > ;
+ < "Procent" ; Default ; > ;
+ < "Waluta" ; Default ; > ;
+ < "Data" ; Default ; > ;
+ < "Czas" ; Default ; > ;
+ < "Nauka" ; Default ; > ;
+ < "U³amek" ; 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 ] =
+ {
+ < "Tümü" ; Default ; > ;
+ < "Kullanýcý tanýmlý" ; Default ; > ;
+ < "Sayý" ; Default ; > ;
+ < "Yüzde" ; Default ; > ;
+ < "Para birimi" ; Default ; > ;
+ < "Tarih" ; Default ; > ;
+ < "Saat" ; Default ; > ;
+ < "Bilimsel" ; Default ; > ;
+ < "Kesir" ; Default ; > ;
+ < "Mantýksal deðer" ; 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-~Descrição" ;
+ Text [ portuguese ] = "Código 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 ] = "Código 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 ] =
+ {
+ < "Automático" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Àâòîìàòè÷åñêè" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Automatisch" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Automatique" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Automático" ; 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 ] = "~Precisão" ;
+ Text [ portuguese ] = "Casas ~decimais" ;
+ Text [ finnish ] = "~Tarkkuus" ;
+ Text [ danish ] = "Antal decimaler" ;
+ Text [ french ] = "~Décimales" ;
+ 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 ] = "¤p¼ÆÂI¤§«áªº¦ì¼Æ(~D)";
+ Text[ arabic ] = "ÇáãäÇÒá ÇáÚÔÑíÉ";
+ Text[ greek ] = "Äåê~áäéêÜ øçößá";
+ Text[ korean ] = "¼Ò¼öÁ¡ ÀÌÇÏ ÀÚ¸®(~D)";
+ Text[ turkish ] = "~Ondalýk 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? Führende ~Nullen : F³hrende ~Nullen */
+ Text = "Führende ~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 ] = "~Zéro(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 wiod¹ce";
+ Text[ japanese ] = "擪‚̾ÞÛ(~Z)";
+ Text[ chinese_traditional ] = "«e¸m¹s(~Z)";
+ Text[ arabic ] = "ÃÕÝÇÑ ÞíÇÏíÉ";
+ Text[ greek ] = "Áñ÷éêÜ ìçäå~íéêÜ";
+ Text[ korean ] = "¸®µù Á¦·Î(~Z)";
+ Text[ turkish ] = "Virgül öncesi ~sýfýr sayýsý";
+ 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 rød 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 ] = "Røde negative tal" ;
+ Text [ french ] = "~Nbres nég. en rouge" ;
+ Text [ swedish ] = "Negativa värden i ~rött" ;
+ 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 sayýlar ~kýrmýzý";
+ 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 ] = "~Séparateur de milliers" ;
+ Text [ swedish ] = "~Tusentalsavgränsare" ;
+ Text [ dutch ] = "~Scheidingsteken duizendtallen" ;
+ Text [ spanish ] = "~Separador de miles" ;
+ Text [ english_us ] = "~Thousands separator" ;
+ Text[ chinese_simplified ] = "ǧλµã(~T)";
+ Text[ russian ] = "Ðàçäåëåíèå ðàçðÿäîâ";
+ Text[ polish ] = "Separator tysiêczny";
+ Text[ japanese ] = "ç’PˆÊ‚ÌŒ…‹æØ‚è(~T)";
+ Text[ chinese_traditional ] = "¤d¦ìÂI(~T)";
+ Text[ arabic ] = "ÚáÇãÉ ÝÕá ÇáÃáæÝ";
+ Text[ greek ] = "Äéá÷ùñéó~ôéêü ÷éëßùí";
+ Text[ korean ] = "õ´ÜÀ§ ±¸ºÐÁ¡(~T)";
+ Text[ turkish ] = "~Binlik ayýrýcýsý";
+ 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 ] = "Opções" ;
+ Text [ portuguese ] = "Opções" ;
+ Text [ finnish ] = "Määritykset" ;
+ 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 ] = "Seçenekler";
+ 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 ] = "~Língua" ;
+ Text [ finnish ] = "K~ieli" ;
+ Text [ danish ] = "Sprog" ;
+ Text [ french ] = "~Langue" ;
+ Text [ swedish ] = "S~pråk" ;
+ Text [ dutch ] = "~Taal" ;
+ Text [ spanish ] = "~Idioma" ;
+ Text [ english_us ] = "~Language" ;
+ Text[ chinese_simplified ] = "ÓïÑÔ(~L)";
+ Text[ russian ] = "ßçûê";
+ Text[ polish ] = "Jêzyk";
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ 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 = "Hinzufügen" ;
+ QuickHelpText [ ENGLISH ] = "Add" ;
+ QuickHelpText [ norwegian ] = "Add" ;
+ QuickHelpText [ italian ] = "Aggiungi" ;
+ QuickHelpText [ portuguese_brazilian ] = "Acrescentar" ;
+ QuickHelpText [ portuguese ] = "Adicionar" ;
+ QuickHelpText [ finnish ] = "Lisää" ;
+ QuickHelpText [ danish ] = "Tilføj" ;
+ QuickHelpText [ french ] = "Ajouter" ;
+ QuickHelpText [ swedish ] = "Lägg till" ;
+ QuickHelpText [ dutch ] = "Toevoegen" ;
+ QuickHelpText [ spanish ] = "Agregar" ;
+ QuickHelpText [ english_us ] = "Add" ;
+ // ### ACHTUNG: Neuer Text in Resource? Hinzufügen : Hinzuf³gen
+ // ### ACHTUNG: Neuer Text in Resource? Neues Zahlenformat hinzufügen : Neues Zahlenformat hinzuf³gen
+ 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 löschen : Zahlenformat l÷schen
+ 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 comentário" ;
+ 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 0000000000..5f5230fb6d
--- /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 früher 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;
+ aAlignLB.SelectEntryPos(nPos);
+ }
+ else
+ {
+ aAlignLB.SetNoSelection();
+ }
+
+ if(TRUE == bSetDistEmpty)
+ aDistBorderMF.SetText(aEmptyStr);
+
+ bInInintControl = FALSE;
+}
+/*-----------------03.12.97 12:21-------------------
+
+--------------------------------------------------*/
+/*
+void SvxNumPositionTabPage::SetMinDist()
+{
+ // JP 03.04.97: Bug 32903 - MinWert fuer DistBorderMF setzen
+
+ // ggfs. den akt. NumLevel anpassen
+ USHORT nStart = 0;
+ USHORT nEnd = pActNum->GetLevelCount();
+ USHORT nMask = 1;
+ USHORT nTmpLvl = USHRT_MAX;
+ long nMinVal = 0;
+ BOOL bInit = FALSE;
+
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ if(USHRT_MAX == nTmpLvl)
+ {
+ nTmpLvl = i;
+ const SvxNumberFormat& rNumFmt = pActNum->GetLevel( nTmpLvl );
+
+ nMinVal = - rNumFmt.GetFirstLineOffset();
+ if( nTmpLvl )
+ nMinVal -= pActNum->GetLevel( nTmpLvl - 1 ).GetAbsLSpace();
+ }
+ const SvxNumberFormat& rAktNumFmt = pActNum->GetLevel( nStart );
+ if( rAktNumFmt.GetAbsLSpace() < nMinVal )
+ {
+ bInit = TRUE;
+ SvxNumberFormat aNumFmt( rAktNumFmt );
+ aNumFmt.SetAbsLSpace( (USHORT)nMinVal );
+ pActNum->SetLevel( nStart, aNumFmt );
+ }
+ }
+ nMask <<=1;
+ }
+
+ if(!aRelativeCB.IsChecked() || !aRelativeCB.IsEnabled())
+ nMinVal = 0;
+ nMinVal = aDistBorderMF.Normalize( nMinVal );
+ nMinVal = OutputDevice::LogicToLogic(nMinVal, (MapUnit)eCoreUnit, MAP_100TH_MM);
+ aDistBorderMF.SetMin( nMinVal, FUNIT_100TH_MM );
+ aDistBorderMF.SetFirst( nMinVal, FUNIT_100TH_MM );
+ if(bInit)
+ InitControls();
+}
+
+/*-----------------03.12.97 10:02-------------------
+
+--------------------------------------------------*/
+void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet)
+{
+ const SfxPoolItem* pItem;
+ UINT16 nTmpNumLvl = USHRT_MAX;
+ const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
+ 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(*pSaveNum != *pActNum ||
+ nActNumLvl != nTmpNumLvl )
+ {
+ *pActNum = *pSaveNum;
+ 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 ;
+ }
+ aRelativeCB.Enable(nActNumLvl != 1);
+ aLevelLB.SetUpdateMode(TRUE);
+ InitControls();
+ }
+ pPreviewWIN->SetLevel(nActNumLvl);
+ pPreviewWIN->Invalidate();
+}
+
+/*-----------------03.12.97 10:02-------------------
+
+--------------------------------------------------*/
+int SvxNumPositionTabPage::DeactivatePage(SfxItemSet *pSet)
+{
+ if(pSet)
+ FillItemSet(*pSet);
+ return TRUE;
+}
+
+/*-----------------03.12.97 10:02-------------------
+
+--------------------------------------------------*/
+BOOL SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
+{
+ rSet.Put(SfxUInt16Item(SID_PARAM_CUR_NUM_LEVEL, nActNumLvl));
+ //HACK("pOutlineDlg")
+// if(pOutlineDlg)
+// *pOutlineDlg->GetNumRule() = *pActNum;
+// else
+ if(bModified && pActNum)
+ {
+ *pSaveNum = *pActNum;
+ rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId);
+ rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, FALSE));
+ }
+ return bModified;
+}
+
+/*-----------------03.12.97 10:02-------------------
+
+--------------------------------------------------*/
+void SvxNumPositionTabPage::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.Append( UniString::CreateFromInt32( pSaveNum->GetLevelCount() ) );
+ aLevelLB.InsertEntry(sEntry);
+ aLevelLB.SelectEntry(sEntry);
+ }
+ else
+ aLevelLB.SelectEntryPos(0);
+ }
+ else
+ aLevelLB.SelectEntryPos(aLevelLB.GetEntryCount() - 1);
+// nActNumLvl =
+// pOutlineDlg ? pOutlineDlg->GetActNumLevel() : 0;
+// ((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);
+ //BOOL bTextDist = pActNum->IsFeatureSupported(NUM_CHAR_TEXT_DISTANCE);
+ BOOL bDraw = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+ aDistNumFT.Show(bDraw);
+ aDistNumMF.Show(bDraw);
+ // das ist eigentlich Missbrauch, da fuer die vollst. Numerierung kein
+ // eigenes Flag existiert
+// BOOL bContinous = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+// aIndentFT.Show(bContinous);
+// aIndentMF.Show(bContinous);
+ // das ist eigentlich Missbrauch, da fuer die neg. Einrueckung kein
+ // eigenes Flag existiert
+// if(!pActNum->IsFeatureSupported(NUM_CONTINUOUS))
+// aDistNumMF .SetMin( -10000 );
+
+ InitControls();
+ bModified = FALSE;
+}
+
+/*-----------------03.12.97 10:02-------------------
+
+--------------------------------------------------*/
+SfxTabPage* SvxNumPositionTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet)
+{
+ return new SvxNumPositionTabPage(pParent, rAttrSet);
+}
+
+/*-----------------04.12.97 12:51-------------------
+
+--------------------------------------------------*/
+void SvxNumPositionTabPage::SetMetric(FieldUnit eMetric)
+{
+ if(eMetric == FUNIT_MM)
+ {
+ aDistBorderMF .SetDecimalDigits(1);
+ aDistNumMF .SetDecimalDigits(1);
+ aIndentMF .SetDecimalDigits(1);
+ }
+ aDistBorderMF .SetUnit( eMetric );
+ aDistNumMF .SetUnit( eMetric );
+ aIndentMF .SetUnit( eMetric );
+}
+/*void SvxNumPositionTabPage::SetWrtShell(SwWrtShell* pSh)
+{
+ pWrtSh = pSh;
+ const SwRect& rPrtRect = pWrtSh->GetAnyCurRect(RECT_PAGE);
+ aPreviewWIN.SetPageWidth(rPrtRect.Width());
+}
+
+/*-----------------03.12.97 11:06-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumPositionTabPage, EditModifyHdl_Impl, Edit *, pEdit )
+{
+
+ USHORT nStart = 0;
+ USHORT nEnd = pActNum->GetLevelCount();
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+
+ 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;
+}
+/*-----------------03.12.97 11:11-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumPositionTabPage, 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;
+ }
+ }
+ aRelativeCB.Enable(nActNumLvl != 1);
+ SetModified();
+ InitControls();
+ return 0;
+}
+/*-----------------03.12.97 12:24-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld )
+{
+ if(bInInintControl)
+ return 0;
+ long nValue = GetCoreValue(*pFld, eCoreUnit);
+ USHORT nMask = 1;
+#ifdef DEBUG
+ BOOL bFirst = TRUE;
+#endif
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt( pActNum->GetLevel( i ) );
+ if(pFld == &aDistBorderMF)
+ {
+
+ if(aRelativeCB.IsChecked())
+ {
+ if(0 == i)
+ {
+ long nTmp = aNumFmt.GetFirstLineOffset();
+ aNumFmt.SetAbsLSpace( USHORT(nValue - nTmp));
+ }
+ else
+ {
+ long nTmp = pActNum->GetLevel( i - 1 ).GetAbsLSpace() +
+ pActNum->GetLevel( i - 1 ).GetFirstLineOffset() -
+ pActNum->GetLevel( i ).GetFirstLineOffset();
+
+ aNumFmt.SetAbsLSpace( USHORT(nValue + nTmp));
+ }
+ }
+ else
+ {
+ aNumFmt.SetAbsLSpace( (short)nValue - aNumFmt.GetFirstLineOffset());
+ }
+ }
+ else if(pFld == &aDistNumMF)
+ {
+// long nLValue = GetCoreValue(aDistBorderMF, eCoreUnit);
+
+// if(nValue < (-nLValue))
+// SetMetricValue(aDistNumMF, -nLValue, eCoreUnit);
+
+ aNumFmt.SetCharTextDistance( (short)nValue );
+ }
+ else if(pFld == &aIndentMF)
+ {
+ //jetzt muss mit dem FirstLineOffset auch der AbsLSpace veraendert werden
+ long nDiff = nValue + aNumFmt.GetFirstLineOffset();
+ long nAbsLSpace = aNumFmt.GetAbsLSpace();
+ aNumFmt.SetAbsLSpace(USHORT(nAbsLSpace + nDiff));
+ aNumFmt.SetFirstLineOffset( -(short)nValue );
+ }
+
+#ifdef DEBUG
+ if(bFirst)
+ lcl_PrintDebugOutput(*pDebugFixedText, aNumFmt);
+ bFirst = FALSE;
+#endif
+ pActNum->SetLevel( i, aNumFmt );
+ }
+ nMask <<= 1;
+ }
+
+ SetModified();
+// SetMinDist();
+ if(!aDistBorderMF.IsEnabled())
+ {
+ String aEmptyStr;
+ aDistBorderMF.SetText(aEmptyStr);
+ }
+
+ return 0;
+}
+
+/*-----------------04.12.97 12:35-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumPositionTabPage, RelativeHdl_Impl, CheckBox *, pBox )
+{
+ BOOL bOn = pBox->IsChecked();
+// SetMinDist();
+ BOOL bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
+ BOOL bSetValue = FALSE;
+ long nValue = 0;
+ if(bOn || bSingleSelection)
+ {
+ USHORT nMask = 1;
+ BOOL bFirst = TRUE;
+ bSetValue = TRUE;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ const SvxNumberFormat &rNumFmt = pActNum->GetLevel(i);
+ if(bFirst)
+ {
+ nValue = rNumFmt.GetAbsLSpace() + rNumFmt.GetFirstLineOffset();
+ if(bOn && i)
+ nValue -= (pActNum->GetLevel(i - 1).GetAbsLSpace() + pActNum->GetLevel(i - 1).GetFirstLineOffset());
+ }
+ else
+ bSetValue = nValue ==
+ (rNumFmt.GetAbsLSpace() + rNumFmt.GetFirstLineOffset()) -
+ (pActNum->GetLevel(i - 1).GetAbsLSpace() + pActNum->GetLevel(i - 1).GetFirstLineOffset());
+ bFirst = FALSE;
+ }
+ nMask <<= 1;
+ }
+
+ }
+ String aEmptyStr;
+ if(bSetValue)
+ SetMetricValue(aDistBorderMF, nValue, eCoreUnit);
+ else
+ aDistBorderMF.SetText(aEmptyStr);
+ aDistBorderMF.Enable(bOn || bSingleSelection);
+ aDistBorderFT.Enable(bOn || bSingleSelection);
+ bLastRelative = bOn;
+ return 0;
+}
+/*-----------------05.12.97 15:33-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumPositionTabPage, StandardHdl_Impl, PushButton *, EMPTYARG )
+{
+ USHORT nMask = 1;
+ SvxNumRule aTmpNumRule(pActNum->GetFeatureFlags(), pActNum->GetLevelCount(), pActNum->IsContinuousNumbering());
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt( pActNum->GetLevel( i ) );
+ SvxNumberFormat aTempFmt(aTmpNumRule.GetLevel( i ));
+ aNumFmt.SetAbsLSpace( aTempFmt.GetAbsLSpace());
+ aNumFmt.SetCharTextDistance( aTempFmt.GetCharTextDistance() );
+ aNumFmt.SetFirstLineOffset( aTempFmt.GetFirstLineOffset() );
+
+ pActNum->SetLevel( i, aNumFmt );
+ }
+ nMask <<= 1;
+ }
+
+ InitControls();
+ SetModified();
+ return 0;
+}
+
+void SvxNumPositionTabPage::SetModified(BOOL bRepaint)
+{
+ bModified = TRUE;
+ if(bRepaint)
+ {
+ pPreviewWIN->SetLevel(nActNumLvl);
+ pPreviewWIN->Invalidate();
+ }
+}
+
+void SvxNumOptionsTabPage::SetModified(BOOL bRepaint)
+{
+ bModified = TRUE;
+ if(bRepaint)
+ {
+ pPreviewWIN->SetLevel(nActNumLvl);
+ pPreviewWIN->Invalidate();
+ }
+}
+
+
+
+
+
diff --git a/svx/source/dialog/numpages.hrc b/svx/source/dialog/numpages.hrc
new file mode 100644
index 0000000000..c967a8a198
--- /dev/null
+++ b/svx/source/dialog/numpages.hrc
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * $RCSfile: numpages.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_ALIGN 50
+#define LB_ALIGN 51
+#define FT_DIST_BORDER 52
+#define MF_DIST_BORDER 53
+#define FT_DIST_NUM 54
+#define MF_DIST_NUM 55
+#define GB_POS 56
+
+#define LB_FMT_CHAR 60
+#define FT_FMT_CHAR 61
+
+#define FT_WIDTH 67
+#define FI_URL 68
+#define FT_HEIGHT 70
+
+
+#define MN_STD_NUMBER 120
+#define MD_DEL_NUMBER 121
+#define MN_STD_BULLET 122
+#define MN_DEL_BULLET 123
+
+#define STR_BULLET 200
+#define STR_NUMFMT_1 201
+#define STR_NUMFMT_2 202
+#define STR_NUMFMT_3 203
+#define STR_NUMFMT_4 204
+#define STR_NUMFMT_5 205
+#define STR_NUMFMT_6 206
+#define STR_NUMFMT_7 207
+#define STR_NUMFMT_8 208
+#define STR_NUMFMT_7_HTML 209
+
+#define LB_FORM 210
+#define ED_FORM 211
+#define GB_FORM 212
+
+#define BT_BULLET 213
+
+#define BG_VALUES 220
+#define VS_VALUES 221
+#define ST_CUSTOMIZE 222
+#define FT_ERROR 223
+#define CB_LINKED 224
+
+#define GB_LEVEL 150
+#define LB_LEVEL 151
+#define GB_FORMAT 152
+#define GB_PREVIEW 153
+#define GB_POSITION 154
+#define FT_PREFIX 155
+#define ED_PREFIX 156
+#define FT_FMT 157
+#define LB_FMT 158
+#define FT_SUFFIX 159
+#define ED_SUFFIX 160
+#define FT_BORDERDIST 161
+#define MF_BORDERDIST 162
+#define FT_NUMDIST 163
+#define MF_NUMDIST 164
+#define FT_INDENT 165
+#define MF_INDENT 166
+#define FT_CHARFMT 167
+#define LB_CHARFMT 168
+#define NF_ALL_LEVEL 169
+#define FT_START 170
+#define ED_START 171
+#define FT_BULLET 172
+#define PB_BULLET 173
+#define WIN_PREVIEW 174
+#define FT_BITMAP 175
+#define PB_SEARCH 176
+#define CB_RATIO 177
+#define FT_SIZE 178
+#define MF_WIDTH 179
+#define FT_MULT 180
+#define MF_HEIGHT 181
+#define FT_ORIENT 182
+#define LB_ORIENT 183
+#define MB_BITMAP 184
+#define CB_RELATIVE 185
+#define FT_ALL_LEVEL 186
+#define PB_STANDARD 187
+#define CB_SAME_LEVEL 188
+#define GB_SAME_LEVEL 189
+#define FT_BUL_COLOR 190
+#define LB_BUL_COLOR 191
+#define FT_BUL_REL_SIZE 192
+#define MF_BUL_REL_SIZE 193
+#define CB_USE_BULLET 194
+#define ST_POPUP_EMPTY_ENTRY 195
+
+#define MN_GRAPHIC_DLG 1
+#define MN_GALLERY 2
+#define MN_GALLERY_ENTRY 100
+
+
+
diff --git a/svx/source/dialog/numpages.src b/svx/source/dialog/numpages.src
new file mode 100644
index 0000000000..13a2c6c412
--- /dev/null
+++ b/svx/source/dialog/numpages.src
@@ -0,0 +1,2345 @@
+/*************************************************************************
+ *
+ * $RCSfile: numpages.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 <dialogs.hrc>
+#include <helpid.hrc>
+#include <numpages.hrc>
+
+/**************************************************************************/
+/* */
+/* TabPage */
+/* */
+/**************************************************************************/
+TabPage RID_SVXPAGE_PICK_BULLET
+{
+ HelpID = HID_SVXPAGE_PICK_BULLET ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Hide = TRUE;
+ GroupBox BG_VALUES
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 129 ) ;
+ Text = "Auswahl" ;
+ Text [ ENGLISH ] = "Selection" ;
+ Text [ english_us ] = "Selection" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Udvalg" ;
+ Text [ italian ] = "Selezione" ;
+ Text [ spanish ] = "Selección" ;
+ Text [ french ] = "Sélection" ;
+ Text [ dutch ] = "Selectie" ;
+ Text [ portuguese ] = "Selecção" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûáîð";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÊÍÏíÏ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçim";
+ Text[ language_user1 ] = " ";
+ };
+ Control VS_VALUES
+ {
+ Pos = MAP_APPFONT ( 9 , 12 ) ;
+ Size = MAP_APPFONT ( 242 , 117 ) ;
+ TabStop = TRUE ;
+ };
+};
+/**************************************************************************/
+/* */
+/* TabPage */
+/* */
+/**************************************************************************/
+TabPage RID_SVXPAGE_PICK_SINGLE_NUM
+{
+ HelpID = HID_SVXPAGE_PICK_SINGLE_NUM ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Hide = TRUE;
+ GroupBox BG_VALUES
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 129 ) ;
+ Text = "Auswahl" ;
+ Text [ ENGLISH ] = "Selection" ;
+ Text [ english_us ] = "Selection" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Udvalg" ;
+ Text [ italian ] = "Selezione" ;
+ Text [ spanish ] = "Selección" ;
+ Text [ french ] = "Sélection" ;
+ Text [ dutch ] = "Selectie" ;
+ Text [ portuguese ] = "Selecção" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûáîð";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÊÍÏíÏ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçim";
+ Text[ language_user1 ] = " ";
+ };
+ Control VS_VALUES
+ {
+ Pos = MAP_APPFONT ( 9 , 12 ) ;
+ Size = MAP_APPFONT ( 242 , 117 ) ;
+ TabStop = TRUE ;
+ };
+};
+/**************************************************************************/
+/* */
+/* TabPage */
+/* */
+/**************************************************************************/
+TabPage RID_SVXPAGE_PICK_NUM
+{
+ HelpID = HID_SVXPAGE_PICK_NUM;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Hide = TRUE;
+ GroupBox BG_VALUES
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 129 ) ;
+ Text = "Auswahl" ;
+ Text [ ENGLISH ] = "Selection" ;
+ Text [ english_us ] = "Selection" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Udvalg" ;
+ Text [ italian ] = "Selezione" ;
+ Text [ spanish ] = "Selección" ;
+ Text [ french ] = "Sélection" ;
+ Text [ dutch ] = "Selectie" ;
+ Text [ portuguese ] = "Selecção" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûáîð";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÊÍÏíÏ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçim";
+ Text[ language_user1 ] = " ";
+ };
+ Control VS_VALUES
+ {
+ Pos = MAP_APPFONT ( 9 , 12 ) ;
+ Size = MAP_APPFONT ( 242 , 117 ) ;
+ TabStop = TRUE ;
+ };
+ // Die Formate der Numerierung enthalten:
+ // den NumType, Prefix, Postfix, vollstaendig 0/1 durch '|' getrennt
+ // und das fuenffach
+ // NumType:
+ // 0 -> A, B,C;
+ // 1 -> a, b, c;
+ // 2->I, II, III;
+ // 3->i, ii, iii;
+ // 4->1, 2, 3;
+ // 5->leer;
+ // 6->Bullet
+ // Die Formatstrings muessen mit den Formatbeispielen
+ // (STR_FULLNUMS_?) uebereinstimmen!!
+ String STR_NUMFMT_1 //
+ {
+ Text = "4||.|1|4||.|1|1||)|0|6|||61589|6|||61589" ;
+ };
+ String STR_NUMFMT_2
+ {
+ Text = "4||.|0|1||)|0|6|||61589|6|||61589|6|||61589" ;
+ };
+ String STR_NUMFMT_3
+ {
+ Text = "4||.|0|1|(|)|0|3||.|0|0||.|0|6||.|61589" ;
+ };
+ String STR_NUMFMT_4 //
+ {
+ Text = "4||.|0|4||.|0|4||.|0|4||.|0|4||.|0" ;
+ };
+ String STR_NUMFMT_5
+ {
+ Text = "2||.|0|0||.|0|3||.|0|1||)|0|6|||61589" ;
+ };
+ String STR_NUMFMT_6
+ {
+ Text = "0||.|0|2||.|0|1||.|0|3||.|0|6||.|61589" ;
+ };
+ String STR_NUMFMT_7
+ {
+ Text = "4|||1|4|||1|4|||1|4|||1|4|||1" ;
+ };
+ String STR_NUMFMT_8 //
+ {
+ Text = "6|||61487|6|||61488|6|||61485|6|||61589|6|||61589" ;
+ };
+ String STR_NUMFMT_7_HTML
+ {
+ Text = "2||.|0|2||.|0|2||.|0|2||.|0|2||.|0" ;
+ };
+};
+/**************************************************************************/
+/* */
+/* TabPage */
+/* */
+/**************************************************************************/
+TabPage RID_SVXPAGE_PICK_BMP
+{
+ HelpID = HID_SVXPAGE_PICK_BMP;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Hide = TRUE;
+ GroupBox BG_VALUES
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 129 ) ;
+ Text = "Auswahl" ;
+ Text [ ENGLISH ] = "Selection" ;
+ Text [ portuguese ] = "Selecção" ;
+ Text [ english_us ] = "Selection" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Udvalg" ;
+ Text [ italian ] = "Selezione" ;
+ Text [ spanish ] = "Selección" ;
+ Text [ french ] = "Sélection" ;
+ Text [ dutch ] = "Selectie" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûáîð";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÊÍÏíÏ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçim";
+ Text[ language_user1 ] = " ";
+ };
+ Control VS_VALUES
+ {
+ Pos = MAP_APPFONT ( 9 , 12 ) ;
+ Size = MAP_APPFONT ( 242 , 102 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+ };
+ CheckBox CB_LINKED
+ {
+ Text = "Grafiken ~verknüpfen" ;
+ Text [ ENGLISH ] = "~Link bitmaps" ;
+ Pos = MAP_APPFONT ( 9 , 117 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ TabStop = TRUE ;
+ Text[ english_us ] = "~Link graphics";
+ Text[ portuguese ] = "~Ligar imagens";
+ Text[ russian ] = "Ïðèâÿçàòü ãðàôèêè";
+ Text[ greek ] = "Óýíäåóç ãñáöéêþí";
+ Text[ dutch ] = "~Afbeeldingen koppelen";
+ Text[ french ] = "~Lier les images";
+ Text[ spanish ] = "~Vincular imágenes";
+ Text[ italian ] = "Collega ~immagini";
+ Text[ danish ] = "Kæd grafik";
+ Text[ swedish ] = "Länka grafiker";
+ Text[ polish ] = "P~o³¹czyæ grafiki";
+ Text[ portuguese_brazilian ] = "~Link bitmaps";
+ Text[ japanese ] = "}‚ðØݸ‚·‚é(~L)";
+ Text[ korean ] = "±×·¡ÇÈ ¿¬°á(~L)";
+ Text[ chinese_simplified ] = "Á´½ÓͼÐÎ(~L)";
+ Text[ chinese_traditional ] = "³sµ²¹Ï§Î(~L)";
+ Text[ arabic ] = "ÑÈØ ÇáÕæÑ";
+ Text[ turkish ] = "Grafiðe baðlantý oluþtur";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ERROR
+ {
+ Pos = MAP_APPFONT ( 9 , 12 ) ;
+ Size = MAP_APPFONT ( 242 , 30 ) ;
+ Text = "Es sind keine Grafiken im Gallery-Thema 'Bullets' vorhanden." ;
+ Text [ English ] = "Thera are no bitmaps in the Gallery theme 'Bullets'." ;
+ Text [ portuguese ] = "Não existem imagens no tema 'Marcas' da Gallery." ;
+ Text [ english_us ] = "The Gallery theme 'Bullets' is empty (no graphics)." ;
+ Text [ portuguese_brazilian ] = "Es sind keine Grafiken im Gallery-Thema 'Bullets' vorhanden." ;
+ Text [ swedish ] = "Det finns ingen grafik tillgänglig i Gallery-temat 'Bullets'." ;
+ Text [ danish ] = "Der findes ingen billeder i Gallery-emnet 'Punkttegn'." ;
+ Text [ italian ] = "Nella gallery con argomento 'Punti' non ci sono immagini." ;
+ Text [ spanish ] = "No hay imágenes en el tema 'Bullets' de la Galería." ;
+ Text [ french ] = "Il n'existe pas d'image pour le thème 'Bullets' dans la Gallery." ;
+ Text [ dutch ] = "Onder het gallery-onderwerp 'Opsommingstekens' komen geen afbeeldingen voor." ;
+ Hide = TRUE ;
+ WordBreak = TRUE ;
+ Text[ chinese_simplified ] = "»­ÀÈÖ÷Ìâ'ÏîÄ¿±àºÅ'ÄÚûÓÐͼÐΡ£";
+ Text[ russian ] = "Â òåìå ãàëåðåè 'Ìàðêåðû' ðèñóíêîâ íå èìååòñÿ.";
+ Text[ polish ] = "Nie znaleziono grafik w temacie galerii 'Wypunktowanie'.";
+ Text[ japanese ] = "·Þ¬×ذðÏ'‰Óð‘‚«‹L†'‚Ì’†‚ɸÞ×̨¸½‚Í‚ ‚è‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µe´Y¥DÃD'¶µ¥Ø½s¸¹'¤º¨S¦³¹Ï¤ù¡C";
+ Text[ arabic ] = "áÇ ÊæÌÏ ÃíÉ ÕæÑ Ýí ãæÖæÚ ÇáÌÇáíÑí 'Bullets'.";
+ Text[ greek ] = "Äåí õðÜñ÷ïõí ãñáöéêÜ óôç ãêáëåñß ìå èÝìá 'êïõêßäåò'.";
+ Text[ korean ] = "Gallery ÁÖÁ¦'Bullets'¿¡´Â ¾Æ¹« ±×·¡Çȵµ ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "'Madde iþaretleri' galeri konusu altýnda grafik mevcut deðil.";
+ Text[ language_user1 ] = " ";
+ };
+};
+/**************************************************************************/
+/* */
+/* TabPage Numerierungsoptionen */
+/* */
+/**************************************************************************/
+TabPage RID_SVXPAGE_NUM_OPTIONS
+{
+ HelpID = HID_SVXPAGE_NUM_OPTIONS ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Hide = TRUE;
+ GroupBox GB_LEVEL
+ {
+ Pos = MAP_APPFONT ( 6 , 1 ) ;
+ Size = MAP_APPFONT ( 38 , 131 ) ;
+ Text = "Ebene" ;
+ Text [ ENGLISH ] = "Level" ;
+ Text [ norwegian ] = "Level" ;
+ Text [ italian ] = "Livello" ;
+ Text [ portuguese_brazilian ] = "Nível" ;
+ Text [ portuguese ] = "Nível" ;
+ Text [ finnish ] = "Taso" ;
+ Text [ danish ] = "Niveau" ;
+ Text [ french ] = "Niveau" ;
+ Text [ swedish ] = "Nivå" ;
+ Text [ dutch ] = "Niveau" ;
+ Text [ spanish ] = "Nivel" ;
+ Text [ english_us ] = "Level" ;
+ Text[ chinese_simplified ] = "·Ö²ã";
+ Text[ russian ] = "Óðîâåíü";
+ Text[ polish ] = "Poziom";
+ Text[ japanese ] = "ÚÍÞÙ";
+ Text[ chinese_traditional ] = "¤À¼h";
+ Text[ arabic ] = "ÇáãÓÊæì";
+ Text[ greek ] = "Åðßðåäï";
+ Text[ korean ] = "·¹º§";
+ Text[ turkish ] = "Düzey";
+ Text[ language_user1 ] = " ";
+ };
+ MultiListBox LB_LEVEL
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 26 , 114 ) ;
+ TabStop = TRUE ;
+ DropDown = FALSE ;
+ Border = TRUE ;
+ SimpleMode = TRUE ;
+ };
+ GroupBox GB_FORMAT
+ {
+ Pos = MAP_APPFONT ( 47 , 1 ) ;
+ Size = MAP_APPFONT ( 126 , 105 ) ;
+ Text = "Format" ;
+ Text [ ENGLISH ] = "Format" ;
+ Text [ english_us ] = "Format" ;
+ Text [ italian ] = "Formato" ;
+ Text [ spanish ] = "Formato" ;
+ Text [ french ] = "Format" ;
+ Text [ dutch ] = "Formaat" ;
+ Text [ swedish ] = "Format" ;
+ Text [ danish ] = "Format" ;
+ Text [ portuguese_brazilian ] = "Format" ;
+ Text [ portuguese ] = "Formato" ;
+ Text[ chinese_simplified ] = "¸ñʽ";
+ Text[ russian ] = "Ôîðìàò";
+ Text[ polish ] = "Format";
+ Text[ japanese ] = "‘Ž®";
+ Text[ chinese_traditional ] = "®æ¦¡";
+ Text[ arabic ] = "ÊäÓíÞ";
+ Text[ greek ] = "ÌïñöÞ";
+ Text[ korean ] = "¼­½Ä";
+ Text[ turkish ] = "Format";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_FMT
+ {
+ Pos = MAP_APPFONT ( 50 , 10 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Nummerierung" ;
+ Text [ ENGLISH ] = "Numbering" ;
+ Text [ english_us ] = "~Numbering" ;
+ Text [ swedish ] = "Numrering" ;
+ Text [ danish ] = "Nummerering" ;
+ Text [ italian ] = "~Numerazione" ;
+ Text [ spanish ] = "Nu~meración" ;
+ Text [ french ] = "~Numérotation" ;
+ Text [ dutch ] = "~Nummering" ;
+ Text [ portuguese_brazilian ] = "~Numerierung" ;
+ Text [ portuguese ] = "~Numeração" ;
+ Text[ chinese_simplified ] = "񅧏(~N)";
+ Text[ russian ] = "Íóìåðàöèÿ";
+ Text[ polish ] = "Numeracja";
+ Text[ japanese ] = "”Ô†•t‚¯(~N)";
+ Text[ chinese_traditional ] = "½s¸¹(~N)";
+ Text[ arabic ] = "ÇáÊÑÞíã";
+ Text[ greek ] = "Áñßèìçóç";
+ Text[ korean ] = "¹øÈ£¸Å±â±â(~N)";
+ Text[ turkish ] = "Numaralama";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_FMT
+ {
+ Pos = MAP_APPFONT ( 103 , 10 ) ;
+ Size = MAP_APPFONT ( 67 , 70 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ CurPos = 0 ;
+ StringList =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Bullet" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Grafik" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Grafik verknüpft" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Keine" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */;> ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */;> ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */;> ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */;> ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */;> ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/;> ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/;> ;
+ < "Bullet" ; 6/*SVX_NUM_CHAR_SPECIAL */;> ;
+ < "Picture" ; 8/*SVX_NUM_BITMAP */;> ;
+ < "Linked picture" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "None" ; 5/*SVX_NUM_NUMBER_NONE */;> ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "1, 2, 3, ... " ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ... " ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ... " ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ... " ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ... " ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Bullet" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Graphics" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Linked graphics" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "None" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Marca" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Imagem" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Imagem ligada" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Nenhuma" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Ðèñóíîê" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Ãðàôèêà" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Ïðèâÿçàííàÿ ãðàôèêà" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "áåç" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Êïõêßäá" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Ãñáöéêü" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Ãñáöéêü óõíäåäåìÝíï" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "ÊáíÝíá" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Bullet" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Afbeelding" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Afbeelding gekoppeld" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Geen" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ french ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ... " ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Puce" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Image" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Image liée" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Aucune" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Viñeta" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Imagen" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Imagen vinculada" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Ninguna" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Punti" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Immagine" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Collega immagine" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Nessuno" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Punkttegn" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Grafik" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Grafik kædet" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Ingen" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Bullet" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Grafik" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Grafik länkad" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Ingen" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "1,2,3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A,B,C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a,b,c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I,II,III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i,ii,iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, ..,AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Wypunktowanie" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Grafika" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Grafika po³¹czona" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Brak" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "A, B, C, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "a, b, c, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "I, II, III, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "i, ii, iii, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "1, 2, 3, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "Keine" ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "Bullet" ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Grafik" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "A, .., AA, .., AAA, ..." ; 8/*SVX_NUM_BITMAP */; > ;
+ < "a, .., aa, .., aaa, ..." ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Keine" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "1A2A3¤ ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A¤ B¤ C¤ ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a¤ b¤ c¤ ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I¤ II¤ III¤ ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i¤ ii¤ iii¤ ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A¤ ..¤ AA¤ ..¤ AAA¤ ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a¤ ..¤ aa¤ ..¤ aaa¤ ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "‰Óð‘‚«" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "}" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "}‚ðØݸ‚·‚é" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "‚È‚µ" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "¾øÀ½" ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "±Û ¸Ó¸® ±âÈ£" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "±×·¡ÇÈ" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "±×·¡ÇÈ ¿¬°á" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "¾øÀ½" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "ͼÐαàºÅ" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "ͼÐÎ" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Á´½ÓͼÐÎ" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "ÎÞ" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "¹Ï§Î½s¸¹" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "¹Ï§Î" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "³sµ²¹Ï§Î" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "µL" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ... " ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "ÚáÇãÉ ÊÚÏÇÏ" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "ÕæÑÉ" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "ÇáÕæÑ ÇáãÑÊÈØÉ" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "ÈÏæä" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "1, 2, 3, ..." ; 4/*SVX_NUM_ARABIC */; > ;
+ < "A, B, C, ..." ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < "a, b, c, ..." ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < "I, II, III, ..." ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < "i, ii, iii, ..." ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < "A, .., AA, .., AAA, ..." ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < "a, .., aa, .., aaa, ..." ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < "Madde iþaretleri" ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < "Grafik" ; 8/*SVX_NUM_BITMAP */; > ;
+ < "Grafik baðlantýsý oluþturuldu" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Yok" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; 4/*SVX_NUM_ARABIC */; > ;
+ < " " ; 0/*SVX_NUM_CHARS_UPPER_LETTER */; > ;
+ < " " ; 1/*SVX_NUM_CHARS_LOWER_LETTER */; > ;
+ < " " ; 2/*SVX_NUM_ROMAN_UPPER */; > ;
+ < " " ; 3/*SVX_NUM_ROMAN_LOWER */; > ;
+ < " " ; 9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
+ < " " ; 10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
+ < " " ; 6/*SVX_NUM_CHAR_SPECIAL */; > ;
+ < " " ; 8/*SVX_NUM_BITMAP */; > ;
+ < "This is found in a text doc under Format - Numbering/Bullets - Options - Format area - Numbering list box. EM10May00 - Grafik verknüpft - Grafik verknüpft" ; 0x88/*SVX_NUM_BITMAP|0x80 */; > ;
+ < "Keine" ; 5/*SVX_NUM_NUMBER_NONE */; > ;
+ };
+ };
+ FixedText FT_PREFIX
+ {
+ Pos = MAP_APPFONT ( 50 , 27 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Davor" ;
+ Text [ ENGLISH ] = "Before" ;
+ Text [ norwegian ] = "Før" ;
+ Text [ italian ] = "~Davanti" ;
+ Text [ portuguese_brazilian ] = "Antes" ;
+ Text [ portuguese ] = "À fr~ente" ;
+ Text [ finnish ] = "Edellä" ;
+ Text [ danish ] = "Før" ;
+ Text [ french ] = "De~vant" ;
+ Text [ swedish ] = "~Före" ;
+ Text [ dutch ] = "~Ervoor" ;
+ Text [ spanish ] = "~Delante" ;
+ Text [ english_us ] = "Before" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "±àºÅÇ°";
+ Text[ russian ] = "Äî";
+ Text[ polish ] = "Przed";
+ Text[ japanese ] = "”Ô†‘O";
+ Text[ chinese_traditional ] = "¤§«e";
+ Text[ arabic ] = "ÞÈá ÇáÊÑÞíã";
+ Text[ greek ] = "Ðñéí áðü";
+ Text[ korean ] = "Àü¿¡";
+ Text[ turkish ] = "Baþýna ekle:";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_PREFIX
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 103 , 27 ) ;
+ Size = MAP_APPFONT ( 67 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ MaxTextLength = 50 ;
+ };
+ FixedText FT_SUFFIX
+ {
+ Pos = MAP_APPFONT ( 50 , 42 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Dahin~ter" ;
+ Text [ ENGLISH ] = "Behind" ;
+ Text [ norwegian ] = "Bak" ;
+ Text [ italian ] = "~Dietro" ;
+ Text [ portuguese_brazilian ] = "Atrás" ;
+ Text [ portuguese ] = "A~trás" ;
+ Text [ finnish ] = "Jäljessä" ;
+ Text [ danish ] = "Efter" ;
+ Text [ french ] = "D~errière" ;
+ Text [ swedish ] = "~Bakom" ;
+ Text [ dutch ] = "E~rachter" ;
+ Text [ spanish ] = "D~etrás" ;
+ Text [ english_us ] = "After" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "±àºÅºó";
+ Text[ russian ] = "Ïîñëå";
+ Text[ polish ] = "Za";
+ Text[ japanese ] = "”Ô†Œã";
+ Text[ chinese_traditional ] = "¤§«á";
+ Text[ arabic ] = "ÈÚÏ ÇáÊÑÞíã";
+ Text[ greek ] = "ÌåôÜ áðü";
+ Text[ korean ] = "ÈÄ¿¡";
+ Text[ turkish ] = "Sonuna ekle:";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_SUFFIX
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 103 , 42 ) ;
+ Size = MAP_APPFONT ( 67 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ MaxTextLength = 50 ;
+ };
+ FixedText FT_CHARFMT
+ {
+ Pos = MAP_APPFONT ( 50 , 59 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Zeichenv~orlage:" ;
+ Text [ ENGLISH ] = "Character style" ;
+ Text [ english_us ] = "~Character Style:" ;
+ Text [ swedish ] = "~Teckenformatmall:" ;
+ Text [ danish ] = "Tegntypografi:" ;
+ Text [ italian ] = "Modello di carattere:" ;
+ Text [ spanish ] = "Es~tilo de carácter:" ;
+ Text [ french ] = "St~yle de caractères :" ;
+ Text [ dutch ] = "~Tekenopmaakprofiel" ;
+ Text [ portuguese_brazilian ] = "Zeichenv~orlage" ;
+ Text [ portuguese ] = "~Estilo de caracteres:" ;
+ Text[ chinese_simplified ] = "×Ö·ûÑùʽ:";
+ Text[ russian ] = "Ñòèëü òåêñòà:";
+ Text[ polish ] = "Styl znaku:";
+ Text[ japanese ] = "•¶Žš½À²Ù:";
+ Text[ chinese_traditional ] = "¦r¤¸¼Ë¦¡¡G";
+ Text[ arabic ] = "äãØ ÇáÃÍÑÝ:";
+ Text[ greek ] = "Óôõë ÷áñáêôÞñùí:";
+ Text[ korean ] = "¹®ÀÚ À¯Çü:(~C)";
+ Text[ turkish ] = "Karakter þablonu:";
+ Text[ language_user1 ] = "All \"Vorlage\"/Styles are always written with capital S. 10.5.00EM";
+ };
+ ListBox LB_CHARFMT
+ {
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ Pos = MAP_APPFONT ( 103 , 57 ) ;
+ Size = MAP_APPFONT ( 67 , 50 ) ;
+ };
+ FixedText FT_BUL_COLOR
+ {
+ Pos = MAP_APPFONT ( 50 , 59 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Farbe:" ;
+ Text [ ENGLISH ] = "~Color:" ;
+ Hide = TRUE;
+ Text[ italian ] = "~Colore:";
+ Text[ portuguese_brazilian ] = "~Color:";
+ Text[ portuguese ] = "~Cor:";
+ Text[ danish ] = "Farve:";
+ Text[ french ] = "~Couleur :";
+ Text[ swedish ] = "~Färg:";
+ Text[ dutch ] = "~Kleur:";
+ Text[ spanish ] = "~Color:";
+ Text[ english_us ] = "Color:";
+ Text[ chinese_simplified ] = "ÑÕÉ«:";
+ Text[ russian ] = "Öâåò:";
+ Text[ polish ] = "Kolor:";
+ Text[ japanese ] = "F:";
+ Text[ chinese_traditional ] = "ÃC¦â¡G";
+ Text[ arabic ] = ":Çááæä";
+ Text[ greek ] = "×ñþìá:";
+ Text[ korean ] = "»ö»ó:";
+ Text[ turkish ] = "Renk:";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_BUL_COLOR
+ {
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ Pos = MAP_APPFONT ( 103 , 57 ) ;
+ Size = MAP_APPFONT ( 67 , 50 ) ;
+ Hide = TRUE;
+ };
+ FixedText FT_BUL_REL_SIZE
+ {
+ Pos = MAP_APPFONT ( 50 , 76 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Relative Größe:" ;
+ Text [ ENGLISH ] = "~Relatize size:" ;
+ Hide = TRUE;
+ Text[ italian ] = "Dimensione relativa:";
+ Text[ portuguese_brazilian ] = "~Relatize size:";
+ Text[ portuguese ] = "~Tamanho relativo:";
+ Text[ danish ] = "Relativ størrelse:";
+ Text[ french ] = "~Taille relative :";
+ Text[ swedish ] = "~Relativ storlek:";
+ Text[ dutch ] = "~Relatieve grootte:";
+ Text[ spanish ] = "~Tamaño relativo:";
+ Text[ english_us ] = "~Relative size:";
+ Text[ chinese_simplified ] = "Ïà¶ÔµÄ´óС:";
+ Text[ russian ] = "Îòíîñèò. ðàçìåð:";
+ Text[ polish ] = "Rozmiar wzglêdny:";
+ Text[ japanese ] = "”äŠr»²½Þ:";
+ Text[ chinese_traditional ] = "¬Û¹ïªº¤j¤p¡G";
+ Text[ arabic ] = ":ÍÌã äÓÈí";
+ Text[ greek ] = "Ó÷åôéêü ìÝãåèïò:";
+ Text[ korean ] = "»ó´ëÀû Å©±â:(~R)";
+ Text[ turkish ] = "Orantýlý boyut:";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_BUL_REL_SIZE
+ {
+ Pos = MAP_APPFONT ( 103 , 74 ) ;
+ Size = MAP_APPFONT ( 67 , 12 ) ;
+ Border = TRUE ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ SpinSize = 1 ;
+ Minimum = 1;
+ Maximum = 250;
+ Hide = TRUE;
+ };
+ FixedText FT_ALL_LEVEL
+ {
+ Pos = MAP_APPFONT ( 50 , 74 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Vollständig" ;
+ Text [ ENGLISH ] = "~Complete" ;
+ Text [ norwegian ] = "~Fullstendig" ;
+ Text [ italian ] = "~Completa" ;
+ Text [ portuguese_brazilian ] = "~Completar" ;
+ Text [ portuguese ] = "Co~mpleto" ;
+ Text [ finnish ] = "~Täydellinen" ;
+ Text [ danish ] = "Fuldstændig" ;
+ Text [ french ] = "~Complet" ;
+ Text [ swedish ] = "~Fullständig" ;
+ Text [ dutch ] = "~Volledig" ;
+ Text [ spanish ] = "~Completo" ;
+ Text [ english_us ] = "Show sublevels" ;
+ Text[ chinese_simplified ] = "°üº¬ÉÏÒ»¼¶±ð";
+ Text[ russian ] = "Ïîëíîñòüþ";
+ Text[ polish ] = "Kompletny";
+ Text[ japanese ] = "‘ÚÍÞÙ”";
+ Text[ chinese_traditional ] = "§¹¾ã";
+ Text[ arabic ] = "ßÇãá";
+ Text[ greek ] = "ÏëïêëçñùìÝíï";
+ Text[ korean ] = "ÇÏÀ§·¹º§ º¸À̱â";
+ Text[ turkish ] = "Tüm düzeyler";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NF_ALL_LEVEL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 103 , 72 ) ;
+ Size = MAP_APPFONT ( 67 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 10 ;
+ Value = 1 ;
+ First = 1 ;
+ Last = 10 ;
+ };
+ FixedText FT_START
+ {
+ Pos = MAP_APPFONT ( 50 , 91 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Beginn bei" ;
+ Text [ ENGLISH ] = "~Start at" ;
+ Text [ norwegian ] = "~Start på" ;
+ Text [ italian ] = "~Comincia con" ;
+ Text [ portuguese_brazilian ] = "~Começar em" ;
+ Text [ portuguese ] = "~Começar em" ;
+ Text [ finnish ] = "~Start at" ;
+ Text [ danish ] = "Begynd med" ;
+ Text [ french ] = "~Commencer à" ;
+ Text [ swedish ] = "~Börja vid" ;
+ Text [ dutch ] = "~Begin met" ;
+ Text [ spanish ] = "E~mpezar en" ;
+ Text [ english_us ] = "Start at" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "¿ªÊ¼±àºÅ";
+ Text[ russian ] = "Íà÷àëî ñ";
+ Text[ polish ] = "Zacznij od";
+ Text[ japanese ] = "ŠJŽn”Ô†";
+ Text[ chinese_traditional ] = "¶}©l±q";
+ Text[ arabic ] = "ÈÏÁ ÇáÊÑÞíã ÈÜ";
+ Text[ greek ] = "ÈÝóç åêêßíçóçò";
+ Text[ korean ] = "¿¡¼­ ½ÃÀÛ";
+ Text[ turkish ] = "Baþlangýç";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_START
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 103 , 89 ) ;
+ Size = MAP_APPFONT ( 67 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 65535 ;
+ Value = 1 ;
+ First = 0 ;
+ Last = 65535 ;
+ };
+ TriStateBox CB_USE_BULLET
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 50 , 103 ) ;
+ Size = MAP_APPFONT ( 120 , 10 ) ;
+ Text = "~Symbol anzeigen" ;
+ Text [ English ] = "~Show symbol" ;
+ Hide = TRUE;
+ Text[ italian ] = "Mostra simbolo";
+ Text[ portuguese_brazilian ] = "~Show symbol";
+ Text[ portuguese ] = "~Mostrar símbolo";
+ Text[ danish ] = "Vis symbol";
+ Text[ french ] = "~Afficher le symbole";
+ Text[ swedish ] = "~Visa symbol";
+ Text[ dutch ] = "~Symbool weergeven";
+ Text[ spanish ] = "~Mostrar símbolo";
+ Text[ english_us ] = "Show symbol";
+ Text[ chinese_simplified ] = "ÏÔʾͼ±ê";
+ Text[ russian ] = "Ïîêàçàòü ñèìâîë";
+ Text[ polish ] = "Poka¿ symbol";
+ Text[ japanese ] = "‹L†‚Ì•\\Ž¦";
+ Text[ chinese_traditional ] = "Åã¥Ü¹Ï¥Ü";
+ Text[ arabic ] = "ÅÙåÇÑ ÇáÑãÒ";
+ Text[ greek ] = "ÅìöÜíéóç óõìâüëïõ";
+ Text[ korean ] = "±âÈ£ º¸±â";
+ Text[ turkish ] = "Simgeyi görüntüle";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ALIGN
+ {
+ Pos = MAP_APPFONT ( 50 , 118 ) ;
+ Size = MAP_APPFONT ( 77 , 10 ) ;
+ Text = "Ausri~chtung" ;
+ Text [ ENGLISH ] = "Alignment" ;
+ //???
+ Text [ english_us ] = "~Alignment" ;
+ Hide = TRUE;
+ Text[ italian ] = "Allineamento";
+ Text[ portuguese_brazilian ] = "~Alignment";
+ Text[ portuguese ] = "~Alinhamento";
+ Text[ danish ] = "Justering";
+ Text[ french ] = "~Alignement";
+ Text[ swedish ] = "~Justering";
+ Text[ dutch ] = "~Uitlijnen";
+ Text[ spanish ] = "~Alineación";
+ Text[ chinese_simplified ] = "¶ÔÆë(~A)";
+ Text[ russian ] = "Âûðàâíèâàíèå";
+ Text[ polish ] = "Wyrównanie";
+ Text[ japanese ] = "”z’u(~A)";
+ Text[ chinese_traditional ] = "¹ï»ô(~A)";
+ Text[ arabic ] = "ãÍÇÐÇÉ";
+ Text[ greek ] = "Óôïß÷éóç";
+ Text[ korean ] = "¸ÂÃã(~A)";
+ Text[ turkish ] = "Hizalama";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ALIGN
+ {
+ Pos = MAP_APPFONT ( 130 , 117 ) ;
+ Size = MAP_APPFONT ( 40 , 40 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ Hide = TRUE;
+ StringList =
+ {
+ < "Links" ; > ;
+ < "Zentriert" ; > ;
+ < "Rechts" ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Links" ; > ;
+ < "Zentriert" ; > ;
+ < "Rechts" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Left" ; > ;
+ < "Centered" ; > ;
+ < "Right" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Links" ; > ;
+ < "Zentriert" ; > ;
+ < "Rechts" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Vänster" ; > ;
+ < "Centrerad" ; > ;
+ < "Höger" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Venstre" ; > ;
+ < "Centreret" ; > ;
+ < "Højre" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Sinistra" ; > ;
+ < "Centrato" ; > ;
+ < "Destra" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Izquierda" ; > ;
+ < "Centrado" ; > ;
+ < "Derecha" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "À gauche" ; > ;
+ < "Centré" ; > ;
+ < "À droite" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Links" ; > ;
+ < "Gecentreerd" ; > ;
+ < "Rechts" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Esquerda" ; > ;
+ < "Centrado" ; > ;
+ < "Direita" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "×ó" ; > ;
+ < "¾ÓÖÐ" ; > ;
+ < "ÓÒ" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < "Zentriert" ; > ;
+ < "Rechts" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ñëåâà" ; > ;
+ < "Ïî öåíòðó" ; > ;
+ < "Ñïðàâà" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Z lewej strony" ; > ;
+ < "Wyœrodkuj" ; > ;
+ < "Z prawej strony" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "¶" ; > ;
+ < "’†‰›" ; > ;
+ < "‰E‘µ‚¦" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¥ª" ; > ;
+ < "¸m¤¤" ; > ;
+ < "¥k" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "íÓÇÑ" ; > ;
+ < "ÊæÓíØ" ; > ;
+ < "íãíä" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÁñéóôåñÜ" ; > ;
+ < "ÊåíôñáñéóìÝíá" ; > ;
+ < "ÄåîéÜ" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "¿ÞÂÊ" ; > ;
+ < "°¡¿îµ¥" ; > ;
+ < "¿À¸¥ÂÊ" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Sol" ; > ;
+ < "Orta" ; > ;
+ < "Sað" ; > ;
+ };
+ };
+ String STR_BULLET
+ {
+ Text = "Ze~ichen" ;
+ Text [ ENGLISH ] = "Character" ;
+ Text [ norwegian ] = "Character" ;
+ Text [ italian ] = "Ca~rattere" ;
+ Text [ portuguese_brazilian ] = "Caractere" ;
+ Text [ portuguese ] = "~Carácter" ;
+ Text [ finnish ] = "Merkki" ;
+ Text [ danish ] = "Tegn" ;
+ Text [ french ] = "~Caractère" ;
+ Text [ swedish ] = "~Tecken" ;
+ Text [ dutch ] = "~Teken" ;
+ Text [ spanish ] = "C~arácter" ;
+ Text [ english_us ] = "Character" ;
+ Text[ chinese_simplified ] = "×Ö·û";
+ Text[ russian ] = "Çíàê";
+ Text[ polish ] = "Znak";
+ Text[ japanese ] = "•¶Žš";
+ Text[ chinese_traditional ] = "¦r¤¸";
+ Text[ arabic ] = "ÍÑÝ";
+ Text[ greek ] = "×áñáêôÞñåò";
+ Text[ korean ] = "¹®ÀÚ";
+ Text[ turkish ] = "Karakter";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_BULLET
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 158 , 89 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ Text = "..." ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_BITMAP
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 50 , 30 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Grafik" ;
+ Text [ English ] = "Graphic" ;
+ Text [ english_us ] = "Graphics" ;
+ Text [ portuguese_brazilian ] = "Grafik" ;
+ Text [ swedish ] = "Grafik" ;
+ Text [ danish ] = "Billede" ;
+ Text [ italian ] = "Immagine" ;
+ Text [ spanish ] = "Imagen" ;
+ Text [ french ] = "Image" ;
+ Text [ dutch ] = "Afbeelding" ;
+ Text [ portuguese ] = "Imagem" ;
+ Text[ chinese_simplified ] = "ͼÐÎ";
+ Text[ russian ] = "Ðèñóíîê";
+ Text[ polish ] = "Grafika";
+ Text[ japanese ] = "}";
+ Text[ chinese_traditional ] = "¹Ï¤ù";
+ Text[ arabic ] = "ÕæÑÉ";
+ Text[ greek ] = "Ãñáöéêü";
+ Text[ korean ] = "±×·¡ÇÈ";
+ Text[ turkish ] = "Grafik";
+ Text[ language_user1 ] = " ";
+ };
+ MenuButton MB_BITMAP
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 120 , 28 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Text = "Aus~wahl..." ;
+ Text [ ENGLISH ] = "~Select..." ;
+ ButtonMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_GRAPHIC_DLG ;
+ Text = "Aus Datei..." ;
+ Text [ ENGLISH ] = "From file..." ;
+ // HelpID = HID_NUM_NAMED_NUMS ;
+ Text [ portuguese ] = "Do ficheiro..." ;
+ Text [ english_us ] = "From file..." ;
+ Text [ portuguese_brazilian ] = "Aus Datei..." ;
+ Text [ swedish ] = "Från fil..." ;
+ Text [ danish ] = "Fra fil..." ;
+ Text [ italian ] = "Dal file..." ;
+ Text [ spanish ] = "De archivo..." ;
+ Text [ french ] = "À partir d'un fichier..." ;
+ Text [ dutch ] = "Uit bestand..." ;
+ Text[ chinese_simplified ] = "´ÓÎļþ...";
+ Text[ russian ] = "Èç ôàéëà...";
+ Text[ polish ] = "Z pliku...";
+ Text[ japanese ] = "̧²Ù‚©‚ç...";
+ Text[ chinese_traditional ] = "±qÀÉ®×...";
+ Text[ arabic ] = "...ãä ãáÝ";
+ Text[ greek ] = "Áðü áñ÷åßï...";
+ Text[ korean ] = "ÆÄÀÏ¿¡¼­...";
+ Text[ turkish ] = "Dosyadan...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_GALLERY ;
+ Text = "Gallery" ;
+ // HelpID = ;
+ };
+ };
+ };
+ Text [ english_us ] = "Select..." ;
+ Text [ portuguese_brazilian ] = "Aus~wahl..." ;
+ Text [ swedish ] = "~Urval..." ;
+ Text [ danish ] = "Vælg..." ;
+ Text [ italian ] = "Scelta..." ;
+ Text [ spanish ] = "Selec~ción..." ;
+ Text [ french ] = "~Sélection..." ;
+ Text [ dutch ] = "Sele~ctie..." ;
+ Text [ portuguese ] = "~Seleccionar..." ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ...";
+ Text[ russian ] = "Âûáîð...";
+ Text[ polish ] = "Wybór...";
+ Text[ japanese ] = "‘I‘ð...";
+ Text[ chinese_traditional ] = "¿ï¾Ü...";
+ Text[ arabic ] = "...ÊÍÏíÏ";
+ Text[ greek ] = "Åðéëï~ãÞ...";
+ Text[ korean ] = "¼±ÅÃ...";
+ Text[ turkish ] = "Seçim...";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_SIZE
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 50 , 47 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Breite" ;
+ Text [ English ] = "~Width" ;
+ Text [ english_us ] = "Width" ;
+ Text [ portuguese_brazilian ] = "~Breite" ;
+ Text [ swedish ] = "~Bredd" ;
+ Text [ danish ] = "Bredde" ;
+ Text [ italian ] = "~Largh." ;
+ Text [ spanish ] = "A~ncho" ;
+ Text [ french ] = "~Largeur" ;
+ Text [ dutch ] = "~Breedte" ;
+ Text [ portuguese ] = "~Largura" ;
+ Text[ chinese_simplified ] = "¿í¶È";
+ Text[ russian ] = "Øèðèíà";
+ Text[ polish ] = "Szer.";
+ Text[ japanese ] = "•";
+ Text[ chinese_traditional ] = "¼e«×";
+ Text[ arabic ] = "ÇáÚÑÖ";
+ Text[ greek ] = "ÐëÜôïò";
+ Text[ korean ] = "³Êºñ";
+ Text[ turkish ] = "Geniþlik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_WIDTH
+ {
+ Pos = MAP_APPFONT ( 103 , 45 ) ;
+ Size = MAP_APPFONT ( 67 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 1999 ;
+ DecimalDigits = 2 ;
+ Value = 0 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 1999 ;
+ SpinSize = 5 ;
+ Hide = TRUE ;
+ };
+ FixedText FT_MULT
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 50 , 62 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Höhe" ;
+ Text [ English ] = "Height" ;
+ Text [ english_us ] = "Height" ;
+ Text [ portuguese_brazilian ] = "~Höhe" ;
+ Text [ swedish ] = "~Höjd" ;
+ Text [ danish ] = "Højde" ;
+ Text [ italian ] = "~Altezza" ;
+ Text [ spanish ] = "A~ltura" ;
+ Text [ french ] = "~Hauteur" ;
+ Text [ dutch ] = "~Hoogte" ;
+ Text [ portuguese ] = "~Altura" ;
+ Text[ chinese_simplified ] = "¸ß¶È";
+ Text[ russian ] = "Âûñîòà";
+ Text[ polish ] = "Wys.";
+ Text[ japanese ] = "‚‚³";
+ Text[ chinese_traditional ] = "°ª«×";
+ Text[ arabic ] = "ÇáÇÑÊÝÇÚ";
+ Text[ greek ] = "¾øïò";
+ Text[ korean ] = "³ôÀÌ";
+ Text[ turkish ] = "Yükseklik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_HEIGHT
+ {
+ Pos = MAP_APPFONT ( 103 , 60 ) ;
+ Size = MAP_APPFONT ( 67 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 1999 ;
+ DecimalDigits = 2 ;
+ Value = 0 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 1999 ;
+ SpinSize = 5 ;
+ Hide = TRUE ;
+ };
+ CheckBox CB_RATIO
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 50 , 77 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Text = "Abg~leich" ;
+ Text [ English ] = "Fixed ratio" ;
+ Text [ english_us ] = "Keep ratio" ;
+ Text [ portuguese_brazilian ] = "Abgleich" ;
+ Text [ swedish ] = "~Synkronisering" ;
+ Text [ danish ] = "Proportional" ;
+ Text [ italian ] = "Sin~cronizza" ;
+ Text [ spanish ] = "~Sincronización" ;
+ Text [ french ] = "~Proportionnel" ;
+ Text [ dutch ] = "~Synchroniseren" ;
+ Text [ portuguese ] = "Pr~oporcional" ;
+ Text[ chinese_simplified ] = "ͬ²½»¯";
+ Text[ russian ] = "Ïðîïîðöèîíàëüíî";
+ Text[ polish ] = "Synchronizacja";
+ Text[ japanese ] = "’²®";
+ Text[ chinese_traditional ] = "¦P¨B¤Æ";
+ Text[ arabic ] = "ÊÒÇãä";
+ Text[ greek ] = "Áíá~ëïãéêÜ";
+ Text[ korean ] = "ºñÀ² À¯Áö";
+ Text[ turkish ] = "Orantýlý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ORIENT
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 50 , 92 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "A~usrichtung" ;
+ Text [ English ] = "Orientation" ;
+ Text [ english_us ] = "Alignment" ;
+ Text [ portuguese_brazilian ] = "Ausrichtung" ;
+ Text [ swedish ] = "~Justering" ;
+ Text [ danish ] = "Justering" ;
+ Text [ italian ] = "Allineamento" ;
+ Text [ spanish ] = "~Orientación" ;
+ Text [ french ] = "~Alignement" ;
+ Text [ dutch ] = "~Uitlijning" ;
+ Text [ portuguese ] = "A~linhamento" ;
+ Text[ chinese_simplified ] = "¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå";
+ Text[ polish ] = "Wyrównanie";
+ Text[ japanese ] = "”z’u";
+ Text[ chinese_traditional ] = "¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ";
+ Text[ greek ] = "~Ðñïóáíáôïëéóìüò";
+ Text[ korean ] = "¹æÇâ";
+ Text[ turkish ] = "Hizalama";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ORIENT
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 103 , 90 ) ;
+ Size = MAP_APPFONT ( 67 , 50 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ CurPos = 0 ;
+ StringList =
+ {
+ < "Basis oben" ; > ;
+ < "Basis zentriert" ; > ;
+ < "Basis unten" ; > ;
+ < "Zeichen oben" ; > ;
+ < "Zeichen zentriert" ; > ;
+ < "Zeichen unten" ; > ;
+ < "Zeile oben" ; > ;
+ < "Zeile zentriert" ; > ;
+ < "Zeile unten" ; > ;
+ };
+ StringList [ English ] =
+ {
+ < "Basis oben" ; > ;
+ < "Basis zentriert" ; > ;
+ < "Basis unten" ; > ;
+ < "Zeichen oben" ; > ;
+ < "Zeichen zentriert" ; > ;
+ < "Zeichen unten" ; > ;
+ < "Zeile oben" ; > ;
+ < "Zeile zentriert" ; > ;
+ < "Zeile unten" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Top of baseline" ; > ;
+ < "Center of baseline" ; > ;
+ < "Bottom of baseline" ; > ;
+ < "Top of character" ; > ;
+ < "Center of character" ; > ;
+ < "Bottom of character" ; > ;
+ < "Top of line" ; > ;
+ < "Center of line" ; > ;
+ < "Bottom of line" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Basis oben" ; > ;
+ < "Basis zentriert" ; > ;
+ < "Basis unten" ; > ;
+ < "Zeichen oben" ; > ;
+ < "Zeichen zentriert" ; > ;
+ < "Zeichen unten" ; > ;
+ < "Zeile oben" ; > ;
+ < "Zeile zentriert" ; > ;
+ < "Zeile unten" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Över ref. linjen" ; > ;
+ < "Centrerad till ref. linjen" ; > ;
+ < "Undre ref. linjen" ; > ;
+ < "Tecken överst" ; > ;
+ < "Tecken centrerat" ; > ;
+ < "Tecken underst" ; > ;
+ < "Rad överst" ; > ;
+ < "Rad centrerad" ; > ;
+ < "Rad underst" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Basis øverst" ; > ;
+ < "Basis centreret" ; > ;
+ < "Basis nederst" ; > ;
+ < "Tegn øverst" ; > ;
+ < "Tegn centreret" ; > ;
+ < "Tegn nederst" ; > ;
+ < "Række øverst" ; > ;
+ < "Række centreret" ; > ;
+ < "Række nederst" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Base in alto" ; > ;
+ < "Centrato alla base" ; > ;
+ < "Base in basso" ; > ;
+ < "Carattere in alto" ; > ;
+ < "Carattere centrato" ; > ;
+ < "Carattere in basso" ; > ;
+ < "Riga in alto" ; > ;
+ < "Riga centrata" ; > ;
+ < "Riga in basso" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Encima de línea de refefencia" ; > ;
+ < "Centro de línea de referencia" ; > ;
+ < "Debajo de línea de referencia" ; > ;
+ < "Carácter arriba" ; > ;
+ < "Carácter centrado" ; > ;
+ < "Carácter abajo" ; > ;
+ < "Línea superior" ; > ;
+ < "Línea centro" ; > ;
+ < "Línea inferior" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Base en haut" ; > ;
+ < "Base centrée" ; > ;
+ < "Base en bas" ; > ;
+ < "Décalage haut" ; > ;
+ < "Caractère centré" ; > ;
+ < "Décalage bas" ; > ;
+ < "Ligne supérieure" ; > ;
+ < "Ligne centrée" ; > ;
+ < "Ligne inférieure" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Basis boven" ; > ;
+ < "Basis gecentreerd" ; > ;
+ < "Basis beneden" ; > ;
+ < "Teken boven" ; > ;
+ < "Teken gecentreerd" ; > ;
+ < "Teken beneden" ; > ;
+ < "Regel boven" ; > ;
+ < "Regel gecentreerd" ; > ;
+ < "Regel beneden" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Acima da linha de ref." ; > ;
+ < "Centro da linha de ref." ; > ;
+ < "Abaixo da linha de ref." ; > ;
+ < "Carácter em cima" ; > ;
+ < "Carácter centrado" ; > ;
+ < "Carácter em baixo" ; > ;
+ < "Linha superior" ; > ;
+ < "Linha centrada" ; > ;
+ < "Linha inferior" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "»ùÏßÉÏ·½" ; > ;
+ < "»ùÏß¾ÓÖÐ" ; > ;
+ < "»ùÏßÏ·½" ; > ;
+ < "×Ö·ûÉÏ·½" ; > ;
+ < "×Ö·û¾ÓÖÐ" ; > ;
+ < "×Ö·ûÏ·½" ; > ;
+ < "ÐÐÉÏ·½" ; > ;
+ < "ÐÐ ¾ÓÖÐ" ; > ;
+ < "ÐÐÏ·½" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Basis oben" ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < "Zeichen oben" ; > ;
+ < "Zeichen zentriert" ; > ;
+ < "Zeichen unten" ; > ;
+ < "Zeile oben" ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Îñíîâíàÿ ëèíèÿ ñâåðõó" ; > ;
+ < "Îñíîâíàÿ ëèíèÿ â öåíòðå" ; > ;
+ < "Îñíîâíàÿ ëèíèÿ ñíèçó" ; > ;
+ < "Çíàê ñâåðõó" ; > ;
+ < "Çíàê â öåíòðå" ; > ;
+ < "Çíàê ñíèçó" ; > ;
+ < "Ñòðîêà ñâåðõó" ; > ;
+ < "Ñòðîêà â öåíòðå" ; > ;
+ < "Ñòðîêà ñíèçó" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Linia odniesienia w górze" ; > ;
+ < "Wyœrodkowana linia odniesienia" ; > ;
+ < "Linia odniesienia w dole" ; > ;
+ < "Znak w górze" ; > ;
+ < "Wyœrodkuj znaki" ; > ;
+ < "Znak w dole" ; > ;
+ < "Wiersz w górze" ; > ;
+ < "Wyœrodkuj wiersz" ; > ;
+ < "Wiersz w dole" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "ÍÞ°½×²Ý‚Ìã" ; > ;
+ < "Šîü‚Ì’†‰›" ; > ;
+ < "Šîü‚̉º" ; > ;
+ < "•¶Žš‚Ìã" ; > ;
+ < "•¶Žš‚Ì’†‰›" ; > ;
+ < "•¶Žš‚̉º" ; > ;
+ < "s‚Ìã" ; > ;
+ < "s‚Ì’†‰›" ; > ;
+ < "s‚̉º" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "°ò½u¤W¤è" ; > ;
+ < "°ò½u¸m¤¤" ; > ;
+ < "°ò½u¤U¤è" ; > ;
+ < "¦r¤¸¤W¤è" ; > ;
+ < "¦r¤¸¸m¤¤" ; > ;
+ < "¦r¤¸¤U¤è" ; > ;
+ < "¦æ¤W¤è" ; > ;
+ < "¦æ¸m¤¤" ; > ;
+ < "¦æ¤U¤è" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÃÚáì ÇáÎØ ÇáÞÇÚÏí" ; > ;
+ < "æÓØ ÇáÎØ ÇáÞÇÚÏí" ; > ;
+ < "ÃÓÝá ÇáÎØ ÇáÞÇÚÏí" ; > ;
+ < "ÃÚáì ÇáÍÑÝ" ; > ;
+ < "æÓØ ÇáÍÑÝ" ; > ;
+ < "ÃÓÝá ÇáÍÑÝ" ; > ;
+ < "ÃÚáì ÇáÓØÑ" ; > ;
+ < "æÓØ ÇáÓØÑ" ; > ;
+ < "ÃÓÝá ÇáÓØÑ" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÂÜóç ðÜíù" ; > ;
+ < "ÂÜóç êåíôñáñéóìÝíá" ; > ;
+ < "ÂÜóç êÜôù" ; > ;
+ < "×áñáêôÞñáò ðÜíù" ; > ;
+ < "ÊåíôñáñéóìÝíïé ÷áñáêôÞñåò" ; > ;
+ < "×áñáêôÞñáò êÜôù" ; > ;
+ < "ÃñáììÞ ðÜíù" ; > ;
+ < "ÃñáììÞ êåíôñáñéóìÝíá" ; > ;
+ < "ÃñáììÞ êÜôù" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "±âÁؼ± ¸ÇÀ§" ; > ;
+ < "±âÁؼ±ÀÇ °¡¿îµ¥" ; > ;
+ < "±âÁؼ±ÀÇ ¾Æ·¡" ; > ;
+ < "¹®ÀÚÀÇ ¸ÇÀ§" ; > ;
+ < "¹®ÀÚÀÇ °¡¿îµ¥" ; > ;
+ < "¹®ÀÚÀÇ ¾Æ·¡" ; > ;
+ < "¼±ÀÇ ¸ÇÀ§" ; > ;
+ < "¼±ÀÇ °¡¿îµ¥" ; > ;
+ < "¼±ÀÇ ¾Æ·¡" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Taban üstte" ; > ;
+ < "Taban ortada" ; > ;
+ < "Taban altta" ; > ;
+ < "Karakter üstte" ; > ;
+ < "Karakter ortada" ; > ;
+ < "Karakter altta" ; > ;
+ < "Satýr üstte" ; > ;
+ < "Satýr ortada" ; > ;
+ < "Satýr altta" ; > ;
+ };
+ };
+ GroupBox GB_SAME_LEVEL
+ {
+ Pos = MAP_APPFONT ( 47 , 109 ) ;
+ Size = MAP_APPFONT ( 126 , 23 ) ;
+ Text = "Alle Ebenen" ;
+ Text [ ENGLISH ] = "All levels" ;
+ Text [ english_us ] = "All levels" ;
+ Text [ portuguese_brazilian ] = "Alle Ebenen" ;
+ Text [ swedish ] = "Alla nivåer" ;
+ Text [ danish ] = "Alle niveauer" ;
+ Text [ italian ] = "Tutti i livelli" ;
+ Text [ spanish ] = "Todos los niveles" ;
+ Text [ french ] = "Tous les niveaux" ;
+ Text [ dutch ] = "Alle niveaus" ;
+ Text [ portuguese ] = "Todos os níveis" ;
+ Text[ chinese_simplified ] = "ËùÓзֲã";
+ Text[ russian ] = "Âñå óðîâíè";
+ Text[ polish ] = "Wszyst. poziomy";
+ Text[ japanese ] = "‚·‚ׂĂÌÚÍÞÙ";
+ Text[ chinese_traditional ] = "©Ò¦³¤À¼h";
+ Text[ arabic ] = "ßá ÇáãÓÊæíÇÊ";
+ Text[ greek ] = "¼ëá ôá åðßðåäá";
+ Text[ korean ] = "¸ðµç ·¹º§";
+ Text[ turkish ] = "Tüm düzeyler";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_SAME_LEVEL
+ {
+ Pos = MAP_APPFONT ( 50 , 118 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Text = "~Fortlaufende Nummerierung" ;
+ Text [ ENGLISH ] = "~Continuous numbering" ;
+ Text [ english_us ] = "~Consecutive numbering" ;
+ Text [ portuguese_brazilian ] = "~Fortlaufende Numerierung" ;
+ Text [ swedish ] = "Fortlöpande numrering" ;
+ Text [ danish ] = "Fortløbende nummerering" ;
+ Text [ italian ] = "~Numerazione continua" ;
+ Text [ spanish ] = "Numeración c~onsecutiva" ;
+ Text [ french ] = "~Numérotation continue" ;
+ Text [ dutch ] = "~Doorlopende nummering" ;
+ Text [ portuguese ] = "Numeração c~ontínua" ;
+ Text[ chinese_simplified ] = "Á¬Ðø±àºÅ(~C)";
+ Text[ russian ] = "Ïîñëåäîâàòåëüíàÿ íóìåðàöèÿ";
+ Text[ polish ] = "~Kontynuacja poprzedniej numeracji";
+ Text[ japanese ] = "’Ê‚µ”Ô†(~C)";
+ Text[ chinese_traditional ] = "³sÄò½s¸¹(~C)";
+ Text[ arabic ] = "ÇáÊÑÞíã ÈÔßá ãÊÓáÓá";
+ Text[ greek ] = "Óõíå÷üìåíç áñßèìçóç";
+ Text[ korean ] = "¿¬¼ÓÀ¸·Î ¹øÈ£ ¸Å±â±â(~C)";
+ Text[ turkish ] = "Sürekli numaralama";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 176 , 1 ) ;
+ Size = MAP_APPFONT ( 78 , 131 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ english_us ] = "Preview" ;
+ Text [ portuguese_brazilian ] = "Vorschau" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ french ] = "Aperçu" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ÇáãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸®º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 179 , 12 ) ;
+ Size = MAP_APPFONT ( 72 , 114 ) ;
+ };
+ String ST_POPUP_EMPTY_ENTRY
+ {
+ Text = "Es sind keine Grafiken im Gallery-Thema 'Bullets' vorhanden." ;
+ Text [ English ] = "Thera are no bitmaps in the Gallery theme 'Bullets'." ;
+ Text[ english_us ] = "There are no graphics in the 'Bullets' Gallery theme.";
+ Text[ portuguese ] = "Thera are no bitmaps in the Gallery theme 'Bullets'.";
+ Text[ russian ] = "Thera are no bitmaps in the Gallery theme 'Bullets'.";
+ Text[ greek ] = "Äåí õðÜñ÷ïõí ãñáöéêÜ óôï èÝìá ôçò Gallery 'Êïõêßäåò'.";
+ Text[ dutch ] = "Er zijn geen afbeeldingen voor het gallery-onderwerp 'Bullets'.";
+ Text[ french ] = "Il n'existe pas d'image pour le thème 'Bullets' dans la Gallery..";
+ Text[ spanish ] = "Thera are no bitmaps in the Gallery theme 'Bullets'.";
+ Text[ italian ] = "Thera are no bitmaps in the Gallery theme 'Bullets'.";
+ Text[ danish ] = "Der findes ingen billeder i Gallery-emnet 'Punkttegn'.";
+ Text[ swedish ] = "Thera are no bitmaps in the Gallery theme 'Bullets'.";
+ Text[ polish ] = "Thera are no bitmaps in the Gallery theme 'Bullets'.";
+ Text[ portuguese_brazilian ] = "Thera are no bitmaps in the Gallery theme 'Bullets'.";
+ Text[ japanese ] = "·Þ¬×ØðÏu‰Óð‘‚«¼ÝÎÞÙv‚ɂ͸Þ×̨¯¸‚Í‚ ‚è‚Ü‚¹‚ñB";
+ Text[ korean ] = "Thera are no bitmaps in the Gallery theme 'Bullets'.";
+ Text[ chinese_simplified ] = "»­ÀÈÎļþ¡®¸÷ʽͼ±ê¡¯ÄÚ²»´æÔÚͼÐΡ£";
+ Text[ chinese_traditional ] = "µe´Y¥DÃD¡§¶µ¥Ø²Å¸¹¡¨¤§¤¤¨S¦³¹Ï¤ù¡C";
+ Text[ turkish ] = "Thera are no bitmaps in the Gallery theme 'Bullets'.";
+ Text[ arabic ] = "áÇ ÊæÌÏ ÃíÉ ÕæÑ Ýí ãæÖæÚ ÇáÌÇáíÑí 'Bullets'.";
+ };
+
+};
+/**************************************************************************/
+/* */
+/* TabPage Positionen */
+/* */
+/**************************************************************************/
+TabPage RID_SVXPAGE_NUM_POSITION
+{
+ HelpID = HID_SVXPAGE_NUM_POSITION ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Hide = TRUE;
+ GroupBox GB_LEVEL
+ {
+ Pos = MAP_APPFONT ( 6 , 1 ) ;
+ Size = MAP_APPFONT ( 38 , 130 ) ;
+ Text = "Ebene" ;
+ Text [ ENGLISH ] = "Level" ;
+ Text [ norwegian ] = "Level" ;
+ Text [ italian ] = "Livello" ;
+ Text [ portuguese_brazilian ] = "Nível" ;
+ Text [ portuguese ] = "Nível" ;
+ Text [ finnish ] = "Taso" ;
+ Text [ danish ] = "Niveau" ;
+ Text [ french ] = "Niveau" ;
+ Text [ swedish ] = "Nivå" ;
+ Text [ dutch ] = "Niveau" ;
+ Text [ spanish ] = "Nivel" ;
+ Text [ english_us ] = "Level" ;
+ Text[ chinese_simplified ] = "·Ö²ã";
+ Text[ russian ] = "Óðîâåíü";
+ Text[ polish ] = "Poziom";
+ Text[ japanese ] = "ÚÍÞÙ";
+ Text[ chinese_traditional ] = "¤À¼h";
+ Text[ arabic ] = "ÇáãÓÊæì";
+ Text[ greek ] = "Åðßðåäï";
+ Text[ korean ] = "·¹º§";
+ Text[ turkish ] = "Düzey";
+ Text[ language_user1 ] = " ";
+ };
+ MultiListBox LB_LEVEL
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 26 , 114 ) ;
+ TabStop = TRUE ;
+ DropDown = FALSE ;
+ Border = TRUE ;
+ SimpleMode = TRUE ;
+ };
+ GroupBox GB_POSITION
+ {
+ Pos = MAP_APPFONT ( 47 , 1 ) ;
+ Size = MAP_APPFONT ( 207 , 77 ) ;
+ Text = "Position und Abstand" ;
+ Text [ ENGLISH ] = "Position and distance" ;
+ Group = TRUE ;
+ Text [ english_us ] = "Position and spacing" ;
+ Text [ italian ] = "Posizione e distanza" ;
+ Text [ spanish ] = "Posición y espacio" ;
+ Text [ french ] = "Position et écart" ;
+ Text [ dutch ] = "Positie en afstand" ;
+ Text [ swedish ] = "Position och avstånd" ;
+ Text [ danish ] = "Placering og afstand" ;
+ Text [ portuguese_brazilian ] = "Position" ;
+ Text [ portuguese ] = "Posição e espaçamento" ;
+ Text[ chinese_simplified ] = "λÖúͼä¸ô";
+ Text[ russian ] = "Ïîëîæåíèå è èíòåðâàë";
+ Text[ polish ] = "Pozycja i odstêp";
+ Text[ japanese ] = "ˆÊ’u‚ÆŠÔŠu";
+ Text[ chinese_traditional ] = "¦ì¸m©M¶¡¹j";
+ Text[ arabic ] = "ÇáãæÞÚ æÇáãÓÇÝÉ";
+ Text[ greek ] = "ÈÝóç êáé áðüóôáóç";
+ Text[ korean ] = "À§Ä¡ ¿Í °£°Ý";
+ Text[ language_user1 ] = " ";
+ Text[ turkish ] = "Konum ve aralýk";
+ };
+ FixedText FT_BORDERDIST
+ {
+ Pos = MAP_APPFONT ( 50 , 14 ) ;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text = "Ein~rückung";
+// Text = "Abstand Text <-> Rand" ;
+ Text [ ENGLISH ] = "Distance text <-> border" ;
+ Text [ english_us ] = "Indent" ;
+ Text [ swedish ] = "~Indrag" ;
+ Text [ danish ] = "Indrykning" ;
+ Text [ italian ] = "Rientro" ;
+ Text [ spanish ] = "~Sangría" ;
+ Text [ french ] = "Retrait" ;
+ Text [ dutch ] = "In~springing" ;
+ Text [ portuguese_brazilian ] = "Ab~stand Text <-> Rand" ;
+ Text [ portuguese ] = "A~vanço" ;
+ Text[ chinese_simplified ] = "Ëõ½ø";
+ Text[ russian ] = "Îòñòóï";
+ Text[ polish ] = "Wciêcie pierwsz. wiersza";
+ Text[ japanese ] = "²ÝÃÞÝÄ";
+ Text[ chinese_traditional ] = "ÁY±Æ";
+ Text[ arabic ] = "ÇáãÓÇÝÉ ÍÊì ÇáåÇãÔ";
+ Text[ greek ] = "Åóï÷Þ";
+ Text[ korean ] = "µé¿©¾²±â";
+ Text[ turkish ] = "Girinti";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_RELATIVE
+ {
+ Pos = MAP_APPFONT ( 201 , 14 ) ;
+ Size = MAP_APPFONT ( 49 , 10 ) ;
+ Text = "Relati~v" ;
+ Text [ ENGLISH ] = "Relati~ve" ;
+ Text [ portuguese ] = "~Relativo" ;
+ Text [ english_us ] = "Relati~ve" ;
+ Text [ portuguese_brazilian ] = "Relati~v" ;
+ Text [ swedish ] = "Relati~v" ;
+ Text [ danish ] = "Relativ" ;
+ Text [ italian ] = "Relativo" ;
+ Text [ spanish ] = "Relati~vo" ;
+ Text [ french ] = "~Relatif" ;
+ Text [ dutch ] = "Relati~ef" ;
+ Text[ chinese_simplified ] = "숦﵀";
+ Text[ russian ] = "Îòíîñèòåëüíî";
+ Text[ polish ] = "Wzglêd~ny";
+ Text[ japanese ] = "‘OÚÍÞÙ‚©‚ç";
+ Text[ chinese_traditional ] = "¬Û¹ïªº";
+ Text[ arabic ] = "äÓÈí";
+ Text[ greek ] = "Ó÷åôéêÜ";
+ Text[ korean ] = "ºñ·Ê(~V)";
+ Text[ turkish ] = "Göreceli";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_BORDERDIST
+ {
+ Pos = MAP_APPFONT ( 158 , 12 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 1999 ;
+ DecimalDigits = 2 ;
+ Value = 0 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 1999 ;
+ SpinSize = 5 ;
+ };
+ FixedText FT_INDENT
+ {
+ Pos = MAP_APPFONT ( 50 , 29 ) ;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text = "Abstand zum Te~xt" ;
+// Text = "Einr~ückung" ;
+ Text [ ENGLISH ] = "Indent" ;
+ Text [ english_us ] = "Spacing to text" ;
+ Text [ swedish ] = "Avstånd till te~xt" ;
+ Text [ danish ] = "Afstand til tekst" ;
+ Text [ italian ] = "Distanza dal testo" ;
+ Text [ spanish ] = "~Distancia al texto" ;
+ Text [ french ] = "Écart du texte" ;
+ Text [ dutch ] = "Afstand tot de ~tekst" ;
+ Text [ portuguese_brazilian ] = "Einr~ückung" ;
+ Text [ portuguese ] = "Distância do ~texto" ;
+ Text[ chinese_simplified ] = "ÖÁÕýÎĵľàÀë";
+ Text[ russian ] = "Ðàññòîÿíèå îò òåêñòà";
+ Text[ polish ] = "Odstêp do tekstu";
+ Text[ japanese ] = "÷½Ä‚Ü‚Å‚ÌŠÔŠu";
+ Text[ chinese_traditional ] = "¦Ü¤º¤åªº¶ZÖÃ";
+ Text[ arabic ] = "ÇáãÓÇÝÉ ÍÊì ÇáäÕ";
+ Text[ greek ] = "Áðüóôáóç áðü ~êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ® °£°Ý";
+ Text[ turkish ] = "Metin uzaklýðý";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_INDENT
+ {
+ Pos = MAP_APPFONT ( 158 , 27 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 1999 ;
+ DecimalDigits = 2 ;
+ Value = 0 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 1999 ;
+ SpinSize = 5 ;
+ };
+ FixedText FT_NUMDIST
+ {
+ Pos = MAP_APPFONT ( 50 , 44 ) ;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text = "~Mindestabstand Nummer <-> Text" ;
+ Text [ ENGLISH ] = "Distance text <-> numbering" ;
+ Text [ english_us ] = "Minimum space numbering <-> text" ;
+ Text [ swedish ] = "~Minimiavstånd nummer <-> text" ;
+ Text [ danish ] = "Min. afstand nummer <-> tekst" ;
+ Text [ italian ] = "Distanza minima numerazione <-> testo" ;
+ Text [ spanish ] = "Distancia mínima texto <-> número" ;
+ Text [ french ] = "Écart ~minimum numérotation <-> texte" ;
+ Text [ dutch ] = "~Minimale afstand nummer <-> tekst" ;
+ Text [ portuguese_brazilian ] = "Abstand Te~xt <-> Numerierung" ;
+ Text [ portuguese ] = "Distância mínima texto <-> numeração" ;
+ Text[ chinese_simplified ] = "±àºÅºÍÕýÎÄÖ®¼äµÄ×îÉÙ¼ä¸ô";
+ Text[ russian ] = "Ìèí. ðàññòîÿíèå íîìåð <-> òåêñò";
+ Text[ polish ] = "Minimalny odstêp numeracja <-> tekst";
+ Text[ japanese ] = "”Ô†‚Æ÷½Ä‚ÌŬŠÔŠu";
+ Text[ chinese_traditional ] = "½s¸¹©M¤º¤å¤§¶¡ªº³Ì¤Ö¶¡¹j";
+ Text[ arabic ] = "ÃÞá ãÓÇÝÉ Èíä ÇáÑÞã <-> ÇáäÕ";
+ Text[ greek ] = "ÅëÜ÷éóôç áðüóôáóç áñéè~ìïý <-> Êåßìåíï";
+ Text[ korean ] = "ÃÖ¼Ò °£°Ý ¹øÈ£ ¸Å±â±â <-> ÅؽºÆ®";
+ Text[ turkish ] = "Asgari aralýk: Numara <-> Metin";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_NUMDIST
+ {
+ Pos = MAP_APPFONT ( 158 , 42 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 1999 ;
+ DecimalDigits = 2 ;
+ Value = 0 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 1999 ;
+ SpinSize = 5 ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_ALIGN
+ {
+ Pos = MAP_APPFONT ( 50 , 59 ) ;
+ Size = MAP_APPFONT ( 105 , 10 ) ;
+ Text = "Ausri~chtung der Nummerierung" ;
+ Text [ ENGLISH ] = "Alignment of the numbering" ;
+ //???
+ Text [ english_us ] = "N~umbering alignment" ;
+ Text [ swedish ] = "Justering av numrering" ;
+ Text [ danish ] = "Justering af nummerering" ;
+ Text [ italian ] = "~Allineamento della numerazione" ;
+ Text [ spanish ] = "~Alineación de numeración" ;
+ Text [ french ] = "~Alignement de la numérotation" ;
+ Text [ dutch ] = "~Uitlijning van de nummering" ;
+ Text [ portuguese_brazilian ] = "Ausri~chtung der Numerierung" ;
+ Text [ portuguese ] = "A~linhamento da numeração" ;
+ Text[ chinese_simplified ] = "¶ÔÆë±àºÅ(~U)";
+ Text[ russian ] = "Âûðàâíèâàíèå íóìåðàöèè";
+ Text[ polish ] = "Wyrównanie numeracji";
+ Text[ japanese ] = "”Ô†‚Ì®—ñ(~U)";
+ Text[ chinese_traditional ] = "½s¸¹¹ï»ô(~U)";
+ Text[ arabic ] = "ãÍÇÐÇÉ ÇáÊÑÞíã";
+ Text[ greek ] = "Óôïß÷éóç áñßèìçóçò";
+ Text[ korean ] = "¹øÈ£¸Å±â±â ¸ÂÃã(~U)";
+ Text[ turkish ] = "Numara hizalama";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ALIGN
+ {
+ Pos = MAP_APPFONT ( 158 , 57 ) ;
+ Size = MAP_APPFONT ( 40 , 40 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Links" ; > ;
+ < "Zentriert" ; > ;
+ < "Rechts" ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Links" ; > ;
+ < "Zentriert" ; > ;
+ < "Rechts" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Left" ; > ;
+ < "Centered" ; > ;
+ < "Right" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Links" ; > ;
+ < "Zentriert" ; > ;
+ < "Rechts" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Vänster" ; > ;
+ < "Centrerad" ; > ;
+ < "Höger" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Venstre" ; > ;
+ < "Centreret" ; > ;
+ < "Højre" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Sinistra" ; > ;
+ < "Centrato" ; > ;
+ < "Destra" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Izquierda" ; > ;
+ < "Centrado" ; > ;
+ < "Derecha" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "À gauche" ; > ;
+ < "Centré" ; > ;
+ < "À droite" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Links" ; > ;
+ < "Gecentreerd" ; > ;
+ < "Rechts" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Esquerda" ; > ;
+ < "Centrado" ; > ;
+ < "Direita" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "×ó" ; > ;
+ < "¾ÓÖÐ" ; > ;
+ < "ÓÒ" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Links" ; > ;
+ < "Zentriert" ; > ;
+ < "Rechts" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ñëåâà" ; > ;
+ < "Â öåíòðå" ; > ;
+ < "Ñïðàâà" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Z lewej strony" ; > ;
+ < "Wyœrodkuj" ; > ;
+ < "Z prawej strony" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "¶" ; > ;
+ < "’†‰›" ; > ;
+ < "‰E" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¥ª" ; > ;
+ < "¸m¤¤" ; > ;
+ < "¥k" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "íÓÇÑ" ; > ;
+ < "ÊæÓíØ" ; > ;
+ < "íãíä" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÁñéóôåñÜ" ; > ;
+ < "ÊåíôñáñéóìÝíá" ; > ;
+ < "ÄåîéÜ" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "¿ÞÂÊ" ; > ;
+ < "°¡¿îµ¥" ; > ;
+ < "¿À¸¥ÂÊ" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Sol" ; > ;
+ < "Orta" ; > ;
+ < "Sað" ; > ;
+ };
+ };
+ PushButton PB_STANDARD
+ {
+ Pos = MAP_APPFONT ( 201 , 63 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ Text = "~Standard" ;
+ Text [ ENGLISH ] = "~Standard" ;
+ Text [ english_us ] = "Default" ;
+ Text [ portuguese_brazilian ] = "~Standard" ;
+ Text [ swedish ] = "S~tandard" ;
+ Text [ danish ] = "Standard" ;
+ Text [ italian ] = "~Standard" ;
+ Text [ spanish ] = "~Predeterminado" ;
+ Text [ french ] = "Par ~défaut" ;
+ Text [ dutch ] = "~Standaard" ;
+ Text [ portuguese ] = "~Padrão" ;
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ polish ] = "Domyœlnie";
+ Text[ japanese ] = "•W€";
+ Text[ chinese_traditional ] = "¼Ð·Ç";
+ Text[ arabic ] = "ÞíÇÓí";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "±âº»°ª";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 47 , 81 ) ;
+ Size = MAP_APPFONT ( 207 , 50 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ english_us ] = "Preview" ;
+ Text [ portuguese_brazilian ] = "Vorschau" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ french ] = "Aperçu" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ÇáãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸®º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 50 , 92 ) ;
+ Size = MAP_APPFONT ( 201 , 34 ) ;
+ };
+};
+
+String RID_STR_EDIT_GRAPHIC
+{
+ Text = "Verknüpfen" ;
+ Text [ English ] = "Link to" ;
+ Text [ norwegian ] = "Link to" ;
+ Text [ italian ] = "Collega" ;
+ Text [ portuguese_brazilian ] = "Ligação com" ;
+ Text [ portuguese ] = "Ligar" ;
+ Text [ finnish ] = "Linkitä:" ;
+ Text [ danish ] = "Kæd" ;
+ Text [ french ] = "Lien" ;
+ Text [ swedish ] = "Länka" ;
+ Text [ dutch ] = "Koppelen" ;
+ Text [ spanish ] = "Vincular" ;
+ Text [ english_us ] = "Link" ;
+ Text[ chinese_simplified ] = "Áª»ú";
+ Text[ russian ] = "Ñâÿçü";
+ Text[ polish ] = "£¹cze";
+ Text[ japanese ] = "Øݸ";
+ Text[ chinese_traditional ] = "±¶®|";
+ Text[ arabic ] = "ÑÈØ";
+ Text[ greek ] = "Óýíäåóç";
+ Text[ korean ] = "¿¬°á";
+ Text[ turkish ] = "Baðlantý oluþtur";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FULLNUMS_1 { Text = "1.|1.1|a)|61589|61589" ; };
+String RID_STR_FULLNUMS_2 { Text = "1.|a)|61589|61589|61589" ; };
+String RID_STR_FULLNUMS_3 { Text = "1.|(a)|i.|A.|61589" ; };
+String RID_STR_FULLNUMS_4 { Text = "1.|1.|1.|1.|1." ; };
+String RID_STR_FULLNUMS_5 { Text = "I.|A.|i.|a)|61589" ; };
+String RID_STR_FULLNUMS_6 { Text = "A.|I.|a.|i.|61589" ; };
+String RID_STR_FULLNUMS_7 { Text = "1|1.1|1.1.1|1.1.1.1|1.1.1.1.1" ; };
+String RID_STR_FULLNUMS_8 { Text = "61487|61488|61485|61589|61589" ; };
+String RID_STR_FULLNUMS_7_HTML { Text = "I.|I.|I|I.|I." ; };
+
+
diff --git a/svx/source/dialog/page.cxx b/svx/source/dialog/page.cxx
new file mode 100644
index 0000000000..cd324563bb
--- /dev/null
+++ b/svx/source/dialog/page.cxx
@@ -0,0 +1,1686 @@
+/*************************************************************************
+ *
+ * $RCSfile: page.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
+
+#define ITEMID_BRUSH 0
+#define ITEMID_BOX 0
+#define ITEMID_BOXINFO 0
+#define ITEMID_SHADOW 0
+#define ITEMID_PAPERBIN 0
+#define ITEMID_LRSPACE 0
+#define ITEMID_ULSPACE 0
+#define ITEMID_SIZE 0
+
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _RESARY_HXX //autogen
+#include <vcl/resary.hxx>
+#endif
+#ifndef _GRAPH_HXX //autogen
+#include <vcl/graph.hxx>
+#endif
+#ifndef _SFXVIEWSH_HXX //autogen
+#include <sfx2/viewsh.hxx>
+#endif
+#ifndef _SFXITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#define _SVX_PAGE_CXX
+
+#include "dialogs.hrc"
+#include "page.hrc"
+#include "helpid.hrc"
+
+#define ITEMID_PAGE 0
+#define ITEMID_SETITEM 0
+#define ITEMID_PTR 0
+
+#include "page.hxx"
+#include "pageitem.hxx"
+#include "brshitem.hxx"
+#include "boxitem.hxx"
+#include "shaditem.hxx"
+#include "pbinitem.hxx"
+#include "lrspitem.hxx"
+#include "ulspitem.hxx"
+#include "sizeitem.hxx"
+#include "bbdlg.hxx"
+#include "dlgutil.hxx"
+#include "dialmgr.hxx"
+#include "paperinf.hxx"
+#include "dialmgr.hxx"
+
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+
+// static ----------------------------------------------------------------
+
+static const long MINBODY = 284; // 0,5cm in twips aufgerundet
+static const long PRINT_OFFSET = 17; // 0,03cm in twips abgerundet
+
+static USHORT pRanges[] =
+{
+ SID_ATTR_BORDER_OUTER,
+ SID_ATTR_BORDER_SHADOW,
+ SID_ATTR_LRSPACE,
+ SID_ATTR_PAGE_SHARED,
+ SID_SWREGISTER_COLLECTION,
+ SID_SWREGISTER_MODE,
+ 0
+};
+
+// ------- Mapping Seitenlayout ------------------------------------------
+
+USHORT aArr[] =
+{
+ SVX_PAGE_ALL,
+ SVX_PAGE_MIRROR,
+ SVX_PAGE_RIGHT,
+ SVX_PAGE_LEFT
+};
+
+// -----------------------------------------------------------------------
+
+USHORT PageUsageToPos_Impl( USHORT nUsage )
+{
+ const USHORT nCount = sizeof(aArr) / sizeof(USHORT);
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ if ( aArr[i] == ( nUsage & 0x000f ) )
+ return i;
+ return SVX_PAGE_ALL;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT PosToPageUsage_Impl( USHORT nPos )
+{
+ const USHORT nCount = sizeof(aArr) / sizeof(USHORT);
+
+ if ( nPos >= nCount )
+ return 0;
+ return aArr[nPos];
+}
+
+// -----------------------------------------------------------------------
+
+Size GetMinBorderSpace_Impl( const SvxShadowItem& rShadow, const SvxBoxItem& rBox )
+{
+ Size aSz;
+ aSz.Height() = rShadow.CalcShadowSpace( SHADOW_BOTTOM ) + rBox.CalcLineSpace( BOX_LINE_BOTTOM );
+ aSz.Height() += rShadow.CalcShadowSpace( SHADOW_TOP ) + rBox.CalcLineSpace( BOX_LINE_TOP );
+ aSz.Width() = rShadow.CalcShadowSpace( SHADOW_LEFT ) + rBox.CalcLineSpace( BOX_LINE_LEFT );
+ aSz.Width() += rShadow.CalcShadowSpace( SHADOW_RIGHT ) + rBox.CalcLineSpace( BOX_LINE_RIGHT );
+ return aSz;
+}
+
+// -----------------------------------------------------------------------
+
+long ConvertLong_Impl( const long nIn, SfxMapUnit eUnit )
+{
+ return OutputDevice::LogicToLogic( nIn, (MapUnit)eUnit, MAP_TWIP );
+}
+
+// class SvxPageDescPage --------------------------------------------------
+
+// gibt den Bereich der Which-Werte zur"uck
+
+USHORT* SvxPageDescPage::GetRanges()
+{
+ return pRanges;
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxPageDescPage::Create( Window* pParent, const SfxItemSet& rSet )
+{
+ return new SvxPageDescPage( pParent, rSet );
+}
+
+// -----------------------------------------------------------------------
+
+SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) :
+
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_PAGE ), rAttr ),
+
+ aLeftMarginLbl ( this, ResId( FT_LEFT_MARGIN ) ),
+ aLeftMarginEdit ( this, ResId( ED_LEFT_MARGIN ) ),
+ aRightMarginLbl ( this, ResId( FT_RIGHT_MARGIN ) ),
+ aRightMarginEdit ( this, ResId( ED_RIGHT_MARGIN ) ),
+ aTopMarginLbl ( this, ResId( FT_TOP_MARGIN ) ),
+ aTopMarginEdit ( this, ResId( ED_TOP_MARGIN ) ),
+ aBottomMarginLbl ( this, ResId( FT_BOTTOM_MARGIN ) ),
+ aBottomMarginEdit ( this, ResId( ED_BOTTOM_MARGIN ) ),
+ aMarginFrm ( this, ResId( GB_MARGIN ) ),
+ aLayoutBox ( this, ResId( LB_LAYOUT ) ),
+ aPageFrm ( this, ResId( GB_PAGE ) ),
+ aNumberFormatBox ( this, ResId( LB_NUMBER_FORMAT ) ),
+ aNumberFormatFrm ( this, ResId( GB_NUMBER_FORMAT ) ),
+ aBspWin ( this, ResId( WN_BSP ) ),
+ aBspFrm ( this, ResId( GB_BSP ) ),
+ aPaperSizeBox ( this, ResId( LB_PAPER_SIZE ) ),
+ aPortraitBtn ( this, ResId( RB_PORTRAIT ) ),
+ aLandscapeBtn ( this, ResId( RB_LANDSCAPE ) ),
+ aPaperWidthText ( this, ResId( FT_PAPER_WIDTH ) ),
+ aPaperWidthEdit ( this, ResId( ED_PAPER_WIDTH ) ),
+ aPaperHeightText ( this, ResId( FT_PAPER_HEIGHT ) ),
+ aPaperHeightEdit ( this, ResId( ED_PAPER_HEIGHT ) ),
+ aPaperTrayLbl ( this, ResId( FT_PAPER_TRAY ) ),
+ aPaperTrayBox ( this, ResId( LB_PAPER_TRAY ) ),
+ aPaperSizeFrm ( this, ResId( GB_PAPER_SIZE ) ),
+ aHorzBox ( this, ResId( CB_HORZ ) ),
+ aVertBox ( this, ResId( CB_VERT ) ),
+ aAdaptBox ( this, ResId( CB_ADAPT ) ),
+ aPageName ( this, ResId( FT_PAGE_NAME ) ),
+ aExtraFrm ( this, ResId( GB_EXTRA ) ),
+
+ aRegisterCB ( this, ResId( CB_REGISTER ) ),
+ aRegisterFT ( this, ResId( FT_REGISTER ) ),
+ aRegisterLB ( this, ResId( LB_REGISTER ) ),
+ aRegisterGB ( this, ResId( GB_REGISTER ) ),
+
+ aInsideText ( ResId( STR_INSIDE ) ),
+ aOutsideText ( ResId( STR_OUTSIDE ) ),
+ aPrintRangeQueryText( ResId( STR_QUERY_PRINTRANGE ) ),
+
+ bLandscape ( FALSE ),
+ eMode ( SVX_PAGE_MODE_STANDARD ),
+ ePaperStart ( SVX_PAPER_A3 ),
+ ePaperEnd ( SVX_PAPER_DL )
+
+{
+ bBorderModified = FALSE;
+
+ FreeResource();
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ Init_Impl();
+
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+ SetFieldUnit( aLeftMarginEdit, eFUnit );
+ SetFieldUnit( aRightMarginEdit, eFUnit );
+ SetFieldUnit( aTopMarginEdit, eFUnit );
+ SetFieldUnit( aBottomMarginEdit, eFUnit );
+ SetFieldUnit( aPaperWidthEdit, eFUnit );
+ SetFieldUnit( aPaperHeightEdit, eFUnit );
+
+ Printer* pDefPrinter = 0;
+ BOOL bPrinterDel = FALSE;
+
+ if ( SfxViewShell::Current() && SfxViewShell::Current()->GetPrinter() )
+ pDefPrinter = (Printer*)SfxViewShell::Current()->GetPrinter();
+ else
+ {
+ pDefPrinter = new Printer;
+ bPrinterDel = TRUE;
+ }
+
+ MapMode aOldMode = pDefPrinter->GetMapMode();
+ pDefPrinter->SetMapMode( MAP_TWIP );
+
+ // First- und Last-Werte f"ur die R"ander setzen
+ Size aPaperSize = pDefPrinter->GetPaperSize();
+ Size aPrintSize = pDefPrinter->GetOutputSize();
+ /*
+ * einen Punkt ( 0,0 ) in logische Koordinaten zu konvertieren,
+ * sieht aus wie Unsinn; ist aber sinnvoll, wenn der Ursprung des
+ * Koordinatensystems verschoben ist.
+ */
+ Point aPrintOffset = pDefPrinter->GetPageOffset() -
+ pDefPrinter->PixelToLogic( Point() );
+ pDefPrinter->SetMapMode( aOldMode );
+
+ if ( bPrinterDel )
+ delete pDefPrinter;
+ long nOffset = !aPrintOffset.X() && !aPrintOffset.X() ? 0 : PRINT_OFFSET;
+ aLeftMarginEdit.SetFirst( aLeftMarginEdit.Normalize( aPrintOffset.X() ), FUNIT_TWIP );
+ nFirstLeftMargin = aLeftMarginEdit.GetFirst();
+ aRightMarginEdit.SetFirst( aRightMarginEdit.Normalize(
+ aPaperSize.Width() - aPrintSize.Width() - aPrintOffset.X() + nOffset ), FUNIT_TWIP);
+ nFirstRightMargin = aRightMarginEdit.GetFirst();
+ aTopMarginEdit.SetFirst( aTopMarginEdit.Normalize( aPrintOffset.Y() ), FUNIT_TWIP );
+ nFirstTopMargin = aTopMarginEdit.GetFirst();
+ aBottomMarginEdit.SetFirst( aBottomMarginEdit.Normalize(
+ aPaperSize.Height() - aPrintSize.Height() - aPrintOffset.Y() + nOffset ), FUNIT_TWIP );
+ nFirstBottomMargin = aBottomMarginEdit.GetFirst();
+ aLeftMarginEdit.SetLast( aLeftMarginEdit.Normalize(
+ aPrintOffset.X() + aPrintSize.Width() ), FUNIT_TWIP );
+ nLastLeftMargin = aLeftMarginEdit.GetLast();
+ aRightMarginEdit.SetLast( aRightMarginEdit.Normalize(
+ aPrintOffset.X() + aPrintSize.Width() ), FUNIT_TWIP );
+ nLastRightMargin = aRightMarginEdit.GetLast();
+ aTopMarginEdit.SetLast( aTopMarginEdit.Normalize(
+ aPrintOffset.Y() + aPrintSize.Height() ), FUNIT_TWIP );
+ nLastTopMargin = aTopMarginEdit.GetLast();
+ aBottomMarginEdit.SetLast( aBottomMarginEdit.Normalize(
+ aPrintOffset.Y() + aPrintSize.Height() ), FUNIT_TWIP );
+ nLastBottomMargin = aBottomMarginEdit.GetLast();
+}
+
+// -----------------------------------------------------------------------
+
+SvxPageDescPage::~SvxPageDescPage()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageDescPage::Init_Impl()
+{
+ aLeftText = aLeftMarginLbl.GetText();
+ aRightText = aRightMarginLbl.GetText();
+
+ // Handler einstellen
+ aLayoutBox.SetSelectHdl( LINK( this, SvxPageDescPage, LayoutHdl_Impl ) );
+
+ aPaperTrayBox.SetGetFocusHdl(
+ LINK( this, SvxPageDescPage, PaperBinHdl_Impl ) );
+ aPaperSizeBox.SetSelectHdl(
+ LINK( this, SvxPageDescPage, PaperSizeSelect_Impl ) );
+ aPaperWidthEdit.SetModifyHdl(
+ LINK( this, SvxPageDescPage, PaperSizeModify_Impl ) );
+ aPaperHeightEdit.SetModifyHdl(
+ LINK( this, SvxPageDescPage, PaperSizeModify_Impl ) );
+ aLandscapeBtn.SetClickHdl(
+ LINK( this, SvxPageDescPage, SwapOrientation_Impl ) );
+ aPortraitBtn.SetClickHdl(
+ LINK( this, SvxPageDescPage, SwapOrientation_Impl ) );
+
+ Link aLink = LINK( this, SvxPageDescPage, BorderModify_Impl );
+ aLeftMarginEdit.SetModifyHdl( aLink );
+ aRightMarginEdit.SetModifyHdl( aLink );
+ aTopMarginEdit.SetModifyHdl( aLink );
+ aBottomMarginEdit.SetModifyHdl( aLink );
+
+ aLink = LINK( this, SvxPageDescPage, RangeHdl_Impl );
+ aPaperWidthEdit.SetLoseFocusHdl( aLink );
+ aPaperHeightEdit.SetLoseFocusHdl( aLink );
+ aLeftMarginEdit.SetLoseFocusHdl( aLink );
+ aRightMarginEdit.SetLoseFocusHdl( aLink );
+ aTopMarginEdit.SetLoseFocusHdl( aLink );
+ aBottomMarginEdit.SetLoseFocusHdl( aLink );
+
+ aHorzBox.SetClickHdl( LINK( this, SvxPageDescPage, CenterHdl_Impl ) );
+ aVertBox.SetClickHdl( LINK( this, SvxPageDescPage, CenterHdl_Impl ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageDescPage::Reset( const SfxItemSet& rSet )
+{
+ SfxItemPool* pPool = rSet.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ SfxMapUnit eUnit = pPool->GetMetric( GetWhich( SID_ATTR_LRSPACE ) );
+
+ // R"ander (Links/Rechts) einstellen
+ const SfxPoolItem* pItem = GetItem( rSet, SID_ATTR_LRSPACE );
+
+ if ( pItem )
+ {
+ const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)*pItem;
+ SetMetricValue( aLeftMarginEdit, rLRSpace.GetLeft(), eUnit );
+ aBspWin.SetLeft(
+ (USHORT)ConvertLong_Impl( (long)rLRSpace.GetLeft(), eUnit ) );
+ SetMetricValue( aRightMarginEdit, rLRSpace.GetRight(), eUnit );
+ aBspWin.SetRight(
+ (USHORT)ConvertLong_Impl( (long)rLRSpace.GetRight(), eUnit ) );
+ }
+
+ // R"ander (Oben/Unten) einstellen
+ pItem = GetItem( rSet, SID_ATTR_ULSPACE );
+
+ if ( pItem )
+ {
+ const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)*pItem;
+ SetMetricValue( aTopMarginEdit, rULSpace.GetUpper(), eUnit );
+ aBspWin.SetTop(
+ (USHORT)ConvertLong_Impl( (long)rULSpace.GetUpper(), eUnit ) );
+ SetMetricValue( aBottomMarginEdit, rULSpace.GetLower(), eUnit );
+ aBspWin.SetBottom(
+ (USHORT)ConvertLong_Impl( (long)rULSpace.GetLower(), eUnit ) );
+ }
+
+ // Printer f"ur die Sch"achte besorgen
+ Printer* pDefPrinter = 0;
+ BOOL bPrinterDel = FALSE;
+
+ if ( SfxViewShell::Current() && SfxViewShell::Current()->GetPrinter() )
+ pDefPrinter = (Printer*)SfxViewShell::Current()->GetPrinter();
+ else
+ {
+ pDefPrinter = new Printer;
+ bPrinterDel = TRUE;
+ }
+
+ // allgemeine Seitendaten
+ SvxNumType eNumType = SVX_ARABIC;
+ bLandscape = ( pDefPrinter->GetOrientation() == ORIENTATION_LANDSCAPE );
+ USHORT nUse = (USHORT)SVX_PAGE_ALL;
+ pItem = GetItem( rSet, SID_ATTR_PAGE );
+
+ if ( pItem )
+ {
+ const SvxPageItem& rItem = (const SvxPageItem&)*pItem;
+ eNumType = rItem.GetNumType();
+ nUse = (SvxPageUsage)rItem.GetPageUsage();
+ bLandscape = rItem.IsLandscape();
+ }
+
+ // Ausrichtung
+ aLayoutBox.SelectEntryPos( ::PageUsageToPos_Impl( nUse ) );
+ aBspWin.SetUsage( nUse );
+ LayoutHdl_Impl( 0 );
+
+ // Numerierungsart der Seitenvorlage einstellen
+ aNumberFormatBox.SelectEntryPos( eNumType );
+
+ // Aktueller Papierschacht
+ aPaperTrayBox.Clear();
+ BYTE nPaperBin = PAPERBIN_PRINTER_SETTINGS;
+ pItem = GetItem( rSet, SID_ATTR_PAGE_PAPERBIN );
+
+ if ( pItem )
+ {
+ nPaperBin = ( (const SvxPaperBinItem*)pItem )->GetValue();
+
+ if ( nPaperBin >= pDefPrinter->GetPaperBinCount() )
+ nPaperBin = PAPERBIN_PRINTER_SETTINGS;
+ }
+
+ String aBinName;
+
+ if ( PAPERBIN_PRINTER_SETTINGS == nPaperBin )
+ aBinName = SVX_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS );
+ else
+ aBinName = pDefPrinter->GetPaperBinName( (USHORT)nPaperBin );
+
+ USHORT nEntryPos = aPaperTrayBox.InsertEntry( aBinName );
+ aPaperTrayBox.SetEntryData( nEntryPos, (void*)(ULONG)nPaperBin );
+ aPaperTrayBox.SelectEntry( aBinName );
+
+ // Size rausholen
+ Size aPaperSize = SvxPaperInfo::GetPaperSize( pDefPrinter );
+ pItem = GetItem( rSet, SID_ATTR_PAGE_SIZE );
+
+ if ( pItem )
+ aPaperSize = ( (const SvxSizeItem*)pItem )->GetSize();
+
+ FASTBOOL bOrientationSupport =
+ pDefPrinter->HasSupport( SUPPORT_SET_ORIENTATION );
+#ifdef OS2
+ // unter OS/2 wird bei HasSupport() immer TRUE returned
+ // aber nur als Dummy, deshalb FALSE
+ bOrientationSupport = FALSE;
+#endif
+
+ if ( !bOrientationSupport &&
+ aPaperSize.Width() > aPaperSize.Height() )
+ bLandscape = TRUE;
+
+ aLandscapeBtn.Check( bLandscape );
+ aPortraitBtn.Check( !bLandscape );
+
+ aBspWin.SetSize( Size( ConvertLong_Impl( aPaperSize.Width(), eUnit ),
+ ConvertLong_Impl( aPaperSize.Height(), eUnit ) ) );
+
+ // Werte in die Edits eintragen
+ SetMetricValue( aPaperHeightEdit, aPaperSize.Height(), eUnit );
+ SetMetricValue( aPaperWidthEdit, aPaperSize.Width(), eUnit );
+ aPaperSizeBox.Clear();
+
+ // Papierformate
+ Size aTmpSize = aPaperSize;
+
+ if ( bLandscape )
+ Swap( aTmpSize );
+ // aktuelles Format
+ SvxPaper ePaper = SvxPaperInfo::GetPaper( aTmpSize, (MapUnit)eUnit, TRUE );
+ USHORT nActPos = LISTBOX_ENTRY_NOTFOUND;
+ USHORT nAryId = RID_SVXSTRARY_PAPERSIZE_STD;
+
+ if ( ePaperStart != SVX_PAPER_A3 )
+ nAryId = RID_SVXSTRARY_PAPERSIZE_DRAW;
+ ResStringArray aPaperAry( SVX_RES( nAryId ) );
+ USHORT nCnt = aPaperAry.Count();
+
+ for ( USHORT i = 0; i < nCnt; ++i )
+ {
+ String aStr = aPaperAry.GetString(i);
+ SvxPaper eSize = (SvxPaper)aPaperAry.GetValue(i);
+ USHORT nPos = aPaperSizeBox.InsertEntry( aStr );
+ aPaperSizeBox.SetEntryData( nPos, (void*)(ULONG)eSize );
+
+ if ( eSize == ePaper )
+ nActPos = nPos;
+ }
+ // aktuelles Papierformat selektieren
+ aPaperSizeBox.SelectEntryPos( nActPos );
+
+ // ggf. angelegten Printer wieder l"oschen
+ if ( bPrinterDel )
+ delete pDefPrinter;
+
+ // Applikationsspezifisch
+
+ USHORT nResId = 0;
+
+ switch ( eMode )
+ {
+ case SVX_PAGE_MODE_CENTER:
+ {
+ nResId = RID_SVXSTR_CALC_PAGE;
+ aHorzBox.Show();
+ aVertBox.Show();
+
+ // Horizontale Ausrichtung
+ pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 );
+ aHorzBox.Check( pItem ? ( (const SfxBoolItem*)pItem )->GetValue()
+ : FALSE );
+
+ // Vertikale Ausrichtung
+ pItem = GetItem( rSet, SID_ATTR_PAGE_EXT2 );
+ aVertBox.Check( pItem ? ( (const SfxBoolItem*)pItem )->GetValue()
+ : FALSE );
+
+ // Beispiel-Fenster auf Tabelle setzen
+ aBspWin.SetTable( TRUE );
+ aBspWin.SetHorz( aHorzBox.IsChecked() );
+ aBspWin.SetVert( aVertBox.IsChecked() );
+
+ break;
+ }
+
+ case SVX_PAGE_MODE_PRESENTATION:
+ {
+ nResId = RID_SVXSTR_DRAW_PAGE;
+ aHorzBox.SetText( String( SVX_RESSTR( RID_SVXSTR_FULLSIZE ) ) );
+ aHorzBox.Show(); // f"ur Gesamte Seite ausf"ullen (Hintergr.Obj.)
+ aHorzBox.SetHelpId( HID_TPPAGE_FULLSIZE );
+ aAdaptBox.Show();
+ String sUser = GetUserData();
+
+ if ( sUser.Len() )
+ aAdaptBox.Check( (BOOL)sUser.ToInt32() );
+ else
+ {
+ pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 );
+ aAdaptBox.Check( pItem ?
+ ( (const SfxBoolItem*)pItem )->GetValue() : FALSE );
+ }
+ pItem = GetItem( rSet, SID_ATTR_PAGE_EXT2 );
+ aHorzBox.Check( pItem ? ( (const SfxBoolItem*)pItem )->GetValue() : FALSE );
+
+ //!!! hidden, weil von StarDraw nicht implementiert
+ aLayoutBox.Hide();
+ aPageFrm.Hide();
+
+ break;
+ }
+
+ default:
+ {
+ nResId = RID_SVXSTR_WRITER_PAGE;
+ if(!aRegisterCB.IsVisible())
+ aPageName.Show();
+ pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 );
+
+ if ( pItem )
+ aPageName.SetText(((const SfxStringItem*)pItem)->GetValue());
+ else
+ aPageName.SetText( String() );
+ }
+ }
+
+ if ( nResId )
+ aExtraFrm.SetText( SVX_RESSTR( nResId ) );
+
+ // im Beispiel Hintergrund und Umrandung anzeigen
+ ResetBackground_Impl( rSet );
+//! UpdateExample_Impl();
+ RangeHdl_Impl( 0 );
+
+ // Header Footer anzeigen
+ InitHeadFoot_Impl( rSet );
+
+ // R"ander auf Hoch/Quer updaten, dann Beispiel updaten
+ bBorderModified = FALSE;
+ SwapFirstValues_Impl( FALSE );
+ UpdateExample_Impl();
+
+ // Alte Werte sichern
+ aLeftMarginEdit.SaveValue();
+ aRightMarginEdit.SaveValue();
+ aTopMarginEdit.SaveValue();
+ aBottomMarginEdit.SaveValue();
+ aLayoutBox.SaveValue();
+ aNumberFormatBox.SaveValue();
+ aPaperSizeBox.SaveValue();
+ aPaperWidthEdit.SaveValue();
+ aPaperHeightEdit.SaveValue();
+ aPortraitBtn.SaveValue();
+ aLandscapeBtn.SaveValue();
+ aPaperTrayBox.SaveValue();
+ aVertBox.SaveValue();
+ aHorzBox.SaveValue();
+ aAdaptBox.SaveValue();
+
+ // Registerhaltigkeit
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_SWREGISTER_MODE))
+ {
+ aRegisterCB.Check(((const SfxBoolItem&)rSet.Get(
+ SID_SWREGISTER_MODE)).GetValue());
+ aRegisterCB.SaveValue();
+ RegisterModify(&aRegisterCB);
+ }
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_SWREGISTER_COLLECTION))
+ {
+ aRegisterLB.SelectEntry(
+ ((const SfxStringItem&)rSet.Get(SID_SWREGISTER_COLLECTION)).GetValue());
+ aRegisterLB.SaveValue();
+ }
+
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageDescPage::FillUserData()
+{
+ if ( SVX_PAGE_MODE_PRESENTATION == eMode )
+ SetUserData( UniString::CreateFromInt32( (sal_Int32)aAdaptBox.IsChecked() ) );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet )
+{
+ BOOL bModified = FALSE;
+ const SfxItemSet& rOldSet = GetItemSet();
+ SfxItemPool* pPool = rOldSet.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ USHORT nWhich = GetWhich( SID_ATTR_LRSPACE );
+ SfxMapUnit eUnit = pPool->GetMetric( nWhich );
+ const SfxPoolItem* pOld = 0;
+
+ // alten linken und rechten Rand kopieren
+ SvxLRSpaceItem aMargin( (const SvxLRSpaceItem&)rOldSet.Get( nWhich ) );
+
+ // alten oberen und unteren Rand kopieren
+ nWhich = GetWhich( SID_ATTR_ULSPACE );
+ SvxULSpaceItem aTopMargin( (const SvxULSpaceItem&)rOldSet.Get( nWhich ) );
+
+ if ( aLeftMarginEdit.GetText() != aLeftMarginEdit.GetSavedValue() )
+ {
+ aMargin.SetLeft( (USHORT)GetCoreValue( aLeftMarginEdit, eUnit ) );
+ bModified |= TRUE;
+ }
+
+ if ( aRightMarginEdit.GetText() != aRightMarginEdit.GetSavedValue() )
+ {
+ aMargin.SetRight( (USHORT)GetCoreValue( aRightMarginEdit, eUnit ) );
+ bModified |= TRUE;
+ }
+
+ // Linken und rechten Rand setzen
+ if ( bModified )
+ {
+ pOld = GetOldItem( rSet, SID_ATTR_LRSPACE );
+
+ if ( !pOld || !( *(const SvxLRSpaceItem*)pOld == aMargin ) )
+ rSet.Put( aMargin );
+ else
+ bModified = FALSE;
+ }
+
+ BOOL bMod = FALSE;
+
+ if ( aTopMarginEdit.GetText() != aTopMarginEdit.GetSavedValue() )
+ {
+ aTopMargin.SetUpper( (USHORT)GetCoreValue( aTopMarginEdit, eUnit ) );
+ bMod |= TRUE;
+ }
+
+ if ( aBottomMarginEdit.GetText() != aBottomMarginEdit.GetSavedValue() )
+ {
+ aTopMargin.SetLower( (USHORT)GetCoreValue( aBottomMarginEdit, eUnit ) );
+ bMod |= TRUE;
+ }
+
+ // unteren oberen Rand setzen
+ //
+ if ( bMod )
+ {
+ pOld = GetOldItem( rSet, SID_ATTR_ULSPACE );
+
+ if ( !pOld || !( *(const SvxULSpaceItem*)pOld == aTopMargin ) )
+ {
+ bModified |= TRUE;
+ rSet.Put( aTopMargin );
+ }
+ }
+
+ // Druckerschacht
+ nWhich = GetWhich( SID_ATTR_PAGE_PAPERBIN );
+ USHORT nPos = aPaperTrayBox.GetSelectEntryPos();
+ USHORT nBin = (USHORT)(ULONG)aPaperTrayBox.GetEntryData( nPos );
+ pOld = GetOldItem( rSet, SID_ATTR_PAGE_PAPERBIN );
+
+ if ( !pOld || ( (const SvxPaperBinItem*)pOld )->GetValue() != nBin )
+ {
+ rSet.Put( SvxPaperBinItem( nWhich, (BYTE)nBin ) );
+ bModified |= TRUE;
+ }
+
+ nPos = aPaperSizeBox.GetSelectEntryPos();
+ SvxPaper ePaper = (SvxPaper)(ULONG)aPaperSizeBox.GetEntryData( nPos );
+ const USHORT nOld = aPaperSizeBox.GetSavedValue();
+ BOOL bChecked = aLandscapeBtn.IsChecked();
+
+ if ( SVX_PAPER_USER == ePaper )
+ {
+ if ( nOld != nPos ||
+ aPaperWidthEdit.IsValueModified() ||
+ aPaperHeightEdit.IsValueModified() ||
+ bChecked != aLandscapeBtn.GetSavedValue() )
+ {
+ Size aSize( GetCoreValue( aPaperWidthEdit, eUnit ),
+ GetCoreValue( aPaperHeightEdit, eUnit ) );
+ pOld = GetOldItem( rSet, SID_ATTR_PAGE_SIZE );
+
+ if ( !pOld || ( (const SvxSizeItem*)pOld )->GetSize() != aSize )
+ {
+ rSet.Put( SvxSizeItem( GetWhich(SID_ATTR_PAGE_SIZE), aSize ) );
+ bModified |= TRUE;
+ }
+ }
+ }
+ else
+ {
+ if ( nOld != nPos || bChecked != aLandscapeBtn.GetSavedValue() )
+ {
+ Size aSize( SvxPaperInfo::GetPaperSize( ePaper, (MapUnit)eUnit ) );
+
+ if ( bChecked )
+ Swap( aSize );
+
+ pOld = GetOldItem( rSet, SID_ATTR_PAGE_SIZE );
+
+ if ( !pOld || ( (const SvxSizeItem*)pOld )->GetSize() != aSize )
+ {
+ rSet.Put( SvxSizeItem( GetWhich(SID_ATTR_PAGE_SIZE), aSize ) );
+ bModified |= TRUE;
+ }
+ }
+ }
+
+ // sonstiges Zeug der Page
+ nWhich = GetWhich( SID_ATTR_PAGE );
+ SvxPageItem aPage( (const SvxPageItem&)rOldSet.Get( nWhich ) );
+ bMod = aLayoutBox.GetSelectEntryPos() != aLayoutBox.GetSavedValue();
+
+ if ( bMod )
+ aPage.SetPageUsage(
+ ::PosToPageUsage_Impl( aLayoutBox.GetSelectEntryPos() ) );
+
+ if ( bChecked != aLandscapeBtn.GetSavedValue() )
+ {
+ aPage.SetLandscape(bChecked);
+ bMod |= TRUE;
+ }
+
+ // Einstellen der Numerierungsart der Seite
+ nPos = aNumberFormatBox.GetSelectEntryPos();
+
+ if ( nPos != aNumberFormatBox.GetSavedValue() )
+ {
+ aPage.SetNumType( (SvxNumType)nPos );
+ bMod |= TRUE;
+ }
+
+ if ( bMod )
+ {
+ pOld = GetOldItem( rSet, SID_ATTR_PAGE );
+
+ if ( !pOld || !( *(const SvxPageItem*)pOld == aPage ) )
+ {
+ rSet.Put( aPage );
+ bModified |= TRUE;
+ }
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich ) )
+ rSet.ClearItem( nWhich );
+ else
+ rSet.Put( rOldSet.Get( nWhich ) );
+
+ // Modispezifische Controls auswerten
+
+ switch ( eMode )
+ {
+ case SVX_PAGE_MODE_CENTER:
+ {
+ if ( aHorzBox.IsChecked() != aHorzBox.GetSavedValue() )
+ {
+ SfxBoolItem aHorz( GetWhich( SID_ATTR_PAGE_EXT1 ),
+ aHorzBox.IsChecked() );
+ rSet.Put( aHorz );
+ bModified |= TRUE;
+ }
+
+ if ( aVertBox.IsChecked() != aVertBox.GetSavedValue() )
+ {
+ SfxBoolItem aVert( GetWhich( SID_ATTR_PAGE_EXT2 ),
+ aVertBox.IsChecked() );
+ rSet.Put( aVert );
+ bModified |= TRUE;
+ }
+ break;
+ }
+
+ case SVX_PAGE_MODE_PRESENTATION:
+ {
+ // immer putten, damit Draw das auswerten kann
+ rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_PAGE_EXT1 ),
+ aAdaptBox.IsChecked() ) );
+ bModified |= TRUE;
+
+ if( aHorzBox.IsChecked() != aHorzBox.GetSavedValue() )
+ {
+ SfxBoolItem aHorz( GetWhich( SID_ATTR_PAGE_EXT2 ),
+ aHorzBox.IsChecked() );
+ rSet.Put( aHorz );
+ bModified |= TRUE;
+ }
+
+ break;
+ }
+
+ // bei Standard tut sich nichts
+ }
+
+ if(aRegisterCB.IsVisible() &&
+ (aRegisterCB.IsChecked() || aRegisterCB.GetSavedValue() != aRegisterCB.IsChecked()))
+ {
+ const SfxBoolItem& rRegItem = (const SfxBoolItem&)rOldSet.Get(SID_SWREGISTER_MODE);
+ SfxBoolItem* pRegItem = (SfxBoolItem*)rRegItem.Clone();
+ BOOL bCheck = aRegisterCB.IsChecked();
+ pRegItem->SetValue(bCheck);
+ rSet.Put(*pRegItem);
+ bModified |= TRUE;
+ if(bCheck)
+ {
+ bModified |= TRUE;
+ rSet.Put(SfxStringItem(SID_SWREGISTER_COLLECTION,
+ aRegisterLB.GetSelectEntry()));
+ }
+ delete pRegItem;
+ }
+
+
+ return bModified;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxPageDescPage, LayoutHdl_Impl, ListBox *, EMPTYARG )
+{
+ // innen au\sen umschalten
+ const USHORT nPos = PosToPageUsage_Impl( aLayoutBox.GetSelectEntryPos() );
+
+ if ( nPos == SVX_PAGE_MIRROR )
+ {
+ if ( aLeftMarginLbl.GetText() != aInsideText )
+ aLeftMarginLbl.SetText( aInsideText );
+
+ if ( aRightMarginLbl.GetText() != aOutsideText )
+ aRightMarginLbl.SetText( aOutsideText );
+ }
+ else
+ {
+ if ( aLeftMarginLbl.GetText() != aLeftText )
+ aLeftMarginLbl.SetText( aLeftText );
+
+ if ( aRightMarginLbl.GetText() != aRightText )
+ aRightMarginLbl.SetText( aRightText );
+ }
+ UpdateExample_Impl();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG )
+{
+ if ( aPaperTrayBox.GetEntryCount() > 1 )
+ // schon gef"ullt
+ return 0;
+ Printer* pDefPrinter = 0;
+ BOOL bPrinterDel = FALSE;
+
+ if ( SfxViewShell::Current() && SfxViewShell::Current()->GetPrinter() )
+ pDefPrinter = (Printer*)SfxViewShell::Current()->GetPrinter();
+ else
+ {
+ pDefPrinter = new Printer;
+ bPrinterDel = TRUE;
+ }
+
+ // Schacht-Box initialisieren
+ String aOldName = aPaperTrayBox.GetSelectEntry();
+ aPaperTrayBox.SetUpdateMode( FALSE );
+ aPaperTrayBox.Clear();
+ USHORT nEntryPos = aPaperTrayBox.InsertEntry(
+ SVX_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ) );
+ aPaperTrayBox.SetEntryData( nEntryPos,
+ (void*)(ULONG)PAPERBIN_PRINTER_SETTINGS );
+ String aPaperBin( SVX_RES( RID_SVXSTR_PAPERBIN ) );
+ USHORT nBinCount = pDefPrinter->GetPaperBinCount();
+
+ for ( USHORT i = 0; i < nBinCount; ++i )
+ {
+ String aName = pDefPrinter->GetPaperBinName(i);
+
+ if ( !aName.Len() )
+ {
+ aName = aPaperBin;
+ aName.Append( sal_Unicode(' ') );
+ aName.Append( UniString::CreateFromInt32( i+1 ) );
+ }
+ nEntryPos = aPaperTrayBox.InsertEntry( aName );
+ aPaperTrayBox.SetEntryData( nEntryPos, (void*)(ULONG)i );
+ }
+ aPaperTrayBox.SelectEntry( aOldName );
+ aPaperTrayBox.SetUpdateMode( TRUE );
+
+ if ( bPrinterDel )
+ delete pDefPrinter;
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox )
+{
+ const USHORT nPos = pBox->GetSelectEntryPos();
+ SvxPaper ePaper = (SvxPaper)(ULONG)aPaperSizeBox.GetEntryData( nPos );
+
+ if ( ePaper != SVX_PAPER_USER )
+ {
+ Size aSize( SvxPaperInfo::GetPaperSize( ePaper ) );
+
+ if ( aLandscapeBtn.IsChecked() )
+ Swap( aSize );
+
+ if ( aSize.Height() < aPaperHeightEdit.GetMin( FUNIT_TWIP ) )
+ aPaperHeightEdit.SetMin(
+ aPaperHeightEdit.Normalize( aSize.Height() ), FUNIT_TWIP );
+ if ( aSize.Width() < aPaperWidthEdit.GetMin( FUNIT_TWIP ) )
+ aPaperWidthEdit.SetMin(
+ aPaperWidthEdit.Normalize( aSize.Width() ), FUNIT_TWIP );
+ SetMetricValue( aPaperHeightEdit, aSize.Height(), SFX_MAPUNIT_TWIP );
+ SetMetricValue( aPaperWidthEdit, aSize.Width(), SFX_MAPUNIT_TWIP );
+
+ // R"ander ggf. neu berechnen
+ CalcMargin_Impl();
+
+ RangeHdl_Impl( 0 );
+ UpdateExample_Impl();
+
+ if ( eMode == SVX_PAGE_MODE_PRESENTATION )
+ {
+ // Draw: bei Papierformat soll der Rand 1cm betragen
+ long nTmp = 0;
+ BOOL bScreen = ( SVX_PAPER_SCREEN == ePaper );
+
+ if ( !bScreen )
+ // bei Bildschirm keinen Rand
+ nTmp = 1; // entspr. 1cm
+
+ // Abfragen, ob fuer Raender 0 gesetzt ist:
+ if ( bScreen || aRightMarginEdit.GetValue() == 0 )
+ {
+ SetMetricValue( aRightMarginEdit, nTmp, SFX_MAPUNIT_CM );
+ if ( !bScreen &&
+ aRightMarginEdit.GetFirst() > aRightMarginEdit.GetValue() )
+ aRightMarginEdit.SetValue( aRightMarginEdit.GetFirst() );
+ }
+ if ( bScreen || aLeftMarginEdit.GetValue() == 0 )
+ {
+ SetMetricValue( aLeftMarginEdit, nTmp, SFX_MAPUNIT_CM );
+ if ( !bScreen &&
+ aLeftMarginEdit.GetFirst() > aLeftMarginEdit.GetValue() )
+ aLeftMarginEdit.SetValue( aLeftMarginEdit.GetFirst() );
+ }
+ if ( bScreen || aBottomMarginEdit.GetValue() == 0 )
+ {
+ SetMetricValue( aBottomMarginEdit, nTmp, SFX_MAPUNIT_CM );
+ if ( !bScreen &&
+ aBottomMarginEdit.GetFirst() > aBottomMarginEdit.GetValue() )
+ aBottomMarginEdit.SetValue( aBottomMarginEdit.GetFirst() );
+ }
+ if ( bScreen || aTopMarginEdit.GetValue() == 0 )
+ {
+ SetMetricValue( aTopMarginEdit, nTmp, SFX_MAPUNIT_CM );
+ if ( !bScreen &&
+ aTopMarginEdit.GetFirst() > aTopMarginEdit.GetValue() )
+ aTopMarginEdit.SetValue( aTopMarginEdit.GetFirst() );
+ }
+ UpdateExample_Impl();
+ }
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxPageDescPage, PaperSizeModify_Impl, Edit *, EMPTYARG )
+{
+ USHORT nWhich = GetWhich( SID_ATTR_LRSPACE );
+ SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWhich );
+ Size aSize( GetCoreValue( aPaperWidthEdit, eUnit ),
+ GetCoreValue( aPaperHeightEdit, eUnit ) );
+ SvxPaper ePaper = SvxPaperInfo::GetPaper( aSize, (MapUnit)eUnit, TRUE );
+ USHORT nEntryCount = aPaperSizeBox.GetEntryCount();
+
+ for ( USHORT i = 0; i < nEntryCount; ++i )
+ {
+ SvxPaper eTmp = (SvxPaper)(ULONG)aPaperSizeBox.GetEntryData(i);
+
+ if ( eTmp == ePaper )
+ {
+ aPaperSizeBox.SelectEntryPos(i);
+ break;
+ }
+ }
+ UpdateExample_Impl();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxPageDescPage, SwapOrientation_Impl, RadioButton *, pBtn )
+{
+ if ( !bLandscape && pBtn == &aLandscapeBtn ||
+ bLandscape && pBtn == &aPortraitBtn )
+ {
+ bLandscape = aLandscapeBtn.IsChecked();
+
+ const long lWidth = GetCoreValue( aPaperWidthEdit, SFX_MAPUNIT_TWIP );
+ const long lHeight = GetCoreValue( aPaperHeightEdit, SFX_MAPUNIT_TWIP );
+
+ // swappen
+ SetMetricValue( aPaperWidthEdit, lHeight, SFX_MAPUNIT_TWIP );
+ SetMetricValue( aPaperHeightEdit, lWidth, SFX_MAPUNIT_TWIP );
+
+ // R"ander ggf. neu berechnen
+ CalcMargin_Impl();
+
+ PaperSizeSelect_Impl( &aPaperSizeBox );
+ RangeHdl_Impl( 0 );
+ SwapFirstValues_Impl( bBorderModified );
+ UpdateExample_Impl();
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageDescPage::SwapFirstValues_Impl( FASTBOOL bSet )
+{
+ Printer* pDefPrinter = 0;
+ BOOL bPrinterDel = FALSE;
+
+ if ( SfxViewShell::Current() && SfxViewShell::Current()->GetPrinter() )
+ pDefPrinter = (Printer*)SfxViewShell::Current()->GetPrinter();
+ else
+ {
+ pDefPrinter = new Printer;
+ bPrinterDel = TRUE;
+ }
+
+ MapMode aOldMode = pDefPrinter->GetMapMode();
+ Orientation eOri = ORIENTATION_PORTRAIT;
+
+ if ( bLandscape )
+ eOri = ORIENTATION_LANDSCAPE;
+ Orientation eOldOri = pDefPrinter->GetOrientation();
+ pDefPrinter->SetOrientation( eOri );
+ pDefPrinter->SetMapMode( MAP_TWIP );
+
+ // First- und Last-Werte f"ur die R"ander setzen
+ Size aPaperSize = pDefPrinter->GetPaperSize();
+ Size aPrintSize = pDefPrinter->GetOutputSize();
+ /*
+ * einen Punkt ( 0,0 ) in logische Koordinaten zu konvertieren,
+ * sieht aus wie Unsinn; ist aber sinnvoll, wenn der Ursprung des
+ * Koordinatensystems verschoben ist.
+ */
+ Point aPrintOffset = pDefPrinter->GetPageOffset() -
+ pDefPrinter->PixelToLogic( Point() );
+ pDefPrinter->SetMapMode( aOldMode );
+ pDefPrinter->SetOrientation( eOldOri );
+
+ if ( bPrinterDel )
+ delete pDefPrinter;
+
+ long nSetL = aLeftMarginEdit.Denormalize(
+ aLeftMarginEdit.GetValue( FUNIT_TWIP ) );
+ long nSetR = aRightMarginEdit.Denormalize(
+ aRightMarginEdit.GetValue( FUNIT_TWIP ) );
+ long nSetT = aTopMarginEdit.Denormalize(
+ aTopMarginEdit.GetValue( FUNIT_TWIP ) );
+ long nSetB = aBottomMarginEdit.Denormalize(
+ aBottomMarginEdit.GetValue( FUNIT_TWIP ) );
+
+ long nOffset = !aPrintOffset.X() && !aPrintOffset.X() ? 0 : PRINT_OFFSET;
+ long nNewL = aPrintOffset.X();
+ long nNewR =
+ aPaperSize.Width() - aPrintSize.Width() - aPrintOffset.X() + nOffset;
+ long nNewT = aPrintOffset.Y();
+ long nNewB =
+ aPaperSize.Height() - aPrintSize.Height() - aPrintOffset.Y() + nOffset;
+
+ aLeftMarginEdit.SetFirst( aLeftMarginEdit.Normalize( nNewL ), FUNIT_TWIP );
+ nFirstLeftMargin = aLeftMarginEdit.GetFirst();
+ aRightMarginEdit.SetFirst( aRightMarginEdit.Normalize( nNewR ), FUNIT_TWIP );
+ nFirstRightMargin = aRightMarginEdit.GetFirst();
+ aTopMarginEdit.SetFirst( aTopMarginEdit.Normalize( nNewT ), FUNIT_TWIP );
+ nFirstTopMargin = aTopMarginEdit.GetFirst();
+ aBottomMarginEdit.SetFirst( aBottomMarginEdit.Normalize( nNewB ), FUNIT_TWIP );
+ nFirstBottomMargin = aBottomMarginEdit.GetFirst();
+
+ if ( bSet )
+ {
+ // ggf. auch die Werte umsetzen,
+ if ( nSetL < nNewL )
+ aLeftMarginEdit.SetValue( aLeftMarginEdit.Normalize( nNewL ),
+ FUNIT_TWIP );
+ if ( nSetR < nNewR )
+ aRightMarginEdit.SetValue( aRightMarginEdit.Normalize( nNewR ),
+ FUNIT_TWIP );
+ if ( nSetT < nNewT )
+ aTopMarginEdit.SetValue( aTopMarginEdit.Normalize( nNewT ),
+ FUNIT_TWIP );
+ if ( nSetB < nNewB )
+ aBottomMarginEdit.SetValue( aBottomMarginEdit.Normalize( nNewB ),
+ FUNIT_TWIP );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxPageDescPage, BorderModify_Impl, MetricField *, EMPTYARG )
+{
+ if ( !bBorderModified )
+ bBorderModified = TRUE;
+ UpdateExample_Impl();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxPageDescPage, BorderModify_Impl, MetricField *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+void SvxPageDescPage::UpdateExample_Impl()
+{
+ // Size
+ Size aSize( GetCoreValue( aPaperWidthEdit, SFX_MAPUNIT_TWIP ),
+ GetCoreValue( aPaperHeightEdit, SFX_MAPUNIT_TWIP ) );
+
+ aBspWin.SetSize( aSize );
+
+ // R"ander
+ aBspWin.SetTop( GetCoreValue( aTopMarginEdit, SFX_MAPUNIT_TWIP ) );
+ aBspWin.SetBottom( GetCoreValue( aBottomMarginEdit, SFX_MAPUNIT_TWIP ) );
+ aBspWin.SetLeft( GetCoreValue( aLeftMarginEdit, SFX_MAPUNIT_TWIP ) );
+ aBspWin.SetRight( GetCoreValue( aRightMarginEdit, SFX_MAPUNIT_TWIP ) );
+
+ // Layout
+ aBspWin.SetUsage( PosToPageUsage_Impl( aLayoutBox.GetSelectEntryPos() ) );
+ aBspWin.Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageDescPage::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 );
+ }
+ }
+ }
+
+ const SfxPoolItem* pItem = GetItem( rSet, SID_ATTR_BRUSH );
+
+ if ( pItem )
+ {
+ aBspWin.SetColor( ( (const SvxBrushItem*)pItem )->GetColor() );
+ const Graphic* pGrf = ( (const SvxBrushItem*)pItem )->GetGraphic();
+
+ if ( pGrf )
+ {
+ Bitmap aBitmap = pGrf->GetBitmap();
+ aBspWin.SetBitmap( &aBitmap );
+ }
+ else
+ aBspWin.SetBitmap( NULL );
+ }
+
+ pItem = GetItem( rSet, SID_ATTR_BORDER_OUTER );
+
+ if ( pItem )
+ aBspWin.SetBorder( (SvxBoxItem&)*pItem );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
+{
+ bLandscape = aLandscapeBtn.IsChecked();
+ const SfxPoolItem* pItem = GetItem( rSet, SID_ATTR_PAGE_SIZE );
+
+ if ( pItem )
+ aBspWin.SetSize( ( (const SvxSizeItem*)pItem )->GetSize() );
+
+ const SvxSetItem* pSetItem = 0;
+
+ // Kopfzeilen-Attribute auswerten
+
+ 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 SvxSizeItem& rSize = (const SvxSizeItem&)
+ rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) );
+ const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)
+ rHeaderSet.Get( GetWhich( SID_ATTR_ULSPACE ) );
+ long nDist = rUL.GetLower();
+ aBspWin.SetHdHeight( rSize.GetSize().Height() - nDist );
+ aBspWin.SetHdDist( nDist );
+ const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)
+ rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) );
+ aBspWin.SetHdLeft( rLR.GetLeft() );
+ aBspWin.SetHdRight( rLR.GetRight() );
+ aBspWin.SetHeader( TRUE );
+ }
+ else
+ aBspWin.SetHeader( FALSE );
+
+ // im Beispiel Hintergrund und Umrandung anzeigen
+ USHORT nWhich = GetWhich( SID_ATTR_BRUSH );
+
+ if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxBrushItem& rItem =
+ (const SvxBrushItem&)rHeaderSet.Get( nWhich );
+ aBspWin.SetHdColor( rItem.GetColor() );
+ }
+ nWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+
+ if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxBoxItem& rItem =
+ (const SvxBoxItem&)rHeaderSet.Get( nWhich );
+ aBspWin.SetHdBorder( rItem );
+ }
+ }
+
+ // Fusszeilen-Attribute auswerten
+
+ 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 SvxSizeItem& rSize = (const SvxSizeItem&)
+ rFooterSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) );
+ const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)
+ rFooterSet.Get( GetWhich( SID_ATTR_ULSPACE ) );
+ long nDist = rUL.GetUpper();
+ aBspWin.SetFtHeight( rSize.GetSize().Height() - nDist );
+ aBspWin.SetFtDist( nDist );
+ const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)
+ rFooterSet.Get( GetWhich( SID_ATTR_LRSPACE ) );
+ aBspWin.SetFtLeft( rLR.GetLeft() );
+ aBspWin.SetFtRight( rLR.GetRight() );
+ aBspWin.SetFooter( TRUE );
+ }
+ else
+ aBspWin.SetFooter( FALSE );
+
+ // im Beispiel Hintergrund und Umrandung anzeigen
+ USHORT nWhich = GetWhich( SID_ATTR_BRUSH );
+
+ if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxBrushItem& rItem =
+ (const SvxBrushItem&)rFooterSet.Get( nWhich );
+ aBspWin.SetFtColor( rItem.GetColor() );
+ }
+ nWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+
+ if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxBoxItem& rItem =
+ (const SvxBoxItem&)rFooterSet.Get( nWhich );
+ aBspWin.SetFtBorder( rItem );
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageDescPage::ActivatePage( const SfxItemSet& rSet )
+{
+ InitHeadFoot_Impl( rSet );
+ ResetBackground_Impl( rSet );
+ RangeHdl_Impl( 0 );
+}
+
+// -----------------------------------------------------------------------
+
+int SvxPageDescPage::DeactivatePage( SfxItemSet* pSet )
+{
+ // Abfrage, ob die Seitenr"ander ausserhalb des Druckbereichs liegen
+ // Wenn nicht, dann den Anwender fragen, ob sie "ubernommen werden sollen.
+ // Wenn nicht, dann auf der TabPage bleiben.
+ USHORT nPos = aPaperSizeBox.GetSelectEntryPos();
+ SvxPaper ePaper = (SvxPaper)(ULONG)aPaperSizeBox.GetEntryData( nPos );
+
+ if ( ePaper != SVX_PAPER_SCREEN && (
+ aLeftMarginEdit.GetValue() < nFirstLeftMargin ||
+ aRightMarginEdit.GetValue() < nFirstRightMargin ||
+ aTopMarginEdit.GetValue() < nFirstTopMargin ||
+ aBottomMarginEdit.GetValue() < nFirstBottomMargin ||
+ aLeftMarginEdit.GetValue() > nLastLeftMargin ||
+ aRightMarginEdit.GetValue() > nLastRightMargin ||
+ aTopMarginEdit.GetValue() > nLastTopMargin ||
+ aBottomMarginEdit.GetValue() > nLastBottomMargin ) )
+ {
+ if ( QueryBox( this, WB_YES_NO | WB_DEF_NO, aPrintRangeQueryText ).Execute() == RET_NO )
+ {
+ MetricField* pField = NULL;
+ if ( aLeftMarginEdit.GetValue() < nFirstLeftMargin )
+ {
+ aLeftMarginEdit.SetValue( nFirstLeftMargin );
+ pField = &aLeftMarginEdit;
+ }
+ if ( aRightMarginEdit.GetValue() < nFirstRightMargin )
+ {
+ aRightMarginEdit.SetValue( nFirstRightMargin );
+ if ( !pField )
+ pField = &aRightMarginEdit;
+ }
+ if ( aTopMarginEdit.GetValue() < nFirstTopMargin )
+ {
+ aTopMarginEdit.SetValue( nFirstTopMargin );
+ if ( !pField )
+ pField = &aTopMarginEdit;
+ }
+ if ( aBottomMarginEdit.GetValue() < nFirstBottomMargin )
+ {
+ aBottomMarginEdit.SetValue( nFirstBottomMargin );
+ if ( !pField )
+ pField = &aBottomMarginEdit;
+ }
+ if ( aLeftMarginEdit.GetValue() > nLastLeftMargin )
+ {
+ aLeftMarginEdit.SetValue( nLastLeftMargin );
+ if ( !pField )
+ pField = &aLeftMarginEdit;
+ }
+ if ( aRightMarginEdit.GetValue() > nLastRightMargin )
+ {
+ aRightMarginEdit.SetValue( nLastRightMargin );
+ if ( !pField )
+ pField = &aRightMarginEdit;
+ }
+ if ( aTopMarginEdit.GetValue() > nLastTopMargin )
+ {
+ aTopMarginEdit.SetValue( nLastTopMargin );
+ if ( !pField )
+ pField = &aTopMarginEdit;
+ }
+ if ( aBottomMarginEdit.GetValue() > nLastBottomMargin )
+ {
+ aBottomMarginEdit.SetValue( nLastBottomMargin );
+ if ( !pField )
+ pField = &aBottomMarginEdit;
+ }
+ if ( pField )
+ pField->GrabFocus();
+ UpdateExample_Impl();
+ return KEEP_PAGE;
+ }
+ }
+
+ if ( pSet )
+ {
+ FillItemSet( *pSet );
+
+ // ggf. hoch/quer putten
+ USHORT nWh = GetWhich( SID_ATTR_PAGE_SIZE );
+ SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWh );
+ Size aSize( GetCoreValue( aPaperWidthEdit, eUnit ),
+ GetCoreValue( aPaperHeightEdit, eUnit ) );
+
+ // putten, wenn aktuelle Gr"o/se unterschiedlich zum Wert in pSet
+ const SvxSizeItem* pSize =
+ (const SvxSizeItem*)GetItem( *pSet, SID_ATTR_PAGE_SIZE );
+
+ if ( aSize.Width() && ( !pSize || pSize->GetSize() != aSize ) )
+ pSet->Put( SvxSizeItem( nWh, aSize ) );
+ }
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxPageDescPage, RangeHdl_Impl, Edit *, EMPTYARG )
+{
+ // Aktuelle Header-Breite/H"ohe aus dem Bsp
+ long nHHeight = aBspWin.GetHdHeight();
+ long nHDist = aBspWin.GetHdDist();
+
+ // Aktuelle Footer-Breite/H"ohe aus dem Bsp
+ long nFHeight = aBspWin.GetFtHeight();
+ long nFDist = aBspWin.GetFtDist();
+
+ // Aktuelle Header/Footer-R"ander aus dem Bsp
+ long nHFLeft = Max( aBspWin.GetHdLeft(), aBspWin.GetFtLeft() );
+ long nHFRight = Max( aBspWin.GetHdRight(), aBspWin.GetFtRight() );
+
+ // Aktuelle Werte der Seitenr"ander
+ long nBT = aTopMarginEdit.Denormalize(aTopMarginEdit.GetValue(FUNIT_TWIP));
+ long nBB = aBottomMarginEdit.Denormalize(aBottomMarginEdit.GetValue(FUNIT_TWIP));
+ long nBL = aLeftMarginEdit.Denormalize(aLeftMarginEdit.GetValue(FUNIT_TWIP));
+ long nBR = aRightMarginEdit.Denormalize(aRightMarginEdit.GetValue(FUNIT_TWIP));
+
+ // Breite Umrandung der Seite berechnen
+ const SfxItemSet* pSet = &GetItemSet();
+ Size aBorder;
+
+ if ( pSet->GetItemState( GetWhich(SID_ATTR_BORDER_SHADOW) ) >=
+ SFX_ITEM_AVAILABLE &&
+ pSet->GetItemState( GetWhich(SID_ATTR_BORDER_OUTER) ) >=
+ SFX_ITEM_AVAILABLE )
+ {
+ aBorder = ( GetMinBorderSpace_Impl(
+ (const SvxShadowItem&)pSet->Get(GetWhich(SID_ATTR_BORDER_SHADOW)),
+ (const SvxBoxItem&)pSet->Get(GetWhich(SID_ATTR_BORDER_OUTER))));
+ }
+
+ long nH = aPaperHeightEdit.Denormalize(aPaperHeightEdit.GetValue(FUNIT_TWIP));
+ long nW = aPaperWidthEdit.Denormalize(aPaperWidthEdit.GetValue(FUNIT_TWIP));
+
+ // Grenzen Papier
+ // Maximum liegt bei 54cm
+ //
+ long nMin = nHHeight + nHDist + nFDist + nFHeight + nBT + nBB +
+ MINBODY + aBorder.Height();
+ aPaperHeightEdit.SetMin(aPaperHeightEdit.Normalize(nMin), FUNIT_TWIP);
+
+ nMin = MINBODY + nBL + nBR + aBorder.Width();
+ aPaperWidthEdit.SetMin(aPaperWidthEdit.Normalize(nMin), FUNIT_TWIP);
+
+ // Falls sich die Papiergr"o\se ge"adert hat
+ nH = aPaperHeightEdit.Denormalize(aPaperHeightEdit.GetValue(FUNIT_TWIP));
+ nW = aPaperWidthEdit.Denormalize(aPaperWidthEdit.GetValue(FUNIT_TWIP));
+
+ // Top
+ long nMax = nH - nBB - aBorder.Height() - MINBODY -
+ nFDist - nFHeight - nHDist - nHHeight;
+
+ aTopMarginEdit.SetMax(aTopMarginEdit.Normalize(nMax), FUNIT_TWIP);
+
+ // Bottom
+ nMax = nH - nBT - aBorder.Height() - MINBODY -
+ nFDist - nFHeight - nHDist - nHHeight;
+
+ aBottomMarginEdit.SetMax(aTopMarginEdit.Normalize(nMax), FUNIT_TWIP);
+
+ // Left
+ nMax = nW - nBR - MINBODY - aBorder.Width() - nHFLeft - nHFRight;
+ aLeftMarginEdit.SetMax(aLeftMarginEdit.Normalize(nMax), FUNIT_TWIP);
+
+ // Right
+ nMax = nW - nBL - MINBODY - aBorder.Width() - nHFLeft - nHFRight;
+ aRightMarginEdit.SetMax(aRightMarginEdit.Normalize(nMax), FUNIT_TWIP);
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageDescPage::CalcMargin_Impl()
+{
+ // Aktuelle Werte der Seitenr"ander
+ long nBT = GetCoreValue( aTopMarginEdit, SFX_MAPUNIT_TWIP );
+ long nBB = GetCoreValue( aBottomMarginEdit, SFX_MAPUNIT_TWIP );
+
+ long nBL = GetCoreValue( aLeftMarginEdit, SFX_MAPUNIT_TWIP );
+ long nBR = GetCoreValue( aRightMarginEdit, SFX_MAPUNIT_TWIP );
+
+ long nH = GetCoreValue( aPaperHeightEdit, SFX_MAPUNIT_TWIP );
+ long nW = GetCoreValue( aPaperWidthEdit, SFX_MAPUNIT_TWIP );
+
+ long nWidth = nBL + nBR + MINBODY;
+ long nHeight = nBT + nBB + MINBODY;
+
+ if ( nWidth > nW || nHeight > nH )
+ {
+ if ( nWidth > nW )
+ {
+ long nTmp = nBL <= nBR ? nBR : nBL;
+ nTmp -= nWidth - nW;
+
+ if ( nBL <= nBR )
+ SetMetricValue( aRightMarginEdit, nTmp, SFX_MAPUNIT_TWIP );
+ else
+ SetMetricValue( aLeftMarginEdit, nTmp, SFX_MAPUNIT_TWIP );
+ }
+
+ if ( nHeight > nH )
+ {
+ long nTmp = nBT <= nBB ? nBB : nBT;
+ nTmp -= nHeight - nH;
+
+ if ( nBT <= nBB )
+ SetMetricValue( aBottomMarginEdit, nTmp, SFX_MAPUNIT_TWIP );
+ else
+ SetMetricValue( aTopMarginEdit, nTmp, SFX_MAPUNIT_TWIP );
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxPageDescPage, CenterHdl_Impl, CheckBox *, EMPTYARG )
+{
+ // Wird im Draw zweckentfremdet
+ if( eMode != SVX_PAGE_MODE_PRESENTATION )
+ {
+ aBspWin.SetHorz( aHorzBox.IsChecked() );
+ aBspWin.SetVert( aVertBox.IsChecked() );
+ UpdateExample_Impl();
+ }
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxPageDescPage, CenterHdl_Impl, CheckBox *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+void SvxPageDescPage::SetCollectionList(const List* pList)
+{
+ sStandardRegister = *(String*)pList->GetObject(0);
+ for( USHORT i = 1; i < pList->Count(); i++ )
+ {
+ aRegisterLB.InsertEntry(*(String*)pList->GetObject(i));
+ }
+
+ aPageName .Hide();
+ aExtraFrm .Hide();
+ aRegisterCB .Show();
+ aRegisterFT .Show();
+ aRegisterLB.Show();
+ aRegisterGB .Show();
+ aRegisterCB.SetClickHdl(LINK(this, SvxPageDescPage, RegisterModify));
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxPageDescPage, RegisterModify, CheckBox*, pBox )
+{
+ BOOL bEnable = FALSE;
+ if(pBox->IsChecked())
+ {
+ bEnable = TRUE;
+ if(USHRT_MAX == aRegisterLB.GetSelectEntryPos())
+ aRegisterLB.SelectEntry(sStandardRegister);
+ }
+ aRegisterFT.Enable( bEnable );
+ aRegisterLB.Enable( bEnable );
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/page.h b/svx/source/dialog/page.h
new file mode 100644
index 0000000000..473488bf69
--- /dev/null
+++ b/svx/source/dialog/page.h
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * $RCSfile: page.h,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_PAGE_H
+#define _SVX_PAGE_H
+
+// include ---------------------------------------------------------------
+
+// define ----------------------------------------------------------------
+
+#define PAPERSIZE_A0 0
+#define PAPERSIZE_A1 1
+#define PAPERSIZE_A2 2
+#define PAPERSIZE_A3 3
+#define PAPERSIZE_A4 4
+#define PAPERSIZE_A5 5
+#define PAPERSIZE_B4 6
+#define PAPERSIZE_B5 7
+#define PAPERSIZE_LETTER 8
+#define PAPERSIZE_LEGAL 9
+#define PAPERSIZE_TABLOID 10
+#define PAPERSIZE_USER 11
+#define PAPERSIZE_B6 12
+#define PAPERSIZE_C4 13
+#define PAPERSIZE_C5 14
+#define PAPERSIZE_C6 15
+#define PAPERSIZE_C65 16
+#define PAPERSIZE_DL 17
+#define PAPERSIZE_DIA 18
+#define PAPERSIZE_SCREEN 19
+#define PAPERSIZE_A 20
+#define PAPERSIZE_B 21
+#define PAPERSIZE_C 22
+#define PAPERSIZE_D 23
+#define PAPERSIZE_E 24
+#define PAPERSIZE_EXECUTIVE 25
+#define PAPERSIZE_LEGAL2 26
+#define PAPERSIZE_MONARCH 27
+#define PAPERSIZE_COM675 28
+#define PAPERSIZE_COM9 29
+#define PAPERSIZE_COM10 30
+#define PAPERSIZE_COM11 31
+#define PAPERSIZE_COM12 32
+#define PAPERSIZE_KAI16 33
+#define PAPERSIZE_KAI32 34
+#define PAPERSIZE_KAI32BIG 35
+
+
+#endif
+
diff --git a/svx/source/dialog/page.hrc b/svx/source/dialog/page.hrc
new file mode 100644
index 0000000000..ad49f96fbd
--- /dev/null
+++ b/svx/source/dialog/page.hrc
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * $RCSfile: page.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_PAGE_HRC
+#define _SVX_PAGE_HRC
+
+// defines ---------------------------------------------------------------
+
+#define FT_LEFT_MARGIN 10
+#define ED_LEFT_MARGIN 11
+#define FT_RIGHT_MARGIN 12
+#define ED_RIGHT_MARGIN 13
+#define FT_TOP_MARGIN 14
+#define ED_TOP_MARGIN 15
+#define FT_BOTTOM_MARGIN 16
+#define ED_BOTTOM_MARGIN 17
+#define GB_MARGIN 18
+
+#define LB_LAYOUT 20
+#define GB_PAGE 21
+
+#define LB_NUMBER_FORMAT 30
+#define GB_NUMBER_FORMAT 31
+
+#define WN_BSP 40
+#define GB_BSP 41
+
+#define LB_PAPER_SIZE 50
+#define RB_PORTRAIT 51
+#define RB_LANDSCAPE 52
+#define FT_PAPER_WIDTH 53
+#define ED_PAPER_WIDTH 54
+#define FT_PAPER_HEIGHT 55
+#define ED_PAPER_HEIGHT 56
+#define FT_PAPER_TRAY 57
+#define LB_PAPER_TRAY 58
+#define GB_PAPER_SIZE 59
+
+#define CB_REGISTER 60
+#define FT_REGISTER 61
+#define LB_REGISTER 62
+#define GB_REGISTER 63
+
+#define CB_HORZ 70
+#define CB_VERT 71
+#define CB_ADAPT 72
+#define FT_PAGE_NAME 73
+#define GB_EXTRA 74
+
+#define PB_BACK 80
+
+#define STR_INSIDE 90
+#define STR_OUTSIDE 91
+#define STR_QUERY_PRINTRANGE 92
+
+
+#endif
+
diff --git a/svx/source/dialog/page.src b/svx/source/dialog/page.src
new file mode 100644
index 0000000000..96ce1722ba
--- /dev/null
+++ b/svx/source/dialog/page.src
@@ -0,0 +1,2848 @@
+/*************************************************************************
+ *
+ * $RCSfile: page.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 "page.hrc"
+#include "page.h"
+
+ // RID_SVXPAGE_PAGE ------------------------------------------------------
+
+TabPage RID_SVXPAGE_PAGE
+{
+ HelpId = HID_FORMAT_PAGE ;
+ Hide = TRUE ;
+ Text = "Seite" ;
+ Text [ English ] = "Page" ;
+ Text [ norwegian ] = "Page" ;
+ Text [ italian ] = "Pagina" ;
+ Text [ portuguese_brazilian ] = "Página" ;
+ Text [ portuguese ] = "Página" ;
+ Text [ finnish ] = "Sivu" ;
+ Text [ danish ] = "Side" ;
+ Text [ french ] = "Page" ;
+ Text [ swedish ] = "Sida" ;
+ Text [ dutch ] = "Pagina" ;
+ Text [ spanish ] = "Página" ;
+ Text [ english_us ] = "Page" ;
+ Text[ chinese_simplified ] = "Ò³";
+ Text[ russian ] = "Ñòðàíèöà";
+ Text[ polish ] = "Strona";
+ Text[ japanese ] = "Íß°¼Þ";
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_LEFT_MARGIN
+ {
+ Pos = MAP_APPFONT ( 12 , 11 ) ;
+ Size = MAP_APPFONT ( 29 , 8 ) ;
+ Text = "~Links" ;
+ Text [ ENGLISH ] = "~Left" ;
+ Text [ norwegian ] = "~Left" ;
+ Text [ italian ] = "A sinistra" ;
+ Text [ portuguese_brazilian ] = "~Esquerda" ;
+ Text [ portuguese ] = "~Esquerda" ;
+ Text [ finnish ] = "~Vasemmalle" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ french ] = "~À gauche" ;
+ Text [ swedish ] = "~Vänster" ;
+ Text [ dutch ] = "~Links" ;
+ Text [ spanish ] = "~Izquierda" ;
+ Text [ english_us ] = "~Left" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "×ó(~L)";
+ Text[ russian ] = "Ñëåâà";
+ Text[ polish ] = "Z lewej";
+ Text[ japanese ] = "¶(~L)";
+ Text[ chinese_traditional ] = "¦V¥ª(~L)";
+ Text[ arabic ] = "íÓÇÑ";
+ Text[ greek ] = "ÁñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ(~L)";
+ Text[ turkish ] = "~Sol";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_LEFT_MARGIN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 42 , 10 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_RIGHT_MARGIN
+ {
+ Pos = MAP_APPFONT ( 12 , 26 ) ;
+ Size = MAP_APPFONT ( 29 , 8 ) ;
+ Text = "~Rechts" ;
+ Text [ ENGLISH ] = "Ri~ght" ;
+ Text [ norwegian ] = "Hø~yre" ;
+ Text [ italian ] = "A destra" ;
+ Text [ portuguese_brazilian ] = "Di~reita" ;
+ Text [ portuguese ] = "Di~reita" ;
+ Text [ finnish ] = "~Oikea" ;
+ Text [ danish ] = "Højre" ;
+ Text [ french ] = "~À droite" ;
+ Text [ swedish ] = "~Höger" ;
+ Text [ dutch ] = "Re~chts" ;
+ Text [ spanish ] = "~Derecha" ;
+ Text [ english_us ] = "~Right" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ÓÒ(~R)";
+ Text[ russian ] = "Ñïðàâà";
+ Text[ polish ] = "Z prawej";
+ Text[ japanese ] = "‰E(~R)";
+ Text[ chinese_traditional ] = "¦V¥k(~R)";
+ Text[ arabic ] = "íãíä";
+ Text[ greek ] = "ÄåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ(~R)";
+ Text[ turkish ] = "~Sað";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_RIGHT_MARGIN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 42 , 25 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_TOP_MARGIN
+ {
+ Pos = MAP_APPFONT ( 12 , 41 ) ;
+ Size = MAP_APPFONT ( 29 , 8 ) ;
+ Text = "~Oben" ;
+ Text [ ENGLISH ] = "T~op" ;
+ Text [ norwegian ] = "T~opp" ;
+ Text [ italian ] = "In alto" ;
+ Text [ portuguese_brazilian ] = "T~opo" ;
+ Text [ portuguese ] = "~Superior" ;
+ Text [ finnish ] = "~Ylä" ;
+ Text [ danish ] = "Top" ;
+ Text [ french ] = "~En haut" ;
+ Text [ swedish ] = "Ö~vre" ;
+ Text [ dutch ] = "~Boven" ;
+ Text [ spanish ] = "~Arriba" ;
+ Text [ english_us ] = "~Top" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ÉÏ(~T)";
+ Text[ russian ] = "Ñâåðõó";
+ Text[ polish ] = "W górze";
+ Text[ japanese ] = "ã(~T)";
+ Text[ chinese_traditional ] = "¦V¤W(~T)";
+ Text[ arabic ] = "ÃÚáì";
+ Text[ greek ] = "ÐÜíù";
+ Text[ korean ] = "ˤ(~T)";
+ Text[ turkish ] = "~Üst";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_TOP_MARGIN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 42 , 40 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_BOTTOM_MARGIN
+ {
+ Pos = MAP_APPFONT ( 12 , 56 ) ;
+ Size = MAP_APPFONT ( 29 , 8 ) ;
+ Text = "~Unten" ;
+ Text [ ENGLISH ] = "~Bottom" ;
+ Text [ norwegian ] = "~Bottom" ;
+ Text [ italian ] = "In basso" ;
+ Text [ portuguese_brazilian ] = "~Base" ;
+ Text [ portuguese ] = "~Inferior" ;
+ Text [ finnish ] = "~Alas" ;
+ Text [ danish ] = "Bund" ;
+ Text [ french ] = "En ~bas" ;
+ Text [ swedish ] = "~Nedre" ;
+ Text [ dutch ] = "B~eneden" ;
+ Text [ spanish ] = "A~bajo" ;
+ Text [ english_us ] = "~Bottom" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ÏÂ(~B)";
+ Text[ russian ] = "Âíèçó";
+ Text[ polish ] = "W dole";
+ Text[ japanese ] = "‰º(~B)";
+ Text[ chinese_traditional ] = "¦V¤U(~B)";
+ Text[ arabic ] = "ÃÓÝá";
+ Text[ greek ] = "ÊÜôù";
+ Text[ korean ] = "¾Æ·¡(~B)";
+ Text[ turkish ] = "~Alt";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_BOTTOM_MARGIN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 42 , 55 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ GroupBox GB_MARGIN
+ {
+ Pos = MAP_APPFONT ( 6 , 1 ) ;
+ Size = MAP_APPFONT ( 79 , 71 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Ränder : Rõnder */
+ /* ### ACHTUNG: Neuer Text in Resource? Ränder : Rõnder */
+ Text = "Ränder" ;
+ Text [ ENGLISH ] = "Margins" ;
+ Text [ norwegian ] = "Margins" ;
+ Text [ italian ] = "Margini" ;
+ Text [ portuguese_brazilian ] = "Margens" ;
+ Text [ portuguese ] = "Margens" ;
+ Text [ finnish ] = "Reunukset" ;
+ Text [ danish ] = "Margener" ;
+ Text [ french ] = "Marges" ;
+ Text [ swedish ] = "Marginaler" ;
+ Text [ dutch ] = "Marges" ;
+ Text [ spanish ] = "Márgenes" ;
+ Text [ english_us ] = "Margins" ;
+ Text[ chinese_simplified ] = "±ß¾à";
+ Text[ russian ] = "Ïîëÿ";
+ Text[ polish ] = "Marginesy";
+ Text[ japanese ] = "—]”’";
+ Text[ chinese_traditional ] = "̊ƒ";
+ Text[ arabic ] = "ÇáåæÇãÔ";
+ Text[ greek ] = "Ðåñéèþñéá";
+ Text[ korean ] = "¿©¹é";
+ Text[ turkish ] = "Marjlar";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LAYOUT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 96 , 14 ) ;
+ Size = MAP_APPFONT ( 64 , 44 ) ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Alle" ; Default ; > ;
+ < "Gespiegelt" ; Default ; > ;
+ < "Rechts" ; Default ; > ;
+ < "Links" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Gespiegelt" ; Default ; > ;
+ < "Rechts" ; Default ; > ;
+ < "Links" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Gespiegelt" ; Default ; > ;
+ < "Rechts" ; Default ; > ;
+ < "Links" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Tutti" ; Default ; > ;
+ < "Rispecchiato" ; Default ; > ;
+ < "Destra" ; Default ; > ;
+ < "Sinistra" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Gespiegelt" ; Default ; > ;
+ < "Rechts" ; Default ; > ;
+ < "A Direita" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Tudo" ; Default ; > ;
+ < "Invertido" ; Default ; > ;
+ < "Direita" ; Default ; > ;
+ < "Esquerda" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Gespiegelt" ; Default ; > ;
+ < "Rechts" ; Default ; > ;
+ < "Links" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Spejlvendt" ; Default ; > ;
+ < "Højre" ; Default ; > ;
+ < "Venstre" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Toutes les pages" ; Default ; > ;
+ < "Pages en vis-à-vis" ; Default ; > ;
+ < "À droite" ; Default ; > ;
+ < "À gauche" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Alla" ; Default ; > ;
+ < "Spegelvänd" ; Default ; > ;
+ < "Höger" ; Default ; > ;
+ < "Vänster" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Gespiegeld" ; Default ; > ;
+ < "Rechts" ; Default ; > ;
+ < "Links" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Todos" ; Default ; > ;
+ < "Reflejado" ; Default ; > ;
+ < "Derecha" ; Default ; > ;
+ < "Izquierda" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "All" ; Default ; > ;
+ < "Mirrored" ; Default ; > ;
+ < "Right" ; Default ; > ;
+ < "Left" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "È«²¿" ; Default ; > ;
+ < "·´Ó³µÄ" ; Default ; > ;
+ < "ÓÒ" ; Default ; > ;
+ < "×ó" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Âñå" ; Default ; > ;
+ < "Îòðàæåíèå" ; Default ; > ;
+ < "Ñïðàâà" ; Default ; > ;
+ < "Ñëåâà" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Wszystkie" ; Default ; > ;
+ < "Odbity" ; Default ; > ;
+ < "Z prawej" ; Default ; > ;
+ < "Z lewej" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "‚·‚ׂÄ" ; Default ; > ;
+ < "¶‰E‘ÎÌ" ; Default ; > ;
+ < "‰E" ; Default ; > ;
+ < "¶" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¥þ³¡" ; Default ; > ;
+ < "¤Ï¬Mªº" ; Default ; > ;
+ < "¥k" ; Default ; > ;
+ < "¥ª" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "Çáßá" ; Default ; > ;
+ < "ãäÚßÓ" ; Default ; > ;
+ < "íãíä" ; Default ; > ;
+ < "íÓÇÑ" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "¼ëá" ; Default ; > ;
+ < "Ìå êáôüðôñéóç" ; Default ; > ;
+ < "ÄåîéÜ" ; Default ; > ;
+ < "ÁñéóôåñÜ" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "¸ðµÎ" ; Default ; > ;
+ < "´ëĪ" ; Default ; > ;
+ < "¿À¸¥ÂÊ" ; Default ; > ;
+ < "¿ÞÂÊ" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Tümü" ; Default ; > ;
+ < "Yansýt" ; Default ; > ;
+ < "Sað" ; Default ; > ;
+ < "Sol" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ GroupBox GB_PAGE
+ {
+ Pos = MAP_APPFONT ( 90 , 1 ) ;
+ Size = MAP_APPFONT ( 76 , 34 ) ;
+ Text = "Seitenlayout" ;
+ Text [ ENGLISH ] = "Page layout" ;
+ Text [ norwegian ] = "Side oppsett" ;
+ Text [ italian ] = "Layout di pagina" ;
+ Text [ portuguese_brazilian ] = "Layout da página" ;
+ Text [ portuguese ] = "Configurar página" ;
+ Text [ finnish ] = "Sivun asettelu" ;
+ Text [ danish ] = "Sidelayout" ;
+ Text [ french ] = "Mise en page" ;
+ Text [ swedish ] = "Sidlayout" ;
+ Text [ dutch ] = "Paginalay-out" ;
+ Text [ spanish ] = "Diseño de página" ;
+ Text [ english_us ] = "Page layout" ;
+ Text[ chinese_simplified ] = "Ò³Ãæ°æʽ";
+ Text[ russian ] = "Ðàçìåòêà ñòðàíèöû";
+ Text[ polish ] = "Widok uk³adu strony";
+ Text[ japanese ] = "Íß°¼Þ Ú²±³Ä";
+ Text[ chinese_traditional ] = "­¶­±ª©¦¡";
+ Text[ arabic ] = "ÊÎØíØ ÇáÕÝÍÉ";
+ Text[ greek ] = "ÄéÜôáîç óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö ·¹À̾ƿô";
+ Text[ turkish ] = "Sayfa düzeni";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_NUMBER_FORMAT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 96 , 51 ) ;
+ Size = MAP_APPFONT ( 64 , 64 ) ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Ohne" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Ohne" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Ohne" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Senza" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Nenhum" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Sem" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Ohne" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Uden" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Aucun(e)" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Ingen" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Zonder" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Ninguno" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "None" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "ÎÞ" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Áåç" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Bez" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "‚È‚µ" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "µL" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "... ,A, B, C" ; Default ; > ;
+ < "... ,a, b, c" ; Default ; > ;
+ < "... ,I, II, III" ; Default ; > ;
+ < "... ,i, ii, iii" ; Default ; > ;
+ < "... ,3 ,2 ,1" ; Default ; > ;
+ < "ÈÏæä" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "×ùñßò" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "¾øÀ½" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "A, B, C, ..." ; Default ; > ;
+ < "a, b, c, ..." ; Default ; > ;
+ < "I, II, III, ..." ; Default ; > ;
+ < "i, ii, iii, ..." ; Default ; > ;
+ < "1, 2, 3, ..." ; Default ; > ;
+ < "Yok" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ GroupBox GB_NUMBER_FORMAT
+ {
+ Pos = MAP_APPFONT ( 90 , 38 ) ;
+ Size = MAP_APPFONT ( 76 , 34 ) ;
+ Text = "Nummerierung" ;
+ Text [ ENGLISH ] = "Numbering" ;
+ Text [ norwegian ] = "Nummering" ;
+ Text [ italian ] = "Numerazione" ;
+ Text [ portuguese_brazilian ] = "Numeração" ;
+ Text [ portuguese ] = "Numeração" ;
+ Text [ finnish ] = "Numerointi" ;
+ Text [ danish ] = "Nummerering" ;
+ Text [ french ] = "Numérotation" ;
+ Text [ swedish ] = "Numrering" ;
+ Text [ dutch ] = "Nummering" ;
+ Text [ spanish ] = "Numeración" ;
+ Text [ english_us ] = "Numbering" ;
+ Text[ chinese_simplified ] = "񅧏";
+ Text[ russian ] = "Íóìåðàöèÿ";
+ Text[ polish ] = "Numeracja";
+ Text[ japanese ] = "”Ô†•t‚¯";
+ Text[ chinese_traditional ] = "­¶¼Æ";
+ Text[ arabic ] = "ÇáÊÑÞíã";
+ Text[ greek ] = "Áñßèìçóç";
+ Text[ korean ] = "¹øÈ£ ¸Å±â±â";
+ Text[ turkish ] = "Numaralama";
+ Text[ language_user1 ] = " ";
+ };
+ Window WN_BSP
+ {
+ Pos = MAP_APPFONT ( 176 , 13 ) ;
+ Size = MAP_APPFONT ( 72 , 53 ) ;
+ };
+ GroupBox GB_BSP
+ {
+ Pos = MAP_APPFONT ( 171 , 1 ) ;
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_PAPER_SIZE
+ {
+ Pos = MAP_APPFONT ( 12 , 83 ) ;
+ Size = MAP_APPFONT ( 69 , 47 ) ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ RadioButton RB_PORTRAIT
+ {
+ Pos = MAP_APPFONT ( 84 , 84 ) ;
+ Size = MAP_APPFONT ( 36 , 10 ) ;
+ Text = "Ho~ch" ;
+ Text [ ENGLISH ] = "~Portrait" ;
+ Text [ norwegian ] = "~Portrett" ;
+ Text [ italian ] = "~Verticale" ;
+ Text [ portuguese_brazilian ] = "~Vertical" ;
+ Text [ portuguese ] = "~Vertical" ;
+ Text [ finnish ] = "~Pysty" ;
+ Text [ danish ] = "Stående" ;
+ Text [ french ] = "~Portrait" ;
+ Text [ swedish ] = "~Stående" ;
+ Text [ dutch ] = "~Staand" ;
+ Text [ spanish ] = "~Vertical" ;
+ Text [ english_us ] = "~Portrait" ;
+ Check = TRUE ;
+ Text[ chinese_simplified ] = "×ÝÏò(~P)";
+ Text[ russian ] = "Êíèæíûé";
+ Text[ polish ] = "Pionowo";
+ Text[ japanese ] = "c‘‚«(~P)";
+ Text[ chinese_traditional ] = "ª½¦¡(~P)";
+ Text[ arabic ] = "ÈÇáØæá";
+ Text[ greek ] = "~Êáôáêüñõöá";
+ Text[ korean ] = "¼¼·Î(~P)";
+ Text[ turkish ] = "Di~key";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_LANDSCAPE
+ {
+ Pos = MAP_APPFONT ( 122 , 84 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "~Quer" ;
+ Text [ ENGLISH ] = "Lan~d." ;
+ Text [ norwegian ] = "+++Lan~d." ;
+ Text [ italian ] = "~Orizzont." ;
+ Text [ portuguese_brazilian ] = "Paí~s." ;
+ Text [ portuguese ] = "Hori~zontal" ;
+ Text [ finnish ] = "~Vaaka" ;
+ Text [ danish ] = "Liggende" ;
+ Text [ french ] = "Pa~ysage" ;
+ Text [ swedish ] = "L~iggande" ;
+ Text [ dutch ] = "L~iggend" ;
+ Text [ spanish ] = "~Horizontal" ;
+ Text [ english_us ] = "L~andscape" ;
+ Text[ chinese_simplified ] = "ºáÏò(~A)";
+ Text[ russian ] = "Àëüáîìíûé";
+ Text[ polish ] = "Poziomo";
+ Text[ japanese ] = "‰¡‘‚«(~L)";
+ Text[ chinese_traditional ] = "¾î¦V(~L)";
+ Text[ arabic ] = "ÈÇáÚÑÖ";
+ Text[ greek ] = "Ïñé~æüíôéá";
+ Text[ korean ] = "°¡·Î(~A)";
+ Text[ turkish ] = "~Yatay";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_PAPER_WIDTH
+ {
+ Pos = MAP_APPFONT ( 12 , 99 ) ;
+ Size = MAP_APPFONT ( 26 , 10 ) ;
+ 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" ;
+ Left = TRUE ;
+ 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 ] = "~Geniþlik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_PAPER_WIDTH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 39 , 98 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 12000 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 12000 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_PAPER_HEIGHT
+ {
+ Pos = MAP_APPFONT ( 12 , 113 ) ;
+ Size = MAP_APPFONT ( 26 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Höh~e : H÷h~e */
+ /* ### ACHTUNG: Neuer Text in Resource? Höh~e : H÷h~e */
+ Text = "Höh~e" ;
+ Text [ ENGLISH ] = "H~eight" ;
+ Text [ norwegian ] = "H~eight" ;
+ Text [ italian ] = "Al~tezza" ;
+ Text [ portuguese_brazilian ] = "A~ltura" ;
+ Text [ portuguese ] = "A~ltura" ;
+ Text [ finnish ] = "~Korkeus" ;
+ Text [ danish ] = "Højde" ;
+ Text [ french ] = "~Hauteur" ;
+ Text [ swedish ] = "Höj~d" ;
+ Text [ dutch ] = "H~oogte" ;
+ Text [ spanish ] = "A~ltura" ;
+ Text [ english_us ] = "~Height" ;
+ Left = TRUE ;
+ 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ü~k.";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_PAPER_HEIGHT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 39 , 113 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 12000 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 12000 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_PAPER_TRAY
+ {
+ Pos = MAP_APPFONT ( 84 , 99 ) ;
+ Size = MAP_APPFONT ( 76 , 10 ) ;
+ Text = "~Schacht" ;
+ Text [ ENGLISH ] = "~Tray" ;
+ Text [ norwegian ] = "~Skuff" ;
+ Text [ italian ] = "Ca~ssetto" ;
+ Text [ portuguese_brazilian ] = "~Bandeja" ;
+ Text [ portuguese ] = "~Tabuleiro" ;
+ Text [ finnish ] = "L~okero" ;
+ Text [ danish ] = "Papirkilde" ;
+ Text [ french ] = "Ba~c" ;
+ Text [ swedish ] = "Fac~k" ;
+ Text [ dutch ] = "~Papierlade" ;
+ Text [ spanish ] = "~Origen del papel" ;
+ Text [ english_us ] = "Paper ~source" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "Ö½ÕÅÀ´Ô´(~S)";
+ Text[ russian ] = "Ïîäà÷à áóìàãè";
+ Text[ polish ] = "Zasobnik papieru";
+ Text[ japanese ] = "‹‹Ž†•û–@(~S)";
+ Text[ chinese_traditional ] = "¯È·½(~S)";
+ Text[ arabic ] = "ÏÑÌ ÇáæÑÞ";
+ Text[ greek ] = "Äß~óêïò ÷áñôéïý";
+ Text[ korean ] = "¿ëÁö °ø±Þ(~S)";
+ Text[ turkish ] = "~Kaðýt kaynaðý";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_PAPER_TRAY
+ {
+ Pos = MAP_APPFONT ( 84 , 112 ) ;
+ Size = MAP_APPFONT ( 76 , 49 ) ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ GroupBox GB_PAPER_SIZE
+ {
+ Pos = MAP_APPFONT ( 6 , 74 ) ;
+ Size = MAP_APPFONT ( 160 , 56 ) ;
+ Text = "Papierformat" ;
+ Text [ ENGLISH ] = "Paper format" ;
+ Text [ norwegian ] = "Papir format" ;
+ Text [ italian ] = "Formato foglio" ;
+ Text [ portuguese_brazilian ] = "Formato de papel" ;
+ Text [ portuguese ] = "Formato de papel" ;
+ Text [ finnish ] = "Paperin muoto" ;
+ Text [ danish ] = "Papirformat" ;
+ Text [ french ] = "Format de papier" ;
+ Text [ swedish ] = "Pappersformat" ;
+ Text [ dutch ] = "Papierformaat" ;
+ Text [ spanish ] = "Formato de papel" ;
+ Text [ english_us ] = "Paper format" ;
+ Text[ chinese_simplified ] = "Ö½ÕŸñʽ";
+ Text[ russian ] = "Ôîðìàò áóìàãè";
+ Text[ polish ] = "Format papieru";
+ Text[ japanese ] = "—pŽ†»²½Þ";
+ Text[ chinese_traditional ] = "¯È±i®æ¦¡";
+ Text[ arabic ] = "ÍÌã ÇáæÑÞ";
+ Text[ greek ] = "ÌïñöÞ ÷áñôéïý";
+ Text[ korean ] = "¿ëÁö ¼­½Ä";
+ Text[ turkish ] = "Kaðýt formatý";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_HORZ
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 177 , 83 ) ;
+ Size = MAP_APPFONT ( 71 , 10 ) ;
+ Text = "Hor~izontal" ;
+ Text [ ENGLISH ] = "Hor~izontal" ;
+ Text [ norwegian ] = "Hor~izontal" ;
+ Text [ italian ] = "~Orizzontale" ;
+ Text [ portuguese_brazilian ] = "Hor~izontal" ;
+ Text [ portuguese ] = "Hor~izontal" ;
+ Text [ french ] = "Hor~izontal" ;
+ Text [ dutch ] = "Hor~izontaal" ;
+ Text [ spanish ] = "Hori~zontal" ;
+ Text [ danish ] = "Vandret" ;
+ Text [ swedish ] = "H~orisontellt" ;
+ Text [ finnish ] = "Hor~izontal" ;
+ Text [ english_us ] = "Hori~zontal" ;
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò(~Z)";
+ Text[ russian ] = "Ãîðèçîíòàëüíî";
+ Text[ polish ] = "Poziomo";
+ Text[ japanese ] = "‰¡’†‰›(~Z)";
+ Text[ chinese_traditional ] = "¤ô¥­¤è¦V(~Z)";
+ Text[ arabic ] = "ÃÝÞí";
+ Text[ greek ] = "Ïñéæüíôéá";
+ Text[ korean ] = "°¡·Î(~Z)";
+ Text[ turkish ] = "Ya~tay";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_VERT
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 177 , 96 ) ;
+ Size = MAP_APPFONT ( 71 , 10 ) ;
+ Text = "~Vertikal" ;
+ Text [ ENGLISH ] = "~Vertical" ;
+ Text [ norwegian ] = "~Vertikal" ;
+ Text [ italian ] = "~Verticale" ;
+ Text [ portuguese_brazilian ] = "~Vertical" ;
+ Text [ portuguese ] = "~Vertical" ;
+ Text [ finnish ] = "~Rinnakkain" ;
+ Text [ danish ] = "Lodret" ;
+ Text [ french ] = "~Vertical" ;
+ Text [ swedish ] = "Ve~rtikalt" ;
+ Text [ dutch ] = "~Verticaal" ;
+ Text [ spanish ] = "Ver~tical" ;
+ Text [ english_us ] = "~Vertical" ;
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò(~V)";
+ Text[ russian ] = "Âåðòèêàëüíî";
+ Text[ polish ] = "Pionowo";
+ Text[ japanese ] = "c’†‰›(~V)";
+ Text[ chinese_traditional ] = "««ª½¤è¦V(~V)";
+ Text[ arabic ] = "ÑÃÓí";
+ Text[ greek ] = "Êáôáêüñõöá";
+ Text[ korean ] = "¼¼·Î(~V)";
+ Text[ turkish ] = "~Dikey";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_ADAPT
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 177 , 96 ) ;
+ Size = MAP_APPFONT ( 77 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~An Größe anpassen : ~An Gr÷˜e anpassen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~An Größe anpassen : ~An Gr÷˜e anpassen */
+ Text = "~An Größe anpassen" ;
+ Text [ ENGLISH ] = "~Fit to size" ;
+ Text [ norwegian ] = "~Fit to size" ;
+ Text [ italian ] = "Dimensioni pagina" ;
+ Text [ portuguese_brazilian ] = "~Fit to size" ;
+ Text [ portuguese ] = "~Ajustar ao tamanho" ;
+ Text [ french ] = "~Adapter à la taille" ;
+ Text [ dutch ] = "~Aan grootte aanpassen" ;
+ Text [ spanish ] = "~Ajustar al tamaño" ;
+ Text [ danish ] = "Tilpas til størrelse" ;
+ Text [ swedish ] = "~Anpassa till storlek" ;
+ Text [ finnish ] = "~Fit to size" ;
+ Text [ english_us ] = "~Fit to size" ;
+ Text[ chinese_simplified ] = "µ÷Õû´óС(~F)";
+ Text[ russian ] = "Ñîãëàñíî ðàçìåðà";
+ Text[ polish ] = "Dostosuj do rozmiaru";
+ Text[ japanese ] = "»²½Þ‚É“K‡(~F)";
+ Text[ chinese_traditional ] = "½Õ¾ã¤j¤p(~F)";
+ Text[ arabic ] = "ãáÇÁãÉ ááÍÌã";
+ Text[ greek ] = "ÐñïóáñìïãÞ óå ìÝãåèïò";
+ Text[ korean ] = "Å©±â¿¡ ¸ÂÃß±â(~F)";
+ Text[ turkish ] = "~Boya göre ayarla";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_PAGE_NAME
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 177 , 92 ) ;
+ Size = MAP_APPFONT ( 71 , 10 ) ;
+ Center = TRUE ;
+ };
+ GroupBox GB_EXTRA
+ {
+ Pos = MAP_APPFONT ( 171 , 74 ) ;
+ Size = MAP_APPFONT ( 83 , 56 ) ;
+ Text = "Folgevorlage" ;
+ Text [ ENGLISH ] = "Page" ;
+ Text [ norwegian ] = "Page" ;
+ Text [ italian ] = "Modello successivo" ;
+ Text [ portuguese_brazilian ] = "Página" ;
+ Text [ portuguese ] = "Estilo seguinte" ;
+ Text [ finnish ] = "Sivu" ;
+ Text [ danish ] = "Næste typografi" ;
+ Text [ french ] = "Style suivant" ;
+ Text [ swedish ] = "Nästa formatmall" ;
+ Text [ dutch ] = "Volgend profiel" ;
+ Text [ spanish ] = "Estilo siguiente" ;
+ Text [ english_us ] = "Next Style" ;
+ Text[ chinese_simplified ] = "ÏÂÒ»¸öÑùʽ";
+ Text[ russian ] = "Ñëåäóþùèé ñòèëü";
+ Text[ polish ] = "Nastêpny styl";
+ Text[ japanese ] = "ŽŸ‚̽À²Ù";
+ Text[ chinese_traditional ] = "¤U¤@­Ó¼Ë¦¡";
+ Text[ arabic ] = "äãØ ÊÇáí";
+ Text[ greek ] = "Åðüìåíï ðñüôõðï";
+ Text[ korean ] = "´ÙÀ½ À¯Çü";
+ Text[ turkish ] = "Sonraki biçim";
+ Text[ language_user1 ] = " ";
+ };
+ /* Registerhaltigkeit (fuer SW) */
+ CheckBox CB_REGISTER
+ {
+ Pos = MAP_APPFONT ( 175 , 85 ) ;
+ Size = MAP_APPFONT ( 76 , 12 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Einsch~alten : Ein~schalten */
+ Text = "Einsch~alten" ;
+ Text [ ENGLISH ] = "Acti~vate" ;
+ Text [ dutch ] = "~Activeren" ;
+ Text [ english_us ] = "~Activate" ;
+ Text [ italian ] = "~Attiva" ;
+ Text [ spanish ] = "Ac~tivar" ;
+ Text [ french ] = "Act~iver" ;
+ Text [ swedish ] = "~Aktivera" ;
+ Text [ danish ] = "Aktiver" ;
+ Hide = TRUE ;
+ Text [ portuguese_brazilian ] = "Einsch~alten" ;
+ Text [ portuguese ] = "~Activar correspondência" ;
+ Text[ chinese_simplified ] = "¼¤»î(~A)";
+ Text[ russian ] = "Âêëþ÷èòü";
+ Text[ polish ] = "W³¹cz";
+ Text[ japanese ] = "‡‚킹‚é(~A)";
+ Text[ chinese_traditional ] = "¿E¬¡(~A)";
+ Text[ arabic ] = "ÊÔÛíá";
+ Text[ greek ] = "~Åíåñãïðïßçóç";
+ Text[ korean ] = "È°¼ºÈ­(~A)";
+ Text[ turkish ] = "Çalý~þtýr";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_REGISTER
+ {
+ Pos = MAP_APPFONT ( 175 , 100 ) ;
+ Size = MAP_APPFONT ( 76 , 10 ) ;
+ Text = "Referenzabsa~tzvorlage" ;
+ Text [ ENGLISH ] = "Reference style sheet" ;
+ Text [ english_us ] = "Reference ~Style" ;
+ Text [ italian ] = "~Modello di paragr.di rifer." ;
+ Text [ spanish ] = "Estilo de ~referencia" ;
+ Text [ french ] = "Style de ~paragraphe réf." ;
+ Text [ dutch ] = "Re~ferentie-alineaprofiel" ;
+ Text [ swedish ] = "Referenss~tyckeformatmall" ;
+ Text [ danish ] = "Reference-afsnitstypografi" ;
+ Hide = TRUE ;
+ Text [ portuguese_brazilian ] = "Referenzabsa~tzvorlage" ;
+ Text [ portuguese ] = "Estilo da referência" ;
+ Text[ chinese_simplified ] = "˵Ã÷ÎĶÎÂäÑùʽ(~S)";
+ Text[ russian ] = "Ñòèëü ññûëêè";
+ Text[ polish ] = "Szablon akapitu odwo³ania";
+ Text[ japanese ] = "“K—p’i—Ž½À²Ù(~S)";
+ Text[ chinese_traditional ] = "°Ñ·Ó¤å¬q¸¨¼Ë¦¡(~S)";
+ Text[ arabic ] = "äãØ ÝÞÑÉ ãÑÌÚí";
+ Text[ greek ] = "Ðñü~ôõðï ðáñáãñÜöïõ áíáöïñÜò";
+ Text[ korean ] = "ÂüÁ¶ À¯Çü(~S)";
+ Text[ turkish ] = "Referans par~agraf biçimi";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_REGISTER
+ {
+ Pos = MAP_APPFONT ( 175 , 113 ) ;
+ Size = MAP_APPFONT ( 73 , 50 ) ;
+ DropDown = TRUE ;
+ Hide = TRUE ;
+ Sort = TRUE ;
+ HScroll = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ GroupBox GB_REGISTER
+ {
+ Pos = MAP_APPFONT ( 171 , 74 ) ;
+ Size = MAP_APPFONT ( 83 , 56 ) ;
+ Text = "Registerhaltigkeit" ;
+ Text [ ENGLISH ] = "" ;
+ Text [ italian ] = "Conformità registro" ;
+ Text [ spanish ] = "Conformidad registro" ;
+ Text [ french ] = "Contrôle de repérage" ;
+ Text [ dutch ] = "Registeren" ;
+ Text [ english_us ] = "Register-true" ;
+ Text [ swedish ] = "Register" ;
+ Text [ danish ] = "Hold register" ;
+ Hide = TRUE ;
+ Text [ portuguese_brazilian ] = "Registerhaltigkeit" ;
+ Text [ portuguese ] = "Registo" ;
+ Text[ chinese_simplified ] = "Õý·´Ò³ÐоàÏàµÈ";
+ Text[ russian ] = "Ïðèâîäêà";
+ Text[ polish ] = "Jedn. wys. wierszy";
+ Text[ japanese ] = "ˆóüŒ©“–";
+ Text[ chinese_traditional ] = "¥¿¤Ï­¶¦æ¶Z¬Ûµ¥";
+ Text[ arabic ] = "ÇáÇäÊÙÇã";
+ Text[ greek ] = "Åðéâåâáßùóç åããñáöÞò";
+ Text[ korean ] = "µî·Ï È®ÀÎ";
+ Text[ turkish ] = "Eþit satýr yüksekliði";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_INSIDE
+ {
+ Text = "I~nnen" ;
+ Text [ ENGLISH ] = "I~nner" ;
+ Text [ english_us ] = "I~nner" ;
+ Text [ italian ] = "Interno" ;
+ Text [ spanish ] = "Int~erior" ;
+ Text [ french ] = "I~ntérieure" ;
+ Text [ dutch ] = "Bi~nnen" ;
+ Text [ swedish ] = "I~nre" ;
+ Text [ danish ] = "Indre" ;
+ Text [ portuguese_brazilian ] = "I~nnen" ;
+ Text [ portuguese ] = "I~nterior" ;
+ Text[ chinese_simplified ] = "ÄÚ²¿(~N)";
+ Text[ russian ] = "Âíóòðè";
+ Text[ polish ] = "Wewn¹trz";
+ Text[ japanese ] = "“à‘¤(~N)";
+ Text[ chinese_traditional ] = "¦V¤º(~N)";
+ Text[ arabic ] = "ÏÇÎá";
+ Text[ greek ] = "ÅóùôåñéêÜ";
+ Text[ korean ] = "¾È(~N)";
+ Text[ turkish ] = "Ý~ç";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_OUTSIDE
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Au~ßen : Au~˜en */
+ /* ### ACHTUNG: Neuer Text in Resource? Au~ßen : Au~˜en */
+ Text = "Au~ßen" ;
+ Text [ ENGLISH ] = "O~uter" ;
+ Text [ english_us ] = "O~uter" ;
+ Text [ italian ] = "Esterno" ;
+ Text [ spanish ] = "E~xterior" ;
+ Text [ french ] = "E~xtérieure" ;
+ Text [ dutch ] = "B~uiten" ;
+ Text [ swedish ] = "~Yttre" ;
+ Text [ danish ] = "Ydre" ;
+ Text [ portuguese_brazilian ] = "Au~ßen" ;
+ Text [ portuguese ] = "E~xterior" ;
+ Text[ chinese_simplified ] = "Íⲿ(~U)";
+ Text[ russian ] = "Ñíàðóæè";
+ Text[ polish ] = "Na zewn¹trz";
+ Text[ japanese ] = "ŠO‘¤(~U)";
+ Text[ chinese_traditional ] = "¦V¥~(~U)";
+ Text[ arabic ] = "ÎÇÑÌ";
+ Text[ greek ] = "ÅîùôåñéêÜ";
+ Text[ korean ] = "¹Û(~U)";
+ Text[ turkish ] = "D~ýþ";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_QUERY_PRINTRANGE
+ {
+ Text = "Ihre Einstellungen für die Ränder liegen außerhalb des Druckbereichs.\n\nWollen Sie trotzdem diese Einstellungen übernehmen?" ;
+ Text [ ENGLISH ] = "Ihre Einstellungen für die Ränder liegen außerhalb des Druckbereichs.\n\nWollen Sie trotzdem diese Einstellungen übernehmen?" ;
+ Text[ english_us ] = "The margin settings are out of print range.\n\nDo you still want to apply these settings?";
+ Text[ portuguese ] = "As predefinições das margens encontram-se fora da área de impressão.\n\nMesmo assim, aplicar?";
+ Text[ russian ] = "Âàøè óñòàíîâêè äëÿ ïîëåé íàõîäÿòñÿ çà ïðåäåëàìè îáëàñòè ïå÷àòè.\n\nÂû õîòèòå ïðèíÿòü ýòè óñòàíîâêè íåñìîòðÿ íà ýòî?";
+ Text[ dutch ] = "Uw instellingen voor de marges bevinden zich buiten het afdrukbereik.\n\nWilt u deze toch overnemen?";
+ Text[ french ] = "Les paramètres que vous avez définis pour les marges dépassent la zone d'impression.\n\nVoulez-vous quand même appliquer ces paramètres ?";
+ Text[ spanish ] = "Con esta definición, los márgenes quedarán fuera del área de impresión.\n\n¿Desea aplicar esta definición de márgenes?";
+ Text[ italian ] = "Le impostazioni per i margini sono al di fuori dell'area di stampa.\n\nVolete applicare queste impostazioni lo stesso?";
+ Text[ danish ] = "Dine margenindstillinger ligger udenfor udskriftsområdet.\n\nVil du overtage disse indstillinger alligevel?";
+ Text[ swedish ] = "Dina inställningar för mariginalerna ligger utanför utskriftsområdet.\n\nVill Du trots det överta inställningarna?";
+ Text[ polish ] = "Twoje ustawienia krawêdzi znajduj¹ siê poza obszarem wydruku.\n\nCzy chcesz mimo to zastosowaæ te ustawienia?";
+ Text[ portuguese_brazilian ] = "Ihre Einstellungen für die Ränder liegen außerhalb des Druckbereichs.\n\nWollen Sie trotzdem diese Einstellungen übernehmen?";
+ Text[ japanese ] = "ˆóü”͈͊O‚É—]”’‚ªÝ’肳‚ê‚Ä‚¢‚Ü‚·B\n\n‚»‚ê‚Å‚à‚±‚ÌÝ’è‚ð“K—p‚µ‚Ü‚·‚©H";
+ Text[ chinese_simplified ] = "ÄúµÄÒ³±ßÉ趨ÓÐÎó£¬Ò³±ß²»ÔÚ´òÓ¡·¶Î§Ö®ÄÚ¡£\n\nÄú»¹ÊÇÒª½ÓÊÜÕâ¸öÉ趨Âð£¿";
+ Text[ chinese_traditional ] = "±zªº­¶Ãä³]©w¦³»~¡M­¶Ã䤣¦b¦C¦L½d³ò¤§¤º¡C\n\n±zÁÙ¬O­n±µ¨ü³o­Ó³]©w¡H";
+ Text[ arabic ] = "ÊÞÚ ÅÚÏÇÏÇÊ ÇáåæÇãÔ ÎÇÑÌ äØÇÞ ÇáØÈÇÚÉ.\n\nåá ÊÑíÏ ÊØÈíÞ åÐå ÇáÅÚÏÇÏÇÊ Úáì ÇáÑÛã ãä Ðáß¿";
+ Text[ greek ] = "Ïé ñõèìßóåéò ôùí ðåñéèùñßùí åßíáé åêôüò ôçò ðåñéïóÞò åêôýðùóçò.\n\nÈÝëåôå íá åöáñìïóôïýí ïé ñõèìßóåéò ðáñ´üëá áõôÜ;";
+ Text[ korean ] = "¿©¹é ¼³Á¤ÀÌ Àμ⠹üÀ§¸¦ ¹þ¾î³µ½À´Ï´Ù.\n\n±×·¡µµ ÀÌ ¼³Á¤À» Àû¿ëÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Marj ayarlarýnýz, yazdýrma aralýðýnýn dýþýnda.\n\nBu ayarlarý yine de uygulamak istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_traditional ] = "­¶";
+ Text[ arabic ] = "ÇáÕÝÍÉ";
+ Text[ greek ] = "Óåëßäá";
+ Text[ korean ] = "ÆäÀÌÁö";
+ Text[ turkish ] = "Sayfa";
+ Text[ language_user1 ] = " ";
+};
+ // App-spezifische Res
+String RID_SVXSTR_CALC_PAGE
+{
+ Text = "Ausrichtung" ;
+ Text [ ENGLISH ] = "Orientation" ;
+ Text [ norwegian ] = "Orientation" ;
+ Text [ italian ] = "Allineamento" ;
+ Text [ portuguese_brazilian ] = "Orientação" ;
+ Text [ portuguese ] = "Orientação" ;
+ Text [ finnish ] = "Suunta" ;
+ Text [ danish ] = "Justering" ;
+ Text [ french ] = "Alignement" ;
+ Text [ swedish ] = "Orientering" ;
+ Text [ dutch ] = "Oriëntatie" ;
+ Text [ spanish ] = "Orientación" ;
+ Text [ english_us ] = "Alignment" ;
+ Text[ chinese_simplified ] = "¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå";
+ Text[ polish ] = "Wyrównanie";
+ Text[ japanese ] = "”z’u";
+ Text[ chinese_traditional ] = "¹ï»ô";
+ Text[ arabic ] = "ÇáÇÊÌÇå";
+ Text[ greek ] = "Ðñïóáíáôïëéóìüò";
+ Text[ korean ] = "¹æÇâ";
+ Text[ turkish ] = "Hizalama";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DRAW_PAGE
+{
+ Text = "Extras" ;
+ Text [ ENGLISH ] = "Extras" ;
+ Text [ norwegian ] = "Ekstra" ;
+ Text [ italian ] = "Varie" ;
+ Text [ portuguese_brazilian ] = "Extras" ;
+ Text [ portuguese ] = "Opções" ;
+ Text [ french ] = "Options" ;
+ Text [ dutch ] = "Extra" ;
+ Text [ spanish ] = "Opciones" ;
+ Text [ danish ] = "Supplerende" ;
+ Text [ swedish ] = "Verktyg" ;
+ Text [ finnish ] = "Extras" ;
+ Text [ english_us ] = "Options" ;
+ Text[ chinese_simplified ] = "ÆäËû";
+ Text[ russian ] = "Äîïîëíèòåëüíî";
+ Text[ polish ] = "Narzêdzia";
+ Text[ japanese ] = "Ú×Ý’è";
+ Text[ chinese_traditional ] = "¨ä¥L";
+ Text[ arabic ] = "ÎíÇÑÇÊ";
+ Text[ greek ] = "Åñãáëåßá";
+ Text[ korean ] = "¿É¼Ç";
+ Text[ turkish ] = "Seçenekler";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_WRITER_PAGE
+{
+ Text = "Folgeseite" ;
+ Text [ ENGLISH ] = "Next Page" ;
+ Text [ norwegian ] = "Neste side" ;
+ Text [ italian ] = "Pagina successiva" ;
+ Text [ portuguese_brazilian ] = "Próxima Página" ;
+ Text [ portuguese ] = "Página seguinte" ;
+ Text [ finnish ] = "Seuraava sivu" ;
+ Text [ danish ] = "Næste side" ;
+ Text [ french ] = "Page suivante" ;
+ Text [ swedish ] = "Följande sida" ;
+ Text [ dutch ] = "Volgende pagina" ;
+ Text [ spanish ] = "Página siguiente" ;
+ Text [ english_us ] = "Continuation page" ;
+ Text[ chinese_simplified ] = "ÏÂÒ»Ò³";
+ Text[ russian ] = "Ñëåäóþùàÿ ñòðàíèöà";
+ Text[ polish ] = "Nastêpna strona";
+ Text[ japanese ] = "2Íß°¼Þ–ÚˆÈ~";
+ Text[ chinese_traditional ] = "¤U¤@­¶";
+ Text[ arabic ] = "ÇáÕÝÍÉ ÇáÊÇáíÉ";
+ Text[ greek ] = "Åðüìåíç óåëßäá";
+ Text[ korean ] = "´ÙÀ½ ÆäÀÌÁö";
+ Text[ turkish ] = "Sonraki sayfa";
+ Text[ language_user1 ] = " ";
+};
+ // Papierformate
+String RID_SVXSTR_PAPER_A0
+{
+ Text = "A0" ;
+};
+String RID_SVXSTR_PAPER_A1
+{
+ Text = "A1" ;
+};
+String RID_SVXSTR_PAPER_A2
+{
+ Text = "A2" ;
+};
+String RID_SVXSTR_PAPER_A3
+{
+ Text = "A3" ;
+};
+String RID_SVXSTR_PAPER_A4
+{
+ Text = "A4" ;
+};
+String RID_SVXSTR_PAPER_A5
+{
+ Text = "A5" ;
+};
+String RID_SVXSTR_PAPER_B4
+{
+ Text = "B4" ;
+};
+String RID_SVXSTR_PAPER_B5
+{
+ Text = "B5" ;
+};
+String RID_SVXSTR_PAPER_LETTER
+{
+ Text = "Letter" ;
+};
+String RID_SVXSTR_PAPER_LEGAL
+{
+ Text = "Legal" ;
+};
+String RID_SVXSTR_PAPER_TABLOID
+{
+ Text = "Tabloid" ;
+};
+String RID_SVXSTR_PAPER_USER
+{
+ Text = "Benutzer" ;
+ Text [ English ] = "Custom" ;
+ Text [ norwegian ] = "Tilpasse" ;
+ Text [ italian ] = "Personalizzata" ;
+ Text [ portuguese_brazilian ] = "Pessoal" ;
+ Text [ portuguese ] = "Personalizar" ;
+ Text [ finnish ] = "Mukautettu" ;
+ Text [ danish ] = "Bruger" ;
+ Text [ french ] = "Utilisateur" ;
+ Text [ swedish ] = "Användare" ;
+ Text [ dutch ] = "Gebruiker" ;
+ Text [ spanish ] = "Usuario" ;
+ Text [ english_us ] = "User Defined" ;
+ Text[ chinese_simplified ] = "ʹÓÃÕßÉ趨";
+ Text[ russian ] = "Ïîëüçîâàòåëü";
+ Text[ polish ] = "U¿ytkownik";
+ Text[ japanese ] = "Õ°»Þ°";
+ Text[ chinese_traditional ] = "¦Û­q";
+ Text[ arabic ] = "ÇáãÓÊÎÏã";
+ Text[ greek ] = "×ñÞóôçò";
+ Text[ korean ] = "»ç¿ëÀÚ Á¤ÀÇ";
+ Text[ turkish ] = "Kullanýcý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_PAPER_B6
+{
+ Text = "B6" ;
+};
+String RID_SVXSTR_PAPER_C4
+{
+ Text = "C4" ;
+};
+String RID_SVXSTR_PAPER_C5
+{
+ Text = "C5" ;
+};
+String RID_SVXSTR_PAPER_C6
+{
+ Text = "C6" ;
+};
+String RID_SVXSTR_PAPER_C65
+{
+ Text = "C65" ;
+};
+String RID_SVXSTR_PAPER_DL
+{
+ Text = "DL" ;
+};
+String RID_SVXSTR_PAPER_DIA
+{
+ Text = "Dia" ;
+};
+String RID_SVXSTR_PAPER_SCREEN
+{
+ Text = "Bildschirm" ;
+ Text [ English ] = "Screen" ;
+ Text [ norwegian ] = "Skjerm" ;
+ Text [ italian ] = "Schermo" ;
+ Text [ portuguese_brazilian ] = "Tela" ;
+ Text [ portuguese ] = "Ecrã" ;
+ Text [ finnish ] = "Näyttö" ;
+ Text [ danish ] = "Skærm" ;
+ Text [ french ] = "Écran" ;
+ Text [ swedish ] = "Bildskärm" ;
+ Text [ dutch ] = "Scherm" ;
+ Text [ spanish ] = "Pantalla" ;
+ Text [ english_us ] = "Screen" ;
+ Text[ chinese_simplified ] = "ÆÁÄ»";
+ Text[ russian ] = "Ýêðàí";
+ Text[ polish ] = "Ekran";
+ Text[ japanese ] = "‰æ–Ê";
+ Text[ chinese_traditional ] = "¿Ã¹õ";
+ Text[ arabic ] = "ÇáÔÇÔÉ";
+ Text[ greek ] = "Ïèüíç";
+ Text[ korean ] = "È­¸é";
+ Text[ turkish ] = "Ekran";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_PAPER_A
+{
+ Text = "A" ;
+};
+String RID_SVXSTR_PAPER_B
+{
+ Text = "B" ;
+};
+String RID_SVXSTR_PAPER_C
+{
+ Text = "C" ;
+};
+String RID_SVXSTR_PAPER_D
+{
+ Text = "D" ;
+};
+String RID_SVXSTR_PAPER_E
+{
+ Text = "E" ;
+};
+String RID_SVXSTR_PAPER_EXECUTIVE
+{
+ Text = "Executive" ;
+};
+String RID_SVXSTR_PAPER_LEGAL2
+{
+ Text = "Legal" ;
+};
+String RID_SVXSTR_PAPER_MONARCH
+{
+ Text = "Monarch" ;
+};
+String RID_SVXSTR_PAPER_COM675
+{
+ Text = "Env. 6¾" ;
+};
+String RID_SVXSTR_PAPER_COM9
+{
+ Text = "Env. 9" ;
+};
+String RID_SVXSTR_PAPER_COM10
+{
+ Text = "Env. 10" ;
+};
+String RID_SVXSTR_PAPER_COM11
+{
+ Text = "Env. 11" ;
+};
+String RID_SVXSTR_PAPER_COM12
+{
+ Text = "Env. 12" ;
+};
+String RID_SVXSTR_PAPER_KAI16
+{
+ Text = "16 kai" ;
+};
+String RID_SVXSTR_PAPER_KAI32
+{
+ Text = "32 kai" ;
+};
+String RID_SVXSTR_PAPER_KAI32BIG
+{
+ Text = "32 kai big" ;
+};
+StringArray RID_SVXSTRARY_PAPERSIZE_STD
+{
+ ItemList =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Benutzer" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Env. #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Env. Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Env. #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Env. #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Env. #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Env. #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ english ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Benutzer" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Env. #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Env. Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Env. #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Env. #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Env. #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Env. #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ english_us ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8.5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8.5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "User" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Env. #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Env. Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Env. #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Env. #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Env. #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Env. #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ portuguese_brazilian ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Benutzer" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mmm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Env. #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Env. Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Env. #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Env. #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Env. #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Env. #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ swedish ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Användare" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Env. #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Env. Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Env. #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Env. #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Env. #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Env. #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai stor 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ danish ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Bruger" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Env. #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Env. Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Env. #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Env. #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Env. #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Env. #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai stor 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ italian ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Utente" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Busta #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Busta Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Busta #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Busta #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Busta #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Busta #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ spanish ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Carta 8,5 x 11 pulgadas" ; PAPERSIZE_LETTER ; > ;
+ < "Oficio 8,5 x 14 pulgadas" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloide" ; PAPERSIZE_TABLOID ; > ;
+ < "Usuario" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Sobre #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Sobre Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Sobre #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Sobre #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Sobre #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Sobre #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai grande 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ french ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Utilisateur" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Env. #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Env. Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Env. #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Env. #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Env. #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Env. #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ dutch ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Gebruiker" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mmm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Env. #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Env. Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Env. #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Env. #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Env. #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Env. #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groot 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ portuguese ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Utilizador" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Env. #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Env. Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Env. #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Env. #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Env. #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Env. #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ItemList [ chinese_simplified ] =
+ {
+ < "A3 297 x 420 ºÁÃ×" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 ºÁÃ×" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 ºÁÃ×" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 ºÁÃ×" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 ºÁÃ×" ; PAPERSIZE_B5 ; > ;
+ < "ÃÀʽ¹æ¸ñ 8,5 x 11 Ó¢´ç" ; PAPERSIZE_LETTER ; > ;
+ < "ÃÀʽ¹æ¸ñ 8,5 x 14 Ó¢´ç" ; PAPERSIZE_LEGAL ; > ;
+ < "ÎÄÕª" ; PAPERSIZE_TABLOID ; > ;
+ < "Óû§É趨" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 ºÁÃ×" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 ºÁÃ×" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 ºÁÃ×" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 ºÁÃ×" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 ºÁÃ×" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 ºÁÃ×" ; PAPERSIZE_DL ; > ;
+ < "ÐÅ·â¸ñʽ #6?3,625 x 6,5 Ó¢´ç" ; PAPERSIZE_COM675; > ;
+ < "ÃÀʽÐÅ·â 3,875 x 7,5 Ó¢´ç" ; PAPERSIZE_MONARCH; > ;
+ < "ÐÅ·â¸ñʽ #9 3,875 x 8,875 Ó¢´ç" ; PAPERSIZE_COM9; > ;
+ < "ÐÅ·â¸ñʽ #10 4,125 x 9,5 Ó¢´ç" ; PAPERSIZE_COM10; > ;
+ < "ÐÅ·â¸ñʽ #11 4,5 x 10,375 Ó¢´ç" ; PAPERSIZE_COM11; > ;
+ < "ÐÅ·â¸ñʽ #12 4,75 x 11 Ó¢´ç" ; PAPERSIZE_COM12; > ;
+ < "16 ¿ª 184 x 260 ºÁÃ×" ; PAPERSIZE_KAI16; > ;
+ < "32 ¿ª 130 x 184 ºÁÃ×" ; PAPERSIZE_KAI32; > ;
+ < "32 ¿ª 140 x 203 ºÁÃ×" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ russian ] =
+ {
+ < "A3 297 x 420 ìì" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 ìì" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 ìì" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 ìì" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 ìì" ; PAPERSIZE_B5 ; > ;
+ < "Ïèñüìî 8,5 x 11 äþéì." ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 äþéì." ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Ïîëüçîâàòåëü" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 ìì" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 ìì" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 ìì" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 ìì" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 ìì" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 ìì" ; PAPERSIZE_DL ; > ;
+ < "Êîíâ. #6¾ 3,625 x 6,5 äþéì." ; PAPERSIZE_COM675; > ;
+ < "Êîíâ. Monarch 3,875 x 7,5 äþéì." ; PAPERSIZE_MONARCH; > ;
+ < "Êîíâ. #9 3,875 x 8,875 äþéì." ; PAPERSIZE_COM9; > ;
+ < "Êîíâ. #10 4,125 x 9,5 äþéì." ; PAPERSIZE_COM10; > ;
+ < "Êîíâ. #11 4,5 x 10,375 äþéì." ; PAPERSIZE_COM11; > ;
+ < "Êîíâ. #12 4,75 x 11 äþéì." ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 ìì" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 ìì" ; PAPERSIZE_KAI32; > ;
+ < "32 kai áîëüøîé 140 x 203 ìì" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ polish ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 cali" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 cali" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "U¿ytkownik" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Kop. #6¾ 3,625 x 6,5 cali" ; PAPERSIZE_COM675; > ;
+ < "Kop. Monarch 3,875 x 7,5 cali" ; PAPERSIZE_MONARCH; > ;
+ < "Kop. #9 ,875 x 8,875 cali" ; PAPERSIZE_COM9; > ;
+ < "Kop. #10 4,125 x 9,5 cali" ; PAPERSIZE_COM10; > ;
+ < "Kop. #11 4,5 x 10,375 cali" ; PAPERSIZE_COM11; > ;
+ < "Kop. #12 4,75 x 11 cali" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai wielkoϾ140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ japanese ] =
+ {
+ < "A3 297x420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210x297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148x210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250x353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176x250 mm" ; PAPERSIZE_B5 ; > ;
+ < "ŽèŽ† 8.5x11 ²ÝÁ" ; PAPERSIZE_LETTER ; > ;
+ < "‹K’軲½Þ8.5x14 ²ÝÁ" ; PAPERSIZE_LEGAL ; > ;
+ < "ÀÌÞÛ²ÄÞ" ; PAPERSIZE_TABLOID ; > ;
+ < "Õ°»Þ°" ; PAPERSIZE_USER ; > ;
+ < "B6 125x176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229x324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162x229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114x162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114x227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110x220 mm" ; PAPERSIZE_DL ; > ;
+ < "••“› #6¾ 3.625x6.5 ²ÝÁ" ; PAPERSIZE_COM675; > ;
+ < "••“› Monarch 3.875x7.5 ²ÝÁ" ; PAPERSIZE_MONARCH; > ;
+ < "••“› #9 3.875x8.875 ²ÝÁ" ; PAPERSIZE_COM9; > ;
+ < "••“› #10 4.125x9.5 ²ÝÁ" ; PAPERSIZE_COM10; > ;
+ < "••“› #11 4.5x10.375 ²ÝÁ" ; PAPERSIZE_COM11; > ;
+ < "••“› #12 4.75x11 ²ÝÁ" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184x260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130x184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai‘å 140x203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ chinese_traditional ] =
+ {
+ < "A3 297 x 420 ²@¦Ì" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 ²@¦Ì" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 ²@¦Ì" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 ²@¦Ì" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 ²@¦Ì" ; PAPERSIZE_B5 ; > ;
+ < "¬ü¦¡³W®æ 8,5 x 11 ­^¤o" ; PAPERSIZE_LETTER ; > ;
+ < "¬ü¦¡³W®æ 8,5 x 14 ­^¤o" ; PAPERSIZE_LEGAL ; > ;
+ < "¤åºK" ; PAPERSIZE_TABLOID ; > ;
+ < "¦Û­q" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 ²@¦Ì" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 ²@¦Ì" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 ²@¦Ì" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 ²@¦Ì" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 ²@¦Ì" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 ²@¦Ì" ; PAPERSIZE_DL ; > ;
+ < "«H«Ê®æ¦¡ #6?3,625 x 6,5 ­^¤o" ; PAPERSIZE_COM675; > ;
+ < "¬ü¦¡«H«Ê 3,875 x 7,5 ­^¤o" ; PAPERSIZE_MONARCH; > ;
+ < "«H«Ê®æ¦¡ #9 3,875 x 8,875 ­^¤o" ; PAPERSIZE_COM9; > ;
+ < "«H«Ê®æ¦¡ #10 4,125 x 9,5 ­^¤o" ; PAPERSIZE_COM10; > ;
+ < "«H«Ê®æ¦¡ #11 4,5 x 10,375 ­^¤o" ; PAPERSIZE_COM11; > ;
+ < "«H«Ê®æ¦¡ #12 4,75 x 11 ­^¤o" ; PAPERSIZE_COM12; > ;
+ < "16 ¶} 184 x 260 ²@¦Ì" ; PAPERSIZE_KAI16; > ;
+ < "32 ¶} 130 x 184 ²@¦Ì" ; PAPERSIZE_KAI32; > ;
+ < "32 ¶} 140 x 203 ²@¦Ì" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ arabic ] =
+ {
+ < "A3 (297 × 420 ãã)" ; PAPERSIZE_A3 ; > ;
+ < "A4 (210 × 297 ãã)" ; PAPERSIZE_A4 ; > ;
+ < "A5 (148 × 210 ãã)" ; PAPERSIZE_A5 ; > ;
+ < "B4 (250 × 353 ãã)" ; PAPERSIZE_B4 ; > ;
+ < "B5 (176 × 250 ãã)" ; PAPERSIZE_B5 ; > ;
+ < "(þ1/2 8 × 11 ÈæÕÉ) Letter" ; PAPERSIZE_LETTER ; > ;
+ < "(þ1/2 8 × 14 ÈæÕÉ) Legal" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "ÍÌã ãÎÕÕ" ; PAPERSIZE_USER ; > ;
+ < "B6 (125 × 176 ãã)" ; PAPERSIZE_B6 ; > ;
+ < "C4 (229 × 324 ãã)" ; PAPERSIZE_C4 ; > ;
+ < "C5 (162 × 229 ãã)" ; PAPERSIZE_C5 ; > ;
+ < "C6 (114 × 162 ãã)" ; PAPERSIZE_C6 ; > ;
+ < "C65 (114 × 227 ãã)" ; PAPERSIZE_C65 ; > ;
+ < "DL (110 × 220 ãã)" ; PAPERSIZE_DL ; > ;
+ < "ÙÑÝ #¾6 3,625 × 6,5 ÈæÕÉ" ; PAPERSIZE_COM675; > ;
+ < "ÙÑÝ Monarch 245×234" ; PAPERSIZE_MONARCH; > ;
+ < "ÙÑÝ #9 3,875 × 8,875 ÈæÕÉ" ; PAPERSIZE_COM9; > ;
+ < "ÙÑÝ #10 4,125 × 9,5 ÈæÕÉ" ; PAPERSIZE_COM10; > ;
+ < "ÙÑÝ #11 4,5 × 10,375 ÈæÕÉ" ; PAPERSIZE_COM11; > ;
+ < "ÙÑÝ #12 4,75 × 11 ÈæÕÉ" ; PAPERSIZE_COM12; > ;
+ < "16 kai (184 × 260 ãã)" ; PAPERSIZE_KAI16; > ;
+ < "32 kai (130 × 184 ãã)" ; PAPERSIZE_KAI32; > ;
+ < "32 kai ßÈíÑ (140 × 203 ãã)" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ greek ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 ÷éë" ; PAPERSIZE_B5 ; > ;
+ < "ÅðéóôïëÞ 8.5 x 11 éíôó." ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8.5 x 14 éíôó." ; PAPERSIZE_LEGAL ; > ;
+ < "Äéóêßï" ; PAPERSIZE_TABLOID ; > ;
+ < "×ñÞóôçò" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 ÷éë" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 ÷éë" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 ÷éë" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 ÷éë" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 ÷éë" ; PAPERSIZE_DL ; > ;
+ < "Öáê. #6¾ 3,625 x 6,5 éíôó." ; PAPERSIZE_COM675; > ;
+ < "Öáê. Monarch 3,875 x 7,5 ßíôóåò" ; PAPERSIZE_MONARCH; > ;
+ < "Öáê. #9 3,875 x 8,875 éíôó." ; PAPERSIZE_COM9; > ;
+ < "Öáê. #10 4,125 x 9,5 éíôó." ; PAPERSIZE_COM10; > ;
+ < "Öáê. #11 4,5 x 10,375 éíôó." ; PAPERSIZE_COM11; > ;
+ < "Öáê.. #12 4,75 x 11 éíôó." ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ korean ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8.5 x 11 ÀÎÄ¡" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8.5 x 14 ÀÎÄ¡" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "»ç¿ëÀÚ" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Envelope #6?3,625 x 6,5 ÀÎÄ¡" ; PAPERSIZE_COM675; > ;
+ < "Envelope Monarch 3,875 x 7,5 ÀÎÄ¡" ; PAPERSIZE_MONARCH; > ;
+ < "Envelope #9 3,875 x 8,875 ÀÎÄ¡" ; PAPERSIZE_COM9; > ;
+ < "Envelope #10 4,125 x 9,5 ÀÎÄ¡" ; PAPERSIZE_COM10; > ;
+ < "Envelope #11 4,5 x 10,375 ÀÎÄ¡" ; PAPERSIZE_COM11; > ;
+ < "Envelope #12 4,75 x 11 ÀÎÄ¡" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai Å©±â140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ turkish ] =
+ {
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Kullanýcý" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Zarf #6¾ 3,625 x 6,5 in" ; PAPERSIZE_COM675; > ;
+ < "Zarf Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Zarf #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Zarf #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Zarf #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Zarf #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai boyu 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ language_user1 ] =
+ {
+ < " " ; PAPERSIZE_A3 ; > ;
+ < " " ; PAPERSIZE_A4 ; > ;
+ < " " ; PAPERSIZE_A5 ; > ;
+ < " " ; PAPERSIZE_B4 ; > ;
+ < " " ; PAPERSIZE_B5 ; > ;
+ < " " ; PAPERSIZE_LETTER ; > ;
+ < " " ; PAPERSIZE_LEGAL ; > ;
+ < " " ; PAPERSIZE_TABLOID ; > ;
+ < " " ; PAPERSIZE_USER ; > ;
+ < " " ; PAPERSIZE_B6 ; > ;
+ < " " ; PAPERSIZE_C4 ; > ;
+ < " " ; PAPERSIZE_C5 ; > ;
+ < " " ; PAPERSIZE_C6 ; > ;
+ < " " ; PAPERSIZE_C65 ; > ;
+ < " " ; PAPERSIZE_DL ; > ;
+ < " " ; PAPERSIZE_COM675; > ;
+ < "Env. Monarch 3,875 x 7,5 in" ; PAPERSIZE_MONARCH; > ;
+ < "Env. #9 3,875 x 8,875 in" ; PAPERSIZE_COM9; > ;
+ < "Env. #10 4,125 x 9,5 in" ; PAPERSIZE_COM10; > ;
+ < "Env. #11 4,5 x 10,375 in" ; PAPERSIZE_COM11; > ;
+ < "Env. #12 4,75 x 11 in" ; PAPERSIZE_COM12; > ;
+ < " " ; PAPERSIZE_KAI16; > ;
+ < " " ; PAPERSIZE_KAI32; > ;
+ < " " ; PAPERSIZE_KAI32BIG; > ;
+ };
+ };
+StringArray RID_SVXSTRARY_PAPERSIZE_DRAW
+{
+ ItemList =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Benutzer" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ /* ### ACHTUNG: Neuer Eintrag in Liste? 17 : C65 114 x 227 mm*/
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Dia" ; PAPERSIZE_DIA ; > ;
+ < "Bildschirm" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ english ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Benutzer" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Dia" ; PAPERSIZE_DIA ; > ;
+ < "Bildschirm" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ portuguese ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Utilizador" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mmm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Diapositivo" ; PAPERSIZE_DIA ; > ;
+ < "Ecrã" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ english_us ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8.5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8.5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "User" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Slide" ; PAPERSIZE_DIA ; > ;
+ < "Screen" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8.5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ portuguese_brazilian ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Benutzer" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mmm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Dia" ; PAPERSIZE_DIA ; > ;
+ < "Bildschirm" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ swedish ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Användare" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mmm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Diabild" ; PAPERSIZE_DIA ; > ;
+ < "Bildskärm" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai stor 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ danish ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Bruger" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Dias" ; PAPERSIZE_DIA ; > ;
+ < "Skærm" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai stor 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ italian ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Utente" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Diapositiva" ; PAPERSIZE_DIA ; > ;
+ < "Schermo" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ spanish ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Carta 8,5 x 11 pulgadas" ; PAPERSIZE_LETTER ; > ;
+ < "Oficio 8,5 x 14 pulgadas" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloide" ; PAPERSIZE_TABLOID ; > ;
+ < "Usuario" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Diapositiva" ; PAPERSIZE_DIA ; > ;
+ < "Pantalla" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 pulgadas" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 pulgadas" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 pulgadas" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 pulgadas" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 pulgadas" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai grande 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ french ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Utilisateur" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mmm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Diapo" ; PAPERSIZE_DIA ; > ;
+ < "Écran" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ itemlist [ dutch ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Gebruiker" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mmm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Dia" ; PAPERSIZE_DIA ; > ;
+ < "Scherm" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groot 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ItemList [ chinese_simplified ] =
+ {
+ < "A0 841 x 1189 ºÁÃ×" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 ºÁÃ×" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 ºÁÃ×" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 ºÁÃ×" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 ºÁÃ×" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 ºÁÃ×" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 ºÁÃ×" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 ºÁÃ×" ; PAPERSIZE_B5 ; > ;
+ < "ÃÀʽ¹æ¸ñ 8,5 x 11 Ó¢´ç" ; PAPERSIZE_LETTER ; > ;
+ < "ÃÀʽ¹æ¸ñ 8,5 x 14 Ó¢´ç" ; PAPERSIZE_LEGAL ; > ;
+ < "ÎÄÕª" ; PAPERSIZE_TABLOID ; > ;
+ < "Óû§É趨" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 ºÁÃ×" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 ºÁÃ×" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 ºÁÃ×" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 ºÁÃ×" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 ºÁÃ×" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 ºÁÃ×" ; PAPERSIZE_DL ; > ;
+ < "»ÃµÆƬ" ; PAPERSIZE_DIA ; > ;
+ < "ÆÁÄ»" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 Ó¢´ç" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 Ó¢´ç" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 Ó¢´ç" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 Ó¢´ç" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 Ó¢´ç" ; PAPERSIZE_E ; > ;
+ < "16 ¿ª 184 x 260 ºÁÃ×" ; PAPERSIZE_KAI16; > ;
+ < "32 ¿ª 130 x 184 ºÁÃ×" ; PAPERSIZE_KAI32; > ;
+ < "32 ¿ª 140 x 203 ºÁÃ×" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ russian ] =
+ {
+ < "A0 841 x 1189 ìì" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 ìì" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 ìì" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 ìì" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 ìì" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 ìì" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 ìì" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 ìì" ; PAPERSIZE_B5 ; > ;
+ < "Ïèñüìî 8,5 x 11 äþéì." ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 äþéì." ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Ïîëüçîâàòåëü" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 ìì" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 ìì" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 ìì" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 ìì" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 ìì" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 ìì" ; PAPERSIZE_DL ; > ;
+ < "Ñëàéä" ; PAPERSIZE_DIA ; > ;
+ < "Ýêðàí" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 äþéì." ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 äþéì." ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 äþéì." ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 äþéì." ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 äþéì." ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 ìì" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 ìì" ; PAPERSIZE_KAI32; > ;
+ < "32 kai áîëüøîé 140 x 203 ìì" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ polish ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 cali" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 cali" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "U¿ytkownik" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Slajd" ; PAPERSIZE_DIA ; > ;
+ < "Ekran" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 cali" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 cali" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 cali" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 cali" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 cali" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai wielkoϾ 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ japanese ] =
+ {
+ < "A0 841x1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594x841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420x594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297x420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210x297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148x210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250x353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176x250 mm" ; PAPERSIZE_B5 ; > ;
+ < "ŽèŽ† 8.5x11 ²ÝÁ" ; PAPERSIZE_LETTER ; > ;
+ < "‹K’軲½Þ8.5x14 ²ÝÁ" ; PAPERSIZE_LEGAL ; > ;
+ < "ÀÌÞÛ²ÄÞ" ; PAPERSIZE_TABLOID ; > ;
+ < "Õ°»Þ°" ; PAPERSIZE_USER ; > ;
+ < "B6 125x176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229x324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162x229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114x162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114x227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110x220 mm" ; PAPERSIZE_DL ; > ;
+ < "½×²ÄÞ" ; PAPERSIZE_DIA ; > ;
+ < "‰æ–Ê" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8.5x11 ²ÝÁ" ; PAPERSIZE_A ; > ;
+ < "B 11x17 ²ÝÁ" ; PAPERSIZE_B ; > ;
+ < "C 17x22 ²ÝÁ" ; PAPERSIZE_C ; > ;
+ < "D 22x34 ²ÝÁ" ; PAPERSIZE_D ; > ;
+ < "E 34x44 ²ÝÁ" ; PAPERSIZE_E ; > ;
+ < "16 kai 184x260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130x184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai‘å 140x203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ chinese_traditional ] =
+ {
+ < "A0 841 x 1189 ²@¦Ì" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 ²@¦Ì" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 ²@¦Ì" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 ²@¦Ì" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 ²@¦Ì" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 ²@¦Ì" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 ²@¦Ì" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 ²@¦Ì" ; PAPERSIZE_B5 ; > ;
+ < "¬ü¦¡³W®æ 8,5 x 11 ­^¤o" ; PAPERSIZE_LETTER ; > ;
+ < "¬ü¦¡³W®æ 8,5 x 14 ­^¤o" ; PAPERSIZE_LEGAL ; > ;
+ < "¤åºK" ; PAPERSIZE_TABLOID ; > ;
+ < "¦Û­q" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 ²@¦Ì" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 ²@¦Ì" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 ²@¦Ì" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 ²@¦Ì" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 ²@¦Ì" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 ²@¦Ì" ; PAPERSIZE_DL ; > ;
+ < "§ë¼v¤ù" ; PAPERSIZE_DIA ; > ;
+ < "¿Ã¹õ" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 ­^¤o" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 ­^¤o" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 ­^¤o" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 ­^¤o" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 ­^¤o" ; PAPERSIZE_E ; > ;
+ < "16 ¶} 184 x 260 ²@¦Ì" ; PAPERSIZE_KAI16; > ;
+ < "32 ¶} 130 x 184 ²@¦Ì" ; PAPERSIZE_KAI32; > ;
+ < "32 ¶} 140 x 203 ²@¦Ì" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ arabic ] =
+ {
+ < "A0 (841 × 1189 ãã)" ; PAPERSIZE_A0 ; > ;
+ < "A1 (594 × 841 ãã)" ; PAPERSIZE_A1 ; > ;
+ < "A2 (420 × 594 ãã)" ; PAPERSIZE_A2 ; > ;
+ < "A3 (297 × 420 ãã)" ; PAPERSIZE_A3 ; > ;
+ < "A4 (210 × 297 ãã)" ; PAPERSIZE_A4 ; > ;
+ < "A5 (148 × 210 ãã)" ; PAPERSIZE_A5 ; > ;
+ < "B4 (250 × 353 ãã)" ; PAPERSIZE_B4 ; > ;
+ < "B5 (176 × 250 ãã)" ; PAPERSIZE_B5 ; > ;
+ < "(þ1/2 8 × 11 ÈæÕÉ) Letter" ; PAPERSIZE_LETTER ; > ;
+ < "(þ1/2 8 × 14 ÈæÕÉ) Legal" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "ÍÌã ãÎÕÕ" ; PAPERSIZE_USER ; > ;
+ < "B6 (125 × 176 ãã)" ; PAPERSIZE_B6 ; > ;
+ < "C4 (229 × 324 ãã)" ; PAPERSIZE_C4 ; > ;
+ < "C5 (162 × 229 ãã)" ; PAPERSIZE_C5 ; > ;
+ < "C6 (114 × 162 ãã)" ; PAPERSIZE_C6 ; > ;
+ < "C65 (114 × 227 ãã)" ; PAPERSIZE_C65 ; > ;
+ < "DL (110 × 220 ãã)" ; PAPERSIZE_DL ; > ;
+ < "ÇáÔÑíÍÉ" ; PAPERSIZE_DIA ; > ;
+ < "ÇáÔÇÔÉ" ; PAPERSIZE_SCREEN ; > ;
+ < "A (þ1/2 8 × 11 ÈæÕÉ)" ; PAPERSIZE_A ; > ;
+ < "B (11 × 17 ÈæÕÉ)" ; PAPERSIZE_B ; > ;
+ < "C (17 × 22 ÈæÕÉ)" ; PAPERSIZE_C ; > ;
+ < "D (22 × 34 ÈæÕÉ)" ; PAPERSIZE_D ; > ;
+ < "E (34 × 44 ÈæÕÉ)" ; PAPERSIZE_E ; > ;
+ < "16 kai (184 × 260 ãã)" ; PAPERSIZE_KAI16; > ;
+ < "32 kai (130 × 184 ãã)" ; PAPERSIZE_KAI32; > ;
+ < "32 kai ßÈíÑ (140 × 203 ãã)" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ greek ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 ÷éë" ; PAPERSIZE_B5 ; > ;
+ < "ÅðéóôïëÞ 8.5 x 11 éíôó." ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8.5 x 14 éíôó." ; PAPERSIZE_LEGAL ; > ;
+ < "Äéóêßï" ; PAPERSIZE_TABLOID ; > ;
+ < "×ñÞóôçò" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 ÷éë" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 ÷éë" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 ÷éë" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 ÷éë" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 ÷éë" ; PAPERSIZE_DL ; > ;
+ < "ÄéáöÜíåéá" ; PAPERSIZE_DIA ; > ;
+ < "Ïèüíç" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8.5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 éíôó." ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai groß 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ korean ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8.5 x 11 ÀÎÄ¡" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8.5 x 14 ÀÎÄ¡" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "»ç¿ëÀÚ" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "½½¶óÀ̵å" ; PAPERSIZE_DIA ; > ;
+ < "È­¸é" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8.5 x 11 ÀÎÄ¡" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 ÀÎÄ¡" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 ÀÎÄ¡" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 ÀÎÄ¡" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 ÀÎÄ¡" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai Å©±â140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ turkish ] =
+ {
+ < "A0 841 x 1189 mm" ; PAPERSIZE_A0 ; > ;
+ < "A1 594 x 841 mm" ; PAPERSIZE_A1 ; > ;
+ < "A2 420 x 594 mm" ; PAPERSIZE_A2 ; > ;
+ < "A3 297 x 420 mm" ; PAPERSIZE_A3 ; > ;
+ < "A4 210 x 297 mm" ; PAPERSIZE_A4 ; > ;
+ < "A5 148 x 210 mm" ; PAPERSIZE_A5 ; > ;
+ < "B4 250 x 353 mm" ; PAPERSIZE_B4 ; > ;
+ < "B5 176 x 250 mm" ; PAPERSIZE_B5 ; > ;
+ < "Letter 8,5 x 11 in" ; PAPERSIZE_LETTER ; > ;
+ < "Legal 8,5 x 14 in" ; PAPERSIZE_LEGAL ; > ;
+ < "Tabloid" ; PAPERSIZE_TABLOID ; > ;
+ < "Kullanýcý" ; PAPERSIZE_USER ; > ;
+ < "B6 125 x 176 mm" ; PAPERSIZE_B6 ; > ;
+ < "C4 229 x 324 mm" ; PAPERSIZE_C4 ; > ;
+ < "C5 162 x 229 mm" ; PAPERSIZE_C5 ; > ;
+ < "C6 114 x 162 mm" ; PAPERSIZE_C6 ; > ;
+ < "C65 114 x 227 mm" ; PAPERSIZE_C65 ; > ;
+ < "DL 110 x 220 mm" ; PAPERSIZE_DL ; > ;
+ < "Slayt" ; PAPERSIZE_DIA ; > ;
+ < "Ekran" ; PAPERSIZE_SCREEN ; > ;
+ < "A 8,5 x 11 in" ; PAPERSIZE_A ; > ;
+ < "B 11 x 17 in" ; PAPERSIZE_B ; > ;
+ < "C 17 x 22 in" ; PAPERSIZE_C ; > ;
+ < "D 22 x 34 in" ; PAPERSIZE_D ; > ;
+ < "E 34 x 44 in" ; PAPERSIZE_E ; > ;
+ < "16 kai 184 x 260 mm" ; PAPERSIZE_KAI16; > ;
+ < "32 kai 130 x 184 mm" ; PAPERSIZE_KAI32; > ;
+ < "32 kai boyu 140 x 203 mm" ; PAPERSIZE_KAI32BIG; > ;
+ };
+ ItemList [ language_user1 ] =
+ {
+ < " " ; PAPERSIZE_A0 ; > ;
+ < " " ; PAPERSIZE_A1 ; > ;
+ < " " ; PAPERSIZE_A2 ; > ;
+ < " " ; PAPERSIZE_A3 ; > ;
+ < " " ; PAPERSIZE_A4 ; > ;
+ < " " ; PAPERSIZE_A5 ; > ;
+ < " " ; PAPERSIZE_B4 ; > ;
+ < " " ; PAPERSIZE_B5 ; > ;
+ < " " ; PAPERSIZE_LETTER ; > ;
+ < " " ; PAPERSIZE_LEGAL ; > ;
+ < " " ; PAPERSIZE_TABLOID ; > ;
+ < " " ; PAPERSIZE_USER ; > ;
+ < " " ; PAPERSIZE_B6 ; > ;
+ < " " ; PAPERSIZE_C4 ; > ;
+ < " " ; PAPERSIZE_C5 ; > ;
+ < " " ; PAPERSIZE_C6 ; > ;
+ < " " ; PAPERSIZE_C65 ; > ;
+ < " " ; PAPERSIZE_DL ; > ;
+ < " " ; PAPERSIZE_DIA ; > ;
+ < " " ; PAPERSIZE_SCREEN ; > ;
+ < " " ; PAPERSIZE_A ; > ;
+ < " " ; PAPERSIZE_B ; > ;
+ < " " ; PAPERSIZE_C ; > ;
+ < " " ; PAPERSIZE_D ; > ;
+ < " " ; PAPERSIZE_E ; > ;
+ < " " ; PAPERSIZE_KAI16; > ;
+ < " " ; PAPERSIZE_KAI32; > ;
+ < " " ; PAPERSIZE_KAI32BIG; > ;
+ };
+ };
+String RID_SVXSTR_PAPERBIN
+{
+ Text = "Schacht" ;
+ Text [ ENGLISH ] = "Tray" ;
+ Text [ norwegian ] = "Skuff" ;
+ Text [ italian ] = "Cassetto" ;
+ Text [ portuguese_brazilian ] = "Bandeja" ;
+ Text [ portuguese ] = "Origem do papel" ;
+ Text [ finnish ] = "Lokero" ;
+ Text [ danish ] = "Papirkilde" ;
+ Text [ french ] = "Bac" ;
+ Text [ swedish ] = "Fack" ;
+ Text [ dutch ] = "Papierlade" ;
+ Text [ spanish ] = "Origen del papel" ;
+ Text [ english_us ] = "Paper source" ;
+ Text[ chinese_simplified ] = "Ö½ÕÅÀ´Ô´";
+ Text[ russian ] = "Ïîäà÷à áóìàãè";
+ Text[ polish ] = "Zasobnik papieru";
+ Text[ japanese ] = "‹‹Ž†•û–@";
+ Text[ chinese_traditional ] = "¯È±i¨Ó·½";
+ Text[ arabic ] = "ÏÑÌ ÇáæÑÞ";
+ Text[ greek ] = "Äßóêïò ÷áñôéïý";
+ Text[ korean ] = "¿ëÁö °ø±Þ";
+ Text[ turkish ] = "Kaðýt kaynaðý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_PAPERBIN_SETTINGS
+{
+ Text = "[Aus Druckereinstellung]" ;
+ Text [ ENGLISH ] = "[From printer settings]" ;
+ Text [ english_us ] = "[From printer settings]" ;
+ Text[ italian ] = "[Da impostazione stampante]";
+ Text[ portuguese_brazilian ] = "[From printer settings]";
+ Text[ portuguese ] = "[da configuração da impressora]";
+ Text[ danish ] = "[Fra udskriftsindstillingerne]";
+ Text[ french ] = "[D'après les paramètres de l'imprimante]";
+ Text[ swedish ] = "[Från skrivarinställning]";
+ Text[ dutch ] = "[Uit printerinstelling]";
+ Text[ spanish ] = "[De la configuración de impresora]";
+ Text[ chinese_simplified ] = "[²ÉÓôòÓ¡»úÉ趨]";
+ Text[ russian ] = "[Èç íàñòðîåê ïðèíòåðà]";
+ Text[ polish ] = "[Z ustawienia drukarki]";
+ Text[ japanese ] = "[ÌßØÝÀ‚ÌÝ’è‚©‚ç]";
+ Text[ greek ] = "[Áðü ñõèìßóåéò åêôõðùôÞ]";
+ Text[ korean ] = "[Àμ⠼³Á¤À¸·Î ºÎÅÍ]";
+ Text[ chinese_traditional ] = "[±Ä¥Î¦Lªí¾÷³]©w]";
+ Text[ arabic ] = "[ãä ÅÚÏÇÏÇÊ ÇáØÇÈÚÉ]";
+ Text[ turkish ] = "[Yazýcý ayarlarýndan]";
+};
+String RID_SVXSTR_FULLSIZE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Seite ganz füllen : Seite ganz f³llen */
+ /* ### ACHTUNG: Neuer Text in Resource? Seite ganz füllen : Seite ganz f³llen */
+ Text = "Seite ganz füllen" ;
+ Text [ ENGLISH ] = "Fill fullsize" ;
+ Text [ dutch ] = "Hele pagina opvullen" ;
+ Text [ english_us ] = "Fill entire page" ;
+ Text [ italian ] = "Pagina intera" ;
+ Text [ spanish ] = "Llenar página completa" ;
+ Text [ french ] = "Remplir toute la page" ;
+ Text [ swedish ] = "Fyll hela sidan" ;
+ Text [ danish ] = "Fyld hele siden" ;
+ Text [ portuguese_brazilian ] = "Seite ganz füllen" ;
+ Text [ portuguese ] = "Página inteira" ;
+ Text[ chinese_simplified ] = "³äÌîÕûÒ³";
+ Text[ russian ] = "Íà âñþ ñòðàíèöó";
+ Text[ polish ] = "Wype³nij ca³¹ stronê";
+ Text[ japanese ] = "Íß°¼Þ‚¢‚Á‚Ï‚¢";
+ Text[ chinese_traditional ] = "¥R¶ñ¾ã­¶";
+ Text[ arabic ] = "ÊÚÈÆÉ ßá ÇáÕÝÍÉ";
+ Text[ greek ] = "ÃÝìéóìá ïëüêëçñçò óåëßäáò";
+ Text[ korean ] = "Àüü ÆäÀÌÁö ä¿ì±â";
+ Text[ turkish ] = "Sayfayý tam doldur";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
new file mode 100644
index 0000000000..00b718feec
--- /dev/null
+++ b/svx/source/dialog/pagectrl.cxx
@@ -0,0 +1,361 @@
+/*************************************************************************
+ *
+ * $RCSfile: pagectrl.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
+
+#define ITEMID_BOX 0
+
+#ifndef _SV_BITMAP_HXX
+#include <vcl/bitmap.hxx>
+#endif
+
+#include "pageitem.hxx"
+#include "pagectrl.hxx"
+#include "boxitem.hxx"
+
+// struct PageWindow_Impl ------------------------------------------------
+
+struct PageWindow_Impl
+{
+ SvxBoxItem* pBorder;
+ Bitmap aBitmap;
+ FASTBOOL bBitmap;
+
+ PageWindow_Impl() : pBorder(0), bBitmap(FALSE) {}
+};
+
+// STATIC DATA -----------------------------------------------------------
+
+#define CELL_WIDTH 1600L
+#define CELL_HEIGHT 800L
+
+// class SvxPageWindow ---------------------------------------------------
+
+SvxPageWindow::SvxPageWindow( Window* pParent, const ResId& rId ) :
+
+ Window( pParent, rId ),
+
+ nTop ( 0 ),
+ nBottom ( 0 ),
+ nLeft ( 0 ),
+ nRight ( 0 ),
+ aColor ( COL_WHITE ),
+ nHdLeft ( 0 ),
+ nHdRight ( 0 ),
+ nHdDist ( 0 ),
+ nHdHeight ( 0 ),
+ aHdColor ( COL_WHITE ),
+ pHdBorder ( 0 ),
+ nFtLeft ( 0 ),
+ nFtRight ( 0 ),
+ nFtDist ( 0 ),
+ nFtHeight ( 0 ),
+ aFtColor ( COL_WHITE ),
+ pFtBorder ( 0 ),
+ bFooter ( FALSE ),
+ bHeader ( FALSE ),
+ bTable ( FALSE ),
+ bHorz ( FALSE ),
+ bVert ( FALSE ),
+ eUsage ( SVX_PAGE_ALL )
+
+{
+ pImpl = new PageWindow_Impl;
+
+ // defaultmaessing in Twips rechnen
+ SetMapMode( MapMode( MAP_TWIP ) );
+ aWinSize = GetOutputSizePixel();
+ aWinSize.Height() -= 4;
+ aWinSize.Width() -= 4;
+
+ aWinSize = PixelToLogic( aWinSize );
+
+ aSolidLineColor = Color( COL_BLACK );
+ aDotLineColor = Color( COL_BLACK );
+ aGrayLineColor = Color( COL_GRAY );
+
+ aNormalFillColor = GetFillColor();
+ aDisabledFillColor = Color( COL_GRAY );
+ aGrayFillColor = Color( COL_LIGHTGRAY );
+}
+
+// -----------------------------------------------------------------------
+
+SvxPageWindow::~SvxPageWindow()
+{
+ delete pImpl;
+ delete pHdBorder;
+ delete pFtBorder;
+}
+
+// -----------------------------------------------------------------------
+
+void __EXPORT SvxPageWindow::Paint( const Rectangle& rRect )
+{
+ Fraction aXScale( aWinSize.Width(), max( aSize.Width() * 2 + aSize.Width() / 8, 1 ) );
+ Fraction aYScale( aWinSize.Height(), max( aSize.Height(), 1 ) );
+ MapMode aMapMode( GetMapMode() );
+
+ if ( aYScale < aXScale )
+ {
+ aMapMode.SetScaleX( aYScale );
+ aMapMode.SetScaleY( aYScale );
+ }
+ else
+ {
+ aMapMode.SetScaleX( aXScale );
+ aMapMode.SetScaleY( aXScale );
+ }
+ SetMapMode( aMapMode );
+ Size aSz( PixelToLogic( GetSizePixel() ) );
+ long nYPos = ( aSz.Height() - aSize.Height() ) / 2;
+
+ if ( eUsage == SVX_PAGE_ALL )
+ {
+ // alle Seiten gleich -> eine Seite malen
+ if ( aSize.Width() > aSize.Height() )
+ {
+ // Querformat in gleicher Gr"osse zeichnen
+ Fraction aX = aMapMode.GetScaleX();
+ Fraction aY = aMapMode.GetScaleY();
+ Fraction a2( 1.5 );
+ aX *= a2;
+ aY *= a2;
+ aMapMode.SetScaleX( aX );
+ aMapMode.SetScaleY( aY );
+ SetMapMode( aMapMode );
+ aSz = PixelToLogic( GetSizePixel() );
+ nYPos = ( aSz.Height() - aSize.Height() ) / 2;
+ long nXPos = ( aSz.Width() - aSize.Width() ) / 2;
+ DrawPage( Point( nXPos, nYPos ), TRUE, TRUE );
+ }
+ else
+ // Hochformat
+ DrawPage( Point( ( aSz.Width() - aSize.Width() ) / 2, nYPos ), TRUE, TRUE );
+ }
+ else
+ {
+ // Linke und rechte Seite unterschiedlich -> ggf. zwei Seiten malen
+ DrawPage( Point( 0, nYPos ), FALSE, (BOOL)( eUsage & SVX_PAGE_LEFT ) );
+ DrawPage( Point( aSize.Width() + aSize.Width() / 8, nYPos ), TRUE,
+ (BOOL)( eUsage & SVX_PAGE_RIGHT ) );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageWindow::DrawPage( const Point& rOrg, const BOOL bSecond, const BOOL bEnabled )
+{
+ // Schatten
+ Size aTempSize = aSize;
+ if ( aTempSize.Height() > aTempSize.Width() )
+ // Beim Hochformat die H"ohe etwas verkleinern, damit der Schatten passt.
+ aTempSize.Height() -= PixelToLogic( Size( 0, 2 ) ).Height();
+ Point aShadowPt( rOrg );
+ aShadowPt += PixelToLogic( Point( 2, 2 ) );
+ SetLineColor( Color( COL_GRAY ) );
+ SetFillColor( Color( COL_GRAY ) );
+ DrawRect( Rectangle( aShadowPt, aTempSize ) );
+
+ // Seite
+ SetLineColor( Color( COL_BLACK ) );
+
+ if ( !bEnabled )
+ {
+ SetFillColor( Color( COL_GRAY ) );
+ DrawRect( Rectangle( rOrg, aTempSize ) );
+ return;
+ }
+
+ SetFillColor( Color( COL_WHITE ) );
+ DrawRect( Rectangle( rOrg, aTempSize ) );
+
+ // Border Top Bottom Left Right
+ Point aBegin( rOrg );
+ Point aEnd( rOrg );
+
+ long nL = nLeft;
+ long nR = nRight;
+
+ if ( eUsage == SVX_PAGE_MIRROR && !bSecond )
+ {
+ // f"ur gespiegelt drehen
+ nL = nRight;
+ nR = nLeft;
+ }
+
+ Rectangle aRect;
+
+ aRect.Left() = rOrg.X() + nL;
+ aRect.Right() = rOrg.X() + aTempSize.Width() - nR;
+ aRect.Top() = rOrg.Y() + nTop;
+ aRect.Bottom()= rOrg.Y() + aTempSize.Height() - nBottom;
+
+ Rectangle aHdRect( aRect );
+ Rectangle aFtRect( aRect );
+
+ if ( bHeader )
+ {
+ // ggf. Header anzeigen
+ aHdRect.Left() += nHdLeft;
+ aHdRect.Right() -= nHdRight;
+ aHdRect.Bottom() = aRect.Top() + nHdHeight;
+ aRect.Top() += nHdHeight + nHdDist;
+ SetFillColor( aHdColor );
+ DrawRect( aHdRect );
+ }
+
+ if ( bFooter )
+ {
+ // ggf. Footer anzeigen
+ aFtRect.Left() += nFtLeft;
+ aFtRect.Right() -= nFtRight;
+ aFtRect.Top() = aRect.Bottom() - nFtHeight;
+ aRect.Bottom() -= nFtHeight + nFtDist;
+ SetFillColor( aFtColor );
+ DrawRect( aFtRect );
+ }
+
+ // Body malen
+ SetFillColor( aColor );
+ if ( pImpl->bBitmap )
+ {
+ DrawRect( aRect );
+ Point aBmpPnt = aRect.TopLeft();
+ Size aBmpSiz = aRect.GetSize();
+ long nDeltaX = aBmpSiz.Width() / 15;
+ long nDeltaY = aBmpSiz.Height() / 15;
+ aBmpPnt.X() += nDeltaX;
+ aBmpPnt.Y() += nDeltaY;
+ aBmpSiz.Width() -= nDeltaX * 2;
+ aBmpSiz.Height() -= nDeltaY * 2;
+ DrawBitmap( aBmpPnt, aBmpSiz, pImpl->aBitmap );
+ }
+ else
+ DrawRect( aRect );
+
+ if ( bTable )
+ {
+ // Tabelle malen, ggf. zentrieren
+ SetLineColor( Color(COL_LIGHTGRAY) );
+
+ long nW = aRect.GetWidth(), nH = aRect.GetHeight();
+ long nTW = CELL_WIDTH * 3, nTH = CELL_HEIGHT * 3;
+ long nLeft = bHorz ? aRect.Left() + ((nW - nTW) / 2) : aRect.Left();
+ long nTop = bVert ? aRect.Top() + ((nH - nTH) / 2) : aRect.Top();
+ Rectangle aCellRect( Point( nLeft, nTop ), Size( CELL_WIDTH, CELL_HEIGHT ) );
+
+ for ( USHORT i = 0; i < 3; ++i )
+ {
+ aCellRect.Left() = nLeft;
+ aCellRect.Right() = nLeft + CELL_WIDTH;
+ if ( i > 0 )
+ aCellRect.Move( 0, CELL_HEIGHT );
+
+ for ( USHORT j = 0; j < 3; ++j )
+ {
+ if ( j > 0 )
+ aCellRect.Move( CELL_WIDTH, 0 );
+ DrawRect( aCellRect );
+ }
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageWindow::SetBorder( const SvxBoxItem& rNew )
+{
+ delete pImpl->pBorder;
+ pImpl->pBorder = new SvxBoxItem( rNew );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageWindow::SetBitmap( Bitmap* pBmp )
+{
+ if ( pBmp )
+ {
+ pImpl->aBitmap = *pBmp;
+ pImpl->bBitmap = TRUE;
+ }
+ else
+ pImpl->bBitmap = FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPageWindow::SetHdBorder( const SvxBoxItem& rNew )
+{
+ delete pHdBorder;
+ pHdBorder = new SvxBoxItem( rNew );
+}
+// -----------------------------------------------------------------------
+
+void SvxPageWindow::SetFtBorder( const SvxBoxItem& rNew )
+{
+ delete pFtBorder;
+ pFtBorder = new SvxBoxItem( rNew );
+}
+
+
diff --git a/svx/source/dialog/paragrph.cxx b/svx/source/dialog/paragrph.cxx
new file mode 100644
index 0000000000..22f467cbe4
--- /dev/null
+++ b/svx/source/dialog/paragrph.cxx
@@ -0,0 +1,2123 @@
+/*************************************************************************
+ *
+ * $RCSfile: paragrph.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 _SFXSTYLE_HXX
+#include <svtools/style.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+#pragma hdrstop
+
+#define ITEMID_LINESPACING 0
+#define ITEMID_ADJUST 0
+#define ITEMID_ORPHANS 0
+#define ITEMID_WIDOWS 0
+#define ITEMID_TABSTOP 0
+#define ITEMID_PAGEMODEL 0
+#define ITEMID_FMTSPLIT 0
+#define ITEMID_HYPHENZONE 0
+#define ITEMID_ULSPACE 0
+#define ITEMID_LRSPACE 0
+#define ITEMID_FMTBREAK 0
+#define ITEMID_FMTKEEP 0
+#define _SVX_PARAGRPH_CXX 0
+
+#include "dialogs.hrc"
+#include "paragrph.hrc"
+#include "paragrph.hxx"
+
+#include "lspcitem.hxx"
+#include "adjitem.hxx"
+#include "orphitem.hxx"
+#include "widwitem.hxx"
+#include "tstpitem.hxx"
+#include "pmdlitem.hxx"
+#include "spltitem.hxx"
+#include "hyznitem.hxx"
+#include "ulspitem.hxx"
+#include "lrspitem.hxx"
+#include "brkitem.hxx"
+#include "keepitem.hxx"
+#include "paractrl.hxx"
+#include "dlgutil.hxx"
+#include "dialmgr.hxx"
+#include "htmlmode.hxx"
+
+// static ----------------------------------------------------------------
+
+static USHORT pStdRanges[] =
+{
+ SID_ATTR_PARA_LINESPACE, // 10033
+ SID_ATTR_PARA_LINESPACE,
+ SID_ATTR_LRSPACE, // 10048 -
+ SID_ATTR_ULSPACE, // 10049
+ SID_ATTR_PARA_REGISTER, // 10413
+ SID_ATTR_PARA_REGISTER,
+ 0
+};
+
+static USHORT pAlignRanges[] =
+{
+ SID_ATTR_PARA_ADJUST, // 10027
+ SID_ATTR_PARA_ADJUST,
+ 0
+};
+
+static USHORT pExtRanges[] =
+{
+ SID_ATTR_PARA_PAGEBREAK, // 10037 -
+ SID_ATTR_PARA_ORPHANS, // 10041
+ SID_ATTR_PARA_MODEL, // 10065 -
+ SID_ATTR_PARA_KEEP, // 10066
+ 0
+};
+
+// define ----------------------------------------------------------------
+
+#define MAX_DURCH 5670 // 10 cm ist sinnvoll als maximaler Durchschuss
+ // laut BP
+#define FIX_DIST_DEF 283 // Standard-Fix-Abstand 0,5cm
+
+// enum ------------------------------------------------------------------
+
+enum LineSpaceList
+{
+ LLINESPACE_1 = 0,
+ LLINESPACE_15 = 1,
+ LLINESPACE_2 = 2,
+ LLINESPACE_PROP = 3,
+ LLINESPACE_MIN = 4,
+ LLINESPACE_DURCH= 5,
+ LLINESPACE_FIX = 6,
+ LLINESPACE_END
+};
+
+// C-Funktion ------------------------------------------------------------
+
+void SetLineSpace_Impl( SvxLineSpacingItem&, int, long lValue = 0 );
+
+void SetLineSpace_Impl( SvxLineSpacingItem& rLineSpace,
+ int eSpace, long lValue )
+{
+ switch ( eSpace )
+ {
+ case LLINESPACE_1:
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
+ break;
+
+ case LLINESPACE_15:
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ rLineSpace.SetPropLineSpace( 150 );
+ break;
+
+ case LLINESPACE_2:
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ rLineSpace.SetPropLineSpace( 200 );
+ break;
+
+ case LLINESPACE_PROP:
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ rLineSpace.SetPropLineSpace( (BYTE)lValue );
+ break;
+
+ case LLINESPACE_MIN:
+ rLineSpace.SetLineHeight( (USHORT)lValue );
+ rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
+ break;
+
+ case LLINESPACE_DURCH:
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ rLineSpace.SetInterLineSpace( (USHORT)lValue );
+ break;
+
+ case LLINESPACE_FIX:
+ rLineSpace.SetLineHeight((USHORT)lValue);
+ rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_FIX;
+ rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
+ break;
+ }
+}
+
+
+USHORT GetHtmlMode_Impl(const SfxItemSet& rSet)
+{
+ 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();
+ }
+ return nHtmlMode;
+
+}
+
+// class SvxStdParagraphTabPage ------------------------------------------
+
+IMPL_LINK( SvxStdParagraphTabPage, ELRLoseFocusHdl, Edit *, EMPTYARG )
+{
+//! if ( aLeftIndent.IsRelativeMode() )
+//! return 0; //!!!
+
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ FieldUnit eUnit =
+ MapToFieldUnit( pPool->GetMetric( GetWhich( SID_ATTR_LRSPACE ) ) );
+
+ long nL = aLeftIndent.Denormalize( aLeftIndent.GetValue( eUnit ) );
+ long nR = aRightIndent.Denormalize( aRightIndent.GetValue( eUnit ) );
+ String aTmp = aFLineIndent.GetText();
+
+ // Erstzeilen Einzug
+ if( aLeftIndent.GetMin() < 0 )
+ aFLineIndent.SetMin( -99999, FUNIT_MM );
+ else
+ aFLineIndent.SetMin( aFLineIndent.Normalize( -nL ), eUnit );
+
+ // Check nur fuer konkrete Breite (Shell)
+ long nTmp = nWidth - nL - nR - MM50;
+ aFLineIndent.SetMax( aFLineIndent.Normalize( nTmp ), eUnit );
+
+ if ( !aTmp.Len() )
+ aFLineIndent.SetEmptyFieldValue();
+ // Maximum Links Rechts
+ aTmp = aLeftIndent.GetText();
+ nTmp = nWidth - nR - MM50;
+ aLeftIndent.SetMax( aLeftIndent.Normalize( nTmp ), eUnit );
+
+ if ( !aTmp.Len() )
+ aLeftIndent.SetEmptyFieldValue();
+ aTmp = aRightIndent.GetText();
+ nTmp = nWidth - nL - MM50;
+ aRightIndent.SetMax( aRightIndent.Normalize( nTmp ), eUnit );
+
+ if ( !aTmp.Len() )
+ aRightIndent.SetEmptyFieldValue();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxStdParagraphTabPage::Create( Window* pParent,
+ const SfxItemSet& rSet)
+{
+ return new SvxStdParagraphTabPage( pParent, rSet );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
+{
+ SfxItemState eState = SFX_ITEM_UNKNOWN;
+ const SfxPoolItem* pOld = 0;
+ SfxItemPool* pPool = rOutSet.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+
+ BOOL bModified = FALSE;
+ USHORT nWhich;
+ USHORT nPos = aLineDist.GetSelectEntryPos();
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nPos &&
+ ( nPos != aLineDist.GetSavedValue() ||
+ aLineDistAtPercentBox.IsValueModified() ||
+ aLineDistAtMetricBox.IsValueModified() ) )
+ {
+ nWhich = GetWhich( SID_ATTR_PARA_LINESPACE );
+ SfxMapUnit eUnit = pPool->GetMetric( nWhich );
+ SvxLineSpacingItem aSpacing(
+ (const SvxLineSpacingItem&)GetItemSet().Get( nWhich ) );
+
+ switch ( nPos )
+ {
+ case LLINESPACE_1:
+ case LLINESPACE_15:
+ case LLINESPACE_2:
+ SetLineSpace_Impl( aSpacing, nPos );
+ break;
+
+ case LLINESPACE_PROP:
+ SetLineSpace_Impl( aSpacing, nPos,
+ aLineDistAtPercentBox.Denormalize(
+ aLineDistAtPercentBox.GetValue() ) );
+ break;
+
+ case LLINESPACE_MIN:
+ case LLINESPACE_DURCH:
+ case LLINESPACE_FIX:
+ SetLineSpace_Impl( aSpacing, nPos,
+ GetCoreValue( aLineDistAtMetricBox, eUnit ) );
+ break;
+
+ default:
+ DBG_ERROR( "unbekannter Type fuer Zeilenabstand." );
+ break;
+ }
+ eState = GetItemSet().GetItemState( nWhich );
+ pOld = GetOldItem( rOutSet, SID_ATTR_PARA_LINESPACE );
+
+ if ( !pOld || !( *(const SvxLineSpacingItem*)pOld == aSpacing ) ||
+ SFX_ITEM_DONTCARE == eState )
+ {
+ rOutSet.Put( aSpacing );
+ bModified |= TRUE;
+ }
+ }
+
+ if ( aTopDist.IsValueModified() || aBottomDist.IsValueModified() )
+ {
+ nWhich = GetWhich( SID_ATTR_ULSPACE );
+ SfxMapUnit eUnit = pPool->GetMetric( nWhich );
+ pOld = GetOldItem( rOutSet, SID_ATTR_ULSPACE );
+ SvxULSpaceItem aMargin( nWhich );
+
+ if ( bRelativeMode )
+ {
+ DBG_ASSERT( GetItemSet().GetParent(), "No ParentSet" );
+
+ const SvxULSpaceItem& rOldItem =
+ (const SvxULSpaceItem&)GetItemSet().GetParent()->Get( nWhich );
+
+ if ( aTopDist.IsRelative() )
+ aMargin.SetUpper( rOldItem.GetUpper(),
+ (USHORT)aTopDist.GetValue() );
+ else
+ aMargin.SetUpper( (USHORT)GetCoreValue( aTopDist, eUnit ) );
+
+ if ( aBottomDist.IsRelative() )
+ aMargin.SetLower( rOldItem.GetLower(),
+ (USHORT)aBottomDist.GetValue() );
+ else
+ aMargin.SetLower( (USHORT)GetCoreValue( aBottomDist, eUnit ) );
+
+ }
+ else
+ {
+ aMargin.SetUpper( (USHORT)GetCoreValue( aTopDist, eUnit ) );
+ aMargin.SetLower( (USHORT)GetCoreValue( aBottomDist, eUnit ) );
+ }
+ eState = GetItemSet().GetItemState( nWhich );
+
+ if ( !pOld || !( *(const SvxULSpaceItem*)pOld == aMargin ) ||
+ SFX_ITEM_DONTCARE == eState )
+ {
+ rOutSet.Put( aMargin );
+ bModified |= TRUE;
+ }
+ }
+ FASTBOOL bNullTab = FALSE;
+
+ if ( aLeftIndent.IsValueModified() ||
+ aFLineIndent.IsValueModified() ||
+ aRightIndent.IsValueModified()
+ || aAutoCB.GetSavedValue() != aAutoCB.IsChecked() )
+ {
+ nWhich = GetWhich( SID_ATTR_LRSPACE );
+ SfxMapUnit eUnit = pPool->GetMetric( nWhich );
+ SvxLRSpaceItem aMargin( nWhich );
+ pOld = GetOldItem( rOutSet, SID_ATTR_LRSPACE );
+
+ if ( bRelativeMode )
+ {
+ DBG_ASSERT( GetItemSet().GetParent(), "No ParentSet" );
+
+ const SvxLRSpaceItem& rOldItem =
+ (const SvxLRSpaceItem&)GetItemSet().GetParent()->Get( nWhich );
+
+ if ( aLeftIndent.IsRelative() )
+ aMargin.SetTxtLeft( rOldItem.GetTxtLeft(),
+ aLeftIndent.GetValue() );
+ else
+ aMargin.SetTxtLeft( GetCoreValue( aLeftIndent, eUnit ) );
+
+ if ( aRightIndent.IsRelative() )
+ aMargin.SetRight( rOldItem.GetRight(),
+ aRightIndent.GetValue() );
+ else
+ aMargin.SetRight( GetCoreValue( aRightIndent, eUnit ) );
+
+ if ( aFLineIndent.IsRelative() )
+ aMargin.SetTxtFirstLineOfst( rOldItem.GetTxtFirstLineOfst(),
+ (USHORT)aFLineIndent.GetValue() );
+ else
+ aMargin.SetTxtFirstLineOfst(
+ (USHORT)GetCoreValue( aFLineIndent, eUnit ) );
+ }
+ else
+ {
+ aMargin.SetTxtLeft( GetCoreValue( aLeftIndent, eUnit ) );
+ aMargin.SetRight( GetCoreValue( aRightIndent, eUnit ) );
+ aMargin.SetTxtFirstLineOfst(
+ (USHORT)GetCoreValue( aFLineIndent, eUnit ) );
+ }
+ aMargin.SetAutoFirst(aAutoCB.IsChecked());
+ if ( aMargin.GetTxtFirstLineOfst() < 0 )
+ bNullTab = TRUE;
+ eState = GetItemSet().GetItemState( nWhich );
+
+ if ( !pOld || !( *(const SvxLRSpaceItem*)pOld == aMargin ) ||
+ SFX_ITEM_DONTCARE == eState )
+ {
+ rOutSet.Put( aMargin );
+ bModified |= TRUE;
+ }
+ }
+
+ if ( bNullTab )
+ {
+ // negativer Erstzeileneinzug -> ggf. Null Default-Tabstop setzen
+ USHORT nWhich = GetWhich( SID_ATTR_TABSTOP );
+ const SfxItemSet& rInSet = GetItemSet();
+
+ if ( rInSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxTabStopItem& rTabItem =
+ (const SvxTabStopItem&)rInSet.Get( nWhich );
+ SvxTabStopItem aNullTab( rTabItem );
+ SvxTabStop aNull( 0, SVX_TAB_ADJUST_DEFAULT );
+ aNullTab.Insert( aNull );
+ rOutSet.Put( aNullTab );
+ }
+ }
+ if( aRegisterCB.IsVisible())
+ {
+ const SfxBoolItem* pBoolItem = (SfxBoolItem*)GetOldItem(
+ rOutSet, SID_ATTR_PARA_REGISTER);
+ SfxBoolItem* pRegItem = (SfxBoolItem*)pBoolItem->Clone();
+ USHORT nWhich = GetWhich( SID_ATTR_PARA_REGISTER );
+ BOOL bSet = pRegItem->GetValue();
+
+ if(aRegisterCB.IsChecked() != bSet )
+ {
+ pRegItem->SetValue(!bSet);
+ rOutSet.Put(*pRegItem);
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == GetItemSet().GetItemState( nWhich, FALSE ) )
+ rOutSet.ClearItem(nWhich);
+ delete pRegItem;
+ }
+
+ return bModified;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet )
+{
+ SfxItemPool* pPool = rSet.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool?" );
+ String aEmpty;
+
+ // Metrik einstellen
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+ SetFieldUnit( aLeftIndent, eFUnit );
+ SetFieldUnit( aRightIndent, eFUnit );
+ SetFieldUnit( aFLineIndent, eFUnit );
+ SetFieldUnit( aTopDist, eFUnit );
+ SetFieldUnit( aBottomDist, eFUnit );
+ SetFieldUnit( aLineDistAtMetricBox, eFUnit );
+
+ USHORT nWhich = GetWhich( SID_ATTR_LRSPACE );
+ SfxItemState eItemState = rSet.GetItemState( nWhich );
+
+ if ( eItemState >= SFX_ITEM_AVAILABLE )
+ {
+ SfxMapUnit eUnit = pPool->GetMetric( nWhich );
+
+ if ( bRelativeMode )
+ {
+ const SvxLRSpaceItem& rOldItem =
+ (const SvxLRSpaceItem&)rSet.Get( nWhich );
+
+ if ( rOldItem.GetPropLeft() != 100 )
+ {
+ aLeftIndent.SetRelative( TRUE );
+ aLeftIndent.SetValue( rOldItem.GetPropLeft() );
+ }
+ else
+ {
+ aLeftIndent.SetRelative();
+ SetFieldUnit( aLeftIndent, eFUnit );
+ SetMetricValue( aLeftIndent, rOldItem.GetTxtLeft(), eUnit );
+ }
+
+ if ( rOldItem.GetPropRight() != 100 )
+ {
+ aRightIndent.SetRelative( TRUE );
+ aRightIndent.SetValue( rOldItem.GetPropRight() );
+ }
+ else
+ {
+ aRightIndent.SetRelative();
+ SetFieldUnit( aRightIndent, eFUnit );
+ SetMetricValue( aRightIndent, rOldItem.GetRight(), eUnit );
+ }
+
+ if ( rOldItem.GetPropTxtFirstLineOfst() != 100 )
+ {
+ aFLineIndent.SetRelative( TRUE );
+ aFLineIndent.SetValue( rOldItem.GetPropTxtFirstLineOfst() );
+ }
+ else
+ {
+ aFLineIndent.SetRelative();
+ aFLineIndent.SetMin(-9999);
+ SetFieldUnit( aFLineIndent, eFUnit );
+ SetMetricValue( aFLineIndent, rOldItem.GetTxtFirstLineOfst(),
+ eUnit );
+ }
+ aAutoCB.Check(rOldItem.IsAutoFirst());
+ }
+ else
+ {
+ const SvxLRSpaceItem& rSpace =
+ (const SvxLRSpaceItem&)rSet.Get( nWhich );
+
+ SetMetricValue( aLeftIndent, rSpace.GetTxtLeft(), eUnit );
+ SetMetricValue( aRightIndent, rSpace.GetRight(), eUnit );
+ SetMetricValue( aFLineIndent, rSpace.GetTxtFirstLineOfst(), eUnit );
+ aAutoCB.Check(rSpace.IsAutoFirst());
+ }
+ AutoHdl_Impl(&aAutoCB);
+ }
+ else
+ {
+ aLeftIndent.SetEmptyFieldValue();
+ aRightIndent.SetEmptyFieldValue();
+ aFLineIndent.SetEmptyFieldValue();
+ }
+
+ nWhich = GetWhich( SID_ATTR_ULSPACE );
+ eItemState = rSet.GetItemState( nWhich );
+
+ if ( eItemState >= SFX_ITEM_AVAILABLE )
+ {
+ SfxMapUnit eUnit = pPool->GetMetric( nWhich );
+
+ if ( bRelativeMode )
+ {
+ const SvxULSpaceItem& rOldItem =
+ (const SvxULSpaceItem&)rSet.Get( nWhich );
+
+ if ( rOldItem.GetPropUpper() != 100 )
+ {
+ aTopDist.SetRelative( TRUE );
+ aTopDist.SetValue( rOldItem.GetPropUpper() );
+ }
+ else
+ {
+ aTopDist.SetRelative();
+ SetFieldUnit( aTopDist, eFUnit );
+ SetMetricValue( aTopDist, rOldItem.GetUpper(), eUnit );
+ }
+
+ if ( rOldItem.GetPropLower() != 100 )
+ {
+ aBottomDist.SetRelative( TRUE );
+ aBottomDist.SetValue( rOldItem.GetPropLower() );
+ }
+ else
+ {
+ aBottomDist.SetRelative();
+ SetFieldUnit( aBottomDist, eFUnit );
+ SetMetricValue( aBottomDist, rOldItem.GetLower(), eUnit );
+ }
+ }
+ else
+ {
+ const SvxULSpaceItem& rTopMargin =
+ (const SvxULSpaceItem&)rSet.Get( nWhich );
+ SetMetricValue( aTopDist, rTopMargin.GetUpper(), eUnit );
+ SetMetricValue( aBottomDist, rTopMargin.GetLower(), eUnit );
+ }
+ }
+ else
+ {
+ aTopDist.SetEmptyFieldValue();
+ aBottomDist.SetEmptyFieldValue();
+ }
+
+ nWhich = GetWhich( SID_ATTR_PARA_LINESPACE );
+ eItemState = rSet.GetItemState( nWhich );
+
+ if ( eItemState >= SFX_ITEM_AVAILABLE )
+ SetLineSpacing_Impl( (const SvxLineSpacingItem &)rSet.Get( nWhich ) );
+ else
+ aLineDist.SetNoSelection();
+
+
+ nWhich = GetWhich( SID_ATTR_PARA_REGISTER );
+ eItemState = rSet.GetItemState( nWhich );
+
+ if ( eItemState >= SFX_ITEM_AVAILABLE )
+ aRegisterCB.Check( ((const SfxBoolItem &)rSet.Get( nWhich )).GetValue());
+ aRegisterCB.SaveValue();
+ USHORT nHtmlMode = GetHtmlMode_Impl(rSet);
+ if(nHtmlMode & HTMLMODE_ON)
+ {
+ aRegisterCB.Hide();
+ aRegisterGB.Hide();
+ aAutoCB.Hide();
+ if(!(nHtmlMode & HTMLMODE_SOME_STYLES)) // IE oder SW
+ {
+ aRightLabel.Disable();
+ aRightIndent.Disable();
+ aTopDist.Disable(); //HTML3.2 und NS 3.0
+ aBottomDist.Disable();
+ if(!(nHtmlMode & HTMLMODE_FIRSTLINE)) //NS 3.0
+ {
+ aFLineIndent.Disable();
+ aFLineLabel.Disable();
+ }
+ }
+ }
+
+ ELRLoseFocusHdl( NULL );
+ aAutoCB.SaveValue();
+ aLineDist.SaveValue();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStdParagraphTabPage::EnableRelativeMode()
+{
+ DBG_ASSERT( GetItemSet().GetParent(), "RelativeMode, but no parent-set!" );
+
+ aLeftIndent.EnableRelativeMode( 0, 999 );
+ aFLineIndent.EnableRelativeMode( 0, 999 );
+ aRightIndent.EnableRelativeMode( 0, 999 );
+ aTopDist.EnableRelativeMode( 0, 999 );
+ aBottomDist.EnableRelativeMode( 0, 999 );
+ bRelativeMode = TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxStdParagraphTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ ELRLoseFocusHdl( NULL );
+
+ if ( pSet )
+ FillItemSet( *pSet );
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+SvxStdParagraphTabPage::SvxStdParagraphTabPage( Window* pParent,
+ const SfxItemSet& rAttr ) :
+
+ SfxTabPage( pParent, ResId( RID_SVXPAGE_STD_PARAGRAPH, DIALOG_MGR() ), rAttr ),
+
+ aLeftLabel ( this, ResId( FT_LEFTINDENT ) ),
+ aLeftIndent ( this, ResId( ED_LEFTINDENT ) ),
+ aFLineLabel ( this, ResId( FT_FLINEINDENT ) ),
+ aFLineIndent ( this, ResId( ED_FLINEINDENT ) ),
+ aAutoCB ( this, ResId( CB_AUTO ) ),
+ aRightLabel ( this, ResId( FT_RIGHTINDENT ) ),
+ aRightIndent ( this, ResId( ED_RIGHTINDENT ) ),
+ aIndentFrm ( this, ResId( GB_INDENT ) ),
+ aTopLabel ( this, ResId( FT_TOPDIST ) ),
+ aTopDist ( this, ResId( ED_TOPDIST ) ),
+ aBottomLabel ( this, ResId( FT_BOTTOMDIST ) ),
+ aBottomDist ( this, ResId( ED_BOTTOMDIST ) ),
+ aDistFrm ( this, ResId( GB_DIST ) ),
+ aLineDist ( this, ResId( LB_LINEDIST ) ),
+ aLineDistAtLabel ( this, ResId( FT_LINEDIST ) ),
+ aLineDistAtPercentBox ( this, ResId( ED_LINEDISTPERCENT ) ),
+ aLineDistAtMetricBox ( this, ResId( ED_LINEDISTMETRIC ) ),
+ aLineDistFrm ( this, ResId( GB_LINEDIST ) ),
+ aExampleWin ( this, ResId( WN_EXAMPLE ) ),
+ aExampleFrm ( this, ResId( GB_EXAMPLE ) ),
+ aRegisterCB ( this, ResId( CB_REGISTER ) ),
+ aRegisterGB ( this, ResId( GB_REGISTER ) ),
+ sAbsDist ( ResId(ST_LINEDIST_ABS) ),
+ nMinFixDist(0L),
+
+ nAbst ( MAX_DURCH ),
+ nWidth ( 11905 /*567 * 50*/ ),
+ pActLineDistFld ( &aLineDistAtPercentBox ),
+ bRelativeMode ( FALSE )
+
+{
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ aLineDistAtMetricBox.Hide();
+ FreeResource();
+ Init_Impl();
+ aFLineIndent.SetMin(-9999); // wird default auf 0 gesetzt
+}
+
+
+// -----------------------------------------------------------------------
+
+void SvxStdParagraphTabPage::EnableNegativeMode()
+{
+ aLeftIndent.SetMin(-9999);
+ aRightIndent.SetMin(-9999);
+}
+
+// -----------------------------------------------------------------------
+
+USHORT* SvxStdParagraphTabPage::GetRanges()
+{
+ return pStdRanges;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStdParagraphTabPage::SetLineSpacing_Impl
+(
+ const SvxLineSpacingItem &rAttr
+)
+{
+ SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( rAttr.Which() );
+
+ switch( rAttr.GetLineSpaceRule() )
+ {
+ case SVX_LINE_SPACE_AUTO:
+ {
+ SvxInterLineSpace eInter = rAttr.GetInterLineSpaceRule();
+
+ switch( eInter )
+ {
+ // Default einzeilig
+ case SVX_INTER_LINE_SPACE_OFF:
+ aLineDist.SelectEntryPos( LLINESPACE_1 );
+ break;
+
+ // Default einzeilig
+ case SVX_INTER_LINE_SPACE_PROP:
+ if ( 100 == rAttr.GetPropLineSpace() )
+ {
+ aLineDist.SelectEntryPos( LLINESPACE_1 );
+ break;
+ }
+ // 1.5zeilig
+ if ( 150 == rAttr.GetPropLineSpace() )
+ {
+ aLineDist.SelectEntryPos( LLINESPACE_15 );
+ break;
+ }
+ // 2zeilig
+ if ( 200 == rAttr.GetPropLineSpace() )
+ {
+ aLineDist.SelectEntryPos( LLINESPACE_2 );
+ break;
+ }
+ // eingestellter Prozentwert
+ aLineDistAtPercentBox.
+ SetValue( aLineDistAtPercentBox.Normalize(
+ rAttr.GetPropLineSpace() ) );
+ aLineDist.SelectEntryPos( LLINESPACE_PROP );
+ break;
+
+ case SVX_INTER_LINE_SPACE_FIX:
+ SetMetricValue( aLineDistAtMetricBox,
+ rAttr.GetInterLineSpace(), eUnit );
+ aLineDist.SelectEntryPos( LLINESPACE_DURCH );
+ break;
+ }
+ }
+ break;
+ case SVX_LINE_SPACE_FIX:
+ SetMetricValue(aLineDistAtMetricBox, rAttr.GetLineHeight(), eUnit);
+ aLineDist.SelectEntryPos( LLINESPACE_FIX );
+ break;
+
+ case SVX_LINE_SPACE_MIN:
+ SetMetricValue(aLineDistAtMetricBox, rAttr.GetLineHeight(), eUnit);
+ aLineDist.SelectEntryPos( LLINESPACE_MIN );
+ break;
+ }
+ LineDistHdl_Impl( &aLineDist );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox *, pBox )
+{
+ switch( pBox->GetSelectEntryPos() )
+ {
+ case LLINESPACE_1:
+ case LLINESPACE_15:
+ case LLINESPACE_2:
+ aLineDistAtLabel.Enable(FALSE);
+ pActLineDistFld->Enable(FALSE);
+ pActLineDistFld->SetText( String() );
+ break;
+
+ case LLINESPACE_DURCH:
+ // Setzen eines sinnvollen Defaults?
+ // MS Begrenzen min(10, aPageSize)
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld = &aLineDistAtMetricBox;
+ aLineDistAtMetricBox.SetMin(0);
+
+
+ if ( !aLineDistAtMetricBox.GetText().Len() )
+ aLineDistAtMetricBox.SetValue(
+ aLineDistAtMetricBox.Normalize( 1 ) );
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld->Show();
+ pActLineDistFld->Enable();
+ aLineDistAtLabel.Enable();
+ break;
+
+ case LLINESPACE_MIN:
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld = &aLineDistAtMetricBox;
+ aLineDistAtMetricBox.SetMin(0);
+
+ if ( !aLineDistAtMetricBox.GetText().Len() )
+ aLineDistAtMetricBox.SetValue(
+ aLineDistAtMetricBox.Normalize( 10 ), FUNIT_TWIP );
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld->Show();
+ pActLineDistFld->Enable();
+ aLineDistAtLabel.Enable();
+ break;
+
+ case LLINESPACE_PROP:
+ aLineDistAtMetricBox.Hide();
+ pActLineDistFld = &aLineDistAtPercentBox;
+
+ if ( !aLineDistAtPercentBox.GetText().Len() )
+ aLineDistAtPercentBox.SetValue(
+ aLineDistAtPercentBox.Normalize( 100 ), FUNIT_TWIP );
+ aLineDistAtMetricBox.Hide();
+ pActLineDistFld->Show();
+ pActLineDistFld->Enable();
+ aLineDistAtLabel.Enable();
+ break;
+ case LLINESPACE_FIX:
+ {
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld = &aLineDistAtMetricBox;
+ long nTemp = aLineDistAtMetricBox.GetValue();
+ aLineDistAtMetricBox.SetMin(aLineDistAtMetricBox.Normalize(nMinFixDist), FUNIT_TWIP);
+
+ // wurde der Wert beim SetMin veraendert, dann ist es Zeit
+ // fuer den default
+ if ( aLineDistAtMetricBox.GetValue() != nTemp )
+ SetMetricValue( aLineDistAtMetricBox,
+ FIX_DIST_DEF, SFX_MAPUNIT_TWIP ); // fix gibt's nur im Writer
+ aLineDistAtPercentBox.Hide();
+ pActLineDistFld->Show();
+ pActLineDistFld->Enable();
+ aLineDistAtLabel.Enable();
+ }
+ break;
+ }
+ UpdateExample_Impl( TRUE );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxStdParagraphTabPage, ModifyHdl_Impl, SvxRelativeField *, EMPTYARG )
+{
+ UpdateExample_Impl();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxStdParagraphTabPage, ModifyHdl_Impl, SvxRelativeField *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+void SvxStdParagraphTabPage::Init_Impl()
+{
+ aLineDist.SetSelectHdl(
+ LINK( this, SvxStdParagraphTabPage, LineDistHdl_Impl ) );
+
+ Link aLink = LINK( this, SvxStdParagraphTabPage, ELRLoseFocusHdl );
+ aFLineIndent.SetLoseFocusHdl( aLink );
+ aLeftIndent.SetLoseFocusHdl( aLink );
+ aRightIndent.SetLoseFocusHdl( aLink );
+
+ aLink = LINK( this, SvxStdParagraphTabPage, ModifyHdl_Impl );
+ aFLineIndent.SetModifyHdl( aLink );
+ aLeftIndent.SetModifyHdl( aLink );
+ aRightIndent.SetModifyHdl( aLink );
+ aTopDist.SetModifyHdl( aLink );
+ aBottomDist.SetModifyHdl( aLink );
+
+ aAutoCB.SetClickHdl( LINK( this, SvxStdParagraphTabPage, AutoHdl_Impl ));
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ FieldUnit eUnit =
+ MapToFieldUnit( pPool->GetMetric( GetWhich( SID_ATTR_LRSPACE ) ) );
+
+ aTopDist.SetMax( aTopDist.Normalize( nAbst ), eUnit );
+ aBottomDist.SetMax( aBottomDist.Normalize( nAbst ), eUnit );
+ aLineDistAtMetricBox.SetMax(
+ aLineDistAtMetricBox.Normalize( nAbst ), eUnit );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll )
+{
+ aExampleWin.SetFirstLineOfst(
+ (short)aFLineIndent.Denormalize( aFLineIndent.GetValue( FUNIT_TWIP ) ) );
+ aExampleWin.SetLeftMargin(
+ aLeftIndent.Denormalize( aLeftIndent.GetValue( FUNIT_TWIP ) ) );
+ aExampleWin.SetRightMargin(
+ aRightIndent.Denormalize( aRightIndent.GetValue( FUNIT_TWIP ) ) );
+ aExampleWin.SetUpper(
+ (USHORT)aTopDist.Denormalize( aTopDist.GetValue( FUNIT_TWIP ) ) );
+ aExampleWin.SetLower(
+ (USHORT)aBottomDist.Denormalize( aBottomDist.GetValue( FUNIT_TWIP ) ) );
+
+
+
+ USHORT nPos = aLineDist.GetSelectEntryPos();
+
+ switch ( nPos )
+ {
+ case LLINESPACE_1:
+ case LLINESPACE_15:
+ case LLINESPACE_2:
+ aExampleWin.SetLineSpace( (SvxPrevLineSpace)nPos );
+ break;
+
+ case LLINESPACE_PROP:
+ aExampleWin.SetLineSpace( (SvxPrevLineSpace)nPos,
+ (USHORT)aLineDistAtPercentBox.Denormalize(
+ aLineDistAtPercentBox.GetValue() ) );
+ break;
+
+ case LLINESPACE_MIN:
+ case LLINESPACE_DURCH:
+ case LLINESPACE_FIX:
+ aExampleWin.SetLineSpace( (SvxPrevLineSpace)nPos,
+ (USHORT)GetCoreValue( aLineDistAtMetricBox, SFX_MAPUNIT_TWIP ) );
+ break;
+ }
+ aExampleWin.Draw( bAll );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStdParagraphTabPage::EnableRegisterMode()
+{
+ aRegisterCB.Show();
+ aRegisterGB.Show();
+ Size aExWinSz = aExampleWin.GetOutputSizePixel();
+ Size aExFrmSz = aExampleFrm.GetOutputSizePixel();
+ Size aRegSz = aRegisterGB.GetOutputSizePixel();
+ long nWinDiff = aExFrmSz.Height() - aExWinSz.Height();
+ long nYOffset = aExampleFrm.GetPosPixel().Y();
+
+ aExFrmSz.Height() = aDistFrm.GetPosPixel().Y() + aDistFrm.GetSizePixel().Height() - nYOffset;
+ aExWinSz.Height() = aExFrmSz.Height() - nWinDiff;
+
+ aExampleWin.SetOutputSizePixel(aExWinSz);
+ aExampleFrm.SetOutputSizePixel(aExFrmSz);
+ aExampleWin.OutputSizeChanged();
+
+}
+
+/*-----------------16.01.97 19.54-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxStdParagraphTabPage, AutoHdl_Impl, CheckBox*, pBox )
+{
+ BOOL bEnable = !pBox->IsChecked();
+ aFLineLabel .Enable(bEnable);
+ aFLineIndent.Enable(bEnable);
+ return 0;
+}
+
+/*-----------------16.01.97 18.00-------------------
+
+--------------------------------------------------*/
+void SvxStdParagraphTabPage::SetPageWidth( USHORT nPageWidth )
+{
+ nWidth = nPageWidth;
+}
+/*-----------------16.01.97 18.01-------------------
+
+--------------------------------------------------*/
+void SvxStdParagraphTabPage::SetMaxDistance( USHORT nMaxDist )
+{
+ nAbst = nMaxDist;
+}
+
+/*-----------------17.01.97 08.11-------------------
+
+--------------------------------------------------*/
+void SvxStdParagraphTabPage::EnableAutoFirstLine()
+{
+ aAutoCB.Show();
+}
+
+/*-----------------11.06.97 11.48-------------------
+ absoluter Zeilenabstand
+--------------------------------------------------*/
+void SvxStdParagraphTabPage::EnableAbsLineDist(long nMinTwip)
+{
+ aLineDist.InsertEntry(sAbsDist);
+ nMinFixDist = nMinTwip;
+}
+
+
+// class SvxParaAlignTabPage ------------------------------------------------
+
+/*-----------------16.01.97 19.34-------------------
+
+--------------------------------------------------*/
+SvxParaAlignTabPage::SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSet )
+ : SfxTabPage(pParent, ResId( RID_SVXPAGE_ALIGN_PARAGRAPH, DIALOG_MGR() ),rSet),
+ aLeft ( this, ResId( BTN_LEFTALIGN ) ),
+ aRight ( this, ResId( BTN_RIGHTALIGN ) ),
+ aCenter ( this, ResId( BTN_CENTERALIGN ) ),
+ aJustify ( this, ResId( BTN_JUSTIFYALIGN ) ),
+ aAlignFrm ( this, ResId( GB_ALIGN ) ),
+ aLastLineFT ( this, ResId( FT_LASTLINE ) ),
+ aLastLineLB ( this, ResId( LB_LASTLINE ) ),
+ aExpandCB ( this, ResId( CB_EXPAND ) ),
+ aExampleWin ( this, ResId( WN_EXAMPLE ) ),
+ aExampleFrm ( this, ResId( GB_EXAMPLE ) )
+{
+ FreeResource();
+ Link aLink = LINK( this, SvxParaAlignTabPage, AlignHdl_Impl );
+ aLeft.SetClickHdl( aLink );
+ aRight.SetClickHdl( aLink );
+ aCenter.SetClickHdl( aLink );
+ aJustify.SetClickHdl( aLink );
+}
+
+/*-----------------16.01.97 19.33-------------------
+
+--------------------------------------------------*/
+SvxParaAlignTabPage::~SvxParaAlignTabPage()
+{
+}
+
+/*-----------------16.01.97 19.33-------------------
+
+--------------------------------------------------*/
+int SvxParaAlignTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( pSet )
+ FillItemSet( *pSet );
+ return LEAVE_PAGE;
+}
+
+/*-----------------16.01.97 19.33-------------------
+
+--------------------------------------------------*/
+SfxTabPage* SvxParaAlignTabPage::Create( Window* pParent, const SfxItemSet& rSet )
+{
+ return new SvxParaAlignTabPage(pParent, rSet);
+}
+
+/*-----------------16.01.97 19.33-------------------
+
+--------------------------------------------------*/
+USHORT* SvxParaAlignTabPage::GetRanges()
+{
+ return pAlignRanges;
+
+}
+
+/*-----------------16.01.97 19.33-------------------
+
+--------------------------------------------------*/
+BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet )
+{
+ BOOL bModified = FALSE;
+
+ FASTBOOL bAdj = FALSE, bChecked = FALSE;
+ SvxAdjust eAdjust = SVX_ADJUST_LEFT;
+
+ if ( aLeft.IsChecked() )
+ {
+ eAdjust = SVX_ADJUST_LEFT;
+ bAdj = !aLeft.GetSavedValue();
+ bChecked = TRUE;
+ }
+ else if ( aRight.IsChecked() )
+ {
+ eAdjust = SVX_ADJUST_RIGHT;
+ bAdj = !aRight.GetSavedValue();
+ bChecked = TRUE;
+ }
+ else if ( aCenter.IsChecked() )
+ {
+ eAdjust = SVX_ADJUST_CENTER;
+ bAdj = !aCenter.GetSavedValue();
+ bChecked = TRUE;
+ }
+ else if ( aJustify.IsChecked() )
+ {
+ eAdjust = SVX_ADJUST_BLOCK;
+ bAdj = !aJustify.GetSavedValue() ||
+ aExpandCB.IsChecked() != aExpandCB.GetSavedValue() ||
+ aLastLineLB.GetSelectEntryPos() != aLastLineLB.GetSavedValue();
+ bChecked = TRUE;
+ }
+ USHORT nWhich = GetWhich( SID_ATTR_PARA_ADJUST );
+
+ if ( bAdj )
+ {
+ const SvxAdjustItem* pOld =
+ (const SvxAdjustItem*)GetOldItem( rOutSet, SID_ATTR_PARA_ADJUST );
+ SvxAdjust eOneWord = aExpandCB.IsChecked() ? SVX_ADJUST_BLOCK
+ : SVX_ADJUST_LEFT;
+ USHORT nLBPos = aLastLineLB.GetSelectEntryPos();
+ SvxAdjust eLastBlock = SVX_ADJUST_LEFT;
+
+ if ( 1 == nLBPos )
+ eLastBlock = SVX_ADJUST_CENTER;
+ else if ( 2 == nLBPos )
+ eLastBlock = SVX_ADJUST_BLOCK;
+
+ FASTBOOL bNothingWasChecked =
+ !aLeft.GetSavedValue() && !aRight.GetSavedValue() &&
+ !aCenter.GetSavedValue() && !aJustify.GetSavedValue();
+
+ if ( !pOld || pOld->GetAdjust() != eAdjust ||
+ pOld->GetOneWord() != eOneWord ||
+ pOld->GetLastBlock() != eLastBlock ||
+ ( bChecked && bNothingWasChecked ) )
+ {
+ bModified |= TRUE;
+ SvxAdjustItem aAdj(
+ (const SvxAdjustItem&)GetItemSet().Get( nWhich ) );
+ aAdj.SetAdjust( eAdjust );
+ aAdj.SetOneWord( eOneWord );
+ aAdj.SetLastBlock( eLastBlock );
+ rOutSet.Put( aAdj );
+ }
+ }
+ return bModified;
+}
+
+/*-----------------16.01.97 19.33-------------------
+
+--------------------------------------------------*/
+void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet )
+{
+ USHORT nWhich = GetWhich( SID_ATTR_PARA_ADJUST );
+ SfxItemState eItemState = rSet.GetItemState( nWhich );
+
+ USHORT nLBSelect = 0;
+ if ( eItemState >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxAdjustItem& rAdj = (const SvxAdjustItem&)rSet.Get( nWhich );
+
+ switch ( rAdj.GetAdjust() /*!!! VB fragen rAdj.GetLastBlock()*/ )
+ {
+ case SVX_ADJUST_LEFT: aLeft.Check(); break;
+
+ case SVX_ADJUST_RIGHT: aRight.Check(); break;
+
+ case SVX_ADJUST_CENTER: aCenter.Check(); break;
+
+ case SVX_ADJUST_BLOCK: aJustify.Check(); break;
+ }
+ BOOL bEnable = aJustify.IsChecked();
+ aLastLineFT.Enable(bEnable);
+ aLastLineLB.Enable(bEnable);
+ aExpandCB .Enable(bEnable);
+
+ aExpandCB.Check(SVX_ADJUST_BLOCK == rAdj.GetOneWord());
+ switch(rAdj.GetLastBlock())
+ {
+ case SVX_ADJUST_LEFT: nLBSelect = 0; break;
+
+ case SVX_ADJUST_CENTER: nLBSelect = 1; break;
+
+ case SVX_ADJUST_BLOCK: nLBSelect = 2; break;
+
+ }
+ }
+ else
+ {
+ aLeft.Check( FALSE );
+ aRight.Check( FALSE );
+ aCenter.Check( FALSE );
+ aJustify.Check( FALSE );
+ }
+ aLastLineLB.SelectEntryPos(nLBSelect);
+
+ USHORT nHtmlMode = GetHtmlMode_Impl(rSet);
+ if(nHtmlMode & HTMLMODE_ON)
+ {
+ aLastLineLB.Hide();
+ aLastLineFT.Hide();
+ aExpandCB.Hide();
+ if(!(nHtmlMode & HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE) )
+ aJustify.Disable();
+ }
+
+ aLeft.SaveValue();
+ aRight.SaveValue();
+ aCenter.SaveValue();
+ aJustify.SaveValue();
+ aLastLineLB.SaveValue();
+ aExpandCB.SaveValue();
+
+ UpdateExample_Impl(TRUE);
+}
+
+/*-----------------17.01.97 08.06-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxParaAlignTabPage, AlignHdl_Impl, RadioButton*, pBtn )
+{
+ BOOL bJustify = aJustify.IsChecked();
+ aLastLineFT.Enable(bJustify);
+ aLastLineLB.Enable(bJustify);
+ aExpandCB.Enable(bJustify);
+ UpdateExample_Impl(FALSE);
+ return 0;
+}
+
+/*-----------------16.01.97 19.34-------------------
+
+--------------------------------------------------*/
+void SvxParaAlignTabPage::UpdateExample_Impl( BOOL bAll )
+{
+ if ( aLeft.IsChecked() )
+ aExampleWin.SetAdjust( SVX_ADJUST_LEFT );
+ else if ( aRight.IsChecked() )
+ aExampleWin.SetAdjust( SVX_ADJUST_RIGHT );
+ else if ( aCenter.IsChecked() )
+ aExampleWin.SetAdjust( SVX_ADJUST_CENTER );
+ else if ( aJustify.IsChecked() )
+ {
+ aExampleWin.SetAdjust( SVX_ADJUST_BLOCK );
+ SvxAdjust eLastBlock = SVX_ADJUST_LEFT;
+ USHORT nLBPos = aLastLineLB.GetSelectEntryPos();
+ if(nLBPos == 1)
+ eLastBlock = SVX_ADJUST_CENTER;
+ else if(nLBPos == 2)
+ eLastBlock = SVX_ADJUST_BLOCK;
+ aExampleWin.SetLastLine( eLastBlock );
+ }
+
+ aExampleWin.Draw( bAll );
+}
+/*-----------------17.01.97 08.04-------------------
+ Erweiterungen fuer den Blocksatz einschalten
+--------------------------------------------------*/
+void SvxParaAlignTabPage::EnableJustifyExt()
+{
+ aLastLineFT.Show();
+ aLastLineLB.Show();
+ aExpandCB .Show();
+
+}
+
+
+// class SvxExtParagraphTabPage ------------------------------------------
+
+SfxTabPage* SvxExtParagraphTabPage::Create( Window* pParent,
+ const SfxItemSet& rSet )
+{
+ return new SvxExtParagraphTabPage( pParent, rSet );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
+{
+ BOOL bModified = FALSE;
+ USHORT nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE );
+ const TriState eHyphenState = aHyphenBox.GetState();
+ const SfxPoolItem* pOld = GetOldItem( rOutSet, SID_ATTR_PARA_HYPHENZONE );
+
+ if ( eHyphenState != aHyphenBox.GetSavedValue() ||
+ aExtHyphenBeforeBox.IsValueModified() ||
+ aExtHyphenAfterBox.IsValueModified() ||
+ aMaxHyphenEdit.IsValueModified() )
+ {
+ SvxHyphenZoneItem aHyphen(
+ (const SvxHyphenZoneItem&)GetItemSet().Get( nWhich ) );
+ aHyphen.SetHyphen( eHyphenState == STATE_CHECK );
+
+ if ( eHyphenState == STATE_CHECK )
+ {
+ aHyphen.GetMinLead() = (BYTE)aExtHyphenBeforeBox.GetValue();
+ aHyphen.GetMinTrail() = (BYTE)aExtHyphenAfterBox.GetValue();
+ }
+ aHyphen.GetMaxHyphens() = (BYTE)aMaxHyphenEdit.GetValue();
+
+ if ( !pOld ||
+ !( *(SvxHyphenZoneItem*)pOld == aHyphen ) ||
+ eHyphenState != aHyphenBox.GetSavedValue())
+ {
+ rOutSet.Put( aHyphen );
+ bModified |= TRUE;
+ }
+ }
+
+ if (aPagenumEdit.IsEnabled() && aPagenumEdit.IsValueModified())
+ {
+ SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM,
+ (USHORT)aPagenumEdit.GetValue() );
+
+ pOld = GetOldItem( rOutSet, SID_ATTR_PARA_PAGENUM );
+
+ if ( !pOld || ( (const SfxUInt16Item*)pOld )->GetValue() != aPageNum.GetValue() )
+ {
+ rOutSet.Put( aPageNum );
+ bModified |= TRUE;
+ }
+ }
+
+ // Seitenumbruch
+
+ TriState eState = aApplyCollBtn.GetState();
+ FASTBOOL bIsPageModel = FALSE;
+
+ nWhich = GetWhich( SID_ATTR_PARA_MODEL );
+ String sPage;
+ if ( eState != aApplyCollBtn.GetSavedValue() ||
+ ( STATE_CHECK == eState &&
+ aApplyCollBox.GetSelectEntryPos() != aApplyCollBox.GetSavedValue() ) )
+ {
+ if ( eState == STATE_CHECK )
+ {
+ sPage = aApplyCollBox.GetSelectEntry();
+ bIsPageModel = 0 != sPage.Len();
+ }
+ pOld = GetOldItem( rOutSet, SID_ATTR_PARA_MODEL );
+
+ if ( !pOld || ( (const SvxPageModelItem*)pOld )->GetValue() != sPage )
+ {
+ rOutSet.Put( SvxPageModelItem( sPage, FALSE, nWhich ) );
+ bModified |= TRUE;
+ }
+ else
+ bIsPageModel = FALSE;
+ }
+ else if(STATE_CHECK == eState && aApplyCollBtn.IsEnabled())
+ bIsPageModel = TRUE;
+ else
+ rOutSet.Put( SvxPageModelItem( sPage, FALSE, nWhich ) );
+
+ nWhich = GetWhich( SID_ATTR_PARA_PAGEBREAK );
+
+ if ( bIsPageModel )
+ // wird PageModel eingeschaltet, dann immer PageBreak ausschalten
+ rOutSet.Put( SvxFmtBreakItem( SVX_BREAK_NONE, nWhich ) );
+ else
+ {
+ eState = aPageBreakBox.GetState();
+ SfxItemState eModelState = GetItemSet().GetItemState(SID_ATTR_PARA_MODEL, FALSE);
+
+ if ( (eModelState == SFX_ITEM_SET && STATE_CHECK == aPageBreakBox.GetState()) ||
+ eState != aPageBreakBox.GetSavedValue() ||
+ aBeforeBox.IsChecked() != aBeforeBox.GetSavedValue() ||
+ aPageBox.IsChecked() != aPageBox.GetSavedValue() )
+ {
+ const SvxFmtBreakItem rOldBreak(
+ (const SvxFmtBreakItem&)GetItemSet().Get( nWhich ));
+ SvxFmtBreakItem aBreak(rOldBreak.GetBreak(), rOldBreak.Which());
+
+ switch ( eState )
+ {
+ case STATE_CHECK:
+ {
+ BOOL bBefore = aBeforeBox.IsChecked();
+
+ if ( aPageBox.IsChecked() )
+ {
+ if ( bBefore )
+ aBreak.SetValue( SVX_BREAK_PAGE_BEFORE );
+ else
+ aBreak.SetValue( SVX_BREAK_PAGE_AFTER );
+ }
+ else
+ {
+ if ( bBefore )
+ aBreak.SetValue( SVX_BREAK_COLUMN_BEFORE );
+ else
+ aBreak.SetValue( SVX_BREAK_COLUMN_AFTER );
+ }
+ break;
+ }
+
+ case STATE_NOCHECK:
+ aBreak.SetValue( SVX_BREAK_NONE );
+ break;
+ }
+ pOld = GetOldItem( rOutSet, SID_ATTR_PARA_PAGEBREAK );
+
+ if ( eState != aPageBreakBox.GetSavedValue() ||
+ !pOld || !( *(const SvxFmtBreakItem*)pOld == aBreak ) )
+ {
+ bModified |= TRUE;
+ rOutSet.Put( aBreak );
+ }
+ }
+ }
+
+
+ // Absatztrennung
+ nWhich = GetWhich( SID_ATTR_PARA_SPLIT );
+ eState = aKeepTogetherBox.GetState();
+
+ if ( eState != aKeepTogetherBox.GetSavedValue() )
+ {
+ pOld = GetOldItem( rOutSet, SID_ATTR_PARA_SPLIT );
+
+ if ( !pOld || ( (const SvxFmtSplitItem*)pOld )->GetValue() !=
+ ( eState == STATE_NOCHECK ) )
+ {
+ rOutSet.Put( SvxFmtSplitItem( eState == STATE_NOCHECK, nWhich ) );
+ bModified |= TRUE;
+ }
+ }
+
+ // Absaetze zusammenhalten
+ nWhich = GetWhich( SID_ATTR_PARA_KEEP );
+ eState = aKeepParaBox.GetState();
+
+ if ( eState != aKeepParaBox.GetSavedValue() )
+ {
+ pOld = GetOldItem( rOutSet, SID_ATTR_PARA_KEEP );
+
+ // hat sich der Status geaendert, muss immer geputtet werden
+ rOutSet.Put( SvxFmtKeepItem( eState == STATE_CHECK, nWhich ) );
+ bModified |= TRUE;
+ }
+
+ // Witwen und Waisen
+ nWhich = GetWhich( SID_ATTR_PARA_WIDOWS );
+ eState = aWidowBox.GetState();
+
+ if ( eState != aWidowBox.GetSavedValue() ||
+ aWidowRowNo.IsValueModified() )
+ {
+ SvxWidowsItem rItem( eState == STATE_CHECK ?
+ (BYTE)aWidowRowNo.GetValue() : 0, nWhich );
+ pOld = GetOldItem( rOutSet, SID_ATTR_PARA_WIDOWS );
+
+ if ( eState != aWidowBox.GetSavedValue() || !pOld || !( *(const SvxWidowsItem*)pOld == rItem ) )
+ {
+ rOutSet.Put( rItem );
+ bModified |= TRUE;
+ }
+ }
+
+ nWhich = GetWhich( SID_ATTR_PARA_ORPHANS );
+ eState = aOrphanBox.GetState();
+
+ if ( eState != aOrphanBox.GetSavedValue() ||
+ aOrphanRowNo.IsValueModified() )
+ {
+ SvxOrphansItem rItem( eState == STATE_CHECK ?
+ (BYTE)aOrphanRowNo.GetValue() : 0, nWhich );
+ pOld = GetOldItem( rOutSet, SID_ATTR_PARA_ORPHANS );
+
+ if ( eState != aOrphanBox.GetSavedValue() ||
+ !pOld ||
+ !( *(const SvxOrphansItem*)pOld == rItem ) )
+ {
+ rOutSet.Put( rItem );
+ bModified |= TRUE;
+ }
+ }
+ return bModified;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
+{
+ USHORT nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE );
+ SfxItemState eItemState = rSet.GetItemState( nWhich );
+
+ BOOL bItemAvailable = eItemState >= SFX_ITEM_AVAILABLE;
+ BOOL bIsHyphen = FALSE;
+ if( !bHtmlMode && bItemAvailable )
+ {
+ const SvxHyphenZoneItem& rHyphen =
+ (const SvxHyphenZoneItem&)rSet.Get( nWhich );
+ aHyphenBox.EnableTriState( FALSE );
+
+ bIsHyphen = rHyphen.IsHyphen();
+ aHyphenBox.SetState( bIsHyphen ? STATE_CHECK : STATE_NOCHECK );
+
+ aExtHyphenBeforeBox.SetValue( rHyphen.GetMinLead() );
+ aExtHyphenAfterBox.SetValue( rHyphen.GetMinTrail() );
+ aMaxHyphenEdit.SetValue( rHyphen.GetMaxHyphens() );
+ }
+ else
+ {
+ aHyphenBox.SetState( STATE_DONTKNOW );
+ }
+ BOOL bEnable = bItemAvailable && bIsHyphen;
+ aExtHyphenBeforeBox.Enable(bEnable);
+ aHyphenBeforeLabel.Enable(bEnable);
+ aExtHyphenAfterBox.Enable(bEnable);
+ aHyphenAfterLabel.Enable(bEnable);
+ aBeforeText.Enable(bEnable);
+ aAfterText.Enable(bEnable);
+ aMaxHyphenLabel.Enable(bEnable);
+ aMaxHyphenEdit.Enable(bEnable);
+
+ nWhich = GetWhich( SID_ATTR_PARA_PAGENUM );
+
+ if ( rSet.GetItemState(nWhich) >= SFX_ITEM_AVAILABLE )
+ {
+ const USHORT nPageNum =
+ ( (const SfxUInt16Item&)rSet.Get( nWhich ) ).GetValue();
+ aPagenumEdit.SetValue( nPageNum );
+ }
+
+ if ( bPageBreak )
+ {
+ // zuerst PageModel behandeln
+ nWhich = GetWhich( SID_ATTR_PARA_MODEL );
+ BOOL bIsPageModel = FALSE;
+ eItemState = rSet.GetItemState( nWhich );
+
+ if ( eItemState >= SFX_ITEM_SET )
+ {
+ aApplyCollBtn.EnableTriState( FALSE );
+
+ const SvxPageModelItem& rModel =
+ (const SvxPageModelItem&)rSet.Get( nWhich );
+ String aStr( rModel.GetValue() );
+
+ if ( aStr.Len() &&
+ aApplyCollBox.GetEntryPos( aStr ) != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aApplyCollBox.SelectEntry( aStr );
+ aApplyCollBtn.SetState( STATE_CHECK );
+ bIsPageModel = TRUE;
+
+ aPageBreakBox.Enable();
+ aPageBreakBox.EnableTriState( FALSE );
+ aPageBox.Enable();
+ aColumnBox.Enable(!bHtmlMode);
+ aBeforeBox.Enable();
+ aAfterBox.Enable();
+ aApplyCollBtn.Enable();
+ aPageBreakBox.SetState( STATE_CHECK );
+
+ aPageBox.Check( TRUE );
+ aColumnBox.Check( FALSE );
+ aBeforeBox.Check( TRUE );
+ aAfterBox.Check( FALSE );
+ }
+ else
+ {
+ aApplyCollBox.SetNoSelection();
+ aApplyCollBtn.SetState( STATE_NOCHECK );
+ }
+ }
+ else if ( SFX_ITEM_DONTCARE == eItemState )
+ {
+ aApplyCollBtn.EnableTriState( TRUE );
+ aApplyCollBtn.SetState( STATE_DONTKNOW );
+ aApplyCollBox.SetNoSelection();
+ }
+ else
+ {
+ aApplyCollBtn.Enable(FALSE);
+ aApplyCollBox.Enable(FALSE);
+ aPagenumEdit.Enable(FALSE);
+ aPagenumText.Enable(FALSE);
+ }
+//!!! ApplyCollClickHdl_Impl( &aApplyCollBtn );
+
+ if ( !bIsPageModel )
+ {
+ nWhich = GetWhich( SID_ATTR_PARA_PAGEBREAK );
+ eItemState = rSet.GetItemState( nWhich );
+
+ if ( eItemState >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxFmtBreakItem& rPageBreak =
+ (const SvxFmtBreakItem&)rSet.Get( nWhich );
+
+ SvxBreak eBreak = (SvxBreak)rPageBreak.GetValue();
+
+ // PageBreak nicht ueber CTRL-RETURN,
+ // dann kann CheckBox frei gegeben werden
+ aPageBreakBox.Enable();
+ aPageBreakBox.EnableTriState( FALSE );
+ aPageBox.Enable();
+ aColumnBox.Enable(!bHtmlMode);
+ aBeforeBox.Enable();
+ aAfterBox.Enable();
+ aPageBreakBox.SetState( STATE_CHECK );
+
+ BOOL bEnable = eBreak != SVX_BREAK_NONE &&
+ eBreak != SVX_BREAK_COLUMN_BEFORE &&
+ eBreak != SVX_BREAK_COLUMN_AFTER;
+ aApplyCollBtn.Enable(bEnable);
+ if(!bEnable)
+ {
+ aApplyCollBox.Enable(bEnable);
+ aPagenumEdit.Enable(bEnable);
+ }
+
+ if ( eBreak == SVX_BREAK_NONE )
+ aPageBreakBox.SetState( STATE_NOCHECK );
+
+ switch ( eBreak )
+ {
+ case SVX_BREAK_PAGE_BEFORE:
+ aPageBox.Check( TRUE );
+ aColumnBox.Check( FALSE );
+ aBeforeBox.Check( TRUE );
+ aAfterBox.Check( FALSE );
+ break;
+ case SVX_BREAK_PAGE_AFTER:
+ aPageBox.Check( TRUE );
+ aColumnBox.Check( FALSE );
+ aBeforeBox.Check( FALSE );
+ aAfterBox.Check( TRUE );
+ break;
+ case SVX_BREAK_COLUMN_BEFORE:
+ aPageBox.Check( FALSE );
+ aColumnBox.Check( TRUE );
+ aBeforeBox.Check( TRUE );
+ aAfterBox.Check( FALSE );
+ break;
+ case SVX_BREAK_COLUMN_AFTER:
+ aPageBox.Check( FALSE );
+ aColumnBox.Check( TRUE );
+ aBeforeBox.Check( FALSE );
+ aAfterBox.Check( TRUE );
+ break;
+ }
+ }
+ else if ( SFX_ITEM_DONTCARE == eItemState )
+ aPageBreakBox.SetState( STATE_DONTKNOW );
+ else
+ {
+ aPageBreakBox.Enable(FALSE);
+ aPageBox.Enable(FALSE);
+ aColumnBox.Enable(FALSE);
+ aBeforeBox.Enable(FALSE);
+ aAfterBox.Enable(FALSE);
+ }
+ }
+
+ if ( aBeforeBox.IsChecked() )
+ PageBreakPosHdl_Impl( &aBeforeBox );
+ else if ( aAfterBox.IsChecked() )
+ PageBreakPosHdl_Impl( &aAfterBox );
+ PageBreakHdl_Impl( &aPageBreakBox );
+ }
+
+ nWhich = GetWhich( SID_ATTR_PARA_KEEP );
+ eItemState = rSet.GetItemState( nWhich );
+
+ if ( eItemState >= SFX_ITEM_AVAILABLE )
+ {
+ aKeepParaBox.EnableTriState( FALSE );
+ const SvxFmtKeepItem& rKeep =
+ (const SvxFmtKeepItem&)rSet.Get( nWhich );
+
+ if ( rKeep.GetValue() )
+ aKeepParaBox.SetState( STATE_CHECK );
+ else
+ aKeepParaBox.SetState( STATE_NOCHECK );
+ }
+ else if ( SFX_ITEM_DONTCARE == eItemState )
+ aKeepParaBox.SetState( STATE_DONTKNOW );
+ else
+ aKeepParaBox.Enable(FALSE);
+
+ nWhich = GetWhich( SID_ATTR_PARA_SPLIT );
+ eItemState = rSet.GetItemState( nWhich );
+
+ if ( eItemState >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxFmtSplitItem& rSplit =
+ (const SvxFmtSplitItem&)rSet.Get( nWhich );
+ aKeepTogetherBox.EnableTriState( FALSE );
+
+ if ( !rSplit.GetValue() )
+ aKeepTogetherBox.SetState( STATE_CHECK );
+ else
+ {
+ aKeepTogetherBox.SetState( STATE_NOCHECK );
+
+ // Witwen und Waisen
+ aWidowBox.Enable();
+ nWhich = GetWhich( SID_ATTR_PARA_WIDOWS );
+ SfxItemState eTmpState = rSet.GetItemState( nWhich );
+
+ if ( eTmpState >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxWidowsItem& rWidow =
+ (const SvxWidowsItem&)rSet.Get( nWhich );
+ aWidowBox.EnableTriState( FALSE );
+ const USHORT nLines = rWidow.GetValue();
+
+ BOOL bEnable = nLines > 0;
+ aWidowRowNo.SetValue( aWidowRowNo.Normalize( nLines ) );
+ aWidowBox.SetState( bEnable ? STATE_CHECK : STATE_NOCHECK);
+ aWidowRowNo.Enable(bEnable);
+ aWidowRowLabel.Enable(bEnable);
+
+ }
+ else if ( SFX_ITEM_DONTCARE == eTmpState )
+ aWidowBox.SetState( STATE_DONTKNOW );
+ else
+ aWidowBox.Enable(FALSE);
+
+ aOrphanBox.Enable();
+ nWhich = GetWhich( SID_ATTR_PARA_ORPHANS );
+ eTmpState = rSet.GetItemState( nWhich );
+
+ if ( eTmpState >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxOrphansItem& rOrphan =
+ (const SvxOrphansItem&)rSet.Get( nWhich );
+ const USHORT nLines = rOrphan.GetValue();
+ aOrphanBox.EnableTriState( FALSE );
+
+ BOOL bEnable = nLines > 0;
+ aOrphanBox.SetState( bEnable ? STATE_CHECK : STATE_NOCHECK);
+ aOrphanRowNo.SetValue( aOrphanRowNo.Normalize( nLines ) );
+ aOrphanRowNo.Enable(bEnable);
+ aOrphanRowLabel.Enable(bEnable);
+
+ }
+ else if ( SFX_ITEM_DONTCARE == eTmpState )
+ aOrphanBox.SetState( STATE_DONTKNOW );
+ else
+ aOrphanBox.Enable(FALSE);
+ }
+ }
+ else if ( SFX_ITEM_DONTCARE == eItemState )
+ aKeepTogetherBox.SetState( STATE_DONTKNOW );
+ else
+ aKeepTogetherBox.Enable(FALSE);
+
+ // damit alles richt enabled wird
+ KeepTogetherHdl_Impl( 0 );
+ WidowHdl_Impl( 0 );
+ OrphanHdl_Impl( 0 );
+
+ aHyphenBox.SaveValue();
+ aExtHyphenBeforeBox.SaveValue();
+ aExtHyphenAfterBox.SaveValue();
+ aMaxHyphenEdit.SaveValue();
+ aPageBreakBox.SaveValue();
+ aPageBox.SaveValue();
+ aColumnBox.SaveValue();
+ aBeforeBox.SaveValue();
+ aAfterBox.SaveValue();
+ aApplyCollBtn.SaveValue();
+ aApplyCollBox.SaveValue();
+ aPagenumEdit.SaveValue();
+ aKeepTogetherBox.SaveValue();
+ aKeepParaBox.SaveValue();
+ aWidowBox.SaveValue();
+ aOrphanBox.SaveValue();
+}
+
+// -----------------------------------------------------------------------
+
+int SvxExtParagraphTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( pSet )
+ FillItemSet( *pSet );
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxExtParagraphTabPage::DisablePageBreak()
+{
+ bPageBreak = FALSE;
+ aPageBreakBox.Enable(FALSE);
+ aPageBox.Enable(FALSE);
+ aApplyCollBtn.Enable(FALSE);
+ aApplyCollBox.Enable(FALSE);
+ aPagenumEdit.Enable(FALSE);
+ aBeforeBox .Enable(FALSE);
+ aAfterBox .Enable(FALSE);
+}
+
+// -----------------------------------------------------------------------
+
+SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSet& rAttr ) :
+
+ SfxTabPage( pParent, ResId( RID_SVXPAGE_EXT_PARAGRAPH, DIALOG_MGR() ), rAttr ),
+
+ aHyphenBox ( this, ResId( BTN_HYPHEN ) ),
+ aBeforeText ( this, ResId( FT_BEFORE ) ),
+ aExtHyphenBeforeBox ( this, ResId( ED_HYPHENBEFORE ) ),
+ aHyphenBeforeLabel ( this, ResId( FT_HYPHENBEFORE ) ),
+ aAfterText ( this, ResId( FT_AFTER ) ),
+ aExtHyphenAfterBox ( this, ResId( ED_HYPHENAFTER ) ),
+ aHyphenAfterLabel ( this, ResId( FT_HYPHENAFTER ) ),
+ aMaxHyphenLabel ( this, ResId( FT_MAXHYPH ) ),
+ aMaxHyphenEdit ( this, ResId( ED_MAXHYPH ) ),
+ aExtFrm ( this, ResId( GB_HYPHEN ) ),
+ aPageBreakBox ( this, ResId( BTN_PAGEBREAK ) ),
+ aPageBox ( this, ResId( BTN_BREAKPAGE ) ),
+ aColumnBox ( this, ResId( BTN_BREAKCOLUMN ) ),
+ aBeforeBox ( this, ResId( BTN_PAGEBREAKBEFORE ) ),
+ aAfterBox ( this, ResId( BTN_PAGEBREAKAFTER ) ),
+ aApplyCollBtn ( this, ResId( BTN_PAGECOLL ) ),
+ aApplyCollBox ( this, ResId( LB_PAGECOLL ) ),
+ aPagenumText ( this, ResId( FT_PAGENUM ) ),
+ aPagenumEdit ( this, ResId( ED_PAGENUM ) ),
+ aKeepTogetherBox ( this, ResId( BTN_KEEPTOGETHER ) ),
+ aKeepParaBox ( this, ResId( CB_KEEPTOGETHER ) ),
+ aWidowBox ( this, ResId( BTN_WIDOWS ) ),
+ aWidowRowNo ( this, ResId( ED_WIDOWS ) ),
+ aWidowRowLabel ( this, ResId( FT_WIDOWS ) ),
+ aOrphanBox ( this, ResId( BTN_ORPHANS ) ),
+ aOrphanRowNo ( this, ResId( ED_ORPHANS ) ),
+ aOrphanRowLabel ( this, ResId( FT_ORPHANS ) ),
+ aExtendFrm ( this, ResId( GB_OPTIONS ) ),
+
+ bHtmlMode ( FALSE ),
+ bPageBreak ( TRUE ),
+ nStdPos ( 0 )
+
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ aHyphenBox.SetClickHdl( LINK( this, SvxExtParagraphTabPage, HyphenClickHdl_Impl ) );
+ aPageBreakBox.SetClickHdl( LINK( this, SvxExtParagraphTabPage, PageBreakHdl_Impl ) );
+ aKeepTogetherBox.SetClickHdl( LINK( this, SvxExtParagraphTabPage, KeepTogetherHdl_Impl ) );
+ aWidowBox.SetClickHdl( LINK( this, SvxExtParagraphTabPage, WidowHdl_Impl ) );
+ aOrphanBox.SetClickHdl( LINK( this, SvxExtParagraphTabPage, OrphanHdl_Impl ) );
+ aApplyCollBtn.SetClickHdl( LINK( this, SvxExtParagraphTabPage, ApplyCollClickHdl_Impl ) );
+ aPageBox.SetClickHdl( LINK( this, SvxExtParagraphTabPage, PageBreakTypeHdl_Impl ) );
+ aColumnBox.SetClickHdl( LINK( this, SvxExtParagraphTabPage, PageBreakTypeHdl_Impl ) );
+ aBeforeBox.SetClickHdl( LINK( this, SvxExtParagraphTabPage, PageBreakPosHdl_Impl ) );
+ aAfterBox.SetClickHdl( LINK( this, SvxExtParagraphTabPage, PageBreakPosHdl_Impl ) );
+
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+ if ( pSh )
+ {
+ SfxStyleSheetBasePool* pPool = pSh->GetStyleSheetPool();
+ pPool->SetSearchMask( SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pStyle = pPool->First();
+ String aStdName;
+
+ while( pStyle )
+ {
+ if ( aStdName.Len() == 0 )
+ // first style == standard style
+ aStdName = pStyle->GetName();
+ aApplyCollBox.InsertEntry( pStyle->GetName() );
+ pStyle = pPool->Next();
+ }
+ nStdPos = aApplyCollBox.GetEntryPos( aStdName );
+ }
+
+ USHORT nHtmlMode = GetHtmlMode_Impl( rAttr );
+ if ( nHtmlMode & HTMLMODE_ON )
+ {
+ bHtmlMode = TRUE;
+ aHyphenBox .Enable(FALSE);
+ aBeforeText .Enable(FALSE);
+ aExtHyphenBeforeBox .Enable(FALSE);
+ aHyphenBeforeLabel .Enable(FALSE);
+ aAfterText .Enable(FALSE);
+ aExtHyphenAfterBox .Enable(FALSE);
+ aHyphenAfterLabel .Enable(FALSE);
+ aMaxHyphenLabel .Enable(FALSE);
+ aMaxHyphenEdit .Enable(FALSE);
+ aExtFrm .Enable(FALSE);
+ aPagenumText .Enable(FALSE);
+ aPagenumEdit .Enable(FALSE);
+ }
+}
+
+// -----------------------------------------------------------------------
+
+__EXPORT SvxExtParagraphTabPage::~SvxExtParagraphTabPage()
+{
+}
+
+// -----------------------------------------------------------------------
+
+USHORT* SvxExtParagraphTabPage::GetRanges()
+{
+ return pExtRanges;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxExtParagraphTabPage, PageBreakHdl_Impl, TriStateBox *, EMPTYARG )
+{
+ switch ( aPageBreakBox.GetState() )
+ {
+ case STATE_CHECK:
+ aPageBox.Enable();
+ aColumnBox.Enable(!bHtmlMode);
+ aBeforeBox.Enable();
+ aAfterBox.Enable();
+
+ if ( aPageBox.IsChecked() && aBeforeBox.IsChecked() )
+ {
+ aApplyCollBtn.Enable();
+
+ BOOL bEnable = STATE_CHECK == aApplyCollBtn.GetState() &&
+ aApplyCollBox.GetEntryCount();
+ aApplyCollBox.Enable(bEnable);
+ if(!bHtmlMode)
+ {
+ aPagenumText.Enable(bEnable);
+ aPagenumEdit.Enable(bEnable);
+ }
+ }
+ break;
+
+ case STATE_NOCHECK:
+ case STATE_DONTKNOW:
+ aApplyCollBtn.SetState( STATE_NOCHECK );
+ aApplyCollBtn.Enable(FALSE);
+ aApplyCollBox.Enable(FALSE);
+ aPagenumText.Enable(FALSE);
+ aPagenumEdit.Enable(FALSE);
+ aPageBox.Enable(FALSE);
+ aColumnBox.Enable(FALSE);
+ aBeforeBox.Enable(FALSE);
+ aAfterBox.Enable(FALSE);
+ break;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxExtParagraphTabPage, KeepTogetherHdl_Impl, TriStateBox *, EMPTYARG )
+{
+ BOOL bEnable = aKeepTogetherBox.GetState() == STATE_NOCHECK;
+ aWidowBox.Enable(bEnable);
+ aOrphanBox.Enable(bEnable);
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxExtParagraphTabPage, WidowHdl_Impl, TriStateBox *, EMPTYARG )
+{
+ switch ( aWidowBox.GetState() )
+ {
+ case STATE_CHECK:
+ aWidowRowNo.Enable();
+ aWidowRowLabel.Enable();
+ aKeepTogetherBox.Enable(FALSE);
+ break;
+
+ case STATE_NOCHECK:
+ if ( aOrphanBox.GetState() == STATE_NOCHECK )
+ aKeepTogetherBox.Enable();
+
+ // kein break
+ case STATE_DONTKNOW:
+ aWidowRowNo.Enable(FALSE);
+ aWidowRowLabel.Enable(FALSE);
+ break;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxExtParagraphTabPage, OrphanHdl_Impl, TriStateBox *, EMPTYARG )
+{
+ switch( aOrphanBox.GetState() )
+ {
+ case STATE_CHECK:
+ aOrphanRowNo.Enable();
+ aOrphanRowLabel.Enable();
+ aKeepTogetherBox.Enable(FALSE);
+ break;
+
+ case STATE_NOCHECK:
+ if ( aWidowBox.GetState() == STATE_NOCHECK )
+ aKeepTogetherBox.Enable();
+
+ // kein break
+ case STATE_DONTKNOW:
+ aOrphanRowNo.Enable(FALSE);
+ aOrphanRowLabel.Enable(FALSE);
+ break;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxExtParagraphTabPage, HyphenClickHdl_Impl, TriStateBox *, EMPTYARG )
+{
+
+ BOOL bEnable = aHyphenBox.GetState() == STATE_CHECK;
+ aBeforeText.Enable(bEnable);
+ aHyphenBeforeLabel.Enable(bEnable);
+ aExtHyphenBeforeBox.Enable(bEnable);
+ aAfterText.Enable(bEnable);
+ aHyphenAfterLabel.Enable(bEnable);
+ aExtHyphenAfterBox.Enable(bEnable);
+ aMaxHyphenLabel.Enable(bEnable);
+ aMaxHyphenEdit.Enable(bEnable);
+ aHyphenBox.SetState( bEnable ? STATE_CHECK : STATE_NOCHECK);
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxExtParagraphTabPage, ApplyCollClickHdl_Impl, TriStateBox *, EMPTYARG )
+{
+ BOOL bEnable = FALSE;
+ if ( aApplyCollBtn.GetState() == STATE_CHECK &&
+ aApplyCollBox.GetEntryCount() )
+ {
+ bEnable = TRUE;
+ aApplyCollBox.SelectEntryPos( nStdPos );
+ }
+ else
+ {
+ aApplyCollBox.SetNoSelection();
+ }
+ aApplyCollBox.Enable(bEnable);
+ if(!bHtmlMode)
+ {
+ aPagenumText.Enable(bEnable);
+ aPagenumEdit.Enable(bEnable);
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, RadioButton *, pBtn )
+{
+ if ( aPageBox.IsChecked() )
+ {
+ if ( pBtn == &aBeforeBox )
+ {
+ aApplyCollBtn.Enable();
+
+ BOOL bEnable = aApplyCollBtn.GetState() == STATE_CHECK &&
+ aApplyCollBox.GetEntryCount();
+
+ aApplyCollBox.Enable(bEnable);
+ if(!bHtmlMode)
+ {
+ aPagenumText.Enable(bEnable);
+ aPagenumEdit.Enable(bEnable);
+ }
+ }
+ else if ( pBtn == &aAfterBox )
+ {
+ aApplyCollBtn.SetState( STATE_NOCHECK );
+ aApplyCollBtn.Enable(FALSE);
+ aApplyCollBox.Enable(FALSE);
+ aPagenumText.Enable(FALSE);
+ aPagenumEdit.Enable(FALSE);
+ }
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxExtParagraphTabPage, PageBreakTypeHdl_Impl, RadioButton *, pBtn )
+{
+ if ( pBtn == &aColumnBox || aAfterBox.IsChecked() )
+ {
+ aApplyCollBtn.SetState( STATE_NOCHECK );
+ aApplyCollBtn.Enable(FALSE);
+ aApplyCollBox.Enable(FALSE);
+ aPagenumText.Enable(FALSE);
+ aPagenumEdit.Enable(FALSE);
+ }
+ else if ( aBeforeBox.IsChecked() )
+ PageBreakPosHdl_Impl( &aBeforeBox );
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/paragrph.hrc b/svx/source/dialog/paragrph.hrc
new file mode 100644
index 0000000000..ead0300797
--- /dev/null
+++ b/svx/source/dialog/paragrph.hrc
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * $RCSfile: paragrph.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_PARAGRPH_HRC
+#define _SVX_PARAGRPH_HRC
+
+// StandardTabPage ----------------------------------------------------------
+
+#define FT_LEFTINDENT 10
+#define ED_LEFTINDENT 11
+#define FT_FLINEINDENT 12
+#define ED_FLINEINDENT 13
+#define FT_RIGHTINDENT 14
+#define ED_RIGHTINDENT 15
+#define GB_INDENT 16
+
+#define FT_TOPDIST 20
+#define ED_TOPDIST 21
+#define FT_BOTTOMDIST 22
+#define ED_BOTTOMDIST 23
+#define GB_DIST 24
+
+#define BTN_LEFTALIGN 30
+#define BTN_RIGHTALIGN 31
+#define BTN_CENTERALIGN 32
+#define BTN_JUSTIFYALIGN 33
+#define GB_ALIGN 34
+
+#define LB_LINEDIST 40
+#define FT_LINEDIST 41
+#define ED_LINEDISTPERCENT 42
+#define ED_LINEDISTMETRIC 43
+#define GB_LINEDIST 44
+#define WN_EXAMPLE 46
+#define GB_EXAMPLE 47
+
+#define CB_AUTO 48
+#define FT_LASTLINE 49
+#define LB_LASTLINE 50
+#define CB_EXPAND 51
+#define ST_LINEDIST_ABS 52
+
+// ExtendedTabPage ----------------------------------------------------------
+
+#define BTN_HYPHEN 50
+#define FT_BEFORE 51
+#define ED_HYPHENBEFORE 52
+#define FT_HYPHENBEFORE 53
+#define FT_AFTER 54
+#define ED_HYPHENAFTER 55
+#define FT_HYPHENAFTER 56
+#define GB_HYPHEN 57
+
+#define BTN_PAGEBREAK 60
+#define BTN_BREAKPAGE 61
+#define BTN_BREAKCOLUMN 62
+#define BTN_PAGEBREAKBEFORE 63
+#define BTN_PAGEBREAKAFTER 64
+#define BTN_PAGECOLL 65
+#define LB_PAGECOLL 66
+#define BTN_KEEPTOGETHER 67
+#define BTN_WIDOWS 68
+#define ED_WIDOWS 69
+#define FT_WIDOWS 70
+#define BTN_ORPHANS 71
+#define ED_ORPHANS 72
+#define FT_ORPHANS 73
+#define GB_OPTIONS 74
+#define FT_PAGENUM 75
+#define ED_PAGENUM 76
+
+#define CB_KEEPTOGETHER 80
+#define FT_MAXHYPH 81
+#define ED_MAXHYPH 83
+
+#define CB_REGISTER 84
+#define GB_REGISTER 85
+
+
+#endif
+
diff --git a/svx/source/dialog/paragrph.src b/svx/source/dialog/paragrph.src
new file mode 100644
index 0000000000..ea832f3806
--- /dev/null
+++ b/svx/source/dialog/paragrph.src
@@ -0,0 +1,1964 @@
+/*************************************************************************
+ *
+ * $RCSfile: paragrph.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 "paragrph.hrc"
+
+ // RID_SVXPAGE_STD_PARAGRAPH ---------------------------------------------
+TabPage RID_SVXPAGE_STD_PARAGRAPH
+{
+ HelpId = HID_FORMAT_PARAGRAPH_STD ;
+ Hide = TRUE ;
+ Text = "Einzüge und Abstände" ;
+ Text [ English ] = "Paragraph" ;
+ Text [ norwegian ] = "Avsnitt" ;
+ Text [ italian ] = "Rientri e interlinee" ;
+ Text [ portuguese_brazilian ] = "Parágrafo" ;
+ Text [ portuguese ] = "Avanços e espaçamento" ;
+ Text [ finnish ] = "Kappale" ;
+ Text [ danish ] = "Indrykning og mellemrum" ;
+ Text [ french ] = "Retraits et écarts" ;
+ Text [ swedish ] = "Indrag och avstånd" ;
+ Text [ dutch ] = "Inspringingen en afstanden" ;
+ Text [ spanish ] = "Sangrías y espacios" ;
+ Text [ english_us ] = "Indents and Spacing" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_LEFTINDENT
+ {
+ Pos = MAP_APPFONT ( 12 , 15 ) ;
+ Size = MAP_APPFONT ( 35 , 10 ) ;
+ Text = "Von ~links" ;
+ Text [ ENGLISH ] = "From ~left" ;
+ Text [ norwegian ] = "Fra ~venstre" ;
+ Text [ italian ] = "Da ~sinistra" ;
+ Text [ portuguese_brazilian ] = "Da ~esquerda" ;
+ Text [ portuguese ] = "~Esquerda" ;
+ Text [ finnish ] = "~Vasemmalta" ;
+ Text [ danish ] = "Fra venstre" ;
+ Text [ french ] = "De ~gauche" ;
+ Text [ swedish ] = "Från ~vänster" ;
+ Text [ dutch ] = "Van ~links" ;
+ Text [ spanish ] = "De i~zquierda" ;
+ Text [ english_us ] = "From ~left" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "´Ó×ó(~L)";
+ Text[ russian ] = "Ñëåâà";
+ Text[ polish ] = "Z lewej";
+ Text[ japanese ] = "¶‚©‚ç(~L)";
+ Text[ chinese_traditional ] = "±q¥ª(~L)";
+ Text[ arabic ] = "ãä ÇáíÓÇÑ";
+ Text[ greek ] = "Aðü áñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂʺÎÅÍ(~L)";
+ Text[ turkish ] = "S~oldan";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_LEFTINDENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 55 , 14 ) ;
+ Size = MAP_APPFONT ( 35 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_RIGHTINDENT
+ {
+ Pos = MAP_APPFONT ( 93 , 15 ) ;
+ Size = MAP_APPFONT ( 35 , 10 ) ;
+ Text = "Von ~rechts" ;
+ Text [ ENGLISH ] = "From ri~ght" ;
+ Text [ norwegian ] = "Fra hø~yre" ;
+ Text [ italian ] = "Da de~stra" ;
+ Text [ portuguese_brazilian ] = "Da dire~ita" ;
+ Text [ portuguese ] = "~Direita" ;
+ Text [ finnish ] = "~Oikealta" ;
+ Text [ danish ] = "Fra højre" ;
+ Text [ french ] = "De ~droite" ;
+ Text [ swedish ] = "Från ~höger" ;
+ Text [ dutch ] = "Van ~rechts" ;
+ Text [ spanish ] = "De derec~ha" ;
+ Text [ english_us ] = "From rig~ht" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "´ÓÓÒ(~H)";
+ Text[ russian ] = "Ñïðàâà";
+ Text[ polish ] = "Z prawej";
+ Text[ japanese ] = "‰E‚©‚ç(~H)";
+ Text[ chinese_traditional ] = "±q¥k(~H)";
+ Text[ arabic ] = "ãä Çáíãíä";
+ Text[ greek ] = "Áðü äåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂʺÎÅÍ(~H)";
+ Text[ turkish ] = "Sa~ðdan";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_RIGHTINDENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 135 , 14 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_FLINEINDENT
+ {
+ Pos = MAP_APPFONT ( 12 , 34 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "Erste Ze~ile" ;
+ Text [ ENGLISH ] = "F~irst line" ;
+ Text [ norwegian ] = "F~ørste linje" ;
+ Text [ italian ] = "Pri~ma riga" ;
+ Text [ portuguese_brazilian ] = "P~rimeira linha" ;
+ Text [ portuguese ] = "1ª li~nha" ;
+ Text [ finnish ] = "~Ensimmäinen rivi" ;
+ Text [ danish ] = "Første linje" ;
+ Text [ french ] = "1ère ~ligne" ;
+ Text [ swedish ] = "F~örsta raden" ;
+ Text [ dutch ] = "~Eerste regel" ;
+ Text [ spanish ] = "Pri~m. línea" ;
+ Text [ english_us ] = "~First line" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "µÚÒ»ÐÐ(~F)";
+ Text[ russian ] = "1-àÿ ñòðîêà";
+ Text[ polish ] = "Pierw. wiersz";
+ Text[ japanese ] = "ʼn‚Ìs(~F)";
+ Text[ chinese_traditional ] = "²Ä¤@¦æ(~F)";
+ Text[ arabic ] = "ÇáÓØÑ ÇáÃæá";
+ Text[ greek ] = "Ðñþôç ãñáììÞ";
+ Text[ korean ] = "ù ÁÙ(~F)";
+ Text[ turkish ] = "Ýlk ~satýr";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_FLINEINDENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 55 , 33 ) ;
+ Size = MAP_APPFONT ( 35 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -9999 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ First = -9999 ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ CheckBox CB_AUTO
+ {
+ Pos = MAP_APPFONT ( 93 , 34 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Hide = TRUE ;
+ Text = "~Automatisch" ;
+ Text [ ENGLISH ] = "~Automatic" ;
+ Text [ portuguese ] = "~Automaticamente" ;
+ Text [ english_us ] = "~Automatic" ;
+ Text [ portuguese_brazilian ] = "~Automatisch" ;
+ Text [ swedish ] = "~Automatiskt" ;
+ Text [ danish ] = "Automatisk" ;
+ Text [ italian ] = "~Automatico" ;
+ Text [ spanish ] = "Auto~mático" ;
+ Text [ french ] = "~Automatique" ;
+ Text [ dutch ] = "~Automatisch" ;
+ Text[ chinese_simplified ] = "×Ô¶¯(~A)";
+ Text[ russian ] = "Àâòîìàòè÷åñêè";
+ Text[ polish ] = "Automatycznie";
+ Text[ japanese ] = "Ž©“®(~A)";
+ Text[ chinese_traditional ] = "¦Û°Ê(~A)";
+ Text[ arabic ] = "ÊáÞÇÆíÇð";
+ Text[ greek ] = "Áõôüìáôá";
+ Text[ korean ] = "ÀÚµ¿(~A)";
+ Text[ turkish ] = "~Otomatik";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_INDENT
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 172 , 45 ) ;
+ Text = "Einzug" ;
+ Text [ ENGLISH ] = "Indent" ;
+ Text [ norwegian ] = "Innrykk" ;
+ Text [ italian ] = "Rientro" ;
+ Text [ portuguese_brazilian ] = "Indentar" ;
+ Text [ portuguese ] = "Avanço de parágrafo" ;
+ Text [ finnish ] = "Sisennys" ;
+ Text [ danish ] = "Indrykning" ;
+ Text [ french ] = "Retrait" ;
+ Text [ swedish ] = "Indrag" ;
+ Text [ dutch ] = "Inspringen" ;
+ Text [ spanish ] = "Sangría" ;
+ Text [ english_us ] = "Indent" ;
+ Text[ chinese_simplified ] = "Ëõ½ø";
+ Text[ russian ] = "Îòñóï";
+ Text[ polish ] = "Wciêcie akapitu";
+ Text[ japanese ] = "²ÝÃÞÝÄ";
+ Text[ chinese_traditional ] = "ÁY±Æ";
+ Text[ arabic ] = "ÇáÅÒÇÍÉ";
+ Text[ greek ] = "Åóï÷Þ";
+ Text[ korean ] = "µé¿© ¾²±â";
+ Text[ turkish ] = "Girinti";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_TOPDIST
+ {
+ Pos = MAP_APPFONT ( 12 , 64 ) ;
+ Size = MAP_APPFONT ( 44 , 10 ) ;
+ Text = "~Oben" ;
+ Text [ ENGLISH ] = "T~o top" ;
+ Text [ norwegian ] = "T~il topp" ;
+ Text [ italian ] = "Dall'al~to" ;
+ Text [ portuguese_brazilian ] = "P~ara o topo" ;
+ Text [ portuguese ] = "~Superior" ;
+ Text [ finnish ] = "Ylhäältä" ;
+ Text [ danish ] = "Foroven" ;
+ Text [ french ] = "En ~haut" ;
+ Text [ swedish ] = "~Överkant" ;
+ Text [ dutch ] = "~Boven" ;
+ Text [ spanish ] = "~Arriba" ;
+ Text [ english_us ] = "~Top" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "Éϲ¿(~T)";
+ Text[ russian ] = "Ââåðõó";
+ Text[ polish ] = "W górze";
+ Text[ japanese ] = "ã(~T)";
+ Text[ chinese_traditional ] = "¦V¤W(~T)";
+ Text[ arabic ] = "ÃÚáì";
+ Text[ greek ] = "ÐÜíù";
+ Text[ korean ] = "ˤ(~T)";
+ Text[ turkish ] = "~Üst";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_TOPDIST
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 58 , 63 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_BOTTOMDIST
+ {
+ Pos = MAP_APPFONT ( 12 , 83 ) ;
+ Size = MAP_APPFONT ( 44 , 10 ) ;
+ Text = "~Unten" ;
+ Text [ ENGLISH ] = "To ~bottom" ;
+ Text [ norwegian ] = "Til ~bunn" ;
+ Text [ italian ] = "Dal ~basso" ;
+ Text [ portuguese_brazilian ] = "Para a ~base" ;
+ Text [ portuguese ] = "~Inferior" ;
+ Text [ finnish ] = "~Alhaalta" ;
+ Text [ danish ] = "Forneden" ;
+ Text [ french ] = "En ~bas" ;
+ Text [ swedish ] = "~Underkant" ;
+ Text [ dutch ] = "Be~neden" ;
+ Text [ spanish ] = "A~bajo" ;
+ Text [ english_us ] = "~Bottom" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ϲ¿(~B)";
+ Text[ russian ] = "Ñíèçó";
+ Text[ polish ] = "W dole";
+ Text[ japanese ] = "‰º(~B)";
+ Text[ chinese_traditional ] = "¦V¤U(~B)";
+ Text[ arabic ] = "ÃÓÝá";
+ Text[ greek ] = "ÊÜôù";
+ Text[ korean ] = "¾Æ·¡(~B)";
+ Text[ turkish ] = "~Alt";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_BOTTOMDIST
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 58 , 82 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ GroupBox GB_DIST
+ {
+ Pos = MAP_APPFONT ( 6 , 52 ) ;
+ Size = MAP_APPFONT ( 98 , 50 ) ;
+ Text = "Abstand" ;
+ Text [ ENGLISH ] = "Distance" ;
+ Text [ norwegian ] = "Avstand" ;
+ Text [ italian ] = "Distanza" ;
+ Text [ portuguese_brazilian ] = "Distância" ;
+ Text [ portuguese ] = "Espaçamento" ;
+ Text [ finnish ] = "Etäisyys" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ french ] = "Écart" ;
+ Text [ swedish ] = "Avstånd" ;
+ Text [ dutch ] = "Afstand" ;
+ Text [ spanish ] = "Espacio" ;
+ Text [ english_us ] = "Spacing" ;
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ polish ] = "Odstêp";
+ Text[ japanese ] = "ŠÔŠu";
+ Text[ chinese_traditional ] = "¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ";
+ Text[ greek ] = "Áðüóôáóç";
+ Text[ korean ] = "°£°Ý";
+ Text[ turkish ] = "Aralýk";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LINEDIST
+ {
+ Pos = MAP_APPFONT ( 118 , 63 ) ;
+ Size = MAP_APPFONT ( 55 , 72 ) ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Einzeilig" ; Default ; > ;
+ < "1,5zeilig" ; Default ; > ;
+ < "Zweizeilig" ; Default ; > ;
+ < "Proportional" ; Default ; > ;
+ < "Mindestens" ; Default ; > ;
+ /* ### ACHTUNG: Neuer Eintrag in Liste? 6 : Durchschuß*/
+ /* ### ACHTUNG: Neuer Eintrag in Liste? 6 : Durchschuß*/
+ < "Durchschuss" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Einzeilig" ; Default ; > ;
+ < "1,5zeilig" ; Default ; > ;
+ < "Zweizeilig" ; Default ; > ;
+ < "Proportional" ; Default ; > ;
+ < "Mindestens" ; Default ; > ;
+ < "Durchschuß" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Einzeilig" ; Default ; > ;
+ < "1,5zeilig" ; Default ; > ;
+ < "Zweizeilig" ; Default ; > ;
+ < "Proportional" ; Default ; > ;
+ < "Mindestens" ; Default ; > ;
+ < "Durchschuß" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Singola" ; Default ; > ;
+ < "1,5 righe" ; Default ; > ;
+ < "Doppia" ; Default ; > ;
+ < "Proporzionale" ; Default ; > ;
+ < "Almeno" ; Default ; > ;
+ < "Iniziale" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Einzeilig" ; Default ; > ;
+ < "1,5zeilig" ; Default ; > ;
+ < "Zweizeilig" ; Default ; > ;
+ < "Proportional" ; Default ; > ;
+ < "Mindestens" ; Default ; > ;
+ < "A esquerda" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Simples" ; Default ; > ;
+ < "1,5 linhas" ; Default ; > ;
+ < "Duas linhas" ; Default ; > ;
+ < "Proporcional" ; Default ; > ;
+ < "Mínimo" ; Default ; > ;
+ < "Entrelinha" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Einzeilig" ; Default ; > ;
+ < "1,5zeilig" ; Default ; > ;
+ < "Zweizeilig" ; Default ; > ;
+ < "Proportional" ; Default ; > ;
+ < "Mindestens" ; Default ; > ;
+ < "Durchschuß" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Enkelt" ; Default ; > ;
+ < "Halvanden" ; Default ; > ;
+ < "Dobbelt" ; Default ; > ;
+ < "Proportional" ; Default ; > ;
+ < "Mindst" ; Default ; > ;
+ < "Skydning" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Simple" ; Default ; > ;
+ < "1,5 ligne" ; Default ; > ;
+ < "Double" ; Default ; > ;
+ < "Proportionnel" ; Default ; > ;
+ < "Minimum" ; Default ; > ;
+ < "Typographique" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Enkelt" ; Default ; > ;
+ < "1,5 rad" ; Default ; > ;
+ < "Dubbelt" ; Default ; > ;
+ < "Proportionellt" ; Default ; > ;
+ < "Minst" ; Default ; > ;
+ < "Eget radavstånd" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Een regel" ; Default ; > ;
+ < "1,5 regel" ; Default ; > ;
+ < "Twee regels" ; Default ; > ;
+ < "Proportioneel" ; Default ; > ;
+ < "Minstens" ; Default ; > ;
+ < "Interlinie" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Sencillo" ; Default ; > ;
+ < "1,5 líneas" ; Default ; > ;
+ < "Doble" ; Default ; > ;
+ < "Proporcional" ; Default ; > ;
+ < "Mínimo" ; Default ; > ;
+ < "Regleta" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Single" ; Default ; > ;
+ < "1.5 Lines" ; Default ; > ;
+ < "Double" ; Default ; > ;
+ < "Proportional" ; Default ; > ;
+ < "At Least" ; Default ; > ;
+ < "Leading" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "µ¥ÐÐ" ; Default ; > ;
+ < "1,5 ÐÐ" ; Default ; > ;
+ < "Ë«ÐÐ" ; Default ; > ;
+ < "³É±ÈÀý" ; Default ; > ;
+ < "ÖÁÉÙ" ; Default ; > ;
+ < "Ðмä¾àÀë" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Îäèíàðíûé" ; Default ; > ;
+ < "Ïîëóòîðíûé" ; Default ; > ;
+ < "Äâîéíîé" ; Default ; > ;
+ < "Ïðîïîðöèîíàëüíûé" ; Default ; > ;
+ < "Ìèíèìàëüíûé" ; Default ; > ;
+ < "Ìíîæèòåëü" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Jednowierszowy" ; Default ; > ;
+ < "1,5 wiersza" ; Default ; > ;
+ < "Dwuwierszowy" ; Default ; > ;
+ < "Proporcjonalny" ; Default ; > ;
+ < "Minimum" ; Default ; > ;
+ < "Dodatk. odstêp wiersza" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "1s" ; Default ; > ;
+ < "1.5s" ; Default ; > ;
+ < "2s" ; Default ; > ;
+ < "‹Ï“™" ; Default ; > ;
+ < "Ŭ" ; Default ; > ;
+ < "sŠÔ—]”’" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "³æ¦æ" ; Default ; > ;
+ < "1,5 ¦æ" ; Default ; > ;
+ < "Âù¦æ" ; Default ; > ;
+ < "¦¨¤ñ¨Ò" ; Default ; > ;
+ < "¦Ü¤Ö" ; Default ; > ;
+ < "«e¾É¦r¤¸" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÓØÑ æÇÍÏ" ; Default ; > ;
+ < "ÓØÑ æäÕÝ" ; Default ; > ;
+ < "ÓØÑíä" ; Default ; > ;
+ < "ÊäÇÓÈí" ; Default ; > ;
+ < "ÃÏäì" ; Default ; > ;
+ < "ÅÖÇÝí" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÁðëÞ" ; Default ; > ;
+ < "1,5 ãñáììÞ" ; Default ; > ;
+ < "Äéðëü" ; Default ; > ;
+ < "ÁíáëïãéêÜ" ; Default ; > ;
+ < "ÔïõëÜ÷éóôïí" ; Default ; > ;
+ < "ÄéÜóôé÷ï" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "1ÁÙ" ; Default ; > ;
+ < "1.5 ÁÙ" ; Default ; > ;
+ < "2 ÁÙ" ; Default ; > ;
+ < "ºñ·Ê" ; Default ; > ;
+ < "ÃÖ¼Ò" ; Default ; > ;
+ < "Çà°£ ¿©¹é" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Tek satýr" ; Default ; > ;
+ < "1,5 satýr" ; Default ; > ;
+ < "Ýki satýr" ; Default ; > ;
+ < "Orantýlý" ; Default ; > ;
+ < "En az" ; Default ; > ;
+ < "Satýr aralýðý" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ String ST_LINEDIST_ABS
+ {
+ Text = "Fest" ;
+ Text [ English ] = "Fix" ;
+ Text [ english_us ] = "Fixed" ;
+ Text [ portuguese_brazilian ] = "Fest" ;
+ Text [ swedish ] = "Fast" ;
+ Text [ danish ] = "Fast" ;
+ Text [ italian ] = "Fissa" ;
+ Text [ spanish ] = "Fijo" ;
+ Text [ french ] = "Fixé" ;
+ Text [ dutch ] = "Vast" ;
+ Text [ portuguese ] = "Fixo" ;
+ Text[ chinese_simplified ] = "¹Ì¶¨";
+ Text[ russian ] = "Òî÷íûé";
+ Text[ polish ] = "Sta³y";
+ Text[ japanese ] = "΁Տ";
+ Text[ chinese_traditional ] = "©T©w";
+ Text[ arabic ] = "ËÇÈÊ";
+ Text[ greek ] = "ÓôáèåñÜ";
+ Text[ korean ] = "°íÁ¤";
+ Text[ turkish ] = "Sabit";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_LINEDIST
+ {
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 118 , 83 ) ;
+ Size = MAP_APPFONT ( 15 , 10 ) ;
+ Text = "vo~n" ;
+ Text [ ENGLISH ] = "~of" ;
+ Text [ english_us ] = "of" ;
+ Left = TRUE ;
+ Text [ portuguese_brazilian ] = "~em" ;
+ Text [ swedish ] = "~med" ;
+ Text [ danish ] = "på" ;
+ Text [ italian ] = "~di" ;
+ Text [ spanish ] = "~de" ;
+ Text [ french ] = "~De" ;
+ Text [ dutch ] = "~van" ;
+ Text [ portuguese ] = "de" ;
+ Text[ chinese_simplified ] = "ÓÉ";
+ Text[ russian ] = "íà";
+ Text[ polish ] = "z";
+ Text[ japanese ] = "’²® (~B)";
+ Text[ chinese_traditional ] = "¥Ñ";
+ Text[ arabic ] = "ÈãÞÏÇÑ";
+ Text[ greek ] = "áðü";
+ Text[ korean ] = "ÀÇ";
+ Text[ turkish ] = "De~ð.";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_LINEDISTPERCENT
+ {
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 136 , 82 ) ;
+ Size = MAP_APPFONT ( 37 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 50 ;
+ Maximum = 200 ;
+ Value = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ First = 50 ;
+ Last = 200 ;
+ SpinSize = 1 ;
+ };
+ MetricField ED_LINEDISTMETRIC
+ {
+ Disable = TRUE ;
+ Border = TRUE ;
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 136 , 82 ) ;
+ Size = MAP_APPFONT ( 37 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ GroupBox GB_LINEDIST
+ {
+ Pos = MAP_APPFONT ( 110 , 52 ) ;
+ Size = MAP_APPFONT ( 67 , 50 ) ;
+ Text = "Zeilenabstand" ;
+ Text [ ENGLISH ] = "Line spacing" ;
+ Text [ norwegian ] = "Linjeavstand" ;
+ Text [ italian ] = "Interlinea" ;
+ Text [ portuguese_brazilian ] = "Espaçamento de linha" ;
+ Text [ portuguese ] = "Entrelinhas" ;
+ Text [ finnish ] = "Riviväli" ;
+ Text [ danish ] = "Linjeafstand" ;
+ Text [ french ] = "Interligne" ;
+ Text [ swedish ] = "Radavstånd" ;
+ Text [ dutch ] = "Regelafstand" ;
+ Text [ spanish ] = "Interlineado" ;
+ Text [ english_us ] = "Line spacing" ;
+ Text[ chinese_simplified ] = "Ðоà";
+ Text[ russian ] = "ìåæäó ñòðîêàìè";
+ Text[ polish ] = "Odstêp wierszy";
+ Text[ japanese ] = "sŠÔ";
+ Text[ chinese_traditional ] = "¦æ¶Z";
+ Text[ arabic ] = "ÊÈÇÚÏ ÇáÃÓØÑ";
+ Text[ greek ] = "ÄéÜóôé÷ï";
+ Text[ korean ] = "ÁÙ°£°Ý";
+ Text[ turkish ] = "Satýr aralýðý";
+ Text[ language_user1 ] = " ";
+ };
+ Window WN_EXAMPLE
+ {
+ Pos = MAP_APPFONT ( 191 , 14 ) ;
+ Size = MAP_APPFONT ( 56 , 109 ) ;
+ };
+ GroupBox GB_EXAMPLE
+ {
+ Pos = MAP_APPFONT ( 185 , 3 ) ;
+ Size = MAP_APPFONT ( 68 , 126 ) ;
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_REGISTER
+ {
+ Pos = MAP_APPFONT ( 187 , 115 ) ;
+ Size = MAP_APPFONT ( 65 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Berü~cksichtigen : Ber³~cksichtigen */
+ /* ### ACHTUNG: Neuer Text in Resource? Berü~cksichtigen : Ber³~cksichtigen */
+ Text = "Berü~cksichtigen" ;
+ Text [ ENGLISH ] = "~Co~nsider" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "A~ctivate" ;
+ Text [ italian ] = "~Considera" ;
+ Text [ spanish ] = "Con~siderar" ;
+ Text [ french ] = "~Activer" ;
+ Text [ dutch ] = "~Activeren" ;
+ Text [ swedish ] = "~Ta hänsyn till" ;
+ Text [ danish ] = "Aktiver" ;
+ Text [ portuguese_brazilian ] = "Berü~cksichtigen" ;
+ Text [ portuguese ] = "~Considerar" ;
+ Text[ chinese_simplified ] = "¼¤»î";
+ Text[ russian ] = "Ñîáëþäàòü";
+ Text[ polish ] = "Uwzglêd~nij";
+ Text[ japanese ] = "‡‚킹‚é(~A)";
+ Text[ chinese_traditional ] = "¿E¬¡(~A)";
+ Text[ arabic ] = "äÔØ";
+ Text[ greek ] = "Å~íåñãïðïßçóç";
+ Text[ korean ] = "È°¼ºÈ­(~C)";
+ Text[ turkish ] = "Di~kkate al";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_REGISTER
+ {
+ Pos = MAP_APPFONT ( 185 , 105 ) ;
+ Size = MAP_APPFONT ( 68 , 26 ) ;
+ Text = "Registerhaltigkeit" ;
+ Text [ ENGLISH ] = "" ;
+ Hide = TRUE ;
+ Text [ italian ] = "Conformità registro" ;
+ Text [ spanish ] = "Conformidad registro" ;
+ Text [ french ] = "Contrôle de repérage" ;
+ Text [ dutch ] = "Registeren" ;
+ Text [ english_us ] = "Register-true" ;
+ Text [ swedish ] = "Register" ;
+ Text [ danish ] = "Hold register" ;
+ Text [ portuguese_brazilian ] = "Registerhaltigkeit" ;
+ Text [ portuguese ] = "Registo" ;
+ Text[ chinese_simplified ] = "Õý·´Ò³µÄÐоàÏàµÈ";
+ Text[ russian ] = "Ïðèâîäêà";
+ Text[ polish ] = "Jedn. wys. wierszy";
+ Text[ japanese ] = "ˆóüŒ©“–";
+ Text[ chinese_traditional ] = "¥¿¤Ï­¶ªº¦æ¶Z¬Ûµ¥";
+ Text[ arabic ] = "ÇáÇäÊÙÇã";
+ Text[ greek ] = "Åðéâåâáßùóç åããñáöÞò";
+ Text[ korean ] = "µî·Ï È®ÀÎ";
+ Text[ turkish ] = "Eþit satýr yüksekliði";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "Ëõ½øºÍ¼ä¸ô";
+ Text[ russian ] = "Îòñòóïû è èíòåðâàëû";
+ Text[ polish ] = "Wciêcia i odstêpy";
+ Text[ japanese ] = "²ÝÃÞÝÄ‚ÆsŠÔŠu";
+ Text[ chinese_traditional ] = "ÁY±Æ©M¶¡¹j";
+ Text[ arabic ] = "ÇáÅÒÇÍÉ æÇáÊÈÇÚÏ";
+ Text[ greek ] = "Åóï÷Ýò êáé áðïóôÜóåéò";
+ Text[ korean ] = "µé¿© ¾²±â¿Í °£°Ý";
+ Text[ turkish ] = "Girinti ve Aralýklar";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_ALIGN_PARAGRAPH ---------------------------------------------
+TabPage RID_SVXPAGE_ALIGN_PARAGRAPH
+{
+ HelpId = HID_FORMAT_PARAGRAPH_ALIGN ;
+ Hide = TRUE ;
+ Text = "Ausrichtung" ;
+ Text [ English ] = "Alignment" ;
+ Text [ english_us ] = "Alignment" ;
+ Text [ portuguese_brazilian ] = "Ausrichtung" ;
+ Text [ swedish ] = "Justering" ;
+ Text [ danish ] = "Justering" ;
+ Text [ italian ] = "Allineamento" ;
+ Text [ spanish ] = "Alineación" ;
+ Text [ french ] = "Alignement" ;
+ Text [ dutch ] = "Uitlijning" ;
+ Text [ portuguese ] = "Alinhamento" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ GroupBox GB_ALIGN
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 173 , 126 ) ;
+ Text = "Optionen" ;
+ Text [ ENGLISH ] = "Options" ;
+ Text [ norwegian ] = "Options" ;
+ Text [ italian ] = "Opzioni" ;
+ Text [ portuguese_brazilian ] = "Opções" ;
+ Text [ portuguese ] = "Opções" ;
+ Text [ finnish ] = "Määritykset" ;
+ Text [ danish ] = "Indstillinger" ;
+ Text [ french ] = "Options" ;
+ Text [ swedish ] = "Alternativ" ;
+ Text [ dutch ] = "Opties" ;
+ Text [ spanish ] = "Opciones" ;
+ Text [ english_us ] = "Options" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "Ñ¡Ïî";
+ Text[ russian ] = "Ïàðàìåòðû";
+ Text[ polish ] = "Opcje";
+ Text[ japanese ] = "µÌß¼®Ý";
+ Text[ chinese_traditional ] = "¿ï¶µ";
+ Text[ arabic ] = "ÇáÎíÇÑÇÊ";
+ Text[ greek ] = "ÅðéëïãÝò";
+ Text[ korean ] = "¿É¼Ç";
+ Text[ turkish ] = "Seçenekler";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_LEFTALIGN
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 161 , 10 ) ;
+ Text = "Lin~ks" ;
+ Text [ ENGLISH ] = "Le~ft" ;
+ Text [ norwegian ] = "Ve~nstre" ;
+ Text [ italian ] = "~Sinistro" ;
+ Text [ portuguese_brazilian ] = "Esq~uerda" ;
+ Text [ portuguese ] = "Esq~uerda" ;
+ Text [ finnish ] = "~Vasen" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ french ] = "~À gauche" ;
+ Text [ swedish ] = "~Vänster" ;
+ Text [ dutch ] = "L~inks" ;
+ Text [ spanish ] = "I~zquierda" ;
+ Text [ english_us ] = "~Left" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "Ïò×ó(~L)";
+ Text[ russian ] = "Ñëåâà";
+ Text[ polish ] = "Z ~lewej";
+ Text[ japanese ] = "¶‘µ‚¦(~L)";
+ Text[ chinese_traditional ] = "¦V¥ª(~L)";
+ Text[ arabic ] = "íÓÇÑ";
+ Text[ greek ] = "ÁñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ ¸ÂÃã(~L)";
+ Text[ turkish ] = "So~l";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_RIGHTALIGN
+ {
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
+ Size = MAP_APPFONT ( 161 , 10 ) ;
+ Text = "Rech~ts" ;
+ Text [ ENGLISH ] = "Righ~t" ;
+ Text [ norwegian ] = "Høyr~e" ;
+ Text [ italian ] = "Dest~ro" ;
+ Text [ portuguese_brazilian ] = "Dire~ita" ;
+ Text [ portuguese ] = "~Direita" ;
+ Text [ finnish ] = "~Oikea" ;
+ Text [ danish ] = "Højre" ;
+ Text [ french ] = "À droi~te" ;
+ Text [ swedish ] = "Höge~r" ;
+ Text [ dutch ] = "Re~chts" ;
+ Text [ spanish ] = "~Derecha" ;
+ Text [ english_us ] = "Righ~t" ;
+ Text[ chinese_simplified ] = "ÏòÓÒ(~T)";
+ Text[ russian ] = "Ñïðàâà";
+ Text[ polish ] = "Z pra~wej";
+ Text[ japanese ] = "‰E‘µ‚¦(~T)";
+ Text[ chinese_traditional ] = "¦V¥k(~T)";
+ Text[ arabic ] = "íãíä";
+ Text[ greek ] = "ÄåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ(~T)";
+ Text[ turkish ] = "Sa~ð";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_CENTERALIGN
+ {
+ Pos = MAP_APPFONT ( 12 , 40 ) ;
+ Size = MAP_APPFONT ( 161 , 10 ) ;
+ Text = "Z~entriert" ;
+ Text [ ENGLISH ] = "~Center" ;
+ Text [ norwegian ] = "~Center" ;
+ Text [ italian ] = "~Centrato" ;
+ Text [ portuguese_brazilian ] = "~Centro" ;
+ Text [ portuguese ] = "~Centro" ;
+ Text [ finnish ] = "~Keski" ;
+ Text [ danish ] = "Centreret" ;
+ Text [ french ] = "~Centré" ;
+ Text [ swedish ] = "C~entrerat" ;
+ Text [ dutch ] = "~Gecentreerd" ;
+ Text [ spanish ] = "~Centrado" ;
+ Text [ english_us ] = "~Center" ;
+ Text[ chinese_simplified ] = "¾ÓÖÐ(~C)";
+ Text[ russian ] = "Ïî öåíòðó";
+ Text[ polish ] = "Wyœrodkuj";
+ Text[ japanese ] = "’†‰›‘µ‚¦(~C)";
+ Text[ chinese_traditional ] = "¸m¤¤(~C)";
+ Text[ arabic ] = "ÊæÓíØ";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá";
+ Text[ korean ] = "°¡¿îµ¥ ¸ÂÃã(~C)";
+ Text[ turkish ] = "~Ortala";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_JUSTIFYALIGN
+ {
+ Pos = MAP_APPFONT ( 12 , 53 ) ;
+ Size = MAP_APPFONT ( 161 , 10 ) ;
+ Text = "~Blocksatz" ;
+ Text [ ENGLISH ] = "~Justified" ;
+ Text [ norwegian ] = "~Stillt inn" ;
+ Text [ italian ] = "~Giustificato" ;
+ Text [ portuguese_brazilian ] = "~Justificado" ;
+ Text [ portuguese ] = "~Justificado" ;
+ Text [ finnish ] = "~Reunat" ;
+ Text [ danish ] = "Lige margener" ;
+ Text [ french ] = "~Justifié" ;
+ Text [ swedish ] = "~Marginaljustering" ;
+ Text [ dutch ] = "~Uitgevuld" ;
+ Text [ spanish ] = "~Justificado" ;
+ Text [ english_us ] = "Justified" ;
+ Text[ chinese_simplified ] = "×óÓÒ¶ÔÆë(~J)";
+ Text[ russian ] = "Ïî øèðèíå";
+ Text[ polish ] = "Wyjust~uj";
+ Text[ japanese ] = "‹Ï“™Š„•t(~J)";
+ Text[ chinese_traditional ] = "¥ª¥k¹ï»ô(~J)";
+ Text[ arabic ] = "ÖÈØ";
+ Text[ greek ] = "ÐëÞñçò óôïß÷éóç";
+ Text[ korean ] = "¾çÂÊ ¸ÂÃã(~J)";
+ Text[ turkish ] = "~Ýki yana yasla";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_LASTLINE
+ {
+ Pos = MAP_APPFONT ( 20 , 67 ) ;
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ Text = "~Letzte Zeile" ;
+ Text [ ENGLISH ] = "Last line" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "~Last line" ;
+ Text [ portuguese_brazilian ] = "~Letzte Zeile" ;
+ Text [ swedish ] = "~Sista raden" ;
+ Text [ danish ] = "Sidste linje" ;
+ Text [ italian ] = "Ultima riga" ;
+ Text [ spanish ] = "Ú~ltima línea" ;
+ Text [ french ] = "~Dernière ligne" ;
+ Text [ dutch ] = "~Laatste regel" ;
+ Text [ portuguese ] = "~Última linha" ;
+ Text[ chinese_simplified ] = "×îºóÒ»ÐÐ(~L)";
+ Text[ russian ] = "Ïîñëåäíÿÿ ñòðîêà";
+ Text[ polish ] = "Ostatni wiersz";
+ Text[ japanese ] = "ÅŒã‚Ìs(~L)";
+ Text[ chinese_traditional ] = "³Ì«á¤@¦æ(~L)";
+ Text[ arabic ] = "ÇáÓØÑ ÇáÃÎíÑ";
+ Text[ greek ] = "Ôåëåõôáßá ãñáììÞ";
+ Text[ korean ] = "¸¶Áö¸· ÁÙ(~L)";
+ Text[ turkish ] = "So~n satýr";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LASTLINE
+ {
+ Pos = MAP_APPFONT ( 74 , 66 ) ;
+ Size = MAP_APPFONT ( 70 , 50 ) ;
+ DropDown = TRUE ;
+ Hide = TRUE ;
+ StringList =
+ {
+ < "Links" ; Default ; > ;
+ < "Zentriert" ; Default ; > ;
+ < "Blocksatz" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Links" ; Default ; > ;
+ < "Zentriert" ; Default ; > ;
+ < "Blocksatz" ; Default ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Left" ; Default ; > ;
+ < "Centered" ; Default ; > ;
+ < "Justified" ; Default ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Links" ; Default ; > ;
+ < "Zentriert" ; Default ; > ;
+ < "Blocksatz" ; Default ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Vänster" ; Default ; > ;
+ < "Centrerad" ; Default ; > ;
+ < "Marginaljusterad" ; Default ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Venstre" ; Default ; > ;
+ < "Centreret" ; Default ; > ;
+ < "Lige margener" ; Default ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Sinistra" ; Default ; > ;
+ < "Centrato" ; Default ; > ;
+ < "Giustificato" ; Default ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Izquierda" ; Default ; > ;
+ < "Centrado" ; Default ; > ;
+ < "Justificada" ; Default ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "À gauche" ; Default ; > ;
+ < "Centré" ; Default ; > ;
+ < "Justifié" ; Default ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Links" ; Default ; > ;
+ < "Gecentreerd" ; Default ; > ;
+ < "Uitgelijnd" ; Default ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Esquerda" ; Default ; > ;
+ < "Centrado" ; Default ; > ;
+ < "Justificado" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "Ïò×ó" ; Default ; > ;
+ < "¾ÓÖÐ" ; Default ; > ;
+ < "×óÓÒ¶ÔÆë" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ñëåâà" ; Default ; > ;
+ < "Ïî öåíòðó" ; Default ; > ;
+ < "Ïî øèðèíå" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Z lewej" ; Default ; > ;
+ < "Wyœrodkowany" ; Default ; > ;
+ < "Wyjustuj" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "¶‘µ‚¦" ; Default ; > ;
+ < "’†‰›‘µ‚¦" ; Default ; > ;
+ < "‹Ï“™Š„•t" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¦V¥ª" ; Default ; > ;
+ < "¸m¤¤" ; Default ; > ;
+ < "¥ª¥k¹ï»ô" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "íÓÇÑ" ; Default ; > ;
+ < "ÊæÓíØ" ; Default ; > ;
+ < "ÖÈØ" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÁñéóôåñÜ" ; Default ; > ;
+ < "ÊåíôñáñéóìÝíá" ; Default ; > ;
+ < "ÐëÞñçò óôïß÷éóç" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "¿ÞÂÊ" ; Default ; > ;
+ < "°¡¿îµ¥" ; Default ; > ;
+ < "¾çÂÊ ¸ÂÃã" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Sol" ; Default ; > ;
+ < "Ortala" ; Default ; > ;
+ < "Ýki yana yasla" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ CheckBox CB_EXPAND
+ {
+ Pos = MAP_APPFONT ( 20 , 81 ) ;
+ Size = MAP_APPFONT ( 153 , 12 ) ;
+ Hide = TRUE ;
+ Text = "Einzelnes ~Wort austreiben" ;
+ Text [ ENGLISH ] = "Expand single ~word" ;
+ Text [ english_us ] = "~Expand single word" ;
+ Text [ portuguese_brazilian ] = "Einzelnes ~Wort austreiben" ;
+ Text [ swedish ] = "~Expandera enstaka ord" ;
+ Text [ danish ] = "Udvid enkelt ord" ;
+ Text [ italian ] = "Giustificazione forzata" ;
+ Text [ spanish ] = "E~xpandir una palabra" ;
+ Text [ french ] = "Étirer un ~mot seul" ;
+ Text [ dutch ] = "Afzonderlijk ~woord verbreden" ;
+ Text [ portuguese ] = "Expandir uma só ~palavra" ;
+ Text[ chinese_simplified ] = "À­³¤µ¥¸ö×Ö(~E)";
+ Text[ russian ] = "Ðàçîãíàòü îäèíî÷íîå ñëîâî";
+ Text[ polish ] = "Rozszerz pojedyncze ~s³owo";
+ Text[ japanese ] = "ŒêŠÔ‚ðL‚­‚Æ‚é(~W)";
+ Text[ chinese_traditional ] = "©Ôªø³æ­Ó¦r«¬(~W)";
+ Text[ arabic ] = "ÊãÏíÏ ÇáßáãÉ ÇáãÝÑÏÉ";
+ Text[ greek ] = "ÅðÝêôáóç ìåìïíùìÝíçò ëÝîç~ò";
+ Text[ korean ] = "°³º° ´Ü¾î È®Àå(~E)";
+ Text[ turkish ] = "Son sözcüðü ~geniþlet";
+ Text[ language_user1 ] = " ";
+ };
+ Window WN_EXAMPLE
+ {
+ Pos = MAP_APPFONT ( 191 , 14 ) ;
+ Size = MAP_APPFONT ( 56 , 109 ) ;
+ };
+ GroupBox GB_EXAMPLE
+ {
+ Pos = MAP_APPFONT ( 185 , 3 ) ;
+ Size = MAP_APPFONT ( 68 , 126 ) ;
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå";
+ Text[ polish ] = "Wyrównanie";
+ Text[ japanese ] = "”z’u";
+ Text[ chinese_traditional ] = "¹ï»ô";
+ Text[ arabic ] = "ÇáãÍÇÐÇÉ";
+ Text[ greek ] = "Óôïß÷éóç";
+ Text[ korean ] = "¸ÂÃã";
+ Text[ turkish ] = "Hizalama";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_EXT_PARAGRAPH ---------------------------------------------
+TabPage RID_SVXPAGE_EXT_PARAGRAPH
+{
+ HelpId = HID_FORMAT_PARAGRAPH_EXT ;
+ Hide = TRUE ;
+ Text = "Textfluss" ;
+ Text [ English ] = "Paragraph Extensions" ;
+ Text [ norwegian ] = "Utvidelse av avsnitt" ;
+ Text [ italian ] = "Flusso di testo" ;
+ Text [ portuguese_brazilian ] = "Extens es de Parágrafo" ;
+ Text [ portuguese ] = "Fluxo de texto" ;
+ Text [ finnish ] = "Tekstin rivitys" ;
+ Text [ danish ] = "Tekstretning" ;
+ Text [ french ] = "Enchaînements" ;
+ Text [ swedish ] = "Textflöde" ;
+ Text [ dutch ] = "Tekstverloop" ;
+ Text [ spanish ] = "Flujo del texto" ;
+ Text [ english_us ] = "Text Flow" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ TriStateBox BTN_HYPHEN
+ {
+ Pos = MAP_APPFONT ( 9 , 15 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Auto~matisch : Auto~m. */
+ /* ### ACHTUNG: Neuer Text in Resource? Auto~matisch : Auto~m. */
+ Text = "Auto~matisch" ;
+ Text [ dutch ] = "Auto~matisch" ;
+ Text [ english_us ] = "A~utomatically" ;
+ Text [ italian ] = "Auto~matico" ;
+ Text [ spanish ] = "Au~tomático" ;
+ Text [ french ] = "Auto~matique" ;
+ Text [ swedish ] = "Auto~matisk" ;
+ Text [ danish ] = "Automatisk" ;
+ Text [ portuguese ] = "Auto~maticamente" ;
+ Text [ portuguese_brazilian ] = "Auto~m." ;
+ Text[ chinese_simplified ] = "×Ô¶¯(~U)";
+ Text[ russian ] = "Àâòîìàòè÷åñêè";
+ Text[ polish ] = "A~utomatycznie";
+ Text[ japanese ] = "Ž©“®(~U)";
+ Text[ chinese_traditional ] = "¦Û°Ê(~U)";
+ Text[ arabic ] = "ÊáÞÇÆí";
+ Text[ greek ] = "Áõôüìáôá";
+ Text[ korean ] = "ÀÚµ¿À¸·Î(~U)";
+ Text[ turkish ] = "Oto~matik";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_BEFORE
+ {
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 75 , 14 ) ;
+ Size = MAP_APPFONT ( 10 , 10 ) ;
+ Text = "~ab" ;
+ Text [ English ] = "~at" ;
+ Text [ norwegian ] = "~på" ;
+ Text [ italian ] = "~a" ;
+ Text [ portuguese_brazilian ] = "~em" ;
+ Text [ portuguese ] = "~em" ;
+ Text [ finnish ] = "~määrä" ;
+ Text [ danish ] = "fra" ;
+ Text [ french ] = "~pr" ;
+ Text [ swedish ] = "~från" ;
+ Text [ dutch ] = "~v.a." ;
+ Text [ spanish ] = "~en" ;
+ Text [ english_us ] = "~at" ;
+ Text[ chinese_simplified ] = "´Ó(~A)";
+ Text[ russian ] = "ñ";
+ Text[ polish ] = "od";
+ Text[ japanese ] = "s––(~A)";
+ Text[ chinese_traditional ] = "±q(~A)";
+ Text[ arabic ] = "ÇÈÊÏÇÁð ãä";
+ Text[ greek ] = "~áðü";
+ Text[ korean ] = "ºÎÅÍ(~A)";
+ Text[ turkish ] = "~asg.";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_HYPHENBEFORE
+ {
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 87 , 13 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 2 ;
+ Maximum = 9 ;
+ Value = 2 ;
+ First = 2 ;
+ Last = 9 ;
+ };
+ FixedText FT_HYPHENBEFORE
+ {
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 113 , 14 ) ;
+ Size = MAP_APPFONT ( 138 , 10 ) ;
+ Text = "Zeichen am Zeilenende" ;
+ Text [ ENGLISH ] = "Chars" ;
+ Text [ norwegian ] = "Tegn" ;
+ Text [ italian ] = "caratteri a fine riga" ;
+ Text [ portuguese_brazilian ] = "Caracteres" ;
+ Text [ portuguese ] = "Caracteres no fim da linha" ;
+ Text [ finnish ] = "Merkkiä" ;
+ Text [ danish ] = "tegn ved linjens slutning" ;
+ Text [ french ] = "Caractères en fin de ligne" ;
+ Text [ swedish ] = "tecken i slutet av raden" ;
+ Text [ dutch ] = "tekens aan einde van regel" ;
+ Text [ spanish ] = "carácter al final de la línea" ;
+ Text [ english_us ] = "Characters at line end" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ÐÐÄ©×Ö·û";
+ Text[ russian ] = "çíàêîâ â êîíöå ñòðîêè";
+ Text[ polish ] = "Znaki na koñcu wiersza";
+ Text[ japanese ] = "•¶ŽšˆÈã";
+ Text[ chinese_traditional ] = "¦æ¥½¤å¦r";
+ Text[ arabic ] = "ÃÍÑÝ Ýí äåÇíÉ ÇáÓØÑ";
+ Text[ greek ] = "×áñáêôÞñåò óôï ôÝëïò ôçò ãñáììÞò";
+ Text[ korean ] = "¸¶Áö¸· ÁÙ¿¡ Ç¥½Ã";
+ Text[ turkish ] = "satýrsonu karakteri";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_AFTER
+ {
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 75 , 27 ) ;
+ Size = MAP_APPFONT ( 10 , 10 ) ;
+ Text = "a~b" ;
+ Text [ English ] = "a~t" ;
+ Text [ norwegian ] = "p~å" ;
+ Text [ italian ] = "a~" ;
+ Text [ portuguese_brazilian ] = "e~m" ;
+ Text [ portuguese ] = "e~m" ;
+ Text [ finnish ] = "~kohta" ;
+ Text [ danish ] = "fra" ;
+ Text [ french ] = "p~r" ;
+ Text [ swedish ] = "f~rån" ;
+ Text [ dutch ] = "v.~a." ;
+ Text [ spanish ] = "e~n" ;
+ Text [ english_us ] = "a~t" ;
+ Text[ chinese_simplified ] = "´Ó(~T)";
+ Text[ russian ] = "ñ";
+ Text[ polish ] = "od";
+ Text[ japanese ] = "sһ(~T)";
+ Text[ chinese_traditional ] = "±q(~T)";
+ Text[ arabic ] = "ÇÈÊÏÇÁð ãä";
+ Text[ greek ] = "áðü";
+ Text[ korean ] = "ºÎÅÍ(~T)";
+ Text[ turkish ] = "a~sg.";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_HYPHENAFTER
+ {
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 87 , 26 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 2 ;
+ Maximum = 9 ;
+ Value = 2 ;
+ First = 2 ;
+ Last = 9 ;
+ };
+ FixedText FT_HYPHENAFTER
+ {
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 113 , 27 ) ;
+ Size = MAP_APPFONT ( 138 , 10 ) ;
+ Text = "Zeichen am Zeilenanfang" ;
+ Text [ ENGLISH ] = "Chars" ;
+ Text [ norwegian ] = "Tegn" ;
+ Text [ italian ] = "caratteri ad inizio riga" ;
+ Text [ portuguese_brazilian ] = "Caracteres" ;
+ Text [ portuguese ] = "Caracteres no início da linha" ;
+ Text [ finnish ] = "Merkkiä" ;
+ Text [ danish ] = "tegn ved linjens begyndelse" ;
+ Text [ french ] = "Caractères en début de ligne" ;
+ Text [ swedish ] = "tecken i början av raden" ;
+ Text [ dutch ] = "tekens aan begin van regel" ;
+ Text [ spanish ] = "carácter al comienzo de la línea" ;
+ Text [ english_us ] = "Characters at line begin" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ÐÐÊ××Ö·û";
+ Text[ russian ] = "çíàêîâ â íà÷àëå ñòðîêè";
+ Text[ polish ] = "Znaki na pocz¹tku wiersza";
+ Text[ japanese ] = "•¶ŽšˆÈã";
+ Text[ chinese_traditional ] = "¦æ­º¤å¦r";
+ Text[ arabic ] = "ÃÍÑÝ Ýí ÈÏÇíÉ ÇáÓØÑ";
+ Text[ greek ] = "×áñáêôÞñåò óôçí áñ÷Þ ôçò ãñáììÞò";
+ Text[ korean ] = "½ÃÀÛ ÁÙ¿¡ Ç¥½Ã";
+ Text[ turkish ] = "satýrbaþý karakteri";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MAXHYPH
+ {
+ Pos = MAP_APPFONT ( 36 , 40 ) ;
+ Size = MAP_APPFONT ( 215 , 10 ) ;
+ WordBreak = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Maximal aufeinanderfolgende Tr~ennstellen : Maximale Anzahl aufeinanderfolgender */
+ /* ### ACHTUNG: Neuer Text in Resource? Maximal aufeinanderfolgende Tr~ennstellen : Maximale Anzahl aufeinanderfolgender */
+ Text = "Maximal aufeinander folgende Tr~ennstellen" ;
+ Text [ ENGLISH ] = "Max. consecutive hyphens" ;
+ Text [ norwegian ] = "Maksimalt antall av følgende Bindestreke~r" ;
+ Text [ italian ] = "Sillabazioni successive:" ;
+ Text [ portuguese_brazilian ] = "Contagem máxima do seguinte" ;
+ Text [ portuguese ] = "~Máximo de hífens consecutivos" ;
+ Text [ finnish ] = "Seuraavien suurin määrä ~Tavuviivat" ;
+ Text [ danish ] = "Maksimalt antal orddelinger i række" ;
+ Text [ french ] = "Nombre ~maximal de coupures de mots consécutives" ;
+ Text [ swedish ] = "H~ögsta antal bindestreck efter varandra" ;
+ Text [ dutch ] = "~Max. aantal opeenvolgende scheidingstekens" ;
+ Text [ spanish ] = "Cantidad máxima de ~guiones consecutivos" ;
+ Text [ english_us ] = "~Maximum no. of consecutive hyphens" ;
+ Text[ chinese_simplified ] = "×î¶àÁ¬ÐøʹÓõÄÁ¬×ÖºÅÊýÄ¿(~M)";
+ Text[ russian ] = "Ìàêñèìàëüíî ïîñëåäîâàòåëüíûå ðàçäåëèòåëè";
+ Text[ polish ] = "Maksymalnie nastêpuj¹ce po sobie miejsca podzia³u";
+ Text[ japanese ] = "ʲÌÝ‚ÌÅ‚˜A‘±”(~M)";
+ Text[ chinese_traditional ] = "³Ì¦h³sÄò¨Ï¥Îªº³s¦r¸¹¼Æ¥Ø(~M)";
+ Text[ arabic ] = "ÇáÚÏÏ ÇáÃÞÕì áãäÇØÞ ÇáÝÕá ÇáãÊÊÇáíÉý";
+ Text[ greek ] = "ÌÝãéóôïò áñéèìüò äéáäï÷éêþí èÝó~åùí äéá÷ùñéóìïý";
+ Text[ korean ] = "ÃÖ´ë ¿¬¼Ó ÇÏÀÌÇ ¼ö(~M)";
+ Text[ turkish ] = "Azami ardýþýk ayýrma iþareti sa~yýsý";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_MAXHYPH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 9 , 39 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99 ;
+ Last = 99 ;
+ };
+ GroupBox GB_HYPHEN
+ {
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 254 , 56 ) ;
+ Text = "Silbentrennung" ;
+ Text [ ENGLISH ] = "Hyphenation" ;
+ Text [ norwegian ] = "Orddeling" ;
+ Text [ italian ] = "Sillabazione" ;
+ Text [ portuguese_brazilian ] = "Hifenação" ;
+ Text [ portuguese ] = "Divisão silábica" ;
+ Text [ finnish ] = "Tavutus" ;
+ Text [ danish ] = "Orddeling" ;
+ Text [ french ] = "Coupure de mots" ;
+ Text [ swedish ] = "Avstavning" ;
+ Text [ dutch ] = "Woordafbreking" ;
+ Text [ spanish ] = "Separación silábica" ;
+ Text [ english_us ] = "Hyphenation" ;
+ Text[ chinese_simplified ] = "Á¬×Ö·û";
+ Text[ russian ] = "Ðàññòàíîâêà ïåðåíîñîâ";
+ Text[ polish ] = "Dzielenie wyrazów";
+ Text[ japanese ] = "ʲÌÈ°¼®Ý";
+ Text[ chinese_traditional ] = "³s¦r²Å";
+ Text[ arabic ] = "ÝÕá ÇáãÞÇØÚ";
+ Text[ greek ] = "Óõëëáâéóìüò";
+ Text[ korean ] = "ÇÏÀÌÇ ³Ö±â";
+ Text[ turkish ] = "Heceleme";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox BTN_PAGEBREAK
+ {
+ // Disable = TRUE;
+ Pos = MAP_APPFONT ( 6 , 73 ) ;
+ Size = MAP_APPFONT ( 90 , 10 ) ;
+ Text = "~Umbruch" ;
+ Text [ ENGLISH ] = "~Break" ;
+ Text [ norwegian ] = "~Skift" ;
+ Text [ italian ] = "I~nterruzione" ;
+ Text [ portuguese_brazilian ] = "~Interrupção" ;
+ Text [ portuguese ] = "~Quebra" ;
+ Text [ finnish ] = "~Vaihto" ;
+ Text [ danish ] = "Skift" ;
+ Text [ french ] = "~Saut" ;
+ Text [ swedish ] = "~Brytning" ;
+ Text [ dutch ] = "~Afbreking" ;
+ Text [ spanish ] = "~Salto" ;
+ Text [ english_us ] = "~Break" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "»»Ò³(~B)";
+ Text[ russian ] = "Ðàçðûâ";
+ Text[ polish ] = "Podzia~³";
+ Text[ japanese ] = "‹æØ‚è(~B)";
+ Text[ chinese_traditional ] = "´«­¶(~B)";
+ Text[ arabic ] = "ÝÇÕá";
+ Text[ greek ] = "ÁëëáãÞ";
+ Text[ korean ] = "³ª´©±â(~B)";
+ Text[ turkish ] = "~Kesme";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_BREAKPAGE
+ {
+ // Disable = TRUE;
+ Pos = MAP_APPFONT ( 98 , 72 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "~Seite" ;
+ Text [ ENGLISH ] = "~Page" ;
+ Text [ norwegian ] = "~Page" ;
+ Text [ italian ] = "~Pagina" ;
+ Text [ portuguese_brazilian ] = "~Página" ;
+ Text [ portuguese ] = "~Página" ;
+ Text [ finnish ] = "~Sivu" ;
+ Text [ danish ] = "Side" ;
+ Text [ french ] = "~Page" ;
+ Text [ swedish ] = "Si~da" ;
+ Text [ dutch ] = "~Pagina" ;
+ Text [ spanish ] = "Pá~gina" ;
+ Text [ english_us ] = "~Page" ;
+ Group = TRUE ;
+ Check = TRUE ;
+ Text[ chinese_simplified ] = "Ò³(~P)";
+ Text[ russian ] = "Ñòðàíèöà";
+ Text[ polish ] = "~Strona";
+ Text[ japanese ] = "Íß°¼Þ(~P)";
+ Text[ chinese_traditional ] = "­¶(~P)";
+ Text[ arabic ] = "ÇáÕÝÍÉ";
+ Text[ greek ] = "Óåëßäá";
+ Text[ korean ] = "ÆäÀÌÁö(~P)";
+ Text[ turkish ] = "~Sayfa";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_BREAKCOLUMN
+ {
+ // Disable = TRUE;
+ Pos = MAP_APPFONT ( 137 , 72 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ // ### ACHTUNG: Neuer Text in Resource? S~palte : ~Spalte
+ Text = "S~palte" ;
+ Text [ ENGLISH ] = "~Column" ;
+ Text [ norwegian ] = "~Kolonne" ;
+ Text [ italian ] = "~Colonna" ;
+ Text [ portuguese_brazilian ] = "~Coluna" ;
+ Text [ portuguese ] = "~Coluna" ;
+ Text [ finnish ] = "~Palsta" ;
+ Text [ danish ] = "Spalte" ;
+ Text [ french ] = "~Colonne" ;
+ Text [ swedish ] = "~Kolumn" ;
+ Text [ dutch ] = "~Kolom" ;
+ Text [ spanish ] = "~Columna" ;
+ Text [ english_us ] = "Colu~mn" ;
+ Text[ chinese_simplified ] = "ÁÐ(~M)";
+ Text[ russian ] = "Ñòîëáåö";
+ Text[ polish ] = "Kolumna";
+ Text[ japanese ] = "—ñ(~M)";
+ Text[ chinese_traditional ] = "Äæ(~M)";
+ Text[ arabic ] = "ÚãæÏ";
+ Text[ greek ] = "ÓôÞëç";
+ Text[ korean ] = "¿­(~M)";
+ Text[ turkish ] = "S~ütun";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_PAGEBREAKBEFORE
+ {
+ // Disable = TRUE;
+ Pos = MAP_APPFONT ( 176 , 72 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "~davor" ;
+ Text [ ENGLISH ] = "be~fore" ;
+ Text [ norwegian ] = "f~ør" ;
+ Text [ italian ] = "~Prima" ;
+ Text [ portuguese_brazilian ] = "an~tes" ;
+ Text [ portuguese ] = "An~tes" ;
+ Text [ finnish ] = "~ennen" ;
+ Text [ danish ] = "Før" ;
+ Text [ french ] = "A~vant" ;
+ Text [ swedish ] = "Fö~re" ;
+ Text [ dutch ] = "~voor" ;
+ Text [ spanish ] = "De~lante" ;
+ Text [ english_us ] = "Be~fore" ;
+ Group = TRUE ;
+ Check = TRUE ;
+ Text[ chinese_simplified ] = "Ç°ÓÚ(~F)";
+ Text[ russian ] = "äî";
+ Text[ polish ] = "prz~ed";
+ Text[ japanese ] = "‹æØ‚è‘O(~F)";
+ Text[ chinese_traditional ] = "«e©ó(~F)";
+ Text[ arabic ] = "ÞÈá";
+ Text[ greek ] = "Ðñéí áðü";
+ Text[ korean ] = "±× Àü(~F)";
+ Text[ turkish ] = "~sonra";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_PAGEBREAKAFTER
+ {
+ // Disable = TRUE;
+ Pos = MAP_APPFONT ( 215 , 72 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "da~nach" ;
+ Text [ ENGLISH ] = "aft~er" ;
+ Text [ norwegian ] = "ett~er" ;
+ Text [ italian ] = "D~opo" ;
+ Text [ portuguese_brazilian ] = "dep~ois" ;
+ Text [ portuguese ] = "Dep~ois" ;
+ Text [ finnish ] = "~jälkeen" ;
+ Text [ danish ] = "Efter" ;
+ Text [ french ] = "a~près" ;
+ Text [ swedish ] = "Eft~er" ;
+ Text [ dutch ] = "~na" ;
+ Text [ spanish ] = "de~trás" ;
+ Text [ english_us ] = "Aft~er" ;
+ Text[ chinese_simplified ] = "Ö®ºó(~E)";
+ Text[ russian ] = "ïîñëå";
+ Text[ polish ] = "z~a";
+ Text[ japanese ] = "‹æØ‚èŒã(~E)";
+ Text[ chinese_traditional ] = "¤§«á(~E)";
+ Text[ arabic ] = "ÈÚÏ";
+ Text[ greek ] = "ìåôÜ áðü";
+ Text[ korean ] = "±× ´ÙÀ½(~E)";
+ Text[ turkish ] = "~önce";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox BTN_PAGECOLL
+ {
+ // Disable = TRUE;
+ Pos = MAP_APPFONT (6 , 86 ) ;
+ Size = MAP_APPFONT ( 90 , 10 ) ;
+ Text = "mit Seitenvor~lage" ;
+ Text [ ENGLISH ] = "With temp~late" ;
+ Text [ norwegian ] = "Med m~al" ;
+ Text [ italian ] = "Con modello di pagina" ;
+ Text [ portuguese_brazilian ] = "Com mode~lo" ;
+ Text [ portuguese ] = "Com e~stilo de página" ;
+ Text [ finnish ] = "Käytä ~mallia" ;
+ Text [ danish ] = "Med sidetypografi" ;
+ Text [ french ] = "Avec le style de page" ;
+ Text [ swedish ] = "Med sidformatm~all" ;
+ Text [ dutch ] = "Met pagina-~opmaakprofiel" ;
+ Text [ spanish ] = "C~on estilo de página" ;
+ Text [ english_us ] = "With Page St~yle" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "ʹÓÃÒ³ÃæÑùʽ(~W)";
+ Text[ russian ] = "Ñî ñòèëåì ñòðàíèöû";
+ Text[ polish ] = "Z sza~blonem strony";
+ Text[ japanese ] = "Íß°¼Þ½À²Ù•t‚«(~W)";
+ Text[ chinese_traditional ] = "¨Ï¥Î­¶­±¼Ë¦¡(~W)";
+ Text[ arabic ] = "ÈäãØ ÕÝÍÉ";
+ Text[ greek ] = "Ìå ðñüôõðï óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö À¯Çü°ú ÇÔ²²(~Y)";
+ Text[ turkish ] = "Sayfa biçiml~i";
+ Text[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM";
+ };
+ ListBox LB_PAGECOLL
+ {
+ // Disable = TRUE;
+ Pos = MAP_APPFONT ( 98 , 84 ) ;
+ Size = MAP_APPFONT ( 61 , 50 ) ;
+ DropDown = TRUE ;
+ Sort = TRUE;
+ };
+ FixedText FT_PAGENUM
+ {
+ Pos = MAP_APPFONT ( 161 , 85 ) ;
+ Size = MAP_APPFONT ( 57 , 10 ) ;
+ Center = TRUE ;
+ Text = "Se~itennummer" ;
+ Text [ ENGLISH ] = "Page number" ;
+ Text [ english_us ] = "Page ~number" ;
+ Text [ swedish ] = "S~idnummer" ;
+ Text [ danish ] = "Sidetal" ;
+ Text [ italian ] = "Numero di pag~ina" ;
+ Text [ spanish ] = "Nú~mero de página" ;
+ Text [ french ] = "~Numéro de page" ;
+ Text [ dutch ] = "Pa~ginanummer" ;
+ Text [ portuguese_brazilian ] = "Se~itennummer" ;
+ Text [ portuguese ] = "~Número de página" ;
+ Text[ chinese_simplified ] = "Ò³Âë(~N)";
+ Text[ russian ] = "Íîìåð ñòðàíèöû";
+ Text[ polish ] = "Numer strony";
+ Text[ japanese ] = "Íß°¼Þ”Ô†(~N)";
+ Text[ chinese_traditional ] = "­¶¼Æ(~N)";
+ Text[ arabic ] = "ÑÞã ÇáÕÝÍÉ";
+ Text[ greek ] = "Áñéèìüò óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö ¹øÈ£(~N)";
+ Text[ turkish ] = "Sayfa n~umarasý";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_PAGENUM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 221 , 84 ) ;
+ Size = MAP_APPFONT ( 26 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 9999 ;
+ Value = 0 ;
+ First = 0 ;
+ Last = 9999 ;
+ };
+ TriStateBox BTN_KEEPTOGETHER
+ {
+ Pos = MAP_APPFONT ( 6 , 99 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ // ### ACHTUNG: Neuer Text in Resource? Absatz ni~cht trennen : Absa~tz nicht trennen
+ Text = "Absatz ni~cht trennen" ;
+ Text [ ENGLISH ] = "~Keep together" ;
+ Text [ norwegian ] = "~Hold sammen" ;
+ Text [ italian ] = "Non separare il paragrafo" ;
+ Text [ portuguese_brazilian ] = "~Manter junto" ;
+ Text [ portuguese ] = "Manter linhas ~juntas" ;
+ Text [ finnish ] = "~Pidä yhdessä" ;
+ Text [ danish ] = "Del ikke afsnit" ;
+ Text [ french ] = "~Lignes solidaires" ;
+ Text [ swedish ] = "Dela inte sty~cke" ;
+ Text [ dutch ] = "A~linea´s niet scheiden" ;
+ Text [ spanish ] = "Mantener ~líneas juntas" ;
+ Text [ english_us ] = "~Don't separate lines" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "¶ÎÂä²»¸ô¿ª(~D)";
+ Text[ russian ] = "Íå ðàçäåëÿòü àáçàö";
+ Text[ polish ] = "Nie dziel akapitu";
+ Text[ japanese ] = "’i—Ž‚𕪊„‚µ‚È‚¢(~D)";
+ Text[ chinese_traditional ] = "¬q¸¨¤£¹j¶}(~D)";
+ Text[ arabic ] = "ÚÏã ÊÞÓíã ÇáÝÞÑÉ";
+ Text[ greek ] = "Íá ìç ÷ùñéóôåß ç ðáñÜãñáöïò";
+ Text[ korean ] = "´Ü¶ô ³ª´©Áö ¾Ê±â(~D)";
+ Text[ turkish ] = "Paragrafý ~bölme";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox CB_KEEPTOGETHER
+ {
+ Pos = MAP_APPFONT ( 6 , 112 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ // ### ACHTUNG: Neuer Text in Resource? Absä~tze zusammenhalten : Ab~sätze zusammenhalten
+ /* ### ACHTUNG: Neuer Text in Resource? Absä~tze zusammenhalten : Absõ~tze zusammenhalten */
+ /* ### ACHTUNG: Neuer Text in Resource? Absä~tze zusammenhalten : Absõ~tze zusammenhalten */
+ Text = "Absä~tze zusammenhalten" ;
+ Text [ ENGLISH ] = "Kee~p paragraphs together" ;
+ Text [ norwegian ] = "Holde~r avsnittene samlet" ;
+ Text [ italian ] = "Ti~eni paragrafi uniti" ;
+ Text [ portuguese_brazilian ] = "Man~ter parágrafos juntos" ;
+ Text [ portuguese ] = "Manter pa~rágrafos juntos" ;
+ Text [ finnish ] = "~Pidä kappaleet yhdessä" ;
+ Text [ danish ] = "Hold sammen med næste afsnit" ;
+ Text [ french ] = "Paragraphes solidaires" ;
+ Text [ swedish ] = "Håll ihop s~tycken" ;
+ Text [ dutch ] = "Alinea´s ~bijeenhouden" ;
+ Text [ spanish ] = "Mantener párra~fos juntos" ;
+ Text [ english_us ] = "~Keep with next paragraph" ;
+ Text[ chinese_simplified ] = "¶ÎÂä֮ǰ·ÖÒ³(~K)";
+ Text[ russian ] = "Íå îòðûâàòü îò ñëåäóþùåãî";
+ Text[ polish ] = "Razem z nastêpnym";
+ Text[ japanese ] = "’i—Ž‚ÌÚ‡(~K)";
+ Text[ chinese_traditional ] = "¬q¸¨¤§«e¤À­¶(~K)";
+ Text[ arabic ] = "ÊÑÇÈØ ÇáÝÞÑÇÊ";
+ Text[ greek ] = "Äéá~ôÞñçóç ðáñáãñÜöùí ìáæß";
+ Text[ korean ] = "´Ü¶ôµéÀ» °°Àº ÆäÀÌÁö¿¡(~K)";
+ Text[ turkish ] = "Paragra~flarý birlikte tut";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox BTN_WIDOWS
+ {
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 107 , 99 ) ;
+ Size = MAP_APPFONT ( 88 , 10 ) ;
+
+ Text = "Schuster~jungenregelung" ;
+ Text [ ENGLISH ] = "~Widows" ;
+ Text [ norwegian ] = "~Enkelinjer øverst" ;
+ Text [ italian ] = "Vedove" ;
+ Text [ portuguese_brazilian ] = "~Viúvas" ;
+ Text [ portuguese ] = "Controlo de linhas ~isoladas" ;
+ Text [ finnish ] = "~Leskirivit" ;
+ Text [ danish ] = "Fransk horeunge-ordning" ;
+ Text [ french ] = "Traitement des orphelines" ;
+ Text [ swedish ] = "~Änkekontroll" ;
+ Text [ dutch ] = "~Zwevende regels: Orphans" ;
+ Text [ spanish ] = "Ajuste de ~huérfanas" ;
+ Text [ english_us ] = "~Orphan control" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "¶ÎÂäÖ®Öв»·ÖÒ³(~O)";
+ Text[ russian ] = "Áåç êîíöåâûõ âèñÿ÷èõ ñòðîê";
+ Text[ polish ] = "Bez oddz. pierw. wiersza akap.";
+ Text[ japanese ] = "‰üÍß°¼ÞŽž‚ÉŽc‚·s”(~O)";
+ Text[ chinese_traditional ] = "¬q¸¨¤§¤¤¤£¤À­¶(~O)";
+ Text[ arabic ] = "ÊÚÏíá ÇäÝÕÇá ÓØÑ ÇáÝÞÑÉ ÇáÃæá";
+ Text[ greek ] = "Êáíüíáò '~ïñöáíïý'";
+ Text[ korean ] = "óÀ½ ÇÑÁÙ ºÐ¸® ¹æÁö(~O)";
+ Text[ turkish ] = "~Ýlk satýrý paragrafla birleþtir";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_WIDOWS
+ {
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 197 , 98 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 2 ;
+ Maximum = 9 ;
+ Value = 2 ;
+ First = 2 ;
+ Last = 9 ;
+ };
+ FixedText FT_WIDOWS
+ {
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 222 , 99 ) ;
+ Size = MAP_APPFONT ( 33 , 10 ) ;
+ Text = "Zeilen" ;
+ Text [ ENGLISH ] = "Rows" ;
+ Text [ norwegian ] = "Rows" ;
+ Text [ italian ] = "Righe" ;
+ Text [ portuguese_brazilian ] = "Fileiras" ;
+ Text [ portuguese ] = "Linhas" ;
+ Text [ finnish ] = "~Rivejä" ;
+ Text [ danish ] = "Linjer" ;
+ Text [ french ] = "Lignes" ;
+ Text [ swedish ] = "rader" ;
+ Text [ dutch ] = "regels" ;
+ Text [ spanish ] = "Líneas" ;
+ Text [ english_us ] = "Lines" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ÐÐ";
+ Text[ russian ] = "Ñòðîêè";
+ Text[ polish ] = "Wiersze";
+ Text[ japanese ] = "s";
+ Text[ chinese_traditional ] = "¦æ";
+ Text[ arabic ] = "ÃÓØÑ";
+ Text[ greek ] = "ÃñáììÝò";
+ Text[ korean ] = "ÁÙ";
+ Text[ turkish ] = "Satýr";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox BTN_ORPHANS
+ {
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 107 , 113 ) ;
+ Size = MAP_APPFONT ( 88 , 10 ) ;
+ Text = "Hu~renkinderregelung" ;
+ Text [ ENGLISH ] = "~Orphans" ;
+ Text [ norwegian ] = "~Enkelinje nederst" ;
+ Text [ italian ] = "~Orfane" ;
+ Text [ portuguese_brazilian ] = "~Órfãos" ;
+ Text [ portuguese ] = "Controlo de linhas ~viúvas" ;
+ Text [ finnish ] = "~Orporivit" ;
+ Text [ danish ] = "Horeunge-ordning" ;
+ Text [ french ] = "Traitement des veuves" ;
+ Text [ swedish ] = "H~orungekontroll" ;
+ Text [ dutch ] = "Z~wevende regels: Widows" ;
+ Text [ spanish ] = "Ajuste de ~viudas" ;
+ Text [ english_us ] = "~Widow control" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "Óë϶Îͬҳ(~W)";
+ Text[ russian ] = "Áåç íà÷àëüíûõ âèñÿ÷èõ ñòðîê";
+ Text[ polish ] = "Bez oddz. os~tat. wiersza akap.";
+ Text[ japanese ] = "’i—Ž‘O‚ʼnüÍß°¼Þ(~W)";
+ Text[ chinese_traditional ] = "»P¤U¬q¦P­¶(~W)";
+ Text[ arabic ] = "ÊÚÏíá ÇäÝÕÇá ÓØÑ ÇáÝÞÑÉ ÇáÃÎíÑ";
+ Text[ greek ] = "Êáíüíáò \"~÷Þñáò\"";
+ Text[ korean ] = "¸¶Áö¸· ÇÑÁÙ ºÐ¸® ¹æÁö(~W)";
+ Text[ turkish ] = "So~n satýrý paragrafla birleþtir";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_ORPHANS
+ {
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 197 , 112 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 2 ;
+ Maximum = 9 ;
+ Value = 2 ;
+ First = 2 ;
+ Last = 9 ;
+ };
+ FixedText FT_ORPHANS
+ {
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 222 , 113 ) ;
+ Size = MAP_APPFONT ( 33 , 10 ) ;
+ Text = "Zeilen" ;
+ Text [ ENGLISH ] = "Rows" ;
+ Text [ norwegian ] = "Rows" ;
+ Text [ italian ] = "Righe" ;
+ Text [ portuguese_brazilian ] = "Fileiras" ;
+ Text [ portuguese ] = "Linhas" ;
+ Text [ finnish ] = "~Rivejä" ;
+ Text [ danish ] = "Linjer" ;
+ Text [ french ] = "Lignes" ;
+ Text [ swedish ] = "rader" ;
+ Text [ dutch ] = "regels" ;
+ Text [ spanish ] = "Líneas" ;
+ Text [ english_us ] = "Lines" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ÐÐ";
+ Text[ russian ] = "Ñòðîêè";
+ Text[ polish ] = "Wiersze";
+ Text[ japanese ] = "s";
+ Text[ chinese_traditional ] = "¦æ";
+ Text[ arabic ] = "ÃÓØÑ";
+ Text[ greek ] = "ÃñáììÝò";
+ Text[ korean ] = "ÁÙ";
+ Text[ turkish ] = "Satýr";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_OPTIONS
+ {
+ Pos = MAP_APPFONT ( 3 , 62 ) ;
+ Size = MAP_APPFONT ( 254 , 67 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Zusätze : Zusõtze */
+ /* ### ACHTUNG: Neuer Text in Resource? Zusätze : Zusõtze */
+ Text = "Zusätze" ;
+ Text [ ENGLISH ] = "Options" ;
+ Text [ norwegian ] = "Options" ;
+ Text [ italian ] = "Extra" ;
+ Text [ portuguese_brazilian ] = "Opções" ;
+ Text [ portuguese ] = "Opções" ;
+ Text [ finnish ] = "Määritykset" ;
+ Text [ danish ] = "Supplerende" ;
+ Text [ french ] = "Options" ;
+ Text [ swedish ] = "Tillägg" ;
+ Text [ dutch ] = "Overige" ;
+ Text [ spanish ] = "Opciones" ;
+ Text [ english_us ] = "Options" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "Ñ¡Ïî";
+ Text[ russian ] = "Äîïîëíåíèÿ";
+ Text[ polish ] = "Opcje";
+ Text[ japanese ] = "µÌß¼®Ý";
+ Text[ chinese_traditional ] = "¿ï¶µ";
+ Text[ arabic ] = "ÇáÎíÇÑÇÊ";
+ Text[ greek ] = "Ðñüóèåôá";
+ Text[ korean ] = "¿É¼Ç";
+ Text[ turkish ] = "Seçenekler";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "»»ÐкͷÖÒ³";
+ Text[ russian ] = "Ïîëîæåíèå íà ñòðàíèöå";
+ Text[ polish ] = "Tekst";
+ Text[ japanese ] = "‘ÌÙ";
+ Text[ chinese_traditional ] = "´«¦æ©M¤À­¶";
+ Text[ arabic ] = "ÇäÓíÇÈ ÇáäÕ";
+ Text[ greek ] = "ÑïÞ êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® È帧";
+ Text[ turkish ] = "Metin akýþý";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx
new file mode 100644
index 0000000000..e41a15993b
--- /dev/null
+++ b/svx/source/dialog/paraprev.cxx
@@ -0,0 +1,235 @@
+/*************************************************************************
+ *
+ * $RCSfile: paraprev.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 "paraprev.hxx"
+
+// STATIC DATA -----------------------------------------------------------
+
+#define FOUR_POINTS 80
+
+// class SvxParaPrevWindow -----------------------------------------------
+
+SvxParaPrevWindow::SvxParaPrevWindow( Window* pParent, const ResId& rId ) :
+
+ Window( pParent, rId ),
+
+ nFirstLineOfst ( 0 ),
+ nLeftMargin ( 0 ),
+ nRightMargin ( 0 ),
+ nUpper ( 0 ),
+ nLower ( 0 ),
+ eAdjust ( SVX_ADJUST_LEFT ),
+#if SUPD>352
+ eLastLine ( SVX_ADJUST_LEFT ),
+#endif
+ eLine ( SVX_PREV_LINESPACE_1 ),
+ nLineVal ( 0 )
+
+{
+ // defaultmaessing in Twips rechnen
+ SetMapMode( MapMode( MAP_TWIP ) );
+ aWinSize = GetOutputSizePixel();
+ aWinSize = PixelToLogic( aWinSize );
+ aSize = Size( 11905, 16837 );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxParaPrevWindow::Paint( const Rectangle& rRect )
+{
+ DrawParagraph( TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+#define DEF_MARGIN 120
+
+void SvxParaPrevWindow::DrawParagraph( BOOL bAll )
+{
+ SetLineColor();
+ SetFillColor( Color( COL_WHITE ) );
+
+ if ( bAll )
+ DrawRect( Rectangle( Point(), aWinSize ) );
+
+ long nH = aWinSize.Height() / 19;
+ Size aLineSiz( aWinSize.Width() - DEF_MARGIN, nH ),
+ aSiz = aLineSiz;
+ Point aPnt;
+ aPnt.X() = DEF_MARGIN / 2;
+ SetFillColor( Color( COL_LIGHTGRAY ) );
+
+ for ( USHORT i = 0; i < 9; ++i )
+ {
+ if ( 3 == i )
+ {
+ SetFillColor( Color( COL_GRAY ) );
+ long nTop = nUpper * aLineSiz.Height() / aSize.Height();
+ aPnt.Y() += nTop * 2;
+ }
+
+ if ( 6 == i )
+ SetFillColor( Color( COL_LIGHTGRAY ) );
+
+ if ( 3 <= i && 6 > i )
+ {
+ long nLeft = nLeftMargin * aLineSiz.Width() / aSize.Width();
+ long nFirst = nFirstLineOfst * aLineSiz.Width() / aSize.Width();
+ long nTmp = nLeft + nFirst;
+
+ if ( 3 == i )
+ {
+ aPnt.X() += nTmp;
+ aSiz.Width() -= nTmp;
+ }
+ else
+ {
+ aPnt.X() += nLeft;
+ aSiz.Width() -= nLeft;
+ }
+ long nRight = nRightMargin * aLineSiz.Width() / aSize.Width();
+ aSiz.Width() -= nRight;
+ }
+
+ if ( 4 == i || 5 == i || 6 == i )
+ {
+ switch ( eLine )
+ {
+ case SVX_PREV_LINESPACE_1: break;
+ case SVX_PREV_LINESPACE_15: aPnt.Y() += nH / 2; break;
+ case SVX_PREV_LINESPACE_2: aPnt.Y() += nH; break;
+
+ case SVX_PREV_LINESPACE_PROP:
+ case SVX_PREV_LINESPACE_MIN:
+ case SVX_PREV_LINESPACE_DURCH: break;
+ }
+ }
+
+ aPnt.Y() += nH;
+
+ if ( 5 == i )
+ {
+ long nLW = aLineSiz.Width() / 2;
+
+ if ( nLW > aSiz.Width() )
+ nLW = aSiz.Width();
+
+ switch ( eAdjust )
+ {
+ case SVX_ADJUST_LEFT:
+ break;
+ case SVX_ADJUST_RIGHT:
+ aPnt.X() += ( aSiz.Width() - nLW );
+ break;
+ case SVX_ADJUST_CENTER:
+ aPnt.X() += ( aSiz.Width() - nLW ) / 2;
+ break;
+ case SVX_ADJUST_BLOCK:
+ break;
+ }
+
+ if ( SVX_ADJUST_BLOCK != eAdjust )
+ aSiz.Width() = nLW;
+ }
+
+ Rectangle aRect( aPnt, aSiz );
+
+ if ( Lines[i] != aRect || bAll )
+ {
+ if ( !bAll )
+ {
+ Color aFillCol = GetFillColor();
+ SetFillColor( Color( COL_WHITE ) );
+ DrawRect( Lines[i] );
+ SetFillColor( aFillCol );
+ }
+ DrawRect( aRect );
+ Lines[i] = aRect;
+ }
+
+ if ( 5 == i )
+ {
+ long nBottom = nLower * aLineSiz.Height() / aSize.Height();
+ aPnt.Y() += nBottom * 2;
+ }
+
+ aPnt.Y() += nH;
+ // wieder zuruecksetzen, fuer jede Linie neu berechnen
+ aPnt.X() = DEF_MARGIN / 2;
+ aSiz = aLineSiz;
+ }
+}
+
+#undef DEF_MARGIN
+
+// -----------------------------------------------------------------------
+
+void SvxParaPrevWindow::OutputSizeChanged()
+{
+ aWinSize = GetOutputSizePixel();
+ aWinSize = PixelToLogic( aWinSize );
+ Invalidate();
+}
+
diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx
new file mode 100644
index 0000000000..bf5e49ac3f
--- /dev/null
+++ b/svx/source/dialog/passwd.cxx
@@ -0,0 +1,190 @@
+/*************************************************************************
+ *
+ * $RCSfile: passwd.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_PASSWD_CXX
+
+#include "passwd.hxx"
+#include "dialmgr.hxx"
+#include "dialogs.hrc"
+#include "passwd.hrc"
+
+// class SvxPasswordDialog -----------------------------------------------
+
+IMPL_LINK( SvxPasswordDialog, OKHdl_Impl, OKButton *, EMPTYARG )
+{
+ FASTBOOL bOK = TRUE;
+ short nRet = RET_OK;
+ String aEmpty;
+
+ if ( bVerify )
+ {
+ if ( aOldPasswdED.GetText() != aOldPassword )
+ {
+ ErrorBox aBox( this, WB_OK, aOldPasswdErrStr );
+ aBox.Execute();
+ aOldPasswdED.SetText( aEmpty );
+ aOldPasswdED.GrabFocus();
+ bOK = FALSE;
+ }
+ }
+
+ if ( bOK && aNewPasswdED.GetText() != aRepeatPasswdED.GetText() )
+ {
+ ErrorBox( this, WB_OK, aRepeatPasswdErrStr ).Execute();
+ bOK = FALSE;
+ aNewPasswdED.SetText( aEmpty );
+ aRepeatPasswdED.SetText( aEmpty );
+ aNewPasswdED.GrabFocus();
+ }
+
+ if ( bOK )
+ EndDialog( nRet );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxPasswordDialog, ModifyHdl_Impl, Edit *, EMPTYARG )
+{
+ if ( !bEmpty )
+ {
+ String aPasswd = aRepeatPasswdED.GetText();
+ aPasswd.EraseLeadingChars().EraseTrailingChars();
+
+ if ( !aPasswd.Len() && aOKBtn.IsEnabled() )
+ aOKBtn.Disable();
+ else if ( aPasswd.Len() && !aOKBtn.IsEnabled() )
+ aOKBtn.Enable();
+ }
+ else if ( !aOKBtn.IsEnabled() )
+ aOKBtn.Enable();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+SvxPasswordDialog::SvxPasswordDialog( Window* pParent,
+ FASTBOOL bAllowEmptyPasswords ) :
+
+ SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_PASSWORD ) ),
+
+ aOldPasswdFT ( this, ResId( FT_OLD_PASSWD ) ),
+ aOldPasswdED ( this, ResId( ED_OLD_PASSWD ) ),
+ aOldGB ( this, ResId( GB_OLD_PASSWD ) ),
+ aNewPasswdFT ( this, ResId( FT_NEW_PASSWD ) ),
+ aNewPasswdED ( this, ResId( ED_NEW_PASSWD ) ),
+ aRepeatPasswdFT ( this, ResId( FT_REPEAT_PASSWD ) ),
+ aRepeatPasswdED ( this, ResId( ED_REPEAT_PASSWD ) ),
+ aNewGB ( this, ResId( GB_NEW_PASSWD ) ),
+ aOKBtn ( this, ResId( BTN_PASSWD_OK ) ),
+ aEscBtn ( this, ResId( BTN_PASSWD_ESC ) ),
+ aHelpBtn ( this, ResId( BTN_PASSWD_HELP ) ),
+
+ aOldPasswdErrStr ( ResId( STR_ERR_OLD_PASSWD ) ),
+ aRepeatPasswdErrStr ( ResId( STR_ERR_REPEAT_PASSWD ) ),
+
+ bVerify ( FALSE ),
+ bEmpty ( bAllowEmptyPasswords )
+
+{
+ FreeResource();
+
+ aOKBtn.SetClickHdl( LINK( this, SvxPasswordDialog, OKHdl_Impl ) );
+ aRepeatPasswdED.SetModifyHdl(
+ LINK( this, SvxPasswordDialog, ModifyHdl_Impl ) );
+ ModifyHdl_Impl( 0 );
+}
+
+// -----------------------------------------------------------------------
+
+SvxPasswordDialog::~SvxPasswordDialog()
+{
+}
+
+
+// -----------------------------------------------------------------------
+
+void SvxPasswordDialog::SetOldPassword( const String& rOld )
+{
+ aOldPassword = rOld;
+
+ if ( !aOldPassword.Len() && !bEmpty )
+ {
+ bVerify = FALSE;
+ aOldPasswdFT.Disable();
+ aOldPasswdED.Disable();
+ aNewPasswdED.GrabFocus();
+ }
+ else
+ bVerify = TRUE;
+}
+
+
diff --git a/svx/source/dialog/passwd.hrc b/svx/source/dialog/passwd.hrc
new file mode 100644
index 0000000000..c0c2f3bae8
--- /dev/null
+++ b/svx/source/dialog/passwd.hrc
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * $RCSfile: passwd.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_HRC
+#define _SVX_PASSWD_HRC
+
+// defines ------------------------------------------------------------------
+
+#define FT_OLD_PASSWD 10
+#define ED_OLD_PASSWD 11
+#define GB_OLD_PASSWD 12
+
+#define FT_NEW_PASSWD 20
+#define ED_NEW_PASSWD 21
+#define FT_REPEAT_PASSWD 22
+#define ED_REPEAT_PASSWD 23
+#define GB_NEW_PASSWD 24
+
+#define BTN_PASSWD_OK 30
+#define BTN_PASSWD_ESC 31
+#define BTN_PASSWD_HELP 32
+
+#define STR_ERR_OLD_PASSWD 40
+#define STR_ERR_REPEAT_PASSWD 41
+
+
+#endif
+
diff --git a/svx/source/dialog/passwd.src b/svx/source/dialog/passwd.src
new file mode 100644
index 0000000000..30d248dc0f
--- /dev/null
+++ b/svx/source/dialog/passwd.src
@@ -0,0 +1,326 @@
+/*************************************************************************
+ *
+ * $RCSfile: passwd.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "passwd.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_PASSWORD ---------------------------------------------------
+ModalDialog RID_SVXDLG_PASSWORD
+{
+ HelpId = HID_PASSWORD ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 185 , 86 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Paßwort ändern : Pa˜wort õndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Paßwort ändern : Pa˜wort õndern */
+ Text = "Passwort ändern" ;
+ Text [ English ] = "Change password" ;
+ Moveable = TRUE ;
+ FixedText FT_OLD_PASSWD
+ {
+ Pos = MAP_APPFONT ( 12 , 15 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Paßwort : ~Pa˜wort */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Paßwort : ~Pa˜wort */
+ Text = "~Passwort" ;
+ Text [ English ] = "~Password" ;
+ Right = TRUE ;
+ Text [ english_us ] = "~Password" ;
+ Text [ italian ] = "Password" ;
+ Text [ spanish ] = "~Contraseña" ;
+ Text [ french ] = "Mot de ~passe" ;
+ Text [ dutch ] = "~Wachtwoord" ;
+ Text [ swedish ] = "Lösenord" ;
+ Text [ danish ] = "Adgangskode" ;
+ Text [ portuguese_brazilian ] = "~Paßwort" ;
+ Text [ portuguese ] = "~Senha" ;
+ Text[ chinese_simplified ] = "¿ÚÁî(~P)";
+ Text[ russian ] = "Ïàðîëü";
+ Text[ polish ] = "Has³o";
+ Text[ japanese ] = "Ê߽ܰÄÞ(~P)";
+ Text[ chinese_traditional ] = "±K½X(~P)";
+ Text[ arabic ] = "ßáãÉ ÇáÓÑ";
+ Text[ greek ] = "Êùäéêüò ðñüóâáóçò";
+ Text[ korean ] = "Æнº¿öµå(~P)";
+ Text[ turkish ] = "Þif~re";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_OLD_PASSWD
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 57 , 14 ) ;
+ Size = MAP_APPFONT ( 60 , 12 ) ;
+ PassWord = TRUE ;
+ };
+ GroupBox GB_OLD_PASSWD
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 117 , 29 ) ;
+ Text = "Alt" ;
+ Text [ English ] = "Old" ;
+ Text [ english_us ] = "Old" ;
+ Text [ italian ] = "Vecchia" ;
+ Text [ spanish ] = "Anterior" ;
+ Text [ french ] = "~Ancien" ;
+ Text [ dutch ] = "Oud" ;
+ Text [ swedish ] = "Gammalt" ;
+ Text [ danish ] = "Gammel" ;
+ Text [ portuguese_brazilian ] = "Alt" ;
+ Text [ portuguese ] = "Antigo" ;
+ Text[ chinese_simplified ] = "¾ÉµÄ";
+ Text[ russian ] = "Ñòàðûé";
+ Text[ polish ] = "Stare";
+ Text[ japanese ] = "ŒÃ‚¢";
+ Text[ chinese_traditional ] = "廼";
+ Text[ arabic ] = "ÞÏíãÉ";
+ Text[ greek ] = "ÔñÝ÷ùí";
+ Text[ korean ] = "ÀÌÀü";
+ Text[ turkish ] = "Eski";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_NEW_PASSWD
+ {
+ Pos = MAP_APPFONT ( 12 , 50 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Pa~ßwort : Pa~˜wort */
+ /* ### ACHTUNG: Neuer Text in Resource? Pa~ßwort : Pa~˜wort */
+ Text = "Pa~ßwort" ;
+ Text [ English ] = "Pa~ssword" ;
+ Right = TRUE ;
+ Text [ english_us ] = "Pa~ssword" ;
+ Text [ italian ] = "Password" ;
+ Text [ spanish ] = "Co~ntraseña" ;
+ Text [ french ] = "M~ot de passe" ;
+ Text [ dutch ] = "W~achtwoord" ;
+ Text [ swedish ] = "Lösenord" ;
+ Text [ danish ] = "Adgangskode" ;
+ Text [ portuguese_brazilian ] = "Pa~ßwort" ;
+ Text [ portuguese ] = "~Senha" ;
+ Text[ chinese_simplified ] = "¿ÚÁî(~S)";
+ Text[ russian ] = "Ïàðîëü";
+ Text[ polish ] = "Has³o";
+ Text[ japanese ] = "Ê߽ܰÄÞ(~S)";
+ Text[ chinese_traditional ] = "±K½X(~S)";
+ Text[ arabic ] = "ßáãÉ ÇáÓÑ";
+ Text[ greek ] = "Êùäéêüò ðñüóâáóçò";
+ Text[ korean ] = "Æнº¿öµå(~S)";
+ Text[ turkish ] = "~Þifre";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_NEW_PASSWD
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 57 , 49 ) ;
+ Size = MAP_APPFONT ( 60 , 12 ) ;
+ PassWord = TRUE ;
+ };
+ FixedText FT_REPEAT_PASSWD
+ {
+ Pos = MAP_APPFONT ( 12 , 65 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "~Wiederholen" ;
+ Text [ English ] = "~Repeat" ;
+ Right = TRUE ;
+ Text [ english_us ] = "~Redo" ;
+ Text [ italian ] = "Ripeti" ;
+ Text [ spanish ] = "~Repetir" ;
+ Text [ french ] = "~Répéter" ;
+ Text [ dutch ] = "~Herhalen" ;
+ Text [ swedish ] = "Upprepa" ;
+ Text [ danish ] = "Gentag" ;
+ Text [ portuguese_brazilian ] = "~Wiederholen" ;
+ Text [ portuguese ] = "~Refazer" ;
+ Text[ chinese_simplified ] = "»Ö¸´³·ÏûÃüÁî(~R)";
+ Text[ russian ] = "Ïîâòîðèòü";
+ Text[ polish ] = "Ponów";
+ Text[ japanese ] = "‚â‚è’¼‚µ(~R)";
+ Text[ chinese_traditional ] = "«ì´_ºM®ø©R¥O(~R)";
+ Text[ arabic ] = "ÅÚÇÏÉ";
+ Text[ greek ] = "ÅðáíÜëçøç";
+ Text[ korean ] = "½ÇÇà ¹Ýº¹(~R)";
+ Text[ turkish ] = "~Yinele";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_REPEAT_PASSWD
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 57 , 64 ) ;
+ Size = MAP_APPFONT ( 60 , 12 ) ;
+ PassWord = TRUE ;
+ };
+ GroupBox GB_NEW_PASSWD
+ {
+ Pos = MAP_APPFONT ( 6 , 38 ) ;
+ Size = MAP_APPFONT ( 117 , 44 ) ;
+ Text = "Neu" ;
+ Text [ English ] = "New" ;
+ Text [ english_us ] = "New" ;
+ Text [ italian ] = "Nuova" ;
+ Text [ spanish ] = "Nueva" ;
+ Text [ french ] = "Nou~veau" ;
+ Text [ dutch ] = "Nieuw" ;
+ Text [ swedish ] = "Nytt" ;
+ Text [ danish ] = "Ny" ;
+ Text [ portuguese_brazilian ] = "Neu" ;
+ Text [ portuguese ] = "Novo" ;
+ Text[ chinese_simplified ] = "н¨";
+ Text[ russian ] = "Íîâûé";
+ Text[ polish ] = "Nowe";
+ Text[ japanese ] = "V‚µ‚¢";
+ Text[ chinese_traditional ] = "¶}±Ò·sÀÉ";
+ Text[ arabic ] = "ÌÏíÏÉ";
+ Text[ greek ] = "ÍÝïò";
+ Text[ korean ] = "»õ·Î";
+ Text[ turkish ] = "Yeni";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_PASSWD_OK
+ {
+ Pos = MAP_APPFONT ( 129 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ Disable = TRUE ;
+ };
+ CancelButton BTN_PASSWD_ESC
+ {
+ Pos = MAP_APPFONT ( 129 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BTN_PASSWD_HELP
+ {
+ Pos = MAP_APPFONT ( 129 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ String STR_ERR_OLD_PASSWD
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Ungültiges Paßwort : Ung³ltiges Pa˜wort */
+ /* ### ACHTUNG: Neuer Text in Resource? Ungültiges Paßwort : Ung³ltiges Pa˜wort */
+ Text = "Ungültiges Passwort" ;
+ Text [ English ] = "Invalid password" ;
+ Text [ dutch ] = "Ongeldig wachtwoord" ;
+ Text [ english_us ] = "Invalid password" ;
+ Text [ italian ] = "Password non valida" ;
+ Text [ spanish ] = "Contraseña no válida" ;
+ Text [ french ] = "Mot de passe incorrect" ;
+ Text [ swedish ] = "Ogiltigt lösenord" ;
+ Text [ danish ] = "Ugyldig adgangskode" ;
+ Text [ portuguese ] = "Senha incorrecta" ;
+ Text [ portuguese_brazilian ] = "Ungültiges Paßwort" ;
+ Text[ chinese_simplified ] = "¿ÚÁîÎÞЧ";
+ Text[ russian ] = "Íåïðàâèëüíûé ïàðîëü";
+ Text[ polish ] = "Has³o nieprawid³owe";
+ Text[ japanese ] = "–³Œø‚ÈÊ߽ܰÄÞ";
+ Text[ chinese_traditional ] = "±K½XµL®Ä";
+ Text[ arabic ] = "ßáãÉ ÓÑ ÛíÑ ÕÇáÍÉ";
+ Text[ greek ] = "¢êõñïò êùäéêüò ðñüóâáóçò";
+ Text[ korean ] = "À¯È¿ÇÏÁö ¾ÊÀº Æнº¿öµå";
+ Text[ turkish ] = "Geçersiz þifre";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_ERR_REPEAT_PASSWD
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Paßwörter stimmen nicht überein : Pa˜w÷rter stimmen nicht ³berein */
+ /* ### ACHTUNG: Neuer Text in Resource? Paßwörter stimmen nicht überein : Pa˜w÷rter stimmen nicht ³berein */
+ Text = "Passwörter stimmen nicht überein" ;
+ Text [ English ] = "Passwords are unequal" ;
+ Text [ dutch ] = "Wachtwoorden komen niet overeen" ;
+ Text [ english_us ] = "Passwords do not match" ;
+ Text [ italian ] = "Le password non sono uguali" ;
+ Text [ spanish ] = "Las contraseñas no coinciden" ;
+ Text [ french ] = "Les mots de passe ne concordent pas" ;
+ Text [ swedish ] = "Lösenord stämmer inte överens" ;
+ Text [ danish ] = "Adgangskode passer ikke" ;
+ Text [ portuguese ] = "As senhas não combinam." ;
+ Text [ portuguese_brazilian ] = "Paßwörter stimmen nicht überein" ;
+ Text[ chinese_simplified ] = "¿ÚÁî²»Ò»ÖÂ";
+ Text[ russian ] = "Ïàðîëè íå ñîâïàäàþò";
+ Text[ polish ] = "Has³a nie zgadzaj¹ siê";
+ Text[ japanese ] = "Ê߽ܰÄÞ‚ªˆê’v‚µ‚Ü‚¹‚ñ";
+ Text[ chinese_traditional ] = "±K½XµL®Ä";
+ Text[ arabic ] = "ßáãÇÊ ÇáÓÑ ÛíÑ ãÊØÇÈÞÉ";
+ Text[ greek ] = "Ïé êùäéêïß ðñüóâáóçò äåí óõìðßðôïõí";
+ Text[ korean ] = "Æнº¿öµå°¡ ÀÏÄ¡ÇÏÁö ¾ÊÀ½";
+ Text[ turkish ] = "Þifreler ayný deðil";
+ Text[ language_user1 ] = " ";
+ };
+ Text [ english_us ] = "Change Password" ;
+ Text [ italian ] = "Cambia password" ;
+ Text [ spanish ] = "Modificar contraseña" ;
+ Text [ french ] = "Modifier le mot de passe" ;
+ Text [ dutch ] = "Wachtwoord veranderen" ;
+ Text [ swedish ] = "Ändra lösenord" ;
+ Text [ danish ] = "Modificer adgangskode" ;
+ Text [ portuguese_brazilian ] = "Paßwort ändern" ;
+ Text [ portuguese ] = "Mudar senha" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä¿ÚÁî";
+ Text[ russian ] = "Èçìåíèòü ïàðîëü";
+ Text[ polish ] = "Zmieñ has³o";
+ Text[ japanese ] = "Ê߽ܰÄÞ‚Ì•ÏX";
+ Text[ chinese_traditional ] = "Åܧó±K½X";
+ Text[ arabic ] = "ÊÛííÑ ßáãÉ ÇáÓÑ";
+ Text[ greek ] = "ÁëëáãÞ êùäéêïý ðñüóâáóçò";
+ Text[ korean ] = "Æнº¿öµå º¯°æ";
+ Text[ turkish ] = "Þifre deðiþtirme";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/pfiledlg.cxx b/svx/source/dialog/pfiledlg.cxx
new file mode 100644
index 0000000000..31b4f96893
--- /dev/null
+++ b/svx/source/dialog/pfiledlg.cxx
@@ -0,0 +1,283 @@
+/*************************************************************************
+ *
+ * $RCSfile: pfiledlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SFXDOCFILE_HXX
+#include <sfx2/docfile.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_PLUGIN_PLUGINDESCRIPTION_HPP_
+#include <com/sun/star/plugin/PluginDescription.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_XPLUGINMANAGER_HPP_
+#include <com/sun/star/plugin/XPluginManager.hpp>
+#endif
+
+#include <unotools/processfactory.hxx>
+//#include <usr/ustring.hxx>
+
+#include "pfiledlg.hxx"
+#include "dialogs.hrc"
+
+#include "dialmgr.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+sal_Char __READONLY_DATA sAudio[] = "audio";
+sal_Char __READONLY_DATA sVideo[] = "video";
+
+/*************************************************************************
+|*
+|* Filedialog to insert Plugin-Fileformats
+|*
+\************************************************************************/
+
+SvxPluginFileDlg::SvxPluginFileDlg (Window *pParent, sal_uInt16 nKind )
+: SfxFileDialog ( pParent, SFXWB_INSERT | WB_3DLOOK | WB_STDMODAL )
+{
+ // set title of the dialogwindow
+ switch (nKind)
+ {
+ case SID_INSERT_SOUND :
+ {
+ SetText (SVX_RESSTR(STR_INSERT_SOUND_TITLE));
+ }
+ break;
+ case SID_INSERT_VIDEO :
+ {
+ SetText (SVX_RESSTR(STR_INSERT_VIDEO_TITLE));
+ }
+ break;
+ }
+
+ // fill the filterlist of the filedialog with data of installed plugins
+ uno::Reference< lang::XMultiServiceFactory > xMgr( ::utl::getProcessServiceFactory() );
+
+ if( xMgr.is() )
+ {
+ uno::Reference< plugin::XPluginManager > rPluginManager( xMgr->createInstance(
+ OUString::createFromAscii( "com.sun.star.plugin.PluginManager" ) ), uno::UNO_QUERY );
+ if( rPluginManager.is() )
+ {
+ const uno::Sequence<plugin::PluginDescription > aSeq( rPluginManager->getPluginDescriptions() );
+ const plugin::PluginDescription* pDescription = aSeq.getConstArray();
+ sal_Int32 nAnzahlPlugins = rPluginManager->getPluginDescriptions().getLength();
+
+ for (int i=0; i<nAnzahlPlugins; i++)
+ {
+ String aStrPlugMIMEType ( pDescription[i].Mimetype );
+ String aStrPlugName ( pDescription[i].Description );
+ String aStrPlugExtension ( pDescription[i].Extension );
+
+ aStrPlugMIMEType.ToLowerAscii();
+ aStrPlugExtension.ToLowerAscii();
+
+ if ( (nKind == SID_INSERT_SOUND && aStrPlugMIMEType.SearchAscii ( sAudio ) == 0) ||
+ (nKind == SID_INSERT_VIDEO && aStrPlugMIMEType.SearchAscii ( sVideo ) == 0) )
+ {
+ // extension already in the filterlist of the filedlg ?
+ sal_Bool bAlreadyExist=sal_False;
+ for (int i=0; i<GetFilterCount() && !bAlreadyExist; i++)
+ {
+ bAlreadyExist = (GetFilterType(i).Search(aStrPlugExtension) != STRING_NOTFOUND);
+ }
+
+ if (!bAlreadyExist)
+ {
+ // filterdescription already there ? (then append the new extension to the existing filter)
+ int nfound=-1;
+ for (int i=0; i<GetFilterCount() && nfound!=0; i++)
+ {
+ String aStrFilterName (GetFilterName(i));
+ if ((nfound=aStrFilterName.Search(aStrPlugName)) == 0)
+ {
+ String aStrFilterExt (GetFilterType (i));
+ RemoveFilter (aStrFilterName);
+ aStrPlugExtension.Insert( aStrFilterExt );
+ aStrPlugExtension.Insert( sal_Unicode( ';' ) );
+ }
+ }
+
+ // build filterdescription
+ aStrPlugName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) );
+ aStrPlugName.Append( aStrPlugExtension );
+ aStrPlugName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ")" ) );
+
+ // use a own description for the video-formate avi, mov and mpeg
+ // the descriptions of these MIME-types are not very meaningful
+ const sal_Char sAVI[] = "*.avi";
+ const sal_Char sMOV[] = "*.mov";
+ const sal_Char sMPG[] = "*.mpg";
+ const sal_Char sMPE[] = "*.mpe";
+ const sal_Char sMPEG[] = "*.mpeg";
+
+ if ( aStrPlugExtension.EqualsIgnoreCaseAscii( sAVI ) )
+ {
+ aStrPlugName = SVX_RESSTR(STR_INSERT_VIDEO_EXTFILTER_AVI);
+ }
+ else if ( aStrPlugExtension.EqualsIgnoreCaseAscii( sMOV ) )
+ {
+ aStrPlugName = SVX_RESSTR(STR_INSERT_VIDEO_EXTFILTER_MOV);
+ }
+ else if (aStrPlugExtension.SearchAscii( sMPG ) != STRING_NOTFOUND ||
+ aStrPlugExtension.SearchAscii( sMPE ) != STRING_NOTFOUND ||
+ aStrPlugExtension.SearchAscii( sMPEG ) != STRING_NOTFOUND)
+ {
+ aStrPlugName = SVX_RESSTR(STR_INSERT_VIDEO_EXTFILTER_MPEG);
+ }
+
+ AddFilter (aStrPlugName, aStrPlugExtension);
+ }
+ }
+ }
+ }
+ }
+
+ // Wildcat-Filter
+ AddFilter( SVX_RESSTR(STR_EXTFILTER_ALL),
+ UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "*.*" ) ) );
+
+ // activate 1. filter
+ SetCurFilter (GetFilterName(GetFilterCount()-1));
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxPluginFileDlg::~SvxPluginFileDlg()
+{
+}
+
+/*************************************************************************
+|*
+|* Plugins available for the the MIME-Typ in nKind
+|* (whith nKind = SID_INSERT_SOUND for MIME-Type audio
+|* SID_INSERT_VIDEO for MIME-Type video
+|*
+\************************************************************************/
+
+#define PFDLG_CHECKED_SOUND 0x0001
+#define PFDLG_CHECKED_VIDEO 0x0002
+#define PFDLG_FOUND_SOUND 0x0004
+#define PFDLG_FOUND_VIDEO 0x0008
+
+sal_Bool SvxPluginFileDlg::IsAvailable (sal_uInt16 nKind)
+{
+ static sal_uInt16 nCheck = 0;
+
+ if ( nKind == SID_INSERT_SOUND && ( nCheck & PFDLG_CHECKED_SOUND ) )
+ return (nCheck & PFDLG_FOUND_SOUND);
+ if ( nKind == SID_INSERT_VIDEO && ( nCheck & PFDLG_CHECKED_VIDEO ) )
+ return (nCheck & PFDLG_FOUND_VIDEO);
+
+ sal_Bool bFound=sal_False;
+ uno::Reference< lang::XMultiServiceFactory > xMgr( ::utl::getProcessServiceFactory() );
+
+ if( xMgr.is() )
+ {
+ uno::Reference< plugin::XPluginManager > rPluginManager = uno::Reference< plugin::XPluginManager > ( xMgr->createInstance( OUString::createFromAscii( "com.sun.star.plugin.PluginManager" ) ), uno::UNO_QUERY );
+ if( rPluginManager.is() )
+ {
+ const uno::Sequence<plugin::PluginDescription > aSeq( rPluginManager->getPluginDescriptions() );
+ const plugin::PluginDescription* pDescription = aSeq.getConstArray();
+ sal_Int32 nAnzahlPlugins = rPluginManager->getPluginDescriptions().getLength();
+
+ for ( sal_uInt16 i = 0; i < nAnzahlPlugins && !bFound; ++i )
+ {
+ String aStrPlugMIMEType( pDescription[i].Mimetype );
+ switch (nKind)
+ {
+ case SID_INSERT_SOUND :
+ {
+ nCheck |= PFDLG_CHECKED_SOUND;
+
+ if( aStrPlugMIMEType.SearchAscii( sAudio ) == 0 )
+ {
+ bFound=sal_True;
+ nCheck |= PFDLG_FOUND_SOUND;
+ }
+ }
+ break;
+ case SID_INSERT_VIDEO :
+ {
+ nCheck |= PFDLG_CHECKED_VIDEO;
+
+ if (aStrPlugMIMEType.SearchAscii( sVideo ) == 0)
+ {
+ bFound=sal_True;
+ nCheck |= PFDLG_FOUND_VIDEO;
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ return bFound;
+}
+
+
diff --git a/svx/source/dialog/postdlg.cxx b/svx/source/dialog/postdlg.cxx
new file mode 100644
index 0000000000..5c9f8b92e0
--- /dev/null
+++ b/svx/source/dialog/postdlg.cxx
@@ -0,0 +1,307 @@
+/*************************************************************************
+ *
+ * $RCSfile: postdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFX_INIMGR_HXX //autogen
+#include <sfx2/inimgr.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_POSTDLG_CXX
+
+#include "dialogs.hrc"
+#include "postdlg.hrc"
+
+#define ITEMID_AUTHOR SID_ATTR_POSTIT_AUTHOR
+#define ITEMID_DATE SID_ATTR_POSTIT_DATE
+#define ITEMID_TEXT SID_ATTR_POSTIT_TEXT
+
+#include "postattr.hxx"
+#include "postdlg.hxx"
+#include "dialmgr.hxx"
+
+#include "helpid.hrc"
+// static ----------------------------------------------------------------
+
+static USHORT pRanges[] =
+{
+ SID_ATTR_POSTIT_AUTHOR,
+ SID_ATTR_POSTIT_TEXT,
+ 0
+};
+
+// class SvxPostItDialog -------------------------------------------------
+
+SvxPostItDialog::SvxPostItDialog( Window* pParent,
+ const SfxItemSet& rCoreSet,
+ BOOL bPrevNext,
+ BOOL bRedline ) :
+
+ SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_POSTIT ) ),
+
+ aLastEditLabelFT( this, ResId( FT_LASTEDITLABEL ) ),
+ aLastEditFT ( this, ResId( FT_LASTEDIT ) ),
+ aEditFT ( this, ResId( FT_EDIT ) ),
+ aEditED ( this, ResId( ED_EDIT ) ),
+ aPostItGB ( this, ResId( GB_POSTIT ) ),
+ aOKBtn ( this, ResId( BTN_POST_OK ) ),
+ aCancelBtn ( this, ResId( BTN_POST_CANCEL ) ),
+ aPrevBtn ( this, ResId( BTN_PREV ) ),
+ aNextBtn ( this, ResId( BTN_NEXT ) ),
+ aAuthorBtn ( this, ResId( BTN_AUTHOR ) ),
+ aHelpBtn ( this, ResId( BTN_POST_HELP ) ),
+
+ rSet ( rCoreSet ),
+ pOutSet ( 0 )
+
+{
+ if (bRedline) // HelpIDs fuer Redlining
+ {
+ SetHelpId(HID_REDLINING_DLG);
+ aEditED.SetHelpId(HID_REDLINING_EDIT);
+ aPrevBtn.SetHelpId(HID_REDLINING_PREV);
+ aNextBtn.SetHelpId(HID_REDLINING_NEXT);
+ }
+
+ aPrevBtn.SetClickHdl( LINK( this, SvxPostItDialog, PrevHdl ) );
+ aNextBtn.SetClickHdl( LINK( this, SvxPostItDialog, NextHdl ) );
+ aAuthorBtn.SetClickHdl( LINK( this, SvxPostItDialog, Stamp ) );
+ aOKBtn.SetClickHdl( LINK( this, SvxPostItDialog, OKHdl ) );
+
+ Font aFont( aEditED.GetFont() );
+ aFont.SetWeight( WEIGHT_LIGHT );
+ aEditED.SetFont( aFont );
+
+ BOOL bNew = TRUE;
+ const SfxPoolItem* pItem = 0;
+ USHORT nWhich = 0;
+
+ if ( !bPrevNext )
+ {
+ aPrevBtn.Hide();
+ aNextBtn.Hide();
+ }
+
+ nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR );
+ String aAuthorStr, aDateStr, aTextStr;
+
+ if ( rSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE )
+ {
+ bNew = FALSE;
+ const SvxPostItAuthorItem& rAuthor =
+ (const SvxPostItAuthorItem&)rSet.Get( nWhich );
+ aAuthorStr = rAuthor.GetValue();
+ }
+ else
+ aAuthorStr = SFX_INIMANAGER()->Get(SFX_KEY_USER_ID);
+
+ nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE );
+
+ if ( rSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxPostItDateItem& rDate =
+ (const SvxPostItDateItem&)rSet.Get( nWhich );
+ aDateStr = rDate.GetValue();
+ }
+ else
+ {
+ International aInter( GetpApp()->GetAppInternational() );
+ aDateStr = aInter.GetDate( Date() );
+ }
+
+ nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT );
+
+ if ( rSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxPostItTextItem& rText =
+ (const SvxPostItTextItem&)rSet.Get( nWhich );
+ aTextStr = rText.GetValue();
+ }
+
+ ShowLastAuthor(aAuthorStr, aDateStr);
+ aEditED.SetText( aTextStr.ConvertLineEnd() );
+
+ if ( !bNew )
+ SetText( SVX_RESSTR( STR_NOTIZ_EDIT ) );
+ else
+ // neu anlegen
+ SetText( SVX_RESSTR( STR_NOTIZ_INSERT ) );
+
+ FreeResource();
+}
+
+// -----------------------------------------------------------------------
+
+SvxPostItDialog::~SvxPostItDialog()
+{
+ delete pOutSet;
+ pOutSet = 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& rDate)
+{
+ String sTxt( rAuthor );
+ sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+ sTxt += rDate;
+ aLastEditFT.SetText( sTxt );
+}
+
+// -----------------------------------------------------------------------
+
+USHORT* SvxPostItDialog::GetRanges()
+{
+ return pRanges;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPostItDialog::EnableTravel(BOOL bNext, BOOL bPrev)
+{
+ aPrevBtn.Enable(bPrev);
+ aNextBtn.Enable(bNext);
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxPostItDialog, PrevHdl, Button *, EMPTYARG )
+{
+ aPrevHdlLink.Call( this );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxPostItDialog, PrevHdl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxPostItDialog, NextHdl, Button *, EMPTYARG )
+{
+ aNextHdlLink.Call( this );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxPostItDialog, NextHdl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxPostItDialog, Stamp, Button *, EMPTYARG )
+{
+ Date aDate;
+ Time aTime;
+ String aTmp( SFX_INIMANAGER()->Get(SFX_KEY_USER_ID) );
+ International aInter( GetpApp()->GetAppInternational() );
+ String aStr( aEditED.GetText() );
+
+ aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n---- " ) );
+
+
+ if ( aTmp.Len() > 0 )
+ {
+ aStr += aTmp;
+ aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+ }
+ aStr += aInter.GetDate(aDate);
+ aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+ aStr += aInter.GetTime(aTime, FALSE, FALSE);
+ aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ----\n" ) );
+
+
+ aEditED.SetText( aStr.ConvertLineEnd() );
+ xub_StrLen nLen = aStr.Len();
+ aEditED.GrabFocus();
+ aEditED.SetSelection( Selection( nLen, nLen ) );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxPostItDialog, OKHdl, Button *, EMPTYARG )
+{
+ International aInter( GetpApp()->GetAppInternational() );
+ pOutSet = new SfxItemSet( rSet );
+ pOutSet->Put( SvxPostItAuthorItem( SFX_INIMANAGER()->Get(SFX_KEY_USER_ID),
+ rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) );
+ pOutSet->Put( SvxPostItDateItem( aInter.GetDate( Date() ),
+ rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ) ) );
+ pOutSet->Put( SvxPostItTextItem( aEditED.GetText(),
+ rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ) ) );
+ EndDialog( RET_OK );
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/postdlg.hrc b/svx/source/dialog/postdlg.hrc
new file mode 100644
index 0000000000..782406d8c4
--- /dev/null
+++ b/svx/source/dialog/postdlg.hrc
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * $RCSfile: postdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_POSTDLG_HRC
+#define _SVX_POSTDLG_HRC
+
+// defines ------------------------------------------------------------------
+
+#define FT_LASTEDITLABEL 10
+#define FT_LASTEDIT 11
+#define FT_EDIT 12
+#define ED_EDIT 13
+#define GB_POSTIT 14
+#define BTN_PREV 15
+#define BTN_NEXT 16
+#define BTN_AUTHOR 17
+
+#define STR_NOTIZ_EDIT 20
+#define STR_NOTIZ_INSERT 21
+
+#define BTN_POST_OK 30
+#define BTN_POST_CANCEL 31
+#define BTN_POST_HELP 32
+
+
+#endif
+
diff --git a/svx/source/dialog/postdlg.src b/svx/source/dialog/postdlg.src
new file mode 100644
index 0000000000..c133be5815
--- /dev/null
+++ b/svx/source/dialog/postdlg.src
@@ -0,0 +1,305 @@
+/*************************************************************************
+ *
+ * $RCSfile: postdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "postdlg.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_POSTIT -----------------------------------------------------
+ModalDialog RID_SVXDLG_POSTIT
+{
+ HelpId = SID_POSTIT ;
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 198 , 117 ) ;
+ Text = "Notiz" ;
+ Text [ ENGLISH ] = "Note" ;
+ Text [ norwegian ] = "Merknad" ;
+ Text [ italian ] = "Nota" ;
+ Text [ portuguese_brazilian ] = "Observação" ;
+ Text [ portuguese ] = "Observação" ;
+ Text [ finnish ] = "Huomautus" ;
+ Text [ danish ] = "Note" ;
+ Text [ french ] = "Note" ;
+ Text [ swedish ] = "Anteckning" ;
+ Text [ dutch ] = "Aantekening" ;
+ Text [ spanish ] = "Nota" ;
+ Text [ english_us ] = "Note" ;
+ Moveable = TRUE ;
+ FixedText FT_LASTEDITLABEL
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 24 , 8 ) ;
+ Text = "Autor" ;
+ Text [ ENGLISH ] = "Author" ;
+ Text [ norwegian ] = "Forfatter" ;
+ Text [ italian ] = "Autore" ;
+ Text [ portuguese_brazilian ] = "Autor" ;
+ Text [ portuguese ] = "Autor" ;
+ Text [ finnish ] = "Tekijä" ;
+ Text [ danish ] = "Forfatter" ;
+ Text [ french ] = "Auteur" ;
+ Text [ swedish ] = "Författare" ;
+ Text [ dutch ] = "Auteur" ;
+ Text [ spanish ] = "Autor" ;
+ Text [ english_us ] = "Author" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "×÷Õß";
+ Text[ russian ] = "Àâòîð";
+ Text[ polish ] = "Autor";
+ Text[ japanese ] = "쬎Ò";
+ Text[ chinese_traditional ] = "§@ªÌ";
+ Text[ arabic ] = "ÇáãÄáÝ";
+ Text[ greek ] = "ÓõíôÜêôçò";
+ Text[ korean ] = "ÀÛ¼ºÀÎ";
+ Text[ turkish ] = "Yazan";
+ };
+ FixedText FT_LASTEDIT
+ {
+ Pos = MAP_APPFONT ( 38 , 14 ) ;
+ Size = MAP_APPFONT ( 93 , 8 ) ;
+ Left = TRUE ;
+ };
+ FixedText FT_EDIT
+ {
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
+ Size = MAP_APPFONT ( 18 , 8 ) ;
+ Text = "~Text" ;
+ Text [ English ] = "~Text" ;
+ Text [ norwegian ] = "~Text" ;
+ Text [ italian ] = "~Testo" ;
+ Text [ portuguese_brazilian ] = "~Texto" ;
+ Text [ portuguese ] = "~Texto" ;
+ Text [ finnish ] = "~Teksti" ;
+ Text [ danish ] = "Tekst" ;
+ Text [ french ] = "~Texte" ;
+ Text [ swedish ] = "~Text" ;
+ Text [ dutch ] = "~Tekst" ;
+ Text [ spanish ] = "Te~xto" ;
+ Text [ english_us ] = "~Text" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ÎÄ×Ö(~T)";
+ Text[ russian ] = "Òåêñò";
+ Text[ polish ] = "Tekst";
+ Text[ japanese ] = "÷½Ä(~T)";
+ Text[ chinese_traditional ] = "¤å¦r(~T)";
+ Text[ arabic ] = "ÇáäÕ";
+ Text[ greek ] = "Êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ®(~T)";
+ Text[ turkish ] = "~Metin";
+ };
+ MultiLineEdit ED_EDIT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 13 , 38 ) ;
+ Size = MAP_APPFONT ( 115 , 64 ) ;
+ Left = TRUE ;
+ VScroll = TRUE ;
+ HScroll = TRUE ;
+ IgnoreTab = TRUE ;
+ };
+ GroupBox GB_POSTIT
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 129 , 107 ) ;
+ Text = "Inhalt" ;
+ Text [ ENGLISH ] = "Contents" ;
+ Text [ norwegian ] = "Innhold " ;
+ Text [ italian ] = "Contenuto" ;
+ Text [ portuguese_brazilian ] = "Conteúdo" ;
+ Text [ portuguese ] = "Conteúdo" ;
+ Text [ finnish ] = "Sisältö" ;
+ Text [ danish ] = "Indhold" ;
+ Text [ french ] = "Contenu" ;
+ Text [ swedish ] = "Innehåll" ;
+ Text [ dutch ] = "Inhoud" ;
+ Text [ spanish ] = "Contenido" ;
+ Text [ english_us ] = "Contents" ;
+ Text[ chinese_simplified ] = "ÄÚÈÝ";
+ Text[ russian ] = "Ñîäåðæèìîå";
+ Text[ polish ] = "TreϾ";
+ Text[ japanese ] = "“à—e";
+ Text[ chinese_traditional ] = "¤º®e";
+ Text[ arabic ] = "ÇáãÍÊæíÇÊ";
+ Text[ greek ] = "Ðåñéå÷üìåíá";
+ Text[ korean ] = "³»¿ë";
+ Text[ turkish ] = "Ýçerik";
+ };
+ OKButton BTN_POST_OK
+ {
+ Pos = MAP_APPFONT ( 141 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_POST_CANCEL
+ {
+ Pos = MAP_APPFONT ( 141 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
+ };
+ HelpButton BTN_POST_HELP
+ {
+ Pos = MAP_APPFONT ( 141 , 40 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
+ };
+ ImageButton BTN_PREV
+ {
+ Pos = MAP_APPFONT ( 141 , 60 ) ;
+ Size = MAP_APPFONT ( 24 , 14 ) ;
+ Symbol = IMAGEBUTTON_ARROW_LEFT ;
+ };
+ ImageButton BTN_NEXT
+ {
+ Pos = MAP_APPFONT ( 167 , 60 ) ;
+ Size = MAP_APPFONT ( 24 , 14 ) ;
+ Symbol = IMAGEBUTTON_ARROW_RIGHT ;
+ };
+ PushButton BTN_AUTHOR
+ {
+ Pos = MAP_APPFONT ( 141 , 95 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
+ Text = "~Autor" ;
+ Text [ ENGLISH ] = "~Author" ;
+ Text [ norwegian ] = "~Forfatter" ;
+ Text [ italian ] = "Autore" ;
+ Text [ portuguese_brazilian ] = "~Autor" ;
+ Text [ portuguese ] = "~Autor" ;
+ Text [ finnish ] = "~Tekijä" ;
+ Text [ danish ] = "Forfatter" ;
+ Text [ french ] = "~Auteur" ;
+ Text [ swedish ] = "Sk~apad av" ;
+ Text [ dutch ] = "~Auteur" ;
+ Text [ spanish ] = "~Autor" ;
+ Text [ english_us ] = "~Author" ;
+ 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";
+ };
+ // lokale Strings
+ String STR_NOTIZ_EDIT
+ {
+ Text = "Notiz bearbeiten" ;
+ Text [ English ] = "Edit Note" ;
+ Text [ norwegian ] = "Rediger Merknad" ;
+ Text [ italian ] = "Modifica nota" ;
+ Text [ portuguese_brazilian ] = "Editar Observação" ;
+ Text [ portuguese ] = "Editar anotação" ;
+ Text [ finnish ] = "Muokkaa huomautusta" ;
+ Text [ danish ] = "Rediger note" ;
+ Text [ french ] = "Éditer la note" ;
+ Text [ swedish ] = "Redigera anteckning" ;
+ Text [ dutch ] = "Aantekening bewerken" ;
+ Text [ spanish ] = "Editar nota" ;
+ Text [ english_us ] = "Edit Note" ;
+ Text[ chinese_simplified ] = "±à¼­±¸×¢";
+ Text[ russian ] = "Îáðàáîòêà ïîìåòêè";
+ Text[ polish ] = "Edytuj notatkê";
+ Text[ japanese ] = "ÒÓ‚Ì•ÒW";
+ Text[ chinese_traditional ] = "½s¿è³Æª`";
+ Text[ arabic ] = "ÊÍÑíÑ ãáÇÍÙÉ";
+ Text[ greek ] = "Åðåîåñãáóßá óçìåßùóçò";
+ Text[ korean ] = "¸Þ¸ð ÆíÁý";
+ Text[ turkish ] = "Notu düzenle";
+ };
+ String STR_NOTIZ_INSERT
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Notiz einfügen : Notiz einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Notiz einfügen : Notiz einf³gen */
+ Text = "Notiz einfügen" ;
+ Text [ English ] = "Insert Note" ;
+ Text [ norwegian ] = "Sett inn Merknad" ;
+ Text [ italian ] = "Inserisci nota" ;
+ Text [ portuguese_brazilian ] = "Inserir Observação" ;
+ Text [ portuguese ] = "Inserir anotação" ;
+ Text [ finnish ] = "Lisää huomautus" ;
+ Text [ danish ] = "Indsæt note" ;
+ Text [ french ] = "Insérer une note" ;
+ Text [ swedish ] = "Infoga anteckning" ;
+ Text [ dutch ] = "Aantekening invoegen" ;
+ Text [ spanish ] = "Insertar nota" ;
+ Text [ english_us ] = "Insert note" ;
+ Text[ chinese_simplified ] = "²åÈ뱸ע";
+ Text[ russian ] = "Âñòàâèòü ïîìåòêó";
+ Text[ polish ] = "Wstaw notatkê";
+ Text[ japanese ] = "ÒÓ‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤J³Æª`";
+ Text[ arabic ] = "ÅÏÑÇÌ ãáÇÍÙÉ";
+ Text[ greek ] = "ÅéóáãùãÞ óçìåßùóçò";
+ Text[ korean ] = "¸Þ¸ð »ðÀÔ";
+ Text[ turkish ] = "Not ekle";
+ };
+ Text[ chinese_simplified ] = "±¸×¢";
+ Text[ russian ] = "Ïîìåòêà";
+ Text[ polish ] = "Notatka";
+ Text[ japanese ] = "ÒÓ";
+ Text[ chinese_traditional ] = "³Æª`";
+ Text[ arabic ] = "ãáÇÍÙÉ";
+ Text[ greek ] = "Óçìåßùóç";
+ Text[ korean ] = "¸Þ¸ð";
+ Text[ turkish ] = "Not";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/prtqry.cxx b/svx/source/dialog/prtqry.cxx
new file mode 100644
index 0000000000..7baf7dd870
--- /dev/null
+++ b/svx/source/dialog/prtqry.cxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: prtqry.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_DIALOGS_HRC
+#include <dialogs.hrc>
+#endif
+#ifndef _SVX_PRTQRY_HXX
+#include <prtqry.hxx>
+#endif
+#ifndef _SVX_DIALMGR_HXX
+#include <dialmgr.hxx>
+#endif
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+/* -----------------------------01.02.00 13:57--------------------------------
+
+ ---------------------------------------------------------------------------*/
+SvxPrtQryBox::SvxPrtQryBox(Window* pParent) :
+ MessBox(pParent, 0,
+ String(SVX_RES(RID_SVXSTR_QRY_PRINT_TITLE)),
+ String(SVX_RES(RID_SVXSTR_QRY_PRINT_MSG)))
+{
+ SetImage( QueryBox::GetStandardImage() );
+
+ AddButton(String(SVX_RES(RID_SVXSTR_QRY_PRINT_SELECTION)), RET_OK,
+ BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON);
+
+ AddButton(String(SVX_RES(RID_SVXSTR_QRY_PRINT_ALL)), 2, 0);
+ AddButton(BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON);
+ SetButtonHelpText( RET_OK, String() );
+}
+/* -----------------------------01.02.00 13:57--------------------------------
+
+ ---------------------------------------------------------------------------*/
+SvxPrtQryBox::~SvxPrtQryBox()
+{
+}
+
+
diff --git a/svx/source/dialog/prtqry.src b/svx/source/dialog/prtqry.src
new file mode 100644
index 0000000000..9081229a45
--- /dev/null
+++ b/svx/source/dialog/prtqry.src
@@ -0,0 +1,157 @@
+/*************************************************************************
+ *
+ * $RCSfile: prtqry.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_QRY_PRINT_TITLE
+{
+ Text = "Drucken der Selektion" ;
+ Text [ English ] = "Printing of selection" ;
+ Text[ italian ] = "Stampa la selezione";
+ Text[ portuguese_brazilian ] = "Drucken der Selektion";
+ Text[ portuguese ] = "A imprimir selecção";
+ Text[ danish ] = "Udskriv det markerede";
+ Text[ french ] = "Imprimer la sélection";
+ Text[ swedish ] = "Skriv ut markering";
+ Text[ dutch ] = "Afdrukken van de selectie";
+ Text[ spanish ] = "Imprimir la selección";
+ Text[ english_us ] = "Printing selection";
+ Text[ chinese_simplified ] = "´òÓ¡Ñ¡ÖеIJ¿·Ö";
+ Text[ russian ] = "Ïå÷àòü âûäåëåííîãî ôðàãìåíòà";
+ Text[ polish ] = "Drukuj zaznaczony obszar";
+ Text[ japanese ] = "‘I‘ð‚µ‚½•”•ª‚̈óü";
+ Text[ chinese_traditional ] = "¦C¦L¿ï¨ú³¡¥÷";
+ Text[ arabic ] = "ØÈÇÚÉ ÇáÊÍÏíÏ";
+ Text[ greek ] = "Åêôýðùóç åðéëïãÞò";
+ Text[ korean ] = "¼±ÅÃÇÑ ¹üÀ§ Àμâ";
+ Text[ turkish ] = "Seçilen aralýk yazdýrýlýyor";
+};
+String RID_SVXSTR_QRY_PRINT_MSG
+{
+ Text = "Wollen Sie die Selektion oder das gesamte Dokument drucken?" ;
+ Text [ English ] = "Print selection or whole document?" ;
+ Text[ italian ] = "Volete stampare la selezione o l'intero documento?";
+ Text[ portuguese_brazilian ] = "Wollen Sie die Selektion oder das gesamte Dokument drucken?";
+ Text[ portuguese ] = "Deseja imprimir a selecção ou o documento inteiro?";
+ Text[ danish ] = "Vil du udskrive det markerede eller hele dokumentet?";
+ Text[ french ] = "Souhaitez vous imprimer uniquement la sélection ou bien le document entier ?";
+ Text[ swedish ] = "Vill Du skriva ut det markerade eller hela dokumentet?";
+ Text[ dutch ] = "Wilt u de selectie of het hele document afdrukken?";
+ Text[ spanish ] = "¿Desea imprimir solo la selección o todo el documento?";
+ Text[ english_us ] = "Do you want to print the selection or the entire document?";
+ Text[ chinese_simplified ] = "ÄúÒª´òÓ¡Ñ¡ÖеIJ¿·Ö»¹ÊÇÒª´òÓ¡Õû¸öÎĵµ£¿";
+ Text[ russian ] = "Âû õîòèòå íàïå÷àòàòü âåñü äîêóìåíò èëè òîëüêî âûäåëåíííûé ôðàãìåíò?";
+ Text[ polish ] = "Czy chcesz wydrukowaæ zaznaczony obszar, czy ca³y dokument?";
+ Text[ japanese ] = "ˆóü‚Í‘I‘ð‚µ‚½•”•ª‚É‚µ‚Ü‚·‚©AÄÞ·­ÒÝÄ‘S‘Ì‚µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "­n¦C¦L¿ï¨úªº³¡¥÷ÁÙ¬O­n¦C¦L¾ã­Ó¤å¥ó¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ØÈÇÚÉ ÇáÊÍÏíÏ ÝÞØ¡ Ãã ÇáãÓÊäÏ ÈÃßãáå¿";
+ Text[ greek ] = "ÈÝëåôå íá åêôõðþóåôå ôçí åðéëåãìÝíç ðåñéï÷Þ Þ ïëüêëçñï ôï Ýããñáöï;";
+ Text[ korean ] = "¼±ÅÃÇÑ ¹üÀ§ ȤÀº ¹®¼­ Àüü¸¦ ÀμâÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Seçilen aralýk ya da belgenin tümü mü yazdýrýlsýn?";
+};
+String RID_SVXSTR_QRY_PRINT_ALL
+{
+ Text = "~Alles" ;
+ Text [ English ] = "All" ;
+ Text[ italian ] = "~Tutto";
+ Text[ portuguese_brazilian ] = "Alles";
+ Text[ portuguese ] = "~Tudo";
+ Text[ danish ] = "~Alt";
+ Text[ french ] = "~Tout";
+ Text[ swedish ] = "~Allt";
+ Text[ dutch ] = "~Alles";
+ Text[ spanish ] = "~Todo";
+ Text[ english_us ] = "~All";
+ Text[ chinese_simplified ] = "È«²¿";
+ Text[ russian ] = "Âñå";
+ Text[ polish ] = "Wszystko";
+ Text[ japanese ] = "‚·‚ׂÄ";
+ Text[ chinese_traditional ] = "¥þ³¡";
+ Text[ arabic ] = "Çáßá";
+ Text[ greek ] = "¼ë~á";
+ Text[ korean ] = "Àüü(~A)";
+ Text[ turkish ] = "~Tümü";
+};
+String RID_SVXSTR_QRY_PRINT_SELECTION
+{
+ Text = "~Selektion" ;
+ Text [ English ] = "Selection" ;
+ Text[ italian ] = "~Selezione";
+ Text[ portuguese_brazilian ] = "Selektion";
+ Text[ portuguese ] = "~Selecção";
+ Text[ danish ] = "Markering";
+ Text[ french ] = "~Sélection";
+ Text[ swedish ] = "~Markering";
+ Text[ dutch ] = "~Selectie";
+ Text[ spanish ] = "Sele~cción";
+ Text[ english_us ] = "~Selection";
+ Text[ chinese_simplified ] = "Ñ¡ÖÐ";
+ Text[ russian ] = "Âûäåëåíèå";
+ Text[ polish ] = "Selekcja";
+ Text[ japanese ] = "‘I‘ð”͈Í";
+ Text[ chinese_traditional ] = "¿ï¨ú";
+ Text[ arabic ] = "ÇáÊÍÏíÏ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃÇÑ ¹üÀ§(~S)";
+ Text[ turkish ] = "~Seçilen aralýk";
+};
+
diff --git a/svx/source/dialog/relfld.cxx b/svx/source/dialog/relfld.cxx
new file mode 100644
index 0000000000..83dfe83730
--- /dev/null
+++ b/svx/source/dialog/relfld.cxx
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * $RCSfile: relfld.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <tools/ref.hxx>
+#include "relfld.hxx"
+
+// -----------------------------------------------------------------------
+
+SvxRelativeField::SvxRelativeField( Window* pParent, WinBits nWinSize ) :
+ MetricField( pParent, nWinSize )
+{
+ bRelativeMode = FALSE;
+ bRelative = FALSE;
+
+ SetDecimalDigits( 2 );
+ SetMin( 0 );
+ SetMax( 9999 );
+}
+
+// -----------------------------------------------------------------------
+
+SvxRelativeField::SvxRelativeField( Window* pParent, const ResId& rResId ) :
+ MetricField( pParent, rResId )
+{
+ bRelativeMode = FALSE;
+ bRelative = FALSE;
+
+ SetDecimalDigits( 2 );
+ SetMin( 0 );
+ SetMax( 9999 );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxRelativeField::Modify()
+{
+ MetricField::Modify();
+
+ if ( bRelativeMode )
+ {
+ String aStr = GetText();
+ BOOL bNewMode = bRelative;
+
+ if ( bRelative )
+ {
+ const sal_Unicode* pStr = aStr.GetBuffer();
+
+ while ( *pStr )
+ {
+ if( ( ( *pStr < sal_Unicode( '0' ) ) || ( *pStr > sal_Unicode( '9' ) ) ) &&
+ ( *pStr != sal_Unicode( '%' ) ) )
+ {
+ bNewMode = FALSE;
+ break;
+ }
+ pStr++;
+ }
+ }
+ else
+ {
+ xub_StrLen nPos = aStr.Search( sal_Unicode( '%' ) );
+
+ if ( nPos != STRING_NOTFOUND )
+ bNewMode = TRUE;
+ }
+
+ if ( bNewMode != bRelative )
+ SetRelative( bNewMode );
+
+ MetricField::Modify();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxRelativeField::EnableRelativeMode( USHORT nMin,
+ USHORT nMax, USHORT nStep )
+{
+ bRelativeMode = TRUE;
+ nRelMin = nMin;
+ nRelMax = nMax;
+ nRelStep = nStep;
+ SetUnit( FUNIT_CM );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxRelativeField::SetRelative( BOOL bNewRelative )
+{
+ Selection aSelection = GetSelection();
+ String aStr = GetText();
+
+ if ( bNewRelative )
+ {
+ bRelative = TRUE;
+ SetDecimalDigits( 0 );
+ SetMin( nRelMin );
+ SetMax( nRelMax );
+ SetCustomUnitText( String( sal_Unicode( '%' ) ) );
+ SetUnit( FUNIT_CUSTOM );
+ }
+ else
+ {
+ bRelative = FALSE;
+ SetDecimalDigits( 2 );
+ SetMin( 0 );
+ SetMax( 9999 );
+ SetUnit( FUNIT_CM );
+ }
+
+ SetText( aStr );
+ SetSelection( aSelection );
+}
+
+
diff --git a/svx/source/dialog/rlrcitem.cxx b/svx/source/dialog/rlrcitem.cxx
new file mode 100644
index 0000000000..9c1e5764f5
--- /dev/null
+++ b/svx/source/dialog/rlrcitem.cxx
@@ -0,0 +1,181 @@
+/*************************************************************************
+ *
+ * $RCSfile: rlrcitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SFXRECTITEM_HXX
+#include <svtools/rectitem.hxx>
+#endif
+#pragma hdrstop
+
+#define ITEMID_LRSPACE 0
+#define ITEMID_ULSPACE 0
+#define ITEMID_TABSTOP 0
+#define ITEMID_PROTECT 0
+
+#include "dialogs.hrc"
+
+#include "ruler.hxx"
+#include "lrspitem.hxx"
+#include "ulspitem.hxx"
+#include "tstpitem.hxx"
+#include "protitem.hxx"
+#include "rlrcitem.hxx"
+#include "rulritem.hxx"
+
+// class SvxRulerItem ----------------------------------------------------
+
+SvxRulerItem::SvxRulerItem(USHORT nId, SvxRuler &rRul, SfxBindings &rBindings)
+: SfxControllerItem(nId, rBindings),
+ rRuler(rRul)
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxRulerItem::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState)
+{
+ // SFX_ITEM_DONTCARE => pState == -1 => PTR_CAST buff
+ if ( eState != SFX_ITEM_AVAILABLE )
+ pState = 0;
+
+ switch(nSID)
+ {
+ // Linker / rechter Seitenrand
+ case SID_RULER_LR_MIN_MAX:
+ {
+ const SfxRectangleItem *pItem = PTR_CAST(SfxRectangleItem, pState);
+ rRuler.UpdateFrameMinMax(pItem);
+ break;
+ }
+ case SID_ATTR_LONG_LRSPACE:
+ {
+ const SvxLongLRSpaceItem *pItem = PTR_CAST(SvxLongLRSpaceItem, pState);
+ DBG_ASSERT(pState? 0 != pItem: TRUE, "SvxLRSpaceItem erwartet");
+ rRuler.UpdateFrame(pItem);
+ break;
+ }
+ case SID_ATTR_LONG_ULSPACE:
+ {
+ const SvxLongULSpaceItem *pItem = PTR_CAST(SvxLongULSpaceItem, pState);
+ DBG_ASSERT(pState? 0 != pItem: TRUE, "SvxULSpaceItem erwartet");
+ rRuler.UpdateFrame(pItem);
+ break;
+ }
+ case SID_ATTR_TABSTOP:
+ {
+ const SvxTabStopItem *pItem = PTR_CAST(SvxTabStopItem, pState);
+ DBG_ASSERT(pState? 0 != pItem: TRUE, "SvxTabStopItem erwartet");
+ rRuler.Update(pItem);
+ break;
+ }
+ case SID_ATTR_PARA_LRSPACE:
+ {
+ const SvxLRSpaceItem *pItem = PTR_CAST(SvxLRSpaceItem, pState);
+ DBG_ASSERT(pState? 0 != pItem: TRUE, "SvxLRSpaceItem erwartet");
+ rRuler.UpdatePara(pItem);
+ break;
+ }
+ case SID_RULER_BORDERS:
+ {
+ const SvxColumnItem *pItem = PTR_CAST(SvxColumnItem, pState);
+ DBG_ASSERT(pState? 0 != pItem: TRUE, "SvxColumnItem erwartet");
+#ifdef DBG_UTIL
+ if(pItem)
+ {
+ if(pItem->IsConsistent())
+ rRuler.Update(pItem);
+ else
+ DBG_ERROR("Spaltenitem corrupted");
+ }
+ else
+ rRuler.Update(pItem);
+#else
+ rRuler.Update(pItem);
+#endif
+ break;
+ }
+ case SID_RULER_PAGE_POS:
+ { // Position Seite, Seitenbreite
+ const SvxPagePosSizeItem *pItem = PTR_CAST(SvxPagePosSizeItem, pState);
+ DBG_ASSERT(pState? 0 != pItem: TRUE, "SvxPagePosSizeItem erwartet");
+ rRuler.Update(pItem);
+ break;
+ }
+ case SID_RULER_OBJECT:
+ { // Object-Selektion
+ const SvxObjectItem *pItem = PTR_CAST(SvxObjectItem, pState);
+ DBG_ASSERT(pState? 0 != pItem: TRUE, "SvxObjectItem erwartet");
+ rRuler.Update(pItem);
+ break;
+ }
+ case SID_RULER_PROTECT:
+ {
+ const SvxProtectItem *pItem = PTR_CAST(SvxProtectItem, pState);
+ DBG_ASSERT(pState? 0 != pItem: TRUE, "SvxProtectItem erwartet");
+ rRuler.Update(pItem);
+ break;
+ }
+ }
+}
+
+
diff --git a/svx/source/dialog/rlrcitem.hxx b/svx/source/dialog/rlrcitem.hxx
new file mode 100644
index 0000000000..1b94521ceb
--- /dev/null
+++ b/svx/source/dialog/rlrcitem.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * $RCSfile: rlrcitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_RLRCITEM_HXX
+#define _SVX_RLRCITEM_HXX
+
+#ifndef _SFXCTRLITEM_HXX
+#include <sfx2/ctrlitem.hxx>
+#endif
+
+class SvxRuler;
+
+// class SvxRulerItem ----------------------------------------------------
+
+class SvxRulerItem : public SfxControllerItem
+{
+private:
+ SvxRuler& rRuler;
+
+protected:
+ virtual void StateChanged( USHORT,
+ SfxItemState, const SfxPoolItem* pState );
+
+public:
+ SvxRulerItem( USHORT nId, SvxRuler&, SfxBindings& );
+};
+
+
+#endif
+
diff --git a/svx/source/dialog/ruler.hrc b/svx/source/dialog/ruler.hrc
new file mode 100644
index 0000000000..c3519f0fc0
--- /dev/null
+++ b/svx/source/dialog/ruler.hrc
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * $RCSfile: ruler.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+//!! Abhaegigkeit zu sv.hxx
+#define ID_MM 1
+#define ID_CM 2
+#define ID_M 3
+#define ID_KM 4
+#define ID_INCH 8
+#define ID_FOOT 9
+#define ID_MILE 10
+#define ID_POINT 6
+#define ID_PICA 7
+
diff --git a/svx/source/dialog/ruler.src b/svx/source/dialog/ruler.src
new file mode 100644
index 0000000000..6bb0bec389
--- /dev/null
+++ b/svx/source/dialog/ruler.src
@@ -0,0 +1,393 @@
+/*************************************************************************
+ *
+ * $RCSfile: ruler.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "ruler.hrc"
+
+Menu RID_SVXMN_RULER
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = ID_MM ;
+ Checkable = TRUE ;
+ Text = "Millimeter" ;
+ Text [ English ] = "Millimeter" ;
+ Text [ dutch ] = "Millimeter" ;
+ Text [ english_us ] = "Millimeter" ;
+ Text [ italian ] = "Millimetro" ;
+ Text [ spanish ] = "Milímetros" ;
+ Text [ french ] = "Millimètre" ;
+ Text [ swedish ] = "Millimeter" ;
+ Text [ danish ] = "Millimeter" ;
+ Text [ portuguese ] = "Milímetro" ;
+ Text [ portuguese_brazilian ] = "Millimeter" ;
+ Text[ chinese_simplified ] = "ºÁÃ×";
+ Text[ russian ] = "Ìèëëèìåòðû";
+ Text[ polish ] = "Milimetr";
+ Text[ japanese ] = "ÐØÒ°ÄÙ";
+ Text[ chinese_traditional ] = "²@¦Ì";
+ Text[ arabic ] = "ãíáíãÊÑ";
+ Text[ greek ] = "×éëéïóôÜ";
+ Text[ korean ] = "¹Ð¸®¹ÌÅÍ";
+ Text[ turkish ] = "Milimetre";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_CM ;
+ Checkable = TRUE ;
+ Text = "Zentimeter" ;
+ Text [ English ] = "Centimeter" ;
+ Text [ norwegian ] = "Centimeter" ;
+ Text [ italian ] = "Centimetro" ;
+ Text [ portuguese_brazilian ] = "Centímetro" ;
+ Text [ portuguese ] = "Centímetro" ;
+ Text [ finnish ] = "Senttimetri" ;
+ Text [ danish ] = "Centimeter" ;
+ Text [ french ] = "Centimètre" ;
+ Text [ swedish ] = "Centimeter" ;
+ Text [ dutch ] = "Centimeter" ;
+ Text [ spanish ] = "Centímetro" ;
+ Text [ english_us ] = "Centimeter" ;
+ Text[ chinese_simplified ] = "ÀåÃ×";
+ Text[ russian ] = "Ñàíòèìåòðû";
+ Text[ polish ] = "Centymetr";
+ Text[ japanese ] = "¾ÝÁÒ°ÄÙ";
+ Text[ chinese_traditional ] = "Íù¦Ì";
+ Text[ arabic ] = "ÓäÊíãÊÑ";
+ Text[ greek ] = "ÅêáôïóôÜ";
+ Text[ korean ] = "¼¾Æ¼¹ÌÅÍ";
+ Text[ turkish ] = "Santimetre";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_M ;
+ Checkable = TRUE ;
+ Text = "Meter" ;
+ Text [ English ] = "Meter" ;
+ Text [ dutch ] = "Meter" ;
+ Text [ english_us ] = "Meter" ;
+ Text [ italian ] = "Metro" ;
+ Text [ spanish ] = "Metro" ;
+ Text [ french ] = "Mètre" ;
+ Text [ swedish ] = "Meter" ;
+ Text [ danish ] = "Meter" ;
+ Text [ portuguese ] = "Metro" ;
+ Text [ portuguese_brazilian ] = "Meter" ;
+ Text[ chinese_simplified ] = "Ã×";
+ Text[ russian ] = "Ìåòðû";
+ Text[ polish ] = "Metr";
+ Text[ japanese ] = "Ò°ÄÙ";
+ Text[ chinese_traditional ] = "¦Ì";
+ Text[ arabic ] = "ãÊÑ";
+ Text[ greek ] = "ÌÝôñá";
+ Text[ korean ] = "¹ÌÅÍ";
+ Text[ turkish ] = "Metre";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_KM ;
+ Checkable = TRUE ;
+ Text = "Kilometer" ;
+ Text [ English ] = "Kilometer" ;
+ Text [ dutch ] = "Kilometer" ;
+ Text [ english_us ] = "Kilometer" ;
+ Text [ italian ] = "Chilometro" ;
+ Text [ spanish ] = "Kilómetro" ;
+ Text [ french ] = "Kilomètre" ;
+ Text [ swedish ] = "Kilometer" ;
+ Text [ danish ] = "Kilometer" ;
+ Text [ portuguese ] = "Quilómetro" ;
+ Text [ portuguese_brazilian ] = "Kilometer" ;
+ Text[ chinese_simplified ] = "¹«Àï";
+ Text[ russian ] = "Êèëîìåòðû";
+ Text[ polish ] = "Kilometr";
+ Text[ japanese ] = "·ÛÒ°ÄÙ";
+ Text[ chinese_traditional ] = "¤½¨½";
+ Text[ arabic ] = "ßíáæãÊÑ";
+ Text[ greek ] = "×éëéüìåôñï";
+ Text[ korean ] = "ų·Î¹ÌÅÍ";
+ Text[ turkish ] = "Kilometre";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_INCH ;
+ Checkable = TRUE ;
+ Text = "Zoll" ;
+ Text [ English ] = "Inch" ;
+ Text [ dutch ] = "Inch" ;
+ Text [ english_us ] = "Inch" ;
+ Text [ italian ] = "Pollice" ;
+ Text [ spanish ] = "Pulgadas" ;
+ Text [ french ] = "Pouce" ;
+ Text [ swedish ] = "Tum" ;
+ Text [ danish ] = "Tommer" ;
+ Text [ portuguese ] = "Polegada" ;
+ Text [ portuguese_brazilian ] = "Zoll" ;
+ Text[ chinese_simplified ] = "Ó¢´ç";
+ Text[ russian ] = "Äþéìû";
+ Text[ polish ] = "Cal";
+ Text[ japanese ] = "²ÝÁ";
+ Text[ chinese_traditional ] = "­^¤o";
+ Text[ arabic ] = "ÈæÕÉ";
+ Text[ greek ] = "ºíôóá";
+ Text[ korean ] = "ÀÎÄ¡";
+ Text[ turkish ] = "Inç";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_FOOT ;
+ Checkable = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fuß : Fu˜ */
+ /* ### ACHTUNG: Neuer Text in Resource? Fuß : Fu˜ */
+ Text = "Fuß" ;
+ Text [ English ] = "Foot" ;
+ Text [ dutch ] = "Voet" ;
+ Text [ english_us ] = "Foot" ;
+ Text [ italian ] = "Piede" ;
+ Text [ spanish ] = "Pie" ;
+ Text [ french ] = "Pied" ;
+ Text [ swedish ] = "Fot" ;
+ Text [ danish ] = "Fod" ;
+ Text [ portuguese ] = "Pés" ;
+ Text [ portuguese_brazilian ] = "Fuß" ;
+ Text[ chinese_simplified ] = "Ó¢³ß";
+ Text[ russian ] = "Ôóòû";
+ Text[ polish ] = "Stopa";
+ Text[ japanese ] = "̨°Ä";
+ Text[ chinese_traditional ] = "­^¤Ø";
+ Text[ arabic ] = "ÞÏã";
+ Text[ greek ] = "Ðüäé";
+ Text[ korean ] = "ÇÇÆ®";
+ Text[ turkish ] = "Ft";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_MILE ;
+ Checkable = TRUE ;
+ Text = "Meilen" ;
+ Text [ English ] = "Miles" ;
+ Text [ dutch ] = "Mijlen" ;
+ Text [ english_us ] = "Miles" ;
+ Text [ italian ] = "Miglia" ;
+ Text [ spanish ] = "Millas" ;
+ Text [ french ] = "Miles" ;
+ Text [ swedish ] = "Miles" ;
+ Text [ danish ] = "Mil" ;
+ Text [ portuguese ] = "Milhas" ;
+ Text [ portuguese_brazilian ] = "Meilen" ;
+ Text[ chinese_simplified ] = "Ó¢Àï";
+ Text[ russian ] = "Ìèëè";
+ Text[ polish ] = "Mile";
+ Text[ japanese ] = "ϲÙ";
+ Text[ chinese_traditional ] = "­^¨½";
+ Text[ arabic ] = "ÃãíÇá";
+ Text[ greek ] = "Ìßëéá";
+ Text[ korean ] = "¸¶ÀÏ";
+ Text[ turkish ] = "Mil";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_POINT ;
+ Checkable = TRUE ;
+ Text = "Punkt" ;
+ Text [ English ] = "Point" ;
+ Text [ norwegian ] = "Punkt" ;
+ Text [ italian ] = "Punto" ;
+ Text [ portuguese_brazilian ] = "Ponto" ;
+ Text [ portuguese ] = "Ponto" ;
+ Text [ finnish ] = "Piste" ;
+ Text [ danish ] = "Punkt" ;
+ Text [ french ] = "Point" ;
+ Text [ swedish ] = "Punkt" ;
+ Text [ dutch ] = "Punt" ;
+ Text [ spanish ] = "Punto" ;
+ Text [ english_us ] = "Point" ;
+ Text[ chinese_simplified ] = "µã";
+ Text[ russian ] = "Ïóíêò";
+ Text[ polish ] = "Punkt";
+ Text[ japanese ] = "Îß²ÝÄ";
+ Text[ chinese_traditional ] = "ÂI";
+ Text[ arabic ] = "äÞØÉ";
+ Text[ greek ] = "Óçìåßï";
+ Text[ korean ] = "Á¡";
+ Text[ turkish ] = "Nokta";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_PICA ;
+ Checkable = TRUE ;
+ Text = "Pica" ;
+ };
+ };
+};
+String RID_SVXSTR_RULER_TAB_LEFT
+{
+ TEXT = "Links" ;
+ TEXT [ English ] = "Left" ;
+ TEXT [ norwegian ] = "Left" ;
+ TEXT [ italian ] = "Sinistra" ;
+ TEXT [ portuguese_brazilian ] = "A Esquerda" ;
+ TEXT [ portuguese ] = "Esquerda" ;
+ TEXT [ finnish ] = "Vasen" ;
+ TEXT [ danish ] = "Venstre" ;
+ TEXT [ french ] = "À gauche" ;
+ TEXT [ swedish ] = "Vänster" ;
+ TEXT [ dutch ] = "Links" ;
+ TEXT [ spanish ] = "Izquierda" ;
+ TEXT [ english_us ] = "Left" ;
+ TEXT[ chinese_simplified ] = "×ó";
+ TEXT[ russian ] = "Ñëåâà";
+ TEXT[ polish ] = "Z lewej";
+ TEXT[ japanese ] = "¶‘µ‚¦";
+ TEXT[ chinese_traditional ] = "¥ª";
+ TEXT[ arabic ] = "íÓÇÑ";
+ TEXT[ greek ] = "ÁñéóôåñÜ";
+ TEXT[ korean ] = "¿ÂÂÊ";
+ TEXT[ turkish ] = "Sol";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_SVXSTR_RULER_TAB_RIGHT
+{
+ TEXT = "Rechts" ;
+ TEXT [ English ] = "Right" ;
+ TEXT [ norwegian ] = "Right" ;
+ TEXT [ italian ] = "Destra" ;
+ TEXT [ portuguese_brazilian ] = "A Direita" ;
+ TEXT [ portuguese ] = "Direita" ;
+ TEXT [ finnish ] = "Oikea" ;
+ TEXT [ danish ] = "Højre" ;
+ TEXT [ french ] = "À droite" ;
+ TEXT [ swedish ] = "Höger" ;
+ TEXT [ dutch ] = "Rechts" ;
+ TEXT [ spanish ] = "Derecha" ;
+ TEXT [ english_us ] = "Right" ;
+ TEXT[ chinese_simplified ] = "ÏòÓÒ";
+ TEXT[ russian ] = "Ñïðàâà";
+ TEXT[ polish ] = "Z prawej";
+ TEXT[ japanese ] = "‰E‘µ‚¦";
+ TEXT[ chinese_traditional ] = "¦V¥k";
+ TEXT[ arabic ] = "íãíä";
+ TEXT[ greek ] = "ÄåîéÜ";
+ TEXT[ korean ] = "¿À¸¥ÂÊ";
+ TEXT[ turkish ] = "Sað";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_SVXSTR_RULER_TAB_DECIMAL
+{
+ TEXT = "Dezimal" ;
+ TEXT [ English ] = "Decimal" ;
+ TEXT [ norwegian ] = "Desimal" ;
+ TEXT [ italian ] = "Decimale" ;
+ TEXT [ portuguese_brazilian ] = "Decimal" ;
+ TEXT [ portuguese ] = "Decimal" ;
+ TEXT [ finnish ] = "Desimaali" ;
+ TEXT [ danish ] = "Decimal" ;
+ TEXT [ french ] = "Décimal" ;
+ TEXT [ swedish ] = "Decimal" ;
+ TEXT [ dutch ] = "Decimaal" ;
+ TEXT [ spanish ] = "Decimal" ;
+ TEXT [ english_us ] = "Decimal" ;
+ TEXT[ chinese_simplified ] = "Ê®½øλµÄ";
+ TEXT[ russian ] = "Äåñÿòè÷íûé";
+ TEXT[ polish ] = "Dziesiêtny";
+ TEXT[ japanese ] = "¬”“_‘µ‚¦";
+ TEXT[ chinese_traditional ] = "¤Q¶i¦ìªº";
+ TEXT[ arabic ] = "ÚÔÑí";
+ TEXT[ greek ] = "ÄåêáäéêÜ";
+ TEXT[ korean ] = "¼Ò¼ö";
+ TEXT[ turkish ] = "Ondalýk";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_SVXSTR_RULER_TAB_CENTER
+{
+ TEXT = "Zentriert" ;
+ TEXT [ English ] = "Centered" ;
+ TEXT [ norwegian ] = "Centered" ;
+ TEXT [ italian ] = "Centrato" ;
+ TEXT [ portuguese_brazilian ] = "Centralizado" ;
+ TEXT [ portuguese ] = "Centrado" ;
+ TEXT [ finnish ] = "Keski" ;
+ TEXT [ danish ] = "Centreret" ;
+ TEXT [ french ] = "Centré" ;
+ TEXT [ swedish ] = "Centrerat" ;
+ TEXT [ dutch ] = "Gecentreerd" ;
+ TEXT [ spanish ] = "Centrado" ;
+ TEXT [ english_us ] = "Center" ;
+ TEXT[ chinese_simplified ] = "¾ÓÖÐ";
+ TEXT[ russian ] = "Ïî öåíòðó";
+ TEXT[ polish ] = "Wyœrodkuj";
+ TEXT[ japanese ] = "’†‰›‘µ‚¦";
+ TEXT[ chinese_traditional ] = "¸m¤¤";
+ TEXT[ arabic ] = "ÊæÓíØ";
+ TEXT[ greek ] = "ÊåíôñáñéóìÝíá";
+ TEXT[ korean ] = "°¡¿îµ¥";
+ TEXT[ turkish ] = "Orta";
+ TEXT[ language_user1 ] = " ";
+};
diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx
new file mode 100644
index 0000000000..fbf1edb95a
--- /dev/null
+++ b/svx/source/dialog/rulritem.cxx
@@ -0,0 +1,476 @@
+/*************************************************************************
+ *
+ * $RCSfile: rulritem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#pragma hdrstop
+
+#include "dialogs.hrc"
+#include "rulritem.hxx"
+
+//------------------------------------------------------------------------
+
+TYPEINIT1(SvxPagePosSizeItem, SfxPoolItem);
+TYPEINIT1(SvxLongLRSpaceItem, SfxPoolItem);
+TYPEINIT1(SvxLongULSpaceItem, SfxPoolItem);
+TYPEINIT1(SvxColumnItem, SfxPoolItem);
+TYPEINIT1(SvxObjectItem, SfxPoolItem);
+
+//------------------------------------------------------------------------
+
+int SvxLongLRSpaceItem::operator==( const SfxPoolItem& rCmp) const
+{
+ return SfxPoolItem::operator==(rCmp) &&
+ lLeft==((const SvxLongLRSpaceItem &)rCmp).lLeft &&
+ lRight==((const SvxLongLRSpaceItem &)rCmp).lRight;
+}
+
+
+//------------------------------------------------------------------------
+
+String SvxLongLRSpaceItem::GetValueText() const
+{
+ return String();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxLongLRSpaceItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ String& rText, const International *
+) const
+{
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxLongLRSpaceItem::Clone(SfxItemPool *pPool) const
+{
+ return new SvxLongLRSpaceItem(*this);
+}
+
+//------------------------------------------------------------------------
+
+SvxLongLRSpaceItem::SvxLongLRSpaceItem(long lL, long lR, USHORT nId)
+ : SfxPoolItem(nId),
+ lLeft(lL),
+ lRight(lR)
+{}
+
+//------------------------------------------------------------------------
+
+SvxLongLRSpaceItem::SvxLongLRSpaceItem(const SvxLongLRSpaceItem &rCpy)
+ : SfxPoolItem(rCpy),
+ lLeft(rCpy.lLeft),
+ lRight(rCpy.lRight)
+ {}
+
+//------------------------------------------------------------------------
+
+int SvxLongULSpaceItem::operator==( const SfxPoolItem& rCmp) const
+{
+ return SfxPoolItem::operator==(rCmp) &&
+ lLeft==((const SvxLongULSpaceItem &)rCmp).lLeft &&
+ lRight==((const SvxLongULSpaceItem &)rCmp).lRight;
+}
+
+
+//------------------------------------------------------------------------
+
+String SvxLongULSpaceItem::GetValueText() const
+{
+ return String();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxLongULSpaceItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ String& rText, const International *
+) const
+{
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxLongULSpaceItem::Clone(SfxItemPool *pPool) const
+{
+ return new SvxLongULSpaceItem(*this);
+}
+
+//------------------------------------------------------------------------
+
+SvxLongULSpaceItem::SvxLongULSpaceItem(long lL, long lR, USHORT nId)
+ : SfxPoolItem(nId),
+ lLeft(lL),
+ lRight(lR)
+{}
+
+//------------------------------------------------------------------------
+
+SvxLongULSpaceItem::SvxLongULSpaceItem(const SvxLongULSpaceItem &rCpy)
+ : SfxPoolItem(rCpy),
+ lLeft(rCpy.lLeft),
+ lRight(rCpy.lRight)
+ {}
+
+//------------------------------------------------------------------------
+
+int SvxPagePosSizeItem::operator==( const SfxPoolItem& rCmp) const
+{
+ return SfxPoolItem::operator==(rCmp) &&
+ aPos == ((const SvxPagePosSizeItem &)rCmp).aPos &&
+ lWidth == ((const SvxPagePosSizeItem &)rCmp).lWidth &&
+ lHeight == ((const SvxPagePosSizeItem &)rCmp).lHeight;
+}
+
+
+//------------------------------------------------------------------------
+
+String SvxPagePosSizeItem::GetValueText() const
+{
+ return String();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxPagePosSizeItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ String& rText, const International *
+) const
+{
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxPagePosSizeItem::Clone(SfxItemPool *pPool) const
+{
+ return new SvxPagePosSizeItem(*this);
+}
+
+//------------------------------------------------------------------------
+
+SvxPagePosSizeItem::SvxPagePosSizeItem(const Point &rP, long lW, long lH)
+ : SfxPoolItem(SID_RULER_PAGE_POS),
+ aPos(rP),
+ lWidth(lW),
+ lHeight(lH)
+{}
+
+//------------------------------------------------------------------------
+
+SvxPagePosSizeItem::SvxPagePosSizeItem(const SvxPagePosSizeItem &rCpy)
+ : SfxPoolItem(rCpy),
+ aPos(rCpy.aPos),
+ lWidth(rCpy.lWidth),
+ lHeight(rCpy.lHeight)
+ {}
+
+
+//------------------------------------------------------------------------
+
+void SvxColumnItem::DeleteAndDestroyColumns()
+{
+ for( USHORT i = aColumns.Count(); i>0; )
+ {
+ SvxColumnDescription *pTmp = (SvxColumnDescription *)aColumns[--i];
+ aColumns.Remove( i );
+ delete pTmp;
+ }
+}
+
+//------------------------------------------------------------------------
+
+int SvxColumnItem::operator==(const SfxPoolItem& rCmp) const
+{
+ if(!SfxPoolItem::operator==(rCmp) ||
+ nActColumn != ((const SvxColumnItem&)rCmp).nActColumn ||
+ nLeft != ((const SvxColumnItem&)rCmp).nLeft ||
+ nRight != ((const SvxColumnItem&)rCmp).nRight ||
+ bTable != ((const SvxColumnItem&)rCmp).bTable ||
+ Count() != ((const SvxColumnItem&)rCmp).Count())
+ return FALSE;
+
+ const USHORT nCount = ((const SvxColumnItem&)rCmp).Count();
+ for(USHORT i = 0; i < nCount;++i) {
+#ifdef DEBUG
+ SvxColumnDescription *p1 = (SvxColumnDescription *)aColumns[i],
+ *p2 = (SvxColumnDescription *)
+ ((const SvxColumnItem&)rCmp).aColumns[i];
+#endif
+ if( (*this)[i] != ((const SvxColumnItem&)rCmp)[i] )
+ return FALSE;
+ }
+ return TRUE;
+}
+
+//------------------------------------------------------------------------
+
+String SvxColumnItem::GetValueText() const
+{
+ return String();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxColumnItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ String& rText, const International *
+) const
+{
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxColumnItem::Clone( SfxItemPool *pPool ) const
+{
+ return new SvxColumnItem(*this);
+}
+
+//------------------------------------------------------------------------
+
+SvxColumnItem::SvxColumnItem( USHORT nAct ) :
+
+ SfxPoolItem( SID_RULER_BORDERS ),
+
+ nActColumn ( nAct ),
+ nLeft ( 0 ),
+ nRight ( 0 ),
+ bTable ( FALSE )
+
+{
+}
+
+//------------------------------------------------------------------------
+
+SvxColumnItem::SvxColumnItem( USHORT nActCol, USHORT left, USHORT right ) :
+
+ SfxPoolItem( SID_RULER_BORDERS ),
+
+ nActColumn ( nActCol ),
+ nLeft ( left ),
+ nRight ( right ),
+ bTable ( TRUE )
+
+{
+}
+
+//------------------------------------------------------------------------
+
+SvxColumnItem::SvxColumnItem( const SvxColumnItem& rCopy ) :
+
+ SfxPoolItem( rCopy ),
+
+ nActColumn( rCopy.nActColumn ),
+ nLeft ( rCopy.nLeft ),
+ nRight ( rCopy.nRight ),
+ bTable ( rCopy.bTable ),
+ aColumns ( (BYTE)rCopy.Count() )
+
+{
+ const USHORT nCount = rCopy.Count();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ Append( rCopy[i] );
+}
+
+//------------------------------------------------------------------------
+
+SvxColumnItem::~SvxColumnItem()
+{
+ DeleteAndDestroyColumns();
+}
+
+//------------------------------------------------------------------------
+
+const SvxColumnItem &SvxColumnItem::operator=(const SvxColumnItem &rCopy)
+{
+ nLeft = rCopy.nLeft;
+ nRight = rCopy.nRight;
+ bTable = rCopy.bTable;
+ nActColumn = rCopy.nActColumn;
+ DeleteAndDestroyColumns();
+ const USHORT nCount = rCopy.Count();
+ for(USHORT i = 0; i < nCount;++i)
+ Insert(rCopy[i], i);
+ return *this;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SvxColumnItem::CalcOrtho() const
+{
+ const USHORT nCount = Count();
+ DBG_ASSERT(nCount >= 2, "keine Spalten");
+ if(nCount < 2)
+ return FALSE;
+
+ const USHORT nColWidth = (*this)[0].GetWidth();
+ for(USHORT i = 1; i < nCount; ++i) {
+ if( (*this)[i].GetWidth() != nColWidth)
+ return FALSE;
+ }
+ //!! Breite Trenner
+ return TRUE;
+}
+
+//------------------------------------------------------------------------
+
+long SvxColumnItem::GetVisibleRight() const
+{
+ USHORT nIdx = 0;
+
+ for ( USHORT i = 0; i < nActColumn; ++i )
+ {
+ if ( (*this)[i].bVisible )
+ ++nIdx;
+ }
+ return (*this)[nIdx].nEnd;
+}
+
+//------------------------------------------------------------------------
+
+int SvxObjectItem::operator==( const SfxPoolItem& rCmp ) const
+{
+ return SfxPoolItem::operator==(rCmp) &&
+ nStartX == ((const SvxObjectItem&)rCmp).nStartX &&
+ nEndX == ((const SvxObjectItem&)rCmp).nEndX &&
+ nStartY == ((const SvxObjectItem&)rCmp).nStartY &&
+ nEndY == ((const SvxObjectItem&)rCmp).nEndY &&
+ bLimits == ((const SvxObjectItem&)rCmp).bLimits;
+}
+
+//------------------------------------------------------------------------
+
+String SvxObjectItem::GetValueText() const
+{
+ return String();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxObjectItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ String& rText, const International *
+) const
+{
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxObjectItem::Clone(SfxItemPool *pPool) const
+{
+ return new SvxObjectItem(*this);
+}
+
+//------------------------------------------------------------------------
+
+SvxObjectItem::SvxObjectItem( long nSX, long nEX,
+ long nSY, long nEY, BOOL limits ) :
+
+ SfxPoolItem( SID_RULER_OBJECT ),
+
+ nStartX ( nSX ),
+ nEndX ( nEX ),
+ nStartY ( nSY ),
+ nEndY ( nEY ),
+ bLimits ( limits )
+
+{
+}
+
+//------------------------------------------------------------------------
+
+SvxObjectItem::SvxObjectItem( const SvxObjectItem& rCopy ) :
+
+ SfxPoolItem( rCopy ),
+
+ nStartX ( rCopy.nStartX ),
+ nEndX ( rCopy.nEndX ),
+ nStartY ( rCopy.nStartY ),
+ nEndY ( rCopy.nEndY ),
+ bLimits ( rCopy.bLimits )
+
+{
+}
+
+
diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src
new file mode 100644
index 0000000000..cbd19eef21
--- /dev/null
+++ b/svx/source/dialog/sdstring.src
@@ -0,0 +1,4713 @@
+/*************************************************************************
+ *
+ * $RCSfile: sdstring.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 -------------------------------------------------------------------
+
+ // Strings fuer die Draw-Dialoge --------------------------------------------
+String RID_SVXSTR_SOLID
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Durchgängig : Durchgõngig */
+ /* ### ACHTUNG: Neuer Text in Resource? Durchgängig : Durchgõngig */
+ Text = "Durchgängig" ;
+ Text [ ENGLISH ] = "Solid" ;
+ Text [ norwegian ] = "Solid" ;
+ Text [ italian ] = "Piena" ;
+ Text [ portuguese_brazilian ] = "Sólido" ;
+ Text [ portuguese ] = "Contínuo" ;
+ Text [ finnish ] = "Tasainen" ;
+ Text [ danish ] = "Gennemgående" ;
+ Text [ french ] = "Continu" ;
+ Text [ swedish ] = "Genomgående" ;
+ Text [ dutch ] = "Doorlopend" ;
+ Text [ spanish ] = "Continuo" ;
+ Text [ english_us ] = "Continuous" ;
+ Text[ chinese_simplified ] = "Á¬ÐøµÄ";
+ Text[ russian ] = "Ñïëîøíàÿ";
+ Text[ polish ] = "Ci¹g³y";
+ Text[ japanese ] = "ŽÀü";
+ Text[ chinese_traditional ] = "«ùÄòªº";
+ Text[ arabic ] = "ãÊæÇÕá";
+ Text[ greek ] = "Óõíå÷üìåíá";
+ Text[ korean ] = "ÀϹÝ";
+ Text[ turkish ] = "Sürekli";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GRADIENT
+{
+ Text = "Farbverlauf" ;
+ Text [ ENGLISH ] = "Gradient" ;
+ Text [ norwegian ] = "Gradient" ;
+ Text [ italian ] = "Sfumatura" ;
+ Text [ portuguese_brazilian ] = "Dégradé" ;
+ Text [ portuguese ] = "Gradação" ;
+ Text [ finnish ] = "Liukuväri" ;
+ Text [ danish ] = "Farvegraduering" ;
+ Text [ french ] = "Dégradé" ;
+ Text [ swedish ] = "Färggradient" ;
+ Text [ dutch ] = "Kleurverloop" ;
+ Text [ spanish ] = "Gradiente de color" ;
+ Text [ english_us ] = "Gradient" ;
+ Text[ chinese_simplified ] = "²Êɫͼ°¸";
+ Text[ russian ] = "Ãðàäèåíòíàÿ";
+ Text[ polish ] = "Gradient";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý";
+ Text[ chinese_traditional ] = "±m¦â¹Ï®×";
+ Text[ arabic ] = "ÊÏÑÌ Çááæä";
+ Text[ greek ] = "ÄéáâÜèìéóç ÷ñþìáôïò";
+ Text[ korean ] = "±×¶óµ¥À̼Ç";
+ Text[ turkish ] = "Gradyan";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DESC_GRADIENT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für den Farbverlauf ein: : Geben Sie hier bitte den Namen f³r den Farbverlauf ein: */
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für den Farbverlauf ein: : Geben Sie hier bitte den Namen f³r den Farbverlauf ein: */
+ Text = "Geben Sie hier bitte den Namen für den Farbverlauf ein:" ;
+ Text [ ENGLISH ] = "Please insert a Name for the Gradient:" ;
+ Text [ norwegian ] = "Please insert a Name for the Gradient:" ;
+ Text [ italian ] = "Digitate un nome per la sfumatura:" ;
+ Text [ portuguese_brazilian ] = "Please insert a Name for the Gradient:" ;
+ Text [ portuguese ] = "Introduza aqui um nome para a gradação:" ;
+ Text [ french ] = "Saisissez un nom pour le dégradé :" ;
+ Text [ dutch ] = "Typ hier een naam voor het kleurverloop:" ;
+ Text [ spanish ] = "Inserte aquí el nombre para el gradiente:" ;
+ Text [ danish ] = "Indtast venligst et navn til farvegradueringen:" ;
+ Text [ swedish ] = "Mata in ett namn för färggradienten här:" ;
+ Text [ finnish ] = "Please insert a Name for the Gradient:" ;
+ Text [ english_us ] = "Please enter a name for the gradient:" ;
+ Text[ chinese_simplified ] = "ÇëÄúÔÚ´ËΪеIJÊɫͼ°¸ÊäÈëÒ»¸öÃû³Æ£º";
+ Text[ russian ] = "Ââåäèòå, ïîæàëóéñòà, ñþäà íàçâàíèå íîâîé ãðàäèåíòíîé:";
+ Text[ polish ] = "Podaj nazwê gradientu:";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý‚Ì–¼‘O‚ð‚±‚±‚É“ü—Í‚µ‚ĉº‚³‚¢F";
+ Text[ chinese_traditional ] = "½Ð±z¦b¦¹¬°·sªº±m¦â¹Ï®×¿é¤J¤@­Ó¦WºÙ¡G";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇÓã áÊÏÑÌ Çááæä åäÇ:";
+ Text[ greek ] = "Ðáñáêáëþ åéóÜãåôå ôï üíïìá ãéá ôçí äéáâÜèìéóç ôïõ ÷ñþìáôïò:";
+ Text[ korean ] = "¿©±â¿¡ ±×¶óµ¥À̼ÇÀÇ À̸§À» ÀÔ·ÂÇϽʽÿÀ:";
+ Text[ turkish ] = "Gradyan için bir ad girin:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DEL_GRADIENT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Farbverlauf löschen : Farbverlauf l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Farbverlauf löschen : Farbverlauf l÷schen */
+ Text = "Farbverlauf löschen" ;
+ Text [ ENGLISH ] = "Delete Gradient" ;
+ Text [ norwegian ] = "Slett+++ Gradient" ;
+ Text [ italian ] = "Elimina sfumatura" ;
+ Text [ portuguese_brazilian ] = "Apagar Dégradé" ;
+ Text [ portuguese ] = "Eliminar gradação" ;
+ Text [ finnish ] = "Poista liukuväri" ;
+ Text [ danish ] = "Slet farvegradueringen" ;
+ Text [ french ] = "Supprimer le dégradé" ;
+ Text [ swedish ] = "Radera färggradient" ;
+ Text [ dutch ] = "Kleurverloop wissen" ;
+ Text [ spanish ] = "Eliminar gradiente de color" ;
+ Text [ english_us ] = "Delete gradient" ;
+ Text[ chinese_simplified ] = "ɾ³ý²Êɫͼ°¸";
+ Text[ russian ] = "Óäàëèòü ãðàäèåíòíóþ";
+ Text[ polish ] = "Usuñ gradient";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£±m¦â¹Ï®×";
+ Text[ arabic ] = "ÍÐÝ ÊÏÑÌ Çááæä";
+ Text[ greek ] = "ÄéáãñáöÞ äéáâÜèìéóç ÷ñþìáôïò";
+ Text[ korean ] = "±×¶óµ¥ÀÌ¼Ç »èÁ¦";
+ Text[ turkish ] = "Gradyaný sil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_DEL_GRADIENT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Soll der Farbverlauf wirklich gelöscht werden? : Soll der Farbverlauf wirklich gel÷scht werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Soll der Farbverlauf wirklich gelöscht werden? : Soll der Farbverlauf wirklich gel÷scht werden? */
+ Text = "Soll der Farbverlauf wirklich gelöscht werden?" ;
+ Text [ ENGLISH ] = "Do you want to delete the Gradient?" ;
+ Text [ norwegian ] = "Vil du slette+++ Gradient?" ;
+ Text [ italian ] = "Eliminare la sfumatura?" ;
+ Text [ portuguese_brazilian ] = "Deseja apagar o Dégradé?" ;
+ Text [ portuguese ] = "Deseja realmente eliminar a gradação?" ;
+ Text [ finnish ] = "Poistetaanko liukuväri?" ;
+ Text [ danish ] = "Er du sikker på, at du vil slette farvegradueringen?" ;
+ Text [ french ] = "Voulez-vous supprimer le dégradé ?" ;
+ Text [ swedish ] = "Skall färggradienten verkligen raderas?" ;
+ Text [ dutch ] = "Wilt u het kleurverloop werkelijk wissen?" ;
+ Text [ spanish ] = "¿Desea realmente eliminar el gradiente de color?" ;
+ Text [ english_us ] = "Do you want to delete the gradient?" ;
+ Text[ chinese_simplified ] = "ÄúÕæµÄҪɾ³ýÕâ¸ö²Êɫͼ°¸Âð£¿";
+ Text[ russian ] = "Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòó ãðàäèåíòíóþ?";
+ Text[ polish ] = "Czy chcesz na pewno usun¹æ gradient?";
+ Text[ japanese ] = "‚±‚̸Þ×ÃÞ°¼®Ý‚ð–{“–‚É휂µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "±z¯u­n§R°£³o­Ó±m¦â¹Ï®×¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ÈÇáÝÚá ÍÐÝ ÊÏÑÌ Çááæä¿";
+ Text[ greek ] = "ÈÝëåôå ðñáãìáôéêÜ íá ãßíåé äéáãñáöÞ ôçò äéáâÜèìéóçò ÷ñþìáôïò;";
+ Text[ korean ] = "±×¶óµ¥À̼ÇÀ» Á¤¸»·Î »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Gradyan gerçekten silinsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_CHANGE_GRADIENT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Der Farbverlauf wurde geändert und nicht gesichert. \nSie können den selektierten Farbverlauf ändern \noder einen neuen Farbverlauf hinzufügen. : Der Farbverlauf wurde geõndert und nicht gesichert. \nSie k÷nnen den selektierten Farbverlauf õndern \noder einen neuen Farbverlauf hinzuf³gen. */
+ /* ### ACHTUNG: Neuer Text in Resource? Der Farbverlauf wurde geändert und nicht gesichert. \nSie können den selektierten Farbverlauf ändern \noder einen neuen Farbverlauf hinzufügen. : Der Farbverlauf wurde geõndert und nicht gesichert. \nSie k÷nnen den selektierten Farbverlauf õndern \noder einen neuen Farbverlauf hinzuf³gen. */
+ Text = "Der Farbverlauf wurde geändert und nicht gesichert. \nSie können den selektierten Farbverlauf ändern \noder einen neuen Farbverlauf hinzufügen." ;
+ Text [ ENGLISH ] = "The Gradient was modified without Save? \nChange the selceted Gradient or add a new Gradient." ;
+ Text [ norwegian ] = "+++The Gradient ble endret uten å lagres? \nEndre den merkede +++Gradient eller legg til en ny +++Gradient." ;
+ Text [ italian ] = "La sfumatura è stata modificata ma non cambiata \nPotete cambiare la sfumatura selezionata \no aggiungerne una nuova." ;
+ Text [ portuguese_brazilian ] = "O Dégradé foi modificado sem Gravar? \nMude o Dégradé selecionado ou acrescente um novo Dégradé." ;
+ Text [ portuguese ] = "A gradação da cor foi modificada e não guardada.\nPoderá modificar a gradação seleccionada\nou adicionar uma nova." ;
+ Text [ finnish ] = "Muutettua liukuväriä ei ole tallennettu. \nVoit muokata valittua liukuväriä tai lisätä uuden." ;
+ Text [ danish ] = "Farvegradueringen er blevet ændret, men ikke gemt. \nDu kan ændre den markerede farvegraduering \neller tilføje en ny." ;
+ Text [ french ] = "Le dégradé a été modifié sans avoir été sauvegardé.\nVous pouvez modifier le dégradé sélectionné ou en ajouter un nouveau." ;
+ Text [ swedish ] = "Färggradienten ändrades utan att sparas.\nDu kan ändra den markerade färggradienten\neller lägga till en ny." ;
+ Text [ dutch ] = "In het kleurverloop werden wijzigingen aangebracht en niet opgeslagen. \\U kunt het geselecteerde kleurverloop wijzigen \nof een nieuw kleurverloop toevoegen." ;
+ Text [ spanish ] = "El gradiente de color ha sido modificado sin guardar.\nPuede modificarlo\no añadir uno nuevo." ;
+ Text [ english_us ] = "The gradient was modified without saving. \nModify the selected gradient or add a new gradient." ;
+ Text[ chinese_simplified ] = "Õâ¸ö²Êɫͼ°¸ÒѾ­±»¸ü¸Ä£¬µ«ÊÇ»¹Ã»Óб»±£´æ¡£\nÄúÄܹ»¸ü¸ÄÑ¡ÖеIJÊɫͼ°¸\n»òÕßÐÂÔöÒ»¸öеIJÊɫͼ°¸¡£";
+ Text[ russian ] = "Ãðàäèåíòíàÿ áûëà èçìåíåíà. íî íå ñîõðàíåíà. \nÂû ìîæåòå èçìåíèòü âûáðàííóþ ãðàäèåíòíóþ \nèëè äîáàâèòü íîâóþ ãðàäèåíòíóþ.";
+ Text[ polish ] = "Gradient zosta³ zmieniony i nie zapisany. \nMo¿esz zmieniæ zaznaczony gradient \nlub dodaæ nowy gradient.";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý‚ª•ÏX‚³‚ê‚Ä•Û‘¶‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB\n‘I‘ð‚µ‚½¸Þ×ÃÞ°¼®Ý‚Ì•ÏX‚Ü‚½‚Í\nV‚µ‚¢¸Þ×ÃÞ°¼®Ý‚̒ljÁ‚ª‚Å‚«‚Ü‚·B";
+ Text[ chinese_traditional ] = "³o­Ó±m¦â¹Ï®×¤w¸gÅܧó¡M¦ý¬O©|¥¼Àx¦s¡C\n±z¯à°÷Åܧó¿ï¨úªº±m¦â¹Ï®×\n©ÎªÌ¼W¥[¤@­Ó·sªº±m¦â¹Ï®×¡C";
+ Text[ arabic ] = "áã íÊã ÍÝÙ ÊÏÑÌ Çááæä ÈÚÏ ÊÛííÑå. \níãßäß ÊÛííÑ ÊÏÑÌ Çááæä ÇáãÍÏÏ \nÃæ ÅÖÇÝÉ ÊÏÑÌ áæä ÌÏíÏ.";
+ Text[ greek ] = "Ç äéáâÜèìéóç ôïõ ÷ñþìáôïò ôñïðïðïéÞèçêå êáé äåí áðïèçêåýôçêå. \nÌðïñåßôå íá áëëÜîåôå ôçí åðéëåãìÝíç äéáâÜèìéóç ÷ñþìáôïò \nÞ íá ðñïóèÝóåôå ìéá êáéíïýñéá.";
+ Text[ korean ] = "±×¶óµ¥À̼ÇÀÌ º¯°æµÇ¾úÀ¸³ª ÀúÀåµÇÁö ¾Ê¾Ò½À´Ï´Ù.\n¼±ÅÃµÈ ±×¶óµ¥À̼ÇÀ» º¯°æÇϰųª \n»õ ±×¶óµ¥À̼ÇÀ» Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù.";
+ Text[ turkish ] = "Gradyan deðiþtirildi ancak kaydedilmedi.\nSeçili gradyaný deðiþtirebilir ya da\nyeni bir gradyan ekleyebilirsiniz.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_BITMAP
+{
+ Text = "Bitmap" ;
+};
+String RID_SVXSTR_DESC_NEW_BITMAP
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für die Bitmap ein: : Geben Sie hier bitte den Namen f³r die Bitmap ein: */
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für die Bitmap ein: : Geben Sie hier bitte den Namen f³r die Bitmap ein: */
+ Text = "Geben Sie hier bitte den Namen für die Bitmap ein:" ;
+ Text [ ENGLISH ] = "Please insert a Name for the Bitmap:" ;
+ Text [ norwegian ] = "Please insert a Name for the Bitmap:" ;
+ Text [ italian ] = "Digitare un nome per la Bitmap:" ;
+ Text [ portuguese_brazilian ] = "Please insert a Name for the Bitmap:" ;
+ Text [ portuguese ] = "Por favor introduza um nome para o mapa de bits:" ;
+ Text [ french ] = "Saisissez un nom pour le bitmap :" ;
+ Text [ dutch ] = "Typ hier een naam voor de bitmap:" ;
+ Text [ spanish ] = "Inserte aquí el nombre para la bitmap:" ;
+ Text [ danish ] = "Indtast venligst et navn til denne bitmap:" ;
+ Text [ swedish ] = "Ange ett namn för bitmappen:" ;
+ Text [ finnish ] = "Please insert a Name for the Bitmap:" ;
+ Text [ english_us ] = "Please enter a name for the bitmap:" ;
+ Text[ chinese_simplified ] = "ÇëÄúÔÚ´ËΪеÄλͼÊäÈëÒ»¸öÃû³Æ£º";
+ Text[ russian ] = "Ââåäèòå, ïîæàëóéñòà, èìÿ íîâîãî bitmap:";
+ Text[ polish ] = "Podaj nazwê mapy bitowej:";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß‚Ì–¼‘O‚ð‚±‚±‚É“ü—Í‚µ‚ĉº‚³‚¢F";
+ Text[ chinese_traditional ] = "½Ð±z¦b¦¹¬°·sªº¦ì¹Ï¿é¤J¤@­Ó¦WºÙ¡G";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇÓã ÇáÕæÑÉ ÇáäÞØíÉ åäÇ:";
+ Text[ greek ] = "Ðáñáêáëþ åéóÜãåôå Ýíá üíïìá ãéá ôï Âitmap:";
+ Text[ korean ] = "¿©±â¿¡ ºñÆ®¸ÊÀÇ À̸§À» ÀÔ·ÂÇϽʽÿÀ:";
+ Text[ turkish ] = "Bit eþlem için bir ad girin:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DESC_EXT_BITMAP
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für die externe Bitmap ein: : Geben Sie hier bitte den Namen f³r die externe Bitmap ein: */
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für die externe Bitmap ein: : Geben Sie hier bitte den Namen f³r die externe Bitmap ein: */
+ Text = "Geben Sie hier bitte den Namen für die externe Bitmap ein:" ;
+ Text [ ENGLISH ] = "Please insert a Name for the external Bitmap:" ;
+ Text [ norwegian ] = "Sett inn Navn på den eksterne Punktmatrisen:" ;
+ Text [ italian ] = "Digitate il nome per la bitmap esterna:" ;
+ Text [ portuguese_brazilian ] = "Por favor insira um Nome para o Bitmap externo:" ;
+ Text [ portuguese ] = "Por favor introduza um nome para o mapa de bits externo:" ;
+ Text [ finnish ] = "Kirjoita ulkoisen bittikartan nimi:" ;
+ Text [ danish ] = "Indtast venligst et navn til den eksterne bitmap:" ;
+ Text [ french ] = "Saisissez un nom pour le bitmap externe :" ;
+ Text [ swedish ] = "Ange namn för extern bitmap:" ;
+ Text [ dutch ] = "Typ hier een naam voor de externe bitmap:" ;
+ Text [ spanish ] = "Inserte aquí el nombre para la bitmap externa:" ;
+ Text [ english_us ] = "Please enter a name for the external bitmap:" ;
+ Text[ chinese_simplified ] = "ÇëÄúÔÚ´ËΪеÄÍâÀ´Î»Í¼ÊäÈëÒ»¸öÃû³Æ:";
+ Text[ russian ] = "Ââåäèòå, ïîæàëóéñòà, èìÿ íîâîãî bitmap :";
+ Text[ polish ] = "Podaj nazwê zewnêtrznej mapy bitowej:";
+ Text[ japanese ] = "ŠO•”ËÞ¯ÄϯÌß‚Ì–¼‘O‚ð‚±‚±‚É“ü—Í‚µ‚ĉº‚³‚¢F";
+ Text[ chinese_traditional ] = "½Ð±z¦b¦¹¬°·sªº¥~¨ÓÂI°}¹Ï¿é¤J¤@­Ó¦WºÙ¡G";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇÓã ÇáÕæÑÉ ÇáäÞØíÉ ÇáÎÇÑÌíÉ åäÇ:";
+ Text[ greek ] = "Ðáñáêáëþ åéóÜãåôå Ýíá üíïìá ãéá ôï åîùôåñéêü Âitmap:";
+ Text[ korean ] = "¿©±â¿¡ ¿ÜºÎ ºñÆ®¸ÊÀÇ À̸§À» ÀÔ·ÂÇϽʽÿÀ:";
+ Text[ turkish ] = "Dýþ bit eþlem için bir ad girin:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DEL_BITMAP
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Bitmap löschen : Bitmap l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Bitmap löschen : Bitmap l÷schen */
+ Text = "Bitmap löschen" ;
+ Text [ ENGLISH ] = "Delete Bitmap:" ;
+ Text [ norwegian ] = "Slett Punktmatrise:" ;
+ Text [ italian ] = "Cancella Bitmap" ;
+ Text [ portuguese_brazilian ] = "Apagar Bitmap:" ;
+ Text [ portuguese ] = "Eliminar Bitmap:" ;
+ Text [ finnish ] = "Poista bittikartta:" ;
+ Text [ danish ] = "Slet bitmap" ;
+ Text [ french ] = "Supprimer le bitmap" ;
+ Text [ swedish ] = "Radera bitmap" ;
+ Text [ dutch ] = "Bitmap wissen" ;
+ Text [ spanish ] = "Eliminar bitmap" ;
+ Text [ english_us ] = "Delete bitmap" ;
+ Text[ chinese_simplified ] = "ɾ³ýλͼ";
+ Text[ russian ] = "Óäàëèòü bitmap";
+ Text[ polish ] = "Usuñ mapê bitow¹";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£ÂI°}¹Ï";
+ Text[ arabic ] = "ÍÐÝ ÇáÕæÑÉ ÇáäÞØíÉ";
+ Text[ greek ] = "ÄéáãñáöÞ bitmap";
+ Text[ korean ] = "ºñÆ®¸Ê »èÁ¦";
+ Text[ turkish ] = "Bit eþlemi sil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_DEL_BITMAP
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Soll die Bitmap wirklich gelöscht werden? : Soll die Bitmap wirklich gel÷scht werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Soll die Bitmap wirklich gelöscht werden? : Soll die Bitmap wirklich gel÷scht werden? */
+ Text = "Soll die Bitmap wirklich gelöscht werden?" ;
+ Text [ ENGLISH ] = "Do you want to delete the Bitmap?" ;
+ Text [ norwegian ] = "Vil du slette Punktmatrisen?" ;
+ Text [ italian ] = "Eliminare la bitmap?" ;
+ Text [ portuguese_brazilian ] = "Deseja apagar o Bitmap?" ;
+ Text [ portuguese ] = "Deseja realmente eliminar o bitmap?" ;
+ Text [ finnish ] = "Poistetaanko bittikartta?" ;
+ Text [ danish ] = "Er du sikker på, at du vil slette denne bitmap?" ;
+ Text [ french ] = "Confirmez-vous la suppression du bitmap ?" ;
+ Text [ swedish ] = "Skall bitmappen verkligen raderas?" ;
+ Text [ dutch ] = "Wilt u de bitmap werkelijk verwijderen?" ;
+ Text [ spanish ] = "¿Desea realmente eliminar el bitmap?" ;
+ Text [ english_us ] = "Are you sure you want to delete the bitmap?" ;
+ Text[ chinese_simplified ] = "ÄúÕæµÄҪɾ³ýÕâ¸öλͼÂð£¿";
+ Text[ russian ] = "Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòîò bitmap?";
+ Text[ polish ] = "Czy chcesz na pewno usun¹æ mapê bitow¹?";
+ Text[ japanese ] = "‚±‚ÌËÞ¯ÄϯÌß‚ð–{“–‚É휂µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "±z¯u­n§R°£³o­ÓÂI°}¹Ï¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ÈÇáÝÚá ÍÐÝ ÇáÕæÑÉ ÇáäÞØíÉ¿";
+ Text[ greek ] = "ÈÝëåôå ðñáãìáôéêÜ íá äéáãñÜøåôå ôï Bitmap;";
+ Text[ korean ] = "ºñÆ®¸ÊÀ» Á¤¸»·Î »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Bit eþlem gerçekten silinsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_CHANGE_BITMAP
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die Bitmap wurde geändert und nicht gesichert. \nSie können die selektierte Bitmap ändern \noder eine neue Bitmap hinzufügen. : Die Bitmap wurde geõndert und nicht gesichert. \nSie k÷nnen die selektierte Bitmap õndern \noder eine neue Bitmap hinzuf³gen. */
+ /* ### ACHTUNG: Neuer Text in Resource? Die Bitmap wurde geändert und nicht gesichert. \nSie können die selektierte Bitmap ändern \noder eine neue Bitmap hinzufügen. : Die Bitmap wurde geõndert und nicht gesichert. \nSie k÷nnen die selektierte Bitmap õndern \noder eine neue Bitmap hinzuf³gen. */
+ Text = "Die Bitmap wurde geändert und nicht gesichert. \nSie können die selektierte Bitmap ändern \noder eine neue Bitmap hinzufügen." ;
+ Text [ ENGLISH ] = "The Bitmap was modified without Save? \nChange the selected Bitmap or add a new Bitmap." ;
+ Text [ norwegian ] = "Punktmatrisen ble endret uten å lagres? \nEndre den merkede Punktmatrisen eller legg til en ny Punktmatrise." ;
+ Text [ italian ] = "La bitmap è stata modificata ma non salvata \nPotete cambiare la bitmap selezionata \no naggiungerne una nuova." ;
+ Text [ portuguese_brazilian ] = "O Bitmap foi modificado sem Gravar? \nMude o Bitmap selecionado ou acrescente um novo Bitmap." ;
+ Text [ portuguese ] = "O bitmap foi alterado e não guardado? \nPoderá modificar o bitmap seleccionado \nou adicionar um novo." ;
+ Text [ finnish ] = "Muutettua bittikarttaa ei ole tallennettu? \nVoit muokata valittua bittikarttaa tai lisätä uuden." ;
+ Text [ danish ] = "Denne bitmap er blevet ændret, men ikke gemt. \nDu kan ændre den markerede bitmap\n eller tilføje en ny." ;
+ Text [ french ] = "Le bitmap a été modifié sans avoir été sauvegardé.\nVous pouvez modifier le bitmap sélectionné ou en ajouter un nouveau." ;
+ Text [ swedish ] = "Bitmappen ändrades utan att sparas. \nDu kan ändra den markerade bitmappen\neller lägga till en ny." ;
+ Text [ dutch ] = "In de bitmap werden wijzigingen aangebracht en niet opgeslagen. \nU kunt de geselecteerde bitmap wijzigen \nof een nieuwe bitmap toevoegen." ;
+ Text [ spanish ] = "El bitmap ha sido modificado sin guardar.\nPuede modificar el bitmap seleccionado\no añadir uno nuevo." ;
+ Text [ english_us ] = "The bitmap was modified without saving. \nModify the selected bitmap or add a new bitmap." ;
+ Text[ chinese_simplified ] = "Õâ¸öλͼÑùʽÒѾ­±»¸ü¸Ä£¬µ«ÊÇûÓб»±£´æ¡£ \nÄúÄܹ»¸ü¸ÄÑ¡ÖеÄλͼ\n»òÕßÐÂÔöÒ»¸öеÄλͼ¡£";
+ Text[ russian ] = "Bitmap áûë èçìåíåí, íî íå ñîõðàíåí. \nÂû ìîæåòå èçìåíèòü âûáðàííûé bitmap \nèëè äîáàâèòü íîâûé bitmap.";
+ Text[ polish ] = "Mapa bitowa zosta³a zmieniona i nie zapisana. \nMo¿esz zmieniæ zaznaczon¹ mapê bitow¹ \nlub dodaæ now¹ mapê bitow¹.";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß‚ª•ÏX‚³‚ê‚Ä•Û‘¶‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB\n‘I‘ð‚µ‚½ËÞ¯ÄϯÌß‚Ì•ÏX‚Ü‚½‚Í\nV‚µ‚¢ËÞ¯ÄϯÌ߂̒ljÁ‚ª‚Å‚«‚Ü‚·B";
+ Text[ chinese_traditional ] = "³o­ÓÂI°}¹Ïªº¼Ë¦¡¤w¸gÅܧó¡M¦ý¬O©|¥¼Àx¦s¡C \n±z¯à°÷Åܧó¿ï¨úªºÂI°}¹Ï\n©ÎªÌ¼W¥[¤@­Ó·sªºÂI°}¹Ï¡C";
+ Text[ arabic ] = "Êã ÊÛííÑ ÇáÕæÑÉ ÇáäÞØíÉ æáã íÊã ÍÝÙåÇ ÈÚÏ.\níãßäß ÊÛííÑ ÇáÕæÑÉ ÇáäÞØíÉ ÇáãÍÏÏÉ¡\nÃæ ÅÖÇÝÉ ÕæÑÉ äÞØíÉ ÌÏíÏÉ.";
+ Text[ greek ] = "Ôï bitmap ôñïðïðïéÞèçêå ÷ùñßò íá ãßíåé áðïèÞêåõóç. \nÌðïñåßôå íá áëëÜîåôå ôçí åðéëåãìÝíç bitmap \nÞ íá ðñïóèÝóåôå ìéá êáéíïýñéá bitmap.";
+ Text[ korean ] = "ºñÆ®¸ÊÀÌ º¯°æµÇ¾úÀ¸³ª ÀúÀåµÇÁö ¾Ê¾Ò½À´Ï´Ù. \n¼±ÅÃµÈ ºñÆ®¸ÊÀ» º¯°æÇϰųª \n»õ ºñÆ®¸ÊÀ» Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù.";
+ Text[ turkish ] = "Bit eþlem deðiþtirildi ancak kaydedilmedi.\nSeçili bit eþlemi deðiþtirebilir ya da\nyeni bir bit eþlem ekleyebilirsiniz.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_LINESTYLE
+{
+ Text = "Linienstil" ;
+ Text [ ENGLISH ] = "Linestyle" ;
+ Text [ norwegian ] = "Linestyle" ;
+ Text [ italian ] = "Stile linea" ;
+ Text [ portuguese_brazilian ] = "Estilo da Linha" ;
+ Text [ portuguese ] = "Estilo de linha" ;
+ Text [ finnish ] = "Viivan tyyli" ;
+ Text [ danish ] = "Stregtype" ;
+ Text [ french ] = "Style de ligne" ;
+ Text [ swedish ] = "Linjestil" ;
+ Text [ dutch ] = "Lijntype" ;
+ Text [ spanish ] = "Estilo de línea" ;
+ Text [ english_us ] = "Line Style" ;
+ Text[ chinese_simplified ] = "ÏßÌõʽÑù";
+ Text[ russian ] = "Ñòèëü ëèíèè";
+ Text[ polish ] = "Styl linii";
+ Text[ japanese ] = "ü½À²Ù";
+ Text[ chinese_traditional ] = "½u±ø¼Ë¦¡";
+ Text[ arabic ] = "äãØ ÇáÎØ";
+ Text[ greek ] = "Óôõë ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ À¯Çü";
+ Text[ turkish ] = "Çizgi biçimi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DESC_LINESTYLE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für den Linienstil ein: : Geben Sie hier bitte den Namen f³r den Linienstil ein: */
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für den Linienstil ein: : Geben Sie hier bitte den Namen f³r den Linienstil ein: */
+ Text = "Geben Sie hier bitte den Namen für den Linienstil ein:" ;
+ Text [ ENGLISH ] = "Please insert a Name for the Linestyle:" ;
+ Text [ norwegian ] = "Please insert a Name for the Linestyle:" ;
+ Text [ italian ] = "Digitare un nome per lo stile di linea:" ;
+ Text [ portuguese_brazilian ] = "Please insert a Name for the Linestyle:" ;
+ Text [ portuguese ] = "Por favor introduza um nome para o estilo de linha:" ;
+ Text [ french ] = "Saisissez un nom pour le style de ligne :" ;
+ Text [ dutch ] = "Typ hier een naam voor het nieuwe lijntype:" ;
+ Text [ spanish ] = "Inserte aquí el nombre para el estilo de línea:" ;
+ Text [ danish ] = "Indtast venligst et navn til den nye stregtype:" ;
+ Text [ swedish ] = "Mata in namnet för linjestilen här:" ;
+ Text [ finnish ] = "Please insert a Name for the Linestyle:" ;
+ Text [ english_us ] = "Please enter a name for the line style:" ;
+ Text[ chinese_simplified ] = "ÇëÄúÔÚ´ËΪеÄÏßÌõʽÑùÊäÈëÒ»¸öÃû³Æ£º";
+ Text[ russian ] = "Ââåäèòå, ïîæàëóéñòà, ñþäà íàçâàíèå íîâîãî ñòèëÿ ëèíèè:";
+ Text[ polish ] = "Wpisz tutaj nazwê dla nowego stylu linii:";
+ Text[ japanese ] = "ü½À²Ù‚Ì–¼‘O‚ð‚±‚±‚É“ü—Í‚µ‚ĉº‚³‚¢F";
+ Text[ chinese_traditional ] = "½Ð±z¦b¦¹¬°·sªº½u±ø¼Ë¦¡¿é¤J¤@­Ó¦WºÙ¡G";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇÓã äãØ ÇáÎØ åäÇ:";
+ Text[ greek ] = "Ðáñáêáëþ åéóÜãåôå Ýíá üíïìá ãéá ôï óôõë ãñáììÞò:";
+ Text[ korean ] = "¿©±â¿¡ »õ ¼± À¯ÇüÀÇ À̸§À» ÀÔ·ÂÇϽʽÿÀ:";
+ Text[ turkish ] = "Çizgi biçimi için bir ad girin:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DEL_LINESTYLE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Linienstil löschen : Linienstil l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Linienstil löschen : Linienstil l÷schen */
+ Text = "Linienstil löschen" ;
+ Text [ ENGLISH ] = "Delete Linestyle:" ;
+ Text [ norwegian ] = "Slett Linjestil:" ;
+ Text [ italian ] = "Cancella stile linea" ;
+ Text [ portuguese_brazilian ] = "Apagar Estilo de linha:" ;
+ Text [ portuguese ] = "Eliminar estilo de linha" ;
+ Text [ finnish ] = "Poista viivatyyli" ;
+ Text [ danish ] = "Slet stregtype" ;
+ Text [ french ] = "Supprimer le style de ligne" ;
+ Text [ swedish ] = "Radera linjestil" ;
+ Text [ dutch ] = "Lijntype wissen" ;
+ Text [ spanish ] = "Eliminar estilo de línea" ;
+ Text [ english_us ] = "Delete line style" ;
+ Text[ chinese_simplified ] = "ɾ³ýÏßÌõʽÑù";
+ Text[ russian ] = "Óäàëèòü ñòèëü ëèíèè";
+ Text[ polish ] = "Usuñ styl linii";
+ Text[ japanese ] = "ü½À²Ù‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£½u±ø¼Ë¦¡";
+ Text[ arabic ] = "ÍÐÝ äãØ ÇáÎØ";
+ Text[ greek ] = "ÄéáãñáöÞ óôõë ãñáììÞò";
+ Text[ korean ] = "¼± À¯Çü »èÁ¦";
+ Text[ turkish ] = "Çizgi biçimini sil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_DEL_LINESTYLE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Soll der Linienstil wirklich gelöscht werden? : Soll der Linienstil wirklich gel÷scht werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Soll der Linienstil wirklich gelöscht werden? : Soll der Linienstil wirklich gel÷scht werden? */
+ Text = "Soll der Linienstil wirklich gelöscht werden?" ;
+ Text [ ENGLISH ] = "Do you want to delete the Linestyle?" ;
+ Text [ norwegian ] = "Vil du slette Linjestilen?" ;
+ Text [ italian ] = "Eliminare lo stile della linea?" ;
+ Text [ portuguese_brazilian ] = "Deseja apagar o Estilo de linha?" ;
+ Text [ portuguese ] = "Deseja realmente eliminar o estilo de linha?" ;
+ Text [ finnish ] = "Poistetaanko viivatyyli?" ;
+ Text [ danish ] = "Er du sikker på, at du vil slette stregtypen?" ;
+ Text [ french ] = "Voulez-vous supprimer le style de ligne ?" ;
+ Text [ swedish ] = "Skall linjestilen verkligen raderas?" ;
+ Text [ dutch ] = "Wilt u het lijntype werkelijk wissen?" ;
+ Text [ spanish ] = "¿Desea realmente eliminar el estilo de línea?" ;
+ Text [ english_us ] = "Do you want to delete the line style?" ;
+ Text[ chinese_simplified ] = "ÄúÕæµÄҪɾ³ýÕâ¸öÏßÌõʽÑùÂð£¿";
+ Text[ russian ] = "Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòî ñòèëü ëèíèè?";
+ Text[ polish ] = "Czy styl linii ma na pewno zostaæ usuniêty?";
+ Text[ japanese ] = "‚±‚Ìü‚̽À²Ù‚ð–{“–‚É휂µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "±z¯u­n§R°£³o­Ó½u±ø¼Ë¦¡¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ÈÇáÝÚá ÍÐÝ äãØ ÇáÎØ¿";
+ Text[ greek ] = "ÈÝëåôå óßãïõñá íá äéáãñáöåß ôï óôõë ãñáììÞò;";
+ Text[ korean ] = "¼± À¯ÇüÀ» Á¤¸»·Î »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Çizgi biçimi gerçekten silinsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_CHANGE_LINESTYLE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Der Linienstil wurde geändert und nicht gesichert. \nSie können den selektierten Linienstil ändern \noder einen neuen Linienstil hinzufügen. : Der Linienstil wurde geõndert und nicht gesichert. \nSie k÷nnen den selektierten Linienstil õndern \noder einen neuen Linienstil hinzuf³gen. */
+ /* ### ACHTUNG: Neuer Text in Resource? Der Linienstil wurde geändert und nicht gesichert. \nSie können den selektierten Linienstil ändern \noder einen neuen Linienstil hinzufügen. : Der Linienstil wurde geõndert und nicht gesichert. \nSie k÷nnen den selektierten Linienstil õndern \noder einen neuen Linienstil hinzuf³gen. */
+ Text = "Der Linienstil wurde geändert und nicht gesichert. \nSie können den selektierten Linienstil ändern \noder einen neuen Linienstil hinzufügen." ;
+ Text [ ENGLISH ] = "The Linestyle was modified without Save? \nChange the selected Linestyle or add a new Linestyle." ;
+ Text [ norwegian ] = "Linjestilen ble endret uten å lagres\nEndre den merkede Linjestilen eller legg til en ny Linjestil." ;
+ Text [ italian ] = "Lo stile è stato modificato ma non salvato.\nPotetecambiare lo stile selezionato\\o aggiungerne uno nuovo." ;
+ Text [ portuguese_brazilian ] = "O Estilo de linha foi modificado sem Gravar? \nMude o Estilo de linha selecionado ou acrescente um novo Estilo de linha." ;
+ Text [ portuguese ] = "O fim de linha foi modificado e não guardado.\nPoderá modificar o fim de linha seleccionado\nou adicionar um novo." ;
+ Text [ finnish ] = "Muutettua viivatyyliä ei ole tallennettu. \nVoit muokata valittua viivatyyliä tai lisätä uuden." ;
+ Text [ danish ] = "Stregtypen er blevet ændret, men ikke gemt. \nDu kan ændre den markerede stregtype \neller tilføje en ny." ;
+ Text [ french ] = "Le style de ligne a été modifié sans avoir été sauvegardé. \nVous pouvez modifiez le style de ligne sélectionné ou en ajouter un nouveau." ;
+ Text [ swedish ] = "Linjestilen ändrades utan att sparas.\nDu kan ändra den markerade linjestilen eller\nlägga till en ny." ;
+ Text [ dutch ] = "In het lijntype werden wijzigingen aangebracht die niet werden opgeslagen \nU kunt het geselecteerde lijntype wijzigen \nof een nieuw lijntype toevoegen." ;
+ Text [ spanish ] = "El estilo de línea ha sido modificado sin guardar.\nPuede modificar el estilo de línea seleccionado\no añadir uno nuevo." ;
+ Text [ english_us ] = "The line style was modified without saving. \nModify the selected line style or add a new line style." ;
+ Text[ chinese_simplified ] = "Õâ¸öÏßÌõʽÑùÒѾ­±»¸ü¸Ä£¬µ«ÊÇûÓб»±£´æ¡£ \nÄúÄܹ»¸ü¸ÄÑ¡ÖеÄÏßÌõʽÑù\n»òÕßÐÂÔöÒ»¸öÏßÌõʽÑù¡£";
+ Text[ russian ] = "Ñòèëü ëèíèè áûë èçìåíåí, íî íå ñîõðàíåí. \nÂû ìîæåòå èçìåíèòü âûáðàííûé\nèëè äîáàâèòü íîâûé ñòèëü ëèíèè.";
+ Text[ polish ] = "Styl linii zosta³ zmieniony i nie zapisany. \nMo¿esz zmieniæ zaznaczony styl linii \nlub dodaæ nowy styl linii.";
+ Text[ japanese ] = "ü‚̽À²Ù‚ª•ÏX‚³‚ê‚Ä•Û‘¶‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB\n‘I‘ð‚µ‚½ü‚̽À²Ù‚Ì•ÏX‚Ü‚½‚Í\nV‚µ‚¢ü‚̽À²Ù‚̒ljÁ‚ª‚Å‚«‚Ü‚·B";
+ Text[ chinese_traditional ] = "³o­Ó½u±ø¼Ë¦¡¤w¸gÅܧó¡M¦ý¬O©|¥¼Àx¦s¡C \n±z¯à°÷Åܧó¿ï¨úªº½u±ø¼Ë¦¡\n©ÎªÌ¼W¥[¤@­Ó·sªº½u±ø¼Ë¦¡¡C";
+ Text[ arabic ] = "Êã ÊÛííÑ äãØ ÇáÎØ æáã íÊã ÍÝÙå ÈÚÏ.\níãßäß ÊÛííÑ äãØ ÇáÎØ ÇáãÍÏÏ¡\nÃæ ÅÖÇÝÉ äãØ ÎØ ÌÏíÏ.";
+ Text[ greek ] = "Ôï óôõë ãñáììÞò ôñïðïðïéÞèçêå ÷ùñßò íá ãßíåé áðïèÞêåõóç. \nÌðïñåßôå íá áëëÜîåôå ôï åðéëåãìÝíï óôõë \nÞ íá ðñïóèÝóåôå Ýíá êáéíïýñéï óôõë ãñáììÞò.";
+ Text[ korean ] = "¼± À¯ÇüÀÌ º¯°æµÇ¾úÀ¸³ª ÀúÀåµÇÁö ¾Ê¾Ò½À´Ï´Ù.\n¼±ÅÃµÈ ¼± À¯ÇüÀ» º¯°æÇϰųª \n»õ ¼± À¯ÇüÀ» Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù.";
+ Text[ turkish ] = "Çizgi biçimi deðiþtirildi ancak kaydedilmedi. \nSeçili çizgi biçimini deðiþtirebilir ya da \nyeni bir çizgi biçimi ekleyebilirsiniz.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_INVISIBLE
+{
+ Text = "Unsichtbar" ;
+ Text [ ENGLISH ] = "Invisible" ;
+ Text [ norwegian ] = "Usynlig" ;
+ Text [ italian ] = "Invisibile" ;
+ Text [ portuguese_brazilian ] = "Invisível" ;
+ Text [ portuguese ] = "Invisível" ;
+ Text [ finnish ] = "Näkymätön" ;
+ Text [ danish ] = "Usynlig" ;
+ Text [ french ] = "Invisible" ;
+ Text [ swedish ] = "Osynlig" ;
+ Text [ dutch ] = "Onzichtbaar" ;
+ Text [ spanish ] = "Invisible" ;
+ Text [ english_us ] = "Invisible" ;
+ Text[ chinese_simplified ] = "ÒþÈëµÄ";
+ Text[ russian ] = "Íåâèäèìàÿ";
+ Text[ polish ] = "Niewidoczny";
+ Text[ japanese ] = "”ñ•\\Ž¦";
+ Text[ chinese_traditional ] = "Áô¤Jªº";
+ Text[ arabic ] = "ÛíÑ ãÑÆí";
+ Text[ greek ] = "Ìç ïñáôÜ";
+ Text[ korean ] = "º¸ÀÌÁö ¾Ê°Ô";
+ Text[ turkish ] = "Gizle";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_COLOR
+{
+ Text = "Farbe" ;
+ Text [ ENGLISH ] = "Color" ;
+ Text [ norwegian ] = "Farge" ;
+ Text [ italian ] = "Colore" ;
+ Text [ portuguese_brazilian ] = "Cor" ;
+ Text [ portuguese ] = "Cor" ;
+ Text [ finnish ] = "Väri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "Couleur" ;
+ Text [ swedish ] = "Färg" ;
+ Text [ dutch ] = "Kleur" ;
+ Text [ spanish ] = "Color" ;
+ Text [ english_us ] = "Color" ;
+ Text[ chinese_simplified ] = "ÑÕÉ«";
+ Text[ russian ] = "Öâåò";
+ Text[ polish ] = "Kolor";
+ Text[ japanese ] = "F";
+ Text[ chinese_traditional ] = "ÃC¦â";
+ Text[ arabic ] = "Çááæä";
+ Text[ greek ] = "×ñþìá";
+ Text[ korean ] = "»ö";
+ Text[ turkish ] = "Renk";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HATCH
+{
+ Text = "Schraffur" ;
+ Text [ ENGLISH ] = "Hatch" ;
+ Text [ norwegian ] = "Hatch" ;
+ Text [ italian ] = "Tratteggio" ;
+ Text [ portuguese_brazilian ] = "Sombreado" ;
+ Text [ portuguese ] = "Tracejado" ;
+ Text [ finnish ] = "Viivoitus" ;
+ Text [ danish ] = "Skravering" ;
+ Text [ french ] = "Hachure" ;
+ Text [ swedish ] = "Skraffering" ;
+ Text [ dutch ] = "Arcering" ;
+ Text [ spanish ] = "Trama" ;
+ Text [ english_us ] = "Hatching" ;
+ Text[ chinese_simplified ] = "ÒõÓ°Ïß";
+ Text[ russian ] = "Øòðèõîâêà";
+ Text[ polish ] = "Kreskowanie";
+ Text[ japanese ] = "ʯÁݸÞ";
+ Text[ chinese_traditional ] = "³±¼v½u";
+ Text[ arabic ] = "äÞÔ";
+ Text[ greek ] = "ÃñáììïóêéÜ";
+ Text[ korean ] = "ÇØĪ";
+ Text[ turkish ] = "Desen";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DESC_HATCH
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für die Schraffur ein: : Geben Sie hier bitte den Namen f³r die Schraffur ein: */
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für die Schraffur ein: : Geben Sie hier bitte den Namen f³r die Schraffur ein: */
+ Text = "Geben Sie hier bitte den Namen für die Schraffur ein:" ;
+ Text [ ENGLISH ] = "Please insert a Name for the hatch:" ;
+ Text [ norwegian ] = "Please insert a Name for the hatch:" ;
+ Text [ italian ] = "Digitare un nome per il tratteggio:" ;
+ Text [ portuguese_brazilian ] = "Please insert a Name for the hatch:" ;
+ Text [ portuguese ] = "Indique o nome para o tracejado:" ;
+ Text [ french ] = "Saisissez un nom pour la hachure :" ;
+ Text [ dutch ] = "Typ hier een naam voor de arcering:" ;
+ Text [ spanish ] = "Inserte aquí el nombre para la trama:" ;
+ Text [ danish ] = "Indtast venligst et navn til skraveringen:" ;
+ Text [ swedish ] = "Mata in namnet för skrafferingen här:" ;
+ Text [ finnish ] = "Please insert a Name for the hatch:" ;
+ Text [ english_us ] = "Please enter a name for the hatching:" ;
+ Text[ chinese_simplified ] = "ÇëÄúÔÚ´ËΪеÄÒõÓ°ÊäÈëÒ»¸öÃû³Æ:";
+ Text[ russian ] = "Ââåäèòå, ïîæàëóéñòà, ñþäà íàçâàíèå íîâîé øòðèõîâêè:";
+ Text[ polish ] = "Wpisz nazwê dla kreskowania:";
+ Text[ japanese ] = "ʯÁݸނ̖¼‘O‚ð‚±‚±‚É“ü—Í‚µ‚ĉº‚³‚¢F";
+ Text[ chinese_traditional ] = "½Ð±z¦b¦¹¬°·sªº³±¼v½u¿é¤J¤@­Ó¦WºÙ¡G";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇÓã ááäÞÔ åäÇ:";
+ Text[ greek ] = "Ðáñáêáëþ åéóÜãåôå Ýíá üíïìá ãéá ôç ãñáììïóêéÜ:";
+ Text[ korean ] = "¿©±â¿¡ ÇØĪÀÇ À̸§À» ÀÔ·ÂÇϽʽÿÀ:";
+ Text[ turkish ] = "Desen için bir ad girin:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DEL_HATCH
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Schraffur löschen : Schraffur l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Schraffur löschen : Schraffur l÷schen */
+ Text = "Schraffur löschen" ;
+ Text [ ENGLISH ] = "Delete hatch" ;
+ Text [ norwegian ] = "Slett skravering" ;
+ Text [ italian ] = "Elimina tratteggio" ;
+ Text [ portuguese_brazilian ] = "Apagar traço de sombreado" ;
+ Text [ portuguese ] = "Eliminar tracejado" ;
+ Text [ finnish ] = "Poista viivoitus" ;
+ Text [ danish ] = "Slet skravering" ;
+ Text [ french ] = "Supprimer les hachures" ;
+ Text [ swedish ] = "Radera skraffering" ;
+ Text [ dutch ] = "Arcering verwijderen" ;
+ Text [ spanish ] = "Eliminar trama" ;
+ Text [ english_us ] = "Delete hatching" ;
+ Text[ chinese_simplified ] = "ɾ³ýÒõÓ°";
+ Text[ russian ] = "Óäàëèòü øòðèõîâêó";
+ Text[ polish ] = "Usuñ kreskowanie";
+ Text[ japanese ] = "ʯÁݸނÌíœ";
+ Text[ chinese_traditional ] = "§R°£³±¼v½u";
+ Text[ arabic ] = "ÍÐÝ ÇáäÞÔ";
+ Text[ greek ] = "ÄéáãñáöÞ ãñáììïóêéÜò";
+ Text[ korean ] = "ÇØĪ »èÁ¦";
+ Text[ turkish ] = "Deseni sil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_DEL_HATCH
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Soll die Schraffur wirklich gelöscht werden? : Soll die Schraffur wirklich gel÷scht werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Soll die Schraffur wirklich gelöscht werden? : Soll die Schraffur wirklich gel÷scht werden? */
+ Text = "Soll die Schraffur wirklich gelöscht werden?" ;
+ Text [ ENGLISH ] = "Do you want to delete the hatch?" ;
+ Text [ norwegian ] = "Vil du slette skraveringen?" ;
+ Text [ italian ] = "Eliminare il tratteggio?" ;
+ Text [ portuguese_brazilian ] = "Deseja apagar o traço de sombreado?" ;
+ Text [ portuguese ] = "Eliminar o tracejado?" ;
+ Text [ finnish ] = "Poistetaanko viivoitus?" ;
+ Text [ danish ] = "Er du sikker på, at du vil slette skraveringen?" ;
+ Text [ french ] = "Voulez-vous supprimer les hachures ?" ;
+ Text [ swedish ] = "Vill Du verkligen radera skraffering?" ;
+ Text [ dutch ] = "Wilt u de arcering werkelijk verwijderen?" ;
+ Text [ spanish ] = "¿Desea realmente eliminar el entramado?" ;
+ Text [ english_us ] = "Do you want to delete the hatching?" ;
+ Text[ chinese_simplified ] = "ÄúÕæµÄҪɾ³ýÕâ¸öÒõÓ°Âð£¿";
+ Text[ russian ] = "Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòó øòðèõîâêó?";
+ Text[ polish ] = "Czy na pewno usun¹æ kreskowanie?";
+ Text[ japanese ] = "‚±‚ÌʯÁݸނð–{“–‚É휂µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "±z¯u­n§R°£³o­Ó³±¼v½u¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ÈÇáÝÚá ÍÐÝ ÇáäÞÔ¿";
+ Text[ greek ] = "ÈÝëåôå íá äéáãñáöåß ç ãñáììïóêéÜ;";
+ Text[ korean ] = "ÇØĪÀ» Á¤¸»·Î »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Desen gerçekten silinsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_CHANGE_HATCH
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die Schraffur wurde geändert und nicht gesichert. \nSie können die selektierte Schraffur ändern \noder eine neue Schraffur hinzufügen. : Die Schraffur wurde geõndert und nicht gesichert. \nSie k÷nnen die selektierte Schraffur õndern \noder eine neue Schraffur hinzuf³gen. */
+ /* ### ACHTUNG: Neuer Text in Resource? Die Schraffur wurde geändert und nicht gesichert. \nSie können die selektierte Schraffur ändern \noder eine neue Schraffur hinzufügen. : Die Schraffur wurde geõndert und nicht gesichert. \nSie k÷nnen die selektierte Schraffur õndern \noder eine neue Schraffur hinzuf³gen. */
+ Text = "Die Schraffur wurde geändert und nicht gesichert. \nSie können die selektierte Schraffur ändern \noder eine neue Schraffur hinzufügen." ;
+ Text [ ENGLISH ] = "The hatch was modified without Save? \nChange the selceted hatch or add a new hatch." ;
+ Text [ norwegian ] = "Skraveringen ble slettet uten å lagres\nEndre den merkede skraveringen eller legg til en ny skravering." ;
+ Text [ italian ] = "Il tratteggio è stato modificato ma non salvato \nPotete cambiare il tratteggio selezionato \noppure aggiungerne uno nuovo." ;
+ Text [ portuguese_brazilian ] = "The traço de sombreado foi modificado sem Gravar? \nMude o traço de sombreado selecionado ou acrescente um novo traço de sombreado." ;
+ Text [ portuguese ] = "Tracejado foi alterado e não guardado.\nPoderá alterar o tracejado seleccionado\nou adicionar um novo." ;
+ Text [ finnish ] = "Muutettua viivoitusta ei ole tallennettu. \nVoit muokata valittua viivoitusta tai lisätä uuden." ;
+ Text [ danish ] = "Skraveringen er blevet ændret, men ikke gemt. \nDu kan ændre den markerede skravering\n eller tilføje en ny." ;
+ Text [ french ] = "Les hachures ont été modifiées sans avoir été sauvegardées. \nVous pouvez modifier les hachures sélectionnées ou en ajouter de nouvelles." ;
+ Text [ swedish ] = "Skrafferingen ändrades utan att sparas.\nDu kan ändra den markerade skrafferingen eller\nlägga till en ny." ;
+ Text [ dutch ] = "In de arcering werden wijzigingen aangebracht en niet opgeslagen. \nU kunt de geselecteerde arcering wijzigen \nof een nieuwe arcering toevoegen." ;
+ Text [ spanish ] = "La trama ha sido modificada sin guardar.\nPuede modificar la trama seleccionada\no añadir una nueva." ;
+ Text [ english_us ] = "The hatching type was modified but not saved. \nModify the selected hatching type or add a new hatching type." ;
+ Text[ chinese_simplified ] = "Õâ¸öÒõÓ°ÒѾ­±»¸ü¸Ä£¬µ«ÊÇûÓб»±£´æ¡£ \nÄúÄܹ»¸ü¸ÄÑ¡ÖеÄÒõÓ°\n»òÕßÐÂÔöÒ»¸öеÄÒõÓ°¡£";
+ Text[ russian ] = "Øòðèõîâêà áûëà èçìåíåíà, íî íå ñîõðàíåíà. \nÂû ìîæåòå èçìåíèòü âûáðàííóþ øòðèõîâêó \nèëè äîáàâèòü íîâóþ øòðèõîâêó.";
+ Text[ polish ] = "Kreskowanie zosta³o zmienione i nie zapisane. \nMo¿esz zmieniæ zaznaczone kreskowanie \ni lub dodaæ nowe kreskowanie.";
+ Text[ japanese ] = "ʯÁݸނª•ÏX‚³‚ê‚Ä•Û‘¶‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB\n‘I‘ð‚µ‚½Ê¯Áݸނ̕ÏX‚Ü‚½‚Í\nV‚µ‚¢Ê¯Áݸނ̒ljÁ‚ª‚Å‚«‚Ü‚·B";
+ Text[ chinese_traditional ] = "³o­Ó³±¼v¤w¸gÅܧó¡M¦ý¬O©|¥¼Àx¦s¡C \n±z¯à°÷Åܧó¿ï¨úªº³±¼v\n©ÎªÌ¼W¥[¤@­Ó·sªº³±¼v¡C";
+ Text[ arabic ] = "Êã ÊÛííÑ ÇáäÞÔ æáã íÊã ÍÝÙå ÈÚÏ.\níãßäß ÊÛííÑ ÇáäÞÔ ÇáãÍÏÏ¡\nÃæ ÅÖÇÝÉ äÞÔ ÌÏíÏ.";
+ Text[ greek ] = "Ç ãñáììïóêéÜ ôñïðïðïéÞèçêå ÷ùñßò íá ãßíåé áðïèÞêåõóç. \nÌðïñåßôå íá áëëÜîåôå ôçí åðéëåãìÝíç ãñáììïóêéÜ \nÞ íá ðñïóèÝóåôå ìéá êáéíïýñéá ãñáììïóêéÜ.";
+ Text[ korean ] = "ÇØĪÀÌ º¯°æµÇ¾úÀ¸³ª ÀúÀåµÇÁö ¾Ê¾Ò½À´Ï´Ù. \n¼±ÅÃµÈ ÇØĪÀ» º¯°æÇϰųª \n»õ ÇØĪÀ» Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù.";
+ Text[ turkish ] = "Desen deðiþtirildi ancak kaydedilmedi.\nSeçili deseni deðiþtirebilir ya da\nyeni bir desen ekleyebilirsiniz.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_CHANGE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Ändern : Žndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Ändern : Žndern */
+ Text = "Ändern" ;
+ Text [ ENGLISH ] = "Modify" ;
+ Text [ norwegian ] = "Modify" ;
+ Text [ italian ] = "Modifica" ;
+ Text [ portuguese_brazilian ] = "Modificar" ;
+ 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" ;
+ Text[ chinese_simplified ] = "ÐÞ¸Ä";
+ Text[ russian ] = "Èçìåíèòü";
+ Text[ polish ] = "Modyfikuj";
+ Text[ japanese ] = "•ÏX";
+ Text[ chinese_traditional ] = "­×§ï";
+ Text[ arabic ] = "ÊÚÏíá";
+ Text[ greek ] = "Ôñïðïðïßçóç";
+ Text[ korean ] = "º¯°æ";
+ Text[ turkish ] = "Deðiþtir";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ADD
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Hinzufügen : Hinzuf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Hinzufügen : Hinzuf³gen */
+ Text = "Hinzufügen" ;
+ Text [ ENGLISH ] = "Add" ;
+ Text [ norwegian ] = "Add" ;
+ Text [ italian ] = "Aggiungi" ;
+ Text [ portuguese_brazilian ] = "Acrescentar" ;
+ Text [ portuguese ] = "Adicionar" ;
+ Text [ finnish ] = "Lisää" ;
+ Text [ danish ] = "Tilføj" ;
+ Text [ french ] = "Ajouter" ;
+ Text [ swedish ] = "Lägg till" ;
+ Text [ dutch ] = "Toevoegen" ;
+ Text [ spanish ] = "Añadir" ;
+ Text [ english_us ] = "Add" ;
+ Text[ chinese_simplified ] = "ÐÂÔö";
+ Text[ russian ] = "Äîáàâèòü";
+ Text[ polish ] = "Dodaj";
+ Text[ japanese ] = "’ljÁ";
+ Text[ chinese_traditional ] = "¼W¥[";
+ Text[ arabic ] = "ÅÖÇÝÉ";
+ Text[ greek ] = "ÐñïóèÞêç";
+ Text[ korean ] = "Ãß°¡";
+ Text[ turkish ] = "Ekle";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DESC_COLOR
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für die neue Farbe ein: : Geben Sie hier bitte den Namen f³r die neue Farbe ein: */
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für die neue Farbe ein: : Geben Sie hier bitte den Namen f³r die neue Farbe ein: */
+ Text = "Geben Sie hier bitte den Namen für die neue Farbe ein:" ;
+ Text [ ENGLISH ] = "Please insert a Name for the new Color:" ;
+ Text [ norwegian ] = "Sett inn nytt Navn på den nye Fargen:" ;
+ Text [ italian ] = "Digitate il nome per il nuovo colore:" ;
+ Text [ portuguese_brazilian ] = "Por favor insira um Nome para a nova Cor:" ;
+ Text [ portuguese ] = "Por favor introduza um nome para a nova cor:" ;
+ Text [ finnish ] = "Kirjoita uuden värin nimi:" ;
+ Text [ danish ] = "Indtast venligst et navn til den nye farve:" ;
+ Text [ french ] = "Saisissez un nom pour la nouvelle couleur :" ;
+ Text [ swedish ] = "Ange namn för den nya färgen:" ;
+ Text [ dutch ] = "Typ hier een naam voor de nieuwe kleur:" ;
+ Text [ spanish ] = "Inserte aquí el nombre para el nuevo color:" ;
+ Text [ english_us ] = "Please enter a name for the new color:" ;
+ Text[ chinese_simplified ] = "ÇëÄúÔÚ´ËΪеÄÑÕÉ«ÊäÈëÒ»¸öÃû³Æ£º";
+ Text[ russian ] = "Ââåäèòå, ïîæàëóéñòà, ñþäà íàçâàíèå íîâîãî öâåòà:";
+ Text[ polish ] = "Wpisz nazwê nowego koloru:";
+ Text[ japanese ] = "V‚µ‚¢F‚Ì–¼‘O‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢:";
+ Text[ chinese_traditional ] = "½Ð±z¦b¦¹¬°·sªºÃC¦â¿é¤J¤@­Ó¦WºÙ¡G";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇÓã Çááæä ÇáÌÏíÏ åäÇ:";
+ Text[ greek ] = "Ðáñáêáëþ åéóÜãåôå ôï üíïìá ôïõ íÝïõ ÷ñþìáôïò:";
+ Text[ korean ] = "¿©±â¿¡ »õ·Î¿î »öÀÇ À̸§À» ÀÔ·ÂÇϽʽÿÀ:";
+ Text[ turkish ] = "Yeni rengin adýný girin:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DEL_COLOR
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Farbe löschen : Farbe l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Farbe löschen : Farbe l÷schen */
+ Text = "Farbe löschen" ;
+ Text [ ENGLISH ] = "Delete Color" ;
+ Text [ norwegian ] = "Slett Farge" ;
+ Text [ italian ] = "Cancella colore" ;
+ Text [ portuguese_brazilian ] = "Apagar Cor" ;
+ Text [ portuguese ] = "Eliminar cor" ;
+ Text [ finnish ] = "Poista väri" ;
+ Text [ danish ] = "Slet farve" ;
+ Text [ french ] = "Supprimer la couleur" ;
+ Text [ swedish ] = "Radera färg" ;
+ Text [ dutch ] = "Kleur verwijderen" ;
+ Text [ spanish ] = "Eliminar color" ;
+ Text [ english_us ] = "Delete color" ;
+ Text[ chinese_simplified ] = "ɾ³ýÑÕÉ«";
+ Text[ russian ] = "Óäàëèòü öâåò";
+ Text[ polish ] = "Usuñ kolor";
+ Text[ japanese ] = "F‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£ÃC¦â";
+ Text[ arabic ] = "ÍÐÝ Çááæä";
+ Text[ greek ] = "ÄéáãñáöÞ ÷ñþìáôïò";
+ Text[ korean ] = "»ö »èÁ¦";
+ Text[ turkish ] = "Rengi sil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_DEL_COLOR
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Soll die Farbe wirklich gelöscht werden? : Soll die Farbe wirklich gel÷scht werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Soll die Farbe wirklich gelöscht werden? : Soll die Farbe wirklich gel÷scht werden? */
+ Text = "Soll die Farbe wirklich gelöscht werden?" ;
+ Text [ ENGLISH ] = "Do you want to delete the Color?" ;
+ Text [ norwegian ] = "Vil du slette Fargen?" ;
+ Text [ italian ] = "Eliminare veramente il colore?" ;
+ Text [ portuguese_brazilian ] = "Deseja apagar a Cor?" ;
+ Text [ portuguese ] = "Deseja realmente eliminar a cor?" ;
+ Text [ finnish ] = "Poistetaanko väri?" ;
+ Text [ danish ] = "Er du sikker på, at du vil slette farven?" ;
+ Text [ french ] = "Voulez-vous supprimer la couleur ?" ;
+ Text [ swedish ] = "Vill Du verkligen radera färgen?" ;
+ Text [ dutch ] = "Wilt u de kleur werkelijk wissen?" ;
+ Text [ spanish ] = "¿Desea realmente eliminar el color?" ;
+ Text [ english_us ] = "Do you want to delete the color?" ;
+ Text[ chinese_simplified ] = "ÄúÕæµÄҪɾ³ýÕâ¸öÑÕÉ«Âð£¿";
+ Text[ russian ] = "Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòîò öâåò?";
+ Text[ polish ] = "Czy chcesz na pewno usun¹æ kolor?";
+ Text[ japanese ] = "‚±‚ÌF‚ð–{“–‚É휂µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "±z¯u­n§R°£³o­ÓÃC¦â¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ÈÇáÝÚá ÍÐÝ Çááæä¿";
+ Text[ greek ] = "ÈÝëåôå óßãïõñá íá äéáãñáöåß ôï ÷ñþìá;";
+ Text[ korean ] = "»öÀ» Á¤¸»·Î »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Renk gerçekten silinsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_CHANGE_COLOR
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die Farbe wurde geändert und nicht gesichert. \nSie können die selektierte Farbe ändern \noder eine neue Farbe hinzufügen. : Die Farbe wurde geõndert und nicht gesichert. \nSie k÷nnen die selektierte Farbe õndern \noder eine neue Farbe hinzuf³gen. */
+ /* ### ACHTUNG: Neuer Text in Resource? Die Farbe wurde geändert und nicht gesichert. \nSie können die selektierte Farbe ändern \noder eine neue Farbe hinzufügen. : Die Farbe wurde geõndert und nicht gesichert. \nSie k÷nnen die selektierte Farbe õndern \noder eine neue Farbe hinzuf³gen. */
+ Text = "Die Farbe wurde geändert und nicht gesichert. \nSie können die selektierte Farbe ändern \noder eine neue Farbe hinzufügen." ;
+ Text [ ENGLISH ] = "The Color was modified without Save? \nChange the selceted Color or add a new Color." ;
+ Text [ norwegian ] = "Fargen ble endret uten å lagres? \nEndre den merkede fargen eller legg til en ny Farge." ;
+ Text [ italian ] = "Il colore è stato modificato ma non salvato.\nPotete cambiare il colore selezionato \no aggiungerne\n uno nuovo." ;
+ Text [ portuguese_brazilian ] = "A Cor foi modificada sem Gravar? \nMude a Cor selecionada ou acrescente uma nova Cor." ;
+ Text [ portuguese ] = "A cor foi modificada e não guardada? \nPoderá modificar a cor seleccionada\nou adicionar uma nova." ;
+ Text [ finnish ] = "Muutettua väriä ei ole tallennettu. \nVoit muokata valittua väriä tai lisätä uuden." ;
+ Text [ danish ] = "Farven er blevet ændret, men ikke gemt. \nDu kan ændre den markerede farve\n eller tilføje en ny." ;
+ Text [ french ] = "La couleur a été modifiée sans avoir été sauvegardée.\nVous pouvez modifier la couleur sélectionnée ou en ajouter une nouvelle." ;
+ Text [ swedish ] = "Färgen ändrades utan att sparas.\nDu kan ändra den markerade färgen\neller lägga till en ny." ;
+ Text [ dutch ] = "In de kleur werden wijzigingen aangebracht en niet opgeslagen. \nU kunt de geselecteerde kleur wijzigen \nof een nieuwe kleur toevoegen." ;
+ Text [ spanish ] = "El color ha sido modificado sin guardar.\nPuede modificar el color seleccionado\no añadir uno nuevo." ;
+ Text [ english_us ] = "The color was modified without saving.\nModify the selected color or add a new color." ;
+ Text[ chinese_simplified ] = "Õâ¸öÑÕÉ«ÒѾ­±»¸ü¸Ä£¬µ«ÊÇûÓб»±£´æ¡£ \nÄúÄܹ»¸ü¸ÄÑ¡ÖеÄÑÕÉ«\n»òÕßÐÂÔöÒ»¸öеÄÑÕÉ«¡£";
+ Text[ russian ] = "Öâåò áûë èçìåíåí, íî íå ñîõðàíåí. \nÂû ìîæåòå èçìåíèòü âûáðàííûé öâåò \nèëè äîáàâèòü íîâûé öâåò.";
+ Text[ polish ] = "Kolor zosta³ zmieniony i nie zapisany. \nMo¿esz zmieniæ zaznaczony kolor \nlub dodaæ nowy kolor.";
+ Text[ japanese ] = "F‚ª•ÏX‚³‚ê‚Ä•Û‘¶‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB\n‘I‘ð‚µ‚½F‚Ì•ÏX‚Ü‚½‚Í\nV‚µ‚¢F‚̒ljÁ‚ª‚Å‚«‚Ü‚·B";
+ Text[ chinese_traditional ] = "³o­ÓÃC¦â¤w¸gÅܧó¡M¦ý¬O©|¥¼Àx¦s¡C \n±z¯à°÷Åܧó¿ï¨úªºÃC¦â\n©ÎªÌ¼W¥[¤@­Ó·sªºÃC¦â¡C";
+ Text[ arabic ] = "Êã ÊÛííÑ Çááæä æáã íÊã ÍÝÙå ÈÚÏ.\níãßäß ÊÛííÑ Çááæä ÇáãÍÏÏ¡\nÃæ ÅÖÇÝÉ áæä ÌÏíÏ.";
+ Text[ greek ] = "Ôï ÷ñþìá ôñïðïðïéÞèçêå ÷ùñßò íá ãßíåé áðïèÞêåõóç. \nÌðïñåßôå íá áëëÜîåôå ôï åðéëåãìÝíï ÷ñþìá \nÞ íá ðñïóèÝóåôå Ýíá êáéíïýñéï ÷ñþìá.";
+ Text[ korean ] = "»öÀÌ º¯°æµÇ¾úÀ¸³ª ÀúÀåµÇÁö ¾Ê¾Ò½À´Ï´Ù.\n¼±ÅÃµÈ »öÀ» º¯°æÇϰųª \n»õ·Î¿î »öÀ» Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù.";
+ Text[ turkish ] = "Renk deðiþtirildi ancak kaydedilmedi.\nSeçili rengi deðiþtirebilir ya da\nyeni bir renk ekleyebilirsiniz.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_TABLE
+{
+ Text = "Tabelle" ;
+ Text [ ENGLISH ] = "List" ;
+ Text [ norwegian ] = "Table" ;
+ Text [ italian ] = "Tabella" ;
+ Text [ portuguese_brazilian ] = "Tabela" ;
+ Text [ portuguese ] = "Tabela" ;
+ Text [ finnish ] = "Taulukko" ;
+ Text [ danish ] = "Tabel" ;
+ Text [ french ] = "Table" ;
+ Text [ swedish ] = "Tabell" ;
+ Text [ dutch ] = "Tabel" ;
+ Text [ spanish ] = "Tabla" ;
+ Text [ english_us ] = "Table" ;
+ Text[ chinese_simplified ] = "±í¸ñ";
+ Text[ russian ] = "Òàáëèöà";
+ Text[ polish ] = "Tabela";
+ Text[ japanese ] = "•\\";
+ Text[ chinese_traditional ] = "ªí®æ";
+ Text[ arabic ] = "ÌÏæá";
+ Text[ greek ] = "Ðßíáêáò";
+ Text[ korean ] = "Å×À̺í";
+ Text[ turkish ] = "Tablo";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_WRITE_DATA_ERROR
+{
+ Text = "Die Datei konnte nicht gesichert werden!" ;
+ Text [ ENGLISH ] = "The file couldn't be saved!" ;
+ Text [ norwegian ] = "The file couldn't be saved!" ;
+ Text [ italian ] = "Non è stato possibile salvare il file!" ;
+ Text [ portuguese_brazilian ] = "The file couldn't be saved!" ;
+ Text [ portuguese ] = "Foi impossível guardar o ficheiro!" ;
+ Text [ french ] = "Impossible de sauvegarder ce fichier." ;
+ Text [ dutch ] = "Het bestand kon niet worden opgeslagen!" ;
+ Text [ spanish ] = "¡No se pudo guardar el archivo!" ;
+ Text [ danish ] = "Det var ikke muligt at gemme filen!" ;
+ Text [ swedish ] = "Filen kunde inte sparas!" ;
+ Text [ finnish ] = "The file couldn't be saved!" ;
+ Text [ english_us ] = "The file could not be saved!" ;
+ Text[ chinese_simplified ] = "ÎÞ·¨±£´æÕâ¸öÎļþ£¡";
+ Text[ russian ] = "Ñîõðàíèòü ôàéë íå óäàåòñÿ!";
+ Text[ polish ] = "Plik nie móg³ zostaæ zapisany!";
+ Text[ japanese ] = "̧²Ù‚ª•Û‘¶‚Å‚«‚Ü‚¹‚ñ!";
+ Text[ chinese_traditional ] = "µLªkÀx¦s³o­ÓÀɮסI";
+ Text[ arabic ] = "ÊÚÐÑ ÍÝÙ ÇáãáÝ!";
+ Text[ greek ] = "Äåí Þôáí äõíáôÞ ç áðïèÞêåõóç ôïõ áñ÷åßïõ!";
+ Text[ korean ] = "ÆÄÀÏÀ» ÀúÀåÇÏÁö ¸øÇß½À´Ï´Ù!";
+ Text[ turkish ] = "Dosya kaydedilemedi!";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_READ_DATA_ERROR
+{
+ Text = "Die Datei konnte nicht geladen werden!" ;
+ Text [ ENGLISH ] = "The file couldn't be loaded!" ;
+ Text [ norwegian ] = "Filen kan ikke lastes inn!" ;
+ Text [ italian ] = "Impossibile caricare il file!" ;
+ Text [ portuguese_brazilian ] = "O arquivo não pode ser carregado!" ;
+ Text [ portuguese ] = "Foi impossível carregar o ficheiro!" ;
+ Text [ finnish ] = "Tiedostoa ei voi lukea!" ;
+ Text [ danish ] = "Det var ikke muligt at indlæse filen!" ;
+ Text [ french ] = "Impossible de charger le fichier !" ;
+ Text [ swedish ] = "Filen kunde inte laddas!" ;
+ Text [ dutch ] = "Het bestand kon niet worden geladen!" ;
+ Text [ spanish ] = "¡No se pudo cargar el archivo!" ;
+ Text [ english_us ] = "The file could not be loaded!" ;
+ Text[ chinese_simplified ] = "ÎÞ·¨×°ÔØÕâ¸öÎļþ£¡";
+ Text[ russian ] = "Çàãðóçèòü ýòîò ôàéë íå óäàåòñÿ!";
+ Text[ polish ] = "Plik nie móg³ zostaæ za³adowany!";
+ Text[ japanese ] = "̧²Ù‚ª“Ç‚Ýž‚Ý‚Å‚«‚Ü‚¹‚ñ!";
+ Text[ chinese_traditional ] = "µLªk¸Ë¸ü³o­ÓÀɮסI";
+ Text[ arabic ] = "ÊÚÐÑ ÊÍãíá ÇáãáÝ!";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá öïñôùèåß ôï áñ÷åßï!";
+ Text[ korean ] = "ÆÄÀÏÀ» ·ÎµåÇÏÁö ¸øÇß½À´Ï´Ù!";
+ Text[ turkish ] = "Dosya yüklenemedi!";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_WARN_TABLE_OVERWRITE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die Tabelle wurde geändert und nicht gespeichert. \nSoll die Tabelle gespeichert werden? : Die Tabelle wurde geõndert und nicht gespeichert. \nSoll die Tabelle gespeichert werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die Tabelle wurde geändert und nicht gespeichert. \nSoll die Tabelle gespeichert werden? : Die Tabelle wurde geõndert und nicht gespeichert. \nSoll die Tabelle gespeichert werden? */
+ Text = "Die Tabelle wurde geändert und nicht gespeichert. \nSoll die Tabelle gespeichert werden?" ;
+ Text [ ENGLISH ] = "The table was modified without save. Would you like to save the table?" ;
+ Text [ norwegian ] = "Tabellen ble endret uten å lagres. Vil du lagre tabellen?" ;
+ Text [ italian ] = "La tabella è stata modificata senza salvare. \nSalvare la tabella?" ;
+ Text [ portuguese_brazilian ] = "A tabela foi modificada sem gravar. Gostaria de gravar a tabela?" ;
+ Text [ portuguese ] = "A tabela foi modificada e não guardada.\nGuardar agora?" ;
+ Text [ finnish ] = "Muutettua taulukkoa ei ole tallennettu. Haluatko tallentaa sen?" ;
+ Text [ danish ] = "Tabellen er blevet ændret, men ikke gemt.\nVil du gemme tabellen nu?" ;
+ Text [ french ] = "La table a été modifiée sans avoir été enregistrée. Voulez-vous enregistrer la table ?" ;
+ Text [ swedish ] = "Tabellen ändrades utan att sparas. \nVill Du spara tabellen?" ;
+ Text [ dutch ] = "In de tabel werden wijzigingen aangebracht en niet opgeslagen. \nWilt u de tabel opslaan?" ;
+ Text [ spanish ] = "La tabla ha sido modificada sin guardar.\n¿Desea guardarla?" ;
+ Text [ english_us ] = "The list was modified without saving. Would you like to save the list now?" ;
+ Text[ chinese_simplified ] = "Õâ¸ö±í¸ñÒѾ­±»¸ü¸Ä£¬µ«ÊÇûÓб»±£´æ¡£ \nÄúÒª±£´æÕâ¸ö±í¸ñÂð£¿";
+ Text[ russian ] = "Òàáëèöà áûëà èçìåíåíà, íî íå ñîõðàíåíà. \nÑîõðàíèòü òàáëèöó ñåé÷àñ?";
+ Text[ polish ] = "Tabela zosta³a zmieniona i nie jest zapisana. \nCzy tabela ma byæ zapisana?";
+ Text[ japanese ] = "•\\‚ª•ÏX‚³‚ê•Û‘¶‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB\n•\\‚ð•Û‘¶‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "³o­Óªí®æ¤w¸gÅܧó¡M¦ý¬O©|¥¼Àx¦s¡C \n±z­nÀx¦s³o­Óªí®æ¡H";
+ Text[ arabic ] = "Êã ÊÛííÑ ÇáÌÏæá æáã íÊã ÍÝÙå ÈÚÏ.\nåá ÊÑíÏ ÍÝÙ ÇáÌÏæá ÇáÂä¿";
+ Text[ greek ] = "Ç ëßóôá ôñïðïðïéÞèçêå êáé äåí áðïèçêåýôçêå.\nÈÝëåôå íá ôçí áðïèçêåýóåôå ôþñá;";
+ Text[ korean ] = "Å×À̺íÀÌ º¯°æµÇ¾úÀ¸³ª ÀúÀåµÇÁö ¾Ê¾Ò½À´Ï´Ù. \nÅ×À̺íÀ» ÀúÀåÇÒ±î¿ä?";
+ Text[ turkish ] = "Tablo deðiþtirildi ancak kaydedilmedi. Tablo \n kaydedilsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_WARN_NAME_DUPLICATE
+{
+ Text = "Der von Ihnen eingegebene Name ist schon vorhanden. \nGeben Sie bitte einen anderen Namen ein." ;
+ Text [ ENGLISH ] = "Your choosen Name already exists. \nPlease Choose another name." ;
+ Text [ norwegian ] = "Your choosen Name already exists. \nPlease Choose another name." ;
+ Text [ italian ] = "Il nome scelto è già esistente. \nScegliete un altro nome." ;
+ Text [ portuguese_brazilian ] = "O nome escolhido já existe. \nEscolha outro nome." ;
+ Text [ portuguese ] = "O nome indicado já existe. \nIndique um outro." ;
+ Text [ finnish ] = "Nimi on jo käytössä. \nKirjoita toinen nimi." ;
+ Text [ danish ] = "Det navn, du har indtastet, eksisterer allerede.\nIndtast venligst et andet navn." ;
+ Text [ french ] = "Le nom que vous avez saisi existe déjà. \nVeuillez en saisir un autre." ;
+ Text [ swedish ] = "Namnet Du valde finns redan. \nVälj ett annat namn." ;
+ Text [ dutch ] = "De door u gekozen naam bestaat reeds. \nKies een andere naam." ;
+ Text [ spanish ] = "Este nombre ya existe. \nIntroduzca otro nombre por favor." ;
+ Text [ english_us ] = "The name you have entered already exists. \nPlease choose another name." ;
+ Text[ chinese_simplified ] = "ÄúÊäÈëµÄÃû³ÆÒѾ­´æÔÚ¡£\nÇëÄúÊäÈëÒ»¸öÆäËûµÄÃû³Æ¡£";
+ Text[ russian ] = "Ââåäåííîå Âàìè èìÿ óæå èìååòñÿ. \nÂâåäèòå, ïîæàëóéñòà, äðóãîå èìÿ.";
+ Text[ polish ] = "Wpisana przez ciebie nazwa ju¿ istnieje.\nWpisz inn¹ nazwê.";
+ Text[ japanese ] = "“ü—Í‚µ‚½–¼‘O‚Í‚·‚Å‚É‚ ‚è‚Ü‚·B\n•Ê‚Ì–¼‘O‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢B";
+ Text[ chinese_traditional ] = "±z¿é¤Jªº¦WºÙ¤w¸g¦s¦b¡C\n½Ð±z¿é¤J¤@­Ó¨ä¥Lªº¦WºÙ¡C";
+ Text[ arabic ] = "ÇáÇÓã ÇáÐí ÞãÊ ÈÅÏÎÇáå ãæÌæÏ ãÓÈÞÇð.\nÇáÑÌÇÁ ÅÏÎÇá ÇÓã ÌÏíÏ.";
+ Text[ greek ] = "Ôï üíïìá ðïõ åéóÜãáôå õðÜñ÷åé Þäç. \nÐáñáêáëþ åðéëÝîôå Ýíá Üëëï.";
+ Text[ korean ] = "ÀÔ·ÂÇÑ À̸§ÀÌ ÀÌ¹Ì ÀÖ½À´Ï´Ù. \n´Ù¸¥ À̸§À» ÀÔ·ÂÇϽʽÿÀ.";
+ Text[ turkish ] = "Girdiðiniz ad zaten mevcut. Yeni bir \nad girin.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_LINEEND
+{
+ Text = "Linienende" ;
+ Text [ ENGLISH ] = "Line end" ;
+ Text [ norwegian ] = "Line end" ;
+ Text [ italian ] = "Estremità linea" ;
+ Text [ portuguese_brazilian ] = "Fim de linha" ;
+ Text [ portuguese ] = "Fim de linha" ;
+ Text [ finnish ] = "Viivanpää" ;
+ Text [ danish ] = "Pile" ;
+ Text [ french ] = "Extrémité de ligne" ;
+ Text [ swedish ] = "Linjeslut" ;
+ Text [ dutch ] = "Lijnuiteinde" ;
+ Text [ spanish ] = "Fin de línea" ;
+ Text [ english_us ] = "Arrowheads" ;
+ Text[ chinese_simplified ] = "Ï߶Ë";
+ Text[ russian ] = "Êîíåö ëèíèè";
+ Text[ polish ] = "Koñcówki linii";
+ Text[ japanese ] = "ü‚ÌI“_";
+ Text[ chinese_traditional ] = "½uºÝ";
+ Text[ arabic ] = "äåÇíÉ ÇáÎØ";
+ Text[ greek ] = "ÔÝëïò ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ¾ç³¡";
+ Text[ turkish ] = "Çizgi ucu";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DESC_LINEEND
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für das neue Linienende ein: : Geben Sie hier bitte den Namen f³r das neue Linienende ein: */
+ /* ### ACHTUNG: Neuer Text in Resource? Geben Sie hier bitte den Namen für das neue Linienende ein: : Geben Sie hier bitte den Namen f³r das neue Linienende ein: */
+ Text = "Geben Sie hier bitte den Namen für das neue Linienende ein:" ;
+ Text [ ENGLISH ] = "Please insert a Name for the new line end:" ;
+ Text [ norwegian ] = "Please insert a Name for the new line end:" ;
+ Text [ italian ] = "Digitare un nome per la nuova estremità di linea:" ;
+ Text [ portuguese_brazilian ] = "Insira um nome para o novo fim de linha:" ;
+ Text [ portuguese ] = "Por favor introduza um nome para o novo fim de linha:" ;
+ Text [ finnish ] = "Kirjoita uuden viivanpään nimi:" ;
+ Text [ danish ] = "Indtast venligst et navn til den nye piltype:" ;
+ Text [ french ] = "Saisissez un nom pour la nouvelle extrémité de ligne :" ;
+ Text [ swedish ] = "Ange namn för nya linjeslutet:" ;
+ Text [ dutch ] = "Typ hier een naam voor het nieuwe lijnuiteinde:" ;
+ Text [ spanish ] = "Inserte aquí el nombre para el nuevo fin de línea:" ;
+ Text [ english_us ] = "Please enter a name for the new arrowhead:" ;
+ Text[ chinese_simplified ] = "ÇëÄúÔÚ´ËΪеÄÏ߶ËÊäÈëÒ»¸öÃû³Æ:";
+ Text[ russian ] = "Ââåäèòå, ïîæàëóéñòà, ñþäà íàçâàíèå íîâîãî êîíöà ëèíèè:";
+ Text[ polish ] = "Podaj nazwê dla nowych koñcówek linii:";
+ Text[ japanese ] = "V‚µ‚¢ü’[‚Ì–¼‘O‚ð‚±‚±‚É“ü—Í‚µ‚ĉº‚³‚¢F";
+ Text[ chinese_traditional ] = "½Ð±z¦b¦¹¬°·sªº½uºÝ¿é¤J¤@­Ó¦WºÙ¡G";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇÓã ÇáäåÇíÉ ÇáÌÏíÏÉ ááÎØ åäÇ:";
+ Text[ greek ] = "Ðáñáêáëþ åéóÜãåôå Ýíá üíïìá ãéá ôï íÝï ôÝëïò ôçò ãñáììÞò:";
+ Text[ korean ] = "¿©±â¿¡ »õ ¼±ÀÇ ¾ç³¡ À̸§À» ÀÔ·ÂÇϽʽÿÀ:";
+ Text[ turkish ] = "Yeni çizgi ucu için bir ad girin:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DEL_LINEEND
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Linienende löschen : Linienende l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Linienende löschen : Linienende l÷schen */
+ Text = "Linienende löschen" ;
+ Text [ ENGLISH ] = "Delete line end" ;
+ Text [ norwegian ] = "Slett Linjeslutt" ;
+ Text [ italian ] = "Cancella estremità linea" ;
+ Text [ portuguese_brazilian ] = "Delete line end" ;
+ Text [ portuguese ] = "Eliminar fim de linha" ;
+ Text [ finnish ] = "Delete line end" ;
+ Text [ danish ] = "Slet pil" ;
+ Text [ french ] = "Supprimer les extrémités" ;
+ Text [ swedish ] = "Radera linjeslut" ;
+ Text [ dutch ] = "Lijnuiteinde verwijderen" ;
+ Text [ spanish ] = "Eliminar fin de línea" ;
+ Text [ english_us ] = "Delete line ends" ;
+ Text[ chinese_simplified ] = "ɾ³ýÏ߶Ë";
+ Text[ russian ] = "Óäàëèòü êîíåö ëèíèè";
+ Text[ polish ] = "Usuñ koñcówki linii";
+ Text[ japanese ] = "ü’[‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£½uºÝ";
+ Text[ arabic ] = "ÍÐÝ äåÇíÇÊ ÇáÎØæØ";
+ Text[ greek ] = "ÄéáãñáöÞ ôÝëïõò ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ¾ç³¡ »èÁ¦";
+ Text[ turkish ] = "Çizgi ucunu sil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_DEL_LINEEND
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Soll das Linienende wirklich gelöscht werden? : Soll das Linienende wirklich gel÷scht werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Soll das Linienende wirklich gelöscht werden? : Soll das Linienende wirklich gel÷scht werden? */
+ Text = "Soll das Linienende wirklich gelöscht werden?" ;
+ Text [ ENGLISH ] = "Do you want to delete the line end?" ;
+ Text [ norwegian ] = "Vil du slette linjeslutten?" ;
+ Text [ italian ] = "Cancellare l'estremità di linea?" ;
+ Text [ portuguese_brazilian ] = "Do you want to delete the line end?" ;
+ Text [ portuguese ] = "Deseja realmente eliminar o fim de linha?" ;
+ Text [ finnish ] = "Do you want to delete the line end?" ;
+ Text [ danish ] = "Er du sikker på, at du vil slette piltypen?" ;
+ Text [ french ] = "Voulez-vous supprimer l'extrémité de la ligne ?" ;
+ Text [ swedish ] = "Vill Du verkligen radera linjeslutet?" ;
+ Text [ dutch ] = "Wilt u het lijnuiteinde werkelijk wissen?" ;
+ Text [ spanish ] = "¿Desea realmente eliminar el final de línea?" ;
+ Text [ english_us ] = "Do you want to delete the arrowhead?" ;
+ Text[ chinese_simplified ] = "ÄúÕæµÄҪɾ³ýÕâ¸öÏ߶ËÂð£¿";
+ Text[ russian ] = "Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòîò òèï êîíöà ëèíèè?";
+ Text[ polish ] = "Czy chcesz na pewno usun¹æ koñcówki linii?";
+ Text[ japanese ] = "‚±‚Ìü’[‚ð–{“–‚É휂µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "±z¯u­n§R°£³o­Ó½uºÝ¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ÈÇáÝÚá ÍÐÝ äåÇíÉ ÇáÎØ¿";
+ Text[ greek ] = "ÈÝëåôå ðñáãìáôéêÜ íá äéáãñáöåß ôï ôÝëïò ôçò ãñáììÞò;";
+ Text[ korean ] = "¼±ÀÇ ¾ç³¡À» Á¤¸»·Î »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Çizgi ucu gerçekten silinsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ASK_CHANGE_LINEEND
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Das Linienende wurde geändert und nicht gesichert. \nMöchten Sie das Linienende jetzt sichern? : Das Linienende wurde geõndert und nicht gesichert. \nM÷chten Sie das Linienende jetzt sichern? */
+ /* ### ACHTUNG: Neuer Text in Resource? Das Linienende wurde geändert und nicht gesichert. \nMöchten Sie das Linienende jetzt sichern? : Das Linienende wurde geõndert und nicht gesichert. \nM÷chten Sie das Linienende jetzt sichern? */
+ Text = "Das Linienende wurde geändert und nicht gesichert. \nMöchten Sie das Linienende jetzt sichern?" ;
+ Text [ ENGLISH ] = "The line end was modified without Save? \nWould you like to save the line end now?" ;
+ Text [ dutch ] = "In het lijnuiteinde werden wijzigingen aangebracht en niet opgeslagen.\nWilt u het einde van de lijn nu opslaan?" ;
+ Text [ english_us ] = "The arrowhead was modified without saving.\nWould you like to save the arrowhead now?" ;
+ Text [ italian ] = "L'estremità della linea è stata modificata ma non salvata \nSalvarla adesso?" ;
+ Text [ spanish ] = "El final de línea ha sido modificado pero no guardado. \n¿Desea guardar ahora el final de línea?" ;
+ Text [ french ] = "L'extrémité de la ligne a été modifiée sans avoir été sauvegardée.\nVoulez-vous la sauvegarder maintenant ?" ;
+ Text [ swedish ] = "Linjeslutet ändrades utan att sparas.\nVill Du spara det nu?" ;
+ Text [ danish ] = "Piltypen er blevet ændret, men ikke gemt. \nDu kan ændre den markerede pil\n eller tilføje en ny." ;
+ Text [ portuguese ] = "O fim de linha foi modificado e não guardado.\nGuardar agora?" ;
+ Text [ portuguese_brazilian ] = "Das Linienende wurde geändert und nicht gesichert. \nMöchten Sie das Linienende jetzt sichern?" ;
+ Text[ chinese_simplified ] = "Õâ¸öÏ߶ËÒѾ­±»¸ü¸Ä£¬µ«ÊÇûÓб»±£´æ¡£\nÄúÒªÏÖÔÚ±£´æÕâ¸öÏ߶ËÂð£¿";
+ Text[ russian ] = "Êîíåö ëèíèè áûë èçìåíåí, íî íå ñîõðàíåí. \nÂû õîòèòå ñåé÷àñ ñîõðàíèòü êîíåö ëèíèè?";
+ Text[ polish ] = "Koñcówki linii zosta³y zmienione i nie zapisane. \nCzy chcesz zmieniæ teraz koñcówki linii?";
+ Text[ japanese ] = "ü’[‚ª•ÏX‚³‚ê‚Ä•Û‘¶‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB\n‚±‚Ìü’[‚ð¡•Û‘¶‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "³o­Ó½uºÝ¤w¸gÅܧó¡M¦ý¬O©|¥¼Àx¦s¡C\n±z­n²{¦bÀx¦s³o­Ó½uºÝ¡H";
+ Text[ arabic ] = "Êã ÊÛííÑ äåÇíÉ ÇáÎØ æáã íÊã ÍÝÙåÇ ÈÚÏ.\nåá ÊÑíÏ ÍÝÙ äåÇíÉ ÇáÎØ ÇáÂä¿";
+ Text[ greek ] = "Ôï ôÝëïò ãñáììÞò ôñïðïðïéÞèçêå êáé äåí áðïèçêåýôçêå.\nÈÝëåôå íá ôï áðïèçêåýóåôå ôþñá;";
+ Text[ korean ] = "¼±ÀÇ ¾ç³¡ÀÌ º¯°æµÇ¾úÀ¸³ª ÀúÀåµÇÁö ¾Ê¾Ò½À´Ï´Ù .\nÁö±Ý ¼±ÀÇ ¾ç³¡À» ÀúÀåÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Çizgi ucu deðiþtirildi ancak kaydedilmedi.\nÇizgi ucunu þimdi kaydetmek istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_CLOSE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Schließen : Schlie˜en */
+ /* ### ACHTUNG: Neuer Text in Resource? Schließen : Schlie˜en */
+ Text = "Schließen" ;
+ 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 ] = "Stäng" ;
+ Text [ dutch ] = "Sluiten" ;
+ Text [ spanish ] = "Cerrar" ;
+ Text [ english_us ] = "Close" ;
+ Text[ chinese_simplified ] = "¹Ø±Õ";
+ Text[ russian ] = "Çàêðûòü";
+ Text[ polish ] = "Zamknij";
+ Text[ japanese ] = "I—¹";
+ Text[ chinese_traditional ] = "Ãö³¬";
+ Text[ arabic ] = "ÅÛáÇÞ";
+ Text[ greek ] = "Êëåßóéìï";
+ Text[ korean ] = "´Ý±â";
+ Text[ turkish ] = "Kapat";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_BLACK
+{
+ Text = "Schwarz" ;
+ Text [ ENGLISH ] = "Black" ;
+ Text [ norwegian ] = "Black" ;
+ Text [ italian ] = "Nero" ;
+ Text [ portuguese_brazilian ] = "Preto" ;
+ Text [ portuguese ] = "Preto" ;
+ Text [ french ] = "Noir" ;
+ Text [ dutch ] = "Zwart" ;
+ Text [ spanish ] = "Negro" ;
+ Text [ danish ] = "Sort" ;
+ Text [ swedish ] = "Svart" ;
+ Text [ finnish ] = "Black" ;
+ Text [ english_us ] = "Black" ;
+ Text[ chinese_simplified ] = "ºÚÉ«";
+ Text[ russian ] = "×åðíûé";
+ Text[ polish ] = "Czarny";
+ Text[ japanese ] = "•";
+ Text[ chinese_traditional ] = "¶Â¦â";
+ Text[ arabic ] = "ÃÓæÏ";
+ Text[ greek ] = "Ìáýñï";
+ Text[ korean ] = "°ËÀº»ö";
+ Text[ turkish ] = "Siyah";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_BLUE
+{
+ Text = "Blau" ;
+ Text [ ENGLISH ] = "Blue" ;
+ Text [ norwegian ] = "Blue" ;
+ Text [ italian ] = "Blu" ;
+ Text [ portuguese_brazilian ] = "Azul" ;
+ Text [ portuguese ] = "Azul" ;
+ Text [ french ] = "Bleu" ;
+ Text [ dutch ] = "Blauw" ;
+ Text [ spanish ] = "Azul" ;
+ Text [ danish ] = "Blå" ;
+ Text [ swedish ] = "Blått" ;
+ Text [ finnish ] = "Blue" ;
+ Text [ english_us ] = "Blue" ;
+ Text[ chinese_simplified ] = "À¶É«";
+ Text[ russian ] = "Ñèíèé";
+ Text[ polish ] = "Nieb.";
+ Text[ japanese ] = "Â";
+ Text[ chinese_traditional ] = "ÂŦâ";
+ Text[ arabic ] = "ÃÒÑÞ";
+ Text[ greek ] = "Ìðëå";
+ Text[ korean ] = "û»ö";
+ Text[ turkish ] = "Mavi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GREEN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Grün : Gr³n */
+ /* ### ACHTUNG: Neuer Text in Resource? Grün : Gr³n */
+ Text = "Grün" ;
+ Text [ ENGLISH ] = "Green" ;
+ Text [ norwegian ] = "Green" ;
+ Text [ italian ] = "Verde" ;
+ Text [ portuguese_brazilian ] = "Verde" ;
+ Text [ portuguese ] = "Verde" ;
+ Text [ french ] = "Vert" ;
+ Text [ dutch ] = "Groen" ;
+ Text [ spanish ] = "Verde" ;
+ Text [ danish ] = "Grøn" ;
+ Text [ swedish ] = "Grönt" ;
+ Text [ finnish ] = "Green" ;
+ Text [ english_us ] = "Green" ;
+ Text[ chinese_simplified ] = "ÂÌÉ«";
+ Text[ russian ] = "Çåëåíûé";
+ Text[ polish ] = "Zielony";
+ Text[ japanese ] = "—Î";
+ Text[ chinese_traditional ] = "ºñ¦â";
+ Text[ arabic ] = "ÃÎÖÑ";
+ Text[ greek ] = "ÐñÜóéíï";
+ Text[ korean ] = "³ì»ö";
+ Text[ turkish ] = "Yeþil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_CYAN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Türkis : T³rkis */
+ /* ### ACHTUNG: Neuer Text in Resource? Türkis : T³rkis */
+ Text = "Türkis" ;
+ Text [ ENGLISH ] = "Cyan" ;
+ Text [ norwegian ] = "Cyan" ;
+ Text [ italian ] = "Ciano" ;
+ Text [ portuguese_brazilian ] = "Ciano" ;
+ Text [ portuguese ] = "Turquesa" ;
+ Text [ french ] = "Turquoise" ;
+ Text [ dutch ] = "Turkoois" ;
+ Text [ spanish ] = "Turquesa" ;
+ Text [ danish ] = "Turkis" ;
+ Text [ swedish ] = "Turkost" ;
+ Text [ finnish ] = "Cyan" ;
+ Text [ english_us ] = "Turquoise" ;
+ Text[ chinese_simplified ] = "À¶ÂÌÉ«";
+ Text[ russian ] = "Áèðþçîâûé";
+ Text[ polish ] = "Turkusowy";
+ Text[ japanese ] = "—Î";
+ Text[ chinese_traditional ] = "Âťɦâ";
+ Text[ arabic ] = "ÊÑßæÇÒ";
+ Text[ greek ] = "ÔïõñêïõÜæ";
+ Text[ korean ] = "û¿Á»ö";
+ Text[ turkish ] = "Türkuaz";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_RED
+{
+ Text = "Rot" ;
+ Text [ ENGLISH ] = "Red" ;
+ Text [ norwegian ] = "Red" ;
+ Text [ italian ] = "Rosso" ;
+ Text [ portuguese_brazilian ] = "Vermelho" ;
+ Text [ portuguese ] = "Vermelho" ;
+ Text [ french ] = "Rouge" ;
+ Text [ dutch ] = "Rood" ;
+ Text [ spanish ] = "Rojo" ;
+ Text [ danish ] = "Rød" ;
+ Text [ swedish ] = "Rött" ;
+ Text [ finnish ] = "Red" ;
+ Text [ english_us ] = "Red" ;
+ Text[ chinese_simplified ] = "ºìÉ«";
+ Text[ russian ] = "Êðàñíûé";
+ Text[ polish ] = "Czerw.";
+ Text[ japanese ] = "Ô";
+ Text[ chinese_traditional ] = "¬õ¦â";
+ Text[ arabic ] = "ÃÍãÑ";
+ Text[ greek ] = "Êüêêéíï";
+ Text[ korean ] = "Àû»ö";
+ Text[ turkish ] = "Kýrmýzý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_MAGENTA
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Magenta : Violett */
+ Text = "Magenta" ;
+ Text [ ENGLISH ] = "Magenta" ;
+ Text [ norwegian ] = "Magenta" ;
+ Text [ italian ] = "Magenta" ;
+ Text [ portuguese_brazilian ] = "Magenta" ;
+ Text [ portuguese ] = "Violeta" ;
+ Text [ french ] = "Magenta" ;
+ Text [ dutch ] = "Violet" ;
+ Text [ spanish ] = "Magenta" ;
+ Text [ danish ] = "Magenta" ;
+ Text [ swedish ] = "Magenta" ;
+ Text [ finnish ] = "Magenta" ;
+ Text [ english_us ] = "Magenta" ;
+ Text[ chinese_simplified ] = "×ϺìÉ«";
+ Text[ russian ] = "Ëèëîâûé";
+ Text[ polish ] = "Purpurowy";
+ Text[ japanese ] = "ϾÞÝÀ";
+ Text[ chinese_traditional ] = "µµ¬õ¦â";
+ Text[ arabic ] = "ÃÑÌæÇäí";
+ Text[ greek ] = "ÌáôæÝíôá";
+ Text[ korean ] = "¸¶Á¨Å¸»ö";
+ Text[ turkish ] = "Mor";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_BROWN
+{
+ Text = "Braun" ;
+ Text [ ENGLISH ] = "Brown" ;
+ Text [ norwegian ] = "Brown" ;
+ Text [ italian ] = "Marrone" ;
+ Text [ portuguese_brazilian ] = "Marrom" ;
+ Text [ portuguese ] = "Castanho" ;
+ Text [ french ] = "Marron" ;
+ Text [ dutch ] = "Bruin" ;
+ Text [ spanish ] = "Marrón" ;
+ Text [ danish ] = "Brun" ;
+ Text [ swedish ] = "Brunt" ;
+ Text [ finnish ] = "Brown" ;
+ Text [ english_us ] = "Brown" ;
+ Text[ chinese_simplified ] = "×ØÉ«";
+ Text[ russian ] = "Êîðè÷íåâûé";
+ Text[ polish ] = "Br¹zowy";
+ Text[ japanese ] = "’ƒF";
+ Text[ chinese_traditional ] = "´Ä¦â";
+ Text[ arabic ] = "Èäí";
+ Text[ greek ] = "ÊáöÝ";
+ Text[ korean ] = "°¥»ö";
+ Text[ turkish ] = "Kahverengi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GREY
+{
+ Text = "Grau" ;
+ Text [ ENGLISH ] = "Grey" ;
+ Text [ norwegian ] = "Grey" ;
+ Text [ italian ] = "Grigio" ;
+ Text [ portuguese_brazilian ] = "Cinza" ;
+ Text [ portuguese ] = "Cinzento" ;
+ Text [ french ] = "Gris" ;
+ Text [ dutch ] = "Grijs" ;
+ Text [ spanish ] = "Gris" ;
+ Text [ danish ] = "Grå" ;
+ Text [ swedish ] = "Grått" ;
+ Text [ finnish ] = "Grey" ;
+ Text [ english_us ] = "Gray" ;
+ Text[ chinese_simplified ] = "»ÒÉ«";
+ Text[ russian ] = "Ñåðûé";
+ Text[ polish ] = "Szary";
+ Text[ japanese ] = "ŠDF";
+ Text[ chinese_traditional ] = "¦Ç¦â";
+ Text[ arabic ] = "ÑãÇÏí";
+ Text[ greek ] = "Ãêñé";
+ Text[ korean ] = "ȸ»ö";
+ Text[ turkish ] = "Gri";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_LIGHTGREY
+{
+ Text = "Hellgrau" ;
+ Text [ ENGLISH ] = "Lightgrey" ;
+ Text [ norwegian ] = "Lightgrey" ;
+ Text [ italian ] = "Grigio chiaro" ;
+ Text [ portuguese_brazilian ] = "Lightgrey" ;
+ Text [ portuguese ] = "Cinzento-claro" ;
+ Text [ french ] = "Gris clair" ;
+ Text [ dutch ] = "Lichtgrijs" ;
+ Text [ spanish ] = "Gris claro" ;
+ Text [ danish ] = "Lysegrå" ;
+ Text [ swedish ] = "Ljusgrått" ;
+ Text [ finnish ] = "Lightgrey" ;
+ Text [ english_us ] = "Light gray" ;
+ Text[ chinese_simplified ] = "dz»ÒÉ«";
+ Text[ russian ] = "Ñâåòëî-ñåðûé";
+ Text[ polish ] = "Jasnoszary";
+ Text[ japanese ] = "–¾‚é‚¢ŠDF";
+ Text[ chinese_traditional ] = "²L¦Ç¦â";
+ Text[ arabic ] = "ÑãÇÏí ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü ãêñé";
+ Text[ korean ] = "¹àÀº ȸ»ö";
+ Text[ turkish ] = "Açýk gri";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_LIGHTBLUE
+{
+ Text = "Hellblau" ;
+ Text [ ENGLISH ] = "Lightblue" ;
+ Text [ norwegian ] = "Lys blå" ;
+ Text [ italian ] = "Blu chiaro" ;
+ Text [ portuguese_brazilian ] = "Azul claro" ;
+ Text [ portuguese ] = "Azul-claro" ;
+ Text [ french ] = "Bleu roi" ;
+ Text [ dutch ] = "Lichtblauw" ;
+ Text [ spanish ] = "Azul claro" ;
+ Text [ danish ] = "Lyseblå" ;
+ Text [ swedish ] = "Ljusblått" ;
+ Text [ finnish ] = "Lightblue" ;
+ Text [ english_us ] = "Light blue" ;
+ Text[ chinese_simplified ] = "dzÀ¶É«";
+ Text[ russian ] = "Ñâåòëî-ñèíèé";
+ Text[ polish ] = "Jasnoniebieski";
+ Text[ japanese ] = "–¾‚é‚¢Â";
+ Text[ chinese_traditional ] = "²LÂŦâ";
+ Text[ arabic ] = "ÃÒÑÞ ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü ìðëå";
+ Text[ korean ] = "¹àÀº û»ö";
+ Text[ turkish ] = "Açýk mavi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_LIGHTGREEN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Hellgrün : Hellgr³n */
+ /* ### ACHTUNG: Neuer Text in Resource? Hellgrün : Hellgr³n */
+ Text = "Hellgrün" ;
+ Text [ ENGLISH ] = "Lightgreen" ;
+ Text [ norwegian ] = "Lys grønn" ;
+ Text [ italian ] = "Verde chiaro" ;
+ Text [ portuguese_brazilian ] = "Verde claro" ;
+ Text [ portuguese ] = "Verde-claro" ;
+ Text [ french ] = "Vert clair" ;
+ Text [ dutch ] = "Lichtgroen" ;
+ Text [ spanish ] = "Verde claro" ;
+ Text [ danish ] = "Lysegrøn" ;
+ Text [ swedish ] = "Ljusgrönt" ;
+ Text [ finnish ] = "Lightgreen" ;
+ Text [ english_us ] = "Light green" ;
+ Text[ chinese_simplified ] = "dzÂÌÉ«";
+ Text[ russian ] = "Ñâåòëî-çåëåíûé";
+ Text[ polish ] = "Jasnozielony";
+ Text[ japanese ] = "–¾‚é‚¢—Î";
+ Text[ chinese_traditional ] = "²Lºñ¦â";
+ Text[ arabic ] = "ÃÎÖÑ ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü ðñÜóéíï";
+ Text[ korean ] = "¹àÀº ³ì»ö";
+ Text[ turkish ] = "Açýk yeþil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_LIGHTCYAN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Helltürkis : Hellt³rkis */
+ /* ### ACHTUNG: Neuer Text in Resource? Helltürkis : Hellt³rkis */
+ Text = "Helltürkis" ;
+ Text [ ENGLISH ] = "Lightcyan" ;
+ Text [ norwegian ] = "Lys cyanfarge" ;
+ Text [ italian ] = "Ciano chiaro" ;
+ Text [ portuguese_brazilian ] = "Cian claro" ;
+ Text [ portuguese ] = "Turquesa-claro" ;
+ Text [ french ] = "Turquoise clair" ;
+ Text [ dutch ] = "Licht turkoois" ;
+ Text [ spanish ] = "Turquesa claro" ;
+ Text [ danish ] = "Lys turkis" ;
+ Text [ swedish ] = "Ljusturkost" ;
+ Text [ finnish ] = "Lightcyan" ;
+ Text [ english_us ] = "Light cyan" ;
+ Text[ chinese_simplified ] = "dzÀ¶ÂÌÉ«";
+ Text[ russian ] = "Ñâåòëî-áèðþçîâûé";
+ Text[ polish ] = "Jasnoturkusowy";
+ Text[ japanese ] = "–¾‚邢—Î";
+ Text[ chinese_traditional ] = "²LÂźñ¦â";
+ Text[ arabic ] = "ÊÑßæÇÒ ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü êõáíü";
+ Text[ korean ] = "¹àÀº ¿Á»ö";
+ Text[ turkish ] = "Açýk turkuaz";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_LIGHTRED
+{
+ Text = "Hellrot" ;
+ Text [ ENGLISH ] = "Lightred" ;
+ Text [ norwegian ] = "Lys rød" ;
+ Text [ italian ] = "Rosso chiaro" ;
+ Text [ portuguese_brazilian ] = "Vermelho claro" ;
+ Text [ portuguese ] = "Vermelho-claro" ;
+ Text [ french ] = "Rouge clair" ;
+ Text [ dutch ] = "Lichtrood" ;
+ Text [ spanish ] = "Rojo claro" ;
+ Text [ danish ] = "Lys rød" ;
+ Text [ swedish ] = "Ljusrött" ;
+ Text [ finnish ] = "Lightred" ;
+ Text [ english_us ] = "Light red" ;
+ Text[ chinese_simplified ] = "dzºìÉ«";
+ Text[ russian ] = "Ñâåòëî-êðàñíûé";
+ Text[ polish ] = "Jasnoczerwony";
+ Text[ japanese ] = "–¾‚é‚¢Ô";
+ Text[ chinese_traditional ] = "²L¬õ¦â";
+ Text[ arabic ] = "ÃÍãÑ ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü êüêêéíï";
+ Text[ korean ] = "¹àÀº Àû»ö";
+ Text[ turkish ] = "Açýk kýrmýzý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_LIGHTMAGENTA
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Hellmagenta : Hellviolett */
+ Text = "Hellmagenta" ;
+ Text [ ENGLISH ] = "Lightmagenta" ;
+ Text [ norwegian ] = "Lys magentarød" ;
+ Text [ italian ] = "Magenta chiaro" ;
+ Text [ portuguese_brazilian ] = "Magenta claro" ;
+ Text [ portuguese ] = "Violeta-claro" ;
+ Text [ french ] = "Magenta clair" ;
+ Text [ dutch ] = "Lichtviolet" ;
+ Text [ spanish ] = "Magenta claro" ;
+ Text [ danish ] = "Lys magenta" ;
+ Text [ swedish ] = "Ljus magenta" ;
+ Text [ finnish ] = "Lightmagenta" ;
+ Text [ english_us ] = "Light magenta" ;
+ Text[ chinese_simplified ] = "dz×ϺìÉ«";
+ Text[ russian ] = "Ñâåòëî-ëèëîâûé";
+ Text[ polish ] = "Jasnopurpurowy";
+ Text[ japanese ] = "–¾‚邢ϾÞÝÀ";
+ Text[ chinese_traditional ] = "²Lµµ¬õ¦â";
+ Text[ arabic ] = "ÃÑÌæÇäí ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü ìáôæÝíôá";
+ Text[ korean ] = "¹àÀº ¸¶Á¨Å¸»ö";
+ Text[ turkish ] = "Eflatun";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_YELLOW
+{
+ Text = "Gelb" ;
+ Text [ ENGLISH ] = "Yellow" ;
+ Text [ norwegian ] = "Yellow" ;
+ Text [ italian ] = "Giallo" ;
+ Text [ portuguese_brazilian ] = "Amarelo" ;
+ Text [ portuguese ] = "Amarelo" ;
+ Text [ french ] = "Jaune" ;
+ Text [ dutch ] = "Geel" ;
+ Text [ spanish ] = "Amarillo" ;
+ Text [ danish ] = "Gul" ;
+ Text [ swedish ] = "Gult" ;
+ Text [ finnish ] = "Yellow" ;
+ Text [ english_us ] = "Yellow" ;
+ Text[ chinese_simplified ] = "»ÆÉ«";
+ Text[ russian ] = "Æåëòûé";
+ Text[ polish ] = "¯ó³ty";
+ Text[ japanese ] = "‰©F";
+ Text[ chinese_traditional ] = "¶À¦â";
+ Text[ arabic ] = "ÃÕÝÑ";
+ Text[ greek ] = "Êßôñéíï";
+ Text[ korean ] = "Ȳ»ö";
+ Text[ turkish ] = "Sarý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_WHITE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Weiß : Wei˜ */
+ /* ### ACHTUNG: Neuer Text in Resource? Weiß : Wei˜ */
+ Text = "Weiß" ;
+ Text [ ENGLISH ] = "White" ;
+ Text [ norwegian ] = "White" ;
+ Text [ italian ] = "Bianco" ;
+ Text [ portuguese_brazilian ] = "Branco" ;
+ Text [ portuguese ] = "Branco" ;
+ Text [ french ] = "Blanc" ;
+ Text [ dutch ] = "Wit" ;
+ Text [ spanish ] = "Blanco" ;
+ Text [ danish ] = "Hvid" ;
+ Text [ swedish ] = "Vitt" ;
+ Text [ finnish ] = "White" ;
+ Text [ english_us ] = "White" ;
+ Text[ chinese_simplified ] = "°×É«";
+ Text[ russian ] = "Áåëûé";
+ Text[ polish ] = "Bia³y";
+ Text[ japanese ] = "”’";
+ Text[ chinese_traditional ] = "¥Õ¦â";
+ Text[ arabic ] = "ÃÈíÖ";
+ Text[ greek ] = "Ëåõêü";
+ Text[ korean ] = "Èò»ö";
+ Text[ turkish ] = "Beyaz";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_BLUEGREY
+{
+ Text = "Blaugrau" ;
+ Text [ ENGLISH ] = "Bluegrey" ;
+ Text [ norwegian ] = "Bluegrey" ;
+ Text [ italian ] = "Grigioblu" ;
+ Text [ portuguese_brazilian ] = "Bluegrey" ;
+ Text [ portuguese ] = "Azul acizentado" ;
+ Text [ french ] = "Gris bleu" ;
+ Text [ dutch ] = "Blauwgrijs" ;
+ Text [ spanish ] = "Gris azulado" ;
+ Text [ danish ] = "Blågrå" ;
+ Text [ swedish ] = "Blågrått" ;
+ Text [ finnish ] = "Bluegrey" ;
+ Text [ english_us ] = "Blue gray" ;
+ Text[ chinese_simplified ] = "À¶»ÒÉ«";
+ Text[ russian ] = "Ñèíå-ñåðûé";
+ Text[ polish ] = "Niebieskoszary";
+ Text[ japanese ] = "ŠDF";
+ Text[ chinese_traditional ] = "ÂŦǦâ";
+ Text[ arabic ] = "ÑãÇÏí ãÒÑÞ";
+ Text[ greek ] = "Ìðëå-ãêñé";
+ Text[ korean ] = "ȸû»ö";
+ Text[ turkish ] = "Mavi-gri";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ORANGE
+{
+ Text = "Orange" ;
+ Text [ ENGLISH ] = "Orange" ;
+ Text [ norwegian ] = "Orange" ;
+ Text [ italian ] = "Arancione" ;
+ Text [ portuguese_brazilian ] = "Orange" ;
+ Text [ portuguese ] = "Laranja" ;
+ Text [ french ] = "Orange" ;
+ Text [ dutch ] = "Oranje" ;
+ Text [ spanish ] = "Naranja" ;
+ Text [ danish ] = "Orange" ;
+ Text [ swedish ] = "Orange" ;
+ Text [ finnish ] = "Orange" ;
+ Text [ english_us ] = "Orange" ;
+ Text[ chinese_simplified ] = "³ÈÉ«";
+ Text[ russian ] = "Îðàíæåâûé";
+ Text[ polish ] = "Pomarañczowy";
+ Text[ japanese ] = "žòF";
+ Text[ chinese_traditional ] = "®Ü¦â";
+ Text[ arabic ] = "ÈÑÊÞÇáí";
+ Text[ greek ] = "Ðïñôïêáëß";
+ Text[ korean ] = "ÁÖȲ»ö";
+ Text[ turkish ] = "Turuncu";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_ARROW
+{
+ Text = "Pfeil" ;
+ Text [ ENGLISH ] = "Arrow" ;
+ Text [ norwegian ] = "Arrow" ;
+ Text [ italian ] = "Freccia" ;
+ Text [ portuguese_brazilian ] = "Arrow" ;
+ Text [ portuguese ] = "Seta" ;
+ Text [ french ] = "Flèche" ;
+ Text [ dutch ] = "Pijl" ;
+ Text [ spanish ] = "Flecha" ;
+ Text [ danish ] = "Pil" ;
+ Text [ swedish ] = "Pil" ;
+ Text [ finnish ] = "Arrow" ;
+ Text [ english_us ] = "Arrow" ;
+ Text[ chinese_simplified ] = "¼ýÍ·";
+ Text[ russian ] = "Ñòðåëêà";
+ Text[ polish ] = "Strza³ka";
+ Text[ japanese ] = "–îˆó";
+ Text[ chinese_traditional ] = "½bÀY";
+ Text[ arabic ] = "Óåã";
+ Text[ greek ] = "ÂÝëïò";
+ Text[ korean ] = "È­»ìÇ¥";
+ Text[ turkish ] = "Ok";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_SQUARE
+{
+ Text = "Quadrat" ;
+ Text [ ENGLISH ] = "Square" ;
+ Text [ norwegian ] = "Kvadratisk" ;
+ Text [ italian ] = "Quadrato" ;
+ Text [ portuguese_brazilian ] = "Quadrado" ;
+ Text [ portuguese ] = "Quadrado" ;
+ Text [ french ] = "Carré" ;
+ Text [ dutch ] = "Vierkant" ;
+ Text [ spanish ] = "Cuadrado" ;
+ Text [ danish ] = "Kvadrat" ;
+ Text [ swedish ] = "Kvadrat" ;
+ Text [ finnish ] = "Square" ;
+ Text [ english_us ] = "Square" ;
+ Text[ chinese_simplified ] = "Õý·½ÐÎ";
+ Text[ russian ] = "Êâàäðàò";
+ Text[ polish ] = "Kwadrat";
+ Text[ japanese ] = "³•ûŒ`";
+ Text[ chinese_traditional ] = "¥¿¤è§Î";
+ Text[ arabic ] = "ãÑÈÚ";
+ Text[ greek ] = "ÔåôñÜãùíï";
+ Text[ korean ] = "Á¤»ç°¢Çü";
+ Text[ turkish ] = "Kare";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_CIRCLE
+{
+ Text = "Kreis" ;
+ Text [ ENGLISH ] = "Circle" ;
+ Text [ norwegian ] = "Sirkel" ;
+ Text [ italian ] = "Cerchio" ;
+ Text [ portuguese_brazilian ] = "Círculo" ;
+ Text [ portuguese ] = "Círculo" ;
+ Text [ french ] = "Cercle" ;
+ Text [ dutch ] = "Cirkel" ;
+ Text [ spanish ] = "Círculo" ;
+ Text [ danish ] = "Cirkel" ;
+ Text [ swedish ] = "Cirkel" ;
+ Text [ finnish ] = "Circle" ;
+ Text [ english_us ] = "Circle" ;
+ Text[ chinese_simplified ] = "Ô²";
+ Text[ russian ] = "Êðóã";
+ Text[ polish ] = "Ko³o";
+ Text[ japanese ] = "‰~";
+ Text[ chinese_traditional ] = "¶ê§Î";
+ Text[ arabic ] = "ÏÇÆÑÉ";
+ Text[ greek ] = "Êýêëïò";
+ Text[ korean ] = "¿ø";
+ Text[ turkish ] = "Daire";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_NONE
+{
+ Text = "- kein -" ;
+ Text [ ENGLISH ] = "- none -" ;
+ Text [ english_us ] = "- none -" ;
+ Text [ italian ] = "- nessuno -" ;
+ Text [ spanish ] = "- sin -" ;
+ Text [ french ] = "- aucun(e)-" ;
+ Text [ dutch ] = "- geen -" ;
+ Text [ swedish ] = "- ingen -" ;
+ Text [ danish ] = "- ingen -" ;
+ Text [ portuguese ] = "- nenhum -" ;
+ Text [ portuguese_brazilian ] = "- kein -" ;
+ Text[ chinese_simplified ] = "- ÎÞ -";
+ Text[ russian ] = "- áåç -";
+ Text[ polish ] = "- brak -";
+ Text[ japanese ] = "- ‚È‚µ -";
+ Text[ chinese_traditional ] = "- µL -";
+ Text[ arabic ] = "- ÈÏæä -";
+ Text[ greek ] = "- êáíÝíá -";
+ Text[ korean ] = "- ¾øÀ½ -";
+ Text[ turkish ] = "- yok -";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_TRANSPARENCE
+{
+ Text = "Transparenz" ;
+ Text [ ENGLISH ] = "Transparence" ;
+ Text [ english_us ] = "Transparency" ;
+ Text [ italian ] = "Trasparenza" ;
+ Text [ spanish ] = "Transparencia" ;
+ Text [ french ] = "Transparent" ;
+ Text [ dutch ] = "Transparant" ;
+ Text [ swedish ] = "Transparens" ;
+ Text [ danish ] = "Transparens" ;
+ Text [ portuguese ] = "Transparência" ;
+ Text [ portuguese_brazilian ] = "Transparenz" ;
+ Text[ chinese_simplified ] = "͸Ã÷";
+ Text[ russian ] = "Ïðîçðà÷íîñòü";
+ Text[ polish ] = "PrzeŸroczystoœæ";
+ Text[ japanese ] = "“§‰ß«";
+ Text[ chinese_traditional ] = "³z©ú";
+ Text[ arabic ] = "ÔÇÝíÉ";
+ Text[ greek ] = "ÄéáöÜíåéá";
+ Text[ korean ] = "Åõ¸í";
+ Text[ turkish ] = "Saydamlýk";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_CENTERED
+{
+ Text = "Zentriert" ;
+ Text [ ENGLISH ] = "Centered" ;
+ Text [ dutch ] = "Gecentreerd" ;
+ Text [ english_us ] = "Centered" ;
+ Text [ italian ] = "Centrato" ;
+ Text [ spanish ] = "Centrado" ;
+ Text [ french ] = "Centré" ;
+ Text [ swedish ] = "Centrerat" ;
+ Text [ danish ] = "Centreret" ;
+ Text [ portuguese ] = "Centrado" ;
+ Text [ portuguese_brazilian ] = "Zentriert" ;
+ Text[ chinese_simplified ] = "¾ÓÖÐ";
+ Text[ russian ] = "Ïî öåíòðó";
+ Text[ polish ] = "Wyœrodkowany";
+ Text[ japanese ] = "’†‰›‘µ‚¦";
+ Text[ chinese_traditional ] = "¸m¤¤";
+ Text[ arabic ] = "ÊæÓíØ";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá";
+ Text[ korean ] = "°¡¿îµ¥";
+ Text[ turkish ] = "Ortala";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_NOTCENTERED
+{
+ Text = "Nicht Zentriert" ;
+ Text [ ENGLISH ] = "Not centered" ;
+ Text [ english_us ] = "Not centered" ;
+ Text [ italian ] = "non centrato" ;
+ Text [ spanish ] = "Sin centrar" ;
+ Text [ french ] = "Non centré" ;
+ Text [ dutch ] = "Niet gecentreerd" ;
+ Text [ swedish ] = "Inte centrerad" ;
+ Text [ danish ] = "Ikke centreret" ;
+ Text [ portuguese ] = "Não centrado" ;
+ Text [ portuguese_brazilian ] = "Nicht Zentriert" ;
+ Text[ chinese_simplified ] = "²»¾ÓÖÐ";
+ Text[ russian ] = "Íå ïî öåíòðó";
+ Text[ polish ] = "Nie wyœrodkowany";
+ Text[ japanese ] = "’†‰›‘µ‚¦‚Å‚È‚¢";
+ Text[ chinese_traditional ] = "¤£¸m¤¤";
+ Text[ arabic ] = "ÛíÑ ãæÓØ";
+ Text[ greek ] = "¼÷é êåíôñáñéóìÝíá";
+ Text[ korean ] = "°¡¿îµ¥·Î ¸ÂÃßÁö ¾ÊÀ½";
+ Text[ turkish ] = "Ortalanmamýþ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GRAFMODE_STANDARD
+{
+ Text = "Standard";
+ Text[ english ] = "Standard";
+ Text[ english_us ] = "Default";
+ Text[ portuguese ] = "Padrão";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ dutch ] = "Standaard";
+ Text[ french ] = "Par défaut";
+ Text[ spanish ] = "Predeterminado";
+ Text[ italian ] = "Standard";
+ Text[ danish ] = "Standard";
+ Text[ swedish ] = "Standard";
+ Text[ polish ] = "Domyœlnie";
+ Text[ portuguese_brazilian ] = "Standard";
+ Text[ japanese ] = "•W€";
+ Text[ korean ] = "񃧯";
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ chinese_traditional ] = "¼Ð­ã";
+ Text[ arabic ] = "ÞíÇÓí";
+ Text[ turkish ] = "Standart";
+};
+String RID_SVXSTR_GRAFMODE_GREYS
+{
+ Text = "Graustufen";
+ Text[ english ] = "Greyscales";
+ Text[ english_us ] = "Grayscale";
+ Text[ portuguese ] = "Tons de cinzento";
+ Text[ russian ] = "Îòòåíêè ñåðîãî";
+ Text[ greek ] = "Äéáâáèìßóåéò ôïõ ãêñé";
+ Text[ dutch ] = "Grijswaarden";
+ Text[ french ] = "Niveaux de gris";
+ Text[ spanish ] = "Escala de grises";
+ Text[ italian ] = "Toni di grigio";
+ Text[ danish ] = "Gråtoner";
+ Text[ swedish ] = "Gråskalor";
+ Text[ polish ] = "Odcienie szaroœci";
+ Text[ portuguese_brazilian ] = "Greyscales";
+ Text[ japanese ] = "¸ÞÚ°½¹°Ù";
+ Text[ korean ] = "ȸ»öÁ¶";
+ Text[ chinese_simplified ] = "»Ò¶È";
+ Text[ chinese_traditional ] = "¦Ç¶¥";
+ Text[ arabic ] = "ÏÑÌÇÊ ÇáÑãÇÏí";
+ Text[ turkish ] = "Gri tonlama";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GRAFMODE_MONO
+{
+ Text = "Schwarz/Weiß";
+ Text[ english ] = "Black/White";
+ Text[ english_us ] = "Black/White";
+ Text[ portuguese ] = "Preto/Branco";
+ Text[ russian ] = "×åðíî-áåëûé";
+ Text[ greek ] = "Ìáýñï/Ëåõêü";
+ Text[ dutch ] = "Zwart-wit";
+ Text[ french ] = "Noir/Blanc";
+ Text[ spanish ] = "Blanco/Negro";
+ Text[ italian ] = "Bianco/Nero";
+ Text[ danish ] = "Sort-hvid";
+ Text[ swedish ] = "Svartvitt";
+ Text[ polish ] = "Bia³y/Czarny";
+ Text[ portuguese_brazilian ] = "Black/White";
+ Text[ japanese ] = "”’•";
+ Text[ korean ] = "Èæ/ ¹é";
+ Text[ chinese_simplified ] = "ºÚ/°×";
+ Text[ chinese_traditional ] = "¶Â¥Õ";
+ Text[ arabic ] = "ÃÓæÏ/ÃÈíÖ";
+ Text[ turkish ] = "Siyah/Beyaz";
+};
+String RID_SVXSTR_GRAFMODE_WATERMARK
+{
+ Text = "Wasserzeichen";
+ Text[ english ] = "Watermark";
+ Text[ english_us ] = "Watermark";
+ Text[ portuguese ] = "Marca d'água";
+ Text[ russian ] = "Âîäÿíûå çíàêè";
+ Text[ greek ] = "Õäáôüóçìï";
+ Text[ dutch ] = "Watermerk";
+ Text[ french ] = "Filigrane";
+ Text[ spanish ] = "Marca de agua";
+ Text[ italian ] = "Filigrana";
+ Text[ danish ] = "Vandmærke";
+ Text[ swedish ] = "Vattenmärke";
+ Text[ polish ] = "Znak wodny";
+ Text[ portuguese_brazilian ] = "Watermark";
+ Text[ japanese ] = "“§‚©‚µ";
+ Text[ korean ] = "¿öÅ͸¶Å©";
+ Text[ chinese_simplified ] = "ˮӡ";
+ Text[ chinese_traditional ] = "¥­·Æ";
+ Text[ arabic ] = "ÚáÇãÉ ãÇÆíÉ";
+ Text[ turkish ] = "Filigran";
+};
+String STR_INSERT_VIDEO_EXTFILTER_IVF
+{
+ Text = "Intel Indeo Video (*.ivf)" ;
+ Text [ ENGLISH ] = "Intel Indeo Video (*.ivf)" ;
+ Text [ english_us ] = "Intel Indeo Video (*.ivf)" ;
+ Text[ portuguese ] = "Intel Indeo Video (*.ivf)";
+ Text[ russian ] = "Intel Indeo Video (*.ivf)";
+ Text[ greek ] = "Intel Indeo Video (*.ivf)";
+ Text[ dutch ] = "Intel Indeo Video (*.ivf)";
+ Text[ french ] = "Intel Indeo Video (*.ivf)";
+ Text[ spanish ] = "Intel Indeo Video (*.ivf)";
+ Text[ italian ] = "Intel Indeo Video (*.ivf)";
+ Text[ danish ] = "Intel Indeo Video (*.ivf)";
+ Text[ swedish ] = "Intel Indeo Video (*.ivf)";
+ Text[ polish ] = "Intel Indeo Video (*.ivf)";
+ Text[ portuguese_brazilian ] = "Intel Indeo Video (*.ivf)";
+ Text[ japanese ] = "Intel Indeo Video (*.ivf)";
+ Text[ korean ] = "Intel Indeo Video (*.ivf)";
+ Text[ chinese_simplified ] = "Intel Indeo Video (*.ivf)";
+ Text[ chinese_traditional ] = "Intel Indeo Video (*.ivf)";
+ Text[ arabic ] = "Intel Indeo Video (*.ivf)";
+ Text[ turkish ] = "Intel Indeo Video (*.ivf)";
+};
+
+String STR_INSERT_VIDEO_EXTFILTER_AVI
+{
+ Text = "Video für Windows (*.avi)" ;
+ Text [ ENGLISH ] = "Video for Windows (*.avi)" ;
+ Text [ english_us ] = "Video for Windows (*.avi)" ;
+ Text[ portuguese ] = "Vídeo para Windows (*.avi)";
+ Text[ russian ] = "Âèäåî äëÿ Windows (*.avi)";
+ Text[ greek ] = "Video ãéá Windows (*.avi)";
+ Text[ dutch ] = "Video voor Windows (*.avi)";
+ Text[ french ] = "Vidéo pour Windows (*.avi)";
+ Text[ spanish ] = "Vídeo para Windows (*.avi)";
+ Text[ italian ] = "Video per Windows (*.avi)";
+ Text[ danish ] = "Video til Windows (*.avi)";
+ Text[ swedish ] = "Video för Windows (*.avi)";
+ Text[ polish ] = "Video dla Windows (*.avi)";
+ Text[ portuguese_brazilian ] = "Video for Windows (*.avi)";
+ Text[ japanese ] = "Video for Windows (*.avi)";
+ Text[ korean ] = "Video for Windows (*.avi)";
+ Text[ chinese_simplified ] = "Video for Windows (*.avi)";
+ Text[ chinese_traditional ] = "Video for Windows (*.avi)";
+ Text[ arabic ] = "ÝíÏíæ áÜ (*.avi) Windows";
+ Text[ turkish ] = "Video for Windows (*.avi)";
+};
+
+String STR_INSERT_VIDEO_EXTFILTER_MOV
+{
+ Text = "QuickTime Movie (*.mov)" ;
+ Text [ ENGLISH ] = "QuickTime Movie (*.mov)" ;
+ Text [ english_us ] = "QuickTime Movie (*.mov)" ;
+ Text[ portuguese ] = "QuickTime Movie (*.mov)";
+ Text[ russian ] = "QuickTime Movie (*.mov)";
+ Text[ greek ] = "QuickTime Movie (*.mov)";
+ Text[ dutch ] = "QuickTime Movie (*.mov)";
+ Text[ french ] = "QuickTime Movie (*.mov)";
+ Text[ spanish ] = "QuickTime Movie (*.mov)";
+ Text[ italian ] = "QuickTime Movie (*.mov)";
+ Text[ danish ] = "QuickTime Movie (*.mov)";
+ Text[ swedish ] = "QuickTime Movie (*.mov)";
+ Text[ polish ] = "QuickTime Movie (*.mov)";
+ Text[ portuguese_brazilian ] = "QuickTime Movie (*.mov)";
+ Text[ japanese ] = "QuickTime Movie (*.mov)";
+ Text[ korean ] = "QuickTime Movie (*.mov)";
+ Text[ chinese_simplified ] = "QuickTime Movie (*.mov)";
+ Text[ chinese_traditional ] = "QuickTime Movie (*.mov)";
+ Text[ arabic ] = "QuickTime Movie (*.mov)";
+ Text[ turkish ] = "QuickTime Movie (*.mov)";
+};
+
+String STR_INSERT_VIDEO_EXTFILTER_MPEG
+{
+ Text = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)" ;
+ Text [ ENGLISH ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)" ;
+ Text [ english_us ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)" ;
+ Text[ portuguese ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ russian ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ greek ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ dutch ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ french ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ spanish ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ italian ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ danish ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ swedish ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ polish ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ portuguese_brazilian ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ japanese ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ korean ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ chinese_simplified ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ chinese_traditional ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ arabic ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+ Text[ turkish ] = "MPEG - Motion Pictures Experts Group (*.mpe;*.mpeg;*.mpg)";
+};
+
+String STR_EXTFILTER_ALL
+{
+ Text = "<Alle>" ;
+ Text [ ENGLISH ] = "<All>" ;
+ Text [ english_us ] = "<All>" ;
+ Text[ portuguese ] = "<Todos>";
+ Text[ russian ] = "<Âñå>";
+ Text[ greek ] = "<¼ëá>";
+ Text[ dutch ] = "<Alle>";
+ Text[ french ] = "<Tous>";
+ Text[ spanish ] = "<Todos>";
+ Text[ italian ] = "<Tutti>";
+ Text[ danish ] = "<Alle>";
+ Text[ swedish ] = "<Alla>";
+ Text[ polish ] = "<Wszystkie>";
+ Text[ portuguese_brazilian ] = "<All>";
+ Text[ japanese ] = "<‚·‚ׂÄ>";
+ Text[ korean ] = "<¸ðµÎ>";
+ Text[ chinese_simplified ] = "<È«²¿l>";
+ Text[ chinese_traditional ] = "<¥þ³¡>";
+ Text[ arabic ] = "<Çáßá>";
+ Text[ turkish ] = "<Tümü>";
+};
+
+String STR_INSERT_SOUND_TITLE
+{
+ Text = "Klang einfügen" ;
+ Text [ ENGLISH ] = "Insert sound" ;
+ Text [ english_us ] = "Insert sound" ;
+ Text[ portuguese ] = "Inserir som";
+ Text[ russian ] = "Âñòàâèòü çâóê";
+ Text[ greek ] = "ÅéóáãùãÞ Þ÷ïõ";
+ Text[ dutch ] = "Geluid invoegen";
+ Text[ french ] = "Insérer un son";
+ Text[ spanish ] = "Insertar sonido";
+ Text[ italian ] = "Inserisci audio";
+ Text[ danish ] = "Indsæt lyd";
+ Text[ swedish ] = "Infoga ljud";
+ Text[ polish ] = "Wstaw dŸwiêk";
+ Text[ portuguese_brazilian ] = "Insert sound";
+ Text[ japanese ] = "»³ÝÄÞ‚Ì‘}“ü";
+ Text[ korean ] = "»ç¿îµå »ðÀÔ";
+ Text[ chinese_simplified ] = "²åÈëÉùÒô";
+ Text[ chinese_traditional ] = "´¡¤JÁn­µ";
+ Text[ arabic ] = "ÅÏÑÇÌ ÕæÊ";
+ Text[ turkish ] = "Ses ekle";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_INSERT_VIDEO_TITLE
+{
+ Text = "Video einfügen" ;
+ Text [ ENGLISH ] = "Insert video" ;
+ Text [ english_us ] = "Insert video" ;
+ Text[ portuguese ] = "Inserir vídeo";
+ Text[ russian ] = "Âñòàâèòü âèäåî";
+ Text[ greek ] = "ÅéóáãùãÞ Video";
+ Text[ dutch ] = "Video invoegen";
+ Text[ french ] = "Insérer une vidéo";
+ Text[ spanish ] = "Insertar vídeo";
+ Text[ italian ] = "Inserisci video";
+ Text[ danish ] = "Indsæt video";
+ Text[ swedish ] = "Infoga video";
+ Text[ polish ] = "Wstaw video";
+ Text[ portuguese_brazilian ] = "Insert video";
+ Text[ japanese ] = "ËÞÃÞµ‚Ì‘}“ü";
+ Text[ korean ] = "ºñµð¿À »ðÀÔ";
+ Text[ chinese_simplified ] = "²åÈë¼Ïó";
+ Text[ chinese_traditional ] = "´¡¤J¼vµø";
+ Text[ arabic ] = "ÅÏÑÇÌ ÝíÏíæ";
+ Text[ turkish ] = "Film ekle";
+};
+
+
+// BM: some additional standard colors
+
+String RID_SVXSTR_VIOLET
+{
+ Text = "Lila";
+ Text [ english_us ] = "Violet";
+ Text [ ENGLISH ] = "Violet";
+ Text[ portuguese ] = "Violeta";
+ Text[ russian ] = "Ôèîëåòîâûé";
+ Text[ greek ] = "Âéïëåôß";
+ Text[ dutch ] = "Lila";
+ Text[ french ] = "Violet";
+ Text[ spanish ] = "Violeta";
+ Text[ italian ] = "Lilla";
+ Text[ danish ] = "Lilla";
+ Text[ swedish ] = "Lila";
+ Text[ polish ] = "Filolet";
+ Text[ portuguese_brazilian ] = "Violet";
+ Text[ japanese ] = "Ž‡";
+ Text[ korean ] = "º¸¶ó»ö";
+ Text[ chinese_simplified ] = "×ÏÉ«";
+ Text[ chinese_traditional ] = "µµ¦â";
+ Text[ arabic ] = "ÈäÝÓÌí";
+ Text[ turkish ] = "Menekþe";
+};
+
+String RID_SVXSTR_BORDEAUX
+{
+ Text = "Bordeaux";
+ Text [ english_us ] = "Bordeaux";
+ Text [ ENGLISH ] = "Bordeaux";
+ Text[ portuguese ] = "Bordeaux";
+ Text[ russian ] = "Áîðäîâûé";
+ Text[ greek ] = "Ìðïñíôþ";
+ Text[ dutch ] = "Bordeaux";
+ Text[ french ] = "Bordeaux";
+ Text[ spanish ] = "Burdeos";
+ Text[ italian ] = "Bordeaux";
+ Text[ danish ] = "Bordeauxrød";
+ Text[ swedish ] = "Bordeaux";
+ Text[ polish ] = "Bordowy";
+ Text[ portuguese_brazilian ] = "Bordeaux";
+ Text[ japanese ] = "‚¦‚ñ‚¶";
+ Text[ korean ] = "º¸¸£µµ»ö";
+ Text[ chinese_simplified ] = "ÉîºìÉ«";
+ Text[ chinese_traditional ] = "²`¬õ¦â";
+ Text[ arabic ] = "ÃÍãÑ ÞÇäò";
+ Text[ turkish ] = "Bordo";
+};
+
+String RID_SVXSTR_PALE_YELLOW
+{
+ Text = "Blassgelb";
+ Text [ english_us ] = "Pale yellow";
+ Text [ ENGLISH ] = "Pale yellow";
+ Text[ portuguese ] = "Amarelo-claro";
+ Text[ russian ] = "Ñâåòëî-æåëòûé";
+ Text[ greek ] = "Ù÷ñü êßôñéíï";
+ Text[ dutch ] = "Geel pastel";
+ Text[ french ] = "Jaune pâle";
+ Text[ spanish ] = "Amarillo pastel";
+ Text[ italian ] = "Giallo chiaro";
+ Text[ danish ] = "Bleggul";
+ Text[ swedish ] = "Blekgul";
+ Text[ polish ] = "Blado¿ó³ty";
+ Text[ portuguese_brazilian ] = "Pale yellow";
+ Text[ japanese ] = "’W‰©F";
+ Text[ korean ] = "´ãȲ»ö";
+ Text[ chinese_simplified ] = "dz»ÆÉ«";
+ Text[ chinese_traditional ] = "²L¶À¦â";
+ Text[ arabic ] = "ÃÕÝÑ ÔÇÍÈ";
+ Text[ turkish ] = "Solgun sarý";
+};
+
+String RID_SVXSTR_PALE_GREEN
+{
+ Text = "Blassgrün";
+ Text [ english_us ] = "Pale green";
+ Text [ ENGLISH ] = "Pale green";
+ Text[ portuguese ] = "Verde-claro";
+ Text[ russian ] = "Ñâåòëî-çåëåíûé";
+ Text[ greek ] = "Ù÷ñü ðñÜóéíï";
+ Text[ dutch ] = "Groen pastel";
+ Text[ french ] = "Vert pâle";
+ Text[ spanish ] = "Verde pastel";
+ Text[ italian ] = "Verde chiaro";
+ Text[ danish ] = "Bleggrøn";
+ Text[ swedish ] = "Blekgrön";
+ Text[ polish ] = "Bladozielony";
+ Text[ portuguese_brazilian ] = "Pale green";
+ Text[ japanese ] = "’W—Î";
+ Text[ korean ] = "´ã³ì»ö";
+ Text[ chinese_simplified ] = "µ­ÂÌÉ«";
+ Text[ chinese_traditional ] = "²Lºñ¦â";
+ Text[ arabic ] = "ÃÎÖÑ ÔÇÍÈ";
+ Text[ turkish ] = "Solgun yeþil";
+};
+
+String RID_SVXSTR_DKVIOLET
+{
+ Text = "Dunkellila";
+ Text [ english_us ] = "Dark violet";
+ Text [ ENGLISH ] = "Dark violet";
+ Text[ portuguese ] = "Violeta escuro";
+ Text[ russian ] = "Òåìíî-ôèîëåòîâûé";
+ Text[ greek ] = "Óêïýñï âéïëåôß";
+ Text[ dutch ] = "Donker lila";
+ Text[ french ] = "Violet foncé";
+ Text[ spanish ] = "Violeta oscuro";
+ Text[ italian ] = "Lilla scuro";
+ Text[ danish ] = "Mørkelilla";
+ Text[ swedish ] = "Mörklila";
+ Text[ polish ] = "Ciemny filolet";
+ Text[ portuguese_brazilian ] = "Dark violet";
+ Text[ japanese ] = "”ZŽ‡";
+ Text[ korean ] = "Áøº¸¶ó»ö";
+ Text[ chinese_simplified ] = "Éî×ÏÉ«";
+ Text[ chinese_traditional ] = "²`µµ¦â";
+ Text[ arabic ] = "ÈäÝÓÌí ÛÇãÞ";
+ Text[ turkish ] = "Koyu lila";
+};
+
+String RID_SVXSTR_SALMON
+{
+ Text = "Lachs";
+ Text [ english_us ] = "Salmon";
+ Text [ ENGLISH ] = "Salmon";
+ Text[ portuguese ] = "Salmão";
+ Text[ russian ] = "Àëûé";
+ Text[ greek ] = "Óïëïìüò";
+ Text[ dutch ] = "Zalmkleur";
+ Text[ french ] = "Saumon";
+ Text[ spanish ] = "Salmón";
+ Text[ italian ] = "Salmone";
+ Text[ danish ] = "Laksefarvet";
+ Text[ swedish ] = "Lax";
+ Text[ polish ] = "£ososiowy";
+ Text[ portuguese_brazilian ] = "Salmon";
+ Text[ japanese ] = "»°ÓÝËßݸ";
+ Text[ korean ] = "¿¬¾î »ì»ö";
+ Text[ chinese_simplified ] = "³ÈºìÉ«";
+ Text[ chinese_traditional ] = "¾í¬õ¦â";
+ Text[ arabic ] = "ÞÑäÝáí";
+ Text[ turkish ] = "Somon";
+};
+
+String RID_SVXSTR_SEABLUE
+{
+ Text = "Seeblau";
+ Text [ english_us ] = "Sea blue";
+ Text [ ENGLISH ] = "Sea blue";
+ Text[ portuguese ] = "Azul marinho";
+ Text[ russian ] = "Ìîðñêàÿ âîëíà";
+ Text[ greek ] = "ÃáëÜæéï";
+ Text[ dutch ] = "Zeeblauw";
+ Text[ french ] = "Azur";
+ Text[ spanish ] = "Azul marino";
+ Text[ italian ] = "Blu mare";
+ Text[ danish ] = "Azurblå";
+ Text[ swedish ] = "Havsblå";
+ Text[ polish ] = "Lazurowy";
+ Text[ portuguese_brazilian ] = "Sea blue";
+ Text[ japanese ] = "ŠC‚ÌÂ";
+ Text[ korean ] = "½Éû»ö";
+ Text[ chinese_simplified ] = "ºþÀ¶É«";
+ Text[ chinese_traditional ] = "®ü¤ôÂÅ";
+ Text[ arabic ] = "ÃÒÑÞ äíáí";
+ Text[ turkish ] = "Deniz mavisi";
+};
+
+String RID_SVXSTR_COLOR_SUN
+{
+ // attention: this is the color string for the Sun Microsystems specific colors !!!
+ Text = "Sun";
+ Text [ english_us ] = "Sun";
+ Text [ ENGLISH ] = "Sun";
+ Text [ dutch ] = "Sun" ;
+ Text [ english_us ] = "Sun" ;
+ Text [ italian ] = "Sun" ;
+ Text [ spanish ] = "Sun" ;
+ Text [ french ] = "Sun" ;
+ Text [ swedish ] = "Sun" ;
+ Text [ danish ] = "Sun" ;
+ Text [ portuguese ] = "Sun" ;
+ Text [ portuguese_brazilian ] = "Sun" ;
+ Text [ polish ] = "Sun";
+ Text[ russian ] = "Sun";
+ Text[ greek ] = "Sun";
+ Text[ japanese ] = "Sun";
+ Text[ korean ] = "Sun";
+ Text[ chinese_simplified ] = "Sun";
+ Text[ chinese_traditional ] = "¶§¬õ¦â";
+ Text[ arabic ] = "Sun";
+ Text[ turkish ] = "Sun";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_SVXSTR_TBLAFMT_3D
+{
+ Text = "3D";
+ Text [ ENGLISH ] = "3D";
+ Text[ english_us ] = "3D";
+ Text[ portuguese ] = "3D";
+ Text[ russian ] = "3-Ì";
+ Text[ greek ] = "3Ä";
+ Text[ dutch ] = "3D";
+ Text[ french ] = "3D";
+ Text[ spanish ] = "3D";
+ Text[ italian ] = "3D";
+ Text[ danish ] = "3D";
+ Text[ swedish ] = "3D";
+ Text[ polish ] = "3-W";
+ Text[ portuguese_brazilian ] = "3D";
+ Text[ japanese ] = "3D";
+ Text[ korean ] = "3D";
+ Text[ chinese_simplified ] = "3 ά";
+ Text[ chinese_traditional ] = "3 ·L";
+ Text[ arabic ] = "ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_TBLAFMT_BLACK1
+{
+ Text = "Schwarz 1";
+ Text [ ENGLISH ] = "Black 1";
+ Text[ english_us ] = "Black 1";
+ Text[ portuguese ] = "Preto 1";
+ Text[ russian ] = "×åðíûé 1";
+ Text[ greek ] = "Ìáýñï 1";
+ Text[ dutch ] = "Zwart 1";
+ Text[ french ] = "Noir 1";
+ Text[ spanish ] = "Negro 1";
+ Text[ italian ] = "Nero 1";
+ Text[ danish ] = "Sort 1";
+ Text[ swedish ] = "Svart 1";
+ Text[ polish ] = "Czarny 1";
+ Text[ portuguese_brazilian ] = "Black 1";
+ Text[ japanese ] = "• 1";
+ Text[ korean ] = "°ËÀº»ö 1";
+ Text[ chinese_simplified ] = "ºÚÉ« 1";
+ Text[ chinese_traditional ] = "¶Â¦â 1";
+ Text[ arabic ] = "ÃÓæÏ 1";
+ Text[ turkish ] = "Siyah 1";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_TBLAFMT_BLACK2
+{
+ Text = "Schwarz 2";
+ Text [ ENGLISH ] = "Black 2";
+ Text[ english_us ] = "Black 2";
+ Text[ portuguese ] = "Preto 2";
+ Text[ russian ] = "×åðíûé 2";
+ Text[ greek ] = "Ìáýñï 2";
+ Text[ dutch ] = "Zwart 2";
+ Text[ french ] = "Noir 2";
+ Text[ spanish ] = "Negro 2";
+ Text[ italian ] = "Nero 2";
+ Text[ danish ] = "Sort 2";
+ Text[ swedish ] = "Svart 2";
+ Text[ polish ] = "Czarny 2";
+ Text[ portuguese_brazilian ] = "Black 2";
+ Text[ japanese ] = "• 2";
+ Text[ korean ] = "°ËÀº»ö 2";
+ Text[ chinese_simplified ] = "ºÚÉ« 2";
+ Text[ chinese_traditional ] = "¶Â¦â 2";
+ Text[ arabic ] = "ÃÓæÏ 2";
+ Text[ turkish ] = "Siyah 2";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_TBLAFMT_BLUE
+{
+ Text = "Blau";
+ Text [ ENGLISH ] = "Blue";
+ Text[ english_us ] = "Blue";
+ Text[ portuguese ] = "Azul";
+ Text[ russian ] = "Ñèíèé";
+ Text[ greek ] = "Ìðëå";
+ Text[ dutch ] = "Blauw";
+ Text[ french ] = "Bleu";
+ Text[ spanish ] = "Azul";
+ Text[ italian ] = "Blu";
+ Text[ danish ] = "Blå";
+ Text[ swedish ] = "Blått";
+ Text[ polish ] = "Niebieski";
+ Text[ portuguese_brazilian ] = "Blue";
+ Text[ japanese ] = "Â";
+ Text[ korean ] = "û»ö";
+ Text[ chinese_simplified ] = "À¶É«";
+ Text[ chinese_traditional ] = "ÂŦâ";
+ Text[ arabic ] = "ÃÒÑÞ";
+ Text[ turkish ] = "Mavi";
+};
+String RID_SVXSTR_TBLAFMT_BROWN
+{
+ Text = "Braun";
+ Text [ ENGLISH ] = "Brown";
+ Text[ english_us ] = "Brown";
+ Text[ portuguese ] = "Castanho";
+ Text[ russian ] = "Êîðè÷íåâûé";
+ Text[ greek ] = "ÊáöÝ";
+ Text[ dutch ] = "Bruin";
+ Text[ french ] = "Marron";
+ Text[ spanish ] = "Marrón";
+ Text[ italian ] = "Marrone";
+ Text[ danish ] = "Brun";
+ Text[ swedish ] = "Brunt";
+ Text[ polish ] = "Br¹zowy";
+ Text[ portuguese_brazilian ] = "Brown";
+ Text[ japanese ] = "’ƒF";
+ Text[ korean ] = "°¥»ö";
+ Text[ chinese_simplified ] = "×ØÉ«";
+ Text[ chinese_traditional ] = "´Ä¦â";
+ Text[ arabic ] = "Èäí";
+ Text[ turkish ] = "Kahverengi";
+};
+String RID_SVXSTR_TBLAFMT_CURRENCY
+{
+ Text = "Währung";
+ Text [ ENGLISH ] = "Currency";
+ Text[ english_us ] = "Currency";
+ Text[ portuguese ] = "Moeda";
+ Text[ russian ] = "Âàëþòà";
+ Text[ greek ] = "Íüìéóìá";
+ Text[ dutch ] = "Valuta";
+ Text[ french ] = "Monnaie";
+ Text[ spanish ] = "Moneda";
+ Text[ italian ] = "Valuta";
+ Text[ danish ] = "Valuta";
+ Text[ swedish ] = "Valuta";
+ Text[ polish ] = "Waluta";
+ Text[ portuguese_brazilian ] = "Currency";
+ Text[ japanese ] = "’ʉÝ";
+ Text[ korean ] = "ÅëÈ­";
+ Text[ chinese_simplified ] = "»õ±Ò";
+ Text[ chinese_traditional ] = "³f¹ô";
+ Text[ arabic ] = "ÇáÚãáÉ";
+ Text[ turkish ] = "Para birimi";
+};
+String RID_SVXSTR_TBLAFMT_CURRENCY_3D
+{
+ Text = "Währung 3D";
+ Text [ ENGLISH ] = "Currency 3D";
+ Text[ english_us ] = "Currency 3D";
+ Text[ portuguese ] = "Moeda 3D";
+ Text[ russian ] = "Âàëþòà 3-Ì";
+ Text[ greek ] = "Íüìéóìá 3Ä";
+ Text[ dutch ] = "Valuta 3D";
+ Text[ french ] = "Monnaie 3D";
+ Text[ spanish ] = "Moneda 3D";
+ Text[ italian ] = "Valuta 3D";
+ Text[ danish ] = "Valuta 3D";
+ Text[ swedish ] = "Valuta 3D";
+ Text[ polish ] = "Waluta 3-W";
+ Text[ portuguese_brazilian ] = "Currency 3D";
+ Text[ japanese ] = "’Ê‰Ý 3D";
+ Text[ korean ] = "ÅëÈ­ 3D";
+ Text[ chinese_simplified ] = "»õ±Ò 3 ά";
+ Text[ chinese_traditional ] = "³f¹ô 3 ºû";
+ Text[ arabic ] = "ÚãáÉ ËáÇËíÉ ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "Para birimi 3B";
+};
+String RID_SVXSTR_TBLAFMT_CURRENCY_GRAY
+{
+ Text = "Währung Grau";
+ Text [ ENGLISH ] = "Currency Gray";
+ Text[ english_us ] = "Currency Gray";
+ Text[ portuguese ] = "Moeda em cinzento";
+ Text[ russian ] = "Âàëþòà ñåðàÿ";
+ Text[ greek ] = "Íüìéóìá Ãêñé";
+ Text[ dutch ] = "Valuta grijs";
+ Text[ french ] = "Monnaie grise";
+ Text[ spanish ] = "Moneda gris";
+ Text[ italian ] = "Valuta grigio";
+ Text[ danish ] = "Valuta grå";
+ Text[ swedish ] = "Valuta grått";
+ Text[ polish ] = "Waluta Szara";
+ Text[ portuguese_brazilian ] = "Currency Gray";
+ Text[ japanese ] = "’Ê‰Ý ŠDF";
+ Text[ korean ] = "ÅëÈ­ ȸ»ö";
+ Text[ chinese_simplified ] = "»õ±Ò »ÒÉ«";
+ Text[ chinese_traditional ] = "³f¹ô ¦Ç¦â";
+ Text[ arabic ] = "ÚãáÉ ÑãÇÏíÉ";
+ Text[ turkish ] = "Para birimi gri";
+};
+String RID_SVXSTR_TBLAFMT_CURRENCY_LAVENDER
+{
+ Text = "Währung Flieder";
+ Text [ ENGLISH ] = "Currency Lavender";
+ Text[ english_us ] = "Currency Lavender";
+ Text[ portuguese ] = "Moeda em lilás";
+ Text[ russian ] = "Âàëþòà ôèîëåòîâàÿ";
+ Text[ greek ] = "Íüìéóìá ëåâÜíôá";
+ Text[ dutch ] = "Valuta lavendel";
+ Text[ french ] = "Monnaie lavande";
+ Text[ spanish ] = "Moneda lavanda";
+ Text[ italian ] = "Valuta lavanda";
+ Text[ danish ] = "Valuta lysviolet";
+ Text[ swedish ] = "Valuta syrenlila";
+ Text[ polish ] = "Waluta Fioletowa";
+ Text[ portuguese_brazilian ] = "Currency Lavender";
+ Text[ japanese ] = "’Ê‰Ý ×ÍÞÝÀÞ°";
+ Text[ korean ] = "ÅëÈ­ ´ãÀÚ»ö";
+ Text[ chinese_simplified ] = "»õ±Ò µ­×ÏÉ«";
+ Text[ chinese_traditional ] = "³f¹ô ²Hµµ¦â";
+ Text[ arabic ] = "ÚãáÉ ÃÑÌæÇäíÉ ÝÇÊÍ";
+ Text[ turkish ] = "Para birimi eflatun";
+};
+String RID_SVXSTR_TBLAFMT_CURRENCY_TURQUOISE
+{
+ Text = "Währung Türkis";
+ Text [ ENGLISH ] = "Currency Turquoise";
+ Text[ english_us ] = "Currency Turquoise";
+ Text[ portuguese ] = "Moeda em turquesa";
+ Text[ russian ] = "Âàëþòà áèðþçîâàÿ";
+ Text[ greek ] = "Íüìéóìá ôïõñêïõÜæ";
+ Text[ dutch ] = "Valuta turkoois";
+ Text[ french ] = "Monnaie turquoise";
+ Text[ spanish ] = "Moneda turquesa";
+ Text[ italian ] = "Valuta turchese";
+ Text[ danish ] = "Valuta turkis";
+ Text[ swedish ] = "Valuta turkost";
+ Text[ polish ] = "Waluta Turkusowa";
+ Text[ portuguese_brazilian ] = "Currency Turquoise";
+ Text[ japanese ] = "’Ê‰Ý Â—Î";
+ Text[ korean ] = "ÅëÈ­ û¿Á»ö";
+ Text[ chinese_simplified ] = "»õ±Ò À¶ÓñÉ«";
+ Text[ chinese_traditional ] = "³f¹ô Âťɦâ";
+ Text[ arabic ] = "ÚãáÉ ÊÑßæÇÒ";
+ Text[ turkish ] = "Para birimi türkuaz";
+};
+String RID_SVXSTR_TBLAFMT_GRAY
+{
+ Text = "Grau";
+ Text [ ENGLISH ] = "Gray";
+ Text[ english_us ] = "Gray";
+ Text[ portuguese ] = "Cinzento";
+ Text[ russian ] = "Ñåðûé";
+ Text[ greek ] = "Ãêñé";
+ Text[ dutch ] = "Grijs";
+ Text[ french ] = "Gris";
+ Text[ spanish ] = "Gris";
+ Text[ italian ] = "Grigio";
+ Text[ danish ] = "Grå";
+ Text[ swedish ] = "Grått";
+ Text[ polish ] = "Szary";
+ Text[ portuguese_brazilian ] = "Gray";
+ Text[ japanese ] = "ŠDF";
+ Text[ korean ] = "ȸ»ö";
+ Text[ chinese_simplified ] = "»ÒÉ«";
+ Text[ chinese_traditional ] = "¦Ç¦â";
+ Text[ arabic ] = "ÑãÇÏí";
+ Text[ turkish ] = "Gri";
+};
+String RID_SVXSTR_TBLAFMT_GREEN
+{
+ Text = "Grün";
+ Text [ ENGLISH ] = "Green";
+ Text[ english_us ] = "Green";
+ Text[ portuguese ] = "Verde";
+ Text[ russian ] = "Çåëåíûé";
+ Text[ greek ] = "ÐñÜóéíï";
+ Text[ dutch ] = "Groen";
+ Text[ french ] = "Vert";
+ Text[ spanish ] = "Verde";
+ Text[ italian ] = "Verde";
+ Text[ danish ] = "Grøn";
+ Text[ swedish ] = "Grönt";
+ Text[ polish ] = "Zielony";
+ Text[ portuguese_brazilian ] = "Green";
+ Text[ japanese ] = "—Î";
+ Text[ korean ] = "³ì»ö";
+ Text[ chinese_simplified ] = "ÂÌÉ«";
+ Text[ chinese_traditional ] = "ºñ¦â";
+ Text[ arabic ] = "ÃÎÖÑ";
+ Text[ turkish ] = "Yeþil";
+};
+String RID_SVXSTR_TBLAFMT_LAVENDER
+{
+ Text = "Flieder";
+ Text [ ENGLISH ] = "Lavender";
+ Text[ english_us ] = "Lavender";
+ Text[ portuguese ] = "Lilás";
+ Text[ russian ] = "Ôèîëåòîâûé";
+ Text[ greek ] = "ËåâÜíôá";
+ Text[ dutch ] = "Bordeaux";
+ Text[ french ] = "Lavande";
+ Text[ spanish ] = "Lavanda";
+ Text[ italian ] = "Lavanda";
+ Text[ danish ] = "Lysviolet";
+ Text[ swedish ] = "Syrenlila";
+ Text[ polish ] = "Fioletowy";
+ Text[ portuguese_brazilian ] = "Lavender";
+ Text[ japanese ] = "×ÍÞÝÀÞ°";
+ Text[ korean ] = "´ãÀÚ»ö";
+ Text[ chinese_simplified ] = "µ­×ÏÉ«";
+ Text[ chinese_traditional ] = "²Hµµ¦â";
+ Text[ arabic ] = "ÃÑÌæÇäí ÝÇÊÍ";
+ Text[ turkish ] = "Eflatun";
+};
+String RID_SVXSTR_TBLAFMT_RED
+{
+ Text = "Rot";
+ Text [ ENGLISH ] = "Red";
+ Text[ english_us ] = "Red";
+ Text[ portuguese ] = "Vermelho";
+ Text[ russian ] = "Êðàñíûé";
+ Text[ greek ] = "Êüêêéíï";
+ Text[ dutch ] = "Rood";
+ Text[ french ] = "Rouge";
+ Text[ spanish ] = "Rojo";
+ Text[ italian ] = "Rosso";
+ Text[ danish ] = "Rød";
+ Text[ swedish ] = "Rött";
+ Text[ polish ] = "Czerwony";
+ Text[ portuguese_brazilian ] = "Red";
+ Text[ japanese ] = "Ô";
+ Text[ korean ] = "Àû»ö";
+ Text[ chinese_simplified ] = "ºìÉ«";
+ Text[ chinese_traditional ] = "¬õ¦â";
+ Text[ arabic ] = "ÃÍãÑ";
+ Text[ turkish ] = "Kýrmýzý";
+};
+String RID_SVXSTR_TBLAFMT_TURQUOISE
+{
+ Text = "Türkis";
+ Text [ ENGLISH ] = "Turquoise";
+ Text[ english_us ] = "Turquoise";
+ Text[ portuguese ] = "Turquesa";
+ Text[ russian ] = "Áèðþçîâûé";
+ Text[ greek ] = "ÔïõñêïõÜæ";
+ Text[ dutch ] = "Turkoois";
+ Text[ french ] = "Turquoise";
+ Text[ spanish ] = "Turquesa";
+ Text[ italian ] = "Turchese";
+ Text[ danish ] = "Turkis";
+ Text[ swedish ] = "Turkost";
+ Text[ polish ] = "Turkusowy";
+ Text[ portuguese_brazilian ] = "Turquoise";
+ Text[ japanese ] = "—Î";
+ Text[ korean ] = "û¿Á»ö";
+ Text[ chinese_simplified ] = "À¶ÓñÉ«";
+ Text[ chinese_traditional ] = "Âťɦâ";
+ Text[ arabic ] = "ÊÑßæÇÒ";
+ Text[ turkish ] = "Türkuaz";
+};
+String RID_SVXSTR_TBLAFMT_YELLOW
+{
+ Text = "Gelb";
+ Text [ ENGLISH ] = "Yellow";
+ Text[ english_us ] = "Yellow";
+ Text[ portuguese ] = "Amarelo";
+ Text[ russian ] = "Æåëòûé";
+ Text[ greek ] = "Êßôñéíï";
+ Text[ dutch ] = "Geel";
+ Text[ french ] = "Jaune";
+ Text[ spanish ] = "Amarillo";
+ Text[ italian ] = "Giallo";
+ Text[ danish ] = "Gul";
+ Text[ swedish ] = "Gult";
+ Text[ polish ] = "¯ó³ty";
+ Text[ portuguese_brazilian ] = "Yellow";
+ Text[ japanese ] = "‰©F";
+ Text[ korean ] = "Ȳ»ö";
+ Text[ chinese_simplified ] = "»ÆÉ«";
+ Text[ chinese_traditional ] = "¶À¦â";
+ Text[ arabic ] = "ÃÕÝÑ";
+ Text[ turkish ] = "Sarý";
+};
+
+String RID_SVXSTR_LINEJOINT_MIDDLE
+{
+ Text = "Linienübergang gemittelt";
+ Text[ ENGLISH ] = "Line joint middle";
+ Text[ english_us ] = "Line joint averaged";
+ Text[ portuguese ] = "Junção de linhas; mediana";
+ Text[ russian ] = "Öåíòðèðîâàííûé ïåðåõîä ëèíèè";
+ Text[ greek ] = "ÃñáììÞ ìåôÜâáóçò (ìÝóïò üñïò)";
+ Text[ dutch ] = "Samenkomende lijnen, gemiddelde";
+ Text[ french ] = "Jointure de lignes, moyennée";
+ Text[ spanish ] = "Juntas de línea, media";
+ Text[ italian ] = "Giuntura, media";
+ Text[ danish ] = "Linjeovergang, middelværdi";
+ Text[ swedish ] = "Linjeövergång, medelvärde";
+ Text[ polish ] = "Wyœrodkowane po³¹czenie linii";
+ Text[ portuguese_brazilian ] = "Line joint middle";
+ Text[ japanese ] = "ü‚ÌŒp‚¬–Ú ‹Ï•ª";
+ Text[ korean ] = "¼± ÀÌÀ½ Áß°£";
+ Text[ chinese_simplified ] = "ƽ¾ùÖµÐÍÏßÌõ½ÓºÏ";
+ Text[ chinese_traditional ] = "¥­§¡­È«¬½u±ø±µ¦X";
+ Text[ arabic ] = "æÕáÉ ÎØæØ ãÊæÓØÉ";
+ Text[ turkish ] = "Ortalanmýþ çizgi geçiþi";
+};
+String RID_SVXSTR_LINEJOINT_BEVEL
+{
+ Text = "Linienübergang verbunden";
+ Text[ ENGLISH ] = "Line joint bevel";
+ Text[ english_us ] = "Line joint bevel";
+ Text[ portuguese ] = "Junção de linhas, conjugada";
+ Text[ russian ] = "Íàêëîííûé ïåðåõîä ëèíèè";
+ Text[ greek ] = "ÃñáììÞ ìåôÜâáóçò (óýíäåóç)";
+ Text[ dutch ] = "Samenkomende lijnen, verbonden";
+ Text[ french ] = "Jointure de lignes, conjuguée";
+ Text[ spanish ] = "Junta de líneas unida";
+ Text[ italian ] = "Giuntura, unita";
+ Text[ danish ] = "Linjeovergang, forbundet";
+ Text[ swedish ] = "Linjeövergång, förbunden";
+ Text[ polish ] = "Powi¹zane po³¹czenie linii";
+ Text[ portuguese_brazilian ] = "Line joint bevel";
+ Text[ japanese ] = "ü‚ÌŒp‚¬–Ú ŽÎŠp";
+ Text[ korean ] = "¼± ÀÌÀ½, Çϳª·Î ¿¬°á";
+ Text[ chinese_simplified ] = "Áª½áÐÍÏßÌõ½ÓºÏ";
+ Text[ chinese_traditional ] = "Ápµ²«¬½u±ø±µ¦X";
+ Text[ arabic ] = "æÕáÉ ÎØæØ ãÊÕáÉ";
+ Text[ turkish ] = "Birleþtirilmiþ çizgi geçiþi";
+};
+String RID_SVXSTR_LINEJOINT_MITER
+{
+ Text = "Linienübergang geschnitten";
+ Text[ ENGLISH ] = "Line joint miter";
+ Text[ english_us ] = "Line joint miter";
+ Text[ portuguese ] = "Junção de linhas, secante";
+ Text[ russian ] = "Óêîðî÷åííûé ïåðåõîä ëèíèè";
+ Text[ greek ] = "ÃñáììÞ ìåôÜâáóçò (ôïìÞ)";
+ Text[ dutch ] = "Samenkomende lijnen, snijdend";
+ Text[ french ] = "Jointure de lignes, sécante";
+ Text[ spanish ] = "Junta de líneas cortada";
+ Text[ italian ] = "Giuntura, secante";
+ Text[ danish ] = "Linjeovergang, skåret";
+ Text[ swedish ] = "Linjeövergång, klippt";
+ Text[ polish ] = "Przeciête po³¹czenie linii";
+ Text[ portuguese_brazilian ] = "Line joint miter";
+ Text[ japanese ] = "ü‚ÌŒp‚¬–Ú Œð·";
+ Text[ korean ] = "¼± ÀÌÀ½, Á÷°¢À¸·Î ¿¬°á";
+ Text[ chinese_simplified ] = "¼ô½ÓÐÍÏßÌõ½ÓºÏ";
+ Text[ chinese_traditional ] = "°Å±µ«¬½u±ø±µ¦X";
+ Text[ arabic ] = "æÕáÉ ÎØæØ ãÊÞÇØÚÉ";
+ Text[ turkish ] = "Çizgi kesiþme noktasý";
+};
+String RID_SVXSTR_LINEJOINT_ROUND
+{
+ Text = "Linienübergang rund";
+ Text[ ENGLISH ] = "Line joint round";
+ Text[ english_us ] = "Line joint round";
+ Text[ portuguese ] = "Junção de linhas, redonda";
+ Text[ russian ] = "Çàêðóãëåííûé ïåðåõîä ëèíèè";
+ Text[ greek ] = "ÃñáììÞ ìåôÜâáóçò (óôñüããõëá)";
+ Text[ dutch ] = "Samenkomende lijnen, rond";
+ Text[ french ] = "Jointure de lignes, ronde";
+ Text[ spanish ] = "Junta de líneas redonda";
+ Text[ italian ] = "Giuntura, rotonda";
+ Text[ danish ] = "Linjeovergang, rund";
+ Text[ swedish ] = "Linjeövergång, rund";
+ Text[ polish ] = "Okr¹g³e po³¹czenie linii";
+ Text[ portuguese_brazilian ] = "Line joint round";
+ Text[ japanese ] = "ü‚ÌŒp‚¬–Ú ŠÛ‚­";
+ Text[ korean ] = "¼± ÀÌÀ½, µÕ±Û°Ô";
+ Text[ chinese_simplified ] = "Ô²ÐÎÏßÌõ½ÓºÏ";
+ Text[ chinese_traditional ] = "¶ê§Î½u±ø±µ¦X";
+ Text[ arabic ] = "æÕáÉ ÎØæØ¡ ÏÇÆÑíÉ";
+ Text[ turkish ] = "Yuvarlak çizgi geçiþi";
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Reference-strings for standardcolor-table
+//
+
+/* nicht uebersetzen */
+String RID_SVXSTR_BLACK_DEF
+{
+ Text = "Black" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BLUE_DEF
+{
+ Text = "Blue" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GREEN_DEF
+{
+ Text = "Green" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_CYAN_DEF
+{
+ Text = "Turquoise" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_RED_DEF
+{
+ Text = "Red" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_MAGENTA_DEF
+{
+ Text = "Magenta" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BROWN_DEF
+{
+ Text = "Brown" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GREY_DEF
+{
+ Text = "Gray" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LIGHTGREY_DEF
+{
+ Text = "Light gray" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LIGHTBLUE_DEF
+{
+ Text = "Light blue" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LIGHTGREEN_DEF
+{
+ Text = "Light green" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LIGHTCYAN_DEF
+{
+ Text = "Light cyan" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LIGHTRED_DEF
+{
+ Text = "Light red" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LIGHTMAGENTA_DEF
+{
+ Text = "Light magenta" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_YELLOW_DEF
+{
+ Text = "Yellow" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_WHITE_DEF
+{
+ Text = "White" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BLUEGREY_DEF
+{
+ Text = "Blue gray" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_ORANGE_DEF
+{
+ Text = "Orange" ;
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_VIOLET_DEF
+{
+ Text = "Violet";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BORDEAUX_DEF
+{
+ Text = "Bordeaux";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_PALE_YELLOW_DEF
+{
+ Text = "Pale yellow";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_PALE_GREEN_DEF
+{
+ Text = "Pale green";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DKVIOLET_DEF
+{
+ Text = "Dark violet";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_SALMON_DEF
+{
+ Text = "Salmon";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_SEABLUE_DEF
+{
+ Text = "Sea blue";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_COLOR_SUN_DEF
+{
+ // attention: this is the color string for the Sun Microsystems specific colors !!!
+ Text = "Sun";
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Reference-strings for standard-gradient-table
+//
+
+/* nicht uebersetzen */
+String RID_SVXSTR_GRDT0_DEF
+{
+ Text = "Gradient";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GRDT1_DEF
+{
+ Text = "Linear blue/white";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GRDT2_DEF
+{
+ Text = "Linear magenta/green";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GRDT3_DEF
+{
+ Text = "Linear yellow/brown";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GRDT4_DEF
+{
+ Text = "Radial green/black";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GRDT5_DEF
+{
+ Text = "Radial red/yellow";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GRDT6_DEF
+{
+ Text = "Rectangular red/white";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GRDT7_DEF
+{
+ Text = "Square yellow/white";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GRDT8_DEF
+{
+ Text = "Ellipsoid blue grey/light blue";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_GRDT9_DEF
+{
+ Text = "Axial light red/white";
+};
+
+String RID_SVXSTR_GRDT0
+{
+ Text = "Farbverlauf";
+ Text [ ENGLISH ] = "Gradient";
+ Text[ english_us ] = "Gradient";
+ Text[ portuguese ] = "Gradação";
+ Text[ russian ] = "Ãðàäèåíòíàÿ";
+ Text[ greek ] = "ÄéáâÜèìéóç ÷ñþìáôïò";
+ Text[ dutch ] = "Kleurverloop";
+ Text[ french ] = "Dégradé";
+ Text[ spanish ] = "Gradiente";
+ Text[ italian ] = "Sfumatura";
+ Text[ danish ] = "Farvegraduering";
+ Text[ swedish ] = "Färggradient";
+ Text[ polish ] = "Gradient";
+ Text[ portuguese_brazilian ] = "Gradient";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý";
+ Text[ korean ] = "±×¶óµ¥À̼Ç";
+ Text[ chinese_simplified ] = "²Êɫͼ°¸";
+ Text[ chinese_traditional ] = "±m¦â¹Ï®×";
+ Text[ arabic ] = "ÊÏÑÌ Çááæä";
+ Text[ turkish ] = "Gradyan";
+};
+String RID_SVXSTR_GRDT1
+{
+ Text = "Linear Blau/weiß";
+ Text [ ENGLISH ] = "Linear blue/white";
+ Text[ english_us ] = "Linear blue/white";
+ Text[ portuguese ] = "Linear azul/branco";
+ Text[ russian ] = "Ëèíåéíàÿ: ñèíèé/áåëûé";
+ Text[ greek ] = "ÃñáììéêÜ ìðëÝ/ëåõêü";
+ Text[ dutch ] = "Lineair blauw/wit";
+ Text[ french ] = "Linéaire bleu/blanc";
+ Text[ spanish ] = "Lineal azul/blanco";
+ Text[ italian ] = "Lineare blu/bianco";
+ Text[ danish ] = "Lineær blå/hvid";
+ Text[ swedish ] = "Linjär blått/vitt";
+ Text[ polish ] = "Linearny niebieski/bia³y";
+ Text[ portuguese_brazilian ] = "Linear blue/white";
+ Text[ japanese ] = "üó Â/”’";
+ Text[ korean ] = "¼±Çü û»ö/Èò»ö";
+ Text[ chinese_simplified ] = "ÏßÐÔ À¶/°×";
+ Text[ chinese_traditional ] = "½u±øÂÅ/¥Õ";
+ Text[ arabic ] = "ÎØí ÃÒÑÞ/ÃÈíÖ";
+ Text[ turkish ] = "Doðrusal mavi/beyaz";
+};
+String RID_SVXSTR_GRDT2
+{
+ Text = "Linear violett/grün";
+ Text [ ENGLISH ] = "Linear magenta/green";
+ Text[ english_us ] = "Linear magenta/green";
+ Text[ portuguese ] = "Linear violeta/verde";
+ Text[ russian ] = "Ëèíåéíàÿ: ôèîëåòîâûé/çåëåíûé";
+ Text[ greek ] = "ÃñáììéêÜ ìáôæÝí./ðñÜóéíï";
+ Text[ dutch ] = "Lineair violet/groen";
+ Text[ french ] = "Linéaire violet/vert";
+ Text[ spanish ] = "Lineal magenta/verde";
+ Text[ italian ] = "Lineare magenta/verde";
+ Text[ danish ] = "Lineær violet/grøn";
+ Text[ swedish ] = "Linjär violett/grönt";
+ Text[ polish ] = "Linearny fioletowy/zielony";
+ Text[ portuguese_brazilian ] = "Linear magenta/green";
+ Text[ japanese ] = "üó Ž‡/—Î";
+ Text[ korean ] = "¼±Çü º¸¶ó»ö/³ì»ö";
+ Text[ chinese_simplified ] = "ÏßÐÔ ×Ï/ÂÌ";
+ Text[ chinese_traditional ] = "½u±ø¬õµµ¦â/ºñ¦â";
+ Text[ arabic ] = "ÎØí ÃÑÌæÇäí/ÃÎÖÑ";
+ Text[ turkish ] = "Doðrusal menekþe/yeþil";
+};
+String RID_SVXSTR_GRDT3
+{
+ Text = "Linear gelb/braun";
+ Text [ ENGLISH ] = "Linear yellow/brown";
+ Text[ english_us ] = "Linear yellow/brown";
+ Text[ portuguese ] = "Linear amarelo/castanho";
+ Text[ russian ] = "Ëèíåéíàÿ: æåëòûé/êîðè÷íåâûé";
+ Text[ greek ] = "ÃñáììéêÜ êßôñéíï/êáöÝ";
+ Text[ dutch ] = "Lineair geel/bruin";
+ Text[ french ] = "Linéaire jaune/marron";
+ Text[ spanish ] = "Lineal amarillo/marrón";
+ Text[ italian ] = "Lineare giallo/marrone";
+ Text[ danish ] = "Lineær gul/brun";
+ Text[ swedish ] = "Linjär gult/brunt";
+ Text[ polish ] = "Linearny ¿ó³ty/br¹zowy";
+ Text[ portuguese_brazilian ] = "Linear yellow/brown";
+ Text[ japanese ] = "üó ‰©F/’ƒF";
+ Text[ korean ] = "¼±Çü Ȳ»ö/°¥»ö";
+ Text[ chinese_simplified ] = "ÏßÐÔ »Æ/×ØÉ«";
+ Text[ chinese_traditional ] = "½u±ø¶À¦â/´Ä¦â";
+ Text[ arabic ] = "ÎØí ÃÕÝÑ/Èäí";
+ Text[ turkish ] = "Doðrusal sarý/kahverengi";
+};
+String RID_SVXSTR_GRDT4
+{
+ Text = "Radial grün/schwarz";
+ Text [ ENGLISH ] = "Radial green/black";
+ Text[ english_us ] = "Radial green/black";
+ Text[ portuguese ] = "Radial verde/preto";
+ Text[ russian ] = "Êðóãîâàÿ: çåëåíûé/÷åðíûé";
+ Text[ greek ] = "ÁêôéíéêÜ ðñÜóéíï/ìáýñï";
+ Text[ dutch ] = "Radiaal groen/zwart";
+ Text[ french ] = "Radial vert/noir";
+ Text[ spanish ] = "Radial verde/negro";
+ Text[ italian ] = "Radiale verde/nero";
+ Text[ danish ] = "Radial grøn/sort";
+ Text[ swedish ] = "Radiellt grönt/svart";
+ Text[ polish ] = "Radialny zielony/czarny";
+ Text[ portuguese_brazilian ] = "Radial green/black";
+ Text[ japanese ] = "•úŽËó —Î/•";
+ Text[ korean ] = "¹æ»çÇü ³ì»ö/°ËÀº»ö";
+ Text[ chinese_simplified ] = "¾¶Ïò ÂÌ/ºÚ";
+ Text[ chinese_traditional ] = "¥ú½uª¬ºñ¦â/¶Â¦â";
+ Text[ arabic ] = "ÔÚÇÚí ÃÎÖÑ/ÃÓæÏ";
+ Text[ turkish ] = "Radyal yeþil/siyah";
+};
+String RID_SVXSTR_GRDT5
+{
+ Text = "Radial rot/gelb";
+ Text [ ENGLISH ] = "Radial red/yellow";
+ Text[ english_us ] = "Radial red/yellow";
+ Text[ portuguese ] = "Radial vermelho/amarelo";
+ Text[ russian ] = "Êðóãîâàÿ: êðàñíûé/æåëòûé";
+ Text[ greek ] = "ÁêôéíéêÜ êüêêéíï/êßôñéíï";
+ Text[ dutch ] = "Radiaal rood/geel";
+ Text[ french ] = "Radial rouge/jaune";
+ Text[ spanish ] = "Radial rojo/amarillo";
+ Text[ italian ] = "Radiale rosso/giallo";
+ Text[ danish ] = "Radial rød/gul";
+ Text[ swedish ] = "Radiellt rött/gult";
+ Text[ polish ] = "Radialny czerwony/¿ó³ty";
+ Text[ portuguese_brazilian ] = "Radial red/yellow";
+ Text[ japanese ] = "•úŽËó Ô/‰©F";
+ Text[ korean ] = "¹æ»çÇü Àû»ö/Ȳ»ö";
+ Text[ chinese_simplified ] = "¾¶Ïò ºì/»Æ";
+ Text[ chinese_traditional ] = "¥ú½uª¬¬õ¦â/¶À¦â";
+ Text[ arabic ] = "ÔÚÇÚí ÃÍãÑ/ÃÕÝÑ";
+ Text[ turkish ] = "Radyal kýrmýzý/sarý";
+};
+String RID_SVXSTR_GRDT6
+{
+ Text = "Rechteck rot/weiß";
+ Text [ ENGLISH ] = "Rectangular red/white";
+ Text[ english_us ] = "Rectangular red/white";
+ Text[ portuguese ] = "Rectangular vermelho/branco";
+ Text[ russian ] = "Ïðÿìîóãîëüíàÿ: êðàñíûé/áåëûé";
+ Text[ greek ] = "Ïñèïãþíéï êüêêéíï/ëåõêü";
+ Text[ dutch ] = "Rechthoek rood/wit";
+ Text[ french ] = "Rectangulaire rouge/blanc";
+ Text[ spanish ] = "Rectangular rojo/blanco";
+ Text[ italian ] = "Rettangolare rosso/bianco";
+ Text[ danish ] = "Rektangel rød/hvid";
+ Text[ swedish ] = "Rektangulär rött/vitt";
+ Text[ polish ] = "Prostok¹t czerwony/bia³y";
+ Text[ portuguese_brazilian ] = "Rectangular red/white";
+ Text[ japanese ] = "’·•ûŒ` Ô/”’";
+ Text[ korean ] = "Á÷»ç°¢Çü Àû»ö/Èò»ö";
+ Text[ chinese_simplified ] = "¾ØÐÎ ºì/°×";
+ Text[ chinese_traditional ] = "¯x§Î¬õ¦â/¥Õ¦â";
+ Text[ arabic ] = "ãÓÊØíá ÃÍãÑ/ÃÈíÖ";
+ Text[ turkish ] = "Dikdörtgen kýrmýzý/beyaz";
+};
+String RID_SVXSTR_GRDT7
+{
+ Text = "Quadratisch gelb/weiß";
+ Text [ ENGLISH ] = "Square yellow/white";
+ Text[ english_us ] = "Square yellow/white";
+ Text[ portuguese ] = "Quadrado amarelo/branco";
+ Text[ russian ] = "Êâàäðàòíàÿ: æåëòûé/áåëûé";
+ Text[ greek ] = "ÔåôñÜãùíï êßôñéíï/ëåõêü";
+ Text[ dutch ] = "Vierkant geel/wit";
+ Text[ french ] = "Carré jaune/blanc";
+ Text[ spanish ] = "Cuadrado amarillo/blanco";
+ Text[ italian ] = "Quadrato giallo/bianco";
+ Text[ danish ] = "Kvadratisk gul/hvid";
+ Text[ swedish ] = "Kvadratisk gult/vitt";
+ Text[ polish ] = "Kwadratowe ¿ó³te/bia³e";
+ Text[ portuguese_brazilian ] = "Square yellow/white";
+ Text[ japanese ] = "³•ûŒ` ‰©F/”’";
+ Text[ korean ] = "Á¤»ç°¢Çü Ȳ»ö/Èò»ö";
+ Text[ chinese_simplified ] = "Õý·½ÐÎ »Æ/°×";
+ Text[ chinese_traditional ] = "¥¿¤è§Î¶À¦â/¥Õ¦â";
+ Text[ arabic ] = "ãÑÈÚ ÃÕÝÑ/ÃÈíÖ";
+ Text[ turkish ] = "Kare sarý/beyaz";
+};
+String RID_SVXSTR_GRDT8
+{
+ Text = "Ellipsoid blaugrau/hellblau";
+ Text [ ENGLISH ] = "Ellipsoid blue gray/light blue";
+ Text[ english_us ] = "Ellipsoid blue gray/light blue";
+ Text[ portuguese ] = "Elipsoidal cinzento azulado/azul-claro";
+ Text[ russian ] = "Ýëëèïñîèäíàÿ: ñåðî-ãîëóáîé/ãîëóáîé";
+ Text[ greek ] = "Åëëåéø. ìðëå-ãêñé/ìðëå áíïé÷.";
+ Text[ dutch ] = "Ellips grijsblauw/lichtblauw";
+ Text[ french ] = "Ellipsoïde gris bleu/bleu roi";
+ Text[ spanish ] = "Elipsoide azul gris/azul claro";
+ Text[ italian ] = "Ellissoidale blu-grigio/celeste";
+ Text[ danish ] = "Ellipsoide blågrå/lyseblå";
+ Text[ swedish ] = "Ellipsoid blågrå/ljusblå";
+ Text[ polish ] = "Elips. niebiesko-szary/jasnoniebieski";
+ Text[ portuguese_brazilian ] = "Ellipsoid blue gray/light blue";
+ Text[ japanese ] = "‘ȉ~‘Ì ÂŠDF/–¾‚é‚¢Â";
+ Text[ korean ] = "Ÿ¿øÇü ȸû»ö/¹àÀº û»ö";
+ Text[ chinese_simplified ] = "ÍÖÔ²Ìå À¶»Ò/dzÀ¶";
+ Text[ chinese_traditional ] = "¾ò¶êÂŦǦâ/²L¦Ç¦â";
+ Text[ arabic ] = "ÈíÖæí ÑãÇÏí ãÒÑÞ/ÃÒÑÞ ÝÇÊÍ";
+ Text[ turkish ] = "Elipsoid mavi gri/açýk mavi";
+};
+String RID_SVXSTR_GRDT9
+{
+ Text = "Axial hellrot/weiß";
+ Text [ ENGLISH ] = "Axial light red/white";
+ Text[ english_us ] = "Axial light red/white";
+ Text[ portuguese ] = "Axial vermelho-claro/branco";
+ Text[ russian ] = "Îñåâàÿ: ñâåòëî-êðàñíûé/áåëûé";
+ Text[ greek ] = "Áîïíéêü ëåõêü/êüêêéíï áíïé÷.";
+ Text[ dutch ] = "Axiaal lichtrood/wit";
+ Text[ french ] = "Axial rouge clair/blanc";
+ Text[ spanish ] = "Axial rojo claro/blanco";
+ Text[ italian ] = "Assiale rosso chiaro/bianco";
+ Text[ danish ] = "Aksial lys rød/hvid";
+ Text[ swedish ] = "Axialt ljusrött/vitt";
+ Text[ polish ] = "Osiowy jasnoczerw./bia³y";
+ Text[ portuguese_brazilian ] = "Axial light red/white";
+ Text[ japanese ] = "Ž²ó –¾‚é‚¢Ô/”’";
+ Text[ korean ] = "Ãà ¹àÀº Àû»ö/Èò»ö";
+ Text[ chinese_simplified ] = "ÖáÏò dzºì/°×";
+ Text[ chinese_traditional ] = "¶b§Î²L¬õ¦â/¥Õ¦â";
+ Text[ arabic ] = "ãÍæÑí ÃÍãÑ ÝÇÊÍ/ÃÈíÖ";
+ Text[ turkish ] = "Eksen açýk kýrmýzý/beyaz";
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Reference-strings for standard-hatch-table
+//
+
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH0_DEF
+{
+ Text = "Black 45 Degrees Wide";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH1_DEF
+{
+ Text = "Black 45 Degrees";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH2_DEF
+{
+ Text = "Black -45 Degrees";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH3_DEF
+{
+ Text = "Black 90 Degrees";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH4_DEF
+{
+ Text = "Red Crossed 45 Degrees";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH5_DEF
+{
+ Text = "Red Crossed 0 Degrees";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH6_DEF
+{
+ Text = "Blue Crossed 45 Degrees";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH7_DEF
+{
+ Text = "Blue Crossed 0 Degrees";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH8_DEF
+{
+ Text = "Blue Triple 90 Degrees";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_HATCH9_DEF
+{
+ Text = "Black 0 Degrees";
+};
+
+String RID_SVXSTR_HATCH0
+{
+ Text = "Schwarz 45 Grad weit";
+ Text [ ENGLISH ] = "Black 45 Degrees Wide";
+ Text [ english_us ] = "Black 45 degrees wide";
+ Text[ portuguese ] = "Preto 45 graus de largura";
+ Text[ russian ] = "×åðíàÿ 45 ãðàäóñîâ, ðàçðåæåííàÿ";
+ Text[ greek ] = "Ìáýñï 45 ìïßñåò ðëáôéÜ";
+ Text[ dutch ] = "Zwart 45 graden breed";
+ Text[ french ] = "Noir 45 degrés de large";
+ Text[ spanish ] = "Negro 45 grados ancho";
+ Text[ italian ] = "Nero 45 gradi, ampio";
+ Text[ danish ] = "Sort 45 grader vidt";
+ Text[ swedish ] = "Svart 45 grader vid";
+ Text[ polish ] = "Czarny 45 stopni, rozci¹gniêty";
+ Text[ portuguese_brazilian ] = "Black 45 Degrees Wide";
+ Text[ japanese ] = "• 45“x •L";
+ Text[ korean ] = "°ËÀº»ö 45µµ ³ÐÀÌ";
+ Text[ chinese_simplified ] = "ºÚÉ« 45 ¶È(¿í¾à)";
+ Text[ chinese_traditional ] = "¶Â¦â 45 «×¼e";
+ Text[ arabic ] = "ÃÓæÏ 45 ÏÑÌÉ æÇÓÚ";
+ Text[ turkish ] = "Siyah 45 derece geniþ";
+};
+String RID_SVXSTR_HATCH1
+{
+ Text = "Schwarz 45 Grad";
+ Text [ ENGLISH ] = "Black 45 Degrees";
+ Text [ english_us ] = "Black 45 degrees";
+ Text[ portuguese ] = "Preto 45 graus";
+ Text[ russian ] = "×åðíàÿ 45 ãðàäóñîâ";
+ Text[ greek ] = "Ìáýñï 45 ìïßñåò";
+ Text[ dutch ] = "Zwart 45 graden";
+ Text[ french ] = "Noir 45 degrés";
+ Text[ spanish ] = "Negro 45 grados";
+ Text[ italian ] = "Nero 45 gradi";
+ Text[ danish ] = "Sort 45 grader";
+ Text[ swedish ] = "Svart 45 grader";
+ Text[ polish ] = "Czarny 45 stopni";
+ Text[ portuguese_brazilian ] = "Black 45 Degrees";
+ Text[ japanese ] = "• 45“x";
+ Text[ korean ] = "°ËÀº»ö 45µµ ³ÐÀÌ";
+ Text[ chinese_simplified ] = "ºÚÉ« 45 ¶È";
+ Text[ chinese_traditional ] = "¶Â¦â 45 «×";
+ Text[ arabic ] = "ÃÓæÏ 45 ÏÑÌÉ";
+ Text[ turkish ] = "Siyah 45 derece";
+};
+String RID_SVXSTR_HATCH2
+{
+ Text = "Schwarz -45 Grad";
+ Text [ ENGLISH ] = "Black -45 Degrees";
+ Text [ english_us ] = "Black -45 degrees";
+ Text[ portuguese ] = "Preto -45 graus";
+ Text[ russian ] = "×åðíàÿ -45 ãðàäóñîâ";
+ Text[ greek ] = "Ìáýñï -45 ìïßñåò";
+ Text[ dutch ] = "Zwart -45 graden";
+ Text[ french ] = "Noir -45 degrés";
+ Text[ spanish ] = "Negro -45 grados";
+ Text[ italian ] = "Nero -45 gradi";
+ Text[ danish ] = "Sort -45 grader";
+ Text[ swedish ] = "Svart -45 grader";
+ Text[ polish ] = "Czarny -45 stopni";
+ Text[ portuguese_brazilian ] = "Black -45 Degrees";
+ Text[ japanese ] = "• -45“x";
+ Text[ korean ] = "°ËÀº»ö 45 µµ";
+ Text[ chinese_simplified ] = "ºÚÉ« -45 ¶È";
+ Text[ chinese_traditional ] = "¶Â¦â -45 «×";
+ Text[ arabic ] = "ÃÓæÏ -45 ÏÑÌÉ";
+ Text[ turkish ] = "Siyah -45 derece";
+};
+String RID_SVXSTR_HATCH3
+{
+ Text = "Schwarz 90 Grad";
+ Text [ ENGLISH ] = "Black 90 Degrees";
+ Text [ english_us ] = "Black 90 degrees";
+ Text[ portuguese ] = "Preto 90 graus";
+ Text[ russian ] = "×åðíàÿ 90 ãðàäóñîâ";
+ Text[ greek ] = "Ìáýñï 90 ìïßñåò";
+ Text[ dutch ] = "Zwart 90 graden";
+ Text[ french ] = "Noir 90 degrés";
+ Text[ spanish ] = "Negro 90 grados";
+ Text[ italian ] = "Nero 90 gradi";
+ Text[ danish ] = "Sort 90 grader";
+ Text[ swedish ] = "Svart 90 grader";
+ Text[ polish ] = "Czarny 90 stopni";
+ Text[ portuguese_brazilian ] = "Black 90 Degrees";
+ Text[ japanese ] = "• 90“x";
+ Text[ korean ] = "°ËÀº»ö 90 µµ";
+ Text[ chinese_simplified ] = "ºÚÉ« 90 ¶È";
+ Text[ chinese_traditional ] = "¶Â¦â 90 «×";
+ Text[ arabic ] = "ÃÓæÏ 90 ÏÑÌÉ";
+ Text[ turkish ] = "Siyah 90 derece";
+};
+String RID_SVXSTR_HATCH4
+{
+ Text = "Rot Netz 45 Grad";
+ Text [ ENGLISH ] = "Red Crossed 45 Degrees";
+ Text [ english_us ] = "Red crossed 45 degrees";
+ Text[ portuguese ] = "Vermelho cruzado 45 graus";
+ Text[ russian ] = "Êðàñíàÿ ñåòü 45 ãðàäóñîâ";
+ Text[ greek ] = "Êüêêéíï äßêôõï 45 ìïßñåò";
+ Text[ dutch ] = "Rood gekruisd 45 graden";
+ Text[ french ] = "Rouge double incliné 45 degrés";
+ Text[ spanish ] = "Rojo red 45 grados";
+ Text[ italian ] = "Rosso a rete 45 gradi";
+ Text[ danish ] = "Rødt gitter 45 grader";
+ Text[ swedish ] = "Rött nät 45 grader";
+ Text[ polish ] = "Czerw. siatka 45 stopni";
+ Text[ portuguese_brazilian ] = "Red Crossed 45 Degrees";
+ Text[ japanese ] = "Ô ŽÈ 45“x";
+ Text[ korean ] = "Àû»ö ¸Á 45µµ";
+ Text[ chinese_simplified ] = "ºìÉ«Íø¸ñÏß 45 ¶È";
+ Text[ chinese_traditional ] = "¬õºôª¬ 45 «×";
+ Text[ arabic ] = "ÃÍãÑ ÔÈßÉ 45 ÏÑÌÉ";
+ Text[ turkish ] = "Kýrmýzý ýzgaralý 45 derece";
+};
+String RID_SVXSTR_HATCH5
+{
+ Text = "Rot Netz 0 Grad";
+ Text [ ENGLISH ] = "Red Crossed 0 Degrees";
+ Text [ english_us ] = "Red crossed 0 degrees";
+ Text[ portuguese ] = "Vermelho cruzado 0 graus";
+ Text[ russian ] = "Êðàñíàÿ ñåòü 0 ãðàäóñîâ";
+ Text[ greek ] = "Êüêêéíï äßêôõï 0 ìïßñåò";
+ Text[ dutch ] = "Rood gekruisd 0 graden";
+ Text[ french ] = "Rouge double incliné 0 degré";
+ Text[ spanish ] = "Rojo red 0 grados";
+ Text[ italian ] = "Rosso a rete 0 gradi";
+ Text[ danish ] = "Rødt gitter 0 grader";
+ Text[ swedish ] = "Rött nät 0 grader";
+ Text[ polish ] = "Czerw. siatka 0 stopni";
+ Text[ portuguese_brazilian ] = "Red Crossed 0 Degrees";
+ Text[ japanese ] = "Ô ŽÈ 0“x";
+ Text[ korean ] = "Àû»ö ¸Á 0µµ";
+ Text[ chinese_simplified ] = "ºìÉ«Íø¸ñÏß 0 ¶È";
+ Text[ chinese_traditional ] = "¬õºô 0 «×";
+ Text[ arabic ] = "ÃÍãÑ ÔÈßÉ 0 ÏÑÌÉ";
+ Text[ turkish ] = "Kýrmýzý ýzgaralý 0 derece";
+};
+String RID_SVXSTR_HATCH6
+{
+ Text = "Blau Netz 45 Grad";
+ Text [ ENGLISH ] = "Blue Crossed 45 Degrees";
+ Text [ english_us ] = "Blue crossed 45 degrees";
+ Text[ portuguese ] = "Azul cruzado 45 graus";
+ Text[ russian ] = "Ñèíÿÿ ñåòü 45 ãðàäóñîâ";
+ Text[ greek ] = "Ìðëå äßêôõï 45 ìïßñåò";
+ Text[ dutch ] = "Blauw gekruisd 45 graden";
+ Text[ french ] = "Bleu double incliné 45 degrés";
+ Text[ spanish ] = "Azul red 45 grados";
+ Text[ italian ] = "Blu a rete 45 gradi";
+ Text[ danish ] = "Blåt gitter 45 grader";
+ Text[ swedish ] = "Blått nät 45 grader";
+ Text[ polish ] = "Nieb. siatka 45 stopni";
+ Text[ portuguese_brazilian ] = "Blue Crossed 45 Degrees";
+ Text[ japanese ] = "Â ŽÈ 45“x";
+ Text[ korean ] = "û»ö ¸Á 45µµ";
+ Text[ chinese_simplified ] = "À¶É«Íø¸ñÏß 45 ¶È";
+ Text[ chinese_traditional ] = "Âźô 45 «×";
+ Text[ arabic ] = "ÃÒÑÞ ÔÈßÉ 45 ÏÑÌÉ";
+ Text[ turkish ] = "Mavi ýzgaralý 45 derece";
+};
+String RID_SVXSTR_HATCH7
+{
+ Text = "Blau Netz 0 Grad";
+ Text [ ENGLISH ] = "Blue Crossed 0 Degrees";
+ Text [ english_us ] = "Blue crossed 0 degrees";
+ Text[ portuguese ] = "Azul cruzado 0 graus";
+ Text[ russian ] = "Ñèíÿÿ ñåòü 0 ãðàäóñîâ";
+ Text[ greek ] = "Ìðëå äßêôõï 0 ìïßñåò";
+ Text[ dutch ] = "Bauw gekruisd 0 graden";
+ Text[ french ] = "Bleu double incliné 0 degré";
+ Text[ spanish ] = "Azul red 0 grados";
+ Text[ italian ] = "Blu a rete 0 gradi";
+ Text[ danish ] = "Blåt gitter 0 grader";
+ Text[ swedish ] = "Blått nät 0 grader";
+ Text[ polish ] = "Nieb. siatka 0 stopni";
+ Text[ portuguese_brazilian ] = "Blue Crossed 0 Degrees";
+ Text[ japanese ] = "Â ŽÈ 0“x";
+ Text[ korean ] = "û»ö ¸Á 0µµ";
+ Text[ chinese_simplified ] = "À¶É«Íø¸ñÏß 0 ¶È";
+ Text[ chinese_traditional ] = "Âźô 0 «×";
+ Text[ arabic ] = "ÃÒÑÞ ÔÈßÉ 0 ÏÑÌÉ";
+ Text[ turkish ] = "Mavi ýzgaralý 0 derece";
+};
+String RID_SVXSTR_HATCH8
+{
+ Text = "Blau 3er Netz 90 Grad";
+ Text [ ENGLISH ] = "Blue Triple 90 Degrees";
+ Text [ english_us ] = "Blue triple 90 degrees";
+ Text[ portuguese ] = "Azul cruzado triplo 90 graus";
+ Text[ russian ] = "Ñèíÿÿ òðîéíàÿ ñåòü 90 ãðàäóñîâ";
+ Text[ greek ] = "ÌðëÝ ôñéðëü 90 ìïßñåò";
+ Text[ dutch ] = "Blauw drievoudig gekruisd 90 graden";
+ Text[ french ] = "Bleu triple incliné 90 degrés";
+ Text[ spanish ] = "Azul red triple 90 grados";
+ Text[ italian ] = "Blu tripla rete 90 gradi";
+ Text[ danish ] = "Blåt 3'er gitter 90 grader";
+ Text[ swedish ] = "Blått trippelnät 90 grader";
+ Text[ polish ] = "Nieb. potrójna siatka 90 stopni";
+ Text[ portuguese_brazilian ] = "Blue Triple 90 Degrees";
+ Text[ japanese ] = "Â 3–{ŽÈ 90“x";
+ Text[ korean ] = "û»ö 3Á߸Á 90µµ";
+ Text[ chinese_simplified ] = "À¶É«ÈýÖØÍø¸ñÏß 90 ¶È";
+ Text[ chinese_traditional ] = "ÂŦâ¤Tºô 90 «×";
+ Text[ arabic ] = "ÃÒÑÞ ÔÈßÉ ËáÇËíÉ 90 ÏÑÌÉ";
+ Text[ turkish ] = "Mavi 3'lü ýzgaralý 90 derece";
+};
+String RID_SVXSTR_HATCH9
+{
+ Text = "Schwarz 0 Grad";
+ Text [ ENGLISH ] = "Black 0 Degrees";
+ Text [ english_us ] = "Black 0 degrees";
+ Text[ portuguese ] = "Preto 0 graus";
+ Text[ russian ] = "×åðíàÿ 0 ãðàäóñîâ";
+ Text[ greek ] = "Ìáýñï 0 ìïßñåò";
+ Text[ dutch ] = "Zwart 0 graden";
+ Text[ french ] = "Noir 0 degré";
+ Text[ spanish ] = "Negro 0 grados";
+ Text[ italian ] = "Nero 0 gradi";
+ Text[ danish ] = "Sort 0 grader";
+ Text[ swedish ] = "Svart 0 grader";
+ Text[ polish ] = "Czarny 0 stopni";
+ Text[ portuguese_brazilian ] = "Black 0 Degrees";
+ Text[ japanese ] = "• 0“x";
+ Text[ korean ] = "°ËÀº»ö 0µµ";
+ Text[ chinese_simplified ] = "ºÚÉ« 0 ¶È";
+ Text[ chinese_traditional ] = "¶Â¦â 0 «×";
+ Text[ arabic ] = "ÃÓæÏ 0 ÏÑÌÉ";
+ Text[ turkish ] = "Siyah 0 derece";
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Reference-strings for standard-bitmap-table
+//
+
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP0_DEF
+{
+ Text = "Empty";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP1_DEF
+{
+ Text = "Sky";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP2_DEF
+{
+ Text = "Aqua";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP3_DEF
+{
+ Text = "Coarse";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP4_DEF
+{
+ Text = "Space Metal";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP5_DEF
+{
+ Text = "Space";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP6_DEF
+{
+ Text = "Metal";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP7_DEF
+{
+ Text = "Wet";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP8_DEF
+{
+ Text = "Marble";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP9_DEF
+{
+ Text = "Linen";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP10_DEF
+{
+ Text = "Stone";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP11_DEF
+{
+ Text = "Pebbles";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP12_DEF
+{
+ Text = "Wall";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP13_DEF
+{
+ Text = "Red Wall";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP14_DEF
+{
+ Text = "Pattern";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP15_DEF
+{
+ Text = "Leaves";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP16_DEF
+{
+ Text = "Lawn Artificial";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP17_DEF
+{
+ Text = "Daisy";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP18_DEF
+{
+ Text = "Orange";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP19_DEF
+{
+ Text = "Fiery";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_BMP20_DEF
+{
+ Text = "Roses";
+};
+
+String RID_SVXSTR_BMP0
+{
+ Text = "Leer";
+ Text [ ENGLISH ] = "Blank";
+ Text [ english_us ] = "Blank";
+ Text[ portuguese ] = "Vazio";
+ Text[ russian ] = "Ïóñòî";
+ Text[ greek ] = "Êåíü";
+ Text[ dutch ] = "Blanco";
+ Text[ french ] = "Vide";
+ Text[ spanish ] = "Vacío";
+ Text[ italian ] = "Vuoto";
+ Text[ danish ] = "Tomt";
+ Text[ swedish ] = "Tomt";
+ Text[ polish ] = "Pusty";
+ Text[ portuguese_brazilian ] = "Blank";
+ Text[ japanese ] = "‹ó”’";
+ Text[ korean ] = "¹éÁö";
+ Text[ chinese_simplified ] = "¿Õ°×";
+ Text[ chinese_traditional ] = "ªÅ¥Õ";
+ Text[ arabic ] = "ÝÇÑÛ";
+ Text[ turkish ] = "Boþ";
+};
+String RID_SVXSTR_BMP1
+{
+ Text = "Himmel";
+ Text [ ENGLISH ] = "Sky";
+ Text [ english_us ] = "Sky";
+ Text[ portuguese ] = "Céu";
+ Text[ russian ] = "Íåáî";
+ Text[ greek ] = "Ïõñáíüò";
+ Text[ dutch ] = "Hemel";
+ Text[ french ] = "Ciel";
+ Text[ spanish ] = "Cielo";
+ Text[ italian ] = "Cielo";
+ Text[ danish ] = "Himmel";
+ Text[ swedish ] = "Himmel";
+ Text[ polish ] = "Niebo";
+ Text[ portuguese_brazilian ] = "Orange";
+ Text[ japanese ] = "‹ó";
+ Text[ korean ] = "ÇÏ´Ã";
+ Text[ chinese_simplified ] = "Ìì¿Õ";
+ Text[ chinese_traditional ] = "¤ÑªÅ";
+ Text[ arabic ] = "ÇáÓãÇÁ";
+ Text[ turkish ] = "Gökyüzü";
+};
+String RID_SVXSTR_BMP2
+{
+ Text = "Wasser";
+ Text [ ENGLISH ] = "Aqua";
+ Text [ english_us ] = "Water";
+ Text[ portuguese ] = "Água";
+ Text[ russian ] = "Âîäà";
+ Text[ greek ] = "Íåñü";
+ Text[ dutch ] = "Water";
+ Text[ french ] = "Eau";
+ Text[ spanish ] = "Agua";
+ Text[ italian ] = "Acqua";
+ Text[ danish ] = "Vand";
+ Text[ swedish ] = "Vatten";
+ Text[ polish ] = "Woda";
+ Text[ portuguese_brazilian ] = "Wallpaper";
+ Text[ japanese ] = "…–Ê";
+ Text[ korean ] = "¹°";
+ Text[ chinese_simplified ] = "Ë®";
+ Text[ chinese_traditional ] = "¤ô";
+ Text[ arabic ] = "ãíÇå";
+ Text[ turkish ] = "Su";
+};
+String RID_SVXSTR_BMP3
+{
+ Text = "Grobkörnig";
+ Text [ ENGLISH ] = "Coarse";
+ Text [ english_us ] = "Coarse grained";
+ Text[ portuguese ] = "Granulado grosso";
+ Text[ russian ] = "Êðóïíàÿ çåðíèñòîñòü";
+ Text[ greek ] = "×ïíôñüêïêêá";
+ Text[ dutch ] = "Grove korrel";
+ Text[ french ] = "Gros grain";
+ Text[ spanish ] = "Grano grueso";
+ Text[ italian ] = "Grana grossa";
+ Text[ danish ] = "Grynet";
+ Text[ swedish ] = "Grovkornig";
+ Text[ polish ] = "Gruboziarnisty";
+ Text[ portuguese_brazilian ] = "Texture";
+ Text[ japanese ] = "‚´‚ç‚´‚炵‚½–Ê";
+ Text[ korean ] = "°ÅÄ£ ¾Ë°»ÀÌ";
+ Text[ chinese_simplified ] = "´Ö¿ÅÁ£";
+ Text[ chinese_traditional ] = "²`ÂÅ";
+ Text[ arabic ] = "ÍõÈóíúÈöíø ÎÔä";
+ Text[ turkish ] = "Ýri taneler";
+};
+String RID_SVXSTR_BMP4
+{
+ Text = "Quecksilber";
+ Text [ ENGLISH ] = "Quicksilver";
+ Text [ english_us ] = "Mercury";
+ Text[ portuguese ] = "Mercúrio";
+ Text[ russian ] = "Ðòóòü";
+ Text[ greek ] = "ÕäñÜñãõñïò";
+ Text[ dutch ] = "Kwikzilver";
+ Text[ french ] = "Mercure";
+ Text[ spanish ] = "Mercurio";
+ Text[ italian ] = "Mercurio";
+ Text[ danish ] = "Kviksølv";
+ Text[ swedish ] = "Kvicksilver";
+ Text[ polish ] = "Rtêæ";
+ Text[ portuguese_brazilian ] = "Chocolate";
+ Text[ japanese ] = "½Íß°½ÒÀÙ";
+ Text[ korean ] = "¼öÀº";
+ Text[ chinese_simplified ] = "Ë®Òø";
+ Text[ chinese_traditional ] = "¤ô»È";
+ Text[ arabic ] = "ÒÆÈÞ";
+ Text[ turkish ] = "Çikolata";
+};
+String RID_SVXSTR_BMP5
+{
+ Text = "Weltraum";
+ Text [ ENGLISH ] = "Space";
+ Text [ english_us ] = "Space";
+ Text[ portuguese ] = "Espaço cósmico";
+ Text[ russian ] = "Êîñìîñ";
+ Text[ greek ] = "ÄéÜóôçìá";
+ Text[ dutch ] = "Heelal";
+ Text[ french ] = "Galaxie";
+ Text[ spanish ] = "Espacio";
+ Text[ italian ] = "Spazio";
+ Text[ danish ] = "Verdensrum";
+ Text[ swedish ] = "Världsrymd";
+ Text[ polish ] = "Kosmos";
+ Text[ portuguese_brazilian ] = "Metal";
+ Text[ japanese ] = "‹â‰Í¯‰_";
+ Text[ korean ] = "¿ìÁÖ";
+ Text[ chinese_simplified ] = "ÓîÖæ";
+ Text[ chinese_traditional ] = "¤ÓªÅ";
+ Text[ arabic ] = "ÇáÝÖÇÁ";
+ Text[ turkish ] = "Uzay";
+};
+String RID_SVXSTR_BMP6
+{
+ Text = "Metall";
+ Text [ ENGLISH ] = "Metal";
+ Text [ english_us ] = "Metal";
+ Text[ portuguese ] = "Metal";
+ Text[ russian ] = "Ìåòàëë";
+ Text[ greek ] = "ÌÝôáëëï";
+ Text[ dutch ] = "Metaal";
+ Text[ french ] = "Métal";
+ Text[ spanish ] = "Metal";
+ Text[ italian ] = "Metallo";
+ Text[ danish ] = "Metal";
+ Text[ swedish ] = "Metall";
+ Text[ polish ] = "Metal";
+ Text[ portuguese_brazilian ] = "Wet";
+ Text[ japanese ] = "‚‚Ԃ‚Ԃµ‚½–Ê";
+ Text[ korean ] = "±Ý¼Ó";
+ Text[ chinese_simplified ] = "½ðÊô";
+ Text[ chinese_traditional ] = "ª÷ÄÝ";
+ Text[ arabic ] = "ãÚÏä";
+ Text[ turkish ] = "Metal";
+};
+String RID_SVXSTR_BMP7
+{
+ Text = "Tropfen";
+ Text [ ENGLISH ] = "Wet";
+ Text [ english_us ] = "Droplets";
+ Text[ portuguese ] = "Gotas";
+ Text[ russian ] = "Êàïëè";
+ Text[ greek ] = "Óôáãüíåò";
+ Text[ dutch ] = "Druppels";
+ Text[ french ] = "Gouttelettes";
+ Text[ spanish ] = "Gota";
+ Text[ italian ] = "Gocce";
+ Text[ danish ] = "Dråber";
+ Text[ swedish ] = "Droppar";
+ Text[ polish ] = "Krople";
+ Text[ portuguese_brazilian ] = "Marble";
+ Text[ japanese ] = "‚µ‚¸‚­";
+ Text[ korean ] = "¹°¹æ¿ï";
+ Text[ chinese_simplified ] = "Ë®µÎ";
+ Text[ chinese_traditional ] = "¤ôºw";
+ Text[ arabic ] = "ÞØÑÇÊ";
+ Text[ turkish ] = "Damla";
+};
+String RID_SVXSTR_BMP8
+{
+ Text = "Marmor";
+ Text [ ENGLISH ] = "Marble";
+ Text [ english_us ] = "Marble";
+ Text[ portuguese ] = "Mármore";
+ Text[ russian ] = "Ìðàìîð";
+ Text[ greek ] = "ÌÜñìáñï";
+ Text[ dutch ] = "Marmer";
+ Text[ french ] = "Marbre";
+ Text[ spanish ] = "Mármol";
+ Text[ italian ] = "Marmo";
+ Text[ danish ] = "Marmor";
+ Text[ swedish ] = "Marmor";
+ Text[ polish ] = "Marmur";
+ Text[ portuguese_brazilian ] = "Linen";
+ Text[ japanese ] = "”’‘å—Î";
+ Text[ korean ] = "´ë¸®¼®";
+ Text[ chinese_simplified ] = "´óÀíʯ";
+ Text[ chinese_traditional ] = "¤j²z¥Û";
+ Text[ arabic ] = "ÑÎÇã";
+ Text[ turkish ] = "Mermer";
+};
+String RID_SVXSTR_BMP9
+{
+ Text = "Leinen";
+ Text [ ENGLISH ] = "Linen";
+ Text [ english_us ] = "Linen";
+ Text[ portuguese ] = "Linho";
+ Text[ russian ] = "Ëåí";
+ Text[ greek ] = "Ëéíü";
+ Text[ dutch ] = "Linnen";
+ Text[ french ] = "Lin";
+ Text[ spanish ] = "Lino";
+ Text[ italian ] = "Lino";
+ Text[ danish ] = "Lærred";
+ Text[ swedish ] = "Linne";
+ Text[ polish ] = "Len";
+ Text[ portuguese_brazilian ] = "Stone";
+ Text[ japanese ] = "ØÈÝ’n";
+ Text[ korean ] = "¾Æ¸¶Æ÷";
+ Text[ chinese_simplified ] = "Âé²¼";
+ Text[ chinese_traditional ] = "¨È³Â";
+ Text[ arabic ] = "ßÊøÇä";
+ Text[ turkish ] = "Keten";
+};
+String RID_SVXSTR_BMP10
+{
+ Text = "Stein";
+ Text [ ENGLISH ] = "Stone";
+ Text [ english_us ] = "Stone";
+ Text[ portuguese ] = "Pedra";
+ Text[ russian ] = "Êàìåíü";
+ Text[ greek ] = "ÐÝôñá";
+ Text[ dutch ] = "Steen";
+ Text[ french ] = "Pierre";
+ Text[ spanish ] = "Piedra";
+ Text[ italian ] = "Pietra";
+ Text[ danish ] = "Sten";
+ Text[ swedish ] = "Sten";
+ Text[ polish ] = "Kamieñ";
+ Text[ portuguese_brazilian ] = "Quicksilver";
+ Text[ japanese ] = "‰Ô›¼Šâ";
+ Text[ korean ] = "µ¹";
+ Text[ chinese_simplified ] = "ʯ±®";
+ Text[ chinese_traditional ] = "¥ÛÀY";
+ Text[ arabic ] = "ÍÌÑ";
+ Text[ turkish ] = "Taþ";
+};
+String RID_SVXSTR_BMP11
+{
+ Text = "Schotter";
+ Text [ ENGLISH ] = "Pebbles";
+ Text [ english_us ] = "Gravel";
+ Text[ portuguese ] = "Cascalho";
+ Text[ russian ] = "Ãðàâèé";
+ Text[ greek ] = "×áëßêéá";
+ Text[ dutch ] = "Puin";
+ Text[ french ] = "Gravier";
+ Text[ spanish ] = "Grava";
+ Text[ italian ] = "Ghiaia";
+ Text[ danish ] = "Grus";
+ Text[ swedish ] = "Makadam";
+ Text[ polish ] = "¯wir";
+ Text[ portuguese_brazilian ] = "Pebbles";
+ Text[ japanese ] = "»—˜“¹";
+ Text[ korean ] = "ÀÚ°¥";
+ Text[ chinese_simplified ] = "Ëéʯ";
+ Text[ chinese_traditional ] = "¸H¥Û";
+ Text[ arabic ] = "ÍÕì";
+ Text[ turkish ] = "Çakýl";
+};
+String RID_SVXSTR_BMP12
+{
+ Text = "Mauer";
+ Text [ ENGLISH ] = "Wall";
+ Text [ english_us ] = "Wall";
+ Text[ portuguese ] = "Parede";
+ Text[ russian ] = "Êàìåííàÿ ñòåíà";
+ Text[ greek ] = "Ôïß÷ïò";
+ Text[ dutch ] = "Muur";
+ Text[ french ] = "Muraille";
+ Text[ spanish ] = "Muralla";
+ Text[ italian ] = "Muro";
+ Text[ danish ] = "Mur";
+ Text[ swedish ] = "Mur";
+ Text[ polish ] = "Mur";
+ Text[ portuguese_brazilian ] = "Wall";
+ Text[ japanese ] = "Ί_";
+ Text[ korean ] = "º®";
+ Text[ chinese_simplified ] = "ǽ";
+ Text[ chinese_traditional ] = "ùÙ";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Duvar";
+};
+String RID_SVXSTR_BMP13
+{
+ Text = "Ziegelsteine";
+ Text [ ENGLISH ] = "Brownstone";
+ Text [ english_us ] = "Brownstone";
+ Text[ portuguese ] = "Tijolos";
+ Text[ russian ] = "Êèðïè÷è";
+ Text[ greek ] = "Ðõñßìá÷á ôïýâëá";
+ Text[ dutch ] = "Bakstenen";
+ Text[ french ] = "Briques";
+ Text[ spanish ] = "Ladrillo";
+ Text[ italian ] = "Mattoni";
+ Text[ danish ] = "Teglsten";
+ Text[ swedish ] = "Tegelstenar";
+ Text[ polish ] = "Ceg³y";
+ Text[ portuguese_brazilian ] = "Brownstone";
+ Text[ japanese ] = "‚ê‚ñ‚ª•»";
+ Text[ korean ] = "º®µ¹";
+ Text[ chinese_simplified ] = "ºìשǽ";
+ Text[ chinese_traditional ] = "¿j¥Û";
+ Text[ arabic ] = "ÞæÇáÈ ØæÈ";
+ Text[ turkish ] = "Tuðla";
+};
+String RID_SVXSTR_BMP14
+{
+ Text = "Geflecht";
+ Text [ ENGLISH ] = "Pattern";
+ Text [ english_us ] = "Netting";
+ Text[ portuguese ] = "Rede";
+ Text[ russian ] = "Ïîëîòíî";
+ Text[ greek ] = "ÐëÝãìá";
+ Text[ dutch ] = "Vlechtwerk";
+ Text[ french ] = "Tresses";
+ Text[ spanish ] = "Malla";
+ Text[ italian ] = "Rete";
+ Text[ danish ] = "Fletværk";
+ Text[ swedish ] = "Flätverk";
+ Text[ polish ] = "Plecionka";
+ Text[ portuguese_brazilian ] = "Pattern";
+ Text[ japanese ] = "–ƒD•¨";
+ Text[ korean ] = "Æí¹°";
+ Text[ chinese_simplified ] = "±àÖ¯Îï";
+ Text[ chinese_traditional ] = "½s´ª«";
+ Text[ arabic ] = "ÔÈßÉ";
+ Text[ turkish ] = "Hasýr";
+};
+String RID_SVXSTR_BMP15
+{
+ Text = "Laub";
+ Text [ ENGLISH ] = "Leaves";
+ Text [ english_us ] = "Leaves";
+ Text[ portuguese ] = "Folhagem";
+ Text[ russian ] = "Ëèñòüÿ";
+ Text[ greek ] = "Öýëëùìá";
+ Text[ dutch ] = "Loof";
+ Text[ french ] = "Vigne vierge";
+ Text[ spanish ] = "Follaje";
+ Text[ italian ] = "Foglie";
+ Text[ danish ] = "Løv";
+ Text[ swedish ] = "Löv";
+ Text[ polish ] = "Liœcie";
+ Text[ portuguese_brazilian ] = "Leaves";
+ Text[ japanese ] = "’Ó";
+ Text[ korean ] = "³ª¹µÀÙ";
+ Text[ chinese_simplified ] = "Ê÷Ò¶";
+ Text[ chinese_traditional ] = "¾ð¸­";
+ Text[ arabic ] = "æÑÞ ÃÔÌÇÑ";
+ Text[ turkish ] = "Yapraklar";
+};
+String RID_SVXSTR_BMP16
+{
+ Text = "Kunstrasen";
+ Text [ ENGLISH ] = "Artificial Lawn";
+ Text [ english_us ] = "Artificial Turf";
+ Text[ portuguese ] = "Relva artificial";
+ Text[ russian ] = "Èñêóññòâåííîå òðàâÿíîå ïîêðûòèå";
+ Text[ greek ] = "Ôå÷íçôüò ÷ïñôïôÜðçôáò";
+ Text[ dutch ] = "Kunstgras";
+ Text[ french ] = "Gazon artificiel";
+ Text[ spanish ] = "Césped sintético";
+ Text[ italian ] = "Prato artificiale";
+ Text[ danish ] = "Kunstig plæne";
+ Text[ swedish ] = "Konstgjord gräsmatta";
+ Text[ polish ] = "Sztuczny trawnik";
+ Text[ portuguese_brazilian ] = "Artificial Lawn";
+ Text[ japanese ] = "lHŽÅ¶";
+ Text[ korean ] = "ÀΰøÀܵð";
+ Text[ chinese_simplified ] = "ÈËÔì²ÝµØ";
+ Text[ chinese_traditional ] = "¤H³y¯ó¦a";
+ Text[ arabic ] = "äÌíá ÕäÇÚí";
+ Text[ turkish ] = "Yapay çim";
+};
+String RID_SVXSTR_BMP17
+{
+ Text = "Gänseblümchen";
+ Text [ ENGLISH ] = "Daisy";
+ Text [ english_us ] = "Daisy";
+ Text[ portuguese ] = "Margaridas";
+ Text[ russian ] = "Ìàðãàðèòêè";
+ Text[ greek ] = "Áóðñïëïýëïõäï";
+ Text[ dutch ] = "Madeliefjes";
+ Text[ french ] = "Marguerites";
+ Text[ spanish ] = "Margarita";
+ Text[ italian ] = "Margherite";
+ Text[ danish ] = "Tusindfryd";
+ Text[ swedish ] = "Tusenskönor";
+ Text[ polish ] = "Kaczeñce";
+ Text[ portuguese_brazilian ] = "Daisy";
+ Text[ japanese ] = "ÃÞ°¼Þ°";
+ Text[ korean ] = "µ¥ÀÌÁö²É";
+ Text[ chinese_simplified ] = "³û¾Õ";
+ Text[ chinese_traditional ] = "Âúµâ";
+ Text[ arabic ] = "ÒåÑÉ ÇáÑÈíÚ";
+ Text[ turkish ] = "Papatya";
+};
+String RID_SVXSTR_BMP18
+{
+ Text = "Orange";
+ Text [ ENGLISH ] = "Orange";
+ Text [ english_us ] = "Orange";
+ Text[ portuguese ] = "Laranja";
+ Text[ russian ] = "Àïåëüñèí";
+ Text[ greek ] = "Ðïñôïêáëß";
+ Text[ dutch ] = "Oranje";
+ Text[ french ] = "Rouille";
+ Text[ spanish ] = "Naranja";
+ Text[ italian ] = "Arancione";
+ Text[ danish ] = "Orange";
+ Text[ swedish ] = "Orange";
+ Text[ polish ] = "Pomarañczowy";
+ Text[ portuguese_brazilian ] = "Orange";
+ Text[ japanese ] = "µÚݼÞ";
+ Text[ korean ] = "¿À·»Áö";
+ Text[ chinese_simplified ] = "¸Ì½Û";
+ Text[ chinese_traditional ] = "¾í¦â";
+ Text[ arabic ] = "ÈÑÊÞÇáí";
+ Text[ turkish ] = "Turuncu";
+};
+String RID_SVXSTR_BMP19
+{
+ Text = "Feurig";
+ Text [ ENGLISH ] = "Fiery";
+ Text [ english_us ] = "Fiery";
+ Text[ portuguese ] = "Chamas";
+ Text[ russian ] = "Îãîíü";
+ Text[ greek ] = "Êáõôü";
+ Text[ dutch ] = "Vurig";
+ Text[ french ] = "Flamme";
+ Text[ spanish ] = "Fogoso";
+ Text[ italian ] = "Fiamma";
+ Text[ danish ] = "Flammende";
+ Text[ swedish ] = "Eldig";
+ Text[ polish ] = "Ognisty";
+ Text[ portuguese_brazilian ] = "Fiery";
+ Text[ japanese ] = "ŽÜ”M";
+ Text[ korean ] = "ºÒ²É";
+ Text[ chinese_simplified ] = "»ðÑæ";
+ Text[ chinese_traditional ] = "¤õ¬õ¦â";
+ Text[ arabic ] = "äÇÑí";
+ Text[ turkish ] = "Ateþ";
+};
+String RID_SVXSTR_BMP20
+{
+ Text = "Rosen";
+ Text [ ENGLISH ] = "Roses";
+ Text [ english_us ] = "Roses";
+ Text[ portuguese ] = "Rosas";
+ Text[ russian ] = "Ðîçû";
+ Text[ greek ] = "ÔñéáíôÜöõëëï";
+ Text[ dutch ] = "Rozen";
+ Text[ french ] = "Roses";
+ Text[ spanish ] = "Rosas";
+ Text[ italian ] = "Rose";
+ Text[ danish ] = "Roser";
+ Text[ swedish ] = "Rosor";
+ Text[ polish ] = "Ró¿e";
+ Text[ portuguese_brazilian ] = "Roses";
+ Text[ japanese ] = "^‚ÁԂȃoƒ‰";
+ Text[ korean ] = "Àå¹Ì";
+ Text[ chinese_simplified ] = "õ¹å";
+ Text[ chinese_traditional ] = "ª´ºÀ";
+ Text[ arabic ] = "æÑÏ";
+ Text[ turkish ] = "Gül";
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Reference-strings for standard-dash-table
+//
+
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH0_DEF
+{
+ Text = "Ultrafine Dashed";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH1_DEF
+{
+ Text = "Fine Dashed";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH2_DEF
+{
+ Text = "Ultrafine 2 Dots 3 Dashes";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH3_DEF
+{
+ Text = "Fine Dotted";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH4_DEF
+{
+ Text = "Line with Fine Dots";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH5_DEF
+{
+ Text = "Fine Dashed (var)";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH6_DEF
+{
+ Text = "3 Dashes 3 Dots (var)";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH7_DEF
+{
+ Text = "Ultrafine Dotted (var)";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH8_DEF
+{
+ Text = "Line Style 9";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH9_DEF
+{
+ Text = "2 Dots 1 Dash";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_DASH10_DEF
+{
+ Text = "Dashed (var)";
+};
+
+String RID_SVXSTR_DASH0
+{
+ Text = "Ultrafein gestrichelt";
+ Text [ ENGLISH ] = "Ultrafine Dashed";
+ Text [ english_us ] = "Ultrafine dashed";
+ Text[ portuguese ] = "Tracejado ultrafino";
+ Text[ russian ] = "Ñâåðõòîíêàÿ ïóíêòèðíàÿ";
+ Text[ greek ] = "Ðáýëåò (ðïëý ëåðôÝò)";
+ Text[ dutch ] = "Ultrafijne streepjes";
+ Text[ french ] = "Ultrafine discontinue";
+ Text[ spanish ] = "Trazos ultrafinos";
+ Text[ italian ] = "A tratti finissimi";
+ Text[ danish ] = "Ultrafin stiplet";
+ Text[ swedish ] = "Mycket fint streckad";
+ Text[ polish ] = "Bardzo cienkie kreski";
+ Text[ portuguese_brazilian ] = "Ultrafine Dashed";
+ Text[ japanese ] = "‹Éׂ̔jü";
+ Text[ korean ] = "¾ÆÁÖ °¡´Â ´ë½Ã";
+ Text[ chinese_simplified ] = "³¬Ï¸»®Ïß";
+ Text[ chinese_traditional ] = "¶W²ÓÂI¦E½u";
+ Text[ arabic ] = "ÔõÑØ ÑÝíÚÉ ÌÏÇð";
+ Text[ turkish ] = "Çok ince kesik çizgili";
+};
+String RID_SVXSTR_DASH1
+{
+ Text = "Fein gestrichelt";
+ Text [ ENGLISH ] = "Fine Dashed";
+ Text [ english_us ] = "Fine dashed";
+ Text[ portuguese ] = "Tracejado fino";
+ Text[ russian ] = "Òîíêàÿ ïóíêòèðíàÿ";
+ Text[ greek ] = "Ðáýëåò (ëåðôÝò)";
+ Text[ dutch ] = "Fijne streepjes";
+ Text[ french ] = "Fine discontinue";
+ Text[ spanish ] = "Trazos finos";
+ Text[ italian ] = "A tratti fini";
+ Text[ danish ] = "Fin stiplet";
+ Text[ swedish ] = "Fint streckad";
+ Text[ polish ] = "Cienkie kreski";
+ Text[ portuguese_brazilian ] = "Fine Dashed";
+ Text[ japanese ] = "ׂ©‚¢”jü";
+ Text[ korean ] = "°¡´Â ´ë½Ã";
+ Text[ chinese_simplified ] = "ϸ»®Ïß";
+ Text[ chinese_traditional ] = "²ÓÂI¦E½u";
+ Text[ arabic ] = "ÔõÑØ ÑÝíÚÉ";
+ Text[ turkish ] = "Ýnce kesik çizgili";
+};
+String RID_SVXSTR_DASH2
+{
+ Text = "Ultrafein 2 Punkte 3 Striche";
+ Text [ ENGLISH ] = "Ultrafine 2 Dots 3 Dashes";
+ Text [ english_us ] = "Ultrafine 2 dots 3 dashes";
+ Text[ portuguese ] = "3 traços 2 pontos ultrafino";
+ Text[ russian ] = "Ñâåðõòîíêàÿ 2 òî÷êè 3 øòðèõà";
+ Text[ greek ] = "2 ôåëåßåò - 3 ðáýëåò (ðïëý ëåðôÝò)";
+ Text[ dutch ] = "Ultrafijn 2 puntjes 3 streepjes";
+ Text[ french ] = "Ultrafine 2 points 3 traits";
+ Text[ spanish ] = "Ultrafino 2 puntos 2 trazos";
+ Text[ italian ] = "A 2 punti 3 linee finissimi";
+ Text[ danish ] = "Ultrafin 2 punkter 3 streger";
+ Text[ swedish ] = "Mycket fint 2 prickar 3 streck";
+ Text[ polish ] = "Bardzo cienkie 2 kropki 3 kreski";
+ Text[ portuguese_brazilian ] = "Ultrafine 2 Dots 3 Dashes";
+ Text[ japanese ] = "‹Éׂ̓ñ“_ŽO”jü";
+ Text[ korean ] = "¹Ì¼¼ÇÑ 2 Á¡°ú 3 ´ë½Ã";
+ Text[ chinese_simplified ] = "³¬Ï¸2µã3»®Ïß";
+ Text[ chinese_traditional ] = "¶W²Ó¨âÂI¤T¦E½u";
+ Text[ arabic ] = "2 äÞØÉ 3 ÔÑØ¡ ÑÝíÚÉ ÌÏÇð";
+ Text[ turkish ] = "Çok ince 2 nokta 3 çizgi";
+};
+String RID_SVXSTR_DASH3
+{
+ Text = "Fein gepunktet";
+ Text [ ENGLISH ] = "Fine Dotted";
+ Text [ english_us ] = "Fine dotted";
+ Text[ portuguese ] = "Pontilhado fino";
+ Text[ russian ] = "Ìåëêèå òî÷êè";
+ Text[ greek ] = "Ôåëåßåò (ëåðôÝò)";
+ Text[ dutch ] = "Fijn gestippeld";
+ Text[ french ] = "Fine pointillée";
+ Text[ spanish ] = "Punteado fino";
+ Text[ italian ] = "A punti fini";
+ Text[ danish ] = "Fin punkteret";
+ Text[ swedish ] = "Fint prickig";
+ Text[ polish ] = "Delikatne kropki";
+ Text[ portuguese_brazilian ] = "Fine Dotted";
+ Text[ japanese ] = "ׂ©‚¢“_ü";
+ Text[ korean ] = "°¡´Â Á¡";
+ Text[ chinese_simplified ] = "ϸµãÏß";
+ Text[ chinese_traditional ] = "²ÓÂI";
+ Text[ arabic ] = "äÞÇØ ÑÝíÚÉ";
+ Text[ turkish ] = "Ýnce noktalý";
+};
+String RID_SVXSTR_DASH4
+{
+ Text = "Strich mit feinen Punkten";
+ Text [ ENGLISH ] = "Line with Fine Dots";
+ Text [ english_us ] = "Line with fine dots";
+ Text[ portuguese ] = "Traço com pontos finos";
+ Text[ russian ] = "Ëèíèÿ ñ ìåëêèìè òî÷êàìè";
+ Text[ greek ] = "ÃñáììÞ ìå ëåðôÝò ôåëåßåò";
+ Text[ dutch ] = "Lijn met fijne puntjes";
+ Text[ french ] = "Trait avec des points fins";
+ Text[ spanish ] = "Trazo con puntos finos";
+ Text[ italian ] = "Linea con punti fini";
+ Text[ danish ] = "Streg med fine prikker";
+ Text[ swedish ] = "Streck med fina prickar";
+ Text[ polish ] = "Kreska z delikatnymi kropkami";
+ Text[ portuguese_brazilian ] = "Line with Fine Dots";
+ Text[ japanese ] = "ׂ©‚¢“_‚ÌW‚Ü‚Á‚½ü";
+ Text[ korean ] = "°¡´Â Á¡À¸·Î µÈ ¼±";
+ Text[ chinese_simplified ] = "ϸµã»®Ïß";
+ Text[ chinese_traditional ] = "²ÓÂI½u±ø";
+ Text[ arabic ] = "ÎØ Ðæ äÞÇØ ÑÝíÚÉ";
+ Text[ turkish ] = "Ýnce noktalý çizgi";
+};
+String RID_SVXSTR_DASH5
+{
+ Text = "Fein gestrichelt (variabel)";
+ Text [ ENGLISH ] = "Fine Dashed (var)";
+ Text [ english_us ] = "Fine dashed (variable)";
+ Text[ portuguese ] = "Tracejado fino (variável)";
+ Text[ russian ] = "Òîíêàÿ ïóíêòèðíàÿ (èçì.)";
+ Text[ greek ] = "ËåðôÝò ðáýëåò (ìåôáâëçôÜ)";
+ Text[ dutch ] = "Fijne streepjes (variabel)";
+ Text[ french ] = "Fine discontinue (variable)";
+ Text[ spanish ] = "Trazos finos (variable)";
+ Text[ italian ] = "A tratti fini (var)";
+ Text[ danish ] = "Fin stiplet (variabel)";
+ Text[ swedish ] = "Fint streckad (variabel)";
+ Text[ polish ] = "Cienkie kreski (zmienne)";
+ Text[ portuguese_brazilian ] = "Fine Dashed (var)";
+ Text[ japanese ] = "ׂ©‚¢”jü(‰Â•Ï)";
+ Text[ korean ] = "°¡´Â ´ë½Ã(À¯µ¿Àû)";
+ Text[ chinese_simplified ] = "ϸ»®Ïß (¿É±ä)";
+ Text[ chinese_traditional ] = "²ÓÂI¦E½u(¥iÅÜ)";
+ Text[ arabic ] = "ÔõÑØ ÑÝíÚÉ (ãÊÛíÑÉ)";
+ Text[ turkish ] = "Ýnce kesik çizgili (deðiþken)";
+};
+String RID_SVXSTR_DASH6
+{
+ Text = "3 Striche 3 Punkte (variabel)";
+ Text [ ENGLISH ] = "3 Dashes 3 Dots (var)";
+ Text [ english_us ] = "3 dashes 3 dots (variable)";
+ Text[ portuguese ] = "3 traços 3 pontos (variável)";
+ Text[ russian ] = "3 øòðèõà 3 òî÷êè (èçì.)";
+ Text[ greek ] = "3 ðáýëåò - 3 ôåëåßåò (ìåôáâëçôÜ)";
+ Text[ dutch ] = "3 streepjes 3 puntjes (variabel)";
+ Text[ french ] = "3 traits 3 points (variable)";
+ Text[ spanish ] = "3 trazos 3 puntos (variable)";
+ Text[ italian ] = "A 3 linee 3 punti (var)";
+ Text[ danish ] = "3 streger 3 punkter (variabel)";
+ Text[ swedish ] = "3 streck 3 prickar (variabel)";
+ Text[ polish ] = "3 kreski 3 kropki (zmienne)";
+ Text[ portuguese_brazilian ] = "3 Dashes 3 Dots (var)";
+ Text[ japanese ] = "3”jü3“_½ü(‰Â•Ï)";
+ Text[ korean ] = "3 ´ë½Ã 3 Á¡ (À¯µ¿Àû)";
+ Text[ chinese_simplified ] = "3 »® 3 µã (¿É±ä)";
+ Text[ chinese_traditional ] = "3 ¦E½u 3 ÂI(¥iÅÜ)";
+ Text[ arabic ] = "3 ÔõÑØ 3 äÞÇØ (ãÊÛíÑÉ)";
+ Text[ turkish ] = "3 çizgi 3 nokta (deðiþken)";
+};
+String RID_SVXSTR_DASH7
+{
+ Text = "Ultrafein gepunktet (variabel)";
+ Text [ ENGLISH ] = "Ultrafine Dotted (var)";
+ Text [ english_us ] = "Ultrafine dotted (variable)";
+ Text[ portuguese ] = "Pontilhado ultrafino (variável)";
+ Text[ russian ] = "Ìåëêèå òî÷êè (èçì.)";
+ Text[ greek ] = "Ôåëåßåò (ðïëý ëåðôÝò) (ìåôáâëçôÜ)";
+ Text[ dutch ] = "Ultrafijn gestippeld (variabel)";
+ Text[ french ] = "Ultrafine pointillée (variable)";
+ Text[ spanish ] = "Punteado ultrafino (variable)";
+ Text[ italian ] = "A punti finissimi (var)";
+ Text[ danish ] = "Ultrafin punkteret (variabel)";
+ Text[ swedish ] = "Mycket fint prickig (variabel)";
+ Text[ polish ] = "Bardzo delikatne kropki (zmienne)";
+ Text[ portuguese_brazilian ] = "Ultrafine Dotted (var)";
+ Text[ japanese ] = "‹Éׂ̓_ü(‰Â•Ï)";
+ Text[ korean ] = "¹Ì¼¼ÇÑ Á¡(À¯µ¿Àû)";
+ Text[ chinese_simplified ] = "³¬Ï¸µãÏß (¿É±ä)";
+ Text[ chinese_traditional ] = "¶W²ÓÂI(¥iÅÜ)";
+ Text[ arabic ] = "äÞÇØ ÑÝíÚÉ ÌÏÇð (ãÊÛíÑÉ)";
+ Text[ turkish ] = "Çok ince noktalý (deðiþken)";
+};
+String RID_SVXSTR_DASH8
+{
+ Text = "Linienstil 9";
+ Text [ ENGLISH ] = "Line Style 9";
+ Text [ english_us ] = "Line style 9";
+ Text[ portuguese ] = "Estilo de linha 9";
+ Text[ russian ] = "Ñòèëü ëèíèèè 9";
+ Text[ greek ] = "Óôõë ãñáììÞò 9";
+ Text[ dutch ] = "Lijntype 9";
+ Text[ french ] = "Style de ligne 9";
+ Text[ spanish ] = "Estilo de línea 9";
+ Text[ italian ] = "Stile linea 9";
+ Text[ danish ] = "Stregtype 9";
+ Text[ swedish ] = "Linjestil 9";
+ Text[ polish ] = "Styl linii 9";
+ Text[ portuguese_brazilian ] = "Line Style 9";
+ Text[ japanese ] = "ü‚̽À²Ù 9";
+ Text[ korean ] = "¼± À¯Çü 9";
+ Text[ chinese_simplified ] = "ÏßÌõʽÑù 9";
+ Text[ chinese_traditional ] = "½u±ø­·®æ 9";
+ Text[ arabic ] = "äãØ ÇáÎØ 9";
+ Text[ turkish ] = "Çizgi biçimi 9";
+};
+String RID_SVXSTR_DASH9
+{
+ Text = "2 Punkte 1 Strich";
+ Text [ ENGLISH ] = "2 Dots 1 Dash";
+ Text [ english_us ] = "2 dots 1 dash";
+ Text[ portuguese ] = "2 pontos 1 traço";
+ Text[ russian ] = "2 òî÷êè 1 øòðèõ";
+ Text[ greek ] = "2 ôåëåßåò - 1 ðáýëá";
+ Text[ dutch ] = "2 puntjes 1 streepje";
+ Text[ french ] = "2 points 1 trait";
+ Text[ spanish ] = "2 puntos 1 trazo";
+ Text[ italian ] = "A 2 punti 1 linea";
+ Text[ danish ] = "2 punkter 1 streg";
+ Text[ swedish ] = "2 prickar 1 streck";
+ Text[ polish ] = "2 kropki 1 kreska";
+ Text[ portuguese_brazilian ] = "2 Dots 1 Dash";
+ Text[ japanese ] = "2“_ 1ÀÞ¯¼­";
+ Text[ korean ] = "2 Á¡ 1 ´ë½Ã";
+ Text[ chinese_simplified ] = "2 µã 1 »®";
+ Text[ chinese_traditional ] = "2 ÂI 1 ¦E½u";
+ Text[ arabic ] = "2 äÞØÉ 1 ÔÑØÉ";
+ Text[ turkish ] = "2 nokta 1 çizgi";
+};
+String RID_SVXSTR_DASH10
+{
+ Text = "Gestrichelt (variabel)";
+ Text [ ENGLISH ] = "Dashed (var)";
+ Text [ english_us ] = "Dashed (variable)";
+ Text[ portuguese ] = "Pontilhado (variável)";
+ Text[ russian ] = "Ïóíêòèðíàÿ (èçì.)";
+ Text[ greek ] = "Ðáýëåò (ìåôáâëçôÜ)";
+ Text[ dutch ] = "Streepjes (variabel)";
+ Text[ french ] = "Discontinue (variable)";
+ Text[ spanish ] = "Trazos (variable)";
+ Text[ italian ] = "A tratti (var)";
+ Text[ danish ] = "Stiplet (variabel)";
+ Text[ swedish ] = "Streckad (variabel)";
+ Text[ polish ] = "Kreski (zmienne)";
+ Text[ portuguese_brazilian ] = "Dashed (var)";
+ Text[ japanese ] = "”jü(‰Â•Ï)";
+ Text[ korean ] = "´ë½Ã (À¯µ¿Àû)";
+ Text[ chinese_simplified ] = "»®Ïß (¿É±ä)";
+ Text[ chinese_traditional ] = "ÂI¦E½u(¥iÅÜ)";
+ Text[ arabic ] = "ÔõÑØ (ãÊÛíÑÉ)";
+ Text[ turkish ] = "Kesik çizgili (deðiþken)";
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Reference-strings for standard-line-end-table
+//
+
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND0_DEF
+{
+ Text = "Arrow concave";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND1_DEF
+{
+ Text = "Square 45";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND2_DEF
+{
+ Text = "Small Arrow";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND3_DEF
+{
+ Text = "Dimension Lines";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND4_DEF
+{
+ Text = "Double Arrow";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND5_DEF
+{
+ Text = "Rounded short Arrow";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND6_DEF
+{
+ Text = "Symmetric Arrow";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND7_DEF
+{
+ Text = "Line Arrow";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND8_DEF
+{
+ Text = "Rounded large Arrow";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND9_DEF
+{
+ Text = "Circle";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND10_DEF
+{
+ Text = "Square";
+};
+/* nicht uebersetzen */
+String RID_SVXSTR_LEND11_DEF
+{
+ Text = "Arrow";
+};
+
+String RID_SVXSTR_LEND0
+{
+ Text = "Pfeil konkav";
+ Text [ ENGLISH ] = "Arrow concave";
+ Text [ english_us ] = "Arrow concave";
+ Text[ portuguese ] = "Seta côncava";
+ Text[ russian ] = "Âîãíóòàÿ ñòðåëêà";
+ Text[ greek ] = "ÂÝëïò êïßëï";
+ Text[ dutch ] = "Pijl concave";
+ Text[ french ] = "Flèche concave";
+ Text[ spanish ] = "Flecha cóncava";
+ Text[ italian ] = "Freccia concava";
+ Text[ danish ] = "Pil konkav";
+ Text[ swedish ] = "Pil konkav";
+ Text[ polish ] = "Strza³ka wklês³a";
+ Text[ portuguese_brazilian ] = "Arrow concave";
+ Text[ japanese ] = "’†‚­‚Ú‚Ý‚Ì–îˆó";
+ Text[ korean ] = "¿À¸ñ È­»ìÇ¥";
+ Text[ chinese_simplified ] = "°¼ÐμýÍ·";
+ Text[ chinese_traditional ] = "½bÀY¥W§Î";
+ Text[ arabic ] = "Óåã ãÞÚÑ";
+ Text[ turkish ] = "Ýçbükey ok";
+};
+String RID_SVXSTR_LEND1
+{
+ Text = "Quadrat 45";
+ Text [ ENGLISH ] = "Square 45";
+ Text [ english_us ] = "Square 45";
+ Text[ portuguese ] = "Quadrado 45";
+ Text[ russian ] = "Êâàäðàò 45";
+ Text[ greek ] = "ÔåôñÜãùíï 45";
+ Text[ dutch ] = "Vierkant 45";
+ Text[ french ] = "Carré 45";
+ Text[ spanish ] = "Cuadrado 45";
+ Text[ italian ] = "Quadrato 45";
+ Text[ danish ] = "Kvadrat 45";
+ Text[ swedish ] = "Kvadrat 45";
+ Text[ polish ] = "Kwadrat 45";
+ Text[ portuguese_brazilian ] = "Square 45";
+ Text[ japanese ] = "^ŽlŠp 45“xŒXŽÎ";
+ Text[ korean ] = "Á¤»ç°¢Çü 45";
+ Text[ chinese_simplified ] = "Õý·½ÐÎ 45 ¶È";
+ Text[ chinese_traditional ] = "¥¿¤è§Î 45 «×";
+ Text[ arabic ] = "ãÑÈÚ 45";
+ Text[ turkish ] = "Kare 45";
+};
+String RID_SVXSTR_LEND2
+{
+ Text = "Schmaler Pfeil";
+ Text [ ENGLISH ] = "Small Arrow";
+ Text [ english_us ] = "Small arrow";
+ Text[ portuguese ] = "Seta estreita";
+ Text[ russian ] = "Îñòðîêîíå÷íàÿ ñòðåëêà";
+ Text[ greek ] = "Ëåðôü âÝëïò";
+ Text[ dutch ] = "Smalle pijl";
+ Text[ french ] = "Flèche étroite";
+ Text[ spanish ] = "Flecha estrecha";
+ Text[ italian ] = "Freccia piccola";
+ Text[ danish ] = "Smal pil";
+ Text[ swedish ] = "Smal pil";
+ Text[ polish ] = "Cienka strza³ka";
+ Text[ portuguese_brazilian ] = "Small Arrow";
+ Text[ japanese ] = "’·×‚¢–îˆó";
+ Text[ korean ] = "°¡´Â È­»ìÇ¥";
+ Text[ chinese_simplified ] = "ϸ¼ýÍ·";
+ Text[ chinese_traditional ] = "²Ó¤p½bÀY";
+ Text[ arabic ] = "Óåã ÑÝíÚ";
+ Text[ turkish ] = "Ýnce ok";
+};
+String RID_SVXSTR_LEND3
+{
+ Text = "Bemaßungsenden";
+ Text [ ENGLISH ] = "Dimension Lines";
+ Text [ english_us ] = "Dimension lines";
+ Text[ portuguese ] = "Linhas de dimensionamento";
+ Text[ russian ] = "Ëèíèÿ äëÿ ðàçìåðîâ";
+ Text[ greek ] = "ÃñáììÝò äéáóôáóéïëüãçóçò";
+ Text[ dutch ] = "Afmetingseinden";
+ Text[ french ] = "Extrémités de cotation";
+ Text[ spanish ] = "Fines de dimensionamiento";
+ Text[ italian ] = "Estremità quotatura";
+ Text[ danish ] = "Dimensioneringsstreger";
+ Text[ swedish ] = "Dimensioneringsändar";
+ Text[ polish ] = "Koñce wymiarowania";
+ Text[ portuguese_brazilian ] = "Dimension Lines";
+ Text[ japanese ] = "¡–@ü‚ÌI“_";
+ Text[ korean ] = "Ä¡¼ö¼±";
+ Text[ chinese_simplified ] = "³ß´çÏßÌõ";
+ Text[ chinese_traditional ] = "¤Ø«×½u±ø";
+ Text[ arabic ] = "ÎØæØ ÞíÇÓ";
+ Text[ turkish ] = "Boyutlandýrma çizgileri";
+};
+String RID_SVXSTR_LEND4
+{
+ Text = "Doppelpfeil";
+ Text [ ENGLISH ] = "Double Arrow";
+ Text [ english_us ] = "Double Arrow";
+ Text[ portuguese ] = "Seta dupla";
+ Text[ russian ] = "Äâîéíàÿ ñòðåëêà";
+ Text[ greek ] = "Äéðëü âÝëïò";
+ Text[ dutch ] = "Dubbele pijl";
+ Text[ french ] = "Double flèche";
+ Text[ spanish ] = "Flecha doble";
+ Text[ italian ] = "Freccia doppia";
+ Text[ danish ] = "Dobbeltpil";
+ Text[ swedish ] = "Dubbel pil";
+ Text[ polish ] = "Podwójna strza³ka";
+ Text[ portuguese_brazilian ] = "Double Arrow";
+ Text[ japanese ] = "“ñd–îˆó";
+ Text[ korean ] = "ÀÌÁß È­»ìÇ¥";
+ Text[ chinese_simplified ] = "Ë«¼ýÍ·";
+ Text[ chinese_traditional ] = "Âù½bÀY";
+ Text[ arabic ] = "Óåã ãÒÏæÌ";
+ Text[ turkish ] = "Ýki uçlu ok";
+};
+String RID_SVXSTR_LEND5
+{
+ Text = "Abgerundeter kurzer Pfeil";
+ Text [ ENGLISH ] = "Rounded short Arrow";
+ Text [ english_us ] = "Rounded short arrow";
+ Text[ portuguese ] = "Seta curta arredondada";
+ Text[ russian ] = "Çàêðóãëåííàÿ êîðîòêàÿ ñòðåëêà";
+ Text[ greek ] = "ÓôñïããõëåõìÝíï êïíôü âÝëïò";
+ Text[ dutch ] = "Afgeronde korte pijl";
+ Text[ french ] = "Flèche courte arrondie";
+ Text[ spanish ] = "Flecha corta redondeada";
+ Text[ italian ] = "Freccia corta arrotondata";
+ Text[ danish ] = "Afrundet kort pil";
+ Text[ swedish ] = "Avrundad kort pil";
+ Text[ polish ] = "Zaokr. krótka strza³ka";
+ Text[ portuguese_brazilian ] = "Rounded short Arrow";
+ Text[ japanese ] = "æ‚ÌŠÛ‚¢’Z‚©‚ß‚Ì–îˆó";
+ Text[ korean ] = "µÕ±Û¸° ªÀº È­»ìÇ¥";
+ Text[ chinese_simplified ] = "Ô²Ðζ̼ýÍ·";
+ Text[ chinese_traditional ] = "¶ê§Îµu½bÀY";
+ Text[ arabic ] = "Óåã ÞÕíÑ ãÓÊÏíÑ";
+ Text[ turkish ] = "Yuvarlatýlmýþ kýsa ok";
+};
+String RID_SVXSTR_LEND6
+{
+ Text = "Symmetrischer Pfeil";
+ Text [ ENGLISH ] = "Symmetric Arrow";
+ Text [ english_us ] = "Symmetric arrow";
+ Text[ portuguese ] = "Seta simétrica";
+ Text[ russian ] = "Ñèììåòðè÷íàÿ ñòðåëêà";
+ Text[ greek ] = "Óõììåôñéêü âÝëïò";
+ Text[ dutch ] = "Symmetrische pijl";
+ Text[ french ] = "Flèche symétrique";
+ Text[ spanish ] = "Flecha simétrica";
+ Text[ italian ] = "Freccia simmetrica";
+ Text[ danish ] = "Symmetrisk pil";
+ Text[ swedish ] = "Symmetrisk pil";
+ Text[ polish ] = "Symetryczna strza³ka";
+ Text[ portuguese_brazilian ] = "Symmetric Arrow";
+ Text[ japanese ] = "ƒoƒ‰ƒ“ƒX‚̂Ƃꂽ–îˆó";
+ Text[ korean ] = "´ëĪ È­»ìÇ¥";
+ Text[ chinese_simplified ] = "¶Ô³Æ¼ýÍ·";
+ Text[ chinese_traditional ] = "¹ïºÙ¦¡½bÀY";
+ Text[ arabic ] = "Óåã ãÊäÇÓÞ";
+ Text[ turkish ] = "Simetrik ok";
+};
+String RID_SVXSTR_LEND7
+{
+ Text = "Linien-Pfeil";
+ Text [ ENGLISH ] = "Line Arrow";
+ Text [ english_us ] = "Line arrow";
+ Text[ portuguese ] = "Linha-seta";
+ Text[ russian ] = "Ñòðåëêà â âèäå ëèíèè";
+ Text[ greek ] = "ÃñáììÞ-âÝëïò";
+ Text[ dutch ] = "Lijn-pijl";
+ Text[ french ] = "Ligne fléchée";
+ Text[ spanish ] = "Flecha línea";
+ Text[ italian ] = "Linea freccia";
+ Text[ danish ] = "Streg-pil";
+ Text[ swedish ] = "Linjepil";
+ Text[ polish ] = "Strza³ka w postaci linii";
+ Text[ portuguese_brazilian ] = "Line Arrow";
+ Text[ japanese ] = "üó‚Ì–îˆó";
+ Text[ korean ] = "¼± È­»ìÇ¥";
+ Text[ chinese_simplified ] = "ÏßÌõ¼ýÍ·";
+ Text[ chinese_traditional ] = "¦E½u½bÀY";
+ Text[ arabic ] = "Óåã ÎØí";
+ Text[ turkish ] = "Çizgili ok";
+};
+String RID_SVXSTR_LEND8
+{
+ Text = "Abgerundeter langer Pfeil";
+ Text [ ENGLISH ] = "Rounded large Arrow";
+ Text [ english_us ] = "Rounded large arrow";
+ Text[ portuguese ] = "Seta longa arredondada";
+ Text[ russian ] = "Çàêðóãëåííàÿ äëèííàÿ ñòðåëêà";
+ Text[ greek ] = "ÓôñïããõëåõìÝíï ìáêñý âÝëïò";
+ Text[ dutch ] = "Afgeronde lange pijl";
+ Text[ french ] = "Flèche longue arrondie";
+ Text[ spanish ] = "Flecha larga redondeada";
+ Text[ italian ] = "Freccia lunga arrotondata";
+ Text[ danish ] = "Afrundet lang pil";
+ Text[ swedish ] = "Avrundad stor pil";
+ Text[ polish ] = "Zaokr. d³uga strza³ka";
+ Text[ portuguese_brazilian ] = "Rounded large Arrow";
+ Text[ japanese ] = "æ‚ÌŠÛ‚¢’·‚ß‚Ì–îˆó";
+ Text[ korean ] = "µÕ±Û¸° ±ä È­»ìÇ¥";
+ Text[ chinese_simplified ] = "Ô²Ðγ¤¼ýÍ·";
+ Text[ chinese_traditional ] = "¶ê§Î¤j½bÀY";
+ Text[ arabic ] = "Óåã Øæíá ãÓÊÏíÑ";
+ Text[ turkish ] = "Yuvarlatýlmýþ uzun ok";
+};
+String RID_SVXSTR_LEND9
+{
+ Text = "Kreis";
+ Text [ ENGLISH ] = "Circle";
+ Text [ english_us ] = "Circle";
+ Text[ portuguese ] = "Círculo";
+ Text[ russian ] = "Êðóã";
+ Text[ greek ] = "Êýêëïò";
+ Text[ dutch ] = "Circle";
+ Text[ french ] = "Cercle";
+ Text[ spanish ] = "Círculo";
+ Text[ italian ] = "Cerchio";
+ Text[ danish ] = "Cirkel";
+ Text[ swedish ] = "Cirkel";
+ Text[ polish ] = "Ko³o";
+ Text[ portuguese_brazilian ] = "Circle";
+ Text[ japanese ] = "ŠÛˆó";
+ Text[ korean ] = "¿ø";
+ Text[ chinese_simplified ] = "Ô²";
+ Text[ chinese_traditional ] = "¶ê§Î";
+ Text[ arabic ] = "ÏÇÆÑÉ";
+ Text[ turkish ] = "Daire";
+};
+String RID_SVXSTR_LEND10
+{
+ Text = "Quadrat";
+ Text [ ENGLISH ] = "Square";
+ Text [ english_us ] = "Square";
+ Text[ portuguese ] = "Quadrado";
+ Text[ russian ] = "Êâàäðàò";
+ Text[ greek ] = "ÔåôñÜãùíï";
+ Text[ dutch ] = "Vierkant";
+ Text[ french ] = "Carré";
+ Text[ spanish ] = "Cuadrado";
+ Text[ italian ] = "Quadrato";
+ Text[ danish ] = "Kvadrat";
+ Text[ swedish ] = "Kvadrat";
+ Text[ polish ] = "Kwadrat";
+ Text[ portuguese_brazilian ] = "Square";
+ Text[ japanese ] = "^ŽlŠp";
+ Text[ korean ] = "Á¤»ç°¢Çü";
+ Text[ chinese_simplified ] = "Õý·½ÐÎ";
+ Text[ chinese_traditional ] = "¥¿¤è§Î";
+ Text[ arabic ] = "ãÑÈÚ";
+ Text[ turkish ] = "Kare";
+};
+String RID_SVXSTR_LEND11
+{
+ Text = "Pfeil";
+ Text [ ENGLISH ] = "Arrow";
+ Text [ english_us ] = "Arrow";
+ Text[ portuguese ] = "Seta";
+ Text[ russian ] = "Ñòðåëêà";
+ Text[ greek ] = "ÂÝëïò";
+ Text[ dutch ] = "Pijl";
+ Text[ french ] = "Flèche";
+ Text[ spanish ] = "Flecha";
+ Text[ italian ] = "Freccia";
+ Text[ danish ] = "Pil";
+ Text[ swedish ] = "Pil";
+ Text[ polish ] = "Strza³ka";
+ Text[ portuguese_brazilian ] = "Arrow";
+ Text[ japanese ] = "–îˆó";
+ Text[ korean ] = "È­»ìÇ¥";
+ Text[ chinese_simplified ] = "¼ýÍ·";
+ Text[ chinese_traditional ] = "½bÀY";
+ Text[ arabic ] = "Óåã";
+ Text[ turkish ] = "Ok";
+};
+
+
+ // ********************************************************************** EOF
+
diff --git a/svx/source/dialog/simptabl.cxx b/svx/source/dialog/simptabl.cxx
new file mode 100644
index 0000000000..396c87f3c7
--- /dev/null
+++ b/svx/source/dialog/simptabl.cxx
@@ -0,0 +1,599 @@
+/*************************************************************************
+ *
+ * $RCSfile: simptabl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "simptabl.hxx"
+#include <vcl/svapp.hxx>
+
+
+// SvxSimpTblContainer ------------------------------------------------------
+
+SvxSimpTblContainer::SvxSimpTblContainer( Window* pParent, WinBits nWinStyle):
+ Control(pParent,nWinStyle)
+{
+ //Do Nothing;
+}
+
+SvxSimpTblContainer::SvxSimpTblContainer( Window* pParent, const ResId& rResId):
+ Control(pParent,rResId)
+{
+ //Do Nothing;
+}
+
+long SvxSimpTblContainer::PreNotify( NotifyEvent& rNEvt )
+{
+ long nResult=TRUE;
+
+ USHORT nSwitch=rNEvt.GetType();
+ if(nSwitch==EVENT_KEYINPUT)
+ {
+ const KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode();
+ USHORT nKey=aKeyCode.GetCode();
+ if(nKey==KEY_TAB)
+ {
+ GetParent()->Notify(rNEvt);
+ }
+ else
+ nResult=Control::PreNotify(rNEvt);
+ }
+ else
+ nResult=Control::PreNotify(rNEvt);
+
+ return nResult;
+}
+
+
+// SvxSimpleTable ------------------------------------------------------------
+
+SvxSimpleTable::SvxSimpleTable( Window* pParent,WinBits nBits ):
+ SvTabListBox(pParent,WB_CLIPCHILDREN | WB_HSCROLL | WB_TABSTOP),
+ aPrivContainer(pParent,nBits|WB_DIALOGCONTROL),
+ aHeaderBar(pParent,WB_BUTTONSTYLE | WB_BORDER | WB_TABSTOP),
+ bResizeFlag(FALSE),
+ bPaintFlag(TRUE),
+ nHeaderItemId(1)
+{
+ bSortDirection=TRUE;
+ nSortCol=0xFFFF;
+ nOldPos=0;
+
+ SetParent(&aPrivContainer);
+ aHeaderBar.SetParent(&aPrivContainer);
+
+ aHeaderBar.SetStartDragHdl(LINK( this, SvxSimpleTable, StartDragHdl));
+ aHeaderBar.SetDragHdl(LINK( this, SvxSimpleTable, DragHdl));
+ aHeaderBar.SetEndDragHdl(LINK( this, SvxSimpleTable, EndDragHdl));
+ aHeaderBar.SetSelectHdl(LINK( this, SvxSimpleTable, HeaderBarClick));
+ aHeaderBar.SetDoubleClickHdl(LINK( this, SvxSimpleTable, HeaderBarDblClick));
+
+ aHeaderBar.Show();
+ SvTabListBox::Show();
+}
+
+
+SvxSimpleTable::SvxSimpleTable( Window* pParent,const ResId& rResId):
+ SvTabListBox(pParent,WB_CLIPCHILDREN | WB_HSCROLL | WB_TABSTOP),
+ aPrivContainer(pParent,rResId),
+ aHeaderBar(pParent,WB_BUTTONSTYLE | WB_BORDER | WB_TABSTOP),
+ bResizeFlag(TRUE),
+ bPaintFlag(TRUE),
+ nHeaderItemId(1)
+{
+
+ bSortDirection=TRUE;
+ nOldPos=0;
+ nSortCol=0xFFFF;
+
+ pMyParentWin=pParent;
+ SetParent(&aPrivContainer);
+ aHeaderBar.SetParent(&aPrivContainer);
+
+ WinBits nBits=aPrivContainer.GetStyle()|WB_DIALOGCONTROL;
+ aPrivContainer.SetStyle(nBits);
+
+ aHeaderBar.SetStartDragHdl(LINK( this, SvxSimpleTable, StartDragHdl));
+ aHeaderBar.SetDragHdl(LINK( this, SvxSimpleTable, DragHdl));
+ aHeaderBar.SetEndDragHdl(LINK( this, SvxSimpleTable, EndDragHdl));
+ aHeaderBar.SetSelectHdl(LINK( this, SvxSimpleTable, HeaderBarClick));
+ aHeaderBar.SetDoubleClickHdl(LINK( this, SvxSimpleTable, HeaderBarDblClick));
+
+ Size theWinSize=aPrivContainer.GetOutputSizePixel();
+ Size HbSize=aHeaderBar.GetSizePixel();
+
+ HbSize.Width()=theWinSize.Width();
+ theWinSize.Height()-=HbSize.Height();
+ Point thePos(0,0);
+
+ aHeaderBar.SetPosPixel(thePos);
+ aHeaderBar.SetSizePixel(HbSize);
+
+ thePos.Y()+=HbSize.Height();
+ SvTabListBox::SetPosPixel(thePos);
+ SvTabListBox::SetSizePixel(theWinSize);
+ aHeaderBar.Show();
+ SetWindowBits(WB_CLIPCHILDREN | WB_HSCROLL);
+ SvTabListBox::Show();
+}
+
+SvxSimpleTable::~SvxSimpleTable()
+{
+ SetParent(pMyParentWin);
+ aPrivContainer.SetParent(this);
+ aHeaderBar.SetParent(this);
+}
+
+
+void SvxSimpleTable::UpdateViewSize()
+{
+ Size theWinSize=aPrivContainer.GetOutputSizePixel();
+ Size HbSize=aHeaderBar.GetSizePixel();
+
+ HbSize.Width()=theWinSize.Width();
+ theWinSize.Height()-=HbSize.Height();
+ Point thePos(0,0);
+
+ aHeaderBar.SetPosPixel(thePos);
+ aHeaderBar.SetSizePixel(HbSize);
+
+ thePos.Y()+=HbSize.Height();
+ SvTabListBox::SetPosPixel(thePos);
+ SvTabListBox::SetSizePixel(theWinSize);
+ Invalidate();
+}
+
+void SvxSimpleTable::NotifyScrolled()
+{
+ long nOffset=-GetXOffset();
+ if(nOldPos!=nOffset)
+ {
+ aHeaderBar.SetOffset(nOffset);
+ aHeaderBar.Invalidate();
+ aHeaderBar.Update();
+ nOldPos=nOffset;
+ }
+ SvTabListBox::NotifyScrolled();
+}
+
+void SvxSimpleTable::SetTabs()
+{
+ SvTabListBox::SetTabs();
+
+ USHORT nPrivTabCount=TabCount();
+ USHORT nPos=0;
+ USHORT nNewSize=(USHORT)GetTab(0);
+
+ if(nPrivTabCount)
+ {
+ if(nPrivTabCount>aHeaderBar.GetItemCount())
+ nPrivTabCount=aHeaderBar.GetItemCount();
+
+ USHORT i;
+ for(i=1;i<nPrivTabCount;i++)
+ {
+ nNewSize=GetTab(i)-nPos;
+ aHeaderBar.SetItemSize(i,nNewSize );
+ nPos=(USHORT) GetTab(i);
+ }
+ aHeaderBar.SetItemSize(i,HEADERBAR_FULLSIZE); // Da fuer letzten Eintrag kein Tab
+
+ }
+}
+void SvxSimpleTable::SetTabs( long* pTabs, MapUnit eMapUnit)
+{
+ SvTabListBox::SetTabs(pTabs,eMapUnit);
+}
+
+void SvxSimpleTable::Paint( const Rectangle& rRect )
+{
+ SvTabListBox::Paint(rRect );
+
+ USHORT nPrivTabCount=TabCount();
+ USHORT nPos=0;
+ USHORT nNewSize=(USHORT)GetTab(0);
+
+ long nOffset=-GetXOffset();
+ nOldPos=nOffset;
+
+ aHeaderBar.SetOffset(nOffset);
+ aHeaderBar.Invalidate();
+
+ if(nPrivTabCount && bPaintFlag)
+ {
+ if(nPrivTabCount>aHeaderBar.GetItemCount())
+ nPrivTabCount=aHeaderBar.GetItemCount();
+
+ for(USHORT i=1;i<nPrivTabCount;i++)
+ {
+ nNewSize=GetTab(i)-nPos;
+ aHeaderBar.SetItemSize(i,nNewSize );
+ nPos=(USHORT) GetTab(i);
+ }
+ }
+ bPaintFlag=TRUE;
+}
+void SvxSimpleTable::InsertHeaderEntry(const XubString& rText,USHORT nCol,
+ HeaderBarItemBits nBits)
+{
+ xub_StrLen nEnd = rText.Search( sal_Unicode( '\t' ) );
+ if( nEnd == STRING_NOTFOUND )
+ {
+ aHeaderBar.InsertItem(nHeaderItemId++, rText, 0, nBits, nCol);
+ }
+ else
+ {
+ xub_StrLen nCount = rText.GetTokenCount( sal_Unicode( '\t' ) );
+
+ for( xub_StrLen i=0; i<nCount; i++ )
+ {
+ String aString=rText.GetToken(i, sal_Unicode( '\t' ) );
+ aHeaderBar.InsertItem(nHeaderItemId++, aString, 0, nBits, nCol);
+ }
+ }
+ SetTabs();
+}
+
+void SvxSimpleTable::ClearAll()
+{
+ aHeaderBar.Clear();
+ Clear();
+}
+void SvxSimpleTable::ClearHeader()
+{
+ aHeaderBar.Clear();
+}
+
+void SvxSimpleTable::Show()
+{
+ aPrivContainer.Show();
+}
+
+void SvxSimpleTable::Hide()
+{
+ aPrivContainer.Show();
+}
+
+BOOL SvxSimpleTable::IsVisible() const
+{
+ return aPrivContainer.IsVisible();
+}
+
+void SvxSimpleTable::Enable()
+{
+ aPrivContainer.Enable();
+}
+
+void SvxSimpleTable::Disable()
+{
+ aPrivContainer.Disable();
+}
+
+BOOL SvxSimpleTable::IsEnabled() const
+{
+ return aPrivContainer.IsEnabled();
+}
+
+void SvxSimpleTable::ToTop()
+{
+ aPrivContainer.ToTop();
+}
+
+void SvxSimpleTable::SetPosPixel( const Point& rNewPos )
+{
+ aPrivContainer.SetPosPixel(rNewPos);
+}
+
+Point SvxSimpleTable::GetPosPixel() const
+{
+ return aPrivContainer.GetPosPixel();
+}
+
+void SvxSimpleTable::SetPosSizePixel( const Point& rNewPos, Size& rNewSize )
+{
+ aPrivContainer.SetPosPixel(rNewPos);
+ aPrivContainer.SetSizePixel(rNewSize);
+}
+
+void SvxSimpleTable::SetPosSize( const Point& rNewPos, const Size& rNewSize )
+{
+ aPrivContainer.SetPosPixel(rNewPos);
+ SvTabListBox::SetPosSizePixel(rNewPos,rNewSize);
+}
+
+Size SvxSimpleTable::GetSizePixel() const
+{
+ return aPrivContainer.GetSizePixel();
+}
+
+Size SvxSimpleTable::GetOutputSizePixel() const
+{
+ return aPrivContainer.GetOutputSizePixel();
+}
+
+void SvxSimpleTable::SetSizePixel(const Size& rNewSize )
+{
+ aPrivContainer.SetSizePixel(rNewSize);
+ UpdateViewSize();
+}
+
+void SvxSimpleTable::SetOutputSizePixel(const Size& rNewSize )
+{
+ aPrivContainer.SetOutputSizePixel(rNewSize);
+ UpdateViewSize();
+}
+
+USHORT SvxSimpleTable::GetSelectedCol()
+{
+ return (aHeaderBar.GetCurItemId()-1);
+}
+
+void SvxSimpleTable::SortByCol(USHORT nCol,BOOL bDir)
+{
+ bSortDirection=bDir;
+ if(nSortCol!=0xFFFF)
+ aHeaderBar.SetItemBits(nSortCol+1,HIB_STDSTYLE);
+
+ if (nCol != 0xFFFF)
+ {
+ if(bDir)
+ {
+ aHeaderBar.SetItemBits( nCol+1, HIB_STDSTYLE | HIB_DOWNARROW);
+ GetModel()->SetSortMode(SortAscending);
+ }
+ else
+ {
+ aHeaderBar.SetItemBits( nCol+1, HIB_STDSTYLE | HIB_UPARROW);
+ GetModel()->SetSortMode(SortDescending);
+ }
+ nSortCol=nCol;
+ GetModel()->SetCompareHdl( LINK( this, SvxSimpleTable, CompareHdl));
+ GetModel()->Resort();
+ }
+ else
+ GetModel()->SetSortMode(SortNone);
+ nSortCol=nCol;
+}
+
+void SvxSimpleTable::HBarClick()
+{
+ USHORT nId=aHeaderBar.GetCurItemId();
+
+ if (aHeaderBar.GetItemBits(nId) & HIB_CLICKABLE)
+ {
+ if(nId==nSortCol+1)
+ {
+ SortByCol(nId-1,!bSortDirection);
+ }
+ else
+ {
+ SortByCol(nId-1,bSortDirection);
+ }
+
+ aHeaderBarClickLink.Call(this);
+ }
+}
+
+void SvxSimpleTable::HBarDblClick()
+{
+ aHeaderBarDblClickLink.Call(this);
+}
+
+void SvxSimpleTable::HBarStartDrag()
+{
+ if(!aHeaderBar.IsItemMode())
+ {
+ Rectangle aSizeRect(Point(0,0),
+ SvTabListBox::GetOutputSizePixel());
+ aSizeRect.Left()=-GetXOffset()+aHeaderBar.GetDragPos();
+ aSizeRect.Right()=-GetXOffset()+aHeaderBar.GetDragPos();
+ ShowTracking( aSizeRect, SHOWTRACK_SPLIT );
+ }
+}
+void SvxSimpleTable::HBarDrag()
+{
+ HideTracking();
+ if(!aHeaderBar.IsItemMode())
+ {
+ Rectangle aSizeRect(Point(0,0),
+ SvTabListBox::GetOutputSizePixel());
+ aSizeRect.Left()=-GetXOffset()+aHeaderBar.GetDragPos();
+ aSizeRect.Right()=-GetXOffset()+aHeaderBar.GetDragPos();
+ ShowTracking( aSizeRect, SHOWTRACK_SPLIT );
+ }
+}
+void SvxSimpleTable::HBarEndDrag()
+{
+ HideTracking();
+ USHORT nPrivTabCount=TabCount();
+ USHORT nPos=0;
+ USHORT nNewSize=0;
+
+ if(nPrivTabCount)
+ {
+ if(nPrivTabCount>aHeaderBar.GetItemCount())
+ nPrivTabCount=aHeaderBar.GetItemCount();
+
+ //for(USHORT i=1;i<=nPrivTabCount;i++)
+ for(USHORT i=1;i<nPrivTabCount;i++)
+ {
+ nNewSize=aHeaderBar.GetItemSize(i)+nPos;
+ SetTab(i,nNewSize,MAP_PIXEL);
+ nPos=nNewSize;
+ }
+ }
+ bPaintFlag=FALSE;
+ Invalidate();
+ Update();
+}
+
+CommandEvent SvxSimpleTable::GetCommandEvent() const
+{
+ return aCEvt;
+}
+
+void SvxSimpleTable::Command( const CommandEvent& rCEvt )
+{
+ aCEvt=rCEvt;
+ aCommandLink.Call(this);
+ SvTabListBox::Command(rCEvt);
+}
+
+IMPL_LINK( SvxSimpleTable, StartDragHdl, HeaderBar*, pCtr)
+{
+ if(pCtr==&aHeaderBar)
+ {
+ HBarStartDrag();
+ }
+ return 0;
+}
+
+IMPL_LINK( SvxSimpleTable, DragHdl, HeaderBar*, pCtr)
+{
+ if(pCtr==&aHeaderBar)
+ {
+ HBarDrag();
+ }
+ return 0;
+}
+
+IMPL_LINK( SvxSimpleTable, EndDragHdl, HeaderBar*, pCtr)
+{
+ if(pCtr==&aHeaderBar)
+ {
+ HBarEndDrag();
+ }
+ return 0;
+}
+
+IMPL_LINK( SvxSimpleTable, HeaderBarClick, HeaderBar*, pCtr)
+{
+ if(pCtr==&aHeaderBar)
+ {
+ HBarClick();
+ }
+ return 0;
+}
+
+IMPL_LINK( SvxSimpleTable, HeaderBarDblClick, HeaderBar*, pCtr)
+{
+ if(pCtr==&aHeaderBar)
+ {
+ HBarDblClick();
+ }
+ return 0;
+}
+
+SvLBoxItem* SvxSimpleTable::GetEntryAtPos( SvLBoxEntry* pEntry, USHORT nPos ) const
+{
+ DBG_ASSERT(pEntry,"GetEntryText:Invalid Entry");
+ SvLBoxItem* pItem = NULL;
+
+ if( pEntry )
+ {
+ USHORT nCount = pEntry->ItemCount();
+
+ nPos++;
+
+ if( nTreeFlags & TREEFLAG_CHKBTN ) nPos++;
+
+ if( nPos < nCount )
+ {
+ pItem = pEntry->GetItem( nPos);
+ }
+ }
+ return pItem;
+}
+
+StringCompare SvxSimpleTable::ColCompare(SvLBoxEntry* pLeft,SvLBoxEntry* pRight)
+{
+ StringCompare eCompare=COMPARE_EQUAL;
+
+ SvLBoxItem* pLeftItem = GetEntryAtPos( pLeft, nSortCol);
+ SvLBoxItem* pRightItem = GetEntryAtPos( pRight, nSortCol);
+
+
+ if(pLeftItem != NULL && pRightItem != NULL)
+ {
+ USHORT nLeftKind=pLeftItem->IsA();
+ USHORT nRightKind=pRightItem->IsA();
+
+ if(nRightKind == SV_ITEM_ID_LBOXSTRING &&
+ nLeftKind == SV_ITEM_ID_LBOXSTRING )
+ {
+ const International& rInter = GetpApp()->GetAppInternational();
+
+ eCompare=rInter.Compare( ((SvLBoxString*)pLeftItem)->GetText(),
+ ((SvLBoxString*)pRightItem)->GetText());
+
+ if(eCompare==COMPARE_EQUAL) eCompare=COMPARE_LESS;
+ }
+ }
+ return eCompare;
+}
+
+IMPL_LINK( SvxSimpleTable, CompareHdl, SvSortData*, pData)
+{
+ SvLBoxEntry* pLeft = (SvLBoxEntry*)(pData->pLeft );
+ SvLBoxEntry* pRight = (SvLBoxEntry*)(pData->pRight );
+ return (long) ColCompare(pLeft,pRight);
+}
+
+
diff --git a/svx/source/dialog/splwrap.cxx b/svx/source/dialog/splwrap.cxx
new file mode 100644
index 0000000000..f9bbab0af9
--- /dev/null
+++ b/svx/source/dialog/splwrap.cxx
@@ -0,0 +1,682 @@
+/*************************************************************************
+ *
+ * $RCSfile: splwrap.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ---------------------------------------------------------------
+
+#ifndef _RTL_USTRING_HXX_
+#include<rtl/ustring.hxx>
+#endif
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen wg. DBG_ASSERT
+#include <tools/debug.hxx>
+#endif
+
+
+#define _SVSTDARR_USHORTS
+#define _SVSTDARR_USHORTSSORT
+#ifndef _SVARRAY_HXX
+#include <svtools/svstdarr.hxx>
+#endif
+
+#ifndef __RSC
+#include <tools/errinf.hxx>
+#endif
+#ifndef _SVXERR_HXX
+#include <svxerr.hxx>
+#endif
+#ifndef _SVX_DLGUTIL_HXX
+#include <dlgutil.hxx>
+#endif
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.hxx>
+#endif
+#ifndef _SFX_SFXUNO_HXX
+#include <sfx2/sfxuno.hxx>
+#endif
+#ifndef _LINGU_LNGPROPS_HHX_
+#include <lingu/lngprops.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_
+#include <com/sun/star/frame/XStorable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARY1_HPP_
+#include <com/sun/star/linguistic/XDictionary1.hpp>
+#endif
+
+
+
+#include "svxenum.hxx"
+#include "spldlg.hxx" // Der SpellDialog
+#include "hyphen.hxx" // Der HyphenDialog
+#include "splwrap.hxx" // Der Wrapper
+#include "thesdlg.hxx" // ThesaurusDlg
+#include "dialmgr.hxx"
+
+#include "dialogs.hrc"
+
+#define WAIT_ON() pWin->EnterWait()
+#define WAIT_OFF() pWin->LeaveWait()
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::linguistic;
+/*--------------------------------------------------------------------
+ * Beschreibung: Ctor, die Pruefreihenfolge wird festgelegt
+ *
+ * !bStart && !bOtherCntnt: BODY_END, BODY_START, OTHER
+ * !bStart && bOtherCntnt: OTHER, BODY
+ * bStart && !bOtherCntnt: BODY_END, OTHER
+ * bStart && bOtherCntnt: OTHER
+ *
+ --------------------------------------------------------------------*/
+
+SvxSpellWrapper::SvxSpellWrapper( Window* pWn,
+ Reference< XSpellChecker1 > &xSpellChecker,
+ const sal_Bool bStart, const sal_Bool bIsAllRight,
+ const sal_Bool bOther, const sal_Bool bRevAllow ) :
+
+ pWin ( pWn ),
+ xSpell ( xSpellChecker ),
+ bOtherCntnt ( bOther ),
+ bDialog ( sal_False ),
+ bHyphen ( sal_False ),
+ bAuto ( sal_False ),
+ bStartChk ( bOther ),
+ bRevAllowed ( bRevAllow )
+{
+ Reference< beans::XPropertySet > xProp( SvxGetLinguPropertySet() );
+ sal_Bool bWrapReverse = xProp.is() ?
+ *(sal_Bool*)xProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(UPN_IS_WRAP_REVERSE) ).getValue()
+ : sal_False;
+ bReverse = bRevAllow && bWrapReverse;
+ bAllRight = bIsAllRight;
+ bStartDone = bOther || ( !bReverse && bStart );
+ bEndDone = bReverse && bStart && !bOther;
+}
+
+// -----------------------------------------------------------------------
+
+SvxSpellWrapper::SvxSpellWrapper( Window* pWn,
+ Reference< XHyphenator > &xHyphenator,
+ const sal_Bool bStart, const sal_Bool bOther ) :
+ pWin ( pWn ),
+ xHyph ( xHyphenator ),
+ bOtherCntnt ( bOther ),
+ bDialog ( sal_False ),
+ bHyphen ( sal_False ),
+ bAuto ( sal_False ),
+ bStartDone ( bOther || ( !bReverse && bStart ) ),
+ bEndDone ( bReverse && bStart && !bOther ),
+ bStartChk ( bOther ),
+ bRevAllowed ( sal_False ),
+ bReverse ( sal_False )
+{
+}
+
+// -----------------------------------------------------------------------
+
+#define SVX_LANG_NEED_CHECK 0
+#define SVX_LANG_OK 1
+#define SVX_LANG_MISSING 2
+#define SVX_LANG_MISSING_DO_WARN 3
+
+#define SVX_FLAGS_NEW
+
+static SvUShortsSort _aLanguages(16, 16);
+static SvUShorts _aState(16, 16); // lowerbyte spell values,
+ // higherbyte hyph values
+
+sal_Int16 SvxSpellWrapper::CheckSpellLang(
+ Reference< XSpellChecker1 > xSpell, sal_Int16 nLang)
+{
+ DBG_ASSERT( _aLanguages.Count() == _aState.Count(), "inconsistent arrays");
+
+ sal_uInt16 nPos;
+ sal_Bool bFound = _aLanguages.Seek_Entry( nLang, &nPos );
+ sal_uInt16 nVal = bFound ? _aState.GetObject( nPos ) : 0;
+
+ if (!bFound)
+ {
+ _aLanguages.Insert( (sal_uInt16) nLang, nPos );
+ _aState.Insert( nVal , nPos );
+ }
+
+ if (SVX_LANG_NEED_CHECK == (nVal & 0x00FF))
+ {
+ sal_uInt16 nTmpVal = SVX_LANG_MISSING_DO_WARN;
+ if (xSpell.is() && xSpell->hasLanguage( nLang ))
+ nTmpVal = SVX_LANG_OK;
+ nVal &= 0xFF00;
+ nVal |= nTmpVal;
+
+ _aState.Replace( nVal , nPos );
+ }
+
+ return (sal_Int16) _aState.GetObject( nPos );
+}
+
+sal_Int16 SvxSpellWrapper::CheckHyphLang(
+ Reference< XHyphenator > xHyph, sal_Int16 nLang)
+{
+ DBG_ASSERT( _aLanguages.Count() == _aState.Count(), "inconsistent arrays");
+
+ sal_uInt16 nPos;
+ sal_Bool bFound = _aLanguages.Seek_Entry( nLang, &nPos );
+ sal_uInt16 nVal = bFound ? _aState.GetObject( nPos ) : 0;
+
+ if (!bFound)
+ {
+ _aLanguages.Insert( (sal_uInt16) nLang, nPos );
+ _aState.Insert( nVal , nPos );
+ }
+
+ if (SVX_LANG_NEED_CHECK == ((nVal >> 8) & 0x00FF))
+ {
+ sal_uInt16 nTmpVal = SVX_LANG_MISSING_DO_WARN;
+ if (xHyph.is() && xHyph->hasLocale( SvxCreateLocale( nLang ) ))
+ nTmpVal = SVX_LANG_OK;
+ nVal &= 0x00FF;
+ nVal |= nTmpVal << 8;
+
+ _aState.Replace( nVal , nPos );
+ }
+
+ return (sal_Int16) _aState.GetObject( nPos );
+}
+
+// -----------------------------------------------------------------------
+
+
+void SvxSpellWrapper::SpellStart( SvxSpellArea eSpell )
+{ // Hier muessen die notwendigen Vorbereitungen fuer SpellContinue
+} // im uebergebenen Bereich getroffen werden.
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxSpellWrapper::HasOtherCnt()
+{
+ return sal_False; // Gibt es ueberhaupt einen Sonderbereich?
+}
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxSpellWrapper::SpellMore()
+{
+ return sal_False; // Sollen weitere Dokumente geprueft werden?
+}
+
+// -----------------------------------------------------------------------
+
+
+void SvxSpellWrapper::SpellEnd()
+{ // Bereich ist abgeschlossen, ggf. Aufraeumen
+ DBG_ASSERT( _aLanguages.Count() == _aState.Count(), "inconsistent arrays");
+
+ sal_uInt16 nCount = _aLanguages.Count();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
+ {
+ sal_Int16 nLang = (sal_Int16) _aLanguages.GetObject( i );
+ sal_uInt16 nVal = _aState.GetObject( i );
+ sal_uInt16 nTmpSpell = nVal & 0x00FF;
+ sal_uInt16 nTmpHyph = (nVal >> 8) & 0x00FF;
+
+ if (SVX_LANG_MISSING_DO_WARN == nTmpSpell)
+ {
+ String aErr( ::GetLanguageString( nLang ) );
+ ErrorHandler::HandleError(
+ *new StringErrorInfo( ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aErr ) );
+ nTmpSpell = SVX_LANG_MISSING;
+ }
+ if (SVX_LANG_MISSING_DO_WARN == nTmpHyph)
+ {
+ String aErr( ::GetLanguageString( nLang ) );
+ ErrorHandler::HandleError(
+ *new StringErrorInfo( ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aErr ) );
+ nTmpHyph = SVX_LANG_MISSING;
+ }
+
+ _aState.Replace( (nTmpHyph << 8) | nTmpSpell, i );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxSpellWrapper::SpellContinue()
+{
+ return sal_False;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSpellWrapper::AutoCorrect( const String& rAktWord,
+ const String& rNewWord )
+{
+}
+
+// -----------------------------------------------------------------------
+
+
+void SvxSpellWrapper::ScrollArea()
+{ // Scrollarea einstellen
+}
+
+// -----------------------------------------------------------------------
+
+
+void SvxSpellWrapper::ChangeWord( const String& rNewWord, const sal_uInt16 nLang )
+{ // Wort ersetzen
+}
+
+// -----------------------------------------------------------------------
+
+
+String SvxSpellWrapper::GetThesWord()
+{
+ // Welches Wort soll nachgeschlagen werden?
+ return String();
+}
+
+// -----------------------------------------------------------------------
+
+
+void SvxSpellWrapper::ChangeThesWord( const String& )
+{
+ // Wort wg. Thesaurus ersetzen
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSpellWrapper::StartThesaurus( const String &rWord, sal_uInt16 nLanguage )
+{
+
+ String sErr( SVX_RES( RID_SVXSTR_HMERR_THESAURUS ) );
+
+ Reference< XThesaurus > xThes( SvxGetThesaurus() );
+ if (!xThes.is())
+ {
+ InfoBox( pWin, sErr ).Execute();
+ return;
+ }
+
+ WAIT_ON(); // while looking up for initial word
+ SvxThesaurusDialog aDlg(pWin, xThes, rWord, nLanguage);
+ WAIT_OFF();
+
+ if ( aDlg.Execute()== RET_OK )
+ {
+ if ( bDialog )
+ {
+ SvxSpellCheckDialog* pSplDlg = (SvxSpellCheckDialog*)GetWin();
+ pSplDlg->SetNewEditWord( aDlg.GetWord() );
+ pSplDlg->SetLanguage( aDlg.GetLanguage() );
+ }
+ else
+ {
+ ChangeThesWord( aDlg.GetWord() );
+ }
+ }
+
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSpellWrapper::ReplaceAll( const String &rNewText, sal_Int16 nLanguage )
+{ // Wort aus der Replace-Liste ersetzen
+}
+
+// -----------------------------------------------------------------------
+
+
+void SvxSpellWrapper::SetLanguage( const sal_uInt16 nLang )
+{ // Sprache aendern
+}
+
+// -----------------------------------------------------------------------
+
+
+void SvxSpellWrapper::InsertHyphen( const sal_uInt16 nPos )
+{ // Hyphen einfuegen bzw. loeschen
+}
+
+// -----------------------------------------------------------------------
+// Pruefung der Dokumentbereiche in der durch die Flags angegebenen Reihenfolge
+
+
+void SvxSpellWrapper::SpellDocument( )
+{
+ if ( bOtherCntnt )
+ {
+ bReverse = sal_False;
+ SpellStart( SVX_SPELL_OTHER );
+ }
+ else
+ {
+ bStartChk = bReverse;
+ SpellStart( bReverse ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END );
+ }
+
+ if ( FindSpellError() )
+ {
+ Reference< XSpellAlternatives > xAlt( GetLast(), UNO_QUERY );
+ Reference< XHyphenatedWord > xHyphWord( GetLast(), UNO_QUERY );
+
+ Window *pOld = pWin;
+ bDialog = sal_True;
+ if (xHyphWord.is())
+ {
+ DBG_ASSERT(xHyphWord.is(), "NULL pointer");
+ SvxHyphenWordDialog* pDlg =
+ new SvxHyphenWordDialog( xHyphWord->getWord(),
+ SvxLocaleToLanguage( xHyphWord->getLocale() ),
+ pWin, xHyph, this );
+ pWin = pDlg;
+ pDlg->Execute();
+ delete pDlg;
+ }
+ else
+ {
+ SvxSpellCheckDialog* pDlg =
+ new SvxSpellCheckDialog( pWin, xSpell, this );
+
+ if ( !bAuto )
+ pDlg->HideAutoCorrect();
+ pWin = pDlg;
+ // Visarea richtig setzen
+ ScrollArea();
+
+ pDlg->Execute();
+ delete pDlg;
+ }
+ bDialog = sal_False;
+ pWin = pOld;
+ };
+}
+
+// -----------------------------------------------------------------------
+// Naechsten Bereich auswaehlen
+
+
+sal_Bool SvxSpellWrapper::SpellNext( )
+{
+ Reference< beans::XPropertySet > xProp( SvxGetLinguPropertySet() );
+ sal_Bool bWrapReverse = xProp.is() ?
+ *(sal_Bool*)xProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(UPN_IS_WRAP_REVERSE) ).getValue()
+ : sal_False;
+ sal_Bool bActRev = bRevAllowed && bWrapReverse;
+
+ // bActRev ist die Richtung nach dem Spellen, bReverse die am Anfang.
+ if( bActRev == bReverse )
+ { // Keine Richtungsaenderung, also ist
+ if( bStartChk ) // der gewuenschte Bereich ( bStartChk )
+ bStartDone = sal_True; // vollstaendig abgearbeitet.
+ else
+ bEndDone = sal_True;
+ }
+ else if( bReverse == bStartChk ) // Bei einer Richtungsaenderung kann
+ { // u.U. auch ein Bereich abgearbeitet sein.
+ if( bStartChk ) // Sollte der vordere Teil rueckwaerts gespellt
+ bEndDone = sal_True; // werden und wir kehren unterwegs um, so ist
+ else // der hintere Teil abgearbeitet (und umgekehrt).
+ bStartDone = sal_True;
+ }
+
+ bReverse = bActRev;
+ if( bOtherCntnt && bStartDone && bEndDone ) // Dokument komplett geprueft?
+ {
+ if ( SpellMore() ) // ein weiteres Dokument pruefen?
+ {
+ bOtherCntnt = sal_False;
+ bStartDone = !bReverse;
+ bEndDone = bReverse;
+ SpellStart( SVX_SPELL_BODY );
+ return sal_True;
+ }
+ return sal_False;
+ }
+
+ ResMgr* pMgr = DIALOG_MGR();
+ sal_Bool bGoOn = sal_False;
+
+ if ( bOtherCntnt )
+ {
+ bStartChk = sal_False;
+ SpellStart( SVX_SPELL_BODY );
+ bGoOn = sal_True;
+ }
+ else if ( bStartDone && bEndDone )
+ {
+ sal_Bool bIsSpellSpecial = xProp.is() ?
+ *(sal_Bool*)xProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(UPN_IS_SPELL_SPECIAL) ).getValue()
+ : sal_False;
+ // Bodybereich erledigt, Frage nach Sonderbereich
+ if( !IsHyphen() && bIsSpellSpecial && HasOtherCnt() )
+ {
+ SpellStart( SVX_SPELL_OTHER );
+ bOtherCntnt = bGoOn = sal_True;
+ }
+ else if ( SpellMore() ) // ein weiteres Dokument pruefen?
+ {
+ bOtherCntnt = sal_False;
+ bStartDone = !bReverse;
+ bEndDone = bReverse;
+ SpellStart( SVX_SPELL_BODY );
+ return sal_True;
+ }
+ }
+ else
+ {
+ // Ein BODY_Bereich erledigt, Frage nach dem anderen BODY_Bereich
+ WAIT_OFF();
+
+// Sobald im Dialog das DontWrapAround gesetzt werden kann, kann der
+// folgende #ifdef-Zweig aktiviert werden ...
+#ifdef USED
+ sal_Bool bDontWrapAround = IsHyphen() ?
+ pSpell->GetOptions() & DONT_WRAPAROUND :
+ pSpell->GetHyphOptions() & HYPH_DONT_WRAPAROUND;
+ if( bDontWrapAround )
+#else
+ sal_uInt16 nResId = bReverse ? RID_SVXQB_BW_CONTINUE : RID_SVXQB_CONTINUE;
+ QueryBox aBox( pWin, ResId( nResId, pMgr ) );
+ if ( aBox.Execute() != RET_YES )
+#endif
+
+ {
+ // Verzicht auf den anderen Bereich, ggf. Frage nach Sonderbereich
+ WAIT_ON();
+ bStartDone = bEndDone = sal_True;
+ return SpellNext();
+ }
+ else
+ {
+ bStartChk = !bStartDone;
+ SpellStart( bStartChk ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END );
+ bGoOn = sal_True;
+ }
+ WAIT_ON();
+ }
+ return bGoOn;
+}
+
+// -----------------------------------------------------------------------
+
+Reference< XDictionary1 > SvxSpellWrapper::GetAllRightDic() const
+{
+ Reference< XDictionary1 > xDic;
+
+ Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ if (xDicList.is())
+ {
+ Sequence< Reference< XDictionary > > aDics( xDicList->getDictionaries() );
+ const Reference< XDictionary > *pDic = aDics.getConstArray();
+ sal_Int32 nCount = aDics.getLength();
+
+ sal_Int32 i = 0;
+ while (!xDic.is() && i < nCount)
+ {
+ Reference< XDictionary1 > xTmp( pDic[i], UNO_QUERY );
+ if (xTmp.is())
+ {
+ if ( xTmp->isActive() &&
+ xTmp->getDictionaryType() != DictionaryType_NEGATIVE &&
+ xTmp->getLanguage() == LANGUAGE_NONE )
+ {
+ Reference< frame::XStorable > xStor( xTmp, UNO_QUERY );
+ if (xStor.is() && xStor->hasLocation() && !xStor->isReadonly())
+ {
+ xDic = xTmp;
+ }
+ }
+ }
+ ++i;
+ }
+
+ if (!xDic.is())
+ {
+ xDic = SvxGetOrCreatePosDic( xDicList );
+ if (xDic.is())
+ xDic->setActive( sal_True );
+ }
+ }
+
+ return xDic;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxSpellWrapper::FindSpellError()
+{
+ Reference< XInterface > xRef;
+
+ WAIT_ON();
+ sal_Bool bSpell = sal_True;
+
+ Reference< XDictionary1 > xAllRightDic;
+ if (IsAllRight())
+ xAllRightDic = GetAllRightDic();
+
+ while ( bSpell )
+ {
+ SpellContinue();
+
+ Reference< XSpellAlternatives > xAlt( GetLast(), UNO_QUERY );
+ Reference< XHyphenatedWord > xHyphWord( GetLast(), UNO_QUERY );
+
+ if (xAlt.is())
+ {
+ if (IsAllRight() && xAllRightDic.is())
+ {
+ xAllRightDic->add( xAlt->getWord(), sal_False,
+ ::rtl::OUString(), LANGUAGE_NONE );
+ }
+ else
+ {
+ // look up in ChangeAllList for misspelled word
+ Reference< XDictionary1 > xChangeAllList(
+ SvxGetChangeAllList(), UNO_QUERY );
+ Reference< XDictionaryEntry > xEntry;
+ if (xChangeAllList.is())
+ xEntry = xChangeAllList->getEntry( xAlt->getWord() );
+
+ if (xEntry.is())
+ {
+ // replace word without asking
+ sal_Int16 nRplcLang = SvxLocaleToLanguage(
+ xEntry->getReplacementLocale() );
+ ReplaceAll( xEntry->getReplacementText(), nRplcLang );
+ }
+ else
+ bSpell = sal_False;
+ }
+ }
+ else if (xHyphWord.is())
+ bSpell = sal_False;
+ else
+ {
+ SpellEnd();
+ bSpell = SpellNext();
+ }
+ }
+ WAIT_OFF();
+ return GetLast().is();
+}
+
+
diff --git a/svx/source/dialog/srchctrl.cxx b/svx/source/dialog/srchctrl.cxx
new file mode 100644
index 0000000000..f26b314d05
--- /dev/null
+++ b/svx/source/dialog/srchctrl.cxx
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <tools/pstm.hxx>
+#ifndef _SFXINTITEM_HXX
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#pragma hdrstop
+
+#include "svxids.hrc"
+
+#define _SVX_SRCHDLG_CXX // damit private-Methoden vom SrchDlg bekannt sind
+
+#define ITEMID_SEARCH SID_ATTR_SEARCH
+
+#include "srchctrl.hxx"
+#include "srchdlg.hxx"
+#include "srchitem.hxx"
+
+// class SvxSearchFamilyControllerItem -----------------------------------
+
+SvxSearchController::SvxSearchController
+(
+ USHORT nId,
+ SfxBindings& rBind,
+ SvxSearchDialog& rDlg
+) :
+ SfxControllerItem( nId, rBind ),
+
+ rSrchDlg( rDlg )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchController::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ if ( SFX_ITEM_AVAILABLE == eState )
+ {
+ if ( SID_STYLE_FAMILY1 <= nSID && nSID <= SID_STYLE_FAMILY4 )
+ {
+ SfxObjectShell* pShell = SfxObjectShell::Current();
+
+ if ( pShell && pShell->GetStyleSheetPool() )
+ rSrchDlg.TemplatesChanged_Impl( *pShell->GetStyleSheetPool() );
+ }
+ else if ( SID_SEARCH_OPTIONS == nSID )
+ {
+ DBG_ASSERT( pState->ISA(SfxUInt16Item), "wrong item type" );
+ USHORT nFlags = (USHORT)( (SfxUInt16Item*)pState )->GetValue();
+ rSrchDlg.EnableControls_Impl( nFlags );
+ }
+ else if ( SID_SEARCH_ITEM == nSID )
+ {
+ DBG_ASSERT( pState->ISA(SvxSearchItem), "wrong item type" );
+ rSrchDlg.SetItem_Impl( (const SvxSearchItem*)pState );
+ }
+ }
+ else if ( SID_SEARCH_OPTIONS == nSID || SID_SEARCH_ITEM == nSID )
+ rSrchDlg.EnableControls_Impl( 0 );
+}
+
+
diff --git a/svx/source/dialog/srchctrl.hxx b/svx/source/dialog/srchctrl.hxx
new file mode 100644
index 0000000000..36108dd5ed
--- /dev/null
+++ b/svx/source/dialog/srchctrl.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_SRCHCTRL_HXX
+#define _SVX_SRCHCTRL_HXX
+
+// include ---------------------------------------------------------------
+
+
+#ifndef _SFXCTRLITEM_HXX //autogen
+#include <sfx2/ctrlitem.hxx>
+#endif
+// class SvxSearchFamilyController ---------------------------------------
+
+class SvxSearchDialog;
+
+class SvxSearchController : public SfxControllerItem
+{
+ SvxSearchDialog& rSrchDlg;
+
+protected:
+ virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+
+public:
+ SvxSearchController( USHORT nId, SfxBindings& rBnd, SvxSearchDialog& rDlg );
+};
+
+
+#endif
+
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
new file mode 100644
index 0000000000..2e97cdf38f
--- /dev/null
+++ b/svx/source/dialog/srchdlg.cxx
@@ -0,0 +1,1996 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SV_MOREBTN_HXX //autogen wg. MoreButton
+#include <vcl/morebtn.hxx>
+#endif
+#ifndef _SV_SYSTEM_HXX //autogen wg. System
+#include <vcl/system.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen wg. RET_OK
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXSLSTITM_HXX
+#include <svtools/slstitm.hxx>
+#endif
+#ifndef _SFXITEMITER_HXX
+#include <svtools/itemiter.hxx>
+#endif
+#ifndef _SFXSTYLE_HXX
+#include <svtools/style.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX
+#include <sfx2/dispatch.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
+#ifndef _SFXVIEWSH_HXX //autogen
+#include <sfx2/viewsh.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_SRCHDLG_CXX
+#include "srchdlg.hxx"
+
+#include "dialogs.hrc"
+#include "svxitems.hrc"
+#include "srchdlg.hrc"
+
+#define ITEMID_SEARCH SID_ATTR_SEARCH
+#define ITEMID_SETITEM 0
+
+#include "srchitem.hxx"
+#include "pageitem.hxx"
+#include "srchctrl.hxx"
+#include "srchxtra.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+#define ITEMID_BRUSH SID_ATTR_BRUSH
+#ifndef _SVX_BRSHITEM_HXX //autogen
+#include <brshitem.hxx>
+#endif
+#ifndef _SVX_BACKGRND_HXX //autogen
+#include <backgrnd.hxx>
+#endif
+
+// -----------------------------------------------------------------------
+
+#define REMEMBER_SIZE 10
+
+#define MODIFY_SEARCH 0x00000001
+#define MODIFY_REPLACE 0x00000002
+#define MODIFY_WORD 0x00000004
+#define MODIFY_EXACT 0x00000008
+#define MODIFY_BACKWARDS 0x00000010
+#define MODIFY_SELECTION 0x00000020
+#define MODIFY_REGEXP 0x00000040
+#define MODIFY_LAYOUT 0x00000080
+#define MODIFY_SIMILARITY 0x00000100
+#define MODIFY_FORMULAS 0x00000200
+#define MODIFY_VALUES 0x00000400
+#define MODIFY_NOTES 0x00000800
+#define MODIFY_ROWS 0x00001000
+#define MODIFY_COLUMNS 0x00002000
+#define MODIFY_ALLTABLES 0x00004000
+
+SV_IMPL_VARARR(SrchAttrItemList, SearchAttrItem);
+
+#define NotifyApp( nId ) \
+ rBindings.GetDispatcher()->Execute( nId, SFX_CALLMODE_SLOT, \
+ pSearchItem, 0L )
+
+#define GetCheckBoxValue( rBox ) \
+ rBox.IsEnabled() ? rBox.IsChecked() : FALSE
+
+struct SearchDlg_Impl
+{
+ BOOL bMultiLineEdit : 1,
+ bSaveToModule : 1,
+ bFocusOnSearch : 1;
+ USHORT* pRanges;
+ Timer aSelectionTimer;
+
+ SearchDlg_Impl() :
+ bMultiLineEdit( FALSE ), bSaveToModule( TRUE ), bFocusOnSearch( TRUE ), pRanges( NULL ) {}
+ ~SearchDlg_Impl() { delete pRanges; }
+};
+
+// -----------------------------------------------------------------------
+
+void ListToStrArr_Impl( USHORT nId, SvStringsDtor& rStrLst, ComboBox& rCBox )
+{
+ SfxStringListItem* pSrchItem =
+ (SfxStringListItem*)SFX_APP()->GetItem( nId );
+ List* pLst = pSrchItem ? pSrchItem->GetList() : 0;
+
+ if ( pLst )
+ for ( USHORT i = 0; i < pLst->Count(); ++i )
+ {
+ String* pTmp = new String( *(String*)( pLst->GetObject(i) ) );
+ rStrLst.Insert( pTmp, rStrLst.Count() );
+ rCBox.InsertEntry( *pTmp );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void StrArrToList_Impl( USHORT nId, const SvStringsDtor& rStrLst )
+{
+ DBG_ASSERT( rStrLst.Count(), "vorher abpruefen!!" );
+ List aLst;
+
+ for ( USHORT i = 0; i < rStrLst.Count(); ++i )
+ aLst.Insert( rStrLst[ i ], LIST_APPEND );
+
+ SFX_APP()->PutItem( SfxStringListItem( nId, &aLst ) );
+}
+
+// class SearchAttrItemList ----------------------------------------------
+
+SearchAttrItemList::SearchAttrItemList( const SearchAttrItemList& rList ) :
+
+ SrchAttrItemList( (BYTE)rList.Count() )
+
+{
+ SrchAttrItemList::Insert( &rList, 0 );
+ SearchAttrItem* pData = (SearchAttrItem*)GetData();
+
+ for ( USHORT i = Count(); i; --i, ++pData )
+ if ( !IsInvalidItem( pData->pItem ) )
+ pData->pItem = pData->pItem->Clone();
+}
+
+// -----------------------------------------------------------------------
+
+SearchAttrItemList::~SearchAttrItemList()
+{
+ Clear();
+}
+
+// -----------------------------------------------------------------------
+
+void SearchAttrItemList::Put( const SfxItemSet& rSet )
+{
+ if ( !rSet.Count() )
+ return;
+
+ SfxItemPool* pPool = rSet.GetPool();
+ SfxItemIter aIter( rSet );
+ SearchAttrItem aItem;
+ const SfxPoolItem* pItem = aIter.GetCurItem();
+ USHORT nWhich;
+
+ while ( TRUE )
+ {
+ // nur testen, ob vorhanden ist ?
+ if( IsInvalidItem( pItem ) )
+ {
+ nWhich = rSet.GetWhichByPos( aIter.GetCurPos() );
+ aItem.pItem = (SfxPoolItem*)pItem;
+ }
+ else
+ {
+ nWhich = pItem->Which();
+ aItem.pItem = pItem->Clone();
+ }
+
+ aItem.nSlot = pPool->GetSlotId( nWhich );
+ Insert( aItem );
+
+ if ( aIter.IsAtEnd() )
+ break;
+ pItem = aIter.NextItem();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SfxItemSet& SearchAttrItemList::Get( SfxItemSet& rSet )
+{
+ SfxItemPool* pPool = rSet.GetPool();
+ SearchAttrItem* pData = (SearchAttrItem*)GetData();
+
+ for ( USHORT i = Count(); i; --i, ++pData )
+ if ( IsInvalidItem( pData->pItem ) )
+ rSet.InvalidateItem( pPool->GetWhich( pData->nSlot ) );
+ else
+ rSet.Put( *pData->pItem );
+ return rSet;
+}
+
+// -----------------------------------------------------------------------
+
+void SearchAttrItemList::Clear()
+{
+ SearchAttrItem* pData = (SearchAttrItem*)GetData();
+
+ for ( USHORT i = Count(); i; --i, ++pData )
+ if ( !IsInvalidItem( pData->pItem ) )
+ delete pData->pItem;
+ SrchAttrItemList::Remove( 0, Count() );
+}
+
+// -----------------------------------------------------------------------
+
+// l"oscht die Pointer auf die Items
+void SearchAttrItemList::Remove( USHORT nPos, USHORT nLen )
+{
+ if ( nPos + nLen > Count() )
+ nLen = Count() - nPos;
+ SearchAttrItem* pData = (SearchAttrItem*)GetData() + nPos;
+
+ for ( USHORT n = nLen; n; --n, ++pData )
+ if ( !IsInvalidItem( pData->pItem ) )
+ delete pData->pItem;
+
+ SrchAttrItemList::Remove( nPos, nLen );
+}
+
+// class SvxSearchDialog -------------------------------------------------
+
+SvxSearchDialog::SvxSearchDialog( Window* pParent, SfxBindings& rBind ) :
+
+ ModelessDialog( pParent, SVX_RES( RID_SVXDLG_SEARCH ) ),
+
+ aSearchText ( this, ResId( FT_SEARCH ) ),
+ aSearchLB ( this, ResId( ED_SEARCH ) ),
+ aSearchTmplLB ( this, ResId( LB_SEARCH ) ),
+ aSearchAttrText ( this, ResId( FT_SEARCH_ATTR ) ),
+ aSearchFormatsED( this, ResId( ED_SEARCH_FORMATS ) ),
+ aSearchAttrBox ( this, ResId( GB_SEARCH_ATTR ) ),
+
+ aReplaceText ( this, ResId( FT_REPLACE ) ),
+ aReplaceLB ( this, ResId( ED_REPLACE ) ),
+ aReplaceTmplLB ( this, ResId( LB_REPLACE ) ),
+ aReplaceAttrText( this, ResId( FT_REPLACE_ATTR ) ),
+ aReplaceFormatsED( this, ResId( ED_REPLACE_FORMATS ) ),
+ aReplaceAttrBox ( this, ResId( GB_REPLACE_ATTR ) ),
+
+ aSearchAllBtn ( this, ResId( BTN_SEARCH_ALL ) ),
+ aSearchBtn ( this, ResId( BTN_SEARCH ) ),
+ aReplaceAllBtn ( this, ResId( BTN_REPLACE_ALL ) ),
+ aReplaceBtn ( this, ResId( BTN_REPLACE ) ),
+ aAttributeBtn ( this, ResId( BTN_ATTRIBUTE ) ),
+ aCloseBtn ( this, ResId( BTN_CLOSE ) ),
+ aFormatBtn ( this, ResId( BTN_FORMAT ) ),
+ aHelpBtn ( this, ResId( BTN_HELP ) ),
+ aNoFormatBtn ( this, ResId( BTN_NOFORMAT ) ),
+ pMoreBtn ( new MoreButton( this, ResId( BTN_MORE ) ) ),
+
+ aWordBtn ( this, ResId( BTN_CELLS ) ),
+ aExactBtn ( this, ResId( BTN_EXACT ) ),
+ aBackwardsBtn ( this, ResId( BTN_BACKWARDS ) ),
+ aSelectionBtn ( this, ResId( BTN_SELECTIONS ) ),
+ aRegExpBtn ( this, ResId( BTN_REGEXP ) ),
+ aLayoutBtn ( this, ResId( BTN_LAYOUTS ) ),
+ aSimilarityBox ( this, ResId( CB_SIMILARITY) ),
+ aSimilarityBtn ( this, ResId( PB_SIMILARITY) ),
+ aOptionsBox ( this, ResId( GB_OPTIONS ) ),
+
+ aFormulasBtn ( this, ResId( BTN_FORMULAS ) ),
+ aValuesBtn ( this, ResId( BTN_VALUES ) ),
+ aNotesBtn ( this, ResId( BTN_NOTES ) ),
+ aSearchBox ( this, ResId( GB_SEARCH ) ),
+
+ aRowsBtn ( this, ResId( BTN_ROWS ) ),
+ aColumnsBtn ( this, ResId( BTN_COLUMNS ) ),
+ aSearchDirBox ( this, ResId( GB_SEARCHDIR ) ),
+
+ aAllTablesCB ( this, ResId( CB_ALLTABLES ) ),
+ aCalcExtrasBox ( this, ResId( GB_CALCEXTRAS ) ),
+
+ aCalcStr ( ResId( STR_WORDCALC ) ),
+
+ rBindings ( rBind ),
+ bWriter ( FALSE ),
+ bSearch ( TRUE ),
+ bFormat ( FALSE ),
+ nOptions ( USHRT_MAX ),
+ bSet ( FALSE ),
+ bReadOnly ( FALSE ),
+ bConstruct ( TRUE ),
+ nModifyFlag ( 0 ),
+
+ pImpl ( NULL ),
+ pSearchList ( NULL ),
+ pReplaceList ( NULL ),
+ pSearchItem ( NULL ),
+
+ pSearchController ( NULL ),
+ pOptionsController ( NULL ),
+ pFamilyController ( NULL ),
+ pSearchSetController ( NULL ),
+ pReplaceSetController ( NULL )
+
+{
+ Wallpaper aBackground = GetBackground();
+ aSearchFormatsED.SetBackground( aBackground );
+ aReplaceFormatsED.SetBackground( aBackground );
+ FixedInfo* pInfo = new FixedInfo( this );
+ aSearchFormatsED.SetFont( pInfo->GetFont() );
+ aReplaceFormatsED.SetFont( pInfo->GetFont() );
+ delete pInfo;
+ pImpl = new SearchDlg_Impl;
+ pImpl->aSelectionTimer.SetTimeout( 500 );
+ pImpl->aSelectionTimer.SetTimeoutHdl(
+ LINK( this, SvxSearchDialog, TimeoutHdl_Impl ) );
+
+ EnableControls_Impl( 0 );
+
+#ifdef OS2
+ aSearchFormatsED.Hide();
+ aSearchAttrText.Show();
+ aReplaceFormatsED.Hide();
+ aReplaceAttrText.Show();
+#endif
+ // alten Text des aWordBtn's merken
+ ( aCalcStr += sal_Unicode('#') ) += aWordBtn.GetText();
+
+/*! (pb) there is no AppWindow anymore
+ // Position anpassen
+ Point aPos;
+ const Size aScreen( Application::GetAppWindow()->GetDesktopRectPixel().GetSize() );
+ const Size MySize( GetSizePixel() );
+ aPos.X() = ( aScreen.Width() - MySize.Width() ) / 2;
+ aPos.Y() = aScreen.Height() - MySize.Height() - 60;
+ SetPosPixel( aPos );
+*/
+
+ aLayoutStr = SVX_RESSTR( RID_SVXSTR_SEARCH_STYLES );
+ aStylesStr = aLayoutBtn.GetText();
+
+ // gemerkte Such-Strings von der Applikation holen
+ ListToStrArr_Impl( SID_SEARCHDLG_SEARCHSTRINGS,
+ aSearchStrings, aSearchLB );
+ ListToStrArr_Impl( SID_SEARCHDLG_REPLACESTRINGS,
+ aReplaceStrings, aReplaceLB );
+
+ FreeResource();
+ InitControls_Impl();
+
+ // Attribut-Sets nur einmal im Ctor() besorgen
+ const SvxSetItem* pSrchSetItem =
+ (const SvxSetItem*)NotifyApp( FID_SEARCH_SEARCHSET );
+
+ if ( pSrchSetItem )
+ InitAttrList_Impl( &pSrchSetItem->GetItemSet(), 0 );
+
+ const SvxSetItem* pReplSetItem =
+ (const SvxSetItem*)NotifyApp( FID_SEARCH_REPLACESET );
+
+ if ( pReplSetItem )
+ InitAttrList_Impl( 0, &pReplSetItem->GetItemSet() );
+
+ // Controller erzeugen und gleich aktualisieren
+ rBindings.EnterRegistrations();
+ pSearchController =
+ new SvxSearchController( SID_SEARCH_ITEM, rBindings, *this );
+ pOptionsController =
+ new SvxSearchController( SID_SEARCH_OPTIONS, rBindings, *this );
+ rBindings.LeaveRegistrations();
+ NotifyApp( FID_SEARCH_ON );
+ pImpl->aSelectionTimer.Start();
+}
+
+// -----------------------------------------------------------------------
+
+SvxSearchDialog::~SvxSearchDialog()
+{
+ Hide();
+
+ rBindings.EnterRegistrations();
+ delete pSearchController;
+ delete pOptionsController;
+ delete pFamilyController;
+ delete pSearchSetController;
+ delete pReplaceSetController;
+ rBindings.LeaveRegistrations();
+
+ delete pSearchItem;
+ delete pImpl;
+ delete pSearchList;
+ delete pReplaceList;
+ delete pMoreBtn;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxSearchDialog::Close()
+{
+ // remember strings speichern
+ if ( aSearchStrings.Count() )
+ StrArrToList_Impl( SID_SEARCHDLG_SEARCHSTRINGS, aSearchStrings );
+
+ if ( aReplaceStrings.Count() )
+ StrArrToList_Impl( SID_SEARCHDLG_REPLACESTRINGS, aReplaceStrings );
+ NotifyApp( FID_SEARCH_OFF );
+ NotifyApp( SID_SEARCH_DLG );
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::InitControls_Impl()
+{
+ // CaseSensitives AutoComplete
+ aSearchLB.EnableAutocomplete( TRUE, TRUE );
+ aSearchLB.Show();
+ aReplaceLB.EnableAutocomplete( TRUE, TRUE );
+ aReplaceLB.Show();
+
+ aFormatBtn.Disable();
+ aAttributeBtn.Disable();
+
+ aSearchLB.SetModifyHdl( LINK( this, SvxSearchDialog, ModifyHdl_Impl ) );
+ aReplaceLB.SetModifyHdl( LINK( this, SvxSearchDialog, ModifyHdl_Impl ) );
+
+ Link aLink = LINK( this, SvxSearchDialog, FocusHdl_Impl );
+ aSearchLB.SetGetFocusHdl( aLink );
+ aSearchFormatsED.SetGetFocusHdl( aLink );
+ aReplaceLB.SetGetFocusHdl( aLink );
+ aReplaceFormatsED.SetGetFocusHdl( aLink );
+
+ aLink = LINK( this, SvxSearchDialog, LoseFocusHdl_Impl );
+ aSearchLB.SetLoseFocusHdl( aLink );
+ aReplaceLB.SetLoseFocusHdl( aLink );
+ aSearchTmplLB.SetLoseFocusHdl( aLink );
+ aReplaceTmplLB.SetLoseFocusHdl( aLink );
+
+ aLink = LINK( this, SvxSearchDialog, CommandHdl_Impl );
+ aSearchBtn.SetClickHdl( aLink );
+ aSearchAllBtn.SetClickHdl( aLink );
+ aReplaceBtn.SetClickHdl( aLink );
+ aReplaceAllBtn.SetClickHdl( aLink );
+ aCloseBtn.SetClickHdl( aLink );
+ aSimilarityBtn.SetClickHdl( aLink );
+
+ aLink = LINK( this, SvxSearchDialog, FlagHdl_Impl );
+ aWordBtn.SetClickHdl( aLink );
+ aSelectionBtn.SetClickHdl( aLink );
+ aExactBtn.SetClickHdl( aLink );
+ aRegExpBtn.SetClickHdl( aLink );
+ aBackwardsBtn.SetClickHdl( aLink );
+ aSimilarityBox.SetClickHdl( aLink );
+
+ aLayoutBtn.SetClickHdl( LINK( this, SvxSearchDialog, TemplateHdl_Impl ) );
+ aFormatBtn.SetClickHdl( LINK( this, SvxSearchDialog, FormatHdl_Impl ) );
+ aNoFormatBtn.SetClickHdl(
+ LINK( this, SvxSearchDialog, NoFormatHdl_Impl ) );
+ aAttributeBtn.SetClickHdl(
+ LINK( this, SvxSearchDialog, AttributeHdl_Impl ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::Init_Impl( int bSearchPattern )
+{
+ DBG_ASSERT( pSearchItem, "SearchItem == 0" );
+ bWriter = ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_WRITER );
+
+#ifndef OS2
+#ifndef VCL
+ pImpl->bMultiLineEdit = bWriter;
+#else
+ // bei VCL kein MultiLineEdit mehr fuer die Format-Texte
+ pImpl->bMultiLineEdit = FALSE;
+#endif
+
+ if ( !pImpl->bMultiLineEdit )
+ {
+ aSearchFormatsED.Hide();
+ aSearchAttrText.Show();
+ aReplaceFormatsED.Hide();
+ aReplaceAttrText.Show();
+ }
+ else
+ {
+ String aText = aSearchAttrText.GetText();
+ aSearchAttrText.Hide();
+
+ if ( aText.Len() )
+ aSearchFormatsED.SetText( aText );
+ aSearchFormatsED.Show();
+ aText = aReplaceAttrText.GetText();
+ aReplaceAttrText.Hide();
+
+ if ( aText.Len() )
+ aReplaceFormatsED.SetText( aText );
+ aReplaceFormatsED.Show();
+ }
+#endif
+
+ if ( ( nModifyFlag & MODIFY_WORD ) == 0 )
+ aWordBtn.Check( pSearchItem->GetWordOnly() );
+ if ( ( nModifyFlag & MODIFY_EXACT ) == 0 )
+ aExactBtn.Check( pSearchItem->GetExact() );
+ if ( ( nModifyFlag & MODIFY_BACKWARDS ) == 0 )
+ aBackwardsBtn.Check( pSearchItem->GetBackward() );
+ if ( ( nModifyFlag & MODIFY_SELECTION ) == 0 )
+ aSelectionBtn.Check( pSearchItem->GetSelection() );
+ if ( ( nModifyFlag & MODIFY_REGEXP ) == 0 )
+ aRegExpBtn.Check( pSearchItem->GetRegExp() );
+ if ( ( nModifyFlag & MODIFY_LAYOUT ) == 0 )
+ aLayoutBtn.Check( pSearchItem->GetPattern() );
+ FASTBOOL bDraw = FALSE;
+
+ if ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_CALC )
+ {
+ Link aLink = LINK( this, SvxSearchDialog, FlagHdl_Impl );
+ aFormulasBtn.SetClickHdl( aLink );
+ aNotesBtn.SetClickHdl( aLink );
+ aValuesBtn.SetClickHdl( aLink );
+ aRowsBtn.SetClickHdl( aLink );
+ aColumnsBtn.SetClickHdl( aLink );
+ aAllTablesCB.SetClickHdl( aLink );
+
+ switch ( pSearchItem->GetCellType() )
+ {
+ case SVX_SEARCHIN_FORMULA:
+ if ( ( nModifyFlag & MODIFY_FORMULAS ) == 0 )
+ aFormulasBtn.Check();
+ break;
+
+ case SVX_SEARCHIN_VALUE:
+ if ( ( nModifyFlag & MODIFY_VALUES ) == 0 )
+ aValuesBtn.Check();
+ break;
+
+ case SVX_SEARCHIN_NOTE:
+ if ( ( nModifyFlag & MODIFY_NOTES ) == 0 )
+ aNotesBtn.Check();
+ break;
+ }
+ aWordBtn.SetText( aCalcStr.GetToken( 0, '#' ) );
+
+ if ( pSearchItem->GetRowDirection() &&
+ ( nModifyFlag & MODIFY_ROWS ) == 0 )
+ aRowsBtn.Check();
+ else if ( !pSearchItem->GetRowDirection() &&
+ ( nModifyFlag & MODIFY_COLUMNS ) == 0 )
+ aColumnsBtn.Check();
+
+ if ( ( nModifyFlag & MODIFY_ALLTABLES ) == 0 )
+ aAllTablesCB.Check( pSearchItem->IsAllTables() );
+
+ // nur im Writer Suche nach Formatierung
+ aFormatBtn.Hide();
+ aNoFormatBtn.Hide();
+ aAttributeBtn.Hide();
+
+ // Extras beim StarCalc
+ pMoreBtn->AddWindow( &aFormulasBtn );
+ pMoreBtn->AddWindow( &aNotesBtn );
+ pMoreBtn->AddWindow( &aValuesBtn );
+ pMoreBtn->AddWindow( &aSearchBox );
+ pMoreBtn->AddWindow( &aRowsBtn );
+ pMoreBtn->AddWindow( &aColumnsBtn );
+ pMoreBtn->AddWindow( &aSearchDirBox );
+ pMoreBtn->AddWindow( &aAllTablesCB );
+ pMoreBtn->AddWindow( &aCalcExtrasBox );
+ pMoreBtn->Show();
+ pMoreBtn->Enable();
+ }
+ else
+ {
+ aWordBtn.SetText( aCalcStr.GetToken( 1, '#' ) );
+
+ if ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_DRAW )
+ {
+ aRegExpBtn.Hide();
+ aLayoutBtn.Hide();
+
+ // nur im Writer Suche nach Formatierung
+ aFormatBtn.Hide();
+ aNoFormatBtn.Hide();
+ aAttributeBtn.Hide();
+ bDraw = TRUE;
+ }
+ else
+ {
+ if ( !pSearchList )
+ {
+ // Attribut-Sets besorgen, wenn noch nicht geschehen
+ const SvxSetItem* pSrchSetItem =
+ (const SvxSetItem*)NotifyApp( FID_SEARCH_SEARCHSET );
+
+ if ( pSrchSetItem )
+ InitAttrList_Impl( &pSrchSetItem->GetItemSet(), 0 );
+
+ const SvxSetItem* pReplSetItem =
+ (const SvxSetItem*)NotifyApp( FID_SEARCH_REPLACESET );
+
+ if ( pReplSetItem )
+ InitAttrList_Impl( 0, &pReplSetItem->GetItemSet() );
+ }
+ aFormatBtn.Show();
+ aNoFormatBtn.Show();
+ aAttributeBtn.Show();
+ }
+ pMoreBtn->SetState( FALSE );
+ pMoreBtn->Hide();
+ }
+
+ if ( !bDraw )
+ {
+ aRegExpBtn.Show();
+ aLayoutBtn.Show();
+ }
+
+ // "Ahnlichkeitssuche?
+ if ( ( nModifyFlag & MODIFY_SIMILARITY ) == 0 )
+ aSimilarityBox.Check( pSearchItem->IsLevenshtein() );
+ bSet = TRUE;
+ pImpl->bSaveToModule = FALSE;
+ FlagHdl_Impl( &aSimilarityBox );
+ pImpl->bSaveToModule = TRUE;
+ FASTBOOL bDisableSearch = FALSE;
+ SfxViewShell* pViewShell = SfxViewShell::Current();
+
+ if ( pViewShell )
+ {
+ BOOL bText = !bSearchPattern;
+
+ if ( pViewShell->HasSelection( bText ) )
+ EnableControl_Impl( &aSelectionBtn );
+ else
+ {
+ aSelectionBtn.Check( FALSE );
+ aSelectionBtn.Disable();
+ }
+ }
+
+ // Patternsuche und es wurden keine AttrSets "ubergeben
+ if ( bSearchPattern )
+ {
+ SfxObjectShell* pShell = SfxObjectShell::Current();
+
+ if ( pShell && pShell->GetStyleSheetPool() )
+ {
+ // Vorlagen beschaffen
+ aSearchTmplLB .Clear();
+ aReplaceTmplLB.Clear();
+ SfxStyleSheetBasePool* pStylePool = pShell->GetStyleSheetPool();
+ pStylePool->SetSearchMask( pSearchItem->GetFamily(),
+ SFXSTYLEBIT_ALL );
+ SfxStyleSheetBase* pBase = pStylePool->First();
+
+ while ( pBase )
+ {
+ if ( pBase->IsUsed() )
+ aSearchTmplLB.InsertEntry( pBase->GetName() );
+ aReplaceTmplLB.InsertEntry( pBase->GetName() );
+ pBase = pStylePool->Next();
+ }
+ aSearchTmplLB.SelectEntry( pSearchItem->GetSearchString() );
+ aReplaceTmplLB.SelectEntry( pSearchItem->GetReplaceString() );
+
+ }
+ aSearchTmplLB.Show();
+
+ if ( bConstruct )
+ // nur nach dem Erzeugen den Fokus grappen
+ aSearchTmplLB.GrabFocus();
+ aReplaceTmplLB.Show();
+ aSearchLB.Hide();
+ aReplaceLB.Hide();
+
+ aWordBtn.Disable();
+ aRegExpBtn.Disable();
+ aExactBtn.Disable();
+
+ bDisableSearch = !aSearchTmplLB.GetEntryCount();
+ }
+ else
+ {
+ FASTBOOL bSetSearch = ( ( nModifyFlag & MODIFY_SEARCH ) == 0 );
+ FASTBOOL bSetReplace = ( ( nModifyFlag & MODIFY_REPLACE ) == 0 );
+
+ if ( pSearchItem->GetSearchString().Len() && bSetSearch )
+ aSearchLB.SetText( pSearchItem->GetSearchString() );
+ else if ( aSearchStrings.Count() )
+ {
+ FASTBOOL bAttributes =
+ ( ( pSearchList && pSearchList->Count() ) ||
+ ( pReplaceList && pReplaceList->Count() ) );
+
+ if ( bSetSearch && !bAttributes )
+ aSearchLB.SetText( *aSearchStrings[ 0 ] );
+
+ String aReplaceTxt = pSearchItem->GetReplaceString();
+
+ if ( aReplaceStrings.Count() )
+ aReplaceTxt = *aReplaceStrings[ 0 ];
+
+ if ( bSetReplace && !bAttributes )
+ aReplaceLB.SetText( aReplaceTxt );
+ }
+ aSearchLB.Show();
+
+ if ( bConstruct )
+ // nur nach dem Erzeugen den Fokus grappen
+ aSearchLB.GrabFocus();
+ aReplaceLB.Show();
+ aSearchTmplLB.Hide();
+ aReplaceTmplLB.Hide();
+
+ EnableControl_Impl( &aRegExpBtn );
+ EnableControl_Impl( &aExactBtn );
+
+ if ( aRegExpBtn.IsChecked() )
+ aWordBtn.Disable();
+ else
+ EnableControl_Impl( &aWordBtn );
+
+ String aSrchAttrTxt;
+
+ if ( pImpl->bMultiLineEdit )
+ aSrchAttrTxt = aSearchFormatsED.GetText();
+ else
+ aSrchAttrTxt = aSearchAttrText.GetText();
+
+ bDisableSearch = !aSearchLB.GetText().Len() && !aSrchAttrTxt.Len();
+ }
+ FocusHdl_Impl( &aSearchLB );
+
+ if ( bDisableSearch )
+ {
+ aSearchBtn.Disable();
+ aSearchAllBtn.Disable();
+ aReplaceBtn.Disable();
+ aReplaceAllBtn.Disable();
+ }
+ else
+ {
+ EnableControl_Impl( &aSearchBtn );
+ EnableControl_Impl( &aSearchAllBtn );
+ EnableControl_Impl( &aReplaceBtn );
+ EnableControl_Impl( &aReplaceAllBtn );
+ }
+
+ if ( ( !pImpl->bMultiLineEdit && aSearchAttrText.GetText().Len() ) ||
+ ( pImpl->bMultiLineEdit && aSearchFormatsED.GetText().Len() ) )
+ EnableControl_Impl( &aNoFormatBtn );
+ else
+ aNoFormatBtn.Disable();
+
+ if ( !pSearchList )
+ {
+ aAttributeBtn.Disable();
+ aFormatBtn.Disable();
+ }
+
+ if ( aLayoutBtn.IsChecked() )
+ {
+ pImpl->bSaveToModule = FALSE;
+ TemplateHdl_Impl( &aLayoutBtn );
+ pImpl->bSaveToModule = TRUE;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet,
+ const SfxItemSet* pRSet )
+{
+ if ( !pSSet && !pRSet )
+ return;
+
+ if ( !pImpl->pRanges && pSSet )
+ {
+ USHORT nCnt = 0;
+ const USHORT* pPtr = pSSet->GetRanges();
+ const USHORT* pTmp = pPtr;
+
+ while( *pPtr )
+ {
+ nCnt += ( *(pPtr+1) - *pPtr ) + 1;
+ pPtr += 2;
+ }
+ nCnt = pPtr - pTmp + 1;
+ pImpl->pRanges = new USHORT[nCnt];
+ memcpy( pImpl->pRanges, pTmp, sizeof(USHORT) * nCnt );
+ }
+
+ // sorge daf"ur, das die Texte der Attribute richtig stehen
+ String aDesc;
+
+ if ( pSSet )
+ {
+ delete pSearchList;
+ pSearchList = new SearchAttrItemList;
+
+ if ( pSSet->Count() )
+ {
+ pSearchList->Put( *pSSet );
+
+ if ( !pImpl->bMultiLineEdit )
+ aSearchAttrText.SetText( BuildAttrText_Impl( aDesc, TRUE ) );
+ else
+ aSearchFormatsED.SetText( BuildAttrText_Impl( aDesc, TRUE ) );
+
+ if ( aDesc.Len() )
+ bFormat |= TRUE;
+ }
+ }
+
+ if ( pRSet )
+ {
+ delete pReplaceList;
+ pReplaceList = new SearchAttrItemList;
+
+ if ( pRSet->Count() )
+ {
+ pReplaceList->Put( *pRSet );
+
+ if ( !pImpl->bMultiLineEdit )
+ aReplaceAttrText.SetText( BuildAttrText_Impl( aDesc, FALSE ) );
+ else
+ aReplaceFormatsED.SetText( BuildAttrText_Impl( aDesc, FALSE ) );
+
+ if ( aDesc.Len() )
+ bFormat |= TRUE;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Button *, pButton )
+{
+ if ( pButton && !bSet )
+ SetModifyFlag_Impl( pButton );
+ else
+ bSet = FALSE;
+
+ if ( pButton == &aSimilarityBox )
+ {
+ BOOL bIsChecked = aSimilarityBox.IsChecked();
+
+ if ( bIsChecked )
+ {
+ aSimilarityBtn.Enable();
+ aRegExpBtn.Check( FALSE );
+ aRegExpBtn.Disable();
+ EnableControl_Impl( &aWordBtn );
+
+ if ( aLayoutBtn.IsChecked() )
+ {
+ EnableControl_Impl( &aExactBtn );
+ aLayoutBtn.Check( FALSE );
+ }
+ aRegExpBtn.Disable();
+ aLayoutBtn.Disable();
+ aFormatBtn.Disable();
+ aNoFormatBtn.Disable();
+ aAttributeBtn.Disable();
+ }
+ else
+ {
+ EnableControl_Impl( &aRegExpBtn );
+ EnableControl_Impl( &aLayoutBtn );
+ EnableControl_Impl( &aFormatBtn );
+ EnableControl_Impl( &aAttributeBtn );
+ aSimilarityBtn.Disable();
+ }
+ pSearchItem->SetLevenshtein( bIsChecked );
+ }
+ else
+ {
+ if ( aLayoutBtn.IsChecked() && !bFormat )
+ {
+ aWordBtn.Check( FALSE );
+ aWordBtn.Disable();
+ aRegExpBtn.Check( FALSE );
+ aRegExpBtn.Disable();
+ aExactBtn.Check( FALSE );
+ aExactBtn.Disable();
+
+ if ( aSearchTmplLB.GetEntryCount() )
+ {
+ EnableControl_Impl( &aSearchBtn );
+ EnableControl_Impl( &aSearchAllBtn );
+ EnableControl_Impl( &aReplaceBtn );
+ EnableControl_Impl( &aReplaceAllBtn );
+ }
+ }
+ else
+ {
+ EnableControl_Impl( &aRegExpBtn );
+ EnableControl_Impl( &aExactBtn );
+
+ if ( aRegExpBtn.IsChecked() )
+ {
+ aWordBtn.Check( FALSE );
+ aWordBtn.Disable();
+ aSimilarityBox.Disable();
+ aSimilarityBtn.Disable();
+ }
+ else
+ {
+ EnableControl_Impl( &aWordBtn );
+ EnableControl_Impl( &aSimilarityBox );
+ }
+
+ // Such-String vorhanden? dann Buttons enablen
+ bSet = TRUE;
+ ModifyHdl_Impl( &aSearchLB );
+ }
+ }
+
+ if ( &aAllTablesCB == pButton )
+ {
+ if ( aAllTablesCB.IsChecked() )
+ aSearchAllBtn.Disable();
+ else
+ {
+ bSet = TRUE;
+ ModifyHdl_Impl( &aSearchLB );
+ }
+ }
+
+ if ( pImpl->bSaveToModule )
+ SaveToModule_Impl();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn )
+{
+ FASTBOOL bInclusive = ( aLayoutBtn.GetText() == aLayoutStr );
+
+ if ( ( pBtn == &aSearchBtn ) ||
+ ( pBtn == &aSearchAllBtn ) ||
+ ( pBtn == &aReplaceBtn ) ||
+ ( pBtn == &aReplaceAllBtn ) )
+ {
+ if ( aLayoutBtn.IsChecked() && !bInclusive )
+ {
+ pSearchItem->SetSearchString ( aSearchTmplLB.GetSelectEntry() );
+ pSearchItem->SetReplaceString( aReplaceTmplLB.GetSelectEntry() );
+ }
+ else
+ {
+ pSearchItem->SetSearchString ( aSearchLB.GetText() );
+ pSearchItem->SetReplaceString( aReplaceLB.GetText() );
+
+ if ( pBtn == &aReplaceBtn )
+ Remember_Impl( aReplaceLB.GetText(), FALSE );
+ else
+ {
+ Remember_Impl( aSearchLB.GetText(), TRUE );
+
+ if ( pBtn == &aReplaceAllBtn )
+ Remember_Impl( aReplaceLB.GetText(), FALSE );
+ }
+ }
+
+ pSearchItem->SetWordOnly( GetCheckBoxValue( aWordBtn ) );
+ pSearchItem->SetPattern( GetCheckBoxValue( aLayoutBtn ) );
+ pSearchItem->SetSelection( GetCheckBoxValue( aSelectionBtn ) );
+ pSearchItem->SetExact( GetCheckBoxValue( aExactBtn ) );
+ pSearchItem->SetRegExp( GetCheckBoxValue( aRegExpBtn ) );
+ pSearchItem->SetBackward( GetCheckBoxValue( aBackwardsBtn ) );
+
+ if ( !bWriter )
+ {
+ if ( aFormulasBtn.IsChecked() )
+ pSearchItem->SetCellType( SVX_SEARCHIN_FORMULA );
+ else if ( aValuesBtn.IsChecked() )
+ pSearchItem->SetCellType( SVX_SEARCHIN_VALUE );
+ else if ( aNotesBtn.IsChecked() )
+ pSearchItem->SetCellType( SVX_SEARCHIN_NOTE );
+
+ pSearchItem->SetRowDirection( aRowsBtn.IsChecked() );
+ pSearchItem->SetAllTables( aAllTablesCB.IsChecked() );
+ }
+
+ if ( pBtn == &aSearchBtn )
+ pSearchItem->SetCommand( SVX_SEARCHCMD_FIND );
+ else if ( pBtn == &aSearchAllBtn )
+ pSearchItem->SetCommand( SVX_SEARCHCMD_FIND_ALL );
+ else if ( pBtn == &aReplaceBtn )
+ pSearchItem->SetCommand( SVX_SEARCHCMD_REPLACE );
+ else if ( pBtn == &aReplaceAllBtn )
+ pSearchItem->SetCommand( SVX_SEARCHCMD_REPLACE_ALL );
+
+ // wenn nach Vorlagen gesucht wird, dann Format-Listen l"oschen
+ if ( !bFormat && pSearchItem->GetPattern() )
+ {
+ if ( pSearchList )
+ pSearchList->Clear();
+
+ if ( pReplaceList )
+ pReplaceList->Clear();
+ }
+ nModifyFlag = 0;
+ NotifyApp( FID_SEARCH_NOW );
+ }
+ else if ( pBtn == &aCloseBtn )
+ {
+ if ( !aLayoutBtn.IsChecked() || bInclusive )
+ {
+ String aStr( aSearchLB.GetText() );
+
+ if ( aStr.Len() )
+ Remember_Impl( aStr, TRUE );
+ aStr = aReplaceLB.GetText();
+
+ if ( aStr.Len() )
+ Remember_Impl( aStr, FALSE );
+ }
+ SaveToModule_Impl();
+ Close();
+ }
+ else if ( pBtn == &aSimilarityBtn )
+ {
+ SvxSearchSimilarityDialog* pDlg =
+ new SvxSearchSimilarityDialog( this,
+ pSearchItem->IsLEVRelaxed(),
+ pSearchItem->GetLEVOther(),
+ pSearchItem->GetLEVShorter(),
+ pSearchItem->GetLEVLonger() );
+
+ if ( pDlg->Execute() == RET_OK )
+ {
+ pSearchItem->SetLEVRelaxed( pDlg->IsRelaxed() );
+ pSearchItem->SetLEVOther( pDlg->GetOther() );
+ pSearchItem->SetLEVShorter( pDlg->GetShorter() );
+ pSearchItem->SetLEVLonger( pDlg->GetLonger() );
+ SaveToModule_Impl();
+ }
+ delete pDlg;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, ComboBox *, pEd )
+{
+ if ( !bSet )
+ SetModifyFlag_Impl( pEd );
+ else
+ bSet = FALSE;
+
+ if ( pEd == &aSearchLB || pEd == &aReplaceLB )
+ {
+ xub_StrLen nLBTxtLen = aSearchLB.GetText().Len(), nTxtLen;
+
+ if ( !pImpl->bMultiLineEdit )
+ nTxtLen = aSearchAttrText.GetText().Len();
+ else
+ nTxtLen = aSearchFormatsED.GetText().Len();
+
+ if ( nLBTxtLen || nTxtLen )
+ {
+ EnableControl_Impl( &aSearchBtn );
+ EnableControl_Impl( &aSearchAllBtn );
+ EnableControl_Impl( &aReplaceBtn );
+ EnableControl_Impl( &aReplaceAllBtn );
+ }
+ else
+ {
+ aSearchBtn.Disable();
+ aSearchAllBtn.Disable();
+ aReplaceBtn.Disable();
+ aReplaceAllBtn.Disable();
+ }
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchDialog, TemplateHdl_Impl, Button *, EMPTYARG )
+{
+ if ( pImpl->bSaveToModule )
+ SaveToModule_Impl();
+
+ if ( bFormat )
+ return 0;
+ String sDesc;
+
+ if ( aLayoutBtn.IsChecked() )
+ {
+ if ( !pFamilyController )
+ {
+ USHORT nId = 0;
+
+ // Vorlagen-Controller enablen
+ switch ( pSearchItem->GetFamily() )
+ {
+ case SFX_STYLE_FAMILY_CHAR:
+ nId = SID_STYLE_FAMILY1; break;
+
+ case SFX_STYLE_FAMILY_PARA:
+ nId = SID_STYLE_FAMILY2; break;
+
+ case SFX_STYLE_FAMILY_FRAME:
+ nId = SID_STYLE_FAMILY3; break;
+
+ case SFX_STYLE_FAMILY_PAGE:
+ nId = SID_STYLE_FAMILY4; break;
+
+ case SFX_STYLE_FAMILY_ALL:
+ break;
+
+ default:
+ DBG_ERROR( "StyleSheetFamily wurde geaendert?" );
+ }
+
+ rBindings.EnterRegistrations();
+ pFamilyController =
+ new SvxSearchController( nId, rBindings, *this );
+ rBindings.LeaveRegistrations();
+ aSearchTmplLB.Clear();
+ aReplaceTmplLB.Clear();
+
+ aSearchTmplLB.Show();
+ aReplaceTmplLB.Show();
+ aSearchLB.Hide();
+ aReplaceLB.Hide();
+
+ if ( !pImpl->bMultiLineEdit )
+ {
+ aSearchAttrText.SetText( sDesc );
+ aReplaceAttrText.SetText( sDesc );
+ }
+ else
+ {
+ aSearchFormatsED.SetText( sDesc );
+ aReplaceFormatsED.SetText( sDesc );
+ }
+ }
+ aFormatBtn.Disable();
+ aNoFormatBtn.Disable();
+ aAttributeBtn.Disable();
+ aSimilarityBox.Disable();
+ aSimilarityBtn.Disable();
+ }
+ else
+ {
+ // Vorlagen-Controller disablen
+ rBindings.EnterRegistrations();
+ DELETEZ( pFamilyController );
+ rBindings.LeaveRegistrations();
+
+ aSearchLB.Show();
+ aReplaceLB.Show();
+ aSearchTmplLB.Hide();
+ aReplaceTmplLB.Hide();
+
+ if ( !pImpl->bMultiLineEdit )
+ {
+ aSearchAttrText.SetText( BuildAttrText_Impl( sDesc, TRUE ) );
+ aReplaceAttrText.SetText( BuildAttrText_Impl( sDesc, FALSE ) );
+ }
+ else
+ {
+ aSearchFormatsED.SetText( BuildAttrText_Impl( sDesc, TRUE ) );
+ aReplaceFormatsED.SetText( BuildAttrText_Impl( sDesc, FALSE ) );
+ }
+
+ EnableControl_Impl( &aFormatBtn );
+ EnableControl_Impl( &aAttributeBtn );
+ EnableControl_Impl( &aSimilarityBox );
+
+ FocusHdl_Impl( bSearch ? &aSearchLB : &aReplaceLB );
+ }
+ bSet = TRUE;
+ pImpl->bSaveToModule = FALSE;
+ FlagHdl_Impl( &aLayoutBtn );
+ pImpl->bSaveToModule = TRUE;
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::Remember_Impl( const String &rStr,BOOL bSearch )
+{
+ if ( !rStr.Len() )
+ return;
+
+ SvStringsDtor* pArr = bSearch ? &aSearchStrings : &aReplaceStrings;
+ ComboBox* pListBox = bSearch ? &aSearchLB : &aReplaceLB;
+
+ // identische Strings ignorieren
+ for ( USHORT i = 0; i < pArr->Count(); ++i )
+ {
+ if ( COMPARE_EQUAL == (*pArr)[i]->CompareTo( rStr ) )
+ return;
+ }
+
+ // bei maximaler Belegung "altesten Eintrag l"oschen (ListBox und Array)
+ String* pInsStr;
+
+ if ( pArr->Count() >= REMEMBER_SIZE )
+ {
+ pInsStr = (*pArr)[REMEMBER_SIZE - 1];
+ pListBox->RemoveEntry( USHORT(REMEMBER_SIZE - 1) );
+ pArr->Remove( REMEMBER_SIZE - 1 );
+ *pInsStr = rStr;
+ }
+ else
+ pInsStr = new String( rStr );
+
+ pArr->Insert( pInsStr, 0 );
+ pListBox->InsertEntry( *pInsStr, 0 );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool )
+{
+// SetUpdateMode( FALSE );
+ String aOldSrch( aSearchTmplLB .GetSelectEntry() );
+ String aOldRepl( aReplaceTmplLB.GetSelectEntry() );
+ aSearchTmplLB .Clear();
+ aReplaceTmplLB.Clear();
+ rPool.SetSearchMask( pSearchItem->GetFamily(), SFXSTYLEBIT_ALL );
+ aSearchTmplLB.SetUpdateMode( FALSE );
+ aReplaceTmplLB.SetUpdateMode( FALSE );
+ SfxStyleSheetBase* pBase = rPool.First();
+
+ while ( pBase )
+ {
+ if ( pBase->IsUsed() )
+ aSearchTmplLB.InsertEntry( pBase->GetName() );
+ aReplaceTmplLB.InsertEntry( pBase->GetName() );
+ pBase = rPool.Next();
+ }
+ aSearchTmplLB.SetUpdateMode( TRUE );
+ aReplaceTmplLB.SetUpdateMode( TRUE );
+ aSearchTmplLB.SelectEntryPos(0);
+
+ if ( aOldSrch.Len() )
+ aSearchTmplLB .SelectEntry( aOldSrch );
+ aReplaceTmplLB.SelectEntryPos(0);
+
+ if ( aOldRepl.Len() )
+ aReplaceTmplLB.SelectEntry( aOldRepl );
+
+ if ( aSearchTmplLB.GetEntryCount() )
+ {
+ EnableControl_Impl( &aSearchBtn );
+ EnableControl_Impl( &aSearchAllBtn );
+ EnableControl_Impl( &aReplaceBtn );
+ EnableControl_Impl( &aReplaceAllBtn );
+ }
+// FlagHdl_Impl(0);
+// SetUpdateMode( TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::EnableControls_Impl( const USHORT nFlags )
+{
+ if ( nFlags == nOptions )
+ return;
+ else
+ nOptions = nFlags;
+
+ if ( !nOptions )
+ {
+ if ( IsVisible() )
+ {
+ Hide();
+ return;
+ }
+ }
+ else if ( !IsVisible() )
+ Show();
+ FASTBOOL bNoSearch = TRUE;
+
+ if ( ( SEARCH_OPTIONS_SEARCH & nOptions ) != 0 )
+ {
+ aSearchBtn.Enable();
+ bNoSearch = FALSE;
+ }
+ else
+ aSearchBtn.Disable();
+ if ( ( SEARCH_OPTIONS_SEARCH_ALL & nOptions ) != 0 )
+ {
+ aSearchAllBtn.Enable();
+ bNoSearch = FALSE;
+ }
+ else
+ aSearchAllBtn.Disable();
+ if ( ( SEARCH_OPTIONS_REPLACE & nOptions ) != 0 )
+ {
+ aReplaceBtn.Enable();
+ aReplaceText.Enable();
+ aReplaceLB.Enable();
+ aReplaceTmplLB.Enable();
+ bNoSearch = FALSE;
+ }
+ else
+ {
+ aReplaceBtn.Disable();
+ aReplaceText.Disable();
+ aReplaceLB.Disable();
+ aReplaceTmplLB.Disable();
+ }
+ if ( ( SEARCH_OPTIONS_REPLACE_ALL & nOptions ) != 0 )
+ {
+ aReplaceAllBtn.Enable();
+ bNoSearch = FALSE;
+ }
+ else
+ aReplaceAllBtn.Disable();
+ aSearchBtn.Enable( !bNoSearch );
+ aSearchText.Enable( !bNoSearch );
+ aSearchLB.Enable( !bNoSearch );
+
+ if ( ( SEARCH_OPTIONS_WHOLE_WORDS & nOptions ) != 0 )
+ aWordBtn.Enable();
+ else
+ aWordBtn.Disable();
+ if ( ( SEARCH_OPTIONS_BACKWARDS & nOptions ) != 0 )
+ aBackwardsBtn.Enable();
+ else
+ aBackwardsBtn.Disable();
+ if ( ( SEARCH_OPTIONS_REG_EXP & nOptions ) != 0 )
+ aRegExpBtn.Enable();
+ else
+ aRegExpBtn.Disable();
+ if ( ( SEARCH_OPTIONS_EXACT & nOptions ) != 0 )
+ aExactBtn.Enable();
+ else
+ aExactBtn.Disable();
+ if ( ( SEARCH_OPTIONS_SELECTION & nOptions ) != 0 )
+ aSelectionBtn.Enable();
+ else
+ aSelectionBtn.Disable();
+ if ( ( SEARCH_OPTIONS_FAMILIES & nOptions ) != 0 )
+ aLayoutBtn.Enable();
+ else
+ aLayoutBtn.Disable();
+ if ( ( SEARCH_OPTIONS_FORMAT & nOptions ) != 0 )
+ {
+ aAttributeBtn.Enable();
+ aFormatBtn.Enable();
+ aNoFormatBtn.Enable();
+ }
+ else
+ {
+ aAttributeBtn.Disable();
+ aFormatBtn.Disable();
+ aNoFormatBtn.Disable();
+ }
+ if ( ( SEARCH_OPTIONS_MORE & nOptions ) != 0 &&
+ pSearchItem && pSearchItem->GetAppFlag() == SVX_SEARCHAPP_CALC )
+ pMoreBtn->Enable();
+ else
+ {
+ pMoreBtn->SetState( FALSE );
+ pMoreBtn->Disable();
+ }
+ if ( ( SEARCH_OPTIONS_SIMILARITY & nOptions ) != 0 )
+ {
+ aSimilarityBox.Enable();
+ aSimilarityBtn.Enable();
+ }
+ else
+ {
+ aSimilarityBox.Disable();
+ aSimilarityBtn.Disable();
+ }
+
+ if ( pSearchItem )
+ Init_Impl( pSearchItem->GetPattern() &&
+ ( !pSearchList || !pSearchList->Count() ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::EnableControl_Impl( Control* pCtrl )
+{
+ if ( &aSearchBtn == pCtrl && ( SEARCH_OPTIONS_SEARCH & nOptions ) != 0 )
+ {
+ aSearchBtn.Enable();
+ return;
+ }
+ if ( &aSearchAllBtn == pCtrl &&
+ ( SEARCH_OPTIONS_SEARCH_ALL & nOptions ) != 0 )
+ {
+ aSearchAllBtn.Enable( ( bWriter || !aAllTablesCB.IsChecked() ) );
+ return;
+ }
+ if ( &aReplaceBtn == pCtrl && ( SEARCH_OPTIONS_REPLACE & nOptions ) != 0 )
+ {
+ aReplaceBtn.Enable();
+ return;
+ }
+ if ( &aReplaceAllBtn == pCtrl &&
+ ( SEARCH_OPTIONS_REPLACE_ALL & nOptions ) != 0 )
+ {
+ aReplaceAllBtn.Enable();
+ return;
+ }
+ if ( &aWordBtn == pCtrl && ( SEARCH_OPTIONS_WHOLE_WORDS & nOptions ) != 0 )
+ {
+ aWordBtn.Enable();
+ return;
+ }
+ if ( &aBackwardsBtn == pCtrl && ( SEARCH_OPTIONS_BACKWARDS & nOptions ) != 0 )
+ {
+ aBackwardsBtn.Enable();
+ return;
+ }
+ if ( &aRegExpBtn == pCtrl && ( SEARCH_OPTIONS_REG_EXP & nOptions ) != 0
+ && !aSimilarityBox.IsChecked())
+ {
+ aRegExpBtn.Enable();
+ return;
+ }
+ if ( &aExactBtn == pCtrl && ( SEARCH_OPTIONS_EXACT & nOptions ) != 0 )
+ {
+ aExactBtn.Enable();
+ return;
+ }
+ if ( &aSelectionBtn == pCtrl && ( SEARCH_OPTIONS_SELECTION & nOptions ) != 0 )
+ {
+ aSelectionBtn.Enable();
+ return;
+ }
+ if ( &aLayoutBtn == pCtrl && ( SEARCH_OPTIONS_FAMILIES & nOptions ) != 0 )
+ {
+ aLayoutBtn.Enable();
+ return;
+ }
+ if ( &aAttributeBtn == pCtrl
+ && ( SEARCH_OPTIONS_FORMAT & nOptions ) != 0
+ && pSearchList )
+ {
+ aAttributeBtn.Enable( pImpl->bFocusOnSearch );
+ }
+ if ( &aFormatBtn == pCtrl && ( SEARCH_OPTIONS_FORMAT & nOptions ) != 0 )
+ {
+ aFormatBtn.Enable();
+ return;
+ }
+ if ( &aNoFormatBtn == pCtrl && ( SEARCH_OPTIONS_FORMAT & nOptions ) != 0 )
+ {
+ aNoFormatBtn.Enable();
+ return;
+ }
+ if ( &aSimilarityBox == pCtrl &&
+ ( SEARCH_OPTIONS_SIMILARITY & nOptions ) != 0 )
+ {
+ aSimilarityBox.Enable();
+
+ if ( aSimilarityBox.IsChecked() )
+ aSimilarityBtn.Enable();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::SetItem_Impl( const SvxSearchItem* pItem )
+{
+ if ( pItem )
+ {
+ delete pSearchItem;
+ pSearchItem = (SvxSearchItem*)pItem->Clone();
+ Init_Impl( pSearchItem->GetPattern() &&
+ ( !pSearchList || !pSearchList->Count() ) );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl )
+{
+ xub_StrLen nTxtLen;
+
+ if ( !pImpl->bMultiLineEdit )
+ nTxtLen = aSearchAttrText.GetText().Len();
+ else
+ nTxtLen = aSearchFormatsED.GetText().Len();
+
+ if ( pCtrl == &aSearchLB || pCtrl == &aSearchFormatsED )
+ {
+ if ( pCtrl->HasChildPathFocus() )
+ pImpl->bFocusOnSearch = TRUE;
+ pCtrl = &aSearchLB;
+ bSearch = TRUE;
+
+ if( nTxtLen )
+ EnableControl_Impl( &aNoFormatBtn );
+ else
+ aNoFormatBtn.Disable();
+ EnableControl_Impl( &aAttributeBtn );
+ }
+ else
+ {
+ pImpl->bFocusOnSearch = FALSE;
+ pCtrl = &aReplaceLB;
+ bSearch = FALSE;
+
+ if ( ( !pImpl->bMultiLineEdit && aReplaceAttrText.GetText().Len() ) ||
+ ( pImpl->bMultiLineEdit && aReplaceFormatsED.GetText().Len() ) )
+ EnableControl_Impl( &aNoFormatBtn );
+ else
+ aNoFormatBtn.Disable();
+ aAttributeBtn.Disable();
+ }
+ bSet = TRUE;
+ ModifyHdl_Impl( (ComboBox*)pCtrl );
+ aLayoutBtn.SetText( bFormat && nTxtLen ? aLayoutStr : aStylesStr );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchDialog, LoseFocusHdl_Impl, Control *, EMPTYARG )
+{
+ SaveToModule_Impl();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchDialog, FormatHdl_Impl, Button *, EMPTYARG )
+{
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ DBG_ASSERT( pSh, "no DocShell" );
+
+ if ( !pSh || !pImpl->pRanges )
+ return 0;
+
+ USHORT nCnt = 0;
+ const USHORT* pPtr = pImpl->pRanges;
+ const USHORT* pTmp = pPtr;
+
+ while( *pTmp )
+ pTmp++;
+ nCnt = pTmp - pPtr + 7;
+ USHORT* pWhRanges = new USHORT[nCnt];
+ USHORT nPos = 0;
+
+ while( *pPtr )
+ {
+ pWhRanges[nPos++] = *pPtr++;
+ }
+
+ pWhRanges[nPos++] = SID_ATTR_PARA_MODEL;
+ pWhRanges[nPos++] = SID_ATTR_PARA_MODEL;
+
+ USHORT nBrushWhich = pSh->GetPool().GetWhich(SID_ATTR_BRUSH);
+ pWhRanges[nPos++] = nBrushWhich;
+ pWhRanges[nPos++] = nBrushWhich;
+ pWhRanges[nPos++] = SID_PARA_BACKGRND_DESTINATION;
+ pWhRanges[nPos++] = SID_PARA_BACKGRND_DESTINATION;
+ pWhRanges[nPos] = 0;
+ SfxItemPool& rPool = pSh->GetPool();
+ SfxItemSet aSet( rPool, pWhRanges );
+ String aTxt;
+
+ aSet.InvalidateAllItems();
+ aSet.Put(SvxBrushItem(nBrushWhich));
+ aSet.Put(SfxUInt16Item(SID_PARA_BACKGRND_DESTINATION, PARA_DEST_CHAR));
+
+ if ( bSearch )
+ {
+ aTxt = SVX_RESSTR( RID_SVXSTR_SEARCH );
+ pSearchList->Get( aSet );
+ }
+ else
+ {
+ aTxt = SVX_RESSTR( RID_SVXSTR_REPLACE );
+ pReplaceList->Get( aSet );
+ }
+ aSet.DisableItem(SID_ATTR_PARA_MODEL);
+ aSet.DisableItem(rPool.GetWhich(SID_ATTR_PARA_PAGEBREAK));
+ aSet.DisableItem(rPool.GetWhich(SID_ATTR_PARA_KEEP));
+
+ SvxSearchFormatDialog* pDlg = new SvxSearchFormatDialog( this, aSet );
+
+ aTxt.Insert( pDlg->GetText(), 0 );
+ pDlg->SetText( aTxt );
+
+ if ( pDlg->Execute() == RET_OK )
+ {
+ DBG_ASSERT( pDlg->GetOutputItemSet(), "invalid Output-Set" );
+ SfxItemSet aOutSet( *pDlg->GetOutputItemSet() );
+
+ SearchAttrItemList* pList = bSearch ? pSearchList : pReplaceList;
+
+ SearchAttrItem* pAItem;
+ const SfxPoolItem* pItem;
+ for( USHORT n = 0; n < pList->Count(); ++n )
+ if( !IsInvalidItem( (pAItem = &pList->GetObject(n))->pItem ) &&
+ SFX_ITEM_SET == aOutSet.GetItemState(
+ pAItem->pItem->Which(), FALSE, &pItem ) )
+ {
+ delete pAItem->pItem;
+ pAItem->pItem = pItem->Clone();
+ aOutSet.ClearItem( pAItem->pItem->Which() );
+ }
+
+ if( aOutSet.Count() )
+ pList->Put( aOutSet );
+
+ PaintAttrText_Impl(); // AttributText in GroupBox setzen
+ }
+ delete pDlg;
+ delete pWhRanges;
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchDialog, NoFormatHdl_Impl, Button *, EMPTYARG )
+{
+ aLayoutBtn.SetText( aStylesStr );
+ bFormat = FALSE;
+ aLayoutBtn.Check( FALSE );
+
+ if ( bSearch )
+ {
+ if ( !pImpl->bMultiLineEdit )
+ aSearchAttrText.SetText( String() );
+ else
+ aSearchFormatsED.SetText( String() );
+ pSearchList->Clear();
+ }
+ else
+ {
+ if ( !pImpl->bMultiLineEdit )
+ aReplaceAttrText.SetText( String() );
+ else
+ aReplaceFormatsED.SetText( String() );
+ pReplaceList->Clear();
+ }
+ pImpl->bSaveToModule = FALSE;
+ TemplateHdl_Impl( &aLayoutBtn );
+ pImpl->bSaveToModule = TRUE;
+ aNoFormatBtn.Disable();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchDialog, AttributeHdl_Impl, Button *, EMPTYARG )
+{
+ if ( !pSearchList || !pImpl->pRanges )
+ return 0;
+
+ SvxSearchAttributeDialog* pDlg = new SvxSearchAttributeDialog( this, *pSearchList, pImpl->pRanges );
+ pDlg->Execute();
+ delete pDlg;
+ PaintAttrText_Impl();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchDialog, TimeoutHdl_Impl, Timer *, pTimer )
+{
+ SfxViewShell* pViewShell = SfxViewShell::Current();
+
+ if ( pViewShell )
+ {
+ if ( pViewShell->HasSelection( aSearchLB.IsVisible() ) )
+ EnableControl_Impl( &aSelectionBtn );
+ else
+ {
+ aSelectionBtn.Check( FALSE );
+ aSelectionBtn.Disable();
+ }
+ }
+
+ pTimer->Start();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::GetSearchItems( SfxItemSet& rSet )
+{
+ xub_StrLen nLen;
+
+ if ( !pImpl->bMultiLineEdit )
+ nLen = aSearchAttrText.GetText().Len();
+ else
+ nLen = aSearchFormatsED.GetText().Len();
+
+ if ( nLen && pSearchList )
+ pSearchList->Get( rSet );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::GetReplaceItems( SfxItemSet& rSet )
+{
+ xub_StrLen nLen;
+
+ if ( !pImpl->bMultiLineEdit )
+ nLen = aReplaceAttrText.GetText().Len();
+ else
+ nLen = aReplaceFormatsED.GetText().Len();
+
+ if ( nLen && pReplaceList )
+ pReplaceList->Get( rSet );
+}
+
+// -----------------------------------------------------------------------
+
+String& SvxSearchDialog::BuildAttrText_Impl( String& rStr,
+ BOOL bSrchFlag ) const
+{
+ if ( rStr.Len() )
+ rStr.Erase();
+
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+ DBG_ASSERT( pSh, "no DocShell" );
+
+ if ( !pSh )
+ return rStr;
+
+ SfxItemPool& rPool = pSh->GetPool();
+ SearchAttrItemList* pList = bSrchFlag ? pSearchList : pReplaceList;
+
+ if ( !pList )
+ return rStr;
+
+ // Metrik abfragen
+ SfxMapUnit eMapUnit = SFX_MAPUNIT_CM;
+ FieldUnit eFieldUnit;
+ GET_MODULE_FIELDUNIT( eFieldUnit );
+
+ switch ( eFieldUnit )
+ {
+ case FUNIT_MM: eMapUnit = SFX_MAPUNIT_MM; break;
+ case FUNIT_CM:
+ case FUNIT_M:
+ case FUNIT_KM: eMapUnit = SFX_MAPUNIT_CM; break;
+ case FUNIT_TWIP: eMapUnit = SFX_MAPUNIT_TWIP; break;
+ case FUNIT_POINT:
+ case FUNIT_PICA: eMapUnit = SFX_MAPUNIT_POINT; break;
+ case FUNIT_INCH:
+ case FUNIT_FOOT:
+ case FUNIT_MILE: eMapUnit = SFX_MAPUNIT_INCH; break;
+ case FUNIT_100TH_MM: eMapUnit = SFX_MAPUNIT_100TH_MM; break;
+ }
+
+ for ( USHORT i = 0; i < pList->Count(); ++i )
+ {
+ const SearchAttrItem& rItem = pList->GetObject(i);
+
+ if ( rStr.Len() )
+ rStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) );
+
+ if ( !IsInvalidItem( rItem.pItem ) )
+ {
+ String aStr;
+ rPool.GetPresentation( *rItem.pItem,
+ SFX_ITEM_PRESENTATION_COMPLETE,
+ eMapUnit, aStr );
+ rStr += aStr;
+ }
+ else
+ {
+ //Sonderbehandlung fuer Zeichenhintergrund
+ USHORT nId = rItem.nSlot == SID_ATTR_BRUSH_CHAR ?
+ RID_SVXITEMS_BRUSH_CHAR :
+ rItem.nSlot - SID_SVX_START + RID_ATTR_BEGIN;
+ rStr += SVX_RESSTR( nId );
+ }
+ }
+ return rStr;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::PaintAttrText_Impl()
+{
+ String aDesc;
+ BuildAttrText_Impl( aDesc, bSearch );
+
+ if ( !bFormat && aDesc.Len() )
+ bFormat = TRUE;
+
+ if ( bSearch )
+ {
+ if ( !pImpl->bMultiLineEdit )
+ aSearchAttrText.SetText( aDesc );
+ else
+ aSearchFormatsED.SetText( aDesc );
+ FocusHdl_Impl( &aSearchLB );
+ }
+ else
+ {
+ if ( !pImpl->bMultiLineEdit )
+ aReplaceAttrText.SetText( aDesc );
+ else
+ aReplaceFormatsED.SetText( aDesc );
+ FocusHdl_Impl( &aReplaceLB );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::SetModifyFlag_Impl( const Control* pCtrl )
+{
+ if ( &aSearchLB == (ComboBox*)pCtrl )
+ nModifyFlag |= MODIFY_SEARCH;
+ else if ( &aReplaceLB == (ComboBox*)pCtrl )
+ nModifyFlag |= MODIFY_REPLACE;
+ else if ( &aWordBtn == (CheckBox*)pCtrl )
+ nModifyFlag |= MODIFY_WORD;
+ else if ( &aExactBtn == (CheckBox*)pCtrl )
+ nModifyFlag |= MODIFY_EXACT;
+ else if ( &aBackwardsBtn == (CheckBox*)pCtrl )
+ nModifyFlag |= MODIFY_BACKWARDS;
+ else if ( &aSelectionBtn == (CheckBox*)pCtrl )
+ nModifyFlag |= MODIFY_SELECTION;
+ else if ( &aRegExpBtn == (CheckBox*)pCtrl )
+ nModifyFlag |= MODIFY_REGEXP;
+ else if ( &aLayoutBtn == (CheckBox*)pCtrl )
+ nModifyFlag |= MODIFY_LAYOUT;
+ else if ( &aSimilarityBox == (CheckBox*)pCtrl )
+ nModifyFlag |= MODIFY_SIMILARITY;
+ else if ( &aFormulasBtn == (RadioButton*)pCtrl )
+ nModifyFlag |= MODIFY_FORMULAS;
+ else if ( &aValuesBtn == (RadioButton*)pCtrl )
+ nModifyFlag |= MODIFY_VALUES;
+ else if ( &aNotesBtn == (RadioButton*)pCtrl )
+ nModifyFlag |= MODIFY_NOTES;
+ else if ( &aRowsBtn == (RadioButton*)pCtrl )
+ nModifyFlag |= MODIFY_ROWS;
+ else if ( &aColumnsBtn == (RadioButton*)pCtrl )
+ nModifyFlag |= MODIFY_COLUMNS;
+ else if ( &aAllTablesCB == (CheckBox*)pCtrl )
+ nModifyFlag |= MODIFY_ALLTABLES;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchDialog::SaveToModule_Impl()
+{
+ if ( !pSearchItem )
+ return;
+
+ if ( aLayoutBtn.IsChecked() )
+ {
+ pSearchItem->SetSearchString ( aSearchTmplLB.GetSelectEntry() );
+ pSearchItem->SetReplaceString( aReplaceTmplLB.GetSelectEntry() );
+ }
+ else
+ {
+ pSearchItem->SetSearchString ( aSearchLB.GetText() );
+ pSearchItem->SetReplaceString( aReplaceLB.GetText() );
+ Remember_Impl( aSearchLB.GetText(), TRUE );
+ }
+
+ pSearchItem->SetWordOnly( GetCheckBoxValue( aWordBtn ) );
+ pSearchItem->SetPattern( GetCheckBoxValue( aLayoutBtn ) );
+ pSearchItem->SetSelection( GetCheckBoxValue( aSelectionBtn ) );
+ pSearchItem->SetExact( GetCheckBoxValue( aExactBtn ) );
+ pSearchItem->SetRegExp( GetCheckBoxValue( aRegExpBtn ) );
+ pSearchItem->SetBackward( GetCheckBoxValue( aBackwardsBtn ) );
+
+ if ( !bWriter )
+ {
+ if ( aFormulasBtn.IsChecked() )
+ pSearchItem->SetCellType( SVX_SEARCHIN_FORMULA );
+ else if ( aValuesBtn.IsChecked() )
+ pSearchItem->SetCellType( SVX_SEARCHIN_VALUE );
+ else if ( aNotesBtn.IsChecked() )
+ pSearchItem->SetCellType( SVX_SEARCHIN_NOTE );
+
+ pSearchItem->SetRowDirection( aRowsBtn.IsChecked() );
+ pSearchItem->SetAllTables( aAllTablesCB.IsChecked() );
+ }
+
+ pSearchItem->SetCommand( SVX_SEARCHCMD_FIND );
+ nModifyFlag = 0;
+ NotifyApp( SID_SEARCH_ITEM );
+}
+
+// class SvxSearchDialogWrapper ------------------------------------------
+
+SFX_IMPL_CHILDWINDOW(SvxSearchDialogWrapper, SID_SEARCH_DLG)
+
+// -----------------------------------------------------------------------
+
+SvxSearchDialogWrapper::SvxSearchDialogWrapper( Window* pParent, USHORT nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo ) :
+ SfxChildWindow( pParent, nId )
+
+{
+ pWindow = new SvxSearchDialog( pParent, *pBindings );
+
+ if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 )
+ pWindow->SetPosPixel( pInfo->aPos );
+ pBindings->Update( SID_SEARCH_ITEM );
+ pBindings->Update( SID_SEARCH_OPTIONS );
+ pBindings->Update( SID_SEARCH_SEARCHSET );
+ pBindings->Update( SID_SEARCH_REPLACESET );
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+ ( (SvxSearchDialog*)pWindow )->bConstruct = FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+SfxChildWinInfo SvxSearchDialogWrapper::GetInfo() const
+{
+ return SfxChildWindow::GetInfo();
+}
+
+
diff --git a/svx/source/dialog/srchdlg.hrc b/svx/source/dialog/srchdlg.hrc
new file mode 100644
index 0000000000..8c62f0f48f
--- /dev/null
+++ b/svx/source/dialog/srchdlg.hrc
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_HRC
+#define _SVX_SRCHDLG_HRC
+
+// defines ------------------------------------------------------------------
+
+#define FT_SEARCH 10
+#define ED_SEARCH 11
+#define LB_SEARCH 12
+#define GB_SEARCH_ATTR 13
+#define FT_SEARCH_ATTR 14
+#define FT_REPLACE 15
+#define ED_REPLACE 16
+#define LB_REPLACE 17
+#define GB_REPLACE_ATTR 18
+#define FT_REPLACE_ATTR 19
+
+#define BTN_CELLS 20
+#define BTN_LAYOUTS 21
+#define BTN_SELECTIONS 22
+#define BTN_EXACT 23
+#define BTN_REGEXP 24
+#define BTN_BACKWARDS 25
+#define GB_OPTIONS 26
+
+#define BTN_FORMULAS 30
+#define BTN_VALUES 31
+#define BTN_NOTES 32
+#define GB_SEARCH 33
+#define BTN_ROWS 34
+#define BTN_COLUMNS 35
+#define GB_SEARCHDIR 36
+#define CB_ALLTABLES 37
+#define GB_CALCEXTRAS 38
+
+#define BTN_SEARCH 40
+#define BTN_SEARCH_ALL 41
+#define BTN_REPLACE 42
+#define BTN_REPLACE_ALL 43
+#define BTN_CLOSE 44
+#define BTN_HELP 45
+#define BTN_MORE 46
+#define STR_WORDCALC 47
+#define BTN_FORMAT 48
+#define BTN_NOFORMAT 49
+#define BTN_ATTRIBUTE 50
+
+#define CB_SIMILARITY 51
+#define PB_SIMILARITY 52
+
+#define ED_SEARCH_FORMATS 60
+#define ED_REPLACE_FORMATS 61
+
+
+#endif
+
diff --git a/svx/source/dialog/srchdlg.src b/svx/source/dialog/srchdlg.src
new file mode 100644
index 0000000000..3e46591492
--- /dev/null
+++ b/svx/source/dialog/srchdlg.src
@@ -0,0 +1,1112 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "srchdlg.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // Strings ---------------------------------------------------------------
+String RID_SVXSTR_SEARCH_STYLES
+{
+ Text = "einschließlich ~Vorlagen" ;
+ Text [ ENGLISH ] = "including st~ylesheets" ;
+ Text [ norwegian ] = "inkludert stilark" ;
+ Text [ italian ] = "Includi modelli" ;
+ Text [ portuguese_brazilian ] = "Inclusive folhas de estilo" ;
+ Text [ portuguese ] = "Incluindo ~estilos" ;
+ Text [ finnish ] = "myös tyylitiedostot" ;
+ Text [ danish ] = "Inklusive typografier" ;
+ Text [ french ] = "Y compris les styles" ;
+ Text [ swedish ] = "Inklusive ~mallar" ;
+ Text [ dutch ] = "Inclusief ~opmaakprofielen" ;
+ Text [ spanish ] = "Incluir ~estilos" ;
+ Text [ english_us ] = "Including Styles" ;
+ Text[ chinese_simplified ] = "°üÀ¨Ñùʽ";
+ Text[ russian ] = "Âêëþ÷àÿ ñòèëè";
+ Text[ polish ] = "W³¹cznie ze stylami";
+ Text[ japanese ] = "½À²Ù‚ðŠÜ‚Þ";
+ Text[ chinese_traditional ] = "¥]¬A¼Ë¦¡";
+ Text[ arabic ] = "ÈãÇ Ýí Ðáß ÇáÃäãÇØ";
+ Text[ greek ] = "óõìðåñéëáìâ. ðñüôõðá";
+ Text[ korean ] = "¼­½ÄÆÄÀÏ Æ÷ÇÔ";
+ Text[ turkish ] = "Bi~çimler dahil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_SEARCH
+{
+ Text = " (Suchen)" ;
+ Text [ ENGLISH ] = " (Search)" ;
+ Text [ norwegian ] = " (Søk)" ;
+ Text [ italian ] = "(Cerca)" ;
+ Text [ portuguese_brazilian ] = "(Buscar)" ;
+ Text [ portuguese ] = "(Localizar)" ;
+ Text [ finnish ] = " (Etsi)" ;
+ Text [ danish ] = "(Søg)" ;
+ Text [ french ] = "(Rechercher)" ;
+ Text [ swedish ] = "(Sök)" ;
+ 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 RID_SVXSTR_REPLACE
+{
+ Text = " (Ersetzen)" ;
+ Text [ ENGLISH ] = " (Replace)" ;
+ Text [ norwegian ] = " (Erstatt)" ;
+ Text [ italian ] = "(Sostituisci)" ;
+ Text [ portuguese_brazilian ] = "(Substituir)" ;
+ Text [ portuguese ] = "(Substituir)" ;
+ Text [ finnish ] = " (Korvaa)" ;
+ Text [ danish ] = "(Erstat)" ;
+ Text [ french ] = "(Remplacer)" ;
+ Text [ swedish ] = "(Ersätt)" ;
+ Text [ dutch ] = "(Vervangen)" ;
+ Text [ spanish ] = "(Reemplazar)" ;
+ Text [ english_us ] = "(Replace)" ;
+ Text[ chinese_simplified ] = "(¸üÌæ)";
+ Text[ russian ] = "(Çàìåíèòü)";
+ Text[ polish ] = "(Zamieñ)";
+ Text[ japanese ] = "(’uŠ·)";
+ Text[ chinese_traditional ] = "(´À¥N)";
+ Text[ arabic ] = "(ÇÓÊÈÏÇá)";
+ Text[ greek ] = "(ÁíôéêáôÜóôáóç)";
+ Text[ korean ] = "(´ëü)";
+ Text[ turkish ] = "(Deðiþtir)";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXDLG_SEARCH -----------------------------------------------------
+ModelessDialog RID_SVXDLG_SEARCH
+{
+ HelpId = SID_SEARCH_DLG ;
+ OutputSize = TRUE ;
+ Hide = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 302 , 152 ) ;
+ Text = "Suchen & Ersetzen" ;
+ Text [ ENGLISH ] = "Search & Replace" ;
+ Text [ norwegian ] = "Søk og Erstatt" ;
+ Text [ italian ] = "Cerca e sostituisci" ;
+ Text [ portuguese_brazilian ] = "Procurar & Substituir" ;
+ Text [ portuguese ] = "Localizar & Substituir" ;
+ Text [ finnish ] = "Etsi & korvaa" ;
+ Text [ danish ] = "Søg og erstat" ;
+ Text [ french ] = "Rechercher & remplacer" ;
+ Text [ swedish ] = "Sök och ersätt" ;
+ Text [ dutch ] = "Zoeken & vervangen" ;
+ Text [ spanish ] = "Buscar y reemplazar" ;
+ Text [ english_us ] = "Find & Replace" ;
+ Moveable = TRUE ;
+ FixedText FT_SEARCH
+ {
+ Pos = MAP_APPFONT ( 6 , 7 ) ;
+ Size = MAP_APPFONT ( 55 , 10 ) ;
+ Text = "S~uchen nach" ;
+ Text [ ENGLISH ] = "S~earch for" ;
+ Text [ norwegian ] = "S~øk etter" ;
+ Text [ italian ] = "C~erca" ;
+ Text [ portuguese_brazilian ] = "P~rocurar por" ;
+ Text [ portuguese ] = "L~ocalizar" ;
+ Text [ finnish ] = "~Etsittävä" ;
+ Text [ danish ] = "Søg efter" ;
+ Text [ french ] = "R~echercher" ;
+ Text [ swedish ] = "S~ök efter" ;
+ Text [ dutch ] = "Zoeken ~naar" ;
+ Text [ spanish ] = "B~uscar" ;
+ Text [ english_us ] = "Searc~h for" ;
+ Text[ chinese_simplified ] = "ËÑÑ°ÄÚÈÝ(~H)";
+ Text[ russian ] = "Íàéòè";
+ Text[ polish ] = "Szukaj";
+ Text[ japanese ] = "ŒŸõ€–Ú(~H)";
+ Text[ chinese_traditional ] = "´M§ä¤º®e(~H)";
+ Text[ arabic ] = "ÇáÈÍË Úä";
+ Text[ greek ] = "AíáæÞôçóç ãéá";
+ Text[ korean ] = "ãÀ» ´ë»ó(~H)";
+ Text[ turkish ] = "Arana~n";
+ Text[ language_user1 ] = " ";
+ };
+ ComboBox ED_SEARCH
+ {
+ Pos = MAP_APPFONT ( 62 , 6 ) ;
+ Size = MAP_APPFONT ( 123 , 98 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ListBox LB_SEARCH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 62 , 6 ) ;
+ Size = MAP_APPFONT ( 123 , 98 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ Hide = TRUE ;
+ Sort = TRUE ;
+ };
+ GroupBox GB_SEARCH_ATTR
+ {
+ Pos = MAP_APPFONT ( 6 , 18 ) ;
+ Size = MAP_APPFONT ( 179 , 24 ) ;
+ };
+ FixedText FT_SEARCH_ATTR
+ {
+ Pos = MAP_APPFONT ( 10 , 24 ) ;
+ Size = MAP_APPFONT ( 171 , 16 ) ;
+ WordBreak = TRUE ;
+#ifndef VCL
+ Hide = TRUE ;
+#endif
+ };
+ MultiLineEdit ED_SEARCH_FORMATS
+ {
+ Pos = MAP_APPFONT ( 10 , 24 ) ;
+ Size = MAP_APPFONT ( 171 , 16 ) ;
+ ReadOnly = TRUE ;
+ IgnoreTab = TRUE ;
+#ifdef VCL
+ Hide = TRUE ;
+#endif
+ };
+ FixedText FT_REPLACE
+ {
+ Pos = MAP_APPFONT ( 6 , 49 ) ;
+ Size = MAP_APPFONT ( 55 , 10 ) ;
+ Text = "Ersetzen ~durch" ;
+ Text [ ENGLISH ] = "Replace ~with" ;
+ Text [ norwegian ] = "Erstatt ~med" ;
+ Text [ italian ] = "Sostituisci ~con" ;
+ Text [ portuguese_brazilian ] = "Substituir ~por" ;
+ Text [ portuguese ] = "~Substituir por" ;
+ Text [ finnish ] = "~Korvaava" ;
+ Text [ danish ] = "Erstat med" ;
+ Text [ french ] = "Remplacer ~par" ;
+ Text [ swedish ] = "Ersätt me~d" ;
+ Text [ dutch ] = "Vervangen ~door" ;
+ Text [ spanish ] = "Reemplazar ~con" ;
+ Text [ english_us ] = "Replace ~with" ;
+ Text[ chinese_simplified ] = "Ì滻Ϊ(~W)";
+ Text[ russian ] = "Çàìåíèòü íà";
+ Text[ polish ] = "Zamieñ na";
+ Text[ japanese ] = "’uŠ·Œó•â(~W)";
+ Text[ chinese_traditional ] = "§ó´À¦¨(~W)";
+ Text[ arabic ] = "ÇáßáãÉ ÇáÈÏíáÉ";
+ Text[ greek ] = "ÁíôéêáôÜóôáóç ìå";
+ Text[ korean ] = "(~W)";
+ Text[ turkish ] = "Yeni de~ðer";
+ Text[ language_user1 ] = " ";
+ };
+ ComboBox ED_REPLACE
+ {
+ Pos = MAP_APPFONT ( 62 , 48 ) ;
+ Size = MAP_APPFONT ( 123 , 98 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ListBox LB_REPLACE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 62 , 48 ) ;
+ Size = MAP_APPFONT ( 123 , 98 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ Hide = TRUE ;
+ Sort = TRUE ;
+ };
+ GroupBox GB_REPLACE_ATTR
+ {
+ Pos = MAP_APPFONT ( 6 , 60 ) ;
+ Size = MAP_APPFONT ( 179 , 24 ) ;
+ };
+ FixedText FT_REPLACE_ATTR
+ {
+ Pos = MAP_APPFONT ( 10 , 66 ) ;
+ Size = MAP_APPFONT ( 171 , 16 ) ;
+ WordBreak = TRUE ;
+#ifndef VCL
+ Hide = TRUE ;
+#endif
+ };
+ MultiLineEdit ED_REPLACE_FORMATS
+ {
+ Pos = MAP_APPFONT ( 10 , 66 ) ;
+ Size = MAP_APPFONT ( 171 , 16 ) ;
+ ReadOnly = TRUE ;
+ IgnoreTab = TRUE ;
+#ifdef VCL
+ Hide = TRUE ;
+#endif
+ };
+ CheckBox BTN_CELLS
+ {
+ Pos = MAP_APPFONT ( 12 , 103 ) ;
+ Size = MAP_APPFONT ( 87 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Nur ganze W~örter : Nur ganze W~÷rter */
+ Text = "Nur ganze W~örter" ;
+ Text [ ENGLISH ] = "Whole Wor~ds Only" ;
+ Text [ norwegian ] = "Kun Hele O~rd" ;
+ Text [ italian ] = "Solo ~parole intere" ;
+ Text [ portuguese_brazilian ] = "Apenas Palavras Int~eiras" ;
+ Text [ portuguese ] = "Apenas palavras int~eiras" ;
+ Text [ finnish ] = "Vain kokonaiset ~sanat" ;
+ Text [ danish ] = "Kun hele ord" ;
+ Text [ french ] = "~Mots entiers" ;
+ Text [ swedish ] = "Endast hela ~ord" ;
+ Text [ dutch ] = "Alleen hele ~woorden" ;
+ Text [ spanish ] = "Solo pa~labras completas" ;
+ Text [ english_us ] = "Whole wor~ds only" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "Ö»ÔÊÐíÕû¸ö´Ê(~D)";
+ Text[ russian ] = "Òîëüêî âñå ñëîâî";
+ Text[ polish ] = "Tylko ca³e s³owa";
+ Text[ japanese ] = "’PŒê‚Æ‚µ‚Ä(~D)";
+ Text[ chinese_traditional ] = "¥u¤¹³\\¾ã­Óµü(~D)";
+ Text[ arabic ] = "ßáãÇÊ ßÇãáÉ ÝÞØ";
+ Text[ greek ] = "Ìüíï ïëüêëçñåò ëÝîåéò";
+ Text[ korean ] = "Àüü ´Ü¾î¸¸(~D)";
+ Text[ turkish ] = "Yalnýzca tam s~özcük";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox BTN_EXACT
+ {
+ Pos = MAP_APPFONT ( 102 , 103 ) ;
+ Size = MAP_APPFONT ( 87 , 10 ) ;
+ Text = "E~xakte Suche" ;
+ Text [ ENGLISH ] = "Ma~tch Case" ;
+ Text [ norwegian ] = "Jam~før Tilfelle" ;
+ Text [ italian ] = "Ricerca esatta" ;
+ Text [ portuguese_brazilian ] = "Igua~lar Caixa" ;
+ Text [ portuguese ] = "Localizar e~xacto" ;
+ Text [ finnish ] = "Kir~jainkoko vaikuttaa" ;
+ Text [ danish ] = "Søg eksakt" ;
+ Text [ french ] = "Respecter la ~casse" ;
+ Text [ swedish ] = "Sök e~xakt" ;
+ Text [ dutch ] = "E~xact dezelfde tekens" ;
+ Text [ spanish ] = "Coincidencia e~xacta" ;
+ Text [ english_us ] = "Ma~tch case" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "¾«È·ËÑÑ°(~T)";
+ Text[ russian ] = "Òî÷íûé ïîèñê";
+ Text[ polish ] = "Dok³adne wyszukiwanie";
+ Text[ japanese ] = "‘啶Žš/¬•¶Žš‚ð‹æ•Ê(~T)";
+ Text[ chinese_traditional ] = "ºë½T´M§ä(~T)";
+ Text[ arabic ] = "ÈÍË ÏÞíÞ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "ÁêñéâÞò áíáæÞôçóç";
+ Text[ korean ] = "»ó¼¼ÇÏ°Ô Ã£±â(~T)";
+ Text[ turkish ] = "~BÜYÜK/küçük harf duyarlý";
+ };
+ CheckBox BTN_BACKWARDS
+ {
+ Pos = MAP_APPFONT ( 12 , 116 ) ;
+ Size = MAP_APPFONT ( 87 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Rüc~kwärts : R³c~kwõrts */
+ Text = "Rüc~kwärts" ;
+ Text [ ENGLISH ] = "Bac~kwards" ;
+ Text [ norwegian ] = "Bako~ver" ;
+ Text [ italian ] = "I~ndietro" ;
+ Text [ portuguese_brazilian ] = "Para átr~s" ;
+ Text [ portuguese ] = "~Para trás" ;
+ Text [ finnish ] = "~Taaksepäin" ;
+ Text [ danish ] = "Tilbage" ;
+ Text [ french ] = "~Vers le haut" ;
+ Text [ swedish ] = "Ba~klänges" ;
+ Text [ dutch ] = "Ac~hterwaarts" ;
+ Text [ spanish ] = "Retroce~der" ;
+ Text [ english_us ] = "Bac~kward" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "Ïòºó(~K)";
+ Text[ russian ] = "Îáðàòíûé ïîèñê";
+ Text[ polish ] = "Wstecz";
+ Text[ japanese ] = "Œ³‚É–ß‚é(~K)";
+ Text[ chinese_traditional ] = "¦V«á(~K)";
+ Text[ arabic ] = "ááÎáÝ";
+ Text[ greek ] = "~Ðßóù";
+ Text[ korean ] = "µÚ·Î(~K)";
+ Text[ turkish ] = "~Geri";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox BTN_SELECTIONS
+ {
+ Pos = MAP_APPFONT ( 102 , 116 ) ;
+ Size = MAP_APPFONT ( 87 , 10 ) ;
+ Text = "~Nur in Selektion" ;
+ Text [ ENGLISH ] = "Select~ions" ;
+ Text [ norwegian ] = "Alternativ~er" ;
+ Text [ italian ] = "Solo nella selez~ione" ;
+ Text [ portuguese_brazilian ] = "Sele~ções" ;
+ Text [ portuguese ] = "Apenas ~selecção activa" ;
+ Text [ finnish ] = "~Vain valittu alue" ;
+ Text [ danish ] = "Kun det markerede" ;
+ Text [ french ] = "Rechercher dans la ~sélection" ;
+ Text [ swedish ] = "Endast mar~kering" ;
+ Text [ dutch ] = "Alleen in sele~ctie" ;
+ Text [ spanish ] = "Solo e~n la selección" ;
+ Text [ english_us ] = "Current selection ~only" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "Ö»ÔÊÐíµ±Ç°µÄÑ¡Ôñ(~O)";
+ Text[ russian ] = "Òîëüêî â âûäåëåíèè";
+ Text[ polish ] = "Tylko w selek~cji";
+ Text[ japanese ] = "‘I‘ð”͈͂̂Ý(~O)";
+ Text[ chinese_traditional ] = "¥u¤¹³\\·í«eªº¿ï¾Ü(~O)";
+ Text[ arabic ] = "ÇáÊÍÏíÏ ÝÞØ";
+ Text[ greek ] = "Ìü~íï óôçí åðéëïãÞ";
+ Text[ korean ] = "ÇöÀç ¼±ÅûçÇ׸¸(~O)";
+ Text[ turkish ] = "~Yalnýzca seçilen aralýk içinde";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox BTN_REGEXP
+ {
+ Pos = MAP_APPFONT ( 12 , 129 ) ;
+ Size = MAP_APPFONT ( 87 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Re~gulärer Ausdruck : Re~gulõrer Ausdruck */
+ Text = "Re~gulärer Ausdruck" ;
+ Text [ ENGLISH ] = "Re~gular Expressions" ;
+ Text [ norwegian ] = "Va~nlige Uttrykk" ;
+ Text [ italian ] = "Espressione re~golare" ;
+ Text [ portuguese_brazilian ] = "Express es Re~gulares" ;
+ Text [ portuguese ] = "~Expressão regular" ;
+ Text [ finnish ] = "S~äännönmukaiset lausekkeet" ;
+ Text [ danish ] = "Regulært udtryk" ;
+ Text [ french ] = "Caractère ~générique" ;
+ Text [ swedish ] = "Reguljärt uttr~yck" ;
+ Text [ dutch ] = "Gangbare ~uitdrukking" ;
+ Text [ spanish ] = "Expresión re~gular" ;
+ Text [ english_us ] = "Regular e~xpressions" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "³£¹æ±í´ï(~X)";
+ Text[ russian ] = "Ðåãóëÿðíîå âûðàæåíèå";
+ Text[ polish ] = "Wyra¿enie regularne";
+ Text[ japanese ] = "ܲÙÄÞ¶°ÄÞ•¶Žš(~X)";
+ Text[ chinese_traditional ] = "±`³Wªí¹F(~X)";
+ Text[ arabic ] = "ÊÚÈíÑ ÇÚÊíÇÏí";
+ Text[ greek ] = "ÊáíïíéêÞ ðáñÜóôáóç";
+ Text[ korean ] = "º¸Åë Ç¥Çö(~X)";
+ Text[ turkish ] = "Genel a~rama karakteri";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox BTN_LAYOUTS
+ {
+ Pos = MAP_APPFONT ( 102 , 129 ) ;
+ Size = MAP_APPFONT ( 87 , 10 ) ;
+ Text = "Suche nach ~Vorlagen" ;
+ Text [ ENGLISH ] = "Search for St~ylesheets" ;
+ Text [ norwegian ] = "Søk etter St~ilark" ;
+ Text [ italian ] = "Cerca modelli" ;
+ Text [ portuguese_brazilian ] = "Procurar por Fo~lhas de estilo" ;
+ Text [ portuguese ] = "Locali~zar estilos" ;
+ Text [ finnish ] = "Etsi t~yylitiedostoja" ;
+ Text [ danish ] = "Søg efter typografier" ;
+ Text [ french ] = "Rechercher des st~yles" ;
+ Text [ swedish ] = "Sök efter ~formatmallar" ;
+ Text [ dutch ] = "O~pmaakprofielen" ;
+ Text [ spanish ] = "Buscar ~estilos" ;
+ Text [ english_us ] = "Search for St~yles" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ËÑÑ°Ñùʽ(~Y)";
+ Text[ russian ] = "Ïîèñê ñòèëåé";
+ Text[ polish ] = "Szu~kaj szablonów";
+ Text[ japanese ] = "½À²Ù‚ÌŒŸõ(~Y)";
+ Text[ chinese_traditional ] = "´M§ä¼Ë¦¡(~Y)";
+ Text[ arabic ] = "ÇáÈÍË Úä ÃäãÇØ";
+ Text[ greek ] = "AíáæÞôçóç ðñïôýðùí";
+ Text[ korean ] = "¼­½ÄÆÄÀÏ Ã£±â(~Y)";
+ Text[ language_user1 ] = " ";
+ Text[ turkish ] = "~Biçim ara";
+ };
+ CheckBox CB_SIMILARITY
+ {
+ Pos = MAP_APPFONT ( 192 , 103 ) ;
+ Size = MAP_APPFONT ( 81 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Ähnlichkeitssuche : ~Žhnlichkeitssuche */
+ Text = "~Ähnlichkeitssuche" ;
+ Text [ English ] = "Similarity Search" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "Overeen~komsten" ;
+ Text [ english_us ] = "S~imilarity search" ;
+ Text [ italian ] = "Ricerca per simili" ;
+ Text [ spanish ] = "Búsqueda por se~mejanza" ;
+ Text [ french ] = "R~echerche de similarité" ;
+ Text [ swedish ] = "L~ikhetssökning" ;
+ Text [ danish ] = "Søg lignende" ;
+ Text [ portuguese_brazilian ] = "~Ähnlichkeitssuche" ;
+ Text [ portuguese ] = "Pro~cura por semelhança" ;
+ Text[ chinese_simplified ] = "ÀàËÆËÑÑ°(~I)";
+ Text[ russian ] = "Ïîèñê ïîõîæèõ";
+ Text[ polish ] = "Szukaj podo~bnych";
+ Text[ japanese ] = "—ÞŽ—½ÍßÙ‚ÌŒŸõ(~I)";
+ Text[ chinese_traditional ] = "Ãþ¦ü´M§ä(~I)";
+ Text[ arabic ] = "ÇáÈÍË Úä ßáãÇÊ ãÊÔÇÈåÉ";
+ Text[ greek ] = "ÁíáæÞôçóç ïìïéüôçôáò";
+ Text[ korean ] = "À¯»ç¼º ã±â(~I)";
+ Text[ turkish ] = "~Benzerleri ara";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_SIMILARITY
+ {
+ Pos = MAP_APPFONT ( 276 , 101 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ Text = "~..." ;
+ TabStop = TRUE ;
+ };
+ GroupBox GB_OPTIONS
+ {
+ Pos = MAP_APPFONT ( 6 , 91 ) ;
+ Size = MAP_APPFONT ( 290 , 55 ) ;
+ Text = "Optionen" ;
+ Text [ ENGLISH ] = "Options" ;
+ Text [ norwegian ] = "Options" ;
+ Text [ italian ] = "Opzioni" ;
+ Text [ portuguese_brazilian ] = "Opções" ;
+ Text [ portuguese ] = "Opções" ;
+ Text [ finnish ] = "Määritykset" ;
+ 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[ language_user1 ] = " ";
+ Text[ greek ] = "ÅðéëïãÝò";
+ Text[ korean ] = "¿É¼Ç";
+ Text[ turkish ] = "Seçenekler";
+ };
+ RadioButton BTN_FORMULAS
+ {
+ Pos = MAP_APPFONT ( 12 , 163 ) ;
+ Size = MAP_APPFONT ( 74 , 10 ) ;
+ Text = "F~ormeln" ;
+ Text [ ENGLISH ] = "F~ormulas" ;
+ Text [ norwegian ] = "F~ormler" ;
+ Text [ italian ] = "F~ormule" ;
+ Text [ portuguese_brazilian ] = "F~órmulas" ;
+ Text [ portuguese ] = "F~órmulas" ;
+ Text [ finnish ] = "K~aavat" ;
+ Text [ danish ] = "Formler" ;
+ Text [ french ] = "F~ormules" ;
+ Text [ swedish ] = "F~ormler" ;
+ Text [ dutch ] = "~Formules" ;
+ Text [ spanish ] = "~Fórmulas" ;
+ Text [ english_us ] = "Formulas" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "³Ìʽ(~O)";
+ Text[ russian ] = "ôîðìóëàõ";
+ Text[ polish ] = "~formu³ach";
+ Text[ japanese ] = "”Ž®";
+ Text[ chinese_traditional ] = "¤½¦¡(~F)";
+ Text[ arabic ] = "ÇáÕíÛ";
+ Text[ greek ] = "Ôýðïé";
+ Text[ korean ] = "¼ö½Ä";
+ Text[ turkish ] = "F~ormül";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_VALUES
+ {
+ Pos = MAP_APPFONT ( 12 , 176 ) ;
+ Size = MAP_APPFONT ( 74 , 10 ) ;
+ Text = "~Werten" ;
+ Text [ ENGLISH ] = "~Values" ;
+ Text [ norwegian ] = "~Verdier" ;
+ Text [ italian ] = "~Valori" ;
+ Text [ portuguese_brazilian ] = "~Valores" ;
+ Text [ portuguese ] = "~Valores" ;
+ Text [ finnish ] = "Ar~vot" ;
+ Text [ danish ] = "Værdier" ;
+ Text [ french ] = "V~aleurs" ;
+ Text [ swedish ] = "~Värden" ;
+ Text [ dutch ] = "~Waarden" ;
+ Text [ spanish ] = "~Valores" ;
+ Text [ english_us ] = "~Values" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "ÊýÖµ(~V)";
+ Text[ russian ] = "çíà÷åíèÿõ";
+ Text[ polish ] = "wartoœc~iach";
+ Text[ japanese ] = "’l(~V)";
+ Text[ chinese_traditional ] = "¼Æ­È(~V)";
+ Text[ arabic ] = "ÇáÞíã";
+ Text[ greek ] = "ÔéìÝò";
+ Text[ korean ] = "°ª(~V)";
+ Text[ turkish ] = "~Deðer";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_NOTES
+ {
+ Pos = MAP_APPFONT ( 12 , 189 ) ;
+ Size = MAP_APPFONT ( 74 , 10 ) ;
+ Text = "No~tizen" ;
+ Text [ ENGLISH ] = "~Notes" ;
+ Text [ norwegian ] = "~Notes" ;
+ Text [ italian ] = "~Note" ;
+ Text [ portuguese_brazilian ] = "~Observações" ;
+ Text [ portuguese ] = "~Observações" ;
+ Text [ finnish ] = "~Huomautukset" ;
+ Text [ danish ] = "Noter" ;
+ Text [ french ] = "~Notes" ;
+ Text [ swedish ] = "Antecknin~gar" ;
+ Text [ dutch ] = "Aan~tekeningen" ;
+ Text [ spanish ] = "Not~as" ;
+ Text [ english_us ] = "~Notes" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "±¸×¢(~N)";
+ Text[ russian ] = "ïðèìå÷àíèÿõ";
+ Text[ polish ] = "~notatkach";
+ Text[ japanese ] = "ÒÓ’ (~N)";
+ Text[ chinese_traditional ] = "³Æª`(~N)";
+ Text[ arabic ] = "ÇáãáÇÍÙÇÊ";
+ Text[ greek ] = "Óçìåéþóåéò";
+ Text[ korean ] = "¸Þ¸ð(~N)";
+ Text[ turkish ] = "No~t";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_SEARCH
+ {
+ Pos = MAP_APPFONT ( 6 , 152 ) ;
+ Size = MAP_APPFONT ( 86 , 54 ) ;
+ Text = "Suchen in" ;
+ Text [ ENGLISH ] = "Search In" ;
+ Text [ norwegian ] = "Søk i" ;
+ Text [ italian ] = "Cerca in" ;
+ Text [ portuguese_brazilian ] = "Buscar Em" ;
+ Text [ portuguese ] = "Localizar em" ;
+ Text [ finnish ] = "Tutkittava" ;
+ Text [ danish ] = "Søg i" ;
+ Text [ french ] = "Où chercher ?" ;
+ Text [ swedish ] = "Sök i" ;
+ Text [ dutch ] = "Zoeken in" ;
+ Text [ spanish ] = "Buscar en" ;
+ Text [ english_us ] = "Search in" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "ËÑѰλÖÃ";
+ Text[ russian ] = "Íàéòè â";
+ Text[ polish ] = "Szukaj w";
+ Text[ japanese ] = "ŒŸõêŠ";
+ Text[ chinese_traditional ] = "´M§ä¦ì¸m";
+ Text[ arabic ] = "ÇáÈÍË Ýí";
+ Text[ greek ] = "ÁíáæÞôçóç óôï";
+ Text[ korean ] = "ãÀ» ¹üÀ§";
+ Text[ turkish ] = "Bakýlacak yerler";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_ROWS
+ {
+ Pos = MAP_APPFONT ( 104 , 163 ) ;
+ Size = MAP_APPFONT ( 75 , 10 ) ;
+ Text = "Zeilenwe~ise" ;
+ Text [ ENGLISH ] = "~Rows" ;
+ Text [ norwegian ] = "~Rows" ;
+ Text [ italian ] = "A riga" ;
+ Text [ portuguese_brazilian ] = "Filei~ras" ;
+ Text [ portuguese ] = "~Linhas" ;
+ Text [ finnish ] = "~Rivit" ;
+ Text [ danish ] = "Rækkevis" ;
+ Text [ french ] = "~Ligne par ligne" ;
+ Text [ swedish ] = "Radv~is" ;
+ Text [ dutch ] = "~Rijen" ;
+ Text [ spanish ] = "Por f~ilas" ;
+ Text [ english_us ] = "Ro~ws" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "°´ÕÕÐÐ(~W)";
+ Text[ russian ] = "Ïî ñòðîêàì";
+ Text[ polish ] = "Wierszami";
+ Text[ japanese ] = "s(~W)";
+ Text[ chinese_traditional ] = "«ö·ÓÄæ(~W)";
+ Text[ arabic ] = "ÇáÕÝæÝ";
+ Text[ greek ] = "ÊáôÜ ãñáììÝò";
+ Text[ korean ] = "Çà(~W)";
+ Text[ turkish ] = "Sat~ýr";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_COLUMNS
+ {
+ Pos = MAP_APPFONT ( 104 , 176 ) ;
+ Size = MAP_APPFONT ( 75 , 10 ) ;
+ Text = "S~paltenweise" ;
+ Text [ ENGLISH ] = "Col~umns" ;
+ Text [ norwegian ] = "Kolo~nner" ;
+ Text [ italian ] = "Per col~onne" ;
+ Text [ portuguese_brazilian ] = "Col~unas" ;
+ Text [ portuguese ] = "Col~unas" ;
+ Text [ finnish ] = "~Sarakkeet" ;
+ Text [ danish ] = "Kolonnevis" ;
+ Text [ french ] = "Col~onne par colonne" ;
+ Text [ swedish ] = "Kol~umnvis" ;
+ Text [ dutch ] = "K~olommen" ;
+ Text [ spanish ] = "Por columna~s" ;
+ Text [ english_us ] = "Col~umns" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "°´ÕÕÁÐ(~U)";
+ Text[ russian ] = "Ïî ñòîëáöàì";
+ Text[ polish ] = "Kolumnami";
+ Text[ japanese ] = "—ñ(~U)";
+ Text[ chinese_traditional ] = "«ö·ÓÄæ(~U)";
+ Text[ arabic ] = "ÇáÃÚãÏÉ";
+ Text[ greek ] = "ÊáôÜ óôÞëåò";
+ Text[ korean ] = "¿­(~U)";
+ Text[ turkish ] = "S~ütun";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_SEARCHDIR
+ {
+ Pos = MAP_APPFONT ( 98 , 152 ) ;
+ Size = MAP_APPFONT ( 87 , 54 ) ;
+ Text = "Suchrichtung" ;
+ Text [ ENGLISH ] = "Search Direction" ;
+ Text [ norwegian ] = "Søk Retning" ;
+ Text [ italian ] = "Modo ricerca" ;
+ Text [ portuguese_brazilian ] = "Direção de Busca" ;
+ Text [ portuguese ] = "Direcção de procura" ;
+ Text [ finnish ] = "Etsintäsuunta" ;
+ Text [ danish ] = "Søgeretning" ;
+ Text [ french ] = "Sens" ;
+ Text [ swedish ] = "Sökriktning" ;
+ Text [ dutch ] = "Zoekrichting" ;
+ Text [ spanish ] = "Dirección de búsqueda" ;
+ Text [ english_us ] = "Search direction" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "ËÑÑ°·½Ïò";
+ Text[ russian ] = "Íàïðàâëåíèå ïîèñêà";
+ Text[ polish ] = "Kierunek wyszukiwania";
+ Text[ japanese ] = "ŒŸõ•ûŒü";
+ Text[ chinese_traditional ] = "´M§ä¤è¦V";
+ Text[ arabic ] = "ÇÊÌÇå ÇáÈÍË";
+ Text[ greek ] = "Êáôåýèõíóç áíáæÞôçóçò";
+ Text[ korean ] = "ãÀ» ¹æÇâ";
+ Text[ turkish ] = "Arama yönü";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_ALLTABLES
+ {
+ Pos = MAP_APPFONT ( 197 , 163 ) ;
+ Size = MAP_APPFONT ( 93 , 10 ) ;
+ Text = "~In allen Tabellen suchen" ;
+ Text [ ENGLISH ] = "~Search in all tables" ;
+ Hide = TRUE ;
+ Text [ portuguese ] = "~Procurar em todas as folhas" ;
+ Text [ english_us ] = "~Search in all sheets" ;
+ Text [ portuguese_brazilian ] = "~In allen Tabellen suchen" ;
+ Text [ swedish ] = "Sök i alla ta~beller" ;
+ Text [ danish ] = "Søg i alle tabeller" ;
+ Text [ italian ] = "~Cerca in tutte le tabelle" ;
+ Text [ spanish ] = "~Buscar en todas las hojas" ;
+ Text [ french ] = "~Rechercher dans toutes les feuilles" ;
+ Text [ dutch ] = "~In alle werkbladen zoeken" ;
+ Text[ chinese_simplified ] = "ÔÚËùÓбí¸ñÖÐËÑÑ°(~S)";
+ Text[ russian ] = "Ïîèñê âî âñåõ òàáëèöàõ";
+ Text[ polish ] = "Szukaj we wszystkich arkuszach";
+ Text[ japanese ] = "‚·‚ׂĂ̕\\‚ðŒŸõ(~S)";
+ Text[ chinese_traditional ] = "´M§ä¥þ³¡ªºªí®æ(~S)";
+ Text[ arabic ] = "ÇáÈÍË Ýí ßá ÇáÌÏÇæá";
+ Text[ greek ] = "ÁíáæÞôçóç óå üëïõò ôïõò ðßíáêåò";
+ Text[ korean ] = "Àüü ½ÃÆ®¿¡¼­ ã±â(~S)";
+ Text[ turkish ] = "~Tüm tablolarda ara";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_CALCEXTRAS
+ {
+ Pos = MAP_APPFONT ( 191 , 152 ) ;
+ Size = MAP_APPFONT ( 105 , 54 ) ;
+ Text = "Extras" ;
+ Text [ ENGLISH ] = "Extras" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "Extras" ;
+ Text [ portuguese_brazilian ] = "Extras" ;
+ Text [ swedish ] = "Verktyg" ;
+ Text [ danish ] = "Supplerende" ;
+ Text [ italian ] = "Extra" ;
+ Text [ spanish ] = "Considerar todas las hojas" ;
+ Text [ french ] = "Classeur à plusieurs feuilles" ;
+ Text [ dutch ] = "Extra" ;
+ Text [ portuguese ] = "Ferramentas" ;
+ Text[ chinese_simplified ] = "¹¤¾ß";
+ Text[ russian ] = "Ñåðâèñ";
+ Text[ polish ] = "Narzêdzia";
+ Text[ japanese ] = "Ú×Ý’è";
+ Text[ chinese_traditional ] = "¤u¨ã";
+ Text[ arabic ] = "ÅÖÇÝÉ";
+ Text[ greek ] = "Ðñüóèåôá";
+ Text[ korean ] = "º°µµ Ãß°¡";
+ Text[ turkish ] = "Tablo seçenekleri";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_SEARCH_ALL
+ {
+ Pos = MAP_APPFONT ( 192 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Suche ~alle" ;
+ Text [ ENGLISH ] = "Search ~All" ;
+ Text [ norwegian ] = "Søk ~Alle" ;
+ Text [ italian ] = "Cerca ~tutto" ;
+ Text [ portuguese_brazilian ] = "Buscar ~Tudo" ;
+ Text [ portuguese ] = "Localizar ~tudo" ;
+ Text [ finnish ] = "E~tsi kaikki" ;
+ Text [ danish ] = "Søg alle" ;
+ Text [ french ] = "Rechercher ~tout" ;
+ Text [ swedish ] = "Sök ~alla" ;
+ Text [ dutch ] = "~Alles zoeken" ;
+ Text [ spanish ] = "Buscar ~todo" ;
+ Text [ english_us ] = "Find ~All" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ËÑÑ°È«²¿(~A)";
+ Text[ russian ] = "Íàéòè âñå";
+ Text[ polish ] = "~ZnajdŸ wszystkie";
+ Text[ japanese ] = "‚·‚ׂČŸõ(~A)";
+ Text[ chinese_traditional ] = "´M§ä¥þ³¡(~A)";
+ Text[ arabic ] = "ÇáÈÍË Úä Çáßá";
+ Text[ greek ] = "AíáæÞôçóç üëá";
+ Text[ korean ] = "¸ðµÎ ã±â(~A)";
+ Text[ turkish ] = "Tümünü a~ra";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_SEARCH
+ {
+ Pos = MAP_APPFONT ( 246 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Suchen" ;
+ Text [ ENGLISH ] = "~Search" ;
+ Text [ norwegian ] = "~Søke" ;
+ Text [ italian ] = "~Cerca" ;
+ Text [ portuguese_brazilian ] = "~Buscar" ;
+ Text [ portuguese ] = "~Localizar" ;
+ Text [ finnish ] = "~Etsi" ;
+ Text [ danish ] = "Søg" ;
+ Text [ french ] = "~Rechercher" ;
+ Text [ swedish ] = "~Sök" ;
+ Text [ dutch ] = "~Zoeken" ;
+ Text [ spanish ] = "~Buscar" ;
+ Text [ english_us ] = "~Find" ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ Text[ chinese_simplified ] = "ËÑÑ°(~F)";
+ Text[ russian ] = "Íàéòè";
+ Text[ polish ] = "Szukaj";
+ Text[ japanese ] = "ŒŸõ(~S)";
+ Text[ chinese_traditional ] = "´M§ä(~S)";
+ Text[ arabic ] = "ÈÍË";
+ Text[ greek ] = "AíáæÞôçóç";
+ Text[ korean ] = "ã±â(~F)";
+ Text[ turkish ] = "~Ara";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_REPLACE_ALL
+ {
+ Pos = MAP_APPFONT ( 192 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "E~rsetze alle" ;
+ Text [ ENGLISH ] = "Replace A~ll" ;
+ Text [ norwegian ] = "Erstat A~lle" ;
+ Text [ italian ] = "Sostituisci t~utto" ;
+ Text [ portuguese_brazilian ] = "Substituir T~udo" ;
+ Text [ portuguese ] = "Substituir t~udo" ;
+ Text [ finnish ] = "K~orvaa kaikki" ;
+ Text [ danish ] = "Erstat alle" ;
+ Text [ french ] = "Remplacer t~out" ;
+ Text [ swedish ] = "E~rsätt alla" ;
+ Text [ dutch ] = "A~lles vervangen" ;
+ Text [ spanish ] = "Reemplazar t~odo" ;
+ Text [ english_us ] = "Replace A~ll" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "È«²¿¸üÌæ(~L)";
+ Text[ russian ] = "Çàìåíèòü âñå";
+ Text[ polish ] = "Zamieñ wszyst.";
+ Text[ japanese ] = "‚·‚ׂĒuŠ·(~L)";
+ Text[ chinese_traditional ] = "¥þ³¡´À¥N(~L)";
+ Text[ arabic ] = "ÇÓÊÈÏÇá Çáßá";
+ Text[ greek ] = "ÁíôéêáôÜóôáóç üëá";
+ Text[ korean ] = "¸ðµÎ ´ëü(~L)";
+ Text[ turkish ] = "Tümünü deðiþ~tir";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_REPLACE
+ {
+ Pos = MAP_APPFONT ( 246 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Ersetzen" ;
+ Text [ ENGLISH ] = "Re~place" ;
+ Text [ norwegian ] = "Er~statte" ;
+ Text [ italian ] = "So~stituisci" ;
+ Text [ portuguese_brazilian ] = "Su~bstituir" ;
+ Text [ portuguese ] = "~Substituir" ;
+ Text [ finnish ] = "~Korvaa" ;
+ Text [ danish ] = "Erstat" ;
+ Text [ french ] = "R~emplacer" ;
+ Text [ swedish ] = "~Ersätt" ;
+ Text [ dutch ] = "~Vervangen" ;
+ Text [ spanish ] = "~Reemplazar" ;
+ Text [ english_us ] = "~Replace" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "¸üÌæ(~R)";
+ Text[ russian ] = "Çàìåíèòü";
+ Text[ polish ] = "Zamieñ";
+ Text[ japanese ] = "’uŠ·(~R)";
+ Text[ chinese_traditional ] = "´À¥N(~R)";
+ Text[ arabic ] = "ÇÓÊÈÏÇá";
+ Text[ greek ] = "ÁíôéêáôÜóôáóç";
+ Text[ korean ] = "´ëüÇϱâ(~R)";
+ Text[ turkish ] = "Deði~þtir";
+ Text[ language_user1 ] = " ";
+ };
+ CancelButton BTN_CLOSE
+ {
+ Pos = MAP_APPFONT ( 246 , 40 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? S~chließen : S~chlie˜en */
+ Text = "S~chließen" ;
+ 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 ] = "S~täng" ;
+ Text [ dutch ] = "~Sluiten" ;
+ Text [ spanish ] = "~Cerrar" ;
+ Text [ english_us ] = "~Close" ;
+ TabStop = TRUE ;
+ 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 BTN_HELP
+ {
+ Pos = MAP_APPFONT ( 246 , 57 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ MoreButton BTN_MORE
+ {
+ Pos = MAP_APPFONT ( 246 , 74 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Zusätze : ~Zusõtze */
+ Text = "~Zusätze" ;
+ Text [ English ] = "~More" ;
+ Text [ norwegian ] = "~Mer" ;
+ Text [ italian ] = "E~xtra" ;
+ Text [ portuguese_brazilian ] = "~Mais" ;
+ Text [ portuguese ] = "~Opções" ;
+ Text [ finnish ] = "~Enemmän" ;
+ Text [ danish ] = "Flere" ;
+ Text [ french ] = "O~ptions" ;
+ Text [ swedish ] = "~Fler" ;
+ Text [ dutch ] = "Over~ige" ;
+ Text [ spanish ] = "~Opciones" ;
+ Text [ english_us ] = "~More" ;
+ Hide = TRUE ;
+ TabStop = TRUE ;
+ MapUnit = MAP_APPFONT ;
+ Delta = 60 ;
+ 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 ] = "~Diðer seçenekl.";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_ATTRIBUTE
+ {
+ Pos = MAP_APPFONT ( 192 , 40 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Attri~bute..." ;
+ Text [ English ] = "Attri~butes..." ;
+ Text [ norwegian ] = "Attri~butter..." ;
+ Text [ italian ] = "Attri~buti..." ;
+ Text [ portuguese_brazilian ] = "Atri~butos..." ;
+ Text [ portuguese ] = "Atri~butos..." ;
+ Text [ finnish ] = "~Määritteet..." ;
+ Text [ danish ] = "Attributter..." ;
+ Text [ french ] = "Attri~buts..." ;
+ Text [ swedish ] = "Attri~but..." ;
+ Text [ dutch ] = "A~ttributen..." ;
+ Text [ spanish ] = "~Atributos..." ;
+ Text [ english_us ] = "Attri~butes..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÊôÐÔ(~B)...";
+ Text[ russian ] = "Àòðèáóòû...";
+ Text[ polish ] = "Atrybuty...";
+ Text[ japanese ] = "‘®«(~B)...";
+ Text[ chinese_traditional ] = "ÄÝ©Ê(~B)...";
+ Text[ arabic ] = "ÇáÓãÇÊ...";
+ Text[ greek ] = "Éäéüôçôåò...";
+ Text[ korean ] = "¼Ó¼º(~B)...";
+ Text[ turkish ] = "Öznitelik~ler...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_FORMAT
+ {
+ Pos = MAP_APPFONT ( 192 , 57 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Format..." ;
+ Text [ English ] = "~Format..." ;
+ Text [ norwegian ] = "~Format..." ;
+ Text [ italian ] = "F~ormato..." ;
+ Text [ portuguese_brazilian ] = "~Formatar..." ;
+ Text [ portuguese ] = "Fo~rmatar..." ;
+ Text [ finnish ] = "~Muoto..." ;
+ Text [ danish ] = "Format..." ;
+ Text [ french ] = "~Format..." ;
+ Text [ swedish ] = "~Format..." ;
+ Text [ dutch ] = "~Opmaak..." ;
+ Text [ spanish ] = "~Formato..." ;
+ Text [ english_us ] = "~Format..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "¸ñʽ(~F)...";
+ Text[ russian ] = "Ôîðìàò...";
+ Text[ polish ] = "Format...";
+ Text[ japanese ] = "‘Ž®(~F)...";
+ Text[ chinese_traditional ] = "®æ¦¡(~F)...";
+ Text[ arabic ] = "ÇáÊäÓíÞ...";
+ Text[ greek ] = "Ìïñ~öÞ...";
+ Text[ korean ] = "¼­½Ä(~F)...";
+ Text[ turkish ] = "~Format...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_NOFORMAT
+ {
+ Pos = MAP_APPFONT ( 192 , 74 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Kein For~mat" ;
+ Text [ English ] = "~No format" ;
+ Text [ norwegian ] = "~Ingen format" ;
+ Text [ italian ] = "Senza formato" ;
+ Text [ portuguese_brazilian ] = "~Nenhum formato" ;
+ Text [ portuguese ] = "~Sem formato" ;
+ Text [ finnish ] = "~Ei muotoa" ;
+ Text [ danish ] = "Intet format" ;
+ Text [ french ] = "Aucu~n attribut" ;
+ Text [ swedish ] = "Inget for~mat" ;
+ Text [ dutch ] = "~Geen opmaak" ;
+ Text [ spanish ] = "S~in formato" ;
+ Text [ english_us ] = "~No Format" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÎÞ¸ñʽ(~N)";
+ Text[ russian ] = "Ñíÿòü ôîðìàò";
+ Text[ polish ] = "Bez f~ormatu";
+ Text[ japanese ] = "‘Ž®‚È‚µ(~N)";
+ Text[ chinese_traditional ] = "µL®æ¦¡(~N)";
+ Text[ arabic ] = "ÈÏæä ÊäÓíÞ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "×ùñßò ~ìïñöÞ";
+ Text[ korean ] = "¼­½Ä ¾øÀ½(~N)";
+ Text[ turkish ] = "For~matsýz";
+ };
+ String STR_WORDCALC
+ {
+ Text = "Nur ganze Ze~llen" ;
+ Text [ ENGLISH ] = "Comple~te Cells" ;
+ Text [ norwegian ] = "Fullf~ør Celler" ;
+ Text [ italian ] = "Celle intere" ;
+ Text [ portuguese_brazilian ] = "Células Comple~tas" ;
+ Text [ portuguese ] = "Só células com~pletas" ;
+ Text [ finnish ] = "~Kokonaiset solut" ;
+ Text [ danish ] = "Kun hele rækker" ;
+ Text [ french ] = "Cellules entières" ;
+ Text [ swedish ] = "Endast hela ce~ller" ;
+ Text [ dutch ] = "Alleen hele c~ellen" ;
+ Text [ spanish ] = "Solo cel~das completas" ;
+ Text [ english_us ] = "~Entire cells" ;
+ Text[ chinese_simplified ] = "Ö»ÊÇÕû¸öµ¥Ôª¸ñÄÚÈÝ(~E)";
+ Text[ russian ] = "Òîëüêî ñòðîêó öåëèêîì";
+ Text[ polish ] = "Tylko ca³e komórki";
+ Text[ japanese ] = "¾Ù‘S‘Ì(~E)";
+ Text[ chinese_traditional ] = "¥u¬O¾ã­ÓÀx¦s®æ(~E)";
+ Text[ arabic ] = "ÎáÇíÇ ßÇãáÉ ÝÞØ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "Ìüíï ïëüêëçñá êåëéÜ";
+ Text[ korean ] = "Àüü ¼¿¸¸(~E)";
+ Text[ turkish ] = "Yalnýzca ~tam hücreler";
+ };
+ Text[ chinese_simplified ] = "ËÑÑ°ºÍ¸üÌæ";
+ Text[ russian ] = "Íàéòè è Çàìåíèòü";
+ Text[ polish ] = "ZnajdŸ & Zamieñ";
+ Text[ japanese ] = "ŒŸõ‚Æ’uŠ·";
+ Text[ chinese_traditional ] = "´M§ä©M´À¥N";
+ Text[ arabic ] = "ÈÍË æÇÓÊÈÏÇá";
+ Text[ greek ] = "ÁíáæÞôçóç & ÁíôéêáôÜóôáóç";
+ Text[ korean ] = "ã±â¿Í ¹Ù²Ù±â";
+ Text[ turkish ] = "Ara ve deðiþtir";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/srchxtra.cxx b/svx/source/dialog/srchxtra.cxx
new file mode 100644
index 0000000000..2df2584c08
--- /dev/null
+++ b/svx/source/dialog/srchxtra.cxx
@@ -0,0 +1,323 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchxtra.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFX_WHITER_HXX
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX
+#include <sfx2/objsh.hxx>
+#endif
+#pragma hdrstop
+
+#include "srchxtra.hxx"
+
+#include "dialogs.hrc"
+#include "srchxtra.hrc"
+#include "svxitems.hrc"
+
+#define ITEMID_FONTLIST SID_ATTR_CHAR_FONTLIST
+#include "flstitem.hxx"
+
+#include "chardlg.hxx"
+#include "paragrph.hxx"
+#include "dialmgr.hxx"
+#ifndef _SVX_BACKGRND_HXX //autogen
+#include <backgrnd.hxx>
+#endif
+
+// class SvxSearchFormatDialog -------------------------------------------
+
+SvxSearchFormatDialog::SvxSearchFormatDialog( Window* pParent,
+ const SfxItemSet& rSet ) :
+
+ SfxTabDialog( pParent, SVX_RES( RID_SVXDLG_SEARCHFORMAT ), &rSet )
+
+{
+ AddTabPage( RID_SVXPAGE_CHAR_STD, SvxCharStdPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_CHAR_EXT, SvxCharExtPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_STD_PARAGRAPH, SvxStdParagraphTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH,SvxParaAlignTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_EXT_PARAGRAPH, SvxExtParagraphTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_BACKGROUND, SvxBackgroundTabPage::Create, 0 );
+
+ pFontList = 0;
+ FreeResource();
+}
+
+// -----------------------------------------------------------------------
+
+SvxSearchFormatDialog::~SvxSearchFormatDialog()
+{
+ delete pFontList;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchFormatDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
+{
+ switch ( nId )
+ {
+ case RID_SVXPAGE_CHAR_STD:
+ {
+ const FontList* pAppFontList = 0;
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ if ( pSh )
+ {
+ const SvxFontListItem* pFLItem = (const SvxFontListItem*)
+ pSh->GetItem( SID_ATTR_CHAR_FONTLIST );
+ if ( pFLItem )
+ pAppFontList = pFLItem->GetFontList();
+ }
+
+ const FontList* pList = pAppFontList;
+
+ if ( !pList )
+ {
+ if ( !pFontList )
+ pFontList = new FontList( this );
+ pList = pFontList;
+ }
+
+ if ( pList )
+ ( (SvxCharStdPage&)rPage ).
+ SetFontList( SvxFontListItem( pList ) );
+ ( (SvxCharStdPage&)rPage ).EnableSearchMode();
+ break;
+ }
+
+ case RID_SVXPAGE_STD_PARAGRAPH:
+ ( (SvxStdParagraphTabPage&)rPage ).EnableAutoFirstLine();
+ break;
+
+ case RID_SVXPAGE_ALIGN_PARAGRAPH:
+ ( (SvxParaAlignTabPage&)rPage ).EnableJustifyExt();
+ break;
+ case RID_SVXPAGE_BACKGROUND :
+ ( (SvxBackgroundTabPage&)rPage ).ShowParaControl(TRUE);
+ break;
+ }
+}
+
+// class SvxSearchFormatDialog -------------------------------------------
+
+SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent,
+ SearchAttrItemList& rLst,
+ const USHORT* pWhRanges ) :
+
+ ModalDialog( pParent, SVX_RES( RID_SVXDLG_SEARCHATTR ) ),
+
+ aOKBtn ( this, ResId( BTN_ATTR_OK ) ),
+ aEscBtn ( this, ResId( BTN_ATTR_CANCEL ) ),
+ aHelpBtn( this, ResId( BTN_ATTR_HELP ) ),
+ aAttrLB ( this, ResId( LB_ATTR ) ),
+ aAttrBox( this, ResId( GB_ATTR ) ),
+
+ rList( rLst )
+
+{
+ FreeResource();
+
+ aOKBtn.SetClickHdl( LINK( this, SvxSearchAttributeDialog, OKHdl ) );
+
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+ DBG_ASSERT( pSh, "Where is the DocShell?" );
+
+
+ SfxItemPool& rPool = pSh->GetPool();
+ SfxItemSet aSet( rPool, pWhRanges );
+ SfxWhichIter aIter( aSet );
+ USHORT nWhich = aIter.FirstWhich();
+
+ while ( nWhich )
+ {
+ USHORT nSlot = rPool.GetSlotId( nWhich );
+
+ if ( nSlot >= SID_SVX_START )
+ {
+ BOOL bChecked = FALSE, bFound = FALSE;
+
+ for ( USHORT i = 0; !bFound && i < rList.Count(); ++i )
+ {
+ if ( nSlot == rList[i].nSlot )
+ {
+ bFound = TRUE;
+ if ( IsInvalidItem( rList[i].pItem ) )
+ bChecked = TRUE;
+ }
+ }
+
+ USHORT nResId = nSlot - SID_SVX_START + RID_ATTR_BEGIN;
+
+ if ( SID_ATTR_BRUSH_CHAR == nSlot )
+ // Sonderbehandlung f"ur Zeichenhintergrund
+ nResId = RID_SVXITEMS_BRUSH_CHAR;
+ else if ( SID_ATTR_CHAR_CHARSETCOLOR == nSlot )
+ // Sonderbehandlung f"ur Zeichensatzfarbe
+ nResId = RID_ATTR_CHAR_CHARSETCOLOR;
+
+ if ( ( nResId >= RID_ATTR_BEGIN && nResId < RID_ATTR_END ) ||
+ RID_SVXITEMS_BRUSH_CHAR == nResId || RID_ATTR_CHAR_CHARSETCOLOR == nResId )
+ aAttrLB.InsertEntry( SVX_RESSTR( nResId ) );
+ else
+ {
+ DBG_ERRORFILE( "no resource for slot id" );
+ }
+
+ USHORT nPos = (USHORT)aAttrLB.GetEntryCount() - 1;
+ aAttrLB.CheckEntryPos( nPos, bChecked );
+ aAttrLB.SetEntryData( nPos, (void*)(ULONG)nSlot );
+ }
+ nWhich = aIter.NextWhich();
+ }
+ aAttrLB.SetHighlightRange();
+ aAttrLB.SelectEntryPos( 0 );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxSearchAttributeDialog, OKHdl, Button *, EMPTYARG )
+{
+ SearchAttrItem aInvalidItem;
+ aInvalidItem.pItem = (SfxPoolItem*)-1;
+
+ for ( USHORT i = 0; i < aAttrLB.GetEntryCount(); ++i )
+ {
+ USHORT nSlot = (USHORT)(ULONG)aAttrLB.GetEntryData(i);
+ BOOL bChecked = aAttrLB.IsChecked(i);
+
+ USHORT j;
+ for ( j = rList.Count(); j; )
+ {
+ SearchAttrItem& rItem = rList[ --j ];
+ if( rItem.nSlot == nSlot )
+ {
+ if( bChecked )
+ {
+ if( !IsInvalidItem( rItem.pItem ) )
+ delete rItem.pItem;
+ rItem.pItem = (SfxPoolItem*)-1;
+ }
+ else if( IsInvalidItem( rItem.pItem ) )
+ rItem.pItem = 0;
+ j = 1;
+ break;
+ }
+ }
+ if( !j && bChecked )
+ {
+ aInvalidItem.nSlot = nSlot;
+ rList.Insert( aInvalidItem );
+ }
+ }
+
+ // ung"ultige Items entfernen (pItem == 0)
+ for ( USHORT n = rList.Count(); n; )
+ if ( !rList[ --n ].pItem )
+ rList.Remove( n );
+
+ EndDialog( RET_OK );
+ return 0;
+}
+
+// class SvxSearchSimilarityDialog ---------------------------------------
+
+SvxSearchSimilarityDialog::SvxSearchSimilarityDialog
+(
+ Window* pParent,
+ BOOL bRelax,
+ USHORT nOther,
+ USHORT nShorter,
+ USHORT nLonger
+) :
+ ModalDialog( pParent, SVX_RES( RID_SVXDLG_SEARCHSIMILARITY ) ),
+
+ aOtherTxt ( this, ResId( FT_OTHER ) ),
+ aOtherFld ( this, ResId( NF_OTHER ) ),
+ aShorterTxt ( this, ResId( FT_SHORTER ) ),
+ aShorterFld ( this, ResId( NF_SHORTER ) ),
+ aLongerTxt ( this, ResId( FT_LONGER ) ),
+ aLongerFld ( this, ResId( NF_LONGER ) ),
+ aRelaxBox ( this, ResId( CB_RELAX ) ),
+ aGroup ( this, ResId( GB_SIMILARITY ) ),
+
+ aOKBtn ( this, ResId( BTN_ATTR_OK ) ),
+ aEscBtn ( this, ResId( BTN_ATTR_CANCEL ) ),
+ aHelpBtn ( this, ResId( BTN_ATTR_HELP ) )
+
+{
+ FreeResource();
+
+ aOtherFld.SetValue( nOther );
+ aShorterFld.SetValue( nShorter );
+ aLongerFld.SetValue( nLonger );
+ aRelaxBox.Check( bRelax );
+}
+
+
diff --git a/svx/source/dialog/srchxtra.hrc b/svx/source/dialog/srchxtra.hrc
new file mode 100644
index 0000000000..2011a75b90
--- /dev/null
+++ b/svx/source/dialog/srchxtra.hrc
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchxtra.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_SRCHXTRA_HRC
+#define _SVX_SRCHXTRA_HRC
+
+// defines ------------------------------------------------------------------
+
+#define BTN_ATTR_OK 10
+#define BTN_ATTR_CANCEL 11
+#define BTN_ATTR_HELP 12
+#define LB_ATTR 13
+#define GB_ATTR 14
+
+#define CB_RELAX 15
+#define FT_OTHER 16
+#define NF_OTHER 17
+#define FT_SHORTER 18
+#define NF_SHORTER 19
+#define FT_LONGER 20
+#define NF_LONGER 21
+#define GB_SIMILARITY 22
+
+
+
+
+#endif
+
diff --git a/svx/source/dialog/srchxtra.src b/svx/source/dialog/srchxtra.src
new file mode 100644
index 0000000000..8230ac9ed1
--- /dev/null
+++ b/svx/source/dialog/srchxtra.src
@@ -0,0 +1,580 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchxtra.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "srchxtra.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_SEARCHFORMAT -----------------------------------------------
+TabDialog RID_SVXDLG_SEARCHFORMAT
+{
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Text = "Text-Attribute" ;
+ Text [ English ] = "Text-Attributes" ;
+ Text [ norwegian ] = "Tekst-Attributter" ;
+ Text [ italian ] = "Attributi di testo" ;
+ Text [ portuguese_brazilian ] = "Texto-Atributos" ;
+ Text [ portuguese ] = "Atributos do texto" ;
+ Text [ finnish ] = "Tekstin määritteet" ;
+ Text [ danish ] = "Tekstattributter" ;
+ Text [ french ] = "Attributs de texte" ;
+ Text [ swedish ] = "Textattribut" ;
+ Text [ dutch ] = "Tekstattributen" ;
+ Text [ spanish ] = "Atributos de texto " ;
+ Text [ english_us ] = "Text Format" ;
+ Moveable = TRUE ;
+ TabControl 1
+ {
+ OutputSize = TRUE ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_CHAR_STD ;
+ 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 ] = "Yazýtipi";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_CHAR_EXT ;
+ Text = "Schrifteffekt" ;
+ Text [ ENGLISH ] = "Character Extension" ;
+ Text [ norwegian ] = "Character Extension" ;
+ Text [ italian ] = "Effetto carattere" ;
+ Text [ portuguese_brazilian ] = "Extensão de Caracter" ;
+ Text [ portuguese ] = "Efeitos do tipo de letra" ;
+ Text [ finnish ] = "Merkin tehosteet" ;
+ Text [ danish ] = "Skrifteffekt" ;
+ Text [ french ] = "Effet de caractère" ;
+ Text [ swedish ] = "Teckensnittseffekt" ;
+ Text [ dutch ] = "Effecten" ;
+ Text [ spanish ] = "Efectos de fuente" ;
+ Text [ english_us ] = "Font Effects" ;
+ Text[ chinese_simplified ] = "×ÖÌåЧ¹û";
+ Text[ russian ] = "Ýôôåêòû øðèôòà";
+ Text[ polish ] = "Efekty czcionek";
+ Text[ japanese ] = "Ì«ÝÄŒø‰Ê";
+ Text[ chinese_traditional ] = "¦r«¬®ÄªG";
+ Text[ arabic ] = "ÊÃËíÑÇÊ ÇáÎØæØ";
+ Text[ greek ] = "ÅöÝ ÷áñáêôÞñùí";
+ Text[ korean ] = "±Û²Ã È¿°ú";
+ Text[ turkish ] = "Yazýtipi efektleri";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_STD_PARAGRAPH ;
+ /* ### ACHTUNG: Neuer Text in Resource? Einzüge und Abstände : Einz³ge und Abstõnde */
+ /* ### ACHTUNG: Neuer Text in Resource? Einzüge und Abstände : Einz³ge und Abstõnde */
+ Text = "Einzüge und Abstände" ;
+ Text [ ENGLISH ] = "Paragraph" ;
+ Text [ norwegian ] = "Avsnitt" ;
+ Text [ italian ] = "Rientri e distanze" ;
+ Text [ portuguese_brazilian ] = "Parágrafo" ;
+ Text [ portuguese ] = "Avanços e espaçamento" ;
+ Text [ finnish ] = "Kappale" ;
+ Text [ danish ] = "Indrykning og mellemrum" ;
+ Text [ french ] = "Retraits et écarts" ;
+ Text [ swedish ] = "Indrag och avstånd" ;
+ Text [ dutch ] = "Inspringingen en afstanden" ;
+ Text [ spanish ] = "Sangrías y espacios" ;
+ Text [ english_us ] = "Indents & Spacing" ;
+ Text[ chinese_simplified ] = "Ëõ½øºÍ¼ä¸ô";
+ Text[ russian ] = "Îòñóïû è èíòåðâàëû";
+ Text[ polish ] = "Wciêcia i odstêpy";
+ Text[ japanese ] = "²ÝÃÞ¯¸½‚ÆŠÔŠu";
+ Text[ chinese_traditional ] = "ÁY±Æ©M¶¡¹j";
+ Text[ arabic ] = "ÇáÅÒÇÍÉ æÇáÊÈÇÚÏ";
+ Text[ greek ] = "Åóï÷Ýò êáé áðïóôÜóåéò";
+ Text[ korean ] = "µé¿© ¾²±â¿Í °£°Ý";
+ Text[ turkish ] = "Girinti ve Aralýklar";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_ALIGN_PARAGRAPH ;
+ Text = "Ausrichtung" ;
+ Text [ ENGLISH ] = "Alignment" ;
+ Text [ portuguese ] = "Alinhamento" ;
+ Text [ english_us ] = "Alignment" ;
+ Text [ portuguese_brazilian ] = "Ausrichtung" ;
+ Text [ swedish ] = "Justering" ;
+ Text [ danish ] = "Justering" ;
+ Text [ italian ] = "Allineamento" ;
+ Text [ spanish ] = "Alineación" ;
+ Text [ french ] = "Alignement" ;
+ Text [ dutch ] = "Uitlijning" ;
+ Text[ chinese_simplified ] = "¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå";
+ Text[ polish ] = "Wyrównanie";
+ Text[ japanese ] = "”z’u";
+ Text[ chinese_traditional ] = "¹ï»ô";
+ Text[ arabic ] = "ÇáãÍÇÐÇÉ";
+ Text[ greek ] = "Óôïß÷éóç";
+ Text[ korean ] = "¸ÂÃã";
+ Text[ turkish ] = "Hizalama";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_EXT_PARAGRAPH ;
+ /* ### ACHTUNG: Neuer Text in Resource? Textfluß : Textflu˜ */
+ /* ### ACHTUNG: Neuer Text in Resource? Textfluß : Textflu˜ */
+ Text = "Textfluss" ;
+ Text [ ENGLISH ] = "Paragraph Extensions" ;
+ Text [ norwegian ] = "Utvidelse av avsnitt" ;
+ Text [ italian ] = "Flusso di testo" ;
+ Text [ portuguese_brazilian ] = "Extens es de Parágrafo" ;
+ Text [ portuguese ] = "Fluxo de texto" ;
+ Text [ finnish ] = "Tekstin rivitys" ;
+ Text [ danish ] = "Tekstretning" ;
+ Text [ french ] = "Enchaînements" ;
+ Text [ swedish ] = "Textflöde" ;
+ Text [ dutch ] = "Tekstverloop" ;
+ Text [ spanish ] = "Flujo del texto" ;
+ Text [ english_us ] = "Text Flow" ;
+ Text[ chinese_simplified ] = "»»ÐкͷÖÒ³";
+ Text[ russian ] = "Ïîëîæåíèå íà ñòðàíèöå";
+ Text[ polish ] = "Tekst";
+ Text[ japanese ] = "‘ÌÙ";
+ Text[ chinese_traditional ] = "´«¦æ©M¤À­¶";
+ Text[ arabic ] = "ÇäÓíÇÈ ÇáäÕ";
+ Text[ greek ] = "ÑïÞ êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® È帧";
+ Text[ turkish ] = "Metin akýþý";
+ 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 ] = "Arrière-plan" ;
+ Text [ swedish ] = "Bakgrund" ;
+ Text [ dutch ] = "Achtergrond" ;
+ Text [ spanish ] = "Fondo" ;
+ Text [ english_us ] = "Background" ;
+ Text[ chinese_simplified ] = "±³¾°";
+ Text[ russian ] = "Ôîí";
+ Text[ polish ] = "T³o";
+ Text[ japanese ] = "”wŒi";
+ Text[ chinese_traditional ] = "­I´º";
+ Text[ arabic ] = "ÇáÎáÝíÉ";
+ Text[ greek ] = "Öüíôï";
+ Text[ korean ] = "¹è°æ";
+ Text[ turkish ] = "Artalan";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "Îı¾ÊôÐÔ";
+ Text[ russian ] = "Àòðèáóòû òåêñòà";
+ Text[ polish ] = "Atrybuty tekstu";
+ Text[ japanese ] = "÷½Ä‚Ì‘®«";
+ Text[ chinese_traditional ] = "¤å¦rÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáäÕ";
+ Text[ greek ] = "Éäéüôçôåò êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® ¼Ó¼º";
+ Text[ turkish ] = "Metin öznitelikleri";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXDLG_SEARCHATTRIBUTE --------------------------------------------
+ModalDialog RID_SVXDLG_SEARCHATTR
+{
+ HelpId = HID_SEARCHATTR ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 176 , 128 ) ;
+ Text = "Attribute" ;
+ Text [ English ] = "Attributes" ;
+ Text [ norwegian ] = "Attributes" ;
+ Text [ italian ] = "Attributi" ;
+ Text [ portuguese_brazilian ] = "Atributos" ;
+ Text [ portuguese ] = "Atributos" ;
+ Text [ finnish ] = "Määritteet" ;
+ Text [ danish ] = "Attributter" ;
+ Text [ french ] = "Attributs" ;
+ Text [ swedish ] = "Attribut" ;
+ Text [ dutch ] = "Attributen" ;
+ Text [ spanish ] = "Atributos" ;
+ Text [ english_us ] = "Attributes" ;
+ Moveable = TRUE ;
+ Control LB_ATTR
+ {
+ HelpId = HID_SEARCHATTR_CTL_ATTR ;
+ ClipChildren = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 96 , 102 ) ;
+ };
+ GroupBox GB_ATTR
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 108 , 119 ) ;
+ Text = "Auswahl" ;
+ Text [ English ] = "Choice" ;
+ Text [ norwegian ] = "Choice" ;
+ Text [ italian ] = "Scelta" ;
+ Text [ portuguese_brazilian ] = "Escolha" ;
+ Text [ portuguese ] = "Opções" ;
+ Text [ finnish ] = "Määritykset" ;
+ Text [ danish ] = "Udvalg" ;
+ Text [ french ] = "Sélection" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ dutch ] = "Selectie" ;
+ Text [ spanish ] = "Selección" ;
+ Text [ english_us ] = "Options" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûáîð";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÇÎÊíÇÑ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçenekler";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_ATTR_OK
+ {
+ Pos = MAP_APPFONT ( 120 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_ATTR_CANCEL
+ {
+ Pos = MAP_APPFONT ( 120 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BTN_ATTR_HELP
+ {
+ Pos = MAP_APPFONT ( 120 , 40 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ 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 ] = " ";
+};
+ // RID_SVXDLG_SEARCHSIMILARITY -------------------------------------------
+ModalDialog RID_SVXDLG_SEARCHSIMILARITY
+{
+ HelpId = HID_SEARCHSIMILARITY ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 178 , 81 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Ähnlichkeitssuche : Žhnlichkeitssuche */
+ /* ### ACHTUNG: Neuer Text in Resource? Ähnlichkeitssuche : Žhnlichkeitssuche */
+ Text = "Ähnlichkeitssuche" ;
+ Text [ English ] = "Similarity search" ;
+ Text [ english_us ] = "Similarity Search" ;
+ Text [ italian ] = "Ricerca per simili" ;
+ Text [ spanish ] = "Búsqueda por semejanza" ;
+ Text [ french ] = "Recherche de similarité" ;
+ Text [ dutch ] = "Zoeken naar overeenkomsten" ;
+ Moveable = TRUE ;
+ FixedText FT_OTHER
+ {
+ Pos = MAP_APPFONT ( 12 , 15 ) ;
+ Size = MAP_APPFONT ( 70 , 10 ) ;
+ Text = "~Zeichen tauschen" ;
+ Text [ English ] = "~Exchange characters" ;
+ Text [ english_us ] = "~Exchange characters" ;
+ Text [ italian ] = "Scambia i caratteri" ;
+ Text [ spanish ] = "~Cambiar caracteres" ;
+ Text [ french ] = "Caractères ~divergents" ;
+ Text [ dutch ] = "Tekens ~vervangen" ;
+ Text [ swedish ] = "~Byt tecken" ;
+ Text [ danish ] = "Udskift tegn" ;
+ Text [ portuguese_brazilian ] = "~Zeichen tauschen" ;
+ Text [ portuguese ] = "~Substituir caracteres" ;
+ Text[ chinese_simplified ] = "¸üÌæ×Ö·û(~E)";
+ Text[ russian ] = "Ïîìåíÿòü çíàêè";
+ Text[ polish ] = "Wymieñ znaki";
+ Text[ japanese ] = "“ü‚ê‘ã‚è‹–‰Â‚Ì•¶Žš(~E)";
+ Text[ chinese_traditional ] = "´À¥N¦r¤¸(~E)";
+ Text[ arabic ] = "ÇÓÊÈÏÇá ÃÍÑÝ";
+ Text[ greek ] = "ÁëëáãÞ ÷áñáêôÞñùí";
+ Text[ korean ] = "¹®ÀÚ ±³È¯(~E)";
+ Text[ turkish ] = "Ka~rakter deðiþtir";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NF_OTHER
+ {
+ Pos = MAP_APPFONT ( 85 , 14 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ Border = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ First = 1 ;
+ Maximum = 30 ;
+ Last = 30 ;
+ Value = 1 ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_LONGER
+ {
+ Pos = MAP_APPFONT ( 12 , 30 ) ;
+ Size = MAP_APPFONT ( 70 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Z~eichen hinzufügen : Z~eichen hinzuf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Z~eichen hinzufügen : Z~eichen hinzuf³gen */
+ Text = "Z~eichen hinzufügen" ;
+ Text [ English ] = "~Add characters" ;
+ Text [ english_us ] = "~Add characters" ;
+ Text [ italian ] = "Aggiungi carattere" ;
+ Text [ spanish ] = "~Añadir caracteres" ;
+ Text [ french ] = "Caractères en ~plus" ;
+ Text [ dutch ] = "Tekens ~toevoegen" ;
+ Text [ swedish ] = "Lägg till t~ecken" ;
+ Text [ danish ] = "Tilføj tegn" ;
+ Text [ portuguese_brazilian ] = "Z~eichen hinzufügen" ;
+ Text [ portuguese ] = "Inserir ~caracteres" ;
+ Text[ chinese_simplified ] = "ÐÂÔö×Ö·û(~A)";
+ Text[ russian ] = "Äîáàâèòü çíàêè";
+ Text[ polish ] = "Dodaj znaki";
+ Text[ japanese ] = "’ljÁ‹–‰Â‚Ì•¶Žš(~A)";
+ Text[ chinese_traditional ] = "¼W¥[¦r¤¸(~A)";
+ Text[ arabic ] = "ÅÖÇÝÉ ÃÍÑÝ";
+ Text[ greek ] = "ÐñïóèÞêç ÷áñáêôÞñùí";
+ Text[ korean ] = "¹®ÀÚ Ãß°¡(~A)";
+ Text[ turkish ] = "~Karakter ekle";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NF_LONGER
+ {
+ Pos = MAP_APPFONT ( 85 , 29 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ Border = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ First = 1 ;
+ Maximum = 30 ;
+ Last = 30 ;
+ Value = 1 ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_SHORTER
+ {
+ Pos = MAP_APPFONT ( 12 , 45 ) ;
+ Size = MAP_APPFONT ( 70 , 10 ) ;
+ Text = "Ze~ichen entfernen" ;
+ Text [ English ] = "~Remove characters" ;
+ Text [ english_us ] = "~Remove characters" ;
+ Text [ italian ] = "Elimina carattere" ;
+ Text [ spanish ] = "~Eliminar caracteres" ;
+ Text [ french ] = "Caractères en ~moins" ;
+ Text [ dutch ] = "Tekens ver~wijderen" ;
+ Text [ swedish ] = "~Ta bort tecken" ;
+ Text [ danish ] = "Fjern tegn" ;
+ Text [ portuguese_brazilian ] = "Ze~ichen entfernen" ;
+ Text [ portuguese ] = "Elimina~r caracteres" ;
+ Text[ chinese_simplified ] = "ɾ³ý×Ö·û(~R)";
+ Text[ russian ] = "Óáðàòü çíàêè";
+ Text[ polish ] = "Usuñ znaki";
+ Text[ japanese ] = "휋–‰Â‚Ì•¶Žš(~R)";
+ Text[ chinese_traditional ] = "§R°£¦r¤¸(~R)";
+ Text[ arabic ] = "ÅÒÇáÉ ÃÍÑÝ";
+ Text[ greek ] = "ÄéáãñáöÞ ÷áñáêôÞñùí";
+ Text[ korean ] = "¹®ÀÚ Á¦°Å(~R)";
+ Text[ turkish ] = "Kar~akter kaldýr";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NF_SHORTER
+ {
+ Pos = MAP_APPFONT ( 85 , 44 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ Border = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ First = 1 ;
+ Maximum = 30 ;
+ Last = 30 ;
+ Value = 1 ;
+ TabStop = TRUE ;
+ };
+ CheckBox CB_RELAX
+ {
+ Pos = MAP_APPFONT ( 12 , 59 ) ;
+ Size = MAP_APPFONT ( 98 , 10 ) ;
+ Text = "~Kombinieren" ;
+ Text [ English ] = "~Combine" ;
+ Text [ english_us ] = "~Combine" ;
+ Text [ italian ] = "Combina" ;
+ Text [ spanish ] = "Co~mbinar" ;
+ Text [ french ] = "~Combiner" ;
+ Text [ dutch ] = "~Combineren" ;
+ TabStop = TRUE ;
+ Text [ swedish ] = "~Kombinera" ;
+ Text [ danish ] = "Kombiner" ;
+ Text [ portuguese_brazilian ] = "~Kombinieren" ;
+ Text [ portuguese ] = "~Combinar" ;
+ Text[ chinese_simplified ] = "ºÏ²¢(~C)";
+ Text[ russian ] = "Êîìáèíèðîâàòü";
+ Text[ polish ] = "Kombinuj";
+ Text[ japanese ] = "‘g‚݇‚킹(~C)";
+ Text[ chinese_traditional ] = "²Õ¦X(~C)";
+ Text[ arabic ] = "Öã";
+ Text[ greek ] = "Óõíäõáóìüò";
+ Text[ korean ] = "Á¶ÇÕ(~C)";
+ Text[ turkish ] = "~Birleþtir";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_SIMILARITY
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 110 , 72 ) ;
+ Text = "Einstellungen" ;
+ Text [ English ] = "Options" ;
+ Text [ english_us ] = "Settings" ;
+ Text [ italian ] = "Impostazioni" ;
+ Text [ spanish ] = "Configuración" ;
+ Text [ french ] = "Paramètres" ;
+ Text [ dutch ] = "Instellingen" ;
+ Text [ swedish ] = "Inställningar" ;
+ Text [ danish ] = "Indstillinger" ;
+ Text [ portuguese_brazilian ] = "Einstellungen" ;
+ Text [ portuguese ] = "Predefinições" ;
+ Text[ chinese_simplified ] = "É趨";
+ Text[ russian ] = "Íàñòðîéêè";
+ Text[ polish ] = "Ustawienia";
+ Text[ japanese ] = "Ý’è";
+ Text[ chinese_traditional ] = "³]©w";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ";
+ Text[ greek ] = "Ñõèìßóåéò";
+ Text[ korean ] = "¼³Á¤";
+ Text[ turkish ] = "Ayarlar";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_ATTR_OK
+ {
+ Pos = MAP_APPFONT ( 122 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_ATTR_CANCEL
+ {
+ Pos = MAP_APPFONT ( 122 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton BTN_ATTR_HELP
+ {
+ Pos = MAP_APPFONT ( 122 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Text [ swedish ] = "Likhetssökning" ;
+ Text [ danish ] = "Søg lignende" ;
+ Text [ portuguese ] = "Procura por semelhança" ;
+ Text [ portuguese_brazilian ] = "Ähnlichkeitssuche" ;
+ Text[ chinese_simplified ] = "ÀàËÆËÑÑ°";
+ Text[ russian ] = "Ïîèñê ïîõîæèõ";
+ Text[ polish ] = "Szukaj podobnych";
+ Text[ japanese ] = "—ÞŽ—½ÍßÙ‚ÌŒŸõ";
+ Text[ chinese_traditional ] = "Ãþ¦ü´M§ä";
+ Text[ arabic ] = "ÇáÈÍË Úä ßáãÇÊ ãÊÔÇÈåÉ";
+ Text[ greek ] = "ÁíáæÞôçóç ïìïéüôçôáò";
+ Text[ korean ] = "À¯»ç¼º ã±â";
+ Text[ turkish ] = "Benzerleri ara";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/stddlg.cxx b/svx/source/dialog/stddlg.cxx
new file mode 100644
index 0000000000..cee1fa87e8
--- /dev/null
+++ b/svx/source/dialog/stddlg.cxx
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * $RCSfile: stddlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#include "stddlg.hxx"
+
+// STATIC DATA -----------------------------------------------------------
+
+
+// class SvxStandardDialog -----------------------------------------------
+
+short SvxStandardDialog::Execute()
+{
+ short nRet = ModalDialog::Execute();
+
+ if ( RET_OK == nRet )
+ Apply();
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+SvxStandardDialog::SvxStandardDialog( Window *pParent, const ResId &rResId ) :
+ SfxModalDialog( pParent, rResId )
+{
+}
+
+// -----------------------------------------------------------------------
+
+__EXPORT SvxStandardDialog::~SvxStandardDialog()
+{
+}
+
+
+
diff --git a/svx/source/dialog/strarray.cxx b/svx/source/dialog/strarray.cxx
new file mode 100644
index 0000000000..bfdbd9df04
--- /dev/null
+++ b/svx/source/dialog/strarray.cxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * $RCSfile: strarray.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#pragma hdrstop
+
+// include ---------------------------------------------------------------
+
+#include "dialogs.hrc" // -> RID_SVXSTR_LANGUAGE_TABLE
+#include "dialmgr.hxx"
+#include "strarray.hxx"
+
+//------------------------------------------------------------------------
+
+SvxStringArray::SvxStringArray( USHORT nResId ) :
+
+ ResStringArray( SVX_RES( nResId ) )
+
+{
+}
+
+//------------------------------------------------------------------------
+
+SvxStringArray::SvxStringArray( const ResId& rResId ) :
+ ResStringArray( rResId )
+{
+}
+
+
+//------------------------------------------------------------------------
+
+SvxStringArray::~SvxStringArray()
+{
+}
+
+//------------------------------------------------------------------------
+
+const String& SvxStringArray::GetStringByPos( USHORT nPos ) const
+{
+ if ( RESARRAY_INDEX_NOTFOUND != nPos && nPos < Count() )
+ return ResStringArray::GetString( nPos );
+ else
+ return String();
+}
+
+//------------------------------------------------------------------------
+
+const String& SvxStringArray::GetStringByType( long nType ) const
+{
+ USHORT nPos = FindIndex( nType );
+
+ if ( RESARRAY_INDEX_NOTFOUND != nPos && nPos < Count() )
+ return ResStringArray::GetString( nPos );
+ else
+ return String();
+}
+
+//------------------------------------------------------------------------
+
+long SvxStringArray::GetValueByStr( const String& rStr ) const
+{
+ long nType = 0;
+ USHORT nCount = Count();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ if ( rStr == ResStringArray::GetString( i ) )
+ {
+ nType = GetValue( i );
+ break;
+ }
+ return nType;
+}
+
+
diff --git a/svx/source/dialog/svxbox.cxx b/svx/source/dialog/svxbox.cxx
new file mode 100644
index 0000000000..bb80eaa184
--- /dev/null
+++ b/svx/source/dialog/svxbox.cxx
@@ -0,0 +1,656 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxbox.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+#include <tools/debug.hxx>
+#endif
+#ifndef _APP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#pragma hdrstop
+
+#include "svxbox.hxx"
+
+// -----------------------------------------------------------------------
+
+SV_IMPL_PTRARR(SvxEntryLst, SvxBoxEntry*)
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ein ListboxElement
+ --------------------------------------------------------------------*/
+
+SvxBoxEntry::SvxBoxEntry() :
+ bModified(FALSE),
+ bNew(FALSE),
+ nId(LISTBOX_ENTRY_NOTFOUND)
+{
+}
+
+
+SvxBoxEntry::SvxBoxEntry(const String& aNam, USHORT nIdx) :
+ bModified(FALSE),
+ bNew(FALSE),
+ aName(aNam),
+ nId(nIdx)
+{
+}
+
+
+SvxBoxEntry::SvxBoxEntry(const SvxBoxEntry& rOld) :
+ aName(rOld.aName),
+ nId(rOld.nId),
+ bNew(rOld.bNew),
+ bModified(rOld.bModified)
+{
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+SvxListBox::SvxListBox(Window* pParent, WinBits nBits) :
+ ListBox(pParent, nBits)
+{
+ InitListBox();
+}
+
+
+SvxListBox::SvxListBox(Window* pParent, const ResId& rId):
+ ListBox(pParent, rId)
+{
+ InitListBox();
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Basisklasse Dtor
+ --------------------------------------------------------------------*/
+
+__EXPORT SvxListBox::~SvxListBox()
+{
+ aEntryLst.DeleteAndDestroy(0, aEntryLst.Count());
+ aDelEntryLst.DeleteAndDestroy(0, aDelEntryLst.Count());
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Evtl. Liste aus der Ressource beachten
+ --------------------------------------------------------------------*/
+
+void SvxListBox::InitListBox()
+{
+ // Verwaltung fuer die Stringlist aus der Resource aufbauen
+ USHORT nSize = GetEntryCount();
+ for(USHORT i=0; i < nSize; ++i)
+ { const SvxBoxEntry* pTmp = new SvxBoxEntry(ListBox::GetEntry(i), i);
+ const SvxBoxEntry* &rpTmp = pTmp;
+ aEntryLst.Insert(rpTmp, aEntryLst.Count());
+ }
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: neue Eintraege verwalten
+ --------------------------------------------------------------------*/
+
+void SvxListBox::InsertNewEntry(const SvxBoxEntry& rEntry)
+{
+ SvxBoxEntry* pNew = new SvxBoxEntry(rEntry);
+ pNew->bNew = TRUE;
+ InsertSorted(pNew);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Eintrag in die ListBox aufnehmen
+ --------------------------------------------------------------------*/
+
+void SvxListBox::InsertEntry(const SvxBoxEntry& rEntry, USHORT nPos)
+{
+ if(nPos != LISTBOX_ENTRY_NOTFOUND)
+ {
+ SvxBoxEntry* pEntry = new SvxBoxEntry(rEntry);
+ ListBox::InsertEntry(pEntry->aName, nPos);
+ //const SvxBoxEntry* &rpEntry = pEntry;
+ aEntryLst.C40_INSERT(SvxBoxEntry, pEntry, nPos);
+ }
+ else
+ InsertSorted(new SvxBoxEntry(rEntry));
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Eintrag aus der Liste loeschen
+ --------------------------------------------------------------------*/
+
+void SvxListBox::RemoveEntry(USHORT nPos)
+{
+ if(nPos >= aEntryLst.Count())
+ return;
+
+ // Altes Element austragen
+ SvxBoxEntry* pEntry = aEntryLst[nPos];
+ aEntryLst.Remove(nPos, 1);
+ ListBox::RemoveEntry(nPos);
+
+ // keine neuen Eintraege in die Liste mit aufnehmen
+ if(pEntry->bNew)
+ return;
+
+ // in DeleteListe eintragen
+ aDelEntryLst.C40_INSERT(SvxBoxEntry, pEntry, aDelEntryLst.Count());
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Eintrag ueber konkretes Obkjekt loeschen
+ --------------------------------------------------------------------*/
+
+void SvxListBox::RemoveEntry(const SvxBoxEntry& rEntry)
+{
+ USHORT nPos = ListBox::GetEntryPos(rEntry.aName);
+ RemoveEntry(nPos);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Listen loeschen und Anzeige loeschen
+ --------------------------------------------------------------------*/
+
+void SvxListBox::Clear()
+{
+ ListBox::Clear();
+ aEntryLst.DeleteAndDestroy(0, aEntryLst.Count());
+ aDelEntryLst.DeleteAndDestroy(0, aDelEntryLst.Count());
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Position by Name
+ --------------------------------------------------------------------*/
+
+USHORT SvxListBox::GetEntryPos(const SvxBoxEntry& rEntry) const
+{
+ return ListBox::GetEntryPos(rEntry.aName);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Rund um die Entries
+ --------------------------------------------------------------------*/
+
+const SvxBoxEntry& SvxListBox::GetEntry(USHORT nPos) const
+{
+ if(nPos < aEntryLst.Count())
+ return *aEntryLst[nPos];
+ else
+ return aDefault;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: aktullen Eintrag zurueckgeben
+ --------------------------------------------------------------------*/
+
+const SvxBoxEntry& SvxListBox::GetSelectEntry(USHORT nSelId) const
+{
+ String aName(ListBox::GetSelectEntry(nSelId));
+
+ if(aName.Len() > 0)
+ {
+ for (USHORT i=0; i < aEntryLst.Count(); i++)
+ {
+ if(aEntryLst[i]->aName == aName )
+ return *aEntryLst[i];
+ }
+ }
+ return aDefault;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: modifizierte Eintraege
+ --------------------------------------------------------------------*/
+
+USHORT SvxListBox::GetModifiedCount() const
+{
+ USHORT nMod = 0;
+ USHORT nSize = aEntryLst.Count();
+ for(USHORT i=0; i < nSize; ++i)
+ { if(aEntryLst[i]->bModified)
+ nMod++;
+ }
+ return nMod;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Modifizierte Eintraege behandeln
+ --------------------------------------------------------------------*/
+
+void SvxListBox::ModifyEntry(USHORT nPos, const String& rName)
+{
+ if(nPos >= aEntryLst.Count())
+ return;
+
+ SvxBoxEntry* pEntry = aEntryLst[nPos];
+ aEntryLst.Remove(nPos, 1);
+ aEntryLst[nPos]->aName = rName;
+ aEntryLst[nPos]->bModified = TRUE;
+ ListBox::RemoveEntry(nPos);
+
+ InsertSorted(pEntry);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: alle modifizierten Eintraege bahandeln
+ --------------------------------------------------------------------*/
+
+const SvxBoxEntry& SvxListBox::GetModifiedEntry(USHORT nPos) const
+{
+ USHORT nSize = aEntryLst.Count();
+ USHORT nMod = 0;
+ for(USHORT i=0; i < nSize; ++i)
+ { if(aEntryLst[i]->bModified)
+ { if(nMod == nPos)
+ return *aEntryLst[i];
+ nMod++;
+ }
+ }
+ return aDefault;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: geloeschte Eintraege
+ --------------------------------------------------------------------*/
+
+USHORT SvxListBox::GetRemovedCount() const
+{
+ return aDelEntryLst.Count();
+}
+
+
+const SvxBoxEntry& SvxListBox::GetRemovedEntry(USHORT nPos) const
+{
+ if(nPos < aDelEntryLst.Count())
+ return *aDelEntryLst[nPos];
+
+ return aDefault;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Neue Entries begutachten
+ --------------------------------------------------------------------*/
+
+USHORT SvxListBox::GetNewCount() const
+{
+ USHORT nNew = 0;
+ USHORT nSize = aEntryLst.Count();
+ for(USHORT i=0; i < nSize; ++i)
+ { if(aEntryLst[i]->bNew)
+ nNew++;
+ }
+ return nNew;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Alle neuen Eintraege ueberpruefen
+ --------------------------------------------------------------------*/
+
+const SvxBoxEntry& SvxListBox::GetNewEntry(USHORT nPos) const
+{
+ USHORT nSize = aEntryLst.Count();
+ USHORT nNew = 0;
+ for(USHORT i=0; i < nSize; ++i)
+ { if(aEntryLst[i]->bNew)
+ { if(nNew == nPos)
+ return *aEntryLst[i];
+ nNew++;
+ }
+ }
+ return aDefault;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Sortiert einfuegen
+ --------------------------------------------------------------------*/
+
+void SvxListBox::InsertSorted(SvxBoxEntry* pEntry)
+{
+ ListBox::InsertEntry(pEntry->aName);
+ USHORT nPos = ListBox::GetEntryPos(pEntry->aName);
+ aEntryLst.C40_INSERT(SvxBoxEntry, pEntry, nPos);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: ComboBoxen mit Verwaltungseinheit
+ --------------------------------------------------------------------*/
+
+SvxComboBox::SvxComboBox(Window* pParent, WinBits nBits, USHORT nStyleBits) :
+ ComboBox(pParent, nBits),
+ nStyle(nStyleBits)
+{
+ InitComboBox();
+}
+
+
+SvxComboBox::SvxComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ):
+ ComboBox(pParent, rId),
+ nStyle(nStyleBits)
+{
+ InitComboBox();
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Basisklasse Dtor
+ --------------------------------------------------------------------*/
+
+__EXPORT SvxComboBox::~SvxComboBox()
+{
+ aEntryLst.DeleteAndDestroy(0, aEntryLst.Count());
+ aDelEntryLst.DeleteAndDestroy(0, aDelEntryLst.Count());
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Evtl. Liste aus der Ressource beachten
+ --------------------------------------------------------------------*/
+
+void SvxComboBox::InitComboBox()
+{
+ // Verwaltung fuer die Stringlist aus der Resource aufbauen
+ USHORT nSize = GetEntryCount();
+ for(USHORT i=0; i < nSize; ++i)
+ { const SvxBoxEntry* pTmp = new SvxBoxEntry(ComboBox::GetEntry(i), i);
+ const SvxBoxEntry* &rpTmp = pTmp;
+ aEntryLst.Insert(rpTmp, aEntryLst.Count());
+ }
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: neue Eintraege verwalten
+ --------------------------------------------------------------------*/
+
+void SvxComboBox::InsertNewEntry(const SvxBoxEntry& rEntry)
+{
+ SvxBoxEntry* pNew = new SvxBoxEntry(rEntry);
+ pNew->bNew = TRUE;
+ InsertSorted(pNew);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Eintrag in die ComboBox aufnehmen
+ --------------------------------------------------------------------*/
+
+void SvxComboBox::InsertEntry(const SvxBoxEntry& rEntry)
+{
+ InsertSorted(new SvxBoxEntry(rEntry));
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Eintrag aus der Liste loeschen
+ --------------------------------------------------------------------*/
+
+void SvxComboBox::RemoveEntry(USHORT nPos)
+{
+ if(nPos >= aEntryLst.Count())
+ return;
+
+ // Altes Element austragen
+ SvxBoxEntry* pEntry = aEntryLst[nPos];
+ aEntryLst.Remove(nPos, 1);
+ ComboBox::RemoveEntry(nPos);
+
+ // keine neuen Eintraege in die Liste mit aufnehmen
+ if(pEntry->bNew)
+ return;
+
+ // in DeleteListe eintragen
+ aDelEntryLst.C40_INSERT(SvxBoxEntry, pEntry, aDelEntryLst.Count());
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Eintrag ueber konkretes Obkjekt loeschen
+ --------------------------------------------------------------------*/
+
+void SvxComboBox::RemoveEntry(const SvxBoxEntry& rEntry)
+{
+ USHORT nPos = ComboBox::GetEntryPos(rEntry.aName);
+ RemoveEntry(nPos);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Listen loeschen und Anzeige loeschen
+ --------------------------------------------------------------------*/
+
+void SvxComboBox::Clear()
+{
+ ComboBox::Clear();
+ aEntryLst.DeleteAndDestroy(0, aEntryLst.Count());
+ aDelEntryLst.DeleteAndDestroy(0, aDelEntryLst.Count());
+}
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Position by Name
+ --------------------------------------------------------------------*/
+
+USHORT SvxComboBox::GetEntryPos(const SvxBoxEntry& rEntry) const
+{
+ return ComboBox::GetEntryPos(rEntry.aName);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Rund um die Entries
+ --------------------------------------------------------------------*/
+
+const SvxBoxEntry& SvxComboBox::GetEntry(USHORT nPos) const
+{
+ if(nPos < aEntryLst.Count())
+ return *aEntryLst[nPos];
+ else
+ return aDefault;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: modifizierte Eintraege
+ --------------------------------------------------------------------*/
+
+USHORT SvxComboBox::GetModifiedCount() const
+{
+ USHORT nMod = 0;
+ USHORT nSize = aEntryLst.Count();
+ for(USHORT i=0; i < nSize; ++i)
+ { if(aEntryLst[i]->bModified)
+ nMod++;
+ }
+ return nMod;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Modifizierte Eintraege behandeln
+ --------------------------------------------------------------------*/
+
+void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName)
+{
+ if(nPos >= aEntryLst.Count())
+ return;
+
+ SvxBoxEntry* pEntry = aEntryLst[nPos];
+ aEntryLst.Remove(nPos, 1);
+ aEntryLst[nPos]->aName = rName;
+ aEntryLst[nPos]->bModified = TRUE;
+ ComboBox::RemoveEntry(nPos);
+
+ InsertSorted(pEntry);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: alle modifizierten Eintraege bahandeln
+ --------------------------------------------------------------------*/
+
+const SvxBoxEntry& SvxComboBox::GetModifiedEntry(USHORT nPos) const
+{
+ USHORT nSize = aEntryLst.Count();
+ USHORT nMod = 0;
+ for(USHORT i=0; i < nSize; ++i)
+ { if(aEntryLst[i]->bModified)
+ { if(nMod == nPos)
+ return *aEntryLst[i];
+ nMod++;
+ }
+ }
+ return aDefault;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: geloeschte Eintraege
+ --------------------------------------------------------------------*/
+
+USHORT SvxComboBox::GetRemovedCount() const
+{
+ return aDelEntryLst.Count();
+}
+
+
+const SvxBoxEntry& SvxComboBox::GetRemovedEntry(USHORT nPos) const
+{
+ if(nPos < aDelEntryLst.Count())
+ return *aDelEntryLst[nPos];
+
+ return aDefault;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Neue Entries begutachten
+ --------------------------------------------------------------------*/
+
+USHORT SvxComboBox::GetNewCount() const
+{
+ USHORT nNew = 0;
+ USHORT nSize = aEntryLst.Count();
+ for(USHORT i=0; i < nSize; ++i)
+ { if(aEntryLst[i]->bNew)
+ nNew++;
+ }
+ return nNew;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Alle neuen Eintraege ueberpruefen
+ --------------------------------------------------------------------*/
+
+const SvxBoxEntry& SvxComboBox::GetNewEntry(USHORT nPos) const
+{
+ USHORT nSize = aEntryLst.Count();
+ USHORT nNew = 0;
+ for(USHORT i=0; i < nSize; ++i)
+ { if(aEntryLst[i]->bNew)
+ { if(nNew == nPos)
+ return *aEntryLst[i];
+ nNew++;
+ }
+ }
+ return aDefault;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Sortiert einfuegen
+ --------------------------------------------------------------------*/
+
+void SvxComboBox::InsertSorted(SvxBoxEntry* pEntry)
+{
+ ComboBox::InsertEntry(pEntry->aName);
+ USHORT nPos = ComboBox::GetEntryPos(pEntry->aName);
+ aEntryLst.C40_INSERT(SvxBoxEntry, pEntry, nPos);
+}
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Je nach Option bestimmte Zeichen ausblenden
+ --------------------------------------------------------------------*/
+
+void __EXPORT SvxComboBox::KeyInput( const KeyEvent& rKEvt )
+{
+ sal_Unicode cChar = rKEvt.GetCharCode();
+
+ if(nStyle & SVX_CBS_FILENAME)
+ {
+#ifdef MAC
+ if( cChar == sal_Unicode( ':' ) )
+ return;
+#elif defined UNX
+ if( cChar == sal_Unicode( '/' ) || cChar == sal_Unicode( ' ' ) )
+ return;
+#else
+ if( cChar == sal_Unicode( ':' ) || cChar == sal_Unicode( '\\' ) ||
+ cChar == sal_Unicode( '.' ) || cChar == sal_Unicode( ' ' ) )
+ return;
+#endif
+ }
+ ComboBox::KeyInput(rKEvt);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Text nach Option konvertieren
+ --------------------------------------------------------------------*/
+
+String SvxComboBox::GetText() const
+{
+ String aTxt(ComboBox::GetText());
+
+ if(nStyle & SVX_CBS_LOWER)
+ return GetpApp()->GetAppInternational().Lower(aTxt);
+
+ if(nStyle & SVX_CBS_UPPER)
+ return GetpApp()->GetAppInternational().Upper(aTxt);
+
+ return aTxt;
+}
+
+
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
new file mode 100644
index 0000000000..5f6458862c
--- /dev/null
+++ b/svx/source/dialog/svxruler.cxx
@@ -0,0 +1,3342 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxruler.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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.h>
+#include <limits.h>
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SV_IMAGE_HXX
+#include <vcl/image.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXRECTITEM_HXX
+#include <svtools/rectitem.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX
+#include <sfx2/dispatch.hxx>
+#endif
+#pragma hdrstop
+
+#define ITEMID_TABSTOP 0
+#define ITEMID_LRSPACE 0
+#define ITEMID_PROTECT 0
+
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "ruler.hxx"
+#include "rlrcitem.hxx"
+#include "rulritem.hxx"
+#include "tstpitem.hxx"
+#include "lrspitem.hxx"
+#include "protitem.hxx"
+
+// STATIC DATA -----------------------------------------------------------
+
+#define CTRL_ITEM_COUNT 11
+#define GAP 10
+#define OBJECT_BORDER_COUNT 4
+#define TAB_GAP 1
+#define INDENT_GAP 2
+
+#define PIXEL_H_ADJUST( l1, l2 ) (USHORT)PixelHAdjust(l1,l2)
+
+#ifdef DEBUGLIN
+
+inline long ToMM(Window *pWin, long lVal)
+{
+ return pWin->PixelToLogic(Size(lVal, 0), MapMode(MAP_MM)).Width();
+}
+
+void Debug_Impl(Window *pWin, SvxColumnItem& rColItem)
+{
+ String aTmp("Aktuell: ");
+ aTmp += rColItem.GetActColumn();
+ aTmp += " ColLeft: ";
+ aTmp += String(ToMM(pWin, rColItem.GetLeft()));
+ aTmp += " ColRight: ";
+ aTmp += String(ToMM(pWin, rColItem.GetRight()));
+ for(USHORT i = 0; i < rColItem.Count(); ++i) {
+ aTmp += " Start: ";
+ aTmp += String(ToMM(pWin, rColItem[i].nStart));
+ aTmp += " End: ";
+ aTmp += String(ToMM(pWin, rColItem[i].nEnd));
+ }
+
+ InfoBox(0, aTmp).Execute();
+}
+
+void Debug_Impl(Window *pWin, const SvxLongLRSpaceItem& rLRSpace)
+{
+ String aTmp("Left: ");
+ aTmp += pWin->PixelToLogic(Size(rLRSpace.GetLeft(), 0), MapMode(MAP_MM)).Width();
+ aTmp += " Right: ";
+ aTmp +=pWin->PixelToLogic(Size(rLRSpace.GetRight(), 0), MapMode(MAP_MM)).Width();
+ InfoBox(0, aTmp).Execute();
+}
+
+void Debug_Impl(Window *pWin, const SvxLongULSpaceItem& rULSpace)
+{
+ String aTmp("Upper: ");
+ aTmp += pWin->PixelToLogic(Size(rULSpace.GetUpper(), 0), MapMode(MAP_MM)).Width();
+ aTmp += " Lower: ";
+ aTmp += pWin->PixelToLogic(Size(rULSpace.GetLower(), 0), MapMode(MAP_MM)).Width();
+
+ InfoBox(0, aTmp).Execute();
+}
+
+void DebugTabStops_Impl(const SvxTabStopItem& rTabs)
+{
+ String aTmp("Tabs: ");
+
+ // Def Tabs loeschen
+ for(USHORT i = 0; i < rTabs.Count(); ++i)
+ {
+ aTmp += String(rTabs[i].GetTabPos() / 56);
+ aTmp += " : ";
+ }
+ InfoBox(0, aTmp).Execute();
+}
+
+void DebugParaMargin_Impl(const SvxLRSpaceItem& rLRSpace)
+{
+ String aTmp("ParaLeft: ");
+ aTmp += rLRSpace.GetTxtLeft() / 56;
+ aTmp += " ParaRight: ";
+ aTmp += rLRSpace.GetRight() / 56;
+ aTmp += " FLI: ";
+ aTmp += rLRSpace.GetTxtFirstLineOfst() / 56;
+ InfoBox(0, aTmp).Execute();
+}
+
+#endif // DEBUGLIN
+
+struct SvxRuler_Impl {
+ USHORT *pPercBuf;
+ USHORT *pBlockBuf;
+ USHORT nPercSize;
+ long nTotalDist;
+ long lOldWinPos;
+ long lMaxLeftLogic;
+ long lMaxRightLogic;
+ long lLastLMargin;
+ SvxProtectItem aProtectItem;
+ USHORT nControlerItems;
+ USHORT nIdx;
+ USHORT nColLeftPix, nColRightPix; // Pixelwerte fuer linken / rechten Rand
+ // bei Spalten; gepuffert, um Umrechenfehler
+ // zu vermeiden.
+ // Muesste vielleicht fuer weitere Werte
+ // aufgebohrt werden
+ SvxRuler_Impl() :
+ pPercBuf(0), pBlockBuf(0), nPercSize(0), nTotalDist(0), nIdx(0),
+ nColLeftPix(0), nColRightPix(0), lOldWinPos(0)
+ {
+ }
+ ~SvxRuler_Impl()
+ {
+ nPercSize = 0; nTotalDist = 0;
+ delete pPercBuf; delete pBlockBuf; pPercBuf = 0;
+ }
+ void SetPercSize(USHORT nSize);
+
+};
+
+
+
+void SvxRuler_Impl::SetPercSize(USHORT nSize)
+{
+ if(nSize > nPercSize)
+ {
+ delete pPercBuf;
+ delete pBlockBuf;
+ pPercBuf = new USHORT[nPercSize = nSize];
+ pBlockBuf = new USHORT[nPercSize = nSize];
+ }
+ size_t nSize2 = sizeof(USHORT) * nPercSize;
+ memset(pPercBuf, 0, nSize2);
+ memset(pBlockBuf, 0, nSize2);
+}
+
+
+// Konstruktor des Lineals
+
+// SID_ATTR_ULSPACE, SID_ATTR_LRSPACE
+// erwartet als Parameter SvxULSpaceItem f"ur Seitenr"ander
+// (entweder links/rechts oder oben/unten)
+// Lineal: SetMargin1, SetMargin2
+
+// SID_RULER_PAGE_POS
+// erwartet als Parameter Anfangswert der Seite sowie Seitenbreite
+// Lineal: SetPagePos
+
+// SID_ATTR_TABSTOP
+// erwartet: SvxTabStopItem
+// Lineal: SetTabs
+
+// SID_ATTR_PARA_LRSPACE
+// linker, rechter Absatzrand bei H-Lineal
+// Lineal: SetIndents
+
+// SID_RULER_BORDERS
+// Tabellenraender, Spalten
+// erwartet: so etwas wie SwTabCols
+// Lineal: SetBorders
+
+
+SvxRuler::SvxRuler
+(
+ Window* pParent, // StarView Parent
+ Window* pWin, // Ausgabefenster; wird fuer Umrechnung logische
+ // Einheiten <-> Pixel verwendet
+ USHORT flags, // Anzeige Flags, siehe ruler.hxx
+ SfxBindings &rBindings, // zugeordnete Bindings
+ WinBits nWinStyle // StarView WinBits
+)
+: Ruler(pParent, nWinStyle),
+ pLRSpaceItem(0),
+ pMinMaxItem(0),
+ pULSpaceItem(0),
+ pTabStopItem(0),
+ pParaItem(0),
+ pPagePosItem(0),
+ pColumnItem(0),
+ pObjectItem(0),
+ pEditWin(pWin),
+ pIndents(0),
+ pBorders(new RulerBorder[1]), //wg 1 Spaltiger Tabellen
+ pObjectBorders(0),
+ nBorderCount(0),
+ nDefTabType(RULER_TAB_LEFT),
+ nTabCount(0),
+ lDefTabDist(50),
+ lTabPos(-1),
+ nTabBufSize(0),
+ pTabs(0),
+ nFlags(flags),
+ nDragOffset(0),
+ nDragType(NONE),
+ nMaxLeft(0),
+ nMaxRight(0),
+ bListening(FALSE),
+ bValid(FALSE),
+ bActive(TRUE),
+ bAppSetNullOffset(FALSE), //Wird der 0-Offset des Lineals
+ //durch die appl. gesetzt?
+ pBindings(&rBindings),
+ lLogicNullOffset(0),
+ lAppNullOffset(LONG_MAX),
+ lMinFrame(10),
+ lInitialDragPos(0),
+ pCtrlItem(new SvxRulerItem *[CTRL_ITEM_COUNT]),
+ pRuler_Imp(new SvxRuler_Impl)
+/*
+ [Beschreibung]
+
+ ctor;
+ Datenpuffer initialisieren; ControllerItems werden erzeugt
+
+*/
+{
+ memset(pCtrlItem, 0, sizeof(SvxRulerItem *) * CTRL_ITEM_COUNT);
+
+ rBindings.EnterRegistrations();
+
+ // Unterstuetzte Items anlegen
+ USHORT i = 0;
+ // Seitenraender
+
+ pCtrlItem[i++] = new SvxRulerItem(SID_RULER_LR_MIN_MAX, *this, rBindings);
+ if((nWinStyle & WB_VSCROLL) == WB_VSCROLL)
+ {
+ bHorz = FALSE;
+ pCtrlItem[i++] = new SvxRulerItem(SID_ATTR_LONG_ULSPACE, *this, rBindings);
+ }
+ else
+ {
+ bHorz = TRUE;
+ pCtrlItem[i++] = new SvxRulerItem(SID_ATTR_LONG_LRSPACE, *this, rBindings);
+ }
+
+ // Seitenposition
+ pCtrlItem[i++] = new SvxRulerItem(SID_RULER_PAGE_POS, *this, rBindings);
+
+ if((nFlags & SVXRULER_SUPPORT_TABS) == SVXRULER_SUPPORT_TABS)
+ {
+ DBG_ASSERT((nWinStyle & WB_HSCROLL) == WB_HSCROLL,
+ "kein Tabs im vertikalen Lineal");
+ pCtrlItem[i++] = new SvxRulerItem(SID_ATTR_TABSTOP, *this, rBindings);
+ SetExtraType(RULER_EXTRA_TAB, nDefTabType);
+ }
+
+ if((nFlags & SVXRULER_SUPPORT_PARAGRAPH_MARGINS) ==
+ SVXRULER_SUPPORT_PARAGRAPH_MARGINS)
+ {
+ pCtrlItem[i++] = new SvxRulerItem(SID_ATTR_PARA_LRSPACE, *this, rBindings);
+ pIndents = new RulerIndent[3+INDENT_GAP];
+ memset(pIndents, 0, sizeof(RulerIndent)*(3+INDENT_GAP));
+ pIndents[0].nStyle = RULER_STYLE_DONTKNOW;
+ pIndents[1].nStyle = RULER_STYLE_DONTKNOW;
+ pIndents[2].nStyle = RULER_INDENT_TOP;
+ pIndents[3].nStyle = RULER_INDENT_BOTTOM;
+ pIndents[4].nStyle = RULER_INDENT_BOTTOM;
+ pIndents[0].nPos = 0;
+ pIndents[1].nPos = 0;
+ pIndents[2].nPos = 0;
+ pIndents[3].nPos = 0;
+ pIndents[4].nPos = 0;
+ }
+
+ if((nFlags & SVXRULER_SUPPORT_BORDERS) == SVXRULER_SUPPORT_BORDERS)
+ pCtrlItem[i++] = new SvxRulerItem(SID_RULER_BORDERS, *this, rBindings);
+
+ if((nFlags & SVXRULER_SUPPORT_OBJECT) == SVXRULER_SUPPORT_OBJECT)
+ {
+ pCtrlItem[i++] = new SvxRulerItem(SID_RULER_OBJECT, *this, rBindings );
+ pObjectBorders = new RulerBorder[OBJECT_BORDER_COUNT];
+ size_t nSize = sizeof( RulerBorder ) * OBJECT_BORDER_COUNT;
+ memset(pObjectBorders, 0, nSize);
+ for(USHORT i = 0; i < OBJECT_BORDER_COUNT; ++i)
+ {
+ pObjectBorders[i].nPos = 0;
+ pObjectBorders[i].nWidth = 0;
+ pObjectBorders[i].nStyle = RULER_BORDER_MOVEABLE;
+ }
+ }
+
+ pCtrlItem[i++] = new SvxRulerItem( SID_RULER_PROTECT, *this, rBindings );
+ pRuler_Imp->nControlerItems=i;
+
+ if((nFlags & SVXRULER_SUPPORT_SET_NULLOFFSET) ==
+ SVXRULER_SUPPORT_SET_NULLOFFSET)
+ SetExtraType(RULER_EXTRA_NULLOFFSET, 0);
+
+ rBindings.LeaveRegistrations();
+}
+
+
+__EXPORT SvxRuler::~SvxRuler()
+/*
+ [Beschreibung]
+
+ Destruktor Lineal
+ Freigabe interner Puffer
+
+
+*/
+{
+ if(bListening)
+ EndListening(*pBindings);
+
+ pBindings->EnterRegistrations();
+ for(USHORT i = 0; i < CTRL_ITEM_COUNT && pCtrlItem[i]; ++i)
+ delete pCtrlItem[i];
+ delete pCtrlItem;
+ delete pLRSpaceItem;
+ delete pMinMaxItem;
+ delete pULSpaceItem;
+ delete pTabStopItem;
+ delete pParaItem;
+ delete pPagePosItem;
+ delete pColumnItem;
+ delete pObjectItem;
+ delete pIndents;
+ delete pBorders;
+ delete pObjectBorders;
+ delete pTabs;
+ delete pRuler_Imp;
+ pBindings->LeaveRegistrations();
+}
+
+/*
+
+ [Beschreibung]
+
+ Interne Umrechenroutinen
+
+*/
+
+long SvxRuler::ConvertHPosPixel(long nVal) const
+{
+ return pEditWin->LogicToPixel(Size(nVal, 0)).Width();
+}
+
+long SvxRuler::ConvertVPosPixel(long nVal) const
+{
+ return pEditWin->LogicToPixel(Size(0, nVal)).Height();
+}
+
+long SvxRuler::ConvertHSizePixel(long nVal) const
+{
+ return pEditWin->LogicToPixel(Size(nVal, 0)).Width();
+}
+
+long SvxRuler::ConvertVSizePixel(long nVal) const
+{
+ return pEditWin->LogicToPixel(Size(0, nVal)).Height();
+}
+
+long SvxRuler::ConvertPosPixel(long nVal) const
+{
+ return bHorz ? ConvertHPosPixel(nVal): ConvertVPosPixel(nVal);
+}
+
+long SvxRuler::ConvertSizePixel(long nVal) const
+{
+ return bHorz? ConvertHSizePixel(nVal): ConvertVSizePixel(nVal);
+}
+
+
+inline long SvxRuler::ConvertHPosLogic(long nVal) const
+{
+ return pEditWin->PixelToLogic(Size(nVal, 0)).Width();
+}
+
+inline long SvxRuler::ConvertVPosLogic(long nVal) const
+{
+ return pEditWin->PixelToLogic(Size(0, nVal)).Height();
+}
+
+inline long SvxRuler::ConvertHSizeLogic(long nVal) const
+{
+ return pEditWin->PixelToLogic(Size(nVal, 0)).Width();
+}
+
+inline long SvxRuler::ConvertVSizeLogic(long nVal) const
+{
+ return pEditWin->PixelToLogic(Size(0, nVal)).Height();
+}
+
+inline long SvxRuler::ConvertPosLogic(long nVal) const
+{
+ return bHorz? ConvertHPosLogic(nVal): ConvertVPosLogic(nVal);
+}
+
+inline long SvxRuler::ConvertSizeLogic(long nVal) const
+{
+ return bHorz? ConvertHSizeLogic(nVal): ConvertVSizeLogic(nVal);
+}
+
+long SvxRuler::PixelHAdjust(long nVal, long nValOld) const
+{
+ if(ConvertHSizePixel(nVal)!=ConvertHSizePixel(nValOld))
+ return nVal;
+ else
+ return nValOld;
+}
+
+long SvxRuler::PixelVAdjust(long nVal, long nValOld) const
+{
+ if(ConvertVSizePixel(nVal)!=ConvertVSizePixel(nValOld))
+ return nVal;
+ else
+ return nValOld;
+}
+
+long SvxRuler::PixelAdjust(long nVal, long nValOld) const
+{
+ if(ConvertSizePixel(nVal)!=ConvertSizePixel(nValOld))
+ return nVal;
+ else
+ return nValOld;
+}
+
+
+inline USHORT SvxRuler::GetObjectBordersOff(USHORT nIdx) const
+{
+ return bHorz? nIdx: nIdx + 2;
+}
+
+
+
+void SvxRuler::UpdateFrame()
+
+/*
+ [Beschreibung]
+
+ Linken, oberen Rand aktualisieren
+ Items werden in die Darstellung des Lineals uebersetzt.
+
+*/
+
+{
+ const USHORT nMarginStyle =
+ ( pRuler_Imp->aProtectItem.IsSizeProtected() ||
+ pRuler_Imp->aProtectItem.IsPosProtected() ) ?
+ 0 : RULER_MARGIN_SIZEABLE;
+
+ if(pLRSpaceItem && pPagePosItem)
+ {
+ // wenn keine Initialisierung durch App Defaultverhalten
+ const long nOld = lLogicNullOffset;
+ lLogicNullOffset = pColumnItem?
+ pColumnItem->GetLeft(): pLRSpaceItem->GetLeft();
+ if(bAppSetNullOffset)
+ lAppNullOffset += lLogicNullOffset - nOld;
+ if(!bAppSetNullOffset || lAppNullOffset == LONG_MAX)
+ {
+ Ruler::SetNullOffset(ConvertHPosPixel(lLogicNullOffset));
+ SetMargin1( 0, nMarginStyle );
+ lAppNullOffset = 0;
+ }
+ else
+ SetMargin1( ConvertHPosPixel( lAppNullOffset ), nMarginStyle );
+ long lRight = 0;
+ // bei Tabelle rechten Rand der Tabelle auswerten
+ if(pColumnItem && pColumnItem->IsTable())
+ lRight = pColumnItem->GetRight();
+ else
+ lRight = pLRSpaceItem->GetRight();
+
+ ULONG aWidth=
+ ConvertHPosPixel(pPagePosItem->GetWidth() - lRight -
+ lLogicNullOffset + lAppNullOffset);
+ SetMargin2( aWidth, nMarginStyle );
+ }
+ else
+ if(pULSpaceItem && pPagePosItem)
+ {
+ // Nullpunkt aus oberem Rand des umgebenden Rahmens
+ const long nOld = lLogicNullOffset;
+ lLogicNullOffset = pColumnItem?
+ pColumnItem->GetLeft(): pULSpaceItem->GetUpper();
+ if(bAppSetNullOffset)
+ lAppNullOffset += lLogicNullOffset - nOld;
+ if(!bAppSetNullOffset || lAppNullOffset == LONG_MAX) {
+ Ruler::SetNullOffset(ConvertVPosPixel(lLogicNullOffset));
+ lAppNullOffset = 0;
+ SetMargin1( 0, nMarginStyle );
+ }
+ else
+ SetMargin1( ConvertVPosPixel( lAppNullOffset ),nMarginStyle );
+
+ long lLower = pColumnItem ?
+ pColumnItem->GetRight() : pULSpaceItem->GetLower();
+
+ SetMargin2(ConvertVPosPixel(pPagePosItem->GetHeight() - lLower -
+ lLogicNullOffset + lAppNullOffset),
+ nMarginStyle );
+ }
+ else
+ {
+ // schaltet die Anzeige aus
+ SetMargin1();
+ SetMargin2();
+ }
+ if(pColumnItem)
+ {
+ pRuler_Imp->nColLeftPix = (USHORT) ConvertSizePixel(pColumnItem->GetLeft());
+ pRuler_Imp->nColRightPix = (USHORT) ConvertSizePixel(pColumnItem->GetRight());
+ }
+
+}
+
+void SvxRuler::MouseMove( const MouseEvent& rMEvt )
+{
+ if( bActive )
+ {
+ pBindings->Update( SID_RULER_LR_MIN_MAX );
+ pBindings->Update( SID_ATTR_LONG_ULSPACE );
+ pBindings->Update( SID_ATTR_LONG_LRSPACE );
+ pBindings->Update( SID_RULER_PAGE_POS );
+ pBindings->Update( SID_ATTR_TABSTOP );
+ pBindings->Update( SID_ATTR_PARA_LRSPACE );
+ pBindings->Update( SID_RULER_BORDERS );
+ pBindings->Update( SID_RULER_OBJECT );
+ pBindings->Update( SID_RULER_PROTECT );
+ }
+ Ruler::MouseMove( rMEvt );
+}
+
+
+void SvxRuler::UpdateFrame
+(
+ const SvxLongLRSpaceItem *pItem // neuer Wert LRSpace
+)
+
+/*
+ [Beschreibung]
+
+ Neuen Wert fuer LRSpace merken; alten gfs. loeschen
+
+*/
+
+{
+ if(bActive && bHorz)
+ {
+ delete pLRSpaceItem; pLRSpaceItem = 0;
+ if(pItem)
+ pLRSpaceItem = new SvxLongLRSpaceItem(*pItem);
+ if(!bListening)
+ {
+ bValid = FALSE;
+ StartListening(*pBindings);
+ bListening = TRUE;
+ }
+ }
+}
+
+
+void SvxRuler::UpdateFrameMinMax
+(
+ const SfxRectangleItem *pItem // Werte fuer MinMax
+)
+
+/*
+ [Beschreibung]
+
+ Neuen Wert fuer MinMax setzen; alten gfs. loeschen
+
+*/
+
+{
+ if(bActive)
+ {
+ delete pMinMaxItem; pMinMaxItem = 0;
+ if(pItem)
+ pMinMaxItem = new SfxRectangleItem(*pItem);
+ }
+}
+
+
+void SvxRuler::UpdateFrame
+(
+ const SvxLongULSpaceItem *pItem // neuer Wert
+)
+
+/*
+ [Beschreibung]
+
+ Rechten / unteren Rand aktualisieren
+
+*/
+
+
+{
+ if(bActive && !bHorz)
+ {
+ delete pULSpaceItem; pULSpaceItem = 0;
+ if(pItem)
+ pULSpaceItem = new SvxLongULSpaceItem(*pItem);
+ if(!bListening)
+ {
+ bValid = FALSE;
+ StartListening(*pBindings);
+ bListening = TRUE;
+ }
+ }
+}
+
+void SvxRuler::Update( const SvxProtectItem* pItem )
+{
+ if( pItem ) pRuler_Imp->aProtectItem = *pItem;
+}
+
+void SvxRuler::Update
+(
+ const SvxColumnItem *pItem // neuer Wert
+)
+
+/*
+ [Beschreibung]
+
+ Neuen Wert fuer Spaltendarstellung setzen
+
+*/
+
+{
+ if(bActive)
+ {
+ delete pColumnItem; pColumnItem = 0;
+ if(pItem)
+ pColumnItem = new SvxColumnItem(*pItem);
+ if(!bListening)
+ {
+ bValid = FALSE;
+ StartListening(*pBindings);
+ bListening = TRUE;
+ }
+ }
+}
+
+
+void SvxRuler::UpdateColumns()
+/*
+ [Beschreibung]
+
+ Anzeige der Spaltendarstellung aktualisieren
+
+*/
+{
+ if(pColumnItem && pColumnItem->Count() > 1)
+ {
+ if( nBorderCount < pColumnItem->Count())
+ {
+ delete pBorders;
+ nBorderCount = pColumnItem->Count();
+ pBorders = new RulerBorder[nBorderCount];
+ size_t nSize = sizeof( RulerBorder ) * nBorderCount;
+ }
+ USHORT nFlags = RULER_BORDER_VARIABLE;
+ BOOL bProtectColumns =
+ pRuler_Imp->aProtectItem.IsSizeProtected() ||
+ pRuler_Imp->aProtectItem.IsPosProtected();
+ if( !bProtectColumns )
+ nFlags |= RULER_BORDER_MOVEABLE;
+ if( pColumnItem->IsTable() )
+ nFlags |= RULER_BORDER_TABLE;
+ else
+ if ( !bProtectColumns )
+ nFlags |= RULER_BORDER_SIZEABLE;
+
+ for(USHORT i = 0; i < pColumnItem->Count()-1;++i)
+ {
+ pBorders[i].nStyle = nFlags;
+ if(!(*pColumnItem)[i].bVisible)
+ pBorders[i].nStyle |= RULER_STYLE_INVISIBLE;
+ pBorders[i].nPos =
+ ConvertPosPixel((*pColumnItem)[i].nEnd + lAppNullOffset);
+ pBorders[i].nWidth =
+ ConvertSizePixel((*pColumnItem)[i+1].nStart -
+ (*pColumnItem)[i].nEnd);
+ }
+ const size_t nSize = sizeof(RulerBorder) * (pColumnItem->Count()-1);
+ SetBorders(pColumnItem->Count()-1, pBorders);
+ }
+ else
+ {
+ SetBorders();
+ }
+}
+
+
+void SvxRuler::UpdateObject()
+
+/*
+ [Beschreibung]
+
+ Anzeige der Objektdarstellung aktualisieren
+
+*/
+
+{
+ if(pObjectItem)
+ {
+ DBG_ASSERT(pObjectBorders, "kein Buffer");
+ // !! zum Seitenrand
+ long nMargin = pLRSpaceItem? pLRSpaceItem->GetLeft(): 0;
+ pObjectBorders[0].nPos =
+ ConvertPosPixel(pObjectItem->GetStartX() -
+ nMargin + lAppNullOffset);
+ pObjectBorders[1].nPos =
+ ConvertPosPixel(pObjectItem->GetEndX() - nMargin + lAppNullOffset);
+ nMargin = pULSpaceItem? pULSpaceItem->GetUpper(): 0;
+ pObjectBorders[2].nPos =
+ ConvertPosPixel(pObjectItem->GetStartY() -
+ nMargin + lAppNullOffset);
+ pObjectBorders[3].nPos =
+ ConvertPosPixel(pObjectItem->GetEndY() - nMargin + lAppNullOffset);
+
+ const size_t nSize = sizeof(RulerBorder) * 2;
+ const USHORT nOff = GetObjectBordersOff(0);
+ SetBorders(2, pObjectBorders + nOff);
+ }
+ else
+ {
+ SetBorders();
+ }
+}
+
+
+void SvxRuler::UpdatePara()
+
+/*
+ [Beschreibung]
+
+ Anzeige der Absatzeinzuege aktualisieren:
+ Linken Rand, Erstzeileneinzug, rechten Rand Absatz aktualisieren
+ pIndents[0] = Buffer fuer alten Einzug
+ pIndents[1] = Buffer fuer alten Einzug
+ pIndents[2] = Erstzeileneinzug
+ pIndents[3] = linker Rand
+ pIndents[4] = rechter Rand
+
+*/
+
+{
+ // Abhaengigkeit zu PagePosItem
+ if(pParaItem && pPagePosItem && !pObjectItem)
+ {
+ // Erstzeileneinzug, ist negativ zum linken Absatzrand
+ pIndents[INDENT_GAP].nPos =
+ ConvertHPosPixel(
+ GetLeftFrameMargin()+
+ pParaItem->GetTxtLeft() +
+ pParaItem->GetTxtFirstLineOfst() +
+ lAppNullOffset);
+ if( pParaItem->IsAutoFirst() )
+ pIndents[INDENT_GAP].nStyle |= RULER_STYLE_INVISIBLE;
+ else
+ pIndents[INDENT_GAP].nStyle &= ~RULER_STYLE_INVISIBLE;
+
+ // linker Rand
+ pIndents[INDENT_GAP+1].nPos =
+ ConvertHPosPixel(
+ GetLeftFrameMargin() +
+ pParaItem->GetTxtLeft() + lAppNullOffset);
+ // rechter Rand, immer negativ zum rechten Rand des umgebenden Frames
+ pIndents[INDENT_GAP+2].nPos =
+ ConvertHPosPixel(
+ GetRightFrameMargin() -
+ pParaItem->GetRight() + lAppNullOffset);
+ SetIndents(3, pIndents+INDENT_GAP);
+ }
+ else
+ {
+ if(pIndents)
+ {
+ pIndents[INDENT_GAP].nPos =
+ pIndents[INDENT_GAP+1].nPos =
+ pIndents[INDENT_GAP+2].nPos = 0;
+ }
+ SetIndents(); // ausschalten
+ }
+}
+
+
+void SvxRuler::UpdatePara
+(
+ const SvxLRSpaceItem *pItem // neuer Wert Absatzeinzuege
+)
+
+/*
+ [Beschreibung]
+
+ Neuen Wert Absatzeinzuege merken
+*/
+
+{
+ if(bActive)
+ {
+ delete pParaItem; pParaItem = 0;
+ if(pItem)
+ pParaItem = new SvxLRSpaceItem(*pItem);
+ if(!bListening)
+ {
+ bValid = FALSE;
+ StartListening(*pBindings);
+ bListening = TRUE;
+ }
+ }
+}
+
+
+void SvxRuler::UpdatePage()
+
+/*
+ [Beschreibung]
+
+ Anzeige von Postion und Breite der Seite aktualisieren
+
+*/
+
+{
+ if(pPagePosItem)
+ {
+ // alle Objekte werden automatisch angepasst
+ if(bHorz)
+ SetPagePos(
+ pEditWin->LogicToPixel(pPagePosItem->GetPos()).X(),
+ pEditWin->LogicToPixel(Size(pPagePosItem->GetWidth(),0)).
+ Width());
+ else
+ SetPagePos(
+ pEditWin->LogicToPixel(pPagePosItem->GetPos()).Y(),
+ pEditWin->LogicToPixel(Size(0, pPagePosItem->GetHeight())).
+ Height());
+ if(bAppSetNullOffset)
+ SetNullOffset(ConvertSizePixel(-lAppNullOffset + lLogicNullOffset));
+ }
+ else
+ SetPagePos();
+
+ Point aPos(pEditWin->GetPosPixel()-GetPosPixel());
+ long lPos= bHorz ? aPos.X() : aPos.Y();
+
+// Leider bekommen wir den Offset des Editfensters zum Lineal nie
+// per Statusmeldung. Also setzen wir ihn selbst, wenn noetig.
+
+ if(lPos!=pRuler_Imp->lOldWinPos)
+ {
+ pRuler_Imp->lOldWinPos=lPos;
+ SetWinPos(lPos);
+ }
+}
+
+
+void SvxRuler::Update
+(
+ const SvxPagePosSizeItem *pItem // neuer Wert Seitenattribute
+)
+
+/*
+ [Beschreibung]
+
+ Neuen Wert Seitenattribute merken
+
+*/
+
+{
+ if(bActive)
+ {
+ delete pPagePosItem; pPagePosItem = 0;
+ if(pItem)
+ pPagePosItem = new SvxPagePosSizeItem(*pItem);
+ if(!bListening)
+ {
+ bValid = FALSE;
+ StartListening(*pBindings);
+ bListening = TRUE;
+ }
+ }
+}
+
+
+//
+
+void SvxRuler::SetDefTabDist
+(
+ long l // Neuer Abstand fuer DefaultTabs in App-Metrik
+)
+
+/*
+ [Beschreibung]
+
+ Neuer Abstand fuer DefaultTabs wird gesetzt
+
+*/
+
+{
+
+ lDefTabDist = l;
+ UpdateTabs();
+}
+
+
+long SvxRuler::GetDefTabDist() const
+
+/*
+ [Beschreibung]
+
+ Wert fuer DefaultTabs erfragen (wird in App.-Methik geliefert)
+
+*/
+
+{
+ return lDefTabDist;
+}
+
+
+USHORT ToSvTab_Impl(SvxTabAdjust eAdj)
+
+/*
+ [Beschreibung]
+
+ Interne Konvertierungsroutinen zwischen SV-Tab.-Enum und Svx
+
+*/
+
+{
+ switch(eAdj) {
+ case SVX_TAB_ADJUST_LEFT: return RULER_TAB_LEFT;
+ case SVX_TAB_ADJUST_RIGHT: return RULER_TAB_RIGHT;
+ case SVX_TAB_ADJUST_DECIMAL: return RULER_TAB_DECIMAL;
+ case SVX_TAB_ADJUST_CENTER: return RULER_TAB_CENTER;
+ case SVX_TAB_ADJUST_DEFAULT: return RULER_TAB_DEFAULT;
+ }
+ return 0;
+}
+
+
+SvxTabAdjust ToAttrTab_Impl(USHORT eAdj)
+{
+ switch(eAdj) {
+ case RULER_TAB_LEFT: return SVX_TAB_ADJUST_LEFT ;
+ case RULER_TAB_RIGHT: return SVX_TAB_ADJUST_RIGHT ;
+ case RULER_TAB_DECIMAL: return SVX_TAB_ADJUST_DECIMAL ;
+ case RULER_TAB_CENTER: return SVX_TAB_ADJUST_CENTER ;
+ case RULER_TAB_DEFAULT: return SVX_TAB_ADJUST_DEFAULT ;
+ }
+ return SVX_TAB_ADJUST_LEFT;
+}
+
+
+void SvxRuler::UpdateTabs()
+
+/*
+ [Beschreibung]
+
+ Anzeige der Tabulatoren
+
+*/
+
+{
+ if(IsDrag())
+ return;
+ if(pPagePosItem && pParaItem && pTabStopItem && !pObjectItem)
+ {
+ // Puffer fuer DefaultTabStop
+ // Abstand letzter Tab <-> Rechter Absatzrand / DefaultTabDist
+ const long lParaIndent =
+ GetLeftFrameMargin() + pParaItem->GetTxtLeft();
+ const long lLastTab =
+ pTabStopItem->Count()?
+ ConvertHPosPixel((*pTabStopItem)[pTabStopItem->Count()-1].GetTabPos()): 0;
+ const long lPosPixel =
+ ConvertHPosPixel(lParaIndent + lLastTab);
+ const long lRightIndent =
+ ConvertHPosPixel(GetRightFrameMargin() - pParaItem->GetRight());
+ const USHORT nDefTabBuf = lPosPixel > lRightIndent ||
+ lLastTab > lRightIndent
+ ? 0
+ : (USHORT)( (lRightIndent - lPosPixel) / ConvertHPosPixel(lDefTabDist) );
+ const long nOldTabCount = nTabCount;
+
+ if(pTabStopItem->Count() + TAB_GAP + nDefTabBuf > nTabBufSize)
+ {
+ delete pTabs;
+ // 10 (GAP) auf Vorrat
+ nTabBufSize = pTabStopItem->Count() + TAB_GAP + nDefTabBuf + GAP;
+ pTabs = new RulerTab[nTabBufSize];
+ }
+
+ nTabCount = 0;
+ USHORT j;
+ for(j = 0; j < pTabStopItem->Count(); ++j)
+ {
+ const SvxTabStop *pTab = &(*pTabStopItem)[j];
+ pTabs[nTabCount+TAB_GAP].nPos =
+ ConvertHPosPixel(
+ lParaIndent + pTab->GetTabPos() + lAppNullOffset);
+ // nicht ueber den rechten Absatzrand
+ if(pTabs[nTabCount+TAB_GAP].nPos > lRightIndent)
+ break;
+ pTabs[nTabCount+TAB_GAP].nStyle = ToSvTab_Impl(pTab->GetAdjustment());
+ ++nTabCount;
+ }
+ const long lParaIndentPix = ConvertSizePixel(lParaIndent);
+ if(!pTabStopItem->Count())
+ pTabs[0].nPos = lParaIndentPix;
+
+ // Rest mit Default-Tabs fuellen
+ for(j = 0; j < nDefTabBuf; ++j)
+ {
+ pTabs[nTabCount + TAB_GAP].nPos =
+ pTabs[nTabCount].nPos + ConvertHPosPixel(lDefTabDist);
+
+ if(j == 0 )
+ pTabs[nTabCount + TAB_GAP].nPos -=
+ ((pTabs[nTabCount + TAB_GAP].nPos - lParaIndentPix)
+ % ConvertHPosPixel(lDefTabDist));
+ if(pTabs[nTabCount+TAB_GAP].nPos >= lRightIndent)
+ break;
+ pTabs[nTabCount + TAB_GAP].nStyle = RULER_TAB_DEFAULT;
+ ++nTabCount;
+ }
+ const size_t nSize = sizeof(RulerTab) * nTabCount;
+ SetTabs(nTabCount, pTabs+TAB_GAP);
+ DBG_ASSERT(nTabCount + TAB_GAP <= nTabBufSize, "BufferSize zu klein");
+ }
+ else
+ {
+ SetTabs();
+ }
+}
+
+
+void SvxRuler::Update
+(
+ const SvxTabStopItem *pItem // Neuer Wert fuer Tabulatoren
+)
+
+/*
+ [Beschreibung]
+
+ Neuen Wert fuer Tabulatoren merken; alten gfs. loeschen
+
+*/
+
+{
+ if(bActive)
+ {
+ delete pTabStopItem; pTabStopItem = 0;
+ if(pItem)
+ pTabStopItem = new SvxTabStopItem(*pItem);
+ if(!bListening)
+ {
+ bValid = FALSE;
+ StartListening(*pBindings);
+ bListening = TRUE;
+ }
+ }
+}
+
+
+void SvxRuler::Update
+(
+ const SvxObjectItem *pItem // Neuer Wert fuer Objekte
+)
+
+/*
+ [Beschreibung]
+
+ Neuen Wert fuer Objekte merken
+
+*/
+
+{
+ if(bActive)
+ {
+ delete pObjectItem; pObjectItem = 0;
+ if(pItem)
+ pObjectItem = new SvxObjectItem(*pItem);
+ if(!bListening)
+ {
+ bValid = FALSE;
+ StartListening(*pBindings);
+ bListening = TRUE;
+ }
+ }
+}
+
+
+void SvxRuler::SetNullOffsetLogic
+(
+ long lVal // Setzen des logischen NullOffsets
+)
+{
+ lAppNullOffset = lLogicNullOffset - lVal;
+ bAppSetNullOffset = TRUE;
+ Ruler::SetNullOffset(ConvertSizePixel(lVal));
+ Update();
+}
+
+
+void SvxRuler::Update()
+
+/*
+ [Beschreibung]
+
+ Aktualisierung der Anzeige anstossen
+
+*/
+
+{
+ if(IsDrag())
+ return;
+ UpdatePage();
+ UpdateFrame();
+ if((nFlags & SVXRULER_SUPPORT_OBJECT) == SVXRULER_SUPPORT_OBJECT)
+ UpdateObject();
+ else
+ UpdateColumns();
+ if(bHorz) {
+ UpdatePara();
+ UpdateTabs();
+ }
+}
+
+
+inline long SvxRuler::GetPageWidth() const
+{
+ return bHorz ? pPagePosItem->GetWidth() : pPagePosItem->GetHeight();
+
+}
+
+
+inline long SvxRuler::GetFrameLeft() const
+
+/*
+ [Beschreibung]
+
+ Erfragen des linken Randes in Pixeln
+
+*/
+
+
+{
+ return bAppSetNullOffset?
+ GetMargin1() + ConvertSizePixel(lLogicNullOffset):
+ Ruler::GetNullOffset();
+}
+
+inline void SvxRuler::SetFrameLeft(long l)
+
+/*
+ [Beschreibung]
+
+ Setzen des linken Randes in Pixeln
+
+*/
+
+{
+ BOOL bProtectColumns =
+ pRuler_Imp->aProtectItem.IsSizeProtected() ||
+ pRuler_Imp->aProtectItem.IsPosProtected();
+ if(bAppSetNullOffset)
+ SetMargin1(l - ConvertSizePixel(lLogicNullOffset),
+ bProtectColumns ? 0 : RULER_MARGIN_SIZEABLE);
+ else
+ Ruler::SetNullOffset(l);
+}
+
+
+long SvxRuler::GetFirstLineIndent() const
+
+/*
+ [Beschreibung]
+
+ Erstzeileneinzug in Pixels erfragen
+*/
+
+{
+ return pParaItem? pIndents[INDENT_GAP].nPos: GetMargin1();
+}
+
+
+long SvxRuler::GetLeftIndent() const
+
+/*
+ [Beschreibung]
+
+ Linken Absatzrand in Pixels erfragen
+*/
+
+{
+ return pParaItem? pIndents[1+INDENT_GAP].nPos: GetMargin1();
+}
+
+
+
+long SvxRuler::GetRightIndent() const
+
+/*
+ [Beschreibung]
+
+ Rechten Absatzrand in Pixels erfragen
+*/
+
+{
+ return pParaItem? pIndents[2+INDENT_GAP].nPos: GetMargin2();
+}
+
+
+long SvxRuler::GetLogicRightIndent() const
+
+/*
+ [Beschreibung]
+
+ Rechten Absatzrand in Logic erfragen
+*/
+
+{
+ return pParaItem ? GetRightFrameMargin()-pParaItem->GetRight() : GetRightFrameMargin();
+}
+
+// linker Rand in App-Werten; ist entweder der Seitenrand (=0)
+// oder der linke Rand der Spalte, die im Spaltenattribut als
+// altuelle Spalte eingestellt ist.
+
+inline long SvxRuler::GetLeftFrameMargin() const
+{
+ return pColumnItem && pColumnItem->Count()?
+ (*pColumnItem)[pColumnItem->GetActColumn()].nStart: 0;
+}
+
+inline long SvxRuler::GetLeftMin() const
+{
+ DBG_ASSERT(pMinMaxItem, "kein MinMax-Wert gesetzt");
+ return pMinMaxItem?
+ bHorz? pMinMaxItem->GetValue().Left(): pMinMaxItem->GetValue().Top()
+ : 0;
+}
+
+inline long SvxRuler::GetRightMax() const
+{
+ DBG_ASSERT(pMinMaxItem, "kein MinMax-Wert gesetzt");
+ return pMinMaxItem?
+ bHorz? pMinMaxItem->GetValue().Right(): pMinMaxItem->GetValue().Bottom()
+ : 0;
+}
+
+
+long SvxRuler::GetRightFrameMargin() const
+
+/*
+ [Beschreibung]
+
+ Rechten umgebenden Rand erfragen (in logischen Einheiten)
+
+*/
+
+{
+ if(pColumnItem)
+ {
+ if(!IsActLastColumn( TRUE ))
+ return (*pColumnItem)[GetActRightColumn( TRUE )].nEnd;
+ }
+
+ long l = lLogicNullOffset;
+
+ // gfs. rechten Tabelleneinzug abziehen
+ if(pColumnItem && pColumnItem->IsTable())
+ l += pColumnItem->GetRight();
+ else if(pLRSpaceItem)
+ l += pLRSpaceItem->GetRight();
+
+ return pPagePosItem->GetWidth() - l;
+}
+
+#define NEG_FLAG ( (nFlags & SVXRULER_SUPPORT_NEGATIVE_MARGINS) == \
+ SVXRULER_SUPPORT_NEGATIVE_MARGINS )
+#define TAB_FLAG ( pColumnItem && pColumnItem->IsTable() )
+
+long SvxRuler::GetCorrectedDragPos()
+
+/*
+ [Beschreibung]
+
+ Korrigiert die Position innerhalb der errechneten Grenzwerte.
+ Die Grenzwerte sind in Pixel relativ zum Seitenrand.
+
+*/
+
+{
+ const long lNullPix = Ruler::GetNullOffset();
+ long lDragPos = GetDragPos() + lNullPix;
+ if(lDragPos < nMaxLeft)
+ lDragPos = nMaxLeft;
+ else if(lDragPos > nMaxRight)
+ lDragPos = nMaxRight;
+ return lDragPos - lNullPix;
+}
+
+
+
+void ModifyTabs_Impl
+(
+ USHORT nCount, // Anzahl Tabs
+ RulerTab *pTabs, // Tab-Puffer
+ long lDiff // zu addierende Differenz
+ )
+
+/*
+ [Beschreibung]
+
+ Hilfsroutine; alle Tabs um einen festen Wert verschieben
+
+*/
+{
+ if( pTabs )
+ for(USHORT i = 0; i < nCount; ++i) pTabs[i].nPos += lDiff;
+}
+
+
+
+void SvxRuler::DragMargin1()
+
+/*
+ [Beschreibung]
+
+ Draggen des linken Frame-Randes
+
+*/
+{
+ const long lDragPos = ( TAB_FLAG && NEG_FLAG ) ?
+ GetDragPos() : GetCorrectedDragPos();
+ DrawLine_Impl(lTabPos, ( TAB_FLAG && NEG_FLAG ) ? 1 : 3, bHorz);
+ const long nOld = bAppSetNullOffset? GetMargin1(): GetNullOffset();
+ if(pColumnItem&&
+ (//nDragType & DRAG_OBJECT_SIZE_LINEAR ||
+ nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL))
+ DragBorders();
+
+ BOOL bProtectColumns =
+ pRuler_Imp->aProtectItem.IsSizeProtected() ||
+ pRuler_Imp->aProtectItem.IsPosProtected();
+
+ const USHORT nMarginStyle =
+ bProtectColumns ? 0 : RULER_MARGIN_SIZEABLE;
+
+ if(!bAppSetNullOffset)
+ {
+ long lDiff = lDragPos;
+ SetNullOffset(nOld + lDiff);
+ if(!pColumnItem||!(nDragType & DRAG_OBJECT_SIZE_LINEAR))
+ {
+ SetMargin2( GetMargin2() - lDiff, nMarginStyle );
+
+ if(!pColumnItem && !pObjectItem && pParaItem)
+ {
+ // Rechten Einzug an alter Position
+ pIndents[2+INDENT_GAP].nPos -= lDiff;
+ SetIndents(3, pIndents+INDENT_GAP);
+ }
+ if(pObjectItem)
+ {
+ pObjectBorders[GetObjectBordersOff(0)].nPos -= lDiff;
+ pObjectBorders[GetObjectBordersOff(1)].nPos -= lDiff;
+ SetBorders(2, pObjectBorders + GetObjectBordersOff(0));
+ }
+ if(pColumnItem)
+ {
+ for(USHORT i = 0; i < pColumnItem->Count()-1; ++i)
+ pBorders[i].nPos -= lDiff;
+ SetBorders(pColumnItem->Count()-1, pBorders);
+ if(pColumnItem->IsFirstAct())
+ {
+ // Rechten Einzug an alter Position
+ if(pParaItem)
+ {
+ pIndents[2+INDENT_GAP].nPos -= lDiff;
+ SetIndents(3, pIndents+INDENT_GAP);
+ }
+ }
+ else
+ {
+ if(pParaItem)
+ {
+ pIndents[0+INDENT_GAP].nPos -= lDiff;
+ pIndents[1+INDENT_GAP].nPos -= lDiff;
+ pIndents[2+INDENT_GAP].nPos -= lDiff;
+ SetIndents(3, pIndents+INDENT_GAP);
+ }
+ }
+ if(pTabStopItem&& (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)
+ &&!IsActFirstColumn())
+ {
+ ModifyTabs_Impl(nTabCount+TAB_GAP, pTabs, -lDiff);
+ SetTabs(nTabCount, pTabs+TAB_GAP);
+ }
+ }
+ }
+ }
+ else
+ {
+ long lDiff = lDragPos - nOld;
+ SetMargin1(nOld + lDiff, nMarginStyle );
+
+ if(!pColumnItem||!(nDragType & (DRAG_OBJECT_SIZE_LINEAR |
+ DRAG_OBJECT_SIZE_PROPORTIONAL)))
+ {
+ if(!pColumnItem && !pObjectItem && pParaItem)
+ {
+ // Linke Einzuege an alter Position
+ pIndents[0+INDENT_GAP].nPos += lDiff;
+ pIndents[1+INDENT_GAP].nPos += lDiff;
+ SetIndents(3, pIndents+INDENT_GAP);
+ }
+
+ if(pColumnItem)
+ {
+ for(USHORT i = 0; i < pColumnItem->Count()-1; ++i)
+ pBorders[i].nPos += lDiff;
+ SetBorders(pColumnItem->Count()-1, pBorders);
+ if(pColumnItem->IsFirstAct())
+ {
+ // Linke Einzuege an alter Position
+ if(pParaItem)
+ {
+ pIndents[0+INDENT_GAP].nPos += lDiff;
+ pIndents[1+INDENT_GAP].nPos += lDiff;
+ SetIndents(3, pIndents+INDENT_GAP);
+ }
+ }
+ else
+ {
+ if(pParaItem)
+ {
+ pIndents[0+INDENT_GAP].nPos += lDiff;
+ pIndents[1+INDENT_GAP].nPos += lDiff;
+ pIndents[2+INDENT_GAP].nPos += lDiff;
+ SetIndents(3, pIndents+INDENT_GAP);
+ }
+ }
+ }
+ if(pTabStopItem)
+ {
+ ModifyTabs_Impl(nTabCount+TAB_GAP, pTabs, lDiff);
+ SetTabs(nTabCount, pTabs+TAB_GAP);
+ }
+ }
+ }
+}
+
+
+void SvxRuler::DragMargin2()
+/*
+ [Beschreibung]
+
+ Draggen des rechten Frame-Randes
+
+*/
+{
+ const long lDragPos = ( TAB_FLAG && NEG_FLAG ) ?
+ GetDragPos() : GetCorrectedDragPos();
+ DrawLine_Impl(lTabPos, ( TAB_FLAG && NEG_FLAG ) ? 1 : 3, bHorz);
+ long lDiff = lDragPos - GetMargin2();
+
+ BOOL bProtectColumns =
+ pRuler_Imp->aProtectItem.IsSizeProtected() ||
+ pRuler_Imp->aProtectItem.IsPosProtected();
+ const USHORT nMarginStyle =
+ bProtectColumns ? 0 : RULER_MARGIN_SIZEABLE;
+ SetMargin2( lDragPos, nMarginStyle );
+
+ // Rechten Einzug an alter Position
+ if((!pColumnItem || IsActLastColumn()) && pParaItem)
+ {
+ pIndents[2+INDENT_GAP].nPos += lDiff;
+ SetIndents(3, pIndents+INDENT_GAP);
+ }
+}
+
+
+void SvxRuler::DragIndents()
+/*
+ [Beschreibung]
+
+ Draggen der Absatzeinzuege
+
+*/
+{
+ const long lDragPos = NEG_FLAG ? GetDragPos() : GetCorrectedDragPos();
+ const USHORT nIdx = GetDragAryPos()+INDENT_GAP;
+ const long lDiff = pIndents[nIdx].nPos - lDragPos;
+
+ if(nIdx < 4 &&
+ (nDragType & DRAG_OBJECT_LEFT_INDENT_ONLY) !=
+ DRAG_OBJECT_LEFT_INDENT_ONLY)
+ pIndents[INDENT_GAP].nPos -= lDiff;
+
+ pIndents[nIdx].nPos = lDragPos;
+
+ // Erstzeileneinzug mit verschieben
+ if(1 == GetDragAryPos() &&
+ (nDragType & DRAG_OBJECT_LEFT_INDENT_ONLY) !=
+ DRAG_OBJECT_LEFT_INDENT_ONLY)
+ SetIndents(5, pIndents);
+ else
+ SetIndents(4, pIndents+1);
+ DrawLine_Impl(lTabPos, 1, bHorz);
+}
+
+
+void SvxRuler::DrawLine_Impl(long &lTabPos, int nNew, BOOL Hori)
+/*
+ [Beschreibung]
+
+ Ausgaberoutine fuer Hilfslinie beim Vereschieben von Tabs, Tabellen-
+ und anderen Spalten
+
+*/
+{
+ if(Hori)
+ {
+ const long nHeight = pEditWin->GetOutputSize().Height();
+ Point aZero=pEditWin->GetMapMode().GetOrigin();
+ if(lTabPos!=-1)
+ pEditWin->InvertTracking(
+ Rectangle( Point(lTabPos, -aZero.Y()),
+ Point(lTabPos, -aZero.Y()+nHeight)),
+ SHOWTRACK_SPLIT | SHOWTRACK_CLIP );
+ if( nNew & 1 )
+ {
+
+ lTabPos = ConvertHSizeLogic( ( (nNew & 2) ? GetCorrectedDragPos() :
+ GetDragPos() ) + GetNullOffset());
+ if(pPagePosItem)
+ lTabPos += pPagePosItem->GetPos().X();
+ pEditWin->InvertTracking(
+ Rectangle(Point(lTabPos, -aZero.Y()),
+ Point(lTabPos, -aZero.Y()+nHeight)),
+ SHOWTRACK_CLIP | SHOWTRACK_SPLIT );
+ }
+ }
+ else
+ {
+ const long nWidth = pEditWin->GetOutputSize().Width();
+ Point aZero=pEditWin->GetMapMode().GetOrigin();
+ if(lTabPos != -1)
+ {
+ pEditWin->InvertTracking(
+ Rectangle( Point(-aZero.X(), lTabPos),
+ Point(-aZero.X()+nWidth, lTabPos)),
+ SHOWTRACK_SPLIT | SHOWTRACK_CLIP );
+ }
+
+ if(nNew & 1)
+ {
+ lTabPos = ConvertVSizeLogic(GetCorrectedDragPos()+GetNullOffset());
+ if(pPagePosItem)
+ lTabPos += pPagePosItem->GetPos().Y();
+ pEditWin->InvertTracking(
+ Rectangle( Point(-aZero.X(), lTabPos),
+ Point(-aZero.X()+nWidth, lTabPos)),
+ SHOWTRACK_CLIP | SHOWTRACK_SPLIT );
+ }
+ }
+}
+
+
+
+
+void SvxRuler::DragTabs()
+
+/*
+ [Beschreibung]
+
+ Draggen von Tabs
+
+*/
+{
+
+ const long lDragPos = GetCorrectedDragPos();
+
+
+
+
+ USHORT nIdx = GetDragAryPos()+TAB_GAP;
+ DrawLine_Impl(lTabPos, 3, bHorz);
+
+ long nDiff = lDragPos - pTabs[nIdx].nPos;
+
+ if(nDragType & DRAG_OBJECT_SIZE_LINEAR)
+ {
+
+ for(USHORT i = nIdx; i < nTabCount; ++i)
+ {
+ pTabs[i].nPos += nDiff;
+ // auf Maximum begrenzen
+ if(pTabs[i].nPos > GetMargin2())
+ pTabs[nIdx].nStyle |= RULER_STYLE_INVISIBLE;
+ else
+ pTabs[nIdx].nStyle &= ~RULER_STYLE_INVISIBLE;
+ }
+ }
+ else if(nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)
+ {
+ pRuler_Imp->nTotalDist -= nDiff;
+ pTabs[nIdx].nPos = lDragPos;
+ for(USHORT i = nIdx+1; i < nTabCount; ++i)
+ {
+ if(pTabs[i].nStyle & RULER_TAB_DEFAULT)
+ // bei den DefaultTabs kann abgebrochen werden
+ break;
+ long nDelta = pRuler_Imp->nTotalDist * pRuler_Imp->pPercBuf[i];
+ nDelta /= 1000;
+ pTabs[i].nPos = pTabs[nIdx].nPos + nDelta;
+ if(pTabs[i].nPos+GetNullOffset() > nMaxRight)
+ pTabs[i].nStyle |= RULER_STYLE_INVISIBLE;
+ else
+ pTabs[i].nStyle &= ~RULER_STYLE_INVISIBLE;
+ }
+ }
+ else
+ pTabs[nIdx].nPos = lDragPos;
+
+ if(IsDragDelete())
+ pTabs[nIdx].nStyle |= RULER_STYLE_INVISIBLE;
+ else
+ pTabs[nIdx].nStyle &= ~RULER_STYLE_INVISIBLE;
+ SetTabs(nTabCount, pTabs+TAB_GAP);
+}
+
+
+
+void SvxRuler::SetActive(BOOL bOn)
+{
+ if(bOn)
+ {
+ Activate();
+/* pBindings->Invalidate( SID_RULER_LR_MIN_MAX, TRUE, TRUE );
+ pBindings->Update( SID_RULER_LR_MIN_MAX );
+ pBindings->Invalidate( SID_ATTR_LONG_ULSPACE, TRUE, TRUE );
+ pBindings->Update( SID_ATTR_LONG_ULSPACE );
+ pBindings->Invalidate( SID_ATTR_LONG_LRSPACE, TRUE, TRUE );
+ pBindings->Update( SID_ATTR_LONG_LRSPACE );
+ pBindings->Invalidate( SID_RULER_PAGE_POS, TRUE, TRUE );
+ pBindings->Update( SID_RULER_PAGE_POS );
+ pBindings->Invalidate( SID_ATTR_TABSTOP, TRUE, TRUE );
+ pBindings->Update( SID_ATTR_TABSTOP );
+ pBindings->Invalidate( SID_ATTR_PARA_LRSPACE, TRUE, TRUE );
+ pBindings->Update( SID_ATTR_PARA_LRSPACE );
+ pBindings->Invalidate( SID_RULER_BORDERS, TRUE, TRUE );
+ pBindings->Update( SID_RULER_BORDERS );
+ pBindings->Invalidate( SID_RULER_OBJECT, TRUE, TRUE );
+ pBindings->Update( SID_RULER_OBJECT );
+ pBindings->Invalidate( SID_RULER_PROTECT, TRUE, TRUE );
+ pBindings->Update( SID_RULER_PROTECT );*/
+ }
+ else
+ Deactivate();
+ if(bActive!=bOn)
+ {
+ pBindings->EnterRegistrations();
+ if(bOn)
+ for(USHORT i=0;i<pRuler_Imp->nControlerItems;i++)
+ pCtrlItem[i]->ReBind();
+ else
+ for(USHORT j=0;j<pRuler_Imp->nControlerItems;j++)
+ pCtrlItem[j]->UnBind();
+ pBindings->LeaveRegistrations();
+ }
+ bActive = bOn;
+}
+
+
+
+
+void SvxRuler::UpdateParaContents_Impl
+(
+ long l, // Differenz
+ UpdateType eType // Art (alle, links oder rechts)
+)
+
+/*
+ [Beschreibung]
+
+ Hilfsroutine; Mitfuehren von Tabulatoren und Absatzraendern
+
+*/
+{
+ switch(eType) {
+ case MOVE_RIGHT:
+ pIndents[2+INDENT_GAP].nPos += l;
+ break;
+ case MOVE_ALL:
+ pIndents[2+INDENT_GAP].nPos += l;
+ // no break
+ case MOVE_LEFT:
+ {
+ pIndents[INDENT_GAP].nPos += l;
+ pIndents[1+INDENT_GAP].nPos += l;
+ if ( pTabs )
+ {
+ for(USHORT i = 0; i < nTabCount+TAB_GAP;++i)
+ pTabs[i].nPos += l;
+ SetTabs(nTabCount, pTabs+TAB_GAP);
+ }
+ break;
+ }
+ }
+ SetIndents(3, pIndents+INDENT_GAP);
+}
+
+
+
+void SvxRuler::DragBorders()
+
+/*
+ [Beschreibung]
+
+ Draggen von Borders (Tabellen- und anderen Spalten)
+
+*/
+{
+ BOOL bLeftIndentsCorrected = FALSE, bRightIndentsCorrected = FALSE;
+ const long lPos = GetCorrectedDragPos();
+ int nIdx;
+
+ if(GetDragType()==RULER_TYPE_BORDER)
+ {
+ DrawLine_Impl(lTabPos, 3, bHorz);
+ nIdx = GetDragAryPos();
+ }
+ else
+ nIdx=0;
+
+ USHORT nDragSize = GetDragSize();
+ long lDiff = 0;
+
+ USHORT nRightCol = GetActRightColumn( FALSE, nIdx );
+ USHORT nLeftCol = GetActLeftColumn( FALSE, nIdx );
+
+ switch(nDragSize)
+ {
+ case RULER_DRAGSIZE_MOVE:
+ {
+ lDiff=GetDragType()==RULER_TYPE_BORDER ?
+ lPos-nDragOffset - pBorders[nIdx].nPos
+ : lPos - pRuler_Imp->lLastLMargin;
+
+// pBorders[nIdx].nPos += lDiff;
+// lDiff = pBorders[nIdx].nPos - nOld;
+ if(nDragType & DRAG_OBJECT_SIZE_LINEAR)
+ {
+ long nRight = GetMargin2()-lMinFrame; // rechter Begrenzer
+ for(int i = nBorderCount-2; i >= nIdx; --i)
+ {
+ long l = pBorders[i].nPos;
+ pBorders[i].nPos += lDiff;
+ pBorders[i].nPos = Min(pBorders[i].nPos, nRight - pBorders[i].nWidth);
+ nRight = pBorders[i].nPos - lMinFrame;
+ // RR der Spalte aktualisieren
+ if(i == GetActRightColumn())
+ {
+ UpdateParaContents_Impl(pBorders[i].nPos - l, MOVE_RIGHT);
+ bRightIndentsCorrected = TRUE;
+ }
+ // LAR, EZE der Spalte aktualisieren
+ else if(i == GetActLeftColumn())
+ {
+ UpdateParaContents_Impl(pBorders[i].nPos - l, MOVE_LEFT);
+ bLeftIndentsCorrected = TRUE;
+ }
+ }
+ }
+ else if(nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)
+ {
+ int nLimit;
+ long lLeft;
+ if(GetDragType()==RULER_TYPE_BORDER)
+ {
+ nLimit=nIdx+1;
+ lLeft=(pBorders[nIdx].nPos+=lDiff);
+ }
+ else
+ {
+ nLimit=0;
+ lLeft=pRuler_Imp->lLastLMargin+lDiff;
+ }
+
+ pRuler_Imp->nTotalDist-=lDiff;
+
+ for(int i = nBorderCount-2; i >= nLimit; --i)
+ {
+
+ long l = pBorders[i].nPos;
+ pBorders[i].nPos=lLeft+
+ (pRuler_Imp->nTotalDist*pRuler_Imp->pPercBuf[i])/1000+
+ pRuler_Imp->pBlockBuf[i];
+
+ // RR der Spalte aktualisieren
+ if(i == GetActRightColumn())
+ {
+ UpdateParaContents_Impl(pBorders[i].nPos - l, MOVE_RIGHT);
+ bRightIndentsCorrected = TRUE;
+ }
+ // LAR, EZE der Spalte aktualisieren
+ else if(i == GetActLeftColumn())
+ {
+ UpdateParaContents_Impl(pBorders[i].nPos - l, MOVE_LEFT);
+ bLeftIndentsCorrected = TRUE;
+ }
+ }
+ }
+ else
+ pBorders[nIdx].nPos+=lDiff;
+ break;
+ }
+ case RULER_DRAGSIZE_1:
+ {
+ lDiff = lPos - pBorders[nIdx].nPos;
+ pBorders[nIdx].nWidth += pBorders[nIdx].nPos - lPos;
+ pBorders[nIdx].nPos = lPos;
+ break;
+ }
+ case RULER_DRAGSIZE_2:
+ {
+ const long nOld = pBorders[nIdx].nWidth;
+ pBorders[nIdx].nWidth = lPos - pBorders[nIdx].nPos;
+ lDiff = pBorders[nIdx].nWidth - nOld;
+ break;
+ }
+ }
+ if(!bRightIndentsCorrected &&
+ GetActRightColumn() == nIdx &&
+ nDragSize != RULER_DRAGSIZE_2 && pIndents)
+ {
+ UpdateParaContents_Impl(lDiff, MOVE_RIGHT);
+ }
+ else if(!bLeftIndentsCorrected &&
+ GetActLeftColumn()==nIdx &&
+ nDragSize != RULER_DRAGSIZE_1 && pIndents)
+ {
+ UpdateParaContents_Impl(lDiff, MOVE_LEFT);
+ }
+ SetBorders(pColumnItem->Count()-1, pBorders);
+}
+
+
+void SvxRuler::DragObjectBorder()
+
+/*
+ [Beschreibung]
+
+ Draggen von Objektraendern
+
+*/
+{
+ if(RULER_DRAGSIZE_MOVE == GetDragSize())
+ {
+ const long lPos = GetCorrectedDragPos();
+ const USHORT nIdx = GetDragAryPos();
+ pObjectBorders[GetObjectBordersOff(nIdx)].nPos = lPos;
+ SetBorders(2, pObjectBorders + GetObjectBordersOff(0));
+ DrawLine_Impl(lTabPos, 3, bHorz);
+
+ }
+}
+
+
+void SvxRuler::ApplyMargins()
+/*
+ [Beschreibung]
+
+ Anwenden von Randeinstellungen; durch Draggen veraendert.
+
+*/
+{
+ const SfxPoolItem *pItem = 0;
+ USHORT nId = SID_ATTR_LONG_LRSPACE;
+ if(bHorz)
+ {
+ const long lOldNull = lLogicNullOffset;
+ if(pRuler_Imp->lMaxLeftLogic!=-1&&nMaxLeft==GetMargin1()+Ruler::GetNullOffset())
+ pLRSpaceItem->SetLeft(lLogicNullOffset=pRuler_Imp->lMaxLeftLogic);
+ else
+ pLRSpaceItem->SetLeft(PixelHAdjust(
+ lLogicNullOffset = ConvertHPosLogic(GetFrameLeft()) -
+ lAppNullOffset, pLRSpaceItem->GetLeft()));
+
+ if(bAppSetNullOffset)
+ lAppNullOffset += lLogicNullOffset - lOldNull;
+
+ if(pRuler_Imp->lMaxRightLogic!=-1
+ &&nMaxRight==GetMargin2()+Ruler::GetNullOffset())
+ pLRSpaceItem->SetRight(GetPageWidth()-pRuler_Imp->lMaxRightLogic);
+ else
+ pLRSpaceItem->SetRight(
+ PixelHAdjust(
+ Max((long)0,pPagePosItem->GetWidth() -
+ pLRSpaceItem->GetLeft() -
+ (ConvertHPosLogic(GetMargin2()) -
+ lAppNullOffset)),pLRSpaceItem->GetRight()));
+ pItem = pLRSpaceItem;
+#ifdef DEBUGLIN
+ Debug_Impl(pEditWin,*pLRSpaceItem);
+#endif // DEBUGLIN
+ }
+ else {
+ const long lOldNull = lLogicNullOffset;
+ pULSpaceItem->SetUpper(
+ PixelVAdjust(
+ lLogicNullOffset =
+ ConvertVPosLogic(GetFrameLeft()) -
+ lAppNullOffset,pULSpaceItem->GetUpper()));
+ if(bAppSetNullOffset)
+ lAppNullOffset += lLogicNullOffset - lOldNull;
+ pULSpaceItem->SetLower(
+ PixelVAdjust(
+ Max((long)0, pPagePosItem->GetHeight() -
+ pULSpaceItem->GetUpper() -
+ (ConvertVPosLogic(GetMargin2()) -
+ lAppNullOffset)),pULSpaceItem->GetLower()));
+ pItem = pULSpaceItem;
+ nId = SID_ATTR_LONG_ULSPACE;
+#ifdef DEBUGLIN
+ Debug_Impl(pEditWin,*pULSpaceItem);
+#endif // DEBUGLIN
+ }
+ pBindings->GetDispatcher()->Execute( nId, SFX_CALLMODE_RECORD, pItem, 0L );
+ if(pTabStopItem)
+ UpdateTabs();
+}
+
+
+void SvxRuler::ApplyIndents()
+/*
+ [Beschreibung]
+
+ Anwenden von Absatzeinstellungen; durch Draggen veraendert.
+
+*/
+{
+ long nNewTxtLeft;
+ if(pColumnItem&&!IsActFirstColumn( TRUE ))
+ {
+ long nLeftCol=GetActLeftColumn( TRUE );
+ nNewTxtLeft =
+ PixelHAdjust(
+ ConvertHPosLogic(
+ pIndents[1+INDENT_GAP].nPos-
+ (pBorders[nLeftCol].nPos +
+ pBorders[nLeftCol].nWidth))-
+ lAppNullOffset,pParaItem->GetTxtLeft());
+ }
+ else
+ nNewTxtLeft =
+ PixelHAdjust(
+ ConvertHPosLogic(pIndents[1+INDENT_GAP].nPos),
+ pParaItem->GetTxtLeft());
+
+ long nNewFirstLineOffset =
+ PixelHAdjust(
+ ConvertHPosLogic(pIndents[INDENT_GAP].nPos -
+ pIndents[1+INDENT_GAP].nPos) -
+ lAppNullOffset,
+ pParaItem->GetTxtFirstLineOfst());
+
+ // #62986# : Ist der neue TxtLeft kleiner als der alte FirstLineIndent,
+ // dann geht die Differenz verloren und der Absatz wird insgesamt
+ // zu weit eingerueckt, deswegen erst den FirstLineOffset setzen, dann den TxtLeft
+ pParaItem->SetTxtFirstLineOfst(nNewFirstLineOffset);
+ pParaItem->SetTxtLeft(nNewTxtLeft);
+
+ if(pColumnItem && !IsActLastColumn( TRUE ))
+ pParaItem->SetRight(
+ PixelHAdjust(
+ ConvertHPosLogic(
+ pBorders[GetActRightColumn( TRUE )].nPos -
+ pIndents[2+INDENT_GAP].nPos) -
+ lAppNullOffset,
+ pParaItem->GetRight()));
+
+ else
+ pParaItem->SetRight( PixelHAdjust(
+ ConvertHPosLogic(GetMargin2() -
+ pIndents[2+INDENT_GAP].nPos) -
+ lAppNullOffset, pParaItem->GetRight()));
+
+ pBindings->GetDispatcher()->Execute( SID_ATTR_PARA_LRSPACE, SFX_CALLMODE_RECORD, pParaItem, 0L );
+ UpdateTabs();
+}
+
+
+void SvxRuler::ApplyTabs()
+/*
+ [Beschreibung]
+
+ Anwenden von Tabulatoreinstellungen; durch Draggen veraendert.
+
+*/
+{
+ const USHORT nCoreIdx = GetDragAryPos();
+ if(IsDragDelete())
+ {
+ pTabStopItem->Remove(nCoreIdx);
+ }
+ else if(DRAG_OBJECT_SIZE_LINEAR & nDragType ||
+ DRAG_OBJECT_SIZE_PROPORTIONAL & nDragType)
+ {
+ SvxTabStopItem *pItem = new SvxTabStopItem(pTabStopItem->Which());
+ USHORT i;
+ for(i = 0; i < nCoreIdx; ++i)
+ {
+ pItem->Insert((*pTabStopItem)[i]);
+ }
+ for(; i < pTabStopItem->Count(); ++i)
+ {
+ SvxTabStop aTabStop = (*pTabStopItem)[i];
+ aTabStop.GetTabPos() = PixelHAdjust(
+ ConvertHPosLogic(pTabs[i+TAB_GAP].nPos -
+ GetLeftIndent()) -
+ lAppNullOffset,
+ aTabStop.GetTabPos());
+ pItem->Insert(aTabStop);
+ }
+ delete pTabStopItem;
+ pTabStopItem = pItem;
+ }
+ else if( pTabStopItem->Count() == 0 )
+ return;
+ else
+ {
+ SvxTabStop aTabStop = (*pTabStopItem)[nCoreIdx];
+ if(pRuler_Imp->lMaxRightLogic!=-1&&
+ pTabs[nCoreIdx+TAB_GAP].nPos+Ruler::GetNullOffset()==nMaxRight)
+ aTabStop.GetTabPos() = pRuler_Imp->lMaxRightLogic-lLogicNullOffset;
+ else
+ aTabStop.GetTabPos() = PixelHAdjust(ConvertHPosLogic(pTabs[nCoreIdx+TAB_GAP].nPos -
+ GetLeftIndent()) -
+ lAppNullOffset,
+ aTabStop.GetTabPos());
+ pTabStopItem->Remove(nCoreIdx);
+ pTabStopItem->Insert(aTabStop);
+ }
+ pBindings->GetDispatcher()->Execute( SID_ATTR_TABSTOP, SFX_CALLMODE_RECORD, pTabStopItem, 0L );
+ UpdateTabs();
+}
+
+
+void SvxRuler::ApplyBorders()
+/*
+ [Beschreibung]
+
+ Anwenden von (Tabellen-)Spalteneinstellungen; durch Draggen veraendert.
+
+*/
+{
+ if(pColumnItem->IsTable())
+ {
+ long l = GetFrameLeft();
+ if(l != pRuler_Imp->nColLeftPix)
+ pColumnItem->SetLeft( PixelHAdjust(
+ ConvertHPosLogic(l) - lAppNullOffset, pColumnItem->GetLeft()));
+ l = GetMargin2();
+ if(l != pRuler_Imp->nColRightPix)
+ pColumnItem->SetRight( PixelHAdjust( pPagePosItem->GetWidth() -
+ pColumnItem->GetLeft() - ConvertHPosLogic(l) -
+ lAppNullOffset, pColumnItem->GetRight() ) );
+ }
+ for(USHORT i = 0; i < pColumnItem->Count()-1; ++i)
+ {
+ USHORT& nEnd = (*pColumnItem)[i].nEnd;
+ nEnd = PIXEL_H_ADJUST(
+ ConvertPosLogic(pBorders[i].nPos),
+ (*pColumnItem)[i].nEnd);
+ USHORT& nStart = (*pColumnItem)[i+1].nStart;
+ nStart = PIXEL_H_ADJUST(
+ ConvertSizeLogic(pBorders[i].nPos +
+ pBorders[i].nWidth) -
+ lAppNullOffset,
+ (*pColumnItem)[i+1].nStart);
+ // Es kann sein, dass aufgrund der PIXEL_H_ADJUST rejustierung auf
+ // alte Werte die Breite < 0 wird. Das rerejustieren wir.
+ if( nEnd > nStart ) nStart = nEnd;
+ }
+#ifdef DEBUGLIN
+ Debug_Impl(pEditWin,*pColumnItem);
+#endif // DEBUGLIN
+ SfxBoolItem aFlag(SID_RULER_ACT_LINE_ONLY,
+ nDragType & DRAG_OBJECT_ACTLINE_ONLY? TRUE: FALSE);
+ pBindings->GetDispatcher()->Execute( SID_RULER_BORDERS, SFX_CALLMODE_RECORD, pColumnItem, &aFlag, 0L );
+}
+
+void SvxRuler::ApplyObject()
+/*
+ [Beschreibung]
+
+ Anwenden von Objekteinstellungen; durch Draggen veraendert.
+
+*/
+{
+ // zum Seitenrand
+ long nMargin = pLRSpaceItem? pLRSpaceItem->GetLeft(): 0;
+ pObjectItem->SetStartX(
+ PixelAdjust(
+ ConvertPosLogic(pObjectBorders[0].nPos)
+ + nMargin - lAppNullOffset,pObjectItem->GetStartX()));
+ pObjectItem->SetEndX(
+ PixelAdjust(
+ ConvertPosLogic(pObjectBorders[1].nPos)
+ + nMargin - lAppNullOffset,pObjectItem->GetEndX()));
+ nMargin = pULSpaceItem? pULSpaceItem->GetUpper(): 0;
+ pObjectItem->SetStartY(
+ PixelAdjust(
+ ConvertPosLogic(pObjectBorders[2].nPos)
+ + nMargin - lAppNullOffset,pObjectItem->GetStartY()));
+ pObjectItem->SetEndY(
+ PixelAdjust(
+ ConvertPosLogic(pObjectBorders[3].nPos)
+ + nMargin - lAppNullOffset,pObjectItem->GetEndY()));
+ pBindings->GetDispatcher()->Execute( SID_RULER_OBJECT, SFX_CALLMODE_RECORD, pObjectItem, 0L );
+}
+
+void SvxRuler::PrepareProportional_Impl(RulerType eType)
+/*
+ [Beschreibung]
+
+ Vorbereitung proportionales Draggen; es wird der proportionale
+ Anteil bezogen auf die Gesamtbreite in Promille berechnet.
+
+*/
+{
+ pRuler_Imp->nTotalDist = GetMargin2();
+ switch((int)eType)
+ {
+ case RULER_TYPE_MARGIN1:
+ case RULER_TYPE_BORDER:
+ {
+ DBG_ASSERT(pColumnItem, "kein ColumnItem");
+
+ pRuler_Imp->SetPercSize(nBorderCount);
+
+ long lPos;
+ long lWidth=0;
+ USHORT nStart;
+ USHORT nIdx=GetDragAryPos();
+ lWidth=0;
+ long lActWidth=0;
+ long lActBorderSum;
+ long lOrigLPos;
+
+ if(eType==RULER_TYPE_MARGIN1)
+ {
+ lOrigLPos=GetMargin1();
+ nStart=0;
+ lActBorderSum=0;
+ }
+ else
+ {
+ lOrigLPos=pBorders[nIdx].nPos+pBorders[nIdx].nWidth;
+ nStart=1;
+ lActBorderSum=pBorders[nIdx].nWidth;
+ }
+
+ lPos=lOrigLPos;
+ for(USHORT ii = nStart; ii < nBorderCount-1; ++ii)
+ {
+ lWidth+=pBorders[ii].nPos-lPos;
+ lPos=pBorders[ii].nPos+pBorders[ii].nWidth;
+ }
+
+ lWidth+=GetMargin2()-lPos;
+ pRuler_Imp->nTotalDist=lWidth;
+ lPos=lOrigLPos;
+
+ for(USHORT i = nStart; i < nBorderCount-1; ++i)
+ {
+ lActWidth+=pBorders[i].nPos-lPos;
+ lPos=pBorders[i].nPos+pBorders[i].nWidth;
+ pRuler_Imp->pPercBuf[i] = (USHORT)((lActWidth * 1000)
+ / pRuler_Imp->nTotalDist);
+ pRuler_Imp->pBlockBuf[i]=(USHORT)lActBorderSum;
+ lActBorderSum+=pBorders[i].nWidth;
+ }
+ break;
+ }
+ case RULER_TYPE_TAB:
+ {
+ const USHORT nIdx = GetDragAryPos()+TAB_GAP;
+ pRuler_Imp->nTotalDist -= pTabs[nIdx].nPos;
+ pRuler_Imp->SetPercSize(nTabCount);
+ for(USHORT n=0;n<=nIdx;pRuler_Imp->pPercBuf[n++]=0);
+ for(USHORT i = nIdx+1; i < nTabCount; ++i)
+ {
+ const long nDelta = pTabs[i].nPos - pTabs[nIdx].nPos;
+ pRuler_Imp->pPercBuf[i] = (USHORT)((nDelta * 1000) / pRuler_Imp->nTotalDist);
+ }
+ break;
+ }
+ }
+}
+
+
+void SvxRuler::EvalModifier()
+
+/*
+ [Beschreibung]
+
+ Modifier Draggen auswerten
+
+ Shift: Linear verschieben
+ Control: Proportional verschieben
+ Shift+Control: Tabelle: nur aktuelle Zeile
+ alt: Bemassungspfeile (n.i.) //!!
+
+*/
+
+{
+ switch(GetDragModifier()) {
+ case KEY_SHIFT:
+ nDragType = DRAG_OBJECT_SIZE_LINEAR;
+ break;
+ case KEY_MOD1: {
+ const RulerType eType = GetDragType();
+ nDragType = DRAG_OBJECT_SIZE_PROPORTIONAL;
+ if(RULER_TYPE_BORDER == eType || RULER_TYPE_TAB == eType||
+ RULER_TYPE_MARGIN1&&pColumnItem)
+ PrepareProportional_Impl(eType);
+ break;
+ }
+ case KEY_MOD1 | KEY_SHIFT:
+ if(GetDragType()!=RULER_TYPE_MARGIN1&&
+ GetDragType()!=RULER_TYPE_MARGIN2)
+ nDragType = DRAG_OBJECT_ACTLINE_ONLY;
+ break;
+ // alt: Bemassungspfeile
+ }
+}
+
+
+void __EXPORT SvxRuler::Click()
+
+/*
+ [Beschreibung]
+
+ Ueberladener Handler SV; setzt Tab per Dispatcheraufruf
+
+*/
+
+{
+ Ruler::Click();
+ if( bActive )
+ {
+ pBindings->Update( SID_RULER_LR_MIN_MAX );
+ pBindings->Update( SID_ATTR_LONG_ULSPACE );
+ pBindings->Update( SID_ATTR_LONG_LRSPACE );
+ pBindings->Update( SID_RULER_PAGE_POS );
+ pBindings->Update( SID_ATTR_TABSTOP );
+ pBindings->Update( SID_ATTR_PARA_LRSPACE );
+ pBindings->Update( SID_RULER_BORDERS );
+ pBindings->Update( SID_RULER_OBJECT );
+ pBindings->Update( SID_RULER_PROTECT );
+ }
+ if(pTabStopItem &&
+ (nFlags & SVXRULER_SUPPORT_TABS) == SVXRULER_SUPPORT_TABS) {
+ BOOL bContentProtected = pRuler_Imp->aProtectItem.IsCntntProtected();
+ if( bContentProtected ) return;
+ const long lPos = GetClickPos();
+ if(lPos > Min(GetFirstLineIndent(), GetLeftIndent()) &&
+ lPos < GetRightIndent()) {
+ SvxTabStop aTabStop(ConvertHPosLogic(lPos - GetLeftIndent()),
+ ToAttrTab_Impl(nDefTabType));
+ pTabStopItem->Insert(aTabStop);
+ UpdateTabs();
+ }
+ }
+}
+
+
+BOOL SvxRuler::CalcLimits
+(
+ long &nMax1, // zu setzenden Minimalwert
+ long &nMax2, // zu setzenden Maximalwert
+ BOOL
+) const
+/*
+ [Beschreibung]
+
+ Defaultimplementierung der virtuellen Funktion; kann die Applikation
+ ueberladen, um eine eigene Grenzwertbehandlung zu implementieren.
+ Die Werte sind auf die Seite bezogen.
+*/
+{
+ nMax1 = LONG_MIN;
+ nMax2 = LONG_MAX;
+ return FALSE;
+}
+
+
+void SvxRuler::CalcMinMax()
+
+/*
+ [Beschreibung]
+
+ Berechnet die Grenzwerte fuers Draggen; diese sind in Pixeln
+ relativ zum Seitenrand
+
+*/
+
+{
+ const long lNullPix = ConvertPosPixel(lLogicNullOffset);
+ pRuler_Imp->lMaxLeftLogic=pRuler_Imp->lMaxRightLogic=-1;
+ switch(GetDragType())
+ {
+ case RULER_TYPE_MARGIN1:
+ { // linker Rand umgebender Frame
+ // DragPos - NOf zwischen links - rechts
+ /*
+ if(!pBorders)
+ links = 0;
+ rechts = NOf + RAR - Max(EZ,LAR)) -lMinFrame
+ else
+ links = 0;
+ rechts = NOf - lMinFrame
+ if(act)
+ rechts += RAR - Max(EZ,LAR)
+ else
+ rechts += pBorders[0].nPos
+ */
+// nMaxLeft = pMinMaxItem?
+// ConvertSizePixel(GetLeftMin()): 0; //Koordinate des linken Papierrands
+ pRuler_Imp->lMaxLeftLogic = GetLeftMin();
+ nMaxLeft=ConvertSizePixel(pRuler_Imp->lMaxLeftLogic);
+
+ if(!pColumnItem || pColumnItem->Count() == 1 )
+ {
+ nMaxRight = lNullPix + GetRightIndent() -
+ Max(GetFirstLineIndent(), GetLeftIndent()) -
+ lMinFrame;
+ }
+ else
+ {
+ if(nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)
+ //nDragType & DRAG_OBJECT_SIZE_LINEAR)
+ {
+ nMaxRight=lNullPix+CalcPropMaxRight();
+ }
+ else if(nDragType & DRAG_OBJECT_SIZE_LINEAR)
+ {
+ nMaxRight = ConvertPosPixel(
+ GetPageWidth() - (
+ (pColumnItem->IsTable() && pLRSpaceItem)
+ ? pLRSpaceItem->GetRight() : 0))
+ - GetMargin2() + GetMargin1();
+ }
+ else
+ {
+ nMaxRight = lNullPix - lMinFrame;
+ if(pColumnItem->IsFirstAct())
+ nMaxRight += Min(
+ pBorders[0].nPos, GetRightIndent() -
+ Max(GetFirstLineIndent(), GetLeftIndent()));
+ else if( pColumnItem->Count() > 1 )
+ nMaxRight += pBorders[0].nPos;
+ else
+ nMaxRight +=GetRightIndent() -
+ Max(GetFirstLineIndent(), GetLeftIndent());
+ // den linken Tabellen-Rand nicht ueber den Seitenrand ziehen
+ if(pLRSpaceItem&&pColumnItem->IsTable())
+ {
+ long nTmp=ConvertSizePixel(pLRSpaceItem->GetLeft());
+ if(nTmp>nMaxLeft)
+ nMaxLeft=nTmp;
+ }
+ // nMaxLeft = pLRSpaceItem?
+ // ConvertSizePixel(pLRSpaceItem->GetLeft()): 0;
+ }
+ }
+ break;
+ }
+ case RULER_TYPE_MARGIN2:
+ { // rechter Rand umgebender Frame
+/* rechts = PageWidth
+ if(!pBorders)
+ links = m2 - RAR + Max(EZ. LAR) + lMinF + nOF
+ ??PageWidth - ( NOf + RAR - Max(EZ,LAR) - lMinFrame
+ else
+ links = NOf + pBorders[letzte].nPos +
+ pBorders[letzte].nWidth
+ links += lMinFrame
+ if(act)
+ links += M2 - RAR + Max(EZ,LAR)
+*/
+// nMaxRight = pMinMaxItem ?
+// ConvertSizePixel(
+// (bHorz ? pPagePosItem->GetWidth() : pPagePosItem->GetHeight())
+// - GetRightMax()): GetPageWidth();
+ pRuler_Imp->lMaxRightLogic =
+ pMinMaxItem ?
+ GetPageWidth() - GetRightMax() : GetPageWidth();
+ nMaxRight = ConvertSizePixel(pRuler_Imp->lMaxRightLogic);
+
+
+ if(!pColumnItem)
+ {
+ nMaxLeft = GetMargin2() - GetRightIndent() +
+ Max(GetFirstLineIndent(),GetLeftIndent()) - GetMargin1()+
+ lMinFrame + lNullPix;
+// nMaxLeft = GetMargin1() + lNullPix + lMinFrame;
+// nMaxLeft =
+// GetMargin2() - /Max(GetFirstLineIndent(), GetLeftIndent()) +
+// lMinFrame + lNullPix;
+ }
+ else
+ {
+ nMaxLeft = lMinFrame + lNullPix;
+ if(IsActLastColumn() || pColumnItem->Count() < 2 ) //Falls letzte Spalte aktiv
+ {
+ nMaxLeft = lMinFrame + lNullPix + GetMargin2() -
+ GetRightIndent() + Max(GetFirstLineIndent(),
+ GetLeftIndent());
+ }
+ if( pColumnItem->Count() >= 2 )
+ {
+ long nNewMaxLeft =
+ lMinFrame + lNullPix +
+ pBorders[pColumnItem->Count()-2].nPos +
+ pBorders[pColumnItem->Count()-2].nWidth;
+ nMaxLeft=Max(nMaxLeft,nNewMaxLeft);
+ }
+
+ // den rechten Tabellen-Rand nicht ueber den Seitenrand ziehen
+/* if(pLRSpaceItem && pColumnItem->IsTable())
+ {
+
+ long nTmp=GetMargin2();/*ConvertSizePixel(pPagePosItem->GetWidth() -
+ pLRSpaceItem->GetRight() -
+ lLogicNullOffset + lAppNullOffset);
+
+// long nTmp=ConvertSizePixel(pLRSpaceItem->GetRight());
+ if(nTmp<nMaxRight)
+ nMaxRight=nTmp;
+ } TLX: Erstmal weggelassen, da zu undurchschaubar*/
+// nMaxRight -= pLRSpaceItem && pColumnItem->IsTable()?
+// ConvertSizePixel(pLRSpaceItem->GetRight()): 0;
+ }
+ break;
+ }
+ case RULER_TYPE_BORDER:
+ { // Tabelle, Spalten (Modifier)
+ const USHORT nIdx = GetDragAryPos();
+/*
+ // linke Seite sizen
+ rechts = pBorders[nAct].nPos + pBorders[Act].nWidth + NOf
+ if(erste)
+ links = NOf
+ else
+ links = pBorders[nAct-1].nPos+ pBorders[Act-1].nWidth + NOf
+ if(act)
+ links += pBorders[nAct].nPos - RAR + Max(EZ,LAR)
+ links += lMinFrame
+
+ // Moven
+ if(erste)
+ links = NOf
+ else
+ links = pBorders[nAct-1].nPos+ pBorders[Act-1].nWidth + NOf
+ if(act)
+ links += pBorders[nAct].nPos - RAR + Max(EZ,LAR)
+ links += lMinFrame
+
+ if(letzte)
+ rechts = M2 + NOf
+ if(act = BorderCount-1) // Spalte rechts vom diesem Trenner
+ rechts -= M2 - RAR + Max(EZ,LAR)
+ else
+ rechts = NOf + pBorders[nAct+1].nPos
+ if(act+1) // Spalte rechts vom diesem Trenner
+ rechts -= pBorders[nAct].nPos - RAR + Max(EZ,LAR)
+ rechts -= lMinFrame
+
+ // rechte Seite sizen
+ links = pBorders[nAct].nPos
+ if(letzte)
+ rechts = M2 + NOf
+ if(act = BorderCount-1) // Spalte rechts vom diesem Trenner
+ rechts -= M2 - RAR + Max(EZ,LAR)
+ else
+ rechts = NOf + pBorders[nAct+1].nPos
+ if(act+1) // Spalte rechts vom diesem Trenner
+ rechts -= pBorders[nAct].nPos - RAR + Max(EZ,LAR)
+ rechts -= lMinFrame
+
+*/
+ switch(GetDragSize())
+ {
+ case RULER_DRAGSIZE_1 :
+ {
+ nMaxRight = pBorders[nIdx].nPos +
+ pBorders[nIdx].nWidth + lNullPix;
+
+ if(0 == nIdx)
+ nMaxLeft = lNullPix;
+ else
+ nMaxLeft = pBorders[nIdx-1].nPos +
+ pBorders[nIdx-1].nWidth + lNullPix;
+ if(nIdx == pColumnItem->GetActColumn()) {
+ nMaxLeft += pBorders[nIdx].nPos -
+ GetRightIndent() + Max(GetFirstLineIndent(),
+ GetLeftIndent());
+ if(0 != nIdx)
+ nMaxLeft -= pBorders[nIdx-1].nPos +
+ pBorders[nIdx-1].nWidth;
+ }
+ nMaxLeft += lMinFrame;
+ nMaxLeft += nDragOffset;
+ break;
+ }
+ case RULER_DRAGSIZE_MOVE:
+ {
+ if(pColumnItem)
+ {
+ USHORT nLeftCol=GetActLeftColumn(FALSE, nIdx);
+ USHORT nRightCol=GetActRightColumn(FALSE, nIdx);
+ USHORT nActLeftCol=GetActLeftColumn();
+ USHORT nActRightCol=GetActRightColumn();
+ if(nLeftCol==USHRT_MAX)
+ nMaxLeft=lNullPix;
+ else
+ nMaxLeft = pBorders[nLeftCol].nPos +
+ pBorders[nLeftCol].nWidth + lNullPix;
+
+ if(nActRightCol == nIdx)
+ {
+ nMaxLeft += pBorders[nIdx].nPos -
+ GetRightIndent() + Max(GetFirstLineIndent(),
+ GetLeftIndent());
+ if(nActLeftCol!=USHRT_MAX)
+ nMaxLeft -= pBorders[nActLeftCol].nPos +
+ pBorders[nActLeftCol].nWidth;
+ }
+ nMaxLeft += lMinFrame;
+ nMaxLeft += nDragOffset;
+
+ // nMaxRight
+ // linear / proprotional verschieben
+ if(DRAG_OBJECT_SIZE_PROPORTIONAL & nDragType||
+ (DRAG_OBJECT_SIZE_LINEAR & nDragType) )
+ {
+ nMaxRight=lNullPix+CalcPropMaxRight(nIdx);
+ }
+ else if(DRAG_OBJECT_SIZE_LINEAR & nDragType)
+ {
+ nMaxRight=lNullPix+GetMargin2()-GetMargin1()+
+ (nBorderCount-nIdx-1)*lMinFrame;
+ }
+ else
+ {
+ if(nRightCol==USHRT_MAX)
+ { // letzte Spalte
+ nMaxRight = GetMargin2() + lNullPix;
+ if(IsActLastColumn())
+ {
+ nMaxRight -=
+ GetMargin2() - GetRightIndent() +
+ Max(GetFirstLineIndent(),
+ GetLeftIndent());
+ nMaxRight += pBorders[nIdx].nPos +
+ pBorders[nIdx].nWidth;
+ }
+ }
+ else
+ {
+ nMaxRight = lNullPix + pBorders[nRightCol].nPos;
+ USHORT nNotHiddenRightCol =
+ GetActRightColumn(TRUE, nIdx);
+
+ if( nActLeftCol == nIdx )
+ {
+ long nBorder = nNotHiddenRightCol ==
+ USHRT_MAX ?
+ GetMargin2() :
+ pBorders[nNotHiddenRightCol].nPos;
+ nMaxRight -= nBorder - GetRightIndent() +
+ Max(GetFirstLineIndent(),
+ GetLeftIndent());
+ nMaxRight += pBorders[nIdx].nPos +
+ pBorders[nIdx].nWidth;
+ }
+ }
+ nMaxRight -= lMinFrame;
+ nMaxRight -= pBorders[nIdx].nWidth;
+ }
+ }
+ // ObjectItem
+ else
+ {
+ if(pObjectItem->HasLimits())
+ {
+ if(CalcLimits(nMaxLeft, nMaxRight, nIdx & 1? FALSE: TRUE))
+ {
+ nMaxLeft = ConvertPosPixel(nMaxLeft);
+ nMaxRight = ConvertPosPixel(nMaxRight);
+ }
+ }
+ else
+ {
+ nMaxLeft = LONG_MIN;
+ nMaxRight = LONG_MAX;
+ }
+ }
+ break;
+ }
+ case RULER_DRAGSIZE_2:
+ {
+ nMaxLeft = lNullPix + pBorders[nIdx].nPos;
+ if(nIdx == pColumnItem->Count()-2) { // letzte Spalte
+ nMaxRight = GetMargin2() + lNullPix;
+ if(pColumnItem->IsLastAct()) {
+ nMaxRight -=
+ GetMargin2() - GetRightIndent() +
+ Max(GetFirstLineIndent(),
+ GetLeftIndent());
+ nMaxRight += pBorders[nIdx].nPos +
+ pBorders[nIdx].nWidth;
+ }
+ }
+ else {
+ nMaxRight = lNullPix + pBorders[nIdx+1].nPos;
+ if(pColumnItem->GetActColumn()-1 == nIdx) {
+ nMaxRight -= pBorders[nIdx+1].nPos - GetRightIndent() +
+ Max(GetFirstLineIndent(),
+ GetLeftIndent());
+ nMaxRight += pBorders[nIdx].nPos +
+ pBorders[nIdx].nWidth;
+ }
+ }
+ nMaxRight -= lMinFrame;
+ nMaxRight -= pBorders[nIdx].nWidth;
+ break;
+ }
+ }
+ nMaxRight += nDragOffset;
+ break;
+ }
+ case RULER_TYPE_INDENT:
+ {
+ const USHORT nIdx = GetDragAryPos();
+ switch(nIdx) {
+ // EZ:
+ /*
+ links = NOf
+ if(borders && act != erste)
+ links += pBorders[-1].nPos + pBorders[-1].nStyle
+
+ rechts = NOf
+ rechts += RAR - lMinFrame
+
+ LAR:
+ links = NOf
+ if(borders && act != erste)
+ links += pBorders[-1].nPos + pBorders[-1].nStyle
+ rechts = NOf
+ rechts += RAR - lMinFrame
+
+ if(zusammen)
+ if(LAR > EZ)
+ nLeft += LAR - EZ
+ else
+ rechts -= EZ - LAR
+ */
+ case 0:
+ case 1:
+ {
+ nMaxLeft = lNullPix;
+
+ if(pColumnItem && !pColumnItem->IsFirstAct())
+ nMaxLeft += pBorders[pColumnItem->GetActColumn()-1].nPos +
+ pBorders[pColumnItem->GetActColumn()-1].nWidth;
+ nMaxRight = lNullPix + GetRightIndent() - lMinFrame;
+
+ // zusammem draggen
+ if(0 != nIdx &&
+ (nDragType & DRAG_OBJECT_LEFT_INDENT_ONLY) !=
+ DRAG_OBJECT_LEFT_INDENT_ONLY)
+ {
+ if(GetLeftIndent() > GetFirstLineIndent())
+ nMaxLeft += GetLeftIndent() - GetFirstLineIndent();
+ else
+ nMaxRight -= GetFirstLineIndent() - GetLeftIndent();
+ }
+ break;
+ }
+ /*
+ RAR:
+ links = NOf + Max(EZ, LAR)
+ rechts = NOf
+ if(borders && !letzte)
+ rechts = borders[+1].nPos
+ else
+ rechts += M2
+ */
+ case 2:
+ {
+ nMaxLeft = lNullPix +
+ Max(GetFirstLineIndent(), GetLeftIndent());
+ nMaxRight = lNullPix;
+ if(pColumnItem)
+ {
+ USHORT nRightCol=GetActRightColumn( TRUE );
+ if(!IsActLastColumn( TRUE ))
+ nMaxRight += pBorders[nRightCol].nPos;
+ else
+ nMaxRight += GetMargin2();
+ }
+ else
+ nMaxRight += GetMargin2();
+ nMaxLeft += lMinFrame;
+
+// if(pColumnItem && !pColumnItem->IsLastAct())
+// nMaxRight += pBorders[pColumnItem->GetActColumn()].nPos;
+// else
+// nMaxRight += GetMargin2();
+// nMaxLeft += lMinFrame;
+
+ }
+ break;
+ }
+ break;
+ }
+ case RULER_TYPE_TAB: // Tabs (Modifier)
+ /*
+ links = NOf + Max(LAR, EZ)
+ rechts = NOf + RAR
+ */
+ nMaxLeft = lNullPix + Min(GetFirstLineIndent(), GetLeftIndent());
+ pRuler_Imp->lMaxRightLogic=GetLogicRightIndent()+lLogicNullOffset;
+ nMaxRight = ConvertSizePixel(pRuler_Imp->lMaxRightLogic);
+// nMaxRight = lNullPix + GetRightIndent();
+ break;
+ }
+#ifdef DEBUGLIN
+ {
+ String aStr("MinLeft: ");
+ Size aSize(nMaxLeft + lNullPix, 0);
+ Size aSize2(nMaxRight + lNullPix, 0);
+ aSize = pEditWin->PixelToLogic(aSize, MapMode(MAP_MM));
+ aSize2 = pEditWin->PixelToLogic(aSize2, MapMode(MAP_MM));
+ aStr += String(aSize.Width());
+ aStr += " MaxRight: ";
+ aStr += String(aSize2.Width());
+ InfoBox(0, aStr).Execute();
+ }
+#endif
+}
+
+
+long __EXPORT SvxRuler::StartDrag()
+
+/*
+ [Beschreibung]
+
+ Beginn eines Drag-Vorgangs (SV-Handler); wertet Modifier aus
+ und berechnet Grenzwerte
+
+ [Querverweise]
+
+ <SvxRuler::EvalModifier()>
+ <SvxRuler::CalcMinMax()>
+ <SvxRuler::EndDrag()>
+
+*/
+
+{
+ BOOL bContentProtected = pRuler_Imp->aProtectItem.IsCntntProtected();
+ if(!bValid)
+ return FALSE;
+
+ pRuler_Imp->lLastLMargin=GetMargin1();
+ long bOk = 1;
+ if(GetStartDragHdl().IsSet())
+ bOk = Ruler::StartDrag();
+ if(bOk) {
+ lInitialDragPos = GetDragPos();
+ switch(GetDragType()) {
+ case RULER_TYPE_MARGIN1: // linker Rand umgebender Frame
+ case RULER_TYPE_MARGIN2: // rechter Rand umgebender Frame
+ if((bHorz && pLRSpaceItem) || (!bHorz && pULSpaceItem))
+ {
+ if(pColumnItem)
+ EvalModifier();
+ else
+ nDragType = DRAG_OBJECT;
+ }
+ else
+ bOk = FALSE;
+ break;
+ case RULER_TYPE_BORDER: // Tabelle, Spalten (Modifier)
+ if(pColumnItem)
+ {
+ nDragOffset = pColumnItem->IsTable()? 0 :
+ GetDragPos() - pBorders[GetDragAryPos()].nPos;
+ EvalModifier();
+
+ }
+ else
+ nDragOffset = 0;
+ break;
+ case RULER_TYPE_INDENT: { // Absatzeinzuege (Modifier)
+ if( bContentProtected ) return FALSE;
+ if(1 == GetDragAryPos()) { // Linker Absatzeinzug
+ pIndents[0] = pIndents[INDENT_GAP];
+ pIndents[0].nStyle |= RULER_STYLE_DONTKNOW;
+ EvalModifier();
+ }
+ else
+ nDragType = DRAG_OBJECT;
+ pIndents[1] = pIndents[GetDragAryPos()+INDENT_GAP];
+ pIndents[1].nStyle |= RULER_STYLE_DONTKNOW;
+ break;
+ }
+ case RULER_TYPE_TAB: // Tabs (Modifier)
+ if( bContentProtected ) return FALSE;
+ EvalModifier();
+ pTabs[0] = pTabs[GetDragAryPos()+1];
+ pTabs[0].nStyle |= RULER_STYLE_DONTKNOW;
+ break;
+ default:
+ nDragType = NONE;
+ }
+ }
+ else
+ nDragType = NONE;
+ if(bOk)
+ CalcMinMax();
+ return bOk;
+}
+
+
+void __EXPORT SvxRuler::Drag()
+/*
+ [Beschreibung]
+
+ SV-Draghandler
+
+*/
+{
+ if(IsDragCanceled())
+ {
+ Ruler::Drag();
+ return;
+ }
+ switch(GetDragType()) {
+ case RULER_TYPE_MARGIN1: // linker Rand umgebender Frame
+ DragMargin1();
+ pRuler_Imp->lLastLMargin=GetMargin1();
+ break;
+ case RULER_TYPE_MARGIN2: // rechter Rand umgebender Frame
+ DragMargin2();
+ break;
+ case RULER_TYPE_INDENT: // Absatzeinzuege
+ DragIndents();
+ break;
+ case RULER_TYPE_BORDER: // Tabelle, Spalten
+ if(pColumnItem)
+ DragBorders();
+ else if(pObjectItem)
+ DragObjectBorder();
+ break;
+ case RULER_TYPE_TAB: // Tabs
+ DragTabs();
+ break;
+ }
+ Ruler::Drag();
+}
+
+
+void __EXPORT SvxRuler::EndDrag()
+/*
+ [Beschreibung]
+
+ SV-Handler; wird beim Beenden des Draggens gerufen.
+ Stoesst die Aktualisierung der Daten der Applikation an, indem
+ durch Aufruf der jeweiligen Apply...()- Methoden die Daten an die
+ Applikation geschickt werden.
+
+*/
+{
+ const BOOL bUndo = IsDragCanceled();
+ const long lPos = GetDragPos();
+ DrawLine_Impl(lTabPos, 2, bHorz);
+ lTabPos=-1;
+ if(!bUndo)
+ switch(GetDragType())
+ {
+ case RULER_TYPE_MARGIN1: // linker, oberer Rand umgebender Frame
+ case RULER_TYPE_MARGIN2: // rechter, unterer Rand umgebender Frame
+ {
+ if(!pColumnItem || !pColumnItem->IsTable())
+ ApplyMargins();
+
+ if(pColumnItem &&
+ (pColumnItem->IsTable() ||
+ (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)))
+ ApplyBorders();
+
+ }
+ break;
+ case RULER_TYPE_BORDER: // Tabelle, Spalten
+ if(lInitialDragPos != lPos)
+ {
+ if(pColumnItem)
+ {
+ ApplyBorders();
+ if(bHorz)
+ UpdateTabs();
+ }
+ else if(pObjectItem)
+ ApplyObject();
+ }
+ break;
+ case RULER_TYPE_INDENT: // Absatzeinzuege
+ if(lInitialDragPos != lPos)
+ ApplyIndents();
+ SetIndents(3, pIndents+INDENT_GAP);
+ break;
+ case RULER_TYPE_TAB: // Tabs
+ {
+ ApplyTabs();
+ pTabs[GetDragAryPos()].nStyle &= ~RULER_STYLE_INVISIBLE;
+ SetTabs(nTabCount, pTabs+TAB_GAP);
+ }
+ break;
+ }
+ nDragType = NONE;
+ Ruler::EndDrag();
+ if(bUndo)
+ for(USHORT i=0;i<pRuler_Imp->nControlerItems;i++)
+ {
+ pCtrlItem[i]->ClearCache();
+ pCtrlItem[i]->GetBindings().Invalidate(pCtrlItem[i]->GetId());
+ // pCtrlItem[i]->UnBind();
+// pCtrlItem[i]->ReBind();
+ }
+}
+
+
+void __EXPORT SvxRuler::ExtraDown()
+
+/*
+ [Beschreibung]
+
+ Ueberladene SV-Methode; setzt den neuen Typ fuer den Defaulttabulator.
+*/
+
+{
+ // Tabulator Typ umschalten
+ if(pTabStopItem &&
+ (nFlags & SVXRULER_SUPPORT_TABS) == SVXRULER_SUPPORT_TABS) {
+ ++nDefTabType;
+ if(RULER_TAB_DEFAULT == nDefTabType)
+ nDefTabType = RULER_TAB_LEFT;
+ SetExtraType(RULER_EXTRA_TAB, nDefTabType);
+ }
+ Ruler::ExtraDown();
+}
+
+
+void __EXPORT SvxRuler::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType)
+/*
+
+ [Beschreibung]
+
+ Benachrichtigung durch die Bindings, dass die Statusaktualisierung
+ beendet ist.
+ Das Lineal aktualisiert seine Darstellung und meldet sich bei den
+ Bindings wieder ab.
+
+*/
+
+{
+ // Aktualisierung anstossen
+ if(bActive &&
+ rHint.Type() == TYPE(SfxSimpleHint) &&
+ ((SfxSimpleHint&) rHint ).GetId() == SFX_HINT_UPDATEDONE ) {
+ Update();
+ EndListening(*pBindings);
+ bValid = TRUE;
+ bListening = FALSE;
+ }
+}
+
+
+IMPL_LINK_INLINE_START( SvxRuler, MenuSelect, Menu *, pMenu )
+
+/*
+ [Beschreibung]
+
+ Handler des Kontextmenues fuer das Umschalten der Masseinheit
+
+*/
+
+{
+ SetUnit(FieldUnit(pMenu->GetCurItemId()));
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxRuler, MenuSelect, Menu *, pMenu )
+
+
+IMPL_LINK( SvxRuler, TabMenuSelect, Menu *, pMenu )
+
+/*
+ [Beschreibung]
+
+ Handler des Tabulatormenues fuer das Setzen des Typs
+
+*/
+
+{
+ SvxTabStop aTabStop = (*pTabStopItem)[pRuler_Imp->nIdx];
+ aTabStop.GetAdjustment() = ToAttrTab_Impl(pMenu->GetCurItemId()-1);
+ pTabStopItem->Remove(pRuler_Imp->nIdx);
+ pTabStopItem->Insert(aTabStop);
+ pBindings->GetDispatcher()->Execute( SID_ATTR_TABSTOP, SFX_CALLMODE_RECORD, pTabStopItem, 0L );
+ UpdateTabs();
+ pRuler_Imp->nIdx = 0;
+ return 0;
+}
+
+
+void SvxRuler::Command( const CommandEvent& rCEvt )
+
+/*
+ [Beschreibung]
+
+ Mauskontextmenue fuer das Umschalten der Masseinheit
+
+*/
+
+{
+ if ( COMMAND_CONTEXTMENU == rCEvt.GetCommand() )
+ {
+ CancelDrag();
+ if ( pTabs &&
+ RULER_TYPE_TAB ==
+ GetType( rCEvt.GetMousePosPixel(), &pRuler_Imp->nIdx ) &&
+ pTabs[pRuler_Imp->nIdx+TAB_GAP].nStyle < RULER_TAB_DEFAULT )
+ {
+ PopupMenu aMenu;
+ aMenu.SetSelectHdl(LINK(this, SvxRuler, TabMenuSelect));
+ VirtualDevice aDev;
+ const Size aSz(RULER_TAB_WIDTH+2, RULER_TAB_HEIGHT+2);
+ aDev.SetOutputSize(aSz);
+ aDev.SetBackground(Wallpaper(Color(COL_WHITE)));
+ const Point aPt(aSz.Width() / 2, aSz.Height() / 2);
+
+ for ( USHORT i = RULER_TAB_LEFT; i < RULER_TAB_DEFAULT; ++i )
+ {
+ DrawTab(&aDev, aPt, i);
+ aMenu.InsertItem(i+1,
+ String(ResId(RID_SVXSTR_RULER_START+i, DIALOG_MGR())),
+ Image(aDev.GetBitmap(Point(), aSz), Color(COL_WHITE)));
+ aMenu.CheckItem(i+1, i == pTabs[pRuler_Imp->nIdx+TAB_GAP].nStyle);
+ aDev.SetOutputSize(aSz); // device loeschen
+ }
+ aMenu.Execute( this, OutputToScreenPixel(rCEvt.GetMousePosPixel()));
+ }
+ else
+ {
+ PopupMenu aMenu(ResId(RID_SVXMN_RULER, DIALOG_MGR()));
+ aMenu.SetSelectHdl(LINK(this, SvxRuler, MenuSelect));
+ FieldUnit eUnit = GetUnit();
+ const USHORT nCount = aMenu.GetItemCount();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ const USHORT nId = aMenu.GetItemId(i);
+ aMenu.CheckItem(nId, nId == (USHORT)eUnit);
+ }
+ aMenu.Execute( this, OutputToScreenPixel(rCEvt.GetMousePosPixel()));
+ }
+ }
+ else
+ Ruler::Command( rCEvt );
+}
+
+
+USHORT SvxRuler::GetActRightColumn(
+ BOOL bForceDontConsiderHidden, USHORT nAct ) const
+{
+ if( nAct == USHRT_MAX )
+ nAct = pColumnItem->GetActColumn();
+ else nAct++; //Damit man die ActDrag uebergeben kann
+
+ BOOL bConsiderHidden = !bForceDontConsiderHidden &&
+ !( nDragType & DRAG_OBJECT_ACTLINE_ONLY );
+
+ while( nAct < pColumnItem->Count() - 1 )
+ {
+ if( (*pColumnItem)[nAct].bVisible || bConsiderHidden )
+ return nAct;
+ else
+ nAct++;
+ }
+ return USHRT_MAX;
+}
+
+
+
+USHORT SvxRuler::GetActLeftColumn(
+ BOOL bForceDontConsiderHidden, USHORT nAct ) const
+{
+ if(nAct==USHRT_MAX)
+ nAct=pColumnItem->GetActColumn();
+
+ USHORT nLOffs=1;
+
+ BOOL bConsiderHidden = !bForceDontConsiderHidden &&
+ !( nDragType & DRAG_OBJECT_ACTLINE_ONLY );
+
+ while(nAct>=nLOffs)
+ {
+ if( (*pColumnItem)[ nAct - nLOffs ].bVisible || bConsiderHidden )
+ return nAct-nLOffs;
+ else
+ nLOffs++;
+ }
+ return USHRT_MAX;
+}
+
+
+BOOL SvxRuler::IsActLastColumn(
+ BOOL bForceDontConsiderHidden, USHORT nAct) const
+{
+ return GetActRightColumn(bForceDontConsiderHidden, nAct)==USHRT_MAX;
+}
+
+BOOL SvxRuler::IsActFirstColumn(
+ BOOL bForceDontConsiderHidden, USHORT nAct) const
+{
+ return GetActLeftColumn(bForceDontConsiderHidden, nAct)==USHRT_MAX;
+}
+
+long SvxRuler::CalcPropMaxRight(USHORT nCol) const
+{
+
+ if(!(nDragType & DRAG_OBJECT_SIZE_LINEAR))
+ {
+
+ // ausgehend vom rechten Rand die Mindestbreiten
+ // aller betroffenen Spalten abziehen
+ long nMaxRight = GetMargin2()-GetMargin1();
+
+ long lFences=0;
+ long lMinSpace=USHRT_MAX;
+ long lOldPos;
+ long lColumns=0;
+ USHORT nStart;
+ if(!pColumnItem->IsTable())
+ {
+ if(nCol==USHRT_MAX)
+ {
+ lOldPos=GetMargin1();
+ nStart=0;
+ }
+ else
+ {
+ lOldPos=pBorders[nCol].nPos+pBorders[nCol].nWidth;
+ nStart=nCol+1;
+ lFences=pBorders[nCol].nWidth;
+ }
+
+ for(USHORT i = nStart; i < nBorderCount-1; ++i)
+ {
+ long lWidth=pBorders[i].nPos-lOldPos;
+ lColumns+=lWidth;
+ if(lWidth<lMinSpace)
+ lMinSpace=lWidth;
+ lOldPos=pBorders[i].nPos+pBorders[i].nWidth;
+ lFences+=pBorders[i].nWidth;
+ }
+ long lWidth=GetMargin2()-lOldPos;
+ lColumns+=lWidth;
+ if(lWidth<lMinSpace)
+ lMinSpace=lWidth;
+ }
+ else
+ {
+ USHORT nActCol;
+ if(nCol==USHRT_MAX) //CalcMinMax fuer LeftMargin
+ {
+ lOldPos=GetMargin1();
+ }
+ else
+ {
+ lOldPos=pBorders[nCol].nPos;
+ }
+ lColumns=GetMargin2()-lOldPos;
+ nActCol=nCol;
+ lFences=0;
+ while(nActCol<nBorderCount||nActCol==USHRT_MAX)
+ {
+ USHORT nRight;
+ if(nActCol==USHRT_MAX)
+ {
+ nRight=0;
+ while(!(*pColumnItem)[nRight].bVisible)
+ nRight++;
+ }
+ else
+ nRight=GetActRightColumn(FALSE, nActCol);
+ long lWidth;
+ if(nRight!=USHRT_MAX)
+ {
+ lWidth=pBorders[nRight].nPos-lOldPos;
+ lOldPos=pBorders[nRight].nPos;
+ }
+ else
+ lWidth=GetMargin2()-lOldPos;
+ nActCol=nRight;
+ if(lWidth<lMinSpace)
+ lMinSpace=lWidth;
+ if(nActCol==USHRT_MAX)
+ break;
+ }
+ }
+
+ nMaxRight-=(long)(lFences+lMinFrame/(float)lMinSpace*lColumns);
+ return nMaxRight;
+ }
+ else
+ {
+ if(pColumnItem->IsTable())
+ {
+ USHORT nVisCols=0;
+ for(USHORT i=GetActRightColumn(FALSE, nCol);i<nBorderCount;)
+ {
+ if((*pColumnItem)[i].bVisible)
+ nVisCols++;
+ i=GetActRightColumn(FALSE, i);
+ }
+ return GetMargin2()-GetMargin1()-(nVisCols+1)*lMinFrame;
+ }
+ else
+ {
+ long lWidth=0;
+ for(USHORT i=nCol;i<nBorderCount-1;i++)
+ {
+ lWidth+=lMinFrame+pBorders[i].nWidth;
+ }
+ return GetMargin2()-GetMargin1()-lWidth;
+ }
+ }
+}
+
diff --git a/svx/source/dialog/tabarea.cxx b/svx/source/dialog/tabarea.cxx
new file mode 100644
index 0000000000..2aed51d7ba
--- /dev/null
+++ b/svx/source/dialog/tabarea.cxx
@@ -0,0 +1,360 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabarea.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <tools/ref.hxx>
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SVDMARK_HXX //autogen
+#include <svdmark.hxx>
+#endif
+#ifndef _SVDOBJ_HXX //autogen
+#include <svdobj.hxx>
+#endif
+#ifndef _SVDVIEW_HXX //autogen
+#include <svdview.hxx>
+#endif
+
+#define _SVX_TABAREA_CXX
+
+#include "dialogs.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_GRADIENT_LIST SID_GRADIENT_LIST
+#define ITEMID_HATCH_LIST SID_HATCH_LIST
+#define ITEMID_BITMAP_LIST SID_BITMAP_LIST
+
+#include "xtable.hxx"
+#include "globl3d.hxx"
+#include "svdmodel.hxx"
+#include "drawitem.hxx"
+#include "tabarea.hxx"
+#include "tabarea.hrc"
+#include "dlgname.hxx"
+#include "dlgname.hrc"
+#include "dialmgr.hxx"
+
+#define DLGWIN this->GetParent()->GetParent()
+
+/*************************************************************************
+|*
+|* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
+|*
+|************************************************************************/
+
+SvxAreaTabDialog::SvxAreaTabDialog
+(
+ Window* pParent,
+ const SfxItemSet* pAttr,
+ SdrModel* pModel,
+ const SdrView* pSdrView
+) :
+
+ SfxTabDialog( pParent, SVX_RES( RID_SVXDLG_AREA ), pAttr ),
+
+ rOutAttrs ( *pAttr ),
+ pDrawModel ( pModel ),
+ pView ( pSdrView ),
+ pColorTab ( pModel->GetColorTable() ),
+ pGradientList ( pModel->GetGradientList() ),
+ pHatchingList ( pModel->GetHatchList() ),
+ pBitmapList ( pModel->GetBitmapList() ),
+ pNewColorTab ( pModel->GetColorTable() ),
+ pNewGradientList ( pModel->GetGradientList() ),
+ pNewHatchingList ( pModel->GetHatchList() ),
+ pNewBitmapList ( pModel->GetBitmapList() ),
+ bDeleteColorTable ( TRUE )
+{
+ FreeResource();
+
+ AddTabPage( RID_SVXPAGE_AREA, SvxAreaTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_SHADOW, SvxShadowTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_TRANSPARENCE, SvxTransparenceTabPage::Create, 0);
+ AddTabPage( RID_SVXPAGE_COLOR, SvxColorTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_GRADIENT, SvxGradientTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_HATCH, SvxHatchTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_BITMAP, SvxBitmapTabPage::Create, 0);
+
+ nColorTableState = CT_NONE;
+ nBitmapListState = CT_NONE;
+ nGradientListState = CT_NONE;
+ nHatchingListState = CT_NONE;
+
+ nDlgType = 0;
+ nPageType = PT_AREA;
+ nPos = 0;
+
+ SetCurPageId( RID_SVXPAGE_AREA );
+
+ CancelButton& rBtnCancel = GetCancelButton();
+ rBtnCancel.SetClickHdl( LINK( this, SvxAreaTabDialog, CancelHdl ) );
+//! rBtnCancel.SetText( SVX_RESSTR( RID_SVXSTR_CLOSE ) );
+}
+
+// -----------------------------------------------------------------------
+
+SvxAreaTabDialog::~SvxAreaTabDialog()
+{
+}
+
+
+// -----------------------------------------------------------------------
+
+void SvxAreaTabDialog::SavePalettes()
+{
+ if( pNewColorTab != pDrawModel->GetColorTable() )
+ {
+ if(bDeleteColorTable)
+ delete pDrawModel->GetColorTable();
+ pDrawModel->SetColorTable( pNewColorTab );
+ SfxObjectShell::Current()->PutItem( SvxColorTableItem( pNewColorTab ) );
+ pColorTab = pDrawModel->GetColorTable();
+ }
+ if( pNewGradientList != pDrawModel->GetGradientList() )
+ {
+ delete pDrawModel->GetGradientList();
+ pDrawModel->SetGradientList( pNewGradientList );
+ SfxObjectShell::Current()->PutItem( SvxGradientListItem( pNewGradientList ) );
+ pGradientList = pDrawModel->GetGradientList();
+ }
+ if( pNewHatchingList != pDrawModel->GetHatchList() )
+ {
+ delete pDrawModel->GetHatchList();
+ pDrawModel->SetHatchList( pNewHatchingList );
+ SfxObjectShell::Current()->PutItem( SvxHatchListItem( pNewHatchingList ) );
+ pHatchingList = pDrawModel->GetHatchList();
+ }
+ if( pNewBitmapList != pDrawModel->GetBitmapList() )
+ {
+ delete pDrawModel->GetBitmapList();
+ pDrawModel->SetBitmapList( pNewBitmapList );
+ SfxObjectShell::Current()->PutItem( SvxBitmapListItem( pNewBitmapList ) );
+ pBitmapList = pDrawModel->GetBitmapList();
+ }
+
+ // Speichern der Tabellen, wenn sie geaendert wurden.
+
+ const String aPath( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+
+ if( nHatchingListState & CT_MODIFIED )
+ {
+ pHatchingList->SetPath( aPath );
+ pHatchingList->Save();
+
+ // ToolBoxControls werden benachrichtigt:
+ SfxObjectShell::Current()->PutItem( SvxHatchListItem( pHatchingList ) );
+ }
+
+ if( nBitmapListState & CT_MODIFIED )
+ {
+ pBitmapList->SetPath( aPath );
+ pBitmapList->Save();
+
+ // ToolBoxControls werden benachrichtigt:
+ SfxObjectShell::Current()->PutItem( SvxBitmapListItem( pBitmapList ) );
+ }
+
+ if( nGradientListState & CT_MODIFIED )
+ {
+ pGradientList->SetPath( aPath );
+ pGradientList->Save();
+ // ToolBoxControls werden benachrichtigt:
+ SfxObjectShell::Current()->PutItem( SvxGradientListItem( pGradientList ) );
+ }
+
+ if( nColorTableState & CT_MODIFIED )
+ {
+ pColorTab->SetPath( aPath );
+ pColorTab->Save();
+
+ // ToolBoxControls werden benachrichtigt:
+ SfxObjectShell::Current()->PutItem( SvxColorTableItem( pColorTab ) );
+ }
+}
+// -----------------------------------------------------------------------
+
+short SvxAreaTabDialog::Ok()
+{
+ SavePalettes();
+
+ // Es wird RET_OK zurueckgeliefert, wenn wenigstens eine
+ // TabPage in FillItemSet() TRUE zurueckliefert. Dieses
+ // geschieht z.Z. standardmaessig.
+ return( SfxTabDialog::Ok() );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxAreaTabDialog, CancelHdl, void *, p )
+{
+ SavePalettes();
+
+ EndDialog( RET_CANCEL );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxAreaTabDialog, CancelHdl, void *, p )
+
+// -----------------------------------------------------------------------
+
+void SvxAreaTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+{
+ switch( nId )
+ {
+ case RID_SVXPAGE_AREA:
+ ( (SvxAreaTabPage&) rPage ).SetColorTable( pColorTab );
+ ( (SvxAreaTabPage&) rPage ).SetGradientList( pGradientList );
+ ( (SvxAreaTabPage&) rPage ).SetHatchingList( pHatchingList );
+ ( (SvxAreaTabPage&) rPage ).SetBitmapList( pBitmapList );
+ ( (SvxAreaTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxAreaTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxAreaTabPage&) rPage ).SetPos( &nPos );
+ ( (SvxAreaTabPage&) rPage ).SetAreaTP( &bAreaTP );
+ ( (SvxAreaTabPage&) rPage ).SetGrdChgd( &nGradientListState );
+ ( (SvxAreaTabPage&) rPage ).SetHtchChgd( &nHatchingListState );
+ ( (SvxAreaTabPage&) rPage ).SetBmpChgd( &nBitmapListState );
+ ( (SvxAreaTabPage&) rPage ).SetColorChgd( &nColorTableState );
+ ( (SvxAreaTabPage&) rPage ).Construct();
+ // ActivatePage() wird das erste mal nicht gerufen
+ ( (SvxAreaTabPage&) rPage ).ActivatePage( rOutAttrs );
+
+ break;
+
+ case RID_SVXPAGE_SHADOW:
+ {
+ ( (SvxShadowTabPage&) rPage ).SetColorTable( pColorTab );
+ ( (SvxShadowTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxShadowTabPage&) rPage ).SetDlgType( &nDlgType );
+ //( (SvxShadowTabPage&) rPage ).SetPos( &nPos );
+ ( (SvxShadowTabPage&) rPage ).SetAreaTP( &bAreaTP );
+ ( (SvxShadowTabPage&) rPage ).SetColorChgd( &nColorTableState );
+ ( (SvxShadowTabPage&) rPage ).Construct();
+ }
+ break;
+
+ case RID_SVXPAGE_GRADIENT:
+ ( (SvxGradientTabPage&) rPage ).SetColorTable( pColorTab );
+ ( (SvxGradientTabPage&) rPage ).SetGradientList( pGradientList );
+ ( (SvxGradientTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxGradientTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxGradientTabPage&) rPage ).SetPos( &nPos );
+ ( (SvxGradientTabPage&) rPage ).SetAreaTP( &bAreaTP );
+ ( (SvxGradientTabPage&) rPage ).SetGrdChgd( &nGradientListState );
+ ( (SvxGradientTabPage&) rPage ).SetColorChgd( &nColorTableState );
+ ( (SvxGradientTabPage&) rPage ).Construct();
+ break;
+
+ case RID_SVXPAGE_HATCH:
+ ( (SvxHatchTabPage&) rPage ).SetColorTable( pColorTab );
+ ( (SvxHatchTabPage&) rPage ).SetHatchingList( pHatchingList );
+ ( (SvxHatchTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxHatchTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxHatchTabPage&) rPage ).SetPos( &nPos );
+ ( (SvxHatchTabPage&) rPage ).SetAreaTP( &bAreaTP );
+ ( (SvxHatchTabPage&) rPage ).SetHtchChgd( &nHatchingListState );
+ ( (SvxHatchTabPage&) rPage ).SetColorChgd( &nColorTableState );
+ ( (SvxHatchTabPage&) rPage ).Construct();
+ break;
+
+ case RID_SVXPAGE_BITMAP:
+ ( (SvxBitmapTabPage&) rPage ).SetColorTable( pColorTab );
+ ( (SvxBitmapTabPage&) rPage ).SetBitmapList( pBitmapList );
+ ( (SvxBitmapTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxBitmapTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxBitmapTabPage&) rPage ).SetPos( &nPos );
+ ( (SvxBitmapTabPage&) rPage ).SetAreaTP( &bAreaTP );
+ ( (SvxBitmapTabPage&) rPage ).SetBmpChgd( &nBitmapListState );
+ ( (SvxBitmapTabPage&) rPage ).SetColorChgd( &nColorTableState );
+ ( (SvxBitmapTabPage&) rPage ).Construct();
+ break;
+
+ case RID_SVXPAGE_COLOR:
+ ( (SvxColorTabPage&) rPage ).SetColorTable( pColorTab );
+ ( (SvxColorTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxColorTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxColorTabPage&) rPage ).SetPos( &nPos );
+ ( (SvxColorTabPage&) rPage ).SetAreaTP( &bAreaTP );
+ ( (SvxColorTabPage&) rPage ).SetColorChgd( &nColorTableState );
+ ( (SvxColorTabPage&) rPage ).SetDeleteColorTable( bDeleteColorTable );
+ ( (SvxColorTabPage&) rPage ).Construct();
+ break;
+
+ case RID_SVXPAGE_TRANSPARENCE:
+ ( (SvxTransparenceTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxTransparenceTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxTransparenceTabPage&) rPage ).Construct();
+ break;
+
+ }
+}
+
+
diff --git a/svx/source/dialog/tabarea.hrc b/svx/source/dialog/tabarea.hrc
new file mode 100644
index 0000000000..a5df83536a
--- /dev/null
+++ b/svx/source/dialog/tabarea.hrc
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabarea.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_LOAD 5
+#define BTN_SAVE 6
+#define GRP_FILL 1
+#define GRP_SHADOW 2
+#define GRP_PREVIEW 3
+#define GRP_TRANSPARENT 4
+#define GRP_STEPCOUNT 5
+#define CTL_PREVIEW 1
+#define CTL_POSITION 2
+//#define CTL_GRADIENT_PREVIEW 3
+//#define CTL_HATCHING_PREVIEW 4
+#define CTL_COLOR_PREVIEW 5
+#define CTL_BITMAP_PREVIEW 6
+#define FT_POSITION 2
+#define FT_DISTANCE 1
+#define MTR_FLD_DISTANCE 1
+#define TSB_INVISIBLE 1
+#define TSB_SHOW_SHADOW 2
+#define TSB_STEPCOUNT 3
+#define TSB_TILE 4
+#define TSB_STRETCH 5
+#define TSB_ORIGINAL 6
+#define RBT_COLOR 1
+#define RBT_GRADIENT 2
+#define RBT_HATCHING 3
+#define RBT_BITMAP 4
+#define RBT_INVISIBLE 5
+#define LB_COLOR 1
+#define LB_GRADIENT 2
+#define LB_HATCHING 3
+#define LB_BITMAP 4
+//#define LB_TRANSPARENT 5
+#define GRP_BITMAPS 4
+#define LB_BITMAPS 4
+#define LB_BACKGROUND_COLOR 3
+#define GRP_COLOR 1
+#define BTN_ADD 1
+#define BTN_IMPORT 2
+#define BTN_MODIFY 3
+#define BTN_DELETE 4
+#define FT_COLOR 1
+#define FT_BACKGROUND_COLOR 2
+#define GRP_LINE 1
+#define GRP_DEFINITION 2
+#define GRP_HATCHINGS 5
+#define FT_LINE_COLOR 2
+#define FT_LINE_TYPE 1
+#define FT_LINE_DISTANCE 3
+#define FT_LINE_ANGLE 4
+#define MTR_FLD_ANGLE 3
+#define CTL_ANGLE 2
+#define LB_HATCHINGS 4
+#define LB_LINE_TYPE 1
+#define LB_LINE_COLOR 3
+#define GRP_GRADIENTS 4
+#define GRP_GRADIENT_TYPE 5
+#define LB_GRADIENTS 3
+#define LB_GRADIENT_TYPES 4
+#define LB_COLOR_FROM 1
+#define LB_COLOR_TO 2
+#define FT_COLOR_FROM 1
+#define FT_COLOR_TO 2
+#define FT_CENTER_X 3
+#define FT_CENTER_Y 5
+#define FT_ANGLE 4
+#define FT_BORDER 6
+#define MTR_COLOR_FROM 4
+#define MTR_COLOR_TO 5
+#define MTR_CENTER_X 2
+#define MTR_CENTER_Y 3
+#define MTR_BORDER 6
+#define MTR_ANGLE 1
+#define NUM_FLD_STEPCOUNT 1
+#define GRP_PIXEL_EDIT 2
+#define CTL_PIXEL 2
+#define FT_TYPE 7
+#define FT_SHADOW_COLOR 10
+#define LB_SHADOW_COLOR 10
+
+// Farben definieren TabPage
+// nur temporaer !!!
+// #define RID_SVXPAGE_COLOR 999
+
+#define GRP_COLORTABLE 1
+#define GRP_COLORMODEL 2
+#define BTN_WORK_ON 2
+#define CTL_COLORTABLE 3
+#define CTL_PREVIEW_OLD 1
+#define CTL_PREVIEW_NEW 2
+#define FT_NAME 2
+#define EDT_NAME 1
+// #define LB_COLOR 1
+#define LB_COLORMODEL 2
+#define FT_1 3
+#define FT_2 4
+#define FT_3 5
+#define FT_4 6
+#define MTR_FLD_1 1
+#define MTR_FLD_2 2
+#define MTR_FLD_3 3
+#define MTR_FLD_4 4
+
+#define MTR_FLD_X_SIZE 4
+#define MTR_FLD_Y_SIZE 5
+#define GRP_SIZE 6
+#define TSB_SCALE 1
+#define GRP_POSITION 7
+#define FT_X_OFFSET 1
+#define FT_Y_OFFSET 2
+#define MTR_FLD_X_OFFSET 1
+#define MTR_FLD_Y_OFFSET 2
+#define RBT_ROW 6
+#define RBT_COLUMN 7
+#define MTR_FLD_OFFSET 3
+#define GRP_OFFSET 8
+
+#define FT_TRANSPARENT 9
+#define FT_X_SIZE 10
+#define FT_Y_SIZE 11
+
+#define RBT_TRANS_OFF 8
+#define RBT_TRANS_LINEAR 9
+#define RBT_TRANS_GRADIENT 10
+#define GRP_TRANS_MODE 9
+#define GRP_TRANS_GRADIENT 10
+#define CTL_TRANS_PREVIEW 19
+
+#define FT_TRGR_TYPE 12
+#define LB_TRGR_GRADIENT_TYPES 3
+#define FT_TRGR_CENTER_X 13
+#define MTR_TRGR_CENTER_X 4
+#define FT_TRGR_CENTER_Y 14
+#define MTR_TRGR_CENTER_Y 5
+#define FT_TRGR_ANGLE 15
+#define MTR_TRGR_ANGLE 6
+#define FT_TRGR_BORDER 16
+#define MTR_TRGR_BORDER 7
+#define FT_TRGR_START_VALUE 17
+#define MTR_TRGR_START_VALUE 8
+#define FT_TRGR_END_VALUE 18
+#define MTR_TRGR_END_VALUE 9
+#define MTR_TRANSPARENT 10
+
+#define MTR_SHADOW_TRANSPARENT 11
+
+// Hatch-Background on Area-TabPage
+#define GRP_HATCHBCKGRD 20
+#define CB_HATCHBCKGRD 21
+#define LB_HATCHBCKGRDCOLOR 22
+
diff --git a/svx/source/dialog/tabarea.src b/svx/source/dialog/tabarea.src
new file mode 100644
index 0000000000..629510d328
--- /dev/null
+++ b/svx/source/dialog/tabarea.src
@@ -0,0 +1,4743 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabarea.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "tabarea.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXPAGE_AREA ------------------------------------------------------
+#define TRANS_GRAD_OFFSET_X (120 + 12)
+#define TRANS_GRAD_OFFSET_Y (6)
+#define TRANS_GRAD_FIELD_SEPARATION (24)
+
+TabPage RID_SVXPAGE_TRANSPARENCE
+{
+ HelpID = HID_AREA_TRANSPARENCE;
+ Hide = TRUE;
+ Size = MAP_APPFONT(260 ,135);
+ Text = "Transparenz" ;
+ Text [ English ] = "Transparence";
+
+ RadioButton RBT_TRANS_OFF
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 110 , 10 ) ;
+ Text = "~Keine Transparenz" ;
+ Text [ ENGLISH ] = "~No transparence" ;
+ Text[ english_us ] = "~No transparency";
+ Text[ portuguese ] = "~Sem transparência";
+ Text[ russian ] = "~Íå ïðîçðà÷íûé";
+ Text[ greek ] = "×ùñßò äéáöÜíåéá";
+ Text[ dutch ] = "~Geen transparantie";
+ Text[ french ] = "~Aucune transparence";
+ Text[ spanish ] = "~Sin transparencia";
+ Text[ italian ] = "Nessuna trasparenza";
+ Text[ danish ] = "Ingen transparens";
+ Text[ swedish ] = "Ingen transparens";
+ Text[ polish ] = "~Bez przezroczystoœci";
+ Text[ portuguese_brazilian ] = "~No transparence";
+ Text[ japanese ] = "“§‰ß«‚È‚µ(~N)";
+ Text[ korean ] = "Åõ¸íÈ¿°ú ¾øÀ½(~N)";
+ Text[ chinese_simplified ] = "²»Í¸Ã÷(~N)";
+ Text[ chinese_traditional ] = "¤£³z©ú(~N)";
+ Text[ arabic ] = "ÈÏæä ÔÝÇÝíÉ";
+ Text[ turkish ] = "~Saydam deðil";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_TRANS_LINEAR
+ {
+ Pos = MAP_APPFONT ( 12 , 25 ) ;
+ Size = MAP_APPFONT ( 110 , 10 ) ;
+ Text = "~Lineare Transparenz" ;
+ Text [ ENGLISH ] = "~Linear transparence" ;
+ Text[ english_us ] = "~Linear transparency";
+ Text[ portuguese ] = "~Transparência linear";
+ Text[ russian ] = "Ëèíåéíàÿ ïðîçðà÷íîñòü";
+ Text[ greek ] = "ÃñáììéêÞ äéáöÜíåéá";
+ Text[ dutch ] = "~Lineaire transparantie";
+ Text[ french ] = "~Transparence linéaire";
+ Text[ spanish ] = "~Transparencia lineal";
+ Text[ italian ] = "Trasparenza ~lineare";
+ Text[ danish ] = "Lineær transparens";
+ Text[ swedish ] = "Lineär transparens";
+ Text[ polish ] = "PrzezroczystoϾ ~linerana";
+ Text[ portuguese_brazilian ] = "~Linear transparence";
+ Text[ japanese ] = "üó‚Å“§‰ß«‚ ‚è(~L)";
+ Text[ korean ] = "¼±Çü Åõ¸íÈ¿°ú(~L)";
+ Text[ chinese_simplified ] = "Ïßʽ͸Ã÷(~L)";
+ Text[ chinese_traditional ] = "½u¦¡³z©ú(~L)";
+ Text[ arabic ] = "ÔÝÇÝíÉ ÎØíÉ";
+ Text[ turkish ] = "~Doðrusal saydamlýk";
+ };
+ RadioButton RBT_TRANS_GRADIENT
+ {
+ Pos = MAP_APPFONT ( 12 , 36 ) ;
+ Size = MAP_APPFONT ( 110 , 10 ) ;
+ Text = "~Transparenzverlauf" ;
+ Text [ ENGLISH ] = "~Transparence gradient" ;
+ Text[ english_us ] = "~Transparency gradient";
+ Text[ portuguese ] = "~Gradação da transparência";
+ Text[ russian ] = "~Ïðîçðà÷íàÿ ãðàäèåíòíàÿ";
+ Text[ greek ] = "ÄéáâÜèìéóç äéáöÜíåéáò";
+ Text[ dutch ] = "~Transparantieverloop";
+ Text[ french ] = "~Dégradé de transparence";
+ Text[ spanish ] = "~Gradiente transparencia";
+ Text[ italian ] = "Grado di ~trasparenza";
+ Text[ danish ] = "Transparensgraduering";
+ Text[ swedish ] = "Transparensgradient";
+ Text[ polish ] = "~Gradient przezroczystoœci";
+ Text[ portuguese_brazilian ] = "~Transparence gradient";
+ Text[ japanese ] = "“§‰ß«¸Þ×ÃÞ°¼®Ý(~T)";
+ Text[ korean ] = "Åõ¸í ±×¶óµ¥À̼Ç(~T)";
+ Text[ chinese_simplified ] = "͸Ã÷ͼ°¸(~T)";
+ Text[ chinese_traditional ] = "³z©ú¹Ï®×(~T)";
+ Text[ arabic ] = "ÊÏÑÌ ÇáÔÝÇÝíÉ";
+ Text[ turkish ] = "~Saydamlýk geçisi";
+ };
+ GroupBox GRP_TRANS_MODE
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 120 , 30 + 18 ) ;
+ Text = "Transparenzmodus" ;
+ Text [ ENGLISH ] = "Transparence mode" ;
+ Text[ english_us ] = "Transparency mode";
+ Text[ portuguese ] = "Modo transparência";
+ Text[ russian ] = "Ðåæèì ïðîçðà÷íîñòè";
+ Text[ greek ] = "ÊáôÜóôáóç äéáöÜíåéáò";
+ Text[ dutch ] = "Modus Transparantie";
+ Text[ french ] = "Mode Transparence";
+ Text[ spanish ] = "Modo transparencia";
+ Text[ italian ] = "Modo trasparenza";
+ Text[ danish ] = "Tranparensmodus";
+ Text[ swedish ] = "Transparensläge";
+ Text[ polish ] = "Tryb przezroczystoœci";
+ Text[ portuguese_brazilian ] = "Transparence mode";
+ Text[ japanese ] = "“§‰ß«Ó°ÄÞ";
+ Text[ korean ] = "Åõ¸í ¸ðµå";
+ Text[ chinese_simplified ] = "͸Ã÷ģʽ";
+ Text[ chinese_traditional ] = "³z©ú¼Ò¦¡";
+ Text[ arabic ] = "ØÑíÞÉ ÇáÔÝÇÝíÉ";
+ Text[ turkish ] = "Saydamlýk kipi";
+ };
+
+ MetricField MTR_TRANSPARENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 + 6 , 30 + 18 + 6 + 11 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ GroupBox GRP_TRANSPARENT
+ {
+ Pos = MAP_APPFONT ( 6 , 30 + 18 + 6 ) ;
+ Size = MAP_APPFONT ( 120 , 29 ) ;
+ Text = "Lineare Transparenz" ;
+ Text [ ENGLISH ] = "Linear transparence" ;
+ Text[ english_us ] = "Linear transparency";
+ Text[ portuguese ] = "Transparência linear";
+ Text[ russian ] = "Ëèíåéíàÿ ïðîçðà÷íîñòü";
+ Text[ greek ] = "ÃñáììéêÞ äéáöÜíåéá";
+ Text[ dutch ] = "Lineaire transparantie";
+ Text[ french ] = "Transparence linéaire";
+ Text[ spanish ] = "Transparencia lineal";
+ Text[ italian ] = "Trasparenza lineare";
+ Text[ danish ] = "Lineær transparens";
+ Text[ swedish ] = "Lineär transparens";
+ Text[ polish ] = "PrzezroczystoϾ linerana";
+ Text[ portuguese_brazilian ] = "Linear transparence";
+ Text[ japanese ] = "üó‚Å“§‰ß«‚ ‚è";
+ Text[ korean ] = "¼±Çü Åõ¸íÈ¿°ú";
+ Text[ chinese_simplified ] = "Ïßʽ͸Ã÷";
+ Text[ chinese_traditional ] = "½u¦¡³z©ú";
+ Text[ arabic ] = "ÔÝÇÝíÉ ÎØíÉ";
+ Text[ turkish ] = "Doðrusal saydamlýk";
+ };
+
+ FixedText FT_TRGR_TYPE
+ {
+ Pos = MAP_APPFONT ( 6 + TRANS_GRAD_OFFSET_X, 9 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 19 + TRANS_GRAD_FIELD_SEPARATION, 10 ) ;
+ Text = "~Typ" ;
+ Text [ ENGLISH ] = "Ty~pe" ;
+ Text[ english_us ] = "Ty~pe";
+ Text[ portuguese ] = "Ti~po";
+ Text[ russian ] = "Òèï";
+ Text[ greek ] = "~Ôýðïò";
+ Text[ dutch ] = "Ty~pe";
+ Text[ french ] = "Ty~pe";
+ Text[ spanish ] = "Ti~po";
+ Text[ italian ] = "Ti~po";
+ Text[ danish ] = "Type";
+ Text[ swedish ] = "Typ";
+ Text[ polish ] = "Ty~p";
+ Text[ portuguese_brazilian ] = "Ty~pe";
+ Text[ japanese ] = "À²Ìß(~P)";
+ Text[ korean ] = "ÇüÅÂ(~P)";
+ Text[ chinese_simplified ] = "ÀàÐÍ(~P)";
+ Text[ chinese_traditional ] = "Ãþ«¬(~P)";
+ Text[ arabic ] = "ÇáäæÚ";
+ Text[ turkish ] = "~Tip";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_TRGR_GRADIENT_TYPES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 30 + TRANS_GRAD_OFFSET_X + TRANS_GRAD_FIELD_SEPARATION, 7 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 59 , 63 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Quadratisch" ; Default ; > ;
+ < "Rechteckig" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Quadratisch" ; Default ; > ;
+ < "Rechteckig" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Quadratisch" ; Default ; > ;
+ < "Rechteckig" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Quadratic" ; Default ; > ;
+ < "Square" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Elipsóide" ; Default ; > ;
+ < "Quadrado" ; Default ; > ;
+ < "Rectangular" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ëèíåéíàÿ" ; Default ; > ;
+ < "Îñåâàÿ" ; Default ; > ;
+ < "Êðóãîâàÿ" ; Default ; > ;
+ < "Ýëëèïñîâèäíàÿ" ; Default ; > ;
+ < "Êâàäðàòíàÿ" ; Default ; > ;
+ < "Ïðÿìîóãîëüíàÿ" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÃñáììéêÜ" ; Default ; > ;
+ < "ÁîïíéêÜ" ; Default ; > ;
+ < "ÁêôéíéêÜ" ; Default ; > ;
+ < "ÅëëåéøïåéäÝò" ; Default ; > ;
+ < "ÔåôñÜãùíá" ; Default ; > ;
+ < "Ïñèïãþíéá" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Lineair" ; Default ; > ;
+ < "Axiaal" ; Default ; > ;
+ < "Radiaal" ; Default ; > ;
+ < "Ovaal" ; Default ; > ;
+ < "Vierkant" ; Default ; > ;
+ < "Rechthoekig" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Linéaire" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoïde" ; Default ; > ;
+ < "Carré" ; Default ; > ;
+ < "Rectangulaire" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Lineal" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Elipsoide" ; Default ; > ;
+ < "Cuadrado" ; Default ; > ;
+ < "Rectangular" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Lineare" ; Default ; > ;
+ < "Assiale" ; Default ; > ;
+ < "Radiale" ; Default ; > ;
+ < "Ellissoidale" ; Default ; > ;
+ < "Quadrato" ; Default ; > ;
+ < "Rettangolare" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Lineær" ; Default ; > ;
+ < "Aksial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoide" ; Default ; > ;
+ < "Kvadratisk" ; Default ; > ;
+ < "Rektangulær" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Lineär" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radiell" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Kvadratisk" ; Default ; > ;
+ < "Rektangulär" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Linearny" ; Default ; > ;
+ < "Osiowy" ; Default ; > ;
+ < "Radialny" ; Default ; > ;
+ < "Elipsoida" ; Default ; > ;
+ < "Kwadratowy" ; Default ; > ;
+ < "Prostok¹tny" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Quadratisch" ; Default ; > ;
+ < "Rechteckig" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "üó" ; Default ; > ;
+ < "Ž²" ; Default ; > ;
+ < "•úŽËüó" ; Default ; > ;
+ < "‘ȉ~‘Ì" ; Default ; > ;
+ < "ŽlŠp" ; Default ; > ;
+ < "ŽlŠpŒ`" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "¼±Çü" ; Default ; > ;
+ < "ÃàÇü" ; Default ; > ;
+ < "¹æ»ç¼±Çü" ; Default ; > ;
+ < "Ÿ¿øÇü" ; Default ; > ;
+ < "Á¤»ç°¢Çü" ; Default ; > ;
+ < "Á÷»ç°¢Çü" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "Ïßʽ" ; Default ; > ;
+ < "ÖáÏò" ; Default ; > ;
+ < "¾¶Ïò" ; Default ; > ;
+ < "ÍÖÔ²Ìå" ; Default ; > ;
+ < "Õý·½ÐÎ" ; Default ; > ;
+ < "¾ØÐÎ" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "½u¦¡" ; Default ; > ;
+ < "¶b¦¡" ; Default ; > ;
+ < "®|¦V" ; Default ; > ;
+ < "¾ò¶ê²y" ; Default ; > ;
+ < "¥ß¤èÅé" ; Default ; > ;
+ < "¯x§Î" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÎØí" ; Default ; > ;
+ < "ãÍæÑí" ; Default ; > ;
+ < "ÔÚÇÚí" ; Default ; > ;
+ < "ÈíÖí" ; Default ; > ;
+ < "ãÑÈÚ" ; Default ; > ;
+ < "ãÓÊØíá" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Doðrusal" ; Default ; > ;
+ < "Eksenel" ; Default ; > ;
+ < "Radyal" ; Default ; > ;
+ < "Elipsoid" ; Default ; > ;
+ < "Karesel" ; Default ; > ;
+ < "Dikdörtgen" ; Default ; > ;
+ };
+ };
+ FixedText FT_TRGR_CENTER_X
+ {
+ Pos = MAP_APPFONT ( 6 + TRANS_GRAD_OFFSET_X, 24 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 38 + TRANS_GRAD_FIELD_SEPARATION, 10 ) ;
+ Text = "Zentrum ~X" ;
+ Text [ ENGLISH ] = "Center ~X" ;
+ Text[ english_us ] = "Center ~X";
+ Text[ portuguese ] = "Centro ~X";
+ Text[ russian ] = "Öåíòð ~X";
+ Text[ greek ] = "ÊÝíôñï ×";
+ Text[ dutch ] = "Centrum ~X";
+ Text[ french ] = "Centre ~X";
+ Text[ spanish ] = "Centro ~X";
+ Text[ italian ] = "Centro ~X";
+ Text[ danish ] = "Center X";
+ Text[ swedish ] = "Centrum X";
+ Text[ polish ] = "Centrum ~X";
+ Text[ portuguese_brazilian ] = "Center ~X";
+ Text[ japanese ] = "’†S X(~X)";
+ Text[ korean ] = "Áß¾Ó X(~X)";
+ Text[ chinese_simplified ] = "ÖÐÐÄ ~X";
+ Text[ chinese_traditional ] = "©~¤¤ ~X";
+ Text[ arabic ] = "ãÑßÒ Ó";
+ Text[ turkish ] = "~X kaydýr";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_TRGR_CENTER_X
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 + TRANS_GRAD_OFFSET_X + TRANS_GRAD_FIELD_SEPARATION, 22 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ FixedText FT_TRGR_CENTER_Y
+ {
+ Pos = MAP_APPFONT ( 6 + TRANS_GRAD_OFFSET_X, 38 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 38 + TRANS_GRAD_FIELD_SEPARATION, 10 ) ;
+ Text = "Zentrum ~Y" ;
+ Text [ ENGLISH ] = "Center ~Y" ;
+ Text[ english_us ] = "Center ~Y";
+ Text[ portuguese ] = "Centro ~Y";
+ Text[ russian ] = "Öåíòð ~Y";
+ Text[ greek ] = "ÊÝíôñï ~Õ";
+ Text[ dutch ] = "Centrum ~Y";
+ Text[ french ] = "Centre ~Y";
+ Text[ spanish ] = "Centro ~Y";
+ Text[ italian ] = "Centro ~Y";
+ Text[ danish ] = "Center Y";
+ Text[ swedish ] = "Centrum Y";
+ Text[ polish ] = "Centrum ~Y";
+ Text[ portuguese_brazilian ] = "Center ~Y";
+ Text[ japanese ] = "’†S Y(~Y)";
+ Text[ korean ] = "Áß¾Ó Y(~Y)";
+ Text[ chinese_simplified ] = "ÖÐÐÄ ~Y";
+ Text[ chinese_traditional ] = "©~¤¤ ~Y";
+ Text[ arabic ] = "ãÑßÒ Õ";
+ Text[ turkish ] = "~Y kaydýr";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_TRGR_CENTER_Y
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 + TRANS_GRAD_OFFSET_X + TRANS_GRAD_FIELD_SEPARATION, 36 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ FixedText FT_TRGR_ANGLE
+ {
+ Pos = MAP_APPFONT ( 6 + TRANS_GRAD_OFFSET_X, 53 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 38 + TRANS_GRAD_FIELD_SEPARATION, 10 ) ;
+ Text = "~Winkel" ;
+ Text [ ENGLISH ] = "~Angle" ;
+ Text[ english_us ] = "~Angle";
+ Text[ portuguese ] = "Â~ngulo";
+ Text[ russian ] = "~Óãîë";
+ Text[ greek ] = "Ãùíßá";
+ Text[ dutch ] = "~Hoek";
+ Text[ french ] = "~Angle";
+ Text[ spanish ] = "~Angulo";
+ Text[ italian ] = "Angolo";
+ Text[ danish ] = "Vinkel";
+ Text[ swedish ] = "Vinkel";
+ Text[ polish ] = "K¹t";
+ Text[ portuguese_brazilian ] = "~Angle";
+ Text[ japanese ] = "Šp“x(~A)";
+ Text[ korean ] = "°¢µµ(~A)";
+ Text[ chinese_simplified ] = "~½Ç¶È";
+ Text[ chinese_traditional ] = "¨¤«×(~A)";
+ Text[ arabic ] = "ÒÇæíÉ";
+ Text[ turkish ] = "~Açý";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_TRGR_ANGLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 + TRANS_GRAD_OFFSET_X + TRANS_GRAD_FIELD_SEPARATION, 51 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 359 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " Grad" ;
+ CustomUnitText [ ENGLISH ] = " degree" ;
+ Last = 359 ;
+ SpinSize = 15 ;
+ CustomUnitText[ english_us ] = "degree";
+ CustomUnitText[ portuguese ] = "graus";
+ CustomUnitText[ russian ] = "ãðàäóñîâ";
+ CustomUnitText[ greek ] = "ìïßñåò";
+ CustomUnitText[ dutch ] = "graden";
+ CustomUnitText[ french ] = "degrés";
+ CustomUnitText[ spanish ] = "grados";
+ CustomUnitText[ italian ] = "grado";
+ CustomUnitText[ danish ] = "grader";
+ CustomUnitText[ swedish ] = "grad";
+ CustomUnitText[ polish ] = "stopnie";
+ CustomUnitText[ portuguese_brazilian ] = "degree";
+ CustomUnitText[ japanese ] = "“x";
+ CustomUnitText[ korean ] = "µµ";
+ CustomUnitText[ chinese_simplified ] = "¶È";
+ CustomUnitText[ chinese_traditional ] = "«×";
+ CustomUnitText[ arabic ] = "ÏÑÌÉ";
+ CustomUnitText[ turkish ] = "Derece";
+ };
+ FixedText FT_TRGR_BORDER
+ {
+ Pos = MAP_APPFONT ( 6 + TRANS_GRAD_OFFSET_X, 68 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 38 + TRANS_GRAD_FIELD_SEPARATION, 10 ) ;
+ Text = "~Rand" ;
+ Text [ ENGLISH ] = "~Border" ;
+ Text[ english_us ] = "~Border";
+ Text[ portuguese ] = "~Margem";
+ Text[ russian ] = "~Êîíòóð";
+ Text[ greek ] = "Ðå~ñéèþñéï";
+ Text[ dutch ] = "~Marge";
+ Text[ french ] = "~Bordure";
+ Text[ spanish ] = "~Borde";
+ Text[ italian ] = "Ma~rgine";
+ Text[ danish ] = "Rand";
+ Text[ swedish ] = "Kant";
+ Text[ polish ] = "KrawêdŸ";
+ Text[ portuguese_brazilian ] = "~Border";
+ Text[ japanese ] = "—]”’(~B)";
+ Text[ korean ] = "Å׵θ®(~B)";
+ Text[ chinese_simplified ] = "±ß¿ò(~B)";
+ Text[ chinese_traditional ] = "­¶¹MªÅ¥Õ(~B)";
+ Text[ arabic ] = "ÇáÍÏ";
+ Text[ turkish ] = "~Kenar";
+ };
+ MetricField MTR_TRGR_BORDER
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 + TRANS_GRAD_OFFSET_X + TRANS_GRAD_FIELD_SEPARATION, 66 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ FixedText FT_TRGR_START_VALUE
+ {
+ Pos = MAP_APPFONT ( 6 + TRANS_GRAD_OFFSET_X, 83 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 38 + TRANS_GRAD_FIELD_SEPARATION, 10 ) ;
+ Text = "~Startwert" ;
+ Text [ ENGLISH ] = "~From value" ;
+ Text[ english_us ] = "~Start value";
+ Text[ portuguese ] = "Valor ~inicial";
+ Text[ russian ] = "~Íà÷àëüíîå çíà÷åíèå";
+ Text[ greek ] = "Áñ÷éêÞ ôéìÞ";
+ Text[ dutch ] = "~Beginwaarde";
+ Text[ french ] = "~Valeur initiale";
+ Text[ spanish ] = "~Valor inicial";
+ Text[ italian ] = "Valore iniziale";
+ Text[ danish ] = "Startværdi";
+ Text[ swedish ] = "Startvärde";
+ Text[ polish ] = "Wartoœæ pocz¹tk.";
+ Text[ portuguese_brazilian ] = "~From value";
+ Text[ japanese ] = "ŠJŽn’l(~S)";
+ Text[ korean ] = "½ÃÀÛ °ª(~S)";
+ Text[ chinese_simplified ] = "Æðʼֵ(~S)";
+ Text[ chinese_traditional ] = "ªì©l­È(~S)";
+ Text[ arabic ] = "ÞíãÉ ÇáÈÏÁ";
+ Text[ turkish ] = "~Baþlangýç deðeri";
+ };
+ MetricField MTR_TRGR_START_VALUE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 + 12 + TRANS_GRAD_OFFSET_X + TRANS_GRAD_FIELD_SEPARATION, 81 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ FixedText FT_TRGR_END_VALUE
+ {
+ Pos = MAP_APPFONT ( 6 + TRANS_GRAD_OFFSET_X, 98 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 38 + TRANS_GRAD_FIELD_SEPARATION, 10 ) ;
+ Text = "~Endwert" ;
+ Text [ ENGLISH ] = "~To value" ;
+ Text[ english_us ] = "~End value";
+ Text[ portuguese ] = "~Valor final";
+ Text[ russian ] = "~Êîíå÷íîå çíà÷åíèå";
+ Text[ greek ] = "ÔåëéêÞ ôéìÞ";
+ Text[ dutch ] = "~Eindwaarde";
+ Text[ french ] = "~Valeur finale";
+ Text[ spanish ] = "~Valor final";
+ Text[ italian ] = "Valore finale";
+ Text[ danish ] = "Slutværdi";
+ Text[ swedish ] = "Slutvärde";
+ Text[ polish ] = "~Wartoœæ koñcowa";
+ Text[ portuguese_brazilian ] = "~To value";
+ Text[ japanese ] = "I—¹’l(~E)";
+ Text[ korean ] = "³¡ °ª(~E)";
+ Text[ chinese_simplified ] = "ÖÕÖ¹Öµ(~E)";
+ Text[ chinese_traditional ] = "²×ºÝ­È(~E)";
+ Text[ arabic ] = "ÞíãÉ ÇáäåÇíÉ";
+ Text[ turkish ] = "~Son deðer";
+ };
+ MetricField MTR_TRGR_END_VALUE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 + 12 + TRANS_GRAD_OFFSET_X + TRANS_GRAD_FIELD_SEPARATION, 96 + TRANS_GRAD_OFFSET_Y) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+
+ GroupBox GRP_TRANS_GRADIENT
+ {
+ Pos = MAP_APPFONT ( 132 , 3 ) ;
+ Size = MAP_APPFONT ( 120 , 126 ) ;
+ Text = "Transparenzverlauf" ;
+ Text [ ENGLISH ] = "Transparence gradient" ;
+ Text[ english_us ] = "Transparency gradient";
+ Text[ portuguese ] = "Gradação transparência";
+ Text[ russian ] = "Ïðîçðà÷íàÿ ãðàäèåíòíàÿ";
+ Text[ greek ] = "ÄéáâÜèìéóç äéáöÜíåéáò";
+ Text[ dutch ] = "Transparantieverloop";
+ Text[ french ] = "Dégradé de transparence";
+ Text[ spanish ] = "Gradiente transparencia";
+ Text[ italian ] = "Grado di trasparenza";
+ Text[ danish ] = "Transparensgraduering";
+ Text[ swedish ] = "Transparensgradient";
+ Text[ polish ] = "Gradient przezroczystoœci";
+ Text[ portuguese_brazilian ] = "Transparence gradient";
+ Text[ japanese ] = "“§‰ß«¸Þ×ÃÞ°¼®Ý";
+ Text[ korean ] = "Åõ¸í ±×¶óµ¥À̼Ç";
+ Text[ chinese_simplified ] = "͸Ã÷ͼ°¸";
+ Text[ chinese_traditional ] = "³z©ú¹Ï®×";
+ Text[ arabic ] = "ÊÏÑÌ ÇáÔÝÇÝíÉ";
+ Text[ turkish ] = "Saydamlýk geçiþi";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 6 , 86 ) ;
+ Size = MAP_APPFONT ( 120 , 43 ) ;
+ Text = "Vorschau";
+ Text [ ENGLISH ] = "Preview" ;
+ Text[ english_us ] = "Preview";
+ Text[ portuguese ] = "Previsualizar";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ dutch ] = "Voorbeeld";
+ Text[ french ] = "Aperçu";
+ Text[ spanish ] = "Previsualización";
+ Text[ italian ] = "Anteprima";
+ Text[ danish ] = "Eksempel";
+ Text[ swedish ] = "Förhandsvisning";
+ Text[ polish ] = "Podgl¹d";
+ Text[ portuguese_brazilian ] = "Preview";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ÇáãÚÇíäÉ";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_BITMAP_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 95 ) ;
+ Size = MAP_APPFONT ( 108 , 28 ) ;
+ TabStop = TRUE ;
+ };
+ Control CTL_TRANS_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 95 ) ;
+ Size = MAP_APPFONT ( 108 , 28 ) ;
+ TabStop = TRUE ;
+ };
+ Text[ english_us ] = "Transparency";
+ Text[ portuguese ] = "Transparência";
+ Text[ russian ] = "Ïðîçðà÷íàÿ";
+ Text[ greek ] = "ÄéáöÜíåéá";
+ Text[ dutch ] = "Transparantie";
+ Text[ french ] = "Transparence";
+ Text[ spanish ] = "Transparencia";
+ Text[ italian ] = "Trasparenza";
+ Text[ danish ] = "Transparens";
+ Text[ swedish ] = "Transparens";
+ Text[ polish ] = "PrzezroczystoϾ";
+ Text[ portuguese_brazilian ] = "Transparence";
+ Text[ japanese ] = "“§‰ß«";
+ Text[ korean ] = "Åõ¸í";
+ Text[ chinese_simplified ] = "͸Ã÷";
+ Text[ chinese_traditional ] = "³z©ú";
+ Text[ arabic ] = "ÇáÔÝÇÝíÉ";
+ Text[ turkish ] = "Saydamlýk";
+};
+
+ // RID_SVXPAGE_AREA ------------------------------------------------------
+TabPage RID_SVXPAGE_AREA
+{
+ HelpID = HID_AREA_AREA ;
+ Hide = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fläche : Flõche */
+ /* ### ACHTUNG: Neuer Text in Resource? Fläche : Flõche */
+ Text = "Fläche" ;
+ Text [ English ] = "Object Fill" ;
+ Text [ norwegian ] = "Object Fill" ;
+ Text [ italian ] = "Area" ;
+ Text [ portuguese_brazilian ] = "Preenchimento do Objeto" ;
+ Text [ portuguese ] = "Preenchimento" ;
+ Text [ finnish ] = "Objektin täyte" ;
+ Text [ danish ] = "Flade" ;
+ Text [ french ] = "Remplissage" ;
+ Text [ swedish ] = "Yta" ;
+ Text [ dutch ] = "Vlak" ;
+ Text [ spanish ] = "Relleno" ;
+ Text [ english_us ] = "Area" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ RadioButton RBT_INVISIBLE
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 113 , 10 ) ;
+ Text = "~Unsichtbar" ;
+ Text [ ENGLISH ] = "~Invisible" ;
+ Text [ norwegian ] = "~usynlig" ;
+ Text [ italian ] = "~Invisibile" ;
+ Text [ portuguese_brazilian ] = "~invisível" ;
+ Text [ portuguese ] = "~Invisível" ;
+ Text [ finnish ] = "näky~mätön" ;
+ Text [ danish ] = "Usynlig" ;
+ Text [ french ] = "~Invisible" ;
+ Text [ swedish ] = "Osy~nlig" ;
+ Text [ dutch ] = "~Onzichtbaar" ;
+ Text [ spanish ] = "In~visible" ;
+ Text [ english_us ] = "I~nvisible" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÒþÈëµÄ(~N)";
+ Text[ russian ] = "Íåâèäèìûé";
+ Text[ polish ] = "Niewidoczny";
+ Text[ japanese ] = "”ñ•\\Ž¦(~N)";
+ Text[ chinese_traditional ] = "Áô¤Jªº(~N)";
+ Text[ arabic ] = "ÛíÑ ãÑÆí";
+ Text[ greek ] = "Ìç ïñáôÜ";
+ Text[ korean ] = "º¸ÀÌÁö ¾Ê°Ô(~N)";
+ Text[ turkish ] = "~Gizle";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_COLOR
+ {
+ Pos = MAP_APPFONT ( 12 , 25 ) ;
+ Size = MAP_APPFONT ( 57 , 10 ) ;
+ Text = "Far~be" ;
+ Text [ ENGLISH ] = "C~olor" ;
+ Text [ norwegian ] = "C~olor" ;
+ Text [ italian ] = "C~olore" ;
+ Text [ portuguese_brazilian ] = "C~or" ;
+ Text [ portuguese ] = "C~or" ;
+ Text [ finnish ] = "Vä~ri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "C~ouleur" ;
+ Text [ swedish ] = "~Färg" ;
+ 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 ] = "Ren~k";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_GRADIENT
+ {
+ Pos = MAP_APPFONT ( 12 , 36 ) ;
+ Size = MAP_APPFONT ( 57 , 10 ) ;
+ Text = "Farb~verlauf" ;
+ Text [ ENGLISH ] = "~Gradient" ;
+ Text [ norwegian ] = "~+++Gradient" ;
+ Text [ italian ] = "~Sfumatura" ;
+ Text [ portuguese_brazilian ] = "~Dégradé" ;
+ Text [ portuguese ] = "~Gradação" ;
+ Text [ finnish ] = "~Liukuväri" ;
+ Text [ danish ] = "Farvegraduering" ;
+ Text [ french ] = "Dé~gradé" ;
+ Text [ swedish ] = "Färggradien~t" ;
+ Text [ dutch ] = "K~leurverloop" ;
+ Text [ spanish ] = "~Gradiente" ;
+ Text [ english_us ] = "~Gradient" ;
+ Text[ chinese_simplified ] = "²Êɫͼ°¸(~G)";
+ Text[ russian ] = "Ãðàäèåíòíàÿ";
+ Text[ polish ] = "Gradient";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý(~G)";
+ Text[ chinese_traditional ] = "±m¦â¹Ï®×(~G)";
+ Text[ arabic ] = "ÊÏÑÌ Çááæä";
+ Text[ greek ] = "Äéá~âÜèì. ÷ñþìá";
+ Text[ korean ] = "±×¶óµ¥À̼Ç(~G)";
+ Text[ turkish ] = "Grad~yan";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_HATCHING
+ {
+ Pos = MAP_APPFONT ( 70 , 25 ) ;
+ Size = MAP_APPFONT ( 55 , 10 ) ;
+ Text = "~Schraffur" ;
+ Text [ ENGLISH ] = "H~atching" ;
+ Text [ norwegian ] = "S~kravering" ;
+ Text [ italian ] = "Tratteggio" ;
+ Text [ portuguese_brazilian ] = "T~raço sombreado" ;
+ Text [ portuguese ] = "~Tracejado" ;
+ Text [ finnish ] = "~Viivoitus" ;
+ Text [ danish ] = "Skravering" ;
+ Text [ french ] = "Hachure" ;
+ Text [ swedish ] = "Skraff~ering" ;
+ Text [ dutch ] = "~Arcering" ;
+ Text [ spanish ] = "~Trama" ;
+ Text [ english_us ] = "H~atching" ;
+ Text[ chinese_simplified ] = "ÒõÓ°(~A)";
+ Text[ russian ] = "Øòðèõîâêà";
+ Text[ polish ] = "~Kreskowanie";
+ Text[ japanese ] = "ʯÁݸÞ(~H)";
+ Text[ chinese_traditional ] = "³±¼v(~H)";
+ Text[ arabic ] = "äÞÔ";
+ Text[ greek ] = "Ãñáììï~óêéÜ";
+ Text[ korean ] = "ÇØĪ(~A)";
+ Text[ turkish ] = "~Desen";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_BITMAP
+ {
+ Pos = MAP_APPFONT ( 70 , 36 ) ;
+ Size = MAP_APPFONT ( 55 , 10 ) ;
+ Text = "B~itmap" ;
+ Text [ ENGLISH ] = "~Bitmap" ;
+ Text [ norwegian ] = "~Punktmatrise" ;
+ Text [ italian ] = "~Bitmap" ;
+ Text [ portuguese_brazilian ] = "~Bitmap" ;
+ Text [ portuguese ] = "~Bitmap" ;
+ Text [ finnish ] = "~Bittikartta" ;
+ Text [ danish ] = "Bitmap" ;
+ Text [ french ] = "~Bitmap" ;
+ Text [ swedish ] = "B~itmap" ;
+ Text [ dutch ] = "~Bitmap" ;
+ Text [ spanish ] = "Bit~map" ;
+ Text [ english_us ] = "~Bitmap" ;
+ Text[ chinese_simplified ] = "λͼ(~B)";
+ Text[ russian ] = "Bitmap";
+ Text[ polish ] = "Mapa bitowa";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß(~B)";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï(~B)";
+ Text[ arabic ] = "ÕæÑÉ äÞØíÉ";
+ Text[ greek ] = "~Bitmap";
+ Text[ korean ] = "ºñÆ®¸Ê(~B)";
+ Text[ turkish ] = "B~it eþlem";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_COLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 50 ) ;
+ // 54
+ Size = MAP_APPFONT ( 108 , 73 ) ;
+ // 69
+ TabStop = TRUE ;
+ };
+ ListBox LB_GRADIENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 50 ) ;
+ // 54
+ Size = MAP_APPFONT ( 108 , 73 ) ;
+ // 69
+ TabStop = TRUE ;
+ };
+ ListBox LB_HATCHING
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 50 ) ;
+ // 54
+ Size = MAP_APPFONT ( 108 , 73 ) ;
+ // 69
+ TabStop = TRUE ;
+ };
+ ListBox LB_BITMAP
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 50 ) ;
+ // 54
+ Size = MAP_APPFONT ( 108 , 80 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ Control CTL_BITMAP_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 66 ) ;
+ Size = MAP_APPFONT ( 108 , 57 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+ };
+ GroupBox GRP_FILL
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 120 , 126 ) ;
+ Text = "Tabelle" ;
+ Text [ ENGLISH ] = "List" ;
+ Text [ dutch ] = "Tabel" ;
+ Text [ english_us ] = "Table" ;
+ Text [ italian ] = "Tabella" ;
+ Text [ spanish ] = "Tabla" ;
+ Text [ french ] = "Table" ;
+ Text [ swedish ] = "Tabell" ;
+ Text [ danish ] = "Tabel" ;
+ Text [ portuguese_brazilian ] = "Tabelle" ;
+ Text [ portuguese ] = "Tabela" ;
+ Text[ chinese_simplified ] = "±í¸ñ";
+ Text[ russian ] = "Òàáëèöà";
+ Text[ polish ] = "Tabela";
+ Text[ japanese ] = "•\\";
+ Text[ chinese_traditional ] = "ªí®æ";
+ Text[ arabic ] = "ÇáÞÇÆãÉ";
+ Text[ greek ] = "Ðßíáêáò";
+ Text[ korean ] = "Å×À̺í";
+ Text[ turkish ] = "Tablo";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_STEPCOUNT
+ {
+ Pos = MAP_APPFONT ( 138 , 15 ) ;
+ Size = MAP_APPFONT ( 59 , 10 ) ;
+ Text = "~automatisch" ;
+ Text [ ENGLISH ] = "~automatic" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "A~utomatic" ;
+ Text [ italian ] = "~automatico" ;
+ Text [ spanish ] = "~automático" ;
+ Text [ french ] = "~automatique" ;
+ Text [ dutch ] = "~automatisch" ;
+ Text [ swedish ] = "~automatisk" ;
+ Text [ danish ] = "automatisk" ;
+ Text [ portuguese ] = "~Automaticamente" ;
+ Text [ portuguese_brazilian ] = "~automatisch" ;
+ Text[ chinese_simplified ] = "×Ô¶¯(~U)";
+ Text[ russian ] = "Àâòîìàòè÷åñêè";
+ Text[ polish ] = "Automatycznie";
+ Text[ japanese ] = "Ž©“®“I(~A)";
+ Text[ chinese_traditional ] = "¦Û°Ê(~A)";
+ Text[ arabic ] = "ÊáÞÇÆí";
+ Text[ greek ] = "~Áõôüìáôá";
+ Text[ korean ] = "ÀÚµ¿(~U)";
+ Text[ turkish ] = "~otomatik";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NUM_FLD_STEPCOUNT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 198 , 14 ) ;
+ // 138, 31
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 3 ;
+ First = 3 ;
+ Maximum = 256 ;
+ Last = 256 ;
+ StrictFormat = TRUE ;
+ };
+ GroupBox GRP_STEPCOUNT
+ {
+ Pos = MAP_APPFONT ( 132 , 3 ) ;
+ Size = MAP_APPFONT ( 122 , 29 ) ;
+ // 85
+ Text = "Schrittweite" ;
+ Text [ ENGLISH ] = "Step count" ;
+ Text [ dutch ] = "Stapgrootte" ;
+ Text [ english_us ] = "Increments" ;
+ Text [ italian ] = "Incremento" ;
+ Text [ spanish ] = "Incremento" ;
+ Text [ french ] = "Pas de progression" ;
+ Text [ swedish ] = "Steglängd" ;
+ Text [ danish ] = "Trinvidde" ;
+ Text [ portuguese_brazilian ] = "Schrittweite" ;
+ Text [ portuguese ] = "Incremento" ;
+ Text[ chinese_simplified ] = "½¥½ø";
+ Text[ russian ] = "Øèðèíà øàãà";
+ Text[ polish ] = "Inkrement";
+ Text[ japanese ] = "½Ã¯Ìß”";
+ Text[ chinese_traditional ] = "º¥¶i";
+ Text[ arabic ] = "ÇáÊÒÇíÏ";
+ Text[ greek ] = "ÂÞìá";
+ Text[ korean ] = "Áõ°¡ºÐ";
+ Text[ turkish ] = "Adým";
+ Text[ language_user1 ] = " ";
+ };
+
+ /* NEU */
+ CheckBox CB_HATCHBCKGRD
+ {
+ Pos = MAP_APPFONT ( 137 , 16 ) ;
+ Size = MAP_APPFONT ( 65 , 10 ) ;
+ TabStop = TRUE ;
+ Text = "Hintergrund~farbe" ;
+ Text [ ENGLISH ] = "~Backgroundcolor" ;
+ Text [ english_us ] = "~Background color" ;
+ Text[ portuguese ] = "~Cor de fundo";
+ Text[ russian ] = "Öâåò ôîíà";
+ Text[ greek ] = "×ñþìáôá öüíôïõ";
+ Text[ dutch ] = "~Achtergrondkleur";
+ Text[ french ] = "~Couleur d'arrière plan";
+ Text[ spanish ] = "Color de ~fondo";
+ Text[ italian ] = "Colore di s~fondo";
+ Text[ danish ] = "Baggrundsfarve";
+ Text[ swedish ] = "Bakgrundsfärg";
+ Text[ polish ] = "Kolor t³a";
+ Text[ portuguese_brazilian ] = "~Backgroundcolor";
+ Text[ japanese ] = "”wŒiF(~B)";
+ Text[ korean ] = "¹è°æ»ö(~B)";
+ Text[ chinese_simplified ] = "±³¾°ÑÕÉ«(~B)";
+ Text[ chinese_traditional ] = "­I´ºÃC¦â(~B)";
+ Text[ arabic ] = "áæä ÇáÎáÝíÉ";
+ Text[ turkish ] = "Artalan ~rengi";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_HATCHBCKGRDCOLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 202 , 14 ) ;
+ Size = MAP_APPFONT ( 48 , 65 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ GroupBox GRP_HATCHBCKGRD
+ {
+ Pos = MAP_APPFONT ( 132 , 3 ) ;
+ Size = MAP_APPFONT ( 122 , 29 ) ;
+ // 85
+ Text = "Schraffur Hintergrund" ;
+ Text [ ENGLISH ] = "Hatch Background" ;
+ Text [ english_us ] = "Hatching background" ;
+ Text[ portuguese ] = "Fundo tracejado";
+ Text[ russian ] = "Øòðèõîâêà ôîíà";
+ Text[ greek ] = "Öüíôï ãñáììïóêéÜò";
+ Text[ dutch ] = "Arcering achtergrond";
+ Text[ french ] = "Arrière-plan hachuré";
+ Text[ spanish ] = "Trama de fondo";
+ Text[ italian ] = "Sfondo tratteggio";
+ Text[ danish ] = "Skravering baggrund";
+ Text[ swedish ] = "Skraffering bakgrund";
+ Text[ polish ] = "Kreskowanie t³a";
+ Text[ portuguese_brazilian ] = "Hatch Background";
+ Text[ japanese ] = "ʯÁݸނ̔wŒi";
+ Text[ korean ] = "¹è°æ ÇØĪ";
+ Text[ chinese_simplified ] = "ÒõÓ°±³¾°";
+ Text[ chinese_traditional ] = "³±¼v½u±ø­I´º";
+ Text[ arabic ] = "ÎáÝíÉ ãä ÇáäÞæÔ";
+ Text[ turkish ] = "Artalan deseni";
+ };
+ /* ENDE NEU */
+
+ TriStateBox TSB_TILE
+ {
+ Pos = MAP_APPFONT ( 132 , 6 ) ;
+ Size = MAP_APPFONT ( 76 , 10 ) ;
+ Text = "~Kacheln" ;
+ Text [ ENGLISH ] = "~Tile" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Tile" ;
+ Text [ italian ] = "Affianca" ;
+ Text [ spanish ] = "A~zulejar" ;
+ Text [ french ] = "Ca~rrelage" ;
+ Text [ dutch ] = "~Tegelen" ;
+ Text [ swedish ] = "Sid~a vid sida" ;
+ Text [ danish ] = "Side om side" ;
+ Text [ portuguese ] = "~Em mosaico" ;
+ Text [ portuguese_brazilian ] = "~Kacheln" ;
+ Text[ chinese_simplified ] = "ƽÆÌ(~T)";
+ Text[ russian ] = "Ïëèòêè";
+ Text[ polish ] = "P³yt~ki";
+ Text[ japanese ] = "À²Ù(~T)";
+ Text[ chinese_traditional ] = "¥­¾Q(~T)";
+ Text[ arabic ] = "ÈáÇØ";
+ Text[ greek ] = "Óå ðáñÜèåóç";
+ Text[ korean ] = "¹ÙµÏÆÇ(~T)";
+ Text[ turkish ] = "~Döþe";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_STRETCH
+ {
+ Pos = MAP_APPFONT ( 209 , 6 ) ;
+ //Pos = MAP_APPFONT( 132, 34 );
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ Text = "A~npassen" ;
+ Text [ ENGLISH ] = "~Stretch" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "Aan~passen" ;
+ Text [ english_us ] = "Auto~Fit" ;
+ Text [ italian ] = "Adatta" ;
+ Text [ spanish ] = "Aju~star" ;
+ Text [ french ] = "A~dapter" ;
+ Text [ swedish ] = "A~npassa" ;
+ Text [ danish ] = "Tilpas" ;
+ Text [ portuguese ] = "~Ajustar" ;
+ Text [ portuguese_brazilian ] = "An~passen" ;
+ Text[ chinese_simplified ] = "µ÷Õû(~F)";
+ Text[ russian ] = "Àâòîïîäáîð";
+ Text[ polish ] = "Dopas~uj";
+ Text[ japanese ] = "“K‡(~F)";
+ Text[ chinese_traditional ] = "½Õ¾ã(~F)";
+ Text[ arabic ] = "ãáÇÁãÉ";
+ Text[ greek ] = "ÐñïóáñìïãÞ";
+ Text[ korean ] = "ÀÚµ¿ ¸ÂÃã(~F)";
+ Text[ turkish ] = "~Boyuta uydur";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_SCALE
+ {
+ Pos = MAP_APPFONT ( 138 , 33 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Rel~ativ" ;
+ Text [ ENGLISH ] = "Rel~ative" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "Rel~atief" ;
+ Text [ english_us ] = "Re~lative" ;
+ Text [ italian ] = "Rel~ativo" ;
+ Text [ spanish ] = "Rel~ativo" ;
+ Text [ french ] = "Rel~atif" ;
+ Text [ swedish ] = "Rel~ativ" ;
+ Text [ danish ] = "Relativ" ;
+ Text [ portuguese ] = "Rel~ativo" ;
+ Text [ portuguese_brazilian ] = "Rel~ativ" ;
+ Text[ chinese_simplified ] = "Ïà¶Ô(~L)";
+ Text[ russian ] = "Îòíîñèòåëüíî";
+ Text[ polish ] = "Wzglê~dny";
+ Text[ japanese ] = "‘Š‘Î(~A)";
+ Text[ chinese_traditional ] = "¬Û¹ï(~A)";
+ Text[ arabic ] = "äÓÈí";
+ Text[ greek ] = "Ó÷åôéêÜ";
+ Text[ korean ] = "»ó´ëÀû(~L)";
+ Text[ turkish ] = "Göre~celi";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_ORIGINAL
+ {
+ Pos = MAP_APPFONT ( 138 , 44 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "~Original" ;
+ Text [ ENGLISH ] = "Or~iginal" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "~Origineel" ;
+ Text [ english_us ] = "~Original" ;
+ Text [ italian ] = "~Originale" ;
+ Text [ spanish ] = "Ori~ginal" ;
+ Text [ french ] = "~Original" ;
+ Text [ swedish ] = "~Original" ;
+ Text [ danish ] = "Original" ;
+ Text [ portuguese ] = "~Original" ;
+ Text [ portuguese_brazilian ] = "~Original" ;
+ Text[ chinese_simplified ] = "Ô­¼þ(~O)";
+ Text[ russian ] = "Îðèãèíàë";
+ Text[ polish ] = "Orygin~a³";
+ Text[ japanese ] = "µØ¼ÞÅÙ(~O)";
+ Text[ chinese_traditional ] = "­ì¥ó(~O)";
+ Text[ arabic ] = "ÇáÃÕá";
+ Text[ greek ] = "Áñ÷éêü";
+ Text[ korean ] = "¿ø¹®(~O)";
+ Text[ turkish ] = "~Asýl";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_X_SIZE
+ {
+ Pos = MAP_APPFONT ( 184 , 30 ) ;
+ Size = MAP_APPFONT ( 24 , 10 ) ;
+ Text = "B~reite" ;
+ Text [ ENGLISH ] = "~Width" ;
+ Text [ english_us ] = "Wi~dth" ;
+ Text [ italian ] = "Largh." ;
+ Text [ spanish ] = "A~ncho" ;
+ Text [ french ] = "L~argeur" ;
+ Text [ dutch ] = "B~reedte" ;
+ Text [ swedish ] = "B~redd" ;
+ Text [ danish ] = "Bredde" ;
+ Text [ portuguese_brazilian ] = "B~reite" ;
+ Text [ portuguese ] = "~Largura" ;
+ Text[ chinese_simplified ] = "¿í¶È(~D)";
+ Text[ russian ] = "Øèðèíà";
+ Text[ polish ] = "Szer.";
+ Text[ japanese ] = "•(~D)";
+ Text[ chinese_traditional ] = "¼e«×(~D)";
+ Text[ arabic ] = "ÇáÚÑÖ";
+ Text[ greek ] = "ÐëÜôïò";
+ Text[ korean ] = "³Êºñ(~D)";
+ Text[ turkish ] = "~Geniþlik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_X_SIZE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 209 , 28 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ CustomUnitText = " %" ;
+ Minimum = 5 ;
+ Maximum = 100 ;
+ First = 5 ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ FixedText FT_Y_SIZE
+ {
+ Pos = MAP_APPFONT ( 184 , 45 ) ;
+ Size = MAP_APPFONT ( 24 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~öhe : H~÷he */
+ /* ### ACHTUNG: Neuer Text in Resource? H~öhe : H~÷he */
+ Text = "H~öhe" ;
+ Text [ ENGLISH ] = "H~eight" ;
+ Text [ english_us ] = "H~eight" ;
+ Text [ italian ] = "Altezza" ;
+ Text [ spanish ] = "A~ltura" ;
+ Text [ french ] = "H~auteur" ;
+ Text [ dutch ] = "H~oogte" ;
+ Text [ swedish ] = "H~öjd" ;
+ Text [ danish ] = "Højde" ;
+ Text [ portuguese_brazilian ] = "H~öhe" ;
+ Text [ portuguese ] = "~Altura" ;
+ 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";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_Y_SIZE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 209 , 43 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ CustomUnitText = " %" ;
+ Minimum = 5 ;
+ Maximum = 100 ;
+ First = 5 ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ SpinSize = 5 ;
+ };
+ GroupBox GRP_SIZE
+ {
+ Pos = MAP_APPFONT ( 132 , 18 ) ;
+ Size = MAP_APPFONT ( 122 , 42 ) ;
+ //Pos = MAP_APPFONT( 176, 3 );
+ //Size = MAP_APPFONT( 78, 43 );
+ /* ### ACHTUNG: Neuer Text in Resource? Größe : Gr÷˜e */
+ /* ### ACHTUNG: Neuer Text in Resource? Größe : Gr÷˜e */
+ Text = "Größe" ;
+ Text [ ENGLISH ] = "Size" ;
+ Text [ english_us ] = "Size" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ spanish ] = "Tamaño" ;
+ Text [ french ] = "Taille" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ danish ] = "Størrelse" ;
+ Text [ portuguese_brazilian ] = "Größe" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text[ chinese_simplified ] = "´óС";
+ Text[ russian ] = "Ðàçìåð";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "»²½Þ";
+ Text[ chinese_traditional ] = "¤j¤p";
+ Text[ arabic ] = "ÇáÍÌã";
+ Text[ greek ] = "ÌÝãåèïò";
+ Text[ korean ] = "Å©±â";
+ Text[ turkish ] = "Boyutlar";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_POSITION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 137 , 71 ) ;
+ Size = MAP_APPFONT ( 37 , 27 ) ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_X_OFFSET
+ {
+ Pos = MAP_APPFONT ( 179 , 73 ) ;
+ Size = MAP_APPFONT ( 29 , 10 ) ;
+ Text = "~X-Offset" ;
+ Text [ ENGLISH ] = "~X offset" ;
+ Text [ english_us ] = "~X Offset" ;
+ Text [ italian ] = "Spost. ~X" ;
+ Text [ spanish ] = "Offset ~X" ;
+ Text [ french ] = "Offset ~X" ;
+ Text [ dutch ] = "~X-offset" ;
+ Text [ swedish ] = "~X-offset" ;
+ Text [ danish ] = "X-offset" ;
+ Text [ portuguese_brazilian ] = "~X-Offset" ;
+ Text [ portuguese ] = "Offset ~X" ;
+ Text[ chinese_simplified ] = "XÏòÆ«ÒÆ(~X)";
+ Text[ russian ] = "Ñäâèã îñè X";
+ Text[ polish ] = "Ofset X";
+ Text[ japanese ] = "µÌ¾¯Ä X";
+ Text[ chinese_traditional ] = "~X °¾²¾";
+ Text[ arabic ] = "ÇáÅÒÇÍÉ Ó";
+ Text[ greek ] = "ÊáôÜ ~X";
+ Text[ korean ] = "¿ÀÇÁ¼Â X(~X)";
+ Text[ turkish ] = "~X kaydýr";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_Y_OFFSET
+ {
+ Pos = MAP_APPFONT ( 179 , 88 ) ;
+ Size = MAP_APPFONT ( 29 , 10 ) ;
+ Text = "~Y-Offset" ;
+ Text [ ENGLISH ] = "~Y offset" ;
+ Text [ english_us ] = "~Y Offset" ;
+ Text [ italian ] = "Spost. ~Y" ;
+ Text [ spanish ] = "Offset ~Y" ;
+ Text [ french ] = "Offset ~Y" ;
+ Text [ dutch ] = "~Y-offset" ;
+ Text [ swedish ] = "~Y-offset" ;
+ Text [ danish ] = "Y-offset" ;
+ Text [ portuguese_brazilian ] = "~Y-Offset" ;
+ Text [ portuguese ] = "Offset ~Y" ;
+ Text[ chinese_simplified ] = "YÏòÆ«ÒÆ(~Y)";
+ Text[ russian ] = "Ñäâèã îñè Y";
+ Text[ polish ] = "Ofset Y";
+ Text[ japanese ] = "µÌ¾¯Ä Y";
+ Text[ chinese_traditional ] = "~Y °¾²¾";
+ Text[ arabic ] = "ÇáÅÒÇÍÉ Õ";
+ Text[ greek ] = "ÊáôÜ ~Õ";
+ Text[ korean ] = "¿ÀÇÁ¼Â Y(~Y)";
+ Text[ turkish ] = "~Y kaydýr";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_X_OFFSET
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 209 , 71 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ Maximum = 100 ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ MetricField MTR_FLD_Y_OFFSET
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 209 , 86 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ GroupBox GRP_POSITION
+ {
+ Pos = MAP_APPFONT ( 132 , 61 ) ;
+ Size = MAP_APPFONT ( 122 , 42 ) ;
+ Text = "Position" ;
+ Text [ English ] = "Position" ;
+ Text [ english_us ] = "Position" ;
+ Text [ italian ] = "Posizione" ;
+ Text [ spanish ] = "Posición" ;
+ Text [ french ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ swedish ] = "Position" ;
+ Text [ danish ] = "Placering" ;
+ Text [ portuguese_brazilian ] = "Position" ;
+ Text [ portuguese ] = "Posição" ;
+ 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 ] = " ";
+ };
+ MetricField MTR_FLD_OFFSET
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 209 , 113 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ RadioButton RBT_ROW
+ {
+ Pos = MAP_APPFONT ( 137 , 115 ) ;
+ Size = MAP_APPFONT ( 32 , 10 ) ;
+ Text = "Z~eile" ;
+ Text [ English ] = "R~ow" ;
+ Text [ english_us ] = "Ro~w" ;
+ Text [ italian ] = "Riga" ;
+ Text [ spanish ] = "~Fila" ;
+ Text [ french ] = "~Ligne" ;
+ Text [ dutch ] = "R~ij" ;
+ Text [ swedish ] = "~Rad" ;
+ Text [ danish ] = "Række" ;
+ Text [ portuguese_brazilian ] = "~Zeile" ;
+ Text [ portuguese ] = "~Linha" ;
+ Text[ chinese_simplified ] = "ÐÐ(~W)";
+ Text[ russian ] = "Ñòðîêà";
+ Text[ polish ] = "Wiersz";
+ Text[ japanese ] = "s(~W)";
+ Text[ chinese_traditional ] = "Äæ(~W)";
+ Text[ arabic ] = "ÕÝ";
+ Text[ greek ] = "ÃñáììÞ";
+ Text[ korean ] = "Çà(~W)";
+ Text[ turkish ] = "Sa~týr";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_COLUMN
+ {
+ Pos = MAP_APPFONT ( 170 , 115 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "S~palte" ;
+ Text [ English ] = "~Column" ;
+ Text [ english_us ] = "Colu~mn" ;
+ Text [ italian ] = "Colonna" ;
+ Text [ spanish ] = "~Columna" ;
+ Text [ french ] = "C~olonne" ;
+ Text [ dutch ] = "K~olom" ;
+ Text [ swedish ] = "~Kolumn" ;
+ Text [ danish ] = "Kolonne" ;
+ Text [ portuguese_brazilian ] = "S~palte" ;
+ Text [ portuguese ] = "~Coluna" ;
+ Text[ chinese_simplified ] = "ÁÐ(~M)";
+ Text[ russian ] = "Ñòîëáåö";
+ Text[ polish ] = "Kol~umna";
+ Text[ japanese ] = "—ñ(~M)";
+ Text[ chinese_traditional ] = "Äæ(~M)";
+ Text[ arabic ] = "ÚãæÏ";
+ Text[ greek ] = "ÓôÞëç";
+ Text[ korean ] = "¿­(~M)";
+ Text[ turkish ] = "S~ütun";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_OFFSET
+ {
+ Pos = MAP_APPFONT ( 132 , 104 ) ;
+ Size = MAP_APPFONT ( 122 , 25 ) ;
+ Text = "Verschiebung" ;
+ Text [ English ] = "Offset" ;
+ Text [ english_us ] = "Offset" ;
+ Text [ italian ] = "Spostamento" ;
+ Text [ spanish ] = "Desplazamiento" ;
+ Text [ french ] = "Décalage" ;
+ Text [ dutch ] = "Verplaatsing" ;
+ Text [ swedish ] = "Förskjutning" ;
+ Text [ danish ] = "Forskydning" ;
+ Text [ portuguese_brazilian ] = "Verschiebung" ;
+ Text [ portuguese ] = "Deslocar" ;
+ Text[ chinese_simplified ] = "Æ«ÒÆ";
+ Text[ russian ] = "Ñìåùåíèå";
+ Text[ polish ] = "Przeniesienie";
+ Text[ japanese ] = "ˆÚ“®";
+ Text[ chinese_traditional ] = "²¾°Ê";
+ Text[ arabic ] = "ÇáÅÒÇÍÉ";
+ Text[ greek ] = "Ìåôáôüðéóç";
+ Text[ korean ] = "º¯À§";
+ Text[ turkish ] = "Kaydýrma";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_COLOR_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 137 , 45 ) ;
+ // 98
+ Size = MAP_APPFONT ( 112 , 79 ) ;
+ // 26
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 132 , 35 ) ;
+ // 88
+ Size = MAP_APPFONT ( 122 , 94 ) ;
+ // 41
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ÇáãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ƽÃæ";
+ Text[ russian ] = "Çàëèâêà";
+ Text[ polish ] = "Obszar";
+ Text[ japanese ] = "•\\–Ê";
+ Text[ chinese_traditional ] = "¥­­±";
+ Text[ arabic ] = "ÇáãÓÇÍÉ";
+ Text[ greek ] = "ÅðéöÜíåéá";
+ Text[ korean ] = "°³Ã¼ ä¿ì±â";
+ Text[ turkish ] = "Yüzey";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_SHADOW ------------------------------------------------------
+TabPage RID_SVXPAGE_SHADOW
+{
+ HelpID = HID_AREA_SHADOW ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Schatten" ;
+ Text [ English ] = "Shadow" ;
+ Text [ english_us ] = "Shadow" ;
+ Text [ italian ] = "Ombre" ;
+ Text [ spanish ] = "Sombra" ;
+ Text [ french ] = "Ombre" ;
+ Text [ dutch ] = "Schaduw" ;
+ Text [ swedish ] = "Skugga" ;
+ Text [ danish ] = "Skygger" ;
+ Text [ portuguese_brazilian ] = "Schatten" ;
+ Text [ portuguese ] = "Sombras" ;
+ TriStateBox TSB_SHOW_SHADOW
+ {
+ Pos = MAP_APPFONT ( 12 , 15 ) ;
+ Size = MAP_APPFONT ( 110 , 10 ) ;
+ Text = "~anzeigen" ;
+ Text [ ENGLISH ] = "~show" ;
+ Text [ norwegian ] = "~vis" ;
+ Text [ italian ] = "~Mostra" ;
+ Text [ portuguese_brazilian ] = "~mostrar" ;
+ Text [ portuguese ] = "~Mostrar" ;
+ Text [ finnish ] = "näky~vä" ;
+ Text [ danish ] = "vis" ;
+ Text [ french ] = "~Afficher" ;
+ Text [ swedish ] = "~Visa" ;
+ Text [ dutch ] = "~weergeven" ;
+ Text [ spanish ] = "~Mostrar" ;
+ Text [ english_us ] = "~On" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÏÔʾ(~O)";
+ Text[ russian ] = "ïîêàçàòü";
+ Text[ polish ] = "Poka~¿";
+ Text[ japanese ] = "•\\Ž¦(~O)";
+ Text[ chinese_traditional ] = "Åã¥Ü(~O)";
+ Text[ arabic ] = "ÅÙåÇÑ";
+ Text[ greek ] = "åìöÜíéóç";
+ Text[ korean ] = "Ç¥½Ã(~O)";
+ Text[ turkish ] = "~görüntüle";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_POSITION
+ {
+ Pos = MAP_APPFONT ( 12 , 37 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Position" ;
+ Text [ ENGLISH ] = "Position" ;
+ Text [ norwegian ] = "Posisjon" ;
+ Text [ italian ] = "~Posizione" ;
+ Text [ portuguese_brazilian ] = "~Posição" ;
+ Text [ portuguese ] = "~Posição" ;
+ Text [ finnish ] = "Asema" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "~Position" ;
+ Text [ swedish ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posición" ;
+ Text [ english_us ] = "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 ] = " ";
+ };
+ Control CTL_POSITION
+ {
+ HelpId = HID_TPSHADOW_CTRL ;
+ Pos = MAP_APPFONT ( 65 , 35 ) ;
+ Size = MAP_APPFONT ( 57 , 29 ) ;
+ Border = TRUE ;
+ TabStop = FALSE ;
+ };
+ FixedText FT_DISTANCE
+ {
+ Pos = MAP_APPFONT ( 12 , 69 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Entfernung" ;
+ Text [ ENGLISH ] = "~Distance" ;
+ Text [ norwegian ] = "~Avstand" ;
+ Text [ italian ] = "~Distanza" ;
+ Text [ portuguese_brazilian ] = "~Distância" ;
+ Text [ portuguese ] = "~Distância" ;
+ Text [ finnish ] = "~Etäisyys" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ french ] = "~Distance" ;
+ Text [ swedish ] = "~Avstånd" ;
+ Text [ dutch ] = "~Afstand" ;
+ Text [ spanish ] = "~Distancia" ;
+ Text [ english_us ] = "~Distance" ;
+ Text[ chinese_simplified ] = "¼ä¸ô(~D)";
+ Text[ russian ] = "Ðàññòîÿíèå";
+ Text[ polish ] = "Odleg³oœæ";
+ Text[ japanese ] = "ŠÔŠu(~D)";
+ Text[ chinese_traditional ] = "¶¡¹j(~D)";
+ Text[ arabic ] = "ÇáÈÚÏ";
+ Text[ greek ] = "Áðüóôáóç";
+ Text[ korean ] = "°Å¸®(~D)";
+ Text[ turkish ] = "~Uzaklýk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_DISTANCE
+ {
+ //Pos = MAP_APPFONT( 12, 41 );
+ //Size = MAP_APPFONT( 45, 12 );
+ Pos = MAP_APPFONT ( 65 , 67 ) ;
+ Size = MAP_APPFONT ( 57 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99999 ;
+ Minimum = 50 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ Last = 99999 ;
+ /*SpinSize = 100 ; */
+ SpinSize = 1 ;
+ };
+ ListBox LB_SHADOW_COLOR
+ {
+ Pos = MAP_APPFONT ( 65 , 90 ) ;
+ Size = MAP_APPFONT ( 57 , 100 ) ;
+ //Pos = MAP_APPFONT( 171, 57 );
+ //Size = MAP_APPFONT( 77, 100 );
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_SHADOW_COLOR
+ {
+ Pos = MAP_APPFONT ( 12 , 92 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Farbe" ;
+ Text [ ENGLISH ] = "~Color" ;
+ Text [ norwegian ] = "~Color" ;
+ Text [ italian ] = "~Colore" ;
+ Text [ portuguese_brazilian ] = "~Cor" ;
+ Text [ portuguese ] = "~Cor" ;
+ Text [ finnish ] = "~Väri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "~Couleur" ;
+ Text [ swedish ] = "~Färg" ;
+ Text [ dutch ] = "~Kleur" ;
+ Text [ spanish ] = "Co~lor" ;
+ 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 ] = " ";
+ };
+ FixedText FT_TRANSPARENT
+ {
+ Pos = MAP_APPFONT ( 12 , 108 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Transparenz" ;
+ Text [ ENGLISH ] = "~Transparence" ;
+ Text [ english_us ] = "~Transparency" ;
+ Text [ italian ] = "~Trasparenza" ;
+ Text [ spanish ] = "Tran~sparencia" ;
+ Text [ french ] = "~Transparence" ;
+ Text [ dutch ] = "~Transparantie" ;
+ Text [ swedish ] = "~Transparens" ;
+ Text [ danish ] = "Transparens" ;
+ Text [ portuguese_brazilian ] = "~Transparenz" ;
+ Text [ portuguese ] = "~Transparência" ;
+ Text[ chinese_simplified ] = "͸Ã÷(~T)";
+ Text[ russian ] = "Ïðîçðà÷íîñòü";
+ Text[ polish ] = "PrzeŸroczystoœæ";
+ Text[ japanese ] = "“§–¾(~T)";
+ Text[ chinese_traditional ] = "³z©ú(~T)";
+ Text[ arabic ] = "ÔÝÇÝíÉ";
+ Text[ greek ] = "ÄéáöÜíåéá";
+ Text[ korean ] = "Åõ¸í(~T)";
+ Text[ turkish ] = "~Saydamlýk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_SHADOW_TRANSPARENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 65 , 106 ) ;
+ Size = MAP_APPFONT ( 57 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ GroupBox GRP_SHADOW
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 122 , 126 ) ;
+ //Pos = MAP_APPFONT( 132, 3 );
+ //Size = MAP_APPFONT( 122, 72 );
+ Text = "Schatten" ;
+ Text [ ENGLISH ] = "Shadow" ;
+ Text [ norwegian ] = "Shadow" ;
+ Text [ italian ] = "Ombreggiatura" ;
+ Text [ portuguese_brazilian ] = "Sombra" ;
+ Text [ portuguese ] = "Sombrear" ;
+ Text [ finnish ] = "Varjo" ;
+ Text [ danish ] = "Skygger" ;
+ Text [ french ] = "Ombre" ;
+ Text [ swedish ] = "Skugga" ;
+ Text [ dutch ] = "Schaduw" ;
+ Text [ spanish ] = "Sombra" ;
+ Text [ english_us ] = "Shadowing" ;
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ russian ] = "Òåíü";
+ Text[ polish ] = "Cieñ";
+ Text[ japanese ] = "‰e";
+ Text[ chinese_traditional ] = "³±¼v";
+ Text[ arabic ] = "􇂇";
+ Text[ greek ] = "ÓêéÜ";
+ Text[ korean ] = "À½¿µ";
+ Text[ turkish ] = "Gölge";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_COLOR_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 140 , 14 ) ;
+ Size = MAP_APPFONT ( 108 , 109 ) ;
+ //Pos = MAP_APPFONT( 137, 92 );
+ //Size = MAP_APPFONT( 111, 30 );
+ TabStop = FALSE ;
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 134 , 2 ) ;
+ Size = MAP_APPFONT ( 120 , 127 ) ;
+ //Pos = MAP_APPFONT( 132, 81 );
+ //Size = MAP_APPFONT( 122, 48 );
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ÇáãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ russian ] = "Òåíü";
+ Text[ polish ] = "Cieñ";
+ Text[ japanese ] = "‰e";
+ Text[ chinese_traditional ] = "³±¼v";
+ Text[ arabic ] = "􇂇";
+ Text[ greek ] = "ÓêéÜ";
+ Text[ korean ] = "À½¿µ";
+ Text[ turkish ] = "Gölge";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_HATCH --------------------------------------------------------
+TabPage RID_SVXPAGE_HATCH
+{
+ HelpID = HID_AREA_HATCH ;
+ Hide = TRUE ;
+ Text = "Schraffuren" ;
+ Text [ English ] = "Hatches" ;
+ Text [ norwegian ] = "Skravering" ;
+ Text [ italian ] = "Tratteggi" ;
+ Text [ portuguese_brazilian ] = "Traços de sombreado" ;
+ Text [ portuguese ] = "Tracejados" ;
+ Text [ finnish ] = "Viivoitukset" ;
+ Text [ danish ] = "Skraveringer" ;
+ Text [ french ] = "Hachures" ;
+ Text [ swedish ] = "Skrafferingar" ;
+ Text [ dutch ] = "Arceringen" ;
+ Text [ spanish ] = "Tramas" ;
+ Text [ english_us ] = "Hatching" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_LINE_TYPE
+ {
+ Pos = MAP_APPFONT ( 12 , 97 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "Li~nientyp" ;
+ Text [ ENGLISH ] = "~Line Type" ;
+ Text [ norwegian ] = "~Linje Type" ;
+ Text [ italian ] = "Tipo di ~linea" ;
+ Text [ portuguese_brazilian ] = "~Tipo de Linha" ;
+ Text [ portuguese ] = "~Tipo de linha" ;
+ Text [ finnish ] = "~Viivan laji" ;
+ Text [ danish ] = "Stregtype" ;
+ Text [ french ] = "~Type de ligne" ;
+ Text [ swedish ] = "Li~njetyp" ;
+ Text [ dutch ] = "~Lijntype" ;
+ Text [ spanish ] = "Tipo de ~línea" ;
+ Text [ english_us ] = "~Line type" ;
+ Text[ chinese_simplified ] = "ÏßÌõÀàÐÍ(~L)";
+ Text[ russian ] = "Òèï ëèíèè";
+ Text[ polish ] = "Typ linii";
+ Text[ japanese ] = "ü‚ÌŽí—Þ(~L)";
+ Text[ chinese_traditional ] = "½u±øÃþ«¬(~L)";
+ Text[ arabic ] = "äæÚ ÇáÎØ";
+ Text[ greek ] = "Ôýðïò ãñáììÞò";
+ Text[ korean ] = "¼± À¯Çü(~L)";
+ Text[ turkish ] = "Çiz~gi tipi";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 137 , 91 ) ;
+ Size = MAP_APPFONT ( 89 , 32 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton BTN_ADD
+ {
+ Pos = MAP_APPFONT ( 197 , 14 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufügen... : H~inzuf³gen... */
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufügen... : H~inzuf³gen... */
+ Text = "H~inzufügen..." ;
+ Text [ ENGLISH ] = "~Add..." ;
+ Text [ norwegian ] = "~Add..." ;
+ Text [ italian ] = "Aggiungi..." ;
+ Text [ portuguese_brazilian ] = "~Add..." ;
+ Text [ portuguese ] = "~Adicionar..." ;
+ Text [ finnish ] = "~Lisää..." ;
+ Text [ danish ] = "Tilføj..." ;
+ Text [ french ] = "~Ajouter..." ;
+ Text [ swedish ] = "Lägg t~ill..." ;
+ Text [ dutch ] = "~Toevoegen..." ;
+ Text [ spanish ] = "A~ñadir..." ;
+ Text [ english_us ] = "~Add..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)...";
+ Text[ russian ] = "Äîáàâèòü...";
+ Text[ polish ] = "Dodaj...";
+ Text[ japanese ] = "’ljÁ..(~A)...";
+ Text[ chinese_traditional ] = "¼W¥[(~A)...";
+ Text[ arabic ] = "...ÅÖÇÝÉ";
+ Text[ greek ] = "ÐñïóèÞêç...";
+ Text[ korean ] = "Ãß°¡(~A)...";
+ Text[ turkish ] = "E~kle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_MODIFY
+ {
+ Pos = MAP_APPFONT ( 197 , 30 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Ändern... : ~Žndern... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Ändern... : ~Žndern... */
+ Text = "~Ändern..." ;
+ Text [ ENGLISH ] = "~Modify..." ;
+ Text [ norwegian ] = "~Endre..." ;
+ Text [ italian ] = "~Modifica..." ;
+ Text [ portuguese_brazilian ] = "~Modificar..." ;
+ Text [ portuguese ] = "~Modificar..." ;
+ Text [ finnish ] = "~Muokkaa..." ;
+ Text [ danish ] = "Modificer..." ;
+ Text [ french ] = "~Modifier..." ;
+ Text [ swedish ] = "~Ändra..." ;
+ Text [ dutch ] = "Wij~zigen..." ;
+ Text [ spanish ] = "~Modificar..." ;
+ 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 ] = "~Deðiþtir...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_DELETE
+ {
+ Pos = MAP_APPFONT ( 197 , 58 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen... : ~L÷schen... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen... : ~L÷schen... */
+ Text = "~Löschen..." ;
+ Text [ ENGLISH ] = "~Delete..." ;
+ Text [ norwegian ] = "~Delete..." ;
+ 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..." ;
+ 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...";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LINE_TYPE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 57 , 95 ) ;
+ Size = MAP_APPFONT ( 64 , 45 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Einfach" ; Default ; > ;
+ < "Gekreuzt" ; Default ; > ;
+ < "Dreifach" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Einfach" ; Default ; > ;
+ < "Gekreuzt" ; Default ; > ;
+ < "Dreifach" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Einfach" ; Default ; > ;
+ < "Gekreuzt" ; Default ; > ;
+ < "Dreifach" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Singola" ; Default ; > ;
+ < "Crociato" ; Default ; > ;
+ < "Tripla" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Einfach" ; Default ; > ;
+ < "Gekreuzt" ; Default ; > ;
+ < "Triplo" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Simples" ; Default ; > ;
+ < "Cruzado" ; Default ; > ;
+ < "Triplo" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Einfach" ; Default ; > ;
+ < "Gekreuzt" ; Default ; > ;
+ < "Dreifach" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Enkelt" ; Default ; > ;
+ < "På kryds" ; Default ; > ;
+ < "Tredobbelt" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Simple" ; Default ; > ;
+ < "Croisé" ; Default ; > ;
+ < "Triple" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Enkel" ; Default ; > ;
+ < "Korsad" ; Default ; > ;
+ < "Trippel" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Eenvoudig" ; Default ; > ;
+ < "Gekruist" ; Default ; > ;
+ < "Driedubbel" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Sencillo" ; Default ; > ;
+ < "Cruzado" ; Default ; > ;
+ < "Triple" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Single" ; Default ; > ;
+ < "Crossed" ; Default ; > ;
+ < "Triple" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "µ¥Ïß" ; Default ; > ;
+ < "Ê®×ÖÐεÄ" ; Default ; > ;
+ < "Èý±¶" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Îáû÷íûé" ; Default ; > ;
+ < "Ïåðåêðåñòíûé" ; Default ; > ;
+ < "Òðîéíîé" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Pojedyncze" ; Default ; > ;
+ < "Skrzy¿owane" ; Default ; > ;
+ < "Potrójne" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "‰¡ü" ; Default ; > ;
+ < "‰¡cü" ; Default ; > ;
+ < "‰¡cŽÎü" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "³æ½u" ; Default ; > ;
+ < "¤Q¦r§Îªº" ; Default ; > ;
+ < "¤T­¿" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ãÝÑÏ" ; Default ; > ;
+ < "ãÊÞÇØÚÉ" ; Default ; > ;
+ < "ËáÇËí" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "Áðëü" ; Default ; > ;
+ < "ÄéáóôáõñùìÝíá" ; Default ; > ;
+ < "Ôñéðëü" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "´ÜÀÏ" ; Default ; > ;
+ < "½ÊÀÚ" ; Default ; > ;
+ < "»ïÁß" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Tek" ; Default ; > ;
+ < "Izgara" ; Default ; > ;
+ < "Üçlü" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ FixedText FT_LINE_COLOR
+ {
+ Pos = MAP_APPFONT ( 12 , 111 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "Linien~farbe" ;
+ Text [ ENGLISH ] = "Line~color" ;
+ Text [ norwegian ] = "Linje~farge" ;
+ Text [ italian ] = "Colore ~linea" ;
+ Text [ portuguese_brazilian ] = "Linha~cor" ;
+ Text [ portuguese ] = "~Cor da linha" ;
+ Text [ finnish ] = "Viivan ~väri" ;
+ Text [ danish ] = "Stregfarve" ;
+ Text [ french ] = "~Couleur" ;
+ Text [ swedish ] = "Linje~färg" ;
+ Text [ dutch ] = "Lijn~kleur" ;
+ Text [ spanish ] = "~Color de línea" ;
+ Text [ english_us ] = "Line ~color" ;
+ Text[ chinese_simplified ] = "ÏßÌõÑÕÉ«(~C)";
+ Text[ russian ] = "Öâåò ëèíèè";
+ Text[ polish ] = "Kolor linii";
+ Text[ japanese ] = "ü‚ÌF(~C)";
+ Text[ chinese_traditional ] = "½u±øÃC¦â(~C)";
+ Text[ arabic ] = "áæä ÇáÎØ";
+ Text[ greek ] = "×ñþìá ãñáììþí";
+ Text[ korean ] = "¼±ÀÇ »ö(~C)";
+ Text[ turkish ] = "Çizgi ~rengi";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LINE_COLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 57 , 110 ) ;
+ Size = MAP_APPFONT ( 64 , 62 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ ListBox LB_HATCHINGS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 105 , 14 ) ;
+ Size = MAP_APPFONT ( 87 , 58 ) ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_LINE_DISTANCE
+ {
+ Pos = MAP_APPFONT ( 12 , 16 ) ;
+ Size = MAP_APPFONT ( 29 , 10 ) ;
+ Text = "~Abstand" ;
+ Text [ ENGLISH ] = "D~istance" ;
+ Text [ norwegian ] = "A~vstand" ;
+ Text [ italian ] = "D~istanza" ;
+ Text [ portuguese_brazilian ] = "D~istância" ;
+ Text [ portuguese ] = "~Espaçamento" ;
+ Text [ finnish ] = "~Etäisyys" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ french ] = "É~cart" ;
+ Text [ swedish ] = "A~vstånd" ;
+ Text [ dutch ] = "~Afstand" ;
+ Text [ spanish ] = "E~spacio" ;
+ Text [ english_us ] = "~Spacing" ;
+ Text[ chinese_simplified ] = "¼ä¸ô(~S)";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ polish ] = "Odstêp";
+ Text[ japanese ] = "ŠÔŠu(~S)";
+ Text[ chinese_traditional ] = "¶¡¹j(~S)";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ";
+ Text[ greek ] = "~Áðüóôáóç";
+ Text[ korean ] = "°£°Ý(~S)";
+ Text[ turkish ] = "~Aralýk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_ANGLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 43 , 30 ) ;
+ Size = MAP_APPFONT ( 43 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 359 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " Grad" ;
+ CustomUnitText [ ENGLISH ] = " degree" ;
+ CustomUnitText [ norwegian ] = " degree" ;
+ CustomUnitText [ italian ] = "gradi" ;
+ CustomUnitText [ portuguese_brazilian ] = "grau" ;
+ CustomUnitText [ portuguese ] = "grau" ;
+ CustomUnitText [ finnish ] = " astetta" ;
+ CustomUnitText [ danish ] = "grader" ;
+ CustomUnitText [ french ] = "degrés" ;
+ CustomUnitText [ swedish ] = "grader" ;
+ CustomUnitText [ dutch ] = "graden" ;
+ CustomUnitText [ spanish ] = "grados" ;
+ CustomUnitText [ english_us ] = "degrees" ;
+ Last = 359 ;
+ SpinSize = 15 ;
+ CustomUnitText[ chinese_simplified ] = "¶È";
+ CustomUnitText[ russian ] = "ãðàäóñîâ";
+ CustomUnitText[ polish ] = "Stopni";
+ CustomUnitText[ japanese ] = "“x";
+ CustomUnitText[ chinese_traditional ] = "«×";
+ CustomUnitText[ arabic ] = "ÏÑÌÉ";
+ CustomUnitText[ greek ] = "ìïßñåò";
+ CustomUnitText[ korean ] = "µµ";
+ CustomUnitText[ turkish ] = "Derece";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ FixedText FT_LINE_ANGLE
+ {
+ Pos = MAP_APPFONT ( 12 , 31 ) ;
+ Size = MAP_APPFONT ( 29 , 10 ) ;
+ Text = "~Winkel" ;
+ Text [ ENGLISH ] = "A~ngle" ;
+ Text [ norwegian ] = "V~inkel" ;
+ Text [ italian ] = "A~ngolo" ;
+ Text [ portuguese_brazilian ] = "Â~ngulo" ;
+ Text [ portuguese ] = "Â~ngulo" ;
+ Text [ finnish ] = "~Kulma" ;
+ Text [ danish ] = "Vinkel" ;
+ Text [ french ] = "A~ngle" ;
+ Text [ swedish ] = "Vi~nkel" ;
+ Text [ dutch ] = "~Hoek" ;
+ Text [ spanish ] = "A~ngulo" ;
+ Text [ english_us ] = "A~ngle" ;
+ Text[ chinese_simplified ] = "½Ç¶È(~N)";
+ Text[ russian ] = "Óãîë";
+ Text[ polish ] = "K¹t";
+ Text[ japanese ] = "Šp“x(~N)";
+ Text[ chinese_traditional ] = "¨¤«×(~N)";
+ Text[ arabic ] = "ÇáÒÇæíÉ";
+ Text[ greek ] = "Ãùíßá";
+ Text[ korean ] = "°¢µµ(~N)";
+ Text[ turkish ] = "A~çý";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_DISTANCE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 43 , 14 ) ;
+ Size = MAP_APPFONT ( 43 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 30 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ First = 30 ;
+ Last = 9999 ;
+ SpinSize = 100 ;
+ };
+ Control CTL_ANGLE
+ {
+ HelpId = HID_TPHATCH_CTRL ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 43 , 46 ) ;
+ Size = MAP_APPFONT ( 43 , 29 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_DEFINITION
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 86 , 76 ) ;
+ Text = "Definition" ;
+ Text [ ENGLISH ] = "Definition" ;
+ Text [ norwegian ] = "Definition" ;
+ Text [ italian ] = "Definizione" ;
+ Text [ portuguese_brazilian ] = "Definição" ;
+ Text [ portuguese ] = "Definição" ;
+ Text [ finnish ] = "Määritys" ;
+ Text [ danish ] = "Definition" ;
+ Text [ french ] = "Définition" ;
+ Text [ swedish ] = "Definition" ;
+ Text [ dutch ] = "Definitie" ;
+ Text [ spanish ] = "Definición" ;
+ Text [ english_us ] = "Definition" ;
+ Text[ chinese_simplified ] = "¶¨Òå";
+ Text[ russian ] = "Îïðåäåëåíèå";
+ Text[ polish ] = "Definicja";
+ Text[ japanese ] = "’è‹`";
+ Text[ chinese_traditional ] = "©w¸q";
+ Text[ arabic ] = "ÊÚÑíÝ";
+ Text[ greek ] = "Ïñéóìüò";
+ Text[ korean ] = "Á¤ÀÇ";
+ Text[ turkish ] = "Taným";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 132 , 81 ) ;
+ Size = MAP_APPFONT ( 100 , 48 ) ;
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ÇáãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_HATCHINGS
+ {
+ Pos = MAP_APPFONT ( 97 , 3 ) ;
+ Size = MAP_APPFONT ( 157 , 76 ) ;
+ Text = "Tabelle Schraffuren" ;
+ Text [ ENGLISH ] = "Hatchings" ;
+ Text [ norwegian ] = "Skraveringer" ;
+ Text [ italian ] = "Tabella tratteggi" ;
+ Text [ portuguese_brazilian ] = "Traços de sombreado" ;
+ Text [ portuguese ] = "Tracejados" ;
+ Text [ finnish ] = "Viivoitukset" ;
+ Text [ danish ] = "Tabel skravering" ;
+ Text [ french ] = "Palette de hachures" ;
+ Text [ swedish ] = "Tabell skrafferingar" ;
+ Text [ dutch ] = "Tabel arceringen" ;
+ Text [ spanish ] = "Tramas" ;
+ Text [ english_us ] = "Hatching" ;
+ Text[ chinese_simplified ] = "±í¸ñÒõÓ°Ïß";
+ Text[ russian ] = "Òàáëèöà øòðèõîâîê";
+ Text[ polish ] = "Tabela kreskowania";
+ Text[ japanese ] = "ʯÁݸނ̕\\";
+ Text[ chinese_traditional ] = "ªí®æ³±¼v½u";
+ Text[ arabic ] = "ÞÇÆãÉ ÇáäÞæÔ";
+ Text[ greek ] = "Ðßíáêáò ãñáììïóêéþí";
+ Text[ korean ] = "ÇØĪ Ç¥";
+ Text[ turkish ] = "Desen";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_LINE
+ {
+ Pos = MAP_APPFONT ( 6 , 81 ) ;
+ Size = MAP_APPFONT ( 121 , 48 ) ;
+ Text = "Linie" ;
+ Text [ ENGLISH ] = "Line" ;
+ Text [ norwegian ] = "Linje" ;
+ Text [ italian ] = "Linea" ;
+ Text [ portuguese_brazilian ] = "Linha" ;
+ Text [ portuguese ] = "Linha" ;
+ Text [ finnish ] = "Viiva" ;
+ Text [ danish ] = "Streg" ;
+ Text [ french ] = "Trait" ;
+ Text [ swedish ] = "Linje" ;
+ Text [ dutch ] = "Lijn" ;
+ Text [ spanish ] = "Línea" ;
+ 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 ] = " ";
+ };
+ ImageButton BTN_LOAD
+ {
+ Pos = MAP_APPFONT ( 238 , 94 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Schraffurentabelle laden" ;
+ QuickHelpText [ ENGLISH ] = "Load hatching list" ;
+ QuickHelpText [ norwegian ] = "Last inn skraveringsliste" ;
+ QuickHelpText [ italian ] = "Carica tavola dei tratteggi" ;
+ QuickHelpText [ portuguese_brazilian ] = "Carregar lista de traços de sombreado" ;
+ QuickHelpText [ portuguese ] = "Carrega a lista de campos sombreados" ;
+ QuickHelpText [ finnish ] = "Lue viivoitusluettelo" ;
+ QuickHelpText [ danish ] = "Indlæs skraveringstabel" ;
+ QuickHelpText [ french ] = "Charger la palette de hachures" ;
+ QuickHelpText [ swedish ] = "Ladda skrafferingstabell" ;
+ QuickHelpText [ dutch ] = "Tabel arceringen laden" ;
+ QuickHelpText [ spanish ] = "Cargar tabla de hachurados" ;
+ QuickHelpText [ english_us ] = "Load Hatches List" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05501.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Çàãðóçèòü íàáîð øòðèõîâîê";
+ QuickHelpText[ polish ] = "£aduj tabelê kreskowañ";
+ QuickHelpText[ japanese ] = "ʯÁݸޕ\\‚ðÛ°ÄÞ‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "×°ÔØÒõÓ°±í";
+ QuickHelpText[ chinese_traditional ] = "¸Ë¸ü³±¼vªí";
+ QuickHelpText[ arabic ] = "ÊÍãíá ÞÇÆãÉ ÇáäÞæÔ";
+ QuickHelpText[ greek ] = "Öüñôùóç ëßóôáò ìå ãñáììïóêéÝò";
+ QuickHelpText[ korean ] = "Load Hatches List";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton BTN_SAVE
+ {
+ Pos = MAP_APPFONT ( 238 , 113 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Schraffurentabelle sichern" ;
+ QuickHelpText [ ENGLISH ] = "Save hatching list" ;
+ QuickHelpText [ norwegian ] = "Lagre skraveringsliste" ;
+ QuickHelpText [ italian ] = "Salva tavola dei tratteggi" ;
+ QuickHelpText [ portuguese_brazilian ] = "Gravar lista de traços de sombreado" ;
+ QuickHelpText [ portuguese ] = "Guarda a lista de campos sombreados" ;
+ QuickHelpText [ finnish ] = "Tallenna viivoitusluettelo" ;
+ QuickHelpText [ danish ] = "Gem skraveringstabel" ;
+ QuickHelpText [ french ] = "Enregistrer la palette de hachures" ;
+ QuickHelpText [ swedish ] = "Spara skrafferingstabell" ;
+ QuickHelpText [ dutch ] = "Tabel arceringen opslaan" ;
+ QuickHelpText [ spanish ] = "Guardar tabla de hachurados" ;
+ QuickHelpText [ english_us ] = "Save Hatches List" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05502.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Ñîõðàíèòü íàáîð øòðèõîâîê";
+ QuickHelpText[ polish ] = "Zapisz tabelê kreskowañ";
+ QuickHelpText[ japanese ] = "ʯÁݸޕ\\‚ð•Û‘¶‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "±£´æÒõÓ°±í";
+ QuickHelpText[ chinese_traditional ] = "«O¦s³±¼vªí";
+ QuickHelpText[ arabic ] = "ÍÝÙ ÞÇÆãÉ ÇáäÞæÔ";
+ QuickHelpText[ greek ] = "ÁðïèÞêåõóç ëßóôáò ìå ãñáììïóêéÝò";
+ QuickHelpText[ korean ] = "Save Hatches List";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ÒõÓ°Ïß";
+ Text[ russian ] = "Øòðèõîâêè";
+ Text[ polish ] = "Kreskowanie";
+ Text[ japanese ] = "ʯÁݸÞ";
+ Text[ chinese_traditional ] = "³±¼v½u";
+ Text[ arabic ] = "äÞæÔ";
+ Text[ greek ] = "ÃñáììïóêéÝò";
+ Text[ korean ] = "ÇØĪ";
+ Text[ turkish ] = "Desen";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_BITMAP -------------------------------------------------------
+TabPage RID_SVXPAGE_BITMAP
+{
+ HelpID = HID_AREA_BITMAP ;
+ Hide = TRUE ;
+ Text = "Bitmapmuster" ;
+ Text [ English ] = "Bitmaps" ;
+ Text [ norwegian ] = "Punktmatriser" ;
+ Text [ italian ] = "Bitmap" ;
+ Text [ portuguese_brazilian ] = "Bitmaps" ;
+ Text [ portuguese ] = "Modelos de bitmaps" ;
+ Text [ finnish ] = "Bittikartat" ;
+ Text [ danish ] = "Bitmapmønstre" ;
+ Text [ french ] = "Motifs bitmaps" ;
+ Text [ swedish ] = "Bitmapsmönster" ;
+ Text [ dutch ] = "Bitmappatronen" ;
+ Text [ spanish ] = "Modelos de bitmap" ;
+ Text [ english_us ] = "Bitmap Patterns" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_COLOR
+ {
+ Pos = MAP_APPFONT ( 12 , 97 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "~Vordergrund" ;
+ Text [ ENGLISH ] = "~Foreground" ;
+ Text [ norwegian ] = "~Forgrunn" ;
+ Text [ italian ] = "~Primo piano" ;
+ Text [ portuguese_brazilian ] = "~Primeiro plano" ;
+ Text [ portuguese ] = "P~rimeiro plano" ;
+ Text [ finnish ] = "~Edusta" ;
+ Text [ danish ] = "Forgrund" ;
+ Text [ french ] = "~Premier plan" ;
+ Text [ swedish ] = "För~grund" ;
+ Text [ dutch ] = "V~oorgrond" ;
+ Text [ spanish ] = "~Primer plano" ;
+ Text [ english_us ] = "~Foreground" ;
+ Text[ chinese_simplified ] = "Ç°¾°(~F)";
+ Text[ russian ] = "Ïåðåäíèé ïëàí";
+ Text[ polish ] = "Pierwszy plan";
+ Text[ japanese ] = "‘OŒi(~F)";
+ Text[ chinese_traditional ] = "«e´º(~F)";
+ Text[ arabic ] = "ÇáÃãÇãíÉ";
+ Text[ greek ] = "~Óå ðñþôï ðëÜíï";
+ Text[ korean ] = "Àü¸é(~F)";
+ Text[ turkish ] = "~Önalan";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_BACKGROUND_COLOR
+ {
+ Pos = MAP_APPFONT ( 12 , 111 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "Hi~ntergrund" ;
+ 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 ] = "~Arrière-plan" ;
+ Text [ swedish ] = "Bakgru~nd" ;
+ Text [ dutch ] = "~Achtergrond" ;
+ Text [ spanish ] = "~Fondo" ;
+ Text [ english_us ] = "~Background" ;
+ Text[ chinese_simplified ] = "±³¾°(~B)";
+ Text[ russian ] = "Ôîí";
+ Text[ polish ] = "T³o";
+ Text[ japanese ] = "”wŒi(~B)";
+ Text[ chinese_traditional ] = "­I´º(~B)";
+ Text[ arabic ] = "ÇáÎáÝíÉ";
+ Text[ greek ] = "Öüíôï";
+ Text[ korean ] = "¹è°æ(~B)";
+ Text[ turkish ] = "A~rtalan";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 137 , 91 ) ;
+ Size = MAP_APPFONT ( 89 , 32 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton BTN_ADD
+ {
+ Pos = MAP_APPFONT ( 197 , 14 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufügen... : H~inzuf³gen... */
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufügen... : H~inzuf³gen... */
+ Text = "H~inzufügen..." ;
+ Text [ ENGLISH ] = "~Add..." ;
+ Text [ norwegian ] = "~Add..." ;
+ Text [ italian ] = "~Aggiungi..." ;
+ Text [ portuguese_brazilian ] = "~Add..." ;
+ Text [ portuguese ] = "~Adicionar..." ;
+ Text [ finnish ] = "~Lisää..." ;
+ Text [ danish ] = "Tilføj..." ;
+ Text [ french ] = "~Ajouter..." ;
+ Text [ swedish ] = "Lägg t~ill..." ;
+ Text [ dutch ] = "~Toevoegen..." ;
+ Text [ spanish ] = "~Añadir..." ;
+ Text [ english_us ] = "~Add..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)...";
+ Text[ russian ] = "Äîáàâèòü...";
+ Text[ polish ] = "Dodaj...";
+ Text[ japanese ] = "’ljÁ(~A)...";
+ Text[ chinese_traditional ] = "¼W¥[(~A)...";
+ Text[ arabic ] = "...ÅÖÇÝÉ";
+ Text[ greek ] = "ÐñïóèÞêç...";
+ Text[ korean ] = "Ãß°¡(~A)...";
+ Text[ turkish ] = "~Ekle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_IMPORT
+ {
+ Pos = MAP_APPFONT ( 197 , 46 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "I~mport..." ;
+ Text [ ENGLISH ] = "~Import..." ;
+ Text [ norwegian ] = "~Import..." ;
+ Text [ italian ] = "~Importa..." ;
+ Text [ portuguese_brazilian ] = "~Importar..." ;
+ Text [ portuguese ] = "~Importar..." ;
+ Text [ finnish ] = "~Tuo..." ;
+ Text [ danish ] = "Importer..." ;
+ Text [ french ] = "~Importer..." ;
+ Text [ swedish ] = "I~mport..." ;
+ Text [ dutch ] = "~Importeren..." ;
+ Text [ spanish ] = "~Importar..." ;
+ Text [ english_us ] = "I~mport..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÊäÈë(~M)...";
+ Text[ russian ] = "Èìïîðò...";
+ Text[ polish ] = "Import...";
+ Text[ japanese ] = "²ÝÎß°Ä(~M)...";
+ Text[ chinese_traditional ] = "¿é¤J(~M)...";
+ Text[ arabic ] = "ÇÓÊíÑÇÏ...";
+ Text[ greek ] = "ÅéóáãùãÞ...";
+ Text[ korean ] = "°¡Á® ¿À±â(~M)...";
+ Text[ turkish ] = "Ý~çe aktar...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_MODIFY
+ {
+ Pos = MAP_APPFONT ( 197 , 30 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Ändern... : ~Žndern... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Ändern... : ~Žndern... */
+ Text = "~Ändern..." ;
+ Text [ ENGLISH ] = "~Modify..." ;
+ Text [ norwegian ] = "~Endre..." ;
+ Text [ italian ] = "~Modifica..." ;
+ Text [ portuguese_brazilian ] = "~Modificar..." ;
+ Text [ portuguese ] = "~Modificar..." ;
+ Text [ finnish ] = "~Muokkaa..." ;
+ Text [ danish ] = "Modificer..." ;
+ Text [ french ] = "~Appliquer..." ;
+ Text [ swedish ] = "~Ändra..." ;
+ Text [ dutch ] = "Wij~zigen..." ;
+ Text [ spanish ] = "~Modificar..." ;
+ 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 ] = "~Deðiþtir...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_DELETE
+ {
+ Pos = MAP_APPFONT ( 197 , 62 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen... : ~L÷schen... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen... : ~L÷schen... */
+ Text = "~Löschen..." ;
+ Text [ ENGLISH ] = "~Delete..." ;
+ Text [ norwegian ] = "~Delete..." ;
+ 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..." ;
+ 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...";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_COLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 57 , 95 ) ;
+ Size = MAP_APPFONT ( 64 , 62 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ Control CTL_PIXEL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 26 , 14 ) ;
+ Size = MAP_APPFONT ( 58 , 58 ) ;
+ TabStop = TRUE ;
+ };
+ ListBox LB_BACKGROUND_COLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 57 , 110 ) ;
+ Size = MAP_APPFONT ( 64 , 62 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ ListBox LB_BITMAPS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 105 , 14 ) ;
+ Size = MAP_APPFONT ( 87 , 58 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_COLOR
+ {
+ Pos = MAP_APPFONT ( 6 , 81 ) ;
+ Size = MAP_APPFONT ( 121 , 48 ) ;
+ Text = "Farbe" ;
+ Text [ ENGLISH ] = "Color" ;
+ Text [ norwegian ] = "Farge" ;
+ Text [ italian ] = "Colore" ;
+ Text [ portuguese_brazilian ] = "Cor" ;
+ Text [ portuguese ] = "Cor" ;
+ Text [ finnish ] = "Väri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "Couleur" ;
+ Text [ swedish ] = "Färg" ;
+ Text [ dutch ] = "Kleur" ;
+ Text [ spanish ] = "Color" ;
+ Text [ english_us ] = "Color" ;
+ Text[ chinese_simplified ] = "ÑÕÉ«";
+ Text[ russian ] = "Öâåò";
+ Text[ polish ] = "Kolor";
+ Text[ japanese ] = "F";
+ Text[ chinese_traditional ] = "ÃC¦â";
+ Text[ arabic ] = "Çááæä";
+ Text[ greek ] = "×ñþìá";
+ Text[ korean ] = "»ö";
+ Text[ turkish ] = "Renk";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_PIXEL_EDIT
+ {
+ Pos = MAP_APPFONT ( 6 , 4 ) ;
+ Size = MAP_APPFONT ( 85 , 75 ) ;
+ Text = "Pixel-Editor" ;
+ Text [ ENGLISH ] = "Pixel Edit" ;
+ Text [ norwegian ] = "Rediger Bildeelement" ;
+ Text [ italian ] = "Modifica pixel" ;
+ Text [ portuguese_brazilian ] = "Editar Pixel" ;
+ Text [ portuguese ] = "Editar pixels" ;
+ Text [ finnish ] = "Pisteiden muokkaus" ;
+ Text [ danish ] = "Pixel-redigering" ;
+ Text [ french ] = "Modification de pixels" ;
+ Text [ swedish ] = "Pixel-Editor" ;
+ Text [ dutch ] = "Pixel Editor" ;
+ Text [ spanish ] = "Editor de píxeles" ;
+ Text [ english_us ] = "Pixel editor" ;
+ Text[ chinese_simplified ] = "ÏñËر༭Æ÷";
+ Text[ russian ] = "Ðåäàêòîð ïèêñåëÿ";
+ Text[ polish ] = "Edytor piksela";
+ Text[ japanese ] = "Ë߸¾Ù´ÃÞ¨À";
+ Text[ chinese_traditional ] = "¹³¯À½s¿è¾¹";
+ Text[ arabic ] = "ãÍÑÑ ÇáÈßÓá";
+ Text[ greek ] = "Åðåîåñãáóßá Pixel";
+ Text[ korean ] = "Çȼ¿ ÆíÁý±â";
+ Text[ turkish ] = "Piksel editörü";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_BITMAPS
+ {
+ Pos = MAP_APPFONT ( 97 , 3 ) ;
+ Size = MAP_APPFONT ( 156 , 76 ) ;
+ Text = "Tabelle Bitmapmuster" ;
+ Text [ ENGLISH ] = "Bitmaps" ;
+ Text [ norwegian ] = "Punktmatriser" ;
+ Text [ italian ] = "Tavola bitmap" ;
+ Text [ portuguese_brazilian ] = "Bitmaps" ;
+ Text [ portuguese ] = "Modelos de bitmaps" ;
+ Text [ finnish ] = "Bittikartat" ;
+ Text [ danish ] = "Tabel bitmap-mønstre" ;
+ Text [ french ] = "Palette de motifs bitmaps" ;
+ Text [ swedish ] = "Tabell bitmapmönster" ;
+ Text [ dutch ] = "Bitmappatronen" ;
+ Text [ spanish ] = "Modelo bitmap" ;
+ Text [ english_us ] = "Bitmap patterns" ;
+ Text[ chinese_simplified ] = "λͼͼ°¸";
+ Text[ russian ] = "Îáðàçöû bitmap";
+ Text[ polish ] = "Tabela wzorca mapy bitowej";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß–Í—l‚Ì•\\";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï¹Ï®×";
+ Text[ arabic ] = "äãÇÐÌ ÇáÕæÑ ÇáäÞØíÉ";
+ Text[ greek ] = "Ðßíáêáò ó÷åäßùí Bitmap";
+ Text[ korean ] = "ºñÆ®¸Ê ÆÐÅÏ Ç¥";
+ Text[ turkish ] = "Bit eþlem desenleri";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 132 , 81 ) ;
+ Size = MAP_APPFONT ( 100 , 48 ) ;
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ÇáãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ ImageButton BTN_LOAD
+ {
+ Pos = MAP_APPFONT ( 238 , 94 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Bitmaptabelle laden" ;
+ QuickHelpText [ ENGLISH ] = "Load bitmap list" ;
+ QuickHelpText [ norwegian ] = "Last inn liste over punktmatriser" ;
+ QuickHelpText [ italian ] = "Carica tavola delle bitmap" ;
+ QuickHelpText [ portuguese_brazilian ] = "Carregar lista de bitmaps" ;
+ QuickHelpText [ portuguese ] = "Carrega a lista de bitmaps" ;
+ QuickHelpText [ finnish ] = "Lue bittikarttaluettelo" ;
+ QuickHelpText [ danish ] = "Indlæs bitmaptabel" ;
+ QuickHelpText [ french ] = "Charger la palette de bitmaps" ;
+ QuickHelpText [ swedish ] = "Ladda bitmaptabell" ;
+ QuickHelpText [ dutch ] = "Bitmap-lijst laden" ;
+ QuickHelpText [ spanish ] = "Cargar tabla de Bitmaps" ;
+ QuickHelpText [ english_us ] = "Load Bitmap List" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05501.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Çàãðóçèòü íàáîð Bitmap";
+ QuickHelpText[ polish ] = "£aduj tabelê mapy bitowej";
+ QuickHelpText[ japanese ] = "ËÞ¯ÄϯÌß•\\‚ð“Ç‚Ýž‚Þ";
+ QuickHelpText[ chinese_simplified ] = "×°ÔØλͼÁбí";
+ QuickHelpText[ chinese_traditional ] = "¸Ë¸üÂI°}¹Ï";
+ QuickHelpText[ arabic ] = "ÊÍãíá ÞÇÆãÉ ÇáÕæÑ ÇáäÞØíÉ";
+ QuickHelpText[ greek ] = "Öüñôùóç ëßóôáò ìå Bitmap";
+ QuickHelpText[ korean ] = "Load Bitmap List";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton BTN_SAVE
+ {
+ Pos = MAP_APPFONT ( 238 , 113 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Bitmaptabelle sichern" ;
+ QuickHelpText [ ENGLISH ] = "Save bitmap list" ;
+ QuickHelpText [ norwegian ] = "Lagre liste over punktmatriser" ;
+ QuickHelpText [ italian ] = "Salva tavola delle bitmap" ;
+ QuickHelpText [ portuguese_brazilian ] = "Gravar lista de bitmaps" ;
+ QuickHelpText [ portuguese ] = "Guarda a lista de bitmaps" ;
+ QuickHelpText [ finnish ] = "Tallenna bittikarttaluettelo" ;
+ QuickHelpText [ danish ] = "Gem bitmaptabel" ;
+ QuickHelpText [ french ] = "Enregistrer la palette de bitmaps" ;
+ QuickHelpText [ swedish ] = "Spara bitmaptabell" ;
+ QuickHelpText [ dutch ] = "Bitmap-lijst opslaan" ;
+ QuickHelpText [ spanish ] = "Guardar tabla de Bitmaps" ;
+ QuickHelpText [ english_us ] = "Save Bitmap List" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05502.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Ñîõðàíèòü íàáîð Bitmap";
+ QuickHelpText[ polish ] = "Zapisz tabelê mapy bitowej";
+ QuickHelpText[ japanese ] = "ËÞ¯ÄϯÌß•\\‚ð•Û‘¶‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "´æÅÌλͼÁбí";
+ QuickHelpText[ chinese_traditional ] = "«O¦sÂI°}¹Ï";
+ QuickHelpText[ arabic ] = "ÍÝÙ ÞÇÆãÉ ÇáÕæÑ ÇáäÞØíÉ";
+ QuickHelpText[ greek ] = "ÁðïèÞêåõóç ëßóôáò ìå Bitmap";
+ QuickHelpText[ korean ] = "Save Bitmap List";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "λͼͼ°¸";
+ Text[ russian ] = "Îáðàçöû bitmap";
+ Text[ polish ] = "Wzorzec mapy bitowej";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß ÊßÀ°Ý";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï¹Ï®×";
+ Text[ arabic ] = "äãæÐÌ ÇáÕæÑÉ ÇáäÞØíÉ";
+ Text[ greek ] = "Ó÷Ýäéï Bitmap";
+ Text[ korean ] = "ºñÆ®¸Ê ÆÐÅÏ";
+ Text[ turkish ] = "Bit eþlem";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_GRADIENT -----------------------------------------------------
+TabPage RID_SVXPAGE_GRADIENT
+{
+ HelpID = HID_AREA_GRADIENT ;
+ Hide = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Farbverläufe : Farbverlõufe */
+ /* ### ACHTUNG: Neuer Text in Resource? Farbverläufe : Farbverlõufe */
+ Text = "Farbverläufe" ;
+ Text [ English ] = "Gradients" ;
+ Text [ norwegian ] = "+++Gradients" ;
+ Text [ italian ] = "Sfumature" ;
+ Text [ portuguese_brazilian ] = "Dégradés" ;
+ Text [ portuguese ] = "Matizes" ;
+ Text [ finnish ] = "Liukuvärit" ;
+ Text [ danish ] = "Farvegraduering" ;
+ Text [ french ] = "Dégradés" ;
+ Text [ swedish ] = "Färggradienter" ;
+ Text [ dutch ] = "Kleurverloop" ;
+ Text [ spanish ] = "Gradientes de color" ;
+ Text [ english_us ] = "Gradients" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_COLOR_FROM
+ {
+ Pos = MAP_APPFONT ( 12 , 97 ) ;
+ Size = MAP_APPFONT ( 17 , 10 ) ;
+ Text = "~Von" ;
+ Text [ ENGLISH ] = "~From" ;
+ Text [ norwegian ] = "~Fra" ;
+ Text [ italian ] = "~Da" ;
+ Text [ portuguese_brazilian ] = "~De" ;
+ Text [ portuguese ] = "~De" ;
+ Text [ finnish ] = "~Alku" ;
+ Text [ danish ] = "Fra" ;
+ Text [ french ] = "~1ère" ;
+ Text [ swedish ] = "~Från" ;
+ Text [ dutch ] = "Va~n" ;
+ Text [ spanish ] = "~De" ;
+ Text [ english_us ] = "~From" ;
+ Text[ chinese_simplified ] = "´Ó(~F)";
+ Text[ russian ] = "Îò";
+ Text[ polish ] = "Od";
+ Text[ japanese ] = "Œó•â(~F)";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "±q(~F)";
+ Text[ arabic ] = "ãä";
+ Text[ greek ] = "Áðü";
+ Text[ korean ] = "ºÎÅÍ(~F)";
+ Text[ turkish ] = "~Ýlk";
+ };
+ Control CTL_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 147 , 91 ) ;
+ Size = MAP_APPFONT ( 80 , 32 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton BTN_ADD
+ {
+ Pos = MAP_APPFONT ( 197 , 14 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufügen... : H~inzuf³gen... */
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufügen... : H~inzuf³gen... */
+ Text = "H~inzufügen..." ;
+ Text [ ENGLISH ] = "~Add..." ;
+ Text [ norwegian ] = "~Add..." ;
+ Text [ italian ] = "~Aggiungi..." ;
+ Text [ portuguese_brazilian ] = "~Add..." ;
+ Text [ portuguese ] = "~Adicionar..." ;
+ Text [ finnish ] = "~Lisää..." ;
+ Text [ danish ] = "Tilføj..." ;
+ Text [ french ] = "~Ajouter..." ;
+ Text [ swedish ] = "Läg~g till..." ;
+ Text [ dutch ] = "~Toevoegen..." ;
+ Text [ spanish ] = "Añad~ir..." ;
+ Text [ english_us ] = "~Add..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)...";
+ Text[ russian ] = "Äîáàâèòü...";
+ Text[ polish ] = "Dodaj...";
+ Text[ japanese ] = "’ljÁ(~A)...";
+ Text[ chinese_traditional ] = "¼W¥[(~A)...";
+ Text[ arabic ] = "...ÅÖÇÝÉ";
+ Text[ greek ] = "ÐñïóèÞêç...";
+ Text[ korean ] = "Ãß°¡(~A)...";
+ Text[ turkish ] = "E~kle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_MODIFY
+ {
+ Pos = MAP_APPFONT ( 197 , 30 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Ändern... : ~Žndern... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Ändern... : ~Žndern... */
+ Text = "~Ändern..." ;
+ Text [ ENGLISH ] = "~Modify..." ;
+ Text [ norwegian ] = "~Endre..." ;
+ Text [ italian ] = "~Modifica..." ;
+ Text [ portuguese_brazilian ] = "~Modificar..." ;
+ Text [ portuguese ] = "~Modificar..." ;
+ Text [ finnish ] = "~Muokkaa..." ;
+ Text [ danish ] = "Modificer..." ;
+ Text [ french ] = "~Modifier..." ;
+ Text [ swedish ] = "~Ändra..." ;
+ Text [ dutch ] = "Wij~zigen..." ;
+ Text [ spanish ] = "~Modificar..." ;
+ 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 ] = "~Deðiþtir...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_DELETE
+ {
+ Pos = MAP_APPFONT ( 197 , 58 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen... : ~L÷schen... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen... : ~L÷schen... */
+ Text = "~Löschen..." ;
+ Text [ ENGLISH ] = "~Delete..." ;
+ Text [ norwegian ] = "~Delete..." ;
+ 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..." ;
+ 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...";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_COLOR_FROM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 31 , 95 ) ;
+ Size = MAP_APPFONT ( 67 , 63 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ FixedText FT_COLOR_TO
+ {
+ Pos = MAP_APPFONT ( 12 , 111 ) ;
+ Size = MAP_APPFONT ( 17 , 10 ) ;
+ Text = "~Bis" ;
+ Text [ ENGLISH ] = "~To" ;
+ Text [ norwegian ] = "~Til" ;
+ Text [ italian ] = "~A" ;
+ Text [ portuguese_brazilian ] = "~Para" ;
+ Text [ portuguese ] = "~Até" ;
+ Text [ finnish ] = "Mi~hin" ;
+ Text [ danish ] = "Til" ;
+ Text [ french ] = "~2e" ;
+ Text [ swedish ] = "~Till" ;
+ Text [ dutch ] = "N~aar" ;
+ Text [ spanish ] = "~A" ;
+ Text [ english_us ] = "~To" ;
+ Text[ chinese_simplified ] = "ÖÁ(~T)";
+ Text[ russian ] = "Äî";
+ Text[ polish ] = "Do";
+ Text[ japanese ] = "‚Ü‚Å(~T)";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "¦Ü(~T)";
+ Text[ arabic ] = "Åáì";
+ Text[ greek ] = "¸ùò";
+ Text[ korean ] = "±îÁö(~T)";
+ Text[ turkish ] = "~Son";
+ };
+ FixedText FT_ANGLE
+ {
+ Pos = MAP_APPFONT ( 6 , 53 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "~Winkel" ;
+ Text [ ENGLISH ] = "A~ngle" ;
+ Text [ norwegian ] = "~Vinkel" ;
+ Text [ italian ] = "~Angolo" ;
+ Text [ portuguese_brazilian ] = "~Ângulo" ;
+ Text [ portuguese ] = "~Ângulo" ;
+ Text [ finnish ] = "~Kulma" ;
+ Text [ danish ] = "Vinkel" ;
+ Text [ french ] = "~Angle" ;
+ Text [ swedish ] = "~Vinkel" ;
+ Text [ dutch ] = "~Hoek" ;
+ Text [ spanish ] = "Án~gulo" ;
+ Text [ english_us ] = "A~ngle" ;
+ Text[ chinese_simplified ] = "½Ç¶È(~A)";
+ Text[ russian ] = "Óãîë";
+ Text[ polish ] = "K¹t";
+ Text[ japanese ] = "Šp“x(~A)";
+ Text[ chinese_traditional ] = "¨¤«×(~A)";
+ Text[ arabic ] = "ÇáÒÇæíÉ";
+ Text[ greek ] = "Ãùíßá";
+ Text[ korean ] = "°¢µµ(~A)";
+ Text[ turkish ] = "A~çý";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_ANGLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 , 51 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 359 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " Grad" ;
+ CustomUnitText [ ENGLISH ] = " degree" ;
+ CustomUnitText [ norwegian ] = " degree" ;
+ CustomUnitText [ italian ] = "gradi" ;
+ CustomUnitText [ portuguese_brazilian ] = "grau" ;
+ CustomUnitText [ portuguese ] = "grau" ;
+ CustomUnitText [ finnish ] = " astetta" ;
+ CustomUnitText [ danish ] = "grader" ;
+ CustomUnitText [ french ] = "degrés" ;
+ CustomUnitText [ swedish ] = "grader" ;
+ CustomUnitText [ dutch ] = "graden" ;
+ CustomUnitText [ spanish ] = "grados" ;
+ CustomUnitText [ english_us ] = "degrees" ;
+ Last = 359 ;
+ SpinSize = 15 ;
+ CustomUnitText[ chinese_simplified ] = "¶È";
+ CustomUnitText[ russian ] = "ãðàäóñîâ";
+ CustomUnitText[ polish ] = "Stopni";
+ CustomUnitText[ japanese ] = "“x";
+ CustomUnitText[ chinese_traditional ] = "«×";
+ CustomUnitText[ arabic ] = "ÏÑÌÉ";
+ CustomUnitText[ greek ] = "ìïßñåò";
+ CustomUnitText[ korean ] = "µµ";
+ CustomUnitText[ turkish ] = "Derece";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ ListBox LB_COLOR_TO
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 31 , 110 ) ;
+ Size = MAP_APPFONT ( 67 , 62 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ MetricField MTR_COLOR_FROM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 102 , 95 ) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ MetricField MTR_COLOR_TO
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 102 , 110 ) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ MetricField MTR_CENTER_X
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 , 22 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ MetricField MTR_BORDER
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 , 66 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ MetricField MTR_CENTER_Y
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 , 36 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ FixedText FT_CENTER_X
+ {
+ Pos = MAP_APPFONT ( 6 , 24 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "Zentrum ~X" ;
+ Text [ ENGLISH ] = "Center ~X" ;
+ Text [ norwegian ] = "Midtstill ~X" ;
+ Text [ italian ] = "Centra ~X" ;
+ Text [ portuguese_brazilian ] = "Centro ~X" ;
+ Text [ portuguese ] = "Centro ~X" ;
+ Text [ finnish ] = "Keski-~X" ;
+ Text [ danish ] = "Center X" ;
+ Text [ french ] = "Centre ~X" ;
+ Text [ swedish ] = "Centrum ~X" ;
+ Text [ dutch ] = "Centrum ~X" ;
+ Text [ spanish ] = "Centro ~X" ;
+ Text [ english_us ] = "Center ~X" ;
+ Text[ chinese_simplified ] = "ÖÐÐÄ X(~X)";
+ Text[ russian ] = "Öåíòð ~X";
+ Text[ polish ] = "Centrum X";
+ Text[ japanese ] = "X‚Ì’†‰›(~X)";
+ Text[ chinese_traditional ] = "¶°¤¤(~X)";
+ Text[ arabic ] = "ÇáãÑßÒ Ó";
+ Text[ greek ] = "ÊÝíôñï X";
+ Text[ korean ] = "Áß¾Ó X(~X)";
+ Text[ turkish ] = "~X kaydýr";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_CENTER_Y
+ {
+ Pos = MAP_APPFONT ( 6 , 38 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "Zentrum ~Y" ;
+ Text [ ENGLISH ] = "Center ~Y" ;
+ Text [ norwegian ] = "Midtstill~Y" ;
+ Text [ italian ] = "Centra ~Y" ;
+ Text [ portuguese_brazilian ] = "Centro ~Y" ;
+ Text [ portuguese ] = "Centro ~Y" ;
+ Text [ finnish ] = "Keski-~Y" ;
+ Text [ danish ] = "Center Y" ;
+ Text [ french ] = "Centre ~Y" ;
+ Text [ swedish ] = "Centrum ~Y" ;
+ Text [ dutch ] = "Centrum ~Y" ;
+ Text [ spanish ] = "Centro ~Y" ;
+ Text [ english_us ] = "Center ~Y" ;
+ Text[ chinese_simplified ] = "ÖÐÐÄ Y(~Y)";
+ Text[ russian ] = "Öåíòð Y";
+ Text[ polish ] = "Centrum Y";
+ Text[ japanese ] = "Y‚Ì’†‰›(~Y)";
+ Text[ chinese_traditional ] = "¶°¤¤(~Y)";
+ Text[ arabic ] = "ÇáãÑßÒ Õ";
+ Text[ greek ] = "ÊÝíôñï ~Y";
+ Text[ korean ] = "Áß¾Ó Y(~Y)";
+ Text[ turkish ] = "~Y kaydýr";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_BORDER
+ {
+ Pos = MAP_APPFONT ( 6 , 68 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "~Rand" ;
+ Text [ ENGLISH ] = "~Border" ;
+ Text [ norwegian ] = "~Border" ;
+ Text [ italian ] = "Ma~rgine" ;
+ Text [ portuguese_brazilian ] = "~Borda" ;
+ Text [ portuguese ] = "~Margem" ;
+ Text [ finnish ] = "~Reunaviiva" ;
+ Text [ danish ] = "Rand" ;
+ Text [ french ] = "~Marge" ;
+ Text [ swedish ] = "~Marginal" ;
+ Text [ dutch ] = "~Rand" ;
+ Text [ spanish ] = "~Borde" ;
+ Text [ english_us ] = "~Border" ;
+ Text[ chinese_simplified ] = "±ß¾à(~B)";
+ Text[ russian ] = "Ïîëå";
+ Text[ polish ] = "Margines";
+ Text[ japanese ] = "—]”’(~B)";
+ Text[ chinese_traditional ] = "̊ƒ(~B)";
+ Text[ arabic ] = "ÇáÍÏ";
+ Text[ greek ] = "Ðå~ñéèþñéï";
+ Text[ korean ] = "Å׵θ®(~B)";
+ Text[ turkish ] = "~Kenar";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_GRADIENT_TYPES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 30 , 7 ) ;
+ Size = MAP_APPFONT ( 59 , 63 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Quadratisch" ; Default ; > ;
+ < "Rechteckig" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Quadratisch" ; Default ; > ;
+ < "Rechteckig" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Quadratisch" ; Default ; > ;
+ < "Rechteckig" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Lineare" ; Default ; > ;
+ < "Assiale" ; Default ; > ;
+ < "Radiale" ; Default ; > ;
+ < "Ellissoidale" ; Default ; > ;
+ < "Quadrato" ; Default ; > ;
+ < "Rettangolo" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Quadratisch" ; Default ; > ;
+ < "Retângulo" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Elipsoidal" ; Default ; > ;
+ < "Quadrado" ; Default ; > ;
+ < "Rectangular" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Quadratisch" ; Default ; > ;
+ < "Rechteckig" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Lineær" ; Default ; > ;
+ < "Aksial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoide" ; Default ; > ;
+ < "Kvadratisk" ; Default ; > ;
+ < "Rektangulær" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Linéaire" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoïde" ; Default ; > ;
+ < "Carré" ; Default ; > ;
+ < "Rectangulaire" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Linjär" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radiellt" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Kvadratisk" ; Default ; > ;
+ < "Rektangulär" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Lineair" ; Default ; > ;
+ < "Axiaal" ; Default ; > ;
+ < "Radiaal" ; Default ; > ;
+ < "Ovaal" ; Default ; > ;
+ < "Vierkant" ; Default ; > ;
+ < "Rechthoekig" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Lineal" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Elipsoide" ; Default ; > ;
+ < "Cuadrado" ; Default ; > ;
+ < "Rectangular" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Linear" ; Default ; > ;
+ < "Axial" ; Default ; > ;
+ < "Radial" ; Default ; > ;
+ < "Ellipsoid" ; Default ; > ;
+ < "Square" ; Default ; > ;
+ < "Rectangular" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "Ö±ÏßµÄ" ; Default ; > ;
+ < "ÖáÏò" ; Default ; > ;
+ < "¾¶Ïò" ; Default ; > ;
+ < "ÍÖÔ²Ìå" ; Default ; > ;
+ < "Õý·½ÐÎ" ; Default ; > ;
+ < "¾ØÐÎ" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ëèíåéíûé" ; Default ; > ;
+ < "Îñåâîé" ; Default ; > ;
+ < "Êðóãîâîé" ; Default ; > ;
+ < "Ýëëèïñîâèäíûé" ; Default ; > ;
+ < "Êâàäðàòíûé" ; Default ; > ;
+ < "Ïðÿìîóãîëüíûé" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Liniowy" ; Default ; > ;
+ < "Osiowy" ; Default ; > ;
+ < "Radialny" ; Default ; > ;
+ < "Elipsoida" ; Default ; > ;
+ < "Kwadratowy" ; Default ; > ;
+ < "Prostok¹tny" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "üŒ`" ; Default ; > ;
+ < "Ž²" ; Default ; > ;
+ < "•úŽËüó" ; Default ; > ;
+ < "‘ȉ~" ; Default ; > ;
+ < "ŽlŠp" ; Default ; > ;
+ < "ŽlŠpŒ`" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "ª½½uªº" ; Default ; > ;
+ < "¶b¦V" ; Default ; > ;
+ < "®|¦V" ; Default ; > ;
+ < "¾ò¶êÅé" ; Default ; > ;
+ < "¥¿¤è§Î" ; Default ; > ;
+ < "¯x§Î" ; 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 ] =
+ {
+ < "Doðrusal" ; Default ; > ;
+ < "Eksenel" ; Default ; > ;
+ < "Radyal" ; Default ; > ;
+ < "Elips" ; Default ; > ;
+ < "Karesel" ; Default ; > ;
+ < "Dikdörtgen" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ ListBox LB_GRADIENTS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 105 , 14 ) ;
+ Size = MAP_APPFONT ( 87 , 58 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_COLOR
+ {
+ Pos = MAP_APPFONT ( 6 , 81 ) ;
+ Size = MAP_APPFONT ( 131 , 48 ) ;
+ Text = "Farbe" ;
+ Text [ ENGLISH ] = "Color" ;
+ Text [ norwegian ] = "Farge" ;
+ Text [ italian ] = "Colore" ;
+ Text [ portuguese_brazilian ] = "Cor" ;
+ Text [ portuguese ] = "Cor" ;
+ Text [ finnish ] = "Väri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "Couleur" ;
+ Text [ swedish ] = "Färg" ;
+ Text [ dutch ] = "Kleur" ;
+ Text [ spanish ] = "Color" ;
+ Text [ english_us ] = "Color" ;
+ Text[ chinese_simplified ] = "ÑÕÉ«";
+ Text[ russian ] = "Öâåò";
+ Text[ polish ] = "Kolor";
+ Text[ japanese ] = "F";
+ Text[ chinese_traditional ] = "ÃC¦â";
+ Text[ arabic ] = "Çááæä";
+ Text[ greek ] = "×ñþìá";
+ Text[ korean ] = "»ö";
+ Text[ turkish ] = "Renk";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_GRADIENTS
+ {
+ Pos = MAP_APPFONT ( 97 , 3 ) ;
+ Size = MAP_APPFONT ( 156 , 76 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Tabelle Farbverlõufe : Tabelle Farbverl§ufe */
+ /* ### ACHTUNG: Neuer Text in Resource? Tabelle Farbverlõufe : Tabelle Farbverl§ufe */
+ Text = "Tabelle Farbverlõufe" ;
+ Text [ ENGLISH ] = "Gradients" ;
+ Text [ norwegian ] = "+++Gradients" ;
+ Text [ italian ] = "Elenco sfumature" ;
+ Text [ portuguese_brazilian ] = "Dégradés" ;
+ Text [ portuguese ] = "Tabela de matizes" ;
+ Text [ finnish ] = "Liukuvärit" ;
+ Text [ danish ] = "Tabel farvegraduering" ;
+ Text [ french ] = "Palette de dégradés" ;
+ Text [ swedish ] = "Tabell gradienter" ;
+ Text [ dutch ] = "Tabel kleurverlopen" ;
+ Text [ spanish ] = "Gradientes" ;
+ Text [ english_us ] = "Gradients" ;
+ Text[ chinese_simplified ] = "²Êɫͼ°¸";
+ Text[ russian ] = "Òàáëèöà ãðàäèåíòíûõ";
+ Text[ polish ] = "Gradient";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý‚Ì•\\";
+ Text[ chinese_traditional ] = "±m¦â¹Ï®×";
+ Text[ arabic ] = "ÞÇÆãÉ ÊÏÑÌ Çááæä";
+ Text[ greek ] = "Ëßóôá äéáâáèìßóåùí ÷ñùìÜôùí";
+ Text[ korean ] = "±×¶óµ¥ÀÌ¼Ç Ç¥";
+ Text[ turkish ] = "Gradyan";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 142 , 81 ) ;
+ Size = MAP_APPFONT ( 90 , 48 ) ;
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ÇáãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_TYPE
+ {
+ Pos = MAP_APPFONT ( 6 , 9 ) ;
+ Size = MAP_APPFONT ( 19 , 10 ) ;
+ Text = "~Typ" ;
+ Text [ ENGLISH ] = "Ty~pe" ;
+ Text [ norwegian ] = "Ty~pe" ;
+ Text [ italian ] = "Ti~po" ;
+ Text [ portuguese_brazilian ] = "Ti~po" ;
+ Text [ portuguese ] = "Ti~po" ;
+ Text [ finnish ] = "~Laji" ;
+ Text [ danish ] = "Type" ;
+ Text [ french ] = "T~ype" ;
+ Text [ swedish ] = "~Typ" ;
+ Text [ dutch ] = "Ty~pe" ;
+ Text [ spanish ] = "Ti~po" ;
+ Text [ english_us ] = "Ty~pe" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ(~P)";
+ Text[ russian ] = "Òèï";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "Ží—Þ(~P)";
+ Text[ chinese_traditional ] = "Ãþ«¬(~P)";
+ Text[ arabic ] = "ÇáäæÚ";
+ Text[ greek ] = "~Ôýðïò";
+ Text[ korean ] = "ÇüÅÂ(~P)";
+ Text[ turkish ] = "~Tip";
+ Text[ language_user1 ] = " ";
+ };
+ ImageButton BTN_LOAD
+ {
+ Pos = MAP_APPFONT ( 238 , 94 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Farbverlauftabelle laden" ;
+ QuickHelpText [ ENGLISH ] = "Load gradient list" ;
+ QuickHelpText [ norwegian ] = "Last inn+++ gradient liste" ;
+ QuickHelpText [ italian ] = "Carica tavola delle sfumature" ;
+ QuickHelpText [ portuguese_brazilian ] = "Carregar lista de dégradés" ;
+ QuickHelpText [ portuguese ] = "Carrega a lista de gradações de cores" ;
+ QuickHelpText [ finnish ] = "Lue liukuväriluettelo" ;
+ QuickHelpText [ danish ] = "Indlæs farvegradueringstabel" ;
+ QuickHelpText [ french ] = "Charger la palette de dégradés" ;
+ QuickHelpText [ swedish ] = "Ladda färggradienttabell" ;
+ QuickHelpText [ dutch ] = "Tabel kleurverlopen laden" ;
+ QuickHelpText [ spanish ] = "Cargar tabla de gradientes" ;
+ QuickHelpText [ english_us ] = "Load Gradients List" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05501.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Çàãðóçèòü íàáîð ãðàäèåíòíûõ";
+ QuickHelpText[ polish ] = "£aduj tabelê gradientów";
+ QuickHelpText[ japanese ] = "¸Þ×ÃÞ°¼®Ý•\\‚ðÛ°ÄÞ‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "×°ÔزÊɫͼ°¸±í";
+ QuickHelpText[ chinese_traditional ] = "¸Ë¸ü±m¦â¹Ï®×ªí";
+ QuickHelpText[ arabic ] = "ÊÍãíá ÞÇÆãÉ ÊÏÑÌ ÇáÃáæÇä";
+ QuickHelpText[ greek ] = "Öüñôùóç ëßóôáò äéáâÜèìéóçò ÷ñùìÜôùí";
+ QuickHelpText[ korean ] = "Load Gradients List";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton BTN_SAVE
+ {
+ Pos = MAP_APPFONT ( 238 , 113 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Farbverlauftabelle sichern" ;
+ QuickHelpText [ ENGLISH ] = "Save gradient list" ;
+ QuickHelpText [ norwegian ] = "Lagre +++gradient liste" ;
+ QuickHelpText [ italian ] = "Salva tavola delle sfumature" ;
+ QuickHelpText [ portuguese_brazilian ] = "Gravar lista de dégradés" ;
+ QuickHelpText [ portuguese ] = "Guarda as gradações de cores" ;
+ QuickHelpText [ finnish ] = "Tallenna liukuväriluettelo" ;
+ QuickHelpText [ danish ] = "Gem farvegraduerings tabel" ;
+ QuickHelpText [ french ] = "Enregistrer la palette de dégradés" ;
+ QuickHelpText [ swedish ] = "Spara färggradienttabell" ;
+ QuickHelpText [ dutch ] = "Tabel kleurverlopen opslaan" ;
+ QuickHelpText [ spanish ] = "Guardar tabla de gradientes" ;
+ QuickHelpText [ english_us ] = "Save Gradients List" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05502.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Ñîõðàíèòü íàáîð ãðàäèåíòíûõ";
+ QuickHelpText[ polish ] = "Zapisz tabelê gradientów";
+ QuickHelpText[ japanese ] = "¸Þ×ÃÞ°¼®Ý•\\‚ð•Û‘¶‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "±£´æ²Êɫͼ°¸±í";
+ QuickHelpText[ chinese_traditional ] = "«O¦sÃC¦â¹Ï®×ªí";
+ QuickHelpText[ arabic ] = "ÍÝÙ ÞÇÆãÉ ÊÏÑÌ ÇáÃáæÇä";
+ QuickHelpText[ greek ] = "ÁðïèÞêåõóç ëßóôáò äéáâÜèìéóçò ÷ñùìÜôùí";
+ QuickHelpText[ korean ] = "Save Gradients List";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "²Êɫͼ°¸";
+ Text[ russian ] = "Ãðàäèåíòíûå";
+ Text[ polish ] = "Gradient";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý";
+ Text[ chinese_traditional ] = "±m¦â¹Ï®×";
+ Text[ arabic ] = "ÊÏÑÌ Çááæä";
+ Text[ greek ] = "Äéáâáèìßóåéò ÷ñùìÜôùí";
+ Text[ korean ] = "±×¶óµ¥À̼Ç";
+ Text[ turkish ] = "Gradyan";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_COLOR --------------------------------------------------------
+TabPage RID_SVXPAGE_COLOR
+{
+ HelpId = HID_OPTIONS_COLOR ;
+ Hide = TRUE ;
+ Text = "Farben" ;
+ Text [ English ] = "Colors" ;
+ Text [ norwegian ] = "Colors" ;
+ Text [ italian ] = "Colori" ;
+ Text [ portuguese_brazilian ] = "Cores" ;
+ Text [ portuguese ] = "Cores" ;
+ Text [ finnish ] = "Värit" ;
+ Text [ danish ] = "Farver" ;
+ Text [ french ] = "Couleurs" ;
+ Text [ swedish ] = "Färger" ;
+ Text [ dutch ] = "Kleuren" ;
+ Text [ spanish ] = "Colores" ;
+ Text [ english_us ] = "Colors" ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Control CTL_COLORTABLE
+ {
+ Border = TRUE ;
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 15 ) ;
+ Size = MAP_APPFONT ( 94 , 107 ) ;
+ TabStop = TRUE ;
+ };
+ Control CTL_PREVIEW_OLD
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 182 , 82 ) ;
+ Size = MAP_APPFONT ( 45 , 21 ) ;
+ TabStop = TRUE ;
+ };
+ Control CTL_PREVIEW_NEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 182 , 104 ) ;
+ Size = MAP_APPFONT ( 45 , 21 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton BTN_ADD
+ {
+ Pos = MAP_APPFONT ( 204 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufügen : H~inzuf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufügen : H~inzuf³gen */
+ Text = "H~inzufügen" ;
+ Text [ ENGLISH ] = "~Add" ;
+ Text [ norwegian ] = "Leg~g til" ;
+ Text [ italian ] = "~Aggiungi" ;
+ Text [ portuguese_brazilian ] = "~Acrescentar" ;
+ Text [ portuguese ] = "~Adicionar" ;
+ Text [ finnish ] = "~Lisää" ;
+ Text [ danish ] = "Tilføj" ;
+ Text [ french ] = "~Ajouter" ;
+ Text [ swedish ] = "Lägg t~ill" ;
+ Text [ dutch ] = "~Toevoegen" ;
+ Text [ spanish ] = "~Añadir" ;
+ Text [ english_us ] = "~Add" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)";
+ Text[ russian ] = "Äîáàâèòü";
+ Text[ polish ] = "Dodaj";
+ Text[ japanese ] = "’ljÁ(~A)";
+ Text[ chinese_traditional ] = "¼W¥[(~A)";
+ Text[ arabic ] = "ÅÖÇÝÉ";
+ Text[ greek ] = "ÐñïóèÞêç";
+ Text[ korean ] = "Ãß°¡(~A)";
+ Text[ turkish ] = "E~kle";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_WORK_ON
+ {
+ Pos = MAP_APPFONT ( 204 , 38 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "B~earbeiten..." ;
+ Text [ ENGLISH ] = "~Work on..." ;
+ Text [ norwegian ] = "~Arbeide med..." ;
+ Text [ italian ] = "Modifica..." ;
+ Text [ portuguese_brazilian ] = "~Operar em..." ;
+ Text [ portuguese ] = "~Editar..." ;
+ Text [ finnish ] = "~Käsittele..." ;
+ Text [ danish ] = "Rediger..." ;
+ Text [ french ] = "~Personnaliser..." ;
+ Text [ swedish ] = "R~edigera..." ;
+ Text [ dutch ] = "~Bewerken..." ;
+ Text [ spanish ] = "E~ditar..." ;
+ Text [ english_us ] = "~Edit..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "±à¼­(~E)...";
+ Text[ russian ] = "Ïðàâêà...";
+ Text[ polish ] = "Edytuj...";
+ Text[ japanese ] = "•ÒW(~E)...";
+ Text[ chinese_traditional ] = "½s¿è(~E)...";
+ Text[ arabic ] = "ÊÍÑíÑ...";
+ Text[ greek ] = "Åðåîåñãáóßá...";
+ Text[ korean ] = "ÆíÁý(~E)...";
+ Text[ turkish ] = "D~üzenle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_DELETE
+ {
+ Pos = MAP_APPFONT ( 204 , 54 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen... : ~L÷schen... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen... : ~L÷schen... */
+ Text = "~Löschen..." ;
+ Text [ ENGLISH ] = "~Delete..." ;
+ Text [ norwegian ] = "~Delete..." ;
+ Text [ italian ] = "Elimina..." ;
+ Text [ portuguese_brazilian ] = "~Apagar..." ;
+ Text [ portuguese ] = "E~liminar..." ;
+ Text [ finnish ] = "~Poista..." ;
+ Text [ danish ] = "Slet..." ;
+ Text [ french ] = "~Supprimer..." ;
+ Text [ swedish ] = "R~adera..." ;
+ Text [ dutch ] = "~Wissen..." ;
+ Text [ spanish ] = "~Eliminar..." ;
+ 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...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_MODIFY
+ {
+ Pos = MAP_APPFONT ( 204 , 22 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Ändern : ~Žndern */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Ändern : ~Žndern */
+ Text = "~Ändern" ;
+ Text [ ENGLISH ] = "M~odify" ;
+ Text [ norwegian ] = "En~dre" ;
+ Text [ italian ] = "~Cambia" ;
+ Text [ portuguese_brazilian ] = "M~odificar" ;
+ Text [ portuguese ] = "~Modificar" ;
+ Text [ finnish ] = "~Muokkaa" ;
+ Text [ danish ] = "Modificer" ;
+ Text [ french ] = "~Appliquer" ;
+ Text [ swedish ] = "~Ändra" ;
+ Text [ dutch ] = "Wij~zigen" ;
+ Text [ spanish ] = "M~odificar" ;
+ Text [ english_us ] = "Modi~fy" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "¸ü¸Ä(~M)";
+ Text[ russian ] = "Èçìåíèòü";
+ Text[ polish ] = "Z~amieñ";
+ Text[ japanese ] = "•ÏX(~M)";
+ Text[ chinese_traditional ] = "Åܧó(~M)";
+ Text[ arabic ] = "ÊÛííÑ";
+ Text[ greek ] = "Ôñïðïðïßçóç";
+ Text[ korean ] = "º¯°æ(~F)";
+ Text[ turkish ] = "~Deðiþtir";
+ Text[ language_user1 ] = " ";
+ };
+ Edit EDT_NAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 142 , 6 ) ;
+ Size = MAP_APPFONT ( 57 , 12 ) ;
+ TabStop = TRUE ;
+ };
+ MetricField MTR_FLD_1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 135 , 64 ) ;
+ Size = MAP_APPFONT ( 32 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ Last = 100 ;
+ };
+ MetricField MTR_FLD_2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 135 , 79 ) ;
+ Size = MAP_APPFONT ( 32 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ Last = 100 ;
+ };
+ MetricField MTR_FLD_3
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 135 , 94 ) ;
+ Size = MAP_APPFONT ( 32 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ Last = 100 ;
+ };
+ MetricField MTR_FLD_4
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 135 , 109 ) ;
+ Size = MAP_APPFONT ( 32 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ Last = 100 ;
+ };
+ ListBox LB_COLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 142 , 23 ) ;
+ Size = MAP_APPFONT ( 57 , 65 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ FixedText FT_1
+ {
+ Pos = MAP_APPFONT ( 124 , 66 ) ;
+ Size = MAP_APPFONT ( 8 , 10 ) ;
+ Text = "~C" ;
+ };
+ FixedText FT_2
+ {
+ Pos = MAP_APPFONT ( 124 , 81 ) ;
+ Size = MAP_APPFONT ( 8 , 10 ) ;
+ Text = "~M" ;
+ };
+ FixedText FT_3
+ {
+ Pos = MAP_APPFONT ( 124 , 96 ) ;
+ Size = MAP_APPFONT ( 8 , 10 ) ;
+ Text = "~Y" ;
+ };
+ FixedText FT_4
+ {
+ Pos = MAP_APPFONT ( 124 , 111 ) ;
+ Size = MAP_APPFONT ( 8 , 10 ) ;
+ Text = "~K" ;
+ };
+ FixedText FT_NAME
+ {
+ Pos = MAP_APPFONT ( 118 , 8 ) ;
+ Size = MAP_APPFONT ( 23 , 10 ) ;
+ Text = "~Name" ;
+ Text [ ENGLISH ] = "~Name" ;
+ Text [ norwegian ] = "~Navn" ;
+ Text [ italian ] = "~Nome" ;
+ Text [ portuguese_brazilian ] = "~Nome" ;
+ 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" ;
+ 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 ] = " ";
+ };
+ FixedText FT_COLOR
+ {
+ Pos = MAP_APPFONT ( 118 , 25 ) ;
+ Size = MAP_APPFONT ( 23 , 10 ) ;
+ Text = "~Farbe" ;
+ Text [ ENGLISH ] = "~Color" ;
+ Text [ norwegian ] = "~Color" ;
+ Text [ italian ] = "~Colore" ;
+ Text [ portuguese_brazilian ] = "~Cor" ;
+ Text [ portuguese ] = "~Cor" ;
+ Text [ finnish ] = "~Väri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "~Couleur" ;
+ Text [ swedish ] = "~Färg" ;
+ Text [ dutch ] = "~Kleur" ;
+ Text [ spanish ] = "Co~lor" ;
+ 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 ] = "~Renk";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_COLORMODEL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 124 , 49 ) ;
+ Size = MAP_APPFONT ( 43 , 40 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "RVB" ; Default ; > ;
+ < "CMJN" ; Default ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "RGB" ; Default ; > ;
+ < "CMYK" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ GroupBox GRP_COLORTABLE
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 106 , 126 ) ;
+ Text = "Farbtabelle" ;
+ Text [ ENGLISH ] = "Colortable" ;
+ Text [ norwegian ] = "Fargetabell" ;
+ Text [ italian ] = "Tavola dei colori" ;
+ Text [ portuguese_brazilian ] = "Tabela de cores" ;
+ Text [ portuguese ] = "Tabela de cores" ;
+ Text [ finnish ] = "Väritaulukko" ;
+ Text [ danish ] = "Farvetabel" ;
+ Text [ french ] = "Palette de couleurs" ;
+ Text [ swedish ] = "Färgtabell" ;
+ Text [ dutch ] = "Kleurentabel" ;
+ Text [ spanish ] = "Tabla de colores" ;
+ Text [ english_us ] = "Standard colors" ;
+ Text[ chinese_simplified ] = "µ÷É«°å";
+ Text[ russian ] = "Òàáëèöà öâåòîâ";
+ Text[ polish ] = "Tabela kolorów";
+ Text[ japanese ] = "•W€F";
+ Text[ chinese_traditional ] = "½Õ¦âªO";
+ Text[ arabic ] = "ÞÇÆãÉ ÇáÃáæÇä";
+ Text[ greek ] = "Ðßíáêáò ÷ñùìÜôùí";
+ Text[ korean ] = "»ö»óÇ¥";
+ Text[ turkish ] = "Renk tablosu";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 178 , 71 ) ;
+ Size = MAP_APPFONT ( 54 , 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ÇáãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_COLORMODEL
+ {
+ Pos = MAP_APPFONT ( 118 , 38 ) ;
+ Size = MAP_APPFONT ( 55 , 91 ) ;
+ Text = "Farbmodell" ;
+ Text [ ENGLISH ] = "Colormodel" ;
+ Text [ norwegian ] = "Fargemodell" ;
+ Text [ italian ] = "Modello colore" ;
+ Text [ portuguese_brazilian ] = "Modelo de cor" ;
+ Text [ portuguese ] = "Modelo de cor" ;
+ Text [ finnish ] = "Värimalli" ;
+ Text [ danish ] = "Farvemodel" ;
+ Text [ french ] = "Modèle" ;
+ Text [ swedish ] = "Färgmodell" ;
+ Text [ dutch ] = "Kleurmodel" ;
+ Text [ spanish ] = "Modelo color" ;
+ Text [ english_us ] = "Color sample" ;
+ Text[ chinese_simplified ] = "ÑÕÉ«ÀàÐÍ";
+ Text[ russian ] = "Ìîäåëü öâåòà";
+ Text[ polish ] = "Model koloru";
+ Text[ japanese ] = "¶×°ÓÃÞÙ";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "ÃC¦âÃþ«¬";
+ Text[ arabic ] = "ÚíäÉ Çááæä";
+ Text[ greek ] = "Äåßãìá ÷ñþìáôïò";
+ Text[ korean ] = "»ö ¸ðµ¨";
+ Text[ turkish ] = "Renk modeli";
+ };
+ ImageButton BTN_LOAD
+ {
+ Pos = MAP_APPFONT ( 238 , 94 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Farbtabelle laden" ;
+ QuickHelpText [ ENGLISH ] = "Load color list" ;
+ QuickHelpText [ norwegian ] = "Last inn fargeliste" ;
+ QuickHelpText [ italian ] = "Carica tavola dei colori" ;
+ QuickHelpText [ portuguese_brazilian ] = "Carregar lista de cores" ;
+ QuickHelpText [ portuguese ] = "Carrega a palete de cores" ;
+ QuickHelpText [ finnish ] = "Lue väriluettelo" ;
+ QuickHelpText [ danish ] = "Indlæs farvetabel" ;
+ QuickHelpText [ french ] = "Charger la palette de couleurs" ;
+ QuickHelpText [ swedish ] = "Ladda färgtabell" ;
+ QuickHelpText [ dutch ] = "Kleurenlijst laden" ;
+ QuickHelpText [ spanish ] = "Cargar tabla de colores" ;
+ QuickHelpText [ english_us ] = "Load Color List" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05501.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Çàãðóçèòü íàáîð öâåòîâ";
+ QuickHelpText[ polish ] = "£aduj tabelê kolorów";
+ QuickHelpText[ japanese ] = "F‚Ì•\\‚ðÛ°ÄÞ‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "×°ÔØÑÕÉ«±í";
+ QuickHelpText[ chinese_traditional ] = "¸Ë¸üÃC¦âªí";
+ QuickHelpText[ arabic ] = "ÊÍãíá ÞÇÆãÉ ÇáÃáæÇä";
+ QuickHelpText[ greek ] = "Öüñôùóç ëßóôáò ÷ñùìÜôùí";
+ QuickHelpText[ korean ] = "Load Color List";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton BTN_SAVE
+ {
+ Pos = MAP_APPFONT ( 238 , 113 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Farbtabelle sichern" ;
+ QuickHelpText [ ENGLISH ] = "Save color list" ;
+ QuickHelpText [ norwegian ] = "Lagre fargeliste" ;
+ QuickHelpText [ italian ] = "Salva tavola dei colori" ;
+ QuickHelpText [ portuguese_brazilian ] = "Gravar lista de cores" ;
+ QuickHelpText [ portuguese ] = "Guarda a palete de cores" ;
+ QuickHelpText [ finnish ] = "Tallenna väriluettelo" ;
+ QuickHelpText [ danish ] = "Gem farvetabel" ;
+ QuickHelpText [ french ] = "Enregistrer la palette de couleurs" ;
+ QuickHelpText [ swedish ] = "Spara färgtabell" ;
+ QuickHelpText [ dutch ] = "Kleurenlijst opslaan" ;
+ QuickHelpText [ spanish ] = "Guardar tabla de colores" ;
+ QuickHelpText [ english_us ] = "Save Color List" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05502.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Ñîõðàíèòü íàáîð öâåòîâ";
+ QuickHelpText[ polish ] = "Zapisz tabelê kolorów";
+ QuickHelpText[ japanese ] = "F‚Ì•\\‚ð•Û‘¶‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "±£´æÑÕÉ«±í";
+ QuickHelpText[ chinese_traditional ] = "Àx¦sÃC¦âªí";
+ QuickHelpText[ arabic ] = "ÍÝÙ ÞÇÆãÉ ÇáÃáæÇä";
+ QuickHelpText[ greek ] = "ÁðïèÞêåõóç ëßóôáò ÷ñùìÜôùí";
+ QuickHelpText[ korean ] = "Save Color List";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ 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 ] = " ";
+};
+ // RID_SVXDLG_AREA ----------------------------------------------------------
+TabDialog RID_SVXDLG_AREA
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 289 , 176 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fläche : Flõche */
+ /* ### ACHTUNG: Neuer Text in Resource? Fläche : Flõche */
+ Text = "Fläche" ;
+ Text [ ENGLISH ] = "Area" ;
+ Text [ norwegian ] = "Area" ;
+ Text [ italian ] = "Area" ;
+ Text [ portuguese_brazilian ] = "Preenchimento do Objeto" ;
+ Text [ portuguese ] = "Preenchimento" ;
+ Text [ finnish ] = "Objektin täyte" ;
+ Text [ danish ] = "Flade" ;
+ Text [ french ] = "Remplissage" ;
+ Text [ swedish ] = "Yta" ;
+ Text [ dutch ] = "Vlak" ;
+ Text [ spanish ] = "Relleno" ;
+ Text [ english_us ] = "Area" ;
+ Moveable = TRUE ;
+ TabControl 1
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_AREA ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fläche : Flõche */
+ /* ### ACHTUNG: Neuer Text in Resource? Fläche : Flõche */
+ Text = "Fläche" ;
+ Text [ ENGLISH ] = "Object Fill" ;
+ Text [ norwegian ] = "Object Fill" ;
+ Text [ italian ] = "Area" ;
+ Text [ portuguese_brazilian ] = "Preenchimento do Objeto" ;
+ Text [ portuguese ] = "Preenchimento" ;
+ Text [ finnish ] = "Objektin täyte" ;
+ Text [ danish ] = "Flade" ;
+ Text [ french ] = "Remplissage" ;
+ Text [ swedish ] = "Yta" ;
+ Text [ dutch ] = "Vlak" ;
+ Text [ spanish ] = "Relleno" ;
+ Text [ english_us ] = "Area" ;
+ PageResID = RID_SVXPAGE_AREA ;
+ Text[ chinese_simplified ] = "³äÌî";
+ Text[ russian ] = "Îáëàñòü";
+ Text[ polish ] = "Obszar";
+ Text[ japanese ] = "•\\–Ê";
+ Text[ chinese_traditional ] = "¥R¶ñ";
+ Text[ arabic ] = "ÇáãÓÇÍÉ";
+ Text[ greek ] = "ÅðéöÜíåéá";
+ Text[ korean ] = "¿µ¿ª";
+ Text[ turkish ] = "Yüzey";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_SHADOW ;
+ Text = "Schatten" ;
+ Text [ ENGLISH ] = "Shadow" ;
+ PageResID = RID_SVXPAGE_SHADOW ;
+ Text [ english_us ] = "Shadow" ;
+ Text [ italian ] = "Ombre" ;
+ Text [ spanish ] = "Sombra" ;
+ Text [ french ] = "Ombre" ;
+ Text [ dutch ] = "Schaduw" ;
+ Text [ swedish ] = "Skugga" ;
+ Text [ danish ] = "Skygger" ;
+ Text [ portuguese_brazilian ] = "Schatten" ;
+ Text [ portuguese ] = "Sombras" ;
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ russian ] = "Òåíü";
+ Text[ polish ] = "Cieñ";
+ Text[ japanese ] = "‰e";
+ Text[ chinese_traditional ] = "³±¼v";
+ Text[ arabic ] = "􇂇";
+ Text[ greek ] = "ÓêéÜ";
+ Text[ korean ] = "À½¿µ";
+ Text[ turkish ] = "Gölge";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_TRANSPARENCE ;
+ Text = "Transparenz" ;
+ Text [ ENGLISH ] = "Transparence" ;
+ Text[ english_us ] = "Transparency";
+ Text[ portuguese ] = "Transparência";
+ Text[ russian ] = "Ïðîçðà÷íàÿ";
+ Text[ greek ] = "ÄéáöÜíåéá";
+ Text[ dutch ] = "Transparantie";
+ Text[ french ] = "Transparence";
+ Text[ spanish ] = "Transparencia";
+ Text[ italian ] = "Trasparenza";
+ Text[ danish ] = "Transparens";
+ Text[ swedish ] = "Transparens";
+ Text[ polish ] = "PrzezroczystoϾ";
+ Text[ portuguese_brazilian ] = "Transparence";
+ Text[ japanese ] = "“§‰ß«";
+ Text[ korean ] = "Åõ¸í";
+ Text[ chinese_simplified ] = "͸Ã÷";
+ Text[ chinese_traditional ] = "³z©ú";
+ Text[ arabic ] = "ÇáÔÝÇÝíÉ";
+ Text[ turkish ] = "Saydamlýk";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_COLOR ;
+ Text = "Farben" ;
+ Text [ ENGLISH ] = "Colors" ;
+ Text [ norwegian ] = "Colors" ;
+ Text [ italian ] = "Colori" ;
+ Text [ portuguese_brazilian ] = "Cores" ;
+ Text [ portuguese ] = "Cores" ;
+ Text [ finnish ] = "Värit" ;
+ Text [ danish ] = "Farver" ;
+ Text [ french ] = "Couleurs" ;
+ Text [ swedish ] = "Färger" ;
+ Text [ dutch ] = "Kleuren" ;
+ Text [ spanish ] = "Colores" ;
+ Text [ english_us ] = "Colors" ;
+ PageResID = RID_SVXPAGE_COLOR ;
+ 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 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_GRADIENT ;
+ /* ### ACHTUNG: Neuer Text in Resource? Farbverläufe : Farbverlõufe */
+ /* ### ACHTUNG: Neuer Text in Resource? Farbverläufe : Farbverlõufe */
+ Text = "Farbverläufe" ;
+ Text [ ENGLISH ] = "Gradients" ;
+ Text [ norwegian ] = "+++Gradients" ;
+ Text [ italian ] = "Sfumature" ;
+ Text [ portuguese_brazilian ] = "Dégradés" ;
+ Text [ portuguese ] = "Gradações" ;
+ Text [ finnish ] = "Liukuvärit" ;
+ Text [ danish ] = "Farvegradueringer" ;
+ Text [ french ] = "Dégradés" ;
+ Text [ swedish ] = "Färggradienter" ;
+ Text [ dutch ] = "Kleurverloop" ;
+ Text [ spanish ] = "Gradientes" ;
+ Text [ english_us ] = "Gradients" ;
+ PageResID = RID_SVXPAGE_GRADIENT ;
+ Text[ chinese_simplified ] = "²Êɫͼ°¸";
+ Text[ russian ] = "Ãðàäèåíòíûå";
+ Text[ polish ] = "Gradient";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý";
+ Text[ chinese_traditional ] = "±m¦â¹Ï®×";
+ Text[ arabic ] = "ÊÏÑÌ Çááæä";
+ Text[ greek ] = "Äéáâáèìßóåéò ÷ñùìÜôùí";
+ Text[ korean ] = "±×¶óµ¥À̼Ç";
+ Text[ turkish ] = "Gradyan";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_HATCH ;
+ Text = "Schraffuren" ;
+ Text [ ENGLISH ] = "Hatches" ;
+ Text [ norwegian ] = "Skravering" ;
+ Text [ italian ] = "Tratteggi" ;
+ Text [ portuguese_brazilian ] = "Traços de sombreado" ;
+ Text [ portuguese ] = "Tracejados" ;
+ Text [ finnish ] = "Viivoitukset" ;
+ Text [ danish ] = "Skraveringer" ;
+ Text [ french ] = "Hachures" ;
+ Text [ swedish ] = "Skrafferingar" ;
+ Text [ dutch ] = "Arceringen" ;
+ Text [ spanish ] = "Tramas" ;
+ Text [ english_us ] = "Hatching" ;
+ PageResID = RID_SVXPAGE_HATCH ;
+ Text[ chinese_simplified ] = "ÒõÓ°Ïß";
+ Text[ russian ] = "Øòðèõîâêè";
+ Text[ polish ] = "Kreskowanie";
+ Text[ japanese ] = "ʯÁݸÞ";
+ Text[ chinese_traditional ] = "³±¼v";
+ Text[ arabic ] = "äÞæÔ";
+ Text[ greek ] = "ÃñáììïóêéÝò";
+ Text[ korean ] = "ÇØĪ";
+ Text[ turkish ] = "Desen";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_BITMAP ;
+ Text = "Bitmapmuster" ;
+ Text [ ENGLISH ] = "Bitmaps" ;
+ Text [ norwegian ] = "Punktmatriser" ;
+ Text [ italian ] = "Bitmap" ;
+ Text [ portuguese_brazilian ] = "Bitmaps" ;
+ Text [ portuguese ] = "Modelos de bitmap" ;
+ Text [ finnish ] = "Bittikartat" ;
+ Text [ danish ] = "Bitmapmønstre" ;
+ Text [ french ] = "Motifs bitmaps" ;
+ Text [ swedish ] = "Bitmapmönster" ;
+ Text [ dutch ] = "Bitmappatronen" ;
+ Text [ spanish ] = "Modelos de bitmap" ;
+ Text [ english_us ] = "Bitmaps" ;
+ PageResID = RID_SVXPAGE_BITMAP ;
+ Text[ chinese_simplified ] = "λͼͼ°¸";
+ Text[ russian ] = "Îáðàçöû bitmap";
+ Text[ polish ] = "Wzorzec mapy bitowej";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï¹Ï®×";
+ Text[ arabic ] = "äãÇÐÌ ÇáÕæÑ ÇáäÞØíÉ";
+ Text[ greek ] = "Ó÷Ýäéá Bitmap";
+ Text[ korean ] = "ºñÆ®¸Ê ÆÐÅÏ";
+ Text[ turkish ] = "Bit eþlem";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "ƽÃæ";
+ Text[ russian ] = "Îáëàñòü";
+ Text[ polish ] = "Obszar";
+ Text[ japanese ] = "•\\–Ê";
+ Text[ chinese_traditional ] = "¥­­±";
+ Text[ arabic ] = "ÇáãÓÇÍÉ";
+ Text[ greek ] = "ÅðéöÜíåéá";
+ Text[ korean ] = "¿µ¿ª";
+ Text[ turkish ] = "Yüzey";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/tabline.cxx b/svx/source/dialog/tabline.cxx
new file mode 100644
index 0000000000..12c9cb4d78
--- /dev/null
+++ b/svx/source/dialog/tabline.cxx
@@ -0,0 +1,268 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabline.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_TABLINE_CXX
+#include "dialogs.hrc"
+#include "tabline.hrc"
+#include "dlgname.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_DASH_LIST SID_DASH_LIST
+#define ITEMID_LINEEND_LIST SID_LINEEND_LIST
+
+#include "tabline.hxx"
+#include "dlgname.hxx"
+#include "dialmgr.hxx"
+#include "svdmodel.hxx"
+#include "xtable.hxx"
+#include "drawitem.hxx"
+
+#define DLGWIN this->GetParent()->GetParent()
+
+#define BITMAP_WIDTH 32
+#define BITMAP_HEIGHT 12
+#define XOUT_WIDTH 150
+
+/*************************************************************************
+|*
+|* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
+|*
+\************************************************************************/
+
+SvxLineTabDialog::SvxLineTabDialog
+(
+ Window* pParent,
+ const SfxItemSet* pAttr,
+ SdrModel* pModel,
+ const SdrObject* pSdrObj,
+ BOOL bHasObj
+) :
+
+ SfxTabDialog ( pParent, SVX_RES( RID_SVXDLG_LINE ), pAttr ),
+ pDrawModel ( pModel ),
+ pObj ( pSdrObj ),
+ bObjSelected ( bHasObj ),
+ pColorTab ( pModel->GetColorTable() ),
+ pDashList ( pModel->GetDashList() ),
+ pLineEndList ( pModel->GetLineEndList() ),
+ pNewDashList ( pModel->GetDashList() ),
+ pNewLineEndList ( pModel->GetLineEndList() ),
+ rOutAttrs ( *pAttr )
+
+{
+ FreeResource();
+
+ AddTabPage( RID_SVXPAGE_LINE, SvxLineTabPage::Create, 0);
+ AddTabPage( RID_SVXPAGE_LINE_DEF, SvxLineDefTabPage::Create, 0);
+ AddTabPage( RID_SVXPAGE_LINEEND_DEF, SvxLineEndDefTabPage::Create, 0);
+
+ nLineEndListState = CT_NONE;
+ nDashListState = CT_NONE;
+
+ nDlgType = 0;
+ nPageType = 0; // wird hier in erster Linie benutzt, um mit FillItemSet
+ // die richtigen Attribute zu erhalten ( noch Fragen? )
+ nPosDashLb = 0;
+ nPosLineEndLb = 0;
+
+ SetCurPageId( RID_SVXPAGE_LINE );
+
+ CancelButton& rBtnCancel = GetCancelButton();
+ rBtnCancel.SetClickHdl( LINK( this, SvxLineTabDialog, CancelHdl ) );
+//! rBtnCancel.SetText( SVX_RESSTR( RID_SVXSTR_CLOSE ) );
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineTabDialog::~SvxLineTabDialog()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineTabDialog::SavePalettes()
+{
+ if( pNewDashList != pDrawModel->GetDashList() )
+ {
+ delete pDrawModel->GetDashList();
+ pDrawModel->SetDashList( pNewDashList );
+ SfxObjectShell::Current()->PutItem( SvxDashListItem( pNewDashList ) );
+ pDashList = pDrawModel->GetDashList();
+ }
+ if( pNewLineEndList != pDrawModel->GetLineEndList() )
+ {
+ delete pDrawModel->GetLineEndList();
+ pDrawModel->SetLineEndList( pNewLineEndList );
+ SfxObjectShell::Current()->PutItem( SvxLineEndListItem( pNewLineEndList ) );
+ pLineEndList = pDrawModel->GetLineEndList();
+ }
+
+ // Speichern der Tabellen, wenn sie geaendert wurden.
+
+ const String aPath( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+
+ if( nDashListState & CT_MODIFIED )
+ {
+ pDashList->SetPath( aPath );
+ pDashList->Save();
+
+ // ToolBoxControls werden benachrichtigt:
+ SfxObjectShell::Current()->PutItem( SvxDashListItem( pDashList ) );
+ }
+
+ if( nLineEndListState & CT_MODIFIED )
+ {
+ pLineEndList->SetPath( aPath );
+ pLineEndList->Save();
+
+ // ToolBoxControls werden benachrichtigt:
+ SfxObjectShell::Current()->PutItem( SvxLineEndListItem( pLineEndList ) );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+short SvxLineTabDialog::Ok()
+{
+ SavePalettes();
+
+ // Es wird RET_OK zurueckgeliefert, wenn wenigstens eine
+ // TabPage in FillItemSet() TRUE zurueckliefert. Dieses
+ // geschieht z.Z. standardmaessig.
+ return( SfxTabDialog::Ok() );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxLineTabDialog, CancelHdl, void *, p )
+{
+ SavePalettes();
+
+ EndDialog( RET_CANCEL );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxLineTabDialog, CancelHdl, void *, p )
+
+// -----------------------------------------------------------------------
+
+void SvxLineTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+{
+ switch( nId )
+ {
+ case RID_SVXPAGE_LINE:
+ ( (SvxLineTabPage&) rPage ).SetColorTable( pColorTab );
+ ( (SvxLineTabPage&) rPage ).SetDashList( pDashList );
+ ( (SvxLineTabPage&) rPage ).SetLineEndList( pLineEndList );
+ ( (SvxLineTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxLineTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxLineTabPage&) rPage ).SetPosDashLb( &nPosDashLb );
+ ( (SvxLineTabPage&) rPage ).SetPosLineEndLb( &nPosLineEndLb );
+ ( (SvxLineTabPage&) rPage ).SetDashChgd( &nDashListState );
+ ( (SvxLineTabPage&) rPage ).SetLineEndChgd( &nLineEndListState );
+ ( (SvxLineTabPage&) rPage ).SetObjSelected( bObjSelected );
+ ( (SvxLineTabPage&) rPage ).Construct();
+ // ActivatePage() wird das erste mal nicht gerufen
+ ( (SvxLineTabPage&) rPage ).ActivatePage( rOutAttrs );
+ break;
+
+ case RID_SVXPAGE_LINE_DEF:
+ ( (SvxLineDefTabPage&) rPage ).SetDashList( pDashList );
+ ( (SvxLineDefTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxLineDefTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxLineDefTabPage&) rPage ).SetPosDashLb( &nPosDashLb );
+ ( (SvxLineDefTabPage&) rPage ).SetDashChgd( &nDashListState );
+ ( (SvxLineDefTabPage&) rPage ).SetObjSelected( bObjSelected );
+ ( (SvxLineDefTabPage&) rPage ).Construct();
+ break;
+
+ case RID_SVXPAGE_LINEEND_DEF:
+ ( (SvxLineEndDefTabPage&) rPage ).SetLineEndList( pLineEndList );
+ ( (SvxLineEndDefTabPage&) rPage ).SetPolyObj( pObj );
+ ( (SvxLineEndDefTabPage&) rPage ).SetDlgType( &nDlgType );
+ ( (SvxLineEndDefTabPage&) rPage ).SetPageType( &nPageType );
+ ( (SvxLineEndDefTabPage&) rPage ).SetPosLineEndLb( &nPosLineEndLb );
+ ( (SvxLineEndDefTabPage&) rPage ).SetLineEndChgd( &nLineEndListState );
+ ( (SvxLineEndDefTabPage&) rPage ).SetObjSelected( bObjSelected );
+ ( (SvxLineEndDefTabPage&) rPage ).Construct();
+ break;
+ }
+}
+
+
diff --git a/svx/source/dialog/tabline.hrc b/svx/source/dialog/tabline.hrc
new file mode 100644
index 0000000000..3f2685ef03
--- /dev/null
+++ b/svx/source/dialog/tabline.hrc
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabline.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 TAB_CONTROL 1
+#define LB_COLOR 1
+#define FT_COLOR 1
+#define LB_LINE_STYLE 2
+#define FT_LINE_STYLE 3
+#define FT_LINE_WIDTH 2
+#define MTR_FLD_LINE_WIDTH 1
+#define TSB_INVISIBLE 1
+#define GRP_LINE 1
+#define GRP_LINE_ENDS 2
+#define FT_LINE_START 4
+#define FT_LINE_END 8
+#define FT_LINE_ENDS_STYLE 5
+#define FT_LINE_ENDS_WIDTH 6
+#define LB_START_STYLE 3
+#define LB_END_STYLE 4
+#define MTR_FLD_START_WIDTH 3
+#define MTR_FLD_END_WIDTH 2
+#define CBX_SYNCHRONIZE 1
+#define GRP_MEASURING 3
+#define CTL_POSITION 2
+#define FT_POSITION 9
+#define TSB_SHOW_MEASURING 2
+#define CTL_PREVIEW 1
+#define GRP_PREVIEW 4
+#define GRP_DEFINITION 1
+#define FT_NUMBER 3
+#define FT_DISTANCE 2
+#define FT_LENGTH 4
+#define TSB_SYNCHRONIZE 3
+#define LB_TYPE_1 3
+#define FT_TYPE 1
+#define LB_TYPE_2 1
+#define NUM_FLD_1 1
+#define NUM_FLD_2 2
+#define MTR_FLD_DISTANCE 1
+#define MTR_FLD_LENGTH_1 3
+#define MTR_FLD_LENGTH_2 4
+#define GRP_LINESTYLES 2
+#define LB_LINESTYLES 2
+#define BTN_ADD 1
+#define BTN_MODIFY 2
+#define BTN_DELETE 3
+#define BTN_LOAD 5
+#define BTN_SAVE 6
+#define EDT_NAME 1
+#define LB_LINEENDS 1
+#define GRP_LINEENDS 2
+#define GRP_TIP 1
+#define FI_TIP 10
+#define TSB_CENTER_START 4
+#define TSB_CENTER_END 5
+#define FT_TRANSPARENT 10
+//#define LB_TRANSPARENT 5
+#define MTR_LINE_TRANSPARENT 5
+
+
+//Symbole (fuer StarChart)
+#define FT_SYMBOL_WIDTH 20
+#define FT_SYMBOL_HEIGHT 21
+#define MF_SYMBOL_WIDTH 22
+#define MF_SYMBOL_HEIGHT 23
+#define CB_SYMBOL_RATIO 24
+#define GB_SYMBOL_FORMAT 25
+#define MB_SYMBOL_BITMAP 26
+
+
+#define MN_GRAPHIC_DLG 1
+#define MN_GALLERY 2
+#define MN_SYMBOLS 3
+#define MN_SYMBOLS_NONE 4
+#define MN_SYMBOLS_AUTO 5
+#define MN_GALLERY_ENTRY 100
+
+
diff --git a/svx/source/dialog/tabline.src b/svx/source/dialog/tabline.src
new file mode 100644
index 0000000000..3d5fb5145b
--- /dev/null
+++ b/svx/source/dialog/tabline.src
@@ -0,0 +1,2104 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabline.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "tabline.hrc"
+ // RID_SVXPAGE_LINE ---------------------------------------------------------
+TabPage RID_SVXPAGE_LINE
+{
+ HelpId = HID_LINE_LINE ;
+ Hide = TRUE ;
+ Text = "Linie" ;
+ Text [ English ] = "Line" ;
+ Text [ norwegian ] = "Linje" ;
+ Text [ italian ] = "Linea" ;
+ Text [ portuguese_brazilian ] = "Linha" ;
+ Text [ portuguese ] = "Linha" ;
+ Text [ finnish ] = "Viiva" ;
+ Text [ danish ] = "Streg" ;
+ Text [ french ] = "Ligne" ;
+ Text [ swedish ] = "Linje" ;
+ Text [ dutch ] = "Lijn" ;
+ Text [ spanish ] = "Línea" ;
+ Text [ english_us ] = "Lines" ;
+ Text[ chinese_simplified ] = "ÏßÌõ";
+ Text[ russian ] = "Ëèíèÿ";
+ Text[ polish ] = "Linia";
+ Text[ japanese ] = "ü";
+ Text[ chinese_traditional ] = "½u±ø";
+ Text[ arabic ] = "ÎØ";
+ Text[ greek ] = "ÃñáììÞ";
+ Text[ korean ] = "¼±";
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ GroupBox GRP_LINE
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 109 , 78 ) ;
+ 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 ] = "Línea" ;
+ 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_LINE_STYLE
+ {
+ Pos = MAP_APPFONT ( 12 , 16 ) ;
+ Size = MAP_APPFONT ( 30 , 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 ] = "Biçim";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LINE_STYLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 45 , 14 ) ;
+ Size = MAP_APPFONT ( 64 , 80 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ FixedText FT_COLOR
+ {
+ Pos = MAP_APPFONT ( 12 , 33 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "~Farbe" ;
+ Text [ ENGLISH ] = "~Color" ;
+ Text [ norwegian ] = "~Color" ;
+ Text [ italian ] = "~Colore" ;
+ Text [ portuguese_brazilian ] = "~Cor" ;
+ Text [ portuguese ] = "~Cor" ;
+ Text [ finnish ] = "~V„ri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "~Couleur" ;
+ Text [ swedish ] = "~Färg" ;
+ 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_COLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 45 , 31 ) ;
+ Size = MAP_APPFONT ( 64 , 80 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ FixedText FT_LINE_WIDTH
+ {
+ Pos = MAP_APPFONT ( 12 , 49 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "~Breite" ;
+ Text [ ENGLISH ] = "~Width" ;
+ Text [ norwegian ] = "~Bredde" ;
+ Text [ italian ] = "~Largh." ;
+ Text [ portuguese_brazilian ] = "~Largura" ;
+ Text [ portuguese ] = "~Largura" ;
+ Text [ finnish ] = "~Leveys" ;
+ Text [ danish ] = "Tykkelse" ;
+ 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 ] = "Geniþlik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_LINE_WIDTH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 60 , 48 ) ;
+ Size = MAP_APPFONT ( 49 , 12 ) ;
+ TabStop = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 5000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Value = 1 ;
+ Unit = FUNIT_MM ;
+ Last = 5000 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_TRANSPARENT
+ {
+ Pos = MAP_APPFONT ( 12 , 64 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "~Transparenz" ;
+ Text [ ENGLISH ] = "~Transparence" ;
+ Text [ english_us ] = "~Transparency" ;
+ Text [ italian ] = "~Trasparenza" ;
+ Text [ spanish ] = "Tran~sparencia" ;
+ Text [ french ] = "~Transparence" ;
+ Text [ dutch ] = "~Transparantie" ;
+ Text [ swedish ] = "~Transparens" ;
+ Text [ danish ] = "Transparens" ;
+ Text [ portuguese_brazilian ] = "~Transparenz" ;
+ Text [ portuguese ] = "~Transparência" ;
+ Text[ chinese_simplified ] = "͸Ã÷(~T)";
+ Text[ russian ] = "Ïðîçðà÷íîñòü";
+ Text[ polish ] = "PrzeŸroczystoœæ";
+ Text[ japanese ] = "“§–¾(~T)";
+ Text[ chinese_traditional ] = "³z©ú(~T)";
+ Text[ arabic ] = "ÔÝÇÝíÉ";
+ Text[ greek ] = "ÄéáöÜíåéá";
+ Text[ korean ] = "Åõ¸í(~T)";
+ Text[ turkish ] = "Saydamlýk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_LINE_TRANSPARENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 60 , 63 ) ;
+ Size = MAP_APPFONT ( 49 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 100 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ Last = 100 ;
+ SpinSize = 5 ;
+ };
+ GroupBox GRP_LINE_ENDS
+ {
+ Pos = MAP_APPFONT ( 121 , 3 ) ;
+ Size = MAP_APPFONT ( 133 , 78 ) ;
+ Text = "Linienenden" ;
+ Text [ ENGLISH ] = "Line Ends" ;
+ Text [ norwegian ] = "Linjeslutter" ;
+ Text [ italian ] = "Estremità linee" ;
+ Text [ portuguese_brazilian ] = "Finais de Linha" ;
+ Text [ portuguese ] = "Finais de linha" ;
+ Text [ finnish ] = "Viivanp„„t" ;
+ Text [ danish ] = "Pile" ;
+ Text [ french ] = "Extrémités de lignes" ;
+ Text [ swedish ] = "Radslut" ;
+ Text [ dutch ] = "Lijnuiteinden" ;
+ Text [ spanish ] = "Fin de línea" ;
+ Text [ english_us ] = "Arrow styles" ;
+ Text[ chinese_simplified ] = "Ï߶Ë";
+ Text[ russian ] = "Êîíöû ëèíèè";
+ Text[ polish ] = "Koñcówki linii";
+ Text[ japanese ] = "ü‚ÌI“_";
+ Text[ chinese_traditional ] = "½uºÝ";
+ Text[ arabic ] = "äåÇíÇÊ ÇáÎØ";
+ Text[ greek ] = "¢êñá ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ¾ç³¡";
+ Text[ turkish ] = "Çizgi uçlarý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_LINE_ENDS_STYLE
+ {
+ Pos = MAP_APPFONT ( 127 , 16 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "St~il" ;
+ Text [ ENGLISH ] = "St~yle" ;
+ Text [ norwegian ] = "S~til" ;
+ Text [ italian ] = "St~ile" ;
+ Text [ portuguese_brazilian ] = "E~stilo" ;
+ Text [ portuguese ] = "E~stilo" ;
+ Text [ finnish ] = "~Tyyli" ;
+ Text [ danish ] = "Type" ;
+ Text [ french ] = "~Style" ;
+ Text [ swedish ] = "St~il" ;
+ Text [ dutch ] = "Stij~l" ;
+ Text [ spanish ] = "Es~tilo" ;
+ Text [ english_us ] = "St~yle" ;
+ Text[ chinese_simplified ] = "ʽÑù(~Y)";
+ Text[ russian ] = "Ñòèëü";
+ Text[ polish ] = "Styl";
+ Text[ japanese ] = "½À²Ù(~Y)";
+ Text[ chinese_traditional ] = "¼Ë¦¡(~Y)";
+ Text[ arabic ] = "äãØ";
+ Text[ greek ] = "Óô~õë";
+ Text[ korean ] = "À¯Çü(~Y)";
+ Text[ turkish ] = "Biçim";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_START_STYLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 160 , 14 ) ;
+ Size = MAP_APPFONT ( 42 , 80 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ ListBox LB_END_STYLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 205 , 14 ) ;
+ Size = MAP_APPFONT ( 43 , 80 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ FixedText FT_LINE_ENDS_WIDTH
+ {
+ Pos = MAP_APPFONT ( 127 , 32 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "B~reite" ;
+ Text [ ENGLISH ] = "Wi~dth" ;
+ Text [ norwegian ] = "Bre~dde" ;
+ Text [ italian ] = "Largh." ;
+ Text [ portuguese_brazilian ] = "La~rgura" ;
+ Text [ portuguese ] = "La~rgura" ;
+ Text [ finnish ] = "~Leveys" ;
+ Text [ danish ] = "Tykkelse" ;
+ Text [ french ] = "La~rgeur" ;
+ Text [ swedish ] = "B~redd" ;
+ Text [ dutch ] = "~Breedte" ;
+ Text [ spanish ] = "A~ncho" ;
+ Text [ english_us ] = "Wi~dth" ;
+ Text[ chinese_simplified ] = "¿í(~D)";
+ Text[ russian ] = "Øèðèíà";
+ Text[ polish ] = "Szer.";
+ Text[ japanese ] = "•(~D)";
+ Text[ chinese_traditional ] = "¼e(~D)";
+ Text[ arabic ] = "ÇáÚÑÖ";
+ Text[ greek ] = "ÐëÜôïò";
+ Text[ korean ] = "³Êºñ(~D)";
+ Text[ turkish ] = "Geniþlik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_START_WIDTH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 160 , 31 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 5000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Value = 1 ;
+ Unit = FUNIT_MM ;
+ Last = 5000 ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_END_WIDTH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 205 , 31 ) ;
+ Size = MAP_APPFONT ( 43 , 12 ) ;
+ TabStop = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 5000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Value = 1 ;
+ Unit = FUNIT_MM ;
+ Last = 5000 ;
+ SpinSize = 10 ;
+ };
+ TriStateBox TSB_CENTER_START
+ {
+ Pos = MAP_APPFONT ( 160 , 46 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "~zentriert" ;
+ Text [ ENGLISH ] = "c~enter" ;
+ Text [ norwegian ] = "m~idtstill" ;
+ Text [ italian ] = "Centrato" ;
+ Text [ portuguese_brazilian ] = "c~entralizar" ;
+ Text [ portuguese ] = "c~entrado" ;
+ Text [ finnish ] = "c~enter" ;
+ Text [ danish ] = "centreret" ;
+ Text [ french ] = "~Centré" ;
+ Text [ swedish ] = "~Centrerat" ;
+ Text [ dutch ] = "~Centreren" ;
+ Text [ spanish ] = "Cen~trado" ;
+ Text [ english_us ] = "Ce~nter" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "¾ÓÖÐ(~N)";
+ Text[ russian ] = "ïî öåíòðó";
+ Text[ polish ] = "Wyœrodkuj";
+ Text[ japanese ] = "’†‰›(~C)";
+ Text[ chinese_traditional ] = "¸m¤¤(~C)";
+ Text[ arabic ] = "ÊæÓíØ";
+ Text[ greek ] = "êåíôñáñéóìÝíá";
+ Text[ korean ] = "°¡¿îµ¥(~N)";
+ Text[ turkish ] = "Ortala";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_CENTER_END
+ {
+ Pos = MAP_APPFONT ( 205 , 46 ) ;
+ Size = MAP_APPFONT ( 43 , 10 ) ;
+ Text = "z~entriert" ;
+ Text [ ENGLISH ] = "cente~r" ;
+ Text [ norwegian ] = "midtsti~ll" ;
+ Text [ italian ] = "Centrato" ;
+ Text [ portuguese_brazilian ] = "cent~ralizar" ;
+ Text [ portuguese ] = "cent~rado" ;
+ Text [ finnish ] = "cente~r" ;
+ Text [ danish ] = "centreret" ;
+ Text [ french ] = "~Centré" ;
+ Text [ swedish ] = "C~entrerat" ;
+ Text [ dutch ] = "C~entreren" ;
+ Text [ spanish ] = "Cent~rado" ;
+ Text [ english_us ] = "C~enter" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "¾ÓÖÐ(~E)";
+ Text[ russian ] = "ïî öåíòðó";
+ Text[ polish ] = "Wyœro~dkuj";
+ Text[ japanese ] = "’†‰›‘µ‚¦(~E)";
+ Text[ chinese_traditional ] = "¸m¤¤(~E)";
+ Text[ arabic ] = "ÊæÓíØ";
+ Text[ greek ] = "êåíôñáñéóìÝíá";
+ Text[ korean ] = "°¡¿îµ¥(~E)";
+ Text[ turkish ] = "Ortala";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CBX_SYNCHRONIZE
+ {
+ Pos = MAP_APPFONT ( 127 , 59 ) ;
+ Size = MAP_APPFONT ( 121 , 10 ) ;
+ Text = "En~den synchronisieren" ;
+ Text [ ENGLISH ] = "Sy~nchronize Ends" ;
+ Text [ norwegian ] = "Sy~nkroniser +++ SlutterEnds" ;
+ Text [ italian ] = "Si~ncronizza estremità" ;
+ Text [ portuguese_brazilian ] = "Si~ncronizar Finais" ;
+ Text [ portuguese ] = "Si~ncronizar finais" ;
+ Text [ finnish ] = "~Tahdista p„„t" ;
+ Text [ danish ] = "Synkroniser pilene" ;
+ Text [ french ] = "Sy~nchroniser les extrémités" ;
+ Text [ swedish ] = "Sy~nkronisera slut" ;
+ Text [ dutch ] = "~Uiteinden synchroniseren" ;
+ Text [ spanish ] = "Sincroni~zar finales" ;
+ Text [ english_us ] = "Synchroni~ze ends" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "Ï߶Ëͬ²½»¯(~N)";
+ Text[ russian ] = "Èäåíòè÷íûå êîíöû";
+ Text[ polish ] = "Synchronizuj koñce";
+ Text[ japanese ] = "¼Ý¸ÛŲ½Þ‚ðI—¹(~N)";
+ Text[ chinese_traditional ] = "½uºÝ¦P¨B¤Æ(~N)";
+ Text[ arabic ] = "ÊÒÇãä ÇáäåÇíÇÊ";
+ Text[ greek ] = "Óõã÷ñïíéóìüò Üêñùí";
+ Text[ korean ] = "µ¿±âÈ­ ³¡(~Z)";
+ Text[ turkish ] = "Uç~larý eþitle";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 6 , 87 ) ;
+ Size = MAP_APPFONT ( 248 , 42 ) ;
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸®º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 98 ) ;
+ Size = MAP_APPFONT ( 236 , 25 ) ;
+ TabStop = TRUE ;
+ };
+
+ //#58425# Symbole auf einer Linie (z.B. StarChart) ->
+ GroupBox GB_SYMBOL_FORMAT
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 118 , 3 ) ;//105,1
+ Size = MAP_APPFONT ( 126 , 73 ) ;
+ Text = "Symbol" ;
+ Text [ ENGLISH ] = "Symbol" ;
+ Text[ english_us ] = "Symbol";
+ Text[ portuguese ] = "Símbolo";
+ Text[ russian ] = "Ñèìâîë";
+ Text[ dutch ] = "Symbool";
+ Text[ french ] = "Symbole";
+ Text[ spanish ] = "Icono";
+ Text[ italian ] = "Simbolo";
+ Text[ danish ] = "Symbol";
+ Text[ swedish ] = "Symbol";
+ Text[ polish ] = "Symbol";
+ Text[ portuguese_brazilian ] = "Symbol";
+ Text[ japanese ] = "¼ÝÎÞÙ";
+ Text[ chinese_simplified ] = "ͼ±ê";
+ Text[ chinese_traditional ] = "¹Ï¥Ü";
+ Text[ arabic ] = "ÑãÒ";
+ Text[ greek ] = "Óýìâïëï";
+ Text[ korean ] = "±âÈ£";
+ Text[ turkish ] = "Simge";
+ Text[ language_user1 ] = " ";
+ };
+
+ MenuButton MB_SYMBOL_BITMAP
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 174 , 10 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Text = "Aus~wahl..." ;
+ Text [ ENGLISH ] = "~Select..." ;
+ ButtonMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_SYMBOLS_NONE;
+ Text = "Kein Symbol" ;
+ Text [ ENGLISH ] = "No Symbol" ;
+ Text[ english_us ] = "No Symbol";
+ Text[ portuguese ] = "Sem símbolos";
+ Text[ russian ] = "Áåç ñèìâîëà";
+ Text[ dutch ] = "Geen symbool";
+ Text[ french ] = "Aucun symbole";
+ Text[ spanish ] = "Sin símbolo";
+ Text[ italian ] = "Nessun simbolo";
+ Text[ danish ] = "Intet symbol";
+ Text[ swedish ] = "Ingen symbol";
+ Text[ polish ] = "Brak symbolu";
+ Text[ portuguese_brazilian ] = "No Symbol";
+ Text[ japanese ] = "¼ÝÎÞÙ‚È‚µ";
+ Text[ chinese_simplified ] = "ÎÞͼ±ê·ûºÅ";
+ Text[ chinese_traditional ] = "µL¹Ï¥Ü";
+ Text[ arabic ] = "ÈÏæä ÑãÒ";
+ Text[ greek ] = "ÊáíÝíá óýìâïëï";
+ Text[ korean ] = "±âÈ£°¡ ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "Simge yok";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_SYMBOLS_AUTO;
+ Text = "Automatisch" ;
+ Text [ ENGLISH ] = "Automatic" ;
+ // HelpID = ;
+ Text[ english_us ] = "Automatic";
+ Text[ portuguese ] = "Automático";
+ Text[ russian ] = "Àâòîìàòè÷åñêè";
+ Text[ dutch ] = "Automatisch";
+ Text[ french ] = "Automatique";
+ Text[ spanish ] = "Automático";
+ Text[ italian ] = "Automatico";
+ Text[ danish ] = "Automatisk";
+ Text[ swedish ] = "Automatiskt";
+ Text[ polish ] = "Automatycznie";
+ Text[ portuguese_brazilian ] = "Automatic";
+ Text[ japanese ] = "Ž©“®“I";
+ Text[ chinese_simplified ] = "×Ô¶¯";
+ Text[ chinese_traditional ] = "¦Û°Ê";
+ Text[ arabic ] = "ÊáÞÇÆí";
+ Text[ greek ] = "Áõôüìáôá";
+ Text[ korean ] = "ÀÚµ¿";
+ Text[ turkish ] = "Otomatik";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_GRAPHIC_DLG ;
+ Text = "Aus Datei..." ;
+ Text [ ENGLISH ] = "From file..." ;
+ Text [ portuguese ] = "Do ficheiro..." ;
+ Text [ english_us ] = "From file..." ;
+ Text [ portuguese_brazilian ] = "Aus Datei..." ;
+ Text [ swedish ] = "Från fil..." ;
+ Text [ danish ] = "Fra fil..." ;
+ Text [ italian ] = "Da file..." ;
+ Text [ spanish ] = "De archivo..." ;
+ Text [ french ] = "À partir d'un fichier..." ;
+ Text [ dutch ] = "Uit bestand..." ;
+ Text[ chinese_simplified ] = "´ÓÎļþ...";
+ Text[ russian ] = "Èç ôàéëà...";
+ Text[ polish ] = "Z pliku...";
+ Text[ japanese ] = "̧²Ù‚©‚ç...";
+ Text[ chinese_traditional ] = "±qÀÉ®×...";
+ Text[ arabic ] = "...ãä ãáÝ";
+ Text[ greek ] = "Áðü áñ÷åßï...";
+ Text[ korean ] = "ÆÄÀÏ·Î ºÎÅÍ...";
+ Text[ turkish ] = "Dosyadan...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_GALLERY ;
+ Text = "Gallery" ;
+ Text [ ENGLISH ] = "Gallery" ;
+ // HelpID = ;
+ Text[ english_us ] = "Gallery";
+ Text[ portuguese ] = "Gallery";
+ Text[ russian ] = "Ãàëåðåÿ";
+ Text[ dutch ] = "Gallery";
+ Text[ french ] = "Gallery";
+ Text[ spanish ] = "Gallery";
+ Text[ italian ] = "Gallery";
+ Text[ danish ] = "Gallery";
+ Text[ swedish ] = "Gallery";
+ Text[ polish ] = "Galeria";
+ Text[ portuguese_brazilian ] = "Gallery";
+ Text[ japanese ] = "·Þ¬×Ø°";
+ Text[ chinese_simplified ] = "»­ÀÈ";
+ Text[ chinese_traditional ] = "µe´Y";
+ Text[ arabic ] = "ÇáÌÇáíÑí";
+ Text[ greek ] = "Gallery";
+ Text[ korean ] = "°¶·¯¸®";
+ Text[ turkish ] = "Galeri";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_SYMBOLS;
+ Text [ ENGLISH ] = "Symbols" ;
+ Text = "Symbole" ;
+ // HelpID = ;
+ Text[ english_us ] = "Symbols";
+ Text[ portuguese ] = "Símbolos";
+ Text[ russian ] = "Ñèìâîëû";
+ Text[ dutch ] = "Symbolen";
+ Text[ french ] = "Symboles";
+ Text[ spanish ] = "Símbolos";
+ Text[ italian ] = "Simboli";
+ Text[ danish ] = "Symboler";
+ Text[ swedish ] = "Symboler";
+ Text[ polish ] = "Symbole";
+ Text[ portuguese_brazilian ] = "Symbols";
+ Text[ japanese ] = "¼ÝÎÞÙ";
+ Text[ chinese_simplified ] = "ͼ±ê";
+ Text[ chinese_traditional ] = "¹Ï¥Ü";
+ Text[ arabic ] = "ÑãæÒ";
+ Text[ greek ] = "Óýìâïëá";
+ Text[ korean ] = "±âÈ£";
+ Text[ turkish ] = "Simgeler";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text [ english_us ] = "Select..." ;
+ Text [ portuguese_brazilian ] = "Aus~wahl..." ;
+ Text [ swedish ] = "~Urval..." ;
+ Text [ danish ] = "Vælg..." ;
+ Text [ italian ] = "Scelta..." ;
+ Text [ spanish ] = "Selec~ción..." ;
+ Text [ french ] = "~Sélection..." ;
+ Text [ dutch ] = "Sele~ctie..." ;
+ Text [ portuguese ] = "~Seleccionar..." ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ...";
+ Text[ russian ] = "Âûáîð...";
+ Text[ polish ] = "Wybór...";
+ Text[ japanese ] = "‘I‘ð...";
+ Text[ chinese_traditional ] = "¿ï¾Ü...";
+ Text[ arabic ] = "...ÊÍÏíÏ";
+ Text[ greek ] = "Åðéëï~ãÞ";
+ Text[ korean ] = "¼±ÅÃ...";
+ Text[ turkish ] = "Seçim...";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_SYMBOL_WIDTH
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 121 , 29);//50,47 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "B~reite" ;
+ Text [ English ] = "~Width" ;
+ Text [ english_us ] = "Width" ;
+ Text [ portuguese_brazilian ] = "~Breite" ;
+ Text [ swedish ] = "B~redd" ;
+ Text [ danish ] = "Bredde" ;
+ Text [ italian ] = "Largh." ;
+ Text [ spanish ] = "A~ncho" ;
+ Text [ french ] = "~Largeur" ;
+ Text [ dutch ] = "~Breedte" ;
+ Text [ portuguese ] = "~Largura" ;
+ Text[ chinese_simplified ] = "¿í";
+ Text[ russian ] = "Øèðèíà";
+ Text[ polish ] = "Szer.";
+ Text[ japanese ] = "•";
+ Text[ chinese_traditional ] = "¼e";
+ Text[ arabic ] = "ÇáÚÑÖ";
+ Text[ greek ] = "ÐëÜôïò";
+ Text[ korean ] = "³Êºñ";
+ Text[ turkish ] = "Geniþlik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_SYMBOL_WIDTH
+ {
+ Pos = MAP_APPFONT ( 174 ,27);// 103,45 ) ;
+ Size = MAP_APPFONT ( 67 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 1999 ;
+ DecimalDigits = 2 ;
+ Value = 0 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 1999 ;
+ SpinSize = 5 ;
+ Hide = TRUE ;
+ };
+ FixedText FT_SYMBOL_HEIGHT
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 121 ,44);
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Höhe" ;
+ Text [ English ] = "Height" ;
+ Text [ english_us ] = "Height" ;
+ Text [ portuguese_brazilian ] = "~Höhe" ;
+ Text [ swedish ] = "~Höjd" ;
+ Text [ danish ] = "Højde" ;
+ Text [ italian ] = "Altezza" ;
+ Text [ spanish ] = "A~ltura" ;
+ Text [ french ] = "~Hauteur" ;
+ Text [ dutch ] = "~Hoogte" ;
+ Text [ portuguese ] = "~Altura" ;
+ Text[ chinese_simplified ] = "¸ß";
+ Text[ russian ] = "Âûñîòà";
+ Text[ polish ] = "Wys.";
+ Text[ japanese ] = "‚‚³";
+ Text[ chinese_traditional ] = "°ª";
+ Text[ arabic ] = "ÇáÇÑÊÝÇÚ";
+ Text[ greek ] = "¾øïò";
+ Text[ korean ] = "³ôÀÌ";
+ Text[ turkish ] = "Yükseklik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_SYMBOL_HEIGHT
+ {
+ Pos = MAP_APPFONT ( 174 , 42);
+ Size = MAP_APPFONT ( 67 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 1999 ;
+ DecimalDigits = 2 ;
+ Value = 0 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 1999 ;
+ SpinSize = 5 ;
+ Hide = TRUE ;
+ };
+ CheckBox CB_SYMBOL_RATIO
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 121 , 59);
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Text = "Abg~leich" ;
+ Text [ English ] = "Fixed ratio" ;
+ Text [ english_us ] = "Keep ratio" ;
+ Text [ portuguese_brazilian ] = "Abgleich" ;
+ Text [ swedish ] = "~Proportionellt" ;
+ Text [ danish ] = "Proportional" ;
+ Text [ italian ] = "Sincronizza" ;
+ Text [ spanish ] = "~Sincronización" ;
+ Text [ french ] = "~Proportionnel" ;
+ Text [ dutch ] = "~Synchroniseren" ;
+ Text [ portuguese ] = "Pr~oporcional" ;
+ Text[ chinese_simplified ] = "ͬ²½»¯";
+ Text[ russian ] = "Ïðîïîðöèîíàëüíî";
+ Text[ polish ] = "Dopasuj";
+ Text[ japanese ] = "’²®";
+ Text[ chinese_traditional ] = "¦P¨B¤Æ";
+ Text[ arabic ] = "ÊÒÇãä";
+ Text[ greek ] = "Áíá~ëïãéêÜ";
+ Text[ korean ] = "ºñÀ²À¯Áö";
+ Text[ turkish ] = "Orantýlý";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ turkish ] = "Çizgi";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_LINE_DEF -----------------------------------------------------
+TabPage RID_SVXPAGE_LINE_DEF
+{
+ HelpId = HID_LINE_DEF ;
+ Hide = TRUE ;
+ Text = "Linienstile definieren" ;
+ Text [ English ] = "Define Linestyles" ;
+ Text [ norwegian ] = "Definer Linjestiler" ;
+ Text [ italian ] = "Definisci stili linee" ;
+ Text [ portuguese_brazilian ] = "Definir Estilos de linha" ;
+ Text [ portuguese ] = "Definir estilos de linha" ;
+ Text [ finnish ] = "M„„rit„ viivatyylit" ;
+ Text [ danish ] = "Definer stregtyper" ;
+ Text [ french ] = "Définir les styles de ligne" ;
+ Text [ swedish ] = "Definiera linjestilar" ;
+ Text [ dutch ] = "Lijntypen definiëren" ;
+ Text [ spanish ] = "Definir estilos de línea" ;
+ Text [ english_us ] = "Define line styles" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_TYPE
+ {
+ Pos = MAP_APPFONT ( 12 , 16 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "~Typ" ;
+ Text [ ENGLISH ] = "~Type" ;
+ Text [ norwegian ] = "~Type" ;
+ Text [ italian ] = "Tipo" ;
+ Text [ portuguese_brazilian ] = "~Tipo" ;
+ Text [ portuguese ] = "~Tipo" ;
+ Text [ finnish ] = "~Tyyppi" ;
+ Text [ danish ] = "Type" ;
+ Text [ french ] = "~Type" ;
+ Text [ swedish ] = "T~yp" ;
+ Text [ dutch ] = "T~ype" ;
+ Text [ spanish ] = "~Tipo" ;
+ Text [ english_us ] = "~Type" ;
+ 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 ] = " ";
+ };
+ FixedText FT_NUMBER
+ {
+ Pos = MAP_APPFONT ( 12 , 31 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "~Anzahl" ;
+ Text [ ENGLISH ] = "~Number" ;
+ Text [ norwegian ] = "~Number" ;
+ Text [ italian ] = "Numero" ;
+ Text [ portuguese_brazilian ] = "~Número" ;
+ Text [ portuguese ] = "~Número" ;
+ Text [ finnish ] = "~Numero" ;
+ Text [ danish ] = "Antal" ;
+ Text [ french ] = "~Nombre" ;
+ Text [ swedish ] = "~Antal" ;
+ Text [ dutch ] = "~Aantal" ;
+ Text [ spanish ] = "~Número" ;
+ Text [ english_us ] = "~Number" ;
+ Text[ chinese_simplified ] = "ÊýÄ¿(~N)";
+ Text[ russian ] = "Êîëè÷åñòâî";
+ Text[ polish ] = "Liczba";
+ Text[ japanese ] = "”(~N)";
+ Text[ chinese_traditional ] = "¼Æ¥Ø(~N)";
+ Text[ arabic ] = "ÚÏÏ";
+ Text[ greek ] = "~Áñéèìüò";
+ Text[ korean ] = "¹øÈ£(~N)";
+ Text[ turkish ] = "Sayý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_DISTANCE
+ {
+ Pos = MAP_APPFONT ( 12 , 61 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "A~bstand" ;
+ Text [ ENGLISH ] = "D~istance" ;
+ Text [ norwegian ] = "A~vstand" ;
+ Text [ italian ] = "Distanza" ;
+ Text [ portuguese_brazilian ] = "D~istância" ;
+ Text [ portuguese ] = "~Espaçamento" ;
+ Text [ finnish ] = "~Et„isyys" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ french ] = "É~cart" ;
+ Text [ swedish ] = "A~vstånd" ;
+ Text [ dutch ] = "A~fstand" ;
+ Text [ spanish ] = "E~spacio" ;
+ Text [ english_us ] = "~Spacing" ;
+ Text[ chinese_simplified ] = "¼ä¸ô(~S)";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ polish ] = "Odstêp";
+ Text[ japanese ] = "ŠÔŠu(~S)";
+ Text[ chinese_traditional ] = "¶¡¹j(~S)";
+ Text[ arabic ] = "ÊÈÇÚÏ";
+ Text[ greek ] = "Á~ðüóôáóç";
+ Text[ korean ] = "°£°Ý(~S)";
+ Text[ turkish ] = "Aralýk";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 103 ) ;
+ Size = MAP_APPFONT ( 219 , 20 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton BTN_ADD
+ {
+ Pos = MAP_APPFONT ( 204 , 38 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufgen... : H~inzufügen... */
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufgen... : H~inzufügen... */
+ Text = "H~inzufügen..." ;
+ Text [ ENGLISH ] = "~Add..." ;
+ Text [ norwegian ] = "~Add..." ;
+ Text [ italian ] = "Aggiungi..." ;
+ Text [ portuguese_brazilian ] = "~Add..." ;
+ Text [ portuguese ] = "~Adicionar..." ;
+ Text [ finnish ] = "~Lis„„..." ;
+ Text [ danish ] = "Tilføj..." ;
+ Text [ french ] = "~Ajouter..." ;
+ Text [ swedish ] = "Lägg ~till..." ;
+ Text [ dutch ] = "~Toevoegen..." ;
+ Text [ spanish ] = "~Añadir..." ;
+ Text [ english_us ] = "~Add..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)...";
+ Text[ russian ] = "Äîáàâèòü...";
+ Text[ polish ] = "Dodaj...";
+ Text[ japanese ] = "’ljÁ(~A)...";
+ Text[ chinese_traditional ] = "·s¼W(~A)...";
+ Text[ arabic ] = "...ÅÖÇÝÉ";
+ Text[ greek ] = "ÐñïóèÞêç...";
+ Text[ korean ] = "Ãß°¡(~A)...";
+ Text[ turkish ] = "Ekle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_MODIFY
+ {
+ Pos = MAP_APPFONT ( 204 , 55 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Žndern... : ~Ändern... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Žndern... : ~Ändern... */
+ Text = "~Ändern..." ;
+ Text [ ENGLISH ] = "~Modify..." ;
+ Text [ norwegian ] = "~Endre..." ;
+ Text [ italian ] = "~Modifica..." ;
+ Text [ portuguese_brazilian ] = "~Modificar..." ;
+ 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..." ;
+ 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 ] = "Deðiþtir...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_DELETE
+ {
+ Pos = MAP_APPFONT ( 204 , 75 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~L”schen... : ~Löschen... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~L”schen... : ~Löschen... */
+ Text = "~Löschen..." ;
+ Text [ ENGLISH ] = "~Delete..." ;
+ Text [ norwegian ] = "~Delete..." ;
+ 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..." ;
+ 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...";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_DISTANCE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 59 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 5000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Value = 1 ;
+ Unit = FUNIT_MM ;
+ CustomUnitText = " %" ;
+ Last = 5000 ;
+ SpinSize = 10 ;
+ };
+ NumericField NUM_FLD_1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 29 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99 ;
+ StrictFormat = TRUE ;
+ Last = 99 ;
+ SpinSize = 1 ;
+ };
+ NumericField NUM_FLD_2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 97 , 29 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99 ;
+ StrictFormat = TRUE ;
+ Last = 99 ;
+ SpinSize = 1 ;
+ };
+ ListBox LB_TYPE_2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 97 , 14 ) ;
+ Size = MAP_APPFONT ( 42 , 49 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Punkt" ; Default ; > ;
+ < "Strich" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Punkt" ; Default ; > ;
+ < "Strich" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Punkt" ; Default ; > ;
+ < "Strich" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Punto" ; Default ; > ;
+ < "Tratto" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Punkt" ; Default ; > ;
+ < "Traço" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Ponto" ; Default ; > ;
+ < "Traço" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Punkt" ; Default ; > ;
+ < "Strich" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Prikket" ; Default ; > ;
+ < "Stiplet" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Point" ; Default ; > ;
+ < "Tiret" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "punkt" ; Default ; > ;
+ < "streck" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Punt" ; Default ; > ;
+ < "Streep" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Punto" ; Default ; > ;
+ < "Trazo" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Dot" ; Default ; > ;
+ < "Dash" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "µã" ; Default ; > ;
+ < "»®Ïß" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Òî÷êà" ; Default ; > ;
+ < "Øòðèõ" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Kropka" ; Default ; > ;
+ < "Kreska" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "ÄÞ¯Ä" ; Default ; > ;
+ < "ÀÞ¯¼­" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "ÂI" ; Default ; > ;
+ < "¯}§é¸¹" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "äÞØÉ" ; Default ; > ;
+ < "ÔÑØÉ" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "Êïõêêßäá" ; Default ; > ;
+ < "Ðáýëá" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "Á¡" ; Default ; > ;
+ < "´ë½¬" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Nokta" ; Default ; > ;
+ < "Kýsa çizgi" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ ListBox LB_TYPE_1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 14 ) ;
+ Size = MAP_APPFONT ( 42 , 49 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Punkt" ; Default ; > ;
+ < "Strich" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Punkt" ; Default ; > ;
+ < "Strich" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Punkt" ; Default ; > ;
+ < "Strich" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Punto" ; Default ; > ;
+ < "Tratto" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Punkt" ; Default ; > ;
+ < "Traço" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Ponto" ; Default ; > ;
+ < "Traço" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Punkt" ; Default ; > ;
+ < "Strich" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Prikket" ; Default ; > ;
+ < "Stiplet" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Point" ; Default ; > ;
+ < "Tiret" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "punkt" ; Default ; > ;
+ < "streck" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Punt" ; Default ; > ;
+ < "Streep" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Punto" ; Default ; > ;
+ < "Trazo" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Dot" ; Default ; > ;
+ < "Dash" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "µã" ; Default ; > ;
+ < "»®Ïß" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Òî÷êà" ; Default ; > ;
+ < "Øòðèõ" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Kropka" ; Default ; > ;
+ < "Kreska" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "ÄÞ¯Ä" ; Default ; > ;
+ < "ÀÞ¯¼­" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "ÂI" ; Default ; > ;
+ < "¯}§é¸¹" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "äÞØÉ" ; Default ; > ;
+ < "ÔÑØÉ" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "Êïõêêßäá" ; Default ; > ;
+ < "Ðáýëá" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "Á¡" ; Default ; > ;
+ < "´ë½¬" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Nokta" ; Default ; > ;
+ < "Çizgi" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ FixedText FT_LENGTH
+ {
+ Pos = MAP_APPFONT ( 12 , 46 ) ;
+ Size = MAP_APPFONT ( 32 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? L„n~ge : Län~ge */
+ /* ### ACHTUNG: Neuer Text in Resource? L„n~ge : Län~ge */
+ Text = "Län~ge" ;
+ Text [ ENGLISH ] = "Len~gth" ;
+ Text [ norwegian ] = "Len~gde" ;
+ Text [ italian ] = "L~ungh." ;
+ Text [ portuguese_brazilian ] = "Com~primento" ;
+ Text [ portuguese ] = "Com~primento" ;
+ Text [ finnish ] = "~Pituus" ;
+ Text [ danish ] = "Længde" ;
+ Text [ french ] = "Lon~gueur" ;
+ Text [ swedish ] = "Län~gd" ;
+ Text [ dutch ] = "~Lengte" ;
+ Text [ spanish ] = "L~ongitud" ;
+ Text [ english_us ] = "~Length" ;
+ Text[ chinese_simplified ] = "³¤¶È(~L)";
+ Text[ russian ] = "Äëèíà";
+ Text[ polish ] = "D³ugoœæ";
+ Text[ japanese ] = "’·‚³(~L)";
+ Text[ chinese_traditional ] = "ªø«×(~L)";
+ Text[ arabic ] = "Øæá";
+ Text[ greek ] = "ÌÞêïò";
+ Text[ korean ] = "±æÀÌ(~L)";
+ Text[ turkish ] = "Uzunluk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_LENGTH_1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 44 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ First = 1 ;
+ Maximum = 5000 ;
+ Last = 5000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Value = 1 ;
+ Unit = FUNIT_MM ;
+ CustomUnitText = " %" ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_LENGTH_2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 97 , 44 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ TabStop = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ First = 1 ;
+ Maximum = 5000 ;
+ Last = 5000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Value = 1 ;
+ Unit = FUNIT_MM ;
+ CustomUnitText = " %" ;
+ SpinSize = 10 ;
+ };
+ CheckBox CBX_SYNCHRONIZE
+ {
+ Pos = MAP_APPFONT ( 12 , 74 ) ;
+ Size = MAP_APPFONT ( 110 , 10 ) ;
+ Text = "A~n Linienbreite anpassen" ;
+ Text [ ENGLISH ] = "~Synchronize line width" ;
+ Text [ norwegian ] = "~Synkroniser linjebredde" ;
+ Text [ italian ] = "~Adatta a spessore linea" ;
+ Text [ portuguese_brazilian ] = "~Synchronize line width" ;
+ Text [ portuguese ] = "~Ajustar largura das linhas" ;
+ Text [ finnish ] = "~Synchronize line width" ;
+ Text [ danish ] = "Tilpas til stregtykkelse" ;
+ Text [ french ] = "A~dapter à la largeur de la ligne" ;
+ Text [ swedish ] = "A~npassa till linjebredd" ;
+ Text [ dutch ] = "Aan lijn~dikte aanpassen" ;
+ Text [ spanish ] = "Ajustar al ancho de la línea" ;
+ Text [ english_us ] = "~Fit to line width" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÓëÏß¿íµÄ±ÈÀý(~F)";
+ Text[ russian ] = "Âûðîâíÿòü ïî øèðèíå ëèíèè";
+ Text[ polish ] = "Dopasuj do szerokoœci linii";
+ Text[ japanese ] = "ü•‚ɇ‚킹‚é(~F)";
+ Text[ chinese_traditional ] = "¥H½u¼e¬°·Ç(~F)";
+ Text[ arabic ] = "ãáÇÁãÉ Úáì ÚÑÖ ÇáÎØæØ";
+ Text[ greek ] = "ÐñïóáñìïãÞ óôï ðëÜôïò ãñáììÞò";
+ Text[ korean ] = "¼± ³Êºñ °íÁ¤(~F)";
+ Text[ turkish ] = "Çizgi~ geniþliðine uydur";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LINESTYLES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 157 , 14 ) ;
+ Size = MAP_APPFONT ( 89 , 80 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ GroupBox GRP_DEFINITION
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 139 , 87 ) ;
+ Text = "Definition" ;
+ Text [ ENGLISH ] = "Definition" ;
+ Text [ norwegian ] = "Definition" ;
+ Text [ italian ] = "Definizione" ;
+ Text [ portuguese_brazilian ] = "Definição" ;
+ Text [ portuguese ] = "Definição" ;
+ Text [ finnish ] = "M„„ritys" ;
+ Text [ danish ] = "Definition" ;
+ Text [ french ] = "Définition" ;
+ Text [ swedish ] = "Definition" ;
+ Text [ dutch ] = "Definitie" ;
+ Text [ spanish ] = "Definición" ;
+ Text [ english_us ] = "Definition" ;
+ Text[ chinese_simplified ] = "¶¨Òå";
+ Text[ russian ] = "Îïðåäåëåíèå";
+ Text[ polish ] = "Definicja";
+ Text[ japanese ] = "’è‹`";
+ Text[ chinese_traditional ] = "©w¸q";
+ Text[ arabic ] = "ÊÚÑíÝ";
+ Text[ greek ] = "Ïñéóìüò";
+ Text[ korean ] = "Á¤ÀÇ";
+ Text[ turkish ] = "Taným";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_LINESTYLES
+ {
+ Pos = MAP_APPFONT ( 151 , 3 ) ;
+ Size = MAP_APPFONT ( 103 , 29 ) ;
+ Text = "Linienstile" ;
+ Text [ ENGLISH ] = "Linestyles" ;
+ Text [ norwegian ] = "Linjestiler" ;
+ Text [ italian ] = "Stili linee" ;
+ Text [ portuguese_brazilian ] = "Estilos de linha" ;
+ Text [ portuguese ] = "Estilos de linha" ;
+ Text [ finnish ] = "Viivatyylit" ;
+ Text [ danish ] = "Stregtyper" ;
+ Text [ french ] = "Styles de ligne" ;
+ Text [ swedish ] = "Linjestilar" ;
+ Text [ dutch ] = "Lijntypen" ;
+ Text [ spanish ] = "Estilos de línea" ;
+ Text [ english_us ] = "Line styles" ;
+ Text[ chinese_simplified ] = "ÏßÌõʽÑù";
+ Text[ russian ] = "Ñòèëè ëèíèè";
+ Text[ polish ] = "Style linii";
+ Text[ japanese ] = "ü½À²Ù";
+ Text[ chinese_traditional ] = "½u§Î¼Ë¦¡";
+ Text[ arabic ] = "ÃäãÇØ ÇáÎØ";
+ Text[ greek ] = "Óôõë ãñáììÞò";
+ Text[ korean ] = "¼± À¯Çü";
+ Text[ turkish ] = "Çizgi biçimleri";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 6 , 93 ) ;
+ Size = MAP_APPFONT ( 229 , 36 ) ;
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸®º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ ImageButton BTN_LOAD
+ {
+ Pos = MAP_APPFONT ( 238 , 94 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Linienstiltabelle laden" ;
+ QuickHelpText [ ENGLISH ] = "Load linestyles list" ;
+ QuickHelpText [ norwegian ] = "Last inn liste over linjestiler" ;
+ QuickHelpText [ italian ] = "Carica file stili linee" ;
+ QuickHelpText [ portuguese_brazilian ] = "Carregar lista de estilos de linha" ;
+ QuickHelpText [ portuguese ] = "Carrega a tabela de estilos de linhas" ;
+ QuickHelpText [ finnish ] = "Lue viivatyyliluettelo" ;
+ QuickHelpText [ danish ] = "Indlæs piltyper" ;
+ QuickHelpText [ french ] = "Charger la palette de styles de lignes" ;
+ QuickHelpText [ swedish ] = "Ladda linjestiltabell" ;
+ QuickHelpText [ dutch ] = "Lijst lijntypen laden" ;
+ QuickHelpText [ spanish ] = "Cargar tabla de estilos de líneas" ;
+ QuickHelpText [ english_us ] = "Load Line Styles" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05501.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Çàãðóçèòü íàáîð ñòèëåé ëèíèé";
+ QuickHelpText[ polish ] = "£aduj tabelê stylu linii";
+ QuickHelpText[ japanese ] = "ü‚̽À²Ù•\\‚ðÛ°ÄÞ";
+ QuickHelpText[ chinese_simplified ] = "×°ÔØÏßÌõÑùʽÁбí";
+ QuickHelpText[ chinese_traditional ] = "¸Ë¸ü½u±ø¼Ë¦¡¦Cªí";
+ QuickHelpText[ arabic ] = "ÊÍãíá ÞÇÆãÉ ÃäãÇØ ÇáÎØ";
+ QuickHelpText[ greek ] = "Öüñôùóç ëßóôáò ìå óôõë ãñáììþí";
+ QuickHelpText[ korean ] = "Load Line Styles";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton BTN_SAVE
+ {
+ Pos = MAP_APPFONT ( 238 , 113 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Linienstiltabelle sichern" ;
+ QuickHelpText [ ENGLISH ] = "Save linestyles list" ;
+ QuickHelpText [ norwegian ] = "Lagre liste over linestiler" ;
+ QuickHelpText [ italian ] = "Salva file stili linee" ;
+ QuickHelpText [ portuguese_brazilian ] = "Gravar lista de estilos de linha" ;
+ QuickHelpText [ portuguese ] = "Guarda a tabela de estilos de linhas" ;
+ QuickHelpText [ finnish ] = "Tallenna viivatyyliluettelo" ;
+ QuickHelpText [ danish ] = "Gem piltyper" ;
+ QuickHelpText [ french ] = "Enregistrer la palette de styles de lignes" ;
+ QuickHelpText [ swedish ] = "Spara linjestiltabell" ;
+ QuickHelpText [ dutch ] = "Lijst lijntypen opslaan" ;
+ QuickHelpText [ spanish ] = "Guardar tabla de estilos de líneas" ;
+ QuickHelpText [ english_us ] = "Save Line Styles" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05502.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Ñîõðàíèòü íàáîð ñòèëåé ëèíèé";
+ QuickHelpText[ polish ] = "Zapisz tabelê stylu linii";
+ QuickHelpText[ japanese ] = "Linienstiltabelle sichern";
+ QuickHelpText[ chinese_simplified ] = "±£´æÏßÌõÁбí";
+ QuickHelpText[ chinese_traditional ] = "«O¦s½u±ø¼Ë¦¡¦Cªí";
+ QuickHelpText[ arabic ] = "ÍÝÙ ÞÇÆãÉ ÃäãÇØ ÇáÎØ";
+ QuickHelpText[ greek ] = "ÁðïèÞêåõóç ëßóôáò ìå óôõë ãñáììþí";
+ QuickHelpText[ korean ] = "Save Line Styles";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "¶¨ÒåÏßÌõʽÑù";
+ Text[ russian ] = "Çàäàòü ñòèëè ëèíèè";
+ Text[ polish ] = "Zdefiniuj style linii";
+ Text[ japanese ] = "ü½À²Ù‚ÌÝ’è";
+ Text[ chinese_traditional ] = "³]©w½u§Î¼Ë¦¡";
+ Text[ arabic ] = "ÊÚííä ÃäãÇØ ÇáÎØ";
+ Text[ greek ] = "Ïñéóìüò óôõë ãñáììþí";
+ Text[ korean ] = "¼± À¯Çü Á¤ÀÇ";
+ Text[ turkish ] = "Çizgi biçimlerini tanýmla";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_LINEEND ----------------------------------------------------------
+TabPage RID_SVXPAGE_LINEEND_DEF
+{
+ HelpId = HID_LINE_ENDDEF ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Linienenden definieren" ;
+ Text [ ENGLISH ] = "Define line ends" ;
+ Text [ norwegian ] = "Definer linjeslutter" ;
+ Text [ italian ] = "Definisci fine linea" ;
+ Text [ portuguese_brazilian ] = "Define line ends" ;
+ Text [ portuguese ] = "Definir fim de linha" ;
+ Text [ finnish ] = "Define line ends" ;
+ Text [ danish ] = "Definer piltype" ;
+ Text [ french ] = "Définir extrémités" ;
+ Text [ swedish ] = "Definiera linjeslut" ;
+ Text [ dutch ] = "Lijnuiteinden definiëren" ;
+ Text [ spanish ] = "Definir fin de líneas" ;
+ Text [ english_us ] = "Arrowheads" ;
+ ListBox LB_LINEENDS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 114 , 29 ) ;
+ Size = MAP_APPFONT ( 78 , 80 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ Control CTL_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 70 ) ;
+ Size = MAP_APPFONT ( 181 , 55 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 6 , 59 ) ;
+ Size = MAP_APPFONT ( 192 , 70 ) ;
+ 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 ] = "Aperçu" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualización" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ãÚÇíäÉ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸®º¸±â";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_ADD
+ {
+ Pos = MAP_APPFONT ( 204 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufgen... : H~inzufügen... */
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufgen... : H~inzufügen... */
+ Text = "H~inzufügen..." ;
+ Text [ ENGLISH ] = "~Add..." ;
+ Text [ norwegian ] = "~Add..." ;
+ Text [ italian ] = "Aggiungi..." ;
+ Text [ portuguese_brazilian ] = "~Add..." ;
+ Text [ portuguese ] = "~Adicionar..." ;
+ Text [ finnish ] = "~Lis„„..." ;
+ Text [ danish ] = "Tilføj..." ;
+ Text [ french ] = "~Ajouter..." ;
+ Text [ swedish ] = "Lägg t~ill..." ;
+ Text [ dutch ] = "~Toevoegen..." ;
+ Text [ spanish ] = "~Añadir..." ;
+ Text [ english_us ] = "~Add..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)...";
+ Text[ russian ] = "Äîáàâèòü...";
+ Text[ polish ] = "Dodaj...";
+ Text[ japanese ] = "’ljÁ(~A)...";
+ Text[ chinese_traditional ] = "·s¼W(~A)...";
+ Text[ arabic ] = "...ÅÖÇÝÉ";
+ Text[ greek ] = "ÐñïóèÞêç...";
+ Text[ korean ] = "Ãß°¡(~A)...";
+ Text[ turkish ] = "Ekle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_MODIFY
+ {
+ Pos = MAP_APPFONT ( 204 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Žndern : ~Ändern */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Žndern : ~Ändern */
+ Text = "~Ändern" ;
+ Text [ ENGLISH ] = "~Modify" ;
+ Text [ norwegian ] = "~Modify" ;
+ Text [ italian ] = "Modifica" ;
+ Text [ portuguese_brazilian ] = "~Modificar" ;
+ Text [ portuguese ] = "~Modificar" ;
+ Text [ finnish ] = "~Muokkaa" ;
+ Text [ danish ] = "Modificer" ;
+ Text [ french ] = "~Modifier" ;
+ Text [ swedish ] = "~Ändra" ;
+ Text [ dutch ] = "Wij~zigen" ;
+ Text [ spanish ] = "~Modificar" ;
+ 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 ] = "Deðiþtir";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_DELETE
+ {
+ Pos = MAP_APPFONT ( 204 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~L”schen... : ~Löschen... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~L”schen... : ~Löschen... */
+ Text = "~Löschen..." ;
+ Text [ ENGLISH ] = "~Delete..." ;
+ Text [ norwegian ] = "~Delete..." ;
+ 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..." ;
+ 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...";
+ Text[ language_user1 ] = " ";
+ };
+ Edit EDT_NAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 114 , 14 ) ;
+ Size = MAP_APPFONT ( 78 , 12 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_TIP
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 96 , 55 ) ;
+ Text = "Hinweis" ;
+ Text [ ENGLISH ] = "Tip" ;
+ Text [ norwegian ] = "Tips" ;
+ Text [ italian ] = "Nota" ;
+ Text [ portuguese_brazilian ] = "Tip" ;
+ Text [ portuguese ] = "Observação" ;
+ Text [ finnish ] = "Tip" ;
+ Text [ danish ] = "Tip" ;
+ Text [ french ] = "Conseil" ;
+ Text [ swedish ] = "Tips" ;
+ Text [ dutch ] = "Tip" ;
+ Text [ spanish ] = "Indicación" ;
+ Text [ english_us ] = "Note" ;
+ Text[ chinese_simplified ] = "Ìáʾ";
+ Text[ russian ] = "Óêàçàíèå";
+ Text[ polish ] = "Wskazówka";
+ Text[ japanese ] = "ŽwŽ¦";
+ Text[ chinese_traditional ] = "´£¥Ü";
+ Text[ arabic ] = "ãáÇÍÙÉ";
+ Text[ greek ] = "Õðüäåéîç";
+ Text[ korean ] = "ÆÁ";
+ Text[ turkish ] = "Not";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_TIP
+ {
+ Pos = MAP_APPFONT ( 12 , 12 ) ;
+ Size = MAP_APPFONT ( 85 , 41 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Neue Linienenden erhalten Sie durch Hinzufgen eines selektierten Objektes : Neue Linienenden erhalten Sie durch Hinzufügen eines selektierten Objektes */
+ /* ### ACHTUNG: Neuer Text in Resource? Neue Linienenden erhalten Sie durch Hinzufgen eines selektierten Objektes : Neue Linienenden erhalten Sie durch Hinzufügen eines selektierten Objektes */
+ Text = "Neue Linienenden erhalten Sie durch Hinzufügen eines selektierten Objektes" ;
+ Text [ ENGLISH ] = "You get new line ends by adding a selected object" ;
+ Text [ norwegian ] = "You get new line ends by adding a selected object" ;
+ Text [ italian ] = "Nuovi fine linea si ottengono aggiungendo un oggetto selezionato" ;
+ Text [ portuguese_brazilian ] = "You get new line ends by adding a selected object" ;
+ Text [ portuguese ] = "Se adicionar um objecto seleccionado obtém novos fins de linha" ;
+ Text [ french ] = "Pour créer de nouvelles extrémités de lignes, ajoutez un objet préalablement sélectionné." ;
+ Text [ dutch ] = "Een nieuw lijnuiteinde krijgt u door het toevoegen van een geselecteerd object" ;
+ Text [ spanish ] = "Añada un objeto seleccionado para obtener nuevos finales de línea." ;
+ Text [ danish ] = "Nye piltyper fås ved at tilføje et markeret objekt" ;
+ Text [ swedish ] = "Nya linjeslut får Du genom att lägga till ett markerat objekt" ;
+ Text [ finnish ] = "You get new line ends by adding a selected object" ;
+ Text [ english_us ] = "Add a selected object to create new arrow styles" ;
+ TabStop = TRUE ;
+ WordBreak = TRUE ;
+ Text[ chinese_simplified ] = "ÄúÄܹ»Í¨¹ýÐÂÔöÑ¡ÔñÒ»¸ö¶ÔÏóÀ´Éú³ÉеÄÏ߶ˡ£";
+ Text[ russian ] = "Íîâûå êîíöû ëèíèè Âû ïîëó÷èòå ïóòåì äîáàâëåíèÿ âûäåëåííîãî îáúåêòà";
+ Text[ polish ] = "Nowe koñcówki linii otrzymasz przez dodanie wybranego obiektu";
+ Text[ japanese ] = "V‚µ‚¢ü’[‚ðµÌÞ¼Þª¸Ä‚̒ljÁ‚É‚æ‚Á‚Äì¬";
+ Text[ chinese_traditional ] = "±z¯à°÷³z¹L·s¼W¿ï¾Ü¤@­Óª«¥ó¨Ó¥Í¦¨¤@­Ó·sªº½uºÝ¡C";
+ Text[ arabic ] = "íãßäß ÇáÍÕæá Úáì äåÇíÇÊ ÌÏíÏÉ ááÎØ Úä ØÑíÞ ÅÏÑÇÌ ßÇÆä ãÍÏÏ";
+ Text[ greek ] = "Ãéá íá äçìéïõñãÞóåôå íÝåò 'áñ÷Ýò' ãñáììÞò, ðñïóèÝóôå Ýíá åðéëåãìÝíï áíôéêåßìåíï";
+ Text[ korean ] = "»õ·Î¿î À¯ÇüÀÇ È­»ìÇ¥¸¦ ¸¸µé±âÀ§ÇÏ¿© ¼±ÅÃµÈ °³Ã¼¸¦ Ãß°¡";
+ Text[ turkish ] = "Seçilen bir nesneyi ekleyerek yeni çizgi uçlarý elde edebilirsiniz.";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_LINEENDS
+ {
+ Pos = MAP_APPFONT ( 107 , 3 ) ;
+ Size = MAP_APPFONT ( 91 , 54 ) ;
+ Text = "Linienende" ;
+ Text [ ENGLISH ] = "Line end" ;
+ Text [ norwegian ] = "Line end" ;
+ Text [ italian ] = "Fine linea" ;
+ Text [ portuguese_brazilian ] = "Fim de linha" ;
+ Text [ portuguese ] = "Fim de linha" ;
+ Text [ finnish ] = "Viivanp„„" ;
+ Text [ danish ] = "Pil" ;
+ Text [ french ] = "Extrémité de ligne" ;
+ Text [ swedish ] = "Linjeslut" ;
+ Text [ dutch ] = "Lijnuiteinde" ;
+ Text [ spanish ] = "Fin de línea" ;
+ Text [ english_us ] = "Arrowheads" ;
+ Text[ chinese_simplified ] = "Ï߶Ë";
+ Text[ russian ] = "Êîíöû ëèíèè";
+ Text[ polish ] = "Koñcówka linii";
+ Text[ japanese ] = "ü‚ÌI“_";
+ Text[ chinese_traditional ] = "½uºÝ";
+ Text[ arabic ] = "äåÇíÉ ÇáÎØ";
+ Text[ greek ] = "ÔÝëïò ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ¾ç³¡";
+ Text[ turkish ] = "Çizgi ucu";
+ Text[ language_user1 ] = " ";
+ };
+ ImageButton BTN_LOAD
+ {
+ Pos = MAP_APPFONT ( 238 , 94 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Linienendentabelle laden" ;
+ QuickHelpText [ ENGLISH ] = "Load line ends list" ;
+ QuickHelpText [ norwegian ] = "Last inn liste over linjeslutter" ;
+ QuickHelpText [ italian ] = "Carica file estremità linee" ;
+ QuickHelpText [ portuguese_brazilian ] = "Carregar lista de finais de linha" ;
+ QuickHelpText [ portuguese ] = "Carrega a tabela de fins de linhas" ;
+ QuickHelpText [ finnish ] = "Lue viivanp„„luettelo" ;
+ QuickHelpText [ danish ] = "Indlæs piltyper" ;
+ QuickHelpText [ french ] = "Charger la palette de fins de lignes" ;
+ QuickHelpText [ swedish ] = "Ladda linjesluttabell" ;
+ QuickHelpText [ dutch ] = "Lijst lijnuiteinden laden" ;
+ QuickHelpText [ spanish ] = "Cargar tabla de finales de línea" ;
+ QuickHelpText [ english_us ] = "Load Arrow Styles" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05501.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Çàãðóçèòü íàáîð êîíöîâ ëèíèé";
+ QuickHelpText[ polish ] = "£aduj tabelê koñcówek linii";
+ QuickHelpText[ japanese ] = "ü‚Ìæ’[•\\‚ðÛ°ÄÞ";
+ QuickHelpText[ chinese_simplified ] = "×°ÔØÏ߶ËÁбí";
+ QuickHelpText[ chinese_traditional ] = "¸Ë¸ü½uºÝ¦Cªí";
+ QuickHelpText[ arabic ] = "ÊÍãíá ÞÇÆãÉ äåÇíÇÊ ÇáÎØ";
+ QuickHelpText[ greek ] = "Öüñôùóç ëßóôáò ìå Üêñá ãñáììþí";
+ QuickHelpText[ korean ] = "Load Arrow Styles";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton BTN_SAVE
+ {
+ Pos = MAP_APPFONT ( 238 , 113 ) ;
+ Size = MAP_APPFONT ( 16 , 16 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Linienendentabelle sichern" ;
+ QuickHelpText [ ENGLISH ] = "Save line ends list" ;
+ QuickHelpText [ norwegian ] = "Lagre liste over linjeslutter" ;
+ QuickHelpText [ italian ] = "Salva file estremità linee" ;
+ QuickHelpText [ portuguese_brazilian ] = "Gravar lista de finais de linha" ;
+ QuickHelpText [ portuguese ] = "Guarda a tabela de fins de linhas" ;
+ QuickHelpText [ finnish ] = "Tallenna viivanp„„luettelo" ;
+ QuickHelpText [ danish ] = "Gem piltyper" ;
+ QuickHelpText [ french ] = "Enregistrer la palette de fins de lignes" ;
+ QuickHelpText [ swedish ] = "Spara linjesluttabell" ;
+ QuickHelpText [ dutch ] = "Lijst lijnuiteinden opslaan" ;
+ QuickHelpText [ spanish ] = "Guardar tabla de finales de línea" ;
+ QuickHelpText [ english_us ] = "Save Arrow Styles" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap
+ {
+ File = "sc05502.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ };
+ QuickHelpText[ russian ] = "Ñîõðàíèòü íàáîð êîíöîâ ëèíèé";
+ QuickHelpText[ polish ] = "Zapisz tabelê koñcówek linii";
+ QuickHelpText[ japanese ] = "ü‚Ìæ’[•\\‚ð•Û‘¶";
+ QuickHelpText[ chinese_simplified ] = "±£´æÏ߶ËÁбí";
+ QuickHelpText[ chinese_traditional ] = "«O¦s½uºÝ¦Cªí";
+ QuickHelpText[ arabic ] = "ÍÝÙ ÞÇÆãÉ äåÇíÇÊ ÇáÎØ";
+ QuickHelpText[ greek ] = "ÁðïèÞêåõóç ëßóôáò ìå Üêñá ãñáììþí";
+ QuickHelpText[ korean ] = "Save Arrow Styles";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "¶¨ÒåÏ߶Ë";
+ Text[ russian ] = "Çàäàòü êîíöû ëèíèè";
+ Text[ polish ] = "Zdefiniuj koñcówki linii";
+ Text[ japanese ] = "ü’[‚ÌÝ’è";
+ Text[ chinese_traditional ] = "©w¸q½uºÝ";
+ Text[ arabic ] = "ÊÚííä äåÇíÇÊ ÇáÎØ";
+ Text[ greek ] = "Ïñéóìüò áêñþí ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ¾ç³¡ Á¤ÀÇ";
+ Text[ turkish ] = "Çizgi uçlarýný tanýmla";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXDLG_LINE ----------------------------------------------------------
+TabDialog RID_SVXDLG_LINE
+{
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 289 , 176 ) ;
+ Text = "Linie" ;
+ Text [ ENGLISH ] = "Line" ;
+ Text [ norwegian ] = "Linje" ;
+ Text [ italian ] = "Linea" ;
+ Text [ portuguese_brazilian ] = "Linha" ;
+ Text [ portuguese ] = "Linha" ;
+ Text [ finnish ] = "Viiva" ;
+ Text [ danish ] = "Streg" ;
+ Text [ french ] = "Ligne" ;
+ Text [ swedish ] = "Linje" ;
+ Text [ dutch ] = "Lijn" ;
+ Text [ spanish ] = "Línea" ;
+ Text [ english_us ] = "Line" ;
+ Moveable = TRUE ;
+ TabControl TAB_CONTROL
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_LINE ;
+ Text = "Linie" ;
+ Text [ ENGLISH ] = "Line" ;
+ Text [ norwegian ] = "Linje" ;
+ Text [ italian ] = "Linea" ;
+ Text [ portuguese_brazilian ] = "Linha" ;
+ Text [ portuguese ] = "Linha" ;
+ Text [ finnish ] = "Viiva" ;
+ Text [ danish ] = "Streg" ;
+ Text [ french ] = "Ligne" ;
+ Text [ swedish ] = "Linje" ;
+ Text [ dutch ] = "Lijn" ;
+ Text [ spanish ] = "Línea" ;
+ Text [ english_us ] = "Line" ;
+ PageResID = RID_SVXPAGE_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 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_LINE_DEF ;
+ Text = "Linienstile" ;
+ Text [ ENGLISH ] = "Linestyles" ;
+ Text [ norwegian ] = "Linjestiler" ;
+ Text [ italian ] = "Stili linee" ;
+ Text [ portuguese_brazilian ] = "Estilos de linha" ;
+ Text [ portuguese ] = "Estilos de linha" ;
+ Text [ finnish ] = "Viivatyylit" ;
+ Text [ danish ] = "Stregtyper" ;
+ Text [ french ] = "Styles de ligne" ;
+ Text [ swedish ] = "Linjestilar" ;
+ Text [ dutch ] = "Lijntypen" ;
+ Text [ spanish ] = "Estilos de línea" ;
+ Text [ english_us ] = "Line Styles" ;
+ PageResID = RID_SVXPAGE_LINE_DEF ;
+ Text[ chinese_simplified ] = "ÏßÌõʽÑù";
+ Text[ russian ] = "Ñòèëè ëèíèè";
+ Text[ polish ] = "Style linii";
+ Text[ japanese ] = "ü½À²Ù";
+ Text[ chinese_traditional ] = "½u±ø¼Ë¦¡";
+ Text[ arabic ] = "ÃäãÇØ ÇáÎØ";
+ Text[ greek ] = "Óôõë ãñáììÞò";
+ Text[ korean ] = "¼± À¯Çü";
+ Text[ turkish ] = "Çizgi biçimleri";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_LINEEND_DEF ;
+ Text = "Linienenden" ;
+ Text [ ENGLISH ] = "Lineends" ;
+ Text [ norwegian ] = "Linjeslutter" ;
+ Text [ italian ] = "Estremità linee" ;
+ Text [ portuguese_brazilian ] = "Lineends" ;
+ Text [ portuguese ] = "Fins de linha" ;
+ Text [ finnish ] = "Lineends" ;
+ Text [ danish ] = "Pile" ;
+ Text [ french ] = "Extrémités de lignes" ;
+ Text [ swedish ] = "Linjeslut" ;
+ Text [ dutch ] = "Lijnuiteinden" ;
+ Text [ spanish ] = "Fin de línea" ;
+ Text [ english_us ] = "Arrow Styles" ;
+ PageResID = RID_SVXPAGE_LINEEND_DEF ;
+ Text[ chinese_simplified ] = "Ï߶Ë";
+ Text[ russian ] = "Êîíöû ëèíèè";
+ Text[ polish ] = "Koñcówki linii";
+ Text[ japanese ] = "ü‚ÌI“_";
+ Text[ chinese_traditional ] = "½uºÝ";
+ Text[ arabic ] = "äåÇíÇÊ ÇáÎØ";
+ Text[ greek ] = "¢êñá ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ¾ç³¡";
+ Text[ turkish ] = "Çizgi uçlarý";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ 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 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/tabstpge.cxx b/svx/source/dialog/tabstpge.cxx
new file mode 100644
index 0000000000..56fcd412be
--- /dev/null
+++ b/svx/source/dialog/tabstpge.cxx
@@ -0,0 +1,768 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabstpge.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+
+#define ITEMID_TABSTOP 0
+#define ITEMID_LRSPACE 0
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _RULER_HXX //autogen
+#include <svtools/ruler.hxx>
+#endif
+
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+
+#define _SVX_TABSTPGE_CXX
+
+#include "dialogs.hrc"
+#include "tabstpge.hrc"
+
+#include "lrspitem.hxx"
+#include "tabstpge.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+
+// class TabWin_Impl -----------------------------------------------------
+
+class TabWin_Impl : public Window
+{
+private:
+ USHORT nTabStyle;
+
+public:
+ TabWin_Impl( Window* pParent, const ResId& rId, USHORT nStyle ) :
+ Window( pParent, rId ),
+ nTabStyle( nStyle ) {}
+
+ virtual void Paint( const Rectangle& rRect );
+};
+
+// static ----------------------------------------------------------------
+
+static USHORT pRanges[] =
+{
+ SID_ATTR_TABSTOP,
+ SID_ATTR_TABSTOP_OFFSET,
+ 0
+};
+
+// const -----------------------------------------------------------------
+
+const long lA3Width = 16837; // A3 297mm in twips
+
+// C-Funktion ------------------------------------------------------------
+
+void FillUpWithDefTabs_Impl( long nDefDist, SvxTabStopItem& rTabs )
+{
+ if( rTabs.Count() )
+ return;
+ {
+ SvxTabStop aSwTabStop( nDefDist, SVX_TAB_ADJUST_DEFAULT );
+ rTabs.Insert( aSwTabStop );
+ }
+}
+
+// class TabWin_Impl -----------------------------------------------------
+
+void TabWin_Impl::Paint( const Rectangle& rRect )
+{
+ // Tabulatoren malen
+ Point aPnt;
+ Size aSize = GetOutputSizePixel();
+ aPnt.X() = aSize.Width() / 2;
+ aPnt.Y() = aSize.Height() / 2;
+ Ruler::DrawTab( this, aPnt, nTabStyle );
+}
+
+// class SvxTabulatorTabPage ---------------------------------------------
+
+SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent,
+ const SfxItemSet& rAttr ):
+
+ SfxTabPage( pParent, ResId( RID_SVXPAGE_TABULATOR, DIALOG_MGR() ), rAttr ),
+
+ aTabBox ( this, ResId( ED_TABPOS ) ),
+ aTabLabel ( this, ResId( GB_TABPOS ) ),
+ aLeftTab ( this, ResId( BTN_TABTYPE_LEFT ) ),
+ aRightTab ( this, ResId( BTN_TABTYPE_RIGHT ) ),
+ aCenterTab ( this, ResId( BTN_TABTYPE_CENTER ) ),
+ aDezTab ( this, ResId( BTN_TABTYPE_DECIMAL ) ),
+ pLeftWin ( new TabWin_Impl( this, ResId( WIN_TABLEFT ), RULER_TAB_LEFT ) ),
+ pRightWin ( new TabWin_Impl( this, ResId( WIN_TABRIGHT ), RULER_TAB_RIGHT ) ),
+ pCenterWin ( new TabWin_Impl( this, ResId( WIN_TABCENTER ), RULER_TAB_CENTER ) ),
+ pDezWin ( new TabWin_Impl( this, ResId( WIN_TABDECIMAL ), RULER_TAB_DECIMAL ) ),
+ aDezChar ( this, ResId( ED_TABTYPE_DECCHAR ) ),
+ aDezCharLabel ( this, ResId( FT_TABTYPE_DECCHAR ) ),
+ aTabTypeLabel ( this, ResId( GB_TABTYPE ) ),
+ aNoFillChar ( this, ResId( BTN_FILLCHAR_NO ) ),
+ aFillPoints ( this, ResId( BTN_FILLCHAR_POINTS ) ),
+ aFillDashLine ( this, ResId( BTN_FILLCHAR_DASHLINE ) ),
+ aFillSolidLine ( this, ResId( BTN_FILLCHAR_UNDERSCORE ) ),
+ aFillSpecial ( this, ResId( BTN_FILLCHAR_OTHER ) ),
+ aFillChar ( this, ResId( ED_FILLCHAR_OTHER ) ),
+ aFillLabel ( this, ResId( GB_FILLCHAR ) ),
+ aNewBtn ( this, ResId( BTN_NEW ) ),
+ aDelAllBtn ( this, ResId( BTN_DELALL ) ),
+ aDelBtn ( this, ResId( BTN_DEL ) ),
+
+ aNewTabs ( 0, 0, SVX_TAB_ADJUST_LEFT, GetWhich( SID_ATTR_TABSTOP ) ),
+ aAktTab ( 0 ),
+ nDefDist ( 0 ),
+ bCheck ( FALSE )
+
+{
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ eDefUnit = FUNIT_TWIP;
+
+ // Metrik einstellen
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+ SetFieldUnit( aTabBox, eFUnit );
+
+ // Buttons initialisieren
+ aNewBtn.SetClickHdl( LINK( this,SvxTabulatorTabPage, NewHdl_Impl ) );
+ aDelBtn.SetClickHdl( LINK( this,SvxTabulatorTabPage, DelHdl_Impl ) );
+ aDelAllBtn.SetClickHdl( LINK( this,SvxTabulatorTabPage, DelAllHdl_Impl ) );
+
+ Link aLink = LINK( this, SvxTabulatorTabPage, TabTypeCheckHdl_Impl );
+ aLeftTab.SetClickHdl( aLink );
+ aRightTab.SetClickHdl( aLink );
+ aDezTab.SetClickHdl( aLink );
+ aCenterTab.SetClickHdl( aLink );
+
+ aDezChar.SetLoseFocusHdl( LINK( this, SvxTabulatorTabPage, GetDezCharHdl_Impl ) );
+ aDezChar.SetMaxTextLen(1);
+ aDezChar.Disable();
+ aDezCharLabel.Disable();
+
+ aLink = LINK( this, SvxTabulatorTabPage, FillTypeCheckHdl_Impl );
+ aNoFillChar.SetClickHdl( aLink );
+ aFillPoints.SetClickHdl( aLink );
+ aFillDashLine.SetClickHdl( aLink );
+ aFillSolidLine.SetClickHdl( aLink );
+ aFillSpecial.SetClickHdl( aLink );
+ aFillChar.SetLoseFocusHdl( LINK( this, SvxTabulatorTabPage, GetFillCharHdl_Impl ) );
+ aFillChar.SetMaxTextLen(1);
+ aFillChar.Disable();
+
+ aTabBox.SetDoubleClickHdl( LINK( this, SvxTabulatorTabPage, SelectHdl_Impl ) );
+ aTabBox.SetModifyHdl( LINK( this, SvxTabulatorTabPage, ModifyHdl_Impl ) );
+
+ // das Default-Dezimalzeichen vom System holen
+ aAktTab.GetDecimal() =
+ GetpApp()->GetAppInternational().GetNumDecimalSep();
+ FreeResource();
+}
+
+// -----------------------------------------------------------------------
+
+SvxTabulatorTabPage::~SvxTabulatorTabPage()
+{
+ delete pLeftWin;
+ delete pRightWin;
+ delete pCenterWin;
+ delete pDezWin;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT* SvxTabulatorTabPage::GetRanges()
+{
+ return pRanges;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet )
+{
+ BOOL bModified = FALSE;
+
+ // Hier die Werte aus den Controls eintueten
+ if ( aNewBtn.IsEnabled() )
+ NewHdl_Impl( 0 );
+
+ // call at first the LoseFocus-Handler
+ GetDezCharHdl_Impl( &aDezChar );
+ GetFillCharHdl_Impl( &aFillChar );
+
+ FillUpWithDefTabs_Impl( nDefDist, aNewTabs );
+ SfxItemPool* pPool = rSet.GetPool();
+ MapUnit eUnit = (MapUnit)pPool->GetMetric( GetWhich( SID_ATTR_TABSTOP ) );
+ const SfxPoolItem* pOld = GetOldItem( rSet, SID_ATTR_TABSTOP );
+
+ // Wenn sich im ItemSet ein LRSpaceItem mit negativen Erstzeileneinzug
+ // befindet, muss im TabStopItem auf der Position 0 ein DefTab sein.
+ const SfxPoolItem* pLRSpace;
+ // wenn nicht im neuen Set, dann vielleicht im alten
+ if ( SFX_ITEM_SET !=
+ rSet.GetItemState( GetWhich( SID_ATTR_LRSPACE ), TRUE, &pLRSpace ) )
+ pLRSpace = GetOldItem( rSet, SID_ATTR_LRSPACE );
+
+ if ( pLRSpace && ( (SvxLRSpaceItem*)pLRSpace )->GetTxtFirstLineOfst() < 0 )
+ {
+ SvxTabStop aNull( 0, SVX_TAB_ADJUST_DEFAULT );
+ aNewTabs.Insert( aNull );
+ }
+
+ if ( MAP_TWIP != eUnit )
+ {
+ SvxTabStopItem aTmp( aNewTabs );
+ aTmp.Remove( 0, aTmp.Count() );
+
+ for ( USHORT i = 0; i < aNewTabs.Count(); ++i )
+ {
+ SvxTabStop aTmpStop = aNewTabs[i];
+ aTmpStop.GetTabPos() =
+ LogicToLogic( aTmpStop.GetTabPos(), MAP_TWIP, eUnit );
+ aTmp.Insert( aTmpStop );
+ }
+
+ if ( !pOld || !( *( (SvxTabStopItem*)pOld ) == aTmp ) )
+ {
+ rSet.Put( aTmp );
+ bModified = TRUE;
+ }
+ }
+ else if ( !pOld || !( *( (SvxTabStopItem*)pOld ) == aNewTabs ) )
+ {
+ rSet.Put( aNewTabs );
+ bModified = TRUE;
+ }
+ return bModified;
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxTabulatorTabPage::Create( Window* pParent,
+ const SfxItemSet& rSet)
+{
+ return ( new SvxTabulatorTabPage( pParent, rSet ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxTabulatorTabPage::Reset( const SfxItemSet& rSet )
+{
+ SfxItemPool* pPool = rSet.GetPool();
+ MapUnit eUnit = (MapUnit)pPool->GetMetric( GetWhich( SID_ATTR_TABSTOP ) );
+
+ // Aktuelle Tabs
+ const SfxPoolItem* pItem = GetItem( rSet, SID_ATTR_TABSTOP );
+
+ if ( pItem )
+ {
+ if ( MAP_TWIP != eUnit )
+ {
+ SvxTabStopItem aTmp( *( (const SvxTabStopItem*)pItem ) );
+ aNewTabs.Remove( 0, aNewTabs.Count() );
+
+ for ( USHORT i = 0; i < aTmp.Count(); ++i )
+ {
+ SvxTabStop aTmpStop = aTmp[i];
+ aTmpStop.GetTabPos() =
+ LogicToLogic( aTmpStop.GetTabPos(), eUnit, MAP_TWIP );
+ aNewTabs.Insert( aTmpStop );
+ }
+ }
+ else
+ aNewTabs = *( (const SvxTabStopItem*)pItem );
+ }
+ else
+ aNewTabs.Remove( 0, aNewTabs.Count() );
+
+ // Default-Tab - Abstand
+ nDefDist = SVX_TAB_DEFDIST;
+ pItem = GetItem( rSet, SID_ATTR_TABSTOP_DEFAULTS );
+
+ if ( pItem )
+ nDefDist = LogicToLogic(
+ (long)((const SfxUInt16Item*)pItem)->GetValue(), eUnit, MAP_TWIP );
+
+ // Aktuell selektierte Tab-Pos
+ USHORT nTabPos = 0;
+ pItem = GetItem( rSet, SID_ATTR_TABSTOP_POS );
+
+ if ( pItem )
+ nTabPos = ( (const SfxUInt16Item*)pItem )->GetValue();
+
+ InitTabPos_Impl( nTabPos );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxTabulatorTabPage::DisableControls( const USHORT nFlag )
+{
+ if ( ( TABTYPE_LEFT & nFlag ) == TABTYPE_LEFT )
+ {
+ aLeftTab.Disable();
+ pLeftWin->Disable();
+ }
+ if ( ( TABTYPE_RIGHT & nFlag ) == TABTYPE_RIGHT )
+ {
+ aRightTab.Disable();
+ pRightWin->Disable();
+ }
+ if ( ( TABTYPE_CENTER & nFlag ) == TABTYPE_CENTER )
+ {
+ aCenterTab.Disable();
+ pCenterWin->Disable();
+ }
+ if ( ( TABTYPE_DEZIMAL & nFlag ) == TABTYPE_DEZIMAL )
+ {
+ aDezTab.Disable();
+ pDezWin->Disable();
+ aDezCharLabel.Disable();
+ aDezChar.Disable();
+ }
+ if ( ( TABTYPE_ALL & nFlag ) == TABTYPE_ALL )
+ aTabTypeLabel.Disable();
+ if ( ( TABFILL_NONE & nFlag ) == TABFILL_NONE )
+ aNoFillChar.Disable();
+ if ( ( TABFILL_POINT & nFlag ) == TABFILL_POINT )
+ aFillPoints.Disable();
+ if ( ( TABFILL_DASHLINE & nFlag ) == TABFILL_DASHLINE )
+ aFillDashLine.Disable();
+ if ( ( TABFILL_SOLIDLINE & nFlag ) == TABFILL_SOLIDLINE )
+ aFillSolidLine.Disable();
+ if ( ( TABFILL_SPECIAL & nFlag ) == TABFILL_SPECIAL )
+ {
+ aFillSpecial.Disable();
+ aFillChar.Disable();
+ }
+ if ( ( TABFILL_ALL & nFlag ) == TABFILL_ALL )
+ aFillLabel.Disable();
+}
+
+// -----------------------------------------------------------------------
+
+int SvxTabulatorTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( pSet )
+ FillItemSet( *pSet );
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxTabulatorTabPage::InitTabPos_Impl( USHORT nTabPos )
+{
+ aTabBox.Clear();
+
+ // Aktuelle TabPos korrigieren und Defaults-Tabs
+ for ( USHORT i = 0; i < aNewTabs.Count(); i++ )
+ {
+ if ( aNewTabs[i].GetAdjustment() != SVX_TAB_ADJUST_DEFAULT )
+ {
+ long nOffset = 0;
+ const SfxPoolItem* pItem = 0;
+ if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, TRUE, &pItem )
+ == SFX_ITEM_SET )
+ nOffset = ( (const SfxInt32Item*)pItem )->GetValue();
+ aTabBox.InsertValue( aTabBox.Normalize(
+ aNewTabs[i].GetTabPos() + nOffset ), eDefUnit );
+ }
+ else
+ aNewTabs.Remove( i-- );
+ }
+
+ // aktuellen Tabulator auswaehlen
+ const USHORT nSize = aNewTabs.Count();
+
+ if ( nTabPos >= nSize )
+ nTabPos = 0;
+
+ // alle RadioButtons erstmal ausschalten
+ aLeftTab.Check( TRUE );
+ aNoFillChar.Check( TRUE );
+
+ if( aTabBox.GetEntryCount() > 0 )
+ {
+ aTabBox.SetText( aTabBox.GetEntry( nTabPos ) );
+ aAktTab = aNewTabs[nTabPos];
+
+ SetFillAndTabType_Impl();
+ aNewBtn.Disable();
+ aDelBtn.Enable();
+ }
+ else
+ { // kein Eintrag dann ist 0 der Default-Wert
+ aTabBox.SetValue( 0, eDefUnit );
+
+ aNewBtn.Enable();
+ aDelBtn.Disable();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxTabulatorTabPage::SetFillAndTabType_Impl()
+{
+ RadioButton* pTypeBtn = 0;
+ RadioButton* pFillBtn = 0;
+
+ aDezChar.Disable();
+ aDezCharLabel.Disable();
+
+ if ( aAktTab.GetAdjustment() == SVX_TAB_ADJUST_LEFT )
+ pTypeBtn = &aLeftTab;
+ else if ( aAktTab.GetAdjustment() == SVX_TAB_ADJUST_RIGHT )
+ pTypeBtn = &aRightTab;
+ else if ( aAktTab.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL )
+ {
+ pTypeBtn = &aDezTab;
+ aDezChar.Enable();
+ aDezCharLabel.Enable();
+ aDezChar.SetText( String( (sal_Unicode)aAktTab.GetDecimal() ) );
+ }
+ else if ( aAktTab.GetAdjustment() == SVX_TAB_ADJUST_CENTER )
+ pTypeBtn = &aCenterTab;
+
+ if ( pTypeBtn )
+ pTypeBtn->Check();
+
+ aFillChar.Disable();
+ aFillChar.SetText( String() );
+
+ if ( aAktTab.GetFill() == ' ' )
+ pFillBtn = &aNoFillChar;
+ else if ( aAktTab.GetFill() == '-' )
+ pFillBtn = &aFillDashLine;
+ else if ( aAktTab.GetFill() == '_' )
+ pFillBtn = &aFillSolidLine;
+ else if ( aAktTab.GetFill() == '.' )
+ pFillBtn = &aFillPoints;
+ else
+ {
+ pFillBtn = &aFillSpecial;
+ aFillChar.Enable();
+ aFillChar.SetText( String( (sal_Unicode)aAktTab.GetFill() ) );
+ }
+ pFillBtn->Check();
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn )
+{
+ // Einen neuen Hinzufuegen und Selectieren
+ // Wert aus der Anzeige holen
+ long nVal = aTabBox.Denormalize( aTabBox.GetValue( eDefUnit ) );
+
+ // Wenn der pBtn == 0 && der Value == 0 dann keinen Tab Erzeugen
+ // weil ueber OK erzeugt
+ if ( nVal == 0 && pBtn == 0 )
+ return 0;
+
+ long nOffset = 0;
+ const SfxPoolItem* pItem = 0;
+
+ if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, TRUE, &pItem ) ==
+ SFX_ITEM_SET )
+ nOffset = ( (const SfxInt32Item*)pItem )->GetValue();
+ const long nReal = nVal - nOffset;
+ USHORT nSize = aTabBox.GetEntryCount();
+
+ USHORT i;
+ for( i = 0; i < nSize; i++ )
+ {
+ if ( nReal < aNewTabs[i].GetTabPos() )
+ break;
+ }
+
+ // ListBox-Eintrag vornehmen
+ aTabBox.InsertValue( aTabBox.Normalize( nVal ), eDefUnit, i );
+ aAktTab.GetTabPos() = nReal;
+ SvxTabAdjust eAdj = SVX_TAB_ADJUST_LEFT;
+
+ if ( aRightTab.IsChecked() )
+ eAdj = SVX_TAB_ADJUST_RIGHT;
+ else if ( aCenterTab.IsChecked() )
+ eAdj = SVX_TAB_ADJUST_CENTER;
+ else if ( aDezTab.IsChecked() )
+ eAdj = SVX_TAB_ADJUST_DECIMAL;
+
+ aAktTab.GetAdjustment() = eAdj;
+ aNewTabs.Insert( aAktTab );
+
+ aNewBtn.Disable();
+ aDelBtn.Enable();
+ aTabBox.GrabFocus();
+
+ // falls kein RadioButton geclickt wurde,
+ // muss trotzdem geputtet werden
+ bCheck |= TRUE;
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxTabulatorTabPage, DelHdl_Impl, Button *, EMPTYARG )
+{
+ USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue() );
+
+ if ( nPos == COMBOBOX_ENTRY_NOTFOUND )
+ return 0;
+
+ if ( aTabBox.GetEntryCount() == 1 )
+ {
+ DelAllHdl_Impl( 0 );
+ return 0;
+ }
+
+ // Tab loeschen
+ aTabBox.RemoveEntry( nPos );
+ aNewTabs.Remove( nPos );
+
+ // aAktTab neu setzen
+ const USHORT nSize = aNewTabs.Count();
+
+ if ( nSize > 0 )
+ {
+ // Pos korrigieren
+ nPos = ( ( nSize - 1 ) >= nPos) ? nPos : nPos - 1;
+ aTabBox.SetValue( aTabBox.GetValue( nPos ) );
+ aAktTab = aNewTabs[nPos];
+ }
+
+ // Falls keine Tabs Enable Disable Controls
+ if ( aTabBox.GetEntryCount() == 0 )
+ {
+ aDelBtn.Disable();
+ aNewBtn.Enable();
+ aTabBox.GrabFocus();
+ }
+
+ // falls kein RadioButton geclickt wurde,
+ // muss trotzdem geputtet werden
+ bCheck |= TRUE;
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxTabulatorTabPage, DelAllHdl_Impl, Button *, EMPTYARG )
+{
+ if ( aNewTabs.Count() )
+ {
+ aNewTabs = SvxTabStopItem( 0 );
+ InitTabPos_Impl();
+
+ // damit in FillItemSet() geputtet wird
+ bCheck |= TRUE;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox )
+{
+ bCheck |= TRUE;
+ SvxTabAdjust eAdj;
+ aDezChar.Disable();
+ aDezCharLabel.Disable();
+ aDezChar.SetText( String() );
+
+ if ( pBox == &aLeftTab )
+ eAdj = SVX_TAB_ADJUST_LEFT;
+ else if ( pBox == &aRightTab )
+ eAdj = SVX_TAB_ADJUST_RIGHT;
+ else if ( pBox == &aCenterTab )
+ eAdj = SVX_TAB_ADJUST_CENTER;
+ else
+ {
+ eAdj = SVX_TAB_ADJUST_DECIMAL;
+ aDezChar.Enable();
+ aDezCharLabel.Enable();
+ aDezChar.SetText( String( (sal_Unicode)aAktTab.GetDecimal() ) );
+ }
+
+ aAktTab.GetAdjustment() = eAdj;
+ USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit );
+
+ if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
+ {
+ aNewTabs.Remove( nPos );
+ aNewTabs.Insert( aAktTab );
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox )
+{
+ bCheck |= TRUE;
+ BYTE cFill = ' ';
+ aFillChar.SetText( String() );
+ aFillChar.Disable();
+
+ if( pBox == &aFillSpecial )
+ aFillChar.Enable();
+ else if ( pBox == &aNoFillChar )
+ cFill = ' ';
+ else if ( pBox == &aFillSolidLine )
+ cFill = '_';
+ else if ( pBox == &aFillPoints )
+ cFill = '.';
+ else if ( pBox == &aFillDashLine )
+ cFill = '-';
+
+ aAktTab.GetFill() = cFill;
+ USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit );
+
+ if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
+ {
+ aNewTabs.Remove( nPos );
+ aNewTabs.Insert( aAktTab );
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit )
+{
+ String aChar( pEdit->GetText() );
+
+ if ( aChar.Len() > 0 )
+ aAktTab.GetFill() = aChar.GetChar( 0 );
+
+ const USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit);
+ if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
+ {
+ aNewTabs.Remove( nPos );
+ aNewTabs.Insert( aAktTab );
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit )
+{
+ String aChar( pEdit->GetText() );
+ if ( aChar.Len() > 0 && ( aChar.GetChar( 0 ) >= ' ' || aChar.GetChar( 0 ) < -1 ) )
+ aAktTab.GetDecimal() = aChar.GetChar( 0 );
+
+ USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit );
+ if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
+ {
+ aNewTabs.Remove( nPos );
+ aNewTabs.Insert( aAktTab );
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxTabulatorTabPage, SelectHdl_Impl, MetricBox *, EMPTYARG )
+{
+ USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit );
+ if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
+ {
+ aAktTab = aNewTabs[nPos];
+ aNewBtn.Disable();
+ SetFillAndTabType_Impl();
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxTabulatorTabPage, ModifyHdl_Impl, MetricBox *, EMPTYARG )
+{
+ USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit );
+ if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
+ {
+ aAktTab = aNewTabs[nPos];
+ SetFillAndTabType_Impl();
+
+ aAktTab.GetTabPos() =
+ aTabBox.Denormalize( aTabBox.GetValue( eDefUnit ) );
+
+ aNewBtn.Disable();
+ aDelBtn.Enable();
+ return 0;
+ }
+ aNewBtn.Enable();
+ aDelBtn.Disable();
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/tabstpge.hrc b/svx/source/dialog/tabstpge.hrc
new file mode 100644
index 0000000000..537effe31d
--- /dev/null
+++ b/svx/source/dialog/tabstpge.hrc
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabstpge.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_TABSTPGE_HRC
+#define _SVX_TABSTPGE_HRC
+
+// defines ------------------------------------------------------------------
+
+#define ED_TABPOS 10
+#define GB_TABPOS 11
+
+#define BTN_TABTYPE_LEFT 20
+#define WIN_TABLEFT 21
+#define BTN_TABTYPE_RIGHT 22
+#define WIN_TABRIGHT 23
+#define BTN_TABTYPE_CENTER 24
+#define WIN_TABCENTER 25
+#define BTN_TABTYPE_DECIMAL 26
+#define WIN_TABDECIMAL 27
+#define ED_TABTYPE_DECCHAR 28
+#define FT_TABTYPE_DECCHAR 29
+#define GB_TABTYPE 30
+
+#define BTN_FILLCHAR_NO 40
+#define BTN_FILLCHAR_POINTS 41
+#define BTN_FILLCHAR_DASHLINE 42
+#define BTN_FILLCHAR_UNDERSCORE 43
+#define BTN_FILLCHAR_OTHER 44
+#define ED_FILLCHAR_OTHER 45
+#define GB_FILLCHAR 46
+
+#define BTN_NEW 50
+#define BTN_DEL 51
+#define BTN_DELALL 52
+
+
+#endif
+
diff --git a/svx/source/dialog/tabstpge.src b/svx/source/dialog/tabstpge.src
new file mode 100644
index 0000000000..16cbddd633
--- /dev/null
+++ b/svx/source/dialog/tabstpge.src
@@ -0,0 +1,530 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabstpge.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "tabstpge.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXPAGE_TABULATOR -------------------------------------------------
+TabPage RID_SVXPAGE_TABULATOR
+{
+ HelpId = HID_TABULATOR ;
+ Hide = TRUE ;
+ Text = "Tabulatoren" ;
+ Text [ English ] = "Tabs" ;
+ Text [ norwegian ] = "Tabulatorer" ;
+ Text [ italian ] = "Tabulazioni" ;
+ Text [ portuguese_brazilian ] = "Tabulações" ;
+ Text [ portuguese ] = "Tabulações" ;
+ Text [ finnish ] = "Sarkaimet" ;
+ Text [ danish ] = "Tabulatorer" ;
+ Text [ french ] = "Tabulations" ;
+ Text [ swedish ] = "Tabulatorer" ;
+ Text [ dutch ] = "Tabstops" ;
+ Text [ spanish ] = "Tabulaciones" ;
+ Text [ english_us ] = "Tabs" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ MetricBox ED_TABPOS
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 45 , 95 ) ;
+ Minimum = -5600 ;
+ Maximum = 5600 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ };
+ GroupBox GB_TABPOS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 57 , 112 ) ;
+ Text = "Position" ;
+ Text [ ENGLISH ] = "Position" ;
+ Text [ norwegian ] = "Posisjon" ;
+ Text [ italian ] = "Posizione" ;
+ Text [ portuguese_brazilian ] = "Posição" ;
+ Text [ portuguese ] = "Posição" ;
+ Text [ finnish ] = "Sijainti" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "Position" ;
+ Text [ swedish ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posición" ;
+ Text [ english_us ] = "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 ] = " ";
+ };
+ RadioButton BTN_TABTYPE_LEFT
+ {
+ Pos = MAP_APPFONT ( 75 , 14 ) ;
+ Size = MAP_APPFONT ( 53 , 10 ) ;
+ Text = "~Links" ;
+ Text [ ENGLISH ] = "~Left" ;
+ Text [ norwegian ] = "~Left" ;
+ Text [ italian ] = "A ~sinistra" ;
+ Text [ portuguese_brazilian ] = "~Esquerda" ;
+ Text [ portuguese ] = "~Esquerda" ;
+ Text [ finnish ] = "~Vasemmalle" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ french ] = "~À gauche" ;
+ Text [ swedish ] = "~Vänster" ;
+ Text [ dutch ] = "~Links" ;
+ Text [ spanish ] = "~Izquierda" ;
+ Text [ english_us ] = "~Left" ;
+ Check = TRUE ;
+ Text[ chinese_simplified ] = "Ïò×ó(~L)";
+ Text[ russian ] = "Ñëåâà";
+ Text[ polish ] = "Z l~ewej";
+ Text[ japanese ] = "¶‘µ‚¦(~L)";
+ Text[ chinese_traditional ] = "¦V¥ª(~L)";
+ Text[ arabic ] = "íÓÇÑ";
+ Text[ greek ] = "ÁñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ(~L)";
+ Text[ turkish ] = "~Sol";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_TABLEFT
+ {
+ Pos = MAP_APPFONT ( 116 , 14 ) ;
+ Size = MAP_APPFONT ( 7 , 10 ) ;
+ };
+ RadioButton BTN_TABTYPE_RIGHT
+ {
+ Pos = MAP_APPFONT ( 75 , 28 ) ;
+ Size = MAP_APPFONT ( 53 , 10 ) ;
+ Text = "~Rechts" ;
+ Text [ ENGLISH ] = "Ri~ght" ;
+ Text [ norwegian ] = "Hø~yre" ;
+ Text [ italian ] = "A dest~ra" ;
+ Text [ portuguese_brazilian ] = "Di~reita" ;
+ Text [ portuguese ] = "Di~reita" ;
+ Text [ finnish ] = "~Oikea" ;
+ Text [ danish ] = "Højre" ;
+ Text [ french ] = "~À droite" ;
+ Text [ swedish ] = "Höge~r" ;
+ Text [ dutch ] = "~Rechts" ;
+ Text [ spanish ] = "~Derecha" ;
+ Text [ english_us ] = "Righ~t" ;
+ Text[ chinese_simplified ] = "ÏòÓÒ(~R)";
+ Text[ russian ] = "Ñïðàâà";
+ Text[ polish ] = "Z p~rawej";
+ Text[ japanese ] = "‰E‘µ‚¦(~R)";
+ Text[ chinese_traditional ] = "¦V¥k(~R)";
+ Text[ arabic ] = "íãíä";
+ Text[ greek ] = "ÄåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ(~T)";
+ Text[ turkish ] = "Sað~";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_TABRIGHT
+ {
+ Pos = MAP_APPFONT ( 116 , 28 ) ;
+ Size = MAP_APPFONT ( 7 , 10 ) ;
+ };
+ RadioButton BTN_TABTYPE_CENTER
+ {
+ Pos = MAP_APPFONT ( 75 , 42 ) ;
+ Size = MAP_APPFONT ( 53 , 10 ) ;
+ Text = "Z~entriert" ;
+ Text [ ENGLISH ] = "C~enter" ;
+ Text [ norwegian ] = "M~idtstill" ;
+ Text [ italian ] = "~Centrata" ;
+ Text [ portuguese_brazilian ] = "C~entro" ;
+ Text [ portuguese ] = "~Centrado" ;
+ Text [ finnish ] = "~Keski" ;
+ Text [ danish ] = "Centreret" ;
+ Text [ french ] = "~Centré" ;
+ Text [ swedish ] = "C~entrerat" ;
+ Text [ dutch ] = "~Centreren" ;
+ Text [ spanish ] = "Cen~trado" ;
+ Text [ english_us ] = "C~entered" ;
+ Text[ chinese_simplified ] = "¾ÓÖÐ(~E)";
+ Text[ russian ] = "Ïî öåíòðó";
+ Text[ polish ] = "Wyœrodk.";
+ Text[ japanese ] = "’†‰›‘µ‚¦(~E)";
+ Text[ chinese_traditional ] = "¸m¤¤(~E)";
+ Text[ arabic ] = "ÊæÓíØ";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá";
+ Text[ korean ] = "°¡¿îµ¥(~E)";
+ Text[ turkish ] = "~Ortala";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_TABCENTER
+ {
+ Pos = MAP_APPFONT ( 116 , 42 ) ;
+ Size = MAP_APPFONT ( 7 , 10 ) ;
+ };
+ RadioButton BTN_TABTYPE_DECIMAL
+ {
+ Pos = MAP_APPFONT ( 75 , 56 ) ;
+ Size = MAP_APPFONT ( 53 , 10 ) ;
+ Text = "~Dezimal" ;
+ Text [ ENGLISH ] = "Deci~mal" ;
+ Text [ norwegian ] = "Desi~mal" ;
+ Text [ italian ] = "~Decimale" ;
+ Text [ portuguese_brazilian ] = "Deci~mal" ;
+ Text [ portuguese ] = "Deci~mal" ;
+ Text [ finnish ] = "~Desimaali" ;
+ Text [ danish ] = "Decimal" ;
+ Text [ french ] = "Déci~male" ;
+ Text [ swedish ] = "~Decimal" ;
+ Text [ dutch ] = "~Decimaal" ;
+ Text [ spanish ] = "Deci~mal" ;
+ Text [ english_us ] = "Deci~mal" ;
+ Text[ chinese_simplified ] = "Ê®½øÖƵÄ(~M)";
+ Text[ russian ] = "Äåñÿòè÷íûé";
+ Text[ polish ] = "Dziesiê~tny";
+ Text[ japanese ] = "¬”“_‘µ‚¦(~M)";
+ Text[ chinese_traditional ] = "¤p¼ÆÂI(~M)";
+ Text[ arabic ] = "ÚÔÑí";
+ Text[ greek ] = "~ÄåêáäéêÜ";
+ Text[ korean ] = "¼Ò¼öÁ¡(~M)";
+ Text[ turkish ] = "O~ndalýk";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_TABDECIMAL
+ {
+ Pos = MAP_APPFONT ( 116 , 56 ) ;
+ Size = MAP_APPFONT ( 7 , 10 ) ;
+ };
+ FixedText FT_TABTYPE_DECCHAR
+ {
+ Pos = MAP_APPFONT ( 85 , 70 ) ;
+ Size = MAP_APPFONT ( 32 , 9 ) ;
+ Text = "Zei~chen" ;
+ Text [ ENGLISH ] = "~Char" ;
+ Text [ norwegian ] = "~Tegn" ;
+ Text [ italian ] = "Cara~ttere" ;
+ Text [ portuguese_brazilian ] = "~Caracter" ;
+ Text [ portuguese ] = "~Caracteres" ;
+ Text [ finnish ] = "~Merkki" ;
+ Text [ danish ] = "Tegn" ;
+ Text [ french ] = "~Caractère" ;
+ Text [ swedish ] = "Te~cken" ;
+ Text [ dutch ] = "T~eken" ;
+ Text [ spanish ] = "~Carácter" ;
+ Text [ english_us ] = "~Character" ;
+ Text[ chinese_simplified ] = "×Ö·û(~C)";
+ Text[ russian ] = "Çíàê";
+ Text[ polish ] = "Znak";
+ Text[ japanese ] = "•¶Žš(~C)";
+ Text[ chinese_traditional ] = "¦r¤¸(~C)";
+ Text[ arabic ] = "ÍÑÝ";
+ Text[ greek ] = "×áñáêôÞñåò";
+ Text[ korean ] = "¹®ÀÚ(~C)";
+ Text[ turkish ] = "Ka~rakter";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_TABTYPE_DECCHAR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 118 , 68 ) ;
+ Size = MAP_APPFONT ( 9 , 12 ) ;
+ Left = TRUE ;
+ };
+ GroupBox GB_TABTYPE
+ {
+ Pos = MAP_APPFONT ( 69 , 3 ) ;
+ Size = MAP_APPFONT ( 61 , 84 ) ;
+ Text = "Typ" ;
+ Text [ ENGLISH ] = "Type" ;
+ Text [ norwegian ] = "Type" ;
+ Text [ italian ] = "Tipo" ;
+ Text [ portuguese_brazilian ] = "Tipo" ;
+ Text [ portuguese ] = "Tipo" ;
+ Text [ finnish ] = "Laji" ;
+ Text [ danish ] = "Type" ;
+ Text [ french ] = "Ca~ractères" ;
+ Text [ swedish ] = "Typ" ;
+ Text [ dutch ] = "Type" ;
+ Text [ spanish ] = "Tipo" ;
+ Text [ english_us ] = "Type" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ";
+ Text[ russian ] = "Òèï";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "Ží—Þ";
+ Text[ chinese_traditional ] = "Ãþ«¬";
+ Text[ arabic ] = "ÇáäæÚ";
+ Text[ greek ] = "Ôýðïò";
+ Text[ korean ] = "À¯Çü";
+ Text[ turkish ] = "Tip";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_FILLCHAR_NO
+ {
+ Pos = MAP_APPFONT ( 142 , 14 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ Text = "~Keine" ;
+ Text [ ENGLISH ] = "N~one" ;
+ Text [ norwegian ] = "I~ngen" ;
+ Text [ italian ] = "~Nessuno" ;
+ Text [ portuguese_brazilian ] = "N~enhum" ;
+ Text [ portuguese ] = "N~enhum" ;
+ Text [ finnish ] = "~Ei ole" ;
+ Text [ danish ] = "Ingen" ;
+ Text [ french ] = "A~ucun(e)" ;
+ Text [ swedish ] = "~Inga" ;
+ Text [ dutch ] = "~Geen" ;
+ Text [ spanish ] = "Nin~guno" ;
+ Text [ english_us ] = "N~one" ;
+ Check = TRUE ;
+ Text[ chinese_simplified ] = "ÎÞ(~O)";
+ Text[ russian ] = "Áåç";
+ Text[ polish ] = "Brak";
+ Text[ japanese ] = "‚È‚µ(~O)";
+ Text[ chinese_traditional ] = "µL(~O)";
+ Text[ arabic ] = "ÈÏæä";
+ Text[ greek ] = "ÊáíÝíá";
+ Text[ korean ] = "¾øÀ½(~O)";
+ Text[ turkish ] = "~Yok";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_FILLCHAR_POINTS
+ {
+ Pos = MAP_APPFONT ( 142 , 28 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ Text = "~........" ;
+ };
+ RadioButton BTN_FILLCHAR_DASHLINE
+ {
+ Pos = MAP_APPFONT ( 142 , 42 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ Text = "~--------" ;
+ };
+ RadioButton BTN_FILLCHAR_UNDERSCORE
+ {
+ Pos = MAP_APPFONT ( 142 , 56 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ Text = "~_____" ;
+ };
+ RadioButton BTN_FILLCHAR_OTHER
+ {
+ Pos = MAP_APPFONT ( 142 , 70 ) ;
+ Size = MAP_APPFONT ( 46 , 10 ) ;
+ Text = "Ze~ichen" ;
+ Text [ ENGLISH ] = "Ch~ar" ;
+ Text [ norwegian ] = "Te~gn" ;
+ Text [ italian ] = "C~arattere" ;
+ Text [ portuguese_brazilian ] = "Ca~racter" ;
+ Text [ portuguese ] = "Carac~ter" ;
+ Text [ finnish ] = "Me~rkki" ;
+ Text [ danish ] = "Tegn" ;
+ Text [ french ] = "C~aractère" ;
+ Text [ swedish ] = "Tec~ken" ;
+ Text [ dutch ] = "~Teken" ;
+ Text [ spanish ] = "C~arácter" ;
+ Text [ english_us ] = "Character" ;
+ Text[ chinese_simplified ] = "×Ö·û(~H)";
+ Text[ russian ] = "Çíàê";
+ Text[ polish ] = "Znak";
+ Text[ japanese ] = "•¶Žš(~H)";
+ Text[ chinese_traditional ] = "¦r¤¸(~H)";
+ Text[ arabic ] = "ÍÑÝ";
+ Text[ greek ] = "×áñáêôÞñåò";
+ Text[ korean ] = "¹®ÀÚ";
+ Text[ turkish ] = "Kara~kter";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_FILLCHAR_OTHER
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 189 , 69 ) ;
+ Size = MAP_APPFONT ( 9 , 12 ) ;
+ Left = TRUE ;
+ };
+ GroupBox GB_FILLCHAR
+ {
+ Pos = MAP_APPFONT ( 136 , 3 ) ;
+ Size = MAP_APPFONT ( 65 , 84 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Füllzeichen : F³llzeichen */
+ /* ### ACHTUNG: Neuer Text in Resource? Füllzeichen : F³llzeichen */
+ Text = "Füllzeichen" ;
+ Text [ ENGLISH ] = "Fill character" ;
+ Text [ norwegian ] = "Fylltegn" ;
+ Text [ italian ] = "Caratteri riempitivi" ;
+ Text [ portuguese_brazilian ] = "Caracter preenchido" ;
+ Text [ portuguese ] = "Carácter de preenchimento" ;
+ Text [ finnish ] = "Täytemerkki" ;
+ Text [ danish ] = "Fyldtegn" ;
+ Text [ french ] = "Caractères de remplissage" ;
+ Text [ swedish ] = "Utfyllnadstecken" ;
+ Text [ dutch ] = "Opvulteken" ;
+ Text [ spanish ] = "Carácter de relleno" ;
+ Text [ english_us ] = "Fill character" ;
+ Text[ chinese_simplified ] = "Ç°µ¼×Ö·û£º";
+ Text[ russian ] = "Çàïîëíèòåëü";
+ Text[ polish ] = "Znaki wiod¹ce";
+ Text[ japanese ] = "Ø°ÀÞ°";
+ Text[ chinese_traditional ] = "¤Þ¾É½u";
+ Text[ arabic ] = "ÍÑÝ ÓÇÈÞ";
+ Text[ greek ] = "×áñáêôÞñáò ãåìßóìáôïò";
+ Text[ korean ] = "ä¿ò±âÈ£";
+ Text[ turkish ] = "Öncü";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_NEW
+ {
+ Pos = MAP_APPFONT ( 205 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Neu" ;
+ Text [ ENGLISH ] = "~New" ;
+ Text [ norwegian ] = "~New" ;
+ Text [ italian ] = "~Nuova" ;
+ Text [ portuguese_brazilian ] = "~Novo" ;
+ Text [ portuguese ] = "~Novo" ;
+ Text [ finnish ] = "~Uusi" ;
+ Text [ danish ] = "Ny" ;
+ Text [ french ] = "~Nouveau" ;
+ Text [ swedish ] = "~Ny" ;
+ Text [ dutch ] = "~Nieuw" ;
+ Text [ spanish ] = "~Nuevo" ;
+ Text [ english_us ] = "~New" ;
+ Text[ chinese_simplified ] = "н¨(~N)";
+ Text[ russian ] = "Ñîçä~àòü";
+ Text[ polish ] = "Nowy";
+ Text[ japanese ] = "V‹Kì¬(~N)";
+ Text[ chinese_traditional ] = "¼W¥[(~N)";
+ Text[ arabic ] = "ÌÏíÏ";
+ Text[ greek ] = "Äçìéïõñãßá";
+ Text[ korean ] = "»õ·Î(~N)";
+ Text[ turkish ] = "~Yeni";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_DEL
+ {
+ Pos = MAP_APPFONT ( 205 , 40 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Lö~schen : L÷~schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Lö~schen : L÷~schen */
+ Text = "Lö~schen" ;
+ Text [ ENGLISH ] = "~Delete" ;
+ Text [ norwegian ] = "~Slett" ;
+ Text [ italian ] = "~Elimina" ;
+ Text [ portuguese_brazilian ] = "~Apagar" ;
+ Text [ portuguese ] = "~Apagar" ;
+ Text [ finnish ] = "~Poista" ;
+ Text [ danish ] = "Slet" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ swedish ] = "Ra~dera" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ english_us ] = "~Delete" ;
+ Text[ chinese_simplified ] = "ɾ³ý";
+ Text[ russian ] = "Óäàëèòü";
+ Text[ polish ] = "~Usuñ";
+ Text[ japanese ] = "íœ(~C)";
+ Text[ chinese_traditional ] = "§R°£(~C)";
+ Text[ arabic ] = "ÍÐÝ";
+ Text[ greek ] = "ÄéáãñáöÞ";
+ Text[ korean ] = "»èÁ¦(~C)";
+ Text[ turkish ] = "~Sil";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_DELALL
+ {
+ Pos = MAP_APPFONT ( 205 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Alle löschen : ~Alle l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Alle löschen : ~Alle l÷schen */
+ Text = "~Alle löschen" ;
+ Text [ ENGLISH ] = "Dele~te all" ;
+ Text [ norwegian ] = "Sle~tt alle" ;
+ Text [ italian ] = "~Elimina tutti" ;
+ Text [ portuguese_brazilian ] = "Apag~ar tudo" ;
+ Text [ portuguese ] = "A~pagar todos" ;
+ Text [ finnish ] = "Po~ista kaikki" ;
+ Text [ danish ] = "Slet alle" ;
+ Text [ french ] = "Supprimer ~tout" ;
+ Text [ swedish ] = "Radera ~alla" ;
+ Text [ dutch ] = "~Alle verwijderen" ;
+ Text [ spanish ] = "E~liminar todas" ;
+ Text [ english_us ] = "Delete ~All" ;
+ Text[ chinese_simplified ] = "È«²¿É¾³ý(~A)";
+ Text[ russian ] = "Óäàëèòü âñå";
+ Text[ polish ] = "WyczyϾ w~szyst.";
+ Text[ japanese ] = "‚·‚ׂÄíœ(~A)";
+ Text[ chinese_traditional ] = "¥þ³¡§R°£(~A)";
+ Text[ arabic ] = "ÍÐÝ Çáßá";
+ Text[ greek ] = "ÄéáãñáöÞ üë~á";
+ Text[ korean ] = "¸ðµÎ »èÁ¦(~A)";
+ Text[ turkish ] = "~Tümünü sil";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ÖƱí·û";
+ Text[ russian ] = "Òàáóëÿòîðû";
+ Text[ polish ] = "Tabulatory";
+ Text[ japanese ] = "ÀÌÞ";
+ Text[ chinese_traditional ] = "»sªí²Å";
+ Text[ arabic ] = "ÚáÇãÇÊ ÇáÌÏæáÉ";
+ Text[ greek ] = "ÓôçëïèÝôåò";
+ Text[ korean ] = "ÅÇ";
+ Text[ turkish ] = "Sekmeler";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/test.src b/svx/source/dialog/test.src
new file mode 100644
index 0000000000..563709015d
--- /dev/null
+++ b/svx/source/dialog/test.src
@@ -0,0 +1,1693 @@
+/*************************************************************************
+ *
+ * $RCSfile: test.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "transfrm.hrc"
+ // pragma -------------------------------------------------------------------
+#pragma CHARSET_IBMPC
+ // RID_SVXPAGE_POSITION -----------------------------------------------------
+TabPage RID_SVXPAGE_POSITION
+{
+ HelpId = HID_TRANS_POSITION ;
+ Hide = TRUE ;
+ Text = "Position" ;
+ Text [ English ] = "Position" ;
+ Text [ norwegian ] = "Posisjon" ;
+ Text [ italian ] = "Posizione" ;
+ Text [ portuguese_brazilian ] = "Posi‡Æo" ;
+ Text [ portuguese ] = "Posi‡Æo" ;
+ Text [ finnish ] = "Sijainti" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "Position" ;
+ Text [ swedish ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posici¢n" ;
+ Text [ english_us ] = "Position" ;
+ Size = MAP_APPFONT ( 189 , 97 ) ;
+ FixedText FT_POS_X
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "Position ~X" ;
+ Text [ English ] = "Position ~X" ;
+ Text[ italian ] = "Posizione ~X";
+ Text[ portuguese_brazilian ] = "Posi‡Æo ~X";
+ Text[ portuguese ] = "Posi‡Æo ~X";
+ Text[ danish ] = "Position X";
+ Text[ french ] = "Position ~X";
+ Text[ swedish ] = "Position ~X";
+ Text[ dutch ] = "Positie ~X";
+ Text[ spanish ] = "Posici¢n ~X";
+ Text[ english_us ] = "Position ~X";
+ Text[ russian ] = "ØŒ‡Š”Š˜ ~X";
+ Text[ greek ] = "Ôí¢‡ ~X";
+ Text[ polish ] = "Pozycja ~X";
+ Text[ japanese ] = "?Ò'u ~X";
+ Text[ korean ] = "·õŽ­ X(~X)";
+ Text[ chinese_simplified ] = "ׯ™Ç X(~X)";
+ Text[ chinese_traditional ] = "Ý÷m ~X";
+ Text[ arabic ] = "€ Æ‘™é à";
+ Text[ turkish ] = "~X konumu";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_POS_Y
+ {
+ Pos = MAP_APPFONT ( 12 , 29 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "Position ~Y" ;
+ Text[ portuguese_brazilian ] = "Posi‡Æo ~Y";
+ Text[ french ] = "Position ~Y";
+ Text[ swedish ] = "Position ~Y";
+ Text[ italian ] = "Posizione ~Y";
+ Text[ portuguese ] = "Posi‡Æo ~Y";
+ Text[ danish ] = "Position Y";
+ Text[ dutch ] = "Positie~Y";
+ Text[ spanish ] = "Posici¢n ~Y";
+ Text[ english_us ] = "Position ~Y";
+ Text[ russian ] = "ØŒ‡Š”Š˜ ~Y";
+ Text[ greek ] = "Ôí¢‡ ~Y";
+ Text[ polish ] = "Pozycja ~Y";
+ Text[ japanese ] = "?Ò'u ~Y";
+ Text[ korean ] = "·õŽ­ Y(~Y)";
+ Text[ chinese_simplified ] = "ׯ™Ç Y(~Y)";
+ Text[ chinese_traditional ] = "Ý÷m ~Y";
+ Text[ arabic ] = "€ Æ‘™é å";
+ Text[ turkish ] = "~Y konumu";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_POS_X
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 12 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -120000 ;
+ Maximum = 240000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_POS_Y
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 27 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -120000 ;
+ Maximum = 240000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ GroupBox GRP_POSITION
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 105 , 42 ) ;
+ Text = "Position" ;
+ Text [ English ] = "Position" ;
+ Text [ norwegian ] = "Posisjon" ;
+ Text [ italian ] = "Posizione" ;
+ Text [ portuguese_brazilian ] = "Posi‡Æo" ;
+ Text [ portuguese ] = "Posi‡Æo" ;
+ Text [ finnish ] = "Sijainti" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "Position" ;
+ Text [ swedish ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posici¢n" ;
+ Text [ english_us ] = "Position" ;
+ Text[ russian ] = "ØŒ‡Š”Š˜";
+ Text[ greek ] = "Ôí¢‡";
+ Text[ polish ] = "Pozycja";
+ Text[ japanese ] = "?Ò'u";
+ Text[ korean ] = "·õŽ­";
+ Text[ chinese_simplified ] = "ׯ™Ç";
+ Text[ chinese_traditional ] = "Ý÷m";
+ Text[ arabic ] = "€ Æ‘™é";
+ Text[ turkish ] = "Konum";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_RECT
+ {
+ HelpId = HID_TPPOSITION_CTRL ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 120 , 6 ) ;
+ Size = MAP_APPFONT ( 60 , 39 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Basispunkt" ;
+ QuickHelpText [ English ] = "Base point" ;
+ QuickHelpText [ portuguese ] = "Ponto de base" ;
+ QuickHelpText [ english_us ] = "Base point" ;
+ QuickHelpText [ portuguese_brazilian ] = "Basispunkt" ;
+ QuickHelpText [ swedish ] = "Baspunkt" ;
+ QuickHelpText [ danish ] = "Basispunkt" ;
+ QuickHelpText [ italian ] = "Punto di base" ;
+ QuickHelpText [ spanish ] = "Basispunkt" ;
+ QuickHelpText [ french ] = "Point de base" ;
+ QuickHelpText [ dutch ] = "Basispunt" ;
+ QuickHelpText[ russian ] = "µ…‡Š¤¡…˜ •Œöˆ…";
+ QuickHelpText[ greek ] = "à‡†á‹ ƒš¢‡•";
+ QuickHelpText[ polish ] = "Punkt podstawy";
+ QuickHelpText[ japanese ] = "Öèø«×áýíŽ";
+ QuickHelpText[ korean ] = "Base point";
+ QuickHelpText[ chinese_simplified ] = "Base point";
+ QuickHelpText[ chinese_traditional ] = "ø•¶I";
+ QuickHelpText[ arabic ] = "„è € Çà€à";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ GroupBox GB_ANCHOR
+ {
+ Pos = MAP_APPFONT ( 6 , 50 ) ;
+ Size = MAP_APPFONT ( 105 , 41 ) ;
+ Text = "Verankerung" ;
+ Text [ ENGLISH ] = "Anchor" ;
+ Hide = TRUE ;
+ Text [ dutch ] = "Verankering" ;
+ Text [ english_us ] = "Anchoring" ;
+ Text [ italian ] = "Ancoraggio" ;
+ Text [ spanish ] = "Anclaje" ;
+ Text [ french ] = "Ancrage" ;
+ Text [ swedish ] = "F”rankring" ;
+ Text [ danish ] = "Forankring" ;
+ Text [ portuguese_brazilian ] = "Verankerung" ;
+ Text [ portuguese ] = "Ancorar" ;
+ Text[ russian ] = "ØЊƒ˜‡ˆ…";
+ Text[ greek ] = "µÆˆì¤—¢‡";
+ Text[ polish ] = "Zakotwiczenie";
+ Text[ japanese ] = "ñíôø";
+ Text[ korean ] = "·õŽ­ ø¡µÏ";
+ Text[ chinese_simplified ] = "Ó›ôù";
+ Text[ chinese_traditional ] = "¶ˆ¸w";
+ Text[ arabic ] = "¥à€µ";
+ Text[ turkish ] = "Sabitleme";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ANCHOR
+ {
+ Pos = MAP_APPFONT ( 12 , 59 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "~Anker" ;
+ Text [ ENGLISH ] = "~Anchor" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "~Anchor" ;
+ Text [ italian ] = "~Ancoraggio" ;
+ Text [ spanish ] = "~Ancla" ;
+ Text [ french ] = "~Ancre" ;
+ Text [ dutch ] = "~Anker" ;
+ Text [ swedish ] = "~Ankare" ;
+ Text [ danish ] = "Anker" ;
+ Text [ portuguese ] = "~¶ncora" ;
+ Text [ portuguese_brazilian ] = "~Anker" ;
+ Text[ russian ] = "ØЊƒ˜‡ˆ…";
+ Text[ greek ] = "~µÆˆì¤—¢‡";
+ Text[ polish ] = "Kotwica";
+ Text[ japanese ] = "ñíôø(~A)";
+ Text[ korean ] = "ñƒµ ·õŽ­(~A)";
+ Text[ chinese_simplified ] = "񈬀(~A)";
+ Text[ chinese_traditional ] = "„֞(~A)";
+ Text[ arabic ] = "Æ¥à€";
+ Text[ turkish ] = "~Sabitleyici";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ANCHOR
+ {
+ Pos = MAP_APPFONT ( 51 , 59 ) ;
+ Size = MAP_APPFONT ( 54 , 60 ) ;
+ Hide = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Am Absatz" ; > ;
+ /* ### ACHTUNG: Neuer Eintrag in Liste? 2 : Als Zeichen*/
+ < "Als Zeichen" ; > ;
+ < "An der Seite" ; > ;
+ < "Am Rahmen" ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Frame at Paragraph" ; > ;
+ < "Frame like a ~Character" ; > ;
+ < "Bound to page" ; > ;
+ < "Am Rahmen" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "No par grafo" ; > ;
+ < "Como car cter" ; > ;
+ < "Na p gina" ; > ;
+ < "Na moldura" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "To Paragraph" ; > ;
+ < "As character" ; > ;
+ < "To Page" ; > ;
+ < "To Frame" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Am Absatz" ; > ;
+ < "Am Zeichen" ; > ;
+ < "An der Seite" ; > ;
+ < "Am Rahmen" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Till stycket" ; > ;
+ < "Som tecken" ; > ;
+ < "Till sidan" ; > ;
+ < "Till ramen" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Til afsnit" ; > ;
+ < "Som tegn" ; > ;
+ < "Til siden" ; > ;
+ < "Til rammen" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Al paragrafo" ; > ;
+ < "Quale carattere" ; > ;
+ < "Alla pagina" ; > ;
+ < "Alla cornice" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Al p rrafo" ; > ;
+ < "Como car cter" ; > ;
+ < "A la p gina" ; > ;
+ < "Al marco" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Au paragraphe" ; > ;
+ < "Comme caractŠre" ; > ;
+ < "· la page" ; > ;
+ < "Au cadre" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Aan alinea" ; > ;
+ < "Als teken" ; > ;
+ < "Aan pagina" ; > ;
+ < "Aan kader" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ò … ‡…”¢" ; > ;
+ < "Ò…ˆ ‡¡…ˆ" ; > ;
+ < "Ò ¤•Ð…¡Š”†" ; > ;
+ < "Ò Ð…ˆ†" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "à“‡ Р¤šÆ¤ ”‹•" ; > ;
+ < "ë• ö ¤ ˆ“褠•" ; > ;
+ < "à“‡ ¢†‰á„ " ; > ;
+ < "à“‹ Љ á¢‚‹" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Przy akapicie" ; > ;
+ < "Jako znak" ; > ;
+ < "Przy stronie" ; > ;
+ < "Przy ramce" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "'i-?," ; > ;
+ < "-ô??,’,æ,Ž" ; > ;
+ < "Öáø¬è," ; > ;
+ < "?g," ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "ïšô“¨­" ; > ;
+ < "û©·éú×" ; > ;
+ < "’„·Þµ”¨­" ; > ;
+ < "€µúû·à¨­" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "âéô׶„Ø" ; > ;
+ < "æñžöž™ú–" ; > ;
+ < "âéãüÇ‘Ø" ; > ;
+ < "â騕Ø" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "Ýbªq÷ùÏW" ; > ;
+ < "ú¡õ@ÝrÏ÷" ; > ;
+ < "ÝbðôðñÏW" ; > ;
+ < "Ýb©ÏW" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "é  € íè¥" ; > ;
+ < "áÖ¥í" ; > ;
+ < "é  € åíÖ" ; > ;
+ < "é  € €¥" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Paragrafa" ; > ;
+ < "Karakter olarak" ; > ;
+ < "Sayfaya" ; > ;
+ < "€er‡eveye" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ };
+ };
+ FixedText FT_ORIENT
+ {
+ Pos = MAP_APPFONT ( 12 , 74 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "~Position" ;
+ Hide = TRUE ;
+ };
+ ListBox LB_ORIENT
+ {
+ Pos = MAP_APPFONT ( 51 , 74 ) ;
+ Size = MAP_APPFONT ( 54 , 60 ) ;
+ Hide = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Von oben" ; > ;
+ < "Oben" ; > ;
+ < "Zentriert" ; > ;
+ < "Unten" ; > ;
+ < "Zeichen oben" ; > ;
+ < "Zeichen zentriert" ; > ;
+ < "Zeichen unten" ; > ;
+ < "Zeile oben" ; > ;
+ < "Zeile zentriert" ; > ;
+ < "Zeile unten" ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "From top" ; > ;
+ < "Top" ; > ;
+ < "Centered" ; > ;
+ < "Bottom" ; > ;
+ < "Character top" ; > ;
+ < "Character centered" ; > ;
+ < "Character bottom" ; > ;
+ < "Line top" ; > ;
+ < "Line centered" ; > ;
+ < "Line bottom" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "From Top" ; > ;
+ < "Above" ; > ;
+ < "Centered" ; > ;
+ < "Below" ; > ;
+ < "Top of character" ; > ;
+ < "Center of character" ; > ;
+ < "Bottom of character" ; > ;
+ < "Top of line" ; > ;
+ < "Center of line" ; > ;
+ < "Bottom of line" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Dall'alto" ; > ;
+ < "Sopra" ; > ;
+ < "Centrato" ; > ;
+ < "Sotto" ; > ;
+ < "Carattere in alto" ; > ;
+ < "Carattere centrato" ; > ;
+ < "Carattere in basso" ; > ;
+ < "Riga in alto" ; > ;
+ < "Riga centrata" ; > ;
+ < "Riga in basso" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Desde arriba" ; > ;
+ < "Arriba" ; > ;
+ < "Centrado" ; > ;
+ < "Abajo" ; > ;
+ < "Car cter arriba" ; > ;
+ < "Car cter centrado" ; > ;
+ < "Car cter abajo" ; > ;
+ < "L¡nea superior" ; > ;
+ < "L¡nea centrada" ; > ;
+ < "L¡nea inferior" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Du haut" ; > ;
+ < "En haut" ; > ;
+ < "Centr‚" ; > ;
+ < "Inf‚rieur" ; > ;
+ < "D‚calage haut" ; > ;
+ < "CaractŠre centr‚" ; > ;
+ < "D‚calage bas" ; > ;
+ < "Ligne sur le bord sup‚rieur" ; > ;
+ < "Ligne centr‚e" ; > ;
+ < "Ligne sur le bord inf‚rieur" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Van boven" ; > ;
+ < "Boven" ; > ;
+ < "Gecentreerd" ; > ;
+ < "Beneden" ; > ;
+ < "Teken boven" ; > ;
+ < "Teken gecentreerd" ; > ;
+ < "Teken beneden" ; > ;
+ < "Regel boven" ; > ;
+ < "Regel gecentreerd" ; > ;
+ < "Regel beneden" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Von oben" ; > ;
+ < "Oben" ; > ;
+ < "Zentriert" ; > ;
+ < "Unten" ; > ;
+ < "Zeichen oben" ; > ;
+ < "Zeichen zentriert" ; > ;
+ < "Zeichen unten" ; > ;
+ < "Zeile oben" ; > ;
+ < "Zeile zentriert" ; > ;
+ < "Zeile unten" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Uppifr†n" ; > ;
+ < "™verst" ; > ;
+ < "Centrerat" ; > ;
+ < "Underst" ; > ;
+ < "Tecken ”verst" ; > ;
+ < "Tecken centrerat" ; > ;
+ < "Tecken underst" ; > ;
+ < "Rad ”verst" ; > ;
+ < "Rad centrerad" ; > ;
+ < "Rad underst" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Fra oven" ; > ;
+ < "Foroven" ; > ;
+ < "Centreret" ; > ;
+ < "Forneden" ; > ;
+ < "Tegn ›verst" ; > ;
+ < "Tegn centreret" ; > ;
+ < "Tegn nederst" ; > ;
+ < "R‘kke ›verst" ; > ;
+ < "R‘kke centreret" ; > ;
+ < "R‘kke nederst" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "De cima" ; > ;
+ < "Acima" ; > ;
+ < "Centrado" ; > ;
+ < "Abaixo" ; > ;
+ < "Car cter acima" ; > ;
+ < "Car cter centrado" ; > ;
+ < "Car cter em baixo" ; > ;
+ < "Linha em cima" ; > ;
+ < "Linha centrada" ; > ;
+ < "Linha em baixo" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "¥ƒ†Ðä¢" ; > ;
+ < "¥ƒ†Ðä¢" ; > ;
+ < "ØŒ ”†¡•Ð¢" ; > ;
+ < "¥¡Š‡¢" ; > ;
+ < "€¡…ˆ ¤ƒ†Ðä¢" ; > ;
+ < "€¡…ˆ ƒ ”†¡•Ð†" ; > ;
+ < "€¡…ˆ ¤¡Š‡¢" ; > ;
+ < "¥•ÐŒˆ… ¤ƒ†Ðä¢" ; > ;
+ < "¥•ÐŒˆ… ƒ ”†¡•Ð†" ; > ;
+ < "¥•ÐŒˆ… ¤¡Š‡¢" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "AРК¡—" ; > ;
+ < "Ñš¡—" ; > ;
+ < "Ò†¡“¤ ¤‚¢í¡ " ; > ;
+ < "Òš“—" ; > ;
+ < "ž ¤ ˆ“褠• К¡—" ; > ;
+ < "ž ¤ ˆ“褠• ˆ†¡“¤ ¤‚¢í¡ " ; > ;
+ < "ž ¤ ˆ“褠• ˆš“—" ; > ;
+ < "Ǥ è К¡—" ; > ;
+ < "Ǥ è ˆ†¡“¤ ¤‚¢í¡ " ; > ;
+ < "Ǥ è ˆš“—" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Z g¢ry" ; > ;
+ < "W g¢rze" ; > ;
+ < "Wy?rodkowany" ; > ;
+ < "W dole" ; > ;
+ < "Znak w g¢rze" ; > ;
+ < "Wy?rodkowany znak" ; > ;
+ < "Znak na dole" ; > ;
+ < "Wiersz w g¢rze" ; > ;
+ < "Wy?rodkowany wiersz" ; > ;
+ < "Wiersz w dole" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "?Æ,¸,‡" ; > ;
+ < "?Æ" ; > ;
+ < "'??>" ; > ;
+ < "?§" ; > ;
+ < "-ô??,Þ?Æ" ; > ;
+ < "-ô??,Þ'??>" ; > ;
+ < "-ô??,Þ?§" ; > ;
+ < "?s,Þ?Æ" ; > ;
+ < "?s,Þ'??>" ; > ;
+ < "?s,Þ?§" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "·õ§×Ö" ; > ;
+ < "·õ" ; > ;
+ < "ø­¨Œæ¾" ; > ;
+ < "ó’ú­" ; > ;
+ < "û©·é ·õ" ; > ;
+ < "û©·é ø­¨Œæ¾" ; > ;
+ < "û©·é ó’ú­" ; > ;
+ < "µë ·õ" ; > ;
+ < "µë ø­¨Œæ¾" ; > ;
+ < "µë ó’ú­" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ïàØý¨" ; > ;
+ < "ØÇ‘" ; > ;
+ < "óà™Ñ" ; > ;
+ < "ضǑ" ; > ;
+ < "ž™ú– Øú«" ; > ;
+ < "ž™ú– óà™Ñ" ; > ;
+ < "ž™ú– ضú«" ; > ;
+ < "ÑÑ Øú«" ; > ;
+ < "ÑÑ óà™Ñ" ; > ;
+ < "ÑÑ Ø¶ú«" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "ñqÏW" ; > ;
+ < "ÝVÏW" ; > ;
+ < "÷mÏÏ" ; > ;
+ < "ÝVÏU" ; > ;
+ < "ÝrÏ÷ÏWÏŠ" ; > ;
+ < "ÝrÏ÷÷mÏÏ" ; > ;
+ < "ÝrÏ÷ÏUÏŠ" ; > ;
+ < "Ý‘ÏWÏŠ" ; > ;
+ < "Ý‘÷mÏÏ" ; > ;
+ < "Ý‘ÏUÏŠ" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "Æ„ Çé " ; > ;
+ < "Çé " ; > ;
+ < "Ò‘à¡" ; > ;
+ < "Çàí " ; > ;
+ < "Çé  € Ö¥í" ; > ;
+ < "‘à € Ö¥í" ; > ;
+ < "Çàí  € Ö¥í" ; > ;
+ < "Çé  € à¥" ; > ;
+ < "‘à € à¥" ; > ;
+ < "Çàí  € à¥" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Yukardan" ; > ;
+ < "šst" ; > ;
+ < "Ortala" ; > ;
+ < "Alt" ; > ;
+ < "Karakter stte" ; > ;
+ < "Karakter ortada" ; > ;
+ < "Karakter altta" ; > ;
+ < "Satìr yukarda" ; > ;
+ < "Satìr ortada" ; > ;
+ < "Satìr altta" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ };
+ };
+ TriStateBox TSB_PROTECT
+ {
+ Pos = MAP_APPFONT ( 120 , 54 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Sch~tzen : Sch~ützen */
+ /* ### ACHTUNG: Neuer Text in Resource? Sch~tzen : Sch~ützen */
+ Text = "Sch~tzen" ;
+ Text [ ENGLISH ] = "~Protect" ;
+ Text [ norwegian ] = "~Beskytte" ;
+ Text [ italian ] = "~Proteggi" ;
+ Text [ portuguese_brazilian ] = "~Proteger" ;
+ Text [ portuguese ] = "~Proteger" ;
+ Text [ finnish ] = "~Suojaa" ;
+ Text [ danish ] = "Beskyt" ;
+ Text [ french ] = "~Prot‚ger" ;
+ Text [ swedish ] = "Sk~ydda" ;
+ Text [ dutch ] = "~Beveiligen" ;
+ Text [ spanish ] = "~Proteger" ;
+ Text [ english_us ] = "~Protect" ;
+ TabStop = TRUE ;
+ Text[ russian ] = "क…¡ŒƒŠ• ‡…—Š•¢";
+ Text[ greek ] = "Ѥ~‹¢“ ¢á ";
+ Text[ polish ] = "Chro¤";
+ Text[ japanese ] = "-ê?(~P)";
+ Text[ korean ] = "§÷Ôœ(~P)";
+ Text[ chinese_simplified ] = "ñœ¯Ï(~P)";
+ Text[ chinese_traditional ] = "®O@(~P)";
+ Text[ arabic ] = "ÖÆ€¡";
+ Text[ turkish ] = "~Koru";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ russian ] = "ØŒ‡Š”Š˜";
+ Text[ greek ] = "Ôí¢‡";
+ Text[ polish ] = "Pozycja";
+ Text[ japanese ] = "?Ò'u";
+ Text[ korean ] = "·õŽ­";
+ Text[ chinese_simplified ] = "ׯ™Ç";
+ Text[ chinese_traditional ] = "Ý÷m";
+ Text[ arabic ] = "€ Æ‘™é";
+ Text[ turkish ] = "Konum";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_SIZE ---------------------------------------------------------
+TabPage RID_SVXPAGE_SIZE
+{
+ HelpId = HID_TRANS_SIZE ;
+ Hide = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Gr”áe : Größe */
+ /* ### ACHTUNG: Neuer Text in Resource? Gr”áe : Größe */
+ Text = "GrӇe" ;
+ Text [ English ] = "Size" ;
+ Text [ norwegian ] = "St›rrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ finnish ] = "Koko" ;
+ Text [ danish ] = "St›rrelse" ;
+ Text [ french ] = "Taille" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ spanish ] = "Tama¤o" ;
+ Text [ english_us ] = "Size" ;
+ Size = MAP_APPFONT ( 189 , 97 ) ;
+ FixedText FT_WIDTH
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 23 , 10 ) ;
+ 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 ] = "~Breedte" ;
+ Text [ spanish ] = "A~ncho" ;
+ Text [ english_us ] = "Wi~dth" ;
+ Text[ russian ] = "ŠÐŠ¡…";
+ Text[ greek ] = "~щš“‹•";
+ Text[ polish ] = "Szer.";
+ Text[ japanese ] = "-?(~D)";
+ Text[ korean ] = "üÒ§¤(~D)";
+ Text[ chinese_simplified ] = "¨¡ôÔ(~D)";
+ Text[ chinese_traditional ] = "¬e®ž(~D)";
+ Text[ arabic ] = "€ é¥™";
+ Text[ turkish ] = "~Geniçlik";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_HEIGHT
+ {
+ Pos = MAP_APPFONT ( 12 , 29 ) ;
+ Size = MAP_APPFONT ( 23 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~”he : H~öhe */
+ /* ### ACHTUNG: Neuer Text in Resource? H~”he : H~öhe */
+ 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 ] = "H›jde" ;
+ Text [ french ] = "~Hauteur" ;
+ Text [ swedish ] = "H~”jd" ;
+ Text [ dutch ] = "H~oogte" ;
+ Text [ spanish ] = "A~ltura" ;
+ Text [ english_us ] = "H~eight" ;
+ Text[ russian ] = "¶–¤Œ•…";
+ Text[ greek ] = "ó~›‹•";
+ Text[ polish ] = "Wys.";
+ Text[ japanese ] = "?,,ü(~E)";
+ Text[ korean ] = "ü“·Þ(~E)";
+ Text[ chinese_simplified ] = "÷áôÔ(~E)";
+ Text[ chinese_traditional ] = "ø¦®ž(~E)";
+ Text[ arabic ] = "€ €¥Òí€é";
+ Text[ turkish ] = "~Ykseklik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_WIDTH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 12 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 120000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_HEIGHT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 27 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 120000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ Control CTL_RECT
+ {
+ HelpId = HID_TPSIZE_CTRL ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 120 , 6 ) ;
+ Size = MAP_APPFONT ( 60 , 39 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Basispunkt" ;
+ QuickHelpText [ English ] = "Base point" ;
+ QuickHelpText [ english_us ] = "Base point" ;
+ QuickHelpText [ portuguese_brazilian ] = "Basispunkt" ;
+ QuickHelpText [ swedish ] = "Baspunkt" ;
+ QuickHelpText [ danish ] = "Basispunkt" ;
+ QuickHelpText [ italian ] = "Punto di base" ;
+ QuickHelpText [ spanish ] = "Basispunkt" ;
+ QuickHelpText [ french ] = "Point de base" ;
+ QuickHelpText [ dutch ] = "Basispunt" ;
+ QuickHelpText [ portuguese ] = "Ponto de base" ;
+ QuickHelpText[ russian ] = "µ…‡Š¤¡…˜ •Œöˆ…";
+ QuickHelpText[ greek ] = "à‡†á‹ ƒš¢‡•";
+ QuickHelpText[ polish ] = "Punkt podstawy";
+ QuickHelpText[ japanese ] = "Öèø«×áýíŽ";
+ QuickHelpText[ korean ] = "Base point";
+ QuickHelpText[ chinese_simplified ] = "Base point";
+ QuickHelpText[ chinese_traditional ] = "ø•¶I";
+ QuickHelpText[ arabic ] = "„è € Çà€à";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ CheckBox CBX_SCALE
+ {
+ Pos = MAP_APPFONT ( 6 , 54 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "~Abgleich" ;
+ Text [ ENGLISH ] = "~Match" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Keep ratio" ;
+ Text [ italian ] = "~Adatta" ;
+ Text [ spanish ] = "~Igualar" ;
+ Text [ french ] = "~Proportionnel" ;
+ Text [ dutch ] = "~Synchroniseren" ;
+ Text [ swedish ] = "~Anpassa proportionellt" ;
+ Text [ danish ] = "Proportional" ;
+ Text [ portuguese_brazilian ] = "~Abgleich" ;
+ Text [ portuguese ] = "Pr~oporcional" ;
+ Text[ russian ] = "ØÐŒ‹ŒÐ”ŠŒ¡…‰¡Œ";
+ Text[ greek ] = "~µ¡ ‰‹Æ‚ˆš";
+ Text[ polish ] = "~Dopasuj";
+ Text[ japanese ] = "'ý?©(~K)";
+ Text[ korean ] = "§¤·ý ·îµ”(~K)";
+ Text[ chinese_simplified ] = "æöå–(~K)";
+ Text[ chinese_traditional ] = "«åóÆ(~K)";
+ Text[ arabic ] = "Òã€Æ„";
+ Text[ turkish ] = "~Eçitle";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_SIZE
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 105 , 42 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Gr”áe : Größe */
+ /* ### ACHTUNG: Neuer Text in Resource? Gr”áe : Größe */
+ Text = "GrӇe" ;
+ Text [ ENGLISH ] = "Size" ;
+ Text [ norwegian ] = "St›rrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ finnish ] = "Koko" ;
+ Text [ danish ] = "St›rrelse" ;
+ Text [ french ] = "Taille" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ spanish ] = "Tama¤o" ;
+ Text [ english_us ] = "Size" ;
+ Text[ russian ] = "Ñ…‡†Ð";
+ Text[ greek ] = "ÞíƆŠ‹•";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "¯ý«è";
+ Text[ korean ] = "¸ñƒ";
+ Text[ chinese_simplified ] = "ï¢Ñ­";
+ Text[ chinese_traditional ] = "ÏjÏp";
+ Text[ arabic ] = "€ ÖÞÆ";
+ Text[ turkish ] = "Boyut";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_PROTECT
+ {
+ Pos = MAP_APPFONT ( 120 , 54 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Sch~tzen : Sch~ützen */
+ /* ### ACHTUNG: Neuer Text in Resource? Sch~tzen : Sch~ützen */
+ Text = "Sch~tzen" ;
+ Text [ ENGLISH ] = "~Protect" ;
+ Text [ norwegian ] = "~Beskytte" ;
+ Text [ italian ] = "~Proteggi" ;
+ Text [ portuguese_brazilian ] = "~Proteger" ;
+ Text [ portuguese ] = "~Proteger" ;
+ Text [ finnish ] = "~Suojaa" ;
+ Text [ danish ] = "Beskyt" ;
+ Text [ french ] = "~Prot‚ger" ;
+ Text [ swedish ] = "Sk~ydda" ;
+ Text [ dutch ] = "~Beveiligen" ;
+ Text [ spanish ] = "~Proteger" ;
+ Text [ english_us ] = "~Protect" ;
+ TabStop = TRUE ;
+ Text[ russian ] = "क…¡ŒƒŠ• ‡…—Š•¢";
+ Text[ greek ] = "Ѥ~‹¢“ ¢á ";
+ Text[ polish ] = "Chro¤";
+ Text[ japanese ] = "-ê?(~P)";
+ Text[ korean ] = "§÷Ôœ(~P)";
+ Text[ chinese_simplified ] = "ñœ¯Ï(~P)";
+ Text[ chinese_traditional ] = "®O@(~P)";
+ Text[ arabic ] = "ÖÆ€¡";
+ Text[ turkish ] = "~Koru";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_AUTOGROW_WIDTH
+ {
+ Pos = MAP_APPFONT ( 6 , 66 ) ;
+ Size = MAP_APPFONT ( 95 , 12 ) ;
+ Text = "Br~eite an Text anpassen" ;
+ Text [ ENGLISH ] = "Fit ~width to text" ;
+ Text [ english_us ] = "~Fit width to text" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "Br~eedte aan tekst aanpassen" ;
+ Text [ italian ] = "Adatta la larghezza al t~esto" ;
+ Text [ spanish ] = "Ajustar ~ancho al texto" ;
+ Text [ french ] = "Adapter la lar~geur au texte" ;
+ Text [ swedish ] = "Anpassa br~edd till text" ;
+ Text [ danish ] = "Tilpas bredde til tekst" ;
+ Text [ portuguese ] = "Ajustar ~largura ao texto" ;
+ Text [ portuguese_brazilian ] = "Br~eite an Text anpassen" ;
+ Text[ russian ] = "¶–ÐŒƒ¡˜• ›ŠÐŠ¡¢ ‹Œ •†ˆ¤•¢";
+ Text[ greek ] = "Ѥ‹¢ ¤‹Æè Љš“‹ä• —• Ф‹• ˆ~†á†¡‹";
+ Text[ polish ] = "Dopasuj szeroko?‘ do tekstu";
+ Text[ japanese ] = "-ô??-¤,-?,Ð??,¡,û,‚(~W)";
+ Text[ korean ] = "«§’©¨­ üÒ§¤ ÷¶Çáñƒ(~F)";
+ Text[ chinese_simplified ] = "§Ö׎ž™¨¡ôÔôâàÝ(~W)";
+ Text[ chinese_traditional ] = "¸Mϧφ¬e®žû‹¯“(~W)";
+ Text[ arabic ] = "Æ €µÆ € é¥™   „å";
+ Text[ turkish ] = "GeniçliÐi, metne g”re aya~rla";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_AUTOGROW_HEIGHT
+ {
+ Pos = MAP_APPFONT ( 6 , 78 ) ;
+ Size = MAP_APPFONT ( 95 , 12 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H”h~e an Text anpassen : Höh~e an Text anpassen */
+ /* ### ACHTUNG: Neuer Text in Resource? H”h~e an Text anpassen : Höh~e an Text anpassen */
+ Text = "H”h~e an Text anpassen" ;
+ Text [ ENGLISH ] = "Fit ~height to text" ;
+ Text [ english_us ] = "Fit ~height to text" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "Hoo~gte aan tekst aanpassen" ;
+ Text [ italian ] = "Adatta alt~ezza al testo" ;
+ Text [ spanish ] = "~Ajustar altura al texto" ;
+ Text [ french ] = "Adapter la haute~ur au texte" ;
+ Text [ swedish ] = "Anpassa h”jd till text" ;
+ Text [ danish ] = "Tilpas h›jde til tekst" ;
+ Text [ portuguese ] = "Ajustar ~altura ao texto" ;
+ Text [ portuguese_brazilian ] = "H”h~e an Text anpassen" ;
+ Text[ russian ] = "¶–ÐŒƒ¡˜• ƒ–¤Œ•¢ ‹Œ •†ˆ¤•¢";
+ Text[ greek ] = "Ѥ‹¢ ¤‹Æè ì›‹ä• —• Ф‹• ˆ†á†¡‹";
+ Text[ polish ] = "Dopasuj wysoko?‘ do tekstu";
+ Text[ japanese ] = "-ô??-¤,?,,ü,Ð??,¡,û,‚(~H)";
+ Text[ korean ] = "«§’©¨­ ü“·Þ ÷¶Çáñƒ(~H)";
+ Text[ chinese_simplified ] = "§Ö׎ž™÷áôÔôâàÝ(~H)";
+ Text[ chinese_traditional ] = "¸Mϧφø¦®žû‹¯“(~H)";
+ Text[ arabic ] = "Æ €µÆ € €¥Òí€é   „å";
+ Text[ turkish ] = "YksekliÐi, metne g”re a~yarla";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ russian ] = "Ñ…‡†Ð";
+ Text[ greek ] = "ÞíƆŠ‹•";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "¯ý«è";
+ Text[ korean ] = "¸ñƒ";
+ Text[ chinese_simplified ] = "ï¢Ñ­";
+ Text[ chinese_traditional ] = "ÏjÏp";
+ Text[ arabic ] = "€ ÖÞÆ";
+ Text[ turkish ] = "Boyut";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_ANGLE --------------------------------------------------------
+TabPage RID_SVXPAGE_ANGLE
+{
+ HelpId = HID_TRANS_ANGLE ;
+ Hide = TRUE ;
+ Text = "Winkel" ;
+ Text [ English ] = "Angle" ;
+ Text [ norwegian ] = "Vinkel" ;
+ Text [ italian ] = "Angolo" ;
+ Text [ portuguese_brazilian ] = "¶ngulo" ;
+ Text [ portuguese ] = "¶ngulo" ;
+ Text [ finnish ] = "Kulma" ;
+ Text [ danish ] = "Vinkel" ;
+ Text [ french ] = "Angle" ;
+ Text [ swedish ] = "Vinkel" ;
+ Text [ dutch ] = "Hoek" ;
+ Text [ spanish ] = "µngulo" ;
+ Text [ english_us ] = "Angle" ;
+ Size = MAP_APPFONT ( 189 , 97 ) ;
+ FixedText FT_POS_X
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "Position ~X" ;
+ Text [ English ] = "Position ~X" ;
+ Text [ norwegian ] = "Posisjon~X" ;
+ Text [ italian ] = "Posizione ~X" ;
+ Text [ portuguese_brazilian ] = "Posi‡Æo ~X" ;
+ Text [ portuguese ] = "Posi‡Æo ~X" ;
+ Text [ finnish ] = "Position ~X" ;
+ Text [ danish ] = "Position X" ;
+ Text [ french ] = "Position ~X" ;
+ Text [ swedish ] = "Position ~X" ;
+ Text [ dutch ] = "Positie ~X" ;
+ Text [ spanish ] = "Posici¢n ~X" ;
+ Text [ english_us ] = "Position ~X" ;
+ Text[ russian ] = "ØŒ‡Š”Š˜ ~X";
+ Text[ greek ] = "Ôí¢‡ ~X";
+ Text[ polish ] = "Pozycja X";
+ Text[ japanese ] = "?Ò'u ~X";
+ Text[ korean ] = "·õŽ­ X(~X)";
+ Text[ chinese_simplified ] = "ׯ™Ç X(~X)";
+ Text[ chinese_traditional ] = "Ý÷m ~X";
+ Text[ arabic ] = "€ Æ‘™é à";
+ Text[ turkish ] = "~X konumu";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_POS_Y
+ {
+ Pos = MAP_APPFONT ( 12 , 29 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "Position ~Y" ;
+ Text [ English ] = "Position ~Y" ;
+ Text [ norwegian ] = "Posisjon~Y" ;
+ Text [ italian ] = "Posizione ~Y" ;
+ Text [ portuguese_brazilian ] = "Posi‡Æo ~Y" ;
+ Text [ portuguese ] = "Posi‡Æo ~Y" ;
+ Text [ finnish ] = "Position ~Y" ;
+ Text [ danish ] = "Position Y" ;
+ Text [ french ] = "Position ~Y" ;
+ Text [ swedish ] = "Position ~Y" ;
+ Text [ dutch ] = "Positie ~Y" ;
+ Text [ spanish ] = "Posici¢n ~Y" ;
+ Text [ english_us ] = "Position ~Y" ;
+ Text[ russian ] = "ØŒ‡Š”Š˜ ~Y";
+ Text[ greek ] = "Ôí¢‡ ~Y";
+ Text[ polish ] = "Pozycja Y";
+ Text[ japanese ] = "?Ò'u ~Y";
+ Text[ korean ] = "·õŽ­ Y(~Y)";
+ Text[ chinese_simplified ] = "ׯ™Ç Y(~Y)";
+ Text[ chinese_traditional ] = "Ý÷m ~Y";
+ Text[ arabic ] = "€ Æ‘™é å";
+ Text[ turkish ] = "~Y konumu";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_POS_X
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 12 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -500000 ;
+ Maximum = 500000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_POS_Y
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 27 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -500000 ;
+ Maximum = 500000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_ANGLE
+ {
+ Pos = MAP_APPFONT ( 12 , 70 ) ;
+ Size = MAP_APPFONT ( 26 , 10 ) ;
+ Text = "~Winkel" ;
+ Text [ ENGLISH ] = "~Angle" ;
+ Text [ norwegian ] = "~Vinkel" ;
+ Text [ italian ] = "Angolo" ;
+ Text [ portuguese_brazilian ] = "~¶ngulo" ;
+ Text [ portuguese ] = "~¶ngulo" ;
+ Text [ finnish ] = "~Kulma" ;
+ Text [ danish ] = "Vinkel" ;
+ Text [ french ] = "~Angle" ;
+ Text [ swedish ] = "~Vinkel" ;
+ Text [ dutch ] = "~Hoek" ;
+ Text [ spanish ] = "An~gulo" ;
+ Text [ english_us ] = "~Angle" ;
+ Text[ russian ] = "àÆŒ‰";
+ Text[ greek ] = "~Ç—¡á ";
+ Text[ polish ] = "Kût";
+ Text[ japanese ] = "?p\"x(~A)";
+ Text[ korean ] = "ø½ææ(~A)";
+ Text[ chinese_simplified ] = "«€ôÔ(~A)";
+ Text[ chinese_traditional ] = "ùÏ®ž(~A)";
+ Text[ arabic ] = "€ ã€‘¡";
+ Text[ turkish ] = "~A‡ì";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_ANGLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 68 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -500000 ;
+ Maximum = 500000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " Grad" ;
+ CustomUnitText [ ENGLISH ] = " Degree" ;
+ CustomUnitText [ english_us ] = "degrees" ;
+ SpinSize = 500 ;
+ CustomUnitText [ portuguese_brazilian ] = "Grad" ;
+ CustomUnitText [ swedish ] = "grader" ;
+ CustomUnitText [ danish ] = "grader" ;
+ CustomUnitText [ italian ] = "Gradi" ;
+ CustomUnitText [ spanish ] = "grados" ;
+ CustomUnitText [ french ] = "degr‚s" ;
+ CustomUnitText [ dutch ] = "Graden" ;
+ CustomUnitText [ portuguese ] = "Graus" ;
+ CustomUnitText[ russian ] = "ÇÐ…„¢¤";
+ CustomUnitText[ greek ] = "‹á¤†•";
+ CustomUnitText[ polish ] = "Stopie¤";
+ CustomUnitText[ japanese ] = "\"x";
+ CustomUnitText[ korean ] = "ææ";
+ CustomUnitText[ chinese_simplified ] = "ôÔ";
+ CustomUnitText[ chinese_traditional ] = "®ž";
+ CustomUnitText[ arabic ] = "Ø¥Þ";
+ CustomUnitText[ turkish ] = "Derece";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ Control CTL_RECT
+ {
+ HelpId = HID_TPROTATION_CTRL1 ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 120 , 6 ) ;
+ Size = MAP_APPFONT ( 60 , 39 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Rotationspunkt" ;
+ QuickHelpText [ English ] = "Rotation point" ;
+ QuickHelpText [ english_us ] = "Rotation point" ;
+ QuickHelpText [ portuguese_brazilian ] = "Rotationspunkt" ;
+ QuickHelpText [ swedish ] = "Rotationspunkt" ;
+ QuickHelpText [ danish ] = "Rotationspunkt" ;
+ QuickHelpText [ italian ] = "Punto di rotazione" ;
+ QuickHelpText [ spanish ] = "Rotationspunkt" ;
+ QuickHelpText [ french ] = "Point de rotation" ;
+ QuickHelpText [ dutch ] = "Rotatiepunt" ;
+ QuickHelpText [ portuguese ] = "Ponto de rota‡Æo" ;
+ QuickHelpText[ russian ] = "ãŒöˆ… ƒÐ…—†¡Š˜";
+ QuickHelpText[ greek ] = "à‡†á‹ Ð†¤‚¢“¤‹”è•";
+ QuickHelpText[ polish ] = "Punkt rotacyjny";
+ QuickHelpText[ japanese ] = "?¤\"],ü,û,‚\"_";
+ QuickHelpText[ korean ] = "Rotation point";
+ QuickHelpText[ chinese_simplified ] = "Rotation point";
+ QuickHelpText[ chinese_traditional ] = "ñ궅¶I";
+ QuickHelpText[ arabic ] = "„è € €àÒØ€¥";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ Control CTL_ANGLE
+ {
+ HelpId = HID_TPROTATION_CTRL2 ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 120 , 54 ) ;
+ Size = MAP_APPFONT ( 60 , 37 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_POSITION
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 105 , 42 ) ;
+ Text = "Drehpunkt" ;
+ Text [ ENGLISH ] = "Pivot" ;
+ Text [ norwegian ] = "Pivot" ;
+ Text [ italian ] = "Punto di rotazione" ;
+ Text [ portuguese_brazilian ] = "Piv" ;
+ Text [ portuguese ] = "Ponto de rota‡Æo" ;
+ Text [ finnish ] = "Pivot" ;
+ Text [ danish ] = "Rotationspunkt" ;
+ Text [ french ] = "Point de rotation" ;
+ Text [ swedish ] = "Rotationspunkt" ;
+ Text [ dutch ] = "Draaipunt" ;
+ Text [ spanish ] = "Punto de rotaci¢n" ;
+ Text [ english_us ] = "Pivot point" ;
+ Text[ russian ] = "ãŒöˆ… ‹ŒƒŒÐŒ•…";
+ Text[ greek ] = "à‡†á‹ Ð†¤‚¢“¤‹”è•";
+ Text[ polish ] = "Punkt obrotu";
+ Text[ japanese ] = "?¤\"]×áýíŽ";
+ Text[ korean ] = "Ô÷·µ­";
+ Text[ chinese_simplified ] = "Ñ잦æÆ";
+ Text[ chinese_traditional ] = "ñ궅¶I";
+ Text[ arabic ] = "„è ÆÖ‘¥¡";
+ Text[ turkish ] = "Eksen noktasì";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_ANGLE
+ {
+ Pos = MAP_APPFONT ( 6 , 50 ) ;
+ Size = MAP_APPFONT ( 105 , 41 ) ;
+ Text = "Drehwinkel" ;
+ Text [ ENGLISH ] = "Angle" ;
+ Text [ norwegian ] = "Vinkel" ;
+ Text [ italian ] = "Angolo di rotazione" ;
+ Text [ portuguese_brazilian ] = "¶ngulo" ;
+ Text [ portuguese ] = "¶ngulo de rota‡Æo" ;
+ Text [ finnish ] = "Kulma" ;
+ Text [ danish ] = "Rotationsvinkel" ;
+ Text [ french ] = "Angle de rotation" ;
+ Text [ swedish ] = "Rotationsvinkel" ;
+ Text [ dutch ] = "Draaihoek" ;
+ Text [ spanish ] = "µngulo de rotaci¢n" ;
+ Text [ english_us ] = "Rotation angle" ;
+ Text[ russian ] = "àÆŒ‰ ‹ŒƒŒÐŒ•…";
+ Text[ greek ] = "Ç—¡á  І¤‚¢“¤‹”è•";
+ Text[ polish ] = "Kût obrotowy";
+ Text[ japanese ] = "?¤\"]?p\"x";
+ Text[ korean ] = "Ô÷·ø½";
+ Text[ chinese_simplified ] = "Ñ잦«€ôÔ";
+ Text[ chinese_traditional ] = "ñ궅ùÏ®ž";
+ Text[ arabic ] = "】¡ € €àÒØ€¥";
+ Text[ turkish ] = "D”nç a‡ìsì";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ russian ] = "àÆŒ‰";
+ Text[ greek ] = "Ç—¡á ";
+ Text[ polish ] = "Kût";
+ Text[ japanese ] = "?p\"x";
+ Text[ korean ] = "ø½ææ";
+ Text[ chinese_simplified ] = "«€ôÔ";
+ Text[ chinese_traditional ] = "ùÏ®ž";
+ Text[ arabic ] = "€ ã€‘¡";
+ Text[ turkish ] = "A‡ì";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_SLANT -----------------------------------------------------
+TabPage RID_SVXPAGE_SLANT
+{
+ HelpId = HID_TRANS_SLANT ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 189 , 97 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Schr„gstellen / Eckenradius : Schrägstellen / Eckenradius */
+ /* ### ACHTUNG: Neuer Text in Resource? Schr„gstellen / Eckenradius : Schrägstellen / Eckenradius */
+ Text = "Schr„gstellen / Eckenradius" ;
+ Text [ ENGLISH ] = "Slant" ;
+ Text [ english_us ] = "Slant / Corner Radius" ;
+ Text [ italian ] = "Inclina / raggio d'angolo" ;
+ Text [ spanish ] = "Inclinaci¢n/Radio de  ngulo" ;
+ Text [ french ] = "Inclinaison / rayon d'angle" ;
+ Text [ dutch ] = "Schuintrekken / hoekafronding" ;
+ Text [ swedish ] = "Snedst„ll / h”rnradie" ;
+ Text [ danish ] = "H‘ldning / hj›rneradius" ;
+ Text [ portuguese ] = "Inclinar /Raio do ƒngulo" ;
+ Text [ portuguese_brazilian ] = "Schr„gstellen / Eckenradius" ;
+ FixedText FT_RADIUS
+ {
+ Pos = MAP_APPFONT ( 12 , 23 ) ;
+ Size = MAP_APPFONT ( 33 , 10 ) ;
+ Text = "~Radius" ;
+ Text [ ENGLISH ] = "~Radius" ;
+ Text [ dutch ] = "~Radius" ;
+ Text [ english_us ] = "~Radius" ;
+ Text [ italian ] = "~Raggio" ;
+ Text [ spanish ] = "Ra~dio" ;
+ Text [ french ] = "~Rayon" ;
+ Text [ swedish ] = "~Radie" ;
+ Text [ danish ] = "Radius" ;
+ Text [ portuguese_brazilian ] = "~Radius" ;
+ Text [ portuguese ] = "~Raio" ;
+ Text[ russian ] = "Ñ…„Š¢¤";
+ Text[ greek ] = "µ~ˆ“á¡ ";
+ Text[ polish ] = "Promie¤";
+ Text[ japanese ] = "\"¬?a(~R)";
+ Text[ korean ] = "ûíµ”÷õ(~R)";
+ Text[ chinese_simplified ] = "ø‰óô(~R)";
+ Text[ chinese_traditional ] = "¾b©|(~R)";
+ Text[ arabic ] = "„åí € è¥";
+ Text[ turkish ] = "~€ap";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_RADIUS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 21 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 500000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_ANGLE
+ {
+ Pos = MAP_APPFONT ( 12 , 70 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "~Winkel" ;
+ Text [ ENGLISH ] = "~Angle" ;
+ Text [ dutch ] = "~Hoek" ;
+ Text [ english_us ] = "~Angle" ;
+ Text [ italian ] = "Angolo" ;
+ Text [ spanish ] = "µ~ngulo" ;
+ Text [ french ] = "~Angle" ;
+ Text [ swedish ] = "~Vinkel" ;
+ Text [ danish ] = "Vinkel" ;
+ Text [ portuguese ] = "~¶ngulo" ;
+ Text [ portuguese_brazilian ] = "~Winkel" ;
+ Text[ russian ] = "àÆŒ‰";
+ Text[ greek ] = "~Ç—¡á ";
+ Text[ polish ] = "Kût";
+ Text[ japanese ] = "?p\"x(~A)";
+ Text[ korean ] = "ø½ææ(~A)";
+ Text[ chinese_simplified ] = "«€ôÔ(~A)";
+ Text[ chinese_traditional ] = "ùÏ®ž(~A)";
+ Text[ arabic ] = "€ ã€‘¡";
+ Text[ turkish ] = "~A‡ì";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_ANGLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 68 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -8900 ;
+ First = -8900 ;
+ Maximum = 8900 ;
+ Last = 8900 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " Grad" ;
+ CustomUnitText [ ENGLISH ] = " Degree" ;
+ SpinSize = 500 ;
+ CustomUnitText [ english_us ] = "degrees" ;
+ CustomUnitText [ italian ] = "gradi" ;
+ CustomUnitText [ spanish ] = "grados" ;
+ CustomUnitText [ french ] = "degr‚s" ;
+ CustomUnitText [ dutch ] = "graden" ;
+ CustomUnitText [ swedish ] = "grader" ;
+ CustomUnitText [ danish ] = "grader" ;
+ CustomUnitText [ portuguese_brazilian ] = "Grad" ;
+ CustomUnitText [ portuguese ] = "Graus" ;
+ CustomUnitText[ russian ] = "ÇÐ…„¢¤";
+ CustomUnitText[ greek ] = "‹á¤†•";
+ CustomUnitText[ polish ] = "Stopie¤";
+ CustomUnitText[ japanese ] = "\"x";
+ CustomUnitText[ korean ] = "ææ";
+ CustomUnitText[ chinese_simplified ] = "ôÔ";
+ CustomUnitText[ chinese_traditional ] = "®ž";
+ CustomUnitText[ arabic ] = "Ø¥Þ";
+ CustomUnitText[ turkish ] = "Derece";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ /*
+ Control CTL_ANGLE
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 120, 54 );
+ Size = MAP_APPFONT( 60, 37 );
+ TabStop = TRUE;
+ };
+*/
+ GroupBox GRP_RADIUS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 105 , 42 ) ;
+ Text = "Eckenradius" ;
+ Text [ ENGLISH ] = "Edge radius" ;
+ Text [ dutch ] = "Hoekafronding" ;
+ Text [ english_us ] = "Corner radius" ;
+ Text [ italian ] = "Raggio d'angolo" ;
+ Text [ spanish ] = "Radio de  ngulo" ;
+ Text [ french ] = "Rayon d'angle" ;
+ Text [ swedish ] = "H”rnradie" ;
+ Text [ danish ] = "Hj›rneradius" ;
+ Text [ portuguese_brazilian ] = "Eckenradius" ;
+ Text [ portuguese ] = "Raio do ƒngulo" ;
+ Text[ russian ] = "Ñ…„Š¢¤ ‡…ˆÐ¢Æ‰†¡¡ŒÆŒ ¢Æ‰…";
+ Text[ greek ] = "µˆ“á¡  Æ—¡á •";
+ Text[ polish ] = "Promie¤ krzywizny";
+ Text[ japanese ] = "?p,Þ\"¬?a";
+ Text[ korean ] = "÷Ьð÷© ø½ææ";
+ Text[ chinese_simplified ] = "«€ø‰óô";
+ Text[ chinese_traditional ] = "ùϾb©|";
+ Text[ arabic ] = "„åí è¥ € ã€‘¡";
+ Text[ turkish ] = "K”çe ‡apì";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_SLANT
+ {
+ Pos = MAP_APPFONT ( 6 , 50 ) ;
+ Size = MAP_APPFONT ( 105 , 41 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Schr„gstellen : Schrägstellen */
+ /* ### ACHTUNG: Neuer Text in Resource? Schr„gstellen : Schrägstellen */
+ Text = "Schr„gstellen" ;
+ Text [ ENGLISH ] = "Slant" ;
+ Text [ english_us ] = "Slant" ;
+ Text [ italian ] = "Inclina" ;
+ Text [ spanish ] = "Inclinar" ;
+ Text [ french ] = "Inclinaison" ;
+ Text [ dutch ] = "Schuintrekken" ;
+ Text [ swedish ] = "Snedst„ll" ;
+ Text [ danish ] = "H‘ldning" ;
+ Text [ portuguese_brazilian ] = "Schr„gstellen" ;
+ Text [ portuguese ] = "Inclinar" ;
+ Text[ russian ] = "Ö…ˆ‰Œ¡";
+ Text[ greek ] = "щšÆ‚ ";
+ Text[ polish ] = "Pochyl";
+ Text[ japanese ] = "?X?×,ü,û,‚";
+ Text[ korean ] = "ñƒ¨‹ñƒ";
+ Text[ chinese_simplified ] = "€ÆÑñ";
+ Text[ chinese_traditional ] = "ôñž";
+ Text[ arabic ] = "Æ€’ ";
+ Text[ turkish ] = "Duruç eÐimi";
+ Text[ language_user1 ] = " ";
+ };
+ /*
+ TriStateBox TSB_VERTICAL
+ {
+ Pos = MAP_APPFONT( 12, 62 );
+ Size = MAP_APPFONT( 40, 12 );
+ Text = "~Vertikal";
+ Text[ ENGLISH ] = "~Vertical";
+ TabStop = TRUE;
+ };
+*/
+ Text[ russian ] = "Ö…ˆ‰Œ¡ / Ñ…„Š¢¤ ¢Æ‰…";
+ Text[ greek ] = "щšÆ‚  / µˆ“á¡  Æ—¡á •";
+ Text[ polish ] = "Pochyl / Promie¤ naro¨nika";
+ Text[ japanese ] = "?X?×,ü,û,‚/?p,Þ\"¬?a,Þ'ú,ü";
+ Text[ korean ] = "ñƒ¨‹ñƒ / ÷Ьð÷© ø½ææ";
+ Text[ chinese_simplified ] = "€ÆÑñ/«€ø‰óô";
+ Text[ chinese_traditional ] = "ôñž/ùÏ®ž";
+ Text[ arabic ] = "Æ€’  / „åí è¥ € ã€‘¡";
+ Text[ turkish ] = "Duruç eÐimi / K”çe ‡apì";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXDLG_TRANSFORM -----------------------------------------------------
+TabDialog RID_SVXDLG_TRANSFORM
+{
+ Size = MAP_APPFONT ( 237 , 161 ) ;
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 237 , 161 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Position und Gr”áe : Position und Größe */
+ /* ### ACHTUNG: Neuer Text in Resource? Position und Gr”áe : Position und Größe */
+ Text = "Position und GrӇe" ;
+ Text [ ENGLISH ] = "Position and Size" ;
+ Text [ norwegian ] = "Posisjon og st›rrelse" ;
+ Text [ italian ] = "Posizione e dimensione" ;
+ Text [ portuguese_brazilian ] = "Posi‡Æo e Tamanho" ;
+ Text [ portuguese ] = "Posi‡Æo e tamanho" ;
+ Text [ finnish ] = "Paikka ja koko" ;
+ Text [ danish ] = "Placering og st›rrelse" ;
+ Text [ french ] = "Position et taille" ;
+ Text [ swedish ] = "Position och storlek" ;
+ Text [ dutch ] = "Positie en grootte" ;
+ Text [ spanish ] = "Posici¢n y tama¤o" ;
+ Text [ english_us ] = "Position and Size" ;
+ 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 ] = "Posi‡Æo" ;
+ Text [ portuguese ] = "Posi‡Æo" ;
+ Text [ finnish ] = "Sijainti" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "Position" ;
+ Text [ swedish ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posici¢n" ;
+ Text [ english_us ] = "Position" ;
+ PageResID = RID_SVXPAGE_POSITION ;
+ Text[ russian ] = "ØŒ‡Š”Š˜";
+ Text[ greek ] = "Ôí¢‡";
+ Text[ polish ] = "Pozycja";
+ Text[ japanese ] = "?Ò'u";
+ Text[ korean ] = "·õŽ­";
+ Text[ chinese_simplified ] = "ׯ™Ç";
+ Text[ chinese_traditional ] = "Ý÷m";
+ Text[ arabic ] = "€ Æ‘™é";
+ Text[ turkish ] = "Konum";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_SIZE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Gr”áe : Größe */
+ /* ### ACHTUNG: Neuer Text in Resource? Gr”áe : Größe */
+ Text = "GrӇe" ;
+ Text [ ENGLISH ] = "Size" ;
+ Text [ norwegian ] = "St›rrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ finnish ] = "Koko" ;
+ Text [ danish ] = "St›rrelse" ;
+ Text [ french ] = "Taille" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ spanish ] = "Tama¤o" ;
+ Text [ english_us ] = "Size" ;
+ PageResID = RID_SVXPAGE_SIZE ;
+ Text[ russian ] = "Ñ…‡†Ð";
+ Text[ greek ] = "ÞíƆŠ‹•";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "¯ý«è";
+ Text[ korean ] = "¸ñƒ";
+ Text[ chinese_simplified ] = "ï¢Ñ­";
+ Text[ chinese_traditional ] = "ÏjÏp";
+ Text[ arabic ] = "€ ÖÞÆ";
+ Text[ turkish ] = "Boyut";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_ANGLE ;
+ Text = "Drehung" ;
+ Text [ ENGLISH ] = "Rotation" ;
+ Text [ norwegian ] = "Rotation" ;
+ Text [ italian ] = "Rotazione" ;
+ Text [ portuguese_brazilian ] = "Rota‡Æo" ;
+ Text [ portuguese ] = "Rota‡Æo" ;
+ Text [ finnish ] = "K„„nt”" ;
+ Text [ danish ] = "Rotation" ;
+ Text [ french ] = "Rotation" ;
+ Text [ swedish ] = "Rotation" ;
+ Text [ dutch ] = "Draaien" ;
+ Text [ spanish ] = "Rotaci¢n" ;
+ Text [ english_us ] = "Rotation" ;
+ PageResID = RID_SVXPAGE_ANGLE ;
+ Text[ russian ] = "ØŒƒŒÐŒ•";
+ Text[ greek ] = "ц¤‚¢“¤‹”è";
+ Text[ polish ] = "Obr¢t";
+ Text[ japanese ] = "?¤\"]";
+ Text[ korean ] = "Ô÷·";
+ Text[ chinese_simplified ] = "Ñ잦";
+ Text[ chinese_traditional ] = "ñ궅";
+ Text[ arabic ] = "€ €àÒØ€¥";
+ Text[ turkish ] = "D”nç";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_SLANT ;
+ /* ### ACHTUNG: Neuer Text in Resource? Schr„gstellen / Eckenradius : Schrägstellen / Eckenradius */
+ /* ### ACHTUNG: Neuer Text in Resource? Schr„gstellen / Eckenradius : Schrägstellen / Eckenradius */
+ Text = "Schr„gstellen / Eckenradius" ;
+ Text [ ENGLISH ] = "Slant / Edge radius" ;
+ PageResID = RID_SVXPAGE_SLANT ;
+ Text [ english_us ] = "Slant / Corner Radius" ;
+ Text [ italian ] = "Inclina / raggio d'angolo" ;
+ Text [ spanish ] = "Inclinaci¢n/Radio de  ngulo" ;
+ Text [ french ] = "Inclinaison / rayon d'angle" ;
+ Text [ dutch ] = "Schuintrekken/hoekafronding" ;
+ Text [ swedish ] = "Snedst„ll / h”rnradie" ;
+ Text [ danish ] = "H‘ldning / hj›rneradius" ;
+ Text [ portuguese_brazilian ] = "Schr„gstellen / Eckenradius" ;
+ Text [ portuguese ] = "Inclinar / Raio do ƒngulo" ;
+ Text[ russian ] = "Ö…ˆ‰Œ¡ / Ñ…„Š¢¤ ¢Æ‰…";
+ Text[ greek ] = "щšÆ‚  / µˆ“á¡  Æ—¡á •";
+ Text[ polish ] = "Pochyl / Promie¤ naro¨nika";
+ Text[ japanese ] = "?X?×,ü,û,‚/?p,Þ\"¬?a,Þ'ú,ü";
+ Text[ korean ] = "ñƒ¨‹ñƒ / ÷Ьð÷© ø½ææ";
+ Text[ chinese_simplified ] = "€ÆÑñ/«€ø‰óô";
+ Text[ chinese_traditional ] = "ôñž/ùÏ®ž";
+ Text[ arabic ] = "Æ€’  / „åí è¥ € ã€‘¡";
+ Text[ turkish ] = "Duruç eÐimi / K”çe ‡apì";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ russian ] = "ØŒ‡Š”Š˜ Š Ð…‡†Ð";
+ Text[ greek ] = "Ôí¢‡ ˆ ‚ íƆŠ‹•";
+ Text[ polish ] = "Pozycja i rozmiar";
+ Text[ japanese ] = "?Ò'u,’¯ý«è";
+ Text[ korean ] = "·õŽ­¨Ö ¸ñƒ";
+ Text[ chinese_simplified ] = "ׯ™Ç§Öï¢Ñ­";
+ Text[ chinese_traditional ] = "Ý÷m¸MÏjÏp";
+ Text[ arabic ] = "€ Æ‘™é ‘€ ÖÞÆ";
+ Text[ turkish ] = "Konum ve boyut";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/textanim.cxx b/svx/source/dialog/textanim.cxx
new file mode 100644
index 0000000000..30765bc959
--- /dev/null
+++ b/svx/source/dialog/textanim.cxx
@@ -0,0 +1,820 @@
+/*************************************************************************
+ *
+ * $RCSfile: textanim.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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"
+
+#ifndef _SVX_TEXTANIM_CXX
+#define _SVX_TEXTANIM_CXX
+#endif
+#include "textanim.hxx"
+#include "textanim.hrc"
+#include "textattr.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+static USHORT pRanges[] =
+{
+ SDRATTR_TEXT_ANIKIND,
+ SDRATTR_TEXT_ANIAMOUNT,
+ 0
+};
+
+/*************************************************************************
+|*
+|* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
+|*
+\************************************************************************/
+
+__EXPORT SvxTextTabDialog::SvxTextTabDialog( Window* pParent,
+ const SfxItemSet* pAttr,
+ const SdrView* pSdrView ) :
+ SfxTabDialog ( pParent, ResId( RID_SVXDLG_TEXT, DIALOG_MGR() ), pAttr ),
+ rOutAttrs ( *pAttr ),
+ pView ( pSdrView )
+{
+ FreeResource();
+
+ AddTabPage( RID_SVXPAGE_TEXTATTR, SvxTextAttrPage::Create, 0);
+ AddTabPage( RID_SVXPAGE_TEXTANIMATION, SvxTextAnimationPage::Create, 0);
+}
+
+/*************************************************************************
+|*
+|* PageCreated()
+|*
+\************************************************************************/
+
+void __EXPORT SvxTextTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+{
+ switch( nId )
+ {
+ case RID_SVXPAGE_TEXTATTR:
+ {
+ ( (SvxTextAttrPage&) rPage ).SetView( pView );
+ ( (SvxTextAttrPage&) rPage ).Construct();
+ }
+ break;
+
+ case RID_SVXPAGE_TEXTANIMATION:
+ break;
+
+ default:
+ break;
+ }
+}
+
+
+/*************************************************************************
+|*
+|* Page
+|*
+\************************************************************************/
+
+SvxTextAnimationPage::SvxTextAnimationPage( Window* pWindow, const SfxItemSet& rInAttrs ) :
+ SfxTabPage ( pWindow, ResId( RID_SVXPAGE_TEXTANIMATION, DIALOG_MGR() ),
+ rInAttrs ),
+ aLbEffect ( this, ResId( LB_EFFECT ) ),
+ //aCtlEffect ( this, ResId( CTL_EFFECT ) ),
+ aBtnUp ( this, ResId( BTN_UP ) ),
+ aBtnLeft ( this, ResId( BTN_LEFT ) ),
+ aBtnRight ( this, ResId( BTN_RIGHT ) ),
+ aBtnDown ( this, ResId( BTN_DOWN ) ),
+ aTsbStartInside ( this, ResId( TSB_START_INSIDE ) ),
+ aTsbStopInside ( this, ResId( TSB_STOP_INSIDE ) ),
+ aGrpEffect ( this, ResId( GRP_EFFECT ) ),
+
+ aTsbEndless ( this, ResId( TSB_ENDLESS ) ),
+ aNumFldCount ( this, ResId( NUM_FLD_COUNT ) ),
+ aGrpCount ( this, ResId( GRP_COUNT ) ),
+
+ aTsbAuto ( this, ResId( TSB_AUTO ) ),
+ aMtrFldDelay ( this, ResId( MTR_FLD_DELAY ) ),
+ aGrpDelay ( this, ResId( GRP_DELAY ) ),
+
+ aTsbPixel ( this, ResId( TSB_PIXEL ) ),
+ aMtrFldAmount ( this, ResId( MTR_FLD_AMOUNT ) ),
+ aGrpAmount ( this, ResId( GRP_AMOUNT ) ),
+
+ rOutAttrs ( rInAttrs ),
+ eAniKind ( SDRTEXTANI_NONE )
+{
+ FreeResource();
+
+ GET_MODULE_FIELDUNIT( eFUnit );
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ eUnit = pPool->GetMetric( SDRATTR_TEXT_LEFTDIST );
+
+ Construct();
+
+ aLbEffect.SetSelectHdl(
+ LINK( this, SvxTextAnimationPage, SelectEffectHdl_Impl ) );
+ aTsbEndless.SetClickHdl(
+ LINK( this, SvxTextAnimationPage, ClickEndlessHdl_Impl ) );
+ aTsbAuto.SetClickHdl(
+ LINK( this, SvxTextAnimationPage, ClickAutoHdl_Impl ) );
+ aTsbPixel.SetClickHdl(
+ LINK( this, SvxTextAnimationPage, ClickPixelHdl_Impl ) );
+
+ Link aLink( LINK( this, SvxTextAnimationPage, ClickDirectionHdl_Impl ) );
+ aBtnUp.SetClickHdl( aLink );
+ aBtnLeft.SetClickHdl( aLink );
+ aBtnRight.SetClickHdl( aLink );
+ aBtnDown.SetClickHdl( aLink );
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxTextAnimationPage::~SvxTextAnimationPage()
+{
+}
+
+/*************************************************************************
+|*
+|* Liest uebergebenen Item-Set
+|*
+\************************************************************************/
+
+void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
+{
+ const SfxItemPool* pPool = rAttrs.GetPool();
+
+ // Animationstyp
+ const SfxPoolItem* pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIKIND );
+
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIKIND );
+ if( pItem )
+ {
+ eAniKind = ( ( const SdrTextAniKindItem* )pItem )->GetValue();
+ aLbEffect.SelectEntryPos( eAniKind );
+ }
+ else
+ aLbEffect.SetNoSelection();
+ aLbEffect.SaveValue();
+
+ // Animationsrichtung
+ pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIDIRECTION );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDIRECTION );
+ if( pItem )
+ {
+ SdrTextAniDirection eValue = ( ( const SdrTextAniDirectionItem* )pItem )->GetValue();
+ SelectDirection( eValue );
+ }
+ else
+ {
+ aBtnUp.Check( FALSE );
+ aBtnLeft.Check( FALSE );
+ aBtnRight.Check( FALSE );
+ aBtnDown.Check( FALSE );
+ }
+ aBtnUp.SaveValue();
+ aBtnLeft.SaveValue();
+ aBtnRight.SaveValue();
+ aBtnDown.SaveValue();
+
+ // Start inside
+ pItem = GetItem( rAttrs, SDRATTR_TEXT_ANISTARTINSIDE );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTARTINSIDE );
+ if( pItem )
+ {
+ aTsbStartInside.EnableTriState( FALSE );
+ BOOL bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue();
+ if( bValue )
+ aTsbStartInside.SetState( STATE_CHECK );
+ else
+ aTsbStartInside.SetState( STATE_NOCHECK );
+ }
+ else
+ aTsbStartInside.SetState( STATE_DONTKNOW );
+ aTsbStartInside.SaveValue();
+
+ // Stop inside
+ pItem = GetItem( rAttrs, SDRATTR_TEXT_ANISTOPINSIDE );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTOPINSIDE );
+ if( pItem )
+ {
+ aTsbStopInside.EnableTriState( FALSE );
+ BOOL bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue();
+ if( bValue )
+ aTsbStopInside.SetState( STATE_CHECK );
+ else
+ aTsbStopInside.SetState( STATE_NOCHECK );
+ }
+ else
+ aTsbStopInside.SetState( STATE_DONTKNOW );
+ aTsbStopInside.SaveValue();
+
+ // Anzahl
+ pItem = GetItem( rAttrs, SDRATTR_TEXT_ANICOUNT );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANICOUNT );
+ if( pItem )
+ {
+ aTsbEndless.EnableTriState( FALSE );
+ long nValue = (long) ( ( const SdrTextAniCountItem* )pItem )->GetValue();
+ aNumFldCount.SetValue( nValue );
+ if( nValue == 0 )
+ {
+ if( eAniKind == SDRTEXTANI_SLIDE )
+ {
+ aTsbEndless.SetState( STATE_NOCHECK );
+ aTsbEndless.Enable( FALSE );
+ }
+ else
+ {
+ aTsbEndless.SetState( STATE_CHECK );
+#ifndef VCL
+ aNumFldCount.SetEmptyValue();
+#else
+ aNumFldCount.SetEmptyFieldValue();
+#endif
+ }
+ }
+ else
+ aTsbEndless.SetState( STATE_NOCHECK );
+ }
+ else
+ {
+#ifndef VCL
+ aNumFldCount.SetEmptyValue();
+#else
+ aNumFldCount.SetEmptyFieldValue();
+#endif
+ aTsbEndless.SetState( STATE_DONTKNOW );
+ }
+ aTsbEndless.SaveValue();
+ aNumFldCount.SaveValue();
+
+ // Verzoegerung
+ pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIDELAY );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDELAY );
+ if( pItem )
+ {
+ aTsbAuto.EnableTriState( FALSE );
+ long nValue = (long) ( ( const SdrTextAniDelayItem* )pItem )->GetValue();
+ aMtrFldDelay.SetValue( nValue );
+ if( nValue == 0 )
+ {
+ aTsbAuto.SetState( STATE_CHECK );
+#ifndef VCL
+ aMtrFldDelay.SetEmptyValue();
+#else
+ aMtrFldDelay.SetEmptyFieldValue();
+#endif
+ }
+ else
+ aTsbAuto.SetState( STATE_NOCHECK );
+ }
+ else
+ {
+#ifndef VCL
+ aMtrFldDelay.SetEmptyValue();
+#else
+ aMtrFldDelay.SetEmptyFieldValue();
+#endif
+ aTsbAuto.SetState( STATE_DONTKNOW );
+ }
+ aTsbAuto.SaveValue();
+ aMtrFldDelay.SaveValue();
+
+ // Schrittweite
+ pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIAMOUNT );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIAMOUNT );
+ if( pItem )
+ {
+ aTsbPixel.EnableTriState( FALSE );
+ long nValue = (long) ( ( const SdrTextAniAmountItem* )pItem )->GetValue();
+ if( nValue <= 0 )
+ {
+ aTsbPixel.SetState( STATE_CHECK );
+ nValue = -nValue;
+ if( nValue == 0 )
+ nValue++;
+ aMtrFldAmount.SetUnit( FUNIT_CUSTOM );
+ aMtrFldAmount.SetDecimalDigits( 0 );
+
+ aMtrFldAmount.SetSpinSize( 1 );
+ aMtrFldAmount.SetMin( 1 );
+ aMtrFldAmount.SetFirst( 1 );
+ aMtrFldAmount.SetMax( 100 );
+ aMtrFldAmount.SetLast( 100 );
+
+ aMtrFldAmount.SetValue( nValue );
+ }
+ else
+ {
+ aTsbPixel.SetState( STATE_NOCHECK );
+ aMtrFldAmount.SetUnit( eFUnit );
+ aMtrFldAmount.SetDecimalDigits( 2 );
+
+ aMtrFldAmount.SetSpinSize( 10 );
+ aMtrFldAmount.SetMin( 1 );
+ aMtrFldAmount.SetFirst( 1 );
+ aMtrFldAmount.SetMax( 10000 );
+ aMtrFldAmount.SetLast( 10000 );
+
+ SetMetricValue( aMtrFldAmount, nValue, eUnit );
+ }
+ }
+ else
+ {
+ aMtrFldAmount.Disable();
+#ifndef VCL
+ aMtrFldAmount.SetEmptyValue();
+#else
+ aMtrFldAmount.SetEmptyFieldValue();
+#endif
+ aTsbPixel.SetState( STATE_DONTKNOW );
+ }
+ aTsbPixel.SaveValue();
+ aMtrFldAmount.SaveValue();
+
+
+ SelectEffectHdl_Impl( NULL );
+ ClickEndlessHdl_Impl( NULL );
+ ClickAutoHdl_Impl( NULL );
+ //ClickPixelHdl_Impl( NULL );
+}
+
+/*************************************************************************
+|*
+|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen
+|*
+\************************************************************************/
+
+BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs)
+{
+ BOOL bModified = FALSE;
+ USHORT nPos;
+ TriState eState;
+
+ // Animationstyp
+ nPos = aLbEffect.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbEffect.GetSavedValue() )
+ {
+ rAttrs.Put( SdrTextAniKindItem( (SdrTextAniKind) nPos ) );
+ bModified = TRUE;
+ }
+
+ // Animationsrichtung
+ if( aBtnUp.GetSavedValue() != aBtnUp.IsChecked() ||
+ aBtnLeft.GetSavedValue() != aBtnLeft.IsChecked() ||
+ aBtnRight.GetSavedValue() != aBtnRight.IsChecked() ||
+ aBtnDown.GetSavedValue() != aBtnDown.IsChecked() )
+ {
+ SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection();
+ rAttrs.Put( SdrTextAniDirectionItem( eValue ) );
+ bModified = TRUE;
+ }
+
+ // Start inside
+ eState = aTsbStartInside.GetState();
+ if( eState != aTsbStartInside.GetSavedValue() )
+ {
+ rAttrs.Put( SdrTextAniStartInsideItem( (BOOL) STATE_CHECK == eState ) );
+ bModified = TRUE;
+ }
+
+ // Stop inside
+ eState = aTsbStopInside.GetState();
+ if( eState != aTsbStopInside.GetSavedValue() )
+ {
+ rAttrs.Put( SdrTextAniStopInsideItem( (BOOL) STATE_CHECK == eState ) );
+ bModified = TRUE;
+ }
+
+ // Anzahl
+ eState = aTsbEndless.GetState();
+ String aStr = aNumFldCount.GetText();
+ if( eState != aTsbEndless.GetSavedValue() ||
+ aStr != aNumFldCount.GetSavedValue() )
+ {
+ long nValue = 0;
+ if( eState == STATE_CHECK )
+ bModified = TRUE;
+ else
+ {
+ if( aStr != aNumFldCount.GetSavedValue() )
+ {
+ nValue = aNumFldCount.GetValue();
+ bModified = TRUE;
+ }
+ }
+ if( bModified )
+ rAttrs.Put( SdrTextAniCountItem( (UINT16) nValue ) );
+ }
+
+ // Verzoegerung
+ eState = aTsbAuto.GetState();
+ aStr = aMtrFldDelay.GetText();
+ if( eState != aTsbAuto.GetSavedValue() ||
+ aStr != aMtrFldDelay.GetSavedValue() )
+ {
+ long nValue = 0;
+ if( eState == STATE_CHECK )
+ bModified = TRUE;
+ else
+ {
+ if( aStr != aMtrFldDelay.GetSavedValue() )
+ {
+ nValue = aMtrFldDelay.GetValue();
+ bModified = TRUE;
+ }
+ }
+ if( bModified )
+ rAttrs.Put( SdrTextAniDelayItem( (UINT16) nValue ) );
+ }
+
+ // Schrittweite
+ eState = aTsbPixel.GetState();
+ aStr = aMtrFldAmount.GetText();
+ if( eState != aTsbPixel.GetSavedValue() ||
+ aStr != aMtrFldAmount.GetSavedValue() )
+ {
+ long nValue = 0;
+ if( eState == STATE_CHECK )
+ {
+ nValue = aMtrFldAmount.GetValue();
+ nValue = -nValue;
+ }
+ else
+ {
+ nValue = GetCoreValue( aMtrFldAmount, eUnit );
+ }
+ rAttrs.Put( SdrTextAniAmountItem( (INT16) nValue ) );
+
+ bModified = TRUE;
+ }
+
+ return( bModified );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxTextAnimationPage::Construct()
+{
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+USHORT* SvxTextAnimationPage::GetRanges()
+{
+ return( pRanges );
+}
+
+/*************************************************************************
+|*
+|* Erzeugt die Seite
+|*
+\************************************************************************/
+
+SfxTabPage* SvxTextAnimationPage::Create( Window* pWindow,
+ const SfxItemSet& rAttrs )
+{
+ return( new SvxTextAnimationPage( pWindow, rAttrs ) );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxTextAnimationPage, SelectEffectHdl_Impl, void *, EMPTYARG )
+{
+ USHORT nPos = aLbEffect.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ eAniKind = (SdrTextAniKind) nPos;
+ switch( eAniKind )
+ {
+ case SDRTEXTANI_NONE:
+ {
+ aBtnUp.Disable();
+ aBtnLeft.Disable();
+ aBtnRight.Disable();
+ aBtnDown.Disable();
+ aTsbStartInside.Disable();
+ aTsbStopInside.Disable();
+
+ aTsbEndless.Disable();
+ aNumFldCount.Disable();
+ aGrpCount.Disable();
+
+ aTsbAuto.Disable();
+ aMtrFldDelay.Disable();
+ aGrpDelay.Disable();
+
+ aTsbPixel.Disable();
+ aMtrFldAmount.Disable();
+ aGrpAmount.Disable();
+ }
+ break;
+
+ case SDRTEXTANI_BLINK:
+ case SDRTEXTANI_SCROLL:
+ case SDRTEXTANI_ALTERNATE:
+ case SDRTEXTANI_SLIDE:
+ {
+ if( eAniKind == SDRTEXTANI_SLIDE )
+ {
+ aTsbStartInside.Disable();
+ aTsbStopInside.Disable();
+
+ aTsbEndless.Disable();
+ aNumFldCount.Enable();
+ aNumFldCount.SetValue( aNumFldCount.GetValue() );
+ }
+ else
+ {
+ aTsbStartInside.Enable();
+ aTsbStopInside.Enable();
+
+ aTsbEndless.Enable();
+ ClickEndlessHdl_Impl( NULL );
+ }
+ aGrpCount.Enable();
+
+ aTsbAuto.Enable();
+ aGrpDelay.Enable();
+ ClickAutoHdl_Impl( NULL );
+
+ if( eAniKind == SDRTEXTANI_BLINK )
+ {
+ aBtnUp.Disable();
+ aBtnLeft.Disable();
+ aBtnRight.Disable();
+ aBtnDown.Disable();
+
+ aTsbPixel.Disable();
+ aMtrFldAmount.Disable();
+ aGrpAmount.Disable();
+ }
+ else
+ {
+ aBtnUp.Enable();
+ aBtnLeft.Enable();
+ aBtnRight.Enable();
+ aBtnDown.Enable();
+
+ aTsbPixel.Enable();
+ aMtrFldAmount.Enable();
+ aGrpAmount.Enable();
+ }
+ }
+ break;
+ }
+
+ }
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxTextAnimationPage, ClickEndlessHdl_Impl, void *, EMPTYARG )
+{
+
+ if( eAniKind != SDRTEXTANI_SLIDE )
+ {
+ TriState eState = aTsbEndless.GetState();
+ if( eState != STATE_NOCHECK )
+ {
+ aNumFldCount.Disable();
+#ifndef VCL
+ aNumFldCount.SetEmptyValue();
+#else
+ aNumFldCount.SetEmptyFieldValue();
+#endif
+ }
+ else
+ {
+ aNumFldCount.Enable();
+ aNumFldCount.SetValue( aNumFldCount.GetValue() );
+ }
+ }
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxTextAnimationPage, ClickAutoHdl_Impl, void *, EMPTYARG )
+{
+ TriState eState = aTsbAuto.GetState();
+ if( eState != STATE_NOCHECK )
+ {
+ aMtrFldDelay.Disable();
+#ifndef VCL
+ aMtrFldDelay.SetEmptyValue();
+#else
+ aMtrFldDelay.SetEmptyFieldValue();
+#endif
+ }
+ else
+ {
+ aMtrFldDelay.Enable();
+ aMtrFldDelay.SetValue( aMtrFldDelay.GetValue() );
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxTextAnimationPage, ClickPixelHdl_Impl, void *, EMPTYARG )
+{
+ TriState eState = aTsbPixel.GetState();
+ if( eState == STATE_CHECK )
+ {
+ long nValue = aMtrFldAmount.GetValue() / 10;
+ aMtrFldAmount.Enable();
+ aMtrFldAmount.SetUnit( FUNIT_CUSTOM );
+ //SetFieldUnit( aMtrFldAmount, FUNIT_CUSTOM );
+ aMtrFldAmount.SetDecimalDigits( 0 );
+
+ aMtrFldAmount.SetSpinSize( 1 );
+ aMtrFldAmount.SetMin( 1 );
+ aMtrFldAmount.SetFirst( 1 );
+ aMtrFldAmount.SetMax( 100 );
+ aMtrFldAmount.SetLast( 100 );
+
+ aMtrFldAmount.SetValue( nValue );
+ }
+ else if( eState == STATE_NOCHECK )
+ {
+ long nValue = aMtrFldAmount.GetValue() * 10;
+ aMtrFldAmount.Enable();
+ aMtrFldAmount.SetUnit( eFUnit );
+ //SetFieldUnit( aMtrFldAmount, eFUnit );
+ aMtrFldAmount.SetDecimalDigits( 2 );
+
+ aMtrFldAmount.SetSpinSize( 10 );
+ aMtrFldAmount.SetMin( 1 );
+ aMtrFldAmount.SetFirst( 1 );
+ aMtrFldAmount.SetMax( 10000 );
+ aMtrFldAmount.SetLast( 10000 );
+
+ aMtrFldAmount.SetValue( nValue );
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxTextAnimationPage, ClickDirectionHdl_Impl, ImageButton *, pBtn )
+{
+ aBtnUp.Check( pBtn == &aBtnUp );
+ aBtnLeft.Check( pBtn == &aBtnLeft );
+ aBtnRight.Check( pBtn == &aBtnRight );
+ aBtnDown.Check( pBtn == &aBtnDown );
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxTextAnimationPage::SelectDirection( USHORT nValue )
+{
+ aBtnUp.Check( nValue == SDRTEXTANI_UP );
+ aBtnLeft.Check( nValue == SDRTEXTANI_LEFT );
+ aBtnRight.Check( nValue == SDRTEXTANI_RIGHT );
+ aBtnDown.Check( nValue == SDRTEXTANI_DOWN );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+USHORT SvxTextAnimationPage::GetSelectedDirection()
+{
+ USHORT nValue = 0;
+
+ if( aBtnUp.IsChecked() )
+ nValue = SDRTEXTANI_UP;
+ else if( aBtnLeft.IsChecked() )
+ nValue = SDRTEXTANI_LEFT;
+ else if( aBtnRight.IsChecked() )
+ nValue = SDRTEXTANI_RIGHT;
+ else if( aBtnDown.IsChecked() )
+ nValue = SDRTEXTANI_DOWN;
+
+ return( nValue );
+}
+
+
diff --git a/svx/source/dialog/textanim.hrc b/svx/source/dialog/textanim.hrc
new file mode 100644
index 0000000000..f2f4db8e88
--- /dev/null
+++ b/svx/source/dialog/textanim.hrc
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * $RCSfile: textanim.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 LB_EFFECT 1
+#define CTL_EFFECT 1
+#define TSB_START_INSIDE 1
+#define TSB_STOP_INSIDE 2
+#define GRP_EFFECT 1
+#define GRP_COUNT 2
+#define TSB_ENDLESS 3
+#define NUM_FLD_COUNT 1
+#define GRP_AMOUNT 3
+#define MTR_FLD_AMOUNT 1
+#define GRP_DELAY 4
+#define MTR_FLD_DELAY 2
+#define TSB_PIXEL 4
+#define TSB_AUTO 5
+#define BTN_UP 1
+#define BTN_LEFT 2
+#define BTN_RIGHT 3
+#define BTN_DOWN 4
diff --git a/svx/source/dialog/textanim.src b/svx/source/dialog/textanim.src
new file mode 100644
index 0000000000..317cded0a2
--- /dev/null
+++ b/svx/source/dialog/textanim.src
@@ -0,0 +1,755 @@
+/*************************************************************************
+ *
+ * $RCSfile: textanim.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "dialogs.hrc"
+#include "textanim.hrc"
+#define HALFBUTTON_WIDTH 7
+#define BUTTON_WIDTH 2 * HALFBUTTON_WIDTH
+#define BUTTON_SIZE MAP_APPFONT( BUTTON_WIDTH, BUTTON_WIDTH )
+ // RID_SVXPAGE_TEXTANIMATION ---------------------------------------------
+TabPage RID_SVXPAGE_TEXTANIMATION
+{
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Textanimation" ;
+ Text [ ENGLISH ] = "Text animation" ;
+ Text [ dutch ] = "Tekstanimatie" ;
+ Text [ english_us ] = "Animation" ;
+ Text [ italian ] = "Animazione testo" ;
+ Text [ spanish ] = "Animación de texto" ;
+ Text [ french ] = "Animation texte" ;
+ Text [ swedish ] = "Textanimation" ;
+ Text [ danish ] = "Tekstanimation" ;
+ Text [ portuguese ] = "Animação de texto" ;
+ Text [ portuguese_brazilian ] = "Textanimation" ;
+ ListBox LB_EFFECT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 14 , 14 ) ;
+ Size = MAP_APPFONT ( 95 , 57 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Kein Effekt" ; Default ; > ;
+ < "Blinken" ; Default ; > ;
+ < "Durchlaufen" ; Default ; > ;
+ /* ### ACHTUNG: Neuer Eintrag in Liste? 4 : Hin- und zurücklaufen*/
+ /* ### ACHTUNG: Neuer Eintrag in Liste? 4 : Hin- und zurücklaufen*/
+ < "Hin- und zurücklaufen" ; Default ; > ;
+ < "Reinlaufen" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Kein Effekt" ; Default ; > ;
+ < "Blinken" ; Default ; > ;
+ < "Durchlaufen" ; Default ; > ;
+ < "Hin- und zurücklaufen" ; Default ; > ;
+ < "Reinlaufen" ; Default ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Sem efeito" ; Default ; > ;
+ < "Intermitente" ; Default ; > ;
+ < "Deslize contínuo" ; Default ; > ;
+ < "De um lado para o outro" ; Default ; > ;
+ < "Mover para dentro" ; Default ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "No Effect" ; Default ; > ;
+ < "Blink" ; Default ; > ;
+ < "Scroll Through" ; Default ; > ;
+ < "Scroll Back and Forth" ; Default ; > ;
+ < "Scroll In" ; Default ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Kein Effekt" ; Default ; > ;
+ < "Blinken" ; Default ; > ;
+ < "Durchlaufen" ; Default ; > ;
+ < "Hin- und zurücklaufen" ; Default ; > ;
+ < "Reinlaufen" ; Default ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Ingen effekt" ; Default ; > ;
+ < "Blinka" ; Default ; > ;
+ < "Genomlöpa" ; Default ; > ;
+ < "Löpa fram och tillbaka" ; Default ; > ;
+ < "Löpa in i" ; Default ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Ingen effekt" ; Default ; > ;
+ < "Blink" ; Default ; > ;
+ < "Glid igennem" ; Default ; > ;
+ < "Glid frem- og tilbage" ; Default ; > ;
+ < "Glid ind" ; Default ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Nessun effetto" ; Default ; > ;
+ < "Lampeggio" ; Default ; > ;
+ < "Scorrimento" ; Default ; > ;
+ < "Scorrimento in avanti e indietro" ; Default ; > ;
+ < "Scorrimento interno" ; Default ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Sin efecto" ; Default ; > ;
+ < "Intermitente" ; Default ; > ;
+ < "Continuo" ; Default ; > ;
+ < "De un lado al otro" ; Default ; > ;
+ < "Entrar" ; Default ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Aucun effet" ; Default ; > ;
+ < "Clignoter" ; Default ; > ;
+ < "Défiler à travers" ; Default ; > ;
+ < "Défilement bidirectionnel" ; Default ; > ;
+ < "Défiler dedans" ; Default ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Geen effect" ; Default ; > ;
+ < "Knipperen" ; Default ; > ;
+ < "Doorlopen" ; Default ; > ;
+ < "Heen en weer lopen" ; Default ; > ;
+ < "Binnenlopen" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ÎÞЧ¹û" ; Default ; > ;
+ < "ÉÁ˸" ; Default ; > ;
+ < "Á¬Ðø" ; Default ; > ;
+ < "Íù·µ»î¶¯" ; Default ; > ;
+ < "Ò»´Î½øÈë" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Áåç ýôôåêòà" ; Default ; > ;
+ < "Ìèãàíèå" ; Default ; > ;
+ < "Ñêâîçíàÿ áåãóùàÿ ñòðîêà" ; Default ; > ;
+ < "Ñòðîêà, áåãóùàÿ âïåðåä è íàçàä" ; Default ; > ;
+ < "Ñòðîêà, áåãóùàÿ âî âíóòðü" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Bez efektu" ; Default ; > ;
+ < "Miganie" ; Default ; > ;
+ < "Przep³yw" ; Default ; > ;
+ < "Przewiñ tam i z powrotem" ; Default ; > ;
+ < "Zwiniêcie" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "‚È‚µ" ; Default ; > ;
+ < "“_–Å" ; Default ; > ;
+ < "’ʉß" ; Default ; > ;
+ < "‘OŒã‚Éis" ; Default ; > ;
+ < "—¬‚µž‚Ý" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "µL®ÄªG" ; Default ; > ;
+ < "°{Ã{" ; Default ; > ;
+ < "«ùÄò" ; Default ; > ;
+ < "¨Ó¦^¬¡°Ê" ; Default ; > ;
+ < "³æ¦V¶i¤J" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "×ùñßò åöÝ" ; Default ; > ;
+ < "Íá áíáâïóâÞíåé" ; Default ; > ;
+ < "Êýëéóç äéá ìÝóïõ" ; Default ; > ;
+ < "Êýëéóç åìðñüò êáé ðßóù" ; Default ; > ;
+ < "Êßíçóç åíôüò" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "È¿°ú ¾øÀ½" ; Default ; > ;
+ < "±ô¹ÚÀ̱â" ; Default ; > ;
+ < "Àüü ½ºÅ©·Ñ" ; Default ; > ;
+ < "¾ÕµÚ·Î ½ºÅ©·Ñ" ; Default ; > ;
+ < "½ºÅ©·Ñ ÀÎ" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÈÏæä ÊÃËíÑÇÊ" ; Default ; > ;
+ < "æãíÖ" ; Default ; > ;
+ < "ÊÍÑíß ÚÈÑ" ; Default ; > ;
+ < "ÊÍÑß ááÃãÇã æÇáÎáÝ" ; Default ; > ;
+ < "ÊÍÑíß ÏÇÎá" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Efekt yok" ; Default ; > ;
+ < "Yanýp sönme" ; Default ; > ;
+ < "Geçiþ" ; Default ; > ;
+ < "Git gel" ; Default ; > ;
+ < "Ýçeri kay" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ ImageButton BTN_UP
+ {
+ Pos = MAP_APPFONT ( 62 - HALFBUTTON_WIDTH , 35 ) ;
+ Size = BUTTON_SIZE ;
+ Symbol = IMAGEBUTTON_ARROW_UP ;
+ QuickHelpText = "Nach Oben" ;
+ QuickHelpText [ ENGLISH ] = "To top" ;
+ QuickHelpText [ english_us ] = "To Top" ;
+ QuickHelpText [ italian ] = "In alto" ;
+ QuickHelpText [ spanish ] = "Hacia arriba" ;
+ QuickHelpText [ french ] = "Vers le haut" ;
+ QuickHelpText [ dutch ] = "Naar boven" ;
+ QuickHelpText [ danish ] = "Opad" ;
+ QuickHelpText [ portuguese_brazilian ] = "Nach Oben" ;
+ QuickHelpText [ portuguese ] = "Para cima" ;
+ QuickHelpText [ swedish ] = "Uppåt" ;
+ QuickHelpText[ russian ] = "Ââåðõ";
+ QuickHelpText[ greek ] = "Ðñïò ôá ðÜíù";
+ QuickHelpText[ polish ] = "W górê";
+ QuickHelpText[ japanese ] = "ã‚Ö";
+ QuickHelpText[ korean ] = "To Top";
+ QuickHelpText[ chinese_simplified ] = "ÏòÉÏ";
+ QuickHelpText[ chinese_traditional ] = "¦V¤W";
+ QuickHelpText[ arabic ] = "Åáì ÃÚáì";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton BTN_LEFT
+ {
+ Pos = MAP_APPFONT ( 62 - HALFBUTTON_WIDTH - BUTTON_WIDTH , 35 + BUTTON_WIDTH ) ;
+ Size = BUTTON_SIZE ;
+ Symbol = IMAGEBUTTON_ARROW_LEFT ;
+ QuickHelpText = "Nach Links" ;
+ QuickHelpText [ ENGLISH ] = "To left" ;
+ QuickHelpText [ english_us ] = "To Left" ;
+ QuickHelpText [ italian ] = "A sinistra" ;
+ QuickHelpText [ spanish ] = "Hacia la izquierda" ;
+ QuickHelpText [ french ] = "Vers la gauche" ;
+ QuickHelpText [ dutch ] = "Naar links" ;
+ QuickHelpText [ danish ] = "Mod venstre" ;
+ QuickHelpText [ portuguese_brazilian ] = "Nach Links" ;
+ QuickHelpText [ portuguese ] = "Esquerda" ;
+ QuickHelpText [ swedish ] = "Åt vänster" ;
+ QuickHelpText[ russian ] = "Âëåâî";
+ QuickHelpText[ greek ] = "Ðñïò ôá áñéóôåñÜ";
+ QuickHelpText[ polish ] = "W lewo";
+ QuickHelpText[ japanese ] = "¶‚Ö";
+ QuickHelpText[ korean ] = "To Left";
+ QuickHelpText[ chinese_simplified ] = "Ïò×ó";
+ QuickHelpText[ chinese_traditional ] = "¦V¥ª";
+ QuickHelpText[ arabic ] = "Åáì ÇáíÓÇÑ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton BTN_RIGHT
+ {
+ Pos = MAP_APPFONT ( 62 + HALFBUTTON_WIDTH , 35 + BUTTON_WIDTH ) ;
+ Size = BUTTON_SIZE ;
+ Symbol = IMAGEBUTTON_ARROW_RIGHT ;
+ QuickHelpText = "Nach Rechts" ;
+ QuickHelpText [ ENGLISH ] = "To left" ;
+ QuickHelpText [ english_us ] = "To Right" ;
+ QuickHelpText [ italian ] = "A destra" ;
+ QuickHelpText [ spanish ] = "Hacia la derecha" ;
+ QuickHelpText [ french ] = "Vers la droite" ;
+ QuickHelpText [ dutch ] = "Naar rechts" ;
+ QuickHelpText [ danish ] = "Mod højre" ;
+ QuickHelpText [ portuguese_brazilian ] = "Nach Rechts" ;
+ QuickHelpText [ portuguese ] = "Direita" ;
+ QuickHelpText [ swedish ] = "Åt höger" ;
+ QuickHelpText[ russian ] = "Âïðàâî";
+ QuickHelpText[ greek ] = "Ðñïò ôá äåîéÜ";
+ QuickHelpText[ polish ] = "W prawo";
+ QuickHelpText[ japanese ] = "‰E‚Ö";
+ QuickHelpText[ korean ] = "To Right";
+ QuickHelpText[ chinese_simplified ] = "ÏòÓÒ";
+ QuickHelpText[ chinese_traditional ] = "¦V¥k";
+ QuickHelpText[ arabic ] = "Åáì Çáíãíä";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton BTN_DOWN
+ {
+ Pos = MAP_APPFONT ( 62 - HALFBUTTON_WIDTH , 35 + 2*BUTTON_WIDTH ) ;
+ Size = BUTTON_SIZE ;
+ Symbol = IMAGEBUTTON_ARROW_DOWN ;
+ QuickHelpText = "Nach Unten" ;
+ QuickHelpText [ ENGLISH ] = "To bottom" ;
+ QuickHelpText [ english_us ] = "To Bottom" ;
+ QuickHelpText [ italian ] = "In basso" ;
+ QuickHelpText [ spanish ] = "Hacia abajo" ;
+ QuickHelpText [ french ] = "Vers le bas" ;
+ QuickHelpText [ dutch ] = "Naar beneden" ;
+ QuickHelpText [ danish ] = "Nedad" ;
+ QuickHelpText [ portuguese_brazilian ] = "Nach Unten" ;
+ QuickHelpText [ portuguese ] = "Para baixo" ;
+ QuickHelpText [ swedish ] = "Nedåt" ;
+ QuickHelpText[ russian ] = "Âíèç";
+ QuickHelpText[ greek ] = "Ðñïò ôá êÜôù";
+ QuickHelpText[ polish ] = "W dó³";
+ QuickHelpText[ japanese ] = "‰º‚Ö";
+ QuickHelpText[ korean ] = "To Bottom";
+ QuickHelpText[ chinese_simplified ] = "ÏòÏÂ";
+ QuickHelpText[ chinese_traditional ] = "¦V¤U";
+ QuickHelpText[ arabic ] = "Åáì ÃÓÝá";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_START_INSIDE
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 100 ) ;
+ Size = MAP_APPFONT ( 105 , 12 ) ;
+ Text = "Text sichtbar beim ~Starten" ;
+ Text [ ENGLISH ] = "S~tart inside" ;
+ Text [ dutch ] = "Tekst zichtbaar bij ~starten" ;
+ Text [ english_us ] = "S~tart inside" ;
+ Text [ italian ] = "Testo visibile all'~inizio" ;
+ Text [ spanish ] = "Texto visible al ~iniciar" ;
+ Text [ french ] = "Texte visible au départ" ;
+ Text [ swedish ] = "Text synlig vid ~start" ;
+ Text [ danish ] = "Tekst synlig ved start" ;
+ Text [ portuguese ] = "Texto visível ao ~iniciar" ;
+ Text [ portuguese_brazilian ] = "Text sichtbar beim ~Starten" ;
+ Text[ chinese_simplified ] = "ÔÚÆô¶¯Ê±ÏÔʾÎÄ×Ö(~T)";
+ Text[ russian ] = "Ïîêàçûâàòü òåêñò ïðè çàïóñêå";
+ Text[ polish ] = "Tekst widoczny przy rozpoczêciu";
+ Text[ japanese ] = "ŠJŽnŽž‚É÷½Ä‚ªŒ©‚¦‚é(~S)";
+ Text[ chinese_traditional ] = "¦b±Ò°Ê®ÉÅã¥Ü¤å¦r(~S)";
+ Text[ greek ] = "Êåßìåíï ïñáôü êáôÜ ôçí åêêßíç~óç";
+ Text[ korean ] = "½ÃÀ۽à ÅؽºÆ® Ç¥½Ã(~T)";
+ Text[ arabic ] = "ÅÙåÇÑ ÇáäÕ ÚäÏ ÇáÈÏÇíÉ";
+ Text[ turkish ] = "Metni, canlandýrma baþlarken ~görüntüle";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_STOP_INSIDE
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 114 ) ;
+ Size = MAP_APPFONT ( 105 , 12 ) ;
+ Text = "Text sichtbar beim ~Beenden" ;
+ Text [ ENGLISH ] = "S~top inside" ;
+ Text [ dutch ] = "Tekst zichtbaar bij ~beëindigen" ;
+ Text [ english_us ] = "Text visible when exiting" ;
+ Text [ italian ] = "Testo visibile alla ~fine" ;
+ Text [ spanish ] = "Texto visible al ~finalizar" ;
+ Text [ french ] = "Texte visible à l'arrêt" ;
+ Text [ swedish ] = "Text synlig vid a~vslutning" ;
+ Text [ danish ] = "Tekst synlig ved afslutning" ;
+ Text [ portuguese ] = "Texto visível ao ~finalizar" ;
+ Text [ portuguese_brazilian ] = "Text sichtbar beim ~Beenden" ;
+ Text[ chinese_simplified ] = "ÔÚ½áÊøʱÏÔʾÎÄ×Ö(~O)";
+ Text[ russian ] = "Ïîêàçûâàòü òåêñò ïðè âûõîäå";
+ Text[ polish ] = "Tekst widoczny przy zakoñczeniu";
+ Text[ japanese ] = "I—¹Žž‚É÷½Ä‚ªŒ©‚¦‚é(~O)";
+ Text[ chinese_traditional ] = "¦bµ²§ô®ÉÅã¥Ü¤å¦r(~O)";
+ Text[ greek ] = "Êåßìåíï ïñáôü êáôÜ ôçí Ýîïäï";
+ Text[ korean ] = "Á¾·á½Ã ÅؽºÆ® Ç¥½Ã(~O)";
+ Text[ arabic ] = "ÅÙåÇÑ ÇáäÕ ÚäÏ ÇáÇäÊåÇÁ";
+ Text[ turkish ] = "Metni, canlandýrma bittiðinde gö~rüntüle";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_ENDLESS
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 132 , 15 ) ;
+ Size = MAP_APPFONT ( 60 , 12 ) ;
+ Text = "~Endlos" ;
+ Text [ ENGLISH ] = "~Endless" ;
+ Text [ dutch ] = "~Eindeloos" ;
+ Text [ english_us ] = "~Continuous" ;
+ Text [ italian ] = "Continuo" ;
+ Text [ spanish ] = "~Continuo" ;
+ Text [ french ] = "~Continu" ;
+ Text [ swedish ] = "~Kontinuerligt" ;
+ Text [ danish ] = "Endeløs" ;
+ Text [ portuguese ] = "~Contínuo" ;
+ Text [ portuguese_brazilian ] = "~Endlos" ;
+ Text[ chinese_simplified ] = "ÎÞÏÞ(~C)";
+ Text[ russian ] = "Áåñêîíå÷íî";
+ Text[ polish ] = "Bez koñca";
+ Text[ japanese ] = "´ÝÄÞÚ½(~C)";
+ Text[ chinese_traditional ] = "«ùÄò(~C)";
+ Text[ greek ] = "Óõíå÷Þò";
+ Text[ korean ] = "¿¬¼Ó(~C)";
+ Text[ arabic ] = "ÈáÇ äåÇíÉ";
+ Text[ turkish ] = "~Sonsuz";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NUM_FLD_COUNT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 196 , 15 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ First = 1 ;
+ };
+ GroupBox GRP_EFFECT
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 112 , 126 ) ;
+ Text = "Effekt" ;
+ Text [ ENGLISH ] = "Effect" ;
+ Text [ english_us ] = "Effects" ;
+ Text [ italian ] = "Effetto" ;
+ Text [ spanish ] = "Efecto" ;
+ Text [ french ] = "Effet" ;
+ Text [ dutch ] = "Effect" ;
+ Text [ swedish ] = "Effekt" ;
+ Text [ danish ] = "Effekt" ;
+ Text [ portuguese_brazilian ] = "Effekt" ;
+ Text [ portuguese ] = "Efeitos" ;
+ Text[ chinese_simplified ] = "Ч¹û";
+ Text[ russian ] = "Ýôôåêò";
+ Text[ polish ] = "Efekt";
+ Text[ japanese ] = "Œø‰Ê";
+ Text[ chinese_traditional ] = "®ÄªG";
+ Text[ greek ] = "ÅöÝ";
+ Text[ korean ] = "È¿°ú";
+ Text[ arabic ] = "ÇáÊÃËíÑÇÊ";
+ Text[ turkish ] = "Efekt";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_COUNT
+ {
+ Pos = MAP_APPFONT ( 124 , 3 ) ;
+ Size = MAP_APPFONT ( 130 , 30 ) ;
+ Text = "Anzahl" ;
+ Text [ ENGLISH ] = "Count" ;
+ Text [ english_us ] = "Count" ;
+ Text [ italian ] = "Numero" ;
+ Text [ spanish ] = "Cantidad" ;
+ Text [ french ] = "Nombre" ;
+ Text [ dutch ] = "Aantal" ;
+ Text [ swedish ] = "Antal" ;
+ Text [ danish ] = "Antal" ;
+ Text [ portuguese_brazilian ] = "Anzahl" ;
+ Text [ portuguese ] = "Quantidade" ;
+ Text[ chinese_simplified ] = "ÊýÄ¿";
+ Text[ russian ] = "Êîëè÷åñòâî";
+ Text[ polish ] = "Liczba";
+ Text[ japanese ] = "‰ñ”";
+ Text[ chinese_traditional ] = "¼Æ¥Ø";
+ Text[ greek ] = "ÐëÞèïò";
+ Text[ korean ] = "°³¼ö";
+ Text[ arabic ] = "ÇáÚÏÏ";
+ Text[ turkish ] = "Adet sayýsý";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_PIXEL
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 132 , 79 ) ;
+ Size = MAP_APPFONT ( 60 , 12 ) ;
+ Text = "~Pixel" ;
+ Text [ ENGLISH ] = "~Pixel" ;
+ Text [ dutch ] = "~Pixels" ;
+ Text [ english_us ] = "~Pixels" ;
+ Text [ italian ] = "~Pixel" ;
+ Text [ spanish ] = "Pí~xel" ;
+ Text [ french ] = "~Pixels" ;
+ Text [ swedish ] = "~Pixel" ;
+ Text [ danish ] = "Pixel" ;
+ Text [ portuguese ] = "~Pixel" ;
+ Text [ portuguese_brazilian ] = "~Pixel" ;
+ Text[ chinese_simplified ] = "ÏñËØ(~P)";
+ Text[ russian ] = "Ïèêñåëü";
+ Text[ polish ] = "Pi~ksel";
+ Text[ japanese ] = "Ë߸¾Ù(~P)";
+ Text[ chinese_traditional ] = "¹³¯À(~P)";
+ Text[ greek ] = "~Pixel";
+ Text[ korean ] = "Çȼ¿(~P)";
+ Text[ arabic ] = "ÈßÓá";
+ Text[ turkish ] = "~Piksel";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_AMOUNT
+ {
+ Pos = MAP_APPFONT ( 124 , 67 ) ;
+ Size = MAP_APPFONT ( 130 , 30 ) ;
+ Text = "Schrittweite" ;
+ Text [ ENGLISH ] = "Amount" ;
+ Text [ english_us ] = "Increment" ;
+ Text [ italian ] = "Incremento" ;
+ Text [ spanish ] = "Incremento" ;
+ Text [ french ] = "Pas de progression" ;
+ Text [ dutch ] = "Stapgrootte" ;
+ Text [ swedish ] = "Steglängd" ;
+ Text [ danish ] = "Trinvidde" ;
+ Text [ portuguese_brazilian ] = "Schrittweite" ;
+ Text [ portuguese ] = "Incremento" ;
+ Text[ chinese_simplified ] = "ÔöÁ¿";
+ Text[ russian ] = "Øèðèíà øàãà";
+ Text[ polish ] = "Inkrement";
+ Text[ japanese ] = "½Ã¯Ìß”";
+ Text[ chinese_traditional ] = "º¥¶i";
+ Text[ greek ] = "ÂÞìá";
+ Text[ korean ] = "Áõ°¡ºÐ";
+ Text[ arabic ] = "ÇáÊÒÇíÏ";
+ Text[ turkish ] = "Adým";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_AMOUNT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 196 , 78 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " Pixel" ;
+ Minimum = 1 ;
+ First = 1 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ };
+ TriStateBox TSB_AUTO
+ {
+ Pos = MAP_APPFONT ( 132 , 48 ) ;
+ Size = MAP_APPFONT ( 60 , 12 ) ;
+ Text = "~Automatisch" ;
+ Text [ ENGLISH ] = "~Automatic" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "~Automatisch" ;
+ Text [ english_us ] = "~Automatic" ;
+ Text [ italian ] = "~Automatico" ;
+ Text [ spanish ] = "~Automático" ;
+ Text [ french ] = "~Automatique" ;
+ Text [ swedish ] = "~Automatisk" ;
+ Text [ danish ] = "Automatisk" ;
+ Text [ portuguese ] = "~Automaticamente" ;
+ Text [ portuguese_brazilian ] = "~Automatisch" ;
+ Text[ chinese_simplified ] = "×Ô¶¯(~A)";
+ Text[ russian ] = "Àâòîìàòè÷åñêè";
+ Text[ polish ] = "Automatycznie";
+ Text[ japanese ] = "Ž©“®";
+ Text[ chinese_traditional ] = "¦Û°Ê(~A)";
+ Text[ greek ] = "Áõôüìáôá";
+ Text[ korean ] = "ÀÚµ¿(~A)";
+ Text[ arabic ] = "ÊáÞÇÆí";
+ Text[ turkish ] = "~Otomatik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_DELAY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 196 , 47 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Spinsize = 50 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " ms" ;
+ Maximum = 100000 ;
+ Last = 100000 ;
+ };
+ GroupBox GRP_DELAY
+ {
+ Pos = MAP_APPFONT ( 124 , 35 ) ;
+ Size = MAP_APPFONT ( 130 , 30 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Verzögerung : Verz÷gerung */
+ /* ### ACHTUNG: Neuer Text in Resource? Verzögerung : Verz÷gerung */
+ Text = "Verzögerung" ;
+ Text [ ENGLISH ] = "Delay" ;
+ Text [ english_us ] = "Delay" ;
+ Text [ italian ] = "Ritardo" ;
+ Text [ spanish ] = "Retardo" ;
+ Text [ french ] = "Cadence" ;
+ Text [ dutch ] = "Vertraging" ;
+ Text [ swedish ] = "Försening" ;
+ Text [ danish ] = "Forsinkelse" ;
+ Text [ portuguese_brazilian ] = "Verzögerung" ;
+ Text [ portuguese ] = "Atraso" ;
+ Text[ chinese_simplified ] = "ÑÓ³Ù";
+ Text[ russian ] = "Çàäåðæêà";
+ Text[ polish ] = "OpóŸnienie";
+ Text[ japanese ] = "’x‚­‚·‚é";
+ Text[ chinese_traditional ] = "©µ¿ð";
+ Text[ greek ] = "ÊáèõóôÝñçóç";
+ Text[ korean ] = "Áö¿¬";
+ Text[ arabic ] = "ÊÃÎíÑ";
+ Text[ turkish ] = "Gecikme";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "»î¶¯ÎÄ×Ö";
+ Text[ russian ] = "Àíèìàöèÿ òåêñòà";
+ Text[ polish ] = "Animacje";
+ Text[ japanese ] = "±ÆÒ°¼®Ý÷½Ä";
+ Text[ chinese_traditional ] = "°ÊºA¤å¦r";
+ Text[ greek ] = "ÅöÝ êßíçóçò êåéìÝíïõ";
+ Text[ korean ] = "¾Ö´Ï¸ÞÀ̼Ç";
+ Text[ arabic ] = "ÊÃËíÑÇÊ ãÊÍÑßÉ";
+ Text[ turkish ] = "Metin canlandýrma";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXDLG_TEXT -------------------------------------------------------
+TabDialog RID_SVXDLG_TEXT
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 289 , 176 ) ;
+ 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" ;
+ Moveable = TRUE ;
+ TabControl 1
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ PageList =
+ {
+ PageItem
+ {
+ PageResID = RID_SVXPAGE_TEXTATTR ;
+ Identifier = RID_SVXPAGE_TEXTATTR ;
+ 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[ greek ] = "Êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ®";
+ Text[ arabic ] = "äÕ";
+ Text[ turkish ] = "Metin";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ PageResID = RID_SVXPAGE_TEXTANIMATION ;
+ Identifier = RID_SVXPAGE_TEXTANIMATION ;
+ Text = "Lauftext" ;
+ Text [ ENGLISH ] = "Text animation" ;
+ Text [ english_us ] = "Text Animation" ;
+ Text [ italian ] = "Testo scorrevole" ;
+ Text [ spanish ] = "Animación de texto" ;
+ Text [ french ] = "Défilement de texte" ;
+ Text [ dutch ] = "Tekstanimatie" ;
+ Text [ swedish ] = "Löptext" ;
+ Text [ danish ] = "Animeret tekst" ;
+ Text [ portuguese_brazilian ] = "Lauftext" ;
+ Text [ portuguese ] = "Texto animado" ;
+ Text[ chinese_simplified ] = "»î¶¯ÎÄ×Ö";
+ Text[ russian ] = "Áåãóùàÿ ñòðîêà";
+ Text[ polish ] = "Animacja tekstu";
+ Text[ japanese ] = "÷½Ä±ÆÒ°¼®Ý";
+ Text[ chinese_traditional ] = "°ÊºA¤å¦r";
+ Text[ greek ] = "Êéíïýìåíï êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ® ¾Ö´Ï¸ÞÀ̼Ç";
+ Text[ arabic ] = "äÕ ãÊÍÑß";
+ Text[ turkish ] = "Metin canlandýrma";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "ÎÄ×Ö";
+ Text[ russian ] = "Òåêñò";
+ Text[ polish ] = "Tekst";
+ Text[ japanese ] = "÷½Ä";
+ Text[ chinese_traditional ] = "¤å¦r";
+ Text[ greek ] = "Êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ®";
+ Text[ arabic ] = "äÕ";
+ Text[ turkish ] = "Metin";
+ Text[ language_user1 ] = " ";
+};
+ // ******************************************************************* EOF
diff --git a/svx/source/dialog/textattr.cxx b/svx/source/dialog/textattr.cxx
new file mode 100644
index 0000000000..ec4d5e9959
--- /dev/null
+++ b/svx/source/dialog/textattr.cxx
@@ -0,0 +1,749 @@
+/*************************************************************************
+ *
+ * $RCSfile: textattr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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"
+
+#ifndef _SVDDEF_HXX //autogen
+#include "svddef.hxx"
+#endif
+#ifndef SDTMITM_HXX //autogen
+#include "sdtditm.hxx"
+#endif
+#ifndef _SDTAGITM_HXX //autogen
+#include "sdtagitm.hxx"
+#endif
+#ifndef _SDTAITM_HXX //autogen
+#include "sdtaitm.hxx"
+#endif
+#ifndef _SDTFSITM_HXX //autogen
+#include "sdtfsitm.hxx"
+#endif
+#ifndef _SDTCFITM_HXX //autogen
+#include "sdtcfitm.hxx"
+#endif
+#ifndef _SVDOBJ_HXX //autogen
+#include "svdobj.hxx"
+#endif
+#ifndef _SVDMARK_HXX //autogen
+#include "svdmark.hxx"
+#endif
+#ifndef _SVDVIEW_HXX //autogen
+#include "svdview.hxx"
+#endif
+#ifndef _SVDOTEXT_HXX //autogen
+#include "svdotext.hxx"
+#endif
+
+
+#ifndef _SVX_TEXTATTR_CXX
+#define _SVX_TEXTATTR_CXX
+#endif
+#include "textattr.hxx"
+#include "textattr.hrc"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+static USHORT pRanges[] =
+{
+ SDRATTR_MISC_FIRST,
+ SDRATTR_TEXT_HORZADJUST,
+ 0
+};
+
+/*************************************************************************
+|*
+|* Dialog zum Kopieren von Objekten
+|*
+\************************************************************************/
+
+SvxTextAttrDialog::SvxTextAttrDialog( Window* pParent, const SfxItemSet& rInAttrs,
+ const SdrView* pSdrView ) :
+ SfxSingleTabDialog( pParent, rInAttrs, RID_SVXPAGE_TEXTATTR, FALSE )
+{
+ SvxTextAttrPage* pPage = new SvxTextAttrPage( this, rInAttrs );
+
+ pPage->SetView( pSdrView );
+ pPage->Construct();
+
+ SetTabPage( pPage );
+ SetText( pPage->GetText() );
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxTextAttrDialog::~SvxTextAttrDialog()
+{
+}
+
+/*************************************************************************
+|*
+|* Dialog (Seite) zum Kopieren von Objekten
+|*
+\************************************************************************/
+
+SvxTextAttrPage::SvxTextAttrPage( Window* pWindow, const SfxItemSet& rInAttrs ) :
+ SvxTabPage ( pWindow, ResId( RID_SVXPAGE_TEXTATTR, DIALOG_MGR() ),
+ rInAttrs ),
+
+ aTsbAutoGrowWidth ( this, ResId( TSB_AUTOGROW_WIDTH ) ),
+ aTsbAutoGrowHeight ( this, ResId( TSB_AUTOGROW_HEIGHT ) ),
+ aTsbFitToSize ( this, ResId( TSB_FIT_TO_SIZE ) ),
+ aTsbContour ( this, ResId( TSB_CONTOUR ) ),
+ aGrpText ( this, ResId( GRP_TEXT ) ),
+
+ aFtLeft ( this, ResId( FT_LEFT ) ),
+ aMtrFldLeft ( this, ResId( MTR_FLD_LEFT ) ),
+ aFtRight ( this, ResId( FT_RIGHT ) ),
+ aMtrFldRight ( this, ResId( MTR_FLD_RIGHT ) ),
+ aFtTop ( this, ResId( FT_TOP ) ),
+ aMtrFldTop ( this, ResId( MTR_FLD_TOP ) ),
+ aFtBottom ( this, ResId( FT_BOTTOM ) ),
+ aMtrFldBottom ( this, ResId( MTR_FLD_BOTTOM ) ),
+ aGrpDistance ( this, ResId( GRP_DISTANCE ) ),
+
+ aCtlPosition ( this, ResId( CTL_POSITION ),
+ RP_MM, 240, 100 ),
+ aTsbFullWidth ( this, ResId( TSB_FULL_WIDTH ) ),
+ aGrpPosition ( this, ResId( GRP_POSITION ) ),
+
+ rOutAttrs ( rInAttrs )
+{
+ FreeResource();
+
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+ SetFieldUnit( aMtrFldLeft, eFUnit );
+ SetFieldUnit( aMtrFldRight, eFUnit );
+ SetFieldUnit( aMtrFldTop, eFUnit );
+ SetFieldUnit( aMtrFldBottom, eFUnit );
+
+ Link aLink( LINK( this, SvxTextAttrPage, ClickHdl_Impl ) );
+ aTsbAutoGrowWidth.SetClickHdl( aLink );
+ aTsbAutoGrowHeight.SetClickHdl( aLink );
+ aTsbFitToSize.SetClickHdl( aLink );
+ aTsbContour.SetClickHdl( aLink );
+
+ aTsbFullWidth.SetClickHdl(
+ LINK( this, SvxTextAttrPage, ClickFullWidthHdl_Impl ) );
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxTextAttrPage::~SvxTextAttrPage()
+{
+}
+
+/*************************************************************************
+|*
+|* Liest uebergebenen Item-Set
+|*
+\************************************************************************/
+
+void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs )
+{
+ SfxItemPool* pPool = rAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ SfxMapUnit eUnit = pPool->GetMetric( SDRATTR_TEXT_LEFTDIST );
+
+ // Linker Abstand vom Rahmen
+ const SfxPoolItem* pItem = GetItem( rAttrs, SDRATTR_TEXT_LEFTDIST );
+
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_LEFTDIST );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrTextLeftDistItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldLeft, nValue, eUnit );
+ }
+ else
+ aMtrFldLeft.SetText( String() );
+ aMtrFldLeft.SaveValue();
+
+ // Rechter Abstand vom Rahmen
+ pItem = GetItem( rAttrs, SDRATTR_TEXT_RIGHTDIST );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_RIGHTDIST );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrTextRightDistItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldRight, nValue, eUnit );
+ }
+ else
+ aMtrFldRight.SetText( String() );
+ aMtrFldRight.SaveValue();
+
+ // Oberer Abstand vom Rahmen
+ pItem = GetItem( rAttrs, SDRATTR_TEXT_UPPERDIST );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_UPPERDIST );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrTextUpperDistItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldTop, nValue, eUnit );
+ }
+ else
+ aMtrFldTop.SetText( String() );
+ aMtrFldTop.SaveValue();
+
+ // Unterer Abstand vom Rahmen
+ pItem = GetItem( rAttrs, SDRATTR_TEXT_LOWERDIST );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_LOWERDIST );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrTextLowerDistItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldBottom, nValue, eUnit );
+ }
+ else
+ aMtrFldBottom.SetText( String() );
+ aMtrFldBottom.SaveValue();
+
+ // An Hoehe anpassen
+ if ( rAttrs.GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbAutoGrowHeight.SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
+ GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ aTsbAutoGrowHeight.EnableTriState( FALSE );
+ }
+ else
+ aTsbAutoGrowHeight.SetState( STATE_DONTKNOW );
+ aTsbAutoGrowHeight.SaveValue();
+
+ // An Breite anpassen
+ if ( rAttrs.GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbAutoGrowWidth.SetState( ( ( const SdrTextAutoGrowWidthItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWWIDTH ) ).
+ GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ aTsbAutoGrowWidth.EnableTriState( FALSE );
+ }
+ else
+ aTsbAutoGrowWidth.SetState( STATE_DONTKNOW );
+ aTsbAutoGrowWidth.SaveValue();
+
+ // zentriert
+ if ( rAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SFX_ITEM_DONTCARE )
+ {
+ SdrTextVertAdjust eTVA = (SdrTextVertAdjust)
+ ( ( const SdrTextVertAdjustItem& )rAttrs.Get( SDRATTR_TEXT_VERTADJUST ) ).GetValue();
+ {
+ if ( rAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbFullWidth.EnableTriState( FALSE );
+
+ SdrTextHorzAdjust eTHA = (SdrTextHorzAdjust)
+ ( ( const SdrTextHorzAdjustItem& )rAttrs.Get( SDRATTR_TEXT_HORZADJUST ) ).GetValue();
+ RECT_POINT eRP;
+ if( eTVA == SDRTEXTVERTADJUST_TOP )
+ {
+ if( eTHA == SDRTEXTHORZADJUST_LEFT ) eRP = RP_LT;
+ else if( eTHA == SDRTEXTHORZADJUST_CENTER ) eRP = RP_MT;
+ else if( eTHA == SDRTEXTHORZADJUST_RIGHT ) eRP = RP_RT;
+ else if( eTHA == SDRTEXTHORZADJUST_BLOCK )
+ {
+ eRP = RP_MT;
+ aTsbFullWidth.SetState( STATE_CHECK );
+ }
+ }
+ else if( eTVA == SDRTEXTVERTADJUST_CENTER )
+ {
+ if( eTHA == SDRTEXTHORZADJUST_LEFT ) eRP = RP_LM;
+ else if( eTHA == SDRTEXTHORZADJUST_CENTER ) eRP = RP_MM;
+ else if( eTHA == SDRTEXTHORZADJUST_RIGHT ) eRP = RP_RM;
+ else if( eTHA == SDRTEXTHORZADJUST_BLOCK )
+ {
+ eRP = RP_MM;
+ aTsbFullWidth.SetState( STATE_CHECK );
+ }
+ }
+ else if( eTVA == SDRTEXTVERTADJUST_BOTTOM )
+ {
+ if( eTHA == SDRTEXTHORZADJUST_LEFT ) eRP = RP_LB;
+ else if( eTHA == SDRTEXTHORZADJUST_CENTER ) eRP = RP_MB;
+ else if( eTHA == SDRTEXTHORZADJUST_RIGHT ) eRP = RP_RB;
+ else if( eTHA == SDRTEXTHORZADJUST_BLOCK )
+ {
+ eRP = RP_MB;
+ aTsbFullWidth.SetState( STATE_CHECK );
+ }
+ }
+
+ aCtlPosition.SetActualRP( eRP );
+ }
+ }
+ }
+ else
+ {
+ aCtlPosition.Reset();
+ aTsbFullWidth.SetState( STATE_DONTKNOW );
+ }
+
+ // Am Rahmen anpassen
+ if ( rAttrs.GetItemState( SDRATTR_TEXT_FITTOSIZE ) != SFX_ITEM_DONTCARE )
+ {
+ SdrFitToSizeType eFTS = (SdrFitToSizeType)
+ ( ( const SdrTextFitToSizeTypeItem& )rAttrs.Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue();
+ aTsbFitToSize.SetState( eFTS == SDRTEXTFIT_NONE ? STATE_NOCHECK : STATE_CHECK );
+ aTsbFitToSize.EnableTriState( FALSE );
+ }
+ else
+ aTsbFitToSize.SetState( STATE_DONTKNOW );
+ aTsbFitToSize.SaveValue();
+
+ // Konturfluss
+ if( rAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SFX_ITEM_DONTCARE )
+ {
+ BOOL bContour = ( ( const SdrTextContourFrameItem& )rAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ aTsbContour.SetState( bContour ? STATE_CHECK : STATE_NOCHECK );
+ aTsbContour.EnableTriState( FALSE );
+ }
+ else
+ aTsbContour.SetState( STATE_DONTKNOW );
+ aTsbContour.SaveValue();
+
+ ClickHdl_Impl( NULL );
+}
+
+/*************************************************************************
+|*
+|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen
+|*
+\************************************************************************/
+
+BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs)
+{
+ SfxItemPool* pPool = rAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ SfxMapUnit eUnit = pPool->GetMetric( SDRATTR_TEXT_LEFTDIST );
+
+ INT32 nValue;
+ TriState eState;
+
+ if( aMtrFldLeft.GetText() != aMtrFldLeft.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldLeft, eUnit );
+ rAttrs.Put( SdrTextLeftDistItem( nValue ) );
+ }
+
+ if( aMtrFldRight.GetText() != aMtrFldRight.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldRight, eUnit );
+ rAttrs.Put( SdrTextRightDistItem( nValue ) );
+ }
+
+ if( aMtrFldTop.GetText() != aMtrFldTop.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldTop, eUnit );
+ rAttrs.Put( SdrTextUpperDistItem( nValue ) );
+ }
+
+ if( aMtrFldBottom.GetText() != aMtrFldBottom.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldBottom, eUnit );
+ rAttrs.Put( SdrTextLowerDistItem( nValue ) );
+ }
+
+ eState = aTsbAutoGrowHeight.GetState();
+ if( eState != aTsbAutoGrowHeight.GetSavedValue() )
+ {
+ rAttrs.Put( SdrTextAutoGrowHeightItem( (BOOL) STATE_CHECK == eState ) );
+ }
+
+ eState = aTsbAutoGrowWidth.GetState();
+ if( eState != aTsbAutoGrowWidth.GetSavedValue() )
+ {
+ rAttrs.Put( SdrTextAutoGrowWidthItem( (BOOL) STATE_CHECK == eState ) );
+ }
+
+ // Konturfluss
+ eState = aTsbContour.GetState();
+ if( eState != aTsbContour.GetSavedValue() )
+ {
+ rAttrs.Put( SdrTextContourFrameItem( (BOOL) STATE_CHECK == eState ) );
+ }
+
+ eState = aTsbFitToSize.GetState();
+ if( eState != aTsbFitToSize.GetSavedValue() )
+ {
+ SdrFitToSizeType eFTS;
+ switch( eState )
+ {
+ case STATE_NOCHECK: eFTS = SDRTEXTFIT_NONE; break;
+ //case STATE_CHECK: eFTS = SDRTEXTFIT_RESIZEATTR; break;
+ case STATE_CHECK: eFTS = SDRTEXTFIT_PROPORTIONAL; break;
+ }
+ rAttrs.Put( SdrTextFitToSizeTypeItem( eFTS ) );
+ }
+
+ // zentriert
+ RECT_POINT eRP = aCtlPosition.GetActualRP();
+ SdrTextVertAdjust eTVA, eOldTVA;
+ SdrTextHorzAdjust eTHA, eOldTHA;
+
+ switch( eRP )
+ {
+ case RP_LT: eTVA = SDRTEXTVERTADJUST_TOP;
+ eTHA = SDRTEXTHORZADJUST_LEFT; break;
+ case RP_LM: eTVA = SDRTEXTVERTADJUST_CENTER;
+ eTHA = SDRTEXTHORZADJUST_LEFT; break;
+ case RP_LB: eTVA = SDRTEXTVERTADJUST_BOTTOM;
+ eTHA = SDRTEXTHORZADJUST_LEFT; break;
+ case RP_MT: eTVA = SDRTEXTVERTADJUST_TOP;
+ eTHA = SDRTEXTHORZADJUST_CENTER; break;
+ case RP_MM: eTVA = SDRTEXTVERTADJUST_CENTER;
+ eTHA = SDRTEXTHORZADJUST_CENTER; break;
+ case RP_MB: eTVA = SDRTEXTVERTADJUST_BOTTOM;
+ eTHA = SDRTEXTHORZADJUST_CENTER; break;
+ case RP_RT: eTVA = SDRTEXTVERTADJUST_TOP;
+ eTHA = SDRTEXTHORZADJUST_RIGHT; break;
+ case RP_RM: eTVA = SDRTEXTVERTADJUST_CENTER;
+ eTHA = SDRTEXTHORZADJUST_RIGHT; break;
+ case RP_RB: eTVA = SDRTEXTVERTADJUST_BOTTOM;
+ eTHA = SDRTEXTHORZADJUST_RIGHT; break;
+ }
+ if( aTsbFullWidth.GetState() == STATE_CHECK )
+ eTHA = SDRTEXTHORZADJUST_BLOCK;
+
+ if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SFX_ITEM_DONTCARE )
+ {
+ eOldTVA = (SdrTextVertAdjust)
+ ( ( const SdrTextVertAdjustItem& )rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ) ).GetValue();
+ if( eOldTVA != eTVA )
+ rAttrs.Put( SdrTextVertAdjustItem( eTVA ) );
+ }
+ else
+ rAttrs.Put( SdrTextVertAdjustItem( eTVA ) );
+
+ if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SFX_ITEM_DONTCARE )
+ {
+ eOldTHA = (SdrTextHorzAdjust)
+ ( ( const SdrTextHorzAdjustItem& )rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ) ).GetValue();
+ if( eOldTHA != eTHA )
+ rAttrs.Put( SdrTextHorzAdjustItem( eTHA ) );
+ }
+ else
+ rAttrs.Put( SdrTextHorzAdjustItem( eTHA ) );
+
+ return( TRUE );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxTextAttrPage::Construct()
+{
+ DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+
+ bContourEnabled = TRUE;
+ bAutoGrowSizeEnabled = FALSE;
+
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ if( rMarkList.GetMarkCount() == 1 )
+ {
+ const SdrObject* pObj = rMarkList.GetMark( 0 )->GetObj();
+ SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier();
+ if( pObj->GetObjInventor() == SdrInventor &&
+ ( eKind==OBJ_TEXT || eKind==OBJ_TITLETEXT || eKind==OBJ_OUTLINETEXT
+ || eKind==OBJ_CAPTION ) &&
+ ( (SdrTextObj*) pObj )->HasText() )
+ {
+ // Konturfluss ist NICHT bei reinen Textobjekten m”glich
+ bContourEnabled = FALSE;
+
+ // Breite und Hoehe anpassen ist NUR bei reinen Textobjekten m”glich
+ bAutoGrowSizeEnabled = TRUE;
+ }
+ }
+ aTsbAutoGrowHeight.Enable( bAutoGrowSizeEnabled );
+ aTsbAutoGrowWidth.Enable( bAutoGrowSizeEnabled );
+ aTsbContour.Enable( bContourEnabled );
+}
+
+/*************************************************************************
+|*
+|* Erzeugt die Seite
+|*
+\************************************************************************/
+
+SfxTabPage* SvxTextAttrPage::Create( Window* pWindow,
+ const SfxItemSet& rAttrs )
+{
+ return( new SvxTextAttrPage( pWindow, rAttrs ) );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+USHORT* SvxTextAttrPage::GetRanges()
+{
+ return( pRanges );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxTextAttrPage::PointChanged( Window* pWindow, RECT_POINT eRP )
+{
+ switch( eRP )
+ {
+ case RP_LT:
+ case RP_LM:
+ case RP_LB:
+ case RP_RT:
+ case RP_RM:
+ case RP_RB:
+ if( aTsbFullWidth.GetState() == STATE_CHECK )
+ aTsbFullWidth.SetState( STATE_NOCHECK );
+ break;
+ }
+}
+
+/*************************************************************************
+|*
+|* Aendert evtl. die Position des Positions-Controls
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxTextAttrPage, ClickFullWidthHdl_Impl, void *, EMPTYARG )
+{
+ if( aTsbFullWidth.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;
+ }
+ }
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Enabled/Disabled "Groesse an Text" oder "Am Rahmen Anpassen"
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxTextAttrPage, ClickHdl_Impl, void *, p )
+{
+ BOOL bAutoGrowWidth = aTsbAutoGrowWidth.GetState() == STATE_CHECK;
+ BOOL bAutoGrowHeight = aTsbAutoGrowHeight.GetState() == STATE_CHECK;
+ BOOL bFitToSize = aTsbFitToSize.GetState() == STATE_CHECK;
+ BOOL bContour = aTsbContour.GetState() == STATE_CHECK;
+
+ aTsbContour.Enable( !bFitToSize &&
+ !( ( bAutoGrowWidth || bAutoGrowHeight ) && bAutoGrowSizeEnabled ) &&
+ bContourEnabled );
+
+ aTsbAutoGrowWidth.Enable( !bFitToSize &&
+ !( bContour && bContourEnabled ) &&
+ bAutoGrowSizeEnabled );
+
+ aTsbAutoGrowHeight.Enable( !bFitToSize &&
+ !( bContour && bContourEnabled ) &&
+ bAutoGrowSizeEnabled );
+
+ aTsbFitToSize.Enable( !( ( bAutoGrowWidth || bAutoGrowHeight ) && bAutoGrowSizeEnabled ) &&
+ !( bContour && bContourEnabled ) );
+
+ aMtrFldLeft.Enable( !(bContour && bContourEnabled) );
+ aMtrFldRight.Enable( !(bContour && bContourEnabled) );
+ aMtrFldTop.Enable( !(bContour && bContourEnabled) );
+ aMtrFldBottom.Enable( !(bContour && bContourEnabled) );
+
+/*
+ // Am Rahmen anpassen
+ if( bFitToSize )
+ {
+ aTsbAutoGrowWidth.Enable( FALSE );
+ aTsbAutoGrowHeight.Enable( FALSE );
+ aTsbContour.Enable( FALSE );
+ }
+ else
+ {
+ aTsbAutoGrowWidth.Enable( bAutoGrowSizeEnabled );
+ aTsbAutoGrowHeight.Enable( bAutoGrowSizeEnabled );
+ aTsbContour.Enable( bContourEnabled );
+ }
+
+ // An Hoehe oder Breite anpassen
+ if( ( bAutoGrowWidth || bAutoGrowHeight ) && bAutoGrowSizeEnabled )
+ {
+ aTsbFitToSize.Enable( FALSE );
+ aTsbContour.Enable( FALSE );
+ }
+ else
+ {
+ aTsbFitToSize.Enable( TRUE );
+ aTsbContour.Enable( bContourEnabled );
+ }
+
+ // Kontur
+ if( bContour && bContourEnabled )
+ {
+ aTsbAutoGrowWidth.Enable( FALSE );
+ aTsbAutoGrowHeight.Enable( FALSE );
+ aTsbFitToSize.Enable( FALSE );
+ }
+ else
+ {
+ aTsbAutoGrowWidth.Enable( bAutoGrowSizeEnabled && !bFitToSize );
+ aTsbAutoGrowHeight.Enable( bAutoGrowSizeEnabled && !bFitToSize );
+ aMtrFldLeft.Enable( TRUE );
+ aMtrFldRight.Enable( TRUE );
+ aMtrFldTop.Enable( TRUE );
+ aMtrFldBottom.Enable( TRUE );
+ aTsbFitToSize.Enable( TRUE );
+ }
+*/
+
+//////////
+ /*
+ if( p == &aTsbFitToSize ||
+ p == NULL )
+ {
+ if( aTsbFitToSize.GetState() == STATE_CHECK )
+ {
+ aTsbAutoGrowWidth.Enable( FALSE );
+ aTsbAutoGrowHeight.Enable( FALSE );
+ }
+ else if( bAutoGrowSizeEnabled )
+ {
+ aTsbAutoGrowWidth.Enable( TRUE );
+ aTsbAutoGrowHeight.Enable( TRUE );
+ }
+ }
+ if( p == &aTsbAutoGrowWidth ||
+ p == &aTsbAutoGrowHeight ||
+ p == NULL )
+ {
+ if( ( aTsbAutoGrowWidth.GetState() == STATE_CHECK && aTsbAutoGrowWidth.IsEnabled() ) ||
+ ( aTsbAutoGrowHeight.GetState() == STATE_CHECK && aTsbAutoGrowHeight.IsEnabled() ) )
+ aTsbFitToSize.Enable( FALSE );
+ else
+ aTsbFitToSize.Enable( TRUE );
+ }
+ if( p == &aTsbFitToSize ||
+ p == NULL )
+ {
+ BOOL bOff = aTsbFitToSize.GetState() == STATE_NOCHECK;
+ aTsbContour.Enable( bOff );
+ }
+ if( p == &aTsbContour ||
+ p == NULL )
+ {
+ BOOL bOff = aTsbContour.GetState() == STATE_NOCHECK;
+ aMtrFldLeft.Enable( bOff );
+ aMtrFldRight.Enable( bOff );
+ aMtrFldTop.Enable( bOff );
+ aMtrFldBottom.Enable( bOff );
+ aTsbFitToSize.Enable( bOff );
+ }
+ */
+ return( 0L );
+}
+
+
diff --git a/svx/source/dialog/textattr.hrc b/svx/source/dialog/textattr.hrc
new file mode 100644
index 0000000000..9637f8d8bc
--- /dev/null
+++ b/svx/source/dialog/textattr.hrc
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * $RCSfile: textattr.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_TEXT 2
+#define GRP_DISTANCE 1
+#define GRP_POSITION 3
+#define TSB_AUTOGROW_HEIGHT 1
+#define TSB_AUTOGROW_WIDTH 2
+#define TSB_FIT_TO_SIZE 3
+#define TSB_FULL_WIDTH 4
+#define TSB_CONTOUR 5
+#define CTL_POSITION 1
+#define FT_LEFT 1
+#define MTR_FLD_LEFT 1
+#define FT_RIGHT 2
+#define MTR_FLD_RIGHT 2
+#define FT_TOP 3
+#define MTR_FLD_TOP 3
+#define FT_BOTTOM 4
+#define MTR_FLD_BOTTOM 4
diff --git a/svx/source/dialog/textattr.src b/svx/source/dialog/textattr.src
new file mode 100644
index 0000000000..f58c5f501b
--- /dev/null
+++ b/svx/source/dialog/textattr.src
@@ -0,0 +1,492 @@
+/*************************************************************************
+ *
+ * $RCSfile: textattr.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "textattr.hrc"
+#include "helpid.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXPAGE_TEXTATTR --------------------------------------------------
+TabPage RID_SVXPAGE_TEXTATTR
+{
+ HelpId = HID_PAGE_TEXTATTR ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ 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" ;
+ TriStateBox TSB_AUTOGROW_WIDTH
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 100 , 12 ) ;
+ Text = "Br~eite an Text anpassen" ;
+ Text [ ENGLISH ] = "Fit ~width to text" ;
+ Text [ english_us ] = "Fit wi~dth to text" ;
+ Text [ dutch ] = "Br~eedte aan tekst aanpassen" ;
+ Text [ italian ] = "~Adatta larghezza a testo" ;
+ Text [ spanish ] = "Ajus~tar ancho al texto" ;
+ Text [ french ] = "Adapter ~largeur au texte" ;
+ Text [ swedish ] = "Anpassa br~edd till text" ;
+ Text [ danish ] = "Tilpas bredde til tekst" ;
+ Text [ portuguese ] = "Adaptar ~largura ao texto" ;
+ Text [ portuguese_brazilian ] = "Br~eite an Text anpassen" ;
+ Text[ chinese_simplified ] = "ºÍÎÄ×Ö¿í¶È¶ÔÓ¦(~W)";
+ Text[ russian ] = "Âûðîâíÿòü øèðèíó ïî òåêñòó";
+ Text[ polish ] = "Dopasuj szeroko~Ͼ do tekstu";
+ Text[ japanese ] = "÷½Ä‚É•‚ð‡‚킹‚é(~W)";
+ Text[ chinese_traditional ] = "¼e«×©M¤º¤å¹ï»ô(~W)";
+ Text[ arabic ] = "ãáÇÁãÉ ÇáÚÑÖ ááäÕ";
+ Text[ greek ] = "ÐñïóáñìïãÞ ðëÜôïõò ùò ðñïò êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ®¿¡ ³Êºñ ¸ÂÃã(~D)";
+ Text[ turkish ] = "~Geniþliði metne göre ayarla";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_AUTOGROW_HEIGHT
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
+ Size = MAP_APPFONT ( 100 , 12 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~öhe an Text anpassen : H~÷he an Text anpassen */
+ /* ### ACHTUNG: Neuer Text in Resource? H~öhe an Text anpassen : H~÷he an Text anpassen */
+ Text = "H~öhe an Text anpassen" ;
+ Text [ ENGLISH ] = "Fit ~height to text" ;
+ Text [ english_us ] = "Fit h~eight to text" ;
+ Text [ dutch ] = "Hoogte ~aan tekst aanpassen" ;
+ Text [ italian ] = "A~datta altezza a testo" ;
+ Text [ spanish ] = "~Ajustar altura al texto" ;
+ Text [ french ] = "Adapter la h~auteur au texte" ;
+ Text [ swedish ] = "Anpassa höjd ~till text" ;
+ Text [ danish ] = "Tilpas højde til tekst" ;
+ Text [ portuguese ] = "Adaptar ~altura ao texto" ;
+ Text [ portuguese_brazilian ] = "H~öhe an Text anpassen" ;
+ Text[ chinese_simplified ] = "ºÍÎÄ×ָ߶ȶÔÓ¦(~H)";
+ Text[ russian ] = "Âûðîâíÿòü âûñîòó ïî òåêñòó";
+ Text[ polish ] = "Dopas~uj wysokoϾ do tekstu";
+ Text[ japanese ] = "÷½Ä‚É‚‚³‚ð‡‚킹‚é(~H)";
+ Text[ chinese_traditional ] = "°ª«×©M¤º¤å¹ï»ô(~H)";
+ Text[ arabic ] = "ãáÇÁãÉ ÇáÇÑÊÝÇÚ ááäÕ";
+ Text[ greek ] = "ÐñïóáñìïãÞ ýøïõò ùò ðñïò êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ®¿¡ ³ôÀÌ ¸ÂÃã(~E)";
+ Text[ turkish ] = "~Yüksekliði metne göre ayarla";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_FIT_TO_SIZE
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 132 , 14 ) ;
+ Size = MAP_APPFONT ( 100 , 12 ) ;
+ Text = "Am R~ahmen anpassen" ;
+ Text [ ENGLISH ] = "~Fit to size" ;
+ Text [ dutch ] = "Aan ~kader aanpassen" ;
+ Text [ english_us ] = "~Fit to frame" ;
+ Text [ italian ] = "Adatta alla cornice" ;
+ Text [ spanish ] = "Aju~star al marco" ;
+ Text [ french ] = "Adapter au ca~dre" ;
+ Text [ swedish ] = "Anpassa till r~am" ;
+ Text [ danish ] = "Tilpas til rammen" ;
+ Text [ portuguese ] = "Adaptar à ~moldura" ;
+ Text [ portuguese_brazilian ] = "Am R~ahmen anpassen" ;
+ Text[ chinese_simplified ] = "ºÍ±ß¿ò´óСÏà¶ÔÓ¦(~Z)";
+ Text[ russian ] = "Ïîäáîð ïîä ðàìêó";
+ Text[ polish ] = "Dopasuj do ramki";
+ Text[ japanese ] = "˜g‚ɇ‚킹‚é(~S)";
+ Text[ chinese_traditional ] = "©MÃä®Ø¹ï»ô(~S)";
+ Text[ arabic ] = "ãáÇÁãÉ ááÅØÇÑ";
+ Text[ greek ] = "ÐñïóáñìïãÞ óå ðëáßóéï";
+ Text[ korean ] = "Å©±â¿¡ ¸ÂÃã(~Z)";
+ Text[ turkish ] = "Metni ~çerçeveye uydur";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_CONTOUR
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 132 , 27 ) ;
+ Size = MAP_APPFONT ( 100 , 12 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Konturfluß : ~Konturflu˜ */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Konturfluß : ~Konturflu˜ */
+ Text = "~Konturfluss" ;
+ Text [ ENGLISH ] = "~Contour" ;
+ Text [ portuguese ] = "Ajustar ao ~contorno" ;
+ Text [ english_us ] = "~Adjust to contour" ;
+ Text [ portuguese_brazilian ] = "~Konturfluß" ;
+ Text [ swedish ] = "~Konturflöde" ;
+ Text [ danish ] = "Konturforløb" ;
+ Text [ italian ] = "Flusso di contorno" ;
+ Text [ spanish ] = "Ajustar al ~contorno" ;
+ Text [ french ] = "Adapter au ~contour" ;
+ Text [ dutch ] = "~Contourverloop" ;
+ Text[ chinese_simplified ] = "ÎÄ×ÖÁ÷¶ÔÓ¦ÂÖÀª(~A)";
+ Text[ russian ] = "~Âûðàâíèâàíèå ïî êîíòóðó";
+ Text[ polish ] = "Obieg konturu";
+ Text[ japanese ] = "—ÖŠs‚ɇ‚킹‚é(~A)";
+ Text[ chinese_traditional ] = "©M½ü¹ø¹ï»ô(~A)";
+ Text[ arabic ] = "ãáÇÁãÉ ááÎØ ÇáßÝÇÝí";
+ Text[ greek ] = "ÑïÞ ðåñé~ãñÜììáôïò";
+ Text[ korean ] = "À±°û¿¡ ¸ÂÃã(~A)";
+ Text[ turkish ] = "~Kontur akýþý";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_TEXT
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 38 ) ;
+ 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 ] = " ";
+ };
+ FixedText FT_LEFT
+ {
+ Pos = MAP_APPFONT ( 12 , 61 ) ;
+ Size = MAP_APPFONT ( 49 , 10 ) ;
+ Text = "~Links" ;
+ Text [ ENGLISH ] = "~Left" ;
+ Text [ english_us ] = "~Left" ;
+ Text [ italian ] = "A sinistra" ;
+ Text [ spanish ] = "~Izquierda" ;
+ Text [ french ] = "~À gauche" ;
+ Text [ dutch ] = "~Links" ;
+ Text [ swedish ] = "~Vänster" ;
+ 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 ] = "¦V¥ª(~L)";
+ Text[ arabic ] = "íÓÇÑ";
+ Text[ greek ] = "ÁñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ(~L)";
+ Text[ turkish ] = "~Sol";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_RIGHT
+ {
+ Pos = MAP_APPFONT ( 12 , 77 ) ;
+ Size = MAP_APPFONT ( 49 , 10 ) ;
+ Text = "~Rechts" ;
+ Text [ ENGLISH ] = "~Right" ;
+ Text [ english_us ] = "~Right" ;
+ Text [ italian ] = "A destra" ;
+ Text [ spanish ] = "~Derecha" ;
+ Text [ french ] = "~À droite" ;
+ Text [ dutch ] = "~Rechts" ;
+ Text [ swedish ] = "~Höger" ;
+ Text [ danish ] = "Højre" ;
+ Text [ portuguese_brazilian ] = "~Rechts" ;
+ Text [ portuguese ] = "~Direita" ;
+ Text[ chinese_simplified ] = "ÓÒ(~R)";
+ Text[ russian ] = "Ñïðàâà";
+ Text[ polish ] = "Z prawej";
+ Text[ japanese ] = "‰E(~R)";
+ Text[ chinese_traditional ] = "¦V¥k(~R)";
+ Text[ arabic ] = "íãíä";
+ Text[ greek ] = "ÄåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ(~R)";
+ Text[ turkish ] = "Sa~ð";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_TOP
+ {
+ Pos = MAP_APPFONT ( 12 , 93 ) ;
+ Size = MAP_APPFONT ( 49 , 10 ) ;
+ Text = "~Oben" ;
+ Text [ ENGLISH ] = "~Top" ;
+ Text [ english_us ] = "~Top" ;
+ Text [ italian ] = "In alto" ;
+ Text [ spanish ] = "Arri~ba" ;
+ Text [ french ] = "~En haut" ;
+ Text [ dutch ] = "~Boven" ;
+ Text [ swedish ] = "~Överkant" ;
+ Text [ danish ] = "Top" ;
+ Text [ portuguese_brazilian ] = "~Oben" ;
+ Text [ portuguese ] = "~Superior" ;
+ Text[ chinese_simplified ] = "ÉÏ(~T)";
+ Text[ russian ] = "Ââåðõó";
+ Text[ polish ] = "W górze";
+ Text[ japanese ] = "ã(~T)";
+ Text[ chinese_traditional ] = "¦V¤W(~T)";
+ Text[ arabic ] = "ÃÚáì";
+ Text[ greek ] = "ÐÜíù";
+ Text[ korean ] = "ˤ(~T)";
+ Text[ turkish ] = "~Üst";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_BOTTOM
+ {
+ Pos = MAP_APPFONT ( 12 , 109 ) ;
+ Size = MAP_APPFONT ( 49 , 10 ) ;
+ Text = "~Unten" ;
+ Text [ ENGLISH ] = "~Bottom" ;
+ Text [ english_us ] = "~Bottom" ;
+ Text [ italian ] = "In basso" ;
+ Text [ spanish ] = "A~bajo" ;
+ Text [ french ] = "En ~bas" ;
+ Text [ dutch ] = "~Onder" ;
+ Text [ swedish ] = "~Underkant" ;
+ Text [ danish ] = "Bund" ;
+ Text [ portuguese_brazilian ] = "~Unten" ;
+ Text [ portuguese ] = "~Inferior" ;
+ Text[ chinese_simplified ] = "ÏÂ(~B)";
+ Text[ russian ] = "Âíèçó";
+ Text[ polish ] = "W dole";
+ Text[ japanese ] = "‰º(~B)";
+ Text[ chinese_traditional ] = "¦V¤U(~B)";
+ Text[ arabic ] = "ÃÓÝá";
+ Text[ greek ] = "ÊÜôù";
+ Text[ korean ] = "¾Æ·¡(~B)";
+ Text[ turkish ] = "~Alt";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_LEFT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 65 , 59 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_RIGHT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 65 , 75 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ //Pos = MAP_APPFONT ( 50 , 72 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_TOP
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 65 , 91 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ //Pos = MAP_APPFONT ( 50 , 87 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_BOTTOM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 65 , 107 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ //Pos = MAP_APPFONT ( 50 , 102 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ };
+ GroupBox GRP_DISTANCE
+ {
+ Pos = MAP_APPFONT ( 6 , 45 ) ;
+ Size = MAP_APPFONT ( 113 , 84 ) ;
+ //Size = MAP_APPFONT ( 98 , 75 ) ;
+ Text = "Abstand vom Rahmen" ;
+ Text [ ENGLISH ] = "Distance from border" ;
+ Text [ english_us ] = "Spacing to borders" ;
+ Text [ italian ] = "Distanza dalla cornice" ;
+ Text [ spanish ] = "Distancia al marco" ;
+ Text [ french ] = "Écart du cadre" ;
+ Text [ dutch ] = "Afstand tot kader" ;
+ Text [ swedish ] = "Avstånd till ram" ;
+ Text [ danish ] = "Afstand fra rammen" ;
+ Text [ portuguese_brazilian ] = "Abstand vom Rahmen" ;
+ Text [ portuguese ] = "Espaço até moldura" ;
+ Text[ chinese_simplified ] = "Óë±ß¿òµÄ¾àÀë";
+ Text[ russian ] = "Ðàññòîÿíèå îò ðàìêè";
+ Text[ polish ] = "Odleg³oœæ od ramki";
+ Text[ japanese ] = "˜g‚©‚ç‚ÌŠÔŠu";
+ Text[ chinese_traditional ] = "Ãä®Øªº¶¡¹j";
+ Text[ arabic ] = "ÇáãÓÇÝÉ ÍÊì ÇáÅØÇÑ";
+ Text[ greek ] = "Áðüóôáóç áðü ðëáßóéï";
+ Text[ korean ] = "Å׵θ®¿ÍÀÇ °£°Ý";
+ Text[ turkish ] = "Çerçeveye uzaklýk";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_POSITION
+ {
+ HelpId = HID_TEXTATTR_CTL_POSITION ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 132 , 57 ) ;
+ Size = MAP_APPFONT ( 115 , 52 ) ;
+ TabStop = TRUE ;
+ };
+ TriStateBox TSB_FULL_WIDTH
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 132 , 112 ) ;
+ Size = MAP_APPFONT ( 115 , 12 ) ;
+ Text = "Ganze ~Breite" ;
+ Text [ ENGLISH ] = "Full ~width" ;
+ Text [ dutch ] = "Volle~dige breedte" ;
+ Text [ english_us ] = "Full ~width" ;
+ Text [ italian ] = "A tutta larghezza" ;
+ Text [ spanish ] = "Todo el a~ncho" ;
+ Text [ french ] = "Sur toute la ~largeur" ;
+ Text [ swedish ] = "Hel ~bredd" ;
+ Text [ danish ] = "Hele bredden" ;
+ Text [ portuguese ] = "~Largura toda" ;
+ Text [ portuguese_brazilian ] = "Ganze ~Breite" ;
+ Text[ chinese_simplified ] = "Õû¸ö¿í¶È(~W)";
+ Text[ russian ] = "Ïîëíàÿ øèðèíà";
+ Text[ polish ] = "Ca³a szerokoœæ";
+ Text[ japanese ] = "‘S•(~W)";
+ Text[ chinese_traditional ] = "¾ã­Ó¼e«×(~W)";
+ Text[ arabic ] = "ÇáÚÑÖ ßáå";
+ Text[ greek ] = "ÐëÞñåò ~ðëÜôïò";
+ Text[ korean ] = "Àüü ³Êºñ(~W)";
+ Text[ turkish ] = "Metni, ~nesne geniþliðine göre ayarla";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_POSITION
+ {
+ Pos = MAP_APPFONT ( 126 , 45 ) ;
+ Size = MAP_APPFONT ( 128 , 84 ) ;
+ Text = "Textverankerung" ;
+ Text [ ENGLISH ] = "Anchor text" ;
+ Text [ dutch ] = "Tekstverankering" ;
+ Text [ english_us ] = "Text anchor" ;
+ Text [ italian ] = "Ancoraggio testo" ;
+ Text [ spanish ] = "Anclaje del texto" ;
+ Text [ french ] = "Ancrage de texte" ;
+ Text [ swedish ] = "Textförankring" ;
+ Text [ danish ] = "Tekstforankring" ;
+ Text [ portuguese_brazilian ] = "Textverankerung" ;
+ Text [ portuguese ] = "Âncora do texto" ;
+ Text[ chinese_simplified ] = "ÎÄ×ÖËø¶¨";
+ Text[ russian ] = "Ïðèâÿçêà òåêñòà";
+ Text[ polish ] = "Zakotwiczenie tekstu";
+ Text[ japanese ] = "÷½Ä‚̱ݶ°";
+ Text[ chinese_traditional ] = "¤å¦rÂê©w";
+ Text[ arabic ] = "ãÑÓÇÉ ÇáäÕ";
+ Text[ greek ] = "Áãêýñùóç êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® À§Ä¡ °íÁ¤";
+ Text[ turkish ] = "Metin sabitleme";
+ Text[ language_user1 ] = " ";
+ };
+ 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 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/thesdlg.cxx b/svx/source/dialog/thesdlg.cxx
new file mode 100644
index 0000000000..4b74486b08
--- /dev/null
+++ b/svx/source/dialog/thesdlg.cxx
@@ -0,0 +1,515 @@
+/*************************************************************************
+ *
+ * $RCSfile: thesdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ---------------------------------------------------------------
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _APP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_LINGUISTIC_XMEANING_HPP_
+#include <com/sun/star/linguistic/XMeaning.hpp>
+#endif
+
+
+#define _SVX_THESDLG_CXX
+
+#include "thesdlg.hxx"
+#include "dlgutil.hxx"
+#include "dialmgr.hxx"
+#include "svxerr.hxx"
+
+#include "dialogs.hrc"
+#include "thesdlg.hrc"
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.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)
+// struct ThesDlg_Impl ---------------------------------------------------
+
+struct ThesDlg_Impl
+{
+ Reference< linguistic::XThesaurus > xThesaurus;
+ OUString aLookUpText;
+ sal_Int16 nLookUpLanguage;
+
+ ThesDlg_Impl(Reference< linguistic::XThesaurus > xThes);
+ SfxErrorContext* pErrContext; // ErrorContext,
+ // w"ahrend der Dialog oben ist
+};
+
+ThesDlg_Impl::ThesDlg_Impl(Reference< linguistic::XThesaurus > xThes) :
+ xThesaurus (xThes)
+{
+ pErrContext = NULL;
+ nLookUpLanguage = LANGUAGE_NONE;
+}
+
+
+// class SvxThesaurusLanguageDlg_Impl ------------------------------------
+
+class SvxThesaurusLanguageDlg_Impl : public ModalDialog
+{
+private:
+ ListBox aLangLB;
+ GroupBox aLangBox;
+ OKButton aOKBtn;
+ CancelButton aCancelBtn;
+ HelpButton aHelpBtn;
+
+ Reference< linguistic::XThesaurus > xThesaurus;
+ uno::Sequence< lang::Locale > aSuppLang; // supported languages
+
+ DECL_LINK( DoubleClickHdl_Impl, ListBox * );
+
+public:
+ SvxThesaurusLanguageDlg_Impl( Window* pParent );
+
+ sal_uInt16 GetLanguage() const;
+ void SetLanguage( sal_uInt16 nLang );
+};
+
+// -----------------------------------------------------------------------
+
+
+SvxThesaurusLanguageDlg_Impl::SvxThesaurusLanguageDlg_Impl( Window* pParent ) :
+
+ ModalDialog( pParent, SVX_RES( RID_SVXDLG_THES_LANGUAGE ) ),
+
+ aLangLB ( this, ResId( LB_THES_LANGUAGE ) ),
+ aLangBox ( this, ResId( GB_THES_LANGUAGE ) ),
+ aOKBtn ( this, ResId( BTN_LANG_OK ) ),
+ aCancelBtn ( this, ResId( BTN_LANG_CANCEL ) ),
+ aHelpBtn ( this, ResId( BTN_LANG_HELP ) )
+{
+ FreeResource();
+
+ aLangLB.SetDoubleClickHdl(
+ LINK( this, SvxThesaurusLanguageDlg_Impl, DoubleClickHdl_Impl ) );
+
+ // Sprachen-Box initialisieren
+ SvxThesaurusDialog *pMyParentDlg = (SvxThesaurusDialog *) pParent;
+ xThesaurus = pMyParentDlg->pImpl->xThesaurus;
+ if (xThesaurus.is())
+ aSuppLang = xThesaurus->getLocales();
+
+ const sal_Int32 nLangCount = aSuppLang.getLength();
+ const lang::Locale *pLocale = aSuppLang.getConstArray();
+ for ( sal_Int32 i = 0; i < nLangCount; ++i )
+ {
+ sal_Int16 nLang = SvxLocaleToLanguage( pLocale[i] );
+ if (nLang != LANGUAGE_NONE)
+ {
+ sal_uInt16 nPos = aLangLB.InsertEntry( ::GetLanguageString( nLang ) );
+ aLangLB.SetEntryData( nPos, (void*)(sal_uInt32)i );
+ }
+ }
+}
+
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxThesaurusLanguageDlg_Impl::GetLanguage() const
+{
+ sal_uInt16 nLPos = aLangLB.GetSelectEntryPos();
+ sal_uInt16 nLang = (sal_uInt16)(sal_uInt32)aLangLB.GetEntryData(nLPos);
+
+ DBG_ASSERT(nLang < (sal_uInt16) aSuppLang.getLength(), "index out of range");
+ return SvxLocaleToLanguage( aSuppLang.getConstArray()[ nLang ] );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxThesaurusLanguageDlg_Impl::SetLanguage( sal_uInt16 nLang )
+{
+
+ sal_uInt16 nPos = -1;
+ const lang::Locale *pLocale = aSuppLang.getConstArray();
+ sal_Int32 nLocaleCount = aSuppLang.getLength();
+ for (sal_Int32 i = 0; i < nLocaleCount; i++)
+ {
+ if (SvxLocaleToLanguage( pLocale[i] ) == nLang)
+ break;
+ }
+ DBG_ASSERT(nPos != -1, "Sprache nicht gefunden");
+ nPos = i;
+
+ for (i = 0; i < aLangLB.GetEntryCount(); ++i )
+ {
+ if ( (sal_uInt16)(sal_uInt32)aLangLB.GetEntryData(i) == nPos )
+ {
+ aLangLB.SelectEntryPos(i);
+ break;
+ }
+ }
+
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxThesaurusLanguageDlg_Impl, DoubleClickHdl_Impl, ListBox *, EMPTYARG )
+{
+ EndDialog( RET_OK );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxThesaurusLanguageDlg_Impl, DoubleClickHdl_Impl, ListBox *, EMPTYARG )
+
+// class SvxThesaurusDialog ----------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+SvxThesaurusDialog::SvxThesaurusDialog( Window* pParent, Reference< linguistic::XThesaurus > xThes,
+ const String &rWord, sal_Int16 nLanguage) :
+
+ SvxStandardDialog( pParent, SVX_RES( RID_SVXDLG_THESAURUS ) ),
+
+ aWordText ( this, ResId( FT_WORD ) ),
+ aWordLB ( this, ResId( LB_WORD ) ),
+ aReplaceText( this, ResId( FT_REPL ) ),
+ aReplaceEdit( this, ResId( ED_REPL ) ),
+ aMeanText ( this, ResId( FT_MEAN ) ),
+ aMeanLB ( this, ResId( LB_MEAN ) ),
+ aSynonymText( this, ResId( FT_SYNON ) ),
+ aSynonymLB ( this, ResId( LB_SYNON ) ),
+ aVarBox ( this, ResId( GB_VAR ) ),
+ aOkBtn ( this, ResId( BTN_THES_OK ) ),
+ aCancelBtn ( this, ResId( BTN_THES_CANCEL ) ),
+ aLookUpBtn ( this, ResId( BTN_LOOKUP ) ),
+ aLangBtn ( this, ResId( BTN_LANGUAGE ) ),
+ aHelpBtn ( this, ResId( BTN_THES_HELP ) ),
+ aErrStr ( ResId( STR_ERR_WORDNOTFOUND ) )
+{
+ pImpl = new ThesDlg_Impl( xThes );
+ pImpl->aLookUpText = ::rtl::OUString( rWord );
+ pImpl->nLookUpLanguage = nLanguage;
+ pImpl->pErrContext =
+ new SfxErrorContext( ERRCTX_SVX_LINGU_THESAURUS, String(), this,
+ RID_SVXERRCTX, DIALOG_MGR() );
+
+ aLangBtn.SetClickHdl( LINK( this, SvxThesaurusDialog, LanguageHdl_Impl ) );
+ aLookUpBtn.SetClickHdl( LINK( this, SvxThesaurusDialog, LookUpHdl_Impl ) );
+ aMeanLB.SetSelectHdl( LINK( this, SvxThesaurusDialog, EntryHdl_Impl ) );
+ aSynonymLB.SetSelectHdl( LINK( this, SvxThesaurusDialog, SynonymHdl_Impl ) );
+ Link aLink = LINK( this, SvxThesaurusDialog, SelectHdl_Impl );
+ aMeanLB.SetDoubleClickHdl( aLink );
+ aSynonymLB.SetDoubleClickHdl( aLink );
+ aWordLB.SetSelectHdl( aLink );
+
+ FreeResource();
+
+ aReplaceEdit.SetText( rWord );
+ aWordLB.InsertEntry( rWord );
+ aWordLB.SelectEntry( rWord );
+
+ Init_Impl( nLanguage );
+
+ // disable controls if service is missing
+ if (!pImpl->xThesaurus.is())
+ Enable( sal_False );
+}
+
+
+// -----------------------------------------------------------------------
+
+SvxThesaurusDialog::~SvxThesaurusDialog()
+{
+ delete pImpl->pErrContext;
+ delete pImpl;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxThesaurusDialog::GetLanguage() const
+{
+ return pImpl->nLookUpLanguage;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxThesaurusDialog::UpdateMeaningBox_Impl( uno::Sequence< Reference< linguistic::XMeaning > > *pMeaningSeq )
+{
+ // create temporary meaning list if not supplied from somewhere else
+ sal_Bool bTmpSeq = sal_False;
+ if (!pMeaningSeq && pImpl->xThesaurus.is())
+ {
+ bTmpSeq = sal_True;
+ lang::Locale aLocale( SvxCreateLocale( pImpl->nLookUpLanguage ) );
+ uno::Sequence< Reference< XMeaning > > aTmpMean = pImpl->xThesaurus
+ ->queryMeanings( pImpl->aLookUpText, aLocale );
+
+
+ pMeaningSeq = new Sequence< Reference< XMeaning > > ( aTmpMean );
+ }
+
+ sal_Int32 nMeaningCount = pMeaningSeq ? pMeaningSeq->getLength() : 0;
+ const Reference< linguistic::XMeaning > *pMeaning = pMeaningSeq ? pMeaningSeq->getConstArray() : NULL;
+ aMeanLB.Clear();
+ for ( sal_Int32 i = 0; i < nMeaningCount; ++i )
+ aMeanLB.InsertEntry( pMeaning[i]->getMeaning() );
+
+ // remove temporary meaning list
+ if (bTmpSeq)
+ delete pMeaningSeq;
+
+ if (aMeanLB.GetEntryCount() > 0)
+ aMeanLB.SelectEntryPos(0);
+ UpdateSynonymBox_Impl();
+}
+
+
+// -----------------------------------------------------------------------
+void SvxThesaurusDialog::UpdateSynonymBox_Impl()
+{
+
+ aSynonymLB.Clear();
+
+ sal_uInt16 nPos = aMeanLB.GetSelectEntryPos(); // active meaning pos
+ if (nPos != LISTBOX_ENTRY_NOTFOUND && pImpl->xThesaurus.is())
+ {
+ // get Reference< linguistic::XMeaning > for selected meaning
+ lang::Locale aLocale( SvxCreateLocale( pImpl->nLookUpLanguage ) );
+ Reference< linguistic::XMeaning > xMeaning =
+ pImpl->xThesaurus->queryMeanings(pImpl->aLookUpText, aLocale )
+ .getConstArray()[ nPos ];
+
+ uno::Sequence< OUString > aSynonyms;
+ if (xMeaning.is())
+ aSynonyms = xMeaning->querySynonyms();
+
+ sal_Int32 nSynonymCount = aSynonyms.getLength();
+ const OUString *pSynonym = aSynonyms.getConstArray();
+ for ( sal_Int32 i=0; i < nSynonymCount; ++i )
+ aSynonymLB.InsertEntry( pSynonym[i] );
+ }
+
+}
+
+// -----------------------------------------------------------------------
+
+void SvxThesaurusDialog::Apply()
+{
+}
+
+// -----------------------------------------------------------------------
+void SvxThesaurusDialog::Init_Impl(sal_Int16 nLanguage)
+{
+ // Sprache anpassen
+ String aStr( GetText() );
+ aStr.Erase( aStr.Search( sal_Unicode( '(' ) ) - 1 );
+ aStr.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) ) );
+ //aStr += GetLanguageString( (LanguageType)pImpl->pThesaurus->GetLanguage() );
+ aStr += GetLanguageString( (LanguageType) nLanguage );
+ aStr.Append( sal_Unicode( ')' ) );
+ SetText( aStr ); // Text der Window-Leiste setzen (Wort + Sprache)
+
+ // adapt meanings according to (new) language
+ UpdateMeaningBox_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxThesaurusDialog, LookUpHdl_Impl, Button *, pBtn )
+{
+
+ EnterWait();
+
+ String aText( aReplaceEdit.GetText() );
+
+ OUString aOldLookUpText = pImpl->aLookUpText;
+ pImpl->aLookUpText = ::rtl::OUString( aText );
+
+ uno::Sequence< Reference< linguistic::XMeaning > > aMeanings;
+ if (pImpl->xThesaurus.is())
+ aMeanings = pImpl->xThesaurus->queryMeanings(
+ pImpl->aLookUpText,
+ SvxCreateLocale( pImpl->nLookUpLanguage ) );
+
+ LeaveWait();
+ if ( aMeanings.getLength() == 0 )
+ {
+ if( pBtn == &aCancelBtn ) // called via double click
+ {
+ pImpl->aLookUpText = aOldLookUpText;
+ }
+ else
+ {
+ UpdateMeaningBox_Impl( &aMeanings );
+ if( pBtn == &aLookUpBtn )
+ InfoBox( this, aErrStr ).Execute();
+ }
+ return 0;
+ }
+
+ UpdateMeaningBox_Impl( &aMeanings );
+
+ if ( aWordLB.GetEntryPos( aText ) == LISTBOX_ENTRY_NOTFOUND )
+ aWordLB.InsertEntry( aText );
+
+ aWordLB.SelectEntry( aText );
+ aMeanLB.SelectEntryPos( 0 );
+
+ String aStr( aMeanLB.GetSelectEntry() );
+ aStr = aStr.Erase( 0, aStr.Search( sal_Unicode( '*' ) ) ); // '*' follows an IPR synonym
+ // that has crossreferences
+ aStr = aStr.Erase( 0, aStr.Search( sal_Unicode( '(' ) ) );
+ aReplaceEdit.SetText( aStr );
+ aSynonymLB.SetNoSelection();
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxThesaurusDialog, LanguageHdl_Impl, Button *, EMPTYARG )
+{
+ if (!pImpl->xThesaurus.is())
+ return 0;
+
+ SvxThesaurusLanguageDlg_Impl aDlg( this );
+ sal_uInt16 nLang = pImpl->nLookUpLanguage;
+ aDlg.SetLanguage( nLang );
+
+ if ( aDlg.Execute() == RET_OK )
+ {
+ nLang = aDlg.GetLanguage();
+ if (pImpl->xThesaurus->hasLocale( SvxCreateLocale( nLang ) ))
+ pImpl->nLookUpLanguage = nLang;
+ UpdateMeaningBox_Impl();
+ Init_Impl( nLang );
+ }
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxThesaurusDialog, SynonymHdl_Impl, ListBox *, EMPTYARG )
+{
+ if ( aSynonymLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ String aStr( aSynonymLB.GetSelectEntry() );
+ aStr = aStr.Erase( 0, aStr.Search( sal_Unicode( '*' ) ) );
+ aStr = aStr.Erase( 0, aStr.Search( sal_Unicode( '(' ) ) );
+ aReplaceEdit.SetText( aStr );
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxThesaurusDialog, SelectHdl_Impl, ListBox *, pBox )
+{
+ String aStr( pBox->GetSelectEntry() );
+ //aStr = aStr.Cut( 0, aStr.Search( '*' ) );
+ //aStr = aStr.Cut( 0, aStr.Search( '(' ) );
+ aReplaceEdit.SetText( aStr );
+
+ //! 'aCancelBtn' is used to indicate that the handler is called as result
+ //! of a double click action.
+ LookUpHdl_Impl( &aCancelBtn /* ??? &aLookUpBtn */ );
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxThesaurusDialog, EntryHdl_Impl, ListBox *, EMPTYARG )
+{
+
+ UpdateSynonymBox_Impl();
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxThesaurusDialog, SpellErrorHdl_Impl, void *, pError )
+{
+ // Der "ubergebene Pointer pError ist die falsche Sprachen-Nummer
+ LanguageType eLang = (LanguageType)(sal_uInt32)pError;
+ String aErr( ::GetLanguageString( eLang ) );
+ // Fehlermeldung ausgeben
+ ErrorHandler::HandleError(
+ *new StringErrorInfo( ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aErr ) );
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/thesdlg.hrc b/svx/source/dialog/thesdlg.hrc
new file mode 100644
index 0000000000..1c666ae756
--- /dev/null
+++ b/svx/source/dialog/thesdlg.hrc
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * $RCSfile: thesdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_THESDLG_HRC
+#define _SVX_THESDLG_HRC
+
+// defines ---------------------------------------------------------------
+
+#define BTN_THES_OK 10
+#define BTN_THES_CANCEL 11
+#define BTN_LANGUAGE 12
+#define BTN_THES_HELP 13
+#define BTN_LOOKUP 14
+#define FT_WORD 15
+#define LB_WORD 16
+#define FT_MEAN 17
+#define LB_MEAN 18
+#define FT_SYNON 19
+#define LB_SYNON 20
+#define FT_REPL 21
+#define ED_REPL 22
+#define GB_VAR 23
+
+#define STR_ERR_WORDNOTFOUND 30
+
+// LanguageDialog --------------------------------------------------------
+
+#define LB_THES_LANGUAGE 10
+#define GB_THES_LANGUAGE 11
+#define BTN_LANG_OK 12
+#define BTN_LANG_CANCEL 12
+#define BTN_LANG_HELP 13
+
+
+#endif
+
diff --git a/svx/source/dialog/thesdlg.src b/svx/source/dialog/thesdlg.src
new file mode 100644
index 0000000000..a6c7745cdb
--- /dev/null
+++ b/svx/source/dialog/thesdlg.src
@@ -0,0 +1,448 @@
+/*************************************************************************
+ *
+ * $RCSfile: thesdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "thesdlg.hrc"
+#include "helpid.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_THES -------------------------------------------------------
+ModalDialog RID_SVXDLG_THESAURUS
+{
+ HelpId = SID_THESAURUS ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 285 , 116 ) ;
+ Text = "Thesaurus" ;
+ Text [ English ] = "Thesaurus" ;
+ Text [ norwegian ] = "Synonymordliste" ;
+ Text [ italian ] = "Sinonimi" ;
+ Text [ portuguese_brazilian ] = "Thesaurus" ;
+ Text [ portuguese ] = "Sinónimos" ;
+ Text [ finnish ] = "Synonyymisanasto" ;
+ Text [ danish ] = "Synonymordbog" ;
+ Text [ french ] = "Dictionnaire des synonymes" ;
+ Text [ swedish ] = "Synonymordlista" ;
+ Text [ dutch ] = "Thesaurus" ;
+ Text [ spanish ] = "Diccionario de sinónimos" ;
+ Text [ english_us ] = "Thesaurus" ;
+ Moveable = TRUE ;
+ SvLook = TRUE ;
+ OkButton BTN_THES_OK
+ {
+ Pos = MAP_APPFONT ( 219 , 6 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_THES_CANCEL
+ {
+ Pos = MAP_APPFONT ( 219 , 23 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ };
+ PushButton BTN_LOOKUP
+ {
+ Pos = MAP_APPFONT ( 219 , 40 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text = "~Nachschlagen" ;
+ Text [ English ] = "~Search" ;
+ Text [ norwegian ] = "~Søke" ;
+ Text [ italian ] = "~Cerca" ;
+ Text [ portuguese_brazilian ] = "~Buscar" ;
+ Text [ portuguese ] = "~Procurar" ;
+ Text [ finnish ] = "~Etsi" ;
+ Text [ danish ] = "Slå op" ;
+ Text [ french ] = "~Rechercher" ;
+ Text [ swedish ] = "~Slå upp" ;
+ Text [ dutch ] = "~Opzoeken" ;
+ Text [ spanish ] = "~Buscar" ;
+ Text [ english_us ] = "~Search" ;
+ Text[ chinese_simplified ] = "²éÑ°(~S)";
+ Text[ russian ] = "Ïîèñê";
+ Text[ polish ] = "Szukaj";
+ Text[ japanese ] = "ŒŸõ(~S)";
+ Text[ chinese_traditional ] = "¬d´M(~S)";
+ Text[ arabic ] = "ÈÍË";
+ Text[ greek ] = "Á~íáæÞôçóç";
+ Text[ korean ] = "ã¾Æ º¸±â(~S)";
+ Text[ turkish ] = "A~ra";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_LANGUAGE
+ {
+ Pos = MAP_APPFONT ( 219 , 57 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text = "S~prache..." ;
+ Text [ English ] = "~Language..." ;
+ Text [ english_us ] = "~Language..." ;
+ Text [ dutch ] = "~Taal..." ;
+ Text [ italian ] = "Lingua..." ;
+ Text [ spanish ] = "~Idioma..." ;
+ Text [ french ] = "~Langue..." ;
+ Text [ swedish ] = "S~pråk..." ;
+ Text [ danish ] = "Sprog..." ;
+ Text [ portuguese ] = "Lí~ngua..." ;
+ Text [ portuguese_brazilian ] = "S~prache..." ;
+ Text[ chinese_simplified ] = "ÓïÑÔ(~L)...";
+ Text[ russian ] = "ßçûê...";
+ Text[ polish ] = "Jêzyk...";
+ Text[ japanese ] = "Œ¾Œê(~L)...";
+ Text[ chinese_traditional ] = "»y¨¥(~L)...";
+ Text[ arabic ] = "ÇááÛÉ...";
+ Text[ greek ] = "Ãëþóóá...";
+ Text[ korean ] = "¾ð¾î(~L)...";
+ Text[ turkish ] = "D~il...";
+ Text[ language_user1 ] = " ";
+ };
+ HelpButton BTN_THES_HELP
+ {
+ Pos = MAP_APPFONT ( 219 , 77 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ };
+ FixedText FT_WORD
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 96 , 10 ) ;
+ Text = "~Wort" ;
+ Text [ English ] = "~Word" ;
+ Text [ norwegian ] = "~Ord" ;
+ 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" ;
+ LEFT = TRUE ;
+ Text[ chinese_simplified ] = "´Ê(~W)";
+ Text[ russian ] = "Ñëîâî";
+ Text[ polish ] = "S³owo";
+ Text[ japanese ] = "’PŒê(~W)";
+ Text[ chinese_traditional ] = "µü(~W)";
+ Text[ arabic ] = "ÇáßáãÉ";
+ Text[ greek ] = "ËÝîç";
+ Text[ korean ] = "´Ü¾î(~W)";
+ Text[ turkish ] = "~Sözcük";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_WORD
+ {
+ DropDown = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
+ Size = MAP_APPFONT ( 96 , 63 ) ;
+ };
+ FixedText FT_MEAN
+ {
+ Pos = MAP_APPFONT ( 12 , 43 ) ;
+ Size = MAP_APPFONT ( 96 , 10 ) ;
+ Text = "~Bedeutung " ;
+ Text [ English ] = "~Meaning" ;
+ Text [ norwegian ] = "~Mening" ;
+ Text [ italian ] = "~Significato " ;
+ Text [ portuguese_brazilian ] = "~Significado " ;
+ Text [ portuguese ] = "~Significado " ;
+ Text [ finnish ] = "~Merkitys" ;
+ Text [ danish ] = "Betydning " ;
+ Text [ french ] = "~Signification " ;
+ Text [ swedish ] = "~Betydelse " ;
+ Text [ dutch ] = "~Betekenis " ;
+ Text [ spanish ] = "~Significado " ;
+ Text [ english_us ] = "~Meaning " ;
+ LEFT = TRUE ;
+ Text[ chinese_simplified ] = "º¬Òå(~M) ";
+ Text[ russian ] = "Çíà÷åíèå ";
+ Text[ polish ] = "Znaczenie ";
+ Text[ japanese ] = "Œê‹`(~M)";
+ Text[ chinese_traditional ] = "§t¸q(~M)";
+ Text[ arabic ] = "ÇáãÚäì ";
+ Text[ greek ] = "¸~ííïéá ";
+ Text[ korean ] = "ÀÇ¹Ì (~M)";
+ Text[ turkish ] = "~Anlamý ";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_MEAN
+ {
+ BORDER = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 56 ) ;
+ Size = MAP_APPFONT ( 96 , 48 ) ;
+ AutoHScroll = TRUE ;
+ };
+ FixedText FT_SYNON
+ {
+ Pos = MAP_APPFONT ( 111 , 43 ) ;
+ Size = MAP_APPFONT ( 96 , 10 ) ;
+ Text = "~Synonym" ;
+ Text [ English ] = "Sy~nonym" ;
+ Text [ norwegian ] = "Sy~nonym" ;
+ Text [ italian ] = "Si~nonimo" ;
+ Text [ portuguese_brazilian ] = "Si~nänimo" ;
+ Text [ portuguese ] = "Si~nónimo" ;
+ Text [ finnish ] = "~Synonyymi" ;
+ Text [ danish ] = "Synonym" ;
+ Text [ french ] = "S~ynonyme" ;
+ Text [ swedish ] = "Sy~nonym" ;
+ Text [ dutch ] = "Sy~noniem" ;
+ Text [ spanish ] = "Si~nónimo" ;
+ Text [ english_us ] = "Sy~nonym" ;
+ LEFT = TRUE ;
+ Text[ chinese_simplified ] = "ͬÒå´Ê(~N)";
+ Text[ russian ] = "Ñèíîíèì";
+ Text[ polish ] = "Synonim";
+ Text[ japanese ] = "—Þ‹`Œê(~N)";
+ Text[ chinese_traditional ] = "¦P¸qµü(~N)";
+ Text[ arabic ] = "ÇáãÑÇÏÝ";
+ Text[ greek ] = "~Óõíþíõìï";
+ Text[ korean ] = "µ¿ÀǾî(~N)";
+ Text[ turkish ] = "~Eþanlamlý";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_SYNON
+ {
+ BORDER = TRUE ;
+ Pos = MAP_APPFONT ( 111 , 56 ) ;
+ Size = MAP_APPFONT ( 96 , 48 ) ;
+ AutoHScroll = TRUE ;
+ };
+ FixedText FT_REPL
+ {
+ Pos = MAP_APPFONT ( 111 , 14 ) ;
+ Size = MAP_APPFONT ( 96 , 10 ) ;
+ Text = "~Ersetzen" ;
+ Text [ English ] = "R~eplace" ;
+ Text [ norwegian ] = "E~statte" ;
+ Text [ italian ] = "Sostituisci" ;
+ Text [ portuguese_brazilian ] = "S~ubstituir" ;
+ Text [ portuguese ] = "S~ubstituir" ;
+ Text [ finnish ] = "~Korvaa" ;
+ Text [ danish ] = "Erstat" ;
+ Text [ french ] = "R~emplacer par" ;
+ Text [ swedish ] = "~Ersätt" ;
+ Text [ dutch ] = "~Vervangen" ;
+ Text [ spanish ] = "~Reemplazar" ;
+ Text [ english_us ] = "~Replace" ;
+ LEFT = TRUE ;
+ Text[ chinese_simplified ] = "¸üÌæ(~R)";
+ Text[ russian ] = "Çàìåíèòü";
+ Text[ polish ] = "Zamieñ";
+ Text[ japanese ] = "’uŠ·(~R)";
+ Text[ chinese_traditional ] = "´À¥N(~R)";
+ Text[ arabic ] = "ÇÓÊÈÏÇá";
+ Text[ greek ] = "ÁíôéêáôÜóôáóç";
+ Text[ korean ] = "´ëü(~R)";
+ Text[ turkish ] = "~Deðiþtir";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_REPL
+ {
+ BORDER = TRUE ;
+ Pos = MAP_APPFONT ( 111 , 27 ) ;
+ Size = MAP_APPFONT ( 96 , 12 ) ;
+ LEFT = TRUE ;
+ };
+ GroupBox GB_VAR
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 207 , 107 ) ;
+ Text = "Variationen" ;
+ Text [ English ] = "Variations" ;
+ Text [ norwegian ] = "Variasjoner" ;
+ Text [ italian ] = "Alternative" ;
+ Text [ portuguese_brazilian ] = "Variaçäes" ;
+ Text [ portuguese ] = "Alternativas" ;
+ Text [ finnish ] = "Muunnelmat" ;
+ Text [ danish ] = "Variationer" ;
+ Text [ french ] = "Suggestions" ;
+ Text [ swedish ] = "Variationer" ;
+ Text [ dutch ] = "Variaties" ;
+ Text [ spanish ] = "Variaciones" ;
+ Text [ english_us ] = "Variations" ;
+ Text[ chinese_simplified ] = "ÁíÑ¡×Ö´Ê";
+ Text[ russian ] = "Âàðèàíòû";
+ Text[ polish ] = "Odmiany";
+ Text[ japanese ] = "ÊÞØ´°¼®Ý";
+ Text[ chinese_traditional ] = "¥t¿ï¦rµü";
+ Text[ arabic ] = "ÊÛííÑÇÊ";
+ Text[ greek ] = "ÐáñáëëáãÝò";
+ Text[ korean ] = "º¯Çü";
+ Text[ turkish ] = "Varyasyonlar";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_ERR_WORDNOTFOUND
+ {
+ Text = "Wort nicht im Thesaurus enthalten" ;
+ Text [ ENGLISH ] = "Word not found in Thesaurus" ;
+ Text [ norwegian ] = "Ordet finnes ikke I Synonymorlisten" ;
+ Text [ italian ] = "Parola non trovata nel dizionario dei sinonimi" ;
+ Text [ portuguese_brazilian ] = "Palavra nÆo encontrada no Thesaurus" ;
+ Text [ portuguese ] = "Palavra não se encontra no dicionário de sinónimos." ;
+ Text [ finnish ] = "Sanaa ei ole synonyymisanastossa" ;
+ Text [ danish ] = "Ordet findes ikke i synonymordbogen" ;
+ Text [ french ] = "Mot ne figurant pas dans le dictionnaire des synonymes" ;
+ Text [ swedish ] = "Ordet finns inte i synonymordlistan" ;
+ Text [ dutch ] = "Woord niet gevonden in de Thesaurus" ;
+ Text [ spanish ] = "Palabra no figura en el dic. de sinónimos" ;
+ Text [ english_us ] = "Word not found in thesaurus" ;
+ Text[ chinese_simplified ] = "×Ö´ÊûÓÐÊÕ¼ÔڴʵäÄÚ";
+ Text[ russian ] = "Ñëîâî íå ñîäåðæèòñÿ â òåçàóðóñå";
+ Text[ polish ] = "S³owa nie ma w Tezaurusie";
+ Text[ japanese ] = "—Þ‹`ŒêŽ«“T‚É‚È‚¢’PŒê‚Å‚·";
+ Text[ chinese_traditional ] = "¦rµü¨S¦³¦¬¿ý¦bµü¨å¤º";
+ Text[ arabic ] = "ÇáßáãÉ ÛíÑ ãæÌæÏÉ Ýí ÞÇãæÓ ÇáãÑÇÏÝÇÊ";
+ Text[ greek ] = "Ç ëÝîç äåí âñÝèçêå óôïí èçóáõñü ëÝîåùí";
+ Text[ korean ] = "µ¿ÀÇ¾î »çÀü¿¡ ¾ø´Â ´Ü¾îÀÓ";
+ Text[ turkish ] = "Sözcük, sözlükte bulunamadý";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "´Êµä";
+ Text[ russian ] = "Òåçàóðóñ";
+ Text[ polish ] = "Tezaurus";
+ Text[ japanese ] = "—Þ‹`ŒêŽ«“T";
+ Text[ chinese_traditional ] = "µü¨å";
+ Text[ arabic ] = "ÞÇãæÓ ÇáãÑÇÏÝÇÊ";
+ Text[ greek ] = "Èçóáõñüò ëÝîåùí";
+ Text[ korean ] = "µ¿ÀÇ¾î »çÀü";
+ Text[ turkish ] = "Eþanlamlýlar sözlüðü";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXDLG_THES_LANGUAGE ----------------------------------------------
+ModalDialog RID_SVXDLG_THES_LANGUAGE
+{
+ HelpId = HID_THES_LANGUAGE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 170 , 86 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Sprache auswählen : Sprache auswõhlen */
+ /* ### ACHTUNG: Neuer Text in Resource? Sprache auswählen : Sprache auswõhlen */
+ Text = "Sprache auswählen" ;
+ Text [ English ] = "Choose language" ;
+ Text [ english_us ] = "Select Language" ;
+ Text [ dutch ] = "Taal kiezen" ;
+ Text [ italian ] = "Seleziona lingua" ;
+ Text [ spanish ] = "Seleccionar idioma" ;
+ Text [ french ] = "Sélection de la langue" ;
+ Text [ swedish ] = "Välj språk" ;
+ Text [ danish ] = "Vælg sprog" ;
+ Text [ portuguese_brazilian ] = "Sprache auswählen" ;
+ Text [ portuguese ] = "Seleccionar língua" ;
+ Moveable = TRUE ;
+ ListBox LB_THES_LANGUAGE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 90 , 60 ) ;
+ Sort = TRUE ;
+ };
+ GroupBox GB_THES_LANGUAGE
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 102 , 77 ) ;
+ Text = "Auswahl" ;
+ Text [ English ] = "Choice" ;
+ Text [ english_us ] = "Selection" ;
+ Text [ dutch ] = "Selectie" ;
+ Text [ italian ] = "Scelta" ;
+ Text [ spanish ] = "Selección" ;
+ Text [ french ] = "Langues installées" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Udvalg" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ Text [ portuguese ] = "Selecção" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûáîð";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÇáÇÎÊíÇÑ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçim";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_LANG_OK
+ {
+ Pos = MAP_APPFONT ( 114 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_LANG_CANCEL
+ {
+ Pos = MAP_APPFONT ( 114 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BTN_LANG_HELP
+ {
+ Pos = MAP_APPFONT ( 114 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ Text[ chinese_simplified ] = "Ñ¡ÔñÓïÑÔ";
+ Text[ russian ] = "Âûáîð ÿçûêà";
+ Text[ polish ] = "Wybierz jêzyk";
+ Text[ japanese ] = "Œ¾Œê‚Ì‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü»y¨¥";
+ Text[ arabic ] = "ÇÎÊíÇÑ ÇááÛÉ";
+ Text[ greek ] = "ÅðéëïãÞ ãëþóóáò";
+ Text[ korean ] = "¾ð¾î ¼±ÅÃ";
+ Text[ turkish ] = "Dil seçimi";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/tparea.cxx b/svx/source/dialog/tparea.cxx
new file mode 100644
index 0000000000..a4b2f39d30
--- /dev/null
+++ b/svx/source/dialog/tparea.cxx
@@ -0,0 +1,2564 @@
+/*************************************************************************
+ *
+ * $RCSfile: tparea.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _URLOBJ_HXX
+#include <tools/urlobj.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_TPAREA_CXX
+
+#if defined (MAC) || defined (UNX) || defined (WTC) || defined (ICC) || defined(WNT)
+#include <stdlib.h>
+#endif
+
+#include "xpool.hxx"
+#include "dialogs.hrc"
+#include "tabarea.hrc"
+#include "dlgname.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_GRADIENT_LIST SID_GRADIENT_LIST
+#define ITEMID_HATCH_LIST SID_HATCH_LIST
+#define ITEMID_BITMAP_LIST SID_BITMAP_LIST
+
+#include "xflbckit.hxx"
+
+#include "svdattr.hxx"
+#include "xoutx.hxx"
+#include "xtable.hxx"
+#include "xlineit0.hxx"
+
+#include "drawitem.hxx"
+#include "tabarea.hxx"
+#include "dlgname.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+#define DLGWIN this->GetParent()->GetParent()
+
+// static ----------------------------------------------------------------
+
+static USHORT pAreaRanges[] =
+{
+ XATTR_GRADIENTSTEPCOUNT,
+ XATTR_GRADIENTSTEPCOUNT,
+ SID_ATTR_FILL_STYLE,
+ SID_ATTR_FILL_BITMAP,
+ 0
+};
+
+static USHORT pTransparenceRanges[] =
+{
+ XATTR_FILLTRANSPARENCE,
+ XATTR_FILLTRANSPARENCE,
+ SDRATTR_SHADOWTRANSPARENCE,
+ SDRATTR_SHADOWTRANSPARENCE,
+ XATTR_FILLFLOATTRANSPARENCE,
+ XATTR_FILLFLOATTRANSPARENCE,
+ 0
+};
+
+/*************************************************************************
+|*
+|* Dialog for transparence
+|*
+\************************************************************************/
+
+IMPL_LINK(SvxTransparenceTabPage, ClickTransOffHdl_Impl, void *, EMPTYARG)
+{
+ // disable all other controls
+ ActivateLinear(FALSE);
+ ActivateGradient(FALSE);
+
+ // Preview
+ rXFSet.ClearItem (XATTR_FILLTRANSPARENCE);
+ rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE);
+ XOut.SetFillAttr( aXFillAttr );
+
+ InvalidatePreview( FALSE );
+
+ return( 0L );
+}
+
+IMPL_LINK(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, void *, EMPTYARG)
+{
+ // enable linear, disable other
+ ActivateLinear(TRUE);
+ ActivateGradient(FALSE);
+
+ // preview
+ rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE);
+ ModifyTransparentHdl_Impl (NULL);
+
+ return( 0L );
+}
+
+IMPL_LINK(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, void *, EMPTYARG)
+{
+ // enable gradient, disable other
+ ActivateLinear(FALSE);
+ ActivateGradient(TRUE);
+
+ // preview
+ rXFSet.ClearItem (XATTR_FILLTRANSPARENCE);
+ ModifiedTrgrHdl_Impl (NULL);
+
+ return( 0L );
+}
+
+void SvxTransparenceTabPage::ActivateLinear(BOOL bActivate)
+{
+ aMtrTransparent.Enable(bActivate);
+ aGrpTransparent.Enable(bActivate);
+}
+
+IMPL_LINK(SvxTransparenceTabPage, ModifyTransparentHdl_Impl, void*, EMPTYARG)
+{
+ UINT16 nPos = (UINT16)aMtrTransparent.GetValue();
+ XFillTransparenceItem aItem(nPos);
+ rXFSet.Put(XFillTransparenceItem(aItem));
+
+ // preview
+ InvalidatePreview();
+
+ return 0L;
+}
+
+IMPL_LINK(SvxTransparenceTabPage, ModifiedTrgrHdl_Impl, void *, pControl)
+{
+ if(pControl == &aLbTrgrGradientType || pControl == this)
+ {
+ XGradientStyle eXGS = (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos();
+ SetControlState_Impl( eXGS );
+ }
+
+ // preview
+ UINT8 nStartCol = (UINT8)(((UINT16)aMtrTrgrStartValue.GetValue() * 255) / 100);
+ UINT8 nEndCol = (UINT8)(((UINT16)aMtrTrgrEndValue.GetValue() * 255) / 100);
+ XGradient aTmpGradient(
+ Color(nStartCol, nStartCol, nStartCol),
+ Color(nEndCol, nEndCol, nEndCol),
+ (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos(),
+ (UINT16)aMtrTrgrAngle.GetValue() * 10,
+ (UINT16)aMtrTrgrCenterX.GetValue(),
+ (UINT16)aMtrTrgrCenterY.GetValue(),
+ (UINT16)aMtrTrgrBorder.GetValue(),
+ 100, 100);
+
+ String aString;
+ XFillFloatTransparenceItem aItem(aString, aTmpGradient);
+ rXFSet.Put ( aItem );
+
+ InvalidatePreview();
+
+ return( 0L );
+}
+
+void SvxTransparenceTabPage::ActivateGradient(BOOL bActivate)
+{
+ aFtTrgrType.Enable(bActivate);
+ aLbTrgrGradientType.Enable(bActivate);
+ aFtTrgrCenterX.Enable(bActivate);
+ aMtrTrgrCenterX.Enable(bActivate);
+ aFtTrgrCenterY.Enable(bActivate);
+ aMtrTrgrCenterY.Enable(bActivate);
+ aFtTrgrAngle.Enable(bActivate);
+ aMtrTrgrAngle.Enable(bActivate);
+ aFtTrgrBorder.Enable(bActivate);
+ aMtrTrgrBorder.Enable(bActivate);
+ aFtTrgrStartValue.Enable(bActivate);
+ aMtrTrgrStartValue.Enable(bActivate);
+ aFtTrgrEndValue.Enable(bActivate);
+ aMtrTrgrEndValue.Enable(bActivate);
+ aGrpTransGradient.Enable(bActivate);
+
+ if(bActivate)
+ {
+ XGradientStyle eXGS = (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos();
+ SetControlState_Impl( eXGS );
+ }
+}
+
+IMPL_LINK(SvxTransparenceTabPage, ChangeTrgrTypeHdl_Impl, void *, EMPTYARG)
+{
+ return( 0L );
+}
+
+void SvxTransparenceTabPage::SetControlState_Impl(XGradientStyle eXGS)
+{
+ switch(eXGS)
+ {
+ case XGRAD_LINEAR:
+ case XGRAD_AXIAL:
+ aFtTrgrCenterX.Disable();
+ aMtrTrgrCenterX.Disable();
+ aFtTrgrCenterY.Disable();
+ aMtrTrgrCenterY.Disable();
+ aFtTrgrAngle.Enable();
+ aMtrTrgrAngle.Enable();
+ break;
+
+ case XGRAD_RADIAL:
+ aFtTrgrCenterX.Enable();
+ aMtrTrgrCenterX.Enable();
+ aFtTrgrCenterY.Enable();
+ aMtrTrgrCenterY.Enable();
+ aFtTrgrAngle.Disable();
+ aMtrTrgrAngle.Disable();
+ break;
+
+ case XGRAD_ELLIPTICAL:
+ aFtTrgrCenterX.Enable();
+ aMtrTrgrCenterX.Enable();
+ aFtTrgrCenterY.Enable();
+ aMtrTrgrCenterY.Enable();
+ aFtTrgrAngle.Enable();
+ aMtrTrgrAngle.Enable();
+ break;
+
+ case XGRAD_SQUARE:
+ case XGRAD_RECT:
+ aFtTrgrCenterX.Enable();
+ aMtrTrgrCenterX.Enable();
+ aFtTrgrCenterY.Enable();
+ aMtrTrgrCenterY.Enable();
+ aFtTrgrAngle.Enable();
+ aMtrTrgrAngle.Enable();
+ break;
+ }
+}
+
+SvxTransparenceTabPage::SvxTransparenceTabPage(Window* pParent, const SfxItemSet& rInAttrs)
+: SvxTabPage ( pParent, SVX_RES( RID_SVXPAGE_TRANSPARENCE ), rInAttrs),
+ pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
+ aXFillAttr ( pXPool ),
+ rOutAttrs ( rInAttrs ),
+ rXFSet ( aXFillAttr.GetItemSet() ),
+
+ aRbtTransOff ( this, ResId( RBT_TRANS_OFF ) ),
+ aRbtTransLinear ( this, ResId( RBT_TRANS_LINEAR ) ),
+ aRbtTransGradient ( this, ResId( RBT_TRANS_GRADIENT ) ),
+ aGrpTransMode ( this, ResId( GRP_TRANS_MODE ) ),
+
+ aMtrTransparent ( this, ResId( MTR_TRANSPARENT ) ),
+ aGrpTransparent ( this, ResId( GRP_TRANSPARENT ) ),
+
+ aFtTrgrType ( this, ResId( FT_TRGR_TYPE ) ),
+ aLbTrgrGradientType ( this, ResId( LB_TRGR_GRADIENT_TYPES ) ),
+ aFtTrgrCenterX ( this, ResId( FT_TRGR_CENTER_X ) ),
+ aMtrTrgrCenterX ( this, ResId( MTR_TRGR_CENTER_X ) ),
+ aFtTrgrCenterY ( this, ResId( FT_TRGR_CENTER_Y ) ),
+ aMtrTrgrCenterY ( this, ResId( MTR_TRGR_CENTER_Y ) ),
+ aFtTrgrAngle ( this, ResId( FT_TRGR_ANGLE ) ),
+ aMtrTrgrAngle ( this, ResId( MTR_TRGR_ANGLE ) ),
+ aFtTrgrBorder ( this, ResId( FT_TRGR_BORDER ) ),
+ aMtrTrgrBorder ( this, ResId( MTR_TRGR_BORDER ) ),
+ aFtTrgrStartValue ( this, ResId( FT_TRGR_START_VALUE ) ),
+ aMtrTrgrStartValue ( this, ResId( MTR_TRGR_START_VALUE ) ),
+ aFtTrgrEndValue ( this, ResId( FT_TRGR_END_VALUE ) ),
+ aMtrTrgrEndValue ( this, ResId( MTR_TRGR_END_VALUE ) ),
+ aGrpTransGradient ( this, ResId( GRP_TRANS_GRADIENT ) ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ XOut ( &aCtlXRectPreview ),
+ XOutBmp ( &aCtlBitmapPreview ),
+ aCtlBitmapPreview ( this, ResId( CTL_BITMAP_PREVIEW ), &XOutBmp ),
+ aCtlXRectPreview ( this, ResId( CTL_TRANS_PREVIEW ), &XOut ),
+ bBitmap ( FALSE )
+{
+ FreeResource();
+
+ // main selection
+ aRbtTransOff.SetClickHdl(LINK(this, SvxTransparenceTabPage, ClickTransOffHdl_Impl));
+ aRbtTransLinear.SetClickHdl(LINK(this, SvxTransparenceTabPage, ClickTransLinearHdl_Impl));
+ aRbtTransGradient.SetClickHdl(LINK(this, SvxTransparenceTabPage, ClickTransGradientHdl_Impl));
+
+ // linear transparency
+ aMtrTransparent.SetValue( 50 );
+ aMtrTransparent.SetModifyHdl(LINK(this, SvxTransparenceTabPage, ModifyTransparentHdl_Impl));
+
+ // gradient transparency
+ aMtrTrgrEndValue.SetValue( 100 );
+ aMtrTrgrStartValue.SetValue( 0 );
+ aLbTrgrGradientType.SetSelectHdl(LINK(this, SvxTransparenceTabPage, ChangeTrgrTypeHdl_Impl));
+ Link aLink = LINK( this, SvxTransparenceTabPage, ModifiedTrgrHdl_Impl);
+ aLbTrgrGradientType.SetSelectHdl( aLink );
+ aMtrTrgrCenterX.SetModifyHdl( aLink );
+ aMtrTrgrCenterY.SetModifyHdl( aLink );
+ aMtrTrgrAngle.SetModifyHdl( aLink );
+ aMtrTrgrBorder.SetModifyHdl( aLink );
+ aMtrTrgrStartValue.SetModifyHdl( aLink );
+ aMtrTrgrEndValue.SetModifyHdl( aLink );
+
+ // this page needs ExchangeSupport
+ SetExchangeSupport();
+}
+
+void SvxTransparenceTabPage::Construct()
+{
+}
+
+SfxTabPage* SvxTransparenceTabPage::Create(Window* pWindow, const SfxItemSet& rAttrs)
+{
+ return(new SvxTransparenceTabPage(pWindow, rAttrs));
+}
+
+UINT16* SvxTransparenceTabPage::GetRanges()
+{
+ return(pTransparenceRanges);
+}
+
+BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs)
+{
+ const SfxPoolItem* pGradientItem = NULL;
+ const SfxPoolItem* pLinearItem = NULL;
+ SfxItemState eStateGradient(rOutAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, TRUE, &pGradientItem));
+ SfxItemState eStateLinear(rOutAttrs.GetItemState(XATTR_FILLTRANSPARENCE, TRUE, &pLinearItem));
+ BOOL bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled());
+ BOOL bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0);
+
+ BOOL bModified(FALSE);
+ BOOL bSwitchOffLinear(FALSE);
+ BOOL bSwitchOffGradient(FALSE);
+
+ if(aMtrTransparent.IsEnabled())
+ {
+ // linear transparence
+ UINT16 nPos = (UINT16)aMtrTransparent.GetValue();
+ if(nPos != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() || !bLinearActive)
+ {
+ XFillTransparenceItem aItem(nPos);
+ SdrShadowTransparenceItem aShadowItem(nPos);
+ const SfxPoolItem* pOld = GetOldItem(rAttrs, XATTR_FILLTRANSPARENCE);
+ if(!pOld || !(*(const XFillTransparenceItem*)pOld == aItem) || !bLinearActive)
+ {
+ rAttrs.Put(aItem);
+ rAttrs.Put(aShadowItem);
+ bModified = TRUE;
+ bSwitchOffGradient = TRUE;
+ }
+ }
+ }
+ else if(aLbTrgrGradientType.IsEnabled())
+ {
+ // transparence gradient, fill ItemSet from values
+ if(!bGradActive
+ || (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos() != (XGradientStyle)aLbTrgrGradientType.GetSavedValue()
+ || (UINT16)aMtrTrgrAngle.GetValue() != (UINT16)aMtrTrgrAngle.GetSavedValue().ToInt32()
+ || (UINT16)aMtrTrgrCenterX.GetValue() != (UINT16)aMtrTrgrCenterX.GetSavedValue().ToInt32()
+ || (UINT16)aMtrTrgrCenterY.GetValue() != (UINT16)aMtrTrgrCenterY.GetSavedValue().ToInt32()
+ || (UINT16)aMtrTrgrBorder.GetValue() != (UINT16)aMtrTrgrBorder.GetSavedValue().ToInt32()
+ || (UINT16)aMtrTrgrStartValue.GetValue() != (UINT16)aMtrTrgrStartValue.GetSavedValue().ToInt32()
+ || (UINT16)aMtrTrgrEndValue.GetValue() != (UINT16)aMtrTrgrEndValue.GetSavedValue().ToInt32() )
+ {
+ UINT8 nStartCol = (UINT8)(((UINT16)aMtrTrgrStartValue.GetValue() * 255) / 100);
+ UINT8 nEndCol = (UINT8)(((UINT16)aMtrTrgrEndValue.GetValue() * 255) / 100);
+ XGradient aTmpGradient(
+ Color(nStartCol, nStartCol, nStartCol),
+ Color(nEndCol, nEndCol, nEndCol),
+ (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos(),
+ (UINT16)aMtrTrgrAngle.GetValue() * 10,
+ (UINT16)aMtrTrgrCenterX.GetValue(),
+ (UINT16)aMtrTrgrCenterY.GetValue(),
+ (UINT16)aMtrTrgrBorder.GetValue(),
+ 100, 100);
+
+ String aString;
+ XFillFloatTransparenceItem aItem(aString, aTmpGradient);
+ const SfxPoolItem* pOld = GetOldItem(rAttrs, XATTR_FILLFLOATTRANSPARENCE);
+
+ if(!pOld || !(*(const XFillFloatTransparenceItem*)pOld == aItem) || !bGradActive)
+ {
+ rAttrs.Put(aItem);
+ bModified = TRUE;
+ bSwitchOffLinear = TRUE;
+ }
+ }
+ }
+ else
+ {
+ // no transparence
+ bSwitchOffGradient = TRUE;
+ bSwitchOffLinear = TRUE;
+ }
+
+ // disable unused XFillFloatTransparenceItem
+ if(bSwitchOffGradient && bGradActive)
+ {
+ Color aColor(COL_BLACK);
+ XGradient aGrad(aColor, Color(COL_WHITE));
+ aGrad.SetStartIntens(100);
+ aGrad.SetEndIntens(100);
+ String aString;
+ XFillFloatTransparenceItem aItem(aString, aGrad);
+ aItem.SetEnabled(FALSE);
+ rAttrs.Put(aItem);
+ bModified = TRUE;
+ }
+
+ // disable unused XFillFloatTransparenceItem
+ if(bSwitchOffLinear && bLinearActive)
+ {
+ XFillTransparenceItem aItem(0);
+ SdrShadowTransparenceItem aShadowItem(0);
+ rAttrs.Put(aItem);
+ rAttrs.Put(aShadowItem);
+ bModified = TRUE;
+ }
+
+ return bModified;
+}
+
+void SvxTransparenceTabPage::Reset(const SfxItemSet& rAttrs)
+{
+ const SfxPoolItem* pGradientItem = NULL;
+ SfxItemState eStateGradient(rAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, TRUE, &pGradientItem));
+ if(!pGradientItem)
+ pGradientItem = &rAttrs.Get(XATTR_FILLFLOATTRANSPARENCE);
+ BOOL bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled());
+
+ const SfxPoolItem* pLinearItem = NULL;
+ SfxItemState eStateLinear(rAttrs.GetItemState(XATTR_FILLTRANSPARENCE, TRUE, &pLinearItem));
+ if(!pLinearItem)
+ pLinearItem = &rAttrs.Get(XATTR_FILLTRANSPARENCE);
+ BOOL bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0);
+
+ // transparence gradient
+ const XGradient& rGradient = ((XFillFloatTransparenceItem*)pGradientItem)->GetValue();
+ XGradientStyle eXGS(rGradient.GetGradientStyle());
+ aLbTrgrGradientType.SelectEntryPos(eXGS);
+ aMtrTrgrAngle.SetValue(rGradient.GetAngle() / 10);
+ aMtrTrgrBorder.SetValue(rGradient.GetBorder());
+ aMtrTrgrCenterX.SetValue(rGradient.GetXOffset());
+ aMtrTrgrCenterY.SetValue(rGradient.GetYOffset());
+ aMtrTrgrStartValue.SetValue((UINT16)((((UINT16)rGradient.GetStartColor().GetRed() + 1) * 100) / 255));
+ aMtrTrgrEndValue.SetValue((UINT16)((((UINT16)rGradient.GetEndColor().GetRed() + 1) * 100) / 255));
+
+ // linear transparence
+ UINT16 nTransp = ((XFillTransparenceItem*)pLinearItem)->GetValue();
+ aMtrTransparent.SetValue(bLinearActive ? nTransp : 50);
+ ModifyTransparentHdl_Impl(NULL);
+
+ // select the correct radio button
+ if(bGradActive)
+ {
+ // transparence gradient, set controls appropriate to item
+ aRbtTransGradient.Check();
+ ClickTransGradientHdl_Impl(NULL);
+ }
+ else if(bLinearActive)
+ {
+ // linear transparence
+ aRbtTransLinear.Check();
+ ClickTransLinearHdl_Impl(NULL);
+ }
+ else
+ {
+ // no transparence
+ aRbtTransOff.Check();
+ ClickTransOffHdl_Impl(NULL);
+ ModifiedTrgrHdl_Impl(NULL);
+ }
+
+ // save values
+ aMtrTransparent.SaveValue();
+ aLbTrgrGradientType.SaveValue();
+ aMtrTrgrCenterX.SaveValue();
+ aMtrTrgrCenterY.SaveValue();
+ aMtrTrgrAngle.SaveValue();
+ aMtrTrgrBorder.SaveValue();
+ aMtrTrgrStartValue.SaveValue();
+ aMtrTrgrEndValue.SaveValue();
+
+ BOOL bActive = InitPreview ( rAttrs );
+ InvalidatePreview ( bActive );
+}
+
+void SvxTransparenceTabPage::ActivatePage(const SfxItemSet& rSet)
+{
+ if(*pDlgType == 0) // Flaechen-Dialog
+ *pPageType = PT_TRANSPARENCE;
+
+ InitPreview ( rSet );
+}
+
+int SvxTransparenceTabPage::DeactivatePage(SfxItemSet* pSet)
+{
+ FillItemSet(*pSet);
+ return(LEAVE_PAGE);
+}
+
+void SvxTransparenceTabPage::PointChanged(Window* pWindow, RECT_POINT eRcPt)
+{
+ eRP = eRcPt;
+}
+
+//
+// Preview-Methods
+//
+BOOL SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet )
+{
+ // set transparencetyp for preview
+ if ( aRbtTransOff.IsChecked() )
+ {
+ ClickTransOffHdl_Impl(NULL);
+ } else if ( aRbtTransLinear.IsChecked() )
+ {
+ ClickTransLinearHdl_Impl(NULL);
+ } else if ( aRbtTransGradient.IsChecked() )
+ {
+ ClickTransGradientHdl_Impl(NULL);
+ }
+
+ // Get fillstyle for preview
+ rXFSet.Put ( ( XFillStyleItem& ) rSet.Get(XATTR_FILLSTYLE) );
+ rXFSet.Put ( ( XFillColorItem& ) rSet.Get(XATTR_FILLCOLOR) );
+ rXFSet.Put ( ( XFillGradientItem& ) rSet.Get(XATTR_FILLGRADIENT) );
+ rXFSet.Put ( ( XFillHatchItem& ) rSet.Get(XATTR_FILLHATCH) );
+ rXFSet.Put ( ( XFillBackgroundItem&)rSet.Get(XATTR_FILLBACKGROUND) );
+ rXFSet.Put ( ( XFillBitmapItem& ) rSet.Get(XATTR_FILLBITMAP) );
+
+ XOut.SetFillAttr( aXFillAttr );
+ XOutBmp.SetFillAttr( aXFillAttr );
+
+ bBitmap = ( ( ( XFillStyleItem& )rSet.Get(XATTR_FILLSTYLE) ).GetValue() == XFILL_BITMAP );
+
+ // show the right preview window
+ if ( bBitmap )
+ {
+ aCtlBitmapPreview.Show();
+ aCtlXRectPreview.Hide();
+ }
+ else
+ {
+ aCtlBitmapPreview.Hide();
+ aCtlXRectPreview.Show();
+ }
+
+ return !aRbtTransOff.IsChecked();
+}
+
+void SvxTransparenceTabPage::InvalidatePreview (BOOL bEnable)
+{
+ if ( bBitmap )
+ {
+ if ( bEnable )
+ {
+ aCtlBitmapPreview.Enable();
+ XOutBmp.SetFillAttr( aXFillAttr );
+ }
+ else
+ aCtlBitmapPreview.Disable();
+ aCtlBitmapPreview.Invalidate();
+ }
+ else
+ {
+ if ( bEnable )
+ {
+ aCtlXRectPreview.Enable();
+ XOut.SetFillAttr( aXFillAttr );
+ }
+ else
+ aCtlXRectPreview.Disable();
+ aCtlXRectPreview.Invalidate();
+ }
+}
+
+
+/*************************************************************************
+|*
+|* Dialog to modify fill-attributes
+|*
+\************************************************************************/
+
+SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
+
+ SvxTabPage ( pParent, SVX_RES( RID_SVXPAGE_AREA ), rInAttrs ),
+
+ pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
+ XOut ( &aCtlXRectPreview ),
+ XOutBmp ( &aCtlBitmapPreview ),
+ aXFillAttr ( pXPool ),
+ rXFSet ( aXFillAttr.GetItemSet() ),
+
+ aRbtInvisible ( this, ResId( RBT_INVISIBLE ) ),
+ aRbtColor ( this, ResId( RBT_COLOR ) ),
+ aRbtGradient ( this, ResId( RBT_GRADIENT ) ),
+ aRbtHatching ( this, ResId( RBT_HATCHING ) ),
+ aRbtBitmap ( this, ResId( RBT_BITMAP ) ),
+
+ aLbColor ( this, ResId( LB_COLOR ) ),
+ aLbGradient ( this, ResId( LB_GRADIENT ) ),
+ aLbHatching ( this, ResId( LB_HATCHING ) ),
+ aLbBitmap ( this, ResId( LB_BITMAP ) ),
+ aCtlBitmapPreview ( this, ResId( CTL_BITMAP_PREVIEW ), &XOutBmp ),
+ aGrpFill ( this, ResId( GRP_FILL ) ),
+
+ aGrpHatchBckgrd ( this, ResId( GRP_HATCHBCKGRD ) ),
+ aCbxHatchBckgrd ( this, ResId( CB_HATCHBCKGRD ) ),
+ aLbHatchBckgrdColor ( this, ResId( LB_HATCHBCKGRDCOLOR ) ),
+
+ aTsbStepCount ( this, ResId( TSB_STEPCOUNT ) ),
+ aNumFldStepCount ( this, ResId( NUM_FLD_STEPCOUNT ) ),
+ aGrpStepCount ( this, ResId( GRP_STEPCOUNT ) ),
+
+ aTsbTile ( this, ResId( TSB_TILE ) ),
+ aTsbStretch ( this, ResId( TSB_STRETCH ) ),
+ aTsbScale ( this, ResId( TSB_SCALE ) ),
+ aTsbOriginal ( this, ResId( TSB_ORIGINAL ) ),
+ aFtXSize ( this, ResId( FT_X_SIZE ) ),
+ aMtrFldXSize ( this, ResId( MTR_FLD_X_SIZE ) ),
+ aFtYSize ( this, ResId( FT_Y_SIZE ) ),
+ aMtrFldYSize ( this, ResId( MTR_FLD_Y_SIZE ) ),
+ aGrpSize ( this, ResId( GRP_SIZE ) ),
+ aRbtRow ( this, ResId( RBT_ROW ) ),
+ aRbtColumn ( this, ResId( RBT_COLUMN ) ),
+ aMtrFldOffset ( this, ResId( MTR_FLD_OFFSET ) ),
+ aGrpOffset ( this, ResId( GRP_OFFSET ) ),
+ aCtlPosition ( this, ResId( CTL_POSITION ),
+ RP_RM, 110, 80, CS_RECT ),
+ aFtXOffset ( this, ResId( FT_X_OFFSET ) ),
+ aMtrFldXOffset ( this, ResId( MTR_FLD_X_OFFSET ) ),
+ aFtYOffset ( this, ResId( FT_Y_OFFSET ) ),
+ aMtrFldYOffset ( this, ResId( MTR_FLD_Y_OFFSET ) ),
+ aGrpPosition ( this, ResId( GRP_POSITION ) ),
+
+ aCtlXRectPreview ( this, ResId( CTL_COLOR_PREVIEW ), &XOut ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ rOutAttrs ( rInAttrs )
+
+{
+ FreeResource();
+
+ // Gruppen, die sich ueberlagern
+ aLbBitmap.Hide();
+ aCtlBitmapPreview.Hide();
+
+ aGrpStepCount.Hide();
+ aTsbStepCount.Hide();
+ aNumFldStepCount.Hide();
+
+ aTsbTile.Hide();
+ aTsbStretch.Hide();
+ aTsbScale.Hide();
+ aTsbOriginal.Hide();
+ aFtXSize.Hide();
+ aMtrFldXSize.Hide();
+ aFtYSize.Hide();
+ aMtrFldYSize.Hide();
+ aGrpSize.Hide();
+ aRbtRow.Hide();
+ aRbtColumn.Hide();
+ aMtrFldOffset.Hide();
+ aGrpOffset.Hide();
+ aCtlPosition.Hide();
+ aFtXOffset.Hide();
+ aMtrFldXOffset.Hide();
+ aFtYOffset.Hide();
+ aMtrFldYOffset.Hide();
+ aGrpPosition.Hide();
+ // Controls for Hatch-Background
+ aGrpHatchBckgrd.Hide();
+ aCbxHatchBckgrd.Hide();
+ aLbHatchBckgrdColor.Hide();
+
+
+ aTsbOriginal.EnableTriState( FALSE );
+
+
+ // this page needs ExchangeSupport
+ SetExchangeSupport();
+
+ // set Metrics
+ GET_MODULE_FIELDUNIT( eFUnit );
+
+ switch ( eFUnit )
+ {
+ case FUNIT_M:
+ case FUNIT_KM:
+ eFUnit = FUNIT_MM;
+ break;
+ }
+ SetFieldUnit( aMtrFldXSize, eFUnit, TRUE );
+ SetFieldUnit( aMtrFldYSize, eFUnit, TRUE );
+
+ // get PoolUnit
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool?" );
+ ePoolUnit = pPool->GetMetric( XATTR_FILLBMP_SIZEX );
+
+ // Setzen Output-Devices
+ rXFSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ rXFSet.Put( XFillColorItem( String(), COL_BLACK ) );
+ XOut.SetFillAttr( aXFillAttr );
+ XOutBmp.SetFillAttr( aXFillAttr );
+
+ // Set line to None at the OutputDevice
+ XLineAttrSetItem aXLineAttr( pXPool );
+ aXLineAttr.GetItemSet().Put( XLineStyleItem( XLINE_NONE ) );
+ XOut.SetLineAttr( aXLineAttr );
+ XOutBmp.SetLineAttr( aXLineAttr );
+
+ aLbColor.SetSelectHdl( LINK( this, SvxAreaTabPage, ModifyColorHdl_Impl ) );
+ aLbHatchBckgrdColor.SetSelectHdl( LINK( this, SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl ) );
+ aCbxHatchBckgrd.SetToggleHdl( LINK( this, SvxAreaTabPage, ToggleHatchBckgrdColorHdl_Impl ) );
+
+ aLbGradient.SetSelectHdl(
+ LINK( this, SvxAreaTabPage, ModifyGradientHdl_Impl ) );
+ aLbHatching.SetSelectHdl(
+ LINK( this, SvxAreaTabPage, ModifyHatchingHdl_Impl ) );
+ aLbBitmap.SetSelectHdl(
+ LINK( this, SvxAreaTabPage, ModifyBitmapHdl_Impl ) );
+
+ aTsbStepCount.SetClickHdl(
+ LINK( this, SvxAreaTabPage, ModifyStepCountHdl_Impl ) );
+ aNumFldStepCount.SetModifyHdl(
+ LINK( this, SvxAreaTabPage, ModifyStepCountHdl_Impl ) );
+
+ Link aLink( LINK( this, SvxAreaTabPage, ModifyTileHdl_Impl ) );
+ aTsbTile.SetClickHdl( aLink );
+ aTsbStretch.SetClickHdl( aLink );
+ aTsbOriginal.SetClickHdl( aLink );
+ aMtrFldXSize.SetModifyHdl( aLink );
+ aMtrFldYSize.SetModifyHdl( aLink );
+ aRbtRow.SetClickHdl( aLink );
+ aRbtColumn.SetClickHdl( aLink );
+ aMtrFldOffset.SetModifyHdl( aLink );
+ aMtrFldXOffset.SetModifyHdl( aLink );
+ aMtrFldYOffset.SetModifyHdl( aLink );
+ aTsbScale.SetClickHdl( LINK( this, SvxAreaTabPage, ClickScaleHdl_Impl ) );
+
+ aRbtInvisible.SetClickHdl(
+ LINK( this, SvxAreaTabPage, ClickInvisibleHdl_Impl ) );
+ aRbtColor.SetClickHdl( LINK( this, SvxAreaTabPage, ClickColorHdl_Impl ) );
+ aRbtGradient.SetClickHdl(
+ LINK( this, SvxAreaTabPage, ClickGradientHdl_Impl ) );
+ aRbtHatching.SetClickHdl(
+ LINK( this, SvxAreaTabPage, ClickHatchingHdl_Impl ) );
+ aRbtBitmap.SetClickHdl(
+ LINK( this, SvxAreaTabPage, ClickBitmapHdl_Impl ) );
+
+ pColorTab = NULL;
+ pGradientList = NULL;
+ pHatchingList = NULL;
+ pBitmapList = NULL;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxAreaTabPage::Construct()
+{
+ // fill colortables / lists
+ aLbColor.Fill( pColorTab );
+ aLbHatchBckgrdColor.Fill ( pColorTab );
+
+ aLbGradient.Fill( pGradientList );
+ aLbHatching.Fill( pHatchingList );
+ aLbBitmap.Fill( pBitmapList );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ int nPos;
+ int nCount;
+
+ if( *pDlgType == 0 ) // Flaechen-Dialog
+ {
+ *pbAreaTP = TRUE;
+
+ if( pColorTab )
+ {
+ // Bitmapliste
+ if( *pnBitmapListState )
+ {
+ if( *pnBitmapListState & CT_CHANGED )
+ pBitmapList = ( (SvxAreaTabDialog*) DLGWIN )->
+ GetNewBitmapList();
+
+ nPos = aLbBitmap.GetSelectEntryPos();
+
+ aLbBitmap.Clear();
+ aLbBitmap.Fill( pBitmapList );
+ nCount = aLbBitmap.GetEntryCount();
+ if( nCount == 0 )
+ ; // This case should never occur
+ else if( nCount <= nPos )
+ aLbBitmap.SelectEntryPos( 0 );
+ else
+ aLbBitmap.SelectEntryPos( nPos );
+ ModifyBitmapHdl_Impl( this );
+ }
+ // hatch-liste
+ if( *pnHatchingListState )
+ {
+ if( *pnHatchingListState & CT_CHANGED )
+ pHatchingList = ( (SvxAreaTabDialog*) DLGWIN )->
+ GetNewHatchingList();
+
+ nPos = aLbHatching.GetSelectEntryPos();
+
+ aLbHatching.Clear();
+ aLbHatching.Fill( pHatchingList );
+ nCount = aLbHatching.GetEntryCount();
+ if( nCount == 0 )
+ ; // This case should never occur
+ else if( nCount <= nPos )
+ aLbHatching.SelectEntryPos( 0 );
+ else
+ aLbHatching.SelectEntryPos( nPos );
+ ModifyHatchingHdl_Impl( this );
+
+ ModifyHatchBckgrdColorHdl_Impl( this );
+ }
+ // gradient-liste
+ if( *pnGradientListState )
+ {
+ if( *pnGradientListState & CT_CHANGED )
+ pGradientList = ( (SvxAreaTabDialog*) DLGWIN )->
+ GetNewGradientList();
+
+ nPos = aLbGradient.GetSelectEntryPos();
+
+ aLbGradient.Clear();
+ aLbGradient.Fill( pGradientList );
+ nCount = aLbGradient.GetEntryCount();
+ if( nCount == 0 )
+ ; // This case should never occur
+ else if( nCount <= nPos )
+ aLbGradient.SelectEntryPos( 0 );
+ else
+ aLbGradient.SelectEntryPos( nPos );
+ ModifyGradientHdl_Impl( this );
+ }
+ // ColorTable
+ if( *pnColorTableState )
+ {
+ if( *pnColorTableState & CT_CHANGED )
+ pColorTab = ( (SvxAreaTabDialog*) DLGWIN )->
+ GetNewColorTable();
+ // aLbColor
+ nPos = aLbColor.GetSelectEntryPos();
+ aLbColor.Clear();
+ aLbColor.Fill( pColorTab );
+ nCount = aLbColor.GetEntryCount();
+ if( nCount == 0 )
+ ; // This case should never occur
+ else if( nCount <= nPos )
+ aLbColor.SelectEntryPos( 0 );
+ else
+ aLbColor.SelectEntryPos( nPos );
+
+ ModifyColorHdl_Impl( this );
+
+ // Backgroundcolor of hatch
+ nPos = aLbHatchBckgrdColor.GetSelectEntryPos();
+ aLbHatchBckgrdColor.Clear();
+ aLbHatchBckgrdColor.Fill( pColorTab );
+ nCount = aLbHatchBckgrdColor.GetEntryCount();
+ if( nCount == 0 )
+ ; // This case should never occur
+ else if( nCount <= nPos )
+ aLbHatchBckgrdColor.SelectEntryPos( 0 );
+ else
+ aLbHatchBckgrdColor.SelectEntryPos( nPos );
+
+ ModifyHatchBckgrdColorHdl_Impl( this );
+ }
+
+ // evaluate if any other Tabpage set another filltype
+ if( !aRbtInvisible.IsChecked() )
+ {
+ switch( *pPageType )
+ {
+ case PT_GRADIENT:
+ aRbtGradient.Check();
+ aLbGradient.SelectEntryPos( *pPos );
+ ClickGradientHdl_Impl( this );
+ break;
+
+ case PT_HATCH:
+ aRbtHatching.Check();
+ aLbHatching.SelectEntryPos( *pPos );
+ ClickHatchingHdl_Impl( this );
+ break;
+
+ case PT_BITMAP:
+ aRbtBitmap.Check();
+ aLbBitmap.SelectEntryPos( *pPos );
+ ClickBitmapHdl_Impl( this );
+ break;
+
+ case PT_COLOR:
+ aRbtColor.Check();
+ aLbColor.SelectEntryPos( *pPos );
+ aLbHatchBckgrdColor.SelectEntryPos( *pPos );
+ ClickColorHdl_Impl( this );
+ break;
+ }
+ }
+ *pPageType = PT_AREA;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxAreaTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if( *pDlgType == 0 ) // Flaechen-Dialog
+ {
+ if( aRbtGradient.IsChecked() )
+ {
+ *pPageType = PT_GRADIENT;
+ *pPos = aLbGradient.GetSelectEntryPos();
+ }
+ if( aRbtHatching.IsChecked() )
+ {
+ *pPageType = PT_HATCH;
+ *pPos = aLbHatching.GetSelectEntryPos();
+ }
+ if( aRbtBitmap.IsChecked() )
+ {
+ *pPageType = PT_BITMAP;
+ *pPos = aLbBitmap.GetSelectEntryPos();
+ }
+ if( aRbtColor.IsChecked() )
+ {
+ *pPageType = PT_COLOR;
+ *pPos = aLbColor.GetSelectEntryPos();
+ }
+ }
+
+ FillItemSet( *pSet );
+
+ return( LEAVE_PAGE );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
+{
+ const SfxPoolItem* pOld = NULL;
+ USHORT nPos;
+ BOOL bModified = FALSE;
+
+ if( *pDlgType != 0 || *pbAreaTP )
+ {
+ if( aRbtInvisible.IsChecked() )
+ {
+ if( !aRbtInvisible.GetSavedValue() )
+ {
+ XFillStyleItem aStyleItem( XFILL_NONE );
+ pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE );
+ if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) )
+ {
+ rAttrs.Put( aStyleItem );
+ bModified = TRUE;
+ }
+ }
+ }
+ else if( aRbtColor.IsChecked() )
+ {
+ nPos = aLbColor.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbColor.GetSavedValue() )
+ {
+ XFillColorItem aItem( aLbColor.GetSelectEntry(),
+ aLbColor.GetSelectEntryColor() );
+ pOld = GetOldItem( rAttrs, XATTR_FILLCOLOR );
+ if ( !pOld || !( *(const XFillColorItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ // NEU
+ if( !aRbtColor.GetSavedValue() &&
+ ( bModified ||
+ SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE ) ) )
+ {
+ XFillStyleItem aStyleItem( XFILL_SOLID );
+ pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE );
+ if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) )
+ {
+ rAttrs.Put( aStyleItem );
+ bModified = TRUE;
+ }
+ }
+ }
+ else if( aRbtGradient.IsChecked() )
+ {
+ nPos = aLbGradient.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbGradient.GetSavedValue() )
+ {
+ XGradient aGradient = pGradientList->Get( nPos )->GetGradient();
+ String aString = aLbGradient.GetSelectEntry();
+ XFillGradientItem aItem( aString, aGradient );
+ pOld = GetOldItem( rAttrs, XATTR_FILLGRADIENT );
+ if ( !pOld || !( *(const XFillGradientItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ // NEU
+ if( !aRbtGradient.GetSavedValue() &&
+ ( bModified ||
+ SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE ) ) )
+ {
+ XFillStyleItem aStyleItem( XFILL_GRADIENT );
+ pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE );
+ if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) )
+ {
+ rAttrs.Put( aStyleItem );
+ bModified = TRUE;
+ }
+ }
+ }
+ else if( aRbtHatching.IsChecked() )
+ {
+ nPos = aLbHatching.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbHatching.GetSavedValue() )
+ {
+ XHatch aHatching = pHatchingList->Get( nPos )->GetHatch();
+ String aString = aLbHatching.GetSelectEntry();
+ XFillHatchItem aItem( aString, aHatching );
+ pOld = GetOldItem( rAttrs, XATTR_FILLHATCH );
+ if ( !pOld || !( *(const XFillHatchItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+
+ XFillBackgroundItem aItem ( aCbxHatchBckgrd.IsChecked() );
+ rAttrs.Put( aItem );
+
+ nPos = aLbHatchBckgrdColor.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbHatchBckgrdColor.GetSavedValue() )
+ {
+ XFillColorItem aItem( aLbHatchBckgrdColor.GetSelectEntry(),
+ aLbHatchBckgrdColor.GetSelectEntryColor() );
+ pOld = GetOldItem( rAttrs, XATTR_FILLCOLOR );
+ if ( !pOld || !( *(const XFillColorItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ // NEU
+ if( !aRbtHatching.GetSavedValue() &&
+ ( bModified ||
+ SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE ) ) )
+ {
+ XFillStyleItem aStyleItem( XFILL_HATCH );
+ pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE );
+ if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) )
+ {
+ rAttrs.Put( aStyleItem );
+ bModified = TRUE;
+ }
+ }
+ }
+ else if( aRbtBitmap.IsChecked() )
+ {
+ nPos = aLbBitmap.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbBitmap.GetSavedValue() )
+ {
+ XOBitmap aXOBitmap = pBitmapList->Get( nPos )->GetXBitmap();
+ String aString = aLbBitmap.GetSelectEntry();
+ XFillBitmapItem aItem( aString, aXOBitmap );
+ pOld = GetOldItem( rAttrs, XATTR_FILLBITMAP );
+ if ( !pOld || !( *(const XFillBitmapItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ // NEU
+ if( !aRbtBitmap.GetSavedValue() &&
+ ( bModified ||
+ SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE ) ) )
+ {
+ XFillStyleItem aStyleItem( XFILL_BITMAP );
+ pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE );
+ if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) )
+ {
+ rAttrs.Put( aStyleItem );
+ bModified = TRUE;
+ }
+ }
+ }
+
+ // Schrittweite
+ if( aTsbStepCount.IsEnabled() )
+ {
+ UINT16 nValue = 0;
+ BOOL bValueModified = FALSE;
+ TriState eState = aTsbStepCount.GetState();
+ if( eState == STATE_CHECK )
+ {
+ if( eState != aTsbStepCount.GetSavedValue() )
+ bValueModified = TRUE;
+ }
+ else
+ {
+ // Zustand != Disabled ?
+ if( aNumFldStepCount.GetText().Len() > 0 )
+ {
+ nValue = (UINT16) aNumFldStepCount.GetValue();
+ if( nValue != (UINT16) aNumFldStepCount.GetSavedValue().ToInt32() )
+ bValueModified = TRUE;
+ }
+ }
+ if( bValueModified )
+ {
+ XGradientStepCountItem aItem( nValue );
+ pOld = GetOldItem( rAttrs, XATTR_GRADIENTSTEPCOUNT );
+ if ( !pOld || !( *(const XGradientStepCountItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ }
+
+ // Kacheln
+ if( aTsbTile.IsEnabled() )
+ {
+ TriState eState = aTsbTile.GetState();
+ if( eState != aTsbTile.GetSavedValue() )
+ {
+ XFillBmpTileItem aItem( eState );
+ pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILE );
+ if ( !pOld || !( *(const XFillBmpTileItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ }
+ // Stretchen
+ if( aTsbStretch.IsEnabled() )
+ {
+ TriState eState = aTsbStretch.GetState();
+ if( eState != aTsbStretch.GetSavedValue() )
+ {
+ XFillBmpStretchItem aItem( eState );
+ pOld = GetOldItem( rAttrs, XATTR_FILLBMP_STRETCH );
+ if ( !pOld || !( *(const XFillBmpStretchItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ }
+
+ // Originalgroesse (im UI) wird wie folgt benutzt:
+ // Controls sind disabled, muessen aber gesetzt werden.
+ // SizeX = 0; SizeY = 0; Log = TRUE
+
+ //aTsbScale
+ TriState eState = aTsbScale.GetState();
+ if( eState != aTsbScale.GetSavedValue() ||
+ ( !aTsbScale.IsEnabled() &&
+ aTsbOriginal.IsEnabled() &&
+ aTsbScale.GetSavedValue() != STATE_CHECK ) )
+ {
+ XFillBmpSizeLogItem* pItem = NULL;
+ if( aTsbScale.IsEnabled() )
+ pItem = new XFillBmpSizeLogItem( eState == STATE_NOCHECK );
+ else if( aTsbOriginal.IsEnabled() && aTsbOriginal.GetState() == STATE_CHECK )
+ pItem = new XFillBmpSizeLogItem( TRUE );
+
+ if( pItem )
+ {
+ pOld = GetOldItem( rAttrs, XATTR_FILLBMP_SIZELOG );
+ if ( !pOld || !( *(const XFillBmpSizeLogItem*)pOld == *pItem ) )
+ {
+ rAttrs.Put( *pItem );
+ bModified = TRUE;
+ }
+ delete pItem;
+ }
+ }
+
+ //aMtrFldXSize
+ String aStr = aMtrFldXSize.GetText();
+ {
+ XFillBmpSizeXItem* pItem = NULL;
+ TriState eState = aTsbScale.GetState();
+
+ if( aMtrFldXSize.IsEnabled() &&
+ aStr.Len() > 0 &&
+ aStr != aMtrFldXSize.GetSavedValue() )
+ {
+ if( eState == STATE_NOCHECK )
+ pItem = new XFillBmpSizeXItem( GetCoreValue( aMtrFldXSize, ePoolUnit ) );
+ else
+ {
+ // Prozentwerte werden negativ gesetzt, damit
+ // diese nicht skaliert werden; dieses wird
+ // im Item beruecksichtigt ( KA05.11.96 )
+ pItem = new XFillBmpSizeXItem( -labs( aMtrFldXSize.GetValue() ) );
+ }
+ }
+ else if( aTsbOriginal.IsEnabled() &&
+ aTsbOriginal.GetState() == STATE_CHECK &&
+ aMtrFldXSize.GetSavedValue().Len() > 0 )
+ pItem = new XFillBmpSizeXItem( 0 );
+
+ if( pItem )
+ {
+ pOld = GetOldItem( rAttrs, XATTR_FILLBMP_SIZEX );
+ if ( !pOld || !( *(const XFillBmpSizeXItem*)pOld == *pItem ) )
+ {
+ rAttrs.Put( *pItem );
+ bModified = TRUE;
+ }
+ delete pItem;
+ }
+ }
+
+ //aMtrFldYSize
+ aStr = aMtrFldYSize.GetText();
+ {
+ XFillBmpSizeYItem* pItem = NULL;
+ TriState eState = aTsbScale.GetState();
+
+ if( aMtrFldYSize.IsEnabled() &&
+ aStr.Len() > 0 &&
+ aStr != aMtrFldYSize.GetSavedValue() )
+ {
+ if( eState == STATE_NOCHECK )
+ pItem = new XFillBmpSizeYItem( GetCoreValue( aMtrFldYSize, ePoolUnit ) );
+ else
+ {
+ // Prozentwerte werden negativ gesetzt, damit
+ // diese vom MetricItem nicht skaliert werden;
+ // dieses wird im Item beruecksichtigt ( KA05.11.96 )
+ pItem = new XFillBmpSizeYItem( -labs( aMtrFldYSize.GetValue() ) );
+ }
+ }
+ else if( aTsbOriginal.IsEnabled() &&
+ aTsbOriginal.GetState() == STATE_CHECK &&
+ aMtrFldYSize.GetSavedValue().Len() > 0 )
+ pItem = new XFillBmpSizeYItem( 0 );
+
+ if( pItem )
+ {
+ pOld = GetOldItem( rAttrs, XATTR_FILLBMP_SIZEY );
+ if ( !pOld || !( *(const XFillBmpSizeYItem*)pOld == *pItem ) )
+ {
+ rAttrs.Put( *pItem );
+ bModified = TRUE;
+ }
+ delete pItem;
+ }
+ }
+
+ //aRbtRow
+ //aRbtColumn
+ //aMtrFldOffset
+ if( aMtrFldOffset.IsEnabled() )
+ {
+ String aStr = aMtrFldOffset.GetText();
+ if( ( aStr.Len() > 0 &&
+ aStr != aMtrFldOffset.GetSavedValue() ) ||
+ aRbtRow.GetSavedValue() != aRbtRow.IsChecked() ||
+ aRbtColumn.GetSavedValue() != aRbtColumn.IsChecked() )
+ {
+ if( aRbtRow.IsChecked() )
+ {
+ XFillBmpTileOffsetXItem aItem( (UINT16) aMtrFldOffset.GetValue() );
+ pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILEOFFSETX );
+ if ( !pOld || !( *(const XFillBmpTileOffsetXItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ rAttrs.Put( XFillBmpTileOffsetYItem( 0 ) );
+ bModified = TRUE;
+ }
+ }
+ else if( aRbtColumn.IsChecked() )
+ {
+ XFillBmpTileOffsetYItem aItem( (UINT16) aMtrFldOffset.GetValue() );
+ pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILEOFFSETY );
+ if ( !pOld || !( *(const XFillBmpTileOffsetYItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ rAttrs.Put( XFillBmpTileOffsetXItem( 0 ) );
+ bModified = TRUE;
+ }
+ }
+ }
+ }
+
+ //aCtlPosition
+ if( aCtlPosition.IsEnabled() )
+ {
+ BOOL bPut = FALSE;
+ RECT_POINT eRP = aCtlPosition.GetActualRP();
+
+ if( SFX_ITEM_DONTCARE == rOutAttrs.GetItemState( XATTR_FILLBMP_POS ) )
+ bPut = TRUE;
+ else
+ {
+ RECT_POINT eValue = ( ( const XFillBmpPosItem& ) rOutAttrs.Get( XATTR_FILLBMP_POS ) ).GetValue();
+ if( eValue != eRP )
+ bPut = TRUE;
+ }
+ if( bPut )
+ {
+ XFillBmpPosItem aItem( eRP );
+ pOld = GetOldItem( rAttrs, XATTR_FILLBMP_POS );
+ if ( !pOld || !( *(const XFillBmpPosItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ }
+
+ //aMtrFldXOffset
+ if( aMtrFldXOffset.IsEnabled() )
+ {
+ String aStr = aMtrFldXOffset.GetText();
+ if( aStr.Len() > 0 &&
+ aStr != aMtrFldXOffset.GetSavedValue() )
+ {
+ XFillBmpPosOffsetXItem aItem( (UINT16) aMtrFldXOffset.GetValue() );
+ pOld = GetOldItem( rAttrs, XATTR_FILLBMP_POSOFFSETX );
+ if ( !pOld || !( *(const XFillBmpPosOffsetXItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ }
+
+ //aMtrFldYOffset
+ if( aMtrFldYOffset.IsEnabled() )
+ {
+ String aStr = aMtrFldYOffset.GetText();
+ if( aStr.Len() > 0 &&
+ aStr != aMtrFldYOffset.GetSavedValue() )
+ {
+ XFillBmpPosOffsetYItem aItem( (UINT16) aMtrFldYOffset.GetValue() );
+ pOld = GetOldItem( rAttrs, XATTR_FILLBMP_POSOFFSETY );
+ if ( !pOld || !( *(const XFillBmpPosOffsetYItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ }
+ }
+
+ return( bModified );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs )
+{
+ //const SfxPoolItem *pPoolItem = NULL;
+
+ XFillStyle eXFS;
+ if( rAttrs.GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE )
+ {
+ eXFS = (XFillStyle) ( ( ( const XFillStyleItem& ) rAttrs.
+ Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() );
+ switch( eXFS )
+ {
+ case XFILL_NONE:
+ aRbtInvisible.Check();
+ ClickInvisibleHdl_Impl( this );
+ break;
+
+ case XFILL_SOLID:
+ aRbtColor.Check();
+ //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) )
+ if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLCOLOR ) )
+ {
+ XFillColorItem aColorItem( ( const XFillColorItem& )
+ rAttrs.Get( XATTR_FILLCOLOR ) );
+
+ aLbColor.SelectEntry( aColorItem.GetValue() );
+ aLbHatchBckgrdColor.SelectEntry( aColorItem.GetValue() );
+ }
+ ClickColorHdl_Impl( this );
+ break;
+
+ case XFILL_GRADIENT:
+ aRbtGradient.Check();
+ //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) )
+ if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLGRADIENT ) )
+ {
+ XFillGradientItem aGradientItem( ( ( const XFillGradientItem& )
+ rAttrs.Get( XATTR_FILLGRADIENT ) ) );
+ String aString( aGradientItem.GetName() );
+ XGradient aGradient( aGradientItem.GetValue() );
+
+ aLbGradient.SelectEntryByList( pGradientList, aString, aGradient );
+ }
+ ClickGradientHdl_Impl( this );
+ break;
+
+ case XFILL_HATCH:
+ aRbtHatching.Check();
+ //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) )
+ if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLHATCH ) )
+ {
+ aLbHatching.SelectEntry( ( ( const XFillHatchItem& )
+ rAttrs.Get( XATTR_FILLHATCH ) ).GetName() );
+ }
+ ClickHatchingHdl_Impl( this );
+ if ( SFX_ITEM_DONTCARE != rAttrs.GetItemState ( XATTR_FILLBACKGROUND ) )
+ {
+ aCbxHatchBckgrd.Check ( ( ( const XFillBackgroundItem& ) rAttrs.Get ( XATTR_FILLBACKGROUND ) ).GetValue() );
+ }
+ ToggleHatchBckgrdColorHdl_Impl( this );
+ if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLCOLOR ) )
+ {
+ XFillColorItem aColorItem( ( const XFillColorItem& )
+ rAttrs.Get( XATTR_FILLCOLOR ) );
+
+ aLbColor.SelectEntry( aColorItem.GetValue() );
+ aLbHatchBckgrdColor.SelectEntry( aColorItem.GetValue() );
+ }
+ break;
+
+ case XFILL_BITMAP:
+ {
+ aRbtBitmap.Check();
+
+ if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLBITMAP ) )
+ {
+ XFillBitmapItem aBitmapItem( ( const XFillBitmapItem& )
+ rAttrs.Get( XATTR_FILLBITMAP ) );
+
+ String aString( aBitmapItem.GetName() );
+ aLbBitmap.SelectEntry( aString );
+ }
+ }
+ break;
+
+ default:
+ //aLbColor.SelectEntryPos(0);
+ //aRbtColor.Check();
+ break;
+ }
+ }
+ else
+ {
+ // Alle LBs nicht zug"anglich machen
+ aLbColor.Hide();
+ aLbGradient.Hide();
+ aLbHatching.Hide();
+ aLbBitmap.Hide();
+ aCtlBitmapPreview.Hide();
+ aLbColor.Disable();
+ aLbColor.Show();
+
+ // Damit Reset() auch mit Zurueck richtig funktioniert
+ aRbtInvisible.Check( FALSE );
+ aRbtColor.Check( FALSE );
+ aRbtGradient.Check( FALSE );
+ aRbtHatching.Check( FALSE );
+ aRbtBitmap.Check( FALSE );
+ }
+
+ // Schrittweite
+ if( ( rAttrs.GetItemState( XATTR_GRADIENTSTEPCOUNT ) != SFX_ITEM_DONTCARE ) ||
+ ( rAttrs.GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE ) )
+ {
+ aTsbStepCount.EnableTriState( FALSE );
+ UINT16 nValue = ( ( const XGradientStepCountItem& ) rAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue();
+ if( nValue == 0 )
+ {
+ aTsbStepCount.SetState( STATE_CHECK );
+ aNumFldStepCount.SetText( String() );
+ }
+ else
+ {
+ aTsbStepCount.SetState( STATE_NOCHECK );
+ aNumFldStepCount.SetValue( nValue );
+ }
+ ModifyStepCountHdl_Impl( &aTsbStepCount );
+ }
+ else
+ {
+ aTsbStepCount.SetState( STATE_DONTKNOW );
+ aNumFldStepCount.SetText( String() );
+ }
+
+ // Attribute fuer die Bitmap-Fuellung
+
+ // Ist Kacheln gesetzt?
+ if( rAttrs.GetItemState( XATTR_FILLBMP_TILE ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbTile.EnableTriState( FALSE );
+
+ if( ( ( const XFillBmpTileItem& ) rAttrs.Get( XATTR_FILLBMP_TILE ) ).GetValue() )
+ aTsbTile.SetState( STATE_CHECK );
+ else
+ aTsbTile.SetState( STATE_NOCHECK );
+ }
+ else
+ aTsbTile.SetState( STATE_DONTKNOW );
+
+ // Ist Stretchen gesetzt?
+ if( rAttrs.GetItemState( XATTR_FILLBMP_STRETCH ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbStretch.EnableTriState( FALSE );
+
+ if( ( ( const XFillBmpStretchItem& ) rAttrs.Get( XATTR_FILLBMP_STRETCH ) ).GetValue() )
+ aTsbStretch.SetState( STATE_CHECK );
+ else
+ aTsbStretch.SetState( STATE_NOCHECK );
+ }
+ else
+ aTsbStretch.SetState( STATE_DONTKNOW );
+
+
+ //aTsbScale
+ if( rAttrs.GetItemState( XATTR_FILLBMP_SIZELOG ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbScale.EnableTriState( FALSE );
+
+ if( ( ( const XFillBmpSizeLogItem& ) rAttrs.Get( XATTR_FILLBMP_SIZELOG ) ).GetValue() )
+ aTsbScale.SetState( STATE_NOCHECK );
+ else
+ aTsbScale.SetState( STATE_CHECK );
+
+ ClickScaleHdl_Impl( NULL );
+ }
+ else
+ aTsbScale.SetState( STATE_DONTKNOW );
+
+
+ // Status fuer Originalgroesse ermitteln
+ TriState eOriginal = STATE_NOCHECK;
+
+ //aMtrFldXSize
+ if( rAttrs.GetItemState( XATTR_FILLBMP_SIZEX ) != SFX_ITEM_DONTCARE )
+ {
+ INT32 nValue = ( ( const XFillBmpSizeXItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEX ) ).GetValue();
+ if( aTsbScale.GetState() == STATE_CHECK )
+ {
+ // Wenn im Item eine Prozentangabe steckt,
+ // so ist diese wegen des MetricItems negativ
+ aMtrFldXSize.SetValue( labs( nValue ) );
+ }
+ else
+ SetMetricValue( aMtrFldXSize, nValue, ePoolUnit );
+ aMtrFldXSize.SaveValue();
+
+ if( nValue == 0 )
+ {
+ eOriginal = STATE_CHECK;
+ // Wert ist beim Ausschalten von Originalgroesse sonst zu klein
+ // (Performance-Problem)
+ aMtrFldXSize.SetValue( 100 );
+ }
+ }
+ else
+ {
+ aMtrFldXSize.SetText( String() );
+ aMtrFldXSize.SaveValue();
+ }
+
+ //aMtrFldYSize
+ if( rAttrs.GetItemState( XATTR_FILLBMP_SIZEY ) != SFX_ITEM_DONTCARE )
+ {
+ INT32 nValue = ( ( const XFillBmpSizeYItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEY ) ).GetValue();
+ if( aTsbScale.GetState() == STATE_CHECK )
+ {
+ // Wenn im Item eine Prozentangabe steckt,
+ // so ist diese wegen des MetricItems negativ
+ aMtrFldYSize.SetValue( labs( nValue ) );
+ }
+ else
+ SetMetricValue( aMtrFldYSize, nValue, ePoolUnit );
+ aMtrFldYSize.SaveValue();
+
+ if( nValue == 0 )
+ aMtrFldYSize.SetValue( 100 ); //s.o.
+ else
+ eOriginal = STATE_NOCHECK;
+ }
+ else
+ {
+ aMtrFldYSize.SetText( String() );
+ aMtrFldYSize.SaveValue();
+ eOriginal = STATE_NOCHECK;
+ }
+
+ // aTsbOriginal
+ aTsbOriginal.SetState( eOriginal );
+
+ //aRbtRow
+ //aRbtColumn
+ //aMtrFldOffset
+ if( rAttrs.GetItemState( XATTR_FILLBMP_TILEOFFSETX ) != SFX_ITEM_DONTCARE )
+ {
+ UINT16 nValue = ( ( const XFillBmpTileOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_TILEOFFSETX ) ).GetValue();
+ if( nValue > 0 )
+ {
+ aMtrFldOffset.SetValue( nValue );
+ aRbtRow.Check();
+ }
+ else if( rAttrs.GetItemState( XATTR_FILLBMP_TILEOFFSETY ) != SFX_ITEM_DONTCARE )
+ {
+ nValue = ( ( const XFillBmpTileOffsetYItem& ) rAttrs.Get( XATTR_FILLBMP_TILEOFFSETY ) ).GetValue();
+ if( nValue > 0 )
+ {
+ aMtrFldOffset.SetValue( nValue );
+ aRbtColumn.Check();
+ }
+ }
+ else
+ aMtrFldOffset.SetValue( 0 );
+ }
+ else
+ aMtrFldOffset.SetText( String() );
+
+
+ //aCtlPosition
+ if( rAttrs.GetItemState( XATTR_FILLBMP_POS ) != SFX_ITEM_DONTCARE )
+ {
+ RECT_POINT eValue = ( ( const XFillBmpPosItem& ) rAttrs.Get( XATTR_FILLBMP_POS ) ).GetValue();
+ aCtlPosition.SetActualRP( eValue );
+ }
+ else
+ aCtlPosition.Reset();
+
+ //aMtrFldXOffset
+ if( rAttrs.GetItemState( XATTR_FILLBMP_POSOFFSETX ) != SFX_ITEM_DONTCARE )
+ {
+ INT32 nValue = ( ( const XFillBmpPosOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETX ) ).GetValue();
+ aMtrFldXOffset.SetValue( nValue );
+ }
+ else
+ aMtrFldXOffset.SetText( String() );
+
+ //aMtrFldYOffset
+ if( rAttrs.GetItemState( XATTR_FILLBMP_POSOFFSETY ) != SFX_ITEM_DONTCARE )
+ {
+ INT32 nValue = ( ( const XFillBmpPosOffsetYItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETY ) ).GetValue();
+ aMtrFldYOffset.SetValue( nValue );
+ }
+ else
+ aMtrFldYOffset.SetText( String() );
+
+ // Erst hier, damit Tile und Stretch mit beruecksichtigt wird
+ if( aRbtBitmap.IsChecked() )
+ ClickBitmapHdl_Impl( NULL );
+
+ // Werte sichern
+ aRbtInvisible.SaveValue();
+ aRbtColor.SaveValue();
+ aRbtGradient.SaveValue();
+ aRbtHatching.SaveValue();
+ aRbtBitmap.SaveValue();
+ aLbColor.SaveValue();
+ aLbGradient.SaveValue();
+ aLbHatching.SaveValue();
+ //aCbxHatchBckgrd.SaveValue();
+ aLbHatchBckgrdColor.SaveValue();
+ aLbBitmap.SaveValue();
+// aLbTransparent.SaveValue();
+ aTsbStepCount.SaveValue();
+ aNumFldStepCount.SaveValue();
+ aTsbTile.SaveValue();
+ aTsbStretch.SaveValue();
+ aTsbScale.SaveValue();
+ aRbtRow.SaveValue();
+ aRbtColumn.SaveValue();
+ aMtrFldOffset.SaveValue();
+ aMtrFldXOffset.SaveValue();
+ aMtrFldYOffset.SaveValue();
+ //aMtrFldXSize.SaveValue(); <- wird oben behandelt
+ //aMtrFldYSize.SaveValue(); <- wird oben behandelt
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxAreaTabPage::Create( Window* pWindow,
+ const SfxItemSet& rAttrs )
+{
+ return( new SvxAreaTabPage( pWindow, rAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxAreaTabPage::GetRanges()
+{
+ return( pAreaRanges );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ClickInvisibleHdl_Impl, void *, EMPTYARG )
+{
+ aLbColor.Disable();
+ aLbGradient.Disable();
+ aLbHatching.Disable();
+ aLbBitmap.Disable();
+ aCtlBitmapPreview.Disable();
+ aCtlXRectPreview.Disable();
+
+// aGrpTransparent.Disable();
+// aLbTransparent.Disable();
+ aGrpStepCount.Disable();
+ aTsbStepCount.Disable();
+ aNumFldStepCount.Disable();
+ aTsbTile.Disable();
+ aTsbStretch.Disable();
+ aTsbScale.Disable();
+ aTsbOriginal.Disable();
+ aFtXSize.Hide();
+ aMtrFldXSize.Disable();
+ aFtYSize.Hide();
+ aMtrFldYSize.Disable();
+ aGrpSize.Disable();
+ aRbtRow.Disable();
+ aRbtColumn.Disable();
+ aMtrFldOffset.Disable();
+ aGrpOffset.Disable();
+ aCtlPosition.Disable();
+ aFtXOffset.Disable();
+ aMtrFldXOffset.Disable();
+ aFtYOffset.Disable();
+ aMtrFldYOffset.Disable();
+ aGrpPosition.Disable();
+ aCtlPosition.Invalidate();
+
+ // Controls for Hatch-Background
+ aGrpHatchBckgrd.Disable();
+ aCbxHatchBckgrd.Disable();
+ aLbHatchBckgrdColor.Disable();
+
+ rXFSet.Put( XFillStyleItem( XFILL_NONE ) );
+ XOut.SetFillAttr( aXFillAttr );
+ XOutBmp.SetFillAttr( aXFillAttr );
+
+ aCtlXRectPreview.Invalidate();
+ aCtlBitmapPreview.Invalidate();
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ClickColorHdl_Impl, void *, EMPTYARG )
+{
+ aTsbTile.Hide();
+ aTsbStretch.Hide();
+ aTsbScale.Hide();
+ aTsbOriginal.Hide();
+ aFtXSize.Hide();
+ aMtrFldXSize.Hide();
+ aFtYSize.Hide();
+ aMtrFldYSize.Hide();
+ aGrpSize.Hide();
+ aRbtRow.Hide();
+ aRbtColumn.Hide();
+ aMtrFldOffset.Hide();
+ aGrpOffset.Hide();
+ aCtlPosition.Hide();
+ aFtXOffset.Hide();
+ aMtrFldXOffset.Hide();
+ aFtYOffset.Hide();
+ aMtrFldYOffset.Hide();
+ aGrpPosition.Hide();
+
+ aLbColor.Enable();
+ aLbColor.Show();
+ aLbGradient.Hide();
+ aLbHatching.Hide();
+ aLbBitmap.Hide();
+ aCtlXRectPreview.Enable();
+ aCtlXRectPreview.Show();
+ aCtlBitmapPreview.Hide();
+ aGrpPreview.Enable();
+ aGrpPreview.Show();
+
+ aGrpStepCount.Hide();
+ aTsbStepCount.Hide();
+ aNumFldStepCount.Hide();
+
+ // Controls for Hatch-Background
+ aGrpHatchBckgrd.Hide();
+ aCbxHatchBckgrd.Hide();
+ aLbHatchBckgrdColor.Hide();
+
+ // Text der Tabelle setzen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL; aURL.SetSmartURL( pColorTab->GetName() );
+
+ if( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpFill.SetText( aString );
+ ModifyColorHdl_Impl( this );
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ModifyColorHdl_Impl, void *, EMPTYARG )
+{
+ const SfxPoolItem* pPoolItem = NULL;
+ USHORT nPos = aLbColor.GetSelectEntryPos();
+ aLbHatchBckgrdColor.SelectEntryPos( nPos );
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ rXFSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ rXFSet.Put( XFillColorItem( String(),
+ aLbColor.GetSelectEntryColor() ) );
+ }
+ // NEU
+ else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) )
+ {
+ rXFSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetValue() );
+ rXFSet.Put( XFillColorItem( String(), aColor ) );
+ }
+ else
+ rXFSet.Put( XFillStyleItem( XFILL_NONE ) );
+
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlXRectPreview.Invalidate();
+
+ return( 0L );
+}
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ClickGradientHdl_Impl, void *, EMPTYARG )
+{
+ aTsbTile.Hide();
+ aTsbStretch.Hide();
+ aTsbScale.Hide();
+ aTsbOriginal.Hide();
+ aFtXSize.Hide();
+ aMtrFldXSize.Hide();
+ aFtYSize.Hide();
+ aMtrFldYSize.Hide();
+ aGrpSize.Hide();
+ aRbtRow.Hide();
+ aRbtColumn.Hide();
+ aMtrFldOffset.Hide();
+ aGrpOffset.Hide();
+ aCtlPosition.Hide();
+ aFtXOffset.Hide();
+ aMtrFldXOffset.Hide();
+ aFtYOffset.Hide();
+ aMtrFldYOffset.Hide();
+ aGrpPosition.Hide();
+
+ aLbColor.Hide();
+ aLbGradient.Enable();
+ aLbGradient.Show();
+ aLbHatching.Hide();
+ aLbBitmap.Hide();
+ aCtlXRectPreview.Enable();
+ aCtlXRectPreview.Show();
+ aCtlBitmapPreview.Hide();
+ aGrpPreview.Enable();
+ aGrpPreview.Show();
+
+ aGrpStepCount.Enable();
+ aGrpStepCount.Show();
+ aTsbStepCount.Enable();
+ aTsbStepCount.Show();
+ aNumFldStepCount.Show();
+
+ // Controls for Hatch-Background
+ aGrpHatchBckgrd.Hide();
+ aCbxHatchBckgrd.Hide();
+ aLbHatchBckgrdColor.Hide();
+
+ // Text der Tabelle setzen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL; aURL.SetSmartURL( pGradientList->GetName() );
+
+ if( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpFill.SetText( aString );
+ ModifyGradientHdl_Impl( this );
+ ModifyStepCountHdl_Impl( &aTsbStepCount );
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ModifyGradientHdl_Impl, void *, EMPTYARG )
+{
+ const SfxPoolItem* pPoolItem = NULL;
+ USHORT nPos = aLbGradient.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ // ItemSet fuellen und an XOut weiterleiten
+ XGradientEntry* pEntry = pGradientList->Get( nPos );
+
+ rXFSet.Put( XFillStyleItem( XFILL_GRADIENT ) );
+ rXFSet.Put( XFillGradientItem( String(),
+ pEntry->GetGradient() ) );
+ }
+ // NEU
+ else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) )
+ {
+ rXFSet.Put( XFillStyleItem( XFILL_GRADIENT ) );
+ rXFSet.Put( XFillGradientItem( String(), ( ( const XFillGradientItem* ) pPoolItem )->GetValue() ) );
+ }
+ else
+ rXFSet.Put( XFillStyleItem( XFILL_NONE ) );
+
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlXRectPreview.Invalidate();
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ClickHatchingHdl_Impl, void *, EMPTYARG )
+{
+ aLbColor.Hide();
+ aLbGradient.Hide();
+ aLbHatching.Enable();
+ aLbHatching.Show();
+ aLbBitmap.Hide();
+ aCtlXRectPreview.Enable();
+ aCtlXRectPreview.Show();
+ aCtlBitmapPreview.Hide();
+ aGrpPreview.Enable();
+ aGrpPreview.Show();
+
+// aGrpTransparent.Hide();
+// aLbTransparent.Hide();
+ aGrpStepCount.Hide();
+ aTsbStepCount.Hide();
+ aNumFldStepCount.Hide();
+
+ aTsbTile.Hide();
+ aTsbStretch.Hide();
+ aTsbScale.Hide();
+ aTsbOriginal.Hide();
+ aFtXSize.Hide();
+ aMtrFldXSize.Hide();
+ aFtYSize.Hide();
+ aMtrFldYSize.Hide();
+ aGrpSize.Hide();
+ aRbtRow.Hide();
+ aRbtColumn.Hide();
+ aMtrFldOffset.Hide();
+ aGrpOffset.Hide();
+ aCtlPosition.Hide();
+ aFtXOffset.Hide();
+ aMtrFldXOffset.Hide();
+ aFtYOffset.Hide();
+ aMtrFldYOffset.Hide();
+ aGrpPosition.Hide();
+
+ // Controls for Hatch-Background
+ aGrpHatchBckgrd.Show();
+ aCbxHatchBckgrd.Show();
+ aLbHatchBckgrdColor.Show();
+ aGrpHatchBckgrd.Enable();
+ aCbxHatchBckgrd.Enable();
+ aLbHatchBckgrdColor.Enable();
+
+ // Text der Tabelle setzen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL; aURL.SetSmartURL( pHatchingList->GetName() );
+
+ if( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpFill.SetText( aString );
+ ModifyHatchingHdl_Impl( this );
+ ModifyHatchBckgrdColorHdl_Impl( this );
+ ToggleHatchBckgrdColorHdl_Impl( this );
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG )
+{
+ const SfxPoolItem* pPoolItem = NULL;
+ USHORT nPos = aLbHatching.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ // ItemSet fuellen und an XOut weiterleiten
+ XHatchEntry* pEntry = pHatchingList->Get( nPos );
+
+ rXFSet.Put( XFillStyleItem( XFILL_HATCH ) );
+ rXFSet.Put( XFillHatchItem( String(), pEntry->GetHatch() ) );
+ }
+ // NEU
+ else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) )
+ {
+ rXFSet.Put( XFillStyleItem( XFILL_HATCH ) );
+ rXFSet.Put( XFillHatchItem( String(), ( ( const XFillHatchItem* ) pPoolItem )->GetValue() ) );
+ }
+ else
+ rXFSet.Put( XFillStyleItem( XFILL_NONE ) );
+
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlXRectPreview.Invalidate();
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl, void *, EMPTYARG )
+{
+ const SfxPoolItem* pPoolItem = NULL;
+ USHORT nPos = aLbHatchBckgrdColor.GetSelectEntryPos();
+ aLbColor.SelectEntryPos( nPos );
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+// rXFSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ rXFSet.Put( XFillColorItem( String(),
+ aLbHatchBckgrdColor.GetSelectEntryColor() ) );
+ }
+ // NEU
+ else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) )
+ {
+// rXFSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetValue() );
+ rXFSet.Put( XFillColorItem( String(), aColor ) );
+ }
+ else
+ rXFSet.Put( XFillStyleItem( XFILL_NONE ) );
+
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlXRectPreview.Invalidate();
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ToggleHatchBckgrdColorHdl_Impl, void *, EMPTYARG )
+{
+ // switch on/off backgroundcolor for hatches
+ aLbHatchBckgrdColor.Enable( aCbxHatchBckgrd.IsChecked() );
+
+ XFillBackgroundItem aItem( aCbxHatchBckgrd.IsChecked() );
+ rXFSet.Put ( aItem, XATTR_FILLBACKGROUND );
+
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlXRectPreview.Invalidate();
+
+ if( aLbHatchBckgrdColor.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
+ {
+ if ( SFX_ITEM_SET == rOutAttrs.GetItemState( XATTR_FILLCOLOR ) )//>= SFX_ITEM_DEFAULT )
+ {
+ XFillColorItem aColorItem( (const XFillColorItem&)rOutAttrs.Get( XATTR_FILLCOLOR ) );
+ aLbHatchBckgrdColor.SelectEntry( aColorItem.GetValue() );
+ }
+ }
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ClickBitmapHdl_Impl, void *, EMPTYARG )
+{
+ aLbColor.Hide();
+ aLbGradient.Hide();
+ aLbHatching.Hide();
+ aLbBitmap.Enable();
+ aLbBitmap.Show();
+ aCtlBitmapPreview.Enable();
+ aCtlBitmapPreview.Show();
+ aCtlXRectPreview.Hide();
+ aGrpPreview.Hide();
+// aGrpTransparent.Hide();
+// aLbTransparent.Hide();
+ aGrpStepCount.Hide();
+ aTsbStepCount.Hide();
+ aNumFldStepCount.Hide();
+
+ aTsbTile.Enable();
+ aTsbStretch.Enable();
+ aTsbScale.Enable();
+ aTsbOriginal.Enable();
+ aFtXSize.Enable();
+ aMtrFldXSize.Enable();
+ aFtYSize.Enable();
+ aMtrFldYSize.Enable();
+ aGrpSize.Enable();
+ aCtlPosition.Enable();
+ aFtXOffset.Enable();
+ aMtrFldXOffset.Enable();
+ aFtYOffset.Enable();
+ aMtrFldYOffset.Enable();
+ aGrpPosition.Enable();
+ aRbtRow.Enable();
+ aRbtColumn.Enable();
+ aMtrFldOffset.Enable();
+ aGrpOffset.Enable();
+
+ // Controls for Hatch-Background
+ aGrpHatchBckgrd.Hide();
+ aCbxHatchBckgrd.Hide();
+ aLbHatchBckgrdColor.Hide();
+
+ aTsbTile.Show();
+ aTsbStretch.Show();
+ aTsbScale.Show();
+ aTsbOriginal.Show();
+ aFtXSize.Show();
+ aMtrFldXSize.Show();
+ aFtYSize.Show();
+ aMtrFldYSize.Show();
+ aGrpSize.Show();
+ aCtlPosition.Show();
+ aFtXOffset.Show();
+ aMtrFldXOffset.Show();
+ aFtYOffset.Show();
+ aMtrFldYOffset.Show();
+ aGrpPosition.Show();
+ aRbtRow.Show();
+ aRbtColumn.Show();
+ aMtrFldOffset.Show();
+ aGrpOffset.Show();
+
+ // Text der Tabelle setzen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL; aURL.SetSmartURL( pBitmapList->GetName() );
+
+ if( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpFill.SetText( aString );
+ ModifyBitmapHdl_Impl( this );
+ ModifyTileHdl_Impl( &aTsbOriginal );
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG )
+{
+ const SfxPoolItem* pPoolItem = NULL;
+ USHORT nPos = aLbBitmap.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ // ItemSet fuellen und an XOut weiterleiten
+ XBitmapEntry* pEntry = pBitmapList->Get( nPos );
+
+ rXFSet.Put( XFillStyleItem( XFILL_BITMAP ) );
+ rXFSet.Put( XFillBitmapItem( String(), pEntry->GetXBitmap() ) );
+ }
+ // NEU
+ else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE, &pPoolItem ) )
+ {
+ rXFSet.Put( XFillStyleItem( XFILL_BITMAP ) );
+ rXFSet.Put( XFillBitmapItem( String(), ( ( const XFillBitmapItem* ) pPoolItem )->GetValue() ) );
+ }
+ else
+ rXFSet.Put( XFillStyleItem( XFILL_NONE ) );
+
+ XOutBmp.SetFillAttr( aXFillAttr );
+ aCtlBitmapPreview.Invalidate();
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+//IMPL_LINK( SvxAreaTabPage, ModifyTransparentHdl_Impl, void *, EMPTYARG )
+//{
+// USHORT nPos = aLbTransparent.GetSelectEntryPos();
+// if( nPos != LISTBOX_ENTRY_NOTFOUND )
+// {
+// XFillTransparenceItem aItem( nPos * 25 );
+//
+// rXFSet.Put( XFillTransparenceItem( aItem ) );
+// XOut.SetFillAttr( aXFillAttr );
+//
+// aCtlXRectPreview.Invalidate();
+// }
+//
+// return( 0L );
+//}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p )
+{
+ if( p == &aTsbStepCount )
+ {
+ if( aTsbStepCount.GetState() == STATE_NOCHECK )
+ aNumFldStepCount.Enable();
+ else
+ aNumFldStepCount.Disable();
+ }
+
+ UINT16 nValue = 0;
+ if( aTsbStepCount.GetState() != STATE_CHECK )
+ {
+ // Zustand != Disabled ?
+ if( aNumFldStepCount.GetText().Len() > 0 )
+ nValue = (UINT16) aNumFldStepCount.GetValue();
+ }
+ rXFSet.Put( XGradientStepCountItem( nValue ) );
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlXRectPreview.Invalidate();
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, p )
+{
+ TriState eState = aTsbTile.GetState();
+ if( eState == STATE_CHECK )
+ {
+ aTsbStretch.Disable();
+ aRbtRow.Enable();
+ aRbtColumn.Enable();
+ aMtrFldOffset.Enable();
+ aGrpOffset.Enable();
+
+ aCtlPosition.Enable();
+ aCtlPosition.Invalidate();
+ aFtXOffset.Enable();
+ aMtrFldXOffset.Enable();
+ aFtYOffset.Enable();
+ aMtrFldYOffset.Enable();
+ aGrpPosition.Enable();
+
+ aTsbScale.Enable();
+ aTsbOriginal.Enable();
+ aFtXSize.Enable();
+ aMtrFldXSize.Enable();
+ aFtYSize.Enable();
+ aMtrFldYSize.Enable();
+ aGrpSize.Enable();
+ }
+ else if( eState == STATE_NOCHECK )
+ {
+ aTsbStretch.Enable();
+ aRbtRow.Disable();
+ aRbtColumn.Disable();
+ aMtrFldOffset.Disable();
+ aGrpOffset.Disable();
+
+ aCtlPosition.Disable();
+ aCtlPosition.Invalidate();
+ aFtXOffset.Disable();
+ aMtrFldXOffset.Disable();
+ aFtYOffset.Disable();
+ aMtrFldYOffset.Disable();
+ aGrpPosition.Disable();
+
+ if( aTsbStretch.GetState() != STATE_NOCHECK )
+ {
+ aTsbScale.Disable();
+ aTsbOriginal.Disable();
+ aFtXSize.Disable();
+ aMtrFldXSize.Disable();
+ aFtYSize.Disable();
+ aMtrFldYSize.Disable();
+ aGrpSize.Disable();
+ }
+ else
+ {
+ aTsbScale.Enable();
+ aTsbOriginal.Enable();
+ aFtXSize.Enable();
+ aMtrFldXSize.Enable();
+ aFtYSize.Enable();
+ aMtrFldYSize.Enable();
+ aGrpSize.Enable();
+ }
+ }
+ else
+ {
+ aTsbStretch.Disable();
+ aRbtRow.Disable();
+ aRbtColumn.Disable();
+ aMtrFldOffset.Disable();
+ aGrpOffset.Disable();
+
+ aCtlPosition.Disable();
+ aCtlPosition.Invalidate();
+ aFtXOffset.Disable();
+ aMtrFldXOffset.Disable();
+ aFtYOffset.Disable();
+ aMtrFldYOffset.Disable();
+ aGrpPosition.Disable();
+
+ aTsbScale.Disable();
+ aTsbOriginal.Disable();
+ aFtXSize.Disable();
+ aMtrFldXSize.Disable();
+ aFtYSize.Disable();
+ aMtrFldYSize.Disable();
+ aGrpSize.Disable();
+ }
+
+ if( aTsbOriginal.GetState() == STATE_CHECK )
+ {
+ aMtrFldXSize.SetText( String() );
+ aMtrFldYSize.SetText( String() );
+ aFtXSize.Disable();
+ aFtYSize.Disable();
+ aMtrFldXSize.Disable();
+ aMtrFldYSize.Disable();
+ aTsbScale.Disable();
+ }
+ else
+ {
+ aMtrFldXSize.SetValue( aMtrFldXSize.GetValue() );
+ aMtrFldYSize.SetValue( aMtrFldYSize.GetValue() );
+ /*
+ if( eState == STATE_CHECK )
+ {
+ aFtXSize.Enable();
+ aFtYSize.Enable();
+ aMtrFldXSize.Enable();
+ aMtrFldYSize.Enable();
+ }
+ */
+ }
+
+ rXFSet.Put( XFillBmpTileItem( eState ) );
+
+ if( aTsbStretch.IsEnabled() )
+ rXFSet.Put( XFillBmpStretchItem( aTsbStretch.GetState() ) );
+
+ if( aTsbScale.IsEnabled() )
+ rXFSet.Put( XFillBmpSizeLogItem( aTsbScale.GetState() == STATE_NOCHECK ) );
+
+ if( aMtrFldXSize.IsEnabled() )
+ {
+ XFillBmpSizeXItem* pItem = NULL;
+ TriState eState = aTsbScale.GetState();
+
+ if( eState == STATE_NOCHECK )
+ pItem = new XFillBmpSizeXItem( GetCoreValue( aMtrFldXSize, ePoolUnit ) );
+ else
+ pItem = new XFillBmpSizeXItem( -labs( aMtrFldXSize.GetValue() ) );
+
+ rXFSet.Put( *pItem );
+
+ delete pItem;
+ }
+ else if( aTsbOriginal.IsEnabled() && aTsbOriginal.GetState() == STATE_CHECK )
+ {
+ // Originalgroesse -> Size == 0
+ rXFSet.Put( XFillBmpSizeXItem( 0 ) );
+ rXFSet.Put( XFillBmpSizeLogItem( TRUE ) );
+ }
+
+ if( aMtrFldYSize.IsEnabled() )
+ {
+ XFillBmpSizeYItem* pItem = NULL;
+ TriState eState = aTsbScale.GetState();
+
+ if( eState == STATE_NOCHECK )
+ pItem = new XFillBmpSizeYItem( GetCoreValue( aMtrFldYSize, ePoolUnit ) );
+ else
+ pItem = new XFillBmpSizeYItem( -labs( aMtrFldYSize.GetValue() ) );
+
+ rXFSet.Put( *pItem );
+
+ delete pItem;
+ }
+ else if( aTsbOriginal.IsEnabled() && aTsbOriginal.GetState() == STATE_CHECK )
+ {
+ // Originalgroesse -> Size == 0
+ rXFSet.Put( XFillBmpSizeYItem( 0 ) );
+ rXFSet.Put( XFillBmpSizeLogItem( TRUE ) );
+ }
+
+ if( aMtrFldOffset.IsEnabled() )
+ {
+ if( aRbtRow.IsChecked() )
+ {
+ rXFSet.Put( XFillBmpTileOffsetXItem( (UINT16) aMtrFldOffset.GetValue() ) );
+ rXFSet.Put( XFillBmpTileOffsetYItem( (UINT16) 0 ) );
+ }
+ else if( aRbtColumn.IsChecked() )
+ {
+ rXFSet.Put( XFillBmpTileOffsetXItem( (UINT16) 0 ) );
+ rXFSet.Put( XFillBmpTileOffsetYItem( (UINT16) aMtrFldOffset.GetValue() ) );
+ }
+ }
+
+ if( aCtlPosition.IsEnabled() )
+ rXFSet.Put( XFillBmpPosItem( aCtlPosition.GetActualRP() ) );
+
+ if( aMtrFldXOffset.IsEnabled() )
+ rXFSet.Put( XFillBmpPosOffsetXItem( (UINT16) aMtrFldXOffset.GetValue() ) );
+
+ if( aMtrFldYOffset.IsEnabled() )
+ rXFSet.Put( XFillBmpPosOffsetYItem( (UINT16) aMtrFldYOffset.GetValue() ) );
+
+
+ XOutBmp.SetFillAttr( aXFillAttr );
+ aCtlBitmapPreview.Invalidate();
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAreaTabPage, ClickScaleHdl_Impl, void *, p )
+{
+ if( aTsbScale.GetState() == STATE_CHECK )
+ {
+ aMtrFldXSize.SetDecimalDigits( 0 );
+ aMtrFldXSize.SetUnit( FUNIT_CUSTOM );
+ aMtrFldXSize.SetValue( 100 );
+ aMtrFldXSize.SetMax( 100 );
+ aMtrFldXSize.SetLast( 100 );
+
+ aMtrFldYSize.SetDecimalDigits( 0 );
+ aMtrFldYSize.SetUnit( FUNIT_CUSTOM );
+ aMtrFldYSize.SetValue( 100 );
+ aMtrFldYSize.SetMax( 100 );
+ aMtrFldYSize.SetLast( 100 );
+ }
+ else
+ {
+ aMtrFldXSize.SetDecimalDigits( 2 );
+ aMtrFldXSize.SetUnit( eFUnit );
+ aMtrFldXSize.SetValue( 100 );
+ aMtrFldXSize.SetMax( 999900 );
+ aMtrFldXSize.SetLast( 100000 );
+
+ aMtrFldYSize.SetDecimalDigits( 2 );
+ aMtrFldYSize.SetUnit( eFUnit );
+ aMtrFldYSize.SetValue( 100 );
+ aMtrFldYSize.SetMax( 999900 );
+ aMtrFldYSize.SetLast( 100000 );
+ }
+
+ ModifyTileHdl_Impl( NULL );
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+void SvxAreaTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt )
+{
+ eRP = eRcPt;
+
+ // Ausrichtung der Bitmapfuellung
+ ModifyTileHdl_Impl( pWindow );
+}
+
+
diff --git a/svx/source/dialog/tpbitmap.cxx b/svx/source/dialog/tpbitmap.cxx
new file mode 100644
index 0000000000..bcc256386b
--- /dev/null
+++ b/svx/source/dialog/tpbitmap.cxx
@@ -0,0 +1,1057 @@
+/*************************************************************************
+ *
+ * $RCSfile: tpbitmap.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:12 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ---------------------------------------------------------------
+
+//svdraw.hxx
+#define _SVDRAW_HXX
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+#define _SDR_NOOBJECTS
+#define _SDR_NOVIEWS
+#define _SDR_NOVIEWMARKER
+#define _SDR_NODRAGMETHODS
+#define _SDR_NOUNDO
+#define _SDR_NOXOUTDEV
+
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.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 _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_TPBITMAP_CXX
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_BITMAP_LIST SID_BITMAP_LIST
+
+#include "dialogs.hrc"
+
+#include "xattr.hxx"
+#include "xpool.hxx"
+#include "xtable.hxx"
+#include "xoutbmp.hxx"
+#include "drawitem.hxx"
+#include "tabarea.hxx"
+#include "tabarea.hrc"
+#include "dlgname.hxx"
+#include "dlgname.hrc"
+#include "dialmgr.hxx"
+#include "impgrf.hxx"
+
+#define DLGWIN this->GetParent()->GetParent()
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern und Definieren der Bitmaps
+|*
+\************************************************************************/
+
+SvxBitmapTabPage::SvxBitmapTabPage
+(
+ Window* pParent,
+ const SfxItemSet& rInAttrs
+) :
+
+ SvxTabPage ( pParent, SVX_RES( RID_SVXPAGE_BITMAP ), rInAttrs ),
+
+ pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
+ XOut ( &aCtlPreview ),
+ aXFillAttr ( pXPool ),
+ rXFSet ( aXFillAttr.GetItemSet() ),
+ aXFStyleItem ( XFILL_BITMAP ),
+ aXBitmapItem ( String(), XOBitmap() ),
+
+ aCtlPixel ( this, ResId( CTL_PIXEL ) ),
+ aGrpPixelEdit ( this, ResId( GRP_PIXEL_EDIT ) ),
+ aFtColor ( this, ResId( FT_COLOR ) ),
+ aLbColor ( this, ResId( LB_COLOR ) ),
+ aFtBackgroundColor ( this, ResId( FT_BACKGROUND_COLOR ) ),
+ aLbBackgroundColor ( this, ResId( LB_BACKGROUND_COLOR ) ),
+ aGrpColor ( this, ResId( GRP_COLOR ) ),
+ aLbBitmaps ( this, ResId( LB_BITMAPS ) ),
+ aGrpBitmaps ( this, ResId( GRP_BITMAPS ) ),
+ aCtlPreview ( this, ResId( CTL_PREVIEW ), &XOut ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ aBtnAdd ( this, ResId( BTN_ADD ) ),
+ aBtnImport ( this, ResId( BTN_IMPORT ) ),
+ aBtnModify ( this, ResId( BTN_MODIFY ) ),
+ aBtnDelete ( this, ResId( BTN_DELETE ) ),
+ aBtnLoad ( this, ResId( BTN_LOAD ) ),
+ aBtnSave ( this, ResId( BTN_SAVE ) ),
+ aBitmapCtl ( this, aCtlPreview.GetSizePixel() ),
+ rOutAttrs ( rInAttrs )
+
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ // Setzen des Output-Devices
+ rXFSet.Put( aXFStyleItem );
+ rXFSet.Put( aXBitmapItem );
+ //XOut.SetFillAttr( aXFillAttr );
+
+ // Setzen der Linie auf None im OutputDevice
+ XLineAttrSetItem aXLineAttr( pXPool );
+ aXLineAttr.GetItemSet().Put( XLineStyleItem( XLINE_NONE ) );
+ XOut.SetLineAttr( aXLineAttr );
+
+ aBtnAdd.SetClickHdl( LINK( this, SvxBitmapTabPage, ClickAddHdl_Impl ) );
+ aBtnImport.SetClickHdl(
+ LINK( this, SvxBitmapTabPage, ClickImportHdl_Impl ) );
+ aBtnModify.SetClickHdl(
+ LINK( this, SvxBitmapTabPage, ClickModifyHdl_Impl ) );
+ aBtnDelete.SetClickHdl(
+ LINK( this, SvxBitmapTabPage, ClickDeleteHdl_Impl ) );
+ aBtnLoad.SetClickHdl( LINK( this, SvxBitmapTabPage, ClickLoadHdl_Impl ) );
+ aBtnSave.SetClickHdl( LINK( this, SvxBitmapTabPage, ClickSaveHdl_Impl ) );
+
+ aLbBitmaps.SetSelectHdl(
+ LINK( this, SvxBitmapTabPage, ChangeBitmapHdl_Impl ) );
+ aLbColor.SetSelectHdl(
+ LINK( this, SvxBitmapTabPage, ChangePixelColorHdl_Impl ) );
+ aLbBackgroundColor.SetSelectHdl(
+ LINK( this, SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl ) );
+
+ pColorTab = NULL;
+ pBitmapList = NULL;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBitmapTabPage::Construct()
+{
+ // Farbtabellen
+ aLbColor.Fill( pColorTab );
+ aLbBackgroundColor.CopyEntries( aLbColor );
+
+ // Bitmaptabelle
+ aLbBitmaps.Fill( pBitmapList );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBitmapTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ int nPos;
+ int nCount;
+
+ if( *pDlgType == 0 ) // Flaechen-Dialog
+ {
+ *pbAreaTP = FALSE;
+
+ if( pColorTab )
+ {
+ // ColorTable
+ if( *pnColorTableState & CT_CHANGED ||
+ *pnColorTableState & CT_MODIFIED )
+ {
+ if( *pnColorTableState & CT_CHANGED )
+ pColorTab = ( (SvxAreaTabDialog*) DLGWIN )->GetNewColorTable();
+
+ // LbColor
+ nPos = aLbColor.GetSelectEntryPos();
+ aLbColor.Clear();
+ aLbColor.Fill( pColorTab );
+ nCount = aLbColor.GetEntryCount();
+ if( nCount == 0 )
+ ; // Dieser Fall sollte nicht auftreten
+ else if( nCount <= nPos )
+ aLbColor.SelectEntryPos( 0 );
+ else
+ aLbColor.SelectEntryPos( nPos );
+
+ // LbColorBackground
+ nPos = aLbBackgroundColor.GetSelectEntryPos();
+ aLbBackgroundColor.Clear();
+ aLbBackgroundColor.CopyEntries( aLbColor );
+ nCount = aLbBackgroundColor.GetEntryCount();
+ if( nCount == 0 )
+ ; // Dieser Fall sollte nicht auftreten
+ else if( nCount <= nPos )
+ aLbBackgroundColor.SelectEntryPos( 0 );
+ else
+ aLbBackgroundColor.SelectEntryPos( nPos );
+
+ ChangePixelColorHdl_Impl( this );
+ ChangeBackgrndColorHdl_Impl( this );
+ }
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL( pBitmapList->GetName(), INET_PROT_FILE );
+
+ if( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpBitmaps.SetText( aString );
+
+ if( *pPageType == PT_BITMAP && *pPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aLbBitmaps.SelectEntryPos( *pPos );
+ }
+ // Farben koennten geloescht worden sein
+ ChangeBitmapHdl_Impl( this );
+
+ *pPageType = PT_BITMAP;
+ *pPos = LISTBOX_ENTRY_NOTFOUND;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxBitmapTabPage::DeactivatePage( SfxItemSet* pSet)
+{
+ if ( CheckChanges_Impl() == -1L )
+ return KEEP_PAGE;
+
+ FillItemSet( *pSet );
+
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxBitmapTabPage::FillItemSet( SfxItemSet& rOutAttrs )
+{
+ if( *pDlgType == 0 && *pbAreaTP == FALSE ) // Flaechen-Dialog
+ {
+ if( *pPageType == PT_BITMAP )
+ {
+ // CheckChanges_Impl(); <-- doppelte Abfrage ?
+
+ XOBitmap aXOBitmap;
+ String aString;
+ USHORT nPos = aLbBitmaps.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aXOBitmap = pBitmapList->Get( nPos )->GetXBitmap();
+ aString = aLbBitmaps.GetSelectEntry();
+
+ }
+ else
+ {
+ aXOBitmap = aBitmapCtl.GetXBitmap();
+ }
+ rOutAttrs.Put( XFillStyleItem( XFILL_BITMAP ) );
+ rOutAttrs.Put( XFillBitmapItem( aString, aXOBitmap ) );
+ }
+ }
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBitmapTabPage::Reset( const SfxItemSet& rOutAttrs )
+{
+ // aLbBitmaps.SelectEntryPos( 0 );
+
+ aBitmapCtl.SetLines( aCtlPixel.GetLineCount() );
+ aBitmapCtl.SetPixelColor( aLbColor.GetSelectEntryColor() );
+ aBitmapCtl.SetBackgroundColor( aLbBackgroundColor.GetSelectEntryColor() );
+ aBitmapCtl.SetBmpArray( aCtlPixel.GetPixelPtr() );
+
+ // Bitmap holen und darstellen
+ XFillBitmapItem aBmpItem( (const String &) String(), aBitmapCtl.GetXBitmap() );
+ rXFSet.Put( aBmpItem );
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlPreview.Invalidate();
+
+ ChangeBitmapHdl_Impl( this );
+
+ // Status der Buttons ermitteln
+ if( pBitmapList->Count() )
+ {
+ aBtnAdd.Enable();
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxBitmapTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return new SvxBitmapTabPage( pWindow, rOutAttrs );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG )
+{
+ XOBitmap* pXOBitmap = NULL;
+ int nPos = aLbBitmaps.GetSelectEntryPos();
+
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ pXOBitmap = new XOBitmap( ( (XBitmapEntry*) pBitmapList->Get( nPos ) )->GetXBitmap() );
+ else
+ {
+ const SfxPoolItem* pPoolItem = NULL;
+ if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) )
+ {
+ XFillStyle eXFS = (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue();
+ if( ( XFILL_BITMAP == eXFS ) &&
+ ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE, &pPoolItem ) ) )
+ {
+ pXOBitmap = new XOBitmap( ( ( const XFillBitmapItem* ) pPoolItem )->GetValue() );
+ }
+ }
+ if( !pXOBitmap )
+ {
+ aLbBitmaps.SelectEntryPos( 0 );
+ nPos = aLbBitmaps.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ pXOBitmap = new XOBitmap( ( (XBitmapEntry*) pBitmapList->Get( nPos ) )->GetXBitmap() );
+ }
+ }
+ if( pXOBitmap )
+ {
+ //WorkWindow aTmpWW( DLGWIN );
+ //VirtualDevice aVD( aTmpWW );
+ //USHORT nLines = aCtlPixel.GetLineCount();
+ //Color aPixelColor, aBackColor;
+ //BOOL bPixelColor = FALSE;
+ //USHORT nWidth = pBitmap->GetSizePixel().Width();
+ //USHORT nHeight = pBitmap->GetSizePixel().Height();
+
+ aLbColor.SetNoSelection();
+ aLbBackgroundColor.SetNoSelection();
+
+ if( pXOBitmap->GetBitmapType() == XBITMAP_IMPORT )
+ {
+ aCtlPixel.Reset();
+ aCtlPixel.SetPaintable( FALSE );
+ aCtlPixel.Disable();
+ aGrpPixelEdit.Disable();
+ aFtColor.Disable();
+ aLbColor.Disable();
+ aGrpColor.Disable();
+ aFtBackgroundColor.Disable();
+ aLbBackgroundColor.Disable();
+ aBtnModify.Disable();
+ aBtnAdd.Disable();
+ }
+ else if( pXOBitmap->GetBitmapType() == XBITMAP_8X8 )
+ {
+ aCtlPixel.SetPaintable( TRUE );
+ aCtlPixel.Enable();
+ aGrpPixelEdit.Enable();
+ aFtColor.Enable();
+ aLbColor.Enable();
+ aGrpColor.Enable();
+ aFtBackgroundColor.Enable();
+ aLbBackgroundColor.Enable();
+ aBtnModify.Enable();
+ aBtnAdd.Enable();
+
+ // Setzen des PixelControls
+ aCtlPixel.SetXBitmap( *pXOBitmap );
+
+ Color aPixelColor = pXOBitmap->GetPixelColor();
+ Color aBackColor = pXOBitmap->GetBackgroundColor();
+
+ aBitmapCtl.SetPixelColor( aPixelColor );
+ aBitmapCtl.SetBackgroundColor( aBackColor );
+
+ // Wenn der Eintrag nicht in der Listbox ist, wird die Farbe
+ // temporaer hinzugenommen
+ if( 0 == aLbBitmaps.GetSelectEntryPos() )
+ {
+ aLbColor.SelectEntry( Color( COL_BLACK ) );
+ ChangePixelColorHdl_Impl( this );
+ }
+ else
+ aLbColor.SelectEntry( aPixelColor );
+ if( aLbColor.GetSelectEntryCount() == 0 )
+ {
+ aLbColor.InsertEntry( aPixelColor, String() );
+ aLbColor.SelectEntry( aPixelColor );
+ }
+ aLbBackgroundColor.SelectEntry( aBackColor );
+ if( aLbBackgroundColor.GetSelectEntryCount() == 0 )
+ {
+ aLbBackgroundColor.InsertEntry( aBackColor, String() );
+ aLbBackgroundColor.SelectEntry( aBackColor );
+ }
+ }
+ aCtlPixel.Invalidate();
+
+ // Bitmap darstellen
+ XFillBitmapItem aXBmpItem( (const String &) String(), *pXOBitmap );
+ rXFSet.Put( aXBmpItem );
+
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlPreview.Invalidate();
+
+ bBmpChanged = FALSE;
+ delete pXOBitmap;
+ }
+ return 0L;
+}
+
+// -----------------------------------------------------------------------
+
+long SvxBitmapTabPage::CheckChanges_Impl()
+{
+ USHORT nPos = aLbBitmaps.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ String aString = aLbBitmaps.GetSelectEntry();
+
+ if( bBmpChanged )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ SvxMessDialog aMessDlg( DLGWIN,
+ String( ResId( RID_SVXSTR_BITMAP, pMgr ) ),
+ String( ResId( RID_SVXSTR_ASK_CHANGE_BITMAP, pMgr ) ),
+ &(WarningBox::GetStandardImage()) );
+
+ aMessDlg.SetButtonText( MESS_BTN_1,
+ String( ResId( RID_SVXSTR_CHANGE, pMgr ) ) );
+ aMessDlg.SetButtonText( MESS_BTN_2,
+ String( ResId( RID_SVXSTR_ADD, pMgr ) ) );
+
+ short nRet = aMessDlg.Execute();
+
+ switch( nRet )
+ {
+ case RET_BTN_1: // Aendern
+ {
+ ClickModifyHdl_Impl( this );
+ }
+ break;
+
+ case RET_BTN_2: // Hinzufuegen
+ {
+ ClickAddHdl_Impl( this );
+ nPos = aLbBitmaps.GetSelectEntryPos();
+ }
+ break;
+
+ case RET_CANCEL:
+ // return( -1L );
+ break;
+ // return( TRUE ); // Abbruch
+ }
+ }
+ }
+ nPos = aLbBitmaps.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ *pPos = nPos;
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ String aNewName( ResId( RID_SVXSTR_BITMAP, pMgr ) );
+ String aDesc( ResId( RID_SVXSTR_DESC_NEW_BITMAP, pMgr ) );
+ String aName;
+
+ long nCount = pBitmapList->Count();
+ long j = 1;
+ BOOL bDifferent = FALSE;
+
+ while( !bDifferent )
+ {
+ aName = aNewName;
+ aName += sal_Unicode(' ');
+ aName += UniString::CreateFromInt32( j++ );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ if( aName == pBitmapList->Get( i )->GetName() )
+ bDifferent = FALSE;
+ }
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+ WarningBox* pWarnBox = NULL;
+ USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE;
+
+ while( pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ if( aName == pBitmapList->Get( i )->GetName() )
+ bDifferent = FALSE;
+
+ if( bDifferent ) {
+ nError = 0;
+ break;
+ }
+
+ if( !pWarnBox )
+ pWarnBox = new WarningBox( DLGWIN,
+ WinBits( WB_OK_CANCEL ),
+ String( ResId( nError, pMgr ) ) );
+
+ if( pWarnBox->Execute() != RET_OK )
+ break;
+ }
+ //Rectangle aDlgRect( pDlg->GetPosPixel(), pDlg->GetSizePixel() );
+ delete pDlg;
+ delete pWarnBox;
+
+ if( !nError )
+ {
+ XBitmapEntry* pEntry;
+ if( aCtlPixel.IsEnabled() )
+ pEntry = new XBitmapEntry( aBitmapCtl.GetXBitmap(), aName );
+ else // Es muss sich um eine nicht vorhandene importierte Bitmap handeln
+ {
+ const SfxPoolItem* pPoolItem = NULL;
+ if( SFX_ITEM_SET == rOutAttrs.GetItemState( XATTR_FILLBITMAP, TRUE, &pPoolItem ) )
+ {
+ XOBitmap aXOBitmap( ( ( const XFillBitmapItem* ) pPoolItem )->GetValue() );
+ pEntry = new XBitmapEntry( aXOBitmap, aName );
+ }
+ else { DBG_ERROR( "pEntry is undfined -> GPF" ) }
+ }
+ pBitmapList->Insert( pEntry );
+
+ aLbBitmaps.Append( pEntry );
+ aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
+
+#ifdef WNT
+ // hack: #31355# W.P.
+ Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() );
+ if( TRUE ) { // ??? overlapped with pDlg
+ // and srolling
+ Invalidate( aRect );
+ //aLbBitmaps.Invalidate();
+ }
+#endif
+
+ // Flag fuer modifiziert setzen
+ *pnBitmapListState |= CT_MODIFIED;
+
+ ChangeBitmapHdl_Impl( this );
+ }
+
+ // Status der Buttons ermitteln
+ if( pBitmapList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ return 0L;
+}
+
+
+/******************************************************************************/
+/******************************************************************************/
+
+
+//------------------------------------------------------------------------
+
+#ifdef WNT
+#pragma optimize ( "", off )
+#endif
+
+IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ SvxImportGraphicDialog* pDlg = new SvxImportGraphicDialog( DLGWIN,
+ UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Import" ) ), ENABLE_STANDARD );
+
+ if( pDlg->Execute() == RET_OK )
+ {
+ Graphic aGraphic;
+ GraphicFilter& rFilter = pDlg->GetFilter();
+ INetURLObject aURL; aURL.SetSmartURL( pDlg->GetPath() );
+ String aPath( aURL.PathToFileName() );
+ SvFileStream aIStm( aPath, STREAM_READ | STREAM_SHARE_DENYNONE );
+
+ EnterWait();
+ USHORT nError = rFilter.ImportGraphic( aGraphic, aPath, aIStm );
+ LeaveWait();
+
+ if( !nError )
+ {
+ String aName( aURL.getName() );
+ String aDesc( ResId(RID_SVXSTR_DESC_EXT_BITMAP, pMgr) );
+ WarningBox* pWarnBox = NULL;
+ SvxNameDialog* pDlg =
+ new SvxNameDialog( DLGWIN, aName, aDesc );
+ nError = RID_SVXSTR_WARN_NAME_DUPLICATE;
+
+ while( pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+
+ BOOL bDifferent = TRUE;
+ long nCount = pBitmapList->Count();
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ if( aName == pBitmapList->Get( i )->GetName() )
+ bDifferent = FALSE;
+
+ if( bDifferent ) {
+ nError = 0;
+ break;
+ }
+
+ if( !pWarnBox )
+ pWarnBox = new WarningBox( DLGWIN,
+ WinBits( WB_OK_CANCEL ),
+ String( ResId( nError, pMgr ) ) );
+
+ if( pWarnBox->Execute() != RET_OK )
+ break;
+ }
+ //Rectangle aDlgRect( pDlg->GetPosPixel(), pDlg->GetSizePixel() );
+ delete pDlg;
+ delete pWarnBox;
+
+ if( !nError )
+ {
+ Bitmap aBmp( aGraphic.GetBitmap() );
+ XBitmapEntry* pEntry =
+ new XBitmapEntry( XOBitmap( aBmp ), aName );
+ pBitmapList->Insert( pEntry );
+
+ aLbBitmaps.Append( pEntry );
+ aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
+
+#ifdef WNT
+ // hack: #31355# W.P.
+ Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() );
+ if( TRUE ) { // ??? overlapped with pDlg
+ // and srolling
+ Invalidate( aRect );
+ //aLbBitmaps.Invalidate();
+ }
+#endif
+
+ // Flag fuer modifiziert setzen
+ *pnBitmapListState |= CT_MODIFIED;
+
+ ChangeBitmapHdl_Impl( this );
+ }
+ }
+ else
+ // Graphik konnte nicht geladen werden
+ ErrorBox( DLGWIN,
+ WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_READ_DATA_ERROR, pMgr ) ) ).Execute();
+ }
+ delete pDlg;
+
+ return 0L;
+}
+
+#ifdef WNT
+#pragma optimize ( "", on )
+#endif
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbBitmaps.GetSelectEntryPos();
+
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ String aNewName( ResId( RID_SVXSTR_BITMAP, pMgr ) );
+ String aDesc( ResId( RID_SVXSTR_DESC_NEW_BITMAP, pMgr ) );
+ String aName( pBitmapList->Get( nPos )->GetName() );
+ String aOldName = aName;
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+
+ long nCount = pBitmapList->Count();
+ BOOL bDifferent = FALSE;
+ BOOL bLoop = TRUE;
+
+ while( bLoop && pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ {
+ if( aName == pBitmapList->Get( i )->GetName() &&
+ aName != aOldName )
+ bDifferent = FALSE;
+ }
+
+ if( bDifferent )
+ {
+ bLoop = FALSE;
+ XBitmapEntry* pEntry = pBitmapList->Get( nPos );
+
+ pEntry->SetName( aName );
+ pEntry->SetXBitmap( aBitmapCtl.GetXBitmap() );
+
+ aLbBitmaps.Modify( pEntry, nPos );
+ aLbBitmaps.SelectEntryPos( nPos );
+
+ // Flag fuer modifiziert setzen
+ *pnBitmapListState |= CT_MODIFIED;
+
+ bBmpChanged = FALSE;
+ }
+ else
+ WarningBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, pMgr ) ) ).Execute();
+ }
+ delete pDlg;
+ }
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBitmapTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbBitmaps.GetSelectEntryPos();
+
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ),
+//! SVX_RES( RID_SVXSTR_DEL_BITMAP ),
+ String( SVX_RES( RID_SVXSTR_ASK_DEL_BITMAP ) ) );
+
+ if( aQueryBox.Execute() == RET_YES )
+ {
+ delete pBitmapList->Remove( nPos );
+ aLbBitmaps.RemoveEntry( nPos );
+ aLbBitmaps.SelectEntryPos( 0 );
+
+ aCtlPreview.Invalidate();
+ aCtlPixel.Invalidate();
+
+ ChangeBitmapHdl_Impl( this );
+
+ // Flag fuer modifiziert setzen
+ *pnBitmapListState |= CT_MODIFIED;
+ }
+ }
+ // Status der Buttons ermitteln
+ if( !pBitmapList->Count() )
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return 0L;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, p )
+{
+ USHORT nReturn = RET_YES;
+ ResMgr* pMgr = DIALOG_MGR();
+
+ if ( *pnBitmapListState & CT_MODIFIED )
+ {
+ nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ),
+ String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, pMgr ) ) ).Execute();
+
+ if ( nReturn == RET_YES )
+ pBitmapList->Save();
+ }
+
+ if ( nReturn != RET_CANCEL )
+ {
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_OPEN | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.sob" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ String aFile( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+ pFileDlg->SetPath( aFile );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+ EnterWait();
+
+ INetURLObject aURL( pFileDlg->GetPath(), INET_PROT_FILE );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ // Tabelle speichern
+ XBitmapList* pBmpList = new XBitmapList( aPathURL.PathToFileName(), pXPool );
+ pBmpList->SetName( aURL.getName() );
+ if( pBmpList->Load() )
+ {
+ if( pBmpList )
+ {
+ // Pruefen, ob Tabelle geloescht werden darf:
+ if( pBitmapList != ( (SvxAreaTabDialog*) DLGWIN )->GetBitmapList() )
+ delete pBitmapList;
+
+ pBitmapList = pBmpList;
+ ( (SvxAreaTabDialog*) DLGWIN )->SetNewBitmapList( pBitmapList );
+
+ aLbBitmaps.Clear();
+ aLbBitmaps.Fill( pBitmapList );
+ Reset( rOutAttrs );
+
+ pBitmapList->SetName( aURL.getName() );
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( ResId( RID_SVXSTR_TABLE, pMgr ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpBitmaps.SetText( aString );
+
+ // Flag fuer gewechselt setzen
+ *pnBitmapListState |= CT_CHANGED;
+ // Flag fuer modifiziert entfernen
+ *pnBitmapListState &= ~CT_MODIFIED;
+ }
+ LeaveWait();
+ }
+ else
+ {
+ LeaveWait();
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_READ_DATA_ERROR, pMgr ) ) ).Execute();
+ }
+ }
+
+ delete pFileDlg;
+ }
+
+ // Status der Buttons ermitteln
+ if( pBitmapList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return 0L;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxBitmapTabPage, ClickSaveHdl_Impl, void *, p )
+{
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_SAVEAS | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.sob" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ INetURLObject aFile; aFile.SetSmartURL( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+
+ if( pBitmapList->GetName().Len() )
+ {
+ aFile.Append( pBitmapList->GetName() );
+
+ if( !aFile.getExtension().Len() )
+ aFile.SetExtension( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "sob" ) ) );
+ }
+
+ pFileDlg->SetPath( aFile.PathToFileName() );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+ INetURLObject aURL( pFileDlg->GetPath(), INET_PROT_FILE );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ pBitmapList->SetName( aURL.getName() );
+ pBitmapList->SetPath( aURL.PathToFileName() );
+
+ if( pBitmapList->Save() )
+ {
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpBitmaps.SetText( aString );
+
+ // Flag fuer gespeichert setzen
+ *pnBitmapListState |= CT_SAVED;
+ // Flag fuer modifiziert entfernen
+ *pnBitmapListState &= ~CT_MODIFIED;
+ }
+ else
+ {
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( SVX_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute();
+ }
+ }
+
+ delete pFileDlg;
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBitmapTabPage, ChangePixelColorHdl_Impl, void *, EMPTYARG )
+{
+ aCtlPixel.SetPixelColor( aLbColor.GetSelectEntryColor() );
+ aCtlPixel.Invalidate();
+
+ aBitmapCtl.SetPixelColor( aLbColor.GetSelectEntryColor() );
+
+ // Bitmap holen und darstellen
+ rXFSet.Put( XFillBitmapItem( String(), aBitmapCtl.GetXBitmap() ) );
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlPreview.Invalidate();
+
+ bBmpChanged = TRUE;
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl, void *, EMPTYARG )
+{
+ aCtlPixel.SetBackgroundColor( aLbBackgroundColor.GetSelectEntryColor() );
+ aCtlPixel.Invalidate();
+
+ aBitmapCtl.SetBackgroundColor( aLbBackgroundColor.GetSelectEntryColor() );
+
+ // Bitmap holen und darstellen
+ rXFSet.Put( XFillBitmapItem( String(), aBitmapCtl.GetXBitmap() ) );
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlPreview.Invalidate();
+
+ bBmpChanged = TRUE;
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+void SvxBitmapTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt )
+{
+ if( pWindow == &aCtlPixel )
+ {
+ aBitmapCtl.SetBmpArray( aCtlPixel.GetPixelPtr() );
+
+ // Bitmap holen und darstellen
+ rXFSet.Put( XFillBitmapItem( String(), aBitmapCtl.GetXBitmap() ) );
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlPreview.Invalidate();
+
+ bBmpChanged = TRUE;
+ }
+}
+
diff --git a/svx/source/dialog/tpcolor.cxx b/svx/source/dialog/tpcolor.cxx
new file mode 100644
index 0000000000..241faad305
--- /dev/null
+++ b/svx/source/dialog/tpcolor.cxx
@@ -0,0 +1,1256 @@
+/*************************************************************************
+ *
+ * $RCSfile: tpcolor.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.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
+#ifndef _SFXFILEDLG_HXX
+#include <sfx2/iodlg.hxx>
+#endif
+#ifndef _SV_COLRDLG_HXX
+#include <svtools/colrdlg.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen wg. ErrorBox
+#include <vcl/msgbox.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_TPCOLOR_CXX
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+
+#include "dialogs.hrc"
+#include "helpid.hrc"
+
+#include "xattr.hxx"
+#include "xpool.hxx"
+#include "xtable.hxx"
+#include "drawitem.hxx"
+#include "tabarea.hxx"
+#include "tabarea.hrc"
+#include "dlgname.hxx"
+#include "dlgname.hrc"
+#include "dialmgr.hxx"
+
+#define DLGWIN this->GetParent()->GetParent()
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern und Definieren der Farben
+|*
+\************************************************************************/
+
+SvxColorTabPage::SvxColorTabPage
+(
+ Window* pParent,
+ const SfxItemSet& rInAttrs
+) :
+
+ SfxTabPage ( pParent, SVX_RES( RID_SVXPAGE_COLOR ), rInAttrs ),
+
+ pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
+ XOutOld ( &aCtlPreviewOld ),
+ XOutNew ( &aCtlPreviewNew ),
+ aXFillAttr ( pXPool ),
+ rXFSet ( aXFillAttr.GetItemSet() ),
+
+ aXFStyleItem ( XFILL_SOLID ),
+ aXFillColorItem ( String(), Color( COL_BLACK ) ),
+
+ aValSetColorTable ( this, ResId( CTL_COLORTABLE ) ),
+ aGrpColorTable ( this, ResId( GRP_COLORTABLE ) ),
+ aFtName ( this, ResId( FT_NAME ) ),
+ aEdtName ( this, ResId( EDT_NAME ) ),
+ aFtColor ( this, ResId( FT_COLOR ) ),
+ aLbColor ( this, ResId( LB_COLOR ) ),
+ aLbColorModel ( this, ResId( LB_COLORMODEL ) ),
+ aFtColorModel1 ( this, ResId( FT_1 ) ),
+ aMtrFldColorModel1 ( this, ResId( MTR_FLD_1 ) ),
+ aFtColorModel2 ( this, ResId( FT_2 ) ),
+ aMtrFldColorModel2 ( this, ResId( MTR_FLD_2 ) ),
+ aFtColorModel3 ( this, ResId( FT_3 ) ),
+ aMtrFldColorModel3 ( this, ResId( MTR_FLD_3 ) ),
+ aFtColorModel4 ( this, ResId( FT_4 ) ),
+ aMtrFldColorModel4 ( this, ResId( MTR_FLD_4 ) ),
+ aGrpColorModel ( this, ResId( GRP_COLORMODEL ) ),
+ aBtnAdd ( this, ResId( BTN_ADD ) ),
+ aBtnModify ( this, ResId( BTN_MODIFY ) ),
+ aBtnWorkOn ( this, ResId( BTN_WORK_ON ) ),
+ aBtnDelete ( this, ResId( BTN_DELETE ) ),
+ aCtlPreviewOld ( this, ResId( CTL_PREVIEW_OLD ), &XOutOld ),
+ aCtlPreviewNew ( this, ResId( CTL_PREVIEW_NEW ), &XOutNew ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ aBtnLoad ( this, ResId( BTN_LOAD ) ),
+ aBtnSave ( this, ResId( BTN_SAVE ) ),
+
+ rOutAttrs ( rInAttrs ),
+ bDeleteColorTable ( TRUE ),
+ eCM ( CM_RGB )
+
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ // Setzen des Output-Devices
+ rXFSet.Put( aXFStyleItem );
+ rXFSet.Put( aXFillColorItem );
+ XOutOld.SetFillAttr( aXFillAttr );
+ XOutNew.SetFillAttr( aXFillAttr );
+
+ // Setzen der Linie auf None im OutputDevice
+ XLineAttrSetItem aXLineAttr( pXPool );
+ aXLineAttr.GetItemSet().Put( XLineStyleItem( XLINE_NONE ) );
+ XOutOld.SetLineAttr( aXLineAttr );
+ XOutNew.SetLineAttr( aXLineAttr );
+
+ // Handler ueberladen
+ aLbColor.SetSelectHdl(
+ LINK( this, SvxColorTabPage, SelectColorLBHdl_Impl ) );
+ aValSetColorTable.SetSelectHdl(
+ LINK( this, SvxColorTabPage, SelectValSetHdl_Impl ) );
+ aLbColorModel.SetSelectHdl(
+ LINK( this, SvxColorTabPage, SelectColorModelHdl_Impl ) );
+
+ Link aLink = LINK( this, SvxColorTabPage, ModifiedHdl_Impl );
+ aMtrFldColorModel1.SetModifyHdl( aLink );
+ aMtrFldColorModel2.SetModifyHdl( aLink );
+ aMtrFldColorModel3.SetModifyHdl( aLink );
+ aMtrFldColorModel4.SetModifyHdl( aLink );
+
+ aBtnAdd.SetClickHdl( LINK( this, SvxColorTabPage, ClickAddHdl_Impl ) );
+ aBtnModify.SetClickHdl(
+ LINK( this, SvxColorTabPage, ClickModifyHdl_Impl ) );
+ aBtnWorkOn.SetClickHdl(
+ LINK( this, SvxColorTabPage, ClickWorkOnHdl_Impl ) );
+ aBtnDelete.SetClickHdl(
+ LINK( this, SvxColorTabPage, ClickDeleteHdl_Impl ) );
+ aBtnLoad.SetClickHdl( LINK( this, SvxColorTabPage, ClickLoadHdl_Impl ) );
+ aBtnSave.SetClickHdl( LINK( this, SvxColorTabPage, ClickSaveHdl_Impl ) );
+
+ // ValueSet
+ aValSetColorTable.SetStyle( aValSetColorTable.GetStyle() | WB_VSCROLL | WB_ITEMBORDER );
+ aValSetColorTable.SetColCount( 8 );
+ aValSetColorTable.SetLineCount( 10 );
+ aValSetColorTable.SetExtraSpacing( 0 );
+ aValSetColorTable.Show();
+
+ pColorTab = NULL;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorTabPage::Construct()
+{
+ aLbColor.Fill( pColorTab );
+ FillValueSet_Impl( aValSetColorTable );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ if( *pDlgType == 0 ) // Flaechen-Dialog
+ {
+ *pbAreaTP = FALSE;
+
+ if( pColorTab )
+ {
+ if( *pPageType == PT_COLOR && *pPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aLbColor.SelectEntryPos( *pPos );
+ aValSetColorTable.SelectItem( aLbColor.GetSelectEntryPos() + 1 );
+ aEdtName.SetText( aLbColor.GetSelectEntry() );
+
+ ChangeColorHdl_Impl( this );
+ }
+ else if( *pPageType == PT_COLOR && *pPos == LISTBOX_ENTRY_NOTFOUND )
+ {
+ const SfxPoolItem* pPoolItem = NULL;
+ if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) )
+ {
+ aLbColorModel.SelectEntryPos( CM_RGB );
+
+ aAktuellColor.SetColor ( ( ( const XFillColorItem* ) pPoolItem )->GetValue().GetColor() );
+
+ aEdtName.SetText( ( ( const XFillColorItem* ) pPoolItem )->GetName() );
+
+ aMtrFldColorModel1.SetValue( ColorToPercent_Impl( aAktuellColor.GetRed() ) );
+ aMtrFldColorModel2.SetValue( ColorToPercent_Impl( aAktuellColor.GetGreen() ) );
+ aMtrFldColorModel3.SetValue( ColorToPercent_Impl( aAktuellColor.GetBlue() ) );
+
+ // ItemSet fuellen und an XOut weiterleiten
+ rXFSet.Put( XFillColorItem( String(), aAktuellColor ) );
+ XOutOld.SetFillAttr( aXFillAttr );
+ XOutNew.SetFillAttr( aXFillAttr );
+
+ aCtlPreviewNew.Invalidate();
+ aCtlPreviewOld.Invalidate();
+ }
+ }
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL( pColorTab->GetName(), INET_PROT_FILE );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpColorTable.SetText( aString );
+
+ // Damit evtl. geaenderte Farbe verworfen wird
+ SelectColorLBHdl_Impl( this );
+
+ *pPageType = PT_COLOR;
+ *pPos = LISTBOX_ENTRY_NOTFOUND;
+ }
+ }
+ else
+ {
+ // Buttons werden gehided, weil Paletten z.Z. nur
+ // ueber den AreaDlg funktionieren!!!
+ // ActivatePage() muss von anderen Dialogen explizit
+ // gerufen werden, da ActivatePage() nicht gerufen wird,
+ // wenn Seite als Erste im Dialog angezeigt wird
+ aBtnLoad.Hide();
+ aBtnSave.Hide();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxColorTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( CheckChanges_Impl() == -1L )
+ return( KEEP_PAGE );
+
+ FillItemSet( *pSet );
+
+ return( LEAVE_PAGE );
+}
+
+// -----------------------------------------------------------------------
+
+long SvxColorTabPage::CheckChanges_Impl()
+{
+ // wird hier benutzt, um Aenderungen NICHT zu verlieren
+
+ Color aTmpColor (aAktuellColor);
+ if (eCM != CM_RGB)
+ ConvertColorValues (aTmpColor, CM_RGB);
+
+ USHORT nPos = aLbColor.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ Color aColor = pColorTab->Get( nPos )->GetColor();
+ String aString = aLbColor.GetSelectEntry();
+
+ // aNewColor, da COL_USER != COL_irgendwas, auch wenn RGB-Werte gleich
+ // Color aNewColor( aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue() );
+
+ if( ColorToPercent_Impl( aTmpColor.GetRed() ) != ColorToPercent_Impl( aColor.GetRed() ) ||
+ ColorToPercent_Impl( aTmpColor.GetGreen() ) != ColorToPercent_Impl( aColor.GetGreen() ) ||
+ ColorToPercent_Impl( aTmpColor.GetBlue() ) != ColorToPercent_Impl( aColor.GetBlue() ) ||
+ aString != aEdtName.GetText() )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ SvxMessDialog aMessDlg( DLGWIN,
+ String( ResId( RID_SVXSTR_COLOR, pMgr ) ),
+ String( ResId( RID_SVXSTR_ASK_CHANGE_COLOR, pMgr ) ),
+ &( WarningBox::GetStandardImage() ) );
+
+ aMessDlg.SetButtonText( MESS_BTN_1,
+ String( ResId( RID_SVXSTR_CHANGE, pMgr ) ) );
+ aMessDlg.SetButtonText( MESS_BTN_2,
+ String( ResId( RID_SVXSTR_ADD, pMgr ) ) );
+
+ short nRet = aMessDlg.Execute();
+
+ switch( nRet )
+ {
+ case RET_BTN_1: // Aendern
+ {
+ ClickModifyHdl_Impl( this );
+ aColor = pColorTab->Get( nPos )->GetColor();
+ }
+ break;
+
+ case RET_BTN_2: // Hinzufuegen
+ {
+ ClickAddHdl_Impl( this );
+ nPos = aLbColor.GetSelectEntryPos();
+ aColor = pColorTab->Get( nPos )->GetColor();
+ }
+ break;
+
+ case RET_CANCEL:
+ // return( -1L ); <-- wuerde die Seite nicht verlassen
+ break;
+ // return( TRUE ); // Abbruch
+ }
+ }
+ }
+ if( *pDlgType == 0 ) // Flaechen-Dialog
+ {
+ nPos = aLbColor.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ *pPos = nPos;
+ }
+ }
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxColorTabPage::FillItemSet( SfxItemSet& rOutAttrs )
+{
+ if( ( *pDlgType != 0 ) ||
+ ( *pPageType == PT_COLOR && *pbAreaTP == FALSE ) )
+ {
+ String aString;
+ Color aColor;
+
+ // CheckChanges_Impl(); <-- doppelte Abfrage ?
+
+ USHORT nPos = aLbColor.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aColor = pColorTab->Get( nPos )->GetColor();
+ aString = aLbColor.GetSelectEntry();
+ }
+ else
+ {
+ aColor.SetColor (aAktuellColor.GetColor());
+ if (eCM != CM_RGB)
+ ConvertColorValues (aColor, CM_RGB);
+ }
+ rOutAttrs.Put( XFillColorItem( aString, aColor ) );
+ rOutAttrs.Put( XFillStyleItem( XFILL_SOLID ) );
+ }
+
+ return( TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorTabPage::Reset( const SfxItemSet& rOutAttrs )
+{
+ USHORT nState = rOutAttrs.GetItemState( XATTR_FILLCOLOR );
+
+ if ( nState >= SFX_ITEM_DEFAULT )
+ {
+ XFillColorItem aColorItem( (const XFillColorItem&)rOutAttrs.Get( XATTR_FILLCOLOR ) );
+ aLbColor.SelectEntry( aColorItem.GetValue() );
+ aValSetColorTable.SelectItem( aLbColor.GetSelectEntryPos() + 1 );
+ aEdtName.SetText( aLbColor.GetSelectEntry() );
+ }
+
+ // Farbmodell setzen
+ String aStr = GetUserData();
+ aLbColorModel.SelectEntryPos( (USHORT) aStr.ToInt32() );
+
+ ChangeColorHdl_Impl( this );
+ SelectColorModelHdl_Impl( this );
+
+ aCtlPreviewOld.Invalidate();
+
+ // Status der Buttons ermitteln
+ if( pColorTab->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnWorkOn.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnWorkOn.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxColorTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return( new SvxColorTabPage( pWindow, rOutAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+//
+// Wird aufgerufen, wenn Inhalt der MtrFileds für Farbwerte verändert wird
+//
+IMPL_LINK( SvxColorTabPage, ModifiedHdl_Impl, void *, EMPTYARG )
+{
+ // lese aktuelle MtrFields aus, wenn cmyk, dann k-Wert als Trans.-Farbe
+ aAktuellColor.SetColor ( Color( (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel4.GetValue() ),
+ (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel1.GetValue() ),
+ (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel2.GetValue() ),
+ (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel3.GetValue() ) ).GetColor() );
+
+ Color aTmpColor(aAktuellColor);
+ if (eCM != CM_RGB)
+ ConvertColorValues (aTmpColor, CM_RGB);
+
+ rXFSet.Put( XFillColorItem( String(), aTmpColor ) );
+ XOutNew.SetFillAttr( aXFillAttr );
+
+ aCtlPreviewNew.Invalidate();
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+//
+// Button 'Hinzufügen'
+//
+IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ String aDesc( ResId( RID_SVXSTR_DESC_COLOR, pMgr ) );
+ String aName( aEdtName.GetText() );
+ XColorEntry* pEntry;
+ long nCount = pColorTab->Count();
+ BOOL bDifferent = TRUE;
+
+ // Pruefen, ob Name schon vorhanden ist
+ for ( long i = 0; i < nCount && bDifferent; i++ )
+ if ( aName == pColorTab->Get( i )->GetName() )
+ bDifferent = FALSE;
+
+ // Wenn ja, wird wiederholt ein neuer Name angefordert
+ if ( !bDifferent )
+ {
+ WarningBox aWarningBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, pMgr ) ) );
+ aWarningBox.Execute();
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+ BOOL bLoop = TRUE;
+
+ while ( !bDifferent && bLoop && pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ {
+ if( aName == pColorTab->Get( i )->GetName() )
+ bDifferent = FALSE;
+ }
+
+ if( bDifferent )
+ bLoop = FALSE;
+ else
+ aWarningBox.Execute();
+ }
+ delete( pDlg );
+ }
+
+ // Wenn nicht vorhanden, wird Eintrag aufgenommen
+ if( bDifferent )
+ {
+ if (eCM != CM_RGB)
+ ConvertColorValues (aAktuellColor, CM_RGB);
+ pEntry = new XColorEntry( aAktuellColor, aName );
+
+ pColorTab->Insert( pColorTab->Count(), pEntry );
+
+ aLbColor.Append( pEntry );
+ aValSetColorTable.InsertItem( aValSetColorTable.GetItemCount() + 1,
+ pEntry->GetColor(), pEntry->GetName() );
+
+ aLbColor.SelectEntryPos( aLbColor.GetEntryCount() - 1 );
+
+ // Flag fuer modifiziert setzen
+ *pnColorTableState |= CT_MODIFIED;
+
+ SelectColorLBHdl_Impl( this );
+ }
+ // Status der Buttons ermitteln
+ if( pColorTab->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnWorkOn.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+//
+// Button 'Ändern'
+//
+IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbColor.GetSelectEntryPos();
+
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ String aDesc( ResId( RID_SVXSTR_DESC_COLOR, pMgr ) );
+ String aName( aEdtName.GetText() );
+ long nCount = pColorTab->Count();
+ BOOL bDifferent = TRUE;
+
+ // Pruefen, ob Name schon vorhanden ist
+ for ( long i = 0; i < nCount && bDifferent; i++ )
+ if ( aName == pColorTab->Get( i )->GetName() && nPos != i )
+ bDifferent = FALSE;
+
+ // Wenn ja, wird wiederholt ein neuer Name angefordert
+ if ( !bDifferent )
+ {
+ WarningBox aWarningBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, pMgr ) ) );
+ aWarningBox.Execute();
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+ BOOL bLoop = TRUE;
+
+ while ( !bDifferent && bLoop && pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+ bDifferent = TRUE;
+
+ for ( long i = 0; i < nCount && bDifferent; i++ )
+ if( aName == pColorTab->Get( i )->GetName() && nPos != i )
+ bDifferent = FALSE;
+
+ if( bDifferent )
+ bLoop = FALSE;
+ else
+ aWarningBox.Execute();
+ }
+ delete( pDlg );
+ }
+
+ // Wenn nicht vorhanden, wird Eintrag aufgenommen
+ if( bDifferent )
+ {
+ XColorEntry* pEntry = pColorTab->Get( nPos );
+
+ Color aTmpColor (aAktuellColor);
+ if (eCM != CM_RGB)
+ ConvertColorValues (aTmpColor, CM_RGB);
+
+ pEntry->SetColor( aTmpColor );
+ pEntry->SetName( aName );
+
+ aLbColor.Modify( pEntry, nPos );
+ aLbColor.SelectEntryPos( nPos );
+ /////
+ aValSetColorTable.SetItemColor( nPos + 1, pEntry->GetColor() );
+ aValSetColorTable.SetItemText( nPos + 1, pEntry->GetName() );
+ aEdtName.SetText( aName );
+
+ aCtlPreviewOld.Invalidate();
+
+ // Flag fuer modifiziert setzen
+ *pnColorTableState |= CT_MODIFIED;
+ }
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+//
+// Button 'Bearbeiten'
+//
+IMPL_LINK( SvxColorTabPage, ClickWorkOnHdl_Impl, void *, EMPTYARG )
+{
+ SvColorDialog* pColorDlg = new SvColorDialog( DLGWIN );
+
+ Color aTmpColor (aAktuellColor);
+ if (eCM != CM_RGB)
+ ConvertColorValues (aTmpColor, CM_RGB);
+
+ pColorDlg->SetColor (aTmpColor);
+
+ if( pColorDlg->Execute() == RET_OK )
+ {
+ USHORT nK = 0;
+ Color aPreviewColor = pColorDlg->GetColor();
+ aAktuellColor = aPreviewColor;
+ if (eCM != CM_RGB)
+ ConvertColorValues (aAktuellColor, eCM);
+
+ aMtrFldColorModel1.SetValue( ColorToPercent_Impl( aAktuellColor.GetRed() ) );
+ aMtrFldColorModel2.SetValue( ColorToPercent_Impl( aAktuellColor.GetGreen() ) );
+ aMtrFldColorModel3.SetValue( ColorToPercent_Impl( aAktuellColor.GetBlue() ) );
+ aMtrFldColorModel4.SetValue( ColorToPercent_Impl( nK ) );
+
+ // ItemSet fuellen und an XOut weiterleiten
+ rXFSet.Put( XFillColorItem( String(), aPreviewColor ) );
+ //XOutOld.SetFillAttr( aXFillAttr );
+ XOutNew.SetFillAttr( aXFillAttr );
+
+ aCtlPreviewNew.Invalidate();
+ }
+ delete( pColorDlg );
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+//
+// Button 'Loeschen'
+//
+IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbColor.GetSelectEntryPos();
+
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ),
+ String( SVX_RES( RID_SVXSTR_ASK_DEL_COLOR ) ) );
+
+ if( aQueryBox.Execute() == RET_YES )
+ {
+ // Jetzt wird richtig geloescht
+ ULONG nCount = pColorTab->Count() - 1;
+ XColorEntry* pEntry;
+
+ pEntry = pColorTab->Remove( nPos );
+ DBG_ASSERT( pEntry, "ColorEntry nicht vorhanden (1) !" );
+ delete pEntry;
+
+ for( ULONG i = nPos; i < nCount; i++ )
+ {
+ pEntry = pColorTab->Remove( i + 1 );
+ DBG_ASSERT( pEntry, "ColorEntry nicht vorhanden (2) !" );
+ pColorTab->Insert( i, pEntry );
+ }
+
+ // Listbox und ValueSet aktualisieren
+ aLbColor.RemoveEntry( nPos );
+ aValSetColorTable.Clear();
+ FillValueSet_Impl( aValSetColorTable );
+
+ // Positionieren
+ aLbColor.SelectEntryPos( nPos );
+ SelectColorLBHdl_Impl( this );
+
+ aCtlPreviewOld.Invalidate();
+
+ // Flag fuer modifiziert setzen
+ *pnColorTableState |= CT_MODIFIED;
+ }
+ }
+ // Status der Buttons ermitteln
+ if( !pColorTab->Count() )
+ {
+ aBtnModify.Disable();
+ aBtnWorkOn.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+
+//
+// Button 'Farbtabelle laden'
+//
+IMPL_LINK( SvxColorTabPage, ClickLoadHdl_Impl, void *, p )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ USHORT nReturn = RET_YES;
+
+ if( *pnColorTableState & CT_MODIFIED )
+ {
+ nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ),
+ String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, pMgr ) ) ).Execute();
+
+ if ( nReturn == RET_YES )
+ pColorTab->Save();
+ }
+
+ if ( nReturn != RET_CANCEL )
+ {
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_OPEN | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.soc" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ String aFile( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+ pFileDlg->SetPath( aFile );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+ INetURLObject aURL( pFileDlg->GetPath(), INET_PROT_FILE );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ // Tabelle speichern
+ XColorTable* pColTab = new XColorTable( aPathURL.PathToFileName(), pXPool );
+ pColTab->SetName( aURL.getName() ); // XXX
+ if( pColTab->Load() )
+ {
+ if( pColTab )
+ {
+ // Pruefen, ob Tabelle geloescht werden darf:
+ if( pColorTab != ( (SvxAreaTabDialog*) DLGWIN )->GetColorTable() )
+ {
+ if( bDeleteColorTable )
+ delete pColorTab;
+ else
+ bDeleteColorTable = TRUE;
+ }
+
+ pColorTab = pColTab;
+ ( (SvxAreaTabDialog*) DLGWIN )->SetNewColorTable( pColorTab );
+
+ aLbColor.Clear();
+ aValSetColorTable.Clear();
+ Construct();
+ Reset( rOutAttrs );
+
+ pColorTab->SetName( aURL.getName() );
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( ResId( RID_SVXSTR_TABLE, pMgr ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpColorTable.SetText( aString );
+
+ // Flag fuer gewechselt setzen
+ *pnColorTableState |= CT_CHANGED;
+ // Flag fuer modifiziert entfernen
+ *pnColorTableState &= ~CT_MODIFIED;
+
+ if( aLbColor.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
+ aLbColor.SelectEntryPos( 0 );
+ else
+ aLbColor.SelectEntryPos( aLbColor.GetSelectEntryPos() );
+
+ ChangeColorHdl_Impl( this );
+ SelectColorLBHdl_Impl( this );
+ }
+ }
+ else
+ {
+ //aIStream.Close();
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_READ_DATA_ERROR, pMgr ) ) ).Execute();
+ }
+ }
+ delete( pFileDlg );
+ }
+
+ // Status der Buttons ermitteln
+ if ( pColorTab->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnWorkOn.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnWorkOn.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+
+//
+// Button 'Farbtabelle speichern'
+//
+IMPL_LINK( SvxColorTabPage, ClickSaveHdl_Impl, void *, p )
+{
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_SAVEAS | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.soc" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ INetURLObject aFile; aFile.SetSmartURL( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+
+ if( pColorTab->GetName().Len() )
+ {
+ aFile.Append( pColorTab->GetName() );
+
+ if( !aFile.getExtension().Len() )
+ aFile.SetExtension( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "soc" ) ) );
+ }
+
+ pFileDlg->SetPath( aFile.PathToFileName() );
+
+ if ( pFileDlg->Execute() == RET_OK )
+ {
+ INetURLObject aURL( pFileDlg->GetPath(), INET_PROT_FILE );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ pColorTab->SetName( aURL.getName() );
+ pColorTab->SetPath( aPathURL.PathToFileName() );
+
+ if( pColorTab->Save() )
+ {
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+ aGrpColorTable.SetText( aString );
+
+ // Flag fuer gespeichert setzen
+ *pnColorTableState |= CT_SAVED;
+ // Flag fuer modifiziert entfernen
+ *pnColorTableState &= ~CT_MODIFIED;
+ }
+ else
+ {
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( SVX_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute();
+ }
+ }
+ delete( pFileDlg );
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxColorTabPage, SelectColorLBHdl_Impl, void *, EMPTYARG )
+{
+ USHORT nPos = aLbColor.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aValSetColorTable.SelectItem( nPos + 1 );
+ aEdtName.SetText( aLbColor.GetSelectEntry() );
+
+ rXFSet.Put( XFillColorItem( String(),
+ aLbColor.GetSelectEntryColor() ) );
+ XOutOld.SetFillAttr( aXFillAttr );
+ XOutNew.SetFillAttr( aXFillAttr );
+
+ aCtlPreviewOld.Invalidate();
+ aCtlPreviewNew.Invalidate();
+
+ ChangeColorHdl_Impl( this );
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxColorTabPage, SelectValSetHdl_Impl, void *, EMPTYARG )
+{
+ USHORT nPos = aValSetColorTable.GetSelectItemId();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aLbColor.SelectEntryPos( nPos - 1 );
+ aEdtName.SetText( aLbColor.GetSelectEntry() );
+
+ rXFSet.Put( XFillColorItem( String(),
+ aLbColor.GetSelectEntryColor() ) );
+ XOutOld.SetFillAttr( aXFillAttr );
+ XOutNew.SetFillAttr( aXFillAttr );
+
+ aCtlPreviewOld.Invalidate();
+ aCtlPreviewNew.Invalidate();
+
+ ChangeColorHdl_Impl( this );
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+//
+// Farbwerte je nach übergebenes Farbmodell umrechnen
+//
+void SvxColorTabPage::ConvertColorValues (Color& rColor, ColorModel eModell)
+{
+ switch (eModell)
+ {
+ case CM_RGB:
+ {
+ CmykToRgb_Impl (rColor, (USHORT)rColor.GetTransparency() );
+ rColor.SetTransparency ((UINT8) 0);
+ }
+ break;
+
+ case CM_CMYK:
+ {
+ USHORT nK;
+ RgbToCmyk_Impl (rColor, nK );
+ rColor.SetTransparency ((UINT8) nK);
+ }
+ break;
+ }
+}
+
+//
+// Auswahl Listbox 'Farbmodell' (RGB/CMY)
+//
+IMPL_LINK( SvxColorTabPage, SelectColorModelHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbColorModel.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ if (eCM != (ColorModel) nPos)
+ {
+ // wenn Farbmodell geaendert wurde, dann Werte umrechnen
+ ConvertColorValues (aAktuellColor, (ColorModel) nPos);
+ }
+
+ eCM = (ColorModel) nPos;
+
+ switch( eCM )
+ {
+ case CM_RGB:
+ {
+ String aStr( aLbColorModel.GetSelectEntry() );
+ String aColorStr( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "~X" ) ) );
+ xub_StrLen nIdx = 1;
+ aColorStr.SetChar( nIdx, aStr.GetChar( 0 ) );
+ aFtColorModel1.SetText( aColorStr );
+ aColorStr.SetChar( nIdx, aStr.GetChar( 1 ) );
+ aFtColorModel2.SetText( aColorStr );
+ aColorStr.SetChar( nIdx, aStr.GetChar( 2 ) );
+ aFtColorModel3.SetText( aColorStr );
+
+ aFtColorModel4.Hide();
+ aMtrFldColorModel4.Hide();
+ aMtrFldColorModel4.SetValue( 0L );
+
+ aMtrFldColorModel1.SetHelpId( HID_TPCOLOR_RGB_1 );
+ aMtrFldColorModel2.SetHelpId( HID_TPCOLOR_RGB_2 );
+ aMtrFldColorModel3.SetHelpId( HID_TPCOLOR_RGB_3 );
+
+ // Da der alte HelpText noch am Control steht wuerde
+ // ein Umsetzen der HelpID alleine nichts bewirken
+ aMtrFldColorModel1.SetHelpText( String() );
+ aMtrFldColorModel2.SetHelpText( String() );
+ aMtrFldColorModel3.SetHelpText( String() );
+
+ // RGB-Werte im Bereich 0..255 verarbeiten (nicht in %),
+ // dazu MetricField's entsprechend einstellen
+ aMtrFldColorModel1.SetUnit (FUNIT_NONE);
+ aMtrFldColorModel1.SetMin (0);
+ aMtrFldColorModel1.SetMax (255);
+
+ aMtrFldColorModel2.SetUnit (FUNIT_NONE);
+ aMtrFldColorModel2.SetMin (0);
+ aMtrFldColorModel2.SetMax (255);
+
+ aMtrFldColorModel3.SetUnit (FUNIT_NONE);
+ aMtrFldColorModel3.SetMin (0);
+ aMtrFldColorModel3.SetMax (255);
+ }
+ break;
+
+ case CM_CMYK:
+ {
+ String aStr( aLbColorModel.GetSelectEntry() );
+ String aColorStr( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "~X" ) ) );
+ xub_StrLen nIdx = 1;
+ aColorStr.SetChar( nIdx, aStr.GetChar( 0 ) );
+ aFtColorModel1.SetText( aColorStr );
+ aColorStr.SetChar( nIdx, aStr.GetChar( 1 ) );
+ aFtColorModel2.SetText( aColorStr );
+ aColorStr.SetChar( nIdx,aStr.GetChar( 2 ) );
+ aFtColorModel3.SetText( aColorStr );
+ aColorStr.SetChar( nIdx,aStr.GetChar( 3 ) );
+ aFtColorModel4.SetText( aColorStr );
+
+ aFtColorModel4.Show();
+ aMtrFldColorModel4.Show();
+
+ aMtrFldColorModel1.SetHelpId( HID_TPCOLOR_CMYK_1 );
+ aMtrFldColorModel2.SetHelpId( HID_TPCOLOR_CMYK_2 );
+ aMtrFldColorModel3.SetHelpId( HID_TPCOLOR_CMYK_3 );
+
+ // s.o.
+ aMtrFldColorModel1.SetHelpText( String() );
+ aMtrFldColorModel2.SetHelpText( String() );
+ aMtrFldColorModel3.SetHelpText( String() );
+
+ // CMYK-Werte im Bereich 0..100% verarbeiten,
+ // dazu MetricField's entsprechend einstellen
+ String aStrUnit( RTL_CONSTASCII_USTRINGPARAM( " %" ) );
+
+ aMtrFldColorModel1.SetUnit (FUNIT_CUSTOM);
+ aMtrFldColorModel1.SetCustomUnitText ( aStrUnit );
+ aMtrFldColorModel1.SetMin (0);
+ aMtrFldColorModel1.SetMax (100);
+
+ aMtrFldColorModel2.SetUnit (FUNIT_CUSTOM);
+ aMtrFldColorModel2.SetCustomUnitText ( aStrUnit );
+ aMtrFldColorModel2.SetMin (0);
+ aMtrFldColorModel2.SetMax (100);
+
+ aMtrFldColorModel3.SetUnit (FUNIT_CUSTOM);
+ aMtrFldColorModel3.SetCustomUnitText ( aStrUnit );
+ aMtrFldColorModel3.SetMin (0);
+ aMtrFldColorModel3.SetMax (100);
+ }
+ break;
+ }
+
+ aMtrFldColorModel1.SetValue( ColorToPercent_Impl( aAktuellColor.GetRed() ) );
+ aMtrFldColorModel2.SetValue( ColorToPercent_Impl( aAktuellColor.GetGreen() ) );
+ aMtrFldColorModel3.SetValue( ColorToPercent_Impl( aAktuellColor.GetBlue() ) );
+ aMtrFldColorModel4.SetValue( ColorToPercent_Impl( aAktuellColor.GetTransparency() ) );
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+long SvxColorTabPage::ChangeColorHdl_Impl( void* )
+{
+ int nPos = aLbColor.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ XColorEntry* pEntry = pColorTab->Get( nPos );
+
+ aAktuellColor.SetColor ( pEntry->GetColor().GetColor() );
+ if (eCM != CM_RGB)
+ ConvertColorValues (aAktuellColor, eCM);
+
+ aMtrFldColorModel1.SetValue( ColorToPercent_Impl( aAktuellColor.GetRed() ) );
+ aMtrFldColorModel2.SetValue( ColorToPercent_Impl( aAktuellColor.GetGreen() ) );
+ aMtrFldColorModel3.SetValue( ColorToPercent_Impl( aAktuellColor.GetBlue() ) );
+ aMtrFldColorModel4.SetValue( ColorToPercent_Impl( aAktuellColor.GetTransparency() ) );
+
+ // ItemSet fuellen und an XOut weiterleiten
+ rXFSet.Put( XFillColorItem( String(), pEntry->GetColor() ) );
+ XOutOld.SetFillAttr( aXFillAttr );
+ XOutNew.SetFillAttr( aXFillAttr );
+
+ aCtlPreviewNew.Invalidate();
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+void SvxColorTabPage::FillValueSet_Impl( ValueSet& rVs )
+{
+ long nCount = pColorTab->Count();
+ XColorEntry* pColorEntry;
+
+ for( long i = 0; i < nCount; i++ )
+ {
+ pColorEntry = pColorTab->Get( i );
+ rVs.InsertItem( (USHORT) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() );
+ }
+}
+
+//------------------------------------------------------------------------
+
+// Ein RGB-Wert wird in einen CMYK-Wert konvertiert, wobei die Color-
+// Klasse vergewaltigt wird, da R in C, G in M und B in Y umgewandelt
+// wird. Der Wert K wird in einer Extra-Variablen gehalten.
+// Bei weiteren Farbmodellen sollte man hierfuer eigene Klassen entwickeln,
+// die dann auch entsprechende Casts enthalten.
+
+void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, USHORT& rK )
+{
+ USHORT nColor1, nColor2, nColor3;
+ USHORT nProzent; // nur temporaer !!!
+
+ nColor1 = 255 - rColor.GetRed();
+ nProzent = ColorToPercent_Impl( nColor1 );
+
+ nColor2 = 255 - rColor.GetGreen();
+ nProzent = ColorToPercent_Impl( nColor2 );
+
+ nColor3 = 255 - rColor.GetBlue();
+ nProzent = ColorToPercent_Impl( nColor3 );
+
+ rK = Min( Min( nColor1, nColor2 ), nColor3 );
+
+ rColor.SetRed( nColor1 - rK );
+ rColor.SetGreen( nColor2 - rK );
+ rColor.SetBlue( nColor3 - rK );
+}
+
+//------------------------------------------------------------------------
+
+// Umgekehrter Fall zu RgbToCmyk_Impl (s.o.)
+
+void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const USHORT nK )
+{
+ long lTemp;
+
+ lTemp = 255 - ( rColor.GetRed() + nK );
+
+ if( lTemp < 0L )
+ lTemp = 0L;
+ rColor.SetRed( (BYTE)lTemp );
+
+ lTemp = 255 - ( rColor.GetGreen() + nK );
+
+ if( lTemp < 0L )
+ lTemp = 0L;
+ rColor.SetGreen( (BYTE)lTemp );
+
+ lTemp = 255 - ( rColor.GetBlue() + nK );
+
+ if( lTemp < 0L )
+ lTemp = 0L;
+ rColor.SetBlue( (BYTE)lTemp );
+}
+
+//------------------------------------------------------------------------
+
+USHORT SvxColorTabPage::ColorToPercent_Impl( USHORT nColor )
+{
+ USHORT nWert;
+
+ switch (eCM)
+ {
+ case CM_RGB :
+ nWert = nColor;
+ break;
+
+ case CM_CMYK:
+ nWert = (USHORT) ( (double) nColor * 100.0 / 255.0 + 0.5 );
+ break;
+ }
+
+ return ( nWert );
+}
+
+//------------------------------------------------------------------------
+
+USHORT SvxColorTabPage::PercentToColor_Impl( USHORT nPercent )
+{
+ USHORT nWert;
+
+ switch (eCM)
+ {
+ case CM_RGB :
+ nWert = nPercent;
+ break;
+
+ case CM_CMYK:
+ nWert = (USHORT) ( (double) nPercent * 255.0 / 100.0 + 0.5 );
+ break;
+ }
+
+ return ( nWert );
+}
+
+//------------------------------------------------------------------------
+
+void SvxColorTabPage::FillUserData()
+{
+ // Das Farbmodell wird in der Ini-Datei festgehalten
+ SetUserData( UniString::CreateFromInt32( eCM ) );
+}
+
+
diff --git a/svx/source/dialog/tpgradnt.cxx b/svx/source/dialog/tpgradnt.cxx
new file mode 100644
index 0000000000..ba7694643d
--- /dev/null
+++ b/svx/source/dialog/tpgradnt.cxx
@@ -0,0 +1,968 @@
+/*************************************************************************
+ *
+ * $RCSfile: tpgradnt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXFILEDLG_HXX
+#include <sfx2/iodlg.hxx>
+#endif
+
+#define _SVX_TPGRADNT_CXX
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_GRADIENT_LIST SID_GRADIENT_LIST
+
+#include "dialogs.hrc"
+
+#include "xattr.hxx"
+#include "xtable.hxx"
+#include "xpool.hxx"
+#include "drawitem.hxx"
+#include "tabarea.hxx"
+#include "tabarea.hrc"
+#include "dlgname.hxx"
+#include "dlgname.hrc"
+#include "dialmgr.hxx"
+
+#define DLGWIN this->GetParent()->GetParent()
+
+#define BITMAP_WIDTH 32
+#define BITMAP_HEIGHT 12
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern und Definieren der Farbverlaeufe
+|*
+\************************************************************************/
+
+SvxGradientTabPage::SvxGradientTabPage
+(
+ Window* pParent,
+ const SfxItemSet& rInAttrs
+) :
+ SfxTabPage ( pParent, SVX_RES( RID_SVXPAGE_GRADIENT ), rInAttrs ),
+
+ pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
+ //XOut ( &aCtlPreview, pXPool ),
+ XOut ( &aCtlPreview ),
+ aXFillAttr ( pXPool ),
+ rXFSet ( aXFillAttr.GetItemSet() ),
+
+ aXFStyleItem ( XFILL_GRADIENT ),
+ aXGradientItem ( String(), XGradient( COL_BLACK, COL_WHITE ) ),
+
+ aFtType ( this, ResId( FT_TYPE ) ),
+ aLbGradientType ( this, ResId( LB_GRADIENT_TYPES ) ),
+ aFtCenterX ( this, ResId( FT_CENTER_X ) ),
+ aMtrCenterX ( this, ResId( MTR_CENTER_X ) ),
+ aFtCenterY ( this, ResId( FT_CENTER_Y ) ),
+ aMtrCenterY ( this, ResId( MTR_CENTER_Y ) ),
+ aFtAngle ( this, ResId( FT_ANGLE ) ),
+ aMtrAngle ( this, ResId( MTR_ANGLE ) ),
+ aFtBorder ( this, ResId( FT_BORDER ) ),
+ aMtrBorder ( this, ResId( MTR_BORDER ) ),
+ aFtColorFrom ( this, ResId( FT_COLOR_FROM ) ),
+ aMtrColorFrom ( this, ResId( MTR_COLOR_FROM ) ),
+ aLbColorFrom ( this, ResId( LB_COLOR_FROM ) ),
+ aFtColorTo ( this, ResId( FT_COLOR_TO ) ),
+ aMtrColorTo ( this, ResId( MTR_COLOR_TO ) ),
+ aLbColorTo ( this, ResId( LB_COLOR_TO ) ),
+ aGrpColor ( this, ResId( GRP_COLOR ) ),
+ aLbGradients ( this, ResId( LB_GRADIENTS ) ),
+ aGrpGradients ( this, ResId( GRP_GRADIENTS ) ),
+ aCtlPreview ( this, ResId( CTL_PREVIEW ), &XOut ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ aBtnAdd ( this, ResId( BTN_ADD ) ),
+ aBtnModify ( this, ResId( BTN_MODIFY ) ),
+ aBtnDelete ( this, ResId( BTN_DELETE ) ),
+ aBtnLoad ( this, ResId( BTN_LOAD ) ),
+ aBtnSave ( this, ResId( BTN_SAVE ) ),
+ rOutAttrs ( rInAttrs )
+
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ // Solange NICHT vom Item unterstuetzt
+
+ //aMtrColorTo.Disable();
+ aMtrColorTo.SetValue( 100 );
+ //aMtrColorFrom.Disable();
+ aMtrColorFrom.SetValue( 100 );
+
+ // Setzen des Output-Devices
+ rXFSet.Put( aXFStyleItem );
+ rXFSet.Put( aXGradientItem );
+ XOut.SetFillAttr( aXFillAttr );
+
+ // Setzen der Linie auf None im OutputDevice
+ XLineAttrSetItem aXLineAttr( pXPool );
+ aXLineAttr.GetItemSet().Put( XLineStyleItem( XLINE_NONE ) );
+ XOut.SetLineAttr( aXLineAttr );
+
+ // Handler ueberladen
+ aLbGradients.SetSelectHdl(
+ LINK( this, SvxGradientTabPage, ChangeGradientHdl_Impl ) );
+ aBtnAdd.SetClickHdl( LINK( this, SvxGradientTabPage, ClickAddHdl_Impl ) );
+ aBtnModify.SetClickHdl(
+ LINK( this, SvxGradientTabPage, ClickModifyHdl_Impl ) );
+ aBtnDelete.SetClickHdl(
+ LINK( this, SvxGradientTabPage, ClickDeleteHdl_Impl ) );
+
+ Link aLink = LINK( this, SvxGradientTabPage, ModifiedHdl_Impl );
+ aLbGradientType.SetSelectHdl( aLink );
+ aMtrCenterX.SetModifyHdl( aLink );
+ aMtrCenterY.SetModifyHdl( aLink );
+ aMtrAngle.SetModifyHdl( aLink );
+ aMtrBorder.SetModifyHdl( aLink );
+ aMtrColorFrom.SetModifyHdl( aLink );
+ aLbColorFrom.SetSelectHdl( aLink );
+ aMtrColorTo.SetModifyHdl( aLink );
+ aLbColorTo.SetSelectHdl( aLink );
+
+ aBtnLoad.SetClickHdl(
+ LINK( this, SvxGradientTabPage, ClickLoadHdl_Impl ) );
+ aBtnSave.SetClickHdl(
+ LINK( this, SvxGradientTabPage, ClickSaveHdl_Impl ) );
+
+ pColorTab = NULL;
+ pGradientList = NULL;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxGradientTabPage::Construct()
+{
+ // Farbtabelle
+ aLbColorFrom.Fill( pColorTab );
+ aLbColorTo.CopyEntries( aLbColorFrom );
+
+ // Farbverlauftabelle
+ aLbGradients.Fill( pGradientList );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxGradientTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ int nPos;
+ int nCount;
+
+ if( *pDlgType == 0 ) // Flaechen-Dialog
+ {
+ *pbAreaTP = FALSE;
+
+ if( pColorTab )
+ {
+ // ColorTable
+ if( *pnColorTableState & CT_CHANGED ||
+ *pnColorTableState & CT_MODIFIED )
+ {
+ if( *pnColorTableState & CT_CHANGED )
+ pColorTab = ( (SvxAreaTabDialog*) DLGWIN )->GetNewColorTable();
+
+ // LbColorFrom
+ nPos = aLbColorFrom.GetSelectEntryPos();
+ aLbColorFrom.Clear();
+ aLbColorFrom.Fill( pColorTab );
+ nCount = aLbColorFrom.GetEntryCount();
+ if( nCount == 0 )
+ ; // Dieser Fall sollte nicht auftreten
+ else if( nCount <= nPos )
+ aLbColorFrom.SelectEntryPos( 0 );
+ else
+ aLbColorFrom.SelectEntryPos( nPos );
+
+ // LbColorTo
+ nPos = aLbColorTo.GetSelectEntryPos();
+ aLbColorTo.Clear();
+ aLbColorTo.CopyEntries( aLbColorFrom );
+ nCount = aLbColorTo.GetEntryCount();
+ if( nCount == 0 )
+ ; // Dieser Fall sollte nicht auftreten
+ else if( nCount <= nPos )
+ aLbColorTo.SelectEntryPos( 0 );
+ else
+ aLbColorTo.SelectEntryPos( nPos );
+
+ ModifiedHdl_Impl( this );
+ }
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL( pGradientList->GetName(), INET_PROT_FILE );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpGradients.SetText( aString );
+
+ if ( *pPageType == PT_GRADIENT && *pPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aLbGradients.SelectEntryPos( *pPos );
+ }
+ // Farben koennten geloescht worden sein
+ ChangeGradientHdl_Impl( this );
+
+ *pPageType = PT_GRADIENT;
+ *pPos = LISTBOX_ENTRY_NOTFOUND;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxGradientTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if( CheckChanges_Impl() == -1L )
+ return KEEP_PAGE;
+
+ FillItemSet( *pSet );
+
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+long SvxGradientTabPage::CheckChanges_Impl()
+{
+ // wird hier benutzt, um Aenderungen NICHT zu verlieren
+ XGradient aTmpGradient( aLbColorFrom.GetSelectEntryColor(),
+ aLbColorTo.GetSelectEntryColor(),
+ (XGradientStyle) aLbGradientType.GetSelectEntryPos(),
+ aMtrAngle.GetValue() * 10, // sollte in Resource geaendert werden
+ (USHORT) aMtrCenterX.GetValue(),
+ (USHORT) aMtrCenterY.GetValue(),
+ (USHORT) aMtrBorder.GetValue(),
+ (USHORT) aMtrColorFrom.GetValue(),
+ (USHORT) aMtrColorTo.GetValue() );
+
+ USHORT nPos = aLbGradients.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ XGradient aGradient = pGradientList->Get( nPos )->GetGradient();
+ String aString = aLbGradients.GetSelectEntry();
+
+ if( !( aTmpGradient == aGradient ) )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ SvxMessDialog aMessDlg( DLGWIN,
+ String( ResId( RID_SVXSTR_GRADIENT, pMgr ) ),
+ String( ResId( RID_SVXSTR_ASK_CHANGE_GRADIENT, pMgr ) ),
+ &( WarningBox::GetStandardImage() ) );
+
+ aMessDlg.SetButtonText( MESS_BTN_1,
+ String( ResId( RID_SVXSTR_CHANGE, pMgr ) ) );
+ aMessDlg.SetButtonText( MESS_BTN_2,
+ String( ResId( RID_SVXSTR_ADD, pMgr ) ) );
+
+ short nRet = aMessDlg.Execute();
+
+ switch( nRet )
+ {
+ case RET_BTN_1: // Aendern
+ {
+ ClickModifyHdl_Impl( this );
+ aGradient = pGradientList->Get( nPos )->GetGradient();
+ }
+ break;
+
+ case RET_BTN_2: // Hinzufuegen
+ {
+ ClickAddHdl_Impl( this );
+ nPos = aLbGradients.GetSelectEntryPos();
+ aGradient = pGradientList->Get( nPos )->GetGradient();
+ }
+ break;
+
+ case RET_CANCEL:
+ // return( -1L ); <-- wuerde die Seite nicht verlassen
+ break;
+ // return( TRUE ); // Abbruch
+ }
+ }
+ }
+ nPos = aLbGradients.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ *pPos = nPos;
+ }
+ return 0L;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rOutAttrs )
+{
+ if( *pDlgType == 0 && *pPageType == PT_GRADIENT && *pbAreaTP == FALSE )
+ {
+ // CheckChanges(); <-- doppelte Abfrage ?
+
+ XGradient* pXGradient = NULL;
+ String aString;
+ USHORT nPos = aLbGradients.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ pXGradient = new XGradient( pGradientList->Get( nPos )->GetGradient() );
+ aString = aLbGradients.GetSelectEntry();
+
+ }
+ else
+ // Farbverlauf wurde (unbekannt) uebergeben
+ {
+ pXGradient = new XGradient( aLbColorFrom.GetSelectEntryColor(),
+ aLbColorTo.GetSelectEntryColor(),
+ (XGradientStyle) aLbGradientType.GetSelectEntryPos(),
+ aMtrAngle.GetValue() * 10, // sollte in Resource geaendert werden
+ (USHORT) aMtrCenterX.GetValue(),
+ (USHORT) aMtrCenterY.GetValue(),
+ (USHORT) aMtrBorder.GetValue(),
+ (USHORT) aMtrColorFrom.GetValue(),
+ (USHORT) aMtrColorTo.GetValue() );
+ }
+ DBG_ASSERT( pXGradient, "XGradient konnte nicht erzeugt werden" );
+ rOutAttrs.Put( XFillStyleItem( XFILL_GRADIENT ) );
+ rOutAttrs.Put( XFillGradientItem( aString, *pXGradient ) );
+
+ delete pXGradient;
+ }
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxGradientTabPage::Reset( const SfxItemSet& rOutAttrs )
+{
+ // aLbGradients.SelectEntryPos( 0 );
+ ChangeGradientHdl_Impl( this );
+
+ // Status der Buttons ermitteln
+ if( pGradientList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxGradientTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return new SvxGradientTabPage( pWindow, rOutAttrs );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGradientTabPage, ModifiedHdl_Impl, void *, pControl )
+{
+ XGradientStyle eXGS = (XGradientStyle) aLbGradientType.GetSelectEntryPos();
+
+ XGradient aXGradient( aLbColorFrom.GetSelectEntryColor(),
+ aLbColorTo.GetSelectEntryColor(),
+ eXGS,
+ aMtrAngle.GetValue() * 10, // sollte in Resource geaendert werden
+ (USHORT) aMtrCenterX.GetValue(),
+ (USHORT) aMtrCenterY.GetValue(),
+ (USHORT) aMtrBorder.GetValue(),
+ (USHORT) aMtrColorFrom.GetValue(),
+ (USHORT) aMtrColorTo.GetValue() );
+
+ // Enablen/Disablen von Controls
+ if( pControl == &aLbGradientType || pControl == this )
+ SetControlState_Impl( eXGS );
+
+ // Anzeigen im XOutDev
+ rXFSet.Put( XFillGradientItem( String(), aXGradient ) );
+ XOut.SetFillAttr( aXFillAttr );
+
+ aCtlPreview.Invalidate();
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ String aNewName( ResId( RID_SVXSTR_GRADIENT, pMgr ) );
+ String aDesc( ResId( RID_SVXSTR_DESC_GRADIENT, pMgr ) );
+ String aName;
+
+ long nCount = pGradientList->Count();
+ long j = 1;
+ BOOL bDifferent = FALSE;
+
+ while( !bDifferent )
+ {
+ aName = aNewName;
+ aName += sal_Unicode(' ');
+ aName += UniString::CreateFromInt32( j++ );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ if( aName == pGradientList->Get( i )->GetName() )
+ bDifferent = FALSE;
+ }
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+ WarningBox* pWarnBox = NULL;
+ USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE;
+
+ while( pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ if( aName == pGradientList->Get( i )->GetName() )
+ bDifferent = FALSE;
+
+ if( bDifferent )
+ {
+ nError = 0;
+ break;
+ }
+
+ if( !pWarnBox )
+ pWarnBox = new WarningBox( DLGWIN,
+ WinBits( WB_OK_CANCEL ),
+ String( ResId( nError, pMgr ) ) );
+
+ if( pWarnBox->Execute() != RET_OK )
+ break;
+ }
+ //Rectangle aDlgRect( pDlg->GetPosPixel(), pDlg->GetSizePixel() );
+ delete pDlg;
+ delete pWarnBox;
+
+ if( !nError )
+ {
+ XGradient aXGradient( aLbColorFrom.GetSelectEntryColor(),
+ aLbColorTo.GetSelectEntryColor(),
+ (XGradientStyle) aLbGradientType.GetSelectEntryPos(),
+ aMtrAngle.GetValue() * 10, // sollte in Resource geaendert werden
+ (USHORT) aMtrCenterX.GetValue(),
+ (USHORT) aMtrCenterY.GetValue(),
+ (USHORT) aMtrBorder.GetValue(),
+ (USHORT) aMtrColorFrom.GetValue(),
+ (USHORT) aMtrColorTo.GetValue() );
+ XGradientEntry* pEntry = new XGradientEntry( aXGradient, aName );
+
+ pGradientList->Insert( pEntry, nCount );
+
+ aLbGradients.Append( pEntry );
+
+ aLbGradients.SelectEntryPos( aLbGradients.GetEntryCount() - 1 );
+
+#ifdef WNT
+ // hack: #31355# W.P.
+ Rectangle aRect( aLbGradients.GetPosPixel(), aLbGradients.GetSizePixel() );
+ if( TRUE ) { // ??? overlapped with pDlg
+ // and srolling
+ Invalidate( aRect );
+ //aLbGradients.Invalidate();
+ }
+#endif
+
+ // Flag fuer modifiziert setzen
+ *pnGradientListState |= CT_MODIFIED;
+
+ ChangeGradientHdl_Impl( this );
+ }
+
+ // Status der Buttons ermitteln
+ if( pGradientList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbGradients.GetSelectEntryPos();
+
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ String aNewName( ResId( RID_SVXSTR_GRADIENT, pMgr ) );
+ String aDesc( ResId( RID_SVXSTR_DESC_GRADIENT, pMgr ) );
+ String aName( pGradientList->Get( nPos )->GetName() );
+ String aOldName = aName;
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+
+ long nCount = pGradientList->Count();
+ BOOL bDifferent = FALSE;
+ BOOL bLoop = TRUE;
+
+ while( bLoop && pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ {
+ if( aName == pGradientList->Get( i )->GetName() &&
+ aName != aOldName )
+ bDifferent = FALSE;
+ }
+
+ if( bDifferent )
+ {
+ bLoop = FALSE;
+ XGradient aXGradient( aLbColorFrom.GetSelectEntryColor(),
+ aLbColorTo.GetSelectEntryColor(),
+ (XGradientStyle) aLbGradientType.GetSelectEntryPos(),
+ aMtrAngle.GetValue() * 10, // sollte in Resource geaendert werden
+ (USHORT) aMtrCenterX.GetValue(),
+ (USHORT) aMtrCenterY.GetValue(),
+ (USHORT) aMtrBorder.GetValue(),
+ (USHORT) aMtrColorFrom.GetValue(),
+ (USHORT) aMtrColorTo.GetValue() );
+
+ XGradientEntry* pEntry = new XGradientEntry( aXGradient, aName );
+
+ delete pGradientList->Replace( pEntry, nPos );
+
+ aLbGradients.Modify( pEntry, nPos );
+
+ aLbGradients.SelectEntryPos( nPos );
+
+ // Flag fuer modifiziert setzen
+ *pnGradientListState |= CT_MODIFIED;
+ }
+ else
+ WarningBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, pMgr ) ) ).Execute();
+ }
+ delete pDlg;
+ }
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGradientTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbGradients.GetSelectEntryPos();
+
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ),
+//! SVX_RES( RID_SVXSTR_DEL_GRADIENT ),
+ String( SVX_RES( RID_SVXSTR_ASK_DEL_GRADIENT ) ) );
+
+ if ( aQueryBox.Execute() == RET_YES )
+ {
+ delete pGradientList->Remove( nPos );
+ aLbGradients.RemoveEntry( nPos );
+ aLbGradients.SelectEntryPos( 0 );
+
+ aCtlPreview.Invalidate();
+
+ ChangeGradientHdl_Impl( this );
+
+ // Flag fuer modifiziert setzen
+ *pnGradientListState |= CT_MODIFIED;
+ }
+ }
+ // Status der Buttons ermitteln
+ if( !pGradientList->Count() )
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return 0L;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxGradientTabPage, ClickLoadHdl_Impl, void *, p )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ USHORT nReturn = RET_YES;
+
+ if ( *pnGradientListState & CT_MODIFIED )
+ {
+ nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ),
+ String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, pMgr ) ) ).Execute();
+
+ if ( nReturn == RET_YES )
+ pGradientList->Save();
+ }
+
+ if ( nReturn != RET_CANCEL )
+ {
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_OPEN | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.sog" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ String aFile( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+ pFileDlg->SetPath( aFile );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+ EnterWait();
+
+ INetURLObject aURL( pFileDlg->GetPath(), INET_PROT_FILE );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ // Liste speichern
+ XGradientList* pGrdList = new XGradientList( aPathURL.PathToFileName(), pXPool );
+ pGrdList->SetName( aURL.getName() );
+
+ if ( pGrdList->Load() )
+ {
+ if ( pGrdList )
+ {
+ // Pruefen, ob Tabelle geloescht werden darf:
+ if ( pGradientList !=
+ ( (SvxAreaTabDialog*) DLGWIN )->GetGradientList() )
+ delete pGradientList;
+
+ pGradientList = pGrdList;
+ ( (SvxAreaTabDialog*) DLGWIN )->
+ SetNewGradientList( pGradientList );
+
+ aLbGradients.Clear();
+ aLbGradients.Fill( pGradientList );
+ Reset( rOutAttrs );
+
+ pGradientList->SetName( aURL.getName() );
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( ResId( RID_SVXSTR_TABLE, pMgr ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpGradients.SetText( aString );
+
+
+ // Flag fuer gewechselt setzen
+ *pnGradientListState |= CT_CHANGED;
+ // Flag fuer modifiziert entfernen
+ *pnGradientListState &= ~CT_MODIFIED;
+ }
+ LeaveWait();
+ }
+ else
+ {
+ LeaveWait();
+ //aIStream.Close();
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_READ_DATA_ERROR, pMgr ) ) ).Execute();
+ }
+ }
+ delete pFileDlg;
+ }
+
+ // Status der Buttons ermitteln
+ if( pGradientList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return 0L;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxGradientTabPage, ClickSaveHdl_Impl, void *, p )
+{
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_SAVEAS | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.sog" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ INetURLObject aFile; aFile.SetSmartURL( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+
+ if( pGradientList->GetName().Len() )
+ {
+ aFile.Append( pGradientList->GetName() );
+
+ if( !aFile.getExtension().Len() )
+ aFile.SetExtension( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "sog" ) ) );
+ }
+
+ pFileDlg->SetPath( aFile.PathToFileName() );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+
+ INetURLObject aURL( pFileDlg->GetPath(), INET_PROT_FILE );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ pGradientList->SetName( aURL.getName() );
+ pGradientList->SetPath( aPathURL.PathToFileName() );
+
+ if( pGradientList->Save() )
+ {
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpGradients.SetText( aString );
+
+ // Flag fuer gespeichert setzen
+ *pnGradientListState |= CT_SAVED;
+ // Flag fuer modifiziert entfernen
+ *pnGradientListState &= ~CT_MODIFIED;
+ }
+ else
+ {
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( SVX_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute();
+ }
+ }
+ delete pFileDlg;
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGradientTabPage, ChangeGradientHdl_Impl, void *, EMPTYARG )
+{
+ XGradient* pGradient = NULL;
+ int nPos = aLbGradients.GetSelectEntryPos();
+
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ pGradient = new XGradient( ( (XGradientEntry*) pGradientList->Get( nPos ) )->GetGradient() );
+ else
+ {
+ const SfxPoolItem* pPoolItem = NULL;
+ if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) )
+ {
+ if( ( XFILL_GRADIENT == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) &&
+ ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) ) )
+ {
+ pGradient = new XGradient( ( ( const XFillGradientItem* ) pPoolItem )->GetValue() );
+ }
+ }
+ if( !pGradient )
+ {
+ aLbGradients.SelectEntryPos( 0 );
+ nPos = aLbGradients.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ pGradient = new XGradient( ( (XGradientEntry*) pGradientList->Get( nPos ) )->GetGradient() );
+ }
+ }
+
+ if( pGradient )
+ {
+ XGradientStyle eXGS = pGradient->GetGradientStyle();
+
+ aLbGradientType.SelectEntryPos( eXGS );
+ // Wenn der EIntrag nicht in der Listbox ist, werden die Farben
+ // temporaer hinzugenommen
+ aLbColorFrom.SetNoSelection();
+ aLbColorFrom.SelectEntry( pGradient->GetStartColor() );
+
+ if ( aLbColorFrom.GetSelectEntryCount() == 0 )
+ {
+ aLbColorFrom.InsertEntry( pGradient->GetStartColor(),
+ String() );
+ aLbColorFrom.SelectEntry( pGradient->GetStartColor() );
+ }
+ aLbColorTo.SetNoSelection();
+ aLbColorTo.SelectEntry( pGradient->GetEndColor() );
+
+ if ( aLbColorTo.GetSelectEntryCount() == 0 )
+ {
+ aLbColorTo.InsertEntry( pGradient->GetEndColor(), String() );
+ aLbColorTo.SelectEntry( pGradient->GetEndColor() );
+ }
+
+ aMtrAngle.SetValue( pGradient->GetAngle() / 10 ); // sollte in Resource geaendert werden
+ aMtrBorder.SetValue( pGradient->GetBorder() );
+ aMtrCenterX.SetValue( pGradient->GetXOffset() );
+ aMtrCenterY.SetValue( pGradient->GetYOffset() );
+ aMtrColorFrom.SetValue( pGradient->GetStartIntens() );
+ aMtrColorTo.SetValue( pGradient->GetEndIntens() );
+
+ // Controls Disablen/Enablen
+ SetControlState_Impl( eXGS );
+
+ // ItemSet fuellen und an XOut weiterleiten
+ rXFSet.Put( XFillGradientItem( String(), *pGradient ) );
+ XOut.SetFillAttr( aXFillAttr );
+
+ aCtlPreview.Invalidate();
+ delete pGradient;
+ }
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+void SvxGradientTabPage::SetControlState_Impl( XGradientStyle eXGS )
+{
+ switch( eXGS )
+ {
+ case XGRAD_LINEAR:
+ case XGRAD_AXIAL:
+ aFtCenterX.Disable();
+ aMtrCenterX.Disable();
+ aFtCenterY.Disable();
+ aMtrCenterY.Disable();
+ aFtAngle.Enable();
+ aMtrAngle.Enable();
+ break;
+
+ case XGRAD_RADIAL:
+ aFtCenterX.Enable();
+ aMtrCenterX.Enable();
+ aFtCenterY.Enable();
+ aMtrCenterY.Enable();
+ aFtAngle.Disable();
+ aMtrAngle.Disable();
+ break;
+
+ case XGRAD_ELLIPTICAL:
+ aFtCenterX.Enable();
+ aMtrCenterX.Enable();
+ aFtCenterY.Enable();
+ aMtrCenterY.Enable();
+ aFtAngle.Enable();
+ aMtrAngle.Enable();
+ break;
+
+ case XGRAD_SQUARE:
+ case XGRAD_RECT:
+ aFtCenterX.Enable();
+ aMtrCenterX.Enable();
+ aFtCenterY.Enable();
+ aMtrCenterY.Enable();
+ aFtAngle.Enable();
+ aMtrAngle.Enable();
+ break;
+ }
+}
+
+
diff --git a/svx/source/dialog/tphatch.cxx b/svx/source/dialog/tphatch.cxx
new file mode 100644
index 0000000000..072d7097a5
--- /dev/null
+++ b/svx/source/dialog/tphatch.cxx
@@ -0,0 +1,921 @@
+/*************************************************************************
+ *
+ * $RCSfile: tphatch.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.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
+#ifndef _SFXFILEDLG_HXX
+#include <sfx2/iodlg.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_TPHATCH_CXX
+
+#include "dialogs.hrc"
+#include "tabarea.hrc"
+#include "dlgname.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_HATCH_LIST SID_HATCH_LIST
+
+#include "xattr.hxx"
+#include "xpool.hxx"
+#include "xtable.hxx"
+#include "xoutx.hxx"
+
+#include "drawitem.hxx"
+#include "tabarea.hxx"
+#include "dlgname.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+#define DLGWIN this->GetParent()->GetParent()
+
+#define BITMAP_WIDTH 32
+#define BITMAP_HEIGHT 12
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern und Definieren der Schraffuren
+|*
+\************************************************************************/
+
+SvxHatchTabPage::SvxHatchTabPage
+(
+ Window* pParent,
+ const SfxItemSet& rInAttrs
+) :
+
+ SvxTabPage ( pParent, SVX_RES( RID_SVXPAGE_HATCH ), rInAttrs ),
+
+ pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
+ XOut ( &aCtlPreview ),
+ aXFillAttr ( pXPool ),
+ rXFSet ( aXFillAttr.GetItemSet() ),
+ aXFStyleItem ( XFILL_HATCH ),
+ aXHatchItem ( String(), XHatch() ),
+
+ aFtDistance ( this, ResId( FT_LINE_DISTANCE ) ),
+ aMtrDistance ( this, ResId( MTR_FLD_DISTANCE ) ),
+ aFtAngle ( this, ResId( FT_LINE_ANGLE ) ),
+ aMtrAngle ( this, ResId( MTR_FLD_ANGLE ) ),
+ aCtlAngle ( this, ResId( CTL_ANGLE ),
+ RP_RB, 200, 80, CS_ANGLE ),
+ aGrpDefinition ( this, ResId( GRP_DEFINITION ) ),
+ aFtLineType ( this, ResId( FT_LINE_TYPE ) ),
+ aLbLineType ( this, ResId( LB_LINE_TYPE ) ),
+ aFtLineColor ( this, ResId( FT_LINE_COLOR ) ),
+ aLbLineColor ( this, ResId( LB_LINE_COLOR ) ),
+ aGrpLine ( this, ResId( GRP_LINE ) ),
+ aLbHatchings ( this, ResId( LB_HATCHINGS ) ),
+ aGrpHatchings ( this, ResId( GRP_HATCHINGS ) ),
+ aCtlPreview ( this, ResId( CTL_PREVIEW ), &XOut ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ aBtnAdd ( this, ResId( BTN_ADD ) ),
+ aBtnModify ( this, ResId( BTN_MODIFY ) ),
+ aBtnDelete ( this, ResId( BTN_DELETE ) ),
+ aBtnLoad ( this, ResId( BTN_LOAD ) ),
+ aBtnSave ( this, ResId( BTN_SAVE ) ),
+ rOutAttrs ( rInAttrs )
+
+{
+ FreeResource();
+
+ // 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( aMtrDistance, eFUnit );
+
+ // PoolUnit ermitteln
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool?" );
+ ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
+
+ // Setzen des Output-Devices
+ rXFSet.Put( aXFStyleItem );
+ rXFSet.Put( aXHatchItem );
+ XOut.SetFillAttr( aXFillAttr );
+
+ // Setzen der Linie auf None im OutputDevice
+ XLineAttrSetItem aXLineAttr( pXPool );
+ aXLineAttr.GetItemSet().Put( XLineStyleItem( XLINE_NONE ) );
+ XOut.SetLineAttr( aXLineAttr );
+
+ aLbHatchings.SetSelectHdl( LINK( this, SvxHatchTabPage, ChangeHatchHdl_Impl ) );
+
+ Link aLink = LINK( this, SvxHatchTabPage, ModifiedHdl_Impl );
+ aMtrDistance.SetModifyHdl( aLink );
+ aMtrAngle.SetModifyHdl( aLink );
+ aLbLineType.SetSelectHdl( aLink );
+ aLbLineColor.SetSelectHdl( aLink );
+
+ aBtnAdd.SetClickHdl( LINK( this, SvxHatchTabPage, ClickAddHdl_Impl ) );
+ aBtnModify.SetClickHdl(
+ LINK( this, SvxHatchTabPage, ClickModifyHdl_Impl ) );
+ aBtnDelete.SetClickHdl(
+ LINK( this, SvxHatchTabPage, ClickDeleteHdl_Impl ) );
+ aBtnLoad.SetClickHdl( LINK( this, SvxHatchTabPage, ClickLoadHdl_Impl ) );
+ aBtnSave.SetClickHdl( LINK( this, SvxHatchTabPage, ClickSaveHdl_Impl ) );
+
+ pColorTab = NULL;
+ pHatchingList = NULL;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHatchTabPage::Construct()
+{
+ // Farbtabelle
+ aLbLineColor.Fill( pColorTab );
+
+ // Schraffurentabelle
+ aLbHatchings.Fill( pHatchingList );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ int nPos;
+ int nCount;
+
+ if( *pDlgType == 0 ) // Flaechen-Dialog
+ {
+ *pbAreaTP = FALSE;
+
+ if( pColorTab )
+ {
+ // ColorTable
+ if( *pnColorTableState & CT_CHANGED ||
+ *pnColorTableState & CT_MODIFIED )
+ {
+ if( *pnColorTableState & CT_CHANGED )
+ pColorTab = ( (SvxAreaTabDialog*) DLGWIN )->GetNewColorTable();
+
+ // LbLineColor
+ nPos = aLbLineColor.GetSelectEntryPos();
+ aLbLineColor.Clear();
+ aLbLineColor.Fill( pColorTab );
+ nCount = aLbLineColor.GetEntryCount();
+ if( nCount == 0 )
+ ; // Dieser Fall sollte nicht auftreten
+ else if( nCount <= nPos )
+ aLbLineColor.SelectEntryPos( 0 );
+ else
+ aLbLineColor.SelectEntryPos( nPos );
+
+ ModifiedHdl_Impl( this );
+ }
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL( pHatchingList->GetName(), INET_PROT_FILE );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpHatchings.SetText( aString );
+
+ if( *pPageType == PT_HATCH && *pPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aLbHatchings.SelectEntryPos( *pPos );
+ }
+ // Farben koennten geloescht worden sein
+ ChangeHatchHdl_Impl( this );
+
+ *pPageType = PT_HATCH;
+ *pPos = LISTBOX_ENTRY_NOTFOUND;
+ }
+ }
+
+ rXFSet.Put ( ( XFillColorItem& ) rSet.Get(XATTR_FILLCOLOR) );
+ rXFSet.Put ( ( XFillBackgroundItem&)rSet.Get(XATTR_FILLBACKGROUND) );
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlPreview.Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+int SvxHatchTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( CheckChanges_Impl() == -1L )
+ return KEEP_PAGE;
+
+ FillItemSet( *pSet );
+
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+long SvxHatchTabPage::CheckChanges_Impl()
+{
+ if( aMtrDistance.GetText() != aMtrDistance.GetSavedValue() ||
+ aMtrAngle.GetText() != aMtrAngle.GetSavedValue() ||
+ aLbLineType.GetSelectEntryPos() != aLbLineType.GetSavedValue() ||
+ aLbLineColor.GetSelectEntryPos() != aLbLineColor.GetSavedValue() ||
+ aLbHatchings.GetSelectEntryPos() != aLbHatchings.GetSavedValue() )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ SvxMessDialog aMessDlg( DLGWIN,
+ String( ResId( RID_SVXSTR_HATCH, pMgr ) ),
+ String( ResId( RID_SVXSTR_ASK_CHANGE_HATCH, pMgr ) ),
+ &( WarningBox::GetStandardImage() ) );
+ aMessDlg.SetButtonText( MESS_BTN_1,
+ String( ResId( RID_SVXSTR_CHANGE, pMgr ) ) );
+ aMessDlg.SetButtonText( MESS_BTN_2,
+ String( ResId( RID_SVXSTR_ADD, pMgr ) ) );
+
+ short nRet = aMessDlg.Execute();
+
+ switch( nRet )
+ {
+ case RET_BTN_1: // Aendern
+ {
+ ClickModifyHdl_Impl( this );
+ }
+ break;
+
+ case RET_BTN_2: // Hinzufuegen
+ {
+ ClickAddHdl_Impl( this );
+ }
+ break;
+
+ case RET_CANCEL:
+ // return( -1L ); <-- wuerde die Seite nicht verlassen
+ break;
+ // return( TRUE ); // Abbruch
+ }
+ }
+
+ USHORT nPos = aLbHatchings.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ *pPos = nPos;
+ return 0L;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxHatchTabPage::FillItemSet( SfxItemSet& rOutAttrs )
+{
+ if( *pDlgType == 0 && *pbAreaTP == FALSE ) // Flaechen-Dialog
+ {
+ if( *pPageType == PT_HATCH )
+ {
+ // CheckChanges(); <-- doppelte Abfrage ?
+
+ XHatch* pXHatch = NULL;
+ String aString;
+ USHORT nPos = aLbHatchings.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ pXHatch = new XHatch( pHatchingList->Get( nPos )->GetHatch() );
+ aString = aLbHatchings.GetSelectEntry();
+ }
+ // Farbverlauf wurde (unbekannt) uebergeben
+ else
+ {
+ pXHatch = new XHatch( aLbLineColor.GetSelectEntryColor(),
+ (XHatchStyle) aLbLineType.GetSelectEntryPos(),
+ GetCoreValue( aMtrDistance, ePoolUnit ),
+ aMtrAngle.GetValue() * 10 );
+ }
+ DBG_ASSERT( pXHatch, "XHatch konnte nicht erzeugt werden" );
+ rOutAttrs.Put( XFillStyleItem( XFILL_HATCH ) );
+ rOutAttrs.Put( XFillHatchItem( aString, *pXHatch ) );
+
+ delete pXHatch;
+ }
+ }
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHatchTabPage::Reset( const SfxItemSet& rOutAttrs )
+{
+ // aLbHatchings.SelectEntryPos( 0 );
+ ChangeHatchHdl_Impl( this );
+
+ // Status der Buttons ermitteln
+ if( pHatchingList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+
+ rXFSet.Put ( ( XFillColorItem& ) rOutAttrs.Get(XATTR_FILLCOLOR) );
+ rXFSet.Put ( ( XFillBackgroundItem&)rOutAttrs.Get(XATTR_FILLBACKGROUND) );
+ XOut.SetFillAttr( aXFillAttr );
+ aCtlPreview.Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxHatchTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return new SvxHatchTabPage( pWindow, rOutAttrs );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxHatchTabPage, ModifiedHdl_Impl, void *, p )
+{
+ if( p == &aMtrAngle )
+ {
+ // Setzen des Winkels im AngleControl
+ switch( aMtrAngle.GetValue() )
+ {
+ case 135: aCtlAngle.SetActualRP( RP_LT ); break;
+ case 90: aCtlAngle.SetActualRP( RP_MT ); break;
+ case 45: aCtlAngle.SetActualRP( RP_RT ); break;
+ case 180: aCtlAngle.SetActualRP( RP_LM ); break;
+ case 0: aCtlAngle.SetActualRP( RP_RM ); break;
+ case 225: aCtlAngle.SetActualRP( RP_LB ); break;
+ case 270: aCtlAngle.SetActualRP( RP_MB ); break;
+ case 315: aCtlAngle.SetActualRP( RP_RB ); break;
+ default: aCtlAngle.SetActualRP( RP_MM ); break;
+ }
+ }
+
+ XHatch aXHatch( aLbLineColor.GetSelectEntryColor(),
+ (XHatchStyle) aLbLineType.GetSelectEntryPos(),
+ GetCoreValue( aMtrDistance, ePoolUnit ),
+ aMtrAngle.GetValue() * 10 );
+
+ rXFSet.Put( XFillHatchItem( String(), aXHatch ) );
+ XOut.SetFillAttr( aXFillAttr );
+
+ aCtlPreview.Invalidate();
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxHatchTabPage, ChangeHatchHdl_Impl, void *, EMPTYARG )
+{
+ XHatch* pHatch = NULL;
+ int nPos = aLbHatchings.GetSelectEntryPos();
+
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ pHatch = new XHatch( ( (XHatchEntry*) pHatchingList->Get( nPos ) )->GetHatch() );
+ else
+ {
+ const SfxPoolItem* pPoolItem = NULL;
+ if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) )
+ {
+ if( ( XFILL_HATCH == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) &&
+ ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) ) )
+ {
+ pHatch = new XHatch( ( ( const XFillHatchItem* ) pPoolItem )->GetValue() );
+ }
+ }
+ if( !pHatch )
+ {
+ aLbHatchings.SelectEntryPos( 0 );
+ nPos = aLbHatchings.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ pHatch = new XHatch( ( (XHatchEntry*) pHatchingList->Get( nPos ) )->GetHatch() );
+ }
+ }
+ if( pHatch )
+ {
+ aLbLineType.SelectEntryPos( pHatch->GetHatchStyle() );
+ // Wenn der Eintrag nicht in der Listbox ist, wird die Farbe
+ // temporaer hinzugenommen
+ aLbLineColor.SetNoSelection();
+ aLbLineColor.SelectEntry( pHatch->GetColor() );
+ if( aLbLineColor.GetSelectEntryCount() == 0 )
+ {
+ aLbLineColor.InsertEntry( pHatch->GetColor(), String() );
+ aLbLineColor.SelectEntry( pHatch->GetColor() );
+ }
+ SetMetricValue( aMtrDistance, pHatch->GetDistance(), ePoolUnit );
+ aMtrAngle.SetValue( pHatch->GetAngle() / 10 );
+
+ // Setzen des Winkels im AngleControl
+ switch( aMtrAngle.GetValue() )
+ {
+ case 135: aCtlAngle.SetActualRP( RP_LT ); break;
+ case 90: aCtlAngle.SetActualRP( RP_MT ); break;
+ case 45: aCtlAngle.SetActualRP( RP_RT ); break;
+ case 180: aCtlAngle.SetActualRP( RP_LM ); break;
+ case 0: aCtlAngle.SetActualRP( RP_RM ); break;
+ case 225: aCtlAngle.SetActualRP( RP_LB ); break;
+ case 270: aCtlAngle.SetActualRP( RP_MB ); break;
+ case 315: aCtlAngle.SetActualRP( RP_RB ); break;
+ default: aCtlAngle.SetActualRP( RP_MM ); break;
+ }
+
+ // Backgroundcolor
+ /*
+ const SfxPoolItem* pPoolItem = NULL;
+ if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBACKGROUND ), TRUE, &pPoolItem ) )
+ {
+ rXFSet.Put ( XFillBackgroundItem( ( ( XFillBackgroundItem* )pPoolItem)->GetValue() ) );
+ if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) )
+ {
+ Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetValue() );
+ rXFSet.Put( XFillColorItem( String(), aColor ) );
+ }
+ }
+ */
+ // ItemSet fuellen und an XOut weiterleiten
+ rXFSet.Put( XFillHatchItem( String(), *pHatch ) );
+ XOut.SetFillAttr( aXFillAttr );
+
+ aCtlPreview.Invalidate();
+ delete pHatch;
+ }
+ aMtrDistance.SaveValue();
+ aMtrAngle.SaveValue();
+ aLbLineType.SaveValue();
+ aLbLineColor.SaveValue();
+ aLbHatchings.SaveValue();
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ String aNewName( ResId( RID_SVXSTR_HATCH, pMgr ) );
+ String aDesc( ResId( RID_SVXSTR_DESC_HATCH, pMgr ) );
+ String aName;
+
+ long nCount = pHatchingList->Count();
+ long j = 1;
+ BOOL bDifferent = FALSE;
+
+ while( !bDifferent )
+ {
+ aName = aNewName;
+ aName += sal_Unicode(' ');
+ aName += UniString::CreateFromInt32( j++ );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ if( aName == pHatchingList->Get( i )->GetName() )
+ bDifferent = FALSE;
+ }
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+ WarningBox* pWarnBox = NULL;
+ USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE;
+
+ while( pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ if( aName == pHatchingList->Get( i )->GetName() )
+ bDifferent = FALSE;
+
+ if( bDifferent ) {
+ nError = 0;
+ break;
+ }
+
+ if( !pWarnBox )
+ pWarnBox = new WarningBox( DLGWIN,
+ WinBits( WB_OK_CANCEL ),
+ String( ResId( nError, pMgr ) ) );
+
+ if( pWarnBox->Execute() != RET_OK )
+ break;
+ }
+ //Rectangle aDlgRect( pDlg->GetPosPixel(), pDlg->GetSizePixel() );
+ delete pDlg;
+ delete pWarnBox;
+
+ if( !nError )
+ {
+ XHatch aXHatch( aLbLineColor.GetSelectEntryColor(),
+ (XHatchStyle) aLbLineType.GetSelectEntryPos(),
+ GetCoreValue( aMtrDistance, ePoolUnit ),
+ aMtrAngle.GetValue() * 10 );
+ XHatchEntry* pEntry = new XHatchEntry( aXHatch, aName );
+
+ pHatchingList->Insert( pEntry, nCount );
+
+ aLbHatchings.Append( pEntry );
+
+ aLbHatchings.SelectEntryPos( aLbHatchings.GetEntryCount() - 1 );
+
+#ifdef WNT
+ // hack: #31355# W.P.
+ Rectangle aRect( aLbHatchings.GetPosPixel(), aLbHatchings.GetSizePixel() );
+ if( TRUE ) { // ??? overlapped with pDlg
+ // and srolling
+ Invalidate( aRect );
+ //aLbHatchings.Invalidate();
+ }
+#endif
+
+ // Flag fuer modifiziert setzen
+ *pnHatchingListState |= CT_MODIFIED;
+
+ ChangeHatchHdl_Impl( this );
+ }
+
+ // Status der Buttons ermitteln
+ if( pHatchingList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbHatchings.GetSelectEntryPos();
+
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ String aNewName( ResId( RID_SVXSTR_HATCH, pMgr ) );
+ String aDesc( ResId( RID_SVXSTR_DESC_HATCH, pMgr ) );
+ String aName( pHatchingList->Get( nPos )->GetName() );
+ String aOldName = aName;
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+
+ long nCount = pHatchingList->Count();
+ BOOL bDifferent = FALSE;
+ BOOL bLoop = TRUE;
+ while( bLoop && pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ {
+ if( aName == pHatchingList->Get( i )->GetName() &&
+ aName != aOldName )
+ bDifferent = FALSE;
+ }
+
+ if( bDifferent )
+ {
+ bLoop = FALSE;
+ XHatch aXHatch( aLbLineColor.GetSelectEntryColor(),
+ (XHatchStyle) aLbLineType.GetSelectEntryPos(),
+ GetCoreValue( aMtrDistance, ePoolUnit ),
+ aMtrAngle.GetValue() * 10 );
+
+ XHatchEntry* pEntry = new XHatchEntry( aXHatch, aName );
+
+ delete pHatchingList->Replace( pEntry, nPos );
+
+ aLbHatchings.Modify( pEntry, nPos );
+
+ aLbHatchings.SelectEntryPos( nPos );
+
+ // Werte sichern fuer Changes-Erkennung ( -> Methode )
+ aMtrDistance.SaveValue();
+ aMtrAngle.SaveValue();
+ aLbLineType.SaveValue();
+ aLbLineColor.SaveValue();
+ aLbHatchings.SaveValue();
+
+ // Flag fuer modifiziert setzen
+ *pnHatchingListState |= CT_MODIFIED;
+ }
+ else
+ {
+ WarningBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, pMgr ) ) ).Execute();
+ }
+ }
+ delete( pDlg );
+ }
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxHatchTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbHatchings.GetSelectEntryPos();
+
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ),
+//! SVX_RES( RID_SVXSTR_DEL_HATCH ),
+ String( SVX_RES( RID_SVXSTR_ASK_DEL_HATCH ) ) );
+
+ if( aQueryBox.Execute() == RET_YES )
+ {
+ delete pHatchingList->Remove( nPos );
+ aLbHatchings.RemoveEntry( nPos );
+ aLbHatchings.SelectEntryPos( 0 );
+
+ aCtlPreview.Invalidate();
+
+ ChangeHatchHdl_Impl( this );
+
+ // Flag fuer modifiziert setzen
+ *pnHatchingListState |= CT_MODIFIED;
+ }
+ }
+ // Status der Buttons ermitteln
+ if( !pHatchingList->Count() )
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return 0L;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHatchTabPage, ClickLoadHdl_Impl, void *, p )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ USHORT nReturn = RET_YES;
+
+ if ( *pnHatchingListState & CT_MODIFIED )
+ {
+ nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ),
+ String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, pMgr ) ) ).Execute();
+
+ if ( nReturn == RET_YES )
+ pHatchingList->Save();
+ }
+
+ if ( nReturn != RET_CANCEL )
+ {
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_OPEN | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.soh" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ String aFile( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+ pFileDlg->SetPath( aFile );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+ INetURLObject aURL( pFileDlg->GetPath(), INET_PROT_FILE );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ // Liste speichern
+ XHatchList* pHatchList = new XHatchList( aPathURL.PathToFileName(), pXPool );
+ pHatchList->SetName( aURL.getName() );
+ if( pHatchList->Load() )
+ {
+ if( pHatchList )
+ {
+ // Pruefen, ob Tabelle geloescht werden darf:
+ if( pHatchingList != ( (SvxAreaTabDialog*) DLGWIN )->GetHatchingList() )
+ delete pHatchingList;
+
+ pHatchingList = pHatchList;
+ ( (SvxAreaTabDialog*) DLGWIN )->SetNewHatchingList( pHatchingList );
+
+ aLbHatchings.Clear();
+ aLbHatchings.Fill( pHatchingList );
+ Reset( rOutAttrs );
+
+ pHatchingList->SetName( aURL.getName() );
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( ResId( RID_SVXSTR_TABLE, pMgr ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpHatchings.SetText( aString );
+
+ // Flag fuer gewechselt setzen
+ *pnHatchingListState |= CT_CHANGED;
+ // Flag fuer modifiziert entfernen
+ *pnHatchingListState &= ~CT_MODIFIED;
+ }
+ }
+ else
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_READ_DATA_ERROR, pMgr ) ) ).Execute();
+ }
+ delete( pFileDlg );
+ }
+
+ // Status der Buttons ermitteln
+ if ( pHatchingList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return 0L;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHatchTabPage, ClickSaveHdl_Impl, void *, p )
+{
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_SAVEAS | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.soh" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ INetURLObject aFile; aFile.SetSmartURL( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+
+ if( pHatchingList->GetName().Len() )
+ {
+ aFile.Append( pHatchingList->GetName() );
+
+ if( !aFile.getExtension().Len() )
+ aFile.SetExtension( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "soh" ) ) );
+ }
+
+ pFileDlg->SetPath( aFile.PathToFileName() );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+ INetURLObject aURL( pFileDlg->GetPath(), INET_PROT_FILE );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ pHatchingList->SetName( aURL.getName() );
+ pHatchingList->SetPath( aPathURL.PathToFileName() );
+
+ if( pHatchingList->Save() )
+ {
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpHatchings.SetText( aString );
+
+ // Flag fuer gespeichert setzen
+ *pnHatchingListState |= CT_SAVED;
+ // Flag fuer modifiziert entfernen
+ *pnHatchingListState &= ~CT_MODIFIED;
+ }
+ else
+ {
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( SVX_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute();
+ }
+ }
+ delete pFileDlg;
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+
+void SvxHatchTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt )
+{
+ if( pWindow == &aCtlAngle )
+ {
+ switch( eRcPt )
+ {
+ case RP_LT: aMtrAngle.SetValue( 135 ); break;
+ case RP_MT: aMtrAngle.SetValue( 90 ); break;
+ case RP_RT: aMtrAngle.SetValue( 45 ); break;
+ case RP_LM: aMtrAngle.SetValue( 180 ); break;
+ case RP_RM: aMtrAngle.SetValue( 0 ); break;
+ case RP_LB: aMtrAngle.SetValue( 225 ); break;
+ case RP_MB: aMtrAngle.SetValue( 270 ); break;
+ case RP_RB: aMtrAngle.SetValue( 315 ); break;
+ }
+ ModifiedHdl_Impl( this );
+ }
+}
+
+
diff --git a/svx/source/dialog/tpline.cxx b/svx/source/dialog/tpline.cxx
new file mode 100644
index 0000000000..00426fa78d
--- /dev/null
+++ b/svx/source/dialog/tpline.cxx
@@ -0,0 +1,1770 @@
+/*************************************************************************
+ *
+ * $RCSfile: tpline.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_SIZEITEM_HXX //autogen
+#define ITEMID_SIZE 0
+#include <sizeitem.hxx>
+#endif
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.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_TPLINE_CXX
+
+#include "dialogs.hrc"
+#include "tabline.hrc"
+#include "dlgname.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_DASH_LIST SID_DASH_LIST
+#define ITEMID_LINEEND_LIST SID_LINEEND_LIST
+
+#include "xattr.hxx"
+#include "xpool.hxx"
+#include "xtable.hxx"
+#include "xoutx.hxx"
+
+#include "drawitem.hxx"
+#include "tabline.hxx"
+#include "dlgname.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+#include "svdmodel.hxx"
+
+#include "linectrl.hrc"
+
+//#58425# Symbole auf einer Linie (z.B. StarChart) Includes:
+
+
+#ifdef DEBUG
+#define SVX_TRACE(b,a) \
+ { \
+ ByteString _aStr( RTL_CONSTASCII_STRINGPARAM( "SvxTrace" ) );\
+ _aStr.Append( ByteString::CreateFromInt32( b ) ); \
+ _aStr.Append( "->" ); \
+ _aStr.Append( ByteString::CreateFromInt32( (sal_Int32) this ) ); \
+ _aStr.Append( '@' ); \
+ _aStr.Append( a ); \
+ DBG_TRACE( _aStr.GetBuffer() ); \
+ }
+#else
+#define SVX_TRACE(b,a)
+#endif
+
+
+#ifndef _SVDOBJ_HXX //autogen
+#include <svdobj.hxx>
+#endif
+#ifndef _SVDVIEW_HXX //autogen
+#include <svdview.hxx>
+#endif
+#ifndef _SVDMODEL_HXX //autogen
+#include <svdmodel.hxx>
+#endif
+
+#ifndef _SVX_NUMVSET_HXX //autogen
+#include <numvset.hxx>
+#endif
+#ifndef _SVX_IMPGRF_HXX //autogen
+#include <impgrf.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SVX_NUMITEM_HXX //autogen
+#include <numitem.hxx>
+#endif
+#ifndef _SVX_SVXENUM_HXX //autogen
+#include <svxenum.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#define ITEMID_BRUSH SID_ATTR_BRUSH
+#ifndef _SVX_BRSHITEM_HXX //autogen
+#include <brshitem.hxx>
+#endif
+#ifndef _GALLERY_HXX_ //autogen
+#include <gallery.hxx>
+#endif
+#ifndef _SVX_XBITMAP_HXX //autogen
+#include <xbitmap.hxx>
+#endif
+#define MAX_BMP_WIDTH 16
+#define MAX_BMP_HEIGHT 16
+// define ----------------------------------------------------------------
+
+#define DLGWIN this->GetParent()->GetParent()
+
+#define BITMAP_WIDTH 32
+#define BITMAP_HEIGHT 12
+#define XOUT_WIDTH 150
+
+// static ----------------------------------------------------------------
+
+static USHORT pLineRanges[] =
+{
+ XATTR_LINETRANSPARENCE,
+ XATTR_LINETRANSPARENCE,
+ SID_ATTR_LINE_STYLE,
+ SID_ATTR_LINE_ENDCENTER,
+ 0
+};
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern der Linien
+|*
+\************************************************************************/
+
+SvxLineTabPage::SvxLineTabPage
+(
+ Window* pParent,
+ const SfxItemSet& rInAttrs
+) :
+ SvxTabPage ( pParent, SVX_RES( RID_SVXPAGE_LINE ), rInAttrs ),
+ pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
+ XOut ( &aCtlPreview ),
+ aXLineAttr ( pXPool ),
+ rXLSet ( aXLineAttr.GetItemSet() ),
+
+ aXLStyle ( XLINE_DASH ),
+ aXWidth ( 1 ),
+ aXColor ( String(), COL_LIGHTRED ),
+ aXDash ( String(), XDash( XDASH_RECT, 3, 7, 2, 40, 15 ) ),
+
+ aFtColor ( this, ResId( FT_COLOR ) ),
+ aLbColor ( this, ResId( LB_COLOR ) ),
+ aFtLineStyle ( this, ResId( FT_LINE_STYLE ) ),
+ aLbLineStyle ( this, ResId( LB_LINE_STYLE ) ),
+ aFtLineWidth ( this, ResId( FT_LINE_WIDTH ) ),
+ aMtrLineWidth ( this, ResId( MTR_FLD_LINE_WIDTH ) ),
+ aFtTransparent ( this, ResId( FT_TRANSPARENT ) ),
+ aMtrTransparent ( this, ResId( MTR_LINE_TRANSPARENT ) ),
+ aGrpLine ( this, ResId( GRP_LINE ) ),
+ aFtLineEndsStyle ( this, ResId( FT_LINE_ENDS_STYLE ) ),
+ aFtLineEndsWidth ( this, ResId( FT_LINE_ENDS_WIDTH ) ),
+ aLbStartStyle ( this, ResId( LB_START_STYLE ) ),
+ aMtrStartWidth ( this, ResId( MTR_FLD_START_WIDTH ) ),
+ aTsbCenterStart ( this, ResId( TSB_CENTER_START ) ),
+ aLbEndStyle ( this, ResId( LB_END_STYLE ) ),
+ aMtrEndWidth ( this, ResId( MTR_FLD_END_WIDTH ) ),
+ aTsbCenterEnd ( this, ResId( TSB_CENTER_END ) ),
+ aCbxSynchronize ( this, ResId( CBX_SYNCHRONIZE ) ),
+ aGrpLineEnds ( this, ResId( GRP_LINE_ENDS ) ),
+ aCtlPreview ( this, ResId( CTL_PREVIEW ), &XOut ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ //#58425# Symbole auf einer Linie (z.B. StarChart) ->
+ aSymbolWidthFT ( this, ResId(FT_SYMBOL_WIDTH)),
+ aSymbolWidthMF ( this, ResId(MF_SYMBOL_WIDTH)),
+ aSymbolHeightFT ( this, ResId(FT_SYMBOL_HEIGHT)),
+ aSymbolHeightMF ( this, ResId(MF_SYMBOL_HEIGHT)),
+ aSymbolGB ( this, ResId(GB_SYMBOL_FORMAT)),
+ aSymbolRatioCB ( this, ResId(CB_SYMBOL_RATIO)),
+ aSymbolMB ( this, ResId(MB_SYMBOL_BITMAP)),
+ nSymbolType(SVX_SYMBOLTYPE_UNKNOWN), //unbekannt bzw. unchanged
+ bLastWidthModified(FALSE),
+ aSymbolLastSize(Size(0,0)),
+ bSymbols(FALSE),
+ pSymbolList(NULL),
+ nNumMenuGalleryItems(0),
+ pSymbolAttr(NULL),
+ bNewSize(FALSE),
+ //#58425# Symbole auf einer Linie (z.B. StarChart) <-
+
+ pPageType ( NULL ),
+ rOutAttrs ( rInAttrs )
+
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ // Metrik einstellen
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+
+ switch ( eFUnit )
+ {
+ case FUNIT_M:
+ case FUNIT_KM:
+ eFUnit = FUNIT_MM;
+ // no break -> we now have mm
+ case FUNIT_MM:
+ aMtrLineWidth.SetSpinSize( 50 );
+ aMtrStartWidth.SetSpinSize( 50 );
+ aMtrEndWidth.SetSpinSize( 50 );
+ break;
+
+ case FUNIT_INCH:
+ aMtrLineWidth.SetSpinSize( 2 );
+ aMtrStartWidth.SetSpinSize( 2 );
+ aMtrEndWidth.SetSpinSize( 2 );
+ break;
+ }
+ SetFieldUnit( aMtrLineWidth, eFUnit );
+ SetFieldUnit( aMtrStartWidth, eFUnit );
+ SetFieldUnit( aMtrEndWidth, eFUnit );
+
+ // PoolUnit ermitteln
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool?" );
+ ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH );
+
+ aLbLineStyle.SetSelectHdl(
+ LINK( this, SvxLineTabPage, ClickInvisibleHdl_Impl ) );
+ aLbColor.SetSelectHdl(
+ LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) );
+ aMtrLineWidth.SetModifyHdl(
+ LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) );
+ aMtrTransparent.SetModifyHdl(
+ LINK( this, SvxLineTabPage, ChangeTransparentHdl_Impl ) );
+
+ Link aStart = LINK( this, SvxLineTabPage, ChangeStartHdl_Impl );
+ Link aEnd = LINK( this, SvxLineTabPage, ChangeEndHdl_Impl );
+ aLbStartStyle.SetSelectHdl( aStart );
+ aLbEndStyle.SetSelectHdl( aEnd );
+ aMtrStartWidth.SetModifyHdl( aStart );
+ aMtrEndWidth.SetModifyHdl( aEnd );
+ aTsbCenterStart.SetClickHdl( aStart );
+ aTsbCenterEnd.SetClickHdl( aEnd );
+
+ pColorTab = NULL;
+ pDashList = NULL;
+ pLineEndList = NULL;
+
+
+ //#58425# Symbole auf einer Linie (z.B. StarChart) , MB-Handler setzen
+ aSymbolMB.SetSelectHdl(LINK(this, SvxLineTabPage, GraphicHdl_Impl));
+ aSymbolMB.SetClickHdl(LINK(this, SvxLineTabPage, MenuCreateHdl_Impl));
+ aSymbolWidthMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl));
+ aSymbolHeightMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl));
+ aSymbolRatioCB.SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl));
+
+ aSymbolRatioCB.Check(TRUE);
+ ShowSymbolControls(FALSE);
+
+ // #63083#
+ nActLineWidth = -1;
+}
+//#58425# Symbole auf einer Linie (z.B. StarChart) , Symbol-Controls aktivieren
+void SvxLineTabPage::ShowSymbolControls(BOOL bOn)
+{
+ bSymbols=bOn;
+ aSymbolWidthFT.Show(bOn);
+ aSymbolWidthMF.Show(bOn);
+ aSymbolHeightFT.Show(bOn);
+ aSymbolHeightMF.Show(bOn);
+ aSymbolGB.Show(bOn);
+ aSymbolRatioCB.Show(bOn);
+ aSymbolMB.Show(bOn);
+ aCtlPreview.ShowSymbol(bOn);
+}
+// -----------------------------------------------------------------------
+//#58425# Symbole auf einer Linie (z.B. StarChart) , dtor neu!
+SvxLineTabPage::~SvxLineTabPage()
+{
+ delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
+
+ if(pSymbolList)
+ delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_SYMBOLS );
+
+ 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();
+ }
+}
+void SvxLineTabPage::Construct()
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ // Farbtabelle
+ aLbColor.Fill( pColorTab );
+ // Linienstile
+ aLbLineStyle.InsertEntry( String( ResId( RID_SVXSTR_INVISIBLE, pMgr ) ) );
+
+ const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
+ Bitmap aBitmap ( SVX_RES ( RID_SVXCTRL_LINECTRL ) );
+ Color aColorOld ( 0xFF, 0xFF, 0xFF );
+ Color aColorNew = rStyles.GetWindowColor();
+ aBitmap.Replace ( aColorOld, aColorNew );
+ Image aSolidLine ( aBitmap );
+ aLbLineStyle.InsertEntry( String( ResId( RID_SVXSTR_SOLID, pMgr ) ), aSolidLine );
+ aLbLineStyle.Fill( pDashList );
+ // LinienEndenStile
+ String sNone( ResId( RID_SVXSTR_NONE, pMgr ) );
+ aLbStartStyle.InsertEntry( sNone );
+ aLbStartStyle.Fill( pLineEndList );
+ aLbEndStyle.InsertEntry( sNone );
+ aLbEndStyle.Fill( pLineEndList, FALSE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ if( *pDlgType == 0 && pDashList ) // Linien-Dialog
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ int nPos;
+ int nCount;
+
+ // Dashliste
+ if( ( *pnDashListState & CT_MODIFIED ) ||
+ ( *pnDashListState & CT_CHANGED ) )
+ {
+ if( *pnDashListState & CT_CHANGED )
+ pDashList = ( (SvxLineTabDialog*) DLGWIN )->
+ GetNewDashList();
+ *pnDashListState = CT_NONE;
+
+ // Styleliste
+ nPos = aLbLineStyle.GetSelectEntryPos();
+
+ aLbLineStyle.Clear();
+ aLbLineStyle.InsertEntry(
+ String( ResId( RID_SVXSTR_INVISIBLE, pMgr ) ) );
+ aLbLineStyle.InsertEntry(
+ String( ResId( RID_SVXSTR_SOLID, pMgr ) ) );
+ aLbLineStyle.Fill( pDashList );
+ nCount = aLbLineStyle.GetEntryCount();
+
+ if ( nCount == 0 )
+ ; // Dieser Fall sollte nicht auftreten
+ else if( nCount <= nPos )
+ aLbLineStyle.SelectEntryPos( 0 );
+ else
+ aLbLineStyle.SelectEntryPos( nPos );
+ // SelectStyleHdl_Impl( this );
+ }
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( ResId( RID_SVXSTR_TABLE, pMgr ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL; aURL.SetSmartURL( pDashList->GetName() );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpLine.SetText( aString );
+
+ // LineEndliste
+ if( ( *pnLineEndListState & CT_MODIFIED ) ||
+ ( *pnLineEndListState & CT_CHANGED ) )
+ {
+ if( *pnLineEndListState & CT_CHANGED )
+ pLineEndList = ( (SvxLineTabDialog*) DLGWIN )->
+ GetNewLineEndList();
+ *pnLineEndListState = CT_NONE;
+
+ nPos = aLbLineStyle.GetSelectEntryPos();
+ String sNone( ResId( RID_SVXSTR_NONE, pMgr ) );
+ aLbStartStyle.Clear();
+ aLbStartStyle.InsertEntry( sNone );
+
+ aLbStartStyle.Fill( pLineEndList );
+ nCount = aLbStartStyle.GetEntryCount();
+ if( nCount == 0 )
+ ; // Dieser Fall sollte nicht auftreten
+ else if( nCount <= nPos )
+ aLbStartStyle.SelectEntryPos( 0 );
+ else
+ aLbStartStyle.SelectEntryPos( nPos );
+
+ aLbEndStyle.Clear();
+ aLbEndStyle.InsertEntry( sNone );
+
+ aLbEndStyle.Fill( pLineEndList, FALSE );
+ nCount = aLbEndStyle.GetEntryCount();
+
+ if( nCount == 0 )
+ ; // Dieser Fall sollte nicht auftreten
+ else if( nCount <= nPos )
+ aLbEndStyle.SelectEntryPos( 0 );
+ else
+ aLbEndStyle.SelectEntryPos( nPos );
+ }
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ aString = String( ResId( RID_SVXSTR_TABLE, pMgr ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ aURL.SetSmartURL( pLineEndList->GetName() );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpLineEnds.SetText( aString );
+
+ // Auswertung, ob von einer anderen TabPage ein anderer Fuelltyp gesetzt wurde
+ if( aLbLineStyle.GetSelectEntryPos() != 0 )
+ {
+ if( *pPageType == 2 ) // 1
+ {
+ aLbLineStyle.SelectEntryPos( *pPosDashLb + 2 ); // +2 wegen SOLID und INVLISIBLE
+ ChangePreviewHdl_Impl( this );
+ }
+ if( *pPageType == 3 )
+ {
+ aLbStartStyle.SelectEntryPos( *pPosLineEndLb + 1 );// +1 wegen SOLID
+ aLbEndStyle.SelectEntryPos( *pPosLineEndLb + 1 );// +1 wegen SOLID
+ ChangePreviewHdl_Impl( this );
+ }
+ }
+ *pPageType = 0;
+ }
+ // Seite existiert im Ctor noch nicht, deswegen hier!
+
+ else if ( *pDlgType == 1100 || // Chart-Dialog
+ *pDlgType == 1101 )
+ {
+ aFtLineEndsStyle.Hide();
+ aFtLineEndsWidth.Hide();
+ aLbStartStyle.Hide();
+ aMtrStartWidth.Hide();
+ aTsbCenterStart.Hide();
+ aLbEndStyle.Hide();
+ aMtrEndWidth.Hide();
+ aTsbCenterEnd.Hide();
+ aCbxSynchronize.Hide();
+ aGrpLineEnds.Hide();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLineTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if( *pDlgType == 0 ) // Linien-Dialog
+ {
+ *pPageType = 1; // evtl. fuer Erweiterungen
+ *pPosDashLb = aLbLineStyle.GetSelectEntryPos() - 2;// erster Eintrag SOLID !!!
+ USHORT nPos = aLbStartStyle.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ nPos--;
+ *pPosLineEndLb = nPos;
+ }
+
+ FillItemSet( *pSet );
+
+ return( LEAVE_PAGE );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs )
+{
+ const SfxPoolItem* pOld = NULL;
+ USHORT nPos;
+ BOOL bModified = FALSE;
+
+ // Um evtl. Modifikationen der Liste vorzubeugen
+ // werden Items anderer Seiten nicht gesetzt
+ if( *pDlgType != 0 || *pPageType != 2 )
+ {
+ nPos = aLbLineStyle.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbLineStyle.GetSavedValue() )
+ {
+ XLineStyleItem* pStyleItem = NULL;
+
+ if( nPos == 0 )
+ pStyleItem = new XLineStyleItem( XLINE_NONE );
+ else if( nPos == 1 )
+ pStyleItem = new XLineStyleItem( XLINE_SOLID );
+ else
+ {
+ pStyleItem = new XLineStyleItem( XLINE_DASH );
+
+ // Zusaetzliche Sicherheit
+ if( pDashList->Count() > (long) ( nPos - 2 ) )
+ {
+ XLineDashItem aDashItem( aLbLineStyle.GetSelectEntry(),
+ pDashList->Get( nPos - 2 )->GetDash() );
+ pOld = GetOldItem( rAttrs, XATTR_LINEDASH );
+ if ( !pOld || !( *(const XLineDashItem*)pOld == aDashItem ) )
+ {
+ rAttrs.Put( aDashItem );
+ bModified = TRUE;
+ }
+ }
+ }
+ pOld = GetOldItem( rAttrs, XATTR_LINESTYLE );
+ if ( !pOld || !( *(const XLineStyleItem*)pOld == *pStyleItem ) )
+ {
+ rAttrs.Put( *pStyleItem );
+ bModified = TRUE;
+ }
+ delete pStyleItem;
+ }
+ }
+ // Linienbreite
+ // GetSavedValue() liefert String!
+ if( aMtrLineWidth.GetText() != aMtrLineWidth.GetSavedValue() )
+ {
+ XLineWidthItem aItem( GetCoreValue( aMtrLineWidth, ePoolUnit ) );
+ pOld = GetOldItem( rAttrs, XATTR_LINEWIDTH );
+ if ( !pOld || !( *(const XLineWidthItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ //Breite Linienanfang
+ if( aMtrStartWidth.GetText() != aMtrStartWidth.GetSavedValue() )
+ {
+ XLineStartWidthItem aItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) );
+ pOld = GetOldItem( rAttrs, XATTR_LINESTARTWIDTH );
+ if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ //Breite Linienende
+ if( aMtrEndWidth.GetText() != aMtrEndWidth.GetSavedValue() )
+ {
+ XLineEndWidthItem aItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) );
+ pOld = GetOldItem( rAttrs, XATTR_LINEENDWIDTH );
+ if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+
+ // Linienfarbe
+ if( aLbColor.GetSelectEntryPos() != aLbColor.GetSavedValue() )
+ {
+ XLineColorItem aItem( aLbColor.GetSelectEntry(),
+ aLbColor.GetSelectEntryColor() );
+ pOld = GetOldItem( rAttrs, XATTR_LINECOLOR );
+ if ( !pOld || !( *(const XLineColorItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+
+ if( *pDlgType != 0 || *pPageType != 3 )
+ {
+ // Linienanfang
+ nPos = aLbStartStyle.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbStartStyle.GetSavedValue() )
+ {
+ XLineStartItem* pItem = NULL;
+ if( nPos == 0 )
+ pItem = new XLineStartItem();
+ else if( pLineEndList->Count() > (long) ( nPos - 1 ) )
+ pItem = new XLineStartItem( aLbStartStyle.GetSelectEntry(),
+ pLineEndList->Get( nPos - 1 )->GetLineEnd() );
+ pOld = GetOldItem( rAttrs, XATTR_LINESTART );
+ if( pItem &&
+ ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) )
+ {
+ rAttrs.Put( *pItem );
+ bModified = TRUE;
+ }
+ delete pItem;
+ }
+ // Linienende
+ nPos = aLbEndStyle.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbEndStyle.GetSavedValue() )
+ {
+ XLineEndItem* pItem = NULL;
+ if( nPos == 0 )
+ pItem = new XLineEndItem();
+ else if( pLineEndList->Count() > (long) ( nPos - 1 ) )
+ pItem = new XLineEndItem( aLbEndStyle.GetSelectEntry(),
+ pLineEndList->Get( nPos - 1 )->GetLineEnd() );
+ pOld = GetOldItem( rAttrs, XATTR_LINEEND );
+ if( pItem &&
+ ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) )
+ {
+ rAttrs.Put( *pItem );
+ bModified = TRUE;
+ }
+ delete pItem;
+ }
+ }
+
+ // Linienenden zentriert
+ TriState eState = aTsbCenterStart.GetState();
+ if( eState != aTsbCenterStart.GetSavedValue() )
+ {
+ XLineStartCenterItem aItem( eState );
+ pOld = GetOldItem( rAttrs, XATTR_LINESTARTCENTER );
+ if ( !pOld || !( *(const XLineStartCenterItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ eState = aTsbCenterEnd.GetState();
+ if( eState != aTsbCenterEnd.GetSavedValue() )
+ {
+ XLineEndCenterItem aItem( eState );
+ pOld = GetOldItem( rAttrs, XATTR_LINEENDCENTER );
+ if ( !pOld || !( *(const XLineEndCenterItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+
+ //Breite Linienanfang
+ if( aMtrStartWidth.GetText() != aMtrStartWidth.GetSavedValue() )
+ {
+ XLineStartWidthItem aItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) );
+ pOld = GetOldItem( rAttrs, XATTR_LINESTARTWIDTH );
+ if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ //Breite Linienende
+ if( aMtrEndWidth.GetText() != aMtrEndWidth.GetSavedValue() )
+ {
+ XLineEndWidthItem aItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) );
+ pOld = GetOldItem( rAttrs, XATTR_LINEENDWIDTH );
+ if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+
+ // Transparenz
+ UINT16 nVal = (UINT16)aMtrTransparent.GetValue();
+ if( nVal != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() )
+ {
+ XLineTransparenceItem aItem( nVal );
+ pOld = GetOldItem( rAttrs, XATTR_LINETRANSPARENCE );
+ if ( !pOld || !( *(const XLineTransparenceItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ if(nSymbolType!=SVX_SYMBOLTYPE_UNKNOWN || bNewSize)
+ {
+ //wurde also per Auswahl gesetzt oder Größe ist anders
+ SvxSizeItem aSItem(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),aSymbolSize);
+ const SfxPoolItem* pSOld = GetOldItem( rAttrs, rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE) );
+ bNewSize = pSOld ? *(const SvxSizeItem *)pSOld != aSItem : bNewSize ;
+ if(bNewSize)
+ {
+ rAttrs.Put(aSItem);
+ bModified=TRUE;
+ }
+
+ SfxInt32Item aTItem(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),nSymbolType);
+ const SfxPoolItem* pTOld = GetOldItem( rAttrs, rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE) );
+ BOOL bNewType = pTOld ? *(const SfxInt32Item*)pTOld != aTItem : TRUE;
+ if(bNewType && nSymbolType==SVX_SYMBOLTYPE_UNKNOWN)
+ bNewType=FALSE;//kleine Korrektur, Typ wurde garnicht gesetzt -> kein Type-Item erzeugen!
+ if(bNewType)
+ {
+ rAttrs.Put(aTItem);
+ bModified=TRUE;
+ }
+
+ if(nSymbolType!=SVX_SYMBOLTYPE_NONE)
+ {
+ SvxBrushItem aBItem(aSymbolGraphic,GPOS_MM,rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH));
+ const SfxPoolItem* pBOld = GetOldItem( rAttrs, rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH) );
+ BOOL bNewBrush = pBOld ? *(const SvxBrushItem*)pBOld != aBItem : TRUE;
+ if(bNewBrush)
+ {
+ rAttrs.Put(aBItem);
+ bModified=TRUE;
+ }
+ }
+ }
+
+ return( bModified );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxLineTabPage::FillXLSet_Impl()
+{
+ USHORT nPos;
+
+ if( aLbLineStyle.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
+ {
+ //rXLSet.Put( XLineDashItem ( rOutAttrs.Get( GetWhich( XATTR_LINEDASH ) ) ) );
+ rXLSet.Put( XLineStyleItem( XLINE_NONE ) );
+ }
+ else if( aLbLineStyle.IsEntryPosSelected( 0 ) )
+ rXLSet.Put( XLineStyleItem( XLINE_NONE ) );
+ else if( aLbLineStyle.IsEntryPosSelected( 1 ) )
+ rXLSet.Put( XLineStyleItem( XLINE_SOLID ) );
+ else
+ {
+ rXLSet.Put( XLineStyleItem( XLINE_DASH ) );
+
+ nPos = aLbLineStyle.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ rXLSet.Put( XLineDashItem( aLbLineStyle.GetSelectEntry(),
+ pDashList->Get( nPos - 2 )->GetDash() ) );
+ }
+ }
+
+ nPos = aLbStartStyle.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ if( nPos == 0 )
+ rXLSet.Put( XLineStartItem() );
+ else
+ rXLSet.Put( XLineStartItem( aLbStartStyle.GetSelectEntry(),
+ pLineEndList->Get( nPos - 1 )->GetLineEnd() ) );
+ }
+ nPos = aLbEndStyle.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ if( nPos == 0 )
+ rXLSet.Put( XLineEndItem() );
+ else
+ rXLSet.Put( XLineEndItem( aLbEndStyle.GetSelectEntry(),
+ pLineEndList->Get( nPos - 1 )->GetLineEnd() ) );
+ }
+
+ rXLSet.Put( XLineStartWidthItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) ) );
+ rXLSet.Put( XLineEndWidthItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) ) );
+
+ rXLSet.Put( XLineWidthItem( GetCoreValue( aMtrLineWidth, ePoolUnit ) ) );
+ rXLSet.Put( XLineColorItem( aLbColor.GetSelectEntry(),
+ aLbColor.GetSelectEntryColor() ) );
+
+ // Linienenden zentriert
+ if( aTsbCenterStart.GetState() == STATE_CHECK )
+ rXLSet.Put( XLineStartCenterItem( TRUE ) );
+ else if( aTsbCenterStart.GetState() == STATE_NOCHECK )
+ rXLSet.Put( XLineStartCenterItem( FALSE ) );
+
+ if( aTsbCenterEnd.GetState() == STATE_CHECK )
+ rXLSet.Put( XLineEndCenterItem( TRUE ) );
+ else if( aTsbCenterEnd.GetState() == STATE_NOCHECK )
+ rXLSet.Put( XLineEndCenterItem( FALSE ) );
+
+ // Transparenz
+ UINT16 nVal = (UINT16)aMtrTransparent.GetValue();
+ rXLSet.Put( XLineTransparenceItem( nVal ) );
+
+ XOut.SetLineAttr( aXLineAttr );
+
+ return( TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
+{
+ String aString;
+ XLineStyle eXLS; // XLINE_NONE, XLINE_SOLID, XLINE_DASH
+
+ // Linienstil
+/*
+ if( bObjSelected &&
+ rAttrs.GetItemState( GetWhich( XATTR_LINESTYLE ) ) == SFX_ITEM_DEFAULT )
+ {
+ aLbLineStyle.Disable();
+ }
+*/
+ const SfxPoolItem *pPoolItem;
+ long nSymType=SVX_SYMBOLTYPE_UNKNOWN;
+ BOOL bPrevSym=FALSE;
+ BOOL bEnable=TRUE;
+ BOOL bIgnoreGraphic=FALSE;
+ BOOL bIgnoreSize=FALSE;
+ if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),TRUE,&pPoolItem) == SFX_ITEM_SET)
+ {
+ nSymType=((const SfxInt32Item *)pPoolItem)->GetValue();
+ }
+
+ if(nSymType == SVX_SYMBOLTYPE_AUTO)
+ {
+ aSymbolGraphic=aAutoSymbolGraphic;
+ aSymbolSize=aSymbolLastSize=aAutoSymbolGraphic.GetPrefSize();
+#ifdef DEBUG
+ ByteString aStr( "SVX_SYMBOLTYPE_AUTO AutoSymbolSize is " );
+ aStr.Append( ByteString::CreateFromInt32( aSymbolSize.Width() ) );
+ aStr.Append( ' ' );
+ aStr.Append( ByteString::CreateFromInt32( aSymbolSize.Height() ) );
+ SVX_TRACE( 213, aStr );
+#endif
+ bPrevSym=TRUE;
+ bEnable=FALSE;
+ bIgnoreGraphic=TRUE;
+ bIgnoreSize=TRUE;
+ }
+ else if(nSymType == SVX_SYMBOLTYPE_NONE)
+ {
+ bEnable=FALSE;
+ bIgnoreGraphic=TRUE;
+ bIgnoreSize=TRUE;
+ SVX_TRACE(213, ByteString( "SVX_SYMBOLTYPE_NONE" ) );
+ }
+ else if(nSymType >= 0)
+ {
+#ifdef DEBUG
+ ByteString aStr( "SVX_SYMBOLTYPE = " );
+ aStr.Append( ByteString::CreateFromInt32( nSymType ) );
+ SVX_TRACE(213, aStr );
+#endif
+ VirtualDevice aVDev;
+ aVDev.SetMapMode(MapMode(MAP_100TH_MM));
+ SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS);
+ pModel->GetItemPool().FreezeIdRanges();
+ SdrPage* pPage = new SdrPage( *pModel, FALSE );
+ pPage->SetSize(Size(1000,1000));
+ pModel->InsertPage( pPage, 0 );
+ SdrView* pView = new SdrView( pModel, &aVDev );
+ pView->SetMarkHdlHidden( TRUE );
+ SdrPageView* pPageView = pView->ShowPage(pPage, Point());
+ SdrObject *pObj=NULL;
+ long nSymTmp=nSymType;
+ if(pSymbolList)
+ {
+ if(pSymbolList->GetObjCount())
+ {
+ nSymTmp=nSymTmp%pSymbolList->GetObjCount(); //Liste wird als cyclisch betrachtet!!!
+ pObj=pSymbolList->GetObj(nSymTmp);
+ if(pObj)
+ {
+ pObj=pObj->Clone();
+ pPage->NbcInsertObject(pObj);
+ pView->MarkObj(pObj,pPageView);
+ if(pSymbolAttr)
+ pObj->NbcSetAttributes(*pSymbolAttr,FALSE);
+ else
+ pObj->NbcSetAttributes(rOutAttrs,FALSE);
+ GDIMetaFile aMeta(pView->GetAllMarkedMetaFile());
+
+ aSymbolGraphic=Graphic(aMeta);
+ aSymbolSize=pObj->GetSnapRect().GetSize();
+ aSymbolGraphic.SetPrefSize(aSymbolSize);
+ aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM);
+ bPrevSym=TRUE;
+ bEnable=TRUE;
+ bIgnoreGraphic=TRUE;
+
+ pView->UnmarkAll();
+ pObj=pPage->RemoveObject(0);
+ if(pObj)
+ delete pObj;
+ }
+ }
+ }
+ delete pView;
+ delete pModel;
+ }
+ if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH),TRUE,&pPoolItem) == SFX_ITEM_SET)
+ {
+ SVX_TRACE(213, ByteString( "SVX_SYMBOLTYPE_BRUSH Item for Brush found" ) );
+ const Graphic* pGraphic = ((const SvxBrushItem *)pPoolItem)->GetGraphic();
+ if(!bIgnoreGraphic)
+ {
+ SVX_TRACE(213, ByteString( "SVX_SYMBOLTYPE_BRUSH Item setting Graphic" ) );
+ aSymbolGraphic=*pGraphic;
+ }
+ if(!bIgnoreSize)
+ {
+ SVX_TRACE(213, ByteString( "SVX_SYMBOLTYPE_BRUSH Item setting Size" ) );
+ aSymbolSize=OutputDevice::LogicToLogic( pGraphic->GetPrefSize(),
+ pGraphic->GetPrefMapMode(),
+ MAP_100TH_MM );
+#ifdef DEBUG
+ ByteString aStr( "SVX_SYMBOLTYPE_BRUSH Item setting Size: " );
+ aStr.Append( ByteString::CreateFromInt32( aSymbolSize.Width() ) );
+ aStr.Append( ByteString::CreateFromInt32( aSymbolSize.Height() ) );
+ SVX_TRACE( 213, aStr );
+#endif
+ }
+ bPrevSym=TRUE;
+ }
+ if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),TRUE,&pPoolItem) == SFX_ITEM_SET)
+ {
+ aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize();
+ }
+
+
+ aSymbolRatioCB.Enable(bEnable);
+ aSymbolHeightFT.Enable(bEnable);
+ aSymbolWidthFT.Enable(bEnable);
+ aSymbolWidthMF.Enable(bEnable);
+ aSymbolHeightMF.Enable(bEnable);
+ if(bPrevSym)
+ {
+ SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit);
+ SetMetricValue(aSymbolHeightMF, aSymbolSize.Height(),ePoolUnit);
+ aCtlPreview.SetSymbol(&aSymbolGraphic,aSymbolSize);
+ aSymbolLastSize=aSymbolSize;
+ }
+
+ if( rAttrs.GetItemState( XATTR_LINESTYLE ) != SFX_ITEM_DONTCARE )
+ {
+ eXLS = (XLineStyle) ( ( const XLineStyleItem& ) rAttrs.Get( XATTR_LINESTYLE ) ).GetValue();
+
+ switch( eXLS )
+ {
+ case XLINE_NONE:
+ aLbLineStyle.SelectEntryPos( 0 );
+ break;
+ case XLINE_SOLID:
+ aLbLineStyle.SelectEntryPos( 1 );
+ break;
+
+ case XLINE_DASH:
+ aLbLineStyle.SetNoSelection();
+ aLbLineStyle.SelectEntry( ( ( const XLineDashItem& ) rAttrs.
+ Get( XATTR_LINEDASH ) ).GetName() );
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ aLbLineStyle.SetNoSelection();
+ }
+
+ // Linienstaerke
+/*
+ if( bObjSelected &&
+ rAttrs.GetItemState( GetWhich( XATTR_LINEWIDTH ) ) == SFX_ITEM_DEFAULT )
+ {
+ aMtrLineWidth.Disable();
+ }
+*/
+ if( rAttrs.GetItemState( XATTR_LINEWIDTH ) != SFX_ITEM_DONTCARE )
+ {
+ SetMetricValue( aMtrLineWidth, ( ( const XLineWidthItem& ) rAttrs.
+ Get( XATTR_LINEWIDTH ) ).GetValue(), ePoolUnit );
+ }
+ else
+ aMtrLineWidth.SetText( String() );
+
+ // Linienfarbe
+/*
+ if( bObjSelected &&
+ rAttrs.GetItemState( GetWhich( XATTR_LINECOLOR ) ) == SFX_ITEM_DEFAULT )
+ {
+ aLbColor.Disable();
+ }
+*/
+ aLbColor.SetNoSelection();
+
+ if ( rAttrs.GetItemState( XATTR_LINECOLOR ) != SFX_ITEM_DONTCARE )
+ {
+ Color aCol = ( ( const XLineColorItem& ) rAttrs.Get( XATTR_LINECOLOR ) ).GetValue();
+ aLbColor.SelectEntry( aCol );
+ if( aLbColor.GetSelectEntryCount() == 0 )
+ {
+ aLbColor.InsertEntry( aCol, String() );
+ aLbColor.SelectEntry( aCol );
+ }
+ }
+
+ // LinienAnfang
+ if( bObjSelected &&
+ rAttrs.GetItemState( XATTR_LINESTART ) == SFX_ITEM_DEFAULT )
+ {
+ aLbStartStyle.Disable();
+ }
+ else if( rAttrs.GetItemState( XATTR_LINESTART ) != SFX_ITEM_DONTCARE )
+ {
+ String aStr( ( ( const XLineStartItem& ) rAttrs.Get( XATTR_LINESTART ) ).GetName() );
+ if( aStr.Len() == 0 )
+ aLbStartStyle.SelectEntryPos( 0 );
+ else
+ aLbStartStyle.SelectEntry( aStr );
+ }
+ else
+ {
+ aLbStartStyle.SetNoSelection();
+ }
+
+ // LinienEnde
+ if( bObjSelected &&
+ rAttrs.GetItemState( XATTR_LINEEND ) == SFX_ITEM_DEFAULT )
+ {
+ aLbEndStyle.Disable();
+ }
+ else if( rAttrs.GetItemState( XATTR_LINEEND ) != SFX_ITEM_DONTCARE )
+ {
+ String aStr( ( ( const XLineEndItem& ) rAttrs.Get( XATTR_LINEEND ) ).GetName() );
+ if( aStr.Len() == 0 )
+ aLbEndStyle.SelectEntryPos( 0 );
+ else
+ aLbEndStyle.SelectEntry( aStr );
+ }
+ else
+ {
+ aLbEndStyle.SetNoSelection();
+ }
+
+ // LinienAnfang St"arke
+ if( bObjSelected &&
+ rAttrs.GetItemState( XATTR_LINESTARTWIDTH ) == SFX_ITEM_DEFAULT )
+ {
+ aMtrStartWidth.Disable();
+ }
+ else if( rAttrs.GetItemState( XATTR_LINESTARTWIDTH ) != SFX_ITEM_DONTCARE )
+ {
+ SetMetricValue( aMtrStartWidth, ( ( const XLineStartWidthItem& ) rAttrs.
+ Get( XATTR_LINESTARTWIDTH ) ).GetValue(), ePoolUnit );
+ }
+ else
+ aMtrStartWidth.SetText( String() );
+
+ // LinienEnde St"arke
+ if( bObjSelected &&
+ rAttrs.GetItemState( XATTR_LINEENDWIDTH ) == SFX_ITEM_DEFAULT )
+ {
+ aMtrEndWidth.Disable();
+ }
+ else if( rAttrs.GetItemState( XATTR_LINEENDWIDTH ) != SFX_ITEM_DONTCARE )
+ {
+ SetMetricValue( aMtrEndWidth, ( ( const XLineEndWidthItem& ) rAttrs.
+ Get( XATTR_LINEENDWIDTH ) ).GetValue(), ePoolUnit );
+ }
+ else
+ aMtrEndWidth.SetText( String() );
+
+ // Linienenden zentriert (Start)
+ if( bObjSelected &&
+ rAttrs.GetItemState( XATTR_LINESTARTCENTER ) == SFX_ITEM_DEFAULT )
+ {
+ aTsbCenterStart.Disable();
+ }
+ else if( rAttrs.GetItemState( XATTR_LINESTARTCENTER ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbCenterStart.EnableTriState( FALSE );
+
+ if( ( ( const XLineStartCenterItem& ) rAttrs.Get( XATTR_LINESTARTCENTER ) ).GetValue() )
+ aTsbCenterStart.SetState( STATE_CHECK );
+ else
+ aTsbCenterStart.SetState( STATE_NOCHECK );
+ }
+ else
+ {
+ aTsbCenterStart.SetState( STATE_DONTKNOW );
+ }
+
+ // Linienenden zentriert (Ende)
+ if( bObjSelected &&
+ rAttrs.GetItemState( XATTR_LINEENDCENTER ) == SFX_ITEM_DEFAULT )
+ {
+ aTsbCenterEnd.Disable();
+ }
+ else if( rAttrs.GetItemState( XATTR_LINEENDCENTER ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbCenterEnd.EnableTriState( FALSE );
+
+ if( ( ( const XLineEndCenterItem& ) rAttrs.Get( XATTR_LINEENDCENTER ) ).GetValue() )
+ aTsbCenterEnd.SetState( STATE_CHECK );
+ else
+ aTsbCenterEnd.SetState( STATE_NOCHECK );
+ }
+ else
+ {
+ aTsbCenterEnd.SetState( STATE_DONTKNOW );
+ }
+
+ // Transparenz
+ if( rAttrs.GetItemState( XATTR_LINETRANSPARENCE ) != SFX_ITEM_DONTCARE )
+ {
+ USHORT nTransp = ( ( const XLineTransparenceItem& ) rAttrs.
+ Get( XATTR_LINETRANSPARENCE ) ).GetValue();
+ aMtrTransparent.SetValue( nTransp );
+ ChangeTransparentHdl_Impl( NULL );
+ }
+ else
+ aMtrTransparent.SetText( String() );
+
+ if( !aLbStartStyle.IsEnabled() &&
+ !aLbEndStyle.IsEnabled() &&
+ !aMtrStartWidth.IsEnabled() &&
+ !aMtrEndWidth.IsEnabled() &&
+ !aTsbCenterStart.IsEnabled()&&
+ !aTsbCenterEnd.IsEnabled() )
+ {
+ aCbxSynchronize.Disable();
+ aFtLineEndsStyle.Disable();
+ aFtLineEndsWidth.Disable();
+ aGrpLineEnds.Disable();
+ }
+
+ // Synchronisieren
+ // Jetzt wird der Wert aus der INI-Datei geholt (#42258#)
+ String aStr = GetUserData();
+ aCbxSynchronize.Check( (BOOL)aStr.ToInt32() );
+
+ /*
+ if( aLbStartStyle.GetSelectEntryPos() == aLbEndStyle.GetSelectEntryPos() &&
+ aMtrStartWidth.GetValue() == aMtrEndWidth.GetValue() &&
+ aTsbCenterStart.GetState() == aTsbCenterEnd.GetState() )
+ {
+ aCbxSynchronize.Check();
+ }
+ */
+
+ // Werte sichern
+ aLbLineStyle.SaveValue();
+ aMtrLineWidth.SaveValue();
+ aLbColor.SaveValue();
+ aLbStartStyle.SaveValue();
+ aLbEndStyle.SaveValue();
+ aMtrStartWidth.SaveValue();
+ aMtrEndWidth.SaveValue();
+ aTsbCenterStart.SaveValue();
+ aTsbCenterEnd.SaveValue();
+ aMtrTransparent.SaveValue();
+
+
+ ClickInvisibleHdl_Impl( this );
+ //ClickMeasuringHdl_Impl( this );
+ //aCtlPosition.Reset();
+
+ ChangePreviewHdl_Impl( NULL );
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxLineTabPage::Create( Window* pWindow,
+ const SfxItemSet& rAttrs )
+{
+ return( new SvxLineTabPage( pWindow, rAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxLineTabPage::GetRanges()
+{
+ return( pLineRanges );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl )
+{
+ if(pCntrl == &aMtrLineWidth)
+ {
+ // Linienbreite und Start/EndBreite
+ INT32 nNewLineWidth = GetCoreValue( aMtrLineWidth, ePoolUnit );
+ if(nActLineWidth == -1)
+ {
+ // Noch nicht initialisiert, hole den Startwert
+ const SfxPoolItem* pOld = GetOldItem( rXLSet, XATTR_LINEWIDTH );
+ INT32 nStartLineWidth = 0;
+ if(pOld)
+ nStartLineWidth = (( const XLineWidthItem *)pOld)->GetValue();
+ nActLineWidth = nStartLineWidth;
+ }
+
+ if(nActLineWidth != nNewLineWidth)
+ {
+ // Anpassungen Start/EndWidth #63083#
+ INT32 nValAct = GetCoreValue( aMtrStartWidth, ePoolUnit );
+ INT32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
+ if(nValNew < 0)
+ nValNew = 0;
+ SetMetricValue( aMtrStartWidth, nValNew, ePoolUnit );
+
+ nValAct = GetCoreValue( aMtrEndWidth, ePoolUnit );
+ nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
+ if(nValNew < 0)
+ nValNew = 0;
+ SetMetricValue( aMtrEndWidth, nValNew, ePoolUnit );
+ }
+
+ // Aktuellen Wert merken
+ nActLineWidth = nNewLineWidth;
+ }
+
+ FillXLSet_Impl();
+ aCtlPreview.Invalidate();
+
+ // Transparenz entspr. zugaenglich machen
+ if( aLbLineStyle.GetSelectEntryPos() == 0 ) // unsichtbar
+ {
+ aFtTransparent.Disable();
+ aMtrTransparent.Disable();
+ }
+ else
+ {
+ aFtTransparent.Enable();
+ aMtrTransparent.Enable();
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineTabPage, ChangeStartHdl_Impl, void *, p )
+{
+ if( aCbxSynchronize.IsChecked() )
+ {
+ if( p == &aMtrStartWidth )
+ aMtrEndWidth.SetValue( aMtrStartWidth.GetValue() );
+ if( p == &aLbStartStyle )
+ aLbEndStyle.SelectEntryPos( aLbStartStyle.GetSelectEntryPos() );
+ if( p == &aTsbCenterStart )
+ aTsbCenterEnd.SetState( aTsbCenterStart.GetState() );
+ }
+
+ ChangePreviewHdl_Impl( this );
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineTabPage, ChangeEndHdl_Impl, void *, p )
+{
+ if( aCbxSynchronize.IsChecked() )
+ {
+ if( p == &aMtrEndWidth )
+ aMtrStartWidth.SetValue( aMtrEndWidth.GetValue() );
+ if( p == &aLbEndStyle )
+ aLbStartStyle.SelectEntryPos( aLbEndStyle.GetSelectEntryPos() );
+ if( p == &aTsbCenterEnd )
+ aTsbCenterStart.SetState( aTsbCenterEnd.GetState() );
+ }
+
+ ChangePreviewHdl_Impl( this );
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineTabPage, ClickInvisibleHdl_Impl, void *, EMPTYARG )
+{
+ if( aLbLineStyle.GetSelectEntryPos() == 0 ) // unsichtbar
+ {
+ aFtColor.Disable();
+ aLbColor.Disable();
+ aFtLineWidth.Disable();
+ aMtrLineWidth.Disable();
+
+ if( aGrpLineEnds.IsEnabled() )
+ {
+ aFtLineEndsStyle.Disable();
+ aFtLineEndsWidth.Disable();
+ aLbStartStyle.Disable();
+ aMtrStartWidth.Disable();
+ aTsbCenterStart.Disable();
+ aLbEndStyle.Disable();
+ aMtrEndWidth.Disable();
+ aTsbCenterEnd.Disable();
+ aCbxSynchronize.Disable();
+ }
+ }
+ else
+ {
+ aFtColor.Enable();
+ aLbColor.Enable();
+ aFtLineWidth.Enable();
+ aMtrLineWidth.Enable();
+
+ if( aGrpLineEnds.IsEnabled() )
+ {
+ aFtLineEndsStyle.Enable();
+ aFtLineEndsWidth.Enable();
+ aLbStartStyle.Enable();
+ aMtrStartWidth.Enable();
+ aTsbCenterStart.Enable();
+ aLbEndStyle.Enable();
+ aMtrEndWidth.Enable();
+ aTsbCenterEnd.Enable();
+ aCbxSynchronize.Enable();
+ }
+ }
+ ChangePreviewHdl_Impl( NULL );
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+/*
+
+long SvxLineTabPage::ClickMeasuringHdl_Impl( void* )
+{
+ if( aTsbShowMeasuring.GetState() == STATE_NOCHECK )
+ {
+ aFtPosition.Disable();
+ aCtlPosition.Disable();
+ }
+ else
+ {
+ aFtPosition.Enable();
+ aCtlPosition.Enable();
+ }
+ aCtlPosition.Invalidate();
+
+ return( 0L );
+}
+*/
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineTabPage, ChangeTransparentHdl_Impl, void *, EMPTYARG )
+{
+ UINT16 nVal = (UINT16)aMtrTransparent.GetValue();
+ XLineTransparenceItem aItem( nVal );
+
+ rXLSet.Put( XLineTransparenceItem( aItem ) );
+ XOut.SetLineAttr( aXLineAttr );
+
+ aCtlPreview.Invalidate();
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+void SvxLineTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt )
+{
+ eRP = eRcPt;
+}
+
+//------------------------------------------------------------------------
+
+void SvxLineTabPage::FillUserData()
+{
+ // Abgleich wird in der Ini-Datei festgehalten
+ UniString aStrUserData = UniString::CreateFromInt32( (sal_Int32) aCbxSynchronize.IsChecked() );
+ SetUserData( aStrUserData );
+}
+
+
+//#58425# Symbole auf einer Linie (z.B. StarChart)
+//Handler für Popup-Menue der Symbolauswahl (NumMenueButton)
+//der folgende Link stammt urspruenglich aus SvxNumOptionsTabPage
+IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
+{
+ //Popup initialisieren
+ if(!pButton->GetPopupMenu()->GetPopupMenu( MN_GALLERY ))
+ {
+ // Gallery-Eintraege besorgen
+ GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames);
+
+ PopupMenu* pPopup = new PopupMenu;
+ String aEmptyStr;
+ SfxObjectShell *pDocSh = SfxObjectShell::Current();
+
+ nNumMenuGalleryItems=aGrfNames.Count();
+ for(long i = 0; i < nNumMenuGalleryItems; i++)
+ {
+ const String* pGrfName = (const String*)aGrfNames.GetObject(i);
+
+ SvxBrushItem* pBrushItem = new SvxBrushItem(*pGrfName, aEmptyStr, GPOS_AREA);
+ pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl));
+
+ SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();
+ pInfo->pBrushItem = pBrushItem;
+ pInfo->nItemId = (UINT16)(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 );
+ }
+ }
+ aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup );
+ if(!aGrfNames.Count())
+ aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, FALSE);
+ }
+
+ if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && pSymbolList)
+ {
+ VirtualDevice aVDev;
+ aVDev.SetMapMode(MapMode(MAP_100TH_MM));
+
+ SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS);
+ pModel->GetItemPool().FreezeIdRanges();
+ // Page
+ SdrPage* pPage = new SdrPage( *pModel, FALSE );
+ pPage->SetSize(Size(1000,1000));
+ pModel->InsertPage( pPage, 0 );
+ // 3D View
+ SdrView* pView = new SdrView( pModel, &aVDev );
+ pView->SetMarkHdlHidden( TRUE );
+ SdrPageView* pPageView = pView->ShowPage(pPage, Point());
+
+ PopupMenu* pPopup = new PopupMenu;
+ String aEmptyStr;
+ SfxObjectShell *pDocSh = SfxObjectShell::Current();
+ SdrObject *pObj=NULL;
+ long i=0;
+ while(pObj=pSymbolList->GetObj(i))
+ {
+ pObj=pObj->Clone();
+ //const String* pGrfName = (const String*)aGrfNames.GetObject(i);
+ String *pStr=new String();//String(i));
+ aGrfNames.Insert(pStr,LIST_APPEND);
+ //Rectangle aRect(pObj->GetLogicRect());
+ pPage->NbcInsertObject(pObj);
+ pView->MarkObj(pObj,pPageView);
+ if(pSymbolAttr)
+ pObj->NbcSetAttributes(*pSymbolAttr,FALSE);
+ else
+ pObj->NbcSetAttributes(rOutAttrs,FALSE);
+
+ Bitmap aBitmap(pView->GetAllMarkedBitmap());
+ GDIMetaFile aMeta(pView->GetAllMarkedMetaFile());
+ pView->UnmarkAll();
+ pObj=pPage->RemoveObject(0);
+ if(pObj)
+ delete pObj;
+
+ SvxBrushItem* pBrushItem = new SvxBrushItem(Graphic(aMeta), GPOS_AREA);
+ pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl));
+
+ SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();
+ pInfo->pBrushItem = pBrushItem;
+ pInfo->nItemId = (UINT16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems);
+ aGrfBrushItems.Insert(pInfo, nNumMenuGalleryItems + i);
+
+ 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,*pStr,aImage);
+ i++;
+ }
+ aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup );
+ if(!aGrfNames.Count())
+ aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, FALSE);
+
+ delete pView;
+ delete pModel;
+ }
+ return 0;
+}
+//#58425# Symbole auf einer Linie (z.B. StarChart)
+//Handler für Popup-Menue der Symbolauswahl (NumMenueButton)
+//der folgende Link stammt urspruenglich aus SvxNumOptionsTabPage:
+IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem)
+{
+ PopupMenu* pPopup = pThis->aSymbolMB.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;
+}
+
+//#58425# Symbole auf einer Linie (z.B. StarChart)
+//Handler für Menuebutton
+IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton )
+{
+ USHORT nItemId = pButton->GetCurItemId();
+ const Graphic* pGraphic = 0;
+ String aGrfName;
+ BOOL bDontSetSize=FALSE;
+ SvxImportGraphicDialog* pGrfDlg = 0;
+ BOOL bEnable=TRUE;
+
+ if(nItemId >= MN_GALLERY_ENTRY)
+ {
+ if( (nItemId-MN_GALLERY_ENTRY) >= nNumMenuGalleryItems)
+ {
+ nSymbolType=nItemId-MN_GALLERY_ENTRY-nNumMenuGalleryItems; //Index der Liste
+#ifdef DEBUG
+ ByteString aStr( "SVX_SYMBOLTYPE = " );
+ aStr.Append( ByteString::CreateFromInt32( nSymbolType ) );
+ SVX_TRACE(213, aStr);
+#endif
+ }
+ else
+ {
+ SVX_TRACE(213,ByteString( "SVX_SYMBOLTYPE_BRUSHITEM") );
+ nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM;
+ }
+ SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.GetObject(nItemId - MN_GALLERY_ENTRY);
+ pGraphic = pInfo->pBrushItem->GetGraphic();
+ }
+ else switch(nItemId)
+ {
+ case MN_SYMBOLS_AUTO:
+ {
+ pGraphic=&aAutoSymbolGraphic;
+ aSymbolSize=aAutoSymbolGraphic.GetPrefSize();
+#ifdef DEBUG
+ ByteString aStr( "AutoSymbolSize is ");
+ aStr.Append( ByteString::CreateFromInt32( aSymbolSize.Width() ) );
+ aStr.Append( ' ' );
+ aStr.Append( ByteString::CreateFromInt32( aSymbolSize.Height() ) );
+ SVX_TRACE(213, aStr );
+#endif
+ bDontSetSize=TRUE;
+ bNewSize=FALSE; //frühere Änderungen gelten nicht in diesem Fall!
+ nSymbolType=SVX_SYMBOLTYPE_AUTO;
+ bEnable=FALSE;
+ }
+ break;
+
+ case MN_SYMBOLS_NONE:
+ {
+ SVX_TRACE(213,ByteString( "SVX_SYMBOLTYPE_NONE" ) );
+ nSymbolType=SVX_SYMBOLTYPE_NONE;
+ pGraphic=NULL;
+ bEnable=FALSE;
+ }
+ break;
+ default:
+ {
+ SVX_TRACE(213,ByteString( "SVX_SYMBOLTYPE_ Brush lesen, wird aus Datei generiert" ) );
+ nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM;//wie Gallery, Graphic ist im Item enthalten
+ 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();
+ }
+ }
+ break;
+ }
+
+ if(pGraphic)
+ {
+ Size aSize = SvxNumberFormat::GetGraphicSizeMM100(pGraphic);
+ aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)ePoolUnit);
+ aSymbolGraphic=*pGraphic;
+ if(!bDontSetSize)
+ {
+ aSymbolSize=aSize;
+#ifdef DEBUG
+ ByteString aStr( "SymbolSize changed to " );
+ aStr.Append( ByteString::CreateFromInt32( aSize.Width() ) );
+ aStr.Append( ' ' );
+ aStr.Append( ByteString::CreateFromInt32( aSize.Height() ) );
+ SVX_TRACE(213, aStr );
+#endif
+ }
+ aCtlPreview.SetSymbol(&aSymbolGraphic,aSymbolSize);
+ }
+ else
+ {
+ aSymbolGraphic=Graphic();
+ SVX_TRACE(213, ByteString( "setting empty graphic" ) );
+ if(!bDontSetSize)
+ {
+ SVX_TRACE(213, ByteString( "Size set to 0,0" ) );
+ aSymbolSize=Size(0,0);
+ }
+ aCtlPreview.SetSymbol(NULL,aSymbolSize);
+ bEnable=FALSE;
+ }
+ aSymbolLastSize=aSymbolSize;
+ SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit);
+ SetMetricValue(aSymbolHeightMF, aSymbolSize.Height(), ePoolUnit);
+ aSymbolRatioCB.Enable(bEnable);
+ aSymbolHeightFT.Enable(bEnable);
+ aSymbolWidthFT.Enable(bEnable);
+ aSymbolWidthMF.Enable(bEnable);
+ aSymbolHeightMF.Enable(bEnable);
+ aCtlPreview.Invalidate();
+
+
+
+ delete pGrfDlg;
+ return 0;
+}
+IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, MetricField *, pField)
+{
+ bNewSize=TRUE;
+ BOOL bWidth = (BOOL)(pField == &aSymbolWidthMF);
+ bLastWidthModified = bWidth;
+ BOOL bRatio = aSymbolRatioCB.IsChecked();
+ long nWidthVal = aSymbolWidthMF.Denormalize(aSymbolWidthMF.GetValue(FUNIT_100TH_MM));
+ long nHeightVal= aSymbolHeightMF.Denormalize(aSymbolHeightMF.GetValue(FUNIT_100TH_MM));
+ nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MAP_100TH_MM,(MapUnit)ePoolUnit );
+ nHeightVal = OutputDevice::LogicToLogic(nHeightVal,MAP_100TH_MM,(MapUnit)ePoolUnit);
+ aSymbolSize=Size(nWidthVal,nHeightVal);
+ double fSizeRatio;
+
+ if(bRatio)
+ {
+ if (aSymbolLastSize.Height() && aSymbolLastSize.Width())
+ fSizeRatio = (double)aSymbolLastSize.Width() / aSymbolLastSize.Height();
+ else
+ fSizeRatio = (double)1;
+ }
+
+ //Size aSymbolSize(aSymbolLastSize);
+
+ if(bWidth)
+ {
+ long nDelta = nWidthVal - aSymbolLastSize.Width();
+ aSymbolSize.Width() = nWidthVal;
+ if (bRatio)
+ {
+ aSymbolSize.Height() = aSymbolLastSize.Height() + (long)((double)nDelta / fSizeRatio);
+ aSymbolSize.Height() = OutputDevice::LogicToLogic( aSymbolSize.Height(),(MapUnit)ePoolUnit, MAP_100TH_MM );
+ aSymbolHeightMF.SetUserValue(aSymbolHeightMF.Normalize(aSymbolSize.Height()), FUNIT_100TH_MM);
+ }
+ }
+ else
+ {
+ long nDelta = nHeightVal - aSymbolLastSize.Height();
+ aSymbolSize.Height() = nHeightVal;
+ if (bRatio)
+ {
+ aSymbolSize.Width() = aSymbolLastSize.Width() + (long)((double)nDelta * fSizeRatio);
+ aSymbolSize.Width() = OutputDevice::LogicToLogic( aSymbolSize.Width(),
+ (MapUnit)ePoolUnit, MAP_100TH_MM );
+ aSymbolWidthMF.SetUserValue(aSymbolWidthMF.Normalize(aSymbolSize.Width()), FUNIT_100TH_MM);
+ }
+ }
+ aCtlPreview.ResizeSymbol(aSymbolSize);
+ aSymbolLastSize=aSymbolSize;
+ return 0;
+}
+IMPL_LINK( SvxLineTabPage, RatioHdl_Impl, CheckBox *, pBox )
+{
+ if (pBox->IsChecked())
+ {
+ if (bLastWidthModified)
+ SizeHdl_Impl(&aSymbolWidthMF);
+ else
+ SizeHdl_Impl(&aSymbolHeightMF);
+ }
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/tplnedef.cxx b/svx/source/dialog/tplnedef.cxx
new file mode 100644
index 0000000000..7fbf2d67c9
--- /dev/null
+++ b/svx/source/dialog/tplnedef.cxx
@@ -0,0 +1,1018 @@
+/*************************************************************************
+ *
+ * $RCSfile: tplnedef.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+#ifndef _SFXFILEDLG_HXX
+#include <sfx2/iodlg.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_TPLNEDEF_CXX
+
+#include "dialogs.hrc"
+#include "tabline.hrc"
+#include "dlgname.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_DASH_LIST SID_DASH_LIST
+
+#include "xattr.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+#include "xtable.hxx"
+
+#include "drawitem.hxx"
+#include "tabline.hxx"
+#include "dlgname.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+#define DLGWIN this->GetParent()->GetParent()
+
+#define BITMAP_WIDTH 32
+#define BITMAP_HEIGHT 12
+#define XOUT_WIDTH 150
+
+/*************************************************************************
+|*
+|* Dialog zum Definieren von Linienstilen
+|*
+\************************************************************************/
+
+SvxLineDefTabPage::SvxLineDefTabPage
+(
+ Window* pParent,
+ const SfxItemSet& rInAttrs
+) :
+
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_LINE_DEF ), rInAttrs ),
+
+ pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
+ XOut ( &aCtlPreview ),
+ aXLineAttr ( pXPool ),
+ rXLSet ( aXLineAttr.GetItemSet() ),
+
+ aXLStyle ( XLINE_DASH ),
+ aXWidth ( XOUT_WIDTH ),
+ aXColor ( String(), COL_BLACK ),
+ aXDash ( String(), XDash( XDASH_RECT, 3, 7, 2, 40, 15 ) ),
+
+ aFtType ( this, ResId( FT_TYPE ) ),
+ aLbType1 ( this, ResId( LB_TYPE_1 ) ),
+ aLbType2 ( this, ResId( LB_TYPE_2 ) ),
+ aFtNumber ( this, ResId( FT_NUMBER ) ),
+ aNumFldNumber1 ( this, ResId( NUM_FLD_1 ) ),
+ aNumFldNumber2 ( this, ResId( NUM_FLD_2 ) ),
+ aFtDistance ( this, ResId( FT_DISTANCE ) ),
+ aMtrDistance ( this, ResId( MTR_FLD_DISTANCE ) ),
+ aFtLength ( this, ResId( FT_LENGTH ) ),
+ aMtrLength1 ( this, ResId( MTR_FLD_LENGTH_1 ) ),
+ aMtrLength2 ( this, ResId( MTR_FLD_LENGTH_2 ) ),
+ aCbxSynchronize ( this, ResId( CBX_SYNCHRONIZE ) ),
+ aGrpDefinition ( this, ResId( GRP_DEFINITION ) ),
+ aLbLineStyles ( this, ResId( LB_LINESTYLES ) ),
+ aGrpLinestyles ( this, ResId( GRP_LINESTYLES ) ),
+ aBtnAdd ( this, ResId( BTN_ADD ) ),
+ aBtnModify ( this, ResId( BTN_MODIFY ) ),
+ aBtnDelete ( this, ResId( BTN_DELETE ) ),
+ aCtlPreview ( this, ResId( CTL_PREVIEW ), &XOut ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ aBtnLoad ( this, ResId( BTN_LOAD ) ),
+ aBtnSave ( this, ResId( BTN_SAVE ) ),
+ rOutAttrs ( rInAttrs )
+
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ // Metrik einstellen
+ GET_MODULE_FIELDUNIT( eFUnit );
+
+ switch ( eFUnit )
+ {
+ case FUNIT_M:
+ case FUNIT_KM:
+ eFUnit = FUNIT_MM;
+ break;
+ }
+ SetFieldUnit( aMtrDistance, eFUnit );
+ SetFieldUnit( aMtrLength1, eFUnit );
+ SetFieldUnit( aMtrLength2, eFUnit );
+
+ // PoolUnit ermitteln
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool?" );
+ ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH );
+
+ rXLSet.Put( aXLStyle );
+ rXLSet.Put( aXWidth );
+ rXLSet.Put( aXDash );
+ rXLSet.Put( aXColor );
+ XOut.SetLineAttr( aXLineAttr );
+
+ aBtnAdd.SetClickHdl( LINK( this, SvxLineDefTabPage, ClickAddHdl_Impl ) );
+ aBtnModify.SetClickHdl(
+ LINK( this, SvxLineDefTabPage, ClickModifyHdl_Impl ) );
+ aBtnDelete.SetClickHdl(
+ LINK( this, SvxLineDefTabPage, ClickDeleteHdl_Impl ) );
+ aBtnLoad.SetClickHdl( LINK( this, SvxLineDefTabPage, ClickLoadHdl_Impl ) );
+ aBtnSave.SetClickHdl( LINK( this, SvxLineDefTabPage, ClickSaveHdl_Impl ) );
+
+ aNumFldNumber1.SetModifyHdl(
+ LINK( this, SvxLineDefTabPage, ChangeNumber1Hdl_Impl ) );
+ aNumFldNumber2.SetModifyHdl(
+ LINK( this, SvxLineDefTabPage, ChangeNumber2Hdl_Impl ) );
+ aLbLineStyles.SetSelectHdl(
+ LINK( this, SvxLineDefTabPage, SelectLinestyleHdl_Impl ) );
+
+ // Absolut (in mm) oder Relativ (in %)
+ aCbxSynchronize.SetClickHdl(
+ LINK( this, SvxLineDefTabPage, ChangeMetricHdl_Impl ) );
+
+ // Wenn sich etwas aendert, muss Preview upgedatet werden werden
+ Link aLink = LINK( this, SvxLineDefTabPage, SelectTypeHdl_Impl );
+ aLbType1.SetSelectHdl( aLink );
+ aLbType2.SetSelectHdl( aLink );
+ aLink = LINK( this, SvxLineDefTabPage, ChangePreviewHdl_Impl );
+ aMtrLength1.SetModifyHdl( aLink );
+ aMtrLength2.SetModifyHdl( aLink );
+ aMtrDistance.SetModifyHdl( aLink );
+
+ pDashList = NULL;
+}
+
+
+// -----------------------------------------------------------------------
+
+void SvxLineDefTabPage::Construct()
+{
+ // Linienstile
+ aLbLineStyles.Fill( pDashList );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineDefTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ if( *pDlgType == 0 ) // Flaechen-Dialog
+ {
+ // ActivatePage() wird aufgerufen bevor der Dialog PageCreated() erhaelt !!!
+ if( pDashList )
+ {
+ if( *pPageType == 1 && *pPosDashLb >= 0 &&
+ *pPosDashLb != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aLbLineStyles.SelectEntryPos( *pPosDashLb );
+ }
+ // Damit evtl. vorhandener Linestyle verworfen wird
+ SelectLinestyleHdl_Impl( this );
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL; aURL.SetSmartURL( pDashList->GetName() );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpLinestyles.SetText( aString );
+
+ *pPageType = 0; // 2
+ *pPosDashLb = LISTBOX_ENTRY_NOTFOUND;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLineDefTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ CheckChanges_Impl();
+
+ FillItemSet( *pSet );
+
+ return( LEAVE_PAGE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineDefTabPage::CheckChanges_Impl()
+{
+ // wird hier benutzt, um Aenderungen NICHT zu verlieren
+ //XDashStyle eXDS;
+
+ if( aNumFldNumber1.GetText() != aNumFldNumber1.GetSavedValue() ||
+ aMtrLength1.GetText() != aMtrLength1.GetSavedValue() ||
+ aLbType1.GetSelectEntryPos() != aLbType1.GetSavedValue() ||
+ aNumFldNumber2.GetText() != aNumFldNumber2.GetSavedValue() ||
+ aMtrLength2.GetText() != aMtrLength2.GetSavedValue() ||
+ aLbType2.GetSelectEntryPos() != aLbType2.GetSavedValue() ||
+ aMtrDistance.GetText() != aMtrDistance.GetSavedValue() )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ SvxMessDialog aMessDlg( DLGWIN,
+ String( ResId( RID_SVXSTR_LINESTYLE, pMgr ) ),
+ String( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, pMgr ) ),
+ &( WarningBox::GetStandardImage() ) );
+
+ aMessDlg.SetButtonText( MESS_BTN_1,
+ String( ResId( RID_SVXSTR_CHANGE, pMgr ) ) );
+ aMessDlg.SetButtonText( MESS_BTN_2,
+ String( ResId( RID_SVXSTR_ADD, pMgr ) ) );
+
+ short nRet = aMessDlg.Execute();
+
+ switch( nRet )
+ {
+ case RET_BTN_1: // Aendern
+ {
+ ClickModifyHdl_Impl( this );
+ //aXDash = pDashList->Get( nPos )->GetDash();
+ }
+ break;
+
+ case RET_BTN_2: // Hinzufuegen
+ {
+ ClickAddHdl_Impl( this );
+ //nPos = aLbLineStyles.GetSelectEntryPos();
+ //aXDash = pDashList->Get( nPos )->GetDash();
+ }
+ break;
+
+ case RET_CANCEL:
+ break;
+ // return( TRUE ); // Abbruch
+ }
+ }
+
+
+
+ USHORT nPos = aLbLineStyles.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ *pPosDashLb = nPos;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs )
+{
+ if( *pDlgType == 0 ) // Linien-Dialog
+ {
+ if( *pPageType == 2 )
+ {
+ //CheckChanges_Impl();
+
+ FillDash_Impl();
+
+ String aString( aLbLineStyles.GetSelectEntry() );
+ rAttrs.Put( XLineStyleItem( XLINE_DASH ) );
+ rAttrs.Put( XLineDashItem( aString, aDash ) );
+ }
+ }
+ return( TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineDefTabPage::Reset( const SfxItemSet& rAttrs )
+{
+ if( rAttrs.GetItemState( GetWhich( XATTR_LINESTYLE ) ) != SFX_ITEM_DONTCARE )
+ {
+ XLineStyle eXLS = (XLineStyle) ( ( const XLineStyleItem& ) rAttrs.Get( GetWhich( XATTR_LINESTYLE ) ) ).GetValue();
+
+ switch( eXLS )
+ {
+ case XLINE_NONE:
+ case XLINE_SOLID:
+ aLbLineStyles.SelectEntryPos( 0 );
+ break;
+
+ case XLINE_DASH:
+ {
+ const XLineDashItem& rDashItem = ( const XLineDashItem& ) rAttrs.Get( XATTR_LINEDASH );
+ aDash = rDashItem.GetValue();
+
+ aLbLineStyles.SetNoSelection();
+ aLbLineStyles.SelectEntry( rDashItem.GetName() );
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ SelectLinestyleHdl_Impl( NULL );
+
+ // Status der Buttons ermitteln
+ if( pDashList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxLineDefTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return( new SvxLineDefTabPage( pWindow, rOutAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineDefTabPage, SelectLinestyleHdl_Impl, void *, p )
+{
+ if( pDashList->Count() > 0 )
+ {
+ int nTmp = aLbLineStyles.GetSelectEntryPos();
+ if( nTmp == LISTBOX_ENTRY_NOTFOUND )
+ {
+ }
+ else
+ aDash = pDashList->Get( nTmp )->GetDash();
+
+ FillDialog_Impl();
+
+ rXLSet.Put( XLineDashItem( String(), aDash ) );
+ XOut.SetLineAttr( aXLineAttr );
+
+ aCtlPreview.Invalidate();
+
+ // Wird erst hier gesetzt, um den Style nur dann zu uebernehmen,
+ // wenn in der ListBox ein Eintrag ausgewaehlt wurde
+ // Wenn ueber Reset() gerufen wurde ist p == NULL
+ if( p )
+ *pPageType = 2;
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxLineDefTabPage, ChangePreviewHdl_Impl, void *, EMPTYARG )
+{
+ FillDash_Impl();
+ aCtlPreview.Invalidate();
+
+ return( 0L );
+}
+IMPL_LINK_INLINE_END( SvxLineDefTabPage, ChangePreviewHdl_Impl, void *, EMPTYARG )
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineDefTabPage, ChangeNumber1Hdl_Impl, void *, EMPTYARG )
+{
+ if( aNumFldNumber1.GetValue() == 0L )
+ {
+ aNumFldNumber2.SetMin( 1L );
+ aNumFldNumber2.SetFirst( 1L );
+ }
+ else
+ {
+ aNumFldNumber2.SetMin( 0L );
+ aNumFldNumber2.SetFirst( 0L );
+ }
+
+ ChangePreviewHdl_Impl( this );
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineDefTabPage, ChangeNumber2Hdl_Impl, void *, EMPTYARG )
+{
+ if( aNumFldNumber2.GetValue() == 0L )
+ {
+ aNumFldNumber1.SetMin( 1L );
+ aNumFldNumber1.SetFirst( 1L );
+ }
+ else
+ {
+ aNumFldNumber1.SetMin( 0L );
+ aNumFldNumber1.SetFirst( 0L );
+ }
+
+ ChangePreviewHdl_Impl( this );
+
+ return( 0L );
+}
+
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineDefTabPage, ChangeMetricHdl_Impl, void *, p )
+{
+ if( !aCbxSynchronize.IsChecked() && aMtrLength1.GetUnit() != eFUnit )
+ {
+ long nTmp1, nTmp2, nTmp3;
+
+ // Wurde ueber Control geaendert
+ if( p )
+ {
+ nTmp1 = GetCoreValue( aMtrLength1, ePoolUnit ) * XOUT_WIDTH / 100;
+ nTmp2 = GetCoreValue( aMtrLength2, ePoolUnit ) * XOUT_WIDTH / 100;
+ nTmp3 = GetCoreValue( aMtrDistance, ePoolUnit ) * XOUT_WIDTH / 100;
+ }
+ else
+ {
+ nTmp1 = GetCoreValue( aMtrLength1, ePoolUnit );
+ nTmp2 = GetCoreValue( aMtrLength2, ePoolUnit );
+ nTmp3 = GetCoreValue( aMtrDistance, ePoolUnit );
+ }
+ aMtrLength1.SetDecimalDigits( 2 );
+ aMtrLength2.SetDecimalDigits( 2 );
+ aMtrDistance.SetDecimalDigits( 2 );
+
+ // Metrik einstellen
+ aMtrLength1.SetUnit( eFUnit );
+ aMtrLength2.SetUnit( eFUnit );
+ aMtrDistance.SetUnit( eFUnit );
+
+ SetMetricValue( aMtrLength1, nTmp1, ePoolUnit );
+ SetMetricValue( aMtrLength2, nTmp2, ePoolUnit );
+ SetMetricValue( aMtrDistance, nTmp3, ePoolUnit );
+ }
+ else if( aCbxSynchronize.IsChecked() && aMtrLength1.GetUnit() != FUNIT_CUSTOM )
+ {
+ long nTmp1, nTmp2, nTmp3;
+
+ // Wurde ueber Control geaendert
+ if( p )
+ {
+ nTmp1 = GetCoreValue( aMtrLength1, ePoolUnit ) * 100 / XOUT_WIDTH;
+ nTmp2 = GetCoreValue( aMtrLength2, ePoolUnit ) * 100 / XOUT_WIDTH;
+ nTmp3 = GetCoreValue( aMtrDistance, ePoolUnit ) * 100 / XOUT_WIDTH;
+ }
+ else
+ {
+ nTmp1 = GetCoreValue( aMtrLength1, ePoolUnit );
+ nTmp2 = GetCoreValue( aMtrLength2, ePoolUnit );
+ nTmp3 = GetCoreValue( aMtrDistance, ePoolUnit );
+ }
+
+ aMtrLength1.SetDecimalDigits( 0 );
+ aMtrLength2.SetDecimalDigits( 0 );
+ aMtrDistance.SetDecimalDigits( 0 );
+
+ aMtrLength1.SetUnit( FUNIT_CUSTOM );
+ aMtrLength2.SetUnit( FUNIT_CUSTOM );
+ aMtrDistance.SetUnit( FUNIT_CUSTOM );
+
+
+ SetMetricValue( aMtrLength1, nTmp1, ePoolUnit );
+ SetMetricValue( aMtrLength2, nTmp2, ePoolUnit );
+ SetMetricValue( aMtrDistance, nTmp3, ePoolUnit );
+ }
+ SelectTypeHdl_Impl( NULL );
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineDefTabPage, SelectTypeHdl_Impl, void *, p )
+{
+ if ( p == &aLbType1 || !p )
+ {
+ if ( aLbType1.GetSelectEntryPos() == 0 )
+ {
+ aMtrLength1.Disable();
+ aMtrLength1.SetText( String() );
+ }
+ else if ( !aMtrLength1.IsEnabled() )
+ {
+ aMtrLength1.Enable();
+ aMtrLength1.Reformat();
+ }
+ }
+
+ if ( p == &aLbType2 || !p )
+ {
+ if ( aLbType2.GetSelectEntryPos() == 0 )
+ {
+ aMtrLength2.Disable();
+ aMtrLength2.SetText( String() );
+ }
+ else if ( !aMtrLength2.IsEnabled() )
+ {
+ aMtrLength2.Enable();
+ aMtrLength2.Reformat();
+ }
+ }
+ ChangePreviewHdl_Impl( p );
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ String aNewName( ResId( RID_SVXSTR_LINESTYLE, pMgr ) );
+ String aDesc( ResId( RID_SVXSTR_DESC_LINESTYLE, pMgr ) );
+ String aName;
+ XDashEntry* pEntry;
+
+ long nCount = pDashList->Count();
+ long j = 1;
+ BOOL bDifferent = FALSE;
+
+ while ( !bDifferent )
+ {
+ aName = aNewName;
+ aName += sal_Unicode(' ');
+ aName += UniString::CreateFromInt32( j++ );
+ bDifferent = TRUE;
+
+ for ( long i = 0; i < nCount && bDifferent; i++ )
+ if ( aName == pDashList->Get( i )->GetName() )
+ bDifferent = FALSE;
+ }
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+ BOOL bLoop = TRUE;
+
+ while ( bLoop && pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ {
+ if( aName == pDashList->Get( i )->GetName() )
+ bDifferent = FALSE;
+ }
+
+ if( bDifferent )
+ {
+ bLoop = FALSE;
+ FillDash_Impl();
+
+ pEntry = new XDashEntry( aDash, aName );
+
+ long nCount = pDashList->Count();
+ pDashList->Insert( pEntry, nCount );
+ Bitmap* pBitmap = pDashList->GetBitmap( nCount );
+ aLbLineStyles.Append( pEntry, pBitmap );
+
+ aLbLineStyles.SelectEntryPos( aLbLineStyles.GetEntryCount() - 1 );
+
+ // Flag fuer modifiziert setzen
+ *pnDashListState |= CT_MODIFIED;
+
+ *pPageType = 2;
+
+ // Werte sichern fuer Changes-Erkennung ( -> Methode )
+ aNumFldNumber1.SaveValue();
+ aMtrLength1.SaveValue();
+ aLbType1.SaveValue();
+ aNumFldNumber2.SaveValue();
+ aMtrLength2.SaveValue();
+ aLbType2.SaveValue();
+ aMtrDistance.SaveValue();
+ }
+ else
+ WarningBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, pMgr ) ) ).Execute();
+ }
+ delete( pDlg );
+
+ // Status der Buttons ermitteln
+ if ( pDashList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbLineStyles.GetSelectEntryPos();
+
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ String aNewName( ResId( RID_SVXSTR_LINESTYLE, pMgr ) );
+ String aDesc( ResId( RID_SVXSTR_DESC_LINESTYLE, pMgr ) );
+ String aName( pDashList->Get( nPos )->GetName() );
+ String aOldName = aName;
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+
+ long nCount = pDashList->Count();
+ BOOL bDifferent = FALSE;
+ BOOL bLoop = TRUE;
+
+ while ( bLoop && pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ {
+ if( aName == pDashList->Get( i )->GetName() &&
+ aName != aOldName )
+ bDifferent = FALSE;
+ }
+
+ if ( bDifferent )
+ {
+ bLoop = FALSE;
+ FillDash_Impl();
+
+ XDashEntry* pEntry = new XDashEntry( aDash, aName );
+
+ delete pDashList->Replace( pEntry, nPos );
+ Bitmap* pBitmap = pDashList->GetBitmap( nPos );
+ aLbLineStyles.Modify( pEntry, nPos, pBitmap );
+
+ aLbLineStyles.SelectEntryPos( nPos );
+
+ // Flag fuer modifiziert setzen
+ *pnDashListState |= CT_MODIFIED;
+
+ *pPageType = 2;
+
+ // Werte sichern fuer Changes-Erkennung ( -> Methode )
+ aNumFldNumber1.SaveValue();
+ aMtrLength1.SaveValue();
+ aLbType1.SaveValue();
+ aNumFldNumber2.SaveValue();
+ aMtrLength2.SaveValue();
+ aLbType2.SaveValue();
+ aMtrDistance.SaveValue();
+ }
+ else
+ WarningBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, pMgr ) ) ).Execute();
+ }
+ delete( pDlg );
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbLineStyles.GetSelectEntryPos();
+
+ if ( nPos >= 0 )
+ {
+ QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ),
+//! SVX_RES( RID_SVXSTR_DEL_LINESTYLE ),
+ String( SVX_RES( RID_SVXSTR_ASK_DEL_LINESTYLE ) ) );
+
+ if ( aQueryBox.Execute() == RET_YES )
+ {
+ delete pDashList->Remove( nPos );
+ aLbLineStyles.RemoveEntry( nPos );
+ aLbLineStyles.SelectEntryPos( 0 );
+
+ SelectLinestyleHdl_Impl( this );
+ *pPageType = 0; // Style soll nicht uebernommen werden
+
+ // Flag fuer modifiziert setzen
+ *pnDashListState |= CT_MODIFIED;
+
+ ChangePreviewHdl_Impl( this );
+ }
+ }
+
+ // Status der Buttons ermitteln
+ if ( !pDashList->Count() )
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxLineDefTabPage, ClickLoadHdl_Impl, void *, p )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ USHORT nReturn = RET_YES;
+
+ if ( *pnDashListState & CT_MODIFIED )
+ {
+ nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ),
+ String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, pMgr ) ) ).Execute();
+
+ if ( nReturn == RET_YES )
+ pDashList->Save();
+ }
+
+ if ( nReturn != RET_CANCEL )
+ {
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_OPEN | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.sod" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ String aFile( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+ pFileDlg->SetPath( aFile );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+ INetURLObject aURL; aURL.SetSmartURL( pFileDlg->GetPath() );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ // Liste speichern
+ XDashList* pDshLst = new XDashList( aPathURL.PathToFileName(), pXPool );
+ pDshLst->SetName( aURL.getName() );
+
+ if( pDshLst->Load() )
+ {
+ if( pDshLst )
+ {
+ // Pruefen, ob Tabelle geloescht werden darf:
+ if( pDashList != ( (SvxLineTabDialog*) DLGWIN )->GetDashList() )
+ delete pDashList;
+
+ pDashList = pDshLst;
+ ( (SvxLineTabDialog*) DLGWIN )->SetNewDashList( pDashList );
+
+ aLbLineStyles.Clear();
+ aLbLineStyles.Fill( pDashList );
+ Reset( rOutAttrs );
+
+ pDashList->SetName( aURL.getName() );
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( ResId( RID_SVXSTR_TABLE, pMgr ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpLinestyles.SetText( aString );
+
+ // Flag fuer gewechselt setzen
+ *pnDashListState |= CT_CHANGED;
+ // Flag fuer modifiziert entfernen
+ *pnDashListState &= ~CT_MODIFIED;
+ }
+ }
+ else
+ //aIStream.Close();
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_READ_DATA_ERROR, pMgr ) ) ).Execute();
+ }
+ delete( pFileDlg );
+ }
+
+ // Status der Buttons ermitteln
+ if ( pDashList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxLineDefTabPage, ClickSaveHdl_Impl, void *, p )
+{
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_SAVEAS | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.sod" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ INetURLObject aFile; aFile.SetSmartURL( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+
+ if( pDashList->GetName().Len() )
+ {
+ aFile.Append( pDashList->GetName() );
+
+ if( !aFile.getExtension().Len() )
+ aFile.SetExtension( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "sod" ) ) );
+ }
+
+ pFileDlg->SetPath( aFile.PathToFileName() );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+ INetURLObject aURL; aURL.SetSmartURL( pFileDlg->GetPath() );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ pDashList->SetName( aURL.getName() );
+ pDashList->SetPath( aPathURL.PathToFileName() );
+
+ if( pDashList->Save() )
+ {
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpLinestyles.SetText( aString );
+
+ // Flag fuer gespeichert setzen
+ *pnDashListState |= CT_SAVED;
+ // Flag fuer modifiziert entfernen
+ *pnDashListState &= ~CT_MODIFIED;
+ }
+ else
+ {
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( SVX_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute();
+ }
+ }
+ delete( pFileDlg );
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+void SvxLineDefTabPage::FillDash_Impl()
+{
+ XDashStyle eXDS;
+
+/* Alle Stile werden z.Z. nicht benutzt
+ if( aRbtEnds1.IsChecked() )
+ eXDS = XDASH_ROUND;
+ else if( aRbtEnds2.IsChecked() )
+ eXDS = XDASH_RECT;
+ else
+ eXDS = XDASH_RECT;
+*/
+ if( aCbxSynchronize.IsChecked() )
+ eXDS = XDASH_RECTRELATIVE;
+ else
+ eXDS = XDASH_RECT;
+
+ aDash.SetDashStyle( eXDS );
+ aDash.SetDots( (BYTE) aNumFldNumber1.GetValue() );
+ aDash.SetDotLen( aLbType1.GetSelectEntryPos() == 0 ? 0 :
+ GetCoreValue( aMtrLength1, ePoolUnit ) );
+ aDash.SetDashes( (BYTE) aNumFldNumber2.GetValue() );
+ aDash.SetDashLen( aLbType2.GetSelectEntryPos() == 0 ? 0 :
+ GetCoreValue( aMtrLength2, ePoolUnit ) );
+ aDash.SetDistance( GetCoreValue( aMtrDistance, ePoolUnit ) );
+
+ rXLSet.Put( XLineDashItem( String(), aDash ) );
+ XOut.SetLineAttr( aXLineAttr );
+}
+
+//------------------------------------------------------------------------
+
+void SvxLineDefTabPage::FillDialog_Impl()
+{
+ XDashStyle eXDS = aDash.GetDashStyle(); // XDASH_RECT, XDASH_ROUND
+ if( eXDS == XDASH_RECTRELATIVE )
+ aCbxSynchronize.Check();
+ else
+ aCbxSynchronize.Check( FALSE );
+
+ aNumFldNumber1.SetValue( aDash.GetDots() );
+ //aMtrLength1.SetValue( aDash.GetDotLen() );
+ SetMetricValue( aMtrLength1, aDash.GetDotLen(), ePoolUnit );
+ aLbType1.SelectEntryPos( aDash.GetDotLen() == 0 ? 0 : 1 );
+ aNumFldNumber2.SetValue( aDash.GetDashes() );
+ //aMtrLength2.SetValue( aDash.GetDashLen() );
+ SetMetricValue( aMtrLength2, aDash.GetDashLen(), ePoolUnit );
+ aLbType2.SelectEntryPos( aDash.GetDashLen() == 0 ? 0 : 1 );
+ //aMtrDistance.SetValue( aDash.GetDistance() );
+ SetMetricValue( aMtrDistance, aDash.GetDistance(), ePoolUnit );
+
+ ChangeMetricHdl_Impl( NULL );
+
+ // Werte sichern fuer Changes-Erkennung ( -> Methode )
+ aNumFldNumber1.SaveValue();
+ aMtrLength1.SaveValue();
+ aLbType1.SaveValue();
+ aNumFldNumber2.SaveValue();
+ aMtrLength2.SaveValue();
+ aLbType2.SaveValue();
+ aMtrDistance.SaveValue();
+}
+
+
diff --git a/svx/source/dialog/tplneend.cxx b/svx/source/dialog/tplneend.cxx
new file mode 100644
index 0000000000..e11497d79d
--- /dev/null
+++ b/svx/source/dialog/tplneend.cxx
@@ -0,0 +1,738 @@
+/*************************************************************************
+ *
+ * $RCSfile: tplneend.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXFILEDLG_HXX
+#include <sfx2/iodlg.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_TPLNEEND_CXX
+
+#include "dialogs.hrc"
+#include "dlgname.hrc"
+#include "tabline.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_LINEEND_LIST SID_LINEEND_LIST
+
+#include "svdobj.hxx"
+#include "svdopath.hxx"
+#include "drawitem.hxx"
+#include "xpool.hxx"
+#include "xtable.hxx"
+#include "tabline.hxx"
+#include "dlgname.hxx"
+#include "dialmgr.hxx"
+
+#define DLGWIN this->GetParent()->GetParent()
+
+#define BITMAP_WIDTH 32
+#define BITMAP_HEIGHT 12
+#define XOUT_WIDTH 150
+
+/*************************************************************************
+|*
+|* Dialog zum Definieren von Linienenden-Stilen
+|*
+\************************************************************************/
+
+SvxLineEndDefTabPage::SvxLineEndDefTabPage
+(
+ Window* pParent,
+ const SfxItemSet& rInAttrs
+) :
+
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_LINEEND_DEF ), rInAttrs ),
+
+ pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
+ XOut ( &aCtlPreview ),
+ aXLineAttr ( pXPool ),
+ rXLSet ( aXLineAttr.GetItemSet() ),
+
+ aXLStyle ( XLINE_SOLID ),
+ aXWidth ( XOUT_WIDTH ),
+ aXColor ( String(), COL_BLACK ),
+
+ aFiTip ( this, ResId( FI_TIP ) ),
+ aGrpTip ( this, ResId( GRP_TIP ) ),
+ aEdtName ( this, ResId( EDT_NAME ) ),
+ aLbLineEnds ( this, ResId( LB_LINEENDS ) ),
+ aGrpLineEnds ( this, ResId( GRP_LINEENDS ) ),
+ aBtnModify ( this, ResId( BTN_MODIFY ) ),
+ aBtnAdd ( this, ResId( BTN_ADD ) ),
+ aBtnDelete ( this, ResId( BTN_DELETE ) ),
+ aCtlPreview ( this, ResId( CTL_PREVIEW ), &XOut ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ aBtnLoad ( this, ResId( BTN_LOAD ) ),
+ aBtnSave ( this, ResId( BTN_SAVE ) ),
+ rOutAttrs ( rInAttrs )
+
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ rXLSet.Put( aXLStyle );
+ rXLSet.Put( aXWidth );
+ rXLSet.Put( aXColor );
+ rXLSet.Put( XLineStartWidthItem( aCtlPreview.GetOutputSize().Height() / 2 ) );
+ rXLSet.Put( XLineEndWidthItem( aCtlPreview.GetOutputSize().Height() / 2 ) );
+ XOut.SetLineAttr( aXLineAttr );
+
+ aBtnAdd.SetClickHdl(
+ LINK( this, SvxLineEndDefTabPage, ClickAddHdl_Impl ) );
+ aBtnModify.SetClickHdl(
+ LINK( this, SvxLineEndDefTabPage, ClickModifyHdl_Impl ) );
+ aBtnDelete.SetClickHdl(
+ LINK( this, SvxLineEndDefTabPage, ClickDeleteHdl_Impl ) );
+ aBtnLoad.SetClickHdl(
+ LINK( this, SvxLineEndDefTabPage, ClickLoadHdl_Impl ) );
+ aBtnSave.SetClickHdl(
+ LINK( this, SvxLineEndDefTabPage, ClickSaveHdl_Impl ) );
+
+ aLbLineEnds.SetSelectHdl(
+ LINK( this, SvxLineEndDefTabPage, SelectLineEndHdl_Impl ) );
+
+ pLineEndList = NULL;
+ pPolyObj = NULL;
+}
+
+//------------------------------------------------------------------------
+
+SvxLineEndDefTabPage::~SvxLineEndDefTabPage()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineEndDefTabPage::Construct()
+{
+ aLbLineEnds.Fill( pLineEndList );
+ if( !pPolyObj )
+ aBtnAdd.Disable();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineEndDefTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ if( *pDlgType == 0 ) // Flaechen-Dialog
+ {
+ // ActivatePage() wird aufgerufen bevor der Dialog PageCreated() erhaelt !!!
+ if( pLineEndList )
+ {
+ if( *pPageType == 1 && *pPosLineEndLb >= 0 &&
+ *pPosLineEndLb != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aLbLineEnds.SelectEntryPos( *pPosLineEndLb );
+ SelectLineEndHdl_Impl( this );
+ }
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ INetURLObject aURL; aURL.SetSmartURL( pLineEndList->GetName() );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpLineEnds.SetText( aString );
+
+ *pPageType = 0; // 3
+ *pPosLineEndLb = LISTBOX_ENTRY_NOTFOUND;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLineEndDefTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ CheckChanges_Impl();
+
+ FillItemSet( *pSet );
+
+ return( LEAVE_PAGE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineEndDefTabPage::CheckChanges_Impl()
+{
+ USHORT nPos = aLbLineEnds.GetSelectEntryPos();
+
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ String aString = aEdtName.GetText();
+
+ if( aString != aLbLineEnds.GetSelectEntry() )
+ {
+ QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ),
+//! SVX_RES( RID_SVXSTR_LINEEND ),
+ String( SVX_RES( RID_SVXSTR_ASK_CHANGE_LINEEND ) ) );
+
+ if ( aQueryBox.Execute() == RET_YES )
+ ClickModifyHdl_Impl( this );
+ }
+ }
+ nPos = aLbLineEnds.GetSelectEntryPos();
+
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ *pPosLineEndLb = nPos;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxLineEndDefTabPage::FillItemSet( SfxItemSet& rOutAttrs )
+{
+ if( *pDlgType == 0 ) // Linien-Dialog
+ {
+ if( *pPageType == 3 )
+ {
+ CheckChanges_Impl();
+
+ long nPos = aLbLineEnds.GetSelectEntryPos();
+ XLineEndEntry* pEntry = pLineEndList->Get( nPos );
+
+ rOutAttrs.Put( XLineStartItem( pEntry->GetName(), pEntry->GetLineEnd() ) );
+ rOutAttrs.Put( XLineEndItem( pEntry->GetName(), pEntry->GetLineEnd() ) );
+ }
+ }
+ return( TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineEndDefTabPage::Reset( const SfxItemSet& rOutAttrs )
+{
+ aLbLineEnds.SelectEntryPos( 0 );
+
+ // Update lineend
+ if( pLineEndList->Count() > 0 )
+ {
+ int nPos = aLbLineEnds.GetSelectEntryPos();
+
+ XLineEndEntry* pEntry = pLineEndList->Get( nPos );
+
+ aEdtName.SetText( aLbLineEnds.GetSelectEntry() );
+
+ rXLSet.Put( XLineStartItem( String(), pEntry->GetLineEnd() ) );
+ rXLSet.Put( XLineEndItem( String(), pEntry->GetLineEnd() ) );
+ XOut.SetLineAttr( aXLineAttr );
+
+ aCtlPreview.Invalidate();
+ }
+
+ // Status der Buttons ermitteln
+ if( pLineEndList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxLineEndDefTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return( new SvxLineEndDefTabPage( pWindow, rOutAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineEndDefTabPage, SelectLineEndHdl_Impl, void *, EMPTYARG )
+{
+ if( pLineEndList->Count() > 0 )
+ {
+ int nPos = aLbLineEnds.GetSelectEntryPos();
+
+ XLineEndEntry* pEntry = pLineEndList->Get( nPos );
+
+ aEdtName.SetText( aLbLineEnds.GetSelectEntry() );
+
+ rXLSet.Put( XLineStartItem( String(), pEntry->GetLineEnd() ) );
+ rXLSet.Put( XLineEndItem( String(), pEntry->GetLineEnd() ) );
+ XOut.SetLineAttr( aXLineAttr );
+
+ aCtlPreview.Invalidate();
+
+ // Wird erst hier gesetzt, um den Style nur dann zu uebernehmen,
+ // wenn in der ListBox ein Eintrag ausgewaehlt wurde
+ *pPageType = 3;
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+long SvxLineEndDefTabPage::ChangePreviewHdl_Impl( void* )
+{
+ aCtlPreview.Invalidate();
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbLineEnds.GetSelectEntryPos();
+
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ String aDesc( ResId( RID_SVXSTR_DESC_LINEEND, pMgr ) );
+ String aName( aEdtName.GetText() );
+ long nCount = pLineEndList->Count();
+ BOOL bDifferent = TRUE;
+
+ // Pruefen, ob Name schon vorhanden ist
+ for ( long i = 0; i < nCount && bDifferent; i++ )
+ if ( aName == pLineEndList->Get( i )->GetName() )
+ bDifferent = FALSE;
+
+ // Wenn ja, wird wiederholt ein neuer Name angefordert
+ if ( !bDifferent )
+ {
+ WarningBox aWarningBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, pMgr ) ) );
+ aWarningBox.Execute();
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+ BOOL bLoop = TRUE;
+
+ while( !bDifferent && bLoop && pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ {
+ if( aName == pLineEndList->Get( i )->GetName() )
+ bDifferent = FALSE;
+ }
+
+ if( bDifferent )
+ bLoop = FALSE;
+ else
+ aWarningBox.Execute();
+ }
+ delete( pDlg );
+ }
+
+ // Wenn nicht vorhanden, wird Eintrag aufgenommen
+ if( bDifferent )
+ {
+ XLineEndEntry* pEntry = pLineEndList->Get( nPos );
+
+ pEntry->SetName( aName );
+ aEdtName.SetText( aName );
+
+ aLbLineEnds.Modify( pEntry, nPos, pLineEndList->GetBitmap( nPos ) );
+ aLbLineEnds.SelectEntryPos( nPos );
+
+ // Flag fuer modifiziert setzen
+ *pnLineEndListState |= CT_MODIFIED;
+
+ *pPageType = 3;
+ }
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
+{
+ if( pPolyObj )
+ {
+ const SdrObject* pNewObj;
+ SdrObject* pConvPolyObj = NULL;
+ UINT16 nId = pPolyObj->GetObjIdentifier();
+
+ if( pPolyObj->ISA( SdrPathObj ) )
+ {
+ pNewObj = pPolyObj;
+ }
+ else
+ {
+ SdrObjTransformInfoRec aInfoRec;
+ pPolyObj->TakeObjInfo( aInfoRec );
+
+ if( aInfoRec.bCanConvToPath )
+ {
+ pNewObj = pConvPolyObj = pPolyObj->ConvertToPolyObj( TRUE, FALSE );
+
+ if( !pNewObj || !pNewObj->ISA( SdrPathObj ) )
+ return( 0L ); // Abbruch, zusaetzliche Sicherheit, die bei
+ // Gruppenobjekten aber nichts bringt.
+ }
+ else return( 0L ); // Abbruch
+ }
+
+ const XPolygon& rXPoly = ( (SdrPathObj*) pNewObj )->GetPathPoly().GetObject( 0 );
+ XPolygon aXPoly( rXPoly );
+
+ // Normalisieren
+ Point aPoint( aXPoly.GetBoundRect().TopLeft() );
+ aPoint.X() *= -1;
+ aPoint.Y() *= -1;
+ aXPoly.Translate( aPoint );
+
+ // Loeschen des angelegten PolyObjektes
+ if( pConvPolyObj )
+ delete pConvPolyObj;
+
+ XLineEndEntry* pEntry;
+
+ ResMgr* pMgr = DIALOG_MGR();
+ String aNewName( ResId( RID_SVXSTR_LINEEND, pMgr ) );
+ String aDesc( ResId( RID_SVXSTR_DESC_LINEEND, pMgr ) );
+ String aName;
+
+ long nCount = pLineEndList->Count();
+ long j = 1;
+ BOOL bDifferent = FALSE;
+
+ while ( !bDifferent )
+ {
+ aName = aNewName;
+ aName += sal_Unicode(' ');
+ aName += UniString::CreateFromInt32( j++ );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ if ( aName == pLineEndList->Get( i )->GetName() )
+ bDifferent = FALSE;
+ }
+
+ SvxNameDialog* pDlg = new SvxNameDialog( DLGWIN, aName, aDesc );
+ BOOL bLoop = TRUE;
+
+ while ( bLoop && pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName( aName );
+ bDifferent = TRUE;
+
+ for( long i = 0; i < nCount && bDifferent; i++ )
+ {
+ if( aName == pLineEndList->Get( i )->GetName() )
+ bDifferent = FALSE;
+ }
+
+ if( bDifferent )
+ {
+ bLoop = FALSE;
+ pEntry = new XLineEndEntry( aXPoly, aName );
+
+ long nCount = pLineEndList->Count();
+ pLineEndList->Insert( pEntry, nCount );
+ Bitmap* pBitmap = pLineEndList->GetBitmap( nCount );
+
+ // Zur ListBox hinzufuegen
+ aLbLineEnds.Append( pEntry, pBitmap );
+ aLbLineEnds.SelectEntryPos( aLbLineEnds.GetEntryCount() - 1 );
+
+ // Flag fuer modifiziert setzen
+ *pnLineEndListState |= CT_MODIFIED;
+
+ SelectLineEndHdl_Impl( this );
+ }
+ else
+ WarningBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, pMgr ) ) ).Execute();
+ }
+ delete pDlg;
+ }
+ else
+ aBtnAdd.Disable();
+
+ // Status der Buttons ermitteln
+ if ( pLineEndList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineEndDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG )
+{
+ int nPos = aLbLineEnds.GetSelectEntryPos();
+
+ if( nPos >= 0 )
+ {
+ QueryBox aQueryBox( DLGWIN, WinBits( WB_YES_NO | WB_DEF_NO ),
+//! SVX_RES( RID_SVXSTR_DEL_LINEEND ),
+ String( SVX_RES( RID_SVXSTR_ASK_DEL_LINEEND ) ) );
+
+ if ( aQueryBox.Execute() == RET_YES )
+ {
+ delete pLineEndList->Remove( nPos );
+ aLbLineEnds.RemoveEntry( nPos );
+ aLbLineEnds.SelectEntryPos( 0 );
+
+ SelectLineEndHdl_Impl( this );
+ *pPageType = 0; // LineEnd soll nicht uebernommen werden
+
+ // Flag fuer modifiziert setzen
+ *pnLineEndListState |= CT_MODIFIED;
+
+ ChangePreviewHdl_Impl( this );
+ }
+ }
+ // Status der Buttons ermitteln
+ if( !pLineEndList->Count() )
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineEndDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ USHORT nReturn = RET_YES;
+
+ if ( *pnLineEndListState & CT_MODIFIED )
+ {
+ nReturn = WarningBox( DLGWIN, WinBits( WB_YES_NO_CANCEL ),
+ String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, pMgr ) ) ).Execute();
+
+ if ( nReturn == RET_YES )
+ pLineEndList->Save();
+ }
+
+ if ( nReturn != RET_CANCEL )
+ {
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_OPEN | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.soe" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ String aFile( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+ pFileDlg->SetPath( aFile );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+ INetURLObject aURL; aURL.SetSmartURL( pFileDlg->GetPath() );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ // Liste speichern
+ XLineEndList* pLeList = new XLineEndList( aPathURL.PathToFileName(), pXPool );
+ pLeList->SetName( aURL.getName() );
+ if( pLeList->Load() )
+ {
+ if( pLeList )
+ {
+ // Pruefen, ob Tabelle geloescht werden darf:
+ if( pLineEndList != ( (SvxLineTabDialog*) DLGWIN )->GetLineEndList() )
+ delete pLineEndList;
+
+ pLineEndList = pLeList;
+ ( (SvxLineTabDialog*) DLGWIN )->SetNewLineEndList( pLineEndList );
+ aLbLineEnds.Clear();
+ aLbLineEnds.Fill( pLineEndList );
+ Reset( rOutAttrs );
+
+ pLineEndList->SetName( aURL.getName() );
+
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( ResId( RID_SVXSTR_TABLE, pMgr ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ if( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+
+ aGrpLineEnds.SetText( aString );
+
+ // Flag fuer gewechselt setzen
+ *pnLineEndListState |= CT_CHANGED;
+ // Flag fuer modifiziert entfernen
+ *pnLineEndListState &= ~CT_MODIFIED;
+ }
+ }
+ else
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( ResId( RID_SVXSTR_READ_DATA_ERROR, pMgr ) ) ).Execute();
+ }
+ delete( pFileDlg );
+ }
+
+ // Status der Buttons ermitteln
+ if ( pLineEndList->Count() )
+ {
+ aBtnModify.Enable();
+ aBtnDelete.Enable();
+ aBtnSave.Enable();
+ }
+ else
+ {
+ aBtnModify.Disable();
+ aBtnDelete.Disable();
+ aBtnSave.Disable();
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxLineEndDefTabPage, ClickSaveHdl_Impl, void *, EMPTYARG )
+{
+ SfxFileDialog* pFileDlg = new SfxFileDialog( DLGWIN, WB_SAVEAS | WB_3DLOOK );
+
+ String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.soe" ) );
+ pFileDlg->AddFilter( aStrFilterType, aStrFilterType );
+
+ INetURLObject aFile; aFile.SetSmartURL( SFX_APP()->GetAppIniManager()->Get( SFX_KEY_PALETTE_PATH ) );
+
+ if( pLineEndList->GetName().Len() )
+ {
+ aFile.Append( pLineEndList->GetName() );
+
+ if( !aFile.getExtension().Len() )
+ aFile.SetExtension( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "soe" ) ) );
+ }
+
+ pFileDlg->SetPath( aFile.PathToFileName() );
+
+ if( pFileDlg->Execute() == RET_OK )
+ {
+ INetURLObject aURL; aURL.SetSmartURL( pFileDlg->GetPath() );
+ INetURLObject aPathURL( aURL ); aPathURL.removeSegment(); aPathURL.removeFinalSlash();
+
+ pLineEndList->SetName( aURL.getName() );
+ pLineEndList->SetPath( aPathURL.PathToFileName() );
+
+ if( pLineEndList->Save() )
+ {
+ // Ermitteln (evtl. abschneiden) des Namens und in
+ // der GroupBox darstellen
+ String aString( SVX_RES( RID_SVXSTR_TABLE ) );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+
+ if ( aURL.getBase().Len() > 18 )
+ {
+ aString += aURL.getBase().Copy( 0, 15 );
+ aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ }
+ else
+ aString += aURL.getBase();
+ aGrpLineEnds.SetText( aString );
+
+ // Flag fuer gespeichert setzen
+ *pnLineEndListState |= CT_SAVED;
+ // Flag fuer modifiziert entfernen
+ *pnLineEndListState &= ~CT_MODIFIED;
+ }
+ else
+ {
+ ErrorBox( DLGWIN, WinBits( WB_OK ),
+ String( SVX_RES( RID_SVXSTR_WRITE_DATA_ERROR ) ) ).Execute();
+ }
+ }
+ delete( pFileDlg );
+ return( 0L );
+}
+
+
diff --git a/svx/source/dialog/tpshadow.cxx b/svx/source/dialog/tpshadow.cxx
new file mode 100644
index 0000000000..2eef62f707
--- /dev/null
+++ b/svx/source/dialog/tpshadow.cxx
@@ -0,0 +1,617 @@
+/*************************************************************************
+ *
+ * $RCSfile: tpshadow.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _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
+
+#define _SVX_TPSHADOW_CXX
+
+#include "xpool.hxx"
+#include "dialogs.hrc"
+#include "tabarea.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+
+#include "svdattr.hxx"
+#include "xoutx.hxx"
+
+#include "drawitem.hxx"
+#include "tabarea.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+#ifndef _SVX_XLINEIT0_HXX //autogen
+#include "xlineit0.hxx"
+#endif
+
+#define DLGWIN this->GetParent()->GetParent()
+
+// static ----------------------------------------------------------------
+
+static USHORT pShadowRanges[] =
+{
+ SDRATTR_SHADOWCOLOR,
+ SDRATTR_SHADOWTRANSPARENCE,
+ SID_ATTR_FILL_SHADOW,
+ SID_ATTR_FILL_SHADOW,
+ 0
+};
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern des Schattens
+|*
+\************************************************************************/
+
+SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
+
+ SvxTabPage ( pParent, SVX_RES( RID_SVXPAGE_SHADOW ), rInAttrs ),
+
+ pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ),
+ XOut ( &aCtlXRectPreview ),
+ aXFillAttr ( pXPool ),
+ rXFSet ( aXFillAttr.GetItemSet() ),
+
+ aFtPosition ( this, ResId( FT_POSITION ) ),
+ aCtlPosition ( this, ResId( CTL_POSITION ),
+ RP_RM, 200, 80, CS_SHADOW ),
+ aFtDistance ( this, ResId( FT_DISTANCE ) ),
+ aMtrDistance ( this, ResId( MTR_FLD_DISTANCE ) ),
+ aFtShadowColor ( this, ResId( FT_SHADOW_COLOR ) ),
+ aLbShadowColor ( this, ResId( LB_SHADOW_COLOR ) ),
+ aFtTransparent ( this, ResId( FT_TRANSPARENT ) ),
+ aMtrTransparent ( this, ResId( MTR_SHADOW_TRANSPARENT ) ),
+ aTsbShowShadow ( this, ResId( TSB_SHOW_SHADOW ) ),
+ aGrpShadow ( this, ResId( GRP_SHADOW ) ),
+ aCtlXRectPreview ( this, ResId( CTL_COLOR_PREVIEW ), &XOut,
+ (XOutdevItemPool*) rInAttrs.GetPool() ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ rOutAttrs ( rInAttrs ),
+ bDisable ( FALSE )
+
+{
+ FreeResource();
+
+ // 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( aMtrDistance, eFUnit );
+
+ // PoolUnit ermitteln
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool?" );
+ ePoolUnit = pPool->GetMetric( SDRATTR_SHADOWXDIST );
+
+ // Setzen des Output-Devices
+ XFillStyle eXFS = XFILL_SOLID;
+ if( rOutAttrs.GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE )
+ {
+ eXFS = (XFillStyle) ( ( ( const XFillStyleItem& ) rOutAttrs.
+ Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() );
+ switch( eXFS )
+ {
+ //case XFILL_NONE: --> NICHTS
+
+ case XFILL_SOLID:
+ if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLCOLOR ) )
+ {
+ XFillColorItem aColorItem( ( const XFillColorItem& )
+ rOutAttrs.Get( XATTR_FILLCOLOR ) );
+ rXFSet.Put( aColorItem );
+ }
+ break;
+
+ case XFILL_GRADIENT:
+ if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) )
+ {
+ XFillGradientItem aGradientItem( ( ( const XFillGradientItem& )
+ rOutAttrs.Get( XATTR_FILLGRADIENT ) ) );
+ rXFSet.Put( aGradientItem );
+ }
+ break;
+
+ case XFILL_HATCH:
+ if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLHATCH ) )
+ {
+ XFillHatchItem aHatchItem( ( ( const XFillHatchItem& )
+ rOutAttrs.Get( XATTR_FILLHATCH ) ) );
+ rXFSet.Put( aHatchItem );
+ }
+ break;
+
+ case XFILL_BITMAP:
+ {
+ if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLBITMAP ) )
+ {
+ XFillBitmapItem aBitmapItem( ( const XFillBitmapItem& )
+ rOutAttrs.Get( XATTR_FILLBITMAP ) );
+ rXFSet.Put( aBitmapItem );
+ }
+ }
+ break;
+ }
+ }
+ else
+ {
+ rXFSet.Put( XFillColorItem( String(), COL_LIGHTRED ) );
+ }
+ rXFSet.Put( XFillStyleItem( eXFS ) );
+ aCtlXRectPreview.SetRectAttr( &aXFillAttr );
+ //XOut.SetFillAttr( aXFillAttr );
+
+ // Setzen der Linie auf None im OutputDevice
+ XLineAttrSetItem aXLineAttr( pXPool );
+ aXLineAttr.GetItemSet().Put( XLineStyleItem( XLINE_NONE ) );
+ XOut.SetLineAttr( aXLineAttr );
+
+ aTsbShowShadow.SetClickHdl( LINK( this, SvxShadowTabPage, ClickShadowHdl_Impl ) );
+ Link aLink = LINK( this, SvxShadowTabPage, ModifyShadowHdl_Impl );
+ aLbShadowColor.SetSelectHdl( aLink );
+ aMtrTransparent.SetModifyHdl( aLink );
+ aMtrDistance.SetModifyHdl( aLink );
+
+ pColorTab = NULL;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShadowTabPage::Construct()
+{
+ // Farbtabelle fuellen
+ aLbShadowColor.Fill( pColorTab );
+
+ if( bDisable )
+ {
+ aTsbShowShadow.Disable();
+ aFtPosition.Disable();
+ aCtlPosition.Disable();
+ aFtDistance.Disable();
+ aMtrDistance.Disable();
+ aFtShadowColor.Disable();
+ aLbShadowColor.Disable();
+ aFtTransparent.Disable();
+ aMtrTransparent.Disable();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ int nPos;
+ int nCount;
+
+ if( *pDlgType == 0 ) // Flaechen-Dialog
+ {
+ if( pColorTab )
+ {
+ // ColorTable
+ if( *pnColorTableState & CT_CHANGED ||
+ *pnColorTableState & CT_MODIFIED )
+ {
+ if( *pnColorTableState & CT_CHANGED )
+ pColorTab = ( (SvxAreaTabDialog*) DLGWIN )->GetNewColorTable();
+
+ // aLbShadowColor
+ nPos = aLbShadowColor.GetSelectEntryPos();
+ aLbShadowColor.Clear();
+ aLbShadowColor.Fill( pColorTab );
+ nCount = aLbShadowColor.GetEntryCount();
+ if( nCount == 0 )
+ ; // Dieser Fall sollte nicht auftreten
+ else if( nCount <= nPos )
+ aLbShadowColor.SelectEntryPos( 0 );
+ else
+ aLbShadowColor.SelectEntryPos( nPos );
+
+ ModifyShadowHdl_Impl( this );
+ }
+ *pPageType = PT_SHADOW;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxShadowTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ FillItemSet( *pSet );
+
+ return( LEAVE_PAGE );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs )
+{
+ const SfxPoolItem* pOld = NULL;
+ BOOL bModified = FALSE;
+
+ if( !bDisable )
+ {
+ // Schatten
+ TriState eState = aTsbShowShadow.GetState();
+ if( eState != aTsbShowShadow.GetSavedValue() )
+ {
+ SdrShadowItem aItem( eState );
+ pOld = GetOldItem( rAttrs, SDRATTR_SHADOW );
+ if ( !pOld || !( *(const SdrShadowItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+
+ // Schatten-Entfernung
+ // Etwas umstaendliche Abfrage, ob etwas geaendert wurde,
+ // da Items nicht direkt auf Controls abbildbar sind
+ INT32 nX = 0L, nY = 0L;
+ INT32 nXY = GetCoreValue( aMtrDistance, ePoolUnit );
+
+ switch( aCtlPosition.GetActualRP() )
+ {
+ case RP_LT: nX = nY = -nXY; break;
+ case RP_MT: nY = -nXY; break;
+ case RP_RT: nX = nXY; nY = -nXY; break;
+ case RP_LM: nX = -nXY; break;
+ case RP_RM: nX = nXY; break;
+ case RP_LB: nX = -nXY; nY = nXY; break;
+ case RP_MB: nY = nXY; break;
+ case RP_RB: nX = nY = nXY; break;
+ }
+
+ // Wenn die Werte des Schattenabstanden==SFX_ITEM_DONTCARE und der angezeigte
+ // String im entspr. MetricField=="", dann würde der Vergleich zw. alten und
+ // neuen Distance-Werte ein falsches Ergebnis liefern, da in so einem Fall die
+ // neuen Distance-Werte den Default-Werten des MetricField entsprächen !!!!
+ if ( !aMtrDistance.IsEmptyFieldValue() ||
+ rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE ||
+ rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE )
+ {
+ INT32 nOldX = 9876543; // Unmoeglicher Wert, entspr. DontCare
+ INT32 nOldY = 9876543;
+ if( rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE &&
+ rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE )
+ {
+ nOldX = ( ( const SdrShadowXDistItem& ) rOutAttrs.
+ Get( SDRATTR_SHADOWXDIST ) ).GetValue();
+ nOldY = ( ( const SdrShadowYDistItem& ) rOutAttrs.
+ Get( SDRATTR_SHADOWYDIST ) ).GetValue();
+ }
+ SdrShadowXDistItem aXItem( nX );
+ pOld = GetOldItem( rAttrs, SDRATTR_SHADOWXDIST );
+ if ( nX != nOldX &&
+ ( !pOld || !( *(const SdrShadowXDistItem*)pOld == aXItem ) ) )
+ {
+ rAttrs.Put( aXItem );
+ bModified = TRUE;
+ }
+ SdrShadowYDistItem aYItem( nY );
+ pOld = GetOldItem( rAttrs, SDRATTR_SHADOWYDIST );
+ if ( nY != nOldY &&
+ ( !pOld || !( *(const SdrShadowYDistItem*)pOld == aYItem ) ) )
+ {
+ rAttrs.Put( aYItem );
+ bModified = TRUE;
+ }
+ }
+
+ // ShadowColor
+ USHORT nPos = aLbShadowColor.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ nPos != aLbShadowColor.GetSavedValue() )
+ {
+ SdrShadowColorItem aItem( aLbShadowColor.GetSelectEntry(),
+ aLbShadowColor.GetSelectEntryColor() );
+ pOld = GetOldItem( rAttrs, SDRATTR_SHADOWCOLOR );
+ if ( !pOld || !( *(const SdrShadowColorItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+
+ // Transparenz
+ UINT16 nVal = (UINT16)aMtrTransparent.GetValue();
+ if( nVal != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() )
+ {
+ SdrShadowTransparenceItem aItem( nVal );
+ pOld = GetOldItem( rAttrs, SDRATTR_SHADOWTRANSPARENCE );
+ if ( !pOld || !( *(const SdrShadowTransparenceItem*)pOld == aItem ) )
+ {
+ rAttrs.Put( aItem );
+ bModified = TRUE;
+ }
+ }
+ }
+ return( bModified );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs )
+{
+ if( !bDisable )
+ {
+ // Alle Objekte koennen einen Schatten besitzen
+ // z.Z. gibt es nur 8 m”gliche Positionen den Schatten zu setzen
+
+ // Ist Schatten gesetzt?
+ if( rAttrs.GetItemState( SDRATTR_SHADOW ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbShowShadow.EnableTriState( FALSE );
+
+ if( ( ( const SdrShadowItem& ) rAttrs.Get( SDRATTR_SHADOW ) ).GetValue() )
+ aTsbShowShadow.SetState( STATE_CHECK );
+ else
+ {
+ aTsbShowShadow.SetState( STATE_NOCHECK );
+ }
+ }
+ else
+ aTsbShowShadow.SetState( STATE_DONTKNOW );
+
+ // Entfernung (nur 8 moegliche Positionen), deshalb
+ // wird nur ein Item ausgewertet
+
+ if( rAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE &&
+ rAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE )
+ {
+ INT32 nX = ( ( const SdrShadowXDistItem& ) rAttrs.Get( SDRATTR_SHADOWXDIST ) ).GetValue();
+ INT32 nY = ( ( const SdrShadowYDistItem& ) rAttrs.Get( SDRATTR_SHADOWYDIST ) ).GetValue();
+
+ if( nX != 0 )
+ SetMetricValue( aMtrDistance, nX < 0L ? -nX : nX, ePoolUnit );
+ else
+ SetMetricValue( aMtrDistance, nY < 0L ? -nY : nY, ePoolUnit );
+
+ // Setzen des Schatten-Controls
+ if ( nX < 0L && nY < 0L ) aCtlPosition.SetActualRP( RP_LT );
+ else if( nX == 0L && nY < 0L ) aCtlPosition.SetActualRP( RP_MT );
+ else if( nX > 0L && nY < 0L ) aCtlPosition.SetActualRP( RP_RT );
+ else if( nX < 0L && nY == 0L ) aCtlPosition.SetActualRP( RP_LM );
+ // Mittelpunkt gibt es nicht mehr
+ else if( nX == 0L && nY == 0L ) aCtlPosition.SetActualRP( RP_RB );
+ else if( nX > 0L && nY == 0L ) aCtlPosition.SetActualRP( RP_RM );
+ else if( nX < 0L && nY > 0L ) aCtlPosition.SetActualRP( RP_LB );
+ else if( nX == 0L && nY > 0L ) aCtlPosition.SetActualRP( RP_MB );
+ else if( nX > 0L && nY > 0L ) aCtlPosition.SetActualRP( RP_RB );
+ }
+ else
+ {
+ // determine default-distance
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ SdrShadowXDistItem* pXDistItem = (SdrShadowXDistItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWXDIST);
+ SdrShadowYDistItem* pYDistItem = (SdrShadowYDistItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWYDIST);
+ if (pXDistItem && pYDistItem)
+ {
+ INT32 nX = pXDistItem->GetValue();
+ INT32 nY = pYDistItem->GetValue();
+ if( nX != 0 )
+ SetMetricValue( aMtrDistance, nX < 0L ? -nX : nX, ePoolUnit );
+ else
+ SetMetricValue( aMtrDistance, nY < 0L ? -nY : nY, ePoolUnit );
+ }
+
+ // Tristate, z.B. mehrer Objekte wurden markiert, wovon einige einen Schatten besitzen, einige nicht.
+ // Der anzuzeigende Text des MetricFields wird auf "" gesetzt und dient in der Methode FillItemSet
+ // als Erkennungszeichen dafür, das der Distance-Wert NICHT verändert wurde !!!!
+ aMtrDistance.SetText( String() );
+ aCtlPosition.SetActualRP( RP_MM );
+ }
+
+ // SchattenFarbe:
+ if( rAttrs.GetItemState( SDRATTR_SHADOWCOLOR ) != SFX_ITEM_DONTCARE )
+ {
+ aLbShadowColor.SelectEntry( ( ( const SdrShadowColorItem& ) rAttrs.Get( SDRATTR_SHADOWCOLOR ) ).GetValue() );
+ }
+ else
+ aLbShadowColor.SetNoSelection();
+
+ // Transparenz
+ if( rAttrs.GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SFX_ITEM_DONTCARE )
+ {
+ USHORT nTransp = ( ( const SdrShadowTransparenceItem& ) rAttrs.Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue();
+ aMtrTransparent.SetValue( nTransp );
+ }
+ else
+ aMtrTransparent.SetText( String() );
+
+ // Werte sichern
+ //aCtlPosition
+ aMtrDistance.SaveValue();
+ aLbShadowColor.SaveValue();
+ aTsbShowShadow.SaveValue();
+
+ // #66832# This field was not saved, but used to determine changes.
+ // Why? Seems to be the error.
+ // It IS the error.
+ aMtrTransparent.SaveValue();
+
+ ClickShadowHdl_Impl( NULL );
+ ModifyShadowHdl_Impl( NULL );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxShadowTabPage::Create( Window* pWindow,
+ const SfxItemSet& rAttrs )
+{
+ return( new SvxShadowTabPage( pWindow, rAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxShadowTabPage::GetRanges()
+{
+ return( pShadowRanges );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxShadowTabPage, ClickShadowHdl_Impl, void *, EMPTYARG )
+{
+ if( aTsbShowShadow.GetState() == STATE_NOCHECK )
+ {
+ aFtPosition.Disable();
+ aCtlPosition.Disable();
+ aFtDistance.Disable();
+ aMtrDistance.Disable();
+ aFtShadowColor.Disable();
+ aLbShadowColor.Disable();
+ aFtTransparent.Disable();
+ aMtrTransparent.Disable();
+ }
+ else
+ {
+ aFtPosition.Enable();
+ aCtlPosition.Enable();
+ aFtDistance.Enable();
+ aMtrDistance.Enable();
+ aFtShadowColor.Enable();
+ aLbShadowColor.Enable();
+ aFtTransparent.Enable();
+ aMtrTransparent.Enable();
+ }
+ aCtlPosition.Invalidate();
+
+ ModifyShadowHdl_Impl( NULL );
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxShadowTabPage, ModifyShadowHdl_Impl, void *, EMPTYARG )
+{
+ if( aTsbShowShadow.GetState() == STATE_CHECK )
+ rXFSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ else
+ rXFSet.Put( XFillStyleItem( XFILL_NONE ) );
+
+ USHORT nPos = aLbShadowColor.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ rXFSet.Put( XFillColorItem( String(),
+ aLbShadowColor.GetSelectEntryColor() ) );
+ }
+ UINT16 nVal = (UINT16)aMtrTransparent.GetValue();
+ XFillTransparenceItem aItem( nVal );
+ rXFSet.Put( XFillTransparenceItem( aItem ) );
+
+ // Schatten-Entfernung
+ INT32 nX = 0L, nY = 0L;
+ INT32 nXY = GetCoreValue( aMtrDistance, ePoolUnit );
+ switch( aCtlPosition.GetActualRP() )
+ {
+ case RP_LT: nX = nY = -nXY; break;
+ case RP_MT: nY = -nXY; break;
+ case RP_RT: nX = nXY; nY = -nXY; break;
+ case RP_LM: nX = -nXY; break;
+ case RP_RM: nX = nXY; break;
+ case RP_LB: nX = -nXY; nY = nXY; break;
+ case RP_MB: nY = nXY; break;
+ case RP_RB: nX = nY = nXY; break;
+ }
+ aCtlXRectPreview.SetShadowPos( Point( nX, nY ) );
+
+ aCtlXRectPreview.SetShadowAttr( &aXFillAttr );
+ //XOut.SetFillAttr( aXFillAttr );
+ aCtlXRectPreview.Invalidate();
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+void SvxShadowTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt )
+{
+ eRP = eRcPt;
+
+ // Schatten neu zeichnen
+ ModifyShadowHdl_Impl( pWindow );
+}
+
+
diff --git a/svx/source/dialog/transfrm.cxx b/svx/source/dialog/transfrm.cxx
new file mode 100644
index 0000000000..5d30c2bf20
--- /dev/null
+++ b/svx/source/dialog/transfrm.cxx
@@ -0,0 +1,2017 @@
+/*************************************************************************
+ *
+ * $RCSfile: transfrm.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+
+#define ITEMID_SIZE 0
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+
+#ifndef _SVDVIEW_HXX //autogen
+#include "svdview.hxx"
+#endif
+#ifndef _SVDOBJ_HXX //autogen
+#include "svdobj.hxx"
+#endif
+#ifndef _SVDPAGV_HXX //autogen
+#include "svdpagv.hxx"
+#endif
+#ifndef _SVDOTEXT_HXX //autogen
+#include "svdotext.hxx"
+#endif
+#ifndef _SDERITM_HXX //autogen
+#include "sderitm.hxx"
+#endif
+
+#include <svxids.hrc>
+#include "dialogs.hrc"
+#include "transfrm.hrc"
+#include "sizeitem.hxx"
+
+#include "transfrm.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+#include "svxenum.hxx"
+#include "anchorid.hxx"
+
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+
+#ifndef _SFXRECTITEM_HXX //autogen
+#include <svtools/rectitem.hxx>
+#endif
+
+#ifndef _AEITEM_HXX //autogen
+#include <svtools/aeitem.hxx>
+#endif
+
+// Toleranz fuer WorkingArea
+#define DIFF 1000
+
+// static ----------------------------------------------------------------
+
+static USHORT pPosRanges[] =
+{
+ SID_ATTR_TRANSFORM_POS_X,
+ SID_ATTR_TRANSFORM_POS_Y,
+ SID_ATTR_TRANSFORM_PROTECT_POS,
+ SID_ATTR_TRANSFORM_PROTECT_POS,
+ SID_ATTR_TRANSFORM_INTERN,
+ SID_ATTR_TRANSFORM_INTERN,
+ SID_ATTR_TRANSFORM_ANCHOR,
+ SID_ATTR_TRANSFORM_VERT_ORIENT,
+ 0
+};
+
+static USHORT pSizeRanges[] =
+{
+ SID_ATTR_TRANSFORM_WIDTH,
+ SID_ATTR_TRANSFORM_SIZE_POINT,
+ SID_ATTR_TRANSFORM_PROTECT_POS,
+ SID_ATTR_TRANSFORM_INTERN,
+ SID_ATTR_TRANSFORM_AUTOWIDTH,
+ SID_ATTR_TRANSFORM_AUTOHEIGHT,
+ 0
+};
+
+static USHORT pAngleRanges[] =
+{
+ SID_ATTR_TRANSFORM_ROT_X,
+ SID_ATTR_TRANSFORM_ANGLE,
+ SID_ATTR_TRANSFORM_INTERN,
+ SID_ATTR_TRANSFORM_INTERN,
+ 0
+};
+
+static USHORT pSlantRanges[] =
+{
+ SDRATTR_ECKENRADIUS,
+ SDRATTR_ECKENRADIUS,
+ SID_ATTR_TRANSFORM_SHEAR,
+ SID_ATTR_TRANSFORM_SHEAR_VERTICAL,
+ SID_ATTR_TRANSFORM_INTERN,
+ SID_ATTR_TRANSFORM_INTERN,
+ 0
+};
+
+
+// Funktion ConvertRect
+Rectangle lcl_ConvertRect( const Rectangle& rInRect, USHORT nDigits, MapUnit ePoolUnit, FieldUnit eDlgUnit )
+{
+ Rectangle aRect;
+ aRect.Left() = MetricField::ConvertValue( rInRect.Left(), nDigits, ePoolUnit, eDlgUnit );
+ aRect.Right() = MetricField::ConvertValue( rInRect.Right(), nDigits, ePoolUnit, eDlgUnit );
+ aRect.Top() = MetricField::ConvertValue( rInRect.Top(), nDigits, ePoolUnit, eDlgUnit );
+ aRect.Bottom() = MetricField::ConvertValue( rInRect.Bottom(), nDigits, ePoolUnit, eDlgUnit );
+ return( aRect );
+}
+
+// Funktion ConvertPoint
+Point lcl_ConvertPoint( Point aInPt, USHORT nDigits, MapUnit ePoolUnit, FieldUnit eDlgUnit )
+{
+ Point aPt;
+ aPt.X() = MetricField::ConvertValue( aInPt.X(), nDigits, ePoolUnit, eDlgUnit );
+ aPt.Y() = MetricField::ConvertValue( aInPt.Y(), nDigits, ePoolUnit, eDlgUnit );
+ return( aPt );
+}
+
+// Funktion ScaleRect (Beruecksichtigung des Massstabes)
+void lcl_ScaleRect( Rectangle& aRect, Fraction aUIScale )
+{
+ aRect.Left() = Fraction( aRect.Left() ) / aUIScale;
+ aRect.Right() = Fraction( aRect.Right() ) / aUIScale;
+ aRect.Top() = Fraction( aRect.Top() ) / aUIScale;
+ aRect.Bottom() = Fraction( aRect.Bottom() ) / aUIScale;
+}
+
+// Funktion ScalePoint (Beruecksichtigung des Massstabes)
+void lcl_ScalePoint( Point& aPt, Fraction aUIScale )
+{
+ aPt.X() = Fraction( aPt.X() ) / aUIScale;
+ aPt.Y() = Fraction( aPt.Y() ) / aUIScale;
+}
+
+
+/*************************************************************************
+|*
+|* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
+|*
+\************************************************************************/
+
+SvxTransformTabDialog::SvxTransformTabDialog( Window* pParent, const SfxItemSet* pAttr,
+ const SdrView* pSdrView, USHORT nAnchorTypes ) :
+ SfxTabDialog( pParent, ResId( RID_SVXDLG_TRANSFORM, DIALOG_MGR() ), pAttr ),
+ pView ( pSdrView ),
+ nAnchorCtrls(nAnchorTypes)
+{
+ 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_ANGLE, SvxAngleTabPage::Create,
+ SvxAngleTabPage::GetRanges );
+ AddTabPage( RID_SVXPAGE_SLANT, SvxSlantTabPage::Create,
+ SvxSlantTabPage::GetRanges );
+}
+
+// -----------------------------------------------------------------------
+
+SvxTransformTabDialog::~SvxTransformTabDialog()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxTransformTabDialog::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_ANGLE:
+ ( (SvxAngleTabPage&) rPage ).SetView( pView );
+ ( (SvxAngleTabPage&) rPage ).Construct();
+ break;
+
+ case RID_SVXPAGE_SLANT:
+ ( (SvxSlantTabPage&) rPage ).SetView( pView );
+ ( (SvxSlantTabPage&) rPage ).Construct();
+ break;
+ }
+}
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern der Position der Grafikobjekte
+|*
+\************************************************************************/
+
+SvxPositionTabPage::SvxPositionTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
+ SvxTabPage ( pParent, ResId( RID_SVXPAGE_POSITION, DIALOG_MGR() ), rInAttrs ),
+ aFtPosX ( this, ResId( FT_POS_X ) ),
+ aMtrPosX ( this, ResId( MTR_FLD_POS_X ) ),
+ aFtPosY ( this, ResId( FT_POS_Y ) ),
+ aMtrPosY ( this, ResId( MTR_FLD_POS_Y ) ),
+ aGrpPosition ( this, ResId( GRP_POSITION ) ),
+ aCtl ( this, ResId( CTL_RECT ), RP_LT ),
+ aAnchorBox ( this, ResId( GB_ANCHOR ) ),
+ aFtAnchor ( this, ResId( FT_ANCHOR ) ),
+ aDdLbAnchor ( this, ResId( LB_ANCHOR ) ),
+ aFtOrient ( this, ResId( FT_ORIENT ) ),
+ aDdLbOrient ( this, ResId( LB_ORIENT ) ),
+ aTsbProtect ( this, ResId( TSB_PROTECT ) ),
+ bPageDisabled ( FALSE ),
+ rOutAttrs ( rInAttrs )
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ // PoolUnit ermitteln
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ ePoolUnit = pPool->GetMetric( SID_ATTR_TRANSFORM_POS_X );
+
+ // Wird nicht mehr gebraucht:
+ // aTsbProtect.SetClickHdl( LINK( this, SvxPositionTabPage, ClickProtectHdl ) );
+ aDdLbAnchor.SetSelectHdl( LINK( this, SvxPositionTabPage, SetAnchorHdl ) );
+ aDdLbOrient.SetSelectHdl( LINK( this, SvxPositionTabPage, SetOrientHdl ) );
+ // Bis zur 364 sollte die Verankerung "Am Rahmen" nicht freigeschaltet sein
+#if SUPD <= 364
+ aDdLbAnchor.RemoveEntry( 3 );
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPositionTabPage::Construct()
+{
+ // Setzen des Rechtecks und der Workingarea
+ DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+ GET_MODULE_FIELDUNIT( eDlgUnit );
+ SetFieldUnit( aMtrPosX, eDlgUnit, TRUE );
+ SetFieldUnit( aMtrPosY, eDlgUnit, TRUE );
+
+ if( eDlgUnit == FUNIT_MILE ||
+ eDlgUnit == FUNIT_KM )
+ {
+ aMtrPosX.SetDecimalDigits( 3 );
+ aMtrPosY.SetDecimalDigits( 3 );
+ }
+
+ aRect = pView->GetAllMarkedRect();
+ pView->GetPageViewPvNum( 0 )->LogicToPagePos( aRect );
+
+ // WorkArea holen und umrechnen:
+ aWorkArea = pView->GetWorkArea();
+
+ // Beruecksichtigung Ankerposition (bei Writer)
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ if( rMarkList.GetMarkCount() >= 1 )
+ {
+ const SdrObject* pObj = rMarkList.GetMark( 0 )->GetObj();
+ aAnchorPos = pObj->GetAnchorPos();
+
+ if( aAnchorPos != Point(0,0) ) // -> Writer
+ {
+ for( USHORT i = 1; i < rMarkList.GetMarkCount(); i++ )
+ {
+ pObj = rMarkList.GetMark( i )->GetObj();
+ if( aAnchorPos != pObj->GetAnchorPos() )
+ {
+ // Unterschiedliche Ankerpositionen
+ aFtPosX.Disable();
+ aMtrPosX.Disable();
+ aMtrPosX.SetText( String() );
+ aFtPosY.Disable();
+ aMtrPosY.Disable();
+ aMtrPosY.SetText( String() );
+ aGrpPosition.Disable();
+ aCtl.Disable();
+ aTsbProtect.Disable();
+ bPageDisabled = TRUE;
+ return;
+ }
+ }
+ }
+ Point aPt = aAnchorPos * -1;
+ Point aPt2 = aPt;
+
+ aPt += aWorkArea.TopLeft();
+ aWorkArea.SetPos( aPt );
+
+ aPt2 += aRect.TopLeft();
+ aRect.SetPos( aPt2 );
+ }
+
+ // Beruecksictigung Seiten-Offset und Umrechnung
+ Point aPt( pView->GetPageViewPvNum( 0 )->GetPageOrigin() );
+
+ // Massstab
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+
+ lcl_ScaleRect( aWorkArea, aUIScale );
+ lcl_ScaleRect( aRect, aUIScale );
+ lcl_ScalePoint( aPt, aUIScale );
+
+ // Metrik konvertieren
+ int nDigits = aMtrPosX.GetDecimalDigits();
+
+ aPt = lcl_ConvertPoint( aPt, nDigits, (MapUnit) ePoolUnit, eDlgUnit );
+ aWorkArea = lcl_ConvertRect( aWorkArea, nDigits, (MapUnit) ePoolUnit, eDlgUnit );
+ aRect = lcl_ConvertRect( aRect, nDigits, (MapUnit) ePoolUnit, eDlgUnit );
+
+
+ // Beruecksichtigung Seiten-Offset
+ aPt *= -1;
+ aPt += aWorkArea.TopLeft();
+ aWorkArea.SetPos( aPt );
+
+ SetMinMaxPosition();
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxPositionTabPage::FillItemSet( SfxItemSet& rOutAttrs )
+{
+ BOOL bModified = FALSE;
+ if( !bPageDisabled )
+ {
+ if ( aMtrPosX.IsValueModified() || aMtrPosY.IsValueModified() )
+ {
+ long lX = GetCoreValue( aMtrPosX, ePoolUnit );
+ long lY = GetCoreValue( aMtrPosY, ePoolUnit );
+
+ // Altes Rechteck mit CoreUnit
+ aRect = pView->GetAllMarkedRect();
+ pView->GetPageViewPvNum( 0 )->LogicToPagePos( aRect );
+
+ GetTopLeftPosition( lX, lY, aRect );
+
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+ lX += aAnchorPos.X();
+ lX = Fraction( lX ) * aUIScale;
+ lY += aAnchorPos.Y();
+ lY = Fraction( lY ) * aUIScale;
+ rOutAttrs.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_POS_X ), (INT32) lX ) );
+ rOutAttrs.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_POS_Y ), (INT32) lY ) );
+
+ bModified |= TRUE;
+ }
+
+ if ( aTsbProtect.GetState() != aTsbProtect.GetSavedValue() )
+ {
+ if( aTsbProtect.GetState() == STATE_DONTKNOW )
+ rOutAttrs.InvalidateItem( SID_ATTR_TRANSFORM_PROTECT_POS );
+ else
+ rOutAttrs.Put(
+ SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ),
+ aTsbProtect.GetState() == STATE_CHECK ? TRUE : FALSE ) );
+ bModified |= TRUE;
+ }
+ if(aAnchorBox.IsVisible()) //nur fuer den Writer
+ {
+ if(aDdLbAnchor.GetSavedValue() != aDdLbAnchor.GetSelectEntryPos())
+ {
+ bModified |= TRUE;
+ rOutAttrs.Put(SfxUInt16Item(
+ SID_ATTR_TRANSFORM_ANCHOR, (USHORT)(ULONG)aDdLbAnchor.GetEntryData(aDdLbAnchor.GetSelectEntryPos())));
+ }
+ if(aDdLbOrient.GetSavedValue() != aDdLbOrient.GetSelectEntryPos())
+ {
+ bModified |= TRUE;
+ rOutAttrs.Put(SfxUInt16Item(
+ SID_ATTR_TRANSFORM_VERT_ORIENT, aDdLbOrient.GetSelectEntryPos()));
+ }
+ }
+ }
+ return bModified;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPositionTabPage::Reset( const SfxItemSet& rOutAttrs )
+{
+ if ( !bPageDisabled )
+ {
+ const SfxPoolItem* pItem =
+ GetItem( rOutAttrs, SID_ATTR_TRANSFORM_POS_X );
+
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+ if ( pItem )
+ {
+ long nTmp = ( (const SfxInt32Item*)pItem )->GetValue() - aAnchorPos.X();
+ nTmp = Fraction( nTmp ) / aUIScale;
+
+ SetMetricValue( aMtrPosX, nTmp, ePoolUnit );
+ }
+
+ pItem = GetItem( rOutAttrs, SID_ATTR_TRANSFORM_POS_Y );
+ if ( pItem )
+ {
+ long nTmp = ( (const SfxInt32Item*)pItem )->GetValue() - aAnchorPos.Y();
+ nTmp = Fraction( nTmp ) / aUIScale;
+
+ SetMetricValue( aMtrPosY, nTmp, ePoolUnit );
+ }
+
+ pItem = GetItem( rOutAttrs, SID_ATTR_TRANSFORM_PROTECT_POS );
+ if ( pItem )
+ {
+ aTsbProtect.SetState( ( ( const SfxBoolItem* )pItem )->GetValue()
+ ? STATE_CHECK : STATE_NOCHECK );
+ aTsbProtect.EnableTriState( FALSE );
+ }
+ else
+ aTsbProtect.SetState( STATE_DONTKNOW );
+
+ aTsbProtect.SaveValue();
+ aCtl.Reset();
+ ClickProtectHdl( this );
+
+ if(aAnchorBox.IsVisible()) //nur fuer den Writer
+ {
+ pItem = GetItem( rOutAttrs, SID_ATTR_TRANSFORM_ANCHOR );
+ USHORT nAnchorPos = 0;
+ if(pItem)
+ {
+ nAnchorPos = ((const SfxUInt16Item*)pItem)->GetValue();
+ for (USHORT i = 0; i < aDdLbAnchor.GetEntryCount(); i++)
+ {
+ if ((ULONG)aDdLbAnchor.GetEntryData(i) == (ULONG)nAnchorPos)
+ {
+ aDdLbAnchor.SelectEntryPos(i);
+ break;
+ }
+ }
+ aDdLbAnchor.SaveValue();
+ SetAnchorHdl(&aDdLbAnchor);
+ }
+ if(nAnchorPos == (USHORT)SVX_FLY_IN_CNTNT)
+ {
+ aCtl.Disable();
+ pItem = GetItem( rOutAttrs, SID_ATTR_TRANSFORM_VERT_ORIENT );
+ if(pItem)
+ {
+ aDdLbOrient.SelectEntryPos(((const SfxUInt16Item*)pItem)->GetValue());
+ }
+ }
+ else
+ {
+ aDdLbOrient.SelectEntryPos( (USHORT)SVX_VERT_LINE_CENTER );
+ }
+ aDdLbOrient.SaveValue();
+ SetOrientHdl(&aDdLbOrient);
+ aCtl.Invalidate();
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxPositionTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return( new SvxPositionTabPage( pWindow, rOutAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxPositionTabPage::GetRanges()
+{
+ return( pPosRanges );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPositionTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ SfxRectangleItem* pRectItem = NULL;
+
+ if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , FALSE,
+ (const SfxPoolItem**) &pRectItem ) )
+ {
+ // Setzen der MinMax-Position
+ aRect = pRectItem->GetValue();
+ SetMinMaxPosition();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxPositionTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if( pSet )
+ {
+ INT32 lX = aMtrPosX.GetValue();
+ INT32 lY = aMtrPosY.GetValue();
+
+ GetTopLeftPosition( lX, lY, aRect );
+ aRect.SetPos( Point( lX, lY ) );
+
+ pSet->Put( SfxRectangleItem( SID_ATTR_TRANSFORM_INTERN, aRect ) );
+
+ FillItemSet( *pSet );
+ }
+ return( LEAVE_PAGE );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxPositionTabPage, ChangePosXHdl, void *, EMPTYARG )
+{
+ return( 0L );
+}
+IMPL_LINK_INLINE_END( SvxPositionTabPage, ChangePosXHdl, void *, EMPTYARG )
+
+//------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxPositionTabPage, ChangePosYHdl, void *, EMPTYARG )
+{
+ return( 0L );
+}
+IMPL_LINK_INLINE_END( SvxPositionTabPage, ChangePosYHdl, void *, EMPTYARG )
+
+//------------------------------------------------------------------------
+
+void SvxPositionTabPage::SetMinMaxPosition()
+{
+ Rectangle aTmpRect = aWorkArea;
+
+ switch ( aCtl.GetActualRP() )
+ {
+ case RP_LT:
+ aTmpRect.Right() -= aRect.Right() - aRect.Left();
+ aTmpRect.Bottom() -= aRect.Bottom() - aRect.Top();
+ break;
+ case RP_MT:
+ aTmpRect.Left() += aRect.Center().X() - aRect.Left();
+ aTmpRect.Right() -= aRect.Center().X() - aRect.Left();
+ aTmpRect.Bottom() -= aRect.Bottom() - aRect.Top();
+ break;
+ case RP_RT:
+ aTmpRect.Left() += aRect.Right() - aRect.Left();
+ aTmpRect.Bottom() -= aRect.Bottom() - aRect.Top();
+ break;
+ case RP_LM:
+ aTmpRect.Right() -= aRect.Right() - aRect.Left();
+ aTmpRect.Top() += aRect.Center().Y() - aRect.Top();
+ aTmpRect.Bottom() -= aRect.Center().Y() - aRect.Top();
+ break;
+ case RP_MM:
+ aTmpRect.Left() += aRect.Center().X() - aRect.Left();
+ aTmpRect.Right() -= aRect.Center().X() - aRect.Left();
+ aTmpRect.Top() += aRect.Center().Y() - aRect.Top();
+ aTmpRect.Bottom() -= aRect.Center().Y() - aRect.Top();
+ break;
+ case RP_RM:
+ aTmpRect.Left() += aRect.Right() - aRect.Left();
+ aTmpRect.Top() += aRect.Center().Y() - aRect.Top();
+ aTmpRect.Bottom() -= aRect.Center().Y() - aRect.Top();
+ break;
+ case RP_LB:
+ aTmpRect.Right() -= aRect.Right() - aRect.Left();
+ aTmpRect.Top() += aRect.Bottom() - aRect.Top();
+ break;
+ case RP_MB:
+ aTmpRect.Left() += aRect.Center().X() - aRect.Left();
+ aTmpRect.Right() -= aRect.Center().X() - aRect.Left();
+ aTmpRect.Top() += aRect.Bottom() - aRect.Top();
+ break;
+ case RP_RB:
+ aTmpRect.Left() += aRect.Right() - aRect.Left();
+ aTmpRect.Top() += aRect.Bottom() - aRect.Top();
+ break;
+ }
+
+ long nMaxLong = MetricField::ConvertValue( LONG_MAX, 0, MAP_100TH_MM, eDlgUnit ) - 1L;
+
+ if( Abs( aTmpRect.Left() ) > nMaxLong )
+ {
+ long nMult = aTmpRect.Left() < 0 ? -1 : 1;
+ aTmpRect.Left() = nMaxLong * nMult;
+ }
+ if( Abs( aTmpRect.Right() ) > nMaxLong )
+ {
+ long nMult = aTmpRect.Right() < 0 ? -1 : 1;
+ aTmpRect.Right() = nMaxLong * nMult;
+ }
+ if( Abs( aTmpRect.Top() ) > nMaxLong )
+ {
+ long nMult = aTmpRect.Top() < 0 ? -1 : 1;
+ aTmpRect.Top() = nMaxLong * nMult;
+ }
+ if( Abs( aTmpRect.Bottom() ) > nMaxLong )
+ {
+ long nMult = aTmpRect.Bottom() < 0 ? -1 : 1;
+ aTmpRect.Bottom() = nMaxLong * nMult;
+ }
+
+ aMtrPosX.SetMin( aTmpRect.Left() );
+ aMtrPosX.SetFirst( aTmpRect.Left() );
+ aMtrPosX.SetMax( aTmpRect.Right() );
+ aMtrPosX.SetLast( aTmpRect.Right() );
+
+ aMtrPosY.SetMin( aTmpRect.Top() );
+ aMtrPosY.SetFirst( aTmpRect.Top() );
+ aMtrPosY.SetMax( aTmpRect.Bottom() );
+ aMtrPosY.SetLast( aTmpRect.Bottom() );
+}
+
+//------------------------------------------------------------------------
+
+void SvxPositionTabPage::GetTopLeftPosition( INT32& rX, INT32& rY,
+ const Rectangle& rRect )
+{
+ switch ( aCtl.GetActualRP() )
+ {
+ case RP_LT:
+ break;
+ case RP_MT:
+ rX = rX- ( rRect.Center().X() - rRect.Left() );
+ break;
+ case RP_RT:
+ rX = rX- ( rRect.Right() - rRect.Left() );
+ break;
+ case RP_LM:
+ rY = rY- ( rRect.Center().Y() - rRect.Top() );
+ break;
+ case RP_MM:
+ rX = rX- ( rRect.Center().X() - rRect.Left() );
+ rY = rY- ( rRect.Center().Y() - rRect.Top() );
+ break;
+ case RP_RM:
+ rX = rX- ( rRect.Right() - rRect.Left() );
+ rY = rY- ( rRect.Center().Y() - rRect.Top() );
+ break;
+ case RP_LB:
+ rY = rY- ( rRect.Bottom() - rRect.Top() );
+ break;
+ case RP_MB:
+ rX = rX- ( rRect.Center().X() - rRect.Left() );
+ rY = rY- ( rRect.Bottom() - rRect.Top() );
+ break;
+ case RP_RB:
+ rX = rX- ( rRect.Right() - rRect.Left() );
+ rY = rY- ( rRect.Bottom() - rRect.Top() );
+ break;
+ }
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxPositionTabPage, ClickProtectHdl, void *, p )
+{
+ /* Soll nicht mehr benutzt werden
+
+ if( aTsbProtect.GetState() == STATE_CHECK )
+ {
+ aFtPosX.Disable();
+ aMtrPosX.Disable();
+ aFtPosY.Disable();
+ aMtrPosY.Disable();
+ aGrpPosition.Disable();
+ aCtl.Disable();
+ aCtl.Invalidate();
+ }
+ else
+ {
+ aFtPosX.Enable();
+ aMtrPosX.Enable();
+ aFtPosY.Enable();
+ aMtrPosY.Enable();
+ aGrpPosition.Enable();
+ aCtl.Enable();
+ aCtl.Invalidate();
+ }
+ */
+
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+void SvxPositionTabPage::PointChanged( Window* pWindow, RECT_POINT eRP )
+{
+ SetMinMaxPosition();
+ switch( eRP )
+ {
+ case RP_LT:
+ aMtrPosX.SetValue( aRect.Left() );
+ aMtrPosY.SetValue( aRect.Top() );
+ break;
+ case RP_MT:
+ aMtrPosX.SetValue( aRect.Center().X() );
+ aMtrPosY.SetValue( aRect.Top() );
+ break;
+ case RP_RT:
+ aMtrPosX.SetValue( aRect.Right() );
+ aMtrPosY.SetValue( aRect.Top() );
+ break;
+ case RP_LM:
+ aMtrPosX.SetValue( aRect.Left() );
+ aMtrPosY.SetValue( aRect.Center().Y() );
+ break;
+ case RP_MM:
+ aMtrPosX.SetValue( aRect.Center().X() );
+ aMtrPosY.SetValue( aRect.Center().Y() );
+ break;
+ case RP_RM:
+ aMtrPosX.SetValue( aRect.Right() );
+ aMtrPosY.SetValue( aRect.Center().Y() );
+ break;
+ case RP_LB:
+ aMtrPosX.SetValue( aRect.Left() );
+ aMtrPosY.SetValue( aRect.Bottom() );
+ break;
+ case RP_MB:
+ aMtrPosX.SetValue( aRect.Center().X() );
+ aMtrPosY.SetValue( aRect.Bottom() );
+ break;
+ case RP_RB:
+ aMtrPosX.SetValue( aRect.Right() );
+ aMtrPosY.SetValue( aRect.Bottom() );
+ break;
+ }
+}
+
+//------------------------------------------------------------------------
+
+void SvxPositionTabPage::ShowAnchorCtrls(USHORT nAnchorCtrls)
+{
+ aAnchorBox .Show();
+ aFtAnchor .Show();
+ aFtOrient .Show();
+ aDdLbOrient .Show();
+
+ for (USHORT i = 0; i < aDdLbAnchor.GetEntryCount(); i++)
+ aDdLbAnchor.SetEntryData(i, (void *)(long)i);
+
+ if (!(nAnchorCtrls & SVX_OBJ_AT_FLY))
+ aDdLbAnchor.RemoveEntry(3);
+ if (!(nAnchorCtrls & SVX_OBJ_PAGE))
+ aDdLbAnchor.RemoveEntry(2);
+ if (!(nAnchorCtrls & SVX_OBJ_IN_CNTNT))
+ aDdLbAnchor.RemoveEntry(1);
+ if (!(nAnchorCtrls & SVX_OBJ_AT_CNTNT))
+ aDdLbAnchor.RemoveEntry(0);
+
+ aDdLbAnchor .Show();
+};
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxPositionTabPage, SetAnchorHdl, ListBox *, pBox)
+{
+ BOOL bDisable = TRUE;
+ switch( (ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos()) )
+ {
+ case SVX_FLY_AT_CNTNT:
+ case SVX_FLY_PAGE:
+ break;
+ case SVX_FLY_IN_CNTNT: bDisable = FALSE;
+ break;
+ }
+ aCtl.Enable(bDisable);
+ aCtl.Invalidate();
+ if(bDisable)
+ {
+ aDdLbOrient.Disable();
+ aFtOrient.Disable();
+ aMtrPosX.Enable();
+ aMtrPosY.Enable();
+ }
+ else
+ {
+ aMtrPosX.Disable();
+ aDdLbOrient.Enable();
+ aFtOrient.Enable();
+ SetOrientHdl(&aDdLbOrient);
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxPositionTabPage, SetOrientHdl, ListBox *, pBox )
+{
+ if(pBox->IsEnabled())
+ switch( pBox->GetSelectEntryPos() )
+ {
+ case SVX_VERT_TOP :
+ case SVX_VERT_CENTER :
+ case SVX_VERT_BOTTOM :
+ case SVX_VERT_LINE_TOP :
+ case SVX_VERT_LINE_CENTER :
+ case SVX_VERT_LINE_BOTTOM :
+ aMtrPosY.Disable();
+ break;
+ case SVX_VERT_NONE:
+ aMtrPosY.Enable();
+ break;
+ }
+ return 0;
+}
+
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern der Groesse der Grafikobjekte
+|*
+\*************************************************************************/
+
+SvxSizeTabPage::SvxSizeTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
+ SvxTabPage ( pParent, ResId( RID_SVXPAGE_SIZE, DIALOG_MGR() ), rInAttrs ),
+ aFtWidth ( this, ResId( FT_WIDTH ) ),
+ aMtrWidth ( this, ResId( MTR_FLD_WIDTH ) ),
+ aFtHeight ( this, ResId( FT_HEIGHT ) ),
+ aMtrHeight ( this, ResId( MTR_FLD_HEIGHT ) ),
+ aGrpSize ( this, ResId( GRP_SIZE ) ),
+ aGrpAdjust ( this, ResId( GRP_ADJUST ) ),
+ aCbxScale ( this, ResId( CBX_SCALE ) ),
+ aCtl ( this, ResId( CTL_RECT ), RP_LT ),
+ aTsbProtect ( this, ResId( TSB_PROTECT ) ),
+ aTsbAutoGrowWidth ( this, ResId( TSB_AUTOGROW_WIDTH ) ),
+ aTsbAutoGrowHeight ( this, ResId( TSB_AUTOGROW_HEIGHT ) ),
+ rOutAttrs ( rInAttrs )
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ // PoolUnit ermitteln
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ ePoolUnit = pPool->GetMetric( SID_ATTR_TRANSFORM_POS_X );
+
+ eRP = RP_LT; // s.o.
+
+ aMtrWidth.SetModifyHdl( LINK( this, SvxSizeTabPage, ChangeWidthHdl ) );
+ aMtrHeight.SetModifyHdl( LINK( this, SvxSizeTabPage, ChangeHeightHdl ) );
+
+ // Wird nicht mehr gebraucht:
+ // aTsbProtect.SetClickHdl( LINK( this, SvxSizeTabPage, ClickProtectHdl ) );
+ // Auto-Hdl wird fuer Scale genutzt
+ aCbxScale.SetClickHdl( LINK( this, SvxSizeTabPage, ClickAutoHdl ) );
+
+ aTsbAutoGrowWidth.Disable();
+ aTsbAutoGrowHeight.Disable();
+ aGrpAdjust.Disable();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSizeTabPage::Construct()
+{
+ // Setzen des Rechtecks und Automatisch bei Textobjekten
+ DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+ GET_MODULE_FIELDUNIT( eDlgUnit );
+ SetFieldUnit( aMtrWidth, eDlgUnit, TRUE );
+ SetFieldUnit( aMtrHeight, eDlgUnit, TRUE );
+
+ if( eDlgUnit == FUNIT_MILE ||
+ eDlgUnit == FUNIT_KM )
+ {
+ aMtrWidth.SetDecimalDigits( 3 );
+ aMtrHeight.SetDecimalDigits( 3 );
+ }
+
+ aRect = pView->GetAllMarkedRect();
+ pView->GetPageViewPvNum( 0 )->LogicToPagePos( aRect );
+
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+
+ // Dies sollte ueber SID_ATTR_TRANSFORM_AUTOSIZE erfolgen
+ if( rMarkList.GetMarkCount() == 1 )
+ {
+ const SdrObject* pObj = rMarkList.GetMark( 0 )->GetObj();
+ SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier();
+ if( ( pObj->GetObjInventor() == SdrInventor ) &&
+ ( eKind==OBJ_TEXT || eKind==OBJ_TITLETEXT || eKind==OBJ_OUTLINETEXT) &&
+ ( (SdrTextObj*) pObj )->HasText() )
+ {
+ aGrpAdjust.Enable();
+ aTsbAutoGrowWidth.Enable();
+ aTsbAutoGrowHeight.Enable();
+ aTsbAutoGrowWidth.SetClickHdl( LINK( this, SvxSizeTabPage, ClickProtectHdl ) );
+ aTsbAutoGrowHeight.SetClickHdl( LINK( this, SvxSizeTabPage, ClickProtectHdl ) );
+
+ // Wird als Flag benutzt, um zu ermitteln, ob anwaehlbar ist
+ aTsbAutoGrowWidth.EnableTriState( FALSE );
+ aTsbAutoGrowHeight.EnableTriState( FALSE );
+ }
+ }
+ // Setzen der Maximalen Groesse
+ // (Wie SvxPositionTabPage (etwas weniger Code))
+
+ // WorkArea holen und umrechnen:
+ aWorkArea = pView->GetWorkArea();
+
+ if( rMarkList.GetMarkCount() >= 1 )
+ {
+ const SdrObject* pObj = rMarkList.GetMark( 0 )->GetObj();
+ Point aAnchorPos = pObj->GetAnchorPos();
+
+ if( aAnchorPos != Point(0,0) ) // -> Writer
+ {
+ Point aPt = aAnchorPos * -1;
+ Point aPt2 = aPt;
+
+ aPt += aWorkArea.TopLeft();
+ aWorkArea.SetPos( aPt );
+
+ aPt2 += aRect.TopLeft();
+ aRect.SetPos( aPt2 );
+ }
+ }
+
+ // Beruecksictigung Seiten-Offset und Umrechnung
+ Point aPt( pView->GetPageViewPvNum( 0 )->GetPageOrigin() );
+
+ // Massstab
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+
+ lcl_ScaleRect( aWorkArea, aUIScale );
+ lcl_ScaleRect( aRect, aUIScale );
+ lcl_ScalePoint( aPt, aUIScale );
+
+ // Umrechnung auf UI-Unit
+ int nDigits = aMtrWidth.GetDecimalDigits();
+
+ aPt = lcl_ConvertPoint( aPt, nDigits, (MapUnit) ePoolUnit, eDlgUnit );
+ aWorkArea = lcl_ConvertRect( aWorkArea, nDigits, (MapUnit) ePoolUnit, eDlgUnit );
+ aRect = lcl_ConvertRect( aRect, nDigits, (MapUnit) ePoolUnit, eDlgUnit );
+
+
+ // Beruecksictigung Seiten-Offset
+ aPt *= -1;
+ aPt += aWorkArea.TopLeft();
+ aWorkArea.SetPos( aPt );
+
+ SetMaxSize( aRect );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs )
+{
+ if ( aMtrWidth.HasFocus() )
+ ChangeWidthHdl( this );
+ if ( aMtrHeight.HasFocus() )
+ ChangeHeightHdl( this );
+
+ BOOL bModified = FALSE;
+
+ if ( aMtrWidth.IsValueModified() || aMtrHeight.IsValueModified() )
+ {
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+
+ // get Width
+ double nWidth = aMtrWidth.GetValue( eDlgUnit );
+ nWidth = MetricField::ConvertDoubleValue( nWidth, aMtrWidth.GetBaseValue(), aMtrWidth.GetDecimalDigits(), eDlgUnit, FUNIT_100TH_MM );
+ long lWidth = nWidth * (double)aUIScale;
+ lWidth = OutputDevice::LogicToLogic( lWidth, MAP_100TH_MM, (MapUnit)ePoolUnit );
+ lWidth = aMtrWidth.Denormalize( lWidth );
+
+ // get Height
+ double nHeight = aMtrHeight.GetValue( eDlgUnit );
+ nHeight = MetricField::ConvertDoubleValue( nHeight, aMtrHeight.GetBaseValue(), aMtrHeight.GetDecimalDigits(), eDlgUnit, FUNIT_100TH_MM );
+ long lHeight = nHeight * (double)aUIScale;
+ lHeight = OutputDevice::LogicToLogic( lHeight, MAP_100TH_MM, (MapUnit)ePoolUnit );
+ lHeight = aMtrWidth.Denormalize( lHeight );
+
+ // put Width & Height to itemset
+ rOutAttrs.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ),
+ (UINT32) lWidth ) );
+ rOutAttrs.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ),
+ (UINT32) lHeight ) );
+ rOutAttrs.Put(
+ SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), eRP ) );
+ bModified |= TRUE;
+ }
+
+ if ( aTsbProtect.GetState() != aTsbProtect.GetSavedValue() )
+ {
+ if ( aTsbProtect.GetState() == STATE_DONTKNOW )
+ rOutAttrs.InvalidateItem( SID_ATTR_TRANSFORM_PROTECT_SIZE );
+ else
+ rOutAttrs.Put(
+ SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ),
+ aTsbProtect.GetState() == STATE_CHECK ? TRUE : FALSE ) );
+ bModified |= TRUE;
+ }
+
+ if ( aTsbAutoGrowWidth.GetState() != aTsbAutoGrowWidth.GetSavedValue() )
+ {
+ if ( !aTsbAutoGrowWidth.IsTriStateEnabled() )
+ {
+ if( aTsbAutoGrowWidth.GetState() == STATE_DONTKNOW )
+ rOutAttrs.InvalidateItem( SID_ATTR_TRANSFORM_AUTOWIDTH );
+ else
+ rOutAttrs.Put(
+ SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOWIDTH ),
+ aTsbAutoGrowWidth.GetState() == STATE_CHECK ? TRUE : FALSE ) );
+ }
+ bModified |= TRUE;
+ }
+
+ if ( aTsbAutoGrowHeight.GetState() != aTsbAutoGrowHeight.GetSavedValue() )
+ {
+ if ( !aTsbAutoGrowHeight.IsTriStateEnabled() )
+ {
+ if( aTsbAutoGrowHeight.GetState() == STATE_DONTKNOW )
+ rOutAttrs.InvalidateItem( SID_ATTR_TRANSFORM_AUTOHEIGHT );
+ else
+ rOutAttrs.Put(
+ SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOHEIGHT ),
+ aTsbAutoGrowHeight.GetState() == STATE_CHECK ? TRUE : FALSE ) );
+ }
+ bModified |= TRUE;
+ }
+
+ return bModified;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSizeTabPage::Reset( const SfxItemSet& rOutAttrs )
+{
+ const SfxPoolItem* pItem = GetItem( rOutAttrs, SID_ATTR_TRANSFORM_WIDTH );
+ lOldWidth = Max( pItem ? ( (const SfxUInt32Item*)pItem )->GetValue() : 0, (UINT32)1 );
+
+ pItem = GetItem( rOutAttrs, SID_ATTR_TRANSFORM_HEIGHT );
+ lOldHeight = Max( pItem ? ( (const SfxUInt32Item*)pItem )->GetValue() : 0, (UINT32)1 );
+
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+
+ // set Width & Height
+ double nTmpWidth = (double)OutputDevice::LogicToLogic( lOldWidth, (MapUnit)ePoolUnit, MAP_100TH_MM );
+ double nTmpHeight = (double)OutputDevice::LogicToLogic( lOldHeight, (MapUnit)ePoolUnit, MAP_100TH_MM );
+ nTmpWidth = Fraction( nTmpWidth ) / aUIScale;
+ nTmpHeight = Fraction( nTmpHeight ) / aUIScale;
+
+ UINT32 nNorm = 10;
+ for( int i=0; i<aMtrWidth.GetDecimalDigits()-1; i++ )
+ nNorm*=10;
+ nTmpWidth*=(double)nNorm;
+
+ nNorm = 10;
+ for( i=0; i<aMtrHeight.GetDecimalDigits()-1; i++ )
+ nNorm*=10;
+ nTmpHeight*=(double)nNorm;
+
+ nTmpWidth = MetricField::ConvertDoubleValue( (double)nTmpWidth, aMtrWidth.GetBaseValue(), aMtrWidth.GetDecimalDigits(), FUNIT_100TH_MM, eDlgUnit );
+ nTmpHeight = MetricField::ConvertDoubleValue( (double)nTmpHeight, aMtrHeight.GetBaseValue(), aMtrHeight.GetDecimalDigits(), FUNIT_100TH_MM, eDlgUnit );
+
+ aMtrWidth.SetValue( nTmpWidth, eDlgUnit );
+ aMtrHeight.SetValue( nTmpHeight, eDlgUnit );
+
+ pItem = GetItem( rOutAttrs, SID_ATTR_TRANSFORM_PROTECT_SIZE );
+
+ if ( pItem )
+ {
+ aTsbProtect.SetState( ( (const SfxBoolItem*)pItem )->GetValue()
+ ? STATE_CHECK : STATE_NOCHECK );
+ aTsbProtect.EnableTriState( FALSE );
+ }
+ else
+ aTsbProtect.SetState( STATE_DONTKNOW );
+
+ pItem = GetItem( rOutAttrs, SID_ATTR_TRANSFORM_AUTOWIDTH );
+ if ( pItem )
+ {
+ aTsbAutoGrowWidth.SetState( ( ( const SfxBoolItem* )pItem )->GetValue()
+ ? STATE_CHECK : STATE_NOCHECK );
+//! aTsbAutoGrowWidth.EnableTriState( FALSE );
+ }
+ else
+ aTsbAutoGrowWidth.SetState( STATE_DONTKNOW );
+
+ pItem = GetItem( rOutAttrs, SID_ATTR_TRANSFORM_AUTOHEIGHT );
+ if ( pItem )
+ {
+ aTsbAutoGrowHeight.SetState( ( ( const SfxBoolItem* )pItem )->GetValue()
+ ? STATE_CHECK : STATE_NOCHECK );
+//! aTsbAutoGrowHeight.EnableTriState( FALSE );
+ }
+ else
+ aTsbAutoGrowHeight.SetState( STATE_DONTKNOW );
+
+ // Ist Abgleich gesetzt?
+ String aStr = GetUserData();
+ aCbxScale.Check( (BOOL)aStr.ToInt32() );
+
+ aTsbProtect.SaveValue();
+ aTsbAutoGrowWidth.SaveValue();
+ aTsbAutoGrowHeight.SaveValue();
+ ClickProtectHdl( NULL );
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxSizeTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return( new SvxSizeTabPage( pWindow, rOutAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxSizeTabPage::GetRanges()
+{
+ return( pSizeRanges );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSizeTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ SfxRectangleItem* pRectItem = NULL;
+
+ if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , FALSE,
+ (const SfxPoolItem**) &pRectItem ) )
+ {
+ // Setzen der MinMax-Groesse
+ aRect = pRectItem->GetValue();
+ SetMaxSize( aRect );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxSizeTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if( pSet )
+ {
+ pSet->Put( SfxRectangleItem( SID_ATTR_TRANSFORM_INTERN, GetRect() ) );
+
+ FillItemSet( *pSet );
+ }
+ return( LEAVE_PAGE );
+}
+
+//------------------------------------------------------------------------
+
+void SvxSizeTabPage::SetMaxSize( Rectangle aRect )
+{
+ Rectangle aTmpRect = aWorkArea;
+
+ switch ( aCtl.GetActualRP() )
+ {
+ case RP_LT:
+ aTmpRect.SetSize( Size(
+ aTmpRect.GetWidth() - ( aRect.Left() - aTmpRect.Left() ),
+ aTmpRect.GetHeight() - ( aRect.Top() - aTmpRect.Top() ) ) );
+ break;
+ case RP_MT:
+ aTmpRect.SetSize( Size(
+ Min( aRect.Center().X() - aTmpRect.Left(),
+ aTmpRect.Right() - aRect.Center().X() ) * 2,
+ aTmpRect.GetHeight() - ( aRect.Top() - aTmpRect.Top() ) ) );
+ break;
+ case RP_RT:
+ aTmpRect.SetSize( Size(
+ aTmpRect.GetWidth() - ( aTmpRect.Right() - aRect.Right() ),
+ aTmpRect.GetHeight() - ( aRect.Top() - aTmpRect.Top() ) ) );
+ break;
+ case RP_LM:
+ aTmpRect.SetSize( Size(
+ aTmpRect.GetWidth() - ( aRect.Left() - aTmpRect.Left() ),
+ Min( aRect.Center().Y() - aTmpRect.Top(),
+ aTmpRect.Bottom() - aRect.Center().Y() ) * 2 ) );
+ break;
+ case RP_MM:
+ {
+ long n1, n2, n3, n4, n5, n6;
+ n1 = aRect.Center().X() - aTmpRect.Left();
+ n2 = aTmpRect.Right() - aRect.Center().X();
+ n3 = Min( n1, n2 );
+ n4 = aRect.Center().Y() - aTmpRect.Top();
+ n5 = aTmpRect.Bottom() - aRect.Center().Y();
+ n6 = Min( n4, n5 );
+ aTmpRect.SetSize( Size( n3 * 2, n6 * 3 ) );
+ break;
+ }
+ case RP_RM:
+ aTmpRect.SetSize( Size(
+ aTmpRect.GetWidth() - ( aTmpRect.Right() - aRect.Right() ),
+ Min( aRect.Center().Y() - aTmpRect.Top(),
+ aTmpRect.Bottom() - aRect.Center().Y() ) * 2 ) );
+ break;
+ case RP_LB:
+ aTmpRect.SetSize( Size(
+ aTmpRect.GetWidth() - ( aRect.Left() - aTmpRect.Left() ),
+ aTmpRect.GetHeight() - ( aTmpRect.Bottom() - aRect.Bottom() ) ) );
+ break;
+ case RP_MB:
+ aTmpRect.SetSize( Size(
+ Min( aRect.Center().X() - aTmpRect.Left(),
+ aTmpRect.Right() - aRect.Center().X() ) * 2,
+ aTmpRect.GetHeight() - ( aRect.Bottom() - aTmpRect.Bottom() ) ) );
+ break;
+ case RP_RB:
+ aTmpRect.SetSize( Size(
+ aTmpRect.GetWidth() - ( aTmpRect.Right() - aRect.Right() ),
+ aTmpRect.GetHeight() - ( aTmpRect.Bottom() - aRect.Bottom() ) ) );
+ break;
+ }
+
+ aMtrWidth.SetMax( aTmpRect.GetWidth() );
+ aMtrWidth.SetLast( aTmpRect.GetWidth() );
+
+ aMtrHeight.SetMax( aTmpRect.GetHeight() );
+ aMtrHeight.SetLast( aTmpRect.GetHeight() );
+}
+
+//------------------------------------------------------------------------
+
+Rectangle SvxSizeTabPage::GetRect()
+{
+ Rectangle aTmpRect( aRect );
+ aTmpRect.SetSize( Size( aMtrWidth.GetValue(), aMtrHeight.GetValue() ) );
+
+ switch ( aCtl.GetActualRP() )
+ {
+ case RP_LT:
+ // nichts!
+ break;
+ case RP_MT:
+ aTmpRect.SetPos( Point( aRect.Left() -
+ ( aTmpRect.Right() - aRect.Right() ) / 2, aRect.Top() ) );
+ break;
+ case RP_RT:
+ aTmpRect.SetPos( Point( aRect.Left() -
+ ( aTmpRect.Right() - aRect.Right() ), aRect.Top() ) );
+ break;
+ case RP_LM:
+ aTmpRect.SetPos( Point( aRect.Left(), aRect.Top() -
+ ( aTmpRect.Bottom() - aRect.Bottom() ) / 2 ) );
+ break;
+ case RP_MM:
+ aTmpRect.SetPos( Point( aRect.Left() -
+ ( aTmpRect.Right() - aRect.Right() ) / 2, aRect.Top() -
+ ( aTmpRect.Bottom() - aRect.Bottom() ) / 2 ) );
+ break;
+ case RP_RM:
+ aTmpRect.SetPos( Point( aRect.Left() -
+ ( aTmpRect.Right() - aRect.Right() ), aRect.Top() -
+ ( aTmpRect.Bottom() - aRect.Bottom() ) / 2 ) );
+ break;
+ case RP_LB:
+ aTmpRect.SetPos( Point( aRect.Left(), aRect.Top() -
+ ( aTmpRect.Bottom() - aRect.Bottom() ) ) );
+ break;
+ case RP_MB:
+ aTmpRect.SetPos( Point( aRect.Left() -
+ ( aTmpRect.Right() - aRect.Right() ) / 2, aRect.Top() -
+ ( aTmpRect.Bottom() - aRect.Bottom() ) ) );
+ break;
+ case RP_RB:
+ aTmpRect.SetPos( Point( aRect.Left() -
+ ( aTmpRect.Right() - aRect.Right() ), aRect.Top() -
+ ( aTmpRect.Bottom() - aRect.Bottom() ) ) );
+ break;
+ }
+ return( aTmpRect );
+}
+
+//------------------------------------------------------------------------
+
+void SvxSizeTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt )
+{
+ eRP = eRcPt;
+
+ Rectangle aTmpRect( GetRect() );
+ SetMaxSize( aTmpRect );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxSizeTabPage, ChangeWidthHdl, void *, EMPTYARG )
+{
+ if( aCbxScale.IsChecked() &&
+ aCbxScale.IsEnabled() )
+ {
+ long nHeight = (long) ( ((double) lOldHeight * (double) aMtrWidth.GetValue()) / (double) lOldWidth );
+ if( nHeight <= aMtrHeight.GetMax( FUNIT_NONE ) )
+ {
+ aMtrHeight.SetUserValue( nHeight, FUNIT_NONE );
+ }
+ else
+ {
+ nHeight = aMtrHeight.GetMax( FUNIT_NONE );
+ aMtrHeight.SetUserValue( nHeight );
+ const long nWidth = (long) ( ((double) lOldWidth * (double) nHeight) / (double) lOldHeight );
+ aMtrWidth.SetUserValue( nWidth, FUNIT_NONE );
+ }
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxSizeTabPage, ChangeHeightHdl, void *, EMPTYARG )
+{
+ if( aCbxScale.IsChecked() &&
+ aCbxScale.IsEnabled() )
+ {
+ long nWidth = (long) ( ((double) lOldWidth * (double) aMtrHeight.GetValue()) / (double) lOldHeight );
+ if( nWidth <= aMtrWidth.GetMax( FUNIT_NONE ) )
+ {
+ aMtrWidth.SetUserValue( nWidth, FUNIT_NONE );
+ }
+ else
+ {
+ nWidth = aMtrWidth.GetMax( FUNIT_NONE );
+ aMtrWidth.SetUserValue( nWidth );
+ const long nHeight = (long) ( ((double) lOldHeight * (double) nWidth) / (double) lOldWidth );
+ aMtrHeight.SetUserValue( nHeight, FUNIT_NONE );
+ }
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxSizeTabPage, ClickProtectHdl, void *, p )
+{
+ /*
+ if( aTsbProtect.GetState() == STATE_CHECK )
+ {
+ aFtWidth.Disable();
+ aMtrWidth.Disable();
+ aFtHeight.Disable();
+ aMtrHeight.Disable();
+ aGrpSize.Disable();
+ aCbxScale.Disable();
+ aTsbAuto.Disable();
+ aCtl.Disable();
+ aCtl.Invalidate();
+ }
+ else if( !aTsbAuto.IsTriStateEnabled() && aTsbAuto.GetState() == STATE_CHECK )
+ {
+ aFtWidth.Enable();
+ aMtrWidth.Enable();
+ aFtHeight.Disable();
+ aMtrHeight.Disable();
+ aGrpSize.Enable();
+ aCbxScale.Disable();
+ aTsbAuto.Enable();
+ aCtl.Enable();
+ aCtl.Invalidate();
+ }
+ else
+ {
+ aFtWidth.Enable();
+ aMtrWidth.Enable();
+ aFtHeight.Enable();
+ aMtrHeight.Enable();
+ aGrpSize.Enable();
+ aCbxScale.Enable();
+ if( aTsbAuto.IsTriStateEnabled() )
+ aTsbAuto.Disable();
+ else
+ aTsbAuto.Enable();
+ aCtl.Enable();
+ aCtl.Invalidate();
+ }
+ */
+ BOOL bHeightChecked = !aTsbAutoGrowHeight.IsTriStateEnabled() &&
+ aTsbAutoGrowHeight.GetState() == STATE_CHECK;
+ BOOL bWidthChecked = !aTsbAutoGrowWidth.IsTriStateEnabled() &&
+ aTsbAutoGrowWidth.GetState() == STATE_CHECK;
+ if( p == &aTsbAutoGrowHeight || p == NULL )
+ {
+ if( bHeightChecked )
+ {
+ aFtHeight.Disable();
+ aMtrHeight.Disable();
+ aCbxScale.Disable();
+ }
+ else
+ {
+ aFtHeight.Enable();
+ aMtrHeight.Enable();
+ if( !bWidthChecked )
+ aCbxScale.Enable();
+ }
+ }
+ if( p == &aTsbAutoGrowWidth || p == NULL )
+ {
+ if( bWidthChecked )
+ {
+ aFtWidth.Disable();
+ aMtrWidth.Disable();
+ aCbxScale.Disable();
+ }
+ else
+ {
+ aFtWidth.Enable();
+ aMtrWidth.Enable();
+ if( !bHeightChecked )
+ aCbxScale.Enable();
+ }
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxSizeTabPage, ClickAutoHdl, void *, p )
+{
+ if( aCbxScale.IsChecked() )
+ {
+ lOldWidth = Max( GetCoreValue( aMtrWidth, ePoolUnit ), 1L );
+ lOldHeight = Max( GetCoreValue( aMtrHeight, ePoolUnit ), 1L );
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+void SvxSizeTabPage::FillUserData()
+{
+ // Abgleich wird in der Ini-Datei festgehalten
+ UniString aStr = UniString::CreateFromInt32( (sal_Int32) aCbxScale.IsChecked() );
+ SetUserData( aStr );
+}
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern der Position des Drehwinkels und des Drehwinkels
+|* der Grafikobjekte
+|*
+\************************************************************************/
+
+SvxAngleTabPage::SvxAngleTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
+ SvxTabPage ( pParent, ResId( RID_SVXPAGE_ANGLE, DIALOG_MGR() ), rInAttrs ),
+ aFtPosX ( this, ResId( FT_POS_X ) ),
+ aMtrPosX ( this, ResId( MTR_FLD_POS_X ) ),
+ aFtPosY ( this, ResId( FT_POS_Y ) ),
+ aMtrPosY ( this, ResId( MTR_FLD_POS_Y ) ),
+ aGrpPosition ( this, ResId( GRP_POSITION ) ),
+ aFtAngle ( this, ResId( FT_ANGLE ) ),
+ aMtrAngle ( this, ResId( MTR_FLD_ANGLE ) ),
+ aGrpAngle ( this, ResId( GRP_ANGLE ) ),
+ aCtlRect ( this, ResId( CTL_RECT ) ),
+ aCtlAngle ( this, ResId( CTL_ANGLE ),
+ RP_RB, 200, 80, CS_ANGLE ),
+ rOutAttrs ( rInAttrs )
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+//! SetExchangeSupport(); noch nicht
+
+ // PoolUnit ermitteln
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ ePoolUnit = pPool->GetMetric( SID_ATTR_TRANSFORM_POS_X );
+
+ aMtrAngle.SetModifyHdl( LINK( this, SvxAngleTabPage, ModifiedHdl ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxAngleTabPage::Construct()
+{
+ // Setzen des Rechtecks
+ DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+ GET_MODULE_FIELDUNIT( eDlgUnit );
+ SetFieldUnit( aMtrPosX, eDlgUnit, TRUE );
+ SetFieldUnit( aMtrPosY, eDlgUnit, TRUE );
+
+ if( eDlgUnit == FUNIT_MILE ||
+ eDlgUnit == FUNIT_KM )
+ {
+ aMtrPosX.SetDecimalDigits( 3 );
+ aMtrPosY.SetDecimalDigits( 3 );
+ }
+
+ aRect = pView->GetAllMarkedRect();
+ pView->GetPageViewPvNum( 0 )->LogicToPagePos( aRect );
+
+ // Ankerposition beachten (Writer)
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ if( rMarkList.GetMarkCount() >= 1 )
+ {
+ const SdrObject* pObj = rMarkList.GetMark( 0 )->GetObj();
+ aAnchorPos = pObj->GetAnchorPos();
+
+ if( aAnchorPos != Point( 0, 0 ) ) // -> Writer
+ {
+ aRect.Left() -= aAnchorPos.X();
+ aRect.Right() -= aAnchorPos.X();
+ aRect.Top() -= aAnchorPos.Y();
+ aRect.Bottom() -= aAnchorPos.Y();
+ }
+ }
+
+ // Massstab
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+ lcl_ScaleRect( aRect, aUIScale );
+
+ // Umrechnung auf UI-Unit
+ int nDigits = aMtrPosX.GetDecimalDigits();
+ aRect = lcl_ConvertRect( aRect, nDigits, (MapUnit) ePoolUnit, eDlgUnit );
+
+ if( !pView->IsRotateAllowed() )
+ {
+ aFtPosX.Disable();
+ aMtrPosX.Disable();
+ aFtPosY.Disable();
+ aMtrPosY.Disable();
+ aGrpPosition.Disable();
+ aFtAngle.Disable();
+ aMtrAngle.Disable();
+ aGrpAngle.Disable();
+ aCtlRect.Disable();
+ aCtlAngle.Disable();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxAngleTabPage::FillItemSet( SfxItemSet& rOutAttrs )
+{
+ BOOL bModified = FALSE;
+
+ if ( aMtrAngle.IsValueModified() )
+ {
+ rOutAttrs.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_ANGLE ),
+ aMtrAngle.GetValue() ) );
+
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+ long nTmp = GetCoreValue( aMtrPosX, ePoolUnit );
+ nTmp += aAnchorPos.X();
+ nTmp = Fraction( nTmp ) * aUIScale;
+ rOutAttrs.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_ROT_X ), nTmp ) );
+
+ nTmp = GetCoreValue( aMtrPosY, ePoolUnit );
+ nTmp += aAnchorPos.Y();
+ nTmp = Fraction( nTmp ) * aUIScale;
+ rOutAttrs.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_ROT_Y ), nTmp ) );
+
+ bModified |= TRUE;
+ }
+ return bModified;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxAngleTabPage::Reset( const SfxItemSet& rAttrs )
+{
+ const SfxPoolItem* pItem = GetItem( rAttrs, SID_ATTR_TRANSFORM_ROT_X );
+
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+ if ( pItem )
+ {
+ long nTmp = ( (const SfxInt32Item*)pItem )->GetValue() - aAnchorPos.X();;
+ nTmp = Fraction( nTmp ) / aUIScale;
+ SetMetricValue( aMtrPosX, nTmp, ePoolUnit );
+ }
+ else
+ aMtrPosX.SetText( String() );
+
+ pItem = GetItem( rAttrs, SID_ATTR_TRANSFORM_ROT_Y );
+ if ( pItem )
+ {
+ long nTmp = ( (const SfxInt32Item*)pItem )->GetValue() - aAnchorPos.Y();;
+ nTmp = Fraction( nTmp ) / aUIScale;
+ SetMetricValue( aMtrPosY, nTmp, ePoolUnit );
+ }
+ else
+ aMtrPosX.SetText( String() );
+ pItem = GetItem( rAttrs, SID_ATTR_TRANSFORM_ANGLE );
+
+ if ( pItem )
+ aMtrAngle.SetValue( ( (const SfxInt32Item*)pItem )->GetValue() );
+ else
+ aMtrAngle.SetText( String() );
+ aMtrAngle.SaveValue();
+
+ ModifiedHdl( this );
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxAngleTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return( new SvxAngleTabPage( pWindow, rOutAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxAngleTabPage::GetRanges()
+{
+ return( pAngleRanges );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxAngleTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+}
+
+// -----------------------------------------------------------------------
+
+int SvxAngleTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ FillItemSet( *pSet );
+
+ return( LEAVE_PAGE );
+}
+
+//------------------------------------------------------------------------
+
+void SvxAngleTabPage::PointChanged( Window* pWindow, RECT_POINT eRP )
+{
+ if( pWindow == &aCtlRect )
+ {
+ switch( eRP )
+ {
+#ifndef VCL
+ case RP_LT:
+ aMtrPosX.SetUserValue( aRect.Left() );
+ aMtrPosY.SetUserValue( aRect.Top() );
+ break;
+ case RP_MT:
+ aMtrPosX.SetUserValue( aRect.Center().X() );
+ aMtrPosY.SetUserValue( aRect.Top() );
+ break;
+ case RP_RT:
+ aMtrPosX.SetUserValue( aRect.Right() );
+ aMtrPosY.SetUserValue( aRect.Top() );
+ break;
+ case RP_LM:
+ aMtrPosX.SetUserValue( aRect.Left() );
+ aMtrPosY.SetUserValue( aRect.Center().Y() );
+ break;
+ case RP_MM:
+ aMtrPosX.SetUserValue( aRect.Center().X() );
+ aMtrPosY.SetUserValue( aRect.Center().Y() );
+ break;
+ case RP_RM:
+ aMtrPosX.SetUserValue( aRect.Right() );
+ aMtrPosY.SetUserValue( aRect.Center().Y() );
+ break;
+ case RP_LB:
+ aMtrPosX.SetUserValue( aRect.Left() );
+ aMtrPosY.SetUserValue( aRect.Bottom() );
+ break;
+ case RP_MB:
+ aMtrPosX.SetUserValue( aRect.Center().X() );
+ aMtrPosY.SetUserValue( aRect.Bottom() );
+ break;
+ case RP_RB:
+ aMtrPosX.SetUserValue( aRect.Right() );
+ aMtrPosY.SetUserValue( aRect.Bottom() );
+ break;
+ }
+ }
+ else if( pWindow == &aCtlAngle )
+ {
+ switch( eRP )
+ {
+ case RP_LT: aMtrAngle.SetUserValue( 13500 ); break;
+ case RP_MT: aMtrAngle.SetUserValue( 9000 ); break;
+ case RP_RT: aMtrAngle.SetUserValue( 4500 ); break;
+ case RP_LM: aMtrAngle.SetUserValue( 18000 ); break;
+ case RP_RM: aMtrAngle.SetUserValue( 0 ); break;
+ case RP_LB: aMtrAngle.SetUserValue( 22500 ); break;
+ case RP_MB: aMtrAngle.SetUserValue( 27000 ); break;
+ case RP_RB: aMtrAngle.SetUserValue( 31500 ); break;
+ }
+ }
+#else
+ case RP_LT:
+ aMtrPosX.SetUserValue( aRect.Left(), FUNIT_NONE );
+ aMtrPosY.SetUserValue( aRect.Top(), FUNIT_NONE );
+ break;
+ case RP_MT:
+ aMtrPosX.SetUserValue( aRect.Center().X(), FUNIT_NONE );
+ aMtrPosY.SetUserValue( aRect.Top(), FUNIT_NONE );
+ break;
+ case RP_RT:
+ aMtrPosX.SetUserValue( aRect.Right(), FUNIT_NONE );
+ aMtrPosY.SetUserValue( aRect.Top(), FUNIT_NONE );
+ break;
+ case RP_LM:
+ aMtrPosX.SetUserValue( aRect.Left(), FUNIT_NONE );
+ aMtrPosY.SetUserValue( aRect.Center().Y(), FUNIT_NONE );
+ break;
+ case RP_MM:
+ aMtrPosX.SetUserValue( aRect.Center().X(), FUNIT_NONE );
+ aMtrPosY.SetUserValue( aRect.Center().Y(), FUNIT_NONE );
+ break;
+ case RP_RM:
+ aMtrPosX.SetUserValue( aRect.Right(), FUNIT_NONE );
+ aMtrPosY.SetUserValue( aRect.Center().Y(), FUNIT_NONE );
+ break;
+ case RP_LB:
+ aMtrPosX.SetUserValue( aRect.Left(), FUNIT_NONE );
+ aMtrPosY.SetUserValue( aRect.Bottom(), FUNIT_NONE );
+ break;
+ case RP_MB:
+ aMtrPosX.SetUserValue( aRect.Center().X(), FUNIT_NONE );
+ aMtrPosY.SetUserValue( aRect.Bottom(), FUNIT_NONE );
+ break;
+ case RP_RB:
+ aMtrPosX.SetUserValue( aRect.Right(), FUNIT_NONE );
+ aMtrPosY.SetUserValue( aRect.Bottom(), FUNIT_NONE );
+ break;
+ }
+ }
+ else if( pWindow == &aCtlAngle )
+ {
+ switch( eRP )
+ {
+ case RP_LT: aMtrAngle.SetUserValue( 13500, FUNIT_NONE ); break;
+ case RP_MT: aMtrAngle.SetUserValue( 9000, FUNIT_NONE ); break;
+ case RP_RT: aMtrAngle.SetUserValue( 4500, FUNIT_NONE ); break;
+ case RP_LM: aMtrAngle.SetUserValue( 18000, FUNIT_NONE ); break;
+ case RP_RM: aMtrAngle.SetUserValue( 0, FUNIT_NONE ); break;
+ case RP_LB: aMtrAngle.SetUserValue( 22500, FUNIT_NONE ); break;
+ case RP_MB: aMtrAngle.SetUserValue( 27000, FUNIT_NONE ); break;
+ case RP_RB: aMtrAngle.SetUserValue( 31500, FUNIT_NONE ); break;
+ }
+ }
+#endif
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAngleTabPage, ModifiedHdl, void *, p )
+{
+ // Setzen des Winkels im AngleControl
+ switch( aMtrAngle.GetValue() )
+ {
+ case 13500: aCtlAngle.SetActualRP( RP_LT ); break;
+ case 9000: aCtlAngle.SetActualRP( RP_MT ); break;
+ case 4500: aCtlAngle.SetActualRP( RP_RT ); break;
+ case 18000: aCtlAngle.SetActualRP( RP_LM ); break;
+ case 0: aCtlAngle.SetActualRP( RP_RM ); break;
+ case 22500: aCtlAngle.SetActualRP( RP_LB ); break;
+ case 27000: aCtlAngle.SetActualRP( RP_MB ); break;
+ case 31500: aCtlAngle.SetActualRP( RP_RB ); break;
+ default: aCtlAngle.SetActualRP( RP_MM ); break;
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern des Eckenradius und zum Schraegstellen
+|*
+\************************************************************************/
+
+SvxSlantTabPage::SvxSlantTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
+ SvxTabPage ( pParent, ResId( RID_SVXPAGE_SLANT, DIALOG_MGR() ), rInAttrs ),
+
+ aFtRadius ( this, ResId( FT_RADIUS ) ),
+ aMtrRadius ( this, ResId( MTR_FLD_RADIUS ) ),
+ aGrpRadius ( this, ResId( GRP_RADIUS ) ),
+ aFtAngle ( this, ResId( FT_ANGLE ) ),
+ aMtrAngle ( this, ResId( MTR_FLD_ANGLE ) ),
+ aGrpAngle ( this, ResId( GRP_ANGLE ) ),
+ rOutAttrs ( rInAttrs )
+{
+ FreeResource();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ // PoolUnit ermitteln
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ ePoolUnit = pPool->GetMetric( SID_ATTR_TRANSFORM_POS_X );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSlantTabPage::Construct()
+{
+ // Setzen des Rechtecks
+ DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+ GET_MODULE_FIELDUNIT( eDlgUnit );
+ SetFieldUnit( aMtrRadius, eDlgUnit, TRUE );
+
+ aRect = pView->GetAllMarkedRect();
+ pView->GetPageViewPvNum( 0 )->LogicToPagePos( aRect );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxSlantTabPage, ModifiedHdl, void *, p )
+{
+ return( 0L );
+}
+IMPL_LINK_INLINE_END( SvxSlantTabPage, ModifiedHdl, void *, p )
+
+// -----------------------------------------------------------------------
+
+BOOL SvxSlantTabPage::FillItemSet( SfxItemSet& rAttrs )
+{
+ BOOL bModified = FALSE;
+ INT32 nValue = 0L;
+
+ String aStr = aMtrRadius.GetText();
+ if( aStr != aMtrRadius.GetSavedValue() )
+ {
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+ long nTmp = GetCoreValue( aMtrRadius, ePoolUnit );
+ nTmp = Fraction( nTmp ) * aUIScale;
+
+ rAttrs.Put( SdrEckenradiusItem( nTmp ) );
+ bModified = TRUE;
+ }
+
+ aStr = aMtrAngle.GetText();
+ if( aStr != aMtrAngle.GetSavedValue() )
+ {
+ nValue = aMtrAngle.GetValue();
+ rAttrs.Put( SfxInt32Item( SID_ATTR_TRANSFORM_SHEAR, nValue ) );
+ bModified = TRUE;
+ }
+
+ if( bModified )
+ {
+ // Referenzpunkt setzen
+ Point aPt = aRect.Center();
+ rAttrs.Put( SfxInt32Item( SID_ATTR_TRANSFORM_SHEAR_X, aPt.X() ) );
+ rAttrs.Put( SfxInt32Item( SID_ATTR_TRANSFORM_SHEAR_Y, aPt.Y() ) );
+
+ rAttrs.Put( SfxBoolItem( SID_ATTR_TRANSFORM_SHEAR_VERTICAL, FALSE ) );
+ }
+ return( bModified );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSlantTabPage::Reset( const SfxItemSet& rAttrs )
+{
+ // Wenn die View selektierte Objekte besitzt, muessen entspr. Items,
+ // die SFX_ITEM_DEFAULT sind, disabled werden
+ BOOL bMarkedObj = pView->HasMarkedObj();
+ const SfxPoolItem* pItem;
+
+ // Eckenradius
+ if( bMarkedObj && SFX_ITEM_DEFAULT == rAttrs.GetItemState( SDRATTR_ECKENRADIUS ) )
+ {
+ aFtRadius.Disable();
+ aMtrRadius.Disable();
+ aMtrRadius.SetText( String() );
+ aGrpRadius.Disable();
+ }
+ else
+ {
+ pItem = GetItem( rAttrs, SDRATTR_ECKENRADIUS );
+
+ if( pItem )
+ {
+ Fraction aUIScale = pView->GetModel()->GetUIScale();
+ long nTmp = ( (const SdrEckenradiusItem*)pItem )->GetValue();
+ nTmp = Fraction( nTmp ) / aUIScale;
+ SetMetricValue( aMtrRadius, nTmp, ePoolUnit );
+ }
+ else
+ aMtrRadius.SetText( String() );
+ }
+ aMtrRadius.SaveValue();
+
+ // Schraegstellen: Winkel
+ //SfxItemState eState = rAttrs.GetItemState( SID_ATTR_TRANSFORM_SHEAR );
+ //if( ( bMarkedObj && SFX_ITEM_DEFAULT == eState ) ||
+ if( !pView->IsShearAllowed() )
+ {
+ aFtAngle.Disable();
+ aMtrAngle.Disable();
+ aMtrAngle.SetText( String() );
+ aGrpAngle.Disable();
+ }
+ else
+ {
+ pItem = GetItem( rAttrs, SID_ATTR_TRANSFORM_SHEAR );
+
+ if( pItem )
+ aMtrAngle.SetValue( ( (const SfxInt32Item*)pItem )->GetValue() );
+ else
+ aMtrAngle.SetText( String() );
+ }
+ aMtrAngle.SaveValue();
+
+ ModifiedHdl( this );
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxSlantTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return( new SvxSlantTabPage( pWindow, rOutAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxSlantTabPage::GetRanges()
+{
+ return( pSlantRanges );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSlantTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ SfxRectangleItem* pRectItem = NULL;
+
+ if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , FALSE,
+ (const SfxPoolItem**) &pRectItem ) )
+ {
+ aRect = pRectItem->GetValue();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxSlantTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ FillItemSet( *pSet );
+
+ return( LEAVE_PAGE );
+}
+
+//------------------------------------------------------------------------
+
+void SvxSlantTabPage::PointChanged( Window* pWindow, RECT_POINT eRP )
+{
+}
+
+
diff --git a/svx/source/dialog/transfrm.hrc b/svx/source/dialog/transfrm.hrc
new file mode 100644
index 0000000000..135c70d84f
--- /dev/null
+++ b/svx/source/dialog/transfrm.hrc
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * $RCSfile: transfrm.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 TAB_CONTROL 1
+#define BTN_OK 1
+#define BTN_CANCEL 1
+#define BTN_HELP 1
+#define FT_POS_X 1
+#define FT_POS_Y 2
+#define MTR_FLD_POS_X 1
+#define MTR_FLD_POS_Y 2
+#define CBX_COPY 1
+#define TSB_PROTECT 1
+#define TSB_AUTO 2
+#define TSB_AUTOGROW_HEIGHT 2
+#define TSB_AUTOGROW_WIDTH 3
+#define BTN_RESET 1
+#define FT_WIDTH 1
+#define FT_HEIGHT 2
+#define MTR_FLD_WIDTH 1
+#define MTR_FLD_HEIGHT 2
+#define FT_ANGLE 3
+#define MTR_FLD_ANGLE 3
+#define CTL_RECT 1
+#define CTL_ANGLE 2
+#define CBX_SCALE 2
+#define GRP_ADJUST 1
+#define GRP_POSITION 1
+#define GRP_SIZE 2
+#define GRP_ANGLE 2
+#define GRP_SLANT 2
+#define GRP_RADIUS 1
+#define FT_RADIUS 1
+#define MTR_FLD_RADIUS 1
+#define TSB_VERTICAL 1
+#define GB_ANCHOR 10
+#define FT_ANCHOR 11
+#define LB_ANCHOR 12
+#define FT_ORIENT 13
+#define LB_ORIENT 14
diff --git a/svx/source/dialog/transfrm.src b/svx/source/dialog/transfrm.src
new file mode 100644
index 0000000000..5a6a71ba2a
--- /dev/null
+++ b/svx/source/dialog/transfrm.src
@@ -0,0 +1,1683 @@
+/*************************************************************************
+ *
+ * $RCSfile: transfrm.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "transfrm.hrc"
+ // pragma -------------------------------------------------------------------
+
+ // RID_SVXPAGE_POSITION -----------------------------------------------------
+TabPage RID_SVXPAGE_POSITION
+{
+ HelpId = HID_TRANS_POSITION ;
+ Hide = TRUE ;
+ Text = "Position" ;
+ Text [ English ] = "Position" ;
+ Text [ norwegian ] = "Posisjon" ;
+ Text [ italian ] = "Posizione" ;
+ Text [ portuguese_brazilian ] = "Posição" ;
+ Text [ portuguese ] = "Posição" ;
+ Text [ finnish ] = "Sijainti" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "Position" ;
+ Text [ swedish ] = "Placering" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posición" ;
+ Text [ english_us ] = "Position" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ GroupBox GRP_POSITION
+ {
+ Pos = MAP_APPFONT ( 6 , 3) ;
+ Size = MAP_APPFONT ( 248 , 69) ;
+ Text = "Position" ;
+ Text [ English ] = "Position" ;
+ Text [ norwegian ] = "Posisjon" ;
+ Text [ italian ] = "Posizione" ;
+ Text [ portuguese_brazilian ] = "Posição" ;
+ Text [ portuguese ] = "Posição" ;
+ Text [ finnish ] = "Sijainti" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "Position" ;
+ Text [ swedish ] = "Placering" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posición" ;
+ Text [ english_us ] = "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 ] = " ";
+ };
+ FixedText FT_POS_X
+ {
+ Pos = MAP_APPFONT ( 17 , 18 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Position ~X" ;
+ Text [ English ] = "Position ~X" ;
+ Text [ norwegian ] = "Posisjon~X" ;
+ Text [ italian ] = "Posizione ~X" ;
+ Text [ portuguese_brazilian ] = "Posição ~X" ;
+ Text [ portuguese ] = "Posição ~X" ;
+ Text [ finnish ] = "Position ~X" ;
+ Text [ danish ] = "Position X" ;
+ Text [ french ] = "Position ~X" ;
+ Text [ swedish ] = "Position ~X" ;
+ Text [ dutch ] = "Positie ~X" ;
+ Text [ spanish ] = "Posición ~X" ;
+ Text [ english_us ] = "Position ~X" ;
+ Text[ chinese_simplified ] = "λÖà X(~X)";
+ Text[ russian ] = "Ïîçèöèÿ ~X";
+ Text[ polish ] = "Pozycja X";
+ Text[ japanese ] = "ˆÊ’u X(~X)";
+ Text[ chinese_traditional ] = "¦ì¸m ~X";
+ Text[ arabic ] = "ÇáãæÖÚ Ó";
+ Text[ greek ] = "ÈÝóç ~X";
+ Text[ korean ] = "À§Ä¡ X(~X)";
+ Text[ turkish ] = "~X konumu";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_POS_Y
+ {
+ Pos = MAP_APPFONT ( 17 , 38 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Position ~Y" ;
+ Text [ English ] = "Position ~Y" ;
+ Text [ norwegian ] = "Posisjon~Y" ;
+ Text [ italian ] = "Posizione ~Y" ;
+ Text [ portuguese_brazilian ] = "Posição ~Y" ;
+ Text [ portuguese ] = "Posição ~Y" ;
+ Text [ finnish ] = "Position ~Y" ;
+ Text [ danish ] = "Position Y" ;
+ Text [ french ] = "Position ~Y" ;
+ Text [ swedish ] = "Position ~Y" ;
+ Text [ dutch ] = "Positie~Y" ;
+ Text [ spanish ] = "Posición ~Y" ;
+ Text [ english_us ] = "Position ~Y" ;
+ Text[ chinese_simplified ] = "λÖà Y(~Y)";
+ Text[ russian ] = "Ïîçèöèÿ ~Y";
+ Text[ polish ] = "Pozycja Y";
+ Text[ japanese ] = "ˆÊ’u Y(~Y)";
+ Text[ chinese_traditional ] = "¦ì¸m ~Y";
+ Text[ arabic ] = "ÇáãæÖÚ Õ";
+ Text[ greek ] = "ÈÝóç ~Y";
+ Text[ korean ] = "À§Ä¡ Y(~Y)";
+ Text[ turkish ] = "~Y konumu";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_POS_X
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 61 , 16 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -120000 ;
+ Maximum = 240000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_POS_Y
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 61 , 36 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -120000 ;
+ Maximum = 240000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ Control CTL_RECT
+ {
+ HelpId = HID_TPPOSITION_CTRL ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 179 , 12 ) ;
+ Size = MAP_APPFONT ( 70 , 48 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Basispunkt" ;
+ QuickHelpText [ English ] = "Base point" ;
+ QuickHelpText [ portuguese ] = "Ponto de base" ;
+ QuickHelpText [ english_us ] = "Base point" ;
+ QuickHelpText [ portuguese_brazilian ] = "Basispunkt" ;
+ QuickHelpText [ swedish ] = "Baspunkt" ;
+ QuickHelpText [ danish ] = "Basispunkt" ;
+ QuickHelpText [ italian ] = "Punto di base" ;
+ QuickHelpText [ spanish ] = "Basispunkt" ;
+ QuickHelpText [ french ] = "Point de base" ;
+ QuickHelpText [ dutch ] = "Basispunt" ;
+ QuickHelpText[ russian ] = "Òî÷êà îñíîâû";
+ QuickHelpText[ polish ] = "Punkt podstawy";
+ QuickHelpText[ japanese ] = "Šî€Îß²ÝÄ";
+ QuickHelpText[ chinese_simplified ] = "»ùµã";
+ QuickHelpText[ chinese_traditional ] = "°òÂI";
+ QuickHelpText[ arabic ] = "äÞØÉ ÇáÇäØáÇÞ";
+ QuickHelpText[ greek ] = "Óçìåßï âÜóçò";
+ QuickHelpText[ korean ] = "Base point";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_PROTECT
+ {
+ Pos = MAP_APPFONT ( 17 , 56 ) ;
+ Size = MAP_APPFONT ( 160 , 10 ) ;
+ Text = "Sch~ützen" ;
+ Text [ ENGLISH ] = "~Protect" ;
+ Text [ norwegian ] = "~Beskytte" ;
+ Text [ italian ] = "~Proteggi" ;
+ Text [ portuguese_brazilian ] = "~Proteger" ;
+ Text [ portuguese ] = "~Proteger" ;
+ Text [ finnish ] = "~Suojaa" ;
+ Text [ danish ] = "Beskyt" ;
+ Text [ french ] = "~Protéger" ;
+ Text [ swedish ] = "Sk~ydda" ;
+ Text [ dutch ] = "~Beveiligen" ;
+ Text [ spanish ] = "~Proteger" ;
+ Text [ english_us ] = "~Protect" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "±£»¤(~P)";
+ Text[ russian ] = "Çàùèòà";
+ Text[ polish ] = "Chroñ";
+ Text[ japanese ] = "•ÛŒì(~P)";
+ Text[ chinese_traditional ] = "«OÅ@(~P)";
+ Text[ arabic ] = "ÍãÇíÉ";
+ Text[ greek ] = "Ðñïóôáóßá";
+ Text[ korean ] = "º¸È£(~P)";
+ Text[ turkish ] = "~Koru";
+ Text[ language_user1 ] = " ";
+ };
+
+ GroupBox GB_ANCHOR
+ {
+ Pos = MAP_APPFONT ( 6 , 76 ) ;
+ Size = MAP_APPFONT ( 248 , 55 ) ;
+ Text = "Verankerung" ;
+ Text [ ENGLISH ] = "Anchor" ;
+ Hide = TRUE ;
+ Text [ dutch ] = "Verankering" ;
+ Text [ english_us ] = "Anchor" ;
+ Text [ italian ] = "Ancoraggio" ;
+ Text [ spanish ] = "Anclaje" ;
+ Text [ french ] = "Ancrer" ;
+ Text [ swedish ] = "Förankring" ;
+ Text [ danish ] = "Forankring" ;
+ Text [ portuguese_brazilian ] = "Verankerung" ;
+ Text [ portuguese ] = "Ancorar" ;
+ Text[ chinese_simplified ] = "Ëø¶¨";
+ Text[ russian ] = "Ïðèâÿçêà";
+ Text[ polish ] = "Zakotwiczenie";
+ Text[ japanese ] = "±Ý¶°";
+ Text[ chinese_traditional ] = "Âê©w";
+ Text[ arabic ] = "ÅÑÓÇÁ";
+ Text[ greek ] = "Áãêýñùóç";
+ Text[ korean ] = "À§Ä¡ °íÁ¤";
+ Text[ turkish ] = "Sabitleme";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ANCHOR
+ {
+ Pos = MAP_APPFONT ( 17 , 91 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "~Anker" ;
+ Text [ ENGLISH ] = "~Anchor" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "~Anchor" ;
+ Text [ italian ] = "~Ancoraggio" ;
+ Text [ spanish ] = "~Ancla" ;
+ Text [ french ] = "~Ancre" ;
+ Text [ dutch ] = "~Anker" ;
+ Text [ swedish ] = "~Ankare" ;
+ Text [ danish ] = "Anker" ;
+ Text [ portuguese ] = "~Âncora" ;
+ Text [ portuguese_brazilian ] = "~Anker" ;
+ Text[ chinese_simplified ] = "񈬀(~A)";
+ Text[ russian ] = "Ïðèâÿçêà";
+ Text[ polish ] = "Kotwica";
+ Text[ japanese ] = "±Ý¶°(~A)";
+ Text[ chinese_traditional ] = "¼Ð¸¹(~A)";
+ Text[ arabic ] = "ãÑÓÇÉ";
+ Text[ greek ] = "Áãêýñùóç";
+ Text[ korean ] = "±âÁØ À§Ä¡(~A)";
+ Text[ turkish ] = "~Sabitleyici";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ANCHOR
+ {
+ Pos = MAP_APPFONT ( 61 , 89 ) ;
+ Size = MAP_APPFONT ( 54 , 60 ) ;
+ Hide = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Am Absatz" ; > ;
+ < "Als Zeichen" ; > ;
+ < "An der Seite" ; > ;
+ < "Am Rahmen" ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Am Absatz" ; > ;
+ < "Als Zeichen" ; > ;
+ < "An der Seite" ; > ;
+ < "Am Rahmen" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "No parágrafo" ; > ;
+ < "Como carácter" ; > ;
+ < "Na página" ; > ;
+ < "Na moldura" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "To Paragraph" ; > ;
+ < "As character" ; > ;
+ < "To page" ; > ;
+ < "To Frame" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Am Absatz" ; > ;
+ < "Am Zeichen" ; > ;
+ < "An der Seite" ; > ;
+ < "Am Rahmen" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Till stycket" ; > ;
+ < "Som tecken" ; > ;
+ < "Till sidan" ; > ;
+ < "Till ramen" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Til afsnit" ; > ;
+ < "Som tegn" ; > ;
+ < "Til siden" ; > ;
+ < "Til rammen" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Al paragrafo" ; > ;
+ < "Quale carattere" ; > ;
+ < "Alla pagina" ; > ;
+ < "Alla cornice" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Al párrafo" ; > ;
+ < "Como carácter" ; > ;
+ < "A la página" ; > ;
+ < "Al marco" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Au paragraphe" ; > ;
+ < "Comme caractère" ; > ;
+ < "À la page" ; > ;
+ < "Au cadre" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Aan alinea" ; > ;
+ < "Als teken" ; > ;
+ < "Aan pagina" ; > ;
+ < "Aan kader" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ÔÚ¶ÎÂäÉÏ" ; > ;
+ < "µ±×÷×Ö·û" ; > ;
+ < "ÔÚÒ³ÃæÉÏ" ; > ;
+ < "ÔÚ¿òÉÏ" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ê àáçàöó" ; > ;
+ < "Êàê çíàê" ; > ;
+ < "Ê ñòðàíèöå" ; > ;
+ < "Ê ðàìêå" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Przy akapicie" ; > ;
+ < "Jako znak" ; > ;
+ < "Przy stronie" ; > ;
+ < "Przy ramce" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "’i—Ž‚É" ; > ;
+ < "•¶Žš‚Æ‚µ‚Ä" ; > ;
+ < "Íß°¼Þ‚É" ; > ;
+ < "˜g‚É" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¦b¬q¸¨¤W" ; > ;
+ < "·í§@¦r¤¸" ; > ;
+ < "¦b­¶­±¤W" ; > ;
+ < "¦b®Ø¤W" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "Úáì ÇáÝÞÑÉ" ; > ;
+ < "ßÍÑÝ" ; > ;
+ < "Úáì ÇáÕÝÍÉ" ; > ;
+ < "Úáì ÇáÅØÇÑ" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "Óôç ðáñÜãñáöï" ; > ;
+ < "Ùò ÷áñáêôÞñáò" ; > ;
+ < "Óôç óåëßäá" ; > ;
+ < "Óôï ðëáßóéï" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "´Ü¶ô¿¡" ; > ;
+ < "¹®ÀÚ·Î" ; > ;
+ < "ÆäÀÌÁö¿¡" ; > ;
+ < "ÇÁ·¹ÀÓ¿¡" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Paragrafa" ; > ;
+ < "Karakter olarak" ; > ;
+ < "Sayfaya" ; > ;
+ < "Çerçeveye" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ };
+ };
+ FixedText FT_ORIENT
+ {
+ Pos = MAP_APPFONT ( 17 , 112 ) ;
+ Size = MAP_APPFONT ( 37 , 10 ) ;
+ Text = "~Position" ;
+ Hide = TRUE ;
+ };
+ ListBox LB_ORIENT
+ {
+ Pos = MAP_APPFONT ( 61 , 110 );
+ Size = MAP_APPFONT ( 54 , 60 ) ;
+ Hide = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Von oben" ; > ;
+ < "Oben" ; > ;
+ < "Zentriert" ; > ;
+ < "Unten" ; > ;
+ < "Zeichen oben" ; > ;
+ < "Zeichen zentriert" ; > ;
+ < "Zeichen unten" ; > ;
+ < "Zeile oben" ; > ;
+ < "Zeile zentriert" ; > ;
+ < "Zeile unten" ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Von oben" ; > ;
+ < "Oben" ; > ;
+ < "Zentriert" ; > ;
+ < "Unten" ; > ;
+ < "Zeichen oben" ; > ;
+ < "Zeichen zentriert" ; > ;
+ < "Zeichen unten" ; > ;
+ < "Zeile oben" ; > ;
+ < "Zeile zentriert" ; > ;
+ < "Zeile unten" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "From Top" ; > ;
+ < "Above" ; > ;
+ < "Centered" ; > ;
+ < "Below" ; > ;
+ < "Top of character" ; > ;
+ < "Center of character" ; > ;
+ < "Bottom of character" ; > ;
+ < "Top of line" ; > ;
+ < "Center of line" ; > ;
+ < "Bottom of line" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Dall'alto" ; > ;
+ < "Sopra" ; > ;
+ < "Centrato" ; > ;
+ < "Sotto" ; > ;
+ < "Carattere in alto" ; > ;
+ < "Carattere centrato" ; > ;
+ < "Carattere in basso" ; > ;
+ < "Riga in alto" ; > ;
+ < "Riga centrata" ; > ;
+ < "Riga in basso" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Desde arriba" ; > ;
+ < "Arriba" ; > ;
+ < "Centrado" ; > ;
+ < "Abajo" ; > ;
+ < "Carácter arriba" ; > ;
+ < "Carácter centrado" ; > ;
+ < "Carácter abajo" ; > ;
+ < "Línea superior" ; > ;
+ < "Línea centrada" ; > ;
+ < "Línea inferior" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Du haut" ; > ;
+ < "En haut" ; > ;
+ < "Centré" ; > ;
+ < "Inférieur" ; > ;
+ < "Décalage haut" ; > ;
+ < "Caractère centré" ; > ;
+ < "Décalage bas" ; > ;
+ < "Ligne vers le bord supérieur" ; > ;
+ < "Ligne centrée" ; > ;
+ < "Ligne inférieure" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Van boven" ; > ;
+ < "Boven" ; > ;
+ < "Gecentreerd" ; > ;
+ < "Beneden" ; > ;
+ < "Teken boven" ; > ;
+ < "Teken gecentreerd" ; > ;
+ < "Teken beneden" ; > ;
+ < "Regel boven" ; > ;
+ < "Regel gecentreerd" ; > ;
+ < "Regel beneden" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Von oben" ; > ;
+ < "Oben" ; > ;
+ < "Zentriert" ; > ;
+ < "Unten" ; > ;
+ < "Zeichen oben" ; > ;
+ < "Zeichen zentriert" ; > ;
+ < "Zeichen unten" ; > ;
+ < "Zeile oben" ; > ;
+ < "Zeile zentriert" ; > ;
+ < "Zeile unten" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Uppifrån" ; > ;
+ < "Överst" ; > ;
+ < "Centrerad" ; > ;
+ < "Underst" ; > ;
+ < "Tecken överst" ; > ;
+ < "Tecken centrerat" ; > ;
+ < "Tecken underst" ; > ;
+ < "Rad överst" ; > ;
+ < "Rad centrerad" ; > ;
+ < "Rad underst" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Fra oven" ; > ;
+ < "Foroven" ; > ;
+ < "Centreret" ; > ;
+ < "Forneden" ; > ;
+ < "Tegn øverst" ; > ;
+ < "Tegn centreret" ; > ;
+ < "Tegn nederst" ; > ;
+ < "Række øverst" ; > ;
+ < "Række centreret" ; > ;
+ < "Række nederst" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "De cima" ; > ;
+ < "Acima" ; > ;
+ < "Centrado" ; > ;
+ < "Abaixo" ; > ;
+ < "Acima do carácter" ; > ;
+ < "Carácter centrado" ; > ;
+ < "Carácter em baixo" ; > ;
+ < "Linha em cima" ; > ;
+ < "Linha centrada" ; > ;
+ < "Linha em baixo" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "´ÓÉÏ" ; > ;
+ < "ÏòÉÏ" ; > ;
+ < "¾ÓÖÐ" ; > ;
+ < "ÏòÏÂ" ; > ;
+ < "×ÖÌåÉÏ·½" ; > ;
+ < "×ÖÌå¾ÓÖÐ" ; > ;
+ < "×ÖÌåÏ·½" ; > ;
+ < "ÐÐÉÏ·½" ; > ;
+ < "ÐоÓÖÐ" ; > ;
+ < "ÐÐÏ·½" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ñâåðõó" ; > ;
+ < "Ñâåðõó" ; > ;
+ < "Ïî öåíòðó" ; > ;
+ < "Ñíèçó" ; > ;
+ < "Çíàê ñâåðõó" ; > ;
+ < "Çíàê â öåíòðå" ; > ;
+ < "Çíàê ñíèçó" ; > ;
+ < "Ñòðîêà ñâåðõó" ; > ;
+ < "Ñòðîêà â öåíòðå" ; > ;
+ < "Ñòðîêà ñíèçó" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Z góry" ; > ;
+ < "W górze" ; > ;
+ < "Wyœrodkowany" ; > ;
+ < "W dole" ; > ;
+ < "Znak w górze" ; > ;
+ < "Wyœrodkowany znak" ; > ;
+ < "Znak na dole" ; > ;
+ < "Wiersz w górze" ; > ;
+ < "Wyœrodkowany wiersz" ; > ;
+ < "Wiersz w dole" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "ã‚©‚ç" ; > ;
+ < "ã" ; > ;
+ < "’†‰›" ; > ;
+ < "‰º" ; > ;
+ < "•¶Žš‚Ìã" ; > ;
+ < "•¶Žš‚Ì’†‰›" ; > ;
+ < "•¶Žš‚̉º" ; > ;
+ < "s‚Ìã" ; > ;
+ < "s‚Ì’†‰›" ; > ;
+ < "s‚̉º" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "±q¤W" ; > ;
+ < "¦V¤W" ; > ;
+ < "¸m¤¤" ; > ;
+ < "¦V¤U" ; > ;
+ < "¦r¤¸¤W¤è" ; > ;
+ < "¦r¤¸¸m¤¤" ; > ;
+ < "¦r¤¸¤U¤è" ; > ;
+ < "Äæ¤W¤è" ; > ;
+ < "Äæ¸m¤¤" ; > ;
+ < "Äæ¤U¤è" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ãä ÃÚáì" ; > ;
+ < "ÃÚáì" ; > ;
+ < "ÊæÓíØ" ; > ;
+ < "ÃÓÝá" ; > ;
+ < "ÃÚáì ÇáÍÑÝ" ; > ;
+ < "æÓØ ÇáÍÑÝ" ; > ;
+ < "ÃÓÝá ÇáÍÑÝ" ; > ;
+ < "ÃÚáì ÇáÓØÑ" ; > ;
+ < "æÓØ ÇáÓØÑ" ; > ;
+ < "ÃÓÝá ÇáÓØÑ" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "Aðü ðÜíù" ; > ;
+ < "ÐÜíù" ; > ;
+ < "ÊåíôñáñéóìÝíá" ; > ;
+ < "ÊÜôù" ; > ;
+ < "×áñáêôÞñáò ðÜíù" ; > ;
+ < "ÊåíôñáñéóìÝíïé ÷áñáêôÞñåò" ; > ;
+ < "×áñáêôÞñáò êÜôù" ; > ;
+ < "ÃñáììÞ ðÜíù" ; > ;
+ < "ÃñáììÞ êåíôñáñéóìÝíá" ; > ;
+ < "ÃñáììÞ êÜôù" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "À§ºÎÅÍ" ; > ;
+ < "ˤ" ; > ;
+ < "°¡¿îµ¥" ; > ;
+ < "¾Æ·¡" ; > ;
+ < "¹®ÀÚ À§" ; > ;
+ < "¹®ÀÚ °¡¿îµ¥" ; > ;
+ < "¹®ÀÚ ¾Æ·¡" ; > ;
+ < "ÁÙ À§" ; > ;
+ < "ÁÙ °¡¿îµ¥" ; > ;
+ < "ÁÙ ¾Æ·¡" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Yukardan" ; > ;
+ < "Üst" ; > ;
+ < "Ortala" ; > ;
+ < "Alt" ; > ;
+ < "Karakter üstte" ; > ;
+ < "Karakter ortada" ; > ;
+ < "Karakter altta" ; > ;
+ < "Satýr üstte" ; > ;
+ < "Satýr ortada" ; > ;
+ < "Satýr altta" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ };
+ };
+ 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 ] = " ";
+};
+ // RID_SVXPAGE_SIZE ---------------------------------------------------------
+TabPage RID_SVXPAGE_SIZE
+{
+ HelpId = HID_TRANS_SIZE ;
+ Hide = TRUE ;
+ Text = "Größe" ;
+ Text [ English ] = "Size" ;
+ Text [ norwegian ] = "Størrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ finnish ] = "Koko" ;
+ Text [ danish ] = "Størrelse" ;
+ Text [ french ] = "Taille" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ spanish ] = "Tamaño" ;
+ Text [ english_us ] = "Size" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ GroupBox GRP_SIZE
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 80 ) ;
+ Text = "Größe" ;
+ Text [ ENGLISH ] = "Size" ;
+ Text [ norwegian ] = "Størrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ finnish ] = "Koko" ;
+ Text [ danish ] = "Størrelse" ;
+ Text [ french ] = "Taille" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ spanish ] = "Tamaño" ;
+ Text [ english_us ] = "Size" ;
+ Text[ chinese_simplified ] = "´óС";
+ Text[ russian ] = "Ðàçìåð";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "»²½Þ";
+ Text[ chinese_traditional ] = "¤j¤p";
+ Text[ arabic ] = "ÇáÍÌã";
+ Text[ greek ] = "ÌÝãåèïò";
+ Text[ korean ] = "Å©±â";
+ Text[ turkish ] = "Boyut";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_WIDTH
+ {
+ Pos = MAP_APPFONT ( 17 , 17 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ 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 ] = "~Breedte" ;
+ Text [ spanish ] = "A~ncho" ;
+ Text [ english_us ] = "Wi~dth" ;
+ Text[ chinese_simplified ] = "¿í¶È(~D)";
+ Text[ russian ] = "Øèðèíà";
+ Text[ polish ] = "Szer.";
+ Text[ japanese ] = "•(~D)";
+ Text[ chinese_traditional ] = "¼e«×(~D)";
+ Text[ arabic ] = "ÇáÚÑÖ";
+ Text[ greek ] = "ÐëÜôïò";
+ Text[ korean ] = "³Êºñ(~D)";
+ Text[ turkish ] = "~Geniþlik";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_HEIGHT
+ {
+ Pos = MAP_APPFONT ( 17 , 36 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "H~öhe" ;
+ Text [ ENGLISH ] = "H~eight" ;
+ Text [ norwegian ] = "H~eight" ;
+ Text [ italian ] = "Al~tezza" ;
+ Text [ portuguese_brazilian ] = "A~ltura" ;
+ Text [ portuguese ] = "A~ltura" ;
+ Text [ finnish ] = "~Korkeus" ;
+ Text [ danish ] = "Højde" ;
+ Text [ french ] = "~Hauteur" ;
+ 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 ] = "Y~ükseklik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_WIDTH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 61 , 15 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 120000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_HEIGHT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 61 , 34 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 120000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ Control CTL_RECT
+ {
+ HelpId = HID_TPSIZE_CTRL ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 179 , 12 ) ;
+ Size = MAP_APPFONT ( 70 , 48 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Basispunkt" ;
+ QuickHelpText [ English ] = "Base point" ;
+ QuickHelpText [ english_us ] = "Base point" ;
+ QuickHelpText [ portuguese_brazilian ] = "Basispunkt" ;
+ QuickHelpText [ swedish ] = "Baspunkt" ;
+ QuickHelpText [ danish ] = "Basispunkt" ;
+ QuickHelpText [ italian ] = "Punto di base" ;
+ QuickHelpText [ spanish ] = "Basispunkt" ;
+ QuickHelpText [ french ] = "Point de base" ;
+ QuickHelpText [ dutch ] = "Basispunt" ;
+ QuickHelpText [ portuguese ] = "Ponto de base" ;
+ QuickHelpText[ russian ] = "Òî÷êà îñíîâû";
+ QuickHelpText[ polish ] = "Punkt podstawy";
+ QuickHelpText[ japanese ] = "Šî€Îß²ÝÄ";
+ QuickHelpText[ chinese_simplified ] = "»ùµã";
+ QuickHelpText[ chinese_traditional ] = "°òÂI";
+ QuickHelpText[ arabic ] = "äÞØÉ ÇáÇäØáÇÞ";
+ QuickHelpText[ greek ] = "Óçìåßï âÜóçò";
+ QuickHelpText[ korean ] = "Base point";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ CheckBox CBX_SCALE
+ {
+ Pos = MAP_APPFONT ( 17 , 53 ) ;
+ Size = MAP_APPFONT ( 160 , 10 ) ;
+ Text = "~Abgleich" ;
+ Text [ ENGLISH ] = "~Match" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Keep ratio" ;
+ Text [ italian ] = "Adatta" ;
+ Text [ spanish ] = "~Igualar" ;
+ Text [ french ] = "~Proportionnel" ;
+ Text [ dutch ] = "~Synchroniseren" ;
+ Text [ swedish ] = "Anpassa proportionellt" ;
+ Text [ danish ] = "Proportional" ;
+ Text [ portuguese_brazilian ] = "~Abgleich" ;
+ Text [ portuguese ] = "Pr~oporcional" ;
+ Text[ chinese_simplified ] = "µ÷Õû(~K)";
+ Text[ russian ] = "Ïðîïîðöèîíàëüíî";
+ Text[ polish ] = "Dopasuj";
+ Text[ japanese ] = "’²®(~K)";
+ Text[ chinese_traditional ] = "½Õ¾ã(~K)";
+ Text[ arabic ] = "ÊÒÇãä";
+ Text[ greek ] = "~ÁíáëïãéêÜ";
+ Text[ korean ] = "ºñÀ² À¯Áö(~K)";
+ Text[ turkish ] = "~Eþitle";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_PROTECT
+ {
+ Pos = MAP_APPFONT ( 17 , 68 ) ;
+ Size = MAP_APPFONT ( 220 , 10 ) ;
+ Text = "Sch~ützen" ;
+ Text [ ENGLISH ] = "~Protect" ;
+ Text [ norwegian ] = "~Beskytte" ;
+ Text [ italian ] = "~Proteggi" ;
+ Text [ portuguese_brazilian ] = "~Proteger" ;
+ Text [ portuguese ] = "~Proteger" ;
+ Text [ finnish ] = "~Suojaa" ;
+ Text [ danish ] = "Beskyt" ;
+ Text [ french ] = "~Protéger" ;
+ Text [ swedish ] = "Sk~ydda" ;
+ Text [ dutch ] = "~Beveiligen" ;
+ Text [ spanish ] = "~Proteger" ;
+ Text [ english_us ] = "~Protect" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "±£»¤(~P)";
+ Text[ russian ] = "Çàùèòà";
+ Text[ polish ] = "Chroñ";
+ Text[ japanese ] = "•ÛŒì(~P)";
+ Text[ chinese_traditional ] = "«OÅ@(~P)";
+ Text[ arabic ] = "ÍãÇíÉ";
+ Text[ greek ] = "Ðñïóôáóßá";
+ Text[ korean ] = "º¸È£(~P)";
+ Text[ turkish ] = "~Koru";
+ Text[ language_user1 ] = " ";
+ };
+
+ GroupBox GRP_ADJUST
+ {
+ Pos = MAP_APPFONT ( 6 , 87 ) ;
+ Size = MAP_APPFONT ( 248 , 44 ) ;
+ Text = "Anpassen" ;
+ Text [ ENGLISH ] = "Adjust" ;
+ Text [ english_us ] = "Adapt" ;
+ Text[ portuguese ] = "Ajustar";
+ Text[ russian ] = "Ñîãëàñîâàòü";
+ Text[ greek ] = "ÐñïóáñìïãÞ";
+ Text[ dutch ] = "Aanpassen";
+ Text[ french ] = "Adapter";
+ Text[ spanish ] = "Ajustar";
+ Text[ italian ] = "Adatta";
+ Text[ danish ] = "Tilpas";
+ Text[ swedish ] = "Anpassa";
+ Text[ polish ] = "Dopasuj";
+ Text[ portuguese_brazilian ] = "Adjust";
+ Text[ japanese ] = "“K‰ž";
+ Text[ korean ] = "Á¶Á¤";
+ Text[ chinese_simplified ] = "µ÷Õû";
+ Text[ chinese_traditional ] = "½Õ¾ã";
+ Text[ arabic ] = "ÖÈØ";
+ Text[ turkish ] = "Ayarla";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_AUTOGROW_WIDTH
+ {
+ Pos = MAP_APPFONT ( 17 , 100 ) ;
+ Size = MAP_APPFONT ( 220 , 12 ) ;
+ Text = "Br~eite an Text anpassen" ;
+ Text [ ENGLISH ] = "Fit ~width to text" ;
+ Text [ english_us ] = "~Fit width to text" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "Br~eedte aan tekst aanpassen" ;
+ Text [ italian ] = "~Adatta la larghezza al testo" ;
+ Text [ spanish ] = "Ajustar ~ancho al texto" ;
+ Text [ french ] = "Adapter lar~geur au texte" ;
+ Text [ swedish ] = "Anpassa br~edd till text" ;
+ Text [ danish ] = "Tilpas bredde til tekst" ;
+ Text [ portuguese ] = "Ajustar ~largura ao texto" ;
+ Text [ portuguese_brazilian ] = "Br~eite an Text anpassen" ;
+ Text[ chinese_simplified ] = "ºÍÎÄ×Ö¿í¶È¶ÔÓ¦(~W)";
+ Text[ russian ] = "Âûðîâíÿòü øèðèíó ïî òåêñòó";
+ Text[ polish ] = "Dopasuj szerokoϾ do tekstu";
+ Text[ japanese ] = "÷½Ä‚É•‚ð‡‚킹‚é(~W)";
+ Text[ chinese_traditional ] = "©M¤º¤å¼e«×¹ï»ô(~W)";
+ Text[ arabic ] = "ãáÇÁãÉ ÇáÚÑÖ ááäÕ";
+ Text[ greek ] = "ÐñïóáñìïãÞ ðëÜôïõò ùò ðñïò êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ®¿¡ ³Êºñ ¸ÂÃã(~F)";
+ Text[ turkish ] = "Geniþliði, metne göre a~yarla";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_AUTOGROW_HEIGHT
+ {
+ Pos = MAP_APPFONT ( 17 , 115 ) ;
+ Size = MAP_APPFONT ( 220 , 12 ) ;
+ Text = "Höhe ~an Text anpassen" ;
+ Text [ ENGLISH ] = "Fit ~height to text" ;
+ Text [ english_us ] = "Fit ~height to text" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "Hoo~gte aan tekst aanpassen" ;
+ Text [ italian ] = "Adatta l'alt~ezza al testo" ;
+ Text [ spanish ] = "~Ajustar altura al texto" ;
+ Text [ french ] = "Adapter la haute~ur au texte" ;
+ Text [ swedish ] = "~Anpassa höjd till text" ;
+ Text [ danish ] = "Tilpas højde til tekst" ;
+ Text [ portuguese ] = "Ajustar ~altura ao texto" ;
+ Text [ portuguese_brazilian ] = "Höh~e an Text anpassen" ;
+ Text[ chinese_simplified ] = "ºÍÎÄ×ָ߶ȶÔÓ¦(~H)";
+ Text[ russian ] = "Âûðîâíÿòü âûñîòó ïî òåêñòó";
+ Text[ polish ] = "Dopasuj wysokoϾ do tekstu";
+ Text[ japanese ] = "÷½Ä‚É‚‚³‚ð‡‚킹‚é(~H)";
+ Text[ chinese_traditional ] = "©M¤º¤å°ª«×¹ï»ô(~H)";
+ Text[ arabic ] = "ãáÇÁãÉ ÇáÇÑÊÝÇÚ ááäÕ";
+ Text[ greek ] = "ÐñïóáñìïãÞ ýøïõò ùò ðñïò êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ®¿¡ ³ôÀÌ ¸ÂÃã(~H)";
+ Text[ turkish ] = "Yüksekliði, metne göre a~yarla";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "´óС";
+ Text[ russian ] = "Ðàçìåð";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "»²½Þ";
+ Text[ chinese_traditional ] = "¤j¤p";
+ Text[ arabic ] = "ÇáÍÌã";
+ Text[ greek ] = "ÌÝãåèïò";
+ Text[ korean ] = "Å©±â";
+ Text[ turkish ] = "Boyut";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_ANGLE --------------------------------------------------------
+TabPage RID_SVXPAGE_ANGLE
+{
+ HelpId = HID_TRANS_ANGLE ;
+ Hide = TRUE ;
+ Text = "Winkel" ;
+ Text [ English ] = "Angle" ;
+ Text [ norwegian ] = "Vinkel" ;
+ Text [ italian ] = "Angolo" ;
+ Text [ portuguese_brazilian ] = "Ângulo" ;
+ Text [ portuguese ] = "Ângulo" ;
+ Text [ finnish ] = "Kulma" ;
+ Text [ danish ] = "Vinkel" ;
+ Text [ french ] = "Angle" ;
+ Text [ swedish ] = "Vinkel" ;
+ Text [ dutch ] = "Hoek" ;
+ Text [ spanish ] = "Ángulo" ;
+ Text [ english_us ] = "Angle" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ GroupBox GRP_POSITION
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 62 ) ;
+ Text = "Drehpunkt" ;
+ Text [ ENGLISH ] = "Pivot" ;
+ Text [ norwegian ] = "Pivot" ;
+ Text [ italian ] = "Punto di rotazione" ;
+ Text [ portuguese_brazilian ] = "Piv" ;
+ Text [ portuguese ] = "Ponto de rotação" ;
+ Text [ finnish ] = "Pivot" ;
+ Text [ danish ] = "Rotationspunkt" ;
+ Text [ french ] = "Point de rotation" ;
+ Text [ swedish ] = "Rotationspunkt" ;
+ Text [ dutch ] = "Draaipunt" ;
+ Text [ spanish ] = "Punto de rotación" ;
+ Text [ english_us ] = "Pivot point" ;
+ Text[ chinese_simplified ] = "Ðýתµã";
+ Text[ russian ] = "Òî÷êà ïîâîðîòà";
+ Text[ polish ] = "Punkt obrotu";
+ Text[ japanese ] = "‰ñ“]Îß²ÝÄ";
+ Text[ chinese_traditional ] = "±ÛÂàÂI";
+ Text[ arabic ] = "äÞØÉ ãÍæÑíÉ";
+ Text[ greek ] = "Óçìåßï ðåñéóôñïöÞò";
+ Text[ korean ] = "ȸÀüÁ¡";
+ Text[ turkish ] = "Eksen noktasý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_POS_X
+ {
+ Pos = MAP_APPFONT ( 17 , 20 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Position ~X" ;
+ Text [ English ] = "Position ~X" ;
+ Text [ norwegian ] = "Posisjon~X" ;
+ Text [ italian ] = "Posizione ~X" ;
+ Text [ portuguese_brazilian ] = "Posição ~X" ;
+ Text [ portuguese ] = "Posição ~X" ;
+ Text [ finnish ] = "Position ~X" ;
+ Text [ danish ] = "Position X" ;
+ Text [ french ] = "Position ~X" ;
+ Text [ swedish ] = "Position ~X" ;
+ Text [ dutch ] = "Positie ~X" ;
+ Text [ spanish ] = "Posición ~X" ;
+ Text [ english_us ] = "Position ~X" ;
+ Text[ chinese_simplified ] = "λÖà X(~X)";
+ Text[ russian ] = "Ïîçèöèÿ ~X";
+ Text[ polish ] = "Pozycja X";
+ Text[ japanese ] = "ˆÊ’u X(~X)";
+ Text[ chinese_traditional ] = "¦ì¸m ~X";
+ Text[ arabic ] = "ÇáãæÖÚ Ó";
+ Text[ greek ] = "ÈÝóç ~X";
+ Text[ korean ] = "À§Ä¡ X(~X)";
+ Text[ turkish ] = "~X konumu";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_POS_Y
+ {
+ Pos = MAP_APPFONT ( 17 , 44 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Position ~Y" ;
+ Text [ English ] = "Position ~Y" ;
+ Text [ norwegian ] = "Posisjon~Y" ;
+ Text [ italian ] = "Posizione ~Y" ;
+ Text [ portuguese_brazilian ] = "Posição ~Y" ;
+ Text [ portuguese ] = "Posição ~Y" ;
+ Text [ finnish ] = "Position ~Y" ;
+ Text [ danish ] = "Position Y" ;
+ Text [ french ] = "Position ~Y" ;
+ Text [ swedish ] = "Position ~Y" ;
+ Text [ dutch ] = "Positie ~Y" ;
+ Text [ spanish ] = "Posición ~Y" ;
+ Text [ english_us ] = "Position ~Y" ;
+ Text[ chinese_simplified ] = "λÖÃY(~Y)";
+ Text[ russian ] = "Ïîçèöèÿ ~Y";
+ Text[ polish ] = "Pozycja Y";
+ Text[ japanese ] = "ˆÊ’u Y(~Y)";
+ Text[ chinese_traditional ] = "¦ì¸m ~Y";
+ Text[ arabic ] = "ÇáãæÖÚ Õ";
+ Text[ greek ] = "ÈÝóç ~Y";
+ Text[ korean ] = "À§Ä¡ Y(~Y)";
+ Text[ turkish ] = "~Y konumu";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_POS_X
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 61 , 18 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -500000 ;
+ Maximum = 500000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ MetricField MTR_FLD_POS_Y
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 61 , 42 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -500000 ;
+ Maximum = 500000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ GroupBox GRP_ANGLE
+ {
+ Pos = MAP_APPFONT ( 6 , 69 ) ;
+ Size = MAP_APPFONT ( 248 , 62 ) ;
+ Text = "Drehwinkel" ;
+ Text [ ENGLISH ] = "Angle" ;
+ Text [ norwegian ] = "Vinkel" ;
+ Text [ italian ] = "Angolo di rotazione" ;
+ Text [ portuguese_brazilian ] = "Ângulo" ;
+ Text [ portuguese ] = "Ângulo de rotação" ;
+ Text [ finnish ] = "Kulma" ;
+ Text [ danish ] = "Rotationsvinkel" ;
+ Text [ french ] = "Angle de rotation" ;
+ Text [ swedish ] = "Rotationsvinkel" ;
+ Text [ dutch ] = "Draaihoek" ;
+ Text [ spanish ] = "Ángulo de rotación" ;
+ Text [ english_us ] = "Rotation angle" ;
+ Text[ chinese_simplified ] = "Ðýת½Ç¶È";
+ Text[ russian ] = "Óãîë ïîâîðîòà";
+ Text[ polish ] = "K¹t obrotowy";
+ Text[ japanese ] = "‰ñ“]“x";
+ Text[ chinese_traditional ] = "±ÛÂਤ«×";
+ Text[ arabic ] = "ÒÇæíÉ ÇáÇÓÊÏÇÑÉ";
+ Text[ greek ] = "Ãùíßá ðåñéóôñïöÞò";
+ Text[ korean ] = "ȸÀü°¢";
+ Text[ turkish ] = "Dönüþ açýsý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ANGLE
+ {
+ Pos = MAP_APPFONT ( 17 , 98 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "~Winkel" ;
+ Text [ ENGLISH ] = "~Angle" ;
+ Text [ norwegian ] = "~Vinkel" ;
+ Text [ italian ] = "~Angolo" ;
+ Text [ portuguese_brazilian ] = "~Ângulo" ;
+ Text [ portuguese ] = "~Ângulo" ;
+ Text [ finnish ] = "~Kulma" ;
+ Text [ danish ] = "Vinkel" ;
+ Text [ french ] = "~Angle" ;
+ Text [ swedish ] = "~Vinkel" ;
+ Text [ dutch ] = "~Hoek" ;
+ Text [ spanish ] = "An~gulo" ;
+ Text [ english_us ] = "~Angle" ;
+ Text[ chinese_simplified ] = "½Ç¶È(~A)";
+ Text[ russian ] = "Óãîë";
+ Text[ polish ] = "K¹t";
+ Text[ japanese ] = "Šp“x(~A)";
+ Text[ chinese_traditional ] = "¨¤«×(~A)";
+ Text[ arabic ] = "ÇáÒÇæíÉ";
+ Text[ greek ] = "Ãùíßá";
+ Text[ korean ] = "°¢µµ(~A)";
+ Text[ turkish ] = "~Açý";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_ANGLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 61 , 96 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -500000 ;
+ Maximum = 500000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " Grad" ;
+ CustomUnitText [ ENGLISH ] = " Degree" ;
+ CustomUnitText [ english_us ] = "degrees" ;
+ SpinSize = 500 ;
+ CustomUnitText [ portuguese_brazilian ] = "Grad" ;
+ CustomUnitText [ swedish ] = "grader" ;
+ CustomUnitText [ danish ] = "grader" ;
+ CustomUnitText [ italian ] = "Gradi" ;
+ CustomUnitText [ spanish ] = "grados" ;
+ CustomUnitText [ french ] = "degrés" ;
+ CustomUnitText [ dutch ] = "graden" ;
+ CustomUnitText [ portuguese ] = "Graus" ;
+ CustomUnitText[ chinese_simplified ] = "¶È";
+ CustomUnitText[ russian ] = "Ãðàäóñ";
+ CustomUnitText[ polish ] = "Stopieñ";
+ CustomUnitText[ japanese ] = "“x";
+ CustomUnitText[ chinese_traditional ] = "«×";
+ CustomUnitText[ arabic ] = "ÏÑÌÉ";
+ CustomUnitText[ greek ] = "ìïßñåò";
+ CustomUnitText[ korean ] = "µµ";
+ CustomUnitText[ turkish ] = "Derece";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ Control CTL_RECT
+ {
+ HelpId = HID_TPROTATION_CTRL1 ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 179, 12 ) ;
+ Size = MAP_APPFONT ( 70 , 48 ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Rotationspunkt" ;
+ QuickHelpText [ English ] = "Rotation point" ;
+ QuickHelpText [ english_us ] = "Rotation point" ;
+ QuickHelpText [ portuguese_brazilian ] = "Rotationspunkt" ;
+ QuickHelpText [ swedish ] = "Rotationspunkt" ;
+ QuickHelpText [ danish ] = "Rotationspunkt" ;
+ QuickHelpText [ italian ] = "Punto di rotazione" ;
+ QuickHelpText [ spanish ] = "Rotationspunkt" ;
+ QuickHelpText [ french ] = "Point de rotation" ;
+ QuickHelpText [ dutch ] = "Rotatiepunt" ;
+ QuickHelpText [ portuguese ] = "Ponto de rotação" ;
+ QuickHelpText[ russian ] = "Òî÷êà âðàùåíèÿ";
+ QuickHelpText[ polish ] = "Punkt obrotu";
+ QuickHelpText[ japanese ] = "‰ñ“]Îß²ÝÄ";
+ QuickHelpText[ chinese_simplified ] = "Ðýתµã";
+ QuickHelpText[ chinese_traditional ] = "±ÛÂàÂI";
+ QuickHelpText[ arabic ] = "äÞØÉ ÇáÇÓÊÏÇÑÉ";
+ QuickHelpText[ greek ] = "Óçìåßï ðåñéóôñïöÞò";
+ QuickHelpText[ korean ] = "Rotation point";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ Control CTL_ANGLE
+ {
+ HelpId = HID_TPROTATION_CTRL2 ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 179 , 78 ) ;
+ Size = MAP_APPFONT ( 70 , 48 ) ;
+ TabStop = TRUE ;
+ };
+ Text[ chinese_simplified ] = "½Ç¶È";
+ Text[ russian ] = "Óãîë";
+ Text[ polish ] = "K¹t";
+ Text[ japanese ] = "Šp“x";
+ Text[ chinese_traditional ] = "¨¤«×";
+ Text[ arabic ] = "ÇáÒÇæíÉ";
+ Text[ greek ] = "Ãùíßá";
+ Text[ korean ] = "°¢µµ";
+ Text[ turkish ] = "Açý";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_SLANT -----------------------------------------------------
+TabPage RID_SVXPAGE_SLANT
+{
+ HelpId = HID_TRANS_SLANT ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Schräg stellen / Eckenradius" ;
+ Text [ ENGLISH ] = "Slant" ;
+ Text [ english_us ] = "Slant & Corner Radius" ;
+ Text [ italian ] = "Inclina / raggio d'angolo" ;
+ Text [ spanish ] = "Inclinación/Radio de ángulo" ;
+ Text [ french ] = "Inclinaison / rayon d'angle" ;
+ Text [ dutch ] = "Schuintrekken / hoekafronding" ;
+ Text [ swedish ] = "Snedställ/hörnradie" ;
+ Text [ danish ] = "Hældning / hjørneradius" ;
+ Text [ portuguese ] = "Inclinações /Raio do ângulo" ;
+ Text [ portuguese_brazilian ] = "Schrägstellen / Eckenradius" ;
+ GroupBox GRP_RADIUS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 62 ) ;
+ Text = "Eckenradius" ;
+ Text [ ENGLISH ] = "Edge radius" ;
+ Text [ dutch ] = "Hoekafronding" ;
+ Text [ english_us ] = "Corner radius" ;
+ Text [ italian ] = "Raggio d'angolo" ;
+ Text [ spanish ] = "Radio de ángulo" ;
+ Text [ french ] = "Rayon d'angle" ;
+ Text [ swedish ] = "Hörnradie" ;
+ Text [ danish ] = "Hjørneradius" ;
+ Text [ portuguese_brazilian ] = "Eckenradius" ;
+ Text [ portuguese ] = "Raio do ângulo" ;
+ Text[ chinese_simplified ] = "½Ç°ë¾¶";
+ Text[ russian ] = "Ðàäèóñ çàêðóãëåííîãî óãëà";
+ Text[ polish ] = "Promieñ krzywizny";
+ Text[ japanese ] = "Šp‚Ì”¼Œa";
+ Text[ chinese_traditional ] = "¨¤¥b®|";
+ Text[ arabic ] = "äÕÝ ÞØÑ ÇáÒÇæíÉ";
+ Text[ greek ] = "Áêôßíá ãùíßáò";
+ Text[ korean ] = "¸ð¼­¸® °¢µµ";
+ Text[ turkish ] = "Köþe çapý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_RADIUS
+ {
+ Pos = MAP_APPFONT ( 17 , 32 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "~Radius" ;
+ Text [ ENGLISH ] = "~Radius" ;
+ Text [ dutch ] = "~Radius" ;
+ Text [ english_us ] = "~Radius" ;
+ Text [ italian ] = "Raggio" ;
+ Text [ spanish ] = "Ra~dio" ;
+ Text [ french ] = "~Rayon" ;
+ Text [ swedish ] = "~Radie" ;
+ Text [ danish ] = "Radius" ;
+ Text [ portuguese_brazilian ] = "~Radius" ;
+ Text [ portuguese ] = "~Radio" ;
+ Text[ chinese_simplified ] = "°ë¾¶(~R)";
+ Text[ russian ] = "Ðàäèóñ";
+ Text[ polish ] = "Promieñ";
+ Text[ japanese ] = "”¼Œa(~R)";
+ Text[ chinese_traditional ] = "¥b®|(~R)";
+ Text[ arabic ] = "äÕÝ ÇáÞØÑ";
+ Text[ greek ] = "Áêôßíá";
+ Text[ korean ] = "¹ÝÁö¸§(~R)";
+ Text[ turkish ] = "~Çap";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_RADIUS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 61 , 30 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 500000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 10 ;
+ };
+ GroupBox GRP_SLANT
+ {
+ Pos = MAP_APPFONT ( 6 , 69 ) ;
+ Size = MAP_APPFONT ( 248 , 62 ) ;
+ Text = "Schräg stellen" ;
+ Text [ ENGLISH ] = "Slant" ;
+ Text [ english_us ] = "Slant" ;
+ Text [ italian ] = "Inclina" ;
+ Text [ spanish ] = "Inclinar" ;
+ Text [ french ] = "Inclinaison" ;
+ Text [ dutch ] = "Schuintrekken" ;
+ Text [ swedish ] = "Snedställ" ;
+ Text [ danish ] = "Hældning" ;
+ Text [ portuguese_brazilian ] = "Schrägstellen" ;
+ Text [ portuguese ] = "Inclinações" ;
+ Text[ chinese_simplified ] = "Çãб";
+ Text[ russian ] = "Íàêëîí";
+ Text[ polish ] = "Pochyl";
+ Text[ japanese ] = "ŒXŽÎ‚³‚¹‚é";
+ Text[ chinese_traditional ] = "¶É±×";
+ Text[ arabic ] = "ãÇÆá";
+ Text[ greek ] = "ÐëÜãéá";
+ Text[ korean ] = "±â¿ï±â";
+ Text[ turkish ] = "Duruþ eðimi";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ANGLE
+ {
+ Pos = MAP_APPFONT ( 17 , 98 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "~Winkel" ;
+ Text [ ENGLISH ] = "~Angle" ;
+ Text [ dutch ] = "~Hoek" ;
+ Text [ english_us ] = "~Angle" ;
+ Text [ italian ] = "Angolo" ;
+ Text [ spanish ] = "Á~ngulo" ;
+ Text [ french ] = "~Angle" ;
+ Text [ swedish ] = "~Vinkel" ;
+ Text [ danish ] = "Vinkel" ;
+ Text [ portuguese ] = "~Ângulo" ;
+ Text [ portuguese_brazilian ] = "~Winkel" ;
+ Text[ chinese_simplified ] = "½Ç¶È(~A)";
+ Text[ russian ] = "Óãîë";
+ Text[ polish ] = "K¹t";
+ Text[ japanese ] = "Šp“x(~A)";
+ Text[ chinese_traditional ] = "¨¤«×(~A)";
+ Text[ arabic ] = "ÇáÒÇæíÉ";
+ Text[ greek ] = "Ãùíßá";
+ Text[ korean ] = "°¢µµ(~A)";
+ Text[ turkish ] = "~Açý";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_ANGLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 61 , 96 ) ;
+ Size = MAP_APPFONT ( 54 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -8900 ;
+ First = -8900 ;
+ Maximum = 8900 ;
+ Last = 8900 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " Grad" ;
+ CustomUnitText [ ENGLISH ] = " Degree" ;
+ SpinSize = 500 ;
+ CustomUnitText [ english_us ] = "degrees" ;
+ CustomUnitText [ italian ] = "gradi" ;
+ CustomUnitText [ spanish ] = "grados" ;
+ CustomUnitText [ french ] = "degrés" ;
+ CustomUnitText [ dutch ] = "graden" ;
+ CustomUnitText [ swedish ] = "grader" ;
+ CustomUnitText [ danish ] = "grader" ;
+ CustomUnitText [ portuguese_brazilian ] = "Grad" ;
+ CustomUnitText [ portuguese ] = "Graus" ;
+ CustomUnitText[ chinese_simplified ] = "¶È";
+ CustomUnitText[ russian ] = "Ãðàäóñ";
+ CustomUnitText[ polish ] = "Stopieñ";
+ CustomUnitText[ japanese ] = "“x";
+ CustomUnitText[ chinese_traditional ] = "«×";
+ CustomUnitText[ arabic ] = "ÏÑÌÉ";
+ CustomUnitText[ greek ] = "ìïßñåò";
+ CustomUnitText[ korean ] = "µµ";
+ CustomUnitText[ turkish ] = "Derece";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "Çãб/½Ç°ë¾¶";
+ Text[ russian ] = "Íàêëîí / Ðàäèóñ çàêðóãëåííîãî óãëà";
+ Text[ polish ] = "Pochyl / Promieñ naro¿nika";
+ Text[ japanese ] = "ŒXŽÎ‚³‚¹‚é/Šp‚Ì”¼Œa‚Ì’·‚³";
+ Text[ chinese_traditional ] = "¶É±×/¨¤«×";
+ Text[ arabic ] = "ãÇÆá / äÕÝ ÞØÑ ÇáÒÇæíÉ";
+ Text[ greek ] = "ÐëÜãéá / Áêôßíá ãùíßáò";
+ Text[ korean ] = "±â¿ï±â / ¸ð¼­¸® °¢µµ";
+ Text[ turkish ] = "Duruþ eðimi / Köþe çapý";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXDLG_TRANSFORM -----------------------------------------------------
+TabDialog RID_SVXDLG_TRANSFORM
+{
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 289 , 176 ) ;
+ Text = "Position und Größe" ;
+ Text [ ENGLISH ] = "Position and Size" ;
+ Text [ norwegian ] = "Posisjon og størrelse" ;
+ Text [ italian ] = "Posizione e dimensione" ;
+ Text [ portuguese_brazilian ] = "Posição e Tamanho" ;
+ Text [ portuguese ] = "Posição e tamanho" ;
+ Text [ finnish ] = "Paikka ja koko" ;
+ Text [ danish ] = "Placering og størrelse" ;
+ Text [ french ] = "Position et taille" ;
+ Text [ swedish ] = "Position och storlek" ;
+ Text [ dutch ] = "Positie en grootte" ;
+ Text [ spanish ] = "Posición y tamaño" ;
+ Text [ english_us ] = "Position and Size" ;
+ Moveable = TRUE ;
+ TabControl TAB_CONTROL
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_POSITION ;
+ Text = "Position" ;
+ Text [ ENGLISH ] = "Position" ;
+ Text [ norwegian ] = "Posisjon" ;
+ Text [ italian ] = "Posizione" ;
+ Text [ portuguese_brazilian ] = "Posição" ;
+ Text [ portuguese ] = "Posição" ;
+ Text [ finnish ] = "Sijainti" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "Position" ;
+ Text [ swedish ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posición" ;
+ 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 ;
+ Text = "Größe" ;
+ Text [ ENGLISH ] = "Size" ;
+ Text [ norwegian ] = "Størrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ finnish ] = "Koko" ;
+ Text [ danish ] = "Størrelse" ;
+ Text [ french ] = "Taille" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ spanish ] = "Tamaño" ;
+ Text [ english_us ] = "Size" ;
+ PageResID = RID_SVXPAGE_SIZE ;
+ Text[ chinese_simplified ] = "´óС";
+ Text[ russian ] = "Ðàçìåð";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "»²½Þ";
+ Text[ chinese_traditional ] = "¤j¤p";
+ Text[ arabic ] = "ÇáÍÌã";
+ Text[ greek ] = "ÌÝãåèïò";
+ Text[ korean ] = "Å©±â";
+ Text[ turkish ] = "Boyut";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_ANGLE ;
+ Text = "Drehung" ;
+ Text [ ENGLISH ] = "Rotation" ;
+ Text [ norwegian ] = "Rotation" ;
+ Text [ italian ] = "Rotazione" ;
+ Text [ portuguese_brazilian ] = "Rotação" ;
+ Text [ portuguese ] = "Rotação" ;
+ Text [ finnish ] = "Kääntö" ;
+ Text [ danish ] = "Rotation" ;
+ Text [ french ] = "Rotation" ;
+ Text [ swedish ] = "Rotation" ;
+ Text [ dutch ] = "Draaien" ;
+ Text [ spanish ] = "Rotación" ;
+ Text [ english_us ] = "Rotation" ;
+ PageResID = RID_SVXPAGE_ANGLE ;
+ Text[ chinese_simplified ] = "Ðýת";
+ Text[ russian ] = "Ïîâîðîò";
+ Text[ polish ] = "Obrót";
+ Text[ japanese ] = "‰ñ“]";
+ Text[ chinese_traditional ] = "±ÛÂà";
+ Text[ arabic ] = "ÇáÇÓÊÏÇÑÉ";
+ Text[ greek ] = "ÐåñéóôñïöÞ";
+ Text[ korean ] = "ȸÀü";
+ Text[ turkish ] = "Dönüþ";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_SLANT ;
+ Text = "Schräg stellen / Eckenradius" ;
+ Text [ ENGLISH ] = "Slant / Edge radius" ;
+ PageResID = RID_SVXPAGE_SLANT ;
+ Text [ english_us ] = "Slant & Corner Radius" ;
+ Text [ italian ] = "Inclina / raggio d'angolo" ;
+ Text [ spanish ] = "Inclinación/Radio de ángulo" ;
+ Text [ french ] = "Inclinaison / rayon d'angle" ;
+ Text [ dutch ] = "Schuintrekken/hoekafronding" ;
+ Text [ swedish ] = "Snedställ/hörnradie" ;
+ Text [ danish ] = "Hældning / hjørneradius" ;
+ Text [ portuguese_brazilian ] = "Schrägstellen / Eckenradius" ;
+ Text [ portuguese ] = "Inclinações / Raio do ângulo" ;
+ Text[ chinese_simplified ] = "Çãб/½Ç°ë¾¶";
+ Text[ russian ] = "Íàêëîí / Ðàäèóñ çàêðóãëåííîãî óãëà";
+ Text[ polish ] = "Pochyl / Promieñ naro¿nika";
+ Text[ japanese ] = "ŒXŽÎ‚³‚¹‚é/Šp‚Ì”¼Œa‚Ì’·‚³";
+ Text[ chinese_traditional ] = "¶É±×/¨¤«×";
+ Text[ arabic ] = "ãÇÆá / äÕÝ ÞØÑ ÇáÒÇæíÉ";
+ Text[ greek ] = "ÐëÜãéá / Áêôßíá ãùíßáò";
+ Text[ korean ] = "±â¿ï±â / ¸ð¼­¸® °¢µµ";
+ Text[ turkish ] = "Duruþ eðimi / Köþe çapý";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "λÖúʹóС";
+ Text[ russian ] = "Ïîçèöèÿ è ðàçìåð";
+ Text[ polish ] = "Pozycja i rozmiar";
+ Text[ japanese ] = "ˆÊ’u‚Æ»²½Þ";
+ Text[ chinese_traditional ] = "¦ì¸m©M¤j¤p";
+ Text[ arabic ] = "ÇáãæÖÚ æÇáÍÌã";
+ Text[ greek ] = "ÈÝóç êáé ìÝãåèïò";
+ Text[ korean ] = "À§Ä¡¿Í Å©±â";
+ Text[ turkish ] = "Konum ve boyut";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/zoom.cxx b/svx/source/dialog/zoom.cxx
new file mode 100644
index 0000000000..e4dc8f8096
--- /dev/null
+++ b/svx/source/dialog/zoom.cxx
@@ -0,0 +1,454 @@
+/*************************************************************************
+ *
+ * $RCSfile: zoom.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SFXITEMSET_HXX
+#include <svtools/itemset.hxx>
+#endif
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen wg. RET_OK, RET_CANCEL
+#include <vcl/msgbox.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_ZOOM_CXX
+
+#include "dialogs.hrc"
+#include "zoom.hrc"
+
+#include "zoom.hxx"
+#include "zoomitem.hxx"
+#include "dialmgr.hxx"
+
+// static ----------------------------------------------------------------
+
+static USHORT pRanges[] =
+{
+ SID_ATTR_ZOOM,
+ SID_ATTR_ZOOM,
+ 0
+};
+
+#define SPECIAL_FACTOR ((USHORT)0xFFFF)
+
+// class SvxZoomDialog ---------------------------------------------------
+
+USHORT SvxZoomDialog::GetFactor() const
+{
+ if ( a200Btn.IsChecked() )
+ return 200;
+ if ( a150Btn.IsChecked() )
+ return 150;
+ if ( a100Btn.IsChecked() )
+ return 100;
+ if ( a75Btn.IsChecked() )
+ return 75;
+ if ( a50Btn.IsChecked() )
+ return 50;
+ if ( aUserBtn.IsChecked() )
+ return (USHORT)aUserEdit.GetValue();
+ else
+ return SPECIAL_FACTOR;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxZoomDialog::SetFactor( USHORT nNewFactor, USHORT nBtnId )
+{
+ aUserEdit.Disable();
+
+ if ( !nBtnId )
+ {
+ if ( nNewFactor == 200 )
+ {
+ a200Btn.Check();
+ a200Btn.GrabFocus();
+ }
+ else if ( nNewFactor == 150 )
+ {
+ a150Btn.Check();
+ a150Btn.GrabFocus();
+ }
+ else if ( nNewFactor == 100 )
+ {
+ a100Btn.Check();
+ a100Btn.GrabFocus();
+ }
+ else if ( nNewFactor == 75 )
+ {
+ a75Btn.Check();
+ a75Btn.GrabFocus();
+ }
+ else if ( nNewFactor == 50 )
+ {
+ a50Btn.Check();
+ a50Btn.GrabFocus();
+ }
+ else
+ {
+ aUserBtn.Check();
+ aUserEdit.Enable();
+ aUserEdit.SetValue( (long)nNewFactor );
+ aUserEdit.GrabFocus();
+ }
+ }
+ else
+ {
+ aUserEdit.SetValue( (long)nNewFactor );
+
+ if ( ZOOMBTN_OPTIMAL == nBtnId )
+ {
+ aOptimalBtn.Check();
+ aOptimalBtn.GrabFocus();
+ }
+ else if ( ZOOMBTN_PAGEWIDTH == nBtnId )
+ {
+ aPageWidthBtn.Check();
+ aPageWidthBtn.GrabFocus();
+ }
+ else if ( ZOOMBTN_WHOLEPAGE == nBtnId )
+ {
+ aWholePageBtn.Check();
+ aWholePageBtn.GrabFocus();
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxZoomDialog::SetButtonText( USHORT nBtnId, const String& rNewTxt )
+{
+ switch ( nBtnId )
+ {
+ case ZOOMBTN_OPTIMAL: // Optimal-Button
+ aOptimalBtn.SetText( rNewTxt );
+ break;
+
+ case ZOOMBTN_PAGEWIDTH: // Seitenbreite-Button
+ aPageWidthBtn.SetText( rNewTxt );
+ break;
+
+ case ZOOMBTN_WHOLEPAGE: // Ganze Seite-Button
+ aWholePageBtn.SetText( rNewTxt );
+ break;
+
+ default:
+ DBG_ERROR( "wrong button number" );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxZoomDialog::HideButton( USHORT nBtnId )
+{
+ switch ( nBtnId )
+ {
+ case ZOOMBTN_OPTIMAL: // Optimal-Button
+ aOptimalBtn.Hide();
+ break;
+
+ case ZOOMBTN_PAGEWIDTH: // Seitenbreite-Button
+ aPageWidthBtn.Hide();
+ break;
+
+ case ZOOMBTN_WHOLEPAGE: // Ganze Seite-Button
+ aWholePageBtn.Hide();
+ break;
+
+ default:
+ DBG_ERROR( "Falsche Button-Nummer!!!" );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxZoomDialog::SetLimits( USHORT nMin, USHORT nMax )
+{
+ DBG_ASSERT( nMin < nMax, "invalid limits" );
+ aUserEdit.SetMin( nMin );
+ aUserEdit.SetFirst( nMin );
+ aUserEdit.SetMax( nMax );
+ aUserEdit.SetLast( nMax );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxZoomDialog::SetSpinSize( USHORT nNewSpin )
+{
+ aUserEdit.SetSpinSize( nNewSpin );
+}
+
+// -----------------------------------------------------------------------
+
+SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) :
+
+ SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_ZOOM ) ),
+
+ a200Btn ( this, ResId( BTN_200 ) ),
+ a150Btn ( this, ResId( BTN_150 ) ),
+ a100Btn ( this, ResId( BTN_100 ) ),
+ a75Btn ( this, ResId( BTN_75 ) ),
+ a50Btn ( this, ResId( BTN_50 ) ),
+ aOptimalBtn ( this, ResId( BTN_OPTIMAL ) ),
+ aPageWidthBtn ( this, ResId( BTN_PAGE_WIDTH ) ),
+ aWholePageBtn ( this, ResId( BTN_WHOLE_PAGE ) ),
+ aUserBtn ( this, ResId( BTN_USER ) ),
+ aUserEdit ( this, ResId( ED_USER ) ),
+ aZoomBox ( this, ResId( GB_ZOOM ) ),
+ aOKBtn ( this, ResId( BTN_ZOOM_OK ) ),
+ aCancelBtn ( this, ResId( BTN_ZOOM_CANCEL ) ),
+ aHelpBtn ( this, ResId( BTN_ZOOM_HELP ) ),
+
+ rSet ( rCoreSet ),
+ pOutSet ( NULL ),
+ bModified ( FALSE )
+
+{
+ Link aLink = LINK( this, SvxZoomDialog, UserHdl );
+ a200Btn.SetClickHdl( aLink );
+ a150Btn.SetClickHdl( aLink );
+ a100Btn.SetClickHdl( aLink );
+ a75Btn.SetClickHdl( aLink );
+ a50Btn.SetClickHdl( aLink );
+ aOptimalBtn.SetClickHdl( aLink );
+ aPageWidthBtn.SetClickHdl( aLink );
+ aWholePageBtn.SetClickHdl( aLink );
+ aUserBtn.SetClickHdl( aLink );
+ aOKBtn.SetClickHdl( LINK( this, SvxZoomDialog, OKHdl ) );
+ aUserEdit.SetModifyHdl( LINK( this, SvxZoomDialog, SpinHdl ) );
+
+ // Default-Werte
+ USHORT nValue = 100;
+ USHORT nMin = 10;
+ USHORT nMax = 1000;
+
+ // ggf. erst den alten Wert besorgen
+ const SfxUInt16Item* pOldUserItem = 0;
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ if ( pSh )
+ pOldUserItem = (const SfxUInt16Item*)pSh->GetItem( SID_ATTR_ZOOM_USER );
+
+ if ( pOldUserItem )
+ nValue = pOldUserItem->GetValue();
+
+ // UserEdit initialisieren
+ if ( nMin > nValue )
+ nMin = nValue;
+ if ( nMax < nValue )
+ nMax = nValue;
+ aUserEdit.SetMin( nMin );
+ aUserEdit.SetFirst( nMin );
+ aUserEdit.SetMax( nMax );
+ aUserEdit.SetLast( nMax );
+ aUserEdit.SetValue( nValue );
+
+ const SfxPoolItem& rItem = rSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_ZOOM ) );
+
+ if ( rItem.ISA(SvxZoomItem) )
+ {
+ const SvxZoomItem& rZoomItem = (const SvxZoomItem&)rItem;
+ USHORT nValue = rZoomItem.GetValue();
+ SvxZoomType eType = rZoomItem.GetType();
+ USHORT nValSet = rZoomItem.GetValueSet();
+ USHORT nBtnId = 0;
+
+ switch ( eType )
+ {
+ case SVX_ZOOM_OPTIMAL:
+ nBtnId = ZOOMBTN_OPTIMAL;
+ break;
+ case SVX_ZOOM_PAGEWIDTH:
+ nBtnId = ZOOMBTN_PAGEWIDTH;
+ break;
+ case SVX_ZOOM_WHOLEPAGE:
+ nBtnId = ZOOMBTN_WHOLEPAGE;
+ break;
+ case SVX_ZOOM_PERCENT:
+ break;
+ }
+
+ // ggf. Buttons disablen
+ if ( !(SVX_ZOOM_ENABLE_50 & nValSet) )
+ a50Btn.Disable();
+ if ( !(SVX_ZOOM_ENABLE_75 & nValSet) )
+ a75Btn.Disable();
+ if ( !(SVX_ZOOM_ENABLE_100 & nValSet) )
+ a100Btn.Disable();
+ if ( !(SVX_ZOOM_ENABLE_150 & nValSet) )
+ a150Btn.Disable();
+ if ( !(SVX_ZOOM_ENABLE_200 & nValSet) )
+ a200Btn.Disable();
+ if ( !(SVX_ZOOM_ENABLE_OPTIMAL & nValSet) )
+ aOptimalBtn.Disable();
+ if ( !(SVX_ZOOM_ENABLE_PAGEWIDTH & nValSet) )
+ aPageWidthBtn.Disable();
+ if ( !(SVX_ZOOM_ENABLE_WHOLEPAGE & nValSet) )
+ aWholePageBtn.Disable();
+ SetFactor( nValue, nBtnId );
+ }
+ else
+ {
+ USHORT nValue = ( (const SfxUInt16Item&)rItem ).GetValue();
+ SetFactor( nValue );
+ }
+
+ FreeResource();
+}
+
+// -----------------------------------------------------------------------
+
+SvxZoomDialog::~SvxZoomDialog()
+{
+ delete pOutSet;
+ pOutSet = 0;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT* SvxZoomDialog::GetRanges()
+{
+ return pRanges;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxZoomDialog, UserHdl, RadioButton *, pBtn )
+{
+ bModified |= TRUE;
+ USHORT nFactor = GetFactor();
+
+ if ( pBtn == &aUserBtn )
+ {
+ aUserEdit.Enable();
+ aUserEdit.GrabFocus();
+ }
+ else
+ aUserEdit.Disable();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxZoomDialog, SpinHdl, MetricField *, EMPTYARG )
+{
+ if ( !aUserBtn.IsChecked() )
+ return 0;
+ bModified |= TRUE;
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn )
+{
+ if ( bModified || &aOKBtn != pBtn )
+ {
+ SvxZoomItem aItem( SVX_ZOOM_PERCENT, 0,
+ rSet.GetPool()->GetWhich( SID_ATTR_ZOOM ) );
+
+ if ( &aOKBtn == pBtn )
+ {
+ USHORT nFactor = GetFactor();
+
+ if ( SPECIAL_FACTOR == nFactor )
+ {
+ if ( aOptimalBtn.IsChecked() )
+ aItem.SetType( SVX_ZOOM_OPTIMAL );
+ else if ( aPageWidthBtn.IsChecked() )
+ aItem.SetType( SVX_ZOOM_PAGEWIDTH );
+ else if ( aWholePageBtn.IsChecked() )
+ aItem.SetType( SVX_ZOOM_WHOLEPAGE );
+ }
+ else
+ aItem.SetValue( nFactor );
+ }
+ else
+ {
+ DBG_ERROR( "Wrong Button" );
+ return 0;
+ }
+ pOutSet = new SfxItemSet( rSet );
+ pOutSet->Put( aItem );
+
+ // Wert aus dem UserEdit "uber den Dialog hinaus merken
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ if ( pSh )
+ pSh->PutItem( SfxUInt16Item( SID_ATTR_ZOOM_USER,
+ (UINT16)aUserEdit.GetValue() ) );
+ EndDialog( RET_OK );
+ }
+ else
+ EndDialog( RET_CANCEL );
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/zoom.hrc b/svx/source/dialog/zoom.hrc
new file mode 100644
index 0000000000..c58f4f7421
--- /dev/null
+++ b/svx/source/dialog/zoom.hrc
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * $RCSfile: zoom.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_ZOOM_HRC
+#define _SVX_ZOOM_HRC
+
+// defines ------------------------------------------------------------------
+
+#define BTN_200 10
+#define BTN_150 11
+#define BTN_100 12
+#define BTN_75 13
+#define BTN_50 14
+#define BTN_OPTIMAL 15
+#define BTN_PAGE_WIDTH 16
+#define BTN_WHOLE_PAGE 17
+#define BTN_USER 18
+#define ED_USER 19
+#define GB_ZOOM 20
+
+#define BTN_ZOOM_OK 30
+#define BTN_ZOOM_CANCEL 31
+#define BTN_ZOOM_HELP 32
+
+
+#endif
+
diff --git a/svx/source/dialog/zoom.src b/svx/source/dialog/zoom.src
new file mode 100644
index 0000000000..1b73106ae5
--- /dev/null
+++ b/svx/source/dialog/zoom.src
@@ -0,0 +1,296 @@
+/*************************************************************************
+ *
+ * $RCSfile: zoom.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "zoom.hrc"
+ // RID_SVXDLG_ZOOM -------------------------------------------------------
+ModalDialog RID_SVXDLG_ZOOM
+{
+ HelpId = SID_ATTR_ZOOM ;
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 160 , 142 ) ;
+ Text = "Maßstab" ;
+ Text [ ENGLISH ] = "Zoom" ;
+ Text [ norwegian ] = "Zoom" ;
+ Text [ italian ] = "Zoom" ;
+ Text [ portuguese_brazilian ] = "Zoom" ;
+ Text [ portuguese ] = "Zoom" ;
+ Text [ finnish ] = "Zoomaus" ;
+ Text [ danish ] = "Målestok" ;
+ Text [ french ] = "Zoom" ;
+ Text [ swedish ] = "Skala" ;
+ Text [ dutch ] = "Zoom" ;
+ Text [ spanish ] = "Escala" ;
+ Text [ english_us ] = "Zoom" ;
+ Text[ chinese_simplified ] = "ÏÔʾ±ÈÀý";
+ Text[ russian ] = "Ìàñøòàá";
+ Text[ polish ] = "Skala";
+ Text[ japanese ] = "½Þ°Ñ";
+ Text[ chinese_traditional ] = "Åã¥Ü¤ñ¨Ò";
+ Text[ arabic ] = "ÊßÈíÑ/ÊÕÛíÑ";
+ Moveable = TRUE ;
+ RadioButton BTN_200
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Text = "~200 %" ;
+ };
+ RadioButton BTN_150
+ {
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Text = "15~0 %" ;
+ };
+ RadioButton BTN_100
+ {
+ Pos = MAP_APPFONT ( 12 , 40 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Text = "~100 %" ;
+ };
+ RadioButton BTN_75
+ {
+ Pos = MAP_APPFONT ( 12 , 53 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Text = "~75 %" ;
+ };
+ RadioButton BTN_50
+ {
+ Pos = MAP_APPFONT ( 12 , 66 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Text = "~50 %" ;
+ };
+ RadioButton BTN_OPTIMAL
+ {
+ Pos = MAP_APPFONT ( 12 , 79 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Text = "~Optimal" ;
+ Text [ English ] = "~Optimal" ;
+ Text [ norwegian ] = "~Optimal" ;
+ Text [ italian ] = "~Ottimale" ;
+ Text [ portuguese_brazilian ] = "~Optimal" ;
+ Text [ portuguese ] = "~Optimizar" ;
+ Text [ finnish ] = "~Optimal" ;
+ Text [ danish ] = "Optimal" ;
+ Text [ french ] = "~Optimal" ;
+ Text [ swedish ] = "Optimal" ;
+ Text [ dutch ] = "~Optimaal" ;
+ Text [ spanish ] = "Ó~ptimo" ;
+ Text [ english_us ] = "~Optimal" ;
+ Text[ chinese_simplified ] = "×î¼Ñ(~O)";
+ Text[ russian ] = "Îïòèìàëüíîå";
+ Text[ polish ] = "~Optymalnie";
+ Text[ japanese ] = "Å“K(~O)";
+ Text[ chinese_traditional ] = "³ÌÓì(~O)";
+ Text[ arabic ] = "ÇáÃãËá";
+ Text[ greek ] = "ÂÝëôéóôá";
+ Text[ korean ] = "ÃÖÀû(~O)";
+ Text[ turkish ] = "~Optimum";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_PAGE_WIDTH
+ {
+ Pos = MAP_APPFONT ( 12 , 92 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Text = "Seiten~breite" ;
+ Text [ ENGLISH ] = "~Page width" ;
+ Text [ norwegian ] = "~Sidebredde" ;
+ Text [ italian ] = "Larg~h. pagina" ;
+ Text [ portuguese_brazilian ] = "~Largura da página" ;
+ Text [ portuguese ] = "~Larg. de página" ;
+ Text [ finnish ] = "~Sivun leveys" ;
+ Text [ danish ] = "Sidebredde" ;
+ Text [ french ] = "~Largeur de page" ;
+ Text [ swedish ] = "Sidbredd" ;
+ Text [ dutch ] = "~Paginabreedte" ;
+ Text [ spanish ] = "~Ancho de página" ;
+ Text [ english_us ] = "~Page Width" ;
+ Text[ chinese_simplified ] = "Ò³¿í(~P)";
+ Text[ russian ] = "Ïî øèðèíå ñòðàíèöû";
+ Text[ polish ] = "SzerokoϾ strony";
+ Text[ japanese ] = "Íß°¼Þ•(~P)";
+ Text[ chinese_traditional ] = "­¶¼e(~P)";
+ Text[ arabic ] = "ÚÑÖ ÇáÕÝÍÉ";
+ Text[ greek ] = "ÐëÜôïò óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö ³Êºñ(~P)";
+ Text[ turkish ] = "~Sayfa geniþliði";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_WHOLE_PAGE
+ {
+ Pos = MAP_APPFONT ( 12 , 105 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Text = "~Ganze Seite" ;
+ Text [ ENGLISH ] = "~Whole page" ;
+ Text [ norwegian ] = "~Hele siden" ;
+ Text [ italian ] = "~Pagina intera" ;
+ Text [ portuguese_brazilian ] = "~Página inteira" ;
+ Text [ portuguese ] = "~Página inteira" ;
+ Text [ finnish ] = "~Koko sivu" ;
+ Text [ danish ] = "Hele siden" ;
+ Text [ french ] = "~Page entière" ;
+ Text [ swedish ] = "Hela sidan" ;
+ Text [ dutch ] = "~Hele pagina" ;
+ Text [ spanish ] = "~Toda la página" ;
+ Text [ english_us ] = "~Entire Page" ;
+ Text[ chinese_simplified ] = "È«Ò³(~E)";
+ Text[ russian ] = "Íà âñþ ñòðàíèöó";
+ Text[ polish ] = "Ca³a strona";
+ Text[ japanese ] = "Íß°¼Þ‘S‘Ì(~E)";
+ Text[ chinese_traditional ] = "¥þ­¶(~E)";
+ Text[ arabic ] = "ÕÝÍÉ ßÇãáÉ";
+ Text[ greek ] = "Ïëüêëçñç óåëßäá";
+ Text[ korean ] = "Àüü ÆäÀÌÁö(~E)";
+ Text[ turkish ] = "~Tam sayfa";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_USER
+ {
+ Pos = MAP_APPFONT ( 12 , 119 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "~Stufenlos" ;
+ Text [ ENGLISH ] = "~Custom" ;
+ Text [ norwegian ] = "~Tilpass" ;
+ Text [ italian ] = "~Variabile" ;
+ Text [ portuguese_brazilian ] = "~Pessoal" ;
+ Text [ portuguese ] = "~Variável" ;
+ Text [ finnish ] = "~Mukautettu" ;
+ Text [ danish ] = "Variabel" ;
+ Text [ french ] = "~Autre" ;
+ Text [ swedish ] = "~Steglös" ;
+ Text [ dutch ] = "~Traploos" ;
+ Text [ spanish ] = "~Variable" ;
+ Text [ english_us ] = "~Variable" ;
+ Text[ chinese_simplified ] = "ÎÞ¼¶Ëõ·Å(~V)";
+ Text[ russian ] = "Ïëàâíîå";
+ Text[ polish ] = "~Zmiennie";
+ Text[ japanese ] = "”CˆÓ(~V)";
+ Text[ chinese_traditional ] = "µL¯ÅÁY©ñ(~V)";
+ Text[ arabic ] = "ãÊÛíÑ";
+ Text[ greek ] = "×ùñßò âáèìßäå~ò";
+ Text[ korean ] = "´Ü°è¾øÀ½(~V)";
+ Text[ turkish ] = "~Deðiþken";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_USER
+ {
+ Pos = MAP_APPFONT ( 56 , 118 ) ;
+ Size = MAP_APPFONT ( 36 , 12 ) ;
+ Border = TRUE ;
+ Group = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ SpinSize = 1 ;
+ };
+ GroupBox GB_ZOOM
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 92 , 133 ) ;
+ Text = "Skalierung" ;
+ Text [ ENGLISH ] = "Skalierung" ;
+ Text [ norwegian ] = "Forstørrelse" ;
+ Text [ italian ] = "Scala" ;
+ Text [ portuguese_brazilian ] = "Magnificação" ;
+ Text [ portuguese ] = "Escala" ;
+ Text [ finnish ] = "Suurennus" ;
+ Text [ danish ] = "Skalering" ;
+ Text [ french ] = "Facteur" ;
+ Text [ swedish ] = "Skalning" ;
+ Text [ dutch ] = "Uitvergroting" ;
+ Text [ spanish ] = "Escala" ;
+ Text [ english_us ] = "Zoom to" ;
+ Text[ chinese_simplified ] = "¿Ì¶È";
+ Text[ russian ] = "Óâåëè÷åíèå";
+ Text[ polish ] = "Skalowanie";
+ Text[ japanese ] = "½Þ°Ñ";
+ Text[ chinese_traditional ] = "Åã¥Ü¤ñ¨Ò";
+ Text[ arabic ] = "ÊßÈíÑ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "Åóôßáóç";
+ Text[ korean ] = "¹èÀ²";
+ Text[ turkish ] = "Yakýnlaþtýr";
+ };
+ OKButton BTN_ZOOM_OK
+ {
+ Pos = MAP_APPFONT ( 104 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_ZOOM_CANCEL
+ {
+ Pos = MAP_APPFONT ( 104 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BTN_ZOOM_HELP
+ {
+ Pos = MAP_APPFONT ( 104 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ Text[ greek ] = "Êëßìáêá";
+ Text[ korean ] = "È®´ë/Ãà¼Ò";
+ Text[ turkish ] = "Ölçek";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/editeng/editattr.cxx b/svx/source/editeng/editattr.cxx
new file mode 100644
index 0000000000..e0f5d73625
--- /dev/null
+++ b/svx/source/editeng/editattr.cxx
@@ -0,0 +1,414 @@
+/*************************************************************************
+ *
+ * $RCSfile: editattr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <svxfont.hxx>
+#include <flditem.hxx>
+#include "fontitem.hxx"
+#include "postitem.hxx"
+#include "wghtitem.hxx"
+#include "udlnitem.hxx"
+#include "fwdtitem.hxx"
+#include "cntritem.hxx"
+#include "shdditem.hxx"
+#include "escpitem.hxx"
+#include "colritem.hxx"
+#include "wrlmitem.hxx"
+#include "fhgtitem.hxx"
+#include "crsditem.hxx"
+#include "cscoitem.hxx"
+#include "kernitem.hxx"
+#include "akrnitem.hxx"
+
+#include <editattr.hxx>
+
+DBG_NAME( EE_EditAttrib );
+
+ // -------------------------------------------------------------------------
+// class EditAttrib
+// -------------------------------------------------------------------------
+EditAttrib::EditAttrib( const SfxPoolItem& rAttr )
+{
+ DBG_CTOR( EE_EditAttrib, 0 );
+ pItem = &rAttr;
+}
+
+EditAttrib::~EditAttrib()
+{
+ DBG_DTOR( EE_EditAttrib, 0 );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttrib
+// -------------------------------------------------------------------------
+EditCharAttrib::EditCharAttrib( const SfxPoolItem& rAttr, USHORT nS, USHORT nE )
+ : EditAttrib( rAttr )
+{
+ nStart = nS;
+ nEnd = nE;
+ bFeature = FALSE;
+ bEdge = FALSE;
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribFont
+// -------------------------------------------------------------------------
+EditCharAttribFont::EditCharAttribFont( const SvxFontItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTINFO, "Kein Fontattribut!" );
+}
+
+void EditCharAttribFont::SetFont( SvxFont& rFont )
+{
+ const SvxFontItem& rAttr = (const SvxFontItem&)(*GetItem());
+
+ rFont.SetName( rAttr.GetFamilyName() );
+ rFont.SetFamily( rAttr.GetFamily() );
+ rFont.SetPitch( rAttr.GetPitch() );
+ rFont.SetCharSet( rAttr.GetCharSet() );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribItalic
+// -------------------------------------------------------------------------
+EditCharAttribItalic::EditCharAttribItalic( const SvxPostureItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_ITALIC, "Kein Italicattribut!" );
+}
+
+void EditCharAttribItalic::SetFont( SvxFont& rFont )
+{
+ rFont.SetItalic( ((const SvxPostureItem*)GetItem())->GetPosture() );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribWeight
+// -------------------------------------------------------------------------
+EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_WEIGHT, "Kein Weightttribut!" );
+}
+
+void EditCharAttribWeight::SetFont( SvxFont& rFont )
+{
+ rFont.SetWeight( (FontWeight)((const SvxWeightItem*)GetItem())->GetValue() );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribUnderline
+// -------------------------------------------------------------------------
+EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_UNDERLINE, "Kein Underlineattribut!" );
+}
+
+void EditCharAttribUnderline::SetFont( SvxFont& rFont )
+{
+ rFont.SetUnderline( (FontUnderline)((const SvxUnderlineItem*)GetItem())->GetValue() );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribFontHeight
+// -------------------------------------------------------------------------
+EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTHEIGHT, "Kein Heightattribut!" );
+}
+
+void EditCharAttribFontHeight::SetFont( SvxFont& rFont )
+{
+ // Prop wird ignoriert
+ rFont.SetSize( Size( rFont.GetSize().Width(), ((const SvxFontHeightItem*)GetItem())->GetHeight() ) );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribFontWidth
+// -------------------------------------------------------------------------
+EditCharAttribFontWidth::EditCharAttribFontWidth( const SvxFontWidthItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_FONTWIDTH, "Kein Widthattribut!" );
+}
+
+void EditCharAttribFontWidth::SetFont( SvxFont& rFont )
+{
+ // Prop wird nicht verwendet, weil bei def-Breite von 0 unmoeglich.
+ // => f( Device, andere Fonteinstellungen )!
+ rFont.SetSize( Size( ((const SvxFontWidthItem*)GetItem())->GetWidth(), rFont.GetSize().Height() ) );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribStrikeout
+// -------------------------------------------------------------------------
+EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, "Kein Sizeattribut!" );
+}
+
+void EditCharAttribStrikeout::SetFont( SvxFont& rFont )
+{
+ rFont.SetStrikeout( (FontStrikeout)((const SvxCrossedOutItem*)GetItem())->GetValue() );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribColor
+// -------------------------------------------------------------------------
+EditCharAttribColor::EditCharAttribColor( const SvxColorItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_COLOR, "Kein Colorattribut!" );
+}
+
+void EditCharAttribColor::SetFont( SvxFont& rFont )
+{
+ rFont.SetColor( ((const SvxColorItem*)GetItem())->GetValue() );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribShadow
+// -------------------------------------------------------------------------
+EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_SHADOW, "Kein Shadowattribut!" );
+}
+
+void EditCharAttribShadow::SetFont( SvxFont& rFont )
+{
+ rFont.SetShadow( (BOOL)((const SvxShadowedItem*)GetItem())->GetValue() );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribEscapement
+// -------------------------------------------------------------------------
+EditCharAttribEscapement::EditCharAttribEscapement( const SvxEscapementItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_ESCAPEMENT, "Kein Escapementattribut!" );
+}
+
+#if defined( WIN ) && !defined( WNT )
+#pragma optimize ("", off)
+#endif
+
+void EditCharAttribEscapement::SetFont( SvxFont& rFont )
+{
+ USHORT nProp = ((const SvxEscapementItem*)GetItem())->GetProp();
+ rFont.SetPropr( (BYTE)nProp );
+
+ short nEsc = ((const SvxEscapementItem*)GetItem())->GetEsc();
+ if ( nEsc == DFLT_ESC_AUTO_SUPER )
+ nEsc = 100 - nProp;
+ else if ( nEsc == DFLT_ESC_AUTO_SUB )
+ nEsc = -( 100 - nProp );
+ rFont.SetEscapement( nEsc );
+}
+
+#if defined( WIN ) && !defined( WNT )
+#pragma optimize ("", on)
+#endif
+
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribOutline
+// -------------------------------------------------------------------------
+EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_OUTLINE, "Kein Outlineattribut!" );
+}
+
+void EditCharAttribOutline::SetFont( SvxFont& rFont )
+{
+ rFont.SetOutline( (BOOL)((const SvxContourItem*)GetItem())->GetValue() );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribTab
+// -------------------------------------------------------------------------
+EditCharAttribTab::EditCharAttribTab( const SfxVoidItem& rAttr, USHORT nPos )
+ : EditCharAttrib( rAttr, nPos, nPos+1 )
+{
+ SetFeature( TRUE );
+}
+
+void EditCharAttribTab::SetFont( SvxFont& )
+{
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribLineBreak
+// -------------------------------------------------------------------------
+EditCharAttribLineBreak::EditCharAttribLineBreak( const SfxVoidItem& rAttr, USHORT nPos )
+ : EditCharAttrib( rAttr, nPos, nPos+1 )
+{
+ SetFeature( TRUE );
+}
+
+void EditCharAttribLineBreak::SetFont( SvxFont& )
+{
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribField
+// -------------------------------------------------------------------------
+EditCharAttribField::EditCharAttribField( const SvxFieldItem& rAttr, USHORT nPos )
+ : EditCharAttrib( rAttr, nPos, nPos+1 )
+{
+ SetFeature( TRUE ); // !!!
+ pTxtColor = 0;
+ pFldColor = 0;
+}
+
+void EditCharAttribField::SetFont( SvxFont& rFont )
+{
+ if ( pFldColor )
+ {
+ rFont.SetFillColor( *pFldColor );
+ rFont.SetTransparent( FALSE );
+ }
+ if ( pTxtColor )
+ rFont.SetColor( *pTxtColor );
+}
+
+EditCharAttribField::EditCharAttribField( const EditCharAttribField& rAttr )
+ : EditCharAttrib( *rAttr.GetItem(), rAttr.GetStart(), rAttr.GetEnd() ),
+ aFieldValue( rAttr.aFieldValue )
+{
+ // Diesen CCTOR nur fuer temporaeres Object verwenden,
+ // Item wird nicht gepoolt.
+ pTxtColor = rAttr.pTxtColor ? new Color( *rAttr.pTxtColor ) : 0;
+ pFldColor = rAttr.pFldColor ? new Color( *rAttr.pFldColor ) : 0;
+}
+
+EditCharAttribField::~EditCharAttribField()
+{
+ Reset();
+}
+
+BOOL EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const
+{
+ if ( aFieldValue != rAttr.aFieldValue )
+ return FALSE;
+
+ if ( ( pTxtColor && !rAttr.pTxtColor ) || ( !pTxtColor && rAttr.pTxtColor ) )
+ return FALSE;
+ if ( ( pTxtColor && rAttr.pTxtColor ) && ( *pTxtColor != *rAttr.pTxtColor ) )
+ return FALSE;
+
+ if ( ( pFldColor && !rAttr.pFldColor ) || ( !pFldColor && rAttr.pFldColor ) )
+ return FALSE;
+ if ( ( pFldColor && rAttr.pFldColor ) && ( *pFldColor != *rAttr.pFldColor ) )
+ return FALSE;
+
+ return TRUE;
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribPairKerning
+// -------------------------------------------------------------------------
+EditCharAttribPairKerning::EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_PAIRKERNING, "Kein PairKerning!" );
+}
+
+void EditCharAttribPairKerning::SetFont( SvxFont& rFont )
+{
+ rFont.SetKerning( ((const SvxAutoKernItem*)GetItem())->GetValue() );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribKerning
+// -------------------------------------------------------------------------
+EditCharAttribKerning::EditCharAttribKerning( const SvxKerningItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_KERNING, "Kein Kerning!" );
+}
+
+void EditCharAttribKerning::SetFont( SvxFont& rFont )
+{
+ rFont.SetFixKerning( ((const SvxKerningItem*)GetItem())->GetValue() );
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribWordLineMode
+// -------------------------------------------------------------------------
+EditCharAttribWordLineMode::EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, USHORT nStart, USHORT nEnd )
+ : EditCharAttrib( rAttr, nStart, nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_WLM, "Kein Kerning!" );
+}
+
+void EditCharAttribWordLineMode::SetFont( SvxFont& rFont )
+{
+ rFont.SetWordLineMode( ((const SvxWordLineModeItem*)GetItem())->GetValue() );
+}
diff --git a/svx/source/editeng/editattr.hxx b/svx/source/editeng/editattr.hxx
new file mode 100644
index 0000000000..ce307ff57a
--- /dev/null
+++ b/svx/source/editeng/editattr.hxx
@@ -0,0 +1,415 @@
+/*************************************************************************
+ *
+ * $RCSfile: editattr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _EDITATTR_HXX
+#define _EDITATTR_HXX
+
+#include <eeitemid.hxx>
+
+class SvxFont;
+class SvxFontItem;
+class SvxWeightItem;
+class SvxPostureItem;
+class SvxShadowedItem;
+class SvxEscapementItem;
+class SvxContourItem;
+class SvxCrossedOutItem;
+class SvxUnderlineItem;
+class SvxFontHeightItem;
+class SvxFontWidthItem;
+class SvxColorItem;
+class SvxAutoKernItem;
+class SvxKerningItem;
+class SvxCharSetColorItem;
+class SvxWordLineModeItem;
+class SvxFieldItem;
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+
+class SfxVoidItem;
+
+#define CH_FEATURE_OLD (sal_Unicode) 0xFF
+#define CH_FEATURE (sal_Unicode) 0x01
+
+// DEF_METRIC: Bei meinem Pool sollte immer die DefMetric bei
+// GetMetric( nWhich ) ankommen!
+// => Zum ermitteln der DefMetrik einfach ein GetMetric( 0 )
+#define DEF_METRIC 0
+
+ // -------------------------------------------------------------------------
+// class EditAttrib
+// -------------------------------------------------------------------------
+class EditAttrib
+{
+private:
+ EditAttrib() {;}
+ EditAttrib( const EditAttrib & ) {;}
+
+protected:
+ const SfxPoolItem* pItem;
+
+ EditAttrib( const SfxPoolItem& rAttr );
+ virtual ~EditAttrib();
+
+public:
+ // RemoveFromPool muss immer vorm DTOR Aufruf erfolgen!!
+ void RemoveFromPool( SfxItemPool& rPool );
+
+ USHORT Which() const { return pItem->Which(); }
+ const SfxPoolItem* GetItem() const { return pItem; }
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttrib
+// -------------------------------------------------------------------------
+// bFeature: Attribut darf nicht expandieren/schrumfen, Laenge immer 1
+// bEdge: Attribut expandiert nicht, wenn genau an der Kante expandiert werden soll
+class EditCharAttrib : public EditAttrib
+{
+protected:
+
+ USHORT nStart;
+ USHORT nEnd;
+ BOOL bFeature :1;
+ BOOL bEdge :1;
+
+public:
+ EditCharAttrib( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ USHORT& GetStart() { return nStart; }
+ USHORT& GetEnd() { return nEnd; }
+
+ USHORT GetStart() const { return nStart; }
+ USHORT GetEnd() const { return nEnd; }
+
+ inline USHORT GetLen() const;
+
+ inline void MoveForward( USHORT nDiff );
+ inline void MoveBackward( USHORT nDiff );
+
+ inline void Expand( USHORT nDiff );
+ inline void Collaps( USHORT nDiff );
+
+ virtual void SetFont( SvxFont& rFont ) = 0;
+
+ BOOL IsIn( USHORT nIndex )
+ { return ( ( nStart <= nIndex ) && ( nEnd >= nIndex ) ); }
+ BOOL IsInside( USHORT nIndex )
+ { return ( ( nStart < nIndex ) && ( nEnd > nIndex ) ); }
+ BOOL IsEmpty()
+ { return nStart == nEnd; }
+
+ BOOL IsFeature() const { return bFeature; }
+ void SetFeature( BOOL b) { bFeature = b; }
+
+ BOOL IsEdge() const { return bEdge; }
+ void SetEdge( BOOL b ) { bEdge = b; }
+};
+
+inline USHORT EditCharAttrib::GetLen() const
+{
+ DBG_ASSERT( nEnd >= nStart, "EditCharAttrib: nEnd < nStart!" );
+ return nEnd-nStart;
+}
+
+inline void EditCharAttrib::MoveForward( USHORT nDiff )
+{
+ DBG_ASSERT( ((long)nEnd + nDiff) <= 0xFFFF, "EditCharAttrib: MoveForward?!" );
+ nStart += nDiff;
+ nEnd += nDiff;
+}
+
+inline void EditCharAttrib::MoveBackward( USHORT nDiff )
+{
+ DBG_ASSERT( ((long)nStart - nDiff) >= 0, "EditCharAttrib: MoveBackward?!" );
+ nStart -= nDiff;
+ nEnd -= nDiff;
+}
+
+inline void EditCharAttrib::Expand( USHORT nDiff )
+{
+ DBG_ASSERT( ( ((long)nEnd + nDiff) <= (long)0xFFFF ), "EditCharAttrib: Expand?!" );
+ DBG_ASSERT( !bFeature, "Bitte keine Features expandieren!" );
+ nEnd += nDiff;
+}
+
+inline void EditCharAttrib::Collaps( USHORT nDiff )
+{
+ DBG_ASSERT( (long)nEnd - nDiff >= (long)nStart, "EditCharAttrib: Collaps?!" );
+ DBG_ASSERT( !bFeature, "Bitte keine Features schrumpfen!" );
+ nEnd -= nDiff;
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribFont
+// -------------------------------------------------------------------------
+class EditCharAttribFont: public EditCharAttrib
+{
+public:
+ EditCharAttribFont( const SvxFontItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribWeight
+// -------------------------------------------------------------------------
+class EditCharAttribWeight : public EditCharAttrib
+{
+public:
+ EditCharAttribWeight( const SvxWeightItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+ // -------------------------------------------------------------------------
+// class EditCharAttribItalic
+// -------------------------------------------------------------------------
+class EditCharAttribItalic : public EditCharAttrib
+{
+public:
+ EditCharAttribItalic( const SvxPostureItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribShadow
+// -------------------------------------------------------------------------
+class EditCharAttribShadow : public EditCharAttrib
+{
+public:
+ EditCharAttribShadow( const SvxShadowedItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribEscapement
+// -------------------------------------------------------------------------
+class EditCharAttribEscapement : public EditCharAttrib
+{
+public:
+ EditCharAttribEscapement( const SvxEscapementItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribOutline
+// -------------------------------------------------------------------------
+class EditCharAttribOutline : public EditCharAttrib
+{
+public:
+ EditCharAttribOutline( const SvxContourItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribStrikeout
+// -------------------------------------------------------------------------
+class EditCharAttribStrikeout : public EditCharAttrib
+{
+public:
+ EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribUnderline
+// -------------------------------------------------------------------------
+class EditCharAttribUnderline : public EditCharAttrib
+{
+public:
+ EditCharAttribUnderline( const SvxUnderlineItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribFontHeight
+// -------------------------------------------------------------------------
+class EditCharAttribFontHeight : public EditCharAttrib
+{
+public:
+ EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribFontWidth
+// -------------------------------------------------------------------------
+class EditCharAttribFontWidth : public EditCharAttrib
+{
+public:
+ EditCharAttribFontWidth( const SvxFontWidthItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribColor
+// -------------------------------------------------------------------------
+class EditCharAttribColor : public EditCharAttrib
+{
+public:
+ EditCharAttribColor( const SvxColorItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribTab
+// -------------------------------------------------------------------------
+class EditCharAttribTab : public EditCharAttrib
+{
+public:
+ EditCharAttribTab( const SfxVoidItem& rAttr, USHORT nPos );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribLineBreak
+// -------------------------------------------------------------------------
+class EditCharAttribLineBreak : public EditCharAttrib
+{
+public:
+ EditCharAttribLineBreak( const SfxVoidItem& rAttr, USHORT nPos );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribField
+// -------------------------------------------------------------------------
+class EditCharAttribField: public EditCharAttrib
+{
+ XubString aFieldValue;
+ Color* pTxtColor;
+ Color* pFldColor;
+
+ EditCharAttribField& operator = ( const EditCharAttribField& rAttr ) const;
+
+public:
+ EditCharAttribField( const SvxFieldItem& rAttr, USHORT nPos );
+ EditCharAttribField( const EditCharAttribField& rAttr );
+ ~EditCharAttribField();
+
+ BOOL operator == ( const EditCharAttribField& rAttr ) const;
+ BOOL operator != ( const EditCharAttribField& rAttr ) const
+ { return !(operator == ( rAttr ) ); }
+
+ virtual void SetFont( SvxFont& rFont );
+ Color*& GetTxtColor() { return pTxtColor; }
+ Color*& GetFldColor() { return pFldColor; }
+
+ const XubString& GetFieldValue() const { return aFieldValue; }
+ XubString& GetFieldValue() { return aFieldValue; }
+
+ void Reset()
+ {
+ aFieldValue.Erase();
+ delete pTxtColor; pTxtColor = 0;
+ delete pFldColor; pFldColor = 0;
+ }
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribPairKerning
+// -------------------------------------------------------------------------
+class EditCharAttribPairKerning : public EditCharAttrib
+{
+public:
+ EditCharAttribPairKerning( const SvxAutoKernItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribKerning
+// -------------------------------------------------------------------------
+class EditCharAttribKerning : public EditCharAttrib
+{
+public:
+ EditCharAttribKerning( const SvxKerningItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribWordLineMode
+// -------------------------------------------------------------------------
+class EditCharAttribWordLineMode: public EditCharAttrib
+{
+public:
+ EditCharAttribWordLineMode( const SvxWordLineModeItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont );
+};
+
+
+#endif // _EDITATTR_HXX
diff --git a/svx/source/editeng/editdbg.cxx b/svx/source/editeng/editdbg.cxx
new file mode 100644
index 0000000000..b1d0ca2026
--- /dev/null
+++ b/svx/source/editeng/editdbg.cxx
@@ -0,0 +1,537 @@
+/*************************************************************************
+ *
+ * $RCSfile: editdbg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#pragma hdrstop
+
+#include <lspcitem.hxx>
+
+#include "lrspitem.hxx"
+#include "ulspitem.hxx"
+#include "cntritem.hxx"
+#include "colritem.hxx"
+#include "fhgtitem.hxx"
+#include "fontitem.hxx"
+#include "adjitem.hxx"
+#include "fwdtitem.hxx"
+#include "wghtitem.hxx"
+#include "postitem.hxx"
+#include "udlnitem.hxx"
+#include "crsditem.hxx"
+#include "shdditem.hxx"
+#include "escpitem.hxx"
+#include "kernitem.hxx"
+#include "wrlmitem.hxx"
+#include "akrnitem.hxx"
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editview.hxx>
+#include <editdoc.hxx>
+#include <editdbg.hxx>
+
+#if defined( DBG_UTIL ) || defined( DEBUG )
+
+ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
+{
+ ByteString aDebStr;
+ switch ( rItem.Which() )
+ {
+ case EE_PARA_OUTLLRSPACE:
+ case EE_PARA_LRSPACE:
+ aDebStr += "FI=";
+ aDebStr += ByteString::CreateFromInt32( ((SvxLRSpaceItem&)rItem).GetTxtFirstLineOfst() );
+ aDebStr += ", LI=";
+ aDebStr += ByteString::CreateFromInt32( ((SvxLRSpaceItem&)rItem).GetTxtLeft() );
+ aDebStr += ", RI=";
+ aDebStr += ByteString::CreateFromInt32( ((SvxLRSpaceItem&)rItem).GetRight() );
+ break;
+ case EE_PARA_NUMBULLET:
+ aDebStr += "NumItem=...";
+ break;
+ case EE_PARA_BULLETSTATE:
+ aDebStr += "ShowBullet=";
+ aDebStr += ByteString::CreateFromInt32( ((SfxUInt16Item&)rItem).GetValue() );
+ break;
+ case EE_PARA_HYPHENATE:
+ aDebStr += "Hyphenate=";
+ aDebStr += ByteString::CreateFromInt32( ((SfxBoolItem&)rItem).GetValue() );
+ break;
+ case EE_PARA_OUTLLEVEL:
+ aDebStr += "Level=";
+ aDebStr += ByteString::CreateFromInt32( ((SfxUInt16Item&)rItem).GetValue() );
+ break;
+ case EE_PARA_ULSPACE:
+ aDebStr += "SB=";
+ aDebStr += ByteString::CreateFromInt32( ((SvxULSpaceItem&)rItem).GetUpper() );
+ aDebStr += ", SA=";
+ aDebStr += ByteString::CreateFromInt32( ((SvxULSpaceItem&)rItem).GetLower() );
+ break;
+ case EE_PARA_SBL:
+ aDebStr += "SBL=";
+ if ( ((SvxLineSpacingItem&)rItem).GetLineSpaceRule() == SVX_LINE_SPACE_MIN )
+ {
+ aDebStr += "Min: ";
+ aDebStr += ByteString::CreateFromInt32( ((SvxLineSpacingItem&)rItem).GetInterLineSpace() );
+ }
+ else if ( ((SvxLineSpacingItem&)rItem).GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
+ {
+ aDebStr += "Prop: ";
+ aDebStr += ByteString::CreateFromInt32( (ULONG)((SvxLineSpacingItem&)rItem).GetPropLineSpace() );
+ }
+ else
+ aDebStr += "Unsupported Type!";
+ break;
+ case EE_PARA_JUST:
+ aDebStr += "SvxAdust=";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxAdjustItem&)rItem).GetAdjust() );
+ break;
+ case EE_PARA_TABS:
+ aDebStr += "Tabs = ?";
+ break;
+ case EE_CHAR_COLOR:
+ {
+ aDebStr += "Color= ";
+ Color aColor( ((SvxColorItem&)rItem).GetValue() );
+ aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetRed() );
+ aDebStr += ", ";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetGreen() );
+ aDebStr += ", ";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)aColor.GetBlue() );
+ }
+ break;
+ case EE_CHAR_FONTINFO:
+ {
+ aDebStr += "Font=";
+ aDebStr += ByteString( ((SvxFontItem&)rItem).GetFamilyName(), RTL_TEXTENCODING_ASCII_US );
+ aDebStr += " (CharSet: ";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxFontItem&)rItem).GetCharSet() );
+ aDebStr += ')';
+ }
+ break;
+ case EE_CHAR_FONTHEIGHT:
+ {
+ aDebStr += "Groesse=";
+ aDebStr += ByteString::CreateFromInt32( ((SvxFontHeightItem&)rItem).GetHeight() );
+ Size aSz( 0, ((SvxFontHeightItem&)rItem).GetHeight() );
+ SfxMapUnit eUnit = rPool.GetMetric( rItem.Which() );
+ MapMode aItemMapMode( (MapUnit) eUnit );
+ MapMode aPntMap( MAP_POINT );
+ aSz = OutputDevice::LogicToLogic( aSz, aItemMapMode, aPntMap );
+ aDebStr += " Points=";
+ aDebStr += ByteString::CreateFromInt32( aSz.Height() );
+ }
+ break;
+ case EE_CHAR_FONTWIDTH:
+ {
+ aDebStr += "Breite=";
+ aDebStr += ((SvxFontWidthItem&)rItem).GetWidth();
+ Size aSz( 0, ((SvxFontWidthItem&)rItem).GetWidth() );
+ SfxMapUnit eUnit = rPool.GetMetric( rItem.Which() );
+ MapMode aItemMapMode( (MapUnit) eUnit );
+ MapMode aPntMap( MAP_POINT );
+ aSz = OutputDevice::LogicToLogic( aSz, aItemMapMode, aPntMap );
+ aDebStr += " Points=";
+ aDebStr += aSz.Width();
+ }
+ break;
+ case EE_CHAR_WEIGHT:
+ aDebStr += "FontWeight=";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxWeightItem&)rItem).GetWeight() );
+ break;
+ case EE_CHAR_UNDERLINE:
+ aDebStr += "FontUnderline=";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxUnderlineItem&)rItem).GetUnderline() );
+ break;
+ case EE_CHAR_STRIKEOUT:
+ aDebStr += "FontStrikeout=";
+ aDebStr +=ByteString::CreateFromInt32( (USHORT)((SvxCrossedOutItem&)rItem).GetStrikeout() );
+ break;
+ case EE_CHAR_ITALIC:
+ aDebStr += "FontPosture=";
+ aDebStr +=ByteString::CreateFromInt32( (USHORT)((SvxPostureItem&)rItem).GetPosture() );
+ break;
+ case EE_CHAR_OUTLINE:
+ aDebStr += "FontOutline=";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxContourItem&)rItem).GetValue() );
+ break;
+ case EE_CHAR_SHADOW:
+ aDebStr += "FontShadowed=";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxShadowedItem&)rItem).GetValue() );
+ break;
+ case EE_CHAR_ESCAPEMENT:
+ aDebStr += "Escape=";
+ aDebStr += ByteString::CreateFromInt32( (short)((SvxEscapementItem&)rItem).GetEsc() );
+ aDebStr += ", ";
+ aDebStr += ByteString::CreateFromInt32( (short)((SvxEscapementItem&)rItem).GetProp() );
+ break;
+ case EE_CHAR_PAIRKERNING:
+ aDebStr += "PairKerning=";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxAutoKernItem&)rItem).GetValue() );
+ break;
+ case EE_CHAR_KERNING:
+ {
+ aDebStr += "Kerning=";
+ aDebStr += ByteString::CreateFromInt32( (short)((SvxKerningItem&)rItem).GetValue() );
+ Size aSz( 0, (short)((SvxKerningItem&)rItem).GetValue() );
+ SfxMapUnit eUnit = rPool.GetMetric( rItem.Which() );
+ MapMode aItemMapMode( (MapUnit) eUnit );
+ MapMode aPntMap( MAP_POINT );
+ aSz = OutputDevice::LogicToLogic( aSz, aItemMapMode, aPntMap );
+ aDebStr += " Points=";
+ aDebStr += ByteString::CreateFromInt32( aSz.Height() );
+ }
+ break;
+ case EE_CHAR_WLM:
+ aDebStr += "WordLineMode=";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxWordLineModeItem&)rItem).GetValue() );
+ break;
+ }
+ return aDebStr;
+}
+
+void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, BOOL bSearchInParent, BOOL bShowALL )
+{
+ for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
+ {
+ fprintf( fp, "\nWhich: %i\t", nWhich );
+ if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_OFF )
+ fprintf( fp, "ITEM_OFF " );
+ else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_DONTCARE )
+ fprintf( fp, "ITEM_DC " );
+ else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_ON )
+ fprintf( fp, "ITEM_ON *" );
+
+ if ( !bShowALL && ( rSet.GetItemState( nWhich, bSearchInParent ) != SFX_ITEM_ON ) )
+ continue;
+
+ const SfxPoolItem& rItem = rSet.Get( nWhich, bSearchInParent );
+ ByteString aDebStr = DbgOutItem( *rSet.GetPool(), rItem );
+ fprintf( fp, "%s", aDebStr.GetBuffer() );
+ }
+}
+
+void EditDbg::ShowEditEngineData( EditEngine* pEE, BOOL bInfoBox )
+{
+#ifdef MAC
+ FILE* fp = fopen( "debug.log", "w" );
+#elif defined UNX
+ FILE* fp = fopen( "/tmp/debug.log", "w" );
+#else
+ FILE* fp = fopen( "d:\\debug.log", "w" );
+#endif
+ if ( fp == 0 )
+ {
+ DBG_ERROR( "Log-File konnte nicht angelegt werden!" );
+ return;
+ }
+
+ const SfxItemPool& rPool = *pEE->GetEmptyItemSet().GetPool();
+
+ fprintf( fp, "================================================================================" );
+ fprintf( fp, "\n================== Dokument ================================================" );
+ fprintf( fp, "\n================================================================================" );
+ for ( USHORT nPortion = 0; nPortion < pEE->pImpEditEngine->GetParaPortions(). Count(); nPortion++)
+ {
+
+ ParaPortion* pPPortion = pEE->pImpEditEngine->GetParaPortions().GetObject(nPortion );
+ fprintf( fp, " \nAbsatz %i: Laenge = %i, Invalid = %i\nText = '%s'", nPortion, pPPortion->GetNode()->Len(), pPPortion->IsInvalid(), ByteString( *pPPortion->GetNode(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
+ fprintf( fp, "\nVorlage:" );
+ SfxStyleSheet* pStyle = pPPortion->GetNode()->GetStyleSheet();
+ if ( pStyle )
+ fprintf( fp, " %s", ByteString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
+ fprintf( fp, "\nAbsatzattribute:" );
+ DbgOutItemSet( fp, pPPortion->GetNode()->GetContentAttribs().GetItems(), FALSE, FALSE );
+
+ fprintf( fp, "\nZeichenattribute:" );
+ BOOL bZeroAttr = FALSE;
+ for ( USHORT z = 0; z < pPPortion->GetNode()->GetCharAttribs().Count(); z++ )
+ {
+ EditCharAttrib* pAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( z );
+ ByteString aCharAttribs;
+ aCharAttribs += "\nA";
+ aCharAttribs += ByteString::CreateFromInt32( nPortion );
+ aCharAttribs += ": ";
+ aCharAttribs += ByteString::CreateFromInt32( pAttr->GetItem()->Which() );
+ aCharAttribs += '\t';
+ aCharAttribs += ByteString::CreateFromInt32( pAttr->GetStart() );
+ aCharAttribs += '\t';
+ aCharAttribs += ByteString::CreateFromInt32( pAttr->GetEnd() );
+ if ( pAttr->IsEmpty() )
+ bZeroAttr = TRUE;
+ fprintf( fp, "%s => ", aCharAttribs.GetBuffer() );
+
+ ByteString aDebStr = DbgOutItem( rPool, *pAttr->GetItem() );
+ fprintf( fp, "%s", aDebStr.GetBuffer() );
+ }
+ if ( bZeroAttr )
+ fprintf( fp, "\nNULL-Attribute!" );
+
+ USHORT nTextPortions = pPPortion->GetTextPortions().Count();
+ ByteString aPortionStr("\nTextportions: #");
+ aPortionStr += ByteString::CreateFromInt32( nTextPortions );
+ aPortionStr += " \nA";
+ aPortionStr += ByteString::CreateFromInt32( nPortion );
+ aPortionStr += ": Absatzlaenge = ";
+ aPortionStr += ByteString::CreateFromInt32( pPPortion->GetNode()->Len() );
+ aPortionStr += "\nA";
+ aPortionStr += ByteString::CreateFromInt32( nPortion );
+ aPortionStr += ": ";
+ ULONG n = 0;
+ for ( z = 0; z < nTextPortions; z++ )
+ {
+ TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z );
+ aPortionStr += " ";
+ aPortionStr += ByteString::CreateFromInt32( pPortion->GetLen() );
+ aPortionStr += "(";
+ aPortionStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() );
+ aPortionStr += ")";
+ aPortionStr += "[";
+ aPortionStr += ByteString::CreateFromInt32( (USHORT)pPortion->GetKind() );
+ aPortionStr += "]";
+ aPortionStr += ";";
+ n += pPortion->GetLen();
+ }
+ aPortionStr += "\nA";
+ aPortionStr += ByteString::CreateFromInt32( nPortion );
+ aPortionStr += ": Gesamtlaenge: ";
+ aPortionStr += ByteString::CreateFromInt32( n );
+ if ( pPPortion->GetNode()->Len() != n )
+ aPortionStr += " => Fehler !!!";
+ fprintf( fp, "%s", aPortionStr.GetBuffer() );
+
+
+ fprintf( fp, "\n\nZeilen:" );
+ // Erstmal die Inhalte...
+ for ( USHORT nLine = 0; nLine < pPPortion->GetLines().Count(); nLine++ )
+ {
+ EditLine* pLine = pPPortion->GetLines().GetObject( nLine );
+
+ ByteString aLine( *(pPPortion->GetNode()), pLine->GetStart(), pLine->GetEnd() - pLine->GetStart(), RTL_TEXTENCODING_ASCII_US );
+ fprintf( fp, "\nZeile %i\t>%s<", nLine, aLine.GetBuffer() );
+ }
+ // dann die internen Daten...
+ for ( nLine = 0; nLine < pPPortion->GetLines().Count(); nLine++ )
+ {
+ EditLine* pLine = pPPortion->GetLines().GetObject( nLine );
+ fprintf( fp, "\nZeile %i:\tStart: %i,\tEnd: %i", nLine, pLine->GetStart(), pLine->GetEnd() );
+ fprintf( fp, "\t\tPortions: %i - %i.\tHoehe: %i, Ascent=%i", pLine->GetStartPortion(), pLine->GetEndPortion(), pLine->GetHeight(), pLine->GetMaxAscent() );
+ }
+
+ fprintf( fp, "\n-----------------------------------------------------------------------------" );
+ }
+
+ if ( pEE->pImpEditEngine->GetStyleSheetPool() )
+ {
+ ULONG nStyles = pEE->pImpEditEngine->GetStyleSheetPool() ? pEE->pImpEditEngine->GetStyleSheetPool()->Count() : 0;
+ fprintf( fp, "\n\n ================================================================================" );
+ fprintf( fp, "\n================== Stylesheets =============================================" );
+ fprintf( fp, "\n================================================================================" );
+ fprintf( fp, "\n#Vorlagen: %lu\n", nStyles );
+ SfxStyleSheetBase* pStyle = pEE->pImpEditEngine->GetStyleSheetPool()->First();
+ while ( pStyle )
+ {
+ fprintf( fp, "\nVorlage: %s", ByteString( pStyle->GetName(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
+ fprintf( fp, "\nParent: %s", ByteString( pStyle->GetParent(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
+ fprintf( fp, "\nFollow: %s", ByteString( pStyle->GetFollow(), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
+ DbgOutItemSet( fp, pStyle->GetItemSet(), FALSE, FALSE );
+ fprintf( fp, "\n----------------------------------" );
+
+ pStyle = pEE->pImpEditEngine->GetStyleSheetPool()->Next();
+ }
+ }
+
+ fprintf( fp, "\n\n ================================================================================" );
+ fprintf( fp, "\n================== Defaults ================================================" );
+ fprintf( fp, "\n================================================================================" );
+ DbgOutItemSet( fp, pEE->pImpEditEngine->GetEmptyItemSet(), TRUE, TRUE );
+
+ fprintf( fp, "\n\n ================================================================================" );
+ fprintf( fp, "\n================== EditEngine & Views ======================================" );
+ fprintf( fp, "\n================================================================================" );
+ fprintf( fp, "\nControl: %lx", pEE->GetControlWord() );
+ fprintf( fp, "\nRefMapMode: %i", pEE->pImpEditEngine->pRefDev->GetMapMode().GetMapUnit() );
+ fprintf( fp, "\nPaperSize: %li x %li", pEE->GetPaperSize().Width(), pEE->GetPaperSize().Height() );
+ fprintf( fp, "\nMaxAutoPaperSize: %li x %li", pEE->GetMaxAutoPaperSize().Width(), pEE->GetMaxAutoPaperSize().Height() );
+ fprintf( fp, "\nMinAutoPaperSize: %li x %li", pEE->GetMinAutoPaperSize().Width(), pEE->GetMinAutoPaperSize().Height() );
+ fprintf( fp, "\nUpdate: %i", pEE->GetUpdateMode() );
+ fprintf( fp, "\nAnzahl der Views: %i", pEE->GetViewCount() );
+ for ( USHORT nView = 0; nView < pEE->GetViewCount(); nView++ )
+ {
+ EditView* pV = pEE->GetView( nView );
+ DBG_ASSERT( pV, "View nicht gefunden!" );
+ fprintf( fp, "\nView %i: Focus=%i", nView, pV->GetWindow()->HasFocus() );
+ Rectangle aR( pV->GetOutputArea() );
+ fprintf( fp, "\n OutputArea: nX=%li, nY=%li, dX=%li, dY=%li, MapMode = %i", aR.TopLeft().X(), aR.TopLeft().Y(), aR.GetSize().Width(), aR.GetSize().Height() , pV->GetWindow()->GetMapMode().GetMapUnit() );
+ aR = pV->GetVisArea();
+ fprintf( fp, "\n VisArea: nX=%li, nY=%li, dX=%li, dY=%li", aR.TopLeft().X(), aR.TopLeft().Y(), aR.GetSize().Width(), aR.GetSize().Height() );
+ ESelection aSel = pV->GetSelection();
+ fprintf( fp, "\n Selektion: Start=%u,%u, End=%u,%u", aSel.nStartPara, aSel.nStartPos, aSel.nEndPara, aSel.nEndPos );
+ }
+ if ( pEE->GetActiveView() )
+ {
+ fprintf( fp, "\n\n ================================================================================" );
+ fprintf( fp, "\n================== Aktuelle View ===========================================" );
+ fprintf( fp, "\n================================================================================" );
+ DbgOutItemSet( fp, pEE->GetActiveView()->GetAttribs(), TRUE, FALSE );
+ }
+ fclose( fp );
+ if ( bInfoBox )
+ InfoBox(0, String( RTL_CONSTASCII_USTRINGPARAM( "D:\\DEBUG.LOG !" ) ) ).Execute();
+}
+
+ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion )
+{
+ ByteString aDebStr( "Absatzlaenge = " );
+ aDebStr += ByteString::CreateFromInt32( pPPortion->GetNode()->Len() );
+
+ aDebStr += "\nZeichenattribute:";
+ for ( USHORT z = 0; z < pPPortion->GetNode()->GetCharAttribs().Count(); z++ )
+ {
+ EditCharAttrib* pAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( z );
+ aDebStr += "\n ";
+ aDebStr += ByteString::CreateFromInt32( pAttr->GetItem()->Which() );
+ aDebStr += '\t';
+ aDebStr += ByteString::CreateFromInt32( pAttr->GetStart() );
+ aDebStr += '\t';
+ aDebStr += ByteString::CreateFromInt32( pAttr->GetEnd() );
+ }
+
+ aDebStr += "\nTextportions:";
+ USHORT n = 0;
+ for ( z = 0; z < pPPortion->GetTextPortions().Count(); z++ )
+ {
+ TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z );
+ aDebStr += " ";
+ aDebStr += ByteString::CreateFromInt32( pPortion->GetLen() );
+ aDebStr += "(";
+ aDebStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() );
+ aDebStr += ")";
+ aDebStr += ";";
+ n += pPortion->GetLen();
+ }
+ aDebStr += "\nGesamtlaenge: ";
+ aDebStr += n;
+ aDebStr += "\nSortiert nach Start:";
+ for ( USHORT x = 0; x < pPPortion->GetNode()->GetCharAttribs().Count(); x++ )
+ {
+ EditCharAttrib* pCurAttrib = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( x );
+ aDebStr += "\nStart: ";
+ aDebStr += ByteString::CreateFromInt32( pCurAttrib->GetStart() );
+ aDebStr += "\tEnde: ";
+ aDebStr += ByteString::CreateFromInt32( pCurAttrib->GetEnd() );
+ }
+ return aDebStr;
+}
+
+ByteString EditDbg::GetTextPortionInfo( TextPortionList& rPortions )
+{
+ ByteString aDebStr;
+ for ( USHORT z = 0; z < rPortions.Count(); z++ )
+ {
+ TextPortion* pPortion = rPortions.GetObject( z );
+ aDebStr += " ";
+ aDebStr += ByteString::CreateFromInt32( pPortion->GetLen() );
+ aDebStr += "(";
+ aDebStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() );
+ aDebStr += ")";
+ aDebStr += ";";
+ }
+ return aDebStr;
+}
+
+void EditDbg::ShowPortionData( ParaPortion* pPortion )
+{
+ ByteString aDebStr( GetPortionInfo( pPortion ) );
+ InfoBox( 0, String( aDebStr, RTL_TEXTENCODING_ASCII_US ) ).Execute();
+}
+
+
+BOOL ParaPortion::DbgCheckTextPortions()
+{
+ // pruefen, ob Portionlaenge ok:
+ USHORT nXLen = 0;
+ for ( USHORT nPortion = 0; nPortion < aTextPortionList.Count(); nPortion++ )
+ nXLen += aTextPortionList[nPortion]->GetLen();
+ return nXLen == pNode->Len() ? TRUE : FALSE;
+}
+
+BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart )
+{
+ USHORT nPrev = 0;
+ for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
+ {
+ EditCharAttrib* pAttr = rAttribs[nAttr];
+ USHORT nCur = bStart ? pAttr->GetStart() : pAttr->GetEnd();
+ if ( nCur < nPrev )
+ return FALSE;
+
+ nPrev = nCur;
+ }
+ return TRUE;
+}
+
+#endif
+
diff --git a/svx/source/editeng/editdoc.cxx b/svx/source/editeng/editdoc.cxx
new file mode 100644
index 0000000000..c82fb960df
--- /dev/null
+++ b/svx/source/editeng/editdoc.cxx
@@ -0,0 +1,2039 @@
+/*************************************************************************
+ *
+ * $RCSfile: editdoc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <tstpitem.hxx>
+#include "colritem.hxx"
+
+#include "fontitem.hxx"
+#include "crsditem.hxx"
+#include "fhgtitem.hxx"
+#include "fwdtitem.hxx"
+#include "postitem.hxx"
+#include "kernitem.hxx"
+#include "wrlmitem.hxx"
+#include "wghtitem.hxx"
+#include "udlnitem.hxx"
+#include "cntritem.hxx"
+#include "escpitem.hxx"
+#include "shdditem.hxx"
+#include "akrnitem.hxx"
+#include "cscoitem.hxx"
+
+
+#include <editdoc.hxx>
+#include <editdbg.hxx>
+#include <eerdll.hxx>
+#include <eerdll2.hxx>
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+
+#include <tools/debug.hxx>
+#include <tools/shl.hxx>
+#include <vcl/svapp.hxx>
+
+#include <stdlib.h> // qsort
+
+// Sollte spaeter zentral nach TOOLS/STRING (Aktuell: 303)
+// fuer Grep: WS_TARGET
+
+DBG_NAME( EE_TextPortion );
+DBG_NAME( EE_EditLine );
+DBG_NAME( EE_ContentNode );
+DBG_NAME( EE_CharAttribList );
+
+SfxItemInfo aItemInfos[EDITITEMCOUNT] = {
+ { SID_ATTR_NUMBERING_RULE, SFX_ITEM_POOLABLE }, // EE_PARA_NUMBULL
+ { 0, SFX_ITEM_POOLABLE }, // EE_PARA_HYPHENATE
+ { 0, SFX_ITEM_POOLABLE }, // EE_PARA_BULLETSTATE
+ { 0, SFX_ITEM_POOLABLE }, // EE_PARA_OUTLLRSPACE
+ { SID_ATTR_PARA_OUTLLEVEL, SFX_ITEM_POOLABLE },
+ { SID_ATTR_PARA_BULLET, SFX_ITEM_POOLABLE },
+ { SID_ATTR_LRSPACE, SFX_ITEM_POOLABLE }, // PARA ?
+ { SID_ATTR_ULSPACE, SFX_ITEM_POOLABLE }, // PARA ?
+ { SID_ATTR_PARA_LINESPACE, SFX_ITEM_POOLABLE },
+ { SID_ATTR_PARA_ADJUST, SFX_ITEM_POOLABLE },
+ { SID_ATTR_TABSTOP, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_COLOR, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_FONT, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_FONTHEIGHT, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_FONTWIDTH, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_WEIGHT, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_UNDERLINE, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_STRIKEOUT, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_POSTURE, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_CONTOUR, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_SHADOWED, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_ESCAPEMENT, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_AUTOKERN, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_KERNING, SFX_ITEM_POOLABLE },
+ { SID_ATTR_CHAR_WORDLINEMODE, SFX_ITEM_POOLABLE },
+ { 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_TAB
+ { 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_LINEBR
+ { SID_ATTR_CHAR_CHARSETCOLOR, SFX_ITEM_POOLABLE }, // EE_FEATURE_NOTCONV
+ { SID_FIELD, SFX_ITEM_POOLABLE }
+};
+
+USHORT aV1Map[] = {
+ 3999, 4001, 4002, 4003, 4004, 4005, 4006,
+ 4007, 4008, 4009, 4010, 4011, 4012, 4013, 4017, 4018, 4019 // MI: 4019?
+};
+
+USHORT aV2Map[] = {
+ 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009,
+ 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4018, 4019, 4020
+};
+
+USHORT aV3Map[] = {
+ 3997, 3998, 3999, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007,
+ 4009, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019,
+ 4020, 4021
+};
+
+SV_IMPL_PTRARR( ContentList, ContentNode* );
+
+int SAL_CALL CompareStart( const void* pFirst, const void* pSecond )
+{
+ if ( (*((EditCharAttrib**)pFirst))->GetStart() < (*((EditCharAttrib**)pSecond))->GetStart() )
+ return (-1);
+ else if ( (*((EditCharAttrib**)pFirst))->GetStart() > (*((EditCharAttrib**)pSecond))->GetStart() )
+ return (1);
+ return 0;
+}
+
+EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, USHORT nS, USHORT nE )
+{
+ // das neue Attribut im Pool anlegen
+ const SfxPoolItem& rNew = rPool.Put( rAttr );
+
+ EditCharAttrib* pNew = 0;
+ switch( rNew.Which() )
+ {
+ case EE_CHAR_COLOR:
+ {
+ pNew = new EditCharAttribColor( (const SvxColorItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_FONTINFO:
+ {
+ pNew = new EditCharAttribFont( (const SvxFontItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_FONTHEIGHT:
+ {
+ pNew = new EditCharAttribFontHeight( (const SvxFontHeightItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_FONTWIDTH:
+ {
+ pNew = new EditCharAttribFontWidth( (const SvxFontWidthItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_WEIGHT:
+ {
+ pNew = new EditCharAttribWeight( (const SvxWeightItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_UNDERLINE:
+ {
+ pNew = new EditCharAttribUnderline( (const SvxUnderlineItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_STRIKEOUT:
+ {
+ pNew = new EditCharAttribStrikeout( (const SvxCrossedOutItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_ITALIC:
+ {
+ pNew = new EditCharAttribItalic( (const SvxPostureItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_OUTLINE:
+ {
+ pNew = new EditCharAttribOutline( (const SvxContourItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_SHADOW:
+ {
+ pNew = new EditCharAttribShadow( (const SvxShadowedItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_ESCAPEMENT:
+ {
+ pNew = new EditCharAttribEscapement( (const SvxEscapementItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_PAIRKERNING:
+ {
+ pNew = new EditCharAttribPairKerning( (const SvxAutoKernItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_KERNING:
+ {
+ pNew = new EditCharAttribKerning( (const SvxKerningItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_CHAR_WLM:
+ {
+ pNew = new EditCharAttribWordLineMode( (const SvxWordLineModeItem&)rNew, nS, nE );
+ }
+ break;
+ case EE_FEATURE_TAB:
+ {
+ pNew = new EditCharAttribTab( (const SfxVoidItem&)rNew, nS );
+ }
+ break;
+ case EE_FEATURE_LINEBR:
+ {
+ pNew = new EditCharAttribLineBreak( (const SfxVoidItem&)rNew, nS );
+ }
+ break;
+ case EE_FEATURE_FIELD:
+ {
+ pNew = new EditCharAttribField( (const SvxFieldItem&)rNew, nS );
+ }
+ break;
+ default:
+ {
+ DBG_ERROR( "Ungueltiges Attribut!" );
+ }
+ }
+ return pNew;
+}
+
+
+ // -------------------------------------------------------------------------
+// class EditLine
+// -------------------------------------------------------------------------
+
+EditLine::EditLine()
+{
+ DBG_CTOR( EE_EditLine, 0 );
+
+ nStart = nEnd = 0; // kommt weg ?!
+ nStartPortion = 0; // damit in ungueltiger Zeile ohne Portions von einer gueltigen Zeile mit der Portion Nr0 unterscieden werden kann.
+ nEndPortion = 0;
+ nHeight = 0;
+ nStartPosX = 0;
+ nTxtHeight = 0;
+ nCrsrHeight = 0;
+ nMaxAscent = 0;
+ bInvalid = TRUE;
+}
+
+EditLine::EditLine( const EditLine& r )
+{
+ DBG_CTOR( EE_EditLine, 0 );
+
+ nEnd = r.nEnd;
+ nStart = r.nStart;
+ nStartPortion = r.nStartPortion;
+ nEndPortion = r.nEndPortion;
+
+ nHeight = 0;
+ nStartPosX = 0;
+ nTxtHeight = 0;
+ nCrsrHeight = 0;
+ nMaxAscent = 0;
+ bInvalid = TRUE;
+}
+
+EditLine::~EditLine()
+{
+ DBG_DTOR( EE_EditLine, 0 );
+}
+
+EditLine* EditLine::Clone() const
+{
+ EditLine* pL = new EditLine;
+ if ( aPositions.Count() )
+ {
+ long* pData = new long[ aPositions.Count() ];
+ memcpy( pData, aPositions.GetData(), aPositions.Count()*sizeof(*aPositions.GetData()) );
+ pL->aPositions.InitData( pData, aPositions.Count() );
+ }
+ pL->nStartPosX = nStartPosX;
+ pL->nStart = nStart;
+ pL->nEnd = nEnd;
+ pL->nStartPortion = nStartPortion;
+ pL->nEndPortion = nEndPortion;
+ pL->nHeight = nHeight;
+ pL->nTxtHeight = nTxtHeight;
+ pL->nCrsrHeight = nCrsrHeight;
+ pL->nMaxAscent = nMaxAscent;
+
+ return pL;
+}
+
+BOOL operator == ( const EditLine& r1, const EditLine& r2 )
+{
+ if ( r1.nStart != r2.nStart )
+ return FALSE;
+
+ if ( r1.nEnd != r2.nEnd )
+ return FALSE;
+
+ if ( r1.nStartPortion != r2.nStartPortion )
+ return FALSE;
+
+ if ( r1.nEndPortion != r2.nEndPortion )
+ return FALSE;
+
+ return TRUE;
+}
+
+EditLine& EditLine::operator = ( const EditLine& r )
+{
+ nEnd = r.nEnd;
+ nStart = r.nStart;
+ nEndPortion = r.nEndPortion;
+ nStartPortion = r.nStartPortion;
+ return *this;
+}
+
+
+BOOL operator != ( const EditLine& r1, const EditLine& r2 )
+{
+ return !( r1 == r2 );
+}
+
+Size EditLine::CalcTextSize( ParaPortion& rParaPortion )
+{
+ Size aSz;
+ Size aTmpSz;
+ TextPortion* pPortion;
+
+ USHORT nIndex = GetStart();
+
+ DBG_ASSERT( rParaPortion.GetTextPortions().Count(), "GetTextSize vor CreatePortions !" );
+
+ for ( USHORT n = nStartPortion; n <= nEndPortion; n++ )
+ {
+ pPortion = rParaPortion.GetTextPortions().GetObject(n);
+ switch ( pPortion->GetKind() )
+ {
+ case PORTIONKIND_TEXT:
+ case PORTIONKIND_FIELD:
+ case PORTIONKIND_HYPHENATOR:
+ {
+ aTmpSz = pPortion->GetSize();
+ aSz.Width() += aTmpSz.Width();
+ if ( aSz.Height() < aTmpSz.Height() )
+ aSz.Height() = aTmpSz.Height();
+ }
+ break;
+ case PORTIONKIND_TAB:
+ {
+ aSz.Width() += pPortion->GetSize().Width();
+ }
+ break;
+ }
+ nIndex += pPortion->GetLen();
+ }
+
+ SetHeight( (USHORT)aSz.Height() );
+ return aSz;
+}
+
+ // -------------------------------------------------------------------------
+// class EditLineList
+// -------------------------------------------------------------------------
+EditLineList::EditLineList()
+{
+}
+
+EditLineList::~EditLineList()
+{
+ Reset();
+}
+
+void EditLineList::Reset()
+{
+ for ( USHORT nLine = 0; nLine < Count(); nLine++ )
+ delete GetObject(nLine);
+ Remove( 0, Count() );
+}
+
+void EditLineList::DeleteFromLine( USHORT nDelFrom )
+{
+ DBG_ASSERT( nDelFrom <= (Count() - 1), "DeleteFromLine: Out of range" );
+ for ( USHORT nL = nDelFrom; nL < Count(); nL++ )
+ delete GetObject(nL);
+ Remove( nDelFrom, Count()-nDelFrom );
+}
+
+USHORT EditLineList::FindLine( USHORT nChar, BOOL bInclEnd )
+{
+ for ( USHORT nLine = 0; nLine < Count(); nLine++ )
+ {
+ EditLine* pLine = GetObject( nLine );
+ if ( ( bInclEnd && ( pLine->GetEnd() >= nChar ) ) ||
+ ( pLine->GetEnd() > nChar ) )
+ {
+ return nLine;
+ }
+ }
+
+ DBG_ASSERT( !bInclEnd, "Zeile nicht gefunden: FindLine" );
+ return ( Count() - 1 );
+}
+
+ // -------------------------------------------------------------------------
+// class EditSelection
+// -------------------------------------------------------------------------
+BOOL EditPaM::DbgIsBuggy( EditDoc& rDoc )
+{
+ if ( !pNode )
+ return TRUE;
+ if ( rDoc.GetPos( pNode ) >= rDoc.Count() )
+ return TRUE;
+ if ( nIndex > pNode->Len() )
+ return TRUE;
+
+ return FALSE;
+}
+
+BOOL EditSelection::DbgIsBuggy( EditDoc& rDoc )
+{
+ if ( aStartPaM.DbgIsBuggy( rDoc ) )
+ return TRUE;
+ if ( aEndPaM.DbgIsBuggy( rDoc ) )
+ return TRUE;
+
+ return FALSE;
+}
+
+EditSelection::EditSelection()
+{
+}
+
+EditSelection::EditSelection( const EditPaM& rStartAndAnd )
+{
+ // koennte noch optimiert werden!
+ // nicht erst Def-CTOR vom PaM rufen!
+ aStartPaM = rStartAndAnd;
+ aEndPaM = rStartAndAnd;
+}
+
+EditSelection::EditSelection( const EditPaM& rStart, const EditPaM& rEnd )
+{
+ // koennte noch optimiert werden!
+ aStartPaM = rStart;
+ aEndPaM = rEnd;
+}
+
+EditSelection& EditSelection::operator = ( const EditPaM& rPaM )
+{
+ aStartPaM = rPaM;
+ aEndPaM = rPaM;
+ return *this;
+}
+
+BOOL EditSelection::IsInvalid()
+{
+ EditPaM aEmptyPaM;
+
+ if ( aStartPaM == aEmptyPaM )
+ return TRUE;
+
+ if ( aEndPaM == aEmptyPaM )
+ return TRUE;
+
+ return FALSE;
+}
+
+BOOL EditSelection::Adjust( const ContentList& rNodes )
+{
+ DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index im Wald in Adjust(1)" )
+ DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index im Wald in Adjust(2)" )
+
+ ContentNode* pStartNode = aStartPaM.GetNode();
+ ContentNode* pEndNode = aEndPaM.GetNode();
+
+ USHORT nStartNode = rNodes.GetPos( pStartNode );
+ USHORT nEndNode = rNodes.GetPos( pEndNode );
+
+ DBG_ASSERT( nStartNode != USHRT_MAX, "Node im Wald in Adjust(1)" )
+ DBG_ASSERT( nEndNode != USHRT_MAX, "Node im Wald in Adjust(2)" )
+
+ BOOL bSwap = FALSE;
+ if ( nStartNode > nEndNode )
+ bSwap = TRUE;
+ else if ( ( nStartNode == nEndNode ) && ( aStartPaM.GetIndex() > aEndPaM.GetIndex() ) )
+ bSwap = TRUE;
+
+ if ( bSwap )
+ {
+ EditPaM aTmpPaM( aStartPaM );
+ aStartPaM = aEndPaM;
+ aEndPaM = aTmpPaM;
+ }
+
+ return bSwap;
+}
+
+
+ // -------------------------------------------------------------------------
+// class EditPaM
+// -------------------------------------------------------------------------
+BOOL operator == ( const EditPaM& r1, const EditPaM& r2 )
+{
+ if ( r1.GetNode() != r2.GetNode() )
+ return FALSE;
+
+ if ( r1.GetIndex() != r2.GetIndex() )
+ return FALSE;
+
+ return TRUE;
+}
+
+EditPaM& EditPaM::operator = ( const EditPaM& rPaM )
+{
+ nIndex = rPaM.nIndex;
+ pNode = rPaM.pNode;
+ return *this;
+}
+
+BOOL operator != ( const EditPaM& r1, const EditPaM& r2 )
+{
+ return !( r1 == r2 );
+}
+
+
+ // -------------------------------------------------------------------------
+// class ContentNode
+// -------------------------------------------------------------------------
+ContentNode::ContentNode( SfxItemPool& rPool ) : aContentAttribs( rPool )
+{
+ DBG_CTOR( EE_ContentNode, 0 );
+ pWrongList = NULL;
+}
+
+ContentNode::ContentNode( const XubString& rStr, const ContentAttribs& rContentAttribs ) :
+ XubString( rStr ), aContentAttribs( rContentAttribs )
+{
+ DBG_CTOR( EE_ContentNode, 0 );
+ pWrongList = NULL;
+}
+
+ContentNode::~ContentNode()
+{
+ DBG_DTOR( EE_ContentNode, 0 );
+#ifndef SVX_LIGHT
+ delete pWrongList;
+#endif
+}
+
+void ContentNode::ExpandAttribs( USHORT nIndex, USHORT nNew, SfxItemPool& rItemPool )
+{
+ if ( !nNew )
+ return;
+
+ // Da Features anders behandelt werden als normale Zeichenattribute,
+ // kann sich hier auch die Sortierung der Start-Liste aendern!
+ // In jedem if..., in dem weiter (n) Moeglichkeiten aufgrund von
+ // bFeature oder Spezialfall existieren,
+ // muessen (n-1) Moeglichkeiten mit bResort versehen werden.
+ // Die wahrscheinlichste Moeglichkeit erhaelt kein bResort,
+ // so dass nicht neu sortiert wird, wenn sich alle Attribute
+ // gleich verhalten.
+ BOOL bResort = FALSE;
+
+ USHORT nAttr = 0;
+ EditCharAttrib* pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
+ while ( pAttrib )
+ {
+ if ( pAttrib->GetEnd() >= nIndex )
+ {
+ // Alle Attribute hinter der Einfuegeposition verschieben...
+ if ( pAttrib->GetStart() > nIndex )
+ {
+ pAttrib->MoveForward( nNew );
+ }
+ // 0: Leeres Attribut expandieren, wenn an Einfuegestelle
+ else if ( pAttrib->IsEmpty() )
+ {
+ // Index nicht pruefen, leeres durfte nur dort liegen.
+ // Wenn spaeter doch Ueberpruefung:
+ // Spezialfall: Start == 0; AbsLen == 1, nNew = 1 => Expand, weil durch Absatzumbruch!
+ // Start <= nIndex, End >= nIndex => Start=End=nIndex!
+// if ( pAttrib->GetStart() == nIndex )
+ pAttrib->Expand( nNew );
+ }
+ // 1: Attribut startet davor, geht bis Index...
+ else if ( pAttrib->GetEnd() == nIndex ) // Start muss davor liegen
+ {
+ // Nur expandieren, wenn kein Feature,
+ // und wenn nicht in ExcludeListe!
+ // Sonst geht z.B. ein UL bis zum neuen ULDB, beide expandieren
+// if ( !pAttrib->IsFeature() && !rExclList.FindAttrib( pAttrib->Which() ) )
+ if ( !pAttrib->IsFeature() && !aCharAttribList.FindEmptyAttrib( pAttrib->Which(), nIndex ) )
+ {
+ if ( !pAttrib->IsEdge() )
+ pAttrib->Expand( nNew );
+ }
+ else
+ bResort = TRUE;
+ }
+ // 2: Attribut startet davor, geht hinter Index...
+ else if ( ( pAttrib->GetStart() < nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
+ {
+ DBG_ASSERT( !pAttrib->IsFeature(), "Grosses Feature?!" );
+ pAttrib->Expand( nNew );
+ }
+ // 3: Attribut startet auf Index...
+ else if ( pAttrib->GetStart() == nIndex )
+ {
+ if ( pAttrib->IsFeature() )
+ {
+ pAttrib->MoveForward( nNew );
+ bResort = TRUE;
+ }
+ else
+ {
+ if ( nIndex == 0 )
+ {
+ pAttrib->Expand( nNew );
+ bResort = TRUE;
+ }
+ else
+ pAttrib->MoveForward( nNew );
+ }
+ }
+ }
+
+ if ( pAttrib->IsEdge() )
+ pAttrib->SetEdge( FALSE );
+
+ DBG_ASSERT( !pAttrib->IsFeature() || ( pAttrib->GetLen() == 1 ), "Expand: FeaturesLen != 1" );
+
+ DBG_ASSERT( pAttrib->GetStart() <= pAttrib->GetEnd(), "Expand: Attribut verdreht!" );
+ DBG_ASSERT( ( pAttrib->GetEnd() <= Len() ), "Expand: Attrib groesser als Absatz!" );
+ if ( pAttrib->IsEmpty() )
+ {
+ DBG_ERROR( "Leeres Attribut nach ExpandAttribs?" );
+ bResort = TRUE;
+ aCharAttribList.GetAttribs().Remove( nAttr );
+ rItemPool.Remove( *pAttrib->GetItem() );
+ delete pAttrib;
+ nAttr--;
+ }
+ nAttr++;
+ pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
+ }
+
+ if ( bResort )
+ aCharAttribList.ResortAttribs();
+
+#ifndef SVX_LIGHT
+ if ( pWrongList )
+ {
+ BOOL bSep = ( GetChar( nIndex ) == ' ' ) || IsFeature( nIndex );
+ pWrongList->TextInserted( nIndex, nNew, bSep );
+ }
+#endif // !SVX_LIGHT
+
+#ifdef EDITDEBUG
+ DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), TRUE ), "Expand: Start-Liste verdreht" );
+#endif
+}
+
+void ContentNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted, SfxItemPool& rItemPool )
+{
+ if ( !nDeleted )
+ return;
+
+ // Da Features anders behandelt werden als normale Zeichenattribute,
+ // kann sich hier auch die Sortierung der Start-Liste aendern!
+ BOOL bResort = FALSE;
+ BOOL bDelAttr = FALSE;
+ USHORT nEndChanges = nIndex+nDeleted;
+
+ USHORT nAttr = 0;
+ EditCharAttrib* pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
+ while ( pAttrib )
+ {
+ bDelAttr = FALSE;
+ if ( pAttrib->GetEnd() >= nIndex )
+ {
+ // Alles Attribute hinter der Einfuegeposition verschieben...
+ if ( pAttrib->GetStart() >= nEndChanges )
+ {
+ pAttrib->MoveBackward( nDeleted );
+ }
+ // 1. Innenliegende Attribute loeschen...
+ else if ( ( pAttrib->GetStart() >= nIndex ) && ( pAttrib->GetEnd() <= nEndChanges ) )
+ {
+ // Spezialfall: Attrubt deckt genau den Bereich ab
+ // => als leeres Attribut behalten.
+ if ( !pAttrib->IsFeature() && ( pAttrib->GetStart() == nIndex ) && ( pAttrib->GetEnd() == nEndChanges ) )
+ pAttrib->GetEnd() = nIndex; // leer
+ else
+ bDelAttr = TRUE;
+ }
+ // 2. Attribut beginnt davor, endet drinnen oder dahinter...
+ else if ( ( pAttrib->GetStart() <= nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
+ {
+ DBG_ASSERT( !pAttrib->IsFeature(), "Collapsing Feature!" );
+ if ( pAttrib->GetEnd() <= nEndChanges ) // endet drinnen
+ pAttrib->GetEnd() = nIndex;
+ else
+ pAttrib->Collaps( nDeleted ); // endet dahinter
+ }
+ // 3. Attribut beginnt drinnen, endet dahinter...
+ else if ( ( pAttrib->GetStart() >= nIndex ) && ( pAttrib->GetEnd() > nEndChanges ) )
+ {
+ // Features duerfen nicht expandieren!
+ if ( pAttrib->IsFeature() )
+ {
+ pAttrib->MoveBackward( nDeleted );
+ bResort = TRUE;
+ }
+ else
+ {
+ pAttrib->GetStart() = nEndChanges;
+ pAttrib->MoveBackward( nDeleted );
+ }
+ }
+ }
+ DBG_ASSERT( !pAttrib->IsFeature() || ( pAttrib->GetLen() == 1 ), "Expand: FeaturesLen != 1" );
+
+ DBG_ASSERT( pAttrib->GetStart() <= pAttrib->GetEnd(), "Collaps: Attribut verdreht!" );
+ DBG_ASSERT( ( pAttrib->GetEnd() <= Len()) || bDelAttr, "Collaps: Attrib groesser als Absatz!" );
+ if ( bDelAttr /* || pAttrib->IsEmpty() */ )
+ {
+ bResort = TRUE;
+ aCharAttribList.GetAttribs().Remove( nAttr );
+ rItemPool.Remove( *pAttrib->GetItem() );
+ delete pAttrib;
+ nAttr--;
+ }
+ else if ( pAttrib->IsEmpty() )
+ aCharAttribList.HasEmptyAttribs() = TRUE;
+
+ nAttr++;
+ pAttrib = GetAttrib( aCharAttribList.GetAttribs(), nAttr );
+ }
+
+ if ( bResort )
+ aCharAttribList.ResortAttribs();
+
+#ifndef SVX_LIGHT
+ if ( pWrongList )
+ pWrongList->TextDeleted( nIndex, nDeleted );
+#endif // !SVX_LIGHT
+
+#ifdef EDITDEBUG
+ DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), TRUE ), "Collaps: Start-Liste verdreht" );
+#endif
+}
+
+void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, BOOL bKeepEndingAttribs )
+{
+ DBG_ASSERT( pPrevNode, "kopieren von Attributen auf einen NULL-Pointer ?" );
+
+ xub_StrLen nCut = pPrevNode->Len();
+
+ USHORT nAttr = 0;
+ EditCharAttrib* pAttrib = GetAttrib( pPrevNode->GetCharAttribs().GetAttribs(), nAttr );
+ while ( pAttrib )
+ {
+ if ( pAttrib->GetEnd() < nCut )
+ {
+ // bleiben unveraendert....
+ ;
+ }
+ else if ( pAttrib->GetEnd() == nCut )
+ {
+ // muessen als leeres Attribut kopiert werden.
+ if ( bKeepEndingAttribs && !pAttrib->IsFeature() && !aCharAttribList.FindAttrib( pAttrib->GetItem()->Which(), 0 ) )
+ {
+ EditCharAttrib* pNewAttrib = MakeCharAttrib( rPool, *(pAttrib->GetItem()), 0, 0 );
+ DBG_ASSERT( pNewAttrib, "MakeCharAttrib fehlgeschlagen!" );
+ aCharAttribList.InsertAttrib( pNewAttrib );
+ }
+ }
+ else if ( pAttrib->IsInside( nCut ) || ( !nCut && !pAttrib->GetStart() && !pAttrib->IsFeature() ) )
+ {
+ // Wenn ganz vorne gecuttet wird, muss das Attribut erhalten bleiben!
+ // muessen kopiert und geaendert werden
+ EditCharAttrib* pNewAttrib = MakeCharAttrib( rPool, *(pAttrib->GetItem()), 0, pAttrib->GetEnd()-nCut );
+ DBG_ASSERT( pNewAttrib, "MakeCharAttrib fehlgeschlagen!" );
+ aCharAttribList.InsertAttrib( pNewAttrib );
+ // stutzen:
+ pAttrib->GetEnd() = nCut;
+ }
+ else
+ {
+ // alle dahinter verschieben in den neuen Node (this)
+// pPrevNode->GetCharAttribs().RemoveAttrib( pAttrib );
+ pPrevNode->GetCharAttribs().GetAttribs().Remove( nAttr );
+ aCharAttribList.InsertAttrib( pAttrib );
+ DBG_ASSERT( pAttrib->GetStart() >= nCut, "Start < nCut!" );
+ DBG_ASSERT( pAttrib->GetEnd() >= nCut, "End < nCut!" );
+ pAttrib->GetStart() -= nCut;
+ pAttrib->GetEnd() -= nCut;
+ nAttr--;
+ }
+ nAttr++;
+ pAttrib = GetAttrib( pPrevNode->GetCharAttribs().GetAttribs(), nAttr );
+ }
+}
+
+void ContentNode::AppendAttribs( ContentNode* pNextNode )
+{
+ DBG_ASSERT( pNextNode, "kopieren von Attributen von einen NULL-Pointer ?" );
+
+ USHORT nNewStart = Len();
+
+#ifdef EDITDEBUG
+ DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute VOR AppendAttribs kaputt" );
+#endif
+
+ USHORT nAttr = 0;
+ EditCharAttrib* pAttrib = GetAttrib( pNextNode->GetCharAttribs().GetAttribs(), nAttr );
+ while ( pAttrib )
+ {
+ // alle Attribute verschieben in den aktuellen Node (this)
+ BOOL bMelted = FALSE;
+ if ( ( pAttrib->GetStart() == 0 ) && ( !pAttrib->IsFeature() ) )
+ {
+ // Evtl koennen Attribute zusammengefasst werden:
+ USHORT nTmpAttr = 0;
+ EditCharAttrib* pTmpAttrib = GetAttrib( aCharAttribList.GetAttribs(), nTmpAttr );
+ while ( !bMelted && pTmpAttrib )
+ {
+ if ( pTmpAttrib->GetEnd() == nNewStart )
+ {
+ if ( ( pTmpAttrib->Which() == pAttrib->Which() ) &&
+ ( *(pTmpAttrib->GetItem()) == *(pAttrib->GetItem() ) ) )
+ {
+ pTmpAttrib->GetEnd() += pAttrib->GetLen();
+ pNextNode->GetCharAttribs().GetAttribs().Remove( nAttr );
+ // Vom Pool abmelden ?!
+ delete pAttrib;
+ bMelted = TRUE;
+ }
+ }
+ ++nTmpAttr;
+ pTmpAttrib = GetAttrib( aCharAttribList.GetAttribs(), nTmpAttr );
+ }
+ }
+
+ if ( !bMelted )
+ {
+ pAttrib->GetStart() += nNewStart;
+ pAttrib->GetEnd() += nNewStart;
+ aCharAttribList.InsertAttrib( pAttrib );
+ ++nAttr;
+ }
+ pAttrib = GetAttrib( pNextNode->GetCharAttribs().GetAttribs(), nAttr );
+ }
+ // Fuer die Attribute, die nur ruebergewandert sind:
+ pNextNode->GetCharAttribs().Clear();
+
+#ifdef EDITDEBUG
+ DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute NACH AppendAttribs kaputt" );
+#endif
+}
+
+void ContentNode::CreateDefFont()
+{
+ // Erst alle Informationen aus dem Style verwenden...
+ SfxStyleSheet* pS = aContentAttribs.GetStyleSheet();
+ if ( pS )
+ CreateFont( GetCharAttribs().GetDefFont(), pS->GetItemSet() );
+
+ // ... dann die harte Absatzformatierung rueberbuegeln...
+ CreateFont( GetCharAttribs().GetDefFont(),
+ GetContentAttribs().GetItems(), ( pS ? FALSE : TRUE ) );
+}
+
+void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle )
+{
+ aContentAttribs.SetStyleSheet( pS );
+
+ // Erst alle Informationen aus dem Style verwenden...
+ GetCharAttribs().GetDefFont() = rFontFromStyle;
+ // ... dann die harte Absatzformatierung rueberbuegeln...
+ CreateFont( GetCharAttribs().GetDefFont(),
+ GetContentAttribs().GetItems(), ( pS ? FALSE : TRUE ) );
+}
+
+void ContentNode::SetStyleSheet( SfxStyleSheet* pS, BOOL bRecalcFont )
+{
+ aContentAttribs.SetStyleSheet( pS );
+ if ( bRecalcFont )
+ CreateDefFont();
+}
+
+
+ // -------------------------------------------------------------------------
+// class ContentAttribs
+// -------------------------------------------------------------------------
+ContentAttribs::ContentAttribs( SfxItemPool& rPool ) :
+ aAttribSet( rPool, EE_PARA_START, EE_CHAR_END )
+{
+ pStyle = 0;
+}
+
+ContentAttribs::ContentAttribs( const ContentAttribs& rRef ) :
+ aAttribSet( rRef.aAttribSet )
+{
+ pStyle = rRef.pStyle;
+}
+
+ContentAttribs::~ContentAttribs()
+{
+}
+
+SvxTabStop ContentAttribs::FindTabStop( long nCurPos, USHORT nDefTab )
+{
+ const SvxTabStopItem& rTabs = (const SvxTabStopItem&) GetItem( EE_PARA_TABS );
+ for ( USHORT i = 0; i < rTabs.Count(); i++ )
+ {
+ const SvxTabStop& rTab = rTabs[i];
+ if ( rTab.GetTabPos() > nCurPos )
+ return rTab;
+ }
+
+ // DefTab ermitteln...
+ SvxTabStop aTabStop;
+ long x = nCurPos / nDefTab + 1;
+ aTabStop.GetTabPos() = nDefTab * x;
+ return aTabStop;
+}
+
+void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS )
+{
+ pStyle = pS;
+ if ( pStyle )
+ {
+ // Gezielt die Attribute aus der Absatzformatierung entfernen, die im Style
+ // spezifiziert sind, damit die Attribute des Styles wirken koennen.
+ const SfxItemSet& rStyleAttribs = pStyle->GetItemSet();
+ for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
+ {
+ if ( rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON )
+ aAttribSet.ClearItem( nWhich );
+ }
+ }
+}
+
+ // ----------------------------------------------------------------------
+// class ItemList
+// ----------------------------------------------------------------------
+const SfxPoolItem* ItemList::FindAttrib( USHORT nWhich )
+{
+ const SfxPoolItem* pItem = First();
+ while ( pItem && ( pItem->Which() != nWhich ) )
+ pItem = Next();
+
+ return pItem;
+}
+
+ // -------------------------------------------------------------------------
+// class EditDoc
+// -------------------------------------------------------------------------
+EditDoc::EditDoc( SfxItemPool* pPool )
+{
+ if ( pPool )
+ {
+ pItemPool = pPool;
+ bOwnerOfPool = FALSE;
+ }
+ else
+ {
+ pItemPool = new EditEngineItemPool( FALSE );
+ bOwnerOfPool = TRUE;
+ }
+
+ nDefTab = DEFTAB;
+
+ // Don't create a empty node, Clear() will be called in EditEngine-CTOR
+
+ bModified = FALSE;
+};
+
+EditDoc::~EditDoc()
+{
+ DestroyContents();
+ if ( bOwnerOfPool )
+ delete pItemPool;
+}
+
+void EditDoc::DestroyContents()
+{
+ for ( USHORT nNode = Count(); nNode; )
+ RemoveItemsFromPool( GetObject( --nNode ) );
+ DeleteAndDestroy( 0, Count() );
+}
+
+void EditDoc::RemoveItemsFromPool( ContentNode* pNode )
+{
+ for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ )
+ {
+ EditCharAttrib* pAttr = pNode->GetCharAttribs().GetAttribs()[nAttr];
+ GetItemPool().Remove( *pAttr->GetItem() );
+ }
+}
+
+void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, BOOL bSearchInParent )
+{
+ Font aPrevFont( rFont );
+ rFont.SetAlign( ALIGN_BASELINE );
+ rFont.SetTransparent( TRUE );
+
+ if ( bSearchInParent )
+ {
+ rFont.SetColor( ((const SvxColorItem&)rSet.Get( EE_CHAR_COLOR )).GetValue() );
+ rFont.SetName( ((const SvxFontItem&)rSet.Get( EE_CHAR_FONTINFO )).GetFamilyName() );
+ rFont.SetFamily( ((const SvxFontItem&)rSet.Get( EE_CHAR_FONTINFO )).GetFamily() );
+ rFont.SetPitch( ((const SvxFontItem&)rSet.Get( EE_CHAR_FONTINFO )).GetPitch() );
+ rFont.SetCharSet( ((const SvxFontItem&)rSet.Get( EE_CHAR_FONTINFO )).GetCharSet() );
+ rFont.SetSize( Size( ((const SvxFontWidthItem&)rSet.Get( EE_CHAR_FONTWIDTH )).GetWidth(), ((const SvxFontHeightItem&)rSet.Get( EE_CHAR_FONTHEIGHT )).GetHeight() ) );
+ rFont.SetWeight( ((const SvxWeightItem&)rSet.Get( EE_CHAR_WEIGHT )).GetWeight() );
+ rFont.SetUnderline( ((const SvxUnderlineItem&)rSet.Get( EE_CHAR_UNDERLINE )).GetUnderline() );
+ rFont.SetStrikeout( ((const SvxCrossedOutItem&)rSet.Get( EE_CHAR_STRIKEOUT )).GetStrikeout() );
+ rFont.SetItalic( ((const SvxPostureItem&)rSet.Get( EE_CHAR_ITALIC )).GetPosture() );
+ rFont.SetOutline( ((const SvxContourItem&)rSet.Get( EE_CHAR_OUTLINE )).GetValue() );
+ rFont.SetShadow( ((const SvxShadowedItem&)rSet.Get( EE_CHAR_SHADOW )).GetValue() );
+ rFont.SetEscapement( ((const SvxEscapementItem&)rSet.Get( EE_CHAR_ESCAPEMENT)).GetEsc() );
+ rFont.SetPropr( ((const SvxEscapementItem&)rSet.Get( EE_CHAR_ESCAPEMENT)).GetProp() );
+ rFont.SetKerning( ((const SvxAutoKernItem&)rSet.Get( EE_CHAR_PAIRKERNING )).GetValue() );
+ rFont.SetFixKerning( ((const SvxKerningItem&)rSet.Get( EE_CHAR_KERNING )).GetValue() );
+ rFont.SetWordLineMode( ((const SvxWordLineModeItem&)rSet.Get( EE_CHAR_WLM )).GetValue() );
+ }
+ else
+ {
+ if ( rSet.GetItemState( EE_CHAR_COLOR ) == SFX_ITEM_ON )
+ rFont.SetColor( ((const SvxColorItem&)rSet.Get( EE_CHAR_COLOR )).GetValue() );
+ if ( rSet.GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_ON )
+ {
+ rFont.SetName( ((const SvxFontItem&)rSet.Get( EE_CHAR_FONTINFO )).GetFamilyName() );
+ rFont.SetFamily( ((const SvxFontItem&)rSet.Get( EE_CHAR_FONTINFO )).GetFamily() );
+ rFont.SetPitch( ((const SvxFontItem&)rSet.Get( EE_CHAR_FONTINFO )).GetPitch() );
+ rFont.SetCharSet( ((const SvxFontItem&)rSet.Get( EE_CHAR_FONTINFO )).GetCharSet() );
+ }
+ if ( rSet.GetItemState( EE_CHAR_FONTHEIGHT ) == SFX_ITEM_ON )
+ rFont.SetSize( Size( rFont.GetSize().Width(), ((const SvxFontHeightItem&)rSet.Get( EE_CHAR_FONTHEIGHT )).GetHeight() ) );
+ if ( rSet.GetItemState( EE_CHAR_FONTWIDTH ) == SFX_ITEM_ON )
+ rFont.SetSize( Size( ((const SvxFontWidthItem&)rSet.Get( EE_CHAR_FONTWIDTH )).GetWidth(), rFont.GetSize().Height() ) );
+ if ( rSet.GetItemState( EE_CHAR_WEIGHT ) == SFX_ITEM_ON )
+ rFont.SetWeight( ((const SvxWeightItem&)rSet.Get( EE_CHAR_WEIGHT )).GetWeight() );
+ if ( rSet.GetItemState( EE_CHAR_UNDERLINE ) == SFX_ITEM_ON )
+ rFont.SetUnderline( ((const SvxUnderlineItem&)rSet.Get( EE_CHAR_UNDERLINE )).GetUnderline() );
+ if ( rSet.GetItemState( EE_CHAR_STRIKEOUT ) == SFX_ITEM_ON )
+ rFont.SetStrikeout( ((const SvxCrossedOutItem&)rSet.Get( EE_CHAR_STRIKEOUT )).GetStrikeout() );
+ if ( rSet.GetItemState( EE_CHAR_ITALIC ) == SFX_ITEM_ON )
+ rFont.SetItalic( ((const SvxPostureItem&)rSet.Get( EE_CHAR_ITALIC )).GetPosture() );
+ if ( rSet.GetItemState( EE_CHAR_OUTLINE ) == SFX_ITEM_ON )
+ rFont.SetOutline( ((const SvxContourItem&)rSet.Get( EE_CHAR_OUTLINE )).GetValue() );
+ if ( rSet.GetItemState( EE_CHAR_SHADOW ) == SFX_ITEM_ON )
+ rFont.SetShadow( ((const SvxShadowedItem&)rSet.Get( EE_CHAR_SHADOW )).GetValue() );
+ if ( rSet.GetItemState( EE_CHAR_ESCAPEMENT ) == SFX_ITEM_ON )
+ {
+ rFont.SetEscapement( ((const SvxEscapementItem&)rSet.Get( EE_CHAR_ESCAPEMENT)).GetEsc() );
+ rFont.SetPropr( ((const SvxEscapementItem&)rSet.Get( EE_CHAR_ESCAPEMENT)).GetProp() );
+ }
+ if ( rSet.GetItemState( EE_CHAR_PAIRKERNING ) == SFX_ITEM_ON )
+ rFont.SetKerning( ((const SvxAutoKernItem&)rSet.Get( EE_CHAR_PAIRKERNING )).GetValue() );
+ if ( rSet.GetItemState( EE_CHAR_KERNING ) == SFX_ITEM_ON )
+ rFont.SetFixKerning( ((const SvxKerningItem&)rSet.Get( EE_CHAR_KERNING )).GetValue() );
+ if ( rSet.GetItemState( EE_CHAR_WLM ) == SFX_ITEM_ON )
+ rFont.SetWordLineMode( ((const SvxWordLineModeItem&)rSet.Get( EE_CHAR_WLM )).GetValue() );
+ }
+ // Ob ich jetzt den ganzen Font vergleiche, oder vor jeder Aenderung
+ // pruefe, ob der Wert sich aendert, bleibt sich relativ gleich.
+ // So ggf ein MakeUniqFont im Font mehr, dafuer bei Aenderung schnellerer
+ // Abbruch der Abfrage, oder ich musste noch jedesmal ein bChanged pflegen.
+ if ( rFont == aPrevFont )
+ rFont = aPrevFont; // => Gleicher ImpPointer fuer IsSameInstance
+}
+
+void EditDoc::CreateDefFont( BOOL bUseStyles )
+{
+ SfxItemSet aTmpSet( GetItemPool(), EE_PARA_START, EE_CHAR_END );
+ CreateFont( aDefFont, aTmpSet );
+
+ for ( USHORT nNode = 0; nNode < Count(); nNode++ )
+ {
+ ContentNode* pNode = GetObject( nNode );
+ // Nur wenn keine Absatzattribute gesetzt sind:
+ if ( !bUseStyles )
+ pNode->GetCharAttribs().GetDefFont() = aDefFont;
+ else
+ pNode->CreateDefFont();
+ }
+}
+
+static const sal_Unicode aCR[] = { 0x0d, 0x00 };
+static const sal_Unicode aLF[] = { 0x0a, 0x00 };
+static const sal_Unicode aCRLF[] = { 0x0d, 0x0a, 0x00 };
+
+XubString EditDoc::GetSepStr( LineEnd eEnd )
+{
+ XubString aSep;
+ if ( eEnd == LINEEND_CR )
+ aSep = aCR;
+ else if ( eEnd == LINEEND_LF )
+ aSep = aLF;
+ else
+ aSep = aCRLF;
+ return aSep;
+}
+
+XubString EditDoc::GetText( LineEnd eEnd ) const
+{
+ ULONG nLen = GetTextLen();
+ USHORT nNodes = Count();
+
+ String aSep = EditDoc::GetSepStr( eEnd );
+ USHORT nSepSize = aSep.Len();
+
+ if ( nSepSize )
+ nLen += nNodes * nSepSize;
+ if ( nLen > 0xFFFb / sizeof(xub_Unicode) )
+ {
+ DBG_ERROR( "Text zu gross fuer String" );
+ return XubString();
+ }
+ xub_Unicode* pStr = new xub_Unicode[nLen+1];
+ xub_Unicode* pCur = pStr;
+ USHORT nLastNode = nNodes-1;
+ for ( USHORT nNode = 0; nNode < nNodes; nNode++ )
+ {
+ XubString aTmp( GetParaAsString( nNode ) );
+ memcpy( pCur, aTmp.GetBuffer(), aTmp.Len()*sizeof(sal_Unicode) );
+ pCur += aTmp.Len();
+ if ( nSepSize && ( nNode != nLastNode ) )
+ {
+ memcpy( pCur, aSep.GetBuffer(), nSepSize*sizeof(sal_Unicode ) );
+ pCur += nSepSize;
+ }
+ }
+ *pCur = '\0';
+ XubString aASCIIText( pStr );
+ delete pStr;
+ return aASCIIText;
+}
+
+XubString EditDoc::GetParaAsString( USHORT nNode ) const
+{
+ ContentNode* pNode = GetObject( nNode );
+ DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAsString" );
+ return GetParaAsString( pNode, 0, pNode->Len() );
+}
+
+XubString EditDoc::GetParaAsString( ContentNode* pNode ) const
+{
+ return GetParaAsString( pNode, 0, pNode->Len() );
+}
+
+XubString EditDoc::GetParaAsString( USHORT nNode, USHORT nStartPos, USHORT nEndPos ) const
+{
+ ContentNode* pNode = SaveGetObject( nNode );
+ DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAsString( nNode )" );
+ return GetParaAsString( pNode, nStartPos, nEndPos );
+}
+
+XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos ) const
+{
+ DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAsString" );
+ DBG_ASSERT( nStartPos <= nEndPos, "Start und Ende vertauscht?" );
+ DBG_ASSERT( nEndPos <= pNode->Len(), "Ende existiert nicht!" );
+
+ USHORT nIndex = nStartPos;
+ XubString aStr;
+ EditCharAttrib* pNextFeature = pNode->GetCharAttribs().FindFeature( nIndex );
+ while ( nIndex < nEndPos )
+ {
+ USHORT nEnd = nEndPos;
+ if ( pNextFeature && ( pNextFeature->GetStart() < nEnd ) )
+ nEnd = pNextFeature->GetStart();
+ else
+ pNextFeature = 0; // Feature interessiert unten nicht
+
+
+ DBG_ASSERT( nEnd >= nIndex, "Ende vorm Index?" );
+ aStr += XubString( *pNode, nIndex, nEnd-nIndex );
+
+ if ( pNextFeature )
+ {
+ switch ( pNextFeature->GetItem()->Which() )
+ {
+ case EE_FEATURE_TAB: aStr += '\t';
+ break;
+ case EE_FEATURE_LINEBR: aStr += '\x0A';
+ break;
+ case EE_FEATURE_FIELD: aStr += ((EditCharAttribField*)pNextFeature)->GetFieldValue();
+ break;
+ default: DBG_ERROR( "Was fuer ein Feature ?" );
+ }
+ pNextFeature = pNode->GetCharAttribs().FindFeature( ++nEnd );
+ }
+ nIndex = nEnd;
+ }
+ return aStr;
+}
+
+ULONG EditDoc::GetTextLen() const
+{
+ ULONG nLen = 0;
+ for ( USHORT nNode = 0; nNode < Count(); nNode++ )
+ {
+ ContentNode* pNode = GetObject( nNode );
+ nLen += pNode->Len();
+ // Felder k”nnen laenger sein als der Platzhalter im Node.
+ const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs();
+ for ( USHORT nAttr = rAttrs.Count(); nAttr; )
+ {
+ EditCharAttrib* pAttr = rAttrs[--nAttr];
+ if ( pAttr->Which() == EE_FEATURE_FIELD )
+ {
+ USHORT nFieldLen = ((EditCharAttribField*)pAttr)->GetFieldValue().Len();
+ if ( !nFieldLen )
+ nLen--;
+ else
+ nLen += nFieldLen-1;
+ }
+ }
+ }
+ return nLen;
+}
+
+EditPaM EditDoc::Clear()
+{
+ DestroyContents();
+
+ ContentNode* pNode = new ContentNode( GetItemPool() );
+ Insert( pNode, 0 );
+
+ CreateDefFont( FALSE );
+
+ bModified = FALSE;
+
+ EditPaM aPaM( pNode, 0 );
+ return aPaM;
+}
+
+EditPaM EditDoc::RemoveText()
+{
+ // Das alte ItemSetmerken, damit z.B. im Chart Font behalten bleibt
+ ContentNode* pPrevFirstNode = GetObject(0);
+ SfxStyleSheet* pPrevStyle = pPrevFirstNode->GetStyleSheet();
+ SfxItemSet aPrevSet( pPrevFirstNode->GetContentAttribs().GetItems() );
+ Font aPrevFont( pPrevFirstNode->GetCharAttribs().GetDefFont() );
+
+ DestroyContents();
+
+ ContentNode* pNode = new ContentNode( GetItemPool() );
+ Insert( pNode, 0 );
+
+ pNode->SetStyleSheet( pPrevStyle, FALSE );
+ pNode->GetContentAttribs().GetItems().Set( aPrevSet );
+ pNode->GetCharAttribs().GetDefFont() = aPrevFont;
+
+ bModified = TRUE;
+
+ EditPaM aPaM( pNode, 0 );
+ return aPaM;
+}
+
+void EditDoc::InsertText( const EditPaM& rPaM, xub_Unicode c )
+{
+ DBG_ASSERT( c != 0x0A, "EditDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+ DBG_ASSERT( c != 0x0D, "EditDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+ DBG_ASSERT( c != '\t', "EditDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+
+ rPaM.GetNode()->Insert( c, rPaM.GetIndex() );
+ rPaM.GetNode()->ExpandAttribs( rPaM.GetIndex(), 1, GetItemPool() );
+
+ bModified = TRUE;
+}
+
+EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr )
+{
+ DBG_ASSERT( rStr.Search( 0x0A ) == STRING_NOTFOUND, "EditDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+ DBG_ASSERT( rStr.Search( 0x0D ) == STRING_NOTFOUND, "EditDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+ DBG_ASSERT( rStr.Search( '\t' ) == STRING_NOTFOUND, "EditDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+ DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertText1" );
+
+ aPaM.GetNode()->Insert( rStr, aPaM.GetIndex() );
+ aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.Len(), GetItemPool() );
+ aPaM.GetIndex() += rStr.Len();
+
+ bModified = TRUE;
+
+ return aPaM;
+}
+
+EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs )
+{
+ DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertParaBreak" );
+ ContentNode* pCurNode = aPaM.GetNode();
+ USHORT nPos = GetPos( pCurNode );
+ XubString aStr = aPaM.GetNode()->Copy( aPaM.GetIndex() );
+ aPaM.GetNode()->Erase( aPaM.GetIndex() );
+
+ // ContenNode-CTOR kopiert auch die Absatzattribute
+ ContentNode* pNode = new ContentNode( aStr, aPaM.GetNode()->GetContentAttribs());
+ // Den Default-Font kopieren
+ pNode->GetCharAttribs().GetDefFont() = aPaM.GetNode()->GetCharAttribs().GetDefFont();
+ SfxStyleSheet* pStyle = aPaM.GetNode()->GetStyleSheet();
+ if ( pStyle )
+ {
+ XubString aFollow( pStyle->GetFollow() );
+ if ( aFollow.Len() && ( aFollow != pStyle->GetName() ) )
+ {
+ SfxStyleSheetBase* pNext = pStyle->GetPool().Find( aFollow, pStyle->GetFamily() );
+ pNode->SetStyleSheet( (SfxStyleSheet*)pNext );
+ }
+ }
+
+ // Zeichenattribute muessen ggf. kopiert bzw gestutzt werden:
+ pNode->CopyAndCutAttribs( aPaM.GetNode(), GetItemPool(), bKeepEndingAttribs );
+
+ Insert( pNode, nPos+1 );
+
+ bModified = TRUE;
+
+ aPaM.SetNode( pNode );
+ aPaM.SetIndex( 0 );
+ return aPaM;
+}
+
+EditPaM EditDoc::InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem )
+{
+ DBG_ASSERT( aPaM.GetNode(), "Blinder PaM in EditDoc::InsertFeature" );
+
+ aPaM.GetNode()->Insert( CH_FEATURE, aPaM.GetIndex() );
+ aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), 1, GetItemPool() );
+
+ // Fuer das Feature ein Feature-Attribut anlegen...
+ EditCharAttrib* pAttrib = MakeCharAttrib( GetItemPool(), rItem, aPaM.GetIndex(), aPaM.GetIndex()+1 );
+ DBG_ASSERT( pAttrib, "Warum kann ich kein Feature anlegen ?" );
+ aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttrib );
+
+ bModified = TRUE;
+
+ aPaM.GetIndex()++;
+ return aPaM;
+}
+
+EditPaM EditDoc::ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight )
+{
+ const EditPaM aPaM( pLeft, pLeft->Len() );
+
+ // Erst die Attribute, da sonst nLen nicht stimmt!
+ pLeft->AppendAttribs( pRight );
+ // Dann den Text...
+ *pLeft += *pRight;
+
+ // der rechte verschwindet.
+ RemoveItemsFromPool( pRight );
+ USHORT nRight = GetPos( pRight );
+ Remove( nRight );
+ delete pRight;
+
+ bModified = TRUE;
+
+ return aPaM;
+}
+
+EditPaM EditDoc::RemoveChars( EditPaM aPaM, USHORT nChars )
+{
+ // Evtl. Features entfernen!
+ aPaM.GetNode()->Copy( aPaM.GetIndex(), nChars );
+ aPaM.GetNode()->Erase( aPaM.GetIndex(), nChars );
+ aPaM.GetNode()->CollapsAttribs( aPaM.GetIndex(), nChars, GetItemPool() );
+
+ bModified = TRUE;
+
+ return aPaM;
+}
+
+void EditDoc::InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
+{
+ DBG_ASSERT( pNode, "Wohin mit dem Attribut?" );
+ DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" );
+
+ // fuer Optimierung:
+ // dieses endet am Anfang der Selektion => kann erweitert werden
+ EditCharAttrib* pEndingAttrib = 0;
+ // dieses startet am Ende der Selektion => kann erweitert werden
+ EditCharAttrib* pStartingAttrib = 0;
+
+ DBG_ASSERT( nStart <= nEnd, "Kleiner Rechenfehler in InsertAttribInSelection" );
+
+ RemoveAttribs( pNode, nStart, nEnd, pStartingAttrib, pEndingAttrib, rPoolItem.Which() );
+
+ if ( pStartingAttrib && pEndingAttrib &&
+ ( *(pStartingAttrib->GetItem()) == rPoolItem ) &&
+ ( *(pEndingAttrib->GetItem()) == rPoolItem ) )
+ {
+ // wird ein groesses Attribut.
+ pEndingAttrib->GetEnd() = pStartingAttrib->GetEnd();
+ GetItemPool().Remove( *(pStartingAttrib->GetItem()) );
+ pNode->GetCharAttribs().GetAttribs().Remove( pNode->GetCharAttribs().GetAttribs().GetPos( pStartingAttrib ) );
+ delete pStartingAttrib;
+ }
+ else if ( pStartingAttrib && ( *(pStartingAttrib->GetItem()) == rPoolItem ) )
+ pStartingAttrib->GetStart() = nStart;
+ else if ( pEndingAttrib && ( *(pEndingAttrib->GetItem()) == rPoolItem ) )
+ pEndingAttrib->GetEnd() = nEnd;
+ else
+ InsertAttrib( rPoolItem, pNode, nStart, nEnd );
+
+ if ( pStartingAttrib )
+ pNode->GetCharAttribs().ResortAttribs();
+
+ bModified = TRUE;
+}
+
+BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich )
+{
+ EditCharAttrib* pStarting;
+ EditCharAttrib* pEnding;
+ return RemoveAttribs( pNode, nStart, nEnd, pStarting, pEnding, nWhich );
+}
+
+BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, USHORT nWhich )
+{
+ DBG_ASSERT( pNode, "Wohin mit dem Attribut?" );
+ DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" );
+
+ // dieses endet am Anfang der Selektion => kann erweitert werden
+ rpEnding = 0;
+ // dieses startet am Ende der Selektion => kann erweitert werden
+ rpStarting = 0;
+
+ BOOL bChanged = FALSE;
+
+ DBG_ASSERT( nStart <= nEnd, "Kleiner Rechenfehler in InsertAttribInSelection" );
+
+ // ueber die Attribute iterieren...
+ USHORT nAttr = 0;
+ EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ while ( pAttr )
+ {
+ BOOL bRemoveAttrib = FALSE;
+ // MT 11.9.97:
+ // Ich denke dass in dieser Methode generell keine Features geloescht
+ // werden sollen.
+ // => Dann koennen die Feature-Abfragen weiter unten entfallen
+ USHORT nAttrWhich = pAttr->Which();
+ if ( ( nAttrWhich < EE_FEATURE_START ) && ( !nWhich || ( nAttrWhich == nWhich ) ) )
+ {
+ // Attribut beginnt in Selection
+ if ( ( pAttr->GetStart() >= nStart ) && ( pAttr->GetStart() <= nEnd ) )
+ {
+ bChanged = TRUE;
+ if ( pAttr->GetEnd() > nEnd )
+ {
+ pAttr->GetStart() = nEnd; // dann faengt es dahinter an
+ rpStarting = pAttr;
+ break; // es kann kein weiteres Attrib hier liegen
+ }
+ else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) )
+ {
+ // Feature nur loeschen, wenn genau an der Stelle
+ bRemoveAttrib = TRUE;
+ }
+ }
+
+ // Attribut endet in Selection
+ else if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetEnd() <= nEnd ) )
+ {
+ bChanged = TRUE;
+ if ( ( pAttr->GetStart() < nStart ) && !pAttr->IsFeature() )
+ {
+ pAttr->GetEnd() = nStart; // dann hoert es hier auf
+ rpEnding = pAttr;
+ }
+ else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) )
+ {
+ // Feature nur loeschen, wenn genau an der Stelle
+ bRemoveAttrib = TRUE;
+ }
+ }
+ // Attribut ueberlappt die Selektion
+ else if ( ( pAttr->GetStart() <= nStart ) && ( pAttr->GetEnd() >= nEnd ) )
+ {
+ bChanged = TRUE;
+ if ( pAttr->GetStart() == nStart )
+ {
+ pAttr->GetStart() = nEnd;
+ rpStarting = pAttr;
+ break; // es kann weitere Attribute geben!
+ }
+ else if ( pAttr->GetEnd() == nEnd )
+ {
+ pAttr->GetEnd() = nStart;
+ rpEnding = pAttr;
+ break; // es kann weitere Attribute geben!
+ }
+ else // Attribut muss gesplittet werden...
+ {
+ USHORT nOldEnd = pAttr->GetEnd();
+ pAttr->GetEnd() = nStart;
+ rpEnding = pAttr;
+ InsertAttrib( *pAttr->GetItem(), pNode, nEnd, nOldEnd );
+ break; // es kann weitere Attribute geben!
+ }
+ }
+ }
+ if ( bRemoveAttrib )
+ {
+ DBG_ASSERT( ( pAttr != rpStarting ) && ( pAttr != rpEnding ), "Loeschen und behalten des gleichen Attributs ?" );
+ pNode->GetCharAttribs().GetAttribs().Remove(nAttr);
+ GetItemPool().Remove( *pAttr->GetItem() );
+ delete pAttr;
+ nAttr--;
+ }
+ nAttr++;
+ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ }
+
+ if ( bChanged )
+ bModified = TRUE;
+
+ return bChanged;
+}
+
+void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, USHORT nStart, USHORT nEnd )
+{
+ // Diese Methode prueft nicht mehr, ob ein entspr. Attribut
+ // schon an der Stelle existiert!
+
+ EditCharAttrib* pAttrib = MakeCharAttrib( GetItemPool(), rPoolItem, nStart, nEnd );
+ DBG_ASSERT( pAttrib, "MakeCharAttrib fehlgeschlagen!" );
+ pNode->GetCharAttribs().InsertAttrib( pAttrib );
+
+ bModified = TRUE;
+}
+
+void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
+{
+ if ( nStart != nEnd )
+ {
+ InsertAttribInSelection( pNode, nStart, nEnd, rPoolItem );
+ }
+ else
+ {
+ // Pruefen, ob schon ein neues Attribut mit der WhichId an der Stelle:
+ EditCharAttrib* pAttr = pNode->GetCharAttribs().FindEmptyAttrib( rPoolItem.Which(), nStart );
+ if ( pAttr )
+ {
+ // Attribut entfernen....
+ pNode->GetCharAttribs().GetAttribs().Remove(
+ pNode->GetCharAttribs().GetAttribs().GetPos( pAttr ) );
+ }
+
+ // pruefen, ob ein 'gleiches' Attribut an der Stelle liegt.
+ pAttr = pNode->GetCharAttribs().FindAttrib( rPoolItem.Which(), nStart );
+ if ( pAttr )
+ {
+ if ( pAttr->IsInside( nStart ) ) // splitten
+ {
+ // ???????????????????????????????
+ // eigentlich noch pruefen, ob wirklich splittet, oder return !
+ // ???????????????????????????????
+ USHORT nOldEnd = pAttr->GetEnd();
+ pAttr->GetEnd() = nStart;
+ pAttr = MakeCharAttrib( GetItemPool(), *(pAttr->GetItem()), nStart, nOldEnd );
+ pNode->GetCharAttribs().InsertAttrib( pAttr );
+ }
+ else if ( pAttr->GetEnd() == nStart )
+ {
+ DBG_ASSERT( !pAttr->IsEmpty(), "Doch noch ein leeres Attribut?" );
+ // pruefen, ob genau das gleiche Attribut
+ if ( *(pAttr->GetItem()) == rPoolItem )
+ return;
+ }
+ }
+ InsertAttrib( rPoolItem, pNode, nStart, nStart );
+ }
+
+ bModified = TRUE;
+}
+
+void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet )
+{
+ DBG_ASSERT( pNode, "Wo soll ich suchen ?" );
+ DBG_ASSERT( nStartPos <= nEndPos, "Ungueltiger Bereich!" );
+
+ USHORT nAttr = 0;
+ EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ // keine Selection...
+ if ( nStartPos == nEndPos )
+ {
+ while ( pAttr && ( pAttr->GetStart() <= nEndPos) )
+ {
+ const SfxPoolItem* pItem = 0;
+ // Attribut liegt dadrueber...
+ if ( ( pAttr->GetStart() < nStartPos ) && ( pAttr->GetEnd() > nStartPos ) )
+ pItem = pAttr->GetItem();
+ // Attribut endet hier, ist nicht leer
+ else if ( ( pAttr->GetStart() < nStartPos ) && ( pAttr->GetEnd() == nStartPos ) )
+ {
+ if ( !pNode->GetCharAttribs().FindEmptyAttrib( pAttr->GetItem()->Which(), nStartPos ) )
+ pItem = pAttr->GetItem();
+ }
+ // Attribut endet hier, ist leer
+ else if ( ( pAttr->GetStart() == nStartPos ) && ( pAttr->GetEnd() == nStartPos ) )
+ {
+ pItem = pAttr->GetItem();
+ }
+ // Attribut beginnt hier
+ else if ( ( pAttr->GetStart() == nStartPos ) && ( pAttr->GetEnd() > nStartPos ) )
+ {
+ if ( nStartPos == 0 ) // Sonderfall
+ pItem = pAttr->GetItem();
+ }
+
+ if ( pItem )
+ {
+ USHORT nWhich = pItem->Which();
+ if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
+ {
+ rCurSet.Put( *pItem );
+ }
+ else if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_ON )
+ {
+ const SfxPoolItem& rItem = rCurSet.Get( nWhich );
+ if ( rItem != *pItem )
+ {
+ rCurSet.InvalidateItem( nWhich );
+ }
+ }
+ }
+ nAttr++;
+ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ }
+ }
+ else // Selektion
+ {
+ while ( pAttr && ( pAttr->GetStart() < nEndPos) )
+ {
+ const SfxPoolItem* pItem = 0;
+ // Attribut liegt dadrueber...
+ if ( ( pAttr->GetStart() <= nStartPos ) && ( pAttr->GetEnd() >= nEndPos ) )
+ pItem = pAttr->GetItem();
+ // Attribut startet mitten drin...
+ else if ( pAttr->GetStart() >= nStartPos )
+ {
+ // !!! pItem = pAttr->GetItem();
+ // einfach nur pItem reicht nicht, da ich z.B. bei Shadow
+ // niemals ein ungleiches Item finden wuerde, da ein solche
+ // seine Anwesenheit durch Abwesenheit repraesentiert!
+ // if ( ... )
+ // Es muesste geprueft werden, on genau das gleiche Attribut
+ // an der Bruchstelle aufsetzt, was recht aufwendig ist.
+ // Da ich beim Einfuegen von Attributen aber etwas optimiere
+ // tritt der Fall nicht so schnell auf...
+ // Also aus Geschwindigkeitsgruenden:
+ rCurSet.InvalidateItem( pAttr->GetItem()->Which() );
+
+ }
+ // Attribut endet mitten drin...
+ else if ( pAttr->GetEnd() > nStartPos )
+ {
+ // pItem = pAttr->GetItem();
+ // s.o.
+ /*-----------------31.05.95 16:01-------------------
+ Ist falsch, wenn das gleiche Attribut sofort wieder
+ eingestellt wird!
+ => Sollte am besten nicht vorkommen, also gleich beim
+ Setzen von Attributen richtig machen!
+ --------------------------------------------------*/
+ rCurSet.InvalidateItem( pAttr->GetItem()->Which() );
+ }
+
+ if ( pItem )
+ {
+ USHORT nWhich = pItem->Which();
+ if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
+ {
+ rCurSet.Put( *pItem );
+ }
+ else if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_ON )
+ {
+ const SfxPoolItem& rItem = rCurSet.Get( nWhich );
+ if ( rItem != *pItem )
+ {
+ rCurSet.InvalidateItem( nWhich );
+ }
+ }
+ }
+ nAttr++;
+ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ }
+ }
+}
+
+ // -------------------------------------------------------------------------
+// class EditCharAttribList
+// -------------------------------------------------------------------------
+
+CharAttribList::CharAttribList()
+{
+ DBG_CTOR( EE_CharAttribList, 0 );
+ bHasEmptyAttribs = FALSE;
+}
+
+CharAttribList::~CharAttribList()
+{
+ DBG_DTOR( EE_CharAttribList, 0 );
+
+ USHORT nAttr = 0;
+ EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
+ while ( pAttr )
+ {
+ delete pAttr;
+ ++nAttr;
+ pAttr = GetAttrib( aAttribs, nAttr );
+ }
+ Clear();
+}
+
+void CharAttribList::InsertAttrib( EditCharAttrib* pAttrib )
+{
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// optimieren: binaere Suche ? !
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ // MT: 26.11.98
+ // Vielleicht aber auch einfach nur rueckwaerts iterieren:
+ // Der haeufigste und kritischste Fall: Attribute kommen bereits
+ // sortiert an (InsertBinTextObject!)
+ // Hier waere auch binaere Suche nicht optimal.
+ // => Wuerde einiges bringen!
+
+ const USHORT nCount = Count();
+ const USHORT nStart = pAttrib->GetStart(); // vielleicht besser fuer Comp.Opt.
+
+ if ( pAttrib->IsEmpty() )
+ bHasEmptyAttribs = TRUE;
+
+ BOOL bInserted = FALSE;
+ for ( USHORT x = 0; x < nCount; x++ )
+ {
+ EditCharAttribPtr pCurAttrib = aAttribs[x];
+ if ( pCurAttrib->GetStart() > nStart )
+ {
+ aAttribs.Insert( pAttrib, x );
+ bInserted = TRUE;
+ break;
+ }
+ }
+ if ( !bInserted )
+ aAttribs.Insert( pAttrib, nCount );
+}
+
+void CharAttribList::ResortAttribs()
+{
+ if ( Count() )
+ {
+ qsort( (void*)aAttribs.GetData(), aAttribs.Count(), sizeof( EditCharAttrib* ), CompareStart );
+ }
+}
+
+EditCharAttrib* CharAttribList::FindAttrib( USHORT nWhich, USHORT nPos )
+{
+ // Rueckwaerts, falls eins dort endet, das naechste startet.
+ // => Das startende gilt...
+ USHORT nAttr = aAttribs.Count()-1;
+ EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
+ while ( pAttr && ( pAttr->GetEnd() >= nPos ) )
+ {
+ if ( ( pAttr->Which() == nWhich ) && pAttr->IsIn(nPos) )
+ return pAttr;
+ pAttr = GetAttrib( aAttribs, --nAttr );
+ }
+ return 0;
+}
+
+EditCharAttrib* CharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromPos ) const
+{
+ DBG_ASSERT( nWhich, "FindNextAttrib: Which?" );
+ const USHORT nAttribs = aAttribs.Count();
+ for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ {
+ EditCharAttrib* pAttr = aAttribs[ nAttr ];
+ if ( ( pAttr->GetStart() >= nFromPos ) && ( pAttr->Which() == nWhich ) )
+ return pAttr;
+ }
+ return 0;
+}
+
+BOOL CharAttribList::HasAttrib( USHORT nWhich ) const
+{
+ for ( USHORT nAttr = aAttribs.Count(); nAttr; )
+ {
+ const EditCharAttrib* pAttr = aAttribs[--nAttr];
+ if ( pAttr->Which() == nWhich )
+ return TRUE;
+ }
+ return FALSE;
+}
+
+BOOL CharAttribList::HasBoundingAttrib( USHORT nBound )
+{
+ // Rueckwaerts, falls eins dort endet, das naechste startet.
+ // => Das startende gilt...
+ USHORT nAttr = aAttribs.Count()-1;
+ EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
+ while ( pAttr && ( pAttr->GetEnd() >= nBound ) )
+ {
+ if ( ( pAttr->GetStart() == nBound ) || ( pAttr->GetEnd() == nBound ) )
+ return TRUE;
+ pAttr = GetAttrib( aAttribs, --nAttr );
+ }
+ return FALSE;
+}
+
+EditCharAttrib* CharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos )
+{
+ if ( !bHasEmptyAttribs )
+ return 0;
+ USHORT nAttr = 0;
+ EditCharAttrib* pAttr = GetAttrib( aAttribs, nAttr );
+ while ( pAttr && ( pAttr->GetStart() <= nPos ) )
+ {
+ if ( ( pAttr->GetStart() == nPos ) && ( pAttr->GetEnd() == nPos ) && ( pAttr->Which() == nWhich ) )
+ return pAttr;
+ nAttr++;
+ pAttr = GetAttrib( aAttribs, nAttr );
+ }
+ return 0;
+}
+
+EditCharAttrib* CharAttribList::FindFeature( USHORT nPos ) const
+{
+
+ USHORT nAttr = 0;
+ EditCharAttrib* pNextAttrib = GetAttrib( aAttribs, nAttr );
+
+ // erstmal zur gewuenschten Position...
+ while ( pNextAttrib && ( pNextAttrib->GetStart() < nPos ) )
+ {
+ nAttr++;
+ pNextAttrib = GetAttrib( aAttribs, nAttr );
+ }
+
+ // jetzt das Feature suchen...
+ while ( pNextAttrib && !pNextAttrib->IsFeature() )
+ {
+ nAttr++;
+ pNextAttrib = GetAttrib( aAttribs, nAttr );
+ }
+
+ return pNextAttrib;
+}
+
+
+void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool )
+{
+ for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
+ {
+ EditCharAttrib* pAttr = aAttribs[nAttr];
+ if ( pAttr->IsEmpty() )
+ {
+ rItemPool.Remove( *pAttr->GetItem() );
+ aAttribs.Remove( nAttr );
+ delete pAttr;
+ nAttr--;
+ }
+ }
+ bHasEmptyAttribs = FALSE;
+}
+
+BOOL CharAttribList::DbgCheckAttribs()
+{
+#ifdef DBG_UTIL
+ BOOL bOK = TRUE;
+ for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
+ {
+ EditCharAttrib* pAttr = aAttribs[nAttr];
+ if ( pAttr->GetStart() > pAttr->GetEnd() )
+ {
+ bOK = FALSE;
+ DBG_ERROR( "Attr verdreht" );
+ }
+ else if ( pAttr->IsFeature() && ( pAttr->GetLen() != 1 ) )
+ {
+ bOK = FALSE;
+ DBG_ERROR( "Feature, Len != 1" );
+ }
+ }
+ return bOK;
+#else
+ return TRUE;
+#endif
+}
+
+
+
+SvxFontTable::SvxFontTable()
+{
+}
+
+SvxFontTable::~SvxFontTable()
+{
+ SvxFontItem* pItem = First();
+ while( pItem )
+ {
+ delete pItem;
+ pItem = Next();
+ }
+}
+
+ULONG SvxFontTable::GetId( const SvxFontItem& rFontItem )
+{
+ SvxFontItem* pItem = First();
+ while ( pItem )
+ {
+ if ( *pItem == rFontItem )
+ return GetCurKey();
+ pItem = Next();
+ }
+ DBG_WARNING( "Font nicht gefunden: GetId()" );
+ return 0;
+}
+
+SvxColorList::SvxColorList()
+{
+}
+
+SvxColorList::~SvxColorList()
+{
+ SvxColorItem* pItem = First();
+ while( pItem )
+ {
+ delete pItem;
+ pItem = Next();
+ }
+}
+
+ULONG SvxColorList::GetId( const SvxColorItem& rColorItem )
+{
+ SvxColorItem* pItem = First();
+ while ( pItem )
+ {
+ if ( *pItem == rColorItem )
+ return GetCurPos();
+ pItem = Next();
+ }
+ DBG_WARNING( "Color nicht gefunden: GetId()" );
+ return 0;
+}
+
+EditEngineItemPool::EditEngineItemPool( BOOL bPersistenRefCounts )
+ : SfxItemPool( String( "EditEngineItemPool", RTL_TEXTENCODING_ASCII_US ), EE_ITEMS_START, EE_ITEMS_END,
+ aItemInfos, 0, bPersistenRefCounts )
+{
+ // ====================== Version 1 =============================
+ SetVersionMap( 1, 3999, 4015, aV1Map );
+
+ // ====================== Version 2 =============================
+ SetVersionMap( 2, 3999, 4019, aV2Map );
+
+ // ====================== Version 2 =============================
+ SetVersionMap( 3, 3997, 4020, aV3Map );
+
+ // ==============================================================
+
+ DBG_ASSERT( EE_DLL(), "EditDLL?!" );
+ SfxPoolItem** ppDefItems = EE_DLL()->GetGlobalData()->GetDefItems();
+ SetDefaults( ppDefItems );
+}
+
+EditEngineItemPool::~EditEngineItemPool()
+{
+}
+
+SvStream& EditEngineItemPool::Store( SvStream& rStream ) const
+{
+ // Bei einem 3.1-Export muess ein Hack eingebaut werden, da BUG im
+ // SfxItemSet::Load, aber nicht nachtraeglich in 3.1 fixbar.
+
+ // Der eingestellte Range muss nach Store erhalten bleiben, weil dann
+ // erst die ItemSets gespeichert werden...
+
+ long nVersion = rStream.GetVersion();
+ BOOL b31Format = ( nVersion && ( nVersion <= SOFFICE_FILEFORMAT_31 ) )
+ ? TRUE : FALSE;
+
+ EditEngineItemPool* pThis = (EditEngineItemPool*)this;
+ if ( b31Format )
+ pThis->SetStoringRange( 3997, 4022 );
+ else
+ pThis->SetStoringRange( EE_ITEMS_START, EE_ITEMS_END );
+
+ return SfxItemPool::Store( rStream );
+}
diff --git a/svx/source/editeng/editdoc.hxx b/svx/source/editeng/editdoc.hxx
new file mode 100644
index 0000000000..688bd0b02a
--- /dev/null
+++ b/svx/source/editeng/editdoc.hxx
@@ -0,0 +1,764 @@
+/*************************************************************************
+ *
+ * $RCSfile: editdoc.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _EDITDOC_HXX
+#define _EDITDOC_HXX
+
+#include <editattr.hxx>
+#include <edtspell.hxx>
+#include <svxfont.hxx>
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _TOOLS_TABLE_HXX //autogen
+#include <tools/table.hxx>
+#endif
+
+class ImpEditEngine;
+class SvxTabStop;
+
+DBG_NAMEEX( EE_TextPortion );
+
+#define CHARPOSGROW 16
+#define DEFTAB 720
+
+void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, BOOL bSearchInParent = TRUE );
+
+EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, USHORT nS, USHORT nE );
+
+class ContentNode;
+class EditDoc;
+
+struct EPaM
+{
+ USHORT nPara;
+ USHORT nIndex;
+
+ EPaM() { nPara = 0; nIndex = 0; }
+ EPaM( USHORT nP, USHORT nI ) { nPara = nP; nIndex = nI; }
+ EPaM( const EPaM& r) { nPara = r.nPara; nIndex = r.nIndex; }
+ EPaM& operator = ( const EPaM& r ) { nPara = r.nPara; nIndex = r.nIndex; return *this; }
+ inline BOOL operator == ( const EPaM& r ) const;
+ inline BOOL operator < ( const EPaM& r ) const;
+};
+
+inline BOOL EPaM::operator < ( const EPaM& r ) const
+{
+ return ( ( nPara < r.nPara ) ||
+ ( ( nPara == r.nPara ) && nIndex < r.nIndex ) ) ? TRUE : FALSE;
+}
+
+inline BOOL EPaM::operator == ( const EPaM& r ) const
+{
+ return ( ( nPara == r.nPara ) && ( nIndex == r.nIndex ) ) ? TRUE : FALSE;
+}
+
+typedef EditCharAttrib* EditCharAttribPtr;
+SV_DECL_PTRARR( CharAttribArray, EditCharAttribPtr, 0, 4 );
+
+class ContentAttribsInfo
+{
+private:
+ SfxItemSet aPrevParaAttribs;
+ CharAttribArray aPrevCharAttribs;
+
+public:
+ ContentAttribsInfo( const SfxItemSet& rParaAttribs );
+
+ const SfxItemSet& GetPrevParaAttribs() const { return aPrevParaAttribs; }
+ const CharAttribArray& GetPrevCharAttribs() const { return aPrevCharAttribs; }
+
+ CharAttribArray& GetPrevCharAttribs() { return aPrevCharAttribs; }
+};
+
+typedef ContentAttribsInfo* ContentAttribsInfoPtr;
+SV_DECL_PTRARR( ContentInfoArray, ContentAttribsInfoPtr, 1, 1 );
+
+ // ----------------------------------------------------------------------
+// class SvxFontTable
+// ----------------------------------------------------------------------
+DECLARE_TABLE( DummyFontTable, SvxFontItem* );
+class SvxFontTable : public DummyFontTable
+{
+public:
+ SvxFontTable();
+ ~SvxFontTable();
+
+ ULONG GetId( const SvxFontItem& rFont );
+};
+
+ // ----------------------------------------------------------------------
+// class SvxColorList
+// ----------------------------------------------------------------------
+typedef ContentNode* ContentNodePtr;
+DECLARE_LIST( DummyColorList, SvxColorItem* );
+class SvxColorList : public DummyColorList
+{
+public:
+ SvxColorList();
+ ~SvxColorList();
+
+ ULONG GetId( const SvxColorItem& rColor );
+};
+
+ // ----------------------------------------------------------------------
+// class ItemList
+// ----------------------------------------------------------------------
+typedef const SfxPoolItem* ConstPoolItemPtr;
+DECLARE_LIST( DummyItemList, ConstPoolItemPtr );
+class ItemList : public DummyItemList
+{
+public:
+ const SfxPoolItem* FindAttrib( USHORT nWhich );
+};
+
+ // -------------------------------------------------------------------------
+// class ContentAttribs
+// -------------------------------------------------------------------------
+class ContentAttribs
+{
+private:
+ SfxStyleSheet* pStyle;
+ SfxItemSet aAttribSet;
+
+public:
+ ContentAttribs( SfxItemPool& rItemPool );
+ ContentAttribs( const ContentAttribs& );
+ ~ContentAttribs(); // erst bei umfangreicheren Tabs
+
+ SvxTabStop FindTabStop( long nCurPos, USHORT nDefTab );
+ SfxItemSet& GetItems() { return aAttribSet; }
+ SfxStyleSheet* GetStyleSheet() const { return pStyle; }
+ void SetStyleSheet( SfxStyleSheet* pS );
+
+ inline const SfxPoolItem& GetItem( USHORT nWhich );
+ inline BOOL HasItem( USHORT nWhich );
+};
+
+inline const SfxPoolItem& ContentAttribs::GetItem( USHORT nWhich )
+{
+ // Harte Absatzattribute haben Vorrang!
+ SfxItemSet* pTakeFrom = &aAttribSet;
+ if ( pStyle && ( aAttribSet.GetItemState( nWhich, FALSE ) != SFX_ITEM_ON ) )
+ pTakeFrom = &pStyle->GetItemSet();
+
+ return pTakeFrom->Get( nWhich );
+}
+
+inline BOOL ContentAttribs::HasItem( USHORT nWhich )
+{
+ BOOL bHasItem = FALSE;
+ if ( aAttribSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_ON )
+ bHasItem = TRUE;
+ else if ( pStyle && pStyle->GetItemSet().GetItemState( nWhich ) == SFX_ITEM_ON )
+ bHasItem = TRUE;
+
+ return bHasItem;
+}
+
+ // -------------------------------------------------------------------------
+// class CharAttribList
+// -------------------------------------------------------------------------
+class CharAttribList
+{
+private:
+ CharAttribArray aAttribs;
+ SvxFont aDefFont; // schneller, als jedesmal vom Pool!
+ BOOL bHasEmptyAttribs;
+
+ CharAttribList( const CharAttribList& ) {;}
+
+public:
+ CharAttribList();
+ ~CharAttribList();
+
+ void DeleteEmptyAttribs( SfxItemPool& rItemPool );
+ void RemoveItemsFromPool( SfxItemPool* pItemPool );
+
+ EditCharAttrib* FindAttrib( USHORT nWhich, USHORT nPos );
+ EditCharAttrib* FindNextAttrib( USHORT nWhich, USHORT nFromPos ) const;
+ EditCharAttrib* FindEmptyAttrib( USHORT nWhich, USHORT nPos );
+ EditCharAttrib* FindFeature( USHORT nPos ) const;
+
+ void ResortAttribs();
+
+ USHORT Count() { return aAttribs.Count(); }
+ void Clear() { aAttribs.Remove( 0, aAttribs.Count()); }
+ void InsertAttrib( EditCharAttrib* pAttrib );
+
+ SvxFont& GetDefFont() { return aDefFont; }
+
+ BOOL HasEmptyAttribs() const { return bHasEmptyAttribs; }
+ BOOL& HasEmptyAttribs() { return bHasEmptyAttribs; }
+ BOOL HasBoundingAttrib( USHORT nBound );
+ BOOL HasAttrib( USHORT nWhich ) const;
+
+ CharAttribArray& GetAttribs() { return aAttribs; }
+ const CharAttribArray& GetAttribs() const { return aAttribs; }
+
+ // Debug:
+ BOOL DbgCheckAttribs();
+};
+
+ // -------------------------------------------------------------------------
+// class ContentNode
+// -------------------------------------------------------------------------
+class ContentNode : public XubString
+{
+private:
+ ContentAttribs aContentAttribs;
+ CharAttribList aCharAttribList;
+ WrongList* pWrongList;
+
+public:
+ ContentNode( SfxItemPool& rItemPool );
+ ContentNode( const XubString& rStr, const ContentAttribs& rContentAttribs );
+ ~ContentNode();
+
+ ContentAttribs& GetContentAttribs() { return aContentAttribs; }
+ CharAttribList& GetCharAttribs() { return aCharAttribList; }
+
+ void ExpandAttribs( USHORT nIndex, USHORT nNewChars, SfxItemPool& rItemPool );
+ void CollapsAttribs( USHORT nIndex, USHORT nDelChars, SfxItemPool& rItemPool );
+ void AppendAttribs( ContentNode* pNextNode );
+ void CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, BOOL bKeepEndingAttribs );
+
+ void SetStyleSheet( SfxStyleSheet* pS, BOOL bRecalcFont = TRUE );
+ void SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle );
+ SfxStyleSheet* GetStyleSheet() { return aContentAttribs.GetStyleSheet(); }
+
+ void CreateDefFont();
+
+ WrongList* GetWrongList() { return pWrongList; }
+ void SetWrongList( WrongList* p ) { pWrongList = p; }
+
+ void CreateWrongList();
+ void DestroyWrongList();
+
+ BOOL IsFeature( USHORT nPos ) const { return ( GetChar( nPos ) == CH_FEATURE ); }
+};
+
+inline void ContentNode::DestroyWrongList()
+{
+#ifndef SVX_LIGHT
+ delete pWrongList;
+#endif
+ pWrongList = NULL;
+}
+
+inline void ContentNode::CreateWrongList()
+{
+ DBG_ASSERT( !pWrongList, "WrongList existiert schon!" );
+#ifndef SVX_LIGHT
+ pWrongList = new WrongList;
+#endif
+}
+
+typedef ContentNode* ContentNodePtr;
+SV_DECL_PTRARR( ContentList, ContentNodePtr, 0, 4 );
+
+ // -------------------------------------------------------------------------
+// class EditPaM
+// -------------------------------------------------------------------------
+class EditPaM
+{
+private:
+ ContentNode* pNode;
+ USHORT nIndex;
+
+public:
+ EditPaM() { pNode = NULL; nIndex = 0; }
+ EditPaM( ContentNode* p, USHORT n ) { pNode = p; nIndex = n; }
+
+ ContentNode* GetNode() const { return pNode; }
+ void SetNode( ContentNode* p) { pNode = p; }
+
+ USHORT GetIndex() const { return nIndex; }
+ USHORT& GetIndex() { return nIndex; }
+ void SetIndex( USHORT n ) { nIndex = n; }
+
+ BOOL IsParaStart() const { return nIndex == 0; }
+ BOOL IsParaEnd() const { return nIndex == pNode->Len(); }
+
+ BOOL DbgIsBuggy( EditDoc& rDoc );
+
+ EditPaM& operator = ( const EditPaM& rPaM );
+ friend BOOL operator == ( const EditPaM& r1, const EditPaM& r2 );
+ friend BOOL operator != ( const EditPaM& r1, const EditPaM& r2 );
+};
+
+#define PORTIONKIND_TEXT 0
+#define PORTIONKIND_TAB 1
+#define PORTIONKIND_LINEBREAK 2
+#define PORTIONKIND_FIELD 3
+#define PORTIONKIND_HYPHENATOR 4
+
+#define DELMODE_SIMPLE 0
+#define DELMODE_RESTOFWORD 1
+#define DELMODE_RESTOFCONTENT 2
+
+ // -------------------------------------------------------------------------
+// class TextPortion
+// -------------------------------------------------------------------------
+class TextPortion
+{
+private:
+ USHORT nLen;
+ Size aOutSz;
+ BYTE nKind;
+ sal_Unicode nExtraValue;
+
+ TextPortion() { nLen = 0; nKind = PORTIONKIND_TEXT; nExtraValue = 0;}
+
+public:
+ TextPortion( USHORT nL ) : aOutSz( -1, -1 )
+ { DBG_CTOR( EE_TextPortion, 0 );
+ nLen = nL; nKind = PORTIONKIND_TEXT; nExtraValue = 0; }
+ TextPortion( const TextPortion& r ) : aOutSz( r.aOutSz )
+ { DBG_CTOR( EE_TextPortion, 0 );
+ nLen = r.nLen; nKind = r.nKind; nExtraValue = r.nExtraValue; }
+ ~TextPortion() { DBG_DTOR( EE_TextPortion, 0 ); }
+
+ USHORT GetLen() const { return nLen; }
+ USHORT& GetLen() { return nLen; }
+ void SetLen( USHORT nL ) { nLen = nL; }
+
+ Size& GetSize() { return aOutSz; }
+ Size GetSize() const { return aOutSz; }
+
+ BYTE& GetKind() { return nKind; }
+ BYTE GetKind() const { return nKind; }
+
+ sal_Unicode GetExtraValue() const { return nExtraValue; }
+ void SetExtraValue( sal_Unicode n ) { nExtraValue = n; }
+
+ BOOL HasValidSize() const { return aOutSz.Width() != (-1); }
+};
+
+
+ // -------------------------------------------------------------------------
+// class TextPortionList
+// -------------------------------------------------------------------------
+typedef TextPortion* TextPortionPtr;
+SV_DECL_PTRARR( TextPortionArray, TextPortionPtr, 0, 8 );
+
+class TextPortionList : public TextPortionArray
+{
+public:
+ TextPortionList();
+ ~TextPortionList();
+
+ void Reset();
+ USHORT FindPortion( USHORT nCharPos, USHORT& rPortionStart );
+ void DeleteFromPortion( USHORT nDelFrom );
+};
+
+class ParaPortion;
+
+SV_DECL_VARARR( CharPosArray, long, 0, CHARPOSGROW );
+
+ // ------------------------------------------------------------------------
+// class EditLine
+// -------------------------------------------------------------------------
+class EditLine
+{
+private:
+ CharPosArray aPositions;
+ USHORT nStartPosX;
+ USHORT nStart; // koennte durch nStartPortion ersetzt werden
+ USHORT nEnd; // koennte durch nEndPortion ersetzt werden
+ USHORT nStartPortion;
+ USHORT nEndPortion;
+ USHORT nHeight; // Gesamthoehe der Zeile
+ USHORT nTxtHeight; // Reine Texthoehe
+ USHORT nCrsrHeight; // Bei Konturfluss hohe Zeilen => Cursor zu groá.
+ USHORT nMaxAscent;
+ BOOL bInvalid; // fuer geschickte Formatierung
+
+public:
+ EditLine();
+ EditLine( const EditLine& );
+ ~EditLine();
+
+ BOOL IsIn( USHORT nIndex ) const
+ { return ( (nIndex >= nStart ) && ( nIndex < nEnd ) ); }
+
+ BOOL IsIn( USHORT nIndex, BOOL bInclEnd ) const
+ { return ( ( nIndex >= nStart ) && ( bInclEnd ? ( nIndex <= nEnd ) : ( nIndex < nEnd ) ) ); }
+
+ void SetStart( USHORT n ) { nStart = n; }
+ USHORT GetStart() const { return nStart; }
+ USHORT& GetStart() { return nStart; }
+
+ void SetEnd( USHORT n ) { nEnd = n; }
+ USHORT GetEnd() const { return nEnd; }
+ USHORT& GetEnd() { return nEnd; }
+
+ void SetStartPortion( USHORT n ) { nStartPortion = n; }
+ USHORT GetStartPortion() const { return nStartPortion; }
+ USHORT& GetStartPortion() { return nStartPortion; }
+
+ void SetEndPortion( USHORT n ) { nEndPortion = n; }
+ USHORT GetEndPortion() const { return nEndPortion; }
+ USHORT& GetEndPortion() { return nEndPortion; }
+
+ void SetHeight( USHORT nH, USHORT nTxtH = 0, USHORT nCrsrH = 0 )
+ { nHeight = nH;
+ nTxtHeight = ( nTxtH ? nTxtH : nH );
+ nCrsrHeight = ( nCrsrH ? nCrsrH : nTxtHeight );
+ }
+ USHORT GetHeight() const { return nHeight; }
+ USHORT GetTxtHeight() const { return nTxtHeight; }
+ USHORT GetCrsrHeight() const { return nCrsrHeight; }
+
+ void SetMaxAscent( USHORT n ) { nMaxAscent = n; }
+ USHORT GetMaxAscent() const { return nMaxAscent; }
+
+ USHORT GetLen() const { return nEnd - nStart; }
+
+ USHORT GetStartPosX() const { return nStartPosX; }
+ void SetStartPosX( USHORT nStart ) { nStartPosX = nStart; }
+
+ Size CalcTextSize( ParaPortion& rParaPortion );
+
+ BOOL IsInvalid() const { return bInvalid; }
+ BOOL IsValid() const { return !bInvalid; }
+ void SetInvalid() { bInvalid = TRUE; }
+ void SetValid() { bInvalid = FALSE; }
+
+ BOOL IsEmpty() const { return (nEnd > nStart) ? FALSE : TRUE; }
+
+ CharPosArray& GetCharPosArray() { return aPositions; }
+
+ EditLine* Clone() const;
+
+ EditLine& operator = ( const EditLine& rLine );
+ friend BOOL operator == ( const EditLine& r1, const EditLine& r2 );
+ friend BOOL operator != ( const EditLine& r1, const EditLine& r2 );
+};
+
+
+ // -------------------------------------------------------------------------
+// class LineList
+// -------------------------------------------------------------------------
+typedef EditLine* EditLinePtr;
+SV_DECL_PTRARR( LineArray, EditLinePtr, 0, 4 );
+
+class EditLineList : public LineArray
+{
+public:
+ EditLineList();
+ ~EditLineList();
+
+ void Reset();
+ void DeleteFromLine( USHORT nDelFrom );
+ USHORT FindLine( USHORT nChar, BOOL bInclEnd );
+};
+
+ // -------------------------------------------------------------------------
+// class ParaPortion
+// -------------------------------------------------------------------------
+class ParaPortion
+{
+ friend class ImpEditEngine; // zum Einstellen der Hoehe
+private:
+ EditLineList aLineList;
+ TextPortionList aTextPortionList;
+ ContentNode* pNode;
+ long nHeight;
+
+ USHORT nInvalidPosStart;
+ USHORT nFirstLineOffset; // Fuer Writer-LineSpacing-Interpretation
+ USHORT nBulletX;
+ short nInvalidDiff;
+
+ BOOL bInvalid : 1;
+ BOOL bSimple : 1; // nur lineares Tippen
+ BOOL bVisible : 1; // MT 05/00: Gehoert an den Node!!!
+ BOOL bForceRepaint : 1;
+
+ ParaPortion( const ParaPortion& ) {;}
+
+public:
+ ParaPortion( ContentNode* pNode );
+ ~ParaPortion();
+
+ USHORT GetLineNumber( USHORT nIndex );
+ long GetXPos( EditLine* pLine, USHORT nIndex );
+ USHORT GetChar( EditLine* pLine, long nX, BOOL bSmart = TRUE );
+
+ EditLineList& GetLines() { return aLineList; }
+
+ BOOL IsInvalid() const { return bInvalid; }
+ BOOL IsSimpleInvalid() const { return bSimple; }
+ void SetValid() { bInvalid = FALSE; bSimple = TRUE;}
+
+ BOOL MustRepaint() const { return bForceRepaint; }
+ void SetMustRepaint( BOOL bRP ) { bForceRepaint = bRP; }
+
+ USHORT GetBulletX() const { return nBulletX; }
+ void SetBulletX( USHORT n ) { nBulletX = n; }
+
+ void MarkInvalid( USHORT nStart, short nDiff);
+ void MarkSelectionInvalid( USHORT nStart, USHORT nEnd );
+
+ void SetVisible( BOOL bVisible );
+ BOOL IsVisible() { return bVisible; }
+
+ long GetHeight() const { return ( bVisible ? nHeight : 0 ); }
+ USHORT GetFirstLineOffset() const { return ( bVisible ? nFirstLineOffset : 0 ); }
+ void ResetHeight() { nHeight = 0; nFirstLineOffset = 0; }
+
+ ContentNode* GetNode() const { return pNode; }
+ TextPortionList& GetTextPortions() { return aTextPortionList; }
+ void AdjustBlocks( EditLine* pLine, long nRemainingSpace );
+
+ USHORT GetInvalidPosStart() const { return nInvalidPosStart; }
+ short GetInvalidDiff() const { return nInvalidDiff; }
+
+ void CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine );
+
+ BOOL DbgCheckTextPortions();
+};
+
+typedef ParaPortion* ParaPortionPtr;
+SV_DECL_PTRARR( DummyParaPortionList, ParaPortionPtr, 0, 4 );
+
+ // -------------------------------------------------------------------------
+// class ParaPortionList
+// -------------------------------------------------------------------------
+class ParaPortionList : public DummyParaPortionList
+{
+public:
+ ParaPortionList();
+ ~ParaPortionList();
+
+ void Reset();
+ long GetYOffset( ParaPortion* pPPortion );
+ USHORT FindParagraph( long nYOffset );
+
+ inline ParaPortion* SaveGetObject( USHORT nPos ) const
+ { return ( nPos < Count() ) ? GetObject( nPos ) : 0; }
+
+ // temporaer:
+ void DbgCheck( EditDoc& rDoc );
+};
+
+ // -------------------------------------------------------------------------
+// class EditSelection
+// -------------------------------------------------------------------------
+class EditSelection
+{
+private:
+ EditPaM aStartPaM;
+ EditPaM aEndPaM;
+
+public:
+ EditSelection(); // kein CCTOR und DTOR, geht autom. richtig!
+ EditSelection( const EditPaM& rStartAndAnd );
+ EditSelection( const EditPaM& rStart, const EditPaM& rEnd );
+
+ EditPaM& Min() { return aStartPaM; }
+ EditPaM& Max() { return aEndPaM; }
+
+ const EditPaM& Min() const { return aStartPaM; }
+ const EditPaM& Max() const { return aEndPaM; }
+
+ BOOL HasRange() const { return aStartPaM != aEndPaM; }
+ BOOL IsInvalid();
+ BOOL DbgIsBuggy( EditDoc& rDoc );
+
+ BOOL Adjust( const ContentList& rNodes );
+
+ EditSelection& operator = ( const EditPaM& r );
+ BOOL operator == ( const EditSelection& r ) const
+ { return ( ( aStartPaM == r.aStartPaM ) && ( aEndPaM == r.aEndPaM ) )
+ ? TRUE : FALSE; }
+};
+
+ // -------------------------------------------------------------------------
+// class DeletedNodeInfo
+// -------------------------------------------------------------------------
+class DeletedNodeInfo
+{
+private:
+ ULONG nInvalidAdressPtr;
+ USHORT nInvalidParagraph;
+
+public:
+ DeletedNodeInfo( ULONG nInvAdr, USHORT nPos )
+ { nInvalidAdressPtr = nInvAdr;
+ nInvalidParagraph = nPos; }
+
+ ULONG GetInvalidAdress() { return nInvalidAdressPtr; }
+ USHORT GetPosition() { return nInvalidParagraph; }
+};
+
+typedef DeletedNodeInfo* DeletedNodeInfoPtr;
+SV_DECL_PTRARR( DeletedNodesList, DeletedNodeInfoPtr, 0, 4 );
+
+ // -------------------------------------------------------------------------
+// class EditDoc
+// -------------------------------------------------------------------------
+class EditDoc : public ContentList
+{
+private:
+ SfxItemPool* pItemPool;
+
+ SvxFont aDefFont; //schneller, als jedesmal vom Pool!
+ USHORT nDefTab;
+
+ BOOL bOwnerOfPool;
+ BOOL bModified;
+
+public:
+ EditDoc( SfxItemPool* pItemPool );
+ ~EditDoc();
+
+ BOOL IsModified() const { return bModified; }
+ void SetModified( BOOL b ) { bModified = b; }
+
+ void CreateDefFont( BOOL bUseStyles );
+ const SvxFont& GetDefFont() { return aDefFont; }
+
+ void SetDefTab( USHORT nTab ) { nDefTab = nTab ? nTab : DEFTAB; }
+ USHORT GetDefTab() const { return nDefTab; }
+
+ void DestroyContents();
+ EditPaM Clear();
+ EditPaM RemoveText();
+ EditPaM RemoveChars( EditPaM aPaM, USHORT nChars );
+ void InsertText( const EditPaM& rPaM, xub_Unicode c );
+ EditPaM InsertText( EditPaM aPaM, const XubString& rStr );
+ EditPaM InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs );
+ EditPaM InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem );
+ EditPaM ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight );
+
+ String GetText( LineEnd eEnd ) const;
+ ULONG GetTextLen() const;
+
+ XubString GetParaAsString( USHORT nNode ) const;
+ XubString GetParaAsString( ContentNode* pNode ) const;
+ XubString GetParaAsString( USHORT nNode, USHORT nStartPos, USHORT nEndPos ) const;
+ XubString GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos ) const;
+
+ inline EditPaM GetStartPaM() const;
+ inline EditPaM GetEndPaM() const;
+
+ SfxItemPool& GetItemPool() { return *pItemPool; }
+ const SfxItemPool& GetItemPool() const { return *pItemPool; }
+
+ void RemoveItemsFromPool( ContentNode* pNode );
+
+ void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, USHORT nStart, USHORT nEnd );
+ void InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem );
+ void InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem );
+ BOOL RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich = 0 );
+ BOOL RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, USHORT nWhich = 0 );
+ void FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet );
+
+ USHORT GetPos( ContentNode* pNode ) const { return ContentList::GetPos(pNode); }
+ ContentNode* SaveGetObject( USHORT nPos ) const { return ( nPos < Count() ) ? GetObject( nPos ) : 0; }
+
+ static XubString GetSepStr( LineEnd eEnd );
+};
+
+inline EditPaM EditDoc::GetStartPaM() const
+{
+ return EditPaM( GetObject( 0 ), 0 );
+}
+
+inline EditPaM EditDoc::GetEndPaM() const
+{
+ ContentNode* pLastNode = GetObject( Count()-1 );
+ return EditPaM( pLastNode, pLastNode->Len() );
+}
+
+inline EditCharAttrib* GetAttrib( const CharAttribArray& rAttribs, USHORT nAttr )
+{
+ return ( nAttr < rAttribs.Count() ) ? rAttribs[nAttr] : 0;
+}
+
+BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart );
+
+ // -------------------------------------------------------------------------
+// class EditEngineItemPool
+// -------------------------------------------------------------------------
+class EditEngineItemPool : public SfxItemPool
+{
+public:
+ EditEngineItemPool( BOOL bPersistenRefCounts );
+ ~EditEngineItemPool();
+
+ virtual SvStream& Store( SvStream& rStream ) const;
+};
+
+#endif // _EDITDOC_HXX
diff --git a/svx/source/editeng/editdoc2.cxx b/svx/source/editeng/editdoc2.cxx
new file mode 100644
index 0000000000..ce56a640ff
--- /dev/null
+++ b/svx/source/editeng/editdoc2.cxx
@@ -0,0 +1,714 @@
+/*************************************************************************
+ *
+ * $RCSfile: editdoc2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#ifndef _SFXSMPLHINT_HXX //autogen
+#include <svtools/smplhint.hxx>
+#endif
+#include <tools/rtti.hxx>
+#include <lspcitem.hxx>
+#include <adjitem.hxx>
+#include <tstpitem.hxx>
+
+#include <editdoc.hxx>
+#include <impedit.hxx>
+#include <editdbg.hxx>
+
+#include <numitem.hxx>
+
+#include "akrnitem.hxx"
+#include "cntritem.hxx"
+#include "colritem.hxx"
+#include "crsditem.hxx"
+#include "escpitem.hxx"
+#include "fhgtitem.hxx"
+#include "fontitem.hxx"
+#include "fwdtitem.hxx"
+#include "kernitem.hxx"
+#include "lrspitem.hxx"
+#include "postitem.hxx"
+#include "shdditem.hxx"
+#include "udlnitem.hxx"
+#include "ulspitem.hxx"
+#include "wghtitem.hxx"
+#include "wrlmitem.hxx"
+
+#include <vcl/svapp.hxx> // Fuer AppWindow...
+
+DBG_NAME( EE_ParaPortion );
+
+SV_IMPL_VARARR( CharPosArray, long );
+
+/*
+
+BOOL EditStyleSheet::HasStyleAsAnyParent( SfxStyleSheet& rStyle )
+{
+ if ( GetParent() == rStyle.GetName() )
+ return TRUE;
+
+ if ( GetParent().Len() && ( GetParent() != GetName() ) )
+ {
+ EditStyleSheet* pS = (EditStyleSheet*)GetPool().Find( GetParent(), rStyle.GetFamily() );
+ if ( pS )
+ return pS->HasStyleAsAnyParent( rStyle );
+ }
+ return FALSE;
+}
+
+*/
+
+// -------------------------------------------------------------------------
+// class TextPortionList
+// -------------------------------------------------------------------------
+TextPortionList::TextPortionList()
+{
+}
+
+TextPortionList::~TextPortionList()
+{
+ Reset();
+}
+
+void TextPortionList::Reset()
+{
+ for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ delete GetObject( nPortion );
+ Remove( 0, Count() );
+}
+
+void TextPortionList::DeleteFromPortion( USHORT nDelFrom )
+{
+ DBG_ASSERT( ( nDelFrom < Count() ) || ( (nDelFrom == 0) && (Count() == 0) ), "DeleteFromPortion: Out of range" );
+ for ( USHORT nP = nDelFrom; nP < Count(); nP++ )
+ delete GetObject( nP );
+ Remove( nDelFrom, Count()-nDelFrom );
+}
+
+USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart )
+{
+ // Bei nCharPos an Portion-Grenze wird die linke Portion gefunden
+ USHORT nTmpPos = 0;
+ for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ {
+ TextPortion* pPortion = GetObject( nPortion );
+ nTmpPos += pPortion->GetLen();
+ if ( nTmpPos >= nCharPos )
+ {
+ nPortionStart = nTmpPos - pPortion->GetLen();
+ return nPortion;
+ }
+ }
+ DBG_ERROR( "FindPortion: Nicht gefunden!" );
+ return ( Count() - 1 );
+}
+
+ // -------------------------------------------------------------------------
+// class ParaPortion
+// -------------------------------------------------------------------------
+ParaPortion::ParaPortion( ContentNode* pN )
+{
+ DBG_CTOR( EE_ParaPortion, 0 );
+
+ pNode = pN;
+ bInvalid = TRUE;
+ bVisible = TRUE;
+ bSimple = FALSE;
+ bForceRepaint = FALSE;
+ nInvalidPosStart = 0;
+ nInvalidDiff = 0;
+ nHeight = 0;
+ nFirstLineOffset = 0;
+ nBulletX = 0;
+}
+
+ParaPortion::~ParaPortion()
+{
+ DBG_DTOR( EE_ParaPortion, 0 );
+}
+
+void ParaPortion::MarkInvalid( USHORT nStart, short nDiff )
+{
+ if ( bInvalid == FALSE )
+ {
+// nInvalidPosEnd = nStart; // ??? => CreateLines
+ nInvalidPosStart = ( nDiff >= 0 ) ? nStart : ( nStart + nDiff );
+ nInvalidDiff = nDiff;
+ }
+ else
+ {
+ // Einfaches hintereinander tippen
+ if ( ( nDiff > 0 ) && ( nInvalidDiff > 0 ) &&
+ ( ( nInvalidPosStart+nInvalidDiff ) == nStart ) )
+ {
+ nInvalidDiff += nDiff;
+ }
+ // Einfaches hintereinander loeschen
+ else if ( ( nDiff < 0 ) && ( nInvalidDiff < 0 ) && ( nInvalidPosStart == nStart ) )
+ {
+ nInvalidPosStart += nDiff;
+ nInvalidDiff += nDiff;
+ }
+ else
+ {
+// nInvalidPosEnd = pNode->Len();
+ DBG_ASSERT( ( nDiff >= 0 ) || ( (nStart+nDiff) >= 0 ), "MarkInvalid: Diff out of Range" );
+ nInvalidPosStart = Min( nInvalidPosStart, (USHORT) ( nDiff < 0 ? nStart+nDiff : nDiff ) );
+ nInvalidDiff = 0;
+ bSimple = FALSE;
+ }
+ }
+ bInvalid = TRUE;
+}
+
+void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT nEnd )
+{
+ if ( bInvalid == FALSE )
+ {
+ nInvalidPosStart = nStart;
+// nInvalidPosEnd = nEnd;
+ }
+ else
+ {
+ nInvalidPosStart = Min( nInvalidPosStart, nStart );
+// nInvalidPosEnd = pNode->Len();
+ }
+ nInvalidDiff = 0;
+ bInvalid = TRUE;
+ bSimple = FALSE;
+}
+
+void ParaPortion::AdjustBlocks( EditLine* pLine, long nRemainingSpace )
+{
+ DBG_ASSERT( nRemainingSpace > 0, "AdjustBlocks: Etwas zuwenig..." );
+ DBG_ASSERT( pLine, "AdjustBlocks: Zeile ?!" );
+ if ( ( nRemainingSpace < 0 ) || pLine->IsEmpty() )
+ return ;
+
+// USHORTs aBlanks;
+ const USHORT nFirstChar = pLine->GetStart();
+ const USHORT nLastChar = pLine->GetEnd() -1; // Last zeigt dahinter
+
+ DBG_ASSERT( nLastChar < pNode->Len(), "AdjustBlocks: Out of range!" );
+
+ // Blanks suchen:
+ USHORT nBlanks = 0;
+ USHORT nChar;
+ for ( nChar = nFirstChar; nChar <= nLastChar; nChar++ )
+ {
+ if ( pNode->GetChar(nChar) == ' ' )
+ nBlanks++;
+ }
+
+ if ( !nBlanks )
+ return;
+
+ // Wenn das letzte Zeichen ein Blank ist, will ich es nicht haben!
+ // Die Breite muss auf die Blocker davor verteilt werden...
+ // Aber nicht, wenn es das einzige ist
+ if ( ( pNode->GetChar( nLastChar ) == ' ' ) && ( nBlanks > 1 ) )
+ {
+ nBlanks--;
+ USHORT nPortionStart, nPortion;
+ nPortion = GetTextPortions().FindPortion( nLastChar+1, nPortionStart );
+ TextPortion* pLastPortion = GetTextPortions()[ nPortion ];
+ long nRealWidth = pLine->GetCharPosArray()[nLastChar-nFirstChar];
+ long nBlankWidth = nRealWidth;
+ if ( nLastChar > nPortionStart )
+ nBlankWidth -= pLine->GetCharPosArray()[nLastChar-nFirstChar-1];
+ // Evtl. ist das Blank schon in ImpBreakLine abgezogen worden:
+ if ( nRealWidth == pLastPortion->GetSize().Width() )
+ {
+ // Beim letzten Zeichen muss die Portion hinter dem Blank aufhoeren
+ // => Korrektur vereinfachen:
+ DBG_ASSERT( ( nPortionStart + pLastPortion->GetLen() ) == ( nLastChar+1 ), "Blank doch nicht am Portion-Ende?!" );
+ pLastPortion->GetSize().Width() -= nBlankWidth;
+ nRemainingSpace += nBlankWidth;
+ }
+ pLine->GetCharPosArray()[nLastChar-nFirstChar] -= nBlankWidth;
+ }
+
+ const long nMore4Everyone = nRemainingSpace / nBlanks;
+ long nSomeExtraSpace = nRemainingSpace - nMore4Everyone*nBlanks;
+
+ DBG_ASSERT( nSomeExtraSpace < (long)nBlanks, "AdjustBlocks: ExtraSpace zu gross" );
+ DBG_ASSERT( nSomeExtraSpace >= 0, "AdjustBlocks: ExtraSpace < 0 " );
+
+ // Die Positionen im Array und die Portion-Breiten korrigieren:
+ // Letztes Zeichen wird schon nicht mehr beachtet...
+ for ( nChar = nFirstChar; nChar < nLastChar; nChar++ )
+ {
+ if ( pNode->GetChar( nChar ) == ' ' )
+ {
+ USHORT nPortionStart, nPortion;
+ nPortion = GetTextPortions().FindPortion( nChar, nPortionStart );
+ TextPortion* pLastPortion = GetTextPortions()[ nPortion ];
+
+ // Die Breite der Portion:
+ pLastPortion->GetSize().Width() += nMore4Everyone;
+ if ( nSomeExtraSpace )
+ pLastPortion->GetSize().Width()++;
+
+ // Die Zeichenpositionen ab dem Blank:
+ USHORT nPortionEnd = nPortionStart + pLastPortion->GetLen();
+ for ( USHORT n = nChar; n < nPortionEnd; n++ )
+ {
+ pLine->GetCharPosArray()[n-nFirstChar] += nMore4Everyone;
+ if ( nSomeExtraSpace )
+ pLine->GetCharPosArray()[n-nFirstChar]++;
+ }
+
+ if ( nSomeExtraSpace )
+ nSomeExtraSpace--;
+ }
+ }
+}
+
+USHORT ParaPortion::GetLineNumber( USHORT nIndex )
+{
+ DBG_ASSERTWARNING( aLineList.Count(), "Leere ParaPortion in GetLine!" );
+ DBG_ASSERT( bVisible, "Wozu GetLine() bei einem unsichtbaren Absatz?" );
+
+ for ( USHORT nLine = 0; nLine < aLineList.Count(); nLine++ )
+ {
+ if ( aLineList[nLine]->IsIn( nIndex ) )
+ return nLine;
+ }
+
+ // Dann sollte es am Ende der letzten Zeile sein!
+ DBG_ASSERT( nIndex == aLineList[ aLineList.Count() - 1 ]->GetEnd(), "Index voll daneben!" );
+ return (aLineList.Count()-1);
+}
+
+long ParaPortion::GetXPos( EditLine* pLine, USHORT nIndex )
+{
+ DBG_ASSERT( pLine, "Keine Zeile erhalten: GetXPos" );
+ DBG_ASSERT( ( nIndex >= pLine->GetStart() ) && ( nIndex <= pLine->GetEnd() ) , "GetXPos muss richtig gerufen werden!" );
+
+ TextPortion* pPortion;
+ Size aTmpSz;
+
+ long nX = pLine->GetStartPosX();
+ USHORT nCurIndex = pLine->GetStart();
+
+ for ( USHORT i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ )
+ {
+ pPortion = aTextPortionList.GetObject( i );
+ nCurIndex += pPortion->GetLen();
+ if ( nCurIndex <= nIndex )
+ {
+ switch ( pPortion->GetKind() )
+ {
+ case PORTIONKIND_FIELD:
+ case PORTIONKIND_TEXT:
+ case PORTIONKIND_HYPHENATOR:
+ case PORTIONKIND_TAB:
+ {
+ nX += pPortion->GetSize().Width();
+ }
+ break;
+ }
+ if ( nCurIndex == nIndex )
+ break; // for
+ }
+ else // suchen und Ende
+ {
+ nCurIndex -= pPortion->GetLen();
+
+ // Wenn ich auf einem Feature stehe,
+ // braucht die X-Postion nicht korrigiert werden...
+ if (pPortion->GetKind() == PORTIONKIND_TEXT )
+ {
+ // nIndex - 1, weil kein Wert fuer Stelle 0.
+ if ( nIndex != pLine->GetStart() )
+ nX += pLine->GetCharPosArray().GetObject( nIndex - 1 - pLine->GetStart() );
+ }
+ break; // for
+ }
+ }
+ return nX;
+}
+
+USHORT ParaPortion::GetChar( EditLine* pLine, long nXPos, BOOL bSmart )
+{
+ DBG_ASSERT( pLine, "Keine Zeile erhalten: GetChar" );
+
+ Size aTmpSz;
+ TextPortion* pPortion;
+
+ USHORT nCurIndex = pLine->GetStart();
+ long nTmpX = pLine->GetStartPosX();
+
+ if ( nTmpX >= nXPos )
+ return nCurIndex;
+
+ long nLastWidth;
+
+ for ( USHORT i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ )
+ {
+ pPortion = aTextPortionList.GetObject( i );
+ switch ( pPortion->GetKind() )
+ {
+ case PORTIONKIND_TEXT:
+ case PORTIONKIND_FIELD:
+ case PORTIONKIND_HYPHENATOR:
+ case PORTIONKIND_TAB:
+ {
+ nLastWidth = pPortion->GetSize().Width();
+ nTmpX += nLastWidth;
+ }
+ break;
+ case PORTIONKIND_LINEBREAK:
+ {
+ return nCurIndex;
+ }
+ // break; erzeugt Warnung: "Unreachable code"
+ default: DBG_ERROR( "GetChar: Unbekannte Portion" );
+ }
+
+ if ( nTmpX > nXPos )
+ {
+ // Spezielle Portions werden nicht weiter unterteilt:
+ if ( pPortion->GetKind() != PORTIONKIND_TEXT )
+ {
+ // Aber gewichtet:
+ long nLeftDiff = nXPos-(nTmpX-nLastWidth);
+ long nRightDiff = nTmpX-nXPos;
+ if ( bSmart && ( Abs( nRightDiff ) < Abs( nLeftDiff ) ) )
+ nCurIndex++;
+ return nCurIndex;
+ }
+
+ nTmpX -= nLastWidth; // vor die Portion stellen
+
+ USHORT nMax = pPortion->GetLen();
+ USHORT nOffset = 0xFFFF;
+ USHORT nTmpCurIndex = nCurIndex - pLine->GetStart();
+
+ for ( USHORT x = 0; x < nMax; x++ )
+ {
+ long nTmpPosMax = nTmpX+pLine->GetCharPosArray().GetObject( nTmpCurIndex+x );
+ if ( nTmpPosMax > nXPos )
+ {
+ // pruefen, ob dieser oder der davor...
+ long nTmpPosMin = nTmpX;
+ if ( x )
+ nTmpPosMin += pLine->GetCharPosArray().GetObject( nTmpCurIndex+x-1 );
+ long nDiffLeft = nXPos - nTmpPosMin;
+ long nDiffRight = nTmpPosMax - nXPos;
+ DBG_ASSERT( nDiffLeft >= 0, "DiffLeft negativ" );
+ DBG_ASSERT( nDiffRight >= 0, "DiffRight negativ" );
+ nOffset = ( bSmart && ( nDiffRight < nDiffLeft ) ) ? x+1 : x;
+ // I18N: If there are character position with the length
+ // of 0, they belong to the same character, we can not
+ // use this position as an index.
+ // Skip all 0-positions, cheaper than using XBreakIterator:
+ if ( nOffset < nMax )
+ {
+ const long nX = pLine->GetCharPosArray().GetObject(nOffset);
+ while ( ( (nOffset+1) < nMax ) && ( pLine->GetCharPosArray().GetObject(nOffset+1) == nX ) )
+ nOffset++;
+ }
+ break;
+ }
+ }
+
+ // Bei Verwendung des CharPosArray duerfte es keine Ungenauigkeiten geben!
+ // Vielleicht bei Kerning ?
+ // 0xFFF passiert z.B. bei Outline-Font, wenn ganz hinten.
+ if ( nOffset == 0xFFFF )
+ nOffset = nMax;
+
+ DBG_ASSERT( nOffset <= nMax, "nOffset > nMax" );
+
+ nCurIndex += nOffset;
+
+ // nicht gefunden => Ende der Zeile ?
+ // Nein: Dann sorgt die obere While-Schleife schon fuer das
+ // richtige n.
+ // Die unteren beiden Zeilen haben den Effekt, dass man
+ // nicht zwischen die letzten beiden Zeichen klicken kann.
+ // if ( ( nTmpX + aTmpSz.Width() ) < nXPos )
+ // nCurIndex++;
+
+ return nCurIndex;
+ }
+
+ nCurIndex += pPortion->GetLen();
+ }
+ return nCurIndex;
+}
+
+void ParaPortion::SetVisible( BOOL bMakeVisible )
+{
+ bVisible = bMakeVisible;
+}
+
+void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine )
+{
+ USHORT nLines = aLineList.Count();
+ DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Leere Portion?" );
+ if ( nLastFormattedLine < ( nLines - 1 ) )
+ {
+ const EditLine* pLastFormatted = aLineList[ nLastFormattedLine ];
+ const EditLine* pUnformatted = aLineList[ nLastFormattedLine+1 ];
+ short nPortionDiff = pUnformatted->GetStartPortion() - pLastFormatted->GetEndPortion();
+ short nTextDiff = pUnformatted->GetStart() - pLastFormatted->GetEnd();
+ nTextDiff++; // LastFormatted->GetEnd() war incl. => 1 zuviel abgezogen!
+
+ // Die erste unformatierte muss genau eine Portion hinter der letzten der
+ // formatierten beginnen:
+ // Wenn in der geaenderten Zeile eine Portion gesplittet wurde,
+ // kann nLastEnd > nNextStart sein!
+ short nPDiff = -( nPortionDiff-1 );
+ short nTDiff = -( nTextDiff-1 );
+ if ( nPDiff || nTDiff )
+ {
+ for ( USHORT nL = nLastFormattedLine+1; nL < nLines; nL++ )
+ {
+ EditLine* pLine = aLineList[ nL ];
+
+ pLine->GetStartPortion() += nPDiff;
+ pLine->GetEndPortion() += nPDiff;
+
+ pLine->GetStart() += nTDiff;
+ pLine->GetEnd() += nTDiff;
+
+ pLine->SetValid();
+ }
+ }
+ }
+ DBG_ASSERT( aLineList[ aLineList.Count()-1 ]->GetEnd() == pNode->Len(), "CorrectLines: Ende stimmt nicht!" );
+}
+
+ // -------------------------------------------------------------------------
+// class ParaPortionList
+// -------------------------------------------------------------------------
+ParaPortionList::ParaPortionList()
+{
+}
+
+ParaPortionList::~ParaPortionList()
+{
+ Reset();
+}
+
+void ParaPortionList::Reset()
+{
+ for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ delete GetObject( nPortion );
+ Remove( 0, Count() );
+}
+
+long ParaPortionList::GetYOffset( ParaPortion* pPPortion )
+{
+ long nHeight = 0;
+ for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ {
+ ParaPortion* pTmpPortion = GetObject(nPortion);
+ if ( pTmpPortion == pPPortion )
+ return nHeight;
+ nHeight += pTmpPortion->GetHeight();
+ }
+ DBG_ERROR( "GetYOffset: Portion nicht gefunden" );
+ return nHeight;
+}
+
+USHORT ParaPortionList::FindParagraph( long nYOffset )
+{
+ long nY = 0;
+ for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ {
+ nY += GetObject(nPortion)->GetHeight(); // sollte auch bei !bVisible richtig sein!
+ if ( nY > nYOffset )
+ return nPortion;
+ }
+ return 0xFFFF; // solte mal ueber EE_PARA_NOT_FOUND erreicht werden!
+}
+
+void ParaPortionList::DbgCheck( EditDoc& rDoc )
+{
+#ifdef DBG_UTIL
+ DBG_ASSERT( Count() == rDoc.Count(), "ParaPortionList::DbgCheck() - Count() ungleich!" );
+ for ( USHORT i = 0; i < Count(); i++ )
+ {
+ DBG_ASSERT( SaveGetObject(i), "ParaPortionList::DbgCheck() - Null-Pointer in Liste!" );
+ DBG_ASSERT( GetObject(i)->GetNode(), "ParaPortionList::DbgCheck() - Null-Pointer in Liste(2)!" );
+ DBG_ASSERT( GetObject(i)->GetNode() == rDoc.GetObject(i), "ParaPortionList::DbgCheck() - Eintraege kreuzen sich!" );
+ }
+#endif
+}
+
+
+ContentAttribsInfo::ContentAttribsInfo( const SfxItemSet& rParaAttribs ) :
+ aPrevParaAttribs( rParaAttribs)
+{
+}
+
+
+void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit )
+{
+ DBG_ASSERT( eSourceUnit != eDestUnit, "ConvertItem - Why?!" );
+
+ switch ( rPoolItem.Which() )
+ {
+ case EE_PARA_LRSPACE:
+ {
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxLRSpaceItem ) ), "ConvertItem: Ungueltiges Item!" );
+ SvxLRSpaceItem& rItem = (SvxLRSpaceItem&)rPoolItem;
+ rItem.SetTxtFirstLineOfst( OutputDevice::LogicToLogic( rItem.GetTxtFirstLineOfst(), eSourceUnit, eDestUnit ) );
+ rItem.SetTxtLeft( OutputDevice::LogicToLogic( rItem.GetTxtLeft(), eSourceUnit, eDestUnit ) );
+ rItem.SetLeft( OutputDevice::LogicToLogic( rItem.GetLeft(), eSourceUnit, eDestUnit ) );
+ rItem.SetRight( OutputDevice::LogicToLogic( rItem.GetRight(), eSourceUnit, eDestUnit ) );
+ }
+ break;
+ case EE_PARA_ULSPACE:
+ {
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxULSpaceItem ) ), "ConvertItem: Ungueltiges Item!" );
+ SvxULSpaceItem& rItem = (SvxULSpaceItem&)rPoolItem;
+ rItem.SetUpper( OutputDevice::LogicToLogic( rItem.GetUpper(), eSourceUnit, eDestUnit ) );
+ rItem.SetLower( OutputDevice::LogicToLogic( rItem.GetLower(), eSourceUnit, eDestUnit ) );
+ }
+ break;
+ case EE_PARA_SBL:
+ {
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxLineSpacingItem ) ), "ConvertItem: Ungueltiges Item!" );
+ SvxLineSpacingItem& rItem = (SvxLineSpacingItem&)rPoolItem;
+ rItem.SetLineHeight( OutputDevice::LogicToLogic( rItem.GetLineHeight(), eSourceUnit, eDestUnit ) );
+ rItem.SetInterLineSpace( OutputDevice::LogicToLogic( rItem.GetInterLineSpace(), eSourceUnit, eDestUnit ) );
+ }
+ break;
+ case EE_PARA_TABS:
+ {
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxTabStopItem ) ), "ConvertItem: Ungueltiges Item!" );
+ SvxTabStopItem& rItem = (SvxTabStopItem&)rPoolItem;
+ SvxTabStopItem aNewItem( EE_PARA_TABS );
+ for ( USHORT i = 0; i < rItem.Count(); i++ )
+ {
+ const SvxTabStop& rTab = rItem[i];
+ SvxTabStop aNewStop( OutputDevice::LogicToLogic( rTab.GetTabPos(), eSourceUnit, eDestUnit ), rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() );
+ aNewItem.Insert( aNewStop );
+ }
+ rItem = aNewItem;
+ }
+ break;
+ case EE_CHAR_FONTHEIGHT:
+ {
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxFontHeightItem ) ), "ConvertItem: Ungueltiges Item!" );
+ SvxFontHeightItem& rItem = (SvxFontHeightItem&)rPoolItem;
+ rItem.SetHeight( OutputDevice::LogicToLogic( rItem.GetHeight(), eSourceUnit, eDestUnit ) );
+ }
+ break;
+ case EE_CHAR_FONTWIDTH:
+ {
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxFontWidthItem ) ), "ConvertItem: Ungueltiges Item!" );
+ SvxFontWidthItem& rItem = (SvxFontWidthItem&)rPoolItem;
+ rItem.SetWidth( OutputDevice::LogicToLogic( rItem.GetWidth(), eSourceUnit, eDestUnit ) );
+ }
+ break;
+ }
+}
+
+void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const MapUnit* pSourceUnit, const MapUnit* pDestUnit )
+{
+ const SfxItemPool* pSourcePool = rSource.GetPool();
+ const SfxItemPool* pDestPool = rDest.GetPool();
+
+ for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
+ {
+ // Wenn moeglich ueber SlotID gehen...
+
+ USHORT nSourceWhich = nWhich;
+ USHORT nSlot = pDestPool->GetTrueSlotId( nWhich );
+ if ( nSlot )
+ {
+ USHORT nW = pSourcePool->GetTrueWhich( nSlot );
+ if ( nW )
+ nSourceWhich = nW;
+ }
+
+ if ( rSource.GetItemState( nSourceWhich, FALSE ) == SFX_ITEM_ON )
+ {
+ MapUnit eSourceUnit = pSourceUnit ? *pSourceUnit : (MapUnit)pSourcePool->GetMetric( nSourceWhich );
+ MapUnit eDestUnit = pDestUnit ? *pDestUnit : (MapUnit)pDestPool->GetMetric( nWhich );
+ if ( eSourceUnit != eDestUnit )
+ {
+ SfxPoolItem* pItem = rSource.Get( nSourceWhich ).Clone();
+// pItem->SetWhich( nWhich );
+ ConvertItem( *pItem, eSourceUnit, eDestUnit );
+ rDest.Put( *pItem, nWhich );
+ delete pItem;
+ }
+ else
+ {
+ rDest.Put( rSource.Get( nSourceWhich ), nWhich );
+ }
+ }
+ else
+ {
+ // MT 3.3.99: Waere so eigentlich richtig, aber schon seit Jahren nicht so...
+// rDest.ClearItem( nWhich );
+ }
+ }
+}
+
diff --git a/svx/source/editeng/editeng.cxx b/svx/source/editeng/editeng.cxx
new file mode 100644
index 0000000000..689f887956
--- /dev/null
+++ b/svx/source/editeng/editeng.cxx
@@ -0,0 +1,2291 @@
+/*************************************************************************
+ *
+ * $RCSfile: editeng.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+// #define __PRIVATE 1
+#define USE_SVXFONT
+
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+
+#include <svxfont.hxx>
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editview.hxx>
+#include <editstat.hxx>
+#include <editdbg.hxx>
+#include <eerdll2.hxx>
+#include <eerdll.hxx>
+#include <editeng.hrc>
+#include <flditem.hxx>
+#include <txtrange.hxx>
+#include <vcl/graph.hxx>
+
+#include "akrnitem.hxx"
+#include "cntritem.hxx"
+#include "colritem.hxx"
+#include "crsditem.hxx"
+#include "escpitem.hxx"
+#include "fhgtitem.hxx"
+#include "fontitem.hxx"
+#include "fwdtitem.hxx"
+#include "kernitem.hxx"
+#include "lrspitem.hxx"
+#include "postitem.hxx"
+#include "shdditem.hxx"
+#include "udlnitem.hxx"
+#include "wghtitem.hxx"
+#include "wrlmitem.hxx"
+#include "brshitem.hxx"
+#include "cscoitem.hxx"
+
+
+#ifndef _SV_SYSTEM_HXX
+#include <vcl/system.hxx>
+#endif
+
+#include <numitem.hxx>
+#include <bulitem.hxx>
+
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.hxx>
+#endif
+#ifndef _LINGU_LNGPROPS_HHX_
+#include <lingu/lngprops.hxx>
+#endif
+#ifndef _SFX_SFXUNO_HXX
+#include <sfx2/sfxuno.hxx>
+#endif
+
+#ifndef _SV_HELP_HXX //autogen
+#include <vcl/help.hxx>
+#endif
+
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+
+#ifndef _XPOLY_HXX //autogen
+#include <xpoly.hxx>
+#endif
+
+
+#ifndef SVX_LIGHT
+#include <srchdlg.hxx>
+#endif
+
+// Spaeter -> TOOLS\STRING.H (fuer Grep: WS_TARGET)
+
+//using namespace ::rtl;
+//using namespace ::utl;
+using namespace ::com::sun::star;
+//using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::uno;
+//using namespace ::com::sun::star::lang;
+//using namespace ::com::sun::star::beans;
+//using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::linguistic;
+
+
+
+DBG_NAME( EditEngine );
+DBG_NAMEEX( EditView );
+
+#if defined ( DEBUG ) || defined ( DBG_UTIL )
+static sal_Bool bDebugPaint = sal_False;
+#endif
+
+SV_IMPL_VARARR( EECharAttribArray, EECharAttrib );
+
+
+ // ----------------------------------------------------------------------
+// EditEngine
+// ----------------------------------------------------------------------
+EditEngine::EditEngine( SfxItemPool* pItemPool )
+{
+ DBG_CTOR( EditEngine, 0 );
+ pImpEditEngine = new ImpEditEngine( this, pItemPool );
+}
+
+EditEngine::~EditEngine()
+{
+ DBG_DTOR( EditEngine, 0 );
+ delete pImpEditEngine;
+}
+
+void EditEngine::EnableUndo( sal_Bool bEnable )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->EnableUndo( bEnable );
+}
+
+sal_Bool EditEngine::IsUndoEnabled()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->IsUndoEnabled();
+}
+
+sal_Bool EditEngine::IsInUndo()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->IsInUndo();
+}
+
+SfxUndoManager& EditEngine::GetUndoManager()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetUndoManager();
+}
+
+void EditEngine::UndoActionStart( sal_uInt16 nId )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ DBG_ASSERT( !pImpEditEngine->IsInUndo(), "Aufruf von UndoActionStart im Undomodus!" );
+ if ( !pImpEditEngine->IsInUndo() )
+ pImpEditEngine->UndoActionStart( nId );
+}
+
+void EditEngine::UndoActionEnd( sal_uInt16 nId )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ DBG_ASSERT( !pImpEditEngine->IsInUndo(), "Aufruf von UndoActionEnd im Undomodus!" );
+ if ( !pImpEditEngine->IsInUndo() )
+ pImpEditEngine->UndoActionEnd( nId );
+}
+
+void EditEngine::SetRefDevice( OutputDevice* pRefDev )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetRefDevice( pRefDev );
+}
+
+OutputDevice* EditEngine::GetRefDevice() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetRefDevice();
+}
+
+void EditEngine::SetRefMapMode( const MapMode& rMapMode )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetRefMapMode( rMapMode );
+}
+
+MapMode EditEngine::GetRefMapMode()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetRefMapMode();
+}
+
+const SfxItemSet& EditEngine::GetEmptyItemSet()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetEmptyItemSet();
+}
+
+void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ Draw( pOutDev, rOutRect, Point( 0, 0 ) );
+}
+
+void EditEngine::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ // Mit 2 Punkten erzeugen, da bei Positivem Punkt, LONGMAX als Size
+ // Bottom und Right im Bereich > LONGMAX landen.
+ Rectangle aBigRec( rStartPos, Point( 0x7FFFFFFF, 0x7FFFFFFF ) );
+ if( pOutDev->GetConnectMetaFile() )
+ pOutDev->Push();
+ pImpEditEngine->Paint( pOutDev, aBigRec, rStartPos, sal_False, nOrientation );
+ if( pOutDev->GetConnectMetaFile() )
+ pOutDev->Pop();
+}
+
+void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos )
+{
+ Draw( pOutDev, rOutRect, rStartDocPos, sal_True );
+}
+
+void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, sal_Bool bClip )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+#if defined( DBG_UTIL ) || defined( DEBUG )
+ if ( bDebugPaint )
+ EditDbg::ShowEditEngineData( this, sal_False );
+#endif
+
+ // Auf Pixelgrenze ausrichten, damit genau das gleiche
+ // wie bei Paint().
+ Rectangle aOutRect( pOutDev->LogicToPixel( rOutRect ) );
+ aOutRect = pOutDev->PixelToLogic( aOutRect );
+
+ Point aStartPos = aOutRect.TopLeft();
+ aStartPos -= rStartDocPos;
+
+ sal_Bool bClipRegion = pOutDev->IsClipRegion();
+ sal_Bool bMetafile = pOutDev->GetConnectMetaFile() ? sal_True : sal_False;
+ Region aOldRegion = pOutDev->GetClipRegion();
+
+#ifdef EDIT_PRINTER_LOG
+ if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER )
+ {
+ SvFileStream aLog( "d:\\editprn.log", STREAM_WRITE );
+ aLog.Seek( STREAM_SEEK_TO_END );
+ aLog << ' ' << endl << "Printing: ";
+ aLog << GetText( "\n\r" ).GetStr();
+ aLog << endl << endl;
+ aLog << "Ref-Device: " << String( (sal_uInt32)GetRefDevice() ).GetStr() << " Type=" << String( (sal_uInt16)GetRefDevice()->GetOutDevType() ).GetStr() << ", MapX=" << String( GetRefDevice()->GetMapMode().GetScaleX().GetNumerator() ).GetStr() << "/" << String( GetRefDevice()->GetMapMode().GetScaleX().GetDenominator() ).GetStr() <<endl;
+ aLog << "Paper-Width: " << String( GetPaperSize().Width() ).GetStr() << ",\tOut-Width: " << String( rOutRect.GetWidth() ).GetStr() << ",\tCalculated: " << String( CalcTextWidth() ).GetStr() << endl;
+ aLog << "Paper-Height: " << String( GetPaperSize().Height() ).GetStr() << ",\tOut-Height: " << String( rOutRect.GetHeight() ).GetStr() << ",\tCalculated: " << String( GetTextHeight() ).GetStr() << endl;
+
+ aLog << endl;
+ }
+#endif
+
+ // Wenn es eine gab => Schnittmenge !
+ // Bei der Metafileaufzeichnung Push/Pop verwenden.
+ if ( bMetafile )
+ pOutDev->Push();
+
+ // Immer die Intersect-Methode, weil beim Metafile ein Muss!
+ if ( bClip )
+ {
+ // Einige Druckertreiber bereiten Probleme, wenn Buchstaben die
+ // ClipRegion streifen, deshalb lieber ein Pixel mehr...
+ Rectangle aClipRect( aOutRect );
+ if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER )
+ {
+ Size aPixSz( 1, 0 );
+ aPixSz = pOutDev->PixelToLogic( aPixSz );
+ aClipRect.Right() += aPixSz.Width();
+ aClipRect.Bottom() += aPixSz.Width();
+ }
+ pOutDev->IntersectClipRegion( aClipRect );
+ }
+
+ pImpEditEngine->Paint( pOutDev, aOutRect, aStartPos );
+
+ if ( bMetafile )
+ pOutDev->Pop();
+ else if ( bClipRegion )
+ pOutDev->SetClipRegion( aOldRegion );
+ else
+ pOutDev->SetClipRegion();
+}
+
+void EditEngine::InsertView( EditView* pEditView, sal_uInt16 nIndex )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ DBG_CHKOBJ( pEditView, EditView, 0 );
+
+ if ( nIndex > pImpEditEngine->GetEditViews().Count() )
+ nIndex = pImpEditEngine->GetEditViews().Count();
+
+ pImpEditEngine->GetEditViews().Insert( pEditView, nIndex );
+ EditSelection aStartSel;
+ aStartSel = pImpEditEngine->GetEditDoc().GetStartPaM();
+ pEditView->pImpEditView->SetEditSelection( aStartSel );
+ if ( !pImpEditEngine->GetActiveView() )
+ pImpEditEngine->SetActiveView( pEditView );
+}
+
+EditView* EditEngine::RemoveView( EditView* pView )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ DBG_CHKOBJ( pView, EditView, 0 );
+
+ pView->HideCursor();
+ EditView* pRemoved = 0;
+ sal_uInt16 nPos = pImpEditEngine->GetEditViews().GetPos( pView );
+ DBG_ASSERT( nPos != USHRT_MAX, "RemoveView mit ungueltigem Index" );
+ if ( nPos != USHRT_MAX )
+ {
+ pRemoved = pImpEditEngine->GetEditViews().GetObject( nPos );
+ pImpEditEngine->GetEditViews().Remove( nPos );
+ if ( pImpEditEngine->GetActiveView() == pView )
+ {
+ pImpEditEngine->SetActiveView( 0 );
+ pImpEditEngine->GetSelEngine().SetCurView( 0 );
+ }
+ }
+ return pRemoved;
+}
+
+EditView* EditEngine::RemoveView( sal_uInt16 nIndex )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ EditView* pView = pImpEditEngine->GetEditViews().GetObject( nIndex );
+ if ( pView )
+ return RemoveView( pView );
+ return NULL;
+}
+
+EditView* EditEngine::GetView( sal_uInt16 nIndex ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetEditViews().GetObject( nIndex );
+}
+
+sal_uInt16 EditEngine::GetViewCount() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetEditViews().Count();
+}
+
+sal_Bool EditEngine::HasView( EditView* pView ) const
+{
+ return pImpEditEngine->GetEditViews().GetPos( pView ) != USHRT_MAX;
+}
+
+EditView* EditEngine::GetActiveView() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetActiveView();
+}
+
+void EditEngine::SetActiveView( EditView* pView )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( pView )
+ DBG_CHKOBJ( pView, EditView, 0 );
+ pImpEditEngine->SetActiveView( pView );
+}
+
+void EditEngine::SetDefTab( sal_uInt16 nDefTab )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->GetEditDoc().SetDefTab( nDefTab );
+ if ( pImpEditEngine->IsFormatted() )
+ {
+ pImpEditEngine->FormatFullDoc();
+ pImpEditEngine->UpdateViews( (EditView*) 0 );
+ }
+}
+
+sal_uInt16 EditEngine::GetDefTab() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetEditDoc().GetDefTab();
+}
+
+void EditEngine::SetPaperSize( const Size& rNewSize )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ Size aOldSize( pImpEditEngine->GetPaperSize() );
+ pImpEditEngine->SetValidPaperSize( rNewSize );
+ Size aNewSize( pImpEditEngine->GetPaperSize() );
+
+ sal_Bool bAutoPageSize = pImpEditEngine->GetStatus().AutoPageSize();
+ if ( bAutoPageSize || ( aNewSize.Width() != aOldSize.Width() ) )
+ {
+ for ( sal_uInt16 nView = 0; nView < pImpEditEngine->aEditViews.Count(); nView++ )
+ {
+ EditView* pView = pImpEditEngine->aEditViews[nView];
+ DBG_CHKOBJ( pView, EditView, 0 );
+ if ( bAutoPageSize )
+ pView->pImpEditView->RecalcOutputArea();
+ else if ( pView->pImpEditView->DoAutoSize() )
+ {
+ pView->pImpEditView->ResetOutputArea( Rectangle(
+ pView->pImpEditView->GetOutputArea().TopLeft(), aNewSize ) );
+ }
+ }
+
+ if ( bAutoPageSize || pImpEditEngine->IsFormatted() )
+ {
+ // Aendern der Breite hat bei AutoPageSize keine Wirkung, da durch
+ // Textbreite bestimmt.
+ // Optimierung erst nach Vobis-Auslieferung aktivieren...
+// if ( !bAutoPageSize )
+ pImpEditEngine->FormatFullDoc();
+// else
+// {
+// pImpEditEngine->FormatDoc(); // PageSize, falls Aenderung
+// pImpEditEngine->CheckAutoPageSize(); // Falls nichts formatiert wurde
+// }
+
+ pImpEditEngine->UpdateViews( pImpEditEngine->GetActiveView() );
+
+ if ( pImpEditEngine->GetUpdateMode() && pImpEditEngine->GetActiveView() )
+ pImpEditEngine->pActiveView->ShowCursor( sal_False, sal_False );
+ }
+ }
+}
+
+const Size& EditEngine::GetPaperSize() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetPaperSize();
+}
+
+void EditEngine::SetPolygon( const XPolyPolygon& rPoly )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ SetPolygon( rPoly, NULL );
+}
+
+void EditEngine::SetPolygon( const XPolyPolygon& rPoly, const XPolyPolygon* pXorPoly )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ sal_Bool bSimple = sal_False;
+ if( pXorPoly && rPoly.Count() == 1 )
+ {
+ // Handelt es sich um eine offene Kurve?
+ const XPolygon& rP = rPoly[0];
+ sal_uInt32 nCnt = rP.GetPointCount();
+
+ if( nCnt == 0 || ( rP[0] != rP[nCnt - 1] ) )
+ // Offene Kurve
+ bSimple = sal_True;
+ }
+
+ TextRanger* pRanger = new TextRanger( rPoly, pXorPoly, 30, 2, 2, bSimple, sal_True );
+ pImpEditEngine->SetTextRanger( pRanger );
+ pImpEditEngine->SetPaperSize( pRanger->GetBoundRect().GetSize() );
+}
+
+void EditEngine::ClearPolygon()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetTextRanger( 0 );
+}
+
+const PolyPolygon* EditEngine::GetPolygon()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetTextRanger() ?
+ &pImpEditEngine->GetTextRanger()->GetPolyPolygon() : 0;
+}
+
+const Size& EditEngine::GetMinAutoPaperSize() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetMinAutoPaperSize();
+}
+
+void EditEngine::SetMinAutoPaperSize( const Size& rSz )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetMinAutoPaperSize( rSz );
+}
+
+const Size& EditEngine::GetMaxAutoPaperSize() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetMaxAutoPaperSize();
+}
+
+void EditEngine::SetMaxAutoPaperSize( const Size& rSz )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetMaxAutoPaperSize( rSz );
+}
+
+XubString EditEngine::GetText( LineEnd eEnd ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetEditDoc().GetText( eEnd );
+}
+
+XubString EditEngine::GetText( const ESelection& rESelection, const LineEnd eEnd ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ EditSelection aSel( pImpEditEngine->CreateSel( rESelection ) );
+ return pImpEditEngine->GetSelected( aSel, eEnd );
+}
+
+sal_uInt32 EditEngine::GetTextLen() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetEditDoc().GetTextLen();
+}
+
+sal_uInt32 EditEngine::CalcTextWidth()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->CalcTextWidth();
+}
+
+sal_uInt16 EditEngine::GetParagraphCount() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->aEditDoc.Count();
+}
+
+sal_uInt16 EditEngine::GetLineCount( sal_uInt16 nParagraph ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetLineCount( nParagraph );
+}
+
+sal_uInt16 EditEngine::GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetLineLen( nParagraph, nLine );
+}
+
+sal_uInt32 EditEngine::GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ // Falls jemand mit einer leeren Engine ein GetLineHeight() macht.
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
+ return pImpEditEngine->GetLineHeight( nParagraph, nLine );
+}
+
+sal_uInt32 EditEngine::GetMaxFontHeight( sal_uInt16 nParagraph, sal_uInt16 nLine )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetMaxFontHeight( nParagraph, nLine );
+}
+
+sal_uInt16 EditEngine::GetFirstLineOffset( sal_uInt16 nParagraph )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
+ ParaPortion* pPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nParagraph );
+ return ( pPortion ? pPortion->GetFirstLineOffset() : 0 );
+}
+
+sal_uInt32 EditEngine::GetTextHeight( sal_uInt16 nParagraph ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
+
+ sal_uInt32 nHeight = pImpEditEngine->GetParaHeight( nParagraph );
+ return nHeight;
+}
+
+XubString EditEngine::GetWord( sal_uInt16 nPara, sal_uInt16 nIndex )
+{
+ ESelection aESel( nPara, nIndex, nPara, nIndex );
+ EditSelection aSel( pImpEditEngine->CreateSel( aESel ) );
+ aSel = pImpEditEngine->SelectWord( aSel );
+ return pImpEditEngine->GetSelected( aSel );
+}
+
+sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ DBG_CHKOBJ( pEditView, EditView, 0 );
+ DBG_ASSERT( pEditView, "Keine View - keine Kekse !" );
+
+ sal_Bool bDone = sal_True;
+
+#ifndef SVX_LIGHT
+
+ sal_Bool bModified = sal_False;
+ sal_Bool bMoved = sal_False;
+ sal_Bool bEndKey = sal_False; // spezielle CursorPosition
+ sal_Bool bAllowIdle = sal_True;
+ sal_Bool bReadOnly = pEditView->IsReadOnly();
+
+ EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
+ DBG_ASSERT( !aCurSel.IsInvalid(), "Blinde Selection in EditEngine::PostKeyEvent" );
+
+ String aAutoText( pImpEditEngine->GetAutoCompleteText() );
+ if ( pImpEditEngine->GetAutoCompleteText().Len() )
+ pImpEditEngine->SetAutoCompleteText( String(), sal_True );
+
+ sal_uInt16 nCode = rKeyEvent.GetKeyCode().GetCode();
+ KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction();
+ if ( eFunc != KEYFUNC_DONTKNOW )
+ {
+ switch ( eFunc )
+ {
+ case KEYFUNC_CUT:
+ {
+ if ( !bReadOnly )
+ {
+ pImpEditEngine->UndoActionStart( EDITUNDO_CUT );
+ aCurSel = pImpEditEngine->CutCopy( pEditView, sal_True );
+ pImpEditEngine->UndoActionEnd( EDITUNDO_CUT );
+ bModified = sal_True;
+ }
+ }
+ break;
+ case KEYFUNC_COPY:
+ {
+ aCurSel = pImpEditEngine->CutCopy( pEditView, sal_False );
+ }
+ break;
+ case KEYFUNC_PASTE:
+ {
+ if ( !bReadOnly && pEditView->IsPasteEnabled() )
+ {
+ pImpEditEngine->UndoActionStart( EDITUNDO_PASTE );
+ aCurSel = pImpEditEngine->Paste( pEditView, pImpEditEngine->GetStatus().AllowPasteSpecial() );
+ pImpEditEngine->UndoActionEnd( EDITUNDO_PASTE );
+ bModified = sal_True;
+ }
+ }
+ break;
+ case KEYFUNC_UNDO:
+ {
+ if ( !bReadOnly )
+ pEditView->Undo();
+ return sal_True;
+ }
+ // break;
+ case KEYFUNC_REDO:
+ {
+ if ( !bReadOnly )
+ pEditView->Redo();
+ return sal_True;
+ }
+ // break;
+
+ default: // wird dann evtl. unten bearbeitet.
+ eFunc = KEYFUNC_DONTKNOW;
+ }
+ }
+ if ( eFunc == KEYFUNC_DONTKNOW )
+ {
+ switch ( nCode )
+ {
+ #if defined( DBG_UTIL ) || defined( DEBUG )
+ case KEY_F11:
+ {
+ if ( rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() )
+ {
+ bDebugPaint = !bDebugPaint;
+ ByteString aInfo( "DebugPaint: " );
+ aInfo += bDebugPaint ? "On" : "Off";
+ InfoBox( NULL, String( aInfo, RTL_TEXTENCODING_ASCII_US ) ).Execute();
+ }
+ bDone = FALSE;
+ }
+ break;
+ case KEY_F12:
+ {
+ if ( rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() )
+ {
+ EditDbg::ShowEditEngineData( this );
+ #ifdef EDIT_PRINTER_LOG
+ SvFileStream aLog( "d:\\editprn.log", STREAM_WRITE );
+ aLog.Seek( STREAM_SEEK_TO_END );
+ aLog << ' ' << endl << "Debug: ";
+ aLog << GetText( "\n\r" ).GetStr();
+ aLog << endl << endl;
+ aLog << "Ref-Device: " << String( (sal_uInt32)GetRefDevice() ).GetStr() << " Type=" << String( (sal_uInt16)GetRefDevice()->GetOutDevType() ).GetStr() << ", MapX=" << String( GetRefDevice()->GetMapMode().GetScaleX().GetNumerator() ).GetStr() << "/" << String( GetRefDevice()->GetMapMode().GetScaleX().GetDenominator() ).GetStr() <<endl;
+ aLog << "Paper-Width: " << String( GetPaperSize().Width() ).GetStr() << ",\tCalculated: " << String( CalcTextWidth() ).GetStr() << endl;
+ aLog << "Paper-Height: " << String( GetPaperSize().Height() ).GetStr() << ",\tCalculated: " << String( GetTextHeight() ).GetStr() << endl;
+ aLog << endl;
+ #endif
+ }
+ bDone = FALSE;
+ }
+ break;
+ #endif
+ case KEY_UP:
+ case KEY_DOWN:
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ case KEY_HOME:
+ case KEY_END:
+ case KEY_PAGEUP:
+ case KEY_PAGEDOWN:
+ {
+ if ( !rKeyEvent.GetKeyCode().IsMod2() )
+ {
+ aCurSel = pImpEditEngine->MoveCursor( rKeyEvent, pEditView );
+ bMoved = sal_True;
+ if ( nCode == KEY_END )
+ bEndKey = sal_True;
+ }
+ }
+ break;
+ case KEY_BACKSPACE:
+ case KEY_DELETE:
+ {
+ if ( !bReadOnly && !rKeyEvent.GetKeyCode().IsMod2() )
+ {
+ BYTE nDel = ( nCode == KEY_DELETE ) ? DEL_RIGHT : DEL_LEFT;
+ BYTE nMode = rKeyEvent.GetKeyCode().IsMod1() ? DELMODE_RESTOFWORD : DELMODE_SIMPLE;
+ if ( ( nMode == DELMODE_RESTOFWORD ) && rKeyEvent.GetKeyCode().IsShift() )
+ nMode = DELMODE_RESTOFCONTENT;
+ pEditView->pImpEditView->DrawSelection();
+ pImpEditEngine->UndoActionStart( EDITUNDO_DELETE );
+ aCurSel = pImpEditEngine->DeleteLeftOrRight( aCurSel, nDel, nMode );
+ pImpEditEngine->UndoActionEnd( EDITUNDO_DELETE );
+ bModified = sal_True;
+ bAllowIdle = sal_False;
+ }
+ }
+ break;
+ case KEY_TAB:
+ {
+ if ( !bReadOnly && !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
+ {
+ sal_Bool bShift = rKeyEvent.GetKeyCode().IsShift();
+ if ( pImpEditEngine->GetStatus().DoTabIndenting() &&
+ ( aCurSel.Min().GetNode() != aCurSel.Max().GetNode() ) )
+ {
+ pImpEditEngine->IndentBlock( pEditView, !bShift );
+ }
+ else if ( !bShift )
+ {
+ sal_Bool bSel = pEditView->HasSelection();
+ if ( bSel )
+ pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
+ if ( pImpEditEngine->GetStatus().DoAutoCorrect() )
+ aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() );
+ aCurSel = pImpEditEngine->InsertTab( aCurSel );
+ if ( bSel )
+ pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT );
+ bModified = sal_True;
+ }
+ }
+ else
+ bDone = sal_False;
+ }
+ break;
+ case KEY_RETURN:
+ {
+ if ( !bReadOnly )
+ {
+ pEditView->pImpEditView->DrawSelection();
+ if ( !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
+ {
+ pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
+ if ( rKeyEvent.GetKeyCode().IsShift() )
+ aCurSel = pImpEditEngine->InsertLineBreak( aCurSel );
+ else
+ {
+ if ( !aAutoText.Len() )
+ {
+ if ( pImpEditEngine->GetStatus().DoAutoCorrect() )
+ aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() );
+ aCurSel = pImpEditEngine->InsertParaBreak( aCurSel );
+ }
+ else
+ {
+ DBG_ASSERT( !aCurSel.HasRange(), "Selektion bei Complete?!" );
+ EditPaM aStart( pImpEditEngine->WordLeft( aCurSel.Max() ) );
+ aCurSel = pImpEditEngine->InsertText(
+ EditSelection( aStart, aCurSel.Max() ), aAutoText );
+ pImpEditEngine->SetAutoCompleteText( String(), sal_True );
+ }
+ }
+ pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT );
+ bModified = sal_True;
+ }
+ }
+ }
+ break;
+ case KEY_INSERT:
+ {
+ if ( !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
+ pEditView->SetInsertMode( !pEditView->IsInsertMode() );
+ }
+ break;
+ default:
+ {
+ if ( !bReadOnly && IsSimpleCharInput( rKeyEvent ) )
+ {
+ xub_Unicode nCharCode = rKeyEvent.GetCharCode();
+ pEditView->pImpEditView->DrawSelection();
+ // Autokorrektur ?
+ if ( ( pImpEditEngine->GetStatus().DoAutoCorrect() ) &&
+ ( ( nCharCode == ' ' ) || ( nCharCode == '*' ) ||
+ ( nCharCode == '\"' ) || ( nCharCode == '\'' ) ||
+ ( nCharCode == '_' ) ) )
+ {
+ aCurSel = pImpEditEngine->AutoCorrect( aCurSel, nCharCode, !pEditView->IsInsertMode() );
+ }
+ else
+ {
+ aCurSel = pImpEditEngine->InsertText( (const EditSelection&)aCurSel, nCharCode, !pEditView->IsInsertMode() );
+ }
+ // AutoComplete ???
+ if ( pImpEditEngine->GetStatus().DoAutoComplete() && ( nCharCode != ' ' ) )
+ {
+ // Aber nur wenn Wort-Ende...
+ sal_uInt16 nIndex = aCurSel.Max().GetIndex();
+ if ( ( nIndex >= aCurSel.Max().GetNode()->Len() ) ||
+ ( pImpEditEngine->aWordDelimiters.Search( aCurSel.Max().GetNode()->GetChar( nIndex ) ) != STRING_NOTFOUND ) )
+ {
+ EditPaM aStart( pImpEditEngine->WordLeft( aCurSel.Max() ) );
+ String aWord = pImpEditEngine->GetSelected( EditSelection( aStart, aCurSel.Max() ) );
+ if ( aWord.Len() >= 3 )
+ {
+ String aComplete;
+
+ International aInt( Application::GetAppInternational() );
+ if (pImpEditEngine)
+ aInt = International( pImpEditEngine->eDefaultLanguage );
+ for( int n = MONDAY; n <= SUNDAY; ++n )
+ {
+ const String& rDay = aInt.GetDayText( (DayOfWeek)n );
+ // MT: Auf International umstellen, wenn Compare mit Laengenangabe moeglich!
+ if( aWord.CompareIgnoreCaseToAscii( rDay, aWord.Len() ) == COMPARE_EQUAL )
+ {
+ aComplete = rDay;
+ break;
+ }
+ }
+
+ if ( !aComplete.Len() )
+ {
+ for( int n = 1; n <= 12; ++n )
+ {
+ const String& rMon = aInt.GetMonthText( n );
+ // MT: Auf International umstellen, wenn Compare mit Laengenangabe moeglich!
+ if( aWord.CompareIgnoreCaseToAscii( rMon, aWord.Len() ) == COMPARE_EQUAL )
+ {
+ aComplete = rMon;
+ break;
+ }
+ }
+ }
+
+ if( aComplete.Len() && ( ( aWord.Len() + 1 ) < aComplete.Len() ) )
+ {
+ pImpEditEngine->SetAutoCompleteText( aComplete, sal_False );
+ Point aPos = pImpEditEngine->PaMtoEditCursor( aCurSel.Max() ).TopLeft();
+ aPos = pEditView->pImpEditView->GetWindowPos( aPos );
+ aPos = pEditView->pImpEditView->GetWindow()->LogicToPixel( aPos );
+ aPos = pEditView->GetWindow()->OutputToScreenPixel( aPos );
+ aPos.Y() -= 3;
+ Help::ShowQuickHelp( pEditView->GetWindow(), Rectangle( aPos, Size( 1, 1 ) ), aComplete, QUICKHELP_BOTTOM|QUICKHELP_LEFT );
+ }
+ }
+ }
+ }
+ bModified = sal_True;
+ }
+ else
+ bDone = sal_False;
+ }
+ }
+ }
+
+ pEditView->pImpEditView->SetEditSelection( aCurSel );
+ pImpEditEngine->UpdateSelections();
+
+ if ( ( nCode != KEY_UP ) && ( nCode != KEY_DOWN ) )
+ pEditView->pImpEditView->nTravelXPos = TRAVEL_X_DONTKNOW;
+
+ if ( bModified )
+ {
+ DBG_ASSERT( !bReadOnly, "ReadOnly but modified???" );
+ // Idle-Formatter nur, wenn AnyInput.
+ if ( bAllowIdle && pImpEditEngine->GetStatus().UseIdleFormatter()
+ && Application::AnyInput( INPUT_KEYBOARD) )
+ pImpEditEngine->IdleFormatAndUpdate( pEditView );
+ else
+ pImpEditEngine->FormatAndUpdate( pEditView );
+ }
+ else if ( bMoved )
+ {
+ sal_Bool bGotoCursor = pEditView->pImpEditView->DoAutoScroll();
+ pEditView->pImpEditView->ShowCursor( bGotoCursor, sal_True, bEndKey );
+ pImpEditEngine->CallStatusHdl();
+ }
+
+#endif
+
+ return bDone;
+}
+
+sal_uInt32 EditEngine::GetTextHeight() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
+
+ sal_uInt32 nHeight = pImpEditEngine->GetTextHeight();
+ return nHeight;
+}
+
+void EditEngine::SetUpdateMode( sal_Bool bUpdate )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetUpdateMode( bUpdate );
+ if ( pImpEditEngine->pActiveView )
+ pImpEditEngine->pActiveView->ShowCursor( sal_False, sal_False );
+}
+
+sal_Bool EditEngine::GetUpdateMode() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetUpdateMode();
+}
+
+void EditEngine::Clear()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->Clear();
+}
+
+void EditEngine::SetText( const XubString& rText )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetText( rText );
+ if ( rText.Len() )
+ pImpEditEngine->FormatAndUpdate();
+}
+
+sal_uInt32 EditEngine::Read( SvStream& rInput, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs /* = NULL */ )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ sal_Bool bUndoEnabled = pImpEditEngine->IsUndoEnabled();
+ pImpEditEngine->EnableUndo( sal_False );
+ pImpEditEngine->SetText( XubString() );
+ EditPaM aPaM( pImpEditEngine->GetEditDoc().GetStartPaM() );
+ pImpEditEngine->Read( rInput, eFormat, EditSelection( aPaM, aPaM ), pHTTPHeaderAttrs );
+ pImpEditEngine->EnableUndo( bUndoEnabled );
+ return rInput.GetError();
+}
+
+sal_uInt32 EditEngine::Write( SvStream& rOutput, EETextFormat eFormat )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ EditPaM aStartPaM( pImpEditEngine->GetEditDoc().GetStartPaM() );
+ EditPaM aEndPaM( pImpEditEngine->GetEditDoc().GetEndPaM() );
+ pImpEditEngine->Write( rOutput, eFormat, EditSelection( aStartPaM, aEndPaM ) );
+ return rOutput.GetError();
+}
+
+EditTextObject* EditEngine::CreateTextObject()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->CreateTextObject();
+}
+
+EditTextObject* EditEngine::CreateTextObject( const ESelection& rESelection )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ EditSelection aSel( pImpEditEngine->CreateSel( rESelection ) );
+ return pImpEditEngine->CreateTextObject( aSel );
+}
+
+void EditEngine::SetText( const EditTextObject& rTextObject )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetText( rTextObject );
+ pImpEditEngine->FormatAndUpdate();
+}
+
+void EditEngine::ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->ShowParagraph( nParagraph, bShow );
+}
+
+sal_Bool EditEngine::IsParagraphVisible( sal_uInt16 nParagraph )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->IsParagraphVisible( nParagraph );
+}
+
+void EditEngine::SetStatusEventHdl( const Link& rLink )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetStatusEventHdl( rLink );
+}
+
+Link EditEngine::GetStatusEventHdl() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetStatusEventHdl();
+}
+
+void EditEngine::SetImportHdl( const Link& rLink )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->aImportHdl = rLink;
+}
+
+Link EditEngine::GetImportHdl() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->aImportHdl;
+}
+
+EditTextObject* EditEngine::CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ DBG_ASSERT( nPara < pImpEditEngine->GetEditDoc().Count(), "CreateTextObject: Startpara out of Range" );
+ DBG_ASSERT( nPara+nParas-1 < pImpEditEngine->GetEditDoc().Count(), "CreateTextObject: Endpara out of Range" );
+
+ ContentNode* pStartNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
+ ContentNode* pEndNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara+nParas-1 );
+ DBG_ASSERT( pStartNode, "Start-Absatz existiert nicht: CreateTextObject" );
+ DBG_ASSERT( pEndNode, "End-Absatz existiert nicht: CreateTextObject" );
+
+ if ( pStartNode && pEndNode )
+ {
+ EditSelection aTmpSel;
+ aTmpSel.Min() = EditPaM( pStartNode, 0 );
+ aTmpSel.Max() = EditPaM( pEndNode, pEndNode->Len() );
+ return pImpEditEngine->CreateTextObject( aTmpSel );
+ }
+ return 0;
+}
+
+void EditEngine::RemoveParagraph( sal_uInt16 nPara )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ DBG_ASSERT( pImpEditEngine->GetEditDoc().Count() > 1, "Der erste Absatz darf nicht geloescht werden!" );
+ if( pImpEditEngine->GetEditDoc().Count() <= 1 )
+ return;
+
+ ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
+ ParaPortion* pPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nPara );
+ DBG_ASSERT( pPortion && pNode, "Absatz nicht gefunden: RemoveParagraph" );
+ if ( pNode && pPortion )
+ {
+ // Keine Undokappselung noetig.
+ pImpEditEngine->ImpRemoveParagraph( nPara );
+ pImpEditEngine->InvalidateFromParagraph( nPara );
+ pImpEditEngine->UpdateSelections();
+ pImpEditEngine->FormatAndUpdate();
+ }
+}
+
+sal_uInt16 EditEngine::GetTextLen( sal_uInt16 nPara ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
+ DBG_ASSERT( pNode, "Absatz nicht gefunden: GetTextLen" );
+ if ( pNode )
+ return pNode->Len();
+ return 0;
+}
+
+XubString EditEngine::GetText( sal_uInt16 nPara ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ XubString aStr;
+ if ( nPara < pImpEditEngine->GetEditDoc().Count() )
+ aStr = pImpEditEngine->GetEditDoc().GetParaAsString( nPara );
+ return aStr;
+}
+
+void EditEngine::ClearModifyFlag()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetModifyFlag( sal_False );
+}
+
+void EditEngine::SetModified()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetModifyFlag( sal_True );
+}
+
+sal_Bool EditEngine::IsModified() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->IsModified();
+}
+
+sal_Bool EditEngine::IsInSelectionMode() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return ( pImpEditEngine->IsInSelectionMode() ||
+ pImpEditEngine->GetSelEngine().IsInSelection() );
+}
+
+void EditEngine::StopSelectionMode()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->StopSelectionMode();
+}
+
+void EditEngine::InsertParagraph( sal_uInt16 nPara, const EditTextObject& rTxtObj )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( nPara > GetParagraphCount() )
+ {
+ DBG_ASSERTWARNING( nPara == USHRT_MAX, "AbsatzNr zu Groá, aber nicht LIST_APPEND! " );
+ nPara = GetParagraphCount();
+ }
+ // Keine Undoklammerung noetig.
+ EditPaM aPaM( pImpEditEngine->InsertParagraph( nPara ) );
+ // Bei einem InsertParagraph von aussen sollen keine Harten
+ // Attribute uebernommen werden !
+ pImpEditEngine->RemoveCharAttribs( nPara );
+ pImpEditEngine->InsertText( rTxtObj, EditSelection( aPaM, aPaM ) );
+ pImpEditEngine->FormatAndUpdate();
+}
+
+void EditEngine::InsertParagraph( sal_uInt16 nPara, const XubString& rTxt )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( nPara > GetParagraphCount() )
+ {
+ DBG_ASSERTWARNING( nPara == USHRT_MAX, "AbsatzNr zu Groá, aber nicht LIST_APPEND! " );
+ nPara = GetParagraphCount();
+ }
+
+ pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
+ EditPaM aPaM( pImpEditEngine->InsertParagraph( nPara ) );
+ // Bei einem InsertParagraph von aussen sollen keine Harten
+ // Attribute uebernommen werden !
+ pImpEditEngine->RemoveCharAttribs( nPara );
+ pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT );
+ pImpEditEngine->ImpInsertText( EditSelection( aPaM, aPaM ), rTxt );
+ pImpEditEngine->FormatAndUpdate();
+}
+
+void EditEngine::SetText( sal_uInt16 nPara, const EditTextObject& rTxtObj )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ EditSelection* pSel = pImpEditEngine->SelectParagraph( nPara );
+ if ( pSel )
+ {
+ pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
+ pImpEditEngine->InsertText( rTxtObj, *pSel );
+ pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT );
+ pImpEditEngine->FormatAndUpdate();
+ delete pSel;
+ }
+}
+
+void EditEngine::SetText( sal_uInt16 nPara, const XubString& rTxt )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ EditSelection* pSel = pImpEditEngine->SelectParagraph( nPara );
+ if ( pSel )
+ {
+ pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
+ pImpEditEngine->ImpInsertText( *pSel, rTxt );
+ pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT );
+ pImpEditEngine->FormatAndUpdate();
+ delete pSel;
+ }
+}
+
+void EditEngine::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ // Keine Undoklammerung noetig.
+ pImpEditEngine->SetParaAttribs( nPara, rSet );
+ pImpEditEngine->FormatAndUpdate();
+}
+
+const SfxItemSet& EditEngine::GetParaAttribs( sal_uInt16 nPara ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetParaAttribs( nPara );
+}
+
+sal_Bool EditEngine::HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->HasParaAttrib( nPara, nWhich );
+}
+
+const SfxPoolItem& EditEngine::GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetParaAttrib( nPara, nWhich );
+}
+
+void EditEngine::GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->GetCharAttribs( nPara, rLst );
+}
+
+SfxItemSet EditEngine::GetAttribs( const ESelection& rSel )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ EditSelection aSel( pImpEditEngine->
+ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+ return pImpEditEngine->GetAttribs( aSel );
+}
+
+Font EditEngine::GetStandardFont( sal_uInt16 nPara )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return GetStandardSvxFont( nPara );
+}
+
+SvxFont EditEngine::GetStandardSvxFont( sal_uInt16 nPara )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
+ return pNode->GetCharAttribs().GetDefFont();
+}
+
+void EditEngine::StripPortions()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ VirtualDevice aTmpDev;
+ Rectangle aBigRec( Point( 0, 0 ), Size( 0x7FFFFFFF, 0x7FFFFFFF ) );
+ pImpEditEngine->Paint( &aTmpDev, aBigRec, Point( 0, 0 ), sal_True );
+}
+
+void EditEngine::GetPortions( sal_uInt16 nPara, SvUShorts& rList )
+{
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatFullDoc();
+
+ ParaPortion* pParaPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nPara );
+ if ( pParaPortion )
+ {
+ sal_uInt16 nEnd = 0;
+ sal_uInt16 nTextPortions = pParaPortion->GetTextPortions().Count();
+ for ( sal_uInt16 n = 0; n < nTextPortions; n++ )
+ {
+ nEnd += pParaPortion->GetTextPortions()[n]->GetLen();
+ rList.Insert( nEnd, rList.Count() );
+ }
+ }
+}
+
+void EditEngine::SetFlatMode( sal_Bool bFlat)
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetFlatMode( bFlat );
+}
+
+sal_Bool EditEngine::IsFlatMode() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return !( pImpEditEngine->aStatus.UseCharAttribs() );
+}
+
+void EditEngine::SetControlWord( sal_uInt32 nWord )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ if ( nWord != pImpEditEngine->aStatus.GetControlWord() )
+ {
+ sal_uInt32 nPrev = pImpEditEngine->aStatus.GetControlWord();
+ pImpEditEngine->aStatus.GetControlWord() = nWord;
+
+ sal_uInt32 nChanges = nPrev ^ nWord;
+ if ( pImpEditEngine->IsFormatted() )
+ {
+ // ggf. neu formatieren:
+ if ( ( nChanges & EE_CNTRL_USECHARATTRIBS ) ||
+ ( nChanges & EE_CNTRL_USEPARAATTRIBS ) ||
+ ( nChanges & EE_CNTRL_ONECHARPERLINE ) ||
+ ( nChanges & EE_CNTRL_STRETCHING ) ||
+ ( nChanges & EE_CNTRL_OUTLINER ) ||
+ ( nChanges & EE_CNTRL_NOCOLORS ) ||
+ ( nChanges & EE_CNTRL_OUTLINER2 ) )
+ {
+ if ( ( nChanges & EE_CNTRL_USECHARATTRIBS ) ||
+ ( nChanges & EE_CNTRL_USEPARAATTRIBS ) )
+ {
+ sal_Bool bUseCharAttribs = ( nWord & EE_CNTRL_USECHARATTRIBS ) ? sal_True : sal_False;
+ pImpEditEngine->GetEditDoc().CreateDefFont( bUseCharAttribs );
+ }
+
+ pImpEditEngine->FormatFullDoc();
+ pImpEditEngine->UpdateViews( pImpEditEngine->GetActiveView() );
+ }
+ }
+
+#ifndef SVX_LIGHT
+ sal_Bool bSpellingChanged = nChanges & EE_CNTRL_ONLINESPELLING ? sal_True : sal_False;
+ sal_Bool bRedLinesChanged = nChanges & EE_CNTRL_NOREDLINES ? sal_True : sal_False;
+
+ if ( bSpellingChanged || bRedLinesChanged )
+ {
+ pImpEditEngine->StopOnlineSpellTimer();
+ if ( bSpellingChanged && ( nWord & EE_CNTRL_ONLINESPELLING ) )
+ {
+ // WrongListen anlegen, Timer starten...
+ sal_uInt16 nNodes = pImpEditEngine->GetEditDoc().Count();
+ for ( sal_uInt16 n = 0; n < nNodes; n++ )
+ {
+ ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( n );
+ pNode->CreateWrongList();
+ }
+ pImpEditEngine->StartOnlineSpellTimer();
+ }
+ else
+ {
+ long nY = 0;
+ sal_uInt16 nNodes = pImpEditEngine->GetEditDoc().Count();
+ for ( sal_uInt16 n = 0; n < nNodes; n++ )
+ {
+ ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( n );
+ ParaPortion* pPortion = pImpEditEngine->GetParaPortions().GetObject( n );
+ sal_Bool bWrongs = ( bSpellingChanged || ( nWord & EE_CNTRL_ONLINESPELLING ) ) ? pNode->GetWrongList()->HasWrongs() : sal_False;
+ if ( bSpellingChanged ) // Also aus
+ pNode->DestroyWrongList(); // => vorm Paint weghaun.
+ if ( bWrongs )
+ {
+ pImpEditEngine->aInvalidRec.Left() = 0;
+ pImpEditEngine->aInvalidRec.Right() = pImpEditEngine->GetPaperSize().Width();
+ pImpEditEngine->aInvalidRec.Top() = nY+1;
+ pImpEditEngine->aInvalidRec.Bottom() = nY+pPortion->GetHeight()-1;
+ pImpEditEngine->UpdateViews( pImpEditEngine->pActiveView );
+ }
+ nY += pPortion->GetHeight();
+ }
+ }
+ }
+#endif // !SVX_LIGHT
+ }
+}
+
+sal_uInt32 EditEngine::GetControlWord() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->aStatus.GetControlWord();
+}
+
+long EditEngine::GetFirstLineStartX( sal_uInt16 nParagraph )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ long nX = 0;
+ ParaPortion* pPPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nParagraph );
+ if ( pPPortion )
+ {
+ DBG_ASSERT( pImpEditEngine->IsFormatted(), "GetDocPosTopLeft: Doc nicht formatiert" );
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
+ EditLine* pFirstLine = pPPortion->GetLines()[0];
+ nX = pFirstLine->GetStartPosX();
+ }
+ return nX;
+}
+
+Point EditEngine::GetDocPosTopLeft( sal_uInt16 nParagraph )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ DBG_ASSERT( pImpEditEngine->IsFormatted(), "GetDocPosTopLeft: Doc nicht formatiert" );
+ ParaPortion* pPPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nParagraph );
+ DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetWindowPosTopLeft" );
+ Point aPoint;
+ if ( pPPortion )
+ {
+ // Falls jemand mit einer leeren Engine ein GetLineHeight() macht.
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
+ if ( pPPortion->GetLines().Count() )
+ {
+ // So richtiger, falls grosses Bullet.
+ EditLine* pFirstLine = pPPortion->GetLines()[0];
+ aPoint.X() = pFirstLine->GetStartPosX();
+ }
+ else
+ {
+ const SvxLRSpaceItem& rLRItem = pImpEditEngine->GetLRSpaceItem( pPPortion->GetNode() );
+ aPoint.X() = pImpEditEngine->GetXValue( (short)(rLRItem.GetTxtLeft() + rLRItem.GetTxtFirstLineOfst()) );
+ }
+ aPoint.Y() = pImpEditEngine->GetParaPortions().GetYOffset( pPPortion );
+ }
+ return aPoint;
+}
+
+sal_Bool EditEngine::IsTextPos( const Point& rDocPos, sal_uInt16 nBorder )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ sal_Bool bTextPos = sal_False;
+ if ( ( rDocPos.Y() > 0 ) && ( rDocPos.Y() < (long)GetTextHeight() ) )
+ {
+ EditPaM aPaM = pImpEditEngine->GetPaM( rDocPos, sal_False );
+ if ( aPaM.GetNode() )
+ {
+ ParaPortion* pParaPortion = pImpEditEngine->FindParaPortion( aPaM.GetNode() );
+ DBG_ASSERT( pParaPortion, "ParaPortion?" );
+ sal_uInt16 nLine = pParaPortion->GetLineNumber( aPaM.GetIndex() );
+ EditLine* pLine = pParaPortion->GetLines().GetObject( nLine );
+ if ( ( rDocPos.X() >= pLine->GetStartPosX() - nBorder ) &&
+ ( rDocPos.X() <= pLine->GetStartPosX() +
+ pImpEditEngine->CalcLineWidth( pParaPortion, pLine ) + nBorder ) )
+ {
+ bTextPos = sal_True;
+ }
+ }
+ }
+ return bTextPos;
+}
+
+void EditEngine::SetEditTextObjectPool( SfxItemPool* pPool )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetEditTextObjectPool( pPool );
+}
+
+SfxItemPool* EditEngine::GetEditTextObjectPool() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetEditTextObjectPool();
+}
+
+void EditEngine::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ EditSelection aSel( pImpEditEngine->
+ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+
+ pImpEditEngine->SetAttribs( aSel, rSet );
+}
+
+void EditEngine::QuickMarkInvalid( const ESelection& rSel )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ DBG_ASSERT( rSel.nStartPara < pImpEditEngine->GetEditDoc().Count(), "MarkInvalid: Start out of Range!" );
+ DBG_ASSERT( rSel.nEndPara < pImpEditEngine->GetEditDoc().Count(), "MarkInvalid: End out of Range!" );
+ for ( sal_uInt16 nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
+ {
+ ParaPortion* pPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nPara );
+ if ( pPortion )
+ pPortion->MarkSelectionInvalid( 0, pPortion->GetNode()->Len() );
+ }
+}
+
+void EditEngine::QuickInsertText( const XubString& rText, const ESelection& rSel )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ EditSelection aSel( pImpEditEngine->
+ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+
+ pImpEditEngine->ImpInsertText( aSel, rText );
+}
+
+void EditEngine::QuickDelete( const ESelection& rSel )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ EditSelection aSel( pImpEditEngine->
+ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+
+ pImpEditEngine->ImpDeleteSelection( aSel );
+}
+
+void EditEngine::QuickMarkToBeRepainted( sal_uInt16 nPara )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ ParaPortion* pPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nPara );
+ if ( pPortion )
+ pPortion->SetMustRepaint( sal_True );
+}
+
+void EditEngine::QuickInsertLineBreak( const ESelection& rSel )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ EditSelection aSel( pImpEditEngine->
+ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+
+ pImpEditEngine->InsertLineBreak( aSel );
+}
+
+void EditEngine::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ EditSelection aSel( pImpEditEngine->
+ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+
+ pImpEditEngine->ImpInsertFeature( aSel, rFld );
+}
+
+void EditEngine::QuickFormatDoc( sal_Bool bFull )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( bFull )
+ pImpEditEngine->FormatFullDoc();
+ else
+ pImpEditEngine->FormatDoc();
+ pImpEditEngine->UpdateViews( pImpEditEngine->GetActiveView() );
+}
+
+void EditEngine::QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->RemoveCharAttribs( nPara, nWhich );
+}
+
+void EditEngine::SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetStyleSheet( nPara, pStyle );
+}
+
+SfxStyleSheet* EditEngine::GetStyleSheet( sal_uInt16 nPara ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetStyleSheet( nPara );
+}
+
+void EditEngine::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetStyleSheetPool( pSPool );
+}
+
+SfxStyleSheetPool* EditEngine::GetStyleSheetPool()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetStyleSheetPool();
+}
+
+void EditEngine::SetWordDelimiters( const XubString& rDelimiters )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->aWordDelimiters = rDelimiters;
+ if ( pImpEditEngine->aWordDelimiters.Search( CH_FEATURE ) == STRING_NOTFOUND )
+ pImpEditEngine->aWordDelimiters.Insert( CH_FEATURE );
+}
+
+XubString EditEngine::GetWordDelimiters() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->aWordDelimiters;
+}
+
+void EditEngine::SetGroupChars( const XubString& rChars )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ DBG_ASSERT( ( rChars.Len() % 2 ) == 0, "SetGroupChars: Ungerade Anzahl!" );
+ pImpEditEngine->aGroupChars = rChars;
+}
+
+XubString EditEngine::GetGroupChars() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->aGroupChars;
+}
+
+void EditEngine::EnablePasteSpecial( sal_Bool bEnable )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( bEnable )
+ pImpEditEngine->GetStatus().TurnOnFlags( EE_CNTRL_PASTESPECIAL );
+ else
+ pImpEditEngine->GetStatus().TurnOffFlags( EE_CNTRL_PASTESPECIAL );
+}
+
+sal_Bool EditEngine::IsPasteSpecialEnabled() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetStatus().AllowPasteSpecial();
+}
+
+void EditEngine::EnableIdleFormatter( sal_Bool bEnable )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( bEnable )
+ pImpEditEngine->GetStatus().TurnOnFlags( EE_CNTRL_DOIDLEFORMAT );
+ else
+ pImpEditEngine->GetStatus().TurnOffFlags( EE_CNTRL_DOIDLEFORMAT);
+}
+
+sal_Bool EditEngine::IsIdleFormatterEnabled() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetStatus().UseIdleFormatter();
+}
+
+void EditEngine::EraseVirtualDevice()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->EraseVirtualDevice();
+}
+
+void EditEngine::SetSpeller( Reference< XSpellChecker1 > &xSpeller )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetSpeller( xSpeller );
+}
+Reference< XSpellChecker1 > EditEngine::GetSpeller()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetSpeller();
+}
+Reference< XHyphenator > EditEngine::GetHyphenator() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetHyphenator();
+}
+
+void EditEngine::SetHyphenator( Reference< XHyphenator > & xHyph )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetHyphenator( xHyph );
+}
+
+void EditEngine::SetDefaultLanguage( LanguageType eLang )
+{
+ pImpEditEngine->SetLanguage( eLang );
+}
+
+LanguageType EditEngine::GetDefaultLanguage() const
+{
+ return pImpEditEngine->GetLanguage();
+}
+
+sal_Bool __EXPORT EditEngine::SpellNextDocument()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return sal_False;
+}
+
+EESpellState EditEngine::HasSpellErrors( LanguageType eLang )
+{
+#ifdef SVX_LIGHT
+ return EE_SPELL_NOSPELLER;
+#else
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( !pImpEditEngine->GetSpeller().is() )
+ return EE_SPELL_NOSPELLER;
+
+ pImpEditEngine->eDefaultLanguage = eLang;
+ return pImpEditEngine->HasSpellErrors();
+#endif
+}
+
+sal_Bool EditEngine::HasText( const SvxSearchItem& rSearchItem )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->HasText( rSearchItem );
+}
+
+void EditEngine::SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetCharStretching( nX, nY );
+}
+
+void EditEngine::GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->GetCharStretching( rX, rY );
+}
+
+void EditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->DoStretchChars( nX, nY );
+}
+
+void EditEngine::SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ pImpEditEngine->SetBigTextObjectStart( nStartAtPortionCount );
+}
+
+sal_uInt16 EditEngine::GetBigTextObjectStart() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return pImpEditEngine->GetBigTextObjectStart();
+}
+
+sal_Bool EditEngine::ShouldCreateBigTextObject() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ sal_uInt16 nTextPortions = 0;
+ sal_uInt16 nParas = pImpEditEngine->GetEditDoc().Count();
+ for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ )
+ {
+ ParaPortion* pParaPortion = pImpEditEngine->GetParaPortions()[nPara];
+ nTextPortions += pParaPortion->GetTextPortions().Count();
+ }
+ return ( nTextPortions >= pImpEditEngine->GetBigTextObjectStart() ) ? sal_True : sal_False;
+}
+
+sal_Bool EditEngine::UpdateFields()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ sal_Bool bChanges = pImpEditEngine->UpdateFields();
+ if ( bChanges )
+ pImpEditEngine->FormatAndUpdate();
+ return bChanges;
+}
+
+void EditEngine::RemoveFields( sal_Bool bKeepFieldText, TypeId aType )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ if ( bKeepFieldText )
+ pImpEditEngine->UpdateFields();
+
+ sal_uInt16 nParas = pImpEditEngine->GetEditDoc().Count();
+ for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ )
+ {
+ ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( nPara );
+ const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs();
+ for ( sal_uInt16 nAttr = rAttrs.Count(); nAttr; )
+ {
+ const EditCharAttrib* pAttr = rAttrs[--nAttr];
+ if ( pAttr->Which() == EE_FEATURE_FIELD )
+ {
+ const SvxFieldData* pFldData = ((const SvxFieldItem*)pAttr->GetItem())->GetField();
+ if ( pFldData && ( !aType || ( pFldData->IsA( aType ) ) ) )
+ {
+ DBG_ASSERT( pAttr->GetItem()->ISA( SvxFieldItem ), "Kein FeldItem..." );
+ EditSelection aSel( EditPaM( pNode, pAttr->GetStart() ), EditPaM( pNode, pAttr->GetEnd() ) );
+ String aFieldText = ((EditCharAttribField*)pAttr)->GetFieldValue();
+ pImpEditEngine->ImpInsertText( aSel, aFieldText );
+ }
+ }
+ }
+ }
+}
+
+sal_Bool EditEngine::CopyClipboard() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ const EditDoc& rDoc = pImpEditEngine->GetEditDoc();
+
+ EditSelection aSel( rDoc.GetStartPaM(), rDoc.GetEndPaM() );
+ if ( aSel.HasRange() )
+ {
+ pImpEditEngine->CopyData( aSel, EXCHANGE_CLIPBOARD );
+ return sal_True;
+ }
+ return sal_False;
+}
+
+sal_Bool EditEngine::CopyClipboard( const ESelection& rSel ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ EditSelection aSel( pImpEditEngine->
+ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+
+ if ( aSel.HasRange() )
+ {
+ pImpEditEngine->CopyData( aSel, EXCHANGE_CLIPBOARD );
+ return sal_True;
+ }
+ return sal_False;
+}
+
+sal_Bool EditEngine::PasteClipboard()
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( !pImpEditEngine->HasData( EXCHANGE_CLIPBOARD, sal_True ) )
+ return sal_False;
+ SetText( String() );
+ EditPaM aPaM = pImpEditEngine->GetEditDoc().GetStartPaM();
+ pImpEditEngine->PasteData( aPaM, EXCHANGE_CLIPBOARD, sal_True );
+ return sal_True;
+}
+
+sal_Bool EditEngine::CopyDragServer() const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ const EditDoc& rDoc = pImpEditEngine->GetEditDoc();
+
+ EditSelection aSel( rDoc.GetStartPaM(), rDoc.GetEndPaM() );
+ if ( aSel.HasRange() )
+ {
+ pImpEditEngine->CopyData( aSel, EXCHANGE_DRAGSERVER );
+ return sal_True;
+ }
+ return sal_False;
+}
+
+sal_Bool EditEngine::CopyDragServer( const ESelection& rSel ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ EditSelection aSel( pImpEditEngine->
+ ConvertSelection( rSel.nStartPara, rSel.nStartPos, rSel.nEndPara, rSel.nEndPos ) );
+
+ if ( aSel.HasRange() )
+ {
+ pImpEditEngine->CopyData( aSel, EXCHANGE_DRAGSERVER );
+ return sal_True;
+ }
+ return sal_False;
+}
+
+sal_Bool EditEngine::PasteDragServer( sal_uInt16 nItem )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( !pImpEditEngine->HasData( EXCHANGE_DRAGSERVER, sal_True ) )
+ return sal_False;
+ SetText( String() );
+ EditPaM aPaM = pImpEditEngine->GetEditDoc().GetStartPaM();
+ pImpEditEngine->PasteData( aPaM, EXCHANGE_DRAGSERVER, sal_True );
+ return sal_True;
+}
+
+sal_Bool EditEngine::HasOnlineSpellErrors() const
+{
+#ifndef SVX_LIGHT
+ DBG_CHKTHIS( EditEngine, 0 );
+ sal_uInt16 nNodes = pImpEditEngine->GetEditDoc().Count();
+ for ( sal_uInt16 n = 0; n < nNodes; n++ )
+ {
+ ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( n );
+ if ( pNode->GetWrongList() && pNode->GetWrongList()->Count() )
+ return sal_True;
+ }
+#endif // !SVX_LIGHT
+ return sal_False;
+}
+
+void EditEngine::CompleteOnlineSpelling()
+{
+#ifndef SVX_LIGHT
+ DBG_CHKTHIS( EditEngine, 0 );
+ if ( pImpEditEngine->GetStatus().DoOnlineSpelling() )
+ {
+ pImpEditEngine->StopOnlineSpellTimer();
+ pImpEditEngine->DoOnlineSpelling( 0, sal_True, sal_False );
+ }
+#endif SVX_LIGHT
+}
+
+USHORT EditEngine::FindParagraph( long nDocPosY )
+{
+ return pImpEditEngine->GetParaPortions().FindParagraph( nDocPosY );
+}
+
+ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+
+ // Funktioniert nur, wenn nicht bereits in der Formatierung...
+ if ( !pImpEditEngine->IsFormatted() )
+ pImpEditEngine->FormatDoc();
+
+ ParagraphInfos aInfos;
+ aInfos.bValid = pImpEditEngine->IsFormatted();
+ if ( pImpEditEngine->IsFormatted() )
+ {
+ ParaPortion* pParaPortion = pImpEditEngine->GetParaPortions()[nPara];
+ EditLine* pLine = pParaPortion ? pParaPortion->GetLines().GetObject( 0 ) : NULL;
+ DBG_ASSERT( pParaPortion && pLine, "GetParagraphInfos - Paragraph out of range" );
+ if ( pParaPortion && pLine )
+ {
+ aInfos.nParaHeight = pParaPortion->GetHeight();
+ aInfos.nLines = pParaPortion->GetLines().Count();
+ aInfos.nFirstLineStartX = pLine->GetStartPosX();
+ aInfos.nFirstLineOffset = pParaPortion->GetFirstLineOffset();
+ aInfos.nFirstLineHeight = pLine->GetHeight();
+ aInfos.nFirstLineTextHeight = pLine->GetTxtHeight();
+ aInfos.nFirstLineMaxAscent = pLine->GetMaxAscent();
+ }
+ }
+ return aInfos;
+}
+
+ // =====================================================================
+// ====================== Virtuelle Methoden =======================
+// =====================================================================
+void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, const long*, const SvxFont&, sal_uInt16 nPara, sal_uInt16 nIndex )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+}
+
+void __EXPORT EditEngine::PaintingFirstLine( sal_uInt16, const Point&, long, const Point&, short, OutputDevice* )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+}
+
+void __EXPORT EditEngine::ParagraphInserted( sal_uInt16 )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+}
+
+void __EXPORT EditEngine::ParagraphDeleted( sal_uInt16 )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+}
+
+sal_Bool __EXPORT EditEngine::FormattingParagraph( sal_uInt16 )
+{
+ // return sal_True, wenn die Attribute geaendert wurden...
+ DBG_CHKTHIS( EditEngine, 0 );
+ return sal_False;
+}
+
+void __EXPORT EditEngine::ParaAttribsChanged( sal_uInt16 /* nParagraph */ )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+}
+
+void __EXPORT EditEngine::StyleSheetChanged( SfxStyleSheet* /* pStyle */ )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+}
+
+void __EXPORT EditEngine::ParagraphHeightChanged( sal_uInt16 )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+}
+
+XubString __EXPORT EditEngine::GetUndoComment( sal_uInt16 nId ) const
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ XubString aComment;
+ switch ( nId )
+ {
+ case EDITUNDO_REMOVECHARS:
+ case EDITUNDO_CONNECTPARAS:
+ case EDITUNDO_REMOVEFEATURE:
+ case EDITUNDO_DELCONTENT:
+ case EDITUNDO_DELETE:
+ case EDITUNDO_CUT:
+ aComment = XubString( EditResId( RID_EDITUNDO_DEL ) );
+ break;
+ case EDITUNDO_MOVEPARAGRAPHS:
+ case EDITUNDO_MOVEPARAS:
+ case EDITUNDO_DRAGANDDROP:
+ aComment = XubString( EditResId( RID_EDITUNDO_MOVE ) );
+ break;
+ case EDITUNDO_INSERTFEATURE:
+ case EDITUNDO_SPLITPARA:
+ case EDITUNDO_INSERTCHARS:
+ case EDITUNDO_PASTE:
+ case EDITUNDO_INSERT:
+ case EDITUNDO_READ:
+ aComment = XubString( EditResId( RID_EDITUNDO_INSERT ) );
+ break;
+ case EDITUNDO_SRCHANDREPL:
+ case EDITUNDO_REPLACEALL:
+ aComment = XubString( EditResId( RID_EDITUNDO_REPLACE ) );
+ break;
+ case EDITUNDO_ATTRIBS:
+ case EDITUNDO_PARAATTRIBS:
+ case EDITUNDO_STRETCH:
+ aComment = XubString( EditResId( RID_EDITUNDO_SETATTRIBS ) );
+ break;
+ case EDITUNDO_RESETATTRIBS:
+ aComment = XubString( EditResId( RID_EDITUNDO_RESETATTRIBS ) );
+ break;
+ case EDITUNDO_STYLESHEET:
+ aComment = XubString( EditResId( RID_EDITUNDO_SETSTYLE ) );
+ break;
+ case EDITUNDO_INDENTBLOCK:
+ case EDITUNDO_UNINDENTBLOCK:
+ aComment = XubString( EditResId( RID_EDITUNDO_INDENT ) );
+ break;
+ }
+ return aComment;
+}
+
+Rectangle EditEngine::GetBulletArea( sal_uInt16 nPara )
+{
+ return Rectangle( Point(), Point() );
+}
+
+XubString __EXPORT EditEngine::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16, sal_uInt16, Color*&, Color*& )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+ return ' ';
+}
+
+void __EXPORT EditEngine::FieldClicked( const SvxFieldItem& rField, sal_uInt16, sal_uInt16 )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+}
+
+void __EXPORT EditEngine::FieldSelected( const SvxFieldItem& rField, sal_uInt16, sal_uInt16 )
+{
+ DBG_CHKTHIS( EditEngine, 0 );
+}
+
+ // =====================================================================
+// ====================== Statische Methoden =======================
+// =====================================================================
+SfxItemPool* EditEngine::CreatePool( sal_Bool bPersistentRefCounts )
+{
+ SfxItemPool* pPool = new EditEngineItemPool( bPersistentRefCounts );
+ return pPool;
+}
+
+sal_uInt32 EditEngine::RegisterClipboardFormatName()
+{
+ static sal_uInt32 nFormat = 0;
+ if ( !nFormat )
+ nFormat = Exchange::RegisterFormatName( String( RTL_CONSTASCII_USTRINGPARAM( "EditEngineFormat" ) ) );
+ return nFormat;
+}
+
+void EditEngine::SetGetAutoCorrectHdl( const Link& rHdl )
+{
+ EE_DLL()->GetGlobalData()->SetGetAutoCorrectHdl( rHdl );
+}
+
+sal_uInt16 EditEngine::GetAvailableSearchOptions()
+{
+#ifdef SVX_LIGHT
+ return 0;
+#else
+ return SEARCH_OPTIONS_SEARCH | SEARCH_OPTIONS_REPLACE |
+ SEARCH_OPTIONS_REPLACE_ALL | SEARCH_OPTIONS_WHOLE_WORDS |
+ SEARCH_OPTIONS_BACKWARDS | SEARCH_OPTIONS_REG_EXP |
+ SEARCH_OPTIONS_EXACT | SEARCH_OPTIONS_SELECTION;
+#endif
+}
+
+void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const Font& rFont )
+{
+ SvxFont aSvxFont( rFont );
+ SetFontInfoInItemSet( rSet, aSvxFont );
+
+}
+
+void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont )
+{
+ rSet.Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(), XubString(), rFont.GetPitch(), rFont.GetCharSet(), EE_CHAR_FONTINFO ) );
+ rSet.Put( SvxFontHeightItem( rFont.GetSize().Height(), 100, EE_CHAR_FONTHEIGHT ) );
+ rSet.Put( SvxFontWidthItem( (sal_uInt16)rFont.GetSize().Width(), 100, EE_CHAR_FONTWIDTH ) );
+ rSet.Put( SvxShadowedItem( rFont.IsShadow(), EE_CHAR_SHADOW ) );
+ rSet.Put( SvxEscapementItem( rFont.GetEscapement(), rFont.GetPropr(), EE_CHAR_ESCAPEMENT ) );
+ rSet.Put( SvxWeightItem( rFont.GetWeight(), EE_CHAR_WEIGHT ) );
+ rSet.Put( SvxColorItem( rFont.GetColor(), EE_CHAR_COLOR ) );
+ rSet.Put( SvxUnderlineItem( rFont.GetUnderline(), EE_CHAR_UNDERLINE ) );
+ rSet.Put( SvxCrossedOutItem( rFont.GetStrikeout(), EE_CHAR_STRIKEOUT ) );
+ rSet.Put( SvxPostureItem( rFont.GetItalic(), EE_CHAR_ITALIC ) );
+ rSet.Put( SvxContourItem( rFont.IsOutline(), EE_CHAR_OUTLINE ) );
+ rSet.Put( SvxAutoKernItem( rFont.IsKerning(), EE_CHAR_PAIRKERNING ) );
+ rSet.Put( SvxKerningItem( rFont.GetFixKerning(), EE_CHAR_KERNING ) );
+ rSet.Put( SvxWordLineModeItem( rFont.IsWordLineMode(), EE_CHAR_WLM ) );
+}
+
+Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet )
+{
+ return CreateSvxFontFromItemSet( rItemSet );
+}
+
+SvxFont EditEngine::CreateSvxFontFromItemSet( const SfxItemSet& rItemSet )
+{
+ SvxFont aFont;
+ CreateFont( aFont, rItemSet );
+ return aFont;
+}
+
+sal_Bool EditEngine::DoesKeyMoveCursor( const KeyEvent& rKeyEvent )
+{
+ sal_Bool bDoesMove = sal_False;
+
+ switch ( rKeyEvent.GetKeyCode().GetCode() )
+ {
+ case KEY_UP:
+ case KEY_DOWN:
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ case KEY_HOME:
+ case KEY_END:
+ case KEY_PAGEUP:
+ case KEY_PAGEDOWN:
+ {
+ if ( !rKeyEvent.GetKeyCode().IsMod2() )
+ bDoesMove = sal_True;
+ }
+ break;
+ }
+ return bDoesMove;
+}
+
+sal_Bool EditEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
+{
+ sal_Bool bDoesChange = sal_False;
+
+ KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction();
+ if ( eFunc != KEYFUNC_DONTKNOW )
+ {
+ switch ( eFunc )
+ {
+ case KEYFUNC_UNDO:
+ case KEYFUNC_REDO:
+ case KEYFUNC_CUT:
+ case KEYFUNC_PASTE: bDoesChange = sal_True;
+ break;
+ default: // wird dann evtl. unten bearbeitet.
+ eFunc = KEYFUNC_DONTKNOW;
+ }
+ }
+ if ( eFunc == KEYFUNC_DONTKNOW )
+ {
+ switch ( rKeyEvent.GetKeyCode().GetCode() )
+ {
+ case KEY_DELETE:
+ case KEY_BACKSPACE: bDoesChange = sal_True;
+ break;
+ case KEY_RETURN:
+ case KEY_TAB:
+ {
+ if ( !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
+ bDoesChange = sal_True;
+ }
+ break;
+ default:
+ {
+ bDoesChange = IsSimpleCharInput( rKeyEvent );
+ }
+ }
+ }
+ return bDoesChange;
+}
+
+sal_Bool EditEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent )
+{
+ if( EditEngine::IsPrintable( rKeyEvent.GetCharCode() ) &&
+#ifndef MAC
+ ( KEY_MOD2 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT ) ) &&
+ ( KEY_MOD1 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT ) ) )
+#else
+ KEY_MOD1 != rKeyEvent.GetKeyCode().GetModifier() )
+#endif
+ {
+ return sal_True;
+ }
+ return sal_False;
+}
+
+// Mal in den Outliner schieben...
+void EditEngine::ImportBulletItem( SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel,
+ const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace )
+{
+ if ( pOldBullet || pOldLRSpace )
+ {
+ // Numberformat dynamisch, weil Zuweisungsoperator nicht implementiert.
+
+ // Altes NumBulletItem nur uebernehmen, wenn kein altes BulletItem
+ const SvxNumberFormat* pFmt = ( !pOldBullet && ( rNumBullet.GetNumRule()->GetLevelCount() > nLevel ) ) ?
+ rNumBullet.GetNumRule()->Get( nLevel ) : NULL;
+ SvxNumberFormat* pNumberFormat = pFmt
+ ? new SvxNumberFormat( *pFmt )
+ : new SvxNumberFormat( SVX_NUM_NUMBER_NONE );
+ if ( pOldBullet )
+ {
+ // Style
+ SvxExtNumType eNumType;
+ switch( pOldBullet->GetStyle() )
+ {
+ case BS_BMP: eNumType = SVX_NUM_BITMAP; break;
+ case BS_BULLET: eNumType = SVX_NUM_CHAR_SPECIAL; break;
+ case BS_ROMAN_BIG: eNumType = SVX_NUM_ROMAN_UPPER; break;
+ case BS_ROMAN_SMALL: eNumType = SVX_NUM_ROMAN_LOWER; break;
+ case BS_ABC_BIG: eNumType = SVX_NUM_CHARS_UPPER_LETTER; break;
+ case BS_ABC_SMALL: eNumType = SVX_NUM_CHARS_LOWER_LETTER; break;
+ case BS_123: eNumType = SVX_NUM_ARABIC; break;
+ default: eNumType = SVX_NUM_NUMBER_NONE; break;
+ }
+ pNumberFormat->SetNumType( eNumType );
+
+ // Justification
+ SvxAdjust eAdjust;
+ switch( pOldBullet->GetJustification() & (BJ_HRIGHT|BJ_HCENTER|BJ_HLEFT) )
+ {
+ case BJ_HRIGHT: eAdjust = SVX_ADJUST_RIGHT; break;
+ case BJ_HCENTER: eAdjust = SVX_ADJUST_CENTER; break;
+ default: eAdjust = SVX_ADJUST_LEFT; break;
+ }
+ pNumberFormat->SetNumAdjust(eAdjust);
+
+ // Prefix/Suffix
+ pNumberFormat->SetPrefix( pOldBullet->GetPrevText() );
+ pNumberFormat->SetSuffix( pOldBullet->GetFollowText() );
+
+ // Bullet
+ if( pOldBullet->GetStyle() == BS_BULLET )
+ {
+ pNumberFormat->SetBulletChar( pOldBullet->GetSymbol() );
+ Font aTmpFont = pOldBullet->GetFont();
+ pNumberFormat->SetBulletFont( &aTmpFont );
+ }
+
+ // Color
+ pNumberFormat->SetBulletColor( pOldBullet->GetFont().GetColor() );
+
+ // Start
+ pNumberFormat->SetStart( pOldBullet->GetStart() );
+
+ // Scale
+ pNumberFormat->SetBulletRelSize( pOldBullet->GetScale() );
+
+ // Bitmap
+ if( pOldBullet->GetStyle() == BS_BMP )
+ {
+ SvxBrushItem aBItem( Graphic( pOldBullet->GetBitmap() ), GPOS_NONE );
+ pNumberFormat->SetGraphicBrush( &aBItem );
+ }
+ }
+
+ // Einzug und Erstzeileneinzug
+ if ( pOldLRSpace )
+ {
+ short nLSpace = pOldLRSpace->GetTxtLeft();
+ pNumberFormat->SetLSpace( nLSpace );
+ pNumberFormat->SetAbsLSpace( nLSpace );
+ pNumberFormat->SetFirstLineOffset( pOldLRSpace->GetTxtFirstLineOfst() );
+ }
+
+ rNumBullet.GetNumRule()->SetLevel( nLevel, *pNumberFormat );
+ delete pNumberFormat;
+ }
+}
+
+
diff --git a/svx/source/editeng/editeng.hrc b/svx/source/editeng/editeng.hrc
new file mode 100644
index 0000000000..41961bad66
--- /dev/null
+++ b/svx/source/editeng/editeng.hrc
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * $RCSfile: editeng.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _EDITENG_HRC
+#define _EDITENG_HRC
+
+#ifndef _SOLAR_HRC
+#include <svtools/solar.hrc>
+#endif
+
+#define RID_EDITUNDO_DEL ( RID_EDIT_START + 0 )
+#define RID_EDITUNDO_MOVE ( RID_EDIT_START + 1 )
+#define RID_EDITUNDO_INSERT ( RID_EDIT_START + 2 )
+#define RID_EDITUNDO_REPLACE ( RID_EDIT_START + 3 )
+#define RID_EDITUNDO_SETATTRIBS ( RID_EDIT_START + 4 )
+#define RID_EDITUNDO_SETSTYLE ( RID_EDIT_START + 5 )
+#define RID_EDITUNDO_RESETATTRIBS ( RID_EDIT_START + 6 )
+#define RID_EDITUNDO_INDENT ( RID_EDIT_START + 7 )
+
+#define RID_MENU_SPELL ( RID_EDIT_START + 10 )
+
+#define MN_SPELLING 1
+#define MN_INSERT 2
+#define MN_IGNORE 3
+#define MN_AUTOCORR 4
+
+#define MN_ALTSTART 1000
+#define MN_AUTOSTART 2000
+#define MN_DICTSTART 3000
+
+
+#endif // _EDITENG_HRC
diff --git a/svx/source/editeng/editeng.src b/svx/source/editeng/editeng.src
new file mode 100644
index 0000000000..0516f861c1
--- /dev/null
+++ b/svx/source/editeng/editeng.src
@@ -0,0 +1,408 @@
+/*************************************************************************
+ *
+ * $RCSfile: editeng.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <editeng.hrc>
+#include <helpid.hrc>
+
+String RID_EDITUNDO_DEL
+{
+ TEXT = "Löschen" ;
+ 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[ dutch ] = "Wissen";
+ TEXT[ chinese_simplified ] = "ɾ³ý";
+ TEXT[ greek ] = "ÄéáãñáöÞ";
+ TEXT[ korean ] = "»èÁ¦";
+ TEXT[ turkish ] = "Sil";
+};
+
+String RID_EDITUNDO_MOVE
+{
+ TEXT = "Verschieben" ;
+ TEXT [ English ] = "Move" ;
+ TEXT [ norwegian ] = "Flytt" ;
+ TEXT [ italian ] = "Sposta" ;
+ TEXT [ portuguese_brazilian ] = "Mover" ;
+ TEXT [ portuguese ] = "Mover" ;
+ TEXT [ finnish ] = "Lisää" ;
+ TEXT [ danish ] = "Flyt" ;
+ TEXT [ french ] = "Déplacer" ;
+ TEXT [ swedish ] = "Flytta" ;
+ TEXT [ dutch ] = "Verplaatsen" ;
+ TEXT [ spanish ] = "Desplazar" ;
+ TEXT [ english_us ] = "Move" ;
+ TEXT[ chinese_simplified ] = "Òƶ¯";
+ TEXT[ russian ] = "Ïåðåìåñòèòü";
+ TEXT[ polish ] = "Przesuñ";
+ TEXT[ japanese ] = "ˆÚ“®";
+ TEXT[ chinese_traditional ] = "²¾°Ê";
+ TEXT[ arabic ] = "ÅÒÇÍÉ";
+ TEXT[ dutch ] = "Verplaatsen";
+ TEXT[ chinese_simplified ] = "Òƶ¯";
+ TEXT[ greek ] = "Ìåôáêßíçóç";
+ TEXT[ korean ] = "À̵¿";
+ TEXT[ turkish ] = "Taþý";
+};
+
+String RID_EDITUNDO_INSERT
+{
+ TEXT = "Einfügen" ;
+ TEXT [ English ] = "Insert" ;
+ TEXT [ norwegian ] = "Sett inn" ;
+ TEXT [ italian ] = "Inserisci" ;
+ TEXT [ portuguese_brazilian ] = "Inserir" ;
+ TEXT [ portuguese ] = "Inserir" ;
+ TEXT [ finnish ] = "Lisää" ;
+ TEXT [ danish ] = "Indsæt" ;
+ TEXT [ french ] = "Insérer" ;
+ TEXT [ swedish ] = "Infoga" ;
+ TEXT [ dutch ] = "Invoegen" ;
+ TEXT [ spanish ] = "Insertar" ;
+ TEXT [ english_us ] = "Insert" ;
+ 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";
+};
+
+String RID_EDITUNDO_REPLACE
+{
+ TEXT = "Ersetzen" ;
+ TEXT [ English ] = "Replace" ;
+ TEXT [ norwegian ] = "Replace" ;
+ TEXT [ italian ] = "Sostituisci" ;
+ TEXT [ portuguese_brazilian ] = "Substituir" ;
+ TEXT [ portuguese ] = "Substituir" ;
+ TEXT [ finnish ] = "Korvaa" ;
+ TEXT [ danish ] = "Erstat" ;
+ TEXT [ french ] = "Remplacer" ;
+ TEXT [ swedish ] = "Ersätt" ;
+ TEXT [ dutch ] = "Vervangen" ;
+ TEXT [ spanish ] = "Reemplazar" ;
+ TEXT [ english_us ] = "Replace" ;
+ TEXT[ chinese_simplified ] = "¸üÌæ";
+ TEXT[ russian ] = "Çàìåíèòü";
+ TEXT[ polish ] = "Zamieñ";
+ TEXT[ japanese ] = "’uŠ·";
+ TEXT[ chinese_traditional ] = "¥N´À";
+ TEXT[ arabic ] = "ÇÓÊÈÏÇá";
+ TEXT[ dutch ] = "Vervangen";
+ TEXT[ chinese_simplified ] = "¸üÌæ";
+ TEXT[ greek ] = "ÁíôéêáôÜóôáóç";
+ TEXT[ korean ] = "¹Ù²Ù±â";
+ TEXT[ turkish ] = "Deðiþtir";
+};
+
+String RID_EDITUNDO_SETATTRIBS
+{
+ TEXT = "Attribute anwenden" ;
+ TEXT [ English ] = "Apply attributes" ;
+ TEXT [ norwegian ] = "Bruk attributter" ;
+ TEXT [ italian ] = "Applica attributi" ;
+ TEXT [ portuguese_brazilian ] = "Aplicar atributos" ;
+ TEXT [ portuguese ] = "Aplicar atributos" ;
+ TEXT [ finnish ] = "Käytä määritteitä" ;
+ TEXT [ danish ] = "Anvend attributter" ;
+ TEXT [ french ] = "Appliquer les attributs" ;
+ TEXT [ swedish ] = "Använd attribut" ;
+ TEXT [ dutch ] = "Attributen toepassen" ;
+ TEXT [ spanish ] = "Aplicar atributos" ;
+ TEXT [ english_us ] = "Apply attributes" ;
+ TEXT[ chinese_simplified ] = "ʹÓÃÊôÐÔ";
+ TEXT[ russian ] = "Ïðèìåíèòü àòðèáóòû";
+ TEXT[ polish ] = "Zastosuj atrybuty";
+ TEXT[ japanese ] = "‘®«‚ð“K—p";
+ TEXT[ chinese_traditional ] = "¨Ï¥ÎÄÝ©Ê";
+ TEXT[ arabic ] = "ÇÓÊÎÏÇã ÇáÓãÇÊ";
+ TEXT[ dutch ] = "Attributen toepassen";
+ TEXT[ chinese_simplified ] = "ʹÓÃÊôÐÔ";
+ TEXT[ greek ] = "ÅöáñìïãÞ éäéïôÞôùí";
+ TEXT[ korean ] = "¼Ó¼º Àû¿ë";
+ TEXT[ turkish ] = "Öznitelikleri kullan";
+};
+
+String RID_EDITUNDO_RESETATTRIBS
+{
+ TEXT = "Attribute zurücksetzen" ;
+ TEXT [ English ] = "Reset attributes" ;
+ TEXT [ norwegian ] = "Sett attributter på nytt" ;
+ TEXT [ italian ] = "Reimposta attributi" ;
+ TEXT [ portuguese_brazilian ] = "Redefinir atributos" ;
+ TEXT [ portuguese ] = "Repor atributos" ;
+ TEXT [ finnish ] = "Palauta määritteet" ;
+ TEXT [ danish ] = "Nulstil attributer" ;
+ TEXT [ french ] = "Restaurer les attributs" ;
+ TEXT [ swedish ] = "Återställ attribut" ;
+ TEXT [ dutch ] = "Attributen terugzetten" ;
+ TEXT [ spanish ] = "Restablecer atributos" ;
+ TEXT [ english_us ] = "Reset attributes" ;
+ TEXT[ chinese_simplified ] = "ÖØÉèÊôÐÔ";
+ TEXT[ russian ] = "Âîññòàíîâèòü àòðèáóòû";
+ TEXT[ polish ] = "Zresetuj atrybuty";
+ TEXT[ japanese ] = "‘®«‚ðؾ¯Ä";
+ TEXT[ chinese_traditional ] = "­«³]ÄÝ©Ê";
+ TEXT[ arabic ] = "ÅÚÇÏÉ ÊÚííä ÇáÓãÇÊ";
+ TEXT[ dutch ] = "Attributen terugzetten";
+ TEXT[ chinese_simplified ] = "ÖØÉèÊôÐÔ";
+ TEXT[ greek ] = "ÅðáíáöïñÜ éäéïôÞôùí";
+ TEXT[ korean ] = "¼Ó¼º ¿ø·¡´ë·Î";
+ TEXT[ turkish ] = "Öznitelikleri baþa al";
+};
+
+String RID_EDITUNDO_INDENT
+{
+ TEXT = "Einrücken" ;
+ TEXT [ English ] = "Einrücken" ;
+ Text [ portuguese ] = "Avançar" ;
+ Text [ english_us ] = "Indent" ;
+ Text [ portuguese_brazilian ] = "Einrücken" ;
+ Text [ swedish ] = "Dra in" ;
+ Text [ danish ] = "Indryk" ;
+ Text [ italian ] = "Rientro" ;
+ Text [ spanish ] = "Sangría" ;
+ Text [ french ] = "Augmenter retrait" ;
+ Text [ dutch ] = "Inspringen" ;
+ Text[ chinese_simplified ] = "Ëõ½ø";
+ Text[ russian ] = "Îòñòóï";
+ Text[ polish ] = "Wysuniêcie";
+ Text[ japanese ] = "‘}“ü";
+ Text[ chinese_traditional ] = "ÁY±Æ";
+ Text[ arabic ] = "ÅÒÇÍÉ";
+ Text[ dutch ] = "Inspringen";
+ Text[ chinese_simplified ] = "Ëõ½ø";
+ Text[ greek ] = "Åóï÷Þ";
+ Text[ korean ] = "µé¿©¾²±â";
+ Text[ turkish ] = "Girinti";
+};
+
+String RID_EDITUNDO_SETSTYLE
+{
+ TEXT = "Vorlagen anwenden" ;
+ TEXT [ English ] = "Apply styles" ;
+ TEXT [ norwegian ] = "Bruk maler" ;
+ TEXT [ italian ] = "Applica modelli" ;
+ TEXT [ portuguese_brazilian ] = "Apicar estilos" ;
+ TEXT [ portuguese ] = "Aplicar estilos" ;
+ TEXT [ finnish ] = "Käytä tyylejä" ;
+ TEXT [ danish ] = "Anvend typografier" ;
+ TEXT [ french ] = "Appliquer les styles" ;
+ TEXT [ swedish ] = "Använd mallar" ;
+ TEXT [ dutch ] = "Opmaakprofielen toepassen" ;
+ TEXT [ spanish ] = "Aplicar estilos" ;
+ TEXT [ english_us ] = "Apply Styles" ;
+ TEXT[ chinese_simplified ] = "ʹÓÃÑùʽ";
+ TEXT[ russian ] = "Ïðèìåíèòü ñòèëè";
+ TEXT[ polish ] = "Zastosuj style";
+ TEXT[ japanese ] = "½À²Ù‚ð“K—p";
+ TEXT[ chinese_traditional ] = "¨Ï¥Î¼Ë¦¡";
+ TEXT[ arabic ] = "ÇÓÊÎÏÇã äãÇÐÌ";
+ TEXT[ dutch ] = "Opmaakprofielen toepassen";
+ TEXT[ chinese_simplified ] = "ʹÓÃÑùʽ";
+ TEXT[ greek ] = "ÅöáñìïãÞ óôõë";
+ TEXT[ korean ] = "À¯Çü Àû¿ë";
+ TEXT[ turkish ] = "Þablonlarý kullan";
+};
+
+Menu RID_MENU_SPELL
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_SPELLING ;
+ HelpId = HID_EDITENG_SPELLER_START;
+ Text = "~Rechtschreibung" ;
+ Text [ English ] = "~Spelling" ;
+ Text [ english_us ] = "~Spellcheck" ;
+ Text [ italian ] = "Controllo ~ortografico" ;
+ Text [ spanish ] = "~Ortografía" ;
+ Text [ french ] = "~Orthographe" ;
+ Text [ dutch ] = "~Spellingcontrole" ;
+ Text [ swedish ] = "~Rättstavning" ;
+ Text [ danish ] = "Stavekont~rol" ;
+ Text [ portuguese ] = "Or~tografia" ;
+ Text [ portuguese_brazilian ] = "~Rechtschreibung" ;
+ Text [ chinese_simplified ] = "Õý×Ö·¨(~S)";
+ Text[ russian ] = "~Ïðàâîïèñàíèå";
+ Text[ polish ] = "~Pisownia";
+ Text[ japanese ] = "•¶ÍZ³(~S)";
+ Text[ chinese_traditional ] = "«÷¦r(~S)";
+ Text[ arabic ] = "ÊÏ~ÞíÞ ÅãáÇÆí";
+ Text[ dutch ] = "~Spellingcontrole";
+ Text[ chinese_simplified ] = "Õý×Ö·¨(~S)";
+ Text[ greek ] = "Ï~ñèïãñáößá";
+ Text[ korean ] = "¸ÂÃã¹ý(~S)";
+ Text[ turkish ] = "~Yazým kýlavuzu";
+ };
+ MenuItem
+ {
+ Identifier = MN_INSERT ;
+ HelpId = HID_EDITENG_SPELLER_ADDWORD;
+ SubMenu = Menu
+ {
+ };
+ Text = "~Aufnehmen" ;
+ Text [ English ] = "~Insert" ;
+ Text [ english_us ] = "~Add" ;
+ Text [ italian ] = "A~ggiungi" ;
+ Text [ spanish ] = "~Incluir" ;
+ Text [ french ] = "~Ajouter" ;
+ Text [ dutch ] = "~Toevoegen" ;
+ Text [ swedish ] = "~Lägg till" ;
+ Text [ danish ] = "Tilføj" ;
+ Text [ portuguese ] = "~Adicionar" ;
+ Text [ portuguese_brazilian ] = "~Aufnehmen" ;
+ Text [ chinese_simplified ] = "¼ÓÈë(~A)";
+ Text[ russian ] = "Äîáàâèòü";
+ Text[ polish ] = "Dodaj";
+ Text[ japanese ] = "’ljÁ(~A)";
+ Text[ chinese_traditional ] = "¥[¤J(~A)";
+ Text[ arabic ] = "ÅÖÇÝÉ";
+ Text[ dutch ] = "~Toevoegen";
+ Text[ chinese_simplified ] = "¼ÓÈë(~A)";
+ Text[ greek ] = "Ðñ~ïóèÞêç";
+ Text[ korean ] = "Ãß°¡(~A)";
+ Text[ turkish ] = "Ekle";
+ };
+ MenuItem
+ {
+ Identifier = MN_IGNORE ;
+ HelpId = HID_EDITENG_SPELLER_IGNORE;
+ Text = "Alle i~gnorieren" ;
+ Text [ ENGLISH ] = "I~gnore all" ;
+ Text [ norwegian ] = "I~gnorer alle" ;
+ Text [ italian ] = "~Ignora tutto" ;
+ Text [ portuguese_brazilian ] = "I~gnorar tudo" ;
+ Text [ portuguese ] = "I~gnorar tudo" ;
+ Text [ finnish ] = "O~hita kaikki" ;
+ Text [ danish ] = "Ignorer alle" ;
+ Text [ french ] = "~Ignorer tout" ;
+ Text [ swedish ] = "~Ignorera alla" ;
+ Text [ dutch ] = "Alle ~negeren" ;
+ Text [ spanish ] = "I~gnorar todo" ;
+ Text [ english_us ] = "Ignore All" ;
+ Text [ chinese_simplified ] = "È«²¿ºöÂÔ(~I)";
+ Text[ russian ] = "Ïðîïóñòèòü âñå";
+ Text[ polish ] = "Ignoruj wszystkie";
+ Text[ japanese ] = "‚·‚ׂĖ³Ž‹‚·‚é";
+ Text[ chinese_traditional ] = "¥þ³¡©¿²¤(~I)";
+ Text[ arabic ] = "ÊÌÇåá Çáßá";
+ Text[ dutch ] = "Alle ~negeren";
+ Text[ chinese_simplified ] = "È«²¿ºöÂÔ(~I)";
+ Text[ greek ] = "ÐáñÜ~âëåøç üëùí";
+ Text[ korean ] = "¸ðµÎ ¹«½Ã";
+ Text[ turkish ] = "Tümünü yok say";
+ };
+ MenuItem
+ {
+ Identifier = MN_AUTOCORR ;
+ HelpId = HID_EDITENG_SPELLER_AUTOCORRECT;
+ SubMenu = Menu
+ {
+ };
+ Text = "Auto~Korrektur" ;
+ Text [ English ] = "~AutoCorrect" ;
+ Text [ english_us ] = "AutoCorrect" ;
+ Text [ portuguese_brazilian ] = "Auto~Korrektur" ;
+ Text [ swedish ] = "Auto~Korrigering" ;
+ Text [ danish ] = "AutoKorrektur" ;
+ Text [ italian ] = "~Correzione automatica" ;
+ Text [ spanish ] = "Auto~Corrección" ;
+ Text [ french ] = "AutoCo~rrection" ;
+ Text [ dutch ] = "~AutoCorrectie" ;
+ Text [ portuguese ] = "Auto~Correcção" ;
+ Text [ chinese_simplified ] = "×Ô¶¯¸üÕý(~A)";
+ Text[ russian ] = "Àâòîçàìåíà";
+ Text[ polish ] = "Autokorekta";
+ Text[ japanese ] = "µ°ÄºÚ¸Ä";
+ Text[ chinese_traditional ] = "¦Û°Ê®Õ¥¿(~A)";
+ Text[ arabic ] = "ÊÕÍíÍ ÊáÞÇÆí";
+ Text[ dutch ] = "~AutoCorrectie";
+ Text[ chinese_simplified ] = "×Ô¶¯¸üÕý(~A)";
+ Text[ greek ] = "Áõôï~Äéüñèùóç";
+ Text[ korean ] = "ÀÚµ¿°íħ";
+ Text[ turkish ] = "Otomatik düzeltme";
+ };
+ };
+};
diff --git a/svx/source/editeng/editobj.cxx b/svx/source/editeng/editobj.cxx
new file mode 100644
index 0000000000..4f786f2bf2
--- /dev/null
+++ b/svx/source/editeng/editobj.cxx
@@ -0,0 +1,1447 @@
+/*************************************************************************
+ *
+ * $RCSfile: editobj.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <editobj2.hxx>
+#include <editdata.hxx>
+#include <editattr.hxx>
+#include <editeng.hxx>
+#include <textconv.hxx>
+#include <fontitem.hxx>
+#include <cscoitem.hxx>
+#include <vcl/system.hxx>
+#include <flditem.hxx>
+#include <lrspitem.hxx>
+#include <tstpitem.hxx>
+#include <bulitem.hxx>
+#include <numitem.hxx>
+#include <brshitem.hxx>
+#include <vcl/graph.hxx>
+#include <svtools/intitem.hxx>
+#include <tools/stream.hxx>
+
+DBG_NAME( EE_EditTextObject );
+DBG_NAME( XEditAttribute );
+
+//--------------------------------------------------------------
+
+BOOL lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, SvxBulletItem& rBullet )
+{
+ const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( nLevel );
+ if ( pFmt )
+ {
+ rBullet.SetWidth( (-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance() );
+ rBullet.SetSymbol( pFmt->GetBulletChar() );
+ rBullet.SetPrevText( pFmt->GetPrefix() );
+ rBullet.SetFollowText( pFmt->GetSuffix() );
+ rBullet.SetStart( pFmt->GetStart() );
+ rBullet.SetScale( pFmt->GetBulletRelSize() );
+
+ Font aBulletFont( rBullet.GetFont() );
+ if ( pFmt->GetBulletFont() )
+ aBulletFont = *pFmt->GetBulletFont();
+ aBulletFont.SetColor( pFmt->GetBulletColor() );
+ rBullet.SetFont( aBulletFont );
+
+ if ( pFmt->GetBrush() && pFmt->GetBrush()->GetGraphic() )
+ {
+ Bitmap aBmp( pFmt->GetBrush()->GetGraphic()->GetBitmap() );
+ aBmp.SetPrefSize( pFmt->GetGraphicSize() );
+ aBmp.SetPrefMapMode( MAP_100TH_MM );
+ rBullet.SetBitmap( aBmp );
+ }
+
+ switch ( pFmt->GetNumType() )
+ {
+ case SVX_NUM_CHARS_UPPER_LETTER:
+ case SVX_NUM_CHARS_UPPER_LETTER_N:
+ rBullet.SetStyle( BS_ABC_BIG );
+ break;
+ case SVX_NUM_CHARS_LOWER_LETTER:
+ case SVX_NUM_CHARS_LOWER_LETTER_N:
+ rBullet.SetStyle( BS_ABC_SMALL );
+ break;
+ case SVX_NUM_ROMAN_UPPER:
+ rBullet.SetStyle( BS_ROMAN_BIG );
+ break;
+ case SVX_NUM_ROMAN_LOWER:
+ rBullet.SetStyle( BS_ROMAN_SMALL );
+ break;
+ case SVX_NUM_ARABIC:
+ rBullet.SetStyle( BS_123 );
+ break;
+ case SVX_NUM_NUMBER_NONE:
+ rBullet.SetStyle( BS_NONE );
+ break;
+ case SVX_NUM_CHAR_SPECIAL:
+ rBullet.SetStyle( BS_BULLET );
+ break;
+ case SVX_NUM_PAGEDESC:
+ DBG_ERROR( "Unknown: SVX_NUM_PAGEDESC" );
+ rBullet.SetStyle( BS_BULLET );
+ break;
+ case SVX_NUM_BITMAP:
+ rBullet.SetStyle( BS_BMP );
+ break;
+ default:
+ DBG_ERROR( "Unknown NumType" );
+ }
+
+ switch ( pFmt->GetNumAdjust() )
+ {
+ case SVX_ADJUST_LEFT:
+ rBullet.SetJustification( BJ_VCENTER|BJ_HLEFT );
+ break;
+ case SVX_ADJUST_RIGHT:
+ rBullet.SetJustification( BJ_VCENTER|BJ_HRIGHT );
+ break;
+ case SVX_ADJUST_CENTER:
+ rBullet.SetJustification( BJ_VCENTER|BJ_HCENTER );
+ break;
+ default:
+ DBG_ERROR( "Unknown or invalid NumAdjust" );
+ }
+ }
+ return pFmt ? TRUE : FALSE;
+}
+
+
+XEditAttribute* MakeXEditAttribute( SfxItemPool& rPool, const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd )
+{
+ // das neue Attribut im Pool anlegen
+ const SfxPoolItem& rNew = rPool.Put( rItem );
+
+ XEditAttribute* pNew = new XEditAttribute( rNew, nStart, nEnd );
+ return pNew;
+}
+
+
+XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr )
+{
+ DBG_CTOR( XEditAttribute, 0 );
+ pItem = &rAttr;
+ nStart = 0;
+ nEnd = 0;
+}
+
+XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr, USHORT nS, USHORT nE )
+{
+ DBG_CTOR( XEditAttribute, 0 );
+ pItem = &rAttr;
+ nStart = nS;
+ nEnd = nE;
+}
+
+XEditAttribute::~XEditAttribute()
+{
+ DBG_DTOR( XEditAttribute, 0 );
+ pItem = 0; // Gehoert dem Pool.
+}
+
+
+ContentInfo::ContentInfo( SfxItemPool& rPool ) : aParaAttribs( rPool, EE_PARA_START, EE_CHAR_END )
+{
+ eFamily = SFX_STYLE_FAMILY_PARA;
+ pWrongs = 0;
+}
+
+// Richtiger CopyCTOR unsinning, weil ich mit einem anderen Pool arbeiten muss!
+ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse )
+ : aParaAttribs( rPoolToUse, EE_PARA_START, EE_CHAR_END )
+{
+ pWrongs = 0;
+#ifndef SVX_LIGHT
+ if ( rCopyFrom.GetWrongList() )
+ pWrongs = rCopyFrom.GetWrongList()->Clone();
+#endif // !SVX_LIGHT
+ // So sollten die Items im richtigen Pool landen!
+ aParaAttribs.Set( rCopyFrom.GetParaAttribs() );
+ aText = rCopyFrom.GetText();
+ aStyle = rCopyFrom.GetStyle();
+ eFamily = rCopyFrom.GetFamily();
+
+ // Attribute kopieren...
+ for ( USHORT n = 0; n < rCopyFrom.GetAttribs().Count(); n++ )
+ {
+ XEditAttribute* pAttr = rCopyFrom.GetAttribs().GetObject( n );
+ XEditAttribute* pMyAttr = MakeXEditAttribute( rPoolToUse, *pAttr->GetItem(), pAttr->GetStart(), pAttr->GetEnd() );
+ aAttribs.Insert( pMyAttr, aAttribs.Count() );
+ }
+
+ // Wrongs
+ pWrongs = NULL;
+#ifndef SVX_LIGHT
+ if ( rCopyFrom.GetWrongList() )
+ pWrongs = rCopyFrom.GetWrongList()->Clone();
+#endif // !SVX_LIGHT
+}
+
+ContentInfo::~ContentInfo()
+{
+ for ( USHORT nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
+ {
+ XEditAttribute* pAttr = aAttribs.GetObject(nAttr);
+ // Item aus Pool entfernen!
+ aParaAttribs.GetPool()->Remove( *pAttr->GetItem() );
+ delete pAttr;
+ }
+ aAttribs.Remove( 0, aAttribs.Count() );
+#ifndef SVX_LIGHT
+ delete pWrongs;
+#endif
+}
+
+
+EditTextObject::EditTextObject( USHORT n)
+{
+ DBG_CTOR( EE_EditTextObject, 0 );
+ nWhich = n;
+}
+
+EditTextObject::EditTextObject( const EditTextObject& r )
+{
+ DBG_CTOR( EE_EditTextObject, 0 );
+ nWhich = r.nWhich;
+}
+
+__EXPORT EditTextObject::~EditTextObject()
+{
+ DBG_DTOR( EE_EditTextObject, 0 );
+}
+
+USHORT EditTextObject::GetParagraphCount() const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return 0;
+}
+
+XubString EditTextObject::GetText( USHORT nParagraph ) const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return XubString();
+}
+
+void EditTextObject::Insert( const EditTextObject& rObj, USHORT nPara )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+EditTextObject* EditTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return 0;
+}
+
+void EditTextObject::RemoveParagraph( USHORT nPara )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+BOOL EditTextObject::HasPortionInfo() const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return FALSE;
+}
+
+void EditTextObject::ClearPortionInfo()
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+BOOL EditTextObject::HasOnlineSpellErrors() const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return FALSE;
+}
+
+BOOL EditTextObject::HasCharAttribs( USHORT nWhich ) const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return FALSE;
+}
+
+void EditTextObject::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+void EditTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+BOOL EditTextObject::IsFieldObject() const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return FALSE;
+}
+
+const SvxFieldItem* EditTextObject::GetField() const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return 0;
+}
+
+BOOL EditTextObject::HasField( TypeId aType ) const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return FALSE;
+}
+
+SfxItemSet EditTextObject::GetParaAttribs( USHORT nPara ) const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return SfxItemSet( *(SfxItemPool*)NULL );
+}
+
+void EditTextObject::SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+BOOL EditTextObject::RemoveCharAttribs( USHORT nWhich )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return FALSE;
+}
+
+BOOL EditTextObject::RemoveParaAttribs( USHORT nWhich )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return FALSE;
+}
+
+BOOL EditTextObject::HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return FALSE;
+}
+
+void EditTextObject::GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+void EditTextObject::SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+BOOL __EXPORT EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily,
+ const XubString&, SfxStyleFamily )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return FALSE;
+}
+
+void __EXPORT EditTextObject::ChangeStyleSheetName( SfxStyleFamily eFamily,
+ const XubString& rOldName, const XubString& rNewName )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+USHORT EditTextObject::GetUserType() const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return 0;
+}
+
+void EditTextObject::SetUserType( USHORT n )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+ULONG EditTextObject::GetObjectSettings() const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return 0;
+}
+
+void EditTextObject::SetObjectSettings( ULONG n )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+BOOL EditTextObject::Store( SvStream& rOStream ) const
+{
+ if ( rOStream.GetError() )
+ return FALSE;
+
+ // Vorspann:
+ ULONG nStartPos = rOStream.Tell();
+
+ USHORT nWhich = Which();
+ rOStream << nWhich;
+
+ ULONG nStructSz = 0;
+ rOStream << nStructSz;
+
+ // Eigene Daten:
+ StoreData( rOStream );
+
+ // Nachspann:
+ ULONG nEndPos = rOStream.Tell();
+ nStructSz = nEndPos - nStartPos - sizeof( nWhich ) - sizeof( nStructSz );
+ rOStream.Seek( nStartPos + sizeof( nWhich ) );
+ rOStream << nStructSz;
+ rOStream.Seek( nEndPos );
+
+ return rOStream.GetError() ? FALSE : TRUE;
+}
+
+EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool )
+{
+ ULONG nStartPos = rIStream.Tell();
+
+ // Ertmal sehen, was fuer ein Object...
+ USHORT nWhich;
+ rIStream >> nWhich;
+
+ ULONG nStructSz;
+ rIStream >> nStructSz;
+
+ DBG_ASSERT( ( nWhich == 0x22 /*EE_FORMAT_BIN300*/ ) || ( nWhich == EE_FORMAT_BIN ), "CreateTextObject: Unbekanntes Objekt!" );
+
+ if ( rIStream.GetError() )
+ return NULL;
+
+ EditTextObject* pTxtObj = NULL;
+ switch ( nWhich )
+ {
+ case 0x22 /*BIN300*/: pTxtObj = new BinTextObject( 0 );
+ ((BinTextObject*)pTxtObj)->CreateData300( rIStream );
+ break;
+ case EE_FORMAT_BIN: pTxtObj = new BinTextObject( pGlobalTextObjectPool );
+ pTxtObj->CreateData( rIStream );
+ break;
+ default:
+ {
+ // Wenn ich das Format nicht kenne, ueberlese ich den Inhalt:
+ rIStream.SetError( EE_READWRITE_WRONGFORMAT );
+ }
+ }
+
+ // Sicherstellen, dass der Stream an der richtigen Stelle hinterlassen wird.
+ ULONG nFullSz = sizeof( nWhich ) + sizeof( nStructSz ) + nStructSz;
+ rIStream.Seek( nStartPos + nFullSz );
+ return pTxtObj;
+}
+
+void EditTextObject::Skip( SvStream& rIStream )
+{
+ ULONG nStartPos = rIStream.Tell();
+
+ USHORT nWhich;
+ rIStream >> nWhich;
+
+ ULONG nStructSz;
+ rIStream >> nStructSz;
+
+ ULONG nFullSz = sizeof( nWhich ) + sizeof( nStructSz ) + nStructSz;
+ rIStream.Seek( nStartPos + nFullSz );
+}
+
+void __EXPORT EditTextObject::StoreData( SvStream& rOStream ) const
+{
+ DBG_ERROR( "StoreData: Basisklasse!" );
+}
+
+void __EXPORT EditTextObject::CreateData( SvStream& rIStream )
+{
+ DBG_ERROR( "CreateData: Basisklasse!" );
+}
+
+USHORT EditTextObject::GetVersion() const
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+ return 0;
+}
+
+void EditTextObject::SetLRSpaceItemFlags( BOOL bOutlineMode )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+void EditTextObject::AdjustImportedLRSpaceItems( BOOL bTurnOfBullets )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+void EditTextObject::PrepareStore( SfxStyleSheetPool* pStyleSheetPool )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+void EditTextObject::FinishStore()
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+void EditTextObject::FinishLoad( SfxStyleSheetPool* pStyleSheetPool )
+{
+ DBG_ERROR( "V-Methode direkt vom EditTextObject!" );
+}
+
+BinTextObject::BinTextObject( SfxItemPool* pP ) :
+ EditTextObject( EE_FORMAT_BIN )
+{
+ nVersion = 0;
+ nMetric = 0xFFFF;
+ nUserType = 0;
+ nObjSettings = 0;
+ pPortionInfo = 0;
+ if ( pP )
+ {
+ pPool = pP;
+ bOwnerOfPool = FALSE;
+ }
+ else
+ {
+ pPool = EditEngine::CreatePool();
+ bOwnerOfPool = TRUE;
+ }
+}
+
+BinTextObject::BinTextObject( const BinTextObject& r ) :
+ EditTextObject( r )
+{
+ nMetric = r.nMetric;
+ nUserType = r.nUserType;
+ nObjSettings = r.nObjSettings;
+ pPortionInfo = NULL; // PortionInfo nicht kopieren
+ if ( !r.bOwnerOfPool )
+ {
+ // Dann den Pool mitverwenden
+ pPool = r.pPool;
+ bOwnerOfPool = FALSE;
+ }
+ else
+ {
+ pPool = EditEngine::CreatePool();
+ bOwnerOfPool = TRUE;
+
+ }
+
+ if ( bOwnerOfPool && pPool && r.pPool )
+ pPool->SetDefaultMetric( r.pPool->GetMetric( DEF_METRIC ) );
+
+ for ( USHORT n = 0; n < r.aContents.Count(); n++ )
+ {
+ ContentInfo* pOrg = r.aContents.GetObject( n );
+ DBG_ASSERT( pOrg, "NULL-Pointer in ContentList!" );
+ ContentInfo* pNew = new ContentInfo( *pOrg, *pPool );
+ aContents.Insert( pNew, aContents.Count() );
+ }
+}
+
+__EXPORT BinTextObject::~BinTextObject()
+{
+ if ( pPortionInfo )
+ {
+ for ( USHORT n = pPortionInfo->Count(); n; )
+ delete pPortionInfo->GetObject( --n );
+ delete pPortionInfo;
+ }
+ DeleteContents();
+ if ( bOwnerOfPool )
+ {
+ // Nicht mehr, wegen 1xDefItems.
+ // siehe auch ~EditDoc().
+// pPool->ReleaseDefaults( TRUE /* bDelete */ );
+ delete pPool;
+ }
+}
+
+USHORT BinTextObject::GetUserType() const
+{
+ return nUserType;
+}
+
+void BinTextObject::SetUserType( USHORT n )
+{
+ nUserType = n;
+}
+
+ULONG BinTextObject::GetObjectSettings() const
+{
+ return nObjSettings;
+}
+
+void BinTextObject::SetObjectSettings( ULONG n )
+{
+ nObjSettings = n;
+}
+
+
+void BinTextObject::DeleteContents()
+{
+ for ( USHORT n = 0; n < aContents.Count(); n++ )
+ {
+ ContentInfo* p = aContents.GetObject( n );
+ DBG_ASSERT( p, "NULL-Pointer in ContentList!" );
+ delete p;
+ }
+ aContents.Remove( 0, aContents.Count() );
+}
+
+EditTextObject* __EXPORT BinTextObject::Clone() const
+{
+ return new BinTextObject( *this );
+}
+
+XEditAttribute* BinTextObject::CreateAttrib( const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd )
+{
+ return MakeXEditAttribute( *pPool, rItem, nStart, nEnd );
+}
+
+void BinTextObject::DestroyAttrib( XEditAttribute* pAttr )
+{
+ pPool->Remove( *pAttr->GetItem() );
+ delete pAttr;
+}
+
+ContentInfo* BinTextObject::CreateAndInsertContent()
+{
+ ContentInfo* pC = new ContentInfo( *pPool );
+ aContents.Insert( pC, aContents.Count() );
+ return pC;
+}
+
+USHORT BinTextObject::GetParagraphCount() const
+{
+ return aContents.Count();
+}
+
+XubString BinTextObject::GetText( USHORT nPara ) const
+{
+ DBG_ASSERT( nPara < aContents.Count(), "BinTextObject::GetText: Absatz existiert nicht!" );
+ if ( nPara < aContents.Count() )
+ {
+ ContentInfo* pC = aContents[ nPara ];
+ return pC->GetText();
+ }
+ return XubString();
+}
+
+void BinTextObject::Insert( const EditTextObject& rObj, USHORT nDestPara )
+{
+ DBG_ASSERT( rObj.Which() == EE_FORMAT_BIN, "UTO: Unbekanntes Textobjekt" );
+
+ const BinTextObject& rBinObj = (const BinTextObject&)rObj;
+
+ if ( nDestPara > aContents.Count() )
+ nDestPara = aContents.Count();
+
+ const USHORT nParas = rBinObj.GetContents().Count();
+ for ( USHORT nP = 0; nP < nParas; nP++ )
+ {
+ ContentInfo* pC = rBinObj.GetContents()[ nP ];
+ ContentInfo* pNew = new ContentInfo( *pC, *GetPool() );
+ aContents.Insert( pNew, nDestPara+nP );
+ }
+ ClearPortionInfo();
+}
+
+EditTextObject* BinTextObject::CreateTextObject( USHORT nPara, USHORT nParas ) const
+{
+ if ( ( nPara >= aContents.Count() ) || !nParas )
+ return NULL;
+
+ // Pool nur teilen, wenn von aussen eingestellter Pool.
+ BinTextObject* pObj = new BinTextObject( bOwnerOfPool ? 0 : pPool );
+ if ( bOwnerOfPool && pPool )
+ pObj->GetPool()->SetDefaultMetric( pPool->GetMetric( DEF_METRIC ) );
+
+ const USHORT nEndPara = nPara+nParas-1;
+ for ( USHORT nP = nPara; nP <= nEndPara; nP++ )
+ {
+ ContentInfo* pC = aContents[ nP ];
+ ContentInfo* pNew = new ContentInfo( *pC, *pObj->GetPool() );
+ pObj->GetContents().Insert( pNew, pObj->GetContents().Count() );
+ }
+ return pObj;
+}
+
+void BinTextObject::RemoveParagraph( USHORT nPara )
+{
+ DBG_ASSERT( nPara < aContents.Count(), "BinTextObject::GetText: Absatz existiert nicht!" );
+ if ( nPara < aContents.Count() )
+ {
+ ContentInfo* pC = aContents[ nPara ];
+ aContents.Remove( nPara );
+ delete pC;
+ ClearPortionInfo();
+ }
+}
+
+BOOL BinTextObject::HasPortionInfo() const
+{
+ return pPortionInfo ? TRUE : FALSE;
+}
+
+void BinTextObject::ClearPortionInfo()
+{
+ delete pPortionInfo;
+ pPortionInfo = 0;
+}
+
+BOOL BinTextObject::HasOnlineSpellErrors() const
+{
+#ifndef SVX_LIGHT
+ for ( USHORT n = 0; n < aContents.Count(); n++ )
+ {
+ ContentInfo* p = aContents.GetObject( n );
+ if ( p->GetWrongList() && p->GetWrongList()->Count() )
+ return TRUE;
+ }
+#endif // !SVX_LIGHT
+ return FALSE;
+
+}
+
+BOOL BinTextObject::HasCharAttribs( USHORT nWhich ) const
+{
+ for ( USHORT nPara = GetContents().Count(); nPara; )
+ {
+ ContentInfo* pC = GetContents().GetObject( --nPara );
+
+ USHORT nAttribs = pC->GetAttribs().Count();
+ if ( nAttribs && !nWhich )
+ return TRUE;
+
+ for ( USHORT nAttr = nAttribs; nAttr; )
+ {
+ XEditAttribute* pX = pC->GetAttribs().GetObject( --nAttr );
+ if ( pX->GetItem()->Which() == nWhich )
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+void BinTextObject::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const
+{
+ rLst.Remove( 0, rLst.Count() );
+ ContentInfo* pC = GetContents().GetObject( nPara );
+ if ( pC )
+ {
+ for ( USHORT nAttr = 0; nAttr < pC->GetAttribs().Count(); nAttr++ )
+ {
+ XEditAttribute* pAttr = pC->GetAttribs().GetObject( nAttr );
+ EECharAttrib aEEAttr;
+ aEEAttr.pAttr = pAttr->GetItem();
+ aEEAttr.nPara = nPara;
+ aEEAttr.nStart = pAttr->GetStart();
+ aEEAttr.nEnd = pAttr->GetEnd();
+ rLst.Insert( aEEAttr, rLst.Count() );
+ }
+ }
+}
+
+void BinTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd )
+{
+ BOOL bChanged = FALSE;
+
+ for ( USHORT nPara = GetContents().Count(); nPara; )
+ {
+ ContentInfo* pC = GetContents().GetObject( --nPara );
+
+ for ( USHORT nW = nStart; nW <= nEnd; nW++ )
+ {
+ if ( ( pC->GetParaAttribs().GetItemState( nW, FALSE ) != SFX_ITEM_ON )
+ && ( rAttribs.GetItemState( nW, FALSE ) == SFX_ITEM_ON ) )
+ {
+ pC->GetParaAttribs().Put( rAttribs.Get( nW ) );
+ bChanged = TRUE;
+ }
+ }
+ }
+
+ if ( bChanged )
+ ClearPortionInfo();
+}
+
+BOOL BinTextObject::IsFieldObject() const
+{
+ return BinTextObject::GetField() ? TRUE : FALSE;
+}
+
+const SvxFieldItem* BinTextObject::GetField() const
+{
+ if ( GetContents().Count() == 1 )
+ {
+ ContentInfo* pC = GetContents()[0];
+ if ( pC->GetText().Len() == 1 )
+ {
+ USHORT nAttribs = pC->GetAttribs().Count();
+ for ( USHORT nAttr = nAttribs; nAttr; )
+ {
+ XEditAttribute* pX = pC->GetAttribs().GetObject( --nAttr );
+ if ( pX->GetItem()->Which() == EE_FEATURE_FIELD )
+ return (const SvxFieldItem*)pX->GetItem();
+ }
+ }
+ }
+ return 0;
+}
+
+BOOL BinTextObject::HasField( TypeId aType ) const
+{
+ USHORT nParagraphs = GetContents().Count();
+ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ {
+ ContentInfo* pC = GetContents().GetObject( nPara );
+ USHORT nAttrs = pC->GetAttribs().Count();
+ for ( USHORT nAttr = 0; nAttr < nAttrs; nAttr++ )
+ {
+ XEditAttribute* pAttr = pC->GetAttribs()[nAttr];
+ if ( pAttr->GetItem()->Which() == EE_FEATURE_FIELD )
+ {
+ if ( !aType )
+ return TRUE;
+
+ const SvxFieldData* pFldData = ((const SvxFieldItem*)pAttr->GetItem())->GetField();
+ if ( pFldData && pFldData->IsA( aType ) )
+ return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
+
+SfxItemSet BinTextObject::GetParaAttribs( USHORT nPara ) const
+{
+ ContentInfo* pC = GetContents().GetObject( nPara );
+ return pC->GetParaAttribs();
+}
+
+void BinTextObject::SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs )
+{
+ ContentInfo* pC = GetContents().GetObject( nPara );
+ pC->GetParaAttribs().Set( rAttribs );
+ ClearPortionInfo();
+}
+
+BOOL BinTextObject::RemoveCharAttribs( USHORT nWhich )
+{
+ BOOL bChanged = FALSE;
+
+ for ( USHORT nPara = GetContents().Count(); nPara; )
+ {
+ ContentInfo* pC = GetContents().GetObject( --nPara );
+
+ for ( USHORT nAttr = pC->GetAttribs().Count(); nAttr; )
+ {
+ XEditAttribute* pAttr = pC->GetAttribs().GetObject( --nAttr );
+ if ( !nWhich || ( pAttr->GetItem()->Which() == nWhich ) )
+ {
+ pC->GetAttribs().Remove( nAttr );
+ DestroyAttrib( pAttr );
+ bChanged = TRUE;
+ }
+ }
+ }
+
+ if ( bChanged )
+ ClearPortionInfo();
+
+ return bChanged;
+}
+
+BOOL BinTextObject::RemoveParaAttribs( USHORT nWhich )
+{
+ BOOL bChanged = FALSE;
+
+ for ( USHORT nPara = GetContents().Count(); nPara; )
+ {
+ ContentInfo* pC = GetContents().GetObject( --nPara );
+
+ if ( !nWhich )
+ {
+ if( pC->GetParaAttribs().Count() )
+ bChanged = TRUE;
+ pC->GetParaAttribs().ClearItem();
+ }
+ else
+ {
+ if ( pC->GetParaAttribs().GetItemState( nWhich ) == SFX_ITEM_ON )
+ {
+ pC->GetParaAttribs().ClearItem( nWhich );
+ bChanged = TRUE;
+ }
+ }
+ }
+
+ if ( bChanged )
+ ClearPortionInfo();
+
+ return bChanged;
+}
+
+BOOL BinTextObject::HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const
+{
+ USHORT nParagraphs = GetContents().Count();
+ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ {
+ ContentInfo* pC = GetContents().GetObject( nPara );
+ if ( ( pC->GetFamily() == eFamily ) && ( pC->GetStyle() == rName ) )
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void BinTextObject::GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& rFamily ) const
+{
+ if ( nPara < aContents.Count() )
+ {
+ ContentInfo* pC = aContents[ nPara ];
+ rName = pC->GetStyle();
+ rFamily = pC->GetFamily();
+ }
+}
+
+void BinTextObject::SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& rFamily )
+{
+ if ( nPara < aContents.Count() )
+ {
+ ContentInfo* pC = aContents[ nPara ];
+ pC->GetStyle() = rName;
+ pC->GetFamily() = rFamily;
+ }
+}
+
+BOOL BinTextObject::ImpChangeStyleSheets(
+ const XubString& rOldName, SfxStyleFamily eOldFamily,
+ const XubString& rNewName, SfxStyleFamily eNewFamily )
+{
+ const USHORT nParagraphs = GetContents().Count();
+ BOOL bChanges = FALSE;
+
+ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ {
+ ContentInfo* pC = GetContents().GetObject( nPara );
+ if ( pC->GetFamily() == eOldFamily )
+ {
+ if ( pC->GetStyle() == rOldName )
+ {
+ pC->GetStyle() = rNewName;
+ pC->GetFamily() = eNewFamily;
+ bChanges = TRUE;
+ }
+ }
+ }
+ return bChanges;
+}
+
+BOOL __EXPORT BinTextObject::ChangeStyleSheets(
+ const XubString& rOldName, SfxStyleFamily eOldFamily,
+ const XubString& rNewName, SfxStyleFamily eNewFamily )
+{
+ BOOL bChanges = ImpChangeStyleSheets( rOldName, eOldFamily, rNewName, eNewFamily );
+ if ( bChanges )
+ ClearPortionInfo();
+
+ return bChanges;
+}
+
+void __EXPORT BinTextObject::ChangeStyleSheetName( SfxStyleFamily eFamily,
+ const XubString& rOldName, const XubString& rNewName )
+{
+ ImpChangeStyleSheets( rOldName, eFamily, rNewName, eFamily );
+}
+
+void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const
+{
+ USHORT nVer = 600;
+ rOStream << nVer;
+
+ rOStream << bOwnerOfPool;
+
+ // Erst den Pool speichern, spaeter nur noch Surregate
+ if ( bOwnerOfPool )
+ {
+ GetPool()->SetFileFormatVersion( SOFFICE_FILEFORMAT_50 );
+ GetPool()->Store( rOStream );
+ }
+
+ // Aktuelle Zeichensatz speichern...
+ // GetStoreCharSet: Dateiformat fuer West-Europaeische Versionen kompatibel halten.
+ rtl_TextEncoding eEncoding = GetStoreCharSet( gsl_getSystemTextEncoding(), rOStream.GetVersion() );
+ rOStream << (USHORT) eEncoding;
+
+ // Die Anzahl der Absaetze...
+ USHORT nParagraphs = GetContents().Count();
+ rOStream << nParagraphs;
+
+ // Die einzelnen Absaetze...
+ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ {
+ ContentInfo* pC = GetContents().GetObject( nPara );
+
+ // Text...
+ String aText( pC->GetText() );
+ // Convert CH_FEATURE to CH_FEATURE_OLD
+ aText.SearchAndReplaceAll( CH_FEATURE, CH_FEATURE_OLD );
+ rOStream.WriteByteString( ByteString( aText, eEncoding ) );
+
+ // StyleName und Family...
+ rOStream.WriteByteString( ByteString( pC->GetStyle(), eEncoding ) );
+ rOStream << (USHORT)pC->GetFamily();
+
+ // Absatzattribute...
+ pC->GetParaAttribs().Store( rOStream );
+
+ // Die Anzahl der Attribute...
+ USHORT nAttribs = pC->GetAttribs().Count();
+ rOStream << nAttribs;
+
+ // Und die einzelnen Attribute
+ // Items als Surregate => immer 8 Byte pro Attrib
+ // Which = 2; Surregat = 2; Start = 2; End = 2;
+ for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ {
+ XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr );
+
+ rOStream << pX->GetItem()->Which();
+ GetPool()->StoreSurrogate( rOStream, pX->GetItem() );
+ rOStream << pX->GetStart();
+ rOStream << pX->GetEnd();
+ }
+ }
+
+ // Ab 400:
+ rOStream << nMetric;
+
+ // Ab 600
+ rOStream << nUserType;
+ rOStream << nObjSettings;
+}
+
+void __EXPORT BinTextObject::CreateData( SvStream& rIStream )
+{
+ rIStream >> nVersion;
+
+ // Das Textobject wurde erstmal mit der aktuellen Einstellung
+ // von pTextObjectPool erzeugt.
+ BOOL bOwnerOfCurrent = bOwnerOfPool;
+ rIStream >> bOwnerOfPool;
+
+ if ( bOwnerOfCurrent && !bOwnerOfPool )
+ {
+ // Es wurde ein globaler Pool verwendet, mir jetzt nicht uebergeben,
+ // aber ich brauche ihn!
+ DBG_ERROR( "Man gebe mir den globalen TextObjectPool!" );
+ return;
+ }
+ else if ( !bOwnerOfCurrent && bOwnerOfPool )
+ {
+ // Es soll ein globaler Pool verwendet werden, aber dieses
+ // Textobject hat einen eigenen.
+ pPool = EditEngine::CreatePool();
+ }
+
+ if ( bOwnerOfPool )
+ GetPool()->Load( rIStream );
+
+ // CharSet, in dem gespeichert wurde:
+ USHORT nCharSet;
+ rIStream >> nCharSet;
+
+ rtl_TextEncoding eSrcEncoding = (rtl_TextEncoding)nCharSet;
+
+ // Die Anzahl der Absaetze...
+ USHORT nParagraphs;
+ rIStream >> nParagraphs;
+
+ // Die einzelnen Absaetze...
+ for ( ULONG nPara = 0; nPara < nParagraphs; nPara++ )
+ {
+ ContentInfo* pC = CreateAndInsertContent();
+
+ // Der Text...
+ rIStream.ReadByteString( pC->GetText(), eSrcEncoding );
+
+ // StyleName und Family...
+ rIStream.ReadByteString( pC->GetStyle(), eSrcEncoding );
+ USHORT nStyleFamily;
+ rIStream >> nStyleFamily;
+ pC->GetFamily() = (SfxStyleFamily)nStyleFamily;
+
+ // Absatzattribute...
+ pC->GetParaAttribs().Load( rIStream );
+
+ // Die Anzahl der Attribute...
+ USHORT nAttribs;
+ rIStream >> nAttribs;
+
+ // Und die einzelnen Attribute
+ // Items als Surregate => immer 8 Byte pro Attrib
+ // Which = 2; Surregat = 2; Start = 2; End = 2;
+ for ( ULONG nAttr = 0; nAttr < nAttribs; nAttr++ )
+ {
+ USHORT nWhich, nStart, nEnd;
+ const SfxPoolItem* pItem;
+
+ rIStream >> nWhich;
+ nWhich = pPool->GetNewWhich( nWhich );
+ pItem = pPool->LoadSurrogate( rIStream, nWhich, 0 );
+ rIStream >> nStart;
+ rIStream >> nEnd;
+ if ( pItem )
+ {
+ XEditAttribute* pAttr = new XEditAttribute( *pItem, nStart, nEnd );
+ pC->GetAttribs().Insert( pAttr, pC->GetAttribs().Count() );
+
+ if ( ( nWhich >= EE_FEATURE_START ) && ( nWhich <= EE_FEATURE_END ) )
+ {
+ // Convert CH_FEATURE to CH_FEATURE_OLD
+ DBG_ASSERT( pC->GetText().GetChar( nStart ) == CH_FEATURE_OLD, "CreateData: CH_FEATURE expected!" );
+ if ( pC->GetText().GetChar( nStart ) == CH_FEATURE_OLD )
+ pC->GetText().SetChar( nStart, CH_FEATURE );
+ }
+ }
+ }
+ }
+
+ // Ab 400 auch die DefMetric:
+ if ( nVersion >= 400 )
+ {
+ USHORT nTmpMetric;
+ rIStream >> nTmpMetric;
+ if ( nVersion >= 401 )
+ {
+ // In der 400 gab es noch einen Bug bei Textobjekten mit eigenem
+ // Pool, deshalb erst ab 401 auswerten.
+ nMetric = nTmpMetric;
+ if ( bOwnerOfPool && pPool && ( nMetric != 0xFFFF ) )
+ pPool->SetDefaultMetric( (SfxMapUnit)nMetric );
+ }
+ }
+
+ if ( nVersion >= 600 )
+ {
+ rIStream >> nUserType;
+ rIStream >> nObjSettings;
+ }
+
+ // Ab 500 werden die Tabs anders interpretiert: TabPos + LI, vorher nur TabPos.
+ // Wirkt nur wenn auch Tab-Positionen eingestellt wurden, nicht beim DefTab.
+ if ( nVersion < 500 )
+ {
+ for ( USHORT n = 0; n < aContents.Count(); n++ )
+ {
+ ContentInfo* pC = aContents.GetObject( n );
+ const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( EE_PARA_LRSPACE );
+ if ( rLRSpace.GetTxtLeft() && ( pC->GetParaAttribs().GetItemState( EE_PARA_TABS ) == SFX_ITEM_ON ) )
+ {
+ const SvxTabStopItem& rTabs = (const SvxTabStopItem&) pC->GetParaAttribs().Get( EE_PARA_TABS );
+ SvxTabStopItem aNewTabs( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS );
+ for ( USHORT t = 0; t < rTabs.Count(); t++ )
+ {
+ const SvxTabStop& rT = rTabs[ t ];
+ aNewTabs.Insert( SvxTabStop( rT.GetTabPos() - rLRSpace.GetTxtLeft(),
+ rT.GetAdjustment(), rT.GetDecimal(), rT.GetFill() ) );
+ }
+ pC->GetParaAttribs().Put( aNewTabs );
+ }
+ }
+ }
+}
+
+USHORT BinTextObject::GetVersion() const
+{
+ return nVersion;
+}
+
+void BinTextObject::SetLRSpaceItemFlags( BOOL bOutlineMode )
+{
+ for ( USHORT nPara = GetContents().Count(); nPara; )
+ {
+ ContentInfo* pC = GetContents().GetObject( --nPara );
+ for ( USHORT n = 0; n <=1; n++ )
+ {
+ USHORT nItemId = n ? EE_PARA_LRSPACE : EE_PARA_OUTLLRSPACE;
+ if ( pC->GetParaAttribs().GetItemState( nItemId ) == SFX_ITEM_ON )
+ {
+ const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( nItemId );
+ if ( rItem.IsBulletFI() != bOutlineMode )
+ {
+ SvxLRSpaceItem aNewItem( rItem );
+ aNewItem.SetBulletFI( bOutlineMode );
+ pC->GetParaAttribs().Put( aNewItem );
+ }
+ }
+ }
+ }
+}
+
+void BinTextObject::PrepareStore( SfxStyleSheetPool* pStyleSheetPool )
+{
+ // Some Items must be generated for the 5.0 file format,
+ // because we don't have a special format for 5.x or 6.x
+ for ( USHORT nPara = GetContents().Count(); nPara; )
+ {
+ ContentInfo* pC = GetContents().GetObject( --nPara );
+ const SvxNumBulletItem* pSvxNumBulletItem = NULL;
+ if ( pC->GetParaAttribs().GetItemState(EE_PARA_NUMBULLET) == SFX_ITEM_ON )
+ {
+ pSvxNumBulletItem = &(const SvxNumBulletItem&)pC->GetParaAttribs().Get(EE_PARA_NUMBULLET);
+ }
+ else if ( pStyleSheetPool && pC->GetStyle().Len() )
+ {
+ SfxStyleSheet* pStyle = (SfxStyleSheet*)pStyleSheetPool->Find( pC->GetStyle(), pC->GetFamily() );
+ if ( pStyle )
+ pSvxNumBulletItem = &(const SvxNumBulletItem&)pStyle->GetItemSet().Get(EE_PARA_NUMBULLET);
+ }
+
+ if ( pSvxNumBulletItem )
+ {
+ SvxBulletItem aNewBullet( EE_PARA_BULLET );
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) pC->GetParaAttribs().Get( EE_PARA_OUTLLEVEL );
+ lcl_CreateBulletItem( *pSvxNumBulletItem, rLevel.GetValue(), aNewBullet );
+ pC->GetParaAttribs().Put( aNewBullet );
+ }
+ }
+}
+
+void BinTextObject::FinishStore()
+{
+ for ( USHORT nPara = GetContents().Count(); nPara; )
+ {
+ ContentInfo* pC = GetContents().GetObject( --nPara );
+ pC->GetParaAttribs().ClearItem( EE_PARA_BULLET );
+ }
+}
+
+void BinTextObject::FinishLoad( SfxStyleSheetPool* pStyleSheetPool )
+{
+ BOOL bCreateNumBulletItem = nVersion && ( nVersion < 501 );
+ for ( USHORT nPara = GetContents().Count(); nPara; )
+ {
+ ContentInfo* pC = GetContents().GetObject( --nPara );
+
+ if ( bCreateNumBulletItem )
+ {
+ BOOL bBulletInPara = pC->GetParaAttribs().GetItemState( EE_PARA_BULLET ) == SFX_ITEM_ON;
+ BOOL bLRSpaceInPara = pC->GetParaAttribs().GetItemState( EE_PARA_LRSPACE ) == SFX_ITEM_ON;
+
+ // Nur wenn ein Attribut hart gesetzt, ansonsten muss es in den Vorlagen
+ // richtig konvertiert sein.
+
+ if ( bBulletInPara || bLRSpaceInPara )
+ {
+ const SvxBulletItem* pBullet = NULL;
+ const SvxLRSpaceItem* pLRSpace = NULL;
+ SvxNumBulletItem* pNumBullet = NULL;
+ SfxStyleSheet* pStyle = NULL;
+
+ if ( pC->GetStyle().Len() )
+ pStyle = (SfxStyleSheet*)pStyleSheetPool->Find( pC->GetStyle(), pC->GetFamily() );
+
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) pC->GetParaAttribs().Get( EE_PARA_OUTLLEVEL );
+ USHORT nLevel = rLevel.GetValue();
+
+ if ( !pStyle || bBulletInPara )
+ pBullet = (const SvxBulletItem*) &pC->GetParaAttribs().Get( EE_PARA_BULLET );
+ else
+ pBullet = (const SvxBulletItem*) &pStyle->GetItemSet().Get( EE_PARA_BULLET );
+
+ if ( !pStyle || bLRSpaceInPara )
+ pLRSpace = (const SvxLRSpaceItem*) &pC->GetParaAttribs().Get( EE_PARA_LRSPACE );
+ else
+ pLRSpace = (const SvxLRSpaceItem*) &pStyle->GetItemSet().Get( EE_PARA_LRSPACE );
+
+ if ( !pStyle || ( pC->GetParaAttribs().GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON ) )
+ pNumBullet = (SvxNumBulletItem*) &pC->GetParaAttribs().Get( EE_PARA_NUMBULLET );
+ else
+ pNumBullet = (SvxNumBulletItem*) &pStyle->GetItemSet().Get( EE_PARA_NUMBULLET );
+
+ SvxNumBulletItem aNumBullet( *pNumBullet );
+ EditEngine::ImportBulletItem( aNumBullet, nLevel, pBullet, pLRSpace );
+ pC->GetParaAttribs().Put( aNumBullet );
+
+ if ( bLRSpaceInPara )
+ pC->GetParaAttribs().ClearItem( EE_PARA_LRSPACE );
+ }
+ }
+
+ // MT 07/00: EE_PARA_BULLET no longer needed
+ pC->GetParaAttribs().ClearItem( EE_PARA_BULLET );
+ }
+}
+
+void BinTextObject::AdjustImportedLRSpaceItems( BOOL bTurnOfBullets )
+{
+ for ( USHORT nPara = GetContents().Count(); nPara; )
+ {
+ ContentInfo* pC = GetContents().GetObject( --nPara );
+ if ( !bTurnOfBullets )
+ {
+ for ( USHORT n = 0; n <=1; n++ )
+ {
+ USHORT nItemId = n ? EE_PARA_LRSPACE : EE_PARA_OUTLLRSPACE;
+ if ( pC->GetParaAttribs().GetItemState( nItemId ) == SFX_ITEM_ON )
+ {
+ const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( nItemId );
+ if ( !rItem.GetTxtFirstLineOfst() )
+ {
+ SvxLRSpaceItem aNewItem( rItem );
+ aNewItem.SetTxtFirstLineOfst( (short) -1200 ); // Outliner im Draw mit MAP100TH_MM
+ if( pC->GetParaAttribs().GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON )
+ {
+ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pC->GetParaAttribs().Get( EE_PARA_NUMBULLET );
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) pC->GetParaAttribs().Get( EE_PARA_OUTLLEVEL );
+ const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( rLevel.GetValue() );
+ if ( pFmt )
+ aNewItem.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() );
+ }
+ pC->GetParaAttribs().Put( aNewItem );
+ }
+ }
+ }
+ }
+
+ // Wurden in alten Versionen vom Outliner mal am Absatz gesetzt, soll nicht mehr sein
+ if ( !bTurnOfBullets && ( nVersion < 500 ) )
+ {
+ for ( USHORT nW = EE_CHAR_START; nW <= EE_CHAR_END; nW++ )
+ pC->GetParaAttribs().ClearItem( nW );
+ }
+
+ if ( bTurnOfBullets )
+ {
+ SfxUInt16Item aBulletState( EE_PARA_BULLETSTATE, 0 );
+ pC->GetParaAttribs().Put( aBulletState );
+ }
+ }
+}
+
+
+
+#define CHARSETMARKER 0x9999
+
+void __EXPORT BinTextObject::CreateData300( SvStream& rIStream )
+{
+ // Fuer Aufwaertskompatibilitaet.
+
+ // Erst den Pool laden...
+ // Ist in der 300 immer gespeichert worden!
+ GetPool()->Load( rIStream );
+
+ // Die Anzahl der Absaetze...
+ ULONG nParagraphs;
+ rIStream >> nParagraphs;
+
+ // Die einzelnen Absaetze...
+ for ( ULONG nPara = 0; nPara < nParagraphs; nPara++ )
+ {
+ ContentInfo* pC = CreateAndInsertContent();
+
+ // Der Text...
+ rIStream.ReadByteString( pC->GetText() );
+
+ // StyleName und Family...
+ rIStream.ReadByteString( pC->GetStyle() );
+ USHORT nStyleFamily;
+ rIStream >> nStyleFamily;
+ pC->GetFamily() = (SfxStyleFamily)nStyleFamily;
+
+ // Absatzattribute...
+ pC->GetParaAttribs().Load( rIStream );
+
+ // Die Anzahl der Attribute...
+ ULONG nAttribs;
+ rIStream >> nAttribs;
+
+ // Und die einzelnen Attribute
+ // Items als Surregate => immer 8 Byte pro Attrib
+ // Which = 2; Surregat = 2; Start = 2; End = 2;
+ for ( ULONG nAttr = 0; nAttr < nAttribs; nAttr++ )
+ {
+ USHORT nWhich, nStart, nEnd;
+ const SfxPoolItem* pItem;
+
+ rIStream >> nWhich;
+ nWhich = pPool->GetNewWhich( nWhich );
+ pItem = pPool->LoadSurrogate( rIStream, nWhich, 0 );
+ rIStream >> nStart;
+ rIStream >> nEnd;
+ if ( pItem )
+ {
+ XEditAttribute* pAttr = new XEditAttribute( *pItem, nStart, nEnd );
+ pC->GetAttribs().Insert( pAttr, pC->GetAttribs().Count() );
+ }
+ }
+ }
+
+ // Prueffen, ob ein Zeichensatz gespeichert wurde
+ USHORT nCharSetMarker;
+ rIStream >> nCharSetMarker;
+ if ( nCharSetMarker == CHARSETMARKER )
+ {
+ USHORT nCharSet;
+ rIStream >> nCharSet;
+ }
+}
diff --git a/svx/source/editeng/editobj2.hxx b/svx/source/editeng/editobj2.hxx
new file mode 100644
index 0000000000..1575b66edb
--- /dev/null
+++ b/svx/source/editeng/editobj2.hxx
@@ -0,0 +1,282 @@
+/*************************************************************************
+ *
+ * $RCSfile: editobj2.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _EDITOBJ2_HXX
+#define _EDITOBJ2_HXX
+
+#include <editobj.hxx>
+#include <editdoc.hxx>
+
+class SfxStyleSheetPool;
+
+class XEditAttribute
+{
+ friend class ContentInfo; // fuer DTOR
+ friend class BinTextObject; // fuer DTOR
+
+private:
+ const SfxPoolItem* pItem;
+ USHORT nStart;
+ USHORT nEnd;
+
+ XEditAttribute();
+ XEditAttribute( const XEditAttribute& rCopyFrom );
+
+ ~XEditAttribute();
+
+public:
+ XEditAttribute( const SfxPoolItem& rAttr );
+ XEditAttribute( const SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ const SfxPoolItem* GetItem() const { return pItem; }
+
+ USHORT& GetStart() { return nStart; }
+ USHORT& GetEnd() { return nEnd; }
+
+ USHORT GetStart() const { return nStart; }
+ USHORT GetEnd() const { return nEnd; }
+
+ USHORT GetLen() const { return nEnd-nStart; }
+
+ inline BOOL IsFeature();
+};
+
+inline BOOL XEditAttribute::IsFeature()
+{
+ USHORT nWhich = pItem->Which();
+ return ( ( nWhich >= EE_FEATURE_START ) &&
+ ( nWhich <= EE_FEATURE_END ) );
+}
+
+typedef XEditAttribute* XEditAttributePtr;
+SV_DECL_PTRARR( XEditAttributeList, XEditAttributePtr, 0, 4 );
+
+struct XParaPortion
+{
+ long nHeight;
+ USHORT nFirstLineOffset;
+
+ EditLineList aLines;
+ TextPortionList aTextPortions;
+};
+
+typedef XParaPortion* XParaPortionPtr;
+SV_DECL_PTRARR( XBaseParaPortionList, XParaPortionPtr, 0, 4 );
+
+class XParaPortionList : public XBaseParaPortionList
+{
+ ULONG nRefDevPtr;
+ OutDevType eRefDevType;
+ MapMode aRefMapMode;
+ ULONG nPaperWidth;
+
+
+public:
+ XParaPortionList( OutputDevice* pRefDev, ULONG nPW ) :
+ aRefMapMode( pRefDev->GetMapMode() )
+ {
+ nRefDevPtr = (ULONG)pRefDev; nPaperWidth = nPW;
+ eRefDevType = pRefDev->GetOutDevType();
+ }
+
+ ULONG GetRefDevPtr() const { return nRefDevPtr; }
+ ULONG GetPaperWidth() const { return nPaperWidth; }
+ OutDevType GetRefDevType() const { return eRefDevType; }
+ const MapMode& GetRefMapMode() const { return aRefMapMode; }
+};
+
+
+
+class ContentInfo
+{
+ friend class BinTextObject;
+
+private:
+ String aText;
+ String aStyle;
+ XEditAttributeList aAttribs;
+ SfxStyleFamily eFamily;
+ SfxItemSet aParaAttribs;
+ WrongList* pWrongs;
+
+ ContentInfo( SfxItemPool& rPool );
+ ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse );
+
+public:
+ ~ContentInfo();
+
+ String GetText() const { return aText; }
+ String GetStyle() const { return aStyle; }
+ const XEditAttributeList& GetAttribs() const { return aAttribs; }
+ const SfxItemSet& GetParaAttribs() const { return aParaAttribs; }
+ SfxStyleFamily GetFamily() const { return eFamily; }
+
+ String& GetText() { return aText; }
+ String& GetStyle() { return aStyle; }
+ XEditAttributeList& GetAttribs() { return aAttribs; }
+ SfxItemSet& GetParaAttribs() { return aParaAttribs; }
+ SfxStyleFamily& GetFamily() { return eFamily; }
+
+ WrongList* GetWrongList() const { return pWrongs; }
+ void SetWrongList( WrongList* p ) { pWrongs = p; }
+};
+
+typedef ContentInfo* ContentInfoPtr;
+SV_DECL_PTRARR( ContentInfoList, ContentInfoPtr, 1, 4 );
+
+// MT 05/00: Sollte mal direkt EditTextObjekt werden => keine virtuellen Methoden mehr.
+
+class BinTextObject : public EditTextObject
+{
+private:
+ ContentInfoList aContents;
+ SfxItemPool* pPool;
+ BOOL bOwnerOfPool;
+ XParaPortionList* pPortionInfo;
+
+ ULONG nObjSettings;
+ USHORT nMetric;
+ USHORT nVersion;
+ USHORT nUserType;
+
+protected:
+ void DeleteContents();
+ virtual void StoreData( SvStream& rOStream ) const;
+ virtual void CreateData( SvStream& rIStream );
+ BOOL ImpChangeStyleSheets( const String& rOldName, SfxStyleFamily eOldFamily,
+ const String& rNewName, SfxStyleFamily eNewFamily );
+
+public:
+ BinTextObject( SfxItemPool* pPool );
+ BinTextObject( const BinTextObject& );
+ virtual ~BinTextObject();
+
+ virtual EditTextObject* Clone() const;
+
+ USHORT GetUserType() const;
+ void SetUserType( USHORT n );
+
+ ULONG GetObjectSettings() const;
+ void SetObjectSettings( ULONG n );
+
+ USHORT GetVersion() const; // Solange der Outliner keine Recordlaenge speichert
+ void SetLRSpaceItemFlags( BOOL bOutlineMode );
+ void AdjustImportedLRSpaceItems( BOOL bTurnOfBullets );
+
+ ContentInfo* CreateAndInsertContent();
+ XEditAttribute* CreateAttrib( const SfxPoolItem& rItem, USHORT nStart, USHORT nEnd );
+ void DestroyAttrib( XEditAttribute* pAttr );
+
+ ContentInfoList& GetContents() { return aContents; }
+ const ContentInfoList& GetContents() const { return aContents; }
+ SfxItemPool* GetPool() const { return pPool; }
+ XParaPortionList* GetPortionInfo() const { return pPortionInfo; }
+ void SetPortionInfo( XParaPortionList* pP )
+ { pPortionInfo = pP; }
+
+ virtual USHORT GetParagraphCount() const;
+ virtual String GetText( USHORT nParagraph ) const;
+ virtual void Insert( const EditTextObject& rObj, USHORT nPara );
+ virtual EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ) const;
+ virtual void RemoveParagraph( USHORT nPara );
+
+ virtual BOOL HasPortionInfo() const;
+ virtual void ClearPortionInfo();
+
+ virtual BOOL HasOnlineSpellErrors() const;
+
+ virtual BOOL HasCharAttribs( USHORT nWhich = 0 ) const;
+ virtual void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const;
+
+ virtual BOOL RemoveCharAttribs( USHORT nWhich = 0 );
+ virtual BOOL RemoveParaAttribs( USHORT nWhich = 0 );
+
+ virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd );
+
+ virtual BOOL IsFieldObject() const;
+ virtual const SvxFieldItem* GetField() const;
+ virtual BOOL HasField( TypeId Type = NULL ) const;
+
+ SfxItemSet GetParaAttribs( USHORT nPara ) const;
+ void SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs );
+
+ virtual BOOL HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const;
+ virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const;
+ virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily );
+ virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily,
+ const String& rNewName, SfxStyleFamily eNewFamily );
+ virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName );
+
+ void CreateData300( SvStream& rIStream );
+
+ BOOL HasMetric() const { return nMetric != 0xFFFF; }
+ USHORT GetMetric() const { return nMetric; }
+ void SetMetric( USHORT n ) { nMetric = n; }
+
+ BOOL IsOwnerOfPool() const { return bOwnerOfPool; }
+
+ void PrepareStore( SfxStyleSheetPool* pStyleSheetPool );
+ void FinishStore();
+ void FinishLoad( SfxStyleSheetPool* pStyleSheetPool );
+};
+
+#endif // _EDITOBJ2_HXX
+
diff --git a/svx/source/editeng/editsel.cxx b/svx/source/editeng/editsel.cxx
new file mode 100644
index 0000000000..18c93449be
--- /dev/null
+++ b/svx/source/editeng/editsel.cxx
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * $RCSfile: editsel.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <editsel.hxx>
+#include <impedit.hxx>
+#include <editview.hxx>
+
+ // ----------------------------------------------------------------------
+// class EditSelFunctionSet
+// ----------------------------------------------------------------------
+EditSelFunctionSet::EditSelFunctionSet()
+{
+ pCurView = 0;
+}
+
+void __EXPORT EditSelFunctionSet::BeginDrag()
+{
+ if ( pCurView )
+ pCurView->GetImpEditEngine()->BeginDrag( pCurView );
+}
+
+void __EXPORT EditSelFunctionSet::CreateAnchor()
+{
+ if ( pCurView )
+ pCurView->GetImpEditEngine()->CreateAnchor( pCurView );
+}
+
+void __EXPORT EditSelFunctionSet::DestroyAnchor()
+{
+ // Nur bei Mehrfachselektion
+}
+
+BOOL __EXPORT EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL )
+{
+ if ( pCurView )
+ return pCurView->GetImpEditEngine()->SetCursorAtPoint( rPointPixel, pCurView );
+
+ return FALSE;
+}
+
+BOOL __EXPORT EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
+{
+ if ( pCurView )
+ return pCurView->GetImpEditEngine()->IsSelectionAtPoint( rPointPixel, pCurView );
+ return FALSE;
+}
+
+void __EXPORT EditSelFunctionSet::DeselectAtPoint( const Point& )
+{
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// ! Implementieren, wenn Mehrfachselektion moeglich !
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+}
+
+void __EXPORT EditSelFunctionSet::DeselectAll()
+{
+ if ( pCurView )
+ pCurView->GetImpEditEngine()->DeselectAll( pCurView );
+}
+
+ // ----------------------------------------------------------------------
+// class EditSelectionEngine
+// ----------------------------------------------------------------------
+EditSelectionEngine::EditSelectionEngine() : SelectionEngine( (Window*)0 )
+{
+ // Wegen Bug OV: (1994)
+ // 1995: RangeSelection lassen, SingleSelection nur fuer ListBoxen geeignet!
+ SetSelectionMode( RANGE_SELECTION );
+ EnableDrag( TRUE );
+}
+
+void EditSelectionEngine::SetCurView( EditView* pNewView )
+{
+ if ( GetFunctionSet() )
+ ((EditSelFunctionSet*)GetFunctionSet())->SetCurView( pNewView );
+
+ if ( pNewView )
+ SetWindow( pNewView->GetWindow() );
+ else
+ SetWindow( (Window*)0 );
+}
+
+EditView* EditSelectionEngine::GetCurView()
+{
+ EditView* pView = 0;
+ if ( GetFunctionSet() )
+ pView = ((EditSelFunctionSet*)GetFunctionSet())->GetCurView();
+
+ return pView;
+}
+
diff --git a/svx/source/editeng/editsel.hxx b/svx/source/editeng/editsel.hxx
new file mode 100644
index 0000000000..c9bde71117
--- /dev/null
+++ b/svx/source/editeng/editsel.hxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * $RCSfile: editsel.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _EDITSEL_HXX
+#define _EDITSEL_HXX
+
+#ifndef _SV_SELENG_HXX //autogen
+#include <vcl/seleng.hxx>
+#endif
+
+class EditView;
+
+ // ----------------------------------------------------------------------
+// class EditSelFunctionSet
+// ----------------------------------------------------------------------
+class EditSelFunctionSet: public FunctionSet
+{
+private:
+ EditView* pCurView;
+
+public:
+ EditSelFunctionSet();
+
+ virtual void BeginDrag();
+
+ virtual void CreateAnchor();
+ virtual void DestroyAnchor();
+
+ virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE );
+
+ virtual BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ virtual void DeselectAtPoint( const Point& rPointPixel );
+ virtual void DeselectAll();
+
+ void SetCurView( EditView* pView ) { pCurView = pView; }
+ EditView* GetCurView() { return pCurView; }
+};
+
+ // ----------------------------------------------------------------------
+// class EditSelectionEngine
+// ----------------------------------------------------------------------
+class EditSelectionEngine : public SelectionEngine
+{
+private:
+
+public:
+ EditSelectionEngine();
+
+ void SetCurView( EditView* pNewView );
+ EditView* GetCurView();
+};
+
+#endif // _EDITSEL_HXX
diff --git a/svx/source/editeng/editundo.cxx b/svx/source/editeng/editundo.cxx
new file mode 100644
index 0000000000..2a60fcd58c
--- /dev/null
+++ b/svx/source/editeng/editundo.cxx
@@ -0,0 +1,767 @@
+/*************************************************************************
+ *
+ * $RCSfile: editundo.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <impedit.hxx>
+#include <editundo.hxx>
+#include <editview.hxx>
+#include <editeng.hxx>
+
+DBG_NAME( EditUndo );
+
+#define MAX_UNDOS 100 // ab dieser Menge darf geloescht werden....
+#define MIN_UNDOS 50 // soviel muss stehen bleiben...
+
+#define NO_UNDO 0xFFFF
+#define GROUP_NOTFOUND 0xFFFF
+
+TYPEINIT1( EditUndo, SfxUndoAction );
+TYPEINIT1( EditUndoDelContent, EditUndo );
+TYPEINIT1( EditUndoConnectParas, EditUndo );
+TYPEINIT1( EditUndoSplitPara, EditUndo );
+TYPEINIT1( EditUndoInsertChars, EditUndo );
+TYPEINIT1( EditUndoRemoveChars, EditUndo );
+TYPEINIT1( EditUndoInsertFeature, EditUndo );
+TYPEINIT1( EditUndoMoveParagraphs, EditUndo );
+TYPEINIT1( EditUndoSetStyleSheet, EditUndo );
+TYPEINIT1( EditUndoSetParaAttribs, EditUndo );
+TYPEINIT1( EditUndoSetAttribs, EditUndo );
+TYPEINIT1( EditUndoMarkSelection, EditUndo );
+
+void lcl_DoSetSelection( EditView* pView, USHORT nPara )
+{
+ EPaM aEPaM( nPara, 0 );
+ EditPaM aPaM( pView->GetImpEditEngine()->CreateEditPaM( aEPaM ) );
+ aPaM.SetIndex( aPaM.GetNode()->Len() );
+ EditSelection aSel( aPaM, aPaM );
+ pView->GetImpEditView()->SetEditSelection( aSel );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoManager
+// ------------------------------------------------------------------------
+EditUndoManager::EditUndoManager( ImpEditEngine* p )
+{
+ pImpEE = p;
+}
+
+BOOL __EXPORT EditUndoManager::Undo( USHORT nCount )
+{
+ if ( GetUndoActionCount() == 0 )
+ return FALSE;
+
+ DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" );
+
+ if ( !pImpEE->GetActiveView() )
+ {
+ if ( pImpEE->GetEditViews().Count() )
+ pImpEE->SetActiveView( pImpEE->GetEditViews().GetObject(0) );
+ else
+ {
+ DBG_ERROR( "Undo in Engine ohne View nicht moeglich!" );
+ return FALSE;
+ }
+ }
+
+ pImpEE->GetActiveView()->GetImpEditView()->DrawSelection(); // alte Selektion entfernen
+
+ pImpEE->SetUndoMode( TRUE );
+ BOOL bDone = SfxUndoManager::Undo( nCount );
+ pImpEE->SetUndoMode( FALSE );
+
+ EditSelection aNewSel( pImpEE->GetActiveView()->GetImpEditView()->GetEditSelection() );
+ DBG_ASSERT( !aNewSel.IsInvalid(), "Ungueltige Selektion nach Undo()" );
+ DBG_ASSERT( !aNewSel.DbgIsBuggy( pImpEE->GetEditDoc() ), "Kaputte Selektion nach Undo()" );
+
+ aNewSel.Min() = aNewSel.Max();
+ pImpEE->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel );
+ pImpEE->FormatAndUpdate( pImpEE->GetActiveView() );
+
+ return bDone;
+}
+
+BOOL __EXPORT EditUndoManager::Redo( USHORT nCount )
+{
+ if ( GetRedoActionCount() == 0 )
+ return FALSE;
+
+ DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" );
+
+ if ( !pImpEE->GetActiveView() )
+ {
+ if ( pImpEE->GetEditViews().Count() )
+ pImpEE->SetActiveView( pImpEE->GetEditViews().GetObject(0) );
+ else
+ {
+ DBG_ERROR( "Redo in Engine ohne View nicht moeglich!" );
+ return FALSE;
+ }
+ }
+
+ pImpEE->GetActiveView()->GetImpEditView()->DrawSelection(); // alte Selektion entfernen
+
+ pImpEE->SetUndoMode( TRUE );
+ BOOL bDone = SfxUndoManager::Redo( nCount );
+ pImpEE->SetUndoMode( FALSE );
+
+ EditSelection aNewSel( pImpEE->GetActiveView()->GetImpEditView()->GetEditSelection() );
+ DBG_ASSERT( !aNewSel.IsInvalid(), "Ungueltige Selektion nach Undo()" );
+ DBG_ASSERT( !aNewSel.DbgIsBuggy( pImpEE->GetEditDoc() ), "Kaputte Selektion nach Redo()" );
+
+ aNewSel.Min() = aNewSel.Max();
+ pImpEE->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel );
+ pImpEE->FormatAndUpdate( pImpEE->GetActiveView() );
+
+ return bDone;
+}
+
+ // -----------------------------------------------------------------------
+// EditUndo
+// ------------------------------------------------------------------------
+EditUndo::EditUndo( USHORT nI, ImpEditEngine* p )
+{
+ DBG_CTOR( EditUndo, 0 );
+ nId = nI;
+ pImpEE = p;
+}
+
+EditUndo::~EditUndo()
+{
+ DBG_DTOR( EditUndo, 0 );
+}
+
+USHORT __EXPORT EditUndo::GetId() const
+{
+ DBG_CHKTHIS( EditUndo, 0 );
+ return nId;
+}
+
+BOOL __EXPORT EditUndo::CanRepeat(SfxRepeatTarget&) const
+{
+ return FALSE;
+}
+
+XubString __EXPORT EditUndo::GetComment() const
+{
+ XubString aComment;
+ if ( pImpEE )
+ {
+ EditEngine* pEditEng = pImpEE->GetEditEnginePtr();
+ aComment = pEditEng->GetUndoComment( GetId() );
+ }
+ return aComment;
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoDelContent
+// ------------------------------------------------------------------------
+EditUndoDelContent::EditUndoDelContent( ImpEditEngine* pImpEE, ContentNode* pNode, USHORT n )
+ : EditUndo( EDITUNDO_DELCONTENT, pImpEE )
+{
+ pContentNode = pNode;
+ nNode = n;
+ bDelObject = TRUE;
+}
+
+EditUndoDelContent::~EditUndoDelContent()
+{
+ if ( bDelObject )
+ delete pContentNode;
+}
+
+void __EXPORT EditUndoDelContent::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ GetImpEditEngine()->InsertContent( pContentNode, nNode );
+ bDelObject = FALSE; // gehoert wieder der Engine
+ EditSelection aSel( EditPaM( pContentNode, 0 ), EditPaM( pContentNode, pContentNode->Len() ) );
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel );
+}
+
+void __EXPORT EditUndoDelContent::Redo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+
+ ImpEditEngine* pImpEE = GetImpEditEngine();
+
+ // pNode stimmt nicht mehr, falls zwischendurch Undos, in denen
+ // Absaetze verschmolzen sind.
+ pContentNode = pImpEE->GetEditDoc().SaveGetObject( nNode );
+ DBG_ASSERT( pContentNode, "EditUndoDelContent::Redo(): Node?!" );
+
+ delete pImpEE->GetParaPortions()[nNode];
+ pImpEE->GetParaPortions().Remove( nNode );
+
+ // Node nicht loeschen, haengt im Undo!
+ pImpEE->GetEditDoc().Remove( nNode );
+ if( pImpEE->IsCallParaInsertedOrDeleted() )
+ pImpEE->GetEditEnginePtr()->ParagraphDeleted( nNode );
+
+ DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pContentNode, nNode );
+ pImpEE->aDeletedNodes.Insert( pInf, pImpEE->aDeletedNodes.Count() );
+ pImpEE->UpdateSelections();
+
+ ContentNode* pN = ( nNode < pImpEE->GetEditDoc().Count() )
+ ? pImpEE->GetEditDoc().SaveGetObject( nNode )
+ : pImpEE->GetEditDoc().SaveGetObject( nNode-1 );
+ DBG_ASSERT( pN && ( pN != pContentNode ), "?! RemoveContent !? " );
+ EditPaM aPaM( pN, pN->Len() );
+
+ bDelObject = TRUE; // gehoert wieder dem Undo
+
+ pImpEE->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) );
+}
+
+void __EXPORT EditUndoDelContent::Repeat()
+{
+ DBG_ERROR( "EditUndoDelContent::Repeat nicht implementiert!" );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoConnectParas
+// ------------------------------------------------------------------------
+EditUndoConnectParas::EditUndoConnectParas( ImpEditEngine* pImpEE, USHORT nN, USHORT nSP,
+ const SfxItemSet& rLeftParaAttribs, const SfxItemSet& rRightParaAttribs,
+ const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, BOOL bBkwrd )
+ : EditUndo( EDITUNDO_CONNECTPARAS, pImpEE ),
+ aLeftParaAttribs( rLeftParaAttribs ),
+ aRightParaAttribs( rRightParaAttribs )
+{
+ nNode = nN;
+ nSepPos = nSP;
+
+ if ( pLeftStyle )
+ {
+ aLeftStyleName = pLeftStyle->GetName();
+ eLeftStyleFamily = pLeftStyle->GetFamily();
+ }
+ if ( pRightStyle )
+ {
+ aRightStyleName = pRightStyle->GetName();
+ eRightStyleFamily = pRightStyle->GetFamily();
+ }
+
+ bBackward = bBkwrd;
+}
+
+EditUndoConnectParas::~EditUndoConnectParas()
+{
+}
+
+void __EXPORT EditUndoConnectParas::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+
+ // Bei SplitContent darf noch kein ParagraphInserted gerufen werden,
+ // weil der Outliner sich auf die Attribute verlaesst um die Tiefe
+ // des Absatzes zu initialisieren
+
+ BOOL bCall = GetImpEditEngine()->IsCallParaInsertedOrDeleted();
+ GetImpEditEngine()->SetCallParaInsertedOrDeleted( FALSE );
+
+ EditPaM aPaM = GetImpEditEngine()->SplitContent( nNode, nSepPos );
+ GetImpEditEngine()->SetParaAttribs( nNode, aLeftParaAttribs );
+ GetImpEditEngine()->SetParaAttribs( nNode+1, aRightParaAttribs );
+
+ GetImpEditEngine()->SetCallParaInsertedOrDeleted( bCall );
+ if ( GetImpEditEngine()->IsCallParaInsertedOrDeleted() )
+ GetImpEditEngine()->GetEditEnginePtr()->ParagraphInserted( nNode+1 );
+
+ if ( GetImpEditEngine()->GetStyleSheetPool() )
+ {
+ if ( aLeftStyleName.Len() )
+ GetImpEditEngine()->SetStyleSheet( (USHORT)nNode, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aLeftStyleName, eLeftStyleFamily ) );
+ if ( aRightStyleName.Len() )
+ GetImpEditEngine()->SetStyleSheet( nNode+1, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aRightStyleName, eRightStyleFamily ) );
+ }
+
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) );
+}
+
+void __EXPORT EditUndoConnectParas::Redo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ EditPaM aPaM = GetImpEditEngine()->ConnectContents( nNode, bBackward );
+
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) );
+}
+
+void __EXPORT EditUndoConnectParas::Repeat()
+{
+ DBG_ERROR( "EditUndoConnectParas::Repeat nicht implementiert!" );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoSplitPara
+// ------------------------------------------------------------------------
+EditUndoSplitPara::EditUndoSplitPara( ImpEditEngine* pImpEE, USHORT nN, USHORT nSP )
+ : EditUndo( EDITUNDO_SPLITPARA, pImpEE )
+{
+ nNode = nN;
+ nSepPos = nSP;
+}
+
+EditUndoSplitPara::~EditUndoSplitPara()
+{
+}
+
+void __EXPORT EditUndoSplitPara::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ EditPaM aPaM = GetImpEditEngine()->ConnectContents( nNode, FALSE );
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) );
+}
+
+void __EXPORT EditUndoSplitPara::Redo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ EditPaM aPaM = GetImpEditEngine()->SplitContent( nNode, nSepPos );
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) );
+}
+
+void __EXPORT EditUndoSplitPara::Repeat()
+{
+ DBG_ERROR( "EditUndoSplitPara::Repeat nicht implementiert!" );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoInsertChars
+// ------------------------------------------------------------------------
+EditUndoInsertChars::EditUndoInsertChars( ImpEditEngine* pImpEE, const EPaM& rEPaM, const XubString& rStr )
+ : EditUndo( EDITUNDO_INSERTCHARS, pImpEE ),
+ aEPaM( rEPaM ), aText( rStr )
+{
+}
+
+void __EXPORT EditUndoInsertChars::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) );
+ EditSelection aSel( aPaM, aPaM );
+ aSel.Max().GetIndex() += aText.Len();
+ EditPaM aNewPaM( GetImpEditEngine()->ImpDeleteSelection( aSel ) );
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aNewPaM, aNewPaM ) );
+}
+
+void __EXPORT EditUndoInsertChars::Redo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) );
+ GetImpEditEngine()->ImpInsertText( EditSelection( aPaM, aPaM ), aText );
+ EditPaM aNewPaM( aPaM );
+ aNewPaM.GetIndex() += aText.Len();
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aNewPaM ) );
+}
+
+BOOL __EXPORT EditUndoInsertChars::Merge( SfxUndoAction* pNextAction )
+{
+ if ( !pNextAction->ISA( EditUndoInsertChars ) )
+ return FALSE;
+
+ EditUndoInsertChars* pNext = (EditUndoInsertChars*)pNextAction;
+
+ if ( aEPaM.nPara != pNext->aEPaM.nPara )
+ return FALSE;
+
+ if ( ( aEPaM.nIndex + aText.Len() ) == pNext->aEPaM.nIndex )
+ {
+ aText += pNext->aText;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void __EXPORT EditUndoInsertChars::Repeat()
+{
+ DBG_ERROR( "EditUndoInsertChars::Repeat nicht implementiert!" );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoRemoveChars
+// ------------------------------------------------------------------------
+EditUndoRemoveChars::EditUndoRemoveChars( ImpEditEngine* pImpEE, const EPaM& rEPaM, const XubString& rStr )
+ : EditUndo( EDITUNDO_REMOVECHARS, pImpEE ),
+ aEPaM( rEPaM ), aText( rStr )
+{
+}
+
+void __EXPORT EditUndoRemoveChars::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) );
+ EditSelection aSel( aPaM, aPaM );
+ GetImpEditEngine()->ImpInsertText( aSel, aText );
+ aSel.Max().GetIndex() += aText.Len();
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel );
+}
+
+void __EXPORT EditUndoRemoveChars::Redo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) );
+ EditSelection aSel( aPaM, aPaM );
+ aSel.Max().GetIndex() += aText.Len();
+ EditPaM aNewPaM = GetImpEditEngine()->ImpDeleteSelection( aSel );
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aNewPaM );
+}
+
+void __EXPORT EditUndoRemoveChars::Repeat()
+{
+ DBG_ERROR( "EditUndoRemoveChars::Repeat nicht implementiert!" );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoInsertFeature
+// ------------------------------------------------------------------------
+EditUndoInsertFeature::EditUndoInsertFeature( ImpEditEngine* pImpEE, const EPaM& rEPaM, const SfxPoolItem& rFeature)
+ : EditUndo( EDITUNDO_INSERTFEATURE, pImpEE ), aEPaM( rEPaM )
+{
+ pFeature = rFeature.Clone();
+ DBG_ASSERT( pFeature, "Feature konnte nicht dupliziert werden: EditUndoInsertFeature" );
+}
+
+EditUndoInsertFeature::~EditUndoInsertFeature()
+{
+ delete pFeature;
+}
+
+void __EXPORT EditUndoInsertFeature::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) );
+ EditSelection aSel( aPaM, aPaM );
+ // Attribute werden dort implizit vom Dokument korrigiert...
+ aSel.Max().GetIndex()++;
+ EditPaM aNewPaM = GetImpEditEngine()->ImpDeleteSelection( aSel );
+ aSel.Max().GetIndex()--; // Fuer Selektion
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel );
+}
+
+void __EXPORT EditUndoInsertFeature::Redo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) );
+ EditSelection aSel( aPaM, aPaM );
+ GetImpEditEngine()->ImpInsertFeature( aSel, *pFeature );
+ if ( pFeature->Which() == EE_FEATURE_FIELD )
+ GetImpEditEngine()->UpdateFields();
+ aSel.Max().GetIndex()++;
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel );
+}
+
+void __EXPORT EditUndoInsertFeature::Repeat()
+{
+ DBG_ERROR( "EditUndoInsertFeature::Repeat nicht implementiert!" );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoMoveParagraphs
+// ------------------------------------------------------------------------
+EditUndoMoveParagraphs::EditUndoMoveParagraphs
+ ( ImpEditEngine* pImpEE, const Range& rParas, USHORT n )
+ : EditUndo( EDITUNDO_MOVEPARAGRAPHS, pImpEE ),
+ nParagraphs( rParas )
+{
+ nDest = n;
+}
+
+EditUndoMoveParagraphs::~EditUndoMoveParagraphs()
+{
+}
+
+void __EXPORT EditUndoMoveParagraphs::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ Range aTmpRange( nParagraphs );
+ long nTmpDest = aTmpRange.Min();
+
+ long nDiff = ( nDest - aTmpRange.Min() );
+ aTmpRange.Min() += nDiff;
+ aTmpRange.Max() += nDiff;
+
+ if ( nParagraphs.Min() < (long)nDest )
+ {
+ long nLen = aTmpRange.Len();
+ aTmpRange.Min() -= nLen;
+ aTmpRange.Max() -= nLen;
+ }
+ else
+ nTmpDest += aTmpRange.Len();
+
+ EditSelection aNewSel( GetImpEditEngine()->MoveParagraphs( aTmpRange, (USHORT)nTmpDest, 0 ) );
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel );
+}
+
+void __EXPORT EditUndoMoveParagraphs::Redo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ EditSelection aNewSel( GetImpEditEngine()->MoveParagraphs( nParagraphs, nDest, 0 ) );
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel );
+}
+
+void __EXPORT EditUndoMoveParagraphs::Repeat()
+{
+ DBG_ERROR( "EditUndoMoveParagraphs::Repeat nicht implementiert!" );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoSetStyleSheet
+// ------------------------------------------------------------------------
+EditUndoSetStyleSheet::EditUndoSetStyleSheet( ImpEditEngine* pImpEE, USHORT nP,
+ const XubString& rPrevName, SfxStyleFamily ePrevFam,
+ const XubString& rNewName, SfxStyleFamily eNewFam,
+ const SfxItemSet& rPrevParaAttribs )
+ : EditUndo( EDITUNDO_STYLESHEET, pImpEE ), aPrevName( rPrevName ), aNewName( rNewName ),
+ aPrevParaAttribs( rPrevParaAttribs )
+{
+ ePrevFamily = ePrevFam;
+ eNewFamily = eNewFam;
+ nPara = nP;
+}
+
+EditUndoSetStyleSheet::~EditUndoSetStyleSheet()
+{
+}
+
+void __EXPORT EditUndoSetStyleSheet::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ GetImpEditEngine()->SetStyleSheet( nPara, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aPrevName, ePrevFamily ) );
+ GetImpEditEngine()->SetParaAttribs( nPara, aPrevParaAttribs );
+ lcl_DoSetSelection( GetImpEditEngine()->GetActiveView(), nPara );
+}
+
+void __EXPORT EditUndoSetStyleSheet::Redo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ GetImpEditEngine()->SetStyleSheet( nPara, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aNewName, eNewFamily ) );
+ lcl_DoSetSelection( GetImpEditEngine()->GetActiveView(), nPara );
+}
+
+void __EXPORT EditUndoSetStyleSheet::Repeat()
+{
+ DBG_ERROR( "EditUndoSetStyleSheet::Repeat nicht implementiert!" );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoSetParaAttribs
+// ------------------------------------------------------------------------
+EditUndoSetParaAttribs::EditUndoSetParaAttribs( ImpEditEngine* pImpEE, USHORT nP, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems )
+ : EditUndo( EDITUNDO_PARAATTRIBS, pImpEE ),
+ aPrevItems( rPrevItems ),
+ aNewItems(rNewItems )
+{
+ nPara = nP;
+}
+
+EditUndoSetParaAttribs::~EditUndoSetParaAttribs()
+{
+}
+
+void __EXPORT EditUndoSetParaAttribs::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ GetImpEditEngine()->SetParaAttribs( nPara, aPrevItems );
+ lcl_DoSetSelection( GetImpEditEngine()->GetActiveView(), nPara );
+}
+
+void __EXPORT EditUndoSetParaAttribs::Redo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ GetImpEditEngine()->SetParaAttribs( nPara, aNewItems );
+ lcl_DoSetSelection( GetImpEditEngine()->GetActiveView(), nPara );
+}
+
+void __EXPORT EditUndoSetParaAttribs::Repeat()
+{
+ DBG_ERROR( "EditUndoSetParaAttribs::Repeat nicht implementiert!" );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoSetAttribs
+// ------------------------------------------------------------------------
+EditUndoSetAttribs::EditUndoSetAttribs( ImpEditEngine* pImpEE, const ESelection& rESel, const SfxItemSet& rNewItems )
+ : EditUndo( EDITUNDO_ATTRIBS, pImpEE ),
+ aNewAttribs( rNewItems ),
+ aESel( rESel )
+{
+ // Wenn das EditUndoSetAttribs eigentlich ein RemoveAttribs ist, koennte
+ // man das eigentlich an einem leeren ItemSet erkennen, aber dann muesste
+ // an einigen Stellen abgefangen werden, das ggf. ein SetAttribs mit einem
+ // leeren ItemSet gemacht wird.
+ // => Ich habe lieber diesen Member spendiert...
+ bSetIsRemove = FALSE;
+ bRemoveParaAttribs = FALSE;
+ nRemoveWhich = 0;
+ nSpecial = 0;
+}
+
+EditUndoSetAttribs::~EditUndoSetAttribs()
+{
+ // Items aus Pool holen...
+ SfxItemPool* pPool = aNewAttribs.GetPool();
+ USHORT nContents = aPrevAttribs.Count();
+ for ( USHORT n = 0; n < nContents; n++ )
+ {
+ ContentAttribsInfo* pInf = aPrevAttribs[n];
+ DBG_ASSERT( pInf, "Undo_DTOR (SetAttribs): pInf = NULL!" );
+ for ( USHORT nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ )
+ {
+ EditCharAttrib* pX = pInf->GetPrevCharAttribs()[nAttr];
+ DBG_ASSERT( pX, "Undo_DTOR (SetAttribs): pX = NULL!" );
+ pPool->Remove( *pX->GetItem() );
+ delete pX;
+ }
+ delete pInf;
+ }
+}
+
+void __EXPORT EditUndoSetAttribs::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ ImpEditEngine* pImpEE = GetImpEditEngine();
+ BOOL bFields = FALSE;
+ for ( USHORT nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ )
+ {
+ ContentAttribsInfo* pInf = aPrevAttribs[ (USHORT)(nPara-aESel.nStartPara) ];
+ DBG_ASSERT( pInf, "Undo (SetAttribs): pInf = NULL!" );
+
+ // erstmal die Absatzattribute...
+ pImpEE->SetParaAttribs( nPara, pInf->GetPrevParaAttribs() );
+
+ // Dann die Zeichenattribute...
+ // Alle Attribute inkl. Features entfernen, werden wieder neu eingestellt.
+ pImpEE->RemoveCharAttribs( nPara, 0, TRUE );
+ DBG_ASSERT( pImpEE->GetEditDoc().SaveGetObject( nPara ), "Undo (SetAttribs): pNode = NULL!" );
+ ContentNode* pNode = pImpEE->GetEditDoc().GetObject( nPara );
+ for ( USHORT nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ )
+ {
+ EditCharAttrib* pX = pInf->GetPrevCharAttribs()[nAttr];
+ DBG_ASSERT( pX, "Redo (SetAttribs): pX = NULL!" );
+ // wird autom. 'eingepoolt'.
+ pImpEE->GetEditDoc().InsertAttrib( pNode, pX->GetStart(), pX->GetEnd(), *pX->GetItem() );
+ if ( pX->Which() == EE_FEATURE_FIELD )
+ bFields = TRUE;
+ }
+ }
+ if ( bFields )
+ pImpEE->UpdateFields();
+ ImpSetSelection( GetImpEditEngine()->GetActiveView() );
+}
+
+void __EXPORT EditUndoSetAttribs::Redo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ ImpEditEngine* pImpEE = GetImpEditEngine();
+
+ EditSelection aSel( pImpEE->CreateSel( aESel ) );
+ if ( !bSetIsRemove )
+ pImpEE->SetAttribs( aSel, aNewAttribs, nSpecial );
+ else
+ pImpEE->RemoveCharAttribs( aSel, bRemoveParaAttribs, nRemoveWhich );
+
+ ImpSetSelection( GetImpEditEngine()->GetActiveView() );
+}
+
+void __EXPORT EditUndoSetAttribs::Repeat()
+{
+ DBG_ERROR( "EditUndoSetAttribs::Repeat nicht implementiert!" );
+}
+
+void EditUndoSetAttribs::ImpSetSelection( EditView* pView )
+{
+ ImpEditEngine* pImpEE = GetImpEditEngine();
+ EditSelection aSel( pImpEE->CreateSel( aESel ) );
+ GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel );
+}
+
+ // -----------------------------------------------------------------------
+// EditUndoMarkSelection
+// ------------------------------------------------------------------------
+EditUndoMarkSelection::EditUndoMarkSelection( ImpEditEngine* pImpEE, const ESelection& rSel )
+ : EditUndo( EDITUNDO_MARKSELECTION, pImpEE ), aSelection( rSel )
+{
+}
+
+EditUndoMarkSelection::~EditUndoMarkSelection()
+{
+}
+
+void __EXPORT EditUndoMarkSelection::Undo()
+{
+ DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" );
+ if ( GetImpEditEngine()->GetActiveView() )
+ GetImpEditEngine()->GetActiveView()->SetSelection( aSelection );
+}
+
+void __EXPORT EditUndoMarkSelection::Redo()
+{
+ // Fuer Redo unwichtig, weil am Anfang der Undo-Klammerung
+}
+
+void __EXPORT EditUndoMarkSelection::Repeat()
+{
+ DBG_ERROR( "EditUndoMarkSelection::Repeat nicht implementiert!" );
+}
+
diff --git a/svx/source/editeng/editundo.hxx b/svx/source/editeng/editundo.hxx
new file mode 100644
index 0000000000..39915d50b0
--- /dev/null
+++ b/svx/source/editeng/editundo.hxx
@@ -0,0 +1,334 @@
+/*************************************************************************
+ *
+ * $RCSfile: editundo.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _EDITUNDO_HXX
+#define _EDITUNDO_HXX
+
+#include <editdoc.hxx>
+#include <editund2.hxx>
+#include <editdata.hxx>
+
+#define UNDO_NOACTION 0
+#define UNDO_NEWUNDO 1
+#define UNDO_UNDOSDELETED 2
+#define UNDO_EMPTYGROUPDELETED 3
+#define UNDO_INVALIDEND 4
+
+class ImpEditEngine;
+class EditView;
+
+ // -----------------------------------------------------------------------
+// EditUndoDelContent
+// ------------------------------------------------------------------------
+class EditUndoDelContent : public EditUndo
+{
+private:
+ BOOL bDelObject;
+ USHORT nNode;
+ ContentNode* pContentNode; // Zeigt auf das gueltige,
+ // nicht zerstoerte Objekt!
+
+public:
+ TYPEINFO();
+ EditUndoDelContent( ImpEditEngine* pImpEE, ContentNode* pNode, USHORT nPortio );
+ ~EditUndoDelContent();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+ // -----------------------------------------------------------------------
+// EditUndoConnectParas
+// ------------------------------------------------------------------------
+class EditUndoConnectParas : public EditUndo
+{
+private:
+ USHORT nNode;
+ USHORT nSepPos;
+ SfxItemSet aLeftParaAttribs;
+ SfxItemSet aRightParaAttribs;
+
+ // 2 Pointer waeren schoener, aber dann muesste es ein SfxListener sein.
+ String aLeftStyleName;
+ String aRightStyleName;
+ SfxStyleFamily eLeftStyleFamily;
+ SfxStyleFamily eRightStyleFamily;
+
+ BOOL bBackward;
+
+public:
+ TYPEINFO();
+ EditUndoConnectParas( ImpEditEngine* pImpEE, USHORT nNode, USHORT nSepPos,
+ const SfxItemSet& rLeftParaAttribs, const SfxItemSet& rRightParaAttribs,
+ const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, BOOL bBackward );
+ ~EditUndoConnectParas();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+ // -----------------------------------------------------------------------
+// EditUndoSplitPara
+// ------------------------------------------------------------------------
+class EditUndoSplitPara : public EditUndo
+{
+private:
+ USHORT nNode;
+ USHORT nSepPos;
+
+public:
+ TYPEINFO();
+ EditUndoSplitPara( ImpEditEngine* pImpEE, USHORT nNode, USHORT nSepPos );
+ ~EditUndoSplitPara();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+ // -----------------------------------------------------------------------
+// EditUndoInsertChars
+// ------------------------------------------------------------------------
+class EditUndoInsertChars : public EditUndo
+{
+private:
+ EPaM aEPaM;
+ String aText;
+
+public:
+ TYPEINFO();
+ EditUndoInsertChars( ImpEditEngine* pImpEE, const EPaM& rEPaM, const String& rStr );
+
+ const EPaM& GetEPaM() { return aEPaM; }
+ String& GetStr() { return aText; }
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+
+ virtual BOOL Merge( SfxUndoAction *pNextAction );
+};
+
+ // -----------------------------------------------------------------------
+// EditUndoRemoveChars
+// ------------------------------------------------------------------------
+class EditUndoRemoveChars : public EditUndo
+{
+private:
+ EPaM aEPaM;
+ String aText;
+
+public:
+ TYPEINFO();
+ EditUndoRemoveChars( ImpEditEngine* pImpEE, const EPaM& rEPaM, const String& rStr );
+
+ const EPaM& GetEPaM() { return aEPaM; }
+ String& GetStr() { return aText; }
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+ // -----------------------------------------------------------------------
+// EditUndoInsertFeature
+// ------------------------------------------------------------------------
+class EditUndoInsertFeature : public EditUndo
+{
+private:
+ EPaM aEPaM;
+ SfxPoolItem* pFeature;
+
+public:
+ TYPEINFO();
+ EditUndoInsertFeature( ImpEditEngine* pImpEE, const EPaM& rEPaM,
+ const SfxPoolItem& rFeature);
+ ~EditUndoInsertFeature();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+ // -----------------------------------------------------------------------
+// EditUndoMoveParagraphs
+// ------------------------------------------------------------------------
+class EditUndoMoveParagraphs: public EditUndo
+{
+private:
+ Range nParagraphs;
+ USHORT nDest;
+
+public:
+ TYPEINFO();
+ EditUndoMoveParagraphs( ImpEditEngine* pImpEE, const Range& rParas, USHORT nDest );
+ ~EditUndoMoveParagraphs();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+ // -----------------------------------------------------------------------
+// EditUndoSetStyleSheet
+// ------------------------------------------------------------------------
+class EditUndoSetStyleSheet: public EditUndo
+{
+private:
+ USHORT nPara;
+ XubString aPrevName;
+ XubString aNewName;
+ SfxStyleFamily ePrevFamily;
+ SfxStyleFamily eNewFamily;
+ SfxItemSet aPrevParaAttribs;
+
+public:
+ TYPEINFO();
+
+ EditUndoSetStyleSheet( ImpEditEngine* pImpEE, USHORT nPara,
+ const XubString& rPrevName, SfxStyleFamily ePrevFamily,
+ const XubString& rNewName, SfxStyleFamily eNewFamily,
+ const SfxItemSet& rPrevParaAttribs );
+ ~EditUndoSetStyleSheet();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+ // -----------------------------------------------------------------------
+// EditUndoSetParaAttribs
+// ------------------------------------------------------------------------
+class EditUndoSetParaAttribs: public EditUndo
+{
+private:
+ USHORT nPara;
+ SfxItemSet aPrevItems;
+ SfxItemSet aNewItems;
+
+public:
+ TYPEINFO();
+ EditUndoSetParaAttribs( ImpEditEngine* pImpEE, USHORT nPara, const SfxItemSet& rPrevItems, const SfxItemSet& rNewItems );
+ ~EditUndoSetParaAttribs();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+ // -----------------------------------------------------------------------
+// EditUndoSetAttribs
+// ------------------------------------------------------------------------
+class EditUndoSetAttribs: public EditUndo
+{
+private:
+ ESelection aESel;
+ SfxItemSet aNewAttribs;
+ ContentInfoArray aPrevAttribs;
+
+ BYTE nSpecial;
+ BOOL bSetIsRemove;
+ BOOL bRemoveParaAttribs;
+ USHORT nRemoveWhich;
+
+ void ImpSetSelection( EditView* pView );
+
+
+public:
+ TYPEINFO();
+ EditUndoSetAttribs( ImpEditEngine* pImpEE, const ESelection& rESel, const SfxItemSet& rNewItems );
+ ~EditUndoSetAttribs();
+
+ ContentInfoArray& GetContentInfos() { return aPrevAttribs; }
+ SfxItemSet& GetNewAttribs() { return aNewAttribs; }
+
+ void SetSpecial( BYTE n ) { nSpecial = n; }
+ void SetRemoveAttribs( BOOL b ) { bSetIsRemove = b; }
+ void SetRemoveParaAttribs( BOOL b ) { bRemoveParaAttribs = b; }
+ void SetRemoveWhich( USHORT n ) { nRemoveWhich = n; }
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+ // -----------------------------------------------------------------------
+// EditUndoMarkSelection
+// ------------------------------------------------------------------------
+class EditUndoMarkSelection: public EditUndo
+{
+private:
+ ESelection aSelection;
+
+public:
+ TYPEINFO();
+ EditUndoMarkSelection( ImpEditEngine* pImpEE, const ESelection& rSel );
+ ~EditUndoMarkSelection();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+
+#endif // _EDITUNDO_HXX
diff --git a/svx/source/editeng/editview.cxx b/svx/source/editeng/editview.cxx
new file mode 100644
index 0000000000..78f0d0c2d7
--- /dev/null
+++ b/svx/source/editeng/editview.cxx
@@ -0,0 +1,1214 @@
+/*************************************************************************
+ *
+ * $RCSfile: editview.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#define __PRIVATE 1
+
+#include <srchitem.hxx>
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editview.hxx>
+#include <flditem.hxx>
+#include <svxacorr.hxx>
+#include <eerdll.hxx>
+#include <eerdll2.hxx>
+#include <editeng.hrc>
+#include <tools/isolang.hxx>
+#include <vcl/menu.hxx>
+
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARY1_HPP_
+#include <com/sun/star/linguistic/XDictionary1.hpp>
+#endif
+
+using namespace rtl;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::linguistic;
+
+
+DBG_NAME( EditView );
+
+void SetSearchFlags( SvxSearchItem& rSearchItem, sal_uInt16 nSearchFlags )
+{
+ rSearchItem.SetWordOnly( nSearchFlags & EE_SEARCH_WORDONLY ? sal_True : sal_False );
+ rSearchItem.SetExact( nSearchFlags & EE_SEARCH_EXACT ? sal_True : sal_False );
+ rSearchItem.SetBackward( nSearchFlags & EE_SEARCH_BACKWARD ? sal_True : sal_False );
+ rSearchItem.SetSelection( nSearchFlags & EE_SEARCH_INSELECTION ? sal_True : sal_False );
+ rSearchItem.SetRegExp( nSearchFlags & EE_SEARCH_REGEXPR ? sal_True : sal_False );
+ rSearchItem.SetPattern( nSearchFlags & EE_SEARCH_PATTERN ? sal_True : sal_False );
+}
+
+
+ // ----------------------------------------------------------------------
+// class EditView
+// ----------------------------------------------------------------------
+EditView::EditView( EditEngine* pEng, Window* pWindow )
+{
+ DBG_CTOR( EditView, 0 );
+ pImpEditView = new ImpEditView( pEng, pWindow );
+}
+
+EditView::~EditView()
+{
+ DBG_DTOR( EditView, 0 );
+ delete pImpEditView;
+}
+
+ImpEditEngine* EditView::GetImpEditEngine() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->pEditEngine->pImpEditEngine;
+}
+
+EditEngine* EditView::GetEditEngine() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return pImpEditView->pEditEngine;
+}
+
+void EditView::Invalidate()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ if ( !pImpEditView->DoInvalidateMore() )
+ pImpEditView->GetWindow()->Invalidate( pImpEditView->aOutArea );
+ else
+ {
+ Rectangle aRect( pImpEditView->aOutArea );
+ long nMore = pImpEditView->GetWindow()->PixelToLogic( Size( pImpEditView->GetInvalidateMore(), 0 ) ).Width();
+ aRect.Left() -= nMore;
+ aRect.Right() += nMore;
+ aRect.Top() -= nMore;
+ aRect.Bottom() += nMore;
+ pImpEditView->GetWindow()->Invalidate( aRect );
+ }
+}
+
+void EditView::SetReadOnly( sal_Bool bReadOnly )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->bReadOnly = bReadOnly;
+}
+
+sal_Bool EditView::IsReadOnly() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->bReadOnly;
+}
+
+void EditView::SetSelection( const ESelection& rESel )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ // Falls jemand gerade ein leeres Attribut hinterlassen hat,
+ // und dann der Outliner die Selektion manipulitert:
+ if ( !pImpEditView->GetEditSelection().HasRange() )
+ {
+ ContentNode* pNode = pImpEditView->GetEditSelection().Max().GetNode();
+ PIMPEE->CursorMoved( pNode );
+ }
+ EditSelection aNewSelection( PIMPEE->ConvertSelection( rESel.nStartPara, rESel.nStartPos, rESel.nEndPara, rESel.nEndPos ) );
+
+ // Wenn nach einem KeyInput die Selection manipuliert wird:
+ PIMPEE->CheckIdleFormatter();
+
+ // Selektion darf nicht bei einem unsichtbaren Absatz Starten/Enden:
+ ParaPortion* pPortion = PIMPEE->FindParaPortion( aNewSelection.Min().GetNode() );
+ if ( !pPortion->IsVisible() )
+ {
+ pPortion = PIMPEE->GetPrevVisPortion( pPortion );
+ ContentNode* pNode = pPortion ? pPortion->GetNode() : PIMPEE->GetEditDoc().GetObject( 0 );
+ aNewSelection.Min() = EditPaM( pNode, pNode->Len() );
+ }
+ pPortion = PIMPEE->FindParaPortion( aNewSelection.Max().GetNode() );
+ if ( !pPortion->IsVisible() )
+ {
+ pPortion = PIMPEE->GetPrevVisPortion( pPortion );
+ ContentNode* pNode = pPortion ? pPortion->GetNode() : PIMPEE->GetEditDoc().GetObject( 0 );
+ aNewSelection.Max() = EditPaM( pNode, pNode->Len() );
+ }
+
+
+ pImpEditView->DrawSelection(); // alte Selektion 'weg-zeichnen'
+ pImpEditView->SetEditSelection( aNewSelection );
+ pImpEditView->DrawSelection();
+ sal_Bool bGotoCursor = pImpEditView->DoAutoScroll();
+ ShowCursor( bGotoCursor );
+}
+
+ESelection EditView::GetSelection() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ ESelection aSelection;
+
+ aSelection.nStartPara = PIMPEE->GetEditDoc().GetPos( pImpEditView->GetEditSelection().Min().GetNode() );
+ aSelection.nEndPara = PIMPEE->GetEditDoc().GetPos( pImpEditView->GetEditSelection().Max().GetNode() );
+
+ aSelection.nStartPos = pImpEditView->GetEditSelection().Min().GetIndex();
+ aSelection.nEndPos = pImpEditView->GetEditSelection().Max().GetIndex();
+
+ return aSelection;
+}
+
+sal_Bool EditView::HasSelection() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->HasSelection();
+}
+
+void EditView::DeleteSelected()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ pImpEditView->DrawSelection();
+
+ PIMPEE->UndoActionStart( EDITUNDO_DELETE );
+
+ EditPaM aPaM = PIMPEE->DeleteSelected( pImpEditView->GetEditSelection() );
+
+ PIMPEE->UndoActionEnd( EDITUNDO_DELETE );
+
+ pImpEditView->SetEditSelection( EditSelection( aPaM, aPaM ) );
+ PIMPEE->FormatAndUpdate( this );
+ ShowCursor();
+}
+
+void EditView::Paint( const Rectangle& rRect )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->Paint( pImpEditView, rRect );
+}
+
+void EditView::SetEditEngine( EditEngine* pEditEng )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ pImpEditView->pEditEngine = pEditEng;
+ EditSelection aStartSel;
+ aStartSel = PIMPEE->GetEditDoc().GetStartPaM();
+ pImpEditView->SetEditSelection( aStartSel );
+}
+
+void EditView::SetWindow( Window* pWin )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->pOutWin = pWin;
+ PIMPEE->GetSelEngine().Reset();
+}
+
+Window* EditView::GetWindow() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->pOutWin;
+}
+
+void EditView::SetVisArea( const Rectangle& rRec )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->SetVisArea( rRec );
+}
+
+const Rectangle& EditView::GetVisArea() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->GetVisArea();
+}
+
+void EditView::SetOutputArea( const Rectangle& rRec )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->SetOutputArea( rRec );
+
+ // Rest nur hier, wenn API-Aufruf:
+ pImpEditView->CalcAnchorPoint();
+ if ( PIMPEE->GetStatus().AutoPageSize() )
+ pImpEditView->RecalcOutputArea();
+ pImpEditView->ShowCursor( sal_False, sal_False );
+}
+
+const Rectangle& EditView::GetOutputArea() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->GetOutputArea();
+}
+
+void EditView::SetPointer( const Pointer& rPointer )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->SetPointer( rPointer );
+}
+
+const Pointer& EditView::GetPointer() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->GetPointer();
+}
+
+void EditView::SetCursor( const Cursor& rCursor )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ delete pImpEditView->pCursor;
+ pImpEditView->pCursor = new Cursor( rCursor );
+}
+
+Cursor* EditView::GetCursor() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->pCursor;
+}
+
+sal_uInt16 EditView::SearchAndReplace( const XubString& rBefore, const XubString& rAfter, EditSearchMode eSearchMode )
+{
+ // eSearchMode auswerten!
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->UndoActionStart( EDITUNDO_SRCHANDREPL );
+ sal_uInt16 n = PIMPEE->SearchAndReplace( rBefore, rAfter, this );
+ PIMPEE->UndoActionEnd( EDITUNDO_SRCHANDREPL );
+ return n;
+}
+
+sal_Bool EditView::Search( const XubString& rText, sal_uInt16 nFlags )
+{
+#ifndef SVX_LIGHT
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ SvxSearchItem aSrchItem( SID_SEARCH_ITEM );
+ SetSearchFlags( aSrchItem, nFlags );
+ aSrchItem.SetSearchString( rText );
+ return PIMPEE->Search( aSrchItem, this );
+#else
+ return sal_False;
+#endif
+}
+
+void EditView::InsertText( const XubString& rStr, sal_Bool bSelect )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ ImpEditEngine* pImpEE = PIMPEE;
+ pImpEditView->DrawSelection();
+
+ EditPaM aPaM1;
+ if ( bSelect )
+ {
+ EditSelection aTmpSel( pImpEditView->GetEditSelection() );
+ aTmpSel.Adjust( pImpEE->GetEditDoc() );
+ aPaM1 = aTmpSel.Min();
+ }
+
+ pImpEE->UndoActionStart( EDITUNDO_INSERT );
+ EditPaM aPaM2( pImpEE->InsertText( pImpEditView->GetEditSelection(), rStr ) );
+ pImpEE->UndoActionEnd( EDITUNDO_INSERT );
+
+ if ( bSelect )
+ {
+ DBG_ASSERT( !aPaM1.DbgIsBuggy( pImpEE->GetEditDoc() ), "Insert: PaM kaputt" );
+ pImpEditView->SetEditSelection( EditSelection( aPaM1, aPaM2 ) );
+ }
+ else
+ pImpEditView->SetEditSelection( EditSelection( aPaM2, aPaM2 ) );
+
+ pImpEE->FormatAndUpdate( this );
+}
+
+sal_Bool EditView::PostKeyEvent( const KeyEvent& rKeyEvent )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return pImpEditView->pEditEngine->PostKeyEvent( rKeyEvent, this );
+}
+
+sal_Bool EditView::MouseButtonUp( const MouseEvent& rMouseEvent )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ if ( PIMPEE->aStatus.NotifyCursorMovements() )
+ {
+ if ( PIMPEE->aStatus.GetPrevParagraph() != PIMPEE->GetEditDoc().GetPos( pImpEditView->GetEditSelection().Max().GetNode() ) )
+ {
+ PIMPEE->aStatus.GetStatusWord() = PIMPEE->aStatus.GetStatusWord() | EE_STAT_CRSRLEFTPARA;
+ PIMPEE->CallStatusHdl();
+ }
+ }
+ pImpEditView->nTravelXPos = TRAVEL_X_DONTKNOW;
+ return PIMPEE->MouseButtonUp( rMouseEvent, this );
+}
+
+sal_Bool EditView::MouseButtonDown( const MouseEvent& rMouseEvent )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->CheckIdleFormatter(); // Falls schnelles Tippen und MouseButtonDown
+ if ( PIMPEE->aStatus.NotifyCursorMovements() )
+ PIMPEE->aStatus.GetPrevParagraph() = PIMPEE->GetEditDoc().GetPos( pImpEditView->GetEditSelection().Max().GetNode() );
+ pImpEditView->nTravelXPos = TRAVEL_X_DONTKNOW;
+ return PIMPEE->MouseButtonDown( rMouseEvent, this );
+}
+
+sal_Bool EditView::MouseMove( const MouseEvent& rMouseEvent )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ pImpEditView->nTravelXPos = TRAVEL_X_DONTKNOW;
+ return PIMPEE->MouseMove( rMouseEvent, this );
+}
+
+void EditView::Command( const CommandEvent& rCEvt )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->CheckIdleFormatter(); // Falls schnelles Tippen und MouseButtonDown
+ PIMPEE->Command( rCEvt, this );
+}
+
+void EditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+// Draw vertraegt die Assertion nicht, spaeter mal aktivieren
+// DBG_ASSERT( pImpEditView->pEditEngine->HasView( this ), "ShowCursor - View nicht angemeldet!" );
+
+ if ( pImpEditView->pEditEngine->HasView( this ) )
+ {
+ // Das ControlWord hat mehr Gewicht:
+ if ( !pImpEditView->DoAutoScroll() )
+ bGotoCursor = sal_False;
+ pImpEditView->ShowCursor( bGotoCursor, bForceVisCursor );
+ }
+}
+
+void EditView::HideCursor()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->GetCursor()->Hide();
+}
+
+Pair EditView::Scroll( long ndX, long ndY, BYTE nRangeCheck )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return pImpEditView->Scroll( ndX, ndY, nRangeCheck );
+}
+
+const SfxItemSet& EditView::GetEmptyItemSet()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return PIMPEE->GetEmptyItemSet();
+}
+
+void EditView::SetAttribs( const SfxItemSet& rSet )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ DBG_ASSERT( !pImpEditView->aEditSelection.IsInvalid(), "Blinde Selection in ...." );
+
+ // Kein Undo-Kappseln noetig...
+ pImpEditView->DrawSelection();
+ PIMPEE->SetAttribs( pImpEditView->GetEditSelection(), rSet, ATTRSPECIAL_WHOLEWORD );
+ PIMPEE->FormatAndUpdate( this );
+}
+
+void EditView::SetParaAttribs( const SfxItemSet& rSet, sal_uInt16 nPara )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ // Kein Undo-Kappseln noetig...
+ PIMPEE->SetParaAttribs( nPara, rSet );
+ // Beim Aendern von Absatzattributen muss immer formatiert werden...
+ PIMPEE->FormatAndUpdate( this );
+}
+
+void EditView::RemoveAttribs( sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ pImpEditView->DrawSelection();
+ PIMPEE->UndoActionStart( EDITUNDO_RESETATTRIBS );
+ PIMPEE->RemoveCharAttribs( pImpEditView->GetEditSelection(), bRemoveParaAttribs, nWhich );
+ PIMPEE->UndoActionEnd( EDITUNDO_RESETATTRIBS );
+ PIMPEE->FormatAndUpdate( this );
+}
+
+void EditView::RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ // Undo ?????????????
+ PIMPEE->RemoveCharAttribs( nPara, nWhich );
+ PIMPEE->FormatAndUpdate( this );
+}
+
+SfxItemSet EditView::GetAttribs()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ DBG_ASSERT( !pImpEditView->aEditSelection.IsInvalid(), "Blinde Selection in ...." );
+ return PIMPEE->GetAttribs( pImpEditView->GetEditSelection() );
+}
+
+void EditView::Undo()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->Undo( this );
+}
+
+void EditView::Redo()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->Redo( this );
+}
+
+sal_uInt32 EditView::Read( SvStream& rInput, EETextFormat eFormat, sal_Bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ EditSelection aOldSel( pImpEditView->GetEditSelection() );
+ pImpEditView->DrawSelection();
+ PIMPEE->UndoActionStart( EDITUNDO_READ );
+ EditPaM aEndPaM = PIMPEE->Read( rInput, eFormat, aOldSel, pHTTPHeaderAttrs );
+ PIMPEE->UndoActionEnd( EDITUNDO_READ );
+ EditSelection aNewSel( aEndPaM, aEndPaM );
+ if ( bSelect )
+ {
+ aOldSel.Adjust( PIMPEE->GetEditDoc() );
+ aNewSel.Min() = aOldSel.Min();
+ }
+
+ pImpEditView->SetEditSelection( aNewSel );
+ sal_Bool bGotoCursor = pImpEditView->DoAutoScroll();
+ ShowCursor( bGotoCursor );
+
+ return rInput.GetError();
+}
+
+sal_uInt32 EditView::Write( SvStream& rOutput, EETextFormat eFormat )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->Write( rOutput, eFormat, pImpEditView->GetEditSelection() );
+ ShowCursor();
+ return rOutput.GetError();
+}
+
+void EditView::Cut()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ PIMPEE->UndoActionStart( EDITUNDO_CUT );
+ EditSelection aCurSel ( PIMPEE->CutCopy( this, sal_True ) );
+ PIMPEE->UndoActionEnd( EDITUNDO_CUT );
+
+ pImpEditView->SetEditSelection( aCurSel );
+ PIMPEE->UpdateSelections();
+ PIMPEE->FormatAndUpdate( this );
+}
+
+void EditView::Copy()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->CutCopy( this, sal_False );
+}
+
+void EditView::Paste()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ PIMPEE->UndoActionStart( EDITUNDO_PASTE );
+ EditSelection aCurSel( PIMPEE->Paste( this, sal_False ) );
+ PIMPEE->UndoActionEnd( EDITUNDO_PASTE );
+
+ pImpEditView->SetEditSelection( aCurSel );
+ PIMPEE->UpdateSelections();
+ PIMPEE->FormatAndUpdate( this );
+}
+
+void EditView::PasteSpecial()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ PIMPEE->UndoActionStart( EDITUNDO_PASTE );
+ EditSelection aCurSel ( PIMPEE->Paste( this, sal_True ) );
+ PIMPEE->UndoActionEnd( EDITUNDO_PASTE );
+
+ pImpEditView->SetEditSelection( aCurSel );
+ PIMPEE->UpdateSelections();
+ PIMPEE->FormatAndUpdate( this );
+}
+
+void EditView::EnablePaste( sal_Bool bEnable )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ pImpEditView->EnablePaste( bEnable );
+}
+
+sal_Bool EditView::IsPasteEnabled() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return pImpEditView->IsPasteEnabled();
+}
+
+Point EditView::GetWindowPosTopLeft( sal_uInt16 nParagraph )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ Point aDocPos( pImpEditView->pEditEngine->GetDocPosTopLeft( nParagraph ) );
+ return pImpEditView->GetWindowPos( aDocPos );
+}
+
+sal_uInt16 EditView::GetParagraph( const Point& rMousePosPixel )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ Point aMousePos( rMousePosPixel );
+ aMousePos = GetWindow()->PixelToLogic( aMousePos );
+ Point aDocPos( pImpEditView->GetDocPos( aMousePos ) );
+ sal_uInt16 nParagraph = PIMPEE->GetParaPortions().FindParagraph( aDocPos.Y() );
+ return nParagraph;
+}
+
+void EditView::IndentBlock()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ PIMPEE->IndentBlock( this, sal_True );
+}
+
+void EditView::UnindentBlock()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ PIMPEE->IndentBlock( this, sal_False );
+}
+
+EESelectionMode EditView::GetSelectionMode() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->GetSelectionMode();
+}
+
+void EditView::SetSelectionMode( EESelectionMode eMode )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->SetSelectionMode( eMode );
+}
+
+XubString EditView::GetSelected()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return PIMPEE->GetSelected( pImpEditView->GetEditSelection() );
+}
+
+void EditView::MoveParagraphs( Range aParagraphs, sal_uInt16 nNewPos )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->UndoActionStart( EDITUNDO_MOVEPARAS );
+ PIMPEE->MoveParagraphs( aParagraphs, nNewPos, this );
+ PIMPEE->UndoActionEnd( EDITUNDO_MOVEPARAS );
+}
+
+void EditView::SetBackgroundColor( const Color& rColor )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ pImpEditView->SetBackgroundColor( rColor );
+}
+
+Color EditView::GetBackgroundColor() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return pImpEditView->GetBackgroundColor();
+}
+
+void EditView::SetControlWord( sal_uInt32 nWord )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->nControl = nWord;
+}
+
+sal_uInt32 EditView::GetControlWord() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->nControl;
+}
+
+EditTextObject* EditView::CreateTextObject()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return PIMPEE->CreateTextObject( pImpEditView->GetEditSelection() );
+}
+
+void EditView::InsertText( const EditTextObject& rTextObject )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ pImpEditView->DrawSelection();
+
+ PIMPEE->UndoActionStart( EDITUNDO_INSERT );
+ EditSelection aTextSel( PIMPEE->InsertText( rTextObject, pImpEditView->GetEditSelection() ) );
+ PIMPEE->UndoActionEnd( EDITUNDO_INSERT );
+
+ aTextSel.Min() = aTextSel.Max(); // Selektion nicht behalten.
+ pImpEditView->SetEditSelection( aTextSel );
+ PIMPEE->FormatAndUpdate( this );
+}
+
+sal_Bool EditView::Drop( const DropEvent& rEvt )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ // Undo-Kappselung nur intern, falls nicht noetig....
+ return PIMPEE->Drop( rEvt, this );
+}
+
+ESelection EditView::GetDropPos()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return PIMPEE->GetDropPos();
+}
+
+sal_Bool EditView::QueryDrop( DropEvent& rEvt )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return IsReadOnly() ? sal_False : PIMPEE->QueryDrop( rEvt, this );
+}
+
+void EditView::SetEditEngineUpdateMode( sal_Bool bUpdate )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->SetUpdateMode( bUpdate, this );
+}
+
+void EditView::ForceUpdate()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ PIMPEE->SetUpdateMode( sal_True, this, sal_True );
+}
+
+void EditView::SetStyleSheet( SfxStyleSheet* pStyle )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ EditSelection aSel( pImpEditView->GetEditSelection() );
+ PIMPEE->UndoActionStart( EDITUNDO_STYLESHEET );
+ PIMPEE->SetStyleSheet( aSel, pStyle );
+ PIMPEE->UndoActionEnd( EDITUNDO_STYLESHEET );
+}
+
+SfxStyleSheet* EditView::GetStyleSheet() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+
+ EditSelection aSel( pImpEditView->GetEditSelection() );
+ aSel.Adjust( PIMPEE->GetEditDoc() );
+ sal_uInt16 nStartPara = PIMPEE->GetEditDoc().GetPos( aSel.Min().GetNode() );
+ sal_uInt16 nEndPara = PIMPEE->GetEditDoc().GetPos( aSel.Max().GetNode() );
+
+ SfxStyleSheet* pStyle = NULL;
+ for ( sal_uInt16 n = nStartPara; n <= nEndPara; n++ )
+ {
+ SfxStyleSheet* pTmpStyle = PIMPEE->GetStyleSheet( n );
+ if ( ( n != nStartPara ) && ( pStyle != pTmpStyle ) )
+ return NULL; // Nicht eindeutig.
+ pStyle = pTmpStyle;
+ }
+ return pStyle;
+}
+
+sal_Bool EditView::IsInsertMode() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->IsInsertMode();
+}
+
+void EditView::SetInsertMode( sal_Bool bInsert )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->SetInsertMode( bInsert );
+}
+
+void EditView::SetAnchorMode( EVAnchorMode eMode )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->SetAnchorMode( eMode );
+}
+
+EVAnchorMode EditView::GetAnchorMode() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return pImpEditView->GetAnchorMode();
+}
+
+sal_Bool EditView::MatchGroup()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ EditSelection aNewSel( PIMPEE->MatchGroup( pImpEditView->GetEditSelection() ) );
+ if ( aNewSel.HasRange() )
+ {
+ pImpEditView->DrawSelection();
+ pImpEditView->SetEditSelection( aNewSel );
+ pImpEditView->DrawSelection();
+ ShowCursor();
+ return sal_True;
+ }
+ return sal_False;
+}
+
+void EditView::CompleteAutoCorrect()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ if ( !pImpEditView->HasSelection() && PIMPEE->GetStatus().DoAutoCorrect() )
+ {
+ pImpEditView->DrawSelection();
+ EditSelection aSel = pImpEditView->GetEditSelection();
+ aSel = PIMPEE->EndOfWord( aSel.Max() );
+ // MT 06/00: Why pass EditSelection to AutoCorrect, not EditPaM?!
+ aSel = PIMPEE->AutoCorrect( aSel, 0, !IsInsertMode() );
+ pImpEditView->SetEditSelection( aSel );
+ if ( PIMPEE->IsModified() )
+ PIMPEE->FormatAndUpdate( this );
+ }
+}
+
+EESpellState EditView::StartSpeller( LanguageType eLang, sal_Bool bMultipleDoc )
+{
+#ifdef SVX_LIGHT
+ return EE_SPELL_NOSPELLER;
+#else
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ if ( !PIMPEE->GetSpeller().is() )
+ return EE_SPELL_NOSPELLER;
+ PIMPEE->eDefaultLanguage = eLang;
+ SvxSpellWrapper::CheckSpellLang( PIMPEE->GetSpeller(), eLang );
+ return PIMPEE->Spell( this, bMultipleDoc );
+#endif
+}
+
+EESpellState EditView::StartThesaurus( LanguageType eLang )
+{
+#ifdef SVX_LIGHT
+ return EE_SPELL_NOSPELLER;
+#else
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ if ( !PIMPEE->GetSpeller().is() )
+ return EE_SPELL_NOSPELLER;
+ PIMPEE->eDefaultLanguage = eLang;
+ return PIMPEE->StartThesaurus( this );
+#endif
+}
+
+sal_uInt16 EditView::StartSearchAndReplace( const SvxSearchItem& rSearchItem )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ return PIMPEE->StartSearchAndReplace( this, rSearchItem );
+}
+
+sal_Bool EditView::IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ sal_Bool bIsWrong = sal_False;
+ if ( !HasSelection() )
+ {
+ EditPaM aPaM = pImpEditView->GetEditSelection().Max();
+ bIsWrong = pImpEditView->IsWrongSpelledWord( aPaM, bMarkIfWrong );
+ }
+ return bIsWrong;
+}
+
+sal_Bool EditView::IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ Point aPos ( pImpEditView->GetWindow()->PixelToLogic( rPosPixel ) );
+ aPos = pImpEditView->GetDocPos( aPos );
+ EditPaM aPaM = pImpEditView->pEditEngine->pImpEditEngine->GetPaM( aPos, sal_False );
+ return pImpEditView->IsWrongSpelledWord( aPaM , bMarkIfWrong );
+}
+
+void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
+{
+#ifndef SVX_LIGHT
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ Point aPos ( pImpEditView->GetWindow()->PixelToLogic( rPosPixel ) );
+ aPos = pImpEditView->GetDocPos( aPos );
+ EditPaM aPaM = pImpEditView->pEditEngine->pImpEditEngine->GetPaM( aPos, sal_False );
+ Reference< XSpellChecker1 > xSpeller( PIMPEE->GetSpeller() );
+ if ( xSpeller.is() && pImpEditView->IsWrongSpelledWord( aPaM, sal_True ) )
+ {
+ PopupMenu aPopupMenu( EditResId( RID_MENU_SPELL ) );
+ PopupMenu *pAutoMenu = aPopupMenu.GetPopupMenu( MN_AUTOCORR );
+ PopupMenu *pInsertMenu = aPopupMenu.GetPopupMenu( MN_INSERT );
+
+ // Gibt es Replace-Vorschlaege?
+ String aSelected( GetSelected() );
+ Reference< XSpellAlternatives > xSpellAlt =
+ xSpeller->spell( aSelected, PIMPEE->GetLanguage() );
+ Sequence< OUString > aAlt;
+ if (xSpellAlt.is())
+ aAlt = xSpellAlt->getAlternatives();
+ const OUString *pAlt = aAlt.getConstArray();
+ sal_uInt16 nWords = aAlt.getLength();
+ if ( nWords )
+ {
+ for ( sal_uInt16 nW = 0; nW < nWords; nW++ )
+ {
+ String aAlternate( pAlt[nW] );
+ aPopupMenu.InsertItem( MN_ALTSTART+nW, aAlternate, 0, nW );
+ pAutoMenu->InsertItem( MN_AUTOSTART+nW, aAlternate, 0, nW );
+ }
+ aPopupMenu.InsertSeparator( nWords );
+ }
+ else
+ aPopupMenu.RemoveItem( MN_AUTOCORR ); // Loeschen?
+
+ Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+
+ Sequence< Reference< XDictionary > > aDics;
+ if (xDicList.is())
+ aDics = xDicList->getDictionaries();
+ const Reference< XDictionary > *pDic = aDics.getConstArray();
+ sal_uInt16 nLanguage = PIMPEE->eDefaultLanguage;
+ sal_uInt16 nDicCount = aDics.getLength();
+ for ( sal_uInt16 i = 0; i < nDicCount; i++ )
+ {
+ Reference< XDictionary1 > xDic( pDic[i], UNO_QUERY );
+ if (xDic.is())
+ {
+ sal_uInt16 nActLanguage = xDic->getLanguage();
+ if( xDic->isActive() &&
+ xDic->getDictionaryType() == DictionaryType_POSITIVE &&
+ (nLanguage == nActLanguage || LANGUAGE_NONE == nActLanguage ) )
+ {
+ pInsertMenu->InsertItem( MN_DICTSTART + i, xDic->getName() );
+ }
+ }
+ }
+
+ if ( !pInsertMenu->GetItemCount() )
+ aPopupMenu.EnableItem( MN_INSERT, sal_False );
+
+ aPopupMenu.RemoveDisabledEntries( sal_True, sal_True );
+
+ Point aPos( pImpEditView->GetWindow()->OutputToScreenPixel( rPosPixel ) );
+ sal_uInt16 nId = aPopupMenu.Execute( pImpEditView->GetWindow(), aPos );
+ if ( nId == MN_IGNORE )
+ {
+ String aWord = pImpEditView->SpellIgnoreOrAddWord( sal_False );
+ if ( pCallBack )
+ {
+ SpellCallbackInfo aInf( SPELLCMD_IGNOREWORD, aWord );
+ pCallBack->Call( &aInf );
+ }
+ }
+ else if ( nId == MN_SPELLING )
+ {
+ if ( !pCallBack )
+ {
+ // Cursor vor das Wort setzen...
+ EditPaM aCursor = pImpEditView->GetEditSelection().Min();
+ pImpEditView->DrawSelection(); // alte Selektion 'weg-zeichnen'
+ pImpEditView->SetEditSelection( EditSelection( aCursor, aCursor ) );
+ pImpEditView->DrawSelection();
+ // Stuerzt ab, wenn keine SfxApp
+ PIMPEE->Spell( this, sal_False );
+ }
+ else
+ {
+ SpellCallbackInfo aInf( SPELLCMD_STARTSPELLDLG, String() );
+ pCallBack->Call( &aInf );
+ }
+ }
+ else if ( nId >= MN_DICTSTART )
+ {
+ Reference< XDictionary1 > xDic( pDic[nId - MN_DICTSTART], UNO_QUERY );
+ if (xDic.is())
+ xDic->add( aSelected, sal_False, String(), LANGUAGE_NONE );
+ aPaM.GetNode()->GetWrongList()->GetInvalidStart() = 0;
+ PIMPEE->StartOnlineSpellTimer();
+ }
+ else if ( nId >= MN_AUTOSTART )
+ {
+ DBG_ASSERT(nId - MN_AUTOSTART < aAlt.getLength(), "index out of range");
+ String aWord = pAlt[nId - MN_AUTOSTART];
+ SvxAutoCorrect* pAutoCorrect = EE_DLL()->GetGlobalData()->GetAutoCorrect();
+ if ( pAutoCorrect )
+ pAutoCorrect->PutText( aSelected, aWord, PIMPEE->GetLanguage() );
+ InsertText( aWord );
+ }
+ else if ( nId >= MN_ALTSTART ) // Replace
+ {
+ DBG_ASSERT(nId - MN_ALTSTART < aAlt.getLength(), "index out of range");
+ String aWord = pAlt[nId - MN_ALTSTART];
+ InsertText( aWord );
+ }
+ }
+#endif
+}
+
+void EditView::SpellIgnoreWord()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ pImpEditView->SpellIgnoreOrAddWord( sal_False );
+}
+
+sal_Bool EditView::SelectCurrentWord()
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ EditSelection aCurSel( pImpEditView->GetEditSelection() );
+ pImpEditView->DrawSelection();
+ aCurSel = PIMPEE->SelectWord( aCurSel.Max() );
+ pImpEditView->SetEditSelection( aCurSel );
+ pImpEditView->DrawSelection();
+ ShowCursor( sal_True, sal_False );
+ return aCurSel.HasRange() ? sal_True : sal_False;
+}
+
+void EditView::InsertField( const SvxFieldItem& rFld )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ ImpEditEngine* pImpEE = PIMPEE;
+ pImpEditView->DrawSelection();
+ pImpEE->UndoActionStart( EDITUNDO_INSERT );
+ EditPaM aPaM( pImpEE->InsertField( pImpEditView->GetEditSelection(), rFld ) );
+ pImpEE->UndoActionEnd( EDITUNDO_INSERT );
+ pImpEditView->SetEditSelection( EditSelection( aPaM, aPaM ) );
+ pImpEE->UpdateFields();
+ pImpEE->FormatAndUpdate( this );
+}
+
+const SvxFieldItem* EditView::GetFieldUnderMousePointer() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ sal_uInt16 nPara, nPos;
+ return GetFieldUnderMousePointer( nPara, nPos );
+}
+
+const SvxFieldItem* EditView::GetField( const Point& rPos, sal_uInt16* pPara, sal_uInt16* pPos ) const
+{
+ if( !GetOutputArea().IsInside( rPos ) )
+ return 0;
+
+ Point aDocPos( pImpEditView->GetDocPos( rPos ) );
+ EditPaM aPaM = pImpEditView->pEditEngine->pImpEditEngine->GetPaM( aDocPos, sal_False );
+
+ if ( aPaM.GetIndex() == aPaM.GetNode()->Len() )
+ {
+ // Sonst immer, wenn Feld ganz am Schluss und Mouse unter Text
+ return 0;
+ }
+
+ const CharAttribArray& rAttrs = aPaM.GetNode()->GetCharAttribs().GetAttribs();
+ sal_uInt16 nXPos = aPaM.GetIndex();
+ for ( sal_uInt16 nAttr = rAttrs.Count(); nAttr; )
+ {
+ EditCharAttrib* pAttr = rAttrs[--nAttr];
+ if ( pAttr->GetStart() == nXPos )
+ if ( pAttr->Which() == EE_FEATURE_FIELD )
+ {
+ DBG_ASSERT( pAttr->GetItem()->ISA( SvxFieldItem ), "Kein FeldItem..." );
+ if ( pPara )
+ *pPara = PIMPEE->GetEditDoc().GetPos( aPaM.GetNode() );
+ if ( pPos )
+ *pPos = pAttr->GetStart();
+ return (const SvxFieldItem*)pAttr->GetItem();
+ }
+ }
+ return 0;
+}
+
+const SvxFieldItem* EditView::GetFieldUnderMousePointer( sal_uInt16& nPara, sal_uInt16& nPos ) const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+ Point aPos = pImpEditView->GetWindow()->GetPointerPosPixel();
+ aPos = pImpEditView->GetWindow()->PixelToLogic( aPos );
+ return GetField( aPos, &nPara, &nPos );
+}
+
+const SvxFieldItem* EditView::GetFieldAtSelection() const
+{
+ EditSelection aSel( pImpEditView->GetEditSelection() );
+ aSel.Adjust( pImpEditView->pEditEngine->pImpEditEngine->GetEditDoc() );
+ // Nur wenn Cursor vor Feld, keine Selektion, oder nur Feld selektiert
+ if ( ( aSel.Min().GetNode() == aSel.Max().GetNode() ) &&
+ ( ( aSel.Max().GetIndex() == aSel.Min().GetIndex() ) ||
+ ( aSel.Max().GetIndex() == aSel.Min().GetIndex()+1 ) ) )
+ {
+ EditPaM aPaM = aSel.Min();
+ const CharAttribArray& rAttrs = aPaM.GetNode()->GetCharAttribs().GetAttribs();
+ sal_uInt16 nXPos = aPaM.GetIndex();
+ for ( sal_uInt16 nAttr = rAttrs.Count(); nAttr; )
+ {
+ EditCharAttrib* pAttr = rAttrs[--nAttr];
+ if ( pAttr->GetStart() == nXPos )
+ if ( pAttr->Which() == EE_FEATURE_FIELD )
+ {
+ DBG_ASSERT( pAttr->GetItem()->ISA( SvxFieldItem ), "Kein FeldItem..." );
+ return (const SvxFieldItem*)pAttr->GetItem();
+ }
+ }
+ }
+ return 0;
+}
+
+XubString EditView::GetWordUnderMousePointer() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ Rectangle aRect;
+ return GetWordUnderMousePointer( aRect );
+}
+
+XubString EditView::GetWordUnderMousePointer( Rectangle& rWordRect ) const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+
+ Point aPos = pImpEditView->GetWindow()->GetPointerPosPixel();
+ aPos = pImpEditView->GetWindow()->PixelToLogic( aPos );
+
+ XubString aWord;
+
+ if( GetOutputArea().IsInside( aPos ) )
+ {
+ ImpEditEngine* pImpEE = pImpEditView->pEditEngine->pImpEditEngine;
+ Point aDocPos( pImpEditView->GetDocPos( aPos ) );
+ EditPaM aPaM = pImpEE->GetPaM( aDocPos, sal_False );
+ EditSelection aWordSel = pImpEE->SelectWord( aPaM );
+
+ Rectangle aTopLeftRec( pImpEE->PaMtoEditCursor( aWordSel.Min() ) );
+ Rectangle aBottomRightRec( pImpEE->PaMtoEditCursor( aWordSel.Max() ) );
+
+#ifdef DEBUG
+ DBG_ASSERT( aTopLeftRec.Top() == aBottomRightRec.Top(), "Top() in einer Zeile unterschiedlich?" );
+#endif
+
+ Point aPnt1( pImpEditView->GetWindowPos( aTopLeftRec.TopLeft() ) );
+ Point aPnt2( pImpEditView->GetWindowPos( aBottomRightRec.BottomRight()) );
+ rWordRect = Rectangle( aPnt1, aPnt2 );
+ aWord = pImpEE->GetSelected( aWordSel );
+ }
+
+ return aWord;
+}
+
+void EditView::SetInvalidateMore( sal_uInt16 nPixel )
+{
+ DBG_CHKTHIS( EditView, 0 );
+ pImpEditView->SetInvalidateMore( nPixel );
+}
+
+sal_uInt16 EditView::GetInvalidateMore() const
+{
+ DBG_CHKTHIS( EditView, 0 );
+ return (sal_uInt16)pImpEditView->GetInvalidateMore();
+}
+
+
diff --git a/svx/source/editeng/edtspell.cxx b/svx/source/editeng/edtspell.cxx
new file mode 100644
index 0000000000..9263b9229d
--- /dev/null
+++ b/svx/source/editeng/edtspell.cxx
@@ -0,0 +1,774 @@
+/*************************************************************************
+ *
+ * $RCSfile: edtspell.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <impedit.hxx>
+#include <editview.hxx>
+#include <editeng.hxx>
+#include <edtspell.hxx>
+#include <flditem.hxx>
+#include <fontitem.hxx>
+#include <svtools/intitem.hxx>
+
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.hxx>
+#endif
+#ifndef _LINGU_LNGPROPS_HHX_
+#include <lingu/lngprops.hxx>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+using namespace rtl;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::beans;
+using namespace com::sun::star::linguistic;
+
+
+EditSpellWrapper::EditSpellWrapper( Window* pWin,
+ Reference< XSpellChecker1 > &xChecker,
+ sal_Bool bIsStart, sal_Bool bIsAllRight, EditView* pView ) :
+ SvxSpellWrapper( pWin, xChecker, bIsStart, bIsAllRight )
+{
+ DBG_ASSERT( pView, "Es muss eine View uebergeben werden!" );
+ // IgnoreList behalten, ReplaceList loeschen...
+ if (SvxGetChangeAllList().is())
+ SvxGetChangeAllList()->clear();
+ pEditView = pView;
+}
+
+void __EXPORT EditSpellWrapper::SpellStart( SvxSpellArea eArea )
+{
+ ImpEditEngine* pImpEE = pEditView->GetImpEditEngine();
+ SpellInfo* pSpellInfo = pImpEE->GetSpellInfo();
+ sal_Bool bForward = !IsSpellReverse();
+
+ if ( eArea == SVX_SPELL_BODY_START )
+ {
+ // Wird gerufen, wenn
+ // a) Spell-Forwad ist am Ende angekomment und soll von vorne beginnen
+ // b) Spell-Backward wird gestartet
+ // IsEndDone() liefert auch sal_True, wenn Rueckwaerts-Spelling am Ende gestartet wird!
+ if ( IsEndDone() && bForward )
+ {
+ pSpellInfo->bSpellToEnd = sal_False;
+ pSpellInfo->aSpellTo = pSpellInfo->aSpellStart;
+ pEditView->GetImpEditView()->SetEditSelection(
+ pImpEE->GetEditDoc().GetStartPaM() );
+ }
+ else
+ {
+ pSpellInfo->bSpellToEnd = sal_True;
+ pSpellInfo->aSpellTo = pImpEE->CreateEPaM(
+ pImpEE->GetEditDoc().GetStartPaM() );
+ }
+ }
+ else if ( eArea == SVX_SPELL_BODY_END )
+ {
+ // Wird gerufen, wenn
+ // a) Spell-Forwad wird gestartet
+ // b) Spell-Backward ist am Anfang angekomment und soll von hinten beginnen
+ // IsStartDone() liefert auch sal_True, wenn Vorwaerts-Spelling am Anfang gestartet wird!
+ if ( !IsStartDone() || bForward )
+ {
+ pSpellInfo->bSpellToEnd = sal_True;
+ pSpellInfo->aSpellTo = pImpEE->CreateEPaM(
+ pImpEE->GetEditDoc().GetEndPaM() );
+ }
+ else
+ {
+ pSpellInfo->bSpellToEnd = sal_False;
+ pSpellInfo->aSpellTo = pSpellInfo->aSpellStart;
+ pEditView->GetImpEditView()->SetEditSelection(
+ pImpEE->GetEditDoc().GetEndPaM() );
+ }
+ }
+ else if ( eArea == SVX_SPELL_BODY )
+ {
+ ; // Wird ueber SpellNextDocument von App gehandelt
+
+ // pSpellInfo->bSpellToEnd = sal_True;
+ // pSpellInfo->aSpellTo = pImpEE->CreateEPaM( pImpEE->GetEditDoc().GetEndPaM() );
+ }
+ else
+ {
+ DBG_ERROR( "SpellStart: Unknown Area!" );
+ }
+}
+
+sal_Bool EditSpellWrapper::SpellContinue()
+{
+ SetLast( pEditView->GetImpEditEngine()->ImpSpell( pEditView ) );
+ return GetLast().is();
+}
+
+void __EXPORT EditSpellWrapper::SpellEnd()
+{
+ // Keine weitere Aktion noetig...
+}
+
+sal_Bool __EXPORT EditSpellWrapper::HasOtherCnt()
+{
+ return sal_False;
+}
+
+sal_Bool __EXPORT EditSpellWrapper::SpellMore()
+{
+ ImpEditEngine* pImpEE = pEditView->GetImpEditEngine();
+ SpellInfo* pSpellInfo = pImpEE->GetSpellInfo();
+ sal_Bool bMore = sal_False;
+ if ( pSpellInfo->bMultipleDoc )
+ {
+ bMore = pImpEE->GetEditEnginePtr()->SpellNextDocument();
+ if ( bMore )
+ {
+ // Der Text wurde in diese Engine getreten, bei Rueckwaerts
+ // muss die Selektion hinten sein.
+ Reference< XPropertySet > xProp( SvxGetLinguPropertySet() );
+ sal_Bool bIsWrapReverse = IsSpellReverse();
+ if ( bIsWrapReverse )
+ pEditView->GetImpEditView()->SetEditSelection(
+ pImpEE->GetEditDoc().GetEndPaM() );
+ else
+ pEditView->GetImpEditView()->SetEditSelection(
+ pImpEE->GetEditDoc().GetStartPaM() );
+ }
+ }
+ return bMore;
+}
+
+void __EXPORT EditSpellWrapper::ScrollArea()
+{
+ // Keine weitere Aktion noetig...
+ // Es sei denn, der Bereich soll in die Mitte gescrollt werden,
+ // und nicht irgendwo stehen.
+}
+
+void __EXPORT EditSpellWrapper::ReplaceAll( const String &rNewText,
+ sal_Int16 nLanguage )
+{
+ // Wird gerufen, wenn Wort in ReplaceList des SpellCheckers
+ pEditView->InsertText( rNewText );
+ CheckSpellTo();
+}
+
+void __EXPORT EditSpellWrapper::ChangeWord( const String& rNewWord,
+ const sal_uInt16 nLang )
+{
+ // Wird gerufen, wenn Wort Button Change
+ // bzw. intern von mir bei ChangeAll
+
+ // Wenn Punkt hinterm Wort, wird dieser nicht mitgegeben.
+ // Falls '"' => PreStripped.
+ String aNewWord( rNewWord );
+ pEditView->InsertText( aNewWord );
+ CheckSpellTo();
+}
+
+void __EXPORT EditSpellWrapper::ChangeThesWord( const String& rNewWord )
+{
+ pEditView->InsertText( rNewWord );
+ CheckSpellTo();
+}
+
+void __EXPORT EditSpellWrapper::AutoCorrect( const String& rOldWord,
+ const String& rNewWord )
+{
+}
+
+void EditSpellWrapper::CheckSpellTo()
+{
+ ImpEditEngine* pImpEE = pEditView->GetImpEditEngine();
+ SpellInfo* pSpellInfo = pImpEE->GetSpellInfo();
+ EditPaM aPaM( pEditView->GetImpEditView()->GetEditSelection().Max() );
+ EPaM aEPaM = pImpEE->CreateEPaM( aPaM );
+ if ( aEPaM.nPara == pSpellInfo->aSpellTo.nPara )
+ {
+ // prueffen, ob SpellToEnd noch gueltiger Index, falls in dem Absatz
+ // ersetzt wurde.
+ if ( pSpellInfo->aSpellTo.nIndex > aPaM.GetNode()->Len() )
+ pSpellInfo->aSpellTo.nIndex = aPaM.GetNode()->Len();
+ }
+}
+
+BOOL EditSpellWrapper::IsSpellReverse()
+{
+ Reference< XPropertySet > xProp( SvxGetLinguPropertySet() );
+ sal_Bool bIsWrapReverse = sal_False;
+ if ( xProp.is() )
+ {
+ Any aVal = xProp->getPropertyValue( OUString(
+ RTL_CONSTASCII_USTRINGPARAM( UPN_IS_WRAP_REVERSE ) ) );
+ aVal >>= bIsWrapReverse;
+ }
+ return bIsWrapReverse;
+}
+
+SV_IMPL_VARARR( WrongRanges, WrongRange );
+
+WrongList::WrongList()
+{
+ nInvalidStart = 0;
+ nInvalidEnd = 0xFFFF;
+}
+
+WrongList::~WrongList()
+{
+}
+
+void WrongList::TextInserted( sal_uInt16 nPos, sal_uInt16 nNew, sal_Bool bPosIsSep )
+{
+ if ( !IsInvalid() )
+ {
+ nInvalidStart = nPos;
+ nInvalidEnd = nPos+nNew;
+ }
+ else
+ {
+ if ( nInvalidStart > nPos )
+ nInvalidStart = nPos;
+ if ( nInvalidEnd >= nPos )
+ nInvalidEnd += nNew;
+ else
+ nInvalidEnd = nPos+nNew;
+ }
+
+ for ( sal_uInt16 n = 0; n < Count(); n++ )
+ {
+ WrongRange& rWrong = GetObject( n );
+ sal_Bool bRefIsValid = sal_True;
+ if ( rWrong.nEnd >= nPos )
+ {
+ // Alle Wrongs hinter der Einfuegeposition verschieben...
+ if ( rWrong.nStart > nPos )
+ {
+ rWrong.nStart += nNew;
+ rWrong.nEnd += nNew;
+ }
+ // 1: Startet davor, geht bis nPos...
+ else if ( rWrong.nEnd == nPos )
+ {
+ // Sollte bei einem Blank unterbunden werden!
+ if ( !bPosIsSep )
+ rWrong.nEnd += nNew;
+ }
+ // 2: Startet davor, geht hinter Pos...
+ else if ( ( rWrong.nStart < nPos ) && ( rWrong.nEnd > nPos ) )
+ {
+ rWrong.nEnd += nNew;
+ // Bei einem Trenner das Wrong entfernen und neu pruefen
+ if ( bPosIsSep )
+ {
+ // Wrong aufteilen...
+ WrongRange aNewWrong( rWrong.nStart, nPos );
+ rWrong.nStart = nPos+1;
+ Insert( aNewWrong, n );
+ bRefIsValid = sal_False; // Referenz nach Insert nicht mehr gueltig, der andere wurde davor an dessen Position eingefuegt
+ n++; // Diesen nicht nochmal...
+ }
+ }
+ // 3: Attribut startet auf Pos...
+ else if ( rWrong.nStart == nPos )
+ {
+ rWrong.nEnd += nNew;
+ if ( bPosIsSep )
+ rWrong.nStart++;
+ }
+ }
+ DBG_ASSERT( !bRefIsValid || ( rWrong.nStart < rWrong.nEnd ),
+ "TextInserted, WrongRange: Start >= End?!" );
+ }
+
+ DBG_ASSERT( !DbgIsBuggy(), "InsertWrong: WrongList kaputt!" );
+}
+
+void WrongList::TextDeleted( sal_uInt16 nPos, sal_uInt16 nDeleted )
+{
+ sal_uInt16 nEndChanges = nPos+nDeleted;
+ if ( !IsInvalid() )
+ {
+ nInvalidStart = nPos;
+ nInvalidEnd = nPos+1; // Nicht nDeleted, weil da ja wegfaellt.
+ }
+ else
+ {
+ if ( nInvalidStart > nPos )
+ nInvalidStart = nPos;
+ if ( nInvalidEnd > nPos )
+ {
+ if ( nInvalidEnd > nEndChanges )
+ nInvalidEnd -=nDeleted;
+ else
+ nInvalidEnd = nPos+1;
+ }
+ }
+
+ for ( sal_uInt16 n = 0; n < Count(); n++ )
+ {
+ WrongRange& rWrong = GetObject( n );
+ sal_Bool bDelWrong = sal_False;
+ if ( rWrong.nEnd >= nPos )
+ {
+ // Alles Wrongs hinter der Einfuegeposition verschieben...
+ if ( rWrong.nStart >= nEndChanges )
+ {
+ rWrong.nStart -= nDeleted;
+ rWrong.nEnd -= nDeleted;
+ }
+ // 1. Innenliegende Wrongs loeschen...
+ else if ( ( rWrong.nStart >= nPos ) && ( rWrong.nEnd <= nEndChanges ) )
+ {
+ bDelWrong = sal_True;
+ }
+ // 2. Wrong beginnt davor, endet drinnen oder dahinter...
+ else if ( ( rWrong.nStart <= nPos ) && ( rWrong.nEnd > nPos ) )
+ {
+ if ( rWrong.nEnd <= nEndChanges ) // endet drinnen
+ rWrong.nEnd = nPos;
+ else
+ rWrong.nEnd -= nDeleted; // endet dahinter
+ }
+ // 3. Wrong beginnt drinnen, endet dahinter...
+ else if ( ( rWrong.nStart >= nPos ) && ( rWrong.nEnd > nEndChanges ) )
+ {
+ rWrong.nStart = nEndChanges;
+ rWrong.nStart -= nDeleted;
+ rWrong.nEnd -= nDeleted;
+ }
+ }
+ DBG_ASSERT( rWrong.nStart < rWrong.nEnd,
+ "TextInserted, WrongRange: Start >= End?!" );
+ if ( bDelWrong )
+ {
+ Remove( n, 1 );
+ n--;
+ }
+ }
+
+ DBG_ASSERT( !DbgIsBuggy(), "InsertWrong: WrongList kaputt!" );
+}
+
+sal_Bool WrongList::NextWrong( sal_uInt16& rnStart, sal_uInt16& rnEnd ) const
+{
+ /*
+ rnStart enthaelt die Startposition, wird ggf. auf Wrong-Start korrigiert
+ rnEnd braucht nicht inizialisiert sein.
+ */
+ for ( sal_uInt16 n = 0; n < Count(); n++ )
+ {
+ WrongRange& rWrong = GetObject( n );
+ if ( rWrong.nEnd > rnStart )
+ {
+ rnStart = rWrong.nStart;
+ rnEnd = rWrong.nEnd;
+ return sal_True;
+ }
+ }
+ return sal_False;
+}
+
+sal_Bool WrongList::HasWrong( sal_uInt16 nStart, sal_uInt16 nEnd ) const
+{
+ for ( sal_uInt16 n = 0; n < Count(); n++ )
+ {
+ WrongRange& rWrong = GetObject( n );
+ if ( ( rWrong.nStart == nStart ) && ( rWrong.nEnd == nEnd ) )
+ return sal_True;
+ else if ( rWrong.nStart >= nStart )
+ break;
+ }
+ return sal_False;
+}
+
+sal_Bool WrongList::HasAnyWrong( sal_uInt16 nStart, sal_uInt16 nEnd ) const
+{
+ for ( sal_uInt16 n = 0; n < Count(); n++ )
+ {
+ WrongRange& rWrong = GetObject( n );
+ if ( ( rWrong.nEnd >= nStart ) && ( rWrong.nStart < nEnd ) )
+ return sal_True;
+ else if ( rWrong.nStart >= nEnd )
+ break;
+ }
+ return sal_False;
+}
+
+void WrongList::ClearWrongs( sal_uInt16 nStart, sal_uInt16 nEnd,
+ const ContentNode* pNode )
+{
+ for ( sal_uInt16 n = 0; n < Count(); n++ )
+ {
+ WrongRange& rWrong = GetObject( n );
+ if ( ( rWrong.nEnd > nStart ) && ( rWrong.nStart < nEnd ) )
+ {
+ if ( rWrong.nEnd > nEnd ) // // Laeuft raus
+ {
+ rWrong.nStart = nEnd;
+ // Blanks?
+ while ( ( rWrong.nStart < pNode->Len() ) &&
+ ( ( pNode->GetChar( rWrong.nStart ) == ' ' ) ||
+ ( pNode->IsFeature( rWrong.nStart ) ) ) )
+ {
+ rWrong.nStart++;
+ }
+ }
+ else
+ {
+ Remove( n, 1 );
+ n--;
+ }
+ }
+ }
+
+ DBG_ASSERT( !DbgIsBuggy(), "InsertWrong: WrongList kaputt!" );
+}
+
+void WrongList::InsertWrong( sal_uInt16 nStart, sal_uInt16 nEnd,
+ sal_Bool bClearRange )
+{
+ sal_uInt16 nPos = Count();
+ for ( sal_uInt16 n = 0; n < Count(); n++ )
+ {
+ WrongRange& rWrong = GetObject( n );
+ if ( rWrong.nStart >= nStart )
+ {
+ nPos = n;
+ if ( bClearRange )
+ {
+ // Es kann eigentlich nur Passieren, dass der Wrong genau
+ // hier beginnt und weiter rauslauft, aber nicht, dass hier
+ // mehrere im Bereich liegen...
+ // Genau im Bereich darf keiner liegen, sonst darf diese Methode
+ // garnicht erst gerufen werden!
+ DBG_ASSERT( ( ( rWrong.nStart == nStart ) && ( rWrong.nEnd > nEnd ) )
+ || ( rWrong.nStart > nEnd ), "InsertWrong: RangeMismatch!" );
+ if ( ( rWrong.nStart == nStart ) && ( rWrong.nEnd > nEnd ) )
+ rWrong.nStart = nEnd+1;
+ }
+ break;
+ }
+ }
+ Insert( WrongRange( nStart, nEnd ), nPos );
+
+ DBG_ASSERT( !DbgIsBuggy(), "InsertWrong: WrongList kaputt!" );
+}
+
+void WrongList::MarkWrongsInvalid()
+{
+ if ( Count() )
+ MarkInvalid( GetObject( 0 ).nStart, GetObject( Count()-1 ).nEnd );
+}
+
+WrongList* WrongList::Clone() const
+{
+ WrongList* pNew = new WrongList;
+ for ( sal_uInt16 n = 0; n < Count(); n++ )
+ {
+ WrongRange& rWrong = GetObject( n );
+ pNew->Insert( rWrong, pNew->Count() );
+ }
+
+ return pNew;
+}
+
+
+#ifdef DBG_UTIL
+sal_Bool WrongList::DbgIsBuggy() const
+{
+ // Pruefen, ob sich Bereiche ueberlappen
+ sal_Bool bError = sal_False;
+ for ( sal_uInt16 nA = 0; !bError && ( nA < Count() ); nA++ )
+ {
+ WrongRange& rWrong = GetObject( nA );
+ for ( sal_uInt16 nB = nA+1; !bError && ( nB < Count() ); nB++ )
+ {
+ WrongRange& rNextWrong = GetObject( nB );
+ // 1) Start davor, End hinterm anderen Start
+ if ( ( rWrong.nStart <= rNextWrong.nStart )
+ && ( rWrong.nEnd >= rNextWrong.nStart ) )
+ bError = sal_True;
+ // 2) Start hinter anderen Start, aber noch vorm anderen End
+ else if ( ( rWrong.nStart >= rNextWrong.nStart)
+ && ( rWrong.nStart <= rNextWrong.nEnd ) )
+ bError = sal_True;
+ }
+ }
+ return bError;
+}
+#endif
+
+
+EdtAutoCorrDoc::EdtAutoCorrDoc( ImpEditEngine* pE, ContentNode* pN,
+ sal_uInt16 nCrsr, xub_Unicode cIns )
+{
+ pImpEE = pE;
+ pCurNode = pN;
+ nCursor = nCrsr;
+
+ bUndoAction = sal_False;
+ bAllowUndoAction = cIns ? sal_True : sal_False;
+}
+
+EdtAutoCorrDoc::~EdtAutoCorrDoc()
+{
+ if ( bUndoAction )
+ pImpEE->UndoActionEnd( EDITUNDO_INSERT );
+}
+
+sal_Bool EdtAutoCorrDoc::Delete( sal_uInt16 nStt, sal_uInt16 nEnd )
+{
+ EditSelection aSel( EditPaM( pCurNode, nStt ), EditPaM( pCurNode, nEnd ) );
+ pImpEE->ImpDeleteSelection( aSel );
+ DBG_ASSERT( nCursor >= nEnd, "Cursor mitten im Geschehen ?!" );
+ nCursor -= ( nEnd-nStt );
+ bAllowUndoAction = sal_False;
+ return sal_True;
+}
+
+sal_Bool EdtAutoCorrDoc::Insert( sal_uInt16 nPos, const String& rTxt )
+{
+ EditSelection aSel = EditPaM( pCurNode, nPos );
+ pImpEE->ImpInsertText( aSel, rTxt );
+ DBG_ASSERT( nCursor >= nPos, "Cursor mitten im Geschehen ?!" );
+ nCursor += rTxt.Len();
+
+ if ( bAllowUndoAction && ( rTxt.Len() == 1 ) )
+ ImplStartUndoAction();
+ bAllowUndoAction = sal_False;
+
+ return sal_True;
+}
+
+sal_Bool EdtAutoCorrDoc::Replace( sal_uInt16 nPos, const String& rTxt )
+{
+ // Eigentlich ein Replace einfuehren => Entspr. UNDO
+ sal_uInt16 nEnd = nPos+rTxt.Len();
+ if ( nEnd > pCurNode->Len() )
+ nEnd = pCurNode->Len();
+ EditSelection aSel( EditPaM( pCurNode, nPos ), EditPaM( pCurNode, nEnd ) );
+ aSel = pImpEE->ImpDeleteSelection( aSel );
+ aSel = pImpEE->ImpInsertText( aSel, rTxt );
+ if ( nPos == nCursor )
+ nCursor += rTxt.Len();
+
+ if ( bAllowUndoAction && ( rTxt.Len() == 1 ) )
+ ImplStartUndoAction();
+ bAllowUndoAction = sal_False;
+
+ return sal_True;
+}
+
+sal_Bool EdtAutoCorrDoc::SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd,
+ sal_uInt16 nSlotId, SfxPoolItem& rItem )
+{
+ SfxItemPool* pPool = &pImpEE->GetEditDoc().GetItemPool();
+ while ( pPool->GetSecondaryPool() &&
+ pPool->GetName().EqualsAscii( "EditEngineItemPool" ) )
+ {
+ pPool = pPool->GetSecondaryPool();
+
+ }
+ sal_uInt16 nWhich = pPool->GetWhich( nSlotId );
+ if ( nWhich )
+ {
+ rItem.SetWhich( nWhich );
+
+ SfxItemSet aSet( pImpEE->GetEmptyItemSet() );
+ aSet.Put( rItem );
+
+ EditSelection aSel( EditPaM( pCurNode, nStt ), EditPaM( pCurNode, nEnd ) );
+ aSel.Max().SetIndex( nEnd ); // ???
+ pImpEE->SetAttribs( aSel, aSet, ATTRSPECIAL_EDGE );
+ bAllowUndoAction = sal_False;
+ }
+ return sal_True;
+}
+
+sal_Bool EdtAutoCorrDoc::SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd,
+ const String& rURL )
+{
+ // Aus dem Text ein Feldbefehl machen...
+ EditSelection aSel( EditPaM( pCurNode, nStt ), EditPaM( pCurNode, nEnd ) );
+ String aText = pImpEE->GetSelected( aSel );
+ aSel = pImpEE->ImpDeleteSelection( aSel );
+ DBG_ASSERT( nCursor >= nEnd, "Cursor mitten im Geschehen ?!" );
+ nCursor -= ( nEnd-nStt );
+ SvxFieldItem aField( SvxURLField( rURL, aText, SVXURLFORMAT_REPR ),
+ EE_FEATURE_FIELD );
+ pImpEE->InsertField( aSel, aField );
+ nCursor++;
+ pImpEE->UpdateFields();
+ bAllowUndoAction = sal_False;
+ return sal_True;
+}
+
+sal_Bool EdtAutoCorrDoc::HasSymbolChars( sal_uInt16 nStt, sal_uInt16 nEnd )
+{
+ CharAttribArray& rAttribs = pCurNode->GetCharAttribs().GetAttribs();
+ sal_uInt16 nAttrs = rAttribs.Count();
+ for ( sal_uInt16 n = 0; n < nAttrs; n++ )
+ {
+ EditCharAttrib* pAttr = rAttribs.GetObject( n );
+ if ( pAttr->GetStart() >= nEnd )
+ return sal_False;
+
+ if ( ( pAttr->Which() == EE_CHAR_FONTINFO ) &&
+ ( ((SvxFontItem*)pAttr->GetItem())->
+ GetCharSet() == RTL_TEXTENCODING_SYMBOL ) )
+ {
+ // Pruefen, ob das Attribt im Bereich liegt...
+ if ( pAttr->GetEnd() >= nStt )
+ return sal_True;
+ }
+ }
+ return sal_False;
+}
+
+const String* EdtAutoCorrDoc::GetPrevPara( sal_Bool bAtNormalPos )
+{
+ // Vorherigen Absatz zurueck geben, damit ermittel werden kann,
+ // ob es sich beim aktuellen Wort um einen Satzanfang handelt.
+
+ bAllowUndoAction = sal_False; // Jetzt nicht mehr...
+
+ ContentList& rNodes = pImpEE->GetEditDoc();
+ sal_uInt16 nPos = rNodes.GetPos( pCurNode );
+
+ // Sonderbehandlung: Bullet => Absatzanfang => einfach NULL returnen...
+ const SfxUInt16Item& rBulletState = (const SfxUInt16Item&)
+ pImpEE->GetParaAttrib( nPos, EE_PARA_BULLETSTATE );
+ sal_Bool bBullet = rBulletState.GetValue() ? sal_True : sal_False;
+ if ( !bBullet && ( pImpEE->aStatus.GetControlWord() & EE_CNTRL_OUTLINER ) )
+ {
+ // Der Outliner hat im Gliederungsmodus auf Ebene 0 immer ein Bullet.
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&)
+ pImpEE->GetParaAttrib( nPos, EE_PARA_OUTLLEVEL );
+ if ( rLevel.GetValue() == 0 )
+ bBullet = sal_True;
+ }
+ if ( bBullet )
+ return NULL;
+
+ for ( sal_uInt16 n = nPos; n; )
+ {
+ n--;
+ ContentNode* pNode = rNodes[n];
+ if ( pNode->Len() )
+ return pNode;
+ }
+ return NULL;
+
+}
+
+sal_Bool EdtAutoCorrDoc::ChgAutoCorrWord( sal_uInt16& rSttPos,
+ sal_uInt16 nEndPos, SvxAutoCorrect& rACorrect,
+ const String** ppPara )
+{
+ // Absatz-Anfang oder ein Blank gefunden, suche nach dem Wort
+ // Kuerzel im Auto
+
+ bAllowUndoAction = sal_False; // Jetzt nicht mehr...
+
+ String aShort( pCurNode->Copy( rSttPos, nEndPos - rSttPos ) );
+ sal_Bool bRet = sal_False;
+
+ if( !aShort.Len() )
+ return bRet;
+
+ LanguageType eLang = pImpEE->GetLanguage();
+ const SvxAutocorrWord* pFnd = rACorrect.SearchWordsInList( *pCurNode,
+ rSttPos, nEndPos, *this, eLang );
+ if( pFnd && pFnd->IsTextOnly() )
+ {
+ // dann mal ersetzen
+ EditSelection aSel( EditPaM( pCurNode, rSttPos ),
+ EditPaM( pCurNode, nEndPos ) );
+ aSel = pImpEE->ImpDeleteSelection( aSel );
+ DBG_ASSERT( nCursor >= nEndPos, "Cursor mitten im Geschehen ?!" );
+ nCursor -= ( nEndPos-rSttPos );
+ pImpEE->ImpInsertText( aSel, pFnd->GetLong() );
+ nCursor += pFnd->GetLong().Len();
+ if( ppPara )
+ *ppPara = pCurNode;
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+LanguageType EdtAutoCorrDoc::GetLanguage( sal_uInt16 nPos, sal_Bool bPrevPara ) const
+{
+ return pImpEE->GetLanguage();
+}
+
+void EdtAutoCorrDoc::ImplStartUndoAction()
+{
+ sal_uInt16 nPara = pImpEE->GetEditDoc().GetPos( pCurNode );
+ ESelection aSel( nPara, nCursor, nPara, nCursor );
+ pImpEE->UndoActionStart( EDITUNDO_INSERT, aSel );
+ bUndoAction = sal_True;
+ bAllowUndoAction = sal_False;
+}
+
diff --git a/svx/source/editeng/eehtml.cxx b/svx/source/editeng/eehtml.cxx
new file mode 100644
index 0000000000..855dded161
--- /dev/null
+++ b/svx/source/editeng/eehtml.cxx
@@ -0,0 +1,846 @@
+/*************************************************************************
+ *
+ * $RCSfile: eehtml.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <eehtml.hxx>
+#include <impedit.hxx>
+#include <eeitemid.hxx>
+#include <adjitem.hxx>
+#include <flditem.hxx>
+#include <tools/urlobj.hxx>
+#include "fhgtitem.hxx"
+#include "fontitem.hxx"
+#include "ulspitem.hxx"
+#include "wghtitem.hxx"
+#include <svtools/htmltokn.h>
+#include <svtools/htmlkywd.hxx>
+
+#include <vcl/system.hxx>
+
+#define ACTION_INSERTTEXT 1
+#define ACTION_INSERTPARABRK 2
+
+#define STYLE_PRE 101
+
+EditHTMLParser::EditHTMLParser( SvStream& rIn, SvKeyValueIterator* pHTTPHeaderAttrs, int bReadNewDoc )
+ : SfxHTMLParser( rIn, bReadNewDoc )
+{
+ pImpEditEngine = 0;
+ pCurAnchor = 0;
+ bInPara = FALSE;
+ bWasInPara = FALSE;
+ nInTable = 0;
+ nInCell = 0;
+ nDefListLevel = 0;
+ nBulletLevel = 0;
+ nNumberingLevel = 0;
+ pNumbers = 0;
+ bFieldsInserted = FALSE;
+ DBG_ASSERT( pHTTPHeaderAttrs, "EditHTMLParser: no HTTPHeaderAttrs" );
+ if ( pHTTPHeaderAttrs )
+ SetEncodingByHTTPHeader( pHTTPHeaderAttrs );
+}
+
+EditHTMLParser::~EditHTMLParser()
+{
+ delete pCurAnchor;
+}
+
+SvParserState EditHTMLParser::CallParser( ImpEditEngine* pImpEE, const EditPaM& rPaM )
+{
+ DBG_ASSERT( pImpEE, "CallParser: ImpEditEngine ?!" );
+ pImpEditEngine = pImpEE;
+ SvParserState eState = SVPAR_NOTSTARTED;
+ if ( pImpEditEngine )
+ {
+ // Umbrechmimik vom RTF-Import einbauen?
+ aCurSel = EditSelection( rPaM, rPaM );
+
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( HTMLIMP_START, this, pImpEditEngine->CreateESel( aCurSel ) );
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+
+ ImpSetStyleSheet( 0 );
+ eState = HTMLParser::CallParser();
+
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( HTMLIMP_END, this, pImpEditEngine->CreateESel( aCurSel ) );
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+
+ if ( bFieldsInserted )
+ pImpEditEngine->UpdateFields();
+ }
+ return eState;
+}
+
+void EditHTMLParser::NextToken( int nToken )
+{
+ #ifdef DBG_UTIL
+ HTML_TOKEN_IDS xID = (HTML_TOKEN_IDS)nToken;
+ #endif
+
+
+ switch( nToken )
+ {
+
+ case HTML_PLAINTEXT_ON:
+ case HTML_PLAINTEXT2_ON:
+ bInPara = TRUE;
+ break;
+ case HTML_PLAINTEXT_OFF:
+ case HTML_PLAINTEXT2_OFF:
+ bInPara = FALSE;
+ break;
+
+ case HTML_LINEBREAK:
+ case HTML_NEWPARA:
+ {
+ if ( ( bInPara || nInTable ) &&
+ ( ( nToken == HTML_LINEBREAK ) || HasTextInCurrentPara() ) )
+ {
+ ImpInsertParaBreak();
+ }
+ }
+ break;
+ case HTML_HORZRULE:
+ {
+ if ( HasTextInCurrentPara() )
+ ImpInsertParaBreak();
+ ImpInsertParaBreak();
+ }
+ case HTML_NONBREAKSPACE:
+ {
+ if ( bInPara )
+ {
+ ImpInsertText( String( RTL_CONSTASCII_USTRINGPARAM( " " ) ) );
+ }
+ }
+ break;
+ case HTML_TEXTTOKEN:
+ {
+ if ( bInPara || pCurAnchor )
+ {
+ String aText = aToken;
+ if ( aText.Len() && ( aText.GetChar( 0 ) == ' ' )
+ && ThrowAwayBlank() && !IsReadPRE() )
+ aText.Erase( 0, 1 );
+
+ if ( pCurAnchor )
+ {
+ pCurAnchor->aText += aText;
+ }
+ else
+ {
+ // Nur bis HTML mit 319 geschrieben ?!
+ if ( IsReadPRE() )
+ {
+ USHORT nTabPos = aText.Search( '\t', 0 );
+ while ( nTabPos != STRING_NOTFOUND )
+ {
+ aText.Erase( nTabPos, 1 );
+ aText.Insert( String( RTL_CONSTASCII_USTRINGPARAM( " " ) ), nTabPos );
+ nTabPos = aText.Search( '\t', nTabPos+8 );
+ }
+ }
+ ImpInsertText( aText );
+ }
+ }
+ }
+ break;
+
+ case HTML_CENTER_ON:
+ case HTML_CENTER_OFF: // if ( bInPara )
+ {
+ USHORT nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() );
+ SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() );
+ aItems.ClearItem( EE_PARA_JUST );
+ if ( nToken == HTML_CENTER_ON )
+ aItems.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ pImpEditEngine->SetParaAttribs( nNode, aItems );
+ }
+ break;
+
+ case HTML_ANCHOR_ON: AnchorStart();
+ break;
+ case HTML_ANCHOR_OFF: AnchorEnd();
+ break;
+
+ case HTML_PARABREAK_ON:
+ if( bInPara && HasTextInCurrentPara() )
+ EndPara( TRUE );
+ StartPara( TRUE );
+ break;
+
+ case HTML_PARABREAK_OFF:
+ if( bInPara )
+ EndPara( TRUE );
+ break;
+
+ case HTML_HEAD1_ON:
+ case HTML_HEAD2_ON:
+ case HTML_HEAD3_ON:
+ case HTML_HEAD4_ON:
+ case HTML_HEAD5_ON:
+ case HTML_HEAD6_ON:
+ {
+ HeadingStart( nToken );
+ }
+ break;
+
+ case HTML_HEAD1_OFF:
+ case HTML_HEAD2_OFF:
+ case HTML_HEAD3_OFF:
+ case HTML_HEAD4_OFF:
+ case HTML_HEAD5_OFF:
+ case HTML_HEAD6_OFF:
+ {
+ HeadingEnd( nToken );
+ }
+ break;
+
+ case HTML_PREFORMTXT_ON:
+ case HTML_XMP_ON:
+ case HTML_LISTING_ON:
+ {
+ StartPara( TRUE );
+ ImpSetStyleSheet( STYLE_PRE );
+ }
+ break;
+
+ case HTML_DEFLIST_ON:
+ {
+ nDefListLevel++;
+ }
+ break;
+
+ case HTML_DEFLIST_OFF:
+ {
+ if( nDefListLevel )
+ nDefListLevel--;
+ }
+ break;
+
+ case HTML_TABLE_ON: nInTable++;
+ break;
+ case HTML_TABLE_OFF: DBG_ASSERT( nInTable, "Nicht in Table, aber TABLE_OFF?" );
+ nInTable--;
+ break;
+
+ case HTML_TABLEHEADER_ON:
+ case HTML_TABLEDATA_ON:
+ nInCell++;
+ // fallthru
+ case HTML_BLOCKQUOTE_ON:
+ case HTML_BLOCKQUOTE_OFF:
+ case HTML_BLOCKQUOTE30_ON:
+ case HTML_BLOCKQUOTE30_OFF:
+ case HTML_LISTHEADER_ON:
+ case HTML_LI_ON:
+ case HTML_DD_ON:
+ case HTML_DT_ON:
+ case HTML_ORDERLIST_ON:
+ case HTML_UNORDERLIST_ON:
+ {
+ BOOL bHasText = HasTextInCurrentPara();
+ if ( bHasText )
+ ImpInsertParaBreak();
+ StartPara( FALSE );
+ }
+ break;
+
+ case HTML_TABLEHEADER_OFF:
+ case HTML_TABLEDATA_OFF:
+ {
+ if ( nInCell )
+ nInCell--;
+ }
+ // fallthru
+ case HTML_LISTHEADER_OFF:
+ case HTML_LI_OFF:
+ case HTML_DD_OFF:
+ case HTML_DT_OFF:
+ case HTML_ORDERLIST_OFF:
+ case HTML_UNORDERLIST_OFF: EndPara( FALSE );
+ break;
+
+ case HTML_TABLEROW_ON:
+ case HTML_TABLEROW_OFF: // Nur nach einem CELL ein RETURN, fuer Calc
+
+ case HTML_COL_ON:
+ case HTML_COLGROUP_ON:
+ case HTML_COLGROUP_OFF: break;
+
+ case HTML_FONT_ON: // ...
+ break;
+ case HTML_FONT_OFF: // ...
+ break;
+
+
+ // #58335# kein SkipGroup on/off auf inline markup etc.
+
+ // globals
+ case HTML_HTML_ON:
+ case HTML_HTML_OFF:
+ case HTML_BODY_ON:
+ case HTML_BODY_OFF:
+ case HTML_HEAD_ON:
+ case HTML_HEAD_OFF:
+ case HTML_TITLE_ON:
+ case HTML_TITLE_OFF:
+ case HTML_THEAD_ON:
+ case HTML_THEAD_OFF:
+ case HTML_TBODY_ON:
+ case HTML_TBODY_OFF:
+ // inline elements, structural markup
+ // HTML 3.0
+ case HTML_BANNER_ON:
+ case HTML_BANNER_OFF:
+ case HTML_DIVISION_ON:
+ case HTML_DIVISION_OFF:
+// case HTML_LISTHEADER_ON: //! special handling
+// case HTML_LISTHEADER_OFF:
+ case HTML_NOTE_ON:
+ case HTML_NOTE_OFF:
+ // inline elements, logical markup
+ // HTML 2.0
+ case HTML_ADDRESS_ON:
+ case HTML_ADDRESS_OFF:
+// case HTML_BLOCKQUOTE_ON: //! extra Behandlung
+// case HTML_BLOCKQUOTE_OFF:
+ case HTML_CITIATION_ON:
+ case HTML_CITIATION_OFF:
+ case HTML_CODE_ON:
+ case HTML_CODE_OFF:
+ case HTML_DEFINSTANCE_ON:
+ case HTML_DEFINSTANCE_OFF:
+ case HTML_EMPHASIS_ON:
+ case HTML_EMPHASIS_OFF:
+ case HTML_KEYBOARD_ON:
+ case HTML_KEYBOARD_OFF:
+ case HTML_SAMPLE_ON:
+ case HTML_SAMPLE_OFF:
+ case HTML_STRIKE_ON:
+ case HTML_STRIKE_OFF:
+ case HTML_STRONG_ON:
+ case HTML_STRONG_OFF:
+ case HTML_VARIABLE_ON:
+ case HTML_VARIABLE_OFF:
+ // HTML 3.0
+ case HTML_ABBREVIATION_ON:
+ case HTML_ABBREVIATION_OFF:
+ case HTML_ACRONYM_ON:
+ case HTML_ACRONYM_OFF:
+ case HTML_AUTHOR_ON:
+ case HTML_AUTHOR_OFF:
+// case HTML_BLOCKQUOTE30_ON: //! extra Behandlung
+// case HTML_BLOCKQUOTE30_OFF:
+ case HTML_DELETEDTEXT_ON:
+ case HTML_DELETEDTEXT_OFF:
+ case HTML_INSERTEDTEXT_ON:
+ case HTML_INSERTEDTEXT_OFF:
+ case HTML_LANGUAGE_ON:
+ case HTML_LANGUAGE_OFF:
+ case HTML_PERSON_ON:
+ case HTML_PERSON_OFF:
+ case HTML_SHORTQUOTE_ON:
+ case HTML_SHORTQUOTE_OFF:
+ case HTML_SUBSCRIPT_ON:
+ case HTML_SUBSCRIPT_OFF:
+ case HTML_SUPERSCRIPT_ON:
+ case HTML_SUPERSCRIPT_OFF:
+ // inline elements, visual markup
+ // HTML 2.0
+ case HTML_BOLD_ON:
+ case HTML_BOLD_OFF:
+ case HTML_ITALIC_ON:
+ case HTML_ITALIC_OFF:
+ case HTML_TELETYPE_ON:
+ case HTML_TELETYPE_OFF:
+ case HTML_UNDERLINE_ON:
+ case HTML_UNDERLINE_OFF:
+ // HTML 3.0
+ case HTML_BIGPRINT_ON:
+ case HTML_BIGPRINT_OFF:
+ case HTML_STRIKETHROUGH_ON:
+ case HTML_STRIKETHROUGH_OFF:
+ case HTML_SMALLPRINT_ON:
+ case HTML_SMALLPRINT_OFF:
+ // figures
+ case HTML_FIGURE_ON:
+ case HTML_FIGURE_OFF:
+ case HTML_CAPTION_ON:
+ case HTML_CAPTION_OFF:
+ case HTML_CREDIT_ON:
+ case HTML_CREDIT_OFF:
+ // misc
+ case HTML_DIRLIST_ON:
+ case HTML_DIRLIST_OFF:
+ case HTML_FOOTNOTE_ON: //! landen so im Text
+ case HTML_FOOTNOTE_OFF:
+ case HTML_MENULIST_ON:
+ case HTML_MENULIST_OFF:
+// case HTML_PLAINTEXT_ON: //! extra Behandlung
+// case HTML_PLAINTEXT_OFF:
+// case HTML_PREFORMTXT_ON: //! extra Behandlung
+// case HTML_PREFORMTXT_OFF:
+ case HTML_SPAN_ON:
+ case HTML_SPAN_OFF:
+ // obsolete
+// case HTML_XMP_ON: //! extra Behandlung
+// case HTML_XMP_OFF:
+// case HTML_LISTING_ON: //! extra Behandlung
+// case HTML_LISTING_OFF:
+ // Netscape
+ case HTML_BLINK_ON:
+ case HTML_BLINK_OFF:
+ case HTML_NOBR_ON:
+ case HTML_NOBR_OFF:
+ case HTML_NOEMBED_ON:
+ case HTML_NOEMBED_OFF:
+ case HTML_NOFRAMES_ON:
+ case HTML_NOFRAMES_OFF:
+ // Internet Explorer
+ case HTML_MARQUEE_ON:
+ case HTML_MARQUEE_OFF:
+// case HTML_PLAINTEXT2_ON: //! extra Behandlung
+// case HTML_PLAINTEXT2_OFF:
+ break;
+
+ default:
+ {
+ if ( nToken & HTML_TOKEN_ONOFF )
+ {
+ if ( ( nToken == HTML_UNKNOWNCONTROL_ON ) || ( nToken == HTML_UNKNOWNCONTROL_OFF ) )
+ {
+ ;
+ }
+ else if ( !(nToken & 1) )
+ {
+ DBG_ASSERT( !( nToken & 1 ), "Kein Start-Token ?!" );
+ SkipGroup( nToken + 1 );
+ }
+ }
+ }
+ } // SWITCH
+
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( HTMLIMP_NEXTTOKEN, this, pImpEditEngine->CreateESel( aCurSel ) );
+ aImportInfo.nToken = nToken;
+ aImportInfo.nTokenValue = nTokenValue;
+ if ( nToken == HTML_TEXTTOKEN )
+ aImportInfo.aText = aToken;
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+
+}
+
+void EditHTMLParser::ImpInsertParaBreak()
+{
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( HTMLIMP_INSERTPARA, this, pImpEditEngine->CreateESel( aCurSel ) );
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+ aCurSel = pImpEditEngine->ImpInsertParaBreak( aCurSel );
+ nLastAction = ACTION_INSERTPARABRK;
+}
+
+void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSel )
+{
+ // pSel, wenn Zeichenattribute, sonst Absatzattribute fuer den
+ // aktuellen Absatz.
+ DBG_ASSERT( pSel || ( aCurSel.Min().GetNode() == aCurSel.Max().GetNode() ), "ImpInsertAttribs: Selektion?" );
+
+ EditPaM aStartPaM( pSel ? pSel->Min() : aCurSel.Min() );
+ EditPaM aEndPaM( pSel ? pSel->Max() : aCurSel.Max() );
+
+ if ( !pSel )
+ {
+ aStartPaM.SetIndex( 0 );
+ aEndPaM.SetIndex( aEndPaM.GetNode()->Len() );
+ }
+
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ EditSelection aSel( aStartPaM, aEndPaM );
+ ImportInfo aImportInfo( HTMLIMP_SETATTR, this, pImpEditEngine->CreateESel( aSel ) );
+ aImportInfo.pAttrs = (void*)&rItems;
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+
+ ContentNode* pSN = aStartPaM.GetNode();
+ ContentNode* pEN = aEndPaM.GetNode();
+ USHORT nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN );
+ USHORT nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN );
+
+ // Wenn ein Attribut von 0 bis aktuelle Absatzlaenge geht,
+ // soll es ein Absatz-Attribut sein!
+
+ // Achtung: Selektion kann ueber mehrere Absaetze gehen.
+ // Alle vollstaendigen Absaetze sind Absatzattribute...
+
+ // HTML eigentlich nicht:
+ DBG_ASSERT( nStartNode == nEndNode, "ImpSetAttribs: Mehrere Absaetze?" );
+/*
+ for ( USHORT z = nStartNode+1; z < nEndNode; z++ )
+ {
+ DBG_ASSERT( pImpEditEngine->GetEditDoc().SaveGetObject( z ), "Node existiert noch nicht(RTF)" );
+ pImpEditEngine->SetParaAttribs( z, rSet.GetAttrSet() );
+ }
+
+ if ( aStartPaM.GetNode() != aEndPaM.GetNode() )
+ {
+ // Den Rest des StartNodes...
+ if ( aStartPaM.GetIndex() == 0 )
+ pImpEditEngine->SetParaAttribs( nStartNode, rSet.GetAttrSet() );
+ else
+ pImpEditEngine->SetAttribs( EditSelection( aStartPaM, EditPaM( aStartPaM.GetNode(), aStartPaM.GetNode()->Len() ) ), rSet.GetAttrSet() );
+
+ // Den Anfang des EndNodes....
+ if ( aEndPaM.GetIndex() == aEndPaM.GetNode()->Len() )
+ pImpEditEngine->SetParaAttribs( nEndNode, rSet.GetAttrSet() );
+ else
+ pImpEditEngine->SetAttribs( EditSelection( EditPaM( aEndPaM.GetNode(), 0 ), aEndPaM ), rSet.GetAttrSet() );
+ }
+ else
+*/
+ {
+ if ( ( aStartPaM.GetIndex() == 0 ) && ( aEndPaM.GetIndex() == aEndPaM.GetNode()->Len() ) )
+ {
+ // Muesse gemergt werden:
+ SfxItemSet aItems( pImpEditEngine->GetParaAttribs( nStartNode ) );
+ aItems.Put( rItems );
+ pImpEditEngine->SetParaAttribs( nStartNode, aItems );
+ }
+ else
+ pImpEditEngine->SetAttribs( EditSelection( aStartPaM, aEndPaM ), rItems );
+ }
+}
+
+void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel )
+{
+ /*
+ nHLevel: 0: Ausschalten
+ 1-6: Heading
+ STYLE_PRE: Preformatted
+ */
+
+// if ( pImpEditEngine->GetStatus().DoImportRTFStyleSheets() )
+// {
+// SvxRTFStyleType* pS = GetStyleTbl().Get( rSet.StyleNo() );
+// DBG_ASSERT( pS, "Vorlage in RTF nicht definiert!" );
+// if ( pS )
+// pImpEditEngine->SetStyleSheet( EditSelection( aStartPaM, aEndPaM ), pS->sName, SFX_STYLE_FAMILY_ALL );
+// }
+// else
+ {
+ // Harte Attribute erzeugen...
+ // Reicht fuer Calc, bei StyleSheets muesste noch geklaert werden,
+ // dass diese auch in der App liegen sollten, damit sie beim
+ // fuettern in eine andere Engine auch noch da sind...
+
+ USHORT nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() );
+// SfxItemSet aItems( pImpEditEngine->GetEmptyItemSet() );
+ SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() );
+
+ aItems.ClearItem( EE_PARA_ULSPACE );
+ aItems.ClearItem( EE_CHAR_FONTHEIGHT );
+ aItems.ClearItem( EE_CHAR_FONTINFO );
+ aItems.ClearItem( EE_CHAR_WEIGHT );
+
+ // Fett in den ersten 3 Headings
+ if ( ( nHLevel >= 1 ) && ( nHLevel <= 3 ) )
+ {
+ SvxWeightItem aWeightItem( WEIGHT_BOLD, EE_CHAR_WEIGHT );
+ aItems.Put( aWeightItem );
+ }
+
+ // Fonthoehe und Abstaende, wenn LogicToLogic moeglich:
+ MapUnit eUnit = pImpEditEngine->GetRefMapMode().GetMapUnit();
+ if ( ( eUnit != MAP_PIXEL ) && ( eUnit != MAP_SYSFONT ) &&
+ ( eUnit != MAP_APPFONT ) && ( eUnit != MAP_RELATIVE ) )
+ {
+ long nPoints = 10;
+ if ( nHLevel == 1 )
+ nPoints = 22;
+ else if ( nHLevel == 2 )
+ nPoints = 16;
+ else if ( nHLevel == 3 )
+ nPoints = 12;
+ else if ( nHLevel == 4 )
+ nPoints = 11;
+
+ nPoints = OutputDevice::LogicToLogic( nPoints, MAP_POINT, eUnit );
+ SvxFontHeightItem aHeightItem( nPoints, 100, EE_CHAR_FONTHEIGHT );
+ aItems.Put( aHeightItem );
+
+ // Absatzabstaende, wenn Heading:
+ if ( !nHLevel || ( nHLevel >= 1 ) && ( nHLevel <= 6 ) )
+ {
+ SvxULSpaceItem aULSpaceItem( EE_PARA_ULSPACE );
+ aULSpaceItem.SetUpper( (USHORT)OutputDevice::LogicToLogic( 42, MAP_10TH_MM, eUnit ) );
+ aULSpaceItem.SetLower( (USHORT)OutputDevice::LogicToLogic( 35, MAP_10TH_MM, eUnit ) );
+ aItems.Put( aULSpaceItem );
+ }
+ }
+
+ // Bei Pre einen proportionalen Font waehlen
+ if ( nHLevel == STYLE_PRE )
+ {
+ Font aFont = System::GetStandardFont( STDFONT_FIXED );
+ SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO );
+ aItems.Put( aFontItem );
+ }
+
+ pImpEditEngine->SetParaAttribs( nNode, aItems );
+ }
+}
+
+void EditHTMLParser::ImpInsertText( const String& rText )
+{
+ String aText( rText );
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( HTMLIMP_INSERTTEXT, this, pImpEditEngine->CreateESel( aCurSel ) );
+ aImportInfo.aText = aText;
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+
+ aCurSel = pImpEditEngine->ImpInsertText( aCurSel, aText );
+ nLastAction = ACTION_INSERTTEXT;
+}
+
+void EditHTMLParser::SkipGroup( int nEndToken )
+{
+ // #69109# groups in cells are closed upon leaving the cell, because those
+ // ******* web authors don't know their job
+ // for example: <td><form></td> lacks a closing </form>
+ BYTE nCellLevel = nInCell;
+ int nToken;
+ while( nCellLevel <= nInCell && ( (nToken = GetNextToken() ) != nEndToken ) && nToken )
+ {
+ switch ( nToken )
+ {
+ case HTML_TABLEHEADER_ON:
+ case HTML_TABLEDATA_ON:
+ nInCell++;
+ break;
+ case HTML_TABLEHEADER_OFF:
+ case HTML_TABLEDATA_OFF:
+ if ( nInCell )
+ nInCell--;
+ break;
+ }
+ }
+}
+
+void EditHTMLParser::StartPara( BOOL bReal )
+{
+ if ( bReal )
+ {
+ const HTMLOptions *pOptions = GetOptions();
+ USHORT nArrLen = pOptions->Count();
+ SvxAdjust eAdjust = SVX_ADJUST_LEFT;
+ for ( USHORT i = 0; i < nArrLen; i++ )
+ {
+ const HTMLOption *pOption = (*pOptions)[i];
+ switch( pOption->GetToken() )
+ {
+ case HTML_O_ALIGN:
+ {
+ if ( pOption->GetString().CompareIgnoreCaseToAscii( sHTML_AL_right ) == COMPARE_EQUAL )
+ eAdjust = SVX_ADJUST_RIGHT;
+ else if ( pOption->GetString().CompareIgnoreCaseToAscii( sHTML_AL_middle ) == COMPARE_EQUAL )
+ eAdjust = SVX_ADJUST_CENTER;
+ else if ( pOption->GetString().CompareIgnoreCaseToAscii( sHTML_AL_center ) == COMPARE_EQUAL )
+ eAdjust = SVX_ADJUST_CENTER;
+ else
+ eAdjust = SVX_ADJUST_LEFT;
+ }
+ break;
+ }
+ }
+ SfxItemSet aItemSet( pImpEditEngine->GetEmptyItemSet() );
+ aItemSet.Put( SvxAdjustItem( eAdjust, EE_PARA_JUST ) );
+ ImpSetAttribs( aItemSet );
+ }
+ bInPara = TRUE;
+}
+
+void EditHTMLParser::EndPara( BOOL bReal )
+{
+ if ( bInPara )
+ {
+ BOOL bHasText = HasTextInCurrentPara();
+ if ( bHasText )
+ ImpInsertParaBreak();
+ // Nur, wenn ohne Absatzabstaende gearbeitet wird...
+// if ( !nInTable && bReal && (nNumberingLevel<=1) && (nBulletLevel<=1) )
+// ImpInsertParaBreak();
+ }
+ bInPara = FALSE;
+}
+
+BOOL EditHTMLParser::ThrowAwayBlank()
+{
+ // Ein Blank muss weggeschmissen werden, wenn der neue Text mit einem
+ // Blank beginnt und der aktuelle Absatz leer ist oder mit einem
+ // Blank endet...
+ ContentNode* pNode = aCurSel.Max().GetNode();
+ if ( pNode->Len() && ( pNode->GetChar( pNode->Len()-1 ) != ' ' ) )
+ return FALSE;
+ return TRUE;
+}
+
+BOOL EditHTMLParser::HasTextInCurrentPara()
+{
+ return aCurSel.Max().GetNode()->Len() ? TRUE : FALSE;
+}
+
+void EditHTMLParser::AnchorStart()
+{
+ // Anker im Anker ignoriern
+ if ( !pCurAnchor )
+ {
+ const HTMLOptions* pOptions = GetOptions();
+ USHORT nArrLen = pOptions->Count();
+
+ String aRef;
+
+ for ( USHORT i = 0; i < nArrLen; i++ )
+ {
+ const HTMLOption* pOption = (*pOptions)[i];
+ switch( pOption->GetToken() )
+ {
+ case HTML_O_HREF:
+ aRef = pOption->GetString();
+ break;
+ }
+ }
+
+ if ( aRef.Len() )
+ {
+ // BaseURL muss gesetzt sein!
+ String aURL = aRef;
+ if ( aURL.Len() && ( aURL.GetChar( 0 ) != '#' ) )
+ {
+ INetURLObject aTargetURL;
+ INetURLObject aRootURL( INetURLObject::GetBaseURL() );
+ aRootURL.GetNewAbsURL( aRef, &aTargetURL );
+ aURL = aTargetURL.GetMainURL();
+ }
+ pCurAnchor = new AnchorInfo;
+ pCurAnchor->aHRef = aURL;
+ }
+ }
+}
+
+void EditHTMLParser::AnchorEnd()
+{
+ if ( pCurAnchor )
+ {
+ // Als URL-Feld einfuegen...
+ SvxFieldItem aFld( SvxURLField( pCurAnchor->aHRef, pCurAnchor->aText, SVXURLFORMAT_REPR ), EE_FEATURE_FIELD );
+ aCurSel = pImpEditEngine->InsertField( aCurSel, aFld );
+ bFieldsInserted = TRUE;
+ delete pCurAnchor;
+ pCurAnchor = 0;
+
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( HTMLIMP_INSERTFIELD, this, pImpEditEngine->CreateESel( aCurSel ) );
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+ }
+}
+
+void EditHTMLParser::HeadingStart( int nToken )
+{
+ bWasInPara = bInPara;
+ StartPara( FALSE );
+
+ if ( bWasInPara && HasTextInCurrentPara() )
+ ImpInsertParaBreak();
+
+ USHORT nId = 1 + ( ( nToken - HTML_HEAD1_ON ) / 2 );
+ DBG_ASSERT( (nId >= 1) && (nId <= 9), "HeadingStart: ID kann nicht stimmen!" );
+ ImpSetStyleSheet( nId );
+}
+
+void EditHTMLParser::HeadingEnd( int nToken )
+{
+ EndPara( FALSE );
+ ImpSetStyleSheet( 0 );
+
+ if ( bWasInPara )
+ {
+ bInPara = TRUE;
+ bWasInPara = FALSE;
+ }
+}
diff --git a/svx/source/editeng/eerdll.cxx b/svx/source/editeng/eerdll.cxx
new file mode 100644
index 0000000000..bbcaaabce5
--- /dev/null
+++ b/svx/source/editeng/eerdll.cxx
@@ -0,0 +1,205 @@
+/*************************************************************************
+ *
+ * $RCSfile: eerdll.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <svtools/solar.hrc>
+#include <eerdll.hxx>
+#include <eerdll2.hxx>
+#include <lspcitem.hxx>
+#include <adjitem.hxx>
+#include <tstpitem.hxx>
+#include <bulitem.hxx>
+#include <flditem.hxx>
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SV_VIRDEV_HXX
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#include <akrnitem.hxx>
+#include <cntritem.hxx>
+#include <colritem.hxx>
+#include <crsditem.hxx>
+#include <cscoitem.hxx>
+#include <escpitem.hxx>
+#include <fhgtitem.hxx>
+#include <fontitem.hxx>
+#include <fwdtitem.hxx>
+#include <kernitem.hxx>
+#include <lrspitem.hxx>
+#include <postitem.hxx>
+#include <shdditem.hxx>
+#include <udlnitem.hxx>
+#include <ulspitem.hxx>
+#include <wghtitem.hxx>
+#include <wrlmitem.hxx>
+#include <numitem.hxx>
+
+GlobalEditData::GlobalEditData()
+{
+ ppDefItems = 0;
+ pStdRefDevice = 0;
+}
+
+GlobalEditData::~GlobalEditData()
+{
+ // DefItems zerstoeren...
+ // Oder einfach stehen lassen, da sowieso App-Ende?!
+ if ( ppDefItems )
+ SfxItemPool::ReleaseDefaults( ppDefItems, EDITITEMCOUNT, TRUE );
+ delete pStdRefDevice;
+}
+
+SfxPoolItem** GlobalEditData::GetDefItems()
+{
+ if ( !ppDefItems )
+ {
+ ppDefItems = new SfxPoolItem*[EDITITEMCOUNT];
+
+ // Absatzattribute:
+ SvxNumRule aTmpNumRule( 0, 0, FALSE );
+
+ ppDefItems[0] = new SvxNumBulletItem( aTmpNumRule, EE_PARA_NUMBULLET );
+ ppDefItems[1] = new SfxBoolItem( EE_PARA_HYPHENATE, FALSE );
+ ppDefItems[2] = new SfxUInt16Item( EE_PARA_BULLETSTATE, 0 );
+ ppDefItems[3] = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE );
+ ppDefItems[4] = new SfxUInt16Item( EE_PARA_OUTLLEVEL );
+ ppDefItems[5] = new SvxBulletItem( EE_PARA_BULLET );
+ ppDefItems[6] = new SvxLRSpaceItem( EE_PARA_LRSPACE );
+ ppDefItems[7] = new SvxULSpaceItem( EE_PARA_ULSPACE );
+ ppDefItems[8] = new SvxLineSpacingItem( 0, EE_PARA_SBL );
+ ppDefItems[9] = new SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST );
+ ppDefItems[10] = new SvxTabStopItem( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS );
+
+ // Zeichenattribute:
+ ppDefItems[11] = new SvxColorItem( Color( COL_BLACK ), EE_CHAR_COLOR );
+ ppDefItems[12] = new SvxFontItem( EE_CHAR_FONTINFO );
+ ppDefItems[13] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT );
+ ppDefItems[14] = new SvxFontWidthItem( 0, 100, EE_CHAR_FONTWIDTH );
+ ppDefItems[15] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT );
+ ppDefItems[16] = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE );
+ ppDefItems[17] = new SvxCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT );
+ ppDefItems[18] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC );
+ ppDefItems[19] = new SvxContourItem( FALSE, EE_CHAR_OUTLINE );
+ ppDefItems[20] = new SvxShadowedItem( FALSE, EE_CHAR_SHADOW );
+ ppDefItems[21] = new SvxEscapementItem( 0, 100, EE_CHAR_ESCAPEMENT );
+ ppDefItems[22] = new SvxAutoKernItem( FALSE, EE_CHAR_PAIRKERNING );
+ ppDefItems[23] = new SvxKerningItem( 0, EE_CHAR_KERNING );
+ ppDefItems[24] = new SvxWordLineModeItem( FALSE, EE_CHAR_WLM );
+
+ // Features
+ ppDefItems[25] = new SfxVoidItem( EE_FEATURE_TAB );
+ ppDefItems[26] = new SfxVoidItem( EE_FEATURE_LINEBR );
+ ppDefItems[27] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
+ ppDefItems[28] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
+
+ DBG_ASSERT( EDITITEMCOUNT == 29, "ITEMCOUNT geaendert, DefItems nicht angepasst!" );
+ }
+
+ return ppDefItems;
+}
+
+OutputDevice* GlobalEditData::GetStdRefDevice()
+{
+ if ( !pStdRefDevice )
+ {
+ pStdRefDevice = new VirtualDevice;
+ pStdRefDevice->SetMapMode( MAP_TWIP );
+ }
+ return pStdRefDevice;
+}
+
+EditResId::EditResId( USHORT nId ):
+ ResId( nId, EE_DLL()->GetResMgr() )
+{
+}
+
+EditDLL::EditDLL()
+{
+ pGlobalData = new GlobalEditData;
+ DBG_ASSERT( !*(EditDLL**)GetAppData(SHL_EDIT), "Noch eine EditDLL ?!" );
+ *(EditDLL**)GetAppData(SHL_EDIT) = this;
+
+#ifndef SVX_LIGHT
+ ByteString aResMgrName( "svx" );
+#else
+ ByteString aResMgrName( "svl" );
+#endif
+ aResMgrName += ByteString::CreateFromInt32( SOLARUPD );
+ pResMgr = ResMgr::CreateResMgr(
+ aResMgrName.GetBuffer(), Application::GetAppInternational().GetLanguage() );
+}
+
+EditDLL::~EditDLL()
+{
+ delete pResMgr;
+ delete pGlobalData;
+}
diff --git a/svx/source/editeng/eerdll2.hxx b/svx/source/editeng/eerdll2.hxx
new file mode 100644
index 0000000000..0af79e4be7
--- /dev/null
+++ b/svx/source/editeng/eerdll2.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * $RCSfile: eerdll2.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _EERDLL2_HXX
+#define _EERDLL2_HXX
+
+class SfxPoolItem;
+class SvxAutoCorrect;
+
+class GlobalEditData
+{
+private:
+ SfxPoolItem** ppDefItems;
+ OutputDevice* pStdRefDevice;
+
+ Link aGetAutoCorrectHdl;
+
+public:
+ GlobalEditData();
+ ~GlobalEditData();
+
+ SfxPoolItem** GetDefItems();
+ OutputDevice* GetStdRefDevice();
+
+ void SetGetAutoCorrectHdl( const Link& rHdl ) { aGetAutoCorrectHdl = rHdl; }
+ SvxAutoCorrect* GetAutoCorrect() const { return (SvxAutoCorrect*) aGetAutoCorrectHdl.Call( NULL ); }
+};
+
+
+#endif //_EERDLL2_HXX
+
diff --git a/svx/source/editeng/eertfpar.cxx b/svx/source/editeng/eertfpar.cxx
new file mode 100644
index 0000000000..0d2161caee
--- /dev/null
+++ b/svx/source/editeng/eertfpar.cxx
@@ -0,0 +1,597 @@
+/*************************************************************************
+ *
+ * $RCSfile: eertfpar.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <eertfpar.hxx>
+#include <impedit.hxx>
+#include <svtools/intitem.hxx>
+#include "escpitem.hxx"
+#include "fhgtitem.hxx"
+#include "fontitem.hxx"
+
+#ifndef _SVX_FLDITEM_HXX
+#include <flditem.hxx>
+#endif
+
+#include <svtools/rtftoken.h>
+
+ImportInfo::ImportInfo( ImportState eSt, SvParser* pPrsrs, const ESelection& rSel )
+ : aSelection( rSel )
+{
+ pParser = pPrsrs,
+ eState = eSt;
+
+ nToken = 0;
+ nTokenValue = 0;
+ pAttrs = NULL;
+}
+
+ImportInfo::~ImportInfo()
+{
+}
+
+EditRTFParser::EditRTFParser( SvStream& rIn, EditSelection aSel, SfxItemPool& rAttrPool, ImpEditEngine* pImpEE )
+ : SvxRTFParser( rAttrPool, rIn ), aRTFMapMode( MAP_TWIP )
+{
+
+ pImpEditEngine = pImpEE;
+ aCurSel = aSel;
+ eDestCharSet = RTL_TEXTENCODING_DONTKNOW;
+ nDefFont = 0;
+ nDefTab = 0;
+ nLastAction = 0;
+ nDefFontHeight = 0;
+
+ SetInsPos( EditPosition( pImpEditEngine, &aCurSel ) );
+
+ // Umwandeln der Twips-Werte...
+ SetCalcValue( TRUE );
+ SetChkStyleAttr( pImpEE->GetStatus().DoImportRTFStyleSheets() );
+ SetNewDoc( FALSE ); // damit die Pool-Defaults nicht
+ // ueberschrieben werden...
+ aEditMapMode = MapMode( pImpEE->GetRefDevice()->GetMapMode().GetMapUnit() );
+
+#ifdef EDITDEBUG
+ SvFileStream aStream( "d:\\rtf.log", STREAM_WRITE|STREAM_TRUNC );
+ ULONG nP = rIn.Tell();
+ aStream << rIn;
+ rIn.Seek( nP );
+#endif
+}
+
+EditRTFParser::~EditRTFParser()
+{
+}
+
+SvParserState __EXPORT EditRTFParser::CallParser()
+{
+ DBG_ASSERT( !aCurSel.HasRange(), "Selection bei CallParser!" );
+ // Den Teil, in den importiert wird, vom Rest abtrennen.
+ // Diese Mimik sollte fuer alle Imports verwendet werden.
+ // aStart1PaM: Letzte Position vor dem importierten Inhalt
+ // aEnd1PaM: Erste Position nach dem importierten Inhalt
+ // aStart2PaM: Erste Position des importierten Inhaltes
+ // aEnd2PaM: Letzte Position des importierten Inhaltes
+ EditPaM aStart1PaM( aCurSel.Min().GetNode(), aCurSel.Min().GetIndex() );
+ aCurSel = pImpEditEngine->ImpInsertParaBreak( aCurSel );
+ EditPaM aStart2PaM = aCurSel.Min();
+ // Sinnvoll oder nicht?:
+ aStart2PaM.GetNode()->GetContentAttribs().GetItems().ClearItem();
+ EditPaM aEnd1PaM( pImpEditEngine->ImpInsertParaBreak( aCurSel.Max() ) );
+ // aCurCel zeigt jetzt auf den Zwischenraum
+
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( RTFIMP_START, this, pImpEditEngine->CreateESel( aCurSel ) );
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+
+ SvParserState eState = SvxRTFParser::CallParser();
+
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( RTFIMP_END, this, pImpEditEngine->CreateESel( aCurSel ) );
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+
+ if ( nLastAction == ACTION_INSERTPARABRK )
+ {
+ ContentNode* pCurNode = aCurSel.Max().GetNode();
+ USHORT nPara = pImpEditEngine->GetEditDoc().GetPos( pCurNode );
+ ContentNode* pPrevNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara-1 );
+ DBG_ASSERT( pPrevNode, "Ungueltiges RTF-Dokument ?!" );
+ EditSelection aSel;
+ aSel.Min() = EditPaM( pPrevNode, pPrevNode->Len() );
+ aSel.Max() = EditPaM( pCurNode, 0 );
+ aCurSel.Max() = pImpEditEngine->ImpDeleteSelection( aSel );
+ }
+ EditPaM aEnd2PaM( aCurSel.Max() );
+ AddRTFDefaultValues( aStart2PaM, aEnd2PaM );
+ BOOL bOnlyOnePara = ( aEnd2PaM.GetNode() == aStart2PaM.GetNode() );
+ // Den Brocken wieder einfuegen...
+ // Problem: Absatzattribute duerfen ggf. nicht uebernommen werden
+ // => Zeichenattribute machen.
+
+ BOOL bSpecialBackward = aStart1PaM.GetNode()->Len() ? FALSE : TRUE;
+ if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() )
+ pImpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() );
+ aCurSel.Min() = pImpEditEngine->ImpConnectParagraphs(
+ aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward );
+ bSpecialBackward = aEnd1PaM.GetNode()->Len() ? TRUE : FALSE;
+ // wenn bOnlyOnePara, dann ist der Node beim Connect verschwunden.
+ if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() )
+ pImpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() );
+ aCurSel.Max() = pImpEditEngine->ImpConnectParagraphs(
+ ( bOnlyOnePara ? aStart1PaM.GetNode() : aEnd2PaM.GetNode() ),
+ aEnd1PaM.GetNode(), bSpecialBackward );
+
+ return eState;
+}
+
+void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& rEnd )
+{
+ // Problem: DefFont und DefFontHeight
+ Size aSz( 12, 0 );
+ MapMode aPntMode( MAP_POINT );
+ MapMode aEditMapMode( pImpEditEngine->GetRefDevice()->GetMapMode().GetMapUnit() );
+ aSz = pImpEditEngine->GetRefDevice()->LogicToLogic( aSz, &aPntMode, &aEditMapMode );
+ SvxFontHeightItem aFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT );
+ Font aDefFont( GetDefFont() );
+ SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetName(),
+ aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO );
+
+ USHORT nStartPara = pImpEditEngine->GetEditDoc().GetPos( rStart.GetNode() );
+ USHORT nEndPara = pImpEditEngine->GetEditDoc().GetPos( rEnd.GetNode() );
+ for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ {
+ ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( nPara );
+ DBG_ASSERT( pNode, "AddRTFDefaultValues - Kein Absatz ?!" );
+ if ( !pNode->GetContentAttribs().HasItem( EE_CHAR_FONTINFO ) )
+ pNode->GetContentAttribs().GetItems().Put( aFontItem );
+ if ( !pNode->GetContentAttribs().HasItem( EE_CHAR_FONTHEIGHT ) )
+ pNode->GetContentAttribs().GetItems().Put( aFontHeightItem );
+ }
+}
+
+void __EXPORT EditRTFParser::NextToken( int nToken )
+{
+ switch( nToken )
+ {
+ case RTF_DEFF:
+ {
+ nDefFont = USHORT(nTokenValue);
+ }
+ break;
+ case RTF_DEFTAB:
+ {
+ nDefTab = USHORT(nTokenValue);
+ }
+ break;
+ case RTF_CELL:
+ {
+ aCurSel = pImpEditEngine->ImpInsertParaBreak( aCurSel );
+ }
+ break;
+ case RTF_LINE:
+ {
+ aCurSel = pImpEditEngine->InsertLineBreak( aCurSel );
+ }
+ break;
+ case RTF_FIELD:
+ {
+ ReadField();
+ }
+ break;
+ default:
+ {
+ SvxRTFParser::NextToken( nToken );
+ if ( nToken == RTF_STYLESHEET )
+ CreateStyleSheets();
+ }
+ break;
+ }
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( RTFIMP_NEXTTOKEN, this, pImpEditEngine->CreateESel( aCurSel ) );
+ aImportInfo.nToken = nToken;
+ aImportInfo.nTokenValue = short(nTokenValue);
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+}
+
+void __EXPORT EditRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
+{
+ // fuer Tokens, die im ReadAttr nicht ausgewertet werden
+ // Eigentlich nur fuer Calc (RTFTokenHdl), damit RTF_INTBL
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( RTFIMP_UNKNOWNATTR, this, pImpEditEngine->CreateESel( aCurSel ) );
+ aImportInfo.nToken = nToken;
+ aImportInfo.nTokenValue = short(nTokenValue);
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+}
+
+void __EXPORT EditRTFParser::InsertText()
+{
+ String aText( aToken );
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( RTFIMP_INSERTTEXT, this, pImpEditEngine->CreateESel( aCurSel ) );
+ aImportInfo.aText = aText;
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+ aCurSel = pImpEditEngine->ImpInsertText( aCurSel, aText );
+ nLastAction = ACTION_INSERTTEXT;
+}
+
+void __EXPORT EditRTFParser::InsertPara()
+{
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ ImportInfo aImportInfo( RTFIMP_INSERTPARA, this, pImpEditEngine->CreateESel( aCurSel ) );
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+ aCurSel = pImpEditEngine->ImpInsertParaBreak( aCurSel );
+ nLastAction = ACTION_INSERTPARABRK;
+}
+
+void __EXPORT EditRTFParser::MovePos( int bForward )
+{
+ if( bForward )
+ aCurSel = pImpEditEngine->CursorRight( aCurSel.Max() );
+ else
+ aCurSel = pImpEditEngine->CursorLeft( aCurSel.Max() );
+}
+
+void __EXPORT EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos,
+ USHORT& rCntPos )
+{
+ // Gewollt ist: von der aktuellen Einfuegeposition den vorherigen
+ // Absatz bestimmen und von dem das Ende setzen.
+ // Dadurch wird "\pard" immer auf den richtigen Absatz
+ // angewendet.
+
+ ContentNode* pN = aCurSel.Max().GetNode();
+ USHORT nCurPara = pImpEditEngine->GetEditDoc().GetPos( pN );
+ DBG_ASSERT( nCurPara != 0, "Absatz gleich 0: SetEnfPrevPara" );
+ if ( nCurPara )
+ nCurPara--;
+ ContentNode* pPrevNode = pImpEditEngine->GetEditDoc().SaveGetObject( nCurPara );
+ DBG_ASSERT( pPrevNode, "pPrevNode = 0!" );
+ rpNodePos = new EditNodeIdx( pImpEditEngine, pPrevNode );
+ rCntPos = pPrevNode->Len();
+}
+
+int __EXPORT EditRTFParser::IsEndPara( SvxNodeIdx* pNd, USHORT nCnt ) const
+{
+ return ( nCnt == ( ((EditNodeIdx*)pNd)->GetNode()->Len()) );
+}
+
+void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
+{
+ ContentNode* pSttNode = ((EditNodeIdx&)rSet.GetSttNode()).GetNode();
+ ContentNode* pEndNode = ((EditNodeIdx&)rSet.GetEndNode()).GetNode();
+
+ EditPaM aStartPaM( pSttNode, rSet.GetSttCnt() );
+ EditPaM aEndPaM( pEndNode, rSet.GetEndCnt() );
+
+ // ggf. noch das Escapemant-Item umbiegen:
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, FALSE, &pItem ))
+ {
+ // die richtige
+ long nEsc = ((SvxEscapementItem*)pItem)->GetEsc();
+
+ if( ( DFLT_ESC_AUTO_SUPER != nEsc ) && ( DFLT_ESC_AUTO_SUB != nEsc ) )
+ {
+ nEsc *= 10; //HalPoints => Twips wurde in RTFITEM.CXX unterschlagen!
+ SvxFont aFont;
+ pImpEditEngine->SeekCursor( aStartPaM.GetNode(), aStartPaM.GetIndex()+1, aFont );
+ nEsc = nEsc * 100 / aFont.GetSize().Height();
+
+ SvxEscapementItem aEscItem( (short) nEsc, ((SvxEscapementItem*)pItem)->GetProp(), EE_CHAR_ESCAPEMENT );
+ rSet.GetAttrSet().Put( aEscItem );
+ }
+ }
+
+ if ( pImpEditEngine->aImportHdl.IsSet() )
+ {
+ EditSelection aSel( aStartPaM, aEndPaM );
+ ImportInfo aImportInfo( RTFIMP_SETATTR, this, pImpEditEngine->CreateESel( aSel ) );
+ aImportInfo.pAttrs = &rSet;
+ pImpEditEngine->aImportHdl.Call( &aImportInfo );
+ }
+
+ ContentNode* pSN = aStartPaM.GetNode();
+ ContentNode* pEN = aEndPaM.GetNode();
+ USHORT nStartNode = pImpEditEngine->GetEditDoc().GetPos( pSN );
+ USHORT nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN );
+ USHORT nOutlLevel = 0xFF;
+
+ if ( rSet.StyleNo() && pImpEditEngine->GetStyleSheetPool() && pImpEditEngine->GetStatus().DoImportRTFStyleSheets() )
+ {
+ SvxRTFStyleType* pS = GetStyleTbl().Get( rSet.StyleNo() );
+ DBG_ASSERT( pS, "Vorlage in RTF nicht definiert!" );
+ if ( pS )
+ {
+ pImpEditEngine->SetStyleSheet( EditSelection( aStartPaM, aEndPaM ), (SfxStyleSheet*)pImpEditEngine->GetStyleSheetPool()->Find( pS->sName, SFX_STYLE_FAMILY_ALL ) );
+ nOutlLevel = pS->nOutlineNo;
+ }
+ }
+
+ // Wenn ein Attribut von 0 bis aktuelle Absatzlaenge geht,
+ // soll es ein Absatz-Attribut sein!
+
+ // Achtung: Selektion kann ueber mehrere Absaetze gehen.
+ // Alle vollstaendigen Absaetze sind Absatzattribute...
+ for ( USHORT z = nStartNode+1; z < nEndNode; z++ )
+ {
+ DBG_ASSERT( pImpEditEngine->GetEditDoc().SaveGetObject( z ), "Node existiert noch nicht(RTF)" );
+ pImpEditEngine->SetParaAttribs( z, rSet.GetAttrSet() );
+ }
+
+ if ( aStartPaM.GetNode() != aEndPaM.GetNode() )
+ {
+ // Den Rest des StartNodes...
+ if ( aStartPaM.GetIndex() == 0 )
+ pImpEditEngine->SetParaAttribs( nStartNode, rSet.GetAttrSet() );
+ else
+ pImpEditEngine->SetAttribs( EditSelection( aStartPaM, EditPaM( aStartPaM.GetNode(), aStartPaM.GetNode()->Len() ) ), rSet.GetAttrSet() );
+
+ // Den Anfang des EndNodes....
+ if ( aEndPaM.GetIndex() == aEndPaM.GetNode()->Len() )
+ pImpEditEngine->SetParaAttribs( nEndNode, rSet.GetAttrSet() );
+ else
+ pImpEditEngine->SetAttribs( EditSelection( EditPaM( aEndPaM.GetNode(), 0 ), aEndPaM ), rSet.GetAttrSet() );
+ }
+ else
+ {
+ if ( ( aStartPaM.GetIndex() == 0 ) && ( aEndPaM.GetIndex() == aEndPaM.GetNode()->Len() ) )
+ pImpEditEngine->SetParaAttribs( nStartNode, rSet.GetAttrSet() );
+ else
+ pImpEditEngine->SetAttribs( EditSelection( aStartPaM, aEndPaM ), rSet.GetAttrSet() );
+ }
+
+ // OutlLevel...
+ if ( nOutlLevel != 0xFF )
+ {
+ for ( USHORT n = nStartNode; n <= nEndNode; n++ )
+ {
+ ContentNode* pNode = pImpEditEngine->GetEditDoc().SaveGetObject( n );
+ pNode->GetContentAttribs().GetItems().Put( SfxUInt16Item( EE_PARA_OUTLLEVEL, nOutlLevel ) );
+ }
+ }
+}
+
+SvxRTFStyleType* EditRTFParser::FindStyleSheet( const XubString& rName )
+{
+ SvxRTFStyleType* pS = GetStyleTbl().First();
+ while ( pS && ( pS->sName != rName ) )
+ pS = GetStyleTbl().Next();
+
+ return pS;
+}
+
+SfxStyleSheet* EditRTFParser::CreateStyleSheet( SvxRTFStyleType* pRTFStyle )
+{
+ // Prueffen, ob so eine Vorlage existiert....
+ // dann wird sie auch nicht geaendert!
+ SfxStyleSheet* pStyle = (SfxStyleSheet*)pImpEditEngine->GetStyleSheetPool()->Find( pRTFStyle->sName, SFX_STYLE_FAMILY_ALL );
+ if ( pStyle )
+ return pStyle;
+
+ String aName( pRTFStyle->sName );
+ String aParent;
+ if ( pRTFStyle->nBasedOn )
+ {
+ SvxRTFStyleType* pS = GetStyleTbl().Get( pRTFStyle->nBasedOn );
+ if ( pS && ( pS !=pRTFStyle ) )
+ aParent = pS->sName;
+ }
+
+ pStyle = (SfxStyleSheet*) &pImpEditEngine->GetStyleSheetPool()->Make( aName, SFX_STYLE_FAMILY_PARA );
+
+ // 1) Items konvertieren und uebernehmen...
+ ConvertAndPutItems( pStyle->GetItemSet(), pRTFStyle->aAttrSet );
+
+ // 2) Solange Parent nicht im Pool, auch diesen kreieren...
+ if ( aParent.Len() && ( aParent != aName ) )
+ {
+ SfxStyleSheet* pS = (SfxStyleSheet*)pImpEditEngine->GetStyleSheetPool()->Find( aParent, SFX_STYLE_FAMILY_ALL );
+ if ( !pS )
+ {
+ // Wenn nirgendwo gefunden, aus RTF erzeugen...
+ SvxRTFStyleType* pRTFStyle = FindStyleSheet( aParent );
+ if ( pRTFStyle )
+ pS = CreateStyleSheet( pRTFStyle );
+ }
+ // 2b) ItemSet mit Parent verknuepfen...
+ if ( pS )
+ pStyle->GetItemSet().SetParent( &pS->GetItemSet() );
+ }
+ return pStyle;
+}
+
+void EditRTFParser::CreateStyleSheets()
+{
+ // der SvxRTFParser hat jetzt die Vorlagen erzeugt...
+ if ( pImpEditEngine->GetStyleSheetPool() && pImpEditEngine->GetStatus().DoImportRTFStyleSheets() )
+ {
+ SvxRTFStyleType* pRTFStyle = GetStyleTbl().First();
+ while ( pRTFStyle )
+ {
+ CreateStyleSheet( pRTFStyle );
+
+ pRTFStyle = GetStyleTbl().Next();
+ }
+ }
+}
+
+void __EXPORT EditRTFParser::CalcValue()
+{
+ nTokenValue = TwipsToLogic( nTokenValue );
+}
+
+void EditRTFParser::ReadField()
+{
+ // Aus SwRTFParser::ReadField()
+ int nRet = 0;
+ int nOpenBrakets = 1; // die erste wurde schon vorher erkannt
+ BOOL bFldInst = FALSE;
+ BOOL bFldRslt = FALSE;
+ String aFldInst;
+ String aFldRslt;
+
+ while( nOpenBrakets && IsParserWorking() )
+ {
+ switch( GetNextToken() )
+ {
+ case '}':
+ {
+ nOpenBrakets--;
+ if ( nOpenBrakets == 1 )
+ {
+ bFldInst = FALSE;
+ bFldRslt = FALSE;
+ }
+ }
+ break;
+
+ case '{': nOpenBrakets++;
+ break;
+
+ case RTF_FIELD: SkipGroup();
+ break;
+
+ case RTF_FLDINST: bFldInst = TRUE;
+ break;
+
+ case RTF_FLDRSLT: bFldRslt = TRUE;
+ break;
+
+ case RTF_TEXTTOKEN:
+ {
+ if ( bFldInst )
+ aFldInst += aToken;
+ else if ( bFldRslt )
+ aFldRslt += aToken;
+ }
+ break;
+ }
+ }
+ if ( aFldInst.Len() )
+ {
+ String aHyperLinkMarker( RTL_CONSTASCII_USTRINGPARAM( "HYPERLINK " ) );
+ if ( aFldInst.CompareIgnoreCaseToAscii( aHyperLinkMarker, aHyperLinkMarker.Len() ) == COMPARE_EQUAL )
+ {
+ aFldInst.Erase( 0, aHyperLinkMarker.Len() );
+ aFldInst.EraseLeadingChars();
+ aFldInst.EraseTrailingChars();
+ aFldInst.Erase( 0, 1 ); // "
+ aFldInst.Erase( aFldInst.Len()-1, 1 ); // "
+
+ if ( !aFldRslt.Len() )
+ aFldRslt = aFldInst;
+
+ SvxFieldItem aField( SvxURLField( aFldInst, aFldRslt, SVXURLFORMAT_REPR ), EE_FEATURE_FIELD );
+ aCurSel = pImpEditEngine->InsertField( aCurSel, aField );
+ pImpEditEngine->UpdateFields();
+ nLastAction = ACTION_INSERTTEXT;
+ }
+ }
+
+ SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
+}
+
+ULONG __EXPORT EditNodeIdx::GetIdx() const
+{
+ return pImpEditEngine->GetEditDoc().GetPos( pNode );
+}
+
+SvxNodeIdx* __EXPORT EditNodeIdx::Clone() const
+{
+ return new EditNodeIdx( pImpEditEngine, pNode );
+}
+
+SvxPosition* __EXPORT EditPosition::Clone() const
+{
+ return new EditPosition( pImpEditEngine, pCurSel );
+}
+
+SvxNodeIdx* __EXPORT EditPosition::MakeNodeIdx() const
+{
+ return new EditNodeIdx( pImpEditEngine, pCurSel->Max().GetNode() );
+}
+
+ULONG __EXPORT EditPosition::GetNodeIdx() const
+{
+ ContentNode* pN = pCurSel->Max().GetNode();
+ return pImpEditEngine->GetEditDoc().GetPos( pN );
+}
+
+USHORT __EXPORT EditPosition::GetCntIdx() const
+{
+ return pCurSel->Max().GetIndex();
+}
diff --git a/svx/source/editeng/impedit.cxx b/svx/source/editeng/impedit.cxx
new file mode 100644
index 0000000000..69fe83430f
--- /dev/null
+++ b/svx/source/editeng/impedit.cxx
@@ -0,0 +1,922 @@
+/*************************************************************************
+ *
+ * $RCSfile: impedit.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editview.hxx>
+
+#ifndef _SV_POLY_HXX //autogen
+#include <vcl/poly.hxx>
+#endif
+
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.hxx>
+#endif
+#ifndef _SFX_SFXUNO_HXX
+#include <sfx2/sfxuno.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYENTRY_HPP_
+#include <com/sun/star/linguistic/XDictionaryEntry.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_DICTIONARYTYPE_HPP_
+#include <com/sun/star/linguistic/DictionaryType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYENTRYSUPPLIER_HPP_
+#include <com/sun/star/linguistic/XDictionaryEntrySupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYSUPPLIER_HPP_
+#include <com/sun/star/linguistic/XDictionarySupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_DICTIONARYEVENT_HPP_
+#include <com/sun/star/linguistic/DictionaryEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYEVENTLISTENER_HPP_
+#include <com/sun/star/linguistic/XDictionaryEventListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_DICEVENTFLAGS_HPP_
+#include <com/sun/star/linguistic/DicEventFlags.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARY_HPP_
+#include <com/sun/star/linguistic/XDictionary.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARY1_HPP_
+#include <com/sun/star/linguistic/XDictionary1.hpp>
+#endif
+
+inline void lcl_AllignToPixel( Point& rPoint, OutputDevice* pOutDev, short nDiffX, short nDiffY )
+{
+ rPoint = pOutDev->LogicToPixel( rPoint );
+
+ if ( nDiffX )
+ rPoint.X() += nDiffX;
+ if ( nDiffY )
+ rPoint.Y() += nDiffY;
+
+ rPoint = pOutDev->PixelToLogic( rPoint );
+}
+
+ // ----------------------------------------------------------------------
+// class ImpEditView
+// ----------------------------------------------------------------------
+ImpEditView::ImpEditView( EditEngine* pEng, Window* pWindow ) :
+ aOutArea( Point(), pEng->GetPaperSize() ),
+ aVisArea( Point(), pEng->GetPaperSize() )
+{
+ pEditEngine = pEng;
+ pOutWin = pWindow;
+ pPointer = NULL;
+ pBackgroundColor = NULL;
+ nScrollDiffX = 0;
+ pCursor = NULL;
+ bReadOnly = sal_False;
+ eSelectionMode = EE_SELMODE_TXTONLY;
+ eAnchorMode = ANCHOR_TOP_LEFT;
+ nInvMore = 1;
+ nTravelXPos = TRAVEL_X_DONTKNOW;
+ nControl = EV_CNTRL_AUTOSCROLL | EV_CNTRL_ENABLEPASTE;
+ aEditSelection.Min() = pEng->pImpEditEngine->GetEditDoc().GetStartPaM();
+ aEditSelection.Max() = pEng->pImpEditEngine->GetEditDoc().GetEndPaM();
+}
+
+ImpEditView::~ImpEditView()
+{
+ if ( pOutWin && ( pOutWin->GetCursor() == pCursor ) )
+ pOutWin->SetCursor( NULL );
+
+ delete pCursor;
+ delete pBackgroundColor;
+ delete pPointer;
+}
+
+void ImpEditView::SetBackgroundColor( const Color& rColor )
+{
+ delete pBackgroundColor;
+ pBackgroundColor = new Color( rColor );
+}
+
+void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion )
+{
+ // Vor dem Zeichnen der Selektion muss sichergestellt werden,
+ // das der Fensterinhalt komplett gueltig ist!
+ // Muss hier stehen, damit auf jeden Fall weg wenn lerr, nicht spaeter
+ // zwei Paint-Events!
+ // 19.10: Muss sogar vor Abfrage von bUpdate, falls nach Invalidate
+ // noch Paints in der Queue, aber jemand schaltet den UpdateMode um!
+
+ // pRegion: Wenn nicht NULL, dann nur Region berechnen.
+ PolyPolygon* pPolyPoly = NULL;
+ if ( pRegion )
+ pPolyPoly = new PolyPolygon;
+
+ sal_Bool bInvertSelection = sal_False;
+ sal_Bool bPixelMode = pOutWin->GetMapMode() == MAP_PIXEL;
+ sal_Bool bClipRegion = pOutWin->IsClipRegion();
+ Region aOldRegion = pOutWin->GetClipRegion();
+ // aTmpOutArea: Falls OutputArea > Papierbreite und
+ // Text > Papierbreite ( uebergrosse Felder )
+ Rectangle aTmpOutArea( aOutArea );
+ if ( aTmpOutArea.GetWidth() > pEditEngine->pImpEditEngine->GetPaperSize().Width() )
+ aTmpOutArea.Right() = aTmpOutArea.Left() + pEditEngine->pImpEditEngine->GetPaperSize().Width();
+
+ if ( !pRegion )
+ {
+ if ( pEditEngine->pImpEditEngine->GetUpdateMode() == sal_False )
+ return;
+ if ( pEditEngine->pImpEditEngine->IsInUndo() )
+ return;
+
+ if ( !aTmpSel.HasRange() )
+ return;
+
+ pOutWin->IntersectClipRegion( aTmpOutArea );
+
+#ifdef MAC
+ bInvertSelection = ( GetBackground().GetColor() != COL_WHITE );
+#endif
+
+ if ( pOutWin->GetCursor() )
+ pOutWin->GetCursor()->Hide();
+ }
+
+ DBG_ASSERT( !pEditEngine->pImpEditEngine->aIdleFormatter.IsActive(), "DrawSelection: Not formatted!" );
+ aTmpSel.Adjust( pEditEngine->pImpEditEngine->GetEditDoc() );
+
+ // Alte Selektion EE_SELMODE_STD siehe Rev 1.101 (schneller!)
+ ContentNode* pStartNode = aTmpSel.Min().GetNode();
+ ContentNode* pEndNode = aTmpSel.Max().GetNode();
+ sal_uInt16 nStartPara = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( pStartNode );
+ sal_uInt16 nEndPara = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( pEndNode );
+ // ueber die Absaetze iterieren....
+ for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ {
+ ParaPortion* pTmpPortion = pEditEngine->pImpEditEngine->GetParaPortions().SaveGetObject( nPara );
+ DBG_ASSERT( pTmpPortion, "Portion in Selektion nicht gefunden!" );
+ DBG_ASSERT( !pTmpPortion->IsInvalid(), "Portion in Selektion nicht formatiert!" );
+
+ if ( !pTmpPortion->IsVisible() || pTmpPortion->IsInvalid() )
+ continue;
+
+ long nParaStart = pEditEngine->pImpEditEngine->GetParaPortions().GetYOffset( pTmpPortion );
+ if ( ( nParaStart + pTmpPortion->GetHeight() ) < aVisArea.Top() )
+ continue;
+ if ( nParaStart > aVisArea.Bottom() )
+ break;
+
+ sal_uInt16 nStartLine = 0;
+ sal_uInt16 nEndLine = pTmpPortion->GetLines().Count() -1;
+ if ( nPara == nStartPara )
+ nStartLine = pTmpPortion->GetLines().FindLine( aTmpSel.Min().GetIndex(), sal_False );
+ if ( nPara == nEndPara )
+ nEndLine = pTmpPortion->GetLines().FindLine( aTmpSel.Max().GetIndex(), sal_True );
+
+ // ueber die Zeilen iterieren....
+ for ( sal_uInt16 nLine = nStartLine; nLine <= nEndLine; nLine++ )
+ {
+ EditLine* pLine = pTmpPortion->GetLines().GetObject( nLine );
+ DBG_ASSERT( pLine, "Zeile nicht gefunden: DrawSelection()" );
+
+ sal_uInt16 nStartIndex = pLine->GetStart();
+ sal_uInt16 nEndIndex = pLine->GetEnd();
+ if ( ( nPara == nStartPara ) && ( nLine == nStartLine ) )
+ nStartIndex = aTmpSel.Min().GetIndex();
+ if ( ( nPara == nEndPara ) && ( nLine == nEndLine ) )
+ nEndIndex = aTmpSel.Max().GetIndex();
+
+ // Kann passieren, wenn am Anfang einer umgebrochenen Zeile.
+ if ( nEndIndex < nStartIndex )
+ nEndIndex = nStartIndex;
+
+ Rectangle aTmpRec( pEditEngine->pImpEditEngine->GetEditCursor( pTmpPortion, nStartIndex ) );
+ aTmpRec.Top() += nParaStart;
+ aTmpRec.Bottom() += nParaStart;
+
+ Point aTopLeft( aTmpRec.TopLeft() );
+ Point aBottomRight( aTmpRec.BottomRight() );
+ aBottomRight.X() = pTmpPortion->GetXPos( pLine, nEndIndex );
+
+ // Nur Painten, wenn im sichtbaren Bereich...
+ if ( aTopLeft.Y() > aVisArea.Bottom() )
+ break;
+
+ if ( ( aTopLeft.X() != aBottomRight.X() ) && ( aBottomRight.Y() >= aVisArea.Top() ) )
+ {
+ Point aPnt1( GetWindowPos( aTopLeft ) );
+ Point aPnt2( GetWindowPos( aBottomRight ) );
+
+ if ( eSelectionMode == EE_SELMODE_STD )
+ {
+ // Bekannter Bug:
+ // Wenn in diesem Modus am Anfang einer nicht-ersten-Zeile
+ // in einem Absatz nach unten selektiert wird,
+ // findet FindLine die Zeile davor, lediglich der Cursor
+ // weiter unten angezeigt wird
+ // => rechter Rand der Selektion wird nicht richtig eingestellt!
+ if ( !( ( nPara == nStartPara ) && ( nLine == nStartLine ) ) )
+ aPnt1.X() = aTmpOutArea.Left();
+
+ if ( !( ( nPara == nEndPara ) && ( nLine == nEndLine ) ) )
+ aPnt2.X() = aTmpOutArea.Right()-1;
+ }
+
+ lcl_AllignToPixel( aPnt1, pOutWin, +1, 0 );
+ lcl_AllignToPixel( aPnt2, pOutWin, 0, ( bPixelMode ? 0 : -1 ) );
+
+ // Damit man selektierte leere Zeile erkennt, aber leider Paintprobleme
+// if ( pLine->IsEmpty() && ( aPnt2.X() <= aPnt1.X() ) )
+// aPnt2.X() = aPnt1.X() + 3*pEditEngine->pImpEditEngine->nOnePixelInRef;
+
+ Rectangle aRect( aPnt1, aPnt2 );
+ if ( pRegion )
+ {
+ Polygon aTmpPoly( 4 );
+ aTmpPoly[0] = aRect.TopLeft();
+ aTmpPoly[1] = aRect.TopRight();
+ aTmpPoly[2] = aRect.BottomRight();
+ aTmpPoly[3] = aRect.BottomLeft();
+ pPolyPoly->Insert( aTmpPoly );
+ }
+ else
+ {
+ if ( bInvertSelection )
+ pOutWin->InvertRect( aRect );
+ else
+ pOutWin->HighlightRect( aRect );
+ }
+ }
+ }
+ }
+
+ if ( pRegion )
+ {
+ *pRegion = Region( *pPolyPoly );
+ delete pPolyPoly;
+ }
+ else
+ {
+ if ( pOutWin->GetCursor() )
+ pOutWin->GetCursor()->Show();
+
+ if ( bClipRegion )
+ pOutWin->SetClipRegion( aOldRegion );
+ else
+ pOutWin->SetClipRegion();
+ }
+
+}
+
+Region* ImpEditView::CalcSelectedRegion()
+{
+ Region* pRegion = new Region;
+ DrawSelection( GetEditSelection(), pRegion );
+ return pRegion;
+}
+
+void ImpEditView::SetSelectionMode( EESelectionMode eNewMode )
+{
+ if ( eSelectionMode != eNewMode )
+ {
+ DrawSelection(); // 'Wegmalen' ...
+ eSelectionMode = eNewMode;
+ DrawSelection(); // und neu zeichnen.
+ }
+}
+
+void ImpEditView::SetOutputArea( const Rectangle& rRec )
+{
+ // sollte besser auf Pixel allignt sein!
+ Rectangle aNewRec( pOutWin->LogicToPixel( rRec ) );
+ aNewRec = pOutWin->PixelToLogic( aNewRec );
+ aOutArea = aNewRec;
+ if ( aOutArea.Right() < aOutArea.Left() )
+ aOutArea.Right() = aOutArea.Left();
+ if ( aOutArea.Bottom() < aOutArea.Top() )
+ aOutArea.Bottom() = aOutArea.Top();
+
+ // Groesse der VisArea anpassen:
+ aVisArea.SetSize( aOutArea.GetSize() );
+
+ if ( DoBigScroll() )
+ SetScrollDiffX( (sal_uInt16)aOutArea.GetWidth() * 3 / 10 );
+ else
+ SetScrollDiffX( (sal_uInt16)aOutArea.GetWidth() * 2 / 10 );
+}
+
+void ImpEditView::ResetOutputArea( const Rectangle& rRec )
+{
+ Rectangle aCurArea( aOutArea );
+ SetOutputArea( rRec );
+ // Umliegende Bereiche invalidieren, wenn UpdateMode der Engine auf sal_True
+ if ( !aCurArea.IsEmpty() && pEditEngine->pImpEditEngine->GetUpdateMode() )
+ {
+ long nMore = 0;
+ if ( DoInvalidateMore() )
+ nMore = GetWindow()->PixelToLogic( Size( nInvMore, 0 ) ).Width();
+ if ( aCurArea.Left() < aOutArea.Left() )
+ {
+ Rectangle aRect( aCurArea.TopLeft(),
+ Size( aOutArea.Left()-aCurArea.Left(), aCurArea.GetHeight() ) );
+ if ( nMore )
+ {
+ aRect.Left() -= nMore;
+ aRect.Top() -= nMore;
+ aRect.Bottom() += nMore;
+ }
+ GetWindow()->Invalidate( aRect );
+ }
+ if ( aCurArea.Right() > aOutArea.Right() )
+ {
+ long nW = aCurArea.Right() - aOutArea.Right();
+ Point aPos( aCurArea.TopRight() );
+ aPos.X() -= nW;
+ Rectangle aRect( aPos, Size( nW, aCurArea.GetHeight() ) );
+ if ( nMore )
+ {
+ aRect.Right() += nMore;
+ aRect.Top() -= nMore;
+ aRect.Bottom() += nMore;
+ }
+ GetWindow()->Invalidate( aRect );
+ }
+ if ( aCurArea.Top() < aOutArea.Top() )
+ {
+ Rectangle aRect( aCurArea.TopLeft(), Size( aCurArea.GetWidth(), aOutArea.Top() - aCurArea.Top() ) );
+ if ( nMore )
+ {
+ aRect.Top() -= nMore;
+ aRect.Left() -= nMore;
+ aRect.Right() += nMore;
+ }
+ GetWindow()->Invalidate( aRect );
+ }
+ if ( aCurArea.Bottom() > aOutArea.Bottom() )
+ {
+ long nH = aCurArea.Bottom() - aOutArea.Bottom();
+ Point aPos( aCurArea.BottomLeft() );
+ aPos.Y() -= nH;
+ Rectangle aRect( aPos, Size( aCurArea.GetWidth(), nH ) );
+ if ( nMore )
+ {
+ aRect.Bottom() += nMore;
+ aRect.Left() -= nMore;
+ aRect.Right() += nMore;
+ }
+
+ GetWindow()->Invalidate( aRect );
+ }
+ }
+}
+
+void ImpEditView::SetVisArea( const Rectangle& rRec )
+{
+ // VisArea nicht auf Pixel align, da rel. zur OutputArea.
+ // Sonst wird z.B. auf TopLeft = (0,0) ein (23,23)...
+ // Rectangle aNewRec( pOutWin->LogicToPixel( rRec ) );
+ // aNewRec = pOutWin->PixelToLogic( aNewRec );
+ // aVisArea = aNewRec;
+
+ aVisArea = rRec;
+ if ( aVisArea.Right() < aVisArea.Left() )
+ aVisArea.Right() = aVisArea.Left();
+ if ( aVisArea.Bottom() < aVisArea.Top() )
+ aVisArea.Bottom() = aVisArea.Top();
+
+ // Groesse der OutputArea anpassen:
+ if ( aOutArea.GetSize() != aVisArea.GetSize() )
+ {
+ Rectangle aOutputRec( aOutArea );
+ aOutputRec.SetSize( aVisArea.GetSize() );
+ SetOutputArea( aOutputRec );
+ }
+}
+
+void ImpEditView::RecalcOutputArea()
+{
+ Rectangle aOldArea( aOutArea );
+ Point aNewTopLeft( aOutArea.TopLeft() );
+ Size aNewSz( aOutArea.GetSize() );
+
+ // X:
+ if ( DoAutoWidth() )
+ {
+ if ( pEditEngine->pImpEditEngine->GetStatus().AutoPageWidth() )
+ aNewSz.Width() = pEditEngine->pImpEditEngine->GetPaperSize().Width();
+ switch ( eAnchorMode )
+ {
+ case ANCHOR_TOP_LEFT:
+ case ANCHOR_VCENTER_LEFT:
+ case ANCHOR_BOTTOM_LEFT:
+ {
+ aNewTopLeft.X() = aAnchorPoint.X();
+ }
+ break;
+ case ANCHOR_TOP_HCENTER:
+ case ANCHOR_VCENTER_HCENTER:
+ case ANCHOR_BOTTOM_HCENTER:
+ {
+ aNewTopLeft.X() = aAnchorPoint.X() - aNewSz.Width() / 2;
+ }
+ break;
+ case ANCHOR_TOP_RIGHT:
+ case ANCHOR_VCENTER_RIGHT:
+ case ANCHOR_BOTTOM_RIGHT:
+ {
+ aNewTopLeft.X() = aAnchorPoint.X() - aNewSz.Width() - 1;
+ }
+ break;
+ }
+ }
+
+ // Y:
+ if ( DoAutoHeight() )
+ {
+ if ( pEditEngine->pImpEditEngine->GetStatus().AutoPageHeight() )
+ aNewSz.Height() = pEditEngine->pImpEditEngine->GetPaperSize().Height();
+ switch ( eAnchorMode )
+ {
+ case ANCHOR_TOP_LEFT:
+ case ANCHOR_TOP_HCENTER:
+ case ANCHOR_TOP_RIGHT:
+ {
+ aNewTopLeft.Y() = aAnchorPoint.Y();
+ }
+ break;
+ case ANCHOR_VCENTER_LEFT:
+ case ANCHOR_VCENTER_HCENTER:
+ case ANCHOR_VCENTER_RIGHT:
+ {
+ aNewTopLeft.Y() = aAnchorPoint.Y() - aNewSz.Height() / 2;
+ }
+ break;
+ case ANCHOR_BOTTOM_LEFT:
+ case ANCHOR_BOTTOM_HCENTER:
+ case ANCHOR_BOTTOM_RIGHT:
+ {
+ aNewTopLeft.Y() = aAnchorPoint.Y() - aNewSz.Height() - 1;
+ }
+ break;
+ }
+ }
+ ResetOutputArea( Rectangle( aNewTopLeft, aNewSz ) );
+}
+
+void ImpEditView::SetAnchorMode( EVAnchorMode eMode )
+{
+ eAnchorMode = eMode;
+ CalcAnchorPoint();
+}
+
+void ImpEditView::CalcAnchorPoint()
+{
+ // GetHeight() und GetWidth() -1, da Rectangle-Berechnung nicht erwuenscht.
+
+ // X:
+ switch ( eAnchorMode )
+ {
+ case ANCHOR_TOP_LEFT:
+ case ANCHOR_VCENTER_LEFT:
+ case ANCHOR_BOTTOM_LEFT:
+ {
+ aAnchorPoint.X() = aOutArea.Left();
+ }
+ break;
+ case ANCHOR_TOP_HCENTER:
+ case ANCHOR_VCENTER_HCENTER:
+ case ANCHOR_BOTTOM_HCENTER:
+ {
+ aAnchorPoint.X() = aOutArea.Left() + (aOutArea.GetWidth()-1) / 2;
+ }
+ break;
+ case ANCHOR_TOP_RIGHT:
+ case ANCHOR_VCENTER_RIGHT:
+ case ANCHOR_BOTTOM_RIGHT:
+ {
+ aAnchorPoint.X() = aOutArea.Right();
+ }
+ break;
+ }
+
+ // Y:
+ switch ( eAnchorMode )
+ {
+ case ANCHOR_TOP_LEFT:
+ case ANCHOR_TOP_HCENTER:
+ case ANCHOR_TOP_RIGHT:
+ {
+ aAnchorPoint.Y() = aOutArea.Top();
+ }
+ break;
+ case ANCHOR_VCENTER_LEFT:
+ case ANCHOR_VCENTER_HCENTER:
+ case ANCHOR_VCENTER_RIGHT:
+ {
+ aAnchorPoint.Y() = aOutArea.Top() + (aOutArea.GetHeight()-1) / 2;
+ }
+ break;
+ case ANCHOR_BOTTOM_LEFT:
+ case ANCHOR_BOTTOM_HCENTER:
+ case ANCHOR_BOTTOM_RIGHT:
+ {
+ aAnchorPoint.Y() = aOutArea.Bottom() - 1;
+ }
+ break;
+ }
+}
+
+void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool bSpecial )
+{
+ // Kein ShowCursor bei einer leeren View...
+ if ( ( aOutArea.Left() >= aOutArea.Right() ) && ( aOutArea.Top() >= aOutArea.Bottom() ) )
+ return;
+
+ pEditEngine->pImpEditEngine->CheckIdleFormatter();
+ if ( !pEditEngine->pImpEditEngine->IsFormatted() )
+ pEditEngine->pImpEditEngine->FormatDoc();
+
+ // Aus irgendwelchen Gruenden lande ich waehrend der Formatierung hier,
+ // wenn sich der Outiner im Paint initialisiert, weil kein SetPool();
+ if ( pEditEngine->pImpEditEngine->IsFormatting() )
+ return;
+ if ( pEditEngine->pImpEditEngine->GetUpdateMode() == sal_False )
+ return;
+ if ( pEditEngine->pImpEditEngine->IsInUndo() )
+ return;
+
+ if ( pOutWin->GetCursor() != GetCursor() )
+ pOutWin->SetCursor( GetCursor() );
+
+ sal_uInt16 nFlags = GETCRSR_TXTONLY;
+ if ( bSpecial )
+ nFlags |= GETCRSR_ENDOFLINE;
+
+ EditPaM aPaM( aEditSelection.Max() );
+ Rectangle aEditCursor = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, nFlags );
+ if ( !IsInsertMode() && !aEditSelection.HasRange() )
+ {
+ // Bei Overwrite die Breite korrigieren
+ // Umstellen auf TextArray !!!
+ // MT 12.12.98: Einfach mal aEditCursor.Right() = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM+1, sal_False ), aber nur wenn nicht Zeilenende
+ if ( aPaM.GetNode()->Len() && ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) )
+ {
+ SvxFont aFont;
+ pEditEngine->pImpEditEngine->SeekCursor( aPaM.GetNode(), aPaM.GetIndex()+1, aFont );
+ Font aOldFont( pOutWin->GetFont() );
+ aFont.SetPhysFont( pOutWin );
+ aEditCursor.Right() += aFont.GetPhysTxtSize( pOutWin, *aPaM.GetNode(), aPaM.GetIndex(), 1 ).Width();
+ if ( pEditEngine->pImpEditEngine->GetStatus().DoRestoreFont() )
+ pOutWin->SetFont( aOldFont );
+ }
+ }
+ if ( aEditCursor.GetHeight() > aOutArea.GetHeight() )
+ {
+ aEditCursor.Bottom() = aEditCursor.Top() + aOutArea.GetHeight() - 1;
+ }
+ if ( bGotoCursor ) // && (!pEditEngine->pImpEditEngine->GetStatus().AutoPageSize() ) )
+ {
+ // pruefen, ob scrollen notwendig...
+ // wenn scrollen, dann Update() und Scroll() !
+ long nDiffX = 0;
+ long nDiffY = 0;
+
+ Rectangle aTmpVisArea( aVisArea );
+ // aTmpOutArea: Falls OutputArea > Papierbreite und
+ // Text > Papierbreite ( uebergrosse Felder )
+ if ( aTmpVisArea.GetWidth() > pEditEngine->pImpEditEngine->GetPaperSize().Width() )
+ aTmpVisArea.Right() = aTmpVisArea.Left() + pEditEngine->pImpEditEngine->GetPaperSize().Width();
+
+ if ( aEditCursor.Bottom() > aTmpVisArea.Bottom() )
+ { // hochscrollen, hier positiv
+ nDiffY = aEditCursor.Bottom() - aTmpVisArea.Bottom();
+ }
+ else if ( aEditCursor.Top() < aTmpVisArea.Top() )
+ { // runterscrollen, negativ
+ nDiffY = aEditCursor.Top() - aTmpVisArea.Top();
+ }
+
+ if ( aEditCursor.Right() > aTmpVisArea.Right() )
+ {
+ // linksscrollen, positiv
+ nDiffX = aEditCursor.Right() - aTmpVisArea.Right();
+ // Darfs ein bischen mehr sein?
+ if ( aEditCursor.Right() < ( pEditEngine->GetPaperSize().Width() - GetScrollDiffX() ) )
+ nDiffX += GetScrollDiffX();
+ else
+ {
+ long n = pEditEngine->GetPaperSize().Width() - aEditCursor.Right();
+ // Bei einem MapMode != RefMapMode kann der EditCursor auch mal ueber
+ // die Papierbreite Wandern!
+ nDiffX += ( n > 0 ? n : -n );
+ }
+ }
+ else if ( aEditCursor.Left() < aTmpVisArea.Left() )
+ { // rechtsscrollen
+ // negativ:
+ nDiffX = aEditCursor.Left() - aTmpVisArea.Left();
+ // Darfs ein bischen mehr sein?
+ if ( aEditCursor.Left() > ( - (long)GetScrollDiffX() ) )
+ nDiffX -= GetScrollDiffX();
+ else
+ nDiffX -= aEditCursor.Left();
+ }
+ if ( aPaM.GetIndex() == 0 ) // braucht Olli fuer den Outliner
+ {
+ // Aber sicherstellen, dass dadurch der Cursor nicht den
+ // sichtbaren bereich verlaesst!
+ if ( aEditCursor.Left() < aTmpVisArea.GetWidth() )
+ {
+ nDiffX = -aTmpVisArea.Left();
+ }
+ }
+
+ if ( nDiffX | nDiffY )
+ {
+ // Negativ: Zum Anfang bzw. linken Rand
+ if ( ( Abs( nDiffY ) > pEditEngine->pImpEditEngine->nOnePixelInRef ) && DoBigScroll() )
+ {
+ long nH = aOutArea.GetHeight() / 4;
+ if ( ( nH > aEditCursor.GetHeight() ) && ( Abs( nDiffY ) < nH ) )
+ {
+ if ( nDiffY < 0 )
+ nDiffY -= nH;
+ else
+ nDiffY += nH;
+ }
+ }
+
+ if ( ( Abs( nDiffX ) > pEditEngine->pImpEditEngine->nOnePixelInRef ) && DoBigScroll() )
+ {
+ long nW = aOutArea.GetWidth() / 4;
+ if ( Abs( nDiffX ) < nW )
+ {
+ if ( nDiffY < 0 )
+ nDiffY -= nW;
+ else
+ nDiffY += nW;
+ }
+ }
+
+ if ( nDiffX )
+ pEditEngine->pImpEditEngine->aStatus.GetStatusWord() = pEditEngine->pImpEditEngine->aStatus.GetStatusWord() | EE_STAT_HSCROLL;
+ if ( nDiffY )
+ pEditEngine->pImpEditEngine->aStatus.GetStatusWord() = pEditEngine->pImpEditEngine->aStatus.GetStatusWord() | EE_STAT_VSCROLL;
+ Scroll( -nDiffX, -nDiffY );
+ pEditEngine->pImpEditEngine->DelayedCallStatusHdl();
+ }
+ }
+
+ // Cursor evtl. etwas stutzen...
+ if ( ( aEditCursor.Bottom() > aVisArea.Top() ) &&
+ ( aEditCursor.Top() < aVisArea.Bottom() ) )
+ {
+ if ( aEditCursor.Bottom() > aVisArea.Bottom() )
+ aEditCursor.Bottom() = aVisArea.Bottom();
+ if ( aEditCursor.Top() < aVisArea.Top() )
+ aEditCursor.Top() = aVisArea.Top();
+ }
+
+ long nOnePixel = pOutWin->PixelToLogic( Size( 1, 0 ) ).Width();
+
+ if ( /* pEditEngine->pImpEditEngine->GetStatus().AutoPageSize() || */
+ ( ( aEditCursor.Top() + nOnePixel >= aVisArea.Top() ) &&
+ ( aEditCursor.Bottom() - nOnePixel <= aVisArea.Bottom() ) &&
+ ( aEditCursor.Left() + nOnePixel >= aVisArea.Left() ) &&
+ ( aEditCursor.Right() - nOnePixel <= aVisArea.Right() ) ) )
+ {
+ Point aPoint( GetWindowPos( aEditCursor.TopLeft() ) );
+ GetCursor()->SetPos( aPoint );
+ GetCursor()->SetSize( aEditCursor.GetSize() );
+ if ( bForceVisCursor )
+ GetCursor()->Show();
+
+ if ( !pEditEngine->pImpEditEngine->mpIMEInfos )
+ {
+ SvxFont aFont;
+ sal_uInt16 nPos = aPaM.GetIndex();
+ if ( nPos < aPaM.GetNode()->Len() )
+ nPos++; // Zeichen danach...
+ pEditEngine->pImpEditEngine->SeekCursor( aPaM.GetNode(), nPos, aFont );
+ GetWindow()->SetInputContext( InputContext( aFont, sal_True ) );
+ }
+ }
+ else
+ {
+ pEditEngine->pImpEditEngine->GetStatus().GetStatusWord() = pEditEngine->pImpEditEngine->GetStatus().GetStatusWord() | EE_STAT_CURSOROUT;
+ GetCursor()->Hide();
+ GetCursor()->SetPos( Point( -1, -1 ) );
+ GetCursor()->SetSize( Size( 0, 0 ) );
+ }
+}
+
+Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck )
+{
+ DBG_ASSERT( pEditEngine->pImpEditEngine->IsFormatted(), "Scroll: Nicht formatiert!" );
+ if ( !ndX && !ndY )
+ return Range( 0, 0 );
+
+#ifdef DBG_UTIL
+ Rectangle aR( aOutArea );
+ aR = pOutWin->LogicToPixel( aR );
+ aR = pOutWin->PixelToLogic( aR );
+ DBG_ASSERT( aR == aOutArea, "OutArea vor Scroll nicht aligned" );
+#endif
+
+ Rectangle aNewVisArea( aVisArea );
+ Size aPaperSz( pEditEngine->pImpEditEngine->GetPaperSize() );
+
+ // Vertical:
+ aNewVisArea.Top() -= ndY;
+ aNewVisArea.Bottom() -= ndY;
+ if ( ( nRangeCheck == RGCHK_PAPERSZ1 ) && ( aNewVisArea.Bottom() > (long)pEditEngine->pImpEditEngine->GetTextHeight() ) )
+ {
+ // GetTextHeight noch optimieren!
+ long nDiff = pEditEngine->pImpEditEngine->GetTextHeight() - aNewVisArea.Bottom(); // negativ
+ aNewVisArea.Move( 0, nDiff ); // koennte im neg. Bereich landen...
+ }
+ if ( ( aNewVisArea.Top() < 0 ) && ( nRangeCheck != RGCHK_NONE ) )
+ aNewVisArea.Move( 0, -aNewVisArea.Top() );
+
+ // Horizontal:
+ aNewVisArea.Left() -= ndX;
+ aNewVisArea.Right() -= ndX;
+ if ( ( nRangeCheck == RGCHK_PAPERSZ1 ) && ( aNewVisArea.Right() > aPaperSz.Width() ) )
+ {
+ long nDiff = aPaperSz.Width() - aNewVisArea.Right(); // negativ
+ aNewVisArea.Move( nDiff, 0 ); // koennte im neg. Bereich landen...
+ }
+ if ( ( aNewVisArea.Left() < 0 ) && ( nRangeCheck != RGCHK_NONE ) )
+ aNewVisArea.Move( -aNewVisArea.Left(), 0 );
+
+ // Die Differenz muss auf Pixel alignt sein (wegen Scroll!)
+ Rectangle aOldVisArea( aVisArea );
+ long nDiffX = aOldVisArea.Left() - aNewVisArea.Left();
+ long nDiffY = aOldVisArea.Top() - aNewVisArea.Top();
+
+ Size aDiffs( nDiffX, nDiffY );
+ aDiffs = pOutWin->LogicToPixel( aDiffs );
+ aDiffs = pOutWin->PixelToLogic( aDiffs );
+
+ long nRealDiffX = aDiffs.Width();
+ long nRealDiffY = aDiffs.Height();
+
+
+ if ( nRealDiffX || nRealDiffY )
+ {
+ Cursor* pCrsr = GetCursor();
+ sal_Bool bVisCursor = pCrsr->IsVisible();
+ pCrsr->Hide();
+ pOutWin->Update();
+ aVisArea.Move( -nRealDiffX, -nRealDiffY );
+ // Das Move um den allignten Wert ergibt nicht unbedingt ein
+ // alligntes Rechteck...
+ aVisArea = pOutWin->LogicToPixel( aVisArea );
+ aVisArea = pOutWin->PixelToLogic( aVisArea );
+ Rectangle aRec( aOutArea );
+ pOutWin->Scroll( nRealDiffX, nRealDiffY, aRec, sal_True );
+ pOutWin->Update();
+ pCrsr->SetPos( pCrsr->GetPos() + Point( nRealDiffX, nRealDiffY ) );
+ if ( bVisCursor )
+ {
+ Rectangle aCursorRec( pCrsr->GetPos(), pCrsr->GetSize() );
+ if ( aOutArea.IsInside( aCursorRec ) )
+ pCrsr->Show();
+ }
+ }
+
+ return Pair( nRealDiffX, nRealDiffY );
+}
+
+void ImpEditView::SetInsertMode( sal_Bool bInsert )
+{
+ SetFlags( nControl, EV_CNTRL_OVERWRITE, !bInsert );
+ ShowCursor( DoAutoScroll(), sal_False );
+}
+
+sal_Bool ImpEditView::IsWrongSpelledWord( const EditPaM& rPaM, sal_Bool bMarkIfWrong )
+{
+ sal_Bool bIsWrong = sal_False;
+#ifndef SVX_LIGHT
+ if ( rPaM.GetNode()->GetWrongList() )
+ {
+ EditSelection aSel = pEditEngine->pImpEditEngine->SelectWord( rPaM );
+ bIsWrong = rPaM.GetNode()->GetWrongList()->HasWrong( aSel.Min().GetIndex(), aSel.Max().GetIndex() );
+ if ( bIsWrong && bMarkIfWrong )
+ {
+ DrawSelection(); // alte Selektion 'weg-zeichnen'
+ SetEditSelection( aSel );
+ DrawSelection();
+ }
+ }
+#endif // !SVX_LIGHT
+ return bIsWrong;
+}
+
+String ImpEditView::SpellIgnoreOrAddWord( sal_Bool bAdd )
+{
+ String aWord;
+#ifndef SVX_LIGHT
+ if ( pEditEngine->pImpEditEngine->GetSpeller().is() )
+ {
+ EditPaM aPaM = GetEditSelection().Max();
+ if ( !HasSelection() )
+ {
+ EditSelection aSel = pEditEngine->pImpEditEngine->SelectWord( aPaM );
+ aWord = pEditEngine->pImpEditEngine->GetSelected( aSel );
+ }
+ else
+ {
+ aWord = pEditEngine->pImpEditEngine->GetSelected( GetEditSelection() );
+ // Und deselektieren
+ DrawSelection(); // alte Selektion 'weg-zeichnen'
+ SetEditSelection( EditSelection( aPaM, aPaM ) );
+ DrawSelection();
+ }
+
+ if ( aWord.Len() )
+ {
+ if ( bAdd )
+ {
+ DBG_ERROR( "Sorry, AddWord not implemented" );
+ }
+ else // Ignore
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionary1 > xDic( SvxGetIgnoreAllList(), ::com::sun::star::uno::UNO_QUERY );
+ if (xDic.is())
+ xDic->add( aWord, sal_False, String(), LANGUAGE_NONE );
+ }
+ const EditDoc& rDoc = pEditEngine->pImpEditEngine->GetEditDoc();
+ sal_uInt16 nNodes = rDoc.Count();
+ for ( sal_uInt16 n = 0; n < nNodes; n++ )
+ {
+ ContentNode* pNode = rDoc.GetObject( n );
+ pNode->GetWrongList()->MarkWrongsInvalid();
+ }
+ pEditEngine->pImpEditEngine->DoOnlineSpelling( aPaM.GetNode() );
+ pEditEngine->pImpEditEngine->StartOnlineSpellTimer();
+ }
+ }
+#endif // !SVX_LIGHT
+ return aWord;
+}
+
diff --git a/svx/source/editeng/impedit.hxx b/svx/source/editeng/impedit.hxx
new file mode 100644
index 0000000000..6ae60e5691
--- /dev/null
+++ b/svx/source/editeng/impedit.hxx
@@ -0,0 +1,1004 @@
+/*************************************************************************
+ *
+ * $RCSfile: impedit.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _IMPEDIT_HXX
+#define _IMPEDIT_HXX
+
+#include <editdoc.hxx>
+#include <editsel.hxx>
+#include <editundo.hxx>
+#include <editobj2.hxx>
+#include <editstt2.hxx>
+#include <editdata.hxx>
+#include <svxacorr.hxx>
+
+#ifndef _SV_VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _SV_CURSOR_HXX //autogen
+#include <vcl/cursor.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_LINGUISTIC_XHYPHENATOR_HPP_
+#include <com/sun/star/linguistic/XHyphenator.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
+#include <com/sun/star/lang/Locale.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XBREAKITERATOR_HPP_
+#include <com/sun/star/text/XBreakIterator.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_WORDTYPE_HPP_
+#include <com/sun/star/text/WordType.hpp>
+#endif
+
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+DBG_NAMEEX( EditView );
+DBG_NAMEEX( EditEngine );
+
+#define PIMPEE pImpEditView->pEditEngine->pImpEditEngine
+
+#define DEL_LEFT 1
+#define DEL_RIGHT 2
+#define TRAVEL_X_DONTKNOW 0xFFFFFFFF
+#define MAXCHARSINPARA 0x3FFF-CHARPOSGROW // Max 16K, because WYSIWYG array
+
+#define ATTRSPECIAL_WHOLEWORD 1
+#define ATTRSPECIAL_EDGE 2
+
+#define GETCRSR_ENDOFLINE 0x0001
+#define GETCRSR_TXTONLY 0x0002
+
+class EditView;
+class EditEngine;
+class SvxFontTable;
+class SvxColorList;
+
+class SvxSearchItem;
+class SvxLRSpaceItem;
+class TextRanger;
+class SvKeyValueIterator;
+
+enum ExchangeType { EXCHANGE_CLIPBOARD, EXCHANGE_DRAGSERVER };
+
+struct DragAndDropInfo
+{
+ Rectangle aCurCursor;
+ Rectangle aCurSavedCursor;
+ sal_uInt16 nSensibleRange;
+ sal_uInt16 nCursorWidth;
+ EditPaM aDropDest;
+ ESelection aDropSel;
+ VirtualDevice aBackground;
+ const SvxFieldItem* pField;
+ sal_Bool bVisCursor : 1;
+ sal_Bool bDroppedInMe : 1;
+ sal_Bool bStarterOfDD : 1;
+
+ DragAndDropInfo( const OutputDevice& rOutDev4VirtDev) :
+ aBackground( rOutDev4VirtDev ) {
+ bVisCursor = sal_False; bDroppedInMe = sal_False; bStarterOfDD = sal_False;
+ nSensibleRange = 0; nCursorWidth = 0; pField = 0;
+ }
+};
+
+struct ImplIMEInfos
+{
+ sal_uInt16* pAttribs;
+ EditPaM aPos;
+ sal_uInt16 nLen;
+ sal_Bool bCursor;
+
+ ImplIMEInfos( const EditPaM& rPos );
+ ~ImplIMEInfos();
+
+ void CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL );
+ void DestroyAttribs();
+};
+
+struct SpellInfo
+{
+ EESpellState eState;
+ EPaM aSpellStart;
+ EPaM aSpellTo;
+ sal_Bool bSpellToEnd;
+ sal_Bool bMultipleDoc;
+
+ SpellInfo()
+ { bSpellToEnd = sal_True; eState = EE_SPELL_OK; bMultipleDoc = sal_False; }
+};
+
+struct FormatterFontMetric
+{
+ sal_uInt16 nMaxAscent;
+ sal_uInt16 nMaxDescent;
+
+ FormatterFontMetric() { nMaxAscent = 0; nMaxDescent = 0; /* nMinLeading = 0xFFFF; */ }
+ sal_uInt16 GetHeight() const { return nMaxAscent+nMaxDescent; }
+};
+
+class IdleFormattter : public Timer
+{
+private:
+ EditView* pView;
+ int nRestarts;
+
+public:
+ IdleFormattter();
+ ~IdleFormattter();
+
+ void DoIdleFormat( EditView* pV );
+ void ForceTimeout();
+ void ResetRestarts() { nRestarts = 0; }
+ EditView* GetView() { return pView; }
+};
+
+ // ----------------------------------------------------------------------
+// class ImpEditView
+// ----------------------------------------------------------------------
+class ImpEditView
+{
+ friend class EditView;
+ friend class EditEngine;
+ friend class ImpEditEngine;
+
+private:
+ Cursor* pCursor;
+ Color* pBackgroundColor;
+ EditEngine* pEditEngine;
+ Window* pOutWin;
+ Pointer* pPointer;
+
+ sal_uInt32 nControl;
+ sal_uInt32 nTravelXPos;
+ long nInvMore;
+ sal_uInt16 nScrollDiffX;
+ sal_Bool bReadOnly;
+
+ Point aAnchorPoint;
+ Rectangle aOutArea;
+ Rectangle aVisArea;
+ EESelectionMode eSelectionMode;
+ EditSelection aEditSelection;
+ EVAnchorMode eAnchorMode;
+
+public:
+ ImpEditView( EditEngine* pEng, Window* pWindow );
+ ~ImpEditView();
+
+ sal_uInt16 GetScrollDiffX() const { return nScrollDiffX; }
+ void SetScrollDiffX( sal_uInt16 n ) { nScrollDiffX = n; }
+
+ inline Point GetDocPos( const Point& rWindowPos ) const;
+ inline Point GetWindowPos( const Point& rDocPos ) const;
+ inline Rectangle GetWindowPos( const Rectangle& rDocPos ) const;
+
+ void SetOutputArea( const Rectangle& rRec );
+ void ResetOutputArea( const Rectangle& rRec );
+ const Rectangle& GetOutputArea() const { return aOutArea; }
+
+ void SetVisArea( const Rectangle& rRec );
+ const Rectangle& GetVisArea() const { return aVisArea; }
+
+ EditSelection& GetEditSelection() { return aEditSelection; }
+ void SetEditSelection( const EditSelection& rEditSelection )
+ { aEditSelection = rEditSelection; }
+ sal_Bool HasSelection() const { return aEditSelection.HasRange(); }
+
+ void DrawSelection() { DrawSelection( aEditSelection ); }
+ void DrawSelection( EditSelection, Region* pRegion = NULL );
+ Region* CalcSelectedRegion();
+
+ Window* GetWindow() const { return pOutWin; }
+
+ EESelectionMode GetSelectionMode() const { return eSelectionMode; }
+ void SetSelectionMode( EESelectionMode eMode );
+
+ inline void SetPointer( const Pointer& rPointer );
+ inline const Pointer& GetPointer();
+
+ inline void SetCursor( const Cursor& rCursor );
+ inline Cursor* GetCursor();
+
+ void SetAnchorMode( EVAnchorMode eMode );
+ EVAnchorMode GetAnchorMode() const { return eAnchorMode; }
+ void CalcAnchorPoint();
+ void RecalcOutputArea();
+
+ void ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool bSpecial = sal_False );
+ Pair Scroll( long ndX, long ndY, BYTE nRangeCheck = RGCHK_NEG );
+
+ void SetInsertMode( sal_Bool bInsert );
+ sal_Bool IsInsertMode() const { return ( ( nControl & EV_CNTRL_OVERWRITE ) == 0 ); }
+
+ void EnablePaste( sal_Bool bEnable ) { SetFlags( nControl, EV_CNTRL_ENABLEPASTE, bEnable ); }
+ sal_Bool IsPasteEnabled() const { return ( ( nControl & EV_CNTRL_ENABLEPASTE ) != 0 ); }
+
+ sal_Bool DoSingleLinePaste() const { return ( ( nControl & EV_CNTRL_SINGLELINEPASTE ) != 0 ); }
+ sal_Bool DoAutoScroll() const { return ( ( nControl & EV_CNTRL_AUTOSCROLL ) != 0 ); }
+ sal_Bool DoBigScroll() const { return ( ( nControl & EV_CNTRL_BIGSCROLL ) != 0 ); }
+ sal_Bool DoAutoSize() const { return ( ( nControl & EV_CNTRL_AUTOSIZE ) != 0 ); }
+ sal_Bool DoAutoWidth() const { return ( ( nControl & EV_CNTRL_AUTOSIZEX) != 0 ); }
+ sal_Bool DoAutoHeight() const { return ( ( nControl & EV_CNTRL_AUTOSIZEY) != 0 ); }
+ sal_Bool DoInvalidateMore() const { return ( ( nControl & EV_CNTRL_INVONEMORE ) != 0 ); }
+
+ void SetBackgroundColor( const Color& rColor );
+ const Color& GetBackgroundColor() const {
+ return ( pBackgroundColor ? *pBackgroundColor : pOutWin->GetBackground().GetColor() ); }
+
+ sal_Bool IsWrongSpelledWord( const EditPaM& rPaM, sal_Bool bMarkIfWrong );
+ String SpellIgnoreOrAddWord( sal_Bool bAdd );
+
+ // Ggf. mehr als OutputArea invalidieren, fuer den DrawingEngine-Textrahmen...
+ void SetInvalidateMore( sal_uInt16 nPixel ) { nInvMore = nPixel; }
+ sal_uInt16 GetInvalidateMore() const { return (sal_uInt16)nInvMore; }
+};
+
+ // ----------------------------------------------------------------------
+// ImpEditEngine
+// ----------------------------------------------------------------------
+
+typedef EditView* EditViewPtr;
+SV_DECL_PTRARR( EditViews, EditViewPtr, 0, 1 );
+
+class ImpEditEngine : public SfxListener
+{
+ // Die Undos muessen direkt manipulieren ( private-Methoden ),
+ // damit keine neues Undos eingefuegt werden!
+ friend class EditUndoInsertChars;
+ friend class EditUndoRemoveChars;
+ friend class EditUndoDelContent;
+ friend class EditUndoConnectParas;
+ friend class EditUndoSplitPara;
+ friend class EditUndoInsertFeature;
+ friend class EditUndoMoveParagraphs;
+
+ friend class EditView;
+ friend class ImpEditView;
+ friend class EditEngine; // Fuer Zugriff auf Imp-Methoden
+ friend class EditRTFParser; // Fuer Zugriff auf Imp-Methoden
+ friend class EditHTMLParser; // Fuer Zugriff auf Imp-Methoden
+ friend class EdtAutoCorrDoc; // Fuer Zugriff auf Imp-Methoden
+ friend class EditDbg; // DebugRoutinen
+
+private:
+
+ // ================================================================
+ // Daten...
+ // ================================================================
+
+ // Dokument-Spezifische Daten...
+ ParaPortionList aParaPortionList; // Formatierung
+ Size aPaperSize; // Layout
+ Size aMinAutoPaperSize; // Layout ?
+ Size aMaxAutoPaperSize; // Layout ?
+ EditDoc aEditDoc; // Dokumenteninhalt
+
+ // Engine-Spezifische Daten....
+ EditEngine* pEditEngine;
+ EditViews aEditViews;
+ EditView* pActiveView;
+ TextRanger* pTextRanger;
+
+ SfxStyleSheetPool* pStylePool;
+ SfxItemPool* pTextObjectPool;
+
+ VirtualDevice* pVirtDev;
+ OutputDevice* pRefDev;
+
+ DragAndDropInfo* pDragAndDropInfo;
+ SfxItemSet* pEmptyItemSet;
+ EditUndoManager* pUndoManager;
+ ESelection* pUndoMarkSelection;
+
+ ImplIMEInfos* mpIMEInfos;
+
+ XubString aWordDelimiters;
+ XubString aGroupChars;
+
+ EditSelFunctionSet aSelFuncSet;
+ EditSelectionEngine aSelEngine;
+
+ sal_uInt16 nStretchX;
+ sal_uInt16 nStretchY;
+
+ sal_uInt16 nBigTextObjectStart;
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellChecker1 > xSpeller;
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XHyphenator > xHyphenator;
+ SpellInfo* pSpellInfo;
+ LanguageType eDefaultLanguage; // aktuelle Sprache (des Wortes) wird immer
+ // zusammen mit dem Wort fuer die neuen
+ // Lingu Interfaces benoetigt.
+ ::com::sun::star::lang::Locale aDefaultLocale;
+ ::com::sun::star::uno::Reference < ::com::sun::star::text::XBreakIterator > xBI;
+
+ XubString aAutoCompleteText;
+
+ InternalEditStatus aStatus;
+
+ sal_Bool bIsFormatting : 1; // Semaphore wegen der Hook's
+ sal_Bool bFormatted : 1;
+ sal_Bool bInSelection : 1;
+ sal_Bool bIsInUndo : 1;
+ sal_Bool bUpdate : 1;
+ sal_Bool bUndoEnabled : 1;
+ sal_Bool bOwnerOfRefDev : 1;
+ sal_Bool bDowning : 1;
+ sal_Bool bCallParaInsertedOrDeleted : 1;
+
+ // Fuer Formatierung / Update....
+ DeletedNodesList aDeletedNodes;
+ Rectangle aInvalidRec;
+ sal_uInt32 nCurTextHeight;
+ sal_uInt16 nOnePixelInRef;
+
+ IdleFormattter aIdleFormatter;
+
+ Timer aOnlineSpellTimer;
+
+ sal_Bool* pDestroyedMarker;
+
+ // Wenn an einer Stelle erkannt wird, dass der StatusHdl gerufen werden
+ // muss, dies aber nicht sofort geschehen darf (kritischer Abschnitt):
+ Timer aStatusTimer;
+ Link aStatusHdlLink;
+ Link aImportHdl;
+
+
+ // ================================================================
+ // Methoden...
+ // ================================================================
+
+ void CursorMoved( ContentNode* pPrevNode );
+ void ParaAttribsChanged( ContentNode* pNode );
+ inline void TextModified();
+ void CalcHeight( ParaPortion* pPortion );
+
+ // ggf. lieber inline, aber so einiges...
+ void InsertUndo( EditUndo* pUndo, sal_Bool bTryMerge = sal_False );
+ void ResetUndoManager();
+ sal_Bool HasUndoManager() const { return pUndoManager ? sal_True : sal_False; }
+
+ EditUndoSetAttribs* CreateAttribUndo( EditSelection aSel, const SfxItemSet& rSet );
+
+ EditPaM GetPaM( Point aDocPos, sal_Bool bSmart = sal_True );
+ EditPaM GetPaM( ParaPortion* pPortion, Point aPos, sal_Bool bSmart = sal_True );
+ Range GetInvalidYOffsets( ParaPortion* pPortion );
+
+ void SetParaAttrib( BYTE nFunc, EditSelection aSel, sal_uInt16 nValue );
+ sal_uInt16 GetParaAttrib( BYTE nFunc, EditSelection aSel );
+ void SetCharAttrib( EditSelection aSel, const SfxPoolItem& rItem );
+ void ParaAttribsToCharAttribs( ContentNode* pNode );
+ void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const;
+
+ EditTextObject* CreateBinTextObject( EditSelection aSelection, sal_Bool bAllowBigObjects = sal_False, sal_uInt16 nBigObjStart = 0 ) const;
+ void StoreBinTextObject( SvStream& rOStream, BinTextObject& rTextObject );
+ EditSelection InsertBinTextObject( BinTextObject&, EditPaM aPaM );
+
+ EditPaM Clear();
+ EditPaM RemoveText();
+ EditPaM RemoveText( EditSelection aEditSelection );
+ sal_Bool CreateLines( USHORT nPara, sal_uInt32 nStartPosY );
+ void CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uInt32 nStartPosY );
+ sal_Bool FinishCreateLines( ParaPortion* pParaPortion );
+ void CalcCharPositions( ParaPortion* pParaPortion );
+ void CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& rStartPos /*, sal_Bool bCreateBlockPortions */ );
+ void RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nStartPos, short nNewChars );
+ sal_uInt16 SplitTextPortion( ParaPortion* pParaPortion, sal_uInt16 nPos, EditLine* pCurLine = 0 );
+ void SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rFont, OutputDevice* pOut = NULL, sal_uInt16 nIgnoreWhich = 0 );
+ void RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics, SvxFont& rFont );
+ void CheckAutoPageSize();
+
+ void ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, TextPortion* pPortion, sal_uInt16 nPortionStart, long nRemainingWidth, sal_Bool bCanHyphenate );
+ EditPaM ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pRight, sal_Bool bBackward = sal_False );
+ EditPaM ImpDeleteSelection( EditSelection aEditSelection);
+ EditPaM ImpInsertParaBreak( const EditPaM& rPaM, sal_Bool bKeepEndingAttribs = sal_True );
+ EditPaM ImpInsertParaBreak( const EditSelection& rEditSelection, sal_Bool bKeepEndingAttribs = sal_True );
+ EditPaM ImpInsertText( EditSelection aCurEditSelection, const String& rStr );
+ EditPaM ImpInsertFeature( EditSelection aEditSelection, const SfxPoolItem& rItem );
+ void ImpRemoveChars( const EditPaM& rPaM, sal_uInt16 nChars, EditUndoRemoveChars* pCurUndo = 0 );
+ void ImpRemoveParagraph( sal_uInt16 nPara );
+ EditSelection ImpMoveParagraphs( Range aParagraphs, sal_uInt16 nNewPos );
+
+ EditPaM ImpFastInsertText( EditPaM aPaM, const String& rStr );
+ EditPaM ImpFastInsertParagraph( sal_uInt16 nPara );
+
+ sal_Bool ImpCheckRefMapMode();
+
+ void InsertContent( ContentNode* pNode, sal_uInt16 nPos );
+ EditPaM SplitContent( sal_uInt16 nNode, sal_uInt16 nSepPos );
+ EditPaM ConnectContents( sal_uInt16 nLeftNode, sal_Bool bBackward );
+
+ void ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow );
+ sal_Bool IsParagraphVisible( sal_uInt16 nParagraph );
+
+ EditPaM PageUp( const EditPaM& rPaM, EditView* pView);
+ EditPaM PageDown( const EditPaM& rPaM, EditView* pView);
+ EditPaM CursorUp( const EditPaM& rPaM, EditView* pEditView );
+ EditPaM CursorDown( const EditPaM& rPaM, EditView* pEditView );
+ EditPaM CursorLeft( const EditPaM& rPaM );
+ EditPaM CursorRight( const EditPaM& rPaM );
+ EditPaM CursorStartOfLine( const EditPaM& rPaM );
+ EditPaM CursorEndOfLine( const EditPaM& rPaM );
+ EditPaM CursorStartOfParagraph( const EditPaM& rPaM );
+ EditPaM CursorEndOfParagraph( const EditPaM& rPaM );
+ EditPaM CursorStartOfDoc();
+ EditPaM CursorEndOfDoc();
+ EditPaM WordLeft( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::text::WordType::ANYWORD_IGNOREWHITESPACES );
+ EditPaM WordRight( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::text::WordType::ANYWORD_IGNOREWHITESPACES );
+ EditPaM StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::text::WordType::ANYWORD_IGNOREWHITESPACES );
+ EditPaM EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::text::WordType::ANYWORD_IGNOREWHITESPACES );
+ EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = ::com::sun::star::text::WordType::ANYWORD_IGNOREWHITESPACES );
+
+ EditPaM ReadText( SvStream& rInput, EditSelection aSel );
+ EditPaM ReadRTF( SvStream& rInput, EditSelection aSel );
+ EditPaM ReadHTML( SvStream& rInput, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs );
+ EditPaM ReadBin( SvStream& rInput, EditSelection aSel );
+ sal_uInt32 WriteText( SvStream& rOutput, EditSelection aSel );
+ sal_uInt32 WriteRTF( SvStream& rOutput, EditSelection aSel );
+ sal_uInt32 WriteHTML( SvStream& rOutput, EditSelection aSel );
+ sal_uInt32 WriteBin( SvStream& rOutput, EditSelection aSel ) const;
+
+ void WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, sal_uInt16 nPara, sal_uInt16 nPos,
+ SvxFontTable& rFontTable, SvxColorList& rColorList );
+ sal_Bool WriteItemListAsRTF( ItemList& rLst, SvStream& rOutput, sal_uInt16 nPara, sal_uInt16 nPos,
+ SvxFontTable& rFontTable, SvxColorList& rColorList );
+ inline long LogicToTwips( long n );
+
+ inline short GetXValue( short nXValue ) const;
+ inline sal_uInt16 GetXValue( sal_uInt16 nXValue ) const;
+ inline long GetXValue( long nXValue ) const;
+
+ inline short GetYValue( short nYValue ) const;
+ inline sal_uInt16 GetYValue( sal_uInt16 nYValue ) const;
+
+ ContentNode* GetPrevVisNode( ContentNode* pCurNode );
+ ContentNode* GetNextVisNode( ContentNode* pCurNode );
+
+ ParaPortion* GetPrevVisPortion( ParaPortion* pCurPortion );
+ ParaPortion* GetNextVisPortion( ParaPortion* pCurPortion );
+
+ inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode );
+ inline void EraseVirtualDevice();
+
+ DECL_LINK( StatusTimerHdl, Timer * );
+ DECL_LINK( IdleFormatHdl, Timer * );
+ DECL_LINK( OnlineSpellHdl, Timer * );
+
+ void CheckIdleFormatter();
+
+ inline ParaPortion* FindParaPortion( ContentNode* pNode ) const;
+
+ sal_Bool HasData( ExchangeType eExchange, sal_Bool bAllowSpecial );
+ void CopyData( EditSelection aSelection, ExchangeType eExchange ) const;
+ EditSelection PasteData( EditPaM aPaM, ExchangeType eExchange, sal_Bool bSPeacial );
+
+ void SetValidPaperSize( const Size& rSz );
+
+ ::com::sun::star::uno::Reference < ::com::sun::star::text::XBreakIterator > ImplGetBreakIterator();
+
+
+protected:
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+public:
+ ImpEditEngine( EditEngine* pEditEngine, SfxItemPool* pPool );
+ ~ImpEditEngine();
+
+ void InitDoc( BOOL bKeepParaAttribs );
+ EditDoc& GetEditDoc() { return aEditDoc; }
+ const EditDoc& GetEditDoc() const { return aEditDoc; }
+
+ inline EditUndoManager& GetUndoManager();
+
+ void SetUpdateMode( sal_Bool bUp, EditView* pCurView = 0, sal_Bool bForceUpdate = sal_False );
+ sal_Bool GetUpdateMode() const { return bUpdate; }
+
+ const ParaPortionList& GetParaPortions() const { return aParaPortionList; }
+ ParaPortionList& GetParaPortions() { return aParaPortionList; }
+ EditViews& GetEditViews() { return aEditViews; }
+
+ const Size& GetPaperSize() const { return aPaperSize; }
+ void SetPaperSize( const Size& rSz ) { aPaperSize = rSz; }
+
+ void SetTextRanger( TextRanger* pRanger );
+ TextRanger* GetTextRanger() const { return pTextRanger; }
+
+ const Size& GetMinAutoPaperSize() const { return aMinAutoPaperSize; }
+ void SetMinAutoPaperSize( const Size& rSz ) { aMinAutoPaperSize = rSz; }
+
+ const Size& GetMaxAutoPaperSize() const { return aMaxAutoPaperSize; }
+ void SetMaxAutoPaperSize( const Size& rSz ) { aMaxAutoPaperSize = rSz; }
+
+ void FormatDoc();
+ void FormatFullDoc();
+ void UpdateViews( EditView* pCurView = 0 );
+ void Paint( ImpEditView* pView, const Rectangle& rRect, sal_Bool bUseVirtDev = sal_False );
+ void Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aStartPos, sal_Bool bStripOnly = sal_False, short nOrientation = 0 );
+
+ sal_Bool MouseButtonUp( const MouseEvent& rMouseEvent, EditView* pView );
+ sal_Bool MouseButtonDown( const MouseEvent& rMouseEvent, EditView* pView );
+ sal_Bool MouseMove( const MouseEvent& rMouseEvent, EditView* pView );
+ void Command( const CommandEvent& rCEvt, EditView* pView );
+
+ EditSelectionEngine& GetSelEngine() { return aSelEngine; }
+ XubString GetSelected( const EditSelection& rSel, const LineEnd eParaSep = LINEEND_LF ) const;
+
+ const SfxItemSet& GetEmptyItemSet();
+
+ void UpdateSelections();
+
+ void EnableUndo( sal_Bool bEnable );
+ sal_Bool IsUndoEnabled() { return bUndoEnabled; }
+ void SetUndoMode( sal_Bool b ) { bIsInUndo = b; }
+ sal_Bool IsInUndo() { return bIsInUndo; }
+
+ void SetCallParaInsertedOrDeleted( sal_Bool b ) { bCallParaInsertedOrDeleted = b; }
+ sal_Bool IsCallParaInsertedOrDeleted() const { return bCallParaInsertedOrDeleted; }
+
+ sal_Bool IsFormatted() const { return bFormatted; }
+ sal_Bool IsFormatting() const { return bIsFormatting; }
+
+ void SetText( const String& rText );
+ EditPaM DeleteSelected( EditSelection aEditSelection);
+ EditPaM InsertText( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite );
+ EditPaM InsertText( EditSelection aCurEditSelection, const String& rStr );
+ EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite );
+ EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, BYTE nMode, BYTE nDelMode = DELMODE_SIMPLE );
+ EditPaM InsertParaBreak( EditSelection aEditSelection );
+ EditPaM InsertLineBreak( EditSelection aEditSelection );
+ EditPaM InsertTab( EditSelection aEditSelection );
+ EditPaM InsertField( EditSelection aEditSelection, const SvxFieldItem& rFld );
+ sal_Bool UpdateFields();
+ EditSelection CutCopy( EditView* pView, sal_Bool bCut );
+ EditSelection Paste( EditView* pView, sal_Bool bUseSpecial = sal_False );
+ sal_uInt16 SearchAndReplace( const XubString& rBefore, const XubString& rAfter, EditView* pView );
+
+ EditPaM Read( SvStream& rInput, EETextFormat eFormat, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
+ void Write( SvStream& rOutput, EETextFormat eFormat, EditSelection aSel );
+
+ EditTextObject* CreateTextObject();
+ EditTextObject* CreateTextObject( EditSelection aSel );
+ void SetText( const EditTextObject& rTextObject );
+ EditSelection InsertText( const EditTextObject& rTextObject, EditSelection aSel );
+
+ EditSelection MoveCursor( const KeyEvent& rKeyEvent, EditView* pEditView );
+
+ EditSelection MoveParagraphs( Range aParagraphs, sal_uInt16 nNewPos, EditView* pCurView );
+
+ sal_uInt32 CalcTextHeight();
+ sal_uInt32 GetTextHeight() const;
+ sal_uInt32 CalcTextWidth();
+ sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine );
+ sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const;
+ sal_uInt16 GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
+ sal_uInt16 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine );
+ sal_uInt16 GetMaxFontHeight( sal_uInt16 nParagraph, sal_uInt16 nLine );
+ sal_uInt32 GetParaHeight( sal_uInt16 nParagraph );
+
+ SfxItemSet GetAttribs( EditSelection aSel );
+ void SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE nSpecial = 0 );
+ void RemoveCharAttribs( EditSelection aSel, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich = 0 );
+ void RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0, sal_Bool bRemoveFeatures = sal_False );
+ void SetFlatMode( sal_Bool bFlat );
+
+ void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
+ const SfxItemSet& GetParaAttribs( sal_uInt16 nPara ) const;
+
+ sal_Bool HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
+ const SfxPoolItem& GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich );
+
+// Fuer die SelectionEngine...
+ sal_Bool SetCursorAtPoint( const Point& rPointPixel, EditView* pView );
+ sal_Bool IsSelectionAtPoint( const Point& rPointPixel, EditView* pView );
+ void CreateAnchor( EditView* pView );
+ void DeselectAll( EditView* pView );
+ sal_Bool IsInSelection( EditPaM aPaM, EditView* pView );
+ void BeginDrag( EditView* pView );
+
+ Rectangle PaMtoEditCursor( EditPaM aPaM, sal_uInt16 nFlags = 0 );
+ Rectangle GetEditCursor( ParaPortion* pPortion, sal_uInt16 nIndex, sal_uInt16 nFlags = 0 );
+ sal_Bool IsModified() const { return aEditDoc.IsModified(); }
+ void SetModifyFlag( sal_Bool b ) { aEditDoc.SetModified( b ); }
+ sal_Bool IsInSelectionMode() { return bInSelection; }
+ void StopSelectionMode();
+
+ void IndentBlock( EditView* pView, sal_Bool bRight );
+
+// Fuer Undo/Redo
+ sal_Bool Undo( EditView* pView );
+ sal_Bool Redo( EditView* pView );
+ sal_Bool Repeat( EditView* pView );
+
+// OV-Special
+ void InvalidateFromParagraph( sal_uInt16 nFirstInvPara );
+ EditPaM InsertParagraph( sal_uInt16 nPara );
+ EditSelection* SelectParagraph( sal_uInt16 nPara );
+
+ void SetStatusEventHdl( const Link& rLink ) { aStatusHdlLink = rLink; }
+ Link GetStatusEventHdl() const { return aStatusHdlLink; }
+
+ void FormatAndUpdate( EditView* pCurView = 0 );
+ inline void IdleFormatAndUpdate( EditView* pCurView = 0 );
+
+ sal_Bool Drop( const DropEvent& rEvt, EditView* pCurView );
+ sal_Bool QueryDrop( const DropEvent& rEvt, EditView* pCurView );
+ void ShowDDCursor( Window* pWin, const Rectangle& rRect );
+ void HideDDCursor( Window* pWin );
+ ESelection GetDropPos();
+
+ EditSelection ConvertSelection( sal_uInt16 nStartPara, sal_uInt16 nStartPos, sal_uInt16 nEndPara, sal_uInt16 nEndPos ) const;
+ inline EPaM CreateEPaM( const EditPaM& rPaM );
+ inline EditPaM CreateEditPaM( const EPaM& rEPaM );
+ inline ESelection CreateESel( const EditSelection& rSel );
+ inline EditSelection CreateSel( const ESelection& rSel );
+
+
+ void SetStyleSheetPool( SfxStyleSheetPool* pSPool );
+ SfxStyleSheetPool* GetStyleSheetPool() const { return pStylePool; }
+
+ void SetStyleSheet( EditSelection aSel, SfxStyleSheet* pStyle );
+ void SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle );
+ SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ) const;
+
+ void UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle );
+ void RemoveStyleFromParagraphs( SfxStyleSheet* pStyle );
+
+ OutputDevice* GetRefDevice() const { return pRefDev; }
+ void SetRefDevice( OutputDevice* pRefDef );
+
+ const MapMode& GetRefMapMode() { return pRefDev->GetMapMode(); }
+ void SetRefMapMode( const MapMode& rMapMode );
+
+ InternalEditStatus& GetStatus() { return aStatus; }
+ void CallStatusHdl();
+ void DelayedCallStatusHdl() { aStatusTimer.Start(); }
+
+ EditSelection MatchGroup( const EditSelection& rSel );
+
+ void UndoActionStart( sal_uInt16 nId );
+ void UndoActionStart( sal_uInt16 nId, const ESelection& rSel );
+ void UndoActionEnd( sal_uInt16 nId );
+
+ EditView* GetActiveView() const { return pActiveView; }
+ void SetActiveView( EditView* pView );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellChecker1 > GetSpeller();
+ void SetSpeller( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellChecker1 > &xSpl ){ xSpeller = xSpl; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XHyphenator > GetHyphenator() const { return xHyphenator; }
+ void SetHyphenator( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XHyphenator > &xHyph ){ xHyphenator = xHyph; }
+ SpellInfo* GetSpellInfo() const { return pSpellInfo; }
+
+ void SetLanguage( LanguageType eLang ) { eDefaultLanguage = eLang;}
+ LanguageType GetLanguage() const { return eDefaultLanguage; }
+ ::com::sun::star::lang::Locale GetLocale();
+
+ void DoOnlineSpelling( ContentNode* pThisNodeOnly = 0, sal_Bool bSpellAtCursorPos = sal_False, sal_Bool bInteruptable = sal_True );
+ EESpellState Spell( EditView* pEditView, sal_Bool bMultipleDoc );
+ EESpellState HasSpellErrors();
+ EESpellState StartThesaurus( EditView* pEditView );
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellAlternatives > ImpSpell( EditView* pEditView );
+
+ sal_Bool Search( const SvxSearchItem& rSearchItem, EditView* pView );
+ sal_Bool ImpSearch( const SvxSearchItem& rSearchItem, const EditSelection& rSearchSelection, const EditPaM& rStartPos, EditSelection& rFoundSel );
+ sal_uInt16 StartSearchAndReplace( EditView* pEditView, const SvxSearchItem& rSearchItem );
+ sal_Bool HasText( const SvxSearchItem& rSearchItem );
+
+ void SetEditTextObjectPool( SfxItemPool* pP ) { pTextObjectPool = pP; }
+ SfxItemPool* GetEditTextObjectPool() const { return pTextObjectPool; }
+
+ const SvxLRSpaceItem& GetLRSpaceItem( ContentNode* pNode );
+
+ void SetCharStretching( sal_uInt16 nX, sal_uInt16 nY );
+ inline void GetCharStretching( sal_uInt16& rX, sal_uInt16& rY );
+ void DoStretchChars( sal_uInt16 nX, sal_uInt16 nY );
+
+ void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ) { nBigTextObjectStart = nStartAtPortionCount; }
+ sal_uInt16 GetBigTextObjectStart() const { return nBigTextObjectStart; }
+
+ inline EditEngine* GetEditEnginePtr() const { return pEditEngine; }
+
+ void StartOnlineSpellTimer() { aOnlineSpellTimer.Start(); }
+ void StopOnlineSpellTimer() { aOnlineSpellTimer.Stop(); }
+
+ const XubString& GetAutoCompleteText() const { return aAutoCompleteText; }
+ void SetAutoCompleteText( const String& rStr, sal_Bool bUpdateTipWindow );
+};
+
+inline long ImpEditEngine::LogicToTwips( long n )
+{
+ Point aPnt( n, 0 );
+ aPnt = pRefDev->LogicToPixel( aPnt );
+ aPnt = pRefDev->PixelToLogic( aPnt, MapMode( MAP_TWIP ) );
+ return aPnt.X();
+}
+
+inline EPaM ImpEditEngine::CreateEPaM( const EditPaM& rPaM )
+{
+ ContentNode* pNode = rPaM.GetNode();
+ return EPaM( aEditDoc.GetPos( pNode ), rPaM.GetIndex() );
+}
+
+inline EditPaM ImpEditEngine::CreateEditPaM( const EPaM& rEPaM )
+{
+ DBG_ASSERT( rEPaM.nPara < aEditDoc.Count(), "CreateEditPaM: Ungueltiger Absatz" );
+ DBG_ASSERT( aEditDoc[ rEPaM.nPara ]->Len() >= rEPaM.nIndex, "CreateEditPaM: Ungueltiger Index" );
+ return EditPaM( aEditDoc[ rEPaM.nPara], rEPaM.nIndex );
+}
+
+inline ESelection ImpEditEngine::CreateESel( const EditSelection& rSel )
+{
+ ContentNode* pStartNode = rSel.Min().GetNode();
+ ContentNode* pEndNode = rSel.Max().GetNode();
+ ESelection aESel;
+ aESel.nStartPara = aEditDoc.GetPos( pStartNode );
+ aESel.nStartPos = rSel.Min().GetIndex();
+ aESel.nEndPara = aEditDoc.GetPos( pEndNode );
+ aESel.nEndPos = rSel.Max().GetIndex();
+ return aESel;
+}
+
+inline EditSelection ImpEditEngine::CreateSel( const ESelection& rSel )
+{
+ DBG_ASSERT( rSel.nStartPara < aEditDoc.Count(), "CreateSel: Ungueltiger Start-Absatz" );
+ DBG_ASSERT( rSel.nEndPara < aEditDoc.Count(), "CreateSel: Ungueltiger End-Absatz" );
+ EditSelection aSel;
+ aSel.Min().SetNode( aEditDoc[ rSel.nStartPara ] );
+ aSel.Min().SetIndex( rSel.nStartPos );
+ aSel.Max().SetNode( aEditDoc[ rSel.nEndPara ] );
+ aSel.Max().SetIndex( rSel.nEndPos );
+ DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "CreateSel: Fehlerhafte Selektion!" );
+ return aSel;
+}
+
+inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode )
+{
+ if ( !pVirtDev )
+ pVirtDev = new VirtualDevice;
+
+ if ( ( pVirtDev->GetMapMode().GetMapUnit() != rMapMode.GetMapUnit() ) ||
+ ( pVirtDev->GetMapMode().GetScaleX() != rMapMode.GetScaleX() ) ||
+ ( pVirtDev->GetMapMode().GetScaleY() != rMapMode.GetScaleY() ) )
+ {
+ MapMode aMapMode( rMapMode );
+ aMapMode.SetOrigin( Point( 0, 0 ) );
+ pVirtDev->SetMapMode( aMapMode );
+ }
+
+ return pVirtDev;
+}
+
+inline void ImpEditEngine::EraseVirtualDevice()
+{
+ delete pVirtDev;
+ pVirtDev = 0;
+}
+
+inline void ImpEditEngine::IdleFormatAndUpdate( EditView* pCurView )
+{
+ aIdleFormatter.DoIdleFormat( pCurView );
+}
+
+inline void ImpEditEngine::TextModified()
+{
+// hat z.Zt. keine Bedeutung mehr.
+}
+
+inline EditUndoManager& ImpEditEngine::GetUndoManager()
+{
+ if ( !pUndoManager )
+ pUndoManager = new EditUndoManager( this );
+ return *pUndoManager;
+}
+
+inline ParaPortion* ImpEditEngine::FindParaPortion( ContentNode* pNode ) const
+{
+ sal_uInt16 nPos = aEditDoc.GetPos( pNode );
+ DBG_ASSERT( nPos < GetParaPortions().Count(), "Portionloser Node?" );
+ return GetParaPortions()[ nPos ];
+}
+
+inline void ImpEditEngine::GetCharStretching( sal_uInt16& rX, sal_uInt16& rY )
+{
+ rX = nStretchX;
+ rY = nStretchY;
+}
+
+inline short ImpEditEngine::GetXValue( short nXValue ) const
+{
+ if ( !aStatus.DoStretch() || ( nStretchX == 100 ) )
+ return nXValue;
+
+ return (short) ((long)nXValue*nStretchX/100);
+}
+
+inline sal_uInt16 ImpEditEngine::GetXValue( sal_uInt16 nXValue ) const
+{
+ if ( !aStatus.DoStretch() || ( nStretchX == 100 ) )
+ return nXValue;
+
+ return (sal_uInt16) ((long)nXValue*nStretchX/100);
+}
+
+inline long ImpEditEngine::GetXValue( long nXValue ) const
+{
+ if ( !aStatus.DoStretch() || ( nStretchX == 100 ) )
+ return nXValue;
+
+ return nXValue*nStretchX/100;
+}
+
+inline short ImpEditEngine::GetYValue( short nYValue ) const
+{
+ if ( !aStatus.DoStretch() || ( nStretchY == 100 ) )
+ return nYValue;
+
+ return (short) ((long)nYValue*nStretchY/100);
+}
+
+inline sal_uInt16 ImpEditEngine::GetYValue( sal_uInt16 nYValue ) const
+{
+ if ( !aStatus.DoStretch() || ( nStretchY == 100 ) )
+ return nYValue;
+
+ return (sal_uInt16) ((long)nYValue*nStretchY/100);
+}
+
+inline void ImpEditView::SetPointer( const Pointer& rPointer )
+{
+ delete pPointer;
+ pPointer = new Pointer( rPointer );
+}
+
+inline const Pointer& ImpEditView::GetPointer()
+{
+ if ( !pPointer )
+ pPointer = new Pointer( POINTER_TEXT );
+ return *pPointer;
+}
+
+inline void ImpEditView::SetCursor( const Cursor& rCursor )
+{
+ delete pCursor;
+ pCursor = new Cursor( rCursor );
+}
+
+inline Cursor* ImpEditView::GetCursor()
+{
+ if ( !pCursor )
+ pCursor = new Cursor;
+ return pCursor;
+}
+
+inline Point ImpEditView::GetDocPos( const Point& rWindowPos ) const
+{
+ // Fensterposition => Dokumentposition
+ Point aPoint( rWindowPos );
+
+ aPoint.Y() -= aOutArea.Top();
+ aPoint.X() -= aOutArea.Left();
+
+ aPoint.Y() += aVisArea.Top();
+ aPoint.X() += aVisArea.Left();
+
+ return aPoint;
+}
+
+inline Point ImpEditView::GetWindowPos( const Point& rDocPos ) const
+{
+ // Dokumentposition => Fensterposition
+ Point aPoint( rDocPos );
+
+ aPoint.Y() -= aVisArea.Top();
+ aPoint.X() -= aVisArea.Left();
+
+ aPoint.Y() += aOutArea.Top();
+ aPoint.X() += aOutArea.Left();
+
+ return aPoint;
+}
+
+inline Rectangle ImpEditView::GetWindowPos( const Rectangle& rDocPos ) const
+{
+ // Dokumentposition => Fensterposition
+ Rectangle aRect( rDocPos );
+
+ aRect.Top() -= aVisArea.Top();
+ aRect.Bottom() -= aVisArea.Top();
+ aRect.Left() -= aVisArea.Left();
+ aRect.Right() -= aVisArea.Left();
+
+ aRect.Top() += aOutArea.Top();
+ aRect.Bottom() += aOutArea.Top();
+ aRect.Left() += aOutArea.Left();
+ aRect.Right() += aOutArea.Left();
+
+ return aRect;
+}
+
+void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit );
+void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const MapUnit* pSourceUnit = NULL, const MapUnit* pDestUnit = NULL );
+
+#endif // _IMPEDIT_HXX
+
+
diff --git a/svx/source/editeng/impedit2.cxx b/svx/source/editeng/impedit2.cxx
new file mode 100644
index 0000000000..666277b3b0
--- /dev/null
+++ b/svx/source/editeng/impedit2.cxx
@@ -0,0 +1,3338 @@
+/*************************************************************************
+ *
+ * $RCSfile: impedit2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <srchitem.hxx>
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#include <lspcitem.hxx>
+#include <flditem.hxx>
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editview.hxx>
+#include <editdbg.hxx>
+#include <eerdll2.hxx>
+#include <eerdll.hxx>
+#include <edtspell.hxx>
+#include <txtrange.hxx>
+#include <svtools/urlbmk.hxx>
+
+
+#include <fhgtitem.hxx>
+#include <lrspitem.hxx>
+#include <ulspitem.hxx>
+#include <wghtitem.hxx>
+#include <postitem.hxx>
+#include <udlnitem.hxx>
+
+#ifndef _SFXVIEWFRM_HXX //autogen
+#include <sfx2/viewfrm.hxx>
+#endif
+
+#ifndef _SFX_FCONTNR_HXX //autogen
+#include <sfx2/fcontnr.hxx>
+#endif
+
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+#ifndef _SV_CLIP_HXX //autogen
+#include <vcl/clip.hxx>
+#endif
+
+#ifndef _SV_DRAG_HXX //autogen
+#include <vcl/drag.hxx>
+#endif
+
+#ifndef _VCL_CMDEVT_H
+#include <vcl/cmdevt.h>
+#endif
+
+#ifndef SVX_LIGHT
+#ifndef _SFXFRAME_HXX //autogen
+#include <sfx2/frame.hxx>
+#endif
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_CHARACTERITERATORMODE_HPP_
+#include <com/sun/star/text/CharacterIteratorMode.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_WORDTYPE_HPP_
+#include <com/sun/star/text/WordType.hpp>
+#endif
+
+#define LINE_SEP 0x0A
+
+using namespace ::com::sun::star;
+
+USHORT lcl_CalcExtraSpace( ParaPortion* pPortion, const SvxLineSpacingItem& rLSItem )
+{
+ USHORT nExtra = 0;
+ /* if ( ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
+ && ( rLSItem.GetPropLineSpace() != 100 ) )
+ {
+ // ULONG nH = pPortion->GetNode()->GetCharAttribs().GetDefFont().GetSize().Height();
+ ULONG nH = pPortion->GetLines().GetObject( 0 )->GetHeight();
+ long n = nH * rLSItem.GetPropLineSpace();
+ n /= 100;
+ n -= nH; // nur den Abstand
+ if ( n > 0 )
+ nExtra = (USHORT)n;
+ }
+ else */
+ if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+ {
+ nExtra = rLSItem.GetInterLineSpace();
+ }
+
+ return nExtra;
+}
+
+ // ----------------------------------------------------------------------
+// class ImpEditEngine
+// ----------------------------------------------------------------------
+
+ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
+ aEditDoc( pItemPool ),
+ aPaperSize( 0x7FFFFFFF, 0x7FFFFFFF ),
+ aMaxAutoPaperSize( 0x7FFFFFFF, 0x7FFFFFFF ),
+ aMinAutoPaperSize( 0x0, 0x0 ),
+ aGroupChars( RTL_CONSTASCII_USTRINGPARAM( "{}()[]" ) ),
+ aWordDelimiters( RTL_CONSTASCII_USTRINGPARAM( " .,;:-'`'?!_=\"{}()[]\0xFF" ) )
+{
+ pEditEngine = pEE;
+ pRefDev = NULL;
+ pVirtDev = NULL;
+ pEmptyItemSet = NULL;
+ pActiveView = NULL;
+ eDefaultLanguage = LANGUAGE_NONE;
+ pSpellInfo = NULL;
+ pTextObjectPool = NULL;
+ pDragAndDropInfo = NULL;
+ pDestroyedMarker = NULL;
+ mpIMEInfos = NULL;
+ pStylePool = NULL;
+ pUndoManager = NULL;
+ pUndoMarkSelection = NULL;
+ pTextRanger = NULL;
+
+ nCurTextHeight = 0;
+ nBigTextObjectStart = 20;
+
+ nStretchX = 100;
+ nStretchY = 100;
+
+ bInSelection = FALSE;
+ bOwnerOfRefDev = FALSE;
+ bDowning = FALSE;
+ bIsInUndo = FALSE;
+ bIsFormatting = FALSE;
+ bFormatted = FALSE;
+ bUpdate = TRUE;
+ bUndoEnabled = TRUE;
+ bCallParaInsertedOrDeleted = TRUE;
+
+
+ aStatus.GetControlWord() = EE_CNTRL_USECHARATTRIBS | EE_CNTRL_DOIDLEFORMAT |
+ EE_CNTRL_PASTESPECIAL | EE_CNTRL_UNDOATTRIBS |
+ EE_CNTRL_ALLOWBIGOBJS | EE_CNTRL_RTFSTYLESHEETS |
+ EE_CNTRL_FORMAT100;
+
+ aSelEngine.SetFunctionSet( &aSelFuncSet );
+
+ aStatusTimer.SetTimeout( 200 );
+ aStatusTimer.SetTimeoutHdl( LINK( this, ImpEditEngine, StatusTimerHdl ) );
+
+ aIdleFormatter.SetTimeout( 5 );
+ aIdleFormatter.SetTimeoutHdl( LINK( this, ImpEditEngine, IdleFormatHdl ) );
+
+ aOnlineSpellTimer.SetTimeout( 100 );
+ aOnlineSpellTimer.SetTimeoutHdl( LINK( this, ImpEditEngine, OnlineSpellHdl ) );
+
+ pRefDev = EE_DLL()->GetGlobalData()->GetStdRefDevice();
+
+ // Ab hier wird schon auf Daten zugegriffen!
+ SetRefDevice( pRefDev );
+ InitDoc( FALSE );
+}
+
+ImpEditEngine::~ImpEditEngine()
+{
+ aStatusTimer.Stop();
+ aOnlineSpellTimer.Stop();
+ aIdleFormatter.Stop();
+
+ if ( pDestroyedMarker )
+ *pDestroyedMarker = TRUE;
+
+ // das Zerstoeren von Vorlagen kann sonst unnoetiges Formatieren ausloesen,
+ // wenn eine Parent-Vorlage zerstoert wird.
+ // Und das nach dem Zerstoeren der Daten!
+ bDowning = TRUE;
+ SetUpdateMode( FALSE );
+
+ delete pVirtDev;
+ delete pEmptyItemSet;
+ delete pDragAndDropInfo;
+ delete pUndoManager;
+ delete pTextRanger;
+ delete mpIMEInfos;
+ if ( bOwnerOfRefDev )
+ delete pRefDev;
+}
+
+void ImpEditEngine::SetRefDevice( OutputDevice* pRef )
+{
+ if ( bOwnerOfRefDev )
+ delete pRefDev;
+
+ pRefDev = pRef;
+ bOwnerOfRefDev = FALSE;
+
+ if ( !pRef )
+ pRefDev = EE_DLL()->GetGlobalData()->GetStdRefDevice();
+
+ nOnePixelInRef = (USHORT)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width();
+
+ if ( IsFormatted() )
+ {
+ FormatFullDoc();
+ UpdateViews( (EditView*) 0);
+ }
+}
+
+void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode )
+{
+ if ( GetRefDevice()->GetMapMode() == rMapMode )
+ return;
+
+ // Wenn RefDev == GlobalRefDev => eigenes anlegen!
+ if ( !bOwnerOfRefDev && ( pRefDev == EE_DLL()->GetGlobalData()->GetStdRefDevice() ) )
+ {
+ pRefDev = new VirtualDevice;
+ pRefDev->SetMapMode( MAP_TWIP );
+ SetRefDevice( pRefDev );
+ bOwnerOfRefDev = TRUE;
+ }
+ pRefDev->SetMapMode( rMapMode );
+ nOnePixelInRef = (USHORT)pRefDev->PixelToLogic( Size( 1, 0 ) ).Width();
+ if ( IsFormatted() )
+ {
+ FormatFullDoc();
+ UpdateViews( (EditView*) 0);
+ }
+}
+
+void ImpEditEngine::InitDoc( BOOL bKeepParaAttribs )
+{
+ USHORT nParas = aEditDoc.Count();
+ for ( USHORT n = bKeepParaAttribs ? 1 : 0; n < nParas; n++ )
+ {
+ if ( aEditDoc[n]->GetStyleSheet() )
+ EndListening( *aEditDoc[n]->GetStyleSheet(), FALSE );
+ }
+
+ if ( bKeepParaAttribs )
+ aEditDoc.RemoveText();
+ else
+ aEditDoc.Clear();
+
+ GetParaPortions().Reset();
+
+ ParaPortion* pIniPortion = new ParaPortion( aEditDoc[0] );
+ GetParaPortions().Insert( pIniPortion, 0 );
+
+ bFormatted = FALSE;
+
+ if ( IsCallParaInsertedOrDeleted() )
+ {
+ GetEditEnginePtr()->ParagraphDeleted( EE_PARA_ALL );
+ GetEditEnginePtr()->ParagraphInserted( 0 );
+ }
+
+#ifndef SVX_LIGHT
+ if ( GetStatus().DoOnlineSpelling() )
+ aEditDoc.GetObject( 0 )->CreateWrongList();
+#endif // !SVX_LIGHT
+}
+
+EditPaM ImpEditEngine::DeleteSelected( EditSelection aSel )
+{
+ EditPaM aPaM ( ImpDeleteSelection( aSel ) );
+ return aPaM;
+}
+
+XubString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd eEnd ) const
+{
+ XubString aText;
+ if ( !rSel.HasRange() )
+ return aText;
+
+ String aSep = EditDoc::GetSepStr( eEnd );
+
+ EditSelection aSel( rSel );
+ aSel.Adjust( aEditDoc );
+
+ ContentNode* pStartNode = aSel.Min().GetNode();
+ ContentNode* pEndNode = aSel.Max().GetNode();
+ USHORT nStartNode = aEditDoc.GetPos( pStartNode );
+ USHORT nEndNode = aEditDoc.GetPos( pEndNode );
+
+ DBG_ASSERT( nStartNode <= nEndNode, "Selektion nicht sortiert ?" );
+
+ // ueber die Absaetze iterieren...
+ for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ {
+ DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: GetSelected" );
+ ContentNode* pNode = aEditDoc.GetObject( nNode );
+
+ xub_StrLen nStartPos = 0;
+ xub_StrLen nEndPos = pNode->Len();
+ if ( nNode == nStartNode )
+ nStartPos = aSel.Min().GetIndex();
+ if ( nNode == nEndNode ) // kann auch == nStart sein!
+ nEndPos = aSel.Max().GetIndex();
+
+ aText += aEditDoc.GetParaAsString( pNode, nStartPos, nEndPos );
+ if ( nNode < nEndNode )
+ aText += aSep;
+ }
+ return aText;
+}
+
+BOOL ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pView )
+{
+ GetSelEngine().SetCurView( pView );
+ SetActiveView( pView );
+
+ if ( GetAutoCompleteText().Len() )
+ SetAutoCompleteText( String(), TRUE );
+
+ GetSelEngine().SelMouseButtonDown( rMEvt );
+ // Sonderbehandlungen
+ EditSelection aCurSel( pView->pImpEditView->GetEditSelection() );
+ if ( !rMEvt.IsShift() )
+ {
+ if ( rMEvt.GetClicks() == 2 )
+ {
+ // damit die SelectionEngine weiss, dass Anker.
+ aSelEngine.CursorPosChanging( TRUE, FALSE );
+
+ EditSelection aNewSelection( SelectWord( aCurSel ) );
+ pView->pImpEditView->DrawSelection();
+ pView->pImpEditView->SetEditSelection( aNewSelection );
+ pView->pImpEditView->DrawSelection();
+ pView->ShowCursor( TRUE, TRUE );
+ }
+ else if ( rMEvt.GetClicks() == 3 )
+ {
+ // damit die SelectionEngine weiss, dass Anker.
+ aSelEngine.CursorPosChanging( TRUE, FALSE );
+
+ EditSelection aNewSelection( aCurSel );
+ aNewSelection.Min().SetIndex( 0 );
+ aNewSelection.Max().SetIndex( aCurSel.Min().GetNode()->Len() );
+ pView->pImpEditView->DrawSelection();
+ pView->pImpEditView->SetEditSelection( aNewSelection );
+ pView->pImpEditView->DrawSelection();
+ pView->ShowCursor( TRUE, TRUE );
+ }
+ }
+ return TRUE;
+}
+
+void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
+{
+#ifndef SVX_LIGHT
+ GetSelEngine().SetCurView( pView );
+ SetActiveView( pView );
+ // Sonderbehandlung: Verschieben von Feldern.
+ if ( rCEvt.GetCommand() == COMMAND_STARTDRAG )
+ {
+ if ( rCEvt.IsMouseEvent() && !pView->HasSelection() )
+ {
+ // Sonderbehandlung: Verschieben von Feldern.
+ USHORT nPara, nPos;
+ const SvxFieldItem* pField = pView->GetFieldUnderMousePointer( nPara, nPos );
+ if ( pField )
+ {
+ pDragAndDropInfo = new DragAndDropInfo( *pView->GetWindow() );
+ pDragAndDropInfo->pField = pField;
+ // Die SelectionEngien muss glauben, dass vorher in
+ // eine Selection geklickt wurde.
+ MouseEvent aHackyMouseEvent( rCEvt.GetMousePosPixel(), 1 );
+ GetSelEngine().SelMouseButtonUp( aHackyMouseEvent );
+ GetSelEngine().SelMouseButtonDown( aHackyMouseEvent );
+ GetSelEngine().SelMouseMove( aHackyMouseEvent );
+ ESelection aESel( nPara, nPos, nPara, nPos+1 );
+ pDragAndDropInfo->aDropSel = aESel;
+ EditSelection aSel = CreateSel( aESel );
+ pView->pImpEditView->GetEditSelection() = aSel;
+ pView->pImpEditView->DrawSelection();
+ BOOL bGotoCursor = pView->pImpEditView->DoAutoScroll();
+ BOOL bForceCursor = ( pDragAndDropInfo ? FALSE : TRUE ) && !IsInSelectionMode();
+ pView->ShowCursor( bGotoCursor, bForceCursor );
+ }
+ }
+ }
+ else if ( rCEvt.GetCommand() == COMMAND_VOICE )
+ {
+ const CommandVoiceData* pData = rCEvt.GetVoiceData();
+ if ( pData->GetType() == VOICECOMMANDTYPE_DICTATION )
+ {
+ // Funktionen auf KeyEvents umbiegen, wenn keine entsprechende
+ // Methode an EditView/EditEngine, damit Undo konsistent bleibt.
+
+ SfxPoolItem* pNewAttr = NULL;
+
+ switch ( pData->GetCommand() )
+ {
+ case DICTATIONCOMMAND_UNKNOWN:
+ {
+ pView->InsertText( pData->GetText() );
+ }
+ break;
+ case DICTATIONCOMMAND_NEWPARAGRAPH:
+ {
+ pView->PostKeyEvent( KeyEvent( 0, KeyCode( KEY_RETURN, 0 ) ) );
+ }
+ break;
+ case DICTATIONCOMMAND_NEWLINE:
+ {
+ pView->PostKeyEvent( KeyEvent( 0, KeyCode( KEY_RETURN, KEY_SHIFT ) ) );
+ }
+ break;
+ case DICTATIONCOMMAND_TAB:
+ {
+ pView->PostKeyEvent( KeyEvent( 0, KeyCode( KEY_TAB, 0 ) ) );
+ }
+ break;
+ case DICTATIONCOMMAND_LEFT:
+ {
+ pView->PostKeyEvent( KeyEvent( 0, KeyCode( KEY_LEFT, KEY_MOD1 ) ) );
+ }
+ break;
+ case DICTATIONCOMMAND_RIGHT:
+ {
+ pView->PostKeyEvent( KeyEvent( 0, KeyCode( KEY_RIGHT, KEY_MOD1 ) ) );
+ }
+ break;
+ case DICTATIONCOMMAND_UP:
+ {
+ pView->PostKeyEvent( KeyEvent( 0, KeyCode( KEY_UP, 0 ) ) );
+ }
+ break;
+ case DICTATIONCOMMAND_DOWN:
+ {
+ pView->PostKeyEvent( KeyEvent( 0, KeyCode( KEY_UP, 0 ) ) );
+ }
+ break;
+ case DICTATIONCOMMAND_UNDO:
+ {
+ pView->Undo();
+ }
+ break;
+ case DICTATIONCOMMAND_DEL:
+ {
+ pView->PostKeyEvent( KeyEvent( 0, KeyCode( KEY_LEFT, KEY_MOD1|KEY_SHIFT ) ) );
+ pView->DeleteSelected();
+ }
+ break;
+ case DICTATIONCOMMAND_BOLD_ON:
+ {
+ pNewAttr = new SvxWeightItem( WEIGHT_BOLD, EE_CHAR_WEIGHT );
+ }
+ break;
+ case DICTATIONCOMMAND_BOLD_OFF:
+ {
+ pNewAttr = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT );
+ }
+ break;
+ case DICTATIONCOMMAND_ITALIC_ON:
+ {
+ pNewAttr = new SvxPostureItem( ITALIC_NORMAL, EE_CHAR_ITALIC );
+ }
+ break;
+ case DICTATIONCOMMAND_ITALIC_OFF:
+ {
+ pNewAttr = new SvxPostureItem( ITALIC_NORMAL, EE_CHAR_ITALIC );
+ }
+ break;
+ case DICTATIONCOMMAND_UNDERLINE_ON:
+ {
+ pNewAttr = new SvxUnderlineItem( UNDERLINE_SINGLE, EE_CHAR_UNDERLINE );
+ }
+ break;
+ case DICTATIONCOMMAND_UNDERLINE_OFF:
+ {
+ pNewAttr = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE );
+ }
+ break;
+ }
+
+ if ( pNewAttr )
+ {
+ SfxItemSet aSet( GetEmptyItemSet() );
+ aSet.Put( *pNewAttr );
+ pView->SetAttribs( aSet );
+ delete pNewAttr;
+ }
+ }
+ }
+ else if ( rCEvt.GetCommand() == COMMAND_STARTEXTTEXTINPUT )
+ {
+ pView->DeleteSelected();
+ delete mpIMEInfos;
+ mpIMEInfos = new ImplIMEInfos( pView->GetImpEditView()->GetEditSelection().Max() );
+ }
+ else if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
+ {
+ DBG_ASSERT( mpIMEInfos, "COMMAND_ENDEXTTEXTINPUT => Kein Start ?" );
+ if( mpIMEInfos )
+ {
+ ParaPortion* pPortion = FindParaPortion( mpIMEInfos->aPos.GetNode() );
+ pPortion->MarkSelectionInvalid( mpIMEInfos->aPos.GetIndex(), 0 );
+
+ delete mpIMEInfos;
+ mpIMEInfos = NULL;
+
+ FormatAndUpdate( pView );
+ }
+ }
+ else if ( rCEvt.GetCommand() == COMMAND_EXTTEXTINPUT )
+ {
+ DBG_ASSERT( mpIMEInfos, "COMMAND_EXTTEXTINPUT => Kein Start ?" );
+ if( mpIMEInfos )
+ {
+ const CommandExtTextInputData* pData = rCEvt.GetExtTextInputData();
+
+ EditSelection aSel( mpIMEInfos->aPos );
+ aSel.Max().GetIndex() += mpIMEInfos->nLen;
+ aSel = DeleteSelected( aSel );
+ aSel = ImpInsertText( aSel, pData->GetText() );
+
+ if ( pData->GetTextAttr() )
+ {
+ mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().Len() );
+ mpIMEInfos->bCursor = pData->IsCursorVisible();
+ }
+ else
+ {
+ mpIMEInfos->DestroyAttribs();
+ }
+
+ ParaPortion* pPortion = FindParaPortion( mpIMEInfos->aPos.GetNode() );
+ pPortion->MarkSelectionInvalid( mpIMEInfos->aPos.GetIndex(), 0 );
+ FormatAndUpdate( pView );
+
+ aSel.Min() = aSel.Max();
+ pView->SetSelection( CreateESel( aSel ) );
+ }
+ }
+ else if ( rCEvt.GetCommand() == COMMAND_EXTTEXTINPUTPOS )
+ {
+ if ( mpIMEInfos && mpIMEInfos->nLen )
+ {
+ const CommandExtTextInputPosData* pData = rCEvt.GetExtTextInputPosData();
+
+ USHORT nChars = pData->GetChars();
+ USHORT nStart = mpIMEInfos->aPos.GetIndex() + pData->GetFirstPos();
+
+ EditPaM aPaM( mpIMEInfos->aPos );
+ Rectangle* pRects = new Rectangle[ nChars ];
+ for ( USHORT n = 0; n < nChars; n++ )
+ {
+ aPaM.GetIndex() = nStart+n;
+ Rectangle aR1 = PaMtoEditCursor( aPaM, 0 );
+ aR1 = pView->GetImpEditView()->GetWindowPos( aR1 );
+ aPaM.GetIndex()++;
+ Rectangle aR2 = PaMtoEditCursor( aPaM, GETCRSR_TXTONLY );
+ aR2 = pView->GetImpEditView()->GetWindowPos( aR2 );
+
+ pRects[n] = aR1;
+ pRects[n].Right() = aR2.Left();
+
+ }
+ pView->GetWindow()->SetExtTextInputPos( pData->GetFirstPos(), pData->GetChars(), pRects );
+ delete pRects;
+ }
+ else
+ pView->GetWindow()->SetExtTextInputPos( 0, 0, NULL );
+ }
+
+#endif // !SVX_LIGHT
+
+ GetSelEngine().Command( rCEvt );
+}
+
+BOOL ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView )
+{
+ GetSelEngine().SetCurView( pView );
+ GetSelEngine().SelMouseButtonUp( rMEvt );
+ bInSelection = FALSE;
+ // Sonderbehandlungen
+ EditSelection aCurSel( pView->pImpEditView->GetEditSelection() );
+ if ( !aCurSel.HasRange() )
+ {
+ if ( ( rMEvt.GetClicks() == 1 ) && rMEvt.IsLeft() && !rMEvt.IsMod2() )
+ {
+ const SvxFieldItem* pFld = pView->GetFieldUnderMousePointer();
+ if ( pFld )
+ {
+ EditPaM aPaM( aCurSel.Max() );
+ USHORT nPara = GetEditDoc().GetPos( aPaM.GetNode() );
+ GetEditEnginePtr()->FieldClicked( *pFld, nPara, aPaM.GetIndex() );
+ }
+ }
+ }
+ return TRUE;
+}
+
+BOOL ImpEditEngine::MouseMove( const MouseEvent& rMEvt, EditView* pView )
+{
+ // MouseMove wird sofort nach ShowQuickHelp() gerufen!
+// if ( GetAutoCompleteText().Len() )
+// SetAutoCompleteText( String(), TRUE );
+ GetSelEngine().SetCurView( pView );
+ GetSelEngine().SelMouseMove( rMEvt );
+ return TRUE;
+}
+
+
+
+EditSelection ImpEditEngine::CutCopy( EditView* pView, BOOL bCut )
+{
+ EditSelection aSel( pView->pImpEditView->GetEditSelection() );
+ if ( !aSel.HasRange() )
+ return aSel;
+
+ CopyData( aSel, EXCHANGE_CLIPBOARD );
+
+ if ( bCut )
+ {
+ pView->pImpEditView->DrawSelection();
+ aSel = ImpDeleteSelection( aSel );
+ }
+ return aSel;
+}
+
+EditSelection ImpEditEngine::Paste( EditView* pView, BOOL bUseSpecial )
+{
+ EditSelection aSel( pView->pImpEditView->GetEditSelection() );
+
+ // Wenn keine Datan, dann auch nicht Selektion loeschen:
+ if ( !HasData( EXCHANGE_CLIPBOARD, bUseSpecial ) )
+ return aSel;
+
+ if ( aSel.HasRange() )
+ {
+ pView->pImpEditView->DrawSelection();
+ aSel = ImpDeleteSelection( aSel );
+ }
+
+ if ( pView->pImpEditView->DoSingleLinePaste() )
+ {
+ XubString aText( Clipboard::PasteString() );
+ aText.ConvertLineEnd( LINEEND_LF );
+ aText.SearchAndReplaceAll( LINE_SEP, ' ' );
+ aSel = ImpInsertText( aSel, aText );
+ }
+ else
+ aSel = PasteData( aSel.Min(), EXCHANGE_CLIPBOARD, bUseSpecial );
+
+ return aSel;
+}
+
+EditPaM ImpEditEngine::InsertText( EditSelection aSel, const XubString& rStr )
+{
+ EditPaM aPaM = ImpInsertText( aSel, rStr );
+ return aPaM;
+}
+
+BOOL ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEditView )
+{
+ EditSelection aSel( pEditView->pImpEditView->GetEditSelection() );
+
+ aSel.Adjust( aEditDoc );
+ EditPaM aStartPaM( aSel.Max() );
+ if ( rSearchItem.GetSelection() && !rSearchItem.GetBackward() )
+ aStartPaM = aSel.Min();
+
+ EditSelection aFoundSel;
+ BOOL bFound = ImpSearch( rSearchItem, aSel, aStartPaM, aFoundSel );
+ if ( bFound && ( aFoundSel == aSel ) ) // Bei Rueckwaetssuche
+ {
+ aStartPaM = aSel.Min();
+ bFound = ImpSearch( rSearchItem, aSel, aStartPaM, aFoundSel );
+ }
+
+ pEditView->pImpEditView->DrawSelection();
+ if ( bFound )
+ {
+ // Erstmal das Min einstellen, damit das ganze Wort in den sichtbaren Bereich kommt.
+ pEditView->pImpEditView->SetEditSelection( aFoundSel.Min() );
+ pEditView->ShowCursor( TRUE, FALSE );
+ pEditView->pImpEditView->SetEditSelection( aFoundSel );
+ }
+ else
+ pEditView->pImpEditView->SetEditSelection( aSel.Max() );
+
+ pEditView->pImpEditView->DrawSelection();
+ pEditView->ShowCursor( TRUE, FALSE );
+ return bFound;
+}
+
+USHORT ImpEditEngine::SearchAndReplace( const XubString& rBefore, const XubString& rAfter, EditView* pView )
+{
+ EditSelection aSel( pView->pImpEditView->GetEditSelection() );
+ aSel.Adjust( aEditDoc );
+
+ USHORT nStartNode, nEndNode;
+ EditSelection aTmpSel;
+
+ short nDiff = rAfter.Len() - rBefore.Len();
+ USHORT nReplaces = 0;
+
+ BOOL bRange = aSel.HasRange();
+ if ( bRange )
+ {
+ pView->pImpEditView->DrawSelection();
+ nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+ }
+ else
+ {
+ nStartNode = 0;
+ nEndNode = aEditDoc.Count()-1;
+ }
+
+ // ueber die Absaetze iterieren...
+ for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ {
+ ContentNode* pNode = aEditDoc.GetObject( nNode );
+ ParaPortion* pPortion = GetParaPortions().GetObject( nNode );
+
+ // pPortion koennte durch GetObject opimiert werden!
+ DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: Search&Replace" );
+ DBG_ASSERT( GetParaPortions().SaveGetObject( nNode ), "Portion nicht gefunden: Search&Replace" );
+
+ USHORT nStartPos = 0;
+ USHORT nEndPos = pNode->Len();
+ if ( bRange )
+ {
+ if ( nNode == nStartNode )
+ nStartPos = aSel.Min().GetIndex();
+ if ( nNode == nEndNode ) // kann auch == nStart sein!
+ nEndPos = aSel.Max().GetIndex();
+ }
+
+ USHORT nXStart = pNode->Search( rBefore, nStartPos );
+ while ( nXStart != STRING_NOTFOUND )
+ {
+ USHORT nXEnd = nXStart + rBefore.Len();
+ if ( nXEnd > nEndPos )
+ break;
+
+ // gefundenes Wort 'selektieren'
+ aTmpSel.Min().SetNode( pNode );
+ aTmpSel.Min().SetIndex( nXStart );
+ aTmpSel.Max().SetNode( pNode );
+ aTmpSel.Max().SetIndex( nXEnd );
+
+ ImpDeleteSelection( aTmpSel );
+ aTmpSel.Max().SetIndex( nXStart ); // schneller als = DeleteSel...
+ ImpInsertText( aTmpSel, rAfter );
+
+ // Selektion korrigieren...
+ if ( bRange && ( nNode == nEndNode ) )
+ {
+ aSel.Max().GetIndex() += nDiff;
+ pView->pImpEditView->SetEditSelection( aSel );
+ }
+
+ nEndPos += nDiff;
+ nReplaces++;
+
+ pPortion->MarkInvalid( nXStart, nDiff );
+ nXStart = pNode->Search( rBefore, nXStart+rAfter.Len() );
+ }
+ }
+
+ UpdateSelections();
+ FormatAndUpdate( pView );
+ return nReplaces;
+}
+
+EditPaM ImpEditEngine::Clear()
+{
+ InitDoc( FALSE );
+
+ EditPaM aPaM = aEditDoc.GetStartPaM();
+ EditSelection aSel( aPaM );
+
+ nCurTextHeight = 0;
+
+ ResetUndoManager();
+
+ for ( USHORT nView = aEditViews.Count(); nView; )
+ {
+ EditView* pView = aEditViews[--nView];
+ DBG_CHKOBJ( pView, EditView, 0 );
+ pView->pImpEditView->SetEditSelection( aSel );
+ }
+
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::RemoveText()
+{
+ InitDoc( TRUE );
+
+ EditPaM aStartPaM = aEditDoc.GetStartPaM();
+ EditSelection aEmptySel( aStartPaM, aStartPaM );
+ for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ )
+ {
+ EditView* pView = aEditViews.GetObject(nView);
+ DBG_CHKOBJ( pView, EditView, 0 );
+ pView->pImpEditView->SetEditSelection( aEmptySel );
+ }
+ ResetUndoManager();
+ return aEditDoc.GetStartPaM();
+}
+
+
+void ImpEditEngine::SetText( const XubString& rText )
+{
+ // RemoveText loescht die Undo-Liste!
+ EditPaM aStartPaM = RemoveText();
+ BOOL bUndoCurrentlyEnabled = IsUndoEnabled();
+ // Der von Hand reingesteckte Text kann nicht vom Anwender rueckgaengig gemacht werden.
+ EnableUndo( FALSE );
+
+ EditSelection aEmptySel( aStartPaM, aStartPaM );
+ EditPaM aPaM = aStartPaM;
+ if ( rText.Len() )
+ aPaM = ImpInsertText( aEmptySel, rText );
+
+ for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ )
+ {
+ EditView* pView = aEditViews[nView];
+ DBG_CHKOBJ( pView, EditView, 0 );
+ pView->pImpEditView->SetEditSelection( EditSelection( aPaM, aPaM ) );
+ // Wenn kein Text, dann auch Kein Format&Update
+ // => Der Text bleibt stehen.
+ if ( !rText.Len() && GetUpdateMode() )
+ {
+ Rectangle aTmpRec( pView->GetOutputArea().TopLeft(),
+ Size( aPaperSize.Width(), nCurTextHeight ) );
+ aTmpRec.Intersection( pView->GetOutputArea() );
+ pView->GetWindow()->Invalidate( aTmpRec );
+ }
+ }
+ if( !rText.Len() ) // sonst muss spaeter noch invalidiert werden, !bFormatted reicht.
+ nCurTextHeight = 0;
+ EnableUndo( bUndoCurrentlyEnabled );
+ DBG_ASSERT( !HasUndoManager() || !GetUndoManager().GetUndoActionCount(), "Undo nach SetText?" );
+}
+
+
+const SfxItemSet& ImpEditEngine::GetEmptyItemSet()
+{
+ if ( !pEmptyItemSet )
+ {
+ pEmptyItemSet = new SfxItemSet( aEditDoc.GetItemPool(), EE_ITEMS_START, EE_ITEMS_END );
+ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
+ {
+ pEmptyItemSet->ClearItem( nWhich );
+ }
+ }
+ return *pEmptyItemSet;
+}
+
+// ----------------------------------------------------------------------
+// MISC
+// ----------------------------------------------------------------------
+void ImpEditEngine::CursorMoved( ContentNode* pPrevNode )
+{
+ DBG_ASSERT( pPrevNode, "Woher komm ich ?" );
+
+ // Leere Attribute loeschen, aber nur, wenn Absatz nicht leer!
+ if ( pPrevNode->GetCharAttribs().HasEmptyAttribs() && pPrevNode->Len() )
+ pPrevNode->GetCharAttribs().DeleteEmptyAttribs( aEditDoc.GetItemPool() );
+}
+
+void ImpEditEngine::ParaAttribsChanged( ContentNode* pNode )
+{
+ DBG_ASSERT( pNode, "ParaAttribsChanged: Welcher?" );
+
+ aEditDoc.SetModified( TRUE );
+
+ ParaPortion* pPortion = FindParaPortion( pNode );
+ DBG_ASSERT( pPortion, "ParaAttribsChanged: Portion?" );
+ pPortion->MarkSelectionInvalid( 0, pNode->Len() );
+
+ USHORT nPara = aEditDoc.GetPos( pNode );
+ pEditEngine->ParaAttribsChanged( nPara );
+
+ ParaPortion* pNextPortion = GetParaPortions().SaveGetObject( nPara+1 );
+ // => wird sowieso noch formatiert, wenn Invalid.
+ if ( pNextPortion && !pNextPortion->IsInvalid() )
+ CalcHeight( pNextPortion );
+}
+
+// ----------------------------------------------------------------------
+// Cursorbewegungen
+// ----------------------------------------------------------------------
+
+EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pEditView )
+{
+ // Eigentlich nur bei Up/Down noetig, aber was solls.
+ CheckIdleFormatter();
+
+ EditPaM aPaM( pEditView->pImpEditView->GetEditSelection().Max() );
+
+ EditPaM aOldPaM( aPaM );
+
+ BOOL bCtrl = rKeyEvent.GetKeyCode().IsMod1() ? TRUE : FALSE;
+
+ switch ( rKeyEvent.GetKeyCode().GetCode() )
+ {
+ case KEY_UP: aPaM = CursorUp( aPaM, pEditView );
+ break;
+ case KEY_DOWN: aPaM = CursorDown( aPaM, pEditView );
+ break;
+ case KEY_HOME: aPaM = bCtrl ? CursorStartOfDoc() : CursorStartOfLine( aPaM );
+ break;
+ case KEY_END: aPaM = bCtrl ? CursorEndOfDoc() : CursorEndOfLine( aPaM );
+ break;
+ case KEY_PAGEUP: aPaM = bCtrl ? CursorStartOfDoc() : PageUp( aPaM, pEditView );
+ break;
+ case KEY_PAGEDOWN: aPaM = bCtrl ? CursorEndOfDoc() : PageDown( aPaM, pEditView );
+ break;
+ case KEY_LEFT: aPaM = bCtrl ? WordLeft( aPaM ) : CursorLeft( aPaM );
+ break;
+ case KEY_RIGHT: aPaM = bCtrl ? WordRight( aPaM ) : CursorRight( aPaM );
+ break;
+ }
+
+ if ( aOldPaM != aPaM )
+ {
+ CursorMoved( aOldPaM.GetNode() );
+ if ( aStatus.NotifyCursorMovements() && ( aOldPaM.GetNode() != aPaM.GetNode() ) )
+ {
+ aStatus.GetStatusWord() = aStatus.GetStatusWord() | EE_STAT_CRSRLEFTPARA;
+ aStatus.GetPrevParagraph() = aEditDoc.GetPos( aOldPaM.GetNode() );
+ }
+ }
+ else
+ aStatus.GetStatusWord() = aStatus.GetStatusWord() | EE_STAT_CRSRMOVEFAIL;
+
+ // Bewirkt evtl. ein CreateAnchor oder Deselection all
+ aSelEngine.SetCurView( pEditView );
+ aSelEngine.CursorPosChanging( rKeyEvent.GetKeyCode().IsShift(), rKeyEvent.GetKeyCode().IsMod1() );
+ EditPaM aOldEnd( pEditView->pImpEditView->GetEditSelection().Max() );
+ pEditView->pImpEditView->GetEditSelection().Max() = aPaM;
+ if ( rKeyEvent.GetKeyCode().IsShift() )
+ {
+ // Dann wird die Selektion erweitert...
+ EditSelection aTmpNewSel( aOldEnd, aPaM );
+ pEditView->pImpEditView->DrawSelection( aTmpNewSel );
+ }
+ else
+ pEditView->pImpEditView->GetEditSelection().Min() = aPaM;
+
+ return pEditView->pImpEditView->GetEditSelection();
+}
+
+EditPaM ImpEditEngine::CursorLeft( const EditPaM& rPaM )
+{
+ EditPaM aNewPaM( rPaM );
+
+ if ( rPaM.GetIndex() )
+ {
+ uno::Reference < text::XBreakIterator > xBI = ImplGetBreakIterator();
+ sal_Int32 nCount = 1;
+ aNewPaM.SetIndex( xBI->previousCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale(), text::CharacterIteratorMode::SKIPCHARACTER, nCount, nCount ) );
+ }
+ else
+ {
+ ContentNode* pNode = rPaM.GetNode();
+ pNode = GetPrevVisNode( pNode );
+ if ( pNode )
+ {
+ aNewPaM.SetNode( pNode );
+ aNewPaM.SetIndex( pNode->Len() );
+ }
+ }
+
+ return aNewPaM;
+}
+
+EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM )
+{
+ EditPaM aNewPaM( rPaM );
+ if ( rPaM.GetIndex() < rPaM.GetNode()->Len() )
+ {
+ uno::Reference < text::XBreakIterator > xBI = ImplGetBreakIterator();
+ sal_Int32 nCount = 1;
+ aNewPaM.SetIndex( xBI->nextCharacters( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale(), text::CharacterIteratorMode::SKIPCHARACTER, nCount, nCount ) );
+ }
+ else
+ {
+ ContentNode* pNode = rPaM.GetNode();
+ pNode = GetNextVisNode( pNode );
+ if ( pNode )
+ {
+ aNewPaM.SetNode( pNode );
+ aNewPaM.SetIndex( 0 );
+ }
+ }
+
+ return aNewPaM;
+}
+
+EditPaM ImpEditEngine::CursorUp( const EditPaM& rPaM, EditView* pView )
+{
+ DBG_ASSERT( pView, "Keine View - Keine Cursorbewegung!" );
+
+ ParaPortion* pPPortion = FindParaPortion( rPaM.GetNode() );
+ DBG_ASSERT( pPPortion, "Keine passende Portion gefunden: CursorUp" );
+ USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex() );
+ EditLine* pLine = pPPortion->GetLines().GetObject( nLine );
+
+ long nX;
+ if ( pView->pImpEditView->nTravelXPos == TRAVEL_X_DONTKNOW )
+ {
+ nX = pPPortion->GetXPos( pLine, rPaM.GetIndex() );
+ pView->pImpEditView->nTravelXPos = nX+nOnePixelInRef;
+ }
+ else
+ nX = pView->pImpEditView->nTravelXPos;
+
+ EditPaM aNewPaM( rPaM );
+ if ( nLine ) // gleicher Absatz
+ {
+ EditLine* pPrevLine = pPPortion->GetLines().GetObject(nLine-1);
+ aNewPaM.SetIndex( pPPortion->GetChar( pPrevLine, nX ) );
+ // Wenn davor eine autom.Umgebrochene Zeile, und ich muss genau an das
+ // Ende dieser Zeile, landet der Cursor in der aktuellen Zeile am Anfang
+ // Siehe Problem: Letztes Zeichen einer autom.umgebr. Zeile = Cursor
+ if ( aNewPaM.GetIndex() && ( aNewPaM.GetIndex() == pLine->GetStart() ) )
+ aNewPaM = CursorLeft( aNewPaM );
+ }
+ else // vorheriger Absatz
+ {
+ ParaPortion* pPrevPortion = GetPrevVisPortion( pPPortion );
+ if ( pPrevPortion )
+ {
+ pLine = pPrevPortion->GetLines().GetObject( pPrevPortion->GetLines().Count()-1 );
+ DBG_ASSERT( pLine, "Zeile davor nicht gefunden: CursorUp" );
+ aNewPaM.SetNode( pPrevPortion->GetNode() );
+ aNewPaM.SetIndex( pPrevPortion->GetChar( pLine, nX+nOnePixelInRef ) );
+ }
+ }
+
+ return aNewPaM;
+}
+
+EditPaM ImpEditEngine::CursorDown( const EditPaM& rPaM, EditView* pView )
+{
+ DBG_ASSERT( pView, "Keine View - Keine Cursorbewegung!" );
+
+ ParaPortion* pPPortion = FindParaPortion( rPaM.GetNode() );
+ DBG_ASSERT( pPPortion, "Keine passende Portion gefunden: CursorDown" );
+ USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex() );
+
+ long nX;
+ if ( pView->pImpEditView->nTravelXPos == TRAVEL_X_DONTKNOW )
+ {
+ EditLine* pLine = pPPortion->GetLines().GetObject(nLine);
+ nX = pPPortion->GetXPos( pLine, rPaM.GetIndex() );
+ pView->pImpEditView->nTravelXPos = nX+nOnePixelInRef;
+ }
+ else
+ nX = pView->pImpEditView->nTravelXPos;
+
+ EditPaM aNewPaM( rPaM );
+ if ( nLine < pPPortion->GetLines().Count()-1 )
+ {
+ EditLine* pNextLine = pPPortion->GetLines().GetObject(nLine+1);
+ aNewPaM.SetIndex( pPPortion->GetChar( pNextLine, nX ) );
+ // Sonderbehandlung siehe CursorUp...
+ if ( ( aNewPaM.GetIndex() == pNextLine->GetEnd() ) && ( aNewPaM.GetIndex() > pNextLine->GetStart() ) && ( aNewPaM.GetIndex() < pPPortion->GetNode()->Len() ) )
+ aNewPaM = CursorLeft( aNewPaM );
+ }
+ else // naechster Absatz
+ {
+ ParaPortion* pNextPortion = GetNextVisPortion( pPPortion );
+ if ( pNextPortion )
+ {
+ EditLine* pLine = pNextPortion->GetLines().GetObject(0);
+ DBG_ASSERT( pLine, "Zeile davor nicht gefunden: CursorUp" );
+ aNewPaM.SetNode( pNextPortion->GetNode() );
+ // Nie ganz ans Ende wenn mehrere Zeilen, da dann eine
+ // Zeile darunter der Cursor angezeigt wird.
+ aNewPaM.SetIndex( pNextPortion->GetChar( pLine, nX+nOnePixelInRef ) );
+ if ( ( aNewPaM.GetIndex() == pLine->GetEnd() ) && ( aNewPaM.GetIndex() > pLine->GetStart() ) && ( pNextPortion->GetLines().Count() > 1 ) )
+ aNewPaM = CursorLeft( aNewPaM );
+ }
+ }
+
+ return aNewPaM;
+}
+
+EditPaM ImpEditEngine::CursorStartOfLine( const EditPaM& rPaM )
+{
+ ParaPortion* pCurPortion = FindParaPortion( rPaM.GetNode() );
+ DBG_ASSERT( pCurPortion, "Keine Portion fuer den PaM ?" );
+ USHORT nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() );
+ EditLine* pLine = pCurPortion->GetLines().GetObject(nLine);
+ DBG_ASSERT( pLine, "Aktuelle Zeile nicht gefunden ?!" );
+
+ EditPaM aNewPaM( rPaM );
+ aNewPaM.SetIndex( pLine->GetStart() );
+ return aNewPaM;
+}
+
+EditPaM ImpEditEngine::CursorEndOfLine( const EditPaM& rPaM )
+{
+ ParaPortion* pCurPortion = FindParaPortion( rPaM.GetNode() );
+ DBG_ASSERT( pCurPortion, "Keine Portion fuer den PaM ?" );
+ USHORT nLine = pCurPortion->GetLineNumber( rPaM.GetIndex() );
+ EditLine* pLine = pCurPortion->GetLines().GetObject(nLine);
+ DBG_ASSERT( pLine, "Aktuelle Zeile nicht gefunden ?!" );
+
+ EditPaM aNewPaM( rPaM );
+ aNewPaM.SetIndex( pLine->GetEnd() );
+ if ( pLine->GetEnd() > pLine->GetStart() )
+ {
+ xub_Unicode cLastChar = aNewPaM.GetNode()->GetChar( aNewPaM.GetIndex()-1 );
+ if ( aNewPaM.GetNode()->IsFeature( aNewPaM.GetIndex() - 1 ) )
+ {
+ // Bei einem weichen Umbruch muss ich davor stehen!
+ EditCharAttrib* pNextFeature = aNewPaM.GetNode()->GetCharAttribs().FindFeature( aNewPaM.GetIndex()-1 );
+ if ( pNextFeature && ( pNextFeature->GetItem()->Which() == EE_FEATURE_LINEBR ) )
+ aNewPaM = CursorLeft( aNewPaM );
+ }
+ else if ( ( aNewPaM.GetNode()->GetChar( aNewPaM.GetIndex() - 1 ) == ' ' ) && ( aNewPaM.GetIndex() != aNewPaM.GetNode()->Len() ) )
+ {
+ // Bei einem Blank in einer autom. umgebrochenen Zeile macht es Sinn,
+ // davor zu stehen, da der Anwender hinter das Wort will.
+ // Wenn diese geaendert wird, Sonderbehandlung fuer Pos1 nach End!
+ aNewPaM = CursorLeft( aNewPaM );
+ }
+ }
+ return aNewPaM;
+}
+
+EditPaM ImpEditEngine::CursorStartOfParagraph( const EditPaM& rPaM )
+{
+ EditPaM aPaM( rPaM.GetNode(), 0 );
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::CursorEndOfParagraph( const EditPaM& rPaM )
+{
+ EditPaM aPaM( rPaM.GetNode(), rPaM.GetNode()->Len() );
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::CursorStartOfDoc()
+{
+ EditPaM aPaM( aEditDoc.SaveGetObject( 0 ), 0 );
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::CursorEndOfDoc()
+{
+ ContentNode* pLastNode = aEditDoc.SaveGetObject( aEditDoc.Count()-1 );
+ ParaPortion* pLastPortion = GetParaPortions().SaveGetObject( aEditDoc.Count()-1 );
+ DBG_ASSERT( pLastNode && pLastPortion, "CursorEndOfDoc: Node oder Portion nicht gefunden" );
+
+ if ( !pLastPortion->IsVisible() )
+ {
+ pLastNode = GetPrevVisNode( pLastPortion->GetNode() );
+ DBG_ASSERT( pLastNode, "Kein sichtbarer Absatz?" );
+ if ( !pLastNode )
+ pLastNode = aEditDoc.SaveGetObject( aEditDoc.Count()-1 );
+ }
+
+ EditPaM aPaM( pLastNode, pLastNode->Len() );
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::PageUp( const EditPaM& rPaM, EditView* pView )
+{
+ Rectangle aRec = PaMtoEditCursor( rPaM );
+ Point aTopLeft = aRec.TopLeft();
+ aTopLeft.Y() -= pView->GetVisArea().GetHeight() *9/10;
+ aTopLeft.X() += nOnePixelInRef;
+ if ( aTopLeft.Y() < 0 )
+ {
+ aTopLeft.Y() = 0;
+ }
+ return GetPaM( aTopLeft );
+}
+
+EditPaM ImpEditEngine::PageDown( const EditPaM& rPaM, EditView* pView )
+{
+ Rectangle aRec = PaMtoEditCursor( rPaM );
+ Point aBottomRight = aRec.BottomRight();
+ aBottomRight.Y() += pView->GetVisArea().GetHeight() *9/10;
+ aBottomRight.X() += nOnePixelInRef;
+ long nHeight = GetTextHeight();
+ if ( aBottomRight.Y() > nHeight )
+ {
+ aBottomRight.Y() = nHeight-2;
+ }
+ return GetPaM( aBottomRight );
+}
+
+EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType )
+{
+ USHORT nCurrentPos = rPaM.GetIndex();
+ EditPaM aNewPaM( rPaM );
+ if ( nCurrentPos == 0 )
+ {
+ // Vorheriger Absatz...
+ USHORT nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() );
+ ContentNode* pPrevNode = aEditDoc.SaveGetObject( --nCurPara );
+ if ( pPrevNode )
+ {
+ aNewPaM.SetNode( pPrevNode );
+ aNewPaM.SetIndex( pPrevNode->Len() );
+ }
+ }
+ else
+ {
+ uno::Reference < text::XBreakIterator > xBI = ImplGetBreakIterator();
+ text::Boundary aBoundary = xBI->getWordBoundary( *aNewPaM.GetNode(), nCurrentPos, GetLocale(), nWordType, sal_True );
+ if ( aBoundary.startPos == nCurrentPos )
+ aBoundary = xBI->previousWord( *aNewPaM.GetNode(), nCurrentPos, GetLocale(), nWordType );
+ aNewPaM.SetIndex( aBoundary.startPos );
+ }
+
+ return aNewPaM;
+}
+
+EditPaM ImpEditEngine::WordRight( const EditPaM& rPaM, sal_Int16 nWordType )
+{
+ xub_StrLen nMax = rPaM.GetNode()->Len();
+ EditPaM aNewPaM( rPaM );
+ if ( aNewPaM.GetIndex() >= nMax )
+ {
+ // Naechster Absatz...
+ USHORT nCurPara = aEditDoc.GetPos( aNewPaM.GetNode() );
+ ContentNode* pNextNode = aEditDoc.SaveGetObject( ++nCurPara );
+ if ( pNextNode )
+ {
+ aNewPaM.SetNode( pNextNode );
+ aNewPaM.SetIndex( 0 );
+ }
+ }
+ else
+ {
+ uno::Reference < text::XBreakIterator > xBI = ImplGetBreakIterator();
+ text::Boundary aBoundary = xBI->nextWord( *aNewPaM.GetNode(), aNewPaM.GetIndex(), GetLocale(), nWordType );
+ aNewPaM.SetIndex( aBoundary.startPos );
+ }
+ return aNewPaM;
+}
+
+EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType )
+{
+ EditPaM aNewPaM( rPaM );
+ uno::Reference < text::XBreakIterator > xBI = ImplGetBreakIterator();
+ text::Boundary aBoundary = xBI->getWordBoundary( *rPaM.GetNode(), rPaM.GetIndex(), GetLocale(), nWordType, sal_True );
+ aNewPaM.SetIndex( aBoundary.startPos );
+ return aNewPaM;
+}
+
+EditPaM ImpEditEngine::EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType )
+{
+ EditPaM aNewPaM( rPaM );
+ uno::Reference < text::XBreakIterator > xBI = ImplGetBreakIterator();
+ text::Boundary aBoundary = xBI->getWordBoundary( *rPaM.GetNode(), rPaM.GetIndex(), GetLocale(), nWordType, sal_True );
+ aNewPaM.SetIndex( aBoundary.endPos );
+ return aNewPaM;
+}
+
+EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16 nWordType )
+{
+ EditSelection aNewSel( rCurSel );
+ EditPaM aPaM( rCurSel.Max() );
+ uno::Reference < text::XBreakIterator > xBI = ImplGetBreakIterator();
+ sal_Int16 nType = xBI->getWordType( *aPaM.GetNode(), aPaM.GetIndex(), GetLocale() );
+ if ( nType == text::WordType::ANY_WORD )
+ {
+ text::Boundary aBoundary = xBI->getWordBoundary( *aPaM.GetNode(), aPaM.GetIndex(), GetLocale(), nWordType, sal_True );
+ aNewSel.Min().SetIndex( aBoundary.startPos );
+ aNewSel.Max().SetIndex( aBoundary.endPos );
+ }
+
+ return aNewSel;
+}
+
+// ----------------------------------------------------------------------
+// Textaenderung
+// ----------------------------------------------------------------------
+
+void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, USHORT nChars, EditUndoRemoveChars* pCurUndo )
+{
+ if ( IsUndoEnabled() && !IsInUndo() )
+ {
+ XubString aStr( rPaM.GetNode()->Copy( rPaM.GetIndex(), nChars ) );
+
+ // Pruefen, ob Attribute geloescht oder geaendert werden:
+ USHORT nStart = rPaM.GetIndex();
+ USHORT nEnd = nStart + nChars;
+ CharAttribArray& rAttribs = rPaM.GetNode()->GetCharAttribs().GetAttribs();
+ USHORT nAttrs = rAttribs.Count();
+ for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
+ {
+ EditCharAttrib* pAttr = rAttribs[nAttr];
+ if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetStart() < nEnd ) )
+ {
+ EditSelection aSel( rPaM );
+ aSel.Max().GetIndex() += nChars;
+ EditUndoSetAttribs* pAttrUndo = CreateAttribUndo( aSel, GetEmptyItemSet() );
+ InsertUndo( pAttrUndo );
+ break; // for
+ }
+ }
+ if ( pCurUndo && ( CreateEditPaM( pCurUndo->GetEPaM() ) == rPaM ) )
+ pCurUndo->GetStr() += aStr;
+ else
+ InsertUndo( new EditUndoRemoveChars( this, CreateEPaM( rPaM ), aStr ) );
+ }
+
+ aEditDoc.RemoveChars( rPaM, nChars );
+}
+
+EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, USHORT nNewPos )
+{
+
+ aOldPositions.Justify();
+ BOOL bValidAction = ( (long)nNewPos < aOldPositions.Min() ) || ( (long)nNewPos > aOldPositions.Max() );
+ DBG_ASSERT( bValidAction, "Move in sich selbst ?" );
+ DBG_ASSERT( aOldPositions.Max() <= (long)GetParaPortions().Count(), "Voll drueber weg: MoveParagraphs" );
+
+ EditSelection aSelection;
+
+ if ( !bValidAction )
+ {
+ aSelection = aEditDoc.GetStartPaM();
+ return aSelection;
+ }
+
+ ULONG nParaCount = GetParaPortions().Count();
+
+ if ( nNewPos >= nParaCount )
+ nNewPos = GetParaPortions().Count();
+
+ // Height may change when moving first or last Paragraph
+ ParaPortion* pRecalc1 = NULL;
+ ParaPortion* pRecalc2 = NULL;
+ ParaPortion* pRecalc3 = NULL;
+ ParaPortion* pRecalc4 = NULL;
+
+ if ( nNewPos == 0 ) // Move to Start
+ {
+ pRecalc1 = GetParaPortions().GetObject( 0 );
+ pRecalc2 = GetParaPortions().GetObject( aOldPositions.Min() );
+
+ }
+ else if ( nNewPos == nParaCount )
+ {
+ pRecalc1 = GetParaPortions().GetObject( nParaCount-1 );
+ pRecalc2 = GetParaPortions().GetObject( aOldPositions.Max() );
+ }
+
+ if ( aOldPositions.Min() == 0 ) // Move from Start
+ {
+ pRecalc3 = GetParaPortions().GetObject( 0 );
+ pRecalc4 = GetParaPortions().GetObject( aOldPositions.Max()+1 );
+ }
+ else if ( aOldPositions.Max() == (nParaCount-1) )
+ {
+ pRecalc3 = GetParaPortions().GetObject( aOldPositions.Max() );
+ pRecalc4 = GetParaPortions().GetObject( aOldPositions.Min()-1 );
+ }
+
+ if ( IsUndoEnabled() && !IsInUndo())
+ InsertUndo( new EditUndoMoveParagraphs( this, aOldPositions, nNewPos ) );
+
+ // Position nicht aus dem Auge verlieren!
+ ParaPortion* pDestPortion = GetParaPortions().SaveGetObject( nNewPos );
+
+ ParaPortionList aTmpPortionList;
+ USHORT i;
+ for ( i = (USHORT)aOldPositions.Min(); i <= (USHORT)aOldPositions.Max(); i++ )
+ {
+ // Immer aOldPositions.Min(), da Remove().
+ ParaPortion* pTmpPortion = GetParaPortions().GetObject( (USHORT)aOldPositions.Min() );
+ GetParaPortions().Remove( (USHORT)aOldPositions.Min() );
+ aEditDoc.Remove( (USHORT)aOldPositions.Min() );
+ aTmpPortionList.Insert( pTmpPortion, aTmpPortionList.Count() );
+ }
+
+ USHORT nRealNewPos = pDestPortion ? GetParaPortions().GetPos( pDestPortion ) : GetParaPortions().Count();
+ DBG_ASSERT( nRealNewPos != USHRT_MAX, "ImpMoveParagraphs: Ungueltige Position!" );
+
+ for ( i = 0; i < (USHORT)aTmpPortionList.Count(); i++ )
+ {
+ ParaPortion* pTmpPortion = aTmpPortionList.GetObject( i );
+ if ( i == 0 )
+ aSelection.Min().SetNode( pTmpPortion->GetNode() );
+
+ aSelection.Max().SetNode( pTmpPortion->GetNode() );
+ aSelection.Max().SetIndex( pTmpPortion->GetNode()->Len() );
+
+ ContentNode* pN = pTmpPortion->GetNode();
+ aEditDoc.Insert( pN, nRealNewPos+i );
+
+ GetParaPortions().Insert( pTmpPortion, nRealNewPos+i );
+ }
+
+ aEditDoc.SetModified( TRUE );
+
+ if ( pRecalc1 )
+ CalcHeight( pRecalc1 );
+ if ( pRecalc2 )
+ CalcHeight( pRecalc2 );
+ if ( pRecalc3 )
+ CalcHeight( pRecalc3 );
+ if ( pRecalc4 )
+ CalcHeight( pRecalc4 );
+
+ aTmpPortionList.Remove( 0, aTmpPortionList.Count() ); // wichtig !
+
+#ifdef EDITDEBUG
+ GetParaPortions().DbgCheck(aEditDoc);
+#endif
+ return aSelection;
+}
+
+
+EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pRight, BOOL bBackward )
+{
+ DBG_ASSERT( pLeft != pRight, "Den gleichen Absatz zusammenfuegen ?" );
+ DBG_ASSERT( aEditDoc.GetPos( pLeft ) != USHRT_MAX, "Einzufuegenden Node nicht gefunden(1)" );
+ DBG_ASSERT( aEditDoc.GetPos( pRight ) != USHRT_MAX, "Einzufuegenden Node nicht gefunden(2)" );
+
+ USHORT nParagraphTobeDeleted = aEditDoc.GetPos( pRight );
+ DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pRight, nParagraphTobeDeleted );
+ aDeletedNodes.Insert( pInf, aDeletedNodes.Count() );
+
+ if ( IsUndoEnabled() && !IsInUndo() )
+ {
+ InsertUndo( new EditUndoConnectParas( this,
+ aEditDoc.GetPos( pLeft ), pLeft->Len(),
+ pLeft->GetContentAttribs().GetItems(), pRight->GetContentAttribs().GetItems(),
+ pLeft->GetStyleSheet(), pRight->GetStyleSheet(), bBackward ) );
+ }
+
+ if ( bBackward )
+ {
+ pLeft->SetStyleSheet( pRight->GetStyleSheet(), TRUE );
+ pLeft->GetContentAttribs().GetItems().Set( pRight->GetContentAttribs().GetItems() );
+ pLeft->GetCharAttribs().GetDefFont() = pRight->GetCharAttribs().GetDefFont();
+ }
+
+ ParaAttribsChanged( pLeft );
+
+ // Erstmal Portions suchen, da pRight nach ConnectParagraphs weg.
+ ParaPortion* pLeftPortion = FindParaPortion( pLeft );
+ ParaPortion* pRightPortion = FindParaPortion( pRight );
+ DBG_ASSERT( pLeftPortion, "Blinde Portion in ImpConnectParagraphs(1)" );
+ DBG_ASSERT( pRightPortion, "Blinde Portion in ImpConnectParagraphs(2)" );
+
+#ifndef SVX_LIGHT
+ if ( GetStatus().DoOnlineSpelling() )
+ {
+ xub_StrLen nEnd = pLeft->Len();
+ xub_StrLen nInv = nEnd ? nEnd-1 : nEnd;
+ pLeft->GetWrongList()->ClearWrongs( nInv, 0xFFFF, pLeft ); // Evtl. einen wegnehmen
+ pLeft->GetWrongList()->MarkInvalid( nInv, nEnd+1 );
+ // Falschgeschriebene Woerter ruebernehmen:
+ USHORT nRWrongs = pRight->GetWrongList()->Count();
+ for ( USHORT nW = 0; nW < nRWrongs; nW++ )
+ {
+ WrongRange aWrong = pRight->GetWrongList()->GetObject( nW );
+ if ( aWrong.nStart != 0 ) // Nicht ein anschliessender
+ {
+ aWrong.nStart += nEnd;
+ aWrong.nEnd += nEnd;
+ pLeft->GetWrongList()->InsertWrong( aWrong, pLeft->GetWrongList()->Count() );
+ }
+ }
+ }
+#endif
+
+ EditPaM aPaM = aEditDoc.ConnectParagraphs( pLeft, pRight );
+ if ( IsCallParaInsertedOrDeleted() )
+ GetEditEnginePtr()->ParagraphDeleted( nParagraphTobeDeleted );
+
+ pLeftPortion->MarkSelectionInvalid( aPaM.GetIndex(), pLeft->Len() );
+
+ DBG_ASSERT( nParagraphTobeDeleted == GetParaPortions().GetPos( pRightPortion ), "NodePos != PortionPos?" );
+ GetParaPortions().Remove( nParagraphTobeDeleted );
+ delete pRightPortion;
+ // der rechte Node wird von EditDoc::ConnectParagraphs() geloescht.
+
+ if ( GetTextRanger() )
+ {
+ // Durch das zusammenfuegen wird der linke zwar neu formatiert, aber
+ // wenn sich dessen Hoehe nicht aendert bekommt die Formatierung die
+ // Aenderung der Gesaamthoehe des Textes zu spaet mit...
+ for ( USHORT n = nParagraphTobeDeleted; n < GetParaPortions().Count(); n++ )
+ {
+ ParaPortion* pPP = GetParaPortions().GetObject( n );
+ pPP->MarkSelectionInvalid( 0, pPP->GetNode()->Len() );
+ pPP->GetLines().Reset();
+ }
+ }
+
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, BYTE nMode, BYTE nDelMode )
+{
+ DBG_ASSERT( !EditSelection( rSel ).DbgIsBuggy( aEditDoc ), "Index im Wald in DeleteLeftOrRight" )
+
+ if ( rSel.HasRange() ) // dann nur Sel. loeschen
+ return ImpDeleteSelection( rSel );
+
+ const EditPaM aCurPos( rSel.Max() );
+ EditPaM aDelStart( aCurPos );
+ EditPaM aDelEnd( aCurPos );
+ if ( nMode == DEL_LEFT )
+ {
+ if ( nDelMode == DELMODE_SIMPLE )
+ {
+ aDelStart = CursorLeft( aCurPos );
+ }
+ else if ( nDelMode == DELMODE_RESTOFWORD )
+ {
+ aDelStart = StartOfWord( aCurPos );
+ if ( aDelStart.GetIndex() == aCurPos.GetIndex() )
+ aDelStart = WordLeft( aCurPos );
+ }
+ else // DELMODE_RESTOFCONTENT
+ {
+ aDelStart.SetIndex( 0 );
+ if ( aDelStart == aCurPos )
+ {
+ // kompletter Absatz davor
+ ContentNode* pPrev = GetPrevVisNode( aCurPos.GetNode() );
+ if ( pPrev )
+ aDelStart = EditPaM( pPrev, 0 );
+ }
+ }
+ }
+ else
+ {
+ if ( nDelMode == DELMODE_SIMPLE )
+ {
+ aDelEnd = CursorRight( aCurPos );
+ }
+ else if ( nDelMode == DELMODE_RESTOFWORD )
+ {
+ aDelEnd = EndOfWord( aCurPos );
+ if ( aDelEnd.GetIndex() == aCurPos.GetIndex() )
+ aDelEnd = WordLeft( aCurPos );
+ }
+ else // DELMODE_RESTOFCONTENT
+ {
+ aDelEnd.SetIndex( aCurPos.GetNode()->Len() );
+ if ( aDelEnd == aCurPos )
+ {
+ // kompletter Absatz dahinter
+ ContentNode* pNext = GetNextVisNode( aCurPos.GetNode() );
+ if ( pNext )
+ aDelEnd = EditPaM( pNext, pNext->Len() );
+ }
+ }
+ }
+
+ // Bei DELMODE_RESTOFCONTENT reicht bei verschiedenen Nodes
+ // kein ConnectParagraphs.
+ if ( ( nDelMode == DELMODE_RESTOFCONTENT ) || ( aDelStart.GetNode() == aDelEnd.GetNode() ) )
+ return ImpDeleteSelection( EditSelection( aDelStart, aDelEnd ) );
+
+ // Jetzt entscheiden, ob noch Selektion loeschen (RESTOFCONTENTS)
+ BOOL bSpecialBackward = ( ( nMode == DEL_LEFT ) && ( nDelMode == DELMODE_SIMPLE ) )
+ ? TRUE : FALSE;
+ if ( aStatus.IsAnyOutliner() )
+ bSpecialBackward = FALSE;
+
+ return ImpConnectParagraphs( aDelStart.GetNode(), aDelEnd.GetNode(), bSpecialBackward );
+}
+
+EditPaM ImpEditEngine::ImpDeleteSelection( EditSelection aSel )
+{
+ if ( !aSel.HasRange() )
+ return aSel.Min();
+
+ aSel.Adjust( aEditDoc );
+ EditPaM aStartPaM( aSel.Min() );
+ EditPaM aEndPaM( aSel.Max() );
+
+ CursorMoved( aStartPaM.GetNode() ); // nur damit neu eingestellte Attribute verschwinden...
+ CursorMoved( aEndPaM.GetNode() ); // nur damit neu eingestellte Attribute verschwinden...
+
+ DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index im Wald in ImpDeleteSelection" )
+ DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index im Wald in ImpDeleteSelection" )
+
+ USHORT nStartNode = aEditDoc.GetPos( aStartPaM.GetNode() );
+ USHORT nEndNode = aEditDoc.GetPos( aEndPaM.GetNode() );
+
+ DBG_ASSERT( nEndNode != USHRT_MAX, "Start > End ?!" );
+ DBG_ASSERT( nStartNode <= nEndNode, "Start > End ?!" );
+
+ // Alle Nodes dazwischen entfernen....
+ for ( ULONG z = nStartNode+1; z < nEndNode; z++ )
+ {
+ // Immer nStartNode+1, wegen Remove()!
+ ImpRemoveParagraph( nStartNode+1 );
+ }
+
+ if ( aStartPaM.GetNode() != aEndPaM.GetNode() )
+ {
+ // Den Rest des StartNodes...
+ USHORT nChars;
+ nChars = aStartPaM.GetNode()->Len() - aStartPaM.GetIndex();
+ ImpRemoveChars( aStartPaM, nChars );
+ ParaPortion* pPortion = FindParaPortion( aStartPaM.GetNode() );
+ DBG_ASSERT( pPortion, "Blinde Portion in ImpDeleteSelection(3)" );
+ pPortion->MarkSelectionInvalid( aStartPaM.GetIndex(), aStartPaM.GetNode()->Len() );
+
+ // Den Anfang des EndNodes....
+ nChars = aEndPaM.GetIndex();
+ aEndPaM.SetIndex( 0 );
+ ImpRemoveChars( aEndPaM, nChars );
+ pPortion = FindParaPortion( aEndPaM.GetNode() );
+ DBG_ASSERT( pPortion, "Blinde Portion in ImpDeleteSelection(4)" );
+ pPortion->MarkSelectionInvalid( 0, aEndPaM.GetNode()->Len() );
+ // Zusammenfuegen....
+ aStartPaM = ImpConnectParagraphs( aStartPaM.GetNode(), aEndPaM.GetNode() );
+ }
+ else
+ {
+ USHORT nChars;
+ nChars = aEndPaM.GetIndex() - aStartPaM.GetIndex();
+ ImpRemoveChars( aStartPaM, nChars );
+ ParaPortion* pPortion = FindParaPortion( aStartPaM.GetNode() );
+ DBG_ASSERT( pPortion, "Blinde Portion in ImpDeleteSelection(5)" );
+ pPortion->MarkInvalid( aEndPaM.GetIndex(), aStartPaM.GetIndex() - aEndPaM.GetIndex() );
+ }
+
+ UpdateSelections();
+ TextModified();
+ return aStartPaM;
+}
+
+void ImpEditEngine::ImpRemoveParagraph( USHORT nPara )
+{
+ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+ ContentNode* pNextNode = aEditDoc.SaveGetObject( nPara+1 );
+ ParaPortion* pPortion = GetParaPortions().SaveGetObject( nPara );
+
+ DBG_ASSERT( pNode, "Blinder Node in ImpRemoveParagraph" );
+ DBG_ASSERT( pPortion, "Blinde Portion in ImpRemoveParagraph(2)" );
+
+ DeletedNodeInfo* pInf = new DeletedNodeInfo( (ULONG)pNode, nPara );
+ aDeletedNodes.Insert( pInf, aDeletedNodes.Count() );
+
+ // Der Node wird vom Undo verwaltet und ggf. zerstoert!
+ /* delete */ aEditDoc.Remove( nPara );
+ GetParaPortions().Remove( nPara );
+ delete pPortion;
+ if ( IsCallParaInsertedOrDeleted() )
+ GetEditEnginePtr()->ParagraphDeleted( nPara );
+
+ // Im folgenden muss ggf. Extra-Space neu ermittelt werden.
+ // Bei ParaAttribsChanged wird leider der Absatz neu formatiert,
+ // aber diese Methode sollte nicht Zeitkritsch sein!
+ if ( pNextNode )
+ ParaAttribsChanged( pNextNode );
+
+ if ( IsUndoEnabled() && !IsInUndo() )
+ InsertUndo( new EditUndoDelContent( this, pNode, nPara ) );
+ else
+ {
+ aEditDoc.RemoveItemsFromPool( pNode );
+ if ( pNode->GetStyleSheet() )
+ EndListening( *pNode->GetStyleSheet(), FALSE );
+ delete pNode;
+ }
+}
+
+EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, BOOL bOverwrite )
+{
+ EditSelection aSel( rCurSel );
+#ifndef SVX_LIGHT
+ SvxAutoCorrect* pAutoCorrect = EE_DLL()->GetGlobalData()->GetAutoCorrect();
+ if ( pAutoCorrect )
+ {
+ if ( aSel.HasRange() )
+ aSel = ImpDeleteSelection( rCurSel );
+ ContentNode* pNode = aSel.Max().GetNode();
+ USHORT nIndex = aSel.Max().GetIndex();
+ EdtAutoCorrDoc aAuto( this, pNode, nIndex, c );
+ pAutoCorrect->AutoCorrect( aAuto, *pNode, nIndex, c, !bOverwrite );
+ aSel.Max().SetIndex( aAuto.GetCursor() );
+ }
+#endif // !SVX_LIGHT
+ return aSel.Max();
+}
+
+
+EditPaM ImpEditEngine::InsertText( const EditSelection& rCurSel, xub_Unicode c, BOOL bOverwrite )
+{
+ DBG_ASSERT( c != '\t', "Tab bei InsertText ?" );
+ DBG_ASSERT( c != '\n', "Zeilenumbruch bei InsertText ?" );
+
+ EditPaM aPaM( rCurSel.Min() );
+
+ BOOL bDoOverwrite = ( bOverwrite &&
+ ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) ) ? TRUE : FALSE;
+
+ BOOL bUndoAction = ( rCurSel.HasRange() || bDoOverwrite );
+
+ if ( bUndoAction )
+ UndoActionStart( EDITUNDO_INSERT );
+
+ if ( rCurSel.HasRange() )
+ {
+ aPaM = ImpDeleteSelection( rCurSel );
+ }
+ else if ( bDoOverwrite )
+ {
+ // Wenn Selektion, dann nicht auch noch ein Zeichen ueberschreiben!
+ EditSelection aTmpSel( aPaM );
+ aTmpSel.Max().GetIndex()++;
+ DBG_ASSERT( !aTmpSel.DbgIsBuggy( aEditDoc ), "Overwrite: Fehlerhafte Selektion!" );
+ ImpDeleteSelection( aTmpSel );
+ }
+
+ if ( aPaM.GetNode()->Len() < MAXCHARSINPARA )
+ {
+ if ( IsUndoEnabled() && !IsInUndo() )
+ {
+ EditUndoInsertChars* pNewUndo = new EditUndoInsertChars( this, CreateEPaM( aPaM ), c );
+ BOOL bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? TRUE : FALSE;
+ InsertUndo( pNewUndo, bTryMerge );
+ }
+
+ aEditDoc.InsertText( (const EditPaM&)aPaM, c );
+ ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
+ DBG_ASSERT( pPortion, "Blinde Portion in InsertText" );
+ pPortion->MarkInvalid( aPaM.GetIndex(), 1 );
+ aPaM.GetIndex()++; // macht EditDoc-Methode nicht mehr
+ }
+
+ TextModified();
+
+ if ( bUndoAction )
+ UndoActionEnd( EDITUNDO_INSERT );
+
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rStr )
+{
+ EditPaM aPaM;
+ if ( aCurSel.HasRange() )
+ aPaM = ImpDeleteSelection( aCurSel );
+ else
+ aPaM = aCurSel.Max();
+
+ EditPaM aCurPaM( aPaM ); // fuers Invalidieren
+
+ XubString aText( rStr );
+ aText.ConvertLineEnd( LINEEND_LF );
+ SfxVoidItem aTabItem( EE_FEATURE_TAB );
+
+ // Konvertiert nach LineSep = \n
+ // Token mit LINE_SEP abfragen,
+ // da der MAC-Compiler aus \n etwas anderes macht!
+
+ USHORT nStart = 0;
+ while ( nStart < aText.Len() )
+ {
+ USHORT nEnd = aText.Search( LINE_SEP, nStart );
+ if ( nEnd == STRING_NOTFOUND )
+ nEnd = aText.Len(); // nicht dereferenzieren!
+
+ // Start == End => Leerzeile
+ if ( nEnd > nStart )
+ {
+ XubString aLine( aText, nStart, nEnd-nStart );
+ xub_StrLen nChars = aPaM.GetNode()->Len() + aLine.Len();
+ if ( nChars > MAXCHARSINPARA )
+ {
+ DBG_ERROR( "Info: MaxChars reached !" );
+ aLine.Erase( MAXCHARSINPARA-aPaM.GetNode()->Len() );
+ nEnd -= ( nChars - MAXCHARSINPARA ); // Dann landen die Zeichen im naechsten Absatz.
+ }
+ if ( IsUndoEnabled() && !IsInUndo() )
+ InsertUndo( new EditUndoInsertChars( this, CreateEPaM( aPaM ), aLine ) );
+ // Tabs ?
+ if ( aLine.Search( '\t' ) == STRING_NOTFOUND )
+ aPaM = aEditDoc.InsertText( aPaM, aLine );
+ else
+ {
+ USHORT nStart2 = 0;
+ while ( nStart2 < aLine.Len() )
+ {
+ USHORT nEnd2 = aLine.Search( '\t', nStart2 );
+ if ( nEnd2 == STRING_NOTFOUND )
+ nEnd2 = aLine.Len(); // nicht dereferenzieren!
+
+ if ( nEnd2 > nStart2 )
+ aPaM = aEditDoc.InsertText( aPaM, XubString( aLine, nStart2, nEnd2-nStart2 ) );
+ if ( nEnd2 < aLine.Len() )
+ {
+ // aPaM = ImpInsertFeature( EditSelection( aPaM, aPaM ), );
+ aPaM = aEditDoc.InsertFeature( aPaM, aTabItem );
+ }
+ nStart2 = nEnd2+1;
+ }
+ }
+ ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
+ DBG_ASSERT( pPortion, "Blinde Portion in InsertText" );
+ pPortion->MarkInvalid( aCurPaM.GetIndex(), aLine.Len() );
+ }
+ if ( nEnd < aText.Len() )
+ aPaM = ImpInsertParaBreak( aPaM );
+
+ nStart = nEnd+1;
+ }
+
+ TextModified();
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::ImpFastInsertText( EditPaM aPaM, const XubString& rStr )
+{
+ DBG_ASSERT( rStr.Search( 0x0A ) == STRING_NOTFOUND, "FastInsertText: Zeilentrenner nicht erlaubt!" );
+ DBG_ASSERT( rStr.Search( 0x0D ) == STRING_NOTFOUND, "FastInsertText: Zeilentrenner nicht erlaubt!" );
+ DBG_ASSERT( rStr.Search( '\t' ) == STRING_NOTFOUND, "FastInsertText: Features nicht erlaubt!" );
+
+ if ( ( aPaM.GetNode()->Len() + rStr.Len() ) < MAXCHARSINPARA )
+ {
+ if ( IsUndoEnabled() && !IsInUndo() )
+ InsertUndo( new EditUndoInsertChars( this, CreateEPaM( aPaM ), rStr ) );
+
+ aPaM = aEditDoc.InsertText( aPaM, rStr );
+
+ TextModified();
+ }
+ else
+ {
+ aPaM = ImpInsertText( aPaM, rStr );
+ }
+
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::ImpInsertFeature( EditSelection aCurSel, const SfxPoolItem& rItem )
+{
+ EditPaM aPaM;
+ if ( aCurSel.HasRange() )
+ aPaM = ImpDeleteSelection( aCurSel );
+ else
+ aPaM = aCurSel.Max();
+
+ if ( IsUndoEnabled() && !IsInUndo() )
+ InsertUndo( new EditUndoInsertFeature( this, CreateEPaM( aPaM ), rItem ) );
+ aPaM = aEditDoc.InsertFeature( aPaM, rItem );
+
+ ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
+ DBG_ASSERT( pPortion, "Blinde Portion in InsertFeature" );
+ pPortion->MarkInvalid( aPaM.GetIndex()-1, 1 );
+
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, BOOL bKeepEndingAttribs )
+{
+ EditPaM aPaM;
+ if ( rCurSel.HasRange() )
+ aPaM = ImpDeleteSelection( rCurSel );
+ else
+ aPaM = rCurSel.Max();
+
+ return ImpInsertParaBreak( aPaM, bKeepEndingAttribs );
+}
+
+EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, BOOL bKeepEndingAttribs )
+{
+ if ( IsUndoEnabled() && !IsInUndo() )
+ InsertUndo( new EditUndoSplitPara( this, aEditDoc.GetPos( rPaM.GetNode() ), rPaM.GetIndex() ) );
+
+ EditPaM aPaM( aEditDoc.InsertParaBreak( rPaM, bKeepEndingAttribs ) );
+
+#ifndef SVX_LIGHT
+ if ( GetStatus().DoOnlineSpelling() )
+ {
+ xub_StrLen nEnd = rPaM.GetNode()->Len();
+ aPaM.GetNode()->CreateWrongList();
+ WrongList* pLWrongs = rPaM.GetNode()->GetWrongList();
+ WrongList* pRWrongs = aPaM.GetNode()->GetWrongList();
+ // Falschgeschriebene Woerter ruebernehmen:
+ USHORT nLWrongs = pLWrongs->Count();
+ for ( USHORT nW = 0; nW < nLWrongs; nW++ )
+ {
+ WrongRange& rWrong = pLWrongs->GetObject( nW );
+ // Nur wenn wirklich dahinter, ein ueberlappendes wird beim Spell korrigiert
+ if ( rWrong.nStart > nEnd )
+ {
+ pRWrongs->InsertWrong( rWrong, pRWrongs->Count() );
+ WrongRange& rRWrong = pRWrongs->GetObject( pRWrongs->Count() - 1 );
+ rRWrong.nStart -= nEnd;
+ rRWrong.nEnd -= nEnd;
+ }
+ else if ( ( rWrong.nStart < nEnd ) && ( rWrong.nEnd > nEnd ) )
+ rWrong.nEnd = nEnd;
+ }
+ USHORT nInv = nEnd ? nEnd-1 : nEnd;
+ if ( nEnd )
+ pLWrongs->MarkInvalid( nInv, nEnd );
+ else
+ pLWrongs->SetValid();
+ pRWrongs->SetValid(); // sonst 0 - 0xFFFF
+ pRWrongs->MarkInvalid( 0, 1 ); // Nur das erste Wort testen
+ }
+#endif // !SVX_LIGHT
+
+
+ ParaPortion* pPortion = FindParaPortion( rPaM.GetNode() );
+ DBG_ASSERT( pPortion, "Blinde Portion in ImpInsertParaBreak" );
+ pPortion->MarkInvalid( rPaM.GetIndex(), 0 );
+
+ // Optimieren: Nicht unnoetig viele GetPos auf die Listen ansetzen!
+ // Hier z.B. bei Undo, aber auch in allen anderen Methoden.
+ USHORT nPos = GetParaPortions().GetPos( pPortion );
+ ParaPortion* pNewPortion = new ParaPortion( aPaM.GetNode() );
+ GetParaPortions().Insert( pNewPortion, nPos + 1 );
+ ParaAttribsChanged( pNewPortion->GetNode() );
+ if ( IsCallParaInsertedOrDeleted() )
+ GetEditEnginePtr()->ParagraphInserted( nPos+1 );
+
+ CursorMoved( rPaM.GetNode() ); // falls leeres Attribut entstanden.
+ TextModified(); // Wofuer ?
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::ImpFastInsertParagraph( USHORT nPara )
+{
+ if ( IsUndoEnabled() && !IsInUndo() )
+ {
+ if ( nPara )
+ {
+ DBG_ASSERT( aEditDoc.SaveGetObject( nPara-1 ), "FastInsertParagraph: Prev existiert nicht" );
+ InsertUndo( new EditUndoSplitPara( this, nPara-1, aEditDoc.GetObject( nPara-1 )->Len() ) );
+ }
+ else
+ InsertUndo( new EditUndoSplitPara( this, 0, 0 ) );
+ }
+
+ ContentNode* pNode = new ContentNode( aEditDoc.GetItemPool() );
+ // Falls FlatMode, wird spaeter kein Font eingestellt:
+ pNode->GetCharAttribs().GetDefFont() = aEditDoc.GetDefFont();
+
+#ifndef SVX_LIGHT
+ if ( GetStatus().DoOnlineSpelling() )
+ pNode->CreateWrongList();
+#endif // !SVX_LIGHT
+
+ aEditDoc.Insert( pNode, nPara );
+
+ ParaPortion* pNewPortion = new ParaPortion( pNode );
+ GetParaPortions().Insert( pNewPortion, nPara );
+ if ( IsCallParaInsertedOrDeleted() )
+ GetEditEnginePtr()->ParagraphInserted( nPara );
+
+ return EditPaM( pNode, 0 );
+}
+
+EditPaM ImpEditEngine::InsertParaBreak( EditSelection aCurSel )
+{
+ EditPaM aPaM( ImpInsertParaBreak( aCurSel ) );
+ if ( aStatus.DoAutoIndenting() )
+ {
+ USHORT nPara = aEditDoc.GetPos( aPaM.GetNode() );
+ DBG_ASSERT( nPara > 0, "AutoIndenting: Fehler!" );
+ XubString aPrevParaText( GetEditDoc().GetParaAsString( nPara-1 ) );
+ USHORT n = 0;
+ while ( ( n < aPrevParaText.Len() ) &&
+ ( ( aPrevParaText.GetChar(n) == ' ' ) || ( aPrevParaText.GetChar(n) == '\t' ) ) )
+ {
+ if ( aPrevParaText.GetChar(n) == '\t' )
+ aPaM = ImpInsertFeature( aPaM, SfxVoidItem( EE_FEATURE_TAB ) );
+ else
+ aPaM = ImpInsertText( aPaM, aPrevParaText.GetChar(n) );
+ n++;
+ }
+
+ }
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::InsertTab( EditSelection aCurSel )
+{
+ EditPaM aPaM( ImpInsertFeature( aCurSel, SfxVoidItem( EE_FEATURE_TAB ) ) );
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::InsertField( EditSelection aCurSel, const SvxFieldItem& rFld )
+{
+ EditPaM aPaM( ImpInsertFeature( aCurSel, rFld ) );
+ return aPaM;
+}
+
+BOOL ImpEditEngine::UpdateFields()
+{
+ BOOL bChanges = FALSE;
+ USHORT nParas = GetEditDoc().Count();
+ for ( USHORT nPara = 0; nPara < nParas; nPara++ )
+ {
+ BOOL bChangesInPara = FALSE;
+ ContentNode* pNode = GetEditDoc().GetObject( nPara );
+ DBG_ASSERT( pNode, "NULL-Pointer im Doc" );
+ CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs();
+ USHORT nAttrs = rAttribs.Count();
+ for ( USHORT nAttr = 0; nAttr < rAttribs.Count(); nAttr++ )
+ {
+ EditCharAttrib* pAttr = rAttribs[nAttr];
+ if ( pAttr->Which() == EE_FEATURE_FIELD )
+ {
+ EditCharAttribField* pField = (EditCharAttribField*)pAttr;
+ EditCharAttribField* pCurrent = new EditCharAttribField( *pField );
+ pField->Reset();
+ // Felder sind per default grau.
+ if ( aStatus.MarkFields() )
+ pField->GetFldColor() = new Color( COL_LIGHTGRAY );
+
+ XubString aFldValue = GetEditEnginePtr()->CalcFieldValue(
+ (const SvxFieldItem&)*pField->GetItem(),
+ nPara, pField->GetStart(),
+ pField->GetTxtColor(), pField->GetFldColor() );
+ pField->GetFieldValue() = aFldValue;
+ if ( *pField != *pCurrent )
+ {
+ bChanges = TRUE;
+ bChangesInPara = TRUE;
+ }
+ delete pCurrent;
+ }
+ }
+ if ( bChangesInPara )
+ {
+ // ggf. etwas genauer invalidieren.
+ ParaPortion* pPortion = GetParaPortions().GetObject( nPara );
+ DBG_ASSERT( pPortion, "NULL-Pointer im Doc" );
+ pPortion->MarkSelectionInvalid( 0, pNode->Len() );
+ }
+ }
+ return bChanges;
+}
+
+EditPaM ImpEditEngine::InsertLineBreak( EditSelection aCurSel )
+{
+ EditPaM aPaM( ImpInsertFeature( aCurSel, SfxVoidItem( EE_FEATURE_LINEBR ) ) );
+ return aPaM;
+}
+
+// ----------------------------------------------------------------------
+// Hilfsfunktionen
+// ----------------------------------------------------------------------
+Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, USHORT nFlags )
+{
+ DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: PaMtoEditCursor" );
+
+ Rectangle aEditCursor;
+ long nY = 0;
+ for ( USHORT nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
+ {
+ ParaPortion* pPortion = GetParaPortions().GetObject(nPortion);
+ ContentNode* pNode = pPortion->GetNode();
+ DBG_ASSERT( pNode, "Ungueltiger Node in Portion!" );
+ if ( pNode != aPaM.GetNode() )
+ {
+ nY += pPortion->GetHeight();
+ }
+ else
+ {
+ aEditCursor = GetEditCursor( pPortion, aPaM.GetIndex(), nFlags );
+ aEditCursor.Top() += nY;
+ aEditCursor.Bottom() += nY;
+ return aEditCursor;
+ }
+ }
+ DBG_ERROR( "Portion nicht gefunden!" );
+ return aEditCursor;
+}
+
+EditPaM ImpEditEngine::GetPaM( Point aDocPos, BOOL bSmart )
+{
+ DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: GetPaM" );
+
+ long nY = 0;
+ long nTmpHeight;
+ EditPaM aPaM;
+ USHORT nPortion;
+ for ( nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
+ {
+ ParaPortion* pPortion = GetParaPortions().GetObject(nPortion);
+ nTmpHeight = pPortion->GetHeight(); // sollte auch bei !bVisible richtig sein!
+ nY += nTmpHeight;
+ if ( nY > aDocPos.Y() )
+ {
+ nY -= nTmpHeight;
+ aDocPos.Y() -= nY;
+ // unsichtbare Portions ueberspringen:
+ while ( pPortion && !pPortion->IsVisible() )
+ {
+ nPortion++;
+ pPortion = GetParaPortions().SaveGetObject( nPortion );
+ }
+ DBG_ASSERT( pPortion, "Keinen sichtbaren Absatz gefunden: GetPaM" );
+ aPaM = GetPaM( pPortion, aDocPos, bSmart );
+ return aPaM;
+
+ }
+ }
+ // Dann den letzten sichtbaren Suchen:
+ nPortion = GetParaPortions().Count()-1;
+ while ( nPortion && !GetParaPortions()[nPortion]->IsVisible() )
+ nPortion--;
+
+ DBG_ASSERT( GetParaPortions()[nPortion]->IsVisible(), "Keinen sichtbaren Absatz gefunden: GetPaM" );
+ aPaM.SetNode( GetParaPortions()[nPortion]->GetNode() );
+ aPaM.SetIndex( GetParaPortions()[nPortion]->GetNode()->Len() );
+ return aPaM;
+}
+
+ULONG ImpEditEngine::GetTextHeight() const
+{
+ DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: GetTextHeight" );
+ DBG_ASSERT( IsFormatted() || IsFormatting(), "GetTextHeight: Nicht formatiert" );
+ return nCurTextHeight;
+}
+
+ULONG ImpEditEngine::CalcTextWidth()
+{
+ // Wenn noch nicht formatiert und nicht gerade dabei.
+ // Wird in der Formatierung bei AutoPageSize gerufen.
+ if ( !IsFormatted() && !IsFormatting() )
+ FormatDoc();
+
+ EditLine* pLine;
+
+ long nMaxWidth = 0;
+ long nCurWidth = 0;
+
+ // --------------------------------------------------
+ // Ueber alle Absaetze...
+ // --------------------------------------------------
+ USHORT nParas = GetParaPortions().Count();
+ USHORT nBiggestPara = 0;
+ USHORT nBiggestLine = 0;
+ for ( USHORT nPara = 0; nPara < nParas; nPara++ )
+ {
+ ParaPortion* pPortion = GetParaPortions().GetObject( nPara );
+// SvxAdjust eJustification = SVX_ADJUST_LEFT;
+// if ( !aStatus.IsOutliner() )
+// eJustification = ((const SvxAdjustItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_JUST)).GetAdjust();
+ const SvxLRSpaceItem& rLRItem = GetLRSpaceItem( pPortion->GetNode() );
+
+ if ( pPortion->IsVisible() )
+ {
+ // --------------------------------------------------
+ // Ueber die Zeilen des Absatzes...
+ // --------------------------------------------------
+ ULONG nLines = pPortion->GetLines().Count();
+ for ( USHORT nLine = 0; nLine < nLines; nLine++ )
+ {
+ pLine = pPortion->GetLines().GetObject( nLine );
+ DBG_ASSERT( pLine, "NULL-Pointer im Zeileniterator in CalcWidth" );
+ // nCurWidth = pLine->GetStartPosX();
+ // Bei Center oder Right haengt die breite von der
+ // Papierbreite ab, hier nicht erwuenscht.
+ // Am besten generell nicht auf StartPosX verlassen,
+ // es muss auch die rechte Einrueckung beruecksichtigt werden!
+ // if ( ( eJustification == SVX_ADJUST_CENTER ) || ( eJustification == SVX_ADJUST_RIGHT ) )
+ // ...
+ nCurWidth = GetXValue( rLRItem.GetTxtLeft() );
+ if ( nLine == 0 )
+ {
+ long nFI = GetXValue( rLRItem.GetTxtFirstLineOfst() );
+ nCurWidth += nFI;
+ if ( pPortion->GetBulletX() > nCurWidth )
+ {
+ nCurWidth -= nFI; // LI?
+ if ( pPortion->GetBulletX() > nCurWidth )
+ nCurWidth = pPortion->GetBulletX();
+ }
+ }
+ nCurWidth += GetXValue( rLRItem.GetRight() );
+ nCurWidth += CalcLineWidth( pPortion, pLine );
+ if ( nCurWidth > nMaxWidth )
+ {
+ nMaxWidth = nCurWidth;
+ }
+ }
+ }
+ }
+ if ( nMaxWidth < 0 )
+ nMaxWidth = 0;
+
+ nMaxWidth++; // Ein breiter, da in CreateLines bei >= umgebrochen wird.
+ return (ULONG)nMaxWidth;
+}
+
+ULONG ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine )
+{
+ // Berechnung der Breite ohne die Indents...
+ ULONG nWidth = 0;
+ for ( USHORT nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
+ {
+ TextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( nTP );
+ switch ( pTextPortion->GetKind() )
+ {
+ case PORTIONKIND_TEXT:
+ case PORTIONKIND_FIELD:
+ case PORTIONKIND_HYPHENATOR:
+ case PORTIONKIND_TAB:
+ {
+ nWidth += pTextPortion->GetSize().Width();
+ }
+ break;
+ }
+ }
+ return nWidth;
+}
+
+ULONG ImpEditEngine::CalcTextHeight()
+{
+ DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: CalcTextHeight" );
+ ULONG nY = 0;
+ for ( USHORT nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
+ nY += GetParaPortions()[nPortion]->GetHeight();
+ return nY;
+}
+
+USHORT ImpEditEngine::GetLineCount( USHORT nParagraph ) const
+{
+ DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" );
+ ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
+ DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineCount" );
+ if ( pPPortion )
+ return pPPortion->GetLines().Count();
+
+ return 0xFFFF;
+}
+
+xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const
+{
+ DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" );
+ ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
+ DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineHeight" );
+ if ( pPPortion && ( nLine < pPPortion->GetLines().Count() ) )
+ {
+ EditLine* pLine = pPPortion->GetLines().GetObject( nLine );
+ DBG_ASSERT( pLine, "Zeile nicht gefunden: GetLineHeight" );
+ return pLine->GetLen();
+ }
+
+ return 0xFFFF;
+}
+
+USHORT ImpEditEngine::GetLineHeight( USHORT nParagraph, USHORT nLine )
+{
+ DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" );
+ ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
+ DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineHeight" );
+ if ( pPPortion && ( nLine < pPPortion->GetLines().Count() ) )
+ {
+ EditLine* pLine = pPPortion->GetLines().GetObject( nLine );
+ DBG_ASSERT( pLine, "Zeile nicht gefunden: GetLineHeight" );
+ return pLine->GetHeight();
+ }
+
+ return 0xFFFF;
+}
+
+// MT 06/00: Kann wahrscheinlich weg!
+USHORT ImpEditEngine::GetMaxFontHeight( USHORT nParagraph, USHORT nLine )
+{
+ DBG_ASSERTWARNING( nLine == 0, "GetMaxFontHeight nur fuer Zeile 0 richtig implementiert" );
+
+ USHORT nHeight = 0xFFFF;
+ ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
+ DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineHeight" );
+ if ( pPPortion && ( nLine < pPPortion->GetLines().Count() ) )
+ {
+ EditLine* pLine = pPPortion->GetLines().GetObject( nLine );
+ DBG_ASSERT( pLine, "Zeile nicht gefunden: GetLineHeight" );
+ ContentNode* pNode = pPPortion->GetNode();
+ DBG_ASSERT( pNode, "Node?" );
+ nHeight = (USHORT)pNode->GetCharAttribs().GetDefFont().GetSize().Height();
+
+ USHORT nAttr = 0;
+ EditCharAttribPtr pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ // In einem leeren Absatz sind auch die leeren Attribute wirksam.
+ while ( pAttr && ( !pNode->Len() || ( pAttr->GetStart() < pLine->GetEnd() ) ) )
+ {
+ if ( !pNode->Len() ||
+ ( !pAttr->IsEmpty() && ( pAttr->GetEnd() > pLine->GetStart() ) ) )
+ {
+ if ( pAttr->GetItem()->Which() == EE_CHAR_FONTHEIGHT )
+ {
+ ULONG nH = ((const SvxFontHeightItem*)pAttr->GetItem())->GetHeight();
+ if ( nH > nHeight )
+ nHeight = (USHORT)nH;
+ }
+ }
+ nAttr++;
+ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ }
+ }
+
+ return nHeight;
+}
+
+ULONG ImpEditEngine::GetParaHeight( USHORT nParagraph )
+{
+ ULONG nHeight = 0;
+
+ ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
+ DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetParaHeight" );
+
+ if ( pPPortion )
+ nHeight = pPPortion->GetHeight();
+
+ return nHeight;
+}
+
+void ImpEditEngine::UpdateSelections()
+{
+ USHORT nInvNodes = aDeletedNodes.Count();
+
+ // Pruefen, ob eine der Selektionen auf einem geloeschten Node steht...
+ // Wenn der Node gueltig ist, muss noch der Index geprueft werden!
+ for ( USHORT nView = 0; nView < aEditViews.Count(); nView++ )
+ {
+ EditView* pView = aEditViews.GetObject(nView);
+ DBG_CHKOBJ( pView, EditView, 0 );
+ EditSelection aCurSel( pView->pImpEditView->GetEditSelection() );
+ BOOL bChanged = FALSE;
+ for ( USHORT n = 0; n < nInvNodes; n++ )
+ {
+ DeletedNodeInfo* pInf = aDeletedNodes.GetObject( n );
+ if ( ( ( ULONG )(aCurSel.Min().GetNode()) == pInf->GetInvalidAdress() ) ||
+ ( ( ULONG )(aCurSel.Max().GetNode()) == pInf->GetInvalidAdress() ) )
+ {
+ // ParaPortions verwenden, da jetzt auch versteckte
+ // Absaetze beruecksichtigt werden muessen!
+ USHORT nPara = pInf->GetPosition();
+ ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nPara );
+ if ( !pPPortion ) // letzter Absatz
+ {
+ nPara = GetParaPortions().Count()-1;
+ pPPortion = GetParaPortions().GetObject( nPara );
+ }
+ DBG_ASSERT( pPPortion, "Leeres Document in UpdateSelections ?" );
+ // Nicht aus einem verstecktem Absatz landen:
+ USHORT nCurPara = nPara;
+ USHORT nLastPara = GetParaPortions().Count()-1;
+ while ( nPara <= nLastPara && !GetParaPortions()[nPara]->IsVisible() )
+ nPara++;
+ if ( nPara > nLastPara ) // dann eben rueckwaerts...
+ {
+ nPara = nCurPara;
+ while ( nPara && !GetParaPortions()[nPara]->IsVisible() )
+ nPara--;
+ }
+ DBG_ASSERT( GetParaPortions()[nPara]->IsVisible(), "Keinen sichtbaren Absatz gefunden: UpdateSelections" );
+
+ ParaPortion* pParaPortion = GetParaPortions()[nPara];
+ EditSelection aTmpSelection( EditPaM( pParaPortion->GetNode(), 0 ) );
+ pView->pImpEditView->SetEditSelection( aTmpSelection );
+ bChanged=TRUE;
+ break; // for-Schleife
+ }
+ }
+ if ( !bChanged )
+ {
+ // Index prueffen, falls Node geschrumpft.
+ if ( aCurSel.Min().GetIndex() > aCurSel.Min().GetNode()->Len() )
+ {
+ aCurSel.Min().GetIndex() = aCurSel.Min().GetNode()->Len();
+ pView->pImpEditView->SetEditSelection( aCurSel );
+ }
+ if ( aCurSel.Max().GetIndex() > aCurSel.Max().GetNode()->Len() )
+ {
+ aCurSel.Max().GetIndex() = aCurSel.Max().GetNode()->Len();
+ pView->pImpEditView->SetEditSelection( aCurSel );
+ }
+ }
+ }
+
+ // Loeschen...
+ for ( USHORT n = 0; n < nInvNodes; n++ )
+ {
+ DeletedNodeInfo* pInf = aDeletedNodes.GetObject( n );
+ delete pInf;
+ }
+ aDeletedNodes.Remove( 0, aDeletedNodes.Count() );
+}
+
+BOOL ImpEditEngine::SetCursorAtPoint( const Point& rPointPixel, EditView* pView )
+{
+ CheckIdleFormatter();
+
+ Point aMousePos( rPointPixel );
+
+ // Logische Einheiten...
+ aMousePos = pView->GetWindow()->PixelToLogic( aMousePos );
+
+ if ( ( !pView->GetOutputArea().IsInside( aMousePos ) ) && !IsInSelectionMode() )
+ {
+ return FALSE;
+ }
+
+ Point aDocPos( pView->pImpEditView->GetDocPos( aMousePos ) );
+
+ // Kann optimiert werden: Erst innerhalb eines Absatzes die Zeilen
+ // fuer den PaM durchwuehlen, dann nochmal mit dem PaM fuer das Rect,
+ // obwohl die Zeile schon bekannt ist....
+ // Das muss doch nicht sein !
+
+ EditPaM aPaM = GetPaM( aDocPos );
+ BOOL bGotoCursor = pView->pImpEditView->DoAutoScroll();
+
+ // aTmpNewSel: Diff zwischen alt und neu, nicht die neue Selektion
+ EditSelection aTmpNewSel( pView->pImpEditView->GetEditSelection().Max(), aPaM );
+
+ pView->pImpEditView->GetEditSelection().Max() = aPaM;
+ if ( !aSelEngine.HasAnchor() )
+ {
+ if ( pView->pImpEditView->GetEditSelection().Min() != aPaM )
+ CursorMoved( pView->pImpEditView->GetEditSelection().Min().GetNode() );
+ pView->pImpEditView->GetEditSelection().Min() = aPaM;
+ }
+ else
+ {
+ pView->pImpEditView->DrawSelection( aTmpNewSel );
+ }
+
+ BOOL bForceCursor = ( pDragAndDropInfo ? FALSE : TRUE ) && !IsInSelectionMode();
+ pView->ShowCursor( bGotoCursor, bForceCursor );
+ return TRUE;
+}
+
+BOOL ImpEditEngine::IsSelectionAtPoint( const Point& rPointPixel, EditView* pView )
+{
+ if ( pDragAndDropInfo && pDragAndDropInfo->pField )
+ return TRUE;
+
+ Point aMousePos( rPointPixel );
+
+ // Logische Einheiten...
+ aMousePos = pView->GetWindow()->PixelToLogic( aMousePos );
+
+ if ( ( !pView->GetOutputArea().IsInside( aMousePos ) ) && !IsInSelectionMode() )
+ {
+ return FALSE;
+ }
+
+ Point aDocPos( pView->pImpEditView->GetDocPos( aMousePos ) );
+ EditPaM aPaM = GetPaM( aDocPos, FALSE );
+ return IsInSelection( aPaM, pView );
+}
+
+BOOL ImpEditEngine::IsInSelection( EditPaM aPaM, EditView* pView )
+{
+ EditSelection aSel = pView->pImpEditView->GetEditSelection();
+ if ( !aSel.HasRange() )
+ return FALSE;
+
+ aSel.Adjust( aEditDoc );
+
+ USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+ USHORT nCurNode = aEditDoc.GetPos( aPaM.GetNode() );
+
+ if ( ( nCurNode > nStartNode ) && ( nCurNode < nEndNode ) )
+ return TRUE;
+
+ if ( nStartNode == nEndNode )
+ {
+ if ( nCurNode == nStartNode )
+ if ( ( aPaM.GetIndex() >= aSel.Min().GetIndex() ) && ( aPaM.GetIndex() < aSel.Max().GetIndex() ) )
+ return TRUE;
+ }
+ else if ( ( nCurNode == nStartNode ) && ( aPaM.GetIndex() >= aSel.Min().GetIndex() ) )
+ return TRUE;
+ else if ( ( nCurNode == nEndNode ) && ( aPaM.GetIndex() < aSel.Max().GetIndex() ) )
+ return TRUE;
+
+ return FALSE;
+}
+
+void ImpEditEngine::CreateAnchor( EditView* pView )
+{
+ bInSelection = TRUE;
+ // Min() setzen, da in SetCursorAtPoint nicht initialisiert:
+ pView->pImpEditView->GetEditSelection().Min() = pView->pImpEditView->GetEditSelection().Max();
+}
+
+void ImpEditEngine::DeselectAll( EditView* pView )
+{
+ bInSelection = FALSE;
+ // Min() setzen, da in SetCursorAtPoint nicht initialisiert:
+ pView->pImpEditView->DrawSelection();
+ pView->pImpEditView->GetEditSelection().Min() = pView->pImpEditView->GetEditSelection().Max();
+}
+
+
+EditSelection ImpEditEngine::ConvertSelection( USHORT nStartPara, USHORT nStartPos,
+ USHORT nEndPara, USHORT nEndPos ) const
+{
+ EditSelection aNewSelection;
+
+ // Start...
+ ContentNode* pNode = aEditDoc.SaveGetObject( nStartPara );
+ USHORT nIndex = nStartPos;
+ if ( !pNode )
+ {
+ pNode = aEditDoc[ aEditDoc.Count()-1 ];
+ nIndex = pNode->Len();
+ }
+ else if ( nIndex > pNode->Len() )
+ nIndex = pNode->Len();
+
+ aNewSelection.Min().SetNode( pNode );
+ aNewSelection.Min().SetIndex( nIndex );
+
+ // End...
+ pNode = aEditDoc.SaveGetObject( nEndPara );
+ nIndex = nEndPos;
+ if ( !pNode )
+ {
+ pNode = aEditDoc[ aEditDoc.Count()-1 ];
+ nIndex = pNode->Len();
+ }
+ else if ( nIndex > pNode->Len() )
+ nIndex = pNode->Len();
+
+ aNewSelection.Max().SetNode( pNode );
+ aNewSelection.Max().SetIndex( nIndex );
+
+ return aNewSelection;
+}
+
+EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel )
+{
+ EditSelection aMatchSel;
+ EditSelection aTmpSel( rSel );
+ aTmpSel.Adjust( GetEditDoc() );
+ if ( ( aTmpSel.Min().GetNode() != aTmpSel.Max().GetNode() ) ||
+ ( ( aTmpSel.Max().GetIndex() - aTmpSel.Min().GetIndex() ) > 1 ) )
+ {
+ return aMatchSel;
+ }
+
+ USHORT nPos = aTmpSel.Min().GetIndex();
+ ContentNode* pNode = aTmpSel.Min().GetNode();
+ if ( nPos >= pNode->Len() )
+ return aMatchSel;
+
+ USHORT nMatchChar = aGroupChars.Search( pNode->GetChar( nPos ) );
+ if ( nMatchChar != STRING_NOTFOUND )
+ {
+ USHORT nNode = aEditDoc.GetPos( pNode );
+ if ( ( nMatchChar % 2 ) == 0 )
+ {
+ // Vorwaerts suchen...
+ xub_Unicode nSC = aGroupChars.GetChar( nMatchChar );
+ DBG_ASSERT( aGroupChars.Len() > (nMatchChar+1), "Ungueltige Gruppe von MatchChars!" );
+ xub_Unicode nEC = aGroupChars.GetChar( nMatchChar+1 );
+
+ USHORT nCur = aTmpSel.Min().GetIndex()+1;
+ USHORT nLevel = 1;
+ while ( pNode && nLevel )
+ {
+ XubString& rStr = *pNode;
+ while ( nCur < rStr.Len() )
+ {
+ if ( rStr.GetChar( nCur ) == nSC )
+ nLevel++;
+ else if ( rStr.GetChar( nCur ) == nEC )
+ {
+ nLevel--;
+ if ( !nLevel )
+ break; // while nCur...
+ }
+ nCur++;
+ }
+
+ if ( nLevel )
+ {
+ nNode++;
+ pNode = nNode < aEditDoc.Count() ? aEditDoc.GetObject( nNode ) : 0;
+ nCur = 0;
+ }
+ }
+ if ( nLevel == 0 ) // gefunden
+ {
+ aMatchSel.Min() = aTmpSel.Min();
+ aMatchSel.Max() = EditPaM( pNode, nCur+1 );
+ }
+ }
+ else
+ {
+ // Rueckwaerts suchen...
+ xub_Unicode nEC = aGroupChars.GetChar( nMatchChar );
+ xub_Unicode nSC = aGroupChars.GetChar( nMatchChar-1 );
+
+ USHORT nCur = aTmpSel.Min().GetIndex()-1;
+ USHORT nLevel = 1;
+ while ( pNode && nLevel )
+ {
+ if ( pNode->Len() )
+ {
+ XubString& rStr = *pNode;
+ while ( nCur )
+ {
+ if ( rStr.GetChar( nCur ) == nSC )
+ {
+ nLevel--;
+ if ( !nLevel )
+ break; // while nCur...
+ }
+ else if ( rStr.GetChar( nCur ) == nEC )
+ nLevel++;
+
+ nCur--;
+ }
+ }
+
+ if ( nLevel )
+ {
+ pNode = nNode ? aEditDoc.GetObject( --nNode ) : 0;
+ if ( pNode )
+ nCur = pNode->Len()-1; // egal ob negativ, weil if Len()
+ }
+ }
+
+ if ( nLevel == 0 ) // gefunden
+ {
+ aMatchSel.Min() = aTmpSel.Min();
+ aMatchSel.Min().GetIndex()++; // hinter das Zeichen
+ aMatchSel.Max() = EditPaM( pNode, nCur );
+ }
+ }
+ }
+ return aMatchSel;
+}
+
+void ImpEditEngine::StopSelectionMode()
+{
+ if ( ( IsInSelectionMode() || aSelEngine.IsInSelection() ) && pActiveView )
+ {
+ pActiveView->pImpEditView->DrawSelection(); // Wegzeichnen...
+ EditSelection aSel( pActiveView->pImpEditView->GetEditSelection() );
+ aSel.Min() = aSel.Max();
+ pActiveView->pImpEditView->SetEditSelection( aSel );
+ pActiveView->ShowCursor();
+ aSelEngine.Reset();
+ bInSelection = FALSE;
+ }
+}
+
+void ImpEditEngine::SetActiveView( EditView* pView )
+{
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // Eigentlich waere jetzt ein bHasVisSel und HideSelection notwendig !!!
+
+ if ( pView == pActiveView )
+ return;
+
+ if ( pActiveView && pActiveView->HasSelection() )
+ pActiveView->pImpEditView->DrawSelection(); // Wegzeichnen...
+
+ pActiveView = pView;
+
+ if ( pActiveView && pActiveView->HasSelection() )
+ pActiveView->pImpEditView->DrawSelection(); // Wegzeichnen...
+}
+
+BOOL ImpEditEngine::HasData( ExchangeType eExchange, BOOL bAllowSpecial )
+{
+ ULONG nBinReg = EditEngine::RegisterClipboardFormatName();
+
+ BOOL bSpecial, bText;
+ if ( eExchange == EXCHANGE_CLIPBOARD )
+ {
+ bSpecial = Clipboard::HasFormat ( nBinReg ) ||
+ Clipboard::HasFormat ( FORMAT_RTF );
+ bText = Clipboard::HasFormat ( FORMAT_STRING );
+ }
+ else
+ {
+ bSpecial = DragServer::HasFormat ( 0, nBinReg ) ||
+ DragServer::HasFormat ( 0, FORMAT_RTF );
+ bText = DragServer::HasFormat ( 0, FORMAT_STRING );
+ }
+
+ return ( bAllowSpecial ? ( bSpecial || bText ) : bText );
+}
+
+void ImpEditEngine::CopyData( EditSelection aSelection, ExchangeType nType ) const
+{
+ aSelection.Adjust( GetEditDoc() );
+
+ XubString aText( GetSelected( aSelection ) );
+ aText.ConvertLineEnd(); // Systemspezifisch
+
+ SvMemoryStream aRTFStream( aText.Len()*2, 512 ); // Len*2: geschaetzte Groesse.
+ ((ImpEditEngine*)this)->WriteRTF( aRTFStream, aSelection );
+ ULONG nRTFLen = aRTFStream.Seek( STREAM_SEEK_TO_END );
+ aRTFStream.Seek( 0 );
+
+ SvMemoryStream aBinStream( aText.Len()*2, 512 );
+ WriteBin( aBinStream, aSelection );
+ ULONG nBinLen = (USHORT)aBinStream.Seek( STREAM_SEEK_TO_END );
+ aBinStream.Seek( 0 );
+
+ sal_Unicode* pNetscapeBookmark = NULL;
+ INetBookmark* pOfficeBookmark = NULL;
+ const SvxFieldItem* pField = NULL;
+
+ if ( ( aSelection.Min().GetNode() == aSelection.Max().GetNode() )
+ && ( aSelection.Max().GetIndex() == (aSelection.Min().GetIndex()+1) ) )
+ {
+ const EditCharAttrib* pAttr = aSelection.Min().GetNode()->GetCharAttribs().
+ FindFeature( aSelection.Min().GetIndex() );
+ if ( pAttr &&
+ ( pAttr->GetStart() == aSelection.Min().GetIndex() ) &&
+ ( pAttr->Which() == EE_FEATURE_FIELD ) )
+ {
+ pField = (const SvxFieldItem*)pAttr->GetItem();
+ }
+
+ }
+
+ if ( pField )
+ {
+ const SvxFieldData* pFld = pField->GetField();
+ if ( pFld && pFld->ISA( SvxURLField ) )
+ {
+ // Office-Bookmark
+ String aURL( ((const SvxURLField*)pFld)->GetURL() );
+ String aTxt( ((const SvxURLField*)pFld)->GetRepresentation() );
+ pOfficeBookmark = new INetBookmark( aURL, aTxt );
+
+ // Netscape-Bookmark???
+ // Muss mal auf INetURLObject oder so umgestellt werden.
+ }
+ }
+
+ ULONG nBinReg = EditEngine::RegisterClipboardFormatName();
+ ULONG nNetscapeFmt = Exchange::RegisterFormatName( String( RTL_CONSTASCII_USTRINGPARAM( "Netscape Bookmark" ) ) );
+
+ if ( nType == EXCHANGE_CLIPBOARD )
+ {
+ Clipboard::Clear();
+ Clipboard::CopyData( aBinStream.GetData(), nBinLen, nBinReg );
+ Clipboard::CopyData( aRTFStream.GetData(), nRTFLen, FORMAT_RTF );
+ Clipboard::CopyString( aText );
+ if ( pOfficeBookmark )
+ pOfficeBookmark->CopyClipboard();
+ if ( pNetscapeBookmark )
+ Clipboard::CopyData( pNetscapeBookmark, 2048, nNetscapeFmt );
+ }
+ else // DRAGSERVER
+ {
+ DragServer::Clear();
+ DragServer::CopyData( aBinStream.GetData(), nBinLen, nBinReg );
+ DragServer::CopyData( aRTFStream.GetData(), nRTFLen, FORMAT_RTF );
+ DragServer::CopyString( aText );
+ if ( pOfficeBookmark )
+ pOfficeBookmark->CopyDragServer();
+ if ( pNetscapeBookmark )
+ DragServer::CopyData( pNetscapeBookmark, 2048, nNetscapeFmt );
+ }
+
+ delete pOfficeBookmark;
+ delete pNetscapeBookmark;
+}
+
+EditSelection ImpEditEngine::PasteData( EditPaM aPaM, ExchangeType eExchange, BOOL bSpecial )
+{
+ EditSelection aNewSelection;
+
+ ULONG nBinReg = EditEngine::RegisterClipboardFormatName();
+ ULONG nNetscapeFmt = Exchange::RegisterFormatName( String( RTL_CONSTASCII_USTRINGPARAM( "Netscape Bookmark" ) ) );
+
+ BOOL bText = ( eExchange == EXCHANGE_CLIPBOARD ) ?
+ Clipboard::HasFormat ( FORMAT_STRING ) :
+ DragServer::HasFormat ( 0, FORMAT_STRING );
+ BOOL bRTF = ( eExchange == EXCHANGE_CLIPBOARD ) ?
+ Clipboard::HasFormat ( FORMAT_RTF ) :
+ DragServer::HasFormat ( 0, FORMAT_RTF );
+ BOOL bBin = ( eExchange == EXCHANGE_CLIPBOARD ) ?
+ Clipboard::HasFormat ( nBinReg ) :
+ DragServer::HasFormat ( 0, nBinReg );
+ BOOL bOffBkmrk = ( eExchange == EXCHANGE_CLIPBOARD ) ?
+ INetBookmark::ClipboardHasFormat() :
+ INetBookmark::DragServerHasFormat( 0 );
+ BOOL bNetscape = ( eExchange == EXCHANGE_CLIPBOARD ) ?
+ Clipboard::HasFormat ( nNetscapeFmt ) :
+ DragServer::HasFormat ( 0, nNetscapeFmt );
+
+ if ( bSpecial && bBin )
+ {
+ ULONG nLen; BYTE* pData;
+ if( eExchange == EXCHANGE_CLIPBOARD )
+ {
+ nLen = Clipboard::GetDataLen( nBinReg );
+ pData = new BYTE[ nLen ];
+ Clipboard::PasteData( pData, nLen, nBinReg );
+ }
+ else
+ {
+ nLen = DragServer::GetDataLen( 0, nBinReg );
+ pData = new BYTE[ nLen ];
+ DragServer::PasteData( 0, pData, nLen, nBinReg );
+ }
+ SvMemoryStream aStream( pData, nLen, STREAM_READ );
+ aNewSelection = ReadBin( aStream, aPaM );
+ delete pData;
+ }
+ else if ( bSpecial && bNetscape )
+ {
+ ULONG nLen; BYTE* pData;
+ if( eExchange == EXCHANGE_CLIPBOARD )
+ {
+ nLen = Clipboard::GetDataLen( nNetscapeFmt );
+ pData = new BYTE[ nLen ];
+ Clipboard::PasteData( pData, nLen, nNetscapeFmt );
+ }
+ else
+ {
+ nLen = DragServer::GetDataLen( 0, nNetscapeFmt );
+ pData = new BYTE[ nLen ];
+ DragServer::PasteData( 0, pData, nLen, nNetscapeFmt );
+ }
+ if ( nLen == 2048 ) // sonst weiss ich nicht weiter...
+ {
+ String aURL = (const sal_Unicode*)pData;
+ String aTxt = (const sal_Unicode*)(pData+1024);
+ // Feld nur einfuegen, wenn Factory vorhanden.
+ if ( ITEMDATA() && ITEMDATA()->GetClassManager().Get( SVX_URLFIELD ) )
+ {
+ SvxFieldItem aField( SvxURLField( aURL, aTxt, SVXURLFORMAT_URL ), EE_FEATURE_FIELD );
+ aNewSelection = InsertField( aPaM, aField );
+ UpdateFields();
+ }
+ else
+ aNewSelection = ImpInsertText( aPaM, aURL );
+ delete pData;
+ }
+ }
+ else if ( bSpecial && bOffBkmrk )
+ {
+ INetBookmark aOfficeBkmrk;
+ if( eExchange == EXCHANGE_CLIPBOARD )
+ aOfficeBkmrk.PasteClipboard();
+ else
+ aOfficeBkmrk.PasteDragServer( 0 );
+
+ // Feld nur einfuegen, wenn Factory vorhanden.
+ if ( ITEMDATA() && ITEMDATA()->GetClassManager().Get( SVX_URLFIELD ) )
+ {
+ SvxFieldItem aField( SvxURLField( aOfficeBkmrk.GetURL(), aOfficeBkmrk.GetDescription(), SVXURLFORMAT_URL ), EE_FEATURE_FIELD );
+ aNewSelection = InsertField( aPaM, aField );
+ UpdateFields();
+ }
+ else
+ aNewSelection = ImpInsertText( aPaM, aOfficeBkmrk.GetURL() );
+ }
+ else if ( bSpecial && bRTF )
+ {
+ ULONG nLen; BYTE* pData;
+ if( eExchange == EXCHANGE_CLIPBOARD )
+ {
+ nLen = Clipboard::GetDataLen( FORMAT_RTF );
+ pData = new BYTE[ nLen+1 ];
+ Clipboard::PasteData( pData, nLen, FORMAT_RTF );
+ }
+ else
+ {
+ nLen = DragServer::GetDataLen( 0, FORMAT_RTF );
+ pData = new BYTE[ nLen+1 ];
+ DragServer::PasteData( 0, pData, nLen, FORMAT_RTF );
+ }
+ *( pData + nLen ) = '\0'; // Falls RTF kaputt
+ SvMemoryStream aStream( pData, nLen, STREAM_READ );
+ aNewSelection = ReadRTF( aStream, aPaM );
+ delete pData;
+ }
+ else if ( bText )
+ {
+ XubString aText;
+ if( eExchange == EXCHANGE_CLIPBOARD )
+ aText = Clipboard::PasteString();
+ else
+ aText = DragServer::PasteString( 0 );
+ aNewSelection = ImpInsertText( aPaM, aText );
+ }
+ else
+ {
+ DBG_ERROR( "PasteData: Keine Daten" );
+ return EditSelection( aPaM, aPaM );
+ }
+
+ return aNewSelection;
+}
+
+Range ImpEditEngine::GetInvalidYOffsets( ParaPortion* pPortion )
+{
+ DBG_ASSERT( pPortion->IsVisible(), "Wozu GetInvalidYOffset() bei einem unsichtbaren Absatz?" );
+
+ Range aRange( 0, 0 );
+
+ const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
+ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+ USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+ ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+
+ // erst von vorne...
+ USHORT nFirstInvalid = 0xFFFF;
+ USHORT nLine;
+ for ( nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+ {
+ EditLine* pL = pPortion->GetLines().GetObject( nLine );
+ if ( pL->IsInvalid() )
+ {
+ nFirstInvalid = nLine;
+ break;
+ }
+ if ( nLine && !aStatus.IsOutliner() ) // nicht die erste Zeile
+ aRange.Min() += nSBL;
+ aRange.Min() += pL->GetHeight();
+ }
+ DBG_ASSERT( nFirstInvalid != 0xFFFF, "Keine ungueltige Zeile gefunden in GetInvalidYOffset(1)" );
+
+
+ // Abgleichen und weiter...
+ aRange.Max() = aRange.Min();
+ aRange.Max() += pPortion->GetFirstLineOffset();
+ if ( nFirstInvalid != 0 ) // Nur wenn nicht die erste Zeile ungueltig
+ aRange.Min() = aRange.Max();
+
+ USHORT nLastInvalid = pPortion->GetLines().Count()-1;
+ for ( nLine = nFirstInvalid; nLine < pPortion->GetLines().Count(); nLine++ )
+ {
+ EditLine* pL = pPortion->GetLines().GetObject( nLine );
+ if ( pL->IsValid() )
+ {
+ nLastInvalid = nLine;
+ break;
+ }
+
+ if ( nLine && !aStatus.IsOutliner() )
+ aRange.Max() += nSBL;
+ aRange.Max() += pL->GetHeight();
+ }
+
+ // MT 07/00 SBL kann jetzt kleiner 100% sein => ggf. die Zeile davor neu ausgeben.
+ if( ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) &&
+ ( rLSItem.GetPropLineSpace() < 100 ) )
+ {
+ EditLine* pL = pPortion->GetLines().GetObject( nFirstInvalid );
+ long n = pL->GetTxtHeight() * ( 100 - rLSItem.GetPropLineSpace() );
+ n /= 100;
+ aRange.Min() -= n;
+ aRange.Max() += n;
+ }
+
+ if ( ( nLastInvalid == pPortion->GetLines().Count()-1 ) && ( !aStatus.IsOutliner() ) )
+ aRange.Max() += GetYValue( rULSpace.GetLower() );
+
+ return aRange;
+}
+
+EditPaM ImpEditEngine::GetPaM( ParaPortion* pPortion, Point aDocPos, BOOL bSmart )
+{
+ DBG_ASSERT( pPortion->IsVisible(), "Wozu GetPaM() bei einem unsichtbaren Absatz?" );
+ DBG_ASSERT( IsFormatted(), "GetPaM: Nicht formatiert" );
+
+ USHORT nCurIndex = 0;
+ EditPaM aPaM;
+ aPaM.SetNode( pPortion->GetNode() );
+
+ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+ USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+ ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+
+ long nY = pPortion->GetFirstLineOffset();
+
+ DBG_ASSERT( pPortion->GetLines().Count(), "Leere ParaPortion in GetPaM!" );
+
+ EditLine* pLine = 0;
+ for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+ {
+ EditLine* pTmpLine = pPortion->GetLines().GetObject( nLine );
+ nY += pTmpLine->GetHeight();
+ if ( !aStatus.IsOutliner() )
+ nY += nSBL;
+ if ( nY > aDocPos.Y() ) // das war 'se
+ {
+ pLine = pTmpLine;
+ break; // richtige Y-Position intressiert nicht
+ }
+
+ nCurIndex += pTmpLine->GetLen();
+ }
+
+ if ( !pLine ) // darf nur im Bereich von SA passieren!
+ {
+ #ifdef DBG_UTIL
+ const SvxULSpaceItem& rULSpace =(const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
+ DBG_ASSERT( nY+GetYValue( rULSpace.GetLower() ) >= aDocPos.Y() , "Index in keiner Zeile, GetPaM ?" );
+ #endif
+ aPaM.SetIndex( pPortion->GetNode()->Len() );
+ return aPaM;
+ }
+
+ // Wenn Zeile gefunden, nur noch X-Position => Index
+ nCurIndex = pPortion->GetChar( pLine, aDocPos.X(), bSmart );
+
+ if ( ( nCurIndex == pLine->GetEnd() ) &&
+ ( pLine != pPortion->GetLines().GetObject( pPortion->GetLines().Count()-1) ) )
+ {
+ if ( nCurIndex )
+ nCurIndex--;
+ }
+
+ aPaM.SetIndex( nCurIndex );
+ return aPaM;
+}
+
+void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
+{
+ pPortion->nHeight = 0;
+ pPortion->nFirstLineOffset = 0;
+
+ if ( pPortion->IsVisible() )
+ {
+ DBG_ASSERT( pPortion->GetLines().Count(), "Absatz ohne Zeilen in ParaPortion::CalcHeight" );
+ for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+ pPortion->nHeight += pPortion->GetLines().GetObject( nLine )->GetHeight();
+
+ if ( !aStatus.IsOutliner() )
+ {
+ const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
+ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+ USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+
+ if ( nSBL )
+ {
+ if ( pPortion->GetLines().Count() > 1 )
+ pPortion->nHeight += ( pPortion->GetLines().Count() - 1 ) * nSBL;
+ if ( aStatus.ULSpaceSummation() )
+ pPortion->nHeight += nSBL;
+ }
+
+ USHORT nPortion = GetParaPortions().GetPos( pPortion );
+ if ( nPortion || aStatus.ULSpaceFirstParagraph() )
+ {
+ USHORT nUpper = GetYValue( rULItem.GetUpper() );
+ pPortion->nHeight += nUpper;
+ pPortion->nFirstLineOffset = nUpper;
+ }
+
+ if ( ( nPortion != (GetParaPortions().Count()-1) ) )
+ {
+ pPortion->nHeight += GetYValue( rULItem.GetLower() ); // nicht in letzter
+ }
+
+
+ if ( nPortion && !aStatus.ULSpaceSummation() )
+ {
+ ParaPortion* pPrev = GetParaPortions().SaveGetObject( nPortion-1 );
+ const SvxULSpaceItem& rPrevULItem = (const SvxULSpaceItem&)pPrev->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
+ const SvxLineSpacingItem& rPrevLSItem = (const SvxLineSpacingItem&)pPrev->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+
+ // Verhalten WinWord6/Writer3:
+ // Bei einem proportionalen Zeilenabstand wird auch der Absatzabstand
+ // manipuliert.
+ // Nur Writer3: Nicht aufaddieren, sondern Mindestabstand.
+
+ // Pruefen, ob Abstand durch LineSpacing > Upper:
+ USHORT nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPortion, rLSItem ) );
+ if ( nExtraSpace > pPortion->nFirstLineOffset )
+ {
+ // Absatz wird 'groesser':
+ pPortion->nHeight += ( nExtraSpace - pPortion->nFirstLineOffset );
+ pPortion->nFirstLineOffset = nExtraSpace;
+ }
+
+ // nFirstLineOffset jetzt f(pNode) => jetzt f(pNode, pPrev) ermitteln:
+ USHORT nPrevLower = GetYValue( rPrevULItem.GetLower() );
+
+ // Dieser PrevLower steckt noch in der Hoehe der PrevPortion...
+ if ( nPrevLower > pPortion->nFirstLineOffset )
+ {
+ // Absatz wird 'kleiner':
+ pPortion->nHeight -= pPortion->nFirstLineOffset;
+ pPortion->nFirstLineOffset = 0;
+ }
+ else if ( nPrevLower )
+ {
+ // Absatz wird 'etwas kleiner':
+ pPortion->nHeight -= nPrevLower;
+ pPortion->nFirstLineOffset -= nPrevLower;
+ }
+
+ // Finde ich zwar nicht so gut, aber Writer3-Feature:
+ // Pruefen, ob Abstand durch LineSpacing > Lower:
+ // Dieser Wert steckt nicht in der Hoehe der PrevPortion.
+ if ( !pPrev->IsInvalid() )
+ {
+ nExtraSpace = GetYValue( lcl_CalcExtraSpace( pPrev, rPrevLSItem ) );
+ if ( nExtraSpace > nPrevLower )
+ {
+ USHORT nMoreLower = nExtraSpace - nPrevLower;
+ // Absatz wird 'groesser', 'waechst' nach unten:
+ if ( nMoreLower > pPortion->nFirstLineOffset )
+ {
+ pPortion->nHeight += ( nMoreLower - pPortion->nFirstLineOffset );
+ pPortion->nFirstLineOffset = nMoreLower;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, USHORT nIndex, USHORT nFlags )
+{
+ DBG_ASSERT( pPortion->IsVisible(), "Wozu GetEditCursor() bei einem unsichtbaren Absatz?" );
+ DBG_ASSERT( IsFormatted() || GetTextRanger(), "GetEditCursor: Nicht formatiert" );
+
+ /*
+ GETCRSR_ENDOFLINE: Wenn hinter dem letzten Zeichen einer umgebrochenen Zeile,
+ am Ende der Zeile bleiben, nicht am Anfang der naechsten.
+ Zweck: - END => wirklich hinter das letzte Zeichen
+ - Selektion....
+ */
+
+ long nY = pPortion->GetFirstLineOffset();
+
+ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+ USHORT nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+ ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+
+ USHORT nCurIndex = 0;
+ DBG_ASSERT( pPortion->GetLines().Count(), "Leere ParaPortion in GetEditCursor!" );
+ EditLine* pLine = 0;
+ BOOL bEOL = ( nFlags & GETCRSR_ENDOFLINE ) ? TRUE : FALSE;
+ for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+ {
+ EditLine* pTmpLine = pPortion->GetLines().GetObject( nLine );
+ if ( ( pTmpLine->GetStart() == nIndex ) || ( pTmpLine->IsIn( nIndex, bEOL ) ) )
+ {
+ pLine = pTmpLine;
+ break;
+ }
+
+ nCurIndex += pTmpLine->GetLen();
+ nY += pTmpLine->GetHeight();
+ if ( !aStatus.IsOutliner() )
+ nY += nSBL;
+ }
+ if ( !pLine )
+ {
+ // Cursor am Ende des Absatzes.
+ DBG_ASSERT( nIndex == nCurIndex, "Index voll daneben in GetEditCursor!" );
+
+ pLine = pPortion->GetLines().GetObject( pPortion->GetLines().Count()-1 );
+ nY -= pLine->GetHeight();
+ if ( !aStatus.IsOutliner() )
+ nY -= nSBL;
+ nCurIndex -= pLine->GetLen();
+ }
+
+ Rectangle aEditCursor;
+
+ aEditCursor.Top() = nY;
+ nY += pLine->GetHeight();
+ aEditCursor.Bottom() = nY-1;
+
+ // innerhalb der Zeile suchen....
+ long nX = pPortion->GetXPos( pLine, nIndex );
+ aEditCursor.Left() = aEditCursor.Right() = nX;
+
+ if ( nFlags & GETCRSR_TXTONLY )
+ aEditCursor.Top() = aEditCursor.Bottom() - pLine->GetTxtHeight() + 1;
+ else
+ aEditCursor.Top() = aEditCursor.Bottom() - Min( pLine->GetTxtHeight(), pLine->GetHeight() ) + 1;
+
+ return aEditCursor;
+}
+
+void ImpEditEngine::SetValidPaperSize( const Size& rNewSz )
+{
+ aPaperSize = rNewSz;
+
+ long nMinWidth = aStatus.AutoPageWidth() ? aMinAutoPaperSize.Width() : 0;
+ long nMaxWidth = aStatus.AutoPageWidth() ? aMaxAutoPaperSize.Width() : 0x7FFFFFFF;
+ long nMinHeight = aStatus.AutoPageHeight() ? aMinAutoPaperSize.Height() : 0;
+ long nMaxHeight = aStatus.AutoPageHeight() ? aMaxAutoPaperSize.Height() : 0x7FFFFFFF;
+
+ // Minimale/Maximale Breite:
+ if ( aPaperSize.Width() < nMinWidth )
+ aPaperSize.Width() = nMinWidth;
+ else if ( aPaperSize.Width() > nMaxWidth )
+ aPaperSize.Width() = nMaxWidth;
+
+ // Minimale/Maximale Hoehe:
+ if ( aPaperSize.Height() < nMinHeight )
+ aPaperSize.Height() = nMinHeight;
+ else if ( aPaperSize.Height() > nMaxHeight )
+ aPaperSize.Height() = nMaxHeight;
+}
+
+void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight )
+{
+ ESelection aESel( CreateESel( pEditView->pImpEditView->GetEditSelection() ) );
+ aESel.Adjust();
+
+ // Nur wenn mehrere selektierte Absaetze...
+ if ( aESel.nEndPara > aESel.nStartPara )
+ {
+ ESelection aNewSel = aESel;
+ aNewSel.nStartPos = 0;
+ aNewSel.nEndPos = 0xFFFF;
+
+ if ( aESel.nEndPos == 0 )
+ {
+ aESel.nEndPara--; // dann diesen Absatz nicht...
+ aNewSel.nEndPos = 0;
+ }
+
+ pEditView->pImpEditView->DrawSelection();
+ pEditView->pImpEditView->SetEditSelection(
+ pEditView->pImpEditView->GetEditSelection().Max() );
+ UndoActionStart( bRight ? EDITUNDO_INDENTBLOCK : EDITUNDO_UNINDENTBLOCK );
+
+ for ( USHORT nPara = aESel.nStartPara; nPara <= aESel.nEndPara; nPara++ )
+ {
+ ContentNode* pNode = GetEditDoc().GetObject( nPara );
+ if ( bRight )
+ {
+ // Tabs hinzufuegen
+ EditPaM aPaM( pNode, 0 );
+ InsertTab( aPaM );
+ }
+ else
+ {
+ // Tabs entfernen
+ EditCharAttrib* pFeature = pNode->GetCharAttribs().FindFeature( 0 );
+ if ( pFeature && ( pFeature->GetStart() == 0 ) &&
+ ( pFeature->GetItem()->Which() == EE_FEATURE_TAB ) )
+ {
+ EditPaM aStartPaM( pNode, 0 );
+ EditPaM aEndPaM( pNode, 1 );
+ ImpDeleteSelection( EditSelection( aStartPaM, aEndPaM ) );
+ }
+ }
+ }
+
+ UndoActionEnd( bRight ? EDITUNDO_INDENTBLOCK : EDITUNDO_UNINDENTBLOCK );
+ UpdateSelections();
+ FormatAndUpdate( pEditView );
+
+ ContentNode* pLastNode = GetEditDoc().GetObject( aNewSel.nEndPara );
+ if ( pLastNode->Len() < aNewSel.nEndPos )
+ aNewSel.nEndPos = pLastNode->Len();
+ pEditView->pImpEditView->SetEditSelection( CreateSel( aNewSel ) );
+ pEditView->pImpEditView->DrawSelection();
+ pEditView->pImpEditView->ShowCursor( FALSE, TRUE );
+ }
+}
+
diff --git a/svx/source/editeng/impedit3.cxx b/svx/source/editeng/impedit3.cxx
new file mode 100644
index 0000000000..adaf5fcb65
--- /dev/null
+++ b/svx/source/editeng/impedit3.cxx
@@ -0,0 +1,3412 @@
+/*************************************************************************
+ *
+ * $RCSfile: impedit3.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#ifndef _WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#pragma hdrstop
+
+#include <adjitem.hxx>
+#include <tstpitem.hxx>
+#include <lspcitem.hxx>
+
+#ifdef DBG_UTIL
+#include <flditem.hxx>
+#endif
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editview.hxx>
+#include <txtrange.hxx>
+#include <cscoitem.hxx>
+#include <colritem.hxx>
+#include <fhgtitem.hxx>
+#include <fwdtitem.hxx>
+#include <kernitem.hxx>
+#include <lrspitem.hxx>
+#include <ulspitem.hxx>
+
+#include <textconv.hxx>
+
+#include <math.h>
+
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _SFX_SFXUNO_HXX
+#include <sfx2/sfxuno.hxx>
+#endif
+
+#ifndef _SV_DRAG_HXX //autogen
+#include <vcl/drag.hxx>
+#endif
+
+#ifndef _SV_METRIC_HXX //autogen
+#include <vcl/metric.hxx>
+#endif
+
+using namespace ::com::sun::star;
+
+SV_DECL_VARARR_SORT( SortedPositions, sal_uInt32, 16, 8 );
+SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 );
+
+#define RESDIFF 10
+#define SCRLRANGE 20 // 1/20 der Breite/Hoehe scrollen, wenn im QueryDrop
+
+#define CH_HYPH '-'
+
+#define WRONG_SHOW_MIN 5
+#define WRONG_SHOW_SMALL 11
+#define WRONG_SHOW_MEDIUM 15
+
+struct TabInfo
+{
+ BOOL bValid;
+
+ SvxTabStop aTabStop;
+ xub_StrLen nCharPos;
+ USHORT nTabPortion;
+ long nStartPosX;
+ long nTabPos;
+
+ TabInfo::TabInfo() { bValid = FALSE; }
+};
+
+Point lcl_Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin )
+{
+ double nRealOrientation = nOrientation*F_PI1800;
+ double nCos = cos( nRealOrientation );
+ double nSin = sin( nRealOrientation );
+
+ Point aRotatedPos;
+ Point aTranslatedPos( rPoint );
+
+ // Translation
+ aTranslatedPos -= rOrigin;
+
+ // Rotation...
+ aRotatedPos.X() = (long) ( nCos*aTranslatedPos.X() + nSin*aTranslatedPos.Y() );
+ aRotatedPos.Y() = (long) - ( nSin*aTranslatedPos.X() - nCos*aTranslatedPos.Y() );
+ aTranslatedPos = aRotatedPos;
+
+ // Translation...
+ aTranslatedPos += rOrigin;
+ return aTranslatedPos;
+}
+
+void lcl_DrawRedLines( OutputDevice* pOutDev, long nFontHeight, const Point& rPnt, sal_uInt16 nIndex, sal_uInt16 nMaxEnd, const long* pDXArray, WrongList* pWrongs, short nOrientation, const Point& rOrigin )
+{
+#ifndef SVX_LIGHT
+ // Aber nur, wenn Font nicht zu klein...
+ long nHght = pOutDev->LogicToPixel( Size( 0, nFontHeight ) ).Height();
+ if( WRONG_SHOW_MIN < nHght )
+ {
+ sal_uInt16 nStyle;
+ if( WRONG_SHOW_MEDIUM < nHght )
+ nStyle = WAVE_NORMAL;
+ else if( WRONG_SHOW_SMALL < nHght )
+ nStyle = WAVE_SMALL;
+ else
+ nStyle = WAVE_FLAT;
+
+ sal_uInt16 nEnd, nStart = nIndex;
+ sal_Bool bWrong = pWrongs->NextWrong( nStart, nEnd );
+ while ( bWrong )
+ {
+ if ( nStart >= nMaxEnd )
+ break;
+
+ if ( nStart < nIndex ) // Wurde korrigiert
+ nStart = nIndex;
+ if ( nEnd > nMaxEnd )
+ nEnd = nMaxEnd;
+ Point aPnt1( rPnt );
+ if ( nStart > nIndex )
+ aPnt1.X() += pDXArray[ nStart - nIndex - 1 ];
+ Point aPnt2( rPnt );
+ DBG_ASSERT( nEnd > nIndex, "RedLine: aPnt2?" );
+ aPnt2.X() += pDXArray[ nEnd - nIndex - 1 ];
+ if ( nOrientation )
+ {
+ aPnt1 = lcl_Rotate( aPnt1, nOrientation, rOrigin );
+ aPnt2 = lcl_Rotate( aPnt2, nOrientation, rOrigin );
+ }
+
+ Color aOldColor( pOutDev->GetLineColor() );
+ pOutDev->SetLineColor( COL_LIGHTRED );
+ pOutDev->DrawWaveLine( aPnt1, aPnt2, nStyle );
+ pOutDev->SetLineColor( aOldColor );
+
+ nStart = nEnd+1;
+ if ( nEnd < nMaxEnd )
+ bWrong = pWrongs->NextWrong( nStart, nEnd );
+ else
+ bWrong = sal_False;
+ }
+ }
+#endif // !SVX_LIGHT
+}
+
+Point lcl_ImplCalcRotatedPos( Point rPos, Point rOrigin, double nSin, double nCos )
+{
+ Point aRotatedPos;
+ // Translation...
+ Point aTranslatedPos( rPos);
+ aTranslatedPos -= rOrigin;
+
+ aRotatedPos.X() = (long) ( nCos*aTranslatedPos.X() + nSin*aTranslatedPos.Y() );
+ aRotatedPos.Y() = (long) - ( nSin*aTranslatedPos.X() - nCos*aTranslatedPos.Y() );
+ aTranslatedPos = aRotatedPos;
+ // Translation...
+ aTranslatedPos += rOrigin;
+
+ return aTranslatedPos;
+}
+
+
+
+
+ // ----------------------------------------------------------------------
+// class ImpEditEngine
+// ----------------------------------------------------------------------
+void ImpEditEngine::UpdateViews( EditView* pCurView )
+{
+ if ( !GetUpdateMode() || IsFormatting() || aInvalidRec.IsEmpty() )
+ return;
+
+ DBG_ASSERT( IsFormatted(), "UpdateViews: Doc nicht formatiert!" );
+
+ for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
+ {
+ EditView* pView = aEditViews[nView];
+ DBG_CHKOBJ( pView, EditView, 0 );
+ pView->HideCursor();
+
+ Rectangle aClipRec( aInvalidRec );
+ aClipRec.Intersection( pView->GetVisArea() );
+ if ( !aClipRec.IsEmpty() )
+ {
+ // in Fensterkoordinaten umwandeln....
+ aClipRec.SetPos( pView->pImpEditView->GetWindowPos( aClipRec.TopLeft() ) );
+
+ if ( pView == pCurView )
+ Paint( pView->pImpEditView, aClipRec, sal_True );
+ else
+ pView->GetWindow()->Invalidate( aClipRec );
+ }
+ }
+
+ if ( pCurView )
+ {
+ sal_Bool bGotoCursor = pCurView->pImpEditView->DoAutoScroll();
+ pCurView->ShowCursor( bGotoCursor );
+ }
+
+ aInvalidRec = Rectangle();
+ CallStatusHdl();
+}
+
+IMPL_LINK( ImpEditEngine, OnlineSpellHdl, Timer *, EMPTYARG )
+{
+ if ( !Application::AnyInput( INPUT_KEYBOARD ) && GetUpdateMode() && IsFormatted() )
+ DoOnlineSpelling();
+ else
+ aOnlineSpellTimer.Start();
+
+ return 0;
+}
+
+IMPL_LINK_INLINE_START( ImpEditEngine, IdleFormatHdl, Timer *, EMPTYARG )
+{
+ aIdleFormatter.ResetRestarts();
+ FormatAndUpdate( aIdleFormatter.GetView() );
+ return 0;
+}
+IMPL_LINK_INLINE_END( ImpEditEngine, IdleFormatHdl, Timer *, EMPTYARG )
+
+void ImpEditEngine::CheckIdleFormatter()
+{
+ aIdleFormatter.ForceTimeout();
+ // Falls kein Idle, aber trotzdem nicht formatiert:
+ if ( !IsFormatted() )
+ FormatDoc();
+}
+
+void ImpEditEngine::FormatFullDoc()
+{
+ for ( sal_uInt16 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
+ GetParaPortions()[nPortion]->MarkSelectionInvalid( 0, GetParaPortions()[nPortion]->GetNode()->Len() );
+ FormatDoc();
+}
+
+void ImpEditEngine::FormatDoc()
+{
+ if ( !GetUpdateMode() || IsFormatting() )
+ return;
+
+ bIsFormatting = sal_True;
+
+ // Dann kann ich auch den Spell-Timer starten...
+ if ( GetStatus().DoOnlineSpelling() )
+ StartOnlineSpellTimer();
+
+ long nY = 0;
+ sal_Bool bGrow = sal_False;
+
+ Font aOldFont( GetRefDevice()->GetFont() );
+
+ // Hier schon, damit nicht jedesmal in CreateLines...
+ MapMode aOldMapMode( GetRefDevice()->GetMapMode() );
+ sal_Bool bMapChanged = ImpCheckRefMapMode();
+
+ aInvalidRec = Rectangle(); // leermachen
+ for ( sal_uInt16 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
+ {
+ ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
+ if ( pParaPortion->MustRepaint() || ( pParaPortion->IsInvalid() && pParaPortion->IsVisible() ) )
+ {
+ if ( pParaPortion->IsInvalid() )
+ {
+ sal_Bool bChangedByDerivedClass = GetEditEnginePtr()->FormattingParagraph( nPara );
+ if ( bChangedByDerivedClass )
+ {
+ pParaPortion->GetTextPortions().Reset();
+ pParaPortion->MarkSelectionInvalid( 0, pParaPortion->GetNode()->Len() );
+ }
+ }
+ // bei MustRepaint() sollte keine Formatierung noetig sein!
+ // 23.1.95: Evtl. ist sie durch eine andere Aktion aber doch
+ // ungueltig geworden!
+// if ( pParaPortion->MustRepaint() || CreateLines( nPara ) )
+ if ( ( pParaPortion->MustRepaint() && !pParaPortion->IsInvalid() )
+ || CreateLines( nPara, nY ) )
+ {
+ if ( !bGrow && pTextRanger )
+ {
+ // Bei einer Aenderung der Hoehe muss alles weiter unten
+ // neu formatiert werden...
+ for ( sal_uInt16 n = nPara+1; n < GetParaPortions().Count(); n++ )
+ {
+ ParaPortion* pPP = GetParaPortions().GetObject( n );
+ pPP->MarkSelectionInvalid( 0, pPP->GetNode()->Len() );
+ pPP->GetLines().Reset();
+ }
+ }
+ bGrow = sal_True;
+ if ( IsCallParaInsertedOrDeleted() )
+ GetEditEnginePtr()->ParagraphHeightChanged( nPara );
+ pParaPortion->SetMustRepaint( sal_False );
+ }
+
+ // InvalidRec nur einmal setzen...
+ if ( aInvalidRec.IsEmpty() )
+ {
+ // Bei Paperwidth 0 (AutoPageSize) bleibt es sonst Empty()...
+ long nWidth = Max( (long)1, aPaperSize.Width() );
+ Range aInvRange( GetInvalidYOffsets( pParaPortion ) );
+ aInvalidRec = Rectangle( Point( 0, nY+aInvRange.Min() ),
+ Size( nWidth, aInvRange.Len() ) );
+ }
+ else
+ {
+ aInvalidRec.Bottom() = nY + pParaPortion->GetHeight();
+ }
+ }
+ else if ( bGrow )
+ {
+ aInvalidRec.Bottom() = nY + pParaPortion->GetHeight();
+ }
+ nY += pParaPortion->GetHeight();
+ }
+
+ // Man kann auch durch UpdateMode An=>AUS=>AN in die Formatierung gelangen...
+ // Optimierung erst nach Vobis-Auslieferung aktivieren...
+// if ( !aInvalidRec.IsEmpty() )
+ {
+ sal_uInt32 nNewHeight = CalcTextHeight();
+ long nDiff = nNewHeight - nCurTextHeight;
+ if ( nDiff )
+ aStatus.GetStatusWord() |= EE_STAT_TEXTHEIGHTCHANGED;
+ if ( nNewHeight < nCurTextHeight )
+ {
+ aInvalidRec.Bottom() = (long)Max( nNewHeight, nCurTextHeight );
+ if ( aInvalidRec.IsEmpty() )
+ {
+ aInvalidRec.Top() = 0;
+ // Left und Right werden nicht ausgewertet, aber wegen IsEmpty gesetzt.
+ aInvalidRec.Left() = 0;
+ aInvalidRec.Right() = aPaperSize.Width();
+ }
+ }
+
+ nCurTextHeight = nNewHeight;
+
+ if ( aStatus.AutoPageSize() )
+ CheckAutoPageSize();
+ else if ( nDiff )
+ {
+ for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
+ {
+ EditView* pView = aEditViews[nView];
+ ImpEditView* pImpView = pView->pImpEditView;
+ if ( pImpView->DoAutoHeight() )
+ {
+ Size aSz( pImpView->GetOutputArea().GetWidth(), nCurTextHeight );
+ if ( aSz.Height() > aMaxAutoPaperSize.Height() )
+ aSz.Height() = aMaxAutoPaperSize.Height();
+ else if ( aSz.Height() < aMinAutoPaperSize.Height() )
+ aSz.Height() = aMinAutoPaperSize.Height();
+ pImpView->ResetOutputArea( Rectangle(
+ pImpView->GetOutputArea().TopLeft(), aSz ) );
+ }
+ }
+ }
+ }
+
+ if ( aStatus.DoRestoreFont() )
+ GetRefDevice()->SetFont( aOldFont );
+ bIsFormatting = sal_False;
+ bFormatted = sal_True;
+
+ if ( bMapChanged )
+ GetRefDevice()->SetMapMode( aOldMapMode );
+
+ CallStatusHdl(); // Falls Modified...
+}
+
+sal_Bool ImpEditEngine::ImpCheckRefMapMode()
+{
+ sal_Bool bChange = sal_False;
+
+ if ( aStatus.DoFormat100() )
+ {
+ MapMode aMapMode( GetRefDevice()->GetMapMode() );
+ if ( aMapMode.GetScaleX().GetNumerator() != aMapMode.GetScaleX().GetDenominator() )
+ bChange = sal_True;
+ else if ( aMapMode.GetScaleY().GetNumerator() != aMapMode.GetScaleY().GetDenominator() )
+ bChange = sal_True;
+
+ if ( bChange )
+ {
+ Fraction Scale1( 1, 1 );
+ aMapMode.SetScaleX( Scale1 );
+ aMapMode.SetScaleY( Scale1 );
+ GetRefDevice()->SetMapMode( aMapMode );
+ }
+ }
+
+ return bChange;
+}
+
+void ImpEditEngine::CheckAutoPageSize()
+{
+ Size aPrevPaperSize( GetPaperSize() );
+ if ( GetStatus().AutoPageWidth() )
+ aPaperSize.Width() = (long)CalcTextWidth();
+ if ( GetStatus().AutoPageHeight() )
+ aPaperSize.Height() = (long)GetTextHeight();
+ SetValidPaperSize( aPaperSize ); //Min, Max beruecksichtigen
+
+ if ( aPaperSize != aPrevPaperSize )
+ {
+ if ( aPaperSize.Width() != aPrevPaperSize.Width() )
+ {
+ // Falls davor zentriert/rechts oder Tabs...
+ aStatus.GetStatusWord() |= EE_STAT_TEXTWIDTHCHANGED;
+// sal_Bool bAutoWidth = aStatus.AutoPageWidth();
+// if ( bAutoWidth )
+// aStatus.TurnOffFlags( EE_CNTRL_AUTOPAGESIZEX );
+ for ( sal_uInt16 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
+ {
+ // Es brauchen nur Absaetze neu formatiert werden,
+ // die nicht linksbuendig sind.
+ // Die Hoehe kann sich hier nicht mehr aendern.
+ ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
+ ContentNode* pNode = pParaPortion->GetNode();
+ SvxAdjust eJustification = SVX_ADJUST_LEFT;
+ if ( !aStatus.IsOutliner() )
+ eJustification = ((const SvxAdjustItem&)pNode->GetContentAttribs().GetItem( EE_PARA_JUST)).GetAdjust();
+ if ( eJustification != SVX_ADJUST_LEFT )
+ {
+ pParaPortion->MarkSelectionInvalid( 0, pNode->Len() );
+ CreateLines( nPara, 0 ); // 0: Bei AutoPageSize kein TextRange!
+ }
+ }
+// if ( bAutoWidth )
+// aStatus.TurnOnFlags( EE_CNTRL_AUTOPAGESIZEX );
+ }
+
+ Size aInvSize = aPaperSize;
+ if ( aPaperSize.Width() < aPrevPaperSize.Width() )
+ aInvSize.Width() = aPrevPaperSize.Width();
+ if ( aPaperSize.Height() < aPrevPaperSize.Height() )
+ aInvSize.Height() = aPrevPaperSize.Height();
+
+ aInvalidRec = Rectangle( Point(), aInvSize );
+
+ for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
+ {
+ EditView* pView = aEditViews[nView];
+ pView->pImpEditView->RecalcOutputArea();
+ }
+ }
+}
+
+sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
+{
+ ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
+
+ // sal_Bool: Aenderung der Hoehe des Absatzes Ja/Nein - sal_True/sal_False
+ DBG_ASSERT( pParaPortion->GetNode(), "Portion ohne Node in CreateLines" );
+ DBG_ASSERT( pParaPortion->IsVisible(), "Unsichtbare Absaetze nicht formatieren!" );
+ DBG_ASSERT( pParaPortion->IsInvalid(), "CreateLines: Portion nicht invalid!" );
+
+
+ // ---------------------------------------------------------------
+ // Schnelle Sonderbehandlung fuer leere Absaetze...
+ // ---------------------------------------------------------------
+ if ( pParaPortion->GetNode()->Len() == 0 )
+ {
+ // schnelle Sonderbehandlung...
+ if ( pParaPortion->GetTextPortions().Count() )
+ pParaPortion->GetTextPortions().Reset();
+ if ( pParaPortion->GetLines().Count() )
+ pParaPortion->GetLines().Reset();
+ CreateAndInsertEmptyLine( pParaPortion, nStartPosY );
+ return FinishCreateLines( pParaPortion );
+ }
+
+ // ---------------------------------------------------------------
+ // Initialisierung......
+ // ---------------------------------------------------------------
+
+ // Immer fuer 100% formatieren:
+ MapMode aOldMapMode( GetRefDevice()->GetMapMode() );
+ sal_Bool bMapChanged = ImpCheckRefMapMode();
+
+ if ( pParaPortion->GetLines().Count() == 0 )
+ {
+ EditLine* pL = new EditLine;
+ pParaPortion->GetLines().Insert( pL, 0 );
+ }
+
+ // ---------------------------------------------------------------
+ // Absatzattribute holen......
+ // ---------------------------------------------------------------
+ ContentNode* const pNode = pParaPortion->GetNode();
+ SvxAdjust eJustification = SVX_ADJUST_LEFT;
+ if ( !aStatus.IsOutliner() )
+ eJustification = ((const SvxAdjustItem&)pNode->GetContentAttribs().GetItem( EE_PARA_JUST)).GetAdjust();
+ sal_Bool bHyphenatePara = ((const SfxBoolItem&)pNode->GetContentAttribs().GetItem( EE_PARA_HYPHENATE )).GetValue();
+ const SvxLRSpaceItem& rLRItem = GetLRSpaceItem( pNode );
+ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)
+ pNode->GetContentAttribs().GetItem( EE_PARA_SBL );
+
+// const sal_uInt16 nInvalidEnd = ( pParaPortion->GetInvalidDiff() > 0 )
+// ? pParaPortion->GetInvalidPosStart() + pParaPortion->GetInvalidDiff()
+// : pNode->Len();
+ const short nInvalidDiff = pParaPortion->GetInvalidDiff();
+ const sal_uInt16 nInvalidStart = pParaPortion->GetInvalidPosStart();
+ const sal_uInt16 nInvalidEnd = nInvalidStart + Abs( nInvalidDiff );
+ sal_Bool bQuickFormat = sal_False;
+ if ( ( pParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff > 0 ) &&
+ ( pNode->Search( CH_FEATURE, nInvalidStart ) > nInvalidEnd ) )
+ {
+ bQuickFormat = sal_True;
+ }
+ else if ( ( pParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff < 0 ) )
+ {
+ // pruefen, ob loeschen ueber Portiongrenzen erfolgte...
+ sal_uInt16 nStart = nInvalidStart; // DOPPELT !!!!!!!!!!!!!!!
+ sal_uInt16 nEnd = nStart - nInvalidDiff; // neg.
+ bQuickFormat = sal_True;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nPortions = pParaPortion->GetTextPortions().Count();
+ for ( sal_uInt16 nTP = 0; nTP < nPortions; nTP++ )
+ {
+ // Es darf kein Start/Ende im geloeschten Bereich liegen.
+ TextPortion* const pTP = pParaPortion->GetTextPortions()[ nTP ];
+ nPos += pTP->GetLen();
+ if ( ( nPos > nStart ) && ( nPos < nEnd ) )
+ {
+ bQuickFormat = sal_False;
+ break;
+ }
+ }
+ }
+
+ sal_uInt16 nRealInvalidStart = nInvalidStart;
+ if ( bQuickFormat )
+ {
+ // schnellere Methode:
+ RecalcTextPortion( pParaPortion, nInvalidStart, nInvalidDiff );
+ }
+ else // nRealInvalidStart kann vor InvalidStart liegen, weil Portions geloescht....
+ CreateTextPortions( pParaPortion, nRealInvalidStart );
+
+ // ---------------------------------------------------------------
+ // Zeile mit InvalidPos suchen, eine Zeile davor beginnen...
+ // Zeilen flaggen => nicht removen !
+ // ---------------------------------------------------------------
+
+ sal_uInt16 nLine = pParaPortion->GetLines().Count()-1;
+ for ( sal_uInt16 nL = 0; nL <= nLine; nL++ )
+ {
+ EditLine* pLine = pParaPortion->GetLines().GetObject( nL );
+ if ( pLine->GetEnd() > nRealInvalidStart ) // nicht nInvalidStart!
+ {
+ nLine = nL;
+ break;
+ }
+ pLine->SetValid();
+ }
+ // Eine Zeile davor beginnen...
+ // Wenn ganz hinten getippt wird, kann sich die Zeile davor nicht aendern.
+ if ( nLine && ( !pParaPortion->IsSimpleInvalid() || ( nInvalidEnd < pNode->Len() ) || ( nInvalidDiff <= 0 ) ) )
+ nLine--;
+
+ EditLine* pLine = pParaPortion->GetLines().GetObject( nLine );
+
+ static Rectangle aZeroArea = Rectangle( Point(), Point() );
+ Rectangle aBulletArea( aZeroArea );
+ if ( !nLine )
+ {
+ aBulletArea = GetEditEnginePtr()->GetBulletArea( GetParaPortions().GetPos( pParaPortion ) );
+ if ( aBulletArea.Right() > 0 )
+ pParaPortion->SetBulletX( (sal_uInt16) GetXValue( aBulletArea.Right() ) );
+ else
+ pParaPortion->SetBulletX( 0 ); // Falls Bullet falsch eingestellt.
+ }
+
+ // ---------------------------------------------------------------
+ // Ab hier alle Zeilen durchformatieren...
+ // ---------------------------------------------------------------
+ sal_uInt16 nDelFromLine = 0xFFFF;
+ sal_Bool bLineBreak = sal_False;
+
+ sal_uInt16 nIndex = pLine->GetStart();
+ EditLine aSaveLine( *pLine );
+ SvxFont aTmpFont( pNode->GetCharAttribs().GetDefFont() );
+
+ sal_Bool bCalcCharPositions = sal_True;
+ long* pBuf = new long[ pNode->Len() ];
+
+ sal_Bool bSameLineAgain = sal_False; // Fuer TextRanger, wenn sich die Hoehe aendert.
+ TabInfo aCurrentTab;
+
+ while ( nIndex < pNode->Len() )
+ {
+ sal_Bool bEOL = sal_False;
+ sal_Bool bEOC = sal_False;
+ sal_uInt16 nPortionStart = 0;
+ sal_uInt16 nPortionEnd = 0;
+
+ long nStartX = GetXValue( rLRItem.GetTxtLeft() );
+ if ( nIndex == 0 )
+ {
+ long nFI = GetXValue( rLRItem.GetTxtFirstLineOfst() );
+ nStartX += nFI;
+
+ if ( !nLine && ( pParaPortion->GetBulletX() > nStartX ) )
+ {
+ nStartX -= nFI; // Vielleicht reicht der LI?
+ if ( pParaPortion->GetBulletX() > nStartX )
+ nStartX = pParaPortion->GetBulletX();
+ }
+ }
+
+
+ long nMaxLineWidth = aStatus.AutoPageWidth() ? aMaxAutoPaperSize.Width() : aPaperSize.Width();
+ nMaxLineWidth -= GetXValue( rLRItem.GetRight() );
+ nMaxLineWidth -= nStartX;
+
+ // Wenn PaperSize == long_max, kann ich keinen neg. Erstzeileneinzug
+ // abziehen (Overflow)
+ if ( ( nMaxLineWidth < 0 ) && ( nStartX < 0 ) )
+ nMaxLineWidth = aPaperSize.Width() - GetXValue( rLRItem.GetRight() );
+
+ // Wenn jetzt noch kleiner 0, kann es nur der rechte Rand sein.
+ if ( nMaxLineWidth < 0 )
+ nMaxLineWidth = 1;
+
+ // Problem: Da eine Zeile _vor_ der ungueltigen Position mit der
+ // Formatierung begonnen wird, werden hier leider auch die Positionen
+ // neu bestimmt...
+ // Loesungsansatz:
+ // Die Zeile davor kann nur groesser werden, nicht kleiner
+ // => ...
+ if ( bCalcCharPositions )
+ pLine->GetCharPosArray().Remove( 0, pLine->GetCharPosArray().Count() );
+
+ sal_uInt16 nTmpPos = nIndex;
+ sal_uInt16 nTmpPortion = pLine->GetStartPortion();
+ long nTmpWidth = 0;
+ long nXWidth = nMaxLineWidth;
+ if ( nXWidth <= nTmpWidth ) // while muss 1x durchlaufen werden
+ nXWidth = nTmpWidth+1;
+
+ SvLongsPtr pTextRanges = 0;
+ long nTextExtraYOffset = 0;
+ long nTextXOffset = 0;
+ long nTextLineHeight = 0;
+ if ( pTextRanger )
+ {
+ long nTextY = nStartPosY + GetEditCursor( pParaPortion, pLine->GetStart() ).Top();
+ if ( !bSameLineAgain )
+ {
+ SeekCursor( pNode, nTmpPos+1, aTmpFont );
+ aTmpFont.SetPhysFont( GetRefDevice() );
+ nTextLineHeight = aTmpFont.GetPhysTxtSize( GetRefDevice(), String() ).Height();
+ // Metriken koennen groesser sein
+ FormatterFontMetric aTempFormatterMetrics;
+ RecalcFormatterFontMetrics( aTempFormatterMetrics, aTmpFont );
+ sal_uInt16 nLineHeight = aTempFormatterMetrics.GetHeight();
+ if ( nLineHeight > nTextLineHeight )
+ nTextLineHeight = nLineHeight;
+ }
+ else
+ nTextLineHeight = pLine->GetHeight();
+
+ nXWidth = 0;
+ while ( !nXWidth )
+ {
+ pTextRanges = pTextRanger->GetTextRanges( Range( nTextY + nTextExtraYOffset, nTextY + nTextExtraYOffset + nTextLineHeight ) );
+ DBG_ASSERT( pTextRanges, "GetTextRanges?!" );
+ long nMaxRangeWidth = 0;
+ // Den breitesten Bereich verwenden...
+ // Der breiteste Bereich koennte etwas verwirren, also
+ // generell den ersten. Am besten mal richtig mit Luecken.
+// for ( sal_uInt16 n = 0; n < pTextRanges->Count(); )
+ if ( pTextRanges->Count() )
+ {
+ sal_uInt16 n = 0;
+ long nA = pTextRanges->GetObject( n++ );
+ long nB = pTextRanges->GetObject( n++ );
+ DBG_ASSERT( nA <= nB, "TextRange verdreht?" );
+ long nW = nB - nA;
+ if ( nW > nMaxRangeWidth )
+ {
+ nMaxRangeWidth = nW;
+ nTextXOffset = nA;
+ }
+ }
+ nXWidth = nMaxRangeWidth;
+ if ( nXWidth )
+ nMaxLineWidth = nXWidth - nStartX - GetXValue( rLRItem.GetRight() );
+ else
+ {
+ // Weiter unten im Polygon versuchen.
+ // Unterhalb des Polygons die Paperbreite verwenden.
+ nTextExtraYOffset += Max( (long)(nTextLineHeight / 10), (long)1 );
+ if ( ( nTextY + nTextExtraYOffset ) > pTextRanger->GetBoundRect().Bottom() )
+ {
+ nXWidth = GetPaperSize().Width();
+ if ( !nXWidth ) // AutoPaperSize
+ nXWidth = 0x7FFFFFFF;
+ }
+ }
+ }
+ }
+
+ // Portion suchen, die nicht mehr in Zeile passt....
+ TextPortion* pPortion;
+ sal_Bool bBrokenLine = sal_False;
+ bLineBreak = sal_False;
+ EditCharAttrib* pNextFeature = pNode->GetCharAttribs().FindFeature( pLine->GetStart() );
+ while ( ( nTmpWidth < nXWidth ) && !bEOL && ( nTmpPortion < pParaPortion->GetTextPortions().Count() ) )
+ {
+ nPortionStart = nTmpPos;
+ pPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
+ if ( pPortion->GetKind() == PORTIONKIND_HYPHENATOR )
+ {
+ // Portion wegschmeissen, ggf. die davor korrigieren, wenn
+ // die Hyph-Portion ein Zeichen geschluckt hat...
+ pParaPortion->GetTextPortions().Remove( nTmpPortion );
+ if ( nTmpPortion && pPortion->GetLen() )
+ {
+ nTmpPortion--;
+ TextPortion* pPrev = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
+ DBG_ASSERT( pPrev->GetKind() == PORTIONKIND_TEXT, "Portion?!" );
+ nTmpWidth -= pPrev->GetSize().Width();
+ nTmpPos -= pPrev->GetLen();
+ pPrev->SetLen( pPrev->GetLen() + pPortion->GetLen() );
+ pPrev->GetSize().Width() = (-1);
+ }
+ delete pPortion;
+ DBG_ASSERT( nTmpPortion < pParaPortion->GetTextPortions().Count(), "Keine Portion mehr da!" );
+ pPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
+ }
+ DBG_ASSERT( pPortion->GetKind() != PORTIONKIND_HYPHENATOR, "CreateLines: Hyphenator-Portion!" );
+ DBG_ASSERT( pPortion->GetLen(), "Leere Portion in CreateLines ?!" );
+ if ( pNextFeature && ( pNextFeature->GetStart() == nTmpPos ) )
+ {
+ sal_uInt16 nWhich = pNextFeature->GetItem()->Which();
+ switch ( nWhich )
+ {
+ case EE_FEATURE_TAB:
+ {
+ long nOldTmpWidth = nTmpWidth;
+
+ // Tab-Pos suchen...
+ long nCurPos = nTmpWidth+nStartX;
+ nCurPos -= rLRItem.GetTxtLeft(); // Tabs relativ zu LI
+ // Skalierung rausrechnen
+ if ( aStatus.DoStretch() && ( nStretchX != 100 ) )
+ nCurPos = nCurPos*100/nStretchX;
+
+ aCurrentTab.aTabStop = pNode->GetContentAttribs().FindTabStop( nCurPos, aEditDoc.GetDefTab() );
+ aCurrentTab.nTabPos = GetXValue( (long) ( aCurrentTab.aTabStop.GetTabPos() + rLRItem.GetTxtLeft() ) );
+ aCurrentTab.bValid = FALSE;
+ if ( ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_RIGHT ) ||
+ ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_CENTER ) ||
+ ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL ) )
+ {
+ // Bei LEFT/DEFAULT wird dieses Tab nicht mehr betrachtet.
+ aCurrentTab.bValid = TRUE;
+ aCurrentTab.nStartPosX = nTmpWidth;
+ aCurrentTab.nCharPos = nTmpPos;
+ aCurrentTab.nTabPortion = nTmpPortion;
+ }
+
+ pPortion->GetKind() = PORTIONKIND_TAB;
+ pPortion->SetExtraValue( aCurrentTab.aTabStop.GetFill() );
+ pPortion->GetSize().Height() = 0;
+ pPortion->GetSize().Width() = aCurrentTab.nTabPos - (nTmpWidth+nStartX);
+
+ DBG_ASSERT( pPortion->GetSize().Width() >= 0, "Tab falsch berechnet!" );
+
+ nTmpWidth = aCurrentTab.nTabPos-nStartX;
+
+ // Wenn dies das erste Token in der Zeile ist,
+ // und nTmpWidth > aPaperSize.Width, habe ich eine
+ // Endlos-Schleife!
+ if ( ( nTmpWidth >= nXWidth ) && ( nTmpPortion == pLine->GetStartPortion() ) )
+ {
+ // Aber was jetzt ?
+ // Tab passend machen
+ pPortion->GetSize().Width() = nXWidth-nOldTmpWidth;
+ nTmpWidth = nXWidth-1;
+ bEOL = sal_True;
+ bBrokenLine = sal_True;
+ }
+ pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() );
+ }
+ break;
+ case EE_FEATURE_LINEBR:
+ {
+ DBG_ASSERT( pPortion, "?!" );
+ pPortion->GetSize().Width() = 0;
+ bEOL = sal_True;
+ bLineBreak = sal_True;
+ pPortion->GetKind() = PORTIONKIND_LINEBREAK;
+ }
+ break;
+ case EE_FEATURE_FIELD:
+ {
+ long nCurWidth = nTmpWidth;
+ SeekCursor( pNode, nTmpPos+1, aTmpFont );
+ sal_Unicode cChar = 0; // later: NBS?
+ aTmpFont.SetPhysFont( GetRefDevice() );
+ String aFieldValue = cChar ? String(cChar) : ((EditCharAttribField*)pNextFeature)->GetFieldValue();
+ if ( bCalcCharPositions || !pPortion->HasValidSize() )
+ {
+ pPortion->GetSize() = aTmpFont.QuickGetTextSize( GetRefDevice(), aFieldValue, 0, aFieldValue.Len(), 0 );
+ // Damit kein Scrollen bei ueberlangen Feldern
+ if ( pPortion->GetSize().Width() > nXWidth )
+ pPortion->GetSize().Width() = nXWidth;
+ }
+ nTmpWidth += pPortion->GetSize().Width();
+ pLine->GetCharPosArray().Insert( pPortion->GetSize().Width()-nCurWidth, nTmpPos-pLine->GetStart() );
+ pPortion->GetKind() = cChar ? PORTIONKIND_TEXT : PORTIONKIND_FIELD;
+ // Wenn dies das erste Token in der Zeile ist,
+ // und nTmpWidth > aPaperSize.Width, habe ich eine
+ // Endlos-Schleife!
+ if ( ( nTmpWidth >= nXWidth ) && ( nTmpPortion == pLine->GetStartPortion() ) )
+ {
+ nTmpWidth = nXWidth-1;
+ bEOL = sal_True;
+ bBrokenLine = sal_True;
+ }
+ }
+ break;
+ default: DBG_ERROR( "Was fuer ein Feature ?" );
+ }
+ pNextFeature = pNode->GetCharAttribs().FindFeature( pNextFeature->GetStart() + 1 );
+ }
+ else
+ {
+ SeekCursor( pNode, nTmpPos+1, aTmpFont );
+ aTmpFont.SetPhysFont( GetRefDevice() );
+ if ( bCalcCharPositions || !pPortion->HasValidSize() )
+ pPortion->GetSize() = aTmpFont.QuickGetTextSize( GetRefDevice(), *pParaPortion->GetNode(), nTmpPos, pPortion->GetLen(), pBuf );
+ nTmpWidth += pPortion->GetSize().Width();
+ if ( bCalcCharPositions )
+ {
+ sal_uInt16 nLen = pPortion->GetLen();
+ // Es wird am Anfang generell das Array geplaettet
+ // => Immer einfach schnelles insert.
+ sal_uInt16 nPos = nTmpPos - pLine->GetStart();
+ pLine->GetCharPosArray().Insert( pBuf, nLen, nPos );
+ }
+ }
+
+ if ( aCurrentTab.bValid && ( nTmpPortion != aCurrentTab.nTabPortion ) )
+ {
+ long nWidthAfterTab = 0;
+ for ( USHORT n = aCurrentTab.nTabPortion+1; n <= nTmpPortion; n++ )
+ {
+ TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( n );
+ nWidthAfterTab += pTP->GetSize().Width();
+ }
+ long nW; // Length before tab position
+ if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_RIGHT )
+ nW = nWidthAfterTab;
+ else if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_CENTER )
+ nW = nWidthAfterTab/2;
+ else if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL )
+ {
+ nW = nWidthAfterTab;
+ String aText = GetSelected( EditSelection( EditPaM( pParaPortion->GetNode(), nTmpPos ),
+ EditPaM( pParaPortion->GetNode(), nTmpPos + pPortion->GetLen() ) ) );
+ USHORT nDecPos = aText.Search( aCurrentTab.aTabStop.GetDecimal() );
+ if ( nDecPos != STRING_NOTFOUND )
+ {
+ nW = aTmpFont.QuickGetTextSize( GetRefDevice(), *pParaPortion->GetNode(), nTmpPos, nDecPos, NULL ).Width();
+ aCurrentTab.bValid = FALSE;
+ }
+ }
+ long nMaxW = aCurrentTab.nTabPos - aCurrentTab.nStartPosX;
+ if ( nW >= nMaxW )
+ {
+ nW = nMaxW;
+ aCurrentTab.bValid = FALSE;
+ }
+ TextPortion* pTabPortion = pParaPortion->GetTextPortions().GetObject( aCurrentTab.nTabPortion );
+ pTabPortion->GetSize().Width() = aCurrentTab.nTabPos - aCurrentTab.nStartPosX - nW;
+ nTmpWidth = aCurrentTab.nStartPosX + pTabPortion->GetSize().Width() + nWidthAfterTab;
+ }
+
+ nTmpPos += pPortion->GetLen();
+ nPortionEnd = nTmpPos;
+ nTmpPortion++;
+ if ( aStatus.OneCharPerLine() )
+ bEOL = sal_True;
+ }
+
+ aCurrentTab.bValid = FALSE;
+
+ // das war evtl. eine Portion zu weit:
+ sal_Bool bFixedEnd = sal_False;
+ if ( aStatus.OneCharPerLine() )
+ {
+ // Zustand vor Portion: ( bis auf nTmpWidth )
+ nPortionEnd = nTmpPos;
+ nTmpPos -= pPortion->GetLen();
+ nPortionStart = nTmpPos;
+ nTmpPortion--;
+
+ bEOL = sal_True;
+ bEOC = sal_False;
+
+ // Und jetzt genau ein Zeichen:
+ nTmpPos++;
+ nTmpPortion++;
+ nPortionEnd = nTmpPortion;
+ // Eine Nicht-Feature-Portion muss gebrochen werden
+ if ( pPortion->GetLen() > 1 )
+ {
+ DBG_ASSERT( pPortion->GetKind() == PORTIONKIND_TEXT, "Len>1, aber keine TextPortion?" );
+ nTmpWidth -= pPortion->GetSize().Width();
+ sal_uInt16 nP = SplitTextPortion( pParaPortion, nTmpPos, pLine );
+ TextPortion* p = pParaPortion->GetTextPortions().GetObject( nP );
+ DBG_ASSERT( p, "Portion ?!" );
+ nTmpWidth += p->GetSize().Width();
+ }
+ }
+ else if ( nTmpWidth >= nXWidth )
+ {
+ nPortionEnd = nTmpPos;
+ nTmpPos -= pPortion->GetLen();
+ nPortionStart = nTmpPos;
+ nTmpPortion--;
+ bEOL = sal_False;
+ bEOC = sal_False;
+ switch ( pPortion->GetKind() )
+ {
+ case PORTIONKIND_TEXT:
+ {
+ nTmpWidth -= pPortion->GetSize().Width();
+ }
+ break;
+ case PORTIONKIND_FIELD:
+ case PORTIONKIND_TAB:
+ {
+ nTmpWidth -= pPortion->GetSize().Width();
+ bEOL = sal_True;
+ bFixedEnd = sal_True;
+ }
+ break;
+ default:
+ {
+ // Ein Feature wird nicht umgebrochen:
+ DBG_ASSERT( pPortion->GetKind() == PORTIONKIND_LINEBREAK, "Was fuer ein Feature ?" );
+ bEOL = sal_True;
+ bFixedEnd = sal_True;
+ }
+ }
+ }
+ else
+ {
+ bEOL = sal_True;
+ bEOC = sal_True;
+ pLine->SetEnd( nPortionEnd );
+ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine TextPortions?" );
+ pLine->SetEndPortion( (sal_uInt16)pParaPortion->GetTextPortions().Count() - 1 );
+ }
+
+ if ( aStatus.OneCharPerLine() )
+ {
+ pLine->SetEnd( nPortionEnd );
+ pLine->SetEndPortion( nTmpPortion-1 );
+ }
+ else if ( bFixedEnd )
+ {
+ pLine->SetEnd( nPortionStart );
+ pLine->SetEndPortion( nTmpPortion-1 );
+ }
+ else if ( bLineBreak || bBrokenLine )
+ {
+ pLine->SetEnd( nPortionStart+1 );
+ pLine->SetEndPortion( nTmpPortion-1 );
+ bEOC = sal_False; // wurde oben gesetzt, vielleich mal die if's umstellen?
+ }
+ else if ( !bEOL )
+ {
+ DBG_ASSERT( (nPortionEnd-nPortionStart) == pPortion->GetLen(), "Doch eine andere Portion?!" );
+ long nRemainingWidth = nMaxLineWidth - nTmpWidth;
+ sal_Bool bCanHyphenate = ( aTmpFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL );
+ ImpBreakLine( pParaPortion, pLine, pPortion, nPortionStart,
+ nRemainingWidth, bCanHyphenate && bHyphenatePara );
+ }
+
+ // ------------------------------------------------------------------
+ // Zeile fertig => justieren
+ // ------------------------------------------------------------------
+
+ // CalcTextSize sollte besser durch ein kontinuierliches
+ // Registrieren ersetzt werden !
+ Size aTextSize = pLine->CalcTextSize( *pParaPortion );
+
+ if ( aTextSize.Height() == 0 )
+ {
+ SeekCursor( pNode, pLine->GetStart(), aTmpFont );
+ aTmpFont.SetPhysFont( pRefDev );
+ aTextSize.Height() = aTmpFont.GetPhysTxtSize( pRefDev, String() ).Height();
+ pLine->SetHeight( (sal_uInt16)aTextSize.Height() );
+ }
+
+
+ // Die Fontmetriken koennen nicht kontinuierlich berechnet werden,
+ // wenn der Font sowieso eingestellt ist, weil ggf. ein grosser Font
+ // erst nach dem Umbrechen ploetzlich in der naechsten Zeile landet
+ // => Font-Metriken zu gross.
+ FormatterFontMetric aFormatterMetrics;
+ sal_uInt16 nTPos = pLine->GetStart();
+ for ( sal_uInt16 nP = pLine->GetStartPortion(); nP <= pLine->GetEndPortion(); nP++ )
+ {
+ SeekCursor( pNode, nTPos+1, aTmpFont );
+ aTmpFont.SetPhysFont( GetRefDevice() );
+ RecalcFormatterFontMetrics( aFormatterMetrics, aTmpFont );
+ TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( nP );
+ nTPos += pTP->GetLen();
+ }
+ sal_uInt16 nLineHeight = aFormatterMetrics.GetHeight();
+ if ( nLineHeight > pLine->GetHeight() )
+ pLine->SetHeight( nLineHeight );
+ pLine->SetMaxAscent( aFormatterMetrics.nMaxAscent );
+
+ bSameLineAgain = sal_False;
+ if ( pTextRanger && ( pLine->GetHeight() > nTextLineHeight ) )
+ {
+ // Nochmal mit der anderen Groesse aufsetzen!
+ bSameLineAgain = sal_True;
+ }
+
+
+ if ( !aStatus.IsOutliner() )
+ {
+ if ( rLSItem.GetLineSpaceRule() == SVX_LINE_SPACE_MIN )
+ {
+ sal_uInt16 nMinHeight = GetYValue( rLSItem.GetLineHeight() );
+ sal_uInt16 nTxtHeight = pLine->GetHeight();
+ if ( nTxtHeight < nMinHeight )
+ {
+ // Der Ascent muss um die Differenz angepasst werden:
+ long nDiff = nMinHeight - nTxtHeight;
+ pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() + nDiff) );
+ pLine->SetHeight( nMinHeight, nTxtHeight );
+ }
+ }
+ else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
+ {
+ if ( nPara || ( pLine->GetStartPortion() != 0 ) ) // Nicht die aller erste Zeile
+ {
+ sal_uInt16 nTxtHeight = pLine->GetHeight();
+ sal_uInt32 nH = nTxtHeight;
+ nH *= rLSItem.GetPropLineSpace();
+ nH /= 100;
+ // Der Ascent muss um die Differenz angepasst werden:
+ long nDiff = pLine->GetHeight() - nH;
+ if ( nDiff > pLine->GetMaxAscent() )
+ nDiff = pLine->GetMaxAscent();
+ pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() - nDiff) );
+ pLine->SetHeight( (sal_uInt16)nH, nTxtHeight );
+ }
+ }
+ }
+
+ if ( !nLine )
+ {
+ long nBulletHeight = aBulletArea.GetHeight();
+ if ( nBulletHeight > (long)pLine->GetHeight() )
+ {
+ long nDiff = nBulletHeight - (long)pLine->GetHeight();
+ // nDiff auf oben und unten verteilen.
+ pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() + nDiff/2) );
+ pLine->SetHeight( (sal_uInt16)nBulletHeight );
+ }
+ }
+
+ // Zeilenhoehe auf Window-Pixel alignen?
+ // Nein, waere Positionsabhaengig.
+
+ if ( aStatus.AutoPageWidth() )
+ {
+ // Wenn die Zeile in die aktuelle Papierbreite passt, muss
+ // diese Breite fuer die Ausrichting verwendet werden.
+ // Wenn sie nicht passt oder sie die Papierbreite aendert,
+ // wird bei Justification != LEFT sowieso noch mal formatiert.
+ long nMaxLineWidthFix = aPaperSize.Width() -
+ GetXValue( rLRItem.GetRight() ) - nStartX;
+ if ( aTextSize.Width() < nMaxLineWidthFix )
+ nMaxLineWidth = nMaxLineWidthFix;
+ }
+ switch ( eJustification )
+ {
+ case SVX_ADJUST_CENTER:
+ {
+ long n = ( nMaxLineWidth - aTextSize.Width() ) / 2;
+ n += nStartX; // Einrueckung bleibt erhalten.
+ if ( n > 0 )
+ pLine->SetStartPosX( (sal_uInt16)n );
+ else
+ pLine->SetStartPosX( 0 );
+
+ }
+ break;
+ case SVX_ADJUST_RIGHT:
+ {
+ // Bei automatisch umgebrochenen Zeilen, die ein Blank
+ // am Ende enthalten, darf das Blank nicht ausgegeben werden!
+
+ long n = nMaxLineWidth - aTextSize.Width();
+ n += nStartX; // Einrueckung bleibt erhalten.
+ if ( n > 0 )
+ pLine->SetStartPosX( (sal_uInt16)n );
+ else
+ pLine->SetStartPosX( 0 );
+ }
+ break;
+ case SVX_ADJUST_BLOCK:
+ {
+ long nRemainingSpace = nMaxLineWidth - aTextSize.Width();
+ pLine->SetStartPosX( (sal_uInt16)nStartX );
+ if ( !bEOC && ( nRemainingSpace > 0 ) ) // nicht die letzte Zeile...
+ pParaPortion->AdjustBlocks( pLine, nRemainingSpace );
+ }
+ break;
+ default:
+ {
+ pLine->SetStartPosX( (sal_uInt16)nStartX ); // FI, LI
+ }
+ break;
+ }
+
+ // -----------------------------------------------------------------
+ // pruefen, ob die Zeile neu ausgegeben werden muss...
+ // -----------------------------------------------------------------
+ pLine->SetInvalid();
+
+ // Wenn eine Portion umgebrochen wurde sind ggf. viel zu viele Positionen
+ // im CharPosArray:
+ if ( bCalcCharPositions )
+ {
+ sal_uInt16 nLen = pLine->GetLen();
+ sal_uInt16 nCount = pLine->GetCharPosArray().Count();
+ if ( nCount > nLen )
+ pLine->GetCharPosArray().Remove( nLen, nCount-nLen );
+ }
+
+ if ( pTextRanger )
+ {
+ if ( nTextXOffset )
+ pLine->SetStartPosX( (sal_uInt16) ( pLine->GetStartPosX() + nTextXOffset ) );
+ if ( nTextExtraYOffset )
+ {
+ pLine->SetHeight( (sal_uInt16) ( pLine->GetHeight() + nTextExtraYOffset ), 0, pLine->GetHeight() );
+ pLine->SetMaxAscent( (sal_uInt16) ( pLine->GetMaxAscent() + nTextExtraYOffset ) );
+ }
+ }
+
+ // Fuer kleiner 0 noch ueberlegen!
+ if ( pParaPortion->IsSimpleInvalid() /* && ( nInvalidDiff > 0 ) */ )
+ {
+ // Aenderung durch einfache Textaenderung...
+ // Formatierung nicht abbrechen, da Portions evtl. wieder
+ // gesplittet werden muessen!
+ // Wenn irgendwann mal abbrechbar, dann fogende Zeilen Validieren!
+ // Aber ggf. als Valid markieren, damit weniger Ausgabe...
+ if ( pLine->GetEnd() < nInvalidStart )
+ {
+ if ( *pLine == aSaveLine )
+ {
+ pLine->SetValid();
+ }
+ }
+ else
+ {
+ sal_uInt16 nStart = pLine->GetStart();
+ sal_uInt16 nEnd = pLine->GetEnd();
+
+ if ( nStart > nInvalidEnd )
+ {
+ if ( ( ( nStart-nInvalidDiff ) == aSaveLine.GetStart() ) &&
+ ( ( nEnd-nInvalidDiff ) == aSaveLine.GetEnd() ) )
+ {
+ pLine->SetValid();
+ if ( bCalcCharPositions && bQuickFormat )
+ {
+ bCalcCharPositions = sal_False;
+ bLineBreak = sal_False;
+ pParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
+ break;
+ }
+ }
+ }
+ else if ( bCalcCharPositions && bQuickFormat && ( nEnd > nInvalidEnd) )
+ {
+ // Wenn die ungueltige Zeile so endet, dass die naechste an
+ // der 'gleichen' Textstelle wie vorher beginnt, also nicht
+ // anders umgebrochen wird, brauche ich dort auch nicht die
+ // textbreiten neu bestimmen:
+ if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) )
+ {
+ bCalcCharPositions = sal_False;
+ bLineBreak = sal_False;
+ pParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !bSameLineAgain )
+ {
+ nIndex = pLine->GetEnd(); // naechste Zeile Start = letzte Zeile Ende
+ // weil nEnd hinter das letzte Zeichen zeigt!
+
+ sal_uInt16 nEndPortion = pLine->GetEndPortion();
+
+ // Naechste Zeile oder ggf. neue Zeile....
+ pLine = 0;
+ if ( nLine < pParaPortion->GetLines().Count()-1 )
+ pLine = pParaPortion->GetLines().GetObject( ++nLine );
+ if ( pLine && ( nIndex >= pNode->Len() ) )
+ {
+ nDelFromLine = nLine;
+ break;
+ }
+ if ( !pLine && ( nIndex < pNode->Len() ) )
+ {
+ pLine = new EditLine;
+ pParaPortion->GetLines().Insert( pLine, ++nLine );
+ }
+ if ( pLine )
+ {
+ aSaveLine = *pLine;
+ pLine->SetStart( nIndex );
+ pLine->SetEnd( nIndex );
+ pLine->SetStartPortion( nEndPortion+1 );
+ pLine->SetEndPortion( nEndPortion+1 );
+ }
+ }
+ } // while ( Index < Len )
+
+ if ( nDelFromLine != 0xFFFF )
+ pParaPortion->GetLines().DeleteFromLine( nDelFromLine );
+
+ DBG_ASSERT( pParaPortion->GetLines().Count(), "Keine Zeile nach CreateLines!" );
+
+ if ( bLineBreak == sal_True )
+ CreateAndInsertEmptyLine( pParaPortion, nStartPosY );
+
+ delete pBuf;
+
+ sal_Bool bHeightChanged = FinishCreateLines( pParaPortion );
+
+ if ( bMapChanged )
+ GetRefDevice()->SetMapMode( aOldMapMode );
+
+ return bHeightChanged;
+}
+
+void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uInt32 nStartPosY )
+{
+ EditLine* pTmpLine = new EditLine;
+ pTmpLine->SetStart( pParaPortion->GetNode()->Len() );
+ pTmpLine->SetEnd( pParaPortion->GetNode()->Len() );
+ pParaPortion->GetLines().Insert( pTmpLine, pParaPortion->GetLines().Count() );
+
+ sal_Bool bLineBreak = pParaPortion->GetNode()->Len() ? sal_True : sal_False;
+ const SvxLRSpaceItem& rLRItem = GetLRSpaceItem( pParaPortion->GetNode() );
+ const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pParaPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL );
+ short nStartX = GetXValue( (short)(rLRItem.GetTxtLeft() + rLRItem.GetTxtFirstLineOfst()) );
+
+ Rectangle aBulletArea = Rectangle( Point(), Point() );
+ if ( bLineBreak == sal_True )
+ {
+ nStartX = GetXValue( rLRItem.GetTxtLeft() );
+ }
+ else
+ {
+ aBulletArea = GetEditEnginePtr()->GetBulletArea( GetParaPortions().GetPos( pParaPortion ) );
+ if ( aBulletArea.Right() > 0 )
+ pParaPortion->SetBulletX( (sal_uInt16) GetXValue( aBulletArea.Right() ) );
+ else
+ pParaPortion->SetBulletX( 0 ); // Falls Bullet falsch eingestellt.
+ if ( pParaPortion->GetBulletX() > nStartX )
+ {
+ nStartX = GetXValue( rLRItem.GetTxtLeft() );
+ if ( pParaPortion->GetBulletX() > nStartX )
+ nStartX = pParaPortion->GetBulletX();
+ }
+ }
+
+ SvxFont aTmpFont;
+ SeekCursor( pParaPortion->GetNode(), bLineBreak ? pParaPortion->GetNode()->Len() : 0, aTmpFont );
+ aTmpFont.SetPhysFont( pRefDev );
+
+ TextPortion* pDummyPortion = new TextPortion( 0 );
+ pDummyPortion->GetSize() = aTmpFont.GetPhysTxtSize( pRefDev, String() );
+ pParaPortion->GetTextPortions().Insert( pDummyPortion, pParaPortion->GetTextPortions().Count() );
+ FormatterFontMetric aFormatterMetrics;
+ RecalcFormatterFontMetrics( aFormatterMetrics, aTmpFont );
+ pTmpLine->SetMaxAscent( aFormatterMetrics.nMaxAscent );
+ pTmpLine->SetHeight( (sal_uInt16) pDummyPortion->GetSize().Height() );
+ sal_uInt16 nLineHeight = aFormatterMetrics.GetHeight();
+ if ( nLineHeight > pTmpLine->GetHeight() )
+ pTmpLine->SetHeight( nLineHeight );
+
+ if ( !aStatus.IsOutliner() )
+ {
+ SvxAdjust eJustification = ((const SvxAdjustItem&)pParaPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_JUST)).GetAdjust();
+ long nMaxLineWidth = aPaperSize.Width() - GetXValue( rLRItem.GetRight() );
+ long nTextXOffset = 0;
+ if ( pTextRanger )
+ {
+ long nTextY = nStartPosY + GetEditCursor( pParaPortion, pTmpLine->GetStart() ).Top();
+ long nTextLineHeight = pDummyPortion->GetSize().Height();
+ long nTextExtraYOffset = 0;
+ long nXWidth = 0;
+ while ( !nXWidth )
+ {
+ SvLongsPtr pTextRanges = pTextRanger->GetTextRanges( Range( nTextY + nTextExtraYOffset, nTextY + nTextExtraYOffset + nTextLineHeight ) );
+ DBG_ASSERT( pTextRanges, "GetTextRanges?!" );
+ long nMaxRangeWidth = 0;
+ // Den breitesten Bereich verwenden...
+ for ( sal_uInt16 n = 0; n < pTextRanges->Count(); )
+ {
+ long nA = pTextRanges->GetObject( n++ );
+ long nB = pTextRanges->GetObject( n++ );
+ DBG_ASSERT( nA <= nB, "TextRange verdreht?" );
+ long nW = nB - nA;
+ if ( nW > nMaxRangeWidth )
+ {
+ nMaxRangeWidth = nW;
+ nTextXOffset = nA;
+ }
+ }
+ nXWidth = nMaxRangeWidth;
+ if ( nXWidth )
+ nMaxLineWidth = nXWidth - nStartX - GetXValue( rLRItem.GetRight() );
+ else
+ {
+ // Weiter unten im Polygon versuchen.
+ // Unterhalb des Polygons die Paperbreite verwenden.
+ nTextExtraYOffset += Max( (long)(nTextLineHeight / 10), (long)1 );
+ if ( ( nTextY + nTextExtraYOffset ) > pTextRanger->GetBoundRect().Bottom() )
+ nXWidth = GetPaperSize().Width();
+ }
+ }
+ }
+ if ( nMaxLineWidth < 0 )
+ nMaxLineWidth = 1;
+ if ( eJustification == SVX_ADJUST_CENTER )
+ nStartX = nMaxLineWidth / 2;
+ else if ( eJustification == SVX_ADJUST_RIGHT )
+ nStartX = (short)nMaxLineWidth;
+
+ nStartX += (short)nTextXOffset;
+ }
+
+ pTmpLine->SetStartPosX( nStartX );
+
+ if ( !aStatus.IsOutliner() )
+ {
+ if ( rLSItem.GetLineSpaceRule() == SVX_LINE_SPACE_MIN )
+ {
+ sal_uInt16 nMinHeight = rLSItem.GetLineHeight();
+ sal_uInt16 nTxtHeight = pTmpLine->GetHeight();
+ if ( nTxtHeight < nMinHeight )
+ {
+ // Der Ascent muss um die Differenz angepasst werden:
+ long nDiff = nMinHeight - nTxtHeight;
+ pTmpLine->SetMaxAscent( (sal_uInt16)(pTmpLine->GetMaxAscent() + nDiff) );
+ pTmpLine->SetHeight( nMinHeight, nTxtHeight );
+ }
+ }
+ }
+
+ if ( !bLineBreak )
+ {
+ long nMinHeight = aBulletArea.GetHeight();
+ if ( nMinHeight > (long)pTmpLine->GetHeight() )
+ {
+ long nDiff = nMinHeight - (long)pTmpLine->GetHeight();
+ // nDiff auf oben und unten verteilen.
+ pTmpLine->SetMaxAscent( (sal_uInt16)(pTmpLine->GetMaxAscent() + nDiff/2) );
+ pTmpLine->SetHeight( (sal_uInt16)nMinHeight );
+ }
+ }
+ else
+ {
+ // -2: Die neue ist bereits eingefuegt.
+ EditLine* pLastLine = pParaPortion->GetLines().GetObject( pParaPortion->GetLines().Count()-2 );
+ DBG_ASSERT( pLastLine, "Weicher Umbruch, keine Zeile ?!" );
+ DBG_ASSERT( pLastLine->GetEnd() == pParaPortion->GetNode()->Len(), "Doch anders?" );
+// pTmpLine->SetStart( pLastLine->GetEnd() );
+// pTmpLine->SetEnd( pLastLine->GetEnd() );
+ sal_uInt16 nPos = (sal_uInt16) pParaPortion->GetTextPortions().Count() - 1 ;
+ pTmpLine->SetStartPortion( nPos );
+ pTmpLine->SetEndPortion( nPos );
+ }
+}
+
+sal_Bool ImpEditEngine::FinishCreateLines( ParaPortion* pParaPortion )
+{
+// CalcCharPositions( pParaPortion );
+ pParaPortion->SetValid();
+ long nOldHeight = pParaPortion->GetHeight();
+// sal_uInt16 nPos = GetParaPortions().GetPos( pParaPortion );
+// DBG_ASSERT( nPos != USHRT_MAX, "FinishCreateLines: Portion nicht in Liste!" );
+// ParaPortion* pPrev = nPos ? GetParaPortions().GetObject( nPos-1 ) : 0;
+ CalcHeight( pParaPortion );
+
+ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "FinishCreateLines: Keine Text-Portion?" );
+ sal_Bool bRet = ( pParaPortion->GetHeight() != nOldHeight );
+ return bRet;
+}
+
+void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, TextPortion* pPortion, sal_uInt16 nPortionStart, long nRemainingWidth, sal_Bool bCanHyphenate )
+{
+ ContentNode* const pNode = pParaPortion->GetNode();
+
+ sal_uInt16 nBreakInLine = nPortionStart - pLine->GetStart();
+ sal_uInt16 nMax = nBreakInLine + pPortion->GetLen();
+ while ( ( nBreakInLine < nMax ) && ( pLine->GetCharPosArray()[nBreakInLine] <= nRemainingWidth ) )
+ nBreakInLine++;
+ sal_uInt16 nMaxBreakPos = nBreakInLine + pLine->GetStart();
+
+ sal_uInt16 nMinBreakPos = 0;
+ USHORT nAttrs = pNode->GetCharAttribs().GetAttribs().Count();
+ for ( USHORT nAttr = nAttrs; nAttr; )
+ {
+ EditCharAttrib* pAttr = pNode->GetCharAttribs().GetAttribs()[--nAttr];
+ if ( pAttr->IsFeature() && ( pAttr->GetEnd() <= nMaxBreakPos ) )
+ {
+ nMinBreakPos = pAttr->GetEnd();
+ break;
+ }
+ }
+
+ sal_uInt16 nBreakPos = nMaxBreakPos;
+
+ uno::Reference < text::XBreakIterator > xBI = ImplGetBreakIterator();
+ ::rtl::OUString aText( *pNode );
+ uno::Reference< linguistic::XHyphenator > xHyph;
+ if ( bCanHyphenate )
+ xHyph = GetHyphenator();
+ text::LineBreakHyphenationOptions aHyphOptions( xHyph, 1 );
+ text::LineBreakUserOptions aUserOptions;
+ text::LineBreakResults aLBR = xBI->getLineBreak( *pNode, nBreakPos, GetLocale(), nMinBreakPos, aHyphOptions, aUserOptions );
+ nBreakPos = aLBR.breakIndex;
+
+ sal_Bool bBlankSeparator = ( ( nBreakPos >= pLine->GetStart() ) &&
+ ( pNode->GetChar( nBreakPos ) == ' ' ) ) ? sal_True : sal_False;
+
+ // Egal ob Trenner oder nicht: Das Wort nach dem Trenner durch
+ // die Silbentrennung jagen...
+ // nMaxBreakPos ist das letzte Zeichen was in die Zeile passt,
+ // nBreakPos ist der Wort-Anfang
+ // Ein Problem gibt es, wenn das Dok so schmal ist, dass ein Wort
+ // auf mehr als Zwei Zeilen gebrochen wird...
+
+ sal_Bool bHyphenated = sal_False;
+ sal_Unicode cAlternateReplChar = 0;
+ sal_Unicode cAlternateExtraChar = 0;
+
+#ifndef SVX_LIGHT
+ if ( bCanHyphenate && GetHyphenator().is() )
+ {
+ // MT: I18N Umstellen auf getWordBoundary !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ sal_uInt16 nWordStart = nBreakPos;
+ sal_uInt16 nWordEnd = nBreakPos;
+ while ( ( nWordEnd < pNode->Len() ) &&
+ ( pNode->GetChar( nWordEnd ) != ' ' ) &&
+ ( !pNode->IsFeature( nWordEnd ) ) )
+ {
+ nWordEnd++;
+ }
+ String aWord( *pNode, nWordStart, nWordEnd - nWordStart );
+ if ( aWord.Len() > 3 )
+ {
+ DBG_ASSERT( nWordEnd >= nMaxBreakPos, "Hyph: Break?" );
+ sal_uInt16 nMinTrail = nWordEnd-nMaxBreakPos+1; //+1: Vor dem angeknacksten Buchstaben
+ uno::Reference< linguistic::XHyphenatedWord > xHyphWord;
+ if (xHyphenator.is())
+ xHyphWord = xHyphenator->hyphenate( aWord, GetLocale(), aWord.Len() - nMinTrail );
+ if (xHyphWord.is())
+ {
+ sal_Bool bAlternate = xHyphWord->getAlternativeSpelling().is();
+ sal_uInt16 nWordLen = 1 + xHyphWord->getHyphenPos();
+
+ if ( ( nWordLen >= 2 ) && ( (nWordStart+nWordLen) >= (pLine->GetStart() + 2 ) ) )
+ {
+ if ( !bAlternate )
+ {
+ bHyphenated = sal_True;
+ bBlankSeparator = sal_False;
+ nBreakPos = nWordStart + nWordLen;
+ }
+ else
+ {
+ String aAlt( xHyphWord->getHyphenatedWord() );
+
+ // Wir gehen von zwei Faellen aus, die nun
+ // vorliegen koennen:
+ // 1) packen wird zu pak-ken
+ // 2) Schiffahrt wird zu Schiff-fahrt
+ // In Fall 1 muss ein Zeichen ersetzt werden,
+ // in Fall 2 wird ein Zeichen hinzugefuegt.
+ // Die Identifikation wird erschwert durch Worte wie
+ // "Schiffahrtsbrennesseln", da der Hyphenator alle
+ // Position des Wortes auftrennt und "Schifffahrtsbrennnesseln"
+ // ermittelt. Wir koennen also eigentlich nicht unmittelbar vom
+ // Index des AlternativWord auf aWord schliessen.
+
+ // Das ganze geraffel wird durch eine Funktion am
+ // Hyphenator vereinfacht werden, sobald AMA sie einbaut...
+ sal_uInt16 nAltStart = nWordLen - 1;
+ sal_uInt16 nTxtStart = nAltStart - (aAlt.Len() - aWord.Len());
+ sal_uInt16 nTxtEnd = nTxtStart;
+ sal_uInt16 nAltEnd = nAltStart;
+
+ // Die Bereiche zwischen den nStart und nEnd ist
+ // die Differenz zwischen Alternativ- und OriginalString.
+ while( nTxtEnd < aWord.Len() && nAltEnd < aAlt.Len() &&
+ aWord.GetChar(nTxtEnd) != aAlt.GetChar(nAltEnd) )
+ {
+ ++nTxtEnd;
+ ++nAltEnd;
+ }
+
+ // Wenn ein Zeichen hinzugekommen ist, dann bemerken wir es jetzt:
+ if( nAltEnd > nTxtEnd && nAltStart == nAltEnd &&
+ aWord.GetChar( nTxtEnd ) == aAlt.GetChar(nAltEnd) )
+ {
+ ++nAltEnd;
+ ++nTxtStart;
+ ++nTxtEnd;
+ }
+
+ DBG_ASSERT( ( nAltEnd - nAltStart ) == 1, "Alternate: Falsche Annahme!" );
+
+ if ( nTxtEnd > nTxtStart )
+ cAlternateReplChar = aAlt.GetChar( nAltStart );
+ else
+ cAlternateExtraChar = aAlt.GetChar( nAltStart );
+
+ bHyphenated = sal_True;
+ bBlankSeparator = sal_False;
+ nBreakPos = nWordStart + nTxtStart;
+ if ( cAlternateReplChar )
+ nBreakPos++;
+ }
+ }
+ }
+ }
+ }
+
+#endif // !SVX_LIGHT
+
+ if ( nBreakPos <= pLine->GetStart() )
+ {
+ // keine Trenner in Zeile => abhacken !
+ nBreakPos = nMaxBreakPos;
+ // MT: I18N nextCharacters !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ if ( nBreakPos <= pLine->GetStart() )
+ nBreakPos = pLine->GetStart() + 1; // Sonst Endlosschleife!
+ }
+
+ // die angeknackste Portion ist die End-Portion
+ pLine->SetEnd( nBreakPos );
+ sal_uInt16 nEndPortion = SplitTextPortion( pParaPortion, nBreakPos, pLine );
+ if ( bBlankSeparator /* && ( eJustification == SVX_ADJUST_RIGHT ) */ )
+ {
+ // Blanks am Zeilenende generell unterdruecken...
+ TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( nEndPortion );
+ DBG_ASSERT( pTP->GetKind() == PORTIONKIND_TEXT, "BlankRubber: Keine TextPortion!" );
+ DBG_ASSERT( nBreakPos > pLine->GetStart(), "SplitTextPortion am Anfang der Zeile?" );
+ sal_uInt16 nBlankPosInArray = nBreakPos-1-pLine->GetStart();
+ pTP->GetSize().Width() = ( nBlankPosInArray && ( pTP->GetLen() > 1 ) ) ? pLine->GetCharPosArray()[ nBlankPosInArray-1 ] : 0;
+ }
+ else if ( bHyphenated )
+ {
+ // Eine Portion fuer den Trenner einbauen...
+ TextPortion* pHyphPortion = new TextPortion( 0 );
+ pHyphPortion->GetKind() = PORTIONKIND_HYPHENATOR;
+ String aHyphText( CH_HYPH );
+ if ( cAlternateReplChar )
+ {
+ TextPortion* pPrev = pParaPortion->GetTextPortions().GetObject( nEndPortion );
+ DBG_ASSERT( pPrev && pPrev->GetLen(), "Hyphenate: Prev portion?!" );
+ pPrev->SetLen( pPrev->GetLen() - 1 );
+ pHyphPortion->SetLen( 1 );
+ pHyphPortion->SetExtraValue( cAlternateReplChar );
+ // Breite der Portion davor korrigieren:
+ pPrev->GetSize().Width() =
+ pLine->GetCharPosArray()[ nBreakPos-1 - pLine->GetStart() - 1 ];
+ }
+ else if ( cAlternateExtraChar )
+ {
+ pHyphPortion->SetExtraValue( cAlternateExtraChar );
+ aHyphText.Insert( cAlternateExtraChar, 0 );
+ }
+
+ // Breite der Hyph-Portion ermitteln:
+ SvxFont aFont;
+ SeekCursor( pParaPortion->GetNode(), nBreakPos, aFont );
+ aFont.SetPhysFont( GetRefDevice() );
+ pHyphPortion->GetSize().Height() = GetRefDevice()->GetTextHeight();
+ pHyphPortion->GetSize().Width() = GetRefDevice()->GetTextWidth( aHyphText );
+
+ pParaPortion->GetTextPortions().Insert( pHyphPortion, ++nEndPortion );
+ }
+ pLine->SetEndPortion( nEndPortion );
+}
+
+sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nPos, EditLine* pCurLine )
+{
+ DBG_ASSERT( pPortion, "SplitTextPortion: Welche ?" );
+
+ // Die Portion bei nPos wird geplittet, wenn bei nPos nicht
+ // sowieso ein Wechsel ist
+ if ( nPos == 0 )
+ return 0;
+
+ sal_uInt16 nSplitPortion;
+ sal_uInt16 nTmpPos = 0;
+ TextPortion* pTextPortion = 0;
+ sal_uInt16 nPortions = pPortion->GetTextPortions().Count();
+ for ( nSplitPortion = 0; nSplitPortion < nPortions; nSplitPortion++ )
+ {
+ TextPortion* pTP = pPortion->GetTextPortions().GetObject(nSplitPortion);
+ nTmpPos += pTP->GetLen();
+ if ( nTmpPos >= nPos )
+ {
+ if ( nTmpPos == nPos ) // dann braucht nichts geteilt werden
+ return nSplitPortion;
+ pTextPortion = pTP;
+ break;
+ }
+ }
+
+ DBG_ASSERT( pTextPortion, "Position ausserhalb des Bereichs!" );
+ DBG_ASSERT( pTextPortion->GetKind() == PORTIONKIND_TEXT, "SplitTextPortion: Keine TextPortion!" );
+
+ sal_uInt16 nOverlapp = nTmpPos - nPos;
+ pTextPortion->GetLen() -= nOverlapp;
+ TextPortion* pNewPortion = new TextPortion( nOverlapp );
+ pPortion->GetTextPortions().Insert( pNewPortion, nSplitPortion+1 );
+ // Groessen setzen:
+ if ( pCurLine )
+ {
+ // Kein neues GetTextSize, sondern Werte aus Array verwenden:
+ DBG_ASSERT( nPos > pCurLine->GetStart(), "SplitTextPortion am Anfang der Zeile?" );
+ pTextPortion->GetSize().Width() = pCurLine->GetCharPosArray()[ nPos-pCurLine->GetStart()-1 ];
+ }
+ else
+ pTextPortion->GetSize().Width() = (-1);
+
+ return nSplitPortion;
+}
+
+void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& rStart /* , sal_Bool bCreateBlockPortions */ )
+{
+ sal_uInt16 nStartPos = rStart;
+ ContentNode* pNode = pParaPortion->GetNode();
+ DBG_ASSERT( pNode->Len(), "CreateTextPortions sollte nicht fuer leere Absaetze verwendet werden!" );
+
+ SortedPositions aPositions;
+ sal_uInt32 nZero = 0;
+ aPositions.Insert( nZero );
+
+ sal_uInt16 nAttr = 0;
+ EditCharAttrib* pAttrib = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ while ( pAttrib )
+ {
+ // Start und Ende in das Array eintragen...
+ // Die InsertMethode laesst keine doppelten Werte zu....
+ aPositions.Insert( pAttrib->GetStart() );
+ aPositions.Insert( pAttrib->GetEnd() );
+ nAttr++;
+ pAttrib = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ }
+ aPositions.Insert( pNode->Len() );
+
+ if ( mpIMEInfos && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetNode() == pNode ) )
+ {
+ sal_uInt16 nLastAttr = 0xFFFF;
+ for( sal_uInt16 n = 0; n < mpIMEInfos->nLen; n++ )
+ {
+ if ( mpIMEInfos->pAttribs[n] != nLastAttr )
+ {
+ aPositions.Insert( mpIMEInfos->aPos.GetIndex() + n );
+ nLastAttr = mpIMEInfos->pAttribs[n];
+ }
+ }
+ }
+
+ // Ab ... loeschen:
+ // Leider muss die Anzahl der TextPortions mit aPositions.Count()
+ // nicht uebereinstimmen, da evtl. Zeilenumbrueche...
+ sal_uInt16 nPortionStart = 0;
+ sal_uInt16 nInvPortion = 0;
+ for ( sal_uInt16 nP = 0; nP < pParaPortion->GetTextPortions().Count(); nP++ )
+ {
+ TextPortion* pTmpPortion = pParaPortion->GetTextPortions().GetObject(nP);
+ nPortionStart += pTmpPortion->GetLen();
+ if ( nPortionStart >= nStartPos )
+ {
+ nPortionStart -= pTmpPortion->GetLen();
+ rStart = nPortionStart;
+ nInvPortion = nP;
+ break;
+ }
+ }
+ DBG_ASSERT( nP < pParaPortion->GetTextPortions().Count() || !pParaPortion->GetTextPortions().Count(), "Nichts zum loeschen: CreateTextPortions" );
+ if ( nInvPortion && ( nPortionStart+pParaPortion->GetTextPortions().GetObject(nInvPortion)->GetLen() > nStartPos ) )
+ {
+ // lieber eine davor...
+ // Aber nur wenn es mitten in der Portion war, sonst ist es evtl.
+ // die einzige in der Zeile davor !
+ nInvPortion--;
+ nPortionStart -= pParaPortion->GetTextPortions().GetObject(nInvPortion)->GetLen();
+ }
+ pParaPortion->GetTextPortions().DeleteFromPortion( nInvPortion );
+
+ // Eine Portion kann auch durch einen Zeilenumbruch entstanden sein:
+ aPositions.Insert( nPortionStart );
+
+ sal_uInt16 nInvPos;
+ sal_Bool bFound = aPositions.Seek_Entry( nPortionStart, &nInvPos );
+ DBG_ASSERT( bFound && ( nInvPos < (aPositions.Count()-1) ), "InvPos ?!" );
+ for ( sal_uInt16 i = nInvPos+1; i < aPositions.Count(); i++ )
+ {
+ TextPortion* pNew = new TextPortion( (sal_uInt16)aPositions[i] - (sal_uInt16)aPositions[i-1] );
+ pParaPortion->GetTextPortions().Insert( pNew, pParaPortion->GetTextPortions().Count());
+ }
+
+ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine Portions?!" );
+#ifdef EDITDEBUG
+ DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions kaputt?" );
+#endif
+}
+
+void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nStartPos, short nNewChars )
+{
+ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine Portions!" );
+ DBG_ASSERT( nNewChars, "RecalcTextPortion mit Diff == 0" );
+
+ ContentNode* const pNode = pParaPortion->GetNode();
+ if ( nNewChars > 0 )
+ {
+ // Wenn an nStartPos ein Attribut beginnt/endet, f„ngt eine neue Portion
+ // an, ansonsten wird die Portion an nStartPos erweitert.
+
+ if ( pNode->GetCharAttribs().HasBoundingAttrib( nStartPos ) )
+ {
+ sal_uInt16 nNewPortionPos = 0;
+ if ( nStartPos )
+ nNewPortionPos = SplitTextPortion( pParaPortion, nStartPos ) + 1;
+// else if ( ( pParaPortion->GetTextPortions().Count() == 1 ) &&
+// !pParaPortion->GetTextPortions()[0]->GetLen() )
+// pParaPortion->GetTextPortions().Reset(); // DummyPortion
+
+ // Eine leere Portion kann hier stehen, wenn der Absatz leer war,
+ // oder eine Zeile durch einen harten Zeilenumbruch entstanden ist.
+ if ( ( nNewPortionPos < pParaPortion->GetTextPortions().Count() ) &&
+ !pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() )
+ {
+ // Dann die leere Portion verwenden.
+ DBG_ASSERT( pParaPortion->GetTextPortions()[nNewPortionPos]->GetKind() == PORTIONKIND_TEXT, "Leere Portion war keine TextPortion!" );
+ pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() += nNewChars;
+ }
+ else
+ {
+ TextPortion* pNewPortion = new TextPortion( nNewChars );
+ pParaPortion->GetTextPortions().Insert( pNewPortion, nNewPortionPos );
+ }
+ }
+ else
+ {
+ sal_uInt16 nPortionStart;
+ const sal_uInt16 nTP = pParaPortion->GetTextPortions().
+ FindPortion( nStartPos, nPortionStart );
+ TextPortion* const pTP = pParaPortion->GetTextPortions()[ nTP ];
+ DBG_ASSERT( pTP, "RecalcTextPortion: Portion nicht gefunden" );
+ pTP->GetLen() += nNewChars;
+ pTP->GetSize().Width() = (-1);
+ }
+ }
+ else
+ {
+ // Portion schrumpfen oder ggf. entfernen.
+ // Vor Aufruf dieser Methode muss sichergestellt sein, dass
+ // keine Portions in dem geloeschten Bereich lagen!
+
+ // Es darf keine reinragende oder im Bereich startende Portion geben,
+ // also muss nStartPos <= nPos <= nStartPos - nNewChars(neg.) sein
+ sal_uInt16 nPortion = 0;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nEnd = nStartPos-nNewChars;
+ sal_uInt16 nPortions = pParaPortion->GetTextPortions().Count();
+ TextPortion* pTP = 0;
+ for ( nPortion = 0; nPortion < nPortions; nPortion++ )
+ {
+ pTP = pParaPortion->GetTextPortions()[ nPortion ];
+ if ( ( nPos+pTP->GetLen() ) > nStartPos )
+ {
+ DBG_ASSERT( nPos <= nStartPos, "Start falsch!" );
+ DBG_ASSERT( nPos+pTP->GetLen() >= nEnd, "End falsch!" );
+ break;
+ }
+ nPos += pTP->GetLen();
+ }
+ DBG_ASSERT( pTP, "RecalcTextPortion: Portion nicht gefunden" );
+ if ( ( nPos == nStartPos ) && ( (nPos+pTP->GetLen()) == nEnd ) )
+ {
+ // Portion entfernen;
+ BYTE nType = pTP->GetKind();
+ pParaPortion->GetTextPortions().Remove( nPortion );
+ delete pTP;
+ if ( nType == PORTIONKIND_LINEBREAK )
+ {
+ TextPortion* pNext = pParaPortion->GetTextPortions()[ nPortion ];
+ if ( pNext && !pNext->GetLen() )
+ {
+ // Dummy-Portion entfernen
+ pParaPortion->GetTextPortions().Remove( nPortion );
+ delete pNext;
+ }
+ }
+ }
+ else
+ {
+ DBG_ASSERT( pTP->GetLen() > (-nNewChars), "Portion zu klein zum schrumpfen!" );
+ pTP->GetLen() += nNewChars;
+ }
+
+ // ganz am Schluss darf keine HYPHENATOR-Portion stehen bleiben...
+ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "RecalcTextPortions: Keine mehr da!" );
+ sal_uInt16 nLastPortion = pParaPortion->GetTextPortions().Count() - 1;
+ pTP = pParaPortion->GetTextPortions().GetObject( nLastPortion );
+ if ( pTP->GetKind() == PORTIONKIND_HYPHENATOR )
+ {
+ // Portion wegschmeissen, ggf. die davor korrigieren, wenn
+ // die Hyph-Portion ein Zeichen geschluckt hat...
+ pParaPortion->GetTextPortions().Remove( nLastPortion );
+ if ( nLastPortion && pTP->GetLen() )
+ {
+ TextPortion* pPrev = pParaPortion->GetTextPortions().GetObject( nLastPortion - 1 );
+ DBG_ASSERT( pPrev->GetKind() == PORTIONKIND_TEXT, "Portion?!" );
+ pPrev->SetLen( pPrev->GetLen() + pTP->GetLen() );
+ pPrev->GetSize().Width() = (-1);
+ }
+ delete pTP;
+ }
+ }
+#ifdef EDITDEBUG
+ DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions kaputt?" );
+#endif
+}
+
+void ImpEditEngine::SetTextRanger( TextRanger* pRanger )
+{
+ if ( pTextRanger != pRanger )
+ {
+ delete pTextRanger;
+ pTextRanger = pRanger;
+
+ for ( sal_uInt16 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
+ {
+ ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
+ pParaPortion->MarkSelectionInvalid( 0, pParaPortion->GetNode()->Len() );
+ pParaPortion->GetLines().Reset();
+ }
+
+ FormatFullDoc();
+ UpdateViews( GetActiveView() );
+ if ( GetUpdateMode() && GetActiveView() )
+ pActiveView->ShowCursor( sal_False, sal_False );
+ }
+}
+
+
+void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rFont, OutputDevice* pOut, sal_uInt16 nIgnoreWhich )
+{
+ // Es war mal geplant, SeekCursor( nStartPos, nEndPos, ... ), damit nur
+ // ab der StartPosition neu gesucht wird.
+ // Problem: Es mussten zwei Listen beruecksichtigt/gefuehrt werden:
+ // OrderedByStart,OrderedByEnd.
+
+ rFont = pNode->GetCharAttribs().GetDefFont();
+ const SvxFontWidthItem& rWidthItem =
+ (const SvxFontWidthItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_FONTWIDTH);
+ sal_uInt16 nRelWidth = rWidthItem.GetProp();
+
+ if ( aStatus.UseCharAttribs() )
+ {
+ const CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs();
+ sal_uInt16 nAttr = 0;
+ EditCharAttrib* pAttrib = GetAttrib( rAttribs, nAttr );
+ while ( pAttrib && ( pAttrib->GetStart() <= nPos ) )
+ {
+ // Beim Seeken nicht die Attr beruecksichtigen, die dort beginnen!
+ // Leere Attribute werden beruecksichtigt( verwendet), da diese
+ // gerade eingestellt wurden.
+ // 12.4.95: Doch keine Leeren Attribute verwenden:
+ // - Wenn gerade eingestellt und leer => keine Auswirkung auf Font
+ // In einem leeren Absatz eingestellte Zeichen werden sofort wirksam.
+ if ( ( pAttrib->Which() != nIgnoreWhich ) &&
+ ( ( ( pAttrib->GetStart() < nPos ) && ( pAttrib->GetEnd() >= nPos ) )
+ || ( !pNode->Len() ) ) )
+ {
+ DBG_ASSERT( ( pAttrib->Which() >= EE_CHAR_START ) && ( pAttrib->Which() <= EE_FEATURE_END ), "Unglueltiges Attribut in Seek() " );
+ pAttrib->SetFont( rFont );
+ if ( pAttrib->Which() == EE_CHAR_FONTWIDTH )
+ nRelWidth = ((const SvxFontWidthItem*)pAttrib->GetItem())->GetProp();
+ }
+ pAttrib = GetAttrib( rAttribs, ++nAttr );
+ }
+ }
+
+ if ( aStatus.DoNotUseColors() )
+ {
+ // Hack fuer DL,weil JOE staendig die Pooldefaults verbiegt!
+ // const SvxColorItem& rColorItem = (const SvxColorItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_COLOR );
+ rFont.SetColor( /* rColorItem.GetValue() */ COL_BLACK );
+ }
+
+ if ( aStatus.DoStretch() || ( nRelWidth != 100 ) )
+ {
+ // Fuer das aktuelle Ausgabegeraet, weil es sonst bei einem
+ // Drucker als RefDev auf dem Bildschirm #?!@' aussieht!
+ OutputDevice* pDev = pOut ? pOut : GetRefDevice();
+ rFont.SetPhysFont( pDev );
+ FontMetric aMetric( pDev->GetFontMetric() );
+ // Fuer die Hoehe nicht die Metriken nehmen, da das bei
+ // Hoch-/Tiefgestellt schief geht.
+ Size aRealSz( aMetric.GetSize().Width(), rFont.GetSize().Height() );
+ if ( aStatus.DoStretch() )
+ {
+ if ( nStretchY != 100 )
+ {
+ aRealSz.Height() *= nStretchY;
+ aRealSz.Height() /= 100;
+ }
+ if ( nStretchX != 100 )
+ {
+ aRealSz.Width() *= nStretchX;
+ aRealSz.Width() /= 100;
+
+ // Auch das Kerning: (long wegen Zwischenergebnis)
+ long nKerning = rFont.GetFixKerning();
+/*
+ Die Ueberlegung war: Wenn neg. Kerning, aber StretchX = 200
+ => Nicht das Kerning verdoppelt, also die Buchstaben weiter
+ zusammenziehen
+ ---------------------------
+ Kern StretchX =>Kern
+ ---------------------------
+ >0 <100 < (Proportional)
+ <0 <100 < (Proportional)
+ >0 >100 > (Proportional)
+ <0 >100 < (Der Betrag, also Antiprop)
+*/
+ if ( ( nKerning < 0 ) && ( nStretchX > 100 ) )
+ {
+ // Antiproportional
+ nKerning *= 100;
+ nKerning /= nStretchX;
+ }
+ else if ( nKerning )
+ {
+ // Proportional
+ nKerning *= nStretchX;
+ nKerning /= 100;
+ }
+ rFont.SetFixKerning( (short)nKerning );
+ }
+ }
+ if ( nRelWidth != 100 )
+ {
+ aRealSz.Width() *= nRelWidth;
+ aRealSz.Width() /= 100;
+ }
+ rFont.SetSize( aRealSz );
+ // Font wird nicht restauriert...
+ }
+ if ( pOut )
+ pOut->SetTextLineColor();
+
+ if ( mpIMEInfos && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetNode() == pNode ) &&
+ ( nPos > mpIMEInfos->aPos.GetIndex() ) && ( nPos <= ( mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen ) ) )
+ {
+ sal_uInt16 nAttr = mpIMEInfos->pAttribs[ nPos - mpIMEInfos->aPos.GetIndex() - 1 ];
+ if ( nAttr & EXTTEXTINPUT_ATTR_UNDERLINE )
+ rFont.SetUnderline( UNDERLINE_SINGLE );
+ else if ( nAttr & EXTTEXTINPUT_ATTR_BOLDUNDERLINE )
+ rFont.SetUnderline( UNDERLINE_BOLD );
+ else if ( nAttr & EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE )
+ rFont.SetUnderline( UNDERLINE_DOTTED );
+ else if ( nAttr & EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE )
+ rFont.SetUnderline( UNDERLINE_DOTTED );
+ else if ( nAttr & EXTTEXTINPUT_ATTR_REDTEXT )
+ rFont.SetColor( Color( COL_RED ) );
+ if ( nAttr & EXTTEXTINPUT_ATTR_HIGHLIGHT )
+ {
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+ rFont.SetColor( rStyleSettings.GetHighlightTextColor() );
+ rFont.SetFillColor( rStyleSettings.GetHighlightColor() );
+ rFont.SetTransparent( FALSE );
+ }
+ else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE )
+ {
+ rFont.SetUnderline( UNDERLINE_WAVE );
+ if( pOut )
+ pOut->SetTextLineColor( Color( COL_LIGHTGRAY ) );
+ }
+ }
+}
+
+void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics, SvxFont& rFont )
+{
+ // Fuer Zeilenhoehe bei Hoch/Tief erstmal ohne Propr!
+ sal_uInt16 nPropr = rFont.GetPropr();
+ DBG_ASSERT( ( nPropr == 100 ) || rFont.GetEscapement(), "Propr ohne Escape?!" );
+ if ( nPropr != 100 )
+ {
+ rFont.SetPropr( 100 );
+ rFont.SetPhysFont( pRefDev );
+ }
+ FontMetric aMetric( pRefDev->GetFontMetric() );
+
+ sal_uInt16 nAscent = (sal_uInt16)aMetric.GetAscent();
+ sal_uInt16 nDescent = (sal_uInt16)aMetric.GetDescent();
+ sal_uInt16 nLeading = ( aMetric.GetLeading() > 0 ) ? (sal_uInt16)aMetric.GetLeading() : 0;
+ // Fonts ohne Leading bereiten Probleme
+ if ( ( nLeading == 0 ) && ( pRefDev->GetOutDevType() == OUTDEV_PRINTER ) )
+ {
+ // Da schaun wir mal, was fuer eine Leading ich auf dem
+ // Bildschirm erhalte
+ VirtualDevice* pVDev = GetVirtualDevice( pRefDev->GetMapMode() );
+ rFont.SetPhysFont( pVDev );
+ aMetric = pVDev->GetFontMetric();
+
+ // Damit sich die Leading nicht wieder rausrechnet,
+ // wenn die ganze Zeile den Font hat, nTmpLeading.
+
+ // 4/96: Kommt bei HP Laserjet 4V auch nicht hin
+ // => Werte komplett vom Bildschirm holen.
+// sal_uInt16 nTmpLeading = (sal_uInt16)aMetric.GetLeading();
+// nAscent += nTmpLeading;
+ nAscent = (sal_uInt16)aMetric.GetAscent();
+ nDescent = (sal_uInt16)aMetric.GetDescent();
+// nLeading = (sal_uInt16)aMetric.GetLeading();
+ }
+ if ( nAscent > rCurMetrics.nMaxAscent )
+ rCurMetrics.nMaxAscent = nAscent;
+ if ( nDescent > rCurMetrics.nMaxDescent )
+ rCurMetrics.nMaxDescent= nDescent;
+
+ // Sonderbehandlung Hoch/Tief:
+ if ( rFont.GetEscapement() )
+ {
+ // Jetzt unter Beruecksichtigung von Escape/Propr
+ // Ascent oder Descent ggf vergroessern
+ short nDiff = (short)(rFont.GetSize().Height()*rFont.GetEscapement()/100L);
+ if ( rFont.GetEscapement() > 0 )
+ {
+ nAscent = (sal_uInt16) (((long)nAscent)*nPropr/100 + nDiff);
+ if ( nAscent > rCurMetrics.nMaxAscent )
+ rCurMetrics.nMaxAscent = nAscent;
+ }
+ else // muss < 0 sein
+ {
+ nDescent = (sal_uInt16) (((long)nDescent)*nPropr/100 - nDiff);
+ if ( nDescent > rCurMetrics.nMaxDescent )
+ rCurMetrics.nMaxDescent= nDescent;
+ }
+ }
+}
+
+void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aStartPos, sal_Bool bStripOnly, short nOrientation )
+{
+ // Im OutputDevice ist irgendein MapMode eingestellt.
+ // Dieser Interessiert mich aber nicht, da die berechneten Pixel-Groessen
+ // einfach als logische Werte verwendet werden, und damit ein
+ // Pos.X() += aSize().Width() auch noch richtig funktioniert.
+ // ??? irgendwie doch nicht, aber jetzt sowieso TextArray...
+
+ if ( !GetUpdateMode() && !bStripOnly )
+ return;
+
+ // Bedeutung von bFormatted:
+ // z.Zt. wird bFormatted nur dann auf sal_False gesetzt, wenn InitDoc() gerufen
+ // wird, damit kein CreateAndInsertEmptyLine.
+ // Andere Aenderungen von Aussen werden weiterhin bei Update==sal_True
+ // sofort formatiert, nicht erst im Paint.
+ if ( !IsFormatted() )
+ FormatDoc();
+
+ long nFirstVisXPos = - pOutDev->GetMapMode().GetOrigin().X();
+
+ EditLine* pLine;
+ Point aTmpPos;
+ DBG_ASSERT( GetParaPortions().Count(), "Keine ParaPortion?!" );
+ SvxFont aTmpFont( GetParaPortions()[0]->GetNode()->GetCharAttribs().GetDefFont() );
+ Font aOldFont( pOutDev->GetFont() );
+ // Bei gedrehtem Text wird aStartPos als TopLeft angesehen, da andere
+ // Informationen fehlen, und sowieso das ganze Object ungescrollt
+ // dargestellt wird.
+ // Das Rechteck ist unendlich gross.
+ Point aOrigin( aStartPos );
+ double nCos, nSin;
+ if ( nOrientation )
+ {
+ double nRealOrientation = nOrientation*F_PI1800;
+ nCos = cos( nRealOrientation );
+ nSin = sin( nRealOrientation );
+ }
+
+ // Fuer OnlineSpelling:
+// EditPaM aCursorPos;
+// if( GetStatus().DoOnlineSpelling() && pActiveView )
+// aCurPos = pActiveView->pImpEditView->GetEditSelections().Max();
+
+ // --------------------------------------------------
+ // Ueber alle Absaetze...
+ // --------------------------------------------------
+ for ( sal_uInt16 n = 0; n < GetParaPortions().Count(); n++ )
+ {
+ ParaPortion* pPortion = GetParaPortions().GetObject( n );
+ DBG_ASSERT( pPortion, "NULL-Pointer in TokenList in Paint" );
+ // falls beim Tippen Idle-Formatierung, asynchrones Paint.
+ // Unsichtbare Portions koennen ungueltig sein.
+ if ( pPortion->IsVisible() && pPortion->IsInvalid() )
+ return;
+ long nParaHeight = pPortion->GetHeight();
+ sal_uInt16 nIndex = 0;
+ if ( pPortion->IsVisible() && ( ( aStartPos.Y() + nParaHeight ) > aClipRec.Top() ) )
+ {
+ // --------------------------------------------------
+ // Ueber die Zeilen des Absatzes...
+ // --------------------------------------------------
+ sal_uInt16 nLines = pPortion->GetLines().Count();
+ sal_uInt16 nLastLine = nLines-1;
+
+ long nParaStartY( aStartPos.Y() );
+ aStartPos.Y() += pPortion->GetFirstLineOffset();
+ const SvxLineSpacingItem& rLSItem = ((const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ));
+ sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX )
+ ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+ for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
+ {
+ pLine = pPortion->GetLines().GetObject(nLine);
+ DBG_ASSERT( pLine, "NULL-Pointer im Zeileniterator in UpdateViews" );
+ aTmpPos = aStartPos;
+ aTmpPos.X() += pLine->GetStartPosX();
+ aTmpPos.Y() += pLine->GetMaxAscent();
+ aStartPos.Y() += pLine->GetHeight();
+
+ if ( aStartPos.Y() > aClipRec.Top() )
+ {
+ if ( ( nLine == 0 ) && !bStripOnly ) // erste Zeile
+ {
+ GetEditEnginePtr()->PaintingFirstLine( n, Point( aStartPos.X(), nParaStartY ), aTmpPos.Y(), aOrigin, nOrientation, pOutDev );
+ }
+ // --------------------------------------------------
+ // Ueber die Portions der Zeile...
+ // --------------------------------------------------
+ nIndex = pLine->GetStart();
+ for ( sal_uInt16 y = pLine->GetStartPortion(); y <= pLine->GetEndPortion(); y++ )
+ {
+ DBG_ASSERT( pPortion->GetTextPortions().Count(), "Zeile ohne Textportion im Paint!" );
+ TextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( y );
+ DBG_ASSERT( pTextPortion, "NULL-Pointer im Portioniterator in UpdateViews" );
+ switch ( pTextPortion->GetKind() )
+ {
+ case PORTIONKIND_TEXT:
+ case PORTIONKIND_FIELD:
+ case PORTIONKIND_HYPHENATOR:
+ {
+ SeekCursor( pPortion->GetNode(), nIndex+1, aTmpFont, pOutDev );
+#ifdef EDITDEBUG
+ if ( pTextPortion->GetKind() == PORTIONKIND_HYPHENATOR )
+ {
+ aTmpFont.SetFillColor( COL_LIGHTGRAY );
+ aTmpFont.SetTransparent( sal_False );
+ }
+#endif
+ aTmpFont.SetPhysFont( pOutDev );
+
+ XubString aText;
+ const long* pDXArray = 0;
+ long* pTmpDXArray = 0;
+
+ if ( pTextPortion->GetKind() == PORTIONKIND_TEXT )
+ {
+ aText = XubString( *(pPortion->GetNode()), nIndex, pTextPortion->GetLen() );
+ pDXArray = pLine->GetCharPosArray().GetData()+( nIndex-pLine->GetStart() );
+ }
+ else if ( pTextPortion->GetKind() == PORTIONKIND_FIELD )
+ {
+ EditCharAttrib* pAttr = pPortion->GetNode()->GetCharAttribs().FindFeature( nIndex );
+ DBG_ASSERT( pAttr, "Feld nicht gefunden" );
+ DBG_ASSERT( pAttr && pAttr->GetItem()->ISA( SvxFieldItem ), "Feld vom falschen Typ!" );
+ aText = ((EditCharAttribField*)pAttr)->GetFieldValue();
+
+ if ( pOutDev != GetRefDevice() )
+ {
+ pTmpDXArray = new long[ aText.Len() ];
+ pDXArray = pTmpDXArray;
+ Font aOldFont( GetRefDevice()->GetFont() );
+ aTmpFont.SetPhysFont( GetRefDevice() );
+ aTmpFont.QuickGetTextSize( GetRefDevice(), aText, 0, aText.Len(), pTmpDXArray );
+ if ( aStatus.DoRestoreFont() )
+ GetRefDevice()->SetFont( aOldFont );
+ }
+ else
+ pDXArray = 0;
+ }
+ else if ( pTextPortion->GetKind() == PORTIONKIND_HYPHENATOR )
+ {
+ if ( pTextPortion->GetExtraValue() )
+ aText = pTextPortion->GetExtraValue();
+ aText += CH_HYPH;
+ }
+
+ long nTxtWidth = pTextPortion->GetSize().Width();
+
+ if ( bStripOnly )
+ {
+ GetEditEnginePtr()->DrawingText( aTmpPos, aText, pDXArray, aTmpFont, n, nIndex );
+ }
+ else
+ {
+ Point aOutPos( aTmpPos );
+ short nEsc = aTmpFont.GetEscapement();
+ if ( nOrientation )
+ {
+ aTmpFont.SetLineOrientation( nOrientation );
+ // aTmpFont.SetCharOrientation( nOrientation );
+
+ // Bei Hoch/Tief selbst Hand anlegen:
+ if ( aTmpFont.GetEscapement() )
+ {
+ aOutPos.Y() -= aTmpFont.GetEscapement() * aTmpFont.GetSize().Height() / 100L ;
+ aTmpFont.SetEscapement( 0 );
+ }
+
+ aTmpFont.SetPhysFont( pOutDev );
+
+ aOutPos = lcl_ImplCalcRotatedPos( aOutPos, aOrigin, nSin, nCos );
+
+// aTmpFont.QuickDrawText( pOutDev, aTranslatedPos, aText, 0, aText.Len(), pDXArray );
+ }
+// else
+ {
+ // nur ausgeben, was im sichtbaren Bereich beginnt:
+ // Wichtig, weil Bug bei einigen Grafikkarten bei transparentem Font, Ausgabe bei neg.
+ if ( nOrientation || ( ( aTmpPos.X() + nTxtWidth ) >= nFirstVisXPos ) )
+ {
+ if ( nEsc && ( ( aTmpFont.GetUnderline() != UNDERLINE_NONE ) ) )
+ {
+ // Das Hoch/Tief ohne Underline malen, das Underline
+ // auf der BaseLine der Original-Fonthoehe ausgeben...
+
+ // Aber nur, wenn davor auch Unterstrichen!
+ sal_Bool bSpecialUnderline = sal_False;
+ EditCharAttrib* pPrev = pPortion->GetNode()->GetCharAttribs().FindAttrib( EE_CHAR_ESCAPEMENT, nIndex );
+ if ( pPrev )
+ {
+ SvxFont aDummy;
+ // Unterstreichung davor?
+ if ( pPrev->GetStart() )
+ {
+ SeekCursor( pPortion->GetNode(), pPrev->GetStart(), aDummy );
+ if ( aDummy.GetUnderline() != UNDERLINE_NONE )
+ bSpecialUnderline = sal_True;
+ }
+ if ( !bSpecialUnderline && ( pPrev->GetEnd() < pPortion->GetNode()->Len() ) )
+ {
+ SeekCursor( pPortion->GetNode(), pPrev->GetEnd()+1, aDummy );
+ if ( aDummy.GetUnderline() != UNDERLINE_NONE )
+ bSpecialUnderline = sal_True;
+ }
+ }
+ if ( bSpecialUnderline )
+ {
+ Size aSz = aTmpFont.GetPhysTxtSize( pOutDev, aText, 0, aText.Len() );
+ BYTE nProp = aTmpFont.GetPropr();
+ aTmpFont.SetEscapement( 0 );
+ aTmpFont.SetPropr( 100 );
+ aTmpFont.SetPhysFont( pOutDev );
+ String aBlanks;
+ aBlanks.Fill( aText.Len(), ' ' );
+ Point aUnderlinePos( aOutPos );
+ if ( nOrientation )
+ aUnderlinePos = lcl_ImplCalcRotatedPos( aTmpPos, aOrigin, nSin, nCos );
+ pOutDev->DrawStretchText( aUnderlinePos, aSz.Width(), aBlanks, 0, aText.Len() );
+
+ aTmpFont.SetUnderline( UNDERLINE_NONE );
+ if ( !nOrientation )
+ aTmpFont.SetEscapement( nEsc );
+ aTmpFont.SetPropr( nProp );
+ aTmpFont.SetPhysFont( pOutDev );
+ }
+ }
+ aTmpFont.QuickDrawText( pOutDev, aOutPos, aText, 0, aText.Len(), pDXArray );
+#ifdef EDIT_PRINTER_LOG
+ if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER )
+ {
+ SvFileStream aLog( "d:\\editprn.log", STREAM_WRITE );
+ aLog.Seek( STREAM_SEEK_TO_END );
+ aLog << "\tDrawText: " << aText.GetStr() << " [dX: ";
+ for ( sal_uInt16 nX = 0; nX < aText.Len(); nX++ )
+ {
+ if ( nX )
+ aLog << ',';
+ aLog << String( pDXArray[nX] ).GetStr();
+ }
+ aLog << " ]" << endl;
+ }
+#endif
+ }
+ }
+
+#ifndef SVX_LIGHT
+ if ( GetStatus().DoOnlineSpelling() && GetStatus().DoDrawRedLines() && pPortion->GetNode()->GetWrongList()->HasWrongs() && pTextPortion->GetLen() )
+ {
+ lcl_DrawRedLines( pOutDev, aTmpFont.GetSize().Height(), aTmpPos, nIndex, nIndex + pTextPortion->GetLen(), pDXArray, pPortion->GetNode()->GetWrongList(), nOrientation, aOrigin );
+ }
+#endif // !SVX_LIGHT
+ }
+
+ if ( pTmpDXArray )
+ delete pTmpDXArray;
+ aTmpPos.X() += nTxtWidth;
+ }
+ break;
+ case PORTIONKIND_TAB:
+ {
+ if ( pTextPortion->GetExtraValue() && ( pTextPortion->GetExtraValue() != ' ' ) )
+ {
+ aTmpFont.SetTransparent( sal_False );
+ aTmpFont.SetEscapement( 0 );
+ aTmpFont.SetPhysFont( pOutDev );
+ long nCharWidth = aTmpFont.QuickGetTextSize( pOutDev, pTextPortion->GetExtraValue(), 0, 1, NULL ).Width();
+ long nChars = pTextPortion->GetSize().Width() / nCharWidth;
+ if ( nChars < 2 )
+ nChars = 2; // wird durch DrawStretchText gestaucht.
+ else if ( nChars == 2 )
+ nChars = 3; // sieht besser aus
+
+ String aText;
+ aText.Fill( nChars, pTextPortion->GetExtraValue() );
+ pOutDev->DrawStretchText( aTmpPos, pTextPortion->GetSize().Width(), aText );
+ }
+ aTmpPos.X() += pTextPortion->GetSize().Width();
+ }
+ break;
+ }
+ if ( aTmpPos.X() > aClipRec.Right() )
+ break; // Keine weitere Ausgabe in Zeile noetig
+ nIndex += pTextPortion->GetLen();
+ }
+ }
+
+ if ( ( nLine != nLastLine ) && !aStatus.IsOutliner() )
+ aStartPos.Y() += nSBL;
+
+ if ( aStartPos.Y() >= aClipRec.Bottom() )
+ break; // keine sichtbaren Aktionen mehr...
+ }
+ if ( !aStatus.IsOutliner() )
+ {
+ const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
+ aStartPos.Y() += GetYValue( rULItem.GetLower() );
+ }
+ }
+ else
+ {
+ aStartPos.Y() += nParaHeight;
+ }
+
+ if ( aStartPos.Y() > aClipRec.Bottom() )
+ break; // keine sichtbaren Aktionen mehr...
+ }
+ if ( aStatus.DoRestoreFont() )
+ pOutDev->SetFont( aOldFont );
+}
+
+void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool bUseVirtDev )
+{
+ DBG_ASSERT( pView, "Keine View - Kein Paint!" );
+ DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
+
+ if ( !GetUpdateMode() || IsInUndo() )
+ return;
+
+ // Schnittmenge aus Paintbereich und OutputArea.
+ Rectangle aClipRec( pView->GetOutputArea() );
+ aClipRec.Intersection( rRec );
+
+ Window* pOutWin = pView->GetWindow();
+
+ if ( bUseVirtDev )
+ {
+ Rectangle aClipRecPixel( pOutWin->LogicToPixel( aClipRec ) );
+ aClipRecPixel.Right() += 1; // falls abgerundet!
+ aClipRecPixel.Bottom() += 1; // falls abgerundet!
+
+ // Wenn aClipRecPixel > XXXX, dann invalidieren ?!
+
+ VirtualDevice* pVDev = GetVirtualDevice( pOutWin->GetMapMode() );
+
+ pVDev->SetBackground( pView->GetBackgroundColor() );
+
+ sal_Bool bVDevValid = sal_True;
+ Size aOutSz( pVDev->GetOutputSizePixel() );
+ if ( ( aOutSz.Width() < aClipRecPixel.GetWidth() ) ||
+ ( aOutSz.Height() < aClipRecPixel.GetHeight() ) )
+ {
+ bVDevValid = pVDev->SetOutputSizePixel( aClipRecPixel.GetSize() );
+ }
+ else
+ {
+ // Das VirtDev kann bei einem Resize sehr gross werden =>
+ // irgendwann mal kleiner machen!
+ if ( ( aOutSz.Height() > ( aClipRecPixel.GetHeight() + RESDIFF ) ) ||
+ ( aOutSz.Width() > ( aClipRecPixel.GetWidth() + RESDIFF ) ) )
+ {
+ bVDevValid = pVDev->SetOutputSizePixel( aClipRecPixel.GetSize() );
+ }
+ else
+ {
+ pVDev->Erase();
+ }
+ }
+ DBG_ASSERT( bVDevValid, "VDef konnte nicht vergroessert werden!" );
+ if ( !bVDevValid )
+ {
+ Paint( pView, rRec, sal_False /* ohne VDev */ );
+ return;
+ }
+
+ // PaintRect fuer VDev nicht mit alignter Groesse,
+ // da sonst die Zeile darunter auch ausgegeben werden muss:
+ Rectangle aTmpRec( Point( 0, 0 ), aClipRec.GetSize() );
+
+ aClipRec = pOutWin->PixelToLogic( aClipRecPixel );
+ Point aStartPos( aClipRec.TopLeft() );
+ aStartPos = pView->GetDocPos( aStartPos );
+ aStartPos.X() *= (-1);
+ aStartPos.Y() *= (-1);
+
+ Paint( pVDev, aTmpRec, aStartPos );
+
+ sal_Bool bClipRegion;
+ Region aOldRegion;
+ MapMode aOldMapMode;
+ if ( pTextRanger )
+ {
+ bClipRegion = pOutWin->IsClipRegion();
+ aOldRegion = pOutWin->GetClipRegion();
+ // Wie bekomme ich das Polygon an die richtige Stelle????
+ // Das Polygon bezieht sich auf die View, nicht auf das Window
+ // => Origin umsetzen...
+ aOldMapMode = pOutWin->GetMapMode();
+ Point aOrigin = aOldMapMode.GetOrigin();
+ Point aViewPos = pView->GetOutputArea().TopLeft();
+ aOrigin.Move( aViewPos.X(), aViewPos.Y() );
+ aClipRec.Move( -aViewPos.X(), -aViewPos.Y() );
+ MapMode aNewMapMode( aOldMapMode );
+ aNewMapMode.SetOrigin( aOrigin );
+ pOutWin->SetMapMode( aNewMapMode );
+ pOutWin->SetClipRegion( Region( pTextRanger->GetPolyPolygon() ) );
+ }
+
+ pOutWin->DrawOutDev( aClipRec.TopLeft(), aClipRec.GetSize(),
+ Point(0,0), aClipRec.GetSize(), *pVDev );
+
+ if ( pTextRanger )
+ {
+ if ( bClipRegion )
+ pOutWin->SetClipRegion( aOldRegion );
+ else
+ pOutWin->SetClipRegion();
+ pOutWin->SetMapMode( aOldMapMode );
+ }
+
+ pView->DrawSelection();
+ }
+ else
+ {
+ Point aStartPos = pView->GetOutputArea().TopLeft();
+ aStartPos.X() -= pView->GetVisArea().Left();
+ aStartPos.Y() -= pView->GetVisArea().Top();
+
+ // Wenn Doc-Breite < OutputArea,Width, nicht umgebrochene Felder,
+ // stehen die Felder sonst ber, wenn > Zeile.
+ // ( Oben nicht, da dort bereits Doc-Breite von Formatierung mit drin )
+ if ( pView->GetOutputArea().GetWidth() > GetPaperSize().Width() )
+ {
+ long nMaxX = pView->GetOutputArea().Left() + GetPaperSize().Width();
+ if ( aClipRec.Left() > nMaxX )
+ return;
+ if ( aClipRec.Right() > nMaxX )
+ aClipRec.Right() = nMaxX;
+ }
+
+ sal_Bool bClipRegion = pOutWin->IsClipRegion();
+ Region aOldRegion = pOutWin->GetClipRegion();
+ pOutWin->IntersectClipRegion( aClipRec );
+
+ Paint( pOutWin, aClipRec, aStartPos );
+
+ if ( bClipRegion )
+ pOutWin->SetClipRegion( aOldRegion );
+ else
+ pOutWin->SetClipRegion();
+
+ pView->DrawSelection();
+ }
+
+}
+
+void ImpEditEngine::InsertContent( ContentNode* pNode, sal_uInt16 nPos )
+{
+ DBG_ASSERT( pNode, "NULL-Poointer in InsertContent! " );
+ DBG_ASSERT( IsInUndo(), "InsertContent nur fuer Undo()!" );
+ ParaPortion* pNew = new ParaPortion( pNode );
+ GetParaPortions().Insert( pNew, nPos );
+ aEditDoc.Insert( pNode, nPos );
+ if ( IsCallParaInsertedOrDeleted() )
+ GetEditEnginePtr()->ParagraphInserted( nPos );
+}
+
+EditPaM ImpEditEngine::SplitContent( sal_uInt16 nNode, sal_uInt16 nSepPos )
+{
+ ContentNode* pNode = aEditDoc.SaveGetObject( nNode );
+ DBG_ASSERT( pNode, "Ungueltiger Node in SplitContent" );
+ DBG_ASSERT( IsInUndo(), "SplitContent nur fuer Undo()!" );
+ DBG_ASSERT( nSepPos <= pNode->Len(), "Index im Wald: SplitContent" );
+ EditPaM aPaM( pNode, nSepPos );
+ return ImpInsertParaBreak( aPaM );
+}
+
+EditPaM ImpEditEngine::ConnectContents( sal_uInt16 nLeftNode, sal_Bool bBackward )
+{
+ ContentNode* pLeftNode = aEditDoc.SaveGetObject( nLeftNode );
+ ContentNode* pRightNode = aEditDoc.SaveGetObject( nLeftNode+1 );
+ DBG_ASSERT( pLeftNode, "Ungueltiger linker Node in ConnectContents" );
+ DBG_ASSERT( pRightNode, "Ungueltiger rechter Node in ConnectContents" );
+ DBG_ASSERT( IsInUndo(), "ConnectContent nur fuer Undo()!" );
+ return ImpConnectParagraphs( pLeftNode, pRightNode, bBackward );
+}
+
+void ImpEditEngine::SetUpdateMode( sal_Bool bUp, EditView* pCurView, sal_Bool bForceUpdate )
+{
+ sal_Bool bChanged = ( GetUpdateMode() != bUp );
+
+ // Beim Umschalten von sal_True auf sal_False waren alle Selektionen sichtbar,
+ // => Wegmalen
+ // Umgekehrt waren alle unsichtbar => malen
+
+// DrawAllSelections(); sieht im Outliner schlecht aus !
+// EditView* pView = aEditViewList.First();
+// while ( pView )
+// {
+// DBG_CHKOBJ( pView, EditView, 0 );
+// pView->pImpEditView->DrawSelection();
+// pView = aEditViewList.Next();
+// }
+
+ // Wenn !bFormatted, also z.B. nach SetText, braucht bei UpdateMode sal_True
+ // nicht sofort formatiert werden, weil warscheinlich noch Text kommt.
+ // Spaetestens bei einem Paint / CalcTextWidth wird formatiert.
+
+ bUpdate = bUp;
+ if ( bUpdate && ( bChanged || bForceUpdate ) )
+ FormatAndUpdate( pCurView );
+}
+
+void ImpEditEngine::ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow )
+{
+ ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
+ DBG_ASSERT( pPPortion, "ShowParagraph: Absatz existiert nicht!" );
+ if ( pPPortion && ( pPPortion->IsVisible() != bShow ) )
+ {
+ pPPortion->SetVisible( bShow );
+
+ if ( !bShow )
+ {
+ // Als deleted kenzeichnen, damit keine Selektion auf diesem
+ // Absatz beginnt oder endet...
+ DeletedNodeInfo* pDelInfo = new DeletedNodeInfo( (sal_uInt32)pPPortion->GetNode(), nParagraph );
+ aDeletedNodes.Insert( pDelInfo, aDeletedNodes.Count() );
+ UpdateSelections();
+ // Dann kriege ich den unteren Bereich nicht invalidiert,
+ // wenn UpdateMode = sal_False!
+ // Wenn doch, dann vor SetVisible auf sal_False merken!
+// nCurTextHeight -= pPPortion->GetHeight();
+ }
+
+ if ( bShow && pPPortion->IsInvalid() )
+ {
+ if ( GetUpdateMode() && !GetTextRanger() )
+ {
+ if ( pPPortion->IsInvalid() )
+ {
+ Font aOldFont( GetRefDevice()->GetFont() );
+ CreateLines( nParagraph, 0 ); // 0: Kein TextRanger
+ if ( aStatus.DoRestoreFont() )
+ GetRefDevice()->SetFont( aOldFont );
+ }
+ else
+ CalcHeight( pPPortion );
+ nCurTextHeight += pPPortion->GetHeight();
+ }
+ else
+ nCurTextHeight = 0x7fffffff;
+ }
+
+ pPPortion->SetMustRepaint( sal_True );
+ if ( GetUpdateMode() && !IsInUndo() && !GetTextRanger() )
+ {
+ aInvalidRec = Rectangle( Point( 0, GetParaPortions().GetYOffset( pPPortion ) ),
+ Point( GetPaperSize().Width(), nCurTextHeight ) );
+ UpdateViews( GetActiveView() );
+ }
+ }
+}
+
+sal_Bool ImpEditEngine::IsParagraphVisible( sal_uInt16 nParagraph )
+{
+ ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
+ DBG_ASSERT( pPPortion, "IsParagraphVisible: Absatz existiert nicht!" );
+ if ( pPPortion )
+ return pPPortion->IsVisible();
+ return sal_False;
+}
+
+EditSelection ImpEditEngine::MoveParagraphs( Range aOldPositions, sal_uInt16 nNewPos, EditView* pCurView )
+{
+ DBG_ASSERT( GetParaPortions().Count() != 0, "Keine Absaetze gefunden: MoveParagraphs" );
+ if ( GetParaPortions().Count() == 0 )
+ return EditSelection();
+ aOldPositions.Justify();
+
+ EditSelection aSel( ImpMoveParagraphs( aOldPositions, nNewPos ) );
+
+ if ( nNewPos >= GetParaPortions().Count() )
+ nNewPos = GetParaPortions().Count() - 1;
+
+ // Dort, wo der Absatz eingefuegt wurde, muss richtig gepainted werden:
+ // Dort, wo der Absatz entfernt wurde, muss richtig gepainted werden:
+ // ( Und dazwischen entsprechend auch...)
+ if ( pCurView && ( GetUpdateMode() == sal_True ) )
+ {
+ // in diesem Fall kann ich direkt neu malen, ohne die
+ // Portions zu Invalidieren.
+ sal_uInt16 nFirstPortion = Min( (sal_uInt16)aOldPositions.Min(), nNewPos );
+ sal_uInt16 nLastPortion = Max( (sal_uInt16)aOldPositions.Max(), nNewPos );
+
+ ParaPortion* pUpperPortion = GetParaPortions().SaveGetObject( nFirstPortion );
+ ParaPortion* pLowerPortion = GetParaPortions().SaveGetObject( nLastPortion );
+
+ aInvalidRec = Rectangle(); // leermachen
+ aInvalidRec.Left() = 0;
+ aInvalidRec.Right() = aPaperSize.Width();
+ aInvalidRec.Top() = GetParaPortions().GetYOffset( pUpperPortion );
+ aInvalidRec.Bottom() = GetParaPortions().GetYOffset( pLowerPortion ) + pLowerPortion->GetHeight();
+
+ UpdateViews( pCurView );
+ }
+ else
+ {
+ // aber der oberen ungueltigen Position neu painten...
+ sal_uInt16 nFirstInvPara = Min( (sal_uInt16)aOldPositions.Min(), nNewPos );
+ InvalidateFromParagraph( nFirstInvPara );
+ }
+ return aSel;
+}
+
+void ImpEditEngine::InvalidateFromParagraph( sal_uInt16 nFirstInvPara )
+{
+ // Es werden nicht die folgenden Absaetze invalidiert,
+ // da ResetHeight() => Groessenanderung => alles folgende wird
+ // sowieso neu ausgegeben.
+ ParaPortion* pTmpPortion;
+ if ( nFirstInvPara != 0 )
+ {
+ pTmpPortion = GetParaPortions().GetObject( nFirstInvPara-1 );
+ pTmpPortion->MarkInvalid( pTmpPortion->GetNode()->Len(), 0 );
+ }
+ else
+ {
+ pTmpPortion = GetParaPortions().GetObject( 0 );
+ pTmpPortion->MarkSelectionInvalid( 0, pTmpPortion->GetNode()->Len() );
+ }
+ pTmpPortion->ResetHeight();
+}
+
+IMPL_LINK_INLINE_START( ImpEditEngine, StatusTimerHdl, Timer *, EMPTYARG )
+{
+ CallStatusHdl();
+ return 0;
+}
+IMPL_LINK_INLINE_END( ImpEditEngine, StatusTimerHdl, Timer *, EMPTYARG )
+
+void ImpEditEngine::CallStatusHdl()
+{
+ if ( aStatusHdlLink.IsSet() && aStatus.GetStatusWord() )
+ {
+ // Der Status muss vor Call zurueckgesetzt werden,
+ // da im Hdl evtl. weitere Fags gesetzt werden...
+ EditStatus aTmpStatus( aStatus );
+ aStatus.Clear();
+ aStatusHdlLink.Call( &aTmpStatus );
+ aStatusTimer.Stop(); // Falls von Hand gerufen...
+ }
+}
+
+ContentNode* ImpEditEngine::GetPrevVisNode( ContentNode* pCurNode )
+{
+ ParaPortion* pPortion = FindParaPortion( pCurNode );
+ DBG_ASSERT( pPortion, "GetPrevVisibleNode: Keine passende Portion!" );
+ pPortion = GetPrevVisPortion( pPortion );
+ if ( pPortion )
+ return pPortion->GetNode();
+ return 0;
+}
+
+ContentNode* ImpEditEngine::GetNextVisNode( ContentNode* pCurNode )
+{
+ ParaPortion* pPortion = FindParaPortion( pCurNode );
+ DBG_ASSERT( pPortion, "GetNextVisibleNode: Keine passende Portion!" );
+ pPortion = GetNextVisPortion( pPortion );
+ if ( pPortion )
+ return pPortion->GetNode();
+ return 0;
+}
+
+ParaPortion* ImpEditEngine::GetPrevVisPortion( ParaPortion* pCurPortion )
+{
+ sal_uInt16 nPara = GetParaPortions().GetPos( pCurPortion );
+ DBG_ASSERT( nPara < GetParaPortions().Count() , "Portion nicht gefunden: GetPrevVisPortion" );
+ ParaPortion* pPortion = nPara ? GetParaPortions()[--nPara] : 0;
+ while ( pPortion && !pPortion->IsVisible() )
+ pPortion = nPara ? GetParaPortions()[--nPara] : 0;
+
+ return pPortion;
+}
+
+ParaPortion* ImpEditEngine::GetNextVisPortion( ParaPortion* pCurPortion )
+{
+ sal_uInt16 nPara = GetParaPortions().GetPos( pCurPortion );
+ DBG_ASSERT( nPara < GetParaPortions().Count() , "Portion nicht gefunden: GetPrevVisNode" );
+ ParaPortion* pPortion = GetParaPortions().SaveGetObject( ++nPara );
+ while ( pPortion && !pPortion->IsVisible() )
+ pPortion = GetParaPortions().SaveGetObject( ++nPara );
+
+ return pPortion;
+}
+
+EditPaM ImpEditEngine::InsertParagraph( sal_uInt16 nPara )
+{
+ EditPaM aPaM;
+ if ( nPara != 0 )
+ {
+ ContentNode* pNode = GetEditDoc().SaveGetObject( nPara-1 );
+ if ( !pNode )
+ pNode = GetEditDoc().SaveGetObject( GetEditDoc().Count() - 1 );
+ DBG_ASSERT( pNode, "Kein einziger Absatz in InsertParagraph ?" );
+ aPaM = EditPaM( pNode, pNode->Len() );
+ }
+ else
+ {
+ ContentNode* pNode = GetEditDoc().SaveGetObject( 0 );
+ aPaM = EditPaM( pNode, 0 );
+ }
+
+ return ImpInsertParaBreak( aPaM );
+}
+
+EditSelection* ImpEditEngine::SelectParagraph( sal_uInt16 nPara )
+{
+ EditSelection* pSel = 0;
+ ContentNode* pNode = GetEditDoc().SaveGetObject( nPara );
+ DBG_ASSERTWARNING( pNode, "Absatz existiert nicht: SelectParagraph" );
+ if ( pNode )
+ pSel = new EditSelection( EditPaM( pNode, 0 ), EditPaM( pNode, pNode->Len() ) );
+
+ return pSel;
+}
+
+void ImpEditEngine::FormatAndUpdate( EditView* pCurView )
+{
+ if ( bDowning )
+ return ;
+
+ if ( IsInUndo() )
+ IdleFormatAndUpdate( pCurView );
+ else
+ {
+ FormatDoc();
+ UpdateViews( pCurView );
+ }
+}
+
+void ImpEditEngine::BeginDrag( EditView* pView )
+{
+ DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
+ DBG_CHKOBJ( pView, EditView, 0 );
+
+ if ( !pDragAndDropInfo )
+ pDragAndDropInfo = new DragAndDropInfo( *pView->GetWindow() );
+ pDragAndDropInfo->bStarterOfDD = sal_True;
+
+ // Sensibler Bereich, wo gescrollt werden soll.
+ Size aSz( 5, 0 );
+ aSz = pView->GetWindow()->PixelToLogic( aSz );
+ pDragAndDropInfo->nSensibleRange = (sal_uInt16) aSz.Width();
+ pDragAndDropInfo->nCursorWidth = (sal_uInt16) aSz.Width() / 2;
+ MapMode aMapMode( pView->GetWindow()->GetMapMode() );
+ aMapMode.SetOrigin( Point( 0, 0 ) );
+ pDragAndDropInfo->aBackground.SetMapMode( aMapMode );
+
+ EditSelection aCopySel( pView->pImpEditView->GetEditSelection() );
+ ESelection aSaveSel = pView->GetSelection();
+ if ( pDragAndDropInfo->pField )
+ {
+ aCopySel = CreateSel( pDragAndDropInfo->aDropSel );
+ aSaveSel = pDragAndDropInfo->aDropSel;
+ }
+ else
+ {
+ aSaveSel.Adjust();
+ pDragAndDropInfo->aDropSel = aSaveSel; // Wird evtl. im Drop modifiziert.
+ }
+ CopyData( aCopySel, EXCHANGE_DRAGSERVER );
+
+ // Falls Drag&Move in einer Engine, muessen Copy&Del geklammert sein!
+ UndoActionStart( EDITUNDO_DRAGANDDROP );
+ pView->HideCursor();
+
+ sal_Bool bDestroyed = sal_False;
+ pDestroyedMarker = &bDestroyed;
+
+ sal_uInt16 nDragOptions = DRAG_ALL;
+ if ( pView->IsReadOnly() )
+ nDragOptions &= ~DRAG_MOVEABLE;
+ DropAction aAction = pView->GetWindow()->ExecuteDrag
+ ( Pointer( POINTER_MOVEDATA ), Pointer( POINTER_COPYDATA ), nDragOptions, NULL );
+
+ if ( bDestroyed )
+ return;
+
+ pDestroyedMarker = NULL;
+
+ // Nicht dass mich jemand im Drop abgeschossen hat...
+ DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
+ DBG_CHKOBJ( pView, EditView, 0 );
+
+ if ( ( aAction == DROP_MOVE ) && !pView->IsReadOnly() )
+ {
+ if ( pDragAndDropInfo->bStarterOfDD && pDragAndDropInfo->bDroppedInMe )
+ {
+ // DropPos: Wohin wurde gedroppt, unabhaengig von laenge.
+ ESelection aDropPos( pDragAndDropInfo->aDropSel.nStartPara, pDragAndDropInfo->aDropSel.nStartPos, pDragAndDropInfo->aDropSel.nStartPara, pDragAndDropInfo->aDropSel.nStartPos );
+ ESelection aToBeDelSel = aSaveSel;
+ ESelection aNewSel( pDragAndDropInfo->aDropSel.nEndPara, pDragAndDropInfo->aDropSel.nEndPos,
+ pDragAndDropInfo->aDropSel.nEndPara, pDragAndDropInfo->aDropSel.nEndPos );
+ sal_Bool bBeforeSelection = aDropPos.IsLess( aSaveSel );
+ DBG_ASSERT( ( aSaveSel.nEndPara - aSaveSel.nStartPara) >= 0, "Drop: SaveSelection nicht justiert!" );
+ sal_uInt16 nParaDiff = aSaveSel.nEndPara - aSaveSel.nStartPara;
+ if ( bBeforeSelection )
+ {
+ // aToBeDelSel anpassen.
+ DBG_ASSERT( aSaveSel.nStartPara >= pDragAndDropInfo->aDropSel.nStartPara, "Doch nicht davor?" );
+ aToBeDelSel.nStartPara += nParaDiff;
+ aToBeDelSel.nEndPara += nParaDiff;
+ // Zeichen korrigieren?
+ if ( aToBeDelSel.nStartPara == pDragAndDropInfo->aDropSel.nEndPara )
+ {
+ sal_uInt16 nMoreChars;
+ if ( pDragAndDropInfo->aDropSel.nStartPara == pDragAndDropInfo->aDropSel.nEndPara )
+ nMoreChars = pDragAndDropInfo->aDropSel.nEndPos - pDragAndDropInfo->aDropSel.nStartPos;
+ else
+ nMoreChars = pDragAndDropInfo->aDropSel.nEndPos;
+ aToBeDelSel.nStartPos += nMoreChars;
+ if ( aToBeDelSel.nStartPara == aToBeDelSel.nEndPara )
+ aToBeDelSel.nEndPos += nMoreChars;
+ }
+ }
+ else
+ {
+ // aToBeDelSel ist ok, aber Selektion der View
+ // muss angepasst werden, wenn davor geloescht wird!
+ DBG_ASSERT( aSaveSel.nStartPara <= pDragAndDropInfo->aDropSel.nStartPara, "Doch nicht davor?" );
+ aNewSel.nStartPara -= nParaDiff;
+ aNewSel.nEndPara -= nParaDiff;
+ // Zeichen korrigieren?
+ if ( aSaveSel.nEndPara == pDragAndDropInfo->aDropSel.nStartPara )
+ {
+ sal_uInt16 nLessChars;
+ if ( aSaveSel.nStartPara == aSaveSel.nEndPara )
+ nLessChars = aSaveSel.nEndPos - aSaveSel.nStartPos;
+ else
+ nLessChars = aSaveSel.nEndPos;
+ aNewSel.nStartPos -= nLessChars;
+ if ( aNewSel.nStartPara == aNewSel.nEndPara )
+ aNewSel.nEndPos -= nLessChars;
+ }
+ }
+
+ pView->pImpEditView->DrawSelection();
+ EditSelection aDelSel( CreateSel( aToBeDelSel ) );
+ DBG_ASSERT( !aDelSel.DbgIsBuggy( aEditDoc ), "ToBeDel ist buggy!" );
+ ImpDeleteSelection( aDelSel );
+ if ( !bBeforeSelection )
+ {
+ DBG_ASSERT( !CreateSel( aNewSel ).DbgIsBuggy(aEditDoc), "Bad" );
+ pView->pImpEditView->SetEditSelection( CreateSel( aNewSel ) );
+ }
+ FormatAndUpdate( pView );
+ pView->pImpEditView->DrawSelection();
+ }
+ else
+ {
+ // andere EditEngine...
+ pView->DeleteSelected();
+ }
+
+
+ }
+
+ UndoActionEnd( EDITUNDO_DRAGANDDROP );
+
+ DragServer::Clear();
+ HideDDCursor( pView->GetWindow() );
+ pView->ShowCursor();
+ delete pDragAndDropInfo; pDragAndDropInfo = 0;
+}
+
+sal_Bool ImpEditEngine::Drop( const DropEvent& rEvt, EditView* pCurView )
+{
+ DBG_ASSERT( pCurView, "Keine View - Kein (Drag&)Drops" );
+
+ HideDDCursor( pCurView->GetWindow() );
+
+ Point aMousePos( rEvt.GetPosPixel() );
+ // Logische Einheiten...
+ aMousePos = pCurView->GetWindow()->PixelToLogic( aMousePos );
+ if ( !pCurView->GetOutputArea().IsInside( aMousePos ) )
+ return sal_False;
+
+ // Erstmal kopieren, evtl. spaeter bei Move loeschen...
+ // Durch QueryDrop ist sichergestellt, dass Move oder Copy.
+ // Bei Move wird die Selection nach ExecuteDrag geloescht.
+
+ DBG_ASSERT( HasData( EXCHANGE_DRAGSERVER, aStatus.AllowPasteSpecial()), "Drop ohne brauchbare Daten ?!" );
+ DBG_ASSERT( pDragAndDropInfo->aDropDest.GetNode(), "Drop: PaM nicht initialisiert!" );
+ if ( !pDragAndDropInfo->aDropDest.GetNode() )
+ return sal_False; // Unerlaubter Drop-Aufruf.
+
+ EditPaM aPaM( pDragAndDropInfo->aDropDest );
+ EditSelection aNewSel;
+
+ UndoActionStart( EDITUNDO_DRAGANDDROP );
+
+ // Selektion wegmalen...
+ pCurView->pImpEditView->DrawSelection();
+
+ aNewSel = PasteData( aPaM, EXCHANGE_DRAGSERVER, aStatus.AllowPasteSpecial() );
+
+ pCurView->pImpEditView->SetEditSelection( aNewSel );
+ FormatAndUpdate( pCurView );
+ if ( pDragAndDropInfo && pDragAndDropInfo->bStarterOfDD )
+ {
+ // Nur dann setzen, wenn in gleicher Engine!
+ pDragAndDropInfo->aDropSel.nStartPara = aEditDoc.GetPos( aPaM.GetNode() );
+ pDragAndDropInfo->aDropSel.nStartPos = aPaM.GetIndex();
+ pDragAndDropInfo->aDropSel.nEndPara = aEditDoc.GetPos( aNewSel.Max().GetNode() );
+ pDragAndDropInfo->aDropSel.nEndPos = aNewSel.Max().GetIndex();
+ pDragAndDropInfo->bDroppedInMe = sal_True;
+ }
+ else
+ {
+ delete pDragAndDropInfo;
+ pDragAndDropInfo = 0;
+ }
+
+ UndoActionEnd( EDITUNDO_DRAGANDDROP );
+
+ return sal_True;
+}
+
+sal_Bool ImpEditEngine::QueryDrop( const DropEvent& rEvt, EditView* pCurView )
+{
+ DBG_ASSERT( pCurView, "Keine View - Kein (Drag&)Drops" );
+ Window* pWindow = pCurView->GetWindow();
+ DBG_ASSERT( pWindow, "View ohne Fenster in QueryDrop!" );
+
+ if ( !pDragAndDropInfo )
+ pDragAndDropInfo = new DragAndDropInfo( *pCurView->GetWindow() );
+
+ if ( rEvt.IsLeaveWindow() )
+ {
+ HideDDCursor( pWindow );
+ return sal_False;
+ }
+
+ // Wenn ich die Aktion nicht kann....
+ if ( ( rEvt.GetAction() != DROP_COPY ) && ( rEvt.GetAction() != DROP_MOVE ) )
+ return sal_False;
+ // Wenn ich das Format nicht kann....
+ if ( !HasData( EXCHANGE_DRAGSERVER, aStatus.AllowPasteSpecial() ) )
+ return sal_False;
+
+ Point aMousePos( rEvt.GetPosPixel() );
+ // Logische Einheiten...
+ aMousePos = pWindow->PixelToLogic( aMousePos );
+
+ sal_Bool bInOutputArea = pCurView->GetOutputArea().IsInside( aMousePos );
+
+ sal_Bool bAllowScroll = pCurView->pImpEditView->DoAutoScroll();
+ if ( bAllowScroll )
+ {
+ long nScrollX = 0;
+ long nScrollY = 0;
+ // pruefen, ob im sensitiven Bereich
+ if ( ( (aMousePos.X()-pDragAndDropInfo->nSensibleRange) < pCurView->GetOutputArea().Left() ) && ( ( aMousePos.X() + pDragAndDropInfo->nSensibleRange ) > pCurView->GetOutputArea().Left() ) )
+ nScrollX = pCurView->GetOutputArea().GetWidth() / SCRLRANGE;
+ else if ( ( (aMousePos.X()+pDragAndDropInfo->nSensibleRange) > pCurView->GetOutputArea().Right() ) && ( ( aMousePos.X() - pDragAndDropInfo->nSensibleRange ) < pCurView->GetOutputArea().Right() ) )
+ nScrollX = -( pCurView->GetOutputArea().GetWidth() / SCRLRANGE );
+
+ if ( ( (aMousePos.Y()-pDragAndDropInfo->nSensibleRange) < pCurView->GetOutputArea().Top() ) && ( ( aMousePos.Y() + pDragAndDropInfo->nSensibleRange ) > pCurView->GetOutputArea().Top() ) )
+ nScrollY = pCurView->GetOutputArea().GetHeight() / SCRLRANGE;
+ else if ( ( (aMousePos.Y()+pDragAndDropInfo->nSensibleRange) > pCurView->GetOutputArea().Bottom() ) && ( ( aMousePos.Y() - pDragAndDropInfo->nSensibleRange ) < pCurView->GetOutputArea().Bottom() ) )
+ nScrollY = -( pCurView->GetOutputArea().GetHeight() / SCRLRANGE );
+
+ if ( nScrollX || nScrollY )
+ {
+ HideDDCursor( pWindow );
+ pCurView->Scroll( nScrollX, nScrollY, RGCHK_PAPERSZ1 );
+ }
+ }
+
+ if ( !bInOutputArea )
+ {
+ HideDDCursor( pWindow );
+ return sal_False;
+ }
+
+ Point aDocPos( pCurView->pImpEditView->GetDocPos( aMousePos ) );
+ EditPaM aPaM = GetPaM( aDocPos );
+ pDragAndDropInfo->aDropDest = aPaM;
+ // Pruefen, ob der PaM in der Selektion liegt...
+ if ( pCurView->HasSelection() )
+ {
+ // es darf nicht in eine Selektion gedroppt werden
+ EPaM aP = CreateEPaM( aPaM );
+ ESelection aDestSel( aP.nPara, aP.nIndex, aP.nPara, aP.nIndex);
+ ESelection aCurSel = pCurView->GetSelection();
+ aCurSel.Adjust();
+ if ( !aDestSel.IsLess( aCurSel ) && !aDestSel.IsGreater( aCurSel ) )
+ {
+ HideDDCursor( pWindow );
+ return sal_False;
+ }
+ }
+
+ Rectangle aEditCursor = PaMtoEditCursor( aPaM );
+ Point aTopLeft( pCurView->pImpEditView->GetWindowPos( aEditCursor.TopLeft() ) );
+ aEditCursor.SetPos( aTopLeft );
+ aEditCursor.Right() = aEditCursor.Left() + pDragAndDropInfo->nCursorWidth;
+
+ aEditCursor = pWindow->LogicToPixel( aEditCursor );
+ aEditCursor = pWindow->PixelToLogic( aEditCursor );
+ sal_Bool bCursorChanged = !pDragAndDropInfo->bVisCursor || ( pDragAndDropInfo->aCurCursor != aEditCursor );
+
+ // Alten Cursor wegzeichnen...
+ if ( bCursorChanged )
+ {
+ HideDDCursor( pWindow );
+ ShowDDCursor( pWindow, aEditCursor );
+ }
+
+ return sal_True;
+}
+
+void ImpEditEngine::HideDDCursor( Window* pWin )
+{
+ if ( pDragAndDropInfo && pDragAndDropInfo->bVisCursor )
+ {
+ pWin->DrawOutDev( pDragAndDropInfo->aCurSavedCursor.TopLeft(), pDragAndDropInfo->aCurSavedCursor.GetSize(),
+ Point(0,0), pDragAndDropInfo->aCurSavedCursor.GetSize(), pDragAndDropInfo->aBackground );
+ pDragAndDropInfo->bVisCursor = sal_False;
+ }
+}
+
+void ImpEditEngine::ShowDDCursor( Window* pWin, const Rectangle& rRect )
+{
+ if ( !pDragAndDropInfo->bVisCursor )
+ {
+ Brush aOldBrush = pWin->GetFillInBrush( );
+ pWin->SetFillInBrush( Brush( Color( COL_GRAY), BRUSH_50 ) );
+
+ // Hintergrund sichern...
+ Rectangle aSaveRec( pWin->LogicToPixel( rRect ) );
+ // lieber etwas mehr sichern...
+ aSaveRec.Right() += 1;
+ aSaveRec.Bottom() += 1;
+
+ Size aNewSzPx( aSaveRec.GetSize() );
+ Size aCurSzPx( pDragAndDropInfo->aBackground.GetOutputSizePixel() );
+ if ( ( aCurSzPx.Width() < aNewSzPx.Width() ) ||( aCurSzPx.Height() < aNewSzPx.Height() ) )
+ {
+ sal_Bool bDone = pDragAndDropInfo->aBackground.SetOutputSizePixel( aNewSzPx );
+ DBG_ASSERT( bDone, "Virtuelles Device kaputt?" );
+ }
+
+ aSaveRec = pWin->PixelToLogic( aSaveRec );
+
+ MapMode aMapMode( pWin->GetMapMode() );
+ aMapMode.SetOrigin( Point( 0, 0 ) );
+ pDragAndDropInfo->aBackground.SetMapMode( aMapMode );
+ pDragAndDropInfo->aBackground.DrawOutDev( Point(0,0), aSaveRec.GetSize(),
+ aSaveRec.TopLeft(), aSaveRec.GetSize(), *pWin);
+ pDragAndDropInfo->aCurSavedCursor = aSaveRec;
+
+ // Cursor malen...
+ pWin->DrawRect( rRect );
+
+ pDragAndDropInfo->bVisCursor = sal_True;
+ pDragAndDropInfo->aCurCursor = rRect;
+
+ pWin->SetFillInBrush( aOldBrush );
+ }
+}
+
+ESelection ImpEditEngine::GetDropPos()
+{
+ ESelection aESel;
+ if ( pDragAndDropInfo && pDragAndDropInfo->aDropDest.GetNode() )
+ aESel = CreateESel( EditSelection( pDragAndDropInfo->aDropDest, pDragAndDropInfo->aDropDest ) );
+ return aESel;
+}
+
+void ImpEditEngine::SetFlatMode( sal_Bool bFlat )
+{
+ if ( bFlat != aStatus.UseCharAttribs() )
+ return;
+
+ if ( !bFlat )
+ aStatus.TurnOnFlags( EE_CNTRL_USECHARATTRIBS );
+ else
+ aStatus.TurnOffFlags( EE_CNTRL_USECHARATTRIBS );
+
+ aEditDoc.CreateDefFont( !bFlat );
+
+ FormatFullDoc();
+ UpdateViews( (EditView*) 0);
+ if ( pActiveView )
+ pActiveView->ShowCursor();
+}
+
+void ImpEditEngine::SetCharStretching( sal_uInt16 nX, sal_uInt16 nY )
+{
+ nStretchX = nX;
+ nStretchY = nY;
+ if ( aStatus.DoStretch() )
+ {
+ FormatFullDoc();
+ UpdateViews( GetActiveView() );
+ }
+}
+
+void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY )
+{
+ UndoActionStart( EDITUNDO_STRETCH );
+ sal_uInt16 nParas = GetEditDoc().Count();
+ for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ )
+ {
+ ContentNode* pNode = GetEditDoc()[nPara];
+ SfxItemSet aTmpSet( pNode->GetContentAttribs().GetItems() );
+
+ if ( nX != 100 )
+ {
+ // Fontbreite
+ const SvxFontWidthItem& rWidthItem =
+ (const SvxFontWidthItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_FONTWIDTH );
+ SvxFontWidthItem* pNewWidth = (SvxFontWidthItem*)rWidthItem.Clone();
+ sal_uInt32 nProp = pNewWidth->GetProp(); // sal_uInt32, kann temporaer gross werden
+ nProp *= nX;
+ nProp /= 100;
+ pNewWidth->SetProp( (sal_uInt16)nProp );
+ aTmpSet.Put( *pNewWidth );
+ delete pNewWidth;
+
+ // Kerning:
+ const SvxKerningItem& rKerningItem =
+ (const SvxKerningItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_KERNING );
+ SvxKerningItem* pNewKerning = (SvxKerningItem*)rKerningItem.Clone();
+ long nKerning = pNewKerning->GetValue();
+ if ( nKerning > 0 )
+ {
+ nKerning *= nX;
+ nKerning /= 100;
+ }
+ else if ( nKerning < 0 )
+ {
+ // Bei Negativen Werten:
+ // Bei Stretching > 100 muessen die Werte kleiner werden und umgekehrt.
+ nKerning *= 100;
+ nKerning /= nX;
+ }
+ pNewKerning->SetValue( (short)nKerning );
+ aTmpSet.Put( *pNewKerning);
+ delete pNewKerning;
+ }
+ else
+ aTmpSet.ClearItem( EE_CHAR_FONTWIDTH );
+
+ if ( nY != 100 )
+ {
+ // Fonthoehe
+ const SvxFontHeightItem& rHeightItem =
+ (const SvxFontHeightItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_FONTHEIGHT );
+ SvxFontHeightItem* pNewHeight = (SvxFontHeightItem*)rHeightItem.Clone();
+ sal_uInt32 nHeight = pNewHeight->GetHeight();
+ nHeight *= nY;
+ nHeight /= 100;
+ pNewHeight->SetHeightValue( nHeight );
+ aTmpSet.Put( *pNewHeight );
+ delete pNewHeight;
+
+ // Absatzabstaende
+ const SvxULSpaceItem& rULSpaceItem =
+ (const SvxULSpaceItem&)pNode->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
+ SvxULSpaceItem* pNewUL = (SvxULSpaceItem*)rULSpaceItem.Clone();
+ sal_uInt32 nUpper = pNewUL->GetUpper();
+ nUpper *= nY;
+ nUpper /= 100;
+ pNewUL->SetUpper( (sal_uInt16)nUpper );
+ sal_uInt32 nLower = pNewUL->GetLower();
+ nLower *= nY;
+ nLower /= 100;
+ pNewUL->SetLower( (sal_uInt16)nLower );
+ aTmpSet.Put( *pNewUL );
+ delete pNewUL;
+ }
+ else
+ aTmpSet.ClearItem( EE_CHAR_FONTHEIGHT );
+
+ SetParaAttribs( nPara, aTmpSet );
+
+ // harte Attribute:
+ sal_uInt16 nLastEnd = 0; // damit nach entfernen und neu nicht nochmal
+ CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs();
+ sal_uInt16 nAttribs = rAttribs.Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
+ {
+ EditCharAttrib* pAttr = rAttribs[nAttr];
+ if ( pAttr->GetStart() >= nLastEnd )
+ {
+ sal_uInt16 nWhich = pAttr->Which();
+ SfxPoolItem* pNew = 0;
+ if ( nWhich == EE_CHAR_FONTHEIGHT )
+ {
+ SvxFontHeightItem* pNewHeight = (SvxFontHeightItem*)pAttr->GetItem()->Clone();
+ sal_uInt32 nHeight = pNewHeight->GetHeight();
+ nHeight *= nY;
+ nHeight /= 100;
+ pNewHeight->SetHeightValue( nHeight );
+ pNew = pNewHeight;
+ }
+ else if ( nWhich == EE_CHAR_FONTWIDTH )
+ {
+ SvxFontWidthItem* pNewWidth = (SvxFontWidthItem*)pAttr->GetItem()->Clone();
+ sal_uInt32 nProp = pNewWidth->GetProp();
+ nProp *= nX;
+ nProp /= 100;
+ pNewWidth->SetProp( (sal_uInt16)nProp );
+ pNew = pNewWidth;
+ }
+ else if ( nWhich == EE_CHAR_KERNING )
+ {
+ SvxKerningItem* pNewKerning = (SvxKerningItem*)pAttr->GetItem()->Clone();
+ long nKerning = pNewKerning->GetValue();
+ if ( nKerning > 0 )
+ {
+ nKerning *= nX;
+ nKerning /= 100;
+ }
+ else if ( nKerning < 0 )
+ {
+ // Bei Negativen Werten:
+ // Bei Stretching > 100 muessen die Werte kleiner werden und umgekehrt.
+ nKerning *= 100;
+ nKerning /= nX;
+ }
+ pNewKerning->SetValue( (short)nKerning );
+ pNew = pNewKerning;
+ }
+ if ( pNew )
+ {
+ SfxItemSet aTmpSet( GetEmptyItemSet() );
+ aTmpSet.Put( *pNew );
+ SetAttribs( EditSelection( EditPaM( pNode, pAttr->GetStart() ),
+ EditPaM( pNode, pAttr->GetEnd() ) ), aTmpSet );
+
+ nLastEnd = pAttr->GetEnd();
+ delete pNew;
+ }
+ }
+ }
+ }
+ UndoActionEnd( EDITUNDO_STRETCH );
+}
+
+const SvxLRSpaceItem& ImpEditEngine::GetLRSpaceItem( ContentNode* pNode )
+{
+ // Wenn Outliner1, dann immer OUTLLR
+ // Wenn Outliner2, dann nur, wenn kein LRSpace
+ if ( aStatus.IsOutliner() ||
+ ( aStatus.IsOutliner2() && !pNode->GetContentAttribs().HasItem( EE_PARA_LRSPACE ) ) )
+ {
+ return (const SvxLRSpaceItem&)pNode->GetContentAttribs().GetItem( EE_PARA_OUTLLRSPACE );
+ }
+ return (const SvxLRSpaceItem&)pNode->GetContentAttribs().GetItem( EE_PARA_LRSPACE );
+}
+
+
+uno::Reference < text::XBreakIterator > ImpEditEngine::ImplGetBreakIterator()
+{
+ if ( !xBI.is() )
+ {
+ uno::Reference< lang::XMultiServiceFactory > xMSF = ::utl::getProcessServiceFactory();
+ uno::Reference < uno::XInterface > xI = xMSF->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.text.BreakIterator" ) );
+ if ( xI.is() )
+ {
+ uno::Any x = xI->queryInterface( ::getCppuType((const uno::Reference< text::XBreakIterator >*)0) );
+ x >>= xBI;
+ }
+ }
+ return xBI;
+}
diff --git a/svx/source/editeng/impedit4.cxx b/svx/source/editeng/impedit4.cxx
new file mode 100644
index 0000000000..d17953ba1a
--- /dev/null
+++ b/svx/source/editeng/impedit4.cxx
@@ -0,0 +1,2074 @@
+/*************************************************************************
+ *
+ * $RCSfile: impedit4.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#include <vcl/svapp.hxx>
+#pragma hdrstop
+
+#include <vcl/system.hxx>
+#include <srchitem.hxx>
+#include <lspcitem.hxx>
+#include <adjitem.hxx>
+#include <tstpitem.hxx>
+
+#include <eertfpar.hxx>
+#include <impedit.hxx>
+#include <editview.hxx>
+#include <eehtml.hxx>
+#include <editobj2.hxx>
+#include <tools/isolang.hxx>
+
+
+#include "akrnitem.hxx"
+#include "cntritem.hxx"
+#include "colritem.hxx"
+#include "crsditem.hxx"
+#include "escpitem.hxx"
+#include "fhgtitem.hxx"
+#include "fontitem.hxx"
+#include "kernitem.hxx"
+#include "lrspitem.hxx"
+#include "postitem.hxx"
+#include "shdditem.hxx"
+#include "udlnitem.hxx"
+#include "ulspitem.hxx"
+#include "wghtitem.hxx"
+
+#include <rtl/tencinfo.h>
+
+#ifndef SVX_LIGHT
+#include <edtspell.hxx>
+#endif
+
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.hxx>
+#endif
+#ifndef _SFX_SFXUNO_HXX
+#include <sfx2/sfxuno.hxx>
+#endif
+#ifndef _LINGU_LNGPROPS_HHX_
+#include <lingu/lngprops.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XTHESAURUS_HPP_
+#include <com/sun/star/linguistic/XThesaurus.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XMEANING_HPP_
+#include <com/sun/star/linguistic/XMeaning.hpp>
+#endif
+
+#ifndef _TXTCMP_HXX //autogen
+#include <svtools/txtcmp.hxx>
+#endif
+
+#ifndef _SV_HELP_HXX //autogen
+#include <vcl/help.hxx>
+#endif
+
+#include <svtools/rtfkeywd.hxx>
+
+using namespace ::com::sun::star;
+
+void lcl_MakeRTFString( XubString& rStr );
+
+void SwapUSHORTs( sal_uInt16& rX, sal_uInt16& rY )
+{
+ sal_uInt16 n = rX;
+ rX = rY;
+ rY = n;
+}
+
+EditPaM ImpEditEngine::Read( SvStream& rInput, EETextFormat eFormat, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs /* = NULL */ )
+{
+ sal_Bool bUpdate = GetUpdateMode();
+ SetUpdateMode( sal_False );
+ EditPaM aPaM;
+ if ( eFormat == EE_FORMAT_TEXT )
+ aPaM = ReadText( rInput, aSel );
+ else if ( eFormat == EE_FORMAT_RTF )
+ aPaM = ReadRTF( rInput, aSel );
+ else if ( eFormat == EE_FORMAT_HTML )
+ aPaM = ReadHTML( rInput, aSel, pHTTPHeaderAttrs );
+ else if ( eFormat == EE_FORMAT_BIN)
+ aPaM = ReadBin( rInput, aSel );
+ else
+ DBG_ERROR( "Read: Unbekanntes Format" );
+
+ FormatFullDoc(); // reicht vielleicht auch ein einfaches Format?
+ SetUpdateMode( bUpdate );
+
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::ReadText( SvStream& rInput, EditSelection aSel )
+{
+ if ( aSel.HasRange() )
+ aSel = ImpDeleteSelection( aSel );
+ EditPaM aPaM = aSel.Max();
+
+ XubString aTmpStr, aStr;
+ sal_Bool bDone = rInput.ReadByteStringLine( aTmpStr );
+ while ( bDone )
+ {
+ aTmpStr.Erase( MAXCHARSINPARA );
+ aPaM = ImpInsertText( EditSelection( aPaM, aPaM ), aTmpStr );
+ aPaM = ImpInsertParaBreak( aPaM );
+ bDone = rInput.ReadByteStringLine( aTmpStr );
+ }
+ return aPaM;
+}
+
+EditPaM ImpEditEngine::ReadRTF( SvStream& rInput, EditSelection aSel )
+{
+#ifndef SVX_LIGHT
+
+#if defined (EDITDEBUG) && !defined(MAC) && !defined( UNX )
+ SvFileStream aRTFOut( "d:\\rtfout.rtf", STREAM_WRITE );
+ aRTFOut << rInput;
+ aRTFOut.Close();
+ rInput.Seek( 0 );
+#endif
+ if ( aSel.HasRange() )
+ aSel = ImpDeleteSelection( aSel );
+
+ sal_Bool bCharsBeforeInsertPos = ( aSel.Min().GetIndex() ) ? sal_True : sal_False;
+ sal_Bool bCharsBehindInsertPos = ( aSel.Min().GetIndex() < aSel.Min().GetNode()->Len() ) ? sal_True : sal_False;
+
+ // Der SvRTF-Parser erwartet, dass das Which-Mapping am uebergebenen Pool,
+ // nicht an einem Secondary haengt.
+ SfxItemPool* pPool = &aEditDoc.GetItemPool();
+ while ( pPool->GetSecondaryPool() && !pPool->GetName().EqualsAscii( "EditEngineItemPool" ) )
+ {
+ pPool = pPool->GetSecondaryPool();
+
+ }
+ DBG_ASSERT( pPool && pPool->GetName().EqualsAscii( "EditEngineItemPool" ), "ReadRTF: Kein EditEnginePool!" );
+
+ EditRTFParserRef xPrsr = new EditRTFParser( rInput, aSel, *pPool, this );
+ SvParserState eState = xPrsr->CallParser();
+ if ( ( eState != SVPAR_ACCEPTED ) && ( !rInput.GetError() ) )
+ {
+ rInput.SetError( EE_READWRITE_WRONGFORMAT );
+ return aSel.Min();
+ }
+ return xPrsr->GetCurPaM();
+#else
+ return EditPaM();
+#endif
+}
+
+EditPaM ImpEditEngine::ReadHTML( SvStream& rInput, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs )
+{
+#ifndef SVX_LIGHT
+
+ if ( aSel.HasRange() )
+ aSel = ImpDeleteSelection( aSel );
+
+ sal_Bool bCharsBeforeInsertPos = ( aSel.Min().GetIndex() ) ? sal_True : sal_False;
+ sal_Bool bCharsBehindInsertPos = ( aSel.Min().GetIndex() < aSel.Min().GetNode()->Len() ) ? sal_True : sal_False;
+
+ EditHTMLParserRef xPrsr = new EditHTMLParser( rInput, pHTTPHeaderAttrs );
+ SvParserState eState = xPrsr->CallParser( this, aSel.Max() );
+ if ( ( eState != SVPAR_ACCEPTED ) && ( !rInput.GetError() ) )
+ {
+ rInput.SetError( EE_READWRITE_WRONGFORMAT );
+ return aSel.Min();
+ }
+ return xPrsr->GetCurSelection().Max();
+#else
+ return EditPaM();
+#endif
+}
+
+EditPaM ImpEditEngine::ReadBin( SvStream& rInput, EditSelection aSel )
+{
+ // Einfach ein temporaeres TextObject missbrauchen...
+ EditTextObject* pObj = EditTextObject::Create( rInput, NULL );
+
+ EditPaM aLastPaM = aSel.Max();
+ if ( pObj )
+ aLastPaM = InsertText( *pObj, aSel ).Max();
+
+ delete pObj;
+ return aLastPaM;
+}
+
+
+void ImpEditEngine::Write( SvStream& rOutput, EETextFormat eFormat, EditSelection aSel )
+{
+ if ( !rOutput.IsWritable() )
+ rOutput.SetError( SVSTREAM_WRITE_ERROR );
+
+ if ( !rOutput.GetError() )
+ {
+ if ( eFormat == EE_FORMAT_TEXT )
+ WriteText( rOutput, aSel );
+ else if ( eFormat == EE_FORMAT_RTF )
+ WriteRTF( rOutput, aSel );
+ else if ( eFormat == EE_FORMAT_HTML )
+ WriteHTML( rOutput, aSel );
+ else if ( eFormat == EE_FORMAT_BIN)
+ WriteBin( rOutput, aSel );
+ else
+ DBG_ERROR( "Write: Unbekanntes Format" );
+ }
+}
+
+sal_uInt32 ImpEditEngine::WriteText( SvStream& rOutput, EditSelection aSel )
+{
+ sal_uInt16 nStartNode, nEndNode;
+ EditSelection aTmpSel;
+
+ sal_Bool bRange = aSel.HasRange();
+ if ( bRange )
+ {
+ aSel.Adjust( aEditDoc );
+ nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+ }
+ else
+ {
+ nStartNode = 0;
+ nEndNode = aEditDoc.Count()-1;
+ }
+
+ // ueber die Absaetze iterieren...
+ for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ {
+ ContentNode* pNode = aEditDoc.GetObject( nNode );
+ DBG_ASSERT( pNode, "Node nicht gefunden: Search&Replace" );
+
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = pNode->Len();
+ if ( bRange )
+ {
+ if ( nNode == nStartNode )
+ nStartPos = aSel.Min().GetIndex();
+ if ( nNode == nEndNode ) // kann auch == nStart sein!
+ nEndPos = aSel.Max().GetIndex();
+ }
+ XubString aTmpStr = aEditDoc.GetParaAsString( pNode, nStartPos, nEndPos );
+ rOutput.WriteByteStringLine( aTmpStr );
+ }
+
+ return rOutput.GetError();
+}
+
+sal_Bool ImpEditEngine::WriteItemListAsRTF( ItemList& rLst, SvStream& rOutput, sal_uInt16 nPara, sal_uInt16 nPos,
+ SvxFontTable& rFontTable, SvxColorList& rColorList )
+{
+ const SfxPoolItem* pAttrItem = rLst.First();
+ while ( pAttrItem )
+ {
+ WriteItemAsRTF( *pAttrItem, rOutput, nPara, nPos,rFontTable, rColorList );
+ pAttrItem = rLst.Next();
+ }
+ return ( rLst.Count() ? sal_True : sal_False );
+}
+
+void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex, sal_Bool bStartAtPos )
+{
+ sal_uInt16 nAttr = 0;
+ EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ while ( pAttr && ( pAttr->GetStart() <= nIndex ) )
+ {
+ // Start wird in While ueberprueft...
+ if ( pAttr->GetEnd() > nIndex )
+ {
+ if ( !bStartAtPos || ( pAttr->GetStart() == nIndex) )
+ rLst.Insert( pAttr->GetItem(), LIST_APPEND );
+ }
+ nAttr++;
+ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ }
+}
+
+sal_uInt32 ImpEditEngine::WriteBin( SvStream& rOutput, EditSelection aSel ) const
+{
+ // Einfach ein temporaeres TextObject missbrauchen...
+ // Hier aber nicht den globalen Pool verwenden:
+ SfxItemPool* pGlblPool = pTextObjectPool;
+ ((ImpEditEngine*)this)->pTextObjectPool = NULL;
+ BinTextObject* pObj = (BinTextObject*)CreateBinTextObject( aSel );
+ ((ImpEditEngine*)this)->pTextObjectPool = pGlblPool;
+ pObj->Store( rOutput );
+ delete pObj;
+ return 0;
+}
+
+sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
+{
+#ifndef SVX_LIGHT
+ DBG_ASSERT( GetUpdateMode(), "WriteRTF bei UpdateMode = sal_False!" );
+ CheckIdleFormatter();
+ if ( !IsFormatted() )
+ FormatDoc();
+
+ sal_uInt16 nStartNode, nEndNode;
+ EditSelection aTmpSel;
+
+ aSel.Adjust( aEditDoc );
+
+ nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+
+ // RTF-Vorspann...
+ rOutput << '{' ;
+
+ rOutput << sRTF_RTF;
+
+#ifndef MAC
+ rOutput << sRTF_ANSI;
+ rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252;
+#else
+ rOutput << sRTF_MAC;
+ rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_APPLE_ROMAN;
+#endif
+
+ // Fonttabelle erzeugen und rausschreiben...
+ SvxFontTable aFontTable;
+ // DefaultFont muss ganz vorne stehen, damit DEF-Font im RTF
+ aFontTable.Insert( 0, new SvxFontItem( (const SvxFontItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_FONTINFO ) ) );
+ sal_uInt16 i = 0;
+ SvxFontItem* pFontItem = (SvxFontItem*)aEditDoc.GetItemPool().GetItem( EE_CHAR_FONTINFO, i );
+ while ( pFontItem )
+ {
+ // i+1, da Default-Font an Stelle 0.
+ aFontTable.Insert( (sal_uInt32)i+1, new SvxFontItem( *pFontItem ) );
+ pFontItem = (SvxFontItem*)aEditDoc.GetItemPool().GetItem( EE_CHAR_FONTINFO, ++i );
+ }
+
+ rOutput << endl << '{' << sRTF_FONTTBL;
+ sal_uInt16 j;
+ for ( j = 0; j < aFontTable.Count(); j++ )
+ {
+ pFontItem = aFontTable.Get( j );
+ rOutput << '{';
+ rOutput << sRTF_F;
+ rOutput.WriteNumber( j );
+ switch ( pFontItem->GetFamily() )
+ {
+ case FAMILY_DONTKNOW: rOutput << sRTF_FNIL;
+ break;
+ case FAMILY_DECORATIVE: rOutput << sRTF_FDECOR;
+ break;
+ case FAMILY_MODERN: rOutput << sRTF_FMODERN;
+ break;
+ case FAMILY_ROMAN: rOutput << sRTF_FROMAN;
+ break;
+ case FAMILY_SCRIPT: rOutput << sRTF_FSCRIPT;
+ break;
+ case FAMILY_SWISS: rOutput << sRTF_FSWISS;
+ break;
+ }
+ rOutput << sRTF_FPRQ;
+ sal_uInt16 nVal = 0;
+ switch( pFontItem->GetPitch() )
+ {
+ case PITCH_FIXED: nVal = 1; break;
+ case PITCH_VARIABLE: nVal = 2; break;
+ }
+ rOutput.WriteNumber( nVal );
+
+ CharSet eChrSet = pFontItem->GetCharSet();
+ DBG_ASSERT( eChrSet != 9, "SystemCharSet?!" );
+ if( RTL_TEXTENCODING_DONTKNOW == eChrSet )
+ eChrSet = gsl_getSystemTextEncoding();
+ rOutput << sRTF_FCHARSET;
+ rOutput.WriteNumber( rtl_getBestWindowsCharsetFromTextEncoding( eChrSet ) );
+
+ rOutput << ' ';
+ rOutput << ByteString( pFontItem->GetFamilyName(), eChrSet ).GetBuffer();
+ rOutput << ";}";
+ }
+ rOutput << '}';
+ rOutput << endl;
+
+ // ColorList rausschreiben...
+ SvxColorList aColorList;
+ i = 0;
+ SvxColorItem* pColorItem = (SvxColorItem*)aEditDoc.GetItemPool().GetItem( EE_CHAR_COLOR, i );
+ while ( pColorItem )
+ {
+ aColorList.Insert( new SvxColorItem( *pColorItem ), (sal_uInt32)i );
+ pColorItem = (SvxColorItem*)aEditDoc.GetItemPool().GetItem( EE_CHAR_COLOR, ++i );
+ }
+ aColorList.Insert( new SvxColorItem( (const SvxColorItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_COLOR) ), (sal_uInt32)i );
+
+ rOutput << '{' << sRTF_COLORTBL;
+ for ( j = 0; j < aColorList.Count(); j++ )
+ {
+ pColorItem = aColorList.GetObject( j );
+ rOutput << sRTF_RED;
+ rOutput.WriteNumber( pColorItem->GetValue().GetRed() );
+ rOutput << sRTF_GREEN;
+ rOutput.WriteNumber( pColorItem->GetValue().GetGreen() );
+ rOutput << sRTF_BLUE;
+ rOutput.WriteNumber( pColorItem->GetValue().GetBlue() );
+ rOutput << ';';
+ }
+ rOutput << '}';
+ rOutput << endl;
+
+ // StyleSheets...
+ if ( GetStyleSheetPool() )
+ {
+ sal_uInt16 nStyles = (sal_uInt16)GetStyleSheetPool()->GetStyles().Count();
+ if ( nStyles )
+ {
+ rOutput << '{' << sRTF_STYLESHEET;
+
+ for ( sal_uInt16 nStyle = 0; nStyle < nStyles; nStyle++ )
+ {
+
+ SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->GetStyles().GetObject( nStyle );
+
+ rOutput << endl << '{' << sRTF_S;
+ sal_uInt16 nNumber = (sal_uInt16) (nStyle + 1);
+ rOutput.WriteNumber( nNumber );
+
+ // Attribute, auch aus Parent!
+ for ( sal_uInt16 nParAttr = EE_PARA_START; nParAttr <= EE_CHAR_END; nParAttr++ )
+ {
+ if ( pStyle->GetItemSet().GetItemState( nParAttr ) == SFX_ITEM_ON )
+ {
+ const SfxPoolItem& rItem = pStyle->GetItemSet().Get( nParAttr );
+ WriteItemAsRTF( rItem, rOutput, 0, 0, aFontTable, aColorList );
+ }
+ }
+
+ // Parent...(nur wenn noetig)
+ if ( pStyle->GetParent().Len() && ( pStyle->GetParent() != pStyle->GetName() ) )
+ {
+ SfxStyleSheet* pParent = (SfxStyleSheet*)GetStyleSheetPool()->Find( pStyle->GetParent(), pStyle->GetFamily() );
+ DBG_ASSERT( pParent, "Parent nicht gefunden!" );
+ rOutput << sRTF_SBASEDON;
+ nNumber = (sal_uInt16) GetStyleSheetPool()->GetStyles().GetPos( pParent ) + 1;
+ rOutput.WriteNumber( nNumber );
+ }
+
+ // Folgevorlage...(immer)
+ SfxStyleSheet* pNext = pStyle;
+ if ( pStyle->GetFollow().Len() && ( pStyle->GetFollow() != pStyle->GetName() ) )
+ pNext = (SfxStyleSheet*)GetStyleSheetPool()->Find( pStyle->GetFollow(), pStyle->GetFamily() );
+
+ DBG_ASSERT( pNext, "Naechsten nicht gefunden!" );
+ rOutput << sRTF_SNEXT;
+ nNumber = (sal_uInt16) GetStyleSheetPool()->GetStyles().GetPos( pNext ) + 1;
+ rOutput.WriteNumber( nNumber );
+
+ // Namen der Vorlage...
+ rOutput << " " << ByteString( pStyle->GetName(), eDestEnc ).GetBuffer();
+ rOutput << ";}";
+ }
+ rOutput << '}';
+ rOutput << endl;
+ }
+ }
+
+ // Die Pool-Defaults vorweg schreiben...
+ rOutput << '{' << sRTF_IGNORE << "\\EditEnginePoolDefaults";
+ for ( sal_uInt16 nPoolDefItem = EE_PARA_START; nPoolDefItem <= EE_CHAR_END; nPoolDefItem++)
+ {
+ const SfxPoolItem& rItem = aEditDoc.GetItemPool().GetDefaultItem( nPoolDefItem );
+ WriteItemAsRTF( rItem, rOutput, 0, 0, aFontTable, aColorList );
+ }
+ rOutput << '}' << endl;
+
+ // Def-Hoehe vorweg, da sonst 12Pt
+ // Doch nicht, onst in jedem Absatz hart!
+ // SfxItemSet aTmpSet( GetEmptyItemSet() );
+ // const SvxFontHeightItem& rDefFontHeight = (const SvxFontHeightItem&)aTmpSet.Get( EE_CHAR_FONTHEIGHT );
+ // WriteItemAsRTF( rDefFontHeight, rOutput, aFontTable, aColorList );
+ // rOutput << '{' << sRTF_IGNORE << "\\EditEnginePoolDefaultHeight}" << endl;
+
+ // DefTab:
+ MapMode aTwpMode( MAP_TWIP );
+ sal_uInt16 nDefTabTwps = (sal_uInt16) GetRefDevice()->LogicToLogic(
+ Point( aEditDoc.GetDefTab(), 0 ),
+ &GetRefMapMode(), &aTwpMode ).X();
+ rOutput << sRTF_DEFTAB;
+ rOutput.WriteNumber( nDefTabTwps );
+ rOutput << endl;
+
+ // ueber die Absaetze iterieren...
+ rOutput << '{' << endl;
+ for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ {
+ ContentNode* pNode = aEditDoc.SaveGetObject( nNode );
+ DBG_ASSERT( pNode, "Node nicht gefunden: Search&Replace" );
+
+ // Die Absatzattribute vorweg...
+ sal_Bool bAttr = sal_False;
+
+ // Vorlage ?
+ if ( pNode->GetStyleSheet() )
+ {
+ // Nummer der Vorlage
+ rOutput << sRTF_S;
+ sal_uInt16 nNumber = (sal_uInt16) GetStyleSheetPool()->GetStyles().GetPos( pNode->GetStyleSheet() ) + 1;
+ rOutput.WriteNumber( nNumber );
+
+ // Alle Attribute
+ // Attribute, auch aus Parent!
+ for ( sal_uInt16 nParAttr = EE_PARA_START; nParAttr <= EE_CHAR_END; nParAttr++ )
+ {
+ if ( pNode->GetStyleSheet()->GetItemSet().GetItemState( nParAttr ) == SFX_ITEM_ON )
+ {
+ const SfxPoolItem& rItem = pNode->GetStyleSheet()->GetItemSet().Get( nParAttr );
+ WriteItemAsRTF( rItem, rOutput, nNode, 0, aFontTable, aColorList );
+ bAttr = sal_True;
+ }
+ }
+ }
+
+ for ( sal_uInt16 nParAttr = EE_PARA_START; nParAttr <= EE_CHAR_END; nParAttr++ )
+ {
+// const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nParAttr );
+ // Jetzt, wo StyleSheet-Verarbeitung, nur noch harte Absatzattribute!
+ if ( pNode->GetContentAttribs().GetItems().GetItemState( nParAttr ) == SFX_ITEM_ON )
+ {
+ const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItems().Get( nParAttr );
+ WriteItemAsRTF( rItem, rOutput, nNode, 0, aFontTable, aColorList );
+ bAttr = sal_True;
+ }
+ }
+ if ( bAttr )
+ rOutput << ' '; // Separator
+
+ ItemList aAttribItems;
+ ParaPortion* pParaPortion = FindParaPortion( pNode );
+ DBG_ASSERT( pParaPortion, "Portion nicht gefunden: WriteRTF" );
+
+ sal_uInt16 nIndex = 0;
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = pNode->Len();
+ sal_uInt16 nStartPortion = 0;
+ sal_uInt16 nEndPortion = (sal_uInt16)pParaPortion->GetTextPortions().Count() - 1;
+ sal_Bool bFinishPortion = sal_False;
+ sal_uInt16 nPortionStart;
+
+ if ( nNode == nStartNode )
+ {
+ nStartPos = aSel.Min().GetIndex();
+ nStartPortion = pParaPortion->GetTextPortions().FindPortion( nStartPos, nPortionStart );
+ if ( nStartPos != 0 )
+ {
+ aAttribItems.Clear();
+ lcl_FindValidAttribs( aAttribItems, pNode, nStartPos, sal_False );
+ if ( aAttribItems.Count() )
+ {
+ // Diese Attribute duerfen nicht fuer den gesamten
+ // Absatz gelten:
+ rOutput << '{';
+ WriteItemListAsRTF( aAttribItems, rOutput, nNode, nStartPos, aFontTable, aColorList );
+ bFinishPortion = sal_True;
+ }
+ aAttribItems.Clear();
+ }
+ }
+ if ( nNode == nEndNode ) // kann auch == nStart sein!
+ {
+ nEndPos = aSel.Max().GetIndex();
+ nEndPortion = pParaPortion->GetTextPortions().FindPortion( nEndPos, nPortionStart );
+ }
+
+ EditCharAttrib* pNextFeature = pNode->GetCharAttribs().FindFeature( nIndex );
+ // Bei 0 anfangen, damit der Index richtig ist...
+ for ( sal_uInt16 n = 0; n <= nEndPortion; n++ )
+ {
+ TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject(n);
+ if ( n < nStartPortion )
+ {
+ nIndex += pTextPortion->GetLen();
+ continue;
+ }
+
+ if ( pNextFeature && ( pNextFeature->GetStart() == nIndex ) )
+ {
+ WriteItemAsRTF( *pNextFeature->GetItem(), rOutput, nNode, nIndex, aFontTable, aColorList );
+ pNextFeature = pNode->GetCharAttribs().FindFeature( pNextFeature->GetStart() + 1 );
+ }
+ else
+ {
+ // Attribute !!!
+ // Eine Portion kann auch durch einen Zeilenumbruch
+ // entstanden sein, dann brauch ich keine neuen Attribute schreiben...
+ aAttribItems.Clear();
+ lcl_FindValidAttribs( aAttribItems, pNode, nIndex, sal_False );
+ rOutput << '{';
+ if ( WriteItemListAsRTF( aAttribItems, rOutput, nNode, nIndex, aFontTable, aColorList ) )
+ rOutput << ' ';
+ XubString aTmpStr( *pNode, nIndex, pTextPortion->GetLen() );
+ if ( ( n == nStartPortion ) && nStartPos )
+ {
+ aTmpStr.Erase( 0, nStartPos - nIndex );
+ }
+ if ( ( n == nEndPortion ) && ( nEndPos != pNode->Len() ) )
+ {
+ sal_uInt16 nLen = pTextPortion->GetLen();
+ sal_uInt16 nDelChars = nIndex+nLen-nEndPos;
+ aTmpStr.Erase( aTmpStr.Len()-nDelChars, nDelChars );
+ }
+ lcl_MakeRTFString( aTmpStr );
+ rOutput << ByteString( aTmpStr, eDestEnc ).GetBuffer();
+ rOutput << '}';
+ }
+ if ( bFinishPortion )
+ {
+ rOutput << '}';
+ bFinishPortion = sal_False;
+ }
+
+ nIndex += pTextPortion->GetLen();
+ }
+
+ rOutput << sRTF_PAR << sRTF_PARD << sRTF_PLAIN;
+ rOutput << endl;
+ }
+ // RTF-Nachspann...
+ rOutput << "}}"; // 1xKlammerung Absaetze, 1x Klammerung RTF-Dokument
+ rOutput.Flush();
+
+
+ return rOutput.GetError();
+#else
+ return 0;
+#endif
+}
+
+
+void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput, sal_uInt16 nPara, sal_uInt16 nPos,
+ SvxFontTable& rFontTable, SvxColorList& rColorList )
+{
+ sal_uInt16 nWhich = rItem.Which();
+ switch ( nWhich )
+ {
+ case EE_PARA_OUTLLEVEL:
+ {
+ rOutput << "\\level";
+ sal_uInt16 nLevel = ((const SfxUInt16Item&)rItem).GetValue();
+ rOutput.WriteNumber( nLevel );
+ }
+ break;
+ case EE_PARA_OUTLLRSPACE:
+ case EE_PARA_LRSPACE:
+ {
+ rOutput << sRTF_FI;
+ short nTxtFirst = ((const SvxLRSpaceItem&)rItem).GetTxtFirstLineOfst();
+ nTxtFirst = (short)LogicToTwips( nTxtFirst );
+ rOutput.WriteNumber( nTxtFirst );
+ rOutput << sRTF_LI;
+ sal_uInt16 nTxtLeft = ((const SvxLRSpaceItem&)rItem).GetTxtLeft();
+ nTxtLeft = (sal_uInt16)LogicToTwips( nTxtLeft );
+ rOutput.WriteNumber( nTxtLeft );
+ rOutput << sRTF_RI;
+ sal_uInt32 nTxtRight = ((const SvxLRSpaceItem&)rItem).GetRight();
+ nTxtRight = LogicToTwips( nTxtRight);
+ rOutput.WriteNumber( nTxtRight );
+ }
+ break;
+ case EE_PARA_ULSPACE:
+ {
+ rOutput << sRTF_SB;
+ sal_uInt16 nUpper = ((const SvxULSpaceItem&)rItem).GetUpper();
+ nUpper = (sal_uInt16)LogicToTwips( nUpper );
+ rOutput.WriteNumber( nUpper );
+ rOutput << sRTF_SA;
+ sal_uInt16 nLower = ((const SvxULSpaceItem&)rItem).GetLower();
+ nLower = (sal_uInt16)LogicToTwips( nLower );
+ rOutput.WriteNumber( nLower );
+ }
+ break;
+ case EE_PARA_SBL:
+ {
+ rOutput << sRTF_SL;
+ long nVal = ((const SvxLineSpacingItem&)rItem).GetLineHeight();
+ if ( ((const SvxLineSpacingItem&)rItem).GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
+ {
+ // Woher kriege ich jetzt den Wert?
+ // Der SwRTF-Parser geht von einem 240er Font aus!
+ nVal = ((const SvxLineSpacingItem&)rItem).GetPropLineSpace();
+ nVal *= 240;
+ nVal /= 100;
+ }
+ rOutput.WriteNumber( nVal );
+ }
+ break;
+ case EE_PARA_JUST:
+ {
+ SvxAdjust eJustification = ((const SvxAdjustItem&)rItem).GetAdjust();
+ switch ( eJustification )
+ {
+ case SVX_ADJUST_CENTER: rOutput << sRTF_QC;
+ break;
+ case SVX_ADJUST_RIGHT: rOutput << sRTF_QR;
+ break;
+ default: rOutput << sRTF_QL;
+ break;
+ }
+ }
+ break;
+ case EE_PARA_TABS:
+ {
+ const SvxTabStopItem& rTabs = (const SvxTabStopItem&) rItem;
+ for ( sal_uInt16 i = 0; i < rTabs.Count(); i++ )
+ {
+ const SvxTabStop& rTab = rTabs[i];
+ rOutput << sRTF_TX;
+ rOutput.WriteNumber( LogicToTwips( rTab.GetTabPos() ) );
+ }
+ }
+ break;
+ case EE_CHAR_COLOR:
+ {
+ sal_uInt32 n = rColorList.GetId( (const SvxColorItem&)rItem );
+ rOutput << sRTF_CF;
+ rOutput.WriteNumber( n );
+ }
+ break;
+ case EE_CHAR_FONTINFO:
+ {
+ sal_uInt32 n = rFontTable.GetId( (const SvxFontItem&)rItem );
+ rOutput << sRTF_F;
+ rOutput.WriteNumber( n );
+ }
+ break;
+ case EE_CHAR_FONTHEIGHT:
+ {
+ rOutput << sRTF_FS;
+ long nHeight = ((const SvxFontHeightItem&)rItem).GetHeight();
+ nHeight = LogicToTwips( nHeight );
+ // Twips => HalfPoints
+ nHeight /= 10;
+ rOutput.WriteNumber( nHeight );
+ }
+ break;
+ case EE_CHAR_WEIGHT:
+ {
+ FontWeight e = ((const SvxWeightItem&)rItem).GetWeight();
+ switch ( e )
+ {
+ case WEIGHT_BOLD: rOutput << sRTF_B; break;
+ default: rOutput << sRTF_B << '0'; break;
+ }
+ }
+ break;
+ case EE_CHAR_UNDERLINE:
+ {
+ // muesste bei WordLineMode ggf. ulw werden,
+ // aber die Information fehlt hier
+ FontUnderline e = ((const SvxUnderlineItem&)rItem).GetUnderline();
+ switch ( e )
+ {
+ case UNDERLINE_NONE: rOutput << sRTF_ULNONE; break;
+ case UNDERLINE_SINGLE: rOutput << sRTF_UL; break;
+ case UNDERLINE_DOUBLE: rOutput << sRTF_ULDB; break;
+ case UNDERLINE_DOTTED: rOutput << sRTF_ULD; break;
+ }
+ }
+ break;
+ case EE_CHAR_STRIKEOUT:
+ {
+ FontStrikeout e = ((const SvxCrossedOutItem&)rItem).GetStrikeout();
+ switch ( e )
+ {
+ case STRIKEOUT_SINGLE:
+ case STRIKEOUT_DOUBLE: rOutput << sRTF_STRIKE; break;
+ case STRIKEOUT_NONE: rOutput << sRTF_STRIKE << '0'; break;
+ }
+ }
+ break;
+ case EE_CHAR_ITALIC:
+ {
+ FontItalic e = ((const SvxPostureItem&)rItem).GetPosture();
+ switch ( e )
+ {
+ case ITALIC_OBLIQUE:
+ case ITALIC_NORMAL: rOutput << sRTF_I; break;
+ case ITALIC_NONE: rOutput << sRTF_I << '0'; break;
+ }
+ }
+ break;
+ case EE_CHAR_OUTLINE:
+ {
+ rOutput << sRTF_OUTL;
+ if ( ((const SvxContourItem&)rItem).GetValue() == 0 )
+ rOutput << '0';
+ }
+ break;
+ case EE_CHAR_SHADOW:
+ {
+ rOutput << sRTF_SHAD;
+ if ( ((const SvxShadowedItem&)rItem).GetValue() == 0 )
+ rOutput << '0';
+ }
+ break;
+ case EE_FEATURE_TAB:
+ {
+ rOutput << sRTF_TAB;
+ }
+ break;
+ case EE_FEATURE_LINEBR:
+ {
+ rOutput << sRTF_SL;
+ }
+ break;
+ case EE_CHAR_KERNING:
+ {
+ rOutput << sRTF_EXPNDTW;
+ rOutput.WriteNumber( LogicToTwips(
+ ((const SvxKerningItem&)rItem).GetValue() ) );
+ }
+ break;
+ case EE_CHAR_PAIRKERNING:
+ {
+ rOutput << sRTF_KERNING;
+ rOutput.WriteNumber( ((const SvxAutoKernItem&)rItem).GetValue() ? 1 : 0 );
+ }
+ break;
+ case EE_CHAR_ESCAPEMENT:
+ {
+ SvxFont aFont;
+ ContentNode* pNode = aEditDoc.GetObject( nPara );
+ SeekCursor( pNode, nPos, aFont );
+ MapMode aPntMode( MAP_POINT );
+ long nFontHeight = GetRefDevice()->LogicToLogic(
+ aFont.GetSize(), &GetRefMapMode(), &aPntMode ).Height();
+ nFontHeight *=2; // HalfPoints
+ sal_uInt16 nProp = ((const SvxEscapementItem&)rItem).GetProp();
+ sal_uInt16 nProp100 = nProp*100; // Fuer SWG-Token Prop in 100tel Prozent.
+ short nEsc = ((const SvxEscapementItem&)rItem).GetEsc();
+ if ( nEsc == DFLT_ESC_AUTO_SUPER )
+ {
+ nEsc = 100 - nProp;
+ nProp100++; // Eine 1 hinten bedeutet 'automatisch'.
+ }
+ else if ( nEsc == DFLT_ESC_AUTO_SUB )
+ {
+ nEsc = -( 100 - nProp );
+ nProp100++;
+ }
+ // SWG:
+ if ( nEsc )
+ rOutput << "{\\*\\updnprop" << ByteString::CreateFromInt32( nProp100 ).GetBuffer() << '}';
+ long nUpDown = nFontHeight * Abs( nEsc ) / 100;
+ ByteString aUpDown = ByteString::CreateFromInt32( nUpDown );
+ if ( nEsc < 0 )
+ rOutput << sRTF_DN << aUpDown.GetBuffer();
+ else if ( nEsc > 0 )
+ rOutput << sRTF_UP << aUpDown.GetBuffer();
+ }
+ break;
+ }
+}
+
+void lcl_MakeRTFString( XubString& rStr )
+{
+ for ( sal_uInt16 i = 0; i < rStr.Len(); i++ )
+ {
+ switch( rStr.GetChar(i) )
+ {
+ case '\\':
+ case '}':
+ case '{':
+ {
+ rStr.Insert( '\\', i );
+ i++;
+ }
+ break;
+ }
+ }
+}
+
+sal_uInt32 ImpEditEngine::WriteHTML( SvStream& rOutput, EditSelection aSel )
+{
+ return 0;
+/*
+ // Das hier ist erstmal das grobe Geruest vom RTF...
+ // Noch klaeren:
+ // - Wann Absaetze aufmachen?
+ // - Attribute beenden
+
+ DBG_ASSERT( GetUpdateMode(), "WriteHTML bei UpdateMode = sal_False!" );
+ CheckIdleFormatter();
+ if ( !IsFormatted() )
+ FormatDoc();
+
+ sal_uInt16 nStartNode, nEndNode;
+ EditSelection aTmpSel;
+
+ aSel.Adjust( aEditDoc );
+
+ nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+
+ // Vorspann...
+ // ..............
+
+ // ueber die Absaetze iterieren...
+ for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ {
+ ContentNode* pNode = aEditDoc.SaveGetObject( nNode );
+ DBG_ASSERT( pNode, "Node nicht gefunden: Search&Replace" );
+
+ // Die Absatzattribute vorweg...
+ // .....
+
+ // Vorlage ?
+ // ....
+ if ( pNode->GetStyleSheet() )
+ {
+ // Hx, PRE oder anderes StyleSheet
+ // .............
+ }
+ for ( sal_uInt16 nParAttr = EE_ITEMS_START; nParAttr <= EE_CHAR_END; nParAttr++ )
+ {
+ // ...
+ }
+
+ ItemList aAttribItems;
+ ParaPortion* pParaPortion = FindParaPortion( pNode );
+ DBG_ASSERT( pParaPortion, "Portion nicht gefunden: WriteRTF" );
+
+ sal_uInt16 nIndex = 0;
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = pNode->Len();
+ sal_uInt16 nStartPortion = 0;
+ sal_uInt16 nEndPortion = (sal_uInt16)pParaPortion->GetTextPortions().Count() - 1;
+ sal_Bool bFinishPortion = sal_False;
+ sal_uInt16 nPortionStart;
+
+ if ( nNode == nStartNode )
+ {
+ nStartPos = aSel.Min().GetIndex();
+ nStartPortion = pParaPortion->GetTextPortions().FindPortion( nStartPos, nPortionStart );
+ if ( nStartPos != 0 )
+ {
+ aAttribItems.Clear();
+ lcl_FindValidAttribs( aAttribItems, pNode, nStartPos, sal_False );
+ if ( aAttribItems.Count() )
+ {
+ // Diese Attribute duerfen nicht fuer den gesamten
+ // Absatz gelten:
+ // .....
+ }
+ aAttribItems.Clear();
+ }
+ }
+ if ( nNode == nEndNode ) // kann auch == nStart sein!
+ {
+ nEndPos = aSel.Max().GetIndex();
+ nEndPortion = pParaPortion->GetTextPortions().FindPortion( nEndPos, nPortionStart );
+ }
+
+ EditCharAttrib* pNextFeature = pNode->GetCharAttribs().FindFeature( nIndex );
+ // Bei 0 anfangen, damit der Index richtig ist...
+ for ( sal_uInt16 n = 0; n <= nEndPortion; n++ )
+ {
+ TextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject(n);
+ if ( n < nStartPortion )
+ {
+ nIndex += pTextPortion->GetLen();
+ continue;
+ }
+
+ if ( pNextFeature && ( pNextFeature->GetStart() == nIndex ) )
+ {
+ // .. Feature rausschreiben => TAB, ...
+ pNextFeature = pNode->GetCharAttribs().FindFeature( pNextFeature->GetStart() + 1 );
+ }
+ else
+ {
+ // Attribute !!!
+ // Eine Portion kann auch durch einen Zeilenumbruch
+ // entstanden sein, dann brauch ich keine neuen Attribute schreiben...
+ aAttribItems.Clear();
+ lcl_FindValidAttribs( aAttribItems, pNode, nIndex, sal_False );
+ // Items schreiben...
+ XubString aTmpStr( *pNode, nIndex, pTextPortion->GetLen() );
+ if ( ( n == nStartPortion ) && nStartPos )
+ {
+ aTmpStr.Cut( 0, nStartPos - nIndex );
+ }
+ if ( ( n == nEndPortion ) && ( nEndPos != pNode->Len() ) )
+ {
+ sal_uInt16 nLen = pTextPortion->GetLen();
+ sal_uInt16 nDelChars = nIndex+nLen-nEndPos;
+ aTmpStr.Cut( aTmpStr.Len()-nDelChars, nDelChars );
+ }
+ // Auf bestimmte Zeichen pruefen ?!
+ // .....
+
+ rOutput << aTmpStr.GetStr();
+ }
+
+ nIndex += pTextPortion->GetLen();
+ }
+ }
+ // Nachspann
+ // ....
+
+ rOutput.Flush();
+ return rOutput.GetError();
+*/
+}
+
+
+EditTextObject* ImpEditEngine::CreateTextObject()
+{
+ EditSelection aCompleteSelection;
+ aCompleteSelection.Min() = aEditDoc.GetStartPaM();
+ aCompleteSelection.Max() = aEditDoc.GetEndPaM();
+
+ return CreateTextObject( aCompleteSelection );
+}
+
+EditTextObject* ImpEditEngine::CreateTextObject( EditSelection aSel )
+{
+ return CreateBinTextObject( aSel, aStatus.AllowBigObjects(), nBigTextObjectStart );
+}
+
+EditTextObject* ImpEditEngine::CreateBinTextObject( EditSelection aSel, sal_Bool bAllowBigObjects, sal_uInt16 nBigObjectStart ) const
+{
+ BinTextObject* pTxtObj = new BinTextObject( pTextObjectPool );
+ MapUnit eMapUnit = (MapUnit)aEditDoc.GetItemPool().GetMetric( DEF_METRIC );
+ pTxtObj->SetMetric( (sal_uInt16) eMapUnit );
+ if ( pTxtObj->IsOwnerOfPool() )
+ pTxtObj->GetPool()->SetDefaultMetric( (SfxMapUnit) eMapUnit );
+
+ sal_uInt16 nStartNode, nEndNode;
+ sal_uInt32 nTextPortions = 0;
+
+ aSel.Adjust( aEditDoc );
+ nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+
+ sal_Bool bOnlyFullParagraphs = ( aSel.Min().GetIndex() ||
+ ( aSel.Max().GetIndex() < aSel.Max().GetNode()->Len() ) ) ?
+ sal_False : sal_True;
+
+ // Vorlagen werden nicht gespeichert!
+ // ( Nur Name und Familie, Vorlage selbst muss in App stehen! )
+
+ // ueber die Absaetze iterieren...
+ sal_uInt16 nNode;
+ for ( nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ {
+ ContentNode* pNode = aEditDoc.SaveGetObject( nNode );
+ DBG_ASSERT( pNode, "Node nicht gefunden: Search&Replace" );
+
+ if ( bOnlyFullParagraphs )
+ {
+ ParaPortion* pParaPortion = GetParaPortions()[nNode];
+ nTextPortions += pParaPortion->GetTextPortions().Count();
+ }
+
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = pNode->Len();
+
+ sal_Bool bEmptyPara = nEndPos ? sal_False : sal_True;
+
+ if ( ( nNode == nStartNode ) && !bOnlyFullParagraphs )
+ nStartPos = aSel.Min().GetIndex();
+ if ( ( nNode == nEndNode ) && !bOnlyFullParagraphs )
+ nEndPos = aSel.Max().GetIndex();
+
+
+ ContentInfo* pC = pTxtObj->CreateAndInsertContent();
+
+ // Die Absatzattribute...
+ pC->GetParaAttribs().Set( pNode->GetContentAttribs().GetItems() );
+
+ // Seit der 5.1 werden im Outliner die LRSpaceItems anders interpretiert.
+ // Damit sie in einer 5.0 und aelter richtig sind, muss das Flag
+ // richtig gesetzt sein...
+ sal_Bool bOutliner = aStatus.IsAnyOutliner();
+ for ( sal_uInt16 n = 0; n <=1; n++ )
+ {
+ sal_uInt16 nItemId = n ? EE_PARA_LRSPACE : EE_PARA_OUTLLRSPACE;
+ if ( pC->GetParaAttribs().GetItemState( nItemId ) == SFX_ITEM_ON )
+ {
+ const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( nItemId );
+ if ( rItem.IsBulletFI() != bOutliner )
+ {
+ SvxLRSpaceItem aNewItem( rItem );
+ aNewItem.SetBulletFI( bOutliner );
+ pC->GetParaAttribs().Put( aNewItem );
+ }
+ }
+ }
+
+
+ // Das StyleSheet...
+ if ( pNode->GetStyleSheet() )
+ {
+ pC->GetStyle() = pNode->GetStyleSheet()->GetName();
+ pC->GetFamily() = pNode->GetStyleSheet()->GetFamily();
+ }
+
+ // Der Text...
+ pC->GetText() = pNode->Copy( nStartPos, nEndPos-nStartPos );
+
+ // und die Attribute...
+ sal_uInt16 nAttr = 0;
+ EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ while ( pAttr )
+ {
+ // In einem leeren Absatz die Attribute behalten!
+ if ( bEmptyPara ||
+ ( ( pAttr->GetEnd() > nStartPos ) && ( pAttr->GetStart() < nEndPos ) ) )
+ {
+ XEditAttribute* pX = pTxtObj->CreateAttrib( *pAttr->GetItem(), pAttr->GetStart(), pAttr->GetEnd() );
+ // Evtl. korrigieren...
+ if ( ( nNode == nStartNode ) && ( nStartPos != 0 ) )
+ {
+ pX->GetStart() = ( pX->GetStart() > nStartPos ) ? pX->GetStart()-nStartPos : 0;
+ pX->GetEnd() -= nStartPos;
+
+ }
+ if ( nNode == nEndNode )
+ {
+ if ( pX->GetEnd() > (nEndPos-nStartPos) )
+ pX->GetEnd() = nEndPos-nStartPos;
+ }
+ DBG_ASSERT( pX->GetEnd() <= (nEndPos-nStartPos), "CreateBinTextObject: Attribut zu lang!" );
+ if ( !pX->GetLen() && !bEmptyPara )
+ pTxtObj->DestroyAttrib( pX );
+ else
+ pC->GetAttribs().Insert( pX, pC->GetAttribs().Count() );
+ }
+ nAttr++;
+ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ }
+
+#ifndef SVX_LIGHT
+ // ggf. Online-Spelling
+ if ( bAllowBigObjects && bOnlyFullParagraphs && pNode->GetWrongList() )
+ pC->SetWrongList( pNode->GetWrongList()->Clone() );
+#endif // !SVX_LIGHT
+
+ }
+
+ // Bei grossen Textobjekten die PortionInfos merken:
+ // Schwelle rauf setzen, wenn Olli die Absaetze nicht mehr zerhackt!
+ if ( bAllowBigObjects && bOnlyFullParagraphs && IsFormatted() && GetUpdateMode() && ( nTextPortions >= nBigObjectStart ) )
+ {
+ XParaPortionList* pXList = new XParaPortionList( GetRefDevice(), aPaperSize.Width() );
+ pTxtObj->SetPortionInfo( pXList );
+ for ( nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ {
+ ParaPortion* pParaPortion = GetParaPortions()[nNode];
+ XParaPortion* pX = new XParaPortion;
+ pXList->Insert( pX, pXList->Count() );
+
+ pX->nHeight = pParaPortion->GetHeight();
+ pX->nFirstLineOffset = pParaPortion->GetFirstLineOffset();
+
+ // Die TextPortions
+ sal_uInt16 nCount = pParaPortion->GetTextPortions().Count();
+ sal_uInt16 n;
+ for ( n = 0; n < nCount; n++ )
+ {
+ TextPortion* pTextPortion = pParaPortion->GetTextPortions()[n];
+ TextPortion* pNew = new TextPortion( *pTextPortion );
+ pX->aTextPortions.Insert( pNew, pX->aTextPortions.Count() );
+ }
+
+ // Die Zeilen
+ nCount = pParaPortion->GetLines().Count();
+ for ( n = 0; n < nCount; n++ )
+ {
+ EditLine* pLine = pParaPortion->GetLines()[n];
+ EditLine* pNew = pLine->Clone();
+ pX->aLines.Insert( pNew, pX->aLines.Count() );
+ }
+ }
+ }
+ return pTxtObj;
+}
+
+void ImpEditEngine::SetText( const EditTextObject& rTextObject )
+{
+ // Da Setzen eines TextObject ist nicht Undo-faehig!
+ ResetUndoManager();
+ sal_Bool bUpdate = GetUpdateMode();
+ sal_Bool bUndo = IsUndoEnabled();
+
+ SetText( XubString() );
+ EditPaM aPaM = aEditDoc.GetStartPaM();
+
+ SetUpdateMode( sal_False );
+ EnableUndo( sal_False );
+
+ InsertText( rTextObject, EditSelection( aPaM, aPaM ) );
+
+ DBG_ASSERT( !HasUndoManager() || !GetUndoManager().GetUndoActionCount(), "Woher kommt das Undo in SetText ?!" );
+ SetUpdateMode( bUpdate );
+ EnableUndo( bUndo );
+}
+
+EditSelection ImpEditEngine::InsertText( const EditTextObject& rTextObject, EditSelection aSel )
+{
+ aSel.Adjust( aEditDoc );
+ if ( aSel.HasRange() )
+ aSel = ImpDeleteSelection( aSel );
+ return InsertBinTextObject( (BinTextObject&)rTextObject, aSel.Max() );
+
+ // MT 05/00: InsertBinTextObject direkt hier machen...
+}
+
+EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, EditPaM aPaM )
+{
+ // Optimieren:
+ // Kein GetPos undFindParaportion, sondern Index berechnen!
+ EditSelection aSel( aPaM, aPaM );
+ DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "InsertBibTextObject: Selektion kaput!(1)" );
+
+ sal_Bool bUsePortionInfo = sal_False;
+ sal_Bool bFields = sal_False;
+ XParaPortionList* pPortionInfo = rTextObject.GetPortionInfo();
+
+ if ( pPortionInfo && ( (long)pPortionInfo->GetPaperWidth() == aPaperSize.Width() )
+ && ( pPortionInfo->GetRefMapMode() == GetRefDevice()->GetMapMode() ) )
+ {
+ if ( ( pPortionInfo->GetRefDevPtr() == (sal_uInt32)GetRefDevice() ) ||
+ ( ( pPortionInfo->GetRefDevType() == OUTDEV_VIRDEV ) &&
+ ( GetRefDevice()->GetOutDevType() == OUTDEV_VIRDEV ) ) )
+ bUsePortionInfo = sal_True;
+ }
+
+ sal_Bool bConvertItems = sal_False;
+ MapUnit eSourceUnit, eDestUnit;
+ if ( rTextObject.HasMetric() )
+ {
+ eSourceUnit = (MapUnit)rTextObject.GetMetric();
+ eDestUnit = (MapUnit)aEditDoc.GetItemPool().GetMetric( DEF_METRIC );
+ if ( eSourceUnit != eDestUnit )
+ bConvertItems = sal_True;
+ }
+
+ sal_uInt16 nContents = rTextObject.GetContents().Count();
+ sal_uInt16 nPara = aEditDoc.GetPos( aPaM.GetNode() );
+
+ for ( sal_uInt16 n = 0; n < nContents; n++, nPara++ )
+ {
+ ContentInfo* pC = rTextObject.GetContents().GetObject( n );
+ sal_Bool bNewContent = aPaM.GetNode()->Len() ? sal_False: sal_True;
+ sal_uInt16 nStartPos = aPaM.GetIndex();
+
+ aPaM = ImpFastInsertText( aPaM, pC->GetText() );
+
+ ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
+ DBG_ASSERT( pPortion, "Blinde Portion in FastInsertText" );
+ pPortion->MarkInvalid( nStartPos, pC->GetText().Len() );
+
+ // Zeicheattribute...
+ sal_Bool bAllreadyHasAttribs = aPaM.GetNode()->GetCharAttribs().Count() ? sal_True : sal_False;
+ sal_uInt16 nNewAttribs = pC->GetAttribs().Count();
+ if ( nNewAttribs )
+ {
+ for ( sal_uInt16 nAttr = 0; nAttr < nNewAttribs; nAttr++ )
+ {
+ XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr );
+ // Kann passieren wenn Absaetze >16K entstehen, dann wird einfach umgebrochen.
+ if ( pX->GetEnd() <= aPaM.GetNode()->Len() )
+ {
+ if ( !bAllreadyHasAttribs || pX->IsFeature() )
+ {
+ // Normale Attribute gehen dann schneller...
+ // Features duerfen nicht ueber EditDoc::InsertAttrib
+ // eingefuegt werden, sie sind bei FastInsertText schon im TextFluss
+ DBG_ASSERT( pX->GetEnd() <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribut zu gross!" );
+ EditCharAttrib* pAttr;
+ if ( !bConvertItems )
+ pAttr = MakeCharAttrib( aEditDoc.GetItemPool(), *(pX->GetItem()), pX->GetStart()+nStartPos, pX->GetEnd()+nStartPos );
+ else
+ {
+ SfxPoolItem* pNew = pX->GetItem()->Clone();
+ ConvertItem( *pNew, eSourceUnit, eDestUnit );
+ pAttr = MakeCharAttrib( aEditDoc.GetItemPool(), *pNew, pX->GetStart()+nStartPos, pX->GetEnd()+nStartPos );
+ delete pNew;
+ }
+ DBG_ASSERT( pAttr->GetEnd() <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribut passt nicht! (1)" );
+ aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttr );
+ if ( pAttr->Which() == EE_FEATURE_FIELD )
+ UpdateFields();
+ }
+ else
+ {
+ DBG_ASSERT( pX->GetEnd()+nStartPos <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribut passt nicht! (2)" );
+ // Tabs und andere Features koennen nicht ueber InsertAttrib eingefuegt werden:
+ aEditDoc.InsertAttrib( aPaM.GetNode(), pX->GetStart()+nStartPos, pX->GetEnd()+nStartPos, *pX->GetItem() );
+ }
+ }
+ }
+ // Sonst QuickFormat => Keine Attribute!
+ pPortion->MarkSelectionInvalid( nStartPos, pC->GetText().Len() );
+ }
+
+ DBG_ASSERT( CheckOrderedList( aPaM.GetNode()->GetCharAttribs().GetAttribs(), sal_True ), "InsertBinTextObject: Start-Liste verdreht" );
+
+ sal_Bool bParaAttribs = sal_False;
+ if ( bNewContent || ( ( n > 0 ) && ( n < (nContents-1) ) ) )
+ {
+ // nur dann Style und ParaAttribs, wenn neuer Absatz, oder
+ // komplett inneliegender...
+ bParaAttribs = pC->GetParaAttribs().Count() ? sal_True : sal_False;
+ if ( GetStyleSheetPool() && pC->GetStyle().Len() )
+ SetStyleSheet( nPara, (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() ) );
+ if ( !bConvertItems )
+ SetParaAttribs( aEditDoc.GetPos( aPaM.GetNode() ), pC->GetParaAttribs() );
+ else
+ {
+ SfxItemSet aAttribs( GetEmptyItemSet() );
+ ConvertAndPutItems( aAttribs, pC->GetParaAttribs(), &eSourceUnit, &eDestUnit );
+ SetParaAttribs( aEditDoc.GetPos( aPaM.GetNode() ), aAttribs );
+ }
+ if ( bNewContent && bUsePortionInfo )
+ {
+ XParaPortion* pXP = pPortionInfo->GetObject( n );
+ DBG_ASSERT( pXP, "InsertBinTextObject: PortionInfo?" );
+ ParaPortion* pParaPortion = GetParaPortions()[ nPara ];
+ DBG_ASSERT( pParaPortion, "InsertBinTextObject: ParaPortion?" );
+ pParaPortion->nHeight = pXP->nHeight;
+ pParaPortion->nFirstLineOffset = pXP->nFirstLineOffset;
+ pParaPortion->bForceRepaint = sal_True;
+ pParaPortion->SetValid(); // Nicht formatieren
+
+ // Die TextPortions
+ pParaPortion->GetTextPortions().Reset();
+ sal_uInt16 nCount = pXP->aTextPortions.Count();
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
+ {
+ TextPortion* pTextPortion = pXP->aTextPortions[n];
+ TextPortion* pNew = new TextPortion( *pTextPortion );
+ pParaPortion->GetTextPortions().Insert( pNew, n );
+ }
+
+ // Die Zeilen
+ pParaPortion->GetLines().Reset();
+ nCount = pXP->aLines.Count();
+ for ( sal_uInt16 m = 0; m < nCount; m++ )
+ {
+ EditLine* pLine = pXP->aLines[m];
+ EditLine* pNew = pLine->Clone();
+ pNew->SetInvalid(); // neu Painten!
+ pParaPortion->GetLines().Insert( pNew, m );
+ }
+ }
+ }
+ if ( !bParaAttribs ) // DefFont wird bei FastInsertParagraph nicht berechnet
+ {
+ aPaM.GetNode()->GetCharAttribs().GetDefFont() = aEditDoc.GetDefFont();
+ if ( aStatus.UseCharAttribs() )
+ aPaM.GetNode()->CreateDefFont();
+ }
+
+#ifndef SVX_LIGHT
+ if ( bNewContent && GetStatus().DoOnlineSpelling() && pC->GetWrongList() )
+ aPaM.GetNode()->SetWrongList( pC->GetWrongList()->Clone() );
+#endif // !SVX_LIGHT
+
+ // Zeilenumbruch, wenn weitere folgen...
+ if ( n < ( nContents-1) )
+ {
+ if ( bNewContent )
+ aPaM = ImpFastInsertParagraph( nPara+1 );
+ else
+ aPaM = ImpInsertParaBreak( aPaM, sal_False );
+ }
+ }
+
+ aSel.Max() = aPaM;
+ DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "InsertBibTextObject: Selektion kaput!(1)" );
+ return aSel;
+}
+
+::com::sun::star::lang::Locale ImpEditEngine::GetLocale()
+{
+ if ( !aDefaultLocale.Language.getLength() )
+ {
+ String aLanguage, aCountry;
+ ConvertLanguageToIsoNames( GetLanguage(), aLanguage, aCountry );
+ aDefaultLocale.Language = aLanguage;
+ aDefaultLocale.Country = aCountry;
+ }
+ return aDefaultLocale;
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellChecker1 > ImpEditEngine::GetSpeller()
+{
+#ifndef SVX_LIGHT
+ if ( !xSpeller.is() )
+ xSpeller = SvxGetSpellChecker();
+#endif
+ return xSpeller;
+}
+
+EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc )
+{
+#ifdef SVX_LIGHT
+ return EE_SPELL_NOSPELLER;
+#else
+
+ DBG_ASSERTWARNING( xSpeller.is(), "Kein Speller gesetzt!" );
+
+ if ( !xSpeller.is() )
+ return EE_SPELL_NOSPELLER;
+ if ( eDefaultLanguage == LANGUAGE_NONE )
+ return EE_SPELL_NOLANGUAGE;
+
+ aOnlineSpellTimer.Stop();
+
+ sal_Bool bForward = !EditSpellWrapper::IsSpellReverse();
+
+ // Bei MultipleDoc immer von vorne/hinten...
+ if ( bMultipleDoc )
+ {
+ if ( bForward )
+ pEditView->pImpEditView->SetEditSelection( aEditDoc.GetStartPaM() );
+ else
+ pEditView->pImpEditView->SetEditSelection( aEditDoc.GetEndPaM() );
+ }
+
+ EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
+ pSpellInfo = new SpellInfo;
+ pSpellInfo->bMultipleDoc = bMultipleDoc;
+ if ( bForward )
+ pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::text::WordType::DICTIONARY_WORD ).Min() );
+ else
+ pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::text::WordType::DICTIONARY_WORD ).Max() );
+
+ sal_Bool bIsStart = sal_False;
+ if ( bMultipleDoc )
+ bIsStart = sal_True; // Immer von Vorne bzw. von hinten...
+ else if ( bForward && ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart ) )
+ bIsStart = sal_True;
+ else if ( !bForward && ( CreateEPaM( aEditDoc.GetEndPaM() ) == pSpellInfo->aSpellStart ) )
+ bIsStart = sal_True;
+
+ EditSpellWrapper* pWrp = new EditSpellWrapper( Application::GetDefModalDialogParent(),
+ xSpeller, bIsStart, sal_False, pEditView );
+ pWrp->SpellDocument();
+ delete pWrp;
+
+ if ( !bMultipleDoc )
+ {
+ pEditView->pImpEditView->DrawSelection();
+ if ( aCurSel.Max().GetIndex() > aCurSel.Max().GetNode()->Len() )
+ aCurSel.Max().GetIndex() = aCurSel.Max().GetNode()->Len();
+ aCurSel.Min() = aCurSel.Max();
+ pEditView->pImpEditView->SetEditSelection( aCurSel );
+ pEditView->pImpEditView->DrawSelection();
+ pEditView->ShowCursor( sal_True, sal_False );
+ }
+ EESpellState eState = pSpellInfo->eState;
+ delete pSpellInfo;
+ pSpellInfo = 0;
+ return eState;
+#endif
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
+{
+#ifdef SVX_LIGHT
+ return uno::Reference< linguistic::XSpellAlternatives >();
+#else
+
+ DBG_ASSERT( xSpeller.is(), "Kein Speller gesetzt!" );
+
+ sal_Bool bForward = !EditSpellWrapper::IsSpellReverse();
+ ContentNode* pLastNode = aEditDoc.SaveGetObject( bForward ? (aEditDoc.Count()-1) : 0 );
+ EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
+ if ( bForward )
+ aCurSel.Min() = aCurSel.Max();
+ else
+ aCurSel.Max() = aCurSel.Min();
+
+ String aWord;
+ uno::Reference< linguistic::XSpellAlternatives > xSpellAlt;
+ while (!xSpellAlt.is())
+ {
+
+ // Bekannter (wahrscheinlicher) Bug: Wenn SpellToCurrent, muss
+ // Current bei jeder Ersetzung korrigiert werden, sonst passt
+ // das Ende evtl. nicht mehr genau...
+ if ( pSpellInfo->bSpellToEnd || pSpellInfo->bMultipleDoc )
+ {
+ if ( aCurSel.Max().GetNode() == pLastNode )
+ {
+ if ( bForward && ( aCurSel.Max().GetIndex() >= pLastNode->Len() ) )
+ break;
+ else if ( !bForward && ( !aCurSel.Min().GetIndex() ) )
+ break;
+ }
+ }
+ else if ( !pSpellInfo->bSpellToEnd )
+ {
+ EPaM aEPaM( CreateEPaM( aCurSel.Max() ) );
+ if ( bForward && !( aEPaM < pSpellInfo->aSpellTo ) )
+ break;
+ else if ( !bForward && ( aEPaM < pSpellInfo->aSpellTo ) )
+ break;
+ }
+
+ // Bei Rueckwaerts-Suche erst zurueck, sonst wird das gleiche Wort wieder gespellt.
+ if ( !bForward )
+ aCurSel = WordLeft( aCurSel.Min(), ::com::sun::star::text::WordType::DICTIONARY_WORD );
+
+ aCurSel = SelectWord( aCurSel, ::com::sun::star::text::WordType::DICTIONARY_WORD );
+ aWord = GetSelected( aCurSel );
+
+ // Wenn Punkt dahinter, muss dieser mit uebergeben werden !
+ // Falls Abkuerzung...
+ if ( aWord.Len() && ( aCurSel.Max().GetIndex() < aCurSel.Max().GetNode()->Len() ) )
+ {
+ sal_Unicode cNext = aCurSel.Max().GetNode()->GetChar( aCurSel.Max().GetIndex() );
+ if ( cNext == '.' )
+ {
+ aCurSel.Max().GetIndex()++;
+ aWord += cNext;
+ }
+ }
+
+ if ( aWord.Len() > 1 )
+ xSpellAlt = xSpeller->spell( aWord, eDefaultLanguage );
+ if ( bForward && !xSpellAlt.is() )
+ aCurSel = WordRight( aCurSel.Max(), ::com::sun::star::text::WordType::DICTIONARY_WORD );
+ else
+ pSpellInfo->eState = EE_SPELL_ERRORFOUND;
+ }
+
+ pEditView->pImpEditView->DrawSelection();
+ pEditView->pImpEditView->SetEditSelection( aCurSel );
+ pEditView->pImpEditView->DrawSelection();
+ pEditView->ShowCursor( sal_True, sal_False );
+ return xSpellAlt;
+#endif
+}
+
+void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, sal_Bool bSpellAtCursorPos, sal_Bool bInteruptable )
+{
+#ifndef SVX_LIGHT
+ /*
+ Er wird ueber alle Absaetze iteriert, nur Absaetze mit invalidierter
+ WrongList werden geprueft...
+
+ Es werden alle Woerter im invalidierten Bereich geprueft.
+ Ist ein Wort falsch, aber noch nicht in der WrongList, oder umgekehrt,
+ wird der Bereich des Wortes invalidiert
+ ( kein Invalidate, sondern wenn nur Uebergaenge von richtig=>falsch,
+ einfaches Paint, bei Uebergaengen von falsch=>richtig mit VDev
+ ueberplaetten )
+ */
+
+ if ( !xSpeller.is() )
+ return;
+
+ EditPaM aCursorPos;
+ if( pActiveView && !bSpellAtCursorPos )
+ {
+ DBG_CHKOBJ( pActiveView, EditView, 0 );
+ aCursorPos = pActiveView->pImpEditView->GetEditSelection().Max();
+ }
+ sal_Bool bRestartTimer = sal_False;
+
+ ContentNode* pLastNode = aEditDoc.SaveGetObject( aEditDoc.Count() - 1 );
+ sal_uInt16 nNodes = GetEditDoc().Count();
+ sal_uInt16 nInvalids = 0;
+ for ( sal_uInt16 n = 0; n < nNodes; n++ )
+ {
+ ContentNode* pNode = GetEditDoc().GetObject( n );
+ if ( pThisNodeOnly )
+ pNode = pThisNodeOnly;
+
+ if ( pNode->GetWrongList()->IsInvalid() )
+ {
+ WrongList* pWrongList = pNode->GetWrongList();
+ sal_uInt16 nInvStart = pWrongList->GetInvalidStart();
+ sal_uInt16 nInvEnd = pWrongList->GetInvalidEnd();
+
+ sal_uInt16 nWrongs = 0; // Auch im Absatz mal die Kontrolle abgeben...
+// sal_Bool bStop = sal_False;
+
+ // Alle WrongRanges im Unguetigkeitsbereich loeschen
+ // Zu Testzwecken erstmal plaetten:
+// pWrongList->ResetRanges();
+// nInvStart = 0; nInvEnd = pNode->Len();
+
+ sal_uInt16 nPaintFrom = 0xFFFF, nPaintTo;
+ sal_Bool bSimpleRepaint = sal_True;
+
+ pWrongList->SetValid();
+
+ EditPaM aPaM( pNode, nInvStart );
+ if ( aPaM.GetIndex() )
+ aPaM = CursorLeft( aPaM );
+ EditSelection aSel( aPaM, aPaM );
+ while ( ( aSel.Max().GetNode() == pNode ) /* && !bStop */ )
+ {
+ if ( ( aSel.Min().GetIndex() > nInvEnd )
+ || ( ( aSel.Max().GetNode() == pLastNode ) && ( aSel.Max().GetIndex() >= pLastNode->Len() ) ) )
+ break; // Dokument- oder Ungueltigkeitsbereich-Ende
+
+ aSel = SelectWord( aSel, ::com::sun::star::text::WordType::DICTIONARY_WORD );
+ String aWord( GetSelected( aSel ) );
+ // Wenn Punkt dahinter, muss dieser mit uebergeben werden !
+ // Falls Abkuerzung...
+ sal_Bool bDottAdded = sal_False;
+ if ( aSel.Max().GetIndex() < aSel.Max().GetNode()->Len() )
+ {
+ sal_Unicode cNext = aSel.Max().GetNode()->GetChar( aSel.Max().GetIndex() );
+ if ( cNext == '.' )
+ {
+ aSel.Max().GetIndex()++;
+ aWord += cNext;
+ bDottAdded = sal_True;
+ }
+ }
+
+ sal_Bool bChanged = sal_False;
+ if ( aWord.Len() > 1 )
+ {
+ sal_uInt16 nWStart = aSel.Min().GetIndex();
+ sal_uInt16 nWEnd= aSel.Max().GetIndex();
+ if ( !xSpeller->isValid( aWord, eDefaultLanguage ) )
+ {
+ // Pruefen, ob schon richtig markiert...
+ nWrongs++;
+ // Nur bei SimpleRepaint stoppen, sonst zu oft VDev
+// if ( ( nWrongs > 8 ) && bSimpleRepaint )
+// {
+// bStop = sal_True;
+// pWrongList->MarkInvalid( aSel.Max().GetIndex(), nInvEnd );
+// }
+ sal_uInt16 nXEnd = bDottAdded ? nWEnd -1 : nWEnd;
+ if ( !pWrongList->HasWrong( nWStart, nXEnd ) )
+ {
+ // Wort als falsch markieren...
+ // Aber nur, wenn nicht an Cursor-Position...
+ sal_Bool bCursorPos = sal_False;
+ if ( aCursorPos.GetNode() == pNode )
+ {
+ if ( ( nWStart <= aCursorPos.GetIndex() ) && nWEnd >= aCursorPos.GetIndex() )
+ bCursorPos = sal_True;
+ }
+ if ( bCursorPos )
+ {
+ // Dann weiter als ungueltig markieren...
+ pWrongList->GetInvalidStart() = nWStart;
+ pWrongList->GetInvalidEnd() = nWEnd;
+ bRestartTimer = sal_True;
+ }
+ else
+ {
+ // Es kann sein, dass die Wrongs in der Liste nicht
+ // genau ueber Woerter aufgespannt sind, weil die
+ // WordDelimiters beim Expandieren nicht ausgewrtet werden.
+ pWrongList->InsertWrong( nWStart, nXEnd, sal_True );
+ bChanged = sal_True;
+ }
+ }
+ }
+ else
+ {
+ // Pruefen, ob nicht als als falsch markiert....
+ if ( pWrongList->HasAnyWrong( nWStart, nWEnd ) )
+ {
+ pWrongList->ClearWrongs( nWStart, nWEnd, pNode );
+ bSimpleRepaint = sal_False;
+ bChanged = sal_True;
+ }
+ }
+ if ( bChanged )
+ {
+ if ( nPaintFrom == 0xFFFF )
+ nPaintFrom = nWStart;
+ nPaintTo = nWEnd;
+ }
+ }
+
+ EditPaM aLastEnd( aSel.Max() );
+ aSel = WordRight( aSel.Max(), ::com::sun::star::text::WordType::DICTIONARY_WORD );
+ if ( bChanged && ( aSel.Min().GetNode() == pNode ) &&
+ ( ( aSel.Min().GetIndex()-aLastEnd.GetIndex() > 1 ) ) )
+ {
+ // Wenn zwei Worte durch mehr Zeichen als ein Blank getrennt
+ // sind, kann es passieren, dass beim Aufsplitten eines Wrongs
+ // der Start den zweiten Wortes vor dem tatsaechlich Wort liegt
+ pWrongList->ClearWrongs( aLastEnd.GetIndex(), aSel.Min().GetIndex(), pNode );
+ }
+ }
+
+ // Invalidieren?
+ if ( ( nPaintFrom != 0xFFFF ) && ( GetStatus().DoDrawRedLines() ) )
+ {
+ aStatus.GetStatusWord() |= EE_STAT_WRONGWORDCHANGED;
+ CallStatusHdl();
+
+ if ( aEditViews.Count() )
+ {
+ // Bei SimpleRepaint wuerde ein uebermalen ohne VDev reichen,
+ // aber dann muesste ich ueber alle Views, Intersecten,
+ // Clippen, ...
+ // Lohnt wahrscheinlich nicht.
+ EditPaM aStartPaM( pNode, nPaintFrom );
+ EditPaM aEndPaM( pNode, nPaintTo );
+ Rectangle aStartCursor( PaMtoEditCursor( aStartPaM ) );
+ Rectangle aEndCursor( PaMtoEditCursor( aEndPaM ) );
+ DBG_ASSERT( aInvalidRec.IsEmpty(), "InvalidRect gesetzt!" );
+ aInvalidRec.Left() = 0;
+ aInvalidRec.Right() = GetPaperSize().Width();
+ aInvalidRec.Top() = aStartCursor.Top();
+ aInvalidRec.Bottom() = aEndCursor.Bottom();
+ if ( pActiveView && pActiveView->HasSelection() )
+ {
+ // Dann darf nicht ueber VDev ausgegeben werden
+ UpdateViews( NULL );
+ }
+ else if ( bSimpleRepaint )
+ {
+ for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
+ {
+ EditView* pView = aEditViews[nView];
+ Rectangle aClipRec( aInvalidRec );
+ aClipRec.Intersection( pView->GetVisArea() );
+ if ( !aClipRec.IsEmpty() )
+ {
+ // in Fensterkoordinaten umwandeln....
+ aClipRec.SetPos( pView->pImpEditView->GetWindowPos( aClipRec.TopLeft() ) );
+ // Wenn Selektion, dann VDev...
+ Paint( pView->pImpEditView, aClipRec, pView->HasSelection() );
+ aInvalidRec = Rectangle();
+ }
+ }
+ }
+ else
+ UpdateViews( pActiveView );
+ }
+
+ }
+ // Nach zwei korrigierten Nodes die Kontrolle abgeben...
+ nInvalids++;
+ if ( bInteruptable && ( nInvalids >= 2 ) )
+ {
+ bRestartTimer = sal_True;
+ break;
+ }
+ }
+
+ if ( pThisNodeOnly )
+ break;
+ }
+ if ( bRestartTimer )
+ aOnlineSpellTimer.Start();
+#endif // !SVX_LIGHT
+}
+
+
+EESpellState ImpEditEngine::HasSpellErrors()
+{
+ DBG_ASSERT( xSpeller.is(), "Kein Speller gesetzt!" );
+
+#ifndef SVX_LIGHT
+ ContentNode* pLastNode = aEditDoc.SaveGetObject( aEditDoc.Count() - 1 );
+ EditSelection aCurSel( aEditDoc.GetStartPaM() );
+
+ String aWord;
+ uno::Reference< linguistic::XSpellAlternatives > xSpellAlt;
+ while ( !xSpellAlt.is() )
+ {
+ if ( ( aCurSel.Max().GetNode() == pLastNode ) &&
+ ( aCurSel.Max().GetIndex() >= pLastNode->Len() ) )
+ {
+ return EE_SPELL_OK;
+ }
+
+ aCurSel = SelectWord( aCurSel, ::com::sun::star::text::WordType::DICTIONARY_WORD );
+ aWord = GetSelected( aCurSel );
+ if ( aWord.Len() > 1 )
+ xSpellAlt = xSpeller->spell( aWord, eDefaultLanguage );
+ aCurSel = WordRight( aCurSel.Max(), ::com::sun::star::text::WordType::DICTIONARY_WORD );
+ }
+#endif
+
+ return EE_SPELL_ERRORFOUND;
+}
+
+EESpellState ImpEditEngine::StartThesaurus( EditView* pEditView )
+{
+#ifndef SVX_LIGHT
+ if ( eDefaultLanguage == LANGUAGE_NONE )
+ return EE_SPELL_NOLANGUAGE;
+
+ EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
+ if ( !aCurSel.HasRange() )
+ aCurSel = SelectWord( aCurSel, ::com::sun::star::text::WordType::DICTIONARY_WORD );
+ String aWord( GetSelected( aCurSel ) );
+
+ uno::Reference< linguistic::XThesaurus > xThes( SvxGetThesaurus() );
+ if (!xThes.is())
+ return EE_SPELL_ERRORFOUND;
+
+ SvxThesaurusDialog aDialog( pEditView->GetWindow(), xThes, aWord, eDefaultLanguage );
+
+ if ( aDialog.Execute() == RET_OK )
+ {
+ // Wort ersetzen...
+ pEditView->pImpEditView->DrawSelection();
+ pEditView->pImpEditView->SetEditSelection( aCurSel );
+ pEditView->pImpEditView->DrawSelection();
+ pEditView->InsertText( aDialog.GetWord() );
+ pEditView->ShowCursor( sal_True, sal_False );
+ }
+
+ return EE_SPELL_OK;
+#else
+ return EE_SPELL_NOSPELLER;
+#endif
+}
+
+sal_uInt16 ImpEditEngine::StartSearchAndReplace( EditView* pEditView, const SvxSearchItem& rSearchItem )
+{
+ sal_uInt16 nFound = 0;
+
+#ifndef SVX_LIGHT
+ EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
+
+ // FIND_ALL ohne Mehrfachselektion nicht moeglich.
+ if ( ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND ) ||
+ ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL ) )
+ {
+ if ( Search( rSearchItem, pEditView ) )
+ nFound++;
+ }
+ else if ( rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE )
+ {
+ // Das Wort ist selektiert, wenn der Anwender die Selektion
+ // nicht zwischendurch manipuliert:
+ if ( aCurSel.HasRange() )
+ {
+ pEditView->InsertText( rSearchItem.GetReplaceString() );
+ nFound = 1;
+ }
+ else
+ if( Search( rSearchItem, pEditView ) )
+ nFound = 1;
+ }
+ else if ( rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL )
+ {
+ // Der Writer ersetzt alle, vorn Anfang bis Ende...
+ SvxSearchItem aTmpItem( rSearchItem );
+ aTmpItem.SetBackward( sal_False );
+
+ pEditView->pImpEditView->DrawSelection();
+
+ EditPaM aStartPaM = aTmpItem.GetSelection() ? aCurSel.Min() : aEditDoc.GetStartPaM();
+ EditSelection aFoundSel( aCurSel.Max() );
+ sal_Bool bFound = ImpSearch( aTmpItem, aCurSel, aStartPaM, aFoundSel );
+ if ( bFound )
+ UndoActionStart( EDITUNDO_REPLACEALL );
+ while ( bFound )
+ {
+ nFound++;
+ aStartPaM = ImpInsertText( aFoundSel, rSearchItem.GetReplaceString() );
+ bFound = ImpSearch( aTmpItem, aCurSel, aStartPaM, aFoundSel );
+ }
+ if ( nFound )
+ {
+ pEditView->pImpEditView->SetEditSelection( aFoundSel.Max() );
+ FormatAndUpdate( pEditView );
+ UndoActionEnd( EDITUNDO_REPLACEALL );
+ }
+ else
+ {
+ pEditView->pImpEditView->DrawSelection();
+ pEditView->ShowCursor( sal_True, sal_False );
+ }
+ }
+#endif // !SVX_LIGHT
+ return nFound;
+}
+
+sal_Bool ImpEditEngine::ImpSearch( const SvxSearchItem& rSearchItem,
+ const EditSelection& rSearchSelection, const EditPaM& rStartPos, EditSelection& rFoundSel )
+{
+#ifndef SVX_LIGHT
+ sal_uInt16 nStartNode, nEndNode;
+
+ EditSelection aTmpSel;
+ SearchParam aSearchParam( rSearchItem.GetSearchString(),
+ SearchParam::SRCH_NORMAL, rSearchItem.GetExact(),
+ rSearchItem.GetWordOnly(), rSearchItem.GetSelection() );
+
+ if ( rSearchItem.GetRegExp() )
+ aSearchParam.SetSrchType( SearchParam::SRCH_REGEXP );
+ else if ( rSearchItem.IsLevenshtein() )
+ {
+ aSearchParam.SetSrchType( SearchParam::SRCH_LEVDIST );
+ aSearchParam.SetSrchRelaxed( rSearchItem.IsLEVRelaxed() ? sal_True : sal_False );
+ aSearchParam.SetLEVOther( rSearchItem.GetLEVOther() );
+ aSearchParam.SetLEVShorter( rSearchItem.GetLEVShorter() );
+ aSearchParam.SetLEVLonger( rSearchItem.GetLEVLonger() );
+ }
+
+ sal_Bool bBack = rSearchItem.GetBackward();
+ if ( aSearchParam.IsSrchInSelection() )
+ {
+ nEndNode = bBack
+ ? aEditDoc.GetPos( rSearchSelection.Min().GetNode() )
+ : aEditDoc.GetPos( rSearchSelection.Max().GetNode() );
+ aSearchParam.SetSrchInSelection( sal_True );
+ }
+ else
+ {
+ nEndNode = bBack ? 0 : aEditDoc.Count()-1;
+ }
+
+ nStartNode = aEditDoc.GetPos( rStartPos.GetNode() );
+ SearchText aSearcher( aSearchParam, Application::GetAppInternational() );
+
+ // ueber die Absaetze iterieren...
+ for ( sal_uInt16 nNode = nStartNode;
+ bBack ? ( nNode >= nEndNode ) : ( nNode <= nEndNode) ;
+ bBack ? nNode-- : nNode++ )
+ {
+ // Bei rueckwaertsuche, wenn nEndNode = 0:
+ if ( nNode >= 0xFFFF )
+ return sal_False;
+
+ ContentNode* pNode = aEditDoc.SaveGetObject( nNode );
+ DBG_ASSERT( pNode, "Node nicht gefunden !" );
+
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = pNode->Len();
+ if ( nNode == nStartNode )
+ {
+ if ( bBack )
+ nEndPos = rStartPos.GetIndex();
+ else
+ nStartPos = rStartPos.GetIndex();
+ }
+ if ( ( nNode == nEndNode ) && aSearchParam.IsSrchInSelection() )
+ {
+ if ( bBack )
+ nStartPos = rSearchSelection.Min().GetIndex();
+ else
+ nEndPos = rSearchSelection.Max().GetIndex();
+ }
+
+ // Suchen...
+ XubString aParaStr( GetEditDoc().GetParaAsString( pNode ) );
+ sal_Bool bFound = sal_False;
+ if ( bBack )
+ {
+ SwapUSHORTs( nStartPos, nEndPos );
+ bFound = aSearcher.SearchBkwrd( aParaStr, &nStartPos, &nEndPos);
+ }
+ else
+ bFound = aSearcher.SearchFrwrd( aParaStr, &nStartPos, &nEndPos);
+
+ if ( bFound )
+ {
+ rFoundSel.Min().SetNode( pNode );
+ rFoundSel.Min().SetIndex( nStartPos );
+ rFoundSel.Max().SetNode( pNode );
+ rFoundSel.Max().SetIndex( nEndPos );
+ if ( rFoundSel.Max().GetIndex() < pNode->Len() )
+ rFoundSel.Max().GetIndex()++;
+
+ return sal_True;
+ }
+ }
+#endif // !SVX_LIGHT
+ return sal_False;
+}
+
+sal_Bool ImpEditEngine::HasText( const SvxSearchItem& rSearchItem )
+{
+#ifndef SVX_LIGHT
+ SvxSearchItem aTmpItem( rSearchItem );
+ aTmpItem.SetBackward( sal_False );
+ aTmpItem.SetSelection( sal_False );
+
+ EditPaM aStartPaM( aEditDoc.GetStartPaM() );
+ EditSelection aDummySel( aStartPaM );
+ EditSelection aFoundSel;
+ return ImpSearch( aTmpItem, aDummySel, aStartPaM, aFoundSel );
+#else
+ return sal_False;
+#endif
+}
+
+void ImpEditEngine::SetAutoCompleteText( const String& rStr, sal_Bool bClearTipWindow )
+{
+#ifndef SVX_LIGHT
+ aAutoCompleteText = rStr;
+ if ( bClearTipWindow && pActiveView )
+ Help::ShowQuickHelp( pActiveView->GetWindow(), Rectangle(), String(), 0 );
+#endif // !SVX_LIGHT
+}
+
+
diff --git a/svx/source/editeng/impedit5.cxx b/svx/source/editeng/impedit5.cxx
new file mode 100644
index 0000000000..f575e13581
--- /dev/null
+++ b/svx/source/editeng/impedit5.cxx
@@ -0,0 +1,840 @@
+/*************************************************************************
+ *
+ * $RCSfile: impedit5.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <eeng_pch.hxx>
+
+#pragma hdrstop
+
+#include <impedit.hxx>
+#include <editeng.hxx>
+#include <editdbg.hxx>
+
+#include <svtools/smplhint.hxx>
+
+
+#ifndef _SVX_LRSPITEM_HXX
+#include <lrspitem.hxx>
+#endif
+
+void ImpEditEngine::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
+{
+ if ( pStylePool != pSPool )
+ {
+// if ( pStylePool )
+// EndListening( *pStylePool, TRUE );
+
+ pStylePool = pSPool;
+
+// if ( pStylePool )
+// StartListening( *pStylePool, TRUE );
+ }
+}
+
+SfxStyleSheet* ImpEditEngine::GetStyleSheet( USHORT nPara ) const
+{
+ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+ return pNode ? pNode->GetContentAttribs().GetStyleSheet() : NULL;
+}
+
+void ImpEditEngine::SetStyleSheet( EditSelection aSel, SfxStyleSheet* pStyle )
+{
+ aSel.Adjust( aEditDoc );
+
+ USHORT nStartPara = aEditDoc.GetPos( aSel.Min().GetNode() );
+ USHORT nEndPara = aEditDoc.GetPos( aSel.Max().GetNode() );
+
+ BOOL bUpdate = GetUpdateMode();
+ SetUpdateMode( FALSE );
+
+ for ( USHORT n = nStartPara; n <= nEndPara; n++ )
+ SetStyleSheet( n, pStyle );
+
+ SetUpdateMode( bUpdate, 0 );
+}
+
+void ImpEditEngine::SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle )
+{
+ DBG_ASSERT( GetStyleSheetPool(), "SetStyleSheet: No StyleSheetPool registered!" );
+ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+ SfxStyleSheet* pCurStyle = pNode->GetStyleSheet();
+ if ( pStyle != pCurStyle )
+ {
+ if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() )
+ {
+ XubString aPrevStyleName;
+ if ( pCurStyle )
+ aPrevStyleName = pCurStyle->GetName();
+
+ InsertUndo(
+ new EditUndoSetStyleSheet( this, aEditDoc.GetPos( pNode ),
+ aPrevStyleName,
+ pCurStyle ? pCurStyle->GetFamily() : SFX_STYLE_FAMILY_PARA,
+ pStyle->GetName(), pStyle->GetFamily(),
+ pNode->GetContentAttribs().GetItems() ) );
+ }
+ if ( pCurStyle )
+ EndListening( *pCurStyle, FALSE );
+ pNode->SetStyleSheet( pStyle, aStatus.UseCharAttribs() );
+ if ( pStyle )
+ StartListening( *pStyle, FALSE );
+ ParaAttribsChanged( pNode );
+ }
+ FormatAndUpdate();
+}
+
+void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle )
+{
+ SvxFont aFontFromStyle;
+ CreateFont( aFontFromStyle, pStyle->GetItemSet() );
+
+ BOOL bUsed = FALSE;
+ for ( USHORT nNode = 0; nNode < aEditDoc.Count(); nNode++ )
+ {
+ ContentNode* pNode = aEditDoc.GetObject( nNode );
+ if ( pNode->GetStyleSheet() == pStyle )
+ {
+ bUsed = TRUE;
+ if ( aStatus.UseCharAttribs() )
+ pNode->SetStyleSheet( pStyle, aFontFromStyle );
+ else
+ pNode->SetStyleSheet( pStyle, FALSE );
+
+ ParaAttribsChanged( pNode );
+ }
+ }
+ if ( bUsed )
+ {
+ GetEditEnginePtr()->StyleSheetChanged( pStyle );
+ FormatAndUpdate();
+ }
+}
+
+void ImpEditEngine::RemoveStyleFromParagraphs( SfxStyleSheet* pStyle )
+{
+ for ( USHORT nNode = 0; nNode < aEditDoc.Count(); nNode++ )
+ {
+ ContentNode* pNode = aEditDoc.GetObject(nNode);
+ if ( pNode->GetStyleSheet() == pStyle )
+ {
+ pNode->SetStyleSheet( NULL );
+ ParaAttribsChanged( pNode );
+ }
+ }
+ FormatAndUpdate();
+}
+
+void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ // Damit nicht beim Destruieren unnoetig formatiert wird:
+ if ( !bDowning )
+ {
+ DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
+
+ SfxStyleSheet* pStyle = NULL;
+ ULONG nId = 0;
+
+ if ( rHint.ISA( SfxStyleSheetHint ) )
+ {
+ const SfxStyleSheetHint& rH = (const SfxStyleSheetHint&) rHint;
+ DBG_ASSERT( rH.GetStyleSheet()->ISA( SfxStyleSheet ), "Kein SfxStyleSheet!" );
+ pStyle = (SfxStyleSheet*) rH.GetStyleSheet();
+ nId = rH.GetHint();
+ }
+ else if ( ( rHint.Type() == TYPE(SfxSimpleHint ) ) && ( rBC.ISA( SfxStyleSheet ) ) )
+ {
+ pStyle = (SfxStyleSheet*)&rBC;
+ nId = ((SfxSimpleHint&)rHint).GetId();
+ }
+
+ if ( pStyle )
+ {
+ if ( ( nId == SFX_HINT_DYING ) ||
+ ( nId == SFX_STYLESHEET_INDESTRUCTION ) ||
+ ( nId == SFX_STYLESHEET_ERASED ) )
+ {
+ RemoveStyleFromParagraphs( pStyle );
+ }
+ else if ( ( nId == SFX_HINT_DATACHANGED ) ||
+ ( nId == SFX_STYLESHEET_MODIFIED ) )
+ {
+ UpdateParagraphsWithStyleSheet( pStyle );
+
+ // Alle Absaetze mit EditStyles, die das geaenderte Style
+ // irgendwie als Parent haben, muessen formatiert werden.
+ // ULONG nStyles = pMyStylePool->GetStyles().Count();
+ // for ( ULONG nStyle = 0; nStyle < nStyles; nStyle++ )
+ // {
+ // EditStyleSheet* pES = (EditStyleSheet*)pMyStylePool->GetStyles().GetObject( nStyle );
+ // DBG_ASSERT( pES, "NULL-Pointer im StyleSheetPool!" );
+ // if ( pES->IsUsed() && pES->HasStyleAsAnyParent( *pStyle ) )
+ // UpdateParagraphsWithStyleSheet( pES );
+ // }
+ }
+ }
+ }
+}
+
+EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const SfxItemSet& rSet )
+{
+ DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "CreateAttribUndo: Fehlerhafte Selektion" );
+ aSel.Adjust( aEditDoc );
+
+ ESelection aESel( CreateESel( aSel ) );
+
+ USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+
+ DBG_ASSERT( nStartNode <= nEndNode, "CreateAttribUndo: Start > End ?!" );
+
+ EditUndoSetAttribs* pUndo = NULL;
+ if ( rSet.GetPool() != &aEditDoc.GetItemPool() )
+ {
+ SfxItemSet aTmpSet( GetEmptyItemSet() );
+ aTmpSet.Put( rSet );
+ pUndo = new EditUndoSetAttribs( this, aESel, aTmpSet );
+ }
+ else
+ {
+ pUndo = new EditUndoSetAttribs( this, aESel, rSet );
+ }
+
+ SfxItemPool* pPool = pUndo->GetNewAttribs().GetPool();
+
+ for ( USHORT nPara = nStartNode; nPara <= nEndNode; nPara++ )
+ {
+ ContentNode* pNode = aEditDoc.GetObject( nPara );
+ DBG_ASSERT( aEditDoc.SaveGetObject( nPara ), "Node nicht gefunden: CreateAttribUndo" );
+ ContentAttribsInfo* pInf = new ContentAttribsInfo( pNode->GetContentAttribs().GetItems() );
+ pUndo->GetContentInfos().Insert( pInf, pUndo->GetContentInfos().Count() );
+
+ for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ )
+ {
+ EditCharAttribPtr pAttr = pNode->GetCharAttribs().GetAttribs()[ nAttr ];
+ if ( pAttr->GetLen() )
+ {
+ EditCharAttribPtr pNew = MakeCharAttrib( *pPool, *pAttr->GetItem(), pAttr->GetStart(), pAttr->GetEnd() );
+ pInf->GetPrevCharAttribs().Insert( pNew, pInf->GetPrevCharAttribs().Count() );
+ }
+ }
+ }
+ return pUndo;
+}
+
+void ImpEditEngine::UndoActionStart( USHORT nId, const ESelection& aSel )
+{
+ if ( IsUndoEnabled() && !IsInUndo() )
+ {
+ GetUndoManager().EnterListAction( GetEditEnginePtr()->GetUndoComment( nId ), XubString(), nId );
+ DBG_ASSERT( !pUndoMarkSelection, "UndoAction SelectionMarker?" );
+ pUndoMarkSelection = new ESelection( aSel );
+ }
+}
+
+void ImpEditEngine::UndoActionStart( USHORT nId )
+{
+ if ( IsUndoEnabled() && !IsInUndo() )
+ {
+ GetUndoManager().EnterListAction( GetEditEnginePtr()->GetUndoComment( nId ), XubString(), nId );
+ DBG_ASSERT( !pUndoMarkSelection, "UndoAction SelectionMarker?" );
+ }
+}
+
+void ImpEditEngine::UndoActionEnd( USHORT nId )
+{
+ if ( IsUndoEnabled() && !IsInUndo() )
+ {
+ GetUndoManager().LeaveListAction();
+ delete pUndoMarkSelection;
+ pUndoMarkSelection = NULL;
+ }
+}
+
+void ImpEditEngine::InsertUndo( EditUndo* pUndo, BOOL bTryMerge )
+{
+ DBG_ASSERT( !IsInUndo(), "InsertUndo im Undomodus!" );
+ if ( pUndoMarkSelection )
+ {
+ EditUndoMarkSelection* pU = new EditUndoMarkSelection( this, *pUndoMarkSelection );
+ GetUndoManager().AddUndoAction( pU, FALSE );
+ delete pUndoMarkSelection;
+ pUndoMarkSelection = NULL;
+ }
+ GetUndoManager().AddUndoAction( pUndo, bTryMerge );
+}
+
+void ImpEditEngine::ResetUndoManager()
+{
+ if ( HasUndoManager() )
+ GetUndoManager().Clear();
+}
+
+void ImpEditEngine::EnableUndo( BOOL bEnable )
+{
+ // Beim Umschalten des Modus Liste loeschen:
+ if ( bEnable != IsUndoEnabled() )
+ ResetUndoManager();
+
+ bUndoEnabled = bEnable;
+}
+
+BOOL ImpEditEngine::Undo( EditView* pView )
+{
+ if ( HasUndoManager() && GetUndoManager().GetUndoActionCount() )
+ {
+ SetActiveView( pView );
+ GetUndoManager().Undo( 1 );
+ return TRUE;
+ }
+ return FALSE;
+}
+
+BOOL ImpEditEngine::Redo( EditView* pView )
+{
+ if ( HasUndoManager() && GetUndoManager().GetRedoActionCount() )
+ {
+ SetActiveView( pView );
+ GetUndoManager().Redo( 0 );
+ return TRUE;
+ }
+ return FALSE;
+}
+
+BOOL ImpEditEngine::Repeat( EditView* /* pView */ )
+{
+ if ( HasUndoManager() && GetUndoManager().GetRepeatActionCount() )
+ {
+ DBG_WARNING( "Repeat nicht implementiert!" );
+ return TRUE;
+ }
+ return FALSE;
+}
+
+SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel )
+{
+ DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
+
+ aSel.Adjust( aEditDoc );
+
+ SfxItemSet aCurSet( GetEmptyItemSet() );
+
+ USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+
+
+ // ueber die Absaetze iterieren...
+ for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ {
+ ContentNode* pNode = aEditDoc.GetObject( nNode );
+ DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: GetAttrib" );
+
+ xub_StrLen nStartPos = 0;
+ xub_StrLen nEndPos = pNode->Len();
+ if ( nNode == nStartNode )
+ nStartPos = aSel.Min().GetIndex();
+ if ( nNode == nEndNode ) // kann auch == nStart sein!
+ nEndPos = aSel.Max().GetIndex();
+
+ // Problem: Vorlagen....
+ // => Andersrum:
+ // 1) Harte Zeichenattribute, wie gehabt...
+ // 2) Nur wenn OFF, Style and Absatzattr. pruefen...
+
+ // Erst die ganz harte Formatierung...
+ aEditDoc.FindAttribs( pNode, nStartPos, nEndPos, aCurSet );
+
+ // Und dann Absatzformatierung und Vorlage...
+ // SfxStyleSheet* pStyle = pNode->GetStyleSheet();
+ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
+ {
+ if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
+ {
+ // Nicht nur, wenn gesetzt, sondern auch Defaults
+ /*
+ if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SFX_ITEM_ON )
+ aCurSet.Put( pNode->GetContentAttribs().GetItems().Get( nWhich ) );
+ else if ( pStyle && ( pStyle->GetItemSet().GetItemState( nWhich ) == SFX_ITEM_ON ) )
+ aCurSet.Put( pStyle->GetItemSet().Get( nWhich ) );
+ */
+ // GetItem() hohlt das richtige...
+ const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich );
+ aCurSet.Put( rItem );
+ }
+ else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_ON )
+ {
+ // Generell vergleichen, weil bei SFX_ITEM_OFF das Default-Item aktiv ist.
+// if ( ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SFX_ITEM_ON ) ||
+// ( pStyle && ( pStyle->GetItemSet().GetItemState( nWhich ) == SFX_ITEM_ON ) ) )
+ {
+ // GetItem() hohlt das richtige...
+ const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich );
+ if ( rItem != aCurSet.Get( nWhich ) )
+ {
+ // Problem: Wenn Absatzvorlage mit z.B. Font,
+ // aber Font hart und anders und komplett in Selektion
+ // Falsch, wenn invalidiert....
+ // => Lieber nicht invalidieren, UMSTELLEN!
+ // Besser waere, Absatzweise ein ItemSet zu fuellen
+ // und dieses mit dem gesmten vergleichen.
+// aCurSet.InvalidateItem( nWhich );
+ if ( nWhich <= EE_PARA_END )
+ aCurSet.InvalidateItem( nWhich );
+ }
+ }
+ }
+ }
+ }
+
+ // Leere Slots mit Defaults fuellen...
+ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ )
+ {
+ if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
+ {
+ aCurSet.Put( aEditDoc.GetItemPool().GetDefaultItem( nWhich ) );
+ }
+ }
+
+#ifdef EDITDEBUG
+/*
+#ifdef MAC
+ FILE* fp = fopen( "debug.log", "a" );
+#elif defined UNX
+ FILE* fp = fopen( "/tmp/debug.log", "a" );
+#else
+ FILE* fp = fopen( "d:\\debug.log", "a" );
+#endif
+ if ( fp )
+ {
+ fprintf( fp, "\n \n<= Attribute: Absatz %i\n", nNode );
+ DbgOutItemSet( fp, aCurSet, TRUE, FALSE );
+ fclose( fp );
+ }
+*/
+#endif
+
+ return aCurSet;
+}
+
+void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, BYTE nSpecial )
+{
+ aSel.Adjust( aEditDoc );
+
+ // Wenn keine Selektion => die Attribute aufs Wort anwenden.
+ // ( Der RTF-Perser sollte die Methode eigentlich nie ohne Range rufen )
+ if ( ( nSpecial == ATTRSPECIAL_WHOLEWORD ) && !aSel.HasRange() )
+ aSel = SelectWord( aSel );
+
+ USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+
+ if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() )
+ {
+ EditUndoSetAttribs* pUndo = CreateAttribUndo( aSel, rSet );
+ pUndo->SetSpecial( nSpecial );
+ InsertUndo( pUndo );
+ }
+
+ // ueber die Absaetze iterieren...
+ for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ {
+ BOOL bParaAttribFound = FALSE;
+ BOOL bCharAttribFound = FALSE;
+
+ ContentNode* pNode = aEditDoc.GetObject( nNode );
+ ParaPortion* pPortion = GetParaPortions().GetObject( nNode );
+
+ DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: SetAttribs" );
+ DBG_ASSERT( GetParaPortions().GetObject( nNode ), "Portion nicht gefunden: SetAttribs" );
+
+ xub_StrLen nStartPos = 0;
+ xub_StrLen nEndPos = pNode->Len();
+ if ( nNode == nStartNode )
+ nStartPos = aSel.Min().GetIndex();
+ if ( nNode == nEndNode ) // kann auch == nStart sein!
+ nEndPos = aSel.Max().GetIndex();
+
+ // ueber die Items iterieren...
+#ifdef EDITDEBUG
+ FILE* fp = fopen( "d:\\debug.log", "a" );
+ if ( fp )
+ {
+ fprintf( fp, "\n \n=> Zeichen-Attribute: Absatz %i, %i-%i\n", nNode, nStartPos, nEndPos );
+ DbgOutItemSet( fp, rSet, TRUE, FALSE );
+ fclose( fp );
+ }
+#endif
+
+ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
+ {
+ if ( rSet.GetItemState( nWhich ) == SFX_ITEM_ON )
+ {
+ const SfxPoolItem& rItem = rSet.Get( nWhich );
+ if ( nWhich <= EE_PARA_END )
+ {
+ pNode->GetContentAttribs().GetItems().Put( rItem );
+ bParaAttribFound = TRUE;
+ }
+ else
+ {
+ aEditDoc.InsertAttrib( pNode, nStartPos, nEndPos, rItem );
+ bCharAttribFound = TRUE;
+ if ( nSpecial == ATTRSPECIAL_EDGE )
+ {
+ CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs();
+ USHORT nAttrs = rAttribs.Count();
+ for ( USHORT n = 0; n < nAttrs; n++ )
+ {
+ EditCharAttrib* pAttr = rAttribs.GetObject( n );
+ if ( pAttr->GetStart() > nEndPos )
+ break;
+
+ if ( ( pAttr->GetEnd() == nEndPos ) && ( pAttr->Which() == nWhich ) )
+ {
+ pAttr->SetEdge( TRUE );
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if ( bParaAttribFound )
+ {
+ ParaAttribsChanged( pPortion->GetNode() );
+ }
+ else if ( bCharAttribFound )
+ {
+ if ( !pNode->Len() || ( nStartPos != nEndPos ) )
+ pPortion->MarkSelectionInvalid( nStartPos, nEndPos-nStartPos );
+ }
+ }
+}
+
+void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, BOOL bRemoveParaAttribs, USHORT nWhich )
+{
+ aSel.Adjust( aEditDoc );
+
+ USHORT nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+ USHORT nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+
+ const SfxItemSet* pEmptyItemSet = bRemoveParaAttribs ? &GetEmptyItemSet() : 0;
+
+ if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() )
+ {
+ // Eventuel spezielles Undo, oder ItemSet*
+ EditUndoSetAttribs* pUndo = CreateAttribUndo( aSel, GetEmptyItemSet() );
+ pUndo->SetRemoveAttribs( TRUE );
+ pUndo->SetRemoveParaAttribs( bRemoveParaAttribs );
+ pUndo->SetRemoveWhich( nWhich );
+ InsertUndo( pUndo );
+ }
+
+ // ueber die Absaetze iterieren...
+ for ( USHORT nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ {
+ ContentNode* pNode = aEditDoc.GetObject( nNode );
+ ParaPortion* pPortion = GetParaPortions().GetObject( nNode );
+
+ DBG_ASSERT( aEditDoc.SaveGetObject( nNode ), "Node nicht gefunden: SetAttribs" );
+ DBG_ASSERT( GetParaPortions().SaveGetObject( nNode ), "Portion nicht gefunden: SetAttribs" );
+
+ xub_StrLen nStartPos = 0;
+ xub_StrLen nEndPos = pNode->Len();
+ if ( nNode == nStartNode )
+ nStartPos = aSel.Min().GetIndex();
+ if ( nNode == nEndNode ) // kann auch == nStart sein!
+ nEndPos = aSel.Max().GetIndex();
+
+ // Optimieren: Wenn ganzer Absatz, dann RemoveCharAttribs( nPara )?!
+ BOOL bChanged = aEditDoc.RemoveAttribs( pNode, nStartPos, nEndPos, nWhich );
+ if ( bRemoveParaAttribs )
+ SetParaAttribs( nNode, *pEmptyItemSet ); // Invalidiert
+ else
+ {
+ // Bei 'Format-Standard' sollen auch die Zeichenattribute verschwinden,
+ // die von der DrawingEngine als Absatzattribute eingestellt wurden.
+ // Diese koennen sowieso nicht vom Anwender eingestellt worden sein.
+ SfxItemSet aAttribs( GetParaAttribs( nNode ) );
+ for ( USHORT nW = EE_CHAR_START; nW <= EE_CHAR_END; nW++ )
+ aAttribs.ClearItem( nW );
+ SetParaAttribs( nNode, aAttribs );
+ }
+
+ if ( bChanged && !bRemoveParaAttribs )
+ pPortion->MarkSelectionInvalid( nStartPos, nEndPos-nStartPos );
+ }
+}
+
+typedef EditCharAttrib* EditCharAttribPtr;
+
+void ImpEditEngine::RemoveCharAttribs( USHORT nPara, USHORT nWhich, BOOL bRemoveFeatures )
+{
+ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+ ParaPortion* pPortion = GetParaPortions().SaveGetObject( nPara );
+
+ DBG_ASSERT( pNode, "Node nicht gefunden: RemoveCharAttribs" );
+ DBG_ASSERT( pPortion, "Portion nicht gefunden: RemoveCharAttribs" );
+
+ if ( !pNode )
+ return;
+
+ USHORT nAttr = 0;
+ EditCharAttribPtr pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ while ( pAttr )
+ {
+ if ( ( !pAttr->IsFeature() || bRemoveFeatures ) &&
+ ( !nWhich || ( pAttr->GetItem()->Which() == nWhich ) ) )
+ {
+ pNode->GetCharAttribs().GetAttribs().Remove( nAttr );
+ delete pAttr;
+ nAttr--;
+ }
+ nAttr++;
+ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+ }
+
+ pPortion->MarkSelectionInvalid( 0, pNode->Len() );
+}
+
+void ImpEditEngine::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+{
+ ContentNode* pNode = aEditDoc.SaveGetObject( nPara );
+
+ if ( !pNode )
+ return;
+
+#ifdef EDITDEBUG
+ FILE* fp = fopen( "d:\\debug.log", "a" );
+ if ( fp )
+ {
+ fprintf( fp, "\n \n=> Absatz-Attribute: Absatz %i\n", nPara );
+ DbgOutItemSet( fp, rSet, TRUE, FALSE );
+ fclose( fp );
+ }
+#endif
+
+ if ( !( pNode->GetContentAttribs().GetItems() == rSet ) )
+ {
+ if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() )
+ {
+ if ( rSet.GetPool() != &aEditDoc.GetItemPool() )
+ {
+ SfxItemSet aTmpSet( GetEmptyItemSet() );
+ aTmpSet.Put( rSet );
+ InsertUndo( new EditUndoSetParaAttribs( this, nPara, pNode->GetContentAttribs().GetItems(), aTmpSet ) );
+ }
+ else
+ {
+ InsertUndo( new EditUndoSetParaAttribs( this, nPara, pNode->GetContentAttribs().GetItems(), rSet ) );
+ }
+ }
+ pNode->GetContentAttribs().GetItems().Set( rSet );
+ if ( aStatus.UseCharAttribs() )
+ pNode->CreateDefFont();
+
+ ParaAttribsChanged( pNode );
+ }
+}
+
+const SfxItemSet& ImpEditEngine::GetParaAttribs( USHORT nPara ) const
+{
+ ContentNode* pNode = aEditDoc.GetObject( nPara );
+ DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAttribs" );
+ return pNode->GetContentAttribs().GetItems();
+}
+
+BOOL ImpEditEngine::HasParaAttrib( USHORT nPara, USHORT nWhich ) const
+{
+ ContentNode* pNode = aEditDoc.GetObject( nPara );
+ DBG_ASSERT( pNode, "Node nicht gefunden: HasParaAttrib" );
+
+ // LRSPACE kann ggf. auch OUTLLRSPACE sein!
+
+ BOOL bHasItem = pNode->GetContentAttribs().HasItem( nWhich );
+ if ( nWhich == EE_PARA_LRSPACE )
+ {
+ if ( aStatus.IsOutliner() ||
+ ( aStatus.IsOutliner2() && !pNode->GetContentAttribs().HasItem( EE_PARA_LRSPACE ) ) )
+ {
+ bHasItem = pNode->GetContentAttribs().HasItem( EE_PARA_OUTLLRSPACE );
+ }
+ }
+ return bHasItem;
+}
+
+const SfxPoolItem& ImpEditEngine::GetParaAttrib( USHORT nPara, USHORT nWhich )
+{
+ ContentNode* pNode = aEditDoc.GetObject( nPara );
+ DBG_ASSERT( pNode, "Node nicht gefunden: GetParaAttrib" );
+
+ // LRSPACE kann ggf. auch OUTLLRSPACE sein!
+ if ( nWhich != EE_PARA_LRSPACE )
+ return pNode->GetContentAttribs().GetItem( nWhich );
+ else
+ return GetLRSpaceItem( pNode );
+}
+
+void ImpEditEngine::GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const
+{
+ rLst.Remove( 0, rLst.Count() );
+ ContentNode* pNode = aEditDoc.GetObject( nPara );
+ if ( pNode )
+ {
+ for ( USHORT nAttr = 0; nAttr < pNode->GetCharAttribs().Count(); nAttr++ )
+ {
+ EditCharAttribPtr pAttr = pNode->GetCharAttribs().GetAttribs()[ nAttr ];
+ EECharAttrib aEEAttr;
+ aEEAttr.pAttr = pAttr->GetItem();
+ aEEAttr.nPara = nPara;
+ aEEAttr.nStart = pAttr->GetStart();
+ aEEAttr.nEnd = pAttr->GetEnd();
+ rLst.Insert( aEEAttr, rLst.Count() );
+ }
+ }
+}
+
+void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode )
+{
+ pNode->GetCharAttribs().DeleteEmptyAttribs( GetEditDoc().GetItemPool() );
+ xub_StrLen nEndPos = pNode->Len();
+ for ( USHORT nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich++ )
+ {
+ if ( pNode->GetContentAttribs().HasItem( nWhich ) )
+ {
+ const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich );
+ // Die Luecken auffuellen:
+ USHORT nLastEnd = 0;
+ EditCharAttrib* pAttr = pNode->GetCharAttribs().FindNextAttrib( nWhich, nLastEnd );
+ while ( pAttr )
+ {
+ if ( pAttr->GetStart() > nLastEnd )
+ aEditDoc.InsertAttrib( pNode, nLastEnd, pAttr->GetStart(), rItem );
+ nLastEnd = pAttr->GetEnd();
+ pAttr = pNode->GetCharAttribs().FindNextAttrib( nWhich, nLastEnd );
+ }
+
+ // Und den Rest:
+ if ( nLastEnd < nEndPos )
+ aEditDoc.InsertAttrib( pNode, nLastEnd, nEndPos, rItem );
+ }
+ }
+ // Portion braucht hier nicht invalidiert werden, geschieht woanders.
+}
+
+IdleFormattter::IdleFormattter()
+{
+ pView = 0;
+ nRestarts = 0;
+}
+
+IdleFormattter::~IdleFormattter()
+{
+ pView = 0;
+}
+
+void IdleFormattter::DoIdleFormat( EditView* pV )
+{
+ pView = pV;
+
+ if ( IsActive() )
+ nRestarts++;
+
+ if ( nRestarts > 4 )
+ ForceTimeout();
+ else
+ Start();
+}
+
+void IdleFormattter::ForceTimeout()
+{
+ if ( IsActive() )
+ {
+ Stop();
+ ((Link&)GetTimeoutHdl()).Call( this );
+ }
+}
+
+ImplIMEInfos::ImplIMEInfos( const EditPaM& rPos )
+{
+ aPos = rPos;
+ nLen = 0;
+ bCursor = TRUE;
+ pAttribs = NULL;
+}
+
+ImplIMEInfos::~ImplIMEInfos()
+{
+ delete pAttribs;
+}
+
+void ImplIMEInfos::CopyAttribs( const USHORT* pA, USHORT nL )
+{
+ nLen = nL;
+ delete pAttribs;
+ pAttribs = new USHORT[ nL ];
+ memcpy( pAttribs, pA, nL*sizeof(USHORT) );
+}
+
+void ImplIMEInfos::DestroyAttribs()
+{
+ delete pAttribs;
+ pAttribs = NULL;
+}
diff --git a/svx/source/editeng/makefile.mk b/svx/source/editeng/makefile.mk
new file mode 100644
index 0000000000..fe00d2c5aa
--- /dev/null
+++ b/svx/source/editeng/makefile.mk
@@ -0,0 +1,169 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning 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=editeng
+AUTOSEG=true
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=eeng_pch
+PROJECTPCHSOURCE=eeng_pch
+
+#ENABLE_EXCEPTIONS=TRUE
+
+
+# --- Settings -----------------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Allgemein ----------------------------------------------------------
+
+.IF "$(editdebug)" != "" || "$(EDITDEBUG)" != ""
+CDEFS+=-DEDITDEBUG
+.ENDIF
+
+.IF "$(header)" == ""
+
+CXXFILES= \
+ txtrange.cxx \
+ svxacorr.cxx \
+ swafopt.cxx \
+ editattr.cxx \
+ editdbg.cxx \
+ editdoc.cxx \
+ editdoc2.cxx \
+ editeng.cxx \
+ editobj.cxx \
+ editsel.cxx \
+ editundo.cxx \
+ editview.cxx \
+ edtspell.cxx \
+ eeng_pch.cxx \
+ eehtml.cxx \
+ eerdll.cxx \
+ eertfpar.cxx \
+ impedit.cxx \
+ impedit2.cxx \
+ impedit3.cxx \
+ impedit4.cxx \
+ impedit5.cxx \
+ textconv.cxx \
+ unolingu.cxx
+
+SLOFILES = \
+ $(SLO)$/txtrange.obj \
+ $(SLO)$/svxacorr.obj \
+ $(SLO)$/swafopt.obj \
+ $(SLO)$/editattr.obj \
+ $(SLO)$/editdbg.obj \
+ $(SLO)$/editdoc.obj \
+ $(SLO)$/editdoc2.obj \
+ $(SLO)$/editeng.obj \
+ $(SLO)$/editobj.obj \
+ $(SLO)$/editsel.obj \
+ $(SLO)$/editundo.obj \
+ $(SLO)$/editview.obj \
+ $(SLO)$/edtspell.obj \
+ $(SLO)$/eehtml.obj \
+ $(SLO)$/eerdll.obj \
+ $(SLO)$/eertfpar.obj \
+ $(SLO)$/impedit.obj \
+ $(SLO)$/impedit2.obj \
+ $(SLO)$/impedit3.obj \
+ $(SLO)$/impedit4.obj \
+ $(SLO)$/impedit5.obj \
+ $(SLO)$/textconv.obj \
+ $(SLO)$/unolingu.obj
+
+SVXLIGHTOBJFILES= \
+ $(OBJ)$/txtrange.obj \
+ $(OBJ)$/swafopt.obj \
+ $(OBJ)$/editattr.obj \
+ $(OBJ)$/editdbg.obj \
+ $(OBJ)$/editdoc.obj \
+ $(OBJ)$/editdoc2.obj \
+ $(OBJ)$/editeng.obj \
+ $(OBJ)$/editobj.obj \
+ $(OBJ)$/editsel.obj \
+ $(OBJ)$/editundo.obj \
+ $(OBJ)$/editview.obj \
+ $(OBJ)$/eerdll.obj \
+ $(OBJ)$/impedit.obj \
+ $(OBJ)$/impedit2.obj \
+ $(OBJ)$/impedit3.obj \
+ $(OBJ)$/impedit4.obj \
+ $(OBJ)$/impedit5.obj \
+ $(OBJ)$/textconv.obj
+.ENDIF
+
+SRCFILES= editeng.src
+
+EXCEPTIONSFILES= \
+ $(SLO)$/unolingu.obj
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/editeng/svxacorr.cxx b/svx/source/editeng/svxacorr.cxx
new file mode 100644
index 0000000000..009ffbfba1
--- /dev/null
+++ b/svx/source/editeng/svxacorr.cxx
@@ -0,0 +1,2380 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxacorr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_UNDERLINE 0
+#define ITEMID_WEIGHT 0
+#define ITEMID_ESCAPEMENT 0
+#define ITEMID_CHARSETCOLOR 0
+#define ITEMID_COLOR 0
+
+#ifndef _SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _LANG_HXX //autogen
+#include <tools/lang.hxx>
+#endif
+#ifndef _FSYS_HXX //autogen
+#include <tools/fsys.hxx>
+#endif
+#ifndef _APP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _STORINFO_HXX //autogen
+#include <sot/storinfo.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SFX_HELP_HXX
+#include <sfx2/sfxhelp.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX
+#include <sfx2/saveopt.hxx>
+#endif
+// fuer die Sort-String-Arrays aus dem SVMEM.HXX
+#define _SVSTDARR_STRINGSISORTDTOR
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+
+#ifndef _SVX_SVXIDS_HRC
+#include <svxids.hrc>
+#endif
+
+#include "udlnitem.hxx"
+#include "wghtitem.hxx"
+#include "escpitem.hxx"
+#include "svxacorr.hxx"
+
+#ifndef _SVX_HELPID_HRC
+#include <helpid.hrc>
+#endif
+
+const int C_NONE = 0x00;
+const int C_FULL_STOP = 0x01;
+const int C_EXCLAMATION_MARK = 0x02;
+const int C_QUESTION_MARK = 0x04;
+
+static const sal_Char pImplWrdStt_ExcptLstStr[] = "WordExceptList";
+static const sal_Char pImplCplStt_ExcptLstStr[] = "SentenceExceptList";
+static const sal_Char pImplAutocorr_ListStr[] = "DocumentList";
+
+static const sal_Char
+ /* auch bei diesen Anfaengen - Klammern auf und alle Arten von Anf.Zei. */
+ sImplSttSkipChars[] = "\"\'([{\x83\x84\x89\x91\x92\x93\x94",
+ /* auch bei diesen Ende - Klammern auf und alle Arten von Anf.Zei. */
+ sImplEndSkipChars[] = "\"\')]}\x83\x84\x89\x91\x92\x93\x94";
+
+// diese Zeichen sind in Worten erlaubt: (fuer FnCptlSttSntnc)
+static const sal_Char sImplWordChars[] = "-'";
+
+void EncryptBlockName_Imp( String& rName );
+void DecryptBlockName_Imp( String& rName );
+
+
+// FileVersions Nummern fuer die Ersetzungs-/Ausnahmelisten getrennt
+#define WORDLIST_VERSION_358 1
+#define EXEPTLIST_VERSION_358 0
+
+
+_SV_IMPL_SORTAR_ALG( SvxAutocorrWordList, SvxAutocorrWordPtr )
+TYPEINIT0(SvxAutoCorrect)
+
+
+inline int IsWordDelim( const sal_Unicode c )
+{
+ return ' ' == c || '\t' == c || 0x0a == c ||
+ 0xA0 == c || 0x2011 == c || 0x1 == c;
+}
+
+static BOOL lcl_IsInAsciiArr( const sal_Char* pArr, const sal_Unicode c )
+{
+ BOOL bRet = FALSE;
+ for( ; *pArr; ++pArr )
+ if( *pArr == c )
+ {
+ bRet = TRUE;
+ break;
+ }
+ return bRet;
+}
+
+SvxAutoCorrDoc::~SvxAutoCorrDoc()
+{
+}
+
+
+ // wird nach dem austauschen der Zeichen von den Funktionen
+ // - FnCptlSttWrd
+ // - FnCptlSttSntnc
+ // gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten
+ // aufgenommen werden.
+void SvxAutoCorrDoc::SaveCpltSttWord( ULONG, xub_StrLen, const String&,
+ sal_Unicode )
+{
+}
+
+LanguageType SvxAutoCorrDoc::GetLanguage( xub_StrLen , BOOL ) const
+{
+ return LANGUAGE_SYSTEM;
+}
+
+
+void SvxAutocorrWordList::DeleteAndDestroy( USHORT nP, USHORT nL )
+{
+ if( nL )
+ {
+ DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
+ for( USHORT n=nP; n < nP + nL; n++ )
+ delete *((SvxAutocorrWordPtr*)pData+n);
+ SvPtrarr::Remove( nP, nL );
+ }
+}
+
+
+BOOL SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, USHORT* pP ) const
+{
+ register USHORT nO = SvxAutocorrWordList_SAR::Count(),
+ nM,
+ nU = 0;
+ const International& rInter = Application::GetAppInternational();
+ if( nO > 0 )
+ {
+ nO--;
+ while( nU <= nO )
+ {
+ nM = nU + ( nO - nU ) / 2;
+ StringCompare eCmp = rInter.Compare( aE->GetShort(),
+ (*((SvxAutocorrWordPtr*)pData + nM))->GetShort() );
+ if( COMPARE_EQUAL == eCmp )
+ {
+ if( pP ) *pP = nM;
+ return TRUE;
+ }
+ else if( COMPARE_GREATER == eCmp )
+ nU = nM + 1;
+ else if( nM == 0 )
+ {
+ if( pP ) *pP = nU;
+ return FALSE;
+ }
+ else
+ nO = nM - 1;
+ }
+ }
+ if( pP ) *pP = nU;
+ return FALSE;
+}
+
+/* -----------------18.11.98 15:28-------------------
+ *
+ * --------------------------------------------------*/
+void lcl_ClearTable(SvxAutoCorrLanguageTable& rLangTable)
+{
+ SvxAutoCorrectLanguageListsPtr pLists = rLangTable.Last();
+ while(pLists)
+ {
+ delete pLists;
+ pLists = rLangTable.Prev();
+ }
+ rLangTable.Clear();
+}
+
+/* -----------------19.11.98 10:15-------------------
+ *
+ * --------------------------------------------------*/
+long SvxAutoCorrect::GetDefaultFlags()
+{
+ long nRet = Autocorrect
+ | CptlSttSntnc
+ | CptlSttWrd
+ | ChgFractionSymbol
+ | ChgOrdinalNumber
+ | ChgToEnEmDash
+ | ChgWeightUnderl
+ | SetINetAttr
+ | ChgQuotes
+ | SaveWordCplSttLst
+ | SaveWordWrdSttLst;
+ LanguageType eLang = Application::GetAppInternational().GetLanguage();
+ if( LANGUAGE_SYSTEM == eLang )
+ eLang = System::GetLanguage();
+ switch( eLang )
+ {
+ case LANGUAGE_ENGLISH:
+ case LANGUAGE_ENGLISH_US:
+ case LANGUAGE_ENGLISH_UK:
+ case LANGUAGE_ENGLISH_AUS:
+ case LANGUAGE_ENGLISH_CAN:
+ case LANGUAGE_ENGLISH_NZ:
+ case LANGUAGE_ENGLISH_EIRE:
+ case LANGUAGE_ENGLISH_SAFRICA:
+ case LANGUAGE_ENGLISH_JAMAICA:
+ case LANGUAGE_ENGLISH_CARRIBEAN:
+ nRet &= ~(ChgQuotes|ChgSglQuotes);
+ break;
+ }
+ return nRet;
+}
+SvxAutoCorrect::SvxAutoCorrect( const String& rAutocorrFile )
+ : sAutoCorrFile( rAutocorrFile ),
+ cStartSQuote( 0 ), cEndSQuote( 0 ), cStartDQuote( 0 ), cEndDQuote( 0 )
+{
+ nFlags = SvxAutoCorrect::GetDefaultFlags();
+
+ c1Div2 = ByteString::ConvertToUnicode( '\xBD', RTL_TEXTENCODING_MS_1252 );
+ c1Div4 = ByteString::ConvertToUnicode( '\xBC', RTL_TEXTENCODING_MS_1252 );
+ c3Div4 = ByteString::ConvertToUnicode( '\xBE', RTL_TEXTENCODING_MS_1252 );
+ cEmDash = ByteString::ConvertToUnicode( '\x97', RTL_TEXTENCODING_MS_1252 );
+ cEnDash = ByteString::ConvertToUnicode( '\x96', RTL_TEXTENCODING_MS_1252 );
+}
+
+SvxAutoCorrect::SvxAutoCorrect( const SvxAutoCorrect& rCpy )
+ : nFlags( rCpy.nFlags & ~(ChgWordLstLoad|CplSttLstLoad|WrdSttLstLoad)),
+ aSwFlags( rCpy.aSwFlags ),
+/* Die Sprachentabelle wird neu aufgebaut, da sie im Dtor von rCpy abgeraeumt wird!
+ */
+// aLangTable( rCpy.aLangTable ),
+ sAutoCorrFile( rCpy.sAutoCorrFile ),
+ cStartSQuote( rCpy.cStartSQuote ), cEndSQuote( rCpy.cEndSQuote ),
+ cStartDQuote( rCpy.cStartDQuote ), cEndDQuote( rCpy.cEndDQuote ),
+ c1Div2( rCpy.c1Div2 ), c1Div4( rCpy.c1Div4 ), c3Div4( rCpy.c3Div4 ),
+ cEmDash( rCpy.cEmDash ), cEnDash( rCpy.cEnDash )
+{
+/*
+Die Liste braeuchten nicht kopiert werden, denn in der Datei stehen die
+gueltigen Werte. Ausserdem ist so gewaehrleistet, das der Writer seine
+Storages auch wiederfindet.
+
+ if( rCpy.pCplStt_ExcptLst )
+ {
+ }
+ if( rCpy.pWrdStt_ExcptLst )
+ {
+ }
+
+ if( rCpy.pAutocorr_List )
+ {
+ pAutocorr_List = new SvxAutocorrWordList( 16, 16 );
+ for( USHORT n = 0; n < rCpy.pAutocorr_List->Count(); ++n )
+ {
+ }
+ }
+*/
+}
+
+
+SvxAutoCorrect::~SvxAutoCorrect()
+{
+ lcl_ClearTable(aLangTable);
+}
+
+
+void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, BOOL bOn )
+{
+ long nOld = nFlags;
+ nFlags = bOn ? nFlags | nFlag
+ : nFlags & ~nFlag;
+
+ if( !bOn )
+ {
+ if( (nOld & CptlSttSntnc) != (nFlags & CptlSttSntnc) )
+ nFlags &= ~CplSttLstLoad;
+ if( (nOld & CptlSttWrd) != (nFlags & CptlSttWrd) )
+ nFlags &= ~WrdSttLstLoad;
+ if( (nOld & Autocorrect) != (nFlags & Autocorrect) )
+ nFlags &= ~ChgWordLstLoad;
+ }
+}
+
+
+ // Zwei Grossbuchstaben am Wort-Anfang ??
+BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
+ xub_StrLen nSttPos, xub_StrLen nEndPos,
+ LanguageType eLang )
+{
+ BOOL bRet = FALSE;
+ const International& rInter = Application::GetAppInternational();
+
+ // loesche alle nicht alpanum. Zeichen am Wortanfang/-ende und
+ // teste dann ( erkennt: "(min.", "/min.", usw.)
+ for( ; nSttPos < nEndPos; ++nSttPos )
+ if( rInter.IsAlphaNumeric( rTxt.GetChar( nSttPos ) ))
+ break;
+ for( ; nSttPos < nEndPos; --nEndPos )
+ if( rInter.IsAlphaNumeric( rTxt.GetChar( nEndPos - 1 ) ))
+ break;
+
+ // Zwei Grossbuchstaben am Wort-Anfang ??
+ if( nSttPos+2 < nEndPos &&
+ ((INTN_CHAR_UPPER | INTN_CHAR_ALPHA) ==
+ rInter.GetCharType( rTxt.GetChar( nSttPos ) )) &&
+ ((INTN_CHAR_UPPER | INTN_CHAR_ALPHA) ==
+ rInter.GetCharType( rTxt.GetChar( ++nSttPos ) )) &&
+ // ist das 3. Zeichen ein klein geschiebenes Alpha-Zeichen
+ ((INTN_CHAR_LOWER | INTN_CHAR_ALPHA) ==
+ rInter.GetCharType( rTxt.GetChar( nSttPos+1 ) )) &&
+ // keine Sonder-Attribute ersetzen
+ 0x1 != rTxt.GetChar( nSttPos ) && 0x2 != rTxt.GetChar( nSttPos ))
+ {
+ // teste ob das Wort in einer Ausnahmeliste steht
+ String sWord( rTxt.Copy( nSttPos - 1, nEndPos - nSttPos + 1 ));
+ if( !FindInWrdSttExceptList(eLang, sWord) )
+ {
+ sal_Unicode cSave = rTxt.GetChar( nSttPos );
+ String sChar( cSave );
+ rInter.ToLower( sChar );
+ if( rDoc.Replace( nSttPos, sChar ))
+ {
+ if( SaveWordWrdSttLst & nFlags )
+ rDoc.SaveCpltSttWord( CptlSttWrd, nSttPos, sWord, cSave );
+ bRet = TRUE;
+ }
+ }
+ }
+ return bRet;
+}
+
+
+BOOL SvxAutoCorrect::FnChgFractionSymbol(
+ SvxAutoCorrDoc& rDoc, const String& rTxt,
+ xub_StrLen nSttPos, xub_StrLen nEndPos )
+{
+ sal_Unicode cChar = 0;
+
+ for( ; nSttPos < nEndPos; ++nSttPos )
+ if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nSttPos ) ))
+ break;
+ for( ; nSttPos < nEndPos; --nEndPos )
+ if( !lcl_IsInAsciiArr( sImplEndSkipChars, rTxt.GetChar( nEndPos - 1 ) ))
+ break;
+
+ // 1/2, 1/4, ... ersetzen durch das entsprechende Zeichen vom Font
+ if( 3 == nEndPos - nSttPos && '/' == rTxt.GetChar( nSttPos+1 ))
+ {
+ switch( ( rTxt.GetChar( nSttPos )) * 256 + rTxt.GetChar( nEndPos-1 ))
+ {
+ case '1' * 256 + '2': cChar = c1Div2; break;
+ case '1' * 256 + '4': cChar = c1Div4; break;
+ case '3' * 256 + '4': cChar = c3Div4; break;
+ }
+
+ if( cChar )
+ {
+ // also austauschen:
+ rDoc.Delete( nSttPos+1, nEndPos );
+ rDoc.Replace( nSttPos, cChar );
+ }
+ }
+ return 0 != cChar;
+}
+
+
+BOOL SvxAutoCorrect::FnChgOrdinalNumber(
+ SvxAutoCorrDoc& rDoc, const String& rTxt,
+ xub_StrLen nSttPos, xub_StrLen nEndPos )
+{
+// 1st, 2nd, 3rd, 4 - 0th
+// 201th oder 201st
+// 12th oder 12nd
+ const International& rInter = Application::GetAppInternational();
+ sal_Unicode c;
+ BOOL bChg = FALSE;
+
+ for( ; nSttPos < nEndPos; ++nSttPos )
+ if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nSttPos ) ))
+ break;
+ for( ; nSttPos < nEndPos; --nEndPos )
+ if( !lcl_IsInAsciiArr( sImplEndSkipChars, rTxt.GetChar( nEndPos - 1 ) ))
+ break;
+
+ if( 2 < nEndPos - nSttPos &&
+ rInter.IsNumeric( c = rTxt.GetChar( nEndPos - 3 ) ) )
+ {
+ static sal_Char __READONLY_DATA
+ sAll[] = "th", /* rest */
+ sFirst[] = "st", /* 1 */
+ sSecond[] = "nd", /* 2 */
+ sThird[] = "rd"; /* 3 */
+ static const sal_Char* __READONLY_DATA aNumberTab[ 4 ] =
+ {
+ sAll, sFirst, sSecond, sThird
+ };
+
+ if( ( c -= '0' ) > 3 )
+ c = 0;
+
+ bChg = ( ((sal_Unicode)*((aNumberTab[ c ])+0)) ==
+ rTxt.GetChar( nEndPos - 2 ) &&
+ ((sal_Unicode)*((aNumberTab[ c ])+1)) ==
+ rTxt.GetChar( nEndPos - 1 )) ||
+ ( 3 < nEndPos - nSttPos &&
+ ( ((sal_Unicode)*(sAll+0)) == rTxt.GetChar( nEndPos - 2 ) &&
+ ((sal_Unicode)*(sAll+1)) == rTxt.GetChar( nEndPos - 1 )));
+
+ if( bChg )
+ {
+ // dann pruefe mal, ob alle bis zum Start alle Zahlen sind
+ for( xub_StrLen n = nEndPos - 3; nSttPos < n; )
+ if( !rInter.IsNumeric( rTxt.GetChar( --n )) )
+ {
+ bChg = FALSE;
+ break;
+ }
+
+ if( bChg ) // dann setze mal das Escapement Attribut
+ {
+ SvxEscapementItem aSvxEscapementItem( DFLT_ESC_AUTO_SUPER,
+ DFLT_ESC_PROP );
+ rDoc.SetAttr( nEndPos - 2, nEndPos,
+ SID_ATTR_CHAR_ESCAPEMENT,
+ aSvxEscapementItem);
+ }
+ }
+
+ }
+ return bChg;
+}
+
+
+BOOL SvxAutoCorrect::FnChgToEnEmDash(
+ SvxAutoCorrDoc& rDoc, const String& rTxt,
+ xub_StrLen nSttPos, xub_StrLen nEndPos )
+{
+ BOOL bRet = FALSE;
+ const International& rInter = Application::GetAppInternational();
+
+ // ersetze " - " oder " --" durch "enDash"
+ if( cEnDash && 1 < nSttPos && 1 <= nEndPos - nSttPos )
+ {
+ sal_Unicode cCh = rTxt.GetChar( nSttPos );
+ if( '-' == cCh )
+ {
+ if( ' ' == rTxt.GetChar( nSttPos-1 ) &&
+ '-' == rTxt.GetChar( nSttPos+1 ))
+ {
+ xub_StrLen n;
+ for( n = nSttPos+2; n < nEndPos && lcl_IsInAsciiArr(
+ sImplSttSkipChars,(cCh = rTxt.GetChar( n )));
+ ++n )
+ ;
+
+ // found: " --[<AnySttChars>][A-z0-9]
+ if( rInter.IsAlphaNumeric( cCh ) )
+ {
+ for( n = nSttPos-1; n && lcl_IsInAsciiArr(
+ sImplEndSkipChars,(cCh = rTxt.GetChar( --n ))); )
+ ;
+
+ // found: "[A-z0-9][<AnyEndChars>] --[<AnySttChars>][A-z0-9]
+ if( rInter.IsAlphaNumeric( cCh ))
+ {
+ rDoc.Delete( nSttPos, nSttPos + 2 );
+ rDoc.Insert( nSttPos, cEnDash );
+ bRet = TRUE;
+ }
+ }
+ }
+ }
+ else if( 3 < nSttPos &&
+ ' ' == rTxt.GetChar( nSttPos-1 ) &&
+ '-' == rTxt.GetChar( nSttPos-2 ))
+ {
+ xub_StrLen n, nLen = 1, nTmpPos = nSttPos - 2;
+ if( '-' == ( cCh = rTxt.GetChar( nTmpPos-1 )) )
+ {
+ --nTmpPos;
+ ++nLen;
+ cCh = rTxt.GetChar( nTmpPos-1 );
+ }
+ if( ' ' == cCh )
+ {
+ for( n = nSttPos; n < nEndPos && lcl_IsInAsciiArr(
+ sImplSttSkipChars,(cCh = rTxt.GetChar( n )));
+ ++n )
+ ;
+
+ // found: " - [<AnySttChars>][A-z0-9]
+ if( rInter.IsAlphaNumeric( cCh ) )
+ {
+ cCh = ' ';
+ for( n = nTmpPos-1; n && lcl_IsInAsciiArr(
+ sImplEndSkipChars,(cCh = rTxt.GetChar( --n ))); )
+ ;
+ // found: "[A-z0-9][<AnyEndChars>] - [<AnySttChars>][A-z0-9]
+ if( rInter.IsAlphaNumeric( cCh ))
+ {
+ rDoc.Delete( nTmpPos, nTmpPos + nLen );
+ rDoc.Insert( nTmpPos, cEnDash );
+ bRet = TRUE;
+ }
+ }
+ }
+ }
+ }
+
+ // ersetze [A-z0-9]--[A-z0-9] durch "emDash"
+ if( cEmDash && 4 <= nEndPos - nSttPos )
+ {
+ String sTmp( rTxt.Copy( nSttPos, nEndPos - nSttPos ) );
+ xub_StrLen nFndPos = sTmp.SearchAscii( "--" );
+ if( STRING_NOTFOUND != nFndPos && nFndPos &&
+ nFndPos + 2 < sTmp.Len() &&
+ ( rInter.IsAlphaNumeric( sTmp.GetChar( nFndPos - 1 ) ) ||
+ lcl_IsInAsciiArr( sImplEndSkipChars, rTxt.GetChar( nFndPos - 1 ) )) &&
+ ( rInter.IsAlphaNumeric( sTmp.GetChar( nFndPos + 2 ) ) ||
+ lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nFndPos + 2 ) )))
+ {
+ nSttPos += nFndPos;
+ rDoc.Delete( nSttPos, nSttPos + 2 );
+ rDoc.Insert( nSttPos, cEmDash );
+ bRet = TRUE;
+ }
+ }
+ return bRet;
+}
+
+
+BOOL SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt,
+ xub_StrLen nSttPos, xub_StrLen nEndPos )
+{
+ // 1. Schritt: alle NICHT alphanumerischen Zeichen am Anfang entfernen
+ // und alle festgelegten Zeichen am Ende (laut Netscape!)
+ const International& rInter = Application::GetAppInternational();
+ String sQuotes;
+ if( !GetEndDoubleQuote() || !GetEndSingleQuote() )
+ {
+ LanguageType eLang = rDoc.GetLanguage( nEndPos, FALSE );
+
+ // dann ueber die Language das richtige Zeichen heraussuchen
+ if( LANGUAGE_NONE != eLang )
+ {
+ International* pIntl = (International*)&rInter;
+
+ if( eLang != pIntl->GetLanguage() && LANGUAGE_SYSTEM != eLang )
+ pIntl = new International( eLang );
+
+ sQuotes = GetEndDoubleQuote()
+ ? GetEndDoubleQuote()
+ : pIntl->GetDoubleQuotationMarkEndChar();
+
+ sQuotes += GetEndSingleQuote()
+ ? GetEndSingleQuote()
+ : pIntl->GetDoubleQuotationMarkEndChar();
+
+ if( pIntl != &rInter )
+ delete pIntl;
+ }
+ }
+ else
+ ( sQuotes = GetEndDoubleQuote() ) += GetEndSingleQuote();
+
+ String sURL( INetURLObject::FindFirstURLInText( rTxt, nSttPos, nEndPos,
+ rInter, &sQuotes ));
+ BOOL bRet = 0 != sURL.Len();
+ if( bRet ) // also Attribut setzen:
+ rDoc.SetINetAttr( nSttPos, nEndPos, sURL );
+ return bRet;
+}
+
+
+BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt,
+ xub_StrLen nSttPos, xub_StrLen nEndPos )
+{
+ // Bedingung:
+ // Am Anfang: _ oder * hinter Space mit nachfolgenden !Space
+ // Am Ende: _ oder * vor Space (Worttrenner?)
+
+ sal_Unicode c, cInsChar = rTxt.GetChar( nEndPos ); // unterstreichen oder fett
+ if( ++nEndPos != rTxt.Len() &&
+ !IsWordDelim( rTxt.GetChar( nEndPos ) ) )
+ return FALSE;
+
+ --nEndPos;
+
+ BOOL bAlphaNum = FALSE;
+ xub_StrLen nPos = nEndPos, nFndPos = STRING_NOTFOUND;
+ const International& rInter = Application::GetAppInternational();
+
+ while( nPos )
+ {
+ switch( c = rTxt.GetChar( --nPos ) )
+ {
+ case '_':
+ case '*':
+ if( c == cInsChar )
+ {
+ if( bAlphaNum && nPos+1 < nEndPos && ( !nPos ||
+ IsWordDelim( rTxt.GetChar( nPos-1 ))) &&
+ !IsWordDelim( rTxt.GetChar( nPos+1 )))
+ nFndPos = nPos;
+ else
+ // Bedingung ist nicht erfuellt, also abbrechen
+ nFndPos = STRING_NOTFOUND;
+ nPos = 0;
+ }
+ break;
+ default:
+ if( !bAlphaNum )
+ bAlphaNum = rInter.IsAlphaNumeric( c );
+ }
+ }
+
+ if( STRING_NOTFOUND != nFndPos )
+ {
+ // ueber den gefundenen Bereich das Attribut aufspannen und
+ // das gefunde und am Ende stehende Zeichen loeschen
+ if( '*' == cInsChar ) // Fett
+ {
+ SvxWeightItem aSvxWeightItem( WEIGHT_BOLD );
+ rDoc.SetAttr( nFndPos + 1, nEndPos,
+ SID_ATTR_CHAR_WEIGHT,
+ aSvxWeightItem);
+ }
+ else // unterstrichen
+ {
+ SvxUnderlineItem aSvxUnderlineItem( UNDERLINE_SINGLE );
+ rDoc.SetAttr( nFndPos + 1, nEndPos,
+ SID_ATTR_CHAR_UNDERLINE,
+ aSvxUnderlineItem);
+ }
+ rDoc.Delete( nEndPos, nEndPos + 1 );
+ rDoc.Delete( nFndPos, nFndPos + 1 );
+ }
+
+ return STRING_NOTFOUND != nFndPos;
+}
+
+
+BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
+ const String& rTxt, BOOL bNormalPos,
+ xub_StrLen nSttPos, xub_StrLen nEndPos,
+ LanguageType eLang )
+{
+ // Grossbuchstabe am Satz-Anfang ??
+ if( !rTxt.Len() )
+ return FALSE;
+
+ const International& rInter = Application::GetAppInternational();
+ const sal_Unicode *pStart = rTxt.GetBuffer(),
+ *pStr = pStart + nEndPos,
+ *pWordStt = 0,
+ *pDelim;
+
+ BOOL bAtStart = FALSE, bPrevPara = FALSE;
+ do {
+ --pStr;
+ if( rInter.IsAlpha( *pStr ) )
+ {
+ if( !pWordStt )
+ pDelim = pStr+1;
+ pWordStt = pStr;
+ }
+ else if( pWordStt && !rInter.IsNumeric( *pStr ))
+ {
+ if( lcl_IsInAsciiArr( sImplWordChars, *pStr ) &&
+ pWordStt - 1 == pStr &&
+ (long)(pStart + 1) < (long)pStr &&
+ rInter.IsAlpha( *(pStr-1)) )
+ pWordStt = --pStr;
+ else
+ break;
+ }
+ } while( 0 == ( bAtStart = (pStart == pStr)) );
+
+ if( !pWordStt ||
+ rInter.IsNumeric( *pStr ) ||
+ ((INTN_CHAR_UPPER | INTN_CHAR_ALPHA) ==
+ rInter.GetCharType( *pWordStt )) ||
+ 0x1 == *pWordStt || 0x2 == *pWordStt )
+ return FALSE; // kein zu ersetzendes Zeichen, oder schon ok
+
+ // JP 27.10.97: wenn das Wort weniger als 3 Zeichen hat und der Trenner
+ // ein "Num"-Trenner ist, dann nicht ersetzen!
+ // Damit wird ein "a.", "a)", "a-a" nicht ersetzt!
+ if( *pDelim && 2 >= pDelim - pWordStt &&
+ lcl_IsInAsciiArr( ".-)>", *pDelim ) )
+ return FALSE;
+
+ if( !bAtStart ) // noch kein Absatz Anfang ?
+ {
+ if( !IsWordDelim( *pStr ))
+ return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+
+ while( 0 == ( bAtStart = (pStart == pStr--) ) && IsWordDelim( *pStr ))
+ ;
+ }
+
+ if( bAtStart ) // am Absatz Anfang ?
+ {
+ // Ueberpruefe den vorherigen Absatz, wenn es diesen gibt.
+ // Wenn ja, dann pruefe auf SatzTrenner am Ende.
+ const String* pPrevPara = rDoc.GetPrevPara( bNormalPos );
+ if( !pPrevPara )
+ {
+ // gueltiger Trenner -> Ersetze
+ String sChar( *pWordStt );
+ rInter.ToUpper( sChar );
+ return rDoc.Replace( xub_StrLen( pWordStt - rTxt.GetBuffer() ),
+ sChar );
+ }
+
+ bPrevPara = TRUE;
+ bAtStart = FALSE;
+ pStart = pPrevPara->GetBuffer();
+ pStr = pStart + pPrevPara->Len();
+
+ do { // alle Blanks ueberlesen
+ --pStr;
+ if( !IsWordDelim( *pStr ))
+ break;
+ } while( 0 == ( bAtStart = (pStart == pStr)) );
+
+ if( bAtStart )
+ return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ }
+
+ // bis hierhier wurde [ \t]+[A-Z0-9]+ gefunden. Test jetzt auf den
+ // Satztrenner. Es koennen alle 3 vorkommen, aber nicht mehrfach !!
+ const sal_Unicode* pExceptStt = 0;
+ if( !bAtStart )
+ {
+ BOOL bWeiter = TRUE;
+ int nFlag = C_NONE;
+ do {
+ switch( *pStr )
+ {
+ case '.':
+ {
+ if( nFlag & C_FULL_STOP )
+ return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ nFlag |= C_FULL_STOP;
+ pExceptStt = pStr;
+ }
+ break;
+ case '!':
+ {
+ if( nFlag & C_EXCLAMATION_MARK )
+ return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ nFlag |= C_EXCLAMATION_MARK;
+ }
+ break;
+ case '?':
+ {
+ if( nFlag & C_QUESTION_MARK)
+ return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ nFlag |= C_QUESTION_MARK;
+ }
+ break;
+ default:
+ if( !nFlag )
+ return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ else
+ bWeiter = FALSE;
+ break;
+ }
+
+ if( bWeiter && pStr-- == pStart )
+ {
+// !!! wenn am Anfang, dann nie ersetzen.
+// if( !nFlag )
+ return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+// ++pStr;
+// break; // Schleife beenden
+ }
+ } while( bWeiter );
+ if( C_FULL_STOP != nFlag )
+ pExceptStt = 0;
+ }
+
+ if( 2 > ( pStr - pStart ) )
+ return FALSE;
+
+ if( !rInter.IsAlphaNumeric( *pStr-- ) )
+ {
+ BOOL bValid = FALSE, bAlphaFnd = FALSE;
+ const sal_Unicode* pTmpStr = pStr;
+ while( !bValid )
+ {
+ if( rInter.IsNumeric( *pTmpStr ) )
+ {
+ bValid = TRUE;
+ pStr = pTmpStr - 1;
+ }
+ else if( rInter.IsAlpha( *pTmpStr ) )
+ {
+ if( bAlphaFnd )
+ {
+ bValid = TRUE;
+ pStr = pTmpStr;
+ }
+ else
+ bAlphaFnd = TRUE;
+ }
+ else if( bAlphaFnd || IsWordDelim( *pTmpStr ) )
+ break;
+
+ if( pTmpStr == pStart )
+ break;
+
+ --pTmpStr;
+ }
+
+ if( !bValid )
+ return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ }
+
+ BOOL bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9';
+
+ // suche den Anfang vom Wort
+ while( !IsWordDelim( *pStr ))
+ {
+ if( bNumericOnly && rInter.IsAlpha( *pStr ))
+ bNumericOnly = FALSE;
+
+ if( pStart == pStr )
+ break;
+
+ --pStr;
+ }
+
+ if( bNumericOnly ) // besteht nur aus Zahlen, dann nicht
+ return FALSE;
+
+ if( IsWordDelim( *pStr ))
+ ++pStr;
+
+ String sWord;
+
+ // ueberpruefe anhand der Exceptionliste
+ if( pExceptStt )
+ {
+ sWord = String( pStr, pExceptStt - pStr + 1 );
+ if( FindInCplSttExceptList(eLang, sWord) )
+ return FALSE;
+
+ // loesche alle nicht alpanum. Zeichen am Wortanfang/-ende und
+ // teste dann noch mal ( erkennt: "(min.", "/min.", usw.)
+ String sTmp( sWord );
+ while( sTmp.Len() &&
+ !rInter.IsAlphaNumeric( sTmp.GetChar( 0 ) ))
+ sTmp.Erase( 0, 1 );
+
+ // alle hinteren nicht alphanumerische Zeichen bis auf das
+ // Letzte entfernen
+ xub_StrLen nLen = sTmp.Len();
+ while( nLen && !rInter.IsAlphaNumeric( sTmp.GetChar( nLen-1 ) ))
+ --nLen;
+ if( nLen + 1 < sTmp.Len() )
+ sTmp.Erase( nLen + 1 );
+
+ if( sTmp.Len() && sTmp.Len() != sWord.Len() &&
+ FindInCplSttExceptList(eLang, sTmp))
+ return FALSE;
+
+ if(FindInCplSttExceptList(eLang, sWord, TRUE))
+ return FALSE;
+ }
+
+ // Ok, dann ersetze mal
+ sal_Unicode cSave = *pWordStt;
+ nSttPos = pWordStt - rTxt.GetBuffer();
+ String sChar( cSave );
+ rInter.ToUpper( sChar );
+ BOOL bRet = rDoc.Replace( nSttPos, sChar );
+
+ // das Wort will vielleicht jemand haben
+ if( bRet && SaveWordCplSttLst & nFlags )
+ rDoc.SaveCpltSttWord( CptlSttSntnc, nSttPos, sWord, cSave );
+
+ return bRet;
+}
+
+sal_Unicode SvxAutoCorrect::_GetQuote( sal_Unicode cInsChar, BOOL bSttQuote,
+ LanguageType eLang ) const
+{
+ sal_Unicode cRet = bSttQuote ? ( '\"' == cInsChar
+ ? GetStartDoubleQuote()
+ : GetStartSingleQuote() )
+ : ( '\"' == cInsChar
+ ? GetEndDoubleQuote()
+ : GetEndSingleQuote() );
+ if( !cRet )
+ {
+ // dann ueber die Language das richtige Zeichen heraussuchen
+ if( LANGUAGE_NONE == eLang )
+ cRet = cInsChar;
+ else
+ {
+ International* pIntl = (International*)&Application::GetAppInternational();
+
+ if( eLang != pIntl->GetLanguage() && LANGUAGE_SYSTEM != eLang )
+ pIntl = new International( eLang );
+
+ cRet = bSttQuote
+ ? ( '\"' == cInsChar
+ ? pIntl->GetDoubleQuotationMarkStartChar()
+ : pIntl->GetQuotationMarkStartChar() )
+ : ( '\"' == cInsChar
+ ? pIntl->GetDoubleQuotationMarkEndChar()
+ : pIntl->GetQuotationMarkEndChar() );
+
+ if( pIntl != &Application::GetAppInternational() )
+ delete pIntl;
+ }
+ }
+ return cRet;
+}
+
+void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
+ sal_Unicode cInsChar, BOOL bSttQuote,
+ BOOL bIns )
+{
+ LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE );
+ sal_Unicode cRet = _GetQuote( cInsChar, bSttQuote, eLang );
+
+ //JP 13.02.99: damit beim Undo das "einfuegte" Zeichen wieder erscheint,
+ // wird es erstmal eingefuegt und dann ueberschrieben
+ String sChg( cInsChar );
+ if( bIns )
+ rDoc.Insert( nInsPos, sChg );
+ else
+ rDoc.Replace( nInsPos, sChg );
+
+ //JP 13.08.97: Bug 42477 - bei doppelten Anfuehrungszeichen muss bei
+ // franzoesischer Sprache an Anfang ein Leerzeichen dahinter
+ // und am Ende ein Leerzeichen dahinter eingefuegt werden.
+ sChg = cRet;
+
+ if( '\"' == cInsChar )
+ {
+ if( LANGUAGE_SYSTEM == eLang )
+ eLang = Application::GetAppInternational().GetLanguage();
+ switch( eLang )
+ {
+ case LANGUAGE_FRENCH:
+ case LANGUAGE_FRENCH_BELGIAN:
+ case LANGUAGE_FRENCH_CANADIAN:
+ case LANGUAGE_FRENCH_SWISS:
+ case LANGUAGE_FRENCH_LUXEMBOURG:
+ // JP 09.02.99: das zusaetzliche Zeichen immer per Insert einfuegen.
+ // Es ueberschreibt nichts!
+ {
+ String s( 0xA0 ); // UNICODE code for no break space
+ if( rDoc.Insert( bSttQuote ? nInsPos+1 : nInsPos, s ))
+ {
+ if( !bSttQuote )
+ ++nInsPos;
+ }
+ }
+ break;
+ }
+ }
+
+ rDoc.Replace( nInsPos, sChg );
+}
+
+String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
+ sal_Unicode cInsChar, BOOL bSttQuote )
+{
+ LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE );
+ sal_Unicode cRet = _GetQuote( cInsChar, bSttQuote, eLang );
+
+ String sRet( cRet );
+ //JP 13.08.97: Bug 42477 - bei doppelten Anfuehrungszeichen muss bei
+ // franzoesischer Sprache an Anfang ein Leerzeichen dahinter
+ // und am Ende ein Leerzeichen dahinter eingefuegt werden.
+ if( '\"' == cInsChar )
+ {
+ if( LANGUAGE_SYSTEM == eLang )
+ eLang = Application::GetAppInternational().GetLanguage();
+ switch( eLang )
+ {
+ case LANGUAGE_FRENCH:
+ case LANGUAGE_FRENCH_BELGIAN:
+ case LANGUAGE_FRENCH_CANADIAN:
+ case LANGUAGE_FRENCH_SWISS:
+ case LANGUAGE_FRENCH_LUXEMBOURG:
+ if( bSttQuote )
+ sRet += ' ';
+ else
+ sRet.Insert( ' ', 0 );
+ break;
+ }
+ }
+ return sRet;
+}
+
+ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
+ xub_StrLen nInsPos, sal_Unicode cChar,
+ BOOL bInsert )
+{
+ ULONG nRet = 0;
+ do{ // only for middle check loop !!
+ if( cChar )
+ {
+ //JP 10.02.97: doppelte Spaces verhindern
+ if( nInsPos && ' ' == cChar &&
+ IsAutoCorrFlag( IngnoreDoubleSpace ) &&
+ ' ' == rTxt.GetChar( nInsPos - 1 ) )
+ {
+ nRet = IngnoreDoubleSpace;
+ break;
+ }
+
+ BOOL bSingle = '\'' == cChar;
+ BOOL bIsReplaceQuote =
+ (IsAutoCorrFlag( ChgQuotes ) && ('\"' == cChar )) ||
+ (IsAutoCorrFlag( ChgSglQuotes ) && bSingle );
+ if( bIsReplaceQuote )
+ {
+ sal_Unicode cPrev;
+ BOOL bSttQuote = !nInsPos ||
+ IsWordDelim( ( cPrev = rTxt.GetChar( nInsPos-1 ))) ||
+// os: #56034# - Warum kein schliessendes Anfuehrungszeichen nach dem Bindestrich?
+// strchr( "-([{", cPrev ) ||
+ lcl_IsInAsciiArr( "([{", cPrev ) ||
+ ( cEmDash && cEmDash == cPrev ) ||
+ ( cEnDash && cEnDash == cPrev );
+
+ InsertQuote( rDoc, nInsPos, cChar, bSttQuote, bInsert );
+ nRet = bSingle ? ChgSglQuotes : ChgQuotes;
+ break;
+ }
+
+ if( bInsert )
+ rDoc.Insert( nInsPos, cChar );
+ else
+ rDoc.Replace( nInsPos, cChar );
+ }
+
+ if( !nInsPos )
+ break;
+
+ xub_StrLen nPos = nInsPos - 1;
+
+ // Bug 19286: nur direkt hinter dem "Wort" aufsetzen
+ if( IsWordDelim( rTxt.GetChar( nPos )))
+ break;
+
+ // automatisches Fett oder Unterstreichen setzen?
+ if( '*' == cChar || '_' == cChar )
+ {
+ if( IsAutoCorrFlag( ChgWeightUnderl ) &&
+ FnChgWeightUnderl( rDoc, rTxt, 0, nPos+1 ) )
+ nRet = ChgWeightUnderl;
+ break;
+ }
+
+ while( nPos && !IsWordDelim( rTxt.GetChar( --nPos )))
+ ;
+
+ // Absatz-Anfang oder ein Blank gefunden, suche nach dem Wort
+ // Kuerzel im Auto
+ xub_StrLen nCapLttrPos = nPos+1; // auf das 1. Zeichen
+ if( !nPos && !IsWordDelim( rTxt.GetChar( 0 )))
+ --nCapLttrPos; // Absatz Anfang und kein Blank !
+
+ // Bug 19285: Symbolzeichen nicht anfassen
+ if( rDoc.HasSymbolChars( nCapLttrPos, nInsPos ) )
+ break;
+
+ LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE );
+ if( LANGUAGE_SYSTEM == eLang )
+ eLang = System::GetLanguage();
+
+ if( IsAutoCorrFlag( Autocorrect ) )
+ {
+ const String* pPara = 0;
+ const String** ppPara = IsAutoCorrFlag(CptlSttSntnc) ? &pPara : 0;
+
+ BOOL bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos,
+ *this, ppPara );
+ if( !bChgWord )
+ {
+ // JP 16.06.98: dann versuche mal alle !AlphaNum. Zeichen los zu
+ // werden und teste dann nochmals
+ //JP 22.04.99: Bug 63883 - entferne nur die "Klammern Start/-Anfaenge",
+ // alle anderen Zeichen muessen drin bleiben.
+ xub_StrLen nCapLttrPos1 = nCapLttrPos, nInsPos1 = nInsPos;
+ // const International& rInter = Application::GetAppInternational();
+ while( nCapLttrPos1 < nInsPos &&
+ // !rInter.IsAlphaNumeric( rTxt.GetChar( nCapLttrPos1 ) )
+ lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nCapLttrPos1 ) )
+ )
+ ++nCapLttrPos1;
+ while( nCapLttrPos1 < nInsPos1 && nInsPos1 &&
+ // !rInter.IsAlphaNumeric( rTxt.GetChar( nInsPos1-1 ) )
+ lcl_IsInAsciiArr( sImplEndSkipChars, rTxt.GetChar( nInsPos1-1 ) )
+ )
+ --nInsPos1;
+
+ if( (nCapLttrPos1 != nCapLttrPos || nInsPos1 != nInsPos ) &&
+ nCapLttrPos1 < nInsPos1 &&
+ rDoc.ChgAutoCorrWord( nCapLttrPos1, nInsPos1, *this, ppPara ))
+ {
+ bChgWord = TRUE;
+ nCapLttrPos = nCapLttrPos1;
+ }
+ }
+
+ if( bChgWord )
+ {
+ nRet = Autocorrect;
+ if( pPara )
+ {
+ xub_StrLen nEnd = nCapLttrPos;
+ while( nEnd < pPara->Len() &&
+ !IsWordDelim( pPara->GetChar( nEnd )))
+ ++nEnd;
+
+ // Grossbuchstabe am Satz-Anfang ??
+ if( FnCptlSttSntnc( rDoc, *pPara, FALSE, nCapLttrPos, nEnd, eLang ) )
+ nRet |= CptlSttSntnc;
+ }
+ break;
+ }
+ }
+
+ if( ( IsAutoCorrFlag( nRet = ChgFractionSymbol ) &&
+ FnChgFractionSymbol( rDoc, rTxt, nCapLttrPos, nInsPos ) ) ||
+ ( IsAutoCorrFlag( nRet = ChgOrdinalNumber ) &&
+ FnChgOrdinalNumber( rDoc, rTxt, nCapLttrPos, nInsPos ) ) ||
+ ( IsAutoCorrFlag( nRet = ChgToEnEmDash ) &&
+ FnChgToEnEmDash( rDoc, rTxt, nCapLttrPos, nInsPos ) ) ||
+ ( IsAutoCorrFlag( nRet = SetINetAttr ) &&
+ ( ' ' == cChar || '\t' == cChar || 0x0a == cChar || !cChar ) &&
+ FnSetINetAttr( rDoc, rTxt, nCapLttrPos, nInsPos ) ) )
+ ;
+ else
+ {
+ nRet = 0;
+ // Grossbuchstabe am Satz-Anfang ??
+ if( IsAutoCorrFlag( CptlSttSntnc ) &&
+ FnCptlSttSntnc( rDoc, rTxt, TRUE, nCapLttrPos, nInsPos, eLang ) )
+ nRet |= CptlSttSntnc;
+
+ // Zwei Grossbuchstaben am Wort-Anfang ??
+ if( IsAutoCorrFlag( CptlSttWrd ) &&
+ FnCptlSttWrd( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) )
+ nRet |= CptlSttWrd;
+ }
+ } while( FALSE );
+
+ if( nRet && SFX_APP()->GetOptions().IsAutoHelpAgent() )
+ {
+ // at time max 16 help ids (from 1 to 15)
+ static BYTE aHelpIdArr[ HID_AUTOCORR_HELP_END -
+ HID_AUTOCORR_HELP_START ] = {0};
+ ULONG nHelpId = 0;
+ if( nRet & ( Autocorrect|CptlSttSntnc|CptlSttWrd) )
+ {
+ // von 0 - 7
+ if( nRet & Autocorrect )
+ nHelpId += 4;
+ if( nRet & CptlSttSntnc )
+ nHelpId += 2;
+ if( nRet & CptlSttWrd )
+ nHelpId += 1;
+ }
+ else
+ {
+ if( nRet & ChgQuotes) nHelpId = 8;
+ else if( nRet & ChgSglQuotes) nHelpId = 9;
+ else if( nRet & SetINetAttr) nHelpId = 10;
+ else if( nRet & IngnoreDoubleSpace) nHelpId = 11;
+ else if( nRet & ChgWeightUnderl) nHelpId = 12;
+ else if( nRet & ChgFractionSymbol ) nHelpId = 13;
+ else if( nRet & ChgToEnEmDash) nHelpId = 14;
+ else if( nRet & ChgOrdinalNumber) nHelpId = 15;
+ }
+
+ DBG_ASSERT( nHelpId && nHelpId < (HID_AUTOCORR_HELP_END -
+ HID_AUTOCORR_HELP_START + 1),
+ "wrong HelpId Range" );
+
+ if( nHelpId && aHelpIdArr[ --nHelpId ] < 10 ) // maximal 10 mal zeigen
+ {
+ ++aHelpIdArr[ nHelpId ];
+ nHelpId += HID_AUTOCORR_HELP_START;
+ SfxHelp::ShowHint( nHelpId );
+ }
+ }
+
+ return nRet;
+}
+
+SvxAutoCorrectLanguageLists& SvxAutoCorrect::_GetLanguageList(
+ LanguageType eLang )
+{
+ if( !aLangTable.IsKeyValid( ULONG( eLang )))
+ CreateLanguageFile( eLang, TRUE);
+ return *aLangTable.Seek( ULONG( eLang ) );
+}
+
+void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang )
+{
+ if( aLangTable.IsKeyValid( ULONG( eLang )))
+ {
+ SvxAutoCorrectLanguageListsPtr pLists = aLangTable.Seek(ULONG(eLang));
+ if( pLists )
+ pLists->SaveCplSttExceptList();
+ }
+#ifndef PRODUCT
+ else
+ {
+ DBG_ERROR("speichern einer leeren Liste?")
+ }
+#endif
+}
+
+void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang)
+{
+ if(aLangTable.IsKeyValid(ULONG(eLang)))
+ {
+ SvxAutoCorrectLanguageListsPtr pLists = aLangTable.Seek(ULONG(eLang));
+ if(pLists)
+ pLists->SaveWrdSttExceptList();
+ }
+#ifndef PRODUCT
+ else
+ {
+ DBG_ERROR("speichern einer leeren Liste?")
+ }
+#endif
+}
+
+
+ // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort
+ // in die Datei geschrieben!
+BOOL SvxAutoCorrect::AddCplSttException( const String& rNew,
+ LanguageType eLang )
+{
+ SvxAutoCorrectLanguageListsPtr pLists = 0;
+ //entweder die richtige Sprache ist vorhanden oder es kommt in die allg. Liste
+ if( aLangTable.IsKeyValid(ULONG(eLang)))
+ pLists = aLangTable.Seek(ULONG(eLang));
+ else if(aLangTable.IsKeyValid(ULONG(LANGUAGE_DONTKNOW))||
+ CreateLanguageFile(LANGUAGE_DONTKNOW, TRUE))
+ {
+ pLists = aLangTable.Seek(ULONG(LANGUAGE_DONTKNOW));
+ }
+ DBG_ASSERT(pLists, "keine Autokorrekturdatei")
+ return pLists->AddToCplSttExceptList(rNew);
+}
+
+
+ // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort
+ // in die Datei geschrieben!
+BOOL SvxAutoCorrect::AddWrtSttException( const String& rNew,
+ LanguageType eLang )
+{
+ SvxAutoCorrectLanguageListsPtr pLists = 0;
+ //entweder die richtige Sprache ist vorhanden oder es kommt in die allg. Liste
+ if(aLangTable.IsKeyValid(ULONG(eLang)))
+ pLists = aLangTable.Seek(ULONG(eLang));
+ else if(aLangTable.IsKeyValid(ULONG(LANGUAGE_DONTKNOW))||
+ CreateLanguageFile(LANGUAGE_DONTKNOW, TRUE))
+ pLists = aLangTable.Seek(ULONG(LANGUAGE_DONTKNOW));
+ DBG_ASSERT(pLists, "keine Autokorrekturdatei")
+ return pLists->AddToWrdSttExceptList(rNew);
+}
+
+
+
+
+void SvxAutoCorrect::SetAutoCorrFileName( const String& rNew )
+{
+ if( sAutoCorrFile != rNew )
+ {
+ sAutoCorrFile = rNew;
+
+ // sind die Listen gesetzt sind, so muessen sie jetzt geloescht
+ // werden
+ lcl_ClearTable(aLangTable);
+ nFlags &= ~(CplSttLstLoad | WrdSttLstLoad | ChgWordLstLoad );
+ }
+}
+
+
+
+BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
+ const String& rTxt, xub_StrLen nPos,
+ String& rWord ) const
+{
+ if( !nPos )
+ return FALSE;
+
+ xub_StrLen nEnde = nPos;
+
+ // dahinter muss ein Blank oder Tab folgen!
+ if( ( nPos < rTxt.Len() &&
+ !IsWordDelim( rTxt.GetChar( nPos ))) ||
+ IsWordDelim( rTxt.GetChar( --nPos )))
+ return FALSE;
+
+ while( nPos && !IsWordDelim( rTxt.GetChar( --nPos )))
+ ;
+
+ // Absatz-Anfang oder ein Blank gefunden, suche nach dem Wort
+ // Kuerzel im Auto
+ xub_StrLen nCapLttrPos = nPos+1; // auf das 1. Zeichen
+ if( !nPos && !IsWordDelim( rTxt.GetChar( 0 )))
+ --nCapLttrPos; // Absatz Anfang und kein Blank !
+
+ while( lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nCapLttrPos )) )
+ if( ++nCapLttrPos >= nEnde )
+ return FALSE;
+
+ // Bug 19285: Symbolzeichen nicht anfassen
+ // Interresant erst ab 3 Zeichen
+ if( 3 > nEnde - nCapLttrPos || rDoc.HasSymbolChars( nCapLttrPos, nEnde ) )
+ return FALSE;
+
+ rWord = rTxt.Copy( nCapLttrPos, nEnde - nCapLttrPos );
+ return TRUE;
+}
+
+BOOL SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, BOOL bNewFile )
+{
+ DBG_ASSERT(!aLangTable.IsKeyValid(ULONG(eLang)), "Sprache ist bereits vorhanden")
+ String sFileTemp = GetAutoCorrFileName( eLang );
+ SvxAutoCorrectLanguageListsPtr pLists = 0;
+ if( bNewFile || DirEntry( sFileTemp ).Exists() )
+ {
+ pLists = new SvxAutoCorrectLanguageLists( *this, sFileTemp, eLang );
+ aLangTable.Insert(ULONG(eLang), pLists);
+ }
+ return pLists != 0;
+}
+
+BOOL SvxAutoCorrect::PutText( const String& rShort, const String& rLong,
+ LanguageType eLang )
+{
+ BOOL bRet = FALSE;
+ if( aLangTable.IsKeyValid( ULONG(eLang)) || CreateLanguageFile(eLang) )
+ bRet = aLangTable.Seek( ULONG(eLang) )->PutText(rShort, rLong);
+ return bRet;
+}
+
+
+ // - loesche einen Eintrag
+BOOL SvxAutoCorrect::DeleteText( const String& rShort, LanguageType eLang )
+{
+ BOOL bRet = FALSE;
+ if( aLangTable.IsKeyValid( ULONG( eLang )) )
+ bRet = aLangTable.Seek( ULONG( eLang ))->DeleteText( rShort );
+ return bRet;
+}
+
+
+ // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen
+ // koennen aus der Wortliste herausgeholt werden!)
+BOOL SvxAutoCorrect::GetLongText( SvStorage&, const String& , String& )
+{
+ return FALSE;
+}
+
+ // - Text mit Attributierung (kann nur der SWG - SWG-Format!)
+BOOL SvxAutoCorrect::PutText( SvStorage&, const String&, SfxObjectShell&,
+ String& )
+{
+ return FALSE;
+}
+
+
+
+void EncryptBlockName_Imp( String& rName )
+{
+ xub_StrLen nLen, nPos = 1;
+ rName.Insert( '#', 0 );
+ sal_Unicode* pName = rName.GetBufferAccess();
+ for ( nLen = rName.Len(), ++pName; nPos < nLen; ++nPos, ++pName )
+ {
+ if( lcl_IsInAsciiArr( "!/:.\\", *pName ))
+ *pName &= 0x0f;
+ }
+}
+
+void DecryptBlockName_Imp( String& rName )
+{
+ if( '#' == rName.GetChar( 0 ) )
+ {
+ rName.Erase( 0, 1 );
+ sal_Unicode* pName = rName.GetBufferAccess();
+ xub_StrLen nLen, nPos;
+ for ( nLen = rName.Len(), nPos = 0; nPos < nLen; ++nPos, ++pName )
+ switch( *pName )
+ {
+ case 0x01: *pName = '!'; break;
+ case 0x0A: *pName = ':'; break;
+ case 0x0C: *pName = '\\'; break;
+ case 0x0E: *pName = '.'; break;
+ case 0x0F: *pName = '/'; break;
+ }
+ }
+}
+
+
+/* -----------------18.11.98 16:00-------------------
+ *
+ * --------------------------------------------------*/
+const SvxAutocorrWord* lcl_SearchWordsInList(
+ SvxAutoCorrectLanguageListsPtr pList, const String& rTxt,
+ xub_StrLen& rStt, xub_StrLen nEndPos, SvxAutoCorrDoc& rDoc )
+{
+ const SvxAutocorrWordList* pAutoCorrWordList = pList->GetAutocorrWordList();
+ const International& rInter = Application::GetAppInternational();
+ for( xub_StrLen nPos = 0; nPos < pAutoCorrWordList->Count(); ++nPos )
+ {
+ const SvxAutocorrWord* pFnd = (*pAutoCorrWordList)[ nPos ];
+ const String& rChk = pFnd->GetShort();
+ if( nEndPos >= rChk.Len() )
+ {
+ xub_StrLen nCalcStt = nEndPos - rChk.Len();
+ if( ( !nCalcStt || nCalcStt == rStt ||
+ ( nCalcStt < rStt &&
+ IsWordDelim( rTxt.GetChar(nCalcStt - 1 ) ))) )
+ {
+ String sWord( rTxt.GetBuffer() + nCalcStt, rChk.Len() );
+ if( COMPARE_EQUAL == rInter.Compare( rChk, sWord,
+ INTN_COMPARE_IGNORECASE ) )
+ {
+ rStt = nCalcStt;
+ return pFnd;
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+
+// suche das oder die Worte in der ErsetzungsTabelle
+const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
+ const String& rTxt, xub_StrLen& rStt, xub_StrLen nEndPos,
+ SvxAutoCorrDoc& rDoc, LanguageType& rLang )
+{
+ LanguageType eLang = rLang;
+ const SvxAutocorrWord* pRet = 0;
+ if( LANGUAGE_SYSTEM == eLang )
+ eLang = System::GetLanguage();
+
+ // zuerst nach eLang suchen, dann nach der Obersprache
+ // US-Englisch -> Englisch und zuletzt in LANGUAGE_DONTKNOW
+
+ if( aLangTable.IsKeyValid( ULONG( eLang ) ) ||
+ CreateLanguageFile( eLang, FALSE ))
+ {
+ //die Sprache ist vorhanden - also her damit
+ SvxAutoCorrectLanguageListsPtr pList = aLangTable.Seek(ULONG(eLang));
+ pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc );
+ if( pRet )
+ {
+ rLang = eLang;
+ return pRet;
+ }
+ }
+
+ // wenn es hier noch nicht gefunden werden konnte, dann weitersuchen
+ ULONG nTmpKey1 = eLang & 0x7ff, // die Hauptsprache in vielen Faellen u.B. DE
+ nTmpKey2 = eLang & 0x3ff, // sonst z.B. EN
+ nTmp;
+
+ if( ((nTmp = nTmpKey1) != (ULONG)eLang &&
+ ( aLangTable.IsKeyValid( nTmpKey1 ) ||
+ CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) ||
+ (( nTmp = nTmpKey2) != (ULONG)eLang &&
+ ( aLangTable.IsKeyValid( nTmpKey2 ) ||
+ CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) )
+ {
+ //die Sprache ist vorhanden - also her damit
+ SvxAutoCorrectLanguageListsPtr pList = aLangTable.Seek( nTmp );
+ pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc);
+ if( pRet )
+ {
+ rLang = LanguageType( nTmp );
+ return pRet;
+ }
+ }
+ if( aLangTable.IsKeyValid( ULONG( LANGUAGE_DONTKNOW ) ) ||
+ CreateLanguageFile( LANGUAGE_DONTKNOW, FALSE ) )
+ {
+ //die Sprache ist vorhanden - also her damit
+ SvxAutoCorrectLanguageListsPtr pList = aLangTable.Seek(ULONG(LANGUAGE_DONTKNOW));
+ pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc);
+ if( pRet )
+ {
+ rLang = LANGUAGE_DONTKNOW;
+ return pRet;
+ }
+ }
+ return 0;
+}
+/* -----------------18.11.98 13:46-------------------
+ *
+ * --------------------------------------------------*/
+BOOL SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
+ const String& sWord )
+{
+ //zuerst nach eLang suchen, dann nach der Obersprace US-Englisch -> Englisch
+ //und zuletzt in LANGUAGE_DONTKNOW
+ ULONG nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE
+ ULONG nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN
+ String sTemp(sWord);
+ if( aLangTable.IsKeyValid( ULONG( eLang )) ||
+ CreateLanguageFile( eLang, FALSE ) )
+ {
+ //die Sprache ist vorhanden - also her damit
+ SvxAutoCorrectLanguageListsPtr pList = aLangTable.Seek(ULONG(eLang));
+ String sTemp(sWord);
+ if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp))
+ return TRUE;
+
+ }
+ // wenn es hier noch nicht gefunden werden konnte, dann weitersuchen
+ ULONG nTmp;
+ if( ((nTmp = nTmpKey1) != (ULONG)eLang &&
+ ( aLangTable.IsKeyValid( nTmpKey1 ) ||
+ CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) ||
+ (( nTmp = nTmpKey2) != (ULONG)eLang &&
+ ( aLangTable.IsKeyValid( nTmpKey2 ) ||
+ CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) )
+ {
+ //die Sprache ist vorhanden - also her damit
+ SvxAutoCorrectLanguageListsPtr pList = aLangTable.Seek(nTmp);
+ if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp))
+ return TRUE;
+ }
+ if(aLangTable.IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, FALSE))
+ {
+ //die Sprache ist vorhanden - also her damit
+ SvxAutoCorrectLanguageListsPtr pList = aLangTable.Seek(ULONG(LANGUAGE_DONTKNOW));
+ if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp))
+ return TRUE;
+ }
+ return FALSE;
+}
+/* -----------------18.11.98 14:28-------------------
+ *
+ * --------------------------------------------------*/
+BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord)
+{
+ String sAbk( '~' );
+ USHORT nPos;
+ pList->Seek_Entry( &sAbk, &nPos );
+ if( nPos < pList->Count() )
+ {
+ String sLowerWord( sWord ); sLowerWord.ToLowerAscii();
+ const String* pAbk;
+ for( USHORT n = nPos;
+ n < pList->Count() &&
+ '~' == ( pAbk = (*pList)[ n ])->GetChar( 0 );
+ ++n )
+ {
+ // ~ und ~. sind nicht erlaubt!
+ if( 2 < pAbk->Len() && pAbk->Len() - 1 <= sWord.Len() )
+ {
+ String sLowerAbk( *pAbk ); sLowerAbk.ToLowerAscii();
+ for( xub_StrLen i = sLowerAbk.Len(), ii = sLowerWord.Len(); i; )
+ {
+ if( !--i ) // stimmt ueberein
+ return TRUE;
+
+ if( sLowerAbk.GetChar( i ) != sLowerWord.GetChar( --ii ))
+ break;
+ }
+ }
+ }
+ }
+ DBG_ASSERT( !(nPos && '~' == (*pList)[ --nPos ]->GetChar( 0 ) ),
+ "falsch sortierte ExeptionListe?" );
+ return FALSE;
+}
+/* -----------------18.11.98 14:49-------------------
+ *
+ * --------------------------------------------------*/
+BOOL SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
+ const String& sWord, BOOL bAbbreviation)
+{
+ //zuerst nach eLang suchen, dann nach der Obersprace US-Englisch -> Englisch
+ //und zuletzt in LANGUAGE_DONTKNOW
+ ULONG nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE
+ ULONG nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN
+ String sTemp( sWord );
+ if( aLangTable.IsKeyValid( ULONG( eLang )) ||
+ CreateLanguageFile( eLang, FALSE ))
+ {
+ //die Sprache ist vorhanden - also her damit
+ SvxAutoCorrectLanguageListsPtr pLists = aLangTable.Seek(ULONG(eLang));
+ const SvStringsISortDtor* pList = pLists->GetCplSttExceptList();
+ if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord)
+ : pList->Seek_Entry( &sTemp ) )
+ return TRUE;
+ }
+ // wenn es hier noch nicht gefunden werden konnte, dann weitersuchen
+ ULONG nTmp;
+
+ if( ((nTmp = nTmpKey1) != (ULONG)eLang &&
+ ( aLangTable.IsKeyValid( nTmpKey1 ) ||
+ CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) ||
+ (( nTmp = nTmpKey2) != (ULONG)eLang &&
+ ( aLangTable.IsKeyValid( nTmpKey2 ) ||
+ CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) )
+ {
+ //die Sprache ist vorhanden - also her damit
+ SvxAutoCorrectLanguageListsPtr pLists = aLangTable.Seek(nTmp);
+ const SvStringsISortDtor* pList = pLists->GetCplSttExceptList();
+ if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord)
+ : pList->Seek_Entry( &sTemp ) )
+ return TRUE;
+ }
+ if(aLangTable.IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, FALSE))
+ {
+ //die Sprache ist vorhanden - also her damit
+ SvxAutoCorrectLanguageListsPtr pLists = aLangTable.Seek(LANGUAGE_DONTKNOW);
+ const SvStringsISortDtor* pList = pLists->GetCplSttExceptList();
+ if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord)
+ : pList->Seek_Entry( &sTemp ) )
+ return TRUE;
+ }
+ return FALSE;
+
+}
+
+/* -----------------20.11.98 11:53-------------------
+ *
+ * --------------------------------------------------*/
+String SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang ) const
+{
+ String sTemp( sAutoCorrFile );
+ sTemp += String::CreateFromInt32( eLang );
+ sTemp.AppendAscii( ".dat" );
+ return sTemp;
+}
+
+/* -----------------18.11.98 11:16-------------------
+ *
+ * --------------------------------------------------*/
+SvxAutoCorrectLanguageLists::SvxAutoCorrectLanguageLists(
+ SvxAutoCorrect& rParent,
+ const String& rAutoCorrectFile, LanguageType eLang)
+ : rAutoCorrect(rParent),
+ eLanguage(eLang),
+ sAutoCorrFile(rAutoCorrectFile),
+ nFlags(0),
+ pCplStt_ExcptLst( 0 ),
+ pWrdStt_ExcptLst( 0 ),
+ pAutocorr_List( 0 )
+{
+}
+
+/* -----------------18.11.98 11:16-------------------
+ *
+ * --------------------------------------------------*/
+SvxAutoCorrectLanguageLists::~SvxAutoCorrectLanguageLists()
+{
+ delete pCplStt_ExcptLst;
+ delete pWrdStt_ExcptLst;
+ delete pAutocorr_List;
+}
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+BOOL SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
+{
+ // nur alle 5 Minuten aufs FileSystem zugreifen um den
+ // Dateistempel zu ueberpruefen
+ BOOL bRet = FALSE;
+
+ Time aMinTime( 0 ); aMinTime.SetMin( 2 );
+ Time aAktTime;
+ if( aLastCheckTime > aAktTime || // ueberlauf ?
+ ( aAktTime -= aLastCheckTime ) > aMinTime ) // min Zeit vergangen
+ {
+ DirEntry aDE( sAutoCorrFile );
+ FileStat aFStat( aDE );
+ bRet = aModifiedDate != aFStat.DateModified() ||
+ aModifiedTime != aFStat.TimeModified();
+
+ if( bRet )
+ {
+ // dann mal schnell alle Listen entfernen!
+ if( CplSttLstLoad & nFlags && pCplStt_ExcptLst )
+ delete pCplStt_ExcptLst, pCplStt_ExcptLst = 0;
+ if( WrdSttLstLoad & nFlags && pWrdStt_ExcptLst )
+ delete pWrdStt_ExcptLst, pWrdStt_ExcptLst = 0;
+ if( ChgWordLstLoad & nFlags && pAutocorr_List )
+ delete pAutocorr_List, pAutocorr_List = 0;
+ nFlags &= ~(CplSttLstLoad | WrdSttLstLoad | ChgWordLstLoad );
+ }
+ aLastCheckTime = Time();
+ }
+ return bRet;
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+void SvxAutoCorrectLanguageLists::LoadExceptList_Imp(
+ SvStringsISortDtor*& rpLst,
+ const sal_Char* pStrmName )
+{
+ if( rpLst )
+ rpLst->DeleteAndDestroy( 0, rpLst->Count() );
+ else
+ rpLst = new SvStringsISortDtor( 16, 16 );
+
+// if( pAutoCorrBlk )
+// pAutoCorrBlk->ReadExceptionList( *pAutoExceptList );
+// else
+ {
+ BOOL bIsStg = SvStorage::IsStorageFile( sAutoCorrFile );
+ SvStorageRef xStg = new SvStorage( sAutoCorrFile,
+ STREAM_READ | STREAM_SHARE_DENYNONE );
+
+ String sStrmName( pStrmName, RTL_TEXTENCODING_MS_1252 );
+ String sTmp( sStrmName );
+
+ if( xStg->IsStream( sStrmName ) ||
+ // "alte" Listen konvertieren!
+ ( pCplStt_ExcptLst == rpLst &&
+ xStg->IsStream( sTmp.AssignAscii( "ExceptionList" ))) )
+ {
+ SvStorageStreamRef xStrm = xStg->OpenStream( sTmp,
+ ( STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE ) );
+ if( SVSTREAM_OK != xStrm->GetError())
+ {
+ xStrm.Clear();
+ xStg.Clear();
+ RemoveStream_Imp( sStrmName );
+ }
+ else
+ {
+ xStrm->SetBufferSize( 8192 );
+
+ BYTE cLen, cSet;
+ USHORT nVersion, nCount;
+ *xStrm >> cLen >> nVersion >> cSet >> nCount;
+
+ for( USHORT i = 0; i < nCount; ++i)
+ {
+ String* pNew = new String;
+ xStrm->ReadByteString( *pNew, cSet );
+
+ if( xStrm->IsEof() || SVSTREAM_OK != xStrm->GetError() )
+ {
+// nErr = ( pExceptLst->GetError() == SVSTREAM_OK )
+// ? 0 : ERR_SWG_READ_ERROR;
+ xStrm.Clear();
+ delete pNew;
+ break;
+ }
+
+ if( !rpLst->Insert( pNew ) )
+ delete pNew;
+ }
+
+ if( sTmp != sStrmName )
+ {
+ xStrm.Clear();
+ xStg.Clear();
+ RemoveStream_Imp( sTmp );
+ }
+ }
+ }
+
+ // Zeitstempel noch setzen
+ DirEntry aDE( sAutoCorrFile );
+ FileStat aFStat( aDE );
+ aModifiedDate = aFStat.DateModified();
+ aModifiedTime = aFStat.TimeModified();
+ aLastCheckTime = Time();
+ }
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
+ const SvStringsISortDtor& rLst,
+ const sal_Char* pStrmName )
+{
+// BOOL bIsStg = SvStorage::IsStorageFile( sAutoCorrFile );
+ SvStorageRef xStg = new SvStorage( sAutoCorrFile, STREAM_STD_READWRITE,
+ STORAGE_TRANSACTED );
+
+ if( xStg.Is() )
+ {
+ String sStrmName( pStrmName, RTL_TEXTENCODING_MS_1252 );
+ if( !rLst.Count() )
+ {
+ xStg->Remove( sStrmName );
+ xStg->Commit();
+ }
+ else
+ {
+ SvStorageStreamRef xStrm = xStg->OpenStream( sStrmName,
+ ( STREAM_READ | STREAM_WRITE | STREAM_SHARE_DENYWRITE ) );
+ if( xStrm.Is() )
+ {
+ xStrm->SetSize( 0 );
+ xStrm->SetBufferSize( 8192 );
+ rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
+
+ *xStrm << (BYTE)4 // Laenge des Headers (ohne den Leerstring)
+ << (USHORT)EXEPTLIST_VERSION_358 // Version des Streams
+ << (BYTE)eEncoding // der Zeichensatz
+ << (USHORT)rLst.Count(); // Anzahl der Elemente
+
+ for( USHORT i = 0;
+ ( i < rLst.Count() ) && ( SVSTREAM_OK == xStrm->GetError() ); i++ )
+ xStrm->WriteByteString( *rLst[ i ], eEncoding );
+
+ xStrm->Commit();
+ if( xStrm->GetError() == SVSTREAM_OK )
+ {
+ xStrm.Clear();
+ xStg->Commit();
+ if( SVSTREAM_OK != xStg->GetError() )
+ {
+ xStg->Remove( sStrmName );
+ xStg->Commit();
+ }
+ }
+ }
+ }
+
+ // Zeitstempel noch setzen
+ DirEntry aDE( sAutoCorrFile );
+ FileStat aFStat( aDE );
+ aModifiedDate = aFStat.DateModified();
+ aModifiedTime = aFStat.TimeModified();
+ aLastCheckTime = Time();
+
+ }
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList()
+{
+ if( pAutocorr_List )
+ pAutocorr_List->DeleteAndDestroy( 0, pAutocorr_List->Count() );
+ else
+ pAutocorr_List = new SvxAutocorrWordList( 16, 16 );
+
+ BOOL bIsStg = SvStorage::IsStorageFile( sAutoCorrFile );
+ SvStorageRef xStg = new SvStorage( sAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE );
+
+ SvStringsDtor aRemoveArr;
+ String aWordListName( pImplAutocorr_ListStr, RTL_TEXTENCODING_MS_1252 );
+ if( xStg->IsStream( aWordListName ) )
+ {
+ SvStorageStreamRef xStrm = xStg->OpenStream( aWordListName,
+ ( STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE ) );
+ if( SVSTREAM_OK != xStrm->GetError())
+ {
+ xStrm.Clear();
+ xStg.Clear();
+ RemoveStream_Imp( aWordListName );
+ }
+ else
+ {
+ xStrm->SetBufferSize( 8192 );
+
+//!!!!!!!!!!!!!
+ // JP 10.10.96: AutocorrDatei vom Writer hat in einer alten
+ // Version keine CharSet Information sondern
+ // beginnt sofort mit einem String.
+ // Diese Dateien koennen wir ERSTMAL nicht
+ // verarbeiten.
+//!!!!!!!!!!!!!
+ String sShort, sLong;
+ xStrm->ReadByteString( sShort, RTL_TEXTENCODING_MS_1252 );
+ if( !sShort.Len() )
+ {
+ // neuer Stream (mit Header)
+ ULONG nOld = xStrm->Tell();
+
+ BYTE cLen, cSet;
+ USHORT nVersion;
+ *xStrm >> cLen >> nVersion >> cSet;
+
+ SvStorageInfoList* pInfoList = 0;
+ if( WORDLIST_VERSION_358 > nVersion )
+ {
+ pInfoList = new SvStorageInfoList;
+ xStg->FillInfoList( pInfoList );
+ }
+
+ ULONG nNew = xStrm->Tell();
+ nOld += cLen;
+ if( nOld != nNew )
+ xStrm->Seek( nOld );
+
+ const International& rInter = Application::GetAppInternational();
+
+ // dann lese mal alle Ersetzungen:
+ while( TRUE )
+ {
+ xStrm->ReadByteString( sShort, cSet ).
+ ReadByteString( sLong, cSet );
+ if( xStrm->IsEof() || SVSTREAM_OK != xStrm->GetError() )
+ break;
+
+ BOOL bOnlyTxt = COMPARE_EQUAL != rInter.Compare(
+ sShort, sLong, INTN_COMPARE_IGNORECASE );
+ if( !bOnlyTxt )
+ {
+ String sLongSave( sLong );
+ if( !rAutoCorrect.GetLongText( *xStg, sShort, sLong ) &&
+ sLongSave.Len() )
+ {
+ sLong = sLongSave;
+ bOnlyTxt = TRUE;
+ }
+ }
+
+ SvxAutocorrWordPtr pNew = new SvxAutocorrWord(
+ sShort, sLong, bOnlyTxt );
+
+ if( !pAutocorr_List->Insert( pNew ) )
+ delete pNew;
+
+ if( pInfoList )
+ {
+ // dann ggfs aus den alten Storages die
+ // ueberfluessigen Streams entfernen
+ EncryptBlockName_Imp( sShort );
+ const SvStorageInfo* pInfo = pInfoList->Get( sShort );
+ if( pInfo && ( pInfo->IsStream() ||
+ (bOnlyTxt && pInfo->IsStorage() ) ))
+ {
+ String* pNew = new String( sShort );
+ aRemoveArr.Insert( pNew, aRemoveArr.Count() );
+ }
+ }
+ }
+ if( pInfoList )
+ delete pInfoList;
+ }
+ }
+
+
+ if( aRemoveArr.Count() )
+ {
+ xStrm.Clear();
+ xStg.Clear();
+ xStg = new SvStorage( sAutoCorrFile,
+ STREAM_STD_READWRITE, STORAGE_TRANSACTED );
+
+ if( xStg.Is() && SVSTREAM_OK == xStg->GetError() )
+ {
+ String* pStr;
+ for( USHORT n = aRemoveArr.Count(); n; )
+ if( xStg->IsContained( *( pStr = aRemoveArr[ --n ] ) ) )
+ xStg->Remove( *pStr );
+
+ // die neue Liste mit der neuen Versionsnummer speichern
+ MakeBlocklist_Imp( *xStg );
+ xStg->Commit();
+ }
+ }
+
+ // Zeitstempel noch setzen
+ DirEntry aDE( sAutoCorrFile );
+ FileStat aFStat( aDE );
+ aModifiedDate = aFStat.DateModified();
+ aModifiedTime = aFStat.TimeModified();
+ aLastCheckTime = Time();
+ }
+ return pAutocorr_List;
+}
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+
+void SvxAutoCorrectLanguageLists::SetAutocorrWordList( SvxAutocorrWordList* pList )
+{
+ if( pAutocorr_List && pList != pAutocorr_List )
+ delete pAutocorr_List;
+ pAutocorr_List = pList;
+ if( !pAutocorr_List )
+ {
+ DBG_ASSERT( !this, "keine gueltige Liste" );
+ pAutocorr_List = new SvxAutocorrWordList( 16, 16 );
+ }
+ nFlags |= ChgWordLstLoad;
+}
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+const SvxAutocorrWordList* SvxAutoCorrectLanguageLists::GetAutocorrWordList()
+{
+ if( !( ChgWordLstLoad & nFlags ) || IsFileChanged_Imp() )
+ SetAutocorrWordList( LoadAutocorrWordList() );
+ return pAutocorr_List;
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+const SvStringsISortDtor* SvxAutoCorrectLanguageLists::GetCplSttExceptList()
+{
+ if( !( CplSttLstLoad & nFlags ) || IsFileChanged_Imp() )
+ SetCplSttExceptList( LoadCplSttExceptList() );
+ return pCplStt_ExcptLst;
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew)
+{
+ String* pNew = new String( rNew );
+ if( rNew.Len() && LoadCplSttExceptList()->Insert( pNew ) )
+ SaveExceptList_Imp( *pCplStt_ExcptLst, pImplCplStt_ExcptLstStr );
+ else
+ delete pNew, pNew = 0;
+ return 0 != pNew;
+}
+/* -----------------18.11.98 15:20-------------------
+ *
+ * --------------------------------------------------*/
+BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew)
+{
+ String* pNew = new String( rNew );
+ if( rNew.Len() && LoadWrdSttExceptList()->Insert( pNew ) )
+ SaveExceptList_Imp( *pWrdStt_ExcptLst, pImplWrdStt_ExcptLstStr );
+ else
+ delete pNew, pNew = 0;
+ return 0 != pNew;
+}
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList()
+{
+ LoadExceptList_Imp( pCplStt_ExcptLst, pImplCplStt_ExcptLstStr );
+ return pCplStt_ExcptLst;
+}
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+void SvxAutoCorrectLanguageLists::SaveCplSttExceptList()
+{
+ SaveExceptList_Imp( *pCplStt_ExcptLst, pImplCplStt_ExcptLstStr );
+}
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList )
+{
+ if( pCplStt_ExcptLst && pList != pCplStt_ExcptLst )
+ delete pCplStt_ExcptLst;
+
+ pCplStt_ExcptLst = pList;
+ if( !pCplStt_ExcptLst )
+ {
+ DBG_ASSERT( !this, "keine gueltige Liste" );
+ pCplStt_ExcptLst = new SvStringsISortDtor( 16, 16 );
+ }
+ nFlags |= CplSttLstLoad;
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList()
+{
+ LoadExceptList_Imp( pWrdStt_ExcptLst, pImplWrdStt_ExcptLstStr );
+ return pWrdStt_ExcptLst;
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList()
+{
+ SaveExceptList_Imp( *pWrdStt_ExcptLst, pImplWrdStt_ExcptLstStr );
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+void SvxAutoCorrectLanguageLists::SetWrdSttExceptList( SvStringsISortDtor* pList )
+{
+ if( pWrdStt_ExcptLst && pList != pWrdStt_ExcptLst )
+ delete pWrdStt_ExcptLst;
+ pWrdStt_ExcptLst = pList;
+ if( !pWrdStt_ExcptLst )
+ {
+ DBG_ASSERT( !this, "keine gueltige Liste" );
+ pWrdStt_ExcptLst = new SvStringsISortDtor( 16, 16 );
+ }
+ nFlags |= WrdSttLstLoad;
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+const SvStringsISortDtor* SvxAutoCorrectLanguageLists::GetWrdSttExceptList()
+{
+ if( !( WrdSttLstLoad & nFlags ) || IsFileChanged_Imp() )
+ SetWrdSttExceptList( LoadWrdSttExceptList() );
+ return pWrdStt_ExcptLst;
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+void SvxAutoCorrectLanguageLists::RemoveStream_Imp( const String& rName )
+{
+ SvStorageRef xStg = new SvStorage( sAutoCorrFile, STREAM_STD_READWRITE,
+ STORAGE_TRANSACTED );
+
+ if( xStg.Is() && SVSTREAM_OK == xStg->GetError() &&
+ xStg->IsStream( rName ) )
+ {
+ xStg->Remove( rName );
+ xStg->Commit();
+ }
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
+{
+ String sStrmName( pImplAutocorr_ListStr, RTL_TEXTENCODING_MS_1252 );
+ BOOL bRet = TRUE, bRemove = !pAutocorr_List || !pAutocorr_List->Count();
+ if( !bRemove )
+ {
+ SvStorageStreamRef refList = rStg.OpenStream( sStrmName,
+ ( STREAM_READ | STREAM_WRITE | STREAM_SHARE_DENYWRITE ) );
+ if( refList.Is() )
+ {
+ refList->SetSize( 0 );
+ refList->SetBufferSize( 8192 );
+ rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
+
+ String aDummy; // Erkennungszeichen fuer neue Streams
+ refList->WriteByteString( aDummy, RTL_TEXTENCODING_MS_1252 )
+ << (BYTE) 4 // Laenge des Headers (ohne den Leerstring)
+ << (USHORT)WORDLIST_VERSION_358 // Version des Streams
+ << (BYTE)eEncoding; // der Zeichensatz
+
+ for( USHORT i = 0; i < pAutocorr_List->Count() &&
+ SVSTREAM_OK == refList->GetError(); ++i )
+ {
+ SvxAutocorrWord* p = pAutocorr_List->GetObject( i );
+ refList->WriteByteString( p->GetShort(), eEncoding ).
+ WriteByteString( p->IsTextOnly()
+ ? p->GetLong()
+ : p->GetShort(), eEncoding );
+ }
+ refList->Commit();
+ bRet = SVSTREAM_OK == refList->GetError();
+ if( bRet )
+ {
+ refList.Clear();
+ rStg.Commit();
+ if( SVSTREAM_OK != rStg.GetError() )
+ {
+ bRemove = TRUE;
+ bRet = FALSE;
+ }
+ }
+ }
+ else
+ bRet = FALSE;
+ }
+
+ if( bRemove )
+ {
+ rStg.Remove( sStrmName );
+ rStg.Commit();
+ }
+
+ return bRet;
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
+ const String& rLong )
+{
+ // erstmal akt. Liste besorgen!
+ GetAutocorrWordList();
+
+ SvStorageRef xStg = new SvStorage( sAutoCorrFile,
+ STREAM_STD_READWRITE, STORAGE_TRANSACTED );
+ BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
+
+/* if( bRet )
+ {
+ // PutText( *xStg, rShort );
+ }
+*/
+ // die Wortliste aktualisieren
+ if( bRet )
+ {
+ USHORT nPos;
+ SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, rLong, TRUE );
+ if( pAutocorr_List->Seek_Entry( pNew, &nPos ) )
+ {
+ if( !(*pAutocorr_List)[ nPos ]->IsTextOnly() )
+ {
+ // dann ist der Storage noch zu entfernen
+ String sStgNm( rShort );
+ EncryptBlockName_Imp( sStgNm );
+ if( xStg->IsContained( sStgNm ) )
+ xStg->Remove( sStgNm );
+ }
+ pAutocorr_List->DeleteAndDestroy( nPos );
+ }
+
+ if( pAutocorr_List->Insert( pNew ) )
+ bRet = MakeBlocklist_Imp( *xStg );
+ else
+ {
+ delete pNew;
+ bRet = FALSE;
+ }
+ }
+ return bRet;
+}
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+ // - Text mit Attributierung (kann nur der SWG - SWG-Format!)
+BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
+ SfxObjectShell& rShell )
+{
+ // erstmal akt. Liste besorgen!
+ GetAutocorrWordList();
+
+ String sLong;
+ SvStorageRef xStg = new SvStorage( sAutoCorrFile,
+ STREAM_STD_READWRITE, STORAGE_TRANSACTED );
+ BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
+
+ if( bRet )
+ {
+// String aName( rShort );
+// EncryptBlockName_Imp( aName );
+// bRet = PutText( *xStg, aName, rShell, sLong );
+ bRet = rAutoCorrect.PutText( *xStg, rShort, rShell, sLong );
+ }
+
+ // die Wortliste aktualisieren
+ if( bRet )
+ {
+ SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, FALSE );
+ if( pAutocorr_List->Insert( pNew ) )
+ MakeBlocklist_Imp( *xStg );
+ else
+ delete pNew;
+ }
+ return bRet;
+}
+
+/* -----------------18.11.98 11:26-------------------
+ *
+ * --------------------------------------------------*/
+ // - loesche einen Eintrag
+BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort )
+{
+ // erstmal akt. Liste besorgen!
+ GetAutocorrWordList();
+
+ SvStorageRef xStg = new SvStorage( sAutoCorrFile,
+ STREAM_STD_READWRITE, STORAGE_TRANSACTED );
+ BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
+ if( bRet )
+ {
+ USHORT nPos;
+ SvxAutocorrWord aTmp( rShort, rShort );
+ if( pAutocorr_List->Seek_Entry( &aTmp, &nPos ) )
+ {
+ SvxAutocorrWord* pFnd = (*pAutocorr_List)[ nPos ];
+ if( !pFnd->IsTextOnly() )
+ {
+ String aName( rShort );
+ EncryptBlockName_Imp( aName );
+ if( xStg->IsContained( aName ) )
+ {
+ xStg->Remove( aName );
+ bRet = xStg->Commit();
+ }
+ }
+ // die Wortliste aktualisieren
+ pAutocorr_List->DeleteAndDestroy( nPos );
+ MakeBlocklist_Imp( *xStg );
+ }
+ else
+ bRet = FALSE;
+ }
+ return bRet;
+}
+
+
diff --git a/svx/source/editeng/swafopt.cxx b/svx/source/editeng/swafopt.cxx
new file mode 100644
index 0000000000..da07af3874
--- /dev/null
+++ b/svx/source/editeng/swafopt.cxx
@@ -0,0 +1,213 @@
+/*************************************************************************
+ *
+ * $RCSfile: swafopt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SV_KEYCODES_HXX //autogen
+#include <vcl/keycodes.hxx>
+#endif
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+
+#include "swafopt.hxx"
+
+#if defined UNX
+
+#if defined GCC
+extern const sal_Char __FAR_DATA sBulletFntName[];
+const sal_Char __FAR_DATA sBulletFntName[] = "starbats";
+#else
+extern const sal_Char __FAR_DATA sBulletFntName[] = "starbats";
+#endif
+
+#else
+extern const sal_Char __FAR_DATA sBulletFntName[] = "StarBats";
+#endif
+
+// !! JP - 17.04.00: which value becomes this Bulletchar
+// in the Unicode Version?
+const sal_Char cBulletChar = '\x95'; // character for Aufzaehlungen
+
+/*------------------------------------------------------------------------
+ Beschreibung:
+------------------------------------------------------------------------*/
+
+SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
+ : aBulletFont( String( sBulletFntName, RTL_TEXTENCODING_MS_1252 ),
+ Size( 0, 14 ) )
+{
+ bReplaceQuote =
+ bAutoCorrect =
+ bCptlSttSntnc =
+ bCptlSttWrd =
+ bChkFontAttr =
+ bChgUserColl =
+ bChgEnumNum =
+ bChgFracionSymbol =
+ bChgOrdinalNumber =
+ bChgToEnEmDash =
+ bChgWeightUnderl =
+ bSetINetAttr =
+ bAFmtDelSpacesAtSttEnd =
+ bAFmtDelSpacesBetweenLines =
+ bAFmtByInpDelSpacesAtSttEnd =
+ bAFmtByInpDelSpacesBetweenLines =
+ bDummy = TRUE;
+
+ bReplaceStyles =
+ bDelEmptyNode =
+ bWithRedlining =
+ bAutoCmpltEndless =
+ bAutoCmpltAppendBlanc =
+ bAutoCmpltShowAsTip = FALSE;
+
+ bSetBorder =
+ bCreateTable =
+ bSetNumRule =
+ bAFmtByInput =
+ bRightMargin =
+ bAutoCompleteWords =
+ bAutoCmpltCollectWords = TRUE;
+
+ bDummy4 = bDummy5 = bDummy6 = bDummy7 = bDummy8 =
+ FALSE;
+
+ nRightMargin = 50; // dflt. 50 %
+ nAutoCmpltExpandKey = KEY_RETURN;
+
+ aBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
+ aBulletFont.SetFamily( FAMILY_DONTKNOW );
+ aBulletFont.SetPitch( PITCH_DONTKNOW );
+ aBulletFont.SetWeight( WEIGHT_DONTKNOW );
+ aBulletFont.SetTransparent( TRUE );
+
+ cBullet = ByteString::ConvertToUnicode( cBulletChar,
+ RTL_TEXTENCODING_SYMBOL );
+ cByInputBullet = cBullet;
+ aByInputBulletFont = aBulletFont;
+
+ nAutoCmpltWordLen = 10;
+ nAutoCmpltListLen = 500;
+ pAutoCmpltList = 0;
+}
+
+
+SvxSwAutoFmtFlags& SvxSwAutoFmtFlags::operator=( const SvxSwAutoFmtFlags& rAFFlags )
+{
+ bAutoCorrect = rAFFlags.bAutoCorrect;
+ bReplaceQuote = rAFFlags.bReplaceQuote;
+ bCptlSttSntnc = rAFFlags.bCptlSttSntnc;
+ bCptlSttWrd = rAFFlags.bCptlSttWrd;
+ bChkFontAttr = rAFFlags.bChkFontAttr;
+
+ bChgUserColl = rAFFlags.bChgUserColl;
+ bChgEnumNum = rAFFlags.bChgEnumNum;
+ bDelEmptyNode = rAFFlags.bDelEmptyNode;
+ bSetNumRule = rAFFlags.bSetNumRule;
+ bAFmtByInput = rAFFlags.bAFmtByInput;
+
+ bChgFracionSymbol = rAFFlags.bChgFracionSymbol;
+ bChgOrdinalNumber = rAFFlags.bChgOrdinalNumber;
+ bChgToEnEmDash = rAFFlags.bChgToEnEmDash;
+ bChgWeightUnderl = rAFFlags.bChgWeightUnderl;
+ bSetINetAttr = rAFFlags.bSetINetAttr;
+ bSetBorder = rAFFlags.bSetBorder;
+ bCreateTable = rAFFlags.bCreateTable;
+ bReplaceStyles = rAFFlags.bReplaceStyles;
+ bAFmtDelSpacesAtSttEnd = rAFFlags.bAFmtDelSpacesAtSttEnd;
+ bAFmtDelSpacesBetweenLines = rAFFlags.bAFmtDelSpacesBetweenLines;
+ bAFmtByInpDelSpacesAtSttEnd = rAFFlags.bAFmtByInpDelSpacesAtSttEnd;
+ bAFmtByInpDelSpacesBetweenLines = rAFFlags.bAFmtByInpDelSpacesBetweenLines;
+
+ bDummy = rAFFlags.bDummy;
+
+ bDummy4 = rAFFlags.bDummy4;
+ bDummy5 = rAFFlags.bDummy5;
+ bDummy6 = rAFFlags.bDummy6;
+ bDummy7 = rAFFlags.bDummy7;
+ bDummy8 = rAFFlags.bDummy8;
+
+ bWithRedlining = rAFFlags.bWithRedlining;
+
+ bRightMargin = rAFFlags.bRightMargin;
+ nRightMargin = rAFFlags.nRightMargin;
+
+ cBullet = rAFFlags.cBullet;
+ aBulletFont = rAFFlags.aBulletFont;
+
+ cByInputBullet = rAFFlags.cByInputBullet;
+ aByInputBulletFont = rAFFlags.aByInputBulletFont;
+
+ bAutoCompleteWords = rAFFlags.bAutoCompleteWords;
+ bAutoCmpltCollectWords = rAFFlags.bAutoCmpltCollectWords;
+ bAutoCmpltEndless = rAFFlags.bAutoCmpltEndless;
+ bAutoCmpltAppendBlanc = rAFFlags.bAutoCmpltAppendBlanc;
+ bAutoCmpltShowAsTip = rAFFlags.bAutoCmpltShowAsTip;
+ pAutoCmpltList = rAFFlags.pAutoCmpltList;
+ nAutoCmpltExpandKey = rAFFlags.nAutoCmpltExpandKey;
+
+ nAutoCmpltWordLen = rAFFlags.nAutoCmpltWordLen;
+ nAutoCmpltListLen = rAFFlags.nAutoCmpltListLen;
+
+ return *this;
+}
+
diff --git a/svx/source/editeng/textconv.cxx b/svx/source/editeng/textconv.cxx
new file mode 100644
index 0000000000..c35d99cedc
--- /dev/null
+++ b/svx/source/editeng/textconv.cxx
@@ -0,0 +1,360 @@
+/*************************************************************************
+ *
+ * $RCSfile: textconv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ENABLEUNICODE
+
+#define _TEXTCONV_CXX
+#include <textconv.hxx>
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _SV_OUTDEV_HXX
+#include <vcl/outdev.hxx>
+#endif
+
+#ifndef _SV_METRIC_HXX
+#include <vcl/metric.hxx>
+#endif
+
+#include <rtl/tencinfo.h>
+#include <rtl/textenc.h>
+
+SV_IMPL_VARARR( NonConvChars, AttribRange );
+
+TextConverter::TextConverter()
+{
+ eSourceCharSet = CHARSET_DONTKNOW;
+ eDestCharSet = CHARSET_DONTKNOW;
+}
+
+TextConverter::TextConverter( CharSet eSource, CharSet eDest )
+{
+ eSourceCharSet = eSource;
+ eDestCharSet = eDest;
+}
+
+void TextConverter::Convert( String& rText, BOOL bSmartReplace )
+{
+ aNotConvertedChars.Remove( 0, aNotConvertedChars.Count() );
+
+ if( rText.Len() )
+ {
+ rtl_TextEncodingInfo aTextEncInfo1;
+ aTextEncInfo1.StructSize = sizeof( aTextEncInfo1 );
+ rtl_getTextEncodingInfo( eSourceCharSet, &aTextEncInfo1 );
+
+ rtl_TextEncodingInfo aTextEncInfo2;
+ aTextEncInfo2.StructSize = sizeof( aTextEncInfo2 );
+ rtl_getTextEncodingInfo( eDestCharSet, &aTextEncInfo2 );
+
+ if ( (aTextEncInfo1.MaximumCharSize == 1) &&
+ (aTextEncInfo2.MaximumCharSize == 1) )
+ {
+ // Erstmal den gesamten String konvertieren und dann ggf. die nicht
+ // konvertierbaren Zeichen zurueckkopieren.
+ // Das kann auch nicht teurer sein als staendig neue kleine
+ // Strings zu erzeugen und aneinander zu haengen.
+ String aNewText( rText );
+ aNewText.Convert( eSourceCharSet, eDestCharSet, FALSE );
+
+ // bReplace = FALSE => nicht konvertiebare Zeichen sind jetzt ZERO
+
+ // Bereich fuer nicht konvertierbare Zeichen
+ USHORT nNotConvertedFrom = INVPOS;
+ USHORT nNotConvertedTo = 0;
+
+ USHORT nCurNonConvblRange = 0;
+ USHORT nNonConvblStartOff = INVPOS;
+ USHORT nNonConvblEndOff = 0;
+
+ // 1. nicht konvertierbarer Bereich:
+ GetNonConvblRange( nCurNonConvblRange++, nNonConvblStartOff, nNonConvblEndOff );
+
+ USHORT nLen = rText.Len();
+ char* pNewText = aNewText.GetCharStr();
+ for( USHORT nChar = 0; nChar < nLen; nChar++ )
+ {
+ // ggf. naechster nicht konvertierbarer Bereich:
+ if( ( nNonConvblStartOff != 0xFFFF ) && ( nNonConvblEndOff <= nChar ) )
+ GetNonConvblRange( nCurNonConvblRange++, nNonConvblStartOff, nNonConvblEndOff );
+
+ // Testen, ob man sich im verbotenen Bereich befindet:
+ if( ( nNonConvblStartOff == INVPOS ) || ( nChar < nNonConvblStartOff ) || ( nChar >= nNonConvblEndOff ) )
+ {
+ if( !pNewText[nChar] && bSmartReplace )
+ {
+ // Gottseidank haben alle OS/2-Zeichensaetze bis auf 865
+ // die Zeichen ® und ¯ am selben Fleck. Da hier nur
+ // die nichtkonvertierbaren ZS durchschlagen, ist die
+ // Abfrage sehr einfach zu halten. ANSI und Mac werden
+ // von String::Convert() bereits korrekt konvertiert.
+ // CHARSET_UNIXANSI gibt es (noch) nicht
+ switch( eSourceCharSet )
+ {
+ case CHARSET_ANSI:
+ {
+ switch( (unsigned char)rText.GetChar( nChar ) )
+ {
+ case 132: pNewText[nChar] = (char)(unsigned char)175; break;
+ case 147: pNewText[nChar] = (char)(unsigned char)174; break;
+ }
+ }
+ break;
+ case CHARSET_MAC:
+ {
+ switch( (unsigned char)rText.GetChar( nChar ) )
+ {
+ case 210:
+ case 227: pNewText[nChar] = (char)(unsigned char)175; break;
+ case 211: pNewText[nChar] = (char)(unsigned char)174; break;
+ }
+ }
+ break;
+ }
+
+ // Der Zeichensatz 865 hat keine Matchpaare fuer Anf.Zeichen
+ if( ( eDestCharSet == CHARSET_IBMPC_865 ) && ( ( (unsigned char)pNewText[nChar] == 174 ) || ( (unsigned char)pNewText[nChar] == 175 ) ) )
+ pNewText[nChar] = '"';
+ }
+
+ if( pNewText[nChar] )
+ {
+ // Zeichen konnte (wieder) konvertiert werden.
+
+ // Range der Zeichen, die nicht konvertiert werden konnten:
+ if( nNotConvertedFrom != INVPOS )
+ {
+ aNotConvertedChars.Insert( AttribRange( nNotConvertedFrom, nNotConvertedTo ), aNotConvertedChars.Count() );
+ nNotConvertedFrom = INVPOS;
+ }
+ }
+ else
+ {
+ // Zeichen ist nicht konvertierbar: merken und restaurieren
+ pNewText[nChar] = rText.GetChar( nChar );
+ if( nNotConvertedFrom == INVPOS )
+ nNotConvertedFrom = nChar;
+ nNotConvertedTo = nChar;
+ }
+ }
+ else
+ {
+ pNewText[nChar] = rText.GetChar( nChar );
+ // Zeichen die nicht konvertiert werden duerfen, sollen nicht
+ // als NotConverted auftauchen.
+ if( nNotConvertedFrom != INVPOS )
+ {
+ aNotConvertedChars.Insert( AttribRange( nNotConvertedFrom, nNotConvertedTo ), aNotConvertedChars.Count() );
+ nNotConvertedFrom = INVPOS;
+ }
+ }
+ }
+ // Eventuellen uebriggelassenen nicht konvertierbaren Bereich:
+ if( nNotConvertedFrom != INVPOS )
+ aNotConvertedChars.Insert( AttribRange( nNotConvertedFrom, nNotConvertedTo ), aNotConvertedChars.Count() );
+
+ #ifdef DBG_UTIL
+ for ( USHORT n = aNewText.Len(); n; )
+ DBG_ASSERT( aNewText.GetChar( --n ), "TextConverter: Char not converted - error in String" );
+ #endif
+
+ rText = aNewText;
+ }
+ else
+ {
+ // NonConvertableChars not supported here!
+ rText.Convert( eSourceCharSet, eDestCharSet, TRUE );
+ }
+ }
+}
+
+char TextConverter::GetReplaceChar( OutputDevice* pDev, sal_Unicode cUnicode, Font& rFont )
+{
+ char cReplace = 0;
+
+ if ( pDev )
+ {
+ pDev->Push( PUSH_FONT );
+ pDev->SetFont( rFont );
+ FontMetric aNewFont = pDev->GetFontMetric();
+ cReplace = String::ConvertFromUnicode( cUnicode, aNewFont.GetCharSet(), FALSE );
+ pDev->Pop();
+ }
+
+ if ( !cReplace )
+ {
+ // Try replacement character in 'StarBats'
+ switch ( cUnicode )
+ {
+ // Currency
+ case 0x00A2: cReplace = (char)224;
+ break;
+ case 0x00A4: cReplace = (char)225;
+ break;
+ case 0x00A5: cReplace = (char)226;
+ break;
+ case 0x20A1: cReplace = (char)228;
+ break;
+ case 0x20A2: cReplace = (char)229;
+ break;
+ case 0x20A3: cReplace = (char)230;
+ break;
+ case 0x20A4: cReplace = (char)231;
+ break;
+ case 0x20A7: cReplace = (char)227;
+ break;
+ case 0x20A8: cReplace = (char)234;
+ break;
+ case 0x20A9: cReplace = (char)232;
+ break;
+ case 0x20AB: cReplace = (char)233;
+ break;
+ case 0x20AC: cReplace = (char)128;
+ break;
+
+ // Punctuation and other
+ case 0x201A: cReplace = (char)130; // SINGLE LOW-9 QUOTATION MARK
+ break;
+ case 0x0192: cReplace = (char)131; // LATIN SMALL LETTER F WITH HOOK
+ break;
+ case 0x201E: // DOUBLE LOW-9 QUOTATION MARK
+ case 0x301F: // LOW DOUBLE PRIME QUOTATION MARK
+ cReplace = (char)132;
+ break;
+ case 0x2026: cReplace = (char)133; // HORIZONTAL ELLIPSES
+ break;
+ case 0x2020: cReplace = (char)134; // DAGGER
+ break;
+ case 0x2021: cReplace = (char)135; // DOUBLE DAGGER
+ break;
+ case 0x02C6: cReplace = (char)136; // MODIFIER LETTER CIRCUMFLEX ACCENT
+ break;
+ case 0x2030: cReplace = (char)137; // PER MILLE SIGN
+ break;
+ case 0x0160: cReplace = (char)138; // LATIN CAPITAL LETTER S WITH CARON
+ break;
+ case 0x2039: cReplace = (char)139; // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ break;
+ case 0x0152: cReplace = (char)140; // LATIN CAPITAL LIGATURE OE
+ break;
+ case 0x017D: cReplace = (char)142; // LATIN CAPITAL LETTER Z WITH CARON
+ break;
+ case 0x2018: // LEFT SINGLE QUOTATION MARK
+ case 0x02BB: // MODIFIER LETTER TURNED COMMA
+ cReplace = (char)145;
+ break;
+ case 0x2019: // RIGHT SINGLE QUOTATION MARK
+ case 0x02BC: // MODIFIER LETTER APOSTROPHE
+ cReplace = (char)146;
+ break;
+ case 0x201C: // LEFT DOUBLE QUOTATION MARK
+ case 0x301D: // REVERSED DOUBLE PRIME QUOTATION MARK
+ cReplace = (char)147;
+ break;
+ case 0x201D: // RIGHT DOUBLE QUOTATION MARK
+ case 0x301E: // REVERSED DOUBLE PRIME QUOTATION MARK
+ cReplace = (char)148;
+ break;
+ case 0x2022: cReplace = (char)149; // BULLET
+ break;
+ case 0x2013: cReplace = (char)150; // EN DASH
+ break;
+ case 0x2014: cReplace = (char)151; // EM DASH
+ break;
+ case 0x02DC: cReplace = (char)152; // SMALL TILDE
+ break;
+ case 0x2122: cReplace = (char)153; // TRADE MARK SIGN
+ break;
+ case 0x0161: cReplace = (char)154; // LATIN SMALL LETTER S WITH CARON
+ break;
+ case 0x203A: cReplace = (char)155; // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ break;
+ case 0x0153: cReplace = (char)156; // LATIN SMALL LIGATURE OE
+ break;
+ case 0x017E: cReplace = (char)158; // LATIN SMALL LETTER Z WITH CARON
+ break;
+ case 0x0178: cReplace = (char)159; // LATIN CAPITAL LETTER Y WITH DIAERESIS
+ break;
+ case 0x00B6: cReplace = (char)222; // PILCROW SIGN / PARAGRAPH SIGN
+ break;
+ }
+
+ if ( cReplace )
+ {
+ // return replacement character from 'StarBats'
+ rFont.SetName( "StarBats" );
+ rFont.SetCharSet( CHARSET_SYMBOL );
+ }
+ else
+ {
+ // return replacement character from original font
+ cReplace = String::ConvertFromUnicode( cUnicode, rFont.GetCharSet(), TRUE );
+ }
+ }
+
+ return cReplace;
+}
+
+#endif // ENABLEUNICODE
diff --git a/svx/source/editeng/txtrange.cxx b/svx/source/editeng/txtrange.cxx
new file mode 100644
index 0000000000..891657e84d
--- /dev/null
+++ b/svx/source/editeng/txtrange.cxx
@@ -0,0 +1,757 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtrange.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+#include <xoutx.hxx>
+#endif
+
+#include "txtrange.hxx"
+#include <math.h>
+
+#ifndef _POLY_HXX //autogen
+#include <vcl/poly.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+
+/*************************************************************************
+|*
+|* TextRanger::TextRanger()
+|*
+|* Beschreibung
+|* Ersterstellung 20.01.97
+|* Letzte Aenderung 20.01.97 AMA
+|*
+*************************************************************************/
+
+#ifdef WIN
+#pragma optimize ( "", off )
+#endif
+
+TextRanger::TextRanger( const XPolyPolygon& rXPoly, const XPolyPolygon* pXLine,
+ USHORT nCacheSz, USHORT nLft, USHORT nRght, BOOL bSimpl, BOOL bInnr ) :
+ pBound( NULL ), nCacheSize( nCacheSz ), nCacheIdx( 0 ), nPointCount( 0 ),
+ nLeft( nLft ), nRight( nRght ), nUpper( 0 ), nLower( 0 ),
+ bSimple( bSimpl ), bInner( bInnr )
+{
+#ifndef PRODUCT
+ bFlag2 = bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = FALSE;
+#endif
+ pRangeArr = new Range[ nCacheSize ];
+ pCache = new SvLongsPtr[ nCacheSize ];
+ memset( pRangeArr, 0, nCacheSize * sizeof( Range ) );
+ memset( pCache, 0, nCacheSize * sizeof( SvLongsPtr ) );
+ USHORT nCount = rXPoly.Count();
+ pPoly = new PolyPolygon( nCount );
+ for( USHORT i = 0; i < nCount; ++i )
+ {
+ Polygon aTmp = XOutCreatePolygon( rXPoly[ i ], NULL, 100 );
+ nPointCount += aTmp.GetSize();
+ pPoly->Insert( aTmp, i );
+ }
+ if( pXLine )
+ {
+ nCount = pXLine->Count();
+ pLine = new PolyPolygon();
+ for( USHORT i = 0; i < nCount; ++i )
+ {
+ Polygon aTmp = XOutCreatePolygon( (*pXLine)[ i ], NULL, 100 );
+ nPointCount += aTmp.GetSize();
+ pLine->Insert( aTmp, i );
+ }
+ }
+ else
+ pLine = NULL;
+
+#if 0
+ ULONG nPolyPtr = (ULONG)&rXPoly;
+ String aDbgFile( "d:\\" );
+ aDbgFile += nPolyPtr;
+ aDbgFile += ".pol";
+ SvFileStream aStream( aDbgFile, STREAM_WRITE|STREAM_TRUNC );
+ aStream << "pPoly: " << String( (ULONG)pPoly ).GetStr();
+ for ( USHORT nPoly = 0; nPoly < pPoly->Count(); nPoly++ )
+ {
+ const Polygon& rPoly = pPoly->GetObject( nPoly );
+ for ( USHORT n = 0; n < rPoly.GetSize(); n++ )
+ {
+ const Point& rPoint = rPoly.GetPoint( n );
+ aStream << String( rPoint.X() ).GetStr() << ", " << String( rPoint.Y() ).GetStr() << endl;
+ }
+ }
+#endif
+}
+
+#ifdef WIN
+#pragma optimize ( "", on )
+#endif
+
+/*************************************************************************
+|*
+|* TextRanger::~TextRanger()
+|*
+|* Beschreibung
+|* Ersterstellung 20.01.97
+|* Letzte Aenderung 20.01.97 AMA
+|*
+*************************************************************************/
+
+TextRanger::~TextRanger()
+{
+ for( USHORT i = 0; i < nCacheSize; ++i )
+ delete pCache[i];
+ delete pCache;
+ delete pRangeArr;
+ delete pPoly;
+ delete pLine;
+}
+
+/*************************************************************************
+|*
+|* SvxBoundArgs
+|*
+|* Beschreibung
+|* Ersterstellung 20.01.97
+|* Letzte Aenderung 20.01.97 AMA
+|*
+*************************************************************************/
+
+class SvxBoundArgs
+{
+ SvBools aBoolArr;
+ SvLongs *pLongArr;
+ TextRanger *pTextRanger;
+ long nMin;
+ long nMax;
+ long nTop;
+ long nBottom;
+ long nUpDiff;
+ long nLowDiff;
+ long nUpper;
+ long nLower;
+ USHORT nCut;
+ USHORT nLast;
+ USHORT nNext;
+ BYTE nAct;
+ BYTE nFirst;
+ BOOL bClosed : 1;
+ BOOL bInner : 1;
+ BOOL bMultiple : 1;
+ BOOL bConcat : 1;
+ void NoteRange( BOOL bToggle );
+ long Cut( long nY, const Point& rPt1, const Point& rPt2 );
+ void Add();
+ void _NoteFarPoint( long nPx, long nPyDiff, long nDiff );
+ void NoteFarPoint( long nPx, long nPyDiff, long nDiff )
+ { if( nDiff ) _NoteFarPoint( nPx, nPyDiff, nDiff ); }
+ long CalcMax( const Point& rPt1, const Point& rPt2, long nRange, long nFar );
+ void CheckCut( const Point& rLst, const Point& rNxt );
+public:
+ SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong, const Range& rRange )
+ : aBoolArr( 4, 4 ), pLongArr( pLong ), pTextRanger( pRanger ),
+ nTop( rRange.Min() ), nBottom( rRange.Max() ),
+ // pRanger->GetUpper() ist der Abstand des Objekts nach _oben_, von der
+ // Textzeile aus betrachtet ist dies der Bereich _unter_ der Zeile,
+ // der mit beruecksichtigt werden muss.
+ nLowDiff( pRanger->GetUpper() ), nUpDiff( pRanger->GetLower() ),
+ bInner( pRanger->IsInner() ), bMultiple( bInner || !pRanger->IsSimple() ),
+ bConcat( FALSE )
+ {
+ nUpper = nTop - nUpDiff;
+ nLower = nBottom + nLowDiff;
+ pLongArr->Remove( 0, pLongArr->Count() );
+ }
+
+ void NotePoint( const long nX )
+ { NoteMargin( nX - pTextRanger->GetLeft(), nX + pTextRanger->GetRight() );}
+ void NoteMargin( const long nL, const long nR )
+ { if( nMin > nL ) nMin = nL; if( nMax < nR ) nMax = nR; }
+ USHORT Area( const Point& rPt );
+ void NoteUpLow( long nX, const BYTE nArea );
+ void Calc( const PolyPolygon& rPoly );
+ void Concat( const PolyPolygon* pPoly );
+ // inlines
+ void NoteLast() { if( bMultiple ) NoteRange( nAct == nFirst ); }
+ void SetClosed( const BOOL bNew ){ bClosed = bNew; }
+ BOOL IsClosed() const { return bClosed; }
+ void SetConcat( const BOOL bNew ){ bConcat = bNew; }
+ BOOL IsConcat() const { return bConcat; }
+ BYTE GetAct() const { return nAct; }
+};
+
+long SvxBoundArgs::CalcMax( const Point& rPt1, const Point& rPt2,
+ long nRange, long nFarRange )
+{
+ double nDx = Cut( nRange, rPt1, rPt2 ) - Cut( nFarRange, rPt1, rPt2 );
+ double nYps;
+ if( nDx < 0 )
+ {
+ nDx = -nDx;
+ nYps = pTextRanger->GetRight();
+ }
+ else
+ nYps = pTextRanger->GetLeft();
+ nYps *= nYps;
+ nYps += nDx * nDx;
+ nYps = nRange + nDx * ( nFarRange - nRange ) / sqrt( nYps );
+
+ BOOL bNote;
+ if( nYps < rPt2.Y() )
+ bNote = nYps > rPt1.Y();
+ else
+ bNote = nYps < rPt1.Y();
+ if( bNote )
+ return( long( nYps ) );
+ return 0;
+}
+
+void SvxBoundArgs::CheckCut( const Point& rLst, const Point& rNxt )
+{
+ if( nCut & 1 )
+ NotePoint( Cut( nBottom, rLst, rNxt ) );
+ if( nCut & 2 )
+ NotePoint( Cut( nTop, rLst, rNxt ) );
+ if( rLst.X() != rNxt.X() && rLst.Y() != rNxt.Y() )
+ {
+ long nYps;
+ if( nLowDiff && ( ( nCut & 1 ) || nLast == 1 || nNext == 1 ) )
+ {
+ nYps = CalcMax( rLst, rNxt, nBottom, nLower );
+ if( nYps )
+ _NoteFarPoint( Cut( nYps, rLst, rNxt ), nLower-nYps, nLowDiff );
+ }
+ if( nUpDiff && ( ( nCut & 2 ) || nLast == 2 || nNext == 2 ) )
+ {
+ nYps = CalcMax( rLst, rNxt, nTop, nUpper );
+ if( nYps )
+ _NoteFarPoint( Cut( nYps, rLst, rNxt ), nYps-nUpper, nUpDiff );
+ }
+ }
+}
+
+void SvxBoundArgs::_NoteFarPoint( long nPx, long nPyDiff, long nDiff )
+{
+ long nTmpX;
+#ifndef PRODUCT
+ if( pTextRanger->IsFlag7() || pTextRanger->IsFlag6() )
+ {
+ if( pTextRanger->IsFlag7() )
+ nPyDiff = nDiff;
+ nTmpX = nPx - ( nPyDiff * pTextRanger->GetLeft() ) / nDiff;
+ nPyDiff = nPx + ( nPyDiff * pTextRanger->GetRight() ) / nDiff;
+ }
+ else
+#endif
+ {
+ double nQuot = 2 * nDiff - nPyDiff;
+ nQuot *= nPyDiff;
+ nQuot = sqrt( nQuot );
+ nQuot /= nDiff;
+ nTmpX = nPx - long( pTextRanger->GetLeft() * nQuot );
+ nPyDiff = nPx + long( pTextRanger->GetRight() * nQuot );
+ }
+ NoteMargin( nTmpX, nPyDiff );
+}
+
+void SvxBoundArgs::NoteRange( BOOL bToggle )
+{
+ DBG_ASSERT( nMax >= nMin || bInner, "NoteRange: Min > Max?");
+ if( nMax < nMin )
+ return;
+ if( !bClosed )
+ bToggle = FALSE;
+ USHORT nIdx = 0;
+ USHORT nCount = pLongArr->Count();
+ DBG_ASSERT( nCount == 2 * aBoolArr.Count(), "NoteRange: Incompatible Sizes" );
+ while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin )
+ ++nIdx;
+ BOOL bOdd = nIdx % 2 ? TRUE : FALSE;
+ // Kein Ueberlappung mit vorhandenen Intervallen?
+ if( nIdx == nCount || ( !bOdd && nMax < (*pLongArr)[ nIdx ] ) )
+ { // Dann wird ein neues eingefuegt ...
+ pLongArr->Insert( nMin, nIdx );
+ pLongArr->Insert( nMax, nIdx + 1 );
+ aBoolArr.Insert( bToggle, nIdx / 2 );
+ }
+ else
+ { // ein vorhandes Intervall erweitern ...
+ USHORT nMaxIdx = nIdx;
+ // Wenn wir auf einer linken Intervallgrenze gelandet sind, muss diese
+ // auf nMin gesenkt werden.
+ if( bOdd )
+ --nIdx;
+ else
+ (*pLongArr)[ nIdx ] = nMin;
+ while( nMaxIdx < nCount && (*pLongArr)[ nMaxIdx ] < nMax )
+ ++nMaxIdx;
+ DBG_ASSERT( nMaxIdx > nIdx || nMin == nMax, "NoteRange: Funny Situation." );
+ if( nMaxIdx )
+ --nMaxIdx;
+ if( nMaxIdx < nIdx )
+ nMaxIdx = nIdx;
+ // Wenn wir auf einer rechten Intervallgrenze landen, muss diese
+ // auf nMax angehoben werden.
+ if( nMaxIdx % 2 )
+ (*pLongArr)[ nMaxIdx-- ] = nMax;
+ // Jetzt werden eventuell noch Intervalle verschmolzen
+ USHORT nDiff = nMaxIdx - nIdx;
+ nMaxIdx = nIdx / 2; // Ab hier ist nMaxIdx der Index im BoolArray.
+ if( nDiff )
+ {
+ (*pLongArr).Remove( nIdx + 1, nDiff );
+ nDiff /= 2;
+ USHORT nStop = nMaxIdx + nDiff;
+ for( USHORT i = nMaxIdx; i < nStop; ++i )
+ bToggle ^= aBoolArr[ i ];
+ aBoolArr.Remove( nMaxIdx, nDiff );
+ }
+ DBG_ASSERT( nMaxIdx < aBoolArr.Count(), "NoteRange: Too much deleted" );
+ aBoolArr[ nMaxIdx ] ^= bToggle;
+ }
+}
+
+void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
+{
+ USHORT nCount;
+ nAct = 0;
+ for( USHORT i = 0; i < rPoly.Count(); ++i )
+ {
+ const Polygon& rPol = rPoly[ i ];
+ nCount = rPol.GetSize();
+ if( nCount )
+ {
+ const Point& rNull = rPol[ 0 ];
+ SetClosed( IsConcat() || ( rNull == rPol[ nCount - 1 ] ) );
+#ifndef PRODUCT
+#ifdef DEBUG
+ static bAllwaysClosed = FALSE;
+ if( bAllwaysClosed )
+ SetClosed( TRUE );
+#endif
+#endif
+ nLast = Area( rNull );
+ if( nLast & 12 )
+ {
+ nFirst = 3;
+ if( bMultiple )
+ nAct = 0;
+ }
+ else
+ {
+ // Der erste Punkt des Polygons liegt innerhalb der Zeile.
+ if( nLast )
+ {
+ if( bMultiple || !nAct )
+ {
+ nMin = USHRT_MAX;
+ nMax = 0;
+ }
+ if( nLast & 1 )
+ NoteFarPoint( rNull.X(), nLower - rNull.Y(), nLowDiff );
+ else
+ NoteFarPoint( rNull.X(), rNull.Y() - nUpper, nUpDiff );
+ }
+ else
+ {
+ if( bMultiple || !nAct )
+ {
+ nMin = rNull.X() - pTextRanger->GetLeft();
+ nMax = rNull.X() + pTextRanger->GetRight();
+ }
+ else
+ NotePoint( rNull.X() );
+ }
+ nFirst = 0; // In welcher Richtung wird die Zeile verlassen?
+ nAct = 3; // Wir sind z.Z. innerhalb der Zeile.
+ }
+ if( nCount > 1 )
+ {
+ USHORT nIdx = 1;
+ while( TRUE )
+ {
+ const Point& rLast = rPol[ nIdx - 1 ];
+ if( nIdx == nCount )
+ nIdx = 0;
+ const Point& rNext = rPol[ nIdx ];
+ nNext = Area( rNext );
+ nCut = nNext ^ nLast;
+ USHORT nOldAct = nAct;
+ if( nAct )
+ CheckCut( rLast, rNext );
+ if( nCut & 4 )
+ {
+ NoteUpLow( Cut( nLower, rLast, rNext ), 2 );
+ if( nAct && nAct != nOldAct )
+ {
+ nOldAct = nAct;
+ CheckCut( rLast, rNext );
+ }
+ }
+ if( nCut & 8 )
+ {
+ NoteUpLow( Cut( nUpper, rLast, rNext ), 1 );
+ if( nAct && nAct != nOldAct )
+ CheckCut( rLast, rNext );
+ }
+ if( !nIdx )
+ {
+ if( !( nNext & 12 ) )
+ NoteLast();
+ break;
+ }
+ if( !( nNext & 12 ) )
+ {
+ if( !nNext )
+ NotePoint( rNext.X() );
+ else if( nNext & 1 )
+ NoteFarPoint( rNext.X(),nLower-rNext.Y(),nLowDiff );
+ else
+ NoteFarPoint( rNext.X(),rNext.Y()-nUpper,nUpDiff );
+ }
+ nLast = nNext;
+ if( ++nIdx == nCount && !IsClosed() )
+ {
+ if( !( nNext & 12 ) )
+ NoteLast();
+ break;
+ }
+ }
+ }
+ if( bMultiple && IsConcat() )
+ {
+ Add();
+ nAct = 0;
+ }
+ }
+ }
+ if( !bMultiple )
+ {
+ DBG_ASSERT( pLongArr->Count() == 0, "I said: Simple!" );
+ if( nAct )
+ {
+ if( bInner )
+ {
+ long nTmpMin, nTmpMax;
+ {
+ nTmpMin = nMin + 2 * pTextRanger->GetLeft();
+ nTmpMax = nMax - 2 * pTextRanger->GetRight();
+ if( nTmpMin <= nTmpMax )
+ {
+ pLongArr->Insert( nTmpMin, 0 );
+ pLongArr->Insert( nTmpMax, 1 );
+ }
+ }
+ }
+ else
+ {
+ pLongArr->Insert( nMin, 0 );
+ pLongArr->Insert( nMax, 1 );
+ }
+ }
+ }
+ else if( !IsConcat() )
+ Add();
+}
+
+void SvxBoundArgs::Add()
+{
+ USHORT nLongIdx = 1;
+ USHORT nCount = aBoolArr.Count();
+ if( nCount && ( !bInner || !pTextRanger->IsSimple() ) )
+ {
+ BOOL bDelete = aBoolArr[ 0 ];
+ if( bInner )
+ bDelete = !bDelete;
+ for( USHORT nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx )
+ {
+ if( bDelete )
+ {
+ USHORT nNext = 2;
+ while( nBoolIdx < nCount && !aBoolArr[ nBoolIdx++ ] &&
+ (!bInner || nBoolIdx < nCount ) )
+ nNext += 2;
+ pLongArr->Remove( nLongIdx, nNext );
+ nNext /= 2;
+ nBoolIdx -= nNext;
+ nCount -= nNext;
+ aBoolArr.Remove( nBoolIdx, nNext );
+ if( nBoolIdx )
+ aBoolArr[ nBoolIdx - 1 ] = FALSE;
+#ifdef DEBUG
+ else
+ ++nNext;
+#endif
+ }
+ bDelete = nBoolIdx < nCount && aBoolArr[ nBoolIdx ];
+ nLongIdx += 2;
+ DBG_ASSERT( nLongIdx == 2*nBoolIdx+1, "BoundArgs: Array-Idx Confusion" );
+ DBG_ASSERT( aBoolArr.Count()*2 == pLongArr->Count(),
+ "BoundArgs: Array-Count: Confusion" );
+ }
+ }
+ if( 0 != ( nCount = pLongArr->Count() ) )
+ {
+ if( bInner )
+ {
+ pLongArr->Remove( 0, 1 );
+ pLongArr->Remove( pLongArr->Count() - 1, 1 );
+
+ // Hier wird die Zeile beim "einfachen" Konturumfluss im Innern
+ // in ein grosses Rechteck zusammengefasst.
+ // Zur Zeit (April 1999) wertet die EditEngine nur das erste Rechteck
+ // aus, falls sie eines Tages in der Lage ist, eine Zeile in mehreren
+ // Teilen auszugeben, kann es sinnvoll sein, die folgenden Zeilen
+ // zu loeschen.
+ if( pTextRanger->IsSimple() && pLongArr->Count() > 2 )
+ pLongArr->Remove( 1, pLongArr->Count() - 2 );
+
+ }
+ }
+}
+
+void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
+{
+ SetConcat( TRUE );
+ DBG_ASSERT( pPoly, "Nothing to do?" );
+ SvLongs *pOld = pLongArr;
+ pLongArr = new SvLongs( 2, 8 );
+ aBoolArr.Remove( 0, aBoolArr.Count() );
+ bInner = FALSE;
+ Calc( *pPoly );
+ USHORT nCount = pLongArr->Count();
+ USHORT nIdx = 0;
+ USHORT i = 0;
+ BOOL bSubtract = pTextRanger->IsInner();
+ while( i < nCount )
+ {
+ USHORT nOldCount = pOld->Count();
+ if( nIdx == nOldCount )
+ { // Am Ende des alten Arrays angelangt...
+ if( !bSubtract )
+ pOld->Insert( pLongArr, nIdx, i, USHRT_MAX );
+ break;
+ }
+ long nLeft = (*pLongArr)[ i++ ];
+ long nRight = (*pLongArr)[ i++ ];
+ USHORT nLeftPos = nIdx + 1;
+ while( nLeftPos < nOldCount && nLeft > (*pOld)[ nLeftPos ] )
+ nLeftPos += 2;
+ if( nLeftPos >= nOldCount )
+ { // Das aktuelle Intervall gehoert ans Ende des alten Arrays...
+ if( !bSubtract )
+ pOld->Insert( pLongArr, nOldCount, i - 2, USHRT_MAX );
+ break;
+ }
+ USHORT nRightPos = nLeftPos - 1;
+ while( nRightPos < nOldCount && nRight >= (*pOld)[ nRightPos ] )
+ nRightPos += 2;
+ if( nRightPos < nLeftPos )
+ { // Das aktuelle Intervall gehoert zwischen zwei alte Intervalle
+ if( !bSubtract )
+ pOld->Insert( pLongArr, nRightPos, i - 2, i );
+ nIdx = nRightPos + 2;
+ }
+ else if( bSubtract ) // Subtrahieren ggf. Trennen
+ {
+ long nOld;
+ if( nLeft > ( nOld = (*pOld)[ nLeftPos - 1 ] ) )
+ { // Jetzt spalten wir den linken Teil ab...
+ if( nLeft - 1 > nOld )
+ {
+ pOld->Insert( nOld, nLeftPos - 1 );
+ pOld->Insert( nLeft - 1, nLeftPos );
+ nLeftPos += 2;
+ nRightPos += 2;
+ }
+ }
+ if( nRightPos - nLeftPos > 1 )
+ pOld->Remove( nLeftPos, nRightPos - nLeftPos - 1 );
+ if( ++nRight >= ( nOld = (*pOld)[ nLeftPos ] ) )
+ pOld->Remove( nLeftPos - 1, 2 );
+ else
+ (*pOld)[ nLeftPos - 1 ] = nRight;
+ }
+ else // Verschmelzen
+ {
+ if( nLeft < (*pOld)[ nLeftPos - 1 ] )
+ (*pOld)[ nLeftPos - 1 ] = nLeft;
+ if( nRight > (*pOld)[ nRightPos - 1 ] )
+ (*pOld)[ nRightPos - 1 ] = nRight;
+ if( nRightPos - nLeftPos > 1 )
+ pOld->Remove( nLeftPos, nRightPos - nLeftPos - 1 );
+
+ }
+ nIdx = nLeftPos - 1;
+ }
+ delete pLongArr;
+}
+
+/*************************************************************************
+ * SvxBoundArgs::Area ermittelt den Bereich, in dem sich der Punkt befindet
+ * 0 = innerhalb der Zeile
+ * 1 = unterhalb, aber innerhalb der oberen Randes
+ * 2 = oberhalb, aber innerhalb der unteren Randes
+ * 5 = unterhalb des oberen Randes
+ *10 = oberhalb des unteren Randes
+ *************************************************************************/
+
+USHORT SvxBoundArgs::Area( const Point& rPt )
+{
+ if( rPt.Y() >= nBottom )
+ {
+ if( rPt.Y() >= nLower )
+ return 5;
+ return 1;
+ }
+ if( rPt.Y() <= nTop )
+ {
+ if( rPt.Y() <= nUpper )
+ return 10;
+ return 2;
+ }
+ return 0;
+}
+
+/*************************************************************************
+ * lcl_Cut berechnet die X-Koordinate der Strecke (Pt1-Pt2) auf der
+ * Y-Koordinate nY.
+ * Vorausgesetzt wird, dass einer der Punkte oberhalb und der andere
+ * unterhalb der Y-Koordinate liegt.
+ *************************************************************************/
+
+long SvxBoundArgs::Cut( long nY, const Point& rPt1, const Point& rPt2 )
+{
+ double nQuot = nY - rPt1.Y();
+ nQuot /= ( rPt2.Y() - rPt1.Y() );
+ nQuot *= ( rPt2.X() - rPt1.X() );
+ return long( rPt1.X() + nQuot );
+}
+
+void SvxBoundArgs::NoteUpLow( long nX, const BYTE nArea )
+{
+ if( nAct )
+ {
+#ifndef PRODUCT
+ if( pTextRanger->IsFlag7() )
+ NotePoint( nX );
+ else
+#endif
+ NoteMargin( nX, nX );
+ if( bMultiple )
+ {
+ NoteRange( nArea != nAct );
+ nAct = 0;
+ }
+ if( !nFirst )
+ nFirst = nArea;
+ }
+ else
+ {
+ nAct = nArea;
+#ifndef PRODUCT
+ if( pTextRanger->IsFlag7() )
+ {
+ nMin = nX - pTextRanger->GetLeft();
+ nMax = nX + pTextRanger->GetRight();
+ }
+ else
+#endif
+ {
+ nMin = nX;
+ nMax = nX;
+ }
+ }
+}
+
+SvLongsPtr TextRanger::GetTextRanges( const Range& rRange )
+{
+ DBG_ASSERT( rRange.Min() || rRange.Max(), "Zero-Range not allowed, Bye Bye" );
+ USHORT nIndex = 0;
+ while( nIndex < nCacheSize && rRange != pRangeArr[ nIndex ] )
+ ++nIndex;
+ if( nIndex >= nCacheSize )
+ {
+ ++nCacheIdx;
+ nCacheIdx %= nCacheSize;
+ pRangeArr[ nCacheIdx ] = rRange;
+ if( !pCache[ nCacheIdx ] )
+ pCache[ nCacheIdx ] = new SvLongs( 2, 8 );
+ nIndex = nCacheIdx;
+ SvxBoundArgs aArg( this, pCache[ nCacheIdx ], rRange );
+ aArg.Calc( *pPoly );
+ if( pLine )
+ aArg.Concat( pLine );
+ }
+ return pCache[ nIndex ];
+}
+
+const Rectangle& TextRanger::_GetBoundRect()
+{
+ DBG_ASSERT( 0 == pBound, "Don't call twice." );
+ pBound = new Rectangle( pPoly->GetBoundRect() );
+ return *pBound;
+}
+
+
diff --git a/svx/source/editeng/unolingu.cxx b/svx/source/editeng/unolingu.cxx
new file mode 100644
index 0000000000..459329dc03
--- /dev/null
+++ b/svx/source/editeng/unolingu.cxx
@@ -0,0 +1,778 @@
+/*************************************************************************
+ *
+ * $RCSfile: unolingu.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <unolingu.hxx>
+
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _LANG_HXX
+#include <tools/lang.hxx>
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.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_LINGUISTIC_XDICTIONARYSUPPLIER_HPP_
+#include <com/sun/star/linguistic/XDictionarySupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_
+#include <com/sun/star/lang/XEventListener.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#endif
+
+#ifndef _ISOLANG_HXX
+#include <tools/isolang.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include <dialmgr.hxx>
+#endif
+#include "dialogs.hrc"
+
+using namespace ::rtl;
+using namespace ::utl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::linguistic;
+
+///////////////////////////////////////////////////////////////////////////
+
+typedef cppu::WeakImplHelper1 < XEventListener > LinguMgrAppExitLstnrBaseClass;
+
+class LinguMgrAppExitLstnr : public LinguMgrAppExitLstnrBaseClass
+{
+ Reference< XComponent > xDesktop;
+
+public:
+ LinguMgrAppExitLstnr();
+ virtual ~LinguMgrAppExitLstnr();
+
+ virtual void AtExit() = 0;
+
+
+ // lang::XEventListener
+ virtual void SAL_CALL disposing(const EventObject& rSource)
+ throw( RuntimeException );
+};
+
+LinguMgrAppExitLstnr::LinguMgrAppExitLstnr()
+{
+ // add object to frame::Desktop EventListeners in order to properly call
+ // the AtExit function at appliction exit.
+
+ Reference< XMultiServiceFactory > xMgr = getProcessServiceFactory();
+ if ( xMgr.is() )
+ {
+ xDesktop = Reference< XComponent > ( xMgr->createInstance(
+ OUString( RTL_CONSTASCII_USTRINGPARAM (
+ "com.sun.star.frame.Desktop" ) ) ), UNO_QUERY ) ;
+ if (xDesktop.is())
+ xDesktop->addEventListener( this );
+ }
+}
+
+LinguMgrAppExitLstnr::~LinguMgrAppExitLstnr()
+{
+ if (xDesktop.is())
+ {
+ xDesktop->removeEventListener( this );
+ xDesktop = NULL; //! release reference to desktop
+ }
+ DBG_ASSERT(!xDesktop.is(), "reference to desktop should be realeased");
+}
+
+void LinguMgrAppExitLstnr::disposing(const EventObject& rSource)
+ throw( RuntimeException )
+{
+ if (xDesktop.is() && rSource.Source == xDesktop)
+ {
+ xDesktop->removeEventListener( this );
+ xDesktop = NULL; //! release reference to desktop
+
+ AtExit();
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////
+
+class LinguMgrExitLstnr : public LinguMgrAppExitLstnr
+{
+public:
+ virtual void AtExit();
+};
+
+void LinguMgrExitLstnr::AtExit()
+{
+ // release references
+ LinguMgr::xSpell = 0;
+ LinguMgr::xHyph = 0;
+ LinguMgr::xThes = 0;
+ LinguMgr::xDicList = 0;
+ LinguMgr::xProp = 0;
+ LinguMgr::xIgnoreAll = 0;
+ LinguMgr::xChangeAll = 0;
+
+ LinguMgr::bExiting = sal_True;
+
+ //TL:TODO: MBA fragen wie ich ohne Absturz hier meinen Speicher
+ // wieder freibekomme...
+ //delete LinguMgr::pExitLstnr;
+ LinguMgr::pExitLstnr = 0;
+}
+
+///////////////////////////////////////////////////////////////////////////
+
+// static member initialization
+LinguMgrExitLstnr * LinguMgr::pExitLstnr = 0;
+sal_Bool LinguMgr::bExiting = sal_False;
+Reference< XSpellChecker1 > LinguMgr::xSpell = 0;
+Reference< XHyphenator > LinguMgr::xHyph = 0;
+Reference< XThesaurus > LinguMgr::xThes = 0;
+Reference< XDictionaryList > LinguMgr::xDicList = 0;
+Reference< XPropertySet > LinguMgr::xProp = 0;
+Reference< XDictionary1 > LinguMgr::xIgnoreAll = 0;
+Reference< XDictionary1 > LinguMgr::xChangeAll = 0;
+
+Reference< XSpellChecker1 > LinguMgr::GetSpellChecker()
+{
+ return xSpell.is() ? xSpell : GetSpell();
+}
+
+Reference< XHyphenator > LinguMgr::GetHyphenator()
+{
+ return xHyph.is() ? xHyph : GetHyph();
+}
+
+Reference< XThesaurus > LinguMgr::GetThesaurus()
+{
+ return xThes.is() ? xThes : GetThes();
+}
+
+Reference< XDictionaryList > LinguMgr::GetDictionaryList()
+{
+ return xDicList.is() ? xDicList : GetDicList();
+}
+
+Reference< XPropertySet > LinguMgr::GetLinguPropertySet()
+{
+ return xProp.is() ? xProp : GetProp();
+}
+
+Reference< XDictionary1 > LinguMgr::GetStandardDic()
+{
+ //! don't hold reference to this
+ //! (it may be removed from dictionary list and needs to be
+ //! created empty if accessed again)
+ return GetStandard();
+}
+
+Reference< XDictionary1 > LinguMgr::GetIgnoreAllList()
+{
+ return xIgnoreAll.is() ? xIgnoreAll : GetIgnoreAll();
+}
+
+Reference< XDictionary1 > LinguMgr::GetChangeAllList()
+{
+ return xChangeAll.is() ? xChangeAll : GetChangeAll();
+}
+
+Reference< XSpellChecker1 > LinguMgr::GetSpell()
+{
+ if (bExiting)
+ return 0;
+
+ if (!pExitLstnr)
+ pExitLstnr = new LinguMgrExitLstnr;
+
+ Reference< XMultiServiceFactory > xMgr( getProcessServiceFactory() );
+ if (xMgr.is())
+ {
+ xSpell = Reference< XSpellChecker1 > ( xMgr->createInstance(
+ OUString::createFromAscii(
+ "com.sun.star.linguistic.SpellChecker1") ), UNO_QUERY );
+ if (xSpell.is())
+ xSpell->setDictionaryList( GetDictionaryList() );
+ }
+ return xSpell;
+}
+
+Reference< XHyphenator > LinguMgr::GetHyph()
+{
+ if (bExiting)
+ return 0;
+
+ if (!pExitLstnr)
+ pExitLstnr = new LinguMgrExitLstnr;
+
+ Reference< XMultiServiceFactory > xMgr( getProcessServiceFactory() );
+ if (xMgr.is())
+ {
+ xHyph = Reference< XHyphenator > ( xMgr->createInstance(
+ OUString::createFromAscii(
+ "com.sun.star.linguistic.Hyphenator1") ), UNO_QUERY );
+ if (xHyph.is())
+ xHyph->setDictionaryList( GetDictionaryList() );
+ }
+ return xHyph;
+}
+
+Reference< XThesaurus > LinguMgr::GetThes()
+{
+ if (bExiting)
+ return 0;
+
+ if (!pExitLstnr)
+ pExitLstnr = new LinguMgrExitLstnr;
+
+ Reference< XMultiServiceFactory > xMgr( getProcessServiceFactory() );
+ if (xMgr.is())
+ {
+ xThes = Reference< XThesaurus > ( xMgr->createInstance(
+ OUString::createFromAscii(
+ "com.sun.star.linguistic.Thesaurus") ), UNO_QUERY );
+ }
+ return xThes;
+}
+
+Reference< XDictionaryList > LinguMgr::GetDicList()
+{
+ if (bExiting)
+ return 0;
+
+ if (!pExitLstnr)
+ pExitLstnr = new LinguMgrExitLstnr;
+
+ Reference< XMultiServiceFactory > xMgr( getProcessServiceFactory() );
+ if (xMgr.is())
+ {
+ xDicList = Reference< XDictionaryList > ( xMgr->createInstance(
+ OUString::createFromAscii(
+ "com.sun.star.linguistic.DictionaryList") ), UNO_QUERY );
+ }
+ return xDicList;
+}
+
+Reference< XPropertySet > LinguMgr::GetProp()
+{
+ if (bExiting)
+ return 0;
+
+ if (!pExitLstnr)
+ pExitLstnr = new LinguMgrExitLstnr;
+
+ Reference< XMultiServiceFactory > xMgr( getProcessServiceFactory() );
+ if (xMgr.is())
+ {
+ xProp = Reference< XPropertySet > ( xMgr->createInstance(
+ OUString::createFromAscii(
+ "com.sun.star.linguistic.LinguProperties") ), UNO_QUERY );
+ }
+ return xProp;
+}
+
+Reference< XDictionary1 > LinguMgr::GetIgnoreAll()
+{
+ if (bExiting)
+ return 0;
+
+ if (!pExitLstnr)
+ pExitLstnr = new LinguMgrExitLstnr;
+
+ Reference< XDictionaryList > xTmpDicList( GetDictionaryList() );
+ if (xTmpDicList.is())
+ {
+ xIgnoreAll = Reference< XDictionary1 > ( xTmpDicList->getDictionaryByName(
+ OUString::createFromAscii("IgnoreAllList") ), UNO_QUERY );
+ }
+ return xIgnoreAll;
+}
+
+Reference< XDictionary1 > LinguMgr::GetChangeAll()
+{
+ if (bExiting)
+ return 0;
+
+ if (!pExitLstnr)
+ pExitLstnr = new LinguMgrExitLstnr;
+
+ Reference< XDictionarySupplier > xSupplier( GetDictionaryList() , UNO_QUERY );
+ if (xSupplier.is())
+ {
+ xChangeAll = Reference< XDictionary1 > (
+ xSupplier->createDictionary(
+ OUString::createFromAscii("ChangeAllList"),
+ SvxCreateLocale( LANGUAGE_NONE ),
+ DictionaryType_NEGATIVE, String() ), UNO_QUERY );
+ }
+ return xChangeAll;
+}
+
+Reference< XDictionary1 > LinguMgr::GetStandard()
+{
+ // Tries to return a dictionary which may hold positive entries is
+ // persistent and not read-only.
+
+ if (bExiting)
+ return 0;
+
+ Reference< XDictionaryList > xTmpDicList( GetDictionaryList() );
+ if (!xTmpDicList.is())
+ return NULL;
+
+ const OUString aDicName( RTL_CONSTASCII_USTRINGPARAM( "standard.dic" ) );
+ Reference< XDictionary1 > xDic( xTmpDicList->getDictionaryByName( aDicName ),
+ UNO_QUERY );
+ Reference< XStorable > xStor( xDic, UNO_QUERY );
+
+ if ( !(xDic.is() && xDic->getDictionaryType() != DictionaryType_NEGATIVE &&
+ xDic->getLanguage() == LANGUAGE_NONE)
+ || !(xStor.is() && xStor->hasLocation() && !xStor->isReadonly()) )
+ {
+ Reference< XDictionary > xTmp;
+
+ Reference< XDictionarySupplier > xSupplier( xTmpDicList, UNO_QUERY );
+ if (xSupplier.is())
+ {
+ // try to create standard dictionary
+ try
+ {
+ xTmp = xSupplier->createDictionary( aDicName,
+ SvxCreateLocale( LANGUAGE_NONE ),
+ DictionaryType_POSITIVE,
+ SvxGetDictionaryURL( aDicName, sal_True ) );
+ }
+ catch(...)
+ {
+ }
+ }
+
+ // add new dictionary to list
+ if (xTmp.is())
+ xTmpDicList->addDictionary( xTmp );
+ xDic = Reference< XDictionary1 > ( xTmp, UNO_QUERY );
+ }
+ DBG_ASSERT(xDic.is() && xDic->getDictionaryType() != DictionaryType_NEGATIVE,
+ "wrong dictionary type");
+
+ return xDic;
+}
+
+///////////////////////////////////////////////////////////////////////////
+
+Reference< XSpellChecker1 > SvxGetSpellChecker()
+{
+ return LinguMgr::GetSpellChecker();
+}
+
+Reference< XHyphenator > SvxGetHyphenator()
+{
+ return LinguMgr::GetHyphenator();
+}
+
+Reference< XThesaurus > SvxGetThesaurus()
+{
+ return LinguMgr::GetThesaurus();
+}
+
+Reference< XDictionaryList > SvxGetDictionaryList()
+{
+ return LinguMgr::GetDictionaryList();
+}
+
+Reference< XPropertySet > SvxGetLinguPropertySet()
+{
+ return LinguMgr::GetLinguPropertySet();
+}
+
+//TL:TODO: remove argument or provide SvxGetIgnoreAllList with the same one
+Reference< XDictionary1 > SvxGetOrCreatePosDic(
+ Reference< XDictionaryList > xDicList )
+{
+ return LinguMgr::GetStandardDic();
+}
+
+Reference< XDictionary1 > SvxGetIgnoreAllList()
+{
+ return LinguMgr::GetIgnoreAllList();
+}
+
+Reference< XDictionary1 > SvxGetChangeAllList()
+{
+ return LinguMgr::GetChangeAllList();
+}
+
+///////////////////////////////////////////////////////////////////////////
+
+#ifdef TL_NOTYET
+
+#ifndef _COM_SUN_STAR_LINGUISTIC2_XHYPHENATEDWORD_HPP_
+#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
+#endif
+
+SvxAlternativeSpelling SvxGetAltSpelling(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord > & rHyphWord )
+{
+ SvxAlternativeSpelling aRes;
+ if (rHyphWord.is() && rHyphWord->isAlternativeSpelling())
+ {
+ OUString aWord( rHyphWord->getWord() ),
+ aHyphenatedWord( rHyphWord->getHyphenatedWord() );
+ INT16 nHyphenationPos = rHyphWord->getHyphenationPos(),
+ nHyphenPos = rHyphWord->getHyphenPos();
+ const sal_Unicode *pWord = aWord.getStr(),
+ *pAltWord = aHyphenatedWord.getStr();
+
+ // at least char changes directly left or right to the hyphen
+ // should(!) be handled properly...
+ //! nHyphenationPos and nHyphenPos differ at most by 1 (see above)
+ //! Beware: eg "Schiffahrt" in German (pre spelling reform)
+ //! proves to be a bit nasty (nChgPosLeft and nChgPosRight overlap
+ //! to an extend.)
+
+ // find first different char from left
+ sal_Int32 nPosL = 0,
+ nAltPosL = 0;
+ for (INT16 i = 0 ; pWord[ nPosL ] == pAltWord[ nAltPosL ]; nPosL++, nAltPosL++, i++)
+ {
+ // restrict changes area beginning to the right to
+ // the char immediately following the hyphen.
+ //! serves to insert the additional "f" in "Schiffahrt" at
+ //! position 5 rather than position 6.
+ if (i >= nHyphenationPos + 1)
+ break;
+ }
+
+ // find first different char from right
+ sal_Int32 nPosR = aWord.getLength() - 1,
+ nAltPosR = aHyphenatedWord.getLength() - 1;
+ for ( ; nPosR >= nPosL && nAltPosR >= nAltPosL
+ && pWord[ nPosR ] == pAltWord[ nAltPosR ];
+ nPosR--, nAltPosR--)
+ ;
+
+ INT16 nChgLen = nPosR - nPosL + 1;
+ DBG_ASSERT( nChgLen >= 0, "nChgLen < 0");
+
+ sal_Int32 nTxtStart = nPosL;
+ sal_Int32 nTxtLen = nAltPosL - nPosL + 1;
+ OUString aRplc( aHyphenatedWord.copy( nTxtStart, nTxtLen ) );
+
+ aRes.aReplacement = aRplc;
+ aRes.nChangedPos = nPosL;
+ aRes.nChangedLength = nChgLen;
+ aRes.bIsAltSpelling = TRUE;
+ aRes.xHyphWord = rHyphWord;
+ }
+ return aRes;
+}
+#endif //TL_NOTYET
+
+///////////////////////////////////////////////////////////////////////////
+
+SvxDicListChgClamp::SvxDicListChgClamp( Reference< XDictionaryList > &rxDicList ) :
+ xDicList ( rxDicList )
+{
+ if (xDicList.is())
+ {
+ xDicList->beginCollectEvents();
+ }
+}
+
+SvxDicListChgClamp::~SvxDicListChgClamp()
+{
+ if (xDicList.is())
+ {
+ xDicList->endCollectEvents();
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////
+
+//! some code somewhere requires LANGUAGE_NONE to be the first entry!
+static const Language aLanguages[] =
+{
+ LANGUAGE_NONE,
+ LANGUAGE_GERMAN,
+ LANGUAGE_GERMAN_SWISS,
+ LANGUAGE_ENGLISH_US,
+ LANGUAGE_ENGLISH_UK,
+ LANGUAGE_FRENCH,
+ LANGUAGE_ITALIAN,
+ LANGUAGE_SPANISH,
+ LANGUAGE_PORTUGUESE,
+ LANGUAGE_DANISH,
+ LANGUAGE_DUTCH,
+ LANGUAGE_SWEDISH,
+ LANGUAGE_FINNISH,
+ LANGUAGE_NORWEGIAN_BOKMAL,
+ LANGUAGE_NORWEGIAN_NYNORSK,
+
+ // newly IPR supported languages
+ LANGUAGE_AFRIKAANS,
+ LANGUAGE_CATALAN,
+ LANGUAGE_CZECH,
+ LANGUAGE_GREEK,
+ LANGUAGE_HUNGARIAN,
+ LANGUAGE_POLISH,
+ LANGUAGE_PORTUGUESE_BRAZILIAN,
+ LANGUAGE_RUSSIAN
+};
+
+const Sequence< Language > & SvxGetSelectableLanguages()
+{
+ static const Sequence< Language >
+ aSeq( aLanguages, (sizeof(aLanguages) / sizeof(aLanguages[0])) );
+ return aSeq;
+}
+
+sal_Int32 SvxGetLanguagePos(const Sequence< Language > &rSeq, Language nLang)
+{
+ sal_Int32 nRes = -1;
+
+ sal_Int32 n = rSeq.getLength();
+ const Language *pLang = rSeq.getConstArray();
+ for (sal_Int32 i = 0; i < n; i++)
+ if (pLang[i] == nLang)
+ {
+ nRes = i;
+ break;
+ }
+
+ return nRes;
+}
+
+String SvxGetDictionaryURL(const String &rDicName, sal_Bool bIsUserDic)
+{
+ // get directory to use
+ SfxIniManager *pIniMgr = SfxIniManager::Get();
+ sal_uInt16 nSfxIniKey = bIsUserDic ?
+ SFX_KEY_USERDICTIONARY_DIR : SFX_KEY_DICTIONARY_PATH;
+ String aDirName ( pIniMgr->Get( nSfxIniKey ) );
+
+ INetURLObject aURLObj;
+ aURLObj.SetSmartProtocol( INET_PROT_FILE );
+ aURLObj.SetSmartURL( aDirName );
+ DBG_ASSERT(!aURLObj.HasError(), "lng : invalid URL");
+ aURLObj.Append( rDicName );
+ DBG_ASSERT(!aURLObj.HasError(), "lng : invalid URL");
+
+ return aURLObj.GetMainURL();
+}
+
+//TL:TODO: soll mal den rictigen Rückgabetyp bekommen!
+sal_Bool SvxAddEntryToDic(
+ Reference< XDictionary > &rxDic,
+ const OUString &rWord, sal_Bool bIsNeg,
+ const OUString &rRplcTxt, sal_Int16 nRplcLang,
+ sal_Bool bStripDot )
+{
+ if (!rxDic.is())
+ return DIC_ERR_NOT_EXISTS;
+
+ OUString aTmp( rWord );
+ if (bStripDot)
+ {
+ sal_Int32 nLen = rWord.getLength();
+ if (nLen > 0 && '.' == rWord[ nLen - 1])
+ {
+ // remove trailing '.'
+ // (this is the official way to do this :-( )
+ aTmp = aTmp.copy( 0, nLen - 1 );
+ }
+ }
+ sal_Bool bAddOk = rxDic->add( aTmp, bIsNeg, rRplcTxt,
+ SvxCreateLocale( nRplcLang ) );
+
+ sal_Int16 nRes = DIC_ERR_NONE;
+ if (!bAddOk)
+ {
+ if (rxDic->isFull())
+ nRes = DIC_ERR_FULL;
+ else
+ {
+ Reference< XStorable > xStor( rxDic, UNO_QUERY );
+ if (xStor.is() && xStor->isReadonly())
+ nRes = DIC_ERR_READONLY;
+ else
+ nRes = DIC_ERR_UNKNOWN;
+ }
+ }
+
+ return nRes;
+}
+
+short SvxDicError( Window *pParent, sal_Int16 nError )
+{
+ short nRes = 0;
+ if (DIC_ERR_NONE != nError)
+ {
+ int nRid;
+ switch (nError)
+ {
+ case DIC_ERR_FULL : nRid = RID_SVXSTR_DIC_ERR_FULL; break;
+ case DIC_ERR_READONLY : nRid = RID_SVXSTR_DIC_ERR_READONLY; break;
+ default:
+ nRid = RID_SVXSTR_DIC_ERR_UNKNOWN;
+ DBG_ASSERT(0, "unexpected case");
+ }
+ nRes = InfoBox( pParent, SVX_RESSTR( nRid ) ).Execute();
+ }
+ return nRes;
+}
+
+sal_Bool SvxSaveDictionaries( const Reference< XDictionaryList > &xDicList )
+{
+ if (!xDicList.is())
+ return sal_True;
+
+ sal_Bool bRet = sal_True;
+
+ Sequence< Reference< XDictionary > > aDics( xDicList->getDictionaries() );
+ const Reference< XDictionary > *pDic = aDics.getConstArray();
+ sal_Int16 nCount = aDics.getLength();
+ for (sal_Int16 i = 0; i < nCount; i++)
+ {
+ try
+ {
+ Reference< XStorable > xStor( pDic[i], UNO_QUERY );
+ if (xStor.is())
+ {
+ if (!xStor->isReadonly() && xStor->hasLocation())
+ xStor->store();
+ }
+ }
+ catch(...)
+ {
+ bRet = sal_False;
+ }
+ }
+
+ return bRet;
+}
+
+LanguageType SvxLocaleToLanguage( const Locale& rLocale )
+{
+ // empty language -> LANGUAGE_NONE
+ if ( rLocale.Language.getLength() == 0 )
+ return LANGUAGE_NONE;
+
+ String aLangStr = rLocale.Language;
+ String aCtryStr = rLocale.Country;
+ // Variant is ignored
+
+ LanguageType eRet = ConvertIsoNamesToLanguage( aLangStr, aCtryStr );
+ if ( eRet == LANGUAGE_SYSTEM )
+ eRet = LANGUAGE_NONE;
+
+ return eRet;
+}
+
+Locale& SvxLanguageToLocale( Locale& rLocale, LanguageType eLang )
+{
+ String aLangStr, aCtryStr;
+ if ( eLang == LANGUAGE_NONE )
+ eLang = LANGUAGE_SYSTEM;
+ ConvertLanguageToIsoNames( eLang, aLangStr, aCtryStr );
+ rLocale.Language = aLangStr;
+ rLocale.Country = aCtryStr;
+
+ return rLocale;
+}
+
+Locale SvxCreateLocale( LanguageType eLang )
+{
+ if ( eLang == LANGUAGE_NONE )
+ eLang = LANGUAGE_SYSTEM;
+ String aLangStr, aCtryStr;
+ ConvertLanguageToIsoNames( eLang, aLangStr, aCtryStr );
+
+ return Locale( aLangStr, aCtryStr, String() );
+}
+
+
diff --git a/svx/source/engine3d/camera3d.cxx b/svx/source/engine3d/camera3d.cxx
new file mode 100644
index 0000000000..2ee2752870
--- /dev/null
+++ b/svx/source/engine3d/camera3d.cxx
@@ -0,0 +1,464 @@
+/*************************************************************************
+ *
+ * $RCSfile: camera3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _CAMERA3D_HXX
+#include "camera3d.hxx"
+#endif
+
+#ifndef _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+
+#ifndef _SVDIO_HXX
+#include <svdio.hxx>
+#endif
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+Camera3D::Camera3D(const Vector3D& rPos, const Vector3D& rLookAt,
+ double fFocalLen, double fBankAng) :
+ aResetPos(rPos),
+ aResetLookAt(rLookAt),
+ fResetFocalLength(fFocalLen),
+ fResetBankAngle(fBankAng),
+ fBankAngle(fBankAng),
+ bAutoAdjustProjection(TRUE)
+{
+ SetVPD(0);
+ SetPosition(rPos);
+ SetLookAt(rLookAt);
+ SetFocalLength(fFocalLen);
+}
+
+/*************************************************************************
+|*
+|* Default-Konstruktor
+|*
+\************************************************************************/
+
+Camera3D::Camera3D()
+{
+ Vector3D aVector3D(0,0,1);
+ Camera3D(aVector3D, Vector3D());
+}
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+void Camera3D::Reset()
+{
+ SetVPD(0);
+ fBankAngle = fResetBankAngle;
+ SetPosition(aResetPos);
+ SetLookAt(aResetLookAt);
+ SetFocalLength(fResetFocalLength);
+}
+
+/*************************************************************************
+|*
+|* Defaultwerte fuer Reset setzen
+|*
+\************************************************************************/
+
+void Camera3D::SetDefaults(const Vector3D& rPos, const Vector3D& rLookAt,
+ double fFocalLen, double fBankAng)
+{
+ aResetPos = rPos;
+ aResetLookAt = rLookAt;
+ fResetFocalLength = fFocalLen;
+ fResetBankAngle = fBankAng;
+}
+
+/*************************************************************************
+|*
+|* ViewWindow setzen und PRP anpassen
+|*
+\************************************************************************/
+
+void Camera3D::SetViewWindow(double fX, double fY, double fW, double fH)
+{
+ Viewport3D::SetViewWindow(fX, fY, fW, fH);
+ if ( bAutoAdjustProjection )
+ SetFocalLength(fFocalLength);
+}
+
+/*************************************************************************
+|*
+|* Kameraposition setzen
+|*
+\************************************************************************/
+
+void Camera3D::SetPosition(const Vector3D& rNewPos)
+{
+ if ( rNewPos != aPosition )
+ {
+ aPosition = rNewPos;
+ SetVRP(aPosition);
+ SetVPN(aPosition - aLookAt);
+ SetBankAngle(fBankAngle);
+ }
+}
+
+/*************************************************************************
+|*
+|* Blickpunkt setzen
+|*
+\************************************************************************/
+
+void Camera3D::SetLookAt(const Vector3D& rNewLookAt)
+{
+ if ( rNewLookAt != aLookAt )
+ {
+ aLookAt = rNewLookAt;
+ SetVPN(aPosition - aLookAt);
+ SetBankAngle(fBankAngle);
+ }
+}
+
+/*************************************************************************
+|*
+|* Position und Blickpunkt setzen
+|*
+\************************************************************************/
+
+void Camera3D::SetPosAndLookAt(const Vector3D& rNewPos,
+ const Vector3D& rNewLookAt)
+{
+ if ( rNewPos != aPosition || rNewLookAt != aLookAt )
+ {
+ aPosition = rNewPos;
+ aLookAt = rNewLookAt;
+
+ SetVRP(aPosition);
+ SetVPN(aPosition - aLookAt);
+ SetBankAngle(fBankAngle);
+ }
+}
+
+/*************************************************************************
+|*
+|* seitlichen Neigungswinkel setzen
+|*
+\************************************************************************/
+
+void Camera3D::SetBankAngle(double fAngle)
+{
+ Vector3D aDiff = aPosition - aLookAt;
+ Vector3D aPrj = aDiff;
+
+ fBankAngle = fAngle;
+
+ if ( aDiff.Y() == 0 )
+ aPrj.Y() = -1;
+ else
+ { // aPrj = Projektion von aDiff auf die XZ-Ebene
+ aPrj.Y() = 0;
+ if ( aDiff.Y() < 0 )
+ aPrj = -aPrj;
+ }
+ // von aDiff nach oben zeigenden View-Up-Vektor berechnen
+ aPrj |= aDiff;
+ aPrj |= aDiff;
+ aDiff.Normalize();
+
+ // auf Z-Achse rotieren, dort um BankAngle drehen und zurueck
+ Matrix4D aTf;
+ double fV = sqrt(aDiff.Y() * aDiff.Y() + aDiff.Z() * aDiff.Z());
+
+ if ( fV != 0 )
+ aTf.RotateX(aDiff.Y() / fV, aDiff.Z() / fV);
+ aTf.RotateY(-aDiff.X(), fV);
+ aTf.RotateZ(fBankAngle);
+ aTf.RotateY(aDiff.X(), fV);
+ if ( fV != 0 )
+ aTf.RotateX(-aDiff.Y() / fV, aDiff.Z() / fV);
+
+ SetVUV(aTf * aPrj);
+}
+
+/*************************************************************************
+|*
+|* Brennweite setzen
+|*
+\************************************************************************/
+
+void Camera3D::SetFocalLength(double fLen)
+{
+ if ( fLen < 5 )
+ fLen = 5;
+ SetPRP(Vector3D(0, 0, fLen / 35.0 * aViewWin.W));
+ fFocalLength = fLen;
+}
+
+/*************************************************************************
+|*
+|* Um die Kameraposition drehen, LookAt wird dabei veraendert
+|*
+\************************************************************************/
+
+void Camera3D::Rotate(double fHAngle, double fVAngle)
+{
+ Matrix4D aTf;
+ Vector3D aDiff = aLookAt - aPosition;
+ double fV = sqrt(aDiff.X() * aDiff.X() + aDiff.Z() * aDiff.Z());
+
+ if ( fV != 0 ) aTf.RotateY(aDiff.Z() / fV, aDiff.X() / fV);
+ aTf.RotateZ(fVAngle);
+ if ( fV != 0 ) aTf.RotateY(-aDiff.Z() / fV, aDiff.X() / fV);
+ aTf.RotateY(fHAngle);
+
+ aDiff *= aTf;
+ SetLookAt(aPosition + aDiff);
+}
+
+
+/*************************************************************************
+|*
+|* Um den Blickpunkt drehen, Position wird dabei veraendert
+|*
+\************************************************************************/
+
+void Camera3D::RotateAroundLookAt(double fHAngle, double fVAngle)
+{
+ Matrix4D aTf;
+ Vector3D aDiff = aPosition - aLookAt;
+ double fV = sqrt(aDiff.X() * aDiff.X() + aDiff.Z() * aDiff.Z());
+
+ if ( fV != 0 ) aTf.RotateY(aDiff.Z() / fV, aDiff.X() / fV);
+ aTf.RotateZ(fVAngle);
+ if ( fV != 0 ) aTf.RotateY(-aDiff.Z() / fV, aDiff.X() / fV);
+ aTf.RotateY(fHAngle);
+
+ aDiff *= aTf;
+ SetPosition(aLookAt + aDiff);
+}
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Camera3D fuer die Filerevision 3.1
+|*
+\************************************************************************/
+
+void Camera3D::WriteData31(SvStream& rOut) const
+{
+ Viewport3D::WriteData(rOut);
+
+ rOut << aResetPos;
+ rOut << aResetLookAt;
+ rOut << fResetFocalLength;
+ rOut << fResetBankAngle;
+ rOut << aPosition;
+ rOut << aLookAt;
+ rOut << fFocalLength;
+ rOut << fBankAngle;
+ rOut << BOOL(bAutoAdjustProjection);
+}
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Camera3D
+|* Zur Version 356 wurde das Fileformat inkompatibel, wenn man das alte
+|* Format schreiben will, muss man die Version am Stream abfragen.
+|*
+\************************************************************************/
+
+void Camera3D::WriteData(SvStream& rOut) const
+{
+
+ if (rOut.GetVersion() < 3560) // FG: Ab der Release 356 wurde das Fileformat geaendert
+ { // Falls das Format der Version 31 geschrieben werden soll
+ WriteData31(rOut); // muss am Stream die Version der 3.1 gesetzt sein.
+ return; // Im Prinzip kann man auf diese Art auch Zwischenversionen
+ } // erzeugen.
+
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+#ifdef DBG_UTIL
+ aCompat.SetID("Camera3D");
+#endif
+ Viewport3D::WriteData(rOut);
+
+ rOut << aResetPos; // Alles Vektoren 3*double
+ rOut << aResetLookAt;
+ rOut << fResetFocalLength;
+ rOut << fResetBankAngle;
+ rOut << aPosition;
+ rOut << aLookAt;
+ rOut << fFocalLength;
+ rOut << fBankAngle;
+ rOut << BOOL(bAutoAdjustProjection);
+}
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Camera3D
+|*
+\************************************************************************/
+
+void Camera3D::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if ( rIn.GetError() != SVSTREAM_OK )
+ return;
+
+ if ((rHead.GetVersion() < 13) || (rIn.GetVersion() < 3560))
+ {
+ ReadData31(rIn);
+ return;
+ }
+
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+#ifdef DBG_UTIL
+ aCompat.SetID("Camera3D");
+#endif
+
+ Viewport3D::ReadData(rHead, rIn);
+
+ BOOL bTmp;
+
+ rIn >> aResetPos;
+ rIn >> aResetLookAt;
+ rIn >> fResetFocalLength;
+ rIn >> fResetBankAngle;
+ rIn >> aPosition;
+ rIn >> aLookAt;
+ rIn >> fFocalLength;
+ rIn >> fBankAngle;
+ rIn >> bTmp; bAutoAdjustProjection = bTmp;
+
+ SetVPD(0);
+ SetPosAndLookAt(aPosition, aLookAt);
+}
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Camera3D
+|*
+\************************************************************************/
+
+void Camera3D::ReadData31(SvStream& rIn)
+{
+ if ( rIn.GetError() != SVSTREAM_OK )
+ return;
+
+ Viewport3D::ReadData31 (rIn);
+
+ BOOL bTmp;
+
+ rIn >> aResetPos;
+ rIn >> aResetLookAt;
+ rIn >> fResetFocalLength;
+ rIn >> fResetBankAngle;
+ rIn >> aPosition;
+ rIn >> aLookAt;
+ rIn >> fFocalLength;
+ rIn >> fBankAngle;
+ rIn >> bTmp; bAutoAdjustProjection = bTmp;
+
+ SetVPD(0);
+ SetPosAndLookAt(aPosition, aLookAt);
+}
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Camera3D
+|*
+\************************************************************************/
+
+SvStream& operator<<(SvStream& rOStream, const Camera3D& rCam)
+{
+ rCam.WriteData31(rOStream);
+ return rOStream;
+}
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Camera3D
+|*
+\************************************************************************/
+
+SvStream& operator>>(SvStream& rIStream, Camera3D& rCam)
+{
+ rCam.ReadData31(rIStream);
+ return rIStream;
+}
+
+
+/*************************************************************************
+|*
+|* FG: ??? Setzt wohl die Projektionsebene in eine bestimmte Tiefe
+|*
+\************************************************************************/
+
+void Camera3D::SetFocalLengthWithCorrect(double fLen)
+{
+ if ( fLen < 5 )
+ fLen = 5;
+ SetPRP(Vector3D(0, 0, aPRP.Z () * fLen / fFocalLength));
+ fFocalLength = fLen;
+}
+
+
diff --git a/svx/source/engine3d/cube3d.cxx b/svx/source/engine3d/cube3d.cxx
new file mode 100644
index 0000000000..0b0c36c966
--- /dev/null
+++ b/svx/source/engine3d/cube3d.cxx
@@ -0,0 +1,471 @@
+/*************************************************************************
+ *
+ * $RCSfile: cube3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:14 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "svdstr.hrc"
+#include "svdglob.hxx"
+
+#ifndef _E3D_CUBE3D_HXX
+#include "cube3d.hxx"
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+#ifndef _POLY3D_HXX
+#include "poly3d.hxx"
+#endif
+
+#ifndef _SVX_VECTOR3D_HXX
+#include <goodies/vector3d.hxx>
+#endif
+
+#ifndef _E3D_E3DIOCMPT_HXX
+#include "e3dcmpt.hxx"
+#endif
+
+TYPEINIT1(E3dCubeObj, E3dCompoundObject);
+
+/*************************************************************************
+|*
+|* Konstruktor: |
+|* 3D-Quader erzeugen; aPos: Zentrum oder links, unten, hinten |__
+|* (abhaengig von bPosIsCenter) /
+|*
+\************************************************************************/
+
+E3dCubeObj::E3dCubeObj(E3dDefaultAttributes& rDefault, Vector3D aPos, const Vector3D& r3DSize)
+: E3dCompoundObject(rDefault)
+{
+ // Defaults setzen
+ SetDefaultAttributes(rDefault);
+
+ // uebergebene drueberbuegeln
+ aCubePos = aPos;
+ aCubeSize = r3DSize;
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+E3dCubeObj::E3dCubeObj()
+: E3dCompoundObject()
+{
+ // Defaults setzen
+ E3dDefaultAttributes aDefault;
+ SetDefaultAttributes(aDefault);
+}
+
+void E3dCubeObj::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+{
+ aCubePos = rDefault.GetDefaultCubePos();
+ aCubeSize = rDefault.GetDefaultCubeSize();
+ nSideFlags = rDefault.GetDefaultCubeSideFlags();
+ bPosIsCenter = rDefault.GetDefaultCubePosIsCenter();
+}
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+UINT16 E3dCubeObj::GetObjIdentifier() const
+{
+ return E3D_CUBEOBJ_ID;
+}
+
+/*************************************************************************
+|*
+|* Wandle das Objekt in ein Gruppenobjekt bestehend aus 6 Polygonen
+|*
+\************************************************************************/
+
+SdrObject *E3dCubeObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ return NULL;
+}
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+void E3dCubeObj::CreateGeometry()
+{
+ Vector3D aPos(aCubePos);
+ Polygon3D aRect3D(4);
+ Polygon3D aNormals3D(4);
+ Polygon3D aTexture3D(4);
+ short nV1, nV2;
+ UINT16 nSideBit = 0x0001;
+
+ // Start der Geometrieerzeugung ankuendigen
+ StartCreateGeometry();
+
+ if ( bPosIsCenter )
+ aCubePos -= aCubeSize / 2;
+
+ for (nV1 = 0; nV1 < 3; nV1++)
+ {
+ if ( nV1 == 0 ) nV2 = 2;
+ else nV2 = nV1 - 1;
+
+ // Nur die Flaechen erzeugen, fuer die ein Bit
+ if ( nSideFlags & nSideBit )
+ { // Flaechenpunkte entgegen dem Uhrzeigersinn generieren
+ aRect3D[0] = aPos; aPos[nV1] += aCubeSize[nV1];
+ aRect3D[1] = aPos; aPos[nV2] += aCubeSize[nV2];
+ aRect3D[2] = aPos; aPos[nV1] -= aCubeSize[nV1];
+ aRect3D[3] = aPos; aPos[nV2] -= aCubeSize[nV2];
+
+ if(GetCreateNormals())
+ {
+ aNormals3D = aRect3D;
+ aNormals3D[0].Normalize();
+ aNormals3D[1].Normalize();
+ aNormals3D[2].Normalize();
+ aNormals3D[3].Normalize();
+
+ if(GetCreateTexture())
+ {
+ aTexture3D[1].X() = 0.0;
+ aTexture3D[1].Y() = 0.0;
+
+ aTexture3D[0].X() = 1.0;
+ aTexture3D[0].Y() = 0.0;
+
+ aTexture3D[2].X() = 0.0;
+ aTexture3D[2].Y() = 1.0;
+
+ aTexture3D[3].X() = 1.0;
+ aTexture3D[3].Y() = 1.0;
+
+ AddGeometry(aRect3D, aNormals3D, aTexture3D, FALSE);
+ }
+ else
+ AddGeometry(aRect3D, aNormals3D, FALSE);
+ }
+ else
+ {
+ AddGeometry(aRect3D, FALSE);
+ }
+ }
+ nSideBit <<= 1;
+ }
+ aPos += aCubeSize;
+
+ for (nV1 = 2; nV1 >= 0; nV1--)
+ {
+ if ( nV1 == 2 ) nV2 = 0;
+ else nV2 = nV1 + 1;
+
+ if ( nSideFlags & nSideBit )
+ { // Flaechenpunkte entgegen dem Uhrzeigersinn generieren
+ aRect3D[0] = aPos; aPos[nV1] -= aCubeSize[nV1];
+ aRect3D[1] = aPos; aPos[nV2] -= aCubeSize[nV2];
+ aRect3D[2] = aPos; aPos[nV1] += aCubeSize[nV1];
+ aRect3D[3] = aPos; aPos[nV2] += aCubeSize[nV2];
+
+ if(GetCreateTexture())
+ {
+ aTexture3D[1].X() = 0.0;
+ aTexture3D[1].Y() = 0.0;
+
+ aTexture3D[0].X() = 1.0;
+ aTexture3D[0].Y() = 0.0;
+
+ aTexture3D[2].X() = 0.0;
+ aTexture3D[2].Y() = 1.0;
+
+ aTexture3D[3].X() = 1.0;
+ aTexture3D[3].Y() = 1.0;
+ }
+
+ if(GetCreateNormals())
+ {
+ aNormals3D = aRect3D;
+ aNormals3D[0].Normalize();
+ aNormals3D[1].Normalize();
+ aNormals3D[2].Normalize();
+ aNormals3D[3].Normalize();
+
+ if(GetCreateTexture())
+ AddGeometry(aRect3D, aNormals3D, aTexture3D, FALSE);
+ else
+ AddGeometry(aRect3D, aNormals3D, FALSE);
+ }
+ else
+ {
+ AddGeometry(aRect3D, FALSE);
+ }
+ }
+ nSideBit <<= 1;
+ }
+
+ // call parent
+ E3dCompoundObject::CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+void E3dCubeObj::WriteData(SvStream& rOut) const
+{
+ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+ if(nVersion < 3800)
+ {
+ // Alte Geometrie erzeugen, um die E3dPolyObj's zu haben
+ ((E3dCompoundObject*)this)->ReCreateGeometry(TRUE);
+ }
+
+ // call parent, schreibt die SubList (alte Geometrie) raus
+ E3dCompoundObject::WriteData(rOut);
+
+ E3dIOCompat aCompat(rOut, STREAM_WRITE, 1);
+ rOut << aCubePos;
+ rOut << aCubeSize;
+ rOut << BOOL(bPosIsCenter);
+ rOut << nSideFlags;
+
+ if(nVersion < 3800)
+ {
+ // Geometrie neu erzeugen, um E3dPolyObj's wieder loszuwerden
+ ((E3dCompoundObject*)this)->ReCreateGeometry();
+ }
+}
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+void E3dCubeObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ // call parent
+ E3dCompoundObject::ReadData(rHead, rIn);
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ BOOL bAllDone(FALSE);
+ if(AreBytesLeft())
+ {
+ E3dIOCompat aIoCompat(rIn, STREAM_READ);
+ if(aIoCompat.GetVersion() >= 1)
+ {
+ BOOL bTmp;
+ rIn >> aCubePos;
+ rIn >> aCubeSize;
+ rIn >> bTmp; bPosIsCenter = bTmp;
+ rIn >> nSideFlags;
+ bAllDone = TRUE;
+ }
+ }
+
+ if(!bAllDone)
+ {
+ // Geometrie aus erzeugten PolyObj's rekonstruieren
+ const Volume3D& rVolume = GetLocalBoundVolume();
+ aCubeSize = rVolume.MaxVec() - rVolume.MinVec();
+ aCubePos = rVolume.MinVec();
+ bPosIsCenter = FALSE;
+ nSideFlags = CUBE_FULL;
+ }
+
+ // Geometrie neu erzeugen, mit oder ohne E3dPolyObj's
+ ReCreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+void E3dCubeObj::operator=(const SdrObject& rObj)
+{
+ // erstmal alle Childs kopieren
+ E3dCompoundObject::operator=(rObj);
+
+ // weitere Parameter kopieren
+ const E3dCubeObj& r3DObj = (const E3dCubeObj&)rObj;
+
+ aCubePos = r3DObj.aCubePos;
+ aCubeSize = r3DObj.aCubeSize;
+ bPosIsCenter = r3DObj.bPosIsCenter;
+ nSideFlags = r3DObj.nSideFlags;
+}
+
+/*************************************************************************
+|*
+|* uebergebene Transformationsmatrix anwenden
+|*
+\************************************************************************/
+
+void E3dCubeObj::ApplyTransform(const Matrix4D& rMatrix)
+{
+ // call parent
+ E3dCompoundObject::ApplyTransform(rMatrix);
+
+ // Anwenden auf lokale geometrie
+ Vector3D aOuterEdge = aCubePos + aCubeSize;
+ aCubePos *= rMatrix;
+ aOuterEdge *= rMatrix;
+ aCubeSize = aOuterEdge - aCubePos;
+}
+
+/*************************************************************************
+|*
+|* Lokale Parameter setzen mit Geometrieneuerzeugung
+|*
+\************************************************************************/
+
+void E3dCubeObj::SetCubePos(const Vector3D& rNew)
+{
+ if(aCubePos != rNew)
+ {
+ aCubePos = rNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCubeObj::SetCubeSize(const Vector3D& rNew)
+{
+ if(aCubeSize != rNew)
+ {
+ aCubeSize = rNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCubeObj::SetPosIsCenter(BOOL bNew)
+{
+ if(bPosIsCenter != bNew)
+ {
+ bPosIsCenter = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCubeObj::SetSideFlags(UINT16 nNew)
+{
+ if(nSideFlags != nNew)
+ {
+ nSideFlags = nNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+void E3dCubeObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ // call parent
+ E3dCompoundObject::NbcSetAttributes(rAttr, bReplaceAll);
+
+ // special Attr for E3dCubeObj
+}
+
+/*************************************************************************
+|*
+|* Attribute lesen
+|*
+\************************************************************************/
+
+void E3dCubeObj::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+ // call parent
+ E3dCompoundObject::TakeAttributes(rAttr, bMerge, bOnlyHardAttr);
+
+ // special Attr for E3dCubeObj
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+void E3dCubeObj::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulCube3d);
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+void E3dCubeObj::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralCube3d);
+}
+
+
diff --git a/svx/source/engine3d/deflt3d.cxx b/svx/source/engine3d/deflt3d.cxx
new file mode 100644
index 0000000000..cb6dffc14e
--- /dev/null
+++ b/svx/source/engine3d/deflt3d.cxx
@@ -0,0 +1,745 @@
+/*************************************************************************
+ *
+ * $RCSfile: deflt3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ITEMID_COLOR SID_ATTR_3D_LIGHTCOLOR
+
+#ifndef _E3D_DEFLT3D_HXX
+#include "deflt3d.hxx"
+#endif
+
+#ifndef _E3D_CUBE3D_HXX
+#include "cube3d.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SVX_COLRITEM_HXX
+#include "colritem.hxx"
+#endif
+
+#ifndef _SVXE3DITEM_HXX
+#include "e3ditem.hxx"
+#endif
+
+/*************************************************************************
+|*
+|* Klasse zum verwalten der 3D-Default Attribute
+|*
+\************************************************************************/
+
+// Konstruktor
+E3dDefaultAttributes::E3dDefaultAttributes()
+{
+ Reset();
+}
+
+void E3dDefaultAttributes::Reset()
+{
+ // Compound-Objekt
+// aDefaultFrontMaterial;
+// aDefaultBackMaterial;
+ eDefaultTextureKind = Base3DTextureColor;
+ eDefaultTextureMode = Base3DTextureModulate;
+ bDefaultDoubleSided = FALSE;
+ bDefaultCreateNormals = TRUE;
+ bDefaultCreateTexture = TRUE;
+ bDefaultUseStdNormals = FALSE;
+ bDefaultUseStdNormalsUseSphere = FALSE;
+ bDefaultInvertNormals = FALSE;
+ bDefaultUseStdTextureX = FALSE;
+ bDefaultUseStdTextureXUseSphere = FALSE;
+ bDefaultUseStdTextureY = FALSE;
+ bDefaultUseStdTextureYUseSphere = FALSE;
+ bDefaultShadow3D = FALSE;
+ bDefaultFilterTexture = FALSE;
+ bDefaultUseDifferentBackMaterial = FALSE;
+
+ // Cube-Objekt
+ aDefaultCubePos = Vector3D(-500.0, -500.0, -500.0);
+ aDefaultCubeSize = Vector3D(1000.0, 1000.0, 1000.0);
+ nDefaultCubeSideFlags = CUBE_FULL;
+ bDefaultCubePosIsCenter = FALSE;
+
+ // Sphere-Objekt
+ nDefaultHSegments = 24;
+ nDefaultVSegments = 24;
+ aDefaultSphereCenter = Vector3D(0.0, 0.0, 0.0);
+ aDefaultSphereSize = Vector3D(1000.0, 1000.0, 1000.0);
+
+ // Lathe-Objekt
+ nDefaultLatheEndAngle = 3600;
+ fDefaultLatheScale = 1.0;
+ fDefaultBackScale = 1.0;
+ fDefaultPercentDiag = 0.05;
+ bDefaultLatheSmoothed = TRUE;
+ bDefaultLatheSmoothFrontBack = FALSE;
+ bDefaultLatheCharacterMode = FALSE;
+ bDefaultLatheCloseFront = TRUE;
+ bDefaultLatheCloseBack = TRUE;
+
+ // Extrude-Objekt
+ fDefaultExtrudeScale = 1.0;
+ fDefaultExtrudeDepth = 1000.0;
+ bDefaultExtrudeSmoothed = TRUE;
+ bDefaultExtrudeSmoothFrontBack = FALSE;
+ bDefaultExtrudeCharacterMode = FALSE;
+ bDefaultExtrudeCloseFront = TRUE;
+ bDefaultExtrudeCloseBack = TRUE;
+
+ // Scene-Objekt
+// aDefaultLightGroup;
+ aDefaultShadowPlaneDirection = Vector3D(0.0, 0.0, 1.0);
+ eDefaultShadeModel = Base3DSmooth;
+ bDefaultDither = TRUE;
+ bDefaultForceDraftShadeModel = FALSE;
+}
+
+/*************************************************************************
+|*
+|* Default-Attribute setzen/lesen
+|*
+\************************************************************************/
+
+void E3dDefaultAttributes::SetDefaultValues(const SfxItemSet& rAttr)
+{
+ const SfxPoolItem* pPoolItem = NULL;
+ B3dMaterial aNewMat = GetDefaultFrontMaterial();
+ BOOL bNewMatUsed = FALSE;
+
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_DOUBLE_SIDED, TRUE, &pPoolItem ) )
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ SetDefaultDoubleSided(bNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_NORMALS_KIND, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ if(nNew == 0)
+ {
+ SetDefaultUseStdNormals(FALSE);
+ SetDefaultUseStdNormalsUseSphere(FALSE);
+ }
+ else if(nNew == 1)
+ {
+ SetDefaultUseStdNormals(TRUE);
+ SetDefaultUseStdNormalsUseSphere(FALSE);
+ }
+ else
+ {
+ SetDefaultUseStdNormals(TRUE);
+ SetDefaultUseStdNormalsUseSphere(TRUE);
+ }
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_NORMALS_INVERT, TRUE, &pPoolItem ) )
+ {
+ BOOL bNew = ( ( const SfxBoolItem* ) pPoolItem )->GetValue();
+ SetDefaultInvertNormals(bNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_TEXTURE_PROJ_X, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ if(nNew == 0)
+ {
+ SetDefaultUseStdTextureX(FALSE);
+ SetDefaultUseStdTextureXUseSphere(FALSE);
+ }
+ else if(nNew == 1)
+ {
+ SetDefaultUseStdTextureX(TRUE);
+ SetDefaultUseStdTextureXUseSphere(FALSE);
+ }
+ else
+ {
+ SetDefaultUseStdTextureX(TRUE);
+ SetDefaultUseStdTextureXUseSphere(TRUE);
+ }
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_TEXTURE_PROJ_Y, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ if(nNew == 0)
+ {
+ SetDefaultUseStdTextureY(FALSE);
+ SetDefaultUseStdTextureYUseSphere(FALSE);
+ }
+ else if(nNew == 1)
+ {
+ SetDefaultUseStdTextureY(TRUE);
+ SetDefaultUseStdTextureYUseSphere(FALSE);
+ }
+ else
+ {
+ SetDefaultUseStdTextureY(TRUE);
+ SetDefaultUseStdTextureYUseSphere(TRUE);
+ }
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_SHADOW_3D, TRUE, &pPoolItem ) )
+ {
+ BOOL bNew = ( ( const SfxBoolItem* ) pPoolItem )->GetValue();
+ SetDefaultShadow3D(bNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_MAT_COLOR, TRUE, &pPoolItem ) )
+ {
+ Color aNew = ( ( const SvxColorItem* ) pPoolItem )->GetValue();
+ aNewMat.SetMaterial(aNew, Base3DMaterialDiffuse);
+ bNewMatUsed = TRUE;
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_MAT_EMISSION, TRUE, &pPoolItem ) )
+ {
+ Color aNew = ( ( const SvxColorItem* ) pPoolItem )->GetValue();
+ aNewMat.SetMaterial(aNew, Base3DMaterialEmission);
+ bNewMatUsed = TRUE;
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_MAT_SPECULAR, TRUE, &pPoolItem ) )
+ {
+ Color aNew = ( ( const SvxColorItem* ) pPoolItem )->GetValue();
+ aNewMat.SetMaterial(aNew, Base3DMaterialSpecular);
+ bNewMatUsed = TRUE;
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_MAT_SPECULAR_INTENSITY, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ aNewMat.SetShininess(nNew);
+ bNewMatUsed = TRUE;
+ }
+ if(bNewMatUsed)
+ SetDefaultFrontMaterial(aNewMat);
+
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_TEXTURE_KIND, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ if(nNew == 0)
+ {
+ SetDefaultTextureKind(Base3DTextureLuminance);
+ }
+ else
+ {
+ SetDefaultTextureKind(Base3DTextureColor);
+ }
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_TEXTURE_MODE, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ if(nNew == 0)
+ {
+ SetDefaultTextureMode(Base3DTextureReplace);
+ }
+ else if(nNew == 1)
+ {
+ SetDefaultTextureMode(Base3DTextureModulate);
+ }
+ else
+ {
+ SetDefaultTextureMode(Base3DTextureBlend);
+ }
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_TEXTURE_FILTER, TRUE, &pPoolItem ) )
+ {
+ BOOL bNew = ( ( const SfxBoolItem* ) pPoolItem )->GetValue();
+ SetDefaultFilterTexture(bNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_HORZ_SEGS, TRUE, &pPoolItem ) )
+ {
+ UINT32 nNew = ( ( const SfxUInt32Item* ) pPoolItem )->GetValue();
+ SetDefaultHSegments(nNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_VERT_SEGS, TRUE, &pPoolItem ) )
+ {
+ UINT32 nNew = ( ( const SfxUInt32Item* ) pPoolItem )->GetValue();
+ SetDefaultVSegments(nNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_PERCENT_DIAGONAL, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ SetDefaultPercentDiag(((double)(nNew)) / 200.0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_BACKSCALE, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ SetDefaultBackScale(((double)(nNew)) / 100.0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_END_ANGLE, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ SetDefaultLatheEndAngle((long)nNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_DEPTH, TRUE, &pPoolItem ) )
+ {
+ UINT32 nNew = ((const SfxUInt32Item*)pPoolItem)->GetValue();
+ SetDefaultExtrudeDepth((double)nNew);
+ }
+
+ // Szene
+ B3dLightGroup aLightGroup = GetDefaultLightGroup();
+
+ // TwoSidedLighting
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_TWO_SIDED_LIGHTING, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ aLightGroup.SetModelTwoSide( bNew );
+ }
+
+ // LightColors
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_1, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ aLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_2, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ aLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight1);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_3, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ aLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight2);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_4, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ aLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight3);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_5, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ aLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight4);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_6, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ aLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight5);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_7, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ aLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight6);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_8, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ aLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight7);
+ }
+
+ // AmbientColor
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_AMBIENTCOLOR, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ aLightGroup.SetGlobalAmbientLight( aNew );
+ }
+
+ // LightOn
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_1, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ aLightGroup.Enable( bNew, Base3DLight0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_2, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ aLightGroup.Enable( bNew, Base3DLight1);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_3, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ aLightGroup.Enable( bNew, Base3DLight2);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_4, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ aLightGroup.Enable( bNew, Base3DLight3);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_5, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ aLightGroup.Enable( bNew, Base3DLight4);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_6, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ aLightGroup.Enable( bNew, Base3DLight5);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_7, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ aLightGroup.Enable( bNew, Base3DLight6);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_8, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ aLightGroup.Enable( bNew, Base3DLight7);
+ }
+
+ // LightDirection
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_1, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ aLightGroup.SetDirection( aNew, Base3DLight0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_2, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ aLightGroup.SetDirection( aNew, Base3DLight1);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_3, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ aLightGroup.SetDirection( aNew, Base3DLight2);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_4, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ aLightGroup.SetDirection( aNew, Base3DLight3);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_5, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ aLightGroup.SetDirection( aNew, Base3DLight4);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_6, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ aLightGroup.SetDirection( aNew, Base3DLight5);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_7, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ aLightGroup.SetDirection( aNew, Base3DLight6);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_8, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ aLightGroup.SetDirection( aNew, Base3DLight7);
+ }
+
+ // ShadowSlant
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_SHADOW_SLANT, FALSE, &pPoolItem))
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ double fWink = (double)nNew * F_PI180;
+ Vector3D aVec(0.0, sin(fWink), cos(fWink));
+ aVec.Normalize();
+ SetDefaultShadowPlaneDirection(aVec);
+ }
+
+ // ShadeMode
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_SHADE_MODE, FALSE, &pPoolItem))
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ if(nNew == 3)
+ {
+ SetDefaultForceDraftShadeModel(TRUE);
+ SetDefaultShadeModel(Base3DSmooth);
+ }
+ else
+ {
+ SetDefaultForceDraftShadeModel(FALSE);
+ if(nNew == 0)
+ {
+ SetDefaultShadeModel(Base3DFlat);
+ }
+ else if(nNew == 1)
+ {
+ SetDefaultShadeModel(Base3DPhong);
+ }
+ else
+ {
+ // Gouraud
+ SetDefaultShadeModel(Base3DSmooth);
+ }
+ }
+ }
+
+ // Nachbehandlung
+ SetDefaultLightGroup(aLightGroup);
+}
+
+void E3dDefaultAttributes::TakeDefaultValues(SfxItemSet& rAttr)
+{
+ // DoubleSided
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_DOUBLE_SIDED, GetDefaultDoubleSided()));
+
+ // NormalsKind
+ UINT16 nObjNormalsKind;
+ if(!GetDefaultUseStdNormals())
+ {
+ nObjNormalsKind = 0;
+ }
+ else
+ {
+ if(GetDefaultUseStdNormalsUseSphere())
+ {
+ nObjNormalsKind = 2;
+ }
+ else
+ {
+ nObjNormalsKind = 1;
+ }
+ }
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_NORMALS_KIND, nObjNormalsKind));
+
+ // NormalsInvert
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_NORMALS_INVERT, GetDefaultInvertNormals()));
+
+ // TextureProjectionX
+ UINT16 nObjTextureProjX;
+ if(!GetDefaultUseStdTextureX())
+ {
+ nObjTextureProjX = 0;
+ }
+ else
+ {
+ if(GetDefaultUseStdTextureXUseSphere())
+ {
+ nObjTextureProjX = 2;
+ }
+ else
+ {
+ nObjTextureProjX = 1;
+ }
+ }
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_TEXTURE_PROJ_X, nObjTextureProjX));
+
+ // TextureProjectionY
+ UINT16 nObjTextureProjY;
+ if(!GetDefaultUseStdTextureY())
+ {
+ nObjTextureProjY = 0;
+ }
+ else
+ {
+ if(GetDefaultUseStdTextureYUseSphere())
+ {
+ nObjTextureProjY = 2;
+ }
+ else
+ {
+ nObjTextureProjY = 1;
+ }
+ }
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_TEXTURE_PROJ_Y, nObjTextureProjY));
+
+ // Shadow3D UND Shadow2D
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_SHADOW_3D, GetDefaultShadow3D()));
+ rAttr.Put(SdrShadowItem( GetDefaultShadow3D() ));
+
+ // Material
+ const B3dMaterial& rMat = GetDefaultFrontMaterial();
+ Color aObjMaterialColor = rMat.GetMaterial(Base3DMaterialDiffuse);
+ Color aObjMaterialEmission = rMat.GetMaterial(Base3DMaterialEmission);
+ Color aObjMaterialSpecular = rMat.GetMaterial(Base3DMaterialSpecular);
+ UINT16 nObjMaterialIntensity = rMat.GetShininess();
+ rAttr.Put(SvxColorItem(aObjMaterialColor, SID_ATTR_3D_MAT_COLOR));
+ rAttr.Put(SvxColorItem(aObjMaterialEmission, SID_ATTR_3D_MAT_EMISSION));
+ rAttr.Put(SvxColorItem(aObjMaterialSpecular, SID_ATTR_3D_MAT_SPECULAR));
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_MAT_SPECULAR_INTENSITY, nObjMaterialIntensity));
+
+ // TextureKind
+ UINT16 nObjTextureKind;
+ if(GetDefaultTextureKind() == Base3DTextureColor)
+ {
+ nObjTextureKind = 1;
+ }
+ else
+ {
+ nObjTextureKind = 0;
+ }
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_TEXTURE_KIND, nObjTextureKind));
+
+ // TextureMode
+ UINT16 nObjTextureMode;
+ if(GetDefaultTextureMode() == Base3DTextureReplace)
+ {
+ nObjTextureMode = 0;
+ }
+ else if(GetDefaultTextureMode() == Base3DTextureModulate)
+ {
+ nObjTextureMode = 1;
+ }
+ else
+ {
+ nObjTextureMode = 2;
+ }
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_TEXTURE_MODE, nObjTextureMode));
+
+ // TextureFilter
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_TEXTURE_FILTER, GetDefaultFilterTexture()));
+
+ // HorizSegs
+ rAttr.Put(SfxUInt32Item(SID_ATTR_3D_HORZ_SEGS, (UINT32)GetDefaultHSegments()));
+
+ // VertSegs
+ rAttr.Put(SfxUInt32Item(SID_ATTR_3D_VERT_SEGS, (UINT32)GetDefaultVSegments()));
+
+ // PercentDiagonal
+ UINT16 nObjPercentDiagonal = (UINT16)((GetDefaultPercentDiag() * 200.0) + 0.5);
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_PERCENT_DIAGONAL, nObjPercentDiagonal));
+
+ // BackScale
+ UINT16 nObjBackScale = (UINT16)((GetDefaultBackScale() * 100.0) + 0.5);
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_BACKSCALE, nObjBackScale));
+
+ // EndAngle
+ UINT16 nObjEndAngle = (UINT16)(GetDefaultLatheEndAngle() + 0.5);
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_END_ANGLE, nObjEndAngle));
+
+ // ExtrudeDepth
+ UINT32 nObjDeepth = (UINT32)(GetDefaultExtrudeDepth() + 0.5);
+ rAttr.Put(SfxUInt32Item(SID_ATTR_3D_DEPTH, nObjDeepth));
+
+ // Szenenparameter
+ B3dLightGroup& rLightGroup = (B3dLightGroup&)GetDefaultLightGroup();
+ BOOL bSceneTwoSidedLighting = rLightGroup.GetModelTwoSide();
+ Color aSceneLightColor1 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight0);
+ Color aSceneLightColor2 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight1);
+ Color aSceneLightColor3 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight2);
+ Color aSceneLightColor4 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight3);
+ Color aSceneLightColor5 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight4);
+ Color aSceneLightColor6 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight5);
+ Color aSceneLightColor7 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight6);
+ Color aSceneLightColor8 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight7);
+ Color aSceneAmbientColor = rLightGroup.GetGlobalAmbientLight();
+ BOOL bSceneLightOn1 = rLightGroup.IsEnabled(Base3DLight0);
+ BOOL bSceneLightOn2 = rLightGroup.IsEnabled(Base3DLight1);
+ BOOL bSceneLightOn3 = rLightGroup.IsEnabled(Base3DLight2);
+ BOOL bSceneLightOn4 = rLightGroup.IsEnabled(Base3DLight3);
+ BOOL bSceneLightOn5 = rLightGroup.IsEnabled(Base3DLight4);
+ BOOL bSceneLightOn6 = rLightGroup.IsEnabled(Base3DLight5);
+ BOOL bSceneLightOn7 = rLightGroup.IsEnabled(Base3DLight6);
+ BOOL bSceneLightOn8 = rLightGroup.IsEnabled(Base3DLight7);
+ Vector3D aSceneLightDirection1 = rLightGroup.GetDirection( Base3DLight0 );
+ Vector3D aSceneLightDirection2 = rLightGroup.GetDirection( Base3DLight1 );
+ Vector3D aSceneLightDirection3 = rLightGroup.GetDirection( Base3DLight2 );
+ Vector3D aSceneLightDirection4 = rLightGroup.GetDirection( Base3DLight3 );
+ Vector3D aSceneLightDirection5 = rLightGroup.GetDirection( Base3DLight4 );
+ Vector3D aSceneLightDirection6 = rLightGroup.GetDirection( Base3DLight5 );
+ Vector3D aSceneLightDirection7 = rLightGroup.GetDirection( Base3DLight6 );
+ Vector3D aSceneLightDirection8 = rLightGroup.GetDirection( Base3DLight7 );
+ UINT16 nSceneShadeMode;
+ const Vector3D& rShadowVec = GetDefaultShadowPlaneDirection();
+ UINT16 nSceneShadowSlant = (UINT16)((atan2(rShadowVec.Y(), rShadowVec.Z()) / F_PI180) + 0.5);
+
+ if(GetDefaultForceDraftShadeModel())
+ {
+ nSceneShadeMode = 3; // Draft-Modus
+ }
+ else
+ {
+ if(GetDefaultShadeModel() == Base3DSmooth)
+ {
+ nSceneShadeMode = 2; // Gouraud
+ }
+ else if(GetDefaultShadeModel() == Base3DFlat)
+ {
+ nSceneShadeMode = 0; // Flat
+ }
+ else // Base3DPhong
+ {
+ nSceneShadeMode = 1; // Phong
+ }
+ }
+
+ // TwoSidedLighting
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_TWO_SIDED_LIGHTING, bSceneTwoSidedLighting));
+
+ // LightColors
+ rAttr.Put(SvxColorItem(aSceneLightColor1, SID_ATTR_3D_LIGHTCOLOR_1));
+ rAttr.Put(SvxColorItem(aSceneLightColor2, SID_ATTR_3D_LIGHTCOLOR_2));
+ rAttr.Put(SvxColorItem(aSceneLightColor3, SID_ATTR_3D_LIGHTCOLOR_3));
+ rAttr.Put(SvxColorItem(aSceneLightColor4, SID_ATTR_3D_LIGHTCOLOR_4));
+ rAttr.Put(SvxColorItem(aSceneLightColor5, SID_ATTR_3D_LIGHTCOLOR_5));
+ rAttr.Put(SvxColorItem(aSceneLightColor6, SID_ATTR_3D_LIGHTCOLOR_6));
+ rAttr.Put(SvxColorItem(aSceneLightColor7, SID_ATTR_3D_LIGHTCOLOR_7));
+ rAttr.Put(SvxColorItem(aSceneLightColor8, SID_ATTR_3D_LIGHTCOLOR_8));
+
+ // AmbientColor
+ rAttr.Put(SvxColorItem(aSceneAmbientColor, SID_ATTR_3D_AMBIENTCOLOR));
+
+ // LightOn
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_1, bSceneLightOn1));
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_2, bSceneLightOn2));
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_3, bSceneLightOn3));
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_4, bSceneLightOn4));
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_5, bSceneLightOn5));
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_6, bSceneLightOn6));
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_7, bSceneLightOn7));
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_8, bSceneLightOn8));
+
+ // LightDirection
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_1, aSceneLightDirection1));
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_2, aSceneLightDirection2));
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_3, aSceneLightDirection3));
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_4, aSceneLightDirection4));
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_5, aSceneLightDirection5));
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_6, aSceneLightDirection6));
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_7, aSceneLightDirection7));
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_8, aSceneLightDirection8));
+
+ // ShadowSlant
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_SHADOW_SLANT, nSceneShadowSlant));
+
+ // ShadeMode
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_SHADE_MODE, nSceneShadeMode));
+}
+
+
diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx
new file mode 100644
index 0000000000..f0867975f3
--- /dev/null
+++ b/svx/source/engine3d/dragmt3d.cxx
@@ -0,0 +1,902 @@
+/*************************************************************************
+ *
+ * $RCSfile: dragmt3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// MIB 6.11.97: Die Reihenfolge der Includes mag verwundern, aber in dieser
+// Reihenfolge geht das durch den SCO GCC, in anderen nicht. Also bitte nicht
+// an der Reihenfolge drehen, wenn es nicht noetig ist. Das gleiche gilt
+// natuerlich auch fuer das hinzufuegen von Includes. Danke.
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVDPAGV_HXX //autogen
+#include "svdpagv.hxx"
+#endif
+
+#ifndef _SVX_DIALMGR_HXX //autogen
+#include <dialmgr.hxx>
+#endif
+
+#ifndef _XOUTX_HXX //autogen
+#include <xoutx.hxx>
+#endif
+
+#ifndef _SVDDRGMT_HXX //autogen
+#include <svddrgmt.hxx>
+#endif
+
+#ifndef _SVDTRANS_HXX
+#include "svdtrans.hxx"
+#endif
+
+#ifndef _POLY3D_HXX
+#include "poly3d.hxx"
+#endif
+
+#ifndef _SVX_MATRIX3D_HXX
+#include "matrix3d.hxx"
+#endif
+
+#ifndef _E3D_OBJ3D_HXX
+#include "obj3d.hxx"
+#endif
+
+#ifndef _E3D_POLYSC3D_HXX
+#include "polysc3d.hxx"
+#endif
+
+#ifndef _E3D_UNDO_HXX
+#include "e3dundo.hxx"
+#endif
+
+#ifndef _E3D_DRAGMT3D_HXX
+#include "dragmt3d.hxx"
+#endif
+
+#ifndef _SVX_DIALOGS_HRC
+#include "dialogs.hrc"
+#endif
+
+TYPEINIT1(E3dDragMethod, SdrDragMethod);
+
+/*************************************************************************
+|*
+|* Parameter fuer Interaktion eines 3D-Objektes
+|*
+\************************************************************************/
+
+SV_IMPL_PTRARR(E3dDragMethodUnitGroup, E3dDragMethodUnit*);
+
+/*************************************************************************
+|*
+|* Timing-Qualitaeten
+|*
+\************************************************************************/
+
+#define E3D_GOOD_TIME Time(0,0)
+#define E3D_BAD_TIME Time(0,0,1)
+#define E3D_WANTED_TIME Time(0,0,0,25)
+#define E3D_WAITTIME_TIL_REDRAW (5)
+
+/*************************************************************************
+|*
+|* Konstruktor aller 3D-DragMethoden
+|*
+\************************************************************************/
+
+E3dDragMethod::E3dDragMethod (
+ SdrDragView &rView,
+ const SdrMarkList& rMark,
+ E3dDragDetail eDetail,
+ E3dDragConstraint eConstr,
+ BOOL bFull)
+: SdrDragMethod(rView),
+ eConstraint(eConstr),
+ eDragDetail(eDetail),
+ bMoveFull(bFull),
+ bMovedAtAll(FALSE)
+{
+ // Fuer alle in der selektion befindlichen 3D-Objekte
+ // eine Unit anlegen
+ long nCnt = rMark.GetMarkCount();
+ for(long nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = rMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dObject))
+ {
+ E3dObject* p3DObj = (E3dObject*)pObj;
+ E3dDragMethodUnit* pNewUnit = new E3dDragMethodUnit;
+ DBG_ASSERT(pNewUnit, "AW: Kein Speicher");
+
+ // Neue Unit einrichten
+ pNewUnit->p3DObj = p3DObj;
+
+ // Transformationen holen
+ pNewUnit->aInitTransform = pNewUnit->aTransform = p3DObj->GetTransform();
+ if(p3DObj->GetParentObj())
+ pNewUnit->aDisplayTransform = p3DObj->GetParentObj()->GetFullTransform();
+ pNewUnit->aInvDisplayTransform = pNewUnit->aDisplayTransform;
+ pNewUnit->aInvDisplayTransform.Invert();
+
+ // SnapRects der beteiligten Objekte invalidieren, um eine
+ // Neuberechnung beim Setzen der Marker zu erzwingen
+ p3DObj->SetRectsDirty();
+
+ if(bMoveFull)
+ {
+ // Timings merken
+ pNewUnit->nOrigQuality = p3DObj->GetScene()->GetDisplayQuality();
+ }
+ else
+ {
+ // Drahtgitterdarstellung fuer Parent-Koodinaten erzeugen
+ pNewUnit->aWireframePoly.SetPointCount(0);
+ p3DObj->CreateWireframe(pNewUnit->aWireframePoly, NULL, eDragDetail);
+ pNewUnit->aWireframePoly.Transform(pNewUnit->aTransform);
+ }
+
+ // FullBound ermitteln
+ aFullBound.Union(p3DObj->GetSnapRect());
+
+ // Unit einfuegen
+ aGrp.Insert((const E3dDragMethodUnit*&)pNewUnit, aGrp.Count());
+ }
+ }
+
+ // Link auf den Timer setzen
+ aCallbackTimer.SetTimeoutHdl( LINK( this, E3dDragMethod, TimerInterruptHdl) );
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+IMPL_LINK(E3dDragMethod, TimerInterruptHdl, void*, EMPTYARG)
+{
+ // Alle beteiligten Szenen neu zeichnen
+ UINT16 nCnt = aGrp.Count();
+ E3dScene* pScene = NULL;
+ UINT32 nNewTime(0);
+
+ for(UINT16 nOb=0;nOb<nCnt;nOb++)
+ {
+ if(aGrp[nOb]->p3DObj->GetScene() != pScene)
+ {
+ pScene = aGrp[nOb]->p3DObj->GetScene();
+ INT32 nOldQual = pScene->GetDisplayQuality();
+ if(nOldQual != 255)
+ {
+ if(nOldQual == 0)
+ nOldQual = 30;
+ else if(nOldQual <= 64)
+ nOldQual = 64;
+ else
+ nOldQual = 255;
+
+ pScene->SetDisplayQuality((UINT8)nOldQual);
+ pScene->SendRepaintBroadcast();
+
+ if(nOldQual != 255)
+ {
+ Time aLast = pScene->GetLastPaintTime();
+ if(nOldQual == 30)
+ nNewTime = aLast.GetTime() * (50 * E3D_WAITTIME_TIL_REDRAW);
+ else
+ nNewTime = aLast.GetTime() * (200 * E3D_WAITTIME_TIL_REDRAW);
+ }
+ }
+ }
+ }
+
+ if(nNewTime)
+ {
+ // Timer reset
+ aCallbackTimer.SetTimeout(nNewTime);
+ aCallbackTimer.Start();
+ }
+ return 0L;
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+void E3dDragMethod::TakeComment(XubString& rStr) const
+{
+}
+
+/*************************************************************************
+|*
+|* Erstelle das Drahtgittermodel fuer alle Aktionen
+|*
+\************************************************************************/
+
+FASTBOOL E3dDragMethod::Beg()
+{
+ if(eConstraint == E3DDRAG_CONSTR_Z)
+ {
+ UINT16 nCnt = aGrp.Count();
+ DragStat().Ref1() = aFullBound.Center();
+ for(UINT16 nOb=0;nOb<nCnt;nOb++)
+ {
+ aGrp[nOb]->nStartAngle = GetAngle(DragStat().GetStart() - DragStat().GetRef1());
+ aGrp[nOb]->nLastAngle = 0;
+ }
+ }
+ else
+ {
+ aLastPos = DragStat().GetStart();
+ }
+
+ if(!bMoveFull)
+ {
+ Show();
+ }
+
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* Schluss
+|*
+\************************************************************************/
+
+FASTBOOL E3dDragMethod::End(FASTBOOL bCopy)
+{
+ UINT16 nCnt = aGrp.Count();
+
+ if(bMoveFull)
+ {
+ // Timer stoppen
+ aCallbackTimer.Stop();
+
+ if(bMovedAtAll)
+ {
+ // Original-Qualitaet restaurieren
+ for(UINT16 nOb=0;nOb<nCnt;nOb++)
+ aGrp[nOb]->p3DObj->GetScene()->SetDisplayQuality(aGrp[nOb]->nOrigQuality);
+ }
+ }
+ else
+ {
+ // WireFrame ausblenden
+ Hide();
+ }
+
+ // Alle Transformationen anwenden und UnDo's anlegen
+ if(bMovedAtAll)
+ {
+ rView.BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_ROTATE));
+ UINT16 nOb;
+ for(nOb=0;nOb<nCnt;nOb++)
+ {
+ aGrp[nOb]->p3DObj->SetTransform(aGrp[nOb]->aTransform);
+ rView.AddUndo(new E3dRotateUndoAction(aGrp[nOb]->p3DObj->GetModel(),
+ aGrp[nOb]->p3DObj, aGrp[nOb]->aInitTransform,
+ aGrp[nOb]->aTransform));
+ }
+ rView.EndUndo();
+
+ // An allen beteiligten Szenen SnapRect neu setzen und
+ // BoundVolume der Kamera neu bestimmen, da sich die Geometrie
+ // tatsaechlich geaendert haben kann
+ E3dScene* pScene = NULL;
+ for(nOb=0;nOb<nCnt;nOb++)
+ {
+ if(aGrp[nOb]->p3DObj->GetScene() != pScene)
+ {
+ pScene = aGrp[nOb]->p3DObj->GetScene();
+ pScene->CorrectSceneDimensions();
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* Abbruch
+|*
+\************************************************************************/
+
+void E3dDragMethod::Brk()
+{
+ if(bMoveFull)
+ {
+ // Timer stoppen
+ aCallbackTimer.Stop();
+
+ if(bMovedAtAll)
+ {
+ UINT16 nCnt = aGrp.Count();
+ for(UINT16 nOb=0;nOb<nCnt;nOb++)
+ {
+ // Transformation restaurieren
+ aGrp[nOb]->p3DObj->SetTransform(aGrp[nOb]->aInitTransform);
+ aGrp[nOb]->p3DObj->GetScene()->FitSnapRectToBoundVol();
+
+ // Original-Qualitaet restaurieren
+ aGrp[nOb]->p3DObj->GetScene()->SetDisplayQuality(aGrp[nOb]->nOrigQuality);
+ }
+ }
+ }
+ else
+ {
+ // WireFrame ausblenden
+ Hide();
+ }
+}
+
+/*************************************************************************
+|*
+|* Gemeinsames Mov()
+|*
+\************************************************************************/
+
+void E3dDragMethod::Mov(const Point& rPnt)
+{
+ bMovedAtAll = TRUE;
+ if(bMoveFull)
+ {
+ UINT32 nNewTime = 0L;
+
+ // Darstellungsqualitaet bestimmen
+ UINT16 nCnt = aGrp.Count();
+ for(UINT16 nOb=0;nOb<nCnt;nOb++)
+ {
+ E3dScene* pScene = aGrp[nOb]->p3DObj->GetScene();
+ if(pScene)
+ {
+ Time aLast = pScene->GetLastPaintTime();
+ if(aLast.GetTime())
+ {
+ INT32 nActQual = pScene->GetDisplayQuality();
+
+ // nur weiter ueberlegen, wenn die Qualitaet ueber null liegt
+ if(nActQual)
+ {
+ INT32 nNewQual = nActQual + (E3D_WANTED_TIME.GetTime() - aLast.GetTime());
+ if(nNewQual < 0L)
+ nNewQual = 0L;
+ if(nNewQual > 255L)
+ nNewQual = 255L;
+ pScene->SetDisplayQuality((UINT8)nNewQual);
+ }
+ }
+ UINT32 nTime = aLast.GetTime() * (25 * E3D_WAITTIME_TIL_REDRAW);
+ nNewTime = (nTime > nNewTime) ? nTime : nNewTime;
+ }
+ }
+
+ // Timer reset
+ aCallbackTimer.SetTimeout(nNewTime);
+ aCallbackTimer.Start();
+ }
+}
+
+/*************************************************************************
+|*
+|* Zeichne das Drahtgittermodel
+|*
+\************************************************************************/
+
+void E3dDragMethod::DrawXor(ExtOutputDevice& rXOut, FASTBOOL bFull) const
+{
+ UINT16 nPVCnt = rView.GetPageViewCount();
+ XPolygon aLine(2);
+ UINT16 nCnt = aGrp.Count();
+
+ for(UINT16 nOb=0;nOb<nCnt;nOb++)
+ {
+ B3dCamera& rCameraSet = aGrp[nOb]->p3DObj->GetScene()->GetCameraSet();
+ for (UINT16 a=0;a<nPVCnt;a++)
+ {
+ SdrPageView* pPV = rView.GetPageViewPvNum(a);
+ if(pPV->HasMarkedObj())
+ {
+ rXOut.SetOffset(pPV->GetOffset());
+ UINT16 nPntCnt = aGrp[nOb]->aWireframePoly.GetPointCount();
+ if(nPntCnt > 1)
+ {
+ for(UINT16 b=0;b < nPntCnt;b += 2)
+ {
+ Vector3D aPnt1 = aGrp[nOb]->aDisplayTransform * aGrp[nOb]->aWireframePoly[b];
+ aPnt1 = rCameraSet.WorldToViewCoor(aPnt1);
+ aLine[0].X() = (long)(aPnt1.X() + 0.5);
+ aLine[0].Y() = (long)(aPnt1.Y() + 0.5);
+
+ Vector3D aPnt2 = aGrp[nOb]->aDisplayTransform * aGrp[nOb]->aWireframePoly[b+1];
+ aPnt2 = rCameraSet.WorldToViewCoor(aPnt2);
+ aLine[1].X() = (long)(aPnt2.X() + 0.5);
+ aLine[1].Y() = (long)(aPnt2.Y() + 0.5);
+
+ rXOut.DrawXPolyLine(aLine);
+ }
+ }
+ }
+ }
+ }
+}
+
+/*************************************************************************
+
+ E3dDragRotate
+
+*************************************************************************/
+
+TYPEINIT1(E3dDragRotate, E3dDragMethod);
+
+E3dDragRotate::E3dDragRotate(SdrDragView &rView,
+ const SdrMarkList& rMark,
+ E3dDragDetail eDetail,
+ E3dDragConstraint eConstr,
+ BOOL bFull)
+: E3dDragMethod(rView, rMark, eDetail, eConstr, bFull)
+{
+ // Zentrum aller selektierten Objekte in Augkoordinaten holen
+ UINT16 nCnt = aGrp.Count();
+ E3dScene *pScene = NULL;
+
+ for(UINT16 nOb=0;nOb<nCnt;nOb++)
+ {
+ Vector3D aObjCenter = aGrp[nOb]->p3DObj->GetCenter();
+ B3dCamera& rCameraSet = aGrp[nOb]->p3DObj->GetScene()->GetCameraSet();
+ aObjCenter *= aGrp[nOb]->aInitTransform;
+ aObjCenter *= aGrp[nOb]->aDisplayTransform;
+ aObjCenter = rCameraSet.WorldToEyeCoor(aObjCenter);
+ aGlobalCenter += aObjCenter;
+
+ if(aGrp[nOb]->p3DObj->ISA(E3dScene))
+ pScene = (E3dScene*)aGrp[nOb]->p3DObj;
+ }
+
+ // Teilen durch Anzahl
+ if(nCnt > 1)
+ aGlobalCenter /= (double)nCnt;
+
+ // Gruppe schon gesetzt? Sonst gruppe irgendeines Objektes
+ // (erstes) holen
+ if(!pScene && nCnt)
+ {
+ if(aGrp[0]->p3DObj)
+ pScene = aGrp[0]->p3DObj->GetScene();
+ }
+
+ if(pScene)
+ {
+ // 2D-Koordinaten des Controls Rotationszentrum holen
+ Point aRotCenter2D = Ref1();
+
+ // In Augkoordinaten transformieren
+ Vector3D aRotCenter(aRotCenter2D.X(), aRotCenter2D.Y(), 0.0);
+ aRotCenter = pScene->GetCameraSet().ViewToEyeCoor(aRotCenter);
+
+ // X,Y des RotCenter und Tiefe der gemeinsamen Objektmitte aus
+ // Rotationspunkt im Raum benutzen
+ aGlobalCenter.X() = aRotCenter.X();
+ aGlobalCenter.Y() = aRotCenter.Y();
+ }
+}
+
+/*************************************************************************
+|*
+|* Das Objekt wird bewegt, bestimme die Winkel
+|*
+\************************************************************************/
+
+void E3dDragRotate::Mov(const Point& rPnt)
+{
+ // call parent
+ E3dDragMethod::Mov(rPnt);
+
+ if(DragStat().CheckMinMoved(rPnt))
+ {
+ // Modifier holen
+ UINT16 nModifier = 0;
+ if(rView.ISA(E3dView))
+ {
+ const MouseEvent& rLastMouse = ((E3dView&)rView).GetMouseEvent();
+ nModifier = rLastMouse.GetModifier();
+ }
+
+ // Alle Objekte rotieren
+ UINT16 nCnt = aGrp.Count();
+ for(UINT16 nOb=0;nOb<nCnt;nOb++)
+ {
+ // Rotationswinkel bestimmen
+ double fWAngle, fHAngle;
+
+ if(eConstraint == E3DDRAG_CONSTR_Z)
+ {
+ fWAngle = NormAngle360(GetAngle(rPnt - DragStat().GetRef1()) -
+ aGrp[nOb]->nStartAngle) - aGrp[nOb]->nLastAngle;
+ aGrp[nOb]->nLastAngle = (long)fWAngle + aGrp[nOb]->nLastAngle;
+ fWAngle /= 100.0;
+ fHAngle = 0.0;
+ }
+ else
+ {
+ fWAngle = 90.0 * (double)(rPnt.X() - aLastPos.X())
+ / (double)aFullBound.GetWidth();
+ fHAngle = 90.0 * (double)(rPnt.Y() - aLastPos.Y())
+ / (double)aFullBound.GetHeight();
+ }
+ long nSnap = 0;
+
+ if(!rView.IsRotateAllowed(FALSE))
+ nSnap = 90;
+
+ if(nSnap != 0)
+ {
+ fWAngle = (double)(((long) fWAngle + nSnap/2) / nSnap * nSnap);
+ fHAngle = (double)(((long) fHAngle + nSnap/2) / nSnap * nSnap);
+ }
+
+ // nach radiant
+ fWAngle *= F_PI180;
+ fHAngle *= F_PI180;
+
+ // Transformation bestimmen
+ Matrix4D aRotMat;
+ if(eConstraint & E3DDRAG_CONSTR_Y)
+ {
+ if(nModifier & KEY_MOD2)
+ aRotMat.RotateZ(fWAngle);
+ else
+ aRotMat.RotateY(fWAngle);
+ }
+ else if(eConstraint & E3DDRAG_CONSTR_Z)
+ {
+ if(nModifier & KEY_MOD2)
+ aRotMat.RotateY(fWAngle);
+ else
+ aRotMat.RotateZ(fWAngle);
+ }
+ if(eConstraint & E3DDRAG_CONSTR_X)
+ {
+ aRotMat.RotateX(fHAngle);
+ }
+
+ // Transformation in Eye-Koordinaten, dort rotieren
+ // und zurueck
+ B3dCamera& rCameraSet = aGrp[nOb]->p3DObj->GetScene()->GetCameraSet();
+ Matrix4D aTransMat = aGrp[nOb]->aDisplayTransform;
+ aTransMat *= rCameraSet.GetOrientation();
+ aTransMat.Translate(-aGlobalCenter);
+ aTransMat *= aRotMat;
+ aTransMat.Translate(aGlobalCenter);
+ aTransMat *= rCameraSet.GetInvOrientation();
+ aTransMat *= aGrp[nOb]->aInvDisplayTransform;
+
+ // ...und anwenden
+ aGrp[nOb]->aTransform *= aTransMat;
+ if(bMoveFull)
+ {
+ aGrp[nOb]->p3DObj->NbcSetTransform(aGrp[nOb]->aTransform);
+ aGrp[nOb]->p3DObj->GetScene()->FitSnapRectToBoundVol();
+ }
+ else
+ {
+ Hide();
+ aGrp[nOb]->aWireframePoly.Transform(aTransMat);
+ Show();
+ }
+ }
+ aLastPos = rPnt;
+ DragStat().NextMove(rPnt);
+ }
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+Pointer E3dDragRotate::GetPointer() const
+{
+ return Pointer(POINTER_ROTATE);
+}
+
+/*************************************************************************
+|*
+|* E3dDragMove
+|* Diese DragMethod wird nur bei Translationen innerhalb von 3D-Scenen
+|* benoetigt. Wird eine 3D-Scene selbst verschoben, so wird diese DragMethod
+|* nicht verwendet.
+|*
+\************************************************************************/
+
+TYPEINIT1(E3dDragMove, E3dDragMethod);
+
+E3dDragMove::E3dDragMove(SdrDragView &rView,
+ const SdrMarkList& rMark,
+ E3dDragDetail eDetail,
+ SdrHdlKind eDrgHdl,
+ E3dDragConstraint eConstr,
+ BOOL bFull)
+: E3dDragMethod(rView, rMark, eDetail, eConstr, bFull),
+ eWhatDragHdl(eDrgHdl)
+{
+ switch(eWhatDragHdl)
+ {
+ case HDL_LEFT:
+ aScaleFixPos = aFullBound.RightCenter();
+ break;
+ case HDL_RIGHT:
+ aScaleFixPos = aFullBound.LeftCenter();
+ break;
+ case HDL_UPPER:
+ aScaleFixPos = aFullBound.BottomCenter();
+ break;
+ case HDL_LOWER:
+ aScaleFixPos = aFullBound.TopCenter();
+ break;
+ case HDL_UPLFT:
+ aScaleFixPos = aFullBound.BottomRight();
+ break;
+ case HDL_UPRGT:
+ aScaleFixPos = aFullBound.BottomLeft();
+ break;
+ case HDL_LWLFT:
+ aScaleFixPos = aFullBound.TopRight();
+ break;
+ case HDL_LWRGT:
+ aScaleFixPos = aFullBound.TopLeft();
+ break;
+ default:
+ // Bewegen des Objektes, HDL_MOVE
+ break;
+ }
+
+ // Override wenn IsResizeAtCenter()
+ if(rView.IsResizeAtCenter())
+ {
+ eWhatDragHdl = HDL_USER;
+ aScaleFixPos = aFullBound.Center();
+ }
+}
+
+/*************************************************************************
+|*
+|* Das Objekt wird bewegt, bestimme die Translation
+|*
+\************************************************************************/
+
+void E3dDragMove::Mov(const Point& rPnt)
+{
+ // call parent
+ E3dDragMethod::Mov(rPnt);
+
+ if(DragStat().CheckMinMoved(rPnt))
+ {
+ if(eWhatDragHdl == HDL_MOVE)
+ {
+ // Translation
+ // Bewegungsvektor bestimmen
+ Vector3D aGlobalMoveHead((double)(rPnt.X() - aLastPos.X()),
+ (double)(rPnt.Y() - aLastPos.Y()), 32768.0);
+ Vector3D aGlobalMoveTail(0.0, 0.0, 32768.0);
+ UINT16 nCnt = aGrp.Count();
+
+ // Modifier holen
+ UINT16 nModifier = 0;
+ if(rView.ISA(E3dView))
+ {
+ const MouseEvent& rLastMouse = ((E3dView&)rView).GetMouseEvent();
+ nModifier = rLastMouse.GetModifier();
+ }
+
+ for(UINT16 nOb=0;nOb<nCnt;nOb++)
+ {
+ B3dCamera& rCameraSet = aGrp[nOb]->p3DObj->GetScene()->GetCameraSet();
+
+ // Bewegungsvektor von View-Koordinaten nach Aug-Koordinaten
+ Vector3D aMoveHead = rCameraSet.ViewToEyeCoor(aGlobalMoveHead);
+ Vector3D aMoveTail = rCameraSet.ViewToEyeCoor(aGlobalMoveTail);
+
+ // Eventuell Bewegung von XY-Ebene auf XZ-Ebene umschalten
+ if(nModifier & KEY_MOD2)
+ {
+ double fZwi = aMoveHead.Y();
+ aMoveHead.Y() = aMoveHead.Z();
+ aMoveHead.Z() = fZwi;
+
+ fZwi = aMoveTail.Y();
+ aMoveTail.Y() = aMoveTail.Z();
+ aMoveTail.Z() = fZwi;
+ }
+
+ // Bewegungsvektor von Aug-Koordinaten nach Parent-Koordinaten
+ aMoveHead = rCameraSet.EyeToWorldCoor(aMoveHead);
+ aMoveHead *= aGrp[nOb]->aInvDisplayTransform;
+ aMoveTail = rCameraSet.EyeToWorldCoor(aMoveTail);
+ aMoveTail *= aGrp[nOb]->aInvDisplayTransform;
+
+ // Transformation bestimmen
+ Matrix4D aTransMat;
+ aTransMat.Translate(aMoveHead - aMoveTail);
+
+ // ...und anwenden
+ aGrp[nOb]->aTransform *= aTransMat;
+ if(bMoveFull)
+ {
+ aGrp[nOb]->p3DObj->NbcSetTransform(aGrp[nOb]->aTransform);
+ aGrp[nOb]->p3DObj->GetScene()->FitSnapRectToBoundVol();
+ }
+ else
+ {
+ Hide();
+ aGrp[nOb]->aWireframePoly.Transform(aTransMat);
+ Show();
+ }
+ }
+ }
+ else
+ {
+ // Skalierung
+ // Skalierungsvektor bestimmen
+ Point aStartPos = DragStat().GetStart();
+ Vector3D aGlobalScaleStart((double)(aStartPos.X()), (double)(aStartPos.Y()), 32768.0);
+ Vector3D aGlobalScaleNext((double)(rPnt.X()), (double)(rPnt.Y()), 32768.0);
+ Vector3D aGlobalScaleFixPos((double)(aScaleFixPos.X()), (double)(aScaleFixPos.Y()), 32768.0);
+ UINT16 nCnt = aGrp.Count();
+
+ for(UINT16 nOb=0;nOb<nCnt;nOb++)
+ {
+ B3dCamera& rCameraSet = aGrp[nOb]->p3DObj->GetScene()->GetCameraSet();
+ Vector3D aObjectCenter = aGrp[nOb]->p3DObj->GetCenter();
+ aGlobalScaleStart.Z() = aObjectCenter.Z();
+ aGlobalScaleNext.Z() = aObjectCenter.Z();
+ aGlobalScaleFixPos.Z() = aObjectCenter.Z();
+
+ // Skalierungsvektor von View-Koordinaten nach Aug-Koordinaten
+ Vector3D aScStart = rCameraSet.ViewToEyeCoor(aGlobalScaleStart);
+ Vector3D aScNext = rCameraSet.ViewToEyeCoor(aGlobalScaleNext);
+ Vector3D aScFixPos = rCameraSet.ViewToEyeCoor(aGlobalScaleFixPos);
+
+ // Einschraenkungen?
+ switch(eWhatDragHdl)
+ {
+ case HDL_LEFT:
+ case HDL_RIGHT:
+ // Einschraenken auf X -> Y gleichsetzen
+ aScNext.Y() = aScFixPos.Y();
+ break;
+ case HDL_UPPER:
+ case HDL_LOWER:
+ // Einschraenken auf Y -> X gleichsetzen
+ aScNext.X() = aScFixPos.X();
+ break;
+ }
+
+ // ScaleVector in Augkoordinaten bestimmen
+ Vector3D aScaleVec = aScStart - aScFixPos;
+ aScaleVec.Z() = 1.0;
+
+ if(aScaleVec.X() != 0.0)
+ aScaleVec.X() = (aScNext.X() - aScFixPos.X()) / aScaleVec.X();
+ else
+ aScaleVec.X() = 1.0;
+
+ if(aScaleVec.Y() != 0.0)
+ aScaleVec.Y() = (aScNext.Y() - aScFixPos.Y()) / aScaleVec.Y();
+ else
+ aScaleVec.Y() = 1.0;
+
+ // Mit SHIFT-Taste?
+ if(rView.IsOrtho())
+ {
+ if(fabs(aScaleVec.X()) > fabs(aScaleVec.Y()))
+ {
+ // X ist am groessten
+ aScaleVec.Y() = aScaleVec.X();
+ }
+ else
+ {
+ // Y ist am groessten
+ aScaleVec.X() = aScaleVec.Y();
+ }
+ }
+
+ // Transformation bestimmen
+ Matrix4D aNewTrans = aGrp[nOb]->aInitTransform;
+ aNewTrans *= aGrp[nOb]->aDisplayTransform;
+ aNewTrans *= rCameraSet.GetOrientation();
+ aNewTrans.Translate(-aScFixPos);
+ aNewTrans.Scale(aScaleVec);
+ aNewTrans.Translate(aScFixPos);
+ aNewTrans *= rCameraSet.GetInvOrientation();
+ aNewTrans *= aGrp[nOb]->aInvDisplayTransform;
+
+ // ...und anwenden
+ aGrp[nOb]->aTransform = aNewTrans;
+ if(bMoveFull)
+ {
+ aGrp[nOb]->p3DObj->NbcSetTransform(aGrp[nOb]->aTransform);
+ aGrp[nOb]->p3DObj->GetScene()->FitSnapRectToBoundVol();
+ }
+ else
+ {
+ Hide();
+ aGrp[nOb]->aWireframePoly.SetPointCount(0);
+ aGrp[nOb]->p3DObj->CreateWireframe(aGrp[nOb]->aWireframePoly, NULL, eDragDetail);
+ aGrp[nOb]->aWireframePoly.Transform(aGrp[nOb]->aTransform);
+ Show();
+ }
+ }
+ }
+ aLastPos = rPnt;
+ DragStat().NextMove(rPnt);
+ }
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+Pointer E3dDragMove::GetPointer() const
+{
+ return Pointer(POINTER_MOVE);
+}
+
+
diff --git a/svx/source/engine3d/e3dundo.cxx b/svx/source/engine3d/e3dundo.cxx
new file mode 100644
index 0000000000..3f81d7dbb6
--- /dev/null
+++ b/svx/source/engine3d/e3dundo.cxx
@@ -0,0 +1,243 @@
+/*************************************************************************
+ *
+ * $RCSfile: e3dundo.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_UNDO_HXX
+#include "e3dundo.hxx"
+#endif
+
+#ifndef _SVDMODEL_HXX
+#include "svdmodel.hxx"
+#endif
+
+#ifndef _OUTLOBJ_HXX
+#include "outlobj.hxx"
+#endif
+
+#ifndef _E3D_VIEW3D_HXX
+#include "view3d.hxx"
+#endif
+
+#ifndef _E3D_SCENE3D_HXX
+#include "scene3d.hxx"
+#endif
+
+/************************************************************************/
+
+TYPEINIT1(E3dUndoAction, SfxUndoAction);
+
+/************************************************************************\
+|*
+|* Destruktor der Basisklasse
+|*
+\************************************************************************/
+E3dUndoAction::~E3dUndoAction ()
+{
+}
+
+/************************************************************************\
+|*
+|* Repeat gibt es nicht
+|*
+\************************************************************************/
+BOOL E3dUndoAction::CanRepeat(SfxRepeatTarget&) const
+{
+ return FALSE;
+}
+
+/************************************************************************/
+
+TYPEINIT1(E3dRotateUndoAction, E3dUndoAction);
+
+/************************************************************************
+
+ E3dRotateUndoAction
+
+************************************************************************\
+
+/************************************************************************\
+|*
+|* Undodestruktor fuer 3D-Rotation
+|*
+\************************************************************************/
+E3dRotateUndoAction::~E3dRotateUndoAction ()
+{
+}
+
+/************************************************************************\
+|*
+|* Undo fuer 3D-Rotation ueber die Rotationsmatrizen
+|*
+\************************************************************************/
+void E3dRotateUndoAction::Undo ()
+{
+ pMy3DObj->SetTransform(aMyOldRotation);
+ pMy3DObj->GetScene()->CorrectSceneDimensions();
+}
+
+/************************************************************************\
+|*
+|* Undo fuer 3D-Rotation ueber die Rotationsmatrizen
+|*
+\************************************************************************/
+void E3dRotateUndoAction::Redo ()
+{
+ pMy3DObj->SetTransform(aMyNewRotation);
+ pMy3DObj->GetScene()->CorrectSceneDimensions();
+}
+
+/*************************************************************************
+|*
+|* E3dAttributesUndoAction
+|*
+\************************************************************************/
+
+TYPEINIT1(E3dAttributesUndoAction, SdrUndoAction);
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+E3dAttributesUndoAction::E3dAttributesUndoAction( SdrModel &rModel,
+ E3dView* p3dView,
+ E3dObject* pInObject,
+ const SfxItemSet& rNewSet,
+ const SfxItemSet& rOldSet,
+ BOOL bUseSubObj)
+: SdrUndoAction( rModel ),
+ pView ( p3dView ),
+ pObject ( pInObject ),
+ aNewSet ( rNewSet ),
+ aOldSet ( rOldSet ),
+ bUseSubObjects(bUseSubObj)
+{
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+E3dAttributesUndoAction::~E3dAttributesUndoAction()
+{
+}
+
+/*************************************************************************
+|*
+|* Undo()
+|* Implementiert ueber Set3DAttributes(), um die Attribute nur an einer
+|* Stelle pflegen zu muessen!
+|*
+\************************************************************************/
+void E3dAttributesUndoAction::Undo()
+{
+ if(pObject->ISA(E3dObject))
+ {
+ ((E3dObject*)pObject)->SetAttrUseSubObjects(bUseSubObjects);
+ }
+ pObject->SetAttributes( aOldSet, FALSE);
+ if(pObject->ISA(E3dObject))
+ {
+ E3dScene* pScene = ((E3dObject*)pObject)->GetScene();
+ if(pScene)
+ pScene->CorrectSceneDimensions();
+ }
+}
+
+/*************************************************************************
+|*
+|* Redo()
+|*
+\************************************************************************/
+void E3dAttributesUndoAction::Redo()
+{
+ if(pObject->ISA(E3dObject))
+ {
+ ((E3dObject*)pObject)->SetAttrUseSubObjects(bUseSubObjects);
+ }
+ pObject->SetAttributes( aNewSet, FALSE);
+ if(pObject->ISA(E3dObject))
+ {
+ E3dScene* pScene = ((E3dObject*)pObject)->GetScene();
+ if(pScene)
+ pScene->CorrectSceneDimensions();
+ }
+}
+
+/*************************************************************************
+|*
+|* Mehrfaches Undo nicht moeglich
+|*
+\************************************************************************/
+BOOL E3dAttributesUndoAction::CanRepeat(SfxRepeatTarget& rView) const
+{
+ return FALSE;
+}
+
+/*************************************************************************
+|*
+|* Mehrfaches Undo nicht moeglich
+|*
+\************************************************************************/
+void E3dAttributesUndoAction::Repeat()
+{
+}
+
diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx
new file mode 100644
index 0000000000..3748e78eeb
--- /dev/null
+++ b/svx/source/engine3d/extrud3d.cxx
@@ -0,0 +1,870 @@
+/*************************************************************************
+ *
+ * $RCSfile: extrud3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "svdstr.hrc"
+#include "svdglob.hxx"
+
+#ifndef _SVDPAGE_HXX
+#include "svdpage.hxx"
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+#ifndef _E3D_POLYOB3D_HXX
+#include "polyob3d.hxx"
+#endif
+
+#ifndef _E3D_EXTRUD3D_HXX
+#include "extrud3d.hxx"
+#endif
+
+#ifndef _E3D_E3DIOCMPT_HXX
+#include "e3dcmpt.hxx"
+#endif
+
+#ifndef _POLY3D_HXX
+#include "poly3d.hxx"
+#endif
+
+#ifndef _E3D_SCENE3D_HXX
+#include "scene3d.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _XPOLY_HXX
+#include "xpoly.hxx"
+#endif
+
+#ifndef _SVDOPATH_HXX
+#include "svdopath.hxx"
+#endif
+
+#ifndef _SVDMODEL_HXX
+#include "svdmodel.hxx"
+#endif
+
+TYPEINIT1(E3dExtrudeObj, E3dCompoundObject);
+
+/*************************************************************************
+|*
+|* Konstruktor, erzeugt zwei Deckelflaechen-PolyPolygone und (PointCount-1)
+|* Seitenflaechen-Rechtecke aus dem uebergebenen PolyPolygon
+|*
+\************************************************************************/
+
+E3dExtrudeObj::E3dExtrudeObj(E3dDefaultAttributes& rDefault, const PolyPolygon& rPP, double fDepth)
+: E3dCompoundObject(rDefault),
+ aExtrudePolygon(rPP, rDefault.GetDefaultExtrudeScale()),
+ fExtrudeDepth(fDepth)
+{
+ // Defaults setzen
+ SetDefaultAttributes(rDefault);
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* wie voriger Konstruktor, nur mit XPolygon; das XPolygon wird
+|* jedoch nicht Bezier-konvertiert, sondern es werden nur seine
+|* Punktkoordinaten uebernommen
+|*
+\************************************************************************/
+
+E3dExtrudeObj::E3dExtrudeObj(E3dDefaultAttributes& rDefault, const XPolyPolygon& rXPP, double fDepth)
+: E3dCompoundObject(rDefault),
+ aExtrudePolygon(rXPP, rDefault.GetDefaultExtrudeScale()),
+ fExtrudeDepth(fDepth)
+{
+ // Defaults setzen
+ SetDefaultAttributes(rDefault);
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+E3dExtrudeObj::E3dExtrudeObj()
+: E3dCompoundObject()
+{
+ // Defaults setzen
+ E3dDefaultAttributes aDefault;
+ fExtrudeDepth = aDefault.GetDefaultExtrudeDepth();
+ SetDefaultAttributes(aDefault);
+}
+
+void E3dExtrudeObj::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+{
+ // Defaults setzen
+ fExtrudeScale = rDefault.GetDefaultExtrudeScale();
+ fExtrudeBackScale = rDefault.GetDefaultBackScale();
+ fExtrudePercentDiag = rDefault.GetDefaultPercentDiag();
+ bExtrudeSmoothed = rDefault.GetDefaultExtrudeSmoothed();
+ bExtrudeSmoothFrontBack = rDefault.GetDefaultExtrudeSmoothFrontBack();
+ bExtrudeCharacterMode = rDefault.GetDefaultExtrudeCharacterMode();
+ bExtrudeCloseFront = rDefault.GetDefaultExtrudeCloseFront();
+ bExtrudeCloseBack = rDefault.GetDefaultExtrudeCloseBack();
+
+ // Bei extrudes defaultmaessig StdTexture in X und Y
+ bUseStdTextureX = TRUE;
+ bUseStdTextureY = TRUE;
+}
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+PolyPolygon3D E3dExtrudeObj::GetFrontSide()
+{
+ // Polygon als Grundlage holen
+ PolyPolygon3D aPolyPoly3D(aExtrudePolygon);
+
+ // Ueberfluessige Punkte entfernen, insbesondere doppelte
+ // Start- und Endpunkte verhindern
+ aPolyPoly3D.RemoveDoublePoints();
+
+ // Normale holen
+ Vector3D aNormal = aPolyPoly3D.GetNormal();
+ if((aNormal.Z() > 0.0) != (fExtrudeDepth > 0.0))
+ aPolyPoly3D.FlipDirections();
+
+ // Orientierung evtl. vorhandener Loecher in einen definierten
+ // Ausgangszustand bringen
+ aPolyPoly3D.SetDirections();
+
+ return aPolyPoly3D;
+}
+
+PolyPolygon3D E3dExtrudeObj::GetBackSide(const PolyPolygon3D& rFrontSide)
+{
+ PolyPolygon3D aBackSide(rFrontSide);
+
+ if(fExtrudeDepth != 0.0)
+ {
+ // Extrudevektor bilden
+ Vector3D aNormal = aBackSide.GetNormal();
+ if(aNormal.Z() < 0.0)
+ aNormal.Z() = -aNormal.Z();
+ Vector3D aOffset = aNormal * fExtrudeDepth;
+
+ // eventuell Skalieren
+ if(fExtrudeBackScale != 1.0)
+ ScalePoly(aBackSide, fExtrudeBackScale);
+
+ // Verschieben
+ Matrix4D aTrans;
+ aTrans.Translate(aOffset);
+ aBackSide.Transform(aTrans);
+ }
+
+ return aBackSide;
+}
+
+void E3dExtrudeObj::CreateGeometry()
+{
+ // Start der Geometrieerzeugung ankuendigen
+ StartCreateGeometry();
+
+ // Polygon als Grundlage holen
+ PolyPolygon3D aFrontSide = GetFrontSide();
+
+ if(fExtrudeDepth != 0.0)
+ {
+ // Hinteres Polygon erzeugen
+ PolyPolygon3D aBackSide = GetBackSide(aFrontSide);
+
+ // Was muss erzeugt werden?
+ if(!aFrontSide.IsClosed())
+ bDoubleSided = TRUE;
+
+ double fTextureDepth=1.0;
+ double fTextureStart=0.0;
+
+ // Texturen erzeugen?
+ if(!GetCreateTexture())
+ fTextureStart = fTextureDepth = 0.0;
+
+ // Falls Texturen erzeugen Randbreite fuer diese bestimmen
+ double fSurroundFactor = 1.0;
+ if(GetCreateTexture())
+ {
+ fSurroundFactor = aFrontSide.GetLength() / sqrt(aFrontSide.GetPolyArea());
+ fSurroundFactor = (double)((long)(fSurroundFactor - 0.5));
+ if(fSurroundFactor == 0.0)
+ fSurroundFactor = 1.0;
+ }
+
+ // Segment erzeugen
+ CreateSegment(
+ aFrontSide,
+ aBackSide,
+ 0L,
+ 0L,
+ bExtrudeCloseFront,
+ bExtrudeCloseBack,
+ fExtrudePercentDiag,
+ GetExtrudeSmoothed(),
+ GetExtrudeSmoothed(),
+ GetExtrudeSmoothFrontBack(),
+ fSurroundFactor,
+ fTextureStart,
+ fTextureDepth,
+ GetCreateNormals(),
+ GetCreateTexture(),
+ bExtrudeCharacterMode,
+ FALSE);
+ }
+ else
+ {
+ // nur ein Polygon erzeugen
+ SetDoubleSided(TRUE);
+
+ // Fuer evtl. selbst erzeugte Normalen
+ PolyPolygon3D aNormalsFront;
+
+ // Extrudevektor bilden
+ Vector3D aNormal = aFrontSide.GetNormal();
+ Vector3D aOffset = aNormal * fExtrudeDepth;
+
+ // Normalen und Vorderseite selbst erzeugen
+ AddFrontNormals(aFrontSide, aNormalsFront, aOffset);
+ CreateFront(aFrontSide, aNormalsFront, GetCreateNormals(), GetCreateTexture());
+ }
+
+ // call parent
+ E3dCompoundObject::CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+UINT16 E3dExtrudeObj::GetObjIdentifier() const
+{
+ return E3D_EXTRUDEOBJ_ID;
+}
+
+/*************************************************************************
+|*
+|* Wireframe erzeugen
+|*
+\************************************************************************/
+
+void E3dExtrudeObj::CreateWireframe(Polygon3D& rWirePoly, const Matrix4D* pTf,
+ E3dDragDetail eDetail)
+{
+ if ( eDetail == E3DDETAIL_ALLLINES ||
+ (eDetail == E3DDETAIL_DEFAULT && GetDragDetail() == E3DDETAIL_ALLLINES) )
+ {
+ // Detailliert erzeugen
+ }
+ else
+ {
+ // call parent
+ E3dObject::CreateWireframe(rWirePoly, pTf, eDetail);
+ }
+}
+
+/*************************************************************************
+|*
+|* uebergebene Transformationsmatrix anwenden, BoundVolume anpassen
+|*
+\************************************************************************/
+
+void E3dExtrudeObj::ApplyTransform(const Matrix4D& rMatrix)
+{
+ // call parent
+ E3dCompoundObject::ApplyTransform(rMatrix);
+
+ // Anwenden auf lokale geometrie
+ aExtrudePolygon.Transform(rMatrix);
+}
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+void E3dExtrudeObj::WriteData(SvStream& rOut) const
+{
+ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+ if(nVersion < 3800)
+ {
+ // Alte Geometrie erzeugen, um die E3dPolyObj's zu haben
+ ((E3dCompoundObject*)this)->ReCreateGeometry(TRUE);
+ }
+
+ // call parent
+ E3dCompoundObject::WriteData(rOut);
+
+ E3dIOCompat aCompat(rOut, STREAM_WRITE, 1);
+ rOut << aExtrudePolygon;
+ rOut << fExtrudeScale;
+ rOut << fExtrudeDepth;
+ rOut << fExtrudeBackScale;
+ rOut << fExtrudePercentDiag;
+
+ rOut << (BOOL)bExtrudeSmoothed;
+ rOut << (BOOL)bExtrudeSmoothFrontBack;
+ rOut << (BOOL)bExtrudeCharacterMode;
+
+ // Ab Version 513a (5.2.99): Parameter fuer das
+ // Erzeugen der Vorder/Rueckwand
+ rOut << (BOOL)bExtrudeCloseFront;
+ rOut << (BOOL)bExtrudeCloseBack;
+
+ if(nVersion < 3800)
+ {
+ // Geometrie neu erzeugen, um E3dPolyObj's wieder loszuwerden
+ ((E3dCompoundObject*)this)->ReCreateGeometry();
+ }
+}
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+void E3dExtrudeObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ // call parent
+ E3dCompoundObject::ReadData(rHead, rIn);
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ BOOL bAllDone(FALSE);
+
+ if(AreBytesLeft())
+ {
+ E3dIOCompat aIoCompat(rIn, STREAM_READ);
+ if(aIoCompat.GetVersion() >= 1)
+ {
+ BOOL bTmp;
+
+ rIn >> aExtrudePolygon;
+ rIn >> fExtrudeScale;
+ rIn >> fExtrudeDepth;
+ rIn >> fExtrudeBackScale;
+ rIn >> fExtrudePercentDiag;
+
+ rIn >> bTmp; bExtrudeSmoothed = bTmp;
+ rIn >> bTmp; bExtrudeSmoothFrontBack = bTmp;
+ rIn >> bTmp; bExtrudeCharacterMode = bTmp;
+
+ bAllDone = TRUE;
+
+ if(aIoCompat.GetBytesLeft())
+ {
+ // Ab Version 513a (5.2.99): Parameter fuer das
+ // Erzeugen der Vorder/Rueckwand
+ BOOL bTmp;
+
+ rIn >> bTmp; bExtrudeCloseFront = bTmp;
+ rIn >> bTmp; bExtrudeCloseBack = bTmp;
+ }
+ else
+ {
+ bExtrudeCloseFront = TRUE;
+ bExtrudeCloseBack = TRUE;
+ }
+ }
+ }
+
+ if(!bAllDone)
+ {
+ // Geometrie aus geladenen PolyObj's rekonstruieren
+ SdrObjList* pSubList = GetSubList();
+ if(pSubList && pSubList->GetObjCount())
+ {
+ // Vorderseite und Rueckseite sind die ersten
+ // PolyObj's in der Liste, hole diese
+ E3dPolyObj* pFront = NULL;
+ E3dPolyObj* pBack = NULL;
+ E3dPolyObj* pOther = NULL;
+
+ UINT16 a;
+ for(a=0;a<pSubList->GetObjCount();a++)
+ {
+ E3dPolyObj* pCandidate = (E3dPolyObj*)pSubList->GetObj(a);
+ if(pCandidate->ISA(E3dPolyObj))
+ {
+ // Die Nromalen der Vorder/Rueckseiten zeigen in Z-Richtung,
+ // nutze dies aus
+ const Vector3D& rNormal = pCandidate->GetNormal();
+ if(fabs(rNormal.X()) < 0.0000001 && fabs(rNormal.Y()) < 0.0000001)
+ {
+ if(rNormal.Z() > 0.0)
+ {
+ // Vorderseite
+ pFront = pCandidate;
+ }
+ else
+ {
+ // Rueckseite
+ pBack = pCandidate;
+ }
+ }
+ else
+ {
+ if(!pOther)
+ pOther = pCandidate;
+ }
+ }
+ }
+
+ // Extrude-Tiefe feststellen
+ if(pOther)
+ {
+ const PolyPolygon3D& rOtherPoly = pOther->GetPolyPolygon3D();
+ // Hintereinanderliegende Paare in der alten Version waren
+ // 0,1 und 3,2 (0,3 vorne)
+ fExtrudeDepth = (rOtherPoly[0][1] - rOtherPoly[0][0]).GetLength();
+ }
+ else
+ // Einen Default vorsehen, kann aber eigentlich nie geschehen
+ fExtrudeDepth = 100.0;
+
+ // Polygon fuer Vorderseite holen
+ if(pFront)
+ {
+ aExtrudePolygon = pFront->GetPolyPolygon3D();
+ }
+ else
+ {
+ if(pBack)
+ {
+ // Rueckseite benutzen und um -fExtrudeDepth in Z
+ // verschieben
+ aExtrudePolygon = pBack->GetPolyPolygon3D();
+ Matrix4D aMat;
+ aMat.Translate(Vector3D(0.0, 0.0, -fExtrudeDepth));
+ aExtrudePolygon.Transform(aMat);
+ }
+ else
+ {
+ // Die Polygondaten koennen aus den Vorderkanten
+ // der weiteren Polygone (Punkte 0,3) restauriert werden.
+ // evtl. spaeter ergaenzen
+ aExtrudePolygon.Clear();
+ }
+ }
+
+ // Bestimmen, ob die Teilpolygone von aExtrudePolygon
+ // geschlossen waren. Sie waren geschlossen, wenn ein
+ // entsprechendes PolyObj existiert
+ for(a=0;a<aExtrudePolygon.Count();a++)
+ {
+ Polygon3D &rPoly = aExtrudePolygon[a];
+ USHORT nCnt = rPoly.GetPointCount();
+
+ if(nCnt)
+ {
+ Vector3D& rFirst = rPoly[0];
+ Vector3D& rLast = rPoly[nCnt - 1];
+ BOOL bClosePoly(FALSE);
+
+ for(UINT16 b=0;b<pSubList->GetObjCount();b++)
+ {
+ E3dPolyObj* pCandidate = (E3dPolyObj*)pSubList->GetObj(b);
+ if(pCandidate->ISA(E3dPolyObj)
+ && pCandidate != pFront && pCandidate != pBack)
+ {
+ const PolyPolygon3D& rCandPoly = pCandidate->GetPolyPolygon3D();
+ if(rCandPoly[0].GetPointCount() > 2)
+ {
+ if(rCandPoly[0][0] == rFirst && rCandPoly[0][3] == rLast)
+ bClosePoly = TRUE;
+ if(rCandPoly[0][3] == rFirst && rCandPoly[0][0] == rLast)
+ bClosePoly = TRUE;
+ }
+ }
+ }
+
+ rPoly.SetClosed(bClosePoly);
+ }
+ }
+
+ // Setze die weiteren Parameter auf die defaults
+ fExtrudeScale = 1.0;
+ fExtrudeBackScale = 1.0;
+ fExtrudePercentDiag = 0.05;
+
+ bExtrudeSmoothed = TRUE;
+ bExtrudeSmoothFrontBack = FALSE;
+ bExtrudeCharacterMode = FALSE;
+ }
+ }
+
+ // Geometrie neu erzeugen
+ ReCreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+void E3dExtrudeObj::operator=(const SdrObject& rObj)
+{
+ // erstmal alle Childs kopieren
+ E3dCompoundObject::operator=(rObj);
+
+ // weitere Parameter kopieren
+ const E3dExtrudeObj& r3DObj = (const E3dExtrudeObj&)rObj;
+
+ aExtrudePolygon = r3DObj.aExtrudePolygon;
+ fExtrudeScale = r3DObj.fExtrudeScale;
+ fExtrudeDepth = r3DObj.fExtrudeDepth;
+ fExtrudeBackScale = r3DObj.fExtrudeBackScale;
+ fExtrudePercentDiag = r3DObj.fExtrudePercentDiag;
+
+ bExtrudeSmoothed = r3DObj.bExtrudeSmoothed;
+ bExtrudeSmoothFrontBack = r3DObj.bExtrudeSmoothFrontBack;
+ bExtrudeCharacterMode = r3DObj.bExtrudeCharacterMode;
+ bExtrudeCloseFront = r3DObj.bExtrudeCloseFront;
+ bExtrudeCloseBack = r3DObj.bExtrudeCloseBack;
+}
+
+/*************************************************************************
+|*
+|* Lokale Parameter setzen mit Geometrieneuerzeugung
+|*
+\************************************************************************/
+
+void E3dExtrudeObj::SetExtrudePolygon(const PolyPolygon3D &rNew)
+{
+ if(aExtrudePolygon != rNew)
+ {
+ aExtrudePolygon = rNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dExtrudeObj::SetExtrudeScale(double fNew)
+{
+ if(fExtrudeScale != fNew)
+ {
+ fExtrudeScale = fNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dExtrudeObj::SetExtrudeDepth(double fNew)
+{
+ if(fExtrudeDepth != fNew)
+ {
+ fExtrudeDepth = fNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dExtrudeObj::SetExtrudeBackScale(double fNew)
+{
+ if(fExtrudeBackScale != fNew)
+ {
+ fExtrudeBackScale = fNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dExtrudeObj::SetExtrudePercentDiag(double fNew)
+{
+ if(fExtrudePercentDiag != fNew)
+ {
+ fExtrudePercentDiag = fNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dExtrudeObj::SetExtrudeSmoothed(BOOL bNew)
+{
+ if(bExtrudeSmoothed != bNew)
+ {
+ bExtrudeSmoothed = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dExtrudeObj::SetExtrudeSmoothFrontBack(BOOL bNew)
+{
+ if(bExtrudeSmoothFrontBack != bNew)
+ {
+ bExtrudeSmoothFrontBack = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dExtrudeObj::SetExtrudeCharacterMode(BOOL bNew)
+{
+ if(bExtrudeCharacterMode != bNew)
+ {
+ bExtrudeCharacterMode = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dExtrudeObj::SetExtrudeCloseFront(BOOL bNew)
+{
+ if(bExtrudeCloseFront != bNew)
+ {
+ bExtrudeCloseFront = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dExtrudeObj::SetExtrudeCloseBack(BOOL bNew)
+{
+ if(bExtrudeCloseBack != bNew)
+ {
+ bExtrudeCloseBack = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+void E3dExtrudeObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ // call parent
+ E3dCompoundObject::NbcSetAttributes(rAttr, bReplaceAll);
+
+ // special Attr for E3dExtrudeObj
+ const SfxPoolItem* pPoolItem = NULL;
+
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_PERCENT_DIAGONAL, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ SetExtrudePercentDiag((double)nNew / 200.0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_BACKSCALE, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ SetExtrudeBackScale((double)nNew / 100.0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_DEPTH, TRUE, &pPoolItem ) )
+ {
+ UINT32 nNew = ((const SfxUInt32Item*)pPoolItem)->GetValue();
+ SetExtrudeDepth((double)nNew);
+ }
+}
+
+/*************************************************************************
+|*
+|* Attribute lesen
+|*
+\************************************************************************/
+
+void E3dExtrudeObj::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+ // call parent
+ E3dCompoundObject::TakeAttributes(rAttr, bMerge, bOnlyHardAttr);
+
+ // special Attr for E3dExtrudeObj
+ const SfxPoolItem* pPoolItem = NULL;
+ SfxItemState eState;
+
+ UINT16 nObjPercentDiagonal = (UINT16)((GetExtrudePercentDiag() * 200.0) + 0.5);
+ UINT16 nObjBackScale = (UINT16)((GetExtrudeBackScale() * 100.0) + 0.5);
+ UINT32 nObjDeepth = (UINT32)(GetExtrudeDepth() + 0.5);
+
+ // PercentDiagonal
+ eState = rAttr.GetItemState(SID_ATTR_3D_PERCENT_DIAGONAL, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjPercentDiagonal != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_PERCENT_DIAGONAL);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_PERCENT_DIAGONAL, nObjPercentDiagonal));
+ }
+ }
+
+ // BackScale
+ eState = rAttr.GetItemState(SID_ATTR_3D_BACKSCALE, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjBackScale != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_BACKSCALE);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_BACKSCALE, nObjBackScale));
+ }
+ }
+
+ // ExtrudeDepth
+ eState = rAttr.GetItemState(SID_ATTR_3D_DEPTH, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjDeepth != ((const SfxUInt32Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_DEPTH);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt32Item(SID_ATTR_3D_DEPTH, nObjDeepth));
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+void E3dExtrudeObj::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulExtrude3d);
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+void E3dExtrudeObj::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralExtrude3d);
+}
+
+/*************************************************************************
+|*
+|* Aufbrechen
+|*
+\************************************************************************/
+
+BOOL E3dExtrudeObj::IsBreakObjPossible()
+{
+ return TRUE;
+}
+
+SdrAttrObj* E3dExtrudeObj::GetBreakObj()
+{
+ // create PathObj
+ XPolyPolygon aPoly = TransformToScreenCoor(GetBackSide(GetFrontSide()));
+ SdrPathObj* pPathObj = new SdrPathObj(OBJ_PLIN, aPoly);
+
+ if(pPathObj)
+ {
+ // set position ans size
+ Rectangle aNewPosSize(aPoly.GetBoundRect());
+ pPathObj->SetSnapRect(aNewPosSize);
+
+ // Objekt ggf. schliessen
+ BOOL bDistSmallerTen = FALSE;
+ for(UINT16 nCnt=0;nCnt<pPathObj->GetPathPoly().Count();nCnt++)
+ if(((XPolygon)(pPathObj->GetPathPoly()[0])).CalcDistance(0, pPathObj->GetPathPoly()[0].GetPointCount()-1) < 10)
+ bDistSmallerTen = TRUE;
+ if (!pPathObj->IsClosed() && bDistSmallerTen)
+ pPathObj->ToggleClosed(0);
+
+ // Attribute setzen
+ SfxItemSet aAttr(GetModel()->GetItemPool());
+ TakeAttributes(aAttr, TRUE, FALSE);
+
+ // Linien aktivieren, um Objekt garantiert sichtbar zu machen
+ aAttr.Put(XLineStyleItem (XLINE_SOLID));
+
+ pPathObj->NbcSetAttributes(aAttr, FALSE);
+ }
+
+ return pPathObj;
+}
+
+
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
new file mode 100644
index 0000000000..d3b4eea6b9
--- /dev/null
+++ b/svx/source/engine3d/float3d.cxx
@@ -0,0 +1,3594 @@
+/*************************************************************************
+ *
+ * $RCSfile: float3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#ifndef _SFXMODULE_HXX //autogen
+#include <sfx2/module.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SV_COLRDLG_HXX //autogen
+#include <svtools/colrdlg.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SFXVIEWSH_HXX //autogen
+#include <sfx2/viewsh.hxx>
+#endif
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX
+#include <xflclit.hxx>
+#endif
+#ifndef _SVDMODEL_HXX
+#include <svdmodel.hxx>
+#endif
+#ifndef _E3D_GLOBL3D_HXX
+#include <globl3d.hxx>
+#endif
+#ifndef _E3D_VIEW3D_HXX
+#include <view3d.hxx>
+#endif
+#ifndef _E3D_OBJ3D_HXX
+#include <obj3d.hxx>
+#endif
+#ifndef _E3D_SPHERE3D_HXX
+#include <sphere3d.hxx>
+#endif
+#ifndef _E3D_SCENE3D_HXX
+#include <scene3d.hxx>
+#endif
+#ifndef _CAMERA3D_HXX
+#include <camera3d.hxx>
+#endif
+#ifndef _SVX_FMMODEL_HXX
+#include <fmmodel.hxx>
+#endif
+#ifndef _SVX_FMPAGE_HXX
+#include <fmpage.hxx>
+#endif
+#ifndef _E3D_POLYSC3D_HXX
+#include <polysc3d.hxx>
+#endif
+#ifndef _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+#ifndef _SFXSTYLE_HXX
+#include <svtools/style.hxx>
+#endif
+
+
+#include <dlgutil.hxx>
+#include <dialmgr.hxx>
+#include <viewpt3d.hxx> // ProjectionType
+
+#include <svxids.hrc>
+#include <dialogs.hrc>
+
+#define ITEMID_COLOR SID_ATTR_3D_LIGHTCOLOR
+#include <colritem.hxx>
+#include <e3ditem.hxx>
+
+#include <gallery.hxx>
+#define GALLERY_THEME "3D"
+
+
+#include "float3d.hxx"
+#include "float3d.hrc"
+
+SFX_IMPL_DOCKINGWINDOW( Svx3DChildWindow, SID_3D_WIN )
+
+/*************************************************************************
+|* Svx3DWin - FloatingWindow
+\************************************************************************/
+__EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
+ SfxChildWindow *pCW, Window* pParent ) :
+ SfxDockingWindow ( pInBindings, pCW, pParent,
+ SVX_RES( RID_SVXFLOAT_3D ) ),
+ aBtnFavorites ( this, SVX_RES( BTN_FAVORITES ) ),
+ aBtnGeo ( this, SVX_RES( BTN_GEO ) ),
+ aBtnRepresentation ( this, SVX_RES( BTN_REPRESENTATION ) ),
+ aBtnLight ( this, SVX_RES( BTN_LIGHT ) ),
+ aBtnTexture ( this, SVX_RES( BTN_TEXTURE ) ),
+ aBtnMaterial ( this, SVX_RES( BTN_MATERIAL ) ),
+ aBtnUpdate ( this, SVX_RES( BTN_UPDATE ) ),
+ aBtnAssign ( this, SVX_RES( BTN_ASSIGN ) ),
+
+ // Favoriten
+ aCtlFavorites ( this, SVX_RES( CTL_FAVORITES ) ),
+ aGrpFavorites ( this, SVX_RES( GRP_FAVORITES ) ),
+ aBtnOnly3D ( this, SVX_RES( BTN_ONLY_3D ) ),
+ aBtnAllAttributes ( this, SVX_RES( BTN_ALL_ATTRIBUTES ) ),
+
+ // Geometrie
+ aFtHorizontal ( this, SVX_RES( FT_HORIZONTAL ) ),
+ aNumHorizontal ( this, SVX_RES( NUM_HORIZONTAL ) ),
+ aFtVertical ( this, SVX_RES( FT_VERTICAL ) ),
+ aNumVertical ( this, SVX_RES( NUM_VERTICAL ) ),
+ aGrpSegments ( this, SVX_RES( GRP_SEGMENTS ) ),
+ aFtPercentDiagonal ( this, SVX_RES( FT_PERCENT_DIAGONAL ) ),
+ aMtrPercentDiagonal ( this, SVX_RES( MTR_PERCENT_DIAGONAL ) ),
+ aFtBackscale ( this, SVX_RES( FT_BACKSCALE ) ),
+ aMtrBackscale ( this, SVX_RES( MTR_BACKSCALE ) ),
+ aFtEndAngle ( this, SVX_RES( FT_END_ANGLE ) ),
+ aMtrEndAngle ( this, SVX_RES( MTR_END_ANGLE ) ),
+ aFtDepth ( this, SVX_RES( FT_DEPTH ) ),
+ aMtrDepth ( this, SVX_RES( MTR_DEPTH ) ),
+ aGrpGeometrie ( this, SVX_RES( GRP_GEOMETRIE ) ),
+
+ aBtnNormalsObj ( this, SVX_RES( BTN_NORMALS_OBJ ) ),
+ aBtnNormalsFlat ( this, SVX_RES( BTN_NORMALS_FLAT ) ),
+ aBtnNormalsSphere ( this, SVX_RES( BTN_NORMALS_SPHERE ) ),
+ aBtnTwoSidedLighting( this, SVX_RES( BTN_TWO_SIDED_LIGHTING ) ),
+ aBtnNormalsInvert ( this, SVX_RES( BTN_NORMALS_INVERT ) ),
+ aGrpNormals ( this, SVX_RES( GRP_NORMALS ) ),
+
+ aBtnDoubleSided ( this, SVX_RES( BTN_DOUBLE_SIDED ) ),
+
+ // Darstellung
+ aFtShademode ( this, SVX_RES( FT_SHADEMODE ) ),
+ aLbShademode ( this, SVX_RES( LB_SHADEMODE ) ),
+ aBtnShadow3d ( this, SVX_RES( BTN_SHADOW_3D ) ),
+ aFtSlant ( this, SVX_RES( FT_SLANT ) ),
+ aMtrSlant ( this, SVX_RES( MTR_SLANT ) ),
+ aGrpShadow ( this, SVX_RES( GRP_SHADOW ) ),
+ aFtDistance ( this, SVX_RES( FT_DISTANCE ) ),
+ aMtrDistance ( this, SVX_RES( MTR_DISTANCE ) ),
+ aFtFocalLeng ( this, SVX_RES( FT_FOCAL_LENGTH ) ),
+ aMtrFocalLength ( this, SVX_RES( MTR_FOCAL_LENGTH ) ),
+ aGrpCamera ( this, SVX_RES( GRP_CAMERA ) ),
+ aGrpRepresentation ( this, SVX_RES( GRP_REPRESENTATION ) ),
+
+ // Beleuchtung
+ aBtnLight1 ( this, SVX_RES( BTN_LIGHT_1 ) ),
+ aBtnLight2 ( this, SVX_RES( BTN_LIGHT_2 ) ),
+ aBtnLight3 ( this, SVX_RES( BTN_LIGHT_3 ) ),
+ aBtnLight4 ( this, SVX_RES( BTN_LIGHT_4 ) ),
+ aBtnLight5 ( this, SVX_RES( BTN_LIGHT_5 ) ),
+ aBtnLight6 ( this, SVX_RES( BTN_LIGHT_6 ) ),
+ aBtnLight7 ( this, SVX_RES( BTN_LIGHT_7 ) ),
+ aBtnLight8 ( this, SVX_RES( BTN_LIGHT_8 ) ),
+ aLbLight1 ( this, SVX_RES( LB_LIGHT_1 ) ),
+ aLbLight2 ( this, SVX_RES( LB_LIGHT_2 ) ),
+ aLbLight3 ( this, SVX_RES( LB_LIGHT_3 ) ),
+ aLbLight4 ( this, SVX_RES( LB_LIGHT_4 ) ),
+ aLbLight5 ( this, SVX_RES( LB_LIGHT_5 ) ),
+ aLbLight6 ( this, SVX_RES( LB_LIGHT_6 ) ),
+ aLbLight7 ( this, SVX_RES( LB_LIGHT_7 ) ),
+ aLbLight8 ( this, SVX_RES( LB_LIGHT_8 ) ),
+ aBtnLightColor ( this, SVX_RES( BTN_LIGHT_COLOR ) ),
+ aGrpLightsource ( this, SVX_RES( GRP_LIGHTSOURCE ) ),
+ aLbAmbientlight ( this, SVX_RES( LB_AMBIENTLIGHT ) ),
+ aBtnAmbientColor ( this, SVX_RES( BTN_AMBIENT_COLOR ) ),
+ aGrpAmbientlight ( this, SVX_RES( GRP_AMBIENTLIGHT ) ),
+ aGrpLight ( this, SVX_RES( GRP_LIGHT ) ),
+ aFtLightX ( this, SVX_RES( FT_LIGHT_X ) ),
+ aFtLightY ( this, SVX_RES( FT_LIGHT_Y ) ),
+ aFtLightZ ( this, SVX_RES( FT_LIGHT_Z ) ),
+ aGrpLightInfo ( this, SVX_RES( GRP_LIGHT_INFO ) ),
+
+ // Texturen
+ aFtTexKind ( this, SVX_RES( FT_TEX_KIND ) ),
+ aBtnTexLuminance ( this, SVX_RES( BTN_TEX_LUMINANCE ) ),
+ aBtnTexColor ( this, SVX_RES( BTN_TEX_COLOR ) ),
+ aFtTexMode ( this, SVX_RES( FT_TEX_MODE ) ),
+ aBtnTexReplace ( this, SVX_RES( BTN_TEX_REPLACE ) ),
+ aBtnTexModulate ( this, SVX_RES( BTN_TEX_MODULATE ) ),
+ aBtnTexBlend ( this, SVX_RES( BTN_TEX_BLEND ) ),
+ aFtTexProjectionX ( this, SVX_RES( FT_TEX_PROJECTION_X ) ),
+ aBtnTexParallelX ( this, SVX_RES( BTN_TEX_PARALLEL_X ) ),
+ aBtnTexCircleX ( this, SVX_RES( BTN_TEX_CIRCLE_X ) ),
+ aBtnTexObjectX ( this, SVX_RES( BTN_TEX_OBJECT_X ) ),
+ aFtTexProjectionY ( this, SVX_RES( FT_TEX_PROJECTION_Y ) ),
+ aBtnTexParallelY ( this, SVX_RES( BTN_TEX_PARALLEL_Y ) ),
+ aBtnTexCircleY ( this, SVX_RES( BTN_TEX_CIRCLE_Y ) ),
+ aBtnTexObjectY ( this, SVX_RES( BTN_TEX_OBJECT_Y ) ),
+ aFtTexFilter ( this, SVX_RES( FT_TEX_FILTER ) ),
+ aBtnTexFilter ( this, SVX_RES( BTN_TEX_FILTER ) ),
+ aGrpTexture ( this, SVX_RES( GRP_TEXTURE ) ),
+
+ // Material
+ aFtMatFavorites ( this, SVX_RES( FT_MAT_FAVORITES ) ),
+ aLbMatFavorites ( this, SVX_RES( LB_MAT_FAVORITES ) ),
+ aFtMatColor ( this, SVX_RES( FT_MAT_COLOR ) ),
+ aLbMatColor ( this, SVX_RES( LB_MAT_COLOR ) ),
+ aBtnMatColor ( this, SVX_RES( BTN_MAT_COLOR ) ),
+ aFtMatEmission ( this, SVX_RES( FT_MAT_EMISSION ) ),
+ aLbMatEmission ( this, SVX_RES( LB_MAT_EMISSION ) ),
+ aBtnEmissionColor ( this, SVX_RES( BTN_EMISSION_COLOR ) ),
+ aFtMatSpecular ( this, SVX_RES( FT_MAT_SPECULAR ) ),
+ aLbMatSpecular ( this, SVX_RES( LB_MAT_SPECULAR ) ),
+ aBtnSpecularColor ( this, SVX_RES( BTN_SPECULAR_COLOR ) ),
+ aFtMatSpecularIntensity( this, SVX_RES( FT_MAT_SPECULAR_INTENSITY ) ),
+ aMtrMatSpecularIntensity( this, SVX_RES( MTR_MAT_SPECULAR_INTENSITY ) ),
+ aGrpMatSpecular ( this, SVX_RES( GRP_MAT_SPECULAR ) ),
+ aGrpMaterial ( this, SVX_RES( GRP_MATERIAL ) ),
+
+ // Unterer Bereich
+ aBtnPerspective ( this, SVX_RES( BTN_PERSPECTIVE ) ),
+ aBtnConvertTo3D ( this, SVX_RES( BTN_CHANGE_TO_3D ) ),
+ aBtnLatheObject ( this, SVX_RES( BTN_LATHE_OBJ ) ),
+ aCtlPreview ( this, SVX_RES( CTL_PREVIEW ) ),
+ aCtlLightPreview ( this, SVX_RES( CTL_LIGHT_PREVIEW ) ),
+ aGrpPreview ( this, SVX_RES( GRP_PREVIEW ) ),
+
+ aImgLightOn ( SVX_RES( RID_SVXIMAGE_LIGHT_ON ) ),
+ aImgLightOff ( SVX_RES( RID_SVXIMAGE_LIGHT_OFF ) ),
+
+ pLightGroup ( NULL ),
+ bUpdate ( FALSE ),
+ eViewType ( VIEWTYPE_FAVORITES ),
+
+ pModel ( NULL ),
+ pFmPage ( NULL ),
+ pVDev ( NULL ),
+ p3DView ( NULL ),
+ pFavorSetList ( NULL ),
+ pMatFavSetList ( NULL ),
+
+ pBindings ( pInBindings ),
+ pPool ( NULL ),
+ bOnly3DChanged ( FALSE )
+{
+ FreeResource();
+
+ // Metrik einstellen
+ GET_MODULE_FIELDUNIT( eFUnit );
+ aMtrDepth.SetUnit( eFUnit );
+ aMtrDistance.SetUnit( eFUnit );
+ aMtrFocalLength.SetUnit( eFUnit );
+
+ pControllerItem = new Svx3DCtrlItem(SID_3D_STATE, this, pBindings);
+ pConvertTo3DItem = new SvxConvertTo3DItem(SID_CONVERT_TO_3D, pBindings);
+ pConvertTo3DLatheItem = new SvxConvertTo3DItem(SID_CONVERT_TO_3D_LATHE_FAST, pBindings);
+
+ aBtnAssign.SetClickHdl( LINK( this, Svx3DWin, ClickAssignHdl ) );
+ aBtnUpdate.SetClickHdl( LINK( this, Svx3DWin, ClickUpdateHdl ) );
+
+ Link aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) );
+ aBtnFavorites.SetClickHdl( aLink );
+ aBtnGeo.SetClickHdl( aLink );
+ aBtnRepresentation.SetClickHdl( aLink );
+ aBtnLight.SetClickHdl( aLink );
+ aBtnTexture.SetClickHdl( aLink );
+ aBtnMaterial.SetClickHdl( aLink );
+
+ aLink = LINK( this, Svx3DWin, ClickHdl );
+ aBtnPerspective.SetClickHdl( aLink );
+ aBtnConvertTo3D.SetClickHdl( aLink );
+ aBtnLatheObject.SetClickHdl( aLink );
+
+ aBtnOnly3D.SetClickHdl( aLink );
+ aBtnAllAttributes.SetClickHdl( aLink );
+
+ // Geometrie
+ aBtnNormalsObj.SetClickHdl( aLink );
+ aBtnNormalsFlat.SetClickHdl( aLink );
+ aBtnNormalsSphere.SetClickHdl( aLink );
+ aBtnTwoSidedLighting.SetClickHdl( aLink );
+ aBtnNormalsInvert.SetClickHdl( aLink );
+ aBtnDoubleSided.SetClickHdl( aLink );
+
+ // Darstellung
+ aBtnShadow3d.SetClickHdl( aLink );
+
+ // Beleuchtung
+ aBtnLight1.SetClickHdl( aLink );
+ aBtnLight2.SetClickHdl( aLink );
+ aBtnLight3.SetClickHdl( aLink );
+ aBtnLight4.SetClickHdl( aLink );
+ aBtnLight5.SetClickHdl( aLink );
+ aBtnLight6.SetClickHdl( aLink );
+ aBtnLight7.SetClickHdl( aLink );
+ aBtnLight8.SetClickHdl( aLink );
+
+ // Texturen
+ aBtnTexLuminance.SetClickHdl( aLink );
+ aBtnTexColor.SetClickHdl( aLink );
+ aBtnTexReplace.SetClickHdl( aLink );
+ aBtnTexModulate.SetClickHdl( aLink );
+ //aBtnTexBlend.SetClickHdl( aLink );
+ aBtnTexParallelX.SetClickHdl( aLink );
+ aBtnTexCircleX.SetClickHdl( aLink );
+ aBtnTexObjectX.SetClickHdl( aLink );
+ aBtnTexParallelY.SetClickHdl( aLink );
+ aBtnTexCircleY.SetClickHdl( aLink );
+ aBtnTexObjectY.SetClickHdl( aLink );
+ aBtnTexFilter.SetClickHdl( aLink );
+
+ // Material
+ aLink = LINK( this, Svx3DWin, ClickColorHdl );
+ aBtnLightColor.SetClickHdl( aLink );
+ aBtnAmbientColor.SetClickHdl( aLink );
+ aBtnMatColor.SetClickHdl( aLink );
+ aBtnEmissionColor.SetClickHdl( aLink );
+ aBtnSpecularColor.SetClickHdl( aLink );
+
+
+ aLink = LINK( this, Svx3DWin, SelectHdl );
+ aLbMatFavorites.SetSelectHdl( aLink );
+ aLbMatColor.SetSelectHdl( aLink );
+ aLbMatEmission.SetSelectHdl( aLink );
+ aLbMatSpecular.SetSelectHdl( aLink );
+ aLbLight1.SetSelectHdl( aLink );
+ aLbLight2.SetSelectHdl( aLink );
+ aLbLight3.SetSelectHdl( aLink );
+ aLbLight4.SetSelectHdl( aLink );
+ aLbLight5.SetSelectHdl( aLink );
+ aLbLight6.SetSelectHdl( aLink );
+ aLbLight7.SetSelectHdl( aLink );
+ aLbLight8.SetSelectHdl( aLink );
+ aLbAmbientlight.SetSelectHdl( aLink );
+ aLbShademode.SetSelectHdl( aLink );
+
+ aLink = LINK( this, Svx3DWin, ModifyHdl );
+ aMtrMatSpecularIntensity.SetModifyHdl( aLink );
+ aNumHorizontal.SetModifyHdl( aLink );
+ aNumVertical.SetModifyHdl( aLink );
+ aMtrSlant.SetModifyHdl( aLink );
+
+ aLink = LINK( this, Svx3DWin, DoubleClickHdl );
+ aCtlFavorites.SetDoubleClickHdl( aLink );
+
+ aLink = LINK( this, Svx3DWin, ClickFavoriteHdl );
+ aCtlFavorites.SetSelectHdl( aLink );
+
+ // Preview-Callback
+ aLink = LINK( this, Svx3DWin, ChangeLightCallbackHdl );
+ aCtlLightPreview.SetUserInteractiveChangeCallback( aLink );
+ aLink = LINK( this, Svx3DWin, ChangeSelectionCallbackHdl );
+ aCtlLightPreview.SetUserSelectionChangeCallback( aLink );
+
+ aSize = GetOutputSizePixel();
+ SetMinOutputSizePixel( aSize );
+
+ Construct();
+
+ // Initiierung der Initialisierung der ColorLBs
+ SfxBoolItem aItem( SID_3D_INIT, TRUE );
+ SFX_DISPATCHER().Execute( SID_3D_INIT, SFX_CALLMODE_ASYNCHRON |
+ SFX_CALLMODE_RECORD, &aItem, 0L );
+
+ Reset();
+}
+
+// -----------------------------------------------------------------------
+__EXPORT Svx3DWin::~Svx3DWin()
+{
+ // ListenSets loeschen
+ /*
+ if( pFavorSetList ) // sollte nicht NULL sein
+ {
+ SfxItemSet* pSet;
+ for( pSet = (SfxItemSet*) pFavorSetList->First();
+ pSet;
+ pSet = (SfxItemSet*) pFavorSetList->Next() )
+ {
+ delete pSet;
+ }
+ delete pFavorSetList;
+ }
+ */
+
+ //delete pMatFavSetList;
+ delete p3DView;
+ delete pVDev;
+ delete pModel;
+
+ delete pControllerItem;
+ delete pConvertTo3DItem;
+ delete pConvertTo3DLatheItem;
+
+ delete pLightGroup;
+}
+
+// -----------------------------------------------------------------------
+void Svx3DWin::Construct()
+{
+ // Ueber die Gallery werden die Favoriten eingelesen
+ ULONG nFavCount = GalleryExplorer::GetSdrObjCount( GALLERY_THEME_3D );
+
+ // ValueSet Favoriten
+ WinBits nWinBits = aCtlFavorites.GetStyle();
+ nWinBits |= WB_ITEMBORDER | WB_DOUBLEBORDER; //| WB_NAMEFIELD
+ if( nFavCount > 6 )
+ nWinBits |= WB_VSCROLL;
+
+ aCtlFavorites.SetStyle( nWinBits );
+ aCtlFavorites.SetColCount( 3 );
+ aCtlFavorites.SetLineCount( 2 );
+ aCtlFavorites.SetExtraSpacing( 1 );
+
+ // Listen erzeugen
+// pFavorSetList = new List();
+// SfxItemSet* pSet;
+
+ // Gallery thema locken
+ GalleryExplorer::BeginLocking(GALLERY_THEME_3D);
+
+ for( ULONG nModelPos = 0; nModelPos < nFavCount; nModelPos++ )
+ {
+ Bitmap aThumb;
+ Size aNewSize( 60, 60 );
+
+ if( GalleryExplorer::GetSdrObj( GALLERY_THEME_3D, nModelPos,
+ pModel, &aThumb ) )
+ {
+ // ValueSet fuellen
+ Size aOldSize = Size( aThumb.GetSizePixel() );
+ aThumb.Scale( (double) aNewSize.Width() / aOldSize.Width(),
+ (double) aNewSize.Height() / aOldSize.Height() );
+
+ String aStr(SVX_RES(RID_SVXFLOAT3D_FAVORITE));
+ aStr += sal_Unicode(' ');
+ aStr += String::CreateFromInt32((INT32)nModelPos + 1L);
+
+ aCtlFavorites.InsertItem( (USHORT)nModelPos+1, aThumb, aStr );
+ }
+ }
+
+ // Gallery thema freigeben
+ GalleryExplorer::EndLocking(GALLERY_THEME_3D);
+
+ if( nFavCount == 0 )
+ {
+ // Keine Favoriten vorhanden
+ eViewType = VIEWTYPE_GEO;
+ }
+
+ aCtlLightPreview.Hide();
+ pLightGroup = new B3dLightGroup();
+ *pLightGroup = *aCtlLightPreview.GetPreviewControl().GetLightGroup();
+}
+
+// -----------------------------------------------------------------------
+void Svx3DWin::Reset()
+{
+ // Diverse Initialisierungen, default ist AllAttributes
+ aBtnAllAttributes.Check();
+ aLbMatFavorites.SelectEntryPos( 0 ); // UserDefined
+
+ if( eViewType == VIEWTYPE_FAVORITES )
+ ClickViewTypeHdl( &aBtnFavorites );
+ else
+ {
+ ClickViewTypeHdl( &aBtnGeo );
+ aBtnFavorites.Enable( FALSE );
+ }
+
+ aLbShademode.SelectEntryPos( 0 );
+ aMtrMatSpecularIntensity.SetValue( 50 );
+
+ aBtnLight1.Check();
+// ClickHdl( &aBtnLight1 );
+
+ ClickUpdateHdl( NULL );
+
+ // Nichts selektieren, um Fehler beim erstselektieren zu vermeiden
+ aCtlLightPreview.GetPreviewControl().SelectLight(Base3DLight0);
+}
+
+// -----------------------------------------------------------------------
+void Svx3DWin::Update( SfxItemSet& rAttrs )
+{
+ const SfxPoolItem* pItem;
+ BOOL bUpdate = FALSE;
+
+ // evtl. PoolUnit ermitteln
+ if( !pPool )
+ {
+ pPool = rAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool?" );
+ ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH );
+ }
+ GET_MODULE_FIELDUNIT( eFUnit );
+
+
+// Segmentanzahl aenderbar ? und andere Stati
+ SfxItemState eState = rAttrs.GetItemState( SID_ATTR_3D_INTERN, FALSE, &pItem );
+ if( SFX_ITEM_SET == eState )
+ {
+ UINT32 nState = ( ( const SfxUInt32Item* )pItem )->GetValue();
+ BOOL bLathe = (BOOL) ( nState & 1 );
+ BOOL bExtrude = (BOOL) ( nState & 2 );
+ BOOL bSphere = (BOOL) ( nState & 4 );
+ BOOL bCube = (BOOL) ( nState & 8 );
+ BOOL bNothing = (BOOL) ( nState & 16 ); // Keine Objekte in der Scene
+
+ BOOL bChart = (BOOL) ( nState & 32 ); // Chart
+
+ if( !bChart )
+ {
+ // Bei Cube-Objekten werden keine Segmente eingestellt
+ aFtHorizontal.Enable( !bCube );
+ aNumHorizontal.Enable( !bCube );
+ aFtVertical.Enable( !bCube );
+ aNumVertical.Enable( !bCube );
+ aGrpSegments.Enable( !bCube );
+
+ aFtPercentDiagonal.Enable( !bCube && !bSphere );
+ aMtrPercentDiagonal.Enable( !bCube && !bSphere );
+ aFtBackscale.Enable( !bCube && !bSphere );
+ aMtrBackscale.Enable( !bCube && !bSphere );
+ aFtDepth.Enable( !bCube && !bSphere );
+ aMtrDepth.Enable( !bCube && !bSphere );
+ if( bCube )
+ {
+ aNumHorizontal.SetEmptyFieldValue();
+ aNumVertical.SetEmptyFieldValue();
+ }
+ if( bCube || bSphere )
+ {
+ aMtrPercentDiagonal.SetEmptyFieldValue();
+ aMtrBackscale.SetEmptyFieldValue();
+ aMtrDepth.SetEmptyFieldValue();
+ }
+
+ // Nur bei Lathe-Objekten gibt es einen Endwinkel
+ aFtEndAngle.Enable( !bExtrude && !bCube && !bSphere );
+ aMtrEndAngle.Enable( !bExtrude && !bCube && !bSphere );
+ if( bExtrude || bCube || bSphere )
+ aMtrEndAngle.SetEmptyFieldValue();
+
+ // Sind keine Objekte selektiert
+ //aBtnConvertTo3D.Enable( !bNothing );
+ //aBtnLatheObject.Enable( !bNothing );
+ }
+ else
+ {
+ // Geometrie
+ aFtHorizontal.Enable( FALSE );
+ aNumHorizontal.Enable( FALSE );
+ aNumHorizontal.SetEmptyFieldValue();
+ aFtVertical.Enable( FALSE );
+ aNumVertical.Enable( FALSE );
+ aNumVertical.SetEmptyFieldValue();
+ aGrpSegments.Enable( FALSE );
+ aFtEndAngle.Enable( FALSE );
+ aMtrEndAngle.Enable( FALSE );
+ aMtrEndAngle.SetEmptyFieldValue();
+ aFtDepth.Enable( FALSE );
+ aMtrDepth.Enable( FALSE );
+ aMtrDepth.SetEmptyFieldValue();
+
+ // Darstellung
+ aBtnShadow3d.Enable( FALSE );
+ aFtSlant.Enable( FALSE );
+ aMtrSlant.Enable( FALSE );
+ aGrpShadow.Enable( FALSE );
+
+ aFtDistance.Enable( FALSE );
+ aMtrDistance.Enable( FALSE );
+ aMtrDistance.SetEmptyFieldValue();
+ aFtFocalLeng.Enable( FALSE );
+ aMtrFocalLength.Enable( FALSE );
+ aMtrFocalLength.SetEmptyFieldValue();
+ aGrpCamera.Enable( FALSE );
+
+ // Unterer Bereich
+ aBtnConvertTo3D.Enable( FALSE );
+ aBtnLatheObject.Enable( FALSE );
+ }
+ }
+// Bitmapfuellung ? -> Status
+ BOOL bBitmap = FALSE;
+ if( SFX_ITEM_SET == rAttrs.GetItemState( XATTR_FILLSTYLE, FALSE, &pItem ) )
+ {
+ XFillStyle eXFS = (XFillStyle) ( ( const XFillStyleItem* )pItem )->GetValue();
+ if( eXFS == XFILL_BITMAP
+ || eXFS == XFILL_GRADIENT
+ || eXFS == XFILL_HATCH)
+ bBitmap = TRUE;
+ }
+ aFtTexKind.Enable( bBitmap );
+ aBtnTexLuminance.Enable( bBitmap );
+ aBtnTexColor.Enable( bBitmap );
+ aFtTexMode.Enable( bBitmap );
+ aBtnTexReplace.Enable( bBitmap );
+ aBtnTexModulate.Enable( bBitmap );
+ aBtnTexBlend.Enable( bBitmap );
+ aFtTexProjectionX.Enable( bBitmap );
+ aBtnTexParallelX.Enable( bBitmap );
+ aBtnTexCircleX.Enable( bBitmap );
+ aBtnTexObjectX.Enable( bBitmap );
+ aFtTexProjectionY.Enable( bBitmap );
+ aBtnTexParallelY.Enable( bBitmap );
+ aBtnTexCircleY.Enable( bBitmap );
+ aBtnTexObjectY.Enable( bBitmap );
+ aFtTexFilter.Enable( bBitmap );
+ aBtnTexFilter.Enable( bBitmap );
+ aGrpTexture.Enable( bBitmap );
+
+
+// Geometrie
+ // Anzahl Segmente (horizontal)
+ if( aNumHorizontal.IsEnabled() )
+ {
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_HORZ_SEGS, FALSE, &pItem ) )
+ {
+ UINT32 nValue = ( ( const SfxUInt32Item* )pItem )->GetValue();
+ if( nValue != (UINT32) aNumHorizontal.GetValue() )
+ {
+ aNumHorizontal.SetValue( nValue );
+ // evtl. am Ende...
+ aCtlLightPreview.GetPreviewControl().SetHorizontalSegments( (UINT16)nValue );
+ bUpdate = TRUE;
+ }
+ else if( aNumHorizontal.IsEmptyFieldValue() )
+ aNumHorizontal.SetValue( nValue );
+ }
+ else
+ {
+ if( !aNumHorizontal.IsEmptyFieldValue() )
+ {
+ aNumHorizontal.SetEmptyFieldValue();
+ bUpdate = TRUE;
+ }
+ }
+ }
+
+ // Anzahl Segmente (vertikal)
+ if( aNumVertical.IsEnabled() )
+ {
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_VERT_SEGS, FALSE, &pItem ) )
+ {
+ UINT32 nValue = ( ( const SfxUInt32Item* )pItem )->GetValue();
+ if( nValue != (UINT32) aNumVertical.GetValue() )
+ {
+ aNumVertical.SetValue( nValue );
+ // evtl. am Ende...
+ aCtlLightPreview.GetPreviewControl().SetVerticalSegments( (UINT16)nValue );
+ //aCtlPreview.SetVerticalSegments( (UINT16)nValue );
+ bUpdate = TRUE;
+ }
+ else if( aNumVertical.IsEmptyFieldValue() )
+ aNumVertical.SetValue( nValue );
+ }
+ else
+ {
+ if( !aNumVertical.IsEmptyFieldValue() )
+ {
+ aNumVertical.SetEmptyFieldValue();
+ bUpdate = TRUE;
+ }
+ }
+ }
+
+ // Tiefe
+ if( aMtrDepth.IsEnabled() )
+ {
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_DEPTH, FALSE, &pItem ) )
+ {
+ UINT32 nValue = ( ( const SfxUInt32Item* )pItem )->GetValue();
+ UINT32 nValue2 = GetCoreValue( aMtrDepth, ePoolUnit );
+ if( nValue != nValue2 )
+ {
+ if( eFUnit != aMtrDepth.GetUnit() )
+ SetFieldUnit( aMtrDepth, eFUnit );
+
+ SetMetricValue( aMtrDepth, nValue, ePoolUnit );
+ bUpdate = TRUE;
+ }
+ else if( aMtrDepth.IsEmptyFieldValue() )
+ aMtrDepth.SetValue( aMtrDepth.GetValue() );
+ }
+ else
+ {
+ if( !aMtrDepth.IsEmptyFieldValue() )
+ {
+ aMtrDepth.SetEmptyFieldValue();
+ bUpdate = TRUE;
+ }
+ }
+ }
+
+ // Doppelwandig/-seitig
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_DOUBLE_SIDED, FALSE, &pItem ) )
+ {
+ BOOL bValue = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( bValue != aBtnDoubleSided.IsChecked() )
+ {
+ aBtnDoubleSided.Check( bValue );
+ bUpdate = TRUE;
+ }
+ else if( aBtnDoubleSided.GetState() == STATE_DONTKNOW )
+ aBtnDoubleSided.Check( bValue );
+ }
+ else
+ {
+ if( aBtnDoubleSided.GetState() != STATE_DONTKNOW )
+ {
+ aBtnDoubleSided.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Kantenrundung
+ if( aMtrPercentDiagonal.IsEnabled() )
+ {
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_PERCENT_DIAGONAL, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+ if( nValue != aMtrPercentDiagonal.GetValue() )
+ {
+ aMtrPercentDiagonal.SetValue( nValue );
+ bUpdate = TRUE;
+ }
+ else if( aMtrPercentDiagonal.IsEmptyFieldValue() )
+ aMtrPercentDiagonal.SetValue( nValue );
+ }
+ else
+ {
+ if( !aMtrPercentDiagonal.IsEmptyFieldValue() )
+ {
+ aMtrPercentDiagonal.SetEmptyFieldValue();
+ bUpdate = TRUE;
+ }
+ }
+ }
+
+ // Tiefenskalierung
+ if( aMtrBackscale.IsEnabled() )
+ {
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_BACKSCALE, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+ if( nValue != aMtrBackscale.GetValue() )
+ {
+ aMtrBackscale.SetValue( nValue );
+ bUpdate = TRUE;
+ }
+ else if( aMtrBackscale.IsEmptyFieldValue() )
+ aMtrBackscale.SetValue( nValue );
+ }
+ else
+ {
+ if( !aMtrBackscale.IsEmptyFieldValue() )
+ {
+ aMtrBackscale.SetEmptyFieldValue();
+ bUpdate = TRUE;
+ }
+ }
+ }
+
+ // Endwinkel
+ if( aMtrEndAngle.IsEnabled() )
+ {
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_END_ANGLE, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+ if( nValue != aMtrEndAngle.GetValue() )
+ {
+ aMtrEndAngle.SetValue( nValue );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( !aMtrEndAngle.IsEmptyFieldValue() )
+ {
+ aMtrEndAngle.SetEmptyFieldValue();
+ bUpdate = TRUE;
+ }
+ }
+ }
+
+ // Normalentyp
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_NORMALS_KIND, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+
+ if( ( !aBtnNormalsObj.IsChecked() && nValue == 0 ) ||
+ ( !aBtnNormalsFlat.IsChecked() && nValue == 1 ) ||
+ ( !aBtnNormalsSphere.IsChecked() && nValue == 2 ) )
+ {
+ aBtnNormalsObj.Check( nValue == 0 );
+ aBtnNormalsFlat.Check( nValue == 1 );
+ aBtnNormalsSphere.Check( nValue == 2 );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aBtnNormalsObj.IsChecked() ||
+ aBtnNormalsFlat.IsChecked() ||
+ aBtnNormalsSphere.IsChecked() )
+ {
+ aBtnNormalsObj.Check( FALSE );
+ aBtnNormalsFlat.Check( FALSE );
+ aBtnNormalsSphere.Check( FALSE );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Normalen invertieren
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_NORMALS_INVERT, FALSE, &pItem ) )
+ {
+ BOOL bValue = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( bValue != aBtnNormalsInvert.IsChecked() )
+ {
+ aBtnNormalsInvert.Check( bValue );
+ bUpdate = TRUE;
+ }
+ else if( aBtnNormalsInvert.GetState() == STATE_DONTKNOW )
+ aBtnNormalsInvert.Check( bValue );
+ }
+ else
+ {
+ if( aBtnNormalsInvert.GetState() != STATE_DONTKNOW )
+ {
+ aBtnNormalsInvert.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+
+ // 2-seitige Beleuchtung
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_TWO_SIDED_LIGHTING, FALSE, &pItem ) )
+ {
+ BOOL bValue = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( bValue != aBtnTwoSidedLighting.IsChecked() )
+ {
+ aBtnTwoSidedLighting.Check( bValue );
+ bUpdate = TRUE;
+ }
+ else if( aBtnTwoSidedLighting.GetState() == STATE_DONTKNOW )
+ aBtnTwoSidedLighting.Check( bValue );
+ }
+ else
+ {
+ if( aBtnTwoSidedLighting.GetState() != STATE_DONTKNOW )
+ {
+ aBtnTwoSidedLighting.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+
+// Darstellung
+ // Shademode
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_SHADE_MODE, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+ if( nValue != aLbShademode.GetSelectEntryPos() )
+ {
+ aLbShademode.SelectEntryPos( nValue );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbShademode.GetSelectEntryCount() != 0 )
+ {
+ aLbShademode.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+
+ // 3D-Shatten
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_SHADOW_3D, FALSE, &pItem ) )
+ {
+ BOOL bValue = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( bValue != aBtnShadow3d.IsChecked() )
+ {
+ aBtnShadow3d.Check( bValue );
+ aFtSlant.Enable( bValue );
+ aMtrSlant.Enable( bValue );
+ bUpdate = TRUE;
+ }
+ else if( aBtnShadow3d.GetState() == STATE_DONTKNOW )
+ aBtnShadow3d.Check( bValue );
+ }
+ else
+ {
+ if( aBtnShadow3d.GetState() != STATE_DONTKNOW )
+ {
+ aBtnShadow3d.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Neigung (Schatten)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_SHADOW_SLANT, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+ if( nValue != aMtrSlant.GetValue() )
+ {
+ aMtrSlant.SetValue( nValue );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( !aMtrSlant.IsEmptyFieldValue() )
+ {
+ aMtrSlant.SetEmptyFieldValue();
+ bUpdate = TRUE;
+ }
+ }
+
+ // Distanz
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_DISTANCE, FALSE, &pItem ) )
+ {
+ UINT32 nValue = ( ( const SfxUInt32Item* )pItem )->GetValue();
+ UINT32 nValue2 = GetCoreValue( aMtrDistance, ePoolUnit );
+ if( nValue != nValue2 )
+ {
+ if( eFUnit != aMtrDistance.GetUnit() )
+ SetFieldUnit( aMtrDistance, eFUnit );
+
+ SetMetricValue( aMtrDistance, nValue, ePoolUnit );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( !aMtrDepth.IsEmptyFieldValue() )
+ {
+ aMtrDepth.SetEmptyFieldValue();
+ bUpdate = TRUE;
+ }
+ }
+
+ // Brennweite
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_FOCAL_LENGTH, FALSE, &pItem ) )
+ {
+ UINT32 nValue = ( ( const SfxUInt32Item* )pItem )->GetValue();
+ UINT32 nValue2 = GetCoreValue( aMtrFocalLength, ePoolUnit );
+ if( nValue != nValue2 )
+ {
+ if( eFUnit != aMtrFocalLength.GetUnit() )
+ SetFieldUnit( aMtrFocalLength, eFUnit );
+
+ SetMetricValue( aMtrFocalLength, nValue, ePoolUnit );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( !aMtrFocalLength.IsEmptyFieldValue() )
+ {
+ aMtrFocalLength.SetEmptyFieldValue();
+ bUpdate = TRUE;
+ }
+ }
+
+// Beleuchtung
+ Color aColor;
+ Vector3D aVector;
+ // Licht 1 (Farbe)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTCOLOR_1, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ ColorLB* pLb = &aLbLight1;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+
+ pLightGroup->SetIntensity( aColor, Base3DMaterialDiffuse, Base3DLight0 );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbLight1.GetSelectEntryCount() != 0 )
+ {
+ aLbLight1.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 1 (an/aus)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTON_1, FALSE, &pItem ) )
+ {
+ BOOL bOn = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( ( bOn && aBtnLight1.GetImage() != aImgLightOn ) ||
+ ( !bOn && aBtnLight1.GetImage() != aImgLightOff ) )
+ {
+ aBtnLight1.SetImage( bOn ? aImgLightOn : aImgLightOff );
+ pLightGroup->Enable( bOn, Base3DLight0 );
+ bUpdate = TRUE;
+ }
+ if( aBtnLight1.GetState() == STATE_DONTKNOW )
+ aBtnLight1.Check( aBtnLight1.IsChecked() );
+ }
+ else
+ {
+ if( aBtnLight1.GetState() != STATE_DONTKNOW )
+ {
+ aBtnLight1.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 1 (Richtung)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTDIRECTION_1, FALSE, &pItem ) )
+ {
+ aVector = ( ( const SvxVector3DItem* )pItem )->GetValue();
+ Vector3D aVector2 = pLightGroup->GetDirection( Base3DLight0 );
+ if( aVector != aVector2 )
+ {
+ pLightGroup->SetDirection( aVector, Base3DLight0 );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Licht 2 (Farbe)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTCOLOR_2, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ ColorLB* pLb = &aLbLight2;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+
+ pLightGroup->SetIntensity( aColor, Base3DMaterialDiffuse, Base3DLight1 );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbLight2.GetSelectEntryCount() != 0 )
+ {
+ aLbLight2.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 2 (an/aus)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTON_2, FALSE, &pItem ) )
+ {
+ BOOL bOn = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( ( bOn && aBtnLight2.GetImage() != aImgLightOn ) ||
+ ( !bOn && aBtnLight2.GetImage() != aImgLightOff ) )
+ {
+ aBtnLight2.SetImage( bOn ? aImgLightOn : aImgLightOff );
+ pLightGroup->Enable( bOn, Base3DLight1 );
+ bUpdate = TRUE;
+ }
+ if( aBtnLight2.GetState() == STATE_DONTKNOW )
+ aBtnLight2.Check( aBtnLight2.IsChecked() );
+ }
+ else
+ {
+ if( aBtnLight2.GetState() != STATE_DONTKNOW )
+ {
+ aBtnLight2.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 2 (Richtung)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTDIRECTION_2, FALSE, &pItem ) )
+ {
+ aVector = ( ( const SvxVector3DItem* )pItem )->GetValue();
+ Vector3D aVector2 = pLightGroup->GetDirection( Base3DLight1 );
+ if( aVector != aVector2 )
+ {
+ pLightGroup->SetDirection( aVector, Base3DLight1 );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Licht 3 (Farbe)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTCOLOR_3, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ ColorLB* pLb = &aLbLight3;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+ pLightGroup->SetIntensity( aColor, Base3DMaterialDiffuse, Base3DLight2 );
+
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbLight3.GetSelectEntryCount() != 0 )
+ {
+ aLbLight3.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 3 (an/aus)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTON_3, FALSE, &pItem ) )
+ {
+ BOOL bOn = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( ( bOn && aBtnLight3.GetImage() != aImgLightOn ) ||
+ ( !bOn && aBtnLight3.GetImage() != aImgLightOff ) )
+ {
+ aBtnLight3.SetImage( bOn ? aImgLightOn : aImgLightOff );
+ pLightGroup->Enable( bOn, Base3DLight2 );
+ bUpdate = TRUE;
+ }
+ if( aBtnLight3.GetState() == STATE_DONTKNOW )
+ aBtnLight3.Check( aBtnLight3.IsChecked() );
+ }
+ else
+ {
+ if( aBtnLight3.GetState() != STATE_DONTKNOW )
+ {
+ aBtnLight3.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 3 (Richtung)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTDIRECTION_3, FALSE, &pItem ) )
+ {
+ aVector = ( ( const SvxVector3DItem* )pItem )->GetValue();
+ Vector3D aVector2 = pLightGroup->GetDirection( Base3DLight2 );
+ if( aVector != aVector2 )
+ {
+ pLightGroup->SetDirection( aVector, Base3DLight2 );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Licht 4 (Farbe)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTCOLOR_4, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ ColorLB* pLb = &aLbLight4;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+ pLightGroup->SetIntensity( aColor, Base3DMaterialDiffuse, Base3DLight3 );
+
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbLight4.GetSelectEntryCount() != 0 )
+ {
+ aLbLight4.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 4 (an/aus)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTON_4, FALSE, &pItem ) )
+ {
+ BOOL bOn = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( ( bOn && aBtnLight4.GetImage() != aImgLightOn ) ||
+ ( !bOn && aBtnLight4.GetImage() != aImgLightOff ) )
+ {
+ aBtnLight4.SetImage( bOn ? aImgLightOn : aImgLightOff );
+ pLightGroup->Enable( bOn, Base3DLight3 );
+ bUpdate = TRUE;
+ }
+ if( aBtnLight4.GetState() == STATE_DONTKNOW )
+ aBtnLight4.Check( aBtnLight4.IsChecked() );
+ }
+ else
+ {
+ if( aBtnLight4.GetState() != STATE_DONTKNOW )
+ {
+ aBtnLight4.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 4 (Richtung)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTDIRECTION_4, FALSE, &pItem ) )
+ {
+ aVector = ( ( const SvxVector3DItem* )pItem )->GetValue();
+ Vector3D aVector2 = pLightGroup->GetDirection( Base3DLight3 );
+ if( aVector != aVector2 )
+ {
+ pLightGroup->SetDirection( aVector, Base3DLight3 );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Licht 5 (Farbe)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTCOLOR_5, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ ColorLB* pLb = &aLbLight5;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+ pLightGroup->SetIntensity( aColor, Base3DMaterialDiffuse, Base3DLight4 );
+
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbLight5.GetSelectEntryCount() != 0 )
+ {
+ aLbLight5.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 5 (an/aus)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTON_5, FALSE, &pItem ) )
+ {
+ BOOL bOn = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( ( bOn && aBtnLight5.GetImage() != aImgLightOn ) ||
+ ( !bOn && aBtnLight5.GetImage() != aImgLightOff ) )
+ {
+ aBtnLight5.SetImage( bOn ? aImgLightOn : aImgLightOff );
+ pLightGroup->Enable( bOn, Base3DLight4 );
+ bUpdate = TRUE;
+ }
+ if( aBtnLight5.GetState() == STATE_DONTKNOW )
+ aBtnLight5.Check( aBtnLight5.IsChecked() );
+ }
+ else
+ {
+ if( aBtnLight5.GetState() != STATE_DONTKNOW )
+ {
+ aBtnLight5.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 5 (Richtung)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTDIRECTION_5, FALSE, &pItem ) )
+ {
+ aVector = ( ( const SvxVector3DItem* )pItem )->GetValue();
+ Vector3D aVector2 = pLightGroup->GetDirection( Base3DLight4 );
+ if( aVector != aVector2 )
+ {
+ pLightGroup->SetDirection( aVector, Base3DLight4 );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Licht 6 (Farbe)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTCOLOR_6, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ ColorLB* pLb = &aLbLight6;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+ pLightGroup->SetIntensity( aColor, Base3DMaterialDiffuse, Base3DLight5 );
+
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbLight6.GetSelectEntryCount() != 0 )
+ {
+ aLbLight6.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 6 (an/aus)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTON_6, FALSE, &pItem ) )
+ {
+ BOOL bOn = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( ( bOn && aBtnLight6.GetImage() != aImgLightOn ) ||
+ ( !bOn && aBtnLight6.GetImage() != aImgLightOff ) )
+ {
+ aBtnLight6.SetImage( bOn ? aImgLightOn : aImgLightOff );
+ pLightGroup->Enable( bOn, Base3DLight5 );
+ bUpdate = TRUE;
+ }
+ if( aBtnLight6.GetState() == STATE_DONTKNOW )
+ aBtnLight6.Check( aBtnLight6.IsChecked() );
+ }
+ else
+ {
+ if( aBtnLight6.GetState() != STATE_DONTKNOW )
+ {
+ aBtnLight6.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 6 (Richtung)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTDIRECTION_6, FALSE, &pItem ) )
+ {
+ aVector = ( ( const SvxVector3DItem* )pItem )->GetValue();
+ Vector3D aVector2 = pLightGroup->GetDirection( Base3DLight5 );
+ if( aVector != aVector2 )
+ {
+ pLightGroup->SetDirection( aVector, Base3DLight5 );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Licht 7 (Farbe)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTCOLOR_7, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ ColorLB* pLb = &aLbLight7;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+ pLightGroup->SetIntensity( aColor, Base3DMaterialDiffuse, Base3DLight6 );
+
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbLight7.GetSelectEntryCount() != 0 )
+ {
+ aLbLight7.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 7 (an/aus)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTON_7, FALSE, &pItem ) )
+ {
+ BOOL bOn = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( ( bOn && aBtnLight7.GetImage() != aImgLightOn ) ||
+ ( !bOn && aBtnLight7.GetImage() != aImgLightOff ) )
+ {
+ aBtnLight7.SetImage( bOn ? aImgLightOn : aImgLightOff );
+ pLightGroup->Enable( bOn, Base3DLight6 );
+ bUpdate = TRUE;
+ }
+ if( aBtnLight7.GetState() == STATE_DONTKNOW )
+ aBtnLight7.Check( aBtnLight7.IsChecked() );
+ }
+ else
+ {
+ if( aBtnLight7.GetState() != STATE_DONTKNOW )
+ {
+ aBtnLight7.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 7 (Richtung)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTDIRECTION_7, FALSE, &pItem ) )
+ {
+ aVector = ( ( const SvxVector3DItem* )pItem )->GetValue();
+ Vector3D aVector2 = pLightGroup->GetDirection( Base3DLight6 );
+ if( aVector != aVector2 )
+ {
+ pLightGroup->SetDirection( aVector, Base3DLight6 );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Licht 8 (Farbe)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTCOLOR_8, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ ColorLB* pLb = &aLbLight8;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+ pLightGroup->SetIntensity( aColor, Base3DMaterialDiffuse, Base3DLight7 );
+
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbLight8.GetSelectEntryCount() != 0 )
+ {
+ aLbLight8.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 8 (an/aus)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTON_8, FALSE, &pItem ) )
+ {
+ BOOL bOn = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( ( bOn && aBtnLight8.GetImage() != aImgLightOn ) ||
+ ( !bOn && aBtnLight8.GetImage() != aImgLightOff ) )
+ {
+ aBtnLight8.SetImage( bOn ? aImgLightOn : aImgLightOff );
+ pLightGroup->Enable( bOn, Base3DLight7 );
+ bUpdate = TRUE;
+ }
+ if( aBtnLight8.GetState() == STATE_DONTKNOW )
+ aBtnLight8.Check( aBtnLight8.IsChecked() );
+ }
+ else
+ {
+ if( aBtnLight8.GetState() != STATE_DONTKNOW )
+ {
+ aBtnLight8.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+ // Licht 8 (Richtung)
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_LIGHTDIRECTION_8, FALSE, &pItem ) )
+ {
+ aVector = ( ( const SvxVector3DItem* )pItem )->GetValue();
+ Vector3D aVector2 = pLightGroup->GetDirection( Base3DLight7 );
+ if( aVector != aVector2 )
+ {
+ pLightGroup->SetDirection( aVector, Base3DLight7 );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Umgebungslicht
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_AMBIENTCOLOR, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ ColorLB* pLb = &aLbAmbientlight;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+ pLightGroup->SetGlobalAmbientLight( aColor );
+
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbAmbientlight.GetSelectEntryCount() != 0 )
+ {
+ aLbAmbientlight.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+
+
+// Texturen
+ // Art
+ if( bBitmap )
+ {
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_TEXTURE_KIND, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+
+ if( ( !aBtnTexLuminance.IsChecked() && nValue == 0 ) ||
+ ( !aBtnTexColor.IsChecked() && nValue == 1 ) )
+ {
+ aBtnTexLuminance.Check( nValue == 0 );
+ aBtnTexColor.Check( nValue == 1 );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aBtnTexLuminance.IsChecked() ||
+ aBtnTexColor.IsChecked() )
+ {
+ aBtnTexLuminance.Check( FALSE );
+ aBtnTexColor.Check( FALSE );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Modus
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_TEXTURE_MODE, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+
+ if( ( !aBtnTexReplace.IsChecked() && nValue == 0 ) ||
+ ( !aBtnTexModulate.IsChecked() && nValue == 1 ) )
+ {
+ aBtnTexReplace.Check( nValue == 0 );
+ aBtnTexModulate.Check( nValue == 1 );
+ //aBtnTexBlend.Check( nValue == 2 );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aBtnTexReplace.IsChecked() ||
+ aBtnTexModulate.IsChecked() )
+ {
+ aBtnTexReplace.Check( FALSE );
+ aBtnTexModulate.Check( FALSE );
+ //aBtnTexBlend.Check( FALSE );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Projektion X
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_TEXTURE_PROJ_X, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+
+ if( ( !aBtnTexObjectX.IsChecked() && nValue == 0 ) ||
+ ( !aBtnTexParallelX.IsChecked() && nValue == 1 ) ||
+ ( !aBtnTexCircleX.IsChecked() && nValue == 2 ) )
+ {
+ aBtnTexObjectX.Check( nValue == 0 );
+ aBtnTexParallelX.Check( nValue == 1 );
+ aBtnTexCircleX.Check( nValue == 2 );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aBtnTexObjectX.IsChecked() ||
+ aBtnTexParallelX.IsChecked() ||
+ aBtnTexCircleX.IsChecked() )
+ {
+ aBtnTexObjectX.Check( FALSE );
+ aBtnTexParallelX.Check( FALSE );
+ aBtnTexCircleX.Check( FALSE );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Projektion Y
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_TEXTURE_PROJ_Y, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+
+ if( ( !aBtnTexObjectY.IsChecked() && nValue == 0 ) ||
+ ( !aBtnTexParallelY.IsChecked() && nValue == 1 ) ||
+ ( !aBtnTexCircleY.IsChecked() && nValue == 2 ) )
+ {
+ aBtnTexObjectY.Check( nValue == 0 );
+ aBtnTexParallelY.Check( nValue == 1 );
+ aBtnTexCircleY.Check( nValue == 2 );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aBtnTexObjectY.IsChecked() ||
+ aBtnTexParallelY.IsChecked() ||
+ aBtnTexCircleY.IsChecked() )
+ {
+ aBtnTexObjectY.Check( FALSE );
+ aBtnTexParallelY.Check( FALSE );
+ aBtnTexCircleY.Check( FALSE );
+ bUpdate = TRUE;
+ }
+ }
+
+ // Filter
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_TEXTURE_FILTER, FALSE, &pItem ) )
+ {
+ BOOL bValue = ( ( const SfxBoolItem* )pItem )->GetValue();
+ if( bValue != aBtnTexFilter.IsChecked() )
+ {
+ aBtnTexFilter.Check( bValue );
+ bUpdate = TRUE;
+ }
+ if( aBtnTexFilter.GetState() == STATE_DONTKNOW )
+ aBtnTexFilter.Check( bValue );
+ }
+ else
+ {
+ if( aBtnTexFilter.GetState() != STATE_DONTKNOW )
+ {
+ aBtnTexFilter.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+ }
+
+
+// Material
+ // Favoriten
+ //aLbMatFavorites.SelectEntryPos( 0 );
+
+ // Objektfarbe
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_MAT_COLOR, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ aCtlLightPreview.GetPreviewControl().SetMaterial( aColor, Base3DMaterialDiffuse );
+ ColorLB* pLb = &aLbMatColor;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbMatColor.GetSelectEntryCount() != 0 )
+ {
+ aLbMatColor.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+
+ // Slebstleuchtfarbe
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_MAT_EMISSION, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ aCtlLightPreview.GetPreviewControl().SetMaterial( aColor, Base3DMaterialEmission );
+ ColorLB* pLb = &aLbMatEmission;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbMatEmission.GetSelectEntryCount() != 0 )
+ {
+ aLbMatEmission.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+
+ // Glanzpunkt
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_MAT_SPECULAR, FALSE, &pItem ) )
+ {
+ aColor = ( ( const SvxColorItem* )pItem )->GetValue();
+ aCtlLightPreview.GetPreviewControl().SetMaterial( aColor, Base3DMaterialSpecular );
+ ColorLB* pLb = &aLbMatSpecular;
+ if( aColor != pLb->GetSelectEntryColor() )
+ {
+ LBSelectColor( pLb, aColor );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( aLbMatSpecular.GetSelectEntryCount() != 0 )
+ {
+ aLbMatSpecular.SetNoSelection();
+ bUpdate = TRUE;
+ }
+ }
+
+ // Glanzpunkt Intensitaet
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_MAT_SPECULAR_INTENSITY, FALSE, &pItem ) )
+ {
+ UINT16 nValue = ( ( const SfxUInt16Item* )pItem )->GetValue();
+ aCtlLightPreview.GetPreviewControl().SetShininess( nValue );
+ if( nValue != aMtrMatSpecularIntensity.GetValue() )
+ {
+ aMtrMatSpecularIntensity.SetValue( nValue );
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ if( !aMtrMatSpecularIntensity.IsEmptyFieldValue() )
+ {
+ aMtrMatSpecularIntensity.SetEmptyFieldValue();
+ bUpdate = TRUE;
+ }
+ }
+
+
+// Sonstige
+ // Perspektive
+ if( SFX_ITEM_SET == rAttrs.GetItemState( SID_ATTR_3D_PERSPECTIVE, FALSE, &pItem ) )
+ {
+ ProjectionType ePT = (ProjectionType) ( ( const SfxUInt16Item* )pItem )->GetValue();
+ if( ( !aBtnPerspective.IsChecked() && ePT == PR_PERSPECTIVE ) ||
+ ( aBtnPerspective.IsChecked() && ePT == PR_PARALLEL ) )
+ {
+ aBtnPerspective.Check( ePT == PR_PERSPECTIVE );
+ bUpdate = TRUE;
+ }
+ if( aBtnPerspective.GetState() == STATE_DONTKNOW )
+ aBtnPerspective.Check( ePT == PR_PERSPECTIVE );
+ }
+ else
+ {
+ if( aBtnPerspective.GetState() != STATE_DONTKNOW )
+ {
+ aBtnPerspective.SetState( STATE_DONTKNOW );
+ bUpdate = TRUE;
+ }
+ }
+
+ if( !bUpdate && !bOnly3DChanged )
+ {
+ // Eventuell sind aber die 2D-Attribute unterschiedlich. Vergleiche
+ // diese und entscheide
+
+
+ bUpdate = TRUE;
+ }
+
+ if( bUpdate || bOnly3DChanged )
+ {
+ // Preview updaten
+ aCtlLightPreview.GetPreviewControl().SetLightGroup( pLightGroup );
+ aCtlPreview.Set3DAttributes( rAttrs );
+ }
+
+ // handle state of converts possible
+ aBtnConvertTo3D.Enable(pConvertTo3DItem->GetState());
+ aBtnLatheObject.Enable(pConvertTo3DLatheItem->GetState());
+}
+
+// -----------------------------------------------------------------------
+void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
+{
+// 2D-Attribute und alle anderen holen
+ rAttrs.Put( aCtlPreview.Get3DAttributes() );
+
+// Sonstige, muss vorne stehen da auf allen Seiten
+ // Perspektive
+ if( aBtnPerspective.GetState() != STATE_DONTKNOW )
+ {
+ UINT16 nValue;
+ if( aBtnPerspective.IsChecked() )
+ nValue = PR_PERSPECTIVE;
+ else
+ nValue = PR_PARALLEL;
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_PERSPECTIVE, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_PERSPECTIVE );
+
+// Geometrie
+ // evtl. PoolUnit ermitteln (Falls dies in Update() nicht passiert ist)
+ if( !pPool )
+ {
+ DBG_ERROR( "Kein Pool in GetAttr()! Evtl. inkompatibel zu drviewsi.cxx ?" );
+ pPool = rAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool?" );
+ ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH );
+
+ GET_MODULE_FIELDUNIT( eFUnit );
+ }
+
+ // Anzahl Segmente (horizontal)
+ if( !aNumHorizontal.IsEmptyFieldValue() )
+ {
+ UINT32 nValue = aNumHorizontal.GetValue();
+ rAttrs.Put( SfxUInt32Item( SID_ATTR_3D_HORZ_SEGS, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_HORZ_SEGS );
+
+ // Anzahl Segmente (vertikal)
+ if( !aNumVertical.IsEmptyFieldValue() )
+ {
+ UINT32 nValue = aNumVertical.GetValue();
+ rAttrs.Put( SfxUInt32Item( SID_ATTR_3D_VERT_SEGS, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_VERT_SEGS );
+
+ // Tiefe
+ if( !aMtrDepth.IsEmptyFieldValue() )
+ {
+ UINT32 nValue = GetCoreValue( aMtrDepth, ePoolUnit );
+ rAttrs.Put( SfxUInt32Item( SID_ATTR_3D_DEPTH, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_DEPTH );
+
+ // Doppelseitig
+ TriState eState = aBtnDoubleSided.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ BOOL bValue = STATE_CHECK == eState;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_DOUBLE_SIDED, bValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_DOUBLE_SIDED );
+
+ // Kantenrundung
+ if( !aMtrPercentDiagonal.IsEmptyFieldValue() )
+ {
+ UINT16 nValue = (UINT16) aMtrPercentDiagonal.GetValue();
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_PERCENT_DIAGONAL, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_PERCENT_DIAGONAL );
+
+ // Tiefenskalierung
+ if( !aMtrBackscale.IsEmptyFieldValue() )
+ {
+ UINT16 nValue = (UINT16) aMtrBackscale.GetValue();
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_BACKSCALE, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_BACKSCALE );
+
+ // Endwinkel
+ if( !aMtrEndAngle.IsEmptyFieldValue() )
+ {
+ UINT16 nValue = (UINT16) aMtrEndAngle.GetValue();
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_END_ANGLE, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_END_ANGLE );
+
+ // Normalentyp
+ UINT16 nValue = 99;
+ if( aBtnNormalsObj.IsChecked() )
+ nValue = 0;
+ else if( aBtnNormalsFlat.IsChecked() )
+ nValue = 1;
+ else if( aBtnNormalsSphere.IsChecked() )
+ nValue = 2;
+
+ if( nValue <= 2 )
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_NORMALS_KIND, nValue ) );
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_NORMALS_KIND );
+
+ // Normalen invertieren
+ eState = aBtnNormalsInvert.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ BOOL bValue = STATE_CHECK == eState;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_NORMALS_INVERT, bValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_NORMALS_INVERT );
+
+ // 2-seitige Beleuchtung
+ eState = aBtnTwoSidedLighting.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ BOOL bValue = STATE_CHECK == eState;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_TWO_SIDED_LIGHTING, bValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_TWO_SIDED_LIGHTING );
+
+// Darstellung
+ // Shademode
+ if( aLbShademode.GetSelectEntryCount() )
+ {
+ nValue = aLbShademode.GetSelectEntryPos();
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_SHADE_MODE, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_SHADE_MODE );
+
+ // 3D-Shatten
+ eState = aBtnShadow3d.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ BOOL bValue = STATE_CHECK == eState;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_SHADOW_3D, bValue ) );
+ rAttrs.Put( SdrShadowItem( bValue ) );
+ }
+ else
+ {
+ rAttrs.InvalidateItem( SID_ATTR_3D_SHADOW_3D );
+ rAttrs.InvalidateItem( SDRATTR_SHADOW );
+ }
+
+ // Neigung (Schatten)
+ if( !aMtrSlant.IsEmptyFieldValue() )
+ {
+ UINT16 nValue = (UINT16) aMtrSlant.GetValue();
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_SHADOW_SLANT, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_SHADOW_SLANT );
+
+ // Distanz
+ if( !aMtrDistance.IsEmptyFieldValue() )
+ {
+ UINT32 nValue = GetCoreValue( aMtrDistance, ePoolUnit );
+ rAttrs.Put( SfxUInt32Item( SID_ATTR_3D_DISTANCE, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_DISTANCE );
+
+ // Brennweite
+ if( !aMtrFocalLength.IsEmptyFieldValue() )
+ {
+ UINT32 nValue = GetCoreValue( aMtrFocalLength, ePoolUnit );
+ rAttrs.Put( SfxUInt32Item( SID_ATTR_3D_FOCAL_LENGTH, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_FOCAL_LENGTH );
+
+// Beleuchtung
+ Image aImg;
+ Vector3D aVector;
+ Color aColor;
+ // Licht 1 Farbe
+ if( aLbLight1.GetSelectEntryCount() )
+ {
+ aColor = aLbLight1.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_LIGHTCOLOR_1 ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTCOLOR_1 );
+ // Licht 1 (an/aus)
+ eState = aBtnLight1.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ aImg = aBtnLight1.GetImage();
+ BOOL bValue = FALSE;
+ if( aImg == aImgLightOn )
+ bValue = TRUE;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_LIGHTON_1, bValue ) );
+
+ // Licht 1 (Richtung)
+ if( bValue )
+ {
+ aVector = pLightGroup->GetDirection( Base3DLight0 );
+ rAttrs.Put( SvxVector3DItem( SID_ATTR_3D_LIGHTDIRECTION_1, aVector ) );
+ }
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTON_1 );
+
+
+ // Licht 2 Farbe
+ if( aLbLight2.GetSelectEntryCount() )
+ {
+ aColor = aLbLight2.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_LIGHTCOLOR_2 ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTCOLOR_2 );
+ // Licht 2 (an/aus)
+ eState = aBtnLight2.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ aImg = aBtnLight2.GetImage();
+ BOOL bValue = FALSE;
+ if( aImg == aImgLightOn )
+ bValue = TRUE;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_LIGHTON_2, bValue ) );
+
+ // Licht 2 (Richtung)
+ if( bValue )
+ {
+ aVector = pLightGroup->GetDirection( Base3DLight1 );
+ rAttrs.Put( SvxVector3DItem( SID_ATTR_3D_LIGHTDIRECTION_2, aVector ) );
+ }
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTON_2 );
+
+ // Licht 3 Farbe
+ if( aLbLight3.GetSelectEntryCount() )
+ {
+ aColor = aLbLight3.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_LIGHTCOLOR_3 ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTCOLOR_3 );
+ // Licht 3 (an/aus)
+ eState = aBtnLight3.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ aImg = aBtnLight3.GetImage();
+ BOOL bValue = FALSE;
+ if( aImg == aImgLightOn )
+ bValue = TRUE;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_LIGHTON_3, bValue ) );
+
+ // Licht 3 (Richtung)
+ if( bValue )
+ {
+ aVector = pLightGroup->GetDirection( Base3DLight2 );
+ rAttrs.Put( SvxVector3DItem( SID_ATTR_3D_LIGHTDIRECTION_3, aVector ) );
+ }
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTON_3 );
+
+ // Licht 4 Farbe
+ if( aLbLight4.GetSelectEntryCount() )
+ {
+ aColor = aLbLight4.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_LIGHTCOLOR_4 ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTCOLOR_4 );
+ // Licht 4 (an/aus)
+ eState = aBtnLight4.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ aImg = aBtnLight4.GetImage();
+ BOOL bValue = FALSE;
+ if( aImg == aImgLightOn )
+ bValue = TRUE;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_LIGHTON_4, bValue ) );
+
+ // Licht 4 (Richtung)
+ if( bValue )
+ {
+ aVector = pLightGroup->GetDirection( Base3DLight3 );
+ rAttrs.Put( SvxVector3DItem( SID_ATTR_3D_LIGHTDIRECTION_4, aVector ) );
+ }
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTON_4 );
+
+ // Licht 5 Farbe
+ if( aLbLight5.GetSelectEntryCount() )
+ {
+ aColor = aLbLight5.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_LIGHTCOLOR_5 ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTCOLOR_5 );
+ // Licht 5 (an/aus)
+ eState = aBtnLight5.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ aImg = aBtnLight5.GetImage();
+ BOOL bValue = FALSE;
+ if( aImg == aImgLightOn )
+ bValue = TRUE;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_LIGHTON_5, bValue ) );
+
+ // Licht 5 (Richtung)
+ if( bValue )
+ {
+ aVector = pLightGroup->GetDirection( Base3DLight4 );
+ rAttrs.Put( SvxVector3DItem( SID_ATTR_3D_LIGHTDIRECTION_5, aVector ) );
+ }
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTON_5 );
+
+ // Licht 6 Farbe
+ if( aLbLight6.GetSelectEntryCount() )
+ {
+ aColor = aLbLight6.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_LIGHTCOLOR_6 ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTCOLOR_6 );
+ // Licht 6 (an/aus)
+ eState = aBtnLight6.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ aImg = aBtnLight6.GetImage();
+ BOOL bValue = FALSE;
+ if( aImg == aImgLightOn )
+ bValue = TRUE;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_LIGHTON_6, bValue ) );
+
+ // Licht 6 (Richtung)
+ if( bValue )
+ {
+ aVector = pLightGroup->GetDirection( Base3DLight5 );
+ rAttrs.Put( SvxVector3DItem( SID_ATTR_3D_LIGHTDIRECTION_6, aVector ) );
+ }
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTON_6 );
+
+ // Licht 7 Farbe
+ if( aLbLight7.GetSelectEntryCount() )
+ {
+ aColor = aLbLight7.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_LIGHTCOLOR_7 ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTCOLOR_7 );
+ // Licht 7 (an/aus)
+ eState = aBtnLight7.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ aImg = aBtnLight7.GetImage();
+ BOOL bValue = FALSE;
+ if( aImg == aImgLightOn )
+ bValue = TRUE;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_LIGHTON_7, bValue ) );
+
+ // Licht 7 (Richtung)
+ if( bValue )
+ {
+ aVector = pLightGroup->GetDirection( Base3DLight6 );
+ rAttrs.Put( SvxVector3DItem( SID_ATTR_3D_LIGHTDIRECTION_7, aVector ) );
+ }
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTON_7 );
+
+ // Licht 8 Farbe
+ if( aLbLight8.GetSelectEntryCount() )
+ {
+ aColor = aLbLight8.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_LIGHTCOLOR_8 ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTCOLOR_8 );
+ // Licht 8 (an/aus)
+ eState = aBtnLight8.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ aImg = aBtnLight8.GetImage();
+ BOOL bValue = FALSE;
+ if( aImg == aImgLightOn )
+ bValue = TRUE;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_LIGHTON_8, bValue ) );
+
+ // Licht 8 (Richtung)
+ if( bValue )
+ {
+ aVector = pLightGroup->GetDirection( Base3DLight7 );
+ rAttrs.Put( SvxVector3DItem( SID_ATTR_3D_LIGHTDIRECTION_8, aVector ) );
+ }
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_LIGHTON_8 );
+
+ // Umgebungslicht
+ if( aLbAmbientlight.GetSelectEntryCount() )
+ {
+ aColor = aLbAmbientlight.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_AMBIENTCOLOR ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_AMBIENTCOLOR );
+
+// Texturen
+ // Art
+ nValue = 99;
+ if( aBtnTexLuminance.IsChecked() )
+ nValue = 0;
+ else if( aBtnTexColor.IsChecked() )
+ nValue = 1;
+
+ if( nValue <= 1 )
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_TEXTURE_KIND, nValue ) );
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_TEXTURE_KIND );
+
+
+ // Modus
+ nValue = 99;
+ if( aBtnTexReplace.IsChecked() )
+ nValue = 0;
+ else if( aBtnTexModulate.IsChecked() )
+ nValue = 1;
+ //else if( aBtnTexBlend.IsChecked() )
+ // nValue = 2;
+
+ if( nValue <= 2 )
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_TEXTURE_MODE, nValue ) );
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_TEXTURE_MODE );
+
+ // Projektion X
+ nValue = 99;
+ if( aBtnTexObjectX.IsChecked() )
+ nValue = 0;
+ else if( aBtnTexParallelX.IsChecked() )
+ nValue = 1;
+ else if( aBtnTexCircleX.IsChecked() )
+ nValue = 2;
+
+ if( nValue <= 2 )
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_TEXTURE_PROJ_X, nValue ) );
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_TEXTURE_PROJ_X );
+
+ // Projektion Y
+ nValue = 99;
+ if( aBtnTexObjectY.IsChecked() )
+ nValue = 0;
+ else if( aBtnTexParallelY.IsChecked() )
+ nValue = 1;
+ else if( aBtnTexCircleY.IsChecked() )
+ nValue = 2;
+
+ if( nValue <= 2 )
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_TEXTURE_PROJ_Y, nValue ) );
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_TEXTURE_PROJ_Y );
+
+
+ // Filter
+ eState = aBtnTexFilter.GetState();
+ if( eState != STATE_DONTKNOW )
+ {
+ BOOL bValue = STATE_CHECK == eState;
+ rAttrs.Put( SfxBoolItem( SID_ATTR_3D_TEXTURE_FILTER, bValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_TEXTURE_FILTER );
+
+
+// Material
+ // Objektfarbe
+ if( aLbMatColor.GetSelectEntryCount() )
+ {
+ aColor = aLbMatColor.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_MAT_COLOR ) );
+ }
+ else
+ {
+ rAttrs.InvalidateItem( SID_ATTR_3D_MAT_COLOR );
+ rAttrs.InvalidateItem( XATTR_FILLCOLOR );
+ }
+
+ // Slebstleuchtfarbe
+ if( aLbMatEmission.GetSelectEntryCount() )
+ {
+ aColor = aLbMatEmission.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_MAT_EMISSION ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_MAT_EMISSION );
+
+ // Glanzpunkt
+ if( aLbMatSpecular.GetSelectEntryCount() )
+ {
+ aColor = aLbMatSpecular.GetSelectEntryColor();
+ rAttrs.Put( SvxColorItem( aColor, SID_ATTR_3D_MAT_SPECULAR ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_MAT_SPECULAR );
+
+ // Glanzpunkt Intensitaet
+ if( !aMtrMatSpecularIntensity.IsEmptyFieldValue() )
+ {
+ UINT16 nValue = (UINT16) aMtrMatSpecularIntensity.GetValue();
+ rAttrs.Put( SfxUInt16Item( SID_ATTR_3D_MAT_SPECULAR_INTENSITY, nValue ) );
+ }
+ else
+ rAttrs.InvalidateItem( SID_ATTR_3D_MAT_SPECULAR_INTENSITY );
+}
+
+// -----------------------------------------------------------------------
+void __EXPORT Svx3DWin::Resize()
+{
+ if ( !IsFloatingMode() ||
+ !GetFloatingWindow()->IsRollUp() )
+ {
+ Size aWinSize( GetOutputSizePixel() ); // vorher rSize im Resizing()
+
+ if( aWinSize.Height() >= GetMinOutputSizePixel().Height() &&
+ aWinSize.Width() >= GetMinOutputSizePixel().Width() )
+ {
+ Size aDiffSize;
+ aDiffSize.Width() = aWinSize.Width() - aSize.Width();
+ aDiffSize.Height() = aWinSize.Height() - aSize.Height();
+
+ Point aXPt;
+ Point aYPt;
+ aXPt.X() = aDiffSize.Width();
+ aYPt.Y() = aDiffSize.Height();
+
+ Size aObjSize;
+
+ // Hide
+ aBtnUpdate.Hide();
+ aBtnAssign.Hide();
+
+ aBtnConvertTo3D.Hide();
+ aBtnLatheObject.Hide();
+ aBtnPerspective.Hide();
+
+ aCtlPreview.Hide();
+ aCtlLightPreview.Hide();
+ aGrpPreview.Hide();
+
+ aGrpFavorites.Hide();
+ aGrpGeometrie.Hide();
+ aGrpRepresentation.Hide();
+ aGrpLight.Hide();
+ aGrpTexture.Hide();
+ aGrpMaterial.Hide();
+
+ // Verschieben / Resizen
+ aBtnUpdate.SetPosPixel( aBtnUpdate.GetPosPixel() + aXPt );
+ aBtnAssign.SetPosPixel( aBtnAssign.GetPosPixel() + aXPt );
+
+ // Preview-Controls
+ aObjSize = aCtlPreview.GetOutputSizePixel();
+ aObjSize.Width() += aDiffSize.Width();
+ aObjSize.Height() += aDiffSize.Height();
+ aCtlPreview.SetOutputSizePixel( aObjSize );
+ aCtlLightPreview.SetOutputSizePixel( aObjSize );
+
+ // Preview-Group
+ aObjSize = aGrpPreview.GetOutputSizePixel();
+ aObjSize.Width() += aDiffSize.Width();
+ aObjSize.Height() += aDiffSize.Height();
+ aGrpPreview.SetOutputSizePixel( aObjSize );
+
+ // Groups
+ aObjSize = aGrpFavorites.GetOutputSizePixel();
+ aObjSize.Width() += aDiffSize.Width();
+ aGrpFavorites.SetOutputSizePixel( aObjSize );
+ aGrpGeometrie.SetOutputSizePixel( aObjSize );
+ aGrpRepresentation.SetOutputSizePixel( aObjSize );
+ aGrpLight.SetOutputSizePixel( aObjSize );
+ aGrpTexture.SetOutputSizePixel( aObjSize );
+ aGrpMaterial.SetOutputSizePixel( aObjSize );
+
+ // Y-Position der unteren Buttons
+ aBtnConvertTo3D.SetPosPixel( aBtnConvertTo3D.GetPosPixel() + aYPt );
+ aBtnLatheObject.SetPosPixel( aBtnLatheObject.GetPosPixel() + aYPt );
+ aBtnPerspective.SetPosPixel( aBtnPerspective.GetPosPixel() + aYPt );
+
+ // Show
+ aBtnUpdate.Show();
+ aBtnAssign.Show();
+
+ aBtnConvertTo3D.Show();
+ aBtnLatheObject.Show();
+ aBtnPerspective.Show();
+
+ aGrpPreview.Show();
+
+ if( aBtnFavorites.IsChecked() )
+ ClickViewTypeHdl( &aBtnFavorites );
+ if( aBtnGeo.IsChecked() )
+ ClickViewTypeHdl( &aBtnGeo );
+ if( aBtnRepresentation.IsChecked() )
+ ClickViewTypeHdl( &aBtnRepresentation );
+ if( aBtnLight.IsChecked() )
+ ClickViewTypeHdl( &aBtnLight );
+ if( aBtnTexture.IsChecked() )
+ ClickViewTypeHdl( &aBtnTexture );
+ if( aBtnMaterial.IsChecked() )
+ ClickViewTypeHdl( &aBtnMaterial );
+
+ aSize = aWinSize;
+ }
+ }
+
+ SfxDockingWindow::Resize();
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( Svx3DWin, ClickUpdateHdl, void *, EMPTYARG )
+{
+ bUpdate = !aBtnUpdate.IsChecked();
+ aBtnUpdate.Check( bUpdate );
+
+ if( bUpdate )
+ {
+ SfxBoolItem aItem( SID_3D_STATE, TRUE );
+ SFX_DISPATCHER().Execute( SID_3D_STATE, SFX_CALLMODE_ASYNCHRON |
+ SFX_CALLMODE_RECORD, &aItem, 0L );
+ }
+ else
+ {
+ // Controls koennen u.U. disabled sein
+ /*
+ aFtSegments.Enable();
+ aNumHorizontal.Enable();
+ aNumVertical.Enable();
+ */
+ }
+
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( Svx3DWin, ClickAssignHdl, void *, EMPTYARG )
+{
+ SfxBoolItem aItem( SID_3D_ASSIGN, TRUE );
+ SFX_DISPATCHER().Execute( SID_3D_ASSIGN, SFX_CALLMODE_ASYNCHRON |
+ SFX_CALLMODE_RECORD, &aItem, 0L );
+
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( Svx3DWin, ClickViewTypeHdl, void *, pBtn )
+{
+
+ if( pBtn )
+ {
+ // Da das permanente Updaten der Preview zu teuer waere
+ BOOL bUpdatePreview = aBtnLight.IsChecked();
+
+ aBtnFavorites.Check( &aBtnFavorites == pBtn );
+ aBtnGeo.Check( &aBtnGeo == pBtn );
+ aBtnRepresentation.Check( &aBtnRepresentation == pBtn );
+ aBtnLight.Check( &aBtnLight == pBtn );
+ aBtnTexture.Check( &aBtnTexture == pBtn );
+ aBtnMaterial.Check( &aBtnMaterial == pBtn );
+
+ if( aBtnFavorites.IsChecked() )
+ eViewType = VIEWTYPE_FAVORITES;
+ if( aBtnGeo.IsChecked() )
+ eViewType = VIEWTYPE_GEO;
+ if( aBtnRepresentation.IsChecked() )
+ eViewType = VIEWTYPE_REPRESENTATION;
+ if( aBtnLight.IsChecked() )
+ eViewType = VIEWTYPE_LIGHT;
+ if( aBtnTexture.IsChecked() )
+ eViewType = VIEWTYPE_TEXTURE;
+ if( aBtnMaterial.IsChecked() )
+ eViewType = VIEWTYPE_MATERIAL;
+
+ // Favoriten
+ if( eViewType == VIEWTYPE_FAVORITES )
+ {
+ aCtlFavorites.Show();
+ aGrpFavorites.Show();
+ aBtnOnly3D.Show();
+ aBtnAllAttributes.Show();
+ }
+ else
+ {
+ aCtlFavorites.Hide();
+ aGrpFavorites.Hide();
+ aBtnOnly3D.Hide();
+ aBtnAllAttributes.Hide();
+ }
+
+ // Geometrie
+ if( eViewType == VIEWTYPE_GEO )
+ {
+ aFtHorizontal.Show();
+ aNumHorizontal.Show();
+ aFtVertical.Show();
+ aNumVertical.Show();
+ aGrpSegments.Show();
+ aFtPercentDiagonal.Show();
+ aMtrPercentDiagonal.Show();
+ aFtBackscale.Show();
+ aMtrBackscale.Show();
+ aFtEndAngle.Show();
+ aMtrEndAngle.Show();
+ aFtDepth.Show();
+ aMtrDepth.Show();
+ aGrpGeometrie.Show();
+
+ aBtnNormalsObj.Show();
+ aBtnNormalsFlat.Show();
+ aBtnNormalsSphere.Show();
+ aBtnTwoSidedLighting.Show();
+ aBtnNormalsInvert.Show();
+ aGrpNormals.Show();
+ aBtnDoubleSided.Show();
+ }
+ else
+ {
+ aFtHorizontal.Hide();
+ aNumHorizontal.Hide();
+ aFtVertical.Hide();
+ aNumVertical.Hide();
+ aGrpSegments.Hide();
+ aFtPercentDiagonal.Hide();
+ aMtrPercentDiagonal.Hide();
+ aFtBackscale.Hide();
+ aMtrBackscale.Hide();
+ aFtEndAngle.Hide();
+ aMtrEndAngle.Hide();
+ aFtDepth.Hide();
+ aMtrDepth.Hide();
+ aGrpGeometrie.Hide();
+
+ aBtnNormalsObj.Hide();
+ aBtnNormalsFlat.Hide();
+ aBtnNormalsSphere.Hide();
+ aBtnTwoSidedLighting.Hide();
+ aBtnNormalsInvert.Hide();
+ aGrpNormals.Hide();
+ aBtnDoubleSided.Hide();
+ }
+
+ // Darstellung
+ if( eViewType == VIEWTYPE_REPRESENTATION )
+ {
+ aFtShademode.Show();
+ aLbShademode.Show();
+ aBtnShadow3d.Show();
+ aFtSlant.Show();
+ aMtrSlant.Show();
+ aGrpShadow.Show();
+ aFtDistance.Show();
+ aMtrDistance.Show();
+ aFtFocalLeng.Show();
+ aMtrFocalLength.Show();
+ aGrpCamera.Show();
+ aGrpRepresentation.Show();
+ }
+ else
+ {
+ aFtShademode.Hide();
+ aLbShademode.Hide();
+ aBtnShadow3d.Hide();
+ aFtSlant.Hide();
+ aMtrSlant.Hide();
+ aGrpShadow.Hide();
+ aFtDistance.Hide();
+ aMtrDistance.Hide();
+ aFtFocalLeng.Hide();
+ aMtrFocalLength.Hide();
+ aGrpCamera.Hide();
+ aGrpRepresentation.Hide();
+ }
+
+ // Beleuchtung
+ if( eViewType == VIEWTYPE_LIGHT )
+ {
+ aBtnLight1.Show();
+ aBtnLight2.Show();
+ aBtnLight3.Show();
+ aBtnLight4.Show();
+ aBtnLight5.Show();
+ aBtnLight6.Show();
+ aBtnLight7.Show();
+ aBtnLight8.Show();
+ //aLbLight1.Show();
+ aBtnLightColor.Show();
+ aGrpLightsource.Show();
+ aLbAmbientlight.Show();
+ aBtnAmbientColor.Show();
+ aGrpAmbientlight.Show();
+ aGrpLight.Show();
+ //aFtLightX.Show();
+ //aFtLightY.Show();
+ //aFtLightZ.Show();
+ //aGrpLightInfo.Show();
+
+ ColorLB* pLb = GetLbByButton();
+ if( pLb )
+ pLb->Show();
+
+ aCtlLightPreview.Show();
+ aCtlPreview.Hide();
+ }
+ else
+ {
+ aBtnLight1.Hide();
+ aBtnLight2.Hide();
+ aBtnLight3.Hide();
+ aBtnLight4.Hide();
+ aBtnLight5.Hide();
+ aBtnLight6.Hide();
+ aBtnLight7.Hide();
+ aBtnLight8.Hide();
+ aLbLight1.Hide();
+ aLbLight2.Hide();
+ aLbLight3.Hide();
+ aLbLight4.Hide();
+ aLbLight5.Hide();
+ aLbLight6.Hide();
+ aLbLight7.Hide();
+ aLbLight8.Hide();
+ aBtnLightColor.Hide();
+ aGrpLightsource.Hide();
+ aLbAmbientlight.Hide();
+ aBtnAmbientColor.Hide();
+ aGrpAmbientlight.Hide();
+ aGrpLight.Hide();
+ aFtLightX.Hide();
+ aFtLightY.Hide();
+ aFtLightZ.Hide();
+ aGrpLightInfo.Hide();
+
+ if( !aCtlPreview.IsVisible() )
+ {
+ aCtlPreview.Show();
+ aCtlLightPreview.Hide();
+ }
+ }
+
+ // Texturen
+ if( eViewType == VIEWTYPE_TEXTURE )
+ {
+ aFtTexKind.Show();
+ aBtnTexLuminance.Show();
+ aBtnTexColor.Show();
+ aFtTexMode.Show();
+ aBtnTexReplace.Show();
+ aBtnTexModulate.Show();
+ //aBtnTexBlend.Show();
+ aFtTexProjectionX.Show();
+ aBtnTexParallelX.Show();
+ aBtnTexCircleX.Show();
+ aBtnTexObjectX.Show();
+ aFtTexProjectionY.Show();
+ aBtnTexParallelY.Show();
+ aBtnTexCircleY.Show();
+ aBtnTexObjectY.Show();
+ aFtTexFilter.Show();
+ aBtnTexFilter.Show();
+ aGrpTexture.Show();
+ }
+ else
+ {
+ aFtTexKind.Hide();
+ aBtnTexLuminance.Hide();
+ aBtnTexColor.Hide();
+ aFtTexMode.Hide();
+ aBtnTexReplace.Hide();
+ aBtnTexModulate.Hide();
+ aBtnTexBlend.Hide();
+ aFtTexProjectionX.Hide();
+ aBtnTexParallelX.Hide();
+ aBtnTexCircleX.Hide();
+ aBtnTexObjectX.Hide();
+ aFtTexProjectionY.Hide();
+ aBtnTexParallelY.Hide();
+ aBtnTexCircleY.Hide();
+ aBtnTexObjectY.Hide();
+ aFtTexFilter.Hide();
+ aBtnTexFilter.Hide();
+ aGrpTexture.Hide();
+ }
+
+ // Material
+ if( eViewType == VIEWTYPE_MATERIAL )
+ {
+ aFtMatFavorites.Show();
+ aLbMatFavorites.Show();
+ aFtMatColor.Show();
+ aLbMatColor.Show();
+ aBtnMatColor.Show();
+ aFtMatEmission.Show();
+ aLbMatEmission.Show();
+ aBtnEmissionColor.Show();
+ aFtMatSpecular.Show();
+ aLbMatSpecular.Show();
+ aBtnSpecularColor.Show();
+ aFtMatSpecularIntensity.Show();
+ aMtrMatSpecularIntensity.Show();
+ aGrpMatSpecular.Show();
+ aGrpMaterial.Show();
+ }
+ else
+ {
+ aFtMatFavorites.Hide();
+ aLbMatFavorites.Hide();
+ aFtMatColor.Hide();
+ aLbMatColor.Hide();
+ aBtnMatColor.Hide();
+ aFtMatEmission.Hide();
+ aLbMatEmission.Hide();
+ aBtnEmissionColor.Hide();
+ aFtMatSpecular.Hide();
+ aLbMatSpecular.Hide();
+ aBtnSpecularColor.Hide();
+ aFtMatSpecularIntensity.Hide();
+ aMtrMatSpecularIntensity.Hide();
+ aGrpMatSpecular.Hide();
+ aGrpMaterial.Hide();
+ }
+ if( bUpdatePreview && !aBtnLight.IsChecked() )
+ UpdatePreview();
+
+ }
+ else
+ {
+ aBtnFavorites.Check( eViewType == VIEWTYPE_FAVORITES );
+ aBtnGeo.Check( eViewType == VIEWTYPE_GEO );
+ aBtnRepresentation.Check( eViewType == VIEWTYPE_REPRESENTATION );
+ aBtnLight.Check( eViewType == VIEWTYPE_LIGHT );
+ aBtnTexture.Check( eViewType == VIEWTYPE_TEXTURE );
+ aBtnMaterial.Check( eViewType == VIEWTYPE_MATERIAL );
+ }
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
+{
+ BOOL bUpdatePreview = FALSE;
+
+ if( pBtn )
+ {
+ USHORT nSId = 0;
+
+ if( pBtn == &aBtnConvertTo3D )
+ {
+ nSId = SID_CONVERT_TO_3D;
+ }
+ else if( pBtn == &aBtnLatheObject )
+ {
+ nSId = SID_CONVERT_TO_3D_LATHE_FAST;
+ }
+ // Favoriten
+ else if( pBtn == &aBtnOnly3D ||
+ pBtn == &aBtnAllAttributes )
+ {
+ bOnly3DChanged = TRUE;
+ aBtnOnly3D.Check( pBtn == &aBtnOnly3D );
+ aBtnAllAttributes.Check( pBtn == &aBtnAllAttributes );
+ bUpdatePreview = TRUE;
+ }
+ // Geometrie
+ else if( pBtn == &aBtnNormalsObj ||
+ pBtn == &aBtnNormalsFlat ||
+ pBtn == &aBtnNormalsSphere )
+ {
+ aBtnNormalsObj.Check( pBtn == &aBtnNormalsObj );
+ aBtnNormalsFlat.Check( pBtn == &aBtnNormalsFlat );
+ aBtnNormalsSphere.Check( pBtn == &aBtnNormalsSphere );
+ bUpdatePreview = TRUE;
+ }
+ else if( pBtn == &aBtnLight1 ||
+ pBtn == &aBtnLight2 ||
+ pBtn == &aBtnLight3 ||
+ pBtn == &aBtnLight4 ||
+ pBtn == &aBtnLight5 ||
+ pBtn == &aBtnLight6 ||
+ pBtn == &aBtnLight7 ||
+ pBtn == &aBtnLight8 )
+ {
+ // Beleuchtung
+ ColorLB* pLb = GetLbByButton( pBtn );
+ pLb->Show();
+
+ if( pBtn->IsChecked() )
+ {
+ Image aImg( pBtn->GetImage() );
+
+ if( aImg == aImgLightOn )
+ pBtn->SetImage( aImgLightOff );
+ else
+ pBtn->SetImage( aImgLightOn );
+ }
+ else
+ {
+ pBtn->Check();
+
+ if( pBtn != &aBtnLight1 && aBtnLight1.IsChecked() )
+ {
+ aBtnLight1.Check( FALSE );
+ aLbLight1.Hide();
+ }
+ if( pBtn != &aBtnLight2 && aBtnLight2.IsChecked() )
+ {
+ aBtnLight2.Check( FALSE );
+ aLbLight2.Hide();
+ }
+ if( pBtn != &aBtnLight3 && aBtnLight3.IsChecked() )
+ {
+ aBtnLight3.Check( FALSE );
+ aLbLight3.Hide();
+ }
+ if( pBtn != &aBtnLight4 && aBtnLight4.IsChecked() )
+ {
+ aBtnLight4.Check( FALSE );
+ aLbLight4.Hide();
+ }
+ if( pBtn != &aBtnLight5 && aBtnLight5.IsChecked() )
+ {
+ aBtnLight5.Check( FALSE );
+ aLbLight5.Hide();
+ }
+ if( pBtn != &aBtnLight6 && aBtnLight6.IsChecked() )
+ {
+ aBtnLight6.Check( FALSE );
+ aLbLight6.Hide();
+ }
+ if( pBtn != &aBtnLight7 && aBtnLight7.IsChecked() )
+ {
+ aBtnLight7.Check( FALSE );
+ aLbLight7.Hide();
+ }
+ if( pBtn != &aBtnLight8 && aBtnLight8.IsChecked() )
+ {
+ aBtnLight8.Check( FALSE );
+ aLbLight8.Hide();
+ }
+ }
+ BOOL bEnable = pBtn->GetImage() == aImgLightOn;
+ aBtnLightColor.Enable( bEnable );
+ pLb->Enable( bEnable );
+
+ ClickLightHdl( pBtn );
+ bUpdatePreview = TRUE;
+ }
+ // Texturen
+ else if( pBtn == &aBtnTexLuminance ||
+ pBtn == &aBtnTexColor )
+ {
+ aBtnTexLuminance.Check( pBtn == &aBtnTexLuminance );
+ aBtnTexColor.Check( pBtn == &aBtnTexColor );
+ bUpdatePreview = TRUE;
+ }
+ else if( pBtn == &aBtnTexReplace ||
+ pBtn == &aBtnTexModulate )// ||
+ //pBtn == &aBtnTexBlend )
+ {
+ aBtnTexReplace.Check( pBtn == &aBtnTexReplace );
+ aBtnTexModulate.Check( pBtn == &aBtnTexModulate );
+ //aBtnTexBlend.Check( pBtn == &aBtnTexBlend );
+ bUpdatePreview = TRUE;
+ }
+ else if( pBtn == &aBtnTexParallelX ||
+ pBtn == &aBtnTexCircleX ||
+ pBtn == &aBtnTexObjectX )
+ {
+ aBtnTexParallelX.Check( pBtn == &aBtnTexParallelX );
+ aBtnTexCircleX.Check( pBtn == &aBtnTexCircleX );
+ aBtnTexObjectX.Check( pBtn == &aBtnTexObjectX );
+ bUpdatePreview = TRUE;
+ }
+ else if( pBtn == &aBtnTexParallelY ||
+ pBtn == &aBtnTexCircleY ||
+ pBtn == &aBtnTexObjectY )
+ {
+ aBtnTexParallelY.Check( pBtn == &aBtnTexParallelY );
+ aBtnTexCircleY.Check( pBtn == &aBtnTexCircleY );
+ aBtnTexObjectY.Check( pBtn == &aBtnTexObjectY );
+ bUpdatePreview = TRUE;
+ }
+ else if( pBtn == &aBtnShadow3d )
+ {
+ pBtn->Check( !pBtn->IsChecked() );
+ aFtSlant.Enable( pBtn->IsChecked() );
+ aMtrSlant.Enable( pBtn->IsChecked() );
+ bUpdatePreview = TRUE;
+ }
+ // Sonstige (keine Gruppen)
+ else if( pBtn != NULL )
+ {
+ pBtn->Check( !pBtn->IsChecked() );
+ bUpdatePreview = TRUE;
+ }
+
+ if( nSId > 0 )
+ {
+ SfxBoolItem aItem( nSId, TRUE );
+ SFX_DISPATCHER().Execute( nSId, SFX_CALLMODE_ASYNCHRON |
+ SFX_CALLMODE_RECORD, &aItem, 0L );
+ }
+ else if( bUpdatePreview == TRUE )
+ UpdatePreview();
+ }
+ return( 0L );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( Svx3DWin, ClickColorHdl, PushButton *, pBtn )
+{
+ SvColorDialog aColorDlg( this );
+ ColorLB* pLb;
+
+ if( pBtn == &aBtnLightColor )
+ pLb = GetLbByButton();
+ else if( pBtn == &aBtnAmbientColor )
+ pLb = &aLbAmbientlight;
+ else if( pBtn == &aBtnMatColor )
+ pLb = &aLbMatColor;
+ else if( pBtn == &aBtnEmissionColor )
+ pLb = &aLbMatEmission;
+ else if( pBtn == &aBtnSpecularColor )
+ pLb = &aLbMatSpecular;
+
+ Color aColor = pLb->GetSelectEntryColor();
+
+ aColorDlg.SetColor( aColor );
+ if( aColorDlg.Execute() == RET_OK )
+ {
+ aColor = aColorDlg.GetColor();
+ if( LBSelectColor( pLb, aColor ) )
+ SelectHdl( pLb );
+ }
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( Svx3DWin, SelectHdl, void *, p )
+{
+ if( p )
+ {
+ Color aColor;
+ BOOL bUpdatePreview = FALSE;
+
+ // Material
+ if( p == &aLbMatFavorites )
+ {
+ Color aColObj( COL_WHITE );
+ Color aColEmis( COL_BLACK );
+ Color aColSpec( COL_WHITE );
+ USHORT nSpecIntens = 20;
+
+ USHORT nPos = aLbMatFavorites.GetSelectEntryPos();
+ switch( nPos )
+ {
+ case 1: // Metall
+ {
+ aColObj = Color(230,230,255);
+ aColEmis = Color(10,10,30);
+ aColSpec = Color(200,200,200);
+ nSpecIntens = 20;
+ }
+ break;
+
+ case 2: // Gold
+ {
+ aColObj = Color(230,255,0);
+ aColEmis = Color(51,0,0);
+ aColSpec = Color(255,255,240);
+ nSpecIntens = 20;
+ }
+ break;
+
+ case 3: // Chrom
+ {
+ aColObj = Color(36,117,153);
+ aColEmis = Color(18,30,51);
+ aColSpec = Color(230,230,255);
+ nSpecIntens = 2;
+ }
+ break;
+
+ case 4: // Plastik
+ {
+ aColObj = Color(255,48,57);
+ aColEmis = Color(35,0,0);
+ aColSpec = Color(179,202,204);
+ nSpecIntens = 60;
+ }
+ break;
+
+ case 5: // Holz
+ {
+ aColObj = Color(153,71,1);
+ aColEmis = Color(21,22,0);
+ aColSpec = Color(255,255,153);
+ nSpecIntens = 75;
+ }
+ break;
+ }
+ LBSelectColor( &aLbMatColor, aColObj );
+ LBSelectColor( &aLbMatEmission, aColEmis );
+ LBSelectColor( &aLbMatSpecular, aColSpec );
+ aMtrMatSpecularIntensity.SetValue( nSpecIntens );
+
+ bUpdatePreview = TRUE;
+ }
+ else if( p == &aLbMatColor ||
+ p == &aLbMatEmission ||
+ p == &aLbMatSpecular )
+ {
+ aColor = ( ( (ColorLB*)p )->GetSelectEntryColor() );
+
+ Base3DMaterialValue eType = Base3DMaterialDiffuse;
+ //if( p == &aLbMatColor )
+ if( p == &aLbMatEmission )
+ eType = Base3DMaterialEmission;
+ else if( p == &aLbMatSpecular )
+ eType = Base3DMaterialSpecular;
+
+ //aCtlPreview.SetMaterial( aColor, eType );
+ aCtlLightPreview.GetPreviewControl().SetMaterial( aColor, eType );
+
+ aLbMatFavorites.SelectEntryPos( 0 );
+
+ bUpdatePreview = TRUE;
+ }
+ // Beleuchtung
+ else if( p == &aLbAmbientlight )
+ {
+ Color aColor = aLbAmbientlight.GetSelectEntryColor();
+ pLightGroup->SetGlobalAmbientLight( aColor );
+
+ aCtlLightPreview.GetPreviewControl().SetLightGroup( pLightGroup );
+ //aCtlPreview.SetLightGroup( pLightGroup );
+ bUpdatePreview = TRUE;
+ }
+ else if( p == &aLbLight1 ||
+ p == &aLbLight2 ||
+ p == &aLbLight3 ||
+ p == &aLbLight4 ||
+ p == &aLbLight5 ||
+ p == &aLbLight6 ||
+ p == &aLbLight7 ||
+ p == &aLbLight8 )
+ {
+ Color aColor = ( (ColorLB*)p )->GetSelectEntryColor();
+ USHORT nLightSource = GetLightSource();
+
+ *pLightGroup = *aCtlLightPreview.GetPreviewControl().GetLightGroup();
+
+ pLightGroup->SetIntensity( aColor,
+ Base3DMaterialDiffuse,
+ (Base3DLightNumber) nLightSource );
+
+ aCtlLightPreview.GetPreviewControl().SetLightGroup( pLightGroup );
+ //aCtlPreview.SetLightGroup( pLightGroup );
+ bUpdatePreview = TRUE;
+ }
+ else if( p == &aLbShademode )
+ bUpdatePreview = TRUE;
+
+ if( bUpdatePreview == TRUE )
+ UpdatePreview();
+ }
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( Svx3DWin, ModifyHdl, void*, pField )
+{
+ if( pField )
+ {
+ BOOL bUpdatePreview = FALSE;
+
+ // Material
+ if( pField == &aMtrMatSpecularIntensity )
+ {
+ UINT16 nValue = (UINT16) ( (MetricField*)pField )->GetValue();
+ //aCtlPreview.SetShininess( nValue );
+ aCtlLightPreview.GetPreviewControl().SetShininess( nValue );
+ bUpdatePreview = TRUE;
+ }
+ else if( pField == &aNumHorizontal )
+ {
+ UINT16 nValue = (UINT16) ( (NumericField*)pField )->GetValue();
+ aCtlLightPreview.GetPreviewControl().SetHorizontalSegments( nValue );
+ //aCtlPreview.SetHorizontalSegments( nValue );
+ bUpdatePreview = TRUE;
+ }
+ else if( pField == &aNumVertical )
+ {
+ UINT16 nValue = (UINT16) ( (NumericField*)pField )->GetValue();
+ aCtlLightPreview.GetPreviewControl().SetVerticalSegments( nValue );
+ //aCtlPreview.SetVerticalSegments( nValue );
+ bUpdatePreview = TRUE;
+ }
+ else if( pField == &aMtrSlant )
+ bUpdatePreview = TRUE;
+
+ if( bUpdatePreview == TRUE )
+ UpdatePreview();
+ }
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( Svx3DWin, ClickLightHdl, PushButton*, pBtn )
+{
+
+ if( pBtn )
+ {
+ USHORT nLightSource = GetLightSource( pBtn );
+ ColorLB* pLb = GetLbByButton( pBtn );
+ Color aColor( pLb->GetSelectEntryColor() );
+ if( nLightSource == 7 &&
+ aColor.GetRed()==9&&aColor.GetGreen()==4&&aColor.GetBlue()==67)
+ {
+ aFtLightX.Show();
+ aFtLightY.Show();
+ aFtLightZ.Show();
+ aGrpLightInfo.Show();
+ }
+ *pLightGroup = *aCtlLightPreview.GetPreviewControl().GetLightGroup();
+
+ pLightGroup->SetIntensity( aColor,
+ Base3DMaterialDiffuse,
+ (Base3DLightNumber) nLightSource );
+
+ Image aImg( pBtn->GetImage() );
+ pLightGroup->Enable( aImg == aImgLightOn,
+ (Base3DLightNumber) nLightSource );
+
+ aCtlLightPreview.GetPreviewControl().SetLightGroup( pLightGroup );
+ aCtlLightPreview.GetPreviewControl().SelectLight( (Base3DLightNumber) nLightSource );
+ aCtlLightPreview.CheckSelection();
+
+ //aCtlPreview.SetLightGroup( pLightGroup );
+ }
+ return( 0L );
+}
+
+
+// -----------------------------------------------------------------------
+IMPL_LINK( Svx3DWin, DoubleClickHdl, void*, p )
+{
+ //USHORT nItemId = aCtlFavorites.GetSelectItemId();
+
+ //SfxItemSet* pSet = (SfxItemSet*) pFavorSetList->GetObject( nItemId - 1 );
+ //Update( *pSet );
+
+ // und zuweisen
+ ClickAssignHdl( NULL );
+
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( Svx3DWin, ClickFavoriteHdl, void*, p )
+{
+ USHORT nItemId = aCtlFavorites.GetSelectItemId();
+
+ if( nItemId > 0 )
+ {
+ // neues, leeres Model generieren
+ if(pModel)
+ delete pModel;
+ pModel = new FmFormModel();
+ pModel->GetItemPool().FreezeIdRanges();
+
+ if( GalleryExplorer::GetSdrObj( GALLERY_THEME_3D, nItemId-1, pModel ) )
+ {
+ // VDev
+ if( pVDev == NULL )
+ {
+ pVDev = new VirtualDevice();
+ MapMode aMapMode( MAP_100TH_MM );
+ pVDev->SetMapMode( aMapMode );
+ }
+ // 3D View
+ E3dView a3DView( pModel, pVDev );
+ a3DView.SetMarkHdlHidden(TRUE);
+
+ // PageView
+ SdrPageView* pPageView = a3DView.ShowPagePgNum( 0, Point() );
+ a3DView.MarkAll();
+
+ // Status der Selektion am Preview setzen, SYNCHRON
+ SfxBoolItem aItem( SID_3D_STATE, TRUE );
+ SFX_DISPATCHER().Execute( SID_3D_STATE, SFX_CALLMODE_SYNCHRON |
+ SFX_CALLMODE_RECORD, &aItem, 0L );
+
+ // Attribute des Favoriten holen und setzen
+ SfxItemSet* pSet;
+ if( aBtnOnly3D.IsChecked())
+ {
+ // Normale (nicht-3D-) Attribute an der View
+ pSet = new SfxItemSet(
+ pModel->GetItemPool(),
+ SDRATTR_SHADOW, SDRATTR_SHADOW,
+ SID_ATTR_3D_START, SID_ATTR_3D_END, 0);
+ }
+ else
+ {
+ // Alle Attribute an der View
+ pSet = new SfxItemSet( // pModel->GetItemPool());
+ pModel->GetItemPool(),
+ SDRATTR_START, SDRATTR_END,
+ SID_ATTR_3D_START, SID_ATTR_3D_END, 0);
+ }
+
+ // Eingeschraenktes Set produzieren und zuweisen
+ pSet->Put( a3DView.Get3DAttributes(), FALSE );
+
+ // #61783# Remove distance and focus from prototypes
+ pSet->ClearItem(SID_ATTR_3D_DISTANCE);
+ pSet->ClearItem(SID_ATTR_3D_FOCAL_LENGTH);
+
+ aCtlPreview.Set3DAttributes( *pSet );
+
+ BOOL bOldUpdate = bUpdate;
+ bUpdate = FALSE;
+ Update( *pSet );
+ bUpdate = bOldUpdate;
+
+ delete pSet;
+ }
+ }
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( Svx3DWin, ChangeLightCallbackHdl, void*, p )
+{
+ *pLightGroup = *aCtlLightPreview.GetPreviewControl().GetLightGroup();
+ //aCtlPreview.SetLightGroup( pLightGroup );
+
+ // Setzen der Vector Informationen
+ Base3DLightNumber eLight = aCtlLightPreview.GetPreviewControl().GetSelectedLight();
+ if( eLight != Base3DLightNone && aFtLightX.IsVisible() )
+ {
+ Vector3D aVector = pLightGroup->GetDirection( eLight );
+ aVector.Normalize();
+
+ String aStr;
+
+ aStr = String(SVX_RES(RID_SVXFLOAT3D_FIX_X));
+ aStr += sal_Unicode(' ');
+ aStr += String::CreateFromInt32((INT32)(aVector.X()*1000.0));
+ aFtLightX.SetText( aStr );
+
+ aStr = String(SVX_RES(RID_SVXFLOAT3D_FIX_Y));
+ aStr += sal_Unicode(' ');
+ aStr += String::CreateFromInt32((INT32)(aVector.Y()*1000.0));
+ aFtLightY.SetText( aStr );
+
+ aStr = String(SVX_RES(RID_SVXFLOAT3D_FIX_Z));
+ aStr += sal_Unicode(' ');
+ aStr += String::CreateFromInt32((INT32)(aVector.Z()*1000.0));
+ aFtLightZ.SetText( aStr );
+ }
+ return( 0L );
+}
+
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( Svx3DWin, ChangeSelectionCallbackHdl, void*, p )
+{
+ Base3DLightNumber eLight = aCtlLightPreview.GetPreviewControl().GetSelectedLight();
+
+ PushButton* pBtn = NULL;
+
+ switch( eLight )
+ {
+ case 0: pBtn = &aBtnLight1; break;
+ case 1: pBtn = &aBtnLight2; break;
+ case 2: pBtn = &aBtnLight3; break;
+ case 3: pBtn = &aBtnLight4; break;
+ case 4: pBtn = &aBtnLight5; break;
+ case 5: pBtn = &aBtnLight6; break;
+ case 6: pBtn = &aBtnLight7; break;
+ case 7: pBtn = &aBtnLight8; break;
+ }
+
+ if( pBtn )
+ ClickHdl( pBtn );
+ else
+ {
+ // Zustand: Keine Lampe selektiert
+ if( aBtnLight1.IsChecked() )
+ {
+ aBtnLight1.Check( FALSE );
+ aLbLight1.Enable( FALSE );
+ }
+ else if( aBtnLight2.IsChecked() )
+ {
+ aBtnLight2.Check( FALSE );
+ aLbLight2.Enable( FALSE );
+ }
+ else if( aBtnLight3.IsChecked() )
+ {
+ aBtnLight3.Check( FALSE );
+ aLbLight3.Enable( FALSE );
+ }
+ else if( aBtnLight4.IsChecked() )
+ {
+ aBtnLight4.Check( FALSE );
+ aLbLight4.Enable( FALSE );
+ }
+ else if( aBtnLight5.IsChecked() )
+ {
+ aBtnLight5.Check( FALSE );
+ aLbLight5.Enable( FALSE );
+ }
+ else if( aBtnLight6.IsChecked() )
+ {
+ aBtnLight6.Check( FALSE );
+ aLbLight6.Enable( FALSE );
+ }
+ else if( aBtnLight7.IsChecked() )
+ {
+ aBtnLight7.Check( FALSE );
+ aLbLight7.Enable( FALSE );
+ }
+ else if( aBtnLight8.IsChecked() )
+ {
+ aBtnLight8.Check( FALSE );
+ aLbLight8.Enable( FALSE );
+ }
+ aBtnLightColor.Enable( FALSE );
+ }
+
+ if( eLight != Base3DLightNone && aFtLightX.IsVisible() )
+ {
+ Vector3D aVector = pLightGroup->GetDirection( eLight );
+ aVector.Normalize();
+
+ String aStr;
+
+ aStr = String(SVX_RES(RID_SVXFLOAT3D_FIX_X));
+ aStr += sal_Unicode(' ');
+ aStr += String::CreateFromInt32((INT32)(aVector.X()*1000.0));
+ aFtLightX.SetText( aStr );
+
+ aStr = String(SVX_RES(RID_SVXFLOAT3D_FIX_Y));
+ aStr += sal_Unicode(' ');
+ aStr += String::CreateFromInt32((INT32)(aVector.Y()*1000.0));
+ aFtLightY.SetText( aStr );
+
+ aStr = String(SVX_RES(RID_SVXFLOAT3D_FIX_Z));
+ aStr += sal_Unicode(' ');
+ aStr += String::CreateFromInt32((INT32)(aVector.Z()*1000.0));
+ aFtLightZ.SetText( aStr );
+ }
+
+ return( 0L );
+}
+
+// -----------------------------------------------------------------------
+// Methode um sicherzustellen, dass die LB auch mit einer Farbe gesetzt ist
+// Liefert TRUE zurueck, falls Farbe hinzugefuegt wurde
+// -----------------------------------------------------------------------
+BOOL Svx3DWin::LBSelectColor( ColorLB* pLb, const Color& rColor )
+{
+ BOOL bRet = FALSE;
+
+ pLb->SetNoSelection();
+ pLb->SelectEntry( rColor );
+ if( pLb->GetSelectEntryCount() == 0 )
+ {
+ String aStr(SVX_RES(RID_SVXFLOAT3D_FIX_R));
+
+ aStr += String::CreateFromInt32((INT32)rColor.GetRed());
+ aStr += sal_Unicode(' ');
+ aStr += String(SVX_RES(RID_SVXFLOAT3D_FIX_G));
+ aStr += String::CreateFromInt32((INT32)rColor.GetGreen());
+ aStr += sal_Unicode(' ');
+ aStr += String(SVX_RES(RID_SVXFLOAT3D_FIX_B));
+ aStr += String::CreateFromInt32((INT32)rColor.GetBlue());
+
+ USHORT nPos = pLb->InsertEntry( rColor, aStr );
+ pLb->SelectEntryPos( nPos );
+ bRet = TRUE;
+ }
+ return( bRet );
+}
+
+// -----------------------------------------------------------------------
+void Svx3DWin::UpdatePreview()
+{
+ if( pModel == NULL )
+ pModel = new FmFormModel();
+
+ if(bOnly3DChanged)
+ {
+ // slot executen
+ SfxBoolItem aItem( SID_3D_STATE, TRUE );
+ SFX_DISPATCHER().Execute( SID_3D_STATE, SFX_CALLMODE_SYNCHRON |
+ SFX_CALLMODE_RECORD, &aItem, 0L );
+ // Flag zuruecksetzen
+ bOnly3DChanged = FALSE;
+
+ // Favorit nochmals anwenden
+ ClickFavoriteHdl(0);
+ }
+
+ // ItemSet besorgen
+ SfxItemSet aSet( pModel->GetItemPool(),
+ SDRATTR_START, SDRATTR_END,
+ SID_ATTR_3D_START, SID_ATTR_3D_END,
+ 0 );
+
+ // Attribute holen und im Preview setzen
+ GetAttr( aSet );
+ aCtlPreview.Set3DAttributes( aSet );
+ aCtlFavorites.SetNoSelection();
+}
+
+// -----------------------------------------------------------------------
+void Svx3DWin::InitColorLB( const SdrModel* pDoc )
+{
+ aLbLight1.Fill( pDoc->GetColorTable() );
+ aLbLight2.CopyEntries( aLbLight1 );
+ aLbLight3.CopyEntries( aLbLight1 );
+ aLbLight4.CopyEntries( aLbLight1 );
+ aLbLight5.CopyEntries( aLbLight1 );
+ aLbLight6.CopyEntries( aLbLight1 );
+ aLbLight7.CopyEntries( aLbLight1 );
+ aLbLight8.CopyEntries( aLbLight1 );
+ aLbAmbientlight.CopyEntries( aLbLight1 );
+ aLbMatColor.CopyEntries( aLbLight1 );
+ aLbMatEmission.CopyEntries( aLbLight1 );
+ aLbMatSpecular.CopyEntries( aLbLight1 );
+
+ // Erstmal...
+ Color aColWhite( COL_WHITE );
+ Color aColBlack( COL_BLACK );
+ aLbLight1.SelectEntry( aColWhite );
+ aLbLight2.SelectEntry( aColWhite );
+ aLbLight3.SelectEntry( aColWhite );
+ aLbLight4.SelectEntry( aColWhite );
+ aLbLight5.SelectEntry( aColWhite );
+ aLbLight6.SelectEntry( aColWhite );
+ aLbLight7.SelectEntry( aColWhite );
+ aLbLight8.SelectEntry( aColWhite );
+ aLbAmbientlight.SelectEntry( aColBlack );
+ aLbMatColor.SelectEntry( aColWhite );
+ aLbMatEmission.SelectEntry( aColBlack );
+ aLbMatSpecular.SelectEntry( aColWhite );
+}
+
+// -----------------------------------------------------------------------
+USHORT Svx3DWin::GetLightSource( const PushButton* pBtn )
+{
+ USHORT nLight = 8;
+
+ if( pBtn == NULL )
+ {
+ if( aBtnLight1.IsChecked() )
+ nLight = 0;
+ else if( aBtnLight2.IsChecked() )
+ nLight = 1;
+ else if( aBtnLight3.IsChecked() )
+ nLight = 2;
+ else if( aBtnLight4.IsChecked() )
+ nLight = 3;
+ else if( aBtnLight5.IsChecked() )
+ nLight = 4;
+ else if( aBtnLight6.IsChecked() )
+ nLight = 5;
+ else if( aBtnLight7.IsChecked() )
+ nLight = 6;
+ else if( aBtnLight8.IsChecked() )
+ nLight = 7;
+ }
+ else
+ {
+ if( pBtn == &aBtnLight1 )
+ nLight = 0;
+ else if( pBtn == &aBtnLight2 )
+ nLight = 1;
+ else if( pBtn == &aBtnLight3 )
+ nLight = 2;
+ else if( pBtn == &aBtnLight4 )
+ nLight = 3;
+ else if( pBtn == &aBtnLight5 )
+ nLight = 4;
+ else if( pBtn == &aBtnLight6 )
+ nLight = 5;
+ else if( pBtn == &aBtnLight7 )
+ nLight = 6;
+ else if( pBtn == &aBtnLight8 )
+ nLight = 7;
+ }
+ return( nLight );
+};
+
+// -----------------------------------------------------------------------
+ColorLB* Svx3DWin::GetLbByButton( const PushButton* pBtn )
+{
+ ColorLB* pLb = NULL;
+
+ if( pBtn == NULL )
+ {
+ if( aBtnLight1.IsChecked() )
+ pLb = &aLbLight1;
+ else if( aBtnLight2.IsChecked() )
+ pLb = &aLbLight2;
+ else if( aBtnLight3.IsChecked() )
+ pLb = &aLbLight3;
+ else if( aBtnLight4.IsChecked() )
+ pLb = &aLbLight4;
+ else if( aBtnLight5.IsChecked() )
+ pLb = &aLbLight5;
+ else if( aBtnLight6.IsChecked() )
+ pLb = &aLbLight6;
+ else if( aBtnLight7.IsChecked() )
+ pLb = &aLbLight7;
+ else if( aBtnLight8.IsChecked() )
+ pLb = &aLbLight8;
+ }
+ else
+ {
+ if( pBtn == &aBtnLight1 )
+ pLb = &aLbLight1;
+ else if( pBtn == &aBtnLight2 )
+ pLb = &aLbLight2;
+ else if( pBtn == &aBtnLight3 )
+ pLb = &aLbLight3;
+ else if( pBtn == &aBtnLight4 )
+ pLb = &aLbLight4;
+ else if( pBtn == &aBtnLight5 )
+ pLb = &aLbLight5;
+ else if( pBtn == &aBtnLight6 )
+ pLb = &aLbLight6;
+ else if( pBtn == &aBtnLight7 )
+ pLb = &aLbLight7;
+ else if( pBtn == &aBtnLight8 )
+ pLb = &aLbLight8;
+ }
+ return( pLb );
+};
+
+/*************************************************************************
+|*
+|* Ableitung vom SfxChildWindow als "Behaelter" fuer Effekte
+|*
+\************************************************************************/
+__EXPORT Svx3DChildWindow::Svx3DChildWindow( Window* pParent,
+ USHORT nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo ) :
+ SfxChildWindow( pParent, nId )
+{
+ Svx3DWin* pWin = new Svx3DWin( pBindings, this, pParent );
+ pWindow = pWin;
+
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+
+ pWin->Initialize( pInfo );
+}
+
+/*************************************************************************
+|*
+|* ControllerItem fuer 3DStatus
+|*
+\************************************************************************/
+Svx3DCtrlItem::Svx3DCtrlItem( USHORT nId,
+ Svx3DWin* pWin,
+ SfxBindings* pBindings) :
+ SfxControllerItem( nId, *pBindings ),
+ p3DWin( pWin )
+{
+}
+
+// -----------------------------------------------------------------------
+void __EXPORT Svx3DCtrlItem::StateChanged( USHORT nSId,
+ SfxItemState eState, const SfxPoolItem* pItem )
+{
+ /*
+ if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_3D_STATE )
+ {
+ const SfxUInt32Item* pStateItem = PTR_CAST( SfxUInt32Item, pItem );
+ DBG_ASSERT( pStateItem, "SfxUInt32Item erwartet");
+ UINT32 nState = pStateItem->GetValue();
+ p3DWin->bCount = (BOOL) (nState & 3D_COUNT);
+ }
+ */
+}
+
+/*************************************************************************
+|*
+|* ControllerItem fuer Status Slot SID_CONVERT_TO_3D
+|*
+\************************************************************************/
+
+SvxConvertTo3DItem::SvxConvertTo3DItem(UINT16 nId, SfxBindings* pBindings)
+: SfxControllerItem(nId, *pBindings),
+ bState(FALSE)
+{
+}
+
+void SvxConvertTo3DItem::StateChanged(UINT16 nId, SfxItemState eState, const SfxPoolItem* pState)
+{
+ BOOL bNewState = (eState != SFX_ITEM_DISABLED);
+ if(bNewState != bState)
+ {
+ bState = bNewState;
+ SfxBoolItem aItem( SID_3D_STATE, TRUE );
+ SFX_DISPATCHER().Execute(SID_3D_STATE, SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD, &aItem, 0L);
+ }
+}
+
+
diff --git a/svx/source/engine3d/float3d.src b/svx/source/engine3d/float3d.src
new file mode 100644
index 0000000000..2dde6a9503
--- /dev/null
+++ b/svx/source/engine3d/float3d.src
@@ -0,0 +1,3377 @@
+/*************************************************************************
+ *
+ * $RCSfile: float3d.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "float3d.hrc"
+#define WIDTH 158
+#define HEIGHT 197
+#define HEIGHT 209
+#define BORDER 3
+#define BUTTON_WIDTH 13
+#define BUTTON_HEIGHT 13
+#define VT_BUTTON_WIDTH 18
+#define GROUP_Y (BORDER + BUTTON_HEIGHT + 3)
+#define GROUP_HEIGHT 95
+#define GROUP_WIDTH (WIDTH - 2 * BORDER)
+#define GROUP_PREV_X 60
+#define GROUP_PREV_Y (GROUP_Y + GROUP_HEIGHT + 1)
+#define GROUP_PREV_WIDTH (WIDTH - BORDER - GROUP_PREV_X)
+#define GROUP_PREV_HEIGHT (HEIGHT - GROUP_PREV_Y - BORDER)
+#define BUTTON_SIZE MAP_APPFONT( BUTTON_WIDTH, BUTTON_WIDTH );
+#ifndef STD_MASKCOLOR
+#define STD_MASKCOLOR Color { Red=0xC000; Green=0xC000; Blue=0xC000; }
+#endif
+DockingWindow RID_SVXFLOAT_3D
+{
+ HelpID = SID_3D_WIN ;
+ Border = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Sizeable = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Dockable = TRUE ;
+ EnableResizing = TRUE ;
+ Size = MAP_APPFONT ( WIDTH , HEIGHT ) ;
+ Text = "3D-Effekte" ;
+ Text [ ENGLISH ] = "3-D Effects" ;
+ Text [ english_us ] = "3D Effects" ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ ImageButton BTN_FAVORITES
+ {
+ Pos = MAP_APPFONT ( 4 , BORDER ) ;
+ Size = MAP_APPFONT ( VT_BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Favoriten" ;
+ QuickHelpText [ ENGLISH ] = "Favorites" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "3dfavor.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText [ portuguese ] = "Favoritos" ;
+ QuickHelpText [ english_us ] = "Favorites" ;
+ QuickHelpText [ portuguese_brazilian ] = "Favoriten" ;
+ QuickHelpText [ swedish ] = "Favoriter" ;
+ QuickHelpText [ danish ] = "Favoriter" ;
+ QuickHelpText [ italian ] = "Preferiti" ;
+ QuickHelpText [ spanish ] = "Favoritos" ;
+ QuickHelpText [ french ] = "Favoris" ;
+ QuickHelpText [ dutch ] = "Favorieten" ;
+ QuickHelpText[ russian ] = "Èçáðàííûå";
+ QuickHelpText[ polish ] = "Ulubione";
+ QuickHelpText[ japanese ] = "‚¨‹C‚É“ü‚è";
+ QuickHelpText[ chinese_simplified ] = "ÊÕ²Ø";
+ QuickHelpText[ chinese_traditional ] = "§Úªº³Ì·R";
+ QuickHelpText[ arabic ] = "ÇáãÝÖá";
+ QuickHelpText[ dutch ] = "Favorieten";
+ QuickHelpText[ chinese_simplified ] = "ÊÕ²Ø";
+ QuickHelpText[ greek ] = "ÁãáðçìÝíá";
+ QuickHelpText[ korean ] = "Favorites";
+ };
+ ImageButton BTN_GEO
+ {
+ Pos = MAP_APPFONT ( 22 , BORDER ) ;
+ Size = MAP_APPFONT ( VT_BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Geometrie" ;
+ QuickHelpText [ ENGLISH ] = "Geometry" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "3dgeo.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText [ portuguese ] = "Geometria" ;
+ QuickHelpText [ english_us ] = "Geometry" ;
+ QuickHelpText [ portuguese_brazilian ] = "Geometrie" ;
+ QuickHelpText [ swedish ] = "Geometri" ;
+ QuickHelpText [ danish ] = "Geometri" ;
+ QuickHelpText [ italian ] = "Geometria" ;
+ QuickHelpText [ spanish ] = "Geometría" ;
+ QuickHelpText [ french ] = "Géométrie" ;
+ QuickHelpText [ dutch ] = "Geometrie" ;
+ QuickHelpText[ russian ] = "Ãåîìåòðèÿ";
+ QuickHelpText[ polish ] = "Geometria";
+ QuickHelpText[ japanese ] = "Šô‰½Šw";
+ QuickHelpText[ chinese_simplified ] = "¼¸ºÎ";
+ QuickHelpText[ chinese_traditional ] = "¤L¦ó";
+ QuickHelpText[ arabic ] = "ÇáåäÏÓÉ";
+ QuickHelpText[ dutch ] = "Geometrie";
+ QuickHelpText[ chinese_simplified ] = "¼¸ºÎ";
+ QuickHelpText[ greek ] = "Ãåùìåôñßá";
+ QuickHelpText[ korean ] = "Geometry";
+ };
+ ImageButton BTN_REPRESENTATION
+ {
+ Pos = MAP_APPFONT ( 40 , BORDER ) ;
+ Size = MAP_APPFONT ( VT_BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Darstellung" ;
+ QuickHelpText [ ENGLISH ] = "Representation" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "3drepres.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText [ portuguese ] = "Apresentação" ;
+ QuickHelpText [ english_us ] = "Material Properties" ;
+ QuickHelpText [ portuguese_brazilian ] = "Darstellung" ;
+ QuickHelpText [ swedish ] = "Visning" ;
+ QuickHelpText [ danish ] = "Visning" ;
+ QuickHelpText [ italian ] = "Rappresentazione" ;
+ QuickHelpText [ spanish ] = "Representación" ;
+ QuickHelpText [ french ] = "Représentation" ;
+ QuickHelpText [ dutch ] = "Weergave" ;
+ QuickHelpText[ russian ] = "Ïðåäñòàâëåíèå";
+ QuickHelpText[ polish ] = "Przedstawienie";
+ QuickHelpText[ japanese ] = "•\\Ž¦";
+ QuickHelpText[ chinese_simplified ] = "ÏÔʾ";
+ QuickHelpText[ chinese_traditional ] = "Åã¥Ü";
+ QuickHelpText[ arabic ] = "ÇáÚÑÖ";
+ QuickHelpText[ dutch ] = "Weergave";
+ QuickHelpText[ chinese_simplified ] = "ÏÔʾ";
+ QuickHelpText[ greek ] = "ÅìöÜíéóç";
+ QuickHelpText[ korean ] = "Material Properties";
+ };
+ ImageButton BTN_LIGHT
+ {
+ Pos = MAP_APPFONT ( 58 , BORDER ) ;
+ Size = MAP_APPFONT ( VT_BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Beleuchtung" ;
+ QuickHelpText [ ENGLISH ] = "Lighting" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "3dlight.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText [ portuguese ] = "Iluminação" ;
+ QuickHelpText [ english_us ] = "Illumination" ;
+ QuickHelpText [ portuguese_brazilian ] = "Beleuchtung" ;
+ QuickHelpText [ swedish ] = "Belysning" ;
+ QuickHelpText [ danish ] = "Belysning" ;
+ QuickHelpText [ italian ] = "Illuminazione" ;
+ QuickHelpText [ spanish ] = "Iluminación" ;
+ QuickHelpText [ french ] = "Eclairage" ;
+ QuickHelpText [ dutch ] = "Belichting" ;
+ QuickHelpText[ russian ] = "Îñâåùåíèå";
+ QuickHelpText[ polish ] = "Oœwietlenie";
+ QuickHelpText[ japanese ] = "Æ–¾";
+ QuickHelpText[ chinese_simplified ] = "ÕÕÃ÷";
+ QuickHelpText[ chinese_traditional ] = "·Ó©ú";
+ QuickHelpText[ arabic ] = "ÇáÅÖÇÁÉ";
+ QuickHelpText[ dutch ] = "Belichting";
+ QuickHelpText[ chinese_simplified ] = "ÕÕÃ÷";
+ QuickHelpText[ greek ] = "Öùôéóìüò";
+ QuickHelpText[ korean ] = "Illumination";
+ };
+ ImageButton BTN_TEXTURE
+ {
+ Pos = MAP_APPFONT ( 76 , BORDER ) ;
+ Size = MAP_APPFONT ( VT_BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Texturen" ;
+ QuickHelpText [ ENGLISH ] = "Textures" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "3dtextur.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Texturas" ;
+ QuickHelpText [ english_us ] = "Textures" ;
+ QuickHelpText [ portuguese_brazilian ] = "Texturen" ;
+ QuickHelpText [ swedish ] = "Texturer" ;
+ QuickHelpText [ danish ] = "Teksturer" ;
+ QuickHelpText [ italian ] = "Strutture" ;
+ QuickHelpText [ spanish ] = "Texturas" ;
+ QuickHelpText [ french ] = "Textures" ;
+ QuickHelpText [ dutch ] = "Texturen" ;
+ QuickHelpText[ russian ] = "Òåêñòóðû";
+ QuickHelpText[ polish ] = "Tekstury";
+ QuickHelpText[ japanese ] = "ø½Á­±";
+ QuickHelpText[ chinese_simplified ] = "ÎÆÀí";
+ QuickHelpText[ chinese_traditional ] = "¤å²z";
+ QuickHelpText[ arabic ] = "ÃäÓÌÉ";
+ QuickHelpText[ dutch ] = "Texturen";
+ QuickHelpText[ chinese_simplified ] = "ÎÆÀí";
+ QuickHelpText[ greek ] = "ÕöÞ";
+ QuickHelpText[ korean ] = "Textures";
+ };
+ ImageButton BTN_MATERIAL
+ {
+ Pos = MAP_APPFONT ( 94 , BORDER ) ;
+ Size = MAP_APPFONT ( VT_BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ TabStop = TRUE ;
+ QuickHelpText = "Material" ;
+ QuickHelpText [ ENGLISH ] = "Material" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "material.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText [ portuguese ] = "Material" ;
+ QuickHelpText [ english_us ] = "Material" ;
+ QuickHelpText [ portuguese_brazilian ] = "Material" ;
+ QuickHelpText [ swedish ] = "Material" ;
+ QuickHelpText [ danish ] = "Materiale" ;
+ QuickHelpText [ italian ] = "Materiale" ;
+ QuickHelpText [ spanish ] = "Material" ;
+ QuickHelpText [ french ] = "Matériau" ;
+ QuickHelpText [ dutch ] = "Materiaal" ;
+ QuickHelpText[ russian ] = "Ìàòåðèàë";
+ QuickHelpText[ polish ] = "Materia³";
+ QuickHelpText[ japanese ] = "‘fÞ";
+ QuickHelpText[ chinese_simplified ] = "²ÄÁÏ";
+ QuickHelpText[ chinese_traditional ] = "§÷®Æ";
+ QuickHelpText[ arabic ] = "ÇáãÇÏÉ";
+ QuickHelpText[ dutch ] = "Materiaal";
+ QuickHelpText[ chinese_simplified ] = "²ÄÁÏ";
+ QuickHelpText[ greek ] = "Õëéêü";
+ QuickHelpText[ korean ] = "Material";
+ };
+ ImageButton BTN_UPDATE
+ {
+ Pos = MAP_APPFONT ( WIDTH - BORDER - BUTTON_WIDTH * 2 , BORDER ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Aktualisieren" ;
+ QuickHelpText [ ENGLISH ] = "Update" ;
+ TabStop = TRUE ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10350.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText [ portuguese ] = "Actualizar" ;
+ QuickHelpText [ english_us ] = "Update" ;
+ QuickHelpText [ portuguese_brazilian ] = "Aktualisieren" ;
+ QuickHelpText [ swedish ] = "Uppdatera" ;
+ QuickHelpText [ danish ] = "Opdater" ;
+ QuickHelpText [ italian ] = "Aggiorna" ;
+ QuickHelpText [ spanish ] = "Actualizar" ;
+ QuickHelpText [ french ] = "Actualiser" ;
+ QuickHelpText [ dutch ] = "Actualiseren" ;
+ QuickHelpText[ russian ] = "Îáíîâèòü";
+ QuickHelpText[ polish ] = "Aktualizuj";
+ QuickHelpText[ japanese ] = "XV‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "¸üÐÂ";
+ QuickHelpText[ chinese_traditional ] = "§ó·s";
+ QuickHelpText[ arabic ] = "ÊÍÏíË";
+ QuickHelpText[ dutch ] = "Actualiseren";
+ QuickHelpText[ chinese_simplified ] = "¸üÐÂ";
+ QuickHelpText[ greek ] = "ÅíçìÝñùóç";
+ QuickHelpText[ korean ] = "Update";
+ };
+ ImageButton BTN_ASSIGN
+ {
+ Pos = MAP_APPFONT ( WIDTH - BORDER - BUTTON_WIDTH , BORDER ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Zuweisen" ;
+ QuickHelpText [ ENGLISH ] = "Assign" ;
+ TabStop = TRUE ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "apply.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText [ portuguese ] = "Atribuir" ;
+ QuickHelpText [ english_us ] = "Assign" ;
+ QuickHelpText [ portuguese_brazilian ] = "Zuweisen" ;
+ QuickHelpText [ swedish ] = "Tilldela" ;
+ QuickHelpText [ danish ] = "Tildel" ;
+ QuickHelpText [ italian ] = "Assegna" ;
+ QuickHelpText [ spanish ] = "Asignar" ;
+ QuickHelpText [ french ] = "Assigner" ;
+ QuickHelpText [ dutch ] = "Toewijzen" ;
+ QuickHelpText[ russian ] = "Ïðèñâîèòü";
+ QuickHelpText[ polish ] = "Przypisz";
+ QuickHelpText[ japanese ] = "Š„‚è“–‚Ä‚é";
+ QuickHelpText[ chinese_simplified ] = "Ö¸¶¨";
+ QuickHelpText[ chinese_traditional ] = "«ü©w";
+ QuickHelpText[ arabic ] = "ÊÚííä";
+ QuickHelpText[ dutch ] = "Toewijzen";
+ QuickHelpText[ chinese_simplified ] = "Ö¸¶¨";
+ QuickHelpText[ greek ] = "Áíôéóôïß÷éóç";
+ QuickHelpText[ korean ] = "Assign";
+ };
+ // Unterer Teil
+ ImageButton BTN_CHANGE_TO_3D
+ {
+ Pos = MAP_APPFONT ( BORDER , HEIGHT - BUTTON_HEIGHT - BORDER ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Umwandeln in 3D" ;
+ QuickHelpText [ ENGLISH ] = "Convert to 3D" ;
+ TabStop = TRUE ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "convrt3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Converte em 3-D" ;
+ QuickHelpText [ english_us ] = "Convert to 3D" ;
+ QuickHelpText [ portuguese_brazilian ] = "Umwandeln in 3D" ;
+ QuickHelpText [ swedish ] = "Omvandla till 3D" ;
+ QuickHelpText [ danish ] = "Konverter til 3D" ;
+ QuickHelpText [ italian ] = "Converti in 3D" ;
+ QuickHelpText [ spanish ] = "Convertir en 3D" ;
+ QuickHelpText [ french ] = "Convertir en 3 D" ;
+ QuickHelpText [ dutch ] = "Converteren naar 3D" ;
+ QuickHelpText[ russian ] = "Ïðåîáðàçîâàòü â 3-Ì";
+ QuickHelpText[ polish ] = "Konwertuj na 3-W";
+ QuickHelpText[ japanese ] = "3D‚É•ÏŠ·";
+ QuickHelpText[ chinese_simplified ] = "ת»»³É 3 ά";
+ QuickHelpText[ chinese_traditional ] = "ÂàÅܦ¨ 3 ºû";
+ QuickHelpText[ arabic ] = "ÊÍæíá Åáì ËáÇËí ÇáÃÈÚÇÏ";
+ QuickHelpText[ dutch ] = "Converteren naar 3D";
+ QuickHelpText[ chinese_simplified ] = "ת»»³É 3 ά";
+ QuickHelpText[ greek ] = "ÌåôáôñïðÞ óå 3 D";
+ QuickHelpText[ korean ] = "Convert to 3D";
+ };
+ ImageButton BTN_LATHE_OBJ
+ {
+ Pos = MAP_APPFONT ( BORDER + BUTTON_WIDTH + 1 , HEIGHT - BUTTON_HEIGHT - BORDER ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Umwandeln in Rotationskörper" ;
+ QuickHelpText [ ENGLISH ] = "Convert to lathe object" ;
+ TabStop = TRUE ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "rotate3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Converte em objecto de rotação" ;
+ QuickHelpText [ english_us ] = "Convert to Lathe Object" ;
+ QuickHelpText [ portuguese_brazilian ] = "Umwandeln in Rotationskörper" ;
+ QuickHelpText [ swedish ] = "Omvandla till rotationsobjekt" ;
+ QuickHelpText [ danish ] = "Konverter til rotationslegeme" ;
+ QuickHelpText [ italian ] = "Converti in corpo di rotazione" ;
+ QuickHelpText [ spanish ] = "Convertir en cuerpo de rotación" ;
+ QuickHelpText [ french ] = "Convertir en corps de révolution" ;
+ QuickHelpText [ dutch ] = "Veranderen in rotatieobjecten" ;
+ QuickHelpText[ russian ] = "Ïðåîáðàçîâàòü â òåëî âðàùåíèÿ";
+ QuickHelpText[ polish ] = "Konwertuj na obiekt obrotowy";
+ QuickHelpText[ japanese ] = "‰ñ“]‘Ì‚É•ÏŠ·";
+ QuickHelpText[ chinese_simplified ] = "ת»»³ÉÐýתÌå";
+ QuickHelpText[ chinese_traditional ] = "ÂàÅܦ¨±ÛÂàÅé";
+ QuickHelpText[ arabic ] = "ÊÍæíá Åáì ßÇÆä ÇÓÊÏÇÑÉ";
+ QuickHelpText[ dutch ] = "Veranderen in rotatieobjecten";
+ QuickHelpText[ chinese_simplified ] = "ת»»³ÉÐýתÌå";
+ QuickHelpText[ greek ] = "ÌåôáôñïðÞ óå áíôéêåßìåíï ðåñéóôñïöÞò";
+ QuickHelpText[ korean ] = "Convert to Lathe Object";
+ };
+ ImageButton BTN_PERSPECTIVE
+ {
+ Pos = MAP_APPFONT ( BORDER + ( BUTTON_WIDTH + 1 ) * 2 , HEIGHT - BUTTON_HEIGHT - BORDER ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Perspektive ein-/ausschalten" ;
+ QuickHelpText [ ENGLISH ] = "Perspective" ;
+ TabStop = TRUE ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "persp3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Activa/Desactiva Perspectiva" ;
+ QuickHelpText [ english_us ] = "Perspective On/Off" ;
+ QuickHelpText [ portuguese_brazilian ] = "Perspektive ein-/ausschalten" ;
+ QuickHelpText [ swedish ] = "Perspektiv på/av" ;
+ QuickHelpText [ danish ] = "Aktiver/deaktiver perspektiv" ;
+ QuickHelpText [ italian ] = "Attiva/disattiva prospettiva" ;
+ QuickHelpText [ spanish ] = "Activar/desactivar perspectiva" ;
+ QuickHelpText [ french ] = "Activer/désactiver la perspective" ;
+ QuickHelpText [ dutch ] = "Perspectief in-/uitschakelen" ;
+ QuickHelpText[ russian ] = "Âêë./âûêë. ïåðñïåêòèâó";
+ QuickHelpText[ polish ] = "W³¹cz/Wy³¹cz perspektywê";
+ QuickHelpText[ japanese ] = "‰“‹ß–@ µÝ/µÌ";
+ QuickHelpText[ chinese_simplified ] = "ÏÔʾ/ÒþÈë͸ÊÓ";
+ QuickHelpText[ chinese_traditional ] = "Åã¥Ü/Áô¤J³zµø";
+ QuickHelpText[ arabic ] = "ÊÔÛíá/ÅíÞÇÝ ÇáãäÙæÑ";
+ QuickHelpText[ dutch ] = "Perspectief in-/uitschakelen";
+ QuickHelpText[ chinese_simplified ] = "ÏÔʾ/ÒþÈë͸ÊÓ";
+ QuickHelpText[ greek ] = "ÐñïïðôéêÞ Íáé/¼÷é";
+ QuickHelpText[ korean ] = "Perspective On/Off";
+ };
+ Control CTL_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( GROUP_PREV_X + 6 , GROUP_PREV_Y + 9 ) ;
+ Size = MAP_APPFONT ( GROUP_PREV_WIDTH - 12 , GROUP_PREV_HEIGHT - 15 ) ;
+ TabStop = TRUE ;
+ };
+ Control CTL_LIGHT_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( GROUP_PREV_X + 6 , GROUP_PREV_Y + 9 ) ;
+ Size = MAP_APPFONT ( GROUP_PREV_WIDTH - 12 , GROUP_PREV_HEIGHT - 15 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( GROUP_PREV_X , GROUP_PREV_Y ) ;
+ Size = MAP_APPFONT ( GROUP_PREV_WIDTH , GROUP_PREV_HEIGHT ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ english_us ] = "Preview" ;
+ Text [ portuguese_brazilian ] = "Vorschau" ;
+ Text [ swedish ] = "Förhandsvisning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ spanish ] = "Previsualización " ;
+ Text [ french ] = "Aperçu" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°";
+ Text[ chinese_traditional ] = "¹wÄý";
+ Text[ arabic ] = "ãÚÇíäÉ";
+ Text[ dutch ] = "Voorbeeld";
+ Text[ chinese_simplified ] = "Ô¤ÊÓ";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â";
+ Text[ turkish ] = "Önizleme";
+ };
+ // Favoriten
+ Control CTL_FAVORITES
+ {
+ //HelpId = HID_SD_CTL_FAVORITES ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( BORDER + 6 , GROUP_Y + 9 ) ;
+ Size = MAP_APPFONT ( GROUP_WIDTH - 12 , GROUP_HEIGHT - 15 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+ };
+ GroupBox GRP_FAVORITES
+ {
+ Pos = MAP_APPFONT ( BORDER , GROUP_Y ) ;
+ Size = MAP_APPFONT ( GROUP_WIDTH , GROUP_HEIGHT ) ;
+ Text = "Favoriten" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ english_us ] = "Favorites" ;
+ Text [ portuguese_brazilian ] = "Favoriten" ;
+ Text [ swedish ] = "Favoriter" ;
+ Text [ danish ] = "Favoriter" ;
+ Text [ italian ] = "Preferiti" ;
+ Text [ spanish ] = "Favoritos" ;
+ Text [ french ] = "Favoris" ;
+ Text [ dutch ] = "Favorieten" ;
+ Text [ portuguese ] = "Favoritos" ;
+ Text[ chinese_simplified ] = "ÊÕ²Ø";
+ Text[ russian ] = "Èçáðàííûå";
+ Text[ polish ] = "Ulubione";
+ Text[ japanese ] = "‚¨‹C‚É“ü‚è";
+ Text[ chinese_traditional ] = "§Úªº³Ì·R";
+ Text[ arabic ] = "ÇáãÝÖáÉ";
+ Text[ dutch ] = "Favorieten";
+ Text[ chinese_simplified ] = "ÊÕ²Ø";
+ Text[ greek ] = "ÐñïôéìÞóåéò";
+ Text[ korean ] = "Áñ°Ü ã±â";
+ Text[ turkish ] = "Sýk kullanýlanlar";
+ };
+ ImageButton BTN_ONLY_3D
+ {
+ Pos = MAP_APPFONT ( BORDER , GROUP_PREV_Y+1 ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Nur 3D-Attribute zuweisen" ;
+ QuickHelpText [ ENGLISH ] = "Assign only 3D attributes" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "only3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Atribui apenas atributos 3-D" ;
+ QuickHelpText [ english_us ] = "3D Attributes Only" ;
+ QuickHelpText [ portuguese_brazilian ] = "Nur 3D-Attribute zuweisen" ;
+ QuickHelpText [ swedish ] = "Tilldela bara 3D-attribut" ;
+ QuickHelpText [ danish ] = "Tildel kun 3D-attributter" ;
+ QuickHelpText [ italian ] = "Assegna solo attributi 3D" ;
+ QuickHelpText [ spanish ] = "Asignar sólo los atributos tridimensionales" ;
+ QuickHelpText [ french ] = "Assigner uniquement les attributs 3 D" ;
+ QuickHelpText [ dutch ] = "Alleen 3D-attributen toewijzen" ;
+ QuickHelpText[ russian ] = "Ïðèìåíèòü òîëüêî àòðèáóòû 3-Ì";
+ QuickHelpText[ polish ] = "Przypisz tylko atrybuty 3-W";
+ QuickHelpText[ japanese ] = "3D‚Ì‘®«‚Ì‚ÝŠ„‚è“–‚Ä";
+ QuickHelpText[ chinese_simplified ] = "Ö»Ö¸¶¨ 3 άÊôÐÔ";
+ QuickHelpText[ chinese_traditional ] = "¥u«ü©w 3 ºûÄÝ©Ê";
+ QuickHelpText[ arabic ] = "ÊÚííä ÓãÇÊ ËáÇËíÉ ÇáÃÈÚÇÏ ÝÞØ";
+ QuickHelpText[ dutch ] = "Alleen 3D-attributen toewijzen";
+ QuickHelpText[ chinese_simplified ] = "Ö»Ö¸¶¨ 3 άÊôÐÔ";
+ QuickHelpText[ greek ] = "Ìüíï éäéüôçôåò 3Ä";
+ QuickHelpText[ korean ] = "3D Attributes Only";
+ };
+ ImageButton BTN_ALL_ATTRIBUTES
+ {
+ Pos = MAP_APPFONT ( BORDER + BUTTON_WIDTH , GROUP_PREV_Y+1 ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Alle Attribute zuweisen" ;
+ QuickHelpText [ ENGLISH ] = "Assign all attributes" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "allattri.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Aplica todos os atributos" ;
+ QuickHelpText [ english_us ] = "Assign All Attributes" ;
+ QuickHelpText [ portuguese_brazilian ] = "Alle Attribute zuweisen" ;
+ QuickHelpText [ swedish ] = "Tilldela alla attribut" ;
+ QuickHelpText [ danish ] = "Tildel alle attributter" ;
+ QuickHelpText [ italian ] = "Assegna tutti gli attributi" ;
+ QuickHelpText [ spanish ] = "Asignar todos los atributos" ;
+ QuickHelpText [ french ] = "Appliquer tous les attributs" ;
+ QuickHelpText [ dutch ] = "Alle attributen toewijzen" ;
+ QuickHelpText[ russian ] = "Ïðèñâîèòü âñå àòðèáóòû";
+ QuickHelpText[ polish ] = "Przypisz wszystkie atrybuty";
+ QuickHelpText[ japanese ] = "‚·‚ׂĂ̑®«‚ðŠ„‚è“–‚Ä‚é";
+ QuickHelpText[ chinese_simplified ] = "·ÖÅäËùÓÐÊôÐÔ";
+ QuickHelpText[ chinese_traditional ] = "«ü©w©Ò¦³ªºÄÝ©Ê";
+ QuickHelpText[ arabic ] = "ÊÚííä ßá ÇáÓãÇÊ";
+ QuickHelpText[ dutch ] = "Alle attributen toewijzen";
+ QuickHelpText[ chinese_simplified ] = "·ÖÅäËùÓÐÊôÐÔ";
+ QuickHelpText[ greek ] = "Áíôéóôïß÷éóç üëùí ôùí éäéïôÞôùí";
+ QuickHelpText[ korean ] = "Assign All Attributes";
+ };
+ // Geometrie
+ FixedText FT_HORIZONTAL
+ {
+ Pos = MAP_APPFONT ( 13 , 37 ) ;
+ Size = MAP_APPFONT ( 43 , 10 ) ;
+ Text = "Horizontal" ;
+ Text [ ENGLISH ] = "Horizontal" ;
+ Text [ english_us ] = "Horizontal" ;
+ Text [ portuguese_brazilian ] = "Horizontal" ;
+ Text [ swedish ] = "Horisontell" ;
+ Text [ danish ] = "Vandret" ;
+ Text [ italian ] = "Orizzontale" ;
+ Text [ spanish ] = "Horizontal" ;
+ Text [ french ] = "horizontaux" ;
+ Text [ dutch ] = "Horizontaal" ;
+ Text [ portuguese ] = "Horizontal" ;
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò";
+ Text[ russian ] = "Ãîðèçîíòàëüíî";
+ Text[ polish ] = "Poziomo";
+ Text[ japanese ] = "…•½";
+ Text[ chinese_traditional ] = "¤ô¥­¤è¦V";
+ Text[ arabic ] = "ÃÝÞí";
+ Text[ dutch ] = "Horizontaal";
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò";
+ Text[ greek ] = "Ïñéæüíôéá";
+ Text[ korean ] = "¼öÆò";
+ Text[ turkish ] = "Yatay";
+ };
+ NumericField NUM_HORIZONTAL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 59 , 35 ) ;
+ Size = MAP_APPFONT ( 22 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 2 ;
+ First = 2 ;
+ Maximum = 256 ;
+ Last = 256 ;
+ };
+ FixedText FT_VERTICAL
+ {
+ Size = MAP_APPFONT ( 36 , 10 ) ;
+ Pos = MAP_APPFONT ( 85 , 37 ) ;
+ Text = "Vertikal" ;
+ Text [ ENGLISH ] = "Vertical" ;
+ Text [ english_us ] = "Vertical" ;
+ Text [ portuguese_brazilian ] = "Vertikal" ;
+ Text [ swedish ] = "Vertikal" ;
+ Text [ danish ] = "Lodret" ;
+ Text [ italian ] = "Verticale" ;
+ Text [ spanish ] = "Vertical" ;
+ Text [ french ] = "verticaux" ;
+ Text [ dutch ] = "Verticaal" ;
+ Text [ portuguese ] = "Vertical" ;
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò";
+ Text[ russian ] = "Âåðòèêàëüíî";
+ Text[ polish ] = "Pionowo";
+ Text[ japanese ] = "‚’¼";
+ Text[ chinese_traditional ] = "««ª½¤è¦V";
+ Text[ arabic ] = "ÑÃÓí";
+ Text[ dutch ] = "Verticaal";
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò";
+ Text[ greek ] = "Êáôáêüñõöá";
+ Text[ korean ] = "¼öÁ÷";
+ Text[ turkish ] = "Dikey";
+ };
+ NumericField NUM_VERTICAL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 124 , 35 ) ;
+ Size = MAP_APPFONT ( 22 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 2 ;
+ First = 2 ;
+ Maximum = 256 ;
+ Last = 256 ;
+ };
+ GroupBox GRP_SEGMENTS
+ {
+ Pos = MAP_APPFONT ( BORDER + 6 , GROUP_Y + 8 ) ;
+ Size = MAP_APPFONT ( GROUP_WIDTH - 2 * 6 , 24 ) ;
+ Text = "Segmente" ;
+ Text [ ENGLISH ] = "Segments" ;
+ Text [ english_us ] = "Segments" ;
+ Text [ portuguese_brazilian ] = "Segmente" ;
+ Text [ swedish ] = "Segment" ;
+ Text [ danish ] = "Segmenter" ;
+ Text [ italian ] = "Segmenti" ;
+ Text [ spanish ] = "Segmentos" ;
+ Text [ french ] = "Segments" ;
+ Text [ dutch ] = "Segmenten" ;
+ Text [ portuguese ] = "Segmentos" ;
+ Text[ chinese_simplified ] = "·Ö¶Î";
+ Text[ russian ] = "Ñåãìåíòû";
+ Text[ polish ] = "Segmenty";
+ Text[ japanese ] = "Ø•Ð";
+ Text[ chinese_traditional ] = "¤À¬q";
+ Text[ arabic ] = "ÞØÚ";
+ Text[ dutch ] = "Segmenten";
+ Text[ chinese_simplified ] = "·Ö¶Î";
+ Text[ greek ] = "ÔìÞìáôá";
+ Text[ korean ] = "¼¼±×¸ÕÆ®";
+ Text[ turkish ] = "Parçalar";
+ };
+ FixedText FT_PERCENT_DIAGONAL
+ {
+ Pos = MAP_APPFONT ( 9 , 56 ) ;
+ Size = MAP_APPFONT ( 72 , 10 ) ;
+ Text = "Kantenrundung" ;
+ Text [ ENGLISH ] = "Percent diagonal" ;
+ Text [ english_us ] = "Rounded edges" ;
+ Text [ portuguese_brazilian ] = "Kantenrundung" ;
+ Text [ swedish ] = "Rundade kanter" ;
+ Text [ danish ] = "Kant-afrunding" ;
+ Text [ italian ] = "Bordi arrotondati" ;
+ Text [ spanish ] = "Aristas redondeadas" ;
+ Text [ french ] = "Arrondi d'arêtes" ;
+ Text [ dutch ] = "Kantenronding" ;
+ Text [ portuguese ] = "Arredondar arestas" ;
+ Text[ chinese_simplified ] = "±ß½Ç±äÔ²";
+ Text[ russian ] = "Çàêðóãëåííûå êðàÿ";
+ Text[ polish ] = "Zaokr. krawêdzi";
+ Text[ japanese ] = "Šp‚ðŠÛ‚­‚·‚é";
+ Text[ chinese_traditional ] = "Ã䨤Åܶê";
+ Text[ arabic ] = "ÇÓÊÏÇÑÉ ÇáÍæÇÝ";
+ Text[ dutch ] = "Kantenronding";
+ Text[ chinese_simplified ] = "±ß½Ç±äÔ²";
+ Text[ greek ] = "ÁðïóôñïããõëåìÝíá Üêñá";
+ Text[ korean ] = "¸ð¼­¸® µÕ±Û¸²";
+ Text[ turkish ] = "Kenar eðimi";
+ };
+ MetricField MTR_PERCENT_DIAGONAL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 99 , 54 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ SpinSize = 5 ;
+ Maximum = 100 ;
+ Last = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ };
+ FixedText FT_BACKSCALE
+ {
+ Pos = MAP_APPFONT ( 9 , 70 ) ;
+ Size = MAP_APPFONT ( 72 , 10 ) ;
+ Text = "Tiefenskalierung" ;
+ Text [ ENGLISH ] = "Backscale" ;
+ Text [ portuguese ] = "Escala de profundidade" ;
+ Text [ english_us ] = "Scaled depth" ;
+ Text [ portuguese_brazilian ] = "Tiefenskalierung" ;
+ Text [ swedish ] = "Djupskalering" ;
+ Text [ danish ] = "Dybdeskalering" ;
+ Text [ italian ] = "Scala profondità" ;
+ Text [ spanish ] = "Escala de profundidad" ;
+ Text [ french ] = "Échelle de profondeur" ;
+ Text [ dutch ] = "Diepte op schaal brengen" ;
+ Text[ chinese_simplified ] = "Éî¶È±ÈÀý";
+ Text[ russian ] = "Ãëóáèííîå ìàñøòàáèðîâàíèå";
+ Text[ polish ] = "Skalowanie g³êbi";
+ Text[ japanese ] = "‰œs‚«‚Ì[‚³";
+ Text[ chinese_traditional ] = "²`«×¤ñ¨Ò";
+ Text[ arabic ] = "ÊÍÌíã ÇáÚãÞ";
+ Text[ dutch ] = "Diepte op schaal brengen";
+ Text[ chinese_simplified ] = "Éî¶È±ÈÀý";
+ Text[ greek ] = "Êëßìáêá âÜèïõò";
+ Text[ korean ] = "±íÀÌ ¹èÀ²";
+ Text[ turkish ] = "Derinlik ölçeklendirmesi";
+ };
+ MetricField MTR_BACKSCALE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 99 , 68 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ SpinSize = 5 ;
+ Maximum = 10000 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ Last = 10000 ;
+ };
+ FixedText FT_END_ANGLE
+ {
+ Pos = MAP_APPFONT ( 9 , 84 ) ;
+ Size = MAP_APPFONT ( 72 , 10 ) ;
+ Text = "Endwinkel" ;
+ Text [ ENGLISH ] = "End angle" ;
+ Text [ english_us ] = "Rotation angle" ;
+ Text [ portuguese_brazilian ] = "Endwinkel" ;
+ Text [ swedish ] = "Slutvinkel" ;
+ Text [ danish ] = "Slutvinkel" ;
+ Text [ italian ] = "Angolo finale" ;
+ Text [ spanish ] = "Ángulo final" ;
+ Text [ french ] = "Angle final" ;
+ Text [ dutch ] = "Eindhoek" ;
+ Text [ portuguese ] = "Ângulo de rotação" ;
+ Text[ chinese_simplified ] = "Ðýת½Ç¶È";
+ Text[ russian ] = "Êîíå÷íûé óãîë ïîâîðîòà";
+ Text[ polish ] = "K¹t koñcowy";
+ Text[ japanese ] = "‰ñ“]Šp“x";
+ Text[ chinese_traditional ] = "±ÛÂਤ«×";
+ Text[ arabic ] = "ÒÇæíÉ ÇáäåÇíÉ";
+ Text[ dutch ] = "Eindhoek";
+ Text[ chinese_simplified ] = "Ðýת½Ç¶È";
+ Text[ greek ] = "ÔåëéêÞ ãùíßá";
+ Text[ korean ] = "ȸÀü°¢";
+ Text[ turkish ] = "Dönüþ açýsý";
+ };
+ MetricField MTR_END_ANGLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 99 , 82 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ SpinSize = 5 ;
+ Unit = FUNIT_CUSTOM ;
+ Maximum = 36000 ;
+ Last = 36000 ;
+ DecimalDigits = 1 ;
+ CustomUnitText = " °" ;
+ };
+ FixedText FT_DEPTH
+ {
+ Pos = MAP_APPFONT ( 9 , 98 ) ;
+ Size = MAP_APPFONT ( 72 , 10 ) ;
+ Text = "Tiefe" ;
+ Text [ ENGLISH ] = "Depth" ;
+ Text [ english_us ] = "Depth" ;
+ Text [ portuguese_brazilian ] = "Tiefe" ;
+ Text [ swedish ] = "Djup" ;
+ Text [ danish ] = "Dybde" ;
+ Text [ italian ] = "Profondità" ;
+ Text [ spanish ] = "Profundidad" ;
+ Text [ french ] = "Profondeur" ;
+ Text [ dutch ] = "Diepte" ;
+ Text [ portuguese ] = "Profundidade" ;
+ Text[ chinese_simplified ] = "Éî¶È";
+ Text[ russian ] = "Ãëóáèíà";
+ Text[ polish ] = "G³êbia";
+ Text[ japanese ] = "‰œs‚«";
+ Text[ chinese_traditional ] = "²`«×";
+ Text[ arabic ] = "ÇáÚãÞ";
+ Text[ dutch ] = "Diepte";
+ Text[ chinese_simplified ] = "Éî¶È";
+ Text[ greek ] = "ÂÜèïò";
+ Text[ korean ] = "±íÀÌ";
+ Text[ turkish ] = "Derinlik";
+ };
+ MetricField MTR_DEPTH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 99 , 96 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Unit = FUNIT_MM ;
+ StrictFormat = TRUE ;
+ Minimum = 0 ;
+ First = 0 ;
+ Maximum = 10000000 ;
+ Last = 10000000 ;
+ DecimalDigits = 2 ;
+ SpinSize = 100 ;
+ };
+ GroupBox GRP_GEOMETRIE
+ {
+ Pos = MAP_APPFONT ( BORDER , GROUP_Y ) ;
+ Size = MAP_APPFONT ( WIDTH - 2 * BORDER , GROUP_HEIGHT ) ;
+ Text = "Geometrie" ;
+ Text [ ENGLISH ] = "Geometry" ;
+ Text [ english_us ] = "Geometry" ;
+ Text [ portuguese_brazilian ] = "Geometrie" ;
+ Text [ swedish ] = "Geometri" ;
+ Text [ danish ] = "Geometri" ;
+ Text [ italian ] = "Geometria" ;
+ Text [ spanish ] = "Geometría" ;
+ Text [ french ] = "Géométrie" ;
+ Text [ dutch ] = "Geometrie" ;
+ Text [ portuguese ] = "Geometria" ;
+ Text[ chinese_simplified ] = "¼¸ºÎ";
+ Text[ russian ] = "Ãåîìåòðèÿ";
+ Text[ polish ] = "Geometria";
+ Text[ japanese ] = "Šô‰½Šw";
+ Text[ chinese_traditional ] = "´X¦ó";
+ Text[ arabic ] = "ÇáåäÏÓÉ";
+ Text[ dutch ] = "Geometrie";
+ Text[ chinese_simplified ] = "¼¸ºÎ";
+ Text[ greek ] = "Ãåùìåôñßá";
+ Text[ korean ] = "±âÇÏ";
+ Text[ turkish ] = "Geometri";
+ };
+ ImageButton BTN_NORMALS_OBJ
+ {
+ Pos = MAP_APPFONT ( BORDER + 5 , GROUP_PREV_Y + 11 ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Objektspezifisch" ;
+ QuickHelpText [ ENGLISH ] = "object specific" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "normobjs.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Específico do objecto" ;
+ QuickHelpText [ english_us ] = "Object-Specific" ;
+ QuickHelpText [ portuguese_brazilian ] = "Objektspezifisch" ;
+ QuickHelpText [ swedish ] = "Objektspecifik" ;
+ QuickHelpText [ danish ] = "Objektspecifik" ;
+ QuickHelpText [ italian ] = "Specifico per l'oggetto" ;
+ QuickHelpText [ spanish ] = "Específico del objeto" ;
+ QuickHelpText [ french ] = "Spécifique à l'objet" ;
+ QuickHelpText [ dutch ] = "Objectspezifiek" ;
+ QuickHelpText[ russian ] = "Â çàâèñèìîñòè îò îáúåêòà";
+ QuickHelpText[ polish ] = "Specyficzny dla obiektu";
+ QuickHelpText[ japanese ] = "µÌÞ¼Þª¸Ä“Á—L«";
+ QuickHelpText[ chinese_simplified ] = "ÌØÊâ¶ÔÏó";
+ QuickHelpText[ chinese_traditional ] = "¯S®íª«¥ó";
+ QuickHelpText[ arabic ] = "ÎÇÕ ÈÇáßÇÆä";
+ QuickHelpText[ dutch ] = "Objectspezifiek";
+ QuickHelpText[ chinese_simplified ] = "ÌØÊâ¶ÔÏó";
+ QuickHelpText[ greek ] = "Ó÷åôéêÜ ìå ôï áíôéêåßìåíï";
+ QuickHelpText[ korean ] = "Object-Specific";
+ };
+ ImageButton BTN_NORMALS_FLAT
+ {
+ Pos = MAP_APPFONT ( BORDER + 5 + BUTTON_WIDTH , GROUP_PREV_Y + 11 ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Flach" ;
+ QuickHelpText [ ENGLISH ] = "Flat" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "normflat.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Plano" ;
+ QuickHelpText [ english_us ] = "Flat" ;
+ QuickHelpText [ portuguese_brazilian ] = "Flach" ;
+ QuickHelpText [ swedish ] = "Platt" ;
+ QuickHelpText [ danish ] = "Flad" ;
+ QuickHelpText [ italian ] = "Piano" ;
+ QuickHelpText [ spanish ] = "Plano" ;
+ QuickHelpText [ french ] = "Plat" ;
+ QuickHelpText [ dutch ] = "Vlak" ;
+ QuickHelpText[ russian ] = "Ïëîñêèé";
+ QuickHelpText[ polish ] = "P³aski";
+ QuickHelpText[ japanese ] = "•½–Ê";
+ QuickHelpText[ chinese_simplified ] = "ƽ̹";
+ QuickHelpText[ chinese_traditional ] = "¥­©Z";
+ QuickHelpText[ arabic ] = "ãÓØÍ";
+ QuickHelpText[ dutch ] = "Vlak";
+ QuickHelpText[ chinese_simplified ] = "ƽ̹";
+ QuickHelpText[ greek ] = "Åðßðåäï";
+ QuickHelpText[ korean ] = "Flat";
+ };
+ ImageButton BTN_NORMALS_SPHERE
+ {
+ Pos = MAP_APPFONT ( BORDER + 5 + BUTTON_WIDTH * 2 , GROUP_PREV_Y + 11 ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Kugelförmig" ;
+ QuickHelpText [ ENGLISH ] = "spherical" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "normsphe.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Esférico" ;
+ QuickHelpText [ english_us ] = "Spherical" ;
+ QuickHelpText [ portuguese_brazilian ] = "Kugelförmig" ;
+ QuickHelpText [ swedish ] = "Sfärisk" ;
+ QuickHelpText [ danish ] = "Kugleformet" ;
+ QuickHelpText [ italian ] = "Sferico" ;
+ QuickHelpText [ spanish ] = "Esférico" ;
+ QuickHelpText [ french ] = "Sphérique" ;
+ QuickHelpText [ dutch ] = "Bolvormig" ;
+ QuickHelpText[ russian ] = "Øàðîîáðàçíûé";
+ QuickHelpText[ polish ] = "W kszta³cie kuli";
+ QuickHelpText[ japanese ] = "‹…ó";
+ QuickHelpText[ chinese_simplified ] = "ÇòÌå";
+ QuickHelpText[ chinese_traditional ] = "²yÅé";
+ QuickHelpText[ arabic ] = "ßÑæí";
+ QuickHelpText[ dutch ] = "Bolvormig";
+ QuickHelpText[ chinese_simplified ] = "ÇòÌå";
+ QuickHelpText[ greek ] = "Óöáéñéêü";
+ QuickHelpText[ korean ] = "Spherical";
+ };
+ ImageButton BTN_NORMALS_INVERT
+ {
+ Pos = MAP_APPFONT ( BORDER + 5 , GROUP_PREV_Y + 28 ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Normalen umkehren" ;
+ QuickHelpText [ ENGLISH ] = "Invert normals" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "invert3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Inverter normais" ;
+ QuickHelpText [ english_us ] = "Invert Normals" ;
+ QuickHelpText [ portuguese_brazilian ] = "Normalen umkehren" ;
+ QuickHelpText [ swedish ] = "Omvända normaler" ;
+ QuickHelpText [ danish ] = "Inverter normaler" ;
+ QuickHelpText [ italian ] = "Inverti i normali" ;
+ QuickHelpText [ spanish ] = "Invertir los normales" ;
+ QuickHelpText [ french ] = "Inverser les verticales" ;
+ QuickHelpText [ dutch ] = "Normalen omkeren" ;
+ QuickHelpText[ russian ] = "Ïîâîðîò îòíîñ. îñâåùåíèÿ";
+ QuickHelpText[ polish ] = "Odwróæ normalne";
+ QuickHelpText[ japanese ] = "–@ü‚ð‹t“]‚³‚¹‚é";
+ QuickHelpText[ chinese_simplified ] = "·´Ö÷¨Ïß";
+ QuickHelpText[ chinese_traditional ] = "¤Ï¸mªk½u";
+ QuickHelpText[ arabic ] = "ÚßÓ ÇáÎØæØ ÇáãÊÚÇãÏÉ";
+ QuickHelpText[ dutch ] = "Normalen omkeren";
+ QuickHelpText[ chinese_simplified ] = "·´Ö÷¨Ïß";
+ QuickHelpText[ greek ] = "ÁíôéóôñïöÞ êáôáêïñýöùí åðéöÜíåéáò!";
+ QuickHelpText[ korean ] = "Invert Normals";
+ };
+ ImageButton BTN_TWO_SIDED_LIGHTING
+ {
+ Pos = MAP_APPFONT ( BORDER + 5 + BUTTON_WIDTH * 2 , GROUP_PREV_Y + 28 ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "2-seitige Beleuchtung" ;
+ QuickHelpText [ ENGLISH ] = "2 sided lighting" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "lght2sid.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Iluminação de ambos os lados" ;
+ QuickHelpText [ english_us ] = "Double-Sided Illumination" ;
+ QuickHelpText [ portuguese_brazilian ] = "2-seitige Beleuchtung" ;
+ QuickHelpText [ swedish ] = "2-sidig belysning" ;
+ QuickHelpText [ danish ] = "2-sidet belysning" ;
+ QuickHelpText [ italian ] = "Illuminazione su due lati" ;
+ QuickHelpText [ spanish ] = "Iluminación en dos lados" ;
+ QuickHelpText [ french ] = "Eclairage des deux côtés" ;
+ QuickHelpText [ dutch ] = "Dubbelzijdige belichting" ;
+ QuickHelpText[ russian ] = "Äâóñòîðîííåå îñâåùåíèå";
+ QuickHelpText[ polish ] = "Dwustronne oœwietlenie";
+ QuickHelpText[ japanese ] = "2–Ê‚©‚ç‚ÌÆ–¾";
+ QuickHelpText[ chinese_simplified ] = "Á½ÃæÕÕÃ÷";
+ QuickHelpText[ chinese_traditional ] = "Âù­±·Ó©ú";
+ QuickHelpText[ arabic ] = "ÅÖÇÁÉ ãÒÏæÌÉ ÇáÌæÇäÈ";
+ QuickHelpText[ dutch ] = "Dubbelzijdige belichting";
+ QuickHelpText[ chinese_simplified ] = "Á½ÃæÕÕÃ÷";
+ QuickHelpText[ greek ] = "Äßðëåõñïò öùôéóìüò";
+ QuickHelpText[ korean ] = "Double-Sided Illumination";
+ };
+ GroupBox GRP_NORMALS
+ {
+ Pos = MAP_APPFONT ( BORDER , GROUP_PREV_Y ) ;
+ Size = MAP_APPFONT ( WIDTH - ( WIDTH - GROUP_PREV_X ) - BORDER - 3 , 44 ) ;
+ Text = "Normalen" ;
+ Text [ ENGLISH ] = "Normals" ;
+ Text [ english_us ] = "Normals" ;
+ Text [ portuguese_brazilian ] = "Normalen" ;
+ Text [ swedish ] = "Normaler" ;
+ Text [ danish ] = "Normaler" ;
+ Text [ italian ] = "Normali" ;
+ Text [ spanish ] = "Normales" ;
+ Text [ french ] = "Verticales" ;
+ Text [ dutch ] = "Normale" ;
+ Text [ portuguese ] = "Verticais" ;
+ Text[ chinese_simplified ] = "·¨Ïß";
+ Text[ russian ] = "Îáû÷íûå";
+ Text[ polish ] = "Normalne";
+ Text[ japanese ] = "–@ü";
+ Text[ chinese_traditional ] = "ªk½u";
+ Text[ arabic ] = "ãÚÇííÑ";
+ Text[ dutch ] = "Normale";
+ Text[ chinese_simplified ] = "·¨Ïß";
+ Text[ greek ] = "Êáôáêüñõöïò åðéöÜíåéáò";
+ Text[ korean ] = "񃧯";
+ Text[ turkish ] = "Normaller";
+ };
+ ImageButton BTN_DOUBLE_SIDED
+ {
+ Pos = MAP_APPFONT ( BORDER , HEIGHT - BUTTON_HEIGHT * 2 - BORDER - 3 ) ;
+ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
+ QuickHelpText = "Doppelseitig" ;
+ QuickHelpText [ ENGLISH ] = "Double sided" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "doublesi.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Ambos os lados" ;
+ QuickHelpText [ english_us ] = "Double-Sided" ;
+ QuickHelpText [ portuguese_brazilian ] = "Doppelseitig" ;
+ QuickHelpText [ swedish ] = "Dubbelsidig" ;
+ QuickHelpText [ danish ] = "Dobbeltsidet" ;
+ QuickHelpText [ italian ] = "Su entrambi i lati" ;
+ QuickHelpText [ spanish ] = "Doble página" ;
+ QuickHelpText [ french ] = "Double-face" ;
+ QuickHelpText [ dutch ] = "Dubbelzijdig" ;
+ QuickHelpText[ russian ] = "Ñ äâóõ ñòîðîí";
+ QuickHelpText[ polish ] = "Dwustronny";
+ QuickHelpText[ japanese ] = "—¼–Ê";
+ QuickHelpText[ chinese_simplified ] = "Ë«Ãæ";
+ QuickHelpText[ chinese_traditional ] = "Âù­±";
+ QuickHelpText[ arabic ] = "ßáÇ ÇáæÌåíä";
+ QuickHelpText[ dutch ] = "Dubbelzijdig";
+ QuickHelpText[ chinese_simplified ] = "Ë«Ãæ";
+ QuickHelpText[ greek ] = "ÄéðëïóÝëéäá";
+ QuickHelpText[ korean ] = "Double-Sided";
+ };
+ // Darstellung
+ FixedText FT_SHADEMODE
+ {
+ Pos = MAP_APPFONT ( 11 , 32 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Modus" ;
+ Text [ ENGLISH ] = "Mode" ;
+ Text [ english_us ] = "Mode" ;
+ Text [ portuguese_brazilian ] = "Modus" ;
+ Text [ swedish ] = "Läge" ;
+ Text [ danish ] = "Modus" ;
+ Text [ italian ] = "Modo" ;
+ Text [ spanish ] = "Modo" ;
+ Text [ french ] = "Mode" ;
+ Text [ dutch ] = "Modus" ;
+ Text [ portuguese ] = "Modo" ;
+ Text[ chinese_simplified ] = "ģʽ";
+ Text[ russian ] = "Ðåæèì";
+ Text[ polish ] = "Tryb";
+ Text[ japanese ] = "Ó°ÄÞ";
+ Text[ chinese_traditional ] = "¼Ò¦¡";
+ Text[ arabic ] = "ÇáæÖÚ";
+ Text[ dutch ] = "Modus";
+ Text[ chinese_simplified ] = "ģʽ";
+ Text[ greek ] = "ÊáôÜóôáóç";
+ Text[ korean ] = "¸ðµå";
+ Text[ turkish ] = "Kip";
+ };
+ ListBox LB_SHADEMODE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 74 , 30 ) ;
+ Size = MAP_APPFONT ( 75 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Flat" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "plano" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Flat" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Flat" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Flat" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Flad" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Flat" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Plano" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Plat" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Vlak" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ƽÐÎ" ; > ;
+ < "·ÒÊÏ(Phong)" ; > ;
+ < "¹ùÊÏ(Gouraud)" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ïëîñêîñòíîé" ; > ;
+ < "Ôîíã" ; > ;
+ < "Ãóðî" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "P³aski" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "•½–Ê" ; > ;
+ < "Ì«Ý(Phong)" ; > ;
+ < "¼ÞÛ°(Gouraud)" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¥­§Î" ; > ;
+ < "ªâ¤ó" ; > ;
+ < "³¢¤ó" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ãÓØÍ" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Vlak" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ƽÐÎ" ; > ;
+ < "·ÒÊÏ(Phong)" ; > ;
+ < "¹ùÊÏ(Gouraud)" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "Åðßðåäï" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "Æò¸é" ; > ;
+ < "Phong" ; > ;
+ < "°í¿ì·¯µå(Gouraud)" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Flat" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Flat" ; > ;
+ < "Phong" ; > ;
+ < "Gouraud" ; > ;
+ };
+ };
+ ImageButton BTN_SHADOW_3D
+ {
+ Pos = MAP_APPFONT ( 14 , 52 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "3D-Schatten ein/-ausschalten" ;
+ QuickHelpText [ ENGLISH ] = "3D shadow" ;
+ TabStop = TRUE ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "shadow3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Activa/Desactiva Sombreado 3-D" ;
+ QuickHelpText [ english_us ] = "3D Shadowing On/Off" ;
+ QuickHelpText [ portuguese_brazilian ] = "3D-Schatten ein/-ausschalten" ;
+ QuickHelpText [ swedish ] = "3D-skugga på/av" ;
+ QuickHelpText [ danish ] = "Aktiver/deaktiver 3D-skygge" ;
+ QuickHelpText [ italian ] = "Mostra/nascondi ombre 3D" ;
+ QuickHelpText [ spanish ] = "Activar/desactivar sombra tridimensional" ;
+ QuickHelpText [ french ] = "Activer/désactiver l'ombre 3 D" ;
+ QuickHelpText [ dutch ] = "3D-schaduw in/-uitschakelen" ;
+ QuickHelpText[ russian ] = "Âêë./âûêë. òåíü 3-Ì";
+ QuickHelpText[ polish ] = "W³¹cz/Wy³¹cz cieñ 3-W";
+ QuickHelpText[ japanese ] = "3D‚̉e@µÝ/µÌ";
+ QuickHelpText[ chinese_simplified ] = "ÏÔʾ/ÒþÈë 3 άÒõÓ°";
+ QuickHelpText[ chinese_traditional ] = "Åã¥Ü/Áô¤J 3 ºû³±¼v";
+ QuickHelpText[ arabic ] = "ÅÙåÇÑ/ÅÎÝÇÁ ÇáÙá ËáÇËí ÇáÃÈÚÇÏ";
+ QuickHelpText[ dutch ] = "3D-schaduw in/-uitschakelen";
+ QuickHelpText[ chinese_simplified ] = "ÏÔʾ/ÒþÈë 3 άÒõÓ°";
+ QuickHelpText[ greek ] = "Óêéá 3Ä Íáé/¼÷é";
+ QuickHelpText[ korean ] = "3D Shadowing On/Off";
+ };
+ FixedText FT_SLANT
+ {
+ Pos = MAP_APPFONT ( 31 , 54 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Papierneigung : Neigung */
+ /* ### ACHTUNG: Neuer Text in Resource? Papierneigung : Neigung */
+ Text = "Papierneigung" ;
+ Text [ ENGLISH ] = "Paper slant" ;
+ Text [ english_us ] = "Surface angle" ;
+ Text [ portuguese_brazilian ] = "Neigung" ;
+ Text [ swedish ] = "Papperslutning" ;
+ Text [ danish ] = "Papirhældning" ;
+ Text [ italian ] = "Inclinazione carta" ;
+ Text [ spanish ] = "Ángulo superficie" ;
+ Text [ french ] = "Inclinaison papier" ;
+ Text [ dutch ] = "Helling" ;
+ Text [ portuguese ] = "Ângulo do papel" ;
+ Text[ chinese_simplified ] = "ƽÃæÇãб";
+ Text[ russian ] = "Íàêëîí áóìàãè";
+ Text[ polish ] = "Pochyl. papieru";
+ Text[ japanese ] = "—pŽ†‚ÌŒX‚«";
+ Text[ chinese_traditional ] = "¥­­±¶É±×";
+ Text[ arabic ] = "ãíá ÇáæÑÞ";
+ Text[ dutch ] = "Helling";
+ Text[ chinese_simplified ] = "ƽÃæÇãб";
+ Text[ greek ] = "Êëßóç ÷áñôéïý";
+ Text[ korean ] = "¿ëÁöÀÇ ±â¿ï±â";
+ Text[ turkish ] = "Yüzey açýsý";
+ };
+ MetricField MTR_SLANT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 96 , 52 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ SpinSize = 5 ;
+ Maximum = 90 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " °" ;
+ Last = 90 ;
+ };
+ GroupBox GRP_SHADOW
+ {
+ Pos = MAP_APPFONT ( BORDER + 6 , 43 ) ;
+ Size = MAP_APPFONT ( GROUP_WIDTH - 2 * 6 , 25 ) ;
+ Text = "Schatten" ;
+ Text [ ENGLISH ] = "Shadow" ;
+ Text [ english_us ] = "Shadow" ;
+ Text [ portuguese_brazilian ] = "Schatten" ;
+ Text [ swedish ] = "Skugga" ;
+ Text [ danish ] = "Skygge" ;
+ Text [ italian ] = "Ombre" ;
+ Text [ spanish ] = "Sombra" ;
+ Text [ french ] = "Ombre" ;
+ Text [ dutch ] = "Schaduw" ;
+ Text [ portuguese ] = "Sombreado" ;
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ russian ] = "Òåíü";
+ Text[ polish ] = "Cieñ";
+ Text[ japanese ] = "‰e";
+ Text[ chinese_traditional ] = "³±¼v";
+ Text[ arabic ] = "ÇáÙá";
+ Text[ dutch ] = "Schaduw";
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ greek ] = "ÓêéÜ";
+ Text[ korean ] = "À½¿µ";
+ Text[ turkish ] = "Gölge";
+ };
+ FixedText FT_DISTANCE
+ {
+ Pos = MAP_APPFONT ( 13 , 81 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Entfernung" ;
+ Text [ ENGLISH ] = "Distance" ;
+ Text [ english_us ] = "Distance" ;
+ Text [ portuguese_brazilian ] = "Entfernung" ;
+ Text [ swedish ] = "Avstånd" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ italian ] = "Distanza" ;
+ Text [ spanish ] = "Distancia" ;
+ Text [ french ] = "Distance" ;
+ Text [ dutch ] = "Afstand" ;
+ Text [ portuguese ] = "Distância" ;
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ russian ] = "Ðàññòîÿíèå";
+ Text[ polish ] = "Odleg³oœæ";
+ Text[ japanese ] = "ŠÔŠu";
+ Text[ chinese_traditional ] = "¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ";
+ Text[ dutch ] = "Afstand";
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ greek ] = "Áðüóôáóç";
+ Text[ korean ] = "°Å¸®";
+ Text[ turkish ] = "Uzaklýk";
+ };
+ MetricField MTR_DISTANCE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 96 , 79 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_MM ;
+ Minimum = 1 ;
+ First = 1 ;
+ Maximum = 1000000 ;
+ Last = 1000000 ;
+ DecimalDigits = 2 ;
+ SpinSize = 100 ;
+ };
+ FixedText FT_FOCAL_LENGTH
+ {
+ Pos = MAP_APPFONT ( 13 , 95 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Brennweite" ;
+ Text [ ENGLISH ] = "Focal length" ;
+ Text [ english_us ] = "Focal length" ;
+ Text [ portuguese_brazilian ] = "Brennweite" ;
+ Text [ swedish ] = "Brännvidd" ;
+ Text [ danish ] = "Brændvidde" ;
+ Text [ italian ] = "Ampiezza focale" ;
+ Text [ spanish ] = "Distancia focal" ;
+ Text [ french ] = "Focale" ;
+ Text [ dutch ] = "Focus" ;
+ Text [ portuguese ] = "Distância focal" ;
+ Text[ chinese_simplified ] = "½¹¾à";
+ Text[ russian ] = "Ôîêóñíîå ðàññòîÿíèå";
+ Text[ polish ] = "Ogniskowa";
+ Text[ japanese ] = "Å“_‹——£";
+ Text[ chinese_traditional ] = "µJ¶Z";
+ Text[ arabic ] = "ÇáØæá ÇáÈÄÑí";
+ Text[ dutch ] = "Focus";
+ Text[ chinese_simplified ] = "½¹¾à";
+ Text[ greek ] = "ÅóôéáêÞ áðüóôáóç";
+ Text[ korean ] = "ÃÊÁ¡ °Å¸®";
+ Text[ turkish ] = "Odak uzaklýðý";
+ };
+ MetricField MTR_FOCAL_LENGTH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 96 , 93 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_MM ;
+ Minimum = 1 ;
+ First = 1 ;
+ Maximum = 1000000 ;
+ Last = 1000000 ;
+ DecimalDigits = 2 ;
+ SpinSize = 100 ;
+ };
+ GroupBox GRP_CAMERA
+ {
+ Pos = MAP_APPFONT ( BORDER + 6 , 70 ) ;
+ Size = MAP_APPFONT ( GROUP_WIDTH - 2 * 6 , 39 ) ;
+ Text = "Kamera" ;
+ Text [ ENGLISH ] = "Camera" ;
+ Text [ english_us ] = "Camera" ;
+ Text [ portuguese_brazilian ] = "Kamera" ;
+ Text [ swedish ] = "Kamera" ;
+ Text [ danish ] = "Kamera" ;
+ Text [ italian ] = "Punto di osservazione" ;
+ Text [ spanish ] = "Cámara" ;
+ Text [ french ] = "Caméra" ;
+ Text [ dutch ] = "Camera" ;
+ Text [ portuguese ] = "Câmera" ;
+ Text[ chinese_simplified ] = "ÕÕÏà»ú";
+ Text[ russian ] = "Ôîòîêàìåðà";
+ Text[ polish ] = "Kamera";
+ Text[ japanese ] = "¶Ò×";
+ Text[ chinese_traditional ] = "·Ó¬Û¾÷";
+ Text[ arabic ] = "ÇáßÇãíÑÇ";
+ Text[ dutch ] = "Camera";
+ Text[ chinese_simplified ] = "ÕÕÏà»ú";
+ Text[ greek ] = "ÊÜìåñá";
+ Text[ korean ] = "Ä«¸Þ¶ó";
+ Text[ turkish ] = "Kamera";
+ };
+ GroupBox GRP_REPRESENTATION
+ {
+ Pos = MAP_APPFONT ( BORDER , GROUP_Y ) ;
+ Size = MAP_APPFONT ( WIDTH - 2 * BORDER , GROUP_HEIGHT ) ;
+ Text = "Darstellung" ;
+ Text [ ENGLISH ] = "Representation" ;
+ Text [ english_us ] = "Shading" ;
+ Text [ portuguese_brazilian ] = "Darstellung" ;
+ Text [ swedish ] = "Visning" ;
+ Text [ danish ] = "Visning" ;
+ Text [ italian ] = "Rappresentazione" ;
+ Text [ spanish ] = "Representación" ;
+ Text [ french ] = "Affichage" ;
+ Text [ dutch ] = "Weergave" ;
+ Text [ portuguese ] = "Destacar" ;
+ Text[ chinese_simplified ] = "ÏÔʾ";
+ Text[ russian ] = "Äåìîíñòðàöèÿ";
+ Text[ polish ] = "Przedstawienie";
+ Text[ japanese ] = "•\\Ž¦";
+ Text[ chinese_traditional ] = "Åã¥Ü";
+ Text[ arabic ] = "ÇáÚÑÖ";
+ Text[ dutch ] = "Weergave";
+ Text[ chinese_simplified ] = "ÏÔʾ";
+ Text[ greek ] = "ÅìöÜíéóç";
+ Text[ korean ] = "¸í¾Ï";
+ Text[ turkish ] = "Görüntü";
+ };
+ // Beleuchtung
+ ImageButton BTN_LIGHT_1
+ {
+ Pos = MAP_APPFONT ( 13 , 38 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Lichtquelle 1" ;
+ QuickHelpText [ ENGLISH ] = "Light source 1" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "light.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Fonte de luz 1" ;
+ QuickHelpText [ english_us ] = "Light source 1" ;
+ QuickHelpText [ portuguese_brazilian ] = "Lichtquelle 1" ;
+ QuickHelpText [ swedish ] = "Ljuskälla 1" ;
+ QuickHelpText [ danish ] = "Lyskilde 1" ;
+ QuickHelpText [ italian ] = "Sorgente luminosa 1" ;
+ QuickHelpText [ spanish ] = "Fuente de luz 1" ;
+ QuickHelpText [ french ] = "Source de lumière 1" ;
+ QuickHelpText [ dutch ] = "Lichtbron 1" ;
+ QuickHelpText[ russian ] = "Èñòî÷íèê ñâåòà 1";
+ QuickHelpText[ polish ] = "ród³o œwiat³a 1";
+ QuickHelpText[ japanese ] = "ŒõŒ¹ 1";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 1";
+ QuickHelpText[ chinese_traditional ] = "¥ú·½ 1";
+ QuickHelpText[ arabic ] = "ãÕÏÑ ÇáÖæÁ 1";
+ QuickHelpText[ dutch ] = "Lichtbron 1";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 1";
+ QuickHelpText[ greek ] = "ÐçãÞ öùôéóìïý 1";
+ QuickHelpText[ korean ] = "Light source 1";
+ };
+ ImageButton BTN_LIGHT_2
+ {
+ Pos = MAP_APPFONT ( 13 + BUTTON_WIDTH + 1 , 38 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Lichtquelle 2" ;
+ QuickHelpText [ ENGLISH ] = "Light source 2" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "light.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Fonte de luz 2" ;
+ QuickHelpText [ english_us ] = "Light source 2" ;
+ QuickHelpText [ portuguese_brazilian ] = "Lichtquelle 2" ;
+ QuickHelpText [ swedish ] = "Ljuskälla 2" ;
+ QuickHelpText [ danish ] = "Lyskilde 2" ;
+ QuickHelpText [ italian ] = "Sorgente luminosa 2" ;
+ QuickHelpText [ spanish ] = "Fuente de luz 2" ;
+ QuickHelpText [ french ] = "Source de lumière 2" ;
+ QuickHelpText [ dutch ] = "Lichtbron 2" ;
+ QuickHelpText[ russian ] = "Èñòî÷íèê ñâåòà 2";
+ QuickHelpText[ polish ] = "ród³o œwiat³a 2";
+ QuickHelpText[ japanese ] = "ŒõŒ¹ 2";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 2";
+ QuickHelpText[ chinese_traditional ] = "¥ú·½ 2";
+ QuickHelpText[ arabic ] = "ãÕÏÑ ÇáÖæÁ 2";
+ QuickHelpText[ dutch ] = "Lichtbron 2";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 2";
+ QuickHelpText[ greek ] = "ÐçãÞ öùôéóìïý 2";
+ QuickHelpText[ korean ] = "Light source 2";
+ };
+ ImageButton BTN_LIGHT_3
+ {
+ Pos = MAP_APPFONT ( 13 + BUTTON_WIDTH * 2 + 2 , 38 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Lichtquelle 3" ;
+ QuickHelpText [ ENGLISH ] = "Light source 3" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "light.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Fonte de luz 3" ;
+ QuickHelpText [ english_us ] = "Light source 3" ;
+ QuickHelpText [ portuguese_brazilian ] = "Lichtquelle 3" ;
+ QuickHelpText [ swedish ] = "Ljuskälla 3" ;
+ QuickHelpText [ danish ] = "Lyskilde 3" ;
+ QuickHelpText [ italian ] = "Sorgente luminosa 3" ;
+ QuickHelpText [ spanish ] = "Fuente de luz 3" ;
+ QuickHelpText [ french ] = "Source de lumière 3" ;
+ QuickHelpText [ dutch ] = "Lichtbron 3" ;
+ QuickHelpText[ russian ] = "Èñòî÷íèê ñâåòà 3";
+ QuickHelpText[ polish ] = "ród³o œwiat³a 3";
+ QuickHelpText[ japanese ] = "ŒõŒ¹ 3";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 3";
+ QuickHelpText[ chinese_traditional ] = "¥ú·½ 3";
+ QuickHelpText[ arabic ] = "ãÕÏÑ ÇáÖæÁ 3";
+ QuickHelpText[ dutch ] = "Lichtbron 3";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 3";
+ QuickHelpText[ greek ] = "ÐçãÞ öùôéóìïý 3";
+ QuickHelpText[ korean ] = "Light source 3";
+ };
+ ImageButton BTN_LIGHT_4
+ {
+ Pos = MAP_APPFONT ( 13 + BUTTON_WIDTH * 3 + 3 , 38 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Lichtquelle 4" ;
+ QuickHelpText [ ENGLISH ] = "Light source 4" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "light.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Fonte de luz 4" ;
+ QuickHelpText [ english_us ] = "Light source 4" ;
+ QuickHelpText [ portuguese_brazilian ] = "Lichtquelle 4" ;
+ QuickHelpText [ swedish ] = "Ljuskälla 4" ;
+ QuickHelpText [ danish ] = "Lyskilde 4" ;
+ QuickHelpText [ italian ] = "Sorgente luminosa 4" ;
+ QuickHelpText [ spanish ] = "Fuente de luz 4" ;
+ QuickHelpText [ french ] = "Source de lumière 4" ;
+ QuickHelpText [ dutch ] = "Lichtbron 4" ;
+ QuickHelpText[ russian ] = "Èñòî÷íèê ñâåòà 4";
+ QuickHelpText[ polish ] = "ród³o œwiat³a 4";
+ QuickHelpText[ japanese ] = "ŒõŒ¹ 4";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 4";
+ QuickHelpText[ chinese_traditional ] = "¥ú·½ 4";
+ QuickHelpText[ arabic ] = "ãÕÏÑ ÇáÖæÁ 4";
+ QuickHelpText[ dutch ] = "Lichtbron 4";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 4";
+ QuickHelpText[ greek ] = "ÐçãÞ öùôéóìïý 4";
+ QuickHelpText[ korean ] = "Light source 4";
+ };
+ ImageButton BTN_LIGHT_5
+ {
+ Pos = MAP_APPFONT ( 13 + BUTTON_WIDTH * 4 + 4 , 38 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Lichtquelle 5" ;
+ QuickHelpText [ ENGLISH ] = "Light source 5" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "light.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Fonte de luz 5" ;
+ QuickHelpText [ english_us ] = "Light source 5" ;
+ QuickHelpText [ portuguese_brazilian ] = "Lichtquelle 5" ;
+ QuickHelpText [ swedish ] = "Ljuskälla 5" ;
+ QuickHelpText [ danish ] = "Lyskilde 5" ;
+ QuickHelpText [ italian ] = "Sorgente luminosa 5" ;
+ QuickHelpText [ spanish ] = "Fuente de luz 5" ;
+ QuickHelpText [ french ] = "Source de lumière 5" ;
+ QuickHelpText [ dutch ] = "Lichtbron 5" ;
+ QuickHelpText[ russian ] = "Èñòî÷íèê ñâåòà 5";
+ QuickHelpText[ polish ] = "ród³o œwiat³a 5";
+ QuickHelpText[ japanese ] = "ŒõŒ¹ 5";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 5";
+ QuickHelpText[ chinese_traditional ] = "¥ú·½ 5";
+ QuickHelpText[ arabic ] = "ãÕÏÑ ÇáÖæÁ 5";
+ QuickHelpText[ dutch ] = "Lichtbron 5";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 5";
+ QuickHelpText[ greek ] = "ÐçãÞ öùôéóìïý 5";
+ QuickHelpText[ korean ] = "Light source 5";
+ };
+ ImageButton BTN_LIGHT_6
+ {
+ Pos = MAP_APPFONT ( 13 + BUTTON_WIDTH * 5 + 5 , 38 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Lichtquelle 6" ;
+ QuickHelpText [ ENGLISH ] = "Light source 6" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "light.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Fonte de luz 6" ;
+ QuickHelpText [ english_us ] = "Light source 6" ;
+ QuickHelpText [ portuguese_brazilian ] = "Lichtquelle 6" ;
+ QuickHelpText [ swedish ] = "Ljuskälla 6" ;
+ QuickHelpText [ danish ] = "Lyskilde 6" ;
+ QuickHelpText [ italian ] = "Sorgente luminosa 6" ;
+ QuickHelpText [ spanish ] = "Fuente de luz 6" ;
+ QuickHelpText [ french ] = "Source de lumière 6" ;
+ QuickHelpText [ dutch ] = "Lichtbron 6" ;
+ QuickHelpText[ russian ] = "Èñòî÷íèê ñâåòà 6";
+ QuickHelpText[ polish ] = "ród³o œwiat³a 6";
+ QuickHelpText[ japanese ] = "ŒõŒ¹ 6";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 6";
+ QuickHelpText[ chinese_traditional ] = "¥ú·½ 6";
+ QuickHelpText[ arabic ] = "ãÕÏÑ ÇáÖæÁ 6";
+ QuickHelpText[ dutch ] = "Lichtbron 6";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 6";
+ QuickHelpText[ greek ] = "ÐçãÞ öùôéóìïý 6";
+ QuickHelpText[ korean ] = "Light source 6";
+ };
+ ImageButton BTN_LIGHT_7
+ {
+ Pos = MAP_APPFONT ( 13 + BUTTON_WIDTH * 6 + 6 , 38 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Lichtquelle 7" ;
+ QuickHelpText [ ENGLISH ] = "Light source 7" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "light.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Fonte de luz 7" ;
+ QuickHelpText [ english_us ] = "Light source 7" ;
+ QuickHelpText [ portuguese_brazilian ] = "Lichtquelle 7" ;
+ QuickHelpText [ swedish ] = "Ljuskälla 7" ;
+ QuickHelpText [ danish ] = "Lyskilde 7" ;
+ QuickHelpText [ italian ] = "Sorgente luminosa 7" ;
+ QuickHelpText [ spanish ] = "Fuente de luz 7" ;
+ QuickHelpText [ french ] = "Source de lumière 7" ;
+ QuickHelpText [ dutch ] = "Lichtbron 7" ;
+ QuickHelpText[ russian ] = "Èñòî÷íèê ñâåòà 7";
+ QuickHelpText[ polish ] = "ród³o œwiat³a 7";
+ QuickHelpText[ japanese ] = "ŒõŒ¹ 7";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 7";
+ QuickHelpText[ chinese_traditional ] = "¥ú·½ 7";
+ QuickHelpText[ arabic ] = "ãÕÏÑ ÇáÖæÁ 7";
+ QuickHelpText[ dutch ] = "Lichtbron 7";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 7";
+ QuickHelpText[ greek ] = "ÐçãÞ öùôéóìïý 7";
+ QuickHelpText[ korean ] = "Light source 7";
+ };
+ ImageButton BTN_LIGHT_8
+ {
+ Pos = MAP_APPFONT ( 13 + BUTTON_WIDTH * 7 + 7 , 38 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Lichtquelle 8" ;
+ QuickHelpText [ ENGLISH ] = "Light source 8" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "light.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Fonte de luz 8" ;
+ QuickHelpText [ english_us ] = "Light source 8" ;
+ QuickHelpText [ portuguese_brazilian ] = "Lichtquelle 8" ;
+ QuickHelpText [ swedish ] = "Ljuskälla 8" ;
+ QuickHelpText [ danish ] = "Lyskilde 8" ;
+ QuickHelpText [ italian ] = "Sorgente luminosa 8" ;
+ QuickHelpText [ spanish ] = "Fuente de luz 8" ;
+ QuickHelpText [ french ] = "Source de lumière 8" ;
+ QuickHelpText [ dutch ] = "Lichtbron 8" ;
+ QuickHelpText[ russian ] = "Èñòî÷íèê ñâåòà 8";
+ QuickHelpText[ polish ] = "ród³o œwiat³a 8";
+ QuickHelpText[ japanese ] = "ŒõŒ¹ 8";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 8";
+ QuickHelpText[ chinese_traditional ] = "¥ú·½ 8";
+ QuickHelpText[ arabic ] = "ãÕÏÑ ÇáÖæÁ 8";
+ QuickHelpText[ dutch ] = "Lichtbron 8";
+ QuickHelpText[ chinese_simplified ] = "¹âÔ´ 8";
+ QuickHelpText[ greek ] = "ÐçãÞ öùôéóìïý 8";
+ QuickHelpText[ korean ] = "Light source 8";
+ };
+ ListBox LB_LIGHT_1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 13 , 54 ) ;
+ Size = MAP_APPFONT ( 19 + 97 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ListBox LB_LIGHT_2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 13 , 54 ) ;
+ Size = MAP_APPFONT ( 19 + 97 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ListBox LB_LIGHT_3
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 13 , 54 ) ;
+ Size = MAP_APPFONT ( 19 + 97 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ListBox LB_LIGHT_4
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 13 , 54 ) ;
+ Size = MAP_APPFONT ( 19 + 97 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ListBox LB_LIGHT_5
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 13 , 54 ) ;
+ Size = MAP_APPFONT ( 19 + 97 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ListBox LB_LIGHT_6
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 13 , 54 ) ;
+ Size = MAP_APPFONT ( 19 + 97 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ListBox LB_LIGHT_7
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 13 , 54 ) ;
+ Size = MAP_APPFONT ( 19 + 97 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ListBox LB_LIGHT_8
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 13 , 54 ) ;
+ Size = MAP_APPFONT ( 19 + 97 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ImageButton BTN_LIGHT_COLOR
+ {
+ Pos = MAP_APPFONT ( 32 + BUTTON_WIDTH * 7 + 7 , 54 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Farbe über Farbdialog wählen" ;
+ QuickHelpText [ ENGLISH ] = "Chose color with color dialog" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "colordlg.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Caixa de diálogo das cores" ;
+ QuickHelpText [ english_us ] = "Colors Dialog" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe über Farbdialog wählen" ;
+ QuickHelpText [ swedish ] = "Välj färg via färgdialog" ;
+ QuickHelpText [ danish ] = "Vælg farve via farvedialog" ;
+ QuickHelpText [ italian ] = "Scelta colore tramite apposito dialogo" ;
+ QuickHelpText [ spanish ] = "Seleccionar colores a través del diálogo de colores" ;
+ QuickHelpText [ french ] = "Sélectionner la couleur à partir de la boîte de dialogue de couleurs" ;
+ QuickHelpText [ dutch ] = "Kleur via kleurdialoog kiezen" ;
+ QuickHelpText[ russian ] = "Âûáðàòü öâåò â äèàëîãå";
+ QuickHelpText[ polish ] = "Wybierz kolor przez dialog kolorów";
+ QuickHelpText[ japanese ] = "F‚ÌÀÞ²±Û¸Þ‚ð‘I‘ð‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "ÑÕÉ«¶Ô»°À¸";
+ QuickHelpText[ chinese_traditional ] = "³z¹LÃC¦â¤è¶ô¿ï¾ÜÃC¦â";
+ QuickHelpText[ arabic ] = "ÇÎÊíÇÑ Çááæä ÚÈÑ ãÑÈÚ ÍæÇÑ ÇáÃáæÇä";
+ QuickHelpText[ dutch ] = "Kleur via kleurdialoog kiezen";
+ QuickHelpText[ chinese_simplified ] = "ÑÕÉ«¶Ô»°À¸";
+ QuickHelpText[ greek ] = "ÅðéëïãÞ ÷ñþìáôïò ìÝóù äéáëüãïõ ÷ñþìáôïò";
+ QuickHelpText[ korean ] = "Colors Dialog";
+ };
+ GroupBox GRP_LIGHTSOURCE
+ {
+ Pos = MAP_APPFONT ( BORDER + 6 , 27 ) ;
+ Size = MAP_APPFONT ( GROUP_WIDTH - 2 * 6 , 46 ) ;
+ Text = "Lichtquelle" ;
+ Text [ ENGLISH ] = "Lichtquelle" ;
+ Text [ portuguese ] = "Fonte de luz" ;
+ Text [ english_us ] = "Light source" ;
+ Text [ portuguese_brazilian ] = "Lichtquelle" ;
+ Text [ swedish ] = "Ljuskälla" ;
+ Text [ danish ] = "Lyskilde" ;
+ Text [ italian ] = "Sorgente luminosa" ;
+ Text [ spanish ] = "Fuente de luz" ;
+ Text [ french ] = "Source de lumière" ;
+ Text [ dutch ] = "Lichtbron" ;
+ Text[ chinese_simplified ] = "¹âÔ´";
+ Text[ russian ] = "Èñòî÷íèê ñâåòà";
+ Text[ polish ] = "ród³o œwiat³a";
+ Text[ japanese ] = "ŒõŒ¹";
+ Text[ chinese_traditional ] = "¥ú·½";
+ Text[ arabic ] = "ãÕÏÑ ÇáÖæÁ";
+ Text[ dutch ] = "Lichtbron";
+ Text[ chinese_simplified ] = "¹âÔ´";
+ Text[ greek ] = "ÐñïÝëåõóç öùôüò";
+ Text[ korean ] = "±¤¿ø";
+ Text[ turkish ] = "Iþýk kaynaðý";
+ };
+ ListBox LB_AMBIENTLIGHT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 13 , 85 ) ;
+ Size = MAP_APPFONT ( 19 + 97 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ImageButton BTN_AMBIENT_COLOR
+ {
+ Pos = MAP_APPFONT ( 32 + BUTTON_WIDTH * 7 + 7 , 85 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Farbe über Farbdialog wählen" ;
+ QuickHelpText [ ENGLISH ] = "Chose color with color dialog" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "colordlg.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Caixa de diálogo das cores" ;
+ QuickHelpText [ english_us ] = "Colors Dialog" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe über Farbdialog wählen" ;
+ QuickHelpText [ swedish ] = "Välj färg via färgdialog" ;
+ QuickHelpText [ danish ] = "Vælg farve via farvedialog" ;
+ QuickHelpText [ italian ] = "Scelta colore tramite apposito dialogo" ;
+ QuickHelpText [ spanish ] = "Seleccionar colores a través del diálogo de colores" ;
+ QuickHelpText [ french ] = "Sélectionner la couleur à partir de la boîte de dialogue de couleurs" ;
+ QuickHelpText [ dutch ] = "Kleur uit catalogus kiezen" ;
+ QuickHelpText[ russian ] = "Äèàëîãîâîå îêíî öâåòîâ";
+ QuickHelpText[ polish ] = "Wybierz kolor przez dialog kolorów";
+ QuickHelpText[ japanese ] = "F‚ÌÀÞ²±Û¸Þ‚ÅF‚ð‘I‘ð‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "½èÖúÑÕÉ«¶Ô»°À¸Ñ¡ÔñÑÕÉ«";
+ QuickHelpText[ chinese_traditional ] = "³z¹LÃC¦â¹ï¸Ü¤è¶ô¿ï¾ÜÃC¦â";
+ QuickHelpText[ arabic ] = "ÇÎÊíÇÑ Çááæä ÚÈÑ ÍæÇÑ ÇáÃáæÇä";
+ QuickHelpText[ dutch ] = "Kleur uit catalogus kiezen";
+ QuickHelpText[ chinese_simplified ] = "½èÖúÑÕÉ«¶Ô»°À¸Ñ¡ÔñÑÕÉ«";
+ QuickHelpText[ greek ] = "ÅðéëïãÞ ÷ñþìáôïò ìÝóù ôïõ äéáëüãïõ ÷ñùìÜôùí";
+ QuickHelpText[ korean ] = "Colors Dialog";
+ };
+ GroupBox GRP_AMBIENTLIGHT
+ {
+ Pos = MAP_APPFONT ( BORDER + 6 , 74 ) ;
+ Size = MAP_APPFONT ( GROUP_WIDTH - 2 * 6 , 30 ) ;
+ Text = "Umgebungslicht" ;
+ Text [ ENGLISH ] = "Ambient light" ;
+ Text [ english_us ] = "Ambient light" ;
+ Text [ portuguese_brazilian ] = "Umgebungslicht" ;
+ Text [ swedish ] = "Omgivningsljus" ;
+ Text [ danish ] = "Omgivelseslys" ;
+ Text [ italian ] = "Luce ambientale" ;
+ Text [ spanish ] = "Luz ambiental" ;
+ Text [ french ] = "Luminière ambiante" ;
+ Text [ dutch ] = "Omgevingslicht" ;
+ Text [ portuguese ] = "Luz ambiente" ;
+ Text[ chinese_simplified ] = "ÖÜΧ¹âÏß";
+ Text[ russian ] = "Îêðóæàþùèé ñâåò";
+ Text[ polish ] = "Œwiat³o otaczaj¹ce";
+ Text[ japanese ] = "ŽüˆÍ‚Ì–¾‚邳‰ÁŒ¸";
+ Text[ chinese_traditional ] = "¶g³ò¥ú½u";
+ Text[ arabic ] = "áæä ÅÖÇÁÉ ÇáÈíÆÉ ÇáãÍíØÉ";
+ Text[ dutch ] = "Omgevingslicht";
+ Text[ chinese_simplified ] = "ÖÜΧ¹âÏß";
+ Text[ greek ] = "Öùôéóìüò ðåñéâÜëëïíôïò";
+ Text[ korean ] = "ÁÖº¯±¤";
+ Text[ turkish ] = "Ortam ýþýðý";
+ };
+ GroupBox GRP_LIGHT
+ {
+ Pos = MAP_APPFONT ( BORDER , GROUP_Y ) ;
+ Size = MAP_APPFONT ( WIDTH - 2 * BORDER , GROUP_HEIGHT ) ;
+ Text = "Beleuchtung" ;
+ Text [ ENGLISH ] = "Lighting" ;
+ Text [ english_us ] = "Illumination" ;
+ Text [ portuguese_brazilian ] = "Beleuchtung" ;
+ Text [ swedish ] = "Belysning" ;
+ Text [ danish ] = "Belysning" ;
+ Text [ italian ] = "Illuminazione" ;
+ Text [ spanish ] = "Iluminación" ;
+ Text [ french ] = "Éclairage" ;
+ Text [ dutch ] = "Belichting" ;
+ Text [ portuguese ] = "Iluminação" ;
+ Text[ chinese_simplified ] = "ÕÕÃ÷";
+ Text[ russian ] = "Îñâåùåíèå";
+ Text[ polish ] = "Oœwietlenie";
+ Text[ japanese ] = "Æ‚è‰f‚¦";
+ Text[ chinese_traditional ] = "·Ó©ú";
+ Text[ arabic ] = "ÇáÅÖÇÁÉ";
+ Text[ dutch ] = "Belichting";
+ Text[ chinese_simplified ] = "ÕÕÃ÷";
+ Text[ greek ] = "Öùôéóìüò";
+ Text[ korean ] = "Á¶¸í";
+ Text[ turkish ] = "Iþýklandýrma";
+ };
+ FixedText FT_LIGHT_X
+ {
+ Pos = MAP_APPFONT ( BORDER + 5 , GROUP_PREV_Y + 10 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "X" ;
+ };
+ FixedText FT_LIGHT_Y
+ {
+ Pos = MAP_APPFONT ( BORDER + 5 , GROUP_PREV_Y + 22 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Y" ;
+ };
+ FixedText FT_LIGHT_Z
+ {
+ Pos = MAP_APPFONT ( BORDER + 5 , GROUP_PREV_Y + 34 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Z" ;
+ };
+ GroupBox GRP_LIGHT_INFO
+ {
+ Pos = MAP_APPFONT ( BORDER , GROUP_PREV_Y ) ;
+ Size = MAP_APPFONT ( WIDTH - ( WIDTH - GROUP_PREV_X ) - BORDER - 3 , 46 ) ;
+ Text = "Lichtrichtung" ;
+ Text [ ENGLISH ] = "Light direction" ;
+ Text [ english_us ] = "Direction" ;
+ Text [ portuguese_brazilian ] = "Lichtrichtung" ;
+ Text [ swedish ] = "Ljusriktning" ;
+ Text [ danish ] = "Lysretning" ;
+ Text [ italian ] = "Direzione illuminazione" ;
+ Text [ spanish ] = "Dirección de la luz" ;
+ Text [ french ] = "Direction" ;
+ Text [ dutch ] = "Lichtrichting" ;
+ Text [ portuguese ] = "Direcção da luz" ;
+ Text[ chinese_simplified ] = "¹âÔ´·½Ïò";
+ Text[ russian ] = "Íàïðàâëåíèå ñâåòà";
+ Text[ polish ] = "Kierunek œwiat³a";
+ Text[ japanese ] = "Œõ‚Ì•ûŒü";
+ Text[ chinese_traditional ] = "¥ú·½¤è¦V";
+ Text[ arabic ] = "ÇÊÌÇå ÇáÖæÁ";
+ Text[ dutch ] = "Lichtrichting";
+ Text[ chinese_simplified ] = "¹âÔ´·½Ïò";
+ Text[ greek ] = "Êáôåýèõíóç öùôüò";
+ Text[ korean ] = "ºûÀÇ ¹æÇâ";
+ Text[ turkish ] = "Iþýk yönü";
+ };
+ // Texturen
+ FixedText FT_TEX_KIND
+ {
+ Pos = MAP_APPFONT ( 11 , 31 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Art" ;
+ Text [ ENGLISH ] = "Kind" ;
+ Text [ english_us ] = "Type" ;
+ Text [ portuguese_brazilian ] = "Art" ;
+ Text [ swedish ] = "Typ" ;
+ Text [ danish ] = "Type" ;
+ Text [ italian ] = "Tipo" ;
+ Text [ spanish ] = "Tipo" ;
+ Text [ french ] = "Type" ;
+ Text [ dutch ] = "Type" ;
+ Text [ portuguese ] = "Tipo" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ";
+ Text[ russian ] = "Òèï";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "Ží—Þ";
+ Text[ chinese_traditional ] = "Ãþ«¬";
+ Text[ arabic ] = "ÇáäæÚ";
+ Text[ dutch ] = "Type";
+ Text[ chinese_simplified ] = "ÀàÐÍ";
+ Text[ greek ] = "Ôýðïò";
+ Text[ korean ] = "Á¾·ù";
+ Text[ turkish ] = "Tür";
+ };
+ ImageButton BTN_TEX_LUMINANCE
+ {
+ Pos = MAP_APPFONT ( 70 , 29 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Schwarzweiß" ;
+ QuickHelpText [ ENGLISH ] = "Black & white" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "luminanc.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Preto & Branco" ;
+ QuickHelpText [ english_us ] = "Black & White" ;
+ QuickHelpText [ portuguese_brazilian ] = "Schwarzweiß" ;
+ QuickHelpText [ swedish ] = "Svartvit" ;
+ QuickHelpText [ danish ] = "Sort-hvid" ;
+ QuickHelpText [ italian ] = "Bianco e nero" ;
+ QuickHelpText [ spanish ] = "Blanco y negro" ;
+ QuickHelpText [ french ] = "Noir et blanc" ;
+ QuickHelpText [ dutch ] = "Zwart-wit" ;
+ QuickHelpText[ russian ] = "×åðíî-áåëîå";
+ QuickHelpText[ polish ] = "Czarno-bia³y";
+ QuickHelpText[ japanese ] = "”’•";
+ QuickHelpText[ chinese_simplified ] = "ºÚ°×";
+ QuickHelpText[ chinese_traditional ] = "¶Â¥Õ";
+ QuickHelpText[ arabic ] = "ÃÈíÖ æÃÓæÏ";
+ QuickHelpText[ dutch ] = "Zwart-wit";
+ QuickHelpText[ chinese_simplified ] = "ºÚ°×";
+ QuickHelpText[ greek ] = "Áóðñüìáõñï";
+ QuickHelpText[ korean ] = "Black & White";
+ };
+ ImageButton BTN_TEX_COLOR
+ {
+ Pos = MAP_APPFONT ( 70 + BUTTON_WIDTH , 29 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Farbe" ;
+ QuickHelpText [ ENGLISH ] = "Color" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "color.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Cor" ;
+ QuickHelpText [ english_us ] = "Color" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ swedish ] = "Färg" ;
+ QuickHelpText [ danish ] = "Farve" ;
+ QuickHelpText [ italian ] = "Colore" ;
+ QuickHelpText [ spanish ] = "Color" ;
+ QuickHelpText [ french ] = "Couleur" ;
+ QuickHelpText [ dutch ] = "Kleur" ;
+ QuickHelpText[ russian ] = "Öâåò";
+ QuickHelpText[ polish ] = "Kolor";
+ QuickHelpText[ japanese ] = "F";
+ QuickHelpText[ chinese_simplified ] = "ÑÕÉ«";
+ QuickHelpText[ chinese_traditional ] = "ÃC¦â";
+ QuickHelpText[ arabic ] = "Çááæä";
+ QuickHelpText[ dutch ] = "Kleur";
+ QuickHelpText[ chinese_simplified ] = "ÑÕÉ«";
+ QuickHelpText[ greek ] = "×ñþìá";
+ QuickHelpText[ korean ] = "Color";
+ };
+ FixedText FT_TEX_MODE
+ {
+ Pos = MAP_APPFONT ( 11 , 47 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Modus" ;
+ Text [ ENGLISH ] = "Mode" ;
+ Text [ english_us ] = "Mode" ;
+ Text [ portuguese_brazilian ] = "Modus" ;
+ Text [ swedish ] = "Läge" ;
+ Text [ danish ] = "Modus" ;
+ Text [ italian ] = "Modo" ;
+ Text [ spanish ] = "Modo" ;
+ Text [ french ] = "Mode" ;
+ Text [ dutch ] = "Modus" ;
+ Text [ portuguese ] = "Modo" ;
+ Text[ chinese_simplified ] = "ģʽ";
+ Text[ russian ] = "Ðåæèì";
+ Text[ polish ] = "Tryb";
+ Text[ japanese ] = "Ó°ÄÞ";
+ Text[ chinese_traditional ] = "¼Ò¦¡";
+ Text[ arabic ] = "ÇáæÖÚ";
+ Text[ dutch ] = "Modus";
+ Text[ chinese_simplified ] = "ģʽ";
+ Text[ greek ] = "ÊáôÜóôáóç";
+ Text[ korean ] = "¸ðµå";
+ Text[ turkish ] = "Kip";
+ };
+ ImageButton BTN_TEX_REPLACE
+ {
+ Pos = MAP_APPFONT ( 70 , 45 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Nur Textur" ;
+ QuickHelpText [ ENGLISH ] = "Only Texture" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "replac3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Só textura" ;
+ QuickHelpText [ english_us ] = "Only Texture" ;
+ QuickHelpText [ portuguese_brazilian ] = "Nur Textur" ;
+ QuickHelpText [ swedish ] = "Bara textur" ;
+ QuickHelpText [ danish ] = "Kun tekstur" ;
+ QuickHelpText [ italian ] = "Solo struttura" ;
+ QuickHelpText [ spanish ] = "Sólo textura" ;
+ QuickHelpText [ french ] = "Uniquement la texture" ;
+ QuickHelpText [ dutch ] = "Alleen textuur" ;
+ QuickHelpText[ russian ] = "Òîëüêî òåêñòóðà";
+ QuickHelpText[ polish ] = "Tylko tekstura";
+ QuickHelpText[ japanese ] = "ø½Á­±‚Ì‚Ý";
+ QuickHelpText[ chinese_simplified ] = "Ö»ÊÇÎÆÀí";
+ QuickHelpText[ chinese_traditional ] = "¥u¬O¯¾²z";
+ QuickHelpText[ arabic ] = "äÓíÌ ÝÞØ";
+ QuickHelpText[ dutch ] = "Alleen textuur";
+ QuickHelpText[ chinese_simplified ] = "Ö»ÊÇÎÆÀí";
+ QuickHelpText[ greek ] = "Ìüíï õöÞ";
+ QuickHelpText[ korean ] = "Only Texture";
+ };
+ ImageButton BTN_TEX_MODULATE
+ {
+ Pos = MAP_APPFONT ( 70 + BUTTON_WIDTH , 45 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Textur und Schattierung" ;
+ QuickHelpText [ ENGLISH ] = "Texture and shading" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "modula3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Textura e sombreado" ;
+ QuickHelpText [ english_us ] = "Texture and Shading" ;
+ QuickHelpText [ portuguese_brazilian ] = "Textur und Schattierung" ;
+ QuickHelpText [ swedish ] = "Textur och skugga" ;
+ QuickHelpText [ danish ] = "Tekstur og nuance" ;
+ QuickHelpText [ italian ] = "Struttura e ombre" ;
+ QuickHelpText [ spanish ] = "Textura y sombras" ;
+ QuickHelpText [ french ] = "Texture et ombre" ;
+ QuickHelpText [ dutch ] = "Textuur en schaduw" ;
+ QuickHelpText[ russian ] = "Òåêñòóðà è òåíü";
+ QuickHelpText[ polish ] = "Tekstura i cieniowanie";
+ QuickHelpText[ japanese ] = "ø½Á­±‚Ɖe•t‚«";
+ QuickHelpText[ chinese_simplified ] = "ÎÆÀíºÍÒõÓ°";
+ QuickHelpText[ chinese_traditional ] = "¯¾²z©M³±¼v";
+ QuickHelpText[ arabic ] = "äÓíÌ æÊÙáíá";
+ QuickHelpText[ dutch ] = "Textuur en schaduw";
+ QuickHelpText[ chinese_simplified ] = "ÎÆÀíºÍÒõÓ°";
+ QuickHelpText[ greek ] = "ÕöÞ êáé óêßáóç";
+ QuickHelpText[ korean ] = "Texture and Shading";
+ };
+ ImageButton BTN_TEX_BLEND
+ {
+ Pos = MAP_APPFONT ( 70 + BUTTON_WIDTH * 2 , 45 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Textur, Schattierung und Farbe" ;
+ QuickHelpText [ ENGLISH ] = "Texture, shadingand color" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "blend3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Textura, sombras e cor" ;
+ QuickHelpText [ english_us ] = "Texture, Shadow and Color" ;
+ QuickHelpText [ portuguese_brazilian ] = "Textur, Schattierung und Farbe" ;
+ QuickHelpText [ swedish ] = "Textur, skugga och färg" ;
+ QuickHelpText [ danish ] = "Tekstur, nuance og farve" ;
+ QuickHelpText [ italian ] = "Struttura, ombra e colore" ;
+ QuickHelpText [ spanish ] = "Textura, sombra y color" ;
+ QuickHelpText [ french ] = "Texture, ombre et couleur" ;
+ QuickHelpText [ dutch ] = "Textuur, schaduw en kleur" ;
+ QuickHelpText[ russian ] = "Òåêñòóðà, òåíü, öâåò";
+ QuickHelpText[ polish ] = "Tekstura, Cieniowanie i Kolor";
+ QuickHelpText[ japanese ] = "ø½Á­±, ‰e•t‚«‹y‚ÑF";
+ QuickHelpText[ chinese_simplified ] = "ÎÆÀí£¬ÒõÓ°ºÍÑÕÉ«";
+ QuickHelpText[ chinese_traditional ] = "¯¾²z¡A³±¼v©MÃC¦â";
+ QuickHelpText[ arabic ] = "äÓíÌ¡ ÊÙáíá æáæä";
+ QuickHelpText[ dutch ] = "Textuur, schaduw en kleur";
+ QuickHelpText[ chinese_simplified ] = "ÎÆÀí£¬ÒõÓ°ºÍÑÕÉ«";
+ QuickHelpText[ greek ] = "ÕöÞ, óêßáóç êáé ÷ñþììá";
+ QuickHelpText[ korean ] = "Texture, Shadow and Color";
+ };
+ FixedText FT_TEX_PROJECTION_X
+ {
+ Pos = MAP_APPFONT ( 11 , 62 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Projektion X" ;
+ Text [ ENGLISH ] = "Projection X" ;
+ Text [ english_us ] = "Projection X" ;
+ Text [ portuguese_brazilian ] = "Projektion X" ;
+ Text [ swedish ] = "Projektion X" ;
+ Text [ danish ] = "Projektion X" ;
+ Text [ italian ] = "Proiezione X" ;
+ Text [ spanish ] = "Proyección X" ;
+ Text [ french ] = "Projection X" ;
+ Text [ dutch ] = "Projectie X" ;
+ Text [ portuguese ] = "Projecção X" ;
+ Text[ chinese_simplified ] = "ͶӰ X";
+ Text[ russian ] = "Ïðîåêöèÿ X";
+ Text[ polish ] = "Projekcja X";
+ Text[ japanese ] = "ÌßÛ¼Þª¸ÄX";
+ Text[ chinese_traditional ] = "§ë¼v X";
+ Text[ arabic ] = "ÇáãÓÞØ Ó";
+ Text[ dutch ] = "Projectie X";
+ Text[ chinese_simplified ] = "ͶӰ X";
+ Text[ greek ] = "ÐñïâïëÞ X";
+ Text[ korean ] = "ÇÁ·ÎÁ§¼Ç X";
+ Text[ turkish ] = "Ýzdüþüm X";
+ };
+ ImageButton BTN_TEX_OBJECT_X
+ {
+ Pos = MAP_APPFONT ( 70 , 60 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Objektspezifisch" ;
+ QuickHelpText [ ENGLISH ] = "object specific" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "objspc3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Específico do objecto" ;
+ QuickHelpText [ english_us ] = "Object-Specific" ;
+ QuickHelpText [ portuguese_brazilian ] = "Objektspezifisch" ;
+ QuickHelpText [ swedish ] = "Objektspecifik" ;
+ QuickHelpText [ danish ] = "Objektspecifik" ;
+ QuickHelpText [ italian ] = "Specifico per l'oggetto" ;
+ QuickHelpText [ spanish ] = "Específico del objeto" ;
+ QuickHelpText [ french ] = "Spécifique à l'objet" ;
+ QuickHelpText [ dutch ] = "Passend bij object" ;
+ QuickHelpText[ russian ] = "Â çàâèñèìîñòè îò îáúåêòà";
+ QuickHelpText[ polish ] = "Specyficzny dla obiektu";
+ QuickHelpText[ japanese ] = "µ¼Þ­Í޸Ă̓ÁŽê«";
+ QuickHelpText[ chinese_simplified ] = "ÌØÊâ¶ÔÏó";
+ QuickHelpText[ chinese_traditional ] = "¯S®íª«¥ó";
+ QuickHelpText[ arabic ] = "ÎÇÕ ÈÇáßÇÆä";
+ QuickHelpText[ dutch ] = "Passend bij object";
+ QuickHelpText[ chinese_simplified ] = "ÌØÊâ¶ÔÏó";
+ QuickHelpText[ greek ] = "Ó÷åôéêÜ ìå ôï áíôéêåßìåíï";
+ QuickHelpText[ korean ] = "Object-Specific";
+ };
+ ImageButton BTN_TEX_PARALLEL_X
+ {
+ Pos = MAP_APPFONT ( 70 + BUTTON_WIDTH , 60 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Parallel" ;
+ QuickHelpText [ ENGLISH ] = "Parallel" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "parallel.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Paralelo" ;
+ QuickHelpText [ english_us ] = "Parallel" ;
+ QuickHelpText [ portuguese_brazilian ] = "Parallel" ;
+ QuickHelpText [ swedish ] = "Parallell" ;
+ QuickHelpText [ danish ] = "Parallel" ;
+ QuickHelpText [ italian ] = "Parallelo" ;
+ QuickHelpText [ spanish ] = "Paralelo" ;
+ QuickHelpText [ french ] = "Parallèle" ;
+ QuickHelpText [ dutch ] = "Parallel" ;
+ QuickHelpText[ russian ] = "Ïàðàëëåëüíî";
+ QuickHelpText[ polish ] = "Równolegle";
+ QuickHelpText[ japanese ] = "•½s";
+ QuickHelpText[ chinese_simplified ] = "ƽÐÐ";
+ QuickHelpText[ chinese_traditional ] = "¥­¦æ";
+ QuickHelpText[ arabic ] = "ãæÇÒò";
+ QuickHelpText[ dutch ] = "Parallel";
+ QuickHelpText[ chinese_simplified ] = "ƽÐÐ";
+ QuickHelpText[ greek ] = "ÐáñÜëëçëá";
+ QuickHelpText[ korean ] = "Parallel";
+ };
+ ImageButton BTN_TEX_CIRCLE_X
+ {
+ Pos = MAP_APPFONT ( 70 + BUTTON_WIDTH * 2 , 60 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Kreisförmig" ;
+ QuickHelpText [ ENGLISH ] = "circular" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sphere3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Circular" ;
+ QuickHelpText [ english_us ] = "Circular" ;
+ QuickHelpText [ portuguese_brazilian ] = "Kreisförmig" ;
+ QuickHelpText [ swedish ] = "Cirkelformad" ;
+ QuickHelpText [ danish ] = "Cirkelformet" ;
+ QuickHelpText [ italian ] = "Circolare" ;
+ QuickHelpText [ spanish ] = "Circular" ;
+ QuickHelpText [ french ] = "Circulaire" ;
+ QuickHelpText [ dutch ] = "Cirkelvormig" ;
+ QuickHelpText[ russian ] = "Êðóãîîáðàçíûé";
+ QuickHelpText[ polish ] = "W kszta³cie ko³a";
+ QuickHelpText[ japanese ] = "‰~Œ`ó";
+ QuickHelpText[ chinese_simplified ] = "Ô²ÐÎ";
+ QuickHelpText[ chinese_traditional ] = "¶ê§Î";
+ QuickHelpText[ arabic ] = "ÏÇÆÑí";
+ QuickHelpText[ dutch ] = "Cirkelvormig";
+ QuickHelpText[ chinese_simplified ] = "Ô²ÐÎ";
+ QuickHelpText[ greek ] = "ÊõêëéêÜ";
+ QuickHelpText[ korean ] = "Circular";
+ };
+ FixedText FT_TEX_PROJECTION_Y
+ {
+ Pos = MAP_APPFONT ( 11 , 77 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Projektion Y" ;
+ Text [ ENGLISH ] = "Projection Y" ;
+ Text [ english_us ] = "Projection Y" ;
+ Text [ portuguese_brazilian ] = "Projektion Y" ;
+ Text [ swedish ] = "Projektion Y" ;
+ Text [ danish ] = "Projektion Y" ;
+ Text [ italian ] = "Proiezione Y" ;
+ Text [ spanish ] = "Proyección Y" ;
+ Text [ french ] = "Projection Y" ;
+ Text [ dutch ] = "Projectie Y" ;
+ Text [ portuguese ] = "Projecção Y" ;
+ Text[ chinese_simplified ] = "ͶӰ Y";
+ Text[ russian ] = "Ïðîåêöèÿ Y";
+ Text[ polish ] = "Projekcja Y";
+ Text[ japanese ] = "ÌßÛ¼Þª¸ÄY";
+ Text[ chinese_traditional ] = "§ë¼v Y";
+ Text[ arabic ] = "ÇáãÓÞØ Õ";
+ Text[ dutch ] = "Projectie Y";
+ Text[ chinese_simplified ] = "ͶӰ Y";
+ Text[ greek ] = "ÐñïâïëÞ Y";
+ Text[ korean ] = "ÇÁ·ÎÁ§¼Ç Y";
+ Text[ turkish ] = "Ýzdüþüm Y";
+ };
+ ImageButton BTN_TEX_OBJECT_Y
+ {
+ Pos = MAP_APPFONT ( 70 , 75 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Objektspezifisch" ;
+ QuickHelpText [ ENGLISH ] = "Object specific" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "objspc3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Específico do objecto" ;
+ QuickHelpText [ english_us ] = "Object-Specific" ;
+ QuickHelpText [ portuguese_brazilian ] = "Objektspezifisch" ;
+ QuickHelpText [ swedish ] = "Objektspecifik" ;
+ QuickHelpText [ danish ] = "Objektspecifik" ;
+ QuickHelpText [ italian ] = "Specifico per l'oggetto" ;
+ QuickHelpText [ spanish ] = "Específico del objeto" ;
+ QuickHelpText [ french ] = "Spécifique à l'objet" ;
+ QuickHelpText [ dutch ] = "Passend bij object" ;
+ QuickHelpText[ russian ] = "Â çàâèñèìîñòè îò îáúåêòà";
+ QuickHelpText[ polish ] = "Specyficzny dla obiektu";
+ QuickHelpText[ japanese ] = "µÌÞ¼Þ­¸Ä‚Ì“ÁŽê«";
+ QuickHelpText[ chinese_simplified ] = "ÌØÊâ¶ÔÏó";
+ QuickHelpText[ chinese_traditional ] = "¯S®íª«¥ó";
+ QuickHelpText[ arabic ] = "ÎÇÕ ÈÇáßÇÆä";
+ QuickHelpText[ dutch ] = "Passend bij object";
+ QuickHelpText[ chinese_simplified ] = "ÌØÊâ¶ÔÏó";
+ QuickHelpText[ greek ] = "Ó÷åôéêÜ ìå ôï áíôéêåßìåíï";
+ QuickHelpText[ korean ] = "Object-Specific";
+ };
+ ImageButton BTN_TEX_PARALLEL_Y
+ {
+ Pos = MAP_APPFONT ( 70 + BUTTON_WIDTH , 75 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Parallel" ;
+ QuickHelpText [ ENGLISH ] = "Parallel" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "parallel.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Paralelo" ;
+ QuickHelpText [ english_us ] = "Parallel" ;
+ QuickHelpText [ portuguese_brazilian ] = "Parallel" ;
+ QuickHelpText [ swedish ] = "Parallell" ;
+ QuickHelpText [ danish ] = "Parallel" ;
+ QuickHelpText [ italian ] = "Parallelo" ;
+ QuickHelpText [ spanish ] = "Paralelo" ;
+ QuickHelpText [ french ] = "Parallèle" ;
+ QuickHelpText [ dutch ] = "Parallel" ;
+ QuickHelpText[ russian ] = "Ïàðàëëåëüíî";
+ QuickHelpText[ polish ] = "Równolegle";
+ QuickHelpText[ japanese ] = "•½s";
+ QuickHelpText[ chinese_simplified ] = "ƽÐÐ";
+ QuickHelpText[ chinese_traditional ] = "¥­¦æ";
+ QuickHelpText[ arabic ] = "ãæÇÒò";
+ QuickHelpText[ dutch ] = "Parallel";
+ QuickHelpText[ chinese_simplified ] = "ƽÐÐ";
+ QuickHelpText[ greek ] = "ÐáñÜëëçëá";
+ QuickHelpText[ korean ] = "Parallel";
+ };
+ ImageButton BTN_TEX_CIRCLE_Y
+ {
+ Pos = MAP_APPFONT ( 70 + BUTTON_WIDTH * 2 , 75 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Kreisförmig" ;
+ QuickHelpText [ ENGLISH ] = "Circular" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sphere3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Circular" ;
+ QuickHelpText [ english_us ] = "Circular" ;
+ QuickHelpText [ portuguese_brazilian ] = "Kreisförmig" ;
+ QuickHelpText [ swedish ] = "Cirkelformad" ;
+ QuickHelpText [ danish ] = "Cirkelformet" ;
+ QuickHelpText [ italian ] = "Circolare" ;
+ QuickHelpText [ spanish ] = "Circular" ;
+ QuickHelpText [ french ] = "Circulaire" ;
+ QuickHelpText [ dutch ] = "Cirkelvormig" ;
+ QuickHelpText[ russian ] = "Êðóãîîáðàçíûé";
+ QuickHelpText[ polish ] = "W kszta³cie ko³a";
+ QuickHelpText[ japanese ] = "‰~Œ`ó";
+ QuickHelpText[ chinese_simplified ] = "Ô²ÐÎ";
+ QuickHelpText[ chinese_traditional ] = "¶ê§Î";
+ QuickHelpText[ arabic ] = "ÏÇÆÑí";
+ QuickHelpText[ dutch ] = "Cirkelvormig";
+ QuickHelpText[ chinese_simplified ] = "Ô²ÐÎ";
+ QuickHelpText[ greek ] = "ÊõêëéêÜ";
+ QuickHelpText[ korean ] = "Circular";
+ };
+ FixedText FT_TEX_FILTER
+ {
+ Pos = MAP_APPFONT ( 11 , 92 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Filtern" ;
+ Text [ ENGLISH ] = "Filtering" ;
+ Text [ english_us ] = "Filtering" ;
+ Text [ portuguese_brazilian ] = "Filtern" ;
+ Text [ swedish ] = "Filtrera" ;
+ Text [ danish ] = "Filtrer" ;
+ Text [ italian ] = "Filtra" ;
+ Text [ spanish ] = "Filtrar" ;
+ Text [ french ] = "Filtrer" ;
+ Text [ dutch ] = "Filteren" ;
+ Text [ portuguese ] = "Filtros" ;
+ Text[ chinese_simplified ] = "¹ýÂË";
+ Text[ russian ] = "Ôèëüòðàöèÿ";
+ Text[ polish ] = "Filtrowanie";
+ Text[ japanese ] = "̨ÙÀ";
+ Text[ chinese_traditional ] = "¹LÂo";
+ Text[ arabic ] = "ÊÕÝíÉ";
+ Text[ dutch ] = "Filteren";
+ Text[ chinese_simplified ] = "¹ýÂË";
+ Text[ greek ] = "ÖéëôñÜñéóìá";
+ Text[ korean ] = "ÇÊÅ͸µ";
+ Text[ turkish ] = "Filtrele";
+ };
+ ImageButton BTN_TEX_FILTER
+ {
+ Pos = MAP_APPFONT ( 70 , 90 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Filtern ein/aus" ;
+ QuickHelpText [ ENGLISH ] = "filtering" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "filter3d.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Activa/Desactiva filtro" ;
+ QuickHelpText [ english_us ] = "Filtering On/Off" ;
+ QuickHelpText [ portuguese_brazilian ] = "Filtern ein/aus" ;
+ QuickHelpText [ swedish ] = "Filtrera på/av" ;
+ QuickHelpText [ danish ] = "Aktiver/deaktiver filtrering" ;
+ QuickHelpText [ italian ] = "Filtro on/off" ;
+ QuickHelpText [ spanish ] = "Activar/desactivar filtración" ;
+ QuickHelpText [ french ] = "Activer/désactiver le filtre" ;
+ QuickHelpText [ dutch ] = "Filteren aan/uit" ;
+ QuickHelpText[ russian ] = "Âêë./âûêë. ôèëüòðû";
+ QuickHelpText[ polish ] = "W³¹cz/Wy³¹cz filtrowanie";
+ QuickHelpText[ japanese ] = "̨ÙÀ µÝ/µÌ";
+ QuickHelpText[ chinese_simplified ] = "¼¤»î/ʧ»î¹ýÂË";
+ QuickHelpText[ chinese_traditional ] = "¿E¬¡/¥¢¬¡¹LÂo¾¹";
+ QuickHelpText[ arabic ] = "ÊÔÛíá/ÅíÞÇÝ ÇáÊÕÝíÉ";
+ QuickHelpText[ dutch ] = "Filteren aan/uit";
+ QuickHelpText[ chinese_simplified ] = "¼¤»î/ʧ»î¹ýÂË";
+ QuickHelpText[ greek ] = "Ößëôñï Íáé/¼÷é";
+ QuickHelpText[ korean ] = "Filtering On/Off";
+ };
+ GroupBox GRP_TEXTURE
+ {
+ Pos = MAP_APPFONT ( BORDER , GROUP_Y ) ;
+ Size = MAP_APPFONT ( WIDTH - 2 * BORDER , GROUP_HEIGHT ) ;
+ Text = "Texturen" ;
+ Text [ ENGLISH ] = "Textures" ;
+ Text [ english_us ] = "Textures" ;
+ Text [ portuguese_brazilian ] = "Texturen" ;
+ Text [ swedish ] = "Texturer" ;
+ Text [ danish ] = "Tekstur" ;
+ Text [ italian ] = "Motivi" ;
+ Text [ spanish ] = "Texturas" ;
+ Text [ french ] = "Textures" ;
+ Text [ dutch ] = "Texturen" ;
+ Text [ portuguese ] = "Texturas" ;
+ Text[ chinese_simplified ] = "ÎÆÀí";
+ Text[ russian ] = "Òåêñòóðû";
+ Text[ polish ] = "Tekstury";
+ Text[ japanese ] = "ø½Á­±";
+ Text[ chinese_traditional ] = "¯¾²z";
+ Text[ arabic ] = "ÇáÃäÓÌÉ";
+ Text[ dutch ] = "Texturen";
+ Text[ chinese_simplified ] = "ÎÆÀí";
+ Text[ greek ] = "ÕöÞ";
+ Text[ korean ] = "Áú°¨";
+ Text[ turkish ] = "Yüzeyler";
+ };
+ // Material
+ /* Control CTL_MATERIAL
+ {
+ //HelpId = HID_SD_CTL_FAVORITES ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( BORDER + 6 , GROUP_Y + 9 ) ;
+ Size = MAP_APPFONT ( GROUP_WIDTH - 12 , GROUP_HEIGHT - 15 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+ };
+*/
+ // Materialeditor
+ FixedText FT_MAT_FAVORITES
+ {
+ Pos = MAP_APPFONT ( 6 , 30 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ Text = "Favoriten" ;
+ Text [ ENGLISH ] = "Favorites" ;
+ Text [ english_us ] = "Favorites" ;
+ Text [ portuguese_brazilian ] = "Favoriten" ;
+ Text [ swedish ] = "Favoriter" ;
+ Text [ danish ] = "Favoriter" ;
+ Text [ italian ] = "Preferiti" ;
+ Text [ spanish ] = "Favoritos" ;
+ Text [ french ] = "Favoris" ;
+ Text [ dutch ] = "Favorieten" ;
+ Text [ portuguese ] = "Favoritos" ;
+ Text[ chinese_simplified ] = "ÊÕ²Ø";
+ Text[ russian ] = "Èçáðàííûå";
+ Text[ polish ] = "Ulubione";
+ Text[ japanese ] = "‚¨‹C‚É“ü‚è";
+ Text[ chinese_traditional ] = "§Úªº³Ì·R";
+ Text[ arabic ] = "ÇáãÝÖáÉ";
+ Text[ dutch ] = "Favorieten";
+ Text[ chinese_simplified ] = "ÊÕ²Ø";
+ Text[ greek ] = "ÐñïôéìÞóåéò";
+ Text[ korean ] = "Áñ°Ü ã±â";
+ Text[ turkish ] = "Sýk kullanýlanlar";
+ };
+ ListBox LB_MAT_FAVORITES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 80 , 28 ) ;
+ Size = MAP_APPFONT ( 66 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Benutzerdefiniert" ; > ;
+ < "Metall" ; > ;
+ < "Gold" ; > ;
+ < "Chrom" ; > ;
+ < "Plastik" ; > ;
+ < "Holz" ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "User-defined" ; > ;
+ < "Metal" ; > ;
+ < "Gold" ; > ;
+ < "Chrome" ; > ;
+ < "Plastic" ; > ;
+ < "Wood" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Definido pelo utilizador" ; > ;
+ < "Metal" ; > ;
+ < "Ouro" ; > ;
+ < "Cromado" ; > ;
+ < "Plástico" ; > ;
+ < "Madeira" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "User-defined" ; > ;
+ < "Metal" ; > ;
+ < "Gold" ; > ;
+ < "Chrome" ; > ;
+ < "Plastic" ; > ;
+ < "Wood" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Benutzerdefiniert" ; > ;
+ < "Metall" ; > ;
+ < "Gold" ; > ;
+ < "Chrom" ; > ;
+ < "Plastik" ; > ;
+ < "Holz" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Användardefinierad" ; > ;
+ < "Metall" ; > ;
+ < "Guld" ; > ;
+ < "Krom" ; > ;
+ < "Plast" ; > ;
+ < "Trä" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Brugerdefineret" ; > ;
+ < "Metal" ; > ;
+ < "Guld" ; > ;
+ < "Krom" ; > ;
+ < "Plastik" ; > ;
+ < "Træ" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Definito dall'utente" ; > ;
+ < "Metallo" ; > ;
+ < "Oro" ; > ;
+ < "Cromato" ; > ;
+ < "Plastica" ; > ;
+ < "Legno" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Definido por el usuario" ; > ;
+ < "Metal" ; > ;
+ < "Oro" ; > ;
+ < "Cromo" ; > ;
+ < "Plástico" ; > ;
+ < "Madera" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Défini par l'utilisateur" ; > ;
+ < "Métal" ; > ;
+ < "Or" ; > ;
+ < "Chrome" ; > ;
+ < "Plastique" ; > ;
+ < "Bois" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Gebruikergedefinieerd" ; > ;
+ < "Metaal" ; > ;
+ < "Goud" ; > ;
+ < "Chroom" ; > ;
+ < "Plastic" ; > ;
+ < "Hout" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ʹÓÃÕß×Ô¶¨" ; > ;
+ < "½ðÊô" ; > ;
+ < "½ð" ; > ;
+ < "¸õ" ; > ;
+ < "ËÜÁÏ" ; > ;
+ < "ľͷ" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Çàäàíî ïîëüçîâàòåëåì" ; > ;
+ < "Ìåòàëë" ; > ;
+ < "Çîëîòî" ; > ;
+ < "Õðîì" ; > ;
+ < "Ïëàñòèê" ; > ;
+ < "Äåðåâî" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Zdef. przez u¿ytk." ; > ;
+ < "Metal" ; > ;
+ < "Z³oto" ; > ;
+ < "Chrom" ; > ;
+ < "Plastyk" ; > ;
+ < "Drewno" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "Õ°»Þ°Ý’è" ; > ;
+ < "ÒÀÙ" ; > ;
+ < "ºÞ°ÙÄÞ" ; > ;
+ < "¸ÞÛÑ" ; > ;
+ < "Ìß×½Á¯¸" ; > ;
+ < "–ØÞ" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¦Û­q" ; > ;
+ < "ª÷ÄÝ" ; > ;
+ < "ª÷" ; > ;
+ < "»Ì" ; > ;
+ < "¶ì½¦" ; > ;
+ < "¤ìÀY" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ãÚÑÝ ãä ÞÈá ÇáãÓÊÎÏã" ; > ;
+ < "ãÚÏä" ; > ;
+ < "ÐåÈ" ; > ;
+ < "ßÑæã" ; > ;
+ < "ÈáÇÓÊíß" ; > ;
+ < "ÎÔÈ" ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Gebruikergedefinieerd" ; > ;
+ < "Metaal" ; > ;
+ < "Goud" ; > ;
+ < "Chroom" ; > ;
+ < "Plastic" ; > ;
+ < "Hout" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ʹÓÃÕß×Ô¶¨" ; > ;
+ < "½ðÊô" ; > ;
+ < "½ð" ; > ;
+ < "¸õ" ; > ;
+ < "ËÜÁÏ" ; > ;
+ < "ľͷ" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "Ïñéæüìåíï áðü ôïí ÷ñÞóôç" ; > ;
+ < "ÌÝôáëëï" ; > ;
+ < "×ñõóüò" ; > ;
+ < "×ñþìéï" ; > ;
+ < "Ðëáóôéêü" ; > ;
+ < "Îýëï" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "»ç¿ëÀÚ Á¤ÀÇ" ; > ;
+ < "±Ý¼Ó" ; > ;
+ < "±Ý" ; > ;
+ < "Å©·Ò" ; > ;
+ < "Çöó½ºÆ½" ; > ;
+ < "³ª¹«" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Benutzerdefiniert" ; > ;
+ < "Metall" ; > ;
+ < "Gold" ; > ;
+ < "Chrom" ; > ;
+ < "Plastik" ; > ;
+ < "Holz" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Kullanýcý tanýmlý" ; > ;
+ < "Metal" ; > ;
+ < "Altýn" ; > ;
+ < "Krom" ; > ;
+ < "Plastik" ; > ;
+ < "Ahþap" ; > ;
+ };
+ };
+ FixedText FT_MAT_COLOR
+ {
+ Pos = MAP_APPFONT ( 6 , 45 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "Objektfarbe" ;
+ Text [ ENGLISH ] = "Object color" ;
+ Text [ english_us ] = "Object color" ;
+ Text [ portuguese_brazilian ] = "Objektfarbe" ;
+ Text [ swedish ] = "Objektfärg" ;
+ Text [ danish ] = "Objektfarve" ;
+ Text [ italian ] = "Colore oggetto" ;
+ Text [ spanish ] = "Color del objeto" ;
+ Text [ french ] = "Couleur objet" ;
+ Text [ dutch ] = "Objectkleur" ;
+ Text [ portuguese ] = "Cor do objecto" ;
+ Text[ chinese_simplified ] = "¶ÔÏóÑÕÉ«";
+ Text[ russian ] = "Öâåò îáúåêòà";
+ Text[ polish ] = "Kolor obiektu";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä‚ÌF";
+ Text[ chinese_traditional ] = "ª«¥óÃC¦â";
+ Text[ arabic ] = "áæä ÇáßÇÆä";
+ Text[ dutch ] = "Objectkleur";
+ Text[ chinese_simplified ] = "¶ÔÏóÑÕÉ«";
+ Text[ greek ] = "×ñþìá áíôéêåéìÝíïõ";
+ Text[ korean ] = "°³Ã¼ »ö";
+ Text[ turkish ] = "Nesne rengi";
+ };
+ ListBox LB_MAT_COLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 80 , 43 ) ;
+ Size = MAP_APPFONT ( 52 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ImageButton BTN_MAT_COLOR
+ {
+ Pos = MAP_APPFONT ( 35 + BUTTON_WIDTH * 7 + 7 , 43 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Farbe über Farbdialog wählen" ;
+ QuickHelpText [ ENGLISH ] = "Chose color with color dialog" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "colordlg.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Caixa de diálogo das cores" ;
+ QuickHelpText [ english_us ] = "Colors Dialog" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe über Farbdialog wählen" ;
+ QuickHelpText [ swedish ] = "Välj färg via färgdialog" ;
+ QuickHelpText [ danish ] = "Vælg farve via farvedialog" ;
+ QuickHelpText [ italian ] = "Scelta colore tramite apposito dialogo" ;
+ QuickHelpText [ spanish ] = "Seleccionar colores a través del diálogo de colores" ;
+ QuickHelpText [ french ] = "Sélectionner la couleur à partir de la boîte de dialogue de couleurs" ;
+ QuickHelpText [ dutch ] = "Kleur via kleurendialoog kiezen" ;
+ QuickHelpText[ russian ] = "Âûáðàòü öâåò â äèàëîãå";
+ QuickHelpText[ polish ] = "Wybierz kolor przez dialog kolorów";
+ QuickHelpText[ japanese ] = "F‚ÌÀÞ²±Û¸Þ‚ÌF‚ð‘I‘ð‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "ÑÕÉ«¶Ô»°À¸";
+ QuickHelpText[ chinese_traditional ] = "³z¹LÃC¦â¤è¶ô¿ï¾ÜÃC¦â";
+ QuickHelpText[ arabic ] = "ÇÎÊíÇÑ Çááæä ÚÈÑ ãÑÈÚ ÍæÇÑ ÇáÃáæÇä";
+ QuickHelpText[ dutch ] = "Kleur via kleurendialoog kiezen";
+ QuickHelpText[ chinese_simplified ] = "ÑÕÉ«¶Ô»°À¸";
+ QuickHelpText[ greek ] = "ÅðéëïãÞ ÷ñþìáôïò ìÝóù äéáëüãïõ ÷ñþìáôïò";
+ QuickHelpText[ korean ] = "Colors Dialog";
+ };
+ FixedText FT_MAT_EMISSION
+ {
+ Pos = MAP_APPFONT ( 6, 59 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "Leuchtfarbe" ;
+ Text [ ENGLISH ] = "Emission" ;
+ Text [ english_us ] = "Illumination color" ;
+ Text [ portuguese_brazilian ] = "Leuchtfarbe" ;
+ Text [ swedish ] = "Lysfärg" ;
+ Text [ danish ] = "Lysfarve" ;
+ Text [ italian ] = "Illuminazione" ;
+ Text [ spanish ] = "Iluminación" ;
+ Text [ french ] = "Luminescence" ;
+ Text [ dutch ] = "Lichtgevende kleur" ;
+ Text [ portuguese ] = "Cor de iluminação" ;
+ Text[ chinese_simplified ] = "ÕÕÃ÷ÑÕÉ«";
+ Text[ russian ] = "Öâåò îñâåùåíèÿ";
+ Text[ polish ] = "Kolor oœwietlenia";
+ Text[ japanese ] = "Æ‚ç‚·F";
+ Text[ chinese_traditional ] = "·Ó©úÃC¦â";
+ Text[ arabic ] = "áæä ÇáÅÖÇÁÉ";
+ Text[ dutch ] = "Lichtgevende kleur";
+ Text[ chinese_simplified ] = "ÕÕÃ÷ÑÕÉ«";
+ Text[ greek ] = "×ñþìá öùôéóìïý";
+ Text[ korean ] = "Á¶¸í»ö";
+ Text[ turkish ] = "Iþýk rengi";
+ };
+ ListBox LB_MAT_EMISSION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 80 , 57 ) ;
+ Size = MAP_APPFONT ( 52 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ImageButton BTN_EMISSION_COLOR
+ {
+ Pos = MAP_APPFONT ( 35 + BUTTON_WIDTH * 7 + 7 , 57 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Farbe über Farbdialog wählen" ;
+ QuickHelpText [ ENGLISH ] = "Chose color with color dialog" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "colordlg.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Caixa de diálogo das cores" ;
+ QuickHelpText [ english_us ] = "Colors Dialog" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe über Farbdialog wählen" ;
+ QuickHelpText [ swedish ] = "Välj färg via färgdialog" ;
+ QuickHelpText [ danish ] = "Vælg farve via farvedialog" ;
+ QuickHelpText [ italian ] = "Scelta colore tramite apposito dialogo" ;
+ QuickHelpText [ spanish ] = "Seleccionar color en el diálogo de colores" ;
+ QuickHelpText [ french ] = "Sélectionner la couleur à partir de la boîte de dialogue de couleurs" ;
+ QuickHelpText [ dutch ] = "Kleur via kleurdialoog kiezen" ;
+ QuickHelpText[ russian ] = "Äèàëîãîâîå îêíî öâåòîâ";
+ QuickHelpText[ polish ] = "Wybierz kolor przez dialog kolorów";
+ QuickHelpText[ japanese ] = "F‚ÌÀÞ²±Û¸Þ‚ÌF‚ð‘I‘ð‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "½èÖúÑÕÉ«¶Ô»°À¸Ñ¡ÔñÑÕÉ«";
+ QuickHelpText[ chinese_traditional ] = "³z¹LÃC¦â¤è¶ô¿ï¾ÜÃC¦â";
+ QuickHelpText[ arabic ] = "ÇÎÊíÇÑ Çááæä ÚÈÑ ÍæÇÑ ÇáÃáæÇä";
+ QuickHelpText[ dutch ] = "Kleur via kleurdialoog kiezen";
+ QuickHelpText[ chinese_simplified ] = "½èÖúÑÕÉ«¶Ô»°À¸Ñ¡ÔñÑÕÉ«";
+ QuickHelpText[ greek ] = "ÅðéëïãÞ ÷ñþìáôïò ìÝóù ôïõ äéáëüãïõ ÷ñùìÜôùí";
+ QuickHelpText[ korean ] = "Colors Dialog";
+ };
+ FixedText FT_MAT_SPECULAR
+ {
+ Pos = MAP_APPFONT ( 14 , 82 ) ;
+ Size = MAP_APPFONT ( 44 , 10 ) ;
+ Text = "Farbe" ;
+ Text [ ENGLISH ] = "Color" ;
+ Text [ english_us ] = "Color" ;
+ Text [ portuguese_brazilian ] = "Farbe" ;
+ Text [ swedish ] = "Färg" ;
+ Text [ danish ] = "Farve" ;
+ Text [ italian ] = "Colore" ;
+ Text [ spanish ] = "Color" ;
+ Text [ french ] = "Couleur" ;
+ Text [ dutch ] = "Kleur" ;
+ Text [ portuguese ] = "Cor" ;
+ Text[ chinese_simplified ] = "ÑÕÉ«";
+ Text[ russian ] = "Öâåò";
+ Text[ polish ] = "Kolor";
+ Text[ japanese ] = "F";
+ Text[ chinese_traditional ] = "ÃC¦â";
+ Text[ arabic ] = "Çááæä";
+ Text[ dutch ] = "Kleur";
+ Text[ chinese_simplified ] = "ÑÕÉ«";
+ Text[ greek ] = "×ñþìá";
+ Text[ korean ] = "»ö";
+ Text[ turkish ] = "Renk";
+ };
+ ListBox LB_MAT_SPECULAR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 80 , 80 ) ;
+ Size = MAP_APPFONT ( 52 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ ImageButton BTN_SPECULAR_COLOR
+ {
+ Pos = MAP_APPFONT ( 35 + BUTTON_WIDTH * 7 + 7 , 80 ) ;
+ Size = BUTTON_SIZE
+ QuickHelpText = "Farbe über Farbdialog wählen" ;
+ QuickHelpText [ ENGLISH ] = "Chose color with color dialog" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "colordlg.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE ;
+ QuickHelpText [ portuguese ] = "Caixa de diálogo das cores" ;
+ QuickHelpText [ english_us ] = "Colors Dialog" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe über Farbdialog wählen" ;
+ QuickHelpText [ swedish ] = "Välj färg via färgdialog" ;
+ QuickHelpText [ danish ] = "Vælg farve via farvedialog" ;
+ QuickHelpText [ italian ] = "Scelta colore tramite apposito dialogo" ;
+ QuickHelpText [ spanish ] = "Seleccionar colores a través del diálogo de colores" ;
+ QuickHelpText [ french ] = "Sélectionner la couleur à partir de la boîte de dialogue de couleurs" ;
+ QuickHelpText [ dutch ] = "Kleur via kleurendialoog kiezen" ;
+ QuickHelpText[ russian ] = "Âûáðàòü öâåò â äèàëîãå";
+ QuickHelpText[ polish ] = "Wybierz kolor przez dialog kolorów";
+ QuickHelpText[ japanese ] = "F‚ÌÀÞ²±Û¸Þ‚ÌF‚ð‘I‘ð‚·‚é";
+ QuickHelpText[ chinese_simplified ] = "½èÖúÑÕÉ«¶Ô»°À¸Ñ¡ÔñÑÕÉ«";
+ QuickHelpText[ chinese_traditional ] = "³z¹LÃC¦â¤è¶ô¿ï¾ÜÃC¦â";
+ QuickHelpText[ arabic ] = "ÇÎÊíÇÑ Çááæä ÚÈÑ ÍæÇÑ ÇáÃáæÇä";
+ QuickHelpText[ dutch ] = "Kleur via kleurendialoog kiezen";
+ QuickHelpText[ chinese_simplified ] = "½èÖúÑÕÉ«¶Ô»°À¸Ñ¡ÔñÑÕÉ«";
+ QuickHelpText[ greek ] = "ÅðéëïãÞ ÷ñþìáôïò ìÝóù ôïõ äéáëüãïõ ÷ñùìÜôùí";
+ QuickHelpText[ korean ] = "Colors Dialog";
+ };
+ FixedText FT_MAT_SPECULAR_INTENSITY
+ {
+ Pos = MAP_APPFONT ( 14 , 96 ) ;
+ Size = MAP_APPFONT ( 44 , 10 ) ;
+ Text = "Intensität" ;
+ Text [ ENGLISH ] = "Intensity" ;
+ Text [ english_us ] = "Intensity" ;
+ Text [ portuguese_brazilian ] = "Intensität" ;
+ Text [ swedish ] = "Intensitet" ;
+ Text [ danish ] = "Intensitet" ;
+ Text [ italian ] = "Intensità" ;
+ Text [ spanish ] = "Intensidad" ;
+ Text [ french ] = "Intensité" ;
+ Text [ dutch ] = "Intensiteit" ;
+ Text [ portuguese ] = "Intensidade" ;
+ Text[ chinese_simplified ] = "Ç¿¶È";
+ Text[ russian ] = "Èíòåíòñèâíîñòü";
+ Text[ polish ] = "IntensywnoϾ";
+ Text[ japanese ] = "–¾ˆÃ“x";
+ Text[ chinese_traditional ] = "±j«×";
+ Text[ arabic ] = "ÇáÔÏÉ";
+ Text[ dutch ] = "Intensiteit";
+ Text[ chinese_simplified ] = "Ç¿¶È";
+ Text[ greek ] = "¸íôáóç";
+ Text[ korean ] = "³óµµ";
+ Text[ turkish ] = "Yoðunluk";
+ };
+ MetricField MTR_MAT_SPECULAR_INTENSITY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 80 , 94 ) ;
+ Size = MAP_APPFONT ( 52 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ Minimum = 1 ;
+ First = 1 ;
+ Maximum = 100 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ };
+ GroupBox GRP_MAT_SPECULAR
+ {
+ Pos = MAP_APPFONT ( BORDER + 6 , 72 ) ;
+ Size = MAP_APPFONT ( GROUP_WIDTH - 2 * 6 , 39 ) ;
+ Text = "Glanzpunkt" ;
+ Text [ ENGLISH ] = "Specular" ;
+ Text [ english_us ] = "Specular" ;
+ Text [ portuguese_brazilian ] = "Glanzpunkt" ;
+ Text [ swedish ] = "Spegelglans" ;
+ Text [ danish ] = "Spejlglans" ;
+ Text [ italian ] = "Riflesso" ;
+ Text [ spanish ] = "Punto de brillo" ;
+ Text [ french ] = "Point brillant" ;
+ Text [ dutch ] = "Glanspunt" ;
+ Text [ portuguese ] = "Ponto brilhante" ;
+ Text[ chinese_simplified ] = "·¢¹âµã";
+ Text[ russian ] = "Òî÷êà áëåñêà";
+ Text[ polish ] = "B³yszcz¹cy punkt";
+ Text[ japanese ] = "Œõ‘ò“_";
+ Text[ chinese_traditional ] = "µo¥úÂI";
+ Text[ arabic ] = "äÞØÉ ÇááãÚÇä";
+ Text[ dutch ] = "Glanspunt";
+ Text[ chinese_simplified ] = "·¢¹âµã";
+ Text[ greek ] = "Óçìåßï áíÜêëáóçò";
+ Text[ korean ] = "ÇÏÀ϶óÀÌÆ®";
+ Text[ turkish ] = "Parlama noktasý";
+ };
+ /*
+ ImageButton BTN_MAT_FAVORITES {
+ Pos = MAP_APPFONT( BORDER, GROUP_PREV_Y+1 );
+ Size = MAP_APPFONT( BUTTON_WIDTH, BUTTON_HEIGHT );
+ QuickHelpText = "Material Favoriten" ;
+ QuickHelpText[ ENGLISH ] = "Material favorites" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "matfavor.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE;
+ };
+ ImageButton BTN_MAT_EDITOR {
+ Pos = MAP_APPFONT( BORDER + BUTTON_WIDTH, GROUP_PREV_Y+1 );
+ Size = MAP_APPFONT( BUTTON_WIDTH, BUTTON_HEIGHT );
+ QuickHelpText = "Material Editor" ;
+ QuickHelpText[ ENGLISH ] = "Material editor" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "matedit.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ TabStop = TRUE;
+ };
+*/
+ GroupBox GRP_MATERIAL
+ {
+ Pos = MAP_APPFONT ( BORDER , GROUP_Y ) ;
+ Size = MAP_APPFONT ( GROUP_WIDTH , GROUP_HEIGHT ) ;
+ Text = "Material" ;
+ Text [ ENGLISH ] = "Material" ;
+ Text [ portuguese ] = "Material" ;
+ Text [ english_us ] = "Material Properties" ;
+ Text [ portuguese_brazilian ] = "Material" ;
+ Text [ swedish ] = "Material" ;
+ Text [ danish ] = "Materiale" ;
+ Text [ italian ] = "Materiale" ;
+ Text [ spanish ] = "Material" ;
+ Text [ french ] = "Matériau" ;
+ Text [ dutch ] = "Materiaal" ;
+ Text[ chinese_simplified ] = "²ÄÁÏ";
+ Text[ russian ] = "Ìàòåðèàë";
+ Text[ polish ] = "Materia³";
+ Text[ japanese ] = "‘fÞ";
+ Text[ chinese_traditional ] = "§÷®Æ";
+ Text[ arabic ] = "ÇáãÇÏÉ";
+ Text[ dutch ] = "Materiaal";
+ Text[ chinese_simplified ] = "²ÄÁÏ";
+ Text[ greek ] = "Õëéêü";
+ Text[ korean ] = "ÀçÁú";
+ Text[ turkish ] = "Malzeme";
+ };
+ Text [ portuguese_brazilian ] = "3D-Effekte" ;
+ Text [ swedish ] = "3D-effekter" ;
+ Text [ danish ] = "3D-effekter" ;
+ Text [ italian ] = "Effetti 3D" ;
+ Text [ spanish ] = "Efectos 3D" ;
+ Text [ french ] = "Effets 3D" ;
+ Text [ dutch ] = "3D-effecten" ;
+ Text [ portuguese ] = "Efeitos 3D" ;
+ Text[ chinese_simplified ] = "3 ά-Ч¹û";
+ Text[ russian ] = "Ýôôåêòû 3-Ì";
+ Text[ polish ] = "Efekty 3-W";
+ Text[ japanese ] = "3D Œø‰Ê";
+ Text[ chinese_traditional ] = "3 ºû®ÄªG";
+ Text[ arabic ] = "ÊÃËíÑÇÊ ËáÇËíÉ ÇáÃÈÚÇÏ";
+ Text[ dutch ] = "3D-effecten";
+ Text[ chinese_simplified ] = "3 ά-Ч¹û";
+ Text[ greek ] = "ÅöÝ 3Ä";
+ Text[ korean ] = "3Â÷¿ø È¿°ú";
+ Text[ turkish ] = "3B efektler";
+};
+Image RID_SVXIMAGE_LIGHT_ON
+{
+ ImageBitmap = Bitmap { File = "lighton.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+};
+Image RID_SVXIMAGE_LIGHT_OFF
+{
+ ImageBitmap = Bitmap { File = "light.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+};
+/*Image RID_SVXIMAGE_LIGHT_ON_SELECTED {
+ ImageBitmap = Bitmap { File = "lightons.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+};
+Image RID_SVXIMAGE_LIGHT_OFF_SELECTED {
+ ImageBitmap = Bitmap { File = "lightsel.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+};*/
+
+String RID_SVXFLOAT3D_FAVORITE
+{
+ Text = "Favorit" ;
+ Text [ ENGLISH ] = "Favorite" ;
+ Text[ english_us ] = "Favorite";
+ Text[ portuguese ] = "Favorito";
+ Text[ russian ] = "Favorite";
+ Text[ greek ] = "Ðñïôßìçóç";
+ Text[ dutch ] = "Favoriet";
+ Text[ french ] = "Favori";
+ Text[ spanish ] = "Favorite";
+ Text[ italian ] = "Favorite";
+ Text[ danish ] = "Favorit";
+ Text[ swedish ] = "Favorit";
+ Text[ polish ] = "Favorite";
+ Text[ portuguese_brazilian ] = "Favorite";
+ Text[ japanese ] = "‚¨‹C‚É“ü‚è";
+ Text[ korean ] = "Favorite";
+ Text[ chinese_simplified ] = "ÊղؼÐ";
+ Text[ chinese_traditional ] = "§Úªº³Ì·R";
+ Text[ turkish ] = "Favorite";
+ Text[ arabic ] = "ÇáãÝÖá";
+};
+String RID_SVXFLOAT3D_FIX_X
+{
+ Text = "X" ;
+ Text [ ENGLISH ] = "X" ;
+ Text[ english_us ] = "X";
+ Text[ portuguese ] = "X";
+ Text[ russian ] = "X";
+ Text[ greek ] = "X";
+ Text[ dutch ] = "X";
+ Text[ french ] = "X";
+ Text[ spanish ] = "X";
+ Text[ italian ] = "X";
+ Text[ danish ] = "X";
+ Text[ swedish ] = "X";
+ Text[ polish ] = "X";
+ Text[ portuguese_brazilian ] = "X";
+ Text[ japanese ] = "X";
+ Text[ korean ] = "X";
+ Text[ chinese_simplified ] = "X";
+ Text[ chinese_traditional ] = "X";
+ Text[ turkish ] = "X";
+ Text[ arabic ] = "X";
+};
+String RID_SVXFLOAT3D_FIX_Y
+{
+ Text = "Y" ;
+ Text [ ENGLISH ] = "Y" ;
+ Text[ english_us ] = "Y";
+ Text[ portuguese ] = "Y";
+ Text[ russian ] = "Y";
+ Text[ greek ] = "Y";
+ Text[ dutch ] = "Y";
+ Text[ french ] = "Y";
+ Text[ spanish ] = "Y";
+ Text[ italian ] = "Y";
+ Text[ danish ] = "Y";
+ Text[ swedish ] = "Y";
+ Text[ polish ] = "Y";
+ Text[ portuguese_brazilian ] = "Y";
+ Text[ japanese ] = "Y";
+ Text[ korean ] = "Y";
+ Text[ chinese_simplified ] = "Y";
+ Text[ chinese_traditional ] = "Y";
+ Text[ turkish ] = "Y";
+ Text[ arabic ] = "Y";
+};
+String RID_SVXFLOAT3D_FIX_Z
+{
+ Text = "Z" ;
+ Text [ ENGLISH ] = "Z" ;
+ Text[ english_us ] = "Z";
+ Text[ portuguese ] = "Z";
+ Text[ russian ] = "Z";
+ Text[ greek ] = "Z";
+ Text[ dutch ] = "Z";
+ Text[ french ] = "Z";
+ Text[ spanish ] = "Z";
+ Text[ italian ] = "Z";
+ Text[ danish ] = "Z";
+ Text[ swedish ] = "Z";
+ Text[ polish ] = "Z";
+ Text[ portuguese_brazilian ] = "Z";
+ Text[ japanese ] = "Z";
+ Text[ korean ] = "Z";
+ Text[ chinese_simplified ] = "Z";
+ Text[ chinese_traditional ] = "Z";
+ Text[ turkish ] = "Z";
+ Text[ arabic ] = "Z";
+};
+String RID_SVXFLOAT3D_FIX_R
+{
+ Text = "R:" ;
+ Text [ ENGLISH ] = "R:" ;
+ Text[ english_us ] = "R:";
+ Text[ portuguese ] = "R:";
+ Text[ russian ] = "R:";
+ Text[ greek ] = "R:";
+ Text[ dutch ] = "R:";
+ Text[ french ] = "R :";
+ Text[ spanish ] = "R:";
+ Text[ italian ] = "R:";
+ Text[ danish ] = "R:";
+ Text[ swedish ] = "R:";
+ Text[ polish ] = "R:";
+ Text[ portuguese_brazilian ] = "R:";
+ Text[ japanese ] = "R:";
+ Text[ korean ] = "R:";
+ Text[ chinese_simplified ] = "R:";
+ Text[ chinese_traditional ] = "R:";
+ Text[ turkish ] = "R:";
+ Text[ arabic ] = "R:";
+};
+String RID_SVXFLOAT3D_FIX_G
+{
+ Text = "G:" ;
+ Text [ ENGLISH ] = "G:" ;
+ Text[ english_us ] = "G:";
+ Text[ portuguese ] = "G:";
+ Text[ russian ] = "G:";
+ Text[ greek ] = "G:";
+ Text[ dutch ] = "G:";
+ Text[ french ] = "V :";
+ Text[ spanish ] = "G:";
+ Text[ italian ] = "G:";
+ Text[ danish ] = "G:";
+ Text[ swedish ] = "G:";
+ Text[ polish ] = "G:";
+ Text[ portuguese_brazilian ] = "G:";
+ Text[ japanese ] = "G:";
+ Text[ korean ] = "G:";
+ Text[ chinese_simplified ] = "G:";
+ Text[ chinese_traditional ] = "G:";
+ Text[ turkish ] = "G:";
+ Text[ arabic ] = "G:";
+};
+String RID_SVXFLOAT3D_FIX_B
+{
+ Text = "B:" ;
+ Text [ ENGLISH ] = "B:" ;
+ Text[ english_us ] = "B:";
+ Text[ portuguese ] = "B:";
+ Text[ russian ] = "B:";
+ Text[ greek ] = "B:";
+ Text[ dutch ] = "B:";
+ Text[ french ] = "B :";
+ Text[ spanish ] = "B:";
+ Text[ italian ] = "B:";
+ Text[ danish ] = "B:";
+ Text[ swedish ] = "B:";
+ Text[ polish ] = "B:";
+ Text[ portuguese_brazilian ] = "B:";
+ Text[ japanese ] = "B:";
+ Text[ korean ] = "B:";
+ Text[ chinese_simplified ] = "B:";
+ Text[ chinese_traditional ] = "B:";
+ Text[ turkish ] = "B:";
+ Text[ arabic ] = "B:";
+};
+
diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx
new file mode 100644
index 0000000000..10685832cd
--- /dev/null
+++ b/svx/source/engine3d/lathe3d.cxx
@@ -0,0 +1,1108 @@
+/*************************************************************************
+ *
+ * $RCSfile: lathe3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "svdstr.hrc"
+#include "svdglob.hxx"
+
+#ifndef _SV_POLY_HXX
+#include <vcl/poly.hxx>
+#endif
+
+#ifndef _SVDPAGE_HXX
+#include "svdpage.hxx"
+#endif
+
+#ifndef _XOUTX_HXX
+#include "xoutx.hxx"
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+#ifndef _SVDIO_HXX
+#include "svdio.hxx"
+#endif
+
+#ifndef _E3D_POLYOB3D_HXX
+#include "polyob3d.hxx"
+#endif
+
+#ifndef _E3D_LATHE3D_HXX
+#include "lathe3d.hxx"
+#endif
+
+#ifndef _POLY3D_HXX
+#include "poly3d.hxx"
+#endif
+
+#ifndef _XPOLY_HXX
+#include "xpoly.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SVDOPATH_HXX
+#include "svdopath.hxx"
+#endif
+
+#ifndef _SVDMODEL_HXX
+#include "svdmodel.hxx"
+#endif
+
+TYPEINIT1(E3dLatheObj, E3dCompoundObject);
+
+/*************************************************************************
+|*
+|* Konstruktor aus SV-Polygon, Scale gibt den Umrechnungsfaktor fuer
+|* die Koordinaten an
+|*
+\************************************************************************/
+
+E3dLatheObj::E3dLatheObj(E3dDefaultAttributes& rDefault, const PolyPolygon& rPoly)
+: E3dCompoundObject(rDefault),
+ aPolyPoly3D (PolyPolygon3D(rPoly, rDefault.GetDefaultLatheScale()))
+{
+ // Defaults setzen
+ SetDefaultAttributes(rDefault);
+
+ // Ueberfluessige Punkte entfernen, insbesondere doppelte
+ // Start- und Endpunkte verhindern
+ aPolyPoly3D.RemoveDoublePoints();
+ nVSegments = aPolyPoly3D[0].GetPointCount();
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* wie voriger Konstruktor, nur mit XPolygon; das XPolygon wird
+|* jedoch nicht Bezier-konvertiert, sondern es werden nur seine
+|* Punktkoordinaten uebernommen
+|*
+\************************************************************************/
+
+E3dLatheObj::E3dLatheObj(E3dDefaultAttributes& rDefault, const XPolyPolygon& rXPoly)
+: E3dCompoundObject(rDefault),
+ aPolyPoly3D (PolyPolygon3D(rXPoly, rDefault.GetDefaultLatheScale()))
+{
+ // Defaults setzen
+ SetDefaultAttributes(rDefault);
+
+ // Ueberfluessige Punkte entfernen, insbesondere doppelte
+ // Start- und Endpunkte verhindern
+ aPolyPoly3D.RemoveDoublePoints();
+ nVSegments = aPolyPoly3D[0].GetPointCount();
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+E3dLatheObj::E3dLatheObj(E3dDefaultAttributes& rDefault, const XPolygon& rXPoly)
+: E3dCompoundObject(rDefault),
+ aPolyPoly3D (PolyPolygon3D(rXPoly, rDefault.GetDefaultLatheScale()))
+{
+ // Defaults setzen
+ SetDefaultAttributes(rDefault);
+
+ // Ueberfluessige Punkte entfernen, insbesondere doppelte
+ // Start- und Endpunkte verhindern
+ aPolyPoly3D.RemoveDoublePoints();
+ nVSegments = aPolyPoly3D[0].GetPointCount();
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Konstruktor aus 3D-Polygon, Scale gibt den Umrechnungsfaktor fuer
+|* die Koordinaten an
+|*
+\************************************************************************/
+
+E3dLatheObj::E3dLatheObj (E3dDefaultAttributes& rDefault, const PolyPolygon3D rPoly3D)
+: E3dCompoundObject(rDefault),
+ aPolyPoly3D(rPoly3D)
+{
+ // Defaults setzen
+ SetDefaultAttributes(rDefault);
+
+ // Ueberfluessige Punkte entfernen, insbesondere doppelte
+ // Start- und Endpunkte verhindern
+ aPolyPoly3D.RemoveDoublePoints();
+ nVSegments = aPolyPoly3D[0].GetPointCount();
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Leer-Konstruktor
+|*
+\************************************************************************/
+
+E3dLatheObj::E3dLatheObj()
+: aPolyPoly3D(Polygon3D())
+{
+ // Defaults setzen
+ E3dDefaultAttributes aDefault;
+ SetDefaultAttributes(aDefault);
+}
+
+void E3dLatheObj::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+{
+ // Defaults setzen
+ nHSegments = rDefault.GetDefaultHSegments();
+ nVSegments = rDefault.GetDefaultVSegments();
+ nEndAngle = rDefault.GetDefaultLatheEndAngle();
+ fLatheScale = rDefault.GetDefaultLatheScale();
+ fLatheBackScale = rDefault.GetDefaultBackScale();
+ fLathePercentDiag = rDefault.GetDefaultPercentDiag();
+ bLatheSmoothed = rDefault.GetDefaultLatheSmoothed();
+ bLatheSmoothFrontBack = rDefault.GetDefaultLatheSmoothFrontBack();
+ bLatheCharacterMode = rDefault.GetDefaultLatheCharacterMode();
+ bLatheCloseFront = rDefault.GetDefaultLatheCloseFront();
+ bLatheCloseBack = rDefault.GetDefaultLatheCloseBack();
+}
+
+/*************************************************************************
+|*
+|* Die eigentliche Konstruktionmethode, erzeugt einen Koerper durch
+|* Rotation des uebergebenen Polygons um die senkrechte Y-Achse. Wenn
+|* nEndAngle < 3600 ist, werden ausserdem zwei Deckelflaechen-Polygone
+|* erzeugt, die den Koerper abschliessen. Das Polygon sollte in der
+|* XY-Ebene liegen, mit X-Koordinaten >= 0; wenn die Anfangs- und End-
+|* X-Koordinaten nicht 0 sind, sollte das Polygon geschlossen sein.
+|* Wenn bDblSided TRUE ist, werden die Rotationsflaechen doppelseitig
+|* angelegt und keine Deckelflaechen erzeugt.
+|*
+\************************************************************************/
+
+// Geometrieerzeugung
+void E3dLatheObj::CreateGeometry()
+{
+ // Start der Geometrieerzeugung ankuendigen
+ StartCreateGeometry();
+
+ // Polygon erzeugen
+ PolyPolygon3D aLathePoly3D(aPolyPoly3D);
+
+ // Eventuelle Anpassung der Segmentanzahlen
+ aLathePoly3D = CreateLathePolyPoly(aPolyPoly3D, nVSegments);
+
+ // Normale holen
+ Vector3D aNormal = aLathePoly3D.GetNormal();
+ if(aNormal.Z() > 0.0)
+ {
+ aLathePoly3D.FlipDirections();
+ aNormal = aLathePoly3D.GetNormal();
+ }
+
+ // Orientierung evtl. vorhandener Loecher in einen definierten
+ // Ausgangszustand bringen
+ aLathePoly3D.SetDirections();
+
+ // Spezialfall Einzelnes Polygon erzeugen
+ FASTBOOL bSinglePoly = (nEndAngle == 0 || nHSegments == 0);
+ if(bSinglePoly)
+ {
+ // nur ein Polygon erzeugen
+ SetDoubleSided(TRUE);
+
+ // Fuer evtl. selbst erzeugte Normalen
+ PolyPolygon3D aNormalsFront;
+
+ // Normalen und Vorderseite selbst erzeugen
+ AddFrontNormals(aLathePoly3D, aNormalsFront, aNormal);
+ CreateFront(aLathePoly3D, aNormalsFront, GetCreateNormals(), GetCreateTexture());
+ }
+ else
+ {
+ // Eventuell doppelseitig erzeugen?
+ if(!aLathePoly3D.IsClosed())
+ bDoubleSided = TRUE;
+
+ // Seiten genenrieren?
+ BOOL bCreateSides = ((nEndAngle < 3600 && !GetDoubleSided()) || (fLatheBackScale != 1.0));
+
+ // Polygone vorbereiten
+ PolyPolygon3D aPrev, aFront, aBack, aNext;
+
+ // Rotation vorbereiten
+ double fAng = DEG2RAD(double(nEndAngle) / 10);
+ Matrix4D aRotMat;
+
+ // Skalierung vorbereiten
+ double fScalePerStep;
+ if(fLatheBackScale != 1.0)
+ fScalePerStep = (fLatheBackScale - 1.0) / (double)nHSegments;
+
+ // Texturen erzeugen?
+ double fTextureDepth=1.0;
+ double fTextureStart=0.0;
+ if(!GetCreateTexture())
+ fTextureStart = fTextureDepth = 0.0;
+
+ // aPrev bis aBack ausfuellen als Startvorbereitung
+ aRotMat.RotateY(-(fAng / (double)nHSegments));
+ aPrev = aLathePoly3D;
+ RotatePoly(aPrev, aRotMat);
+ if(fLatheBackScale != 1.0)
+ {
+ ScalePoly(aPrev, 1.0 - fScalePerStep);
+ }
+ aRotMat.Identity();
+ aRotMat.RotateY(fAng / (double)nHSegments);
+ aFront = aLathePoly3D;
+ aBack = aLathePoly3D;
+ RotatePoly(aBack, aRotMat);
+ if(fLatheBackScale != 1.0)
+ {
+ ScalePoly(aBack, 1.0 + fScalePerStep);
+ }
+
+ // Werte fuer Textur-Zwischensegmenterzeugung berechnen
+ double fTmpStart = 0.0;
+ double fTmpLength = fTextureDepth / (double)nHSegments;
+
+ for(UINT16 a=0;a<nHSegments;a++)
+ {
+ // Naechstes Polygon vorbereiten
+ aNext = aLathePoly3D;
+
+ // Rotieren
+ if(!(a+2 == nHSegments && nEndAngle == 3600))
+ {
+ aRotMat.Identity();
+ aRotMat.RotateY((fAng * (double)(a+2))/ (double)nHSegments);
+ RotatePoly(aNext, aRotMat);
+ }
+
+ // Skalieren
+ if(fLatheBackScale != 1.0)
+ {
+ ScalePoly(aNext, 1.0 + (fScalePerStep * (double)(a+2)));
+ }
+
+ // Jetzt Segment erzeugen
+ CreateSegment(
+ aFront,
+ aBack,
+ &aPrev,
+ &aNext,
+ (a == 0) && bCreateSides && bLatheCloseFront,
+ (a == nHSegments-1) && bCreateSides && bLatheCloseBack,
+ fLathePercentDiag * (double(nHSegments) / 6.0),
+ GetLatheSmoothed(),
+ GetLatheSmoothed(),
+ GetLatheSmoothFrontBack(),
+ 1.0,
+ fTmpStart,
+ fTmpLength,
+ GetCreateTexture(),
+ GetCreateNormals(),
+ GetLatheCharacterMode(),
+ TRUE);
+
+ // naechsten Schritt vorbereiten
+ fTmpStart += fTmpLength;
+ aPrev = aFront;
+ aFront = aBack;
+ aBack = aNext;
+ }
+ }
+
+ // call parent
+ E3dCompoundObject::CreateGeometry();
+}
+
+PolyPolygon3D E3dLatheObj::CreateLathePolyPoly(PolyPolygon3D& rPolyPoly3D, long nVSegs)
+{
+ PolyPolygon3D aLathePolyPolygon3D = rPolyPoly3D;
+ USHORT nCnt = aLathePolyPolygon3D.Count();
+ USHORT nOrigPntCnt = aPolyPoly3D[0].GetPointCount();
+
+ if(nVSegs && nVSegs != nOrigPntCnt)
+ {
+ // Erstes Polygon anpassen
+ aLathePolyPolygon3D[0] = CreateLathePoly(aLathePolyPolygon3D[0], nVSegs);
+ nVSegments = aLathePolyPolygon3D[0].GetPointCount();
+
+ // andere Polygone im richtigen Verhaeltnis anpassen,
+ // aber nur, wenn Wert fuer erstes angepasst werden musste
+ for(UINT16 i = 1; i < nCnt; i++ )
+ {
+ Polygon3D &rPoly3D = aLathePolyPolygon3D[i];
+ USHORT nPntCnt = rPoly3D.GetPointCount();
+ long nNewVSegs = (nPntCnt * nVSegs) / nOrigPntCnt;
+
+ if (nNewVSegs > 0 && nNewVSegs != nPntCnt)
+ {
+ aLathePolyPolygon3D[i] = CreateLathePoly(aLathePolyPolygon3D[i], nNewVSegs);
+ }
+ }
+ }
+ return aLathePolyPolygon3D;
+}
+
+Polygon3D E3dLatheObj::CreateLathePoly(Polygon3D& rPoly3D, long nVSegs)
+{
+ return rPoly3D.GetExpandedPolygon(nVSegs);
+}
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+UINT16 E3dLatheObj::GetObjIdentifier() const
+{
+ return E3D_LATHEOBJ_ID;
+}
+
+/*************************************************************************
+|*
+|* Wireframe erzeugen
+|*
+\************************************************************************/
+
+void E3dLatheObj::CreateWireframe(Polygon3D& rWirePoly, const Matrix4D* pTf,
+ E3dDragDetail eDetail)
+{
+ // Nur selbst erzeugen, wenn alle Linien angezeigt werden sollen
+ if ( eDetail == E3DDETAIL_ALLLINES ||
+ (eDetail == E3DDETAIL_DEFAULT && GetDragDetail() == E3DDETAIL_ALLLINES) )
+ {
+ // Detailliert erzeugen
+ }
+ else
+ {
+ // call parent
+ E3dObject::CreateWireframe(rWirePoly, pTf, eDetail);
+ }
+}
+
+/*************************************************************************
+|*
+|* uebergebene Transformationsmatrix anwenden, BoundVolume anpassen
+|*
+\************************************************************************/
+
+void E3dLatheObj::ApplyTransform(const Matrix4D& rMatrix)
+{
+ // call parent
+ E3dCompoundObject::ApplyTransform(rMatrix);
+
+ // Anwenden auf lokale geometrie
+ aPolyPoly3D.Transform(rMatrix);
+}
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+void E3dLatheObj::operator=(const SdrObject& rObj)
+{
+ // erstmal alle Childs kopieren
+ E3dCompoundObject::operator=(rObj);
+
+ // weitere Parameter kopieren
+ const E3dLatheObj& r3DObj = (const E3dLatheObj&)rObj;
+
+ aPolyPoly3D = r3DObj.aPolyPoly3D;
+ nHSegments = r3DObj.nHSegments;
+ nVSegments = r3DObj.nVSegments;
+ nEndAngle = r3DObj.nEndAngle;
+ fLatheScale = r3DObj.fLatheScale;
+
+ // Ab Version 374 (15.12.97)
+ fLatheBackScale = r3DObj.fLatheBackScale;
+ fLathePercentDiag = r3DObj.fLathePercentDiag;
+ bLatheSmoothed = r3DObj.bLatheSmoothed;
+ bLatheSmoothFrontBack = r3DObj.bLatheSmoothFrontBack;
+ bLatheCharacterMode = r3DObj.bLatheCharacterMode;
+ bLatheCloseFront = r3DObj.bLatheCloseFront;
+ bLatheCloseBack = r3DObj.bLatheCloseBack;
+}
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+void E3dLatheObj::WriteData(SvStream& rOut) const
+{
+ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+ if(nVersion < 3800)
+ {
+ // Alte Geometrie erzeugen, um die E3dPolyObj's zu haben
+ ((E3dCompoundObject*)this)->ReCreateGeometry(TRUE);
+ }
+
+ // leider kann das E3dLatheObj nicht auf E3dObject abgestuetzt werden,
+ // da neue Member hinzugekommen sind und die Kompatibilitaet erhalten
+ // bleiben muss.
+ SdrAttrObj::WriteData(rOut);
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dLatheObj");
+#endif
+
+ pSub->Save(rOut);
+
+ // Parameter aus E3dObject speichern
+ rOut << aLocalBoundVol;
+ Old_Matrix3D aMat3D;
+ aMat3D = aTfMatrix;
+ rOut << aMat3D;
+ rOut << nLogicalGroup;
+ rOut << nObjTreeLevel;
+ rOut << nPartOfParent;
+ rOut << UINT16(eDragDetail);
+
+ // neue Member
+ // Alte version schreibt Polygon3D raus, neue Version
+ // benutzt dafuer das erste Teilpolygon von PolyPolygon3D
+ // rOut << aPolyPoly3D;
+ rOut << aPolyPoly3D[0];
+
+ rOut << nHSegments;
+ rOut << nEndAngle;
+ rOut << ((E3dLatheObj*)this)->GetDoubleSided();
+ rOut << fLatheScale;
+
+ // Ab Version 364f (19.06.97)
+ rOut << nVSegments;
+
+ // Ab Version 374 (15.12.97)
+ rOut << aPolyPoly3D;
+ rOut << fLatheBackScale;
+ rOut << fLathePercentDiag;
+ rOut << (BOOL)bLatheSmoothed;
+ rOut << (BOOL)bLatheSmoothFrontBack;
+ rOut << (BOOL)bLatheCharacterMode;
+
+ // Ab Version 395 (8.6.98): Parameter aus dem Objekt
+ // E3dCompoundObject. Da irgendwann mal jemand die Ableitungs-
+ // hierarchie beim FileFormat unterbrochen hat, wurden diese Attribute
+ // bisher NOCH NIE gespeichert (Grrr). Diese Stelle muss nun natuerlich
+ // auch IMMER MITGEPFLEGT werden, wenn sich Parameter in
+ // E3dCompoundObject oder E3dObject aendern.
+ rOut << BOOL(bDoubleSided);
+ rOut << BOOL(bCreateNormals);
+ rOut << BOOL(bCreateTexture);
+ rOut << BOOL(bUseStdNormals);
+ rOut << BOOL(bUseStdNormalsUseSphere);
+ rOut << BOOL(bUseStdTextureX);
+ rOut << BOOL(bUseStdTextureXUseSphere);
+ rOut << BOOL(bUseStdTextureY);
+ rOut << BOOL(bUseStdTextureYUseSphere);
+ rOut << BOOL(bShadow3D);
+ aFrontMaterial.WriteData(rOut);
+ aBackMaterial.WriteData(rOut);
+ rOut << (UINT16)eTextureKind;
+ rOut << (UINT16)eTextureMode;
+ rOut << BOOL(bInvertNormals);
+
+ // Ab Version 513a (5.2.99): Parameter fuer das
+ // Erzeugen der Vorder/Rueckwand
+ rOut << BOOL(bLatheCloseFront);
+ rOut << BOOL(bLatheCloseBack);
+
+ // neu ab 534: (hat noch gefehlt)
+ rOut << BOOL(bFilterTexture);
+
+ if(nVersion < 3800)
+ {
+ // Geometrie neu erzeugen, um E3dPolyObj's wieder loszuwerden
+ ((E3dCompoundObject*)this)->ReCreateGeometry();
+ }
+}
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+void E3dLatheObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (ImpCheckSubRecords (rHead, rIn))
+ {
+ // leider kann das E3dLatheObj nicht auf E3dObject abgestuetzt werden,
+ // da neue Member hinzugekommen sind und die Kompatibilitaet erhalten
+ // bleiben muss.
+ SdrAttrObj::ReadData(rHead, rIn);
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dLatheObj");
+#endif
+ // dann die Member
+ UINT16 nTmp16;
+
+ pSub->Load(rIn, *pPage);
+
+ // Parameter aus E3dObject laden
+ rIn >> aLocalBoundVol;
+ Old_Matrix3D aMat3D;
+ rIn >> aMat3D;
+ aTfMatrix = Matrix4D(aMat3D);
+ rIn >> nLogicalGroup;
+ rIn >> nObjTreeLevel;
+ rIn >> nPartOfParent;
+ rIn >> nTmp16; eDragDetail = E3dDragDetail(nTmp16);
+
+ // BoundVolume muss neu berechnet werden
+ bBoundVolValid = FALSE;
+
+ if (aCompat.GetBytesLeft ())
+ {
+ // neue Member
+ BOOL bTmp;
+
+ // alte Version holt sich nur ein Polygon3D, wird hier durch
+ // Eintragen als erstes Teilpolygon geladen
+ // rIn >> aPolyPoly3D;
+ rIn >> aPolyPoly3D[0];
+
+ rIn >> nHSegments;
+ rIn >> nEndAngle;
+ rIn >> bTmp; bDoubleSided = bTmp;
+ rIn >> fLatheScale;
+ }
+
+ if (aCompat.GetBytesLeft())
+ {
+ // Ab Version 364f (19.06.97)
+ rIn >> nVSegments;
+ }
+
+ if (aCompat.GetBytesLeft())
+ {
+ // Ab Version 374 (15.12.97)
+ // Gesamtes PolyPolygon laden
+ BOOL bTmp;
+
+ aPolyPoly3D.Clear();
+ rIn >> aPolyPoly3D;
+ rIn >> fLatheBackScale;
+ rIn >> fLathePercentDiag;
+
+ rIn >> bTmp; bLatheSmoothed = bTmp;
+ rIn >> bTmp; bLatheSmoothFrontBack = bTmp;
+ rIn >> bTmp; bLatheCharacterMode = bTmp;
+ }
+ else
+ {
+ // Geometrie aus erzeugten PolyObj's rekonstruieren
+ fLatheBackScale = 1.0;
+ fLathePercentDiag = 0.05;
+
+ bLatheSmoothed = TRUE;
+ bLatheSmoothFrontBack = FALSE;
+ bLatheCharacterMode = FALSE;
+ }
+
+ if (aCompat.GetBytesLeft())
+ {
+ // Ab Version 395 (8.6.98): Parameter aus dem Objekt
+ // E3dCompoundObject. Da irgendwann mal jemand die Ableitungs-
+ // hierarchie beim FileFormat unterbrochen hat, wurden diese Attribute
+ // bisher NOCH NIE gespeichert (Grrr). Diese Stelle muss nun natuerlich
+ // auch IMMER MITGEPFLEGT werden, wenn sich Parameter in
+ // E3dCompoundObject oder E3dObject aendern.
+ BOOL bTmp;
+
+ rIn >> bTmp; bDoubleSided = bTmp;
+ rIn >> bTmp; bCreateNormals = bTmp;
+ rIn >> bTmp; bCreateTexture = bTmp;
+ rIn >> bTmp; bUseStdNormals = bTmp;
+ rIn >> bTmp; bUseStdNormalsUseSphere = bTmp;
+ rIn >> bTmp; bUseStdTextureX = bTmp;
+ rIn >> bTmp; bUseStdTextureXUseSphere = bTmp;
+ rIn >> bTmp; bUseStdTextureY = bTmp;
+ rIn >> bTmp; bUseStdTextureYUseSphere = bTmp;
+ rIn >> bTmp; bShadow3D = bTmp;
+ aFrontMaterial.ReadData(rIn);
+ aBackMaterial.ReadData(rIn);
+ rIn >> nTmp16; eTextureKind = Base3DTextureKind(nTmp16);
+ rIn >> nTmp16; eTextureMode = Base3DTextureMode(nTmp16);
+ rIn >> bTmp; bInvertNormals = bTmp;
+ }
+
+ if (aCompat.GetBytesLeft())
+ {
+ // Ab Version 513a (5.2.99): Parameter fuer das
+ // Erzeugen der Vorder/Rueckwand
+ BOOL bTmp;
+
+ rIn >> bTmp; bLatheCloseFront = bTmp;
+ rIn >> bTmp; bLatheCloseBack = bTmp;
+ }
+ else
+ {
+ bLatheCloseFront = TRUE;
+ bLatheCloseBack = TRUE;
+ }
+
+ // neu ab 534: (hat noch gefehlt)
+ if (aCompat.GetBytesLeft () >= sizeof (BOOL))
+ {
+ BOOL bTmp;
+ rIn >> bTmp; bFilterTexture = bTmp;
+ }
+ }
+
+ // Geometrie neu erzeugen
+ ReCreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Wandle das Objekt in ein Gruppenobjekt bestehend aus n Polygonen
+|*
+\************************************************************************/
+
+SdrObject *E3dLatheObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ return NULL;
+}
+
+/*************************************************************************
+|*
+|* Neue Segmentierung (Beschreibung siehe Header-File)
+|*
+\************************************************************************/
+
+void E3dLatheObj::ReSegment(long nHSegs, long nVSegs)
+{
+ if ((nHSegs != nHSegments || nVSegs != nVSegments) &&
+ (nHSegs != 0 || nVSegs != 0))
+ {
+ nHSegments = nHSegs;
+ nVSegments = nVSegs;
+
+ bGeometryValid = FALSE;
+ }
+}
+
+/*************************************************************************
+|*
+|* Lokale Parameter setzen mit Geometrieneuerzeugung
+|*
+\************************************************************************/
+
+void E3dLatheObj::SetPolyPoly3D(const PolyPolygon3D& rNew)
+{
+ if(aPolyPoly3D != rNew)
+ {
+ aPolyPoly3D = rNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetHSegments(long nNew)
+{
+ if(nHSegments != nNew)
+ {
+ nHSegments = nNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetVSegments(long nNew)
+{
+ if(nVSegments != nNew)
+ {
+ nVSegments = nNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetEndAngle(long nNew)
+{
+ if(nEndAngle != nNew)
+ {
+ nEndAngle = nNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetLatheScale(double fNew)
+{
+ if(fLatheScale != fNew)
+ {
+ fLatheScale = fNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetLatheBackScale(double fNew)
+{
+ if(fLatheBackScale != fNew)
+ {
+ fLatheBackScale = fNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetLathePercentDiag(double fNew)
+{
+ if(fLathePercentDiag != fNew)
+ {
+ fLathePercentDiag = fNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetLatheSmoothed(BOOL bNew)
+{
+ if(bLatheSmoothed != bNew)
+ {
+ bLatheSmoothed = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetLatheSmoothFrontBack(BOOL bNew)
+{
+ if(bLatheSmoothFrontBack != bNew)
+ {
+ bLatheSmoothFrontBack = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetLatheCharacterMode(BOOL bNew)
+{
+ if(bLatheCharacterMode != bNew)
+ {
+ bLatheCharacterMode = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetLatheCloseFront(BOOL bNew)
+{
+ if(bLatheCloseFront != bNew)
+ {
+ bLatheCloseFront = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dLatheObj::SetLatheCloseBack(BOOL bNew)
+{
+ if(bLatheCloseBack != bNew)
+ {
+ bLatheCloseBack = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+void E3dLatheObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ // call parent
+ E3dCompoundObject::NbcSetAttributes(rAttr, bReplaceAll);
+
+ // special Attr for E3dLatheObj
+ const SfxPoolItem* pPoolItem = NULL;
+
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_HORZ_SEGS, TRUE, &pPoolItem ) )
+ {
+ UINT32 nNew = ((const SfxUInt32Item*)pPoolItem)->GetValue();
+ SetHSegments(nNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_VERT_SEGS, TRUE, &pPoolItem ) )
+ {
+ UINT32 nNew = ((const SfxUInt32Item*)pPoolItem)->GetValue();
+ SetVSegments(nNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_PERCENT_DIAGONAL, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ SetLathePercentDiag((double)nNew / 200.0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_BACKSCALE, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ SetLatheBackScale((double)nNew / 100.0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_END_ANGLE, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ SetEndAngle((long)nNew);
+ }
+}
+
+/*************************************************************************
+|*
+|* Attribute lesen
+|*
+\************************************************************************/
+
+void E3dLatheObj::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+ // call parent
+ E3dCompoundObject::TakeAttributes(rAttr, bMerge, bOnlyHardAttr);
+
+ // special Attr for E3dLatheObj
+ const SfxPoolItem* pPoolItem = NULL;
+ SfxItemState eState;
+
+ long nObjHorzSegs = GetHSegments();
+ long nObjVertSegs = GetVSegments();
+ UINT16 nObjPercentDiagonal = (UINT16)((GetLathePercentDiag() * 200.0) + 0.5);
+ UINT16 nObjBackScale = (UINT16)((GetLatheBackScale() * 100.0) + 0.5);
+ UINT16 nObjEndAngle = (UINT16)(GetEndAngle() + 0.5);
+
+ // HorizSegs
+ eState = rAttr.GetItemState(SID_ATTR_3D_HORZ_SEGS, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if((UINT32)nObjHorzSegs != ((const SfxUInt32Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_HORZ_SEGS);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt32Item(SID_ATTR_3D_HORZ_SEGS, nObjHorzSegs));
+ }
+ }
+
+ // VertSegs
+ eState = rAttr.GetItemState(SID_ATTR_3D_VERT_SEGS, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if((UINT32)nObjVertSegs != ((const SfxUInt32Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_VERT_SEGS);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt32Item(SID_ATTR_3D_VERT_SEGS, nObjVertSegs));
+ }
+ }
+
+ // PercentDiagonal
+ eState = rAttr.GetItemState(SID_ATTR_3D_PERCENT_DIAGONAL, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjPercentDiagonal != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_PERCENT_DIAGONAL);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_PERCENT_DIAGONAL, nObjPercentDiagonal));
+ }
+ }
+
+ // BackScale
+ eState = rAttr.GetItemState(SID_ATTR_3D_BACKSCALE, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjBackScale != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_BACKSCALE);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_BACKSCALE, nObjBackScale));
+ }
+ }
+
+ // EndAngle
+ eState = rAttr.GetItemState(SID_ATTR_3D_END_ANGLE, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjEndAngle != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_END_ANGLE);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_END_ANGLE, nObjEndAngle));
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+void E3dLatheObj::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulLathe3d);
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+void E3dLatheObj::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralLathe3d);
+}
+
+/*************************************************************************
+|*
+|* Aufbrechen
+|*
+\************************************************************************/
+
+BOOL E3dLatheObj::IsBreakObjPossible()
+{
+ return TRUE;
+}
+
+SdrAttrObj* E3dLatheObj::GetBreakObj()
+{
+ // create PathObj
+ PolyPolygon3D aTransPoly = TransformToScreenCoor(GetPolyPolygon());
+ XPolyPolygon aPoly(aTransPoly.GetXPolyPolygon());
+ SdrPathObj* pPathObj = new SdrPathObj(OBJ_PLIN, aPoly);
+
+ if(pPathObj)
+ {
+ // set position ans size
+ Rectangle aNewPosSize(aPoly.GetBoundRect());
+ pPathObj->SetSnapRect(aNewPosSize);
+
+ // Objekt ggf. schliessen
+ BOOL bDistSmallerTen = FALSE;
+ for(UINT16 nCnt=0;nCnt<pPathObj->GetPathPoly().Count();nCnt++)
+ if(((XPolygon)(pPathObj->GetPathPoly()[0])).CalcDistance(0, pPathObj->GetPathPoly()[0].GetPointCount()-1) < 10)
+ bDistSmallerTen = TRUE;
+ if (!pPathObj->IsClosed() && bDistSmallerTen)
+ pPathObj->ToggleClosed(0);
+
+ // Attribute setzen
+ SfxItemSet aAttr(GetModel()->GetItemPool());
+ TakeAttributes(aAttr, TRUE, FALSE);
+
+ // Linien aktivieren, um Objekt garantiert sichtbar zu machen
+ aAttr.Put(XLineStyleItem (XLINE_SOLID));
+
+ pPathObj->NbcSetAttributes(aAttr, FALSE);
+ }
+
+ return pPathObj;
+}
+
+
diff --git a/svx/source/engine3d/makefile.mk b/svx/source/engine3d/makefile.mk
new file mode 100644
index 0000000000..d90f64e23a
--- /dev/null
+++ b/svx/source/engine3d/makefile.mk
@@ -0,0 +1,149 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning 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=engine3d
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+SRS1NAME=engine3d
+SRC1FILES=\
+ string3d.src \
+ float3d.src
+
+SLOFILES= \
+ $(SLO)$/deflt3d.obj \
+ $(SLO)$/class3d.obj \
+ $(SLO)$/e3dundo.obj \
+ $(SLO)$/volume3d.obj \
+ $(SLO)$/viewpt3d.obj \
+ $(SLO)$/camera3d.obj \
+ $(SLO)$/poly3d.obj \
+ $(SLO)$/polygn3d.obj \
+ $(SLO)$/volmrk3d.obj \
+ $(SLO)$/objfac3d.obj \
+ $(SLO)$/obj3d.obj \
+ $(SLO)$/light3d.obj \
+ $(SLO)$/dlight3d.obj \
+ $(SLO)$/plight3d.obj \
+ $(SLO)$/pntobj3d.obj \
+ $(SLO)$/polyob3d.obj \
+ $(SLO)$/scene3d.obj \
+ $(SLO)$/polysc3d.obj \
+ $(SLO)$/cube3d.obj \
+ $(SLO)$/sphere3d.obj \
+ $(SLO)$/extrud3d.obj \
+ $(SLO)$/lathe3d.obj \
+ $(SLO)$/label3d.obj \
+ $(SLO)$/dragmt3d.obj \
+ $(SLO)$/view3d.obj \
+ $(SLO)$/view3d1.obj \
+ $(SLO)$/e3dcmpt.obj \
+ $(SLO)$/float3d.obj
+
+ SVXLIGHTOBJFILES= \
+ $(OBJ)$/deflt3d.obj \
+ $(OBJ)$/class3d.obj \
+ $(OBJ)$/e3dundo.obj \
+ $(OBJ)$/volume3d.obj \
+ $(OBJ)$/viewpt3d.obj \
+ $(OBJ)$/camera3d.obj \
+ $(OBJ)$/poly3d.obj \
+ $(OBJ)$/polygn3d.obj \
+ $(OBJ)$/volmrk3d.obj \
+ $(OBJ)$/objfac3d.obj \
+ $(OBJ)$/obj3d.obj \
+ $(OBJ)$/light3d.obj \
+ $(OBJ)$/dlight3d.obj \
+ $(OBJ)$/plight3d.obj \
+ $(OBJ)$/pntobj3d.obj \
+ $(OBJ)$/polyob3d.obj \
+ $(OBJ)$/scene3d.obj \
+ $(OBJ)$/polysc3d.obj \
+ $(OBJ)$/cube3d.obj \
+ $(OBJ)$/sphere3d.obj \
+ $(OBJ)$/extrud3d.obj \
+ $(OBJ)$/lathe3d.obj \
+ $(OBJ)$/label3d.obj \
+ $(OBJ)$/dragmt3d.obj \
+ $(OBJ)$/view3d.obj \
+ $(OBJ)$/view3d1.obj \
+ $(OBJ)$/e3dcmpt.obj \
+ $(OBJ)$/float3d.obj
+
+
+.IF "$(COM)"=="ICC"
+NOOPTFILES=\
+ $(SLO)$/class3d.obj
+.ENDIF
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
new file mode 100644
index 0000000000..52da3aa2b1
--- /dev/null
+++ b/svx/source/engine3d/obj3d.cxx
@@ -0,0 +1,5405 @@
+/*************************************************************************
+ *
+ * $RCSfile: obj3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ITEMID_COLOR SID_ATTR_3D_LIGHTCOLOR
+
+#include "svdstr.hrc"
+#include "svdglob.hxx"
+
+#ifndef _SOT_DTRANS_HXX
+#include <sot/dtrans.hxx>
+#endif
+
+#ifndef _SVDVIEW_HXX
+#include "svdview.hxx"
+#endif
+
+#ifndef _SVDATTR_HXX
+#include "svdattr.hxx"
+#endif
+
+#ifndef _SVDPAGE_HXX
+#include "svdpage.hxx"
+#endif
+
+#ifndef _SVDIO_HXX
+#include "svdio.hxx"
+#endif
+
+#ifndef _SVDMODEL_HXX
+#include "svdmodel.hxx"
+#endif
+
+#ifndef _SVDITER_HXX
+#include "svditer.hxx"
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+#ifndef _CAMERA3D_HXX
+#include "camera3d.hxx"
+#endif
+
+#ifndef _E3D_VOLMRK3D_HXX
+#include "volmrk3d.hxx"
+#endif
+
+#ifndef _E3D_POLYOB3D_HXX
+#include "polyob3d.hxx"
+#endif
+
+#ifndef _E3D_SCENE3D_HXX
+#include "scene3d.hxx"
+#endif
+
+#ifndef _E3D_POLYSC3D_HXX
+#include "polysc3d.hxx"
+#endif
+
+#ifndef _E3D_CUBE3D_HXX
+#include "cube3d.hxx"
+#endif
+
+#ifndef _E3D_LATHE3D_HXX
+#include "lathe3d.hxx"
+#endif
+
+#ifndef _E3D_SPHERE3D_HXX
+#include "sphere3d.hxx"
+#endif
+
+#ifndef _E3D_EXTRUD3D_HXX
+#include "extrud3d.hxx"
+#endif
+
+#ifndef _E3D_OBJ3D_HXX
+#include "obj3d.hxx"
+#endif
+
+#ifndef _XOUTX_HXX
+#include "xoutx.hxx"
+#endif
+
+#ifndef _XTABLE_HXX
+#include "xtable.hxx"
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX
+#include "xflclit.hxx"
+#endif
+
+#ifndef _B3D_BASE3D_HXX
+#include <goodies/base3d.hxx>
+#endif
+
+#ifndef _B3D_B3DTEX_HXX
+#include <goodies/b3dtex.hxx>
+#endif
+
+#ifndef _SVX_XLNCLIT_HXX
+#include "xlnclit.hxx"
+#endif
+
+#ifndef _SFXMETRICITEM_HXX
+#include <svtools/metitem.hxx>
+#endif
+
+#ifndef _XTABLE_HXX
+#include "xtable.hxx"
+#endif
+
+#ifndef _SVX_FILLITEM_HXX
+#include "xfillit.hxx"
+#endif
+
+#ifndef _SVX_XLNWTIT_HXX
+#include "xlnwtit.hxx"
+#endif
+
+#ifndef _SV_VIRDEV_HXX
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _SVDIO_HXX
+#include "svdio.hxx"
+#endif
+
+#ifndef _SV_POLY_HXX
+#include <vcl/poly.hxx>
+#endif
+
+#ifndef _B3D_B3DTRANS_HXX
+#include "b3dtrans.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SVX_COLRITEM_HXX
+#include "colritem.hxx"
+#endif
+
+#ifndef _SVXE3DITEM_HXX
+#include "e3ditem.hxx"
+#endif
+
+#ifndef _SVX_XLNTRIT_HXX
+#include "xlntrit.hxx"
+#endif
+
+#ifndef _SVX_XFLTRIT_HXX
+#include "xfltrit.hxx"
+#endif
+
+#ifndef _SVDPAGV_HXX
+#include "svdpagv.hxx"
+#endif
+
+#ifndef _SV_GRADIENT_HXX
+#include <vcl/gradient.hxx>
+#endif
+
+#ifndef _SV_METAACT_HXX
+#include <vcl/metaact.hxx>
+#endif
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+
+/*************************************************************************
+|*
+|* Liste fuer 3D-Objekte
+|*
+\************************************************************************/
+
+TYPEINIT1(E3dObjList, SdrObjList);
+
+E3dObjList::E3dObjList(SdrModel* pNewModel, SdrPage* pNewPage, E3dObjList* pNewUpList)
+: SdrObjList(pNewModel, pNewPage, pNewUpList)
+{
+}
+
+E3dObjList::E3dObjList(const E3dObjList& rSrcList)
+: SdrObjList(rSrcList)
+{
+}
+
+E3dObjList::~E3dObjList()
+{
+}
+
+void E3dObjList::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason)
+{
+ // Owner holen
+ DBG_ASSERT(GetOwnerObj()->ISA(E3dObject), "AW: Einfuegen 3DObject in Parent != 3DObject");
+
+ // Ist es ueberhaupt ein 3D-Objekt?
+ if(pObj && pObj->ISA(E3dObject))
+ {
+ // Normales 3D Objekt, einfuegen mittels
+ // call parent
+ SdrObjList::NbcInsertObject(pObj, nPos, pReason);
+ }
+ else
+ {
+ // Kein 3D Objekt, fuege in Seite statt in Szene ein...
+ GetOwnerObj()->GetPage()->InsertObject(pObj, nPos);
+ }
+}
+
+SdrObject* E3dObjList::NbcRemoveObject(ULONG nObjNum)
+{
+ // Owner holen
+ DBG_ASSERT(GetOwnerObj()->ISA(E3dObject), "AW: Entfernen 3DObject aus Parent != 3DObject");
+ E3dObject* pOwner = (E3dObject*)GetOwnerObj();
+
+ // call parent
+ SdrObject* pRetval = SdrObjList::NbcRemoveObject(nObjNum);
+
+ // FitSnapRectToBoundVol vorbereiten
+ if(GetOwnerObj() && GetOwnerObj()->ISA(E3dScene))
+ ((E3dScene*)GetOwnerObj())->CorrectSceneDimensions();
+
+ return pRetval;
+}
+
+SdrObject* E3dObjList::RemoveObject(ULONG nObjNum)
+{
+ // Owner holen
+ DBG_ASSERT(GetOwnerObj()->ISA(E3dObject), "AW: Entfernen 3DObject aus Parent != 3DObject");
+ E3dObject* pOwner = (E3dObject*)GetOwnerObj();
+
+ // call parent
+ SdrObject* pRetval = SdrObjList::RemoveObject(nObjNum);
+
+ // FitSnapRectToBoundVol vorbereiten
+ if(GetOwnerObj() && GetOwnerObj()->ISA(E3dScene))
+ ((E3dScene*)GetOwnerObj())->CorrectSceneDimensions();
+
+ return pRetval;
+}
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+TYPEINIT1(E3dObject, SdrAttrObj);
+
+E3dObject::E3dObject() :
+ nLogicalGroup(0),
+ nObjTreeLevel(0),
+ eDragDetail(E3DDETAIL_ONEBOX),
+ nPartOfParent(0),
+ bTfHasChanged(TRUE),
+ bBoundVolValid(TRUE),
+ bIsSelected(FALSE),
+ bAttrUseSubObjects(TRUE)
+{
+ bIs3DObj = TRUE;
+ pSub = new E3dObjList(NULL, NULL);
+ pSub->SetOwnerObj(this);
+ pSub->SetListKind(SDROBJLIST_GROUPOBJ);
+ bClosedObj = TRUE;
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+E3dObject::~E3dObject()
+{
+ delete pSub;
+ pSub = NULL;
+}
+
+/*************************************************************************
+|*
+|* Selektions-Flag setzen
+|*
+\************************************************************************/
+
+void E3dObject::SetSelected(BOOL bNew)
+{
+ // selbst setzen
+ bIsSelected = bNew;
+
+ // bei SubObjekten setzen
+ for ( ULONG i = 0; i < pSub->GetObjCount(); i++ )
+ {
+ if(pSub->GetObj(i) && pSub->GetObj(i)->ISA(E3dObject))
+ ((E3dObject*)pSub->GetObj(i))->SetSelected(bNew);
+ }
+}
+
+/*************************************************************************
+|*
+|* Aufbrechen, default-Implementierungen
+|*
+\************************************************************************/
+
+BOOL E3dObject::IsBreakObjPossible()
+{
+ return FALSE;
+}
+
+SdrAttrObj* E3dObject::GetBreakObj()
+{
+ return 0L;
+}
+
+/*************************************************************************
+|*
+|* SetRectsDirty muss ueber die lokale SdrSubList gehen
+|*
+\************************************************************************/
+
+void E3dObject::SetRectsDirty(FASTBOOL bNotMyself)
+{
+ // call parent
+ SdrAttrObj::SetRectsDirty(bNotMyself);
+
+ // Eigene SubListe AUCH behandeln
+ if(pSub && pSub->GetObjCount())
+ {
+ for (ULONG i = 0; i < pSub->GetObjCount(); i++)
+ {
+ SdrObject* pObj = pSub->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In E3dObject sind nur 3D-Objekte erlaubt!");
+ ((E3dObject*)pObj)->SetRectsDirty(bNotMyself);
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Inventor zurueckgeben
+|*
+\************************************************************************/
+
+UINT32 E3dObject::GetObjInventor() const
+{
+ return E3dInventor;
+}
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+UINT16 E3dObject::GetObjIdentifier() const
+{
+ return E3D_OBJECT_ID;
+}
+
+/*************************************************************************
+|*
+|* Faehigkeiten des Objektes feststellen
+|*
+\************************************************************************/
+
+void E3dObject::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ rInfo.bResizeFreeAllowed = TRUE;
+ rInfo.bResizePropAllowed = TRUE;
+ rInfo.bRotateFreeAllowed = TRUE;
+ rInfo.bRotate90Allowed = TRUE;
+ rInfo.bMirrorFreeAllowed = FALSE;
+ rInfo.bMirror45Allowed = FALSE;
+ rInfo.bMirror90Allowed = FALSE;
+ rInfo.bShearAllowed = FALSE;
+ rInfo.bCanConvToPath = FALSE;
+
+ // no transparence for 3d objects
+ rInfo.bTransparenceAllowed = FALSE;
+
+ // gradient depends on fillstyle
+
+ // BM *** check if SetItem is NULL ***
+ XFillStyle eFillStyle = XFILL_NONE;
+ const SfxSetItem *pSet = GetSetItem( 1 ); // pFillAttr
+ if( pSet )
+ {
+ eFillStyle = ((XFillStyleItem&)(pSet->GetItemSet().Get(XATTR_FILLSTYLE))).GetValue();
+ }
+ rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT);
+
+ // Umwandeln von 3D-Koerpern in Gruppe von Polygonen:
+ //
+ // Erst mal nicht moeglich, da die Erzeugung einer Gruppe von
+ // 2D-Polygonen notwendig waere, die tiefensortiert werden muessten,
+ // also bei Durchdringugnen auch gegeneinander geschnitten werden
+ // muessten. Auch die Texturkoorinaten waeren ein ungeloestes
+ // Problem.
+ rInfo.bCanConvToPoly = FALSE;
+ rInfo.bCanConvToContour = FALSE;
+
+ rInfo.bCanConvToPathLineToArea = FALSE;
+ rInfo.bCanConvToPolyLineToArea = FALSE;
+}
+
+/*************************************************************************
+|*
+|* Layer abfragen
+|*
+\************************************************************************/
+
+SdrLayerID E3dObject::GetLayer() const
+{
+ FASTBOOL bFirst = TRUE;
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+ SdrLayerID nLayer = SdrLayerID(nLayerID);
+
+ for ( ULONG i = 0; i < nObjCnt; i++ )
+ {
+ SdrLayerID nObjLayer;
+ if(pOL->GetObj(i)->ISA(E3dPolyObj))
+ nObjLayer = SdrLayerID(nLayerID);
+ else
+ nObjLayer = pOL->GetObj(i)->GetLayer();
+
+ if (bFirst)
+ {
+ nLayer = nObjLayer;
+ bFirst = FALSE;
+ }
+ else if ( nObjLayer != nLayer )
+ return 0;
+ }
+ return nLayer;
+}
+
+/*************************************************************************
+|*
+|* Layer setzen
+|*
+\************************************************************************/
+
+void E3dObject::NbcSetLayer(SdrLayerID nLayer)
+{
+ SdrAttrObj::NbcSetLayer(nLayer);
+
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+ ULONG i;
+ for ( i = 0; i < nObjCnt; i++ )
+ pOL->GetObj(i)->NbcSetLayer(nLayer);
+}
+
+/*************************************************************************
+|*
+|* ObjList auch an SubList setzen
+|*
+\************************************************************************/
+
+void E3dObject::SetObjList(SdrObjList* pNewObjList)
+{
+ SdrObject::SetObjList(pNewObjList);
+ pSub->SetUpList(pNewObjList);
+}
+
+/*************************************************************************
+|*
+|* Layer setzen
+|*
+\************************************************************************/
+
+void E3dObject::SetPage(SdrPage* pNewPage)
+{
+ SdrAttrObj::SetPage(pNewPage);
+ pSub->SetPage(pNewPage);
+}
+
+/*************************************************************************
+|*
+|* Layer setzen
+|*
+\************************************************************************/
+
+void E3dObject::SetModel(SdrModel* pNewModel)
+{
+ SdrAttrObj::SetModel(pNewModel);
+ pSub->SetModel(pNewModel);
+}
+
+/*************************************************************************
+|*
+|* resize object, used from old 2d interfaces, e.g. in Move/Scale dialog
+|* (F4)
+|*
+\************************************************************************/
+
+void E3dObject::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ // SdrAttrObj::NbcResize(rRef, xFact, yFact);
+
+ // Bewegung in X,Y im Augkoordinatensystem
+ E3dScene* pScene = GetScene();
+
+ if(pScene)
+ {
+ // pos ermitteln
+ B3dTransformationSet& rSet = pScene->GetCameraSet();
+ Vector3D aScaleCenter((double)rRef.X(), (double)rRef.Y(), 32768.0);
+ aScaleCenter = rSet.ViewToEyeCoor(aScaleCenter);
+
+ // scale-faktoren holen
+ double fScaleX = xFact;
+ double fScaleY = yFact;
+
+ // build transform
+ Matrix4D mFullTransform(GetFullTransform());
+ Matrix4D mTrans(mFullTransform);
+
+ mTrans *= rSet.GetOrientation();
+ mTrans.Translate(-aScaleCenter);
+ mTrans.Scale(fScaleX, fScaleY, 1.0);
+ mTrans.Translate(aScaleCenter);
+ mTrans *= rSet.GetInvOrientation();
+ mFullTransform.Invert();
+ mTrans *= mFullTransform;
+
+ // anwenden
+ Matrix4D mObjTrans(GetTransform());
+ mObjTrans *= mTrans;
+ SetTransform(mObjTrans);
+
+ // force new camera and SnapRect on scene, geometry may have really
+ // changed
+ pScene->CorrectSceneDimensions();
+ }
+}
+
+/*************************************************************************
+|*
+|* Objekt verschieben in 2D, wird bei Cursortasten benoetigt
+|*
+\************************************************************************/
+
+void E3dObject::NbcMove(const Size& rSize)
+{
+ // Bewegung in X,Y im Augkoordinatensystem
+ E3dScene* pScene = GetScene();
+
+ if(pScene)
+ {
+ // Abmessungen der Szene in 3D und 2D als Vergleich
+ Rectangle aRect = pScene->GetSnapRect();
+
+ // Transformation Weltkoordinaten bis eine VOR Objektkoordinaten holen
+ Matrix4D mInvDispTransform;
+ if(GetParentObj())
+ {
+ mInvDispTransform = GetParentObj()->GetFullTransform();
+ mInvDispTransform.Invert();
+ }
+
+ // BoundVolume von Weltkoordinaten in Eye-Koordinaten
+ B3dTransformationSet& rSet = pScene->GetCameraSet();
+ const Volume3D& rVol = pScene->GetBoundVolume();
+ Volume3D aEyeVol = rVol.GetTransformVolume(rSet.GetOrientation());
+
+ // relativen Bewegungsvektor in Augkoordinaten bilden
+ Vector3D aMove(
+ (double)rSize.Width() * aEyeVol.GetWidth() / (double)aRect.GetWidth(),
+ (double)-rSize.Height() * aEyeVol.GetHeight() / (double)aRect.GetHeight(),
+ 0.0);
+
+ // Bewegungsvektor in lokale Koordinaten des Parents des Objektes
+ Vector3D aPos;
+ aMove = rSet.EyeToWorldCoor(aMove);
+ aMove *= mInvDispTransform;
+ aPos = rSet.EyeToWorldCoor(aPos);
+ aPos *= mInvDispTransform;
+ aMove = aMove - aPos;
+
+ // Transformieren
+ Translate(aMove);
+
+ // force new camera and SnapRect on scene, geometry may have really
+ // changed
+ pScene->CorrectSceneDimensions();
+ }
+}
+
+/*************************************************************************
+|*
+|* liefere die Sublist, aber nur dann, wenn darin Objekte enthalten sind !
+|*
+\************************************************************************/
+
+SdrObjList* E3dObject::GetSubList() const
+{
+ return pSub;
+}
+
+/*************************************************************************
+|*
+|* Anzahl der Handles zurueckgeben
+|*
+\************************************************************************/
+
+USHORT E3dObject::GetHdlCount() const
+{
+ // 8 Eckpunkte + 1 E3dVolumeMarker (= Wireframe-Darstellung)
+ return 9;
+}
+
+/*************************************************************************
+|*
+|* Handle-Liste fuellen
+|*
+\************************************************************************/
+
+void E3dObject::AddToHdlList(SdrHdlList& rHdlList) const
+{
+ XPolyPolygon aXPP(12);
+ XPolygon aLine(2);
+ E3dVolumeMarker* pVolMarker;
+ USHORT nPolyCnt;
+
+ ((E3dObject*) this)->ImpCreateWireframePoly(aXPP, E3DDETAIL_ONEBOX);
+ nPolyCnt = aXPP.Count();
+
+ for ( USHORT i = 0; i < nPolyCnt; i += 3 )
+ {
+ rHdlList.AddHdl(new SdrHdl(aXPP[i][0], HDL_BWGT));
+ rHdlList.AddHdl(new SdrHdl(aXPP[i][1], HDL_BWGT));
+ }
+
+ if ( nPolyCnt > 0 )
+ {
+ pVolMarker = new E3dVolumeMarker(aXPP);
+ rHdlList.AddHdl(pVolMarker);
+ }
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+FASTBOOL E3dObject::HasSpecialDrag() const
+{
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* Paint; wird z.Z. nicht benutzt, da das Paint ueber die
+|* (2D-)Displayliste der Szene laeuft
+|*
+\************************************************************************/
+
+void E3dObject::Paint3D(ExtOutputDevice& rOut, Base3D* pBase3D,
+ const SdrPaintInfoRec& rInfoRec, UINT16 nDrawFlags)
+{
+ if(pSub && pSub->GetObjCount())
+ {
+ BOOL bWasNotActive = rInfoRec.bNotActive;
+ BOOL bIsEnteredGroup(FALSE);
+
+ if((rInfoRec.pPV && GetSubList() && rInfoRec.pPV->GetObjList() == GetSubList())
+ || (rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE))
+ {
+ bIsEnteredGroup = TRUE;
+ }
+
+ if(bIsEnteredGroup && bWasNotActive)
+ {
+ // auf aktive Elemente schalten
+ ((SdrPaintInfoRec&)rInfoRec).bNotActive = FALSE;
+ }
+
+ for (ULONG i = 0; i < pSub->GetObjCount(); i++)
+ {
+ SdrObject* pObj = pSub->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In E3dObject sind nur 3D-Objekte erlaubt!");
+ ((E3dObject*)pObj)->Paint3D(rOut, pBase3D, rInfoRec, nDrawFlags);
+ }
+
+ if(bIsEnteredGroup && bWasNotActive)
+ {
+ // Zurueck auf Ursprung, Zustand wieder verlassen
+ ((SdrPaintInfoRec&)rInfoRec).bNotActive = TRUE;
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Objekt als Kontur in das Polygon einfuegen
+|*
+\************************************************************************/
+
+void E3dObject::TakeContour3D(XPolyPolygon& rPoly)
+{
+ if(pSub && pSub->GetObjCount())
+ {
+ for (ULONG i = 0; i < pSub->GetObjCount(); i++)
+ {
+ SdrObject* pObj = pSub->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In E3dObject sind nur 3D-Objekte erlaubt!");
+ ((E3dObject*)pObj)->TakeContour3D(rPoly);
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Schatten fuer 3D-Objekte zeichnen
+|*
+\************************************************************************/
+
+void E3dObject::DrawShadows(Base3D *pBase3D,
+ ExtOutputDevice& rXOut,
+ const Rectangle& rBound, const Volume3D& rVolume,
+ const SdrPaintInfoRec& rInfoRec)
+{
+ if(pSub && pSub->GetObjCount())
+ {
+ for (ULONG i = 0; i < pSub->GetObjCount(); i++)
+ {
+ SdrObject* pObj = pSub->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In E3dObject sind nur 3D-Objekte erlaubt!");
+ ((E3dObject*)pObj)->DrawShadows(pBase3D, rXOut, rBound, rVolume, rInfoRec);
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* SnapRect berechnen
+|*
+\************************************************************************/
+
+void E3dObject::RecalcSnapRect()
+{
+ aSnapRect = Rectangle();
+ if(pSub && pSub->GetObjCount())
+ {
+ for (ULONG i = 0; i < pSub->GetObjCount(); i++)
+ {
+ SdrObject* pObj = pSub->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In E3dObject sind nur 3D-Objekte erlaubt!");
+ Rectangle aSubRect = ((E3dObject*)pObj)->GetSnapRect();
+ aSnapRect.Union(aSubRect);
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* BoundRect berechnen
+|*
+\************************************************************************/
+
+void E3dObject::RecalcBoundRect()
+{
+ // BoundRect aus SnapRect berechnen
+ aOutRect = GetSnapRect();
+
+ if(pSub && pSub->GetObjCount())
+ {
+ for (ULONG i = 0; i < pSub->GetObjCount(); i++)
+ {
+ SdrObject* pObj = pSub->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In E3dObject sind nur 3D-Objekte erlaubt!");
+ Rectangle aSubRect = ((E3dObject*)pObj)->GetBoundRect();
+ aOutRect.Union(aSubRect);
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Einfuegen eines 3D-Objekts an den Parent weitermelden, damit dieser
+|* ggf. eine Sonderbehandlung fuer spezielle Objekte durchfuehren kann
+|* (z.B. Light/Label in E3dScene)
+|*
+\************************************************************************/
+
+void E3dObject::NewObjectInserted(const E3dObject* p3DObj)
+{
+ if(GetParentObj())
+ GetParentObj()->NewObjectInserted(p3DObj);
+}
+
+/*************************************************************************
+|*
+|* Parent ueber Aenderung der Struktur (z.B. durch Transformation)
+|* informieren; dabei wird das Objekt, in welchem die Aenderung
+|* aufgetreten ist, uebergeben
+|*
+\************************************************************************/
+
+void E3dObject::StructureChanged(const E3dObject* p3DObj)
+{
+ if ( GetParentObj() )
+ {
+ // Wenn sich im Child das BoundVolume geaendert hat, muessen
+ // auch die der Parents angepasst werden
+ if ( !p3DObj->bBoundVolValid )
+ GetParentObj()->bBoundVolValid = FALSE;
+
+ GetParentObj()->StructureChanged(p3DObj);
+ }
+}
+
+/*************************************************************************
+|*
+|* 3D-Objekt einfuegen
+|*
+\************************************************************************/
+
+void E3dObject::Insert3DObj(E3dObject* p3DObj)
+{
+ DBG_ASSERT(p3DObj, "Insert3DObj mit NULL-Zeiger!");
+ p3DObj->SetObjTreeLevel(nObjTreeLevel + 1);
+ SdrPage* pPg = pPage;
+ pSub->InsertObject(p3DObj);
+ pPage = pPg;
+ bBoundVolValid = FALSE;
+ NewObjectInserted(p3DObj);
+ StructureChanged(this);
+}
+
+void E3dObject::Remove3DObj(E3dObject* p3DObj)
+{
+ DBG_ASSERT(p3DObj, "Remove3DObj mit NULL-Zeiger!");
+
+ if(p3DObj->GetParentObj() == this)
+ {
+ SdrPage* pPg = pPage;
+ pSub->RemoveObject(p3DObj->GetOrdNum());
+ pPage = pPg;
+
+ bBoundVolValid = FALSE;
+ StructureChanged(this);
+ }
+}
+
+/*************************************************************************
+|*
+|* Linienattribute abfragen, ggf. vom Parent holen
+|*
+\************************************************************************/
+
+const XLineAttrSetItem* E3dObject::GetLineAttr() const
+{
+ const XLineAttrSetItem* pSetItem = pLineAttr;
+
+ if ( pSetItem == NULL && GetParentObj() )
+ pSetItem = GetParentObj()->GetLineAttr();
+
+ return pSetItem;
+}
+/*************************************************************************
+|*
+|* Flaechenattribute abfragen, ggf. vom Parent holen
+|*
+\************************************************************************/
+
+const XFillAttrSetItem* E3dObject::GetFillAttr() const
+{
+ const XFillAttrSetItem* pSetItem = pFillAttr;
+
+ if ( pSetItem == NULL && GetParentObj() )
+ pSetItem = GetParentObj()->GetFillAttr();
+
+ return pSetItem;
+}
+
+/*************************************************************************
+|*
+|* Parent holen
+|*
+\************************************************************************/
+
+E3dObject* E3dObject::GetParentObj() const
+{
+ E3dObject* pRetval = NULL;
+
+ if(GetObjList()
+ && GetObjList()->GetOwnerObj()
+ && GetObjList()->GetOwnerObj()->ISA(E3dObject))
+ pRetval = ((E3dObject*)GetObjList()->GetOwnerObj());
+ return pRetval;
+}
+
+/*************************************************************************
+|*
+|* Uebergeordnetes Szenenobjekt bestimmen
+|*
+\************************************************************************/
+
+E3dScene* E3dObject::GetScene() const
+{
+ if(GetParentObj())
+ return GetParentObj()->GetScene();
+ return NULL;
+}
+
+/*************************************************************************
+|*
+|* umschliessendes Volumen inklusive aller Kindobjekte berechnen
+|*
+\************************************************************************/
+
+void E3dObject::RecalcBoundVolume()
+{
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+
+ if(nObjCnt)
+ {
+ aBoundVol = Volume3D();
+
+ for (ULONG i = 0; i < nObjCnt; i++)
+ {
+ SdrObject* pObj = pOL->GetObj(i);
+
+ DBG_ASSERT(pObj->ISA(E3dObject), "In E3dObject sind nur 3D-Objekte erlaubt!");
+ // Bei den Kindobjekten auch die lokalen Transformationen
+ // beruecksichtigen
+ E3dObject* p3DObj = (E3dObject*) pObj;
+ const Volume3D& rVol = p3DObj->GetBoundVolume();
+ const Matrix4D& rTf = p3DObj->GetTransform();
+ aBoundVol.Union(rVol.GetTransformVolume(rTf));
+ }
+
+ aLocalBoundVol = aBoundVol;
+ }
+ else
+ {
+ aBoundVol = aLocalBoundVol;
+ }
+
+ bBoundVolValid = TRUE;
+}
+
+/*************************************************************************
+|*
+|* umschliessendes Volumen zurueckgeben und ggf. neu berechnen
+|*
+\************************************************************************/
+
+const Volume3D& E3dObject::GetBoundVolume()
+{
+ if ( !bBoundVolValid )
+ RecalcBoundVolume();
+
+ if(!aBoundVol.IsValid())
+ aBoundVol = Volume3D(Vector3D(), Vector3D());
+
+ return aBoundVol;
+}
+
+/*************************************************************************
+|*
+|* Mittelpunkt liefern
+|*
+\************************************************************************/
+
+Vector3D E3dObject::GetCenter()
+{
+ Volume3D aVolume = GetBoundVolume();
+ return (aVolume.MaxVec() + aVolume.MinVec()) / 2.0;
+}
+
+/*************************************************************************
+|*
+|* Aederung des BoundVolumes an alle Kindobjekte weitergeben
+|*
+\************************************************************************/
+
+void E3dObject::SetBoundVolInvalid()
+{
+ bBoundVolValid = FALSE;
+
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+
+ for (ULONG i = 0; i < nObjCnt; i++)
+ {
+ SdrObject* pObj = pOL->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "In E3dObject sind nur 3D-Objekte erlaubt!");
+
+ ((E3dObject*) pObj)->SetBoundVolInvalid();
+ }
+}
+
+/*************************************************************************
+|*
+|* Aederung der Transformation an alle Kindobjekte weitergeben
+|*
+\************************************************************************/
+
+void E3dObject::SetTransformChanged()
+{
+ bTfHasChanged = TRUE;
+ bBoundVolValid = FALSE;
+
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+
+ for (ULONG i = 0; i < nObjCnt; i++)
+ {
+ SdrObject* pObj = pOL->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "In E3dObject sind nur 3D-Objekte erlaubt!");
+
+ ((E3dObject*) pObj)->SetTransformChanged();
+ }
+}
+
+/*************************************************************************
+|*
+|* hierarchische Transformation ueber alle Parents bestimmen und mit
+|* der uebergebenen Matrix verketten
+|*
+\************************************************************************/
+
+void E3dObject::GetFullTransform(Matrix4D& rMatrix) const
+{
+ if ( bTfHasChanged )
+ {
+ rMatrix *= aTfMatrix;
+ if ( GetParentObj() )
+ GetParentObj()->GetFullTransform(rMatrix);
+ }
+ else
+ rMatrix *= aFullTfMatrix;
+}
+
+/*************************************************************************
+|*
+|* hierarchische Transformation ueber alle Parents bestimmen, in
+|* aFullTfMatrix ablegen und diese zurueckgeben
+|*
+\************************************************************************/
+
+const Matrix4D& E3dObject::GetFullTransform()
+{
+ if ( bTfHasChanged )
+ {
+ aFullTfMatrix = aTfMatrix;
+
+ if ( GetParentObj() )
+ aFullTfMatrix *= GetParentObj()->GetFullTransform();
+
+ bTfHasChanged = FALSE;
+ }
+
+ return aFullTfMatrix;
+}
+
+/*************************************************************************
+|*
+|* Transformationsmatrix abfragen
+|*
+\************************************************************************/
+
+const Matrix4D& E3dObject::GetTransform() const
+{
+ return aTfMatrix;
+}
+
+/*************************************************************************
+|*
+|* Transformationsmatrix setzen
+|*
+\************************************************************************/
+
+void E3dObject::NbcSetTransform(const Matrix4D& rMatrix)
+{
+ aTfMatrix = rMatrix;
+ SetTransformChanged();
+ StructureChanged(this);
+}
+
+/*************************************************************************
+|*
+|* Transformationsmatrix auf Einheitsmatrix zuruecksetzen
+|*
+\************************************************************************/
+
+void E3dObject::NbcResetTransform()
+{
+ aTfMatrix.Identity();
+ SetTransformChanged();
+ StructureChanged(this);
+}
+
+/*************************************************************************
+|*
+|* Transformationsmatrix setzen mit Repaint-Broadcast
+|*
+\************************************************************************/
+
+void E3dObject::SetTransform(const Matrix4D& rMatrix)
+{
+ SendRepaintBroadcast();
+ NbcSetTransform(rMatrix);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/*************************************************************************
+|*
+|* Transformationsmatrix zuruecksetzen mit Repaint-Broadcast
+|*
+\************************************************************************/
+
+void E3dObject::ResetTransform()
+{
+ SendRepaintBroadcast();
+ NbcResetTransform();
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/*************************************************************************
+|*
+|* Translation
+|*
+\************************************************************************/
+
+void E3dObject::NbcTranslate(const Vector3D& rTrans)
+{
+ aTfMatrix.Translate(rTrans);
+ SetTransformChanged();
+ StructureChanged(this);
+}
+/*************************************************************************
+|*
+|* Translation mit Repaint-Broadcast
+|*
+\************************************************************************/
+
+void E3dObject::Translate(const Vector3D& rTrans)
+{
+ SendRepaintBroadcast();
+ NbcTranslate(rTrans);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/*************************************************************************
+|*
+|* Skalierungen
+|*
+\************************************************************************/
+
+void E3dObject::NbcScaleX(double fSx)
+{
+ aTfMatrix.ScaleX(fSx);
+ SetTransformChanged();
+ StructureChanged(this);
+}
+
+/************************************************************************/
+
+void E3dObject::NbcScaleY(double fSy)
+{
+ aTfMatrix.ScaleY(fSy);
+ SetTransformChanged();
+ StructureChanged(this);
+}
+
+/************************************************************************/
+
+void E3dObject::NbcScaleZ(double fSz)
+{
+ aTfMatrix.ScaleZ(fSz);
+ SetTransformChanged();
+ StructureChanged(this);
+}
+
+/************************************************************************/
+
+void E3dObject::NbcScale(double fSx, double fSy, double fSz)
+{
+ aTfMatrix.Scale(fSx, fSy, fSz);
+ SetTransformChanged();
+ StructureChanged(this);
+}
+
+/*************************************************************************
+|*
+|* gleichmaessige Skalierung
+|*
+\************************************************************************/
+
+void E3dObject::NbcScale(double fS)
+{
+ aTfMatrix.Scale(fS, fS, fS);
+ SetTransformChanged();
+ StructureChanged(this);
+}
+
+/*************************************************************************
+|*
+|* Skalierungen mit mit Repaint-Broadcast
+|*
+\************************************************************************/
+
+void E3dObject::ScaleX(double fSx)
+{
+ SendRepaintBroadcast();
+ NbcScaleX(fSx);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/************************************************************************/
+
+void E3dObject::ScaleY(double fSy)
+{
+ SendRepaintBroadcast();
+ NbcScaleY(fSy);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/************************************************************************/
+
+void E3dObject::ScaleZ(double fSz)
+{
+ SendRepaintBroadcast();
+ NbcScaleZ(fSz);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/************************************************************************/
+
+void E3dObject::Scale(double fSx, double fSy, double fSz)
+{
+ SendRepaintBroadcast();
+ NbcScale(fSx, fSy, fSz);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/************************************************************************/
+
+void E3dObject::Scale(double fS)
+{
+ SendRepaintBroadcast();
+ NbcScale(fS);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/*************************************************************************
+|*
+|* Rotationen mit Winkel in Radiant
+|*
+\************************************************************************/
+
+void E3dObject::NbcRotateX(double fAng)
+{
+ aTfMatrix.RotateX(fAng);
+ SetTransformChanged();
+ StructureChanged(this);
+}
+
+/************************************************************************/
+
+void E3dObject::NbcRotateY(double fAng)
+{
+ aTfMatrix.RotateY(fAng);
+ SetTransformChanged();
+ StructureChanged(this);
+}
+
+/************************************************************************/
+
+void E3dObject::NbcRotateZ(double fAng)
+{
+ aTfMatrix.RotateZ(fAng);
+ SetTransformChanged();
+ StructureChanged(this);
+}
+
+/*************************************************************************
+|*
+|* Rotationen mit Repaint-Broadcast
+|*
+\************************************************************************/
+
+void E3dObject::RotateX(double fAng)
+{
+ SendRepaintBroadcast();
+ NbcRotateX(fAng);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/************************************************************************/
+
+void E3dObject::RotateY(double fAng)
+{
+ SendRepaintBroadcast();
+ NbcRotateY(fAng);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/************************************************************************/
+
+void E3dObject::RotateZ(double fAng)
+{
+ SendRepaintBroadcast();
+ NbcRotateZ(fAng);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (pUserCall != NULL) pUserCall->Changed(*this, SDRUSERCALL_RESIZE, Rectangle());
+}
+
+/*************************************************************************
+|*
+|* uebergebene Transformationsmatrix auf die Objektkoordinaten (bei
+|* abgeleiteten Objekten), d.h. nicht auf die lokale Matrix, und auf
+|* alle Childs anwenden
+|*
+\************************************************************************/
+
+void E3dObject::ApplyTransform(const Matrix4D& rMatrix)
+{
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+
+ for (ULONG i = 0; i < nObjCnt; i++)
+ {
+ SdrObject* pObj = pOL->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "In E3dObject sind nur 3D-Objekte erlaubt!");
+
+ ((E3dObject*) pObj)->ApplyTransform(rMatrix);
+ }
+}
+
+/*************************************************************************
+|*
+|* Objektbaum-Ebene des Objekts und aller Children setzen
+|*
+\************************************************************************/
+
+void E3dObject::SetObjTreeLevel(USHORT nNewLevel)
+{
+ nObjTreeLevel = nNewLevel;
+ nNewLevel++;
+
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+
+ for (ULONG i = 0; i < nObjCnt; i++)
+ {
+ SdrObject* pObj = pOL->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "In E3dObject sind nur 3D-Objekte erlaubt!");
+
+ ((E3dObject*) pObj)->SetObjTreeLevel(nNewLevel);
+ }
+}
+
+/*************************************************************************
+|*
+|* logische Gruppe setzen
+|*
+\************************************************************************/
+
+void E3dObject::SetLogicalGroup(USHORT nGroup)
+{
+ nLogicalGroup = nGroup;
+}
+
+/*************************************************************************
+|*
+|* Linien fuer die Wireframe-Darstellung des Objekts dem uebergebenen
+|* Polygon3D hinzufuegen. Als default wird das BoundVolume verwendet.
+|*
+\************************************************************************/
+
+void E3dObject::CreateWireframe(Polygon3D& rWirePoly, const Matrix4D* pTf,
+ E3dDragDetail eDetail)
+{
+ if ( eDetail == E3DDETAIL_DEFAULT )
+ eDetail = eDragDetail;
+
+ if ( eDetail == E3DDETAIL_ALLBOXES || eDetail == E3DDETAIL_ALLLINES )
+ {
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+
+ for (ULONG i = 0; i < nObjCnt; i++)
+ {
+ E3dObject* pObj = (E3dObject*)pOL->GetObj(i);
+ DBG_ASSERT(pObj->ISA(E3dObject), "In E3dObject sind nur 3D-Objekte erlaubt!");
+
+ Matrix4D aLocalTf(pObj->GetTransform());
+ if(pTf)
+ aLocalTf *= *pTf;
+ pObj->CreateWireframe(rWirePoly, &aLocalTf, eDetail);
+ }
+
+ if(eDetail == E3DDETAIL_ALLBOXES && nObjCnt != 1)
+ GetBoundVolume().CreateWireframe(rWirePoly, pTf);
+ }
+ else
+ GetBoundVolume().CreateWireframe(rWirePoly, pTf);
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+void E3dObject::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulObj3d);
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+void E3dObject::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralObj3d);
+}
+
+/*************************************************************************
+|*
+|* Wireframe-XPolyPolygon erzeugen
+|*
+\************************************************************************/
+
+void E3dObject::ImpCreateWireframePoly(XPolyPolygon& rXPP,
+ E3dDragDetail eDetail)
+{
+ // Neue Methode
+ E3dScene* pScene = GetScene();
+ Polygon3D aPoly3D(24, 240);
+ XPolygon aLine(2);
+ USHORT nPntCnt;
+
+ // WireFrame herstellen
+ CreateWireframe(aPoly3D, NULL, eDetail);
+ nPntCnt = aPoly3D.GetPointCount();
+
+ if(pScene)
+ {
+ // Maximas holen in DeviceKoordinaten
+ Volume3D aVolume = pScene->FitInSnapRect();
+
+ // Maximas fuer Abbildung verwenden
+ pScene->GetCameraSet().SetDeviceVolume(aVolume, FALSE);
+ Matrix4D mTransform = GetFullTransform();
+ pScene->GetCameraSet().SetObjectTrans(mTransform);
+
+ if ( nPntCnt > 1 )
+ {
+ Vector3D aVec;
+ for ( USHORT i = 0; i < nPntCnt; i += 2 )
+ {
+ aVec = pScene->GetCameraSet().ObjectToViewCoor(aPoly3D[i]);
+ aLine[0] = Point((long)(aVec.X() + 0.5), (long)(aVec.Y() + 0.5));
+
+ aVec = pScene->GetCameraSet().ObjectToViewCoor(aPoly3D[i+1]);
+ aLine[1] = Point((long)(aVec.X() + 0.5), (long)(aVec.Y() + 0.5));
+
+ rXPP.Insert(aLine);
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Drag-Polygon zurueckgeben
+|*
+\************************************************************************/
+
+void E3dObject::TakeXorPoly(XPolyPolygon& rXPP, FASTBOOL bDetail) const
+{
+ rXPP.Clear();
+ // Const mal wieder weg, da evtl. das BoundVolume neu generiert wird
+ static E3dDragDetail eDetail = E3DDETAIL_DEFAULT;
+ ((E3dObject*) this)->ImpCreateWireframePoly(rXPP, eDetail);
+}
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+void E3dObject::operator=(const SdrObject& rObj)
+{
+ // erstmal alle Childs kopieren
+ SdrAttrObj::operator=(rObj);
+
+ const E3dObject& r3DObj = (const E3dObject&) rObj;
+ if (r3DObj.GetSubList())
+ {
+ // feststellen, ob alle SubObjekte selektiert oder
+ // deselektiert sind
+ BOOL bAllSelected = TRUE;
+ BOOL bNoneSelected = TRUE;
+ UINT32 nObjCnt = r3DObj.GetSubList()->GetObjCount();
+
+ ULONG i;
+ for (i = 0; i < nObjCnt; i++)
+ {
+ SdrObject* pObj = r3DObj.GetSubList()->GetObj(i);
+ if(pObj && pObj->ISA(E3dObject))
+ {
+ E3dObject* p3DObj = (E3dObject*)pObj;
+ if(p3DObj->GetSelected())
+ bNoneSelected = FALSE;
+ else
+ bAllSelected = FALSE;
+ }
+ }
+
+ if(bAllSelected || bNoneSelected)
+ {
+ // Normales verhalten
+ pSub->CopyObjects(*r3DObj.GetSubList());
+ }
+ else
+ {
+ // Spezielle SubListe aufstellen, kopieren
+ SdrObjList aOwnSubList(*r3DObj.GetSubList());
+
+ // Alle nicht selektierten Objekte rausschmeissen
+ for(i = 0;i < aOwnSubList.GetObjCount();i++)
+ {
+ SdrObject* pObj = aOwnSubList.GetObj(i);
+ if(pObj && pObj->ISA(E3dObject))
+ {
+ E3dObject* p3DObj = (E3dObject*)pObj;
+ if(!p3DObj->GetSelected())
+ {
+ aOwnSubList.NbcRemoveObject(pObj->GetOrdNum());
+ i--;
+ delete pObj;
+ }
+ }
+ }
+
+ // jetzt diese Liste kopieren
+ pSub->CopyObjects(aOwnSubList);
+
+ // Hier noch ein FitSnapRect einleiten
+ if(ISA(E3dScene))
+ ((E3dScene&)r3DObj).FitSnapRectToBoundVol();
+ }
+ }
+
+ // BoundVol kann uebernommen werden, da die Childs auch kopiert werden
+ bBoundVolValid = r3DObj.bBoundVolValid;
+ aBoundVol = r3DObj.aBoundVol;
+ aLocalBoundVol = r3DObj.aLocalBoundVol;
+
+ aTfMatrix = r3DObj.aTfMatrix;
+ nLogicalGroup = r3DObj.nLogicalGroup;
+ nObjTreeLevel = r3DObj.nObjTreeLevel;
+ nPartOfParent = r3DObj.nPartOfParent;
+ eDragDetail = r3DObj.eDragDetail;
+
+ // Da sich der Parent geaendert haben kann, Gesamttransformation beim
+ // naechsten Mal auf jeden Fall neu bestimmen
+ SetTransformChanged();
+
+ // Selektionsstatus kopieren
+ bIsSelected = r3DObj.bIsSelected;
+}
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+void E3dObject::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ // call parent
+ if(!ISA(E3dScene))
+ SdrAttrObj::NbcSetAttributes(rAttr, bReplaceAll);
+
+ if(bAttrUseSubObjects)
+ {
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+ for ( ULONG i = 0; i < nObjCnt; i++ )
+ pOL->GetObj(i)->NbcSetAttributes(rAttr, bReplaceAll);
+ }
+ else
+ {
+ bAttrUseSubObjects = TRUE;
+ }
+ StructureChanged(this);
+}
+
+/*************************************************************************
+|*
+|* Attribute abfragen
+|*
+\************************************************************************/
+
+void E3dObject::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge,
+ FASTBOOL bOnlyHardAttr) const
+{
+ // call parent (only with real 3d objects, not with groups)
+ if(!ISA(E3dScene))
+ SdrAttrObj::TakeAttributes(rAttr, bMerge, bOnlyHardAttr);
+
+ if(bAttrUseSubObjects)
+ {
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+ for ( ULONG i = 0; i < nObjCnt; i++ )
+ pOL->GetObj(i)->TakeAttributes(rAttr, TRUE, bOnlyHardAttr);
+ }
+ else
+ {
+ ((E3dObject*)this)->bAttrUseSubObjects = TRUE;
+ }
+}
+
+/*************************************************************************
+|*
+|* StyleSheet setzen
+|*
+\************************************************************************/
+
+void E3dObject::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet,
+ FASTBOOL bDontRemoveHardAttr)
+{
+ // call parent
+ SdrAttrObj::NbcSetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
+
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+ for ( ULONG i = 0; i < nObjCnt; i++ )
+ pOL->GetObj(i)->NbcSetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
+}
+
+/*************************************************************************
+|*
+|* Nur die Member des E3dObjekts in den Stream speichern
+|* Dies wird direkt auch von E3dSphere gerufen um zu verhindern dass die
+|* Subliste weggeschrieben wird. (FG)
+|*
+\************************************************************************/
+
+void E3dObject::WriteOnlyOwnMembers(SvStream& rOut) const
+{
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dObjectOwnMembers");
+#endif
+
+ rOut << aLocalBoundVol;
+
+ Old_Matrix3D aMat3D;
+ aMat3D = aTfMatrix;
+ rOut << aMat3D;
+
+ rOut << nLogicalGroup;
+ rOut << nObjTreeLevel;
+ rOut << nPartOfParent;
+ rOut << UINT16(eDragDetail);
+}
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+void E3dObject::WriteData(SvStream& rOut) const
+{
+ long position = rOut.Tell();
+ SdrAttrObj::WriteData(rOut);
+ position = rOut.Tell();
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dObject");
+#endif
+
+ position = rOut.Tell();
+ pSub->Save(rOut);
+ position = rOut.Tell();
+
+ if (rOut.GetVersion() < 3560)
+ {
+ rOut << aLocalBoundVol;
+
+ Old_Matrix3D aMat3D;
+ aMat3D = aTfMatrix;
+ rOut << aMat3D;
+
+ rOut << nLogicalGroup;
+ rOut << nObjTreeLevel;
+ rOut << nPartOfParent;
+ rOut << UINT16(eDragDetail);
+ }
+ else
+ {
+ WriteOnlyOwnMembers(rOut);
+ }
+ position = rOut.Tell();
+}
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+void E3dObject::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ long position = rIn.Tell();
+ if (ImpCheckSubRecords (rHead, rIn))
+ {
+ position = rIn.Tell();
+ SdrAttrObj::ReadData(rHead, rIn);
+ position = rIn.Tell();
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dObject");
+#endif
+ pSub->Load(rIn, *pPage);
+
+ position = rIn.Tell();
+ if ((rIn.GetVersion() < 3560) || (rHead.GetVersion() <= 12))
+ {
+ UINT16 nTmp16;
+
+ rIn >> aLocalBoundVol;
+
+ Old_Matrix3D aMat3D;
+ rIn >> aMat3D;
+ aTfMatrix = Matrix4D(aMat3D);
+
+ rIn >> nLogicalGroup;
+ rIn >> nObjTreeLevel;
+ rIn >> nPartOfParent;
+ rIn >> nTmp16; eDragDetail = E3dDragDetail(nTmp16);
+ }
+ else
+ {
+ ReadOnlyOwnMembers(rHead, rIn);
+ }
+ position = rIn.Tell();
+
+ // Wie ein veraendertes Objekt behandeln
+ SetTransformChanged();
+ StructureChanged(this);
+
+ // BoundVolume muss neu berechnet werden
+ bBoundVolValid = FALSE;
+
+ // SnapRect auch
+ bSnapRectDirty = TRUE;
+ }
+}
+
+/*************************************************************************
+|*
+|* Nur die Daten des E3dObject aus Stream laden (nicht der Sublisten und
+|* der Basisklassen). Wird von E3dSphere auch genutzt. (FileFormat-Optimierung)
+|*
+\************************************************************************/
+
+void E3dObject::ReadOnlyOwnMembers(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dObjectOwnMembers");
+#endif
+ UINT16 nTmp16;
+
+ rIn >> aLocalBoundVol;
+
+ Old_Matrix3D aMat3D;
+ rIn >> aMat3D;
+ aTfMatrix = Matrix4D(aMat3D);
+
+ rIn >> nLogicalGroup;
+ rIn >> nObjTreeLevel;
+ rIn >> nPartOfParent;
+ rIn >> nTmp16; eDragDetail = E3dDragDetail(nTmp16);
+
+ bBoundVolValid = FALSE;
+}
+
+
+/*************************************************************************
+|*
+|* nach dem Laden...
+|*
+\************************************************************************/
+
+void E3dObject::AfterRead()
+{
+ SdrAttrObj::AfterRead();
+ if (pSub)
+ pSub->AfterRead();
+}
+
+/*************************************************************************
+|*
+|* erstelle neues GeoData-Objekt
+|*
+\************************************************************************/
+
+SdrObjGeoData *E3dObject::NewGeoData() const
+{
+ // Theoretisch duerfen auch nur Szenen ihre GeoDatas erstellen und verwalten !!
+ // AW: Dies stimmt nicht mehr, diese Stelle ist mit der neuen Engine OK!
+ return new E3DObjGeoData;
+}
+
+/*************************************************************************
+|*
+|* uebergebe aktuelle werte an das GeoData-Objekt
+|*
+\************************************************************************/
+
+void E3dObject::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ SdrAttrObj::SaveGeoData (rGeo);
+
+ ((E3DObjGeoData &) rGeo).aLocalBoundVol = aLocalBoundVol;
+ ((E3DObjGeoData &) rGeo).aTfMatrix = aTfMatrix;
+}
+
+/*************************************************************************
+|*
+|* uebernehme werte aus dem GeoData-Objekt
+|*
+\************************************************************************/
+
+void E3dObject::RestGeoData(const SdrObjGeoData& rGeo)
+{
+ aLocalBoundVol = ((E3DObjGeoData &) rGeo).aLocalBoundVol;
+ NbcSetTransform (((E3DObjGeoData &) rGeo).aTfMatrix);
+
+ SdrAttrObj::RestGeoData (rGeo);
+ GetScene()->FitSnapRectToBoundVol();
+}
+
+/*************************************************************************
+|*
+|* Pruefe, ob die SubRecords ok sind und mit der Factory gelesen werden
+|* koennen.
+|*
+\************************************************************************/
+
+BOOL E3dObject::ImpCheckSubRecords (const SdrObjIOHeader& rHead,
+ SvStream& rIn)
+{
+ BOOL bDoRead = FALSE;
+
+ if ( rIn.GetError() == SVSTREAM_OK )
+ {
+ if (rHead.GetVersion () <= 12)
+ {
+ ULONG nPos0 = rIn.Tell();
+ // Einen SubRecord ueberspringen (SdrObject)
+ { SdrDownCompat aCompat(rIn,STREAM_READ); }
+ // Nocheinen SubRecord ueberspringen (SdrAttrObj)
+ { SdrDownCompat aCompat(rIn,STREAM_READ); }
+ // Und nun muesste meiner kommen
+ bDoRead = rHead.GetBytesLeft() != 0;
+ rIn.Seek (nPos0); // FilePos wieder restaurieren
+ }
+ else
+ {
+ bDoRead = TRUE;
+ }
+ }
+
+ return bDoRead;
+}
+
+/*************************************************************************
+|*
+|* Keine DefaultAttr, zu langsam
+|*
+\************************************************************************/
+
+void E3dObject::ForceDefaultAttr(SfxItemPool* pPool)
+{
+}
+
+/*************************************************************************
+|*
+|* Falls doch noch DefaultAttrs benoetigt werden
+|*
+\************************************************************************/
+
+void E3dObject::ForceDefaultAttrAgain ()
+{
+ SdrAttrObj::ForceDefaultAttr (&GetModel ()->GetItemPool ());
+}
+
+/*************************************************************************
+|*
+|* Rotation eines 3d-Koerpers
+|*
+\************************************************************************/
+// 2D-rotation eines 3D-Koerpers, normalerweise macht das die Szene selbst
+// Ist aber eine korrekte Implementierung, denn alles was passiert ist eine
+// Rotation um die Achse die senkrecht auf dem Bildschirm steht und zwar
+// unabhaengig davon, wie die Szene bisher gedreht worden ist.
+
+void E3dObject::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ // Also derzeit sind die Klebepunkte relativ zum aOutRect der Szene definiert. Vor dem Drehen
+ // werden die Klebepunkte relativ zur Seite definiert. Sie nehmen an der Drehung der Szene noch nicht Teil
+ // dafuer gibt es den
+ SetGlueReallyAbsolute(TRUE);
+
+ // SendRepaintBroadcast();
+ double fWinkelInRad = nWink/100 * F_PI180;
+ NbcRotateZ(fWinkelInRad);
+ SetRectsDirty(); // Veranlasst eine Neuberechnung aller BoundRects
+ NbcRotateGluePoints(rRef,nWink,sn,cs); // Rotiert die Klebepunkte (die haben noch Koordinaten relativ
+ // zum Urpsung des Blattes
+ SetGlueReallyAbsolute(FALSE); // ab jetzt sind sie wieder relativ zum BoundRect (also dem aOutRect definiert)
+}
+
+/*************************************************************************/
+
+TYPEINIT1(E3dCompoundObject, E3dObject);
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+E3dCompoundObject::E3dCompoundObject() : E3dObject()
+{
+ // Defaults setzen
+ E3dDefaultAttributes aDefault;
+ SetDefaultAttributes(aDefault);
+
+ bBytesLeft = FALSE;
+ bCreateE3dPolyObj = FALSE;
+ bGeometryValid = FALSE;
+}
+
+E3dCompoundObject::E3dCompoundObject(E3dDefaultAttributes& rDefault) : E3dObject()
+{
+ // Defaults setzen
+ SetDefaultAttributes(rDefault);
+
+ bBytesLeft = FALSE;
+ bCreateE3dPolyObj = FALSE;
+ bGeometryValid = FALSE;
+}
+
+void E3dCompoundObject::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+{
+ // Defaults setzen
+ aFrontMaterial = rDefault.GetDefaultFrontMaterial();
+ aBackMaterial = rDefault.GetDefaultBackMaterial();
+ eTextureKind = rDefault.GetDefaultTextureKind();
+ eTextureMode = rDefault.GetDefaultTextureMode();
+ bDoubleSided = rDefault.GetDefaultDoubleSided();
+ bCreateNormals = rDefault.GetDefaultCreateNormals();
+ bCreateTexture = rDefault.GetDefaultCreateTexture();
+ bUseStdNormals = rDefault.GetDefaultUseStdNormals();
+ bUseStdNormalsUseSphere = rDefault.GetDefaultUseStdNormalsUseSphere();
+ bInvertNormals = rDefault.GetDefaultInvertNormals();
+ bUseStdTextureX = rDefault.GetDefaultUseStdTextureX();
+ bUseStdTextureXUseSphere = rDefault.GetDefaultUseStdTextureXUseSphere();
+ bUseStdTextureY = rDefault.GetDefaultUseStdTextureY();
+ bUseStdTextureYUseSphere = rDefault.GetDefaultUseStdTextureYUseSphere();
+ bShadow3D = rDefault.GetDefaultShadow3D();
+ bFilterTexture = rDefault.GetDefaultFilterTexture();
+ bUseDifferentBackMaterial = rDefault.GetDefaultUseDifferentBackMaterial();
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+E3dCompoundObject::~E3dCompoundObject ()
+{
+}
+
+/*************************************************************************
+|*
+|* Start der Geometrieerzeugung ankuendigen
+|*
+\************************************************************************/
+
+void E3dCompoundObject::StartCreateGeometry()
+{
+ // Geometriestart mitteilen
+ aDisplayGeometry.StartDescription();
+
+ // Lokales Volumen reset
+ aLocalBoundVol = Volume3D();
+
+ // Geometrie ist ab jetzt gueltig, um ein rekursives weiteres
+ // Erzeugen zu verhindern
+ bGeometryValid = TRUE;
+}
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+UINT16 E3dCompoundObject::GetObjIdentifier() const
+{
+ return E3D_COMPOUNDOBJ_ID;
+}
+
+/*************************************************************************
+|*
+|* Compounds brauchen Defaults
+|*
+\************************************************************************/
+
+void E3dCompoundObject::ForceDefaultAttr(SfxItemPool* pPool)
+{
+ SdrAttrObj::ForceDefaultAttr (pPool);
+}
+
+/*************************************************************************
+|*
+|* SnapRect berechnen
+|*
+\************************************************************************/
+
+void E3dCompoundObject::RecalcSnapRect()
+{
+ E3dScene* pScene = GetScene();
+ if(pScene)
+ {
+ // Objekttransformation uebernehmen
+ const Volume3D& rBoundVol = GetBoundVolume();
+ aSnapRect = Rectangle();
+
+ if(rBoundVol.IsValid())
+ {
+ const Matrix4D& rTrans = GetFullTransform();
+ Vol3DPointIterator aIter(rBoundVol, &rTrans);
+ Vector3D aTfVec;
+ while ( aIter.Next(aTfVec) )
+ {
+ aTfVec = pScene->GetCameraSet().WorldToViewCoor(aTfVec);
+ Point aPoint((long)(aTfVec.X() + 0.5), (long)(aTfVec.Y() + 0.5));
+ aSnapRect.Union(Rectangle(aPoint, aPoint));
+ }
+ }
+ bSnapRectDirty = FALSE;
+ }
+}
+
+/*************************************************************************
+|*
+|* BoundRect berechnen und evtl. Schatten einbeziehen
+|* Dazu muss ein eventueller Schatten des einzelnen 3D-Objektes
+|* beruecksichtigt werden
+|*
+\************************************************************************/
+
+void E3dCompoundObject::RecalcBoundRect()
+{
+ // BoundRect aus SnapRect berechnen
+ aOutRect = GetSnapRect();
+
+ E3dScene* pScene = GetScene();
+ if(pScene)
+ {
+ // Schatten beruecksichtigen
+ if(DoDrawShadow())
+ {
+ // ObjectTrans setzen
+ Matrix4D mTransform = GetFullTransform();
+ pScene->GetCameraSet().SetObjectTrans(mTransform);
+
+ // Schattenpolygon holen
+ PolyPolygon aShadowPoly;
+ GetShadowPolygon(aShadowPoly);
+
+ // Hinzufuegen
+ aOutRect.Union(aShadowPoly.GetBoundRect());
+ }
+
+ // Linienbreite beruecksichtigen
+ const XLineAttrSetItem* pLineAttr = GetLineAttr();
+ if(pLineAttr)
+ {
+ const SfxItemSet &rSet = pLineAttr->GetItemSet();
+ INT32 nLineWidth = ((const XLineWidthItem&) (rSet.
+ Get(XATTR_LINEWIDTH))).GetValue();
+ if(nLineWidth)
+ {
+ Rectangle aShadowRect = aOutRect;
+ aShadowRect.Left() -= nLineWidth;
+ aShadowRect.Right() += nLineWidth;
+ aShadowRect.Top() -= nLineWidth;
+ aShadowRect.Bottom() += nLineWidth;
+ aOutRect.Union(aShadowRect);
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* BoundVolume holen. Falls die Geometrie ungueltig ist, diese neu
+|* erzeugen und das BoundVol neu berechnen
+|*
+\************************************************************************/
+
+const Volume3D& E3dCompoundObject::GetBoundVolume()
+{
+ // Geometrie aktuell?
+ if(!bGeometryValid)
+ {
+ // Neu erzeugen und eine Neubestimmung des BoundVol erzwingen
+ ReCreateGeometry();
+ bBoundVolValid = FALSE;
+ }
+
+ // call parent
+ return E3dObject::GetBoundVolume();
+}
+
+/*************************************************************************
+|*
+|* Rausschreiben der Datenmember eines E3dCompounds
+|*
+\************************************************************************/
+
+void E3dCompoundObject::WriteData(SvStream& rOut) const
+{
+#ifdef E3D_STREAMING
+
+ if (!aLocalBoundVol.IsValid() && aBoundVol.IsValid())
+ {
+ // Das aLocalBoundVol wird gespeichert.
+ // Ist dieses ungueltig, so wird das aBoundVol genommen
+ // (sollten beim E3dCompoundObject sowieso gleich sein)
+ ((E3dCompoundObject*) this)->aLocalBoundVol = aBoundVol;
+ }
+
+ E3dObject::WriteData(rOut);
+ if (rOut.GetVersion() < 3560)
+ {
+ // In diesem Fall passiert nichts, da vor der Version 4.0
+ // also im Falle der Revision 3.1
+ }
+ else
+ {
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dCompoundObject");
+#endif
+ rOut << BOOL(bDoubleSided);
+#endif
+
+ // neue Parameter zur Geometrieerzeugung
+ rOut << BOOL(bCreateNormals);
+ rOut << BOOL(bCreateTexture);
+ rOut << BOOL(bUseStdNormals);
+ rOut << BOOL(bUseStdNormalsUseSphere);
+ rOut << BOOL(bUseStdTextureX);
+ rOut << BOOL(bUseStdTextureXUseSphere);
+ rOut << BOOL(bUseStdTextureY);
+ rOut << BOOL(bUseStdTextureYUseSphere);
+ rOut << BOOL(bShadow3D);
+
+ // neu al 384:
+ aFrontMaterial.WriteData(rOut);
+ aBackMaterial.WriteData(rOut);
+ rOut << (UINT16)eTextureKind;
+ rOut << (UINT16)eTextureMode;
+ rOut << BOOL(bInvertNormals);
+
+ // neu ab 534: (hat noch gefehlt)
+ rOut << BOOL(bFilterTexture);
+ }
+
+}
+
+/*************************************************************************
+|*
+|* Einlesen der Datenmember eines E3dCompounds
+|*
+\************************************************************************/
+
+void E3dCompoundObject::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if ( rIn.GetError() != SVSTREAM_OK )
+ return;
+
+ E3dObject::ReadData(rHead, rIn);
+
+ // Vor der Filerevision 13 wurde das Objekt nie geschrieben.
+ // auch kein Kompatibilitaetsrecord.
+ if ((rHead.GetVersion() < 13) || (rIn.GetVersion() < 3560))
+ {
+ return;
+ }
+
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dCompoundObject");
+#endif
+
+ bBytesLeft = FALSE;
+ if (aCompat.GetBytesLeft () >= sizeof (BOOL))
+ {
+ BOOL bTmp;
+ rIn >> bTmp; bDoubleSided = bTmp;
+
+ // neue Parameter zur Geometrieerzeugung
+ if (aCompat.GetBytesLeft () >= sizeof (BOOL))
+ {
+ rIn >> bTmp; bCreateNormals = bTmp;
+ rIn >> bTmp; bCreateTexture = bTmp;
+ rIn >> bTmp; bUseStdNormals = bTmp;
+ rIn >> bTmp; bUseStdNormalsUseSphere = bTmp;
+ rIn >> bTmp; bUseStdTextureX = bTmp;
+ rIn >> bTmp; bUseStdTextureXUseSphere = bTmp;
+ rIn >> bTmp; bUseStdTextureY = bTmp;
+ rIn >> bTmp; bUseStdTextureYUseSphere = bTmp;
+ rIn >> bTmp; bShadow3D = bTmp;
+ // Setze ein Flag fuer den Aufrufer, dass neues Format
+ // zu lesen ist
+ bBytesLeft = TRUE;
+ }
+
+ // neu al 384:
+ if (aCompat.GetBytesLeft () >= sizeof (B3dMaterial))
+ {
+ UINT16 nTmp;
+ aFrontMaterial.ReadData(rIn);
+ aBackMaterial.ReadData(rIn);
+ rIn >> nTmp; eTextureKind = (Base3DTextureKind)nTmp;
+ rIn >> nTmp; eTextureMode = (Base3DTextureMode)nTmp;
+ rIn >> bTmp; bInvertNormals = bTmp;
+ }
+
+ // neu ab 534: (hat noch gefehlt)
+ if (aCompat.GetBytesLeft () >= sizeof (BOOL))
+ {
+ rIn >> bTmp; bFilterTexture = bTmp;
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Bitmaps fuer 3D-Darstellung von Gradients und Hatches holen
+|*
+\************************************************************************/
+
+Bitmap E3dCompoundObject::GetGradientBitmap(const SfxItemSet& rSet)
+{
+ VirtualDevice *pVD = new VirtualDevice();
+ Size aVDSize(256, 256);
+ pVD->SetOutputSizePixel( aVDSize );
+ XOutputDevice *pXOut = new XOutputDevice( pVD );
+ XFillAttrSetItem *pXFSet = new XFillAttrSetItem( rSet.GetPool() );
+
+ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_GRADIENT ) );
+ pXFSet->GetItemSet().Put( rSet.Get(XATTR_FILLGRADIENT) );
+ pXFSet->GetItemSet().Put( rSet.Get(XATTR_GRADIENTSTEPCOUNT) );
+ pXOut->SetFillAttr( *pXFSet );
+
+ XLineAttrSetItem *pXLSet = new XLineAttrSetItem( rSet.GetPool() );
+ pXLSet->GetItemSet().Put( XLineStyleItem( XLINE_NONE ) );
+ pXOut->SetLineAttr( *pXLSet );
+
+ pXOut->DrawRect( Rectangle( Point(), aVDSize ) );
+ Bitmap aGradientBitmap = pVD->GetBitmap( Point(), aVDSize );
+
+ if( pVD )
+ delete pVD;
+ if( pXOut )
+ delete pXOut;
+ if( pXFSet )
+ delete pXFSet;
+ if( pXLSet )
+ delete pXLSet;
+
+ return aGradientBitmap;
+}
+
+Bitmap E3dCompoundObject::GetHatchBitmap(const SfxItemSet& rSet)
+{
+ VirtualDevice *pVD = new VirtualDevice();
+ const XFillHatchItem* pFillHatchItem = (XFillHatchItem*)&rSet.Get(XATTR_FILLHATCH);
+ const XHatch& rHatch = pFillHatchItem->GetValue();
+ long nDistance = rHatch.GetDistance(); // in 100stel mm
+ double fAngle = double(rHatch.GetAngle()) * (F_PI180 / 10.0);
+
+ double fMinX(0.0);
+ double fMaxX(0.0);
+ double fMinY(0.0);
+ double fMaxY(0.0);
+
+ // nDistance in X-Richtung
+ double fX = cos(fAngle) * double(nDistance);
+ double fY = sin(fAngle) * double(nDistance);
+
+ if(fX < fMinX)
+ fMinX = fX;
+ if(fX > fMaxX)
+ fMaxX = fX;
+
+ if(fY < fMinY)
+ fMinY = fY;
+ if(fY > fMaxY)
+ fMaxY = fY;
+
+ // nDistance in Y-Richtung
+ fX = cos(fAngle + F_PI2) * double(nDistance);
+ fY = sin(fAngle + F_PI2) * double(nDistance);
+
+ if(fX < fMinX)
+ fMinX = fX;
+ if(fX > fMaxX)
+ fMaxX = fX;
+
+ if(fY < fMinY)
+ fMinY = fY;
+ if(fY > fMaxY)
+ fMaxY = fY;
+
+ // nDistance in -X-Richtung
+ fX = cos(fAngle + F_PI) * double(nDistance);
+ fY = sin(fAngle + F_PI) * double(nDistance);
+
+ if(fX < fMinX)
+ fMinX = fX;
+ if(fX > fMaxX)
+ fMaxX = fX;
+
+ if(fY < fMinY)
+ fMinY = fY;
+ if(fY > fMaxY)
+ fMaxY = fY;
+
+ // nDistance in -Y-Richtung
+ fX = cos(fAngle + (F_PI + F_PI2)) * double(nDistance);
+ fY = sin(fAngle + (F_PI + F_PI2)) * double(nDistance);
+
+ if(fX < fMinX)
+ fMinX = fX;
+ if(fX > fMaxX)
+ fMaxX = fX;
+
+ if(fY < fMinY)
+ fMinY = fY;
+ if(fY > fMaxY)
+ fMaxY = fY;
+
+ long nDistanceX = long(fMaxX - fMinX);
+ long nDistanceY = long(fMaxY - fMinY);
+
+ // Bei Schraffuren in eine der 4 Himmelsrichtungen Ausdehnung halbieren
+ if(rHatch.GetAngle() % 900 == 0)
+ {
+ nDistanceX /= 2;
+ nDistanceY /= 2;
+ }
+
+ Size aVDSize(64, 64);
+ pVD->SetOutputSizePixel( aVDSize );
+ MapMode aMapMode(MAP_100TH_MM);
+ pVD->SetMapMode(aMapMode);
+
+ XOutputDevice *pXOut = new XOutputDevice( pVD );
+ XFillAttrSetItem *pXFSet = new XFillAttrSetItem( rSet.GetPool() );
+ XLineAttrSetItem *pXLSet = new XLineAttrSetItem( rSet.GetPool() );
+
+ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_SOLID ) );
+ pXFSet->GetItemSet().Put( XFillColorItem( String(), RGB_Color( COL_WHITE ) ) );
+ pXLSet->GetItemSet().Put( XLineStyleItem( XLINE_NONE ) );
+ pXOut->SetLineAttr( *pXLSet );
+ pXOut->SetFillAttr( *pXFSet );
+ pXOut->DrawRect( Rectangle( Point(), pVD->PixelToLogic(aVDSize) ) );
+
+ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_HATCH ) );
+ pXFSet->GetItemSet().Put( rSet.Get(XATTR_FILLHATCH) );
+ pXOut->SetFillAttr( *pXFSet );
+
+ Size aLogicalSize = pVD->PixelToLogic(aVDSize);
+ Fraction aFractionX(aLogicalSize.Width(), nDistanceX);
+ Fraction aFractionY(aLogicalSize.Height(), nDistanceY);
+ aMapMode.SetScaleX(aFractionX);
+ aMapMode.SetScaleY(aFractionY);
+ pVD->SetMapMode(aMapMode);
+ pXOut->DrawRect( Rectangle( Point(), pVD->PixelToLogic(aVDSize) ) );
+
+ Bitmap aHatchBitmap = pVD->GetBitmap( Point(), pVD->PixelToLogic(aVDSize) );
+
+ if( pVD )
+ delete pVD;
+ if( pXOut )
+ delete pXOut;
+ if( pXFSet )
+ delete pXFSet;
+ if( pXLSet )
+ delete pXLSet;
+
+ return aHatchBitmap;
+}
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+void E3dCompoundObject::DestroyGeometry()
+{
+ // Alle Objekte in der Sub-Liste zerstoeren. Dies sind die
+ // zur Visualisierung des Objektes verwendeten Hilfsobjekte
+ pSub->Clear();
+ delete pSub;
+ pSub = new E3dObjList(NULL, NULL);
+ pSub->SetOwnerObj(this);
+ pSub->SetListKind(SDROBJLIST_GROUPOBJ);
+
+ // Neue Geometrie zerstoeren
+ aDisplayGeometry.Erase();
+
+ // BoundVols resetten
+ aLocalBoundVol = Volume3D();
+ bBoundVolValid = FALSE;
+ StructureChanged(this);
+
+ // Geometrie ist ungueltig
+ bGeometryValid = FALSE;
+}
+
+void E3dCompoundObject::CreateGeometry()
+{
+ // Geometrie ist gueltig, um rekursion zu verhindern
+ bGeometryValid = TRUE;
+
+ // Eventuell entstandene Geometrie noch korrigieren
+ // und Default -Normalen oder -Texturkoordinaten erzeugen
+ if(bCreateNormals)
+ {
+ if(bUseStdNormals && bUseStdNormalsUseSphere)
+ GetDisplayGeometry().CreateDefaultNormalsSphere();
+ if(bInvertNormals)
+ GetDisplayGeometry().InvertNormals();
+ }
+
+ if(bCreateTexture)
+ {
+ GetDisplayGeometry().CreateDefaultTexture(
+ ((bUseStdTextureX) ? B3D_CREATE_DEFAULT_X : FALSE)
+ |((bUseStdTextureY) ? B3D_CREATE_DEFAULT_Y : FALSE),
+ bUseStdTextureXUseSphere);
+ }
+
+ // Am Ende der Geometrieerzeugung das model an den erzeugten
+ // PolyObj's setzen, d.h. beim ueberladen dieser Funktion
+ // den parent am Ende rufen.
+ if(bCreateE3dPolyObj)
+ SetModel(pModel);
+
+ // Das Ende der Geometrieerzeugung anzeigen
+ aDisplayGeometry.EndDescription();
+}
+
+void E3dCompoundObject::ReCreateGeometry(BOOL bCreateOldGeometry)
+{
+ // Geometrie zerstoeren
+ DestroyGeometry();
+
+ // Flag fuer Geometrieerzeugung setzen
+ bCreateE3dPolyObj = bCreateOldGeometry;
+
+ // ... und neu erzeugen
+ CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+void E3dCompoundObject::AddGeometry(const PolyPolygon3D& rPolyPolygon3D,
+ BOOL bHintIsComplex, BOOL bOutline)
+{
+ if(rPolyPolygon3D.Count())
+ {
+ // eventuell alte Geometrie erzeugen (z.B. zum speichern)
+ if(bCreateE3dPolyObj)
+ {
+ E3dPolyObj* pObj = new E3dPolyObj(
+ rPolyPolygon3D, GetDoubleSided(), TRUE);
+ pObj->SetPartOfParent();
+ Insert3DObj(pObj);
+ }
+
+ // neue Geometrie erzeugen
+ for(USHORT a = 0; a < rPolyPolygon3D.Count(); a++ )
+ {
+ const Polygon3D& rPoly3D = rPolyPolygon3D[a];
+ aDisplayGeometry.StartObject(bHintIsComplex, bOutline);
+ for(USHORT b = 0; b < rPoly3D.GetPointCount(); b++ )
+ aDisplayGeometry.AddEdge(rPoly3D[b]);
+ }
+ aDisplayGeometry.EndObject();
+
+ // LocalBoundVolume pflegen
+ aLocalBoundVol.Union(rPolyPolygon3D.GetPolySize());
+
+ // Eigenes BoundVol nicht mehr gueltig
+ SetBoundVolInvalid();
+ SetRectsDirty();
+ }
+}
+
+void E3dCompoundObject::AddGeometry(
+ const PolyPolygon3D& rPolyPolygon3D,
+ const PolyPolygon3D& rPolyNormal3D,
+ BOOL bHintIsComplex, BOOL bOutline)
+{
+ if(rPolyPolygon3D.Count())
+ {
+ // eventuell alte Geometrie erzeugen (z.B. zum speichern)
+ if(bCreateE3dPolyObj)
+ {
+ E3dPolyObj* pObj = new E3dPolyObj(
+ rPolyPolygon3D, rPolyNormal3D, GetDoubleSided(), TRUE);
+ pObj->SetPartOfParent();
+ Insert3DObj(pObj);
+ }
+
+ // neue Geometrie erzeugen
+ for(USHORT a = 0; a < rPolyPolygon3D.Count(); a++ )
+ {
+ const Polygon3D& rPoly3D = rPolyPolygon3D[a];
+ const Polygon3D& rNormal3D = rPolyNormal3D[a];
+ aDisplayGeometry.StartObject(bHintIsComplex, bOutline);
+ for(USHORT b = 0; b < rPoly3D.GetPointCount(); b++ )
+ aDisplayGeometry.AddEdge(rPoly3D[b], rNormal3D[b]);
+ }
+ aDisplayGeometry.EndObject();
+
+ // LocalBoundVolume pflegen
+ aLocalBoundVol.Union(rPolyPolygon3D.GetPolySize());
+
+ // Eigenes BoundVol nicht mehr gueltig
+ SetBoundVolInvalid();
+ SetRectsDirty();
+ }
+}
+
+void E3dCompoundObject::AddGeometry(
+ const PolyPolygon3D& rPolyPolygon3D,
+ const PolyPolygon3D& rPolyNormal3D,
+ const PolyPolygon3D& rPolyTexture3D,
+ BOOL bHintIsComplex, BOOL bOutline)
+{
+ if(rPolyPolygon3D.Count())
+ {
+ // eventuell alte Geometrie erzeugen (z.B. zum speichern)
+ if(bCreateE3dPolyObj)
+ {
+ E3dPolyObj* pObj = new E3dPolyObj(
+ rPolyPolygon3D, rPolyNormal3D,
+ rPolyTexture3D, GetDoubleSided(), TRUE);
+ pObj->SetPartOfParent();
+ Insert3DObj(pObj);
+ }
+
+ // neue Geometrie erzeugen
+ for(USHORT a = 0; a < rPolyPolygon3D.Count(); a++ )
+ {
+ const Polygon3D& rPoly3D = rPolyPolygon3D[a];
+ const Polygon3D& rNormal3D = rPolyNormal3D[a];
+ const Polygon3D& rTexture3D = rPolyTexture3D[a];
+ aDisplayGeometry.StartObject(bHintIsComplex, bOutline);
+ for(USHORT b = 0; b < rPoly3D.GetPointCount(); b++ )
+ aDisplayGeometry.AddEdge(rPoly3D[b], rNormal3D[b], rTexture3D[b]);
+ }
+ aDisplayGeometry.EndObject();
+
+ // LocalBoundVolume pflegen
+ aLocalBoundVol.Union(rPolyPolygon3D.GetPolySize());
+
+ // Eigenes BoundVol nicht mehr gueltig
+ SetBoundVolInvalid();
+ SetRectsDirty();
+ }
+}
+
+/*************************************************************************
+|*
+|* Hilfsfunktionen zur Geometrieerzeugung
+|*
+\************************************************************************/
+
+void E3dCompoundObject::RotatePoly(
+ PolyPolygon3D& rPolyPolyRotate,
+ Matrix4D& rRotMat)
+{
+ USHORT nPolyCnt = rPolyPolyRotate.Count();
+
+ for(UINT16 a=0;a<nPolyCnt;a++)
+ {
+ Polygon3D& rPolyRotate = rPolyPolyRotate[a];
+ USHORT nPntCnt = rPolyRotate.GetPointCount();
+
+ for(UINT16 b=0;b<nPntCnt;b++)
+ rPolyRotate[b] *= rRotMat;
+ }
+}
+
+void E3dCompoundObject::GrowPoly(
+ PolyPolygon3D& rPolyPolyGrow,
+ PolyPolygon3D& rPolyPolyNormals,
+ double fFactor)
+{
+ USHORT nPolyCnt = rPolyPolyGrow.Count();
+
+ for(UINT16 a=0;a<nPolyCnt;a++)
+ {
+ Polygon3D& rPolyGrow = rPolyPolyGrow[a];
+ const Polygon3D& rPolyNormals = rPolyPolyNormals[a];
+ USHORT nPntCnt = rPolyGrow.GetPointCount();
+
+ for(UINT16 b=0;b<nPntCnt;b++)
+ rPolyGrow[b] += rPolyNormals[b] * fFactor;
+ }
+}
+
+void E3dCompoundObject::AddNormals(
+ PolyPolygon3D& rPolyPolyDest,
+ const PolyPolygon3D& rPolyPolySource)
+{
+ USHORT nPolyCnt = rPolyPolyDest.Count();
+
+ for(UINT16 a=0;a<nPolyCnt;a++)
+ {
+ Polygon3D& rPolyDest = rPolyPolyDest[a];
+ const Polygon3D& rPolySource = rPolyPolySource[a];
+ USHORT nPntCnt = rPolyDest.GetPointCount();
+
+ for(UINT16 b=0;b<nPntCnt;b++)
+ {
+ rPolyDest[b] += rPolySource[b];
+ rPolyDest[b].Normalize();
+ }
+ }
+}
+
+void E3dCompoundObject::ScalePoly(
+ PolyPolygon3D& rPolyPolyScale,
+ double fFactor)
+{
+ USHORT nPolyCnt = rPolyPolyScale.Count();
+ Vector3D aMiddle = rPolyPolyScale.GetMiddle();
+
+ for(UINT16 a=0;a<nPolyCnt;a++)
+ {
+ Polygon3D& rPolyScale = rPolyPolyScale[a];
+ USHORT nPntCnt = rPolyScale.GetPointCount();
+
+ for(UINT16 b=0;b<nPntCnt;b++)
+ rPolyScale[b] = ((rPolyScale[b] - aMiddle) * fFactor) + aMiddle;
+ }
+}
+
+void E3dCompoundObject::CreateFront(
+ const PolyPolygon3D& rPolyPoly3D,
+ const PolyPolygon3D& rFrontNormals,
+ BOOL bCreateNormals,
+ BOOL bCreateTexture)
+{
+ // Vorderseite
+ if(bCreateNormals)
+ {
+ if(bCreateTexture)
+ {
+ // Polygon fuer die Textur erzeugen
+ PolyPolygon3D aPolyTexture = rPolyPoly3D;
+ Volume3D aSize = aPolyTexture.GetPolySize();
+ Matrix4D aTrans;
+
+ aTrans.Identity();
+ aTrans.Translate(-aSize.MinVec());
+ aPolyTexture.Transform(aTrans);
+
+ double fFactorX(1.0), fFactorY(1.0), fFactorZ(1.0);
+
+ if(aSize.GetWidth() != 0.0)
+ fFactorX = 1.0 / aSize.GetWidth();
+
+ if(aSize.GetHeight() != 0.0)
+ fFactorY = 1.0 / aSize.GetHeight();
+
+ if(aSize.GetDepth() != 0.0)
+ fFactorZ = 1.0 / aSize.GetDepth();
+
+ aTrans.Identity();
+ aTrans.Scale(fFactorX, -fFactorY, fFactorZ);
+ aTrans.Translate(Vector3D(0.0, 1.0, 0.0));
+ aPolyTexture.Transform(aTrans);
+
+ AddGeometry(rPolyPoly3D, rFrontNormals, aPolyTexture, TRUE);
+ }
+ else
+ AddGeometry(rPolyPoly3D, rFrontNormals, TRUE);
+ }
+ else
+ AddGeometry(rPolyPoly3D, TRUE);
+}
+
+void E3dCompoundObject::AddFrontNormals(
+ const PolyPolygon3D& rPolyPoly3D,
+ PolyPolygon3D& rNormalsFront,
+ Vector3D &rOffset)
+{
+ Vector3D aFrontNormal = -rOffset;
+ aFrontNormal.Normalize();
+ USHORT nPolyCnt = rPolyPoly3D.Count();
+
+ for(UINT16 a=0;a<nPolyCnt;a++)
+ {
+ const Polygon3D& rPoly3D = rPolyPoly3D[a];
+ Polygon3D& rNormalPoly = rNormalsFront[a];
+ USHORT nPntCnt = rPoly3D.GetPointCount();
+
+ for(UINT16 b=0;b<nPntCnt;b++)
+ {
+ rNormalPoly[b] += aFrontNormal;
+ rNormalPoly[b].Normalize();
+ }
+ }
+}
+
+void E3dCompoundObject::CreateBack(
+ const PolyPolygon3D& rPolyPoly3D,
+ const PolyPolygon3D& rBackNormals,
+ BOOL bCreateNormals,
+ BOOL bCreateTexture)
+{
+ // PolyPolygon umdrehen
+ PolyPolygon3D aLocalPoly = rPolyPoly3D;
+ aLocalPoly.FlipDirections();
+
+ // Rueckseite
+ if(bCreateNormals)
+ {
+ PolyPolygon3D aLocalNormals = rBackNormals;
+ aLocalNormals.FlipDirections();
+ if(bCreateTexture)
+ {
+ // Polygon fuer die Textur erzeugen
+ PolyPolygon3D aPolyTexture(aLocalPoly);
+ Volume3D aSize = aPolyTexture.GetPolySize();
+ Matrix4D aTrans;
+
+ aTrans.Identity();
+ aTrans.Translate(-aSize.MinVec());
+ aPolyTexture.Transform(aTrans);
+
+ double fFactorX(1.0), fFactorY(1.0), fFactorZ(1.0);
+
+ if(aSize.GetWidth() != 0.0)
+ fFactorX = 1.0 / aSize.GetWidth();
+
+ if(aSize.GetHeight() != 0.0)
+ fFactorY = 1.0 / aSize.GetHeight();
+
+ if(aSize.GetDepth() != 0.0)
+ fFactorZ = 1.0 / aSize.GetDepth();
+
+ aTrans.Identity();
+ aTrans.Scale(fFactorX, -fFactorY, fFactorZ);
+ aTrans.Translate(Vector3D(0.0, 1.0, 0.0));
+ aPolyTexture.Transform(aTrans);
+
+ AddGeometry(aLocalPoly, aLocalNormals, aPolyTexture, TRUE);
+ }
+ else
+ AddGeometry(aLocalPoly, aLocalNormals, TRUE);
+ }
+ else
+ {
+ AddGeometry(aLocalPoly, TRUE);
+ }
+}
+
+void E3dCompoundObject::AddBackNormals(
+ const PolyPolygon3D& rPolyPoly3D,
+ PolyPolygon3D& rNormalsBack,
+ Vector3D& rOffset)
+{
+ Vector3D aBackNormal = rOffset;
+ aBackNormal.Normalize();
+ USHORT nPolyCnt = rPolyPoly3D.Count();
+
+ for(UINT16 a=0;a<nPolyCnt;a++)
+ {
+ const Polygon3D& rPoly3D = rPolyPoly3D[a];
+ Polygon3D& rNormalPoly = rNormalsBack[a];
+ USHORT nPntCnt = rPoly3D.GetPointCount();
+
+ for(UINT16 b=0;b<nPntCnt;b++)
+ {
+ rNormalPoly[b] += aBackNormal;
+ rNormalPoly[b].Normalize();
+ }
+ }
+}
+
+void E3dCompoundObject::CreateInBetween(
+ const PolyPolygon3D& rPolyPolyFront,
+ const PolyPolygon3D& rPolyPolyBack,
+ const PolyPolygon3D& rFrontNormals,
+ const PolyPolygon3D& rBackNormals,
+ BOOL bCreateNormals,
+ double fSurroundFactor,
+ double fTextureStart,
+ double fTextureDepth,
+ BOOL bRotateTexture90)
+{
+ USHORT nPolyCnt = rPolyPolyFront.Count();
+ BOOL bCreateTexture = (fTextureDepth == 0.0) ? FALSE : TRUE;
+ double fPolyLength, fPolyPos;
+ USHORT nLastIndex;
+
+ // Verbindungsstuecke
+ if(bCreateNormals)
+ {
+ for(UINT16 a=0;a<nPolyCnt;a++)
+ {
+ const Polygon3D& rPoly3DFront = rPolyPolyFront[a];
+ const Polygon3D& rPoly3DBack = rPolyPolyBack[a];
+
+ const Polygon3D& rPolyNormalsFront = rFrontNormals[a];
+ const Polygon3D& rPolyNormalsBack = rBackNormals[a];
+
+ Polygon3D aRect3D(4);
+ Polygon3D aNormal3D(4);
+ Polygon3D aTexture3D(4);
+ USHORT nPntCnt = rPoly3DFront.GetPointCount();
+ USHORT nPrefillIndex = rPoly3DFront.IsClosed() ? nPntCnt - 1 : 0;
+
+ aRect3D[3] = rPoly3DFront[nPrefillIndex];
+ aRect3D[2] = rPoly3DBack[nPrefillIndex];
+ aNormal3D[3] = rPolyNormalsFront[nPrefillIndex];
+ aNormal3D[2] = rPolyNormalsBack[nPrefillIndex];
+
+ if(bCreateTexture)
+ {
+ fPolyLength = rPoly3DFront.GetLength();
+ fPolyPos = 0.0;
+ nLastIndex = rPoly3DFront.IsClosed() ? nPntCnt - 1 : 0;
+
+ if(bRotateTexture90)
+ {
+ // X,Y vertauschen
+ aTexture3D[3].X() = fTextureStart;
+ aTexture3D[3].Y() = (1.0 - fPolyPos) * fSurroundFactor;
+
+ aTexture3D[2].X() = fTextureStart + fTextureDepth;
+ aTexture3D[2].Y() = (1.0 - fPolyPos) * fSurroundFactor;
+ }
+ else
+ {
+ aTexture3D[3].X() = fPolyPos * fSurroundFactor;
+ aTexture3D[3].Y() = fTextureStart;
+
+ aTexture3D[2].X() = fPolyPos * fSurroundFactor;
+ aTexture3D[2].Y() = fTextureStart + fTextureDepth;
+ }
+ }
+
+ for (USHORT i = rPoly3DFront.IsClosed() ? 0 : 1; i < nPntCnt; i++)
+ {
+ aRect3D[0] = aRect3D[3];
+ aRect3D[1] = aRect3D[2];
+
+ aRect3D[3] = rPoly3DFront[i];
+ aRect3D[2] = rPoly3DBack[i];
+
+ aNormal3D[0] = aNormal3D[3];
+ aNormal3D[1] = aNormal3D[2];
+
+ aNormal3D[3] = rPolyNormalsFront[i];
+ aNormal3D[2] = rPolyNormalsBack[i];
+
+ if(bCreateTexture)
+ {
+ // Texturkoordinaten ermitteln
+ Vector3D aPart = rPoly3DFront[i] - rPoly3DFront[nLastIndex];
+ fPolyPos += aPart.GetLength() / fPolyLength;
+ nLastIndex = i;
+
+ // Der Abschnitt am Polygon entspricht dem Teil
+ // von fPolyPos bis fPolyPos+fPartLength
+
+ aTexture3D[0] = aTexture3D[3];
+ aTexture3D[1] = aTexture3D[2];
+
+ if(bRotateTexture90)
+ {
+ // X,Y vertauschen
+ aTexture3D[3].X() = fTextureStart;
+ aTexture3D[3].Y() = (1.0 - fPolyPos) * fSurroundFactor;
+
+ aTexture3D[2].X() = fTextureStart + fTextureDepth;
+ aTexture3D[2].Y() = (1.0 - fPolyPos) * fSurroundFactor;
+ }
+ else
+ {
+ aTexture3D[3].X() = fPolyPos * fSurroundFactor;
+ aTexture3D[3].Y() = fTextureStart;
+
+ aTexture3D[2].X() = fPolyPos * fSurroundFactor;
+ aTexture3D[2].Y() = fTextureStart + fTextureDepth;
+ }
+
+ AddGeometry(aRect3D, aNormal3D, aTexture3D, FALSE);
+ }
+ else
+ AddGeometry(aRect3D, aNormal3D, FALSE);
+ }
+ }
+ }
+ else
+ {
+ for(UINT16 a=0;a<nPolyCnt;a++)
+ {
+ const Polygon3D& rPoly3DFront = rPolyPolyFront[a];
+ const Polygon3D& rPoly3DBack = rPolyPolyBack[a];
+ Polygon3D aRect3D(4);
+ USHORT nPntCnt = rPoly3DFront.GetPointCount();
+ USHORT nPrefillIndex = rPoly3DFront.IsClosed() ? nPntCnt - 1 : 0;
+
+ aRect3D[3] = rPoly3DFront[nPrefillIndex];
+ aRect3D[2] = rPoly3DBack[nPrefillIndex];
+
+ for (USHORT i = rPoly3DFront.IsClosed() ? 0 : 1; i < nPntCnt; i++)
+ {
+ aRect3D[0] = aRect3D[3];
+ aRect3D[1] = aRect3D[2];
+
+ aRect3D[3] = rPoly3DFront[i];
+ aRect3D[2] = rPoly3DBack[i];
+
+ AddGeometry(aRect3D, FALSE);
+ }
+ }
+ }
+}
+
+void E3dCompoundObject::AddInBetweenNormals(
+ const PolyPolygon3D& rPolyPolyFront,
+ const PolyPolygon3D& rPolyPolyBack,
+ PolyPolygon3D& rNormals,
+ BOOL bSmoothed)
+{
+ USHORT nPolyCnt = rPolyPolyFront.Count();
+
+ // Verbindungsstuecke
+ for(UINT16 a=0;a<nPolyCnt;a++)
+ {
+ const Polygon3D& rPoly3DFront = rPolyPolyFront[a];
+ const Polygon3D& rPoly3DBack = rPolyPolyBack[a];
+ Polygon3D& rNormalPoly = rNormals[a];
+ USHORT nPntCnt = rPoly3DFront.GetPointCount();
+
+ if(rPoly3DBack.IsClosed())
+ {
+ Vector3D aNormal = (rPoly3DBack[nPntCnt - 1] - rPoly3DFront[nPntCnt - 1])
+ |(rPoly3DFront[0] - rPoly3DFront[nPntCnt - 1]);
+ aNormal.Normalize();
+ for (USHORT i = 0; i < nPntCnt; i++)
+ {
+ Vector3D aNextNormal = (rPoly3DBack[i] - rPoly3DFront[i])
+ |(rPoly3DFront[(i+1 == nPntCnt) ? 0 : i+1] - rPoly3DFront[i]);
+ aNextNormal.Normalize();
+ if(bSmoothed)
+ {
+ Vector3D aMidNormal = aNormal + aNextNormal;
+ aMidNormal.Normalize();
+ rNormalPoly[i] += aMidNormal;
+ }
+ else
+ rNormalPoly[i] += aNormal;
+ rNormalPoly[i].Normalize();
+ aNormal = aNextNormal;
+ }
+ }
+ else
+ {
+ Vector3D aNormal;
+ if(rPoly3DBack[0] == rPoly3DFront[0])
+ {
+ aNormal = (rPoly3DBack[1] - rPoly3DFront[1])
+ |(rPoly3DFront[1] - rPoly3DFront[0]);
+ }
+ else
+ {
+ aNormal = (rPoly3DBack[0] - rPoly3DFront[0])
+ |(rPoly3DFront[1] - rPoly3DFront[0]);
+ }
+ aNormal.Normalize();
+ rNormalPoly[0] += aNormal; rNormalPoly[0].Normalize();
+ for (USHORT i = 1; i < nPntCnt; i++)
+ {
+ Vector3D aNextNormal;
+ if(i+1 == nPntCnt)
+ {
+ aNextNormal = aNormal;
+ }
+ else
+ {
+ aNextNormal = (rPoly3DBack[i] - rPoly3DFront[i])
+ |(rPoly3DFront[i+1] - rPoly3DFront[i]);
+ }
+ aNextNormal.Normalize();
+ if(bSmoothed)
+ {
+ Vector3D aMidNormal = aNormal + aNextNormal;
+ aMidNormal.Normalize();
+ rNormalPoly[i] += aMidNormal;
+ }
+ else
+ rNormalPoly[i] += aNormal;
+ rNormalPoly[i].Normalize();
+ aNormal = aNextNormal;
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Copy-Operator
+|*
+\************************************************************************/
+
+void E3dCompoundObject::operator=(const SdrObject& rObj)
+{
+ // erstmal alle Childs kopieren
+ E3dObject::operator=(rObj);
+
+ // weitere Parameter kopieren
+ const E3dCompoundObject& r3DObj = (const E3dCompoundObject&) rObj;
+
+ aDisplayGeometry = r3DObj.aDisplayGeometry;
+ bDoubleSided = r3DObj.bDoubleSided;
+ bCreateNormals = r3DObj.bCreateNormals;
+ bCreateTexture = r3DObj.bCreateTexture;
+ bUseStdNormals = r3DObj.bUseStdNormals;
+ bUseStdNormalsUseSphere = r3DObj.bUseStdNormalsUseSphere;
+ bUseStdTextureX = r3DObj.bUseStdTextureX;
+ bUseStdTextureXUseSphere = r3DObj.bUseStdTextureXUseSphere;
+ bUseStdTextureY = r3DObj.bUseStdTextureY;
+ bUseStdTextureYUseSphere = r3DObj.bUseStdTextureYUseSphere;
+ bGeometryValid = r3DObj.bGeometryValid;
+ bShadow3D = r3DObj.bShadow3D;
+ bBytesLeft = r3DObj.bBytesLeft;
+ bCreateE3dPolyObj = r3DObj.bCreateE3dPolyObj;
+
+ // neu ab 383:
+ aFrontMaterial = r3DObj.aFrontMaterial;
+ aBackMaterial = r3DObj.aBackMaterial;
+ eTextureKind = r3DObj.eTextureKind;
+ eTextureMode = r3DObj.eTextureMode;
+ bInvertNormals = r3DObj.bInvertNormals;
+ bFilterTexture = r3DObj.bFilterTexture;
+ bUseDifferentBackMaterial = r3DObj.bUseDifferentBackMaterial;
+}
+
+/*************************************************************************
+|*
+|* Ausgabeparameter an 3D-Kontext setzen
+|*
+\************************************************************************/
+
+void E3dCompoundObject::SetBase3DParams(ExtOutputDevice& rOut, Base3D* pBase3D,
+ BOOL& bDrawObject, BOOL& bDrawOutline, UINT16 nDrawFlags, BOOL bGhosted)
+{
+ bDrawObject = (nDrawFlags & E3D_DRAWFLAG_FILLED);
+ if(bDrawObject)
+ {
+ // Attribute aus dem Objekt holen
+ const XFillAttrSetItem* pFillAttr = GetFillAttr();
+ if(pFillAttr && !rOut.GetIgnoreFillAttr())
+ {
+ const SfxItemSet& rSet = pFillAttr->GetItemSet();
+ UINT16 nFillTrans = ITEMVALUE(rSet, XATTR_FILLTRANSPARENCE, XFillTransparenceItem);
+
+ if(
+ (nFillTrans && (nDrawFlags & E3D_DRAWFLAG_TRANSPARENT))
+ || (!nFillTrans && !(nDrawFlags & E3D_DRAWFLAG_TRANSPARENT)))
+ {
+ XFillStyle eFillStyle = ITEMVALUE(rSet, XATTR_FILLSTYLE, XFillStyleItem );
+ Color aColorSolid = ((const XFillColorItem&) (rSet.
+ Get(XATTR_FILLCOLOR))).GetValue();
+
+ if(bGhosted)
+ {
+ aColorSolid = Color((aColorSolid.GetRed() >> 1) + 0x80,
+ (aColorSolid.GetGreen() >> 1) + 0x80,
+ (aColorSolid.GetBlue() >> 1) + 0x80);
+ }
+
+ Color aColorSolidWithTransparency = aColorSolid;
+ aColorSolidWithTransparency.SetTransparency((UINT8)(nFillTrans * 255 / 100));
+ Color aColorWhite(COL_WHITE);
+ Color aColorWhiteWithTransparency(COL_WHITE);
+ aColorWhiteWithTransparency.SetTransparency((UINT8)(nFillTrans * 255 / 100));
+ B3dTexture* pTexture = NULL;
+
+ // Material setzen
+ pBase3D->SetMaterial(aColorWhite, Base3DMaterialAmbient);
+ pBase3D->SetMaterial(aColorWhiteWithTransparency, Base3DMaterialDiffuse);
+ pBase3D->SetMaterial(aFrontMaterial.GetMaterial(Base3DMaterialSpecular), Base3DMaterialSpecular);
+ pBase3D->SetMaterial(aFrontMaterial.GetMaterial(Base3DMaterialEmission), Base3DMaterialEmission);
+ pBase3D->SetShininess(aFrontMaterial.GetShininess());
+
+ if(GetUseDifferentBackMaterial())
+ {
+ pBase3D->SetMaterial(aColorWhite, Base3DMaterialAmbient, Base3DMaterialBack);
+ pBase3D->SetMaterial(aColorWhiteWithTransparency, Base3DMaterialDiffuse, Base3DMaterialBack);
+ pBase3D->SetMaterial(aBackMaterial.GetMaterial(Base3DMaterialSpecular), Base3DMaterialSpecular, Base3DMaterialBack);
+ pBase3D->SetMaterial(aBackMaterial.GetMaterial(Base3DMaterialEmission), Base3DMaterialEmission, Base3DMaterialBack);
+ pBase3D->SetShininess(aBackMaterial.GetShininess(), Base3DMaterialBack);
+ }
+
+ Base3DTextureWrap eWrapX = Base3DTextureRepeat;
+ Base3DTextureWrap eWrapY = Base3DTextureRepeat;
+ Matrix4D mTexture;
+
+ if(pBase3D->GetOutputDevice()->GetDrawMode() & DRAWMODE_WHITEFILL)
+ {
+ // Farbe bleibt auf Weiss, nur noch den RenderMode setzen
+ pBase3D->SetRenderMode(Base3DRenderFill);
+ }
+ else if(eFillStyle == XFILL_NONE)
+ {
+ bDrawObject = FALSE;
+ }
+ else if(eFillStyle == XFILL_BITMAP)
+ {
+ Bitmap aBmp;
+
+ if(SFX_ITEM_SET == rSet.GetItemState(XATTR_FILLBITMAP, TRUE))
+ {
+ // EIndeutige Bitmap, benutze diese
+ aBmp = ITEMVALUE( rSet, XATTR_FILLBITMAP, XFillBitmapItem ).GetBitmap();
+ }
+ else
+ {
+ // Keine eindeutige Bitmap. benutze default
+ //
+ // DIES IST EINE NOTLOESUNG, BIS MAN IRGENDWO AN DIE
+ // DEAULT-BITMAP RANKOMMT (IST VON KA IN VORBEREITUNG)
+ //
+ aBmp = Bitmap(Size(4,4), 8);
+ }
+
+ if(bGhosted)
+ {
+ aBmp.Adjust( 50 );
+ }
+
+ // Texturattribute bilden
+ TextureAttributesBitmap aTexAttr(aBmp);
+
+ pTexture = pBase3D->ObtainTexture(aTexAttr);
+ if(!pTexture)
+ pTexture = pBase3D->ObtainTexture(aTexAttr, aBmp);
+
+ USHORT nOffX = ITEMVALUE( rSet, XATTR_FILLBMP_TILEOFFSETX, SfxUInt16Item );
+ USHORT nOffY = ITEMVALUE( rSet, XATTR_FILLBMP_TILEOFFSETY, SfxUInt16Item );
+ USHORT nOffPosX = ITEMVALUE( rSet, XATTR_FILLBMP_POSOFFSETX, SfxUInt16Item );
+ USHORT nOffPosY = ITEMVALUE( rSet, XATTR_FILLBMP_POSOFFSETY, SfxUInt16Item );
+ RECT_POINT eRectPoint = (RECT_POINT) ITEMVALUE( rSet, XATTR_FILLBMP_POS, SfxEnumItem );
+ BOOL bTile = ITEMVALUE( rSet, XATTR_FILLBMP_TILE, SfxBoolItem );
+ BOOL bStretch = ITEMVALUE( rSet, XATTR_FILLBMP_STRETCH, SfxBoolItem );
+ BOOL bLogSize = ITEMVALUE( rSet, XATTR_FILLBMP_SIZELOG, SfxBoolItem );
+
+ Size aSize;
+ aSize.Width() = labs( ITEMVALUE( rSet, XATTR_FILLBMP_SIZEX, SfxMetricItem ) );
+ aSize.Height() = labs( ITEMVALUE( rSet, XATTR_FILLBMP_SIZEY, SfxMetricItem ) );
+
+ Vector3D aScaleVector(1.0, 1.0, 1.0);
+ Vector3D aTranslateVector(0.0, 0.0, 0.0);
+
+ // Groesse beachten, logische Groesse einer Kachel bestimmen
+ // erst mal in 1/100 mm
+ Size aLogicalSize = aBmp.GetPrefSize();
+ const Volume3D& rVol = GetBoundVolume();
+ if(aLogicalSize.Width() == 0 || aLogicalSize.Height() == 0)
+ {
+ // Keine logische Groesse, nimm Pixelgroesse
+ // und wandle diese um
+ aLogicalSize = Application::GetDefaultDevice()->PixelToLogic(aBmp.GetSizePixel(), MAP_100TH_MM);
+ }
+ else
+ {
+ aLogicalSize =
+ OutputDevice::LogicToLogic(aLogicalSize, aBmp.GetPrefMapMode(), MAP_100TH_MM);
+ }
+
+ if(bLogSize)
+ {
+ // logische Groesse
+ if(aSize.Width() == 0 && aSize.Height() == 0)
+ {
+ // Originalgroesse benutzen, Original flag
+
+ // Um ein vernuenftiges Mapping bei defaults auch
+ // fuer 3D-Objekte zu erreichen, nimm die logische
+ // groesse einfach als groesser an
+ aLogicalSize.Width() /= 5; //10;
+ aLogicalSize.Height() /= 5; //10;
+ }
+ else
+ {
+ // Groesse in 100TH_MM in aSize, keine Flags
+ aLogicalSize = aSize;
+
+ // Um ein vernuenftiges Mapping bei defaults auch
+ // fuer 3D-Objekte zu erreichen, nimm die logische
+ // groesse einfach als groesser an
+ aLogicalSize.Width() /= 5; //10;
+ aLogicalSize.Height() /= 5; //10;
+ }
+ }
+ else
+ {
+ // relative Groesse
+ // 0..100 Prozent in aSize, relativ flag
+ aLogicalSize = Size(
+ (long)((rVol.GetWidth() * (double)aSize.Width() / 100.0) + 0.5),
+ (long)((rVol.GetHeight() * (double)aSize.Height() / 100.0) + 0.5));
+ }
+
+ // Skalieren
+ aScaleVector.X() = rVol.GetWidth() / (double)aLogicalSize.Width();
+ aScaleVector.Y() = rVol.GetHeight() / (double)aLogicalSize.Height();
+
+ if(bTile)
+ {
+ // Aneinandergefuegt drauflegen
+ double fLeftBound, fTopBound;
+
+ // Vertikal
+ if(eRectPoint == RP_LT || eRectPoint == RP_LM || eRectPoint == RP_LB)
+ {
+ // Links aligned starten
+ fLeftBound = 0.0;
+ }
+ else if(eRectPoint == RP_MT || eRectPoint == RP_MM || eRectPoint == RP_MB)
+ {
+ // Mittig
+ fLeftBound = (rVol.GetWidth() / 2.0)
+ - ((double)aLogicalSize.Width() / 2.0);
+ }
+ else
+ {
+ // Rechts aligned starten
+ fLeftBound = rVol.GetWidth()
+ - (double)aLogicalSize.Width();
+ }
+
+ // Horizontal
+ if(eRectPoint == RP_LT || eRectPoint == RP_MT || eRectPoint == RP_RT)
+ {
+ // Top aligned starten
+ fTopBound = 0.0;
+ }
+ else if(eRectPoint == RP_LM || eRectPoint == RP_MM || eRectPoint == RP_RM)
+ {
+ // Mittig
+ fTopBound = (rVol.GetHeight() / 2.0)
+ - ((double)aLogicalSize.Height() / 2.0);
+ }
+ else
+ {
+ // Bottom aligned starten
+ fTopBound = rVol.GetHeight()
+ - (double)aLogicalSize.Height();
+ }
+
+ // Verschieben
+ aTranslateVector.X() = fLeftBound;
+ aTranslateVector.Y() = fTopBound;
+
+ // Offset beachten
+ if(nOffPosX || nOffPosY)
+ {
+ aTranslateVector.X() += (double)aLogicalSize.Width() * ((double)nOffPosX / 100.0);
+ aTranslateVector.Y() += (double)aLogicalSize.Height() * ((double)nOffPosY / 100.0);
+ }
+ }
+ else
+ {
+ if(bStretch)
+ {
+ // 1x drauflegen, alles wie gehabt
+ // fertig
+ aScaleVector.X() = 1.0;
+ aScaleVector.Y() = 1.0;
+ }
+ else
+ {
+ // nur einmal benutzen
+ eWrapX = Base3DTextureSingle;
+ eWrapY = Base3DTextureSingle;
+
+ // Groesse beachten, zentriert anlegen
+ double fLeftBound = (rVol.GetWidth() / 2.0)
+ - ((double)aLogicalSize.Width() / 2.0);
+ double fTopBound = (rVol.GetHeight() / 2.0)
+ - ((double)aLogicalSize.Height() / 2.0);
+
+ // Verschieben
+ aTranslateVector.X() = fLeftBound;
+ aTranslateVector.Y() = fTopBound;
+ }
+ }
+
+ // TranslateVector anpassen
+ if(aTranslateVector.X())
+ aTranslateVector.X() /= -rVol.GetWidth();
+ if(aTranslateVector.Y())
+ aTranslateVector.Y() /= -rVol.GetHeight();
+
+ // Texturtransformation setzen
+ mTexture.Translate(aTranslateVector);
+ mTexture.Scale(aScaleVector);
+ }
+ else if(eFillStyle == XFILL_GRADIENT)
+ {
+ TextureAttributesGradient aTexAttr(
+ (void*)&rSet.Get(XATTR_FILLGRADIENT),
+ (void*)&rSet.Get(XATTR_GRADIENTSTEPCOUNT));
+
+ pTexture = pBase3D->ObtainTexture(aTexAttr);
+ if(!pTexture)
+ {
+ Bitmap aBmp = GetGradientBitmap(rSet);
+
+ if(bGhosted)
+ {
+ aBmp.Adjust( 50 );
+ }
+
+ pTexture = pBase3D->ObtainTexture(aTexAttr, aBmp);
+ }
+ }
+ else if(eFillStyle == XFILL_HATCH)
+ {
+ TextureAttributesHatch aTexAttr(
+ (void*)&rSet.Get(XATTR_FILLHATCH));
+
+ pTexture = pBase3D->ObtainTexture(aTexAttr);
+ if(!pTexture)
+ {
+ Bitmap aBmp = GetHatchBitmap(rSet);
+
+ if(bGhosted)
+ {
+ aBmp.Adjust( 50 );
+ }
+
+ pTexture = pBase3D->ObtainTexture(aTexAttr, aBmp);
+ }
+
+ // Texturtransformation setzen
+ mTexture.Scale(Vector3D(20.0, 20.0, 20.0));
+ }
+ else // if(eFillStyle == XFILL_SOLID)
+ {
+ // Material setzen
+ pBase3D->SetMaterial(aColorSolid, Base3DMaterialAmbient);
+ pBase3D->SetMaterial(aColorSolidWithTransparency, Base3DMaterialDiffuse);
+ if(GetUseDifferentBackMaterial())
+ {
+ pBase3D->SetMaterial(aBackMaterial.GetMaterial(Base3DMaterialAmbient), Base3DMaterialAmbient, Base3DMaterialBack);
+ pBase3D->SetMaterial(aBackMaterial.GetMaterial(Base3DMaterialDiffuse), Base3DMaterialDiffuse, Base3DMaterialBack);
+ }
+ pBase3D->SetRenderMode(Base3DRenderFill);
+ }
+
+ // Textur verwenden?
+ if(pTexture)
+ {
+ // Einige Modi einstellen
+ pTexture->SetTextureKind(GetTextureKind());
+ pTexture->SetTextureMode(GetTextureMode());
+ pTexture->SetTextureFilter(GetFilterTexture() ? Base3DTextureLinear : Base3DTextureNearest);
+
+ pTexture->SetTextureWrapS(eWrapX);
+ pTexture->SetTextureWrapT(eWrapY);
+
+ pTexture->SetBlendColor(aColorSolid);
+ pTexture->SetTextureColor(aColorSolid);
+
+ // Textur aktivieren
+ pBase3D->SetActiveTexture(pTexture);
+ pBase3D->SetRenderMode(Base3DRenderFill);
+
+ // Texturtransformation setzen
+ GetScene()->GetCameraSet().SetTexture(mTexture);
+ }
+ else
+ {
+ // Reset auf Standardwerte
+ pBase3D->SetActiveTexture();
+ }
+ }
+ else
+ {
+ bDrawObject = FALSE;
+ }
+ }
+ else
+ {
+ bDrawObject = FALSE;
+ }
+ }
+
+ bDrawOutline = (nDrawFlags & E3D_DRAWFLAG_OUTLINE);
+ if(bDrawOutline)
+ {
+ XLineStyle aLineStyle(XLINE_NONE);
+ const XLineAttrSetItem* pLineAttr = GetLineAttr();
+ if(pLineAttr && !rOut.GetIgnoreLineStyle())
+ {
+ Color aColorLine(COL_WHITE);
+ const SfxItemSet &rSet = pLineAttr->GetItemSet();
+ UINT16 nLineTransparence = ITEMVALUE( rSet, XATTR_LINETRANSPARENCE, XLineTransparenceItem );
+
+ if(
+ (nLineTransparence && (nDrawFlags & E3D_DRAWFLAG_TRANSPARENT))
+ || (!nLineTransparence && !(nDrawFlags & E3D_DRAWFLAG_TRANSPARENT)))
+ {
+ aColorLine = ((const XLineColorItem&) (rSet.Get(XATTR_LINECOLOR))).GetValue();
+
+ if(bGhosted)
+ {
+ aColorLine = Color( (aColorLine.GetRed() >> 1) + 0x80,
+ (aColorLine.GetGreen() >> 1) + 0x80,
+ (aColorLine.GetBlue() >> 1) + 0x80);
+ }
+
+ aColorLine.SetTransparency((UINT8)(nLineTransparence * 255 / 100));
+ aLineStyle = ((const XLineStyleItem&) (rSet.
+ Get(XATTR_LINESTYLE))).GetValue();
+ INT32 nLineWidth = ((const XLineWidthItem&) (rSet.
+ Get(XATTR_LINEWIDTH))).GetValue();
+ if(nLineWidth && !rOut.GetIgnoreLineAttr())
+ {
+ Point aPnt(nLineWidth, 0);
+ aPnt = pBase3D->GetOutputDevice()->LogicToPixel(aPnt)
+ - pBase3D->GetOutputDevice()->LogicToPixel(Point());
+ if(aPnt.X() <= 0)
+ aPnt.X() = 1;
+ pBase3D->SetLineWidth((double)aPnt.X());
+ }
+ else
+ {
+ pBase3D->SetLineWidth(1.0);
+ }
+
+ // Material setzen
+ pBase3D->SetColor(aColorLine);
+ }
+ else
+ {
+ bDrawOutline = FALSE;
+ }
+ }
+
+ // Muss auch eine Outline des Objektes generiert werden?
+ if(bDrawOutline)
+ bDrawOutline = (aLineStyle != XLINE_NONE);
+
+ // Spezieller Modus, falls in Schwarz/Weiss gezeichnet werden soll.
+ // Die Linienfarbe ist bereits auf Schwarz gesetzt (Base3d::SetColor())
+ if(!bDrawOutline && pBase3D->GetOutputDevice()->GetDrawMode() & DRAWMODE_WHITEFILL)
+ bDrawOutline = TRUE;
+ }
+
+ if(bDrawObject || bDrawOutline)
+ {
+ // ObjectTrans setzen
+ Matrix4D mTransform = GetFullTransform();
+ GetScene()->GetCameraSet().SetObjectTrans(mTransform);
+ pBase3D->SetTransformationSet(&(GetScene()->GetCameraSet()));
+ }
+}
+
+/*************************************************************************
+|*
+|* Transformation auf die Geometrie anwenden
+|*
+\************************************************************************/
+
+void E3dCompoundObject::ApplyTransform(const Matrix4D& rMatrix)
+{
+ // call parent
+ E3dObject::ApplyTransform(rMatrix);
+
+ // Anwenden auf subobjekte (alte Geometrie)
+ ULONG nObjCnt = pSub->GetObjCount();
+ aLocalBoundVol = Volume3D();
+
+ for (ULONG i = 0; i < nObjCnt; i++)
+ {
+ E3dObject *p3DObj = (E3dObject*) pSub->GetObj(i);
+
+ if ( p3DObj->IsPartOfParent() )
+ aLocalBoundVol.Union(p3DObj->GetLocalBoundVolume());
+ }
+
+ // Geometrie herstellen
+ if(!bGeometryValid)
+ ReCreateGeometry();
+
+ // Matrix auch auf die neue Geometrie anwenden
+ aDisplayGeometry.Transform(rMatrix);
+
+ // LocalBoundVol neu aufbauen
+ aLocalBoundVol = aDisplayGeometry.GetBoundVolume();
+}
+
+/*************************************************************************
+|*
+|* Hittest fuer 3D-Objekte, wird an Geometrie weitergegeben
+|*
+\************************************************************************/
+
+SdrObject* E3dCompoundObject::CheckHit(const Point& rPnt, USHORT nTol,
+ const SetOfByte* pVisiLayer) const
+{
+ E3dPolyScene* pScene = (E3dPolyScene*)GetScene();
+ if(pScene)
+ {
+ // HitLine holen in ObjektKoordinaten
+ // ObjectTrans setzen
+ Matrix4D mTransform = ((E3dCompoundObject*)this)->GetFullTransform();
+ pScene->GetCameraSet().SetObjectTrans(mTransform);
+
+ // HitPoint Front und Back erzeugen und umrechnen
+ Vector3D aFront(rPnt.X(), rPnt.Y(), 0.0);
+ Vector3D aBack(rPnt.X(), rPnt.Y(), ZBUFFER_DEPTH_RANGE);
+ aFront = pScene->GetCameraSet().ViewToObjectCoor(aFront);
+ aBack = pScene->GetCameraSet().ViewToObjectCoor(aBack);
+
+ const Volume3D& rBoundVol = ((E3dCompoundObject*)this)->GetBoundVolume();
+ if(rBoundVol.IsValid())
+ {
+ double fXMax = aFront.X();
+ double fXMin = aBack.X();
+
+ if(fXMax < fXMin)
+ {
+ fXMax = aBack.X();
+ fXMin = aFront.X();
+ }
+
+ if(rBoundVol.MinVec().X() <= fXMax && rBoundVol.MaxVec().X() >= fXMin)
+ {
+ double fYMax = aFront.Y();
+ double fYMin = aBack.Y();
+
+ if(fYMax < fYMin)
+ {
+ fYMax = aBack.Y();
+ fYMin = aFront.Y();
+ }
+
+ if(rBoundVol.MinVec().Y() <= fYMax && rBoundVol.MaxVec().Y() >= fYMin)
+ {
+ double fZMax = aFront.Z();
+ double fZMin = aBack.Z();
+
+ if(fZMax < fZMin)
+ {
+ fZMax = aBack.Z();
+ fZMin = aFront.Z();
+ }
+
+ if(rBoundVol.MinVec().Z() <= fZMax && rBoundVol.MaxVec().Z() >= fZMin)
+ {
+ // Geometrie herstellen
+ if(!bGeometryValid)
+ ((E3dCompoundObject*)this)->ReCreateGeometry();
+
+ // 3D Volumes schneiden sich, teste in der Geometrie
+ // auf Basis der Projektion weiter
+ if(((E3dCompoundObject*)this)->aDisplayGeometry.CheckHit(aFront, aBack, nTol) != -1L)
+ return ((E3dCompoundObject*)this);
+ }
+ }
+ }
+ }
+ }
+ return NULL;
+}
+
+/*************************************************************************
+|*
+|* Geometrie des Objektes auf angegebenen Punkt zentrieren
+|*
+\************************************************************************/
+
+void E3dCompoundObject::CenterObject(const Vector3D& rCenter)
+{
+ // Geometrie herstellen
+ if(!bGeometryValid)
+ ReCreateGeometry();
+
+ Vector3D aOldCenter = aDisplayGeometry.GetCenter();
+ Vector3D aMoveVector = rCenter - aOldCenter;
+ Matrix4D aTransMat;
+
+ aTransMat.Translate(aMoveVector);
+ ApplyTransform(aTransMat);
+}
+
+/*************************************************************************
+|*
+|* Schattenattribute holen
+|*
+\************************************************************************/
+
+Color E3dCompoundObject::GetShadowColor()
+{
+ Color aShadCol;
+
+ if (pShadAttr!=NULL)
+ {
+ const SdrShadowColorItem& rShadColItem=((SdrShadowColorItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWCOLOR)));
+ aShadCol = rShadColItem.GetValue();
+ }
+
+ return aShadCol;
+}
+
+BOOL E3dCompoundObject::DrawShadowAsOutline()
+{
+ BOOL bRetval = FALSE;
+
+ if (pShadAttr!=NULL)
+ {
+ BOOL bFillAttrIsNone = TRUE;
+ if (pFillAttr!=NULL)
+ {
+ XFillStyle eFillStyle=((XFillStyleItem&)(pFillAttr->GetItemSet().Get(XATTR_FILLSTYLE))).GetValue();
+ if (eFillStyle!=XFILL_NONE)
+ bFillAttrIsNone = FALSE;
+ }
+
+ BOOL bLineAttrIsNone = TRUE;
+ if (pLineAttr!=NULL)
+ {
+ XLineStyle eLineStyle=((XLineStyleItem&)(pLineAttr->GetItemSet().Get(XATTR_LINESTYLE))).GetValue();
+ if (eLineStyle!=XLINE_NONE)
+ bLineAttrIsNone = FALSE;
+ }
+
+ bRetval = bFillAttrIsNone && !bLineAttrIsNone;
+ }
+
+ return bRetval;
+}
+
+INT32 E3dCompoundObject::GetShadowXDistance()
+{
+ return (long)((SdrShadowXDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWXDIST))).GetValue();
+}
+
+INT32 E3dCompoundObject::GetShadowYDistance()
+{
+ return (long)((SdrShadowYDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWYDIST))).GetValue();
+}
+
+UINT16 E3dCompoundObject::GetShadowTransparence()
+{
+ return (UINT16)((SdrShadowTransparenceItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue();
+}
+
+BOOL E3dCompoundObject::DoDrawShadow()
+{
+ BOOL bRetval = FALSE;
+
+ if (pShadAttr!=NULL)
+ {
+ FASTBOOL bShadOn=((SdrShadowItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOW))).GetValue();
+ if (bShadOn) {
+ bRetval = TRUE;
+
+ // Eventuell bRetval auf FALSE falls nicht gefuellt und
+ // kein Linienstil!
+ if(!pFillAttr
+ || ((XFillStyleItem&)(pFillAttr->GetItemSet().Get(XATTR_FILLSTYLE))).GetValue() == XFILL_NONE)
+ {
+ if(!pLineAttr
+ || ((XLineStyleItem&)(pLineAttr->GetItemSet().Get(XATTR_LINESTYLE))).GetValue() == XLINE_NONE)
+ {
+ bRetval = FALSE;
+ }
+ }
+ }
+ }
+ return bRetval;
+}
+
+/*************************************************************************
+|*
+|* Objekt als WireFrame zeichnen
+|*
+\************************************************************************/
+
+void E3dCompoundObject::DrawObjectWireframe(ExtOutputDevice& rXOut)
+{
+ UINT32 nPolyCounter = 0;
+ UINT32 nEntityCounter = 0;
+ UINT32 nUpperBound;
+ Point aFirstPoint, aLastPoint, aNewPoint;
+ B3dEntityBucket& rEntityBucket = GetDisplayGeometry().GetEntityBucket();
+ GeometryIndexValueBucket& rIndexBucket = GetDisplayGeometry().GetIndexBucket();
+ B3dTransformationSet& rSet = GetScene()->GetCameraSet();
+ BOOL bDrawLine, bLastDrawLine;
+ Vector3D aPoint;
+
+ while(nPolyCounter < rIndexBucket.Count())
+ {
+ // Naechstes Primitiv
+ nUpperBound = rIndexBucket[nPolyCounter++].GetIndex();
+ bDrawLine = bLastDrawLine = rEntityBucket[nEntityCounter].IsEdgeVisible();
+ aPoint = rSet.ObjectToViewCoor(rEntityBucket[nEntityCounter++].Point().GetVector3D());
+ aFirstPoint.X() = (long)(aPoint.X() + 0.5);
+ aFirstPoint.Y() = (long)(aPoint.Y() + 0.5);
+ aLastPoint = aFirstPoint;
+
+ // Polygon fuellen
+ while(nEntityCounter < nUpperBound)
+ {
+ // Punkt holen und auf Weltkoordinaten umrechnen
+ bDrawLine = rEntityBucket[nEntityCounter].IsEdgeVisible();
+ aPoint = rSet.ObjectToViewCoor(rEntityBucket[nEntityCounter++].Point().GetVector3D());
+ aNewPoint.X() = (long)(aPoint.X() + 0.5);
+ aNewPoint.Y() = (long)(aPoint.Y() + 0.5);
+ if(bLastDrawLine)
+ rXOut.GetOutDev()->DrawLine(aLastPoint, aNewPoint);
+ aLastPoint = aNewPoint;
+ bLastDrawLine = bDrawLine;
+ }
+
+ // Polygon scliessen
+ if(bLastDrawLine)
+ rXOut.GetOutDev()->DrawLine(aLastPoint, aFirstPoint);
+ }
+}
+
+/*************************************************************************
+|*
+|* Ein Segment fuer Extrude oder Lathe erzeugen
+|*
+\************************************************************************/
+
+void E3dCompoundObject::CreateSegment(
+ const PolyPolygon3D& rFront, // vorderes Polygon
+ const PolyPolygon3D& rBack, // hinteres Polygon
+ const PolyPolygon3D* pPrev, // smooth uebergang zu Vorgaenger
+ const PolyPolygon3D* pNext, // smooth uebergang zu Nachfolger
+ BOOL bCreateFront, // vorderen Deckel erzeugen
+ BOOL bCreateBack, // hinteren Deckel erzeugen
+ double fPercentDiag, // Anteil des Deckels an der Tiefe
+ BOOL bSmoothLeft, // Glaetten der umlaufenden Normalen links
+ BOOL bSmoothRight, // Glaetten der umlaufenden Normalen rechts
+ BOOL bSmoothFrontBack, // Glaetten der Abschlussflaechen
+ double fSurroundFactor, // Wertebereich der Texturkoordinaten im Umlauf
+ double fTextureStart, // TexCoor ueber Extrude-Tiefe
+ double fTextureDepth, // TexCoor ueber Extrude-Tiefe
+ BOOL bCreateTexture,
+ BOOL bCreateNormals,
+ BOOL bCharacterExtrude, // FALSE=exakt, TRUE=ohne Ueberschneidungen
+ BOOL bRotateTexture90 // Textur der Seitenflaechen um 90 Grad kippen
+ )
+{
+ PolyPolygon3D aNormalsLeft, aNormalsRight;
+ AddInBetweenNormals(rFront, rBack, aNormalsLeft, bSmoothLeft);
+ AddInBetweenNormals(rFront, rBack, aNormalsRight, bSmoothRight);
+ Vector3D aOffset = rBack.GetMiddle() - rFront.GetMiddle();
+
+ // Ausnahmen: Nicht geschlossen
+ if(!rFront.IsClosed())
+ {
+ bCreateFront = FALSE;
+ }
+ if(!rBack.IsClosed())
+ {
+ bCreateBack = FALSE;
+ }
+
+ // Ausnahmen: Einfache Linie
+ if(rFront[0].GetPointCount() < 3 || (!bCreateFront && !bCreateBack))
+ {
+ fPercentDiag = 0.0;
+ }
+
+ if(fPercentDiag == 0.0)
+ {
+ // Ohne Schraegen, Vorderseite
+ if(bCreateFront)
+ {
+ PolyPolygon3D aNormalsFront;
+ AddFrontNormals(rFront, aNormalsFront, aOffset);
+
+ if(!bSmoothFrontBack)
+ CreateFront(rFront, aNormalsFront, bCreateNormals, bCreateTexture);
+ if(bSmoothLeft)
+ AddFrontNormals(rFront, aNormalsLeft, aOffset);
+ if(bSmoothFrontBack)
+ CreateFront(rFront, aNormalsLeft, bCreateNormals, bCreateTexture);
+ }
+ else
+ {
+ if(pPrev)
+ AddInBetweenNormals(*pPrev, rFront, aNormalsLeft, bSmoothLeft);
+ }
+
+ // Ohne Schraegen, Rueckseite
+ if(bCreateBack)
+ {
+ PolyPolygon3D aNormalsBack;
+ AddBackNormals(rBack, aNormalsBack, aOffset);
+
+ if(!bSmoothFrontBack)
+ CreateBack(rBack, aNormalsBack, bCreateNormals, bCreateTexture);
+ if(bSmoothRight)
+ AddBackNormals(rBack, aNormalsRight, aOffset);
+ if(bSmoothFrontBack)
+ CreateBack(rBack, aNormalsRight, bCreateNormals, bCreateTexture);
+ }
+ else
+ {
+ if(pNext)
+ AddInBetweenNormals(rBack, *pNext, aNormalsRight, bSmoothRight);
+ }
+
+ // eigentliches Zwischenstueck
+ CreateInBetween(rFront, rBack,
+ aNormalsLeft, aNormalsRight,
+ bCreateNormals,
+ fSurroundFactor,
+ fTextureStart,
+ fTextureDepth,
+ bRotateTexture90);
+ }
+ else
+ {
+ // Mit Scraegen, Vorderseite
+ PolyPolygon3D aLocalFront = rFront;
+ PolyPolygon3D aLocalBack = rBack;
+ double fExtrudeDepth, fDiagLen;
+ double fTexMidStart = fTextureStart;
+ double fTexMidDepth = fTextureDepth;
+
+ if(bCreateFront || bCreateBack)
+ {
+ fExtrudeDepth = aOffset.GetLength();
+ fDiagLen = fPercentDiag * fExtrudeDepth;
+ }
+
+ if(bCreateFront)
+ {
+ PolyPolygon3D aOuterFront;
+ PolyPolygon3D aNormalsOuterFront;
+ AddFrontNormals(aLocalFront, aNormalsOuterFront, aOffset);
+
+ if(bCharacterExtrude)
+ {
+ // Polygon kopieren
+ aOuterFront = aLocalFront;
+
+ // notwendige Normalen erzeugen
+ PolyPolygon3D aGrowDirection;
+ AddInBetweenNormals(aLocalFront, aLocalBack, aGrowDirection, bSmoothLeft);
+
+ // Groesse inneres Polygon merken
+ Volume3D aOldSize(aLocalFront.GetPolySize());
+
+ // Inneres Polygon vergroessern
+ GrowPoly(aLocalFront, aGrowDirection, fDiagLen);
+
+ // Inneres Polygon nach innen verschieben
+ GrowPoly(aLocalFront, aNormalsOuterFront, -fDiagLen);
+
+ // Neue Groesse inneres Polygon feststellen
+ Volume3D aNewSize(aLocalFront.GetPolySize());
+
+ // Skalierung feststellen (nur X,Y)
+ Vector3D aScaleVec(aOldSize.GetWidth() / aNewSize.GetWidth(),
+ aOldSize.GetHeight() / aNewSize.GetHeight(),
+ 1.0);
+
+ // Transformation bilden
+ Matrix4D aTransMat;
+ aTransMat.Scale(aScaleVec);
+
+ // aeusseres und inneres Polygon skalieren
+ aLocalFront.Transform(aTransMat);
+ aOuterFront.Transform(aTransMat);
+
+ // Neue Groesse aktualisieren
+ aNewSize = aLocalFront.GetPolySize();
+
+ // Translation feststellen
+ Vector3D aTransVec(aOldSize.MinVec().X() - aNewSize.MinVec().X(),
+ aOldSize.MinVec().Y() - aNewSize.MinVec().Y(),
+ 0.0);
+
+ // Transformation bilden
+ aTransMat.Identity();
+ aTransMat.Translate(aTransVec);
+
+ // aeusseres und inneres Polygon skalieren
+ aLocalFront.Transform(aTransMat);
+ aOuterFront.Transform(aTransMat);
+ }
+ else
+ {
+ // Polygon kopieren
+ aOuterFront = aLocalFront;
+
+ // notwendige Normalen erzeugen
+ PolyPolygon3D aGrowDirection;
+ AddInBetweenNormals(aLocalFront, aLocalBack, aGrowDirection, bSmoothLeft);
+
+ // Aeusseres Polygon verkleinern
+ GrowPoly(aOuterFront, aGrowDirection, -fDiagLen);
+ aOuterFront.CorrectGrownPoly(aLocalFront);
+
+ // Inneres Polygon nach innen verschieben
+ GrowPoly(aLocalFront, aNormalsOuterFront, -fDiagLen);
+ }
+
+ // eventuell noch glaetten
+ if(bSmoothLeft)
+ {
+ if(bSmoothFrontBack)
+ AddInBetweenNormals(aOuterFront, aLocalFront, aNormalsOuterFront, bSmoothLeft);
+ AddInBetweenNormals(aOuterFront, aLocalFront, aNormalsLeft, bSmoothLeft);
+ }
+
+ // vordere Zwischenstuecke erzeugen
+ CreateInBetween(aOuterFront, aLocalFront,
+ aNormalsOuterFront, aNormalsLeft,
+ bCreateNormals,
+ fSurroundFactor,
+ fTextureStart,
+ fTextureDepth * fPercentDiag,
+ bRotateTexture90);
+
+ // Vorderseite erzeugen
+ CreateFront(aOuterFront, aNormalsOuterFront, bCreateNormals, bCreateTexture);
+
+ // Weitere Texturwerte setzen
+ fTexMidStart += fTextureDepth * fPercentDiag;
+ fTexMidDepth -= fTextureDepth * fPercentDiag;
+ }
+ else
+ {
+ if(pPrev)
+ AddInBetweenNormals(*pPrev, rFront, aNormalsLeft, bSmoothLeft);
+ }
+
+ // Mit Scraegen, Rueckseite
+ if(bCreateBack)
+ {
+ PolyPolygon3D aOuterBack;
+ PolyPolygon3D aNormalsOuterBack;
+ AddBackNormals(aLocalBack, aNormalsOuterBack, aOffset);
+
+ if(bCharacterExtrude)
+ {
+ // Polygon kopieren
+ aOuterBack = aLocalBack;
+
+ // notwendige Normalen erzeugen
+ PolyPolygon3D aGrowDirection;
+ AddInBetweenNormals(aLocalFront, aLocalBack, aGrowDirection, bSmoothRight);
+
+ // Groesse inneres Polygon merken
+ Volume3D aOldSize(aLocalBack.GetPolySize());
+
+ // Inneres Polygon vergroessern
+ GrowPoly(aLocalBack, aGrowDirection, fDiagLen);
+
+ // Inneres Polygon nach innen verschieben
+ GrowPoly(aLocalBack, aNormalsOuterBack, -fDiagLen);
+
+ // Neue Groesse inneres Polygon feststellen
+ Volume3D aNewSize(aLocalBack.GetPolySize());
+
+ // Skalierung feststellen (nur X,Y)
+ Vector3D aScaleVec(aOldSize.GetWidth() / aNewSize.GetWidth(),
+ aOldSize.GetHeight() / aNewSize.GetHeight(),
+ 1.0);
+
+ // Transformation bilden
+ Matrix4D aTransMat;
+ aTransMat.Scale(aScaleVec);
+
+ // aeusseres und inneres Polygon skalieren
+ aLocalBack.Transform(aTransMat);
+ aOuterBack.Transform(aTransMat);
+
+ // Neue Groesse aktualisieren
+ aNewSize = aLocalBack.GetPolySize();
+
+ // Translation feststellen
+ Vector3D aTransVec(aOldSize.MinVec().X() - aNewSize.MinVec().X(),
+ aOldSize.MinVec().Y() - aNewSize.MinVec().Y(),
+ 0.0);
+
+ // Transformation bilden
+ aTransMat.Identity();
+ aTransMat.Translate(aTransVec);
+
+ // aeusseres und inneres Polygon skalieren
+ aLocalBack.Transform(aTransMat);
+ aOuterBack.Transform(aTransMat);
+ }
+ else
+ {
+ // Polygon kopieren
+ aOuterBack = aLocalBack;
+
+ // notwendige Normalen erzeugen
+ PolyPolygon3D aGrowDirection;
+ AddInBetweenNormals(aLocalFront, aLocalBack, aGrowDirection, bSmoothRight);
+
+ // Aeusseres Polygon verkleinern
+ GrowPoly(aOuterBack, aGrowDirection, -fDiagLen);
+ aOuterBack.CorrectGrownPoly(aLocalBack);
+
+ // Inneres Polygon nach innen verschieben
+ GrowPoly(aLocalBack, aNormalsOuterBack, -fDiagLen);
+ }
+
+ // eventuell noch glaetten
+ if(bSmoothRight)
+ {
+ if(bSmoothFrontBack)
+ AddInBetweenNormals(aLocalBack, aOuterBack, aNormalsOuterBack, bSmoothRight);
+ AddInBetweenNormals(aLocalBack, aOuterBack, aNormalsRight, bSmoothRight);
+ }
+
+ // vordere Zwischenstuecke erzeugen
+ // hintere Zwischenstuecke erzeugen
+ CreateInBetween(aLocalBack, aOuterBack,
+ aNormalsRight, aNormalsOuterBack,
+ bCreateNormals,
+ fSurroundFactor,
+ fTextureStart + (fTextureDepth * (1.0 - fPercentDiag)),
+ fTextureDepth * fPercentDiag,
+ bRotateTexture90);
+
+ // Rueckseite erzeugen
+ CreateBack(aOuterBack, aNormalsOuterBack, bCreateNormals, bCreateTexture);
+
+ // Weitere Texturwerte setzen
+ fTexMidDepth -= fTextureDepth * fPercentDiag;
+ }
+ else
+ {
+ if(pNext)
+ AddInBetweenNormals(rBack, *pNext, aNormalsRight, bSmoothRight);
+ }
+
+ // eigentliches Zwischenstueck
+ CreateInBetween(aLocalFront, aLocalBack,
+ aNormalsLeft, aNormalsRight,
+ bCreateNormals,
+ fSurroundFactor,
+ fTexMidStart,
+ fTexMidDepth,
+ bRotateTexture90);
+ }
+}
+
+/*************************************************************************
+|*
+|* Parameter Geometrieerzeugung setzen
+|*
+\************************************************************************/
+
+void E3dCompoundObject::SetDoubleSided (BOOL bNew)
+{
+ if(bDoubleSided != bNew)
+ {
+ bDoubleSided = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCompoundObject::SetCreateNormals(BOOL bNew)
+{
+ if(bCreateNormals != bNew)
+ {
+ bCreateNormals = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCompoundObject::SetCreateTexture(BOOL bNew)
+{
+ if(bCreateTexture != bNew)
+ {
+ bCreateTexture = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCompoundObject::SetUseStdNormals(BOOL bNew)
+{
+ if(bUseStdNormals != bNew)
+ {
+ bUseStdNormals = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCompoundObject::SetUseStdNormalsUseSphere(BOOL bNew)
+{
+ if(bUseStdNormalsUseSphere != bNew)
+ {
+ bUseStdNormalsUseSphere = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCompoundObject::SetInvertNormals(BOOL bNew)
+{
+ if(bInvertNormals != bNew)
+ {
+ bInvertNormals = bNew;
+ GetDisplayGeometry().InvertNormals();
+ }
+}
+
+void E3dCompoundObject::SetUseStdTextureX(BOOL bNew)
+{
+ if(bUseStdTextureX != bNew)
+ {
+ bUseStdTextureX = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCompoundObject::SetUseStdTextureXUseSphere(BOOL bNew)
+{
+ if(bUseStdTextureXUseSphere != bNew)
+ {
+ bUseStdTextureXUseSphere = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCompoundObject::SetUseStdTextureY(BOOL bNew)
+{
+ if(bUseStdTextureY != bNew)
+ {
+ bUseStdTextureY = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dCompoundObject::SetUseStdTextureYUseSphere(BOOL bNew)
+{
+ if(bUseStdTextureYUseSphere != bNew)
+ {
+ bUseStdTextureYUseSphere = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+/*************************************************************************
+|*
+|* DisplayGeometry rausruecken
+|*
+\************************************************************************/
+
+B3dGeometry& E3dCompoundObject::GetDisplayGeometry()
+{
+ // Geometrie herstellen
+ if(!bGeometryValid)
+ ReCreateGeometry();
+
+ return aDisplayGeometry;
+}
+
+/*************************************************************************
+|*
+|* Material des Objektes
+|*
+\************************************************************************/
+
+void E3dCompoundObject::SetFrontMaterial(const B3dMaterial& rNew)
+{
+ if(aFrontMaterial != rNew)
+ {
+ aFrontMaterial = rNew;
+ }
+}
+
+void E3dCompoundObject::SetBackMaterial(const B3dMaterial& rNew)
+{
+ if(aBackMaterial != rNew)
+ {
+ aBackMaterial = rNew;
+ }
+}
+
+void E3dCompoundObject::SetUseDifferentBackMaterial(BOOL bNew)
+{
+ if(bUseDifferentBackMaterial != bNew)
+ {
+ bUseDifferentBackMaterial = bNew;
+ }
+}
+
+/*************************************************************************
+|*
+|* Texturattribute
+|*
+\************************************************************************/
+
+void E3dCompoundObject::SetTextureKind(Base3DTextureKind eNew)
+{
+ if(eTextureKind != eNew)
+ {
+ eTextureKind = eNew;
+ }
+}
+
+void E3dCompoundObject::SetTextureMode(Base3DTextureMode eNew)
+{
+ if(eTextureMode != eNew)
+ {
+ eTextureMode = eNew;
+ }
+}
+
+void E3dCompoundObject::SetFilterTexture(BOOL bNew)
+{
+ if(bFilterTexture != bNew)
+ {
+ bFilterTexture = bNew;
+ }
+}
+
+/*************************************************************************
+|*
+|* 3D Ausgabe
+|*
+\************************************************************************/
+
+void E3dCompoundObject::Paint3D(ExtOutputDevice& rOut, Base3D* pBase3D,
+ const SdrPaintInfoRec& rInfoRec, UINT16 nDrawFlags)
+{
+ // call parent, draw all subobjects
+ E3dObject::Paint3D(rOut, pBase3D, rInfoRec, nDrawFlags);
+
+ // Feststellen, ob das Objekt dargestellt werden muss, was die Layer angeht
+ BOOL bPrinter = (pBase3D->GetOutputDevice()->GetOutDevType()==OUTDEV_PRINTER);
+ const SetOfByte* pVisiLayer=&rInfoRec.aPaintLayer;
+ E3dScene* pScene = GetScene();
+ BOOL bOnlySelectedCriteria = (pScene && (!pScene->DoDrawOnlySelected() || GetSelected()));
+
+ if((!bPrinter || IsPrintable()) && pVisiLayer->IsSet(GetLayer()) && bOnlySelectedCriteria)
+ {
+ // Ausgabeparameter setzen
+ BOOL bDrawOutline;
+ BOOL bDrawObject;
+ SetBase3DParams(rOut, pBase3D, bDrawObject, bDrawOutline, nDrawFlags,
+ (rInfoRec.pPV && rInfoRec.pPV->GetView().DoVisualizeEnteredGroup()) ? rInfoRec.bNotActive : FALSE);
+
+ // Culling?
+ pBase3D->SetCullMode(GetDoubleSided() ? Base3DCullNone : Base3DCullBack);
+
+ // Objekt flat darstellen?
+ BOOL bForceFlat = (bUseStdNormals && !bUseStdNormalsUseSphere);
+ pBase3D->SetForceFlat(bForceFlat);
+
+ // Geometrie ausgeben
+ if(bDrawObject)
+ pBase3D->DrawPolygonGeometry(GetDisplayGeometry());
+
+ // Outline ausgeben
+ if(bDrawOutline && pBase3D->GetLightGroup())
+ {
+ BOOL bLightingWasEnabled = pBase3D->GetLightGroup()->IsLightingEnabled();
+ pBase3D->GetLightGroup()->EnableLighting(FALSE);
+ pBase3D->SetLightGroup(pBase3D->GetLightGroup());
+ pBase3D->DrawPolygonGeometry(GetDisplayGeometry(), TRUE);
+ pBase3D->GetLightGroup()->EnableLighting(bLightingWasEnabled);
+ pBase3D->SetLightGroup(pBase3D->GetLightGroup());
+ }
+ }
+
+#ifdef DBG_UTIL // SnapRect und BoundRect zum testen zeichnen
+ static BOOL bDoDrawSnapBoundToMakeThemVisible = FALSE;
+ if(bDoDrawSnapBoundToMakeThemVisible)
+ {
+ OutputDevice* pOut = rOut.GetOutDev();
+
+ // SnapRect in Rot
+ Rectangle aTempRect = GetSnapRect();
+ pOut->SetLineColor(Color(COL_RED));
+ pOut->SetFillColor();
+ pOut->DrawRect(aTempRect);
+
+ // BoundRect in Gruen
+ aTempRect = GetBoundRect();
+ pOut->SetLineColor(Color(COL_GREEN));
+ pOut->SetFillColor();
+ pOut->DrawRect(aTempRect);
+ }
+#endif
+}
+
+/*************************************************************************
+|*
+|* Objekt als Kontur in das Polygon einfuegen
+|*
+\************************************************************************/
+
+void E3dCompoundObject::TakeContour3D(XPolyPolygon& rPoly)
+{
+ // call parent
+ E3dObject::TakeContour3D(rPoly);
+
+ // Kontur dieses Objektes liefern
+ UINT32 nPolyCounter = 0;
+ UINT32 nEntityCounter = 0;
+ UINT32 nUpperBound;
+ B3dEntityBucket& rEntityBucket = GetDisplayGeometry().GetEntityBucket();
+ GeometryIndexValueBucket& rIndexBucket = GetDisplayGeometry().GetIndexBucket();
+ B3dTransformationSet& rSet = GetScene()->GetCameraSet();
+ Vector3D aPoint;
+ Point aNewPoint;
+
+ // ObjectTrans setzen
+ Matrix4D mTransform = GetFullTransform();
+ rSet.SetObjectTrans(mTransform);
+
+ while(nPolyCounter < rIndexBucket.Count())
+ {
+ // Naechstes Primitiv
+ nUpperBound = rIndexBucket[nPolyCounter++].GetIndex();
+ XPolygon aNewPart(UINT16(nUpperBound - nEntityCounter));
+ UINT16 nIndex = 0;
+
+ while(nEntityCounter < nUpperBound)
+ {
+ aPoint = rSet.ObjectToViewCoor(rEntityBucket[nEntityCounter++].Point().GetVector3D());
+ aNewPart[nIndex ].X() = (long)(aPoint.X() + 0.5);
+ aNewPart[nIndex++].Y() = (long)(aPoint.Y() + 0.5);
+ }
+
+ // Teilprimitiv einfuegen
+ rPoly.Insert(aNewPart);
+ }
+
+ // add shadow now too (#61279#)
+ PolyPolygon aShadowPolyPoly;
+ GetShadowPolygon(aShadowPolyPoly);
+
+ for(UINT16 a = 0; a < aShadowPolyPoly.Count(); a++)
+ {
+ XPolygon aNewPart(aShadowPolyPoly[a]);
+ rPoly.Insert(aNewPart);
+ }
+}
+
+/*************************************************************************
+|*
+|* Schatten fuer 3D-Objekte zeichnen
+|*
+\************************************************************************/
+
+void E3dCompoundObject::DrawShadows(Base3D *pBase3D, ExtOutputDevice& rXOut,
+ const Rectangle& rBound, const Volume3D& rVolume,
+ const SdrPaintInfoRec& rInfoRec)
+{
+ // call parent
+ E3dObject::DrawShadows(pBase3D, rXOut, rBound, rVolume, rInfoRec);
+
+ // Schatten fuer dieses Objekt zeichnen
+ // Feststellen, ob das Objekt dargestellt werden muss, was die Layer angeht
+ BOOL bPrinter = (pBase3D->GetOutputDevice()->GetOutDevType()==OUTDEV_PRINTER);
+ const SetOfByte* pVisiLayer=&rInfoRec.aPaintLayer;
+ if(DoDrawShadow()
+ && (!bPrinter || IsPrintable())
+ && pVisiLayer->IsSet(GetLayer()))
+ {
+ // ObjectTrans setzen
+ Matrix4D mTransform = GetFullTransform();
+ GetScene()->GetCameraSet().SetObjectTrans(mTransform);
+
+ // Schattenpolygon holen
+ PolyPolygon aShadowPoly;
+ GetShadowPolygon(aShadowPoly);
+
+ // ...und Zeichnen
+ DrawShadowPolygon(aShadowPoly, rXOut);
+ }
+}
+
+void E3dCompoundObject::GetShadowPolygon(PolyPolygon& rPoly)
+{
+ INT32 nXDist = GetShadowXDistance();
+ INT32 nYDist = GetShadowYDistance();
+ UINT32 nPolyCounter = 0;
+ UINT32 nEntityCounter = 0;
+ UINT32 nUpperBound;
+ UINT16 nPolyPos = 0;
+ Point aPolyPoint;
+
+ // Buckets der Geometrie holen
+ B3dTransformationSet& rSet = GetScene()->GetCameraSet();
+ B3dEntityBucket& rEntityBucket = GetDisplayGeometry().GetEntityBucket();
+ GeometryIndexValueBucket& rIndexBucket = GetDisplayGeometry().GetIndexBucket();
+
+ if(GetDrawShadow3D())
+ {
+ // 3D Schatten. Nimm Lichtquelle und Ebene. Projiziere
+ // die Punkte und jage sie durch die 3D Darstellung.
+ Vector3D aLampPositionOrDirection;
+ BOOL bDirectionalSource(TRUE);
+ Vector3D aGroundPosition;
+ Vector3D aGroundDirection;
+ B3dLightGroup& rLightGroup = GetScene()->GetLightGroup();
+
+ // Lampe waehlen
+ Base3DLightNumber aLightNumber = Base3DLight0;
+ BOOL bLightNumberValid(FALSE);
+ while(!bLightNumberValid && aLightNumber <= Base3DLight7)
+ {
+ if(rLightGroup.IsEnabled(aLightNumber))
+ bLightNumberValid = TRUE;
+ else
+ aLightNumber = (Base3DLightNumber)((UINT16)aLightNumber + 1);
+ }
+
+ if(bLightNumberValid)
+ {
+ // Position oder Vektor aus der Lampe extrahieren
+ if(rLightGroup.IsDirectionalSource(aLightNumber))
+ {
+ // Nur Richtung vorhanden
+ aLampPositionOrDirection = -rLightGroup.GetDirection(aLightNumber);
+ aLampPositionOrDirection.Normalize();
+ }
+ else
+ {
+ // Nur Position vorhanden
+ aLampPositionOrDirection = rLightGroup.GetPosition(aLightNumber);
+ bDirectionalSource = FALSE;
+ }
+
+ // Ebene holen, Richtung in Augkoordinaten
+ aGroundDirection = -GetScene()->GetShadowPlaneDirection();
+ aGroundDirection.Normalize();
+
+ // Ist die Lampe auch vor der Ebene?
+ Vector3D aLightNormal = aLampPositionOrDirection;
+ if(!bDirectionalSource)
+ {
+ // Nur Position vorhanden, berechne einen Lichtvektor
+ aLightNormal = GetDisplayGeometry().GetEntityBucket()[0].Point().GetVector3D()
+ - aLampPositionOrDirection;
+ aLightNormal.Normalize();
+ }
+
+ double fLightAndNormal = aLightNormal.Scalar(aGroundDirection);
+ B3dVolume aVolume = rSet.GetDeviceVolume();
+
+ // auf Augkoordinaten umstellen
+ double fTemp = aVolume.MinVec().Z();
+ aVolume.MinVec().Z() = -aVolume.MaxVec().Z();
+ aVolume.MaxVec().Z() = -fTemp;
+
+ if(fLightAndNormal > 0.0)
+ {
+ // Position der Ebene in Augkoordinaten setzen
+ aGroundPosition.X() = (aGroundDirection.X() < 0.0) ? aVolume.MinVec().X() : aVolume.MaxVec().X();
+ aGroundPosition.Y() = (aGroundDirection.Y() < 0.0) ? aVolume.MinVec().Y() : aVolume.MaxVec().Y();
+ aGroundPosition.Z() = aVolume.MinVec().Z() - ((aVolume.MaxVec().Z() - aVolume.MinVec().Z()) / 8.0);
+
+ // Skalar der Ebenengleichung holen
+ double fGroundScalar = -aGroundPosition.Scalar(aGroundDirection);
+
+ // ObjectTrans setzen
+ BOOL bPolygonVisible(TRUE);
+ B3dTransformationSet& rSet = GetScene()->GetCameraSet();
+ Matrix4D mTransform = GetFullTransform();
+ rSet.SetObjectTrans(mTransform);
+
+ while(nPolyCounter < rIndexBucket.Count())
+ {
+ // Naechstes Primitiv
+ nUpperBound = rIndexBucket[nPolyCounter++].GetIndex();
+ nPolyPos = 0;
+ bPolygonVisible = TRUE;
+ Polygon aPoly((UINT16)(nUpperBound - nEntityCounter));
+
+ // Polygon fuellen
+ while(nEntityCounter < nUpperBound)
+ {
+ // Naechsten Punkt holen
+ Vector3D aPoint = rEntityBucket[nEntityCounter++].Point().GetVector3D();
+
+ // Auf Augkoordinaten umrechnen
+ aPoint = rSet.ObjectToEyeCoor(aPoint);
+
+ // Richtung bestimmen
+ Vector3D aDirection = aLampPositionOrDirection;
+ if(!bDirectionalSource)
+ {
+ aDirection = aPoint - aLampPositionOrDirection;
+ aDirection.Normalize();
+ }
+
+ // Schnittpunkt berechnen (N.D)
+ double fDiv = aGroundDirection.Scalar(aDirection);
+ if(fabs(fDiv) < SMALL_DVALUE)
+ {
+ bPolygonVisible = FALSE;
+ }
+ else
+ {
+ fDiv = -((fGroundScalar + aGroundDirection.Scalar(aPoint)) / fDiv);
+ aPoint += aDirection * fDiv;
+ }
+
+ // Punkt normal transformieren
+ if(bPolygonVisible)
+ {
+ // Auf ViewKoordinaten
+ Vector3D aShadowPoint = rSet.EyeToViewCoor(aPoint);
+ aPolyPoint.X() = (long)(aShadowPoint.X() + 0.5) + nXDist;
+ aPolyPoint.Y() = (long)(aShadowPoint.Y() + 0.5) + nYDist;
+ aPoly[nPolyPos++] = aPolyPoint;
+ }
+ }
+
+ // Teilpolygon einfuegen
+ rPoly.Insert(aPoly);
+ }
+ }
+ }
+ }
+ else
+ {
+ // Normaler 2D Schatten
+ Vector3D aPoint;
+
+ // ObjectTrans setzen
+ Matrix4D mTransform = GetFullTransform();
+ rSet.SetObjectTrans(mTransform);
+
+ if(DrawShadowAsOutline())
+ {
+ //SubPolygon mit Punktpaaren bilden
+ BOOL bLastLineVisible;
+ UINT16 nPolySize = (UINT16)(rEntityBucket.Count() * 2);
+ Polygon aPoly(nPolySize);
+ Vector3D aLast;
+ Point aLastPolyPoint;
+ nPolyPos = 0;
+
+ while(nPolyCounter < rIndexBucket.Count())
+ {
+ // Naechstes Primitiv
+ nUpperBound = rIndexBucket[nPolyCounter++].GetIndex();
+
+ // Polygon bilden
+ if(bLastLineVisible = rEntityBucket[nUpperBound - 1].IsEdgeVisible())
+ {
+ aLast = rEntityBucket[nUpperBound - 1].Point().GetVector3D();
+ aLast = rSet.ObjectToViewCoor(aLast);
+ aLastPolyPoint.X() = (long)(aLast.X() + 0.5) + nXDist;
+ aLastPolyPoint.Y() = (long)(aLast.Y() + 0.5) + nYDist;
+ }
+
+ while(nEntityCounter < nUpperBound)
+ {
+ aPoint = rEntityBucket[nEntityCounter].Point().GetVector3D();
+ aPoint = rSet.ObjectToViewCoor(aPoint);
+ aPolyPoint.X() = (long)(aPoint.X() + 0.5) + nXDist;
+ aPolyPoint.Y() = (long)(aPoint.Y() + 0.5) + nYDist;
+
+ // Linie aLast, aPoint erfassen
+ if(bLastLineVisible)
+ {
+ if(nPolyPos + 2 > nPolySize)
+ {
+ // Polygon muss groesser
+ nPolySize *= 2;
+ aPoly.SetSize(nPolySize);
+ }
+ aPoly[nPolyPos++] = aLastPolyPoint;
+ aPoly[nPolyPos++] = aPolyPoint;
+ }
+
+ // naechster Punkt
+ aLastPolyPoint = aPolyPoint;
+ aLast = aPoint;
+ bLastLineVisible = rEntityBucket[nEntityCounter++].IsEdgeVisible();
+ }
+ }
+
+ // Wahre Groesse setzen
+ aPoly.SetSize(nPolyPos);
+
+ // Teilpolygon einfuegen
+ rPoly.Insert(aPoly);
+ }
+ else
+ {
+ while(nPolyCounter < rIndexBucket.Count())
+ {
+ // Naechstes Primitiv
+ nUpperBound = rIndexBucket[nPolyCounter++].GetIndex();
+ Polygon aPoly((UINT16)(nUpperBound - nEntityCounter));
+ nPolyPos = 0;
+
+ // Polygon fuellen
+ while(nEntityCounter < nUpperBound)
+ {
+ aPoint = rEntityBucket[nEntityCounter++].Point().GetVector3D();
+ aPoint = rSet.ObjectToViewCoor(aPoint);
+ aPolyPoint.X() = (long)(aPoint.X() + 0.5) + nXDist;
+ aPolyPoint.Y() = (long)(aPoint.Y() + 0.5) + nYDist;
+ aPoly[nPolyPos++] = aPolyPoint;
+ }
+
+ // Teilpolygon einfuegen
+ rPoly.Insert(aPoly);
+ }
+ }
+ }
+}
+
+void E3dCompoundObject::DrawShadowPolygon(PolyPolygon& rPoly, ExtOutputDevice& rXOut)
+{
+ Color aCol = GetShadowColor();
+ OutputDevice *pDevice = rXOut.GetOutDev();
+ BOOL bDrawAsOutline(DrawShadowAsOutline());
+
+ UINT16 nTransparence = GetShadowTransparence();
+ if(nTransparence)
+ {
+ if(nTransparence != 100)
+ {
+ // transparence, draw to metafile and then transparent to
+ // outdev
+ UINT8 nScaledTrans((UINT8)((nTransparence * 255)/100));
+ Color aTransColor(nScaledTrans, nScaledTrans, nScaledTrans);
+ Gradient aGradient(GRADIENT_LINEAR, aTransColor, aTransColor);
+ GDIMetaFile aMetaFile;
+ VirtualDevice aVDev;
+ MapMode aMap(rXOut.GetOutDev()->GetMapMode());
+
+ // StepCount to someting small
+ aGradient.SetSteps(3);
+
+ // create BoundRectangle
+ Rectangle aBound(rPoly.GetBoundRect());
+
+ // prepare VDev and MetaFile
+ aVDev.EnableOutput(FALSE);
+ aVDev.SetMapMode(rXOut.GetOutDev()->GetMapMode());
+ aMetaFile.Record(&aVDev);
+
+ if(bDrawAsOutline)
+ {
+ aVDev.SetLineColor(aCol);
+ aVDev.SetFillColor();
+ }
+ else
+ {
+ aVDev.SetLineColor();
+ aVDev.SetFillColor(aCol);
+ }
+
+ aVDev.SetFont(rXOut.GetOutDev()->GetFont());
+ aVDev.SetDrawMode(rXOut.GetOutDev()->GetDrawMode());
+ aVDev.SetRefPoint(rXOut.GetOutDev()->GetRefPoint());
+
+ // create output
+ for(UINT16 a(0); a < rPoly.Count(); a++)
+ aMetaFile.AddAction(new MetaPolygonAction(rPoly[a]));
+
+ // draw metafile
+ aMetaFile.Stop();
+ aMetaFile.WindStart();
+ aMap.SetOrigin(aBound.TopLeft());
+ aMetaFile.SetPrefMapMode(aMap);
+ aMetaFile.SetPrefSize(aBound.GetSize());
+ rXOut.GetOutDev()->DrawTransparent(aMetaFile, aBound.TopLeft(), aBound.GetSize(), aGradient);
+ }
+ }
+ else
+ {
+ // no transparence, draw all single polys directly
+ if(bDrawAsOutline)
+ {
+ pDevice->SetLineColor(aCol);
+ pDevice->SetFillColor();
+ }
+ else
+ {
+ pDevice->SetLineColor();
+ pDevice->SetFillColor(aCol);
+ }
+
+ for(UINT16 a(0); a < rPoly.Count(); a++)
+ pDevice->DrawPolygon(rPoly[a]);
+ }
+}
+
+/*************************************************************************
+|*
+|* convert given PolyPolygon3D to screen coor
+|*
+\************************************************************************/
+
+XPolyPolygon E3dCompoundObject::TransformToScreenCoor(const PolyPolygon3D &rExtrudePoly)
+{
+ XPolyPolygon aNewPolyPolygon;
+ B3dTransformationSet& rSet = GetScene()->GetCameraSet();
+
+ // set ObjectTrans
+ Matrix4D mTransform = GetFullTransform();
+ rSet.SetObjectTrans(mTransform);
+
+ // transform base polygon to screen coor
+ for(UINT16 a=0;a<rExtrudePoly.Count();a++)
+ {
+ const Polygon3D &rExtPoly = rExtrudePoly[a];
+ BOOL bClosed = rExtPoly.IsClosed();
+ XPolygon aNewPoly(rExtPoly.GetPointCount() + (bClosed ? 1 : 0));
+
+ UINT16 b;
+ for(b=0;b<rExtPoly.GetPointCount();b++)
+ {
+ Vector3D aPoint = rSet.ObjectToViewCoor(rExtPoly[b]);
+ aNewPoly[b].X() = (long)(aPoint.X() + 0.5);
+ aNewPoly[b].Y() = (long)(aPoint.Y() + 0.5);
+ }
+
+ if(bClosed)
+ aNewPoly[b] = aNewPoly[0];
+
+ aNewPolyPolygon.Insert(aNewPoly);
+ }
+
+ return aNewPolyPolygon;
+}
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+void E3dCompoundObject::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ // call parent
+ E3dObject::NbcSetAttributes(rAttr, bReplaceAll);
+
+ // special Attr for E3dCompoundObject
+ const SfxPoolItem* pPoolItem = NULL;
+ B3dMaterial aNewMat = GetFrontMaterial();
+ BOOL bNewMatUsed = FALSE;
+
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_DOUBLE_SIDED, TRUE, &pPoolItem ) )
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ SetDoubleSided(bNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_NORMALS_KIND, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ if(nNew == 0)
+ {
+ SetUseStdNormals(FALSE);
+ SetUseStdNormalsUseSphere(FALSE);
+ }
+ else if(nNew == 1)
+ {
+ SetUseStdNormals(TRUE);
+ SetUseStdNormalsUseSphere(FALSE);
+ }
+ else
+ {
+ SetUseStdNormals(TRUE);
+ SetUseStdNormalsUseSphere(TRUE);
+ }
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_NORMALS_INVERT, TRUE, &pPoolItem ) )
+ {
+ BOOL bNew = ( ( const SfxBoolItem* ) pPoolItem )->GetValue();
+ SetInvertNormals(bNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_TEXTURE_PROJ_X, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ if(nNew == 0)
+ {
+ SetUseStdTextureX(FALSE);
+ SetUseStdTextureXUseSphere(FALSE);
+ }
+ else if(nNew == 1)
+ {
+ SetUseStdTextureX(TRUE);
+ SetUseStdTextureXUseSphere(FALSE);
+ }
+ else
+ {
+ SetUseStdTextureX(TRUE);
+ SetUseStdTextureXUseSphere(TRUE);
+ }
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_TEXTURE_PROJ_Y, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ if(nNew == 0)
+ {
+ SetUseStdTextureY(FALSE);
+ SetUseStdTextureYUseSphere(FALSE);
+ }
+ else if(nNew == 1)
+ {
+ SetUseStdTextureY(TRUE);
+ SetUseStdTextureYUseSphere(FALSE);
+ }
+ else
+ {
+ SetUseStdTextureY(TRUE);
+ SetUseStdTextureYUseSphere(TRUE);
+ }
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_SHADOW_3D, TRUE, &pPoolItem ) )
+ {
+ BOOL bNew = ( ( const SfxBoolItem* ) pPoolItem )->GetValue();
+ SetDrawShadow3D(bNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_MAT_COLOR, TRUE, &pPoolItem ) )
+ {
+ Color aNew = ( ( const SvxColorItem* ) pPoolItem )->GetValue();
+
+ // Im Objekt setzen
+ SfxItemSet aNewSet(GetModel()->GetItemPool());
+ aNewSet.Put(XFillColorItem(String(), aNew));
+ SdrAttrObj::NbcSetAttributes(aNewSet, FALSE);
+
+ // ...und im Material setzen
+ aNewMat.SetMaterial(aNew, Base3DMaterialDiffuse);
+ bNewMatUsed = TRUE;
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_MAT_EMISSION, TRUE, &pPoolItem ) )
+ {
+ Color aNew = ( ( const SvxColorItem* ) pPoolItem )->GetValue();
+ aNewMat.SetMaterial(aNew, Base3DMaterialEmission);
+ bNewMatUsed = TRUE;
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_MAT_SPECULAR, TRUE, &pPoolItem ) )
+ {
+ Color aNew = ( ( const SvxColorItem* ) pPoolItem )->GetValue();
+ aNewMat.SetMaterial(aNew, Base3DMaterialSpecular);
+ bNewMatUsed = TRUE;
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_MAT_SPECULAR_INTENSITY, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ aNewMat.SetShininess(nNew);
+ bNewMatUsed = TRUE;
+ }
+ if(bNewMatUsed)
+ SetFrontMaterial(aNewMat);
+
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_TEXTURE_KIND, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ if(nNew == 0)
+ {
+ SetTextureKind(Base3DTextureLuminance);
+ }
+ else
+ {
+ SetTextureKind(Base3DTextureColor);
+ }
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_TEXTURE_MODE, TRUE, &pPoolItem ) )
+ {
+ UINT16 nNew = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
+ if(nNew == 0)
+ {
+ SetTextureMode(Base3DTextureReplace);
+ }
+ else if(nNew == 1)
+ {
+ SetTextureMode(Base3DTextureModulate);
+ }
+ else
+ {
+ SetTextureMode(Base3DTextureBlend);
+ }
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_TEXTURE_FILTER, TRUE, &pPoolItem ) )
+ {
+ BOOL bNew = ( ( const SfxBoolItem* ) pPoolItem )->GetValue();
+ SetFilterTexture(bNew);
+ }
+}
+
+/*************************************************************************
+|*
+|* Attribute lesen
+|*
+\************************************************************************/
+
+void E3dCompoundObject::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+ // call parent
+ E3dObject::TakeAttributes(rAttr, bMerge, bOnlyHardAttr);
+
+ // special Attr for E3dCompoundObject
+ const SfxPoolItem* pPoolItem = NULL;
+ SfxItemState eState;
+
+ BOOL bObjDoubleSided = GetDoubleSided();
+ UINT16 nObjNormalsKind;
+ if(!GetUseStdNormals())
+ {
+ nObjNormalsKind = 0;
+ }
+ else
+ {
+ if(GetUseStdNormalsUseSphere())
+ {
+ nObjNormalsKind = 2;
+ }
+ else
+ {
+ nObjNormalsKind = 1;
+ }
+ }
+ BOOL bObjNormalsInvert = GetInvertNormals();
+ UINT16 nObjTextureProjX;
+ if(!GetUseStdTextureX())
+ {
+ nObjTextureProjX = 0;
+ }
+ else
+ {
+ if(GetUseStdTextureXUseSphere())
+ {
+ nObjTextureProjX = 2;
+ }
+ else
+ {
+ nObjTextureProjX = 1;
+ }
+ }
+ UINT16 nObjTextureProjY;
+ if(!GetUseStdTextureY())
+ {
+ nObjTextureProjY = 0;
+ }
+ else
+ {
+ if(GetUseStdTextureYUseSphere())
+ {
+ nObjTextureProjY = 2;
+ }
+ else
+ {
+ nObjTextureProjY = 1;
+ }
+ }
+ BOOL bObjShadow3D = GetDrawShadow3D();
+ const XFillAttrSetItem* pFillAttr = GetFillAttr();
+ const B3dMaterial& rMat = GetFrontMaterial();
+ Color aObjMaterialColor;
+ if(pFillAttr)
+ {
+ const SfxItemSet& rSet = pFillAttr->GetItemSet();
+ aObjMaterialColor = ((const XFillColorItem&) (rSet.
+ Get(XATTR_FILLCOLOR))).GetValue();
+ }
+ else
+ {
+ aObjMaterialColor = rMat.GetMaterial(Base3DMaterialDiffuse);
+ }
+ Color aObjMaterialEmission = rMat.GetMaterial(Base3DMaterialEmission);
+ Color aObjMaterialSpecular = rMat.GetMaterial(Base3DMaterialSpecular);
+ UINT16 nObjMaterialIntensity = rMat.GetShininess();
+ UINT16 nObjTextureKind;
+ if(GetTextureKind() == Base3DTextureColor)
+ {
+ nObjTextureKind = 1;
+ }
+ else
+ {
+ nObjTextureKind = 0;
+ }
+ UINT16 nObjTextureMode;
+ if(GetTextureMode() == Base3DTextureReplace)
+ {
+ nObjTextureMode = 0;
+ }
+ else if(GetTextureMode() == Base3DTextureModulate)
+ {
+ nObjTextureMode = 1;
+ }
+ else
+ {
+ nObjTextureMode = 2;
+ }
+ BOOL bObjTextureFilter = GetFilterTexture();
+
+ // DoubleSided
+ eState = rAttr.GetItemState(SID_ATTR_3D_DOUBLE_SIDED, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bObjDoubleSided != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_DOUBLE_SIDED);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_DOUBLE_SIDED, bObjDoubleSided));
+ }
+ }
+
+ // NormalsKind
+ eState = rAttr.GetItemState(SID_ATTR_3D_NORMALS_KIND, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjNormalsKind != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_NORMALS_KIND);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_NORMALS_KIND, nObjNormalsKind));
+ }
+ }
+
+ // NormalsInvert
+ eState = rAttr.GetItemState(SID_ATTR_3D_NORMALS_INVERT, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bObjNormalsInvert != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_NORMALS_INVERT);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_NORMALS_INVERT, bObjNormalsInvert));
+ }
+ }
+
+ // TextureProjectionX
+ eState = rAttr.GetItemState(SID_ATTR_3D_TEXTURE_PROJ_X, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjTextureProjX != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_TEXTURE_PROJ_X);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_TEXTURE_PROJ_X, nObjTextureProjX));
+ }
+ }
+
+ // TextureProjectionY
+ eState = rAttr.GetItemState(SID_ATTR_3D_TEXTURE_PROJ_Y, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjTextureProjY != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_TEXTURE_PROJ_Y);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_TEXTURE_PROJ_Y, nObjTextureProjY));
+ }
+ }
+
+ // Shadow3D
+ eState = rAttr.GetItemState(SID_ATTR_3D_SHADOW_3D, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bObjShadow3D != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_SHADOW_3D);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_SHADOW_3D, bObjShadow3D));
+ }
+ }
+
+ // Material
+ eState = rAttr.GetItemState(SID_ATTR_3D_MAT_COLOR, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aObjMaterialColor != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_MAT_COLOR);
+ rAttr.InvalidateItem(XATTR_FILLCOLOR);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aObjMaterialColor, SID_ATTR_3D_MAT_COLOR));
+ }
+ else
+ {
+ // kann nur invalidate sein, setze auch die farbe wieder so
+ rAttr.InvalidateItem(XATTR_FILLCOLOR);
+ }
+ }
+
+ eState = rAttr.GetItemState(SID_ATTR_3D_MAT_EMISSION, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aObjMaterialEmission != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_MAT_EMISSION);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aObjMaterialEmission, SID_ATTR_3D_MAT_EMISSION));
+ }
+ }
+
+ eState = rAttr.GetItemState(SID_ATTR_3D_MAT_SPECULAR, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aObjMaterialSpecular != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_MAT_SPECULAR);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aObjMaterialSpecular, SID_ATTR_3D_MAT_SPECULAR));
+ }
+ }
+
+ eState = rAttr.GetItemState(SID_ATTR_3D_MAT_SPECULAR_INTENSITY, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjMaterialIntensity != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_MAT_SPECULAR_INTENSITY);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_MAT_SPECULAR_INTENSITY, nObjMaterialIntensity));
+ }
+ }
+
+ // TextureKind
+ eState = rAttr.GetItemState(SID_ATTR_3D_TEXTURE_KIND, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjTextureKind != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_TEXTURE_KIND);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_TEXTURE_KIND, nObjTextureKind));
+ }
+ }
+
+ // TextureMode
+ eState = rAttr.GetItemState(SID_ATTR_3D_TEXTURE_MODE, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nObjTextureMode != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_TEXTURE_MODE);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_TEXTURE_MODE, nObjTextureMode));
+ }
+ }
+
+ // TextureFilter
+ eState = rAttr.GetItemState(SID_ATTR_3D_TEXTURE_FILTER, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bObjTextureFilter != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_TEXTURE_FILTER);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_TEXTURE_FILTER, bObjTextureFilter));
+ }
+ }
+}
+
+
diff --git a/svx/source/engine3d/objfac3d.cxx b/svx/source/engine3d/objfac3d.cxx
new file mode 100644
index 0000000000..96f3cab516
--- /dev/null
+++ b/svx/source/engine3d/objfac3d.cxx
@@ -0,0 +1,200 @@
+/*************************************************************************
+ *
+ * $RCSfile: objfac3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVDPAGE_HXX
+#include "svdpage.hxx"
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+#ifndef _E3D_POLYSC3D_HXX
+#include "polysc3d.hxx"
+#endif
+
+#ifndef _E3D_DLIGHT3D_HXX
+#include "dlight3d.hxx"
+#endif
+
+#ifndef _E3D_PLIGHT3D_HXX
+#include "plight3d.hxx"
+#endif
+
+#ifndef _E3D_POLYOB3D_HXX
+#include "polyob3d.hxx"
+#endif
+
+#ifndef _E3D_CUBE3D_HXX
+#include "cube3d.hxx"
+#endif
+
+#ifndef _E3D_SPHERE3D_HXX
+#include "sphere3d.hxx"
+#endif
+
+#ifndef _E3D_EXTRUD3D_HXX
+#include "extrud3d.hxx"
+#endif
+
+#ifndef _E3D_LATHE3D_HXX
+#include "lathe3d.hxx"
+#endif
+
+#ifndef _E3D_POLYGON3D_HXX
+#include "polygn3d.hxx"
+#endif
+
+#ifndef _OBJFAC3D_HXX
+#include "objfac3d.hxx"
+#endif
+
+#ifndef _SVDOBJ_HXX
+#include "svdobj.hxx"
+#endif
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+E3dObjFactory::E3dObjFactory()
+{
+ SdrObjFactory::InsertMakeObjectHdl(LINK(this, E3dObjFactory, MakeObject));
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+E3dObjFactory::~E3dObjFactory()
+{
+}
+
+/*************************************************************************
+|*
+|* Chart-interne Objekte erzeugen
+|*
+\************************************************************************/
+
+IMPL_LINK( E3dObjFactory, MakeObject, SdrObjFactory*, pObjFactory)
+{
+ if ( pObjFactory->nInventor == E3dInventor )
+ {
+ switch ( pObjFactory->nIdentifier )
+ {
+ case E3D_POLYSCENE_ID:
+ pObjFactory->pNewObj = new E3dPolyScene();
+ break;
+ case E3D_LIGHT_ID:
+ pObjFactory->pNewObj = new E3dLight();
+ break;
+ case E3D_DISTLIGHT_ID:
+ pObjFactory->pNewObj = new E3dDistantLight();
+ break;
+ case E3D_POINTLIGHT_ID:
+ pObjFactory->pNewObj = new E3dPointLight();
+ break;
+ case E3D_SPOTLIGHT_ID:
+ break;
+ case E3D_OBJECT_ID:
+ pObjFactory->pNewObj = new E3dObject();
+ break;
+ case E3D_POLYOBJ_ID :
+ pObjFactory->pNewObj = new E3dPolyObj();
+ break;
+ case E3D_POLYGONOBJ_ID :
+ pObjFactory->pNewObj = new E3dPolygonObj();
+ break;
+ case E3D_CUBEOBJ_ID :
+ pObjFactory->pNewObj = new E3dCubeObj();
+ break;
+ case E3D_SPHEREOBJ_ID:
+ // FG: ruft den dummy constructor, da dieser Aufruf nur beim Laden von Dokumenten erfolgt.
+ // die wirkliche Anzahkl Segmente wird aber erst nach dem Laden der Member festgelegt.
+ // dies hat zur Folge das die erste Kugel gleich wieder zerstoert wird, obwohl sie nie
+ // gebraucht worden ist.
+ pObjFactory->pNewObj = new E3dSphereObj(123);
+ break;
+ case E3D_POINTOBJ_ID:
+ pObjFactory->pNewObj = new E3dPointObj();
+ break;
+ case E3D_EXTRUDEOBJ_ID:
+ pObjFactory->pNewObj = new E3dExtrudeObj();
+ break;
+ case E3D_LATHEOBJ_ID:
+ pObjFactory->pNewObj = new E3dLatheObj();
+ break;
+ case E3D_LABELOBJ_ID:
+ pObjFactory->pNewObj = new E3dLabelObj();
+ break;
+ case E3D_COMPOUNDOBJ_ID:
+ pObjFactory->pNewObj = new E3dCompoundObject();
+ break;
+ }
+ }
+ return 0;
+}
+
+
diff --git a/svx/source/engine3d/polygn3d.cxx b/svx/source/engine3d/polygn3d.cxx
new file mode 100644
index 0000000000..b0602c0a8b
--- /dev/null
+++ b/svx/source/engine3d/polygn3d.cxx
@@ -0,0 +1,581 @@
+/*************************************************************************
+ *
+ * $RCSfile: polygn3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_POLYGON3D_HXX
+#include "polygn3d.hxx"
+#endif
+
+#ifndef _SVDPAGE_HXX
+#include "svdpage.hxx"
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+
+#ifndef _E3D_E3DIOCMPT_HXX
+#include "e3dcmpt.hxx"
+#endif
+
+TYPEINIT1(E3dPolygonObj, E3dCompoundObject);
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+E3dPolygonObj::E3dPolygonObj(
+ E3dDefaultAttributes& rDefault,
+ const PolyPolygon3D& rPolyPoly3D,
+ BOOL bLinOnly)
+: E3dCompoundObject(rDefault),
+ bLineOnly(bLinOnly)
+{
+ // Geometrie setzen
+ SetPolyPolygon3D(rPolyPoly3D);
+
+ // Default-Normals erzeugen
+ CreateDefaultNormals();
+
+ // Default-Texturkoordinaten erzeugen
+ CreateDefaultTexture();
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+E3dPolygonObj::E3dPolygonObj(
+ E3dDefaultAttributes& rDefault,
+ const PolyPolygon3D& rPolyPoly3D,
+ const PolyPolygon3D& rPolyNormals3D,
+ BOOL bLinOnly)
+: E3dCompoundObject(rDefault),
+ bLineOnly(bLinOnly)
+{
+ // Geometrie und Normalen setzen
+ SetPolyPolygon3D(rPolyPoly3D);
+ SetPolyNormals3D(rPolyNormals3D);
+
+ // Default-Texturkoordinaten erzeugen
+ CreateDefaultTexture();
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+E3dPolygonObj::E3dPolygonObj(
+ E3dDefaultAttributes& rDefault,
+ const PolyPolygon3D& rPolyPoly3D,
+ const PolyPolygon3D& rPolyNormals3D,
+ const PolyPolygon3D& rPolyTexture3D,
+ BOOL bLinOnly)
+: E3dCompoundObject(rDefault),
+ bLineOnly(bLinOnly)
+{
+ SetPolyPolygon3D(rPolyPoly3D);
+ SetPolyNormals3D(rPolyNormals3D);
+ SetPolyTexture3D(rPolyTexture3D);
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Linien-Konstruktor
+|*
+\************************************************************************/
+
+E3dPolygonObj::E3dPolygonObj(
+ E3dDefaultAttributes& rDefault,
+ const Vector3D& rP1, const Vector3D& rP2,
+ BOOL bLinOnly)
+: E3dCompoundObject(rDefault),
+ aPolyPoly3D(1),
+ bLineOnly(bLinOnly)
+{
+ Polygon3D aPoly3D(2);
+ aPoly3D[0] = rP1;
+ aPoly3D[1] = rP2;
+ aPolyPoly3D.Insert(aPoly3D);
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Leer-Konstruktor
+|*
+\************************************************************************/
+
+E3dPolygonObj::E3dPolygonObj()
+: E3dCompoundObject()
+{
+ // Keine Geometrie erzeugen
+}
+
+/*************************************************************************
+|*
+|* Default-Normalen erzeugen
+|*
+\************************************************************************/
+
+void E3dPolygonObj::CreateDefaultNormals()
+{
+ PolyPolygon3D aPolyNormals(aPolyPoly3D.Count());
+
+ // Komplettes PolyPolygon mit den Ebenennormalen anlegen
+ for(UINT16 a=0;a<aPolyPoly3D.Count();a++)
+ {
+ // Quellpolygon finden
+ const Polygon3D& rPolygon = aPolyPoly3D[a];
+
+ // Neues Polygon fuer Normalen anlegen
+ Polygon3D aNormals(rPolygon.GetPointCount());
+
+ // Normale holen (und umdrehen)
+ Vector3D aNormal = -rPolygon.GetNormal();
+
+ // Neues Polygon fuellen
+ for(UINT16 b=0;b<rPolygon.GetPointCount();b++)
+ aNormals[b] = aNormal;
+
+ // Neues Polygon in PolyPolygon einfuegen
+ aPolyNormals.Insert(aNormals);
+ }
+
+ // Default-Normalen setzen
+ SetPolyNormals3D(aPolyNormals);
+}
+
+/*************************************************************************
+|*
+|* Default-Texturkoordinaten erzeugen
+|*
+\************************************************************************/
+
+void E3dPolygonObj::CreateDefaultTexture()
+{
+ PolyPolygon3D aPolyTexture(aPolyPoly3D.Count());
+
+ // Komplettes PolyPolygon mit den Texturkoordinaten anlegen
+ // Die Texturkoordinaten erstrecken sich ueber X,Y und Z
+ // ueber die gesamten Extremwerte im Bereich 0.0 .. 1.0
+ for(UINT16 a=0;a<aPolyPoly3D.Count();a++)
+ {
+ // Quellpolygon finden
+ const Polygon3D& rPolygon = aPolyPoly3D[a];
+
+ // Gesamtgroesse des Objektes feststellen
+ Volume3D aVolume = rPolygon.GetPolySize();
+
+ // Neues Polygon fuer Texturkoordinaten anlegen
+ Polygon3D aTexture(rPolygon.GetPointCount());
+
+ // Normale holen
+ Vector3D aNormal = rPolygon.GetNormal();
+ aNormal.Abs();
+
+ // Entscheiden, welche Koordinaten als Source fuer das
+ // Mapping benutzt werden sollen
+ UINT16 nSourceMode = 0;
+
+ // Groessten Freiheitsgrad ermitteln
+ if(!(aNormal.X() > aNormal.Y() && aNormal.X() > aNormal.Z()))
+ {
+ if(aNormal.Y() > aNormal.Z())
+ {
+ // Y ist am groessten, benutze X,Z als mapping
+ nSourceMode = 1;
+ }
+ else
+ {
+ // Z ist am groessten, benutze X,Y als mapping
+ nSourceMode = 2;
+ }
+ }
+
+ // Neues Polygon fuellen
+ for(UINT16 b=0;b<rPolygon.GetPointCount();b++)
+ {
+ Vector3D& aTex = aTexture[b];
+ const Vector3D& aPoly = rPolygon[b];
+
+ switch(nSourceMode)
+ {
+ case 0: // Quelle ist Y,Z
+ if(aVolume.GetHeight())
+ aTex.X() = (aPoly.Y() - aVolume.MinVec().Y()) / aVolume.GetHeight();
+ else
+ aTex.X() = 0.0;
+
+ if(aVolume.GetDepth())
+ aTex.Y() = (aPoly.Z() - aVolume.MinVec().Z()) / aVolume.GetDepth();
+ else
+ aTex.Y() = 0.0;
+ break;
+
+ case 1: // Quelle ist X,Z
+ if(aVolume.GetWidth())
+ aTex.X() = (aPoly.X() - aVolume.MinVec().X()) / aVolume.GetWidth();
+ else
+ aTex.X() = 0.0;
+
+ if(aVolume.GetDepth())
+ aTex.Y() = (aPoly.Z() - aVolume.MinVec().Z()) / aVolume.GetDepth();
+ else
+ aTex.Y() = 0.0;
+ break;
+
+ case 2: // Quelle ist X,Y
+ if(aVolume.GetWidth())
+ aTex.X() = (aPoly.X() - aVolume.MinVec().X()) / aVolume.GetWidth();
+ else
+ aTex.X() = 0.0;
+
+ if(aVolume.GetHeight())
+ aTex.Y() = (aPoly.Y() - aVolume.MinVec().Y()) / aVolume.GetHeight();
+ else
+ aTex.Y() = 0.0;
+ break;
+ }
+ }
+
+ // Neues Polygon in PolyPolygon einfuegen
+ aPolyTexture.Insert(aTexture);
+ }
+
+ // Default-Texturkoordinaten setzen
+ SetPolyTexture3D(aPolyTexture);
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+E3dPolygonObj::~E3dPolygonObj()
+{
+}
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+UINT16 E3dPolygonObj::GetObjIdentifier() const
+{
+ return E3D_POLYGONOBJ_ID;
+}
+
+/*************************************************************************
+|*
+|* Wireframe erzeugen
+|*
+\************************************************************************/
+
+void E3dPolygonObj::CreateWireframe(Polygon3D& rWirePoly,
+ const Matrix4D* pTf, E3dDragDetail eDetail)
+{
+ if ( eDetail == E3DDETAIL_ALLLINES ||
+ (eDetail == E3DDETAIL_DEFAULT && GetDragDetail() == E3DDETAIL_ALLLINES) )
+ {
+ // Detailliert erzeugen
+ }
+ else
+ {
+ // call parent
+ E3dObject::CreateWireframe(rWirePoly, pTf, eDetail);
+ }
+}
+
+/*************************************************************************
+|*
+|* Polygon setzen
+|*
+\************************************************************************/
+
+void E3dPolygonObj::SetPolyPolygon3D(const PolyPolygon3D& rNewPolyPoly3D)
+{
+ if ( aPolyPoly3D != rNewPolyPoly3D )
+ {
+ // Neues PolyPolygon; kopieren
+ aPolyPoly3D = rNewPolyPoly3D;
+
+ // Geometrie neu erzeugen
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dPolygonObj::SetPolyNormals3D(const PolyPolygon3D& rNewPolyNormals3D)
+{
+ if ( aPolyNormals3D != rNewPolyNormals3D )
+ {
+ // Neue Normalen; kopieren
+ aPolyNormals3D = rNewPolyNormals3D;
+
+ // Geometrie neu erzeugen
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dPolygonObj::SetPolyTexture3D(const PolyPolygon3D& rNewPolyTexture3D)
+{
+ if ( aPolyTexture3D != rNewPolyTexture3D )
+ {
+ // Neue Texturkoordinaten; kopieren
+ aPolyTexture3D = rNewPolyTexture3D;
+
+ // Geometrie neu erzeugen
+ bGeometryValid = FALSE;
+ }
+}
+
+/*************************************************************************
+|*
+|* Wandle das Objekt in ein Gruppenobjekt bestehend aus 6 Polygonen
+|*
+\************************************************************************/
+
+SdrObject *E3dPolygonObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ return NULL;
+}
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+void E3dPolygonObj::CreateGeometry()
+{
+ // Start der Geometrieerzeugung ankuendigen
+ StartCreateGeometry();
+
+ if(aPolyNormals3D.Count())
+ {
+ if(aPolyTexture3D.Count())
+ {
+ AddGeometry(aPolyPoly3D, aPolyNormals3D, aPolyTexture3D, TRUE, bLineOnly);
+ }
+ else
+ {
+ AddGeometry(aPolyPoly3D, aPolyNormals3D, TRUE, bLineOnly);
+ }
+ }
+ else
+ {
+ AddGeometry(aPolyPoly3D, TRUE, bLineOnly);
+ }
+
+ // call parent
+ E3dCompoundObject::CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+void E3dPolygonObj::WriteData(SvStream& rOut) const
+{
+ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+ if(nVersion < 3800)
+ {
+ // Alte Geometrie erzeugen, um die E3dPolyObj's zu haben
+ ((E3dCompoundObject*)this)->ReCreateGeometry(TRUE);
+ }
+
+ // call parent
+ E3dCompoundObject::WriteData(rOut);
+
+ E3dIOCompat aCompat(rOut, STREAM_WRITE, 1);
+ rOut << BOOL(bLineOnly);
+
+ if(nVersion < 3800)
+ {
+ // Geometrie neu erzeugen, um E3dPolyObj's wieder loszuwerden
+ ((E3dCompoundObject*)this)->ReCreateGeometry();
+ }
+}
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+void E3dPolygonObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ // call parent
+ E3dCompoundObject::ReadData(rHead, rIn);
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ if(AreBytesLeft())
+ {
+ E3dIOCompat aIoCompat(rIn, STREAM_READ);
+ if(aIoCompat.GetVersion() >= 1)
+ {
+ rIn >> bLineOnly;
+ }
+ }
+
+ // Geometrie neu erzeugen, mit oder ohne E3dPolyObj's
+ ReCreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+void E3dPolygonObj::operator=(const SdrObject& rObj)
+{
+ // erstmal alle Childs kopieren
+ E3dCompoundObject::operator=(rObj);
+
+ // weitere Parameter kopieren
+ const E3dPolygonObj& r3DObj = (const E3dPolygonObj&)rObj;
+
+ aPolyPoly3D = r3DObj.aPolyPoly3D;
+ aPolyNormals3D = r3DObj.aPolyNormals3D;
+ aPolyTexture3D = r3DObj.aPolyTexture3D;
+ bLineOnly = r3DObj.bLineOnly;
+}
+
+/*************************************************************************
+|*
+|* uebergebene Transformationsmatrix anwenden
+|*
+\************************************************************************/
+
+void E3dPolygonObj::ApplyTransform(const Matrix4D& rMatrix)
+{
+ // call parent
+ E3dCompoundObject::ApplyTransform(rMatrix);
+
+ // Anwenden auf lokale geometrie
+ aPolyPoly3D.Transform(rMatrix);
+}
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+void E3dPolygonObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ // call parent
+ E3dCompoundObject::NbcSetAttributes(rAttr, bReplaceAll);
+
+ // special Attr for E3dPolygonObj
+}
+
+/*************************************************************************
+|*
+|* Attribute lesen
+|*
+\************************************************************************/
+
+void E3dPolygonObj::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+ // call parent
+ E3dCompoundObject::TakeAttributes(rAttr, bMerge, bOnlyHardAttr);
+
+ // special Attr for E3dPolygonObj
+}
+
+/*************************************************************************
+|*
+|* LineOnly setzen
+|*
+\************************************************************************/
+
+void E3dPolygonObj::SetLineOnly(BOOL bNew)
+{
+ if(bNew != bLineOnly)
+ {
+ bLineOnly = bNew;
+ bGeometryValid = FALSE;
+ }
+}
+
diff --git a/svx/source/engine3d/polysc3d.cxx b/svx/source/engine3d/polysc3d.cxx
new file mode 100644
index 0000000000..3ea740b9f5
--- /dev/null
+++ b/svx/source/engine3d/polysc3d.cxx
@@ -0,0 +1,575 @@
+/*************************************************************************
+ *
+ * $RCSfile: polysc3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FILLITEM_HXX
+#include "xfillit.hxx"
+#endif
+
+#ifndef _SVDOPATH_HXX //autogen
+#include "svdopath.hxx"
+#endif
+
+#ifndef _SVDOGRP_HXX //autogen
+#include "svdogrp.hxx"
+#endif
+
+#ifndef _SVDITER_HXX //autogen
+#include "svditer.hxx"
+#endif
+
+#ifndef _SVDETC_HXX //autogen
+#include "svdetc.hxx"
+#endif
+
+#ifndef _VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _XOUTX_HXX
+#include "xoutx.hxx"
+#endif
+
+#ifndef _SVDPAGE_HXX
+#include "svdpage.hxx"
+#endif
+
+#ifndef _SVDPOOL_HXX
+#include "svdpool.hxx"
+#endif
+
+#ifndef _SFXSTYLE_HXX
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+#ifndef _E3D_POLYSC3D_HXX
+#include "polysc3d.hxx"
+#endif
+
+#ifndef _E3D_PLIGHT3D_HXX
+#include "plight3d.hxx"
+#endif
+
+#ifndef _E3D_DLIGHT3D_HXX
+#include "dlight3d.hxx"
+#endif
+
+#ifndef _B3D_BASE3D_HXX
+#include <goodies/base3d.hxx>
+#endif
+
+#ifndef _B3D_B3DTEX_HXX
+#include <goodies/b3dtex.hxx>
+#endif
+
+#ifndef _SVX_XLNCLIT_HXX
+#include "xlnclit.hxx"
+#endif
+
+#ifndef _SFXMETRICITEM_HXX
+#include <svtools/metitem.hxx>
+#endif
+
+#ifndef _XTABLE_HXX
+#include "xtable.hxx"
+#endif
+
+#ifndef _SVX_XLNWTIT_HXX
+#include "xlnwtit.hxx"
+#endif
+
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1(E3dPolyScene, E3dScene);
+
+E3dPolyScene::E3dPolyScene()
+: E3dScene()
+{
+}
+
+E3dPolyScene::E3dPolyScene(E3dDefaultAttributes& rDefault)
+: E3dScene(rDefault)
+{
+}
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+UINT16 E3dPolyScene::GetObjIdentifier() const
+{
+ return E3D_POLYSCENE_ID;
+}
+
+/*************************************************************************
+|*
+|* Die Kontur fuer TextToContour
+|*
+\************************************************************************/
+
+void E3dPolyScene::TakeContour(XPolyPolygon& rPoly) const
+{
+ ((E3dPolyScene*)this)->TakeContour3D(rPoly);
+}
+
+/*************************************************************************
+|*
+|* Objekt als Kontur in das Polygon einfuegen
+|*
+\************************************************************************/
+
+void E3dPolyScene::TakeContour3D(XPolyPolygon& rPoly)
+{
+ // TransformationSet vorbereiten
+ InitTransformationSet();
+
+ // Holen
+ E3dScene::TakeContour3D(rPoly);
+}
+
+/*************************************************************************
+|*
+|* Paint
+|*
+\************************************************************************/
+
+FASTBOOL E3dPolyScene::Paint(ExtOutputDevice& rOut,
+ const SdrPaintInfoRec& rInfoRec) const
+{
+ FASTBOOL bOk=TRUE;
+ if(GetSubList() && GetSubList()->GetObjCount())
+ {
+ bOk = ((E3dPolyScene*)this)->LocalPaint3D(rOut, rInfoRec);
+ }
+ else
+ {
+ // Leere Szene, zeichne genau wie leere Gruppe
+ if (!rInfoRec.bPrinter && rInfoRec.aPaintLayer.IsSet(nLayerId)) {
+ OutputDevice* pOutDev=rOut.GetOutDev();
+ pOutDev->SetLineColor(Color(COL_LIGHTGRAY));
+ pOutDev->SetFillColor();
+ pOutDev->DrawRect(aOutRect);
+ }
+ }
+ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {
+ bOk=PaintGluePoints(rOut,rInfoRec);
+ }
+ return bOk;
+}
+
+BOOL E3dPolyScene::LocalPaint3D(ExtOutputDevice& rOut,
+ const SdrPaintInfoRec& rInfoRec)
+{
+ Time aStartTime;
+ Rectangle aBound(GetSnapRect());
+ OutputDevice* pOut = rOut.GetOutDev();
+ Base3D *pBase3D = Base3D::Create(pOut, GetForceDraftShadeModel());
+ DBG_ASSERT(pBase3D, "Habe keinen Base3D Kontext bekommen!!");
+ pBase3D->SetDisplayQuality(GetDisplayQuality());
+ pBase3D->SetShadeModel(GetShadeModel());
+
+ Rectangle aVisible(Point(0,0), pOut->GetOutputSizePixel());
+ aVisible = pOut->PixelToLogic(aVisible);
+
+ // Bei GDIMetaFiles falsches aVisible korrigieren
+ if((aVisible.Left() == aVisible.Right() && aVisible.Top() == aVisible.Bottom())
+ || (aVisible.GetWidth() == 0L || aVisible.GetHeight() == 0L))
+ aVisible = aBound;
+
+ // Feststellen, ob transparente Teile enthalten sind
+ pBase3D->SetTransparentPartsContainedHint(AreThereTransparentParts());
+
+ // eventuell ScissorRegion setzen
+ pBase3D->ActivateScissorRegion(FALSE);
+ if(aBound != aVisible)
+ {
+ Rectangle aClipBound = aBound.GetIntersection(aVisible);
+ if(aClipBound != aBound)
+ {
+ pBase3D->SetScissorRegion(aClipBound);
+
+#ifdef DBG_UTIL // draw aClipBound for testing
+ static BOOL bDoDrawClipBoundForTesting(FALSE);
+ if(bDoDrawClipBoundForTesting)
+ {
+ OutputDevice* pOut = rOut.GetOutDev();
+
+ // red
+ pOut->SetLineColor(Color(COL_RED));
+ pOut->SetFillColor();
+ pOut->DrawRect(aClipBound);
+
+ Rectangle aClipBoundPixel = pOut->LogicToPixel(aClipBound);
+ BOOL bWasEnabled = pOut->IsMapModeEnabled();
+ pOut->EnableMapMode(FALSE);
+
+ // GREEN
+ pOut->SetLineColor(Color(COL_GREEN));
+ pOut->SetFillColor();
+ pOut->DrawRect(aClipBoundPixel);
+
+ pOut->EnableMapMode(bWasEnabled);
+ }
+#endif
+ }
+ }
+
+ // GeometricSet reset und mit pBase3D assoziieren
+ B3dCamera& rSet = GetCameraSet();
+ pBase3D->SetTransformationSet(&rSet);
+
+ // Dithering
+ String aTmp = SfxIniManager::Get()->Get( SFX_KEY_3D_DITHERING );
+ BOOL bGlobalDither = (aTmp.Len() && aTmp.GetChar(0) != sal_Unicode('0'));
+ pBase3D->SetDither(GetDither() && bGlobalDither);
+
+ // Licht setzen, vor Object->World setzen, um Lichter im
+ // WKS zu positionieren
+ pBase3D->SetLightGroup(&(GetLightGroup()));
+
+ // Transformation initialisieren
+ InitTransformationSet();
+
+ // Viewport-Grenzen eintragen
+ rSet.SetViewportRectangle(aBound, aVisible);
+
+ // Matritzen aktualisieren (OpenGL)
+ pBase3D->SetTransformationSet(&rSet);
+
+ if(!pBase3D->GetDisplayQuality())
+ {
+ // Extrem verminderte Darstellungsqualitaet, zeichne als
+ // WireFrame, voellig OHNE renderer
+ DrawWireframe(pBase3D, rOut);
+ }
+ else
+ {
+ // Schatten zeichnen
+ if(pBase3D->GetDisplayQuality() > 128)
+ {
+ B3dVolume aVol = rSet.GetDeviceVolume();
+ Volume3D aVolume(aVol.MinVec(), aVol.MaxVec());
+ DrawAllShadows(pBase3D, rOut, aBound, aVolume, rInfoRec);
+ }
+
+ // Szene mit clipping zeichnen
+ DrawPolySceneClip(rOut, this, pBase3D, rInfoRec);
+ }
+
+ // Labels darueber zeichnen. Da es auch Wertebeschriftungen
+ // im Chart gibt, ist es besser, die Labels hinterher zu zeichnen.
+ // Leider kann es auch dabei zu Zeichenfehlern kommen. Die
+ // LabelObjekte muessen irgendwann mal auf echte 3D-Objekte
+ // umgestellt werden.
+ SdrObjList* pSubList = GetSubList();
+ if(pSubList)
+ {
+ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+ while ( a3DIterator.IsMore() )
+ {
+ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+ DBG_ASSERT(pObj->ISA(E3dObject), "In Szenen sind nur 3D-Objekte erlaubt!");
+
+ if(pObj->ISA(E3dLabelObj))
+ {
+ E3dLabelObj* pLabelObject = (E3dLabelObj*)pObj;
+ SdrObject* pLabel = (SdrObject*)pLabelObject->Get2DLabelObj();
+ const Vector3D aPos = rSet.WorldToViewCoor(pLabelObject->GetTransPosition());
+ Point a2DPos((long)(aPos.X() + 0.5), (long)(aPos.Y() + 0.5));
+ pLabel->NbcSetAnchorPos(a2DPos);
+ pLabel->Paint(rOut, rInfoRec);
+ }
+ }
+ }
+
+ // Zeichenzeit bestimmen
+ aPaintTime = Time().GetTime() - aStartTime.GetTime();
+
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* Geometrie zeichnen mit clipping Beruecksichtigung
+|*
+\************************************************************************/
+
+void E3dPolyScene::DrawPolySceneClip(ExtOutputDevice& rOut,
+ const E3dObject* p3DObj, Base3D* pBase3D, const SdrPaintInfoRec& rInfoRec)
+{
+ // spezielles Clipping fuer OpenGL, um keine floating windows ueberzumalen
+ OutputDevice* pOut = rOut.GetOutDev();
+
+ if(pBase3D->GetBase3DType() == BASE3D_TYPE_OPENGL
+ && pOut->GetOutDevType() == OUTDEV_WINDOW
+ && pBase3D->GetTransformationSet())
+ {
+ Window* pWin = (Window*)pOut;
+ RegionHandle aRegionHandle;
+ Rectangle aClipRect;
+ Rectangle aSystemClipRect;
+ BOOL bClippingWasActive(FALSE);
+ Region aClipRegion;
+
+#ifdef DBG_UTIL // ClipRegions zum testen zeichnen
+ static BOOL bDoDrawRegionsToMakeThemVisible = FALSE;
+ if(bDoDrawRegionsToMakeThemVisible)
+ {
+ // Rot
+ aClipRegion = pWin->GetWindowClipRegionPixel();
+
+ // Trick von TH, um das Umrechnen auf logische Koordinaten zu vermeiden
+ BOOL bMapModeWasSet = pWin->IsMapModeEnabled();
+ pWin->EnableMapMode(FALSE);
+
+ aClipRegion.Intersect(pWin->GetActiveClipRegion());
+ pWin->EnableMapMode(bMapModeWasSet);
+
+ aRegionHandle = aClipRegion.BeginEnumRects();
+
+ while(aClipRegion.GetEnumRects(aRegionHandle, aClipRect))
+ {
+ pOut->SetLineColor(Color(COL_RED));
+ pOut->SetFillColor();
+ pOut->DrawRect(aClipRect);
+ }
+ aClipRegion.EndEnumRects(aRegionHandle);
+ }
+#endif
+
+ // Eventuell bereits gesetzte ClipRegion sichern und zur Verwendung
+ // vorbereiten
+ if(pBase3D->IsScissorRegionActive())
+ {
+ aSystemClipRect = pBase3D->GetScissorRegionPixel();
+ bClippingWasActive = TRUE;
+ }
+
+ // ClipRegion holen und Durchlauf vorbereiten
+ aClipRegion = pWin->GetWindowClipRegionPixel();
+
+ // Trick von TH, um das Umrechnen auf logische Koordinaten zu vermeiden
+ BOOL bMapModeWasSet = pWin->IsMapModeEnabled();
+ pWin->EnableMapMode(FALSE);
+
+ aClipRegion.Intersect(pWin->GetActiveClipRegion());
+ pWin->EnableMapMode(bMapModeWasSet);
+
+ aRegionHandle = aClipRegion.BeginEnumRects();
+ Rectangle aBase3DRect = pWin->LogicToPixel(
+ pBase3D->GetTransformationSet()->GetLogicalViewportBounds());
+
+ // Lauf ueber die ClipRegions
+ while(aClipRegion.GetEnumRects(aRegionHandle, aClipRect))
+ {
+ if(aClipRect.IsOver(aBase3DRect))
+ {
+ // ClipRegion setzen
+ if(bClippingWasActive)
+ {
+ pBase3D->SetScissorRegionPixel(aClipRect.GetIntersection(aSystemClipRect), TRUE);
+ }
+ else
+ {
+ pBase3D->SetScissorRegionPixel(aClipRect, TRUE);
+ }
+
+ // Beginn szene
+ pBase3D->StartScene();
+
+ // Ausgabe aller 3D Objekte
+ Paint3D(rOut, pBase3D, rInfoRec, 0);
+
+ // Ende der Szene
+ UINT32 nWasDrawMode = rOut.GetOutDev()->GetDrawMode();
+ rOut.GetOutDev()->SetDrawMode(rInfoRec.nOriginalDrawMode);
+ pBase3D->EndScene();
+ rOut.GetOutDev()->SetDrawMode(nWasDrawMode);
+ }
+ }
+ aClipRegion.EndEnumRects(aRegionHandle);
+ }
+ else
+ {
+ // Ohne clipping ausgeben
+ // Beginn szene
+ pBase3D->StartScene();
+
+ // Ausgabe aller 3D Objekte
+ ((E3dPolyScene *)this)->Paint3D(rOut, pBase3D, rInfoRec, 0);
+
+ // Ende der Szene
+ UINT32 nWasDrawMode = rOut.GetOutDev()->GetDrawMode();
+ rOut.GetOutDev()->SetDrawMode(rInfoRec.nOriginalDrawMode);
+ pBase3D->EndScene();
+ rOut.GetOutDev()->SetDrawMode(nWasDrawMode);
+ }
+}
+
+/*************************************************************************
+|*
+|* Zeichenroutine fuer 3D
+|*
+\************************************************************************/
+
+void E3dPolyScene::Paint3D(ExtOutputDevice& rOut, Base3D* pBase3D,
+ const SdrPaintInfoRec& rInfoRec, UINT16 nDrawFlags)
+{
+ if(GetScene() != this)
+ {
+ // Szene in einer Szene, durchreichen
+ E3dObject::Paint3D(rOut, pBase3D, rInfoRec, nDrawFlags);
+ }
+ else
+ {
+ // Dies ist die Root-Szene
+ if(pBase3D->GetTransparentPartsContainedHint())
+ {
+ // Nicht-Transparente Flaechen
+ E3dObject::Paint3D(rOut, pBase3D, rInfoRec, E3D_DRAWFLAG_FILLED);
+
+ // Nicht-Transparente Linien
+ E3dObject::Paint3D(rOut, pBase3D, rInfoRec, E3D_DRAWFLAG_OUTLINE);
+
+ // Transparente Flaechen
+ E3dObject::Paint3D(rOut, pBase3D, rInfoRec, E3D_DRAWFLAG_FILLED|E3D_DRAWFLAG_TRANSPARENT);
+
+ // Transparente Linien
+ E3dObject::Paint3D(rOut, pBase3D, rInfoRec, E3D_DRAWFLAG_OUTLINE|E3D_DRAWFLAG_TRANSPARENT);
+ }
+ else
+ {
+ // call parent
+ E3dObject::Paint3D(rOut, pBase3D, rInfoRec, E3D_DRAWFLAG_FILLED|E3D_DRAWFLAG_OUTLINE);
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Schatten aller Objekte zeichnen
+|*
+\************************************************************************/
+
+void E3dPolyScene::DrawAllShadows(Base3D* pBase3D, ExtOutputDevice& rXOut,
+ const Rectangle& rBound, const Volume3D& rVolume,
+ const SdrPaintInfoRec& rInfoRec)
+{
+ // TransformationSet vorbereiten
+ InitTransformationSet();
+
+ // Schatten Zeichnen
+ E3dScene::DrawShadows(pBase3D, rXOut, rBound, rVolume, rInfoRec);
+}
+
+/*************************************************************************
+|*
+|* Verminderte Darstellungsqualitaet, zeichne als WireFrame OHNE renderer
+|*
+\************************************************************************/
+
+void E3dPolyScene::DrawWireframe(Base3D* pBase3D, ExtOutputDevice& rXOut)
+{
+ // Farben setzen
+ rXOut.GetOutDev()->SetLineColor(Color(COL_BLACK));
+ rXOut.GetOutDev()->SetFillColor();
+
+ // Unterobjekte darstellen
+ SdrObjList* pSubList = GetSubList();
+ if(pSubList)
+ {
+ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+ while ( a3DIterator.IsMore() )
+ {
+ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+ DBG_ASSERT(pObj->ISA(E3dObject), "In Szenen sind nur 3D-Objekte erlaubt!");
+ if(pObj->ISA(E3dCompoundObject))
+ {
+ E3dCompoundObject* pCompObj = (E3dCompoundObject*)pObj;
+
+ // ObjectTrans setzen
+ Matrix4D mTransform = pCompObj->GetFullTransform();
+ GetCameraSet().SetObjectTrans(mTransform);
+ pBase3D->SetTransformationSet(&(GetScene()->GetCameraSet()));
+
+ // WireFrame eines einzelnen Objektes
+ pCompObj->DrawObjectWireframe(rXOut);
+ }
+ }
+ }
+}
+
+
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
new file mode 100644
index 0000000000..ddbb003964
--- /dev/null
+++ b/svx/source/engine3d/scene3d.cxx
@@ -0,0 +1,2350 @@
+/*************************************************************************
+ *
+ * $RCSfile: scene3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ITEMID_COLOR SID_ATTR_3D_LIGHTCOLOR
+
+#include "svdstr.hrc"
+#include "svdglob.hxx"
+
+#ifndef _SVDITER_HXX
+#include "svditer.hxx"
+#endif
+
+#ifndef _SVDIO_HXX
+#include "svdio.hxx"
+#endif
+
+#if defined( UNX ) || defined( ICC )
+#include <stdlib.h>
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+#ifndef _SVDPAGE_HXX
+#include "svdpage.hxx"
+#endif
+
+#ifndef _SFXSTYLE_HXX
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _E3D_SCENE3D_HXX
+#include "scene3d.hxx"
+#endif
+
+#ifndef _E3D_UNDO_HXX
+#include "e3dundo.hxx"
+#endif
+
+#ifndef _B3D_BASE3D_HXX
+#include <goodies/base3d.hxx>
+#endif
+
+#ifndef _E3D_PLIGHT3D_HXX
+#include "plight3d.hxx"
+#endif
+
+#ifndef _E3D_DLIGHT3D_HXX
+#include "dlight3d.hxx"
+#endif
+
+#ifndef _SVDTRANS_HXX
+#include "svdtrans.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SVX_COLRITEM_HXX
+#include "colritem.hxx"
+#endif
+
+#ifndef _SVXE3DITEM_HXX
+#include "e3ditem.hxx"
+#endif
+
+#ifndef _SVX_XLNTRIT_HXX
+#include "xlntrit.hxx"
+#endif
+
+#ifndef _SVX_XFLTRIT_HXX
+#include "xfltrit.hxx"
+#endif
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+
+TYPEINIT1(E3dScene, E3dObject);
+
+/*************************************************************************
+|*
+|* E3dScene-Konstruktor
+|*
+\************************************************************************/
+
+E3dScene::E3dScene()
+: E3dObject(),
+ aCamera(Vector3D(0,0,4), Vector3D()),
+ bDoubleBuffered(FALSE),
+ bClipping(FALSE),
+ nSaveStatus (0),
+ nRestStatus (0),
+ bFitInSnapRect(TRUE),
+ aPaintTime(),
+ nDisplayQuality(255),
+ bDrawOnlySelected(FALSE)
+{
+ // Defaults setzen
+ E3dDefaultAttributes aDefault;
+ SetDefaultAttributes(aDefault);
+}
+
+E3dScene::E3dScene(E3dDefaultAttributes& rDefault)
+: E3dObject(),
+ aCamera(Vector3D(0,0,4), Vector3D()),
+ bDoubleBuffered(FALSE),
+ bClipping(FALSE),
+ nSaveStatus (0),
+ nRestStatus (0),
+ bFitInSnapRect(TRUE),
+ aPaintTime(),
+ nDisplayQuality(255),
+ bDrawOnlySelected(FALSE)
+{
+ // Defaults setzen
+ SetDefaultAttributes(rDefault);
+}
+
+void E3dScene::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+{
+ // Fuer OS/2 die FP-Exceptions abschalten
+#if defined(OS2)
+#define SC_FPEXCEPTIONS_ON() _control87( MCW_EM, 0 )
+#define SC_FPEXCEPTIONS_OFF() _control87( MCW_EM, MCW_EM )
+ SC_FPEXCEPTIONS_OFF();
+#endif
+
+ // Fuer WIN95/NT die FP-Exceptions abschalten
+#if defined(WNT) || defined(WIN)
+#define SC_FPEXCEPTIONS_ON() _control87( _MCW_EM, 0 )
+#define SC_FPEXCEPTIONS_OFF() _control87( _MCW_EM, _MCW_EM )
+ SC_FPEXCEPTIONS_OFF();
+#endif
+
+ // Defaults setzen
+ aLightGroup = rDefault.GetDefaultLightGroup();
+ aShadowPlaneDirection = rDefault.GetDefaultShadowPlaneDirection();
+ eShadeModel = rDefault.GetDefaultShadeModel();
+ bDither = rDefault.GetDefaultDither();
+ bForceDraftShadeModel = rDefault.GetDefaultForceDraftShadeModel();
+
+ // Alte Werte initialisieren
+ aCamera.SetViewWindow(-2, -2, 4, 4);
+ aCameraSet.SetDeviceRectangle(-2, 2, -2, 2);
+ aCamera.SetDeviceWindow(Rectangle(0, 0, 10, 10));
+ Rectangle aRect(0, 0, 10, 10);
+ aCameraSet.SetViewportRectangle(aRect);
+ nSortingMode = E3D_SORT_FAST_SORTING | E3D_SORT_IN_PARENTS | E3D_SORT_TEST_LENGTH;
+
+ // Schattenebene normalisieren
+ aShadowPlaneDirection.Normalize();
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+E3dScene::~E3dScene()
+{
+}
+
+/*************************************************************************
+|*
+|* Feststellen, ob die Szene transparente Teile enthaelt
+|*
+\************************************************************************/
+
+BOOL E3dScene::AreThereTransparentParts() const
+{
+ BOOL bRetval(FALSE);
+
+ SdrObjListIter a3DIterator(*pSub, IM_DEEPWITHGROUPS);
+ while ( !bRetval && a3DIterator.IsMore() )
+ {
+ SdrObject* pObj = a3DIterator.Next();
+
+ // Nur darstellbare Objekte bewerten
+ if(pObj->ISA(E3dCompoundObject))
+ {
+ // Flaechenattribut testen
+ const XFillAttrSetItem* pFillAttr = ((E3dCompoundObject*)pObj)->GetFillAttr();
+ if ( pFillAttr)
+ {
+ const SfxItemSet& rSet = pFillAttr->GetItemSet();
+ UINT16 nFillTrans = ITEMVALUE(rSet, XATTR_FILLTRANSPARENCE, XFillTransparenceItem);
+ if(nFillTrans)
+ bRetval = TRUE;
+ }
+
+ if(!bRetval)
+ {
+ // Linienattribut testen
+ const XLineAttrSetItem* pLineAttr = ((E3dCompoundObject*)pObj)->GetLineAttr();
+ if ( pLineAttr)
+ {
+ const SfxItemSet &rSet = pLineAttr->GetItemSet();
+ UINT16 nLineTransparence = ITEMVALUE( rSet, XATTR_LINETRANSPARENCE, XLineTransparenceItem );
+ if(nLineTransparence)
+ bRetval = TRUE;
+ }
+ }
+ }
+ }
+ return bRetval;
+}
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+UINT16 E3dScene::GetObjIdentifier() const
+{
+ return E3D_SCENE_ID;
+}
+
+/*************************************************************************
+|*
+|* Anzahl der Handles zurueckgeben
+|*
+\************************************************************************/
+
+USHORT E3dScene::GetHdlCount() const
+{
+ // Ueberladung aus E3dObject rueckgaengig machen
+ return SdrAttrObj::GetHdlCount();
+}
+
+/*************************************************************************
+|*
+|* Handle-Liste fuellen
+|*
+\************************************************************************/
+
+void E3dScene::AddToHdlList(SdrHdlList& rHdlList) const
+{
+ // Ueberladung aus E3dObject rueckgaengig machen
+ SdrAttrObj::AddToHdlList(rHdlList);
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+FASTBOOL E3dScene::HasSpecialDrag() const
+{
+ return FALSE;
+}
+
+/*************************************************************************
+|*
+|* SetSnapRect
+|*
+\************************************************************************/
+
+void E3dScene::NbcSetSnapRect(const Rectangle& rRect)
+{
+ SetRectsDirty();
+ E3dObject::NbcSetSnapRect(rRect);
+ aCamera.SetDeviceWindow(rRect);
+ aCameraSet.SetViewportRectangle((Rectangle&)rRect);
+}
+
+/*************************************************************************
+|*
+|* Objekt verschieben
+|*
+\************************************************************************/
+
+void E3dScene::NbcMove(const Size& rSize)
+{
+ Rectangle aNewSnapRect = GetSnapRect();
+ MoveRect(aNewSnapRect, rSize);
+ NbcSetSnapRect(aNewSnapRect);
+}
+
+/*************************************************************************
+|*
+|* Objekt Resizen
+|*
+\************************************************************************/
+
+void E3dScene::NbcResize(const Point& rRef, const Fraction& rXFact,
+ const Fraction& rYFact)
+{
+ Rectangle aNewSnapRect = GetSnapRect();
+ ResizeRect(aNewSnapRect, rRef, rXFact, rYFact);
+ NbcSetSnapRect(aNewSnapRect);
+}
+
+/*************************************************************************
+|*
+|* Neue Kamera setzen, und dabei die Szene und ggf. das BoundVolume
+|* als geaendert markieren
+|*
+\************************************************************************/
+
+void E3dScene::SetCamera(const Camera3D& rNewCamera)
+{
+ // Alte Kamera setzen
+ aCamera = rNewCamera;
+ SetRectsDirty();
+
+ // Neue Kamera aus alter fuellen
+ Camera3D& rCam = (Camera3D&)GetCamera();
+
+ // Ratio abschalten
+ if(rCam.GetAspectMapping() == AS_NO_MAPPING)
+ GetCameraSet().SetRatio(0.0);
+
+ // Abbildungsgeometrie setzen
+ Vector3D aVRP = rCam.GetViewPoint();
+ Vector3D aVPN = aVRP - rCam.GetVRP();
+ Vector3D aVUV = rCam.GetVUV();
+ GetCameraSet().SetOrientation(aVRP, aVPN, aVUV);
+
+ // Perspektive setzen
+ GetCameraSet().SetPerspective(rCam.GetProjection() == PR_PERSPECTIVE);
+ GetCameraSet().SetViewportRectangle((Rectangle&)rCam.GetDeviceWindow());
+
+ // E3dLabel-Objekte muessen neu an die Projektion angepasst werden
+ if ( aLabelList.Count() > 0 )
+ {
+ SetBoundVolInvalid();
+ SetRectsDirty();
+ }
+}
+
+/*************************************************************************
+|*
+|* 3D-Objekt einfuegen
+|*
+\************************************************************************/
+
+void E3dScene::NewObjectInserted(const E3dObject* p3DObj)
+{
+ E3dObject::NewObjectInserted(p3DObj);
+
+ if ( p3DObj == this )
+ return;
+
+ if ( p3DObj->ISA(E3dLabelObj) )
+ {
+ aLabelList.Insert((E3dLabelObj*) p3DObj, LIST_APPEND);
+ }
+
+ // falls Unterobjekte vorhanden sind, auch diese pruefen
+ if ( p3DObj->IsGroupObject() )
+ {
+ SdrObjListIter a3DIterator(*p3DObj, IM_DEEPWITHGROUPS);
+
+ while ( a3DIterator.IsMore() )
+ {
+ SdrObject* pObj = a3DIterator.Next();
+
+ if ( pObj->ISA(E3dLabelObj) )
+ {
+ aLabelList.Insert((E3dLabelObj*) pObj, LIST_APPEND);
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Parent ueber Aenderung eines Childs informieren
+|*
+\************************************************************************/
+
+void E3dScene::StructureChanged(const E3dObject* p3DObj)
+{
+ E3dObject::StructureChanged(p3DObj);
+ SetRectsDirty();
+}
+
+/*************************************************************************
+|*
+|* Double Buffering aus-/einschalten
+|*
+\************************************************************************/
+
+void E3dScene::SetDoubleBuffered(FASTBOOL bBuff)
+{
+ if ( bDoubleBuffered != (BOOL)bBuff )
+ {
+ bDoubleBuffered = bBuff;
+ SetRectsDirty();
+ }
+}
+
+/*************************************************************************
+|*
+|* Clipping auf umschliessendes Rechteck der Szene aus-/einschalten
+|*
+\************************************************************************/
+
+void E3dScene::SetClipping(FASTBOOL bClip)
+{
+ if ( bClipping != (BOOL)bClip )
+ {
+ bClipping = bClip;
+ SetRectsDirty();
+ }
+}
+
+/*************************************************************************
+|*
+|* Einpassen der Objekte in umschliessendes Rechteck aus-/einschalten
+|*
+\************************************************************************/
+
+void E3dScene::SetFitInSnapRect(FASTBOOL bFit)
+{
+ if ( bFitInSnapRect != (BOOL)bFit )
+ {
+ bFitInSnapRect = bFit;
+ SetRectsDirty();
+ }
+}
+
+/*************************************************************************
+|*
+|* Einpassen der Projektion aller Szenenobjekte in das
+|* umschliessende Rechteck
+|*
+\************************************************************************/
+
+Volume3D E3dScene::FitInSnapRect()
+{
+ // Alter Kram
+ Matrix4D aFullTrans = GetFullTransform();
+ aCamera.FitViewToVolume(GetBoundVolume(), aFullTrans);
+
+ // Neuer Kram
+ // Maximas holen in Augkoordinaten zwecks Z-Werten
+ Volume3D aNewVol;
+ Vector3D aTfVec;
+ Vol3DPointIterator aIter(GetBoundVolume());
+
+ GetCameraSet().SetObjectTrans(aFullTrans);
+ while ( aIter.Next(aTfVec) )
+ {
+ aTfVec = GetCameraSet().ObjectToEyeCoor(aTfVec);
+ aNewVol.Union(aTfVec);
+ }
+
+ // ... und merken
+ double fZMin = -aNewVol.MaxVec().Z();
+ double fZMax = -aNewVol.MinVec().Z();
+
+ // Jetzt XY-Werte projizieren auf Projektionsflaeche
+ // in Device-Koordinaten
+ Matrix4D aWorldToDevice = GetCameraSet().GetOrientation();
+ if(aCamera.GetProjection() == PR_PERSPECTIVE)
+ aWorldToDevice.Frustum(-1.0, 1.0, -1.0, 1.0, fZMin, fZMax);
+ else
+ aWorldToDevice.Ortho(-1.0, 1.0, -1.0, 1.0, fZMin, fZMax);
+ aNewVol.Reset();
+ aIter.Reset();
+ while ( aIter.Next(aTfVec) )
+ {
+ aTfVec = GetCameraSet().ObjectToWorldCoor(aTfVec);
+ aTfVec *= aWorldToDevice;
+ aNewVol.Union(aTfVec);
+ }
+
+ // Labels behandeln
+ ULONG nLabelCnt = aLabelList.Count();
+ if ( nLabelCnt > 0 )
+ {
+ // Vorlaeufige Projektion bestimmen und Transformation in
+ // ViewKoordinaten bestimmen
+ Matrix4D aMatWorldToView = GetCameraSet().GetOrientation();
+ if(aCamera.GetProjection() == PR_PERSPECTIVE)
+ aMatWorldToView.Frustum(aNewVol.MinVec().X(), aNewVol.MaxVec().X(),
+ aNewVol.MinVec().Y(), aNewVol.MaxVec().Y(), fZMin, fZMax);
+ else
+ aMatWorldToView.Ortho(aNewVol.MinVec().X(), aNewVol.MaxVec().X(),
+ aNewVol.MinVec().Y(), aNewVol.MaxVec().Y(), fZMin, fZMax);
+
+ // Logische Abmessungen der Szene holen
+ Rectangle aSceneRect = GetSnapRect();
+
+ // Matrix DeviceToView aufbauen
+ Vector3D aTranslate, aScale;
+
+ aTranslate[0] = (double)aSceneRect.Left() + (aSceneRect.GetWidth() / 2.0);
+ aTranslate[1] = (double)aSceneRect.Top() + (aSceneRect.GetHeight() / 2.0);
+ aTranslate[2] = ZBUFFER_DEPTH_RANGE / 2.0;
+
+ // Skalierung
+ aScale[0] = (aSceneRect.GetWidth() - 1) / 2.0;
+ aScale[1] = (aSceneRect.GetHeight() - 1) / -2.0;
+ aScale[2] = ZBUFFER_DEPTH_RANGE / 2.0;
+
+ aMatWorldToView.Scale(aScale);
+ aMatWorldToView.Translate(aTranslate);
+
+ // Inverse Matrix ViewToDevice aufbauen
+ Matrix4D aMatViewToWorld(aMatWorldToView);
+ aMatViewToWorld.Invert();
+
+ for (ULONG i = 0; i < nLabelCnt; i++)
+ {
+ E3dLabelObj* p3DObj = aLabelList.GetObject(i);
+ const SdrObject* pObj = p3DObj->Get2DLabelObj();
+
+ // View- Abmessungen des Labels holen
+ const Rectangle& rObjRect = pObj->GetLogicRect();
+
+ // Position des Objektes in Weltkoordinaten ermitteln
+ Matrix4D aObjTrans = p3DObj->GetFullTransform();
+ Vector3D aObjPos = aObjTrans * p3DObj->GetPosition();
+
+ // View-Position des Objektes feststellen
+ // nach ViewKoordinaten
+ aObjPos *= aMatWorldToView;
+
+ // Relative Position des Labels in View-Koordinaten
+ Vector3D aRelPosOne(pObj->GetRelativePos(), aObjPos.Z());
+ aRelPosOne.X() += aObjPos.X();
+ aRelPosOne.Y() += aObjPos.Y();
+ Vector3D aRelPosTwo(aRelPosOne);
+ aRelPosTwo.X() += rObjRect.GetWidth();
+ aRelPosTwo.Y() += rObjRect.GetHeight();
+
+ // Jetzt Eckpunkte in DeviceKoordinaten bestimmen und
+ // den Abmessungen hinzufuegen
+ aRelPosOne *= aMatViewToWorld;
+ aRelPosOne *= aWorldToDevice;
+ aNewVol.Union(aRelPosOne);
+
+ aRelPosTwo *= aMatViewToWorld;
+ aRelPosTwo *= aWorldToDevice;
+ aNewVol.Union(aRelPosTwo);
+ }
+ }
+
+ // Z-Werte eintragen
+ aNewVol.MinVec().Z() = fZMin;
+ aNewVol.MaxVec().Z() = fZMax;
+
+ // Rueckgabewert setzen
+ return aNewVol;
+}
+
+/*************************************************************************
+|*
+|* Uebergeordnetes Szenenobjekt bestimmen
+|*
+\************************************************************************/
+
+E3dScene* E3dScene::GetScene() const
+{
+ if(GetParentObj())
+ return GetParentObj()->GetScene();
+ else
+ return (E3dScene*)this;
+}
+
+/*************************************************************************
+|*
+|* TransformationSet vorbereiten
+|*
+\************************************************************************/
+
+void E3dScene::InitTransformationSet()
+{
+ Rectangle aBound(GetSnapRect());
+
+ // GeometricSet reset und mit pBase3D assoziieren
+ B3dCamera& rSet = GetCameraSet();
+
+ // Transformation auf Weltkoordinaten holen
+ Matrix4D mTransform = GetFullTransform();
+ rSet.SetObjectTrans(mTransform);
+
+ // 3D Ausgabe vorbereiten, Maximas holen in DeviceKoordinaten
+ Volume3D aVolume = FitInSnapRect();
+
+ // Maximas fuer Abbildung verwenden
+ rSet.SetDeviceVolume(aVolume, FALSE);
+ rSet.SetViewportRectangle(aBound);
+}
+
+/*************************************************************************
+|*
+|* sichern mit neuer Methode und zukunftskompatibilitaet
+|* Die Zahl 3560 ist die Major-Update-Nummer * 10 zu der die Umstellung
+|* erfolgte. Dies ist leider das korrekte Verhalten, die 3d-Engine hat keine
+|* eigene Versionsnummer sondern ist an die der Drawing-Engine gekoppelt.
+|* Probleme gibt es immer dann wenn einen neue Version ein altes Format
+|* schreiben soll: Hier wird von der Drawing-Engine trotzdem die neue Nummer
+|* verwendet.
+|*
+\************************************************************************/
+
+void E3dScene::WriteData(SvStream& rOut) const
+{
+ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+ if(nVersion < 3830)
+ {
+ // Hier die Lichtobjekte erzeugen, um im alten Format schreiben zu koennen
+ ((E3dScene*)(this))->CreateLightObjectsFromLightGroup();
+ }
+
+ // Schreiben
+ E3dObject::WriteData(rOut);
+
+ if(nVersion < 3830)
+ {
+ // Lichtobjekte wieder wegnehmen
+ ((E3dScene*)(this))->RemoveLightObjects();
+ }
+ else
+ {
+#ifdef E3D_STREAMING
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+#ifdef DBG_UTIL
+ aCompat.SetID("B3dLightGroup");
+#endif
+ // LightGroup schreiben
+ aLightGroup.WriteData(rOut);
+
+#endif
+ }
+
+#ifdef E3D_STREAMING
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dScene");
+#endif
+
+ DBG_ASSERT (rOut.GetVersion(),"3d-Engine: Keine Version am Stream gesetzt!");
+ if (rOut.GetVersion() < 3560) // FG: Das ist der Zeitpunkt der Umstellung
+ {
+ rOut << aCamera;
+ }
+ if (rOut.GetVersion() >= 3560)
+ {
+ aCamera.WriteData(rOut);
+ }
+
+ rOut << BOOL(bDoubleBuffered);
+ rOut << BOOL(bClipping);
+ rOut << BOOL(bFitInSnapRect);
+ rOut << nSortingMode;
+
+ // neu ab 377:
+ rOut << aShadowPlaneDirection;
+
+ // neu ab 383:
+ rOut << (BOOL)bDither;
+
+ // neu ab 384:
+ rOut << (UINT16)eShadeModel;
+ rOut << (BOOL)bForceDraftShadeModel;
+
+#endif
+}
+
+/*************************************************************************
+|*
+|* laden
+|*
+\************************************************************************/
+
+void E3dScene::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (ImpCheckSubRecords (rHead, rIn))
+ {
+ E3dObject::ReadData(rHead, rIn);
+
+ if(CountNumberOfLights())
+ {
+ // An dieser Stelle die gelesenen Lampen ausmerzen
+ // und in die neue Struktur ueberfuehren
+ FillLightGroup();
+ RemoveLightObjects();
+ }
+ long nVersion = rIn.GetVersion(); // Build_Nr * 10 z.B. 3810
+ if(nVersion >= 3830)
+ {
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+#ifdef DBG_UTIL
+ aCompat.SetID("B3dLightGroup");
+#endif
+ if(aCompat.GetBytesLeft())
+ {
+ // LightGroup lesen
+ aLightGroup.ReadData(rIn);
+ }
+ }
+
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dScene");
+#endif
+ BOOL bTmp;
+
+ DBG_ASSERT (rIn.GetVersion(),"3d-Engine: Keine Version am Stream gesetzt!");
+
+ if ((rIn.GetVersion() < 3560) || (rHead.GetVersion() <= 12))
+ {
+ rIn >> aCamera;
+ }
+ if ((rIn.GetVersion() >= 3560) && (rHead.GetVersion() >= 13))
+ {
+ aCamera.ReadData(rHead, rIn);
+ }
+
+ // Neue Kamera aus alter fuellen
+ Camera3D& rCam = (Camera3D&)GetCamera();
+
+ // Ratio abschalten
+ if(rCam.GetAspectMapping() == AS_NO_MAPPING)
+ GetCameraSet().SetRatio(0.0);
+
+ // Abbildungsgeometrie setzen
+ Vector3D aVRP = rCam.GetViewPoint();
+ Vector3D aVPN = aVRP - rCam.GetVRP();
+ Vector3D aVUV = rCam.GetVUV();
+ GetCameraSet().SetOrientation(aVRP, aVPN, aVUV);
+
+ // Perspektive setzen
+ GetCameraSet().SetPerspective(rCam.GetProjection() == PR_PERSPECTIVE);
+ GetCameraSet().SetViewportRectangle((Rectangle&)rCam.GetDeviceWindow());
+
+ rIn >> bTmp; bDoubleBuffered = bTmp;
+ rIn >> bTmp; bClipping = bTmp;
+ rIn >> bTmp; bFitInSnapRect = bTmp;
+
+ if (aCompat.GetBytesLeft() >= sizeof(UINT32))
+ {
+ rIn >> nSortingMode;
+ }
+
+ // neu ab 377:
+ if (aCompat.GetBytesLeft() >= sizeof(Vector3D))
+ {
+ rIn >> aShadowPlaneDirection;
+ }
+
+ // neu ab 383:
+ if (aCompat.GetBytesLeft() >= sizeof(BOOL))
+ {
+ rIn >> bTmp; bDither = bTmp;
+ }
+
+ // neu ab 384:
+ if (aCompat.GetBytesLeft() >= sizeof(UINT16))
+ {
+ UINT16 nTmp;
+ rIn >> nTmp; eShadeModel = (Base3DShadeModel)nTmp;
+ }
+ if (aCompat.GetBytesLeft() >= sizeof(BOOL))
+ {
+ rIn >> bTmp; bForceDraftShadeModel = bTmp;
+ }
+
+ // SnapRects der Objekte ungueltig
+ SetRectsDirty();
+
+ // Transformationen initialisieren, damit bei RecalcSnapRect()
+ // richtig gerechnet wird
+ InitTransformationSet();
+
+ RebuildLists();
+ }
+}
+
+/*************************************************************************
+|*
+|* Einpassen der Objekte in umschliessendes Rechteck aus-/einschalten
+|*
+\************************************************************************/
+
+void E3dScene::FitSnapRectToBoundVol()
+{
+ Vector3D aTfVec;
+ Volume3D aFitVol;
+
+ SetBoundVolInvalid();
+ Matrix4D aTransform = GetFullTransform() * aCamera.GetViewTransform();
+ Vol3DPointIterator aIter(GetBoundVolume(), &aTransform);
+ Rectangle aRect;
+
+ while ( aIter.Next(aTfVec) )
+ {
+ aCamera.DoProjection(aTfVec);
+ aFitVol.Union(aTfVec);
+ Vector3D aZwi = aCamera.MapToDevice(aTfVec);
+ Point aP((long)aZwi.X(), (long)aZwi.Y());
+ aRect.Union(Rectangle(aP, aP));
+ }
+ aCamera.SetViewWindow(aFitVol.MinVec().X(), aFitVol.MinVec().Y(),
+ aFitVol.GetWidth(), aFitVol.GetHeight());
+ SetSnapRect(aRect);
+
+ // Die SnapRects aller beteiligten Objekte muessen auf dieser
+ // veraenderten Basis aufgebaut werden, invalidiere diese. Das
+ // eigene kann auch invalidiert werden, da ein RecalcSnapRect
+ // an einer Szene nur aus der Kamera liest
+ SetRectsDirty();
+}
+
+/*************************************************************************
+|*
+|* Falls die Geometrie einer Szene sich ausgedehnt/vermindert hat,
+|* muss das Volume und das SnapRect angepasst werden
+|*
+\************************************************************************/
+
+void E3dScene::CorrectSceneDimensions()
+{
+ // SnapRects der Objekte ungueltig
+ SetRectsDirty();
+
+ // SnapRect anpassen, invalidiert auch die SnapRects
+ // der enthaltenen Objekte
+ FitSnapRectToBoundVol();
+
+ // Neues BoundVolume der Kamera holen
+ Volume3D aVolume = FitInSnapRect();
+
+ // Neues BoundVolume an der Kamera setzen
+ GetCameraSet().SetDeviceVolume(aVolume, FALSE);
+
+ // Danach noch die SnapRects der enthaltenen Objekte
+ // invalidieren, um diese auf der neuen Grundlage berechnen
+ // zu lassen (falls diese von FitInSnapRect() berechnet wurden)
+ SetRectsDirty();
+}
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+void E3dScene::operator=(const SdrObject& rObj)
+{
+ E3dObject::operator=(rObj);
+
+ const E3dScene& r3DObj = (const E3dScene&) rObj;
+ aCamera = r3DObj.aCamera;
+ bDoubleBuffered = r3DObj.bDoubleBuffered;
+ bClipping = r3DObj.bClipping;
+ bFitInSnapRect = r3DObj.bFitInSnapRect;
+ nSortingMode = r3DObj.nSortingMode;
+
+ // neu ab 377:
+ aShadowPlaneDirection = r3DObj.aShadowPlaneDirection;
+ aCameraSet = r3DObj.aCameraSet;
+
+ // neu ab 383:
+ aLightGroup = r3DObj.aLightGroup;
+ eShadeModel = r3DObj.eShadeModel;
+ bDither = r3DObj.bDither;
+ bForceDraftShadeModel = r3DObj.bForceDraftShadeModel;
+
+ bBoundVolValid = FALSE;
+ RebuildLists();
+
+ SetRectsDirty();
+}
+
+/*************************************************************************
+|*
+|* Licht- und Labelobjektlisten neu aufbauen (nach Laden, Zuweisung)
+|*
+\************************************************************************/
+
+void E3dScene::RebuildLists()
+{
+ // zuerst loeschen
+ aLabelList.Clear();
+ SdrLayerID nLayerID = GetLayer();
+
+ SdrObjListIter a3DIterator(*pSub, IM_FLAT);
+
+ // dann alle Objekte in der Szene pruefen
+ while ( a3DIterator.IsMore() )
+ {
+ E3dObject* p3DObj = (E3dObject*) a3DIterator.Next();
+ p3DObj->NbcSetLayer(nLayerID);
+ NewObjectInserted(p3DObj);
+ }
+
+}
+
+/*************************************************************************
+|*
+|* erstelle neues GeoData-Objekt
+|*
+\************************************************************************/
+
+SdrObjGeoData *E3dScene::NewGeoData() const
+{
+ return new E3DSceneGeoData;
+}
+
+/*************************************************************************
+|*
+|* uebergebe aktuelle werte an das GeoData-Objekt
+|*
+\************************************************************************/
+
+void E3dScene::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ E3dObject::SaveGeoData (rGeo);
+
+ ((E3DSceneGeoData &) rGeo).aCamera = aCamera;
+ ((E3DSceneGeoData &) rGeo).aLabelList = aLabelList;
+}
+
+/*************************************************************************
+|*
+|* uebernehme werte aus dem GeoData-Objekt
+|*
+\************************************************************************/
+
+void E3dScene::RestGeoData(const SdrObjGeoData& rGeo)
+{
+ E3dObject::RestGeoData (rGeo);
+
+ aLabelList = ((E3DSceneGeoData &) rGeo).aLabelList;
+ SetCamera (((E3DSceneGeoData &) rGeo).aCamera);
+ FitSnapRectToBoundVol();
+}
+
+/*************************************************************************
+|*
+|* Am StyleSheet wurde etwas geaendert, also Scene aendern
+|*
+\************************************************************************/
+
+void E3dScene::SFX_NOTIFY(SfxBroadcaster &rBC,
+ const TypeId &rBCType,
+ const SfxHint &rHint,
+ const TypeId &rHintType)
+{
+ SetRectsDirty();
+ E3dObject::SFX_NOTIFY(rBC, rBCType, rHint, rHintType);
+}
+
+/*************************************************************************
+|*
+|* Compounds brauchen Defaults
+|*
+\************************************************************************/
+
+void E3dScene::ForceDefaultAttr(SfxItemPool* pPool)
+{
+ SdrAttrObj::ForceDefaultAttr (pPool);
+}
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+void E3dScene::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ E3dObjList* pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+
+ for ( ULONG i = 0; i < nObjCnt; i++ )
+ pOL->GetObj(i)->NbcSetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
+
+ StructureChanged(this);
+}
+
+/*************************************************************************
+|*
+|* Attribute abfragen
+|*
+\************************************************************************/
+
+SfxStyleSheet* E3dScene::GetStyleSheet() const
+{
+ E3dObjList *pOL = pSub;
+ ULONG nObjCnt = pOL->GetObjCount();
+ SfxStyleSheet *pRet = 0;
+
+ for ( ULONG i = 0; i < nObjCnt; i++ )
+ {
+ SfxStyleSheet *pSheet = pOL->GetObj(i)->GetStyleSheet();
+
+ if (!pRet)
+ pRet = pSheet;
+ else if (pSheet)
+ {
+ if(!pSheet->GetName().Equals(pRet->GetName()))
+ return 0;
+ }
+ }
+ return pRet;
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+void E3dScene::RotateScene (const Point& rRef, long nWink, double sn, double cs)
+{
+ Point UpperLeft, LowerRight, Center, NewCenter;
+
+ UpperLeft = aOutRect.TopLeft();
+ LowerRight = aOutRect.BottomRight();
+
+ long dxOutRectHalf = labs(UpperLeft.X() - LowerRight.X());
+ dxOutRectHalf /= 2;
+ long dyOutRectHalf = labs(UpperLeft.Y() - LowerRight.Y());
+ dyOutRectHalf /= 2;
+
+ Rectangle RectQuelle(aOutRect), RectZiel(aOutRect);
+
+ // Nur der Mittelpunkt wird bewegt. Die Ecken werden von NbcMove bewegt.
+ // Fuer das Drehen wird von mir ein kartesisches Koordinatensystem verwendet in dem der Drehpunkt
+ // der Nullpunkt ist und die Y- Achse nach oben ansteigt, die X-Achse nach rechts.
+ // Dies muss bei den Y-Werten beachtet werden. (Auf dem Blatt zeigt die Y-Achse nach unten
+ Center.X() = (UpperLeft.X() + dxOutRectHalf) - rRef.X();
+ Center.Y() = -((UpperLeft.Y() + dyOutRectHalf) - rRef.Y());
+ // Ein paar Spezialfaelle zuerst abhandeln (n*90 Grad n ganzzahlig)
+ if (sn==1.0 && cs==0.0) { // 90ø
+ NewCenter.X() = -Center.Y();
+ NewCenter.Y() = -Center.X();
+ } else if (sn==0.0 && cs==-1.0) { // 180ø
+ NewCenter.X() = -Center.X();
+ NewCenter.Y() = -Center.Y();
+ } else if (sn==-1.0 && cs==0.0) { // 270ø
+ NewCenter.X() = Center.Y();
+ NewCenter.Y() = -Center.X();
+ }
+ else // Hier wird um einen beliebigen Winkel in mathematisch positiver Richtung gedreht!
+ { // xneu = x * cos(alpha) - y * sin(alpha)
+ // yneu = x * sin(alpha) + y * cos(alpha)
+ // Unten Rechts wird nicht gedreht: die Seiten von RectQuelle muessen parallel
+ // zu den Koordinatenachsen bleiben.
+ NewCenter.X() = (long) (Center.X() * cs - Center.Y() * sn);
+ NewCenter.Y() = (long) (Center.X() * sn + Center.Y() * cs);
+ }
+
+ Size Differenz;
+ Point DiffPoint = (NewCenter - Center);
+ Differenz.Width() = DiffPoint.X();
+ Differenz.Height() = -DiffPoint.Y(); // Man beachte dass die Y-Achse nach unten positiv gezaehlt wird.
+ NbcMove (Differenz); // fuehrt die eigentliche Koordinatentransformation durch.
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+void E3dScene::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulScene3d);
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+void E3dScene::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralScene3d);
+}
+
+/*************************************************************************
+|*
+|* Die NbcRotate-Routine überlädt die des SdrObject. Die Idee ist die Scene
+|* drehen zu koennen und relativ zur Lage der Scene dann auch die Objekte
+|* in der Scene
+|*
+\************************************************************************/
+
+void E3dScene::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ // Also derzeit sind die Klebepunkte relativ zum aOutRect der Szene definiert. Vor dem Drehen
+ // werden die Klebepunkte relativ zur Seite definiert. Sie nehmen an der Drehung der Szene noch nicht Teil
+ // dafuer gibt es den
+ SetGlueReallyAbsolute(TRUE);
+
+ // So dass war die Szene, ab jetzt kommen die Objekte in der Szene
+ // 3D-Objekte gibt es nur ein einziges das kann zwar mehrere Flächen haben aber die Flaechen
+ // muessen ja nicht zusammenhaengend sein
+ // es ermoeglicht den Zugriff auf Kindobjekte
+ // Ich gehe also die gesamte Liste durch und rotiere um die Z-Achse die durch den
+ // Mittelpunkt von aOutRect geht (Satz von Steiner), also RotateZ
+
+ RotateScene (rRef, nWink, sn, cs); // Rotiert die Szene
+ double fWinkelInRad = nWink/100 * F_PI180;
+ NbcRotateZ(fWinkelInRad);
+ FitSnapRectToBoundVol();
+ SetRectsDirty(); // Veranlasst eine Neuberechnung aller BoundRects
+ NbcRotateGluePoints(rRef,nWink,sn,cs); // Rotiert die Klebepunkte (die haben noch Koordinaten relativ
+ // zum Urpsung des Blattes
+ SetGlueReallyAbsolute(FALSE); // ab jetzt sind sie wieder relativ zum BoundRect (also dem aOutRect definiert)
+ SetRectsDirty();
+}
+
+/*************************************************************************
+|*
+|* ShadowPlaneDirection setzen und normalisieren
+|*
+\************************************************************************/
+
+void E3dScene::SetShadowPlaneDirection(const Vector3D& rNew)
+{
+ aShadowPlaneDirection = rNew;
+ aShadowPlaneDirection.Normalize();
+}
+
+/*************************************************************************
+|*
+|* Licht-Objekte rauswerfen
+|*
+\************************************************************************/
+
+void E3dScene::RemoveLightObjects()
+{
+ SdrObjList* pSubList = GetSubList();
+ if(pSubList)
+ {
+ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+ while ( a3DIterator.IsMore() )
+ {
+ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In Szenen sind nur 3D-Objekte erlaubt!");
+ if(pObj->ISA(E3dLight))
+ {
+ // Weg damit
+ Remove3DObj(pObj);
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Licht-Objekte erzeugen, um kompatibel zur 4.0
+|* speichern zu koennen
+|*
+\************************************************************************/
+
+void E3dScene::CreateLightObjectsFromLightGroup()
+{
+ if(GetLightGroup().IsLightingEnabled())
+ {
+ // Global Ambient Light
+ const Color& rAmbient = GetLightGroup().GetGlobalAmbientLight();
+ if(rAmbient != Color(COL_BLACK))
+ Insert3DObj(new E3dLight(Vector3D(), rAmbient, 1.0));
+
+ // Andere Lichter
+ for(UINT16 a=0;a<BASE3D_MAX_NUMBER_LIGHTS;a++)
+ {
+ B3dLight& rLight = GetLightGroup().
+ GetLightObject((Base3DLightNumber)(Base3DLight0 + a));
+ if(rLight.IsEnabled())
+ {
+ if(rLight.IsDirectionalSource())
+ {
+ // erzeuge E3dDistantLight
+ Insert3DObj(new E3dDistantLight(Vector3D(),
+ rLight.GetPosition(),
+ rLight.GetIntensity(Base3DMaterialDiffuse), 1.0));
+ }
+ else
+ {
+ // erzeuge E3dPointLight
+ Insert3DObj(new E3dPointLight(rLight.GetPosition(),
+ rLight.GetIntensity(Base3DMaterialDiffuse), 1.0));
+ }
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Beleuchtung aus dem alten Beleuchtungsmodell uebernehmen
+|*
+\************************************************************************/
+
+void E3dScene::FillLightGroup()
+{
+ SdrObjList* pSubList = GetSubList();
+ BOOL bLampFound = FALSE;
+
+ if(pSubList)
+ {
+ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+ Base3DLightNumber eLight = Base3DLight0;
+
+ // AmbientLight aus
+ GetLightGroup().SetGlobalAmbientLight(Color(COL_BLACK));
+
+ while ( a3DIterator.IsMore() )
+ {
+ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In Szenen sind nur 3D-Objekte erlaubt!");
+ if(pObj->ISA(E3dLight) && eLight <= Base3DLight7)
+ {
+ E3dLight* pLight = (E3dLight*)pObj;
+ bLampFound = TRUE;
+
+ // pLight in Base3D Konvention aktivieren
+ if(pLight->IsOn())
+ {
+ if(pLight->ISA(E3dPointLight))
+ {
+ // ist ein E3dPointLight
+ // Position, keine Richtung
+ B3dColor aCol(pLight->GetColor().GetColor());
+ aCol *= pLight->GetIntensity();
+ GetLightGroup().SetIntensity(aCol, Base3DMaterialDiffuse, eLight);
+ GetLightGroup().SetIntensity(Color(COL_WHITE), Base3DMaterialSpecular, eLight);
+ Vector3D aPos = pLight->GetPosition();
+ GetLightGroup().SetPosition(aPos, eLight);
+
+ // Lichtquelle einschalten
+ GetLightGroup().Enable(TRUE, eLight);
+
+ // Naechstes Licht in Base3D
+ eLight = (Base3DLightNumber)(eLight + 1);
+ }
+ else if(pLight->ISA(E3dDistantLight))
+ {
+ // ist ein E3dDistantLight
+ // Richtung, keine Position
+ B3dColor aCol(pLight->GetColor().GetColor());
+ aCol *= pLight->GetIntensity();
+ GetLightGroup().SetIntensity(aCol, Base3DMaterialDiffuse, eLight);
+ GetLightGroup().SetIntensity(Color(COL_WHITE), Base3DMaterialSpecular, eLight);
+ Vector3D aDir = ((E3dDistantLight *)pLight)->GetDirection();
+ GetLightGroup().SetDirection(aDir, eLight);
+
+ // Lichtquelle einschalten
+ GetLightGroup().Enable(TRUE, eLight);
+
+ // Naechstes Licht in Base3D
+ eLight = (Base3DLightNumber)(eLight + 1);
+ }
+ else
+ {
+ // nur ein E3dLight, gibt ein
+ // ambientes licht, auf globales aufaddieren
+ B3dColor aCol(pLight->GetColor().GetColor());
+ aCol *= pLight->GetIntensity();
+ aCol += (B3dColor &)GetLightGroup().GetGlobalAmbientLight();
+ GetLightGroup().SetGlobalAmbientLight(aCol);
+ }
+ }
+ }
+ }
+
+ // Alle anderen Lichter ausschalten
+ while(eLight <= Base3DLight7)
+ {
+ GetLightGroup().Enable(FALSE, eLight);
+ eLight = (Base3DLightNumber)(eLight + 1);
+ }
+ }
+
+ // Beleuchtung einschalten, falls Lampen vorhanden
+ GetLightGroup().EnableLighting(bLampFound);
+}
+
+/*************************************************************************
+|*
+|* Lichter zaehlen
+|*
+\************************************************************************/
+
+UINT16 E3dScene::CountNumberOfLights()
+{
+ UINT16 nNumLights = 0;
+
+ SdrObjList* pSubList = GetSubList();
+ if(pSubList)
+ {
+ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+ while ( a3DIterator.IsMore() )
+ {
+ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In Szenen sind nur 3D-Objekte erlaubt!");
+ if(pObj->ISA(E3dLight))
+ {
+ // Zaehlen...
+ nNumLights++;
+ }
+ }
+ }
+ return nNumLights;
+}
+
+/*************************************************************************
+|*
+|* ShadeModel
+|*
+\************************************************************************/
+
+void E3dScene::SetShadeModel(Base3DShadeModel eNew)
+{
+ if(eShadeModel != eNew)
+ {
+ eShadeModel = eNew;
+ SetRectsDirty();
+ }
+}
+
+void E3dScene::SetForceDraftShadeModel(BOOL bNew)
+{
+ if(bNew != bForceDraftShadeModel)
+ {
+ bForceDraftShadeModel = bNew;
+ SetRectsDirty();
+ }
+}
+
+/*************************************************************************
+|*
+|* SnapRect berechnen
+|*
+\************************************************************************/
+
+void E3dScene::RecalcSnapRect()
+{
+ E3dScene* pScene = GetScene();
+ if(pScene == this)
+ {
+ // Szene wird als 2D-Objekt benutzt, nimm SnapRect aus der
+ // 2D Bildschrimdarstellung
+ Camera3D& rCam = (Camera3D&)pScene->GetCamera();
+ aSnapRect = rCam.GetDeviceWindow();
+ }
+ else
+ {
+ // Szene ist selbst Mitglied einer anderen Szene, hole das
+ // SnapRect als zusammengesetztes Objekt
+ E3dObject::RecalcSnapRect();
+ }
+}
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+void E3dScene::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ // call parent
+ E3dObject::NbcSetAttributes(rAttr, bReplaceAll);
+ StructureChanged(this);
+
+ // special Attr for E3dScene
+ const SfxPoolItem* pPoolItem = NULL;
+ B3dLightGroup& rLightGroup = GetLightGroup();
+ Camera3D aSceneCam (GetCamera());
+ BOOL bSceneCamChanged = FALSE;
+
+ // ProjectionType
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_PERSPECTIVE, FALSE, &pPoolItem))
+ {
+ ProjectionType eNew = (ProjectionType)((const SfxUInt16Item*)pPoolItem)->GetValue();
+ if(eNew != aSceneCam.GetProjection())
+ {
+ aSceneCam.SetProjection( eNew );
+ bSceneCamChanged = TRUE;
+ }
+ }
+
+ // CamPos
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_DISTANCE, FALSE, &pPoolItem))
+ {
+ Vector3D aActualPosition = aSceneCam.GetPosition();
+ double fNew = (double)((const SfxUInt32Item*)pPoolItem)->GetValue();
+ if(fabs(fNew - aActualPosition.Z()) > 1.0)
+ {
+ aSceneCam.SetPosition( Vector3D( aActualPosition.X(), aActualPosition.Y(), fNew) );
+ bSceneCamChanged = TRUE;
+ }
+ }
+
+ // FocalLength
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_FOCAL_LENGTH, FALSE, &pPoolItem))
+ {
+ double fNew = (double)((const SfxUInt32Item*)pPoolItem)->GetValue() / 100.0;
+ if(fNew != aSceneCam.GetFocalLength())
+ {
+ aSceneCam.SetFocalLength( fNew);
+ bSceneCamChanged = TRUE;
+ }
+ }
+
+ // TwoSidedLighting
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_TWO_SIDED_LIGHTING, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ rLightGroup.SetModelTwoSide( bNew );
+ }
+
+ // LightColors
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_1, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ rLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_2, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ rLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight1);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_3, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ rLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight2);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_4, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ rLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight3);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_5, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ rLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight4);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_6, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ rLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight5);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_7, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ rLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight6);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_8, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ rLightGroup.SetIntensity( aNew, Base3DMaterialDiffuse, Base3DLight7);
+ }
+
+ // AmbientColor
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_AMBIENTCOLOR, FALSE, &pPoolItem))
+ {
+ Color aNew = ((const SvxColorItem*)pPoolItem)->GetValue();
+ rLightGroup.SetGlobalAmbientLight( aNew );
+ }
+
+ // LightOn
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_1, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ rLightGroup.Enable( bNew, Base3DLight0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_2, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ rLightGroup.Enable( bNew, Base3DLight1);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_3, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ rLightGroup.Enable( bNew, Base3DLight2);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_4, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ rLightGroup.Enable( bNew, Base3DLight3);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_5, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ rLightGroup.Enable( bNew, Base3DLight4);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_6, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ rLightGroup.Enable( bNew, Base3DLight5);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_7, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ rLightGroup.Enable( bNew, Base3DLight6);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTON_8, FALSE, &pPoolItem))
+ {
+ BOOL bNew = ((const SfxBoolItem*)pPoolItem)->GetValue();
+ rLightGroup.Enable( bNew, Base3DLight7);
+ }
+
+ // LightDirection
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_1, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ rLightGroup.SetDirection( aNew, Base3DLight0);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_2, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ rLightGroup.SetDirection( aNew, Base3DLight1);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_3, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ rLightGroup.SetDirection( aNew, Base3DLight2);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_4, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ rLightGroup.SetDirection( aNew, Base3DLight3);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_5, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ rLightGroup.SetDirection( aNew, Base3DLight4);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_6, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ rLightGroup.SetDirection( aNew, Base3DLight5);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_7, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ rLightGroup.SetDirection( aNew, Base3DLight6);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_8, FALSE, &pPoolItem))
+ {
+ Vector3D aNew = ((const SvxVector3DItem*)pPoolItem)->GetValue();
+ rLightGroup.SetDirection( aNew, Base3DLight7);
+ }
+
+ // ShadowSlant
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_SHADOW_SLANT, FALSE, &pPoolItem))
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ double fWink = (double)nNew * F_PI180;
+ Vector3D aVec(0.0, sin(fWink), cos(fWink));
+ aVec.Normalize();
+ SetShadowPlaneDirection(aVec);
+ }
+
+ // ShadeMode
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_SHADE_MODE, FALSE, &pPoolItem))
+ {
+ UINT16 nNew = ((const SfxUInt16Item*)pPoolItem)->GetValue();
+ if(nNew == 3)
+ {
+ SetForceDraftShadeModel(TRUE);
+ SetShadeModel(Base3DSmooth);
+ }
+ else
+ {
+ SetForceDraftShadeModel(FALSE);
+ if(nNew == 0)
+ {
+ SetShadeModel(Base3DFlat);
+ }
+ else if(nNew == 1)
+ {
+ SetShadeModel(Base3DPhong);
+ }
+ else
+ {
+ // Gouraud
+ SetShadeModel(Base3DSmooth);
+ }
+ }
+ }
+
+ // Nachbehandlung
+ if(bSceneCamChanged)
+ {
+ SetCamera( aSceneCam );
+ }
+}
+
+/*************************************************************************
+|*
+|* Attribute abfragen
+|*
+\************************************************************************/
+
+void E3dScene::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+ // call parent
+ E3dObject::TakeAttributes(rAttr, bMerge, bOnlyHardAttr);
+
+ // special Attr for E3dCompoundObject
+ const SfxPoolItem* pPoolItem = NULL;
+ SfxItemState eState;
+
+ B3dLightGroup& rLightGroup = ((E3dScene*)this)->GetLightGroup();
+ Camera3D aSceneCam (GetCamera());
+ double fSceneCamPosZ = aSceneCam.GetPosition().Z();
+ double fSceneFocal = aSceneCam.GetFocalLength() * 100.0;
+ BOOL bSceneTwoSidedLighting = rLightGroup.GetModelTwoSide();
+ Color aSceneLightColor1 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight0);
+ Color aSceneLightColor2 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight1);
+ Color aSceneLightColor3 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight2);
+ Color aSceneLightColor4 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight3);
+ Color aSceneLightColor5 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight4);
+ Color aSceneLightColor6 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight5);
+ Color aSceneLightColor7 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight6);
+ Color aSceneLightColor8 = rLightGroup.GetIntensity(Base3DMaterialDiffuse, Base3DLight7);
+ Color aSceneAmbientColor = rLightGroup.GetGlobalAmbientLight();
+ BOOL bSceneLightOn1 = rLightGroup.IsEnabled(Base3DLight0);
+ BOOL bSceneLightOn2 = rLightGroup.IsEnabled(Base3DLight1);
+ BOOL bSceneLightOn3 = rLightGroup.IsEnabled(Base3DLight2);
+ BOOL bSceneLightOn4 = rLightGroup.IsEnabled(Base3DLight3);
+ BOOL bSceneLightOn5 = rLightGroup.IsEnabled(Base3DLight4);
+ BOOL bSceneLightOn6 = rLightGroup.IsEnabled(Base3DLight5);
+ BOOL bSceneLightOn7 = rLightGroup.IsEnabled(Base3DLight6);
+ BOOL bSceneLightOn8 = rLightGroup.IsEnabled(Base3DLight7);
+ Vector3D aSceneLightDirection1 = rLightGroup.GetDirection( Base3DLight0 );
+ Vector3D aSceneLightDirection2 = rLightGroup.GetDirection( Base3DLight1 );
+ Vector3D aSceneLightDirection3 = rLightGroup.GetDirection( Base3DLight2 );
+ Vector3D aSceneLightDirection4 = rLightGroup.GetDirection( Base3DLight3 );
+ Vector3D aSceneLightDirection5 = rLightGroup.GetDirection( Base3DLight4 );
+ Vector3D aSceneLightDirection6 = rLightGroup.GetDirection( Base3DLight5 );
+ Vector3D aSceneLightDirection7 = rLightGroup.GetDirection( Base3DLight6 );
+ Vector3D aSceneLightDirection8 = rLightGroup.GetDirection( Base3DLight7 );
+ ProjectionType eScenePT = aSceneCam.GetProjection();
+ UINT16 nSceneShadeMode;
+
+ const Vector3D& rShadowVec = ((E3dScene*)this)->GetShadowPlaneDirection();
+ UINT16 nSceneShadowSlant = (UINT16)((atan2(rShadowVec.Y(), rShadowVec.Z()) / F_PI180) + 0.5);
+
+ if(((E3dScene*)this)->GetForceDraftShadeModel())
+ {
+ nSceneShadeMode = 3; // Draft-Modus
+ }
+ else
+ {
+ if(((E3dScene*)this)->GetShadeModel() == Base3DSmooth)
+ {
+ nSceneShadeMode = 2; // Gouraud
+ }
+ else if(((E3dScene*)this)->GetShadeModel() == Base3DFlat)
+ {
+ nSceneShadeMode = 0; // Flat
+ }
+ else // Base3DPhong
+ {
+ nSceneShadeMode = 1; // Phong
+ }
+ }
+
+ // ProjectionType
+ eState = rAttr.GetItemState(SID_ATTR_3D_PERSPECTIVE, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if((UINT16)eScenePT != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_PERSPECTIVE);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_PERSPECTIVE, (UINT16)eScenePT));
+ }
+ }
+
+ // CamPos
+ eState = rAttr.GetItemState(SID_ATTR_3D_DISTANCE, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if((UINT32)(fSceneCamPosZ + 0.5) != ((const SfxUInt32Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_DISTANCE);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt32Item(SID_ATTR_3D_DISTANCE, (UINT32)(fSceneCamPosZ + 0.5)));
+ }
+ }
+
+ // FocalLength
+ eState = rAttr.GetItemState(SID_ATTR_3D_FOCAL_LENGTH, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if((UINT32)(fSceneFocal + 0.5) != ((const SfxUInt32Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_FOCAL_LENGTH);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt32Item(SID_ATTR_3D_FOCAL_LENGTH, (UINT32)(fSceneFocal + 0.5)));
+ }
+ }
+
+ // TwoSidedLighting
+ eState = rAttr.GetItemState(SID_ATTR_3D_TWO_SIDED_LIGHTING, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bSceneTwoSidedLighting != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_TWO_SIDED_LIGHTING);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_TWO_SIDED_LIGHTING, bSceneTwoSidedLighting));
+ }
+ }
+
+ // LightColors
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_1, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightColor1 != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTCOLOR_1);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aSceneLightColor1, SID_ATTR_3D_LIGHTCOLOR_1));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_2, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightColor2 != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTCOLOR_2);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aSceneLightColor2, SID_ATTR_3D_LIGHTCOLOR_2));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_3, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightColor3 != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTCOLOR_3);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aSceneLightColor3, SID_ATTR_3D_LIGHTCOLOR_3));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_4, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightColor4 != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTCOLOR_4);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aSceneLightColor4, SID_ATTR_3D_LIGHTCOLOR_4));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_5, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightColor5 != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTCOLOR_5);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aSceneLightColor5, SID_ATTR_3D_LIGHTCOLOR_5));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_6, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightColor6 != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTCOLOR_6);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aSceneLightColor6, SID_ATTR_3D_LIGHTCOLOR_6));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_7, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightColor7 != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTCOLOR_7);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aSceneLightColor7, SID_ATTR_3D_LIGHTCOLOR_7));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTCOLOR_8, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightColor8 != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTCOLOR_8);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aSceneLightColor8, SID_ATTR_3D_LIGHTCOLOR_8));
+ }
+ }
+
+ // AmbientColor
+ eState = rAttr.GetItemState(SID_ATTR_3D_AMBIENTCOLOR, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneAmbientColor != ((const SvxColorItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_AMBIENTCOLOR);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxColorItem(aSceneAmbientColor, SID_ATTR_3D_AMBIENTCOLOR));
+ }
+ }
+
+ // LightOn
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTON_1, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bSceneLightOn1 != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTON_1);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_1, bSceneLightOn1));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTON_2, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bSceneLightOn2 != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTON_2);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_2, bSceneLightOn2));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTON_3, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bSceneLightOn3 != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTON_3);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_3, bSceneLightOn3));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTON_4, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bSceneLightOn4 != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTON_4);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_4, bSceneLightOn4));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTON_5, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bSceneLightOn5 != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTON_5);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_5, bSceneLightOn5));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTON_6, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bSceneLightOn6 != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTON_6);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_6, bSceneLightOn6));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTON_7, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bSceneLightOn7 != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTON_7);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_7, bSceneLightOn7));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTON_8, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(bSceneLightOn8 != ((const SfxBoolItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTON_8);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxBoolItem(SID_ATTR_3D_LIGHTON_8, bSceneLightOn8));
+ }
+ }
+
+ // LightDirection
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_1, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightDirection1 != ((const SvxVector3DItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTDIRECTION_1);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_1, aSceneLightDirection1));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_2, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightDirection2 != ((const SvxVector3DItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTDIRECTION_2);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_2, aSceneLightDirection2));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_3, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightDirection3 != ((const SvxVector3DItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTDIRECTION_3);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_3, aSceneLightDirection3));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_4, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightDirection4 != ((const SvxVector3DItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTDIRECTION_4);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_4, aSceneLightDirection4));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_5, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightDirection5 != ((const SvxVector3DItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTDIRECTION_5);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_5, aSceneLightDirection5));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_6, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightDirection6 != ((const SvxVector3DItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTDIRECTION_6);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_6, aSceneLightDirection6));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_7, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightDirection7 != ((const SvxVector3DItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTDIRECTION_7);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_7, aSceneLightDirection7));
+ }
+ }
+ eState = rAttr.GetItemState(SID_ATTR_3D_LIGHTDIRECTION_8, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(aSceneLightDirection8 != ((const SvxVector3DItem*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_LIGHTDIRECTION_8);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SvxVector3DItem(SID_ATTR_3D_LIGHTDIRECTION_8, aSceneLightDirection8));
+ }
+ }
+
+ // ShadowSlant
+ eState = rAttr.GetItemState(SID_ATTR_3D_SHADOW_SLANT, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nSceneShadowSlant != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_SHADOW_SLANT);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_SHADOW_SLANT, nSceneShadowSlant));
+ }
+ }
+
+ // ShadeMode
+ eState = rAttr.GetItemState(SID_ATTR_3D_SHADE_MODE, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if(nSceneShadeMode != ((const SfxUInt16Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_SHADE_MODE);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt16Item(SID_ATTR_3D_SHADE_MODE, nSceneShadeMode));
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Aufbrechen
+|*
+\************************************************************************/
+
+BOOL E3dScene::IsBreakObjPossible()
+{
+ // Szene ist aufzubrechen, wenn alle Mitglieder aufzubrechen sind
+ SdrObjList* pSubList = GetSubList();
+ if(pSubList)
+ {
+ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+ while ( a3DIterator.IsMore() )
+ {
+ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In Szenen sind nur 3D-Objekte erlaubt!");
+ if(!pObj->IsBreakObjPossible())
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* ItemPool fuer dieses Objekt wechseln
+|*
+\************************************************************************/
+
+void E3dScene::MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool)
+{
+ // call parent
+ E3dObject::MigrateItemPool(pSrcPool, pDestPool);
+
+ // own reaction, but only with outmost scene
+ SdrObjList* pSubList = GetSubList();
+ if(pSubList && GetScene() == this)
+ {
+ SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
+ while ( a3DIterator.IsMore() )
+ {
+ E3dObject* pObj = (E3dObject*) a3DIterator.Next();
+ DBG_ASSERT(pObj->ISA(E3dObject), "AW: In Szenen sind nur 3D-Objekte erlaubt!");
+ pObj->MigrateItemPool(pSrcPool, pDestPool);
+ }
+ }
+}
+
+
diff --git a/svx/source/engine3d/sphere3d.cxx b/svx/source/engine3d/sphere3d.cxx
new file mode 100644
index 0000000000..12157a55ed
--- /dev/null
+++ b/svx/source/engine3d/sphere3d.cxx
@@ -0,0 +1,773 @@
+/*************************************************************************
+ *
+ * $RCSfile: sphere3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "svdstr.hrc"
+#include "svdglob.hxx"
+
+#ifndef _SVDIO_HXX
+#include "svdio.hxx"
+#endif
+
+#ifndef _SVDITER_HXX
+#include "svditer.hxx"
+#endif
+
+#ifndef _SVDMODEL_HXX
+#include "svdmodel.hxx"
+#endif
+
+#ifndef _SVDPAGE_HXX
+#include "svdpage.hxx"
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+#ifndef _E3D_POLYOB3D_HXX
+#include "polyob3d.hxx"
+#endif
+
+#ifndef _E3D_SPHERE3D_HXX
+#include "sphere3d.hxx"
+#endif
+
+#ifndef _POLY3D_HXX
+#include "poly3d.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+TYPEINIT1(E3dSphereObj, E3dCompoundObject);
+
+/*************************************************************************
+|*
+|* Kugel aus Polygonfacetten nach Laengen und Breitengrad aufbauen
+|*
+\************************************************************************/
+
+E3dSphereObj::E3dSphereObj(E3dDefaultAttributes& rDefault, const Vector3D& rCenter, const Vector3D& r3DSize)
+: E3dCompoundObject(rDefault)
+{
+ // Defaults setzen
+ SetDefaultAttributes(rDefault);
+
+ // Uebergebene drueberbuegeln
+ aCenter = rCenter;
+ aSize = r3DSize;
+
+ // Geometrie erzeugen
+ CreateGeometry();
+}
+
+E3dSphereObj::E3dSphereObj()
+: E3dCompoundObject()
+{
+ // Defaults setzen
+ E3dDefaultAttributes aDefault;
+ SetDefaultAttributes(aDefault);
+}
+
+/*************************************************************************
+|*
+|* Kugel erzeugen ohne die Polygone darin zu erzeugen
+|*
+\************************************************************************/
+
+// FG: Dieser Aufruf erfolgt von der 3D-Object Factory (objfac3d.cxx) und zwar ausschliesslich beim
+// laden von Dokumenten. Hier braucht man keinen CreateSphere-Aufruf, denn die wirkliche
+// Anzahl Segmente ist ja noch nicht bekannt. Dies war bis zum 10.2.97 ein (kleines)
+// Speicherleck.
+E3dSphereObj::E3dSphereObj(int dummy) // den Parameter braucht es um unterscheiden zu koennen, welcher
+{ // der beiden Konstruktoren gemeint ist. Der obige halt per Default
+ // Defaults setzen
+ E3dDefaultAttributes aDefault;
+ SetDefaultAttributes(aDefault);
+}
+
+void E3dSphereObj::SetDefaultAttributes(E3dDefaultAttributes& rDefault)
+{
+ // Defaults setzen
+ nHSegments = rDefault.GetDefaultHSegments();
+ nVSegments = rDefault.GetDefaultVSegments();
+ aCenter = rDefault.GetDefaultSphereCenter();
+ aSize = rDefault.GetDefaultSphereSize();
+}
+
+/*************************************************************************
+|*
+|* Geometrieerzeugung
+|*
+\************************************************************************/
+
+void E3dSphereObj::CreateGeometry()
+{
+ Polygon3D aRect3D(4);
+ Polygon3D aNormal3D(4);
+ Polygon3D aTexture3D(4);
+
+ // Start der Geometrieerzeugung ankuendigen
+ StartCreateGeometry();
+
+ if ( nHSegments < 3 ) nHSegments = 3;
+ if ( nHSegments > 100 ) nHSegments = 100;
+ if ( nVSegments < 2 ) nVSegments = 2;
+ if ( nVSegments > 100 ) nVSegments = 100;
+
+ Vector3D aRadius = aSize / 2;
+ double fHSin1, fHSin2, fHCos1, fHCos2;
+ double fHAng = 0;
+ double fHInc = DEG2RAD(360) / nHSegments;
+ double fVInc = DEG2RAD(180) / nVSegments;
+
+ fHSin2 = 0.0; // sin(0)
+ fHCos2 = 1.0; // cos(0)
+
+ for (USHORT nH = 0; nH < nHSegments; nH++)
+ {
+ fHAng += fHInc;
+ fHSin1 = fHSin2;
+ fHSin2 = sin(fHAng);
+ fHCos1 = fHCos2;
+ fHCos2 = cos(fHAng);
+
+ double fRx, fRz;
+ double fVAng = DEG2RAD(90);
+ double fVSin1, fVSin2, fVCos1, fVCos2;
+ fVSin2 = 1.0; // sin(90)
+ fVCos2 = 0.0; // cos(90)
+
+ for (USHORT nV = 0; nV < nVSegments; nV++)
+ {
+ Vector3D aPos;
+
+ fVAng -= fVInc;
+ fVSin1 = fVSin2;
+ fVSin2 = sin(fVAng);
+ fVCos1 = fVCos2;
+ fVCos2 = cos(fVAng);
+
+ aPos = aCenter;
+ fRx = aRadius.X() * fVCos1;
+ fRz = aRadius.Z() * fVCos1;
+ aPos.X() += fRx * fHCos1;
+ aPos.Y() += aRadius.Y() * fVSin1;
+ aPos.Z() += fRz * fHSin1;
+ aRect3D[1] = aPos;
+
+ aPos.X() = aCenter.X() + fRx * fHCos2;
+ aPos.Z() = aCenter.Z() + fRz * fHSin2;
+ aRect3D[2] = aPos;
+
+ aPos = aCenter;
+ fRx = aRadius.X() * fVCos2;
+ fRz = aRadius.Z() * fVCos2;
+ aPos.X() += fRx * fHCos1;
+ aPos.Y() += aRadius.Y() * fVSin2;
+ aPos.Z() += fRz * fHSin1;
+ aRect3D[0] = aPos;
+
+ aPos.X() = aCenter.X() + fRx * fHCos2;
+ aPos.Z() = aCenter.Z() + fRz * fHSin2;
+ aRect3D[3] = aPos;
+
+ if(GetCreateTexture())
+ {
+ aTexture3D[1].X() =
+ (double)(nHSegments - (nH + 1)) / (double)nHSegments;
+ aTexture3D[1].Y() =
+ (double)nV / (double)nVSegments;
+
+ aTexture3D[2].X() =
+ (double)((nHSegments - (nH + 1)) - 1) / (double)nHSegments;
+ aTexture3D[2].Y() = aTexture3D[1].Y();
+
+ aTexture3D[3].X() = aTexture3D[2].X();
+ aTexture3D[3].Y() =
+ (double)(nV+1) / (double)nVSegments;
+
+ aTexture3D[0].X() = aTexture3D[1].X();
+ aTexture3D[0].Y() = aTexture3D[3].Y();
+ }
+
+ if(GetCreateNormals())
+ {
+ aNormal3D = aRect3D;
+ aNormal3D[0].Normalize();
+ aNormal3D[1].Normalize();
+ aNormal3D[2].Normalize();
+ aNormal3D[3].Normalize();
+
+ if(GetCreateTexture())
+ AddGeometry(aRect3D, aNormal3D, aTexture3D, FALSE);
+ else
+ AddGeometry(aRect3D, aNormal3D, FALSE);
+ }
+ else
+ {
+ AddGeometry(aRect3D, FALSE);
+ }
+ }
+ }
+
+ // call parent
+ E3dCompoundObject::CreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Identifier zurueckgeben
+|*
+\************************************************************************/
+
+UINT16 E3dSphereObj::GetObjIdentifier() const
+{
+ return E3D_SPHEREOBJ_ID;
+}
+
+/*************************************************************************
+|*
+|* Wireframe erzeugen
+|*
+\************************************************************************/
+
+void E3dSphereObj::CreateWireframe(Polygon3D& rWirePoly, const Matrix4D* pTf,
+ E3dDragDetail eDetail)
+{
+ if ( eDetail == E3DDETAIL_ALLLINES ||
+ (eDetail == E3DDETAIL_DEFAULT && GetDragDetail() == E3DDETAIL_ALLLINES) )
+ {
+ // Detailliert erzeugen
+ }
+ else
+ {
+ // call parent
+ E3dObject::CreateWireframe(rWirePoly, pTf, eDetail);
+ }
+}
+
+/*************************************************************************
+|*
+|* Wandle das Objekt in ein Gruppenobjekt bestehend aus n Polygonen
+|*
+\************************************************************************/
+
+SdrObject *E3dSphereObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ return NULL;
+}
+
+/*************************************************************************
+|*
+|* Leer-Konstruktor
+|*
+\************************************************************************/
+
+void E3dSphereObj::ReSegment(long nHSegs, long nVSegs)
+{
+ if ((nHSegs != nHSegments || nVSegs != nVSegments) &&
+ (nHSegs != 0 || nVSegs != 0))
+ {
+ nHSegments = nHSegs;
+ nVSegments = nVSegs;
+
+ bGeometryValid = FALSE;
+ }
+}
+
+/*************************************************************************
+|*
+|* Objektdaten in Stream speichern
+|*
+\************************************************************************/
+
+void E3dSphereObj::WriteData(SvStream& rOut) const
+{
+ long nVersion = rOut.GetVersion(); // Build_Nr * 10 z.B. 3810
+ if(nVersion < 3800)
+ {
+ // Alte Geometrie erzeugen, um die E3dPolyObj's zu haben
+ ((E3dCompoundObject*)this)->ReCreateGeometry(TRUE);
+ }
+
+ // call parent
+ SdrAttrObj::WriteData(rOut);
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dSphereObj");
+#endif
+
+ if (rOut.GetVersion() < 3560) // FG: kleiner als die Final Beta der Version 4.0
+ {
+ pSub->Save(rOut);
+ }
+ else
+ {
+ // [FG] Jetzt wird die Kindliste abgeklapptert, allerdings weiss ich im Gegensatz zu
+ // Joe dass es nur E3dPolyObj - Kindobjekte sein koennen.
+ // Jedes dieser Objekte frage ich ob es eigene Attribute enthaelt. Falls OwnStyle ()
+ // true liefert, werde ich das Polygon nicht wegspeichern.
+
+ SdrObjListIter aIter(*pSub,IM_FLAT);
+ while (aIter.IsMore()) {
+ E3dPolyObj* pObj=(E3dPolyObj *) aIter.Next();
+ if ((!pObj->IsNotPersistent()) && (pObj->OwnAttrs() || pObj->OwnStyle()))
+ {
+ rOut<<*pObj;
+ }
+ if (pSub->GetModel()!=NULL) pSub->GetModel()->IncProgress();
+ }
+ SdrIOHeader(rOut,STREAM_WRITE,SdrIOEndeID); // Endemarke
+ }
+
+ // Daß hier gehört zum E3dObject (ohne Basisklassen);
+ if (rOut.GetVersion() < 3560)
+ {
+ rOut << aLocalBoundVol;
+
+ Old_Matrix3D aMat3D;
+ aMat3D = aTfMatrix;
+ rOut << aMat3D;
+
+ rOut << nLogicalGroup;
+ rOut << nObjTreeLevel;
+ rOut << nPartOfParent;
+ rOut << UINT16(eDragDetail);
+ }
+ else
+ {
+ E3dObject::WriteOnlyOwnMembers(rOut);
+ }
+ // Das gehört zu E3dSphere
+ rOut << nHSegments;
+ rOut << nVSegments;
+ rOut << aCenter;
+ rOut << aSize;
+
+ // Das hier ist ein Merkmal eines Compound-Objektes
+ rOut << (BOOL) ((E3dCompoundObject *) this)->GetDoubleSided();
+
+ // Ab Version 395 (8.6.98): Parameter aus dem Objekt
+ // E3dCompoundObject. Da irgendwann mal jemand die Ableitungs-
+ // hierarchie beim FileFormat unterbrochen hat, wurden diese Attribute
+ // bisher NOCH NIE gespeichert (Grrr). Diese Stelle muss nun natuerlich
+ // auch IMMER MITGEPFLEGT werden, wenn sich Parameter in
+ // E3dCompoundObject oder E3dObject aendern.
+ rOut << BOOL(bDoubleSided);
+ rOut << BOOL(bCreateNormals);
+ rOut << BOOL(bCreateTexture);
+ rOut << BOOL(bUseStdNormals);
+ rOut << BOOL(bUseStdNormalsUseSphere);
+ rOut << BOOL(bUseStdTextureX);
+ rOut << BOOL(bUseStdTextureXUseSphere);
+ rOut << BOOL(bUseStdTextureY);
+ rOut << BOOL(bUseStdTextureYUseSphere);
+ rOut << BOOL(bShadow3D);
+ aFrontMaterial.WriteData(rOut);
+ aBackMaterial.WriteData(rOut);
+ rOut << (UINT16)eTextureKind;
+ rOut << (UINT16)eTextureMode;
+ rOut << BOOL(bInvertNormals);
+
+ // neu ab 534: (hat noch gefehlt)
+ rOut << BOOL(bFilterTexture);
+
+ if(nVersion < 3800)
+ {
+ // Geometrie neu erzeugen, um E3dPolyObj's wieder loszuwerden
+ ((E3dCompoundObject*)this)->ReCreateGeometry();
+ }
+}
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+void E3dSphereObj::ReadData31(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dSphereObj");
+#endif
+ // dann die Member
+ UINT16 nTmp16;
+ pSub->Load(rIn, *pPage);
+ // FG: Die Daten des 3D-Objektes
+ rIn >> aLocalBoundVol;
+
+ Old_Matrix3D aMat3D;
+ rIn >> aMat3D;
+ aTfMatrix = Matrix4D(aMat3D);
+
+ rIn >> nLogicalGroup;
+ rIn >> nObjTreeLevel;
+ rIn >> nPartOfParent;
+ rIn >> nTmp16; eDragDetail = E3dDragDetail(nTmp16);
+ // FG: Die Daten der Kugel
+ rIn >> nHSegments;
+ rIn >> nVSegments;
+ rIn >> aCenter;
+ rIn >> aSize;
+
+ bBoundVolValid = FALSE;
+
+ // Geometrie neu erzeugen
+ ReCreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Objektdaten aus Stream laden
+|*
+\************************************************************************/
+
+void E3dSphereObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ // FG (10.2.97) Der Pointer ist ein Kunstgriff er wird in der ReadData-Routine erzeugt dort werden
+ // die abgespeicherten attributierten Flaechen abgelegt. Danach wird eine Kugel mit Default-Paramtern
+ // erzeugt und dann werden die per Default erzeugten einfach, falls noetig mit denen aus dieser Liste
+ // ausgetauscht. Am Ende von ReadData wird die Liste wieder zerstoert.
+ E3dObjList *pLoadedE3dPolyObjs;
+
+ if (ImpCheckSubRecords (rHead, rIn))
+ {
+ // leider kann das E3dLatheObj nicht auf E3dObject abgestuetzt werden,
+ // da neue Member hinzugekommen sind und die Kompatibilitaet erhalten
+ // bleiben muss.
+ SdrAttrObj::ReadData(rHead, rIn);
+ if ((rIn.GetVersion() < 3560) || (rHead.GetVersion() <= 12))
+ {
+ ReadData31(rHead, rIn);
+ return;
+ }
+
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+#ifdef DBG_UTIL
+ aCompat.SetID("E3dSphereObj");
+#endif
+ // dann die Member
+ BOOL bMyDoubleSided;
+
+ // [FG]: Es wird erstmal gelesen was da ist, ob es vollstaendig ist zeigt sich bei
+ // dem Aufruf von CreateSphere, dort werden die fehlenden Flaechen einfach
+ // erzeugt.
+ pLoadedE3dPolyObjs = new E3dObjList(NULL, NULL);
+ pLoadedE3dPolyObjs->SetOwnerObj(this);
+ pLoadedE3dPolyObjs->SetListKind(SDROBJLIST_GROUPOBJ);
+ pLoadedE3dPolyObjs->Load(rIn, *pPage);
+ E3dObject::ReadOnlyOwnMembers(rHead, rIn);
+
+ if (aCompat.GetBytesLeft ())
+ {
+ // neue Member
+ rIn >> nHSegments;
+ rIn >> nVSegments;
+ rIn >> aCenter;
+ rIn >> aSize;
+ if (aCompat.GetBytesLeft ())
+ {
+ rIn >> bMyDoubleSided;
+ SetDoubleSided (bMyDoubleSided); // FG: Member des E3dCompounds wird dort eigentlich
+ } // sowieso nochmal gemacht, ist aber sicherer so.
+
+ if (aCompat.GetBytesLeft())
+ {
+ // Ab Version 395 (8.6.98): Parameter aus dem Objekt
+ // E3dCompoundObject. Da irgendwann mal jemand die Ableitungs-
+ // hierarchie beim FileFormat unterbrochen hat, wurden diese Attribute
+ // bisher NOCH NIE gespeichert (Grrr). Diese Stelle muss nun natuerlich
+ // auch IMMER MITGEPFLEGT werden, wenn sich Parameter in
+ // E3dCompoundObject oder E3dObject aendern.
+ BOOL bTmp;
+ UINT16 nTmp16;
+
+ rIn >> bTmp; bDoubleSided = bTmp;
+ rIn >> bTmp; bCreateNormals = bTmp;
+ rIn >> bTmp; bCreateTexture = bTmp;
+ rIn >> bTmp; bUseStdNormals = bTmp;
+ rIn >> bTmp; bUseStdNormalsUseSphere = bTmp;
+ rIn >> bTmp; bUseStdTextureX = bTmp;
+ rIn >> bTmp; bUseStdTextureXUseSphere = bTmp;
+ rIn >> bTmp; bUseStdTextureY = bTmp;
+ rIn >> bTmp; bUseStdTextureYUseSphere = bTmp;
+ rIn >> bTmp; bShadow3D = bTmp;
+ aFrontMaterial.ReadData(rIn);
+ aBackMaterial.ReadData(rIn);
+ rIn >> nTmp16; eTextureKind = Base3DTextureKind(nTmp16);
+ rIn >> nTmp16; eTextureMode = Base3DTextureMode(nTmp16);
+ rIn >> bTmp; bInvertNormals = bTmp;
+ }
+
+ // neu ab 534: (hat noch gefehlt)
+ if (aCompat.GetBytesLeft () >= sizeof (BOOL))
+ {
+ BOOL bTmp;
+ rIn >> bTmp; bFilterTexture = bTmp;
+ }
+ }
+ else
+ {
+ DBG_ERROR("AW: Kugel laden: nicht vorgesehener Fall");
+ }
+ pLoadedE3dPolyObjs->Clear();
+ delete pLoadedE3dPolyObjs;
+ }
+
+ // Geometrie neu erzeugen
+ ReCreateGeometry();
+}
+
+/*************************************************************************
+|*
+|* Zuweisungsoperator
+|*
+\************************************************************************/
+
+void E3dSphereObj::operator=(const SdrObject& rObj)
+{
+ // erstmal alle Childs kopieren
+ E3dCompoundObject::operator=(rObj);
+
+ // weitere Parameter kopieren
+ const E3dSphereObj& r3DObj = (const E3dSphereObj&) rObj;
+
+ nHSegments = r3DObj.nHSegments;
+ nVSegments = r3DObj.nVSegments;
+ aCenter = r3DObj.aCenter;
+ aSize = r3DObj.aSize;
+}
+
+/*************************************************************************
+|*
+|* uebergebene Transformationsmatrix anwenden
+|*
+\************************************************************************/
+
+void E3dSphereObj::ApplyTransform(const Matrix4D& rMatrix)
+{
+ // call parent
+ E3dCompoundObject::ApplyTransform(rMatrix);
+
+ // Anwenden auf lokale geometrie
+ Vector3D aOuterEdge = aCenter + aSize;
+ aCenter *= rMatrix;
+ aOuterEdge *= rMatrix;
+ aSize = aOuterEdge - aCenter;
+}
+
+/*************************************************************************
+|*
+|* Lokale Parameter setzen mit Geometrieneuerzeugung
+|*
+\************************************************************************/
+
+void E3dSphereObj::SetHSegments(long nNew)
+{
+ if(nHSegments != nNew)
+ {
+ nHSegments = nNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dSphereObj::SetVSegments(long nNew)
+{
+ if(nVSegments != nNew)
+ {
+ nVSegments = nNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dSphereObj::SetCenter(const Vector3D& rNew)
+{
+ if(aCenter != rNew)
+ {
+ aCenter = rNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+void E3dSphereObj::SetSize(const Vector3D& rNew)
+{
+ if(aSize != rNew)
+ {
+ aSize = rNew;
+ bGeometryValid = FALSE;
+ }
+}
+
+/*************************************************************************
+|*
+|* Attribute setzen
+|*
+\************************************************************************/
+
+void E3dSphereObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ // call parent
+ E3dCompoundObject::NbcSetAttributes(rAttr, bReplaceAll);
+
+ // special Attr for E3dSphereObj
+ const SfxPoolItem* pPoolItem = NULL;
+
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_HORZ_SEGS, TRUE, &pPoolItem ) )
+ {
+ UINT32 nNew = ((const SfxUInt32Item*)pPoolItem)->GetValue();
+ SetHSegments(nNew);
+ }
+ if( SFX_ITEM_SET == rAttr.GetItemState( SID_ATTR_3D_VERT_SEGS, TRUE, &pPoolItem ) )
+ {
+ UINT32 nNew = ((const SfxUInt32Item*)pPoolItem)->GetValue();
+ SetVSegments(nNew);
+ }
+}
+
+/*************************************************************************
+|*
+|* Attribute lesen
+|*
+\************************************************************************/
+
+void E3dSphereObj::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+ // call parent
+ E3dCompoundObject::TakeAttributes(rAttr, bMerge, bOnlyHardAttr);
+
+ // special Attr for E3dSphereObj
+ const SfxPoolItem* pPoolItem = NULL;
+ SfxItemState eState;
+
+ long nObjHorzSegs = GetHSegments();
+ long nObjVertSegs = GetVSegments();
+
+ // HorizSegs
+ eState = rAttr.GetItemState(SID_ATTR_3D_HORZ_SEGS, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if((UINT32)nObjHorzSegs != ((const SfxUInt32Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_HORZ_SEGS);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt32Item(SID_ATTR_3D_HORZ_SEGS, nObjHorzSegs));
+ }
+ }
+
+ // VertSegs
+ eState = rAttr.GetItemState(SID_ATTR_3D_VERT_SEGS, FALSE, &pPoolItem);
+ if(eState == SFX_ITEM_SET)
+ {
+ // Ist gesetzt
+ if((UINT32)nObjVertSegs != ((const SfxUInt32Item*)pPoolItem)->GetValue())
+ {
+ // SfxPoolItem muss invalidiert werden
+ rAttr.InvalidateItem(SID_ATTR_3D_VERT_SEGS);
+ }
+ }
+ else
+ {
+ if(!(eState == SFX_ITEM_DONTCARE))
+ {
+ // Item gab es noch nicht, setze es
+ rAttr.Put(SfxUInt32Item(SID_ATTR_3D_VERT_SEGS, nObjVertSegs));
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (singular)
+|*
+\************************************************************************/
+
+void E3dSphereObj::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulSphere3d);
+}
+
+/*************************************************************************
+|*
+|* Get the name of the object (plural)
+|*
+\************************************************************************/
+
+void E3dSphereObj::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralSphere3d);
+}
+
+
diff --git a/svx/source/engine3d/string3d.src b/svx/source/engine3d/string3d.src
new file mode 100644
index 0000000000..56c78eb76f
--- /dev/null
+++ b/svx/source/engine3d/string3d.src
@@ -0,0 +1,338 @@
+/*************************************************************************
+ *
+ * $RCSfile: string3d.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 -------------------------------------------------------------------
+
+ // Strings fuer die Draw-Dialoge --------------------------------------------
+String RID_SVX_3D_CREATE_LATHE
+{
+ Text = "Erstelle 3D-Rotationsobjekt" ;
+ Text [ ENGLISH ] = "Create 3D-Latheobject" ;
+ Text [ english_us ] = "Create 3D rotation object" ;
+ Text [ italian ] = "Crea oggetto di rotazione 3D" ;
+ Text [ spanish ] = "Crear objeto de rotación 3D" ;
+ Text [ french ] = "Créer un objet de rotation 3D" ;
+ Text [ dutch ] = "3D-rotatieobjecten maken" ;
+ Text [ swedish ] = "Skapa 3D-rotationsobjekt" ;
+ Text [ danish ] = "Opret 3D-rotationslegeme" ;
+ Text [ portuguese_brazilian ] = "Erstelle 3D-Rotationsobjekt" ;
+ Text [ portuguese ] = "Criar objectos de rotação 3D" ;
+ Text[ chinese_simplified ] = "½¨Á¢ 3 άÐýתÌå";
+ Text[ russian ] = "Ñîçäàòü îáúåêò âðàùåíèÿ";
+ Text[ polish ] = "Utwórz 3-W obiekt obrotowy";
+ Text[ japanese ] = "3D ‘̉ñ“]µÌÞ¼Þª¸Ä‚Ìì¬";
+ Text[ chinese_traditional ] = "«Ø¥ß 3 ºû±ÛÂàÅé";
+ Text[ arabic ] = "ÅäÔÇÁ ßÇÆä ÇÓÊÏÇÑÉ ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ greek ] = "Äçìéïõñãßá ðåñéóôñåöüìåíïõ áíôéêåéìÝíïõ 3Ä";
+ Text[ korean ] = "3D ȸÀü°³Ã¼ ÀÛ¼º";
+ Text[ turkish ] = "3B döner nesne oluþtur";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVX_3D_UNDO_EXCHANGE_PASTE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Objekt(e) einfügen : Objekt(e) einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Objekt(e) einfügen : Objekt(e) einf³gen */
+ Text = "Objekt(e) einfügen" ;
+ Text [ ENGLISH ] = "Paste object(s)" ;
+ Text [ norwegian ] = "Lim inn objekt(er)" ;
+ Text [ italian ] = "Incolla oggetti" ;
+ Text [ portuguese_brazilian ] = "Colar objeto(s)" ;
+ Text [ portuguese ] = "Inserir objecto(s)" ;
+ Text [ finnish ] = "Liitä objekteja" ;
+ Text [ danish ] = "Indsæt objekt(er)" ;
+ Text [ french ] = "Insérer le(s) objet(s)" ;
+ Text [ swedish ] = "Infoga objekt" ;
+ Text [ dutch ] = "Object(en) invoegen" ;
+ Text [ spanish ] = "Insertar objeto(s)" ;
+ Text [ english_us ] = "Insert object(s)" ;
+ Text[ chinese_simplified ] = "²åÈë¶ÔÏó";
+ Text[ russian ] = "Âñòàâèòü îáúåêò(û)";
+ Text[ polish ] = "Wstaw obiekt (y)";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤Jª«¥ó";
+ Text[ arabic ] = "ÅÏÑÇÌ ßÇÆä/ßÇÆäÇÊ";
+ Text[ greek ] = "ÅéóáãùãÞ áíôéêåéìÝíïõ/-ùí";
+ Text[ korean ] = "°³Ã¼ »ðÀÔ";
+ Text[ turkish ] = "Nesne ekle";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVX_3D_UNDO_SEGMENTS
+{
+ Text = "Anzahl Segmente" ;
+ Text [ ENGLISH ] = "Segment counts" ;
+ Text [ english_us ] = "Number of segments" ;
+ Text [ dutch ] = "Aantal segmenten" ;
+ Text [ italian ] = "Numero dei segmenti" ;
+ Text [ spanish ] = "Número de segmentos" ;
+ Text [ french ] = "Nombre de segments" ;
+ Text [ swedish ] = "Antal segment" ;
+ Text [ danish ] = "Antal segmenter" ;
+ Text [ portuguese ] = "Número de segmentos" ;
+ Text [ portuguese_brazilian ] = "Anzahl Segmente" ;
+ Text[ chinese_simplified ] = "·Ö¶ÎÊýÄ¿";
+ Text[ russian ] = "Êîëè÷åñòâî ñåãìåíòîâ";
+ Text[ polish ] = "Liczba segmentów";
+ Text[ japanese ] = "ؕЂ̔";
+ Text[ chinese_traditional ] = "¤À¬q¼Æ¥Ø";
+ Text[ arabic ] = "ÚÏÏ ÇáÞØÚ";
+ Text[ greek ] = "Áñéèìüò ôìçìÜôùí";
+ Text[ korean ] = "¼¼±×¸ÕÆ® ¼ö";
+ Text[ turkish ] = "Parça sayýsý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVX_3D_UNDO_DEEPTH
+{
+ Text = "Objekttiefe" ;
+ Text [ ENGLISH ] = "Objectdeepth" ;
+ Text [ english_us ] = "Object depth" ;
+ Text [ dutch ] = "Objectdiepte" ;
+ Text [ italian ] = "Profondità oggetto" ;
+ Text [ spanish ] = "Profundidad del objeto" ;
+ Text [ french ] = "Profondeur de l'objet" ;
+ Text [ swedish ] = "Objektdjup" ;
+ Text [ danish ] = "Objektdybde" ;
+ Text [ portuguese ] = "Profundidade do objecto" ;
+ Text [ portuguese_brazilian ] = "Objekttiefe" ;
+ Text[ chinese_simplified ] = "¶ÔÏóÉî¶È";
+ Text[ russian ] = "Ãëóáèíà îáúåêòà";
+ Text[ polish ] = "G³êbia obiektu";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä‚̉œs‚«";
+ Text[ chinese_traditional ] = "ª«¥ó²`«×";
+ Text[ arabic ] = "ÚãÞ ÇáßÇÆä";
+ Text[ greek ] = "ÂÜèïò áíôéêåéìÝíïõ";
+ Text[ korean ] = "°³Ã¼ ±íÀÌ";
+ Text[ turkish ] = "Nesne derinliði";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVX_3D_UNDO_FOCAL
+{
+ Text = "Kamerabrennweite" ;
+ Text [ ENGLISH ] = "Focal length" ;
+ Text [ english_us ] = "Focal length" ;
+ Text [ italian ] = "Ampiezza focale" ;
+ Text [ spanish ] = "Distancia focal" ;
+ Text [ french ] = "Focale de la caméra" ;
+ Text [ dutch ] = "Focus" ;
+ Text [ swedish ] = "Kamerabrännvidd" ;
+ Text [ danish ] = "Kamerabrændvidde" ;
+ Text [ portuguese ] = "Distância focal" ;
+ Text [ portuguese_brazilian ] = "Kamerabrennweite" ;
+ Text[ chinese_simplified ] = "ÕÕÏà»ú½¹¾à";
+ Text[ russian ] = "Ôîêóñíîå ðàññòîÿíèå ôîòîàïïàðàòà";
+ Text[ polish ] = "Ogniskowa kamery";
+ Text[ japanese ] = "¶ÒׂÌÅ“_‹——£";
+ Text[ chinese_traditional ] = "·Ó¬Û¾÷µJ¶Z";
+ Text[ arabic ] = "ÇáØæá ÇáÈÄÑí ááßÇãíÑÇ";
+ Text[ greek ] = "ÅóôéáêÞ áðüóôáóç êÜìåñáò";
+ Text[ korean ] = "Ä«¸Þ¶ó ÃÊÁ¡ °Å¸®";
+ Text[ turkish ] = "Kamera odak uzaklýðý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVX_3D_UNDO_CAMPOS
+{
+ Text = "Kameraposition" ;
+ Text [ ENGLISH ] = "Cameraposition" ;
+ Text [ english_us ] = "Camera position" ;
+ Text [ dutch ] = "Camerapositie" ;
+ Text [ italian ] = "Posizione focale" ;
+ Text [ spanish ] = "Posición de la cámara" ;
+ Text [ french ] = "Position de la caméra" ;
+ Text [ swedish ] = "Kameraposition" ;
+ Text [ danish ] = "Kameraposition" ;
+ Text [ portuguese ] = "Posição da câmara" ;
+ Text [ portuguese_brazilian ] = "Kameraposition" ;
+ Text[ chinese_simplified ] = "ÕÕÏà»úλÖÃ";
+ Text[ russian ] = "Ïîçèöèÿ ôîòîàïïàðàòà";
+ Text[ polish ] = "Pozycja kamery";
+ Text[ japanese ] = "¶Ò׈ʒu";
+ Text[ chinese_traditional ] = "·Ó¬Û¾÷¦ì¸m";
+ Text[ arabic ] = "ãæÖÚ ÇáßÇãíÑÇ";
+ Text[ greek ] = "ÈÝóç ðáñáôçñçôÞ";
+ Text[ korean ] = "Ä«¸Þ¶ó À§Ä¡";
+ Text[ turkish ] = "Kamera konumu";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVX_3D_UNDO_ROTATE
+{
+ Text = "3D-Objekt rotieren" ;
+ Text [ ENGLISH ] = "Rotate 3D-Object" ;
+ Text [ english_us ] = "Rotate 3D object" ;
+ Text [ dutch ] = "3D-object roteren" ;
+ Text [ italian ] = "Ruota oggetto 3d" ;
+ Text [ spanish ] = "Rodar un objeto 3D" ;
+ Text [ french ] = "Rotation de l'objet 3D" ;
+ Text [ swedish ] = "Rotera 3D-objekt" ;
+ Text [ danish ] = "Roter 3D-objekt" ;
+ Text [ portuguese ] = "Rodar objecto 3D" ;
+ Text [ portuguese_brazilian ] = "3D-Objekt rotieren" ;
+ Text[ chinese_simplified ] = "Ðýת 3 ά¶ÔÏó";
+ Text[ russian ] = "Âðàùàòü îáúåêò";
+ Text[ polish ] = "Obróæ obiekt 3-W";
+ Text[ japanese ] = "3D ‘̵ÌÞ¼Þª¸Ä‚̉ñ“]";
+ Text[ chinese_traditional ] = "±ÛÂà 3 ºûª«¥ó";
+ Text[ arabic ] = "ÇÓÊÏÇÑÉ ßÇÆä ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ greek ] = "ÐåñéóôñïöÞ áíôéêåéìÝíïõ 3Ä";
+ Text[ korean ] = "3D °³Ã¼ ȸÀü";
+ Text[ turkish ] = "3B nesneyi döndür";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVX_3D_UNDO_EXTRUDE
+{
+ Text = "Extrusionsobjekt erstellen" ;
+ Text [ ENGLISH ] = "Create Extrusionobject" ;
+ Text [ english_us ] = "Create extrusion object" ;
+ Text [ dutch ] = "Extrusie-object maken" ;
+ Text [ italian ] = "Creare un oggetto di estrusione" ;
+ Text [ spanish ] = "Crear un objeto de extrusión" ;
+ Text [ french ] = "Créer un objet d'extrusion" ;
+ Text [ swedish ] = "Skapa extrusionsobjekt" ;
+ Text [ danish ] = "Opret ekstruderingsobjekt" ;
+ Text [ portuguese ] = "Criar objecto de extrusão" ;
+ Text [ portuguese_brazilian ] = "Extrusionsobjekt erstellen" ;
+ Text[ chinese_simplified ] = "Éú³Éģѹʽ¶ÔÏó";
+ Text[ russian ] = "Ñîçäàòü îáúåêò ýêñòðóçèè";
+ Text[ polish ] = "Utwórz obiekt wyt³aczany";
+ Text[ japanese ] = "•‚‚«o‚µµÌÞ¼Þª¸Ä‚Ìì¬";
+ Text[ chinese_traditional ] = "¥Í¦¨¼ÒÀ£¦¡ª«¥ó";
+ Text[ arabic ] = "ÅäÔÇÁ ßÇÆä ÞÐÝ";
+ Text[ greek ] = "Äçìéïõñãßá áíôéêåéìÝíïõ åîþèçóçò";
+ Text[ korean ] = "ÀÔü¸é °³Ã¼ ÀÛ¼º";
+ Text[ turkish ] = "Kalýp nesne oluþtur";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVX_3D_UNDO_LATHE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Rotationskörper erstellen : Rotationsk÷rper erstellen */
+ /* ### ACHTUNG: Neuer Text in Resource? Rotationskörper erstellen : Rotationsk÷rper erstellen */
+ Text = "Rotationskörper erstellen" ;
+ Text [ ENGLISH ] = "Create Rotationobject" ;
+ Text [ english_us ] = "Create rotation object" ;
+ Text [ dutch ] = "Rotatieobject maken" ;
+ Text [ italian ] = "Creare un oggetto di rotazione" ;
+ Text [ spanish ] = "Crear cuerpo de rotación" ;
+ Text [ french ] = "Créer corps de révolution" ;
+ Text [ swedish ] = "Skapa rotationsobjekt" ;
+ Text [ danish ] = "Opret rotationslegeme" ;
+ Text [ portuguese ] = "Criar objecto de rotação" ;
+ Text [ portuguese_brazilian ] = "Rotationskörper erstellen" ;
+ Text[ chinese_simplified ] = "ÖÆ×÷ÐýתÌå";
+ Text[ russian ] = "Ñîçäàòü òåëî âðàùåíèÿ";
+ Text[ polish ] = "Utwórz obiekt obrotowy";
+ Text[ japanese ] = "‰ñ“]µÌÞk¼Þª¸Ä‚Ìì¬";
+ Text[ chinese_traditional ] = "¨î§@±ÛÂàÅé";
+ Text[ arabic ] = "ÅäÔÇÁ ÌÓã ÇÓÊÏÇÑÉ";
+ Text[ greek ] = "Äçìéïõñãßá ðåñéóôñåöüìåíïõ áíôéêåéìÝíïõ";
+ Text[ korean ] = "ȸÀü °³Ã¼ ÀÛ¼º";
+ Text[ turkish ] = "Döner nesne oluþtur";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVX_3D_UNDO_BREAK_LATHE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Rotationskörper aufbrechen : Rotationsk÷rper aufbrechen */
+ /* ### ACHTUNG: Neuer Text in Resource? Rotationskörper aufbrechen : Rotationsk÷rper aufbrechen */
+ Text = "3D-Objekt aufbrechen" ;
+ Text [ ENGLISH ] = "Break 3-D object" ;
+ Text [ english_us ] = "Split 3D object" ;
+ Text [ portuguese ] = "Subdividir objecto 3-D" ;
+ Text [ portuguese_brazilian ] = "Rotationskörper aufbrechen" ;
+ Text [ swedish ] = "Dela upp 3D-objekt" ;
+ Text [ danish ] = "Opdel 3D-rotationslegeme" ;
+ Text [ italian ] = "Separa oggetto 3D" ;
+ Text [ spanish ] = "Quebrar objeto 3D" ;
+ Text [ french ] = "Fractionner l'objet 3D" ;
+ Text [ dutch ] = "3D-object opsplitsen" ;
+ Text[ chinese_simplified ] = "·Ö¿ª 3 ά¶ÔÏó";
+ Text[ russian ] = "Ðàçáèòü 3-Ì-Îáúåêò";
+ Text[ polish ] = "Rozdziel obiekt 3-W";
+ Text[ japanese ] = "3D ‘̵ÌÞ¼Þª¸Ä‚Ì•ªŠ„";
+ Text[ chinese_traditional ] = "¤À¶} 3 ºûª«¥ó";
+ Text[ arabic ] = "ÊÞÓíã ßÇÆä ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ greek ] = "ÄéÜóðáóç áíôéêåéìÝíïõ 3Ä";
+ Text[ korean ] = "3D °³Ã¼ ºÐÇÒ";
+ Text[ turkish ] = "3B nesneyi ayýr";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVX_3D_UNDO_ATTRIBUTES
+{
+ Text = "3D-Attribute" ;
+ Text [ ENGLISH ] = "3D attributes" ;
+ Text [ portuguese ] = "Atributos 3-D" ;
+ Text [ english_us ] = "3D Attributes" ;
+ Text [ portuguese_brazilian ] = "3D-Attribute" ;
+ Text [ swedish ] = "3D-attribut" ;
+ Text [ danish ] = "3D-attributter" ;
+ Text [ italian ] = "Attributi 3D" ;
+ Text [ spanish ] = "Atributos en 3D" ;
+ Text [ french ] = "Attributs 3D" ;
+ Text [ dutch ] = "3D-attributen" ;
+ Text[ chinese_simplified ] = "3 άÊôÐÔ";
+ Text[ russian ] = "Àòðèáóòû 3-Ì";
+ Text[ polish ] = "Atrybuty 3-W";
+ Text[ japanese ] = "3D ‘Ì‚Ì‘®«";
+ Text[ chinese_traditional ] = "3 ºûÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ËáÇËíÉ ÇáÃÈÚÇÏ";
+ Text[ greek ] = "Éäéüôçôåò 3Ä";
+ Text[ korean ] = "3D ¼Ó¼º";
+ Text[ turkish ] = "3B öznitelikler";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
new file mode 100644
index 0000000000..f3d234df97
--- /dev/null
+++ b/svx/source/engine3d/view3d.cxx
@@ -0,0 +1,2261 @@
+/*************************************************************************
+ *
+ * $RCSfile: view3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ITEMID_COLOR 0
+
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+
+#ifndef _SVDOGRP_HXX
+#include "svdogrp.hxx"
+#endif
+
+#ifndef _SVDOPATH_HXX
+#include "svdopath.hxx"
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVDITER_HXX
+#include "svditer.hxx"
+#endif
+
+#ifndef _SVDPOOL_HXX
+#include "svdpool.hxx"
+#endif
+
+#ifndef _SVDORECT_HXX
+#include "svdorect.hxx"
+#endif
+
+#ifndef _SVDMODEL_HXX
+#include "svdmodel.hxx"
+#endif
+
+#ifndef _SVDPAGV_HXX
+#include "svdpagv.hxx"
+#endif
+
+#ifndef _XOUTX_HXX
+#include "xoutx.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include <svxids.hrc>
+#endif
+
+#ifndef _SVX_COLRITEM_HXX
+#include "colritem.hxx"
+#endif
+
+#ifndef _XTABLE_HXX
+#include "xtable.hxx"
+#endif
+
+#ifndef _SVDVIEW_HXX
+#include "svdview.hxx"
+#endif
+
+#ifndef _SVX_DIALOGS_HRC
+#include "dialogs.hrc"
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+#ifndef _E3D_OBJ3D_HXX
+#include "obj3d.hxx"
+#endif
+
+#ifndef _E3D_LATHE3D_HXX
+#include "lathe3d.hxx"
+#endif
+
+#ifndef _E3D_SPHERE3D_HXX
+#include "sphere3d.hxx"
+#endif
+
+#ifndef _E3D_EXTRUD3D_HXX
+#include "extrud3d.hxx"
+#endif
+
+#ifndef _E3D_CUBE3D_HXX
+#include "cube3d.hxx"
+#endif
+
+#ifndef _E3D_POLYOB3D_HXX
+#include "polyob3d.hxx"
+#endif
+
+#ifndef _E3D_DLIGHT3D_HXX
+#include "dlight3d.hxx"
+#endif
+
+#ifndef _E3D_POLYSC3D_HXX
+#include "polysc3d.hxx"
+#endif
+
+#ifndef _E3D_DRAGMT3D_HXX
+#include "dragmt3d.hxx"
+#endif
+
+#ifndef _E3D_VIEW3D_HXX
+#include "view3d.hxx"
+#endif
+
+#ifndef _SVDUNDO_HXX
+#include "svdundo.hxx"
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX
+#include "xflclit.hxx"
+#endif
+
+#ifndef _SVX_XLNCLIT_HXX
+#include "xlnclit.hxx"
+#endif
+
+#ifndef _SVDOGRAF_HXX
+#include <svdograf.hxx>
+#endif
+
+#ifndef _SVX_XBTMPIT_HXX
+#include <xbtmpit.hxx>
+#endif
+
+#ifndef _SVX_XFLBMTIT_HXX
+#include <xflbmtit.hxx>
+#endif
+
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+
+#include "xlnwtit.hxx"
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+
+TYPEINIT1(E3dView, SdrView);
+
+long Scalar (Point aPoint1,
+ Point aPoint2);
+
+Point ScaleVector (Point aPoint,
+ double nScale);
+
+double NormVector (Point aPoint);
+
+BOOL LineCutting (Point aP1,
+ Point aP2,
+ Point aP3,
+ Point aP4);
+
+long Point2Line (Point aP1,
+ Point aP2,
+ Point aP3);
+
+long DistPoint2Line (Point u,
+ Point v1,
+ Point v);
+
+/*************************************************************************
+|*
+|* Konstruktor 1
+|*
+\************************************************************************/
+
+E3dView::E3dView(SdrModel* pModel, OutputDevice* pOut) :
+ SdrView(pModel, pOut)
+{
+ InitView ();
+}
+
+/*************************************************************************
+|*
+|* Konstruktor 2
+|*
+\************************************************************************/
+
+E3dView::E3dView(SdrModel* pModel, ExtOutputDevice* pExtOut) :
+ SdrView(pModel, pExtOut)
+{
+ InitView ();
+}
+
+/*************************************************************************
+|*
+|* Konstruktor 3
+|*
+\************************************************************************/
+
+E3dView::E3dView(SdrModel* pModel) :
+ SdrView(pModel)
+{
+ InitView ();
+}
+
+/*************************************************************************
+|*
+|* DrawMarkedObj ueberladen, da eventuell nur einzelne 3D-Objekte
+|* gezeichnet werden sollen
+|*
+\************************************************************************/
+
+void E3dView::DrawMarkedObj(OutputDevice& rOut, const Point& rOfs) const
+{
+ // Existieren 3D-Objekte, deren Szenen nicht selektiert sind?
+ BOOL bSpecialHandling = FALSE;
+ E3dScene *pScene = NULL;
+
+ long nCnt = aMark.GetMarkCount();
+ for(long nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dCompoundObject))
+ {
+ // zugehoerige Szene
+ pScene = ((E3dCompoundObject*)pObj)->GetScene();
+ if(pScene && !IsObjMarked(pScene))
+ bSpecialHandling = TRUE;
+ }
+ // Alle SelectionFlags zuruecksetzen
+ if(pObj && pObj->ISA(E3dObject))
+ {
+ pScene = ((E3dObject*)pObj)->GetScene();
+ if(pScene)
+ pScene->SetSelected(FALSE);
+ }
+ }
+
+ if(bSpecialHandling)
+ {
+ // SelectionFlag bei allen zu 3D Objekten gehoerigen
+ // Szenen und deren Objekten auf nicht selektiert setzen
+ long nObjs;
+ for(nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dCompoundObject))
+ {
+ // zugehoerige Szene
+ pScene = ((E3dCompoundObject*)pObj)->GetScene();
+ if(pScene)
+ pScene->SetSelected(FALSE);
+ }
+ }
+
+ // bei allen direkt selektierten Objekten auf selektiert setzen
+ SdrMark* pM = NULL;
+
+ for(nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dObject))
+ {
+ // Objekt markieren
+ E3dObject* p3DObj = (E3dObject*)pObj;
+ p3DObj->SetSelected(TRUE);
+ pScene = p3DObj->GetScene();
+ pM = aMark.GetMark(nObjs);
+ }
+ }
+
+ if(pScene)
+ {
+ // code from parent
+ ((E3dView*)this)->aMark.ForceSort();
+ pXOut->SetOutDev(&rOut);
+ SdrPaintInfoRec aInfoRec;
+ aInfoRec.nPaintMode|=SDRPAINTMODE_ANILIKEPRN;
+
+ Point aOfs(-rOfs.X(), -rOfs.Y());
+ aOfs += pM->GetPageView()->GetOffset();
+
+ if(aOfs != pXOut->GetOffset())
+ pXOut->SetOffset(aOfs);
+
+ pScene->SetDrawOnlySelected(TRUE);
+ pScene->Paint(*pXOut,aInfoRec);
+ pScene->SetDrawOnlySelected(FALSE);
+
+ pXOut->SetOffset(Point(0,0));
+ }
+
+ // SelectionFlag zuruecksetzen
+ for(nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dCompoundObject))
+ {
+ // zugehoerige Szene
+ pScene = ((E3dCompoundObject*)pObj)->GetScene();
+ if(pScene)
+ pScene->SetSelected(FALSE);
+ }
+ }
+ }
+ else
+ {
+ // call parent
+ SdrExchangeView::DrawMarkedObj(rOut, rOfs);
+ }
+}
+
+/*************************************************************************
+|*
+|* Model holen ueberladen, da bei einzelnen 3D Objekten noch eine Szene
+|* untergeschoben werden muss
+|*
+\************************************************************************/
+
+SdrModel* E3dView::GetMarkedObjModel() const
+{
+ // Existieren 3D-Objekte, deren Szenen nicht selektiert sind?
+ BOOL bSpecialHandling = FALSE;
+ E3dScene *pScene = NULL;
+
+ long nCnt = aMark.GetMarkCount();
+ for(long nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dCompoundObject))
+ {
+ // zugehoerige Szene
+ pScene = ((E3dCompoundObject*)pObj)->GetScene();
+ if(pScene && !IsObjMarked(pScene))
+ bSpecialHandling = TRUE;
+ }
+ // Alle SelectionFlags zuruecksetzen
+ if(pObj && pObj->ISA(E3dObject))
+ {
+ pScene = ((E3dObject*)pObj)->GetScene();
+ if(pScene)
+ pScene->SetSelected(FALSE);
+ }
+ }
+
+ SdrModel* pNewModel = 0L;
+ if(bSpecialHandling)
+ {
+ // SelectionFlag bei allen zu 3D Objekten gehoerigen
+ // Szenen und deren Objekten auf nicht selektiert setzen
+ long nObjs;
+ for(nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dCompoundObject))
+ {
+ // zugehoerige Szene
+ pScene = ((E3dCompoundObject*)pObj)->GetScene();
+ if(pScene)
+ pScene->SetSelected(FALSE);
+ }
+ }
+ // bei allen direkt selektierten Objekten auf selektiert setzen
+ for(nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dObject))
+ {
+ // Objekt markieren
+ E3dObject* p3DObj = (E3dObject*)pObj;
+ p3DObj->SetSelected(TRUE);
+ }
+ }
+
+ // Neue MarkList generieren, die die betroffenen
+ // Szenen als markierte Objekte enthaelt
+ SdrMarkList aOldML(aMark); // alte Marklist merken
+ SdrMarkList aNewML; // neue leere Marklist
+ ((E3dView*)this)->aMark = aNewML;
+
+ for(nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aOldML.GetMark(nObjs)->GetObj();
+ if(pObj)
+ {
+ if(pObj->ISA(E3dCompoundObject))
+ {
+ // zugehoerige Szene holen
+ pScene = ((E3dCompoundObject*)pObj)->GetScene();
+ if(pScene)
+ pObj = pScene;
+ }
+
+ // Keine Objekte doppelt markieren
+ // (dies koennten nur Szenen sein)
+ if(!IsObjMarked(pObj))
+ {
+ USHORT nAnz=GetPageViewCount();
+ for (USHORT nv=0; nv<nAnz; nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ ((E3dView*)this)->MarkObj(pObj,pPV,FALSE,TRUE);
+ }
+ }
+ }
+ }
+
+ // call parent
+ pNewModel = SdrView::GetMarkedObjModel();
+
+ // Alle Szenen im kopierten Model in Ihren Ausdehnungen Korrigieren
+ // und IsSelected zuruecksetzen
+ if(pNewModel)
+ {
+ for(UINT16 nPg=0; nPg < pNewModel->GetPageCount(); nPg++)
+ {
+ const SdrPage* pSrcPg=pNewModel->GetPage(nPg);
+ UINT32 nObAnz=pSrcPg->GetObjCount();
+
+ // Unterobjekte von Szenen einfuegen
+ for(UINT32 nOb=0; nOb<nObAnz; nOb++)
+ {
+ const SdrObject* pSrcOb=pSrcPg->GetObj(nOb);
+ if(pSrcOb->ISA(E3dScene))
+ {
+ pScene = (E3dScene*)pSrcOb;
+ pScene->CorrectSceneDimensions();
+ pScene->SetSelected(FALSE);
+ }
+ }
+ }
+ }
+
+ // Alte Liste wieder setzen
+ ((E3dView*)this)->aMark = aOldML;
+
+ // SelectionFlag zuruecksetzen
+ for(nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dCompoundObject))
+ {
+ // zugehoerige Szene
+ pScene = ((E3dCompoundObject*)pObj)->GetScene();
+ if(pScene)
+ pScene->SetSelected(FALSE);
+ }
+ }
+ }
+ else
+ {
+ // call parent
+ pNewModel = SdrView::GetMarkedObjModel();
+ }
+
+ // model zurueckgeben
+ return pNewModel;
+}
+
+/*************************************************************************
+|*
+|* Bei Paste muss - falls in eine Scene eingefuegt wird - die
+|* Objekte der Szene eingefuegt werden, die Szene selbst aber nicht
+|*
+\************************************************************************/
+
+BOOL E3dView::Paste(const SdrModel& rMod, const Point& rPos,
+ SdrObjList* pLst, UINT32 nOptions)
+{
+ BOOL bRetval = FALSE;
+
+ // Liste holen
+ Point aPos(rPos);
+ SdrObjList* pDestList = pLst;
+ ImpGetPasteObjList(aPos,pDestList);
+ if(pDestList==NULL)
+ return FALSE;
+
+ // Owner der Liste holen
+ SdrObject* pOwner = pDestList->GetOwnerObj();
+ if(pOwner && pOwner->ISA(E3dScene))
+ {
+ E3dScene* pDestScene = (E3dScene*)pOwner;
+ B3dCamera& rCameraSetDst = pDestScene->GetCameraSet();
+ BOOL bDstInserted = FALSE;
+ BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_EXCHANGE_PASTE));
+
+ // Alle Objekte aus E3dScenes kopieren und direkt einfuegen
+ for(UINT16 nPg=0; nPg < rMod.GetPageCount(); nPg++)
+ {
+ const SdrPage* pSrcPg=rMod.GetPage(nPg);
+ UINT32 nObAnz=pSrcPg->GetObjCount();
+
+ // Unterobjekte von Szenen einfuegen
+ for(UINT32 nOb=0; nOb<nObAnz; nOb++)
+ {
+ const SdrObject* pSrcOb=pSrcPg->GetObj(nOb);
+ if(pSrcOb->ISA(E3dScene))
+ {
+ E3dScene* pSrcScene = (E3dScene*)pSrcOb;
+ B3dCamera& rCameraSetSrc = pSrcScene->GetCameraSet();
+
+ for(UINT32 i = 0;i < pSrcScene->GetSubList()->GetObjCount(); i++)
+ {
+ SdrObject* pObj = pSrcScene->GetSubList()->GetObj(i);
+ if(pObj && pObj->ISA(E3dCompoundObject))
+ {
+ // Kopieren
+ E3dObject* pNew = (E3dObject*)pObj->Clone(
+ pDestScene->GetPage(), pDestScene->GetModel());
+ if(pNew)
+ {
+ // Neues Objekt in Szene einfuegen
+ pNew->NbcSetLayer(pObj->GetLayer());
+ pNew->NbcSetStyleSheet(pObj->GetStyleSheet(), TRUE);
+ pDestScene->Insert3DObj(pNew);
+ bDstInserted = TRUE;
+
+ // Transformation ObjectToEye Src
+ Matrix4D aMatSrc;
+ aMatSrc = ((E3dCompoundObject*)pObj)->GetFullTransform();
+ aMatSrc *= rCameraSetSrc.GetOrientation();
+
+ // Tanslation und scale von source
+ B3dVolume aDevVolSrc = rCameraSetSrc.GetDeviceVolume();
+
+ // auf Augkoordinaten umstellen
+ double fTemp = aDevVolSrc.MinVec().Z();
+ aDevVolSrc.MinVec().Z() = -aDevVolSrc.MaxVec().Z();
+ aDevVolSrc.MaxVec().Z() = -fTemp;
+
+ Vector3D aProjScaleSrc(
+ 2.0 / aDevVolSrc.GetWidth(),
+ 2.0 / aDevVolSrc.GetHeight(),
+ 2.0 / aDevVolSrc.GetDepth());
+ Vector3D aProjTransSrc(
+ -1.0 * ((aDevVolSrc.MaxVec().X() + aDevVolSrc.MinVec().X()) / aDevVolSrc.GetWidth()),
+ -1.0 * ((aDevVolSrc.MaxVec().Y() + aDevVolSrc.MinVec().Y()) / aDevVolSrc.GetHeight()),
+ -1.0 * ((aDevVolSrc.MaxVec().Z() + aDevVolSrc.MinVec().Z()) / aDevVolSrc.GetDepth()));
+ Vector3D aViewScaleSrc(rCameraSetSrc.GetScale());
+ aViewScaleSrc.Z() = 1.0;
+
+ // Tanslation und scale von dest
+ B3dVolume aDevVolDst = rCameraSetDst.GetDeviceVolume();
+
+ // auf Augkoordinaten umstellen
+ fTemp = aDevVolDst.MinVec().Z();
+ aDevVolDst.MinVec().Z() = -aDevVolDst.MaxVec().Z();
+ aDevVolDst.MaxVec().Z() = -fTemp;
+
+ Vector3D aProjScaleDst(
+ 2.0 / aDevVolDst.GetWidth(),
+ 2.0 / aDevVolDst.GetHeight(),
+ 2.0 / aDevVolDst.GetDepth());
+ Vector3D aProjTransDst(
+ -1.0 * ((aDevVolDst.MaxVec().X() + aDevVolDst.MinVec().X()) / aDevVolDst.GetWidth()),
+ -1.0 * ((aDevVolDst.MaxVec().Y() + aDevVolDst.MinVec().Y()) / aDevVolDst.GetHeight()),
+ -1.0 * ((aDevVolDst.MaxVec().Z() + aDevVolDst.MinVec().Z()) / aDevVolDst.GetDepth()));
+ Vector3D aViewScaleDst(rCameraSetDst.GetScale());
+ aViewScaleDst.Z() = 1.0;
+
+ // Groesse des Objektes in Augkoordinaten Src
+ Volume3D aObjVolSrc;
+ aObjVolSrc.Union(((E3dCompoundObject*)pObj)->GetBoundVolume().GetTransformVolume(aMatSrc));
+
+ // Vorlaeufige Groesse in Augkoordinaten Dst
+ Matrix4D aMatZwi = aMatSrc;
+ aMatZwi.Scale(aProjScaleSrc);
+ aMatZwi.Translate(aProjTransSrc);
+ aMatZwi.Scale(aViewScaleSrc);
+
+ Matrix4D aMatDst;
+ aMatDst.Scale(aProjScaleDst);
+ aMatDst.Translate(aProjTransDst);
+ aMatDst.Scale(aViewScaleDst);
+ aMatDst.Invert();
+
+ aMatZwi *= aMatDst;
+
+ Volume3D aObjVolDst;
+ aObjVolDst.Union(((E3dCompoundObject*)pObj)->GetBoundVolume().GetTransformVolume(aMatZwi));
+
+ // Beide verhaeltnistiefen berechnen und mitteln
+ double fDepthOne = (aObjVolSrc.GetDepth() * aObjVolDst.GetWidth()) / aObjVolSrc.GetWidth();
+ double fDepthTwo = (aObjVolSrc.GetDepth() * aObjVolDst.GetHeight()) / aObjVolSrc.GetHeight();
+ double fWantedDepth = (fDepthOne + fDepthTwo) / 2.0;
+
+ // Faktor zum Tiefe anpassen bilden
+ double fFactor = fWantedDepth / aObjVolDst.GetDepth();
+ Vector3D aDepthScale(1.0, 1.0, fFactor);
+
+ // Endgueltige Transformation bilden
+ aMatSrc.Scale(aProjScaleSrc);
+ aMatSrc.Translate(aProjTransSrc);
+ aMatSrc.Scale(aViewScaleSrc);
+ aMatSrc.Scale(aDepthScale);
+
+ aMatDst = pDestScene->GetFullTransform();
+ aMatDst *= rCameraSetDst.GetOrientation();
+ aMatDst.Scale(aProjScaleDst);
+ aMatDst.Translate(aProjTransDst);
+ aMatDst.Scale(aViewScaleDst);
+ aMatDst.Invert();
+
+ aMatSrc *= aMatDst;
+
+ // Neue Objekttransformation setzen
+ pNew->NbcSetTransform(aMatSrc);
+
+ // Undo anlegen
+ AddUndo(new SdrUndoNewObj(*pNew));
+ }
+ }
+ }
+ }
+ }
+ }
+ EndUndo();
+
+ // DestScene anpassen
+ if(bDstInserted)
+ {
+ pDestScene->SetRectsDirty();
+ pDestScene->CorrectSceneDimensions();
+ }
+ }
+ else
+ {
+ // call parent
+ bRetval = SdrView::Paste(rMod, rPos, pLst, nOptions);
+ }
+
+ // und Rueckgabewert liefern
+ return bRetval;
+}
+
+/*************************************************************************
+|*
+|* 3D-Konvertierung moeglich?
+|*
+\************************************************************************/
+
+BOOL E3dView::IsConvertTo3DObjPossible() const
+{
+ BOOL bAny3D(FALSE);
+ BOOL bGroupSelected(FALSE);
+ BOOL bRetval(TRUE);
+
+ for(INT32 a=0;!bAny3D && a<aMark.GetMarkCount();a++)
+ {
+ SdrObject *pObj = aMark.GetMark(a)->GetObj();
+ if(pObj)
+ {
+ ImpIsConvertTo3DPossible(pObj, bAny3D, bGroupSelected);
+ }
+ }
+
+ bRetval = !bAny3D
+ && (
+ IsConvertToPolyObjPossible(FALSE)
+ || IsConvertToPathObjPossible(FALSE)
+ || IsImportMtfPossible());
+ return bRetval;
+}
+
+void E3dView::ImpIsConvertTo3DPossible(SdrObject* pObj, BOOL& rAny3D,
+ BOOL& rGroupSelected) const
+{
+ if(pObj)
+ {
+ if(pObj->ISA(E3dObject))
+ {
+ rAny3D = TRUE;
+ }
+ else
+ {
+ if(pObj->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pObj, IM_DEEPNOGROUPS);
+ while(aIter.IsMore())
+ {
+ SdrObject* pNewObj = aIter.Next();
+ ImpIsConvertTo3DPossible(pNewObj, rAny3D, rGroupSelected);
+ }
+ rGroupSelected = TRUE;
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* 3D-Konvertierung zu Extrude ausfuehren
+|*
+\************************************************************************/
+
+void E3dView::ImpChangeSomeAttributesFor3DConversion(SdrObject* pObj)
+{
+ SfxItemPool& rPool = pMod->GetItemPool();
+ SfxItemSet aSet(rPool);
+ pObj->TakeAttributes(aSet, TRUE, FALSE);
+ BOOL bChange(FALSE);
+
+ if(pObj->ISA(SdrTextObj))
+ {
+ const SvxColorItem& rTextColorItem = (const SvxColorItem&)aSet.Get(rPool.GetWhich(SID_ATTR_CHAR_COLOR));
+ if(rTextColorItem.GetValue() == RGB_Color(COL_BLACK))
+ {
+ // Bei schwarzen Textobjekten wird die Farbe auf grau gesetzt
+ SvxColorItem aNewTextColorItem(RGB_Color(COL_GRAY), rPool.GetWhich(SID_ATTR_CHAR_COLOR));
+ aSet.Put(aNewTextColorItem);
+ bChange = TRUE;
+ }
+ }
+
+ if(bChange)
+ {
+ // UNDO fuer Textfarbe Aenderung (nur bei nicht
+ // temporaeren Objekten)
+ if(pObj->GetPage())
+ AddUndo(new SdrUndoAttrObj(*pObj, FALSE, FALSE));
+ pObj->NbcSetAttributes(aSet, FALSE);
+ }
+}
+
+void E3dView::ImpChangeSomeAttributesFor3DConversion2(SdrObject* pObj)
+{
+ SfxItemPool& rPool = pMod->GetItemPool();
+ SfxItemSet aSet(rPool);
+ pObj->TakeAttributes(aSet, TRUE, FALSE);
+ BOOL bChange(FALSE);
+
+ if(pObj->ISA(SdrPathObj))
+ {
+ INT32 nLineWidth = ((const XLineWidthItem&)(aSet.Get(XATTR_LINEWIDTH))).GetValue();
+ XLineStyle eLineStyle = (XLineStyle)((const XLineStyleItem&)aSet.Get(XATTR_LINESTYLE)).GetValue();
+ XFillStyle eFillStyle = ITEMVALUE(aSet, XATTR_FILLSTYLE, XFillStyleItem);
+
+ if(((SdrPathObj*)pObj)->IsClosed() && eLineStyle == XLINE_SOLID && !nLineWidth && eFillStyle != XFILL_NONE)
+ {
+ aSet.Put(XLineStyleItem(XLINE_NONE));
+ aSet.Put(XLineWidthItem(0L));
+ bChange = TRUE;
+ }
+ }
+
+ if(bChange)
+ {
+ // UNDO fuer Textfarbe Aenderung (nur bei nicht
+ // temporaeren Objekten)
+ if(pObj->GetPage())
+ AddUndo(new SdrUndoAttrObj(*pObj, FALSE, FALSE));
+ pObj->NbcSetAttributes(aSet, FALSE);
+ }
+}
+
+void E3dView::ImpCreateSingle3DObjectFlat(E3dScene* pScene, SdrObject* pObj, BOOL bExtrude, double fDepth, Matrix4D& rLatheMat)
+{
+ // Einzelnes PathObject, dieses umwanden
+ SdrPathObj* pPath = PTR_CAST(SdrPathObj, pObj);
+
+ if(pPath)
+ {
+ E3dDefaultAttributes aDefault = Get3DDefaultAttributes();
+ if(bExtrude)
+ aDefault.SetDefaultExtrudeCharacterMode(TRUE);
+ else
+ aDefault.SetDefaultLatheCharacterMode(TRUE);
+
+ // ItemSet des Ursprungsobjektes holen
+ SfxItemPool& rPool = pMod->GetItemPool();
+ SfxItemSet aSet(rPool);
+ pObj->TakeAttributes(aSet, FALSE, TRUE);
+ XFillStyle eFillStyle = ITEMVALUE(aSet, XATTR_FILLSTYLE, XFillStyleItem);
+
+ // Linienstil ausschalten
+ aSet.Put(XLineStyleItem(XLINE_NONE));
+
+ // Feststellen, ob ein FILL_Attribut gesetzt ist.
+ if(!pPath->IsClosed() || eFillStyle == XFILL_NONE)
+ {
+ // Das SdrPathObj ist nicht gefuellt, lasse die
+ // vordere und hintere Flaeche weg. Ausserdem ist
+ // eine beidseitige Darstellung notwendig.
+ aDefault.SetDefaultExtrudeCloseFront(FALSE);
+ aDefault.SetDefaultExtrudeCloseBack(FALSE);
+ aDefault.SetDefaultDoubleSided(TRUE);
+
+ // Fuellattribut setzen
+ aSet.Put(XFillStyleItem(XFILL_SOLID));
+
+ // Fuellfarbe muss auf Linienfarbe, da das Objekt vorher
+ // nur eine Linie war
+ Color aColorLine = ((const XLineColorItem&)(aSet.Get(XATTR_LINECOLOR))).GetValue();
+ aSet.Put(XFillColorItem(String(), aColorLine));
+ }
+
+ // Neues Extrude-Objekt erzeugen
+ E3dObject* p3DObj = NULL;
+ if(bExtrude)
+ {
+ p3DObj = new E3dExtrudeObj(aDefault, pPath->GetPathPoly(), fDepth);
+ }
+ else
+ {
+ PolyPolygon3D aPolyPoly3D(pPath->GetPathPoly(), aDefault.GetDefaultLatheScale());
+ aPolyPoly3D.Transform(rLatheMat);
+ p3DObj = new E3dLatheObj(aDefault, aPolyPoly3D);
+ }
+
+ // Attribute setzen
+ if(p3DObj)
+ {
+ p3DObj->NbcSetLayer(pObj->GetLayer());
+ p3DObj->NbcSetAttributes(aSet, FALSE);
+ p3DObj->NbcSetStyleSheet(pObj->GetStyleSheet(), TRUE);
+
+ // Neues 3D-Objekt einfuegen
+ pScene->Insert3DObj(p3DObj);
+ }
+ }
+}
+
+void E3dView::ImpCreate3DObject(E3dScene* pScene, SdrObject* pObj, BOOL bExtrude, double fDepth, Matrix4D& rLatheMat)
+{
+ if(pObj)
+ {
+ // change text color attribute for not so dark colors
+ if(pObj->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pObj, IM_DEEPWITHGROUPS);
+ while(aIter.IsMore())
+ {
+ SdrObject* pGroupMember = aIter.Next();
+ ImpChangeSomeAttributesFor3DConversion(pGroupMember);
+ }
+ }
+ else
+ ImpChangeSomeAttributesFor3DConversion(pObj);
+
+ // convert completely to path objects
+ SdrObject* pNewObj1 = pObj->ConvertToPolyObj(FALSE, FALSE);
+
+ // change text color attribute for not so dark colors
+ if(pNewObj1->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pNewObj1, IM_DEEPWITHGROUPS);
+ while(aIter.IsMore())
+ {
+ SdrObject* pGroupMember = aIter.Next();
+ ImpChangeSomeAttributesFor3DConversion2(pGroupMember);
+ }
+ }
+ else
+ ImpChangeSomeAttributesFor3DConversion2(pNewObj1);
+
+ // convert completely to path objects
+ SdrObject* pNewObj2 = pObj->ConvertToContourObj(pNewObj1, TRUE);
+
+ // add all to flat scene
+ if(pNewObj2->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pNewObj2, IM_DEEPWITHGROUPS);
+ while(aIter.IsMore())
+ {
+ SdrObject* pGroupMember = aIter.Next();
+ ImpCreateSingle3DObjectFlat(pScene, pGroupMember, bExtrude, fDepth, rLatheMat);
+ }
+ }
+ else
+ ImpCreateSingle3DObjectFlat(pScene, pNewObj2, bExtrude, fDepth, rLatheMat);
+
+ // delete zwi object
+ if(pNewObj2 != pObj && pNewObj2 != pNewObj1)
+ delete pNewObj2;
+
+ if(pNewObj1 != pObj)
+ delete pNewObj1;
+ }
+}
+
+/*************************************************************************
+|*
+|* 3D-Konvertierung zu Extrude steuern
+|*
+\************************************************************************/
+
+void E3dView::ConvertMarkedObjTo3D(BOOL bExtrude, Vector3D aPnt1, Vector3D aPnt2)
+{
+ if(HasMarkedObj())
+ {
+ // Undo anlegen
+ if(bExtrude)
+ BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_EXTRUDE));
+ else
+ BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_LATHE));
+
+ // Neue Szene fuer zu erzeugende 3D-Objekte anlegen
+ E3dScene* pScene = new E3dPolyScene(Get3DDefaultAttributes());
+
+ // Rechteck bestimmen und evtl. korrigieren
+ Rectangle aRect = GetAllMarkedRect();
+ if(aRect.GetWidth() <= 1)
+ aRect.SetSize(Size(500, aRect.GetHeight()));
+ if(aRect.GetHeight() <= 1)
+ aRect.SetSize(Size(aRect.GetWidth(), 500));
+
+ // Tiefe relativ zur Groesse der Selektion bestimmen
+ double fDepth = 0.0;
+ double fRot3D = 0.0;
+ Matrix4D aLatheMat;
+
+ if(bExtrude)
+ {
+ double fW = (double)aRect.GetWidth();
+ double fH = (double)aRect.GetHeight();
+ fDepth = sqrt(fW*fW + fH*fH) / 6.0;
+ }
+ if(!bExtrude)
+ {
+ // Transformation fuer Polygone Rotationskoerper erstellen
+ if(aPnt1 != aPnt2)
+ {
+ // Rotation um Kontrollpunkt1 mit eigestelltem Winkel
+ // fuer 3D Koordinaten
+ Vector3D aDiff = aPnt1 - aPnt2;
+ fRot3D = atan2(aDiff.Y(), aDiff.X()) - F_PI2;
+
+ if(fabs(fRot3D) < SMALL_DVALUE)
+ fRot3D = 0.0;
+
+ if(fRot3D != 0.0)
+ {
+ aLatheMat.Translate(-aPnt2);
+ aLatheMat.RotateZ(-fRot3D);
+ aLatheMat.Translate(aPnt2);
+ }
+ }
+
+ if(aPnt2.X() != 0.0)
+ {
+ // Translation auf Y=0 - Achse
+ aLatheMat.TranslateX(-aPnt2.X());
+ }
+ else
+ {
+ aLatheMat.Translate((double)-aRect.Left());
+ }
+
+ // Inverse Matrix bilden, um die Zielausdehnung zu bestimmen
+ Matrix4D aInvLatheMat = aLatheMat;
+ aInvLatheMat.Invert();
+
+ // SnapRect Ausdehnung mittels Spiegelung an der Rotationsachse
+ // erweitern
+ for(UINT32 a=0;a<aMark.GetMarkCount();a++)
+ {
+ SdrMark* pMark = aMark.GetMark(a);
+ SdrObject* pObj = pMark->GetObj();
+ Rectangle aTurnRect = pObj->GetSnapRect();
+ Vector3D aRot;
+ Point aRotPnt;
+
+ aRot = Vector3D(aTurnRect.Left(), -aTurnRect.Top(), 0.0);
+ aRot *= aLatheMat;
+ aRot.X() = -aRot.X();
+ aRot *= aInvLatheMat;
+ aRotPnt = Point((long)(aRot.X() + 0.5), (long)(-aRot.Y() - 0.5));
+ aRect.Union(Rectangle(aRotPnt, aRotPnt));
+
+ aRot = Vector3D(aTurnRect.Left(), -aTurnRect.Bottom(), 0.0);
+ aRot *= aLatheMat;
+ aRot.X() = -aRot.X();
+ aRot *= aInvLatheMat;
+ aRotPnt = Point((long)(aRot.X() + 0.5), (long)(-aRot.Y() - 0.5));
+ aRect.Union(Rectangle(aRotPnt, aRotPnt));
+
+ aRot = Vector3D(aTurnRect.Right(), -aTurnRect.Top(), 0.0);
+ aRot *= aLatheMat;
+ aRot.X() = -aRot.X();
+ aRot *= aInvLatheMat;
+ aRotPnt = Point((long)(aRot.X() + 0.5), (long)(-aRot.Y() - 0.5));
+ aRect.Union(Rectangle(aRotPnt, aRotPnt));
+
+ aRot = Vector3D(aTurnRect.Right(), -aTurnRect.Bottom(), 0.0);
+ aRot *= aLatheMat;
+ aRot.X() = -aRot.X();
+ aRot *= aInvLatheMat;
+ aRotPnt = Point((long)(aRot.X() + 0.5), (long)(-aRot.Y() - 0.5));
+ aRect.Union(Rectangle(aRotPnt, aRotPnt));
+ }
+ }
+
+ // Ueber die Selektion gehen und in 3D wandeln, komplett mit
+ // Umwandeln in SdrPathObject, auch Schriften
+ for(UINT32 a=0;a<aMark.GetMarkCount();a++)
+ {
+ SdrMark* pMark = aMark.GetMark(a);
+ SdrObject* pObj = pMark->GetObj();
+
+ ImpCreate3DObject(pScene, pObj, bExtrude, fDepth, aLatheMat);
+ }
+
+ if(pScene->GetSubList() && pScene->GetSubList()->GetObjCount() != 0)
+ {
+ // Alle angelegten Objekte Tiefenarrangieren
+ if(bExtrude)
+ DoDepthArrange(pScene, fDepth);
+
+ // 3D-Objekte auf die Mitte des Gesamtrechtecks zentrieren
+ Vector3D aCenter = pScene->GetCenter();
+ Matrix4D aMatrix;
+
+ aMatrix.Translate(-aCenter);
+ pScene->ApplyTransform(aMatrix);
+
+ // Szene initialisieren
+ pScene->NbcSetSnapRect(aRect);
+ Volume3D aBoundVol = pScene->GetBoundVolume();
+ InitScene(pScene, (double)aRect.GetWidth(),
+ (double)aRect.GetHeight(), aBoundVol.GetDepth());
+
+ // Transformationen initialisieren, damit bei RecalcSnapRect()
+ // richtig gerechnet wird
+ pScene->InitTransformationSet();
+
+ // Szene anstelle des ersten selektierten Objektes einfuegen
+ // und alle alten Objekte weghauen
+ SdrObject* pRepObj = aMark.GetMark(0)->GetObj();
+ SdrPageView* pPV = aMark.GetMark(0)->GetPageView();
+ MarkObj(pRepObj, pPV, TRUE);
+ ReplaceObject(pRepObj, *pPV, pScene, FALSE);
+ DeleteMarked();
+ MarkObj(pScene, pPV);
+
+ // Rotationskoerper um Rotationsachse drehen
+ if(!bExtrude && fRot3D != 0.0)
+ {
+ pScene->RotateZ(fRot3D);
+ }
+
+ // Default-Rotation setzen
+ double XRotateDefault = 20;
+ pScene->RotateX(DEG2RAD(XRotateDefault));
+ pScene->SetSortingMode(E3D_SORT_FAST_SORTING|E3D_SORT_IN_PARENTS|E3D_SORT_TEST_LENGTH);
+
+ // SnapRects der Objekte ungueltig
+ pScene->CorrectSceneDimensions();
+ pScene->SetSnapRect(aRect);
+ }
+ else
+ {
+ // Es wurden keine 3D Objekte erzeugt, schmeiss alles weg
+ delete pScene;
+ }
+
+ // Undo abschliessen
+ EndUndo();
+ }
+}
+
+/*************************************************************************
+|*
+|* Alle enthaltenen Extrude-Objekte Tiefenarrangieren
+|*
+\************************************************************************/
+
+struct E3dDepthNeighbour
+{
+ E3dDepthNeighbour* pNext;
+ E3dExtrudeObj* pObj;
+
+ E3dDepthNeighbour() { pNext = NULL; pObj = NULL; }
+};
+
+struct E3dDepthLayer
+{
+ E3dDepthLayer* pDown;
+ E3dDepthNeighbour* pNext;
+
+ E3dDepthLayer() { pDown = NULL; pNext = NULL; }
+ ~E3dDepthLayer() { while(pNext) { E3dDepthNeighbour* pSucc = pNext->pNext; delete pNext; pNext = pSucc; }}
+};
+
+void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth)
+{
+ if(pScene && pScene->GetSubList() && pScene->GetSubList()->GetObjCount() > 1)
+ {
+ SdrObjList* pSubList = pScene->GetSubList();
+ SdrObjListIter aIter(*pSubList, IM_FLAT);
+ E3dDepthLayer* pBaseLayer = NULL;
+ E3dDepthLayer* pLayer = NULL;
+ INT32 nNumLayers = 0;
+ SfxItemPool& rPool = pMod->GetItemPool();
+
+ while(aIter.IsMore())
+ {
+ E3dObject* pSubObj = (E3dObject*)aIter.Next();
+
+ if(pSubObj && pSubObj->ISA(E3dExtrudeObj))
+ {
+ E3dExtrudeObj* pExtrudeObj = (E3dExtrudeObj*)pSubObj;
+ const PolyPolygon3D& rExtrudePoly = pExtrudeObj->GetExtrudePolygon();
+
+ SfxItemSet aLocalSet(rPool);
+ pExtrudeObj->TakeAttributes(aLocalSet, FALSE, TRUE);
+ XFillStyle eLocalFillStyle = ITEMVALUE(aLocalSet, XATTR_FILLSTYLE, XFillStyleItem);
+ Color aLocalColor = ((const XFillColorItem&)(aLocalSet.Get(XATTR_FILLCOLOR))).GetValue();
+
+ // ExtrudeObj einordnen
+ if(pLayer)
+ {
+ // Gibt es eine Ueberschneidung mit einem Objekt dieses
+ // Layers?
+ BOOL bOverlap(FALSE);
+ E3dDepthNeighbour* pAct = pLayer->pNext;
+
+ while(!bOverlap && pAct)
+ {
+ // ueberlappen sich pAct->pObj und pExtrudeObj ?
+ const PolyPolygon3D& rActPoly = pAct->pObj->GetExtrudePolygon();
+ bOverlap = rExtrudePoly.DoesOverlap(rActPoly, DEGREE_FLAG_X|DEGREE_FLAG_Y);
+
+ if(bOverlap)
+ {
+ // second ciriteria: is another fillstyle or color used?
+ SfxItemSet aCompareSet(rPool);
+ pAct->pObj->TakeAttributes(aCompareSet, FALSE, TRUE);
+
+ XFillStyle eCompareFillStyle = ITEMVALUE(aCompareSet, XATTR_FILLSTYLE, XFillStyleItem);
+
+ if(eLocalFillStyle == eCompareFillStyle)
+ {
+ if(eLocalFillStyle == XFILL_SOLID)
+ {
+ Color aCompareColor = ((const XFillColorItem&)(aCompareSet.Get(XATTR_FILLCOLOR))).GetValue();
+
+ if(aCompareColor == aLocalColor)
+ {
+ bOverlap = FALSE;
+ }
+ }
+ else if(eLocalFillStyle == XFILL_NONE)
+ {
+ bOverlap = FALSE;
+ }
+ }
+ }
+
+ pAct = pAct->pNext;
+ }
+
+ if(bOverlap)
+ {
+ // ja, beginne einen neuen Layer
+ pLayer->pDown = new E3dDepthLayer;
+ pLayer = pLayer->pDown;
+ nNumLayers++;
+ pLayer->pNext = new E3dDepthNeighbour;
+ pLayer->pNext->pObj = pExtrudeObj;
+ }
+ else
+ {
+ // nein, Objekt kann in aktuellen Layer
+ E3dDepthNeighbour* pNewNext = new E3dDepthNeighbour;
+ pNewNext->pObj = pExtrudeObj;
+ pNewNext->pNext = pLayer->pNext;
+ pLayer->pNext = pNewNext;
+ }
+ }
+ else
+ {
+ // erster Layer ueberhaupt
+ pBaseLayer = new E3dDepthLayer;
+ pLayer = pBaseLayer;
+ nNumLayers++;
+ pLayer->pNext = new E3dDepthNeighbour;
+ pLayer->pNext->pObj = pExtrudeObj;
+ }
+ }
+ }
+
+ // Anzahl Layer steht fest
+ if(nNumLayers > 1)
+ {
+ // Arrangement ist notwendig
+ double fMinDepth = fDepth * 0.8;
+ double fStep = (fDepth - fMinDepth) / (double)nNumLayers;
+ pLayer = pBaseLayer;
+
+ while(pLayer)
+ {
+ // an pLayer entlangspazieren
+ E3dDepthNeighbour* pAct = pLayer->pNext;
+
+ while(pAct)
+ {
+ // Anpassen
+ pAct->pObj->SetExtrudeDepth(fMinDepth);
+
+ // Naechster Eintrag
+ pAct = pAct->pNext;
+ }
+
+ // naechster Layer
+ pLayer = pLayer->pDown;
+ fMinDepth += fStep;
+ }
+ }
+
+ // angelegte Strukturen aufraeumen
+ while(pBaseLayer)
+ {
+ pLayer = pBaseLayer->pDown;
+ delete pBaseLayer;
+ pBaseLayer = pLayer;
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Drag beginnen, vorher ggf. Drag-Methode fuer 3D-Objekte erzeugen
+|*
+\************************************************************************/
+
+BOOL E3dView::BegDragObj(const Point& rPnt, OutputDevice* pOut,
+ SdrHdl* pHdl, short nMinMov,
+ SdrDragMethod* pForcedMeth)
+{
+ if (b3dCreationActive && aMark.GetMarkCount())
+ {
+ // bestimme alle selektierten Polygone und gebe die gespiegelte Hilfsfigur aus
+ if (!pMirrorPolygon && !pMirroredPolygon)
+ {
+ CreateMirrorPolygons ();
+ ShowMirrorPolygons (aRef1, aRef2);
+ }
+ }
+ else
+ {
+ BOOL bOwnActionNecessary;
+ if (pHdl == NULL)
+ {
+ bOwnActionNecessary = TRUE;
+ }
+ else if (pHdl->IsVertexHdl() || pHdl->IsCornerHdl())
+ {
+ bOwnActionNecessary = TRUE;
+ }
+ else
+ {
+ bOwnActionNecessary = FALSE;
+ }
+
+ if(bOwnActionNecessary && aMark.GetMarkCount() >= 1)
+ {
+ E3dDragConstraint eConstraint = E3DDRAG_CONSTR_XYZ;
+ BOOL bThereAreRootScenes = FALSE;
+ BOOL bThereAre3DObjects = FALSE;
+ long nCnt = aMark.GetMarkCount();
+ for(long nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj)
+ {
+ if(pObj->ISA(E3dScene) && ((E3dScene*)pObj)->GetScene() == pObj)
+ bThereAreRootScenes = TRUE;
+ if(pObj->ISA(E3dObject))
+ bThereAre3DObjects = TRUE;
+ }
+ }
+ if( bThereAre3DObjects )
+ {
+ eDragHdl = ( pHdl == NULL ? HDL_MOVE : pHdl->GetKind() );
+ switch ( eDragMode )
+ {
+ case SDRDRAG_ROTATE:
+ case SDRDRAG_SHEAR:
+ {
+ switch ( eDragHdl )
+ {
+ case HDL_LEFT:
+ case HDL_RIGHT:
+ {
+ eConstraint = E3DDRAG_CONSTR_X;
+ }
+ break;
+
+ case HDL_UPPER:
+ case HDL_LOWER:
+ {
+ eConstraint = E3DDRAG_CONSTR_Y;
+ }
+ break;
+
+ case HDL_UPLFT:
+ case HDL_UPRGT:
+ case HDL_LWLFT:
+ case HDL_LWRGT:
+ {
+ eConstraint = E3DDRAG_CONSTR_Z;
+ }
+ break;
+ }
+
+ // die nicht erlaubten Rotationen ausmaskieren
+ eConstraint = E3dDragConstraint(eConstraint& eDragConstraint);
+ String aTmp = SfxIniManager::Get()->Get( SFX_KEY_3D_SHOWFULL );
+ pForcedMeth = new E3dDragRotate(*this, aMark, eDragDetail, eConstraint,
+ aTmp.Len() && aTmp.GetChar(0) != sal_Unicode('0') );
+ }
+ break;
+
+ case SDRDRAG_MOVE:
+ {
+ if(!bThereAreRootScenes)
+ {
+ String aTmp = SfxIniManager::Get()->Get( SFX_KEY_3D_SHOWFULL );
+ pForcedMeth = new E3dDragMove(*this, aMark, eDragDetail, eDragHdl, eConstraint,
+ aTmp.Len() && aTmp.GetChar(0) != sal_Unicode('0') );
+ }
+ }
+ break;
+
+ // spaeter mal
+ case SDRDRAG_MIRROR:
+ case SDRDRAG_CROOK:
+ case SDRDRAG_DISTORT:
+ case SDRDRAG_TRANSPARENCE:
+ case SDRDRAG_GRADIENT:
+ default:
+ {
+ long nCnt = aMark.GetMarkCount();
+ for(long nObjs = 0;nObjs < nCnt;nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dObject))
+ ((E3dObject*) pObj)->SetDragDetail(eDragDetail);
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ return SdrView::BegDragObj(rPnt, pOut, pHdl, nMinMov, pForcedMeth);
+}
+
+/*************************************************************************
+|*
+|* Pruefen, obj 3D-Szene markiert ist
+|*
+\************************************************************************/
+
+BOOL E3dView::HasMarkedScene()
+{
+ return (GetMarkedScene() != NULL);
+}
+
+/*************************************************************************
+|*
+|* Pruefen, obj 3D-Szene markiert ist
+|*
+\************************************************************************/
+
+E3dScene* E3dView::GetMarkedScene()
+{
+ ULONG nCnt = aMark.GetMarkCount();
+
+ for ( ULONG i = 0; i < nCnt; i++ )
+ if ( aMark.GetMark(i)->GetObj()->ISA(E3dScene) )
+ return (E3dScene*) aMark.GetMark(i)->GetObj();
+
+ return NULL;
+}
+
+/*************************************************************************
+|*
+|* aktuelles 3D-Zeichenobjekt setzen, dafuer Szene erzeugen
+|*
+\************************************************************************/
+
+void E3dView::SetCurrent3DObj(E3dObject* p3DObj)
+{
+ DBG_ASSERT(p3DObj != NULL, "Nana, wer steckt denn hier 'nen NULL-Zeiger rein?");
+ E3dScene* pScene = NULL;
+
+ const Volume3D& rVolume = p3DObj->GetBoundVolume();
+ double fW = rVolume.GetWidth();
+ double fH = rVolume.GetHeight();
+ Rectangle aRect(0,0, (long) fW, (long) fH);
+
+ pScene = new E3dPolyScene(Get3DDefaultAttributes());
+
+ InitScene(pScene, fW, fH, rVolume.MaxVec().Z() + ((fW + fH) / 4.0));
+
+ pScene->Insert3DObj(p3DObj);
+ pScene->NbcSetSnapRect(aRect);
+ SetCurrentLibObj(pScene);
+}
+
+/*************************************************************************
+|*
+|* neu erzeugte Szene initialisieren
+|*
+\************************************************************************/
+
+void E3dView::InitScene(E3dScene* pScene, double fW, double fH, double fCamZ)
+{
+ Camera3D aCam(pScene->GetCamera());
+
+ aCam.SetAutoAdjustProjection(FALSE);
+ aCam.SetViewWindow(- fW / 2, - fH / 2, fW, fH);
+ Vector3D aLookAt;
+ Vector3D aCamPos (aDefaultCamPos.X (), aDefaultCamPos.Y (), fCamZ < aDefaultCamPos.Z ()
+ ? aDefaultCamPos.Z ()
+ : fCamZ);
+
+ aCam.SetPosAndLookAt(aCamPos, aLookAt);
+ aCam.SetFocalLength(fDefaultCamFocal);
+ aCam.SetDefaults(aDefaultCamPos, aLookAt, fDefaultCamFocal);
+ pScene->SetCamera(aCam);
+}
+
+/*************************************************************************
+|*
+|* startsequenz fuer die erstellung eines 3D-Rotationskoerpers
+|*
+\************************************************************************/
+
+void E3dView::Start3DCreation ()
+{
+ b3dCreationActive = TRUE;
+
+ if (aMark.GetMarkCount())
+ {
+ // irgendwelche Markierungen ermitteln und ausschalten
+ BOOL bVis = IsMarkHdlShown();
+
+ if (bVis) HideMarkHdl(NULL);
+
+ // bestimme die koordinaten fuer JOEs Mirrorachse
+ // entgegen der normalen Achse wird diese an die linke Seite des Objektes
+ // positioniert
+ long nOutMin = 0;
+ long nOutMax = 0;
+ long nMinLen = 0;
+ long nObjDst = 0;
+ long nOutHgt = 0;
+ OutputDevice* pOut = GetWin(0);
+
+ // erstmal Darstellungsgrenzen bestimmen
+ if (pOut != NULL)
+ {
+ nMinLen = pOut->PixelToLogic(Size(0,50)).Height();
+ nObjDst = pOut->PixelToLogic(Size(0,20)).Height();
+
+ long nDst = pOut->PixelToLogic(Size(0,10)).Height();
+
+ nOutMin = -pOut->GetMapMode().GetOrigin().Y();
+ nOutMax = pOut->GetOutputSize().Height() - 1 + nOutMin;
+ nOutMin += nDst;
+ nOutMax -= nDst;
+
+ if (nOutMax - nOutMin < nDst)
+ {
+ nOutMin += nOutMax + 1;
+ nOutMin /= 2;
+ nOutMin -= (nDst + 1) / 2;
+ nOutMax = nOutMin + nDst;
+ }
+
+ nOutHgt = nOutMax - nOutMin;
+
+ long nTemp = nOutHgt / 4;
+ if (nTemp > nMinLen) nMinLen = nTemp;
+ }
+
+ // und dann die Markierungen oben und unten an das Objekt heften
+ Rectangle aR;
+ for(UINT32 nMark = 0; nMark < aMark.GetMarkCount(); nMark++)
+ {
+ XPolyPolygon aXPP;
+ SdrObject* pMark = aMark.GetMark(nMark)->GetObj();
+ pMark->TakeXorPoly(aXPP, FALSE);
+ aR.Union(aXPP.GetBoundRect());
+ }
+ Point aCenter(aR.Center());
+ long nMarkHgt = aR.GetHeight() - 1;
+ long nHgt = nMarkHgt + nObjDst * 2;
+
+ if (nHgt < nMinLen) nHgt = nMinLen;
+
+ long nY1 = aCenter.Y() - (nHgt + 1) / 2;
+ long nY2 = nY1 + nHgt;
+
+ if (pOut && (nMinLen > nOutHgt)) nMinLen = nOutHgt;
+ if (pOut)
+ {
+ if (nY1 < nOutMin)
+ {
+ nY1 = nOutMin;
+ if (nY2 < nY1 + nMinLen) nY2 = nY1 + nMinLen;
+ }
+ if (nY2 > nOutMax)
+ {
+ nY2 = nOutMax;
+ if (nY1 > nY2 - nMinLen) nY1 = nY2 - nMinLen;
+ }
+ }
+
+ aRef1.X() = aR.Left(); // Initial Achse um 2/100mm nach links
+ aRef1.Y() = nY1;
+ aRef2.X() = aRef1.X();
+ aRef2.Y() = nY2;
+
+ // Markierungen einschalten
+ SetMarkHandles();
+
+ if (bVis) ShowMarkHdl(NULL);
+ if (HasMarkedObj()) MarkListHasChanged();
+
+ // SpiegelPolygone SOFORT zeigen
+ CreateMirrorPolygons ();
+ const SdrHdlList &aHdlList = GetHdlList ();
+ ShowMirrorPolygons (aHdlList.GetHdl (HDL_REF1)->GetPos (),
+ aHdlList.GetHdl (HDL_REF2)->GetPos ());
+ }
+}
+
+/*************************************************************************
+|*
+|* was passiert bei einer Mausbewegung, wenn das Objekt erstellt wird ?
+|*
+\************************************************************************/
+
+void E3dView::MovAction(const Point& rPnt)
+{
+ if (b3dCreationActive)
+ {
+ SdrHdl* pHdl = GetDragHdl();
+
+ if (pHdl)
+ {
+ SdrHdlKind eHdlKind = pHdl->GetKind();
+
+ // reagiere nur bei einer spiegelachse
+ if ((eHdlKind == HDL_REF1) ||
+ (eHdlKind == HDL_REF2) ||
+ (eHdlKind == HDL_MIRX))
+ {
+ const SdrHdlList &aHdlList = GetHdlList ();
+
+ // loesche das gespiegelte Polygon, spiegele das Original und zeichne es neu
+ b3dCreationActive = FALSE; // Damit in DrawDragObj() gezeichnet wird
+ b3dCreationActive = TRUE; // restaurieren (Trick)
+ ShowMirrored ();
+ SdrView::MovAction (rPnt);
+ ShowMirrorPolygons (aHdlList.GetHdl (HDL_REF1)->GetPos (),
+ aHdlList.GetHdl (HDL_REF2)->GetPos ());
+ }
+ }
+ else
+ {
+ SdrView::MovAction (rPnt);
+ }
+ }
+ else
+ {
+ SdrView::MovAction (rPnt);
+ }
+}
+
+/*************************************************************************
+|*
+|* Schluss. Objekt und evtl. Unterobjekte ueber ImpCreate3DLathe erstellen
+|* [FG] Mit dem Parameterwert TRUE (SDefault: FALSE) wird einfach ein
+|* Rotationskoerper erzeugt, ohne den Benutzer die Lage der
+|* Achse fetlegen zu lassen. Es reicht dieser Aufruf, falls
+|* ein Objekt selektiert ist. (keine Initialisierung noetig)
+|*
+\************************************************************************/
+
+void E3dView::End3DCreation(BOOL bUseDefaultValuesForMirrorAxes)
+{
+ if(HasMarkedObj())
+ {
+ if(bUseDefaultValuesForMirrorAxes)
+ {
+ Rectangle aRect = GetAllMarkedRect();
+ if(aRect.GetWidth() <= 1)
+ aRect.SetSize(Size(500, aRect.GetHeight()));
+ if(aRect.GetHeight() <= 1)
+ aRect.SetSize(Size(aRect.GetWidth(), 500));
+
+ Vector3D aPnt1(aRect.Left(), -aRect.Top(), 0.0);
+ Vector3D aPnt2(aRect.Left(), -aRect.Bottom(), 0.0);
+
+ ConvertMarkedObjTo3D(FALSE, aPnt1, aPnt2);
+ }
+ else
+ {
+ // Hilfsfigur ausschalten
+ ShowMirrored();
+
+ // irgendwo kassieren wir eine Rekursion, also unterbinden
+ b3dCreationActive = FALSE;
+
+ // bestimme aus den Handlepositionen und den Versatz der Punkte
+ const SdrHdlList &aHdlList = GetHdlList();
+ Point aMirrorRef1 = aHdlList.GetHdl(HDL_REF1)->GetPos();
+ Point aMirrorRef2 = aHdlList.GetHdl(HDL_REF2)->GetPos();
+
+ Vector3D aPnt1(aMirrorRef1.X(), -aMirrorRef1.Y(), 0.0);
+ Vector3D aPnt2(aMirrorRef2.X(), -aMirrorRef2.Y(), 0.0);
+
+ ConvertMarkedObjTo3D(FALSE, aPnt1, aPnt2);
+ }
+ }
+
+ ResetCreationActive();
+}
+
+/*************************************************************************
+|*
+|* stelle das Mirrorobjekt dar
+|*
+\************************************************************************/
+
+void E3dView::ShowMirrored ()
+{
+ if (b3dCreationActive)
+ {
+ OutputDevice *pOut = GetWin(0);
+ RasterOp eRop0 = pOut->GetRasterOp();
+
+ Color aOldLineColor( pXOut->GetLineColor() );
+ Color aOldFillColor( pXOut->GetFillColor() );
+ Color aNewLineColor( COL_BLACK );
+ Color aNewFillColor( COL_TRANSPARENT );
+
+
+ // invertiere die Darstellung
+ pOut->SetRasterOp(ROP_INVERT);
+ pXOut->SetOutDev(pOut);
+ pXOut->OverrideLineColor( aNewLineColor );
+ pXOut->OverrideFillColor( aNewFillColor );
+
+ for (long nMark = 0;
+ nMark < nPolyCnt;
+ nMark ++)
+ {
+ const XPolyPolygon &rXPP = pMirroredPolygon [nMark];
+ USHORT nPolyAnz = rXPP.Count();
+
+ for (USHORT nPolyNum = 0;
+ nPolyNum < nPolyAnz;
+ nPolyNum ++)
+ {
+ const XPolygon &rXP = rXPP [nPolyNum];
+
+ pXOut->DrawXPolyLine(rXP);
+ }
+ }
+
+ pXOut->OverrideLineColor( aOldLineColor );
+ pXOut->OverrideFillColor( aOldFillColor );
+ pOut->SetRasterOp(eRop0);
+ }
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+E3dView::~E3dView ()
+{
+ __DELETE(nPolyCnt) pMirrorPolygon;
+ __DELETE(nPolyCnt) pMirroredPolygon;
+ __DELETE(nPolyCnt) pMarkedObjs;
+}
+
+/*************************************************************************
+|*
+|* Bestimme Anzahl der Polygone und kopiere in die Spiegelpolygone
+|*
+\************************************************************************/
+
+void E3dView::CreateMirrorPolygons ()
+{
+ nPolyCnt = aMark.GetMarkCount();
+ pMirrorPolygon = new XPolyPolygon [nPolyCnt];
+ pMirroredPolygon = new XPolyPolygon [nPolyCnt];
+ pMarkedObjs = new SdrObject* [nPolyCnt];
+ pMyPV = aMark.GetMark(0)->GetPageView();
+
+ for (long nMark = nPolyCnt;
+ nMark > 0;
+ )
+ {
+ SdrMark *pMark = aMark.GetMark(-- nMark);
+ SdrObject *pObj = pMark->GetObj();
+
+ pObj->TakeXorPoly (pMirrorPolygon [nMark], FALSE);
+ pMarkedObjs [nMark] = pObj;
+ }
+}
+
+/*************************************************************************
+|*
+|* spiegele die originalpolygone und stelle sie als hilfsfigur dar
+|*
+\************************************************************************/
+
+void E3dView::ShowMirrorPolygons (Point aMirrorPoint1,
+ Point aMirrorPoint2)
+{
+ for (long nMark = 0;
+ nMark < nPolyCnt;
+ nMark ++)
+ {
+ pMirroredPolygon [nMark] = pMirrorPolygon [nMark];
+ MirrorXPoly(pMirroredPolygon [nMark], aMirrorPoint1, aMirrorPoint2);
+ }
+
+ if (nPolyCnt) ShowMirrored ();
+}
+
+/*************************************************************************
+|*
+|* beende das erzeugen und loesche die polygone
+|*
+\************************************************************************/
+
+void E3dView::ResetCreationActive ()
+{
+ __DELETE(nPolyCnt) pMirrorPolygon;
+ __DELETE(nPolyCnt) pMirroredPolygon;
+ __DELETE(nPolyCnt) pMarkedObjs;
+
+ pMarkedObjs = 0;
+ pMirrorPolygon =
+ pMirroredPolygon = 0;
+ b3dCreationActive = FALSE;
+ nPolyCnt = 0;
+}
+
+/*************************************************************************
+|*
+|* Skalarprodukt zweier Punktvektoren
+|*
+\************************************************************************/
+
+long Scalar (Point aPoint1,
+ Point aPoint2)
+{
+ return aPoint1.X () * aPoint2.X () + aPoint1.Y () * aPoint2.Y ();
+}
+
+/*************************************************************************
+|*
+|* Skalarprodukt zweier Punktvektoren
+|*
+\************************************************************************/
+
+Point ScaleVector (Point aPoint,
+ double nScale)
+{
+ return Point ((long) ((double) aPoint.X () * nScale), (long) ((double) aPoint.Y () * nScale));
+}
+
+/*************************************************************************
+|*
+|* Skalarprodukt zweier Punktvektoren
+|*
+\************************************************************************/
+
+double NormVector (Point aPoint)
+{
+ return sqrt ((double) Scalar (aPoint, aPoint));
+}
+
+/*************************************************************************
+|*
+|* Pruefe, ob sich zwei Geradensegemente schneiden
+|* Dazu wird ueber einfache Determinanten bestimmt, wie die Endpunkte
+|* zu der jeweils anderen Gerade liegen.
+|*
+\************************************************************************/
+
+BOOL LineCutting (Point aP1,
+ Point aP2,
+ Point aP3,
+ Point aP4)
+{
+ long nS1 = Point2Line (aP1, aP3, aP4);
+ long nS2 = Point2Line (aP2, aP3, aP4);
+ long nS3 = Point2Line (aP3, aP1, aP2);
+ long nS4 = Point2Line (aP4, aP1, aP2);
+
+ // die werte koennen reichlich gross werden, also geht eine multiplikation daneben
+ BOOL bCut (((nS1 < 0) && (nS2 > 0) || (nS1 > 0) && (nS2 < 0)) &&
+ ((nS3 < 0) && (nS4 > 0) || (nS3 > 0) && (nS4 < 0)));
+
+ if (bCut)
+ {
+ BOOL bStop = bCut;
+ }
+
+ return ((nS1 < 0) && (nS2 > 0) || (nS1 > 0) && (nS2 < 0)) &&
+ ((nS3 < 0) && (nS4 > 0) || (nS3 > 0) && (nS4 < 0));
+}
+
+/*************************************************************************
+|*
+|* Bestimme, ob sich ein Punkt aP1 rechts oder links eines Geradensegments,
+|* definiert durch aP2 und aP3, befindet.
+|* >0 : rechts, <0 : links, =0 : auf dem Geradensegment
+|* Die Vektoren (Punkte) liegen in der homogenen Form vor, wobei die
+|* Skalierung =1 gesetzt ist (schneller und einfacher).
+|*
+\************************************************************************/
+
+long Point2Line (Point aP1,
+ Point aP2,
+ Point aP3)
+{
+ return (aP2.X () * aP3.Y () - aP2.Y () * aP3.X ()) -
+ (aP1.X () * aP3.Y () - aP1.Y () * aP3.X ()) +
+ (aP1.X () * aP2.Y () - aP1.Y () * aP2.X ());
+}
+
+/*************************************************************************
+|*
+|* Bestimme den Abstand eines Punktes u zu einem Geradensegment,
+|* definiert durch v1 und v.
+|*
+\************************************************************************/
+
+long DistPoint2Line (Point u,
+ Point v1,
+ Point v)
+{
+ Point w = v1 - v;
+
+ return (long) NormVector (v - ScaleVector (w, (double) Scalar (v - u, w) / (double) Scalar (w, w)) - u);
+}
+
+/*************************************************************************
+|*
+|* Klasse initialisieren
+|*
+\************************************************************************/
+
+void E3dView::InitView ()
+{
+ eDragConstraint = E3DDRAG_CONSTR_XYZ;
+ eDragDetail = E3DDETAIL_ONEBOX;
+ b3dCreationActive = FALSE;
+ pMirrorPolygon = 0;
+ pMirroredPolygon = 0;
+ nPolyCnt = 0;
+ pMyPV = 0;
+ pMarkedObjs = 0;
+ fDefaultScaleX =
+ fDefaultScaleY =
+ fDefaultScaleZ = 1.0;
+ fDefaultRotateX =
+ fDefaultRotateY =
+ fDefaultRotateZ = 0.0;
+ fDefaultExtrusionDeepth = 1000; // old: 2000;
+ fDefaultCamFocal = 100;
+ fDefaultLightIntensity = 0.8; // old: 0.6;
+ fDefaultAmbientIntensity = 0.4;
+ nHDefaultSegments = 12;
+ nVDefaultSegments = 12;
+ aDefaultLightColor = RGB_Color(COL_WHITE);
+ aDefaultAmbientColor = RGB_Color(COL_BLACK);
+ aDefaultCamPos = Vector3D (0, 0, 100);
+ aDefaultLightPos = Vector3D (1, 1, 1); // old: Vector3D (0, 0, 1);
+ aDefaultLightPos.Normalize();
+ bDoubleSided = FALSE;
+}
+
+/*************************************************************************
+|*
+|* Zeige eine Hilfsfigur
+|*
+\************************************************************************/
+
+void E3dView::ShowDragObj (OutputDevice *pOut)
+{
+ SdrView::ShowDragObj (pOut);
+}
+
+/*************************************************************************
+|*
+|* Verdecke eine Hilfsfigur
+|*
+\************************************************************************/
+
+void E3dView::HideDragObj (OutputDevice *pOut)
+{
+ SdrView::HideDragObj (pOut);
+}
+
+/*************************************************************************
+|*
+|* Zeige eine Hilfsfigur
+|*
+\************************************************************************/
+
+void E3dView::DrawDragObj (OutputDevice *pOut,
+ BOOL bFull) const
+{
+ if (!b3dCreationActive)
+ {
+ SdrView::DrawDragObj (pOut, bFull);
+ }
+}
+
+/*************************************************************************
+|*
+|* Koennen die selektierten Objekte aufgebrochen werden?
+|*
+\************************************************************************/
+
+BOOL E3dView::IsBreak3DObjPossible() const
+{
+ ULONG nCount = aMark.GetMarkCount();
+
+ if (nCount > 0)
+ {
+ ULONG i = 0;
+
+ while (i < nCount)
+ {
+ SdrObject* pObj = aMark.GetMark(i)->GetObj();
+
+ if (pObj && pObj->ISA(E3dObject))
+ {
+ if(!(((E3dObject*)pObj)->IsBreakObjPossible()))
+ return FALSE;
+ }
+ else
+ {
+ return FALSE;
+ }
+
+ i++;
+ }
+ }
+ else
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* Selektierte Lathe-Objekte aufbrechen
+|*
+\************************************************************************/
+
+void E3dView::Break3DObj()
+{
+ if(IsBreak3DObjPossible())
+ {
+ // ALLE selektierten Objekte werden gewandelt
+ UINT32 nCount = aMark.GetMarkCount();
+
+ BegUndo(String(SVX_RESSTR(RID_SVX_3D_UNDO_BREAK_LATHE)));
+ for(UINT32 a=0;a<nCount;a++)
+ {
+ E3dObject* pObj = (E3dObject*)aMark.GetMark(a)->GetObj();
+ BreakSingle3DObj(pObj);
+ }
+ DeleteMarked();
+ EndUndo();
+ }
+}
+
+void E3dView::BreakSingle3DObj(E3dObject* pObj)
+{
+ if(pObj->ISA(E3dScene))
+ {
+ SdrObjList* pSubList = pObj->GetSubList();
+ SdrObjListIter aIter(*pSubList, IM_FLAT);
+
+ while(aIter.IsMore())
+ {
+ E3dObject* pSubObj = (E3dObject*)aIter.Next();
+ BreakSingle3DObj(pSubObj);
+ }
+ }
+ else
+ {
+ SdrAttrObj* pNewObj = pObj->GetBreakObj();
+ if(pNewObj)
+ {
+ InsertObject(pNewObj, *GetPageViewPvNum(0), SDRINSERT_DONTMARK);
+ pNewObj->SendRepaintBroadcast();
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Szenen mischen
+|*
+\************************************************************************/
+// Wird bisher noch nirgenswo (weder im Draw oder Chart) aufgerufen
+
+void E3dView::MergeScenes ()
+{
+ ULONG nCount = aMark.GetMarkCount();
+
+ if (nCount > 0)
+ {
+ ULONG nObj = 0;
+ SdrObject *pObj = aMark.GetMark(nObj)->GetObj();
+ E3dScene *pScene = new E3dPolyScene(Get3DDefaultAttributes());
+ Volume3D aBoundVol;
+ Rectangle aAllBoundRect (GetMarkedObjBoundRect ());
+ Point aCenter (aAllBoundRect.Center());
+
+ while (pObj)
+ {
+ if (pObj->ISA(E3dScene))
+ {
+ /**********************************************************
+ * Es ist eine 3D-Scene oder 3D-PolyScene
+ **********************************************************/
+ SdrObjList* pSubList = ((E3dObject*) pObj)->GetSubList();
+
+ SdrObjListIter aIter(*pSubList, IM_FLAT);
+
+ while (aIter.IsMore())
+ {
+ /******************************************************
+ * LatheObjekte suchen
+ ******************************************************/
+ SdrObject* pSubObj = aIter.Next();
+
+ if (!pSubObj->ISA(E3dLight))
+ {
+ E3dObject *pNewObj = 0;
+
+ switch (pSubObj->GetObjIdentifier())
+ {
+ case E3D_OBJECT_ID:
+ pNewObj = new E3dObject;
+ *(E3dObject*)pNewObj = *(E3dObject*)pSubObj;
+ break;
+
+ case E3D_POLYOBJ_ID :
+ pNewObj = new E3dPolyObj;
+ *(E3dPolyObj*)pNewObj= *(E3dPolyObj*)pSubObj;
+ break;
+
+ case E3D_CUBEOBJ_ID :
+ pNewObj = new E3dCubeObj;
+ *(E3dCubeObj*)pNewObj = *(E3dCubeObj*)pSubObj;
+ break;
+
+ case E3D_SPHEREOBJ_ID:
+ pNewObj = new E3dSphereObj;
+ *(E3dSphereObj*)pNewObj = *(E3dSphereObj*)pSubObj;
+ break;
+
+ case E3D_POINTOBJ_ID:
+ pNewObj = new E3dPointObj;
+ *(E3dPointObj*)pNewObj = *(E3dPointObj*)pSubObj;
+ break;
+
+ case E3D_EXTRUDEOBJ_ID:
+ pNewObj = new E3dExtrudeObj;
+ *(E3dExtrudeObj*)pNewObj = *(E3dExtrudeObj*)pSubObj;
+ break;
+
+ case E3D_LATHEOBJ_ID:
+ pNewObj = new E3dLatheObj;
+ *(E3dLatheObj*)pNewObj = *(E3dLatheObj*)pSubObj;
+ break;
+
+ case E3D_LABELOBJ_ID:
+ pNewObj = new E3dLabelObj;
+ *(E3dLabelObj*)pNewObj = *(E3dLabelObj*)pSubObj;
+ break;
+
+ case E3D_COMPOUNDOBJ_ID:
+ pNewObj = new E3dCompoundObject;
+ *(E3dCompoundObject*)pNewObj = *(E3dCompoundObject*)pSubObj;
+ break;
+ }
+
+ Rectangle aBoundRect = pSubObj->GetBoundRect ();
+
+ Matrix4D aMatrix;
+ aMatrix.Translate(Vector3D(aBoundRect.Left () - aCenter.X (), aCenter.Y(), 0));
+ pNewObj->ApplyTransform(aMatrix);
+
+ if (pNewObj) aBoundVol.Union (pNewObj->GetBoundVolume());
+ pScene->Insert3DObj (pNewObj);
+ }
+ }
+ }
+
+ nObj++;
+
+ if (nObj < nCount)
+ {
+ pObj = aMark.GetMark(nObj)->GetObj();
+ }
+ else
+ {
+ pObj = NULL;
+ }
+ }
+
+ double fW = aAllBoundRect.GetWidth();
+ double fH = aAllBoundRect.GetHeight();
+ Rectangle aRect(0,0, (long) fW, (long) fH);
+
+ InitScene(pScene, fW, fH, aBoundVol.MaxVec().Z() + + ((fW + fH) / 4.0));
+
+ pScene->FitSnapRectToBoundVol();
+ pScene->NbcSetSnapRect(aRect);
+
+ Camera3D &aCamera = (Camera3D&) pScene->GetCamera ();
+ Vector3D aMinVec (aBoundVol.MinVec ());
+ Vector3D aMaxVec (aBoundVol.MaxVec ());
+ double fDeepth = fabs (aMaxVec.Z () - aMinVec.Z ());
+
+ aCamera.SetPRP (Vector3D (0, 0, 1000));
+ aCamera.SetPosition (Vector3D (aDefaultCamPos.X (), aDefaultCamPos.Y (),
+ aDefaultCamPos.Z () + fDeepth / 2));
+ aCamera.SetFocalLength(fDefaultCamFocal);
+ pScene->SetCamera (aCamera);
+
+ // SnapRects der Objekte ungueltig
+ pScene->SetRectsDirty();
+
+ // Transformationen initialisieren, damit bei RecalcSnapRect()
+ // richtig gerechnet wird
+ pScene->InitTransformationSet();
+
+ InsertObject (pScene, *(aMark.GetMark(0)->GetPageView()));
+
+ // SnapRects der Objekte ungueltig
+ pScene->SetRectsDirty();
+ }
+}
+
+/*************************************************************************
+|*
+|* Possibilities, hauptsaechlich gruppieren/ungruppieren
+|*
+\************************************************************************/
+void E3dView::CheckPossibilities()
+{
+ // call parent
+ SdrView::CheckPossibilities();
+
+ // Weitere Flags bewerten
+ if(bGroupPossible || bUnGroupPossible || bGrpEnterPossible)
+ {
+ INT32 nMarkCnt = aMark.GetMarkCount();
+ BOOL bCoumpound = FALSE;
+ BOOL b3DObject = FALSE;
+ for(INT32 nObjs = 0L; (nObjs < nMarkCnt) && !bCoumpound; nObjs++)
+ {
+ SdrObject *pObj = aMark.GetMark(nObjs)->GetObj();
+ if(pObj && pObj->ISA(E3dCompoundObject))
+ bCoumpound = TRUE;
+ if(pObj && pObj->ISA(E3dObject))
+ b3DObject = TRUE;
+ }
+
+ // Bisher: Es sind ZWEI oder mehr beliebiger Objekte selektiert.
+ // Nachsehen, ob CompoundObjects beteiligt sind. Falls ja,
+ // das Gruppieren verbieten.
+ if(bGroupPossible && bCoumpound)
+ bGroupPossible = FALSE;
+
+ if(bUnGroupPossible && b3DObject)
+ bUnGroupPossible = FALSE;
+
+ if(bGrpEnterPossible && bCoumpound)
+ bGrpEnterPossible = FALSE;
+ }
+
+// bGroupPossible
+// bCombinePossible
+// bUnGroupPossible
+// bGrpEnterPossible
+}
+
+
+
diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx
new file mode 100644
index 0000000000..bf503e7041
--- /dev/null
+++ b/svx/source/engine3d/view3d1.cxx
@@ -0,0 +1,501 @@
+/*************************************************************************
+ *
+ * $RCSfile: view3d1.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ITEMID_COLOR SID_ATTR_3D_LIGHTCOLOR
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVDITER_HXX
+#include "svditer.hxx"
+#endif
+
+#ifndef _SVDPOOL_HXX
+#include "svdpool.hxx"
+#endif
+
+#ifndef _SVDMODEL_HXX
+#include "svdmodel.hxx"
+#endif
+
+#ifndef _XOUTX_HXX
+#include "xoutx.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _XTABLE_HXX
+#include "xtable.hxx"
+#endif
+
+#ifndef _FM_FMVIEW_HXX
+#include "fmview.hxx"
+#endif
+
+#ifndef _SVX_DIALOGS_HRC
+#include "dialogs.hrc"
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _E3D_GLOBL3D_HXX
+#include "globl3d.hxx"
+#endif
+
+#ifndef _E3D_OBJ3D_HXX
+#include "obj3d.hxx"
+#endif
+
+#ifndef _E3D_POLYSC3D_HXX
+#include "polysc3d.hxx"
+#endif
+
+#ifndef _SVXE3DITEM_HXX
+#include "e3ditem.hxx"
+#endif
+
+#ifndef _SVX_COLRITEM_HXX
+#include "colritem.hxx"
+#endif
+
+#ifndef _E3D_DLIGHT3D_HXX
+#include "dlight3d.hxx"
+#endif
+
+#ifndef _E3D_LATHE3D_HXX
+#include "lathe3d.hxx"
+#endif
+
+#ifndef _E3D_POLYOB3D_HXX
+#include "polyob3d.hxx"
+#endif
+
+#ifndef _E3D_SPHERE3D_HXX
+#include "sphere3d.hxx"
+#endif
+
+#ifndef _E3D_EXTRUD3D_HXX
+#include "extrud3d.hxx"
+#endif
+
+#ifndef _E3D_UNDO_HXX
+#include "e3dundo.hxx"
+#endif
+
+#ifndef _E3D_VIEW3D_HXX
+#include "view3d.hxx"
+#endif
+
+#ifndef _E3D_CUBE3D_HXX
+#include "cube3d.hxx"
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX
+#include "xflclit.hxx"
+#endif
+
+#ifndef _SVDOGRP_HXX
+#include "svdogrp.hxx"
+#endif
+
+/*************************************************************************
+|*
+|* Konvertierung in Polygone
+|*
+\************************************************************************/
+
+void E3dView::ConvertMarkedToPolyObj(BOOL bLineToArea)
+{
+ SdrObject* pNewObj = NULL;
+
+ if (aMark.GetMarkCount() == 1)
+ {
+ SdrObject* pObj = aMark.GetMark(0)->GetObj();
+
+ if (pObj && pObj->ISA(E3dPolyScene))
+ {
+ BOOL bBezier = FALSE;
+ pNewObj = ((E3dPolyScene*) pObj)->ConvertToPolyObj(bBezier, bLineToArea);
+
+ if (pNewObj)
+ {
+ BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_EXTRUDE));
+ ReplaceObject(pObj, *GetPageViewPvNum(0), pNewObj);
+ EndUndo();
+ }
+ }
+ }
+
+ if (!pNewObj)
+ {
+ SdrView::ConvertMarkedToPolyObj(bLineToArea);
+ }
+}
+
+/*************************************************************************
+|*
+|* Get3DAttributes
+|*
+\************************************************************************/
+
+SfxItemSet E3dView::Get3DAttributes(E3dScene* pInScene,
+ BOOL bOnly3DAttr) const
+{
+ // ItemSet mit entspr. Bereich anlegen
+ SfxItemSet aSet(pMod->GetItemPool(),
+ SDRATTR_START, SDRATTR_END,
+ SID_ATTR_3D_START, SID_ATTR_3D_END,
+ 0, 0);
+
+ UINT32 nSelectedItems = 0L;
+ if(pInScene)
+ {
+ // Spezielle Szene
+ pInScene->TakeAttributes(aSet, TRUE, TRUE);
+ nSelectedItems = 0x0010;
+ }
+ else
+ {
+ const SdrMarkList& rMarkList = GetMarkList();
+ UINT32 nMarkCnt = rMarkList.GetMarkCount();
+ if(nMarkCnt)
+ {
+ BOOL bSceneSelected = FALSE;
+ BOOL b3DSelected = FALSE;
+
+ UINT32 a;
+ for(a=0;a<nMarkCnt;a++)
+ {
+ SdrObject* pObj = aMark.GetMark(a)->GetObj();
+ if(pObj)
+ {
+ if(pObj->ISA(E3dScene))
+ {
+ bSceneSelected = TRUE;
+ b3DSelected = TRUE;
+ }
+ else if(pObj->ISA(E3dObject))
+ {
+ b3DSelected = TRUE;
+ }
+ else if(pObj->ISA(SdrObjGroup) && !b3DSelected && !bSceneSelected)
+ {
+ // Befinden sich 3D-Objekte in dieser Gruppe?
+ // Mache einen TIEFEN Durchlauf, solange
+ // b3DSelected == FALSE
+ SdrObjListIter aIter(*(pObj->GetSubList()), IM_DEEPWITHGROUPS);
+ while(aIter.IsMore() && !b3DSelected)
+ {
+ SdrObject* pIterObj = aIter.Next();
+ if(pIterObj->ISA(E3dObject))
+ b3DSelected = TRUE;
+ }
+ }
+ }
+ }
+
+ if(b3DSelected)
+ {
+ for(a=0;a<nMarkCnt;a++)
+ {
+ SdrObject* pObj = aMark.GetMark(a)->GetObj();
+
+ // Nimm die Szene des ersten selektierten CompoundObjects,
+ // falls keine Szene selektiert war
+ if(!bSceneSelected && pObj && pObj->ISA(E3dObject))
+ {
+ E3dScene* pScene = ((E3dObject*)pObj)->GetScene();
+ if(pScene)
+ {
+ pScene->SetAttrUseSubObjects(FALSE);
+ pScene->TakeAttributes(aSet, TRUE, TRUE);
+ bSceneSelected = TRUE;
+ }
+ }
+
+ // Das Objekt selbst aufnehmen
+ pObj->TakeAttributes(aSet, TRUE, TRUE);
+
+ // Selektion Pflegen
+ if(pObj->ISA(E3dLatheObj))
+ nSelectedItems |= 0x0001;
+ else if(pObj->ISA(E3dExtrudeObj))
+ nSelectedItems |= 0x0002;
+ else if(pObj->ISA(E3dSphereObj))
+ nSelectedItems |= 0x0004;
+ else if(pObj->ISA(E3dCubeObj))
+ nSelectedItems |= 0x0008;
+ }
+ }
+ else
+ {
+ nSelectedItems = 0x0010;
+ }
+ }
+ else
+ {
+ nSelectedItems = 0x0010;
+ }
+ }
+
+ // setze SID_ATTR_3D_INTERN auf den Status der selektierten Objekte
+ aSet.Put(SfxUInt32Item(SID_ATTR_3D_INTERN, nSelectedItems));
+
+ // DefaultValues pflegen
+ if(nSelectedItems == 0x0010 && !pInScene)
+ {
+ // aus den 3D-Objekten holen
+ ((E3dView*)this)->Get3DDefaultAttributes().TakeDefaultValues(aSet);
+
+ // Weitere, alte Attribute
+ // Camera Distance (SID_ATTR_3D_DISTANCE)
+ double fCamPosZ = DefaultCamPos().Z();
+ aSet.Put(SfxUInt32Item(SID_ATTR_3D_DISTANCE, (UINT32)(fCamPosZ + 0.5)));
+
+ // Camera FocalLength (SID_ATTR_3D_FOCAL_LENGTH)
+ double fFocalLength = DefaultCamFocal();
+ aSet.Put(SfxUInt32Item(SID_ATTR_3D_FOCAL_LENGTH, (INT32)(fFocalLength*100.0)));
+
+ // 2D Defaults holen und hinzufuegen
+ SfxItemSet aSet2D(GetModel()->GetItemPool());
+ GetAttributes(aSet2D);
+ aSet.Put(aSet2D);
+
+ // ... aber keine Linien fuer 3D
+ aSet.Put(XLineStyleItem (XLINE_NONE));
+ }
+
+ // ItemSet zurueckgeben
+ return( aSet );
+}
+
+/*************************************************************************
+|*
+|* Set3DAttributes:
+|*
+\************************************************************************/
+
+void E3dView::Set3DAttributes( const SfxItemSet& rAttr,
+ E3dScene* pInScene, BOOL bReplaceAll)
+{
+ UINT32 nSelectedItems = 0L;
+ if(pInScene)
+ {
+ // Spezielle Szene
+ pInScene->SetAttributes(rAttr, bReplaceAll);
+ nSelectedItems = 0x0010;
+ }
+ else
+ {
+ const SdrMarkList& rMarkList = GetMarkList();
+ UINT32 nMarkCnt = rMarkList.GetMarkCount();
+ if(nMarkCnt)
+ {
+ BOOL bIsSceneSelected = FALSE;
+ UINT32 a;
+ for(a=0;a<nMarkCnt;a++)
+ {
+ SdrObject* pObj = aMark.GetMark(a)->GetObj();
+ if(pObj && pObj->ISA(E3dScene))
+ bIsSceneSelected = TRUE;
+ }
+
+ BOOL bSceneSelected = bIsSceneSelected;
+ BegUndo( String( SVX_RES( RID_SVX_3D_UNDO_ATTRIBUTES ) ) );
+ for(a=0;a<nMarkCnt;a++)
+ {
+ SdrObject* pObj = aMark.GetMark(a)->GetObj();
+ if(pObj->ISA(E3dObject))
+ {
+ // Nimm die Szene des ersten selektierten CompoundObjects,
+ // falls keine Szene selektiert war
+ if(pObj->ISA(E3dObject) && !bSceneSelected)
+ {
+ E3dScene* pScene = ((E3dObject*)pObj)->GetScene();
+ if(pScene)
+ {
+ SfxItemSet aOldSet(pMod->GetItemPool(),
+ SDRATTR_START, SDRATTR_END,
+ SID_ATTR_3D_START, SID_ATTR_3D_END,
+ 0, 0);
+ pScene->SetAttrUseSubObjects(FALSE);
+ pScene->TakeAttributes(aOldSet, TRUE, FALSE);
+ pScene->SetAttrUseSubObjects(FALSE);
+ pScene->SetAttributes(rAttr, bReplaceAll);
+ AddUndo(new E3dAttributesUndoAction(*pMod, this, pScene, rAttr, aOldSet, FALSE));
+ bSceneSelected = TRUE;
+ }
+ }
+
+ // Das Objekt selbst in UNDO aufnehmen
+ if(!pObj->ISA(SdrObjGroup))
+ {
+ SfxItemSet aOldSet(pMod->GetItemPool(),
+ SDRATTR_START, SDRATTR_END,
+ SID_ATTR_3D_START, SID_ATTR_3D_END,
+ 0, 0);
+ if(pObj->ISA(E3dObject))
+ ((E3dObject*)pObj)->SetAttrUseSubObjects(FALSE);
+ pObj->TakeAttributes(aOldSet, TRUE, FALSE);
+ AddUndo(new E3dAttributesUndoAction(*pMod, this, (E3dObject*)pObj, rAttr, aOldSet, FALSE));
+ }
+
+ // SubObjekte in UNDO aufnehmen
+ if(pObj->ISA(SdrObjGroup) || pObj->ISA(E3dObject))
+ {
+ SdrObjListIter aIter(*(pObj->GetSubList()), IM_DEEPWITHGROUPS);
+ while(aIter.IsMore())
+ {
+ SdrObject* pIterObj = aIter.Next();
+ SfxItemSet aOldSet(pMod->GetItemPool(),
+ SDRATTR_START, SDRATTR_END,
+ SID_ATTR_3D_START, SID_ATTR_3D_END,
+ 0, 0);
+ if(pIterObj->ISA(E3dObject))
+ ((E3dObject*)pIterObj)->SetAttrUseSubObjects(FALSE);
+ pIterObj->TakeAttributes(aOldSet, TRUE, FALSE);
+ AddUndo(new E3dAttributesUndoAction(*pMod, this, (E3dObject*)pIterObj, rAttr, aOldSet, FALSE));
+ }
+ }
+
+ // Am Objekt selbst Attribute setzen
+ pObj->SetAttributes(rAttr, bReplaceAll);
+
+ // Selektion Pflegen
+ if(pObj->ISA(E3dLatheObj))
+ nSelectedItems |= 0x0001;
+ else if(pObj->ISA(E3dExtrudeObj))
+ nSelectedItems |= 0x0002;
+ else if(pObj->ISA(E3dSphereObj))
+ nSelectedItems |= 0x0004;
+ else if(pObj->ISA(E3dCubeObj))
+ nSelectedItems |= 0x0008;
+ }
+ }
+ EndUndo();
+
+ // Nochmaliger Durchlauf mit Korrektur der veraenderten Szenen,
+ // da die enthaltenen Objekte geometrisch veraendert sein koennen
+ E3dScene* pToBeRefreshedScene = NULL;
+ bSceneSelected = bIsSceneSelected;
+ for(a=0;a<nMarkCnt;a++)
+ {
+ SdrObject* pObj = aMark.GetMark(a)->GetObj();
+ if(!bSceneSelected && pObj && pObj->ISA(E3dObject))
+ {
+ E3dScene* pScene = ((E3dObject*)pObj)->GetScene();
+ if(pScene)
+ {
+ if(pScene != pToBeRefreshedScene)
+ {
+ pScene->CorrectSceneDimensions();
+ pToBeRefreshedScene = pScene;
+ }
+ }
+ }
+ if(pObj->ISA(E3dScene))
+ {
+ E3dScene* pTheScene = (E3dScene*)pObj;
+ if(pTheScene != pToBeRefreshedScene)
+ {
+ pTheScene->CorrectSceneDimensions();
+ pToBeRefreshedScene = pTheScene;
+ }
+ }
+ }
+ }
+ else
+ {
+ nSelectedItems = 0x0010;
+ }
+ }
+
+ // DefaultValues pflegen
+ if(nSelectedItems == 0x0010 && !pInScene)
+ {
+ // in den 3D-Objekten setzen
+ Get3DDefaultAttributes().SetDefaultValues(rAttr);
+
+ // Weitere, alte Attribute
+ const SfxPoolItem* pPoolItem = NULL;
+
+ // Camera Distance (SID_ATTR_3D_DISTANCE)
+ if(SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_DISTANCE, TRUE, &pPoolItem))
+ {
+ double fCamPosZ = ((const SfxUInt32Item*)pPoolItem)->GetValue();
+ DefaultCamPos() = Vector3D(DefaultCamPos().X(), DefaultCamPos().Y(), fCamPosZ);
+ }
+
+ // Camera FocalLength (SID_ATTR_3D_FOCAL_LENGTH)
+ if(SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_3D_FOCAL_LENGTH, TRUE, &pPoolItem))
+ {
+ double fFocalLength = ((double)((const SfxUInt32Item*)pPoolItem)->GetValue()) / 100.0;
+ DefaultCamFocal() = fFocalLength;
+ }
+ }
+}
+
+
diff --git a/svx/source/engine3d/viewpt3d.cxx b/svx/source/engine3d/viewpt3d.cxx
new file mode 100644
index 0000000000..2a2d131c75
--- /dev/null
+++ b/svx/source/engine3d/viewpt3d.cxx
@@ -0,0 +1,654 @@
+/*************************************************************************
+ *
+ * $RCSfile: viewpt3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _VIEWPT3D_HXX
+#include "viewpt3d.hxx"
+#endif
+
+#ifndef _VOLUME3D_HXX
+#include "volume3d.hxx"
+#endif
+
+#ifndef _SVDIO_HXX
+#include "svdio.hxx"
+#endif
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+Viewport3D::Viewport3D() :
+ aVRP(0, 0, 5),
+ aVPN(0, 0, 1),
+ aVUV(0, 1, 1),
+ aPRP(0, 0, 2),
+ fVPD(-3),
+ aViewPoint (0, 0, 5000),
+ fNearClipDist (0.0),
+ fFarClipDist (0.0),
+ fWRatio (1.0),
+ fHRatio (1.0),
+ eProjection(PR_PERSPECTIVE),
+ eAspectMapping(AS_NO_MAPPING),
+ bTfValid(0),
+ // DeviceRect-Groesse < 0 -> ungueltig
+ aDeviceRect(Point(0,0), Size(-1,-1))
+{
+ aViewWin.X = -1; aViewWin.Y = -1;
+ aViewWin.W = 2; aViewWin.H = 2;
+}
+
+/*************************************************************************
+|*
+|* View-Transformationsmatrix berechnen
+|*
+\************************************************************************/
+
+void Viewport3D::MakeTransform(void)
+{
+ if ( !bTfValid )
+ {
+ double fV, fXupVp, fYupVp;
+ aViewPoint = aVRP + aVPN * aPRP.Z();
+
+ // auf Einheitsmatrix zuruecksetzen
+ aViewTf.Identity();
+
+ // in den Ursprung verschieben
+ aViewTf.Translate(-aVRP);
+
+ // fV = Laenge der Projektion von aVPN auf die yz-Ebene:
+ fV = aVPN.GetYZLength();
+
+ if ( fV != 0 )
+ aViewTf.RotateX(aVPN.Y() / fV, aVPN.Z() / fV);
+
+ aViewTf.RotateY(- aVPN.X(), fV);
+ // X- und Y-Koordinaten des View Up Vektors in das (vorlaeufige)
+ // View-Koordinatensytem umrechnen
+ fXupVp = aViewTf[0][0] * aVUV[0] + aViewTf[0][1] * aVUV[1] + aViewTf[0][2] * aVUV[2];
+ fYupVp = aViewTf[1][0] * aVUV[0] + aViewTf[1][1] * aVUV[1] + aViewTf[1][2] * aVUV[2];
+ fV = sqrt(fXupVp * fXupVp + fYupVp * fYupVp);
+ if ( fV != 0 )
+ aViewTf.RotateZ(fXupVp / fV, fYupVp / fV);
+
+ aViewTf = Matrix4D(aViewTf);
+ bTfValid = TRUE;
+ }
+}
+
+/*************************************************************************
+|*
+|* ViewWindow (in View-Koordinaten) setzen
+|*
+\************************************************************************/
+
+void Viewport3D::SetViewWindow(double fX, double fY, double fW, double fH)
+{
+ aViewWin.X = fX;
+ aViewWin.Y = fY;
+ if ( fW > 0 ) aViewWin.W = fW;
+ else aViewWin.W = 1.0;
+ if ( fH > 0 ) aViewWin.H = fH;
+ else aViewWin.H = 1.0;
+
+ fWRatio = aDeviceRect.GetWidth() / aViewWin.W;
+ fHRatio = aDeviceRect.GetHeight() / aViewWin.H;
+}
+
+/*************************************************************************
+|*
+|* ViewWindow zurueckgeben
+|*
+\************************************************************************/
+
+void Viewport3D::GetViewWindow(double& rX, double& rY,
+ double& rW, double& rH) const
+{
+ rX = aViewWin.X;
+ rY = aViewWin.Y;
+ rW = aViewWin.W;
+ rH = aViewWin.H;
+}
+
+/*************************************************************************
+|*
+|* View-Window genau um das mit rTransform transformierte Volumen legen
+|*
+\************************************************************************/
+
+void Viewport3D::FitViewToVolume(const Volume3D& rVolume, Matrix4D aTransform)
+{
+ Vector3D aTfVec;
+ Volume3D aFitVol;
+
+ aTransform *= GetViewTransform();
+ Vol3DPointIterator aIter(rVolume, &aTransform);
+
+ while ( aIter.Next(aTfVec) )
+ {
+ DoProjection(aTfVec);
+ aFitVol.Union(aTfVec);
+ }
+ SetViewWindow(aFitVol.MinVec().X(), aFitVol.MinVec().Y(),
+ aFitVol.GetWidth(), aFitVol.GetHeight());
+}
+
+/*************************************************************************
+|*
+|* DeviceWindow des Ausgabegeraetes setzen
+|*
+\************************************************************************/
+
+void Viewport3D::SetDeviceWindow(const Rectangle& rRect)
+{
+ long nNewW = rRect.GetWidth();
+ long nNewH = rRect.GetHeight();
+ long nOldW = aDeviceRect.GetWidth();
+ long nOldH = aDeviceRect.GetHeight();
+
+ switch ( eAspectMapping )
+ {
+ double fRatio, fTmp;
+
+ // Mapping, ohne die reale Groesse der Objekte im Device-Window
+ // zu aendern
+ case AS_HOLD_SIZE:
+ // Wenn Device ungueltig (w, h = -1), zunaechst
+ // View mit AsHoldX anpassen
+ if ( nOldW > 0 && nOldH > 0 )
+ {
+ fRatio = (double) nNewW / nOldW;
+ aViewWin.X *= fRatio;
+ aViewWin.W *= fRatio;
+ fRatio = (double) nNewH / nOldH;
+ aViewWin.Y *= fRatio;
+ aViewWin.H *= fRatio;
+ break;
+ }
+ case AS_HOLD_X:
+ // View-Hoehe an -Breite anpassen
+ fRatio = (double) nNewH / nNewW;
+ fTmp = aViewWin.H;
+ aViewWin.H = aViewWin.W * fRatio;
+ aViewWin.Y = aViewWin.Y * aViewWin.H / fTmp;
+ break;
+
+ case AS_HOLD_Y:
+ // View-Breite an -Hoehe anpassen
+ fRatio = (double) nNewW / nNewH;
+ fTmp = aViewWin.W;
+ aViewWin.W = aViewWin.H * fRatio;
+ aViewWin.X = aViewWin.X * aViewWin.W / fTmp;
+ break;
+ }
+ fWRatio = nNewW / aViewWin.W;
+ fHRatio = nNewH / aViewWin.H;
+
+ aDeviceRect = rRect;
+}
+
+/*************************************************************************
+|*
+|* Beobachterposition (PRP) in Weltkoordinaten zurueckgeben
+|*
+\************************************************************************/
+
+const Vector3D& Viewport3D::GetViewPoint()
+{
+ MakeTransform();
+
+ return aViewPoint;
+}
+
+/*************************************************************************
+|*
+|* Transformationsmatrix zurueckgeben
+|*
+\************************************************************************/
+
+const Matrix4D& Viewport3D::GetViewTransform()
+{
+ MakeTransform();
+
+ return aViewTf;
+}
+
+/*************************************************************************
+|*
+|* uebergebenen Punkt transformieren
+|*
+\************************************************************************/
+
+Vector3D& Viewport3D::Transform(Vector3D& rVec)
+{
+ MakeTransform();
+
+ rVec *= aViewTf;
+
+ return rVec;
+}
+
+/*************************************************************************
+|*
+|* neuen Punkt transformiert zurueckgeben
+|*
+\************************************************************************/
+
+Vector3D Viewport3D::Transformed(const Vector3D& rVec)
+{
+ Vector3D aNewVec = rVec;
+ Transform(aNewVec);
+
+ return aNewVec;
+}
+
+/*************************************************************************
+|*
+|* 3D-Punkt auf Viewplane projizieren
+|*
+\************************************************************************/
+
+Vector3D& Viewport3D::DoProjection(Vector3D& rVec) const
+{
+ if ( eProjection == PR_PERSPECTIVE )
+ {
+ double fPrDist = fVPD - aPRP.Z();
+
+ if ( aPRP.Z() == rVec.Z() )
+ rVec.X() = rVec.Y() = 0;
+ else
+ {
+ // Das ist die Version fuer beliebigen PRP, wird aber
+ // aus Performancegruenden nicht verwendet
+/* double fZDiv = rVec.Z() / fPrDist;
+ double fZSub = 1 - fZDiv;
+ rVec.X() = (rVec.X() - aPRP.X() * fZDiv) / fZSub;
+ rVec.Y() = (rVec.Y() - aPRP.Y() * fZDiv) / fZSub;
+*/
+ fPrDist /= rVec.Z() - aPRP.Z();
+ rVec.X() *= fPrDist;
+ rVec.Y() *= fPrDist;
+ }
+ }
+ return rVec;
+}
+
+/*************************************************************************
+|*
+|* 3D-Punkt auf Geraetekoordinaten mappen
+|*
+\************************************************************************/
+
+Vector3D Viewport3D::MapToDevice(const Vector3D& rVec) const
+{
+ Vector3D aRetval;
+
+ // Y-Koordinate subtrahieren, da die Device-Y-Achse von oben
+ // nach unten verlaeuft
+ aRetval.X() = (double)aDeviceRect.Left() + ((rVec.X() - aViewWin.X) * fWRatio);
+ aRetval.Y() = (double)aDeviceRect.Bottom() - ((rVec.Y() - aViewWin.Y) * fHRatio);
+ aRetval.Z() = rVec.Z();
+
+ return aRetval;
+}
+
+/*************************************************************************
+|*
+|* 3D-Punkt auf Viewplane projizieren und auf Geraetekoordinaten mappen
+|*
+\************************************************************************/
+
+Vector3D Viewport3D::ProjectAndMap(Vector3D aVec) const
+{
+ DoProjection(aVec);
+ return MapToDevice(aVec);
+}
+
+/*************************************************************************
+|*
+|* Device-Werte fuer Breite und Hoehe des Vektors in View-Werte
+|* wandeln, abhaengig von der Projektion
+|*
+\************************************************************************/
+
+Vector3D Viewport3D::MapSizeToView(const Vector3D& rVec)
+{
+ Vector3D aVec(rVec);
+ // zuerst von Device in View umrechnen
+ aVec.X() /= fWRatio;
+ aVec.Y() /= fHRatio;
+
+ // dann die Perspektivtransformation umkehren
+/* if ( eProjection == PR_PERSPECTIVE )
+ {
+ double fPrDist = fVPD - aPRP.Z();
+
+ if ( aPRP.Z() != aVec.Z() )
+ {
+ fPrDist /= aVec.Z() - aPRP.Z();
+ aVec.X() /= fPrDist;
+ aVec.Y() /= fPrDist;
+ }
+ }
+*/ return aVec;
+}
+
+/*************************************************************************
+|*
+|* View Reference Point setzen
+|*
+\************************************************************************/
+
+void Viewport3D::SetVRP(const Vector3D& rNewVRP)
+{
+ aVRP = rNewVRP;
+ bTfValid = FALSE;
+}
+
+/*************************************************************************
+|*
+|* View Plane Normal setzen
+|*
+\************************************************************************/
+
+void Viewport3D::SetVPN(const Vector3D& rNewVPN)
+{
+ aVPN = rNewVPN;
+ aVPN.Normalize();
+ bTfValid = FALSE;
+}
+
+/*************************************************************************
+|*
+|* View Up Vector setzen
+|*
+\************************************************************************/
+
+void Viewport3D::SetVUV(const Vector3D& rNewVUV)
+{
+ aVUV = rNewVUV;
+ bTfValid = FALSE;
+}
+
+/*************************************************************************
+|*
+|* Center Of Projection setzen
+|*
+\************************************************************************/
+
+void Viewport3D::SetPRP(const Vector3D& rNewPRP)
+{
+ aPRP = rNewPRP;
+ aPRP.X() = 0;
+ aPRP.Y() = 0;
+ bTfValid = FALSE;
+}
+
+/*************************************************************************
+|*
+|* View Plane Distance setzen
+|*
+\************************************************************************/
+
+void Viewport3D::SetVPD(double fNewVPD)
+{
+ fVPD = fNewVPD;
+ bTfValid = FALSE;
+}
+
+/*************************************************************************
+|*
+|* Abstand der vorderen Clippingebene setzen
+|*
+\************************************************************************/
+
+void Viewport3D::SetNearClipDist(double fNewNCD)
+{
+ fNearClipDist = fNewNCD;
+ bTfValid = FALSE;
+}
+
+/*************************************************************************
+|*
+|* Abstand der hinteren Clippingebene setzen
+|*
+\************************************************************************/
+
+void Viewport3D::SetFarClipDist(double fNewFCD)
+{
+ fFarClipDist = fNewFCD;
+ bTfValid = FALSE;
+}
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Viewport3D (Version 3.1)
+|*
+\************************************************************************/
+
+void Viewport3D::WriteData31(SvStream& rOut) const
+{
+ rOut << aVRP;
+ rOut << aVPN;
+ rOut << aVUV;
+ rOut << aPRP;
+ rOut << fVPD;
+ rOut << fNearClipDist;
+ rOut << fFarClipDist;
+ rOut << UINT16(eProjection);
+ rOut << UINT16(eAspectMapping);
+ rOut << aDeviceRect;
+ rOut << aViewWin.X;
+ rOut << aViewWin.Y;
+ rOut << aViewWin.W;
+ rOut << aViewWin.H;
+}
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Viewport3D ab File-Revision 13
+|* implementiert zum Hauptupdate 355 am 4.2.97 FG (freigegeben ab 356)
+|*
+\************************************************************************/
+
+void Viewport3D::WriteData(SvStream& rOut) const
+{
+ if (rOut.GetVersion() < 3560)
+ {
+ Viewport3D::WriteData31(rOut);
+ return;
+ }
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+#ifdef DBG_UTIL
+ aCompat.SetID("Viewport3D");
+#endif
+
+ rOut << aVRP;
+ rOut << aVPN;
+ rOut << aVUV;
+ rOut << aPRP;
+ rOut << fVPD;
+ rOut << fNearClipDist;
+ rOut << fFarClipDist;
+ rOut << UINT16(eProjection);
+ rOut << UINT16(eAspectMapping);
+ rOut << aDeviceRect;
+ rOut << aViewWin.X;
+ rOut << aViewWin.Y;
+ rOut << aViewWin.W;
+ rOut << aViewWin.H;
+}
+
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Viewport3D fuer die Version 3.1
+|*
+\************************************************************************/
+
+void Viewport3D::ReadData31(SvStream& rIn)
+{
+ UINT16 nTmp16;
+
+ rIn >> aVRP;
+ rIn >> aVPN;
+ rIn >> aVUV;
+ rIn >> aPRP;
+ rIn >> fVPD;
+ rIn >> fNearClipDist;
+ rIn >> fFarClipDist;
+ rIn >> nTmp16; eProjection = ProjectionType(nTmp16);
+ rIn >> nTmp16; eAspectMapping = AspectMapType(nTmp16);
+ rIn >> aDeviceRect;
+ rIn >> aViewWin.X;
+ rIn >> aViewWin.Y;
+ rIn >> aViewWin.W;
+ rIn >> aViewWin.H;
+
+ // es gibt einige Docs mit zweifelhaften werten, daher wird die Dist auf 0 gesetzt
+ if ((fNearClipDist <= 1e-100) || (fNearClipDist >= 1e100)) fNearClipDist = 0.0;
+ if ((fFarClipDist <= 1e-100) || (fFarClipDist >= 1e100)) fFarClipDist = 0.0;
+
+ fWRatio = aDeviceRect.GetWidth() / aViewWin.W;
+ fHRatio = aDeviceRect.GetHeight() / aViewWin.H;
+
+ bTfValid = FALSE;
+}
+
+/*************************************************************************
+|*
+|* ReadData-Methode fuer Viewport3D, gueltig fuer Filerevisionen ab 13
+|* eingecheckt ab Revision 355 am 4.2.97 (FG) (freigegeben ab 356)
+|*
+\************************************************************************/
+
+void Viewport3D::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if ((rHead.GetVersion() < 13) || (rIn.GetVersion() < 3560))
+ {
+ Viewport3D::ReadData31 (rIn);
+ return;
+ }
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+#ifdef DBG_UTIL
+ aCompat.SetID("Viewport3D");
+#endif
+
+ UINT16 nTmp16;
+
+ rIn >> aVRP;
+ rIn >> aVPN;
+ rIn >> aVUV;
+ rIn >> aPRP;
+ rIn >> fVPD;
+ rIn >> fNearClipDist;
+ rIn >> fFarClipDist;
+ rIn >> nTmp16; eProjection = ProjectionType(nTmp16);
+ rIn >> nTmp16; eAspectMapping = AspectMapType(nTmp16);
+ rIn >> aDeviceRect;
+ rIn >> aViewWin.X;
+ rIn >> aViewWin.Y;
+ rIn >> aViewWin.W;
+ rIn >> aViewWin.H;
+
+ // es gibt einige Docs mit zweifelhaften werten, daher wird die Dist auf 0 gesetzt
+ if ((fNearClipDist <= 1e-100) || (fNearClipDist >= 1e100)) fNearClipDist = 0.0;
+ if ((fFarClipDist <= 1e-100) || (fFarClipDist >= 1e100)) fFarClipDist = 0.0;
+
+ fWRatio = aDeviceRect.GetWidth() / aViewWin.W;
+ fHRatio = aDeviceRect.GetHeight() / aViewWin.H;
+
+ bTfValid = FALSE;
+}
+
+
+// FG: eigentlich sollten die Stream-Funktionen in der 3D-Engine nicht verwendet werden
+// sondern WriteData und ReadData, da man insbesondere bei ReadData einen
+// zusaetzlichen Parameter hat der die File-Revision enthaelt.
+
+/*************************************************************************
+|*
+|* Stream-Out-Operator fuer Viewport3D
+|*
+\************************************************************************/
+
+SvStream& operator<<(SvStream& rOStream, const Viewport3D& rViewpt)
+{
+ rViewpt.WriteData31(rOStream);
+ return rOStream;
+}
+
+/*************************************************************************
+|*
+|* Stream-In-Operator fuer Viewport3D
+|*
+\************************************************************************/
+
+SvStream& operator>>(SvStream& rIStream, Viewport3D& rViewpt)
+{
+ rViewpt.ReadData31(rIStream);
+ return rIStream;
+}
+
+
diff --git a/svx/source/engine3d/volume3d.cxx b/svx/source/engine3d/volume3d.cxx
new file mode 100644
index 0000000000..251ea30bd7
--- /dev/null
+++ b/svx/source/engine3d/volume3d.cxx
@@ -0,0 +1,283 @@
+/*************************************************************************
+ *
+ * $RCSfile: volume3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:15 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _VOLUME3D_HXX
+#include "volume3d.hxx"
+#endif
+
+#ifndef _POLY3D_HXX
+#include "poly3d.hxx"
+#endif
+
+#ifndef _SVX_MATRIX3D_HXX
+#include "matrix3d.hxx"
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+/*************************************************************************
+|*
+|* Konstruktor 1: |
+|* rPos: Zentrum oder minimale Koordinate links, unten, hinten |__
+|* (abhaengig von bPosIsCenter) /
+|*
+\************************************************************************/
+
+Volume3D::Volume3D(const Vector3D& rPos, const Vector3D& r3DSize, BOOL bPosIsCenter)
+: B3dVolume(rPos, r3DSize, bPosIsCenter)
+{
+}
+
+/*************************************************************************
+|*
+|* Konstruktor 2 - leeres Volumen, Werte als ungueltig markieren
+|*
+\************************************************************************/
+
+Volume3D::Volume3D() : B3dVolume()
+{
+}
+
+/*************************************************************************
+|*
+|* Transformation des Volumens berechnen und als neues Volumen
+|* zurueckgeben
+|*
+\************************************************************************/
+
+Volume3D Volume3D::GetTransformVolume(const Matrix4D& rTfMatrix) const
+{
+ Volume3D aTfVol;
+
+ if(IsValid())
+ {
+ Vector3D aTfVec;
+ Vol3DPointIterator aIter(*this, &rTfMatrix);
+
+ while(aIter.Next(aTfVec))
+ aTfVol.Union(aTfVec);
+ }
+ return aTfVol;
+}
+
+/*************************************************************************
+|*
+|* Drahtgitter-Linien fuer das Volumen berechnen und in rPoly3D ablegen
+|*
+\************************************************************************/
+
+void Volume3D::CreateWireframe(Polygon3D& rPoly3D, const Matrix4D* pTf) const
+{
+ if(!IsValid())
+ return;
+
+ Vector3D aDiff = aMaxVec - aMinVec;
+ Polygon3D aVolPnts(8);
+ UINT16 nZeroCnt(0);
+ UINT16 nIdx = rPoly3D.GetPointCount();
+
+ // Alle Punkte holen
+ Vol3DPointIterator aIter(*this, pTf);
+ Vector3D aTfVec;
+ UINT16 i(0);
+
+ while(aIter.Next(aTfVec))
+ aVolPnts[i++] = aTfVec;
+
+ // 0-Ausmasse des BoundVolumes zaehlen
+ for(i = 0; i < 3; i++)
+ if(aDiff[i] == 0)
+ nZeroCnt++;
+
+ // Die drei Ecksegemente des Volumens mit je drei Linien ausgeben;
+ // falls Koordinatenanteile 0 sind, nicht alle Segmente verwenden,
+ // um das gegenseitige Ausloeschen bei XOR-Ausgabe zu verhindern
+ // 4
+ // | Dieses Segment immer
+ // |
+ // 0---1
+ // /
+ // 3
+ // Die Liniensegmente eines Segments werden immer in der Reihenfolge
+ // X-, Y- und dann Z-Richtung ausgegeben (gilt natuerlich nur fuer
+ // untransformierte Koordinaten)
+
+ rPoly3D[nIdx++] = aVolPnts[0];
+
+ if(nZeroCnt < 3)
+ {
+ // wenn keine Ausdehnung, dann nur den ersten Punkt einfuegen
+ rPoly3D[nIdx++] = aVolPnts[1];
+ rPoly3D[nIdx++] = aVolPnts[0];
+ rPoly3D[nIdx++] = aVolPnts[4];
+ rPoly3D[nIdx++] = aVolPnts[0];
+ rPoly3D[nIdx++] = aVolPnts[3];
+ }
+ if(nZeroCnt < 2)
+ {
+ if(nZeroCnt == 0 || aDiff.X() == 0)
+ {
+ // 4
+ // /
+ // 7---6
+ // |
+ // |
+ // 3
+ rPoly3D[nIdx++] = aVolPnts[7];
+ rPoly3D[nIdx++] = aVolPnts[6];
+ rPoly3D[nIdx++] = aVolPnts[7];
+ rPoly3D[nIdx++] = aVolPnts[3];
+ rPoly3D[nIdx++] = aVolPnts[7];
+ rPoly3D[nIdx++] = aVolPnts[4];
+ }
+ if(nZeroCnt == 0 || (aDiff.Y() == 0))
+ {
+ // 6
+ // | 1
+ // |/
+ // 3---2
+ rPoly3D[nIdx++] = aVolPnts[2];
+ rPoly3D[nIdx++] = aVolPnts[3];
+ rPoly3D[nIdx++] = aVolPnts[2];
+ rPoly3D[nIdx++] = aVolPnts[6];
+ rPoly3D[nIdx++] = aVolPnts[2];
+ rPoly3D[nIdx++] = aVolPnts[1];
+ }
+ if(nZeroCnt == 0 || (aDiff.Z() == 0))
+ {
+ // 4---5
+ // /|
+ // 6 |
+ // 1
+ rPoly3D[nIdx++] = aVolPnts[5];
+ rPoly3D[nIdx++] = aVolPnts[4];
+ rPoly3D[nIdx++] = aVolPnts[5];
+ rPoly3D[nIdx++] = aVolPnts[1];
+ rPoly3D[nIdx++] = aVolPnts[5];
+ rPoly3D[nIdx++] = aVolPnts[6];
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Konstruktor des Point-Iterators
+|*
+\************************************************************************/
+
+Vol3DPointIterator::Vol3DPointIterator(const Volume3D& rVol, const Matrix4D* pTf)
+: rVolume(rVol),
+ pTransform(pTf),
+ nIndex(0)
+{
+ DBG_ASSERT(rVol.IsValid(), "Vol3DPointIterator-Aufruf mit ungueltigem Volume3D!");
+ a3DExtent = rVolume.aMaxVec - rVolume.aMinVec;
+}
+
+/*************************************************************************
+|*
+|* Gibt die einzelnen Punkte des (ggf. transformierten) Volumens zurueck
+|*
+|* 4---5 -> Reihenfolge der Punktausgabe (untransformiert)
+|* /| /|
+|* 7---6 |
+|* | 0-|-1
+|* |/ |/
+|* 3---2
+|*
+\************************************************************************/
+
+BOOL Vol3DPointIterator::Next(Vector3D& rVec)
+{
+ if(nIndex > 7)
+ {
+ return FALSE;
+ }
+ else
+ {
+ rVec = rVolume.aMinVec;
+
+ if(nIndex >= 4)
+ rVec.Y() += a3DExtent.Y();
+
+ switch(nIndex)
+ {
+ case 6:
+ case 2: rVec.Z() += a3DExtent.Z();
+ case 5:
+ case 1: rVec.X() += a3DExtent.X();
+ break;
+ case 7:
+ case 3: rVec.Z() += a3DExtent.Z();
+ break;
+ }
+ nIndex++;
+
+ if(pTransform)
+ rVec *= *pTransform;
+
+ return TRUE;
+ }
+}
+
+
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
new file mode 100644
index 0000000000..c187404392
--- /dev/null
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -0,0 +1,1761 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmgridcl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_FMGRIDCL_HXX
+#include "fmgridcl.hxx"
+#endif
+#ifndef _SVX_GRIDCELL_HXX
+#include "gridcell.hxx"
+#endif
+#ifndef _SVX_FMURL_HXX
+#include "fmurl.hxx"
+#endif
+
+#ifndef _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif
+
+#ifndef _FMTFIELD_HXX_
+#include <svtools/fmtfield.hxx>
+#endif
+
+#include <math.h>
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _SVX_DBEXCH_HRC
+#include "dbexch.hrc"
+#endif
+
+//#ifndef _USR_CONVER_HXX
+//#include <usr/conver.hxx>
+//#endif
+
+#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_
+#include <com/sun/star/uno/XNamingService.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XDELETEROWS_HPP_
+#include <com/sun/star/sdbcx/XDeleteRows.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
+#include <com/sun/star/sdb/CommandType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
+#include <com/sun/star/sdbc/DataType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XPREPAREDSTATEMENT_HPP_
+#include <com/sun/star/sdbc/XPreparedStatement.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDDB_XCOLUMNSSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
+#include <com/sun/star/sdb/XQueriesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDDB_XTABLESSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XDATABASEACCESS_HPP_
+#include <com/sun/star/sdb/XDatabaseAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XDATABASEENVIRONMENT_HPP_
+#include <com/sun/star/sdb/XDatabaseEnvironment.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_ROWCHANGEACTION_HPP_
+#include <com/sun/star/sdb/RowChangeAction.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XCONFIRMDELETELISTENER_HPP_
+#include <com/sun/star/form/XConfirmDeleteListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XGRIDCOLUMNFACTORY_HPP_
+#include <com/sun/star/form/XGridColumnFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCOMPONENT_HPP_
+#include <com/sun/star/form/XFormComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATS_HPP_
+#include <com/sun/star/util/XNumberFormats.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
+#include <com/sun/star/io/XPersistObject.hpp>
+#endif
+
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+
+#ifndef _SV_HELP_HXX //autogen
+#include <vcl/help.hxx>
+#endif
+
+#ifndef _DTRANS_HXX //autogen
+#include <so3/dtrans.hxx>
+#endif
+
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+#ifndef _SV_MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+
+#ifndef _SV_IMAGE_HXX //autogen
+#include <vcl/image.hxx>
+#endif
+
+#ifndef _LONGCURR_HXX
+#include <vcl/longcurr.hxx>
+#endif
+
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+
+#ifndef _SVX_FMITEMS_HXX
+#include "fmitems.hxx"
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SVX_GRIDCOLS_HXX
+#include "gridcols.hxx"
+#endif
+
+#ifndef _SVSTDARR_STRINGSDTOR
+#define _SVSTDARR_STRINGSDTOR
+#define _SVSTDARR_ULONGS
+#include <svtools/svstdarr.hxx>
+#endif
+
+#ifndef _NUMUNO_HXX //autogen
+#include <svtools/numuno.hxx>
+#endif
+
+#ifndef _SVX_FMGRIDIF_HXX
+#include "fmgridif.hxx"
+#endif
+
+#ifndef _SVX_SHOWCOLS_HXX
+#include "showcols.hxx"
+#endif
+
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UTL_NUMBERS_HXX_
+#include <unotools/numbers.hxx>
+#endif
+#ifndef _ISOLANG_HXX
+#include <tools/isolang.hxx>
+#endif
+
+#ifdef ENABLEUNICODE
+#define XUB2ANY(c) ::com::sun::star::uno::makeAny(::rtl::OUString(c))
+#endif
+#ifndef _TRACE_HXX_
+#include "trace.hxx"
+#endif
+
+static sal_uInt32 nFormat = 0;
+
+//==============================================================================
+//------------------------------------------------------------------------------
+::rtl::OUString FieldServiceFromId(sal_Int32 nID)
+{
+ switch (nID)
+ {
+ case SID_FM_EDIT : return FM_COL_TEXTFIELD;
+ case SID_FM_COMBOBOX : return FM_COL_COMBOBOX;
+ case SID_FM_LISTBOX : return FM_COL_LISTBOX;
+ case SID_FM_CHECKBOX : return FM_COL_CHECKBOX;
+ case SID_FM_DATEFIELD : return FM_COL_DATEFIELD;
+ case SID_FM_TIMEFIELD : return FM_COL_TIMEFIELD;
+ case SID_FM_NUMERICFIELD : return FM_COL_NUMERICFIELD;
+ case SID_FM_CURRENCYFIELD : return FM_COL_CURRENCYFIELD;
+ case SID_FM_PATTERNFIELD : return FM_COL_PATTERNFIELD;
+ case SID_FM_FORMATTEDFIELD : return FM_COL_FORMATTEDFIELD;
+ }
+ return ::rtl::OUString();
+}
+
+//==============================================================================
+//------------------------------------------------------------------------------
+const sal_Int16 nChangeTypeOffset = 1000;
+void SetMenuItem(const ImageList& rList, sal_uInt16 nID, Menu* pMenu, Menu& rNewMenu, sal_Bool bDesignMode = sal_True, sal_Int16 nOffset = nChangeTypeOffset)
+{
+ pMenu->SetItemImage(nID, rList.GetImage(nID));
+ pMenu->EnableItem(nID, bDesignMode);
+ rNewMenu.InsertItem(nID + nOffset, pMenu->GetItemText(nID));
+ rNewMenu.SetItemImage(nID + nOffset, rList.GetImage(nID));
+ rNewMenu.SetHelpId(nID + nOffset, pMenu->GetHelpId(nID));
+ rNewMenu.EnableItem(nID + nOffset, bDesignMode);
+}
+
+//------------------------------------------------------------------------------
+FmGridHeader::FmGridHeader( BrowseBox* pParent, WinBits nWinBits)
+ :DbBrowseHeader(pParent, nWinBits)
+{
+ EnableDrop(sal_True);
+}
+
+//------------------------------------------------------------------------------
+sal_uInt16 FmGridHeader::GetModelColumnPos(sal_uInt16 nId) const
+{
+ return static_cast<FmGridControl*>(GetParent())->GetModelColumnPos(nId);
+}
+
+//------------------------------------------------------------------------------
+void FmGridHeader::Select()
+{
+ DbBrowseHeader::Select();
+ if (static_cast<FmGridControl*>(GetParent())->IsDesignMode())
+ {
+ sal_uInt16 nPos = GetModelColumnPos(GetCurItemId());
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xColumns(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns());
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xColumn;
+ ::cppu::extractInterface(xColumn, xColumns->getByIndex(nPos));
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier > xSelSupplier(xColumns, ::com::sun::star::uno::UNO_QUERY);
+ if (xSelSupplier.is())
+ xSelSupplier->select(::com::sun::star::uno::makeAny(xColumn));
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmGridHeader::RequestHelp( const HelpEvent& rHEvt )
+{
+ sal_uInt16 nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ if ( nItemId )
+ {
+ if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) )
+ {
+ Rectangle aItemRect = GetItemRect( nItemId );
+ Point aPt = OutputToScreenPixel( aItemRect.TopLeft() );
+ aItemRect.Left() = aPt.X();
+ aItemRect.Top() = aPt.Y();
+ aPt = OutputToScreenPixel( aItemRect.BottomRight() );
+ aItemRect.Right() = aPt.X();
+ aItemRect.Bottom() = aPt.Y();
+
+ sal_uInt16 nPos = GetModelColumnPos(nItemId);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xColumns(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns());
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xColumn;
+ ::cppu::extractInterface(xColumn, xColumns->getByIndex(nPos));
+ ::rtl::OUString aHelpText;
+ xColumn->getPropertyValue(FM_PROP_HELPTEXT) >>= aHelpText;
+ if ( aHelpText.len() )
+ {
+ if ( rHEvt.GetMode() & HELPMODE_BALLOON )
+ Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aHelpText );
+ else
+ Help::ShowQuickHelp( this, aItemRect, aHelpText );
+ return;
+ }
+ }
+ catch(...)
+ {
+ return;
+ }
+ }
+ }
+ DbBrowseHeader::RequestHelp( rHEvt );
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmGridHeader::QueryDrop(DropEvent& rEvt)
+{
+ if (!nFormat)
+ nFormat = Exchange::RegisterFormatName(String::CreateFromAscii(SBA_FIELDEXCHANGE_FORMAT));
+
+ if (!static_cast<FmGridControl*>(GetParent())->IsDesignMode())
+ return sal_False;
+
+ SvDataObjectRef xDataObj = SvDataObject::PasteDragServer( rEvt );
+ return xDataObj.Is() && xDataObj->GetTypeList().Get(nFormat) != NULL;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmGridHeader::Drop( const DropEvent& rEvt )
+{
+ if (!nFormat)
+ nFormat = Exchange::RegisterFormatName(String::CreateFromAscii(SBA_FIELDEXCHANGE_FORMAT));
+
+ if (!static_cast<FmGridControl*>(GetParent())->IsDesignMode())
+ return sal_False;
+
+ SvDataObjectRef xDataObj = SvDataObject::PasteDragServer( rEvt );
+ SvData aData(nFormat);
+ xDataObj->GetData( &aData );
+ XubString aDataExchStr;
+ if (!aData.GetData(aDataExchStr))
+ return sal_False;
+
+ // SBA_FIELDEXCHANGE_FORMAT
+ // "Datenbankname";"Tabellen/QueryName";1/0(fuer Tabelle/Abfrage);"Feldname"
+ String aDatabaseName = aDataExchStr.GetToken(0,char(11));
+ String aObjectName = aDataExchStr.GetToken(1,char(11));
+ sal_uInt16 nObjectType = aDataExchStr.GetToken(2,char(11)).ToInt32();
+ String aFieldName = aDataExchStr.GetToken(3,char(11));
+
+ if (!aFieldName.Len() || !aObjectName.Len() || !aDatabaseName.Len())
+ return sal_False;
+
+ // Datenbank, Tabelle/Abfrage und Feld bestimmen
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseEnvironment > xEnvironment(
+ static_cast<FmGridControl*>(GetParent())->getServiceManager()->createInstance(SRV_SDB_DATABASE_ENVIRONMENT), ::com::sun::star::uno::UNO_QUERY);
+ if (!xEnvironment.is())
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > xConnection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess > xDatabaseAccess;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > xStatement;
+
+ try
+ {
+ ::rtl::OUString sDatabaseName = aDatabaseName;
+ try
+ {
+ xDatabaseAccess = xEnvironment->getDatabaseAccess(sDatabaseName);
+ }
+ catch(::com::sun::star::sdbc::SQLException& e)
+ { // allowed ... the env may throw an exception if it didn't find the object
+ e; // make the compiler happy
+ }
+ if (!xDatabaseAccess.is())
+ { // aDatabaseName isn't a database path. maybe a favorite name ?
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XNamingService > xDatabaseAccesses(
+ static_cast<FmGridControl*>(GetParent())->getServiceManager()->createInstance(SRV_SDB_DATABASE_ACCESS_CONTEXT), ::com::sun::star::uno::UNO_QUERY);
+ if (xDatabaseAccesses.is())
+ {
+ try
+ {
+ xDatabaseAccess = ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess > (xDatabaseAccesses->getRegisteredObject(sDatabaseName), ::com::sun::star::uno::UNO_QUERY);
+ }
+ catch(::com::sun::star::container::NoSuchElementException& e)
+ { // allowed, means aDatabaseName isn't a valid favorite name ....
+ e; // make the compiler happy
+ }
+ }
+ }
+
+ if (!xDatabaseAccess.is())
+ {
+ DBG_ERROR("FmGridHeader::Drop : could not retrieve the database access object !");
+ return sal_False;
+ }
+ xConnection = xDatabaseAccess->getConnection(rtl::OUString(), rtl::OUString());
+ if (!xConnection.is())
+ return sal_False;
+
+#if DBG_UTIL
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo > xServiceInfo(xConnection, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xServiceInfo.is() && xServiceInfo->supportsService(SRV_SDB_CONNECTION), "FmGridHeader::Drop : invalid connection (no database access connection !)");
+#endif
+
+ // Festellen des Feldes
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xFields;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xField;
+ switch (nObjectType)
+ {
+ case 0: // old : DataSelectionType_TABLE:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > xSupplyTables(xConnection, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyColumns;
+ ::cppu::extractInterface(xSupplyColumns, xSupplyTables->getTables()->getByName(aObjectName));
+ xFields = xSupplyColumns->getColumns();
+ }
+ break;
+ case 1: // old : DataSelectionType_QUERY:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XQueriesSupplier > xSupplyQueries(xConnection, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyColumns;
+ ::cppu::extractInterface(xSupplyColumns, xSupplyQueries->getQueries()->getByName(aObjectName));
+ xFields = xSupplyColumns->getColumns();
+ }
+ break;
+ default:
+ {
+ xStatement = xConnection->prepareStatement(aObjectName);
+ // not interested in any results
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xStatProps(xStatement,::com::sun::star::uno::UNO_QUERY);
+ xStatProps->setPropertyValue(rtl::OUString::createFromAscii("MaxRows"), ::com::sun::star::uno::makeAny(sal_Int32(0)));
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(xStatement->executeQuery(), ::com::sun::star::uno::UNO_QUERY);
+ if (xSupplyCols.is())
+ xFields = xSupplyCols->getColumns();
+ }
+ }
+
+ if (xFields.is() && xFields->hasByName(aFieldName))
+ ::cppu::extractInterface(xField, xFields->getByName(aFieldName));
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = ::utl::getNumberFormats(xConnection, sal_True);
+
+ if (!xSupplier.is())
+ {
+ ::utl::disposeComponent(xStatement);
+ return sal_False;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > xNumberFormats(xSupplier->getNumberFormats());
+ if (!xNumberFormats.is())
+ {
+ ::utl::disposeComponent(xStatement);
+ return sal_False;
+ }
+
+ // Vom Feld werden nun zwei Informationen benoetigt:
+ // a.) Name des Feldes fuer Label und ControlSource
+ // b.) FormatKey, um festzustellen, welches Feld erzeugt werden soll
+ sal_Int32 nDataType;
+ xField->getPropertyValue(FM_PROP_FIELDTYPE) >>= nDataType;
+ // diese Datentypen koennen im Gridcontrol nicht verarbeitet werden
+ switch (nDataType)
+ {
+ case ::com::sun::star::sdbc::DataType::LONGVARBINARY:
+ case ::com::sun::star::sdbc::DataType::BINARY:
+ case ::com::sun::star::sdbc::DataType::VARBINARY:
+ case ::com::sun::star::sdbc::DataType::OTHER:
+ ::utl::disposeComponent(xStatement);
+ return sal_False;
+ }
+
+ sal_Int32 nFormatKey;
+ xField->getPropertyValue(FM_PROP_FORMATKEY) >>= nFormatKey;
+
+ // Erstellen der Column
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xCols(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns());
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridColumnFactory > xFactory(xCols, ::com::sun::star::uno::UNO_QUERY);
+
+ Point aPos = OutputToScreenPixel(rEvt.GetPosPixel());
+ sal_uInt16 nColId = GetItemId(rEvt.GetPosPixel());
+ // EinfuegePosition, immer vor der aktuellen Spalte
+ sal_uInt16 nPos = GetModelColumnPos(nColId);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol, xSecondCol;
+
+ // erzeugen der Column in abhaengigkeit vom type, default textfeld
+ SvULongs aPossibleTypes;
+ switch (nDataType)
+ {
+ case ::com::sun::star::sdbc::DataType::BIT:
+ aPossibleTypes.Insert(SID_FM_CHECKBOX, aPossibleTypes.Count());
+ break;
+ case ::com::sun::star::sdbc::DataType::TINYINT:
+ case ::com::sun::star::sdbc::DataType::SMALLINT:
+ case ::com::sun::star::sdbc::DataType::INTEGER:
+ aPossibleTypes.Insert(SID_FM_NUMERICFIELD, aPossibleTypes.Count());
+ aPossibleTypes.Insert(SID_FM_FORMATTEDFIELD, aPossibleTypes.Count());
+ break;
+ case ::com::sun::star::sdbc::DataType::REAL:
+ case ::com::sun::star::sdbc::DataType::DOUBLE:
+ case ::com::sun::star::sdbc::DataType::NUMERIC:
+ case ::com::sun::star::sdbc::DataType::DECIMAL:
+ aPossibleTypes.Insert(SID_FM_FORMATTEDFIELD, aPossibleTypes.Count());
+ aPossibleTypes.Insert(SID_FM_NUMERICFIELD, aPossibleTypes.Count());
+ break;
+ case ::com::sun::star::sdbc::DataType::TIMESTAMP:
+ aPossibleTypes.Insert(SID_FM_TWOFIELDS_DATE_N_TIME, aPossibleTypes.Count());
+ aPossibleTypes.Insert(SID_FM_DATEFIELD, aPossibleTypes.Count());
+ aPossibleTypes.Insert(SID_FM_TIMEFIELD, aPossibleTypes.Count());
+ aPossibleTypes.Insert(SID_FM_FORMATTEDFIELD, aPossibleTypes.Count());
+ break;
+ case ::com::sun::star::sdbc::DataType::DATE:
+ aPossibleTypes.Insert(SID_FM_DATEFIELD, aPossibleTypes.Count());
+ aPossibleTypes.Insert(SID_FM_FORMATTEDFIELD, aPossibleTypes.Count());
+ break;
+ case ::com::sun::star::sdbc::DataType::TIME:
+ aPossibleTypes.Insert(SID_FM_TIMEFIELD, aPossibleTypes.Count());
+ aPossibleTypes.Insert(SID_FM_FORMATTEDFIELD, aPossibleTypes.Count());
+ break;
+ case ::com::sun::star::sdbc::DataType::CHAR:
+ case ::com::sun::star::sdbc::DataType::VARCHAR:
+ case ::com::sun::star::sdbc::DataType::LONGVARCHAR:
+ default:
+ aPossibleTypes.Insert(SID_FM_EDIT, aPossibleTypes.Count());
+ aPossibleTypes.Insert(SID_FM_FORMATTEDFIELD, aPossibleTypes.Count());
+ break;
+ }
+ // if it's a currency field, a a "currency field" option
+ try
+ {
+ if ( ::utl::hasProperty(FM_PROP_ISCURRENCY, xField)
+ && ::utl::getBOOL(xField->getPropertyValue(FM_PROP_ISCURRENCY)))
+ aPossibleTypes.Insert(SID_FM_CURRENCYFIELD, 0);
+ }
+ catch(...)
+ {
+ }
+
+ sal_Int32 nPreferedType = -1;
+ sal_Bool bDateNTimeCol = sal_False;
+ if (aPossibleTypes.Count() != 0)
+ {
+ nPreferedType = aPossibleTypes[0];
+ if ((rEvt.GetAction() == DROP_LINK) && (aPossibleTypes.Count() > 1))
+ {
+ ImageList aImageList( SVX_RES(RID_SVXIMGLIST_FMEXPL) );
+
+ PopupMenu aInsertMenu(SVX_RES(RID_SVXMNU_COLS));
+ PopupMenu aTypeMenu;
+ PopupMenu* pMenu = aInsertMenu.GetPopupMenu(SID_FM_INSERTCOL);
+ for (sal_Int32 i=0; i<aPossibleTypes.Count(); ++i)
+ SetMenuItem(aImageList, aPossibleTypes[i], pMenu, aTypeMenu, sal_True, 0);
+ nPreferedType = aTypeMenu.Execute(this, rEvt.GetPosPixel());
+ }
+
+ bDateNTimeCol = nPreferedType == SID_FM_TWOFIELDS_DATE_N_TIME;
+ sal_uInt16 nColCount = bDateNTimeCol ? 2 : 1;
+ ::rtl::OUString sFieldService;
+ while (nColCount--)
+ {
+ if (bDateNTimeCol)
+ nPreferedType = nColCount ? SID_FM_DATEFIELD : SID_FM_TIMEFIELD;
+
+ sFieldService = FieldServiceFromId(nPreferedType);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xThisRoundCol;
+ if (sFieldService.len())
+ {
+ xThisRoundCol = xFactory->createColumn(sFieldService);
+ if (xThisRoundCol.is() && ::utl::hasProperty(FM_PROP_STRICTFORMAT, xThisRoundCol))
+ xThisRoundCol->setPropertyValue(FM_PROP_STRICTFORMAT, ::com::sun::star::uno::makeAny(sal_Bool(sal_False)));
+ }
+ if (nColCount)
+ xSecondCol = xThisRoundCol;
+ else
+ xCol = xThisRoundCol;
+ }
+ }
+
+ if (!xCol.is() || (bDateNTimeCol && !xSecondCol.is()))
+ {
+ ::utl::disposeComponent(xCol); // in case only teh creation of the second column failed
+ ::utl::disposeComponent(xStatement);
+ return sal_False;
+ }
+
+ if (bDateNTimeCol)
+ {
+ XubString sPostfix(SVX_RES(RID_STR_DATETIME_LABELPOSTFIX));
+ xCol->setPropertyValue(FM_PROP_LABEL, XUB2ANY(aFieldName + ::rtl::OUString(sPostfix.GetToken(1, ';'))));
+ xSecondCol->setPropertyValue(FM_PROP_LABEL, XUB2ANY(aFieldName + ::rtl::OUString(sPostfix.GetToken(0, ';'))));
+ }
+ else
+ xCol->setPropertyValue(FM_PROP_LABEL, XUB2ANY(aFieldName));
+
+ if (nPreferedType == SID_FM_NUMERICFIELD)
+ {
+ {
+ ::com::sun::star::uno::Any aScaleVal(::utl::getNumberFormatDecimals(xNumberFormats, nFormatKey));
+ xCol->setPropertyValue(FM_PROP_DECIMAL_ACCURACY,aScaleVal);
+ }
+
+ ::com::sun::star::uno::Any aVal;
+ // die minimale/maximale Zahl in diesem Feld
+ sal_Int32 nMinValue = 0, nMaxValue = 1000000000;
+ switch (nDataType)
+ {
+ case ::com::sun::star::sdbc::DataType::TINYINT : nMinValue = 0; nMaxValue = 255; break;
+ case ::com::sun::star::sdbc::DataType::SMALLINT : nMinValue = -32768; nMaxValue = 32767; break;
+ case ::com::sun::star::sdbc::DataType::INTEGER : nMinValue = 0x80000000; nMaxValue = 0x7FFFFFFF; break;
+ // um die doubles/singles kuemmere ich mich nicht, da es ein wenig sinnlos ist
+ }
+ aVal <<= (double)nMinValue;
+ xCol->setPropertyValue(FM_PROP_VALUEMIN,aVal);
+ aVal <<= (double)nMaxValue;
+ xCol->setPropertyValue(FM_PROP_VALUEMAX,aVal);
+
+ // Formatueberpruefung fue numeric fields standardmaessig sal_True
+ aVal <<= (sal_Bool)sal_True;
+ xCol->setPropertyValue(FM_PROP_STRICTFORMAT, aVal);
+ }
+
+ xCol->setPropertyValue(FM_PROP_CONTROLSOURCE, XUB2ANY(aFieldName));
+ if (bDateNTimeCol)
+ xSecondCol->setPropertyValue(FM_PROP_CONTROLSOURCE, XUB2ANY(aFieldName));
+
+ if (bDateNTimeCol)
+ {
+ XubString sRealName,sPurePostfix;
+ XubString sPostfix(SVX_RES(RID_STR_DATETIME_LABELPOSTFIX));
+
+ for (xub_StrLen i=0; i<2; ++i)
+ {
+ sPurePostfix = sPostfix.GetToken(i, ';');
+ sPurePostfix.EraseLeadingChars(' ');
+ sPurePostfix.EraseLeadingChars('(');
+ sPurePostfix.EraseTrailingChars(')');
+ sRealName = aFieldName;
+ sRealName += '_';
+ sRealName += sPurePostfix;
+ if (i)
+ xSecondCol->setPropertyValue(FM_PROP_NAME, XUB2ANY(sRealName));
+ else
+ xCol->setPropertyValue(FM_PROP_NAME, XUB2ANY(sRealName));
+ }
+ }
+ else
+ xCol->setPropertyValue(FM_PROP_NAME, XUB2ANY(aFieldName));
+
+ // jetzt einfuegen
+ ::com::sun::star::uno::Any aElement;
+ aElement <<= xCol;
+ xCols->insertByIndex(nPos, aElement);
+
+ if (bDateNTimeCol)
+ {
+ aElement <<= xSecondCol;
+ xCols->insertByIndex(nPos == (sal_uInt16)-1 ? nPos : ++nPos, aElement);
+ }
+
+ // ist die ::com::sun::star::form::component::Form an die Datenbankangebunden?
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormCp(xCols, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xForm(xFormCp->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (xForm.is())
+ {
+ if (!::utl::getString(xForm->getPropertyValue(FM_PROP_DATASOURCE)).getLength())
+ xForm->setPropertyValue(FM_PROP_DATASOURCE, XUB2ANY(aDatabaseName));
+
+ if (!::utl::getString(xForm->getPropertyValue(FM_PROP_COMMAND)).getLength())
+ {
+ xForm->setPropertyValue(FM_PROP_COMMAND, XUB2ANY(aObjectName));
+ ::com::sun::star::uno::Any aCommandType;
+ switch (nObjectType)
+ {
+ case 0: // old : DataSelectionType_TABLE
+ aCommandType <<= (sal_Int32)::com::sun::star::sdb::CommandType::TABLE;
+ break;
+ case 1: // old : DataSelectionType_QUERY
+ aCommandType <<= (sal_Int32)::com::sun::star::sdb::CommandType::QUERY;
+ break;
+ default:
+ aCommandType <<= (sal_Int32)::com::sun::star::sdb::CommandType::COMMAND;
+ xForm->setPropertyValue(FM_PROP_ESCAPE_PROCESSING, ::com::sun::star::uno::makeAny((sal_Bool)(2 == nObjectType)));
+ // 2 -> old: DataSelectionType_SQL
+ break;
+ }
+ xForm->setPropertyValue(FM_PROP_COMMANDTYPE, aCommandType);
+ }
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmGridHeader::Drop : catched an exception while creatin' the column !");
+ ::utl::disposeComponent(xStatement);
+ return sal_False;
+ }
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu)
+{
+ sal_Bool bDesignMode = static_cast<FmGridControl*>(GetParent())->IsDesignMode();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xCols(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns());
+ // Aufbau des Insert Menues
+
+ // EinfuegePosition, immer vor der aktuellen Spalte
+ sal_uInt16 nPos = GetModelColumnPos(nColId);
+ sal_Bool bMarked = nColId && static_cast<FmGridControl*>(GetParent())->isColumnMarked(nColId);
+
+ ImageList aImageList( SVX_RES(RID_SVXIMGLIST_FMEXPL) );
+ PopupMenu* pControlMenu = new PopupMenu;
+
+ PopupMenu* pMenu = rMenu.GetPopupMenu(SID_FM_INSERTCOL);
+ if (pMenu)
+ {
+ SetMenuItem(aImageList, SID_FM_EDIT, pMenu, *pControlMenu, bDesignMode);
+ SetMenuItem(aImageList, SID_FM_CHECKBOX, pMenu, *pControlMenu, bDesignMode);
+ SetMenuItem(aImageList, SID_FM_COMBOBOX, pMenu, *pControlMenu, bDesignMode);
+ SetMenuItem(aImageList, SID_FM_LISTBOX, pMenu, *pControlMenu, bDesignMode);
+ SetMenuItem(aImageList, SID_FM_DATEFIELD, pMenu, *pControlMenu, bDesignMode);
+ SetMenuItem(aImageList, SID_FM_TIMEFIELD, pMenu, *pControlMenu, bDesignMode);
+ SetMenuItem(aImageList, SID_FM_NUMERICFIELD, pMenu, *pControlMenu, bDesignMode);
+ SetMenuItem(aImageList, SID_FM_CURRENCYFIELD, pMenu, *pControlMenu, bDesignMode);
+ SetMenuItem(aImageList, SID_FM_PATTERNFIELD, pMenu, *pControlMenu, bDesignMode);
+ SetMenuItem(aImageList, SID_FM_FORMATTEDFIELD, pMenu, *pControlMenu, bDesignMode);
+ }
+
+ if (pMenu && xCols.is() && nColId)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet;
+ ::cppu::extractInterface(xSet, xCols->getByIndex(nPos));
+ sal_Int16 nClassId;
+ xSet->getPropertyValue(FM_PROP_CLASSID) >>= nClassId;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject > xServiceQuestion(xSet, ::com::sun::star::uno::UNO_QUERY);
+ sal_Int32 nColType = xServiceQuestion.is() ? getColumnTypeByModelName(xServiceQuestion->getServiceName()) : 0;
+ if (nColType == TYPE_TEXTFIELD)
+ { // edit fields and formatted fields have the same service name, thus getColumnTypeByModelName returns TYPE_TEXTFIELD
+ // in both cases. And as columns don't have an ::com::sun::star::lang::XServiceInfo interface, we have to distinguish both
+ // types via the existence of special properties
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xProps(xSet, ::com::sun::star::uno::UNO_QUERY);
+ if (xProps.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xPropsInfo = xProps->getPropertySetInfo();
+ if (xPropsInfo.is() && xPropsInfo->hasPropertyByName(FM_PROP_FORMATSSUPPLIER))
+ nColType = TYPE_FORMATTEDFIELD;
+ }
+ }
+
+ pControlMenu->EnableItem(SID_FM_EDIT + nChangeTypeOffset, bDesignMode && (nColType != TYPE_TEXTFIELD));
+ pControlMenu->EnableItem(SID_FM_COMBOBOX + nChangeTypeOffset, bDesignMode && (nColType != TYPE_COMBOBOX));
+ pControlMenu->EnableItem(SID_FM_LISTBOX + nChangeTypeOffset, bDesignMode && (nColType != TYPE_LISTBOX));
+ pControlMenu->EnableItem(SID_FM_CHECKBOX + nChangeTypeOffset, bDesignMode && (nColType != TYPE_CHECKBOX));
+ pControlMenu->EnableItem(SID_FM_DATEFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_DATEFIELD));
+ pControlMenu->EnableItem(SID_FM_NUMERICFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_NUMERICFIELD));
+ pControlMenu->EnableItem(SID_FM_TIMEFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_TIMEFIELD));
+ pControlMenu->EnableItem(SID_FM_CURRENCYFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_CURRENCYFIELD));
+ pControlMenu->EnableItem(SID_FM_PATTERNFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_PATTERNFIELD));
+ pControlMenu->EnableItem(SID_FM_FORMATTEDFIELD + nChangeTypeOffset, bDesignMode && (nColType != TYPE_FORMATTEDFIELD));
+ rMenu.SetPopupMenu(SID_FM_CHANGECOL, pControlMenu);
+ }
+
+ rMenu.EnableItem(SID_FM_INSERTCOL, bDesignMode && xCols.is());
+ rMenu.EnableItem(SID_FM_DELETECOL, bDesignMode && bMarked && xCols.is());
+ rMenu.EnableItem(SID_FM_CHANGECOL, bDesignMode && bMarked && xCols.is());
+ rMenu.EnableItem(SID_FM_SHOW_PROPERTY_BROWSER, bDesignMode && bMarked && xCols.is());
+
+ PopupMenu* pShowColsMenu = rMenu.GetPopupMenu(SID_FM_SHOWCOLS);
+ sal_uInt16 nHiddenCols = 0;
+ if (pShowColsMenu)
+ {
+ if (xCols.is())
+ {
+ // check for hidden cols
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCurCol;
+ ::com::sun::star::uno::Any aHidden,aName;
+ for (sal_uInt16 i=0; i<xCols->getCount(); ++i)
+ {
+ ::cppu::extractInterface(xCurCol, xCols->getByIndex(i));
+ DBG_ASSERT(xCurCol.is(), "FmGridHeader::PreExecuteColumnContextMenu : the Peer has invalid columns !");
+ aHidden = xCurCol->getPropertyValue(FM_PROP_HIDDEN);
+ DBG_ASSERT(aHidden.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_BOOLEAN,
+ "FmGridHeader::PreExecuteColumnContextMenu : the property 'hidden' should be boolean !");
+ if (::utl::getBOOL(aHidden))
+ {
+ // put the column name into the 'show col' menu
+ if (nHiddenCols < 16)
+ { // (only the first 16 items to keep the menu rather small)
+ aName = xCurCol->getPropertyValue(FM_PROP_LABEL);
+ pShowColsMenu->InsertItem(nHiddenCols + 1, ::utl::getString(aName), 0, nHiddenCols);
+ // the ID is arbitrary, but should be unique within the whole menu
+ }
+ ++nHiddenCols;
+ }
+ }
+ }
+ pShowColsMenu->EnableItem(SID_FM_SHOWCOLS_MORE, xCols.is() && (nHiddenCols > 16));
+ pShowColsMenu->EnableItem(SID_FM_SHOWALLCOLS, xCols.is() && (nHiddenCols > 0));
+ }
+
+ // allow the 'hide column' item ?
+ sal_Bool bAllowHide = bMarked; // a column is marked
+ bAllowHide = bAllowHide || (!bDesignMode && (nPos != (sal_uInt16)-1)); // OR we are in alive mode and have hit a column
+ bAllowHide = bAllowHide && xCols.is(); // AND we have a column container
+ bAllowHide = bAllowHide && (xCols->getCount()-nHiddenCols > 1); // AND there are at least two visible columns
+ rMenu.EnableItem(SID_FM_HIDECOL, bAllowHide);
+
+ sal_Bool bChecked = sal_False;
+ if (bMarked)
+ {
+ SfxPoolItem* pItem = NULL;
+ SfxItemState eState = SFX_BINDINGS().QueryState(SID_FM_CTL_PROPERTIES, pItem);
+ if (eState >= SFX_ITEM_AVAILABLE)
+ {
+ if (pItem)
+ {
+ bChecked = pItem->ISA(SfxBoolItem) && ((SfxBoolItem*)pItem)->GetValue();
+ rMenu.CheckItem(SID_FM_SHOW_PROPERTY_BROWSER,bChecked);
+ }
+ }
+ delete pItem;
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMenu& rMenu, sal_uInt16 nExecutionResult)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xCols(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns());
+ sal_uInt16 nPos = GetModelColumnPos(nColId);
+
+ // remove and delet the menu we inserted in PreExecuteColumnContextMenu
+ PopupMenu* pControlMenu = rMenu.GetPopupMenu(SID_FM_CHANGECOL);
+ delete pControlMenu;
+
+ ::rtl::OUString aFieldType;
+ sal_Bool bReplace = sal_False;
+ switch (nExecutionResult)
+ {
+ case SID_FM_DELETECOL:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xCol;
+ ::cppu::extractInterface(xCol, xCols->getByIndex(nPos));
+ xCols->removeByIndex(nPos);
+ ::utl::disposeComponent(xCol);
+ } break;
+ case SID_FM_SHOW_PROPERTY_BROWSER:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xCol;
+ ::cppu::extractInterface(xCol, xCols->getByIndex(nPos));
+ FmInterfaceItem aIFaceItem(SID_FM_SHOW_PROPERTY_BROWSER, xCol);
+ SfxBoolItem aShowItem(SID_FM_SHOW_PROPERTIES, !rMenu.IsItemChecked(SID_FM_SHOW_PROPERTY_BROWSER));
+ SFX_DISPATCHER().Execute( SID_FM_SHOW_PROPERTY_BROWSER, SFX_CALLMODE_ASYNCHRON,
+ &aIFaceItem, &aShowItem, 0L );
+ } break;
+ case SID_FM_EDIT + nChangeTypeOffset:
+ bReplace = sal_True;
+ case SID_FM_EDIT:
+ aFieldType = FM_COL_TEXTFIELD;
+ break;
+ case SID_FM_COMBOBOX + nChangeTypeOffset:
+ bReplace = sal_True;
+ case SID_FM_COMBOBOX:
+ aFieldType = FM_COL_COMBOBOX;
+ break;
+ case SID_FM_LISTBOX + nChangeTypeOffset:
+ bReplace = sal_True;
+ case SID_FM_LISTBOX:
+ aFieldType = FM_COL_LISTBOX;
+ break;
+ case SID_FM_CHECKBOX + nChangeTypeOffset:
+ bReplace = sal_True;
+ case SID_FM_CHECKBOX:
+ aFieldType = FM_COL_CHECKBOX;
+ break;
+ case SID_FM_DATEFIELD + nChangeTypeOffset:
+ bReplace = sal_True;
+ case SID_FM_DATEFIELD:
+ aFieldType = FM_COL_DATEFIELD;
+ break;
+ case SID_FM_TIMEFIELD + nChangeTypeOffset:
+ bReplace = sal_True;
+ case SID_FM_TIMEFIELD:
+ aFieldType = FM_COL_TIMEFIELD;
+ break;
+ case SID_FM_NUMERICFIELD + nChangeTypeOffset:
+ bReplace = sal_True;
+ case SID_FM_NUMERICFIELD:
+ aFieldType = FM_COL_NUMERICFIELD;
+ break;
+ case SID_FM_CURRENCYFIELD + nChangeTypeOffset:
+ bReplace = sal_True;
+ case SID_FM_CURRENCYFIELD:
+ aFieldType = FM_COL_CURRENCYFIELD;
+ break;
+ case SID_FM_PATTERNFIELD + nChangeTypeOffset:
+ bReplace = sal_True;
+ case SID_FM_PATTERNFIELD:
+ aFieldType = FM_COL_PATTERNFIELD;
+ break;
+ case SID_FM_FORMATTEDFIELD + nChangeTypeOffset:
+ bReplace = sal_True;
+ case SID_FM_FORMATTEDFIELD:
+ aFieldType = FM_COL_FORMATTEDFIELD;
+ break;
+ case SID_FM_HIDECOL:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCurCol;
+ ::cppu::extractInterface(xCurCol, xCols->getByIndex(nPos));
+ xCurCol->setPropertyValue(FM_PROP_HIDDEN, ::com::sun::star::uno::makeAny((sal_Bool)sal_True));
+ }
+ break;
+ case SID_FM_SHOWCOLS_MORE:
+ {
+ FmShowColsDialog dlg(NULL);
+ dlg.SetColumns(xCols);
+ dlg.Execute();
+ }
+ break;
+ case SID_FM_SHOWALLCOLS:
+ {
+ // just iterate through all the cols ...
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCurCol;
+ for (sal_uInt16 i=0; i<xCols->getCount(); ++i)
+ {
+ ::cppu::extractInterface(xCurCol, xCols->getByIndex(i));
+ xCurCol->setPropertyValue(FM_PROP_HIDDEN, ::com::sun::star::uno::makeAny((sal_Bool)sal_False));
+ }
+ // TODO : there must be a more clever way to do this ....
+ // with the above the view is updated after every single model update ...
+ }
+ break;
+ default:
+ if (nExecutionResult>0 && nExecutionResult<=16)
+ { // it was a "show column/<colname>" command (there are at most 16 such items)
+ // search the nExecutionResult'th hidden col
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCurCol;
+ for (sal_uInt16 i=0; i<xCols->getCount() && nExecutionResult; ++i)
+ {
+ ::cppu::extractInterface(xCurCol, xCols->getByIndex(i));
+ ::com::sun::star::uno::Any aHidden = xCurCol->getPropertyValue(FM_PROP_HIDDEN);
+ if (::utl::getBOOL(aHidden))
+ if (!--nExecutionResult)
+ {
+ xCurCol->setPropertyValue(FM_PROP_HIDDEN, ::com::sun::star::uno::makeAny((sal_Bool)sal_False));
+ break;
+ }
+ }
+ }
+ break;
+ }
+
+ if (aFieldType.len())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridColumnFactory > xFactory(xCols, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol = xFactory->createColumn(aFieldType);
+ if (xCol.is())
+ {
+ ::com::sun::star::uno::Any aNew;
+ aNew <<= xCol;
+ if (bReplace)
+ {
+ // ein paar Properties hinueberretten
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xReplaced;
+ ::cppu::extractInterface(xReplaced, xCols->getByIndex(nPos));
+
+ // the application locale
+ XubString sLanguage, sCountry;
+ ConvertLanguageToIsoNames(Application::GetAppInternational().GetLanguage(), sLanguage, sCountry);
+ ::com::sun::star::lang::Locale aAppLocale(sLanguage, sCountry, ::rtl::OUString());
+
+ ::utl::TransferFormComponentProperties(xReplaced, xCol, aAppLocale);
+
+ xCols->replaceByIndex(nPos, aNew);
+ ::utl::disposeComponent(xReplaced);
+ }
+ else
+ {
+ // Standardlabel setzen
+ XubString aLabel(SVX_RES(RID_STR_COLUMN));
+ aLabel += static_cast<FmGridControl*>(GetParent())->GetModelColCount() + 1;
+ xCol->setPropertyValue(FM_PROP_LABEL, XUB2ANY(aLabel));
+ xCol->setPropertyValue(FM_PROP_NAME, XUB2ANY(aLabel));
+ xCols->insertByIndex(nPos, aNew);
+ }
+
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmGridHeader::Command(const CommandEvent& rEvt)
+{
+ switch (rEvt.GetCommand())
+ {
+ case COMMAND_CONTEXTMENU:
+ {
+ if (!rEvt.IsMouseEvent())
+ return;
+
+ sal_uInt16 nColId = GetItemId(rEvt.GetMousePosPixel());
+ PopupMenu aContextMenu(SVX_RES(RID_SVXMNU_COLS));
+
+ PreExecuteColumnContextMenu(nColId, aContextMenu);
+ aContextMenu.RemoveDisabledEntries(sal_True, sal_True);
+ PostExecuteColumnContextMenu(nColId, aContextMenu, aContextMenu.Execute(this, rEvt.GetMousePosPixel()));
+ }
+ break;
+ default:
+ DbBrowseHeader::Command(rEvt);
+ }
+}
+
+//------------------------------------------------------------------------------
+FmGridControl::FmGridControl(
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxFactory,
+ Window* pParent,
+ FmXGridPeer* _pPeer,
+ WinBits nBits)
+ :DbGridControl(_rxFactory, pParent, nBits)
+ ,m_bInColumnMove(sal_False)
+ ,m_nMarkedColumnId(BROWSER_INVALIDID)
+ ,m_pPeer(_pPeer)
+{
+}
+
+// ::com::sun::star::beans::XPropertyChangeListener
+//------------------------------------------------------------------------------
+void FmGridControl::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt)
+{
+ if (evt.PropertyName == FM_PROP_ROWCOUNT)
+ {
+ // if we're not in the main thread call AdjustRows asynchronously
+ implAdjustInSolarThread(sal_True);
+ return;
+ }
+
+ const DbGridRowRef& xRow = GetCurrentRow();
+ // waehrend Positionierung wird kein abgleich der Properties vorgenommen
+ if (!xRow.Is() || !CompareBookmark(getDataSource()->getBookmark(), xRow->GetBookmark()))
+ return;
+ if (evt.PropertyName == FM_PROP_ISMODIFIED)
+ {
+ // modified or clean ?
+ GridRowStatus eStatus = ::utl::getBOOL(evt.NewValue) ? GRS_MODIFIED : GRS_CLEAN;
+ if (eStatus != xRow->GetStatus())
+ {
+ xRow->SetStatus(eStatus);
+ vos::OGuard aGuard( Application::GetSolarMutex() );
+ RowModified(GetCurrentPos());
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::SetDesignMode(sal_Bool bMode)
+{
+ sal_Bool bOldMode = IsDesignMode();
+ DbGridControl::SetDesignMode(bMode);
+ if (bOldMode != bMode)
+ if (!bMode)
+ {
+ // selection aufheben
+ markColumn(USHRT_MAX);
+ }
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xColumns(GetPeer()->getColumns());
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier > xSelSupplier(xColumns, ::com::sun::star::uno::UNO_QUERY);
+ if (xSelSupplier.is())
+ {
+ ::com::sun::star::uno::Any aSelection = xSelSupplier->getSelection();
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xColumn;
+ if (aSelection.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_INTERFACE)
+ ::cppu::extractInterface(xColumn, aSelection);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xCurrent;
+ for (sal_uInt16 i=0; i<xColumns->getCount(); ++i)
+ {
+ ::cppu::extractInterface(xCurrent, xColumns->getByIndex(i));
+ if (xCurrent == xColumn)
+ {
+ markColumn(GetColumnIdFromModelPos(i));
+ break;
+ }
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::DeleteSelectedRows()
+{
+ if (!m_pSeekCursor)
+ return;
+
+ // how many rows are selected?
+ sal_Int32 nSelectedRows = GetSelectRowCount();
+ // is the insert row selected
+ if (GetEmptyRow().Is() && IsRowSelected(GetRowCount() - 1))
+ nSelectedRows -= 1;
+
+ // nothing to do
+ if (nSelectedRows <= 0)
+ return;
+
+ // try to confirm the delete
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xDispatcher = (::com::sun::star::frame::XDispatchProvider*)GetPeer();
+ if (xDispatcher.is())
+ {
+ ::com::sun::star::util::URL aUrl;
+ aUrl.Complete = FMURL_CONFIRM_DELETION;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch = xDispatcher->queryDispatch(aUrl, rtl::OUString(), 0);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener > xConfirm(xDispatch, ::com::sun::star::uno::UNO_QUERY);
+ if (xConfirm.is())
+ {
+ ::com::sun::star::sdb::RowChangeEvent aEvent;
+ aEvent.Source = (::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > )(::com::sun::star::uno::XInterface*)(*getDataSource());
+ aEvent.Rows = nSelectedRows;
+ aEvent.Action = ::com::sun::star::sdb::RowChangeAction::DELETE;
+ if (!xConfirm->confirmDelete(aEvent))
+ return;
+ }
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XDeleteRows > xDeleteThem(*getDataSource(), ::com::sun::star::uno::UNO_QUERY);
+
+ // colect the bookmarks of the selected rows
+ ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Any> aBookmarks = getSelectionBookmarks();
+
+ // determine the next row to position after deletion
+ ::com::sun::star::uno::Any aBookmark;
+ sal_Bool bNewPos = sal_False;
+ // if the current row isn't selected we take the row as row after deletion
+ if (!IsRowSelected(GetCurrentPos()) && !IsCurrentAppending())
+ {
+ aBookmark = GetCurrentRow()->GetBookmark();
+ bNewPos = sal_True;
+ }
+ else
+ {
+ // we look for the first row after the selected block for selection
+ long nIdx = LastSelectedRow() + 1;
+ if (nIdx < GetRowCount() - 1)
+ {
+ // there is a next row to position on
+ if (SeekCursor(nIdx))
+ {
+ GetSeekRow()->SetState(m_pSeekCursor, sal_True);
+
+ bNewPos = sal_True;
+ // if it's not the row for inserting we keep the bookmark
+ if (!IsEmptyRow(nIdx))
+ aBookmark = m_pSeekCursor->getBookmark();
+ }
+ }
+ else
+ {
+ // we look for the first row before the selected block for selection after deletion
+ nIdx = FirstSelectedRow() - 1;
+ if (nIdx >= 0 && SeekCursor(nIdx))
+ {
+ GetSeekRow()->SetState(m_pSeekCursor, sal_True);
+
+ bNewPos = sal_True;
+ aBookmark = m_pSeekCursor->getBookmark();
+ }
+ }
+ }
+
+ // Sind alle Zeilen Selectiert
+ // Zweite bedingung falls keine einguegeZeile existiert
+ sal_Bool bAllSelected = GetTotalCount() == nSelectedRows || GetRowCount() == nSelectedRows;
+
+ BeginCursorAction();
+
+ // now delete the row
+ ::com::sun::star::uno::Sequence <sal_Int32> aDeletedRows = xDeleteThem->deleteRows(aBookmarks);
+
+ // how many rows are deleted?
+ sal_Int32 nDeletedRows = 0;
+ const sal_Int32* pSuccess = aDeletedRows.getConstArray();
+ for (sal_Int32 i = 0; i < aDeletedRows.getLength(); i++)
+ {
+ if (pSuccess[i])
+ nDeletedRows++;
+ }
+
+ // sind Zeilen geloescht worden?
+ if (nDeletedRows)
+ {
+ SetUpdateMode(sal_False);
+ SetNoSelection();
+ try
+ {
+ // did we delete all the rows than try to move to the next possible row
+ if (nDeletedRows == aDeletedRows.getLength())
+ {
+ // there exists a new position to move on
+ if (bNewPos)
+ {
+ if (aBookmark.hasValue())
+ getDataSource()->moveToBookmark(aBookmark);
+ // no valid bookmark so move to the insert row
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > xUpdateCursor(*getDataSource(), ::com::sun::star::uno::UNO_QUERY);
+ xUpdateCursor->moveToInsertRow();
+ }
+ }
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY);
+ sal_Int32 nRecordCount;
+ xSet->getPropertyValue(FM_PROP_ROWCOUNT) >>= nRecordCount;
+ // there are no rows left and we have an insert row
+ if (!nRecordCount && GetEmptyRow().Is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > xUpdateCursor(*getDataSource(), ::com::sun::star::uno::UNO_QUERY);
+ xUpdateCursor->moveToInsertRow();
+ }
+ else if (nRecordCount)
+ // move to the first row
+ getDataSource()->first();
+ }
+ }
+ // not all the rows where deleted, so move to the first row which remained in the resultset
+ else
+ {
+ for (sal_Int32 i = 0; i < aDeletedRows.getLength(); i++)
+ {
+ if (!pSuccess[i])
+ {
+ getDataSource()->moveToBookmark(aBookmarks.getConstArray()[i]);
+ break;
+ }
+ }
+ }
+ }
+ catch(...)
+ {
+ try
+ {
+ // positioning went wrong so try to move to the first row
+ getDataSource()->first();
+ }
+ catch(...)
+ {
+ }
+ }
+
+ // An den DatenCursor anpassen
+ AdjustDataSource(sal_True);
+
+ // es konnten nicht alle Zeilen geloescht werden
+ // da nie nicht geloeschten wieder selektieren
+ if (nDeletedRows < nSelectedRows)
+ {
+ // waren alle selektiert
+ if (bAllSelected)
+ {
+ SelectAll();
+ if (IsEmptyRow(GetRowCount() - 1)) // einfuegeZeile nicht
+ SelectRow(GetRowCount() - 1, sal_False);
+ }
+ else
+ {
+ // select the remaining rows
+ for (sal_Int32 i = 0; i < aDeletedRows.getLength(); i++)
+ {
+ try
+ {
+ if (!pSuccess[i])
+ {
+ m_pSeekCursor->moveToBookmark(m_pDataCursor->getBookmark());
+ SetSeekPos(m_pSeekCursor->getRow() - 1);
+ SelectRow(GetSeekPos());
+ }
+ }
+ catch(...)
+ {
+ // keep the seekpos in all cases
+ SetSeekPos(m_pSeekCursor->getRow() - 1);
+ }
+ }
+ }
+ }
+
+ EndCursorAction();
+ SetUpdateMode(sal_True);
+ }
+ else // Zeile konnte nicht geloescht werden
+ {
+ EndCursorAction();
+ try
+ {
+ // currentrow is the insert row?
+ if (!IsCurrentAppending())
+ getDataSource()->refreshRow();
+ }
+ catch(...)
+ {
+ }
+ }
+
+ // if there is no selection anymore we can start editing
+ if (!GetSelectRowCount())
+ ActivateCell();
+}
+
+
+// XCurrentRecordListener
+//------------------------------------------------------------------------------
+void FmGridControl::positioned(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ TRACE_RANGE("FmGridControl::positioned");
+ // position on the data source (force it to be done in the main thread)
+ implAdjustInSolarThread(sal_False);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmGridControl::commit()
+{
+ // Commit nur ausfuehren, wenn nicht bereits ein Update vom ::com::sun::star::form::component::GridControl ausgefuehrt
+ // wird
+ if (!IsUpdating())
+ {
+ if (Controller().Is() && Controller()->IsModified())
+ {
+ if (!SaveModified())
+ return sal_False;
+ }
+ }
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::inserted(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ const DbGridRowRef& xRow = GetCurrentRow();
+ if (!xRow.Is())
+ return;
+
+ // Zeile ist eingefuegt worden, dann den status und mode zuruecksetzen
+ xRow->SetState(m_pDataCursor, sal_False);
+ xRow->SetNew(sal_False);
+
+}
+
+// XCancelUpdateRecordListener
+//------------------------------------------------------------------------------
+void FmGridControl::restored(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ if (!GetCurrentRow().Is())
+ return;
+
+ sal_Bool bAppending = GetCurrentRow()->IsNew();
+ sal_Bool bDirty = GetCurrentRow()->IsModified();
+ if (bAppending && (DbBrowseBox::IsModified() || bDirty))
+ {
+ if (Controller().Is())
+ Controller()->ClearModified();
+
+ // jetzt die Zeile herausnehmen
+ RowRemoved(GetRowCount() - 1, 1, sal_True);
+ GetNavigationBar().InvalidateAll();
+ }
+
+ positioned(rEvent);
+}
+
+//------------------------------------------------------------------------------
+BrowserHeader* FmGridControl::imp_CreateHeaderBar(BrowseBox* pParent)
+{
+ return new FmGridHeader(this);
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::markColumn(sal_uInt16 nId)
+{
+ if (GetHeaderBar() && m_nMarkedColumnId != nId)
+ {
+ // deselektieren
+ if (m_nMarkedColumnId != BROWSER_INVALIDID)
+ {
+ HeaderBarItemBits aBits = GetHeaderBar()->GetItemBits(m_nMarkedColumnId) & ~HIB_FLAT;
+ GetHeaderBar()->SetItemBits(m_nMarkedColumnId, aBits);
+ }
+
+
+ if (nId != BROWSER_INVALIDID)
+ {
+ HeaderBarItemBits aBits = GetHeaderBar()->GetItemBits(nId) | HIB_FLAT;
+ GetHeaderBar()->SetItemBits(nId, aBits);
+ }
+ m_nMarkedColumnId = nId;
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmGridControl::isColumnMarked(sal_uInt16 nId) const
+{
+ return m_nMarkedColumnId == nId;
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::ColumnResized(sal_uInt16 nId)
+{
+ DbGridControl::ColumnResized(nId);
+
+ // Wert ans model uebergeben
+ DbGridColumn* pCol = DbGridControl::GetColumns().GetObject(GetModelColumnPos(nId));
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xColModel(pCol->getModel());
+ if (xColModel.is())
+ {
+ ::com::sun::star::uno::Any aWidth;
+ sal_Int32 nColumnWidth = GetColumnWidth(nId);
+ nColumnWidth = CalcReverseZoom(nColumnWidth);
+ // Umrechnen in 10THMM
+ aWidth <<= (sal_Int32)PixelToLogic(Point(nColumnWidth,0),MAP_10TH_MM).X();
+ xColModel->setPropertyValue(FM_PROP_WIDTH, aWidth);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::CellModified()
+{
+ DbGridControl::CellModified();
+ GetPeer()->CellModified();
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::BeginCursorAction()
+{
+ DbGridControl::BeginCursorAction();
+ m_pPeer->stopCursorListening();
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::EndCursorAction()
+{
+ m_pPeer->startCursorListening();
+ DbGridControl::EndCursorAction();
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::ColumnMoved(sal_uInt16 nId)
+{
+ m_bInColumnMove = sal_True;
+
+ DbGridControl::ColumnMoved(nId);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xColumns(GetPeer()->getColumns());
+
+ if (xColumns.is())
+ {
+ // suchen der Spalte und verschieben im Model
+ // ColumnPos holen
+ DbGridColumn* pCol = DbGridControl::GetColumns().GetObject(GetModelColumnPos(nId));
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol;
+
+ // Einfuegen muß sich an den Column Positionen orientieren
+ sal_uInt32 i;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xCurrent;
+ for (i = 0; !xCol.is() && i < xColumns->getCount(); i++)
+ {
+ ::cppu::extractInterface(xCurrent, xColumns->getByIndex(i));
+ if (xCurrent == pCol->getModel())
+ {
+ xCol = pCol->getModel();
+ break;
+ }
+ }
+
+ DBG_ASSERT(i < xColumns->getCount(), "Falscher ::com::sun::star::sdbcx::Index");
+ xColumns->removeByIndex(i);
+ ::com::sun::star::uno::Any aElement;
+ aElement <<= xCol;
+ xColumns->insertByIndex(GetModelColumnPos(nId), aElement);
+ pCol->setModel(xCol);
+ }
+
+ m_bInColumnMove = sal_False;
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::InitColumnsByModels(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& xColumns)
+{
+ // Spalten wieder neu setzen
+ // wenn es nur eine HandleColumn gibt, dann nicht
+ if (GetModelColCount())
+ {
+ RemoveColumns();
+ InsertHandleColumn();
+ }
+
+ if (!xColumns.is())
+ return;
+
+ SetUpdateMode(sal_False);
+
+ // Einfuegen muß sich an den Column Positionen orientieren
+ sal_uInt32 i;
+ XubString aName;
+ ::com::sun::star::uno::Any aWidth;
+ for (i = 0; i < xColumns->getCount(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol;
+ ::cppu::extractInterface(xCol, xColumns->getByIndex(i));
+ aName = (const sal_Unicode*)::utl::getString(xCol->getPropertyValue(FM_PROP_LABEL));
+
+ aWidth = xCol->getPropertyValue(FM_PROP_WIDTH);
+ sal_Int32 nWidth = 0;
+ if (aWidth >>= nWidth)
+ nWidth = LogicToPixel(Point(nWidth,0),MAP_10TH_MM).X();
+
+ AppendColumn(aName, nWidth);
+ DbGridColumn* pCol = DbGridControl::GetColumns().GetObject(i);
+ pCol->setModel(xCol);
+ }
+
+ // und jetzt noch die hidden columns rausnehmen
+ // (wir haben das nicht gleich in der oberen Schleife gemacht, da wir dann Probleme mit den
+ // IDs der Spalten bekommen haetten : AppendColumn vergibt die automatisch, die Spalte _nach_
+ // einer versteckten braucht aber eine um eine erhoehte ID ....
+ ::com::sun::star::uno::Any aHidden;
+ for (i = 0; i < xColumns->getCount(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol;
+ ::cppu::extractInterface(xCol, xColumns->getByIndex(i));
+ aHidden = xCol->getPropertyValue(FM_PROP_HIDDEN);
+ if (::utl::getBOOL(aHidden))
+ HideColumn(GetColumnIdFromModelPos(i));
+ }
+
+ SetUpdateMode(sal_True);
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::InitColumnsByFields(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xFields)
+{
+ if (!xFields.is())
+ return;
+
+ // Spalten initialisieren
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xColumns(GetPeer()->getColumns());
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xFieldsAsNames(xFields, ::com::sun::star::uno::UNO_QUERY);
+ sal_Int32 nFieldCount = xFields->getCount();
+
+ // Einfuegen muß sich an den Column Positionen orientieren
+ ::rtl::OUString aFieldName;
+ for (sal_Int32 i = 0; i < xColumns->getCount(); i++)
+ {
+ DbGridColumn* pCol = GetColumns().GetObject(i);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol;
+ ::cppu::extractInterface(xCol, xColumns->getByIndex(i));
+ DbCellControl* pCellControl = NULL;
+
+ // suchen des Feldes, das zur Controlsource gehoert
+ xCol->getPropertyValue(FM_PROP_CONTROLSOURCE) >>= aFieldName;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xField;
+
+ if (aFieldName.len() && xFieldsAsNames->hasByName(aFieldName))
+ {
+ ::cppu::extractInterface(xField, xFieldsAsNames->getByName(aFieldName));
+ }
+
+ // feststellen der Feldposition
+ sal_Int32 nFieldPos = -1;
+ if (xField.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCheck;
+ for (sal_Int32 i = 0; i < nFieldCount; i++)
+ {
+ ::cppu::extractInterface(xCheck, xFields->getByIndex(i));
+ if (xField == xCheck)
+ {
+ nFieldPos = i;
+ break;
+ }
+ }
+ }
+
+ if (xField.is() && nFieldPos >= 0)
+ {
+ // Datenfelder mit folgenden Datentypen können nicht verwendet werden
+ sal_Int32 nDataType;
+ xField->getPropertyValue(FM_PROP_FIELDTYPE) >>= nDataType;
+ sal_Bool bIllegalType(sal_False);
+ switch (nDataType)
+ {
+ case ::com::sun::star::sdbc::DataType::LONGVARBINARY:
+ case ::com::sun::star::sdbc::DataType::BINARY:
+ case ::com::sun::star::sdbc::DataType::VARBINARY:
+ case ::com::sun::star::sdbc::DataType::OTHER:
+ bIllegalType = sal_True;
+ }
+
+ if (bIllegalType)
+ {
+ pCol->SetObject(nFieldPos);
+ continue;
+ }
+ else
+ {
+ // Feststellen ob ReadOnly
+ sal_Bool bReadOnly = ::utl::getBOOL(xField->getPropertyValue(FM_PROP_ISREADONLY));
+ pCol->SetReadOnly(bReadOnly);
+ }
+ }
+
+ // anhand des ServiceNamens wird das Control bestimmt
+ ::rtl::OUString sPropColumnServiceName = ::rtl::OUString::createFromAscii("ColumnServiceName");
+ if (!::utl::hasProperty(sPropColumnServiceName, xCol))
+ return;
+
+ pCol->setModel(xCol);
+
+ sal_Int32 nTypeId = getColumnTypeByModelName(::utl::getString(xCol->getPropertyValue(sPropColumnServiceName)));
+ pCol->CreateControl(nFieldPos, xField, nTypeId);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::HideColumn(sal_uInt16 nId)
+{
+ DbGridControl::HideColumn(nId);
+
+ sal_uInt16 nPos = GetModelColumnPos(nId);
+ if (nPos == (sal_uInt16)-1)
+ return;
+
+ DbGridColumn* pColumn = GetColumns().GetObject(nPos);
+ if (pColumn->IsHidden())
+ GetPeer()->columnHidden(pColumn);
+}
+
+//------------------------------------------------------------------------------
+void FmGridControl::ShowColumn(sal_uInt16 nId)
+{
+ DbGridControl::ShowColumn(nId);
+
+ sal_uInt16 nPos = GetModelColumnPos(nId);
+ if (nPos == (sal_uInt16)-1)
+ return;
+
+ DbGridColumn* pColumn = GetColumns().GetObject(nPos);
+ if (!pColumn->IsHidden())
+ GetPeer()->columnVisible(pColumn);
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> FmGridControl::getSelectionBookmarks()
+{
+ sal_Int32 nSelectedRows = GetSelectRowCount(), i = 0;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> aBookmarks(nSelectedRows);
+ ::com::sun::star::uno::Any* pBookmarks = (::com::sun::star::uno::Any*)aBookmarks.getArray();
+
+ // lock our update so no paint-triggered seeks interfere ...
+ SetUpdateMode(sal_False);
+ // (I'm not sure if the problem isn't deeper : The szenario : a large table displayed by a grid with a
+ // thread-safe cursor (dBase). On loading the sdb-cursor started a counting thread. While this counting progress
+ // was running, I tried do delete 3 records from within the grid. Deletion caused a SeekCursor, which did a
+ // m_pSeekCursor->moveRelative and a m_pSeekCursor->getPosition.
+ // Unfortunally the first call caused a propertyChanged(RECORDCOUNT) which resulted in a repaint of the
+ // navigation bar and the grid. The latter itself will result in SeekRow calls. So after (successfully) returning
+ // from the moveRelative the getPosition returns an invalid value. And so the SeekCursor fails.
+ // In the consequence ALL parts of code where two calls to the seek cursor are done, while the second call _relys_ on
+ // the first one, should be secured against recursion, with a broad-minded interpretion of "recursion" : if any of these
+ // code parts is executed, no other should be accessible. But this sounds very difficult to achieve ....
+ // )
+
+ // The next problem caused by the same behaviuor (SeekCursor causes a propertyChanged) : when adjusting rows we implicitly
+ // change our selection. So a "FirstSelected(); SeekCursor(); NextSelected();" may produce unpredictable results.
+ // That's why we _first_ collect the indicies of the selected rows and _then_ their bookmarks.
+ long nIdx = FirstSelectedRow();
+ while (nIdx >= 0)
+ {
+ // (we misuse the bookmarks array for this ...)
+ pBookmarks[i++] <<= (sal_Int32)nIdx;
+ nIdx = NextSelectedRow();
+ }
+ DBG_ASSERT(i == nSelectedRows, "FmGridControl::DeleteSelectedRows : could not collect the row indicies !");
+
+ for (i=0; i<nSelectedRows; ++i)
+ {
+ nIdx = ::utl::getINT32(pBookmarks[i]);
+ if (IsEmptyRow(nIdx))
+ {
+ // leerzeile nicht loeschen
+ aBookmarks.realloc(--nSelectedRows);
+ SelectRow(nIdx,sal_False); // selection aufheben fuer leerzeile
+ break;
+ }
+
+ // Zunaechst den DatenCursor auf den selektierten Satz pos.
+ if (SeekCursor(nIdx))
+ {
+ GetSeekRow()->SetState(m_pSeekCursor, sal_True);
+
+ pBookmarks[i] = m_pSeekCursor->getBookmark();
+ }
+#if DBG_UTIL
+ else
+ DBG_ERROR("FmGridControl::DeleteSelectedRows : a bookmark could not be determined !");
+#endif
+ }
+ SetUpdateMode(sal_True);
+
+ // if one of the SeekCursor-calls failed ....
+ aBookmarks.realloc(i);
+
+ // (the alternative : while collecting the bookmarks lock our propertyChanged, this should resolve both our problems.
+ // but this would be incompatible as we need a locking flag, then ...)
+
+ return aBookmarks;
+}
+
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
new file mode 100644
index 0000000000..fdc40c1746
--- /dev/null
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -0,0 +1,2555 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmgridif.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _COM_SUN_STAR_SDBC_RESULTSETTYPE_HPP_
+#include <com/sun/star/sdbc/ResultSetType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
+#include <com/sun/star/form/XLoadable.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FORM_FORMCOMPONENTTYPE_HPP_
+#include <com/sun/star/form/FormComponentType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCOMPONENT_HPP_
+#include <com/sun/star/form/XFormComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
+#include <com/sun/star/awt/PosSize.hpp>
+#endif
+#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+
+#ifndef _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif
+
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+
+#ifndef _SVX_FMGRIDIF_HXX
+#include "fmgridif.hxx"
+#endif
+
+#ifndef _SVX_FMGRIDCL_HXX
+#include "fmgridcl.hxx"
+#endif
+
+#ifndef _SVX_GRIDCELL_HXX
+#include "gridcell.hxx"
+#endif
+
+#ifndef _SVX_FMURL_HXX
+#include "fmurl.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _TOOLKIT_UNOHLP_HXX
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+
+#ifndef _UTL_CONTAINER_HXX_
+#include <unotools/container.hxx>
+#endif
+#ifndef _UNOTOOLS_ENUMHELPER_HXX_
+#include <unotools/enumhelper.hxx>
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UTL_TYPES_HXX_
+#include <unotools/types.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+#ifndef _FM_IMPLEMENTATION_IDS_HXX_
+#include "fmimplids.hxx"
+#endif
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+
+//------------------------------------------------------------------
+::com::sun::star::awt::FontDescriptor ImplCreateFontDescriptor( const Font& rFont )
+{
+ ::com::sun::star::awt::FontDescriptor aFD;
+ aFD.Name = rFont.GetName();
+ aFD.StyleName = rFont.GetStyleName();
+ aFD.Height = rFont.GetSize().Height();
+ aFD.Width = rFont.GetSize().Width();
+ aFD.Family = rFont.GetFamily();
+ aFD.CharSet = rFont.GetCharSet();
+ aFD.Pitch = rFont.GetPitch();
+ aFD.CharacterWidth = VCLUnoHelper::ConvertFontWidth( rFont.GetWidthType() );
+ aFD.Weight= VCLUnoHelper::ConvertFontWeight( rFont.GetWeight() );
+ aFD.Slant = (::com::sun::star::awt::FontSlant)rFont.GetItalic();
+ aFD.Underline = rFont.GetUnderline();
+ aFD.Strikeout = rFont.GetStrikeout();
+ aFD.Orientation = rFont.GetOrientation();
+ aFD.Kerning = rFont.IsKerning();
+ aFD.WordLineMode = rFont.IsWordLineMode();
+ aFD.Type = 0; // ??? => Nur an Metric...
+ return aFD;
+}
+
+//------------------------------------------------------------------
+Font ImplCreateFont( const ::com::sun::star::awt::FontDescriptor& rDescr )
+{
+ Font aFont;
+ aFont.SetName( rDescr.Name );
+ aFont.SetStyleName( rDescr.StyleName );
+ aFont.SetSize( Size( rDescr.Width, rDescr.Height ) );
+ aFont.SetFamily( (FontFamily)rDescr.Family );
+ aFont.SetCharSet( (CharSet)rDescr.CharSet );
+ aFont.SetPitch( (FontPitch)rDescr.Pitch );
+ aFont.SetWidthType( VCLUnoHelper::ConvertFontWidth( rDescr.CharacterWidth ) );
+ aFont.SetWeight( VCLUnoHelper::ConvertFontWeight( rDescr.Weight ) );
+ aFont.SetItalic( (FontItalic)rDescr.Slant );
+ aFont.SetUnderline( (FontUnderline)rDescr.Underline );
+ aFont.SetStrikeout( (FontStrikeout)rDescr.Strikeout );
+ aFont.SetOrientation( rDescr.Orientation );
+ aFont.SetKerning( rDescr.Kerning );
+ aFont.SetWordLineMode( rDescr.WordLineMode );
+ return aFont;
+}
+
+//------------------------------------------------------------------
+FmXModifyMultiplexer::FmXModifyMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex )
+ :OWeakSubObject( rSource )
+ ,OInterfaceContainerHelper(rMutex)
+{
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXModifyMultiplexer::queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn;
+ aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::util::XModifyListener*>(this),
+ static_cast< ::com::sun::star::lang::XEventListener*>(this)
+ );
+
+ if (!aReturn.hasValue())
+ aReturn = OWeakSubObject::queryInterface( _rType );
+
+ return aReturn;
+}
+
+//------------------------------------------------------------------
+void FmXModifyMultiplexer::disposing(const ::com::sun::star::lang::EventObject& ) throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+//------------------------------------------------------------------
+void FmXModifyMultiplexer::modified(const ::com::sun::star::lang::EventObject& e)
+{
+ ::com::sun::star::lang::EventObject aMulti( e);
+ aMulti.Source = &m_rParent;
+ NOTIFY_LISTENERS((*this), ::com::sun::star::util::XModifyListener, modified, aMulti);
+}
+
+//------------------------------------------------------------------
+FmXUpdateMultiplexer::FmXUpdateMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex )
+ :OWeakSubObject( rSource )
+ ,OInterfaceContainerHelper(rMutex)
+{
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXUpdateMultiplexer::queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn;
+ aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::form::XUpdateListener*>(this),
+ static_cast< ::com::sun::star::lang::XEventListener*>(this)
+ );
+
+ if (!aReturn.hasValue())
+ aReturn = OWeakSubObject::queryInterface( _rType );
+
+ return aReturn;
+}
+
+//------------------------------------------------------------------
+void FmXUpdateMultiplexer::disposing(const ::com::sun::star::lang::EventObject& ) throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+//------------------------------------------------------------------
+sal_Bool FmXUpdateMultiplexer::approveUpdate(const ::com::sun::star::lang::EventObject &e)
+{
+ ::com::sun::star::lang::EventObject aMulti( e );
+ aMulti.Source = &m_rParent;
+
+ sal_Bool bResult = sal_True;
+ if (getLength()) \
+ { \
+ ::cppu::OInterfaceIteratorHelper aIter(*this); \
+ while (bResult && aIter.hasMoreElements()) \
+ bResult = reinterpret_cast< ::com::sun::star::form::XUpdateListener*>(aIter.next())->approveUpdate(aMulti); \
+ }
+
+ return bResult;
+}
+
+//------------------------------------------------------------------
+void FmXUpdateMultiplexer::updated(const ::com::sun::star::lang::EventObject &e)
+{
+ ::com::sun::star::lang::EventObject aMulti( e );
+ aMulti.Source = &m_rParent;
+ NOTIFY_LISTENERS((*this), ::com::sun::star::form::XUpdateListener, updated, aMulti);
+}
+
+
+//------------------------------------------------------------------
+FmXContainerMultiplexer::FmXContainerMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex )
+ :OWeakSubObject( rSource )
+ ,OInterfaceContainerHelper(rMutex)
+{
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXContainerMultiplexer::queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn;
+ aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::container::XContainerListener*>(this),
+ static_cast< ::com::sun::star::lang::XEventListener*>(this)
+ );
+
+ if (!aReturn.hasValue())
+ aReturn = OWeakSubObject::queryInterface( _rType );
+
+ return aReturn;
+}
+
+//------------------------------------------------------------------
+void FmXContainerMultiplexer::disposing(const ::com::sun::star::lang::EventObject& ) throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+//------------------------------------------------------------------
+void FmXContainerMultiplexer::elementInserted(const ::com::sun::star::container::ContainerEvent& e)
+{
+ ::com::sun::star::container::ContainerEvent aMulti( e );
+ aMulti.Source = &m_rParent;
+ NOTIFY_LISTENERS((*this), ::com::sun::star::container::XContainerListener, elementInserted, aMulti);
+}
+
+//------------------------------------------------------------------
+void FmXContainerMultiplexer::elementRemoved(const ::com::sun::star::container::ContainerEvent& e)
+{
+ ::com::sun::star::container::ContainerEvent aMulti( e );
+ aMulti.Source = &m_rParent;
+ NOTIFY_LISTENERS((*this), ::com::sun::star::container::XContainerListener, elementRemoved, aMulti);
+}
+
+
+//------------------------------------------------------------------
+void FmXContainerMultiplexer::elementReplaced(const ::com::sun::star::container::ContainerEvent& e)
+{
+ ::com::sun::star::container::ContainerEvent aMulti( e );
+ aMulti.Source = &m_rParent;
+ NOTIFY_LISTENERS((*this), ::com::sun::star::container::XContainerListener, elementReplaced, aMulti);
+}
+
+//==================================================================
+//= FmXGridControl
+//==================================================================
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL FmXGridControl_NewInstance_Impl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory)
+{
+ return *(new FmXGridControl(_rxFactory));
+}
+
+//------------------------------------------------------------------------------
+FmXGridControl::FmXGridControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
+ :m_aModifyListeners(*this, GetMutex())
+ ,m_aUpdateListeners(*this, GetMutex())
+ ,m_aContainerListeners(*this, GetMutex())
+ ,m_nPeerCreationLevel(0)
+ ,m_bInDraw(sal_False)
+ ,m_xServiceFactory(_rxFactory)
+{
+}
+
+//------------------------------------------------------------------------------
+FmXGridControl::~FmXGridControl()
+{
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXGridControl::queryAggregation(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::form::XBoundComponent*>(this),
+ static_cast< ::com::sun::star::form::XUpdateBroadcaster*>(this),
+ static_cast< ::com::sun::star::form::XGrid*>(this),
+ static_cast< ::com::sun::star::util::XModifyBroadcaster*>(this),
+ static_cast< ::com::sun::star::form::XGridFieldDataSupplier*>(this),
+ static_cast< ::com::sun::star::container::XIndexAccess*>(this),
+ static_cast< ::com::sun::star::container::XElementAccess*>(static_cast< ::com::sun::star::container::XIndexAccess*>(this)),
+ static_cast< ::com::sun::star::container::XEnumerationAccess*>(this),
+ static_cast< ::com::sun::star::util::XModeSelector*>(this),
+ static_cast< ::com::sun::star::container::XContainer*>(this),
+ static_cast< ::com::sun::star::frame::XDispatchProvider*>(this),
+ static_cast< ::com::sun::star::frame::XDispatchProviderInterception*>(this)
+ );
+
+ if (!aReturn.hasValue())
+ aReturn = UnoControl::queryAggregation( _rType );
+ return aReturn;
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL FmXGridControl::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypes = UnoControl::getTypes();
+
+ sal_Int32 nLen = aTypes.getLength();
+ aTypes.realloc(nLen + 10);
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::form::XGrid>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyBroadcaster>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridFieldDataSupplier>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeSelector>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>*>(NULL));
+ DBG_ASSERT(nLen == aTypes.getLength(), "FmXGridControl::getTypes : forgot to adjust realloc ?");
+
+ return aTypes;
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL FmXGridControl::getImplementationId( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ return form::OImplementationIds::getImplementationId(getTypes());
+}
+
+// ::com::sun::star::lang::XServiceInfo
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXGridControl::supportsService(const ::rtl::OUString& ServiceName) throw()
+{
+ ::utl::StringSequence aSupported = getSupportedServiceNames();
+ const ::rtl::OUString * pArray = aSupported.getConstArray();
+ for( sal_Int32 i = 0; i < aSupported.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return sal_True;
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXGridControl::getImplementationName() throw()
+{
+ return ::rtl::OUString::createFromAscii("com.sun.star.form.FmXGridControl");
+}
+
+//------------------------------------------------------------------------------
+::utl::StringSequence SAL_CALL FmXGridControl::getSupportedServiceNames() throw()
+{
+ static ::rtl::OUString aServName = FM_SUN_CONTROL_GRIDCONTROL;
+// static ::rtl::OUString aServName(FM_SUN_CONTROL_GRIDCONTROL);
+ return ::utl::StringSequence(&aServName, 1);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::dispose() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::lang::EventObject aEvt;
+ aEvt.Source = static_cast< ::cppu::OWeakObject* >(this);
+ m_aModifyListeners.disposeAndClear(aEvt);
+ m_aUpdateListeners.disposeAndClear(aEvt);
+ m_aContainerListeners.disposeAndClear(aEvt);
+
+ UnoControl::dispose();
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString FmXGridControl::GetComponentServiceName()
+{
+ ::rtl::OUString aName = ::rtl::OUString::createFromAscii("DBGrid");
+ return aName;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXGridControl::setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rModel)
+{
+ if (!UnoControl::setModel(rModel))
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridPeer > xGridPeer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xGridPeer.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xCols(mxModel, ::com::sun::star::uno::UNO_QUERY);
+ xGridPeer->setColumns(xCols);
+ }
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+FmXGridPeer* FmXGridControl::imp_CreatePeer(Window* pParent)
+{
+ FmXGridPeer* pReturn = new FmXGridPeer(m_xServiceFactory);
+
+ // translate properties into WinBits
+ WinBits nStyle = WB_TABSTOP;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModelSet(getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xModelSet.is())
+ {
+ try
+ {
+ if (::utl::getINT16(xModelSet->getPropertyValue(FM_PROP_BORDER)))
+ nStyle |= WB_BORDER;
+ }
+ catch(...)
+ {
+ }
+ }
+
+ pReturn->Create(pParent, nStyle);
+ return pReturn;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::createPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& rToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParentPeer) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if (mxPeer.is())
+ return;
+
+ Window* pParentWin = NULL;
+ if (rParentPeer.is())
+ {
+ VCLXWindow* pParent = VCLXWindow::GetImplementation(rParentPeer);
+ if (pParent)
+ pParentWin = pParent->GetWindow();
+ }
+
+ FmXGridPeer* pPeer = imp_CreatePeer(pParentWin);
+ DBG_ASSERT(pPeer != NULL, "FmXGridControl::createPeer : imp_CreatePeer didn't return a peer !");
+ mxPeer = pPeer;
+
+ // lesen der properties aus dem model
+ ++m_nPeerCreationLevel;
+ updateFromModel();
+
+ // folgendes unschoene Szenario : updateFromModel fuehrt zu einem propertiesChanged am Control,
+ // das stellt fest, dass sich eine 'kritische' Property geaendert hat (zum Beispiel "Border") und
+ // legt daraufhin eine neue Peer an, was wieder hier im createPeer landet, wir legen also eine
+ // zweite FmXGridPeer an und initialisieren die. Dann kommen wir in der ersten Inkarnation aus
+ // dem updsateFromModel raus und arbeiten dort weiter mit dem pPeer, das jetzt eigentlich schon
+ // veraltet ist (da ja in der zweiten Inkarnation eine andere Peer angelegt wurde).
+ // Deswegen also der Aufwand mit dem PeerCreationLevel, das stellt sicher, dass wir die in dem
+ // tiefsten Level angelegte Peer wirklich verwenden, sie aber erst im top-level
+ // initialisieren.
+ if (--m_nPeerCreationLevel == 0)
+ {
+ DBG_ASSERT(mxPeer.is(), "FmXGridControl::createPeer : something went wrong ... no top level peer !");
+ pPeer = FmXGridPeer::getImplementation(mxPeer);
+
+ ::com::sun::star::awt::Rectangle rArea = getPosSize();
+ if (!rArea.Width && !rArea.Height)
+ pPeer->setPosSize(rArea.X, rArea.Y, rArea.Width, rArea.Height, ::com::sun::star::awt::PosSize::POSSIZE);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xColumns(getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xColumns.is())
+ pPeer->setColumns(xColumns);
+
+ if (maComponentInfos.bVisible)
+ pPeer->setVisible(sal_True);
+
+ if (!maComponentInfos.bEnable)
+ pPeer->setEnable(sal_False);
+
+ if (maWindowListeners.getLength())
+ pPeer->addWindowListener( &maWindowListeners );
+
+ if (maFocusListeners.getLength())
+ pPeer->addFocusListener( &maFocusListeners );
+
+ if (maKeyListeners.getLength())
+ pPeer->addKeyListener( &maKeyListeners );
+
+ if (maMouseListeners.getLength())
+ pPeer->addMouseListener( &maMouseListeners );
+
+ if (maMouseMotionListeners.getLength())
+ pPeer->addMouseMotionListener( &maMouseMotionListeners );
+
+ if (maPaintListeners.getLength())
+ pPeer->addPaintListener( &maPaintListeners );
+
+ if (m_aModifyListeners.getLength())
+ pPeer->addModifyListener( &m_aModifyListeners );
+
+ if (m_aUpdateListeners.getLength())
+ pPeer->addUpdateListener( &m_aUpdateListeners );
+
+ if (m_aContainerListeners.getLength())
+ pPeer->addContainerListener( &m_aContainerListeners );
+
+ // forward the design mode
+ sal_Bool bForceAlivePeer = m_bInDraw && !maComponentInfos.bVisible;
+ // (we force a alive-mode peer if we're in "draw", cause in this case the peer will be used for drawing in
+ // foreign devices. We secure this with the visibility check as an living peer is assumed to be noncritical
+ // only if invisible)
+ ::com::sun::star::uno::Any aOldCursorBookmark;
+ if (!mbDesignMode || bForceAlivePeer)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xComp(getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xComp.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xForm(xComp->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ // is the form alive?
+ // we can see that if the form contains columns
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xColumnsSupplier(xForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xColumnsSupplier.is())
+ {
+ if (::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > (xColumnsSupplier->getColumns(),::com::sun::star::uno::UNO_QUERY)->getCount())
+ {
+ // we get only a new bookmark if the resultset is not forwardonly
+ if (::utl::getINT32(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (xForm, ::com::sun::star::uno::UNO_QUERY)->getPropertyValue(FM_PROP_RESULTSET_TYPE)) != ::com::sun::star::sdbc::ResultSetType::FORWARD_ONLY)
+ {
+ // as the FmGridControl touches the data source it is connected to we have to remember the current
+ // cursor position (and restore afterwards)
+ aOldCursorBookmark = ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate > (xForm, ::com::sun::star::uno::UNO_QUERY)->getBookmark();
+ }
+ }
+ }
+ pPeer->setRowSet(xForm);
+ }
+ }
+ pPeer->setDesignMode(mbDesignMode && !bForceAlivePeer);
+
+ if (aOldCursorBookmark.hasValue())
+ { // we have a valid bookmark, so we have to restore the cursor's position
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xComp(getModel(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate > xLocate(xComp->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ xLocate->moveToBookmark(aOldCursorBookmark);
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > xPeerView(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ xPeerView->setZoom( maComponentInfos.nZoomX, maComponentInfos.nZoomY );
+ xPeerView->setGraphics( mxGraphics );
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXGridControl::addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l)
+{
+ m_aModifyListeners.addInterface( l );
+ if( mxPeer.is() && m_aModifyListeners.getLength() == 1 )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyBroadcaster > xGrid(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ xGrid->addModifyListener( &m_aModifyListeners);
+ }
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< sal_Bool > SAL_CALL FmXGridControl::queryFieldDataType( const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ if (mxPeer.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridFieldDataSupplier > xPeerSupplier(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xPeerSupplier.is())
+ return xPeerSupplier->queryFieldDataType(xType);
+ }
+
+ return ::com::sun::star::uno::Sequence<sal_Bool>();
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL FmXGridControl::queryFieldData( sal_Int32 nRow, const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ if (mxPeer.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridFieldDataSupplier > xPeerSupplier(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xPeerSupplier.is())
+ return xPeerSupplier->queryFieldData(nRow, xType);
+ }
+
+ return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>();
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l)
+{
+ if( mxPeer.is() && m_aModifyListeners.getLength() == 1 )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyBroadcaster > xGrid(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ xGrid->removeModifyListener( &m_aModifyListeners);
+ }
+ m_aModifyListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::draw( long x, long y )
+{
+ m_bInDraw = sal_True;
+ UnoControl::draw(x, y);
+ m_bInDraw = sal_False;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::setDesignMode(sal_Bool bOn)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetSupplier > xGrid(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+
+ if (xGrid.is() && (bOn != mbDesignMode || (!bOn && !xGrid->getRowSet().is())))
+ {
+ if (bOn)
+ {
+ xGrid->setRowSet(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > ());
+ }
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xComp(getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xComp.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xForm(xComp->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ xGrid->setRowSet(xForm);
+ }
+ }
+
+ mbDesignMode = bOn;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer > xVclWindowPeer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xVclWindowPeer.is())
+ xVclWindowPeer->setDesignMode(bOn);
+ }
+ mbDesignMode = bOn;
+}
+
+// ::com::sun::star::form::XBoundComponent
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::addUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l)
+{
+ m_aUpdateListeners.addInterface( l );
+ if( mxPeer.is() && m_aUpdateListeners.getLength() == 1 )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent > xBound(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ xBound->addUpdateListener( &m_aUpdateListeners);
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::removeUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l)
+{
+ if( mxPeer.is() && m_aUpdateListeners.getLength() == 1 )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent > xBound(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ xBound->removeUpdateListener( &m_aUpdateListeners);
+ }
+ m_aUpdateListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXGridControl::commit()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent > xBound(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xBound.is())
+ return xBound->commit();
+ else
+ return sal_True;
+}
+
+// ::com::sun::star::container::XContainer
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aContainerListeners.addInterface( l );
+ if( mxPeer.is() && m_aContainerListeners.getLength() == 1 )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xContainer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ xContainer->addContainerListener( &m_aContainerListeners);
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::removeContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if( mxPeer.is() && m_aContainerListeners.getLength() == 1 )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xContainer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ xContainer->removeContainerListener( &m_aContainerListeners);
+ }
+ m_aContainerListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL FmXGridControl::queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xPeerProvider(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xPeerProvider.is())
+ return xPeerProvider->queryDispatch(aURL, aTargetFrameName, nSearchFlags);
+ else
+ return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > ();
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL FmXGridControl::queryDispatches(const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor>& aDescripts) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xPeerProvider(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xPeerProvider.is())
+ return xPeerProvider->queryDispatches(aDescripts);
+ else
+ return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > >();
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::registerDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& _xInterceptor) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception > xPeerInterception(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xPeerInterception.is())
+ xPeerInterception->registerDispatchProviderInterceptor(_xInterceptor);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::releaseDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& _xInterceptor) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception > xPeerInterception(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xPeerInterception.is())
+ xPeerInterception->releaseDispatchProviderInterceptor(_xInterceptor);
+}
+
+//------------------------------------------------------------------------------
+sal_Int16 SAL_CALL FmXGridControl::getCurrentColumnPosition()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGrid > xGrid(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ return xGrid.is() ? xGrid->getCurrentColumnPosition() : -1;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::setCurrentColumnPosition(sal_Int16 nPos)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGrid > xGrid(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xGrid.is())
+ xGrid->setCurrentColumnPosition(nPos);
+}
+
+// ::com::sun::star::container::XElementAccess
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXGridControl::hasElements() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XElementAccess > xPeer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ return xPeer.is() ? xPeer->hasElements() : 0;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Type SAL_CALL FmXGridControl::getElementType( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ return ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >*)NULL);
+}
+
+// ::com::sun::star::container::XEnumerationAccess
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL FmXGridControl::createEnumeration() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > xPeer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (xPeer.is())
+ return xPeer->createEnumeration();
+ else
+ return new ::utl::OEnumerationByIndex(this);
+}
+
+// ::com::sun::star::container::XIndexAccess
+//------------------------------------------------------------------------------
+sal_Int32 SAL_CALL FmXGridControl::getCount() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xPeer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ return xPeer.is() ? xPeer->getCount() : 0;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXGridControl::getByIndex(sal_Int32 _nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xPeer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (!xPeer.is())
+ throw ::com::sun::star::lang::IndexOutOfBoundsException();
+
+ return xPeer->getByIndex(_nIndex);
+}
+
+// ::com::sun::star::util::XModeSelector
+//------------------------------------------------------------------------------
+void SAL_CALL FmXGridControl::setMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeSelector > xPeer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (!xPeer.is())
+ throw ::com::sun::star::lang::NoSupportException();
+
+ xPeer->setMode(Mode);
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXGridControl::getMode() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeSelector > xPeer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ return xPeer.is() ? xPeer->getMode() : ::rtl::OUString();
+}
+
+//------------------------------------------------------------------------------
+::utl::StringSequence SAL_CALL FmXGridControl::getSupportedModes() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeSelector > xPeer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ return xPeer.is() ? xPeer->getSupportedModes() : ::utl::StringSequence();
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXGridControl::supportsMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeSelector > xPeer(mxPeer, ::com::sun::star::uno::UNO_QUERY);
+ return xPeer.is() ? xPeer->supportsMode(Mode) : sal_False;
+}
+
+/*************************************************************************/
+//------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > FmXGridPeer_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory)
+{
+ FmXGridPeer* pNewObject = new FmXGridPeer(_rxFactory);
+ pNewObject->Create(NULL, WB_TABSTOP);
+ return *pNewObject;
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL FmXGridPeer::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypes = VCLXWindow::getTypes();
+
+ sal_Int32 nLen = aTypes.getLength();
+ aTypes.realloc(nLen + 19);
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridPeer>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::form::XGrid>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetSupplier>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyBroadcaster>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadListener>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridFieldDataSupplier>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeSelector>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>*>(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::form::XResetListener>*>(NULL));
+ DBG_ASSERT(nLen == aTypes.getLength(), "FmXGridPeer::getTypes : forgot to adjust realloc ?");
+
+ return aTypes;
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL FmXGridPeer::getImplementationId( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ return form::OImplementationIds::getImplementationId(getTypes());
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXGridPeer::queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::form::XGrid*>(this),
+ static_cast< ::com::sun::star::util::XModifyBroadcaster*>(this),
+ static_cast< ::com::sun::star::container::XContainerListener*>(this),
+ static_cast< ::com::sun::star::form::XLoadListener*>(this),
+ static_cast< ::com::sun::star::form::XBoundComponent*>(this),
+ static_cast< ::com::sun::star::form::XUpdateBroadcaster*>(this),
+ static_cast< ::com::sun::star::beans::XPropertyChangeListener*>(this),
+ static_cast< ::com::sun::star::lang::XEventListener*>(static_cast< ::com::sun::star::beans::XPropertyChangeListener*>(this)),
+ static_cast< ::com::sun::star::sdb::XRowSetSupplier*>(this),
+ static_cast< ::com::sun::star::sdbc::XRowSetListener*>(this),
+ static_cast< ::com::sun::star::view::XSelectionChangeListener*>(this),
+ static_cast< ::com::sun::star::form::XGridFieldDataSupplier*>(this)
+ );
+
+ if (!aReturn.hasValue())
+ aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::container::XElementAccess*>(static_cast< ::com::sun::star::container::XIndexAccess*>(this)),
+ static_cast< ::com::sun::star::container::XIndexAccess*>(this),
+ static_cast< ::com::sun::star::container::XEnumerationAccess*>(this),
+ static_cast< ::com::sun::star::util::XModeSelector*>(this),
+ static_cast< ::com::sun::star::frame::XDispatchProvider*>(this),
+ static_cast< ::com::sun::star::frame::XDispatchProviderInterception*>(this),
+ static_cast< ::com::sun::star::form::XResetListener*>(this)
+ );
+
+ if (!aReturn.hasValue())
+ aReturn = VCLXWindow::queryInterface( _rType );
+
+ return aReturn;
+}
+
+//------------------------------------------------------------------------------
+rtl::OUString _fModeName = DATA_MODE;
+FmXGridPeer::FmXGridPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
+ :m_aModifyListeners(m_aMutex)
+ ,m_aUpdateListeners(m_aMutex)
+ ,m_aContainerListeners(m_aMutex)
+ ,m_nCursorListening(0)
+// ,m_aMode(rtl::OUString(DATA_MODE))
+ ,m_aMode( _fModeName )
+ ,m_pStateCache(NULL)
+ ,m_pDispatchers(NULL)
+ ,m_bInterceptingDispatch(sal_False)
+ ,m_xServiceFactory(_rxFactory)
+{
+ // nach diesem Constructor muss Create gerufen werden !
+}
+
+//------------------------------------------------------------------------------
+FmGridControl* FmXGridPeer::imp_CreateControl(Window* pParent, WinBits nStyle)
+{
+ return new FmGridControl(m_xServiceFactory, pParent, this, nStyle);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::Create(Window* pParent, WinBits nStyle)
+{
+ FmGridControl* pWin = imp_CreateControl(pParent, nStyle);
+ DBG_ASSERT(pWin != NULL, "FmXGridPeer::Create : imp_CreateControl didn't return a control !");
+
+ pWin->SetStateProvider(LINK(this, FmXGridPeer, OnQueryGridSlotState));
+ pWin->SetSlotExecutor(LINK(this, FmXGridPeer, OnExecuteGridSlot));
+
+ // Init muß immer aufgerufen werden
+ pWin->Init();
+ pWin->SetComponentInterface(this);
+
+ getSupportedURLs();
+}
+
+//------------------------------------------------------------------------------
+FmXGridPeer::~FmXGridPeer()
+{
+ setRowSet(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > ());
+ setColumns(::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > ());
+}
+
+//------------------------------------------------------------------------------
+const ::com::sun::star::uno::Sequence< sal_Int8 >& FmXGridPeer::getUnoTunnelImplementationId() throw()
+{
+ static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0;
+ if( !pSeq )
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if( !pSeq )
+ {
+ static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
+
+//------------------------------------------------------------------------------
+FmXGridPeer* FmXGridPeer::getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxIFace ) throw()
+{
+ FmXGridPeer* pReturn = NULL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel(_rxIFace, ::com::sun::star::uno::UNO_QUERY);
+ if (xTunnel.is())
+ pReturn = reinterpret_cast<FmXGridPeer*>(xTunnel->getSomething(getUnoTunnelImplementationId()));
+
+ return pReturn;
+}
+
+//------------------------------------------------------------------------------
+sal_Int64 SAL_CALL FmXGridPeer::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException)
+{
+ sal_Int64 nReturn(0);
+
+ if ( (_rIdentifier.getLength() == 16)
+ && (0 == rtl_compareMemory( getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ))
+ )
+ {
+ nReturn = reinterpret_cast<sal_Int64>(this);
+ }
+ else
+ nReturn = VCLXWindow::getSomething(_rIdentifier);
+
+ return nReturn;
+}
+
+// ::com::sun::star::lang::XEventListener
+//------------------------------------------------------------------------------
+void FmXGridPeer::disposing(const ::com::sun::star::lang::EventObject& e) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::lang::EventObject aEvt(static_cast< ::cppu::OWeakObject* >(this));
+ m_aUpdateListeners.disposeAndClear(aEvt);
+ m_aModifyListeners.disposeAndClear(aEvt);
+ m_aContainerListeners.disposeAndClear(aEvt);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xCols(e.Source, ::com::sun::star::uno::UNO_QUERY);
+ if (xCols.is())
+ setColumns(::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > ());
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xCursor(e.Source, ::com::sun::star::uno::UNO_QUERY);
+ if (xCursor.is())
+ {
+ m_xCursor = NULL;
+ setRowSet(m_xCursor);
+ }
+
+ if (m_pDispatchers)
+ {
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::util::URL>& aSupportedURLs = getSupportedURLs();
+ const ::com::sun::star::util::URL* pSupportedURLs = aSupportedURLs.getConstArray();
+ sal_Bool bDisconnect = sal_False;
+ for (sal_uInt16 i=0; i<aSupportedURLs.getLength() && !bDisconnect; ++i, ++pSupportedURLs)
+ {
+ if (m_pDispatchers[i] == e.Source)
+ {
+ m_pDispatchers[i]->removeStatusListener((::com::sun::star::frame::XStatusListener*)this, *pSupportedURLs);
+ m_pDispatchers[i] = NULL;
+ m_pStateCache[i] = 0;
+ }
+ }
+ }
+ // VCLXComponent::disposing(e);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l)
+{
+ m_aModifyListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l)
+{
+ m_aModifyListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------------------
+#define LAST_KNOWN_TYPE ::com::sun::star::form::FormComponentType::PATTERNFIELD
+::com::sun::star::uno::Sequence< sal_Bool > SAL_CALL FmXGridPeer::queryFieldDataType( const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ // eine 'Konvertierungstabelle'
+ static sal_Bool bCanConvert[LAST_KNOWN_TYPE][4] =
+ {
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::CONTROL
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::COMMANDBUTTON
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::RADIOBUTTON
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::IMAGEBUTTON
+ { sal_False, sal_False, sal_False, sal_True }, // ::com::sun::star::form::FormComponentType::CHECKBOX
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::LISTBOX
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::COMBOBOX
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::GROUPBOX
+ { sal_True , sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::TEXTFIELD
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::FIXEDTEXT
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::GRIDCONTROL
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::FILECONTROL
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::HIDDENCONTROL
+ { sal_False, sal_False, sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::IMAGECONTROL
+ { sal_True , sal_True , sal_True , sal_False }, // ::com::sun::star::form::FormComponentType::DATEFIELD
+ { sal_True , sal_True , sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::TIMEFIELD
+ { sal_True , sal_True , sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::NUMERICFIELD
+ { sal_True , sal_True , sal_False, sal_False }, // ::com::sun::star::form::FormComponentType::CURRENCYFIELD
+ { sal_True , sal_False, sal_False, sal_False } // ::com::sun::star::form::FormComponentType::PATTERNFIELD
+ };
+
+
+ sal_Int16 nMapColumn = -1;
+ switch (xType.getTypeClass())
+ {
+ case ::com::sun::star::uno::TypeClass_STRING : nMapColumn = 0; break;
+ case ::com::sun::star::uno::TypeClass_FLOAT:
+ case ::com::sun::star::uno::TypeClass_DOUBLE : nMapColumn = 1; break;
+ case ::com::sun::star::uno::TypeClass_SHORT:
+ case ::com::sun::star::uno::TypeClass_LONG:
+ case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG:
+ case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT : nMapColumn = 2; break;
+ case ::com::sun::star::uno::TypeClass_BOOLEAN : nMapColumn = 3; break;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xColumns = getColumns();
+
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ sal_Int32 nColumns = pGrid->GetViewColCount();
+
+ DbGridColumns aColumns = pGrid->GetColumns();
+
+ ::com::sun::star::uno::Sequence<sal_Bool> aReturnSequence(nColumns);
+ sal_Bool* pReturnArray = aReturnSequence.getArray();
+
+ sal_Bool bRequestedAsAny = (xType.getTypeClass() == ::com::sun::star::uno::TypeClass_ANY);
+
+ DbGridColumn* pCol;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > xFieldContent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCurrentColumn;
+ for (sal_Int32 i=0; i<nColumns; ++i)
+ {
+ if (bRequestedAsAny)
+ {
+ pReturnArray[i] = sal_True;
+ continue;
+ }
+
+ pReturnArray[i] = sal_False;
+
+ sal_uInt16 nModelPos = pGrid->GetModelColumnPos(pGrid->GetColumnIdFromViewPos(i));
+ DBG_ASSERT(nModelPos != (sal_uInt16)-1, "FmXGridPeer::queryFieldDataType : no model pos !");
+
+ pCol = aColumns.GetObject(nModelPos);
+ const DbGridRowRef xRow = pGrid->GetSeekRow();
+ xFieldContent = (xRow.Is() && xRow->HasField(pCol->GetFieldPos())) ? (const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >&)xRow->GetField(pCol->GetFieldPos()) : ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > ();
+ if (!xFieldContent.is())
+ // can't supply anything without a field content
+ // FS - 07.12.99 - 54391
+ continue;
+
+ xCurrentColumn;
+ ::cppu::extractInterface(xCurrentColumn, xColumns->getByIndex(nModelPos));
+ if (!::utl::hasProperty(FM_PROP_CLASSID, xCurrentColumn))
+ continue;
+
+ sal_Int16 nClassId;
+ xCurrentColumn->getPropertyValue(FM_PROP_CLASSID) >>= nClassId;
+ if (nClassId>LAST_KNOWN_TYPE)
+ continue;
+ DBG_ASSERT(nClassId>0, "FmXGridPeer::queryFieldDataType : somebody changed the definition of the ::com::sun::star::form::FormComponentType enum !");
+
+ if (nMapColumn != -1)
+ pReturnArray[i] = bCanConvert[nClassId-1][nMapColumn];
+ }
+
+ return aReturnSequence;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL FmXGridPeer::queryFieldData( sal_Int32 nRow, const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ DBG_ASSERT(pGrid && pGrid->IsOpen(), "FmXGridPeer::queryFieldData : have no valid grid window !");
+ if (!pGrid || !pGrid->IsOpen())
+ return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>();
+
+ // das Control zur angegebenen Row fahren
+ if (!pGrid->SeekRow(nRow))
+ {
+ throw ::com::sun::star::lang::IllegalArgumentException();
+ }
+
+ // don't use GetCurrentRow as this isn't affected by the above SeekRow
+ // FS - 30.09.99 - 68644
+ DbGridRowRef aRow = pGrid->GetSeekRow();
+ DBG_ASSERT(aRow.Is(), "FmXGridPeer::queryFieldData : invalid current Row !");
+
+ // die Columns des Controls brauche ich fuer GetFieldText
+ DbGridColumns aColumns = pGrid->GetColumns();
+
+ // und durch alle Spalten durch
+ sal_Int32 nColumnCount = pGrid->GetViewColCount();
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> aReturnSequence(nColumnCount);
+ ::com::sun::star::uno::Any* pReturnArray = aReturnSequence.getArray();
+
+ sal_Bool bRequestedAsAny = (xType.getTypeClass() == ::com::sun::star::uno::TypeClass_ANY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > xFieldContent;
+ DbGridColumn* pCol;
+ for (sal_Int32 i=0; i < nColumnCount; ++i)
+ {
+ sal_uInt16 nModelPos = pGrid->GetModelColumnPos(pGrid->GetColumnIdFromViewPos(i));
+ DBG_ASSERT(nModelPos != (sal_uInt16)-1, "FmXGridPeer::queryFieldData : invalid model pos !");
+
+ // don't use GetCurrentFieldValue to determine the field content as this isn't affected by the above SeekRow
+ // FS - 30.09.99 - 68644
+ pCol = aColumns.GetObject(nModelPos);
+ const DbGridRowRef xRow = pGrid->GetSeekRow();
+ xFieldContent = (xRow.Is() && xRow->HasField(pCol->GetFieldPos())) ? (const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >&)xRow->GetField(pCol->GetFieldPos()) : ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > ();
+
+ if (xFieldContent.is())
+ {
+ if (bRequestedAsAny)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xFieldSet(xFieldContent, ::com::sun::star::uno::UNO_QUERY);
+ pReturnArray[i] = xFieldSet->getPropertyValue(FM_PROP_VALUE);
+ }
+ else
+ {
+ switch (xType.getTypeClass())
+ {
+ // Strings werden direkt ueber das GetFieldText abgehandelt
+ case ::com::sun::star::uno::TypeClass_STRING :
+ {
+ String sText = aColumns.GetObject(nModelPos)->GetCellText(aRow, pGrid->getNumberFormatter());
+ pReturnArray[i] <<= ::rtl::OUString(sText);
+ }
+ break;
+ // alles andere wird an der DatabaseVariant erfragt
+ case ::com::sun::star::uno::TypeClass_FLOAT : pReturnArray[i] <<= xFieldContent->getFloat(); break;
+ case ::com::sun::star::uno::TypeClass_DOUBLE : pReturnArray[i] <<= xFieldContent->getDouble(); break;
+ case ::com::sun::star::uno::TypeClass_SHORT : pReturnArray[i] <<= (sal_Int16)xFieldContent->getShort(); break;
+ case ::com::sun::star::uno::TypeClass_LONG : pReturnArray[i] <<= (sal_Int32)xFieldContent->getLong(); break;
+ case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: pReturnArray[i] <<= (sal_uInt16)xFieldContent->getShort(); break;
+ case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG : pReturnArray[i] <<= (sal_uInt32)xFieldContent->getLong(); break;
+ case ::com::sun::star::uno::TypeClass_BOOLEAN : ::utl::setBOOL(pReturnArray[i],xFieldContent->getBoolean()); break;
+ default:
+ {
+ throw ::com::sun::star::lang::IllegalArgumentException();
+ }
+ }
+ }
+ }
+ }
+ return aReturnSequence;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::CellModified()
+{
+ ::com::sun::star::lang::EventObject aEvt;
+ aEvt.Source = static_cast< ::cppu::OWeakObject* >(this);
+ NOTIFY_LISTENERS(m_aModifyListeners, ::com::sun::star::util::XModifyListener, modified, aEvt);
+}
+
+// ::com::sun::star::beans::XPropertyChangeListener
+//------------------------------------------------------------------------------
+void FmXGridPeer::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt)
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (!pGrid)
+ return;
+
+ // DatenbankEvent
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xCursor(evt.Source, ::com::sun::star::uno::UNO_QUERY);
+ if (evt.PropertyName == FM_PROP_VALUE || m_xCursor == evt.Source)
+ pGrid->propertyChange(evt);
+ else if (pGrid && m_xColumns.is() && m_xColumns->hasElements())
+ {
+ // zunaechst raussuchen welche Column sich geaendert hat
+ ::utl::InterfaceRef xCurrent;
+ for (sal_Int32 i = 0; i < m_xColumns->getCount(); i++)
+ {
+ ::cppu::extractInterface(xCurrent, m_xColumns->getByIndex(i));
+ if (evt.Source == xCurrent)
+ break;
+ }
+
+ if (i >= m_xColumns->getCount())
+ // this is valid because we are listening at the cursor, too (RecordCount, -status, edit mode)
+ return;
+
+ sal_uInt16 nId = pGrid->GetColumnIdFromModelPos(i);
+ sal_Bool bInvalidateColumn = sal_False;
+
+ if (evt.PropertyName == FM_PROP_LABEL)
+ {
+ String aName = ::utl::getString(evt.NewValue);
+ if (aName != pGrid->GetColumnTitle(nId))
+ pGrid->SetColumnTitle(nId, aName);
+ }
+ else if (evt.PropertyName == FM_PROP_WIDTH)
+ {
+ sal_Int32 nWidth = 0;
+ if (evt.NewValue.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_VOID)
+ nWidth = pGrid->GetDefaultColumnWidth(pGrid->GetColumnTitle(nId));
+ // GetDefaultColumnWidth already considerd the zoom factor
+ else
+ {
+ sal_Int32 nTest;
+ if (evt.NewValue >>= nTest)
+ {
+ nWidth = pGrid->LogicToPixel(Point(nTest,0),MAP_10TH_MM).X();
+ // take the zoom factor into account
+ nWidth = pGrid->CalcZoom(nWidth);
+ }
+ }
+ if (nWidth != (sal_Int32(pGrid->GetColumnWidth(nId))))
+ {
+ if (pGrid->IsEditing())
+ {
+ pGrid->DeactivateCell();
+ pGrid->ActivateCell();
+ }
+ pGrid->SetColumnWidth(nId, nWidth);
+ }
+ }
+ else if (evt.PropertyName == FM_PROP_HIDDEN)
+ {
+ DBG_ASSERT(evt.NewValue.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_BOOLEAN,
+ "FmXGridPeer::propertyChange : the property 'hidden' should be of type boolean !");
+ if (::utl::getBOOL(evt.NewValue))
+ pGrid->HideColumn(nId);
+ else
+ pGrid->ShowColumn(nId);
+ }
+ else if (evt.PropertyName == FM_PROP_ALIGN)
+ {
+ // it design mode it doesn't matter
+ if (!isDesignMode())
+ {
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ DbGridColumn* pCol = pGrid->GetColumns().GetObject(i);
+
+ pCol->SetAlignmentFromModel(-1);
+ bInvalidateColumn = sal_True;
+ }
+ }
+ else if (evt.PropertyName == FM_PROP_FORMATKEY)
+ {
+ if (!isDesignMode())
+ bInvalidateColumn = sal_True;
+ }
+
+ // need to invalidate the affected column ?
+ if (bInvalidateColumn)
+ {
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+
+ sal_Bool bWasEditing = pGrid->IsEditing();
+ if (bWasEditing)
+ pGrid->DeactivateCell();
+
+ Rectangle aColRect = pGrid->GetFieldRect(nId);
+ aColRect.Top() = 0;
+ aColRect.Bottom() = pGrid->GetSizePixel().Height();
+ pGrid->Invalidate(aColRect);
+
+ if (bWasEditing)
+ pGrid->ActivateCell();
+ }
+ }
+}
+
+// ::com::sun::star::form::XBoundComponent
+//------------------------------------------------------------------------------
+void FmXGridPeer::addUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l)
+{
+ m_aUpdateListeners.addInterface(l);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::removeUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l)
+{
+ m_aUpdateListeners.removeInterface(l);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXGridPeer::commit()
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (!m_xCursor.is() || !pGrid)
+ return sal_True;
+
+ ::com::sun::star::lang::EventObject aEvt(static_cast< ::cppu::OWeakObject* >(this));
+ ::cppu::OInterfaceIteratorHelper aIter(m_aUpdateListeners);
+ sal_Bool bCancel = sal_False;
+ while (aIter.hasMoreElements() && !bCancel)
+ if (!reinterpret_cast< ::com::sun::star::form::XUpdateListener*>(aIter.next())->approveUpdate(aEvt))
+ bCancel = sal_True;
+
+ if (!bCancel)
+ bCancel = !pGrid->commit();
+
+ if (!bCancel)
+ {
+ NOTIFY_LISTENERS(m_aUpdateListeners, ::com::sun::star::form::XUpdateListener, updated, aEvt);
+ }
+ return !bCancel;
+}
+
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::cursorMoved(const ::com::sun::star::lang::EventObject& _rEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ // we are not interested in move to insert row only in the resetted event
+ // which is fired after positioning an the insert row
+ if (pGrid && pGrid->IsOpen() && !::utl::getBOOL(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (_rEvent.Source, ::com::sun::star::uno::UNO_QUERY)->getPropertyValue(FM_PROP_ISNEW)))
+ pGrid->positioned(_rEvent);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::rowChanged(const ::com::sun::star::lang::EventObject& _rEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (pGrid && pGrid->IsOpen())
+ {
+ if (m_xCursor->rowUpdated() && !pGrid->IsCurrentAppending())
+ pGrid->RowModified(pGrid->GetCurrentPos());
+ else if (m_xCursor->rowInserted())
+ pGrid->inserted(_rEvent);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::rowSetChanged(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException )
+{
+ // not interested in ...
+ // (our parent is a form which means we get a loaded or reloaded after this rowSetChanged)
+}
+
+// ::com::sun::star::form::XLoadListener
+//------------------------------------------------------------------------------
+void FmXGridPeer::loaded(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ updateGrid(m_xCursor);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::unloaded(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ updateGrid( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > (NULL) );
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::reloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ // empty the grid
+ updateGrid( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > (NULL) );
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ // empty the grid
+ updateGrid( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > (NULL) );
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::reloaded(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ updateGrid(m_xCursor);
+}
+
+// ::com::sun::star::form::XGridPeer
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > FmXGridPeer::getColumns() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumns;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::addColumnListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xCol)
+{
+ static ::rtl::OUString aPropsListenedTo[] =
+ {
+ FM_PROP_LABEL, FM_PROP_WIDTH, FM_PROP_HIDDEN, FM_PROP_ALIGN, FM_PROP_FORMATKEY
+ };
+
+ // as not all properties have to be supported by all columns we have to check this
+ // before adding a listener
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo = xCol->getPropertySetInfo();
+ for (sal_uInt16 i=0; i<sizeof(aPropsListenedTo)/sizeof(aPropsListenedTo[0]); ++i)
+ if (xInfo->hasPropertyByName(aPropsListenedTo[i]))
+ xCol->addPropertyChangeListener(aPropsListenedTo[i], this);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::removeColumnListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xCol)
+{
+ // the same props as in addColumnListeners ... linux has problems with global static UStrings, so
+ // we have to do it this way ....
+ static ::rtl::OUString aPropsListenedTo[] =
+ {
+ FM_PROP_LABEL, FM_PROP_WIDTH, FM_PROP_HIDDEN, FM_PROP_ALIGN, FM_PROP_FORMATKEY
+ };
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo = xCol->getPropertySetInfo();
+ for (sal_uInt16 i=0; i<sizeof(aPropsListenedTo)/sizeof(aPropsListenedTo[0]); ++i)
+ if (xInfo->hasPropertyByName(aPropsListenedTo[i]))
+ xCol->removePropertyChangeListener(aPropsListenedTo[i], this);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::setColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& Columns) throw( ::com::sun::star::uno::RuntimeException )
+{
+ Window* pWin = GetWindow();
+
+ if (m_xColumns.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol;
+ for (sal_Int32 i = 0; i < m_xColumns->getCount(); i++)
+ {
+ ::cppu::extractInterface(xCol, m_xColumns->getByIndex(i));
+ removeColumnListeners(xCol);
+ }
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xContainer(m_xColumns, ::com::sun::star::uno::UNO_QUERY);
+ xContainer->removeContainerListener(this);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier > xSelSupplier(m_xColumns, ::com::sun::star::uno::UNO_QUERY);
+ xSelSupplier->removeSelectionChangeListener(this);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XReset > xColumnReset(m_xColumns, ::com::sun::star::uno::UNO_QUERY);
+ if (xColumnReset.is())
+ xColumnReset->removeResetListener((::com::sun::star::form::XResetListener*)this);
+ }
+ if (Columns.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xContainer(Columns, ::com::sun::star::uno::UNO_QUERY);
+ xContainer->addContainerListener(this);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier > xSelSupplier(Columns, ::com::sun::star::uno::UNO_QUERY);
+ xSelSupplier->addSelectionChangeListener(this);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol;
+ for (sal_Int32 i = 0; i < Columns->getCount(); i++)
+ {
+ ::cppu::extractInterface(xCol, Columns->getByIndex(i));
+ addColumnListeners(xCol);
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XReset > xColumnReset(Columns, ::com::sun::star::uno::UNO_QUERY);
+ if (xColumnReset.is())
+ xColumnReset->addResetListener((::com::sun::star::form::XResetListener*)this);
+ }
+ m_xColumns = Columns;
+ if (pWin)
+ {
+ ((FmGridControl*) pWin)->InitColumnsByModels(m_xColumns);
+
+ if (m_xColumns.is())
+ {
+ ::com::sun::star::lang::EventObject aEvt(m_xColumns);
+ selectionChanged(aEvt);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::setDesignMode(sal_Bool bOn)
+{
+ if (bOn != isDesignMode())
+ {
+ Window* pWin = GetWindow();
+ if (pWin)
+ ((FmGridControl*) pWin)->SetDesignMode(bOn);
+ }
+
+ if (bOn)
+ DisConnectFromDispatcher();
+ else
+ UpdateDispatches(); // will connect if not already connected and just update else
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXGridPeer::isDesignMode()
+{
+ Window* pWin = GetWindow();
+ if (pWin)
+ return ((FmGridControl*) pWin)->IsDesignMode();
+ else
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::elementInserted(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ // Handle Column beruecksichtigen
+ if (!pGrid || !m_xColumns.is() || pGrid->IsInColumnMove() || m_xColumns->getCount() == ((sal_Int32)pGrid->GetModelColCount()))
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet;
+ ::cppu::extractInterface(xSet, evt.Element);
+ addColumnListeners(xSet);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xNewColumn(xSet);
+ String aName = ::utl::getString(xNewColumn->getPropertyValue(FM_PROP_LABEL));
+ ::com::sun::star::uno::Any aWidth = xNewColumn->getPropertyValue(FM_PROP_WIDTH);
+ sal_Int32 nWidth = 0;
+ if (aWidth >>= nWidth)
+ nWidth = pGrid->LogicToPixel(Point(nWidth,0),MAP_10TH_MM).X();
+
+ pGrid->AppendColumn(aName, nWidth, (sal_Int16)::utl::getINT32(evt.Accessor));
+
+ // jetzt die Spalte setzen
+ DbGridColumn* pCol = pGrid->GetColumns().GetObject(::utl::getINT32(evt.Accessor));
+ pCol->setModel(xNewColumn);
+
+ ::com::sun::star::uno::Any aHidden = xNewColumn->getPropertyValue(FM_PROP_HIDDEN);
+ if (::utl::getBOOL(aHidden))
+ pGrid->HideColumn(pCol->GetId());
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::elementReplaced(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+
+ // Handle Column beruecksichtigen
+ if (!pGrid || !m_xColumns.is() || pGrid->IsInColumnMove())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xNewColumn;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xOldColumn;
+ ::cppu::extractInterface(xNewColumn, evt.Element);
+ ::cppu::extractInterface(xOldColumn, evt.ReplacedElement);
+
+ pGrid->RemoveColumn(pGrid->GetColumnIdFromModelPos(::utl::getINT32(evt.Accessor)));
+ removeColumnListeners(xOldColumn);
+
+ String aName = ::utl::getString(xNewColumn->getPropertyValue(FM_PROP_LABEL));
+ ::com::sun::star::uno::Any aWidth = xNewColumn->getPropertyValue(FM_PROP_WIDTH);
+ sal_Int32 nWidth = 0;
+ if (aWidth >>= nWidth)
+ nWidth = pGrid->LogicToPixel(Point(nWidth,0),MAP_10TH_MM).X();
+ pGrid->AppendColumn(aName, nWidth, (sal_Int16)::utl::getINT32(evt.Accessor));
+
+ addColumnListeners(xNewColumn);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::elementRemoved(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+
+ // Handle Column beruecksichtigen
+ if (!pGrid || !m_xColumns.is() || pGrid->IsInColumnMove() || m_xColumns->getCount() == ((sal_Int32)pGrid->GetModelColCount()))
+ return;
+
+ pGrid->RemoveColumn(pGrid->GetColumnIdFromModelPos(::utl::getINT32(evt.Accessor)));
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xOldColumn;
+ ::cppu::extractInterface(xOldColumn, evt.Element);
+ removeColumnListeners(xOldColumn);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw( ::com::sun::star::uno::RuntimeException )
+{
+ sal_uInt16 nId = FmPropertyInfoService::getPropertyId(PropertyName);
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ sal_Bool bVoid = !Value.hasValue();
+ switch (nId)
+ {
+ case FM_ATTR_HELPURL:
+ {
+ String sHelpURL(::utl::getString(Value));
+ String sPattern;
+ sPattern.AssignAscii("HID:");
+ if (sHelpURL.Equals(sPattern, 0, sPattern.Len()))
+ {
+ String sID = sHelpURL.Copy(sPattern.Len());
+ pGrid->SetHelpId(sID.ToInt32());
+ }
+ }
+ break;
+ case FM_ATTR_DISPLAYSYNCHRON:
+ pGrid->setDisplaySynchron(::utl::getBOOL(Value));
+ break;
+ case FM_ATTR_CURSORCOLOR:
+ if (bVoid)
+ pGrid->SetCursorColor(COL_TRANSPARENT);
+ else
+ pGrid->SetCursorColor(Color(::utl::getINT32(Value)));
+ if (isDesignMode())
+ pGrid->Invalidate();
+ break;
+ case FM_ATTR_ALWAYSSHOWCURSOR:
+ pGrid->EnablePermanentCursor(::utl::getBOOL(Value));
+ if (isDesignMode())
+ pGrid->Invalidate();
+ break;
+ case FM_ATTR_FONT:
+ {
+ if ( bVoid )
+ pGrid->SetControlFont( Font() );
+ else
+ {
+ ::com::sun::star::awt::FontDescriptor aFont;
+ if (Value >>= aFont)
+ {
+ if (::utl::operator==(aFont, ::utl::getDefaultFont())) // ist das der Default
+ pGrid->SetControlFont( Font() );
+ else
+ pGrid->SetControlFont( ImplCreateFont( aFont ) );
+
+ // if our row-height property is void (which means "calculate it font-dependent") we have
+ // to adjust the control's row height
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModelSet(getColumns(), ::com::sun::star::uno::UNO_QUERY);
+ if (xModelSet.is() && ::utl::hasProperty(FM_PROP_ROWHEIGHT, xModelSet))
+ {
+ ::com::sun::star::uno::Any aHeight = xModelSet->getPropertyValue(FM_PROP_ROWHEIGHT);
+ if (!aHeight.hasValue())
+ pGrid->SetDataRowHeight(0);
+ }
+
+ }
+ }
+ }
+ break;
+ case FM_ATTR_BACKGROUNDCOLOR:
+ if ( bVoid )
+ {
+ pGrid->SetControlBackground();
+ }
+ else
+ {
+ Color aColor( ::utl::getINT32(Value) );
+ pGrid->SetBackground( aColor );
+ pGrid->SetControlBackground( aColor );
+ }
+ break;
+ case FM_ATTR_TEXTCOLOR:
+ if ( bVoid )
+ {
+ pGrid->SetControlForeground();
+ }
+ else
+ {
+ Color aColor( ::utl::getINT32(Value) );
+ pGrid->SetTextColor( aColor );
+ pGrid->SetControlForeground( aColor );
+ }
+ break;
+ case FM_ATTR_ROWHEIGHT:
+ {
+ sal_Int32 nLogHeight(0);
+ if (Value >>= nLogHeight)
+ {
+ sal_Int32 nHeight = pGrid->LogicToPixel(Point(0,nLogHeight),MAP_10TH_MM).Y();
+ // take the zoom factor into account
+ nHeight = pGrid->CalcZoom(nHeight);
+ pGrid->SetDataRowHeight(nHeight);
+ }
+ else if (bVoid)
+ pGrid->SetDataRowHeight(0);
+ } break;
+ case FM_ATTR_HASNAVIGATION:
+ {
+ if (Value.getValueType() == ::getBooleanCppuType())
+ pGrid->EnableNavigationBar(*(sal_Bool*)Value.getValue());
+ } break;
+ case FM_ATTR_RECORDMARKER:
+ {
+ if (Value.getValueType() == ::getBooleanCppuType())
+ pGrid->EnableHandle(*(sal_Bool*)Value.getValue());
+ } break;
+ case FM_ATTR_ENABLED:
+ {
+ if (Value.getValueType() == ::getBooleanCppuType())
+ {
+ // Im DesignModus nur das Datenfenster disablen
+ // Sonst kann das Control nicht mehr konfiguriert werden
+ if (isDesignMode())
+ pGrid->GetDataWindow().Enable(*(sal_Bool*)Value.getValue());
+ else
+ pGrid->Enable(*(sal_Bool*)Value.getValue());
+ }
+ } break;
+ default:
+ VCLXWindow::setProperty( PropertyName, Value );
+ }
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Any FmXGridPeer::getProperty( const ::rtl::OUString& PropertyName ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Any aProp;
+ if (GetWindow())
+ {
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ Window* pDataWindow = &pGrid->GetDataWindow();
+ sal_uInt16 nId = FmPropertyInfoService::getPropertyId(PropertyName);
+ switch (nId)
+ {
+ case FM_ATTR_FONT:
+ {
+ Font aFont = pDataWindow->GetControlFont();
+ aProp <<= ImplCreateFontDescriptor( aFont );
+ } break;
+ case FM_ATTR_TEXTCOLOR:
+ aProp <<= (sal_Int32)pDataWindow->GetControlForeground().GetColor();
+ break;
+ case FM_ATTR_BACKGROUNDCOLOR:
+ aProp <<= (sal_Int32)pDataWindow->GetControlBackground().GetColor();
+ break;
+ case FM_ATTR_ROWHEIGHT:
+ {
+ sal_Int32 nPixelHeight = pGrid->GetDataRowHeight();
+ // take the zoom factor into account
+ nPixelHeight = pGrid->CalcReverseZoom(nPixelHeight);
+ aProp <<= (sal_Int32)pGrid->PixelToLogic(Point(0,nPixelHeight),MAP_10TH_MM).Y();
+ } break;
+ case FM_ATTR_HASNAVIGATION:
+ {
+ sal_Bool bHasNavBar = pGrid->HasNavigationBar();
+ aProp <<= (sal_Bool)bHasNavBar;
+ } break;
+ case FM_ATTR_RECORDMARKER:
+ {
+ sal_Bool bHasHandle = pGrid->HasHandle();
+ aProp <<= (sal_Bool)bHasHandle;
+ } break;
+ case FM_ATTR_ENABLED:
+ {
+ aProp <<= (sal_Bool)pDataWindow->IsEnabled();
+ } break;
+ default:
+ aProp = VCLXWindow::getProperty( PropertyName );
+ }
+ }
+ return aProp;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::dispose() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::lang::EventObject aEvt;
+ aEvt.Source = static_cast< ::cppu::OWeakObject* >(this);
+ m_aModifyListeners.disposeAndClear(aEvt);
+ m_aUpdateListeners.disposeAndClear(aEvt);
+ m_aContainerListeners.disposeAndClear(aEvt);
+ VCLXWindow::dispose();
+
+ DisConnectFromDispatcher();
+ setRowSet(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > ());
+}
+
+// ::com::sun::star::container::XContainer
+//------------------------------------------------------------------------------
+void FmXGridPeer::addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aContainerListeners.addInterface( l );
+}
+//------------------------------------------------------------------------------
+void FmXGridPeer::removeContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aContainerListeners.removeInterface( l );
+}
+
+// ::com::sun::star::data::XDatabaseCursorSupplier
+//------------------------------------------------------------------------------
+void FmXGridPeer::startCursorListening()
+{
+ if (!m_nCursorListening)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xRowSet(m_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xRowSet.is())
+ xRowSet->addRowSetListener(this);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XReset > xReset(m_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xReset.is())
+ xReset->addResetListener(this);
+
+ // alle Listener anmelden
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ xSet->addPropertyChangeListener(FM_PROP_ISMODIFIED, this);
+ xSet->addPropertyChangeListener(FM_PROP_ROWCOUNT, this);
+ }
+ }
+ m_nCursorListening++;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::stopCursorListening()
+{
+ if (!--m_nCursorListening)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xRowSet(m_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xRowSet.is())
+ xRowSet->removeRowSetListener(this);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XReset > xReset(m_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xReset.is())
+ xReset->removeResetListener(this);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ xSet->removePropertyChangeListener(FM_PROP_ISMODIFIED, this);
+ xSet->removePropertyChangeListener(FM_PROP_ROWCOUNT, this);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::updateGrid(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxCursor)
+{
+ FmGridControl* pGrid = (FmGridControl*)GetWindow();
+ if (pGrid)
+ pGrid->setDataSource(_rxCursor);
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > FmXGridPeer::getRowSet() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return m_xCursor;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::setRowSet(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rDatabaseCursor) throw( ::com::sun::star::uno::RuntimeException )
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (!pGrid || !m_xColumns.is() || !m_xColumns->getCount())
+ return;
+ // alle Listener abmelden
+ if (m_xCursor.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > xLoadable(m_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ // only if the form is loaded we set the rowset
+ if (xLoadable.is())
+ {
+ stopCursorListening();
+ xLoadable->removeLoadListener(this);
+ }
+ }
+
+ m_xCursor = _rDatabaseCursor;
+
+ if (pGrid)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > xLoadable(m_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ // only if the form is loaded we set the rowset
+ if (xLoadable.is() && xLoadable->isLoaded())
+ pGrid->setDataSource(m_xCursor);
+ else
+ pGrid->setDataSource(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > ());
+
+ if (xLoadable.is())
+ {
+ startCursorListening();
+ xLoadable->addLoadListener(this);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Int16 FmXGridPeer::getCurrentColumnPosition()
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ return pGrid ? pGrid->GetViewColumnPos(pGrid->GetCurColumnId()) : -1;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::setCurrentColumnPosition(sal_Int16 nPos)
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (pGrid)
+ pGrid->GoToColumnId(pGrid->GetColumnIdFromViewPos(nPos));
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::selectionChanged(const ::com::sun::star::lang::EventObject& evt)
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (pGrid)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier > xSelSupplier(evt.Source, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Any aSelection = xSelSupplier->getSelection();
+ DBG_ASSERT(aSelection.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_INTERFACE, "FmXGridPeer::selectionChanged : invalid selection !");
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSelection;
+ ::cppu::extractInterface(xSelection, aSelection);
+ if (xSelection.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol;
+ for (sal_uInt32 i = 0; i < m_xColumns->getCount(); i++)
+ {
+ ::cppu::extractInterface(xCol, m_xColumns->getByIndex(i));
+ if (xCol == xSelection)
+ {
+ pGrid->markColumn(pGrid->GetColumnIdFromModelPos(i));
+ break;
+ }
+ }
+ }
+ else
+ pGrid->markColumn(USHRT_MAX);
+ }
+}
+
+// ::com::sun::star::container::XElementAccess
+//------------------------------------------------------------------------------
+sal_Bool FmXGridPeer::hasElements() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return getCount() != 0;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Type SAL_CALL FmXGridPeer::getElementType( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ return ::getCppuType((::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> *)NULL);
+}
+
+// ::com::sun::star::container::XEnumerationAccess
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > FmXGridPeer::createEnumeration() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return new ::utl::OEnumerationByIndex(this);
+}
+
+// ::com::sun::star::container::XIndexAccess
+//------------------------------------------------------------------------------
+sal_Int32 FmXGridPeer::getCount() throw( ::com::sun::star::uno::RuntimeException )
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (pGrid)
+ return pGrid->GetViewColCount();
+ else
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Any FmXGridPeer::getByIndex(sal_Int32 _nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (_nIndex < 0 ||
+ _nIndex >= getCount() || !pGrid)
+ throw ::com::sun::star::lang::IndexOutOfBoundsException();
+
+ ::com::sun::star::uno::Any aElement;
+ // get the columnid
+ sal_uInt16 nId = pGrid->GetColumnIdFromViewPos(_nIndex);
+ // get the list position
+ sal_uInt16 nPos = pGrid->GetModelColumnPos(nId);
+
+ DbGridColumn* pCol = pGrid->GetColumns().GetObject(nPos);
+// DBG_ASSERT(pCol && pCol->GetCell(), "FmXGridPeer::getByIndex(): Invalid cell");
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl(pCol->GetCell());
+ aElement <<= xControl;
+
+ return aElement;
+}
+
+// ::com::sun::star::util::XModeSelector
+//------------------------------------------------------------------------------
+void FmXGridPeer::setMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException )
+{
+ if (!supportsMode(Mode))
+ throw ::com::sun::star::lang::NoSupportException();
+
+ if (Mode == m_aMode)
+ return;
+
+ m_aMode = Mode;
+
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (Mode == FILTER_MODE)
+ pGrid->SetFilterMode(sal_True);
+ else
+ {
+ pGrid->SetFilterMode(sal_False);
+ pGrid->setDataSource(m_xCursor);
+ }
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString FmXGridPeer::getMode() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return m_aMode;
+}
+
+//------------------------------------------------------------------------------
+::utl::StringSequence FmXGridPeer::getSupportedModes() throw( ::com::sun::star::uno::RuntimeException )
+{
+ static ::utl::StringSequence aModes;
+ if (!aModes.getLength())
+ {
+ aModes.realloc(2);
+ ::rtl::OUString* pModes = aModes.getArray();
+ pModes[0] = DATA_MODE;
+ pModes[1] = FILTER_MODE;
+ }
+ return aModes;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXGridPeer::supportsMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::utl::StringSequence aModes(getSupportedModes());
+ const ::rtl::OUString* pModes = aModes.getConstArray();
+ for (sal_Int32 i = aModes.getLength(); i > 0; )
+ {
+ if (pModes[--i] == Mode)
+ return sal_True;
+ }
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::columnVisible(DbGridColumn* pColumn)
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+
+ sal_Int32 _nIndex = pGrid->GetModelColumnPos(pColumn->GetId());
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl(pColumn->GetCell());
+ ::com::sun::star::container::ContainerEvent aEvt;
+ aEvt.Source = (::com::sun::star::container::XContainer*)this;
+ aEvt.Accessor <<= _nIndex;
+ aEvt.Element <<= xControl;
+
+ NOTIFY_LISTENERS(m_aContainerListeners, ::com::sun::star::container::XContainerListener, elementInserted, aEvt);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::columnHidden(DbGridColumn* pColumn)
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+
+ sal_Int32 _nIndex = pGrid->GetModelColumnPos(pColumn->GetId());
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl(pColumn->GetCell());
+ ::com::sun::star::container::ContainerEvent aEvt;
+ aEvt.Source = (::com::sun::star::container::XContainer*)this;
+ aEvt.Accessor <<= _nIndex;
+ aEvt.Element <<= xControl;
+
+ NOTIFY_LISTENERS(m_aContainerListeners, ::com::sun::star::container::XContainerListener, elementRemoved, aEvt);
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::draw( long x, long y )
+{
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ sal_Int32 nOldFlags = pGrid->GetBrowserFlags();
+ pGrid->SetBrowserFlags(nOldFlags | DBBF_NOROWPICTURE);
+
+ VCLXWindow::draw(x, y);
+
+ pGrid->SetBrowserFlags(nOldFlags);
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > FmXGridPeer::queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xResult;
+
+ // first ask our interceptor chain
+ if (m_xFirstDispatchInterceptor.is() && !m_bInterceptingDispatch)
+ {
+ m_bInterceptingDispatch = sal_True;
+ // safety against recursion : as we are master of the first chain element and slave of the last one we would
+ // have an infinite loop without this if no dispatcher can fullfill the rewuest)
+ xResult = m_xFirstDispatchInterceptor->queryDispatch(aURL, aTargetFrameName, nSearchFlags);
+ m_bInterceptingDispatch = sal_False;
+ }
+
+ // then ask ourself : we don't have any dispatches
+ return xResult;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > FmXGridPeer::queryDispatches(const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor>& aDescripts) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if (m_xFirstDispatchInterceptor.is())
+ return m_xFirstDispatchInterceptor->queryDispatches(aDescripts);
+
+ // then ask ourself : we don't have any dispatches
+ return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > >();
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::registerDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& _xInterceptor) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if (_xInterceptor.is())
+ {
+ if (m_xFirstDispatchInterceptor.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xFirstProvider(m_xFirstDispatchInterceptor, ::com::sun::star::uno::UNO_QUERY);
+ // there is already an interceptor; the new one will become its master
+ _xInterceptor->setSlaveDispatchProvider(xFirstProvider);
+ m_xFirstDispatchInterceptor->setMasterDispatchProvider(xFirstProvider);
+ }
+ else
+ {
+ // it is the first interceptor; set ourself as slave
+ _xInterceptor->setSlaveDispatchProvider((::com::sun::star::frame::XDispatchProvider*)this);
+ }
+
+ // we are the master of the chain's first interceptor
+ m_xFirstDispatchInterceptor = _xInterceptor;
+ m_xFirstDispatchInterceptor->setMasterDispatchProvider((::com::sun::star::frame::XDispatchProvider*)this);
+
+ // we have a new interceptor and we're alive ?
+ if (!isDesignMode())
+ // -> check for new dispatchers
+ UpdateDispatches();
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::releaseDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& _xInterceptor) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if (!_xInterceptor.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > xChainWalk(m_xFirstDispatchInterceptor);
+
+ if (m_xFirstDispatchInterceptor == _xInterceptor)
+ { // our chain will have a new first element
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > xSlave(m_xFirstDispatchInterceptor->getSlaveDispatchProvider(), ::com::sun::star::uno::UNO_QUERY);
+ m_xFirstDispatchInterceptor = xSlave;
+ }
+ // do this before removing the interceptor from the chain as we won't know it's slave afterwards)
+
+ while (xChainWalk.is())
+ {
+ // walk along the chain of interceptors and look for the interceptor that has to be removed
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > xSlave(xChainWalk->getSlaveDispatchProvider(), ::com::sun::star::uno::UNO_QUERY);
+
+ if (xChainWalk == _xInterceptor)
+ {
+ // old master may be an interceptor too
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > xMaster(xChainWalk->getMasterDispatchProvider(), ::com::sun::star::uno::UNO_QUERY);
+
+ // unchain the interceptor that has to be removed
+ xChainWalk->setSlaveDispatchProvider(::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > ());
+ xChainWalk->setMasterDispatchProvider(::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > ());
+
+ // reconnect the chain
+ if (xMaster.is())
+ {
+ if (xSlave.is())
+ xMaster->setSlaveDispatchProvider(::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >::query(xSlave));
+ else
+ // it's the first interceptor of the chain, set ourself as slave
+ xMaster->setSlaveDispatchProvider((::com::sun::star::frame::XDispatchProvider*)this);
+ }
+ else
+ {
+ // the chain's first element was removed, set ourself as new master of the second one
+ if (xSlave.is())
+ xSlave->setMasterDispatchProvider((::com::sun::star::frame::XDispatchProvider*)this);
+ }
+ }
+
+ xChainWalk = xSlave;
+ }
+ // our interceptor chain has changed and we're alive ?
+ if (!isDesignMode())
+ // -> check the dispatchers
+ UpdateDispatches();
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw( ::com::sun::star::uno::RuntimeException )
+{
+ DBG_ASSERT(m_pStateCache, "FmXGridPeer::statusChanged : invalid call !");
+ DBG_ASSERT(m_pDispatchers, "FmXGridPeer::statusChanged : invalid call !");
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::util::URL>& aUrls = getSupportedURLs();
+ const ::com::sun::star::util::URL* pUrls = aUrls.getConstArray();
+
+ ::com::sun::star::uno::Sequence<sal_uInt16> aSlots = getSupportedGridSlots();
+ const sal_uInt16* pSlots = aSlots.getConstArray();
+
+ for (sal_uInt16 i=0; i<aUrls.getLength(); ++i, ++pUrls, ++pSlots)
+ {
+ if (pUrls->Main == Event.FeatureURL.Main)
+ {
+ DBG_ASSERT(m_pDispatchers[i] == Event.Source, "FmXGridPeer::statusChanged : the event source is a little bit suspect !");
+ m_pStateCache[i] = Event.IsEnabled;
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (*pSlots != SID_FM_RECORD_UNDO)
+ pGrid->GetNavigationBar().InvalidateState(*pSlots);
+ break;
+ }
+ }
+ DBG_ASSERT(i<aUrls.getLength(), "FmXGridPeer::statusChanged : got a call for an unknown url !");
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXGridPeer::approveReset(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::resetted(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if (m_xColumns == rEvent.Source)
+ { // my model was reset -> refresh the grid content
+ FmGridControl* pGrid = (FmGridControl*)GetWindow();
+ if (!pGrid)
+ return;
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ pGrid->resetCurrentRow();
+ }
+ // if the cursor fired a reset event we seem to be on the insert row
+ else if (m_xCursor == rEvent.Source)
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ FmGridControl* pGrid = (FmGridControl*) GetWindow();
+ if (pGrid && pGrid->IsOpen())
+ pGrid->positioned(rEvent);
+ }
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence<sal_uInt16>& FmXGridPeer::getSupportedGridSlots()
+{
+ static ::com::sun::star::uno::Sequence<sal_uInt16> aSupported;
+ if (aSupported.getLength() == 0)
+ {
+ sal_uInt16 nSupported[] = {
+ DbGridControl::NavigationBar::RECORD_FIRST,
+ DbGridControl::NavigationBar::RECORD_PREV,
+ DbGridControl::NavigationBar::RECORD_NEXT,
+ DbGridControl::NavigationBar::RECORD_LAST,
+ DbGridControl::NavigationBar::RECORD_NEW,
+ SID_FM_RECORD_UNDO
+ };
+ aSupported.realloc(sizeof(nSupported)/sizeof(nSupported[0]));
+ sal_uInt16* pSupported = aSupported.getArray();
+ for (sal_uInt16 i=0; i<aSupported.getLength(); ++i, ++pSupported)
+ *pSupported = nSupported[i];
+ }
+ return aSupported;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::util::URL>& FmXGridPeer::getSupportedURLs()
+{
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::util::URL> aSupported;
+ if (aSupported.getLength() == 0)
+ {
+ static ::rtl::OUString sSupported[] = {
+ FMURL_RECORD_MOVEFIRST,
+ FMURL_RECORD_MOVEPREV,
+ FMURL_RECORD_MOVENEXT,
+ FMURL_RECORD_MOVELAST,
+ FMURL_RECORD_MOVETONEW,
+ FMURL_RECORD_UNDO
+ };
+ aSupported.realloc(sizeof(sSupported)/sizeof(sSupported[0]));
+ ::com::sun::star::util::URL* pSupported = aSupported.getArray();
+ for (sal_uInt16 i=0; i<aSupported.getLength(); ++i, ++pSupported)
+ pSupported->Complete = sSupported[i];
+
+ // let an ::com::sun::star::util::URL-transformer normalize the URLs
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > xTransformer(
+ ::utl::getProcessServiceFactory()->createInstance(
+ ::rtl::OUString::createFromAscii("com.sun.star.util.::com::sun::star::util::URLTransformer")),
+ ::com::sun::star::uno::UNO_QUERY);
+ pSupported = aSupported.getArray();
+ if (xTransformer.is())
+ {
+ for (i=0; i<aSupported.getLength(); ++i)
+ xTransformer->parseStrict(pSupported[i]);
+ }
+ }
+
+ return aSupported;
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::UpdateDispatches()
+{
+ if (!m_pStateCache)
+ { // we don't have any dispatchers yet -> do the initial connect
+ ConnectToDispatcher();
+ return;
+ }
+
+ sal_uInt16 nDispatchersGot = 0;
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::util::URL>& aSupportedURLs = getSupportedURLs();
+ const ::com::sun::star::util::URL* pSupportedURLs = aSupportedURLs.getConstArray();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xNewDispatch;
+ for (sal_uInt16 i=0; i<aSupportedURLs.getLength(); ++i, ++pSupportedURLs)
+ {
+ xNewDispatch = queryDispatch(*pSupportedURLs, rtl::OUString(), 0);
+ if (xNewDispatch != m_pDispatchers[i])
+ {
+ if (m_pDispatchers[i].is())
+ m_pDispatchers[i]->removeStatusListener((::com::sun::star::frame::XStatusListener*)this, *pSupportedURLs);
+ m_pDispatchers[i] = xNewDispatch;
+ if (m_pDispatchers[i].is())
+ m_pDispatchers[i]->addStatusListener((::com::sun::star::frame::XStatusListener*)this, *pSupportedURLs);
+ }
+ if (m_pDispatchers[i].is())
+ ++nDispatchersGot;
+ }
+
+ if (!nDispatchersGot)
+ {
+ delete[] m_pStateCache;
+ delete[] m_pDispatchers;
+ m_pStateCache = NULL;
+ m_pDispatchers = NULL;
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::ConnectToDispatcher()
+{
+ DBG_ASSERT((m_pStateCache != NULL) == (m_pDispatchers != NULL), "FmXGridPeer::ConnectToDispatcher : inconsistent !");
+ if (m_pStateCache)
+ { // already connected -> just do an update
+ UpdateDispatches();
+ return;
+ }
+
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::util::URL>& aSupportedURLs = getSupportedURLs();
+
+ // _before_ adding the status listeners (as the add should result in a statusChanged-call) !
+ m_pStateCache = new sal_Bool[aSupportedURLs.getLength()];
+ m_pDispatchers = new ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > [aSupportedURLs.getLength()];
+
+ sal_uInt16 nDispatchersGot = 0;
+ const ::com::sun::star::util::URL* pSupportedURLs = aSupportedURLs.getConstArray();
+ for (sal_uInt16 i=0; i<aSupportedURLs.getLength(); ++i, ++pSupportedURLs)
+ {
+ m_pStateCache[i] = 0;
+ m_pDispatchers[i] = queryDispatch(*pSupportedURLs, rtl::OUString(), 0);
+ if (m_pDispatchers[i].is())
+ {
+ m_pDispatchers[i]->addStatusListener((::com::sun::star::frame::XStatusListener*)this, *pSupportedURLs);
+ ++nDispatchersGot;
+ }
+ }
+
+ if (!nDispatchersGot)
+ {
+ delete[] m_pStateCache;
+ delete[] m_pDispatchers;
+ m_pStateCache = NULL;
+ m_pDispatchers = NULL;
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXGridPeer::DisConnectFromDispatcher()
+{
+ if (!m_pStateCache || !m_pDispatchers)
+ return;
+ // we're not connected
+
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::util::URL>& aSupportedURLs = getSupportedURLs();
+ const ::com::sun::star::util::URL* pSupportedURLs = aSupportedURLs.getConstArray();
+ for (sal_uInt16 i=0; i<aSupportedURLs.getLength(); ++i, ++pSupportedURLs)
+ {
+ if (m_pDispatchers[i].is())
+ m_pDispatchers[i]->removeStatusListener((::com::sun::star::frame::XStatusListener*)this, *pSupportedURLs);
+ }
+
+ delete[] m_pStateCache;
+ delete[] m_pDispatchers;
+ m_pStateCache = NULL;
+ m_pDispatchers = NULL;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXGridPeer, OnQueryGridSlotState, void*, pSlot)
+{
+ if (!m_pStateCache)
+ return -1; // unspecified
+
+ sal_uInt16 nSlot = (sal_uInt16)(sal_uInt32)pSlot;
+
+ // search the given slot with our supported sequence
+ ::com::sun::star::uno::Sequence<sal_uInt16>& aSupported = getSupportedGridSlots();
+ const sal_uInt16* pSlots = aSupported.getConstArray();
+ for (sal_uInt16 i=0; i<aSupported.getLength(); ++i)
+ if (pSlots[i] == nSlot)
+ if (!m_pDispatchers[i].is())
+ return -1; // nothing known about this slot
+ else
+ return m_pStateCache[i];
+
+ return -1;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXGridPeer, OnExecuteGridSlot, void*, pSlot)
+{
+ if (!m_pDispatchers)
+ return 0; // not handled
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::util::URL>& aUrls = getSupportedURLs();
+ const ::com::sun::star::util::URL* pUrls = aUrls.getConstArray();
+
+ ::com::sun::star::uno::Sequence<sal_uInt16> aSlots = getSupportedGridSlots();
+ const sal_uInt16* pSlots = aSlots.getConstArray();
+
+ DBG_ASSERT(aSlots.getLength() == aUrls.getLength(), "FmXGridPeer::OnExecuteGridSlot : inconstent data returned by getSupportedURLs/getSupportedGridSlots !");
+
+ sal_uInt16 nSlot = (sal_uInt16)(sal_uInt32)pSlot;
+ for (sal_uInt16 i=0; i<aSlots.getLength(); ++i, ++pUrls, ++pSlots)
+ {
+ if (*pSlots == nSlot)
+ {
+ if (m_pDispatchers[i].is())
+ {
+ m_pDispatchers[i]->dispatch(*pUrls, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>());
+ return 1; // handled
+ }
+ }
+ }
+
+ return 0; // not handled
+}
+
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
new file mode 100644
index 0000000000..61aac8f1df
--- /dev/null
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -0,0 +1,3427 @@
+/*************************************************************************
+ *
+ * $RCSfile: gridcell.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVT_SDBPARSE_HXX //autogen wg. SdbSqlParser
+#include <svtools/sdbparse.hxx>
+#endif
+
+#ifndef _SVX_GRIDCELL_HXX
+#include "gridcell.hxx"
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#ifndef _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif
+#ifndef _SVX_FMSTL_HXX
+#include "fmstl.hxx"
+#endif
+
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _SVX_GRIDCOLS_HXX
+#include "gridcols.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_SDBC_XSTATEMENT_HPP_
+#include <com/sun/star/sdbc/XStatement.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDDB_XCOLUMNSSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSERFACTORY_HPP_
+#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
+#include <com/sun/star/sdbc/DataType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XBOUNDCOMPONENT_HPP_
+#include <com/sun/star/form/XBoundComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
+#include <com/sun/star/container/XChild.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FORM_FORMCOMPONENTTYPE_HPP_
+#include <com/sun/star/form/FormComponentType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_NUMBERFORMAT_HPP_
+#include <com/sun/star/util/NumberFormat.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
+#include <com/sun/star/container/XNamed.hpp>
+#endif
+
+#ifndef _FMTFIELD_HXX_
+#include <svtools/fmtfield.hxx>
+#endif
+#ifndef _NUMUNO_HXX //autogen
+#include <svtools/numuno.hxx>
+#endif
+#ifndef _CALENDAR_HXX //autogen wg. CalendarField
+#include <svtools/calendar.hxx>
+#endif
+#ifndef _LONGCURR_HXX //autogen
+#include <vcl/longcurr.hxx>
+#endif
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+#ifndef _SVX_DBERRBOX_HXX
+#include "dbmsgbox.hxx"
+#endif
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _FM_IMPLEMENTATION_IDS_HXX_
+#include "fmimplids.hxx"
+#endif
+
+#ifndef _UTL_NUMBERS_HXX_
+#include <unotools/numbers.hxx>
+#endif
+#ifndef _UTL_DB_CONVERSION_HXX_
+#include <unotools/dbconversion.hxx>
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+#ifndef _UNOTOOLS_DATETIME_HXX_
+#include <unotools/datetime.hxx>
+#endif
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+
+#include <math.h>
+
+// An irgendeiner Stelle dieser include-Orgie hier gehen die defines fuer WB_LEFT und WB_RIGHT verloren, und ich habe einfach
+// nicht herausgefunden, wo. Also eben ein Hack.
+#define WB_LEFT ((WinBits)0x00004000)
+#define WB_CENTER ((WinBits)0x00008000)
+#define WB_RIGHT ((WinBits)0x00010000)
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbGridColumn::s_xEmptyController;
+
+//------------------------------------------------------------------------------
+void DbGridColumn::CreateControl(sal_Int32 _nFieldPos, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xField, sal_Int32 nTypeId)
+{
+ Clear();
+
+ m_nTypeId = nTypeId;
+ if (xField != m_xField)
+ {
+ // Grundeinstellung
+ m_xField = xField;
+ xField->getPropertyValue(FM_PROP_FORMATKEY) >>= m_nFormatKey;
+ m_nFieldPos = (sal_Int16)_nFieldPos;
+ m_bReadOnly = ::utl::getBOOL(xField->getPropertyValue(FM_PROP_ISREADONLY));
+ m_bAutoValue = ::utl::getBOOL(xField->getPropertyValue(FM_PROP_AUTOINCREMENT));
+ m_nFieldType = ::utl::getINT32(xField->getPropertyValue(FM_PROP_FIELDTYPE));
+
+ switch (m_nFieldType)
+ {
+ case ::com::sun::star::sdbc::DataType::DATE:
+ case ::com::sun::star::sdbc::DataType::TIME:
+ case ::com::sun::star::sdbc::DataType::TIMESTAMP:
+ m_bDateTime = sal_True;
+
+ case ::com::sun::star::sdbc::DataType::BIT:
+ case ::com::sun::star::sdbc::DataType::TINYINT:
+ case ::com::sun::star::sdbc::DataType::SMALLINT:
+ case ::com::sun::star::sdbc::DataType::INTEGER:
+ case ::com::sun::star::sdbc::DataType::REAL:
+ case ::com::sun::star::sdbc::DataType::BIGINT:
+ case ::com::sun::star::sdbc::DataType::DOUBLE:
+ case ::com::sun::star::sdbc::DataType::NUMERIC:
+ case ::com::sun::star::sdbc::DataType::DECIMAL:
+ m_nAlign = ::com::sun::star::awt::TextAlign::RIGHT;
+ m_bNumeric = sal_True;
+ break;
+ default:
+ m_nAlign = ::com::sun::star::awt::TextAlign::LEFT;
+ }
+ }
+
+ DbCellControl* pCellControl = NULL;
+ if (m_rParent.IsFilterMode())
+ {
+ pCellControl = new DbFilterField(*this);
+ }
+ else
+ {
+
+ switch (nTypeId)
+ {
+ case TYPE_CHECKBOX: pCellControl = new DbCheckBox(*this); break;
+ case TYPE_COMBOBOX: pCellControl = new DbComboBox(*this); break;
+ case TYPE_CURRENCYFIELD: pCellControl = new DbCurrencyField(*this); break;
+ case TYPE_DATEFIELD: pCellControl = new DbDateField(*this); break;
+ case TYPE_LISTBOX: pCellControl = new DbListBox(*this); break;
+ case TYPE_NUMERICFIELD: pCellControl = new DbNumericField(*this); break;
+ case TYPE_PATTERNFIELD: pCellControl = new DbPatternField(*this); break;
+ case TYPE_TEXTFIELD: pCellControl = new DbTextField(*this); break;
+ case TYPE_TIMEFIELD: pCellControl = new DbTimeField(*this); break;
+ case TYPE_FORMATTEDFIELD: pCellControl = new DbFormattedField(*this); break;
+ default:
+ DBG_ERROR("DbGridColumn::CreateControl: Unknown Column");
+ return;
+ }
+
+ }
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xCur;
+ if (m_rParent.getDataSource())
+ xCur = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > (*m_rParent.getDataSource(), ::com::sun::star::uno::UNO_QUERY);
+ // TODO : the cursor wrapper should use an ::com::sun::star::sdbc::XRowSet interface, too
+
+ pCellControl->Init(&m_rParent.GetDataWindow(), xCur );
+
+ // now create the control wrapper
+ if (m_rParent.IsFilterMode())
+ m_pCell = new FmXFilterCell(this, pCellControl);
+ else
+ {
+ switch (nTypeId)
+ {
+ case TYPE_CHECKBOX: m_pCell = new FmXCheckBoxCell(this, pCellControl); break;
+ case TYPE_LISTBOX: m_pCell = new FmXListBoxCell(this, pCellControl); break;
+ default:
+ m_pCell = new FmXEditCell(this, pCellControl);
+ }
+ }
+ m_pCell->acquire();
+
+ // only if we use have a bound field, we use a a controller for displaying the
+ // window in the grid
+ if (m_xField.is())
+ m_xController = pCellControl->CreateController();
+}
+
+//------------------------------------------------------------------------------
+void DbGridColumn::UpdateFromField(const DbGridRow* pRow, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ if (m_pCell && m_pCell->ISA(FmXFilterCell))
+ PTR_CAST(FmXFilterCell, m_pCell)->Update();
+ else if (pRow && pRow->IsValid() && m_nFieldPos >= 0 && m_pCell && pRow->HasField(m_nFieldPos))
+ {
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField = pRow->GetField(m_nFieldPos);
+ PTR_CAST(FmXDataCell, m_pCell)->UpdateFromField(xField, xFormatter);
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridColumn::Commit()
+{
+ sal_Bool bResult = sal_True;
+ if (!m_bInSave && m_pCell)
+ {
+ m_bInSave = sal_True;
+ bResult = m_pCell->Commit();
+
+ // store the data into the model
+ FmXDataCell* pDataCell = PTR_CAST(FmXDataCell, m_pCell);
+ if (bResult && pDataCell)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent > xComp(m_xModel, ::com::sun::star::uno::UNO_QUERY);
+ if (xComp.is())
+ bResult = xComp->commit();
+ }
+ }
+ m_bInSave = sal_False;
+ return bResult;
+}
+
+//------------------------------------------------------------------------------
+DbGridColumn::~DbGridColumn()
+{
+ Clear();
+}
+
+//------------------------------------------------------------------------------
+void DbGridColumn::Clear()
+{
+ m_xController = NULL;
+ m_xField = NULL;
+
+ if (m_pCell)
+ {
+ m_pCell->dispose();
+ m_pCell->release();
+ m_pCell = NULL;
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Int16 DbGridColumn::SetAlignment(sal_Int16 _nAlign)
+{
+ if (_nAlign == -1)
+ { // 'Standard'
+ if (m_xField.is())
+ {
+ sal_Int32 nType;
+ m_xField->getPropertyValue(FM_PROP_FIELDTYPE) >>= nType;
+
+ switch (nType)
+ {
+ case ::com::sun::star::sdbc::DataType::NUMERIC:
+ case ::com::sun::star::sdbc::DataType::DECIMAL:
+ case ::com::sun::star::sdbc::DataType::DOUBLE:
+ case ::com::sun::star::sdbc::DataType::REAL:
+ case ::com::sun::star::sdbc::DataType::BIGINT:
+ case ::com::sun::star::sdbc::DataType::INTEGER:
+ case ::com::sun::star::sdbc::DataType::SMALLINT:
+ case ::com::sun::star::sdbc::DataType::TINYINT:
+ case ::com::sun::star::sdbc::DataType::DATE:
+ case ::com::sun::star::sdbc::DataType::TIME:
+ case ::com::sun::star::sdbc::DataType::TIMESTAMP:
+ _nAlign = ::com::sun::star::awt::TextAlign::RIGHT;
+ break;
+ case ::com::sun::star::sdbc::DataType::BIT:
+ _nAlign = ::com::sun::star::awt::TextAlign::CENTER;
+ break;
+ default:
+ _nAlign = ::com::sun::star::awt::TextAlign::LEFT;
+ break;
+ }
+ }
+ else
+ _nAlign = ::com::sun::star::awt::TextAlign::LEFT;
+ }
+
+ m_nAlign = _nAlign;
+ if (m_pCell && m_pCell->IsAlignedController())
+ m_pCell->AlignControl(m_nAlign);
+
+ return m_nAlign;
+}
+
+//------------------------------------------------------------------------------
+sal_Int16 DbGridColumn::SetAlignmentFromModel(sal_Int16 nStandardAlign)
+{
+ ::com::sun::star::uno::Any aAlign( m_xModel->getPropertyValue(FM_PROP_ALIGN));
+ if (aAlign.hasValue())
+ {
+ sal_Int16 nTest;
+ if (aAlign >>= nTest)
+ nStandardAlign = nTest;
+ }
+ return SetAlignment(nStandardAlign);
+}
+
+//------------------------------------------------------------------------------
+void DbGridColumn::setLock(sal_Bool _bLock)
+{
+ if (m_bLocked == _bLock)
+ return;
+ m_bLocked = _bLock;
+
+ // is the column we represent active ?
+ if (m_bHidden)
+ return; // no, it isn't (or at least it shouldn't be ...)
+
+ if (m_rParent.GetCurColumnId() == m_nId)
+ {
+ m_rParent.DeactivateCell();
+ m_rParent.ActivateCell(m_rParent.GetCurRow(), m_rParent.GetCurColumnId());
+ }
+}
+
+//------------------------------------------------------------------------------
+XubString DbGridColumn::GetCellText(const DbGridRow* pRow, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const
+{
+ XubString aText;
+ if (m_pCell && m_pCell->ISA(FmXFilterCell))
+ return aText;
+
+ if (!pRow || !pRow->IsValid())
+ aText = INVALIDTEXT;
+ else if (pRow->HasField(m_nFieldPos))
+ {
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField = pRow->GetField(m_nFieldPos);
+ aText = GetCellText(xField, xFormatter);
+ }
+ return aText;
+}
+
+//------------------------------------------------------------------------------
+XubString DbGridColumn::GetCellText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const
+{
+ XubString aText;
+ if (xField.is())
+ {
+ FmXTextCell* pTextCell = PTR_CAST(FmXTextCell, m_pCell);
+ if (pTextCell)
+ aText = pTextCell->GetText(xField, xFormatter);
+ else if (m_bObject)
+ aText = OBJECTTEXT;
+ }
+ return aText;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > DbGridColumn::GetCurrentFieldValue() const
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > xField;
+ const DbGridRowRef xRow = m_rParent.GetCurrentRow();
+ if (xRow.Is() && xRow->HasField(m_nFieldPos))
+ {
+ xField = xRow->GetField(m_nFieldPos);
+ }
+ return xField;
+}
+
+//------------------------------------------------------------------------------
+void DbGridColumn::Paint(OutputDevice& rDev,
+ const Rectangle& rRect,
+ const DbGridRow* pRow,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ FmXDataCell* pDataCell = PTR_CAST(FmXDataCell, m_pCell);
+ if (pDataCell)
+ {
+ if (!pRow || !pRow->IsValid())
+ {
+ sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER;
+ if (!((Window&)rDev).IsEnabled())
+ nStyle |= TEXT_DRAW_DISABLE;
+
+ rDev.DrawText(rRect, INVALIDTEXT, nStyle);
+ }
+ else if (m_bAutoValue && pRow->IsNew())
+ {
+ static XubString aAutoText(SVX_RES(RID_STR_AUTOFIELD));
+ sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_VCENTER;
+ if (!((Window&)rDev).IsEnabled())
+ nStyle |= TEXT_DRAW_DISABLE;
+
+ switch (GetAlignment())
+ {
+ case ::com::sun::star::awt::TextAlign::RIGHT:
+ nStyle |= TEXT_DRAW_RIGHT;
+ break;
+ case ::com::sun::star::awt::TextAlign::CENTER:
+ nStyle |= TEXT_DRAW_CENTER;
+ break;
+ default:
+ nStyle |= TEXT_DRAW_LEFT;
+ }
+
+ rDev.DrawText(rRect, aAutoText , nStyle);
+ }
+ else if (pRow->HasField(m_nFieldPos))
+ {
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField = pRow->GetField(m_nFieldPos);
+ pDataCell->Paint(rDev, rRect, xField, xFormatter);
+ }
+ }
+ else if (!m_pCell)
+ {
+ if (!pRow || !pRow->IsValid())
+ {
+ sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER;
+ if (!((Window&)rDev).IsEnabled())
+ nStyle |= TEXT_DRAW_DISABLE;
+
+ rDev.DrawText(rRect, INVALIDTEXT, nStyle);
+ }
+ else if (pRow->HasField(m_nFieldPos) && m_bObject)
+ {
+ sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER;
+ if (!((Window&)rDev).IsEnabled())
+ nStyle |= TEXT_DRAW_DISABLE;
+ rDev.DrawText(rRect, OBJECTTEXT, nStyle);
+ }
+ }
+ else if (m_pCell->ISA(FmXFilterCell))
+ ((FmXFilterCell*)m_pCell)->Paint(rDev, rRect);
+}
+
+//------------------------------------------------------------------------------
+void DbGridColumn::ImplInitSettings(Window* pParent, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground)
+{
+ if (m_pCell)
+ m_pCell->ImplInitSettings(pParent, bFont, bForeground, bBackground);
+}
+
+//------------------------------------------------------------------------------
+DbCellControl::~DbCellControl()
+{
+ delete m_pWindow;
+ delete m_pPainter;
+}
+
+//------------------------------------------------------------------------------
+void DbCellControl::ImplInitSettings(Window* pParent, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground)
+{
+ if (bFont)
+ {
+ Font aFont( pParent->IsControlFont() ? pParent->GetControlFont() : pParent->GetPointFont());
+ aFont.SetTransparent(m_bTransparent);
+ if (m_pPainter)
+ m_pPainter->SetZoomedPointFont(aFont);
+ if (m_pWindow)
+ m_pWindow->SetZoomedPointFont(aFont);
+ }
+
+ if (bFont || bForeground)
+ {
+ Color aTextColor( pParent->IsControlForeground() ? pParent->GetControlForeground() : pParent->GetTextColor() );
+ if (m_pPainter)
+ {
+ m_pPainter->SetTextColor(aTextColor);
+ if (pParent->IsControlForeground())
+ m_pPainter->SetControlForeground(aTextColor);
+ }
+ if (m_pWindow)
+ {
+ m_pWindow->SetTextColor(aTextColor);
+ if (pParent->IsControlForeground())
+ m_pWindow->SetControlForeground(aTextColor);
+ }
+ }
+
+ if (bBackground)
+ {
+ if (pParent->IsControlBackground())
+ {
+ Color aColor( pParent->GetControlBackground());
+ if (m_pPainter)
+ {
+ if (m_bTransparent)
+ m_pPainter->SetBackground();
+ else
+ {
+ m_pPainter->SetBackground(aColor);
+ m_pPainter->SetControlBackground(aColor);
+ }
+ m_pPainter->SetFillColor(aColor);
+ }
+
+ if (m_pWindow)
+ {
+ if (m_bTransparent)
+ m_pWindow->SetBackground();
+ else
+ {
+ m_pWindow->SetBackground(aColor);
+ m_pWindow->SetControlBackground(aColor);
+ }
+ m_pWindow->SetFillColor(aColor);
+ }
+ }
+ else
+ {
+ if (m_pPainter)
+ {
+ if (m_bTransparent)
+ m_pPainter->SetBackground();
+ else
+ m_pPainter->SetBackground(pParent->GetBackground());
+ m_pPainter->SetFillColor(pParent->GetFillColor());
+ }
+
+ if (m_pWindow)
+ {
+ if (m_bTransparent)
+ m_pWindow->SetBackground(pParent->GetBackground());
+ else
+ m_pWindow->SetFillColor(pParent->GetFillColor());
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbCellControl::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ ImplInitSettings(pParent, sal_True ,sal_True, sal_True);
+ if (IsAlignedController() && m_pWindow)
+ AlignControl(m_rColumn.GetAlignment());
+}
+
+//------------------------------------------------------------------------------
+void DbCellControl::AlignControl(sal_Int16 nAlignment)
+{
+ WinBits nStyle = m_pWindow->GetStyle();
+ nStyle &= ~(WB_LEFT | WB_RIGHT | WB_CENTER);
+ switch (nAlignment)
+ {
+ case ::com::sun::star::awt::TextAlign::RIGHT:
+ nStyle |= WB_RIGHT;
+ break;
+ case ::com::sun::star::awt::TextAlign::CENTER:
+ nStyle |= WB_CENTER;
+ break;
+ default:
+ nStyle |= WB_LEFT;
+ break;
+ }
+ m_pWindow->SetStyle(nStyle);
+}
+
+//------------------------------------------------------------------------------
+void DbCellControl::Paint(OutputDevice& rDev, const Rectangle& rRect)
+{
+ m_pPainter->SetPosSizePixel(rRect.TopLeft(), rRect.GetSize());
+ m_pPainter->Show();
+ m_pPainter->Update();
+ m_pPainter->SetParentUpdateMode( sal_False );
+ m_pPainter->Hide();
+ m_pPainter->SetParentUpdateMode( sal_True );
+}
+
+//------------------------------------------------------------------------------
+double DbCellControl::GetValue(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const
+{
+ double fValue = 0;
+ if (m_rColumn.IsNumeric())
+ {
+ fValue = _xVariant->getDouble();
+ }
+ else
+ {
+ sal_Bool bSuccess = sal_False;
+ try
+ {
+ fValue = _xVariant->getDouble();
+ bSuccess = sal_True;
+ }
+ catch(...) { }
+ if (!bSuccess)
+ {
+ try
+ {
+ fValue = xFormatter->convertStringToNumber(m_rColumn.GetKey(), _xVariant->getString());
+ }
+ catch(...) { }
+ }
+ }
+ return fValue;
+}
+
+/*************************************************************************/
+// CellModels
+/*************************************************************************/
+//------------------------------------------------------------------------------
+DbTextField::DbTextField(DbGridColumn& _rColumn)
+ :DbCellControl(_rColumn)
+ ,m_nKeyType(::com::sun::star::util::NumberFormat::TEXT)
+{
+}
+
+//------------------------------------------------------------------------------
+void DbTextField::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ sal_Int16 nAlignment = m_rColumn.SetAlignmentFromModel(-1);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModel(m_rColumn.getModel());
+ sal_Bool bReadOnly = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_READONLY));
+ sal_Bool bEnable = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_ENABLED));
+ sal_Int16 nMaxLen = ::utl::getINT16(xModel->getPropertyValue(FM_PROP_MAXTEXTLEN));
+ switch (nAlignment)
+ {
+ case ::com::sun::star::awt::TextAlign::RIGHT:
+ m_pWindow = new Edit(pParent, WB_RIGHT);
+ break;
+ case ::com::sun::star::awt::TextAlign::CENTER:
+ m_pWindow = new Edit(pParent, WB_CENTER);
+ break;
+ default:
+ m_pWindow = new Edit(pParent, WB_LEFT);
+
+ // Alles nur damit die Selektion bei Focuserhalt von rechts nach links geht
+ AllSettings aSettings = m_pWindow->GetSettings();
+ StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+ aStyleSettings.SetSelectionOptions(
+ aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST);
+ aSettings.SetStyleSettings(aStyleSettings);
+ m_pWindow->SetSettings(aSettings);
+ }
+
+ ((Edit*)m_pWindow)->SetReadOnly(m_rColumn.IsReadOnly() || bReadOnly);
+ ((Edit*)m_pWindow)->SetMaxTextLen(nMaxLen);
+ m_pWindow->Enable(bEnable);
+
+ if (m_rColumn.GetParent().getNumberFormatter().is() && m_rColumn.GetKey())
+ m_nKeyType = utl::getNumberFormatType(m_rColumn.GetParent().getNumberFormatter()->getNumberFormatsSupplier()->getNumberFormats(), m_rColumn.GetKey());
+
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbTextField::CreateController() const
+{
+ return new DbEditCellController((Edit*)m_pWindow);
+}
+
+//------------------------------------------------------------------------------
+XubString DbTextField::GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor)
+{
+ ::rtl::OUString aString;
+ if (_xVariant.is())
+ aString = ::utl::DBTypeConversion::getValue(_xVariant,
+ xFormatter,
+ m_rColumn.GetParent().getNullDate(),
+ m_rColumn.GetKey(),
+ m_nKeyType);
+ return aString;
+}
+
+//------------------------------------------------------------------------------
+void DbTextField::UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ Edit* pEdit = (Edit*)m_pWindow;
+ pEdit->SetText(GetFormatText(_xVariant, xFormatter));
+ pEdit->SetSelection(Selection(SELECTION_MAX,SELECTION_MIN));
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbTextField::Commit()
+{
+ ::rtl::OUString aText( m_pWindow->GetText());
+ m_rColumn.getModel()->setPropertyValue(FM_PROP_TEXT, ::com::sun::star::uno::makeAny(aText));
+ return sal_True;
+}
+
+
+DBG_NAME(DbFormattedField);
+//------------------------------------------------------------------------------
+DbFormattedField::DbFormattedField(DbGridColumn& _rColumn)
+ :DbCellControl(_rColumn)
+ ,OPropertyChangeListener(m_aDummy)
+ ,m_nKeyType(::com::sun::star::util::NumberFormat::UNDEFINED)
+{
+ DBG_CTOR(DbFormattedField,NULL);
+
+ // if our model's format key changes we want to propagate the new value to our windows
+ m_pFormatListener = new ::utl::OPropertyChangeMultiplexer(this, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (_rColumn.getModel(), ::com::sun::star::uno::UNO_QUERY));
+ m_pFormatListener->acquire();
+ m_pFormatListener->addProperty(FM_PROP_FORMATKEY);
+}
+
+//------------------------------------------------------------------------------
+DbFormattedField::~DbFormattedField()
+{
+ m_pFormatListener->dispose();
+ m_pFormatListener->release();
+ // no delete, this is done implicitly
+
+ DBG_DTOR(DbFormattedField,NULL);
+}
+
+//------------------------------------------------------------------------------
+void DbFormattedField::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ sal_Int16 nAlignment = m_rColumn.SetAlignmentFromModel(-1);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xUnoModel = m_rColumn.getModel();
+ sal_Bool bReadOnly = ::utl::getBOOL(xUnoModel->getPropertyValue(FM_PROP_READONLY));
+ sal_Bool bEnable = ::utl::getBOOL(xUnoModel->getPropertyValue(FM_PROP_ENABLED));
+ sal_Int16 nMaxLen = ::utl::getINT16(xUnoModel->getPropertyValue(FM_PROP_MAXTEXTLEN));
+
+ switch (nAlignment)
+ {
+ case ::com::sun::star::awt::TextAlign::RIGHT:
+ m_pWindow = new FormattedField(pParent, WB_RIGHT);
+ m_pPainter = new FormattedField(pParent, WB_RIGHT);
+ break;
+
+ case ::com::sun::star::awt::TextAlign::CENTER:
+ m_pWindow = new FormattedField(pParent, WB_CENTER);
+ m_pPainter = new FormattedField(pParent, WB_CENTER);
+ break;
+ default:
+ m_pWindow = new FormattedField(pParent, WB_LEFT);
+ m_pPainter = new FormattedField(pParent, WB_LEFT);
+
+ // Alles nur damit die Selektion bei Focuserhalt von rechts nach links geht
+ AllSettings aSettings = m_pWindow->GetSettings();
+ StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+ aStyleSettings.SetSelectionOptions(
+ aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST);
+ aSettings.SetStyleSettings(aStyleSettings);
+ m_pWindow->SetSettings(aSettings);
+ }
+
+ ((Edit*)m_pWindow)->SetReadOnly(m_rColumn.IsReadOnly() || bReadOnly);
+ ((Edit*)m_pWindow)->SetMaxTextLen(nMaxLen);
+ ((Edit*)m_pPainter)->SetMaxTextLen(nMaxLen);
+ m_pWindow->Enable(bEnable);
+
+ ((FormattedField*)m_pWindow)->SetStrictFormat(sal_False);
+ ((FormattedField*)m_pPainter)->SetStrictFormat(sal_False);
+ // wenn man _irgendeine_ Formatierung zulaesst, kann man da sowieso keine Eingabe-Ueberpruefung
+ // machen (das FormattedField unterstuetzt das sowieso nicht, nur abgeleitete Klassen)
+
+ // von dem Uno-Model den Formatter besorgen
+ // (Ich koennte theoretisch auch ueber den ::com::sun::star::util::NumberFormatter gehen, den mir der Cursor bestimmt
+ // liefern wuerde. Das Problem dabei ist, dass ich mich eigentlich nicht darauf verlassen
+ // kann, dass die beiden Formatter die selben sind, sauber ist das Ganze, wenn ich ueber das
+ // UNO-Model gehe.)
+ sal_Int32 nFormatKey = -1;
+
+ // mal sehen, ob das Model einen hat ...
+ DBG_ASSERT(::utl::hasProperty(FM_PROP_FORMATSSUPPLIER, xUnoModel), "DbFormattedField::Init : invalid UNO model !");
+ ::com::sun::star::uno::Any aSupplier( xUnoModel->getPropertyValue(FM_PROP_FORMATSSUPPLIER));
+ if (aSupplier.hasValue())
+ {
+ ::cppu::extractInterface(m_xSupplier, aSupplier);
+ if (m_xSupplier.is())
+ {
+ // wenn wir den Supplier vom Model nehmen, dann auch den Key
+ ::com::sun::star::uno::Any aFmtKey( xUnoModel->getPropertyValue(FM_PROP_FORMATKEY));
+ if (aFmtKey.hasValue())
+ {
+ DBG_ASSERT(aFmtKey.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_LONG, "DbFormattedField::Init : invalid format key property (no sal_Int32) !");
+ nFormatKey = ::utl::getINT32(aFmtKey);
+ }
+ else
+ {
+ DBG_WARNING("DbFormattedField::Init : my uno-model has no format-key, but a formats supplier !");
+ // the OFormattedModel which we usually are working with ensures that the model has a format key
+ // as soon as the form is loaded. Unfortunally this method here is called from within loaded, too.
+ // So if our LoadListener is called before the LoadListener of the model, this "else case" is
+ // allowed.
+ // Of course our property listener for the FormatKey property will notify us if the prop is changed,
+ // so this here isn't really bad ....
+ nFormatKey = 0;
+ }
+ }
+ }
+
+ // nein ? vielleicht die ::com::sun::star::form::component::Form hinter dem Cursor ?
+ if (!m_xSupplier.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xCursorForm(xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xCursorForm.is())
+ { // wenn wir vom Cursor den Formatter nehmen, dann auch den Key vom Feld, an das wir gebunden sind
+ m_xSupplier = ::utl::getNumberFormats(::utl::getConnection(xCursorForm), sal_False);
+
+ if (m_rColumn.GetField().is())
+ nFormatKey = ::utl::getINT32(m_rColumn.GetField()->getPropertyValue(FM_PROP_FORMATKEY));
+ }
+ }
+
+ SvNumberFormatter* pFormatterUsed = NULL;
+ if (m_xSupplier.is())
+ {
+ SvNumberFormatsSupplierObj* pImplmentation = SvNumberFormatsSupplierObj::getImplementation(m_xSupplier);
+ if (pImplmentation)
+ pFormatterUsed = pImplmentation->GetNumberFormatter();
+ else
+ // alles hingfaellig : der Supplier ist vom falschen Typ, dann koennen wir uns auch nicht darauf verlassen, dass
+ // ein Standard-Formatter den (eventuell nicht-Standard-)Key kennt.
+ nFormatKey = -1;
+ }
+
+ // einen Standard-Formatter ...
+ if (pFormatterUsed == NULL)
+ {
+ pFormatterUsed = ((FormattedField*)m_pWindow)->StandardFormatter();
+ DBG_ASSERT(pFormatterUsed != NULL, "DbFormattedField::Init : no standard formatter given by the numeric field !");
+ }
+ // ... und einen Standard-Key
+ if (nFormatKey == -1)
+ nFormatKey = 0;
+
+ m_nKeyType = utl::getNumberFormatType(m_xSupplier->getNumberFormats(), nFormatKey);
+
+ ((FormattedField*)m_pWindow)->SetFormatter(pFormatterUsed);
+ ((FormattedField*)m_pPainter)->SetFormatter(pFormatterUsed);
+
+ ((FormattedField*)m_pWindow)->SetFormatKey(nFormatKey);
+ ((FormattedField*)m_pPainter)->SetFormatKey(nFormatKey);
+
+ ((FormattedField*)m_pWindow)->TreatAsNumber(m_rColumn.IsNumeric());
+ ((FormattedField*)m_pPainter)->TreatAsNumber(m_rColumn.IsNumeric());
+
+ // Min- und Max-Werte
+ if (m_rColumn.IsNumeric())
+ {
+ sal_Bool bClearMin = sal_True;
+ if (::utl::hasProperty(FM_PROP_EFFECTIVE_MIN, xUnoModel))
+ {
+ ::com::sun::star::uno::Any aMin( xUnoModel->getPropertyValue(FM_PROP_EFFECTIVE_MIN));
+ if (aMin.getValueType().getTypeClass() != ::com::sun::star::uno::TypeClass_VOID)
+ {
+ DBG_ASSERT(aMin.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE, "DbFormattedField::Init : the model has an invalid min value !");
+ double dMin = ::utl::getDouble(aMin);
+ ((FormattedField*)m_pWindow)->SetMinValue(dMin);
+ ((FormattedField*)m_pPainter)->SetMinValue(dMin);
+ bClearMin = sal_False;
+ }
+ }
+ if (bClearMin)
+ {
+ ((FormattedField*)m_pWindow)->ClearMinValue();
+ ((FormattedField*)m_pPainter)->ClearMinValue();
+ }
+ sal_Bool bClearMax = sal_True;
+ if (::utl::hasProperty(FM_PROP_EFFECTIVE_MAX, xUnoModel))
+ {
+ ::com::sun::star::uno::Any aMin( xUnoModel->getPropertyValue(FM_PROP_EFFECTIVE_MAX));
+ if (aMin.getValueType().getTypeClass() != ::com::sun::star::uno::TypeClass_VOID)
+ {
+ DBG_ASSERT(aMin.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE, "DbFormattedField::Init : the model has an invalid max value !");
+ double dMin = ::utl::getDouble(aMin);
+ ((FormattedField*)m_pWindow)->SetMaxValue(dMin);
+ ((FormattedField*)m_pPainter)->SetMaxValue(dMin);
+ bClearMax = sal_False;
+ }
+ }
+ if (bClearMax)
+ {
+ ((FormattedField*)m_pWindow)->ClearMaxValue();
+ ((FormattedField*)m_pPainter)->ClearMaxValue();
+ }
+ }
+
+ // den Default-Wert
+ ::com::sun::star::uno::Any aDefault( xUnoModel->getPropertyValue(FM_PROP_EFFECTIVE_DEFAULT));
+ if (aDefault.hasValue())
+ { // das Ding kann ein double oder ein XubString sein
+ switch (aDefault.getValueType().getTypeClass())
+ {
+ case ::com::sun::star::uno::TypeClass_DOUBLE:
+ if (m_rColumn.IsNumeric())
+ {
+ ((FormattedField*)m_pWindow)->SetDefaultValue(::utl::getDouble(aDefault));
+ ((FormattedField*)m_pPainter)->SetDefaultValue(::utl::getDouble(aDefault));
+ }
+ else
+ {
+ XubString sConverted;
+ Color* pDummy;
+ pFormatterUsed->GetOutputString(::utl::getDouble(aDefault), 0, sConverted, &pDummy);
+ ((FormattedField*)m_pWindow)->SetDefaultText(sConverted);
+ ((FormattedField*)m_pPainter)->SetDefaultText(sConverted);
+ }
+ break;
+ case ::com::sun::star::uno::TypeClass_STRING:
+ {
+ XubString sDefault( UniString( ::utl::getString(aDefault) ) );
+ if (m_rColumn.IsNumeric())
+ {
+ double dVal;
+ sal_uInt32 nTestFormat(0);
+ if (pFormatterUsed->IsNumberFormat(sDefault, nTestFormat, dVal))
+ {
+ ((FormattedField*)m_pWindow)->SetDefaultValue(dVal);
+ ((FormattedField*)m_pPainter)->SetDefaultValue(dVal);
+ }
+ }
+ else
+ {
+ ((FormattedField*)m_pWindow)->SetDefaultText(sDefault);
+ ((FormattedField*)m_pPainter)->SetDefaultText(sDefault);
+ }
+ }
+ }
+ }
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbFormattedField::CreateController() const
+{
+ return new DbEditCellController((Edit*)m_pWindow);
+}
+
+//------------------------------------------------------------------------------
+void DbFormattedField::_propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if (evt.PropertyName.compareTo(FM_PROP_FORMATKEY) == COMPARE_EQUAL)
+ {
+ sal_Int32 nNewKey = evt.NewValue.hasValue() ? ::utl::getINT32(evt.NewValue) : 0;
+ m_nKeyType = utl::getNumberFormatType(m_xSupplier->getNumberFormats(), nNewKey);
+
+ DBG_ASSERT(m_pWindow && m_pPainter, "DbFormattedField::_propertyChanged : where are my windows ?");
+ if (m_pWindow)
+ ((FormattedField*)m_pWindow)->SetFormatKey(nNewKey);
+ if (m_pPainter)
+ ((FormattedField*)m_pPainter)->SetFormatKey(nNewKey);
+ }
+}
+
+//------------------------------------------------------------------------------
+XubString DbFormattedField::GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor)
+{
+ // defaultmaessig keine Farb-Angabe
+ if (ppColor != NULL)
+ *ppColor = NULL;
+
+ // NULL-Wert -> leerer Text
+ if (!_xVariant.is())
+ return String();
+
+ String aText;
+ if (m_rColumn.IsNumeric())
+ {
+ // das IsNumeric an der Column sagt nichts aus ueber die Klasse des benutzen Formates, sondern
+ // ueber die des an die Column gebundenen Feldes. Wenn man also eine FormattedField-Spalte an
+ // ein double-Feld bindet und als Text formatiert, liefert m_rColumn.IsNumeric() sal_True. Das heisst
+ // also einfach, dass ich den Inhalt der Variant mittels getDouble abfragen kann, und dann kann
+ // ich den Rest (die Formatierung) dem FormattedField ueberlassen.
+ double dValue = ::utl::DBTypeConversion::getValue(_xVariant, m_rColumn.GetParent().getNullDate(), m_nKeyType);
+ if (_xVariant->wasNull())
+ return aText;
+ ((FormattedField*)m_pPainter)->SetValue(dValue);
+ }
+ else
+ {
+ // Hier kann ich nicht mit einem double arbeiten, da das Feld mir keines liefern kann.
+ // Also einfach den Text vom ::com::sun::star::util::NumberFormatter in die richtige ::com::sun::star::form::component::Form brinden lassen.
+ aText = (const sal_Unicode*)_xVariant->getString();
+ if (_xVariant->wasNull())
+ return aText;
+ ((FormattedField*)m_pPainter)->SetTextFormatted(aText);
+ }
+
+ aText = m_pPainter->GetText();
+ if (ppColor != NULL)
+ *ppColor = ((FormattedField*)m_pPainter)->GetLastOutputColor();
+
+ return aText;
+}
+
+//------------------------------------------------------------------------------
+void DbFormattedField::UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ if (!_xVariant.is())
+ { // NULL-Wert -> leerer Text
+ m_pWindow->SetText(XubString());
+ }
+ else if (m_rColumn.IsNumeric())
+ {
+ // das IsNumeric an der Column sagt nichts aus ueber die Klasse des benutzen Formates, sondern
+ // ueber die des an die Column gebundenen Feldes. Wenn man also eine FormattedField-Spalte an
+ // ein double-Feld bindet und als Text formatiert, liefert m_rColumn.IsNumeric() sal_True. Das heisst
+ // also einfach, dass ich den Inhalt der Variant mittels getDouble abfragen kann, und dann kann
+ // ich den Rest (die Formatierung) dem FormattedField ueberlassen.
+ double dValue = ::utl::DBTypeConversion::getValue(_xVariant, m_rColumn.GetParent().getNullDate(), m_nKeyType);
+ if (_xVariant->wasNull())
+ m_pWindow->SetText(XubString());
+ else
+ ((FormattedField*)m_pWindow)->SetValue(dValue);
+ }
+ else
+ {
+ // Hier kann ich nicht mit einem double arbeiten, da das Feld mir keines liefern kann.
+ // Also einfach den Text vom ::com::sun::star::util::NumberFormatter in die richtige ::com::sun::star::form::component::Form brinden lassen.
+ XubString sText( _xVariant->getString());
+ ((FormattedField*)m_pWindow)->SetTextFormatted(sText);
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbFormattedField::Commit()
+{
+ ::com::sun::star::uno::Any aNewVal;
+ FormattedField& rField = *(FormattedField*)m_pWindow;
+ DBG_ASSERT(&rField == m_pWindow, "DbFormattedField::Commit : can't work with a window other than my own !");
+ if (m_rColumn.IsNumeric())
+ {
+ if (rField.GetText().Len() != 0)
+ aNewVal <<= rField.GetValue();
+ // ein LeerString wird erst mal standardmaessig als void weitergereicht
+ }
+ else
+ aNewVal <<= ::rtl::OUString(rField.GetTextValue());
+
+ m_rColumn.getModel()->setPropertyValue(FM_PROP_EFFECTIVE_VALUE, aNewVal);
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void DbCheckBox::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ m_bTransparent = sal_True;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModel(m_rColumn.getModel());
+ sal_Bool bEnable = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_ENABLED));
+
+ m_pWindow = new DbCheckBoxCtrl(pParent);
+ m_pPainter = new DbCheckBoxCtrl(pParent);
+ m_pWindow->Enable(bEnable);
+ m_pWindow->SetPaintTransparent( sal_True );
+
+ m_pPainter->SetPaintTransparent( sal_True );
+ m_pPainter->SetBackground();
+
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbCheckBox::CreateController() const
+{
+ return new DbCheckBoxCellController((DbCheckBoxCtrl*)m_pWindow);
+}
+
+//------------------------------------------------------------------------------
+void DbCheckBox::UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ TriState eState = STATE_DONTKNOW;
+ if (_xVariant.is())
+ {
+ if (_xVariant->getBoolean())
+ eState = STATE_CHECK;
+ else if (!_xVariant->wasNull())
+ eState = STATE_NOCHECK;
+ }
+ ((DbCheckBoxCtrl*)m_pWindow)->GetBox().SetState(eState);
+}
+
+//------------------------------------------------------------------------------
+void DbCheckBox::Paint(OutputDevice& rDev, const Rectangle& rRect,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ TriState eState = STATE_DONTKNOW;
+ if (_xVariant.is())
+ {
+ if (_xVariant->getBoolean())
+ eState = STATE_CHECK;
+ else if (!_xVariant->wasNull())
+ eState = STATE_NOCHECK;
+ }
+ ((DbCheckBoxCtrl*)m_pPainter)->GetBox().SetState(eState);
+ DbCellControl::Paint(rDev, rRect);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbCheckBox::Commit()
+{
+ ::com::sun::star::uno::Any aVal;
+ aVal <<= (sal_Int16) (((DbCheckBoxCtrl*)m_pWindow)->GetBox().GetState());
+ m_rColumn.getModel()->setPropertyValue(FM_PROP_STATE, aVal);
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void DbPatternField::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModel(m_rColumn.getModel());
+ sal_Bool bReadOnly = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_READONLY));
+ sal_Bool bEnable = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_ENABLED));
+
+ m_rColumn.SetAlignmentFromModel(-1);
+
+ PatternField* pField = new PatternField(pParent, 0);
+ m_pWindow = pField;
+ m_pPainter= new PatternField(pParent, 0);
+
+ ::rtl::OUString aLitMask;
+ xModel->getPropertyValue(FM_PROP_LITERALMASK) >>= aLitMask;
+ ::rtl::OUString aEditMask;
+ xModel->getPropertyValue(FM_PROP_EDITMASK) >>= aEditMask;
+ sal_Bool bStrict = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_STRICTFORMAT));
+
+ ByteString aAsciiListMask((const sal_Unicode*)aLitMask, RTL_TEXTENCODING_ASCII_US);
+ pField->SetMask(aAsciiListMask, aEditMask);
+ ((PatternField*)m_pPainter)->SetMask(aAsciiListMask, aEditMask);
+ pField->SetStrictFormat(bStrict);
+ ((PatternField*)m_pPainter)->SetStrictFormat(bStrict);
+
+ pField->SetReadOnly(m_rColumn.IsReadOnly() || bReadOnly);
+ pField->Enable(bEnable);
+
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbPatternField::CreateController() const
+{
+ return new DbSpinCellController((PatternField*)m_pWindow);
+}
+
+//------------------------------------------------------------------------------
+XubString DbPatternField::GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor)
+{
+ ::rtl::OUString aString;
+ if (_xVariant.is())
+ aString = _xVariant->getString();
+
+ m_pPainter->SetText(aString);
+ return m_pPainter->GetText();
+}
+
+//------------------------------------------------------------------------------
+void DbPatternField::UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ Edit* pEdit = (Edit*)m_pWindow;
+ pEdit->SetText(GetFormatText(_xVariant, xFormatter));
+ pEdit->SetSelection(Selection(SELECTION_MAX,SELECTION_MIN));
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbPatternField::Commit()
+{
+ XubString aText( m_pWindow->GetText());
+ m_rColumn.getModel()->setPropertyValue(FM_PROP_TEXT, ::com::sun::star::uno::makeAny(::rtl::OUString(aText)));
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void DbNumericField::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModel(m_rColumn.getModel());
+ sal_Bool bReadOnly = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_READONLY));
+ sal_Bool bEnable = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_ENABLED));
+
+ m_rColumn.SetAlignmentFromModel(::com::sun::star::awt::TextAlign::RIGHT);
+
+ DoubleNumericField* pField;
+ if (::utl::getBOOL(xModel->getPropertyValue(FM_PROP_SPIN)))
+ {
+ pField = new DoubleNumericField(pParent, WB_REPEAT | WB_SPIN);
+ m_pPainter= new DoubleNumericField(pParent, WB_REPEAT | WB_SPIN);
+ }
+ else
+ {
+ m_pPainter= new DoubleNumericField(pParent, 0);
+ pField = new DoubleNumericField(pParent, 0);
+ }
+ m_pWindow = pField;
+
+ pField->EnableEmptyField(sal_True);
+ ((DoubleNumericField*)m_pPainter)->EnableEmptyField(sal_True);
+
+ sal_Int16 nScale = ::utl::getINT16(xModel->getPropertyValue(FM_PROP_DECIMAL_ACCURACY));
+ sal_Int32 nMin = (sal_Int32)::utl::getDouble(xModel->getPropertyValue(FM_PROP_VALUEMIN));
+ sal_Int32 nMax = (sal_Int32)::utl::getDouble(xModel->getPropertyValue(FM_PROP_VALUEMAX));
+ sal_Int32 nStep = (sal_Int32)::utl::getDouble(xModel->getPropertyValue(FM_PROP_VALUESTEP));
+ sal_Bool bStrict = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_STRICTFORMAT));
+ sal_Bool bThousand = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_SHOWTHOUSANDSEP));
+
+ pField->SetMinValue(nMin);
+ pField->SetMaxValue(nMax);
+ pField->SetSpinSize(nStep);
+ pField->SetStrictFormat(bStrict);
+ pField->SetReadOnly(m_rColumn.IsReadOnly() || bReadOnly);
+ pField->Enable(bEnable);
+
+ ((DoubleNumericField*)m_pPainter)->SetMinValue(nMin);
+ ((DoubleNumericField*)m_pPainter)->SetMaxValue(nMax);
+ ((DoubleNumericField*)m_pPainter)->SetStrictFormat(bStrict);
+
+ // dem Field und dem Painter einen Formatter spendieren
+ // zuerst testen, ob ich von dem Service hinter einer Connection bekommen kann
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xForm(xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xForm.is())
+ xSupplier = ::utl::getNumberFormats(::utl::getConnection(xForm), sal_True);
+ SvNumberFormatter* pFormatterUsed = NULL;
+ if (xSupplier.is())
+ {
+ SvNumberFormatsSupplierObj* pImplmentation = SvNumberFormatsSupplierObj::getImplementation(xSupplier);
+ pFormatterUsed = pImplmentation ? pImplmentation->GetNumberFormatter() : NULL;
+ }
+ if (pFormatterUsed == NULL)
+ { // der Cursor fuehrte nicht zum Erfolg -> Standard
+ pFormatterUsed = pField->StandardFormatter();
+ DBG_ASSERT(pFormatterUsed != NULL, "DbNumericField::Init : no standard formatter given by the numeric field !");
+ }
+ pField->SetFormatter(pFormatterUsed);
+ ((DoubleNumericField*)m_pPainter)->SetFormatter(pFormatterUsed);
+
+ // und dann ein Format generieren, dass die gewuenschten Nachkommastellen usw. hat
+ XubString sFormatString;
+ LanguageType aAppLanguage = Application::GetAppInternational().GetLanguage();
+ pFormatterUsed->GenerateFormat(sFormatString, 0, aAppLanguage, bThousand, sal_False, nScale);
+
+ pField->SetFormat(sFormatString, aAppLanguage);
+ ((DoubleNumericField*)m_pPainter)->SetFormat(sFormatString, aAppLanguage);
+
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbNumericField::CreateController() const
+{
+ return new DbSpinCellController((SpinField*)m_pWindow);
+}
+
+//------------------------------------------------------------------------------
+XubString DbNumericField::GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor)
+{
+ if (!_xVariant.is())
+ return XubString();
+ else
+ {
+ double fValue = GetValue(_xVariant, xFormatter);
+ if (_xVariant->wasNull())
+ return XubString();
+ else
+ {
+ ((DoubleNumericField*)m_pPainter)->SetValue(fValue);
+ return m_pPainter->GetText();
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbNumericField::UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ if (!_xVariant.is())
+ m_pWindow->SetText(XubString());
+ else
+ {
+ double fValue = GetValue(_xVariant, xFormatter);
+ if (_xVariant->wasNull())
+ m_pWindow->SetText(XubString());
+ else
+ ((DoubleNumericField*)m_pWindow)->SetValue(fValue);
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbNumericField::Commit()
+{
+ XubString aText( m_pWindow->GetText());
+ ::com::sun::star::uno::Any aVal;
+
+ if (aText.Len() != 0) // nicht null
+ {
+ double fValue = ((DoubleNumericField*)m_pWindow)->GetValue();
+ aVal <<= (double)fValue;
+ }
+ m_rColumn.getModel()->setPropertyValue(FM_PROP_VALUE, aVal);
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void DbCurrencyField::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModel(m_rColumn.getModel());
+ sal_Bool bReadOnly = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_READONLY));
+ sal_Bool bEnable = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_ENABLED));
+
+ m_rColumn.SetAlignmentFromModel(::com::sun::star::awt::TextAlign::RIGHT);
+
+ LongCurrencyField* pField;
+ if (::utl::getBOOL(xModel->getPropertyValue(FM_PROP_SPIN)))
+ {
+ pField = new LongCurrencyField(pParent, WB_REPEAT | WB_SPIN);
+ m_pPainter= new LongCurrencyField(pParent, WB_REPEAT | WB_SPIN);
+ }
+ else
+ {
+ m_pPainter= new LongCurrencyField(pParent, 0);
+ pField = new LongCurrencyField(pParent, 0);
+ }
+ m_pWindow = pField;
+
+ m_nScale = ::utl::getINT16(xModel->getPropertyValue(FM_PROP_DECIMAL_ACCURACY));
+ double nMin = ::utl::getDouble(xModel->getPropertyValue(FM_PROP_VALUEMIN));
+ double nMax = ::utl::getDouble(xModel->getPropertyValue(FM_PROP_VALUEMAX));
+ double nStep = ::utl::getDouble(xModel->getPropertyValue(FM_PROP_VALUESTEP));
+ sal_Bool bStrict = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_STRICTFORMAT));
+ sal_Bool bThousand = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_SHOWTHOUSANDSEP));
+ ::rtl::OUString aStr( ::utl::getString(xModel->getPropertyValue(FM_PROP_CURRENCYSYMBOL)));
+
+ International aInternational( pField->GetInternational() );
+ aInternational.EnableNumThousandSep(bThousand);
+ aInternational.SetNumDigits(m_nScale);
+ aInternational.SetCurrSymbol(aStr);
+ pField->SetInternational(aInternational);
+ pField->SetDecimalDigits(m_nScale);
+
+ pField->SetFirst(nMin);
+ pField->SetLast(nMax);
+ pField->SetMin(nMin);
+ pField->SetMax(nMax);
+ pField->SetSpinSize(nStep);
+ pField->SetStrictFormat(bStrict);
+ pField->SetReadOnly(m_rColumn.IsReadOnly() || bReadOnly);
+ pField->Enable(bEnable);
+
+ ((LongCurrencyField*)m_pPainter)->SetInternational(aInternational);
+ ((LongCurrencyField*)m_pPainter)->SetFirst(nMin);
+ ((LongCurrencyField*)m_pPainter)->SetLast(nMax);
+ ((LongCurrencyField*)m_pPainter)->SetMin(nMin);
+ ((LongCurrencyField*)m_pPainter)->SetMax(nMax);
+ ((LongCurrencyField*)m_pPainter)->SetStrictFormat(bStrict);
+ ((LongCurrencyField*)m_pPainter)->SetDecimalDigits(m_nScale);
+
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbCurrencyField::CreateController() const
+{
+ return new DbSpinCellController((SpinField*)m_pWindow);
+}
+
+//------------------------------------------------------------------------------
+double DbCurrencyField::GetCurrency(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const
+{
+ double fValue = GetValue(_xVariant, xFormatter);
+ if (m_nScale)
+ fValue *= pow(10.0, double(m_nScale));
+ return fValue;
+}
+
+//------------------------------------------------------------------------------
+XubString DbCurrencyField::GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor)
+{
+ if (!_xVariant.is())
+ return XubString();
+ else
+ {
+ double fValue = GetCurrency(_xVariant, xFormatter);
+ if (_xVariant->wasNull())
+ return XubString();
+ else
+ {
+ ((LongCurrencyField*)m_pPainter)->SetValue(fValue);
+ return m_pPainter->GetText();
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbCurrencyField::UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ if (!_xVariant.is())
+ m_pWindow->SetText(XubString());
+ else
+ {
+ double fValue = GetCurrency(_xVariant, xFormatter);
+ if (_xVariant->wasNull())
+ m_pWindow->SetText(XubString());
+ else
+ ((LongCurrencyField*)m_pWindow)->SetValue(fValue);
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbCurrencyField::Commit()
+{
+ XubString aText( m_pWindow->GetText());
+ ::com::sun::star::uno::Any aVal;
+ if (aText.Len() != 0) // nicht null
+ {
+ double fValue = ((LongCurrencyField*)m_pWindow)->GetValue();
+ if (m_nScale)
+ fValue /= pow(10.0, double(m_nScale));
+ aVal <<= (double)fValue;
+ }
+ m_rColumn.getModel()->setPropertyValue(FM_PROP_VALUE, aVal);
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void DbDateField::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ m_rColumn.SetAlignmentFromModel(::com::sun::star::awt::TextAlign::RIGHT);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModel(m_rColumn.getModel());
+
+ WinBits aFieldBits = 0;
+ sal_Bool bSpin = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_SPIN));
+ sal_Bool bDropDown = !::utl::hasProperty(FM_PROP_DROPDOWN, xModel) || ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_DROPDOWN));
+ if (bSpin)
+ aFieldBits |= WB_REPEAT | WB_SPIN;
+ if (bDropDown)
+ aFieldBits |= WB_DROPDOWN;
+
+ CalendarField* pField = new CalendarField(pParent, aFieldBits);
+ pField->EnableToday();
+ pField->EnableNone();
+ m_pPainter = new CalendarField(pParent, aFieldBits);
+
+ m_pWindow = pField;
+
+ sal_Int16 nFormat = ::utl::getINT16(xModel->getPropertyValue(FM_PROP_DATEFORMAT));
+ sal_Int32 nMin = ::utl::getINT32(xModel->getPropertyValue(FM_PROP_DATEMIN));
+ sal_Int32 nMax = ::utl::getINT32(xModel->getPropertyValue(FM_PROP_DATEMAX));
+ sal_Bool bStrict = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_STRICTFORMAT));
+ sal_Bool bReadOnly = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_READONLY));
+ sal_Bool bEnable = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_ENABLED));
+
+ ::com::sun::star::uno::Any aCentury = xModel->getPropertyValue(FM_PROP_DATE_SHOW_CENTURY);
+ if (aCentury.getValueType().getTypeClass() != ::com::sun::star::uno::TypeClass_VOID)
+ {
+ International aInternational( pField->GetInternational() );
+ aInternational.SetDateCentury(::utl::getBOOL(aCentury));
+ pField->SetInternational(aInternational);
+
+ static_cast<DateField*>(m_pPainter)->SetInternational(aInternational);
+ }
+
+ pField->SetExtFormat( (ExtDateFieldFormat)nFormat);
+ pField->SetMin(nMin);
+ pField->SetMax(nMax);
+ pField->SetStrictFormat(bStrict);
+ pField->SetReadOnly(m_rColumn.IsReadOnly() || bReadOnly);
+ pField->Enable(bEnable);
+
+ static_cast<DateField*>(m_pPainter)->SetStrictFormat(bStrict);
+ static_cast<DateField*>(m_pPainter)->SetMin(nMin);
+ static_cast<DateField*>(m_pPainter)->SetMax(nMax);
+
+ static_cast<DateField*>(m_pPainter)->SetExtFormat( (ExtDateFieldFormat)nFormat);
+
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbDateField::CreateController() const
+{
+ return new DbSpinCellController((SpinField*)m_pWindow);
+}
+
+//------------------------------------------------------------------------------
+XubString DbDateField::GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor)
+{
+ if (!_xVariant.is())
+ return XubString();
+ else
+ {
+ ::com::sun::star::util::Date aValue = _xVariant->getDate();
+ if (_xVariant->wasNull())
+ return XubString();
+ else
+ {
+ Date aVclValue;
+ ::utl::typeConvert(aValue, aVclValue);
+ static_cast<DateField*>(m_pPainter)->SetDate(aVclValue);
+ return m_pPainter->GetText();
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbDateField::UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ if (!_xVariant.is())
+ m_pWindow->SetText(XubString());
+ else
+ {
+ ::com::sun::star::util::Date aValue = _xVariant->getDate();
+ if (_xVariant->wasNull())
+ m_pWindow->SetText(XubString());
+ else
+ {
+ Date aVclValue;
+ ::utl::typeConvert(aValue, aVclValue);
+ static_cast<DateField*>(m_pWindow)->SetDate(aVclValue);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbDateField::Commit()
+{
+ XubString aText( m_pWindow->GetText());
+ ::com::sun::star::uno::Any aVal;
+ if (aText.Len() != 0)
+ aVal <<= (sal_Int32)static_cast<DateField*>(m_pWindow)->GetDate().GetDate();
+ else
+ aVal.clear();
+
+ m_rColumn.getModel()->setPropertyValue(FM_PROP_DATE, aVal);
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void DbTimeField::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModel(m_rColumn.getModel());
+ sal_Bool bReadOnly = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_READONLY));
+ sal_Bool bEnable = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_ENABLED));
+
+ m_rColumn.SetAlignmentFromModel(::com::sun::star::awt::TextAlign::LEFT);
+
+ TimeField* pField;
+ if (::utl::getBOOL(xModel->getPropertyValue(FM_PROP_SPIN)))
+ {
+ pField = new TimeField(pParent, WB_REPEAT | WB_SPIN);
+ m_pPainter= new TimeField(pParent, WB_REPEAT | WB_SPIN);
+ }
+ else
+ {
+ m_pPainter= new TimeField(pParent, 0);
+ pField = new TimeField(pParent, 0);
+ }
+ m_pWindow = pField;
+
+ sal_Int16 nFormat = ::utl::getINT16(xModel->getPropertyValue(FM_PROP_TIMEFORMAT));
+ sal_Int32 nMin = ::utl::getINT32(xModel->getPropertyValue(FM_PROP_TIMEMIN));
+ sal_Int32 nMax = ::utl::getINT32(xModel->getPropertyValue(FM_PROP_TIMEMAX));
+ sal_Bool bStrict = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_STRICTFORMAT));
+
+ pField->SetExtFormat( (ExtTimeFieldFormat)nFormat);
+ pField->SetMin(nMin);
+ pField->SetMax(nMax);
+ pField->SetStrictFormat(bStrict);
+ pField->SetReadOnly(m_rColumn.IsReadOnly() || bReadOnly);
+ pField->Enable(bEnable);
+
+ static_cast<TimeField*>(m_pPainter)->SetExtFormat( (ExtTimeFieldFormat)nFormat);
+ static_cast<TimeField*>(m_pPainter)->SetMin(nMin);
+ static_cast<TimeField*>(m_pPainter)->SetMax(nMax);
+ static_cast<TimeField*>(m_pPainter)->SetStrictFormat(bStrict);
+
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbTimeField::CreateController() const
+{
+ return new DbSpinCellController((SpinField*)m_pWindow);
+}
+
+//------------------------------------------------------------------------------
+XubString DbTimeField::GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor)
+{
+ if (!_xVariant.is())
+ return XubString();
+ else
+ {
+ ::com::sun::star::util::Time aValue = _xVariant->getTime();
+ if (_xVariant->wasNull())
+ return XubString();
+ else
+ {
+ Time aVclTime;
+ ::utl::typeConvert(aValue, aVclTime);
+ static_cast<TimeField*>(m_pPainter)->SetTime(aVclTime);
+ return m_pPainter->GetText();
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbTimeField::UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ if (!_xVariant.is())
+ m_pWindow->SetText(XubString());
+ else
+ {
+ ::com::sun::star::util::Time aValue = _xVariant->getTime();
+ if (_xVariant->wasNull())
+ m_pWindow->SetText(XubString());
+ else
+ {
+ Time aVclTime;
+ ::utl::typeConvert(aValue, aVclTime);
+ static_cast<TimeField*>(m_pWindow)->SetTime(aVclTime);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbTimeField::Commit()
+{
+ XubString aText( m_pWindow->GetText());
+ ::com::sun::star::uno::Any aVal;
+ if (aText.Len() != 0)
+ aVal <<= (sal_Int32)static_cast<TimeField*>(m_pWindow)->GetTime().GetTime();
+ else
+ aVal.clear();
+
+ m_rColumn.getModel()->setPropertyValue(FM_PROP_TIME, aVal);
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+DbComboBox::DbComboBox(DbGridColumn& _rColumn)
+ :DbCellControl(_rColumn)
+ ,OPropertyChangeListener(m_aDummy)
+ ,m_nKeyType(::com::sun::star::util::NumberFormat::UNDEFINED)
+{
+ m_bAlignedController = sal_False;
+}
+
+//------------------------------------------------------------------------------
+void DbComboBox::_propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& rEvt) throw( ::com::sun::star::uno::RuntimeException )
+{
+ SetList(rEvt.NewValue);
+}
+
+//------------------------------------------------------------------------------
+void DbComboBox::SetList(const ::com::sun::star::uno::Any& rItems)
+{
+ DbComboBoxCtrl* pField = (DbComboBoxCtrl*)m_pWindow;
+ pField->Clear();
+
+ ::utl::StringSequence aTest;
+ if (rItems >>= aTest)
+ {
+ const ::rtl::OUString* pStrings = aTest.getConstArray();
+ sal_Int32 nItems = aTest.getLength();
+ for (sal_Int32 i = 0; i < nItems; ++i, ++pStrings )
+ pField->InsertEntry(*pStrings, LISTBOX_APPEND);
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbComboBox::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModel(m_rColumn.getModel());
+ sal_Bool bReadOnly = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_READONLY));
+ sal_Bool bEnable = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_ENABLED));
+
+ m_rColumn.SetAlignmentFromModel(::com::sun::star::awt::TextAlign::LEFT);
+
+ DbComboBoxCtrl* pField;
+ pField = new DbComboBoxCtrl(pParent);
+ m_pWindow = pField;
+
+ // selection von rechts nach links
+ AllSettings aSettings = m_pWindow->GetSettings();
+ StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+ aStyleSettings.SetSelectionOptions(
+ aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST);
+ aSettings.SetStyleSettings(aStyleSettings);
+ m_pWindow->SetSettings(aSettings, sal_True);
+
+ sal_Int16 nLines = ::utl::getINT16(xModel->getPropertyValue(FM_PROP_LINECOUNT));
+ ::com::sun::star::uno::Any aItems = xModel->getPropertyValue(FM_PROP_STRINGITEMLIST);
+
+ if (m_rColumn.GetParent().getNumberFormatter().is())
+ m_nKeyType = utl::getNumberFormatType(m_rColumn.GetParent().getNumberFormatter()->getNumberFormatsSupplier()->getNumberFormats(), m_rColumn.GetKey());
+
+ SetList(aItems);
+
+ // Am Model horchen, um Aenderungen der Stringliste mitzubekommen
+ ::utl::OPropertyChangeMultiplexer* pMultiplexer = new ::utl::OPropertyChangeMultiplexer(this, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (xModel, ::com::sun::star::uno::UNO_QUERY));
+ pMultiplexer->addProperty(FM_PROP_STRINGITEMLIST);
+
+ pField->SetDropDownLineCount(nLines);
+ pField->SetReadOnly(m_rColumn.IsReadOnly() || bReadOnly);
+ pField->Enable(bEnable);
+
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbComboBox::CreateController() const
+{
+ return new DbComboBoxCellController((DbComboBoxCtrl*)m_pWindow);
+}
+
+//------------------------------------------------------------------------------
+XubString DbComboBox::GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor)
+{
+ ::rtl::OUString aString;
+ if (_xVariant.is())
+ aString = ::utl::DBTypeConversion::getValue(_xVariant,
+ xFormatter,
+ m_rColumn.GetParent().getNullDate(),
+ m_rColumn.GetKey(),
+ m_nKeyType);
+ return aString;
+}
+
+//------------------------------------------------------------------------------
+void DbComboBox::UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ m_pWindow->SetText(GetFormatText(_xVariant, xFormatter));
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbComboBox::Commit()
+{
+ XubString aText( m_pWindow->GetText());
+ m_rColumn.getModel()->setPropertyValue(FM_PROP_TEXT, ::com::sun::star::uno::makeAny(::rtl::OUString(aText)));
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+DbListBox::DbListBox(DbGridColumn& _rColumn)
+ :DbCellControl(_rColumn)
+ ,OPropertyChangeListener(m_aDummy)
+ ,m_bBound(sal_False)
+{
+ m_bAlignedController = sal_False;
+}
+
+//------------------------------------------------------------------------------
+void DbListBox::_propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& rEvt) throw( ::com::sun::star::uno::RuntimeException )
+{
+ SetList(rEvt.NewValue);
+}
+
+//------------------------------------------------------------------------------
+void DbListBox::SetList(const ::com::sun::star::uno::Any& rItems)
+{
+ DbListBoxCtrl* pField = (DbListBoxCtrl*)m_pWindow;
+
+ pField->Clear();
+ m_bBound = sal_False;
+
+ ::utl::StringSequence aTest;
+ if (rItems >>= aTest)
+ {
+ const ::rtl::OUString* pStrings = aTest.getConstArray();
+ sal_Int32 nItems = aTest.getLength();
+ if (nItems)
+ {
+ for (sal_Int32 i = 0; i < nItems; ++i, ++pStrings )
+ pField->InsertEntry(*pStrings, LISTBOX_APPEND);
+
+ m_rColumn.getModel()->getPropertyValue(FM_PROP_VALUE_SEQ) >>= m_aValueList;
+ m_bBound = m_aValueList.getLength() > 0;
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbListBox::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModel(m_rColumn.getModel());
+ sal_Bool bEnable = ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_ENABLED));
+ m_rColumn.SetAlignment(::com::sun::star::awt::TextAlign::LEFT);
+
+ DbListBoxCtrl* pField;
+ pField = new DbListBoxCtrl(pParent);
+ m_pWindow = pField;
+
+ sal_Int16 nLines = ::utl::getINT16(xModel->getPropertyValue(FM_PROP_LINECOUNT));
+ ::com::sun::star::uno::Any aItems = xModel->getPropertyValue(FM_PROP_STRINGITEMLIST);
+
+ SetList(aItems);
+
+ // Am Model horchen, um Aenderungen der Stringliste mitzubekommen
+ ::utl::OPropertyChangeMultiplexer* pMultiplexer = new ::utl::OPropertyChangeMultiplexer(this, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (xModel, ::com::sun::star::uno::UNO_QUERY));
+ pMultiplexer->addProperty(FM_PROP_STRINGITEMLIST);
+
+ pField->SetDropDownLineCount(nLines);
+ pField->Enable(bEnable);
+
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbListBox::CreateController() const
+{
+ return new DbListBoxCellController((DbListBoxCtrl*)m_pWindow);
+}
+
+//------------------------------------------------------------------------------
+XubString DbListBox::GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor)
+{
+ if (!_xVariant.is())
+ return XubString();
+ else
+ {
+ XubString aText;
+ if (m_bBound)
+ {
+ ::com::sun::star::uno::Sequence<sal_Int16> aPosSeq = findValue(m_aValueList, _xVariant->getString(), sal_True);
+ if (aPosSeq.getLength())
+ aText = static_cast<ListBox*>(m_pWindow)->GetEntry(aPosSeq.getConstArray()[0]);
+ }
+ else
+ aText = (const sal_Unicode*)_xVariant->getString();
+ return aText;
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbListBox::UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ static_cast<ListBox*>(m_pWindow)->SelectEntry(GetFormatText(_xVariant, xFormatter));
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbListBox::Commit()
+{
+ ::com::sun::star::uno::Any aVal;
+ ::com::sun::star::uno::Sequence<sal_Int16> aSelectSeq;
+ if (static_cast<ListBox*>(m_pWindow)->GetSelectEntryCount())
+ {
+ aSelectSeq.realloc(1);
+ *(sal_Int16 *)aSelectSeq.getArray() = (sal_Int16)static_cast<ListBox*>(m_pWindow)->GetSelectEntryPos();
+ }
+ aVal <<= aSelectSeq;
+ m_rColumn.getModel()->setPropertyValue(FM_PROP_SELECT_SEQ, aVal);
+ return sal_True;
+}
+
+
+DBG_NAME(DbFilterField);
+/*************************************************************************/
+DbFilterField::DbFilterField(DbGridColumn& _rColumn)
+ :DbCellControl(_rColumn)
+ ,m_bFilterList(sal_False)
+ ,m_nControlClass(::com::sun::star::form::FormComponentType::TEXTFIELD)
+ ,m_bFilterListFilled(sal_False)
+ ,m_bBound(sal_False)
+{
+ DBG_CTOR(DbFilterField,NULL);
+
+ m_bAlignedController = sal_False;
+}
+
+//------------------------------------------------------------------------------
+DbFilterField::~DbFilterField()
+{
+ if (m_nControlClass == ::com::sun::star::form::FormComponentType::CHECKBOX)
+ ((DbCheckBoxCtrl*)m_pWindow)->SetClickHdl( Link() );
+
+ DBG_DTOR(DbFilterField,NULL);
+}
+
+//------------------------------------------------------------------------------
+void DbFilterField::Paint(OutputDevice& rDev, const Rectangle& rRect)
+{
+ static sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_VCENTER | TEXT_DRAW_LEFT;
+ switch (m_nControlClass)
+ {
+ case ::com::sun::star::form::FormComponentType::CHECKBOX:
+ DbCellControl::Paint(rDev, rRect);
+ break;
+ case ::com::sun::star::form::FormComponentType::LISTBOX:
+ rDev.DrawText(rRect, static_cast<ListBox*>(m_pWindow)->GetSelectEntry(), nStyle);
+ break;
+ default:
+ rDev.DrawText(rRect, m_aText, nStyle);
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbFilterField::SetList(const ::com::sun::star::uno::Any& rItems, sal_Bool bComboBox)
+{
+ ::utl::StringSequence aTest;
+ rItems >>= aTest;
+ const ::rtl::OUString* pStrings = aTest.getConstArray();
+ sal_Int32 nItems = aTest.getLength();
+ if (nItems)
+ {
+ if (bComboBox)
+ {
+ ComboBox* pField = (ComboBox*)m_pWindow;
+ for (sal_Int32 i = 0; i < nItems; ++i, ++pStrings )
+ pField->InsertEntry(*pStrings, LISTBOX_APPEND);
+ }
+ else
+ {
+ ListBox* pField = (ListBox*)m_pWindow;
+ for (sal_Int32 i = 0; i < nItems; ++i, ++pStrings )
+ pField->InsertEntry(*pStrings, LISTBOX_APPEND);
+
+ m_rColumn.getModel()->getPropertyValue(FM_PROP_VALUE_SEQ) >>= m_aValueList;
+ m_bBound = m_aValueList.getLength() > 0;
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbFilterField::CreateControl(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xModel)
+{
+ switch (m_nControlClass)
+ {
+ case ::com::sun::star::form::FormComponentType::CHECKBOX:
+ m_pWindow = new DbCheckBoxCtrl(pParent);
+ m_pWindow->SetPaintTransparent( sal_True );
+ ((DbCheckBoxCtrl*)m_pWindow)->SetClickHdl( LINK( this, DbFilterField, OnClick ) );
+
+ m_pPainter = new DbCheckBoxCtrl(pParent);
+ m_pPainter->SetPaintTransparent( sal_True );
+ m_pPainter->SetBackground();
+ break;
+ case ::com::sun::star::form::FormComponentType::LISTBOX:
+ {
+ m_pWindow = new DbListBoxCtrl(pParent);
+ sal_Int16 nLines = ::utl::getINT16(xModel->getPropertyValue(FM_PROP_LINECOUNT));
+ ::com::sun::star::uno::Any aItems = xModel->getPropertyValue(FM_PROP_STRINGITEMLIST);
+ SetList(aItems, m_nControlClass == ::com::sun::star::form::FormComponentType::COMBOBOX);
+ static_cast<ListBox*>(m_pWindow)->SetDropDownLineCount(nLines);
+ } break;
+ case ::com::sun::star::form::FormComponentType::COMBOBOX:
+ {
+ m_pWindow = new DbComboBoxCtrl(pParent);
+
+ AllSettings aSettings = m_pWindow->GetSettings();
+ StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+ aStyleSettings.SetSelectionOptions(
+ aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST);
+ aSettings.SetStyleSettings(aStyleSettings);
+ m_pWindow->SetSettings(aSettings, sal_True);
+
+ if (!m_bFilterList)
+ {
+ sal_Int16 nLines = ::utl::getINT16(xModel->getPropertyValue(FM_PROP_LINECOUNT));
+ ::com::sun::star::uno::Any aItems = xModel->getPropertyValue(FM_PROP_STRINGITEMLIST);
+ SetList(aItems, m_nControlClass == ::com::sun::star::form::FormComponentType::COMBOBOX);
+ ((ComboBox*)m_pWindow)->SetDropDownLineCount(nLines);
+ }
+ else
+ ((ComboBox*)m_pWindow)->SetDropDownLineCount(5);
+
+ } break;
+ default:
+ {
+ m_pWindow = new Edit(pParent, WB_LEFT);
+ AllSettings aSettings = m_pWindow->GetSettings();
+ StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+ aStyleSettings.SetSelectionOptions(
+ aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST);
+ aSettings.SetStyleSettings(aStyleSettings);
+ m_pWindow->SetSettings(aSettings, sal_True);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbFilterField::Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModel(m_rColumn.getModel());
+ m_rColumn.SetAlignment(::com::sun::star::awt::TextAlign::LEFT);
+
+ if (xModel.is())
+ {
+ m_bFilterList = ::utl::hasProperty(FM_PROP_FILTERPROPOSAL, xModel) && ::utl::getBOOL(xModel->getPropertyValue(FM_PROP_FILTERPROPOSAL));
+ if (m_bFilterList)
+ m_nControlClass = ::com::sun::star::form::FormComponentType::COMBOBOX;
+ else
+ {
+ sal_Int16 nClassId = ::utl::getINT16(xModel->getPropertyValue(FM_PROP_CLASSID));
+ switch (nClassId)
+ {
+ case ::com::sun::star::form::FormComponentType::CHECKBOX:
+ case ::com::sun::star::form::FormComponentType::LISTBOX:
+ case ::com::sun::star::form::FormComponentType::COMBOBOX:
+ m_nControlClass = nClassId;
+ break;
+ default:
+ if (m_bFilterList)
+ m_nControlClass = ::com::sun::star::form::FormComponentType::COMBOBOX;
+ else
+ m_nControlClass = ::com::sun::star::form::FormComponentType::TEXTFIELD;
+ }
+ }
+ }
+
+ CreateControl(pParent, xModel);
+ DbCellControl::Init(pParent, xCursor);
+}
+
+//------------------------------------------------------------------------------
+DbCellControllerRef DbFilterField::CreateController() const
+{
+ DbCellControllerRef xController;
+ switch (m_nControlClass)
+ {
+ case ::com::sun::star::form::FormComponentType::CHECKBOX:
+ xController = new DbCheckBoxCellController((DbCheckBoxCtrl*)m_pWindow);
+ break;
+ case ::com::sun::star::form::FormComponentType::LISTBOX:
+ xController = new DbListBoxCellController((DbListBoxCtrl*)m_pWindow);
+ break;
+ case ::com::sun::star::form::FormComponentType::COMBOBOX:
+ xController = new DbComboBoxCellController((DbComboBoxCtrl*)m_pWindow);
+ break;
+ default:
+ if (m_bFilterList)
+ xController = new DbComboBoxCellController((DbComboBoxCtrl*)m_pWindow);
+ else
+ xController = new DbEditCellController((Edit*)m_pWindow);
+ }
+ return xController;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbFilterField::Commit()
+{
+ XubString aText(m_aText);
+ switch (m_nControlClass)
+ {
+ case ::com::sun::star::form::FormComponentType::CHECKBOX:
+ return sal_True;
+ case ::com::sun::star::form::FormComponentType::LISTBOX:
+ if (static_cast<ListBox*>(m_pWindow)->GetSelectEntryCount())
+ {
+ sal_Int16 nPos = (sal_Int16)static_cast<ListBox*>(m_pWindow)->GetSelectEntryPos();
+ aText = (const sal_Unicode*)m_aValueList.getConstArray()[nPos];
+ }
+ else
+ aText.Erase();
+
+ if (m_aText != aText)
+ {
+ m_aText = aText;
+ m_aCommitLink.Call(this);
+ }
+ return sal_True;
+ default:
+ aText = m_pWindow->GetText();
+ }
+
+ if (m_aText != aText)
+ {
+ // check the text with the SQL-Parser
+ XubString aNewText(aText);
+ aNewText.EraseTrailingChars();
+ if (aNewText.Len() != 0)
+ {
+ XubString aErrorMsg;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > xNumberFormatter(m_rColumn.GetParent().getNumberFormatter());
+ SdbSqlParseNode* pParseNode =
+ getSQLParser().PredicateTree(aErrorMsg, aNewText,
+ xNumberFormatter, Application::GetAppInternational(), m_rColumn.GetField());
+ if (pParseNode)
+ {
+ XubString aPreparedText;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xDataSourceRowSet(
+ *m_rColumn.GetParent().getDataSource(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > xConnection(
+ ::utl::getConnection(xDataSourceRowSet));
+ pParseNode->ParseNodeToPredicateStr(aPreparedText,
+ xConnection->getMetaData(),
+ xNumberFormatter,
+ Application::GetAppInternational(),
+ m_rColumn.GetField());
+ delete pParseNode;
+ m_aText = aPreparedText;
+ }
+ else
+ {
+ // display the error and return sal_False
+ ::vos::OGuard aGuard(Application::GetSolarMutex());
+ XubString aTitle( SVX_RES(RID_STR_SYNTAXERROR) );
+ SvxDBMsgBox aDlg(m_pWindow->GetParent(), aTitle, aErrorMsg, WB_OK | WB_DEF_OK,
+ SvxDBMsgBox::Info);
+ aDlg.Execute();
+ return sal_False;
+ }
+ }
+ else
+ m_aText = aText;
+
+ m_pWindow->SetText(m_aText);
+ m_aCommitLink.Call(this);
+ }
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void DbFilterField::SetText(const XubString& rText)
+{
+ m_aText = rText;
+ switch (m_nControlClass)
+ {
+ case ::com::sun::star::form::FormComponentType::CHECKBOX:
+ {
+ TriState eState;
+ if (rText.EqualsAscii("1"))
+ eState = STATE_CHECK;
+ else if (rText.EqualsAscii("0"))
+ eState = STATE_NOCHECK;
+ else
+ eState = STATE_DONTKNOW;
+
+ ((DbCheckBoxCtrl*)m_pWindow)->GetBox().SetState(eState);
+ ((DbCheckBoxCtrl*)m_pPainter)->GetBox().SetState(eState);
+ } break;
+ case ::com::sun::star::form::FormComponentType::LISTBOX:
+ {
+ XubString aText;
+ ::com::sun::star::uno::Sequence<sal_Int16> aPosSeq = findValue(m_aValueList, m_aText, sal_True);
+ if (aPosSeq.getLength())
+ static_cast<ListBox*>(m_pWindow)->SelectEntryPos(aPosSeq.getConstArray()[0], sal_True);
+ else
+ static_cast<ListBox*>(m_pWindow)->SelectEntryPos(-1, sal_True);
+ } break;
+ default:
+ m_pWindow->SetText(m_aText);
+ }
+
+ // now force a repaint on the window
+ m_rColumn.GetParent().RowModified(0,m_rColumn.GetId());
+}
+
+//------------------------------------------------------------------------------
+void DbFilterField::Update()
+{
+ // should we fill the combobox with a filter proposal?
+ if (m_bFilterList && !m_bFilterListFilled)
+ {
+ m_bFilterListFilled = sal_True;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xField = m_rColumn.GetField();
+ if (!xField.is())
+ return;
+
+ ::rtl::OUString aName;
+ xField->getPropertyValue(FM_PROP_NAME) >>= aName;
+
+ // the columnmodel
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xModelAsChild(m_rColumn.getModel(), ::com::sun::star::uno::UNO_QUERY);
+ // the grid model
+ xModelAsChild = ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > (xModelAsChild->getParent(),::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xForm(xModelAsChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xForm.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > xConnection = ::utl::getConnection(xForm);
+ if (!xConnection.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposerFactory > xFactory(xConnection, ::com::sun::star::uno::UNO_QUERY);
+ if (!xFactory.is())
+ {
+ DBG_ERROR("DbFilterField::Update : used the right place to request the ::com::sun::star::sdb::XSQLQueryComposerFactory interface ?");
+ return;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer > xComposer = xFactory->createQueryComposer();
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xFormAsSet(xForm, ::com::sun::star::uno::UNO_QUERY);
+ ::rtl::OUString sStatement;
+ xFormAsSet->getPropertyValue(FM_PROP_ACTIVECOMMAND) >>= sStatement;
+ xComposer->setQuery(sStatement);
+ }
+ catch(...)
+ {
+ ::utl::disposeComponent(xComposer);
+ return;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xComposerAsSet(xComposer, ::com::sun::star::uno::UNO_QUERY);
+ if (!xComposerAsSet.is())
+ return;
+
+ // search the field
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xFieldNames;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xTablesNames;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xComposerFieldAsSet;
+
+ ::cppu::extractInterface(xFieldNames, xComposerAsSet->getPropertyValue(FM_PROP_SELECTED_FIELDS));
+ ::cppu::extractInterface(xTablesNames, xComposerAsSet->getPropertyValue(FM_PROP_SELECTED_TABLES));
+ ::cppu::extractInterface(xComposerFieldAsSet, xFieldNames->getByName(aName));
+
+ if (xComposerFieldAsSet.is() && ::utl::hasProperty(FM_PROP_TABLENAME, xComposerFieldAsSet) &&
+ ::utl::hasProperty(FM_PROP_FIELDSOURCE, xComposerFieldAsSet))
+ {
+ ::rtl::OUString aFieldName;
+ ::rtl::OUString aTableName;
+ xComposerFieldAsSet->getPropertyValue(FM_PROP_FIELDSOURCE) >>= aFieldName;
+ xComposerFieldAsSet->getPropertyValue(FM_PROP_TABLENAME) >>= aTableName;
+
+ // no possibility to create a select statement
+ // looking for the complete table name
+ if (!xTablesNames->hasByName(aTableName))
+ return;
+
+ // this is the tablename
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > xTableNameAccess;
+ ::cppu::extractInterface(xTableNameAccess, xTablesNames->getByName(aTableName));
+ aTableName = xTableNameAccess->getName();
+
+ // ein Statement aufbauen und abschicken als query
+ // Access to the connection
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement > xStatement;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xListCursor;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > xDataField;
+
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > xMeta = xConnection->getMetaData();
+
+ String aQuote( xMeta->getIdentifierQuoteString());
+ String aStatement;
+ aStatement.AssignAscii("SELECT DISTINCT ");
+
+ aStatement += quoteName(aQuote, aName);
+ if (aFieldName.len() && aName != aFieldName)
+ {
+ aStatement.AppendAscii(" AS ");
+ aStatement += quoteName(aQuote, aFieldName);
+ }
+
+ aStatement.AppendAscii(" FROM ");
+ aStatement += quoteTableName(xMeta, aTableName);
+
+ xStatement = xConnection->createStatement();
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xStatementProps(xStatement, ::com::sun::star::uno::UNO_QUERY);
+ xStatementProps->setPropertyValue(FM_PROP_ESCAPE_PROCESSING, ::com::sun::star::uno::makeAny((sal_Bool)sal_True));
+
+ xListCursor = xStatement->executeQuery(aStatement);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(xListCursor, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xFields(xSupplyCols->getColumns(), ::com::sun::star::uno::UNO_QUERY);
+ ::cppu::extractInterface(xDataField, xFields->getByIndex(0));
+ if (!xDataField.is())
+ return;
+ }
+ catch(...)
+ {
+ ::utl::disposeComponent(xStatement);
+ return;
+ }
+
+ sal_Int16 i = 0;
+ vector< ::rtl::OUString > aStringList;
+ aStringList.reserve(16);
+ ::rtl::OUString aStr;
+ Date aNullDate = m_rColumn.GetParent().getNullDate();
+ sal_Int32 nFormatKey = m_rColumn.GetKey();
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > xFormatter = m_rColumn.GetParent().getNumberFormatter();
+ sal_Int16 nKeyType = ::utl::getNumberFormatType(xFormatter->getNumberFormatsSupplier()->getNumberFormats(), nFormatKey);
+
+ while (!xListCursor->isAfterLast() && i++ < SHRT_MAX) // max anzahl eintraege
+ {
+ aStr = ::utl::DBTypeConversion::getValue(xDataField,
+ xFormatter,
+ aNullDate,
+ nFormatKey,
+ nKeyType);
+ aStringList.push_back(aStr);
+ xListCursor->next();
+ }
+
+ // filling the entries for the combobox
+ for (vector< ::rtl::OUString >::const_iterator iter = aStringList.begin();
+ iter != aStringList.end(); ++iter)
+ ((ComboBox*)m_pWindow)->InsertEntry(*iter, LISTBOX_APPEND);
+ }
+ }
+}
+
+//------------------------------------------------------------------
+IMPL_LINK( DbFilterField, OnClick, void*, EMPTYARG )
+{
+ TriState eState = ((DbCheckBoxCtrl*)m_pWindow)->GetBox().GetState();
+ XubString aText;
+
+ switch (eState)
+ {
+ case STATE_CHECK:
+ aText.AssignAscii("1");
+ break;
+ case STATE_NOCHECK:
+ aText.AssignAscii("0");
+ break;
+ case STATE_DONTKNOW:
+ aText = String();
+ break;
+ }
+
+ if (m_aText != aText)
+ {
+ m_aText = aText;
+ m_aCommitLink.Call(this);
+ }
+ return 1;
+}
+
+/*************************************************************************/
+TYPEINIT0(FmXGridCell);
+
+
+DBG_NAME(FmXGridCell);
+//-----------------------------------------------------------------------------
+FmXGridCell::FmXGridCell(DbGridColumn* pColumn, DbCellControl* pControl)
+ :OComponentHelper(m_aMutex)
+ ,m_pColumn(pColumn)
+ ,m_pCellControl(pControl)
+{
+ DBG_CTOR(FmXGridCell,NULL);
+
+}
+
+//-----------------------------------------------------------------------------
+FmXGridCell::~FmXGridCell()
+{
+ if (!OComponentHelper::rBHelper.bDisposed)
+ {
+ acquire();
+ dispose();
+ }
+
+ DBG_DTOR(FmXGridCell,NULL);
+}
+
+// XTypeProvider
+//------------------------------------------------------------------
+::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL FmXGridCell::getImplementationId() throw(::com::sun::star::uno::RuntimeException)
+{
+ return form::OImplementationIds::getImplementationId(getTypes());
+}
+
+// OComponentHelper
+//-----------------------------------------------------------------------------
+void FmXGridCell::disposing()
+{
+ OComponentHelper::disposing();
+ m_pColumn = NULL;
+ DELETEZ(m_pCellControl);
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXGridCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn = OComponentHelper::queryAggregation(_rType);
+ if (!aReturn.hasValue())
+ aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::awt::XControl* >(this),
+ static_cast< ::com::sun::star::form::XBoundControl* >(this)
+ );
+
+ return aReturn;
+}
+
+// ::com::sun::star::awt::XControl
+//-----------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > FmXGridCell::getContext() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ();
+}
+
+//-----------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > FmXGridCell::getModel()
+{
+ return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > (m_pColumn->getModel(), ::com::sun::star::uno::UNO_QUERY);
+}
+
+// ::com::sun::star::form::XBoundControl
+//------------------------------------------------------------------
+sal_Bool FmXGridCell::getLock() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return m_pColumn->isLocked();
+}
+
+//------------------------------------------------------------------
+void FmXGridCell::setLock(sal_Bool _bLock) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if (getLock() == _bLock)
+ return;
+ else
+ {
+ ::osl::MutexGuard aGuard(m_aMutex);
+ m_pColumn->setLock(_bLock);
+ }
+}
+
+/*************************************************************************/
+TYPEINIT1(FmXDataCell, FmXGridCell);
+//------------------------------------------------------------------------------
+void FmXDataCell::Paint(OutputDevice& rDev, const Rectangle& rRect,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ m_pCellControl->Paint(rDev,
+ rRect,
+ _xVariant,
+ xFormatter);
+}
+
+//------------------------------------------------------------------------------
+void FmXDataCell::UpdateFromColumn()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > xField(m_pColumn->GetCurrentFieldValue());
+ if (xField.is())
+ m_pCellControl->UpdateFromField(xField, m_pColumn->GetParent().getNumberFormatter());
+}
+
+/*************************************************************************/
+TYPEINIT1(FmXTextCell, FmXDataCell);
+
+//------------------------------------------------------------------------------
+void FmXTextCell::Paint(OutputDevice& rDev,
+ const Rectangle& rRect,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+{
+ sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_VCENTER;
+ if (!((Window&)rDev).IsEnabled())
+ nStyle |= TEXT_DRAW_DISABLE;
+
+ switch (m_pColumn->GetAlignment())
+ {
+ case ::com::sun::star::awt::TextAlign::RIGHT:
+ nStyle |= TEXT_DRAW_RIGHT;
+ break;
+ case ::com::sun::star::awt::TextAlign::CENTER:
+ nStyle |= TEXT_DRAW_CENTER;
+ break;
+ default:
+ nStyle |= TEXT_DRAW_LEFT;
+ }
+
+ Color* pColor = NULL;
+ XubString aText = GetText(_xVariant, xFormatter, &pColor);
+ if (pColor != NULL)
+ {
+ Font aFont = rDev.GetFont();
+ Font aOldFont = aFont;
+ aFont.SetColor(*pColor);
+ rDev.SetFont(aFont);
+ rDev.DrawText(rRect, aText, nStyle);
+ rDev.SetFont(aOldFont);
+ }
+ else
+ rDev.DrawText(rRect, aText, nStyle);
+}
+
+
+/*************************************************************************/
+SMART_UNO_IMPLEMENTATION(FmXEditCell, FmXTextCell);
+
+
+DBG_NAME(FmXEditCell);
+//------------------------------------------------------------------------------
+FmXEditCell::FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl)
+ :FmXTextCell(pColumn, pControl)
+ ,m_aTextListeners(m_aMutex)
+ ,m_pEdit((Edit*)pControl->GetControl())
+{
+ DBG_CTOR(FmXEditCell,NULL);
+
+ // all Textfields must be drived from an Edit-Class, as we use a
+ // direct cast on Edit
+ m_pEdit->SetModifyHdl( LINK( this, FmXEditCell, OnTextChanged ) );
+}
+
+//------------------------------------------------------------------
+FmXEditCell::~FmXEditCell()
+{
+ if (!OComponentHelper::rBHelper.bDisposed)
+ {
+ acquire();
+ dispose();
+ }
+
+ DBG_DTOR(FmXEditCell,NULL);
+}
+
+// OComponentHelper
+//-----------------------------------------------------------------------------
+void FmXEditCell::disposing()
+{
+ ::com::sun::star::lang::EventObject aEvt(*this);
+ m_aTextListeners.disposeAndClear(aEvt);
+
+ m_pEdit->SetModifyHdl( Link() );
+ m_pEdit = NULL;
+
+ FmXDataCell::disposing();
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXEditCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn = FmXDataCell::queryAggregation(_rType);
+ if (!aReturn.hasValue())
+ aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::awt::XTextComponent* >(this)
+ );
+ return aReturn;
+}
+
+//-------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXEditCell::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
+
+ sal_Int32 nLen = aTypes.getLength();
+ aTypes.realloc(nLen + 2);
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >* >(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >* >(NULL));
+
+ return aTypes;
+}
+
+// ::com::sun::star::awt::XTextComponent
+//------------------------------------------------------------------------------
+void SAL_CALL FmXEditCell::addTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aTextListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXEditCell::removeTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aTextListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXEditCell::setText( const ::rtl::OUString& aText ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pEdit)
+ {
+ m_pEdit->SetText(aText);
+
+ // In JAVA wird auch ein textChanged ausgeloest, in VCL nicht.
+ // ::com::sun::star::awt::Toolkit soll JAVA-komform sein...
+ OnTextChanged( NULL );
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXEditCell::insertText(const ::com::sun::star::awt::Selection& rSel, const ::rtl::OUString& aText) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pEdit)
+ {
+ m_pEdit->SetSelection( Selection(rSel.Min, rSel.Max) );
+ m_pEdit->ReplaceSelected( aText );
+ }
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXEditCell::getText() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ::rtl::OUString aText;
+ if (m_pEdit)
+ {
+ if (m_pEdit->IsVisible() && m_pColumn->GetParent().getDisplaySynchron())
+ // if the display isn't sync with the cursor we can't ask the edit field
+ aText = m_pEdit->GetText();
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > xField(m_pColumn->GetCurrentFieldValue());
+ if (xField.is())
+ aText = GetText(xField, m_pColumn->GetParent().getNumberFormatter());
+ }
+ }
+ return aText;
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXEditCell::getSelectedText( void ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ::rtl::OUString aText;
+ if (m_pEdit)
+ aText = m_pEdit->GetSelected();
+ return aText;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXEditCell::setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pEdit)
+ m_pEdit->SetSelection( Selection(aSelection.Min, aSelection.Max) );
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::awt::Selection SAL_CALL FmXEditCell::getSelection( void ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ Selection aSel;
+ if (m_pEdit)
+ aSel = m_pEdit->GetSelection();
+
+ return ::com::sun::star::awt::Selection(aSel.Min(), aSel.Max());
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXEditCell::isEditable( void ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ return ( m_pEdit && !m_pEdit->IsReadOnly() && m_pEdit->IsEnabled() ) ? sal_True : sal_False;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXEditCell::setEditable( sal_Bool bEditable ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pEdit)
+ m_pEdit->SetReadOnly( !bEditable );
+}
+
+//------------------------------------------------------------------------------
+sal_Int16 SAL_CALL FmXEditCell::getMaxTextLen() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ return m_pEdit ? m_pEdit->GetMaxTextLen() : 0;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXEditCell::setMaxTextLen( sal_Int16 nLen ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pEdit)
+ m_pEdit->SetMaxTextLen( nLen );
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK( FmXEditCell, OnTextChanged, void*, EMPTYARG )
+{
+ if (m_pEdit)
+ {
+ ::cppu::OInterfaceIteratorHelper aIt( m_aTextListeners );
+ ::com::sun::star::awt::TextEvent aEvt;
+ aEvt.Source = *this;
+ while( aIt.hasMoreElements() )
+ ((::com::sun::star::awt::XTextListener *)aIt.next())->textChanged( aEvt );
+ }
+ return 1;
+}
+
+/*************************************************************************/
+SMART_UNO_IMPLEMENTATION(FmXCheckBoxCell, FmXDataCell);
+
+
+DBG_NAME(FmXCheckBoxCell);
+//------------------------------------------------------------------------------
+FmXCheckBoxCell::FmXCheckBoxCell(DbGridColumn* pColumn, DbCellControl* pControl)
+ :FmXDataCell(pColumn, pControl)
+ ,m_aItemListeners(m_aMutex)
+ ,m_pBox(&((DbCheckBoxCtrl*)pControl->GetControl())->GetBox())
+{
+ DBG_CTOR(FmXCheckBoxCell,NULL);
+
+ ((DbCheckBoxCtrl*)pControl->GetControl())->SetClickHdl( LINK( this, FmXCheckBoxCell, OnClick ) );
+}
+
+//------------------------------------------------------------------
+FmXCheckBoxCell::~FmXCheckBoxCell()
+{
+ if (!OComponentHelper::rBHelper.bDisposed)
+ {
+ acquire();
+ dispose();
+ }
+
+ DBG_DTOR(FmXCheckBoxCell,NULL);
+}
+
+// OComponentHelper
+//-----------------------------------------------------------------------------
+void FmXCheckBoxCell::disposing()
+{
+ ::com::sun::star::lang::EventObject aEvt(*this);
+ m_aItemListeners.disposeAndClear(aEvt);
+
+ ((DbCheckBoxCtrl*)m_pCellControl->GetControl())->SetClickHdl(Link());
+ m_pBox = NULL;
+
+ FmXDataCell::disposing();
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXCheckBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn = FmXDataCell::queryAggregation(_rType);
+ if (!aReturn.hasValue())
+ aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::awt::XCheckBox* >(this)
+ );
+ return aReturn;
+}
+
+//-------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXCheckBoxCell::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
+
+ sal_Int32 nLen = aTypes.getLength();
+ aTypes.realloc(nLen + 2);
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >* >(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XCheckBox >* >(NULL));
+
+ return aTypes;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aItemListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aItemListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& rLabel ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (m_pBox)
+ {
+ UpdateFromColumn();
+ m_pBox->SetText( rLabel );
+ }
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::setState( short n ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pBox)
+ {
+ UpdateFromColumn();
+ m_pBox->SetState( (TriState)n );
+ }
+}
+
+//------------------------------------------------------------------
+short SAL_CALL FmXCheckBoxCell::getState() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pBox)
+ {
+ UpdateFromColumn();
+ return m_pBox->GetState();
+ }
+ return STATE_DONTKNOW;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXCheckBoxCell::enableTriState( sal_Bool b ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pBox)
+ m_pBox->EnableTriState( b );
+}
+
+//------------------------------------------------------------------
+IMPL_LINK( FmXCheckBoxCell, OnClick, void*, EMPTYARG )
+{
+ if (m_pBox)
+ {
+ ::cppu::OInterfaceIteratorHelper aIt( m_aItemListeners );
+
+ ::com::sun::star::awt::ItemEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Highlighted = sal_False;
+ aEvent.Selected = m_pBox->GetState();
+
+ while( aIt.hasMoreElements() )
+ ((::com::sun::star::awt::XItemListener *)aIt.next())->itemStateChanged( aEvent );
+ }
+ return 1;
+}
+
+/*************************************************************************/
+SMART_UNO_IMPLEMENTATION(FmXListBoxCell, FmXTextCell);
+
+
+DBG_NAME(FmXListBoxCell);
+//------------------------------------------------------------------------------
+FmXListBoxCell::FmXListBoxCell(DbGridColumn* pColumn, DbCellControl* pControl)
+ :FmXTextCell(pColumn, pControl)
+ ,m_aActionListeners(m_aMutex)
+ ,m_aItemListeners(m_aMutex)
+ ,m_pBox((ListBox*)pControl->GetControl())
+{
+ DBG_CTOR(FmXListBoxCell,NULL);
+
+ m_pBox->SetSelectHdl( LINK( this, FmXListBoxCell, OnSelect ) );
+ m_pBox->SetDoubleClickHdl( LINK( this, FmXListBoxCell, OnDoubleClick ) );
+}
+
+//------------------------------------------------------------------
+FmXListBoxCell::~FmXListBoxCell()
+{
+ if (!OComponentHelper::rBHelper.bDisposed)
+ {
+ acquire();
+ dispose();
+ }
+
+ DBG_DTOR(FmXListBoxCell,NULL);
+}
+
+// OComponentHelper
+//-----------------------------------------------------------------------------
+void FmXListBoxCell::disposing()
+{
+ ::com::sun::star::lang::EventObject aEvt(*this);
+ m_aItemListeners.disposeAndClear(aEvt);
+ m_aActionListeners.disposeAndClear(aEvt);
+
+ m_pBox->SetSelectHdl( Link() );
+ m_pBox->SetDoubleClickHdl( Link() );
+ m_pBox = NULL;
+
+ FmXTextCell::disposing();
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXListBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn = FmXTextCell::queryAggregation(_rType);
+ if (!aReturn.hasValue())
+ aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::awt::XListBox* >(this)
+ );
+ return aReturn;
+}
+
+//-------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXListBoxCell::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
+
+ sal_Int32 nLen = aTypes.getLength();
+ aTypes.realloc(nLen + 2);
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >* >(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XListBox >* >(NULL));
+
+ return aTypes;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::addItemListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aItemListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::removeItemListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aItemListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::addActionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aActionListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::removeActionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aActionListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::addItem(const ::rtl::OUString& aItem, sal_Int16 nPos) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (m_pBox)
+ m_pBox->InsertEntry( aItem, nPos );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::addItems(const ::utl::StringSequence& aItems, sal_Int16 nPos) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (m_pBox)
+ {
+ sal_uInt16 nP = nPos;
+ for ( sal_uInt16 n = 0; n < aItems.getLength(); n++ )
+ {
+ m_pBox->InsertEntry( aItems.getConstArray()[n], nP );
+ if ( nPos < 0xFFFF ) // Nicht wenn 0xFFFF, weil LIST_APPEND
+ nP++;
+ }
+ }
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::removeItems(sal_Int16 nPos, sal_Int16 nCount) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pBox )
+ {
+ for ( sal_uInt16 n = nCount; n; )
+ m_pBox->RemoveEntry( nPos + (--n) );
+ }
+}
+
+//------------------------------------------------------------------
+sal_Int16 SAL_CALL FmXListBoxCell::getItemCount() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return m_pBox ? m_pBox->GetEntryCount() : 0;
+}
+
+//------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXListBoxCell::getItem(sal_Int16 nPos) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ XubString aItem;
+ if (m_pBox)
+ aItem = m_pBox->GetEntry( nPos );
+ return aItem;
+}
+//------------------------------------------------------------------
+::utl::StringSequence SAL_CALL FmXListBoxCell::getItems() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ::utl::StringSequence aSeq;
+ if (m_pBox)
+ {
+ sal_uInt16 nEntries = m_pBox ->GetEntryCount();
+ aSeq = ::utl::StringSequence( nEntries );
+ for ( sal_uInt16 n = nEntries; n; )
+ {
+ --n;
+ aSeq.getArray()[n] = m_pBox ->GetEntry( n );
+ }
+ }
+ return aSeq;
+}
+
+//------------------------------------------------------------------
+sal_Int16 SAL_CALL FmXListBoxCell::getSelectedItemPos() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (m_pBox)
+ {
+ UpdateFromColumn();
+ return m_pBox->GetSelectEntryPos();
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL FmXListBoxCell::getSelectedItemsPos() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ::com::sun::star::uno::Sequence<sal_Int16> aSeq;
+
+ if (m_pBox)
+ {
+ UpdateFromColumn();
+ sal_uInt16 nSelEntries = m_pBox->GetSelectEntryCount();
+ aSeq = ::com::sun::star::uno::Sequence<sal_Int16>( nSelEntries );
+ for ( sal_uInt16 n = 0; n < nSelEntries; n++ )
+ aSeq.getArray()[n] = m_pBox->GetSelectEntryPos( n );
+ }
+ return aSeq;
+}
+//------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXListBoxCell::getSelectedItem() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ XubString aItem;
+ if (m_pBox)
+ {
+ UpdateFromColumn();
+ aItem = m_pBox->GetSelectEntry();
+ }
+
+ return aItem;
+}
+
+//------------------------------------------------------------------
+::utl::StringSequence SAL_CALL FmXListBoxCell::getSelectedItems() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ::utl::StringSequence aSeq;
+
+ if (m_pBox)
+ {
+ UpdateFromColumn();
+ sal_uInt16 nSelEntries = m_pBox->GetSelectEntryCount();
+ aSeq = ::utl::StringSequence( nSelEntries );
+ for ( sal_uInt16 n = 0; n < nSelEntries; n++ )
+ aSeq.getArray()[n] = m_pBox->GetSelectEntry( n );
+ }
+ return aSeq;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::selectItemPos(sal_Int16 nPos, sal_Bool bSelect) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pBox)
+ m_pBox->SelectEntryPos( nPos, bSelect );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::selectItemsPos(const ::com::sun::star::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pBox)
+ {
+ for ( sal_uInt16 n = (sal_uInt16)aPositions.getLength(); n; )
+ m_pBox->SelectEntryPos( (sal_uInt16) aPositions.getConstArray()[--n], bSelect );
+ }
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::selectItem(const ::rtl::OUString& aItem, sal_Bool bSelect) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pBox)
+ m_pBox->SelectEntry( aItem, bSelect );
+}
+
+//------------------------------------------------------------------
+sal_Bool SAL_CALL FmXListBoxCell::isMutipleMode() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ sal_Bool bMulti = sal_False;
+ if (m_pBox)
+ bMulti = m_pBox->IsMultiSelectionEnabled();
+ return bMulti;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::setMultipleMode(sal_Bool bMulti) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pBox)
+ m_pBox->EnableMultiSelection( bMulti );
+}
+
+//------------------------------------------------------------------
+sal_Int16 SAL_CALL FmXListBoxCell::getDropDownLineCount() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ sal_Int16 nLines = 0;
+ if (m_pBox)
+ nLines = m_pBox->GetDropDownLineCount();
+
+ return nLines;
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::setDropDownLineCount(sal_Int16 nLines) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pBox)
+ m_pBox->SetDropDownLineCount( nLines );
+}
+
+//------------------------------------------------------------------
+void SAL_CALL FmXListBoxCell::makeVisible(sal_Int16 nEntry) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if (m_pBox)
+ m_pBox->SetTopEntry( nEntry );
+}
+
+//------------------------------------------------------------------
+IMPL_LINK(FmXListBoxCell, OnSelect, void*, EMPTYARG )
+{
+ if (m_pBox)
+ {
+ OnDoubleClick( NULL );
+
+ ::com::sun::star::awt::ItemEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.Highlighted = sal_False;
+
+ // Bei Mehrfachselektion 0xFFFF, sonst die ID
+ aEvent.Selected = (m_pBox->GetSelectEntryCount() == 1 )
+ ? m_pBox->GetSelectEntryPos() : 0xFFFF;
+
+ ::cppu::OInterfaceIteratorHelper aIt( m_aItemListeners );
+
+ while( aIt.hasMoreElements() )
+ ((::com::sun::star::awt::XItemListener *)aIt.next())->itemStateChanged( aEvent );
+ }
+ return 1;
+}
+
+
+//------------------------------------------------------------------
+IMPL_LINK( FmXListBoxCell, OnDoubleClick, void*, EMPTYARG )
+{
+ if (m_pBox)
+ {
+ ::cppu::OInterfaceIteratorHelper aIt( m_aActionListeners );
+
+ ::com::sun::star::awt::ActionEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.ActionCommand = m_pBox->GetSelectEntry();
+
+ while( aIt.hasMoreElements() )
+ ((::com::sun::star::awt::XActionListener *)aIt.next())->actionPerformed( aEvent );
+ }
+ return 1;
+}
+
+
+/*************************************************************************/
+TYPEINIT1(FmXFilterCell, FmXGridCell);
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > FmXFilterCell_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
+{
+ return *new FmXFilterCell();
+}
+
+DBG_NAME(FmXFilterCell);
+//------------------------------------------------------------------------------
+FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl)
+ :FmXGridCell(pColumn, pControl)
+ ,m_aTextListeners(m_aMutex)
+{
+ DBG_CTOR(FmXFilterCell,NULL);
+
+ ((DbFilterField*)m_pCellControl)->SetCommitHdl(LINK( this, FmXFilterCell, OnCommit ) );
+}
+
+//------------------------------------------------------------------
+FmXFilterCell::~FmXFilterCell()
+{
+ if (!OComponentHelper::rBHelper.bDisposed)
+ {
+ acquire();
+ dispose();
+ }
+
+ DBG_DTOR(FmXFilterCell,NULL);
+}
+
+// XUnoTunnel
+//------------------------------------------------------------------------------
+sal_Int64 SAL_CALL FmXFilterCell::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException)
+{
+ sal_Int64 nReturn(0);
+
+ if ( (_rIdentifier.getLength() == 16)
+ && (0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), _rIdentifier.getConstArray(), 16 ))
+ )
+ {
+ nReturn = reinterpret_cast<sal_Int64>(this);
+ }
+
+ return nReturn;
+}
+
+//------------------------------------------------------------------------------
+const ::com::sun::star::uno::Sequence<sal_Int8>& FmXFilterCell::getUnoTunnelId()
+{
+ static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0;
+ if( !pSeq )
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if( !pSeq )
+ {
+ static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
+
+//------------------------------------------------------------------------------
+FmXFilterCell* FmXFilterCell::getImplementation(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxObject)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel(
+ _rxObject, ::com::sun::star::uno::UNO_QUERY);
+ if (xTunnel.is())
+ return reinterpret_cast<FmXFilterCell*>(xTunnel->getSomething(getUnoTunnelId()));
+ return NULL;
+}
+
+//------------------------------------------------------------------------------
+void FmXFilterCell::Paint(OutputDevice& rDev,
+ const Rectangle& rRect)
+{
+ m_pCellControl->Paint(rDev, rRect);
+}
+
+// OComponentHelper
+//-----------------------------------------------------------------------------
+void FmXFilterCell::disposing()
+{
+ ::com::sun::star::lang::EventObject aEvt(*this);
+ m_aTextListeners.disposeAndClear(aEvt);
+
+ ((DbFilterField*)m_pCellControl)->SetCommitHdl(Link());
+
+ FmXGridCell::disposing();
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXFilterCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aReturn = FmXGridCell::queryAggregation(_rType);
+ if (!aReturn.hasValue())
+ aReturn = ::cppu::queryInterface(_rType,
+ static_cast< ::com::sun::star::awt::XTextComponent* >(this)
+ );
+ return aReturn;
+}
+
+//-------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXFilterCell::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes();
+
+ sal_Int32 nLen = aTypes.getLength();
+ aTypes.realloc(nLen + 2);
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >* >(NULL));
+ aTypes.getArray()[nLen++] = ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >* >(NULL));
+
+ return aTypes;
+}
+
+// ::com::sun::star::awt::XTextComponent
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFilterCell::addTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aTextListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFilterCell::removeTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aTextListeners.removeInterface( l );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFilterCell::setText( const ::rtl::OUString& aText ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ ((DbFilterField*)m_pCellControl)->SetText(aText);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFilterCell::insertText( const ::com::sun::star::awt::Selection& rSel, const ::rtl::OUString& aText ) throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXFilterCell::getText() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return ((DbFilterField*)m_pCellControl)->GetText();
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXFilterCell::getSelectedText( void ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return getText();
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFilterCell::setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::awt::Selection SAL_CALL FmXFilterCell::getSelection( void ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return ::com::sun::star::awt::Selection();
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXFilterCell::isEditable( void ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFilterCell::setEditable( sal_Bool bEditable ) throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+//------------------------------------------------------------------------------
+sal_Int16 SAL_CALL FmXFilterCell::getMaxTextLen() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFilterCell::setMaxTextLen( sal_Int16 nLen ) throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK( FmXFilterCell, OnCommit, void*, EMPTYARG )
+{
+ ::cppu::OInterfaceIteratorHelper aIt( m_aTextListeners );
+ ::com::sun::star::awt::TextEvent aEvt;
+ aEvt.Source = *this;
+ while( aIt.hasMoreElements() )
+ ((::com::sun::star::awt::XTextListener *)aIt.next())->textChanged( aEvt );
+ return 1;
+}
+
diff --git a/svx/source/fmcomp/gridcols.cxx b/svx/source/fmcomp/gridcols.cxx
new file mode 100644
index 0000000000..59c17eae35
--- /dev/null
+++ b/svx/source/fmcomp/gridcols.cxx
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * $RCSfile: gridcols.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_GRIDCOLS_HXX
+#include "gridcols.hxx"
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _UTL_TYPES_HXX_
+#include <unotools/types.hxx>
+#endif
+
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+
+IMPLEMENT_CONSTASCII_USTRING(FM_COL_TEXTFIELD, "TextField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COL_COMBOBOX, "ComboBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_COL_CHECKBOX, "CheckBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_COL_TIMEFIELD, "TimeField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COL_DATEFIELD, "DateField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COL_NUMERICFIELD, "NumericField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COL_CURRENCYFIELD, "CurrencyField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COL_PATTERNFIELD, "PatternField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COL_LISTBOX, "ListBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_COL_FORMATTEDFIELD, "FormattedField");
+
+//------------------------------------------------------------------------------
+const ::utl::StringSequence& getColumnTypes()
+{
+ static ::utl::StringSequence aColumnTypes(10);
+ if (!aColumnTypes.getConstArray()[0].getLength())
+ {
+ ::rtl::OUString* pNames = aColumnTypes.getArray();
+ pNames[TYPE_CHECKBOX] = FM_COL_CHECKBOX;
+ pNames[TYPE_COMBOBOX] = FM_COL_COMBOBOX;
+ pNames[TYPE_CURRENCYFIELD] = FM_COL_CURRENCYFIELD;
+ pNames[TYPE_DATEFIELD] = FM_COL_DATEFIELD;
+ pNames[TYPE_FORMATTEDFIELD] = FM_COL_FORMATTEDFIELD;
+ pNames[TYPE_LISTBOX] = FM_COL_LISTBOX;
+ pNames[TYPE_NUMERICFIELD] = FM_COL_NUMERICFIELD;
+ pNames[TYPE_PATTERNFIELD] = FM_COL_PATTERNFIELD;
+ pNames[TYPE_TEXTFIELD] = FM_COL_TEXTFIELD;
+ pNames[TYPE_TIMEFIELD] = FM_COL_TIMEFIELD;
+ }
+ return aColumnTypes;
+}
+
+//------------------------------------------------------------------
+static int
+#if defined( WNT )
+ __cdecl
+#endif
+#if defined( ICC ) && defined( OS2 )
+_Optlink
+#endif
+ NameCompare(const void* pFirst, const void* pSecond)
+{
+ return ((::rtl::OUString*)pFirst)->compareTo(*(::rtl::OUString*)pSecond);
+}
+
+//------------------------------------------------------------------------------
+sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName)
+{
+ const ::rtl::OUString aModelPrefix = ::rtl::OUString::createFromAscii("com.sun.star.form.component.");
+ const ::rtl::OUString aCompatibleModelPrefix = ::rtl::OUString::createFromAscii("stardiv.one.form.component.");
+
+ sal_Int32 nTypeId = -1;
+ if (aModelName == FM_COMPONENT_EDIT)
+ nTypeId = TYPE_TEXTFIELD;
+ else
+ {
+ sal_Int32 nPrefixPos = aModelName.search(aModelPrefix);
+ sal_Int32 nCompatiblePrefixPos = aModelName.search(aCompatibleModelPrefix);
+ DBG_ASSERT( (nPrefixPos != -1) || (nCompatiblePrefixPos != -1),
+ "::getColumnTypeByModelName() : wrong servivce !");
+
+ ::rtl::OUString aColumnType = (nPrefixPos != -1)
+ ? aModelName.copy(aModelPrefix.len())
+ : aModelName.copy(aCompatibleModelPrefix.len());
+
+ const ::utl::StringSequence& rColumnTypes = getColumnTypes();
+#if SUPD>583
+ nTypeId = findPos(aColumnType, rColumnTypes);
+#else
+ const ::rtl::OUString* pStrList = rColumnTypes.getConstArray();
+ ::rtl::OUString* pResult = (::rtl::OUString*) bsearch(&aColumnType, (void*)pStrList, rColumnTypes.getLength(), sizeof(::rtl::OUString),
+ &NameCompare);
+
+ nTypeId = pResult ? (pResult - pStrList) : -1;
+#endif
+ }
+ return nTypeId;
+}
+
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
new file mode 100644
index 0000000000..dfab337f4f
--- /dev/null
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -0,0 +1,3592 @@
+/*************************************************************************
+ *
+ * $RCSfile: gridctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_FMHELP_HRC
+#include "fmhelp.hrc"
+#endif
+
+#ifndef _SVX_GRIDCTRL_HXX
+#include "gridctrl.hxx"
+#endif
+#ifndef _SVX_GRIDCELL_HXX
+#include "gridcell.hxx"
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+
+#ifndef _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif
+
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+
+#ifndef _COM_SUN_STAR_SDB_XRESULTSETACCESS_HPP_
+#include <com/sun/star/sdb/XResultSetAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSETUPDATE_HPP_
+#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_PRIVILEGE_HPP_
+#include <com/sun/star/sdbcx/Privilege.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
+#include <com/sun/star/container/XChild.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XCLONEABLE_HPP_
+#include <com/sun/star/util/XCloneable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+
+#ifndef _TOOLS_RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+
+#ifndef _SV_SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+
+#ifndef _SV_SOUND_HXX //autogen
+#include <vcl/sound.hxx>
+#endif
+
+#ifndef _SV_DRAG_HXX //autogen
+#include <vcl/drag.hxx>
+#endif
+
+#ifndef _SV_MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+
+#ifndef _SV_CLIP_HXX //autogen
+#include <vcl/clip.hxx>
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+
+#define CURSORPOSITION_UNKNOWN -2
+
+#define HANDLE_ID 0
+
+String INVALIDTEXT = String::CreateFromAscii("###");
+String OBJECTTEXT = String::CreateFromAscii("<OBJECT>");
+
+#ifndef _UTL_STLTYPES_HXX_
+#include <unotools/stl_types.hxx>
+#endif
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+#ifndef _UNOTOOLS_DATETIME_HXX_
+#include <unotools/datetime.hxx>
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+
+#ifndef _TRACE_HXX_
+#include "trace.hxx"
+#endif
+
+#define ROWSTATUS(row) !row.Is() ? "NULL" : row->GetStatus() == GRS_CLEAN ? "CLEAN" : row->GetStatus() == GRS_MODIFIED ? "MODIFIED" : row->GetStatus() == GRS_DELETED ? "DELETED" : "INVALID"
+
+//==============================================================================
+
+class GridFieldValueListener;
+DECLARE_STL_MAP(sal_uInt16, GridFieldValueListener*, ::std::less<sal_uInt16>, ColumnFieldValueListeners);
+
+//==============================================================================
+
+DBG_NAME(GridFieldValueListener);
+class GridFieldValueListener : protected ::utl::OPropertyChangeListener
+{
+ osl::Mutex m_aMutex;
+ DbGridControl& m_rParent;
+ ::utl::OPropertyChangeMultiplexer* m_pRealListener;
+ sal_uInt16 m_nId;
+ sal_Int16 m_nSuspended;
+ sal_Bool m_bDisposed : 1;
+
+public:
+ GridFieldValueListener(DbGridControl& _rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xField, sal_uInt16 _nId);
+ virtual ~GridFieldValueListener();
+
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException );
+
+ void suspend() { ++m_nSuspended; }
+ void resume() { --m_nSuspended; }
+
+ void dispose();
+};
+//------------------------------------------------------------------------------
+GridFieldValueListener::GridFieldValueListener(DbGridControl& _rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rField, sal_uInt16 _nId)
+ :OPropertyChangeListener(m_aMutex)
+ ,m_rParent(_rParent)
+ ,m_nId(_nId)
+ ,m_pRealListener(NULL)
+ ,m_bDisposed(sal_False)
+ ,m_nSuspended(0)
+{
+ DBG_CTOR(GridFieldValueListener, NULL);
+ if (_rField.is())
+ {
+ m_pRealListener = new ::utl::OPropertyChangeMultiplexer(this, _rField);
+ m_pRealListener->addProperty(FM_PROP_VALUE);
+ m_pRealListener->acquire();
+ }
+}
+
+//------------------------------------------------------------------------------
+GridFieldValueListener::~GridFieldValueListener()
+{
+ DBG_DTOR(GridFieldValueListener, NULL);
+ dispose();
+}
+
+//------------------------------------------------------------------------------
+void GridFieldValueListener::_propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& _evt) throw( ::com::sun::star::uno::RuntimeException )
+{
+ DBG_ASSERT(m_nSuspended>=0, "GridFieldValueListener::_propertyChanged : resume > suspend !");
+ if (m_nSuspended <= 0)
+ m_rParent.FieldValueChanged(m_nId, _evt);
+}
+
+//------------------------------------------------------------------------------
+void GridFieldValueListener::dispose()
+{
+ if (m_bDisposed)
+ {
+ DBG_ASSERT(m_pRealListener == NULL, "GridFieldValueListener::dispose : inconsistent !");
+ return;
+ }
+
+ if (m_pRealListener)
+ {
+ m_pRealListener->dispose();
+ m_pRealListener->release();
+ m_pRealListener = NULL;
+ }
+
+ m_bDisposed = sal_True;
+ m_rParent.FieldListenerDisposing(m_nId);
+}
+
+//==============================================================================
+
+class DisposeListenerGridBridge : public FmXDisposeListener
+{
+ osl::Mutex m_aMutex;
+ DbGridControl& m_rParent;
+ FmXDisposeMultiplexer* m_pRealListener;
+
+public:
+ DisposeListenerGridBridge( DbGridControl& _rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxObject, sal_Int16 _rId = -1);
+ virtual ~DisposeListenerGridBridge();
+
+ virtual void disposing(const ::com::sun::star::lang::EventObject& _rEvent, sal_Int16 _nId) throw( ::com::sun::star::uno::RuntimeException ) { m_rParent.disposing(_nId, _rEvent); }
+};
+
+//==============================================================================
+
+
+DBG_NAME(DisposeListenerGridBridge);
+//------------------------------------------------------------------------------
+DisposeListenerGridBridge::DisposeListenerGridBridge(DbGridControl& _rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxObject, sal_Int16 _rId)
+ :FmXDisposeListener(m_aMutex)
+ ,m_rParent(_rParent)
+ ,m_pRealListener(NULL)
+{
+ DBG_CTOR(DisposeListenerGridBridge,NULL);
+
+ if (_rxObject.is())
+ {
+ m_pRealListener = new FmXDisposeMultiplexer(this, _rxObject, _rId);
+ m_pRealListener->acquire();
+ }
+}
+
+//------------------------------------------------------------------------------
+DisposeListenerGridBridge::~DisposeListenerGridBridge()
+{
+ if (m_pRealListener)
+ {
+ m_pRealListener->dispose();
+ m_pRealListener->release();
+ m_pRealListener = NULL;
+ }
+
+ DBG_DTOR(DisposeListenerGridBridge,NULL);
+}
+
+//==============================================================================
+
+static sal_uInt16 ControlMap[] =
+ {
+ DbGridControl::NavigationBar::RECORD_TEXT,
+ DbGridControl::NavigationBar::RECORD_ABSOLUTE,
+ DbGridControl::NavigationBar::RECORD_OF,
+ DbGridControl::NavigationBar::RECORD_COUNT,
+ DbGridControl::NavigationBar::RECORD_FIRST,
+ DbGridControl::NavigationBar::RECORD_NEXT,
+ DbGridControl::NavigationBar::RECORD_PREV,
+ DbGridControl::NavigationBar::RECORD_LAST,
+ DbGridControl::NavigationBar::RECORD_NEW,
+ 0
+ };
+
+//------------------------------------------------------------------------------
+sal_Bool CompareBookmark(const ::com::sun::star::uno::Any& aLeft, const ::com::sun::star::uno::Any& aRight)
+{
+ return ::utl::compare(aLeft, aRight);
+}
+
+//==============================================================================
+class FmXGridSourcePropListener : public ::utl::OPropertyChangeListener
+{
+ DbGridControl* m_pParent;
+
+ // a DbGridControl has no mutex, so we use our own as the base class expects one
+ osl::Mutex m_aMutex;
+ sal_Int16 m_nSuspended;
+
+public:
+ FmXGridSourcePropListener(DbGridControl* _pParent);
+
+ void suspend() { ++m_nSuspended; }
+ void resume() { --m_nSuspended; }
+
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException );
+};
+
+//------------------------------------------------------------------------------
+FmXGridSourcePropListener::FmXGridSourcePropListener(DbGridControl* _pParent)
+ :OPropertyChangeListener(m_aMutex)
+ ,m_pParent(_pParent)
+ ,m_nSuspended(0)
+{
+ DBG_ASSERT(m_pParent, "FmXGridSourcePropListener::FmXGridSourcePropListener : invalid parent !");
+}
+
+//------------------------------------------------------------------------------
+void FmXGridSourcePropListener::_propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException )
+{
+ DBG_ASSERT(m_nSuspended>=0, "FmXGridSourcePropListener::_propertyChanged : resume > suspend !");
+ if (m_nSuspended <= 0)
+ m_pParent->DataSourcePropertyChanged(evt);
+}
+
+//==============================================================================
+//------------------------------------------------------------------------------
+DbGridControl::NavigationBar::AbsolutePos::AbsolutePos(Window* pParent, WinBits nStyle)
+ :NumericField(pParent, nStyle)
+{
+ SetMin(1);
+ SetFirst(1);
+ SetSpinSize(1);
+
+ International rInt = GetInternational();
+ rInt.EnableNumThousandSep(sal_False);
+ SetInternational(rInt);
+ SetDecimalDigits(0);
+ SetStrictFormat(sal_True);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::NavigationBar::AbsolutePos::KeyInput(const KeyEvent& rEvt)
+{
+ if (rEvt.GetKeyCode() == KEY_RETURN && GetText().Len())
+ {
+ sal_Int32 nRecord = GetValue();
+ if (nRecord < GetMin() || nRecord > GetMax())
+ return;
+ else
+ ((NavigationBar*)GetParent())->PositionDataSource(nRecord);
+ }
+ else if (rEvt.GetKeyCode() == KEY_TAB)
+ GetParent()->GetParent()->GrabFocus();
+ else
+ NumericField::KeyInput(rEvt);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::NavigationBar::AbsolutePos::LoseFocus()
+{
+ NumericField::LoseFocus();
+ sal_Int32 nRecord = GetValue();
+ if (nRecord < GetMin() || nRecord > GetMax())
+ return;
+ else
+ {
+ ((NavigationBar*)GetParent())->PositionDataSource(nRecord);
+ ((NavigationBar*)GetParent())->InvalidateState(NavigationBar::RECORD_ABSOLUTE);
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::NavigationBar::PositionDataSource(sal_Int32 nRecord)
+{
+ if (m_bPositioning)
+ return;
+ // the MoveToPosition may cause a LoseFocus which would lead to a second MoveToPosition, so protect agains this
+ // recursion
+ // 68167 - 13.08.99 - FS
+ m_bPositioning = sal_True;
+ ((DbGridControl*)GetParent())->MoveToPosition(nRecord - 1);
+ m_bPositioning = sal_False;
+}
+
+//------------------------------------------------------------------------------
+DbGridControl::NavigationBar::NavigationBar(Window* pParent, WinBits nStyle)
+ :Control(pParent, nStyle)
+ ,m_aRecordText(this)
+ ,m_aAbsolute(this)
+ ,m_aRecordOf(this)
+ ,m_aRecordCount(this, WinBits(WB_CENTER))
+ ,m_aFirstBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS)
+ ,m_aPrevBtn(this, WB_REPEAT|WB_RECTSTYLE|WB_NOPOINTERFOCUS)
+ ,m_aNextBtn(this, WB_REPEAT|WB_RECTSTYLE|WB_NOPOINTERFOCUS)
+ ,m_aLastBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS)
+ ,m_aNewBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS)
+ ,m_nDefaultWidth(0)
+ ,m_nCurrentPos(-1)
+ ,m_bPositioning(sal_False)
+{
+ m_aFirstBtn.SetSymbol(SYMBOL_FIRST);
+ m_aPrevBtn.SetSymbol(SYMBOL_PREV);
+ m_aNextBtn.SetSymbol(SYMBOL_NEXT);
+ m_aLastBtn.SetSymbol(SYMBOL_LAST);
+ m_aNewBtn.SetImage(((DbGridControl*)pParent)->GetImage(DbBrowseBox::NEW));
+
+ m_aFirstBtn.SetHelpId(HID_GRID_TRAVEL_FIRST);
+ m_aPrevBtn.SetHelpId(HID_GRID_TRAVEL_PREV);
+ m_aNextBtn.SetHelpId(HID_GRID_TRAVEL_NEXT);
+ m_aLastBtn.SetHelpId(HID_GRID_TRAVEL_LAST);
+ m_aNewBtn.SetHelpId(HID_GRID_TRAVEL_NEW);
+ m_aAbsolute.SetHelpId(HID_GRID_TRAVEL_ABSOLUTE);
+ m_aRecordCount.SetHelpId(HID_GRID_NUMBEROFRECORDS);
+
+ // Handler fuer Buttons einrichten
+ m_aFirstBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
+ m_aPrevBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
+ m_aNextBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
+ m_aLastBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
+ m_aNewBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
+
+ m_aRecordText.SetText(XubString(SVX_RES(RID_STR_REC_TEXT)));
+ m_aRecordOf.SetText(XubString(SVX_RES(RID_STR_REC_FROM_TEXT)));
+ m_aRecordCount.SetText('?');
+
+ m_nDefaultWidth = ArrangeControls();
+
+ m_aFirstBtn.Disable();
+ m_aPrevBtn.Disable();
+ m_aNextBtn.Disable();
+ m_aLastBtn.Disable();
+ m_aNewBtn.Disable();
+ m_aRecordText.Disable();
+ m_aRecordOf.Disable();
+ m_aRecordCount.Disable();
+ m_aAbsolute.Disable();
+
+ AllSettings aSettings = m_aNextBtn.GetSettings();
+ MouseSettings aMouseSettings = aSettings.GetMouseSettings();
+ aMouseSettings.SetButtonRepeat(aMouseSettings.GetButtonRepeat() / 4);
+ aSettings.SetMouseSettings(aMouseSettings);
+ m_aNextBtn.SetSettings(aSettings, sal_True);
+ m_aPrevBtn.SetSettings(aSettings, sal_True);
+
+ m_aFirstBtn.Show();
+ m_aPrevBtn.Show();
+ m_aNextBtn.Show();
+ m_aLastBtn.Show();
+ m_aNewBtn.Show();
+ m_aRecordText.Show();
+ m_aRecordOf.Show();
+ m_aRecordCount.Show();
+ m_aAbsolute.Show();
+}
+
+//------------------------------------------------------------------------------
+sal_uInt16 DbGridControl::NavigationBar::ArrangeControls()
+{
+ // Positionierung der Controls
+ // Basisgroessen ermitteln
+ sal_uInt16 nX = 0;
+ sal_uInt16 nY = 0;
+ Rectangle aRect(((DbGridControl*)GetParent())->GetControlArea());
+ const long nH = aRect.GetSize().Height() - 1;
+ Size aBorder = LogicToPixel(Size(3, 3),MAP_APPFONT);
+ aBorder = Size(CalcZoom(aBorder.Width()), CalcZoom(aBorder.Height()));
+
+ // Controls Groessen und Positionen setzen
+ //
+ XubString aText = m_aRecordText.GetText();
+ long nTextWidth = m_aRecordText.GetTextWidth(aText);
+ m_aRecordText.SetPosPixel(Point(nX,nY+1) );
+ m_aRecordText.SetSizePixel(Size(nTextWidth,nH));
+ nX += (sal_uInt16)(nTextWidth + aBorder.Width());
+
+ m_aAbsolute.SetPosPixel( Point(nX,nY));
+ m_aAbsolute.SetSizePixel( Size(3*nH,aRect.GetSize().Height()) ); // Heuristik XXXXXXX
+ nX += (sal_uInt16)((3*nH) + aBorder.Width());
+
+ aText = m_aRecordOf.GetText();
+ nTextWidth = m_aRecordOf.GetTextWidth(aText);
+ m_aRecordOf.SetPosPixel(Point(nX,nY+1) );
+ m_aRecordOf.SetSizePixel(Size(nTextWidth,nH));
+ nX += (sal_uInt16)(nTextWidth + aBorder.Width());
+
+ nTextWidth = m_aRecordCount.GetTextWidth( String::CreateFromAscii("0000000 (00000)") );
+ m_aRecordCount.SetPosPixel(Point(nX,nY+1) );
+ m_aRecordCount.SetSizePixel(Size(nTextWidth,nH));
+ nX += (sal_uInt16)(nTextWidth + aBorder.Width());
+
+ m_aFirstBtn.SetPosPixel( Point(nX,nY) );
+ m_aFirstBtn.SetSizePixel( Size(nH,nH) );
+ nX += (sal_uInt16)nH;
+
+ m_aPrevBtn.SetPosPixel( Point(nX,nY) );
+ m_aPrevBtn.SetSizePixel( Size(nH,nH) );
+ nX += (sal_uInt16)nH;
+
+ m_aNextBtn.SetPosPixel( Point(nX,nY) );
+ m_aNextBtn.SetSizePixel( Size(nH,nH) );
+ nX += (sal_uInt16)nH;
+
+ m_aLastBtn.SetPosPixel( Point(nX,nY) );
+ m_aLastBtn.SetSizePixel( Size(nH,nH) );
+ nX += (sal_uInt16)nH;
+
+ m_aNewBtn.SetPosPixel( Point(nX,nY) );
+ m_aNewBtn.SetSizePixel( Size(nH,nH) );
+ nX += (sal_uInt16)(nH + aBorder.Width());
+
+ // Ist der Font des Edits groesser als das Feld?
+ Font aOutputFont = m_aAbsolute.GetFont();
+ if (aOutputFont.GetSize().Height() > nH)
+ {
+ Font aApplFont = System::GetStandardFont(STDFONT_SWISS);
+ aApplFont.SetSize(Size(0, nH-2));
+ m_aAbsolute.SetFont(aApplFont);
+
+ aApplFont.SetTransparent( sal_True );
+ m_aRecordText.SetFont( aApplFont );
+ m_aRecordOf.SetFont( aApplFont );
+ m_aRecordCount.SetFont( aApplFont );
+ }
+ return nX;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(DbGridControl::NavigationBar, OnClick, Button *, pButton )
+{
+ DbGridControl* pParent = (DbGridControl*)GetParent();
+
+ if (pParent->m_aMasterSlotExecutor.IsSet())
+ {
+ long lResult = 0;
+ if (pButton == &m_aFirstBtn)
+ lResult = pParent->m_aMasterSlotExecutor.Call((void*)RECORD_FIRST);
+ else if( pButton == &m_aPrevBtn )
+ lResult = pParent->m_aMasterSlotExecutor.Call((void*)RECORD_PREV);
+ else if( pButton == &m_aNextBtn )
+ lResult = pParent->m_aMasterSlotExecutor.Call((void*)RECORD_NEXT);
+ else if( pButton == &m_aLastBtn )
+ lResult = pParent->m_aMasterSlotExecutor.Call((void*)RECORD_LAST);
+ else if( pButton == &m_aNewBtn )
+ lResult = pParent->m_aMasterSlotExecutor.Call((void*)RECORD_NEW);
+
+ if (lResult)
+ // the link already handled it
+ return 0;
+ }
+
+ if (pButton == &m_aFirstBtn)
+ pParent->MoveToFirst();
+ else if( pButton == &m_aPrevBtn )
+ pParent->MoveToPrev();
+ else if( pButton == &m_aNextBtn )
+ pParent->MoveToNext();
+ else if( pButton == &m_aLastBtn )
+ pParent->MoveToLast();
+ else if( pButton == &m_aNewBtn )
+ pParent->AppendNew();
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::NavigationBar::InvalidateAll(sal_uInt32 nCurrentPos, sal_Bool bAll)
+{
+ if (m_nCurrentPos != nCurrentPos || nCurrentPos < 0 || bAll)
+ {
+ DbGridControl* pParent = (DbGridControl*)GetParent();
+ // Wann muß alles invalidiert werden
+ if (bAll || m_nCurrentPos <= 0 ||
+ nCurrentPos <= 0 ||
+ m_nCurrentPos >= (pParent->GetRowCount() - 2) ||
+ nCurrentPos >= (pParent->GetRowCount() - 2))
+ {
+ m_nCurrentPos = nCurrentPos;
+ int i = 0;
+ while (ControlMap[i])
+ SetState(ControlMap[i++]);
+ }
+ else // befindet sich in der Mitte
+ {
+ m_nCurrentPos = nCurrentPos;
+ SetState(NavigationBar::RECORD_COUNT);
+ SetState(NavigationBar::RECORD_ABSOLUTE);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::NavigationBar::GetState(sal_uInt16 nWhich) const
+{
+ DbGridControl* pParent = (DbGridControl*)GetParent();
+
+ if (!pParent->IsOpen() || pParent->IsDesignMode() || !pParent->IsEnabled()
+ || pParent->IsFilterMode() )
+ return sal_False;
+ else
+ {
+ // check if we have a master state provider
+ if (pParent->m_aMasterStateProvider.IsSet())
+ {
+ long nState = pParent->m_aMasterStateProvider.Call((void*)nWhich);
+ if (nState>=0)
+ return (nState>0);
+ }
+
+ sal_Bool bAvailable = sal_True;
+
+ switch (nWhich)
+ {
+ case NavigationBar::RECORD_FIRST:
+ case NavigationBar::RECORD_PREV:
+ bAvailable = m_nCurrentPos > 0;
+ break;
+ case NavigationBar::RECORD_NEXT:
+ bAvailable = m_nCurrentPos < (pParent->GetRowCount() - 1);
+ if (!bAvailable && pParent->GetOptions() & DbGridControl::OPT_INSERT)
+ bAvailable = (m_nCurrentPos == (pParent->GetRowCount() - 2)) && pParent->IsModified();
+ break;
+ case NavigationBar::RECORD_LAST:
+ if (pParent->GetOptions() & DbGridControl::OPT_INSERT)
+ bAvailable = pParent->IsCurrentAppending() ? pParent->GetRowCount() > 1 :
+ m_nCurrentPos != (pParent->GetRowCount() - 2);
+ else
+ bAvailable = m_nCurrentPos != (pParent->GetRowCount() - 1);
+ break;
+ case NavigationBar::RECORD_NEW:
+ bAvailable = (pParent->GetOptions() & DbGridControl::OPT_INSERT) && pParent->GetRowCount() && m_nCurrentPos < (pParent->GetRowCount() - 1);
+ break;
+ case NavigationBar::RECORD_ABSOLUTE:
+ bAvailable = pParent->GetRowCount() > 0;
+ break;
+ }
+ return bAvailable;
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::NavigationBar::SetState(sal_uInt16 nWhich)
+{
+ sal_Bool bAvailable = GetState(nWhich);
+ DbGridControl* pParent = (DbGridControl*)GetParent();
+ Window* pWnd = NULL;
+ switch (nWhich)
+ {
+ case NavigationBar::RECORD_FIRST:
+ pWnd = &m_aFirstBtn;
+ break;
+ case NavigationBar::RECORD_PREV:
+ pWnd = &m_aPrevBtn;
+ break;
+ case NavigationBar::RECORD_NEXT:
+ pWnd = &m_aNextBtn;
+ break;
+ case NavigationBar::RECORD_LAST:
+ pWnd = &m_aLastBtn;
+ break;
+ case NavigationBar::RECORD_NEW:
+ pWnd = &m_aNewBtn;
+ break;
+ case NavigationBar::RECORD_ABSOLUTE:
+ pWnd = &m_aAbsolute;
+ if (bAvailable)
+ {
+ if (pParent->m_nTotalCount >= 0)
+ {
+ if (pParent->IsCurrentAppending())
+ m_aAbsolute.SetMax(pParent->m_nTotalCount + 1);
+ else
+ m_aAbsolute.SetMax(pParent->m_nTotalCount);
+ }
+ else
+ m_aAbsolute.SetMax(LONG_MAX);
+
+ m_aAbsolute.SetValue(m_nCurrentPos + 1);
+ }
+ else
+ m_aAbsolute.SetText(String());
+ break;
+ case NavigationBar::RECORD_TEXT:
+ pWnd = &m_aRecordText;
+ break;
+ case NavigationBar::RECORD_OF:
+ pWnd = &m_aRecordOf;
+ break;
+ case NavigationBar::RECORD_COUNT:
+ {
+ pWnd = &m_aRecordCount;
+ String aText;
+ if (bAvailable)
+ {
+ if (pParent->GetOptions() & DbGridControl::OPT_INSERT)
+ {
+ if (pParent->IsCurrentAppending() && !pParent->IsModified())
+ aText = String::CreateFromInt32(pParent->GetRowCount());
+ else
+ aText = String::CreateFromInt32(pParent->GetRowCount() - 1);
+ }
+ else
+ aText = String::CreateFromInt32(pParent->GetRowCount());
+ }
+ else
+ aText = String();
+
+ // add the number of selected rows, if applicable
+ if (pParent->GetSelectRowCount())
+ {
+ String aExtendedInfo(aText);
+ aExtendedInfo.AppendAscii(" (");
+ aExtendedInfo += String::CreateFromInt32(pParent->GetSelectRowCount());
+ aExtendedInfo += ')';
+ pWnd->SetText(aExtendedInfo);
+ }
+ else
+ pWnd->SetText(aText);
+
+ {
+ vos::OGuard aPaintSafety(Application::GetSolarMutex());
+ // we want to update only the window, not our parent, so lock the latter
+ // (In fact, if we are in DbGridControl::RecalcRows, perhaps as a result of an setDataSource or
+ // a VisibleRowsChanged, the grid will be frozen and a SeekRow triggered implicitly by the update
+ // of pWnd will fail.)
+ // (the SetUpdateMode call goes to the data window : it's sufficient to prevent SeekRow's, but it
+ // avoids the Invalidate which would be triggered by BrowseBox::SetUpdateMode (which lead to massive
+ // flicker when scrolling))
+ // FS - 06.10.99
+
+ // don't use SetUpdateMode in those situations as all necessary paints get lost DG
+ // so update only if necessary (DG)
+ if (pParent->IsPaintEnabled())
+ {
+ pWnd->Update();
+ pWnd->Flush();
+ }
+ }
+ pParent->SetRealRowCount(aText);
+ } break;
+ }
+ DBG_ASSERT(pWnd, "kein Fenster");
+ if (pWnd && (pWnd->IsEnabled() != bAvailable))
+ // this "pWnd->IsEnabled() != bAvailable" is a little hack : Window::Enable always generates a user
+ // event (ImplGenerateMouseMove) even if nothing happened. This may lead to some unwanted effects, so we
+ // do this check.
+ // For further explanation see Bug 69900.
+ // FS - 18.11.99
+ pWnd->Enable(bAvailable);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::NavigationBar::Resize()
+{
+ Control::Resize();
+ ArrangeControls();
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::NavigationBar::Paint(const Rectangle& rRect)
+{
+ Control::Paint(rRect);
+ Point aAbsolutePos = m_aAbsolute.GetPosPixel();
+ Size aAbsoluteSize = m_aAbsolute.GetSizePixel();
+
+ DrawLine(Point(aAbsolutePos.X() - 1, 0 ),
+ Point(aAbsolutePos.X() - 1, aAbsolutePos.Y() + aAbsoluteSize.Height()));
+
+ DrawLine(Point(aAbsolutePos.X() + aAbsoluteSize.Width() + 1, 0 ),
+ Point(aAbsolutePos.X() + aAbsoluteSize.Width() + 1, aAbsolutePos.Y() + aAbsoluteSize.Height()));
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::NavigationBar::StateChanged( StateChangedType nType )
+{
+ Control::StateChanged(nType);
+ if (STATE_CHANGE_ZOOM == nType)
+ {
+ Fraction aZoom = GetZoom();
+
+ m_aRecordText.SetZoom(aZoom);
+ m_aAbsolute.SetZoom(aZoom);
+ m_aRecordOf.SetZoom(aZoom);
+ m_aRecordCount.SetZoom(aZoom);
+ m_aFirstBtn.SetZoom(aZoom);
+ m_aPrevBtn.SetZoom(aZoom);
+ m_aNextBtn.SetZoom(aZoom);
+ m_aLastBtn.SetZoom(aZoom);
+ m_aNewBtn.SetZoom(aZoom);
+ // not all of these controls need to know the new zoom, but to be sure ...
+
+ // rearrange the controls
+ m_nDefaultWidth = ArrangeControls();
+ }
+}
+
+//------------------------------------------------------------------------------
+DbGridRow::DbGridRow(CursorWrapper* pCur, sal_Bool bPaintCursor)
+ :m_bIsNew(sal_False)
+{
+
+ if (pCur && pCur->Is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xColumns(pCur->getColumns(), ::com::sun::star::uno::UNO_QUERY);
+ DataColumn* pColumn;
+ for (sal_Int32 i = 0; i < xColumns->getCount(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xColSet;
+ ::cppu::extractInterface(xColSet, xColumns->getByIndex(i));
+ pColumn = new DataColumn(xColSet);
+ m_aVariants.Insert(pColumn, LIST_APPEND);
+ }
+
+ if (pCur->rowDeleted())
+ m_eStatus = GRS_DELETED;
+ else
+ {
+ if (bPaintCursor)
+ m_eStatus = (pCur->isAfterLast() || pCur->isBeforeFirst()) ? GRS_INVALID : GRS_CLEAN;
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(*pCur,::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ m_bIsNew = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW));
+ if (!m_bIsNew && (pCur->isAfterLast() || pCur->isBeforeFirst()))
+ m_eStatus = GRS_INVALID;
+ else if (::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISMODIFIED)))
+ m_eStatus = GRS_MODIFIED;
+ else
+ m_eStatus = GRS_CLEAN;
+ }
+ else
+ m_eStatus = GRS_INVALID;
+ }
+ }
+ if (IsValid())
+ m_aBookmark = pCur->getBookmark();
+ else
+ m_aBookmark = ::com::sun::star::uno::Any();
+ }
+ else
+ m_eStatus = GRS_INVALID;
+}
+
+//------------------------------------------------------------------------------
+DbGridRow::~DbGridRow()
+{
+ sal_uInt32 nCount = m_aVariants.Count();
+ for (sal_uInt32 i = 0; i < nCount; i++)
+ delete m_aVariants.GetObject(i);
+}
+
+//------------------------------------------------------------------------------
+void DbGridRow::SetState(CursorWrapper* pCur, sal_Bool bPaintCursor)
+{
+ if (pCur && pCur->Is())
+ {
+ if (pCur->rowDeleted())
+ {
+ m_eStatus = GRS_DELETED;
+ m_bIsNew = sal_False;
+ }
+ else
+ {
+ m_eStatus = GRS_CLEAN;
+ if (!bPaintCursor)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(*pCur, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xSet.is(), "DbGridRow::SetState : invalid cursor !");
+
+ if (::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISMODIFIED)))
+ m_eStatus = GRS_MODIFIED;
+ m_bIsNew = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW));
+ }
+ else
+ m_bIsNew = sal_False;
+ }
+
+ if (IsValid())
+ m_aBookmark = pCur->getBookmark();
+ else
+ m_aBookmark = ::com::sun::star::uno::Any();
+ }
+ else
+ {
+ m_aBookmark = ::com::sun::star::uno::Any();
+ m_eStatus = GRS_INVALID;
+ m_bIsNew = sal_False;
+ }
+}
+
+DBG_NAME(DbGridControl);
+//------------------------------------------------------------------------------
+DbGridControl::DbGridControl(
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxFactory,
+ Window* pParent,
+ WinBits nBits)
+ :DbBrowseBox(pParent, DBBF_NONE, nBits,
+ BROWSER_KEEPSELECTION |
+ BROWSER_COLUMNSELECTION |
+ BROWSER_MULTISELECTION |
+ BROWSER_TRACKING_TIPS |
+ BROWSER_HLINESFULL |
+ BROWSER_VLINESFULL |
+ BROWSER_AUTO_VSCROLL)
+#pragma warning (disable : 4355)
+ ,m_aBar(this)
+#pragma warning (default : 4355)
+ ,m_bSynchDisplay(sal_True)
+ ,m_bForceROController(sal_False)
+ ,m_bHandle(sal_False)
+ ,m_aNullDate(STANDARD_DATE)
+ ,m_nAsynAdjustEvent(0)
+ ,m_pDataSourcePropMultiplexer(NULL)
+ ,m_pDataSourcePropListener(NULL)
+ ,m_pFieldListeners(NULL)
+ ,m_pCursorDisposeListener(NULL)
+ ,m_bWantDestruction(sal_False)
+ ,m_bInAdjustDataSource(sal_False)
+ ,m_bPendingAdjustRows(sal_False)
+ ,m_xServiceFactory(_rxFactory)
+{
+ DBG_CTOR(DbGridControl,NULL);
+
+ Construct();
+}
+
+//------------------------------------------------------------------------------
+DbGridControl::DbGridControl(
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxFactory,
+ Window* pParent,
+ const ResId& rId)
+ :DbBrowseBox(pParent, rId, DBBF_NONE,
+ BROWSER_KEEPSELECTION |
+ BROWSER_COLUMNSELECTION |
+ BROWSER_MULTISELECTION |
+ BROWSER_TRACKING_TIPS |
+ BROWSER_HLINESFULL |
+ BROWSER_VLINESFULL |
+ BROWSER_AUTO_VSCROLL)
+#pragma warning (disable : 4355)
+ ,m_aBar(this)
+#pragma warning (default : 4355)
+ ,m_bSynchDisplay(sal_True)
+ ,m_bForceROController(sal_False)
+ ,m_bHandle(sal_False)
+ ,m_aNullDate(STANDARD_DATE)
+ ,m_pDataSourcePropMultiplexer(NULL)
+ ,m_pDataSourcePropListener(NULL)
+ ,m_pFieldListeners(NULL)
+ ,m_bWantDestruction(sal_False)
+ ,m_bInAdjustDataSource(sal_False)
+ ,m_bPendingAdjustRows(sal_False)
+ ,m_xServiceFactory(_rxFactory)
+{
+ DBG_CTOR(DbGridControl,NULL);
+
+ Construct();
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::Construct()
+{
+ m_nTotalCount = m_nSeekPos = m_nCurrentPos = -1;
+ m_bDesignMode = m_bUpdating = m_bRecordCountFinal = sal_False;
+ m_bFilterMode = sal_False;
+ m_nMode = BROWSER_KEEPSELECTION |
+ BROWSER_COLUMNSELECTION |
+ BROWSER_MULTISELECTION |
+ BROWSER_TRACKING_TIPS |
+ BROWSER_HLINESFULL |
+ BROWSER_VLINESFULL |
+ BROWSER_AUTO_VSCROLL |
+ BROWSER_HEADERBAR_NEW;
+
+ m_bNavigationBar = m_bMultiSelection = sal_True;
+ m_nOptions = OPT_READONLY;
+ m_nOptionMask = OPT_INSERT | OPT_UPDATE | OPT_DELETE;
+ m_nDeleteEvent = 0;
+ m_pSeekCursor = m_pDataCursor = NULL;
+ m_bHandle = sal_True;
+
+ m_aBar.Show();
+ EnableDrop(sal_True);
+ ImplInitSettings(sal_True,sal_True,sal_True);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::InsertHandleColumn()
+{
+ // Handle Column einfuegen
+ // Da die BrowseBox ohne handleColums Paintprobleme hat
+ // wird diese versteckt
+ if (HasHandle())
+ BrowseBox::InsertHandleColumn(GetDefaultColumnWidth(String()), sal_True);
+ else
+ BrowseBox::InsertHandleColumn(0, sal_False);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::Init()
+{
+ BrowserHeader* pHeader = CreateHeaderBar(this);
+ pHeader->SetMouseTransparent(sal_False);
+
+ SetHeaderBar(pHeader);
+ SetMode(m_nMode);
+ SetCursorColor(Color(0xFF, 0, 0));
+
+ InsertHandleColumn();
+}
+
+//------------------------------------------------------------------------------
+DbGridControl::~DbGridControl()
+{
+ RemoveColumns();
+
+ {
+ m_bWantDestruction = sal_True;
+ osl::MutexGuard aGuard(m_aDestructionSafety);
+ if (m_pFieldListeners)
+ DisconnectFromFields();
+ if (m_pCursorDisposeListener)
+ {
+ delete m_pCursorDisposeListener;
+ m_pCursorDisposeListener = NULL;
+ }
+ }
+
+ if (m_nDeleteEvent)
+ Application::RemoveUserEvent(m_nDeleteEvent);
+
+ if (m_pDataSourcePropMultiplexer)
+ {
+ m_pDataSourcePropMultiplexer->dispose();
+ m_pDataSourcePropMultiplexer->release(); // this should delete the multiplexer
+ delete m_pDataSourcePropListener;
+ m_pDataSourcePropMultiplexer = NULL;
+ m_pDataSourcePropListener = NULL;
+ }
+
+ delete m_pDataCursor;
+ delete m_pSeekCursor;
+
+ DBG_DTOR(DbGridControl,NULL);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::StateChanged( StateChangedType nType )
+{
+ DbBrowseBox::StateChanged( nType );
+ switch (nType)
+ {
+ case STATE_CHANGE_ZOOM:
+ {
+ ImplInitSettings( sal_True, sal_False, sal_False );
+ // forward the zoom factor to the navigation bar
+ if (m_bNavigationBar)
+ m_aBar.SetZoom(GetZoom());
+
+ // and give it a chance to rearrange
+ Point aPoint = GetControlArea().TopLeft();
+ sal_uInt16 nX = (sal_uInt16)aPoint.X();
+ ArrangeControls(nX, (sal_uInt16)aPoint.Y());
+ ReserveControlArea((sal_uInt16)nX);
+ }
+ break;
+ case STATE_CHANGE_CONTROLFONT:
+ ImplInitSettings( sal_True, sal_False, sal_False );
+ Invalidate();
+ break;
+ case STATE_CHANGE_CONTROLFOREGROUND:
+ ImplInitSettings( sal_False, sal_True, sal_False );
+ Invalidate();
+ break;
+ case STATE_CHANGE_CONTROLBACKGROUND:
+ ImplInitSettings( sal_False, sal_False, sal_True );
+ Invalidate();
+ break;
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ DbBrowseBox::DataChanged( rDCEvt );
+ if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS ) &&
+ (rDCEvt.GetFlags() & SETTINGS_STYLE) )
+ {
+ ImplInitSettings( sal_True, sal_True, sal_True );
+ Invalidate();
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::Select()
+{
+ DbBrowseBox::Select();
+
+ // as the selected rows may have changed, udate the according display in our navigation bar
+ m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
+{
+ for (sal_uInt32 i = 0; i < m_aColumns.Count(); i++)
+ {
+ DbGridColumn* pCol = m_aColumns.GetObject(i);
+ if (pCol)
+ pCol->ImplInitSettings(&GetDataWindow(), bFont, bForeground, bBackground);
+ }
+
+ if (bBackground)
+ {
+ if (IsControlBackground())
+ {
+ GetDataWindow().SetBackground(GetControlBackground());
+ GetDataWindow().SetControlBackground(GetControlBackground());
+ GetDataWindow().SetFillColor(GetControlBackground());
+ }
+ else
+ {
+ GetDataWindow().SetControlBackground();
+ GetDataWindow().SetFillColor(GetFillColor());
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::RemoveRows(sal_Bool bNewCursor)
+{
+ // Hat sich der DatenCursor verandert ?
+ if (!bNewCursor)
+ {
+ DELETEZ(m_pSeekCursor);
+ m_xPaintRow = m_xDataRow = m_xEmptyRow = m_xCurrentRow = m_xSeekRow = NULL;
+ m_nCurrentPos = m_nSeekPos = -1;
+ m_nOptions = OPT_READONLY;
+
+ RowRemoved(0, GetRowCount(), sal_False);
+ m_nTotalCount = -1;
+ }
+ else
+ {
+ RemoveRows();
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::RemoveRows()
+{
+ // alle Columns deinitialisieren
+ // existieren Spalten, dann alle Controller freigeben
+ for (sal_uInt32 i = 0; i < m_aColumns.Count(); i++)
+ m_aColumns.GetObject(i)->Clear();
+
+ DELETEZ(m_pSeekCursor);
+ DELETEZ(m_pDataCursor);
+
+ m_xPaintRow = m_xDataRow = m_xEmptyRow = m_xCurrentRow = m_xSeekRow = NULL;
+ m_nCurrentPos = m_nSeekPos = m_nTotalCount = -1;
+ m_nOptions = OPT_READONLY;
+
+ // Anzahl Saetze im Browser auf 0 zuruecksetzen
+ DbBrowseBox::RemoveRows();
+ m_aBar.InvalidateAll(m_nCurrentPos, sal_True);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY)
+{
+ // Positionierung der Controls
+ if (m_bNavigationBar)
+ {
+ nX = m_aBar.GetDefaultWidth();
+ Rectangle aRect(GetControlArea());
+ m_aBar.SetPosSizePixel(Point(0,nY + 1), Size(nX, aRect.GetSize().Height() - 1));
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::EnableHandle(sal_Bool bEnable)
+{
+ if (m_bHandle == bEnable)
+ return;
+
+ // HandleColumn wird nur ausgeblendet,
+ // da es sonst etliche Probleme mit dem Zeichnen gibt
+ RemoveColumn(0);
+ m_bHandle = bEnable;
+ InsertHandleColumn();
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::EnableNavigationBar(sal_Bool bEnable)
+{
+ if (m_bNavigationBar == bEnable)
+ return;
+
+ if (bEnable)
+ {
+ m_aBar.Show();
+ m_aBar.Enable();
+ m_aBar.InvalidateAll(m_nCurrentPos, sal_True);
+
+ m_nMode &= ~BROWSER_AUTO_HSCROLL;
+ SetMode(m_nMode);
+
+ // liefert die Groeße der Reserved ControlArea
+ Point aPoint = GetControlArea().TopLeft();
+ sal_uInt16 nX = (sal_uInt16)aPoint.X();
+
+ m_bNavigationBar = bEnable;
+ ArrangeControls(nX, (sal_uInt16)aPoint.Y());
+ ReserveControlArea((sal_uInt16)nX);
+ }
+ else
+ {
+ m_aBar.Hide();
+ m_aBar.Disable();
+
+ m_nMode |= BROWSER_AUTO_HSCROLL;
+ SetMode(m_nMode);
+
+ ReserveControlArea();
+ m_bNavigationBar = bEnable;
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_uInt16 DbGridControl::SetOptions(sal_uInt16 nOpt)
+{
+ DBG_ASSERT(!m_xCurrentRow || !m_xCurrentRow->IsModified(),
+ "DbGridControl::SetOptions : please do not call when editing a record (things are much easier this way ;) !");
+
+ // for the next setDataSource (which is triggered by a refresh, for instance)
+ m_nOptionMask = nOpt;
+
+ // normalize the new options
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xDataSourceSet(*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xDataSourceSet.is())
+ {
+ // feststellen welche Updatemöglichkeiten bestehen
+ sal_Int32 nPrivileges;
+ xDataSourceSet->getPropertyValue(FM_PROP_PRIVILEGES) >>= nPrivileges;
+ if ((nPrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) == 0)
+ nOpt &= ~OPT_INSERT;
+ if ((nPrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) == 0)
+ nOpt &= ~OPT_UPDATE;
+ if ((nPrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) == 0)
+ nOpt &= ~OPT_DELETE;
+ }
+ else
+ nOpt = OPT_READONLY;
+
+ // need to do something after that ?
+ if (nOpt == m_nOptions)
+ return m_nOptions;
+
+ // the 'update' option only affects our BrowserMode (with or w/o focus rect)
+ BrowserMode nNewMode = m_nMode;
+ if ((m_nMode & BROWSER_CURSOR_WO_FOCUS) == 0)
+ {
+ if (nOpt & OPT_UPDATE)
+ nNewMode |= BROWSER_HIDECURSOR;
+ else
+ nNewMode &= ~BROWSER_HIDECURSOR;
+ }
+ else
+ nNewMode &= ~BROWSER_HIDECURSOR;
+ // should not be neccessary if EnablePermanentCursor is used to change the cursor behaviour, but to be sure ...
+
+ if (nNewMode != m_nMode)
+ {
+ SetMode(nNewMode);
+ m_nMode = nNewMode;
+ }
+
+ // _after_ setting the mode because this results in an ActivateCell
+ DeactivateCell();
+
+ sal_Bool bInsertChanged = (nOpt & OPT_INSERT) != (m_nOptions & OPT_INSERT);
+ m_nOptions = nOpt;
+ // we need to set this before the code below because it indirectly uses m_nOptions
+
+ // the 'insert' option affects our empty row
+ if (bInsertChanged)
+ if (m_nOptions & OPT_INSERT)
+ { // the insert option is to be set
+ m_xEmptyRow = new DbGridRow();
+ RowInserted(GetRowCount(), 1, sal_True);
+ }
+ else
+ { // the insert option is to be reset
+ m_xEmptyRow = NULL;
+ if ((GetCurRow() == GetRowCount() - 1) && (GetCurRow() > 0))
+ GoToRowColumnId(GetCurRow() - 1, GetCurColumnId());
+ RowRemoved(GetRowCount(), 1, sal_True);
+ }
+
+ // the 'delete' options has no immediate consequences
+
+ ActivateCell();
+ Invalidate();
+ return m_nOptions;
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::EnablePermanentCursor(sal_Bool bEnable)
+{
+ if (IsPermanentCursorEnabled() == bEnable)
+ return;
+
+ if (bEnable)
+ {
+ m_nMode &= ~BROWSER_HIDECURSOR; // without this BROWSER_CURSOR_WO_FOCUS won't have any affect
+ m_nMode |= BROWSER_CURSOR_WO_FOCUS;
+ }
+ else
+ {
+ if (m_nOptions & OPT_UPDATE)
+ m_nMode |= BROWSER_HIDECURSOR; // no cursor at all
+ else
+ m_nMode &= ~BROWSER_HIDECURSOR; // at least the "non-permanent" cursor
+
+ m_nMode &= ~BROWSER_CURSOR_WO_FOCUS;
+ }
+ SetMode(m_nMode);
+
+ sal_Bool bWasEditing = IsEditing();
+ DeactivateCell();
+ if (bWasEditing)
+ ActivateCell();
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::IsPermanentCursorEnabled() const
+{
+ return ((m_nMode & BROWSER_CURSOR_WO_FOCUS) != 0) && ((m_nMode & BROWSER_HIDECURSOR) == 0);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::SetMultiSelection(sal_Bool bMulti)
+{
+ m_bMultiSelection = bMulti;
+ if (m_bMultiSelection)
+ m_nMode |= BROWSER_MULTISELECTION;
+ else
+ m_nMode &= ~BROWSER_MULTISELECTION;
+
+ SetMode(m_nMode);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::setDataSource(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _xCursor, sal_uInt16 nOpts)
+{
+ if (!_xCursor.is() && !m_pDataCursor)
+ return;
+
+ if (m_pDataSourcePropMultiplexer)
+ {
+ m_pDataSourcePropMultiplexer->dispose();
+ m_pDataSourcePropMultiplexer->release(); // this should delete the multiplexer
+ delete m_pDataSourcePropListener;
+ m_pDataSourcePropMultiplexer = NULL;
+ m_pDataSourcePropListener = NULL;
+ }
+
+ // is the new cursor valid ?
+ // the cursor is only valid if it contains some columns
+ // if there is no cursor or the cursor is not valid we have to clean up an leave
+ if (!_xCursor.is() || !::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > (_xCursor, ::com::sun::star::uno::UNO_QUERY)->getColumns()->hasElements())
+ {
+ if (IsEditing())
+ DeactivateCell();
+ RemoveRows();
+ return;
+ }
+
+ // Hat sich der DatenCursor verandert ?
+ sal_uInt16 nCurPos = GetColumnPos(GetCurColumnId());
+
+ SetUpdateMode(sal_False);
+ RemoveRows();
+ DisconnectFromFields();
+
+ DELETEZ(m_pCursorDisposeListener);
+
+ {
+ ::osl::MutexGuard aGuard(m_aAdjustSafety);
+ if (m_nAsynAdjustEvent)
+ {
+ // the adjust was thought to work with the old cursor which we don't have anymore
+ RemoveUserEvent(m_nAsynAdjustEvent);
+ m_nAsynAdjustEvent = 0;
+ }
+ }
+
+ // get a new formatter and data cursor
+ m_xFormatter = NULL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = ::utl::getNumberFormats(::utl::getConnection(_xCursor), sal_True);
+ if (xSupplier.is() && m_xServiceFactory.is())
+ {
+ m_xFormatter = ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >(
+ m_xServiceFactory->createInstance(FM_NUMBER_FORMATTER),
+ ::com::sun::star::uno::UNO_QUERY);
+ if (m_xFormatter.is())
+ {
+ m_xFormatter->attachNumberFormatsSupplier(xSupplier);
+
+ // retrieve the datebase of the Numberformatter
+ try
+ {
+ ::com::sun::star::util::Date aUnoDate;
+ xSupplier->getNumberFormatSettings()->getPropertyValue(rtl::OUString::createFromAscii("NullDate")) >>= aUnoDate;
+ ::utl::typeConvert(aUnoDate, m_aNullDate);
+ }
+ catch(...)
+ {
+ }
+ }
+ }
+ m_pDataCursor = new CursorWrapper(_xCursor);
+
+ // now create a cursor for painting rows
+ // we need that cursor only if we are not in insert only mode
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xClone;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XResultSetAccess > xAccess(_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ try
+ {
+ xClone = xAccess.is() ? xAccess->createResultSet() : ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > ();
+ }
+ catch(...)
+ {
+ }
+ if (xClone.is())
+ m_pSeekCursor = new CursorWrapper(xClone);
+
+ // property listening on the data source
+ // (Normally one class would be sufficient : the multiplexer which could forward the property change to us.
+ // But for that we would have been derived from ::utl::OPropertyChangeListener, which isn't exported.
+ // So we introduce a second class, which is a ::utl::OPropertyChangeListener (in the implementation file we know this class)
+ // and forwards the property changes to a our special method "DataSourcePropertyChanged".)
+ if (m_pDataCursor)
+ {
+ m_pDataSourcePropListener = new FmXGridSourcePropListener(this);
+ m_pDataSourcePropMultiplexer = new ::utl::OPropertyChangeMultiplexer(m_pDataSourcePropListener, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY));
+ m_pDataSourcePropMultiplexer->acquire();
+ m_pDataSourcePropMultiplexer->addProperty(FM_PROP_ISMODIFIED);
+ m_pDataSourcePropMultiplexer->addProperty(FM_PROP_ISNEW);
+ }
+
+ BrowserMode nOldMode = m_nMode;
+ if (m_pSeekCursor)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ // feststellen welche Updatemöglichkeiten bestehen
+ sal_Int32 nPrivileges;
+ xSet->getPropertyValue(FM_PROP_PRIVILEGES) >>= nPrivileges;
+ // Insert Option should be set if insert only otherwise you won't see any rows
+ // and no insertion is possible
+ if ((m_nOptionMask & OPT_INSERT) && ((nPrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) == ::com::sun::star::sdbcx::Privilege::INSERT) && (nOpts & OPT_INSERT))
+ m_nOptions |= OPT_INSERT;
+ if ((m_nOptionMask & OPT_UPDATE) && ((nPrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) == ::com::sun::star::sdbcx::Privilege::UPDATE) && (nOpts & OPT_UPDATE))
+ m_nOptions |= OPT_UPDATE;
+ if ((m_nOptionMask & OPT_DELETE) && ((nPrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) == ::com::sun::star::sdbcx::Privilege::DELETE) && (nOpts & OPT_DELETE))
+ m_nOptions |= OPT_DELETE;
+ }
+
+ sal_Bool bPermanentCursor = IsPermanentCursorEnabled();
+ m_nMode = BROWSER_COLUMNSELECTION | BROWSER_KEEPSELECTION |
+ BROWSER_TRACKING_TIPS |
+ BROWSER_HLINESFULL | BROWSER_VLINESFULL | BROWSER_HEADERBAR_NEW |
+ BROWSER_AUTO_VSCROLL;
+ if (bPermanentCursor)
+ {
+ m_nMode |= BROWSER_CURSOR_WO_FOCUS;
+ m_nMode &= ~BROWSER_HIDECURSOR;
+ }
+ else
+ // Duerfen Updates gemacht werden, kein Focus-RechtEck
+ if (m_nOptions & OPT_UPDATE)
+ m_nMode |= BROWSER_HIDECURSOR;
+
+ if (m_bMultiSelection)
+ m_nMode |= BROWSER_MULTISELECTION;
+
+ if (!m_bNavigationBar)
+ {
+ m_nMode |= BROWSER_AUTO_HSCROLL;
+ m_nMode |= BROWSER_NO_HSCROLL;
+ ReserveControlArea();
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyColumns(_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xSupplyColumns.is())
+ InitColumnsByFields(::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > (xSupplyColumns->getColumns(), ::com::sun::star::uno::UNO_QUERY));
+
+ ConnectToFields();
+ }
+
+ if (GetModelColCount())
+ {
+ sal_uInt32 nRecordCount(0);
+
+ if (m_pSeekCursor)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY);
+ xSet->getPropertyValue(FM_PROP_ROWCOUNT) >>= nRecordCount;
+ m_bRecordCountFinal = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ROWCOUNTFINAL));
+
+ // insert the currently known rows
+ // and one row if we are able to insert rows
+ if (m_nOptions & OPT_INSERT)
+ {
+ // insert the empty row for insertion
+ m_xEmptyRow = new DbGridRow();
+ nRecordCount++;
+ }
+ if (nRecordCount)
+ {
+ m_xPaintRow = m_xSeekRow = new DbGridRow(m_pSeekCursor, sal_True);
+ m_xDataRow = new DbGridRow(m_pDataCursor, sal_False);
+ RowInserted(0, nRecordCount, sal_False);
+
+ if (m_xSeekRow->IsValid())
+ m_nSeekPos = m_pSeekCursor->getRow() - 1;
+ }
+ else
+ {
+ // no rows so we don't need a seekcursor
+ DELETEZ(m_pSeekCursor);
+ }
+ }
+
+ // Zur alten Spalte gehen
+ if (!nCurPos || nCurPos >= ColCount())
+ nCurPos = 1;
+
+ // there are rows so go to the selected current column
+ if (nRecordCount)
+ GoToRowColumnId(0, GetColumnId(nCurPos));
+ // else stop the editing if neccessary
+ else if (IsEditing())
+ DeactivateCell();
+ }
+
+ // now reset the mode
+ if (m_nMode != nOldMode)
+ SetMode(m_nMode);
+
+ // beim Resizen wird RecalcRows gerufen
+ if (!IsResizing() && GetRowCount())
+ RecalcRows(GetTopRow(), GetVisibleRows(), sal_True);
+
+ m_aBar.InvalidateAll(m_nCurrentPos, sal_True);
+ SetUpdateMode(sal_True);
+
+ // start listening on the seek cursor
+ if (m_pSeekCursor)
+ m_pCursorDisposeListener = new DisposeListenerGridBridge(*this, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > (*m_pSeekCursor, ::com::sun::star::uno::UNO_QUERY), 0);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::RemoveColumns()
+{
+ for (sal_uInt32 i = 0; i < m_aColumns.Count(); i++)
+ delete m_aColumns.GetObject(i);
+ m_aColumns.Clear();
+
+ DbBrowseBox::RemoveColumns();
+}
+
+//------------------------------------------------------------------------------
+DbGridColumn* DbGridControl::CreateColumn(sal_uInt16 nId, const DbGridRowRef& _xRow) const
+{
+ return new DbGridColumn(nId, *(DbGridControl*)this);
+}
+
+//------------------------------------------------------------------------------
+sal_uInt16 DbGridControl::AppendColumn(const XubString& rName, sal_uInt16 nWidth, sal_uInt16 nModelPos, sal_uInt16 nId)
+{
+ DBG_ASSERT(nId == (sal_uInt16)-1, "DbGridControl::AppendColumn : I want to set the ID myself ...");
+ sal_uInt16 nRealPos = nModelPos;
+ if (nModelPos != HEADERBAR_APPEND)
+ {
+ // calc the view pos. we can't use our converting functions because the new column
+ // has no VCL-representation, yet.
+ sal_Int16 nViewPos = nModelPos;
+ while (nModelPos--)
+ {
+ if (m_aColumns.GetObject(nModelPos)->IsHidden())
+ --nViewPos;
+ }
+ // restore nModelPos, we need it later
+ nModelPos = nRealPos;
+ // the position the base class gets is the view pos + 1 (because of the handle column)
+ nRealPos = nViewPos + 1;
+ }
+
+ // calculate the new id
+ for (nId=1; (GetModelColumnPos(nId) != (sal_uInt16)-1) && (nId<=m_aColumns.Count()); ++nId)
+ ;
+ DBG_ASSERT(GetViewColumnPos(nId) == (sal_uInt16)-1, "DbGridControl::AppendColumn : inconsistent internal state !");
+ // my column's models say "there is no column with id nId", but the view (the base class) says "there is a column ..."
+
+ DbBrowseBox::AppendColumn(rName, nWidth, nRealPos, nId);
+ if (nModelPos == HEADERBAR_APPEND)
+ m_aColumns.Insert(CreateColumn(nId, m_xCurrentRow), LIST_APPEND);
+ else
+ m_aColumns.Insert(CreateColumn(nId, m_xCurrentRow), nModelPos);
+
+ return nId;
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::RemoveColumn(sal_uInt16 nId)
+{
+ sal_uInt16 nIndex = GetModelColumnPos(nId);
+ DbBrowseBox::RemoveColumn(nId);
+ delete m_aColumns.Remove(nIndex);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::ColumnMoved(sal_uInt16 nId)
+{
+ DbBrowseBox::ColumnMoved(nId);
+
+ // remove the col from the model
+ sal_uInt16 nOldModelPos = GetModelColumnPos(nId);
+#ifdef DBG_UTIL
+ DbGridColumn* pCol = m_aColumns.GetObject((sal_uInt32)nOldModelPos);
+ DBG_ASSERT(!pCol->IsHidden(), "DbGridControl::ColumnMoved : moved a hidden col ? how this ?");
+#endif
+
+ // for the new model pos we can't use GetModelColumnPos because we are altering the model at the moment
+ // so the method won't work (in fact it would return the old model pos)
+
+ // the new view pos is calculated easily
+ sal_uInt16 nNewViewPos = GetViewColumnPos(nId);
+
+ // from that we can compute the new model pos
+ sal_uInt16 nNewModelPos;
+ for (nNewModelPos = 0; nNewModelPos < m_aColumns.Count(); ++nNewModelPos)
+ {
+ if (!m_aColumns.GetObject(nNewModelPos)->IsHidden())
+ if (!nNewViewPos)
+ break;
+ else
+ --nNewViewPos;
+ }
+ DBG_ASSERT(nNewModelPos<m_aColumns.Count(), "DbGridControl::ColumnMoved : could not find the new model position !");
+
+ // this will work. of course the model isn't fully consistent with our view right now, but let's
+ // look at the situation : a column has been moved with in the VIEW from pos m to n, say m<n (in the
+ // other case we can use analogue arguments).
+ // All cols k with m<k<=n have been shifted left on pos, the former col m now has pos n.
+ // In the model this affects a range of cols x to y, where x<=m and y<=n. And the number of hidden cols
+ // within this range is constant, so we may calculate the view pos from the model pos in the above way.
+ //
+ // for instance, let's look at a grid with six columns where the third one is hidden. this will
+ // initially look like this :
+ //
+ // +---+---+---+---+---+---+
+ // model pos | 0 | 1 |*2*| 3 | 4 | 5 |
+ // +---+---+---+---+---+---+
+ // ID | 1 | 2 | 3 | 4 | 5 | 6 |
+ // +---+---+---+---+---+---+
+ // view pos | 0 | 1 | - | 2 | 3 | 4 |
+ // +---+---+---+---+---+---+
+ //
+ // if we move the column at (view) pos 1 to (view) pos 3 we have :
+ //
+ // +---+---+---+---+---+---+
+ // model pos | 0 | 3 |*2*| 4 | 1 | 5 | // not reflecting the changes, yet
+ // +---+---+---+---+---+---+
+ // ID | 1 | 4 | 3 | 5 | 2 | 6 | // already reflecting the changes
+ // +---+---+---+---+---+---+
+ // view pos | 0 | 1 | - | 2 | 3 | 4 |
+ // +---+---+---+---+---+---+
+ //
+ // or, sorted by the out-of-date model positions :
+ //
+ // +---+---+---+---+---+---+
+ // model pos | 0 | 1 |*2*| 3 | 4 | 5 |
+ // +---+---+---+---+---+---+
+ // ID | 1 | 2 | 3 | 4 | 5 | 6 |
+ // +---+---+---+---+---+---+
+ // view pos | 0 | 3 | - | 1 | 2 | 4 |
+ // +---+---+---+---+---+---+
+ //
+ // We know the new view pos (3) of the moved column because our base class tells us. So we look at our
+ // model for the 4th (the pos is zero-based) visible column, it is at (model) position 4. And this is
+ // exactly the pos where we have to re-insert our column's model, so it looks ike this :
+ //
+ // +---+---+---+---+---+---+
+ // model pos | 0 |*1*| 2 | 3 | 4 | 5 |
+ // +---+---+---+---+---+---+
+ // ID | 1 | 3 | 4 | 5 | 2 | 6 |
+ // +---+---+---+---+---+---+
+ // view pos | 0 | - | 1 | 2 | 3 | 4 |
+ // +---+---+---+---+---+---+
+ //
+ // Now, all is consistent again.
+ // (except of the hidden column : The cycling of the cols occured on the model, not on the view. maybe
+ // the user expected the latter but there really is no good argument against our method ;) ...)
+ //
+ // And no, this large explanation isn't just because I wanted to play a board game or something like
+ // that. It's because it took me a while to see it myself, and the whole theme (hidden cols, model col
+ // positions, view col positions) is really painful (at least for me) so the above pictures helped me a lot ;)
+
+ m_aColumns.Insert(m_aColumns.Remove((sal_uInt32)nOldModelPos), nNewModelPos);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::SeekRow(long nRow)
+{
+ // in filter mode or in insert only mode we don't have any cursor!
+ if (SeekCursor(nRow))
+ {
+ if (m_pSeekCursor)
+ {
+ // on the current position we have to take the current row for display as we want
+ // to have the most recent values for display
+ if ((nRow == m_nCurrentPos) && getDisplaySynchron())
+ m_xPaintRow = m_xCurrentRow;
+ // seek to the empty insert row
+ else if (IsEmptyRow(nRow))
+ m_xPaintRow = m_xEmptyRow;
+ else
+ {
+ m_xSeekRow->SetState(m_pSeekCursor, sal_True);
+ m_xPaintRow = m_xSeekRow;
+ }
+ }
+ else if (IsFilterMode())
+ {
+ DBG_ASSERT(IsFilterRow(nRow), "DbGridControl::SeekRow(): No filter row, wrong mode");
+ m_xPaintRow = m_xEmptyRow;
+ }
+ DbBrowseBox::SeekRow(nRow);
+ }
+ return m_nSeekPos >= 0;
+}
+//------------------------------------------------------------------------------
+// Wird aufgerufen, wenn die dargestellte Datenmenge sich aendert
+//------------------------------------------------------------------------------
+void DbGridControl::VisibleRowsChanged( long nNewTopRow, sal_uInt16 nLinesOnScreen )
+{
+ RecalcRows(nNewTopRow, nLinesOnScreen , sal_False);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_Bool bUpdateCursor)
+{
+ DBG_CHKTHIS( DbGridControl, NULL );
+ // Wenn kein Cursor -> keine Rows im Browser.
+ if (!m_pSeekCursor)
+ {
+ DBG_ASSERT(GetRowCount() == 0,"DbGridControl: ohne Cursor darf es keine Rows geben");
+ return;
+ }
+
+ // ignore any updates implicit made
+ sal_Bool bDisablePaint = !bUpdateCursor && IsPaintEnabled();
+ if (bDisablePaint)
+ EnablePaint(sal_False);
+
+ // Cache an den sichtbaren Bereich anpassen
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(*m_pSeekCursor, ::com::sun::star::uno::UNO_QUERY);
+ sal_Int32 nCacheSize;
+ xSet->getPropertyValue(FM_PROP_FETCHSIZE) >>= nCacheSize;
+ sal_Bool bCacheAligned = sal_False;
+ // Nach der Initialisierung (m_nSeekPos < 0) keine Cursorbewegung, da bereits auf den ersten
+ // Satz positioniert
+ long nDelta = nNewTopRow - GetTopRow();
+ // Limit fuer relative Positionierung
+ long nLimit = (nCacheSize) ? nCacheSize / 2 : 0;
+
+ // mehr Zeilen auf dem Bildschirm als im Cache
+ if (nLimit < nLinesOnScreen)
+ {
+ ::com::sun::star::uno::Any aCacheSize;
+ aCacheSize <<= sal_Int32(nLinesOnScreen*2);
+ xSet->setPropertyValue(FM_PROP_FETCHSIZE, aCacheSize);
+ // jetzt auf alle Faelle den Cursor anpassen
+ bUpdateCursor = sal_True;
+ bCacheAligned = sal_True;
+ nLimit = nLinesOnScreen;
+ }
+
+ // Im folgenden werden die Positionierungen so vorgenommen, daß sichergestellt ist
+ // daß ausreichend Zeilen im DatenCache vorhanden sind
+
+ // Fenster geht nach unten, weniger als zwei Fenster Differenz
+ // oder Cache angepasst und noch kein Rowcount
+ if (nDelta < nLimit && (nDelta > 0
+ || (bCacheAligned && m_nTotalCount < 0)) )
+ SeekCursor(nNewTopRow + nLinesOnScreen - 1, sal_False);
+ else if (nDelta < 0 && Abs(nDelta) < nLimit)
+ SeekCursor(nNewTopRow, sal_False);
+ else if (nDelta != 0 || bUpdateCursor)
+ SeekCursor(nNewTopRow, sal_True);
+
+ AdjustRows();
+
+ // ignore any updates implicit made
+ EnablePaint(sal_True);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::RowInserted(long nRow, long nNumRows, sal_Bool bDoPaint)
+{
+ if (nNumRows)
+ {
+ if (m_bRecordCountFinal && m_nTotalCount < 0)
+ {
+ // if we have an insert row we have to reduce to count by 1
+ // as the total count reflects only the existing rows in database
+ m_nTotalCount = GetRowCount() + nNumRows;
+ if (m_xEmptyRow.Is())
+ --m_nTotalCount;
+ }
+ else if (m_nTotalCount >= 0)
+ m_nTotalCount += nNumRows;
+
+ DbBrowseBox::RowInserted(nRow, nNumRows, bDoPaint);
+ m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::RowRemoved(long nRow, long nNumRows, sal_Bool bDoPaint)
+{
+ if (nNumRows)
+ {
+ if (m_bRecordCountFinal && m_nTotalCount < 0)
+ {
+ m_nTotalCount = GetRowCount() - nNumRows;
+ // if we have an insert row reduce by 1
+ if (m_xEmptyRow.Is())
+ --m_nTotalCount;
+ }
+ else if (m_nTotalCount >= 0)
+ m_nTotalCount -= nNumRows;
+
+ DbBrowseBox::RowRemoved(nRow, nNumRows, bDoPaint);
+ m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::AdjustRows()
+{
+ if (!m_pSeekCursor)
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY);
+
+ // Aktualisieren des RecordCounts
+ sal_Int32 nRecordCount;
+ xSet->getPropertyValue(FM_PROP_ROWCOUNT) >>= nRecordCount;
+ if (!m_bRecordCountFinal)
+ m_bRecordCountFinal = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ROWCOUNTFINAL));
+
+ // hat sich die aktuelle Anzahl Rows veraendert
+ // hierbei muss auch beruecksichtigt werden,
+ // das eine zusaetzliche Zeile zum einfuegen von Datensaetzen vorhanden sein kann
+
+ // zusaetzliche AppendRow fuers einfuegen
+ if (m_nOptions & OPT_INSERT)
+ nRecordCount++;
+
+ // wird gerade eingefuegt, dann gehoert die gerade hinzuzufuegende
+ // Zeile nicht zum RecordCount und die Appendrow ebenfalls nicht
+ if (!IsUpdating() && m_bRecordCountFinal && IsModified() && m_xCurrentRow != m_xEmptyRow &&
+ m_xCurrentRow->IsNew())
+ nRecordCount++;
+ // das ist mit !m_bUpdating abgesichert : innerhalb von SaveRow (m_bUpdating == sal_True) wuerde sonst der Datensatz, den ich editiere
+ // (und den SaveRow gerade angefuegt hat, wodurch diese Methode hier getriggert wurde), doppelt zaehlen : einmal ist er schon
+ // in dem normalen RecordCount drin, zum zweiten wuerde er hier gezaehlt werden (60787 - FS)
+
+ if (nRecordCount != GetRowCount())
+ {
+ long nDelta = GetRowCount() - (long)nRecordCount;
+ if (nDelta > 0) // zuviele
+ {
+ RowRemoved(GetRowCount() - nDelta, nDelta, sal_False);
+ // es sind Zeilen weggefallen, dann ab der aktuellen Position neu zeichen
+ Invalidate();
+ }
+ else // zuwenig
+ RowInserted(GetRowCount(), -nDelta, sal_True);
+ }
+
+ if (m_bRecordCountFinal && m_nTotalCount < 0)
+ {
+ if (m_nOptions & OPT_INSERT)
+ m_nTotalCount = GetRowCount() - 1;
+ else
+ m_nTotalCount = GetRowCount();
+ }
+ m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
+}
+
+//------------------------------------------------------------------------------
+DbBrowseBox::RowStatus DbGridControl::GetRowStatus(long nRow) const
+{
+ if (IsFilterRow(nRow))
+ return DbBrowseBox::FILTER;
+ else if (m_nCurrentPos >= 0 && nRow == m_nCurrentPos)
+ {
+ // neue Zeile
+ if (!IsValid(m_xCurrentRow))
+ return DbBrowseBox::DELETED;
+ else if (IsModified())
+ return DbBrowseBox::MODIFIED;
+ else if (m_xCurrentRow->IsNew())
+ return DbBrowseBox::CURRENTNEW;
+ else
+ return DbBrowseBox::CURRENT;
+ }
+ else if (IsEmptyRow(nRow))
+ return DbBrowseBox::NEW;
+ else if (!IsValid(m_xSeekRow))
+ return DbBrowseBox::DELETED;
+ else
+ return DbBrowseBox::CLEAN;
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const
+{
+ DbBrowseBox::PaintStatusCell(rDev, rRect);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const
+{
+ if (!IsValid(m_xPaintRow))
+ return;
+
+ DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColumnId));
+ if (pColumn)
+ {
+ Rectangle aArea(rRect);
+ if ((GetMode() & BROWSER_CURSOR_WO_FOCUS) == BROWSER_CURSOR_WO_FOCUS)
+ {
+ aArea.Top() += 1;
+ aArea.Bottom() -= 1;
+ }
+ pColumn->Paint(rDev, aArea, m_xPaintRow, getNumberFormatter());
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::CursorMoving(long nNewRow, sal_uInt16 nNewCol)
+{
+ DBG_CHKTHIS( DbGridControl, NULL );
+ if (m_pDataCursor &&
+ m_nCurrentPos != nNewRow &&
+ !SetCurrent(nNewRow, !m_bInAdjustDataSource))
+ return sal_False;
+
+ return DbBrowseBox::CursorMoving(nNewRow, nNewCol);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::SetCurrent(long nNewRow, sal_Bool bForceInsertIfNewRow)
+{
+ // Each movement of the datacursor must start with BeginCursorAction and end with
+ // EndCursorAction to block all notifications during the movement
+ BeginCursorAction();
+
+ try
+ {
+ // Abgleichen der Positionen
+ if (SeekCursor(nNewRow))
+ {
+ if (IsFilterRow(nNewRow)) // special mode for filtering
+ {
+ m_xCurrentRow = m_xDataRow = m_xPaintRow = m_xEmptyRow;
+ m_nCurrentPos = nNewRow;
+ }
+ else
+ {
+ sal_Bool bNewRowInserted = sal_False;
+ // Should we go to the insertrow ?
+ if (IsEmptyRow(nNewRow))
+ {
+ // to we need to move the cursor to the insert row?
+ // we need to insert the if the current row isn't the insert row or if the
+ // cursor triggered the move by itselt and we need a reinitialization of the row
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCursorProps(*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (bForceInsertIfNewRow || !::utl::getBOOL(xCursorProps->getPropertyValue(FM_PROP_ISNEW)))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > xUpdateCursor(*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY);
+ xUpdateCursor->moveToInsertRow();
+ }
+ bNewRowInserted = sal_True;
+ }
+ else
+ {
+ ::com::sun::star::uno::Any aBookmark = m_pSeekCursor->getBookmark();
+ if (!m_xCurrentRow || m_xCurrentRow->IsNew() || !CompareBookmark(aBookmark, m_pDataCursor->getBookmark()))
+ {
+ // adjust the cursor to the new desired row
+ if (!m_pDataCursor->moveToBookmark(aBookmark))
+ {
+ EndCursorAction();
+ return sal_False;
+ }
+ }
+ }
+ m_xDataRow->SetState(m_pDataCursor, sal_False);
+ m_xCurrentRow = m_xDataRow;
+
+ long nPaintPos = -1;
+ // do we have to repaint the last regular row in case of setting defaults or autovalues
+ if (m_nCurrentPos >= 0 && m_nCurrentPos >= (GetRowCount() - 2))
+ nPaintPos = m_nCurrentPos;
+
+ m_nCurrentPos = nNewRow;
+
+ // repaint the new row to display all defaults
+ if (bNewRowInserted)
+ RowModified(m_nCurrentPos);
+ if (nPaintPos >= 0)
+ RowModified(nPaintPos);
+ }
+ }
+ else
+ {
+ DBG_ERROR("DbGridControl::SetCurrent : SeekRow failed !");
+ EndCursorAction();
+ return sal_False;
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("DbGridControl::SetCurrent : catched an exception !");
+ EndCursorAction();
+ return sal_False;
+ }
+
+ EndCursorAction();
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::CursorMoved()
+{
+ DBG_CHKTHIS( DbGridControl, NULL );
+
+ // CursorBewegung durch loeschen oder einfuegen von Zeilen
+ if (m_pDataCursor && m_nCurrentPos != GetCurRow())
+ {
+ DeactivateCell(sal_True);
+ SetCurrent(GetCurRow(), sal_False);
+ }
+
+ DbBrowseBox::CursorMoved();
+ m_aBar.InvalidateAll(m_nCurrentPos);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::setDisplaySynchron(sal_Bool bSync)
+{
+ if (bSync == m_bSynchDisplay)
+ return;
+
+ m_bSynchDisplay = bSync;
+ if (m_bSynchDisplay)
+ AdjustDataSource(sal_False);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::forceSyncDisplay()
+{
+ sal_Bool bOld = getDisplaySynchron();
+ setDisplaySynchron(sal_True);
+ if (!bOld)
+ setDisplaySynchron(bOld);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::forceROController(sal_Bool bForce)
+{
+ if (m_bForceROController == bForce)
+ return;
+
+ m_bForceROController = bForce;
+ // alle Columns durchgehen und denen Bescheid geben
+ for (sal_uInt16 i=0; i<m_aColumns.Count(); ++i)
+ {
+ DbGridColumn* pColumn = m_aColumns.GetObject(i);
+ if (!pColumn)
+ continue;
+
+ DbCellController* pReturn = &pColumn->GetController();
+ if (!pReturn)
+ continue;
+
+ // nur wenn es eine Edit-Zeile ist, kann ich ihr das forced read-only mitgeben
+ if (!pReturn->ISA(DbEditCellController) && !pReturn->ISA(DbSpinCellController))
+ continue;
+
+ Edit& rEdit = (Edit&)pReturn->GetWindow();
+ rEdit.SetReadOnly(m_bForceROController);
+ if (m_bForceROController)
+ rEdit.SetStyle(rEdit.GetStyle() | WB_NOHIDESELECTION);
+ else
+ rEdit.SetStyle(rEdit.GetStyle() & ~WB_NOHIDESELECTION);
+ }
+
+ // die aktive Zelle erneut aktivieren, da sich ihr Controller geaendert haben kann
+ if (IsEditing())
+ DeactivateCell();
+ ActivateCell();
+}
+
+
+//------------------------------------------------------------------------------
+void DbGridControl::AdjustDataSource(sal_Bool bFull)
+{
+ TRACE_RANGE("DbGridControl::AdjustDataSource");
+ ::vos::OGuard aGuard(Application::GetSolarMutex());
+ // wird die aktuelle Zeile gerade neu bestimmt,
+ // wird kein abgleich vorgenommen
+
+ if (bFull)
+ m_xCurrentRow = NULL;
+ // if we are on the same row only repaint
+ // but this is only possible for rows which are not inserted, in that case the comparision result
+ // may not be correct
+ else if (m_xCurrentRow.Is() && !m_xCurrentRow->IsNew() &&
+ CompareBookmark(m_xCurrentRow->GetBookmark(), m_pDataCursor->getBookmark()) &&
+ !::utl::getBOOL(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY)->getPropertyValue(FM_PROP_ISNEW)))
+ {
+ // Position ist ein und dieselbe
+ // Status uebernehmen, neuzeichnen fertig
+ DBG_ASSERT(m_xDataRow == m_xCurrentRow, "Fehler in den Datenzeilen");
+ TRACE_RANGE_MESSAGE1("same position, new state : %s", ROWSTATUS(m_xCurrentRow));
+ RowModified(m_nCurrentPos);
+ return;
+ }
+
+ // weg von der Row des DatenCursors
+ if (m_xPaintRow == m_xCurrentRow)
+ m_xPaintRow = m_xSeekRow;
+
+ // keine aktuelle Zeile dann komplett anpassen
+ if (!m_xCurrentRow)
+ AdjustRows();
+
+ sal_Int32 nNewPos = AlignSeekCursor();
+ if (nNewPos < 0) // keine Position gefunden
+ return;
+
+ m_bInAdjustDataSource = TRUE;
+ if (nNewPos != m_nCurrentPos)
+ {
+ if (m_bSynchDisplay)
+ DbBrowseBox::GoToRow(nNewPos);
+
+ if (!m_xCurrentRow.Is())
+ // das tritt zum Beispiel auf, wenn man die n (n>1) letzten Datensaetze geloescht hat, waehrend der Cursor auf dem letzten
+ // steht : AdjustRows entfernt dann zwei Zeilen aus der BrowseBox, wodurch diese ihre CurrentRow um zwei nach unten
+ // korrigiert, so dass dann das GoToRow in's Leere laeuft (da wir uns ja angeblich schon an der richtigen Position
+ // befinden)
+ SetCurrent(nNewPos, sal_False);
+ }
+ else
+ {
+ SetCurrent(nNewPos, sal_False);
+ RowModified(nNewPos);
+ }
+ m_bInAdjustDataSource = FALSE;
+
+ // Wird der DatenCursor von aussen bewegt, wird die selektion aufgehoben
+ SetNoSelection();
+ m_aBar.InvalidateAll(m_nCurrentPos, m_xCurrentRow.Is());
+}
+
+//------------------------------------------------------------------------------
+sal_Int32 DbGridControl::AlignSeekCursor()
+{
+ DBG_CHKTHIS( DbGridControl, NULL );
+ // Positioniert den SeekCursor auf den DatenCursor, Daten werden nicht uebertragen
+
+ if (!m_pSeekCursor)
+ return -1;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY);
+
+ // jetzt den seekcursor an den DatenCursor angleichen
+ if (::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW)))
+ m_nSeekPos = GetRowCount() - 1;
+ else
+ {
+ try
+ {
+ m_pSeekCursor->moveToBookmark(m_pDataCursor->getBookmark());
+ if (!CompareBookmark(m_pDataCursor->getBookmark(), m_pSeekCursor->getBookmark()))
+ // dummerweise kann das moveToBookmark indirekt dazu fuehren, dass der Seek-Cursor wieder neu positoniert wird (wenn
+ // naemlich das mit all seinen zu feuernden Events relativ komplexe moveToBookmark irgendwo ein Update ausloest),
+ // also muss ich es nochmal versuchen
+ m_pSeekCursor->moveToBookmark(m_pDataCursor->getBookmark());
+ // Nicht dass das jetzt nicht auch schief gegangen sein koennte, aber es ist zumindest unwahrscheinlicher geworden.
+ // Und die Alternative waere eine Schleife so lange bis es stimmt, und das kann auch nicht die Loesung sein
+ m_nSeekPos = m_pSeekCursor->getRow() - 1;
+ }
+ catch(...)
+ {
+ }
+ }
+ return m_nSeekPos;
+}
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute)
+{
+ DBG_CHKTHIS( DbGridControl, NULL );
+ // Positioniert den SeekCursor, Daten werden nicht uebertragen
+
+ // additions for the filtermode
+ if (IsFilterRow(nRow))
+ {
+ m_nSeekPos = 0;
+ return sal_True;
+ }
+
+ if (!m_pSeekCursor)
+ return sal_False;
+
+ // Befinden wir uns gerade beim Einfuegen
+ if (IsValid(m_xCurrentRow) && m_xCurrentRow->IsNew() &&
+ nRow >= m_nCurrentPos)
+ {
+ // dann darf auf alle Faelle nicht weiter nach unten gescrollt werden
+ // da der letzte Datensatz bereits erreicht wurde!
+ if (nRow == m_nCurrentPos)
+ {
+ // auf die aktuelle Zeile bewegt, dann muß kein abgleich gemacht werden, wenn
+ // gerade ein Datensatz eingefuegt wird
+ m_nSeekPos = nRow;
+ }
+ else if (IsEmptyRow(nRow)) // Leerzeile zum Einfuegen von Datensaetzen
+ m_nSeekPos = nRow;
+ }
+ else if (IsEmptyRow(nRow)) // Leerzeile zum Einfuegen von Datensaetzen
+ m_nSeekPos = nRow;
+ else if ((-1 == nRow) && (GetRowCount() == ((m_nOptions & OPT_INSERT) ? 1 : 0)) && m_pSeekCursor->isAfterLast())
+ m_nSeekPos = nRow;
+ else
+ {
+ long nSteps = nRow - (m_pSeekCursor->getRow() - 1);// Tatsaechliche Position im Cursor
+ bAbsolute = bAbsolute || (abs(nSteps) > 100); // Sprung zu groß ?
+ sal_Bool bSuccess=sal_False;
+ try
+ {
+ if (bAbsolute) // absolut positionierung
+ {
+ if ((bSuccess = m_pSeekCursor->absolute(nRow + 1)))
+ m_nSeekPos = nRow;
+ }
+ else
+ {
+ if (nSteps > 0) // auf den letzten benoetigten Datensatz positionieren
+ {
+ if (m_pSeekCursor->isAfterLast())
+ bSuccess = sal_False;
+ else if (m_pSeekCursor->isBeforeFirst())
+ bSuccess = m_pSeekCursor->absolute(nSteps);
+ else
+ bSuccess = m_pSeekCursor->relative(nSteps);
+ }
+ else if (nSteps < 0)
+ {
+ if (m_pSeekCursor->isBeforeFirst())
+ bSuccess = sal_False;
+ else if (m_pSeekCursor->isAfterLast())
+ bSuccess = m_pSeekCursor->absolute(nSteps);
+ else
+ bSuccess = m_pSeekCursor->relative(nSteps);
+ }
+ else
+ {
+ m_nSeekPos = nRow;
+ return sal_True;
+ }
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("DbGridControl::SeekCursor : failed ...");
+ }
+
+ try
+ {
+ if (!bSuccess)
+ {
+ if (bAbsolute || nSteps > 0)
+ bSuccess = m_pSeekCursor->last();
+ else
+ bSuccess = m_pSeekCursor->first();
+ }
+
+ if (bSuccess)
+ m_nSeekPos = m_pSeekCursor->getRow() - 1;
+ else
+ m_nSeekPos = -1;
+ }
+ catch(...)
+ {
+ DBG_ERROR("DbGridControl::SeekCursor : failed ...");
+ m_nSeekPos = -1; // kein Datensatz mehr vorhanden
+ }
+ }
+ return m_nSeekPos == nRow;
+}
+//------------------------------------------------------------------------------
+void DbGridControl::MoveToFirst()
+{
+ if (!m_pSeekCursor)
+ return;
+
+ if (GetCurRow() != 0)
+ MoveToPosition(0);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::MoveToLast()
+{
+ if (!m_pSeekCursor)
+ return;
+
+ if (m_nTotalCount < 0) // RecordCount steht noch nicht fest
+ {
+ try
+ {
+ sal_Bool bRes = m_pSeekCursor->last();
+
+ if (bRes)
+ {
+ m_nSeekPos = m_pSeekCursor->getRow() - 1;
+ AdjustRows();
+ }
+ }
+ catch(...)
+ {
+ }
+ }
+
+ // auf den letzen Datensatz positionieren, nicht auf die Leerzeile
+ if (m_nOptions & OPT_INSERT)
+ {
+ if ((GetRowCount() - 1) > 0)
+ MoveToPosition(GetRowCount() - 2);
+ }
+ else if (GetRowCount())
+ MoveToPosition(GetRowCount() - 1);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::MoveToPrev()
+{
+ long nNewRow = max(GetCurRow() - 1L, 0L);
+ if (GetCurRow() != nNewRow)
+ MoveToPosition(nNewRow);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::MoveToNext()
+{
+ if (!m_pSeekCursor)
+ return;
+
+ if (m_nTotalCount > 0)
+ {
+ long nNewRow = min(GetRowCount() - 1, GetCurRow() + 1);
+ if (GetCurRow() != nNewRow)
+ MoveToPosition(nNewRow);
+ }
+ else
+ {
+ try
+ {
+ // Versuchen auf die naechste Zeile zu Positionieren
+ if (m_pSeekCursor->next())
+ {
+ m_nSeekPos = m_pSeekCursor->getRow() - 1;
+ MoveToPosition(GetCurRow() + 1);
+ }
+ }
+ catch(...)
+ {
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::MoveToPosition(sal_uInt32 nPos)
+{
+ if (!m_pSeekCursor)
+ return;
+
+ if (nPos >= 0)
+ {
+ if (m_nTotalCount < 0 && (long)nPos >= GetRowCount())
+ {
+ try
+ {
+ if (!m_pSeekCursor->absolute(nPos + 1))
+ {
+ AdjustRows();
+ Sound::Beep();
+ return;
+ }
+ else
+ {
+ m_nSeekPos = m_pSeekCursor->getRow() - 1;
+ AdjustRows();
+ }
+ }
+ catch(...)
+ {
+ return;
+ }
+ }
+ DbBrowseBox::GoToRow(nPos);
+ m_aBar.InvalidateAll(m_nCurrentPos);
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::AppendNew()
+{
+ if (!m_pSeekCursor || !(m_nOptions & OPT_INSERT))
+ return;
+
+ if (m_nTotalCount < 0) // RecordCount steht noch nicht fest
+ {
+ try
+ {
+ sal_Bool bRes = m_pSeekCursor->last();
+
+ if (bRes)
+ {
+ m_nSeekPos = m_pSeekCursor->getRow() - 1;
+ AdjustRows();
+ }
+ }
+ catch(...)
+ {
+ return;
+ }
+ }
+
+ long nNewRow = m_nTotalCount + 1;
+ if (nNewRow > 0 && GetCurRow() != nNewRow)
+ MoveToPosition(nNewRow - 1);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::SetDesignMode(sal_Bool bMode)
+{
+ if (IsDesignMode() != bMode)
+ {
+ // Enable/Disable für den Designmode anpassen damit die Headerbar konfigurierbar bleibt
+ if (bMode)
+ {
+ if (!IsEnabled())
+ {
+ Enable();
+ GetDataWindow().Disable();
+ }
+ }
+ else
+ {
+ // komplett disablen
+ if (!GetDataWindow().IsEnabled())
+ Disable();
+ }
+
+ m_bDesignMode = bMode;
+ GetDataWindow().SetMouseTransparent(bMode);
+ SetMouseTransparent(bMode);
+ m_aBar.InvalidateAll(m_nCurrentPos, sal_True);
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::SetFilterMode(sal_Bool bMode)
+{
+ if (IsFilterMode() != bMode)
+ {
+ m_bFilterMode = bMode;
+
+ if (bMode)
+ {
+ SetUpdateMode(sal_False);
+
+ // es gibt kein Cursor mehr
+ if (IsEditing())
+ DeactivateCell();
+ RemoveRows(sal_False);
+
+ m_xEmptyRow = new DbGridRow();
+
+ // setting the new filter controls
+ for (sal_uInt16 i = 0; i<m_aColumns.Count(); ++i)
+ {
+ DbGridColumn* pCurCol = m_aColumns.GetObject(i);
+ if (!pCurCol->IsHidden())
+ pCurCol->UpdateControl();
+ }
+
+ // one row for filtering
+ RowInserted(0, 1, sal_True);
+ SetUpdateMode(sal_True);
+ }
+ else
+ setDataSource(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > ());
+ }
+}
+
+//------------------------------------------------------------------------------
+XubString DbGridControl::GetCellText(DbGridColumn* pColumn) const
+{
+ // Ausgabe des Textes fuer eine Zelle
+ XubString aText;
+ if (pColumn)
+ aText = pColumn->GetCellText(m_xPaintRow, m_xFormatter);
+ return aText;
+}
+
+//------------------------------------------------------------------------------
+sal_uInt32 DbGridControl::GetTotalCellWidth(long nRow, sal_uInt16 nColId)
+{
+ if (SeekRow(nRow))
+ {
+ DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColId));
+ return GetDataWindow().GetTextWidth(GetCellText(pColumn));
+ }
+ else
+ return 30; //xxxx
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu)
+{
+ sal_Bool bDelete = (m_nOptions & OPT_DELETE) && GetSelectRowCount() && !IsCurrentAppending();
+ // ist nur die Leerzeile selektiert, dann nicht loeschen
+ bDelete = bDelete && !((m_nOptions & OPT_INSERT) && GetSelectRowCount() == 1 && IsRowSelected(GetRowCount() - 1));
+
+ rMenu.EnableItem(SID_FM_DELETEROWS, bDelete);
+ rMenu.EnableItem(SID_FM_RECORD_UNDO, IsModified());
+ rMenu.EnableItem(SID_FM_RECORD_SAVE, IsModified());
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& rMenu, sal_uInt16 nExecutionResult)
+{
+ switch (nExecutionResult)
+ {
+ case SID_FM_DELETEROWS:
+ // delete asynchron
+ if (m_nDeleteEvent)
+ Application::RemoveUserEvent(m_nDeleteEvent);
+ m_nDeleteEvent = Application::PostUserEvent(LINK(this,DbGridControl,OnDelete));
+ break;
+ case SID_FM_RECORD_UNDO:
+ Undo();
+ break;
+ case SID_FM_RECORD_SAVE:
+ SaveRow();
+ break;
+ default:
+ break;
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::DataSourcePropertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException )
+{
+ TRACE_RANGE("DbGridControl::DataSourcePropertyChanged");
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ // prop "IsModified" changed ?
+ // during update don't care about the modified state
+ if (!IsUpdating() && evt.PropertyName.compareTo(FM_PROP_ISMODIFIED) == COMPARE_EQUAL)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSource(evt.Source, ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bIsNew = sal_False;
+ if (xSource.is())
+ bIsNew = ::utl::getBOOL(xSource->getPropertyValue(FM_PROP_ISNEW));
+
+ if (bIsNew)
+ {
+ DBG_ASSERT(::utl::getBOOL(xSource->getPropertyValue(FM_PROP_ROWCOUNTFINAL)), "DbGridControl::DataSourcePropertyChanged : somebody moved the form to a new record before the row count was final !");
+ sal_Int32 nRecordCount;
+ xSource->getPropertyValue(FM_PROP_ROWCOUNT) >>= nRecordCount;
+ if (::utl::getBOOL(evt.NewValue))
+ { // modified state changed from sal_False to sal_True and we're on a insert row
+ // -> we've to add a new grid row
+ if ((nRecordCount == GetRowCount() - 1) && m_xCurrentRow->IsNew())
+ {
+ RowInserted(GetRowCount(), 1, sal_True);
+ InvalidateStatusCell(m_nCurrentPos);
+ m_aBar.InvalidateAll(m_nCurrentPos);
+ }
+ }
+ else
+ { // modified state changed from sal_True to sal_False and we're on a insert row
+ // we have two "new row"s at the moment : the one we're editing currently (where the current
+ // column is the only dirty element) and a "new new" row which is completely clean. As the first
+ // one is about to be cleaned, too, the second one is obsolet now.
+ if (m_xCurrentRow->IsNew() && nRecordCount == (GetRowCount() - 2))
+ {
+ RowRemoved(GetRowCount() - 1, 1, sal_True);
+ InvalidateStatusCell(m_nCurrentPos);
+ m_aBar.InvalidateAll(m_nCurrentPos);
+ }
+ }
+ }
+ if (m_xCurrentRow.Is())
+ {
+ m_xCurrentRow->SetStatus(::utl::getBOOL(evt.NewValue) ? GRS_MODIFIED : GRS_CLEAN);
+ TRACE_RANGE_MESSAGE1("modified flag changed, new state : %s", ROWSTATUS(m_xCurrentRow));
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::Command(const CommandEvent& rEvt)
+{
+ switch (rEvt.GetCommand())
+ {
+ case COMMAND_STARTDRAG:
+ {
+ if (!rEvt.IsMouseEvent() || !m_pSeekCursor || IsResizing())
+ {
+ DbBrowseBox::Command(rEvt);
+ return;
+ }
+ sal_uInt16 nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X());
+ long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
+ if (nColId != HANDLE_ID && nRow >= 0)
+ {
+ DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColId));
+ DragServer::Clear();
+ DragServer::CopyString(GetCellText(pColumn));
+
+ Pointer aMovePtr(POINTER_MOVEDATA),
+ aCopyPtr(POINTER_COPYDATA);
+
+ if (GetDataWindow().IsMouseCaptured())
+ GetDataWindow().ReleaseMouse();
+ ExecuteDrag(aMovePtr, aCopyPtr, DRAG_COPYABLE);
+ }
+ else
+ DbBrowseBox::Command(rEvt);
+ } break;
+ case COMMAND_CONTEXTMENU:
+ {
+ if (!rEvt.IsMouseEvent() || !m_pSeekCursor)
+ {
+ DbBrowseBox::Command(rEvt);
+ return;
+ }
+
+ sal_uInt16 nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X());
+ long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
+
+ if (nColId == HANDLE_ID)
+ {
+ PopupMenu aContextMenu(SVX_RES(RID_SVXMNU_ROWS));
+
+ PreExecuteRowContextMenu(nRow, aContextMenu);
+ aContextMenu.RemoveDisabledEntries(sal_True, sal_True);
+ PostExecuteRowContextMenu(nRow, aContextMenu, aContextMenu.Execute(this, rEvt.GetMousePosPixel()));
+ }
+ else if (nRow >= 0 && nRow < GetRowCount() && nColId > HANDLE_ID && nColId <= ColCount())
+ {
+ PopupMenu aContextMenu(SVX_RES(RID_SVXMNU_CELL));
+ aContextMenu.RemoveDisabledEntries(sal_True, sal_True);
+ switch (aContextMenu.Execute(this, rEvt.GetMousePosPixel()))
+ {
+ case SID_COPY:
+ {
+ DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColId));
+ Clipboard::Clear();
+ Clipboard::CopyString(GetCellText(pColumn));
+ } break;
+ }
+ }
+ else
+ {
+ DbBrowseBox::Command(rEvt);
+ return;
+ }
+ }
+ default:
+ DbBrowseBox::Command(rEvt);
+ }
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(DbGridControl, OnDelete, void*, EMPTYTAG )
+{
+ DBG_CHKTHIS(DbGridControl, NULL );
+ m_nDeleteEvent = 0;
+ DeleteSelectedRows();
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::DeleteSelectedRows()
+{
+ DBG_ASSERT(GetSelection(), "keine selection!!!");
+
+ if (!m_pSeekCursor)
+ return;
+
+/* Application::EnterWait();
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet = (::com::sun::star::beans::XPropertySet*)xSeekCursor->queryInterface(::com::sun::star::beans::XPropertySet::getSmartUik());
+
+ // wenn mehr als 25 Datensaetze geloescht werden, wird der Cache abgeschaltet
+ // da das loeschen ansonsten zu langsam wird
+ sal_uInt16 nCacheSize = 0;
+ if (GetSelectRowCount() > 25)
+ {
+ // CacheSize merken und Cache zuruecksetzen
+ nCacheSize = xSet->getPropertyValue(L"CacheSize").getUINT16();
+ if (nCacheSize)
+ xSet->setPropertyValue(L"CacheSize", ::com::sun::star::uno::Any(sal_uInt16(0)));
+ } */
+
+
+ /*
+ // muß der Cache wiederhergestellt werden?
+ if (nCacheSize)
+ {
+ // Cache wieder einschalten
+ xSet->setPropertyValue(L"CacheSize", ::com::sun::star::uno::Any(sal_uInt16(nCacheSize)));
+
+ // Browser neu einstellen
+ RecalcRows(GetTopRow(), GetVisibleRows(), sal_True);
+
+ // aktuelle Zeile aktualisieren
+ SeekCursor(GetCurRow());
+ if (IsAppendRow(m_nSeekPos))
+ xDataCursor->addRecord();
+ else
+ {
+ ::com::sun::star::uno::Any aBookmark = xSeekCursor->getBookmark();
+ xDataCursor->moveToBookmark(aBookmark);
+ }
+ m_xCurrentRow = new DbGridRow(xDataCursor);
+ m_nCurrentPos = m_nSeekPos;
+
+ // complett invalidieren
+ Invalidate();
+ }
+ else
+ // Browser neu einstellen
+ RecalcRows(GetTopRow(), GetVisibleRows(), sal_True);
+
+ // gibt es keine ::com::sun::star::awt::Selection mehr?
+ if (!GetSelectRowCount())
+ ActivateCell();
+
+ m_aBar.InvalidateAll();
+ Application::LeaveWait();
+
+ m_bUpdating = sal_False;
+*/
+}
+
+//------------------------------------------------------------------------------
+DbCellController* DbGridControl::GetController(long nRow, sal_uInt16 nColumnId)
+{
+ if (!IsValid(m_xCurrentRow) || !IsEnabled())
+ return NULL;
+
+ DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColumnId));
+ if (!pColumn)
+ return NULL;
+
+ DbCellController* pReturn = NULL;
+ if (IsFilterMode())
+ pReturn = &pColumn->GetController();
+ else
+ {
+ if (::utl::hasProperty(FM_PROP_ENABLED, pColumn->getModel()))
+ {
+ if (!::utl::getBOOL(pColumn->getModel()->getPropertyValue(FM_PROP_ENABLED)))
+ return NULL;
+ }
+
+ sal_Bool bInsert = (m_xCurrentRow->IsNew() && (m_nOptions & OPT_INSERT));
+ sal_Bool bUpdate = (!m_xCurrentRow->IsNew() && (m_nOptions & OPT_UPDATE));
+
+ if ((bInsert && !pColumn->IsAutoValue()) || bUpdate || m_bForceROController)
+ {
+ pReturn = &pColumn->GetController();
+ if (pReturn)
+ {
+ // wenn es eine Edit-Zeile ist, kann ich ihr das forced read-only mitgeben
+ if (!pReturn->ISA(DbEditCellController) && !pReturn->ISA(DbSpinCellController))
+ // ich konnte den Controller in forceROController nicht auf ReadOnly setzen
+ if (!bInsert && !bUpdate)
+ // ich bin nur hier, da m_bForceROController gesetzt war
+ // -> lieber kein Controller als einer ohne RO
+ pReturn = NULL;
+ }
+ }
+ }
+ return pReturn;
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::InitController(DbCellControllerRef& rController, long nRow, sal_uInt16 nColumnId)
+{
+ DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColumnId));
+ if (pColumn)
+ pColumn->UpdateFromField(m_xCurrentRow, m_xFormatter);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::CellModified()
+{
+ TRACE_RANGE("DbGridControl::CellModified");
+
+ {
+ ::osl::MutexGuard aGuard(m_aAdjustSafety);
+ if (m_nAsynAdjustEvent)
+ {
+ TRACE_RANGE_MESSAGE1("forcing a synchron call to ", m_bPendingAdjustRows ? "AdjustRows" : "AdustDataSource");
+ RemoveUserEvent(m_nAsynAdjustEvent);
+ m_nAsynAdjustEvent = 0;
+
+ // force the call : this should be no problem as we're probably running in the solar thread here
+ // (cell modified is triggered by user actions)
+ if (m_bPendingAdjustRows)
+ AdjustRows();
+ else
+ AdjustDataSource();
+ }
+ }
+
+ if (!IsFilterMode() && IsValid(m_xCurrentRow) && !m_xCurrentRow->IsModified())
+ {
+ // Einschalten des Editiermodus
+ // Datensatz soll eingefuegt werden
+ if (m_xCurrentRow->IsNew())
+ {
+ m_xCurrentRow->SetStatus(GRS_MODIFIED);
+ TRACE_RANGE_MESSAGE("current row is new, new state : MODIFIED");
+ // wenn noch keine Zeile hinzugefuegt wurde, dann neue hinzunehmen
+ if (m_nCurrentPos == GetRowCount() - 1)
+ {
+ // RowCount um einen erhoehen
+ RowInserted(GetRowCount(), 1, sal_True);
+ InvalidateStatusCell(m_nCurrentPos);
+ m_aBar.InvalidateAll(m_nCurrentPos);
+ }
+ }
+ else if (m_xCurrentRow->GetStatus() != GRS_MODIFIED)
+ {
+ m_xCurrentRow->SetState(m_pDataCursor, sal_False);
+ TRACE_RANGE_MESSAGE1("current row is not new, after SetState, new state : %s", ROWSTATUS(m_xCurrentRow));
+ m_xCurrentRow->SetStatus(GRS_MODIFIED);
+ TRACE_RANGE_MESSAGE("current row is not new, new state : MODIFIED");
+ InvalidateStatusCell(m_nCurrentPos);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::Dispatch(sal_uInt16 nId)
+{
+ if (nId == BROWSER_CURSORENDOFFILE)
+ {
+ if (m_nOptions & OPT_INSERT)
+ AppendNew();
+ else
+ MoveToLast();
+ }
+ else
+ DbBrowseBox::Dispatch(nId);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::Undo()
+{
+ if (!IsFilterMode() && IsValid(m_xCurrentRow) && IsModified())
+ {
+ // check if we have somebody doin' the UNDO for us
+ long nState = -1;
+ if (m_aMasterStateProvider.IsSet())
+ nState = m_aMasterStateProvider.Call((void*)SID_FM_RECORD_UNDO);
+ if (nState>0)
+ { // yes, we have, and the slot is enabled
+ DBG_ASSERT(m_aMasterSlotExecutor.IsSet(), "DbGridControl::Undo : a state, but no execute link ?");
+ long lResult = m_aMasterSlotExecutor.Call((void*)SID_FM_RECORD_UNDO);
+ if (lResult)
+ // handled
+ return;
+ }
+ else if (nState == 0)
+ // yes, we have, and the slot is disabled
+ return;
+
+ BeginCursorAction();
+
+ sal_Bool bAppending = m_xCurrentRow->IsNew();
+ sal_Bool bDirty = m_xCurrentRow->IsModified();
+
+ try
+ {
+ // Editieren abbrechen
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > xUpdateCursor(*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY);
+ // no effects if we're not updating currently
+ if (bAppending)
+ // just refresh the row
+ xUpdateCursor->moveToInsertRow();
+ else
+ xUpdateCursor->cancelRowUpdates();
+
+ }
+ catch(...)
+ {
+ }
+
+ EndCursorAction();
+
+ m_xDataRow->SetState(m_pDataCursor, sal_False);
+ if (&m_xPaintRow == &m_xCurrentRow)
+ m_xPaintRow = m_xCurrentRow = m_xDataRow;
+ else
+ m_xCurrentRow = m_xDataRow;
+
+ if (bAppending && (DbBrowseBox::IsModified() || bDirty))
+ // remove the row
+ if (m_nCurrentPos == GetRowCount() - 2)
+ { // maybe we already removed it (in resetCurrentRow, called if the above moveToInsertRow
+ // caused our data source form to be reset - which should be the usual case ....)
+ RowRemoved(GetRowCount() - 1, 1, sal_True);
+ m_aBar.InvalidateAll(m_nCurrentPos);
+ }
+
+ RowModified(m_nCurrentPos);
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::resetCurrentRow()
+{
+ if (IsModified())
+ {
+ // scenario : we're on the insert row, the row is dirty, and thus there exists a "second" insert row (which
+ // is clean). Normally in DataSourcePropertyChanged we would remove this second row if the modified state of
+ // the insert row changes from sal_True to sal_False. But if our current cell is the only modified element (means the
+ // data source isn't modified) and we're reset this DataSourcePropertyChanged would never be called, so we
+ // would never delete the obsolet "second insert row". Thus in this special case this method here
+ // is the only possibility to determine the redundance of the row (resetCurrentRow is called when the
+ // "first insert row" is about to be cleaned, so of course the "second insert row" is redundant now)
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xDataSource(*getDataSource(), ::com::sun::star::uno::UNO_QUERY);
+ if (xDataSource.is() && !::utl::getBOOL(xDataSource->getPropertyValue(FM_PROP_ISMODIFIED)))
+ {
+ // are we on a new row currently ?
+ if (m_xCurrentRow->IsNew())
+ {
+ if (m_nCurrentPos == GetRowCount() - 2)
+ {
+ RowRemoved(GetRowCount() - 1, 1, sal_True);
+ m_aBar.InvalidateAll(m_nCurrentPos);
+ }
+ }
+ }
+
+ // update the rows
+ m_xDataRow->SetState(m_pDataCursor, sal_False);
+ if (&m_xPaintRow == &m_xCurrentRow)
+ m_xPaintRow = m_xCurrentRow = m_xDataRow;
+ else
+ m_xCurrentRow = m_xDataRow;
+ }
+
+ RowModified(GetCurRow()); // will update the current controller if affected
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::RowModified( long nRow, sal_uInt16 nColId )
+{
+ if (nRow == m_nCurrentPos && IsEditing())
+ {
+ DbCellControllerRef aTmpRef = Controller();
+ aTmpRef->ClearModified();
+ InitController(aTmpRef, m_nCurrentPos, GetCurColumnId());
+ }
+ DbBrowseBox::RowModified(nRow);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::IsModified() const
+{
+ return !IsFilterMode() && IsValid(m_xCurrentRow) && (m_xCurrentRow->IsModified() || DbBrowseBox::IsModified());
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::IsCurrentAppending() const
+{
+ return m_xCurrentRow.Is() && m_xCurrentRow->IsNew();
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::IsEmptyRow(long nRow) const
+{
+ return (m_nOptions & OPT_INSERT) && m_nTotalCount >= 0 && (nRow == GetRowCount() - 1);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::SaveModified()
+{
+ TRACE_RANGE("DbGridControl::SaveModified");
+ DBG_ASSERT(IsValid(m_xCurrentRow), "GridControl:: Invalid row");
+ if (!IsValid(m_xCurrentRow))
+ return sal_True;
+
+ // Uebernimmt die Dateneingabe fuer das Feld
+ // Hat es aenderungen im aktuellen Eingabefeld gegeben ?
+ if (!DbBrowseBox::IsModified())
+ return sal_True;
+
+ DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(GetCurColumnId()));
+ sal_Bool bOK = pColumn->Commit();
+
+ if (bOK)
+ {
+ Controller()->ClearModified();
+
+ if (IsValid(m_xCurrentRow) && !m_xCurrentRow->IsModified())
+ {
+ m_xCurrentRow->SetState(m_pDataCursor, sal_False);
+ TRACE_RANGE_MESSAGE1("explicit SetState, new state : %s", ROWSTATUS(m_xCurrentRow));
+ }
+ else
+ {
+ TRACE_RANGE_MESSAGE1("no SetState, new state : %s", ROWSTATUS(m_xCurrentRow));
+ }
+ }
+
+ return bOK;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::SaveRow()
+{
+ TRACE_RANGE("DbGridControl::SaveRow");
+ // gueltige Zeile
+ if (!IsValid(m_xCurrentRow) || !IsModified())
+ return sal_True;
+ // Wert des Controllers noch nicht gespeichert
+ else if (Controller().Is() && Controller()->IsModified())
+ {
+ if (!SaveModified())
+ return sal_False;
+ }
+ m_bUpdating = sal_True;
+
+ BeginCursorAction();
+ sal_Bool bAppending = m_xCurrentRow->IsNew();
+ sal_Bool bSuccess = sal_False;
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > xUpdateCursor(*m_pDataCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (bAppending)
+ xUpdateCursor->insertRow();
+ else
+ xUpdateCursor->updateRow();
+ bSuccess = sal_True;
+ }
+ catch(::com::sun::star::sdbc::SQLException& e)
+ {
+ e; // make compiler happy
+ EndCursorAction();
+ m_bUpdating = sal_False;
+ return sal_False;
+ }
+
+ try
+ {
+ if (bSuccess)
+ {
+ // if we are appending we still sit on the insert row
+ // we don't move just clear the flags not to move on the current row
+ m_xCurrentRow->SetState(m_pDataCursor, sal_False);
+ TRACE_RANGE_MESSAGE1("explicit SetState after a successfull update, new state : %s", ROWSTATUS(m_xCurrentRow));
+ m_xCurrentRow->SetNew(sal_False);
+
+ // adjust the seekcursor if it is on the same position as the datacursor
+ if (m_nSeekPos == m_nCurrentPos || bAppending)
+ {
+ // get the bookmark to refetch the data
+ // in insert mode we take the new bookmark of the data cursor
+ ::com::sun::star::uno::Any aBookmark = bAppending ? m_pDataCursor->getBookmark() : m_pSeekCursor->getBookmark();
+ m_pSeekCursor->moveToBookmark(aBookmark);
+ // get the data
+ m_xSeekRow->SetState(m_pSeekCursor, sal_True);
+ m_nSeekPos = m_pSeekCursor->getRow() - 1;
+ }
+ }
+ // and repaint the row
+ RowModified(m_nCurrentPos);
+ }
+ catch(...)
+ {
+ }
+
+ m_bUpdating = sal_False;
+ EndCursorAction();
+
+ // The old code returned (nRecords != 0) here.
+ // Me thinks this is wrong : If something goes wrong while update the record, an exception will be thrown,
+ // which results in a "return sal_False" (see above). If no exception is thrown, everything is fine. If nRecords
+ // is zero, this simply means all fields had their original values.
+ // FS - 06.12.99 - 70502
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+long DbGridControl::PreNotify(NotifyEvent& rEvt)
+{
+ // keine Events der Navbar behandeln
+ if (m_aBar.IsWindowOrChild(rEvt.GetWindow()))
+ return BrowseBox::PreNotify(rEvt);
+
+ switch (rEvt.GetType())
+ {
+ case EVENT_KEYINPUT:
+ {
+ const KeyEvent* pKeyEvent = rEvt.GetKeyEvent();
+ if (!pKeyEvent->GetKeyCode().IsShift() &&
+ !pKeyEvent->GetKeyCode().IsMod1() &&
+ pKeyEvent->GetKeyCode().GetCode() == KEY_ESCAPE)
+ {
+ if (IsModified())
+ {
+ Undo();
+ return 1;
+ }
+ }
+ else if (pKeyEvent->GetKeyCode().GetCode() == KEY_DELETE && // Delete rows
+ !pKeyEvent->GetKeyCode().IsShift() &&
+ !pKeyEvent->GetKeyCode().IsMod1())
+ {
+ if ((m_nOptions & OPT_DELETE) && GetSelectRowCount())
+ {
+ // delete asynchron
+ if (m_nDeleteEvent)
+ Application::RemoveUserEvent(m_nDeleteEvent);
+ m_nDeleteEvent = Application::PostUserEvent(LINK(this,DbGridControl,OnDelete));
+ return 1;
+ }
+ }
+ } // kein break!
+ default:
+ return DbBrowseBox::PreNotify(rEvt);
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool DbGridControl::IsTabAllowed(sal_Bool bRight) const
+{
+ if (bRight)
+ // Tab nur wenn nicht auf der letzten Zelle
+ return GetCurRow() < (GetRowCount() - 1) || !m_bRecordCountFinal ||
+ GetViewColumnPos(GetCurColumnId()) < (GetViewColCount() - 1);
+ else
+ {
+ // Tab nur wenn nicht auf der ersten Zelle
+ return GetCurRow() > 0 || (GetCurColumnId() && GetViewColumnPos(GetCurColumnId()) > 0);
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::KeyInput( const KeyEvent& rEvt )
+{
+ if (rEvt.GetKeyCode().GetFunction() == KEYFUNC_COPY)
+ {
+ long nRow = GetCurRow();
+ sal_uInt16 nColId = GetCurColumnId();
+ if (nRow >= 0 && nRow < GetRowCount() && nColId < ColCount())
+ {
+ DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColId));
+ Clipboard::Clear();
+ Clipboard::CopyString(GetCellText(pColumn));
+ return;
+ }
+ }
+ DbBrowseBox::KeyInput(rEvt);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::HideColumn(sal_uInt16 nId)
+{
+ DeactivateCell();
+
+ // determine the col for the focus to set to after removal
+ sal_uInt16 nPos = GetViewColumnPos(nId);
+ sal_uInt16 nNewColId = nPos == (ColCount()-1)
+ ? GetColumnIdFromViewPos(nPos-1) // last col is to be removed -> take the previous
+ : GetColumnIdFromViewPos(nPos+1); // take the next
+
+ long lCurrentWidth = GetColumnWidth(nId);
+ DbBrowseBox::RemoveColumn(nId);
+ // don't use my own RemoveColumn, this would remove it from m_aColumns, too
+
+ // update my model
+ DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nId));
+ DBG_ASSERT(pColumn, "DbGridControl::HideColumn : somebody did hide a nonexistent column !");
+ if (pColumn)
+ {
+ pColumn->m_bHidden = sal_True;
+ pColumn->m_nLastVisibleWidth = CalcReverseZoom(lCurrentWidth);
+ }
+
+ // and reset the focus
+ GoToColumnId( nNewColId );
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::ShowColumn(sal_uInt16 nId)
+{
+ sal_uInt16 nPos = GetModelColumnPos(nId);
+ DBG_ASSERT(nPos != (sal_uInt16)-1, "DbGridControl::ShowColumn : invalid argument !");
+ if (nPos == (sal_uInt16)-1)
+ return;
+
+ DbGridColumn* pColumn = m_aColumns.GetObject(nPos);
+ if (!pColumn->IsHidden())
+ {
+ DBG_ASSERT(GetViewColumnPos(nId) != (sal_uInt16)-1, "DbGridControl::ShowColumn : inconsistent internal state !");
+ // if the column isn't marked as hidden, it should be visible, shouldn't it ?
+ return;
+ }
+ DBG_ASSERT(GetViewColumnPos(nId) == (sal_uInt16)-1, "DbGridControl::ShowColumn : inconsistent internal state !");
+ // the opposite situation ...
+
+ // to determine the new view position we need an adjacent non-hidden column
+ sal_uInt16 nNextNonHidden = (sal_uInt16)-1;
+ // first search the cols to the right
+ for (sal_uInt16 i = nPos + 1; i<m_aColumns.Count(); ++i)
+ {
+ DbGridColumn* pCurCol = m_aColumns.GetObject(i);
+ if (!pCurCol->IsHidden())
+ {
+ nNextNonHidden = i;
+ break;
+ }
+ }
+ if ((nNextNonHidden == (sal_uInt16)-1) && (nPos > 0))
+ {
+ // then to the left
+ for (sal_uInt16 i = nPos; i>0; --i)
+ {
+ DbGridColumn* pCurCol = m_aColumns.GetObject(i-1);
+ if (!pCurCol->IsHidden())
+ {
+ nNextNonHidden = i-1;
+ break;
+ }
+ }
+ }
+ sal_uInt16 nNewViewPos = (nNextNonHidden == (sal_uInt16)-1)
+ ? 1 // there is no visible column -> insert behinde the handle col
+ : GetViewColumnPos(m_aColumns.GetObject(nNextNonHidden)->GetId()) + 1;
+ // the first non-handle col has "view pos" 0, but the pos arg for InsertDataColumn expects
+ // a position 1 for the first non-handle col -> +1
+ DBG_ASSERT(nNewViewPos != (sal_uInt16)-1, "DbGridControl::ShowColumn : inconsistent internal state !");
+ // we found a col marked as visible but got no view pos for it ...
+
+ if ((nNextNonHidden<nPos) && (nNextNonHidden != (sal_uInt16)-1))
+ // nNextNonHidden is a column to the left, so we want to insert the new col _right_ beside it's pos
+ ++nNewViewPos;
+
+ DeactivateCell();
+
+ ::rtl::OUString aName;
+ pColumn->getModel()->getPropertyValue(FM_PROP_LABEL) >>= aName;
+ InsertDataColumn(nId, aName, CalcZoom(pColumn->m_nLastVisibleWidth), HIB_CENTER | HIB_VCENTER | HIB_CLICKABLE, nNewViewPos);
+ pColumn->m_bHidden = sal_False;
+
+ ActivateCell();
+ Invalidate();
+}
+
+//------------------------------------------------------------------------------
+sal_uInt16 DbGridControl::GetColumnIdFromModelPos( sal_uInt16 nPos ) const
+{
+ if (nPos >= m_aColumns.Count())
+ {
+ DBG_ERROR("DbGridControl::GetColumnIdFromModelPos : invalid argument !");
+ return (sal_uInt16)-1;
+ }
+
+ DbGridColumn* pCol = m_aColumns.GetObject(nPos);
+#if _DEBUG || DBG_UTIL
+ // in der Debug-Version rechnen wir die ModelPos in eine ViewPos um und vergleichen das mit dem Wert,
+ // den wir zurueckliefern werden (nId an der entsprechenden Col in m_aColumns)
+
+ if (!pCol->IsHidden())
+ { // macht nur Sinn, wenn die Spalte sichtbar ist
+ sal_uInt16 nViewPos = nPos;
+ for (sal_uInt16 i=0; i<m_aColumns.Count() && i<nPos; ++i)
+ if (m_aColumns.GetObject(i)->IsHidden())
+ --nViewPos;
+
+ DBG_ASSERT(pCol && GetColumnIdFromViewPos(nViewPos) == pCol->GetId(),
+ "DbGridControl::GetColumnIdFromModelPos : this isn't consistent .... did I misunderstand something ?");
+ }
+#endif
+ return pCol->GetId();
+}
+
+//------------------------------------------------------------------------------
+sal_uInt16 DbGridControl::GetModelColumnPos( sal_uInt16 nId ) const
+{
+ for (sal_uInt16 i=0; i<m_aColumns.Count(); ++i)
+ if (m_aColumns.GetObject(i)->GetId() == nId)
+ return i;
+
+ return -1;
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::implAdjustInSolarThread(BOOL _bRows)
+{
+ TRACE_RANGE("DbGridControl::implAdjustInSolarThread");
+ ::osl::MutexGuard aGuard(m_aAdjustSafety);
+ if (::vos::OThread::getCurrentIdentifier() != Application::GetMainThreadIdentifier())
+ {
+ m_nAsynAdjustEvent = PostUserEvent(LINK(this, DbGridControl, OnAsyncAdjust), (void*)_bRows);
+ m_bPendingAdjustRows = _bRows;
+#ifdef DBG_UTIL
+ if (_bRows)
+ TRACE_RANGE_MESSAGE("posting an AdjustRows")
+ else
+ TRACE_RANGE_MESSAGE("posting an AdjustDataSource")
+#endif
+ }
+ else
+ {
+#ifdef DBG_UTIL
+ if (_bRows)
+ TRACE_RANGE_MESSAGE("doing an AdjustRows")
+ else
+ TRACE_RANGE_MESSAGE("doing an AdjustDataSource")
+#endif
+ if (_bRows)
+ AdjustRows();
+ else
+ AdjustDataSource();
+ }
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(DbGridControl, OnAsyncAdjust, void*, pAdjustWhat)
+{
+ m_nAsynAdjustEvent = 0;
+ if (pAdjustWhat)
+ AdjustRows();
+ else
+ AdjustDataSource();
+ return 0L;
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::BeginCursorAction()
+{
+ if (m_pFieldListeners)
+ {
+ ColumnFieldValueListeners* pListeners = (ColumnFieldValueListeners*)m_pFieldListeners;
+ ConstColumnFieldValueListenersIterator aIter = pListeners->begin();
+ while (aIter != pListeners->end())
+ {
+ GridFieldValueListener* pCurrent = (*aIter).second;
+ if (pCurrent)
+ pCurrent->suspend();
+ ++aIter;
+ }
+ }
+
+ if (m_pDataSourcePropListener)
+ m_pDataSourcePropListener->suspend();
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::EndCursorAction()
+{
+ if (m_pFieldListeners)
+ {
+ ColumnFieldValueListeners* pListeners = (ColumnFieldValueListeners*)m_pFieldListeners;
+ ConstColumnFieldValueListenersIterator aIter = pListeners->begin();
+ while (aIter != pListeners->end())
+ {
+ GridFieldValueListener* pCurrent = (*aIter).second;
+ if (pCurrent)
+ pCurrent->resume();
+ ++aIter;
+ }
+ }
+
+ if (m_pDataSourcePropListener)
+ m_pDataSourcePropListener->resume();
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::ConnectToFields()
+{
+ ColumnFieldValueListeners* pListeners = (ColumnFieldValueListeners*)m_pFieldListeners;
+ DBG_ASSERT(!pListeners || pListeners->size() == 0, "DbGridControl::ConnectToFields : please call DisconnectFromFields first !");
+
+ if (!pListeners)
+ {
+ pListeners = new ColumnFieldValueListeners;
+ m_pFieldListeners = pListeners;
+ }
+
+ for (sal_Int32 i=0; i<m_aColumns.Count(); ++i)
+ {
+ DbGridColumn* pCurrent = m_aColumns.GetObject(i);
+ sal_uInt16 nViewPos = pCurrent ? GetViewColumnPos(pCurrent->GetId()) : (sal_uInt16)-1;
+ if ((sal_uInt16)-1 == nViewPos)
+ continue;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xField = pCurrent->GetField();
+ if (!xField.is())
+ continue;
+
+ // column is visible and bound here
+ GridFieldValueListener*& rpListener = (*pListeners)[pCurrent->GetId()];
+ DBG_ASSERT(!rpListener, "DbGridControl::ConnectToFields : already a listener for this column ?!");
+ rpListener = new GridFieldValueListener(*this, xField, pCurrent->GetId());
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::DisconnectFromFields()
+{
+ if (!m_pFieldListeners)
+ return;
+
+ ColumnFieldValueListeners* pListeners = (ColumnFieldValueListeners*)m_pFieldListeners;
+ while (pListeners->size())
+ {
+#if DBG_UTIL
+ sal_Int32 nOldSize = pListeners->size();
+#endif
+ pListeners->begin()->second->dispose();
+ DBG_ASSERT(nOldSize > pListeners->size(), "DbGridControl::DisconnectFromFields : dispose on a listener should result in a removal from my list !");
+ }
+
+ delete pListeners;
+ m_pFieldListeners = NULL;
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::FieldValueChanged(sal_uInt16 _nId, const ::com::sun::star::beans::PropertyChangeEvent& /*_evt*/)
+{
+ osl::MutexGuard aPreventDestruction(m_aDestructionSafety);
+ // needed as this may run in a thread other than the main one
+ if (GetRowStatus(GetCurRow()) != DbBrowseBox::MODIFIED)
+ // all other cases are handled elsewhere
+ return;
+
+ DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(_nId));
+ if (pColumn)
+ {
+ sal_Bool bAcquiredPaintSafety = sal_False;
+ while (!m_bWantDestruction && !bAcquiredPaintSafety)
+ bAcquiredPaintSafety = Application::GetSolarMutex().tryToAcquire();
+
+ if (m_bWantDestruction)
+ { // at this moment, within another thread, our destructor tries to destroy the listener which called this method
+ // => don't do anything
+ // 73365 - 23.02.00 - FS
+ if (bAcquiredPaintSafety)
+ // though the above while-loop suggests that (m_bWantDestruction && bAcquiredPaintSafety) is impossible,
+ // it isnt't, as m_bWantDestruction isn't protected with any mutex
+ Application::GetSolarMutex().release();
+ return;
+ }
+ // here we got the solar mutex, transfer it to a guard for safety reasons
+ ::vos::OGuard aPaintSafety(Application::GetSolarMutex());
+ Application::GetSolarMutex().release();
+
+ // and finally do the update ...
+ pColumn->UpdateFromField(m_xCurrentRow, m_xFormatter);
+ RowModified(GetCurRow(), _nId);
+ }
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::FieldListenerDisposing(sal_uInt16 _nId)
+{
+ ColumnFieldValueListeners* pListeners = (ColumnFieldValueListeners*)m_pFieldListeners;
+ if (!pListeners)
+ {
+ DBG_ERROR("DbGridControl::FieldListenerDisposing : invalid call (have no listener array) !");
+ return;
+ }
+
+ ColumnFieldValueListenersIterator aPos = pListeners->find(_nId);
+ if (aPos == pListeners->end())
+ {
+ DBG_ERROR("DbGridControl::FieldListenerDisposing : invalid call (did not find the listener) !");
+ return;
+ }
+
+ delete aPos->second;
+
+ pListeners->erase(aPos);
+}
+
+//------------------------------------------------------------------------------
+void DbGridControl::disposing(sal_uInt16 _nId, const ::com::sun::star::lang::EventObject& _rEvt)
+{
+ if (_nId == 0)
+ { // the data cursor is beeing disposed
+ ::osl::MutexGuard aGuard(m_aAdjustSafety);
+ if (m_nAsynAdjustEvent)
+ {
+ RemoveUserEvent(m_nAsynAdjustEvent);
+ m_nAsynAdjustEvent = 0;
+ }
+ }
+}
+
+
diff --git a/svx/source/fmcomp/gridctrl.src b/svx/source/fmcomp/gridctrl.src
new file mode 100644
index 0000000000..150e28fea0
--- /dev/null
+++ b/svx/source/fmcomp/gridctrl.src
@@ -0,0 +1,689 @@
+/*************************************************************************
+ *
+ * $RCSfile: gridctrl.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "fmresids.hrc"
+#include "svxids.hrc"
+#include "globlmn.hrc"
+#include "fmhelp.hrc"
+Menu RID_SVXMNU_ROWS
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_DELETEROWS ;
+ HelpID = SID_FM_DELETEROWS ;
+ Text = "Zeilen löschen" ;
+ Text [ ENGLISH ] = "Delete rows" ;
+ Text [ english_us ] = "Delete Rows" ;
+ Text [ portuguese_brazilian ] = "Zeilen löschen" ;
+ Text [ swedish ] = "Radera rader" ;
+ Text [ danish ] = "Slet rækker" ;
+ Text [ italian ] = "Elimina riga" ;
+ Text [ spanish ] = "Eliminar filas" ;
+ Text [ french ] = "Supprimer des lignes" ;
+ Text [ dutch ] = "Rijen wissen" ;
+ Text [ portuguese ] = "Eliminar linhas" ;
+ Text[ chinese_simplified ] = "ɾ³ýÐÐ";
+ Text[ russian ] = "Óäàëèòü ñòðîêè";
+ Text[ polish ] = "Usuñ wiersze";
+ Text[ japanese ] = "s‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£¦æ";
+ Text[ dutch ] = "Rijen wissen";
+ Text[ chinese_simplified ] = "ɾ³ýÐÐ";
+ Text[ greek ] = "ÄéáãñáöÞ óôçëþí";
+ Text[ korean ] = "Çà »èÁ¦";
+ Text[ arabic ] = "ÍÐÝ ÕÝæÝ";
+ Text[ turkish ] = "Satýrlarý sil";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_RECORD_SAVE ;
+ HelpID = SID_FM_RECORD_SAVE ;
+ Text = "Datensatz speichern" ;
+ Text [ ENGLISH ] = "Save record" ;
+ Text [ portuguese ] = "Guardar registo" ;
+ Text [ english_us ] = "Save Record" ;
+ Text [ portuguese_brazilian ] = "Datensatz speichern" ;
+ Text [ swedish ] = "Spara datapost" ;
+ Text [ danish ] = "Gem datapost" ;
+ Text [ italian ] = "Salva record di dati" ;
+ Text [ spanish ] = "Guardar registro" ;
+ Text [ french ] = "Enregistrer l'enregistrement" ;
+ Text [ dutch ] = "Record opslaan" ;
+ Text[ chinese_simplified ] = "´æÅÌÊý¾Ý¼Ç¼";
+ Text[ russian ] = "Ñîõðàíèòü çàïèñü äàííûõ";
+ Text[ polish ] = "Zapisz rekord";
+ Text[ japanese ] = "Úº°ÄÞ‚ð•Û‘¶";
+ Text[ chinese_traditional ] = "Àx¦s¸ê®Æ¶µ¥Ø";
+ Text[ dutch ] = "Record opslaan";
+ Text[ chinese_simplified ] = "´æÅÌÊý¾Ý¼Ç¼";
+ Text[ greek ] = "ÁðïèÞêåõóç åããñáöÞò äåäïìÝíùí";
+ Text[ korean ] = "·¹ÄÚµå ÀúÀå";
+ Text[ arabic ] = "ÍÝÙ ÓÌá";
+ Text[ turkish ] = "Veri kümesini kaydet";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_RECORD_UNDO ;
+ HelpID = SID_FM_RECORD_UNDO ;
+ Text = "Rückgängig: Dateneingabe" ;
+ Text [ ENGLISH ] = "Undo: Data entry" ;
+ Text [ english_us ] = "Undo: Data entry" ;
+ Text [ portuguese ] = "Anular: entrada de dados" ;
+ Text [ portuguese_brazilian ] = "Rückgängig: Dateneingabe" ;
+ Text [ swedish ] = "Ångra: datainmatning" ;
+ Text [ danish ] = "Fortryd: Datainput" ;
+ Text [ italian ] = "Annulla: Immissione dati" ;
+ Text [ spanish ] = "Deshacer: entrada de datos" ;
+ Text [ french ] = "Annuler : saisie de données" ;
+ Text [ dutch ] = "Ongedaan: Gegevensinvoer" ;
+ Text[ chinese_simplified ] = "³·ÏûÃüÁî: ÊäÈëÊý¾Ý";
+ Text[ russian ] = "Îòìåíèòü: ââîä äàííûõ";
+ Text[ polish ] = "Cofnij: Wprowadzanie danych";
+ Text[ japanese ] = "Œ³‚É–ß‚·: ÃÞ°À‚Ì“ü—Í";
+ Text[ chinese_traditional ] = "´_­ì¡G¿é¤J¸ê®Æ";
+ Text[ dutch ] = "Ongedaan: Gegevensinvoer";
+ Text[ chinese_simplified ] = "³·ÏûÃüÁî: ÊäÈëÊý¾Ý";
+ Text[ greek ] = "Áíáßñåóç: ÅéóáãùãÞ äåäïìÝíùí";
+ Text[ korean ] = "½ÇÇà Ãë¼Ò: µ¥ÀÌÅÍ ÀÔ·Â";
+ Text[ arabic ] = "ÊÑÇÌÚ: ÅÏÎÇá ÈíÇäÇÊ";
+ Text[ turkish ] = "Geri al: Veri giriþi";
+ };
+ };
+};
+Menu RID_SVXMNU_COLS
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_INSERTCOL ;
+ HelpID = SID_FM_INSERTCOL ;
+ Text = "~Spalte einfügen" ;
+ Text [ ENGLISH ] = "~Insert column" ;
+ Text [ english_us ] = "Insert ~Column" ;
+ Text [ portuguese ] = "~Inserir coluna" ;
+ Text [ portuguese_brazilian ] = "~Spalte einfügen" ;
+ Text [ swedish ] = "I~nfoga kolumn" ;
+ Text [ danish ] = "Indsæt kolonne" ;
+ Text [ italian ] = "~Inserisci colonna" ;
+ Text [ spanish ] = "~Insertar columna" ;
+ Text [ french ] = "Insérer une colonne" ;
+ Text [ dutch ] = "~Kolom invoegen" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_EDIT ;
+ HelpID = SID_FM_EDIT ;
+ Text = "Textfeld" ;
+ Text [ ENGLISH ] = "TextField" ;
+ Text [ portuguese ] = "Campo de texto" ;
+ Text [ english_us ] = "Text Box" ;
+ Text [ portuguese_brazilian ] = "Edit" ;
+ Text [ swedish ] = "Textfält" ;
+ Text [ danish ] = "Tekstfelt" ;
+ Text [ italian ] = "Campo di testo" ;
+ Text [ spanish ] = "Cuadro de texto" ;
+ Text [ french ] = "Zone de texte" ;
+ Text [ dutch ] = "Tekstveld" ;
+ Text[ chinese_simplified ] = "Îı¾¿ò";
+ Text[ russian ] = "Òåêñòîâîå ïîëå";
+ Text[ polish ] = "Pole tekstowe";
+ Text[ japanese ] = "÷½ÄÎÞ¯¸½";
+ Text[ chinese_traditional ] = "¤å¦r¤è¶ô";
+ Text[ dutch ] = "Tekstveld";
+ Text[ chinese_simplified ] = "Îı¾¿ò";
+ Text[ greek ] = "Ðëáßóéï êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® Çʵå";
+ Text[ arabic ] = "ÍÞá äÕ";
+ Text[ turkish ] = "Metin alaný";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CHECKBOX ;
+ HelpID = SID_FM_CHECKBOX ;
+ Text = "Markierfeld" ;
+ Text [ ENGLISH ] = "CheckBox" ;
+ Text [ portuguese ] = "Caixa de verificação" ;
+ Text [ english_us ] = "Check Box" ;
+ Text [ portuguese_brazilian ] = "Checkbox" ;
+ Text [ swedish ] = "Markeringsfält" ;
+ Text [ danish ] = "Afkrydsningsfelt" ;
+ Text [ italian ] = "Casella di controllo" ;
+ Text [ spanish ] = "Casilla de verificación" ;
+ Text [ french ] = "Case à cocher" ;
+ Text [ dutch ] = "Markeerveld" ;
+ Text[ chinese_simplified ] = "¸´Ñ¡¿ò";
+ Text[ russian ] = "Îêíî ôëàæêà";
+ Text[ polish ] = "Pole wyboru";
+ Text[ japanese ] = "Áª¯¸ÎÞ¯¸½";
+ Text[ chinese_traditional ] = "®Ö¨ú¤è¶ô";
+ Text[ dutch ] = "Markeerveld";
+ Text[ chinese_simplified ] = "¸´Ñ¡¿ò";
+ Text[ greek ] = "Ðåäßï óÞìáíóçò";
+ Text[ korean ] = "È®Àζõ";
+ Text[ arabic ] = "ÎÇäÉ ÇÎÊíÇÑ";
+ Text[ turkish ] = "Seçme kutusu";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_COMBOBOX ;
+ HelpID = SID_FM_COMBOBOX ;
+ Text = "Kombinationsfeld" ;
+ Text [ ENGLISH ] = "ComboBox" ;
+ Text [ portuguese ] = "Caixa de combinação" ;
+ Text [ english_us ] = "Combo Box" ;
+ Text [ portuguese_brazilian ] = "Combobox" ;
+ Text [ swedish ] = "Kombinationsfält" ;
+ Text [ danish ] = "Kombinationsboks" ;
+ Text [ italian ] = "Casella combinata" ;
+ Text [ spanish ] = "Campo combinado" ;
+ Text [ french ] = "Zone combinée" ;
+ Text [ dutch ] = "Combinatieveld" ;
+ Text[ chinese_simplified ] = "×éºÏ¿ò";
+ Text[ russian ] = "Ïîëå ñî ñïèñêîì";
+ Text[ polish ] = "Pole kombi";
+ Text[ japanese ] = "ºÝÎÞÎÞ¯¸½";
+ Text[ chinese_traditional ] = "²Õ¦X¤è¶ô";
+ Text[ dutch ] = "Combinatieveld";
+ Text[ chinese_simplified ] = "×éºÏ¿ò";
+ Text[ greek ] = "Ðåäßï óõíäõáóìïý";
+ Text[ korean ] = "ÄÞº¸ ¹Ú½º";
+ Text[ arabic ] = "ãÑÈÚ ÊÍÑíÑ æÓÑÏ";
+ Text[ turkish ] = "Kombinasyon alaný";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_LISTBOX ;
+ HelpID = SID_FM_LISTBOX ;
+ Text = "Listenfeld" ;
+ Text [ ENGLISH ] = "ListBox" ;
+ Text [ portuguese ] = "Caixa de listagem" ;
+ Text [ english_us ] = "List Box" ;
+ Text [ portuguese_brazilian ] = "Listbox" ;
+ Text [ swedish ] = "Listruta" ;
+ Text [ danish ] = "Rulleliste" ;
+ Text [ italian ] = "Casella di riepilogo" ;
+ Text [ spanish ] = "Listado" ;
+ Text [ french ] = "Zone de liste" ;
+ Text [ dutch ] = "Keuzelijst" ;
+ Text[ chinese_simplified ] = "Áбí¿ò";
+ Text[ russian ] = "Ñïèñîê";
+ Text[ polish ] = "Pole listy";
+ Text[ japanese ] = "ؽÄÎÞ¯¸½";
+ Text[ chinese_traditional ] = "²M³æ¤è¶ô";
+ Text[ dutch ] = "Keuzelijst";
+ Text[ chinese_simplified ] = "Áбí¿ò";
+ Text[ greek ] = "Ðåäßï ëßóôáò";
+ Text[ korean ] = "¸ñ·Ï Çʵå";
+ Text[ arabic ] = "ãÑÈÚ ÞÇÆãÉ";
+ Text[ turkish ] = "Liste alaný";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_DATEFIELD ;
+ HelpID = SID_FM_DATEFIELD ;
+ Text = "Datumsfeld" ;
+ Text [ ENGLISH ] = "DateField" ;
+ Text [ portuguese ] = "Campo para data" ;
+ Text [ english_us ] = "Date Field" ;
+ Text [ portuguese_brazilian ] = "Datumsfeld" ;
+ Text [ swedish ] = "Datumfält" ;
+ Text [ danish ] = "Datofelt" ;
+ Text [ italian ] = "Campo data" ;
+ Text [ spanish ] = "Campo de fecha" ;
+ Text [ french ] = "Champ de date" ;
+ Text [ dutch ] = "Datumveld" ;
+ Text[ chinese_simplified ] = "ÈÕÆÚ×Ö¶Î";
+ Text[ russian ] = "Ïîëå äàòû";
+ Text[ polish ] = "Pole daty";
+ Text[ japanese ] = "“ú•t̨°ÙÄÞ";
+ Text[ chinese_traditional ] = "¤é´ÁÄæ¦ì";
+ Text[ dutch ] = "Datumveld";
+ Text[ chinese_simplified ] = "ÈÕÆÚ×Ö¶Î";
+ Text[ greek ] = "Ðåäßï çìåñïìçíßáò";
+ Text[ korean ] = "³¯Â¥ Çʵå";
+ Text[ arabic ] = "ÍÞá ÇáÊÇÑíÎ";
+ Text[ turkish ] = "Tarih alaný";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_TIMEFIELD ;
+ HelpID = SID_FM_TIMEFIELD ;
+ Text = "Zeitfeld" ;
+ Text [ ENGLISH ] = "TimeField" ;
+ Text [ portuguese ] = "Campo horário" ;
+ Text [ english_us ] = "Time Field" ;
+ Text [ portuguese_brazilian ] = "Zeitfeld" ;
+ Text [ swedish ] = "Tidsfält" ;
+ Text [ danish ] = "Klokkeslætsfelt" ;
+ Text [ italian ] = "Campo orario" ;
+ Text [ spanish ] = "Campo horario" ;
+ Text [ french ] = "Champ horaire" ;
+ Text [ dutch ] = "Tijdveld" ;
+ Text[ chinese_simplified ] = "ʱ¼ä×Ö¶Î";
+ Text[ russian ] = "Ïîëå âðåìåíè";
+ Text[ polish ] = "Pole czasu";
+ Text[ japanese ] = "ŽžŠǪ̂°ÙÄÞ";
+ Text[ chinese_traditional ] = "®É¶¡Äæ¦ì";
+ Text[ dutch ] = "Tijdveld";
+ Text[ chinese_simplified ] = "ʱ¼ä×Ö¶Î";
+ Text[ greek ] = "Ðåäßï þñáò";
+ Text[ korean ] = "½Ã°£ Çʵå";
+ Text[ arabic ] = "ÍÞá ÇáæÞÊ";
+ Text[ turkish ] = "Zaman alaný";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_NUMERICFIELD ;
+ HelpID = SID_FM_NUMERICFIELD ;
+ Text = "Numerisches Feld" ;
+ Text [ ENGLISH ] = "NumericField" ;
+ Text [ portuguese ] = "Campo numérico" ;
+ Text [ english_us ] = "Numeric Field" ;
+ Text [ portuguese_brazilian ] = "Numerisches Feld" ;
+ Text [ swedish ] = "Numeriskt fält" ;
+ Text [ danish ] = "Numerisk felt" ;
+ Text [ italian ] = "Campo numerico" ;
+ Text [ spanish ] = "Campo numérico" ;
+ Text [ french ] = "Champ numérique" ;
+ Text [ dutch ] = "Numeriek veld" ;
+ Text[ chinese_simplified ] = "Êý×Ö×Ö¶Î";
+ Text[ russian ] = "×èñëîâîå ïîëå";
+ Text[ polish ] = "Pole numeryczne";
+ Text[ japanese ] = "”Ԇ̨°ÙÄÞ";
+ Text[ chinese_traditional ] = "¼Æ¦rÄæ¦ì";
+ Text[ dutch ] = "Numeriek veld";
+ Text[ chinese_simplified ] = "Êý×Ö×Ö¶Î";
+ Text[ greek ] = "Áñéèìçôéêü ðåäßï";
+ Text[ korean ] = "¼ýÀÚ Çʵå";
+ Text[ arabic ] = "ÍÞá ÑÞãí";
+ Text[ turkish ] = "Sayýsal alan";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CURRENCYFIELD ;
+ HelpID = SID_FM_CURRENCYFIELD ;
+ Text = "Währungsfeld" ;
+ Text [ ENGLISH ] = "CurrencyField" ;
+ Text [ portuguese ] = "Campo para moeda" ;
+ Text [ english_us ] = "Currency Field" ;
+ Text [ portuguese_brazilian ] = "Währungsfeld" ;
+ Text [ swedish ] = "Valutafält" ;
+ Text [ danish ] = "Valutafelt" ;
+ Text [ italian ] = "Campo di valuta" ;
+ Text [ spanish ] = "Campo de moneda" ;
+ Text [ french ] = "Champ monétaire" ;
+ Text [ dutch ] = "Valutaveld" ;
+ Text[ chinese_simplified ] = "µ±Ç°µÄÇøÓò";
+ Text[ russian ] = "Îêíî äëÿ âàëþòû";
+ Text[ polish ] = "Pole walutowe";
+ Text[ japanese ] = "’ʉÝ̨°ÙÄÞ";
+ Text[ chinese_traditional ] = "·í«eªºÄæ¦ì";
+ Text[ dutch ] = "Valutaveld";
+ Text[ chinese_simplified ] = "µ±Ç°µÄÇøÓò";
+ Text[ greek ] = "Ðåäßï íïìßóìáôïò";
+ Text[ korean ] = "ÅëÈ­ Çʵå";
+ Text[ arabic ] = "ÍÞá ÇáÚãáÉ";
+ Text[ turkish ] = "Para birimi alaný";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_PATTERNFIELD ;
+ HelpID = SID_FM_PATTERNFIELD ;
+ Text = "Maskiertes Feld" ;
+ Text [ ENGLISH ] = "PatternField" ;
+ Text [ portuguese ] = "Campo mascarado" ;
+ Text [ english_us ] = "Pattern Field" ;
+ Text [ portuguese_brazilian ] = "Maskiertes Feld" ;
+ Text [ swedish ] = "Maskerat fält" ;
+ Text [ danish ] = "Maskeret felt" ;
+ Text [ italian ] = "Campo a maschera" ;
+ Text [ spanish ] = "Campo enmascarado" ;
+ Text [ french ] = "Champ masqué" ;
+ Text [ dutch ] = "Patroonveld" ;
+ Text[ chinese_simplified ] = "ÑÚÂëÇø";
+ Text[ russian ] = "Ïîëå îáðàçöà";
+ Text[ polish ] = "Pole wzorca";
+ Text[ japanese ] = "ÊßÀ°Ý̨°ÙÄÞ";
+ Text[ chinese_traditional ] = "±»½XÄæ¦ì";
+ Text[ dutch ] = "Patroonveld";
+ Text[ chinese_simplified ] = "ÑÚÂëÇø";
+ Text[ greek ] = "ÊáëõììÝíï ðåäßï";
+ Text[ korean ] = "ÆÐÅÏ Çʵå";
+ Text[ arabic ] = "ÍÞá ãõÞäøóÚ";
+ Text[ turkish ] = "Maskelenmiþ alan";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_FORMATTEDFIELD ;
+ HelpID = SID_FM_FORMATTEDFIELD ;
+ Text = "Formatiertes Feld" ;
+ Text [ ENGLISH ] = "FormattedField" ;
+ Text [ english_us ] = "Formatted Field" ;
+ Text[ portuguese ] = "Campo formatado";
+ Text[ greek ] = "ÌïñöïðïéçìÝíï ðåäßï";
+ Text[ dutch ] = "Opgemaakt veld";
+ Text[ french ] = "Champ formaté";
+ Text[ spanish ] = "Campo formateado";
+ Text[ swedish ] = "Formaterat fält";
+ Text[ russian ] = "Îòôîðìàòèðîâàííîå ïîëå";
+ Text[ italian ] = "Campo formattato";
+ Text[ danish ] = "Formateret felt";
+ Text[ polish ] = "Formatowane pole";
+ Text[ portuguese_brazilian ] = "Formatted Field";
+ Text[ japanese ] = "‘Ž®Ý’肳‚ꂽ̨°ÙÄÞ";
+ Text[ korean ] = "¼­½ÄÀÌ µÈ Çʵå";
+ Text[ chinese_simplified ] = "¸ñʽ»¯µÄÇøÓò";
+ Text[ chinese_traditional ] = "®æ¦¡¤ÆªºÄæ¦ì";
+ Text[ arabic ] = "ÍÞá ãõäÓøóÞ";
+ Text[ turkish ] = "Formatlý alan";
+ };
+ MenuItem
+ {
+ // this is a dummy which is never used herein but for copy to newly built menus
+ Identifier = SID_FM_TWOFIELDS_DATE_N_TIME;
+ HelpId = HID_CONTROLS_DATE_N_TIME;
+ Text = "Datums- und Zeit-Feld" ;
+ Text [ english_us ] = "Date and Time Field" ;
+ Disable = True;
+ Text[ portuguese ] = "Campo para data e hora";
+ Text[ greek ] = "Ðåäßï çìåñïìçíßáò êáé þñáò";
+ Text[ dutch ] = "Datum- en tijdveld";
+ Text[ french ] = "Champ de date et heure";
+ Text[ spanish ] = "Campo de fecha y hora";
+ Text[ swedish ] = "Datum- och klockslagsfält";
+ Text[ russian ] = "Ïîëå äàòû è âðåìåíè";
+ Text[ italian ] = "Campo data e orario";
+ Text[ danish ] = "Dato- og klokkeslætsfelt";
+ Text[ polish ] = "pole na datê i godzinê";
+ Text[ portuguese_brazilian ] = "date and time field";
+ Text[ japanese ] = "“ú•t‚ÆŽžŠÔ‚Į̀°ÙÄÞ";
+ Text[ korean ] = "³¯Â¥¿Í ½Ã°£ Çʵå";
+ Text[ chinese_simplified ] = "ÈÕÆÚºÍʱ¼äÇøÓò";
+ Text[ chinese_traditional ] = "¤é´Á©M®É¶¡Äæ";
+ Text[ arabic ] = "ÍÞá ÊÇÑíÎ ææÞÊ";
+ Text[ turkish ] = "Tarih ve zaman alaný";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "²åÈëÁÐ(~C)";
+ Text[ russian ] = "Âñòàâèòü êîëîíêó";
+ Text[ polish ] = "W~staw kolumnê";
+ Text[ japanese ] = "—ñ‚Ì‘}“ü(~C)";
+ Text[ chinese_traditional ] = "´¡¤JÄæ(~C)";
+ Text[ dutch ] = "~Kolom invoegen";
+ Text[ chinese_simplified ] = "²åÈëÁÐ(~C)";
+ Text[ greek ] = "ÅéóáãùãÞ ~óôÞëçò";
+ Text[ korean ] = "¿­ »ðÀÔ(~C)";
+ Text[ arabic ] = "ÅÏÑÇÌ ÚãæÏ";
+ Text[ turkish ] = "Sütun ekle";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CHANGECOL ;
+ HelpID = SID_FM_CHANGECOL ;
+ Text = "~Ersetzen durch" ;
+ Text [ ENGLISH ] = "~Replace with" ;
+ Text [ english_us ] = "~Replace with" ;
+ Text [ portuguese_brazilian ] = "~¦ndern zu" ;
+ Text [ swedish ] = "Ersätt med" ;
+ Text [ danish ] = "Erstat med" ;
+ Text [ italian ] = "~Sostituisci con" ;
+ Text [ spanish ] = "~Reemplazar con" ;
+ Text [ french ] = "~Remplacer par" ;
+ Text [ dutch ] = "~Vervangen door" ;
+ Text [ portuguese ] = "~Substituir por" ;
+ Text[ chinese_simplified ] = "Ì滻Ϊ(~R)";
+ Text[ russian ] = "Çàìåíèòü íà";
+ Text[ polish ] = "Zmieñ na";
+ Text[ japanese ] = "’u‚«Š·‚¦(~R)";
+ Text[ chinese_traditional ] = "´À¥N¥Î(~R)";
+ Text[ dutch ] = "~Vervangen door";
+ Text[ chinese_simplified ] = "Ì滻Ϊ(~R)";
+ Text[ greek ] = "ÁíôéêáôÜóôáóç ì~å";
+ Text[ korean ] = "´Ù¸¥ °ÍÀ¸·Î ¹Ù²Ù±â(~R)";
+ Text[ arabic ] = "ÇÓÊÈÏÇá ÈÜ";
+ Text[ turkish ] = "Þununla deðiþtir...";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_DELETECOL ;
+ HelpID = SID_FM_DELETECOL ;
+ Text = "Spalte ~löschen" ;
+ Text [ ENGLISH ] = "~Delete column" ;
+ Text [ english_us ] = "Delete Column" ;
+ Text [ portuguese_brazilian ] = "Spalte ~löschen" ;
+ Text [ swedish ] = "Radera ~kolumn" ;
+ Text [ danish ] = "Slet kolonne" ;
+ Text [ italian ] = "Elimina colonna" ;
+ Text [ spanish ] = "~Eliminar columna" ;
+ Text [ french ] = "Supprimer la ~colonne" ;
+ Text [ dutch ] = "Kolom ~wissen" ;
+ Text [ portuguese ] = "E~liminar coluna" ;
+ Text[ chinese_simplified ] = "ɾ³ýÁÐ(~D)";
+ Text[ russian ] = "Óäàëèòü ñòîëáåö";
+ Text[ polish ] = "Usuñ kolumnê";
+ Text[ japanese ] = "—ñ‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£Äæ(~D)";
+ Text[ dutch ] = "Kolom ~wissen";
+ Text[ chinese_simplified ] = "ɾ³ýÁÐ(~D)";
+ Text[ greek ] = "ÄéáãñáöÞ óôÞ~ëçò";
+ Text[ korean ] = "¿­ »èÁ¦";
+ Text[ arabic ] = "ÍÐÝ ÚãæÏ";
+ Text[ turkish ] = "Sütunu sil";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_HIDECOL ;
+ HelpID = SID_FM_HIDECOL ;
+ Text = "Spalte ~ausblenden" ;
+ Text [ ENGLISH ] = "~Hide column" ;
+ Text[ english_us ] = "~Hide Columns";
+ Text[ portuguese ] = "~Ocultar coluna";
+ Text[ greek ] = "~Áðüêñõøç óôÞëçò";
+ Text[ dutch ] = "~Kolom verbergen";
+ Text[ french ] = "~Masquer la colonne";
+ Text[ spanish ] = "~Ocultar columna";
+ Text[ swedish ] = "Dölj kolumn";
+ Text[ russian ] = "Ñêðûòü êîëîíêè";
+ Text[ italian ] = "~Nascondi colonne";
+ Text[ danish ] = "Skjul kolonne";
+ Text[ polish ] = "Ukryj kolumnê";
+ Text[ portuguese_brazilian ] = "~Hide column";
+ Text[ japanese ] = "—ñ‚ð•\\Ž¦‚µ‚È‚¢(~H)";
+ Text[ korean ] = "¿­ ¼û±â±â(~H)";
+ Text[ chinese_simplified ] = "ÒþÈëÁÐ(~H)";
+ Text[ chinese_traditional ] = "Áô¤JÄæ(~H)";
+ Text[ arabic ] = "ÅÎÝÇÁ ÇáÚãæÏ";
+ Text[ turkish ] = "Sütunu gizle";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_SHOWCOLS ;
+ HelpID = SID_FM_SHOWCOLS ;
+ Text = "Spalten ~einblenden" ;
+ Text [ ENGLISH ] = "~Show columns" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_SHOWCOLS_MORE ;
+ HelpID = SID_FM_SHOWCOLS_MORE ;
+ Text = "~Mehr ..." ;
+ Text [ ENGLISH ] = "~More ..." ;
+ Text[ english_us ] = "~More ...";
+ Text[ portuguese ] = "~Mais...";
+ Text[ greek ] = "~Ðåñéóóüôåñá ...";
+ Text[ dutch ] = "~Meer ...";
+ Text[ french ] = "~Plus ...";
+ Text[ spanish ] = "~Más ...";
+ Text[ swedish ] = "Mer ...";
+ Text[ russian ] = "~Áîëüøå ...";
+ Text[ italian ] = "~Più ...";
+ Text[ danish ] = "Flere ...";
+ Text[ polish ] = "Wiêcej ...";
+ Text[ portuguese_brazilian ] = "~More ...";
+ Text[ japanese ] = "‚»‚Ì‘¼(~M)...";
+ Text[ korean ] = "ÀÚ¼¼È÷ (~M)...";
+ Text[ chinese_simplified ] = "ÆäËü(~M)...";
+ Text[ chinese_traditional ] = "¨ä¥L(~M)...";
+ Text[ arabic ] = "ÇáãÒíÏ ...";
+ Text[ language_user1 ] = "(ÄÄ): Þ Ðåñéóóüôåñá Þ åðéðñüóèåôá; - - - -";
+ Text[ turkish ] = "Diðer...";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_SHOWALLCOLS ;
+ HelpID = SID_FM_SHOWALLCOLS ;
+ Text = "~Alle" ;
+ Text [ ENGLISH ] = "~All" ;
+ Text[ english_us ] = "~All";
+ Text[ portuguese ] = "~Todas";
+ Text[ greek ] = "¼ë~á";
+ Text[ dutch ] = "~Alle";
+ Text[ french ] = "~Toutes";
+ Text[ spanish ] = "~Todas";
+ Text[ swedish ] = "Alla";
+ Text[ russian ] = "~Âñå";
+ Text[ italian ] = "~Tutte";
+ Text[ danish ] = "Alle";
+ Text[ polish ] = "Wszystkie";
+ Text[ portuguese_brazilian ] = "~All";
+ Text[ japanese ] = "‚·‚ׂÄ(~A)";
+ Text[ korean ] = "Àüü(~A)";
+ Text[ chinese_simplified ] = "È«²¿(~A)";
+ Text[ chinese_traditional ] = "¥þ³¡(~A)";
+ Text[ arabic ] = "Çáßá";
+ Text[ turkish ] = "Tümü";
+ };
+ };
+ };
+ Text[ english_us ] = "~Show Columns";
+ Text[ portuguese ] = "~Mostrar colunas";
+ Text[ greek ] = "~ÅìöÜíéóç óôçëþí";
+ Text[ dutch ] = "~Kolommen weergeven";
+ Text[ french ] = "~Afficher les colonnes";
+ Text[ spanish ] = "~Mostrar columnas";
+ Text[ swedish ] = "Visa kolumner";
+ Text[ russian ] = "Ïîêàçàòü êîëîíêè";
+ Text[ italian ] = "~Mostra colonne";
+ Text[ danish ] = "Vis kolonner";
+ Text[ polish ] = "Wyœwietl kolumny";
+ Text[ portuguese_brazilian ] = "~Show columns";
+ Text[ japanese ] = "—ñ‚ð•\\Ž¦‚·‚é(~S)";
+ Text[ korean ] = "¿­ ³ªÅ¸³»±â(~S)";
+ Text[ chinese_simplified ] = "ÏÔʾÁÐ(~S)";
+ Text[ chinese_traditional ] = "Åã¥ÜÄæ(~S)";
+ Text[ arabic ] = "ÅÙåÇÑ ÇáÃÚãÏÉ";
+ Text[ turkish ] = "Sütunlarý göster";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_SHOW_PROPERTY_BROWSER ;
+ HelpID = SID_FM_SHOW_PROPERTY_BROWSER ;
+ Text = "~Spalte..." ;
+ Text [ ENGLISH ] = "~Column..." ;
+ Text [ english_us ] = "Column..." ;
+ Text[ italian ] = "~Colonna...";
+ Text[ portuguese_brazilian ] = "~Column...";
+ Text[ portuguese ] = "~Coluna...";
+ Text[ danish ] = "Kolonne...";
+ Text[ french ] = "~Colonne...";
+ Text[ swedish ] = "~Kolumn...";
+ Text[ dutch ] = "~Kolom...";
+ Text[ spanish ] = "~Columna...";
+ Text[ chinese_simplified ] = "ÁÐ(~C)...";
+ Text[ russian ] = "Êîëîíêà...";
+ Text[ polish ] = "Kolumna...";
+ Text[ japanese ] = "—ñ...";
+ Text[ chinese_traditional ] = "Äæ(~C)...";
+ Text[ dutch ] = "~Kolom...";
+ Text[ chinese_simplified ] = "ÁÐ(~C)...";
+ Text[ greek ] = "~ÓôÞëç...";
+ Text[ korean ] = "¿­...";
+ Text[ arabic ] = "...ÚãæÏ";
+ Text[ turkish ] = "Sütun...";
+ };
+ };
+};
+
+Menu RID_SVXMNU_CELL
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ ITEM_EDIT_COPY
+ };
+ };
+};
+
diff --git a/svx/source/fmcomp/makefile.mk b/svx/source/fmcomp/makefile.mk
new file mode 100644
index 0000000000..74906a9559
--- /dev/null
+++ b/svx/source/fmcomp/makefile.mk
@@ -0,0 +1,122 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning 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=fmcomp
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+IMGLST_SRS=$(SRS)$/fmcomp.srs
+BMP_IN=$(PRJ)$/win/res
+
+CXXFILES= \
+ dbbrowse.cxx \
+ dbbrwcbx.cxx \
+ dbbrwchk.cxx \
+ showcols.cxx \
+ gridcols.cxx \
+ gridctrl.cxx \
+ gridcell.cxx \
+ fmgridcl.cxx \
+ fmgridif.cxx \
+ trace.cxx \
+
+SRS1NAME=fmcomp
+SRC1FILES= \
+ dbbrowse.src \
+ gridctrl.src \
+ showcols.src
+
+SLOFILES= \
+ $(SLO)$/dbbrowse.obj \
+ $(SLO)$/dbbrwchk.obj \
+ $(SLO)$/dbbrwcbx.obj \
+ $(SLO)$/showcols.obj \
+ $(SLO)$/gridcols.obj \
+ $(SLO)$/gridctrl.obj \
+ $(SLO)$/gridcell.obj \
+ $(SLO)$/fmgridcl.obj \
+ $(SLO)$/fmgridif.obj \
+ $(SLO)$/trace.obj \
+
+.INCLUDE : target.mk
+
+
+
+
+
+
+
+
+
+
diff --git a/svx/source/fmcomp/showcols.src b/svx/source/fmcomp/showcols.src
new file mode 100644
index 0000000000..9b5ca9cf5f
--- /dev/null
+++ b/svx/source/fmcomp/showcols.src
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * $RCSfile: showcols.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "fmresids.hrc"
+#include "svxids.hrc"
+#include "globlmn.hrc"
+
+ModalDialog RID_SVX_DLG_SHOWGRIDCOLUMNS
+{
+ OutputSize = TRUE;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT( 200, 117 );
+ Text = "Spalten anzeigen";
+ Text [ ENGLISH ] = "Spalten anzeigen";
+ Moveable = TRUE;
+ Closeable = TRUE;
+
+ FixedText 1
+ {
+ Pos = MAP_APPFONT( 6, 6 );
+ Size = MAP_APPFONT( 188, 30 );
+ WordBreak = TRUE;
+ Text = "Folgende Spalten sind augenblicklich versteckt. Markieren Sie bitte die wieder einzublendenden und wählen Sie OK";
+ Text [ ENGLISH ] = "The following columns are hidden currently. Please mark the fields you want to show and chosse OK";
+ Text[ english_us ] = "The following columns are currently hidden. Please mark the fields you want to show and choose OK.";
+ Text[ portuguese ] = "As seguintes colunas encontram-se ocultas. Seleccione as que deseja ver novamente e clique em OK.";
+ Text[ russian ] = "Ñëåäóþùèå êîëîíêè ñïðÿòàíû. Âûäåëèòå òå êîëîíêè, êîòîðûå íåîáõîäèìî ñíîâà ïîêàçàòü è íàæìèòå OK.";
+ Text[ greek ] = "Ïé áêüëïõèåò óôÞëåò åßíáé êñõöÝò ðñïò ôï ðáñüí. Ðáñáêáëþ åðéëÝîôå áõôÝò ðïõ åðéèõìåßôå íá åìöáíéóôïýí êáé ðáôÞóôå óôç óõíÝ÷åéá ôï 'OK'";
+ Text[ dutch ] = "De volgende kolommen zijn momenteel verborgen. Markeer de kolommen die u weer zichtbaar wilt maken en klik op OK.";
+ Text[ french ] = "Les colonnes suivantes sont cachées pour l'instant. Veuillez sélectionner celles que vous souhaitez faire afficher et cliquez sur OK.";
+ Text[ spanish ] = "Las siguientes columnas están por ahora ocultas. Seleccione las que deban mostrarse y pulse sobre Aceptar.";
+ Text[ italian ] = "Le seguenti colonne sono momentaneamente nascoste. Selezionate le colonne da mostrare si nuovo e confermate il comando con OK.";
+ Text[ danish ] = "Følgende kolonner er for tiden skjult. Marker dem, som du igen vil vise, og tryk på OK.";
+ Text[ swedish ] = "Följande kolumner är dolda för närvarande. Markera kolumnerna som skall visas igen och välj OK.";
+ Text[ polish ] = "Nastêpuj¹ce kolumny s¹ narazie ukryte. Zaznacz proszê wszystkie kolumny, który maj¹ zostaæ wyœwietlone i naciœnij OK.";
+ Text[ portuguese_brazilian ] = "The following columns are hidden currently. Please mark the fields you want to show and chosse OK";
+ Text[ japanese ] = "ŽŸ‚Ì—ñ‚ÍŒ»Ý‰B‚³‚ê‚Ä‚¢‚Ü‚·B•\\Ž¦‚·‚ׂ«—ñ‚ð‘I‘ð‚µ‚ÄOK‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B";
+ Text[ korean ] = "´ÙÀ½ ¿­µéÀº ÇöÀç ¼û°ÜÁø »óÅÂÀÔ´Ï´Ù. ´Ù½Ã ³ªÅ¸³»°íÀÚ ÇÏ´Â ¿­À» ¼±Åà ǥ½ÃÇÏ¿© È®ÀÎ ¹öÆ°À» Ŭ¸¯ÇϽʽÿÀ.";
+ Text[ chinese_simplified ] = "ÒÔϵÄÁÐÄ¿Ç°±»ÒþÈë¡£ÇëÄú±ê¼ÇÒªÏÔʾµÄÁÐÇøÓò²¢°´»÷È·¶¨(OK)°´Å¥";
+ Text[ chinese_traditional ] = "¥H¤UªºÄæ¬OÁô¤Jªº¡C½Ð±z¿ï¨ú­nÅã¥ÜªºÄæ¡AµM¦Z«ö¤@¤U½T©w¡C";
+ Text[ arabic ] = "åÐå ÇáÃÚãÏÉ ãÎÝíÉ ÍÇáíÇð. ÇáÑÌÇÁ ÊÍÏíÏ ÇáÃÚãÏÉ ÇáÊí ÊÑíÏ ÅÙåÇÑåÇ¡ Ëã ÇáäÞÑ ÝæÞ \"ÍÓäÇð\"";
+ Text[ turkish ] = "Þu sütunlar þu an gizlenmiþ durumda. Tekrar görüntülemek istediklerinizi seçin ve \"Tamam\" düðmesini týklayýn.";
+ };
+
+ ListBox 1
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 6, 39 );
+ Size = MAP_APPFONT( 188, 55 );
+ TabStop = TRUE;
+ DropDown = FALSE;
+ AutoHScroll = TRUE;
+ VScroll = TRUE;
+ };
+
+ OKButton 1
+ {
+ Pos = MAP_APPFONT( 6, 97 );
+ Size = MAP_APPFONT( 50, 14 );
+ TabStop = TRUE;
+ DefButton = TRUE ;
+ };
+
+ CancelButton 1
+ {
+ Pos = MAP_APPFONT( 144, 97 );
+ Size = MAP_APPFONT( 50, 14 );
+ TabStop = TRUE;
+ };
+ Text[ english_us ] = "Show columns";
+ Text[ portuguese ] = "Mostrar colunas";
+ Text[ russian ] = "Ïîêàçàòü êîëîíêè";
+ Text[ greek ] = "ÅìöÜíéóç óôçëþí";
+ Text[ dutch ] = "Kolommen weergeven";
+ Text[ french ] = "Afficher les colonnes";
+ Text[ spanish ] = "Mostrar columnas";
+ Text[ italian ] = "Mostra colonne";
+ Text[ danish ] = "Vis kolonner";
+ Text[ swedish ] = "Visa kolumner";
+ Text[ polish ] = "Wyœwietl kolumny";
+ Text[ portuguese_brazilian ] = "Spalten anzeigen";
+ Text[ japanese ] = "—ñ‚ð•\\Ž¦‚·‚é";
+ Text[ korean ] = "¿­ Ç¥½Ã";
+ Text[ chinese_simplified ] = "ÏÔʾÁÐ";
+ Text[ chinese_traditional ] = "Åã¥ÜÄæ";
+ Text[ arabic ] = "ÅÙåÇÑ ÇáÃÚãÏÉ";
+ Text[ turkish ] = "Sütunlarý görüntüle";
+ Text[ language_user1 ] = " ";
+};
+
diff --git a/svx/source/fmcomp/trace.cxx b/svx/source/fmcomp/trace.cxx
new file mode 100644
index 0000000000..241eab6ace
--- /dev/null
+++ b/svx/source/fmcomp/trace.cxx
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * $RCSfile: trace.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _TRACE_HXX_
+#include "trace.hxx"
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#if defined(DBG_UTIL) && defined(ENABLE_RANGE_TRACING)
+
+//==============================================================================
+
+//------------------------------------------------------------------------------
+::vos::OMutex Tracer::s_aMapSafety;
+map< ::vos::OThread::TThreadIdentifier, INT32, ::std::less< ::vos::OThread::TThreadIdentifier > >
+ Tracer::s_aThreadIndents;
+
+//------------------------------------------------------------------------------
+Tracer::Tracer(const char* _pBlockDescription)
+ :m_sBlockDescription(_pBlockDescription)
+{
+ ::vos::OGuard aGuard(s_aMapSafety);
+ INT32 nIndent = s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ]++;
+
+ ByteString sIndent;
+ while (nIndent--)
+ sIndent += '\t';
+
+ ByteString sThread((INT32)::vos::OThread::getCurrentIdentifier());
+ sThread += '\t';
+
+ ByteString sMessage(sThread);
+ sMessage += sIndent;
+ sMessage += "=>\t";
+ sMessage += m_sBlockDescription;
+ DBG_TRACE(sMessage);
+}
+
+//------------------------------------------------------------------------------
+Tracer::~Tracer()
+{
+ ::vos::OGuard aGuard(s_aMapSafety);
+ INT32 nIndent = --s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ];
+
+ ByteString sIndent;
+ while (nIndent--)
+ sIndent += '\t';
+
+ ByteString sThread((INT32)::vos::OThread::getCurrentIdentifier());
+ sThread += '\t';
+
+ ByteString sMessage(sThread);
+ sMessage += sIndent;
+ sMessage += "<=\t";
+ sMessage += m_sBlockDescription;
+ DBG_TRACE(sMessage);
+}
+
+//------------------------------------------------------------------------------
+void Tracer::TraceString(const char* _pMessage)
+{
+ ::vos::OGuard aGuard(s_aMapSafety);
+ INT32 nIndent = s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ];
+
+ ByteString sIndent;
+ while (nIndent--)
+ sIndent += '\t';
+
+ ByteString sThread((INT32)::vos::OThread::getCurrentIdentifier());
+ sThread += '\t';
+
+ ByteString sMessage(sThread);
+ sMessage += sIndent;
+ sMessage += m_sBlockDescription;
+ sMessage += ": ";
+ sMessage += _pMessage;
+ DBG_TRACE(sMessage);
+}
+
+//------------------------------------------------------------------------------
+void Tracer::TraceString1StringParam(const char* _pMessage, const char* _pParam)
+{
+ ::vos::OGuard aGuard(s_aMapSafety);
+ INT32 nIndent = s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ];
+
+ ByteString sIndent;
+ while (nIndent--)
+ sIndent += '\t';
+
+ ByteString sThread((INT32)::vos::OThread::getCurrentIdentifier());
+ sThread += '\t';
+
+ ByteString sMessage(sThread);
+ sMessage += sIndent;
+ sMessage += m_sBlockDescription;
+ sMessage += ": ";
+ sMessage += _pMessage;
+ DBG_TRACE1(sMessage, _pParam);
+}
+#endif
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
new file mode 100644
index 0000000000..8fe1fda639
--- /dev/null
+++ b/svx/source/form/filtnav.cxx
@@ -0,0 +1,2035 @@
+/*************************************************************************
+ *
+ * $RCSfile: filtnav.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _SVX_FMCTRLER_HXX
+#include "fmctrler.hxx"
+#endif
+
+#ifndef _SVX_FILTNAV_HXX
+#include "filtnav.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLER_HPP_
+#include <com/sun/star/form/XFormController.hpp>
+#endif
+
+#ifndef _SV_EXCHANGE_HXX
+#include <vcl/exchange.hxx>
+#endif
+
+#ifndef _DTRANS_HXX
+#include <so3/dtrans.hxx>
+#endif
+
+#ifndef _SVX_FMEXCH_HXX
+#include <fmexch.hxx>
+#endif
+
+#ifndef _SVX_FMITEMS_HXX
+#include "fmitems.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+
+#ifndef _SVX_FMHELP_HRC
+#include "fmhelp.hrc"
+#endif
+
+#ifndef _SVX_DIALMGR_HXX //autogen
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+
+#ifndef _SFX_OBJITEM_HXX //autogen
+#include <sfx2/objitem.hxx>
+#endif
+
+#ifndef _SFXREQUEST_HXX
+#include <sfx2/request.hxx>
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVT_SDBPARSE_HXX //autogen wg. SdbSqlParser
+#include <svtools/sdbparse.hxx>
+#endif
+
+#ifndef _WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+
+#ifndef _SVX_FMSHELL_HXX //autogen
+#include <fmshell.hxx>
+#endif
+
+#ifndef _SVX_FMSHIMP_HXX
+#include <fmshimp.hxx>
+#endif
+
+#ifndef _SVX_FMSERVS_HXX
+#include <fmservs.hxx>
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include <fmtools.hxx>
+#endif
+
+#ifndef _SVX_DBERRBOX_HXX
+#include "dbmsgbox.hxx"
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UTL_UNO3_HXX_
+#include <unotools/uno3.hxx>
+#endif
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#endif
+#ifndef _UTL_SEQUENCE_HXX_
+#include <unotools/sequence.hxx>
+#endif
+#ifndef _SVX_FMFILTER_HXX
+#include "fmfilter.hxx"
+#endif
+#ifndef _SVX_GRIDCELL_HXX
+#include "gridcell.hxx"
+#endif
+
+#define SYNC_DELAY 200
+#define DROP_ACTION_TIMER_INITIAL_TICKS 10
+ // solange dauert es, bis das Scrollen anspringt
+#define DROP_ACTION_TIMER_SCROLL_TICKS 3
+ // in diesen Intervallen wird jeweils eine Zeile gescrollt
+#define DROP_ACTION_TIMER_TICK_BASE 10
+ // das ist die Basis, mit der beide Angaben multipliziert werden (in ms)
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+
+
+//========================================================================
+SvxFmFilterExch::SvxFmFilterExch(FmFormItem* pFormItem, const ::std::vector<FmFilterItem*>& lstWhich )
+ :m_aDraggedEntries(lstWhich)
+ ,m_pFormItem(pFormItem)
+{
+ m_aDataTypeList.Insert( SvDataType(Exchange::RegisterFormatName(SVX_FM_FILTER_FIELDS)) );
+}
+
+//------------------------------------------------------------------------
+sal_Bool SvxFmFilterExch::GetData( SvData* pData )
+{
+ return sal_False;
+}
+
+//========================================================================
+TYPEINIT0(FmFilterData);
+Image FmFilterData::GetImage() const {return Image();}
+
+//========================================================================
+TYPEINIT1(FmParentData, FmFilterData);
+//------------------------------------------------------------------------
+FmParentData::~FmParentData()
+{
+ for (::std::vector<FmFilterData*>::const_iterator i = m_aChilds.begin();
+ i != m_aChilds.end(); i++)
+ delete (*i);
+}
+
+//========================================================================
+TYPEINIT1(FmFormItem, FmParentData);
+//------------------------------------------------------------------------
+Image FmFormItem::GetImage() const
+{
+ static Image aImage;
+ if (!aImage)
+ {
+ ImageList aNavigatorImages(SVX_RES(RID_SVXIMGLIST_FMEXPL));
+ aImage = aNavigatorImages.GetImage( RID_SVXIMG_FORM );
+ }
+ return aImage;
+}
+
+//========================================================================
+TYPEINIT1(FmFilterItems, FmParentData);
+//------------------------------------------------------------------------
+FmFilterItem* FmFilterItems::Find(const Reference< ::com::sun::star::awt::XTextComponent > & _xText) const
+{
+ for (vector<FmFilterData*>::const_iterator i = m_aChilds.begin();
+ i != m_aChilds.end(); i++)
+ {
+ FmFilterItem* pCond = PTR_CAST(FmFilterItem, *i);
+ DBG_ASSERT(pCond, "Wrong element in container");
+ if (_xText == pCond->GetTextComponent())
+ return pCond;
+ }
+ return NULL;
+}
+
+//------------------------------------------------------------------------
+Image FmFilterItems::GetImage() const
+{
+ static Image aImage;
+ if (!aImage)
+ {
+ ImageList aNavigatorImages(SVX_RES(RID_SVXIMGLIST_FMEXPL));
+ aImage = aNavigatorImages.GetImage( RID_SVXIMG_FILTER );
+ }
+ return aImage;
+}
+
+//========================================================================
+TYPEINIT1(FmFilterItem, FmFilterData);
+//------------------------------------------------------------------------
+FmFilterItem::FmFilterItem(FmFilterItems* pParent,
+ const ::rtl::OUString& aFieldName,
+ const ::rtl::OUString& aText,
+ const Reference< ::com::sun::star::awt::XTextComponent > & _xText)
+ :FmFilterData(pParent, aText)
+ ,m_aFieldName(aFieldName)
+ ,m_xText(_xText)
+{
+}
+
+//------------------------------------------------------------------------
+Image FmFilterItem::GetImage() const
+{
+ static Image aImage;
+ if (!aImage)
+ {
+ ImageList aNavigatorImages(SVX_RES(RID_SVXIMGLIST_FMEXPL));
+ aImage = aNavigatorImages.GetImage( RID_SVXIMG_FIELD );
+ }
+ return aImage;
+}
+
+//========================================================================
+// Hints for communicatition between model and view
+//========================================================================
+class FmFilterHint : public SfxHint
+{
+ FmFilterData* m_pData;
+
+public:
+ TYPEINFO();
+ FmFilterHint(FmFilterData* pData):m_pData(pData){}
+ FmFilterData* GetData() const { return m_pData; }
+};
+TYPEINIT1( FmFilterHint, SfxHint );
+
+//========================================================================
+class FmFilterInsertedHint : public FmFilterHint
+{
+ sal_Int32 m_nPos; // Position relative to the parent of the data
+
+public:
+ TYPEINFO();
+ FmFilterInsertedHint(FmFilterData* pData, sal_Int32 nRelPos)
+ :FmFilterHint(pData)
+ ,m_nPos(nRelPos){}
+
+ sal_Int32 GetPos() const { return m_nPos; }
+};
+TYPEINIT1( FmFilterInsertedHint, FmFilterHint );
+
+//========================================================================
+class FmFilterReplacedHint : public FmFilterHint
+{
+public:
+ TYPEINFO();
+ FmFilterReplacedHint(FmFilterData* pData)
+ :FmFilterHint(pData){}
+
+};
+TYPEINIT1( FmFilterReplacedHint, FmFilterHint );
+
+//========================================================================
+class FmFilterRemovedHint : public FmFilterHint
+{
+public:
+ TYPEINFO();
+ FmFilterRemovedHint(FmFilterData* pData)
+ :FmFilterHint(pData){}
+
+};
+TYPEINIT1( FmFilterRemovedHint, FmFilterHint );
+
+//========================================================================
+class FmFilterTextChangedHint : public FmFilterHint
+{
+public:
+ TYPEINFO();
+ FmFilterTextChangedHint(FmFilterData* pData)
+ :FmFilterHint(pData){}
+
+};
+TYPEINIT1( FmFilterTextChangedHint, FmFilterHint );
+
+//========================================================================
+class FmFilterClearedHint : public SfxHint
+{
+public:
+ TYPEINFO();
+ FmFilterClearedHint(){}
+};
+TYPEINIT1( FmFilterClearedHint, SfxHint );
+
+//========================================================================
+class FmFilterCurrentChangedHint : public SfxHint
+{
+public:
+ TYPEINFO();
+ FmFilterCurrentChangedHint(){}
+};
+TYPEINIT1( FmFilterCurrentChangedHint, SfxHint );
+
+//========================================================================
+// class FmFilterAdapter, Listener an den FilterControls
+//========================================================================
+class FmFilterAdapter : public ::cppu::WeakImplHelper1< ::com::sun::star::awt::XTextListener >
+{
+ FmFilterControls m_aFilterControls;
+ FmFilterModel* m_pModel;
+
+public:
+ FmFilterAdapter(FmFilterModel* pModel, const Reference< ::com::sun::star::container::XIndexAccess >& xControllers);
+
+// ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( RuntimeException );
+
+// ::com::sun::star::awt::XTextListener
+ virtual void SAL_CALL textChanged(const ::com::sun::star::awt::TextEvent& e);
+
+// helpers
+ void dispose() throw( RuntimeException );
+
+ void InsertElements(const Reference< ::com::sun::star::container::XIndexAccess >& xControllers);
+ void RemoveElement(const Reference< ::com::sun::star::awt::XTextComponent > & xText);
+
+ Reference< ::com::sun::star::beans::XPropertySet > getField(const Reference< ::com::sun::star::awt::XTextComponent > & xText) const;
+ void setText(sal_Int32 nPos,
+ const FmFilterItem* pFilterItem,
+ const ::rtl::OUString& rText);
+ void DeleteItemsByText(::std::vector<FmFilterData*>& rItems, const Reference< ::com::sun::star::awt::XTextComponent > & xText);
+ Reference< ::com::sun::star::form::XForm > findForm(const Reference< ::com::sun::star::container::XChild >& xChild);
+};
+
+//------------------------------------------------------------------------
+FmFilterAdapter::FmFilterAdapter(FmFilterModel* pModel, const Reference< ::com::sun::star::container::XIndexAccess >& xControllers)
+ :m_pModel(pModel)
+{
+ InsertElements(xControllers);
+
+ // listen on all controls as text listener
+ for (FmFilterControls::const_iterator iter = m_aFilterControls.begin();
+ iter != m_aFilterControls.end(); iter++)
+ (*iter).first->addTextListener(this);
+}
+
+//------------------------------------------------------------------------
+void FmFilterAdapter::dispose() throw( RuntimeException )
+{
+ // clear the filter control map
+ for (FmFilterControls::const_iterator iter = m_aFilterControls.begin();
+ iter != m_aFilterControls.end(); iter++)
+ (*iter).first->removeTextListener(this);
+
+ m_aFilterControls.clear();
+}
+
+//------------------------------------------------------------------------------
+// delete all items relate to the control
+void FmFilterAdapter::DeleteItemsByText(::std::vector<FmFilterData*>& rItems,
+ const Reference< ::com::sun::star::awt::XTextComponent > & xText)
+{
+ for (::std::vector<FmFilterData*>::reverse_iterator i = rItems.rbegin();
+ // link problems with operator ==
+ i.base() != rItems.rend().base(); i++)
+ {
+ FmFilterItems* pFilterItems = PTR_CAST(FmFilterItems, *i);
+ if (pFilterItems)
+ {
+ FmFilterItem* pFilterItem = pFilterItems->Find(xText);
+ if (pFilterItem)
+ {
+ // remove the condition
+ ::std::vector<FmFilterData*>& rItems = pFilterItems->GetChilds();
+ ::std::vector<FmFilterData*>::iterator j = find(rItems.begin(), rItems.end(), pFilterItem);
+ if (j != rItems.end())
+ m_pModel->Remove(j, pFilterItem);
+ }
+ continue;
+ }
+ FmFormItem* pFormItem = PTR_CAST(FmFormItem, *i);
+ if (pFormItem)
+ DeleteItemsByText(pFormItem->GetChilds(), xText);
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFilterAdapter::InsertElements(const Reference< ::com::sun::star::container::XIndexAccess >& xControllers)
+{
+ for (sal_Int32 i = 0, nLen = xControllers->getCount(); i < nLen; ++i)
+ {
+ Reference< ::com::sun::star::container::XIndexAccess > xElement;
+ xControllers->getByIndex(i) >>= xElement;
+
+ // Insert the Elements of the controller
+ InsertElements(xElement);
+
+ // store the filter controls
+ FmXFormController* pController = NULL;
+ // ::utl::getImplementation(pController, Reference<XUnoTunnel>(xElement, UNO_QUERY));
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel(xElement,::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xTunnel.is(), "FmFilterAdapter::InsertElements : xTunnel is invalid!");
+ if(xTunnel.is())
+ {
+ pController = (FmXFormController*)xTunnel->getSomething(FmXFormController::getUnoTunnelImplementationId());
+ }
+
+ const FmFilterControls& rControls = pController->getFilterControls();
+ for (FmFilterControls::const_iterator iter = rControls.begin(); iter != rControls.end(); ++iter )
+ m_aFilterControls.insert(*iter);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmFilterAdapter::RemoveElement(const Reference< ::com::sun::star::awt::XTextComponent > & xText)
+{
+ if (xText.is())
+ {
+ // alle Level durchlaufen und eintraege entfernen
+ if (m_pModel)
+ DeleteItemsByText(m_pModel->GetChilds(), xText);
+
+ FmFilterControls::iterator iter = m_aFilterControls.find(xText);
+ if (iter != m_aFilterControls.end())
+ m_aFilterControls.erase(iter);
+ }
+}
+
+//------------------------------------------------------------------------
+Reference< ::com::sun::star::beans::XPropertySet > FmFilterAdapter::getField(const Reference< ::com::sun::star::awt::XTextComponent > & xText) const
+{
+ Reference< ::com::sun::star::beans::XPropertySet > xField;
+ FmFilterControls::const_iterator i = m_aFilterControls.find(xText);
+ if (i != m_aFilterControls.end())
+ xField = (*i).second;
+
+ return xField;
+}
+
+//------------------------------------------------------------------------
+void FmFilterAdapter::setText(sal_Int32 nRowPos,
+ const FmFilterItem* pFilterItem,
+ const ::rtl::OUString& rText)
+{
+ // set the text for the text component
+ Reference< ::com::sun::star::awt::XTextComponent > xText(pFilterItem->GetTextComponent());
+ xText->setText(rText);
+
+ // get the controller of the text component and its filter rows
+ FmFormItem* pFormItem = PTR_CAST(FmFormItem,pFilterItem->GetParent()->GetParent());
+ FmXFormController* pController = NULL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel(pFormItem->GetController(),::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xTunnel.is(), "FmFilterAdapter::InsertElements : xTunnel is invalid!");
+ if(xTunnel.is())
+ {
+ pController = (FmXFormController*)xTunnel->getSomething(FmXFormController::getUnoTunnelImplementationId());
+ }
+ // ::utl::getImplementation(pController, Reference<XUnoTunnel>(pFormItem->GetController(),UNO_QUERY));
+ FmFilterRows& rRows = pController->getFilterRows();
+
+ DBG_ASSERT(nRowPos < rRows.size(), "wrong row pos");
+ // Suchen der aktuellen Row
+ FmFilterRow& rRow = rRows[nRowPos];
+
+ // do we have a new filter
+ if (rText.len())
+ rRow[xText] = rText;
+ else
+ {
+ // do we have the control in the row
+ FmFilterRow::iterator iter = rRow.find(xText);
+ // erase the entry out of the row
+ if (iter != rRow.end())
+ rRow.erase(iter);
+ }
+}
+
+
+// ::com::sun::star::lang::XEventListener
+//------------------------------------------------------------------------
+void SAL_CALL FmFilterAdapter::disposing(const ::com::sun::star::lang::EventObject& e) throw( RuntimeException )
+{
+ Reference< ::com::sun::star::awt::XTextComponent > xText(e.Source,UNO_QUERY);
+ if (xText.is())
+ RemoveElement(xText);
+}
+
+// XTextListener
+//------------------------------------------------------------------------
+Reference< ::com::sun::star::form::XForm > FmFilterAdapter::findForm(const Reference< ::com::sun::star::container::XChild >& xChild)
+{
+ Reference< ::com::sun::star::form::XForm > xForm;
+ if (xChild.is())
+ {
+ xForm = Reference< ::com::sun::star::form::XForm >(xChild->getParent(), UNO_QUERY);
+ if (!xForm.is())
+ xForm = findForm(Reference< ::com::sun::star::container::XChild >(xChild->getParent(), UNO_QUERY));
+ }
+ return xForm;
+}
+
+// XTextListener
+//------------------------------------------------------------------------
+void FmFilterAdapter::textChanged(const ::com::sun::star::awt::TextEvent& e)
+{
+ // Find the according formitem in the
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl(e.Source, UNO_QUERY);
+ if (!m_pModel || !xControl.is())
+ return;
+
+ Reference< ::com::sun::star::form::XForm > xForm(findForm(Reference< ::com::sun::star::container::XChild >(xControl->getModel(), UNO_QUERY)));
+ if (!xForm.is())
+ return;
+
+ FmFormItem* pFormItem = m_pModel->Find(m_pModel->m_aChilds, xForm);
+ if (pFormItem)
+ {
+ Reference< ::com::sun::star::awt::XTextComponent > xText(e.Source, UNO_QUERY);
+ FmFilterItems* pFilter = PTR_CAST(FmFilterItems, pFormItem->GetChilds()[pFormItem->GetCurrentPosition()]);
+ FmFilterItem* pFilterItem = pFilter->Find(xText);
+ if (pFilterItem)
+ {
+ if (xText->getText().len())
+ {
+ pFilterItem->SetText(xText->getText());
+ // UI benachrichtigen
+ FmFilterTextChangedHint aChangeHint(pFilterItem);
+ m_pModel->Broadcast( aChangeHint );
+ }
+ else
+ {
+ // no text anymore so remove the condition
+ m_pModel->Remove(pFilterItem);
+ }
+ }
+ else
+ {
+ // searching the component by field name
+ ::rtl::OUString aFieldName = getLabelName(Reference< ::com::sun::star::beans::XPropertySet > (Reference< ::com::sun::star::awt::XControl > (xText, UNO_QUERY)->getModel(),UNO_QUERY));
+
+ pFilterItem = new FmFilterItem(pFilter, aFieldName, xText->getText(), xText);
+ m_pModel->Insert(pFilter->GetChilds().end(), pFilterItem);
+ }
+ m_pModel->CheckIntegrity(pFormItem);
+ }
+}
+
+//========================================================================
+// class FmFilterModel
+//========================================================================
+TYPEINIT1(FmFilterModel, FmParentData);
+//------------------------------------------------------------------------
+FmFilterModel::FmFilterModel()
+ :FmParentData(NULL, ::rtl::OUString())
+ ,m_pAdapter(NULL)
+ ,m_pCurrentItems(NULL)
+{
+}
+
+//------------------------------------------------------------------------
+FmFilterModel::~FmFilterModel()
+{
+ Clear();
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::Clear()
+{
+ if (m_pAdapter)
+ {
+ m_pAdapter->dispose();
+ m_pAdapter->release();
+ m_pAdapter= NULL;
+ }
+
+ m_pCurrentItems = NULL;
+ m_xController = NULL;
+ m_xControllers = NULL;
+
+ for (::std::vector<FmFilterData*>::const_iterator i = m_aChilds.begin();
+ i != m_aChilds.end(); i++)
+ delete (*i);
+
+ m_aChilds.clear();
+
+ // UI benachrichtigen
+ FmFilterClearedHint aClearedHint;
+ Broadcast( aClearedHint );
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::Update(const Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const Reference< ::com::sun::star::form::XFormController > & xCurrent)
+{
+ if ((::com::sun::star::form::XFormController*) xCurrent.get() == (::com::sun::star::form::XFormController*) m_xController.get())
+ return;
+
+ if (!xControllers.is())
+ {
+ Clear();
+ return;
+ }
+
+ // there is only a new current controller
+ if ((::com::sun::star::container::XIndexAccess*)m_xControllers.get() != (::com::sun::star::container::XIndexAccess*)xControllers.get())
+ {
+ Clear();
+
+ m_xControllers = xControllers;
+ Update(m_xControllers, this);
+
+ DBG_ASSERT(xCurrent.is(), "FmFilterModel::Update(...) no current controller");
+
+ // Listening for TextChanges
+ m_pAdapter = new FmFilterAdapter(this, xControllers);
+ m_pAdapter->acquire();
+
+ SetCurrentController(xCurrent);
+ CheckIntegrity(this);
+ }
+ else
+ SetCurrentController(xCurrent);
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::Update(const Reference< ::com::sun::star::container::XIndexAccess > & xControllers, FmParentData* pParent)
+{
+ sal_Int32 nCount = xControllers->getCount();
+ for (sal_Int32 i = 0; i < nCount; i++)
+ {
+ Reference< ::com::sun::star::form::XFormController > xController(*(Reference< ::com::sun::star::form::XFormController > *)xControllers->getByIndex(i).getValue());
+ Reference< ::com::sun::star::beans::XPropertySet > xModelAsSet(xController->getModel(), UNO_QUERY);
+ ::rtl::OUString aName = ::utl::getString(xModelAsSet->getPropertyValue(FM_PROP_NAME));
+
+ // Insert a new ::com::sun::star::form
+ FmFormItem* pFormItem = new FmFormItem(pParent, xController, aName);
+ Insert(pParent->GetChilds().end(), pFormItem);
+
+ // And now insert the filters for the form
+ FmXFormController* pController = NULL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel(pFormItem->GetController(),::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xTunnel.is(), "FmFilterAdapter::InsertElements : xTunnel is invalid!");
+ if(xTunnel.is())
+ {
+ pController = (FmXFormController*)xTunnel->getSomething(FmXFormController::getUnoTunnelImplementationId());
+ }
+ // ::utl::getImplementation(pController, Reference<XUnoTunnel>(pFormItem->GetController(),UNO_QUERY));
+
+ INT32 nPos = pController->getCurrentFilterPosition();
+ pFormItem->SetCurrentPosition(nPos);
+
+ String aTitle(SVX_RES(RID_STR_FILTER_FILTER_FOR));
+ const FmFilterRows& rRows = pController->getFilterRows();
+ for (FmFilterRows::const_iterator iter = rRows.begin(); iter != rRows.end(); ++iter)
+ {
+ const FmFilterRow& rRow = *iter;
+ // now add the filter rows
+ // One Row always exists
+
+ FmFilterItems* pFilterItems = new FmFilterItems(pFormItem, aTitle);
+ Insert(pFormItem->GetChilds().end(), pFilterItems);
+ for (FmFilterRow::const_iterator iter1 = rRow.begin(); iter1 != rRow.end(); ++iter1)
+ {
+ // insert new and conditons
+ ::rtl::OUString aFieldName = getLabelName(Reference< ::com::sun::star::beans::XPropertySet > (Reference< ::com::sun::star::awt::XControl > ((*iter1).first, UNO_QUERY)->getModel(),UNO_QUERY));
+ FmFilterItem* pANDCondition = new FmFilterItem(pFilterItems, aFieldName, (*iter1).second, (*iter1).first);
+ Insert(pFilterItems->GetChilds().end(), pANDCondition);
+ }
+ // title for the next conditions
+ aTitle = SVX_RES(RID_STR_FILTER_FILTER_OR);
+ }
+
+ // now add dependent controllers
+ Reference< ::com::sun::star::container::XIndexAccess > xControllerAsIndex(xController, UNO_QUERY);
+ Update(xControllerAsIndex, pFormItem);
+ }
+}
+
+//------------------------------------------------------------------------
+FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, const Reference< ::com::sun::star::form::XFormController > & xController) const
+{
+ for (::std::vector<FmFilterData*>::const_iterator i = rItems.begin();
+ i != rItems.end(); i++)
+ {
+ FmFormItem* pForm = PTR_CAST(FmFormItem,*i);
+ if (pForm)
+ {
+ if ((::com::sun::star::form::XFormController*)xController.get() == (::com::sun::star::form::XFormController*)pForm->GetController().get())
+ return pForm;
+ else
+ {
+ pForm = Find(pForm->GetChilds(), xController);
+ if (pForm)
+ return pForm;
+ }
+ }
+ }
+ return NULL;
+}
+
+//------------------------------------------------------------------------
+FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, const Reference< ::com::sun::star::form::XForm >& xForm) const
+{
+ for (::std::vector<FmFilterData*>::const_iterator i = rItems.begin();
+ i != rItems.end(); i++)
+ {
+ FmFormItem* pForm = PTR_CAST(FmFormItem,*i);
+ if (pForm)
+ {
+ if (xForm == pForm->GetController()->getModel())
+ return pForm;
+ else
+ {
+ pForm = Find(pForm->GetChilds(), xForm);
+ if (pForm)
+ return pForm;
+ }
+ }
+ }
+ return NULL;
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::SetCurrentController(const Reference< ::com::sun::star::form::XFormController > & xCurrent)
+{
+ if ((::com::sun::star::form::XFormController*) xCurrent.get() == (::com::sun::star::form::XFormController*) m_xController.get())
+ return;
+
+ m_xController = xCurrent;
+
+ FmFormItem* pItem = Find(m_aChilds, xCurrent);
+ if (pItem)
+ SetCurrentItems((FmFilterItems*)pItem->GetChilds()[pItem->GetCurrentPosition()]);
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::AppendFilterItems(FmFormItem* pFormItem)
+{
+ DBG_ASSERT(pFormItem, "AppendFilterItems(): no form item present");
+
+ FmFilterItems* pFilterItems = new FmFilterItems(pFormItem, ::rtl::OUString(SVX_RES(RID_STR_FILTER_FILTER_OR)));
+ // insert the condition behind the last filter items
+ ::std::vector<FmFilterData*>::reverse_iterator iter;
+ for (iter = pFormItem->GetChilds().rbegin();
+ // link problems with operator ==
+ iter.base() != pFormItem->GetChilds().rend().base(); iter++)
+ {
+ if ((*iter)->ISA(FmFilterItems))
+ break;
+ }
+ sal_Int32 nInsertPos = iter.base() - pFormItem->GetChilds().rend().base();
+ ::std::vector<FmFilterData*>::iterator i = pFormItem->GetChilds().begin() + nInsertPos;
+
+ Insert(i, pFilterItems);
+
+ // do we need a new row
+ FmXFormController* pController = NULL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel(pFormItem->GetController(),::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xTunnel.is(), "FmFilterAdapter::InsertElements : xTunnel is invalid!");
+ if(xTunnel.is())
+ {
+ pController = (FmXFormController*)xTunnel->getSomething(FmXFormController::getUnoTunnelImplementationId());
+ }
+ // ::utl::getImplementation(pController, Reference<XUnoTunnel>(pFormItem->GetController(),UNO_QUERY));
+ FmFilterRows& rRows = pController->getFilterRows();
+
+ // determine the filter position
+ if (nInsertPos >= rRows.size())
+ rRows.push_back(FmFilterRow());
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::Insert(const ::std::vector<FmFilterData*>::iterator& rPos, FmFilterData* pData)
+{
+ ::std::vector<FmFilterData*>& rItems = pData->GetParent()->GetChilds();
+ sal_Int32 nPos = rPos == rItems.end() ? LIST_APPEND : rPos - rItems.begin();
+ rItems.insert(rPos, pData);
+
+ // UI benachrichtigen
+ FmFilterInsertedHint aInsertedHint(pData, nPos);
+ Broadcast( aInsertedHint );
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::Remove(FmFilterData* pData)
+{
+ FmParentData* pParent = pData->GetParent();
+ ::std::vector<FmFilterData*>& rItems = pParent->GetChilds();
+
+ // erase the item from the model
+ ::std::vector<FmFilterData*>::iterator i = find(rItems.begin(), rItems.end(), pData);
+ DBG_ASSERT(i != rItems.end(), "FmFilterModel::Remove(): unknown Item");
+ // position within the parent
+ sal_Int32 nPos = i - rItems.begin();
+ if (pData->ISA(FmFilterItems))
+ {
+ FmFormItem* pFormItem = (FmFormItem*)pParent;
+ FmXFormController* pController = NULL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel(pFormItem->GetController(),::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xTunnel.is(), "FmFilterAdapter::InsertElements : xTunnel is invalid!");
+ if(xTunnel.is())
+ {
+ pController = (FmXFormController*)xTunnel->getSomething(FmXFormController::getUnoTunnelImplementationId());
+ }
+ // ::utl::getImplementation(pController, Reference<XUnoTunnel>(pFormItem->GetController(),UNO_QUERY));
+ FmFilterRows& rRows = pController->getFilterRows();
+
+ // how many entries do we have
+ // it's the last row than we just empty it
+ if (nPos == (rRows.size() - 1))
+ {
+ // remove all childs and stay current
+ ::std::vector<FmFilterData*>& rChilds = ((FmFilterItems*)pData)->GetChilds();
+ while (!rChilds.empty())
+ {
+ ::std::vector<FmFilterData*>::iterator j = rChilds.end();
+ j--;
+
+ // we stay on the level so delete each item explizit to clean the controls
+ sal_Int32 nParentPos = j - rChilds.begin();
+ // EmptyText removes the filter
+ FmFilterItem* pFilterItem = PTR_CAST(FmFilterItem, *j);
+ m_pAdapter->setText(nParentPos, pFilterItem, ::rtl::OUString());
+ Remove(j, pFilterItem);
+ }
+ }
+ else // delete the row
+ {
+ // if the row is on the current position we have to away from that position.
+ // than we can delete it
+ if (nPos == pFormItem->GetCurrentPosition())
+ {
+ ::std::vector<FmFilterData*>::iterator j = i;
+
+ // give a new current postion
+ if (nPos < (rRows.size() - 1))
+ // set it to the next row
+ ++j;
+ else
+ // set it to the previous row
+ --j;
+
+ // if necessary we have the formItem for the current controller
+ // than we have to adjust the data displayed in the form
+ pFormItem->SetCurrentPosition(j - rItems.begin());
+ pController->setCurrentFilterPosition(j - rItems.begin());
+
+ // Keep the view consistent and force and new painting
+ FmFilterTextChangedHint aChangeHint(*j);
+ Broadcast( aChangeHint );
+ }
+
+ // now delete the entry
+ // before deleting we have to shift the current position of the form if necessary
+ if (nPos < pFormItem->GetCurrentPosition())
+ {
+ pFormItem->SetCurrentPosition(pFormItem->GetCurrentPosition() - 1);
+ pController->decrementCurrentFilterPosition();
+
+ // is it the first row, than the nex row has to recieve a different name
+ if (nPos == 0)
+ {
+ // ensure that the text labels are consistent
+ rItems[1]->SetText(String(SVX_RES(RID_STR_FILTER_FILTER_FOR)));
+ FmFilterTextChangedHint aChangeHint(rItems[1]);
+ Broadcast( aChangeHint );
+ }
+ }
+
+ // delete it
+ rRows.erase(rRows.begin() + nPos);
+
+ // and keep the controller consistent
+ DBG_ASSERT(rRows.size() != 0, "wrong row size");
+
+ // and remove it from the model
+ Remove(i, pData);
+ }
+ }
+ else // FormItems can not be deleted
+ {
+ FmFilterItem* pFilterItem = PTR_CAST(FmFilterItem, pData);
+
+ // if its the last condition remove the parent
+ if (rItems.size() == 1)
+ Remove(pFilterItem->GetParent());
+ else
+ {
+ // find the position of the father within his father
+ ::std::vector<FmFilterData*>& rItems = pData->GetParent()->GetParent()->GetChilds();
+ ::std::vector<FmFilterData*>::iterator j = find(rItems.begin(), rItems.end(), pFilterItem->GetParent());
+ DBG_ASSERT(j != rItems.end(), "FmFilterModel::Remove(): unknown Item");
+ sal_Int32 nParentPos = j - rItems.begin();
+
+ // EmptyText removes the filter
+ m_pAdapter->setText(nParentPos, pFilterItem, ::rtl::OUString());
+ Remove(i, pData);
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::Remove(const ::std::vector<FmFilterData*>::iterator& rPos, FmFilterData* pData)
+{
+ ::std::vector<FmFilterData*>& rItems = pData->GetParent()->GetChilds();
+ rItems.erase(rPos);
+
+ // UI benachrichtigen
+ FmFilterRemovedHint aRemoveHint( pData );
+ Broadcast( aRemoveHint );
+
+ delete pData;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmFilterModel::ValidateText(FmFilterItem* pItem, UniString& rText, UniString& rErrorMsg) const
+{
+ // check the input
+ Reference< ::com::sun::star::beans::XPropertySet > xField(m_pAdapter->getField(pItem->GetTextComponent()));
+ Reference< ::com::sun::star::sdbc::XConnection > xConnection(::utl::getConnection(Reference< ::com::sun::star::sdbc::XRowSet > (m_xController->getModel(), UNO_QUERY)));
+ Reference< ::com::sun::star::util::XNumberFormatsSupplier > xFormatSupplier = ::utl::getNumberFormats(xConnection, sal_True);
+ Reference< ::com::sun::star::util::XNumberFormatter > xFormatter(::utl::getProcessServiceFactory()
+ ->createInstance(FM_NUMBER_FORMATTER), UNO_QUERY);
+ xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
+
+ String aErr,aTxt;
+ SdbSqlParseNode* pParseNode = getSQLParser().PredicateTree(aErr, aTxt, xFormatter, Application::GetAppInternational(), xField);
+ rErrorMsg = aErr;
+ rText = aTxt;
+ if (pParseNode)
+ {
+ String aPreparedText;
+ pParseNode->ParseNodeToPredicateStr(aPreparedText,
+ xConnection->getMetaData(),
+ xFormatter,
+ Application::GetAppInternational(),
+ xField);
+ rText = aPreparedText;
+ delete pParseNode;
+ return sal_True;
+ }
+ else
+ return sal_False;
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::Append(FmFilterItems* pItems, FmFilterItem* pFilterItem)
+{
+ ::std::vector<FmFilterData*>& rParentItems = pItems->GetParent()->GetChilds();
+ ::std::vector<FmFilterData*>::iterator i = find(rParentItems.begin(), rParentItems.end(), pItems);
+ sal_Int32 nParentPos = i - rParentItems.begin();
+
+ Insert(pItems->GetChilds().end(), pFilterItem);
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::SetText(FmFilterItem* pItem, const ::rtl::OUString& rText)
+{
+ ::std::vector<FmFilterData*>& rItems = pItem->GetParent()->GetParent()->GetChilds();
+ ::std::vector<FmFilterData*>::iterator i = find(rItems.begin(), rItems.end(), pItem->GetParent());
+ sal_Int32 nParentPos = i - rItems.begin();
+
+ m_pAdapter->setText(nParentPos, pItem, rText);
+
+ if (!rText)
+ Remove(pItem);
+ else
+ {
+ // Change the text
+ pItem->SetText(rText);
+ FmFilterTextChangedHint aChangeHint(pItem);
+ Broadcast( aChangeHint );
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::SetCurrentItems(FmFilterItems* pCurrent)
+{
+ if (m_pCurrentItems == pCurrent)
+ return;
+
+ // search for the condition
+ if (pCurrent)
+ {
+ FmFormItem* pFormItem = (FmFormItem*)pCurrent->GetParent();
+ ::std::vector<FmFilterData*>& rItems = pFormItem->GetChilds();
+ ::std::vector<FmFilterData*>::const_iterator i = find(rItems.begin(), rItems.end(), pCurrent);
+
+ if (i != rItems.end())
+ {
+ // determine the filter position
+ sal_Int32 nPos = i - rItems.begin();
+ FmXFormController* pController = NULL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel(pFormItem->GetController(),::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xTunnel.is(), "FmFilterAdapter::InsertElements : xTunnel is invalid!");
+ if(xTunnel.is())
+ {
+ pController = (FmXFormController*)xTunnel->getSomething(FmXFormController::getUnoTunnelImplementationId());
+ }
+ // ::utl::getImplementation(pController, Reference<XUnoTunnel>(pFormItem->GetController(),UNO_QUERY));
+ pController->setCurrentFilterPosition(nPos);
+ pFormItem->SetCurrentPosition(nPos);
+
+ if ((::com::sun::star::form::XFormController*)m_xController.get() != (::com::sun::star::form::XFormController*)pFormItem->GetController().get())
+ // calls SetCurrentItems again
+ SetCurrentController(pFormItem->GetController());
+ else
+ m_pCurrentItems = pCurrent;
+ }
+ else
+ m_pCurrentItems = NULL;
+ }
+ else
+ m_pCurrentItems = NULL;
+
+
+ // UI benachrichtigen
+ FmFilterCurrentChangedHint aHint;
+ Broadcast( aHint );
+}
+
+//------------------------------------------------------------------------
+void FmFilterModel::CheckIntegrity(FmParentData* pItem)
+{
+ // checks whether for each form there's one free level for input
+
+ ::std::vector<FmFilterData*>& rItems = pItem->GetChilds();
+ sal_Bool bAppendLevel = sal_False;
+
+ for (::std::vector<FmFilterData*>::iterator i = rItems.begin();
+ i != rItems.end(); i++)
+ {
+ FmFilterItems* pItems = PTR_CAST(FmFilterItems, *i);
+ if (pItems)
+ {
+ bAppendLevel = !pItems->GetChilds().empty();
+ continue;
+ }
+
+ FmFormItem* pFormItem = PTR_CAST(FmFormItem, *i);
+ if (pFormItem)
+ {
+ CheckIntegrity(pFormItem);
+ continue;
+ }
+ }
+ if (bAppendLevel)
+ AppendFilterItems((FmFormItem*)pItem);
+}
+
+//========================================================================
+// class FmFilterItemsString
+//========================================================================
+class FmFilterItemsString : public SvLBoxString
+{
+public:
+ FmFilterItemsString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr )
+ :SvLBoxString(pEntry,nFlags,rStr){}
+
+ virtual void Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
+ virtual void InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData);
+};
+
+const int nxDBmp = 12;
+//------------------------------------------------------------------------
+void FmFilterItemsString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry )
+{
+ FmFilterItems* pRow = (FmFilterItems*)pEntry->GetUserData();
+ FmFormItem* pForm = (FmFormItem*)pRow->GetParent();
+ // current filter is significant painted
+ if (pForm->GetChilds()[pForm->GetCurrentPosition()] == pRow)
+ {
+ Color aLineColor(rDev.GetLineColor());
+ Rectangle aRect(rPos, GetSize(&rDev, pEntry ));
+ Point aFirst(rPos.X(), aRect.Bottom() - 6);
+ Point aSecond(aFirst.X() + 2, aFirst.Y() + 3);
+
+ rDev.SetLineColor(rDev.GetTextColor());
+ rDev.DrawLine(aFirst, aSecond);
+
+ aFirst = aSecond;
+ aFirst.X() += 1;
+ aSecond.X() += 6;
+ aSecond.Y() -= 5;
+
+ rDev.DrawLine(aFirst, aSecond);
+ rDev.SetLineColor( aLineColor );
+ }
+ rDev.DrawText( Point(rPos.X() + nxDBmp, rPos.Y()), GetText() );
+}
+
+//------------------------------------------------------------------------
+void FmFilterItemsString::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData)
+{
+ if( !pViewData )
+ pViewData = pView->GetViewDataItem( pEntry, this );
+
+ Size aSize(pView->GetTextWidth(GetText()), pView->GetTextHeight());
+ aSize.Width() += nxDBmp;
+ pViewData->aSize = aSize;
+}
+
+//========================================================================
+// class FmFilterString
+//========================================================================
+class FmFilterString : public SvLBoxString
+{
+ UniString m_aName;
+
+public:
+ FmFilterString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr, const UniString& aName)
+ :SvLBoxString(pEntry,nFlags,rStr)
+ ,m_aName(aName)
+ {
+ m_aName.AppendAscii(": ");
+ }
+
+ virtual void Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
+ virtual void InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData);
+};
+
+const int nxD = 4;
+
+//------------------------------------------------------------------------
+void FmFilterString::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData)
+{
+ if( !pViewData )
+ pViewData = pView->GetViewDataItem( pEntry, this );
+
+ Font aOldFont( pView->GetFont());
+ Font aFont( aOldFont );
+ aFont.SetWeight(WEIGHT_BOLD);
+ pView->SetFont( aFont );
+
+ Size aSize(pView->GetTextWidth(m_aName), pView->GetTextHeight());
+ pView->SetFont( aOldFont );
+ aSize.Width() += pView->GetTextWidth(GetText()) + nxD;
+ pViewData->aSize = aSize;
+}
+
+//------------------------------------------------------------------------
+void FmFilterString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry )
+{
+ Font aOldFont( rDev.GetFont());
+ Font aFont( aOldFont );
+ aFont.SetWeight(WEIGHT_BOLD);
+ rDev.SetFont( aFont );
+
+ Point aPos(rPos);
+ rDev.DrawText( aPos, m_aName );
+
+ // position for the second text
+ aPos.X() += rDev.GetTextWidth(m_aName) + nxD;
+ rDev.SetFont( aOldFont );
+ rDev.DrawText( aPos, GetText() );
+}
+
+//========================================================================
+// class FmFilterNavigator
+//========================================================================
+FmFilterNavigator::FmFilterNavigator( Window* pParent )
+ :SvTreeListBox( pParent, WB_HASBUTTONS|WB_HASLINES|WB_BORDER|WB_HASBUTTONSATROOT )
+{
+ SetHelpId( HID_FILTER_NAVIGATOR );
+
+ ImageList aNavigatorImages(SVX_RES(RID_SVXIMGLIST_FMEXPL));
+ Image aCollapsedNodeImg = aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE );
+ Image aExpandedNodeImg = aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE );
+ SetNodeBitmaps( aCollapsedNodeImg, aExpandedNodeImg );
+
+ m_pModel = new FmFilterModel();
+ StartListening( *m_pModel );
+
+ EnableInplaceEditing( sal_True );
+ SetSelectionMode(MULTIPLE_SELECTION);
+
+ EnableDrop();
+ SetDragDropMode(0xFFFF);
+
+ m_aSelectTimer.SetTimeoutHdl(LINK(this, FmFilterNavigator, OnSelect));
+ m_aDropActionTimer.SetTimeoutHdl(LINK(this, FmFilterNavigator, OnDropActionTimer));
+}
+
+//------------------------------------------------------------------------
+FmFilterNavigator::~FmFilterNavigator()
+{
+ if (m_aSelectTimer.IsActive())
+ m_aSelectTimer.Stop();
+
+ EndListening( *m_pModel );
+ delete m_pModel;
+}
+
+//------------------------------------------------------------------------
+void FmFilterNavigator::Clear()
+{
+ if (m_aSelectTimer.IsActive())
+ m_aSelectTimer.Stop();
+
+ m_pModel->Clear();
+}
+
+//------------------------------------------------------------------------
+void FmFilterNavigator::Update(const Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const Reference< ::com::sun::star::form::XFormController > & xCurrent)
+{
+ if (xCurrent == m_pModel->GetCurrentController())
+ return;
+
+ m_pModel->Update(xControllers, xCurrent);
+
+ // expand the filters for the current controller
+ SvLBoxEntry* pEntry = FindEntry(m_pModel->GetCurrentForm());
+ if (pEntry && !IsExpanded(pEntry))
+ {
+ SelectAll(sal_False);
+
+ if (!IsExpanded(pEntry))
+ Expand(pEntry);
+
+ pEntry = FindEntry(m_pModel->GetCurrentItems());
+ if (pEntry)
+ {
+ if (!IsExpanded(pEntry))
+ Expand(pEntry);
+ Select(pEntry, sal_True);
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmFilterNavigator::EditingEntry( SvLBoxEntry* pEntry, Selection& rSelection )
+{
+ if (!SvTreeListBox::EditingEntry( pEntry, rSelection ))
+ return sal_False;
+
+ return pEntry && ((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem);
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmFilterNavigator::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
+{
+ if (EditingCanceled())
+ return sal_True;
+
+ DBG_ASSERT(((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem),
+ "FmFilterNavigator::EditedEntry() wrong entry");
+
+ UniString aText(rNewText);
+ aText.EraseTrailingChars();
+ aText.EraseLeadingChars();
+ if (aText.Len() != 0)
+ {
+ // deleting the entry asynchron
+ sal_uInt32 nEvent;
+ PostUserEvent(nEvent, LINK(this, FmFilterNavigator, OnRemove), pEntry);
+ }
+ else
+ {
+ UniString aErrorMsg;
+
+ if (m_pModel->ValidateText((FmFilterItem*)pEntry->GetUserData(), aText, aErrorMsg))
+ {
+ GrabFocus();
+ m_pModel->SetText((FmFilterItem*)pEntry->GetUserData(), aText);
+ SetCursor(pEntry, sal_True);
+ SetEntryText(pEntry, aText);
+
+ // settting the text asynchron
+ sal_uInt32 nEvent;
+ PostUserEvent(nEvent, LINK(this, FmFilterNavigator, OnEdited), pEntry);
+ }
+ else
+ {
+ // display the error and return sal_False
+ ::vos::OGuard aGuard(Application::GetSolarMutex());
+ ::rtl::OUString aTitle(SVX_RES(RID_STR_SYNTAXERROR));
+ SvxDBMsgBox aDlg(this, aTitle, aErrorMsg, WB_OK | WB_DEF_OK,
+ SvxDBMsgBox::Info);
+ aDlg.Execute();
+ return sal_False;
+ }
+ }
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+IMPL_LINK( FmFilterNavigator, OnEdited, SvLBoxEntry*, pEntry )
+{
+ // invalidate the entry to see the correct text
+ SetEntryText( pEntry, ((FmFilterItem*)pEntry->GetUserData())->GetText());
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+IMPL_LINK( FmFilterNavigator, OnRemove, SvLBoxEntry*, pEntry )
+{
+ // now remove the entry
+ m_pModel->Remove((FmFilterData*) pEntry->GetUserData());
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+IMPL_LINK( FmFilterNavigator, OnSelect, void*, EMPTYTAG )
+{
+ // now activate the controller to be consistent
+ sal_Bool bHadFocus = HasFocus();
+ Reference< ::com::sun::star::awt::XWindow > xWindow(m_pModel->GetCurrentController(), UNO_QUERY);
+ if (xWindow.is())
+ xWindow->setFocus();
+ else
+ m_pModel->GetCurrentController()->activateFirst();
+
+ // now grab the focus again
+ if (bHadFocus)
+ GrabFocus();
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+IMPL_LINK( FmFilterNavigator, OnDropActionTimer, void*, EMPTYARG )
+{
+ if (--m_aTimerCounter > 0)
+ return 0L;
+
+ if (m_aDropActionType == DA_EXPANDNODE)
+ {
+ SvLBoxEntry* pToExpand = GetEntry(m_aTimerTriggered);
+ if (pToExpand && (GetChildCount(pToExpand) > 0) && !IsExpanded(pToExpand))
+ // tja, eigentlich muesste ich noch testen, ob die Node nicht schon expandiert ist, aber ich
+ // habe dazu weder in den Basisklassen noch im Model eine Methode gefunden ...
+ // aber ich denke, die BK sollte es auch so vertragen
+ Expand(pToExpand);
+
+ // nach dem Expand habe ich im Gegensatz zum Scrollen natuerlich nix mehr zu tun
+ m_aDropActionTimer.Stop();
+ }
+ else
+ {
+ switch (m_aDropActionType)
+ {
+ case DA_SCROLLUP :
+ ScrollOutputArea(1);
+ break;
+ case DA_SCROLLDOWN :
+ ScrollOutputArea(-1);
+ break;
+ }
+ m_aTimerCounter = DROP_ACTION_TIMER_SCROLL_TICKS;
+ }
+ return 0L;
+}
+
+
+//------------------------------------------------------------------------
+sal_Bool FmFilterNavigator::QueryDrop( DropEvent& rDEvt )
+{
+ Point aDropPos = rDEvt.GetPosPixel();
+
+ // kuemmern wir uns erst mal um moeglich DropActions (Scrollen und Aufklappen)
+ if (rDEvt.IsLeaveWindow())
+ {
+ if (m_aDropActionTimer.IsActive())
+ m_aDropActionTimer.Stop();
+ }
+ else
+ {
+ sal_Bool bNeedTrigger = sal_False;
+ // auf dem ersten Eintrag ?
+ if ((aDropPos.Y() >= 0) && (aDropPos.Y() < GetEntryHeight()))
+ {
+ m_aDropActionType = DA_SCROLLUP;
+ bNeedTrigger = sal_True;
+ }
+ else
+ {
+ // auf dem letzten (bzw. in dem Bereich, den ein Eintrag einnehmen wuerde, wenn er unten genau buendig
+ // abschliessen wuerde) ?
+ if ((aDropPos.Y() < GetSizePixel().Height()) && (aDropPos.Y() >= GetSizePixel().Height() - GetEntryHeight()))
+ {
+ m_aDropActionType = DA_SCROLLDOWN;
+ bNeedTrigger = sal_True;
+ }
+ else
+ { // auf einem Entry mit Childs, der nicht aufgeklappt ist ?
+ SvLBoxEntry* pDropppedOn = GetEntry(aDropPos);
+ if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && !IsExpanded(pDropppedOn))
+ {
+ // -> aufklappen
+ m_aDropActionType = DA_EXPANDNODE;
+ bNeedTrigger = sal_True;
+ }
+ }
+ }
+ if (bNeedTrigger && (m_aTimerTriggered != aDropPos))
+ {
+ // neu anfangen zu zaehlen
+ m_aTimerCounter = DROP_ACTION_TIMER_INITIAL_TICKS;
+ // die Pos merken, da ich auch QueryDrops bekomme, wenn sich die Maus gar nicht bewegt hat
+ m_aTimerTriggered = aDropPos;
+ // und den Timer los
+ if (!m_aDropActionTimer.IsActive()) // gibt es den Timer schon ?
+ {
+ m_aDropActionTimer.SetTimeout(DROP_ACTION_TIMER_TICK_BASE);
+ m_aDropActionTimer.Start();
+ }
+ }
+ else if (!bNeedTrigger)
+ m_aDropActionTimer.Stop();
+ }
+
+
+ // Hat das Object das richtige Format?
+ SvDataObjectRef xDataObj = SvDataObject::PasteDragServer( rDEvt );
+
+ const SvDataTypeList& rTypeList = xDataObj->GetTypeList();
+ if (!rTypeList.Get(Exchange::RegisterFormatName(SVX_FM_FILTER_FIELDS)))
+ return sal_False;
+
+ SvxFmFilterExchRef xExch = (SvxFmFilterExch*)&xDataObj;
+ // do we conain the formitem?
+ if (!FindEntry(xExch->GetFormItem()))
+ return sal_False;
+
+ SvLBoxEntry* pDropTarget = GetEntry(aDropPos);
+ if (!pDropTarget)
+ return sal_False;
+
+ FmFilterData* pData = (FmFilterData*)pDropTarget->GetUserData();
+ FmFormItem* pForm = NULL;
+ if (pData->ISA(FmFilterItem))
+ {
+ pForm = PTR_CAST(FmFormItem,pData->GetParent()->GetParent());
+ if (pForm != xExch->GetFormItem())
+ return sal_False;
+ }
+ else if (pData->ISA(FmFilterItems))
+ {
+ pForm = PTR_CAST(FmFormItem,pData->GetParent());
+ if (pForm != xExch->GetFormItem())
+ return sal_False;
+ }
+ else
+ return sal_False;
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmFilterNavigator::Drop( const DropEvent& rDEvt )
+{
+ // ware schlecht, wenn nach dem Droppen noch gescrollt wird ...
+ if (m_aDropActionTimer.IsActive())
+ m_aDropActionTimer.Stop();
+
+ // Format-Ueberpruefung
+ SvDataObjectRef xDataObj = SvDataObject::PasteDragServer( rDEvt );
+ SvxFmFilterExchRef xExch = (SvxFmFilterExch*)&xDataObj;
+
+ // das Ziel des Drop sowie einige Daten darueber
+ Point aDropPos = rDEvt.GetPosPixel();
+ SvLBoxEntry* pDropTarget = GetEntry( aDropPos );
+ if (!pDropTarget)
+ return sal_False;
+
+ // search the container where to add the items
+ FmFilterData* pData = (FmFilterData*)pDropTarget->GetUserData();
+ FmFilterItems* pTargetItems = pData->ISA(FmFilterItems) ? (FmFilterItems*)pData
+ : (FmFilterItems*)((FmFilterItem*)pData)->GetParent();
+ SelectAll(sal_False);
+ SvLBoxEntry* pEntry = FindEntry(pTargetItems);
+ Select(pEntry, sal_True);
+ SetCurEntry(pEntry);
+
+ sal_Bool bCopy = rDEvt.GetAction() == DROP_COPY;
+ ::std::vector<FmFilterItem*> aItemList = xExch->GetDraggedEntries();
+
+ for (::std::vector<FmFilterItem*>::const_iterator i = aItemList.begin(); i != aItemList.end(); i++)
+ {
+ if ((*i)->GetParent() == pTargetItems)
+ continue;
+ else
+ {
+ FmFilterItem* pFilterItem = pTargetItems->Find((*i)->GetTextComponent());
+ String aText = (*i)->GetText();
+ if (!pFilterItem)
+ {
+ pFilterItem = new FmFilterItem(pTargetItems, (*i)->GetFieldName(), aText, (*i)->GetTextComponent());
+ m_pModel->Append(pTargetItems, pFilterItem);
+ }
+
+ if (!bCopy)
+ m_pModel->Remove(*i);
+
+ // now set the text for the new dragged item
+ m_pModel->SetText(pFilterItem, aText);
+ }
+ }
+ m_pModel->CheckIntegrity((FmFormItem*)pTargetItems->GetParent());
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+void FmFilterNavigator::InitEntry(SvLBoxEntry* pEntry,
+ const XubString& rStr,
+ const Image& rImg1,
+ const Image& rImg2)
+{
+ SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2 );
+ SvLBoxString* pString = NULL;
+
+ if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem))
+ pString = new FmFilterString(pEntry, 0, rStr, ((FmFilterItem*)pEntry->GetUserData())->GetFieldName());
+ else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItems))
+ pString = new FmFilterItemsString(pEntry, 0, rStr );
+
+ if (pString)
+ pEntry->ReplaceItem( pString, 1 );
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmFilterNavigator::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
+{
+ if (bSelect == IsSelected(pEntry)) // das passiert manchmal, ich glaube, die Basisklasse geht zu sehr auf Nummer sicher ;)
+ return sal_True;
+
+ if (SvTreeListBox::Select(pEntry, bSelect))
+ {
+ if (bSelect)
+ {
+ sal_Bool bSyncController = m_aSelectTimer.IsActive();
+ if (bSyncController)
+ m_aSelectTimer.Stop();
+
+ FmFormItem* pFormItem = NULL;
+ if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem))
+ pFormItem = (FmFormItem*)((FmFilterItem*)pEntry->GetUserData())->GetParent()->GetParent();
+ else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItems))
+ pFormItem = (FmFormItem*)((FmFilterItem*)pEntry->GetUserData())->GetParent()->GetParent();
+ else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFormItem))
+ pFormItem = (FmFormItem*)pEntry->GetUserData();
+
+ if (pFormItem)
+ {
+ // will the controller be exchanged?
+ bSyncController = bSyncController || (::com::sun::star::form::XFormController*)m_pModel->GetCurrentController().get() != (::com::sun::star::form::XFormController*)pFormItem->GetController().get();
+ if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem))
+ m_pModel->SetCurrentItems((FmFilterItems*)((FmFilterItem*)pEntry->GetUserData())->GetParent());
+ else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItems))
+ m_pModel->SetCurrentItems((FmFilterItems*)pEntry->GetUserData());
+ else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFormItem))
+ m_pModel->SetCurrentController(((FmFormItem*)pEntry->GetUserData())->GetController());
+ }
+ if (bSyncController)
+ {
+ m_aSelectTimer.SetTimeout(SYNC_DELAY);
+ m_aSelectTimer.Start();
+ }
+ }
+ return sal_True;
+ }
+ else
+ return sal_False;
+}
+
+//------------------------------------------------------------------------
+void FmFilterNavigator::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ if (rHint.ISA(FmFilterInsertedHint))
+ {
+ FmFilterInsertedHint* pHint = (FmFilterInsertedHint*)&rHint;
+ Insert(pHint->GetData(), pHint->GetPos());
+ }
+ else if( rHint.ISA(FmFilterClearedHint) )
+ {
+ SvTreeListBox::Clear();
+ }
+ else if( rHint.ISA(FmFilterRemovedHint) )
+ {
+ FmFilterRemovedHint* pHint = (FmFilterRemovedHint*)&rHint;
+ Remove(pHint->GetData());
+ }
+ else if( rHint.ISA(FmFilterTextChangedHint) )
+ {
+ FmFilterTextChangedHint* pHint = (FmFilterTextChangedHint*)&rHint;
+ SvLBoxEntry* pEntry = FindEntry(pHint->GetData());
+ if (pEntry)
+ SetEntryText( pEntry, pHint->GetData()->GetText());
+ }
+ else if( rHint.ISA(FmFilterCurrentChangedHint) )
+ {
+ // invalidate the entries
+ for (SvLBoxEntry* pEntry = First(); pEntry != NULL;
+ pEntry = Next(pEntry))
+ GetModel()->InvalidateEntry( pEntry );
+ }
+}
+
+//------------------------------------------------------------------------
+SvLBoxEntry* FmFilterNavigator::FindEntry(FmFilterData* pItem)
+{
+ SvLBoxEntry* pEntry = NULL;
+ if (pItem)
+ {
+ for (pEntry = First(); pEntry != NULL; pEntry = Next( pEntry ))
+ {
+ FmFilterData* pEntryItem = (FmFilterData*)pEntry->GetUserData();
+ if (pEntryItem == pItem)
+ break;
+ }
+ }
+ return pEntry;
+}
+
+//------------------------------------------------------------------------
+void FmFilterNavigator::Insert(FmFilterData* pItem, sal_Int32 nPos)
+{
+ FmParentData* pParent = pItem->GetParent() ? pItem->GetParent() : GetFilterModel();
+
+ // insert the item
+ SvLBoxEntry* pParentEntry = FindEntry(pParent);
+ InsertEntry(pItem->GetText(), pItem->GetImage(), pItem->GetImage(), pParentEntry, sal_False, nPos, pItem );
+}
+
+//------------------------------------------------------------------------
+void FmFilterNavigator::Remove(FmFilterData* pItem)
+{
+ // der Entry zu den Daten
+ SvLBoxEntry* pEntry = FindEntry(pItem);
+ if (pEntry)
+ GetModel()->Remove( pEntry );
+}
+
+//------------------------------------------------------------------------------
+void FmFilterNavigator::Command( const CommandEvent& rEvt )
+{
+ sal_Bool bHandled = sal_False;
+ switch (rEvt.GetCommand())
+ {
+ case COMMAND_STARTDRAG:
+ {
+ EndSelection();
+ Pointer aMovePtr( POINTER_MOVEDATA ),
+ aCopyPtr( POINTER_COPYDATA ),
+ aLinkPtr( POINTER_COPYDATA );
+
+ // be sure that the data is only used within a only one form!
+ ::std::vector<FmFilterItem*> aSelectList;
+ FmFormItem* pFirstItem = NULL;
+ SvLBoxEntry* pCurEntry = GetCurEntry();
+
+ bHandled = sal_True;
+ for (SvLBoxEntry* pEntry = FirstSelected();
+ bHandled && pEntry != NULL;
+ pEntry = NextSelected(pEntry))
+ {
+ FmFilterItem* pFilter = PTR_CAST(FmFilterItem, (FmFilterData*)pEntry->GetUserData());
+ if (pFilter)
+ {
+ FmFormItem* pForm = PTR_CAST(FmFormItem,pFilter->GetParent()->GetParent());
+ if (!pForm)
+ bHandled = sal_False;
+ else if (!pFirstItem)
+ pFirstItem = pForm;
+ else if (pFirstItem != pForm)
+ bHandled = sal_False;
+
+ if (bHandled)
+ aSelectList.push_back(pFilter);
+ }
+ }
+ if (!bHandled || aSelectList.empty())
+ break;
+
+ SvxFmFilterExch* pExch = new SvxFmFilterExch(pFirstItem, aSelectList);
+ short nDragResult = pExch->ExecuteDrag( this, aMovePtr, aCopyPtr, aLinkPtr, DRAG_MOVEABLE | DRAG_COPYABLE );
+ if (nDragResult == DROP_CANCEL)
+ {
+ SetCursor(pCurEntry, sal_True);
+ MakeVisible(pCurEntry);
+ }
+ bHandled = sal_True;
+ break;
+ }
+ case COMMAND_CONTEXTMENU:
+ {
+ // die Stelle, an der geklickt wurde
+ Point aWhere;
+ SvLBoxEntry* pClicked = NULL;
+ if (rEvt.IsMouseEvent())
+ {
+ aWhere = rEvt.GetMousePosPixel();
+ pClicked = GetEntry(aWhere);
+ if (pClicked == NULL)
+ break;
+
+ if (!IsSelected(pClicked))
+ {
+ SelectAll(sal_False);
+ Select(pClicked, sal_True);
+ SetCurEntry(pClicked);
+ }
+ }
+ else
+ {
+ pClicked = GetCurEntry();
+ if (!pClicked)
+ break;
+ aWhere = GetEntryPos(pClicked);
+ }
+
+ ::std::vector<FmFilterData*> aSelectList;
+ for (SvLBoxEntry* pEntry = FirstSelected();
+ pEntry != NULL;
+ pEntry = NextSelected(pEntry))
+ {
+ // don't delete forms
+ FmFormItem* pForm = PTR_CAST(FmFormItem, (FmFilterData*)pEntry->GetUserData());
+ if (!pForm)
+ aSelectList.push_back((FmFilterData*)pEntry->GetUserData());
+ }
+ if (aSelectList.size() == 1)
+ {
+ // don't delete the only empty row of a form
+ FmFilterItems* pFilterItems = PTR_CAST(FmFilterItems, aSelectList[0]);
+ if (pFilterItems && pFilterItems->GetChilds().empty()
+ && pFilterItems->GetParent()->GetChilds().size() == 1)
+ aSelectList.clear();
+ }
+
+ PopupMenu aContextMenu(SVX_RES(RID_FM_FILTER_MENU));
+
+ // every condition could be deleted except the first one if its the only one
+ aContextMenu.EnableItem( SID_FM_DELETE, !aSelectList.empty() );
+
+ //
+ sal_Bool bEdit = PTR_CAST(FmFilterItem, (FmFilterData*)pClicked->GetUserData()) != NULL &&
+ IsSelected(pClicked) && GetSelectionCount() == 1;
+
+ aContextMenu.EnableItem( SID_FM_FILTER_EDIT,
+ bEdit );
+ aContextMenu.EnableItem( SID_FM_FILTER_IS_NULL,
+ bEdit );
+ aContextMenu.EnableItem( SID_FM_FILTER_IS_NOT_NULL,
+ bEdit );
+
+ aContextMenu.RemoveDisabledEntries(sal_True, sal_True);
+ sal_uInt16 nSlotId = aContextMenu.Execute( this, aWhere );
+ switch( nSlotId )
+ {
+ case SID_FM_FILTER_EDIT:
+ {
+ EditEntry( pClicked );
+ } break;
+ case SID_FM_FILTER_IS_NULL:
+ case SID_FM_FILTER_IS_NOT_NULL:
+ {
+ UniString aErrorMsg;
+ UniString aText;
+ if (nSlotId == SID_FM_FILTER_IS_NULL)
+ aText.AssignAscii("IS NULL");
+ else
+ aText.AssignAscii("IS NOT NULL");
+
+ m_pModel->ValidateText((FmFilterItem*)pClicked->GetUserData(),
+ aText, aErrorMsg);
+ m_pModel->SetText((FmFilterItem*)pClicked->GetUserData(), aText);
+ } break;
+ case SID_FM_DELETE:
+ {
+ DeleteSelection();
+ } break;
+ }
+ bHandled = sal_True;
+ } break;
+ }
+
+ if (!bHandled)
+ SvTreeListBox::Command( rEvt );
+}
+
+//------------------------------------------------------------------------
+void FmFilterNavigator::KeyInput(const KeyEvent& rKEvt)
+{
+ // delete ?
+ if (rKEvt.GetKeyCode().GetCode() == KEY_DELETE && !rKEvt.GetKeyCode().GetModifier())
+ {
+ if (!IsSelected(First()) || GetEntryCount() > 1)
+ DeleteSelection();
+ return;
+ }
+ SvTreeListBox::KeyInput(rKEvt);
+}
+
+//------------------------------------------------------------------------------
+void FmFilterNavigator::DeleteSelection()
+{
+ // to avoid the deletion of an entry twice (e.g. deletion of a parent and afterward
+ // the deletion of it's child, i have to shrink the selecton list
+ ::std::vector<SvLBoxEntry*> aEntryList;
+ for (SvLBoxEntry* pEntry = FirstSelected();
+ pEntry != NULL;
+ pEntry = NextSelected(pEntry))
+ {
+ FmFilterItem* pFilterItem = PTR_CAST(FmFilterItem, (FmFilterData*)pEntry->GetUserData());
+ if (pFilterItem && IsSelected(GetParent(pEntry)))
+ continue;
+
+ FmFormItem* pForm = PTR_CAST(FmFormItem, (FmFilterData*)pEntry->GetUserData());
+ if (!pForm)
+ aEntryList.push_back(pEntry);
+ }
+
+ // Remove the selection
+ SelectAll(FALSE);
+
+ for (::std::vector<SvLBoxEntry*>::reverse_iterator i = aEntryList.rbegin();
+ // link problems with operator ==
+ i.base() != aEntryList.rend().base(); i++)
+ {
+ m_pModel->Remove((FmFilterData*)(*i)->GetUserData());
+ }
+
+ // now check if we need to insert new items
+ m_pModel->CheckIntegrity(m_pModel);
+}
+
+//========================================================================
+// class FmFilterNavigatorWin
+//========================================================================
+FmFilterNavigatorWin::FmFilterNavigatorWin( SfxBindings *pBindings, SfxChildWindow *pMgr,
+ Window* pParent )
+ :SfxDockingWindow( pBindings, pMgr, pParent, WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_ROLLABLE|WB_3DLOOK|WB_DOCKABLE) )
+ ,SfxControllerItem( SID_FM_FILTER_NAVIGATOR_CONTROL, *pBindings )
+{
+ SetHelpId( HID_FILTER_NAVIGATOR_WIN );
+
+ m_pNavigator = new FmFilterNavigator( this );
+ m_pNavigator->Show();
+ SetText( SVX_RES(RID_STR_FILTER_NAVIGATOR) );
+ SetSizePixel( Size(200,200) );
+}
+
+//------------------------------------------------------------------------
+FmFilterNavigatorWin::~FmFilterNavigatorWin()
+{
+ delete m_pNavigator;
+}
+
+//-----------------------------------------------------------------------
+void FmFilterNavigatorWin::Update(FmFormShell* pFormShell)
+{
+ if (!pFormShell)
+ m_pNavigator->Update(Reference< ::com::sun::star::container::XIndexAccess > (), Reference< ::com::sun::star::form::XFormController > ());
+ else
+ {
+ Reference< ::com::sun::star::form::XFormController > xController(pFormShell->GetImpl()->getActiveInternalController());
+ Reference< ::com::sun::star::container::XIndexAccess > xContainer;
+ if (xController.is())
+ {
+ Reference< ::com::sun::star::container::XChild > xChild(xController, UNO_QUERY);
+ for (Reference< XInterface > xParent(xChild->getParent());
+ xParent.is();
+ xParent = xChild.is() ? xChild->getParent() : Reference< XInterface > ())
+ {
+ xContainer = Reference< ::com::sun::star::container::XIndexAccess > (xParent, UNO_QUERY);
+ xChild = Reference< ::com::sun::star::container::XChild > (xParent, UNO_QUERY);
+ }
+ }
+ m_pNavigator->Update(xContainer, xController);
+ }
+}
+
+//-----------------------------------------------------------------------
+void FmFilterNavigatorWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
+{
+ if( !pState || SID_FM_FILTER_NAVIGATOR_CONTROL != nSID )
+ return;
+
+ if( eState >= SFX_ITEM_AVAILABLE )
+ {
+ FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() );
+ Update( pShell );
+ }
+ else
+ Update( NULL );
+}
+
+//-----------------------------------------------------------------------
+sal_Bool FmFilterNavigatorWin::Close()
+{
+ Update( NULL );
+ return SfxDockingWindow::Close();
+}
+
+//-----------------------------------------------------------------------
+void FmFilterNavigatorWin::FillInfo( SfxChildWinInfo& rInfo ) const
+{
+ SfxDockingWindow::FillInfo( rInfo );
+ rInfo.bVisible = sal_False;
+}
+
+//-----------------------------------------------------------------------
+Size FmFilterNavigatorWin::CalcDockingSize( SfxChildAlignment eAlign )
+{
+ Size aSize = SfxDockingWindow::CalcDockingSize( eAlign );
+
+ switch( eAlign )
+ {
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_BOTTOM:
+ return Size();
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_RIGHT:
+ break;
+ }
+
+ return aSize;
+}
+
+//-----------------------------------------------------------------------
+SfxChildAlignment FmFilterNavigatorWin::CheckAlignment( SfxChildAlignment eActAlign, SfxChildAlignment eAlign )
+{
+ switch (eAlign)
+ {
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_NOALIGNMENT:
+ return (eAlign);
+ }
+
+ return (eActAlign);
+}
+
+//------------------------------------------------------------------------
+void FmFilterNavigatorWin::Resize()
+{
+ SfxDockingWindow::Resize();
+
+ Size aLogOutputSize = PixelToLogic( GetOutputSizePixel(), MAP_APPFONT );
+ Size aLogExplSize = aLogOutputSize;
+ aLogExplSize.Width() -= 6;
+ aLogExplSize.Height() -= 6;
+
+ Point aExplPos = LogicToPixel( Point(3,3), MAP_APPFONT );
+ Size aExplSize = LogicToPixel( aLogExplSize, MAP_APPFONT );
+
+ m_pNavigator->SetPosSizePixel( aExplPos, aExplSize );
+}
+
+
+//========================================================================
+// class FmFilterNavigatorWinMgr
+//========================================================================
+SFX_IMPL_DOCKINGWINDOW( FmFilterNavigatorWinMgr, SID_FM_FILTER_NAVIGATOR )
+
+//-----------------------------------------------------------------------
+FmFilterNavigatorWinMgr::FmFilterNavigatorWinMgr( Window *pParent, sal_uInt16 nId,
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo )
+ :SfxChildWindow( pParent, nId )
+{
+ pWindow = new FmFilterNavigatorWin( pBindings, this, pParent );
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+ ((SfxDockingWindow*)pWindow)->Initialize( pInfo );
+}
+
diff --git a/svx/source/form/filtnav.src b/svx/source/form/filtnav.src
new file mode 100644
index 0000000000..e2e1221421
--- /dev/null
+++ b/svx/source/form/filtnav.src
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * $RCSfile: filtnav.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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"
+#include "fmresids.hrc"
+Menu RID_FM_FILTER_MENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_DELETE ;
+ HelpID = SID_FM_DELETE ;
+ Text = "~Löschen" ;
+ Text [ ENGLISH ] = "~Delete" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ portuguese_brazilian ] = "Löschen" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ italian ] = "~Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "Wi~ssen" ;
+ 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 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_FILTER_EDIT ;
+ HelpID = SID_FM_FILTER_EDIT ;
+ Text = "~Bearbeiten" ;
+ Text [ english_us ] = "~Edit" ;
+ Text[ portuguese ] = "~Editar";
+ Text[ russian ] = "~Ïðàâêà";
+ Text[ greek ] = "~Åðåîåñãáóßá";
+ 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[ korean ] = "ÆíÁý(~E)";
+ Text[ chinese_simplified ] = "±à¼­(~E)";
+ Text[ chinese_traditional ] = "½s¿è(~E)";
+ Text[ arabic ] = "~ÊÍÑíÑ";
+ Text[ turkish ] = "Düzenle";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_FILTER_IS_NULL ;
+ HelpID = SID_FM_FILTER_IS_NULL ;
+ Text = "~Ist Leer" ;
+ Text [ english_us ] = "~Is Null" ;
+ Text [ ENGLISH ] = "~IS NULL" ;
+ Text[ portuguese ] = "~Vazio";
+ Text[ russian ] = "~Ïóñòî";
+ Text[ greek ] = "Åßíá~é êåíü";
+ Text[ dutch ] = "~Is leeg";
+ Text[ french ] = "~Est vide";
+ Text[ spanish ] = "~Vacío";
+ Text[ italian ] = "È ~vuoto";
+ Text[ danish ] = "Er tom";
+ Text[ swedish ] = "~Är tom";
+ Text[ polish ] = "Jest pusty";
+ Text[ portuguese_brazilian ] = "~IS NULL";
+ Text[ japanese ] = "‹ó”’(~I)";
+ Text[ korean ] = "ºñ¾î ÀÖÀ½(~I)";
+ Text[ chinese_simplified ] = "ÊÇ¿Õȱ(~I)";
+ Text[ chinese_traditional ] = "¬OªÅ¯Ê(~I)";
+ Text[ arabic ] = "ÎÇáí";
+ Text[ turkish ] = "Boþ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_FILTER_IS_NOT_NULL ;
+ HelpID = SID_FM_FILTER_IS_NOT_NULL ;
+ Text = "~Ist nicht leer" ;
+ Text [ english_us ] = "I~s not Null" ;
+ Text [ ENGLISH ] = "~IS NOT NULL" ;
+ Text[ portuguese ] = "~Não vazio";
+ Text[ russian ] = "~Íå ïóñòî";
+ Text[ greek ] = "Äåí åßíá~é êåíü";
+ Text[ dutch ] = "~Is niet leeg";
+ Text[ french ] = "~N'est pas vide";
+ Text[ spanish ] = "~No Vacío";
+ Text[ italian ] = "~Non è vuoto";
+ Text[ danish ] = "Er ikke tom";
+ Text[ swedish ] = "~Är inte tom";
+ Text[ polish ] = "Nie jest pusty";
+ Text[ portuguese_brazilian ] = "~IS NOT NULL";
+ Text[ japanese ] = "‹ó”’‚Å‚È‚¢(~S)";
+ Text[ korean ] = "ºñ¾î ÀÖÁö ¾ÊÀ½(~S)";
+ Text[ chinese_simplified ] = "²»ÊÇ¿Õȱ(~S)";
+ Text[ chinese_traditional ] = "¤£¬OªÅ¯Ê(~S)";
+ Text[ arabic ] = "ÛíÑ ÎÇáí";
+ Text[ turkish ] = "Boþ deðil";
+ };
+ };
+};
+
diff --git a/svx/source/form/fmctrler.cxx b/svx/source/form/fmctrler.cxx
new file mode 100644
index 0000000000..2221e4e39a
--- /dev/null
+++ b/svx/source/form/fmctrler.cxx
@@ -0,0 +1,3130 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmctrler.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 USE_PROPERTY_HELPER
+
+#ifndef _SVX_FMCTRLER_HXX
+#include "fmctrler.hxx"
+#endif
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _SVX_FMURL_HXX
+#include "fmurl.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_SDB_ROWCHANGEACTION_HPP_
+#include <com/sun/star/sdb/RowChangeAction.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
+#include <com/sun/star/sdbc/ColumnValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
+#include <com/sun/star/form/XLoadable.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_XCOMBOBOX_HPP_
+#include <com/sun/star/awt/XComboBox.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCHECKBOX_HPP_
+#include <com/sun/star/awt/XCheckBox.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XLISTBOX_HPP_
+#include <com/sun/star/awt/XListBox.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FOCUSCHANGEREASON_HPP_
+#include <com/sun/star/awt/FocusChangeReason.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+
+
+#ifndef _COM_SUN_STAR_FORM_XRESET_HPP_
+#include <com/sun/star/form/XReset.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_TABULATORCYCLE_HPP_
+#include <com/sun/star/form/TabulatorCycle.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XBOUNDCONTROL_HPP_
+#include <com/sun/star/form/XBoundControl.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XVCLWINDOWPEER_HPP_
+#include <com/sun/star/awt/XVclWindowPeer.hpp>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _SVX_QRYPARAM_HXX
+#include "qryparam.hxx"
+#endif
+
+#ifndef _SFX_BINDINGS_HXX //autogen
+#include <sfx2/bindings.hxx>
+#endif
+
+#ifndef _SVDPAGV_HXX //autogen
+#include <svdpagv.hxx>
+#endif
+
+#ifndef _SVX_FMSHIMP_HXX
+#include <fmshimp.hxx>
+#endif
+
+#ifndef _SVX_FMVIEW_HXX
+#include <fmview.hxx>
+#endif
+
+#ifndef _SVX_FMFILTER_HXX
+#include "fmfilter.hxx"
+#endif
+
+#ifndef _SVX_DBERRBOX_HXX
+#include "dbmsgbox.hxx"
+#endif
+
+#ifndef _SV_MSGBOX_HXX //autogen wg. RET_YES
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SVX_QRYPARAM_HXX
+#include "qryparam.hxx"
+#endif
+
+#ifndef _SVT_SDBPARSE_HXX
+#include <svtools/sdbparse.hxx>
+#endif
+
+#ifndef _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif
+
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UTL_UNO3_HXX_
+#include <unotools/uno3.hxx>
+#endif
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+#ifndef _UTL_PROPERTY_AGGREGATION_HXX_
+#include <unotools/propagg.hxx>
+#endif
+#ifndef _UTL_ENUMHELPER_HXX_
+#include <unotools/enumhelper.hxx>
+#endif
+#ifndef _UTL_DB_CONVERSION_HXX_
+#include <unotools/dbconversion.hxx>
+#endif
+#ifndef _UTL_SEQUENCE_HXX_
+#include <unotools/sequence.hxx>
+#endif
+#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
+#include <cppuhelper/queryinterface.hxx>
+#endif
+#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
+#include <cppuhelper/typeprovider.hxx>
+#endif
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+#ifndef _TOOLKIT_UNOHLP_HXX
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+using namespace ::com::sun::star::uno;
+
+extern sal_uInt16 AutoSlotMap[];
+
+//==================================================================
+// FmXAutoControl
+//==================================================================
+struct FmFieldInfo
+{
+ rtl::OUString aFieldName;
+ Reference< ::com::sun::star::beans::XPropertySet > xField;
+ Reference< ::com::sun::star::awt::XTextComponent > xText;
+
+ FmFieldInfo(const Reference< ::com::sun::star::beans::XPropertySet >& _xField, const Reference< ::com::sun::star::awt::XTextComponent >& _xText)
+ :xField(_xField)
+ ,xText(_xText)
+ {xField->getPropertyValue(FM_PROP_NAME) >>= aFieldName;}
+};
+
+//==================================================================
+// FmXAutoControl
+//==================================================================
+class FmXAutoControl: public UnoControl
+
+{
+ // friend Reflection* ::getCppuType((const FmXAutoControl*)0);
+ friend Reference< XInterface > SAL_CALL FmXAutoControl_NewInstance_Impl();
+
+public:
+ FmXAutoControl(){}
+
+// automatisch auskommentiert - [getImplementation] - Wird von OWeakObject nicht weiter unterstützt!
+// virtual void* getImplementation(Reflection * pRef);
+
+ virtual ::rtl::OUString GetComponentServiceName() {return ::rtl::OUString::createFromAscii("Edit");}
+ virtual void SAL_CALL createPeer( const Reference< ::com::sun::star::awt::XToolkit > & rxToolkit, const Reference< ::com::sun::star::awt::XWindowPeer > & rParentPeer );
+
+protected:
+ virtual void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const Any& rVal );
+};
+
+//------------------------------------------------------------------------------
+void FmXAutoControl::createPeer( const Reference< ::com::sun::star::awt::XToolkit > & rxToolkit, const Reference< ::com::sun::star::awt::XWindowPeer > & rParentPeer )
+{
+ UnoControl::createPeer( rxToolkit, rParentPeer );
+
+ Reference< ::com::sun::star::awt::XTextComponent > xText(mxPeer , UNO_QUERY);
+ if (xText.is())
+ {
+ xText->setText(::rtl::OUString(SVX_RES(RID_STR_AUTOFIELD)));
+ xText->setEditable(sal_False);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXAutoControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const Any& rVal )
+{
+ // these properties are ignored
+ if (rPropName == FM_PROP_TEXT)
+ return;
+
+ UnoControl::ImplSetPeerProperty( rPropName, rVal );
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormController, OnTimeout, void*, EMPTYTAG)
+{
+ activateTabOrder();
+ return 1;
+}
+
+/*************************************************************************/
+
+//------------------------------------------------------------------
+Reference< XInterface > SAL_CALL
+ FmXFormController_NewInstance_Impl(const Reference< ::com::sun::star::lang::XMultiServiceFactory > &)
+{
+ return *(new FmXFormController());
+}
+
+//------------------------------------------------------------------
+extern rtl::OUString _fModeName;
+FmXFormController::FmXFormController(FmFormView* _pView, Window* _pWindow, const UniString& _sDispatchPrefix)
+ :OComponentHelper(m_aMutex)
+ ,OPropertySetHelper(OComponentHelper::rBHelper)
+ ,m_aActivateListeners(m_aMutex)
+ ,m_aModifyListeners(m_aMutex)
+ ,m_aErrorListeners(m_aMutex)
+ ,m_aDeleteListeners(m_aMutex)
+ ,m_aRowSetApproveListeners(m_aMutex)
+ ,m_aParameterListeners(m_aMutex)
+ ,m_pView(_pView)
+ ,m_pWindow(_pWindow)
+ ,m_bDBConnection(sal_False)
+ ,m_bCycle(sal_False)
+ ,m_bCanUpdate(sal_False)
+ ,m_bCanInsert(sal_False)
+ ,m_bModified(sal_False)
+ ,m_nLoadEvent( 0 )
+ ,m_bCommitLock(sal_False)
+ ,m_bCurrentRecordModified(sal_False)
+ ,m_bCurrentRecordNew(sal_False)
+ ,m_bLocked(sal_False)
+ ,m_bControlsSorted(sal_True)
+ ,m_aMode(_fModeName)
+ ,m_bFiltering(sal_False)
+ ,m_bAttachEvents(sal_True)
+ ,m_bDetachEvents(sal_True)
+ ,m_nCurrentFilterPosition(0)
+ ,m_sDispatchPrefix(_sDispatchPrefix)
+ ,m_nUpdateDispatcherEvent(0)
+ ,m_nToggleEvent(0)
+{
+ ::utl::increment(m_refCount);
+ {
+ m_xAggregate = Reference< XAggregation > (::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.awt.TabController")), UNO_QUERY);
+ DBG_ASSERT(m_xAggregate.is(), "FmXFormController::FmXFormController : could not create my aggregate !");
+ m_xTabController = Reference< ::com::sun::star::awt::XTabController > (m_xAggregate, UNO_QUERY);
+ }
+ if ( m_xAggregate.is() )
+ m_xAggregate->setDelegator(*this);
+
+ ::utl::decrement(m_refCount);
+
+ m_aInsertTimer.SetTimeout(500);
+ m_aInsertTimer.SetTimeoutHdl(LINK(this,FmXFormController,OnTimeout));
+}
+
+//------------------------------------------------------------------
+FmXFormController::~FmXFormController()
+{
+ if( m_nLoadEvent )
+ Application::RemoveUserEvent( m_nLoadEvent );
+
+ if (m_nToggleEvent)
+ Application::RemoveUserEvent( m_nToggleEvent );
+
+ if (m_nUpdateDispatcherEvent)
+ Application::RemoveUserEvent(m_nUpdateDispatcherEvent);
+
+ if (m_aInsertTimer.IsActive())
+ m_aInsertTimer.Stop();
+
+ // Freigeben der Aggregation
+ if (m_xAggregate.is())
+ {
+ Reference< XInterface > xInt;
+ m_xAggregate->setDelegator(xInt);
+ }
+}
+using namespace ::cppu;
+using namespace ::osl;
+
+// XUnoTunnel
+Sequence< sal_Int8 > FmXFormController::getUnoTunnelImplementationId()
+{
+ static OImplementationId * pId = 0;
+ if (! pId)
+ {
+ MutexGuard aGuard( Mutex::getGlobalMutex() );
+ if (! pId)
+ {
+ static OImplementationId aId;
+ pId = &aId;
+ }
+ }
+ return pId->getImplementationId();
+}
+//------------------------------------------------------------------------------
+sal_Int64 SAL_CALL FmXFormController::getSomething(Sequence<sal_Int8> const& rId)throw( RuntimeException )
+{
+ if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
+ return (sal_Int64)this;
+
+ return sal_Int64();
+}
+
+//------------------------------------------------------------------------------
+Sequence< Type > SAL_CALL FmXFormController::getTypes( ) throw(RuntimeException)
+{
+ Sequence< Type > aTypes(OComponentHelper::getTypes());
+ aTypes.realloc(26);
+ Type* pTypes = aTypes.getArray();
+
+ pTypes[aTypes.getLength()-26] = ::getCppuType((const Reference< ::com::sun::star::form::XFormController>*)0);
+ pTypes[aTypes.getLength()-25] = ::getCppuType((const Reference< ::com::sun::star::container::XChild>*)0);
+ pTypes[aTypes.getLength()-24] = ::getCppuType((const Reference< ::com::sun::star::lang::XEventListener>*)0);
+ pTypes[aTypes.getLength()-23] = ::getCppuType((const Reference< ::com::sun::star::container::XContainerListener>*)0);
+ pTypes[aTypes.getLength()-22] = ::getCppuType((const Reference< ::com::sun::star::container::XIndexAccess>*)0);
+ pTypes[aTypes.getLength()-21] = ::getCppuType((const Reference< ::com::sun::star::container::XEnumerationAccess>*)0);
+ pTypes[aTypes.getLength()-20] = ::getCppuType((const Reference< ::com::sun::star::form::XLoadListener>*)0);
+ pTypes[aTypes.getLength()-19] = ::getCppuType((const Reference< ::com::sun::star::awt::XFocusListener>*)0);
+ pTypes[aTypes.getLength()-18] = ::getCppuType((const Reference< ::com::sun::star::beans::XPropertyChangeListener>*)0);
+ pTypes[aTypes.getLength()-17] = ::getCppuType((const Reference< ::com::sun::star::awt::XTextListener>*)0);
+ pTypes[aTypes.getLength()-16] = ::getCppuType((const Reference< ::com::sun::star::awt::XItemListener>*)0);
+ pTypes[aTypes.getLength()-15] = ::getCppuType((const Reference< ::com::sun::star::util::XModifyListener>*)0);
+ pTypes[aTypes.getLength()-14] = ::getCppuType((const Reference< ::com::sun::star::util::XModifyBroadcaster>*)0);
+ pTypes[aTypes.getLength()-13] = ::getCppuType((const Reference< ::com::sun::star::util::XModeSelector>*)0);
+ pTypes[aTypes.getLength()-12] = ::getCppuType((const Reference< ::com::sun::star::form::XConfirmDeleteListener>*)0);
+ pTypes[aTypes.getLength()-11] = ::getCppuType((const Reference< ::com::sun::star::form::XConfirmDeleteBroadcaster>*)0);
+ pTypes[aTypes.getLength()-10] = ::getCppuType((const Reference< ::com::sun::star::sdbc::XRowSetListener>*)0);
+ pTypes[aTypes.getLength()-9] = ::getCppuType((const Reference< ::com::sun::star::sdb::XRowSetApproveListener>*)0);
+ pTypes[aTypes.getLength()-8] = ::getCppuType((const Reference< ::com::sun::star::sdb::XRowSetApproveBroadcaster>*)0);
+ pTypes[aTypes.getLength()-7] = ::getCppuType((const Reference< ::com::sun::star::sdb::XSQLErrorListener>*)0);
+ pTypes[aTypes.getLength()-6] = ::getCppuType((const Reference< ::com::sun::star::sdb::XSQLErrorBroadcaster>*)0);
+ pTypes[aTypes.getLength()-5] = ::getCppuType((const Reference< ::com::sun::star::form::XDatabaseParameterListener>*)0);
+ pTypes[aTypes.getLength()-4] = ::getCppuType((const Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster>*)0);
+ pTypes[aTypes.getLength()-3] = ::getCppuType((const Reference< ::com::sun::star::frame::XDispatchProvider>*)0);
+ pTypes[aTypes.getLength()-2] = ::getCppuType((const Reference< ::com::sun::star::lang::XServiceInfo>*)0);
+ pTypes[aTypes.getLength()-1] = ::getCppuType((const Reference< ::com::sun::star::form::XResetListener>*)0);
+
+ return aTypes;
+}
+//------------------------------------------------------------------
+Any SAL_CALL FmXFormController::queryAggregation( const Type& aType ) throw(RuntimeException)
+{
+ Any aRet = ::cppu::queryInterface(aType,
+ static_cast< ::com::sun::star::form::XFormController*>(this),
+ static_cast< ::com::sun::star::container::XChild*>(this),
+ // static_cast< ::com::sun::star::lang::XEventListener*>(this),
+ static_cast< ::com::sun::star::container::XContainerListener*>(this),
+ static_cast< ::com::sun::star::container::XIndexAccess*>(this),
+ static_cast< ::com::sun::star::container::XEnumerationAccess*>(this),
+ static_cast< ::com::sun::star::form::XLoadListener*>(this),
+ static_cast< ::com::sun::star::awt::XFocusListener*>(this),
+ static_cast< ::com::sun::star::beans::XPropertyChangeListener*>(this),
+ static_cast< ::com::sun::star::awt::XTextListener*>(this),
+ static_cast< ::com::sun::star::awt::XItemListener*>(this),
+ static_cast< ::com::sun::star::util::XModifyListener*>(this),
+ static_cast< ::com::sun::star::util::XModifyBroadcaster*>(this));
+ if(aRet.hasValue())
+ return aRet;
+ aRet = ::cppu::queryInterface(aType,
+ static_cast< ::com::sun::star::util::XModeSelector*>(this),
+ static_cast< ::com::sun::star::form::XConfirmDeleteListener*>(this),
+ static_cast< ::com::sun::star::form::XConfirmDeleteBroadcaster*>(this),
+ static_cast< ::com::sun::star::sdbc::XRowSetListener*>(this),
+ static_cast< ::com::sun::star::sdb::XRowSetApproveListener*>(this),
+ static_cast< ::com::sun::star::sdb::XRowSetApproveBroadcaster*>(this),
+ static_cast< ::com::sun::star::sdb::XSQLErrorListener*>(this),
+ static_cast< ::com::sun::star::sdb::XSQLErrorBroadcaster*>(this),
+ static_cast< ::com::sun::star::form::XDatabaseParameterListener*>(this),
+ static_cast< ::com::sun::star::form::XDatabaseParameterBroadcaster*>(this),
+ // static_cast< ::com::sun::star::frame::XDispatchProvider*>(this),
+ static_cast< ::com::sun::star::lang::XServiceInfo*>(this),
+ static_cast< ::com::sun::star::form::XResetListener*>(this));
+
+ if(aRet.hasValue())
+ return aRet;
+ aRet = OComponentHelper::queryAggregation(aType);
+ if(aRet.hasValue())
+ return aRet;
+ return m_xAggregate->queryAggregation(aType);
+}
+
+// ::com::sun::star::lang::XServiceInfo
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXFormController::supportsService(const ::rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException )
+{
+ Sequence< ::rtl::OUString> aSNL(static_getSupportedServiceNames());
+ const ::rtl::OUString * pArray = aSNL.getConstArray();
+ for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return sal_True;
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXFormController::getImplementationName() throw( RuntimeException )
+{
+ return ::rtl::OUString::createFromAscii("com.sun.star.form.FmXFormController");
+}
+
+//------------------------------------------------------------------------------
+Sequence< ::rtl::OUString> SAL_CALL FmXFormController::getSupportedServiceNames(void) throw( RuntimeException )
+{
+ return static_getSupportedServiceNames();
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXFormController::approveReset(const ::com::sun::star::lang::EventObject& rEvent) throw( RuntimeException )
+{
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::resetted(const ::com::sun::star::lang::EventObject& rEvent) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard(m_aMutex);
+ if (getCurrentControl().is() && (getCurrentControl()->getModel() == rEvent.Source))
+ m_bModified = sal_False;
+}
+
+//------------------------------------------------------------------------------
+Sequence< ::rtl::OUString> FmXFormController::static_getSupportedServiceNames(void)
+{
+ static Sequence< ::rtl::OUString> aServices;
+ if (!aServices.getLength())
+ {
+ aServices.realloc(2);
+ aServices.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.form.FormController");
+ aServices.getArray()[1] = ::rtl::OUString::createFromAscii("com.sun.star.awt.control.TabController");
+ }
+ return aServices;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::setCurrentFilterPosition(sal_Int32 nPos)
+{
+ DBG_ASSERT(nPos < m_aFilters.size(), "Invalid Position");
+
+ if (nPos != m_nCurrentFilterPosition)
+ {
+ m_nCurrentFilterPosition = nPos;
+
+ // reset the text for all controls
+ for (FmFilterControls::const_iterator iter = m_aFilterControls.begin();
+ iter != m_aFilterControls.end(); iter++)
+ (*iter).first->setText(rtl::OUString());
+
+ if (nPos != -1)
+ {
+ // set the text for all filters
+ FmFilterRow& rRow = m_aFilters[m_nCurrentFilterPosition];
+ for (FmFilterRow::const_iterator iter2 = rRow.begin();
+ iter2 != rRow.end(); iter2++)
+ {
+ (*iter2).first->setText((*iter2).second);
+ }
+ }
+ }
+}
+
+// OPropertySetHelper
+//------------------------------------------------------------------------------
+sal_Bool FmXFormController::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue,
+ sal_Int32 nHandle, const Any& rValue )
+ throw( ::com::sun::star::lang::IllegalArgumentException )
+{
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue )
+{
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
+{
+ switch (nHandle)
+ {
+ case FM_ATTR_FILTER_CRITERIA:
+ {
+ String aFilter;
+ Reference< ::com::sun::star::sdbc::XConnection> xConnection(::utl::getConnection(Reference< ::com::sun::star::sdbc::XRowSet>(m_xModelAsIndex, UNO_QUERY)));
+ if (xConnection.is())
+ {
+ Reference< ::com::sun::star::sdbc::XDatabaseMetaData> xMetaData(xConnection->getMetaData());
+ Reference< ::com::sun::star::util::XNumberFormatsSupplier> xFormatSupplier( ::utl::getNumberFormats(xConnection, sal_True));
+ Reference< ::com::sun::star::util::XNumberFormatter> xFormatter(::utl::getProcessServiceFactory()
+ ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY);
+ xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
+
+ Reference< ::com::sun::star::sdbcx::XColumnsSupplier> xSupplyCols(m_xModelAsIndex, UNO_QUERY);
+ Reference< ::com::sun::star::container::XNameAccess> xFields(xSupplyCols->getColumns(), UNO_QUERY);
+
+ String aQuote( xMetaData->getIdentifierQuoteString() );
+
+ // now add the filter rows
+ for (FmFilterRows::const_iterator i = m_aFilters.begin(); i != m_aFilters.end(); i++)
+ {
+ String aTest, aErrorMsg, aCriteria;
+ const FmFilterRow& rRow = *i;
+
+ if (!rRow.empty())
+ {
+ if (aFilter.Len())
+ aFilter.AppendAscii(" OR ");
+
+ aFilter += '(';
+ for (FmFilterRow::const_iterator j = rRow.begin(); j != rRow.end(); j++)
+ {
+ // get the field of the controls map
+ Reference< ::com::sun::star::awt::XTextComponent > xText = (*j).first;
+ Reference< ::com::sun::star::beans::XPropertySet> xField = (*m_aFilterControls.find(xText)).second;
+ DBG_ASSERT(xField.is(), "NoField found");
+ if (j != rRow.begin())
+ aFilter.AppendAscii(" AND ");
+
+ aTest = (const sal_Unicode*)(*j).second;
+ aErrorMsg = String();
+ SdbSqlParseNode* pParseNode = getSQLParser().PredicateTree(aErrorMsg, aTest, xFormatter,
+ Application::GetAppInternational(), xField);
+
+ if (pParseNode)
+ {
+ aCriteria = String();
+ pParseNode->ParseNodeToStr(aCriteria,
+ xMetaData,
+ FALSE,
+ TRUE);
+ aFilter += aCriteria;
+ }
+ }
+ aFilter += ')';
+ }
+ }
+ }
+ rValue <<= ::rtl::OUString(aFilter);
+ } break;
+ }
+}
+
+//------------------------------------------------------------------------------
+Reference< ::com::sun::star::beans::XPropertySetInfo > FmXFormController::getPropertySetInfo()
+{
+ static Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+}
+
+//------------------------------------------------------------------------------
+#define DECL_PROP_CORE(varname, type) \
+pDesc[nPos++] = ::com::sun::star::beans::Property(FM_PROP_##varname, FM_ATTR_##varname, ::getCppuType((const type*)0),
+
+
+#define DECL_PROP1(varname, type, attrib1) \
+ DECL_PROP_CORE(varname, type) ::com::sun::star::beans::PropertyAttribute::##attrib1)
+
+//------------------------------------------------------------------------------
+void FmXFormController::fillProperties(
+ Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps,
+ Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
+ ) const
+{
+ _rProps.realloc(1);
+ sal_Int32 nPos = 0;
+ ::com::sun::star::beans::Property* pDesc = _rProps.getArray();
+ DECL_PROP1(FILTER_CRITERIA, rtl::OUString, READONLY);
+}
+
+//------------------------------------------------------------------------------
+::cppu::IPropertyArrayHelper& FmXFormController::getInfoHelper()
+{
+ return *getArrayHelper();
+}
+
+// ::com::sun::star::container::XElementAccess
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXFormController::hasElements(void) throw( RuntimeException )
+{
+ return m_aChilds.size() != 0;
+}
+
+//------------------------------------------------------------------------------
+Type SAL_CALL FmXFormController::getElementType(void) throw( RuntimeException )
+{
+ return ::getCppuType((const Reference< ::com::sun::star::form::XFormController>*)0);
+
+}
+
+// ::com::sun::star::container::XEnumerationAccess
+//------------------------------------------------------------------------------
+Reference< ::com::sun::star::container::XEnumeration > SAL_CALL FmXFormController::createEnumeration(void) throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return new ::utl::OEnumerationByIndex(this);
+}
+
+// ::com::sun::star::container::XIndexAccess
+//------------------------------------------------------------------------------
+sal_Int32 SAL_CALL FmXFormController::getCount(void) throw( RuntimeException )
+{
+ return m_aChilds.size();
+}
+
+//------------------------------------------------------------------------------
+Any SAL_CALL FmXFormController::getByIndex(sal_Int32 Index) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, RuntimeException )
+{
+ if (Index < 0 ||
+ Index >= m_aChilds.size())
+ throw ::com::sun::star::lang::IndexOutOfBoundsException();
+
+ return makeAny(m_aChilds[Index]);
+ // , ::getCppuType((const ::com::sun::star::form::XFormController*)0));
+}
+
+//-----------------------------------------------------------------------------
+void FmXFormController::addChild(FmXFormController* pChild)
+{
+ Reference< ::com::sun::star::form::XFormController > xController(pChild);
+ m_aChilds.push_back(xController);
+ pChild->setParent(static_cast< ::com::sun::star::form::XFormController* >(this));
+
+ Reference< ::com::sun::star::form::XFormComponent > xForm(pChild->getModel(), UNO_QUERY);
+
+ // search the position of the model within the form
+ sal_uInt32 nPos = m_xModelAsIndex->getCount();
+ for( ; nPos; )
+ {
+ if ((::com::sun::star::form::XFormComponent*)xForm.get() ==
+ (::com::sun::star::form::XFormComponent*)(*(Reference< ::com::sun::star::form::XFormComponent > *)m_xModelAsIndex->getByIndex(--nPos).getValue()).get())
+ {
+ Reference< XInterface > xIfc(xController, UNO_QUERY);
+ m_xModelAsManager->attach( nPos, xIfc, makeAny( xController) );
+ break;
+ }
+ }
+}
+
+// EventListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::disposing(const ::com::sun::star::lang::EventObject& e) throw( RuntimeException )
+{
+ // Ist der Container disposed worden
+ Reference< ::com::sun::star::awt::XControlContainer > xContainer(e.Source, UNO_QUERY);
+ if (xContainer.is())
+ {
+ setContainer(Reference< ::com::sun::star::awt::XControlContainer > ());
+ }
+ else
+ {
+ // ist ein Control disposed worden
+ Reference< ::com::sun::star::awt::XControl > xControl(e.Source, UNO_QUERY);
+ if (xControl.is())
+ {
+ if (getContainer().is())
+ removeControl(xControl);
+ }
+ }
+}
+
+// OComponentHelper
+//-----------------------------------------------------------------------------
+void FmXFormController::disposing(void)
+{
+ ::com::sun::star::lang::EventObject aEvt(static_cast< ::com::sun::star::form::XFormController* >(this));
+ // noch aktiv ?
+ if (m_xActiveControl.is())
+ {
+ NOTIFY_LISTENERS(m_aActivateListeners, ::com::sun::star::form::XFormControllerListener, formDeactivated, aEvt);
+ }
+
+ m_aActivateListeners.disposeAndClear(aEvt);
+ m_aModifyListeners.disposeAndClear(aEvt);
+ m_aErrorListeners.disposeAndClear(aEvt);
+ m_aDeleteListeners.disposeAndClear(aEvt);
+ m_aRowSetApproveListeners.disposeAndClear(aEvt);
+ m_aParameterListeners.disposeAndClear(aEvt);
+
+ m_aFilterControls.clear();
+ m_aFilters.clear();
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ m_xActiveControl = m_xCurrentControl = NULL;
+
+ for (FmFormControllers::const_iterator i = m_aChilds.begin();
+ i != m_aChilds.end(); i++)
+ {
+ // search the position of the model within the form
+ Reference< ::com::sun::star::form::XFormComponent > xForm((*i)->getModel(), UNO_QUERY);
+ sal_uInt32 nPos = m_xModelAsIndex->getCount();
+ for( ; nPos; )
+ {
+
+ if ((::com::sun::star::form::XFormComponent*)xForm.get() ==
+ (::com::sun::star::form::XFormComponent*)(*(Reference< ::com::sun::star::form::XFormComponent > *)m_xModelAsIndex->getByIndex(--nPos).getValue()).get())
+ {
+ Reference< XInterface > xIfc(*i, UNO_QUERY);
+ m_xModelAsManager->detach( nPos, xIfc);
+ break;
+ }
+ }
+
+ Reference< ::com::sun::star::lang::XComponent > (*i, UNO_QUERY)->dispose();
+ }
+ m_aChilds.clear();
+
+ if (m_bDBConnection)
+ unload();
+
+ setContainer(Reference< ::com::sun::star::awt::XControlContainer > ());
+ setModel(Reference< ::com::sun::star::awt::XTabControllerModel > ());
+ setParent(Reference< XInterface > ());
+
+ ::utl::disposeComponent(m_xComposer);
+
+ m_bDBConnection = sal_False;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt)
+{
+ sal_Bool bModifiedChanged = (evt.PropertyName == FM_PROP_ISMODIFIED);
+ sal_Bool bNewChanged = (evt.PropertyName == FM_PROP_ISNEW);
+ if (bModifiedChanged || bNewChanged)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (bModifiedChanged)
+ m_bCurrentRecordModified = ::utl::getBOOL(evt.NewValue);
+ else
+ m_bCurrentRecordNew = ::utl::getBOOL(evt.NewValue);
+
+ // toggle the locking
+ if (m_bLocked != determineLockState())
+ {
+ m_bLocked = !m_bLocked;
+ setLocks();
+ if (isListeningForChanges())
+ startListening();
+ else
+ stopListening();
+ }
+
+ if (bNewChanged)
+ {
+ if (m_nToggleEvent)
+ Application::RemoveUserEvent( m_nToggleEvent );
+ m_nToggleEvent = Application::PostUserEvent( LINK(this, FmXFormController,
+ OnToggleAutoFields) );
+ }
+
+ if (!m_bCurrentRecordModified)
+ m_bModified = sal_False;
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::toggleAutoFields(sal_Bool bAutoFields)
+{
+ if (!m_pView)
+ {
+ DBG_ERROR("FmXFormController::startFiltering : you can't filter if you created me as service !");
+ return;
+ }
+
+
+ // Austauschen der Kontrols fuer das aktuelle Formular
+ Sequence < Reference< ::com::sun::star::awt::XControl > > aControls(m_aControls);
+ const Reference< ::com::sun::star::awt::XControl > * pControls = m_aControls.getConstArray();
+ SdrPageView* pCurPageView = m_pView->GetPageViewPvNum(0);
+
+ sal_uInt16 nPos = pCurPageView ? pCurPageView->GetWinList().Find((OutputDevice*)m_pView->GetActualOutDev()) : SDRPAGEVIEWWIN_NOTFOUND;
+ if (nPos == SDRPAGEVIEWWIN_NOTFOUND)
+ return;
+
+ // the control we have to activate after replacement
+ Reference< ::com::sun::star::awt::XControl > xNewActiveControl;
+ if (bAutoFields)
+ {
+ // as we don't want new controls to be attached to the scripting environment
+ // we change attach flags
+ m_bAttachEvents = sal_False;
+ for (sal_Int32 i = aControls.getLength(); i > 0;)
+ {
+ const Reference< ::com::sun::star::awt::XControl > & xControl = pControls[--i];
+ if (xControl.is())
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xControl->getModel(), UNO_QUERY);
+ if (xSet.is() && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xSet))
+ {
+ // does the model use a bound field ?
+ Any aVal = xSet->getPropertyValue(FM_PROP_BOUNDFIELD);
+ Reference< ::com::sun::star::beans::XPropertySet > xField = *(Reference< ::com::sun::star::beans::XPropertySet > *)aVal.getValue();
+
+ // is it a autofield?
+ if (xField.is() && ::utl::hasProperty(FM_PROP_AUTOINCREMENT, xField) &&
+ ::utl::getBOOL(xField->getPropertyValue(FM_PROP_AUTOINCREMENT)))
+ {
+ const SdrPageViewWinRec& rWR = pCurPageView->GetWinList()[nPos];
+ const SdrUnoControlList& rControlList = rWR.GetControlList();
+ sal_uInt16 nCtrlNum = rControlList.Find(xControl);
+ if (nCtrlNum != SDRUNOCONTROL_NOTFOUND)
+ {
+ // ok create an autocontrol
+ SdrUnoControlRec& rControlRec = (SdrUnoControlRec&)rControlList[nCtrlNum];
+ FmXAutoControl* pAutoControl = new FmXAutoControl();
+ Reference< ::com::sun::star::awt::XControl > xNewControl(pAutoControl);
+
+ // setting the focus if the current control
+ // is the active one
+ if ((::com::sun::star::awt::XControl*)m_xActiveControl.get() == (::com::sun::star::awt::XControl*)xControl.get())
+ {
+ xNewActiveControl = xNewControl;
+ m_xActiveControl = m_xCurrentControl = NULL;
+ }
+ else if ((::com::sun::star::awt::XControl*)m_xCurrentControl.get() == (::com::sun::star::awt::XControl*)xControl.get())
+ m_xCurrentControl = xNewControl;
+
+ rControlRec.ReplaceControl(xNewControl);
+ }
+ }
+ }
+ }
+ }
+ m_bAttachEvents = sal_True;
+ }
+ else
+ {
+ m_bDetachEvents = sal_False;
+ for (sal_Int32 i = aControls.getLength(); i > 0;)
+ {
+ const Reference< ::com::sun::star::awt::XControl > & xControl = pControls[--i];
+ if (xControl.is())
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xControl->getModel(), UNO_QUERY);
+ if (xSet.is() && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xSet))
+ {
+ // does the model use a bound field ?
+ Any aVal = xSet->getPropertyValue(FM_PROP_BOUNDFIELD);
+ Reference< ::com::sun::star::beans::XPropertySet > xField = *(Reference< ::com::sun::star::beans::XPropertySet > *)aVal.getValue();
+
+ // is it a autofield?
+ if (xField.is() && ::utl::hasProperty(FM_PROP_AUTOINCREMENT, xField) &&
+ ::utl::getBOOL(xField->getPropertyValue(FM_PROP_AUTOINCREMENT)))
+ {
+ const SdrPageViewWinRec& rWR = pCurPageView->GetWinList()[nPos];
+ const SdrUnoControlList& rControlList = rWR.GetControlList();
+ sal_uInt16 nCtrlNum = rControlList.Find(xControl);
+ if (nCtrlNum != SDRUNOCONTROL_NOTFOUND)
+ {
+ // Zuruecksetzen des Controls auf das Defaultcontrol
+ SdrUnoControlRec& rControlRec = (SdrUnoControlRec&)rControlList[nCtrlNum];
+ ::rtl::OUString aServiceName = ::utl::getString(xSet->getPropertyValue(FM_PROP_DEFAULTCONTROL));
+ Reference< ::com::sun::star::awt::XControl > xNewControl(::utl::getProcessServiceFactory()->createInstance(aServiceName), UNO_QUERY);
+
+ // setting the focus if the current control
+ // is the active one
+ if ((::com::sun::star::awt::XControl*)m_xActiveControl.get() == (::com::sun::star::awt::XControl*)xControl.get())
+ {
+ xNewActiveControl = xNewControl;
+ m_xActiveControl = m_xCurrentControl = NULL;
+ }
+ else if ((::com::sun::star::awt::XControl*)m_xCurrentControl.get() == (::com::sun::star::awt::XControl*)xControl.get())
+ m_xCurrentControl = xNewControl;
+
+ rControlRec.ReplaceControl(xNewControl);
+ }
+ }
+ }
+ }
+ }
+ m_bDetachEvents = sal_True;
+ }
+
+ // set the focus async if possible
+ // setting the focus to the replacing control
+ Reference< ::com::sun::star::awt::XWindow > xWindow(xNewActiveControl, UNO_QUERY);
+ if (xWindow.is())
+ xWindow->setFocus();
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormController, OnToggleAutoFields, void*, EMPTYARG)
+{
+ m_nToggleEvent = 0;
+ toggleAutoFields(m_bCurrentRecordNew);
+ return 1L;
+}
+
+// ::com::sun::star::awt::XTextListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::textChanged(const ::com::sun::star::awt::TextEvent& e)
+{
+ if (m_bFiltering)
+ {
+ Reference< ::com::sun::star::awt::XTextComponent > xText(e.Source,UNO_QUERY);
+ ::rtl::OUString aText = xText->getText();
+
+ // Suchen der aktuellen Row
+ FmFilterRow& rRow = m_aFilters[m_nCurrentFilterPosition];
+
+ // do we have a new filter
+ if (aText.getLength())
+ rRow[xText] = aText;
+ else
+ {
+ // do we have the control in the row
+ FmFilterRow::iterator iter = rRow.find(xText);
+ // erase the entry out of the row
+ if (iter != rRow.end())
+ rRow.erase(iter);
+ }
+ }
+ else if (!m_bModified)
+ onModify();
+}
+
+// ::com::sun::star::awt::XItemListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::itemStateChanged(const ::com::sun::star::awt::ItemEvent& rEvent)
+{
+ if (!m_bModified)
+ onModify();
+}
+
+// XModificationBroadcaster
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::addModifyListener(const Reference< ::com::sun::star::util::XModifyListener > & l)
+{
+ m_aModifyListeners.addInterface( l );
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::removeModifyListener(const Reference< ::com::sun::star::util::XModifyListener > & l)
+{
+ m_aModifyListeners.removeInterface( l );
+}
+
+// XModificationListener
+//------------------------------------------------------------------------------
+void FmXFormController::modified(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ if (!m_bModified)
+ onModify();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::onModify()
+{
+ if (!m_bModified)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ m_bModified = sal_True;
+
+ // Satz in den BearbeitenModus schalten
+ }
+
+ ::com::sun::star::lang::EventObject aEvt((cppu::OWeakObject*)this);
+ NOTIFY_LISTENERS(m_aModifyListeners, ::com::sun::star::util::XModifyListener, modified, aEvt);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormController::determineLockState() const
+{
+ // a.) in filter mode we are always locked
+ // b.) if we have no valid model or our model (a result set) is not alive -> we're locked
+ // c.) if we are inserting everything is OK and we are not locked
+ // d.) if are not updatable or on invalid position
+ Reference< ::com::sun::star::sdbc::XResultSet > xResultSet(m_xModelAsIndex, UNO_QUERY);
+ if (m_bFiltering || !xResultSet.is() || !isRowSetAlive(xResultSet))
+ return sal_True;
+ else
+ return (m_bCanInsert && m_bCurrentRecordNew) ? sal_False
+ : xResultSet->isBeforeFirst() || xResultSet->isAfterLast() || xResultSet->rowDeleted() || !m_bCanUpdate;
+}
+
+// FocusListener
+//------------------------------------------------------------------------------
+void FmXFormController::focusGained(const ::com::sun::star::awt::FocusEvent& e)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ Reference< ::com::sun::star::awt::XControl > xControl(e.Source, UNO_QUERY);
+
+ if (m_bDBConnection)
+ {
+ // do we need to keep the locking of the commit
+ // we hold the lock as long as the control differs from the current
+ // otherwhise we disabled the lock
+ m_bCommitLock = m_bCommitLock && (::com::sun::star::awt::XControl*)xControl.get() != (::com::sun::star::awt::XControl*)m_xCurrentControl.get();
+ if (m_bCommitLock)
+ return;
+
+ // when do we have to commit a value to form or a filter
+ // a.) if the current value is modified
+ // b.) there must be a current control
+ // c.) and it must be different from the new focus owning control or
+ // d.) the focus is moving around (so we have only one control)
+
+ if ((m_bModified || m_bFiltering) &&
+ m_xCurrentControl.is() &&
+ (((::com::sun::star::awt::XControl*)xControl.get() != (::com::sun::star::awt::XControl*)m_xCurrentControl.get()) ||
+ ((e.FocusFlags & ::com::sun::star::awt::FocusChangeReason::AROUND) && (m_bCycle || m_bFiltering)))
+ )
+ {
+ // check the old control if the content is ok
+#if DEBUG || DBG_UTIL
+ Reference< ::com::sun::star::form::XBoundControl > xLockingTest(m_xCurrentControl, UNO_QUERY);
+ sal_Bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock();
+ DBG_ASSERT(!bControlIsLocked, "FmXFormController::focusLost : I'm modified and the current control is locked ? How this ?");
+ // normalerweise sollte ein gelocktes Control nicht modified sein, also muss wohl mein bModified aus einem anderen Kontext
+ // gesetzt worden sein, was ich nicht verstehen wuerde ...
+#endif
+ DBG_ASSERT(m_xCurrentControl.is(), "kein CurrentControl gesetzt");
+ // zunaechst das Control fragen ob es das IFace unterstuetzt
+ Reference< ::com::sun::star::form::XBoundComponent > xBound(m_xCurrentControl, UNO_QUERY);
+ if (!xBound.is() && m_xCurrentControl.is())
+ xBound = Reference< ::com::sun::star::form::XBoundComponent > (m_xCurrentControl->getModel(), UNO_QUERY);
+
+ // lock if we lose the focus during commit
+ m_bCommitLock = sal_True;
+
+ // Commit nicht erfolgreich, Focus zuruecksetzen
+ if (xBound.is() && !xBound->commit())
+ {
+ // the commit failed and we don't commit again until the current control
+ // which couldn't be commit gains the focus again
+ Reference< ::com::sun::star::awt::XWindow > xWindow(m_xCurrentControl, UNO_QUERY);
+ if (xWindow.is())
+ xWindow->setFocus();
+ return;
+ }
+ else
+ {
+ m_bModified = sal_False;
+ m_bCommitLock = sal_False;
+ }
+ }
+
+ if (!m_bFiltering && m_bCycle && (e.FocusFlags & ::com::sun::star::awt::FocusChangeReason::AROUND) && m_xCurrentControl.is())
+ {
+ if (e.FocusFlags & ::com::sun::star::awt::FocusChangeReason::FORWARD)
+ FmXFormShell::CanMoveRight((::com::sun::star::form::XFormController*)this) && FmXFormShell::MoveRight((::com::sun::star::form::XFormController*)this);
+ else // backward
+ FmXFormShell::CanMoveLeft((::com::sun::star::form::XFormController*)this) && FmXFormShell::MoveLeft((::com::sun::star::form::XFormController*)this);
+ }
+ }
+
+ // Immer noch ein und dasselbe Control
+ if ((::com::sun::star::awt::XControl*)m_xActiveControl.get() == (::com::sun::star::awt::XControl*)xControl.get() &&
+ (::com::sun::star::awt::XControl*)xControl.get() == (::com::sun::star::awt::XControl*)m_xCurrentControl.get())
+ {
+ DBG_ASSERT(m_xCurrentControl.is(), "Kein CurrentControl selektiert");
+ return;
+ }
+
+ sal_Bool bActivated = !m_xActiveControl.is() && xControl.is();
+
+ m_xActiveControl = xControl;
+ m_xCurrentControl = xControl;
+
+ DBG_ASSERT(m_xCurrentControl.is(), "Kein CurrentControl selektiert");
+
+ if (bActivated)
+ onActivate();
+
+ if (m_bDBConnection && !m_bFiltering)
+ SFX_BINDINGS().Invalidate(AutoSlotMap);
+
+ if (m_xCurrentControl.is())
+ {
+ // Control erhaelt Focus, dann eventuell in den sichtbaren Bereich
+ Reference< ::com::sun::star::awt::XWindow > xWindow(xControl, UNO_QUERY);
+ if (xWindow.is() && m_pView && m_pWindow)
+ {
+ ::com::sun::star::awt::Rectangle aRect = xWindow->getPosSize();
+ Rectangle aNewRect(aRect.X,aRect.Y,aRect.X+aRect.Width,aRect.Y+aRect.Height);
+ aNewRect = m_pWindow->PixelToLogic(aNewRect);
+ m_pView->MakeVisible(aNewRect, *m_pWindow);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::onActivate()
+{
+ // benachrichtigen, dass form activiert
+ ::com::sun::star::lang::EventObject aEvt;
+ aEvt.Source = *this;
+ NOTIFY_LISTENERS(m_aActivateListeners, ::com::sun::star::form::XFormControllerListener, formActivated, aEvt);
+
+ // verschicken ob modified
+ if (m_bModified)
+ {
+ NOTIFY_LISTENERS(m_aModifyListeners, ::com::sun::star::util::XModifyListener, modified, aEvt);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::focusLost(const ::com::sun::star::awt::FocusEvent& e)
+{
+ Reference< ::com::sun::star::awt::XControl > xControl(e.Source, UNO_QUERY);
+ Reference< ::com::sun::star::awt::XWindowPeer > xNext(e.NextFocus, UNO_QUERY);
+ Reference< ::com::sun::star::awt::XControl > xNextControl = isInList(xNext);
+ if (!xNextControl.is())
+ {
+ m_xActiveControl = NULL;
+ ::com::sun::star::lang::EventObject aEvt;
+ aEvt.Source = *this;
+ NOTIFY_LISTENERS(m_aActivateListeners, ::com::sun::star::form::XFormControllerListener, formDeactivated, aEvt);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::setModel(const Reference< ::com::sun::star::awt::XTabControllerModel > & Model)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ DBG_ASSERT(m_xTabController.is(), "FmXFormController::setModel : invalid aggregate !");
+
+ // disconnect from the old model
+ if (m_xModelAsIndex.is())
+ {
+ if (m_bDBConnection)
+ {
+ // we are currently working on the model
+ ::com::sun::star::lang::EventObject aEvt(m_xModelAsIndex);
+ unloaded(aEvt);
+ }
+
+ Reference< ::com::sun::star::form::XLoadable > xForm(m_xModelAsIndex, UNO_QUERY);
+ if (xForm.is())
+ xForm->removeLoadListener(this);
+
+ Reference< ::com::sun::star::sdb::XSQLErrorBroadcaster > xBroadcaster(m_xModelAsIndex, UNO_QUERY);
+ if (xBroadcaster.is())
+ xBroadcaster->removeSQLErrorListener(this);
+
+ Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xParamBroadcaster(m_xModelAsIndex, UNO_QUERY);
+ if (xParamBroadcaster.is())
+ xParamBroadcaster->removeParameterListener(this);
+ }
+
+ // set the new model wait for the load event
+ if (m_xTabController.is())
+ m_xTabController->setModel(Model);
+ m_xModelAsIndex = Reference< ::com::sun::star::container::XIndexAccess > (Model, UNO_QUERY);
+ m_xModelAsManager = Reference< ::com::sun::star::script::XEventAttacherManager > (Model, UNO_QUERY);
+
+ // only if both ifaces exit, the controller will work successful
+ if (!m_xModelAsIndex.is() || !m_xModelAsManager.is())
+ {
+ m_xModelAsManager = NULL;
+ m_xModelAsIndex = NULL;
+ }
+
+ if (m_xModelAsIndex.is())
+ {
+ // adding load and ui interaction listeners
+ Reference< ::com::sun::star::form::XLoadable > xForm(Model, UNO_QUERY);
+ if (xForm.is())
+ xForm->addLoadListener(this);
+
+ Reference< ::com::sun::star::sdb::XSQLErrorBroadcaster > xBroadcaster(Model, UNO_QUERY);
+ if (xBroadcaster.is())
+ xBroadcaster->addSQLErrorListener(this);
+
+ Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xParamBroadcaster(Model, UNO_QUERY);
+ if (xParamBroadcaster.is())
+ xParamBroadcaster->addParameterListener(this);
+
+ // well, is the database already loaded?
+ // then we have to simulate a load event
+ Reference< ::com::sun::star::form::XLoadable > xCursor(m_xModelAsIndex, UNO_QUERY);
+ if (xCursor.is() && xCursor->isLoaded())
+ {
+ ::com::sun::star::lang::EventObject aEvt(xCursor);
+ loaded(aEvt);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+Reference< ::com::sun::star::awt::XTabControllerModel > FmXFormController::getModel()
+{
+ DBG_ASSERT(m_xTabController.is(), "FmXFormController::getModel : invalid aggregate !");
+ if (!m_xTabController.is())
+ return Reference< ::com::sun::star::awt::XTabControllerModel > ();
+ return m_xTabController->getModel();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::addToEventAttacher(const Reference< ::com::sun::star::awt::XControl > & xControl)
+{
+ // anmelden beim Eventattacher
+ Reference< ::com::sun::star::form::XFormComponent > xComp(xControl->getModel(), UNO_QUERY);
+ if (xComp.is() && m_xModelAsIndex.is())
+ {
+ // Und die Position des ControlModel darin suchen
+ sal_uInt32 nPos = m_xModelAsIndex->getCount();
+ for( ; nPos; )
+ {
+ if ((::com::sun::star::form::XFormComponent*)xComp.get() ==
+ (::com::sun::star::form::XFormComponent*)(*(Reference< ::com::sun::star::form::XFormComponent > *)m_xModelAsIndex->getByIndex(--nPos).getValue()).get())
+ {
+ Reference< XInterface > xIfc(xControl, UNO_QUERY);
+ m_xModelAsManager->attach( nPos, xIfc, makeAny(xControl) );
+ break;
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::removeFromEventAttacher(const Reference< ::com::sun::star::awt::XControl > & xControl)
+{
+ // abmelden beim Eventattacher
+ Reference< ::com::sun::star::form::XFormComponent > xComp(xControl->getModel(), UNO_QUERY);
+ if (xComp.is() && xComp->getParent().is() && m_xModelAsIndex.is())
+ {
+ // Und die Position des ControlModel darin suchen
+ sal_uInt32 nPos = m_xModelAsIndex->getCount();
+ for( ; nPos; )
+ {
+ if ((::com::sun::star::form::XFormComponent*)xComp.get() ==
+ (::com::sun::star::form::XFormComponent*)(*(Reference< ::com::sun::star::form::XFormComponent > *)m_xModelAsIndex->getByIndex(--nPos).getValue()).get())
+ {
+ Reference< XInterface > xIfc(xControl, UNO_QUERY);
+ m_xModelAsManager->detach( nPos, xIfc );
+ break;
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::setContainer(const Reference< ::com::sun::star::awt::XControlContainer > & xContainer)
+{
+ Reference< ::com::sun::star::awt::XTabControllerModel > xTabModel(getModel());
+ DBG_ASSERT(xTabModel.is() || !xContainer.is(), "No Model defined");
+ // if we have a new container we need a model
+ DBG_ASSERT(m_xTabController.is(), "FmXFormController::setContainer : invalid aggregate !");
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ Reference< ::com::sun::star::container::XContainer > xCurrentContainer;
+ if (m_xTabController.is())
+ xCurrentContainer = Reference< ::com::sun::star::container::XContainer > (m_xTabController->getContainer(), UNO_QUERY);
+ if (xCurrentContainer.is())
+ {
+ xCurrentContainer->removeContainerListener(this);
+
+ if (m_aInsertTimer.IsActive())
+ m_aInsertTimer.Stop();
+
+ // bei den Controls abmelden
+ sal_Int32 nCount = m_aControls.getLength();
+ const Reference< ::com::sun::star::awt::XControl > * pControls = m_aControls.getConstArray();
+
+ // clear the filter map
+ for (FmFilterControls::const_iterator iter = m_aFilterControls.begin();
+ iter != m_aFilterControls.end(); iter++)
+ (*iter).first->removeTextListener(this);
+
+ m_aFilterControls.clear();
+
+ // einsammeln der Controls
+ for (sal_Int32 i = 0; i < nCount; ++i, ++pControls)
+ {
+ // bei jedem Control als FocusListener anmelden
+ Reference< ::com::sun::star::awt::XWindow > xWindow(*pControls, UNO_QUERY);
+ if (xWindow.is())
+ {
+ xWindow->removeFocusListener(this);
+
+ // abmelden beim Eventattacher
+ removeFromEventAttacher(*pControls);
+ }
+
+ Reference< ::com::sun::star::frame::XDispatchProviderInterception > xInterception(*pControls, UNO_QUERY);
+ if (xInterception.is())
+ deleteInterceptor(xInterception);
+
+ if (pControls->is())
+ {
+ Reference< ::com::sun::star::form::XReset > xControlReset((*pControls)->getModel(), UNO_QUERY);
+ if (xControlReset.is())
+ xControlReset->removeResetListener((::com::sun::star::form::XResetListener*)this);
+ }
+ }
+
+ // Datenbank spezifische Dinge vornehmen
+ if (m_bDBConnection && isListeningForChanges())
+ stopListening();
+
+ m_aControls = Sequence< Reference< ::com::sun::star::awt::XControl > >();
+ }
+
+ if (m_xTabController.is())
+ m_xTabController->setContainer(xContainer);
+
+ // Welche Controls gehoeren zum Container ?
+ if (xContainer.is() && xTabModel.is())
+ {
+ Sequence< Reference< ::com::sun::star::awt::XControlModel > > aModels = xTabModel->getControlModels();
+ const Reference< ::com::sun::star::awt::XControlModel > * pModels = aModels.getConstArray();
+ Sequence< Reference< ::com::sun::star::awt::XControl > > xCtrls = xContainer->getControls();
+
+ sal_Int32 nCount = aModels.getLength();
+ m_aControls = Sequence< Reference< ::com::sun::star::awt::XControl > >( nCount );
+ Reference< ::com::sun::star::awt::XControl > * pControls = m_aControls.getArray();
+
+ // einsammeln der Controls
+ sal_Int32 i, j;
+ for (i = 0, j = 0; i < nCount; i++ )
+ {
+ Reference< ::com::sun::star::awt::XControlModel > xCtrlModel = pModels[i];
+ // Zum Model passendes Control suchen
+ Reference< ::com::sun::star::awt::XControl > xCtrl = findControl( xCtrls, xCtrlModel );
+ if (xCtrl.is())
+ {
+ pControls[j++] = xCtrl;
+
+ // bei jedem Control als FocusListener anmelden
+ Reference< ::com::sun::star::awt::XWindow > xWindow(xCtrl, UNO_QUERY);
+ if (xWindow.is())
+ {
+ xWindow->addFocusListener(this);
+ // anmelden beim Eventattacher
+ addToEventAttacher(xCtrl);
+ }
+
+ // add a dispatch interceptor to the control (if supported)
+ Reference< ::com::sun::star::frame::XDispatchProviderInterception > xInterception(xCtrl, UNO_QUERY);
+ if (xInterception.is())
+ createInterceptor(xInterception);
+
+ // we want to know about the reset of the the model of our controls
+ // (for correctly resetting m_bModified)
+ Reference< ::com::sun::star::form::XReset > xControlReset(xCtrl->getModel(), UNO_QUERY);
+ if (xControlReset.is())
+ xControlReset->addResetListener((::com::sun::star::form::XResetListener*)this);
+ }
+ }
+
+ // nicht fuer jedes Model ein Control
+ if (j != i)
+ m_aControls.realloc(j);
+
+ // am Container horchen
+ Reference< ::com::sun::star::container::XContainer > xNewContainer(xContainer, UNO_QUERY);
+ if (xNewContainer.is())
+ xNewContainer->addContainerListener(this);
+
+ // Datenbank spezifische Dinge vornehmen
+ if (m_bDBConnection)
+ {
+ m_bLocked = determineLockState();
+ setLocks();
+ if (!isLocked())
+ startListening();
+ }
+ }
+ // befinden sich die Controls in der richtigen Reihenfolge
+ m_bControlsSorted = sal_True;
+}
+
+//------------------------------------------------------------------------------
+Reference< ::com::sun::star::awt::XControlContainer > FmXFormController::getContainer()
+{
+ DBG_ASSERT(m_xTabController.is(), "FmXFormController::getContainer : invalid aggregate !");
+ if (!m_xTabController.is())
+ return Reference< ::com::sun::star::awt::XControlContainer > ();
+ return m_xTabController->getContainer();
+}
+
+//------------------------------------------------------------------------------
+Sequence< Reference< ::com::sun::star::awt::XControl > > FmXFormController::getControls(void)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (!m_bControlsSorted)
+ {
+ Reference< ::com::sun::star::awt::XTabControllerModel > xModel = getModel();
+ if (!xModel.is())
+ return m_aControls;
+
+ Sequence< Reference< ::com::sun::star::awt::XControlModel > > aControlModels = xModel->getControlModels();
+ const Reference< ::com::sun::star::awt::XControlModel > * pModels = aControlModels.getConstArray();
+ sal_Int32 nModels = aControlModels.getLength();
+
+ Sequence< Reference< ::com::sun::star::awt::XControl > > aNewControls(nModels);
+
+ Reference< ::com::sun::star::awt::XControl > * pControls = aNewControls.getArray();
+ Reference< ::com::sun::star::awt::XControlModel > xCtrlModel;
+ Reference< ::com::sun::star::awt::XControl > xCtrl;
+
+ // Umsortieren der Controls entsprechend der TabReihenfolge
+ for (sal_Int32 i = 0, j = 0; i < nModels; i++)
+ {
+ xCtrlModel = pModels[i];
+
+ // Zum Model passendes Control suchen
+ xCtrl = findControl(m_aControls, xCtrlModel);
+ if (xCtrl.is())
+ pControls[j++] = xCtrl;
+ }
+ m_aControls = aNewControls;
+ m_bControlsSorted = sal_True;
+ }
+ return m_aControls;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::autoTabOrder()
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ DBG_ASSERT(m_xTabController.is(), "FmXFormController::autoTabOrder : invalid aggregate !");
+ if (m_xTabController.is())
+ m_xTabController->autoTabOrder();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::activateTabOrder()
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ DBG_ASSERT(m_xTabController.is(), "FmXFormController::activateTabOrder : invalid aggregate !");
+ if (m_xTabController.is())
+ m_xTabController->activateTabOrder();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::setControlLock(const Reference< ::com::sun::star::awt::XControl > & xControl)
+{
+ sal_Bool bLocked = isLocked();
+
+ // es wird gelockt
+ // a.) wenn der ganze Datensatz gesperrt ist
+ // b.) wenn das zugehoerige Feld gespeert ist
+ Reference< ::com::sun::star::form::XBoundControl > xBound(xControl, UNO_QUERY);
+ if (xBound.is() && ((bLocked && bLocked != xBound->getLock() ||
+ !bLocked))) // beim entlocken immer einzelne Felder ueberprüfen
+ {
+ // gibt es eine Datenquelle
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xControl->getModel(), UNO_QUERY);
+ if (xSet.is() && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xSet))
+ {
+ // wie sieht mit den Properties ReadOnly und Enable aus
+ sal_Bool bTouch = sal_True;
+ if (::utl::hasProperty(FM_PROP_ENABLED, xSet))
+ bTouch = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ENABLED));
+ if (::utl::hasProperty(FM_PROP_READONLY, xSet))
+ bTouch = !::utl::getBOOL(xSet->getPropertyValue(FM_PROP_READONLY));
+
+ if (bTouch)
+ {
+ Any aVal = xSet->getPropertyValue(FM_PROP_BOUNDFIELD);
+ Reference< ::com::sun::star::beans::XPropertySet > xField = *(Reference< ::com::sun::star::beans::XPropertySet > *)aVal.getValue();
+ if (xField.is())
+ {
+ if (bLocked)
+ xBound->setLock(bLocked);
+ else
+ {
+ try
+ {
+ Any aVal = xField->getPropertyValue(FM_PROP_ISREADONLY);
+ if (aVal.hasValue() && ::utl::getBOOL(aVal))
+ xBound->setLock(sal_True);
+ else
+ xBound->setLock(bLocked);
+ }
+ catch(...)
+ {
+ }
+
+ }
+ }
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::setLocks()
+{
+ // alle Controls, die mit einer Datenquelle verbunden sind locken/unlocken
+ sal_Int32 nLength = m_aControls.getLength();
+ const Reference< ::com::sun::star::awt::XControl > * pControls = m_aControls.getConstArray();
+ for (sal_Int32 i = 0; i < nLength; i++)
+ setControlLock(pControls[i]);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::startControlListening(const Reference< ::com::sun::star::awt::XControl > & xControl)
+{
+ // jetzt anmelden bei gebundenen feldern
+ sal_Bool bModifyListening = sal_False;
+ Reference< ::com::sun::star::form::XBoundComponent > xBound(xControl, UNO_QUERY);
+ if (xBound.is()) // gebundene Controls,
+ bModifyListening = sal_True;
+ else
+ {
+ xBound = Reference< ::com::sun::star::form::XBoundComponent > (xControl->getModel(), UNO_QUERY);
+
+ // gibt es eine Datenquelle
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xBound, UNO_QUERY);
+ if (xSet.is() && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xSet))
+ {
+ Any aVal = xSet->getPropertyValue(FM_PROP_BOUNDFIELD);
+ Reference< ::com::sun::star::beans::XPropertySet > xField = *(Reference< ::com::sun::star::beans::XPropertySet > *)aVal.getValue();
+ bModifyListening = (xField.is());
+ }
+ }
+
+ // kuenstliches while
+ while (bModifyListening)
+ {
+ Reference< ::com::sun::star::util::XModifyBroadcaster > xMod(xControl, UNO_QUERY);
+ if (xMod.is())
+ {
+ xMod->addModifyListener(this);
+ break;
+ }
+
+ // alle die Text um vorzeitig ein modified zu erkennen
+ Reference< ::com::sun::star::awt::XTextComponent > xText(xControl, UNO_QUERY);
+ if (xText.is())
+ {
+ xText->addTextListener(this);
+ break;
+ }
+
+ Reference< ::com::sun::star::awt::XCheckBox > xBox(xControl, UNO_QUERY);
+ if (xBox.is())
+ {
+ xBox->addItemListener(this);
+ break;
+ }
+
+ Reference< ::com::sun::star::awt::XComboBox > xCbBox(xControl, UNO_QUERY);
+ if (xCbBox.is())
+ {
+ xCbBox->addItemListener(this);
+ break;
+ }
+
+ Reference< ::com::sun::star::awt::XListBox > xListBox(xControl, UNO_QUERY);
+ if (xListBox.is())
+ {
+ xListBox->addItemListener(this);
+ break;
+ }
+ break;
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::stopControlListening(const Reference< ::com::sun::star::awt::XControl > & xControl)
+{
+// Reference< ::com::sun::star::data::XDatabaseCursor > xCursor(getModel(), UNO_QUERY);
+ sal_Bool bModifyListening = sal_False;
+
+ Reference< ::com::sun::star::form::XBoundComponent > xBound(xControl, UNO_QUERY);
+ if (xBound.is()) // gebundene Controls,
+ bModifyListening = sal_True;
+ else
+ {
+ xBound = Reference< ::com::sun::star::form::XBoundComponent > (xControl->getModel(), UNO_QUERY);
+ // gibt es eine Datenquelle
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xBound, UNO_QUERY);
+ if (xSet.is() && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xSet))
+ {
+ Any aVal = xSet->getPropertyValue(FM_PROP_BOUNDFIELD);
+ Reference< ::com::sun::star::beans::XPropertySet > xField = *(Reference< ::com::sun::star::beans::XPropertySet > *)aVal.getValue();
+ bModifyListening = (xField.is());
+ }
+ }
+
+ // kuenstliches while
+ while (bModifyListening)
+ {
+ Reference< ::com::sun::star::util::XModifyBroadcaster > xMod(xControl, UNO_QUERY);
+ if (xMod.is())
+ {
+ xMod->removeModifyListener(this);
+ break;
+ }
+ // alle die Text um vorzeitig ein modified zu erkennen
+ Reference< ::com::sun::star::awt::XTextComponent > xText(xControl, UNO_QUERY);
+ if (xText.is())
+ {
+ xText->removeTextListener(this);
+ break;
+ }
+
+ Reference< ::com::sun::star::awt::XCheckBox > xBox(xControl, UNO_QUERY);
+ if (xBox.is())
+ {
+ xBox->removeItemListener(this);
+ break;
+ }
+
+ Reference< ::com::sun::star::awt::XComboBox > xCbBox(xControl, UNO_QUERY);
+ if (xCbBox.is())
+ {
+ xCbBox->removeItemListener(this);
+ break;
+ }
+
+ Reference< ::com::sun::star::awt::XListBox > xListBox(xControl, UNO_QUERY);
+ if (xListBox.is())
+ {
+ xListBox->removeItemListener(this);
+ break;
+ }
+ break;
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::startListening()
+{
+ m_bModified = sal_False;
+
+ // jetzt anmelden bei gebundenen feldern
+ const Reference< ::com::sun::star::awt::XControl > * pControls = m_aControls.getConstArray();
+// Reference< ::com::sun::star::data::XDatabaseCursor > xCursor(getModel(), UNO_QUERY);
+ for (sal_Int32 i = 0; i < m_aControls.getLength(); i++ )
+ startControlListening(pControls[i]);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::stopListening()
+{
+ m_bModified = sal_False;
+
+ // jetzt anmelden bei gebundenen feldern
+ const Reference< ::com::sun::star::awt::XControl > * pControls = m_aControls.getConstArray();
+ for (sal_Int32 i = 0; i < m_aControls.getLength(); i++ )
+ stopControlListening(pControls[i]);
+}
+
+
+//------------------------------------------------------------------------------
+Reference< ::com::sun::star::awt::XControl > FmXFormController::findControl(Sequence< Reference< ::com::sun::star::awt::XControl > >& rCtrls, const Reference< ::com::sun::star::awt::XControlModel > & xCtrlModel ) const
+{
+ DBG_ASSERT( xCtrlModel.is(), "findControl - welches ?!" );
+
+ const Reference< ::com::sun::star::awt::XControl > * pCtrls = rCtrls.getConstArray();
+ Reference< ::com::sun::star::awt::XControlModel > xModel;
+ for ( sal_Int32 i = 0, nCount = rCtrls.getLength(); i < nCount; i++ )
+ {
+ // #66449# Speicherueberschreiber durch folgende Zeile
+ // Reference< ::com::sun::star::awt::XControlModel > xModel(pCtrls[i].is() ? pCtrls[i]->getModel() : Reference< ::com::sun::star::awt::XControlModel > ());
+ if (pCtrls[i].is())
+ {
+ xModel = pCtrls[i]->getModel();
+ if ((::com::sun::star::awt::XControlModel*)xModel.get() == (::com::sun::star::awt::XControlModel*)xCtrlModel.get())
+ {
+ Reference< ::com::sun::star::awt::XControl > xCtrl( pCtrls[i] );
+ ::utl::removeElementAt(rCtrls, i);
+ return xCtrl;
+ }
+ }
+ }
+ return Reference< ::com::sun::star::awt::XControl > ();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::insertControl(const Reference< ::com::sun::star::awt::XControl > & xControl)
+{
+ m_bControlsSorted = sal_False;
+ m_aControls.realloc(m_aControls.getLength() + 1);
+ m_aControls.getArray()[m_aControls.getLength() - 1] = xControl;
+
+ Reference< ::com::sun::star::awt::XWindow > xWindow(xControl, UNO_QUERY);
+ if (xWindow.is())
+ {
+ xWindow->addFocusListener(this);
+ // register at the Eventattacher but not in filter mode
+ if (m_bAttachEvents)
+ addToEventAttacher(xControl);
+ }
+
+ Reference< ::com::sun::star::frame::XDispatchProviderInterception > xInterception(xControl, UNO_QUERY);
+ if (xInterception.is())
+ createInterceptor(xInterception);
+
+ if (xControl.is())
+ {
+ // we want to know about the reset of the the model of our controls
+ // (for correctly resetting m_bModified)
+ Reference< ::com::sun::star::form::XReset > xControlReset(xControl->getModel(), UNO_QUERY);
+ if (xControlReset.is())
+ xControlReset->addResetListener((::com::sun::star::form::XResetListener*)this);
+ }
+
+ if (m_bDBConnection && !m_bFiltering)
+ setControlLock(xControl);
+
+ if (isListeningForChanges() && m_bAttachEvents)
+ startControlListening(xControl);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::removeControl(const Reference< ::com::sun::star::awt::XControl > & xControl)
+{
+ const Reference< ::com::sun::star::awt::XControl > * pCtrls = m_aControls.getArray();
+ sal_Int32 nCount = m_aControls.getLength();
+ for ( sal_uInt32 i = 0; i < nCount; i++ )
+ {
+ if ((::com::sun::star::awt::XControl*)xControl.get() == (::com::sun::star::awt::XControl*)pCtrls[i].get())
+ {
+ ::utl::removeElementAt(m_aControls, i);
+ break;
+ }
+ }
+
+ if (m_aFilterControls.size())
+ {
+ Reference< ::com::sun::star::awt::XTextComponent > xText(xControl, UNO_QUERY);
+ FmFilterControls::iterator iter = m_aFilterControls.find(xText);
+ if (iter != m_aFilterControls.end())
+ m_aFilterControls.erase(iter);
+ }
+
+ Reference< ::com::sun::star::awt::XWindow > xWindow(xControl, UNO_QUERY);
+ if (xWindow.is())
+ {
+ xWindow->removeFocusListener(this);
+ if (m_bDetachEvents)
+ removeFromEventAttacher(xControl);
+ }
+
+ Reference< ::com::sun::star::frame::XDispatchProviderInterception > xInterception(xControl, UNO_QUERY);
+ if (xInterception.is())
+ deleteInterceptor(xInterception);
+
+ if (xControl.is())
+ {
+ Reference< ::com::sun::star::form::XReset > xControlReset(xControl->getModel(), UNO_QUERY);
+ if (xControlReset.is())
+ xControlReset->removeResetListener((::com::sun::star::form::XResetListener*)this);
+ }
+
+ if (isListeningForChanges() && m_bDetachEvents)
+ stopControlListening(xControl);
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormController, OnUpdateDispatchers, void*, EMPTYARG)
+{
+ m_nUpdateDispatcherEvent = 0;
+ DBG_ASSERT(m_aControlDispatchInterceptors.size(), "FmXFormController::OnUpdateDispatchers : not intercepting any control dispatches !");
+
+ Reference< ::com::sun::star::frame::XModel > xFrameModel = getXModel(getModel());
+ Reference< ::com::sun::star::frame::XController > xFrameController = xFrameModel.is() ? xFrameModel->getCurrentController() : Reference< ::com::sun::star::frame::XController > ();
+ Reference< ::com::sun::star::frame::XFrame > xFrame = xFrameController.is() ? xFrameController->getFrame() : Reference< ::com::sun::star::frame::XFrame > ();
+
+ if (!xFrame.is())
+ { // same as in interceptedQueryDispatch, try again
+ m_nUpdateDispatcherEvent = Application::PostUserEvent(LINK(this, FmXFormController, OnUpdateDispatchers));
+ return 0L;
+ }
+
+ // go through all controls we're intercepting and re-register as interceptor
+ // (this should cause them to request the dispatches again)
+ Interceptors aTemp = m_aControlDispatchInterceptors;
+ for ( ConstInterceptorsIterator aIter = aTemp.begin();
+ aIter < aTemp.end();
+ ++aIter
+ )
+ {
+ FmXDispatchInterceptorImpl* pInterceptor = *aIter;
+ pInterceptor->acquire();
+ Reference< ::com::sun::star::frame::XDispatchProviderInterception > xIntercepted = pInterceptor->getIntercepted();
+ deleteInterceptor(xIntercepted);
+ createInterceptor(xIntercepted);
+ pInterceptor->release();
+ }
+
+ return 0L;
+}
+
+// ::com::sun::star::form::XLoadListener
+//------------------------------------------------------------------------------
+void FmXFormController::loaded(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ Reference< ::com::sun::star::sdbc::XRowSet > xForm(rEvent.Source, UNO_QUERY);
+ // do we have a connected data source
+ if (xForm.is() && ::utl::getConnection(xForm).is())
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xForm, UNO_QUERY);
+ if (xSet.is())
+ {
+ Any aVal = xSet->getPropertyValue(FM_PROP_CYCLE);
+ sal_Int32 aVal2;
+ ::cppu::enum2int(aVal2,aVal);
+ m_bCycle = !aVal.hasValue() || aVal2 == ::com::sun::star::form::TabulatorCycle_RECORDS;
+ m_bCanUpdate = ::utl::canUpdate(xSet);
+ m_bCanInsert = ::utl::canInsert(xSet);
+ m_bCurrentRecordModified = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISMODIFIED));
+ m_bCurrentRecordNew = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW));
+ if (m_bCanInsert || m_bCanUpdate) // modificationen sind moeglich
+ {
+ xSet->addPropertyChangeListener(FM_PROP_ISNEW, this);
+ xSet->addPropertyChangeListener(FM_PROP_ISMODIFIED, this);
+
+ // set the Listener for UI interaction
+ Reference< ::com::sun::star::sdb::XRowSetApproveBroadcaster > xApprove(xForm, UNO_QUERY);
+ if (xApprove.is())
+ xApprove->addRowSetApproveListener(this);
+ }
+
+ // set the locks for the current controls
+ if (getContainer().is())
+ {
+ if (m_nLoadEvent)
+ Application::RemoveUserEvent( m_nLoadEvent );
+ m_nLoadEvent = Application::PostUserEvent( LINK(this, FmXFormController,
+ OnLoad) );
+ }
+ }
+ else
+ {
+ m_bCanInsert = m_bCanUpdate = m_bCycle = sal_False;
+ m_bCurrentRecordModified = sal_False;
+ m_bCurrentRecordNew = sal_False;
+ m_bLocked = sal_False;
+ }
+ m_bDBConnection = sal_True;
+ }
+ else
+ {
+ m_bDBConnection = sal_False;
+ m_bCanInsert = m_bCanUpdate = m_bCycle = sal_False;
+ m_bCurrentRecordModified = sal_False;
+ m_bCurrentRecordNew = sal_False;
+ m_bLocked = sal_False;
+ }
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormController, OnLoad, void*, EMPTYARG)
+{
+ m_nLoadEvent = 0;
+ m_bLocked = determineLockState();
+
+ setLocks();
+
+ if (!m_bLocked)
+ startListening();
+
+ // just one exception toggle the auto values
+ if (m_bCurrentRecordNew)
+ toggleAutoFields(sal_True);
+
+ return 1L;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::unloaded(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ // not interested in ...
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::reloading(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException )
+{
+ // do the same like in unloading
+ // just one exception toggle the auto values
+ if (m_nToggleEvent)
+ {
+ Application::RemoveUserEvent( m_nToggleEvent );
+ m_nToggleEvent = 0;
+ }
+ unload();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::reloaded(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException )
+{
+ loaded(aEvent);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException )
+{
+ unload();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::unload() throw( RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (m_nLoadEvent)
+ {
+ Application::RemoveUserEvent( m_nLoadEvent );
+ m_nLoadEvent = 0;
+ }
+
+ // be sure not to have autofields
+ if (m_bCurrentRecordNew)
+ toggleAutoFields(sal_False);
+
+ if (m_bDBConnection && isListeningForChanges())
+ stopListening();
+
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xModelAsIndex, UNO_QUERY);
+ if (m_bDBConnection && xSet.is())
+ {
+ if (m_bCanInsert || m_bCanUpdate)
+ {
+ xSet->removePropertyChangeListener(FM_PROP_ISNEW, this);
+ xSet->removePropertyChangeListener(FM_PROP_ISMODIFIED, this);
+
+ // reset the Listener for UI interaction
+ Reference< ::com::sun::star::sdb::XRowSetApproveBroadcaster > xApprove(xSet, UNO_QUERY);
+ if (xApprove.is())
+ xApprove->removeRowSetApproveListener(this);
+ }
+ }
+ m_bDBConnection = sal_False;
+ m_bCanInsert = m_bCanUpdate = m_bCycle = sal_False;
+ m_bCurrentRecordModified = m_bCurrentRecordNew = m_bLocked = sal_False;
+}
+
+// com::sun::star::sdbc::XRowSetListener
+//------------------------------------------------------------------------------
+void FmXFormController::cursorMoved(const ::com::sun::star::lang::EventObject& event) throw( RuntimeException )
+{
+ // toggle the locking ?
+ if (m_bLocked != determineLockState())
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ m_bLocked = !m_bLocked;
+ setLocks();
+ if (isListeningForChanges())
+ startListening();
+ else
+ stopListening();
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::rowChanged(const ::com::sun::star::lang::EventObject& event) throw( RuntimeException )
+{
+ // not interested in ...
+}
+//------------------------------------------------------------------------------
+void FmXFormController::rowSetChanged(const ::com::sun::star::lang::EventObject& event) throw( RuntimeException )
+{
+ // not interested in ...
+}
+
+
+// ::com::sun::star::container::XContainerListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::elementInserted(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ Reference< ::com::sun::star::awt::XControl > xControl(*(Reference< ::com::sun::star::awt::XControl > *)evt.Element.getValue());
+ if (!xControl.is())
+ return;
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ Reference< ::com::sun::star::form::XFormComponent > xModel(xControl->getModel(), UNO_QUERY);
+ if (xModel.is() && m_xModelAsIndex == xModel->getParent())
+ {
+ insertControl(xControl);
+
+ if (m_aInsertTimer.IsActive())
+ m_aInsertTimer.Stop();
+
+ m_aInsertTimer.Start();
+ }
+ // are we in filtermode and a ::com::sun::star::util::XModeSelector has inserted an element
+ else if (m_bFiltering && Reference< ::com::sun::star::util::XModeSelector > (evt.Source, UNO_QUERY).is())
+ {
+ xModel = Reference< ::com::sun::star::form::XFormComponent > (evt.Source, UNO_QUERY);
+ if (xModel.is() && m_xModelAsIndex == xModel->getParent())
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xControl->getModel(), UNO_QUERY);
+ if (xSet.is() && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xSet))
+ {
+ // does the model use a bound field ?
+ Any aVal = xSet->getPropertyValue(FM_PROP_BOUNDFIELD);
+ Reference< ::com::sun::star::beans::XPropertySet > xField = *(Reference< ::com::sun::star::beans::XPropertySet > *)aVal.getValue();
+
+ Reference< ::com::sun::star::awt::XTextComponent > xText(xControl, UNO_QUERY);
+ // may we filter the field?
+ if (xText.is() && xField.is() && ::utl::hasProperty(FM_PROP_SEARCHABLE, xField) &&
+ ::utl::getBOOL(xField->getPropertyValue(FM_PROP_SEARCHABLE)))
+ {
+ m_aFilterControls[xText] = xField;
+ xText->addTextListener(this);
+ }
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::elementReplaced(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ // Remove the control
+ Reference< ::com::sun::star::awt::XControl > xReplControl(*(Reference< ::com::sun::star::awt::XControl > *)evt.ReplacedElement.getValue(), UNO_QUERY);
+ Reference< ::com::sun::star::form::XFormComponent > xModel(xReplControl->getModel(), UNO_QUERY);
+ if (xModel.is() && m_xModelAsIndex == xModel->getParent())
+ removeControl(xReplControl);
+ else if (m_aFilterControls.size())
+ {
+ Reference< ::com::sun::star::awt::XTextComponent > xText(xReplControl, UNO_QUERY);
+ FmFilterControls::iterator iter = m_aFilterControls.find(xText);
+ if (iter != m_aFilterControls.end())
+ m_aFilterControls.erase(iter);
+ }
+
+ // Add the new one
+ elementInserted(evt);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::elementRemoved(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ Reference< ::com::sun::star::awt::XControl > xControl(*(Reference< ::com::sun::star::awt::XControl > *)evt.Element.getValue());
+ if (!xControl.is())
+ return;
+
+ Reference< ::com::sun::star::form::XFormComponent > xModel(xControl->getModel(), UNO_QUERY);
+ if (xModel.is() && m_xModelAsIndex == xModel->getParent())
+ {
+ removeControl(xControl);
+ // TabOrder nicht neu berechnen, da das intern schon funktionieren muß!
+ }
+ else if (m_aFilterControls.size())
+ {
+ Reference< ::com::sun::star::awt::XTextComponent > xText(xControl, UNO_QUERY);
+ FmFilterControls::iterator iter = m_aFilterControls.find(xText);
+ if (iter != m_aFilterControls.end())
+ m_aFilterControls.erase(iter);
+ }
+}
+
+//------------------------------------------------------------------------------
+Reference< ::com::sun::star::awt::XControl > FmXFormController::isInList(const Reference< ::com::sun::star::awt::XWindowPeer > & xPeer) const
+{
+ const Reference< ::com::sun::star::awt::XControl > * pCtrls = m_aControls.getConstArray();
+
+ sal_uInt32 nCtrls = m_aControls.getLength();
+ for ( sal_uInt32 n = 0; n < nCtrls && xPeer.is(); n++ )
+ {
+ if (pCtrls[n].is())
+ {
+ Reference< ::com::sun::star::awt::XVclWindowPeer > xCtrlPeer(pCtrls[n]->getPeer(), UNO_QUERY);
+ if ((::com::sun::star::awt::XWindowPeer*)xCtrlPeer.get() == (::com::sun::star::awt::XWindowPeer*)xPeer.get() || xCtrlPeer->isChild(xPeer))
+ return pCtrls[n];
+ }
+ }
+ return Reference< ::com::sun::star::awt::XControl > ();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::activateFirst()
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ DBG_ASSERT(m_xTabController.is(), "FmXFormController::activateFirst : invalid aggregate !");
+ if (m_xTabController.is())
+ m_xTabController->activateFirst();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::activateLast()
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ DBG_ASSERT(m_xTabController.is(), "FmXFormController::activateLast : invalid aggregate !");
+ if (m_xTabController.is())
+ m_xTabController->activateLast();
+}
+
+// ::com::sun::star::form::XFormController
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::addActivateListener(const Reference< ::com::sun::star::form::XFormControllerListener > & l)
+{
+ m_aActivateListeners.addInterface(l);
+}
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::removeActivateListener(const Reference< ::com::sun::star::form::XFormControllerListener > & l)
+{
+ m_aActivateListeners.removeInterface(l);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::setFilter(vector<FmFieldInfo>& rFieldInfos)
+{
+ // create the composer
+ Reference< ::com::sun::star::sdbc::XRowSet > xForm(m_xModelAsIndex, UNO_QUERY);
+ Reference< ::com::sun::star::sdbc::XConnection > xConnection(::utl::getConnection(xForm));
+ if (xForm.is())
+ {
+ Reference< ::com::sun::star::sdb::XSQLQueryComposerFactory > xFactory(xConnection, UNO_QUERY);
+ if (xFactory.is())
+ {
+ m_xComposer = xFactory->createQueryComposer();
+ try
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xForm, UNO_QUERY);
+ ::rtl::OUString aStatement = ::utl::getString(xSet->getPropertyValue(FM_PROP_ACTIVECOMMAND));
+ ::rtl::OUString aFilter = ::utl::getString(xSet->getPropertyValue(FM_PROP_FILTER_CRITERIA));
+ m_xComposer->setQuery(aStatement);
+ m_xComposer->setFilter(aFilter);
+ }
+ catch(...)
+ {
+ }
+ }
+ }
+
+ if (m_xComposer.is())
+ {
+ Sequence < ::com::sun::star::beans::PropertyValue> aLevel;
+ Sequence< Sequence < ::com::sun::star::beans::PropertyValue > > aFilterRows = m_xComposer->getStructuredFilter();
+
+ // ok, we recieve the list of filters as sequence of fieldnames, value
+ // now we have to transform the fieldname into UI names, that could be a label of the field or
+ // a aliasname or the fieldname itself
+
+ // first adjust the field names if necessary
+ Reference< ::com::sun::star::container::XNameAccess> xQueryColumns = Reference< ::com::sun::star::sdbcx::XColumnsSupplier >
+ (m_xComposer, UNO_QUERY)->getColumns();
+
+ for (vector<FmFieldInfo>::iterator iter = rFieldInfos.begin();
+ iter != rFieldInfos.end(); iter++)
+ {
+ try
+ {
+ xQueryColumns->getByName((*iter).aFieldName) >>= (*iter).xField;
+ (*iter).xField->getPropertyValue(FM_PROP_REALNAME) >>= (*iter).aFieldName;
+ }
+ catch (...)
+ {
+ }
+ }
+
+ // now transfer the filters into Value/TextComponent pairs
+ ::utl::UStringMixEqual aCompare(xConnection->getMetaData()->storesMixedCaseQuotedIdentifiers());
+
+ // retrieving the filter
+ const Sequence < ::com::sun::star::beans::PropertyValue >* pRow = aFilterRows.getConstArray();
+ for (sal_Int32 i = 0, nLen = aFilterRows.getLength(); i < nLen; ++i)
+ {
+ FmFilterRow aRow;
+
+ // search a field for the given name
+ const ::com::sun::star::beans::PropertyValue* pRefValues = pRow[i].getConstArray();
+ for (sal_Int32 j = 0, nLen1 = pRow[i].getLength(); j < nLen1; j++)
+ {
+ // look for the text component
+ Reference< ::com::sun::star::beans::XPropertySet > xField;
+ try
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xSet;
+ ::rtl::OUString aRealName;
+
+ // first look with the given name
+ if (xQueryColumns->hasByName(pRefValues[j].Name))
+ {
+ xQueryColumns->getByName(pRefValues[j].Name) >>= xSet;
+
+ // get the RealName
+ xSet->getPropertyValue(::rtl::OUString::createFromAscii("RealName")) >>= aRealName;
+
+ // compare the condition field name and the RealName
+ if (aCompare(aRealName, pRefValues[j].Name))
+ xField = xSet;
+ }
+ if (!xField.is())
+ {
+ // no we have to check every column to find the realname
+ Reference< ::com::sun::star::container::XIndexAccess > xColumnsByIndex(xQueryColumns, UNO_QUERY);
+ for (sal_Int32 n = 0, nCount = xColumnsByIndex->getCount(); n < nCount; n++)
+ {
+ xColumnsByIndex->getByIndex(n) >>= xSet;
+ xSet->getPropertyValue(::rtl::OUString::createFromAscii("RealName")) >>= aRealName;
+ if (aCompare(aRealName, pRefValues[j].Name))
+ {
+ // get the column by its alias
+ xField = xSet;
+ break;
+ }
+ }
+ }
+ if (!xField.is())
+ continue;
+ }
+ catch (...)
+ {
+ continue;
+ }
+
+ // find the text component
+ for (vector<FmFieldInfo>::iterator iter = rFieldInfos.begin();
+ iter != rFieldInfos.end(); iter++)
+ {
+ // we found the field so insert a new entry to the filter row
+ if ((*iter).xField == xField)
+ {
+ // do we already have the control ?
+ if (aRow.find((*iter).xText) != aRow.end())
+ {
+ String aCompText = aRow[(*iter).xText];
+ aCompText += ' ';
+ aCompText += SdbSqlParser::GetInternationalKeywordString(SDB_TOKEN_AND);
+ aCompText += ' ';
+ aCompText += (const sal_Unicode*)::utl::getString(pRefValues[j].Value);
+ aRow[(*iter).xText] = aCompText;
+ }
+ else
+ aRow[(*iter).xText] = ::utl::getString(pRefValues[j].Value);
+ break;
+ }
+ }
+ }
+
+ if (aRow.empty())
+ continue;
+
+ m_aFilters.push_back(aRow);
+ }
+ }
+
+ // now set the filter controls
+ for (vector<FmFieldInfo>::iterator iter = rFieldInfos.begin();
+ iter != rFieldInfos.end(); iter++)
+ {
+ m_aFilterControls[(*iter).xText] = (*iter).xField;
+ }
+
+ // add an empty row
+ m_aFilters.push_back(FmFilterRow());
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::startFiltering()
+{
+ if (!m_pView)
+ {
+ DBG_ERROR("FmXFormController::startFiltering : you can't filter if you created me as service !");
+ return;
+ }
+
+ // stop listening for controls
+ if (isListeningForChanges())
+ stopListening();
+
+ m_bFiltering = sal_True;
+
+ // as we don't want new controls to be attached to the scripting environment
+ // we change attach flags
+ m_bAttachEvents = sal_False;
+
+ // Austauschen der Kontrols fuer das aktuelle Formular
+ Sequence < Reference< ::com::sun::star::awt::XControl > > aControls(m_aControls);
+ const Reference< ::com::sun::star::awt::XControl > * pControls = m_aControls.getConstArray();
+ SdrPageView* pCurPageView = m_pView->GetPageViewPvNum(0);
+
+ // the control we have to activate after replacement
+ Reference< ::com::sun::star::awt::XControl > xNewActiveControl;
+ Reference< ::com::sun::star::sdbc::XConnection > xConnection(::utl::getConnection(Reference< ::com::sun::star::sdbc::XRowSet > (m_xModelAsIndex, UNO_QUERY)));
+ Reference< ::com::sun::star::sdbc::XDatabaseMetaData > xMetaData(xConnection->getMetaData());
+ Reference< ::com::sun::star::util::XNumberFormatsSupplier > xFormatSupplier = ::utl::getNumberFormats(xConnection, sal_True);
+ Reference< ::com::sun::star::util::XNumberFormatter > xFormatter(::utl::getProcessServiceFactory()
+ ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY);
+ xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
+
+ // structure for storing the field info
+ vector<FmFieldInfo> aFieldInfos;
+
+ sal_uInt16 nPos = pCurPageView ? pCurPageView->GetWinList().Find((OutputDevice*)m_pView->GetActualOutDev()) : SDRPAGEVIEWWIN_NOTFOUND;
+ if (nPos != SDRPAGEVIEWWIN_NOTFOUND)
+ {
+ for (sal_Int32 i = aControls.getLength(); i > 0;)
+ {
+ const Reference< ::com::sun::star::awt::XControl > & xControl = pControls[--i];
+ if (xControl.is())
+ {
+ // no events for the control anymore
+ removeFromEventAttacher(xControl);
+
+ // do we have a mode selector
+ Reference< ::com::sun::star::util::XModeSelector > xSelector(xControl, UNO_QUERY);
+ if (xSelector.is())
+ {
+ xSelector->setMode(FILTER_MODE);
+
+ // listening for new controls of the selector
+ Reference< ::com::sun::star::container::XContainer > xContainer(xSelector, UNO_QUERY);
+ if (xContainer.is())
+ xContainer->addContainerListener(this);
+
+ Reference< ::com::sun::star::container::XEnumerationAccess > xElementAccess(xSelector, UNO_QUERY);
+ if (xElementAccess.is())
+ {
+ Reference< ::com::sun::star::container::XEnumeration > xEnumeration(xElementAccess->createEnumeration());
+ while (xEnumeration->hasMoreElements())
+ {
+ Reference< ::com::sun::star::awt::XControl > xControl(*(Reference< XInterface > *)xEnumeration->nextElement().getValue(),UNO_QUERY);
+ if (xControl.is())
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xControl->getModel(), UNO_QUERY);
+ if (xSet.is() && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xSet))
+ {
+ // does the model use a bound field ?
+ Any aVal = xSet->getPropertyValue(FM_PROP_BOUNDFIELD);
+ Reference< ::com::sun::star::beans::XPropertySet > xField = *(Reference< ::com::sun::star::beans::XPropertySet > *)aVal.getValue();
+
+ Reference< ::com::sun::star::awt::XTextComponent > xText(xControl, UNO_QUERY);
+ // may we filter the field?
+ if (xText.is() && xField.is() && ::utl::hasProperty(FM_PROP_SEARCHABLE, xField) &&
+ ::utl::getBOOL(xField->getPropertyValue(FM_PROP_SEARCHABLE)))
+ {
+ aFieldInfos.push_back(FmFieldInfo(xField, xText));
+ xText->addTextListener(this);
+ }
+ }
+ }
+ }
+ }
+ continue;
+ }
+
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xControl->getModel(), UNO_QUERY);
+ if (xSet.is() && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xSet))
+ {
+ // does the model use a bound field ?
+ Any aVal = xSet->getPropertyValue(FM_PROP_BOUNDFIELD);
+ Reference< ::com::sun::star::beans::XPropertySet > xField = *(Reference< ::com::sun::star::beans::XPropertySet > *)aVal.getValue();
+
+ // may we filter the field?
+
+ if (xField.is() && ::utl::hasProperty(FM_PROP_SEARCHABLE, xField) &&
+ ::utl::getBOOL(xField->getPropertyValue(FM_PROP_SEARCHABLE)))
+ {
+ const SdrPageViewWinRec& rWR = pCurPageView->GetWinList()[nPos];
+ const SdrUnoControlList& rControlList = rWR.GetControlList();
+ sal_uInt16 nCtrlNum = rControlList.Find(xControl);
+ if (nCtrlNum != SDRUNOCONTROL_NOTFOUND)
+ {
+ // Setzen des FilterControls
+ SdrUnoControlRec& rControlRec = (SdrUnoControlRec&)rControlList[nCtrlNum];
+ FmXFilterControl* pFilterControl = new FmXFilterControl(xSet, xField, xMetaData, xFormatter, m_pWindow);
+ Reference< ::com::sun::star::awt::XControl > xNewControl(pFilterControl);
+ Reference< ::com::sun::star::awt::XTextComponent > xText(pFilterControl);
+
+ // merken in der Map
+ aFieldInfos.push_back(FmFieldInfo(xField, xText));
+ xText->addTextListener(this);
+
+ // setting the focus if the current control
+ // is the active one
+ if ((::com::sun::star::awt::XControl*)m_xActiveControl.get() == (::com::sun::star::awt::XControl*)xControl.get())
+ {
+ xNewActiveControl = xNewControl;
+ m_xActiveControl = m_xCurrentControl = NULL;
+ }
+ else if ((::com::sun::star::awt::XControl*)m_xCurrentControl.get() == (::com::sun::star::awt::XControl*)xControl.get())
+ m_xCurrentControl = xNewControl;
+
+ rControlRec.ReplaceControl(xNewControl);
+ }
+ }
+ }
+ else
+ {
+ // abmelden vom EventManager
+ }
+ }
+ }
+ }
+
+ // we have all filter controls now, so the next step is to read the filters from the form
+ // resolve all aliases and set the current filter to the according structure
+ setFilter(aFieldInfos);
+
+ // setting the focus to the replacing control
+ Reference< ::com::sun::star::awt::XWindow > xWindow(xNewActiveControl, UNO_QUERY);
+ if (xWindow.is())
+ xWindow->setFocus();
+
+ if (m_bCanInsert || m_bCanUpdate) // modificationen sind moeglich
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xModelAsIndex, UNO_QUERY);
+ xSet->removePropertyChangeListener(FM_PROP_ISNEW, this);
+ xSet->removePropertyChangeListener(FM_PROP_ISMODIFIED, this);
+ }
+
+ // set the text for all filters
+ FmFilterRow& rRow = m_aFilters[m_nCurrentFilterPosition];
+ for (FmFilterRow::const_iterator iter2 = rRow.begin();
+ iter2 != rRow.end(); iter2++)
+ {
+ (*iter2).first->setText((*iter2).second);
+ }
+
+ // lock all controls which are not used for filtering
+ m_bLocked = determineLockState();
+ setLocks();
+ m_bAttachEvents = sal_True;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::stopFiltering()
+{
+ if (!m_pView)
+ {
+ DBG_ERROR("FmXFormController::startFiltering : you can't filter if you created me as service !");
+ return;
+ }
+
+ m_bFiltering = sal_False;
+ m_bDetachEvents = sal_False;
+
+ ::utl::disposeComponent(m_xComposer);
+
+ // Austauschen der Kontrols fuer das aktuelle Formular
+ Sequence < Reference< ::com::sun::star::awt::XControl > > aControls(m_aControls);
+ const Reference< ::com::sun::star::awt::XControl > * pControls = m_aControls.getConstArray();
+ SdrPageView* pCurPageView = m_pView->GetPageViewPvNum(0);
+ sal_uInt16 nPos = pCurPageView ? pCurPageView->GetWinList().Find((OutputDevice*)m_pView->GetActualOutDev()) : SDRPAGEVIEWWIN_NOTFOUND;
+
+ // the control we have to activate after replacement
+ Reference< ::com::sun::star::awt::XControl > xNewActiveControl;
+
+ // clear the filter control map
+ for (FmFilterControls::const_iterator iter = m_aFilterControls.begin();
+ iter != m_aFilterControls.end(); iter++)
+ (*iter).first->removeTextListener(this);
+
+ m_aFilterControls.clear();
+
+ if (nPos != SDRPAGEVIEWWIN_NOTFOUND)
+ {
+ for (sal_Int32 i = aControls.getLength(); i > 0;)
+ {
+ const Reference< ::com::sun::star::awt::XControl > & xControl = pControls[--i];
+ if (xControl.is())
+ {
+ // now enable eventhandling again
+ addToEventAttacher(xControl);
+
+ Reference< ::com::sun::star::util::XModeSelector > xSelector(xControl, UNO_QUERY);
+ if (xSelector.is())
+ {
+ xSelector->setMode(DATA_MODE);
+
+ // listening for new controls of the selector
+ Reference< ::com::sun::star::container::XContainer > xContainer(xSelector, UNO_QUERY);
+ if (xContainer.is())
+ xContainer->removeContainerListener(this);
+ continue;
+ }
+
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(xControl->getModel(), UNO_QUERY);
+ if (xSet.is() && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xSet))
+ {
+ // does the model use a bound field ?
+ Any aVal = xSet->getPropertyValue(FM_PROP_BOUNDFIELD);
+ Reference< ::com::sun::star::beans::XPropertySet > xField = *(Reference< ::com::sun::star::beans::XPropertySet > *)aVal.getValue();
+
+ // may we filter the field?
+ if (xField.is() && ::utl::hasProperty(FM_PROP_SEARCHABLE, xField) &&
+ ::utl::getBOOL(xField->getPropertyValue(FM_PROP_SEARCHABLE)))
+ {
+ const SdrPageViewWinRec& rWR = pCurPageView->GetWinList()[nPos];
+ const SdrUnoControlList& rControlList = rWR.GetControlList();
+ sal_uInt16 nCtrlNum = rControlList.Find(xControl);
+ if (nCtrlNum != SDRUNOCONTROL_NOTFOUND)
+ {
+ // Zuruecksetzen des Controls auf das Defaultcontrol
+ SdrUnoControlRec& rControlRec = (SdrUnoControlRec&)rControlList[nCtrlNum];
+ ::rtl::OUString aServiceName = ::utl::getString(xSet->getPropertyValue(FM_PROP_DEFAULTCONTROL));
+ Reference< ::com::sun::star::awt::XControl > xNewControl(::utl::getProcessServiceFactory()->createInstance(aServiceName), UNO_QUERY);
+
+ // setting the focus if the current control
+ // is the active one
+ if ((::com::sun::star::awt::XControl*)m_xActiveControl.get() == (::com::sun::star::awt::XControl*)xControl.get())
+ {
+ xNewActiveControl = xNewControl;
+ m_xActiveControl = m_xCurrentControl = NULL;
+ }
+ else if ((::com::sun::star::awt::XControl*)m_xCurrentControl.get() == (::com::sun::star::awt::XControl*)xControl.get())
+ m_xCurrentControl = xNewControl;
+
+ rControlRec.ReplaceControl(xNewControl);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // setting the focus to the replacing control
+ Reference< ::com::sun::star::awt::XWindow > xWindow(xNewActiveControl, UNO_QUERY);
+ if (xWindow.is())
+ xWindow->setFocus();
+
+ if (m_bCanInsert || m_bCanUpdate) // modificationen sind moeglich
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xModelAsIndex, UNO_QUERY);
+ xSet->addPropertyChangeListener(FM_PROP_ISNEW, this);
+ xSet->addPropertyChangeListener(FM_PROP_ISMODIFIED, this);
+ }
+
+ m_bDetachEvents = sal_True;
+
+ m_aFilters.clear();
+ m_nCurrentFilterPosition = 0;
+
+ // release the locks if possible
+ // lock all controls which are not used for filtering
+ m_bLocked = determineLockState();
+ setLocks();
+
+ // restart listening for control modifications
+ if (isListeningForChanges())
+ startListening();
+}
+
+// ::com::sun::star::util::XModeSelector
+//------------------------------------------------------------------------------
+void FmXFormController::setMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::lang::NoSupportException, RuntimeException )
+{
+ if (!supportsMode(Mode))
+ throw ::com::sun::star::lang::NoSupportException();
+
+ if (Mode == m_aMode)
+ return;
+
+ m_aMode = Mode;
+
+ if (Mode == FILTER_MODE)
+ startFiltering();
+ else
+ stopFiltering();
+
+ for (FmFormControllers::const_iterator i = m_aChilds.begin();
+ i != m_aChilds.end(); i++)
+ {
+ Reference< ::com::sun::star::util::XModeSelector > (*i, UNO_QUERY)->setMode(Mode);
+ }
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL FmXFormController::getMode(void) throw( RuntimeException )
+{
+ return m_aMode;
+}
+
+//------------------------------------------------------------------------------
+Sequence< ::rtl::OUString > SAL_CALL FmXFormController::getSupportedModes(void) throw( RuntimeException )
+{
+ static Sequence< ::rtl::OUString > aModes;
+ if (!aModes.getLength())
+ {
+ aModes.realloc(2);
+ ::rtl::OUString* pModes = aModes.getArray();
+ pModes[0] = DATA_MODE;
+ pModes[1] = FILTER_MODE;
+ }
+ return aModes;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXFormController::supportsMode(const ::rtl::OUString& Mode) throw( RuntimeException )
+{
+ Sequence< ::rtl::OUString > aModes(getSupportedModes());
+ const ::rtl::OUString* pModes = aModes.getConstArray();
+ for (sal_Int32 i = aModes.getLength(); i > 0; )
+ {
+ if (pModes[--i] == Mode)
+ return sal_True;
+ }
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+Window* FmXFormController::getDialogParentWindow()
+{
+ Window* pParent = m_pWindow;
+ if (!pParent)
+ {
+ Reference< ::com::sun::star::awt::XControlContainer > xContainer = getContainer();
+ Reference< ::com::sun::star::awt::XControl > xCtrl(xContainer, UNO_QUERY);
+ if (xCtrl.is())
+ {
+ Reference< ::com::sun::star::awt::XWindowPeer > xPeer(xCtrl->getPeer(), UNO_QUERY);
+ if (xPeer.is())
+ pParent = VCLUnoHelper::GetWindow(xPeer);
+ }
+ }
+
+ return pParent;
+}
+// ::com::sun::star::sdb::XRowSetApproveListener
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXFormController::approveRowChange(const ::com::sun::star::sdb::RowChangeEvent& aEvent) throw( RuntimeException )
+{
+ ::cppu::OInterfaceIteratorHelper aIter(m_aRowSetApproveListeners);
+ sal_Bool bValid = sal_True;
+ if (aIter.hasMoreElements())
+ {
+ ::com::sun::star::sdb::RowChangeEvent aEvt(aEvent);
+ aEvt.Source = *this;
+ bValid = ((::com::sun::star::sdb::XRowSetApproveListener*)aIter.next())->approveRowChange(aEvt);
+ }
+
+ if (bValid && (
+ aEvent.Action == ::com::sun::star::sdb::RowChangeAction::INSERT ||
+ aEvent.Action == ::com::sun::star::sdb::RowChangeAction::UPDATE))
+ {
+ if (m_pView)
+ { // we're working for a FormView
+ if (!(m_pWindow || (m_pView->GetActualOutDev() == (const OutputDevice*)m_pWindow ||
+ !m_pView->GetActualOutDev() && m_pWindow->IsActive())))
+ // we're not active
+ return sal_True;
+ }
+ // default handling
+ // check Values on NULL and required flag
+ Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(aEvent.Source, UNO_QUERY);
+ Reference< ::com::sun::star::container::XEnumerationAccess > xEnumAccess;
+ if (xSupplyCols.is())
+ xEnumAccess = Reference< ::com::sun::star::container::XEnumerationAccess > (xSupplyCols->getColumns(),UNO_QUERY);
+
+ if (!xSupplyCols.is() || !xEnumAccess.is())
+ {
+ DBG_ERROR("FmXFormController::approveRowChange : source is no columns supplier or columns aren't enumerable !");
+ // can't do anything here ...
+ return sal_True;
+ }
+
+ Reference< ::com::sun::star::container::XEnumeration > xEnumeration = xEnumAccess->createEnumeration();
+ while (xEnumeration->hasMoreElements())
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xFieldSet(*(Reference< ::com::sun::star::beans::XPropertySet > *)xEnumeration->nextElement().getValue());
+ Reference< ::com::sun::star::sdb::XColumn > xColumn(xFieldSet, UNO_QUERY);
+ if (!xFieldSet.is() || !xColumn.is())
+ {
+ DBG_ERROR("FmXFormController::approveRowChange : invalid field !");
+ continue;
+ }
+
+ sal_Bool bRequired = ::utl::getINT32(xFieldSet->getPropertyValue(FM_PROP_ISNULLABLE)) == ::com::sun::star::sdbc::ColumnValue::NO_NULLS;
+ if (!bRequired)
+ continue;
+
+ sal_Bool bAutoIncrement = ::utl::getBOOL(xFieldSet->getPropertyValue(FM_PROP_AUTOINCREMENT));
+ if (bAutoIncrement)
+ continue;
+
+ ::rtl::OUString aFieldName(::utl::getString(xFieldSet->getPropertyValue(FM_PROP_NAME)));
+
+ if (!xColumn->getString().len() && xColumn->wasNull())
+ {
+ Sequence< Reference< ::com::sun::star::awt::XControl > > aControls(getControls());
+ sal_Int32 nLength = aControls.getLength();
+ sal_Int32 i(0);
+ const Reference< ::com::sun::star::awt::XControl > * pControls = aControls.getConstArray();
+ for (; i < nLength; i++)
+ {
+ if (pControls[i].is())
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xModel(pControls[i]->getModel(), UNO_QUERY);
+ if (xModel.is())
+ {
+ if (::utl::hasProperty(FM_PROP_CONTROLSOURCE, xModel))
+ {
+ ::rtl::OUString aName = ::utl::getString(xModel->getPropertyValue(FM_PROP_CONTROLSOURCE));
+ if (aName == aFieldName) // Control gefunden
+ break;
+ }
+ }
+ }
+ }
+
+ ::vos::OGuard aGuard(Application::GetSolarMutex());
+
+ UniString aTitle(SVX_RES(RID_STR_WRITEERROR));
+ UniString aMsg(SVX_RES(RID_ERR_FIELDREQUIRED));
+ aMsg.SearchAndReplace('#', aFieldName.getStr());
+
+ SvxDBMsgBox aDlg(getDialogParentWindow(), aTitle, aMsg, WB_OK | WB_DEF_OK,
+ SvxDBMsgBox::Info);
+ aDlg.Execute();
+ if ( i < nLength)
+ {
+ Reference< ::com::sun::star::awt::XWindow > xWindow(pControls[i], UNO_QUERY);
+ xWindow->setFocus();
+ }
+ return sal_False;
+ }
+ }
+ }
+ return bValid;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXFormController::approveCursorMove(const ::com::sun::star::lang::EventObject& event) throw( RuntimeException )
+{
+ ::cppu::OInterfaceIteratorHelper aIter(m_aRowSetApproveListeners);
+ if (aIter.hasMoreElements())
+ {
+ ::com::sun::star::lang::EventObject aEvt(event);
+ aEvt.Source = *this;
+ return ((::com::sun::star::sdb::XRowSetApproveListener*)aIter.next())->approveCursorMove(aEvt);
+ }
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXFormController::approveRowSetChange(const ::com::sun::star::lang::EventObject& event) throw( RuntimeException )
+{
+ ::cppu::OInterfaceIteratorHelper aIter(m_aRowSetApproveListeners);
+ if (aIter.hasMoreElements())
+ {
+ ::com::sun::star::lang::EventObject aEvt(event);
+ aEvt.Source = *this;
+ return ((::com::sun::star::sdb::XRowSetApproveListener*)aIter.next())->approveRowSetChange(aEvt);
+ }
+
+ return sal_True;
+}
+
+// ::com::sun::star::sdb::XRowSetApproveBroadcaster
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::addRowSetApproveListener(const Reference< ::com::sun::star::sdb::XRowSetApproveListener > & _rxListener) throw( RuntimeException )
+{
+ m_aRowSetApproveListeners.addInterface(_rxListener);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::removeRowSetApproveListener(const Reference< ::com::sun::star::sdb::XRowSetApproveListener > & _rxListener) throw( RuntimeException )
+{
+ m_aRowSetApproveListeners.removeInterface(_rxListener);
+}
+
+// ::com::sun::star::form::XErrorListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::errorOccured(const ::com::sun::star::sdb::SQLErrorEvent& aEvent) throw( RuntimeException )
+{
+ if (m_pView)
+ { // we're working for a FormView
+ if (!(m_pWindow || (m_pView->GetActualOutDev() == (const OutputDevice*)m_pWindow ||
+ !m_pView->GetActualOutDev() && m_pWindow->IsActive())))
+ // we're not active
+ return;
+ }
+
+ ::cppu::OInterfaceIteratorHelper aIter(m_aErrorListeners);
+ if (aIter.hasMoreElements())
+ {
+ ::com::sun::star::sdb::SQLErrorEvent aEvt(aEvent);
+ aEvt.Source = *this;
+ ((::com::sun::star::sdb::XSQLErrorListener*)aIter.next())->errorOccured(aEvt);
+ }
+ else
+ {
+ displayException(aEvent);
+ }
+}
+
+// ::com::sun::star::form::XErrorBroadcaster
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::addSQLErrorListener(const Reference< ::com::sun::star::sdb::XSQLErrorListener > & aListener) throw( RuntimeException )
+{
+ m_aErrorListeners.addInterface(aListener);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::removeSQLErrorListener(const Reference< ::com::sun::star::sdb::XSQLErrorListener > & aListener) throw( RuntimeException )
+{
+ m_aErrorListeners.removeInterface(aListener);
+}
+
+// ::com::sun::star::form::XDatabaseParameterBroadcaster
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::addParameterListener(const Reference< ::com::sun::star::form::XDatabaseParameterListener > & aListener) throw( RuntimeException )
+{
+ m_aParameterListeners.addInterface(aListener);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::removeParameterListener(const Reference< ::com::sun::star::form::XDatabaseParameterListener > & aListener) throw( RuntimeException )
+{
+ m_aParameterListeners.removeInterface(aListener);
+}
+
+// ::com::sun::star::form::XDatabaseParameterListener
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXFormController::approveParameter(const ::com::sun::star::form::DatabaseParameterEvent& aEvent) throw( RuntimeException )
+{
+ if (m_pView)
+ { // we're working for a FormView
+ if (!(m_pWindow || (m_pView->GetActualOutDev() == (const OutputDevice*)m_pWindow ||
+ !m_pView->GetActualOutDev() && m_pWindow->IsActive())))
+ // we're not active
+ return sal_True;
+ }
+
+ ::cppu::OInterfaceIteratorHelper aIter(m_aParameterListeners);
+ if (aIter.hasMoreElements())
+ {
+ ::com::sun::star::form::DatabaseParameterEvent aEvt(aEvent);
+ aEvt.Source = *this;
+ return ((::com::sun::star::form::XDatabaseParameterListener*)aIter.next())->approveParameter(aEvt);
+ }
+ else
+ {
+ // default handling, asking for parameters
+ Reference< ::com::sun::star::container::XIndexAccess > xParams = aEvent.Parameters;
+ ::vos::OGuard aGuard(Application::GetSolarMutex());
+
+ Reference< ::com::sun::star::sdbc::XConnection > xConn;
+ Reference< ::com::sun::star::sdbc::XRowSet > xForm(aEvent.Source, UNO_QUERY);
+ if (xForm.is())
+ xConn = ::utl::getConnection(xForm);
+ FmEnterParamDlg aDlg(getDialogParentWindow(), xParams, xConn);
+ if (aDlg.Execute() != RET_OK)
+ return sal_False;
+ }
+ return sal_True;
+}
+
+// ::com::sun::star::form::XConfirmDeleteBroadcaster
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::addConfirmDeleteListener(const Reference< ::com::sun::star::form::XConfirmDeleteListener > & aListener) throw( RuntimeException )
+{
+ m_aDeleteListeners.addInterface(aListener);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormController::removeConfirmDeleteListener(const Reference< ::com::sun::star::form::XConfirmDeleteListener > & aListener) throw( RuntimeException )
+{
+ m_aDeleteListeners.removeInterface(aListener);
+}
+
+// ::com::sun::star::form::XConfirmDeleteListener
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXFormController::confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& aEvent) throw( RuntimeException )
+{
+ if (m_pView)
+ { // we're working for a FormView
+ if (!(m_pWindow || (m_pView->GetActualOutDev() == (const OutputDevice*)m_pWindow ||
+ !m_pView->GetActualOutDev() && m_pWindow->IsActive())))
+ // we're not active
+ return sal_True;
+ }
+
+ ::cppu::OInterfaceIteratorHelper aIter(m_aDeleteListeners);
+ if (aIter.hasMoreElements())
+ {
+ ::com::sun::star::sdb::RowChangeEvent aEvt(aEvent);
+ aEvt.Source = *this;
+ return ((::com::sun::star::form::XConfirmDeleteListener*)aIter.next())->confirmDelete(aEvt);
+ }
+ else
+ {
+ // default handling
+ UniString aTitle;
+ sal_Int32 nLength = aEvent.Rows;
+ if (nLength > 1)
+ aTitle = SVX_RES(RID_STR_DELETECONFIRM_RECORDS);
+ else
+ aTitle = SVX_RES(RID_STR_DELETECONFIRM_RECORD);
+ aTitle.SearchAndReplace('#', UniString(long(nLength)));
+
+ SvxDBMsgBox aDlg(getDialogParentWindow(), aTitle,
+ SVX_RES(RID_STR_DELETECONFIRM), WB_YES_NO | WB_DEF_NO, SvxDBMsgBox::Warning);
+
+ return aDlg.Execute() == RET_YES;
+ }
+}
+
+//------------------------------------------------------------------------------
+Reference< ::com::sun::star::frame::XDispatch >
+FmXFormController::interceptedQueryDispatch(sal_uInt16 _nId, const ::com::sun::star::util::URL& aURL,
+ const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags)
+ throw( RuntimeException )
+{
+ Reference< ::com::sun::star::frame::XDispatch > xReturn;
+ // dispatches handled by ourself
+ if (aURL.Complete == FMURL_CONFIRM_DELETION)
+ xReturn = (::com::sun::star::frame::XDispatch*)this;
+
+ // dispatches of FormSlot-URLs we have to translate
+ if (!xReturn.is() && aURL.Complete.indexOf(FMURL_FORMSLOTS_PREFIX) == 0)
+ { // TODO : use an ::com::sun::star::util::URLTransformer to split this ::com::sun::star::util::URL and do a real (safe) check
+
+ // get the frame we're residing in
+ Reference< ::com::sun::star::frame::XModel > xFrameModel = getXModel(getModel());
+ Reference< ::com::sun::star::frame::XController > xFrameController = xFrameModel.is() ? xFrameModel->getCurrentController() : Reference< ::com::sun::star::frame::XController > ();
+ Reference< ::com::sun::star::frame::XFrame > xFrame = xFrameController.is() ? xFrameController->getFrame() : Reference< ::com::sun::star::frame::XFrame > ();
+
+ if (!xFrame.is())
+ {
+ // bad timing : somebody requested a dispatch, but the model we belong to is not attached to a controller, yet
+ // (or the controller isn't attached to a frame). This sometimes happens if a document is opened read-only.
+ // As we have no chance to get the "attached" event for the model/controller/frame, we have no chance
+ // to refresh the dispatchers later as response to such an event.
+ // So we simply try it asynchron until we have that frame.
+ if (!m_nUpdateDispatcherEvent)
+ m_nUpdateDispatcherEvent = Application::PostUserEvent(LINK(this, FmXFormController, OnUpdateDispatchers));
+ }
+ else
+ {
+ // translate the ::com::sun::star::util::URL : the new ::com::sun::star::util::URL is the old one with a mark : the "path" to our model within it's hierarchy
+ DBG_ASSERT(aURL.Mark.len() == 0, "FmXFormController::interceptedQueryDispatch : the ::com::sun::star::util::URL shouldn't have a mark !");
+ ::rtl::OUString sNewMark;
+ ::rtl::OUString sCurrentPath;
+ // collect the relative indicies of my model, it's parent, it's parent's parent ..., separate them with a '\'
+ Reference< ::com::sun::star::container::XChild > xChild(getModel(), UNO_QUERY);
+ Reference< ::com::sun::star::container::XIndexAccess > xParent;
+ if (xChild.is())
+ ::utl::query_interface(xChild->getParent(), xParent);
+
+
+ while (xChild.is() && xParent.is())
+ {
+ sal_Int32 nPos = getElementPos(xParent, xChild);
+
+ sCurrentPath = ::rtl::OUString::valueOf(nPos);
+ if (sNewMark.getLength())
+ {
+ sCurrentPath += ::rtl::OUString::createFromAscii("\\");
+ sNewMark = sCurrentPath + sNewMark;
+ }
+ else
+ sNewMark = sCurrentPath;
+
+ ::utl::query_interface((Reference<XInterface>)xParent, xChild);
+
+ if (xChild.is())
+ ::utl::query_interface(xChild->getParent(), xParent);
+
+ }
+
+ ::com::sun::star::util::URL aNewUrl = aURL;
+ // and prepend our dispatch prefix
+ aNewUrl.Mark = m_sDispatchPrefix;
+ aNewUrl.Mark += ::rtl::OUString::createFromAscii("\\");
+ aNewUrl.Mark += sNewMark;
+
+ // assemble the new url
+ Reference< ::com::sun::star::util::XURLTransformer > xTransformer(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer") ), UNO_QUERY);
+ if (xTransformer.is())
+ {
+ xTransformer->assemble(aNewUrl);
+ DBG_ASSERT(aNewUrl.Complete.getLength(), "FmXFormController::interceptedQueryDispatch : transformation of the ::com::sun::star::util::URL failed !");
+ }
+ else
+ {
+ DBG_ERROR("FmXFormController::interceptedQueryDispatch : could not create a com.sun.star.util.URLTransformer !");
+ // do it manually ... the service would probably do the same, but to be sure we gave it a chance before doing it ourself
+ aNewUrl.Complete += ::rtl::OUString::createFromAscii("#");
+ aNewUrl.Complete += aNewUrl.Mark;
+ }
+
+ Reference< ::com::sun::star::frame::XDispatchProvider > xDispProv(xFrame, UNO_QUERY);
+ if (xDispProv.is())
+ xReturn = xDispProv->queryDispatch(aNewUrl, aTargetFrameName, nSearchFlags);
+ }
+ }
+
+ // no more to offer
+ return xReturn;
+}
+
+//------------------------------------------------------------------------------
+Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > FmXFormController::createInterceptor(const Reference< ::com::sun::star::frame::XDispatchProviderInterception > & _xInterception)
+{
+#if DBG_UTIL
+ // check if we already have a interceptor for the given object
+ for ( ConstInterceptorsIterator aIter = m_aControlDispatchInterceptors.begin();
+ aIter != m_aControlDispatchInterceptors.end();
+ ++aIter
+ )
+ {
+ if ((*aIter)->getIntercepted() == _xInterception)
+ DBG_ERROR("FmXFormController::createInterceptor : we already do intercept this objects dispatches !");
+ }
+#endif
+
+ FmXDispatchInterceptorImpl* pInterceptor = new FmXDispatchInterceptorImpl(_xInterception, this, 0);
+ pInterceptor->acquire();
+ m_aControlDispatchInterceptors.insert(m_aControlDispatchInterceptors.end(), pInterceptor);
+
+ return (::com::sun::star::frame::XDispatchProviderInterceptor*)pInterceptor;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormController::deleteInterceptor(const Reference< ::com::sun::star::frame::XDispatchProviderInterception > & _xInterception)
+{
+ // search the interceptor responsible for the given object
+ InterceptorsIterator aIter;
+ for ( aIter = m_aControlDispatchInterceptors.begin();
+ aIter != m_aControlDispatchInterceptors.end();
+ ++aIter
+ )
+ {
+ if ((*aIter)->getIntercepted() == _xInterception)
+ break;
+ }
+ if (aIter == m_aControlDispatchInterceptors.end())
+ {
+ DBG_ERROR("FmXFormController::deleteInterceptor : we're not registered for this object !");
+ return;
+ }
+
+ // log off the interception from it's interception object
+ FmXDispatchInterceptorImpl* pInterceptorImpl = *aIter;
+ pInterceptorImpl->dispose();
+ pInterceptorImpl->release();
+
+ // remove the interceptor from our array
+ m_aControlDispatchInterceptors.erase(aIter);
+}
+
+
+
+
diff --git a/svx/source/form/fmdmod.cxx b/svx/source/form/fmdmod.cxx
new file mode 100644
index 0000000000..36863c8fe8
--- /dev/null
+++ b/svx/source/form/fmdmod.cxx
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmdmod.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_FMDMOD_HXX
+#include "fmdmod.hxx"
+#endif
+
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+#ifndef _SVX_FMOBJ_HXX
+#include <fmobj.hxx>
+#endif
+#ifndef _SVX_UNOSHAPE_HXX
+#include <unoshape.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+//-----------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxFmMSFactory::createInstance(const ::rtl::OUString& ServiceSpecifier) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xRet;
+ if ( ServiceSpecifier.search( ::rtl::OUString::createFromAscii("com.sun.star.form.component.") ) == 0 )
+ {
+ xRet = ::utl::getProcessServiceFactory()->createInstance(ServiceSpecifier);
+ }
+ else if ( ServiceSpecifier == ::rtl::OUString( ::rtl::OUString::createFromAscii("com.sun.star.drawing.ControlShape") ) )
+ {
+ SdrObject* pObj = new FmFormObj();
+ xRet = *new SvxShapeControl(pObj);
+ }
+ if (!xRet.is())
+ xRet = SvxUnoDrawMSFactory::createInstance(ServiceSpecifier);
+ return xRet;
+}
+
+//-----------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxFmMSFactory::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 SvxUnoDrawMSFactory::createInstanceWithArguments(ServiceSpecifier, Arguments );
+}
+
+//-----------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvxFmMSFactory::getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ static const UniString aSvxComponentServiceNameList[] =
+ {
+ FM_COMPONENT_FORM, AWT_CONTROL_TEXTFIELD, FM_COMPONENT_LISTBOX, FM_COMPONENT_COMBOBOX,
+ FM_COMPONENT_RADIOBUTTON, FM_COMPONENT_GROUPBOX, FM_COMPONENT_FIXEDTEXT, FM_COMPONENT_COMMANDBUTTON,
+ FM_COMPONENT_CHECKBOX, FM_SUN_COMPONENT_GRIDCONTROL, FM_COMPONENT_IMAGEBUTTON, FM_COMPONENT_FILECONTROL,
+ FM_COMPONENT_TIMEFIELD, FM_COMPONENT_DATEFIELD, FM_COMPONENT_NUMERICFIELD, FM_COMPONENT_CURRENCYFIELD,
+ FM_COMPONENT_PATTERNFIELD, FM_SUN_COMPONENT_HIDDENCONTROL, FM_COMPONENT_IMAGECONTROL
+ };
+
+ static const sal_uInt16 nSvxComponentServiceNameListCount = sizeof(aSvxComponentServiceNameList) / sizeof ( aSvxComponentServiceNameList[0] );
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq( nSvxComponentServiceNameListCount );
+ ::rtl::OUString* pStrings = aSeq.getArray();
+ for( sal_uInt16 nIdx = 0; nIdx < nSvxComponentServiceNameListCount; nIdx++ )
+ pStrings[nIdx] = aSvxComponentServiceNameList[nIdx];
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aParentSeq( SvxUnoDrawMSFactory::getAvailableServiceNames() );
+ return concatServiceNames( aParentSeq, aSeq );
+}
+
+/*
+// XServiceManager
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvxFmDrawModel::createInstance(const ::rtl::OUString& ServiceName)
+ const throw( ::com::sun::star::lang::ServiceNotRegisteredException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xRet;
+ sal_uInt16 nTokenCount = ServiceName.getTokenCount('.');
+ if (nTokenCount == 5 &&
+ ServiceName.getToken( 0, '.' ) == ::rtl::OUString::createFromAscii("stardiv") &&
+ ServiceName.getToken( 1, '.' ) == ::rtl::OUString::createFromAscii("one") &&
+ ServiceName.getToken( 2, '.' ) == ::rtl::OUString::createFromAscii("form") &&
+ ServiceName.getToken( 3, '.' ) == ::rtl::OUString::createFromAscii("component"))
+ {
+ xRet = ::utl::getProcessServiceFactory()->createInstance(ServiceName);
+ }
+ else
+ if (nTokenCount == 4 &&
+ ServiceName.getToken( 0, '.' ) == ::rtl::OUString::createFromAscii("stardiv") &&
+ ServiceName.getToken( 1, '.' ) == ::rtl::OUString::createFromAscii("one") &&
+ ServiceName.getToken( 2, '.' ) == ::rtl::OUString::createFromAscii("drawing") &&
+ ServiceName.getToken( 3, '.' ) == ::rtl::OUString::createFromAscii("ControlShape"))
+ {
+ SdrObject* pObj = new FmFormObj();
+ xRet = *new SvxShapeControl(pObj);
+ }
+ if (!xRet.is())
+ xRet = SvxUnoDrawModel::createInstance(ServiceName);
+ return xRet;
+}
+*/
+
+
diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx
new file mode 100644
index 0000000000..48d4de83f3
--- /dev/null
+++ b/svx/source/form/fmdpage.cxx
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmdpage.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_FMPAGE_HXX
+#include "fmpage.hxx"
+#endif
+
+#ifndef _SVX_FMOBJ_HXX
+#include "fmobj.hxx"
+#endif
+
+#ifndef _SVX_FMGLOB_HXX
+#include "fmglob.hxx"
+#endif
+
+#ifndef _SVX_FMDPAGE_HXX
+#include "fmdpage.hxx"
+#endif
+
+#ifndef _SVX_UNOSHAPE_HXX //autogen
+#include "unoshape.hxx"
+#endif
+#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
+#include <cppuhelper/queryinterface.hxx>
+#endif
+#ifndef _FM_IMPLEMENTATION_IDS_HXX_
+#include "fmimplids.hxx"
+#endif
+
+DBG_NAME(SvxFmDrawPage);
+SvxFmDrawPage::SvxFmDrawPage( SdrPage* pInPage ) :
+ SvxDrawPage( pInPage )
+{
+ DBG_CTOR(SvxFmDrawPage,NULL);
+ m_pHoldImplIdHelper = new ::form::OImplementationIdsRef();
+}
+
+SvxFmDrawPage::~SvxFmDrawPage()
+{
+ delete m_pHoldImplIdHelper;
+ DBG_DTOR(SvxFmDrawPage,NULL);
+}
+
+::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL SvxFmDrawPage::getImplementationId() throw(::com::sun::star::uno::RuntimeException)
+{
+ return ::form::OImplementationIds::getImplementationId(getTypes());
+}
+
+::com::sun::star::uno::Any SAL_CALL SvxFmDrawPage::queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Any aRet = ::cppu::queryInterface(aType,
+ static_cast< ::com::sun::star::form::XFormsSupplier*>(this));
+ if(aRet.hasValue())
+ return aRet;
+
+ return SvxDrawPage::queryAggregation(aType);
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL SvxFmDrawPage::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypes(SvxDrawPage::getTypes());
+ aTypes.realloc(aTypes.getLength() + 1);
+ ::com::sun::star::uno::Type* pTypes = aTypes.getArray();
+
+ pTypes[aTypes.getLength()-1] = ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormsSupplier>*)0);
+ return aTypes;
+}
+
+SdrObject *SvxFmDrawPage::_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xDescr )
+{
+ ::rtl::OUString aShapeType( xDescr->getShapeType() );
+
+ if (aShapeType == ::rtl::OUString::createFromAscii("com.sun.star.drawing.ShapeControl"))
+ return new FmFormObj();
+ else
+ return SvxDrawPage::_CreateSdrObject( xDescr );
+
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > SvxFmDrawPage::_CreateShape( SdrObject *pObj ) const
+{
+ if( FmFormInventor == pObj->GetObjInventor() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape = (SvxShape*)new SvxShapeControl( pObj );
+ return xShape;
+ }
+ else
+ return SvxDrawPage::_CreateShape( pObj );
+}
+
+// ::com::sun::star::form::XFormsSupplier
+::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL SvxFmDrawPage::getForms(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xForms;
+
+ FmFormPage *pFmPage = PTR_CAST( FmFormPage, GetSdrPage() );
+ if( pFmPage )
+ xForms = pFmPage->GetForms();
+
+ return xForms;
+}
+
+// ::com::sun::star::lang::XServiceInfo
+::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvxFmDrawPage::getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ /* TODO: DG? Irgendwelche Services?
+ ::com::sun::star::uno::Sequence aSeq( SvxDrawPage::getSupportedServiceNames() );
+ addToSequence( aSeq, 1, ::rtl::OUString::createFromAscii("stardiv.form.superservice?") );
+ return aSeq;
+ */
+
+ return SvxDrawPage::getSupportedServiceNames();
+}
+
+
diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx
new file mode 100644
index 0000000000..b97dfb527c
--- /dev/null
+++ b/svx/source/form/fmexch.cxx
@@ -0,0 +1,222 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmexch.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMEXCH_HXX
+#include "fmexch.hxx"
+#endif
+
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SVX_DBEXCH_HRC
+#include <dbexch.hrc>
+#endif
+
+#ifndef _SOT_FORMATS_HXX
+#include <sot/formats.hxx>
+#endif
+
+#ifndef _SVTREEBOX_HXX //autogen
+#include <svtools/svtreebx.hxx>
+#endif
+
+#define _SVSTDARR_ULONGS
+#include <svtools/svstdarr.hxx>
+
+static sal_uInt32 nFieldFormat = 0;
+static sal_uInt32 nControlFormat = 0;
+
+//========================================================================
+// class SvxFmExplCtrlExch
+//========================================================================
+
+//------------------------------------------------------------------------
+SvxFmExplCtrlExch::SvxFmExplCtrlExch( const vector<SvLBoxEntry*>& lstWhich, FmFormShell* pShell, FmFormPage* pPage )
+ :m_aDraggedEntries(lstWhich)
+ ,m_pShell(pShell)
+ ,m_pPage(pPage)
+{
+ m_aDataTypeList.Insert( SvDataType(Exchange::RegisterFormatName(SVX_FM_CONTROL_EXCH)) );
+}
+
+//------------------------------------------------------------------------
+SvxFmExplCtrlExch::SvxFmExplCtrlExch( SvLBoxEntry* pEntry )
+ :m_pShell(NULL)
+ ,m_pPage(NULL)
+{
+ m_aDataTypeList.Insert( SvDataType(Exchange::RegisterFormatName(SVX_FM_CONTROL_EXCH)) );
+
+ AddItem(pEntry);
+}
+
+//------------------------------------------------------------------------
+sal_Bool SvxFmExplCtrlExch::GetData( SvData* pData )
+{
+ return sal_False;
+}
+
+//------------------------------------------------------------------------
+void SvxFmExplCtrlExch::BuildPathFormat(SvTreeListBox* pTreeBox, SvLBoxEntry* pRoot)
+{
+ if (m_aControlPaths.getLength() == 0)
+ {
+ // Unterstuetzung des neuen Formats anzeigen
+ m_aDataTypeList.Insert( SvDataType(Exchange::RegisterFormatName(SVX_FM_CONTROLS_AS_PATH)) );
+ }
+ m_aControlPaths.realloc(0);
+
+ sal_Int32 nEntryCount = m_aDraggedEntries.size();
+ if (nEntryCount == 0)
+ return;
+
+ m_aControlPaths.realloc(nEntryCount);
+ ::com::sun::star::uno::Sequence<sal_uInt32>* pAllPaths = m_aControlPaths.getArray();
+ for (sal_Int32 i=0; i<nEntryCount; ++i)
+ {
+ // erst mal sammeln wir den Pfad in einem Array ein
+ SvULongs arrCurrentPath;
+ SvLBoxEntry* pCurrentEntry = m_aDraggedEntries[i];
+
+ SvLBoxEntry* pLoop = pCurrentEntry;
+ while (pLoop != pRoot)
+ {
+ arrCurrentPath.Insert(pLoop->GetChildListPos(), arrCurrentPath.Count());
+ pLoop = pTreeBox->GetParent(pLoop);
+ DBG_ASSERT((pLoop != NULL) || (pRoot == 0), "SvxFmExplCtrlExch::BuildPathFormat : invalid root or entry !");
+ // pLoop == NULL heisst, dass ich am oberen Ende angelangt bin, dann sollte das Ganze abbrechen, was nur bei pRoot == NULL der Fall sein wird
+ }
+
+ // dann koennen wir ihn in die ::com::sun::star::uno::Sequence uebertragen
+ ::com::sun::star::uno::Sequence<sal_uInt32>& rCurrentPath = pAllPaths[i];
+ sal_Int32 nDepth = arrCurrentPath.Count();
+
+ rCurrentPath.realloc(nDepth);
+ sal_uInt32* pSeq = rCurrentPath.getArray();
+ sal_Int32 j,k;
+ for (j = nDepth - 1, k = 0; k<nDepth; --j, ++k)
+ {
+ pSeq[j] = arrCurrentPath.GetObject(k);
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+void SvxFmExplCtrlExch::BuildListFromPath(SvTreeListBox* pTreeBox, SvLBoxEntry* pRoot)
+{
+ m_aDraggedEntries.clear();
+
+ sal_Int32 nControls = m_aControlPaths.getLength();
+ const ::com::sun::star::uno::Sequence<sal_uInt32>* pPaths = m_aControlPaths.getConstArray();
+ for (sal_Int32 i=0; i<nControls; ++i)
+ {
+ sal_Int32 nThisPatLength = pPaths[i].getLength();
+ const sal_uInt32* pThisPath = pPaths[i].getConstArray();
+ SvLBoxEntry* pSearch = pRoot;
+ for (sal_Int32 j=0; j<nThisPatLength; ++j)
+ pSearch = pTreeBox->GetEntry(pSearch, pThisPath[j]);
+
+ m_aDraggedEntries.push_back(pSearch);
+ }
+}
+
+//------------------------------------------------------------------------
+void SvxFmExplCtrlExch::AddHiddenControlsFormat(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > seqInterfaces)
+{
+ m_aDataTypeList.Insert( SvDataType(Exchange::RegisterFormatName(SVX_FM_HIDDEN_CONTROLS)) );
+ m_seqControls = seqInterfaces;
+}
+
+//========================================================================
+// class SvxFmFieldExch
+//========================================================================
+
+//------------------------------------------------------------------------
+SvxFmFieldExch::SvxFmFieldExch(const String& rFieldDesc)
+ :aFieldDesc(rFieldDesc)
+{
+ if (!nFieldFormat)
+ nFieldFormat = Exchange::RegisterFormatName(String::CreateFromAscii(SBA_FIELDEXCHANGE_FORMAT));
+
+ SvDataType* pDataType = new SvDataType(nFieldFormat);
+ aDataTypeList.Insert( *pDataType );
+}
+
+//------------------------------------------------------------------------
+sal_Bool SvxFmFieldExch::GetData( SvData* pData )
+{
+ if (pData->GetFormat() == nFieldFormat)
+ {
+ pData->SetData(aFieldDesc);
+ return sal_True;
+ }
+ else
+ return sal_False;
+}
+
+
diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx
new file mode 100644
index 0000000000..a12067a32a
--- /dev/null
+++ b/svx/source/form/fmexpl.cxx
@@ -0,0 +1,3530 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmexpl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMUNOVW_HXX
+#include "fmvwimp.hxx"
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+#ifndef _SVX_FMEXPL_HRC
+#include "fmexpl.hrc"
+#endif
+#ifndef _SVX_FMEXPL_HXX
+#include "fmexpl.hxx"
+#endif
+
+#ifndef _SVDPAGV_HXX //autogen
+#include "svdpagv.hxx"
+#endif
+
+#ifndef _SVX_FMHELP_HRC
+#include "fmhelp.hrc"
+#endif
+
+#ifndef _SVX_FMGLOB_HXX
+#include "fmglob.hxx"
+#endif
+
+#ifndef _SVX_FMITEMS_HXX
+#include "fmitems.hxx"
+#endif
+
+#ifndef _SVDOGRP_HXX
+#include "svdogrp.hxx"
+#endif
+
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+
+#ifndef _SVX_TABORDER_HXX
+#include "taborder.hxx"
+#endif
+
+#ifndef _SVX_DBERRBOX_HXX
+#include "dbmsgbox.hxx"
+#endif
+
+#ifndef _SVX_FMMODEL_HXX
+#include "fmmodel.hxx"
+#endif
+
+#ifndef _SVX_FMEXCH_HXX
+#include "fmexch.hxx"
+#endif
+
+#ifndef _SVX_FMUNDO_HXX
+#include "fmundo.hxx"
+#endif
+
+#ifndef _SVX_FMUNOPGE_HXX
+#include "fmpgeimp.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+
+#ifndef _SVX_DIALMGR_HXX //autogen
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SVDITER_HXX //autogen
+#include "svditer.hxx"
+#endif
+
+#ifndef _SVDOUNO_HXX
+#include <svdouno.hxx>
+#endif
+
+#ifndef _SVX_FMUNDO_HXX
+#include <fmundo.hxx>
+#endif
+
+#ifndef _SVDOBJ_HXX
+#include <svdobj.hxx>
+#endif
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_FORMCOMPONENTTYPE_HPP_
+#include <com/sun/star/form/FormComponentType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XTABCONTROLLERMODEL_HPP_
+#include <com/sun/star/awt/XTabControllerModel.hpp>
+#endif
+
+#ifndef _SV_MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+
+#ifndef _SFX_OBJITEM_HXX //autogen
+#include <sfx2/objitem.hxx>
+#endif
+
+#ifndef _SFXREQUEST_HXX
+#include <sfx2/request.hxx>
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+
+#ifndef _SV_SOUND_HXX //autogen
+#include <vcl/sound.hxx>
+#endif
+
+#ifndef _MULTIPRO_HXX
+#include "multipro.hxx"
+#endif
+
+#ifndef _SVX_FMSHELL_HXX
+#include "fmshell.hxx"
+#endif
+
+#ifndef _SVX_FMSHIMP_HXX
+#include "fmshimp.hxx"
+#endif
+
+#ifndef _SVX_FMPAGE_HXX
+#include "fmpage.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
+#include <com/sun/star/io/XPersistObject.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XEVENTATTACHERMANAGER_HPP_
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
+#include <com/sun/star/container/XContainer.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
+#include <com/sun/star/sdb/CommandType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+
+#ifndef _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif // _SVX_FMPROP_HXX
+
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+//========================================================================
+
+#define DROP_ACTION_TIMER_INITIAL_TICKS 10
+ // solange dauert es, bis das Scrollen anspringt
+#define DROP_ACTION_TIMER_SCROLL_TICKS 3
+ // in diesen Intervallen wird jeweils eine Zeile gescrollt
+#define DROP_ACTION_TIMER_TICK_BASE 10
+ // das ist die Basis, mit der beide Angaben multipliziert werden (in ms)
+
+#define EXPLORER_SYNC_DELAY 200
+ // dieser Betrag an Millisekunden wird gewartet, ehe der Explorer nach einem Select oder Deselect die ::com::sun::star::sdbcx::View synchronisiert
+
+SV_IMPL_PTRARR_SORT( FmEntryDataArray, FmEntryDataPtr )
+SV_IMPL_PTRARR_SORT( SvLBoxEntrySortedArray, SvLBoxEntryPtr )
+
+//========================================================================
+// class FmExplInsertedHint
+//========================================================================
+TYPEINIT1( FmExplInsertedHint, SfxHint );
+DBG_NAME(FmExplInsertedHint);
+//------------------------------------------------------------------------
+FmExplInsertedHint::FmExplInsertedHint( FmEntryData* pInsertedEntryData, sal_uInt32 nRelPos )
+ :pEntryData( pInsertedEntryData )
+ ,nPos( nRelPos )
+
+{
+ DBG_CTOR(FmExplInsertedHint,NULL);
+}
+
+//------------------------------------------------------------------------
+FmExplInsertedHint::~FmExplInsertedHint()
+{
+ DBG_DTOR(FmExplInsertedHint,NULL);
+}
+
+
+//========================================================================
+// class FmExplInsertedHint
+//========================================================================
+TYPEINIT1( FmExplModelReplacedHint, SfxHint );
+DBG_NAME(FmExplModelReplacedHint);
+//------------------------------------------------------------------------
+FmExplModelReplacedHint::FmExplModelReplacedHint( FmEntryData* pAffectedEntryData )
+ :pEntryData( pAffectedEntryData )
+{
+ DBG_CTOR(FmExplModelReplacedHint,NULL);
+}
+
+//------------------------------------------------------------------------
+FmExplModelReplacedHint::~FmExplModelReplacedHint()
+{
+ DBG_DTOR(FmExplModelReplacedHint,NULL);
+}
+
+//========================================================================
+// class FmExplRemovedHint
+//========================================================================
+TYPEINIT1( FmExplRemovedHint, SfxHint );
+DBG_NAME(FmExplRemovedHint);
+//------------------------------------------------------------------------
+FmExplRemovedHint::FmExplRemovedHint( FmEntryData* pRemovedEntryData )
+ :pEntryData( pRemovedEntryData )
+{
+ DBG_CTOR(FmExplRemovedHint,NULL);
+}
+
+//------------------------------------------------------------------------
+FmExplRemovedHint::~FmExplRemovedHint()
+{
+ DBG_DTOR(FmExplRemovedHint,NULL);
+}
+
+
+//========================================================================
+// class FmExplNameChangedHint
+//========================================================================
+TYPEINIT1( FmExplNameChangedHint, SfxHint );
+DBG_NAME(FmExplNameChangedHint);
+//------------------------------------------------------------------------
+FmExplNameChangedHint::FmExplNameChangedHint( FmEntryData* pData, const ::rtl::OUString& rNewName )
+ :pEntryData( pData )
+ ,aNewName( rNewName )
+{
+ DBG_CTOR(FmExplNameChangedHint,NULL);
+}
+
+//------------------------------------------------------------------------
+FmExplNameChangedHint::~FmExplNameChangedHint()
+{
+ DBG_DTOR(FmExplNameChangedHint,NULL);
+}
+
+//========================================================================
+// class FmExplClearedHint
+//========================================================================
+TYPEINIT1( FmExplClearedHint, SfxHint );
+DBG_NAME(FmExplClearedHint);
+//------------------------------------------------------------------------
+FmExplClearedHint::FmExplClearedHint()
+{
+ DBG_CTOR(FmExplClearedHint,NULL);
+}
+
+//------------------------------------------------------------------------
+FmExplClearedHint::~FmExplClearedHint()
+{
+ DBG_DTOR(FmExplClearedHint,NULL);
+}
+
+//========================================================================
+// class FmExplRequestSelectHint
+//========================================================================
+TYPEINIT1(FmExplRequestSelectHint, SfxHint);
+
+//========================================================================
+// class FmExplViewMarksChanged
+//========================================================================
+TYPEINIT1(FmExplViewMarksChanged, SfxHint);
+
+//========================================================================
+// class FmEntryDataList
+//========================================================================
+DBG_NAME(FmEntryDataList);
+//------------------------------------------------------------------------
+FmEntryDataList::FmEntryDataList()
+{
+ DBG_CTOR(FmEntryDataList,NULL);
+}
+
+//------------------------------------------------------------------------
+FmEntryDataList::~FmEntryDataList()
+{
+ DBG_DTOR(FmEntryDataList,NULL);
+}
+
+
+//========================================================================
+// class FmEntryData
+//========================================================================
+TYPEINIT0( FmEntryData );
+DBG_NAME(FmEntryData);
+//------------------------------------------------------------------------
+FmEntryData::FmEntryData( FmEntryData* pParentData )
+ :pParent( pParentData )
+{
+ DBG_CTOR(FmEntryData,NULL);
+ pChildList = new FmEntryDataList();
+}
+
+//------------------------------------------------------------------------
+FmEntryData::~FmEntryData()
+{
+ Clear();
+ delete pChildList;
+ DBG_DTOR(FmEntryData,NULL);
+}
+
+//------------------------------------------------------------------------
+FmEntryData::FmEntryData( const FmEntryData& rEntryData )
+{
+ pChildList = new FmEntryDataList();
+ aText = rEntryData.GetText();
+ aCollapsedImage = rEntryData.GetCollapsedImage();
+ aExpandedImage = rEntryData.GetExpandedImage();
+ pParent = rEntryData.GetParent();
+
+ FmEntryData* pChildData;
+ sal_uInt32 nEntryCount = rEntryData.GetChildList()->Count();
+ for( sal_uInt32 i=0; i<nEntryCount; i++ )
+ {
+ pChildData = rEntryData.GetChildList()->GetObject(i);
+ FmEntryData* pNewChildData = pChildData->Clone();
+ pChildList->Insert( pNewChildData, LIST_APPEND );
+ }
+}
+
+//------------------------------------------------------------------------
+void FmEntryData::Clear()
+{
+ FmEntryData* pEntryData;
+ while( pEntryData = GetChildList()->Remove(sal_uInt32(0)) )
+ delete pEntryData;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmEntryData::IsEqualWithoutChilds( FmEntryData* pEntryData )
+{
+ if(this == pEntryData)
+ return sal_True;
+
+ if( !pEntryData )
+ return sal_False;
+
+ if( !aText.equals(pEntryData->GetText()))
+ return sal_False;
+
+ if( !pEntryData->GetParent() && pParent )
+ return sal_False;
+
+ if( pEntryData->GetParent() && !pParent )
+ return sal_False;
+
+ if( !pEntryData->GetParent() && !pParent )
+ return sal_True;
+
+ if( !pParent->IsEqualWithoutChilds(pEntryData->GetParent()) )
+ return sal_False;
+
+ return sal_True;
+}
+
+
+//========================================================================
+// class FmFormData
+//========================================================================
+TYPEINIT1( FmFormData, FmEntryData );
+DBG_NAME(FmFormData);
+//------------------------------------------------------------------------
+FmFormData::FmFormData( ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm, const ImageList& ilNavigatorImages, FmFormData* pParent )
+ :FmEntryData( pParent )
+ ,m_xForm( xForm )
+{
+ DBG_CTOR(FmEntryData,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Images setzen
+
+ aCollapsedImage = ilNavigatorImages.GetImage( RID_SVXIMG_FORM );
+ aExpandedImage = ilNavigatorImages.GetImage( RID_SVXIMG_FORM );
+
+ //////////////////////////////////////////////////////////////////////
+ // Titel setzen
+ if (m_xForm.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ ::rtl::OUString aEntryName(::utl::getString(xSet->getPropertyValue( FM_PROP_NAME )));
+ SetText(aEntryName);
+ }
+ }
+ else
+ SetText( ::rtl::OUString() );
+}
+
+//------------------------------------------------------------------------
+FmFormData::~FmFormData()
+{
+ DBG_DTOR(FmEntryData,NULL);
+}
+
+//------------------------------------------------------------------------
+FmFormData::FmFormData( const FmFormData& rFormData )
+ :FmEntryData( rFormData )
+{
+ DBG_CTOR(FmEntryData,NULL);
+ m_xForm = rFormData.GetFormIface();
+}
+
+//------------------------------------------------------------------------
+FmEntryData* FmFormData::Clone()
+{
+ return new FmFormData( *this );
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmFormData::IsEqualWithoutChilds( FmEntryData* pEntryData )
+{
+ if(this == pEntryData)
+ return sal_True;
+ if( !pEntryData->ISA(FmFormData) )
+ return sal_False;
+ FmFormData* pFormData = (FmFormData*)pEntryData;
+ if( (::com::sun::star::form::XForm*)m_xForm.get() != (::com::sun::star::form::XForm*)pFormData->GetFormIface().get() )
+ return sal_False;
+
+ return FmEntryData::IsEqualWithoutChilds( pFormData );
+}
+
+
+//========================================================================
+// class FmControlData
+//========================================================================
+TYPEINIT1( FmControlData, FmEntryData );
+DBG_NAME(FmControlData);
+//------------------------------------------------------------------------
+FmControlData::FmControlData( ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent, const ImageList& ilNavigatorImages, FmFormData* pParent )
+ :FmEntryData( pParent )
+ ,m_xFormComponent( xFormComponent )
+{
+ DBG_CTOR(FmControlData,NULL);
+ //////////////////////////////////////////////////////////////////////
+ // Images setzen
+ aCollapsedImage = GetImage(ilNavigatorImages);
+ aExpandedImage = GetImage(ilNavigatorImages);
+
+ //////////////////////////////////////////////////////////////////////
+ // Titel setzen
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xFormComponent, ::com::sun::star::uno::UNO_QUERY);
+ if( xSet.is() )
+ {
+#if DBG_UTIL
+ ::rtl::OUString aEntryName = ::utl::getString(xSet->getPropertyValue( FM_PROP_NAME ));
+#endif
+ SetText( ::utl::getString(xSet->getPropertyValue( FM_PROP_NAME )));
+ }
+}
+
+//------------------------------------------------------------------------
+FmControlData::~FmControlData()
+{
+ DBG_DTOR(FmControlData,NULL);
+}
+
+//------------------------------------------------------------------------
+FmControlData::FmControlData( const FmControlData& rControlData )
+ :FmEntryData( rControlData )
+{
+ DBG_CTOR(FmControlData,NULL);
+ m_xFormComponent = rControlData.GetFormComponent();
+}
+
+//------------------------------------------------------------------------
+FmEntryData* FmControlData::Clone()
+{
+ return new FmControlData( *this );
+}
+
+//------------------------------------------------------------------------
+Image FmControlData::GetImage(const ImageList& ilNavigatorImages) const
+{
+ //////////////////////////////////////////////////////////////////////
+ // Default-Image
+ Image aImage = ilNavigatorImages.GetImage( RID_SVXIMG_CONTROL );
+
+ if (!m_xFormComponent.is()) return aImage;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo > xInfo(m_xFormComponent, ::com::sun::star::uno::UNO_QUERY);
+ if (!xInfo.is())
+ return aImage;
+
+ //////////////////////////////////////////////////////////////////////
+ // Spezielle Control-Images
+ sal_Int16 nObjectType = getControlTypeByObject(xInfo);
+ switch (nObjectType)
+ {
+ case OBJ_FM_BUTTON:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_BUTTON );
+ break;
+
+ case OBJ_FM_FIXEDTEXT:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_FIXEDTEXT );
+ break;
+
+ case OBJ_FM_EDIT:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_EDIT );
+ break;
+
+ case OBJ_FM_RADIOBUTTON:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_RADIOBUTTON );
+ break;
+
+ case OBJ_FM_CHECKBOX:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_CHECKBOX );
+ break;
+
+ case OBJ_FM_LISTBOX:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_LISTBOX );
+ break;
+
+ case OBJ_FM_COMBOBOX:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_COMBOBOX );
+ break;
+
+ case OBJ_FM_GROUPBOX:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_GROUPBOX );
+ break;
+
+ case OBJ_FM_IMAGEBUTTON:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_IMAGEBUTTON );
+ break;
+
+ case OBJ_FM_FILECONTROL:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_FILECONTROL );
+ break;
+
+ case OBJ_FM_HIDDEN:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_HIDDEN );
+ break;
+
+ case OBJ_FM_DATEFIELD:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_DATEFIELD );
+ break;
+
+ case OBJ_FM_TIMEFIELD:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_TIMEFIELD );
+ break;
+
+ case OBJ_FM_NUMERICFIELD:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_NUMERICFIELD );
+ break;
+
+ case OBJ_FM_CURRENCYFIELD:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_CURRENCYFIELD );
+ break;
+
+ case OBJ_FM_PATTERNFIELD:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_PATTERNFIELD );
+ break;
+
+ case OBJ_FM_IMAGECONTROL:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_IMAGECONTROL );
+ break;
+
+ case OBJ_FM_FORMATTEDFIELD:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_FORMATTEDFIELD );
+ break;
+
+ case OBJ_FM_GRID:
+ aImage = ilNavigatorImages.GetImage( RID_SVXIMG_GRID );
+ break;
+ }
+
+ return aImage;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmControlData::IsEqualWithoutChilds( FmEntryData* pEntryData )
+{
+ if(this == pEntryData)
+ return sal_True;
+
+ if( !pEntryData->ISA(FmControlData) )
+ return sal_False;
+ FmControlData* pControlData = (FmControlData*)pEntryData;
+
+ if( (::com::sun::star::form::XFormComponent*)m_xFormComponent.get() != (::com::sun::star::form::XFormComponent*)pControlData->GetFormComponent().get() )
+ return sal_False;
+
+ return FmEntryData::IsEqualWithoutChilds( pControlData );
+}
+
+//------------------------------------------------------------------------
+void FmControlData::ModelReplaced(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xNew, const ImageList& ilNavigatorImages)
+{
+ m_xFormComponent = xNew;
+ // Images neu setzen
+ aCollapsedImage = aExpandedImage = GetImage(ilNavigatorImages);
+}
+
+//========================================================================
+// class FmXExplPropertyChangeList
+//========================================================================
+
+//------------------------------------------------------------------------
+FmXExplPropertyChangeList::FmXExplPropertyChangeList(FmExplorerModel* _pModel)
+ :m_pExplModel(_pModel)
+ ,m_bCanUndo(sal_True)
+ ,m_nLocks(0)
+{
+}
+
+// ::com::sun::star::beans::XPropertyChangeListener
+//------------------------------------------------------------------------
+void SAL_CALL FmXExplPropertyChangeList::disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+//------------------------------------------------------------------------
+void SAL_CALL FmXExplPropertyChangeList::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt)
+{
+ if( !m_pExplModel ) return;
+ if( evt.PropertyName != FM_PROP_NAME ) return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent(evt.Source, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(evt.Source, ::com::sun::star::uno::UNO_QUERY);
+
+ FmEntryData* pEntryData;
+ if( xForm.is() )
+ pEntryData = m_pExplModel->FindData( xForm, m_pExplModel->GetRootList() );
+ else if( xFormComponent.is() )
+ pEntryData = m_pExplModel->FindData( xFormComponent, m_pExplModel->GetRootList() );
+
+ if( pEntryData )
+ {
+ ::rtl::OUString aNewName = ::utl::getString(evt.NewValue);
+ pEntryData->SetText( aNewName );
+ FmExplNameChangedHint aNameChangedHint( pEntryData, aNewName );
+ m_pExplModel->Broadcast( aNameChangedHint );
+ }
+}
+
+// ::com::sun::star::container::XContainerListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXExplPropertyChangeList::elementInserted(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ if (IsLocked() || !m_pExplModel)
+ return;
+
+ // keine Undoaction einfuegen
+ m_bCanUndo = sal_False;
+
+ Insert(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)evt.Element.getValue(), ::utl::getINT32(evt.Accessor));
+
+ m_bCanUndo = sal_True;
+}
+
+//------------------------------------------------------------------------------
+void FmXExplPropertyChangeList::Insert(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xIface, sal_Int32 nIndex)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(xIface, ::com::sun::star::uno::UNO_QUERY);
+ if (xForm.is())
+ {
+ m_pExplModel->InsertForm(xForm, sal_uInt32(nIndex));
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer(xForm, ::com::sun::star::uno::UNO_QUERY);
+ for (sal_Int32 i = 0; i < xContainer->getCount(); i++)
+ Insert(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xContainer->getByIndex(i).getValue(), i);
+ }
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComp(xIface, ::com::sun::star::uno::UNO_QUERY);
+ if (xFormComp.is())
+ m_pExplModel->InsertFormComponent(xFormComp, sal_uInt32(nIndex));
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXExplPropertyChangeList::elementReplaced(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ if (IsLocked() || !m_pExplModel)
+ return;
+
+ m_bCanUndo = sal_False;
+
+ // EntryData loeschen
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xReplaced(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)evt.ReplacedElement.getValue(), ::com::sun::star::uno::UNO_QUERY);
+ FmEntryData* pEntryData = m_pExplModel->FindData(xReplaced, m_pExplModel->GetRootList(), sal_True);
+ if (pEntryData)
+ {
+ if (pEntryData->ISA(FmControlData))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xComp(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)evt.Element.getValue(), ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xComp.is(), "FmXExplPropertyChangeList::elementReplaced : invalid argument !");
+ // an einer FmControlData sollte eine ::com::sun::star::form::XFormComponent haengen
+ m_pExplModel->ReplaceFormComponent(xReplaced, xComp);
+ }
+ else if (pEntryData->ISA(FmFormData))
+ {
+ DBG_ERROR("replacing forms not implemented yet !");
+ }
+ }
+
+ m_bCanUndo = sal_True;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXExplPropertyChangeList::elementRemoved(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ if (IsLocked() || !m_pExplModel)
+ return;
+
+ m_bCanUndo = sal_False;
+
+ //////////////////////////////////////////////////////////
+ // EntryData loeschen
+ FmEntryData* pEntryData = m_pExplModel->FindData(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)evt.Element.getValue(), m_pExplModel->GetRootList(), sal_True);
+ if (pEntryData)
+ m_pExplModel->Remove(pEntryData);
+
+ m_bCanUndo = sal_True;
+}
+
+
+//========================================================================
+// class FmExplorerModel
+//========================================================================
+
+//------------------------------------------------------------------------
+FmExplorerModel::FmExplorerModel(const ImageList& ilNavigatorImages)
+ :m_pFormShell(NULL)
+ ,m_pFormPage(NULL)
+ ,m_pFormModel(NULL)
+ ,m_ilNavigatorImages(ilNavigatorImages)
+{
+ m_pPropChangeList = new FmXExplPropertyChangeList(this);
+ m_pPropChangeList->acquire();
+ m_pRootList = new FmEntryDataList();
+}
+
+//------------------------------------------------------------------------
+FmExplorerModel::~FmExplorerModel()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Als Listener abmelden
+ if( m_pFormShell)
+ {
+ FmFormModel* pFormModel = m_pFormShell->GetFormModel();
+ if( pFormModel && IsListening(*pFormModel))
+ EndListening( *pFormModel );
+
+ if (IsListening(*m_pFormShell))
+ EndListening(*m_pFormShell);
+ }
+
+ Clear();
+ delete m_pRootList;
+ m_pPropChangeList->ReleaseModel();
+ m_pPropChangeList->release();
+}
+
+
+//------------------------------------------------------------------------
+void FmExplorerModel::SetModified( sal_Bool bMod )
+{
+ if( !m_pFormShell ) return;
+ SfxObjectShell* pObjShell = m_pFormShell->GetFormModel()->GetObjectShell();
+ if( !pObjShell ) return;
+ pObjShell->SetModified( bMod );
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::Clear()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xForms( GetForms());
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xContainer(xForms, ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ xContainer->removeContainerListener((::com::sun::star::container::XContainerListener*)m_pPropChangeList);
+
+ //////////////////////////////////////////////////////////////////////
+ // RootList loeschen
+ FmEntryData* pChildData;
+ FmEntryDataList* pRootList = GetRootList();
+
+ for( sal_uInt32 i=pRootList->Count(); i>0; i-- )
+ {
+ pChildData = pRootList->GetObject(i-1);
+ pRootList->Remove( pChildData );
+ delete pChildData;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // UI benachrichtigen
+ FmExplClearedHint aClearedHint;
+ Broadcast( aClearedHint );
+}
+
+//------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > FmExplorerModel::GetForms() const
+{
+ if( !m_pFormShell || !m_pFormShell->GetCurPage())
+ return NULL;
+ else
+ return m_pFormShell->GetCurPage()->GetForms();
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::Insert(FmEntryData* pEntry, sal_uInt32 nRelPos, sal_Bool bAlterModel)
+{
+ if (IsListening(*m_pFormModel))
+ EndListening(*m_pFormModel);
+
+ m_pPropChangeList->Lock();
+ FmFormData* pFolder = (FmFormData*) pEntry->GetParent();
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xElement (pEntry->GetElement(), ::com::sun::star::uno::UNO_QUERY);
+ if (bAlterModel)
+ {
+ XubString aStr;
+ if (pEntry->ISA(FmFormData))
+ aStr = SVX_RES(RID_STR_FORM);
+ else
+ aStr = SVX_RES(RID_STR_CONTROL);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer;
+ if (pFolder)
+ xContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (pFolder->GetFormIface(), ::com::sun::star::uno::UNO_QUERY);
+ else
+ xContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (GetForms(), ::com::sun::star::uno::UNO_QUERY);
+
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
+ aUndoStr.SearchAndReplace('#', aStr);
+ m_pFormModel->BegUndo(aUndoStr);
+
+ if (nRelPos >= xContainer->getCount())
+ nRelPos = (sal_Int32)xContainer->getCount();
+
+ // UndoAction
+ if (m_pPropChangeList->CanUndo())
+ m_pFormModel->AddUndo(new FmUndoContainerAction(*m_pFormModel,
+ FmUndoContainerAction::Inserted,
+ xContainer,
+ xElement,
+ nRelPos));
+
+ // das Element muss den Typ haben, den der ::com::sun::star::sdbcx::Container erwartet
+ if (xContainer->getElementType() ==
+ ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>*)0))
+
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xElementAsForm(xElement, ::com::sun::star::uno::UNO_QUERY);
+ xContainer->insertByIndex(nRelPos, ::com::sun::star::uno::makeAny(xElementAsForm));
+ }
+ else if (xContainer->getElementType() ==
+ ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>*)0))
+
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xElementAsComponent(xElement, ::com::sun::star::uno::UNO_QUERY);
+ xContainer->insertByIndex(nRelPos, ::com::sun::star::uno::makeAny(xElementAsComponent));
+ }
+ else
+ {
+ DBG_ERROR("FmExplorerModel::Insert : the parent container needs an elementtype I don't know !");
+ }
+
+ m_pFormModel->EndUndo();
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Als PropertyChangeListener anmelden
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(xElement, ::com::sun::star::uno::UNO_QUERY);
+ if( xSet.is() )
+ xSet->addPropertyChangeListener( FM_PROP_NAME, m_pPropChangeList );
+
+ //////////////////////////////////////////////////////////////////////
+ // Daten aus Model entfernen
+ if (pEntry->ISA(FmFormData))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xContainer(xElement, ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ xContainer->addContainerListener((::com::sun::star::container::XContainerListener*)m_pPropChangeList);
+ }
+
+ if (pFolder)
+ pFolder->GetChildList()->Insert( pEntry, nRelPos );
+ else
+ GetRootList()->Insert( pEntry, nRelPos );
+
+ //////////////////////////////////////////////////////////////////////
+ // UI benachrichtigen
+ FmExplInsertedHint aInsertedHint( pEntry, nRelPos );
+ Broadcast( aInsertedHint );
+
+ m_pPropChangeList->UnLock();
+ if (IsListening(*m_pFormModel))
+ StartListening(*m_pFormModel);
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::Remove(FmEntryData* pEntry, sal_Bool bAlterModel)
+{
+ //////////////////////////////////////////////////////////////////////
+ // ::com::sun::star::form::Form und Parent holen
+ if (!pEntry || !m_pFormModel)
+ return;
+
+ if (IsListening(*m_pFormModel))
+ EndListening(*m_pFormModel);
+
+ m_pPropChangeList->Lock();
+ FmFormData* pFolder = (FmFormData*) pEntry->GetParent();
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xElement (pEntry->GetElement(), ::com::sun::star::uno::UNO_QUERY);
+ if (bAlterModel)
+ {
+ XubString aStr;
+ if (pEntry->ISA(FmFormData))
+ aStr = SVX_RES(RID_STR_FORM);
+ else
+ aStr = SVX_RES(RID_STR_CONTROL);
+
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_REMOVE));
+ aUndoStr.SearchAndReplace('#', aStr);
+ m_pFormModel->BegUndo(aUndoStr);
+ }
+
+ // jetzt die eigentliche Entfernung der Daten aus dem Model
+ if (pEntry->ISA(FmFormData))
+ RemoveForm((FmFormData*)pEntry);
+ else
+ RemoveFormComponent((FmControlData*)pEntry);
+
+
+ if (bAlterModel)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer(xElement->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ // aus dem ::com::sun::star::sdbcx::Container entfernen
+ sal_Int32 nContainerIndex = getElementPos(::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > (xContainer, ::com::sun::star::uno::UNO_QUERY), xElement);
+ // UndoAction
+ if (nContainerIndex >= 0)
+ {
+ if (m_pPropChangeList->CanUndo())
+ m_pFormModel->AddUndo(new FmUndoContainerAction(*m_pFormModel,
+ FmUndoContainerAction::Removed,
+ xContainer,
+ xElement, nContainerIndex ));
+ xContainer->removeByIndex(nContainerIndex );
+ }
+ m_pFormModel->EndUndo();
+ }
+
+ // beim Vater austragen
+ if (pFolder)
+ pFolder->GetChildList()->Remove(pEntry);
+ else
+ {
+ GetRootList()->Remove(pEntry);
+ //////////////////////////////////////////////////////////////////////
+ // Wenn keine ::com::sun::star::form::Form mehr in der Root, an der Shell CurForm zuruecksetzen
+ if (!GetRootList()->Count())
+ m_pFormShell->GetImpl()->setCurForm( ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > () );
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // UI benachrichtigen
+ FmExplRemovedHint aRemovedHint( pEntry );
+ Broadcast( aRemovedHint );
+
+ // Eintrag loeschen
+ delete pEntry;
+
+ m_pPropChangeList->UnLock();
+ StartListening(*m_pFormModel);
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::RemoveForm(FmFormData* pFormData)
+{
+ //////////////////////////////////////////////////////////////////////
+ // ::com::sun::star::form::Form und Parent holen
+ if (!pFormData || !m_pFormModel)
+ return;
+
+ FmEntryDataList* pChildList = pFormData->GetChildList();
+ sal_uInt32 nCount = pChildList->Count();
+ for (sal_uInt32 i = nCount; i > 0; i--)
+ {
+ FmEntryData* pEntryData = pChildList->GetObject(i - 1);
+
+ //////////////////////////////////////////////////////////////////////
+ // Child ist ::com::sun::star::form::Form -> rekursiver Aufruf
+ if( pEntryData->ISA(FmFormData) )
+ RemoveForm( (FmFormData*)pEntryData);
+ else if( pEntryData->ISA(FmControlData) )
+ RemoveFormComponent((FmControlData*) pEntryData);
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Als PropertyChangeListener abmelden
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(pFormData->GetFormIface(), ::com::sun::star::uno::UNO_QUERY);
+ if( xSet.is() )
+ xSet->removePropertyChangeListener( FM_PROP_NAME, m_pPropChangeList );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xContainer(xSet, ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ xContainer->removeContainerListener((::com::sun::star::container::XContainerListener*)m_pPropChangeList);
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::RemoveFormComponent(FmControlData* pControlData)
+{
+ //////////////////////////////////////////////////////////////////////
+ // Control und Parent holen
+ if (!pControlData)
+ return;
+
+ //////////////////////////////////////////////////////////////////////
+ // Als PropertyChangeListener abmelden
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(pControlData->GetElement(), ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ xSet->removePropertyChangeListener( FM_PROP_NAME, m_pPropChangeList);
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::ClearBranch( FmFormData* pParentData )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Alle Eintraege dieses Zweiges loeschen
+ FmEntryDataList* pChildList = pParentData->GetChildList();
+ FmEntryData* pChildData;
+
+ for( sal_uInt32 i=pChildList->Count(); i>0; i-- )
+ {
+ pChildData = pChildList->GetObject(i-1);
+ if( pChildData->ISA(FmFormData) )
+ ClearBranch( (FmFormData*)pChildData );
+
+ pChildList->Remove( pChildData );
+ }
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::FillBranch( FmFormData* pFormData )
+{
+ //////////////////////////////////////////////////////////////
+ // ::com::sun::star::form::Forms aus der Root einfuegen
+ if( pFormData == NULL )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xForms(GetForms(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xForms.is()) return;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xSubForm;
+ FmFormData* pSubFormData;
+ for (sal_uInt32 i=0; i<xForms->getCount(); ++i)
+ {
+ DBG_ASSERT(xForms->getByIndex(i).getValueType() ==
+ ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>*)0),
+
+ "FmExplorerModel::FillBranch : the root container should supply only elements of type XForm");
+ xSubForm = *(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > *)xForms->getByIndex(i).getValue();
+ pSubFormData = new FmFormData( xSubForm, m_ilNavigatorImages, pFormData );
+ Insert( pSubFormData, LIST_APPEND );
+
+ //////////////////////////////////////////////////////////////
+ // Neuer Branch, wenn SubForm wiederum Subforms enthaelt
+ FillBranch( pSubFormData );
+ }
+ }
+
+ //////////////////////////////////////////////////////////////
+ // Componenten einfuegen
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xComponents( GetFormComponents(pFormData));
+ if( !xComponents.is() ) return;
+
+ ::rtl::OUString aControlName;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInterface;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet;
+ FmControlData* pNewControlData;
+ FmFormData* pSubFormData;
+
+ for (sal_Int32 j=0; j<xComponents->getCount(); ++j)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xCurrentComponent(*(::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > *)xComponents->getByIndex(j).getValue());
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xSubForm(xCurrentComponent, ::com::sun::star::uno::UNO_QUERY);
+
+ if (xSubForm.is())
+ { // die aktuelle Component ist eine ::com::sun::star::form::Form
+ pSubFormData = new FmFormData(xSubForm, m_ilNavigatorImages, pFormData);
+ Insert(pSubFormData, LIST_APPEND);
+
+ //////////////////////////////////////////////////////////////
+ // Neuer Branch, wenn SubForm wiederum Subforms enthaelt
+ FillBranch(pSubFormData);
+ }
+ else
+ {
+ pNewControlData = new FmControlData(xCurrentComponent, m_ilNavigatorImages, pFormData);
+ Insert(pNewControlData, LIST_APPEND);
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::InsertForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > & xForm, sal_uInt32 nRelPos)
+{
+ FmFormData* pFormData = (FmFormData*)FindData( xForm, GetRootList() );
+ if (pFormData)
+ return;
+
+ //////////////////////////////////////////////////////////
+ // ParentData setzen
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIFace( xForm->getParent());
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xParentForm(xIFace, ::com::sun::star::uno::UNO_QUERY);
+ FmFormData* pParentData = NULL;
+ if (xParentForm.is())
+ pParentData = (FmFormData*)FindData( xParentForm, GetRootList() );
+
+ pFormData = new FmFormData( xForm, m_ilNavigatorImages, pParentData );
+ Insert( pFormData, nRelPos );
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::InsertFormComponent(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xComp, sal_uInt32 nRelPos)
+{
+ //////////////////////////////////////////////////////////
+ // ParentData setzen
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIFace( xComp->getParent());
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(xIFace, ::com::sun::star::uno::UNO_QUERY);
+ if (!xForm.is())
+ return;
+
+ FmFormData* pParentData = (FmFormData*)FindData( xForm, GetRootList() );
+ if( !pParentData )
+ {
+ pParentData = new FmFormData( xForm, m_ilNavigatorImages, NULL );
+ Insert( pParentData, LIST_APPEND );
+ }
+
+ if (!FindData(xComp, pParentData->GetChildList(),sal_False))
+ {
+ //////////////////////////////////////////////////////////
+ // Neue EntryData setzen
+ FmEntryData* pNewEntryData = new FmControlData( xComp, m_ilNavigatorImages, pParentData );
+
+ //////////////////////////////////////////////////////////
+ // Neue EntryData einfuegen
+ Insert( pNewEntryData, nRelPos );
+ }
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::ReplaceFormComponent(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xOld, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xNew)
+{
+ FmEntryData* pData = FindData(xOld, GetRootList(), sal_True);
+ DBG_ASSERT(pData && pData->ISA(FmControlData), "FmExplorerModel::ReplaceFormComponent : invalid argument !");
+ ((FmControlData*)pData)->ModelReplaced(xNew, m_ilNavigatorImages);
+
+ FmExplModelReplacedHint aReplacedHint( pData );
+ Broadcast( aReplacedHint );
+}
+
+//------------------------------------------------------------------------
+FmEntryData* FmExplorerModel::FindData(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xElement, FmEntryDataList* pDataList, sal_Bool bRecurs)
+{
+ for (sal_uInt16 i=0; i < pDataList->Count(); i++)
+ {
+ FmEntryData* pEntryData = pDataList->GetObject(i);
+ if (pEntryData->GetElement() == xElement)
+ // zu beachten : das == fuer ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > macht einen 'tiefen' Vergleich, liefert also sal_True, wenn die beiden Refs das
+ // selbe Objekt bezeichnen, egal ob die auf die selben Interfaces zeigen
+ return pEntryData;
+ else if (bRecurs)
+ {
+ pEntryData = FindData( xElement, pEntryData->GetChildList() );
+ if (pEntryData)
+ return pEntryData;
+ }
+ }
+ return NULL;
+}
+
+//------------------------------------------------------------------------
+FmEntryData* FmExplorerModel::FindData( const ::rtl::OUString& rText, FmFormData* pParentData, sal_Bool bRecurs )
+{
+ FmEntryDataList* pDataList;
+ if( !pParentData )
+ pDataList = GetRootList();
+ else
+ pDataList = pParentData->GetChildList();
+
+ ::rtl::OUString aEntryText;
+ FmEntryData* pEntryData;
+ FmEntryData* pChildData;
+
+ for( sal_uInt16 i=0; i<pDataList->Count(); i++ )
+ {
+ pEntryData = pDataList->GetObject(i);
+ aEntryText = pEntryData->GetText();
+
+ if( aEntryText.equalsIgnoreCase(rText))
+ return pEntryData;
+
+ if( bRecurs && pEntryData->ISA(FmFormData) )
+ {
+ pChildData = FindData( rText, (FmFormData*)pEntryData );
+ if( pChildData )
+ return pChildData;
+ }
+ }
+
+ return NULL;
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ if( rHint.ISA(SdrHint) )
+ {
+ SdrHint* pSdrHint = (SdrHint*)&rHint;
+ switch( pSdrHint->GetKind() )
+ {
+ case HINT_OBJINSERTED:
+ InsertSdrObj(pSdrHint->GetObject());
+ break;
+ case HINT_OBJREMOVED:
+ RemoveSdrObj(pSdrHint->GetObject());
+ break;
+ }
+ }
+ // hat sich die shell verabschiedet?
+ else if ( rHint.ISA(SfxSimpleHint) && ((SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING)
+ Update((FmFormShell*)NULL);
+
+ // hat sich die Markierung der Controls veraendert ?
+ else if (rHint.ISA(FmExplViewMarksChanged))
+ {
+ FmExplViewMarksChanged* pvmcHint = (FmExplViewMarksChanged*)&rHint;
+ BroadcastMarkedObjects( pvmcHint->GetAffectedView()->GetMarkList() );
+ }
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::InsertSdrObj(const SdrObject* pObj)
+{
+ if (pObj->GetObjInventor() == FmFormInventor)
+ { //////////////////////////////////////////////////////////////////////
+ // Ist dieses Objekt ein ::com::sun::star::form::XFormComponent?
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent(((SdrUnoObj*)pObj)->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xFormComponent.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer(xFormComponent->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ {
+ sal_Int32 nPos = getElementPos(::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > (xContainer, ::com::sun::star::uno::UNO_QUERY), xFormComponent);
+ InsertFormComponent(xFormComponent, nPos);
+ }
+ }
+ }
+ else if (pObj->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pObj->GetSubList());
+ while (aIter.IsMore())
+ InsertSdrObj(aIter.Next());
+ }
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::RemoveSdrObj(const SdrObject* pObj)
+{
+ if (pObj->GetObjInventor() == FmFormInventor)
+ { //////////////////////////////////////////////////////////////////////
+ // Ist dieses Objekt ein ::com::sun::star::form::XFormComponent?
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent(((SdrUnoObj*)pObj)->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xFormComponent.is())
+ {
+ FmEntryData* pEntryData = FindData(xFormComponent, GetRootList(), sal_True);
+ if (pEntryData)
+ Remove(pEntryData);
+ }
+ }
+ else if (pObj->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pObj->GetSubList());
+ while (aIter.IsMore())
+ RemoveSdrObj(aIter.Next());
+ }
+}
+
+sal_Bool FmExplorerModel::InsertFormComponent(FmExplRequestSelectHint& rHint, SdrObject* pObject)
+{
+ if ( pObject->ISA(SdrObjGroup) )
+ { // rekursiv absteigen
+ const SdrObjList *pChilds = ((SdrObjGroup*)pObject)->GetSubList();
+ for ( sal_uInt16 i=0; i<pChilds->GetObjCount(); ++i )
+ {
+ SdrObject* pCurrent = pChilds->GetObj(i);
+ if (!InsertFormComponent(rHint, pCurrent))
+ return sal_False;
+ }
+ } else
+ if (pObject->IsUnoObj())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xControlModel( ((SdrUnoObj*)pObject)->GetUnoControlModel());
+ // Ist dieses Objekt ein ::com::sun::star::form::XFormComponent?
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormViewControl(xControlModel, ::com::sun::star::uno::UNO_QUERY);
+ if (xFormViewControl.is())
+ { // es ist ein ::com::sun::star::form::Form-Control -> selektieren lassen
+ FmEntryData* pControlData = FindData( xFormViewControl, GetRootList() );
+ if (pControlData)
+ rHint.AddItem( pControlData );
+ } else
+ { // es ist kein ::com::sun::star::form::Form-Control -> im Baum ueberhaupt nix selektieren lassen
+ return sal_False;
+ }
+ } else
+ return sal_False;
+
+ return sal_True;
+}
+
+void FmExplorerModel::BroadcastMarkedObjects(const SdrMarkList& mlMarked)
+{
+ // gehen wir durch alle markierten Objekte und suchen wir die raus, mit denen ich was anfangen kann
+ FmExplRequestSelectHint rshRequestSelection;
+ sal_Bool bIsMixedSelection = sal_False;
+
+ for (int i=0; (i<mlMarked.GetMarkCount()) && !bIsMixedSelection; i++)
+ {
+ SdrObject* pobjCurrent = mlMarked.GetMark(i)->GetObj();
+ bIsMixedSelection |= !InsertFormComponent(rshRequestSelection, pobjCurrent);
+ // bei einem Nicht-::com::sun::star::form::Form-Control liefert InsertFormComponent sal_False !
+ }
+
+ rshRequestSelection.SetMixedSelection(bIsMixedSelection);
+ if (bIsMixedSelection)
+ rshRequestSelection.ClearItems();
+
+ Broadcast(rshRequestSelection);
+ // eine leere Liste interpretiert der FmExplorer so, dass er seine Selektion komplett rausnimmt
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::Update( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & xForms )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Model von der Root aufwaerts neu fuellen
+ Clear();
+ if (xForms.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xFormContainer(xForms, ::com::sun::star::uno::UNO_QUERY);
+ if (xFormContainer.is())
+ xFormContainer->addContainerListener((::com::sun::star::container::XContainerListener*)m_pPropChangeList);
+
+ FillBranch(NULL);
+
+ // jetzt in meinem Tree genau die das in meiner ::com::sun::star::sdbcx::View markierte Control selektieren
+ // (bzw alle solchen), falls es eines gibt ...
+ if(!m_pFormShell) return; // keine Shell -> wech
+
+ FmFormView* pFormView = m_pFormShell->GetFormView();
+ DBG_ASSERT(pFormView != NULL, "FmExplorerModel::Update : keine FormView");
+ BroadcastMarkedObjects(pFormView->GetMarkList());
+ }
+}
+
+//------------------------------------------------------------------------
+void FmExplorerModel::Update( FmFormShell* pShell )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Wenn Shell sich nicht veraendert hat, nichts machen
+ FmFormPage* pNewPage = pShell ? pShell->GetCurPage() : NULL;
+ if ((pShell == m_pFormShell) && (m_pFormPage == pNewPage))
+ return;
+
+ //////////////////////////////////////////////////////////////////////
+ // Als Listener abmelden
+ if( m_pFormShell )
+ {
+ if (m_pFormModel)
+ EndListening( *m_pFormModel );
+ m_pFormModel = NULL;
+ EndListening( *m_pFormShell );
+ Clear();
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Vollupdate
+ m_pFormShell = pShell;
+ if (m_pFormShell)
+ {
+ m_pFormPage = pNewPage;
+ Update(m_pFormPage->GetForms());
+ } else
+ m_pFormPage = NULL;
+
+ //////////////////////////////////////////////////////////////////////
+ // Als Listener neu anmelden
+ if( m_pFormShell )
+ {
+ StartListening( *m_pFormShell );
+ m_pFormModel = m_pFormShell->GetFormModel();
+ if( m_pFormModel )
+ StartListening( *m_pFormModel );
+ }
+}
+
+//------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > FmExplorerModel::GetFormComponents( FmFormData* pFormData )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Von der ::com::sun::star::form::Form ::com::sun::star::frame::Components holen
+ if (pFormData)
+ return ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (pFormData->GetFormIface(), ::com::sun::star::uno::UNO_QUERY);
+
+ return ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > ();
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorerModel::CheckEntry( FmEntryData* pEntryData )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Nur ::com::sun::star::form::Forms duerfen auf Doppeldeutigkeit untersucht werden
+ if( !pEntryData->ISA(FmFormData) ) return sal_True;
+
+ //////////////////////////////////////////////////////////////////////
+ // ChildListe des Parents holen
+ FmFormData* pParentData = (FmFormData*)pEntryData->GetParent();
+ FmEntryDataList* pChildList;
+ if( !pParentData )
+ pChildList = GetRootList();
+ else
+ pChildList = pParentData->GetChildList();
+
+ //////////////////////////////////////////////////////////////////////
+ // In ChildListe nach doppelten Namen suchen
+ ::rtl::OUString aChildText;
+ FmEntryData* pChildData;
+
+ for( sal_uInt16 i=0; i<pChildList->Count(); i++ )
+ {
+ pChildData = pChildList->GetObject(i);
+ aChildText = pChildData->GetText();
+
+ //////////////////////////////////////////////////////////////////////
+ // Gleichen Eintrag gefunden
+ if( aChildText.equalsIgnoreCase(pEntryData->GetText()) &&
+ (pEntryData!=pChildData) )
+ {
+ SvxDBMsgBox aErrorBox( GetpApp()->GetAppWindow(), SVX_RES(RID_ERR_CONTEXT_ADDFORM),
+ SVX_RES(RID_ERR_DUPLICATE_NAME), WB_OK | WB_DEF_OK, SvxDBMsgBox::Error );
+ aErrorBox.Execute();
+
+ return sal_False;
+ }
+ }
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorerModel::Rename( FmEntryData* pEntryData, const ::rtl::OUString& rNewText )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Wenn Name schon vorhanden, Fehlermeldung
+ pEntryData->SetText( rNewText );
+
+ //////////////////////////////////////////////////////////////////////
+ // PropertySet besorgen
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent;
+
+ if( pEntryData->ISA(FmFormData) )
+ {
+ FmFormData* pFormData = (FmFormData*)pEntryData;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm( pFormData->GetFormIface());
+ xFormComponent = ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > (xForm, ::com::sun::star::uno::UNO_QUERY);
+ }
+
+ if( pEntryData->ISA(FmControlData) )
+ {
+ FmControlData* pControlData = (FmControlData*)pEntryData;
+ xFormComponent = pControlData->GetFormComponent();
+ }
+
+ if( !xFormComponent.is() ) return sal_False;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(xFormComponent, ::com::sun::star::uno::UNO_QUERY);
+ if( !xSet.is() ) return sal_False;
+
+ //////////////////////////////////////////////////////////////////////
+ // Namen setzen
+ xSet->setPropertyValue( FM_PROP_NAME, ::com::sun::star::uno::makeAny(rNewText) );
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorerModel::IsNameAlreadyDefined( const ::rtl::OUString& rName, FmFormData* pParentData )
+{
+ //////////////////////////////////////////////////////////////////////
+ // ::com::sun::star::form::Form in der Root
+ if( !pParentData )
+ {
+ if (GetForms()->hasByName(rName))
+ return sal_True;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Restliche ::com::sun::star::frame::Components
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xFormComponents(GetFormComponents(pParentData), ::com::sun::star::uno::UNO_QUERY);
+ if (xFormComponents.is() && xFormComponents->hasByName(rName))
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+//------------------------------------------------------------------------
+SdrObject* FmExplorerModel::GetSdrObj( FmControlData* pControlData )
+{
+ if (!pControlData || !m_pFormShell)
+ return NULL;
+
+ //////////////////////////////////////////////////////////////////////
+ // In der Page das entsprechende SdrObj finden und selektieren
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent( pControlData->GetFormComponent());
+ if (!xFormComponent.is())
+ return NULL;
+
+ FmFormView* pFormView = m_pFormShell->GetFormView();
+ SdrPageView* pPageView = pFormView->GetPageViewPvNum(0);
+ SdrPage* pPage = pPageView->GetPage();
+
+ SdrObjListIter aIter( *pPage );
+ return Search(aIter, xFormComponent);
+}
+
+//------------------------------------------------------------------
+SdrObject* FmExplorerModel::Search(SdrObjListIter& rIter, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xComp)
+{
+ while (rIter.IsMore())
+ {
+ SdrObject* pObj = rIter.Next();
+ //////////////////////////////////////////////////////////////////////
+ // Es interessieren nur Uno-Objekte
+ if (pObj->GetObjInventor() == FmFormInventor)
+ { //////////////////////////////////////////////////////////////////////
+ // Ist dieses Objekt ein ::com::sun::star::form::XFormComponent?
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormViewControl(((SdrUnoObj*)pObj)->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xFormViewControl == xComp)
+ return pObj;
+ }
+ else if (pObj->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pObj->GetSubList());
+ pObj = Search(aIter, xComp);
+ if (pObj)
+ return pObj;
+ }
+ }
+ return NULL;
+}
+
+//========================================================================
+// class FmExplorer
+//========================================================================
+
+//------------------------------------------------------------------------
+FmExplorer::FmExplorer( Window* pParent )
+ :SvTreeListBox( pParent, WB_HASBUTTONS|WB_HASLINES|WB_BORDER )
+ ,nEditEvent(0)
+ ,m_pEditEntry(NULL)
+ ,m_nSelectLock(0)
+ ,m_aTimerTriggered(-1,-1)
+ ,m_ilNavigatorImages( SVX_RES(RID_SVXIMGLIST_FMEXPL) )
+ ,m_bRootSelected(sal_False)
+ ,m_nFormsSelected(0)
+ ,m_nControlsSelected(0)
+ ,m_nHiddenControls(0)
+ ,m_bPrevSelectionMixed(sal_False)
+ ,m_bInitialUpdate(sal_True)
+ ,m_bMarkingObjects(sal_False)
+ ,m_sdiState(SDI_DIRTY)
+ ,m_bShellOrPageChanged(sal_False)
+ ,m_bDragDataDirty(sal_False)
+ ,m_pRootEntry(NULL)
+{
+ SetHelpId( HID_FORM_NAVIGATOR );
+
+ m_aRootImg = m_ilNavigatorImages.GetImage( RID_SVXIMG_FORMS );
+ Image m_aCollapsedNodeImg = m_ilNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE );
+ Image m_aExpandedNodeImg = m_ilNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE );
+ SetNodeBitmaps( m_aCollapsedNodeImg, m_aExpandedNodeImg );
+
+ EnableDrop();
+ SetDragDropMode(0xFFFF);
+ EnableInplaceEditing( sal_True );
+ SetSelectionMode(MULTIPLE_SELECTION);
+
+ m_pExplModel = new FmExplorerModel(m_ilNavigatorImages);
+ Clear();
+
+ StartListening( *m_pExplModel );
+
+ m_aDropActionTimer.SetTimeoutHdl(LINK(this, FmExplorer, OnDropActionTimer));
+
+ m_aSynchronizeTimer.SetTimeoutHdl(LINK(this, FmExplorer, OnSynchronizeTimer));
+ SetSelectHdl(LINK(this, FmExplorer, OnEntrySelDesel));
+ SetDeselectHdl(LINK(this, FmExplorer, OnEntrySelDesel));
+}
+
+//------------------------------------------------------------------------
+FmExplorer::~FmExplorer()
+{
+ if( nEditEvent )
+ Application::RemoveUserEvent( nEditEvent );
+
+ if (m_aSynchronizeTimer.IsActive())
+ m_aSynchronizeTimer.Stop();
+
+ DBG_ASSERT(GetExplModel() != NULL, "FmExplorer::~FmExplorer : unerwartet : kein ExplorerModel");
+ EndListening( *m_pExplModel );
+ Clear();
+ delete m_pExplModel;
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::Clear()
+{
+ m_pExplModel->Clear();
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::Update( FmFormShell* pFormShell )
+{
+ if (m_bInitialUpdate)
+ {
+ GrabFocus();
+ m_bInitialUpdate = sal_False;
+ }
+
+ FmFormShell* pOldShell = GetExplModel()->GetFormShell();
+ FmFormPage* pOldPage = GetExplModel()->GetFormPage();
+ FmFormPage* pNewPage = pFormShell ? pFormShell->GetCurPage() : NULL;
+
+ if ((pOldShell != pFormShell) || (pOldPage != pNewPage))
+ {
+ // neue Shell, waehrend ich gerade editiere ?
+ if (IsEditingActive())
+ CancelTextEditing();
+
+ m_bShellOrPageChanged = sal_True;
+ m_bDragDataDirty = sal_True; // sicherheitshalber, auch wenn ich gar nicht dragge
+ }
+ GetExplModel()->Update( pFormShell );
+
+ // wenn es eine ::com::sun::star::form::Form gibt, die Root expandieren
+ if (m_pRootEntry && !IsExpanded(m_pRootEntry))
+ Expand(m_pRootEntry);
+ // wenn es GENAU eine ::com::sun::star::form::Form gibt, auch diese expandieren
+ if (m_pRootEntry)
+ {
+ SvLBoxEntry* pFirst = FirstChild(m_pRootEntry);
+ if (pFirst && !NextSibling(pFirst))
+ Expand(pFirst);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmExplorer::Command( const CommandEvent& rEvt )
+{
+ sal_Bool bHandled = sal_False;
+ switch( rEvt.GetCommand() )
+ {
+ case COMMAND_STARTDRAG:
+ {
+ EndSelection();
+ Pointer aMovePtr( POINTER_COPYDATA ),
+ aCopyPtr( POINTER_COPYDATA ),
+ aLinkPtr( POINTER_LINKDATA );
+
+ SvLBoxEntry* pCurEntry = GetCurEntry();
+
+ // die Informationen fuer das QueryDrop und Drop
+ CollectSelectionData(SDI_ALL);
+ if (!m_arrCurrentSelection.Count())
+ // nothing to do
+ return;
+ vector<SvLBoxEntry*> lstToDrag;
+ int i;
+ for (i=0; i<m_arrCurrentSelection.Count(); i++)
+ lstToDrag.push_back(m_arrCurrentSelection[i]);
+ SvxFmExplCtrlExch* pCtrlExch = new SvxFmExplCtrlExch(lstToDrag, GetExplModel()->GetFormShell(), GetExplModel()->GetFormPage());
+ pCtrlExch->BuildPathFormat(this, m_pRootEntry);
+
+ // testen, ob es sich vielleicht ausschliesslich um hidden controls handelt (dann koennte ich pCtrlExch noch ein
+ // zusaetzliches Format geben)
+ sal_Bool bHasNonHidden = sal_False;
+ for (i=0; i<m_arrCurrentSelection.Count(); i++)
+ {
+ FmEntryData* pCurrent = (FmEntryData*)(m_arrCurrentSelection[i]->GetUserData());
+ if (IsHiddenControl(pCurrent))
+ continue;
+ bHasNonHidden = sal_True;
+ break;
+ }
+ if (!bHasNonHidden)
+ {
+ // eine entsprechende Sequenz aufbauen
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > seqIFaces(m_arrCurrentSelection.Count());
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > * pArray = seqIFaces.getArray();
+ for (i=0; i<m_arrCurrentSelection.Count(); i++)
+ pArray[i] = ((FmEntryData*)(m_arrCurrentSelection[i]->GetUserData()))->GetElement();
+
+ // und das neue Format
+ pCtrlExch->AddHiddenControlsFormat(seqIFaces);
+ }
+
+ // jetzt haben wir alle in der aktuelle Situation moeglichen Formate eingesammelt, es kann also losgehen ...
+ m_bShellOrPageChanged = m_bDragDataDirty = sal_False;
+ short nDragResult = pCtrlExch->ExecuteDrag( this, aMovePtr, aCopyPtr, aLinkPtr, DRAG_MOVEABLE | DRAG_COPYABLE );
+ if (nDragResult == DROP_CANCEL)
+ {
+ if (!m_bShellOrPageChanged) // wenn die Shell (oder Page) umgeschaltet wurde, ist pCurEntry nicht mehr gueltig
+ {
+ SetCursor(pCurEntry, sal_True);
+ MakeVisible(pCurEntry);
+ }
+ }
+ bHandled = sal_True;
+ break;
+ }
+
+ case COMMAND_CONTEXTMENU:
+ {
+ // die Stelle, an der geklickt wurde
+ Point ptWhere;
+ if (rEvt.IsMouseEvent())
+ {
+ ptWhere = rEvt.GetMousePosPixel();
+ SvLBoxEntry* ptClickedOn = GetEntry(ptWhere);
+ if (ptClickedOn == NULL)
+ break;
+ if ( !IsSelected(ptClickedOn) )
+ {
+ SelectAll(sal_False);
+ Select(ptClickedOn, sal_True);
+ SetCurEntry(ptClickedOn);
+ }
+ } else
+ {
+ if (m_arrCurrentSelection.Count() == 0) // kann nur bei Kontextmenue ueber Tastatur passieren
+ break;
+
+ SvLBoxEntry* pCurrent = GetCurEntry();
+ if (!pCurrent)
+ break;
+ ptWhere = GetEntryPos(pCurrent);
+ }
+
+ // meine Selektionsdaten auf den aktuellen Stand
+ CollectSelectionData(SDI_ALL);
+
+ // wenn mindestens ein Nicht-Root-Eintrag selektiert ist und die Root auch, dann nehme ich letztere aus der Selektion
+ // fix wieder raus
+ if ( (m_arrCurrentSelection.Count() > 1) && m_bRootSelected )
+ {
+ Select( m_pRootEntry, sal_False );
+ SetCursor( m_arrCurrentSelection.GetObject(0), sal_True);
+ }
+ sal_Bool bSingleSelection = (m_arrCurrentSelection.Count() == 1);
+
+
+ DBG_ASSERT( (m_arrCurrentSelection.Count() > 0) | m_bRootSelected, "keine Eintraege selektiert" );
+ // solte nicht passieren, da ich oben bei der IsSelected-Abfrage auf jeden Fall einen selektiert haette,
+ // wenn das vorher nicht der Fall gewesen waere
+
+
+ // das Menue zusammenbasteln
+ FmFormShell* pFormShell = GetExplModel()->GetFormShell();
+ FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : NULL;
+ if( pFormShell && pFormModel )
+ {
+ PopupMenu aContextMenu(SVX_RES(RID_FMEXPLORER_POPUPMENU));
+ PopupMenu* pSubMenuNew = aContextMenu.GetPopupMenu( SID_FM_NEW );
+
+ // das 'Neu'-Untermenue gibt es nur, wenn genau die Root oder genau ein Formular selektiert sind
+ aContextMenu.EnableItem( SID_FM_NEW, bSingleSelection && (m_nFormsSelected || m_bRootSelected) );
+
+ // 'Neu'\'Formular' unter genau den selben Bedingungen
+ pSubMenuNew->EnableItem( SID_FM_NEW_FORM, bSingleSelection && (m_nFormsSelected || m_bRootSelected) );
+ pSubMenuNew->SetItemImage(SID_FM_NEW_FORM, m_ilNavigatorImages.GetImage(RID_SVXIMG_FORM));
+ pSubMenuNew->SetItemImage(SID_FM_NEW_HIDDEN, m_ilNavigatorImages.GetImage(RID_SVXIMG_HIDDEN));
+
+ // 'Neu'\'verstecktes...', wenn genau ein Formular selektiert ist
+ pSubMenuNew->EnableItem( SID_FM_NEW_HIDDEN, bSingleSelection && m_nFormsSelected );
+
+ // 'Loeschen' : alles, was nicht Root ist, darf geloescht werden
+ aContextMenu.EnableItem( SID_FM_DELETE, !m_bRootSelected );
+
+ // der TabDialog, wenn es genau ein Formular ist ...
+ aContextMenu.EnableItem( SID_FM_TAB_DIALOG, bSingleSelection && m_nFormsSelected );
+
+ // Properties, wenn es nur Controls oder genau ein Formular ist
+ // (und der ProBrowser nicht sowieso schon offen ist)
+ if( pFormShell->GetImpl()->IsPropBrwOpen() )
+ aContextMenu.RemoveItem( aContextMenu.GetItemPos(SID_FM_SHOW_PROPERTY_BROWSER) );
+ else
+ aContextMenu.EnableItem( SID_FM_SHOW_PROPERTY_BROWSER,
+ (m_nControlsSelected && !m_nFormsSelected) || (!m_nControlsSelected && m_nFormsSelected) );
+
+ // Umbenennen gdw wenn ein Element und nicht die Root
+ aContextMenu.EnableItem( SID_FM_RENAME_OBJECT, bSingleSelection && !m_bRootSelected );
+
+ // der Reandonly-Eintrag ist nur auf der Root erlaubt
+ aContextMenu.EnableItem( SID_FM_OPEN_READONLY, m_bRootSelected );
+
+ // die ConvertTo-Slots sind enabled, wenn genau ein Control selektiert ist, der
+ // dem Control entsprechende Slot ist disabled
+ if (!m_bRootSelected && !m_nFormsSelected && (m_nControlsSelected == 1))
+ {
+ aContextMenu.SetPopupMenu( SID_FM_CHANGECONTROLTYPE, FmXFormShell::GetConversionMenu() );
+ FmControlData* pCurrent = (FmControlData*)(m_arrCurrentSelection[0]->GetUserData());
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCurrentProps(pCurrent->GetFormComponent(), ::com::sun::star::uno::UNO_QUERY);
+ pFormShell->GetImpl()->CheckControlConversionSlots(xCurrentProps, *aContextMenu.GetPopupMenu(SID_FM_CHANGECONTROLTYPE));
+ // die Shell filtert nach weiteren Bedingungen, zum Beispiel kein 'hidden control'
+ }
+ else
+ aContextMenu.EnableItem( SID_FM_CHANGECONTROLTYPE, sal_False );
+
+ // jetzt alles, was disabled wurde, wech
+ aContextMenu.RemoveDisabledEntries(sal_True, sal_True);
+ //////////////////////////////////////////////////////////
+ // OpenReadOnly setzen
+
+ sal_Bool bOpenDesignMode = pFormModel->GetOpenInDesignMode();
+ aContextMenu.CheckItem( SID_FM_OPEN_READONLY, bOpenDesignMode );
+
+ sal_uInt16 nSlotId = aContextMenu.Execute( this, ptWhere );
+ switch( nSlotId )
+ {
+ case SID_FM_NEW_FORM:
+ {
+ XubString aStr(SVX_RES(RID_STR_FORM));
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
+ aUndoStr.SearchAndReplace('#', aStr);
+
+ pFormModel->BegUndo(aUndoStr);
+ // der Slot war nur verfuegbar, wenn es genau einen selektierten Eintrag gibt und dieser die Root
+ // oder ein Formular ist
+ NewForm( m_arrCurrentSelection.GetObject(0) );
+ pFormModel->EndUndo();
+
+ } break;
+ case SID_FM_NEW_HIDDEN:
+ {
+ XubString aStr(SVX_RES(RID_STR_CONTROL));
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
+ aUndoStr.SearchAndReplace('#', aStr);
+
+ pFormModel->BegUndo(aUndoStr);
+ // dieser Slot war guletig bei (genau) einem selektierten Formular
+ rtl::OUString fControlName = FM_COMPONENT_HIDDEN;
+ NewControl( fControlName, m_arrCurrentSelection.GetObject(0) );
+ pFormModel->EndUndo();
+
+ } break;
+ case SID_FM_DELETE:
+ {
+ DeleteSelection();
+ }
+ break;
+ case SID_FM_TAB_DIALOG:
+ {
+ // dieser Slot galt bei genau einem selektierten Formular
+ SvLBoxEntry* pSelectedForm = m_arrCurrentSelection.GetObject(0);
+ DBG_ASSERT( IsFormEntry(pSelectedForm), "FmExplorer::Command: Dieser Eintrag muss ein FormEntry sein." );
+
+ FmFormData* pFormData = (FmFormData*)pSelectedForm->GetUserData();
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm( pFormData->GetFormIface());
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > xTabController(xForm, ::com::sun::star::uno::UNO_QUERY);
+ if( !xTabController.is() ) break;
+ FmTabOrderDlg aTabDlg( GetpApp()->GetAppWindow(), GetExplModel()->GetFormShell() );
+ aTabDlg.Execute();
+
+ }
+ break;
+ case SID_FM_SHOW_PROPERTY_BROWSER:
+ {
+ ShowSelectionProperties(sal_True);
+ }
+ break;
+ case SID_FM_RENAME_OBJECT:
+ {
+ // das war bei genau einem Nicht-Root-Eintrag erlaubt
+ EditEntry( m_arrCurrentSelection.GetObject(0) );
+ }
+ break;
+ case SID_FM_OPEN_READONLY:
+ {
+ if( pFormModel )
+ {
+ sal_Bool bOpenDesignMode = pFormModel->GetOpenInDesignMode();
+ pFormModel->SetOpenInDesignMode( !bOpenDesignMode );
+ SFX_BINDINGS().Invalidate(SID_FM_OPEN_READONLY);
+ }
+ }
+ break;
+ default:
+ if (pFormShell->GetImpl()->IsControlConversionSlot(nSlotId))
+ {
+ FmControlData* pCurrent = (FmControlData*)(m_arrCurrentSelection[0]->GetUserData());
+ if (pFormShell->GetImpl()->ExecuteControlConversionSlot(pCurrent->GetFormComponent(), nSlotId))
+ ShowSelectionProperties();
+ }
+ }
+ }
+ bHandled = sal_True;
+ } break;
+ }
+
+ if (!bHandled)
+ SvTreeListBox::Command( rEvt );
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorer::IsDeleteAllowed()
+{
+ //////////////////////////////////////////////////////////////////////
+ // Haben wir eine ::com::sun::star::form::Form...
+ SvLBoxEntry* pCurEntry = GetCurEntry();
+ sal_uInt32 nCurEntryPos = GetModel()->GetAbsPos( pCurEntry );
+
+ if( nCurEntryPos==0 ) // Root kann nicht geloescht werden
+ return sal_False;
+ else
+ return IsFormEntry(pCurEntry) || IsFormComponentEntry(pCurEntry);
+}
+
+//------------------------------------------------------------------------
+SvLBoxEntry* FmExplorer::FindEntry( FmEntryData* pEntryData )
+{
+ if( !pEntryData ) return NULL;
+ SvLBoxEntry* pCurEntry = First();
+ FmEntryData* pCurEntryData;
+ while( pCurEntry )
+ {
+ pCurEntryData = (FmEntryData*)pCurEntry->GetUserData();
+ if( pCurEntryData && pCurEntryData->IsEqualWithoutChilds(pEntryData) )
+ return pCurEntry;
+
+ pCurEntry = Next( pCurEntry );
+ }
+
+ return NULL;
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ if( rHint.ISA(FmExplRemovedHint) )
+ {
+ FmExplRemovedHint* pRemovedHint = (FmExplRemovedHint*)&rHint;
+ FmEntryData* pEntryData = pRemovedHint->GetEntryData();
+ Remove( pEntryData );
+ }
+
+ else if( rHint.ISA(FmExplInsertedHint) )
+ {
+ FmExplInsertedHint* pInsertedHint = (FmExplInsertedHint*)&rHint;
+ FmEntryData* pEntryData = pInsertedHint->GetEntryData();
+ sal_uInt32 nRelPos = pInsertedHint->GetRelPos();
+ Insert( pEntryData, nRelPos );
+ }
+
+ else if( rHint.ISA(FmExplModelReplacedHint) )
+ {
+ FmEntryData* pData = ((FmExplModelReplacedHint*)&rHint)->GetEntryData();
+ SvLBoxEntry* pEntry = FindEntry( pData );
+ if (pEntry)
+ { // das Image neu setzen
+ SetCollapsedEntryBmp(pEntry, pData->GetCollapsedImage());
+ SetExpandedEntryBmp(pEntry, pData->GetExpandedImage());
+ }
+ }
+
+ else if( rHint.ISA(FmExplNameChangedHint) )
+ {
+ FmExplNameChangedHint* pNameChangedHint = (FmExplNameChangedHint*)&rHint;
+ SvLBoxEntry* pEntry = FindEntry( pNameChangedHint->GetEntryData() );
+ SetEntryText( pEntry, pNameChangedHint->GetNewName() );
+ }
+
+ else if( rHint.ISA(FmExplClearedHint) )
+ {
+ SvTreeListBox::Clear();
+
+ //////////////////////////////////////////////////////////////////////
+ // Default-Eintrag "Formulare"
+ m_pRootEntry = InsertEntry( SVX_RES(RID_STR_FORMS), m_aRootImg, m_aRootImg,
+ NULL, sal_False, 0, NULL );
+ }
+ else if (!m_bMarkingObjects && rHint.ISA(FmExplRequestSelectHint))
+ { // wenn m_bMarkingObjects sal_True ist, markiere ich gerade selber Objekte, und da der ganze Mechanismus dahinter synchron ist,
+ // ist das genau der Hint, der durch mein Markieren ausgeloest wird, also kann ich ihn ignorieren
+ FmExplRequestSelectHint* pershHint = (FmExplRequestSelectHint*)&rHint;
+ FmEntryDataArray& arredToSelect = pershHint->GetItems();
+ SynchronizeSelection(arredToSelect);
+
+ if (pershHint->IsMixedSelection())
+ // in diesem Fall habe ich alles deselektiert, obwohl die ::com::sun::star::sdbcx::View u.U. eine gemischte Markierung hatte
+ // ich muss also im naechsten Select den Navigator an die ::com::sun::star::sdbcx::View anpassen
+ m_bPrevSelectionMixed = sal_True;
+ }
+}
+
+//------------------------------------------------------------------------
+SvLBoxEntry* FmExplorer::Insert( FmEntryData* pEntryData, sal_uInt32 nRelPos )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Aktuellen Eintrag einfuegen
+ SvLBoxEntry* pParentEntry = FindEntry( pEntryData->GetParent() );
+ SvLBoxEntry* pNewEntry;
+
+ if( !pParentEntry )
+ pNewEntry = InsertEntry( pEntryData->GetText(),
+ pEntryData->GetExpandedImage(), pEntryData->GetCollapsedImage(),
+ m_pRootEntry, sal_False, nRelPos, pEntryData );
+
+ else
+ pNewEntry = InsertEntry( pEntryData->GetText(),
+ pEntryData->GetExpandedImage(), pEntryData->GetCollapsedImage(),
+ pParentEntry, sal_False, nRelPos, pEntryData );
+
+ //////////////////////////////////////////////////////////////////////
+ // Wenn Root-Eintrag Root expandieren
+ if( !pParentEntry )
+ Expand( m_pRootEntry );
+
+ //////////////////////////////////////////////////////////////////////
+ // Childs einfuegen
+ FmEntryDataList* pChildList = pEntryData->GetChildList();
+ sal_uInt32 nChildCount = pChildList->Count();
+ FmEntryData* pChildData;
+ for( sal_uInt32 i=0; i<nChildCount; i++ )
+ {
+ pChildData = pChildList->GetObject(i);
+ Insert( pChildData, LIST_APPEND );
+ }
+
+ return pNewEntry;
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::Remove( FmEntryData* pEntryData )
+{
+ if( !pEntryData )
+ return;
+
+ // der Entry zu den Daten
+ SvLBoxEntry* pEntry = FindEntry( pEntryData );
+ if (!pEntry)
+ return;
+
+ // Eintrag aus TreeListBox entfernen
+ // ich darf das Select, das ich ausloese, nicht behandeln :
+ // Select aendert die MarkList der ::com::sun::star::sdbcx::View, wenn das gerade auch jemand anders macht und dabei ein Remove
+ // triggert, haben wir mit ziemlicher Sicherheit ein Problem - Paradebeispiel war das Gruppieren von Controls mit
+ // offenem Navigator ...)
+ LockSelectionHandling();
+
+ // ein kleines Problem : ich merke mir meine selektierten Daten, wenn mir jetzt jemand einen selektierten Eintrag
+ // unter dem Hintern wegschiesst, werde ich inkonsistent ... was schlecht waere
+ Select(pEntry, sal_False);
+
+ // beim eigentlichen Entfernen kann die ::com::sun::star::awt::Selection geaendert werden, da ich aber das SelectionHandling abgeschaltet
+ // habe, muss ich mich hinterher darum kuemmern
+ int nExpectedSelectionCount = GetSelectionCount();
+
+ if( pEntry )
+ GetModel()->Remove( pEntry );
+
+ if (nExpectedSelectionCount != GetSelectionCount())
+ SynchronizeSelection();
+
+ // und standardmaessig behandle ich das Select natuerlich
+ UnlockSelectionHandling();
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorer::IsFormEntry( SvLBoxEntry* pEntry )
+{
+ FmEntryData* pEntryData = (FmEntryData*)pEntry->GetUserData();
+ return !pEntryData || pEntryData->ISA(FmFormData);
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorer::IsFormComponentEntry( SvLBoxEntry* pEntry )
+{
+ FmEntryData* pEntryData = (FmEntryData*)pEntry->GetUserData();
+ return pEntryData && pEntryData->ISA(FmControlData);
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorer::QueryDrop( DropEvent& rDEvt )
+{
+ Point aDropPos = rDEvt.GetPosPixel();
+
+ // kuemmern wir uns erst mal um moeglich DropActions (Scrollen und Aufklappen)
+ if (rDEvt.IsLeaveWindow())
+ {
+ if (m_aDropActionTimer.IsActive())
+ m_aDropActionTimer.Stop();
+ } else
+ {
+ sal_Bool bNeedTrigger = sal_False;
+ // auf dem ersten Eintrag ?
+ if ((aDropPos.Y() >= 0) && (aDropPos.Y() < GetEntryHeight()))
+ {
+ m_aDropActionType = DA_SCROLLUP;
+ bNeedTrigger = sal_True;
+ } else
+ // auf dem letzten (bzw. in dem Bereich, den ein Eintrag einnehmen wuerde, wenn er unten genau buendig
+ // abschliessen wuerde) ?
+ if ((aDropPos.Y() < GetSizePixel().Height()) && (aDropPos.Y() >= GetSizePixel().Height() - GetEntryHeight()))
+ {
+ m_aDropActionType = DA_SCROLLDOWN;
+ bNeedTrigger = sal_True;
+ } else
+ { // auf einem Entry mit Childs, der nicht aufgeklappt ist ?
+ SvLBoxEntry* pDropppedOn = GetEntry(aDropPos);
+ if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && !IsExpanded(pDropppedOn))
+ {
+ // -> aufklappen
+ m_aDropActionType = DA_EXPANDNODE;
+ bNeedTrigger = sal_True;
+ }
+ }
+
+ if (bNeedTrigger && (m_aTimerTriggered != aDropPos))
+ {
+ // neu anfangen zu zaehlen
+ m_aTimerCounter = DROP_ACTION_TIMER_INITIAL_TICKS;
+ // die Pos merken, da ich auch QueryDrops bekomme, wenn sich die Maus gar nicht bewegt hat
+ m_aTimerTriggered = aDropPos;
+ // und den Timer los
+ if (!m_aDropActionTimer.IsActive()) // gibt es den Timer schon ?
+ {
+ m_aDropActionTimer.SetTimeout(DROP_ACTION_TIMER_TICK_BASE);
+ m_aDropActionTimer.Start();
+ }
+ } else if (!bNeedTrigger)
+ m_aDropActionTimer.Stop();
+ }
+
+
+ //////////////////////////////////////////////////////////////////////
+ // Hat das Object das richtige Format?
+ SvDataObjectRef xDataObj( SvDataObject::PasteDragServer( rDEvt ));
+
+ const SvDataTypeList& rTypeList = xDataObj->GetTypeList();
+ sal_Bool bHasDefControlFormat = NULL != rTypeList.Get(Exchange::RegisterFormatName(SVX_FM_CONTROL_EXCH));
+ sal_Bool bHasControlPathFormat = NULL != rTypeList.Get(Exchange::RegisterFormatName(SVX_FM_CONTROLS_AS_PATH));
+ sal_Bool bHasHiddenControlsFormat = NULL != rTypeList.Get(Exchange::RegisterFormatName(SVX_FM_HIDDEN_CONTROLS));
+ if (!bHasDefControlFormat && !bHasControlPathFormat && !bHasHiddenControlsFormat)
+ return sal_False;
+
+ // die Liste der gedroppten Eintraege aus dem DragServer
+ SvxFmExplCtrlExch* xDragExch = (SvxFmExplCtrlExch*)&xDataObj;
+
+ sal_Bool bForeignShellOrPage = xDragExch->GetShell() != GetExplModel()->GetFormShell()
+ || xDragExch->GetPage() != GetExplModel()->GetFormPage();
+ if (bForeignShellOrPage || (bHasHiddenControlsFormat && (rDEvt.GetAction() == DROP_COPY)))
+ {
+ // ueber Shells/Pages hinweg kann ich nur hidden Controls austauschen
+ if (!bHasHiddenControlsFormat)
+ return sal_False;
+
+ SvLBoxEntry* pDropTarget = GetEntry(aDropPos);
+ if (!pDropTarget || (pDropTarget == m_pRootEntry) || !IsFormEntry(pDropTarget))
+ return sal_False;
+
+ rDEvt.SetAction(DROP_COPY); // hidden controls ueber Shell-Grenzen werden nur kopiert, nie verschoben
+ return sal_True;
+ }
+
+ if (rDEvt.GetAction() != DROP_MOVE) // normale Control innerhalb einer Shell werden nur verschoben
+ return sal_False;
+
+ if (m_bDragDataDirty)
+ {
+ if (!bHasControlPathFormat)
+ // ich befinde mich zwar in der Shell/Page, aus der die Controls stammen, habe aber kein Format, das den stattgefundenen
+ // Shell-Wechsel ueberlebt hat (SVX_FM_CONTROLS_AS_PATH)
+ return sal_False;
+
+ // da die Shell waehrend des Draggens umgeschaltet wude, muss ich die Liste des ExchangeObjektes wieder neu aufbauen
+ // (dort stehen SvLBoxEntries drin, und die sind bei der Umschaltung floeten gegangen)
+ xDragExch->BuildListFromPath(this, m_pRootEntry);
+ m_bDragDataDirty = sal_False;
+ }
+
+ // die Liste der gedroppten Eintraege aus dem DragServer
+ vector<SvLBoxEntry*> lstDropped = xDragExch->GetDraggedEntries();
+ DBG_ASSERT(lstDropped.size() >= 1, "FmExplorer::QueryDrop : keine Eintraege !");
+
+ // das Ziel des Droppens (plus einige Daten, die ich nicht in jeder Schleife ermitteln will)
+ SvLBoxEntry* pDropTarget = GetEntry( aDropPos );
+ if (!pDropTarget)
+ return sal_False;
+ sal_Bool bDropTargetIsComponent = IsFormComponentEntry(pDropTarget);
+ SvLBoxEntry* pDropTargetParent = GetParent( pDropTarget );
+
+ // so, folgende Bedingungen, unter denen ich das Drop verbiete :
+ // 0) die Root ist in der Liste mit drin
+ // 1) einer der zu droppenden Eintraege soll in sein eigenes Parent gedroppt werden
+ // 2) - " - wird auf sich selber gezogen
+ // 3) - " - ist eine ::com::sun::star::form::Form und wird auf einen unter ihm stehenden Eintrag gezogen
+ // 4) einer der Eintraege ist ein Control und wird auf die Root gedroppt
+ // 5) ein Control oder Formular wird auf ein Control NICHT auf der selben Hierarchie-Ebene gezogen (auf eines der selben
+ // heisst Platz vertauschen, ist also erlaubt)
+
+ // um 3) etwas fixer testen zu koennen, sammle ich ich die Vorfahren des DropTargets ein
+ SvLBoxEntrySortedArray arrDropAnchestors;
+ SvLBoxEntry* pLoop = pDropTarget;
+ while (pLoop)
+ {
+ arrDropAnchestors.Insert(pLoop);
+ pLoop = GetParent(pLoop);
+ }
+
+ for (int i=0; i<lstDropped.size(); i++)
+ {
+ SvLBoxEntry* pCurrent = lstDropped[i];
+ SvLBoxEntry* pCurrentParent = GetParent(pCurrent);
+
+ // Test auf 0)
+ if (pCurrent == m_pRootEntry)
+ return sal_False;
+
+ // Test auf 1)
+ if ( pDropTarget == pCurrentParent )
+ return sal_False;
+
+ // Test auf 2)
+ if (pCurrent == pDropTarget)
+ return sal_False;
+
+ // Test auf 5)
+// if ( bDropTargetIsComponent && (pDropTargetParent != pCurrentParent) )
+ if ( bDropTargetIsComponent ) // TODO : die obige Zeile wieder rein, dann muss aber Drop das Vertauschen auch beherrschen
+ return sal_False;
+
+ // Test auf 3)
+ if ( IsFormEntry(pCurrent) )
+ {
+ sal_uInt16 nPosition;
+ if ( arrDropAnchestors.Seek_Entry(pCurrent, &nPosition) )
+ return sal_False;
+ } else
+ if ( IsFormComponentEntry(pCurrent) )
+ {
+ // Test auf 4)
+ if (pDropTarget == m_pRootEntry)
+ return sal_False;
+ }
+ }
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorer::Drop( const DropEvent& rDEvt )
+{
+ // ware schlecht, wenn nach dem Droppen noch gescrollt wird ...
+ if (m_aDropActionTimer.IsActive())
+ m_aDropActionTimer.Stop();
+
+ // Format-Ueberpruefung
+ SvDataObjectRef xDataObj( SvDataObject::PasteDragServer( rDEvt ));
+ SvxFmExplCtrlExchRef xDragExch( (SvxFmExplCtrlExch*)&xDataObj);
+
+ sal_Bool bHasHiddenControlsFormat = NULL != xDataObj->GetTypeList().Get(Exchange::RegisterFormatName(SVX_FM_HIDDEN_CONTROLS));
+#ifdef DBG_UTIL
+ sal_Bool bForeignShellOrPage = xDragExch->GetShell() != GetExplModel()->GetFormShell()
+ || xDragExch->GetPage() != GetExplModel()->GetFormPage();
+ DBG_ASSERT(!bForeignShellOrPage || bHasHiddenControlsFormat, "FmExplorer::Drop : invalid format (QueryDrop shouldn't have let this pass) !");
+ DBG_ASSERT(bForeignShellOrPage || !m_bDragDataDirty, "FmExplorer::Drop : invalid state (shell changed since last exchange resync) !");
+ // das sollte in QueryDrop erledigt worden sein : dort wird in xDragExch die Liste der Controls aufgebaut und m_bDragDataDirty
+ // zurueckgesetzt
+#endif
+
+ // das Ziel des Drop sowie einige Daten darueber
+ Point aDropPos = rDEvt.GetPosPixel();
+ SvLBoxEntry* pDropTarget = GetEntry( aDropPos );
+ if (!pDropTarget)
+ return sal_False;
+
+// sal_uInt32 nDropEntryPos = GetModel()->GetRelPos( pDropTarget ); // brauche ich spaeter mal fuer das Verschieben
+ sal_Bool bDropTargetIsForm = IsFormEntry(pDropTarget);
+ FmFormData* pTargetData = bDropTargetIsForm ? (FmFormData*)pDropTarget->GetUserData() : NULL;
+
+ if (rDEvt.GetAction() == DROP_COPY)
+ {
+ DBG_ASSERT(bHasHiddenControlsFormat, "FmExplorer::Drop : only copying of hidden controls is supported !");
+ // das sollte das QueryDrop abgefangen haben
+
+ // da ich gleich die Zielobjekte alle selektieren will (und nur die)
+ SelectAll(sal_False);
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > seqControls = xDragExch->GetHiddenControls();
+ sal_Int32 nCount = seqControls.getLength();
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > * pControls = seqControls.getConstArray();
+
+ FmFormShell* pFormShell = GetExplModel()->GetFormShell();
+ FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : NULL;
+
+ // innerhalb eines Undo ...
+ if (pFormModel)
+ {
+ XubString aStr(SVX_RES(RID_STR_CONTROL));
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
+ aUndoStr.SearchAndReplace('#', aStr);
+ pFormModel->BegUndo(aUndoStr);
+ }
+
+ // die Conrtols kopieren
+ for (sal_Int32 i=0; i<nCount; ++i)
+ {
+ // neues Control anlegen
+ rtl::OUString fControlName = FM_COMPONENT_HIDDEN;
+ FmControlData* pNewControlData = NewControl( fControlName, pDropTarget, sal_False);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xNewPropSet(pNewControlData->GetElement(), ::com::sun::star::uno::UNO_QUERY);
+
+ // und die Properties des alten in das neue kopieren
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCurrent(pControls[i], ::com::sun::star::uno::UNO_QUERY);
+#if DEBUG || DBG_UTIL
+ // nur mal eben sehen, ob das Ding tatsaechlich ein hidden control ist
+ sal_Int16 nClassId = ::utl::getINT16(xCurrent->getPropertyValue(FM_PROP_CLASSID));
+ DBG_ASSERT(nClassId == ::com::sun::star::form::FormComponentType::HIDDENCONTROL, "FmExplorer::Drop : invalid control in drop list !");
+ // wenn das SVX_FM_HIDDEN_CONTROLS-Format vorhanden ist, dann sollten wirklich nur hidden controls in der Sequenz
+ // stecken
+#endif // DEBUG || DBG_UTIL
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xPropInfo( xCurrent->getPropertySetInfo());
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property> seqAllCurrentProps = xPropInfo->getProperties();
+ ::com::sun::star::beans::Property* pAllCurrentProps = seqAllCurrentProps.getArray();
+ for (sal_Int32 j=0; j<seqAllCurrentProps.getLength(); ++j)
+ {
+ ::rtl::OUString ustrCurrentProp = pAllCurrentProps[j].Name;
+ if (((pAllCurrentProps[j].Attributes & ::com::sun::star::beans::PropertyAttribute::READONLY) == 0) && (ustrCurrentProp != FM_PROP_NAME))
+ { // (read-only attribs werden natuerlich nicht gesetzt, dito der Name, den hat das NewControl schon eindeutig
+ // festgelegt)
+ xNewPropSet->setPropertyValue(ustrCurrentProp, xCurrent->getPropertyValue(ustrCurrentProp));
+ }
+ }
+
+ SvLBoxEntry* pToSelect = FindEntry(pNewControlData);
+ Select(pToSelect, sal_True);
+ if (i == 0)
+ SetCurEntry(pToSelect);
+ }
+
+ if (pFormModel)
+ pFormModel->EndUndo();
+ return sal_True;
+ }
+
+
+ // die Liste der gedraggten Eintraege
+ vector<SvLBoxEntry*> lstDropped = xDragExch->GetDraggedEntries();
+ DBG_ASSERT(lstDropped.size() >= 1, "FmExplorer::Drop : keine Eintraege !");
+
+ // die Shell und das Model
+ FmFormShell* pFormShell = GetExplModel()->GetFormShell();
+ FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : NULL;
+ if (!pFormModel)
+ return sal_False;
+
+ // fuer's Undo
+ XubString strUndoDescription(SVX_RES(RID_STR_UNDO_CONTAINER_REPLACE));
+ // TODO : den ::rtl::OUString aussagekraeftiger machen
+ pFormModel->BegUndo(strUndoDescription);
+
+ // ich nehme vor dem Einfuegen eines Eintrages seine ::com::sun::star::awt::Selection raus, damit die Markierung dabei nicht flackert
+ // -> das Handeln des Select locken
+ LockSelectionHandling();
+
+ // jetzt durch alle gedroppten Eintraege ...
+ for (int i=0; i<lstDropped.size(); ++i)
+ {
+ // ein paar Daten zum aktuellen Element
+ SvLBoxEntry* pCurrent = lstDropped[i];
+ DBG_ASSERT(pCurrent != NULL, "FmExplorer::Drop : ungueltiger Eintrag");
+ DBG_ASSERT(GetParent(pCurrent) != NULL, "FmExplorer::Drop : ungueltiger Eintrag");
+ // die Root darf nicht gedraggt werden
+
+ FmEntryData* pCurrentUserData = (FmEntryData*)pCurrent->GetUserData();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xCurrentChild(pCurrentUserData->GetElement(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer(xCurrentChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+
+
+ FmFormData* pCurrentParentUserData = (FmFormData*)pCurrentUserData->GetParent();
+ DBG_ASSERT(pCurrentParentUserData == NULL || pCurrentParentUserData->ISA(FmFormData), "FmExplorer::Drop : ungueltiges Parent");
+
+ // beim Vater austragen
+ if (pCurrentParentUserData)
+ pCurrentParentUserData->GetChildList()->Remove(pCurrentUserData);
+ else
+ GetExplModel()->GetRootList()->Remove(pCurrentUserData);
+
+ // aus dem ::com::sun::star::sdbcx::Container entfernen
+ sal_Int32 nIndex = getElementPos(::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > (xContainer, ::com::sun::star::uno::UNO_QUERY), xCurrentChild);
+ GetExplModel()->m_pPropChangeList->Lock();
+ // die Undo-::com::sun::star::chaos::Action fuer das Rausnehmen
+ if (GetExplModel()->m_pPropChangeList->CanUndo())
+ pFormModel->AddUndo(new FmUndoContainerAction(*pFormModel, FmUndoContainerAction::Removed,
+ xContainer, xCurrentChild, nIndex));
+
+ // Events mitkopieren
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xManager(xContainer, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor > aEvts;
+
+ if (xManager.is() && nIndex >= 0)
+ aEvts = xManager->getScriptEvents(nIndex);
+ xContainer->removeByIndex(nIndex);
+
+ // die ::com::sun::star::awt::Selection raus
+ Select(pCurrent, sal_False);
+ // und weg
+ Remove(pCurrentUserData);
+
+
+ // die Stelle innerhalb des DropParents, an der ich die gedroppten Eintraege einfuegen muss
+ if (pTargetData)
+ xContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (pTargetData->GetElement(), ::com::sun::star::uno::UNO_QUERY);
+ else
+ xContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (GetExplModel()->GetForms(), ::com::sun::star::uno::UNO_QUERY);
+
+ // immer ganz hinten einfuegen
+ nIndex = xContainer->getCount();
+
+ // UndoAction fuer das Einfuegen
+ if (GetExplModel()->m_pPropChangeList->CanUndo())
+ pFormModel->AddUndo(new FmUndoContainerAction(*pFormModel, FmUndoContainerAction::Inserted,
+ xContainer, xCurrentChild, nIndex));
+
+ // einfuegen im neuen ::com::sun::star::sdbcx::Container
+ if (pTargetData)
+ {
+ // es wird in eine ::com::sun::star::form::Form eingefuegt, dann brauche ich eine ::com::sun::star::form::FormComponent
+ xContainer->insertByIndex(nIndex,
+ ::com::sun::star::uno::makeAny(::com::sun::star::uno::Reference<
+ ::com::sun::star::form::XFormComponent>(xCurrentChild, ::com::sun::star::uno::UNO_QUERY)));
+ }
+ else
+ {
+ xContainer->insertByIndex(nIndex,
+ ::com::sun::star::uno::makeAny(::com::sun::star::uno::Reference<
+ ::com::sun::star::form::XForm>(xCurrentChild, ::com::sun::star::uno::UNO_QUERY)));
+ }
+
+ if (aEvts.getLength())
+ {
+ xManager = ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > (xContainer, ::com::sun::star::uno::UNO_QUERY);
+ if (xManager.is())
+ xManager->registerScriptEvents(nIndex, aEvts);
+ }
+
+ GetExplModel()->m_pPropChangeList->UnLock();
+
+ // zuerst dem Eintrag das neue Parent
+ pCurrentUserData->SetParent(pTargetData);
+
+ // dann dem Parent das neue Child
+ if (pTargetData)
+ pTargetData->GetChildList()->Insert(pCurrentUserData, nIndex);
+ else
+ GetExplModel()->GetRootList()->Insert(pCurrentUserData, nIndex);
+
+ // dann bei mir selber bekanntgeben und neu selektieren
+ SvLBoxEntry* pNew = Insert( pCurrentUserData, nIndex );
+ }
+
+ UnlockSelectionHandling();
+ pFormModel->EndUndo();
+
+ // waehrend des Verschiebens der Eintraege hat sich die Markierung der unterliegenden ::com::sun::star::sdbcx::View nicht geaendert (da sie mit der
+ // logischen Seite nichts zu tun hat), wohl aber meine Selektion, die ich also wieder an der Markierung ausrichten muss
+ SynchronizeSelection();
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ SvTreeListBox::MouseButtonUp( rMEvt );
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::KeyInput(const KeyEvent& rKEvt)
+{
+ // loeschen ?
+ if (rKEvt.GetKeyCode().GetCode() == KEY_DELETE && !rKEvt.GetKeyCode().GetModifier())
+ {
+ DeleteSelection();
+ return;
+ }
+
+ SvTreeListBox::KeyInput(rKEvt);
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorer::EditingEntry( SvLBoxEntry* pEntry, Selection& rSelection )
+{
+ if (!SvTreeListBox::EditingEntry( pEntry, rSelection ))
+ return sal_False;
+
+ return (pEntry && (pEntry->GetUserData() != NULL));
+ // die Wurzel, die ich nicht umbenennen darf, hat als UserData NULL
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::NewForm( SvLBoxEntry* pParentEntry )
+{
+ //////////////////////////////////////////////////////////////////////
+ // ParentFormData holen
+ if( !IsFormEntry(pParentEntry) )
+ return;
+
+ FmFormData* pParentFormData = (FmFormData*)pParentEntry->GetUserData();
+
+ //////////////////////////////////////////////////////////////////////
+ // Neue ::com::sun::star::form::Form erzeugen
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xNewForm(::utl::getProcessServiceFactory()->createInstance(FM_SUN_COMPONENT_FORM), ::com::sun::star::uno::UNO_QUERY);
+ if (!xNewForm.is())
+ return;
+
+ FmFormData* pNewFormData = new FmFormData( xNewForm, m_ilNavigatorImages, pParentFormData );
+
+ //////////////////////////////////////////////////////////////////////
+ // Namen setzen
+ ::rtl::OUString aName = GenerateName(pNewFormData);
+ pNewFormData->SetText(aName);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropertySet(xNewForm, ::com::sun::star::uno::UNO_QUERY);
+ if (!xPropertySet.is())
+ return;
+ try
+ {
+ xPropertySet->setPropertyValue( FM_PROP_NAME, ::com::sun::star::uno::makeAny(aName) );
+ // a form should always have the command type table as default
+ xPropertySet->setPropertyValue( FM_PROP_COMMANDTYPE, ::com::sun::star::uno::makeAny(sal_Int32(::com::sun::star::sdb::CommandType::TABLE)));
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmExplorer::NewForm : could not set esssential properties !");
+ }
+
+
+ //////////////////////////////////////////////////////////////////////
+ // ::com::sun::star::form::Form einfuegen
+ GetExplModel()->Insert( pNewFormData, LIST_APPEND, sal_True );
+
+ //////////////////////////////////////////////////////////////////////
+ // Neue ::com::sun::star::form::Form als aktive ::com::sun::star::form::Form setzen
+ FmFormShell* pFormShell = GetExplModel()->GetFormShell();
+ if( pFormShell )
+ {
+ pFormShell->GetImpl()->setCurForm( xNewForm );
+ pFormShell->GetCurPage()->GetImpl()->setCurForm( xNewForm );
+
+ SFX_BINDINGS().Invalidate(SID_FM_PROPERTIES,sal_True,sal_True);
+ }
+ GetExplModel()->SetModified();
+
+ //////////////////////////////////////////////////////////////////////
+ // In EditMode schalten
+ SvLBoxEntry* pNewEntry = FindEntry( pNewFormData );
+ EditEntry( pNewEntry );
+}
+
+//------------------------------------------------------------------------
+FmControlData* FmExplorer::NewControl( const ::rtl::OUString& rServiceName, SvLBoxEntry* pParentEntry, sal_Bool bEditName )
+{
+ //////////////////////////////////////////////////////////////////////
+ // ParentForm holen
+ if (!GetExplModel()->GetFormShell())
+ return NULL;
+ if (!IsFormEntry(pParentEntry))
+ return NULL;
+
+ FmFormData* pParentFormData = (FmFormData*)pParentEntry->GetUserData();;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xParentForm( pParentFormData->GetFormIface());
+
+ //////////////////////////////////////////////////////////////////////
+ // Neue Component erzeugen
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xNewComponent(::utl::getProcessServiceFactory()->createInstance(rServiceName), ::com::sun::star::uno::UNO_QUERY);
+ if (!xNewComponent.is())
+ return NULL;
+
+ FmControlData* pNewFormControlData = new FmControlData( xNewComponent, m_ilNavigatorImages, pParentFormData );
+
+ //////////////////////////////////////////////////////////////////////
+ // Namen setzen
+ FmFormView* pFormView = GetExplModel()->GetFormShell()->GetFormView();
+ SdrPageView* pPageView = pFormView->GetPageViewPvNum(0);
+ FmFormPage* pPage = (FmFormPage*)pPageView->GetPage();
+
+ ::rtl::OUString sName = pPage->GetImpl()->setUniqueName( xNewComponent, xParentForm );
+
+ pNewFormControlData->SetText( sName );
+
+ //////////////////////////////////////////////////////////////////////
+ // ::com::sun::star::form::FormComponent einfuegen
+ GetExplModel()->Insert( pNewFormControlData, LIST_APPEND, sal_True );
+ GetExplModel()->SetModified();
+
+ if (bEditName)
+ {
+ //////////////////////////////////////////////////////////////////////
+ // In EditMode schalten
+ SvLBoxEntry* pNewEntry = FindEntry( pNewFormControlData );
+ Select( pNewEntry, sal_True );
+ EditEntry( pNewEntry );
+ }
+
+ return pNewFormControlData;
+}
+
+//------------------------------------------------------------------------
+::rtl::OUString FmExplorer::GenerateName( FmEntryData* pEntryData )
+{
+ const sal_uInt16 nMaxCount = 99;
+ ::rtl::OUString aNewName;
+
+ //////////////////////////////////////////////////////////////////////
+ // BasisNamen erzeugen
+ UniString aBaseName;
+ if( pEntryData->ISA(FmFormData) )
+ aBaseName = SVX_RES( RID_STR_STDFORMNAME );
+
+ else if( pEntryData->ISA(FmControlData) )
+ aBaseName = SVX_RES( RID_STR_CONTROL_CLASSNAME );
+
+ //////////////////////////////////////////////////////////////////////
+ // Neuen Namen erstellen
+ FmFormData* pFormParentData = (FmFormData*)pEntryData->GetParent();
+
+ for( sal_Int32 i=0; i<nMaxCount; i++ )
+ {
+ aNewName = aBaseName;
+ if( i>0 )
+ {
+ aNewName += ::rtl::OUString::createFromAscii(" ");
+ aNewName += ::rtl::OUString::valueOf(i).getStr();
+ }
+
+ if( GetExplModel()->FindData(aNewName, pFormParentData,sal_False) == NULL )
+ break;
+ }
+
+ return aNewName;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorer::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
+{
+ if (EditingCanceled())
+ return sal_True;
+
+ GrabFocus();
+ FmEntryData* pEntryData = (FmEntryData*)pEntry->GetUserData();
+ sal_Bool bRes = GetExplModel()->Rename( pEntryData, rNewText);
+ if( !bRes )
+ {
+ m_pEditEntry = pEntry;
+ nEditEvent = Application::PostUserEvent( LINK(this, FmExplorer, OnEdit) );
+ } else
+ SetCursor(pEntry, sal_True);
+
+ return bRes;
+}
+
+//------------------------------------------------------------------------
+IMPL_LINK( FmExplorer, OnEdit, void*, EMPTYARG )
+{
+ nEditEvent = 0;
+ EditEntry( m_pEditEntry );
+ m_pEditEntry = NULL;
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+IMPL_LINK( FmExplorer, OnDropActionTimer, void*, EMPTYARG )
+{
+ if (--m_aTimerCounter > 0)
+ return 0L;
+
+ if (m_aDropActionType == DA_EXPANDNODE)
+ {
+ SvLBoxEntry* pToExpand = GetEntry(m_aTimerTriggered);
+ if (pToExpand && (GetChildCount(pToExpand) > 0) && !IsExpanded(pToExpand))
+ // tja, eigentlich muesste ich noch testen, ob die Node nicht schon expandiert ist, aber ich
+ // habe dazu weder in den Basisklassen noch im Model eine Methode gefunden ...
+ // aber ich denke, die BK sollte es auch so vertragen
+ Expand(pToExpand);
+
+ // nach dem Expand habe ich im Gegensatz zum Scrollen natuerlich nix mehr zu tun
+ m_aDropActionTimer.Stop();
+ } else
+ {
+ switch (m_aDropActionType)
+ {
+ case DA_SCROLLUP :
+ {
+ ScrollOutputArea(1);
+ break;
+ }
+
+ case DA_SCROLLDOWN :
+ ScrollOutputArea(-1);
+ break;
+ }
+
+ m_aTimerCounter = DROP_ACTION_TIMER_SCROLL_TICKS;
+ }
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+IMPL_LINK(FmExplorer, OnEntrySelDesel, FmExplorer*, pThis)
+{
+ m_sdiState = SDI_DIRTY;
+
+ if (IsSelectionHandlingLocked())
+ return 0L;
+
+ if (m_aSynchronizeTimer.IsActive())
+ m_aSynchronizeTimer.Stop();
+
+ m_aSynchronizeTimer.SetTimeout(EXPLORER_SYNC_DELAY);
+ m_aSynchronizeTimer.Start();
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+IMPL_LINK(FmExplorer, OnSynchronizeTimer, void*, EMPTYARG)
+{
+ SynchronizeMarkList();
+ return 0L;
+}
+
+
+//------------------------------------------------------------------------
+void FmExplorer::ShowSelectionProperties(sal_Bool bForce)
+{
+ // zuerst brauche ich die FormShell
+ FmFormShell* pFormShell = GetExplModel()->GetFormShell();
+ if (!pFormShell)
+ // keine Shell -> ich koennte kein curObject setzen -> raus
+ return;
+
+ CollectSelectionData(SDI_ALL);
+ DBG_ASSERT( (m_nFormsSelected >= 0) && (m_nControlsSelected >= 0) && (m_nHiddenControls >= 0),
+ "FmExplorer::ShowSelectionProperties : selection counter(s) invalid !");
+ DBG_ASSERT( m_nFormsSelected + m_nControlsSelected + (m_bRootSelected ? 1 : 0) == m_arrCurrentSelection.Count(),
+ "FmExplorer::ShowSelectionProperties : selection meta data invalid !");
+
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInterfaceSelected;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xFormSelected;
+ sal_Bool bPropertiesAvailable = sal_True;
+ sal_Bool bNeedSetCurControl = sal_True;
+
+ if (m_bRootSelected)
+ bPropertiesAvailable = sal_False; // fuer die Root habe ich keine - weder einzeln noch in einer Gruppe - Properties
+ else if (m_nFormsSelected + m_nControlsSelected == 0) // keines der beiden sollte kleiner 0 sein !
+ bPropertiesAvailable = sal_False; // keine Selektion -> keine Properties
+ else if (m_nFormsSelected * m_nControlsSelected != 0)
+ bPropertiesAvailable = sal_False; // gemischte Selektion -> keine Properties
+ else
+ { // so, hier bin ich, wenn entweder nur ::com::sun::star::form::Forms oder nur Controls selektiert sind
+ if (m_arrCurrentSelection.Count() == 1)
+ {
+ if (m_nFormsSelected > 0)
+ { // es ist genau eine ::com::sun::star::form::Form selektiert
+ FmFormData* pFormData = (FmFormData*)m_arrCurrentSelection.GetObject(0)->GetUserData();
+ xFormSelected = pFormData->GetFormIface();
+ xInterfaceSelected = xFormSelected;
+ } else
+ { // es ist genau ein Control selektiert (egal ob hidden oder normal)
+ FmEntryData* pEntryData = (FmEntryData*)m_arrCurrentSelection.GetObject(0)->GetUserData();
+ xInterfaceSelected = pEntryData->GetElement();
+ pFormShell->GetImpl()->setCurControl(xInterfaceSelected);
+ bNeedSetCurControl = sal_False;
+
+ if (pEntryData->GetParent())
+ xFormSelected = ((FmFormData*)pEntryData->GetParent())->GetFormIface();
+ }
+ } else
+ { // wir haben eine MultiSelection, also muessen wir ein MultiSet dafuer aufbauen
+ if (m_nFormsSelected > 0)
+ { // ... nur ::com::sun::star::form::Forms
+ // erstmal die PropertySet-Interfaces der ::com::sun::star::form::Forms einsammeln
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > > seqForms(m_nFormsSelected);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pPropSets = seqForms.getArray();
+ for (int i=0; i<m_nFormsSelected; i++)
+ {
+ FmFormData* pFormData = (FmFormData*)m_arrCurrentSelection.GetObject(i)->GetUserData();
+ pPropSets[i] = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (pFormData->GetElement(), ::com::sun::star::uno::UNO_QUERY);
+ }
+ // dann diese in ein MultiSet packen
+ FmXMultiSet* pSelectionSet = new FmXMultiSet( seqForms );
+ xInterfaceSelected = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ( (::com::sun::star::beans::XPropertySet*)pSelectionSet );
+ }
+ else
+ { // ... nur Controls
+ if (m_nHiddenControls == m_nControlsSelected)
+ { // ein MultiSet fuer die Properties der hidden controls
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > > seqHiddenControls(m_nHiddenControls);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pPropSets = seqHiddenControls.getArray();
+ FmEntryData* pParentData = ((FmEntryData*)m_arrCurrentSelection.GetObject(0)->GetUserData())->GetParent();
+ for (int i=0; i<m_nHiddenControls; i++)
+ {
+ FmEntryData* pEntryData = (FmEntryData*)m_arrCurrentSelection.GetObject(i)->GetUserData();
+ pPropSets[i] = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (pEntryData->GetElement(), ::com::sun::star::uno::UNO_QUERY);
+
+ if (pParentData && pParentData != pEntryData->GetParent())
+ pParentData = NULL;
+ }
+
+ // dann diese in ein MultiSet packen
+ FmXMultiSet* pSelectionSet = new FmXMultiSet( seqHiddenControls );
+ xInterfaceSelected = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ( (::com::sun::star::beans::XPropertySet*)pSelectionSet );
+ // und der Shell als aktuelles Objekt anzeigen
+ pFormShell->GetImpl()->setCurControl( xInterfaceSelected );
+ bNeedSetCurControl = sal_False;
+
+ if (pParentData)
+ // alle hidden controls gehoeren zu einer ::com::sun::star::form::Form
+ xFormSelected = ((FmFormData*)pParentData)->GetFormIface();
+ }
+ else if (m_nHiddenControls == 0)
+ { // nur normale Controls
+ // ein MultiSet aus der MarkList der ::com::sun::star::sdbcx::View aufbauen ...
+ const SdrMarkList& mlMarked = pFormShell->GetFormView()->GetMarkList();
+ FmXMultiSet* pSelectionSet = new FmXMultiSet( mlMarked );
+ xInterfaceSelected = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ( (::com::sun::star::beans::XPropertySet*)pSelectionSet );
+ pFormShell->GetImpl()->setCurControl( xInterfaceSelected );
+ bNeedSetCurControl = sal_False;
+
+ // jetzt das Formular setzen
+ sal_Bool bMixedWithFormControls;
+ xFormSelected = pFormShell->GetImpl()->DetermineCurForm(mlMarked,bMixedWithFormControls);
+ } else
+ // gemischte Selektion aus hidden und normalen Controls -> keine Properties
+ bPropertiesAvailable = sal_False;
+ }
+ }
+
+ }
+
+ // um das Setzen des current Controls kann sich die Shell kuemmern (da gibt es einige Feinheiten, die ich hier nicht
+ // neu implementieren moechte)
+ if (bNeedSetCurControl)
+ pFormShell->GetImpl()->DetermineSelection(pFormShell->GetFormView()->GetMarkList());
+ // und dann meine ::com::sun::star::form::Form und mein SelObject
+ pFormShell->GetImpl()->setSelObject(xInterfaceSelected);
+ pFormShell->GetImpl()->setCurForm(xFormSelected);
+
+ if (pFormShell->GetImpl()->IsPropBrwOpen() || bForce)
+ {
+ // und jetzt kann ich das Ganze dem PropertyBrowser uebergeben
+ FmInterfaceItem aInterfaceItem( SID_FM_SHOW_PROPERTY_BROWSER, xInterfaceSelected );
+ SFX_DISPATCHER().Execute( SID_FM_SHOW_PROPERTY_BROWSER, SFX_CALLMODE_ASYNCHRON,
+ &aInterfaceItem, 0L );
+ }
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::DeleteSelection()
+{
+ // die Root darf ich natuerlich nicht mitloeschen
+ sal_Bool bRootSelected = IsSelected(m_pRootEntry);
+ int nSelectionCount = GetSelectionCount();
+ if (bRootSelected && (nSelectionCount > 1)) // die Root plus andere Elemente ?
+ Select(m_pRootEntry, sal_False); // ja -> die Root raus
+
+ if ((nSelectionCount == 0) || bRootSelected) // immer noch die Root ?
+ return; // -> sie ist das einzige selektierte -> raus
+
+ DBG_ASSERT(!m_bPrevSelectionMixed, "FmExplorer::DeleteSelection() : loeschen nicht erlaubt wenn Markierung und Selektion nciht konsistent");
+
+ // ich brauche unten das FormModel ...
+ FmFormShell* pFormShell = GetExplModel()->GetFormShell();
+ if (!pFormShell)
+ return;
+ FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : NULL;
+ if (!pFormModel)
+ return;
+
+ // die Undo-Beschreibung
+ UniString aUndoStr = SVX_RES(RID_STR_UNDO_DELETE_LOGICAL);
+/* falls irgendwann mal Ordnung in das Undo kommt (so dass wir wirklich die aeusserste Klammer sind und beim Loeschen nur
+// eine, nicht zwei UndoActions erzeugen), koennen wir folgenden Code ja wieder benutzen ...
+ if (m_arrCurrentSelection.Count() == 1)
+ {
+ aUndoStr = SVX_RES(RID_STR_UNDO_CONTAINER_REMOVE);
+ if (m_nFormsSelected)
+ aUndoStr.SearchAndReplace("#", SVX_RES(RID_STR_FORM));
+ else
+ // bei selektierter Root war loeschen nicht erlaubt, also ist es ein Control
+ aUndoStr.SearchAndReplace("#", SVX_RES(RID_STR_CONTROL));
+ }
+ else
+ {
+ aUndoStr = SVX_RES(RID_STR_UNDO_CONTAINER_REMOVE_MULTIPLE);
+ aUndoStr.SearchAndReplace("#", UniString(::rtl::OUString(m_arrCurrentSelection.Count())));
+ // der Umweg ueber den ::rtl::OUString ist notwendig, da nur der den Constructor hat, der gleich eine Zahl formatiert
+ }
+*/
+
+ // jetzt muss ich noch die DeleteList etwas absichern : wenn man ein Formular und ein abhaengiges
+ // Element loescht - und zwar in dieser Reihenfolge - dann ist der SvLBoxEntryPtr des abhaengigen Elementes
+ // natuerlich schon ungueltig, wenn es geloescht werden soll ... diesen GPF, den es dann mit Sicherheit gibt,
+ // gilt es zu verhindern, also die 'normalisierte' Liste
+ CollectSelectionData(SDI_NORMALIZED);
+
+ // folgendes Problem : ich muss das ExplorerModel::Remove verwenden, da nur dieses sich um das korrekte Loeschen von ::com::sun::star::form::Form-
+ // Objekten kuemmert. Andererseits muss ich die Controls selber ueber DeleteMarked loeschen (irgendwo im Writer gibt
+ // es sonst Probleme). Wenn ich erst die Struktur, dann die Controls loesche, klappt das Undo nicht (da dann erst die Controls
+ // eingefuegt werden, dann die Struktur, sprich ihr Parent-Formular). Andersrum sind die EntryDatas ungueltig, wenn ich die
+ // Controls geloescht habe und zur Struktur gehe. Also muss ich die Formulare NACH den normalen Controls loeschen, damit sie
+ // beim Undo VOR denen wiederhergestellt werden.
+ pFormShell->GetImpl()->EnableTrackProperties(sal_False);
+ int i;
+ for (i = m_arrCurrentSelection.Count()-1; i>=0; --i)
+ {
+ FmEntryData* pCurrent = (FmEntryData*)(m_arrCurrentSelection.GetObject(i)->GetUserData());
+
+ // eine ::com::sun::star::form::Form ?
+ sal_Bool bIsForm = pCurrent->ISA(FmFormData);
+
+ // da ich das Loeschen im folgenden der ::com::sun::star::sdbcx::View ueberlasse und dabei auf deren MarkList aufbaue, im Normalfall aber bei
+ // einem makierten Formular nur die direkt, nicht die indirekt abhaengigen Controls markiert werden, muss ich das hier
+ // noch nachholen
+ if (bIsForm)
+ MarkViewObj((FmFormData*)pCurrent, sal_True, sal_True); // das zweite sal_True heisst "deep"
+
+
+ // ein hidden control ?
+ sal_Bool bIsHidden = IsHiddenControl(pCurrent);
+
+ // ::com::sun::star::form::Forms und hidden Controls muss ich behalten, alles andere nicht
+ if (!bIsForm && !bIsHidden)
+ m_arrCurrentSelection.Remove((sal_uInt16)i, 1);
+ }
+ pFormShell->GetImpl()->EnableTrackProperties(sal_True);
+
+ // und jetzt das eigentliche Loeschen
+ // die Controls wech
+ pFormShell->GetFormView()->DeleteMarked();
+
+ // das UNDO beginne ich erst jetzt : Das DeleteMarked erzeugt eine eigene Undo-::com::sun::star::chaos::Action, in die ich mich eigentlich einklinken
+ // muesste, was leider nicht geht (das laeuft irgendwo im SwDoc), also erzeuge ich eine zweite, mit der man das Loeschen der
+ // logischen Struktur zuruecknehmen kann (das ist nicht schoen, dass eine eigentlich atomare Aktion zwei UndoActions erzeugt,
+ // aber das einzige, was wir gefunden haben)
+ pFormModel->BegUndo(aUndoStr);
+
+ // die Struktur wech
+ for (i=0; i<m_arrCurrentSelection.Count(); ++i)
+ {
+ FmEntryData* pCurrent = (FmEntryData*)(m_arrCurrentSelection.GetObject(i)->GetUserData());
+ // noch ein kleines Problem, bevor ich das ganz loesche : wenn es eine ::com::sun::star::form::Form ist und die Shell diese als CurrentObject
+ // kennt, dann muss ich ihr das natuerlich ausreden
+ if (pCurrent->ISA(FmFormData))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xCurrentForm(pCurrent->GetElement(), ::com::sun::star::uno::UNO_QUERY);
+ if (pFormShell->GetImpl()->getCurForm() == xCurrentForm) // die Shell kennt die zu loeschende ::com::sun::star::form::Form ?
+ pFormShell->GetImpl()->setCurForm(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > ()); // -> wegnehmen ...
+ }
+ GetExplModel()->Remove(pCurrent, sal_True);
+ }
+ pFormModel->EndUndo();
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::CollectSelectionData(SELDATA_ITEMS sdiHow)
+{
+ DBG_ASSERT(sdiHow != SDI_DIRTY, "FmExplorer::CollectSelectionData : ever thought about your parameter ? DIRTY ?");
+ if (sdiHow == m_sdiState)
+ return;
+
+ m_arrCurrentSelection.Remove((sal_uInt16)0, m_arrCurrentSelection.Count());
+ m_nFormsSelected = m_nControlsSelected = m_nHiddenControls = 0;
+ m_bRootSelected = sal_False;
+
+ SvLBoxEntry* pSelectionLoop = FirstSelected();
+ while (pSelectionLoop)
+ {
+ // erst mal die Zaehlung der verschiedenen Elemente
+ if (pSelectionLoop == m_pRootEntry)
+ m_bRootSelected = sal_True;
+ else
+ {
+ if (IsFormEntry(pSelectionLoop))
+ ++m_nFormsSelected;
+ else
+ {
+ ++m_nControlsSelected;
+ if (IsHiddenControl((FmEntryData*)(pSelectionLoop->GetUserData())))
+ ++m_nHiddenControls;
+ }
+ }
+
+ if (sdiHow == SDI_NORMALIZED)
+ {
+ // alles, was schon einen selektierten Vorfahr hat, nicht mitnehmen
+ if (pSelectionLoop == m_pRootEntry)
+ m_arrCurrentSelection.Insert(pSelectionLoop);
+ else
+ {
+ SvLBoxEntry* pParentLoop = GetParent(pSelectionLoop);
+ while (pParentLoop)
+ {
+ // eigentlich muesste ich testen, ob das Parent in der m_arrCurrentSelection steht ...
+ // Aber wenn es selektiert ist, dann steht es in m_arrCurrentSelection, oder wenigstens einer seiner Vorfahren,
+ // wenn der auch schon selektiert war. In beiden Faellen reicht also die Abfrage IsSelected
+ if (IsSelected(pParentLoop))
+ break;
+ else
+ {
+ if (m_pRootEntry == pParentLoop)
+ {
+ // bis (exclusive) zur Root gab es kein selektiertes Parent -> der Eintrag gehoert in die normalisierte Liste
+ m_arrCurrentSelection.Insert(pSelectionLoop);
+ break;
+ }
+ else
+ pParentLoop = GetParent(pParentLoop);
+ }
+ }
+ }
+ }
+ else if (sdiHow == SDI_NORMALIZED_FORMARK)
+ {
+ SvLBoxEntry* pParent = GetParent(pSelectionLoop);
+ if (!pParent || !IsSelected(pParent) || IsFormEntry(pSelectionLoop))
+ m_arrCurrentSelection.Insert(pSelectionLoop);
+ }
+ else
+ m_arrCurrentSelection.Insert(pSelectionLoop);
+
+
+ pSelectionLoop = NextSelected(pSelectionLoop);
+ }
+
+ m_sdiState = sdiHow;
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::SynchronizeSelection(FmEntryDataArray& arredToSelect)
+{
+ LockSelectionHandling();
+ if (arredToSelect.Count() == 0)
+ {
+ SelectAll(sal_False);
+ }
+ else
+ {
+ // erst mal gleiche ich meine aktuelle Selektion mit der geforderten SelectList ab
+ SvLBoxEntry* pSelection = FirstSelected();
+ while (pSelection)
+ {
+ FmEntryData* pCurrent = (FmEntryData*)pSelection->GetUserData();
+ if (pCurrent != NULL)
+ {
+ sal_uInt16 nPosition;
+ if ( arredToSelect.Seek_Entry(pCurrent, &nPosition) )
+ { // der Entry ist schon selektiert, steht aber auch in der SelectList -> er kann aus letzterer
+ // raus
+ arredToSelect.Remove(nPosition, 1);
+ } else
+ { // der Entry ist selektiert, aber steht nicht in der SelectList -> Selektion rausnehmen
+ Select(pSelection, sal_False);
+ // und sichtbar machen (kann ja sein, dass das die einzige Modifikation ist, die ich hier in dem
+ // ganzen Handler mache, dann sollte das zu sehen sein)
+ MakeVisible(pSelection);
+ }
+ }
+ else
+ Select(pSelection, sal_False);
+
+ pSelection = NextSelected(pSelection);
+ }
+
+ // jetzt habe ich in der SelectList genau die Eintraege, die noch selektiert werden muessen
+ // zwei Moeglichkeiten : 1) ich gehe durch die SelectList, besorge mir zu jedem Eintrag meinen SvLBoxEntry
+ // und selektiere diesen (waere irgendwie intuitiver ;)) 2) ich gehe durch alle meine SvLBoxEntries und selektiere
+ // genau die, die ich in der SelectList finde
+ // 1) braucht O(k*n) (k=Laenge der SelectList, n=Anzahl meiner Entries), plus den Fakt, dass FindEntry nicht den
+ // Pointer auf die UserDaten vergleicht, sondern ein aufwendigeres IsEqualWithoutChilds durchfuehrt
+ // 2) braucht O(n*log k), dupliziert aber etwas Code (naemlich den aus FindEntry)
+ // da das hier eine relativ oft aufgerufenen Stelle sein koennte (bei jeder Aenderung in der Markierung in der ::com::sun::star::sdbcx::View !),
+ // nehme ich doch lieber letzteres
+ SvLBoxEntry* pLoop = First();
+ while( pLoop )
+ {
+ FmEntryData* pCurEntryData = (FmEntryData*)pLoop->GetUserData();
+ sal_uInt16 nPosition;
+ if ( arredToSelect.Seek_Entry(pCurEntryData, &nPosition) )
+ {
+ Select(pLoop, sal_True);
+ MakeVisible(pLoop);
+ SetCursor(pLoop, sal_True);
+ }
+
+ pLoop = Next( pLoop );
+ }
+ }
+ UnlockSelectionHandling();
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::SynchronizeSelection()
+{
+ // Shell und ::com::sun::star::sdbcx::View
+ FmFormShell* pFormShell = GetExplModel()->GetFormShell();
+ if(!pFormShell) return;
+
+ FmFormView* pFormView = pFormShell->GetFormView();
+ if (!pFormView) return;
+
+ GetExplModel()->BroadcastMarkedObjects(pFormView->GetMarkList());
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::SynchronizeMarkList()
+{
+ // die Shell werde ich brauchen ...
+ FmFormShell* pFormShell = GetExplModel()->GetFormShell();
+ if (!pFormShell) return;
+
+ CollectSelectionData(SDI_NORMALIZED_FORMARK);
+
+ // Die ::com::sun::star::sdbcx::View soll jetzt kein Notify bei einer Aenderung der MarkList rauslassen
+ pFormShell->GetImpl()->EnableTrackProperties(sal_False);
+
+ UnmarkAllViewObj();
+
+ for (sal_uInt32 i=0; i<m_arrCurrentSelection.Count(); ++i)
+ {
+ SvLBoxEntry* pSelectionLoop = m_arrCurrentSelection.GetObject(i);
+ // Bei Formselektion alle Controls dieser ::com::sun::star::form::Form markieren
+ if (IsFormEntry(pSelectionLoop) && (pSelectionLoop != m_pRootEntry))
+ MarkViewObj((FmFormData*)pSelectionLoop->GetUserData(), sal_True, sal_False);
+
+ // Bei Controlselektion Control-SdrObjects markieren
+ else if (IsFormComponentEntry(pSelectionLoop))
+ {
+ FmControlData* pControlData = (FmControlData*)pSelectionLoop->GetUserData();
+ if (pControlData)
+ {
+ /////////////////////////////////////////////////////////////////
+ // Beim ::com::sun::star::form::HiddenControl kann kein Object selektiert werden
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent( pControlData->GetFormComponent());
+ if (!xFormComponent.is())
+ continue;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(xFormComponent, ::com::sun::star::uno::UNO_QUERY);
+ if (!xSet.is())
+ continue;
+
+ sal_uInt16 nClassId = ::utl::getINT16(xSet->getPropertyValue(FM_PROP_CLASSID));
+ if (nClassId != ::com::sun::star::form::FormComponentType::HIDDENCONTROL)
+ MarkViewObj(pControlData, sal_True, sal_True);
+ }
+ }
+ }
+
+ // wenn der PropertyBrowser offen ist, muss ich den entsprechend meiner Selektion anpassen
+ // (NICHT entsprechend der MarkList der ::com::sun::star::sdbcx::View : wenn ich ein Formular selektiert habe, sind in der
+ // ::com::sun::star::sdbcx::View alle zugehoerigen Controls markiert, trotzdem moechte ich natuerlich die Formular-Eigenschaften
+ // sehen)
+ ShowSelectionProperties(sal_False);
+
+ // Flag an ::com::sun::star::sdbcx::View wieder zuruecksetzen
+ pFormShell->GetImpl()->EnableTrackProperties(sal_True);
+
+ // wenn jetzt genau eine ::com::sun::star::form::Form selektiert ist, sollte die Shell das als CurrentForm mitbekommen
+ // (wenn SelectionHandling nicht locked ist, kuemmert sich die ::com::sun::star::sdbcx::View eigentlich in MarkListHasChanged drum,
+ // aber der Mechanismus greift zum Beispiel nicht, wenn die ::com::sun::star::form::Form leer ist)
+ if ((m_arrCurrentSelection.Count() == 1) && (m_nFormsSelected == 1))
+ {
+ FmEntryData* pSingleSelectionData = (FmEntryData*)(FirstSelected()->GetUserData());
+ pFormShell->GetImpl()->setCurForm(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > (pSingleSelectionData->GetElement(), ::com::sun::star::uno::UNO_QUERY));
+ }
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorer::IsHiddenControl(FmEntryData* pEntryData)
+{
+ if (pEntryData == NULL) return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xProperties(pEntryData->GetElement(), ::com::sun::star::uno::UNO_QUERY);
+ if (::utl::hasProperty(FM_PROP_CLASSID, xProperties))
+ {
+ ::com::sun::star::uno::Any aClassID = xProperties->getPropertyValue( FM_PROP_CLASSID );
+ return (::utl::getINT16(aClassID) == ::com::sun::star::form::FormComponentType::HIDDENCONTROL);
+ }
+ return sal_False;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmExplorer::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
+{
+ if (bSelect == IsSelected(pEntry)) // das passiert manchmal, ich glaube, die Basisklasse geht zu sehr auf Nummer sicher ;)
+ return sal_True;
+
+ return SvTreeListBox::Select(pEntry, bSelect );
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::UnmarkAllViewObj()
+{
+ FmFormShell* pFormShell = GetExplModel()->GetFormShell();
+ if( !pFormShell )
+ return;
+ FmFormView* pFormView = pFormShell->GetFormView();
+ pFormView->UnMarkAll();
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::MarkViewObj( FmFormData* pFormData, sal_Bool bMark, sal_Bool bDeep )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Alle Controls der ::com::sun::star::form::Form markieren
+ FmEntryDataList* pChildList = pFormData->GetChildList();
+ FmEntryData* pEntryData;
+ FmControlData* pControlData;
+
+ for( sal_uInt32 i=0; i<pChildList->Count(); i++ )
+ {
+ pEntryData = pChildList->GetObject(i);
+ if( pEntryData->ISA(FmControlData) )
+ {
+ pControlData = (FmControlData*)pEntryData;
+ MarkViewObj( pControlData, (i==pChildList->Count()-1), bMark );
+ } else if (bDeep && (pEntryData->ISA(FmFormData)))
+ MarkViewObj((FmFormData*)pEntryData, bMark, bDeep);
+ }
+}
+
+//------------------------------------------------------------------------
+void FmExplorer::MarkViewObj( FmControlData* pControlData, sal_Bool bMarkHandles, sal_Bool bMark)
+{
+ if( !pControlData ) return;
+ FmFormShell* pFormShell = GetExplModel()->GetFormShell();
+ if( !pFormShell ) return;
+
+ //////////////////////////////////////////////////////////////////////
+ // In der Page das entsprechende SdrObj finden und selektieren
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent( pControlData->GetFormComponent());
+ FmFormView* pFormView = pFormShell->GetFormView();
+ SdrPageView* pPageView = pFormView->GetPageViewPvNum(0);
+ SdrPage* pPage = pPageView->GetPage();
+
+ SdrObjListIter aIter( *pPage );
+ while( aIter.IsMore() )
+ {
+ SdrObject* pObj = aIter.Next();
+
+ //////////////////////////////////////////////////////////////////////
+ // Es interessieren nur Uno-Objekte
+ if( pObj->IsUnoObj() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xControlModel(((SdrUnoObj*)pObj)->GetUnoControlModel());
+
+ //////////////////////////////////////////////////////////////////////
+ // Ist dieses Objekt ein ::com::sun::star::form::XFormComponent?
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormViewControl(xControlModel, ::com::sun::star::uno::UNO_QUERY);
+ if( !xFormViewControl.is() )
+ return;
+
+ if (xFormViewControl == xFormComponent )
+ {
+ // Objekt markieren
+ if (bMark != pFormView->IsObjMarked(pObj))
+ // der Writer mag das leider nicht, wenn schon markierte Objekte noch mal markiert werden ...
+ pFormView->MarkObj( pObj, pPageView, !bMark, sal_False );
+
+ // Markierung in allen Fenstern in den sichtbaren Bereich verschieben
+ if( bMarkHandles && bMark)
+ {
+ Rectangle aMarkRect( pFormView->GetAllMarkedRect());
+
+ for( sal_uInt16 i=0; i<pFormView->GetWinCount(); i++ )
+ pFormView->MakeVisible( aMarkRect, *(Window*)pFormView->GetWin(i) );
+ }
+ }
+ }
+ }
+}
+
+
+//========================================================================
+// class FmExplorerWin
+//========================================================================
+DBG_NAME(FmExplorerWin);
+//------------------------------------------------------------------------
+FmExplorerWin::FmExplorerWin( SfxBindings *pBindings, SfxChildWindow *pMgr,
+ Window* pParent )
+ :SfxDockingWindow( pBindings, pMgr, pParent, WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_ROLLABLE|WB_3DLOOK|WB_DOCKABLE) )
+ ,SfxControllerItem( SID_FM_FMEXPLORER_CONTROL, *pBindings )
+{
+ DBG_CTOR(FmExplorerWin,NULL);
+ SetHelpId( HID_FORM_NAVIGATOR_WIN );
+
+ m_pFmExplorer = new FmExplorer( this );
+ m_pFmExplorer->Show();
+ SetText( SVX_RES(RID_STR_FMEXPLORER) );
+ SetSizePixel( Size(200,200) );
+}
+
+//------------------------------------------------------------------------
+FmExplorerWin::~FmExplorerWin()
+{
+ delete m_pFmExplorer;
+ DBG_DTOR(FmExplorerWin,NULL);
+}
+
+//-----------------------------------------------------------------------
+void FmExplorerWin::Update( FmFormShell* pFormShell )
+{
+ m_pFmExplorer->Update( pFormShell );
+}
+
+//-----------------------------------------------------------------------
+void FmExplorerWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
+{
+ if( !pState || SID_FM_FMEXPLORER_CONTROL != nSID )
+ return;
+
+ if( eState >= SFX_ITEM_AVAILABLE )
+ {
+ FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() );
+ Update( pShell );
+ }
+ else
+ Update( NULL );
+}
+
+//-----------------------------------------------------------------------
+sal_Bool FmExplorerWin::Close()
+{
+ Update( NULL );
+ return SfxDockingWindow::Close();
+}
+
+//-----------------------------------------------------------------------
+void FmExplorerWin::FillInfo( SfxChildWinInfo& rInfo ) const
+{
+ SfxDockingWindow::FillInfo( rInfo );
+ rInfo.bVisible = sal_False;
+}
+
+//-----------------------------------------------------------------------
+Size FmExplorerWin::CalcDockingSize( SfxChildAlignment eAlign )
+{
+ Size aSize = SfxDockingWindow::CalcDockingSize( eAlign );
+
+ switch( eAlign )
+ {
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_BOTTOM:
+ return Size();
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_RIGHT:
+ break;
+ }
+
+ return aSize;
+}
+
+//-----------------------------------------------------------------------
+SfxChildAlignment FmExplorerWin::CheckAlignment( SfxChildAlignment eActAlign, SfxChildAlignment eAlign )
+{
+ switch (eAlign)
+ {
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_NOALIGNMENT:
+ return (eAlign);
+ }
+
+ return (eActAlign);
+}
+
+//------------------------------------------------------------------------
+void FmExplorerWin::Resize()
+{
+ SfxDockingWindow::Resize();
+
+ Size aLogOutputSize = PixelToLogic( GetOutputSizePixel(), MAP_APPFONT );
+ Size aLogExplSize = aLogOutputSize;
+ aLogExplSize.Width() -= 6;
+ aLogExplSize.Height() -= 6;
+
+ Point aExplPos = LogicToPixel( Point(3,3), MAP_APPFONT );
+ Size aExplSize = LogicToPixel( aLogExplSize, MAP_APPFONT );
+
+ m_pFmExplorer->SetPosSizePixel( aExplPos, aExplSize );
+}
+
+
+//========================================================================
+// class FmExplorerWinMgr
+//========================================================================
+
+//-----------------------------------------------------------------------
+SFX_IMPL_DOCKINGWINDOW( FmExplorerWinMgr, SID_FM_SHOW_FMEXPLORER )
+
+//-----------------------------------------------------------------------
+FmExplorerWinMgr::FmExplorerWinMgr( Window *pParent, sal_uInt16 nId,
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo )
+ :SfxChildWindow( pParent, nId )
+{
+ pWindow = new FmExplorerWin( pBindings, this, pParent );
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+ ((SfxDockingWindow*)pWindow)->Initialize( pInfo );
+}
+
diff --git a/svx/source/form/fmexpl.src b/svx/source/form/fmexpl.src
new file mode 100644
index 0000000000..b35e3ef54a
--- /dev/null
+++ b/svx/source/form/fmexpl.src
@@ -0,0 +1,898 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmexpl.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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"
+#include "fmresids.hrc"
+#include "fmexpl.hrc"
+Menu RID_FMEXPLORER_POPUPMENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_NEW ;
+ HelpID = SID_FM_NEW ;
+ Text = "~Neu" ;
+ Text [ ENGLISH ] = "~New" ;
+ Text [ portuguese ] = "Novo" ;
+ Text [ english_us ] = "~New" ;
+ Text [ portuguese_brazilian ] = "Neu" ;
+ Text [ swedish ] = "~Nytt" ;
+ Text [ danish ] = "~Ny(t)" ;
+ Text [ italian ] = "Nuovo" ;
+ Text [ spanish ] = "N~uevo" ;
+ Text [ french ] = "Nouveau" ;
+ Text [ dutch ] = "~Nieuw" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_NEW_FORM ;
+ HelpID = SID_FM_NEW_FORM ;
+ Text = "~Formular" ;
+ Text [ ENGLISH ] = "~Form" ;
+ Text [ english_us ] = "Form" ;
+ Text [ portuguese_brazilian ] = "Formular" ;
+ Text [ swedish ] = "~Formulär" ;
+ Text [ danish ] = "~Formular" ;
+ Text [ italian ] = "Formulario" ;
+ Text [ spanish ] = "~Formulario" ;
+ Text [ french ] = "~Formulaire" ;
+ Text [ dutch ] = "~Formulier" ;
+ Text [ portuguese ] = "~Formulário" ;
+ Text[ chinese_simplified ] = "±íµ¥";
+ Text[ russian ] = "~Ôîðìóëÿð";
+ Text[ polish ] = "Formularz";
+ Text[ japanese ] = "Ì«°Ñ";
+ Text[ chinese_traditional ] = "ªí³æ";
+ Text[ arabic ] = "ÇÓÊãÇÑÉ";
+ Text[ greek ] = "~Öüñìá";
+ Text[ korean ] = "¿ëÁö";
+ Text[ turkish ] = "Form";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_NEW_HIDDEN ;
+ HelpID = SID_FM_NEW_HIDDEN ;
+ Text = "~verstecktes Control" ;
+ Text [ ENGLISH ] = "~Hidden control" ;
+ Text [ english_us ] = "Hidden Control" ;
+ Text [ portuguese_brazilian ] = "Hidden Control" ;
+ Text [ swedish ] = "~Dold kontroll" ;
+ Text [ danish ] = "Skjult kontrol" ;
+ Text [ italian ] = "Controllo nascosto" ;
+ Text [ spanish ] = "~Control oculto" ;
+ Text [ french ] = "C~ontrôle caché" ;
+ Text [ dutch ] = "~verborgen controle" ;
+ Text [ portuguese ] = "Controlo o~culto" ;
+ Text[ chinese_simplified ] = "ÒþÈë¿ØÖÆ";
+ Text[ russian ] = "Ñêðûòûé ýëåìåíò óïðàâëåíèÿ";
+ Text[ polish ] = "Ukryty formant";
+ Text[ japanese ] = "‰B‚µºÝÄÛ°Ù";
+ Text[ chinese_traditional ] = "Áô¤J±±¨î";
+ Text[ arabic ] = "ÚäÕÑ ÊÍßã ãÎÝí";
+ Text[ greek ] = "Êñõ~öü óôïé÷åßï åëÝã÷ïõ";
+ Text[ korean ] = "¼û°ÜÁø ÄÁÆ®·Ñ";
+ Text[ turkish ] = "Gizli komut alaný";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "н¨(~N)";
+ Text[ russian ] = "Ñîçä~àòü";
+ Text[ polish ] = "~Nowy";
+ Text[ japanese ] = "V‹Kì¬(~N)";
+ Text[ chinese_traditional ] = "¶}±Ò·sÀÉ(~N)";
+ Text[ arabic ] = "~ÌÏíÏ";
+ Text[ greek ] = "~Äçìéïõñãßá";
+ Text[ korean ] = "»õ·Î(~N)";
+ Text[ turkish ] = "~Yeni";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Text = "Ersetzen durch";
+ Text [ ENGLISH ] = "Ersetzen durch";
+ Identifier = SID_FM_CHANGECONTROLTYPE ;
+ HelpID = SID_FM_CHANGECONTROLTYPE ;
+ Text[ english_us ] = "Replace with";
+ Text[ portuguese ] = "Substituir por";
+ Text[ russian ] = "Çàìåíèòü íà";
+ Text[ greek ] = "ÁíôéêáôÜóôáóç ìå";
+ Text[ dutch ] = "Vervangen door";
+ Text[ french ] = "Remplacer par";
+ Text[ spanish ] = "Reemplazar con";
+ Text[ italian ] = "Sostituisci con";
+ Text[ danish ] = "Erstat med";
+ Text[ swedish ] = "Ersätt med";
+ Text[ polish ] = "Zamieñ na";
+ Text[ portuguese_brazilian ] = "Ersetzen durch";
+ Text[ japanese ] = "’u‚«Š·‚¦";
+ Text[ korean ] = "´Ù¸¥ °ÍÀ¸·Î ¹Ù²Ù±â";
+ Text[ chinese_simplified ] = "Ì滻Ϊ";
+ Text[ chinese_traditional ] = "´À¥N¥Î";
+ Text[ arabic ] = "ÇÓÊÈÏÇá ÈÜ";
+ Text[ turkish ] = "Þununla deðiþtir...";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_DELETE ;
+ HelpID = SID_FM_DELETE ;
+ Text = "~Löschen" ;
+ Text [ ENGLISH ] = "~Delete" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ portuguese_brazilian ] = "Löschen" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "~Slet" ;
+ Text [ italian ] = "Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "Wi~ssen" ;
+ 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 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_TAB_DIALOG ;
+ HelpID = SID_FM_TAB_DIALOG ;
+ Text = "~Aktivierungsreihenfolge ..." ;
+ Text [ ENGLISH ] = "~Tab order ..." ;
+ Text [ portuguese ] = "Sequência de ~activação..." ;
+ Text [ english_us ] = "Tab Order..." ;
+ Text [ portuguese_brazilian ] = "Sortierung" ;
+ Text [ swedish ] = "~Ordningsföljd för aktivering..." ;
+ Text [ danish ] = "Aktiveringsrækkefølge..." ;
+ Text [ italian ] = "Sequenza di attivazione..." ;
+ Text [ spanish ] = "~Secuencia de activación..." ;
+ Text [ french ] = "Séquence d'activation ..." ;
+ Text [ dutch ] = "Volgorde van a~ctivering" ;
+ Text[ chinese_simplified ] = "ÂÖ»»Ë³Ðò...";
+ Text[ russian ] = "Ïîðÿäîê àêòèâèðîâàíèÿ";
+ Text[ polish ] = "KolejnoϾ aktywacji";
+ Text[ japanese ] = "ÀÌÞµ°ÀÞ°...";
+ Text[ chinese_traditional ] = "½ü´«¶¶§Ç...";
+ Text[ arabic ] = "ÊÑÊíÈ ÇáÊäÔíØ...";
+ Text[ greek ] = "Ó~åéñÜ åíåñãïðïßçóçò...";
+ Text[ korean ] = "ÅÇ ¼ø¼­...";
+ Text[ turkish ] = "Etkinleþtirme sýrasý...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_RENAME_OBJECT ;
+ HelpID = SID_FM_RENAME_OBJECT ;
+ Text = "~Umbenennen" ;
+ Text [ ENGLISH ] = "~Rename" ;
+ Text [ portuguese ] = "Mudar ~nome" ;
+ Text [ english_us ] = "~Rename" ;
+ Text [ portuguese_brazilian ] = "Umbenennen" ;
+ Text [ swedish ] = "~Byt namn" ;
+ Text [ danish ] = "Omdøb" ;
+ Text [ italian ] = "Rinomina" ;
+ Text [ spanish ] = "~Cambiar nombre" ;
+ Text [ french ] = "~Renommer" ;
+ Text [ dutch ] = "~Naam wijzigen" ;
+ Text[ chinese_simplified ] = "ÖØÃüÃû(~R)";
+ Text[ russian ] = "Ïåðåèìåíîâàòü";
+ Text[ polish ] = "Zmieñ nazwê";
+ Text[ japanese ] = "–¼‘O‚Ì•ÏX(~R)";
+ Text[ chinese_traditional ] = "­«·s©R¦W(~R)";
+ Text[ arabic ] = "ÅÚÇÏÉ ÊÓãíÉ";
+ Text[ greek ] = "~Ìåôïíïìáóßá";
+ Text[ korean ] = "À̸§ º¯°æ(~R)";
+ Text[ turkish ] = "Yeniden adlandýr";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_SHOW_PROPERTY_BROWSER ;
+ HelpID = SID_FM_SHOW_PROPERTY_BROWSER ;
+ Text = "~Eigenschaften" ;
+ Text [ ENGLISH ] = "~Properties" ;
+ Text [ portuguese ] = "~Propriedades" ;
+ Text [ english_us ] = "Propert~ies" ;
+ Text [ portuguese_brazilian ] = "Eigenschaften" ;
+ Text [ swedish ] = "~Egenskaper" ;
+ Text [ danish ] = "Egenskaber" ;
+ Text [ italian ] = "Proprietà" ;
+ Text [ spanish ] = "~Propiedades" ;
+ Text [ french ] = "~Propriétés" ;
+ Text [ dutch ] = "~Eigenschappen" ;
+ Text[ chinese_simplified ] = "ÊôÐÔ(~I)";
+ Text[ russian ] = "Ñâîéñòâà";
+ Text[ polish ] = "W³aœciwoœci";
+ Text[ japanese ] = "ÌßÛÊßè(~I)";
+ Text[ chinese_traditional ] = "ÄÝ©Ê(~I)";
+ Text[ arabic ] = "ÎÕÇÆÕ";
+ Text[ greek ] = "Éäéüôçô~åò";
+ Text[ korean ] = "µî·ÏÁ¤º¸(~I)";
+ Text[ turkish ] = "Özellikler";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_OPEN_READONLY ;
+ HelpID = SID_FM_OPEN_READONLY ;
+ Text = "Im Ent~wurfsmodus öffnen" ;
+ Text [ ENGLISH ] = "Open in ~designmode" ;
+ Text [ portuguese ] = "Abrir no modo Es~boço" ;
+ Text [ english_us ] = "Open in Design Mode" ;
+ Text [ portuguese_brazilian ] = "Im Entwurfsmodus öffnen" ;
+ Text [ swedish ] = "Öppna i ~utkastläge" ;
+ Text [ danish ] = "Åbn i udkasttilstand" ;
+ Text [ italian ] = "Apri nel modo bozza" ;
+ Text [ spanish ] = "~Abrir en modo diseño" ;
+ Text [ french ] = "Ouvrir en mode C~onception" ;
+ Text [ dutch ] = "In ~ontwerpmodus openen" ;
+ Text[ chinese_simplified ] = "ÓÃÉè¼Æģʽ´ò¿ª";
+ Text[ russian ] = "Îòêðûòü â ðåæèìå ïðîåêòà";
+ Text[ polish ] = "Otwórz w trybie projektu";
+ Text[ japanese ] = "‰º‘‚«Ó°ÄÞ‚ÅŠJ‚­";
+ Text[ chinese_traditional ] = "¶}±Ò³]­p¼Ò¦¡";
+ Text[ arabic ] = "ÝÊÍ Ýí æÖÚ ÇáÊÕãíã";
+ Text[ greek ] = "¢íïéãìá óå êáôÜóôáóç ó~÷åäéáóìïý";
+ Text[ korean ] = "¼³°è ¸ðµå¿¡¼­ ¿­±â";
+ Text[ turkish ] = "Tasarým kipinde aç";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
+
+Menu RID_FMSHELL_CONVERSIONMENU
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_EDIT ;
+ HelpID = SID_FM_CONVERTTO_EDIT ;
+ Text = "~Textfeld" ;
+ Text [ ENGLISH ] = "~TextField" ;
+ Text[ english_us ] = "~Text Box";
+ Text[ portuguese ] = "~Campo de texto";
+ Text[ russian ] = "Òåêñòîâîå ïîëå";
+ Text[ greek ] = "Ðåäßï ~êåéìÝíïõ";
+ Text[ dutch ] = "~Tekstveld";
+ Text[ french ] = "Zone de ~texte";
+ Text[ spanish ] = "~Campo de texto";
+ Text[ italian ] = "Campo di ~testo";
+ Text[ danish ] = "Tekstfelt";
+ Text[ swedish ] = "~Textfält";
+ Text[ polish ] = "Pole tekstowe";
+ Text[ portuguese_brazilian ] = "~TextField";
+ Text[ japanese ] = "÷½ÄÎÞ¯¸½(~T)";
+ Text[ korean ] = "ÅؽºÆ® »óÀÚ(~T)";
+ Text[ chinese_simplified ] = "Îı¾¿ò(~T)";
+ Text[ chinese_traditional ] = "¤å¦rÄæ(~T)";
+ Text[ arabic ] = "ÍÞá äÕ";
+ Text[ turkish ] = "Metin alaný";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_BUTTON ;
+ HelpID = SID_FM_CONVERTTO_BUTTON ;
+ Text = "~Schältfläche" ;
+ Text [ ENGLISH ] = "~Button" ;
+ Text[ english_us ] = "~Button";
+ Text[ portuguese ] = "~Botão";
+ Text[ russian ] = "Êëàâèøà";
+ Text[ greek ] = "Ðåäßï åðéëïãÞ~ò";
+ Text[ dutch ] = "~Knop";
+ Text[ french ] = "~Bouton";
+ Text[ spanish ] = "~Botón";
+ Text[ italian ] = "~Pulsante";
+ Text[ danish ] = "Knap";
+ Text[ swedish ] = "~Kommandoknapp";
+ Text[ polish ] = "Przycisk";
+ Text[ portuguese_brazilian ] = "~Button";
+ Text[ japanese ] = "ÎÞÀÝ(~B)";
+ Text[ korean ] = "¹öÆ°(~B)";
+ Text[ chinese_simplified ] = "°´Å¥(~B)";
+ Text[ chinese_traditional ] = "«ö¶s(~B)";
+ Text[ arabic ] = "ÒÑ ÖÛØ";
+ Text[ turkish ] = "Düðme";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_FIXEDTEXT ;
+ HelpID = SID_FM_CONVERTTO_FIXEDTEXT ;
+ Text = "~Beschriftungsfeld" ;
+ Text [ ENGLISH ] = "~Label" ;
+ Text[ english_us ] = "La~bel field";
+ Text[ portuguese ] = "Campo de ~rótulo";
+ Text[ russian ] = "~Íàäïèñü";
+ Text[ greek ] = "Ðåäßï å~ðéãñáöÞò";
+ Text[ dutch ] = "~Titelveld";
+ Text[ french ] = "~Champ d'étiquette";
+ Text[ spanish ] = "~Campo de etiqueta";
+ Text[ italian ] = "Testo ~fisso";
+ Text[ danish ] = "Etiketfelt";
+ Text[ swedish ] = "~Etikettfält";
+ Text[ polish ] = "Pole etykiety";
+ Text[ portuguese_brazilian ] = "~Label";
+ Text[ japanese ] = "×ÍÞŲ̀°ÙÄÞ(~C)";
+ Text[ korean ] = "¶óº§ Çʵå(~B)";
+ Text[ chinese_simplified ] = "±êÇ©À¸(~B)";
+ Text[ chinese_traditional ] = "¼ÐÅÒÄæ¦ì(~C)";
+ Text[ arabic ] = "ÍÞá ÚäæäÉ";
+ Text[ turkish ] = "Etiket alaný";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_GROUPBOX ;
+ HelpID = SID_FM_CONVERTTO_GROUPBOX ;
+ Text = "~Gruppierungsrahmen" ;
+ Text [ ENGLISH ] = "F~rameControl" ;
+ Text[ english_us ] = "G~roup Box";
+ Text[ portuguese ] = "Campo de g~rupo";
+ Text[ russian ] = "Ðàìêà ãðóïïû";
+ Text[ greek ] = "Ðëáßóéï ~ïìáäïðïßçóçò";
+ Text[ dutch ] = "~Groepskader";
+ Text[ french ] = "Zone de ~groupe";
+ Text[ spanish ] = "~Marco de grupo";
+ Text[ italian ] = "Casella di ~gruppo";
+ Text[ danish ] = "Gruppeboks";
+ Text[ swedish ] = "~Grupperingsram";
+ Text[ polish ] = "Pole grupy";
+ Text[ portuguese_brazilian ] = "F~rameControl";
+ Text[ japanese ] = "¸ÞÙ°ÌßÎÞ¯¸½(~R)";
+ Text[ korean ] = "±×·ì ¹Ú½º(~R)";
+ Text[ chinese_simplified ] = "С×é¿ò(~R)";
+ Text[ chinese_traditional ] = "¸s²Õ®Ø(~R)";
+ Text[ arabic ] = "ÅØÇÑ ÊÌãíÚ";
+ Text[ turkish ] = "Grup çerçevesi";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_LISTBOX ;
+ HelpID = SID_FM_CONVERTTO_LISTBOX ;
+ Text = "~Listenfeld" ;
+ Text [ ENGLISH ] = "L~ist Box" ;
+ Text[ english_us ] = "L~ist Box";
+ Text[ portuguese ] = "Caixa de ~listagem";
+ Text[ russian ] = "Ñïèñîê";
+ Text[ greek ] = "Ðåäßï ~ëßóôáò";
+ Text[ dutch ] = "Ke~uzelijst";
+ Text[ french ] = "Zone de ~liste";
+ Text[ spanish ] = "L~istado";
+ Text[ italian ] = "~Casella di riepilogo";
+ Text[ danish ] = "Rulleliste";
+ Text[ swedish ] = "L~istruta";
+ Text[ polish ] = "Pole listy";
+ Text[ portuguese_brazilian ] = "L~ist Box";
+ Text[ japanese ] = "ؽÄÎÞ¯¸½(~I)";
+ Text[ korean ] = "¸ñ·Ï Çʵå(~I)";
+ Text[ chinese_simplified ] = "Áбí¿ò(~I)";
+ Text[ chinese_traditional ] = "²M³æ¤è®Ø(~I)";
+ Text[ arabic ] = "ãÑÈÚ ÞÇÆãÉ";
+ Text[ turkish ] = "Liste alaný";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_CHECKBOX ;
+ HelpID = SID_FM_CONVERTTO_CHECKBOX ;
+ Text = "~Markierfeld" ;
+ Text [ ENGLISH ] = "~Check Box" ;
+ Text[ english_us ] = "~Check Box";
+ Text[ portuguese ] = "Caixa de ~verificação";
+ Text[ russian ] = "Îêíî ôëàæêà";
+ Text[ greek ] = "Ðåäßï óÞ~ìáíóçò";
+ Text[ dutch ] = "~Markeerveld";
+ Text[ french ] = "~Case à cocher";
+ Text[ spanish ] = "~Casilla de verificación";
+ Text[ italian ] = "Casella di controllo";
+ Text[ danish ] = "Afkrydsningsfelt";
+ Text[ swedish ] = "~Markeringsfält";
+ Text[ polish ] = "Pole wyboru";
+ Text[ portuguese_brazilian ] = "~Check Box";
+ Text[ japanese ] = "Áª¯¸ÎÞ¯¸½(~C)";
+ Text[ korean ] = "È®Àζõ(~C)";
+ Text[ chinese_simplified ] = "¸´Ñ¡¿ò(~C)";
+ Text[ chinese_traditional ] = "®Ö¨ú¤è¶ô(~C)";
+ Text[ arabic ] = "ÎÇäÉ ÇÎÊíÇÑ";
+ Text[ turkish ] = "Seçme kutusu";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_RADIOBUTTON ;
+ HelpID = SID_FM_CONVERTTO_RADIOBUTTON ;
+ Text = "~Optionsfeld" ;
+ Text [ ENGLISH ] = "~Option Button" ;
+ Text[ english_us ] = "~Radio Button";
+ Text[ portuguese ] = "Botão de ~selecção";
+ Text[ russian ] = "~Ïåðåêëþ÷àòåëü";
+ Text[ greek ] = "Ðåäß~ï åðéëïãÞò";
+ Text[ dutch ] = "~Optieveld";
+ Text[ french ] = "Bouton ~radio";
+ Text[ spanish ] = "~Botón radio";
+ Text[ italian ] = "Pulsante di scelta";
+ Text[ danish ] = "Alternativknap";
+ Text[ swedish ] = "~Alternativfält";
+ Text[ polish ] = "Pole opcji";
+ Text[ portuguese_brazilian ] = "~Option Button";
+ Text[ japanese ] = "×¼ÞµÎÞÀÝ(~R)";
+ Text[ korean ] = "¿É¼Ç Çʵå(~R)";
+ Text[ chinese_simplified ] = "Ñ¡Ïî°´Å¥(~R)";
+ Text[ chinese_traditional ] = "¿ï¶µÄæ(~R)";
+ Text[ arabic ] = "ÒÑ ÎíÇÑ";
+ Text[ turkish ] = "Seçenek düðmesi";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_COMBOBOX ;
+ HelpID = SID_FM_CONVERTTO_COMBOBOX ;
+ Text = "~Kombinationsfeld" ;
+ Text [ ENGLISH ] = "Combo Bo~x" ;
+ Text[ english_us ] = "Combo Bo~x";
+ Text[ portuguese ] = "Caixa de com~binação";
+ Text[ russian ] = "Ïîëå ñî ñïèñêîì";
+ Text[ greek ] = "Ðåäßï ~óõíäõáóìïý";
+ Text[ dutch ] = "~Combinatieveld";
+ Text[ french ] = "Zone ~combinée";
+ Text[ spanish ] = "Ca~mpo combinado";
+ Text[ italian ] = "Casella com~binata";
+ Text[ danish ] = "Kombinationsboks";
+ Text[ swedish ] = "~Kombinationsfält";
+ Text[ polish ] = "Pole kombi";
+ Text[ portuguese_brazilian ] = "Combo Bo~x";
+ Text[ japanese ] = "ºÝÎÞÎÞ¯¸½(~X)";
+ Text[ korean ] = "ÄÞº¸ ¹Ú½º(~X)";
+ Text[ chinese_simplified ] = "×éºÏ¿ò(~X)";
+ Text[ chinese_traditional ] = "²Õ¦X¤è®Ø(~X)";
+ Text[ arabic ] = "ãÑÈÚ ÊÍÑíÑ æÓÑÏ";
+ Text[ turkish ] = "Kombinasyon alaný";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_IMAGEBUTTON ;
+ HelpID = SID_FM_CONVERTTO_IMAGEBUTTON ;
+ Text = "~Grafische Schaltfläche" ;
+ Text [ ENGLISH ] = "I~mage Button" ;
+ Text[ english_us ] = "I~mage Button";
+ Text[ portuguese ] = "Botão ~gráfico";
+ Text[ russian ] = "Ãðàôè÷åñêàÿ êíîïêà";
+ Text[ greek ] = "~Ãñáöéêü ðåäßï åíôïëÞò";
+ Text[ dutch ] = "~Afbeeldingenknop";
+ Text[ french ] = "Bouton ~imagé";
+ Text[ spanish ] = "Botón g~ráfico";
+ Text[ italian ] = "P~ulsante immagine";
+ Text[ danish ] = "Grafisk knap";
+ Text[ swedish ] = "G~rafisk knapp";
+ Text[ polish ] = "Przycisk graficzny";
+ Text[ portuguese_brazilian ] = "I~mage Button";
+ Text[ japanese ] = "²Ò°¼ÞÎÞÀÝ(~M)";
+ Text[ korean ] = "À̹ÌÁö ¹öÆ°(~M)";
+ Text[ chinese_simplified ] = "ͼÐΰ´Å¥(~M)";
+ Text[ chinese_traditional ] = "¹Ï§Î«ö¶s(~M)";
+ Text[ arabic ] = "ãÝÊÇÍ ãÕæøÑ";
+ Text[ turkish ] = "Grafiksel düðme";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_FILECONTROL ;
+ HelpID = SID_FM_CONVERTTO_FILECONTROL ;
+ Text = "~Dateiauswahl" ;
+ Text [ ENGLISH ] = "~File Selection" ;
+ Text[ english_us ] = "~File Selection";
+ Text[ portuguese ] = "~Selecção de ficheiro";
+ Text[ russian ] = "~Âûáîð ôàéëà";
+ Text[ greek ] = "ÅðéëïãÞ ~áñ÷åßïõ";
+ Text[ dutch ] = "~Bestandselectie";
+ Text[ french ] = "~Sélection de fichier";
+ Text[ spanish ] = "Selec~ción de archivo";
+ Text[ italian ] = "Scelta file";
+ Text[ danish ] = "Filudvalg";
+ Text[ swedish ] = "~Filurval";
+ Text[ polish ] = "Wybór plików";
+ Text[ portuguese_brazilian ] = "~File Selection";
+ Text[ japanese ] = "̧²Ù‘I‘ð(~F)";
+ Text[ korean ] = "ÆÄÀÏ ¼±ÅÃ(~F)";
+ Text[ chinese_simplified ] = "Ñ¡ÔñÎļþ(~F)";
+ Text[ chinese_traditional ] = "¿ï¾ÜÀÉ®×(~F)";
+ Text[ arabic ] = "ÇÎÊíÇÑ ÇáãáÝ";
+ Text[ turkish ] = "Dosya seçimi";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_DATE ;
+ HelpID = SID_FM_CONVERTTO_DATE ;
+ Text = "D~atumsfeld" ;
+ Text [ ENGLISH ] = "~Date Field" ;
+ Text[ english_us ] = "~Date Field";
+ Text[ portuguese ] = "Campo de d~ata";
+ Text[ russian ] = "Ïîëå äàòû";
+ Text[ greek ] = "Ðåäßï çìåñïìçíß~áò";
+ Text[ dutch ] = "~Datumveld";
+ Text[ french ] = "Champ de ~date";
+ Text[ spanish ] = "Campo de ~fecha";
+ Text[ italian ] = "Campo ~data";
+ Text[ danish ] = "Datofelt";
+ Text[ swedish ] = "~Datumfält";
+ Text[ polish ] = "Pole daty";
+ Text[ portuguese_brazilian ] = "~Date Field";
+ Text[ japanese ] = "“ú•t̨°ÙÄÞ(~D)";
+ Text[ korean ] = "³¯Â¥ Çʵå(~D)";
+ Text[ chinese_simplified ] = "ÈÕÆÚ×Ö¶Î(~D)";
+ Text[ chinese_traditional ] = "¤é´ÁÄæ(~D)";
+ Text[ arabic ] = "ÍÞá ÇáÊÇÑíÎ";
+ Text[ turkish ] = "Tarih alaný";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_TIME ;
+ HelpID = SID_FM_CONVERTTO_TIME ;
+ Text = "~Zeitfeld" ;
+ Text [ ENGLISH ] = "Tim~e Field" ;
+ Text[ english_us ] = "Tim~e Field";
+ Text[ portuguese ] = "Campo ~horário";
+ Text[ russian ] = "Ïîëå âðåìåíè";
+ Text[ greek ] = "Ðåäßï þ~ñáò";
+ Text[ dutch ] = "~Tijdveld";
+ Text[ french ] = "Champ ~horaire";
+ Text[ spanish ] = "Campo ~horario";
+ Text[ italian ] = "Campo ~orario";
+ Text[ danish ] = "Klokkeslætsfelt";
+ Text[ swedish ] = "~Tidsfält";
+ Text[ polish ] = "Pole czasu";
+ Text[ portuguese_brazilian ] = "Tim~e Field";
+ Text[ japanese ] = "ŽžŠǪ̂°ÙÄÞ(~E)";
+ Text[ korean ] = "½Ã°£ Çʵå(~E)";
+ Text[ chinese_simplified ] = "ʱ¼ä×Ö¶Î(~E)";
+ Text[ chinese_traditional ] = "®É¶¡Äæ(~E)";
+ Text[ arabic ] = "ÍÞá ÇáæÞÊ";
+ Text[ turkish ] = "Zaman alaný";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_NUMERIC ;
+ HelpID = SID_FM_CONVERTTO_NUMERIC ;
+ Text = "~Numerisches Feld" ;
+ Text [ ENGLISH ] = "~Numerical Field" ;
+ Text[ english_us ] = "~Numerical Field";
+ Text[ portuguese ] = "~Campo ~numérico";
+ Text[ russian ] = "×èñëîâîå ïîëå";
+ Text[ greek ] = "Áñé~èìçôéêü ðåäßï";
+ Text[ dutch ] = "~Numeriek veld";
+ Text[ french ] = "Champ ~numérique";
+ Text[ spanish ] = "C~ampo numérico";
+ Text[ italian ] = "Campo ~numerico";
+ Text[ danish ] = "Numerisk felt";
+ Text[ swedish ] = "~Numeriskt fält";
+ Text[ polish ] = "Pole numeryczne";
+ Text[ portuguese_brazilian ] = "~Numerical Field";
+ Text[ japanese ] = "”’l̨°ÙÄÞ(~N)";
+ Text[ korean ] = "¼ýÀÚ Çʵå(~N)";
+ Text[ chinese_simplified ] = "Êý×Ö×Ö¶Î(~N)";
+ Text[ chinese_traditional ] = "¼Æ¦rÄæ(~N)";
+ Text[ arabic ] = "ÍÞá ÑÞãí";
+ Text[ turkish ] = "Sayýsal alan";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_CURRENCY ;
+ HelpID = SID_FM_CONVERTTO_CURRENCY ;
+ Text = "~Währungsfeld" ;
+ Text [ ENGLISH ] = "C~urrency Field" ;
+ Text[ english_us ] = "C~urrency Field";
+ Text[ portuguese ] = "Campo de moe~da";
+ Text[ russian ] = "Ïîëå äëÿ âàëþòû";
+ Text[ greek ] = "Ðå~äßï íïìßóìáôïò";
+ Text[ dutch ] = "~Valutaveld";
+ Text[ french ] = "Champ ~monétaire";
+ Text[ spanish ] = "Cam~po de moneda";
+ Text[ italian ] = "Campo di ~valuta";
+ Text[ danish ] = "Valutafelt";
+ Text[ swedish ] = "V~alutafält";
+ Text[ polish ] = "Pole walutowe";
+ Text[ portuguese_brazilian ] = "C~urrency Field";
+ Text[ japanese ] = "’ʉÝ̨°ÙÄÞ(~U)";
+ Text[ korean ] = "ÅëÈ­ Çʵå(~U)";
+ Text[ chinese_simplified ] = "»õ±Ò×Ö¶Î(~U)";
+ Text[ chinese_traditional ] = "³f¹ôÄæ(~U)";
+ Text[ arabic ] = "ÍÞá ÇáÚãáÉ";
+ Text[ turkish ] = "Para birimi alaný";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_PATTERN ;
+ HelpID = SID_FM_CONVERTTO_PATTERN ;
+ Text = "Mask~iertes Feld" ;
+ Text [ ENGLISH ] = "~Pattern Field" ;
+ Text[ english_us ] = "~Pattern Field";
+ Text[ portuguese ] = "~Campo mascarado";
+ Text[ russian ] = "Ìàñêèðîâàííîå ïîëå";
+ Text[ greek ] = "Êáë~õììÝíï ðåäßï";
+ Text[ dutch ] = "~Patroonveld";
+ Text[ french ] = "Champ ~masqué";
+ Text[ spanish ] = "Campo s~eleccionado";
+ Text[ italian ] = "Campo a ~maschera";
+ Text[ danish ] = "Maskeret felt";
+ Text[ swedish ] = "~Maskerat fält";
+ Text[ polish ] = "Pole wzorca";
+ Text[ portuguese_brazilian ] = "~Pattern Field";
+ Text[ japanese ] = "ÊßÀ°Ý̨°ÙÄÞ(~P)";
+ Text[ korean ] = "ÆÐÅÏ Çʵå(~P)";
+ Text[ chinese_simplified ] = "ÑÚÂëÇø(~P)";
+ Text[ chinese_traditional ] = "±»½XÄæ(~P)";
+ Text[ arabic ] = "ÍÞá ãõÞäøóÚ";
+ Text[ turkish ] = "Maskelenmiþ alan";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_IMAGECONTROL ;
+ HelpID = SID_FM_CONVERTTO_IMAGECONTROL ;
+ Text = "G~rafisches Kontrollfeld" ;
+ Text [ ENGLISH ] = "Ima~ge Control" ;
+ Text[ english_us ] = "Ima~ge Control";
+ Text[ portuguese ] = "Controlo de i~magem";
+ Text[ russian ] = "Ãðàôè÷åñêèé ýëåìåíò óïðàâëåíèÿ";
+ Text[ greek ] = "Ã~ñáöéêü ðåäßï åëÝã÷ïõ";
+ Text[ dutch ] = "Grafisch c~ontroleveld";
+ Text[ french ] = "Champ de contrôle ~graphique";
+ Text[ spanish ] = "Control de ima~gen";
+ Text[ italian ] = "Campo di controllo ~immagine";
+ Text[ danish ] = "Grafisk kontrolelement";
+ Text[ swedish ] = "Gra~fiskt kontrollfält";
+ Text[ polish ] = "Pole graficzne kontrolne";
+ Text[ portuguese_brazilian ] = "Ima~ge Control";
+ Text[ japanese ] = "²Ò°¼ÞºÝÄÛ°Ų̀°ÙÄÞ(~G)";
+ Text[ korean ] = "À̹ÌÁö ÄÁÆ®·Ñ Çʵå(~G)";
+ Text[ chinese_simplified ] = "ͼʽ¿ØÖÆ×Ö¶Î(~G)";
+ Text[ chinese_traditional ] = "¹Ï¦¡±±¨î¶µ(~G)";
+ Text[ arabic ] = "ÚäÕÑ ÊÍßã ÑÓæãí";
+ Text[ turkish ] = "Grafiksel komut alaný";
+ };
+ MenuItem
+ {
+ Identifier = SID_FM_CONVERTTO_FORMATTED ;
+ HelpID = SID_FM_CONVERTTO_FORMATTED ;
+ Text = "~Formatiertes Feld" ;
+ Text [ ENGLISH ] = "Fo~rmatted Field" ;
+ Text[ english_us ] = "Fo~rmatted Field";
+ Text[ portuguese ] = "Campo ~formatado";
+ Text[ russian ] = "Îòôîðìàòèðîâàííîå ïîëå";
+ Text[ greek ] = "Ìïñ~öïðïéçìÝíï ðåäßï";
+ Text[ dutch ] = "Opge~maakt veld";
+ Text[ french ] = "~Champ formaté";
+ Text[ spanish ] = "Campo for~mateado";
+ Text[ italian ] = "Campo fo~rmattato";
+ Text[ danish ] = "Formateret felt";
+ Text[ swedish ] = "Fo~rmaterat fält";
+ Text[ polish ] = "Pole formatowane";
+ Text[ portuguese_brazilian ] = "Fo~rmatted Field";
+ Text[ japanese ] = "‘Ž®Ý’肳‚ꂽ̨°ÙÄÞ(~R)";
+ Text[ korean ] = "¼­½ÄÀÌ µÈ Çʵå(~R)";
+ Text[ chinese_simplified ] = "¸ñʽ»¯µÄÇøÓò(~R)";
+ Text[ chinese_traditional ] = "®æ¦¡¤ÆªºÄæ(~R)";
+ Text[ arabic ] = "ÍÞá ãõäÓøóÞ";
+ Text[ turkish ] = "Formatlý alan";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
+
+ImageList RID_SVXIMGLIST_FMEXPL
+{
+ ImageBitmap = Bitmap { File = "sx_form.bmp" ; };
+ MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; };
+ IdList =
+ {
+ RID_SVXIMG_BUTTON ;
+ RID_SVXIMG_RADIOBUTTON ;
+ RID_SVXIMG_CHECKBOX ;
+ RID_SVXIMG_FIXEDTEXT ;
+ RID_SVXIMG_GROUPBOX ;
+ RID_SVXIMG_EDIT ;
+ RID_SVXIMG_LISTBOX ;
+ RID_SVXIMG_COMBOBOX ;
+ RID_SVXIMG_URLBUTTON ;
+ RID_SVXIMG_CONTROL ;
+ RID_SVXIMG_FORM ;
+ RID_SVXIMG_FORMS ;
+ RID_SVXIMG_COLLAPSEDNODE ;
+ RID_SVXIMG_EXPANDEDNODE ;
+ RID_SVXIMG_IMAGEBUTTON ;
+ RID_SVXIMG_FILECONTROL ;
+ RID_SVXIMG_DATEFIELD ;
+ RID_SVXIMG_TIMEFIELD ;
+ RID_SVXIMG_NUMERICFIELD ;
+ RID_SVXIMG_CURRENCYFIELD ;
+ RID_SVXIMG_PATTERNFIELD ;
+ RID_SVXIMG_HIDDEN ;
+ RID_SVXIMG_IMAGECONTROL ;
+ RID_SVXIMG_GRID ;
+ RID_SVXIMG_FILTER ;
+ RID_SVXIMG_FORMATTEDFIELD ;
+ RID_SVXIMG_DATE_N_TIME_FIELDS ;
+ RID_SVXIMG_FIELD ;
+ RID_SVXIMG_ERROR ;
+ RID_SVXIMG_WARNING ;
+ RID_SVXIMG_INFO ;
+ };
+ IdCount = 31 ;
+};
+ModalDialog RID_SVXDLG_SETFORM
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 200 , 200 ) ;
+ Text = "Formularauswahl" ;
+ Text [ English ] = "Set form" ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ GroupBox GB_PATH
+ {
+ Pos = MAP_APPFONT ( 6 , 149 ) ;
+ Size = MAP_APPFONT ( 188 , 25 ) ;
+ Text = "Pfad" ;
+ Text [ English ] = "Path" ;
+ Text [ portuguese ] = "Atalho" ;
+ Text [ english_us ] = "Path" ;
+ Text [ portuguese_brazilian ] = "Pfad" ;
+ Text [ swedish ] = "Sökväg" ;
+ Text [ danish ] = "Sti" ;
+ Text [ italian ] = "Percorso" ;
+ Text [ spanish ] = "Ruta" ;
+ Text [ french ] = "Chemin" ;
+ Text [ dutch ] = "Pad" ;
+ Text[ chinese_simplified ] = "·¾¶";
+ Text[ russian ] = "Ïóòü";
+ Text[ polish ] = "Œcie¿ka";
+ Text[ japanese ] = "Êß½";
+ Text[ chinese_traditional ] = "¸ô®|";
+ Text[ arabic ] = "ÇáãÓÇÑ";
+ Text[ greek ] = "ÄéáäñïìÞ";
+ Text[ korean ] = "°æ·Î";
+ Text[ turkish ] = "Veri yolu";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_PATH
+ {
+ Pos = MAP_APPFONT ( 12 , 155 ) ;
+ Size = MAP_APPFONT ( 156 , 15 ) ;
+ };
+ OKButton PB_OK
+ {
+ Pos = MAP_APPFONT ( 6 , 180 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ CancelButton PB_CANCEL
+ {
+ Pos = MAP_APPFONT ( 59 , 180 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton PB_HELP
+ {
+ Pos = MAP_APPFONT ( 123 , 180 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Text [ portuguese ] = "Seleccionar formulário" ;
+ Text [ english_us ] = "Select form" ;
+ Text [ portuguese_brazilian ] = "Formularauswahl" ;
+ Text [ swedish ] = "Formulärurval" ;
+ Text [ danish ] = "Formularudvalg" ;
+ Text [ italian ] = "Scelta formulario" ;
+ Text [ spanish ] = "Selección de formulario" ;
+ Text [ french ] = "Sélection de formulaire" ;
+ Text [ dutch ] = "Formulier selecteren" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ±íµ¥";
+ Text[ russian ] = "Âûáîð ôîðìóëÿðà";
+ Text[ polish ] = "Wybór formularza";
+ Text[ japanese ] = "Ì«°Ñ‚Ì‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Üªí³æ";
+ Text[ arabic ] = "ÊÍÏíÏ ÇáÇÓÊãÇÑÉ";
+ Text[ greek ] = "ÅðéëïãÞ öüñìáò";
+ Text[ korean ] = "¿ëÁö ¼±ÅÃ";
+ Text[ turkish ] = "Form seçimi";
+ Text[ language_user1 ] = " ";
+};
+DockingWindow RID_SVX_FMEXPLORER
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 200 , 200 ) ;
+ Text = "Formular Navigator" ;
+ Text [ English ] = "Form Navigator" ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Text [ english_us ] = "Form Navigator" ;
+ Text [ portuguese_brazilian ] = "Formular Explorer" ;
+ Text [ swedish ] = "Formulär-Navigator" ;
+ Text [ danish ] = "Formular Navigator" ;
+ Text [ italian ] = "Navigatore formulario" ;
+ Text [ spanish ] = "Navegador de formulario" ;
+ Text [ french ] = "Navigateur de formulaires" ;
+ Text [ dutch ] = "Formuliernavigator" ;
+ Text [ portuguese ] = "Formulário Navegador" ;
+ Text[ chinese_simplified ] = "±íµ¥ÖúÊÖ";
+ Text[ russian ] = "Íàâèãàòîð ôîðìóëÿðà";
+ Text[ polish ] = "Nawigator formularzy";
+ Text[ japanese ] = "Ì«°ÑÅËÞ¹Þ°À";
+ Text[ chinese_traditional ] = "ªí³æ§U¤â";
+ Text[ arabic ] = "äÇÝíÌíÊæÑ ÇáÇÓÊãÇÑÉ";
+ Text[ greek ] = "Navigator öüñìáò";
+ Text[ korean ] = "¿ëÁö ³×ºñ°ÔÀÌÅÍ";
+ Text[ turkish ] = "Form navigatörü";
+ Text[ language_user1 ] = " ";
+};
diff --git a/svx/source/form/fmitems.cxx b/svx/source/form/fmitems.cxx
new file mode 100644
index 0000000000..8750e9f683
--- /dev/null
+++ b/svx/source/form/fmitems.cxx
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmitems.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_FMITEMS_HXX
+#include "fmitems.hxx"
+#endif
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+
+//========================================================================
+// class FmFormInfoItem
+//========================================================================
+TYPEINIT1(FmFormInfoItem, SfxPoolItem);
+
+//------------------------------------------------------------------------------
+sal_Bool FmFormInfoItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_Int8 nMemberId ) const
+{
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmFormInfoItem::SetValue(const ::com::sun::star::uno::Any& rVal, sal_Int8 nMemberId )
+{
+ sal_Bool bRet = sal_False;
+ return bRet;
+}
+
+//------------------------------------------------------------------------------
+int FmFormInfoItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+ return ( aInfo == ( (FmFormInfoItem&)rAttr ).GetInfo() );
+}
+
+//------------------------------------------------------------------------------
+SfxPoolItem* FmFormInfoItem::Clone( SfxItemPool* ) const
+{
+ return new FmFormInfoItem( *this );
+}
+
+//------------------------------------------------------------------------------
+SvStream& FmFormInfoItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ rStrm << (long) aInfo.Pos;
+ rStrm << (long) aInfo.Count;
+ return rStrm;
+}
+
+//------------------------------------------------------------------------------
+SfxPoolItem* FmFormInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_Int32 nCount, nPos;
+ rStrm >> nPos >> nCount;
+
+ FmFormInfoItem* pAttr = new FmFormInfoItem(Which(), FmFormInfo(nPos, nCount) );
+ return pAttr;
+}
+
+
+//========================================================================
+// class FmInterfaceItem
+//========================================================================
+TYPEINIT1(FmInterfaceItem, SfxPoolItem);
+
+//------------------------------------------------------------------------------
+sal_Bool FmInterfaceItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_Int8 nMemberId ) const
+{
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmInterfaceItem::SetValue(const ::com::sun::star::uno::Any& rVal, sal_Int8 nMemberId )
+{
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+int FmInterfaceItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+ return( xInterface == ((FmInterfaceItem&)rAttr).GetInterface() );
+}
+
+//------------------------------------------------------------------------------
+SfxPoolItem* FmInterfaceItem::Clone( SfxItemPool* ) const
+{
+ return new FmInterfaceItem( *this );
+}
+
+//------------------------------------------------------------------------------
+SvStream& FmInterfaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ return rStrm;
+}
+
+//------------------------------------------------------------------------------
+SfxPoolItem* FmInterfaceItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ return new FmInterfaceItem( *this );
+}
+
+
+
+
diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx
new file mode 100644
index 0000000000..7f5c890445
--- /dev/null
+++ b/svx/source/form/fmmodel.cxx
@@ -0,0 +1,446 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmmodel.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+#include <tools/debug.hxx>
+#endif
+
+#ifndef SVX_LIGHT
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#else
+class SfxObjectShell;
+#endif
+
+#pragma hdrstop
+
+#ifndef _FM_FMMODEL_HXX
+#include "fmmodel.hxx"
+#endif
+
+#ifndef _SVDIO_HXX
+#include "svdio.hxx"
+#endif
+
+#ifndef _FM_PAGE_HXX
+#include "fmpage.hxx"
+#endif
+#ifndef _SVX_FMUNDO_HXX
+#include "fmundo.hxx"
+#endif
+#ifndef _SVX_SVDOBJ_HXX
+#include "svdobj.hxx"
+#endif
+
+TYPEINIT1(FmFormModel, SdrModel);
+
+struct FmFormModelImplData
+{
+ FmXUndoEnvironment* pUndoEnv;
+ XubString sNextPageId;
+};
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+FmFormModel::FmFormModel(SfxItemPool* pPool, SvPersist* pPers)
+ :SdrModel(pPool, pPers, LOADREFCOUNTS)
+ ,pObjShell(0)
+ ,bStreamingOldVersion(sal_False)
+ ,m_pImpl(NULL)
+ ,bOpenInDesignMode(sal_True)
+{
+#ifndef SVX_LIGHT
+ m_pImpl = new FmFormModelImplData;
+ m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
+ m_pImpl->pUndoEnv->acquire();
+ m_pImpl->sNextPageId = '0';
+#endif
+}
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+FmFormModel::FmFormModel(const XubString& rPath, SfxItemPool* pPool, SvPersist* pPers)
+ :SdrModel(rPath, pPool, pPers)
+ ,pObjShell(0)
+ ,bStreamingOldVersion(sal_False)
+ ,m_pImpl(NULL)
+ ,bOpenInDesignMode(sal_True)
+{
+#ifndef SVX_LIGHT
+ m_pImpl = new FmFormModelImplData;
+ m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
+ m_pImpl->pUndoEnv->acquire();
+ m_pImpl->sNextPageId = '0';
+#endif
+}
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+FmFormModel::FmFormModel(SfxItemPool* pPool, SvPersist* pPers,
+ FASTBOOL bUseExtColorTable
+ )
+ :SdrModel(pPool, pPers, bUseExtColorTable, LOADREFCOUNTS)
+ ,pObjShell(0)
+ ,bStreamingOldVersion(sal_False)
+ ,m_pImpl(NULL)
+{
+#ifndef SVX_LIGHT
+ m_pImpl = new FmFormModelImplData;
+ m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
+ m_pImpl->pUndoEnv->acquire();
+ m_pImpl->sNextPageId = '0';
+#endif
+}
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+FmFormModel::FmFormModel(const XubString& rPath, SfxItemPool* pPool, SvPersist* pPers,
+ FASTBOOL bUseExtColorTable)
+ :SdrModel(rPath, pPool, pPers, bUseExtColorTable, LOADREFCOUNTS)
+ ,pObjShell(0)
+ ,bStreamingOldVersion(sal_False)
+ ,bOpenInDesignMode(sal_True)
+{
+#ifndef SVX_LIGHT
+ m_pImpl = new FmFormModelImplData;
+ m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
+ m_pImpl->pUndoEnv->acquire();
+ m_pImpl->sNextPageId = '0';
+#endif
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+FmFormModel::~FmFormModel()
+{
+#ifndef SVX_LIGHT
+ if (pObjShell && m_pImpl->pUndoEnv->IsListening(*pObjShell))
+ SetObjectShell(NULL);
+
+ ClearUndoBuffer();
+ // minimale grenze fuer undos
+ SetMaxUndoActionCount(1);
+
+ m_pImpl->pUndoEnv->release();
+ delete m_pImpl;
+
+#endif
+}
+
+/*************************************************************************
+|*
+|* Copy-Ctor
+|*
+\************************************************************************/
+FmFormModel::FmFormModel(const FmFormModel&)
+{
+ DBG_ERROR("FmFormModel: CopyCtor not implemented");
+}
+
+/*************************************************************************
+|*
+|* Operator=
+|*
+\************************************************************************/
+void FmFormModel::operator=(const FmFormModel&)
+{
+ DBG_ERROR("FmFormModel: operator= not implemented");
+}
+
+/*************************************************************************
+|*
+|* Operator==
+|*
+\************************************************************************/
+FASTBOOL FmFormModel::operator==(const FmFormModel&) const
+{
+ DBG_ERROR("FmFormModel: operator== not implemented");
+ return sal_False;
+}
+
+
+/*************************************************************************
+|*
+|* Erzeugt eine neue Seite
+|*
+\************************************************************************/
+SdrPage* FmFormModel::AllocPage(FASTBOOL bMasterPage)
+{
+ return new FmFormPage(*this, NULL, bMasterPage);
+}
+
+/*************************************************************************
+|*
+|* WriteData
+|*
+\************************************************************************/
+void FmFormModel::WriteData(SvStream& rOut) const
+{
+#ifndef SVX_LIGHT
+
+ if( rOut.GetVersion() < SOFFICE_FILEFORMAT_50 )
+ ((FmFormModel*)this)->bStreamingOldVersion = sal_True;
+
+ SdrModel::WriteData( rOut );
+
+ //////////////////////////////////////////////////////////////////////
+ // Speichern der Option OpenInDesignMode
+ if (!bStreamingOldVersion)
+ {
+ SdrDownCompat aModelFormatCompat(rOut,STREAM_WRITE);
+ rOut << bOpenInDesignMode;
+ }
+
+ ((FmFormModel*)this)->bStreamingOldVersion = sal_False;
+
+#endif
+}
+
+
+/*************************************************************************
+|*
+|* ReadData
+|*
+\************************************************************************/
+void FmFormModel::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
+{
+ if( rIn.GetVersion() < SOFFICE_FILEFORMAT_50 )
+ ((FmFormModel*)this)->bStreamingOldVersion = sal_True;
+
+ SdrModel::ReadData( rHead, rIn );
+
+ //////////////////////////////////////////////////////////////////////
+ // Lesen der Option OpenInDesignMode
+ if (!bStreamingOldVersion)
+ {
+ SdrDownCompat aCompat(rIn,STREAM_READ);
+ rIn>> bOpenInDesignMode;
+ }
+
+ ((FmFormModel*)this)->bStreamingOldVersion = sal_False;
+}
+
+
+/*************************************************************************
+|*
+|* InsertPage
+|*
+\************************************************************************/
+void FmFormModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
+{
+#ifndef SVX_LIGHT
+ // hack solange Methode intern
+ if (pObjShell && !m_pImpl->pUndoEnv->IsListening( *pObjShell ))
+ SetObjectShell(pObjShell);
+#endif
+
+ SdrModel::InsertPage( pPage, nPos );
+
+#ifndef SVX_LIGHT
+ if (pPage)
+ m_pImpl->pUndoEnv->AddForms(((FmFormPage*)pPage)->GetForms());
+#endif
+}
+
+/*************************************************************************
+|*
+|* InsertPage
+|*
+\************************************************************************/
+SdrPage* FmFormModel::RemovePage(sal_uInt16 nPgNum)
+{
+ FmFormPage* pPage = (FmFormPage*)SdrModel::RemovePage(nPgNum);
+
+#ifndef SVX_LIGHT
+ if (pPage)
+ m_pImpl->pUndoEnv->RemoveForms(pPage->GetForms());
+#endif
+
+ return pPage;
+}
+
+/*************************************************************************
+|*
+|* InsertMasterPage
+|*
+\************************************************************************/
+void FmFormModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos)
+{
+#ifndef SVX_LIGHT
+ // hack solange Methode intern
+ if (pObjShell && !m_pImpl->pUndoEnv->IsListening( *pObjShell ))
+ SetObjectShell(pObjShell);
+#endif
+
+ SdrModel::InsertMasterPage(pPage, nPos);
+
+#ifndef SVX_LIGHT
+ if (pPage)
+ m_pImpl->pUndoEnv->AddForms(((FmFormPage*)pPage)->GetForms());
+#endif
+}
+
+/*************************************************************************
+|*
+|* RemoveMasterPage
+|*
+\************************************************************************/
+SdrPage* FmFormModel::RemoveMasterPage(sal_uInt16 nPgNum)
+{
+ FmFormPage* pPage = (FmFormPage*)SdrModel::RemoveMasterPage(nPgNum);
+
+#ifndef SVX_LIGHT
+ if (pPage)
+ m_pImpl->pUndoEnv->RemoveForms(pPage->GetForms());
+#endif
+
+ return pPage;
+}
+
+//------------------------------------------------------------------------
+SdrLayerID FmFormModel::GetControlExportLayerId( const SdrObject& rObj ) const
+{
+ return rObj.GetLayer();
+}
+
+//------------------------------------------------------------------------
+void FmFormModel::SetOpenInDesignMode( sal_Bool bOpenDesignMode )
+{
+#ifndef SVX_LIGHT
+ if( bOpenDesignMode != bOpenInDesignMode )
+ {
+ bOpenInDesignMode = bOpenDesignMode;
+ pObjShell->SetModified( sal_True );
+ }
+#endif
+}
+
+//------------------------------------------------------------------------
+void FmFormModel::SetObjectShell( SfxObjectShell* pShell )
+{
+#ifndef SVX_LIGHT
+ if (pShell == pObjShell)
+ return;
+
+ if (pObjShell)
+ {
+ m_pImpl->pUndoEnv->EndListening( *this );
+ m_pImpl->pUndoEnv->EndListening( *pObjShell );
+ }
+
+ pObjShell = pShell;
+
+ if (pObjShell)
+ {
+ m_pImpl->pUndoEnv->SetReadOnly(pObjShell->IsReadOnly() || pObjShell->IsReadOnlyUI());
+
+ if (!m_pImpl->pUndoEnv->IsReadOnly())
+ m_pImpl->pUndoEnv->StartListening(*this);
+
+ m_pImpl->pUndoEnv->StartListening( *pObjShell );
+ }
+#endif
+}
+
+//------------------------------------------------------------------------
+FmXUndoEnvironment& FmFormModel::GetUndoEnv()
+{
+ return *m_pImpl->pUndoEnv;
+}
+
+//------------------------------------------------------------------------
+XubString FmFormModel::GetUniquePageId()
+{
+ XubString sReturn = m_pImpl->sNextPageId;
+
+ xub_Unicode aNextChar = m_pImpl->sNextPageId.GetChar(m_pImpl->sNextPageId.Len() - 1);
+ sal_Bool bNeedNewChar = sal_False;
+ switch (aNextChar)
+ {
+ case '9' : aNextChar = 'A'; break;
+ case 'Z' : aNextChar = 'a'; break;
+ case 'z' : aNextChar = '0'; bNeedNewChar = sal_True; break;
+ default: ++aNextChar; break;
+ }
+ m_pImpl->sNextPageId.SetChar(m_pImpl->sNextPageId.Len() - 1, aNextChar);
+ if (bNeedNewChar)
+ m_pImpl->sNextPageId += '0';
+
+ return sReturn;
+}
+
+
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
new file mode 100644
index 0000000000..5ddfcdc09b
--- /dev/null
+++ b/svx/source/form/fmobj.cxx
@@ -0,0 +1,659 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmobj.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif
+
+#ifndef _TOOLS_RESMGR_HXX
+#include <tools/resmgr.hxx>
+#endif
+
+#ifndef _SVX_FMOBJ_HXX
+#include "fmobj.hxx"
+#endif
+
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+
+
+#ifndef _COM_SUN_STAR_SCRIPT_XEVENTATTACHERMANAGER_HPP_
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
+#include <com/sun/star/io/XPersistObject.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_XCONTROLCONTAINER_HPP_
+#include <com/sun/star/awt/XControlContainer.hpp>
+#endif
+
+#ifndef _SVDIO_HXX //autogen
+#include <svdio.hxx>
+#endif
+
+#ifndef _SVX_FMMODEL_HXX
+#include "fmmodel.hxx"
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _SVX_FMVIEW_HXX //autogen
+#include <fmview.hxx>
+#endif
+
+#ifndef _SVX_FMGLOB_HXX
+#include "fmglob.hxx"
+#endif
+
+#ifndef _SVX_FMPGEIMP_HXX
+#include "fmpgeimp.hxx"
+#endif
+
+#ifndef _SVX_FMPAGE_HXX
+#include "fmpage.hxx"
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+TYPEINIT1(FmFormObj, SdrUnoObj);
+DBG_NAME(FmFormObj);
+//------------------------------------------------------------------
+FmFormObj::FmFormObj(const ::rtl::OUString& rModelName)
+ :SdrUnoObj(rModelName, sal_False)
+ ,pTempView(0)
+ ,nEvent(0)
+ ,nPos(-1)
+{
+ DBG_CTOR(FmFormObj, NULL);
+}
+
+//------------------------------------------------------------------
+FmFormObj::FmFormObj()
+ :SdrUnoObj(String(), sal_False)
+ ,nEvent(0)
+ ,pTempView(0)
+ ,nPos(-1)
+{
+ DBG_CTOR(FmFormObj, NULL);
+}
+
+//------------------------------------------------------------------
+FmFormObj::~FmFormObj()
+{
+ DBG_DTOR(FmFormObj, NULL);
+ if (nEvent)
+ Application::RemoveUserEvent(nEvent);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xHistory(m_xEnvironmentHistory, ::com::sun::star::uno::UNO_QUERY);
+ if (xHistory.is())
+ xHistory->dispose();
+
+ m_xEnvironmentHistory = NULL;
+ m_aEventsHistory.realloc(0);
+}
+
+//------------------------------------------------------------------
+void FmFormObj::SetObjEnv(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > & xForm, sal_Int32 nIdx,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor >& rEvts)
+{
+ xParent = xForm;
+ aEvts = rEvts;
+ nPos = nIdx;
+}
+
+//------------------------------------------------------------------
+void FmFormObj::SetPage(SdrPage* _pNewPage)
+{
+ FmFormPage* pNewFormPage = PTR_CAST(FmFormPage, _pNewPage);
+ if (!pNewFormPage || (GetPage() == _pNewPage))
+ { // Maybe it makes sense to create an environment history here : if somebody set's our page to NULL, and we have a valid page before,
+ // me may want to remember our place within the old page. For this we could create a new m_pEnvironmentHistory to store it.
+ // So the next SetPage with a valid new page would restore that environment within the new page.
+ // But for the original Bug (#57300#) we don't need that, so I omit it here. Maybe this will be implemented later.
+ SdrUnoObj::SetPage(_pNewPage);
+ return;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xNewParent;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor> aNewEvents;
+
+ // calc the new parent for my model (within the new page's forms hierarchy)
+ // do we have a history ? (from :Clone)
+ if (m_xEnvironmentHistory.is())
+ {
+ // the element in *m_pEnvironmentHistory which is equivalent to my new parent (which (perhaps) has to be created within _pNewPage->GetForms)
+ // is the right-most element in the tree.
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xLoop = m_xEnvironmentHistory;
+ do
+ {
+ if (xLoop->getCount() == 0)
+ break;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xRightMostChild(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xLoop->getByIndex(xLoop->getCount() - 1).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xRightMostChild.is())
+ {
+ DBG_ERROR("FmFormObj::SetPage : invalid elements in environment history !");
+ break;
+ }
+ xLoop = xRightMostChild;
+ }
+ while (sal_True);
+
+ xNewParent = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (ensureModelEnv(xLoop, ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (pNewFormPage->GetForms(), ::com::sun::star::uno::UNO_QUERY)), ::com::sun::star::uno::UNO_QUERY);
+ if (xNewParent.is())
+ // we successfully clone the environment in m_pEnvironmentHistory, so we can use m_aEventsHistory
+ // (which describes the events of our model at the moment m_pEnvironmentHistory was created)
+ aNewEvents = m_aEventsHistory;
+ }
+
+ if (!xNewParent.is())
+ {
+ // are we a valid part of our current page forms ?
+ FmFormPage* pOldFormPage = PTR_CAST(FmFormPage, GetPage());
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xOldForms = pOldFormPage ? ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (pOldFormPage->GetForms(), ::com::sun::star::uno::UNO_QUERY) : ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > ();
+ if (xOldForms.is())
+ {
+ // search (upward from our model) for xOldForms
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xSearch(GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ while (xSearch.is())
+ {
+ if (xSearch == xOldForms)
+ break;
+ xSearch = ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > (xSearch->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ }
+ if (xSearch.is()) // implies xSearch == xOldForms, which means we're a valid part of our current page forms hierarchy
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xMeAsChild(GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ xNewParent = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (ensureModelEnv(xMeAsChild->getParent(), ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (pNewFormPage->GetForms(), ::com::sun::star::uno::UNO_QUERY)), ::com::sun::star::uno::UNO_QUERY);
+
+ if (xNewParent.is())
+ {
+ try
+ {
+ // transfer the events from our (model's) parent to the new (model's) parent, too
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xEventManager(xMeAsChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xManagerAsIndex(xEventManager, ::com::sun::star::uno::UNO_QUERY);
+ if (xManagerAsIndex.is())
+ {
+ sal_Int32 nPos = getElementPos(xManagerAsIndex, xMeAsChild);
+ if (nPos >= 0)
+ aNewEvents = xEventManager->getScriptEvents(nPos);
+ }
+ else
+ aNewEvents = aEvts;
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmFormObj::SetPage : could not retrieve script events !");
+ }
+
+ }
+ }
+ }
+ }
+
+ // now set the page
+ SdrUnoObj::SetPage(_pNewPage);
+
+ // place my model within the new parent container
+ if (xNewParent.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xMeAsFormComp(GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xMeAsFormComp.is())
+ {
+ // check if I have another parent (and remove me, if neccessary)
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xOldParent(xMeAsFormComp->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (xOldParent.is())
+ {
+ sal_Int32 nPos = getElementPos(::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > (xOldParent, ::com::sun::star::uno::UNO_QUERY), xMeAsFormComp);
+ if (nPos > -1)
+ xOldParent->removeByIndex(nPos);
+ }
+ // and insert into the new container
+ xNewParent->insertByIndex(xNewParent->getCount(), ::com::sun::star::uno::makeAny(xMeAsFormComp));
+
+ // transfer the events
+ if (aNewEvents.getLength())
+ {
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xEventManager(xNewParent, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xManagerAsIndex(xEventManager, ::com::sun::star::uno::UNO_QUERY);
+ if (xManagerAsIndex.is())
+ {
+ sal_Int32 nPos = getElementPos(xManagerAsIndex, xMeAsFormComp);
+ DBG_ASSERT(nPos >= 0, "FmFormObj::SetPage : inserted but not present ?");
+ xEventManager->registerScriptEvents(nPos, aNewEvents);
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmFormObj::SetPage : could not tranfer script events !");
+ }
+
+ }
+ }
+ }
+
+ // delete my history
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xHistory(m_xEnvironmentHistory, ::com::sun::star::uno::UNO_QUERY);
+ if (xHistory.is())
+ xHistory->dispose();
+
+ m_xEnvironmentHistory = NULL;
+ m_aEventsHistory.realloc(0);
+}
+
+//------------------------------------------------------------------
+sal_uInt32 FmFormObj::GetObjInventor() const
+{
+ if( GetModel() && ((FmFormModel*)GetModel())->IsStreamingOldVersion() )
+ return SdrInventor;
+ return FmFormInventor;
+}
+
+//------------------------------------------------------------------
+sal_uInt16 FmFormObj::GetObjIdentifier() const
+{
+ if( GetModel() && ((FmFormModel*)GetModel())->IsStreamingOldVersion() )
+ return OBJ_RECT;
+ return OBJ_FM_CONTROL;
+}
+
+//------------------------------------------------------------------
+void FmFormObj::clonedFrom(const FmFormObj* _pSource)
+{
+ DBG_ASSERT(_pSource != NULL, "FmFormObj::clonedFrom : invalid source !");
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xHistory(m_xEnvironmentHistory, ::com::sun::star::uno::UNO_QUERY);
+ if (xHistory.is())
+ xHistory->dispose();
+
+ m_xEnvironmentHistory = NULL;
+ m_aEventsHistory.realloc(0);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xSourceAsChild(_pSource->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xSourceAsChild.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xSourceContainer = xSourceAsChild->getParent();
+
+ m_xEnvironmentHistory = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >(
+ ::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.form.FormsCollection")),
+ ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(m_xEnvironmentHistory.is(), "FmFormObj::clonedFrom : could not create a forms collection !");
+
+ if (m_xEnvironmentHistory.is())
+ {
+ ensureModelEnv(xSourceContainer, m_xEnvironmentHistory);
+ m_aEventsHistory = aEvts;
+ // if we we're clone there was a call to operator=, so aEvts are excatly the events we need here ...
+ }
+}
+
+//------------------------------------------------------------------
+SdrObject* FmFormObj::Clone() const
+{
+ SdrObject* pReturn = SdrUnoObj::Clone();
+
+ FmFormObj* pFormObject = PTR_CAST(FmFormObj, pReturn);
+ DBG_ASSERT(pFormObject != NULL, "FmFormObj::Clone : invalid clone !");
+ if (pFormObject)
+ pFormObject->clonedFrom(this);
+
+ return pReturn;
+}
+
+//------------------------------------------------------------------
+SdrObject* FmFormObj::Clone(SdrPage* _pPage, SdrModel* _pModel) const
+{
+ SdrObject* pReturn = SdrUnoObj::Clone(_pPage, _pModel);
+ if (!pReturn)
+ return pReturn;
+
+ FmFormObj* pCloneAsFormObj = PTR_CAST(FmFormObj, pReturn);
+ if (!pCloneAsFormObj)
+ return pReturn;
+
+ FmFormPage* pClonesPage = PTR_CAST(FmFormPage, pReturn->GetPage());
+ if (!pClonesPage || !pClonesPage->GetForms().is())
+ return pReturn;
+
+ // build an form environment equivalent to my own withín the destination page
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xMeAsChild(GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xMeAsChild.is())
+ return pReturn;
+
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xMyParent = xMeAsChild->getParent();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xClonesParent = ensureModelEnv(xMyParent, ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (pClonesPage->GetForms(), ::com::sun::star::uno::UNO_QUERY));
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xNewParentContainer(xClonesParent, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xCloneAsFormComponent(PTR_CAST(FmFormObj, pReturn)->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xNewParentContainer.is() && xCloneAsFormComponent.is())
+ {
+ sal_Int32 nPos = xNewParentContainer->getCount();
+ xNewParentContainer->insertByIndex(nPos, ::com::sun::star::uno::makeAny(xCloneAsFormComponent));
+ // transfer the events, too
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xEventManager(xNewParentContainer, ::com::sun::star::uno::UNO_QUERY);
+ if (xEventManager.is())
+ xEventManager->registerScriptEvents(nPos, pCloneAsFormObj->GetEvents());
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmFormObj::Clone : error while placing the model within it's new env");
+ }
+
+
+ return pReturn;
+}
+
+//------------------------------------------------------------------
+void FmFormObj::operator= (const SdrObject& rObj)
+{
+ SdrUnoObj::operator= (rObj);
+
+ FmFormObj* pFormObj = PTR_CAST(FmFormObj, &rObj);
+ if (pFormObj)
+ {
+ // liegt das ::com::sun::star::awt::UnoControlModel in einer Eventumgebung,
+ // dann koennen noch Events zugeordnet sein
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xContent(pFormObj->xUnoControlModel, ::com::sun::star::uno::UNO_QUERY);
+ if (xContent.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xManager(xContent->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xManagerAsIndex(xManager, ::com::sun::star::uno::UNO_QUERY);
+ if (xManagerAsIndex.is())
+ {
+ sal_Int32 nPos = getElementPos(xManagerAsIndex, xContent);
+ if (nPos >= 0)
+ aEvts = xManager->getScriptEvents(nPos);
+ }
+ }
+ else
+ aEvts = pFormObj->aEvts;
+ }
+}
+
+//------------------------------------------------------------------
+void FmFormObj::WriteData(SvStream& rOut) const
+{
+ FmFormModel* pModel = (FmFormModel*)GetModel();
+ if( pModel && pModel->IsStreamingOldVersion() )
+ {
+ SdrLayerID nOld = GetLayer();
+ ((FmFormObj*)this)->NbcSetLayer( pModel->GetControlExportLayerId( *this ) );
+ SdrUnoObj::WriteData( rOut );
+ ((FmFormObj*)this)->NbcSetLayer( nOld );
+ return;
+ }
+ SdrUnoObj::WriteData(rOut);
+}
+
+//------------------------------------------------------------------
+void FmFormObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ SdrUnoObj::ReadData(rHead,rIn);
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > FmFormObj::ensureModelEnv(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & _rSourceContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > _rTopLevelDestContainer)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xTopLevelSouce;
+ String sAccessPath = getFormComponentAccessPath(_rSourceContainer, xTopLevelSouce);
+ if (!xTopLevelSouce.is())
+ // somthing went wrong, maybe _rSourceContainer isn't part of a valid forms hierarchy
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xDestContainer(_rTopLevelDestContainer);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xSourceContainer(xTopLevelSouce, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xSourceContainer.is(), "FmFormObj::ensureModelEnv : the top level source is invalid !");
+
+ for (xub_StrLen i=0; i<sAccessPath.GetTokenCount('\\'); ++i)
+ {
+ sal_uInt16 nIndex = sAccessPath.GetToken(i, '\\').ToInt32();
+
+ // get the DSS of the source form (we have to find an aquivalent for)
+ DBG_ASSERT(nIndex<xSourceContainer->getCount(), "FmFormObj::ensureModelEnv : invalid access path !");
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSourceForm = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xSourceContainer->getByIndex(nIndex).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xSourceForm.is(), "FmFormObj::ensureModelEnv : invalid source form !");
+
+ ::com::sun::star::uno::Any aSrcCursorSource, aSrcCursorSourceType, aSrcDataSource;
+ DBG_ASSERT(::utl::hasProperty(FM_PROP_COMMAND, xSourceForm) && ::utl::hasProperty(FM_PROP_COMMANDTYPE, xSourceForm)
+ && ::utl::hasProperty(FM_PROP_DATASOURCE, xSourceForm), "FmFormObj::ensureModelEnv : invalid access path or invalid form (missing props) !");
+ // the parent access path should refer to a row set
+ try
+ {
+ aSrcCursorSource = xSourceForm->getPropertyValue(FM_PROP_COMMAND);
+ aSrcCursorSourceType = xSourceForm->getPropertyValue(FM_PROP_COMMANDTYPE);
+ aSrcDataSource = xSourceForm->getPropertyValue(FM_PROP_DATASOURCE);
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmFormObj::ensureModelEnv : could not retrieve a source DSS !");
+ }
+
+
+ // calc the number of (source) form siblings with the same DSS
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCurrentSourceForm, xCurrentDestForm;
+ sal_Int16 nCurrentSourceIndex = 0, nCurrentDestIndex = 0;
+ while (nCurrentSourceIndex <= nIndex)
+ {
+ sal_Bool bEqualDSS = sal_False;
+ while (!bEqualDSS) // (we don't have to check nCurrentSourceIndex here : it's bounded by nIndex)
+ {
+ xCurrentSourceForm = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xSourceContainer->getByIndex(nCurrentSourceIndex).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xCurrentSourceForm.is(), "FmFormObj::ensureModelEnv : invalid form ancestor (2) !");
+ bEqualDSS = sal_False;
+ if (::utl::hasProperty(FM_PROP_DATASOURCE, xCurrentSourceForm))
+ { // it is a form
+ try
+ {
+ if ( ::utl::compare(xCurrentSourceForm->getPropertyValue(FM_PROP_COMMAND), aSrcCursorSource)
+ && ::utl::compare(xCurrentSourceForm->getPropertyValue(FM_PROP_COMMANDTYPE), aSrcCursorSourceType)
+ && ::utl::compare(xCurrentSourceForm->getPropertyValue(FM_PROP_DATASOURCE), aSrcDataSource)
+ )
+ {
+ bEqualDSS = sal_True;
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmFormObj::ensureModelEnv : exception while getting a sibling's DSS !");
+ }
+
+ }
+ ++nCurrentSourceIndex;
+ }
+
+ DBG_ASSERT(bEqualDSS, "FmFormObj::ensureModelEnv : found no source form !");
+ // ??? at least the nIndex-th one should have been found ???
+
+ // now search the next one with the given DSS (within the destination container)
+ bEqualDSS = sal_False;
+ while (!bEqualDSS && (nCurrentDestIndex < xDestContainer->getCount()))
+ {
+ xCurrentDestForm = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xDestContainer->getByIndex(nCurrentDestIndex).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xCurrentDestForm.is(), "FmFormObj::ensureModelEnv : invalid destination form !");
+ bEqualDSS = sal_False;
+ if (::utl::hasProperty(FM_PROP_DATASOURCE, xCurrentDestForm))
+ { // it is a form
+ try
+ {
+ if ( ::utl::compare(xCurrentDestForm->getPropertyValue(FM_PROP_COMMAND), aSrcCursorSource)
+ && ::utl::compare(xCurrentDestForm->getPropertyValue(FM_PROP_COMMANDTYPE), aSrcCursorSourceType)
+ && ::utl::compare(xCurrentDestForm->getPropertyValue(FM_PROP_DATASOURCE), aSrcDataSource)
+ )
+ {
+ bEqualDSS = sal_True;
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmFormObj::ensureModelEnv : exception while getting a destination DSS !");
+ }
+
+ }
+ ++nCurrentDestIndex;
+ }
+
+ if (!bEqualDSS)
+ { // There is at least one more source form with the given DSS than destination forms are.
+ // correct this ...
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject > xSourcePersist(xCurrentSourceForm, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xSourcePersist.is(), "FmFormObj::ensureModelEnv : invalid form (no persist object) !");
+
+ // create and insert (into the destination) a clone of the form
+ xCurrentDestForm = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (cloneUsingProperties(xSourcePersist), ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xCurrentDestForm.is(), "FmFormObj::ensureModelEnv : invalid cloned form !");
+
+ DBG_ASSERT(nCurrentDestIndex == xDestContainer->getCount(), "FmFormObj::ensureModelEnv : something went wrong with the numbers !");
+ xDestContainer->insertByIndex(nCurrentDestIndex, ::com::sun::star::uno::makeAny(xCurrentDestForm));
+
+ ++nCurrentDestIndex;
+ // like nCurrentSourceIndex, nCurrentDestIndex now points 'behind' the form it actally means
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmFormObj::ensureModelEnv : something went seriously wrong while creating a new form !");
+ // no more options anymore ...
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ();
+ }
+
+ }
+ }
+
+ // now xCurrentDestForm is a form aequivalent to xSourceForm (which means they have the same DSS and the same number
+ // of left siblings with the same DSS, which counts for all their ancestors, too)
+
+ // go down
+ xDestContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (xCurrentDestForm, ::com::sun::star::uno::UNO_QUERY);
+ xSourceContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (xSourceForm, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xDestContainer.is() && xSourceContainer.is(), "FmFormObj::ensureModelEnv : invalid container !");
+ }
+
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > (xDestContainer, ::com::sun::star::uno::UNO_QUERY);
+}
+
+//------------------------------------------------------------------
+FASTBOOL FmFormObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+{
+ sal_Bool bResult = SdrUnoObj::EndCreate(rStat, eCmd);
+ if (bResult && SDRCREATE_FORCEEND == eCmd && rStat.GetView())
+ {
+ // ist das Object teil einer ::com::sun::star::form::Form?
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xContent(xUnoControlModel, ::com::sun::star::uno::UNO_QUERY);
+ if (xContent.is() && pPage)
+ {
+ // Komponente gehoert noch keiner ::com::sun::star::form::Form an
+ if (!xContent->getParent().is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xTemp = ((FmFormPage*)pPage)->GetImpl()->SetDefaults(xContent);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xForm(xTemp, ::com::sun::star::uno::UNO_QUERY);
+
+ // Position des Elements
+ sal_Int32 nPos = xForm->getCount();
+ xForm->insertByIndex(nPos, ::com::sun::star::uno::makeAny(xContent));
+ }
+ }
+
+ if (nEvent)
+ Application::RemoveUserEvent(nEvent);
+
+ pTempView = (FmFormView*)rStat.GetView();
+ nEvent = Application::PostUserEvent(LINK(this,FmFormObj,OnCreate));
+ }
+ return bResult;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmFormObj, OnCreate, void*, EMPTYTAG)
+{
+ nEvent = 0;
+ if (pTempView)
+ pTempView->ObjectCreated(this);
+ return 0;
+}
+
+
+
diff --git a/svx/source/form/fmobjfac.cxx b/svx/source/form/fmobjfac.cxx
new file mode 100644
index 0000000000..6bc1c537c7
--- /dev/null
+++ b/svx/source/form/fmobjfac.cxx
@@ -0,0 +1,317 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmobjfac.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:16 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _UTL_STLTYPES_HXX_
+#include <unotools/stl_types.hxx>
+#endif
+
+#ifndef _SVDOBJ_HXX
+#include "svdobj.hxx"
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+
+#ifndef _FM_FMOBJFAC_HXX
+#include "fmobjfac.hxx"
+#endif
+
+#ifndef _FM_FMGLOB_HXX
+#include "fmglob.hxx"
+#endif
+
+#ifndef __VC_VCSBXDEF_HXX // object id's
+//#include "vcsbxdef.hxx"
+#endif
+
+#ifndef _FM_FMOBJ_HXX
+#include "fmobj.hxx"
+#endif
+
+#ifndef _SVX_FMSHIMP_HXX
+#include "fmshimp.hxx"
+#endif
+
+#ifndef _FM_FMSHELL_HXX
+#include "fmshell.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SVX_TBXFORM_HXX
+#include "tbxform.hxx"
+#endif
+
+#ifndef _TOOLS_RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+
+#ifndef _SVX_TABWIN_HXX
+#include "tabwin.hxx"
+#endif
+
+#ifndef _SVX_PROPBRW_HXX
+#include "propbrw.hxx"
+#endif
+
+#ifndef _SVX_FMEXPL_HXX
+#include "fmexpl.hxx"
+#endif
+
+#ifndef _SVX_FILTNAV_HXX
+#include "filtnav.hxx"
+#endif
+
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+
+#ifndef ENABLEUNICODE
+#define WS(a) ::rtl::OUString(UniString(a)
+#else
+#define WS(a) a
+#endif
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+FmFormObjFactory::FmFormObjFactory()
+{
+ SdrObjFactory::InsertMakeObjectHdl(LINK(this, FmFormObjFactory, MakeObject));
+
+ //////////////////////////////////////////////////////////////////////
+ // Konfigurations-::com::sun::star::frame::Controller und NavigationBar registrieren
+ SvxFmTbxCtlConfig::RegisterControl( SID_FM_CONFIG );
+ SvxFmTbxCtlAbsRec::RegisterControl( SID_FM_RECORD_ABSOLUTE );
+ SvxFmTbxCtlRecText::RegisterControl( SID_FM_RECORD_TEXT );
+ SvxFmTbxCtlRecFromText::RegisterControl( SID_FM_RECORD_FROM_TEXT );
+ SvxFmTbxCtlRecTotal::RegisterControl( SID_FM_RECORD_TOTAL );
+ SvxFmTbxPrevRec::RegisterControl( SID_FM_RECORD_PREV );
+ SvxFmTbxNextRec::RegisterControl( SID_FM_RECORD_NEXT );
+ ControlConversionMenuController::RegisterControl(SID_FM_CHANGECONTROLTYPE);
+
+ // Registrieung von globalen fenstern
+ FmFieldWinMgr::RegisterChildWindow();
+ FmPropBrwMgr::RegisterChildWindow();
+ FmExplorerWinMgr::RegisterChildWindow();
+ FmFilterNavigatorWinMgr::RegisterChildWindow();
+
+ //////////////////////////////////////////////////////////////////////
+ // Interface fuer die Formshell registrieren
+ FmFormShell::RegisterInterface(0);
+
+ ImplSmartRegisterUnoServices();
+
+}
+
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+FmFormObjFactory::~FmFormObjFactory()
+{
+}
+
+
+/*************************************************************************
+|*
+|* ::com::sun::star::form::Form-Objekte erzeugen
+|*
+\************************************************************************/
+IMPL_LINK(FmFormObjFactory, MakeObject, SdrObjFactory*, pObjFactory)
+{
+ if (pObjFactory->nInventor == FmFormInventor)
+ {
+ switch (pObjFactory->nIdentifier)
+ {
+ case OBJ_FM_CONTROL: // allgemeines Object
+ {
+ pObjFactory->pNewObj = new FmFormObj();
+ } break;
+ case OBJ_FM_EDIT:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_EDIT);
+ } break;
+ case OBJ_FM_BUTTON:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_COMMANDBUTTON);
+ } break;
+ case OBJ_FM_FIXEDTEXT:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_FIXEDTEXT);
+ } break;
+ case OBJ_FM_LISTBOX:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_LISTBOX);
+ } break;
+ case OBJ_FM_CHECKBOX:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_CHECKBOX);
+ } break;
+ case OBJ_FM_RADIOBUTTON:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_RADIOBUTTON);
+ } break;
+ case OBJ_FM_GROUPBOX:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_GROUPBOX);
+ } break;
+ case OBJ_FM_COMBOBOX:
+ {
+ FmFormObj* pNew = new FmFormObj(FM_COMPONENT_COMBOBOX);
+ pObjFactory->pNewObj = pNew;
+
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xModelSet(pNew->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xModelSet.is())
+ {
+ sal_Bool bB = sal_True;
+ xModelSet->setPropertyValue(FM_PROP_DROPDOWN, ::com::sun::star::uno::Any(&bB,::getBooleanCppuType()));
+ }
+ }
+ catch(...)
+ {
+ }
+
+ } break;
+ case OBJ_FM_GRID:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_GRID);
+ } break;
+ case OBJ_FM_IMAGEBUTTON:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_IMAGEBUTTON);
+ } break;
+ case OBJ_FM_FILECONTROL:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_FILECONTROL);
+ } break;
+ case OBJ_FM_DATEFIELD:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_DATEFIELD);
+ } break;
+ case OBJ_FM_TIMEFIELD:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_TIMEFIELD);
+ } break;
+ case OBJ_FM_NUMERICFIELD:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_NUMERICFIELD);
+ } break;
+ case OBJ_FM_CURRENCYFIELD:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_CURRENCYFIELD);
+ } break;
+ case OBJ_FM_PATTERNFIELD:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_PATTERNFIELD);
+ } break;
+ case OBJ_FM_HIDDEN:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_HIDDEN);
+ } break;
+ case OBJ_FM_IMAGECONTROL:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_IMAGECONTROL);
+ } break;
+ case OBJ_FM_FORMATTEDFIELD:
+ {
+ pObjFactory->pNewObj = new FmFormObj(FM_COMPONENT_FORMATTEDFIELD);
+ } break;
+ default:
+ return 0;
+ }
+ }
+
+ return 0;
+}
+
+
+
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
new file mode 100644
index 0000000000..389f696dab
--- /dev/null
+++ b/svx/source/form/fmpage.cxx
@@ -0,0 +1,441 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmpage.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ENABLE_BYTESTRING_STREAM_OPERATORS
+
+#ifndef _SVX_FMPAGE_HXX
+#include "fmpage.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+
+
+#ifndef _SVX_FMMODEL_HXX
+#include "fmmodel.hxx"
+#endif
+
+#ifndef SVX_LIGHT
+#ifndef _SVX_FMOBJ_HXX
+#include "fmobj.hxx"
+#endif
+#endif
+
+#ifndef SVX_LIGHT
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef SVX_LIGHT
+#ifndef _SVX_FMPGEIMP_HXX
+#include "fmpgeimp.hxx"
+#endif
+#endif
+
+#ifndef _SVDIO_HXX //autogen
+#include "svdio.hxx"
+#endif
+
+#ifndef SVX_LIGHT
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#endif
+
+#ifndef _SVDITER_HXX //autogen
+#include "svditer.hxx"
+#endif
+
+#ifndef _SVDVIEW_HXX //autogen
+#include <svdview.hxx>
+#endif
+
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+
+#ifndef _SV_HELP_HXX //autogen
+#include <vcl/help.hxx>
+#endif
+
+
+#ifndef SVX_LIGHT
+#ifndef _SVX_FMGLOB_HXX
+#include "fmglob.hxx"
+#endif
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif
+#ifndef _SVX_FMUNDO_HXX
+#include "fmundo.hxx"
+#endif
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#endif
+
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+
+TYPEINIT1(FmFormPage, SdrPage);
+
+//------------------------------------------------------------------
+FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, FASTBOOL bMasterPage)
+ :SdrPage(rModel, bMasterPage)
+ ,pBasic(_pBasic)
+#ifndef SVX_LIGHT
+ ,pImpl(new FmFormPageImpl(this))
+#else
+ ,pImpl(NULL)
+#endif
+{
+}
+
+//------------------------------------------------------------------
+FmFormPage::FmFormPage(const FmFormPage& rPage)
+ :SdrPage(rPage)
+ ,pBasic(0)
+#ifndef SVX_LIGHT
+ ,pImpl(new FmFormPageImpl(this, *rPage.GetImpl()))
+#else
+ ,pImpl(NULL)
+#endif
+{
+ aPageName = rPage.aPageName;
+}
+
+//------------------------------------------------------------------
+FmFormPage::~FmFormPage()
+{
+#ifndef SVX_LIGHT
+ delete pImpl;
+#endif
+}
+
+//------------------------------------------------------------------
+void FmFormPage::WriteData(SvStream& rOut) const
+{
+#ifndef SVX_LIGHT
+ {
+ {
+ SdrDownCompat aVCCompat1( rOut, STREAM_WRITE );
+ sal_uInt16 n = 0;
+ rOut << n;
+ }
+ SdrPage::WriteData( rOut );
+ SdrDownCompat aVCCompat2( rOut, STREAM_WRITE );
+
+ rOut << ByteString(aPageName, gsl_getSystemTextEncoding());
+ rOut << (sal_uInt32)0x11051967;
+ rOut << (sal_uInt32)0x19670511;
+ sal_uInt16 nVer = 1;
+ rOut << nVer;
+ {
+ SdrDownCompat aVCCompat3( rOut, STREAM_WRITE);
+ sal_uInt32 nFormCount = 0;
+ rOut << nFormCount;
+ }
+ }
+
+ // dont use the flag in that way: if (rOut.GetVersion() >= SOFFICE_FILEFORMAT_40)
+ if (rOut.GetVersion() >= 3830)
+ {
+ SdrDownCompat aCompat(rOut, STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ pImpl->WriteData(rOut);
+ }
+#endif
+}
+
+//------------------------------------------------------------------
+void FmFormPage::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
+{
+ {
+ {
+ SdrDownCompat aVCCompat1( rIn, STREAM_READ );
+ }
+ SdrPage::ReadData( rHead, rIn );
+ {
+ SdrDownCompat aVCCompat2( rIn, STREAM_READ );
+ ByteString aByteStringName;
+ rIn >> aByteStringName;
+ aPageName = String(aByteStringName, gsl_getSystemTextEncoding());
+ }
+ }
+
+ // dont use the flag in that way: if (rIn.GetVersion() >= SOFFICE_FILEFORMAT_40)
+ if (rIn.GetVersion() >= 3830 && rHead.GetVersion() >=14)
+ {
+ SdrDownCompat aCompat(rIn, STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifndef SVX_LIGHT
+ pImpl->ReadData(rHead, rIn);
+#endif
+ }
+}
+
+//------------------------------------------------------------------
+void FmFormPage::SetModel(SdrModel* pNewModel)
+{
+ SdrPage::SetModel( pNewModel );
+}
+
+//------------------------------------------------------------------
+SdrPage* FmFormPage::Clone() const
+{
+ return new FmFormPage(*this);
+ // hier fehlt noch ein kopieren der Objekte
+}
+
+//------------------------------------------------------------------
+void FmFormPage::NbcInsertObject(SdrObject* pObj,
+ sal_uInt32 nPos,
+ const SdrInsertReason* pReason)
+{
+ SdrPage::NbcInsertObject(pObj, nPos, pReason);
+}
+
+//------------------------------------------------------------------
+void FmFormPage::InsertObject(SdrObject* pObj, sal_uInt32 nPos,
+ const SdrInsertReason* pReason)
+{
+ SdrPage::InsertObject( pObj, nPos, pReason );
+#ifndef SVX_LIGHT
+ if (GetModel() && (!pReason || pReason->GetReason() != SDRREASON_STREAMING))
+ ((FmFormModel*)GetModel())->GetUndoEnv().Inserted(pObj);
+#endif
+}
+
+#ifndef SVX_LIGHT
+//------------------------------------------------------------------
+void FmFormPage::InsertFormObjectEnsureEnv(const SdrObject* _pSourceObject, SdrObject* _pClone, sal_Bool _bTryPreserveName, sal_uInt32 _nPos,
+ const SdrInsertReason* _pReason)
+{
+ DBG_ERROR("FmFormPage::InsertFormObjectEnsureEnv : obsolete method used (maybe I should write a changes mail ?) !");
+ InsertObject(_pClone, _nPos, _pReason);
+ return;
+}
+
+//------------------------------------------------------------------
+sal_Bool FmFormPage::EnsureFormObjectEnv(const SdrObject* _pObj)
+{
+ DBG_ERROR("FmFormPage::EnsureFormObjectEnv : obsolete method used (maybe I should write a changes mail ?) !");
+ return sal_False;
+}
+#endif
+
+//------------------------------------------------------------------
+const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & FmFormPage::GetForms() const
+{
+#ifndef SVX_LIGHT
+ return pImpl->getForms();
+#else
+ static ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > aRef;
+ return aRef;
+#endif
+}
+
+//------------------------------------------------------------------
+sal_Bool FmFormPage::RequestHelp( Window* pWindow, SdrView* pView,
+ const HelpEvent& rEvt )
+{
+#ifndef SVX_LIGHT
+ if( !pView->IsAction() )
+ {
+ Point aPos = rEvt.GetMousePosPixel();
+ aPos = pWindow->ScreenToOutputPixel( aPos );
+ aPos = pWindow->PixelToLogic( aPos );
+
+ SdrObject* pObj = NULL;
+ SdrPageView* pPV = NULL;
+ if( pView->PickObj( aPos, 0, pObj, pPV, SDRSEARCH_DEEP ) )
+ {
+ // Ein Object getroffen
+ if( pObj->ISA(FmFormObj) )
+ {
+ UniString aHelpText;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(((FmFormObj*)pObj)->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ if (::utl::hasProperty(FM_PROP_HELPTEXT, xSet))
+ aHelpText = ::utl::getString(xSet->getPropertyValue(FM_PROP_HELPTEXT)).getStr();
+
+ if (!aHelpText.Len() && ::utl::hasProperty(FM_PROP_TARGET_URL, xSet))
+ {
+ ::rtl::OUString aText = ::utl::getString(xSet->getPropertyValue(FM_PROP_TARGET_URL));
+ INetURLObject aUrl(aText);
+
+ // testen, ob es ein Protokoll-Typ ist, den ich anzeigen will
+ INetProtocol aProtocol = aUrl.GetProtocol();
+ static const INetProtocol s_aQuickHelpSupported[] =
+ { INET_PROT_FTP, INET_PROT_HTTP, INET_PROT_FILE, INET_PROT_MAILTO, INET_PROT_NEWS,
+ INET_PROT_HTTPS, INET_PROT_JAVASCRIPT, INET_PROT_IMAP, INET_PROT_POP3,
+ INET_PROT_VIM, INET_PROT_LDAP
+ };
+ for (sal_uInt16 i=0; i<sizeof(s_aQuickHelpSupported)/sizeof(s_aQuickHelpSupported[0]); ++i)
+ if (s_aQuickHelpSupported[i] == aProtocol)
+ {
+ aHelpText = INetURLObject::decode(aUrl.GetURLNoPass(), '%', INetURLObject::DECODE_UNAMBIGUOUS);
+ break;
+ }
+ }
+ }
+ if ( aHelpText.Len() != 0 )
+ {
+ // Hilfe anzeigen
+ Rectangle aItemRect = pObj->GetBoundRect();
+ aItemRect = pWindow->LogicToPixel( aItemRect );
+ Point aPt = pWindow->OutputToScreenPixel( aItemRect.TopLeft() );
+ aItemRect.Left() = aPt.X();
+ aItemRect.Top() = aPt.Y();
+ aPt = pWindow->OutputToScreenPixel( aItemRect.BottomRight() );
+ aItemRect.Right() = aPt.X();
+ aItemRect.Bottom() = aPt.Y();
+ if( rEvt.GetMode() == HELPMODE_BALLOON )
+ Help::ShowBalloon( pWindow, aItemRect.Center(), aItemRect, aHelpText);
+ else
+ Help::ShowQuickHelp( pWindow, aItemRect, aHelpText );
+ }
+ return sal_True;
+ }
+ }
+ }
+#endif
+ return sal_False;
+}
+
+//------------------------------------------------------------------
+SdrObject* FmFormPage::NbcRemoveObject(sal_uInt32 nObjNum)
+{
+ return SdrPage::NbcRemoveObject(nObjNum);
+}
+
+//------------------------------------------------------------------
+SdrObject* FmFormPage::RemoveObject(sal_uInt32 nObjNum)
+{
+ SdrObject* pObj = SdrPage::RemoveObject(nObjNum);
+#ifndef SVX_LIGHT
+ if (pObj && GetModel())
+ ((FmFormModel*)GetModel())->GetUndoEnv().Removed(pObj);
+#endif
+ return pObj;
+}
+
+//------------------------------------------------------------------
+SdrObject* FmFormPage::NbcReplaceObject(SdrObject* pNewObj, sal_uInt32 nObjNum)
+{
+ return SdrPage::NbcReplaceObject(pNewObj, nObjNum);
+}
+
+//------------------------------------------------------------------
+SdrObject* FmFormPage::ReplaceObject(SdrObject* pNewObj, sal_uInt32 nObjNum)
+{
+ return SdrPage::ReplaceObject(pNewObj, nObjNum);
+}
+
+
+//------------------------------------------------------------------
+void FmFormPage::SetBasic( StarBASIC* pBas )
+{
+}
+
+void FmFormPage::RequestBasic()
+{
+}
+
+XubString FmFormPage::GetLinkData( const XubString& rLinkName )
+{
+ return XubString();
+}
+
+void FmFormPage::SetLinkData( const XubString& rLinkName, const XubString& rLinkData )
+{
+}
+
+void FmFormPage::UpdateLinkData( const XubString& rLinkName, const XubString& rLinkData )
+{
+}
+
+SfxJSArray* FmFormPage::GetFormsArray() const
+{
+ return 0;
+}
+
+
+
+
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
new file mode 100644
index 0000000000..98ae6b3668
--- /dev/null
+++ b/svx/source/form/fmpgeimp.cxx
@@ -0,0 +1,762 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmpgeimp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _EXTERN_FORMLAYER_
+
+
+#ifndef _SVXERR_HXX
+#include "svxerr.hxx"
+#endif
+
+#ifndef _SVX_FMUNOPGE_HXX
+#include "fmpgeimp.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
+#include <com/sun/star/sdb/CommandType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
+#include <com/sun/star/io/XObjectInputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
+#include <com/sun/star/io/XPersistObject.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_
+#include <com/sun/star/io/XObjectOutputStream.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_XMARKABLESTREAM_HPP_
+#include <com/sun/star/io/XMarkableStream.hpp>
+#endif
+
+#ifndef _SFX_OBJSH_HXX
+#include <sfx2/objsh.hxx>
+#endif
+
+#ifndef _SVX_FMUNDO_HXX
+#include "fmundo.hxx"
+#endif
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _SVX_FMGLOB_HXX
+#include "fmglob.hxx"
+#endif
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+
+// #include "fmstream.hxx"
+#ifndef _SVX_FMOBJ_HXX
+#include "fmobj.hxx"
+#endif
+#ifndef _SVX_FMPAGE_HXX
+#include "fmpage.hxx"
+#endif
+#ifndef _SVX_FMMODEL_HXX
+#include "fmmodel.hxx"
+#endif
+
+#ifndef _TOOLS_RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+
+#ifndef _SVDITER_HXX //autogen
+#include "svditer.hxx"
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _UTL_UNO3_HXX_
+#include <unotools/uno3.hxx>
+#endif
+#ifndef _UTL_TYPES_HXX_
+#include <unotools/types.hxx>
+#endif
+#ifndef _UTL_STREAM_WRAPPER_HXX_
+#include <unotools/streamwrap.hxx>
+#endif
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+
+#define ANY_TO_IFACE(any) (*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)any.getValue())
+
+//------------------------------------------------------------------------------
+FmFormPageImpl::FmFormPageImpl(FmFormPage* _pPage)
+ :pPage(_pPage)
+{
+ Init();
+}
+
+//------------------------------------------------------------------------------
+FmFormPageImpl::FmFormPageImpl(FmFormPage* _pPage, const FmFormPageImpl& rImpl)
+ :pPage(_pPage)
+{
+ Init();
+
+ // copy it by streaming
+ // creating a pipe
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xOutPipe(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.Pipe")), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInPipe(xOutPipe, ::com::sun::star::uno::UNO_QUERY);
+
+ // creating the mark streams
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xMarkIn(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.MarkableInputStream")), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSink > xMarkSink(xMarkIn, ::com::sun::star::uno::UNO_QUERY);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xMarkOut(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.MarkableOutputStream")), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > xMarkSource(xMarkOut, ::com::sun::star::uno::UNO_QUERY);
+
+ // connect pipe and sink
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSink > xSink(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.ObjectInputStream")), ::com::sun::star::uno::UNO_QUERY);
+
+ // connect pipe and source
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > xSource(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.ObjectOutputStream")), ::com::sun::star::uno::UNO_QUERY);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream > xOutStrm(xSource, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream > xInStrm(xSink, ::com::sun::star::uno::UNO_QUERY);
+
+ if (xMarkSink.is() && xMarkSource.is() && xSink.is() && xSource.is() && xOutStrm.is() && xInStrm.is())
+ {
+ xMarkSink->setInputStream(xInPipe);
+ xMarkSource->setOutputStream(xOutPipe);
+ xSink->setInputStream(xMarkIn);
+ xSource->setOutputStream(xMarkOut);
+
+ // write the objects to source
+ rImpl.write(xOutStrm);
+ xOutStrm->closeOutput();
+
+ // read them
+ read(xInStrm);
+ xInStrm->closeInput();
+ }
+ // what to do else ?
+}
+
+//------------------------------------------------------------------------------
+void FmFormPageImpl::Init()
+{
+ if (pPage)
+ {
+ FmFormModel* pDrawModel = (FmFormModel*)pPage->GetModel();
+ SfxObjectShell* pObjShell = pDrawModel->GetObjectShell();
+ if( pObjShell )
+ xModel = pObjShell->GetModel();
+
+ // get a unique page id from the model
+ m_sPageId = pDrawModel->GetUniquePageId();
+ }
+
+ xForms = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > (
+ ::utl::getProcessServiceFactory()->createInstance(
+ ::rtl::OUString::createFromAscii("com.sun.star.form.FormsCollection")), ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xForms.is(), "FmFormPageImpl::Init : could not create a forms collection !");
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xAsChild(xForms, ::com::sun::star::uno::UNO_QUERY);
+ if (xAsChild.is())
+ xAsChild->setParent( xModel );
+}
+
+//------------------------------------------------------------------------------
+FmFormPageImpl::~FmFormPageImpl()
+{
+ xCurrentForm = NULL;
+
+ ::utl::disposeComponent(xForms);
+}
+
+//------------------------------------------------------------------------------
+void FmFormPageImpl::setCurForm(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm)
+{
+ xCurrentForm = xForm;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > FmFormPageImpl::getDefaultForm()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm;
+
+ // wenn noch kein TargetForm gefunden, dann aktuelle oder Default
+ if (!xCurrentForm.is())
+ {
+ if (xForms->hasElements())
+ {
+ // suche die Standardform
+ ::rtl::OUString ustrStdFormName = ::rtl::OUString(SVX_RES(RID_STR_STDFORMNAME));
+
+ if (xForms->hasByName(ustrStdFormName))
+ {
+ try
+ {
+ xForm = *(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > *)xForms->getByName(ustrStdFormName).getValue();
+ }
+ catch(...)
+ {
+ }
+
+ }
+
+ // gibt es denn ueberhaupt eine
+ if (!xForm.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xGetFirst(xForms, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xGetFirst.is(), "FmFormPageImpl::getDefaultForm : no IndexAccess on my form container !");
+ // wenn das anspringt, muesste man sich die Namen des NameContainers geben lassen und dann das Objekt fuer den
+ // ersten Namen erfragen ... aber normalerweise sollte die FOrms-Sammlung auch einen IndexAccess haben
+ xForm = *(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > *)xGetFirst->getByIndex(0).getValue();
+ }
+ }
+ }
+ else
+ xForm = xCurrentForm;
+
+ // keine gefunden dann standard erzeugen
+ if (!xForm.is())
+ {
+
+ SdrModel* pModel = pPage->GetModel();
+ XubString aStr(SVX_RES(RID_STR_FORM));
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
+ aUndoStr.SearchAndReplace('#', aStr);
+ pModel->BegUndo(aUndoStr);
+
+ xForm = ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >(::utl::getProcessServiceFactory()->createInstance(FM_SUN_COMPONENT_FORM), ::com::sun::star::uno::UNO_QUERY);
+ // a form should always have the command type table as default
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(xForm, ::com::sun::star::uno::UNO_QUERY);
+ try
+ {
+ xSet->setPropertyValue(FM_PROP_COMMANDTYPE, ::com::sun::star::uno::makeAny(sal_Int32(::com::sun::star::sdb::CommandType::TABLE)));
+ }
+ catch(...)
+ {
+ }
+
+ ::rtl::OUString aName = ::rtl::OUString(SVX_RES(RID_STR_STDFORMNAME));
+ xSet->setPropertyValue(FM_PROP_NAME, ::com::sun::star::uno::makeAny(aName));
+
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer(xForms, ::com::sun::star::uno::UNO_QUERY);
+ pModel->AddUndo(new FmUndoContainerAction(*(FmFormModel*)pModel,
+ FmUndoContainerAction::Inserted,
+ xContainer,
+ xForm,
+ xContainer->getCount()));
+ xForms->insertByName(aName, ::com::sun::star::uno::makeAny(xForm));
+ xCurrentForm = xForm;
+ pModel->EndUndo();
+ }
+ return xForm;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > FmFormPageImpl::SetDefaults(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & rContent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess > & rDatabase,
+ const ::rtl::OUString& rDBTitle,
+ const ::rtl::OUString& rCursorSource,
+ sal_Int32 nCommandType)
+{
+ // Ist das Control bereits einer ::com::sun::star::form zugeordnet
+ if (!rContent.is() || rContent->getParent().is())
+ return NULL;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet;
+
+ // Wenn Datenbank und CursorSource gesetzt sind, dann wird
+ // die ::com::sun::star::form anhand dieser Kriterien gesucht, ansonsten nur aktuelle
+ // und die StandardForm
+ if (rDatabase.is() && rCursorSource.len())
+ {
+ // erst in der aktuellen form suchen
+ xForm = FindForm(xCurrentForm, rDatabase, rCursorSource, nCommandType);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xFormsByIndex(xForms, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xFormsByIndex.is(), "FmFormPageImpl::SetDefaults : no index access for my forms collection !");
+ sal_Int32 nCount = xFormsByIndex->getCount();
+ for (sal_Int32 i = 0; !xForm.is() && i < nCount; i++)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xToSearch(*(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > *)xFormsByIndex->getByIndex(i).getValue());
+ xForm = FindForm(xToSearch, rDatabase, rCursorSource, nCommandType);
+ }
+
+ // wenn keine ::com::sun::star::form gefunden, dann eine neue erzeugen
+ if (!xForm.is())
+ {
+ SdrModel* pModel = pPage->GetModel();
+ XubString aStr(SVX_RES(RID_STR_FORM));
+ XubString aUndoStr(SVX_RES(RID_STR_UNDO_CONTAINER_INSERT));
+ aUndoStr.SearchAndReplace('#', aStr);
+ pModel->BegUndo(aUndoStr);
+ xForm = ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >(::utl::getProcessServiceFactory()->createInstance(FM_SUN_COMPONENT_FORM), ::com::sun::star::uno::UNO_QUERY);
+ // a form should always have the command type table as default
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(xForm, ::com::sun::star::uno::UNO_QUERY);
+ try { xSet->setPropertyValue(FM_PROP_COMMANDTYPE, ::com::sun::star::uno::makeAny(sal_Int32(::com::sun::star::sdb::CommandType::TABLE))); }
+ catch(...) { }
+
+ if (rDBTitle.len())
+ xSet->setPropertyValue(FM_PROP_DATASOURCE,::com::sun::star::uno::makeAny(rDBTitle));
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xDatabaseProps(rDatabase, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Any aDatabaseUrl = xDatabaseProps->getPropertyValue(FM_PROP_URL);
+ xSet->setPropertyValue(FM_PROP_DATASOURCE, aDatabaseUrl);
+ }
+
+ xSet->setPropertyValue(FM_PROP_COMMAND,::com::sun::star::uno::makeAny(rCursorSource));
+ xSet->setPropertyValue(FM_PROP_COMMANDTYPE, ::com::sun::star::uno::makeAny(nCommandType));
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xNamedSet(xForms, ::com::sun::star::uno::UNO_QUERY);
+ ::rtl::OUString aName;
+
+ if ((::com::sun::star::sdb::CommandType::TABLE == nCommandType) || (::com::sun::star::sdb::CommandType::QUERY == nCommandType))
+ {
+ // Namen der ::com::sun::star::form ueber den Titel der CursorSource setzen
+ aName = getUniqueName(rCursorSource, xNamedSet);
+ }
+ else
+ // ansonsten StandardformName verwenden
+ aName = getUniqueName(::rtl::OUString(SVX_RES(RID_STR_STDFORMNAME)), xNamedSet);
+
+ xSet->setPropertyValue(FM_PROP_NAME, ::com::sun::star::uno::makeAny(aName));
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer(xForms, ::com::sun::star::uno::UNO_QUERY);
+ pModel->AddUndo(new FmUndoContainerAction(*(FmFormModel*)pModel,
+ FmUndoContainerAction::Inserted,
+ xContainer,
+ xForm,
+ xContainer->getCount()));
+
+
+ xForms->insertByName(aName, ::com::sun::star::uno::makeAny(xForm));
+ pModel->EndUndo();
+ }
+ xCurrentForm = xForm;
+ }
+
+ xForm = getDefaultForm();
+ // eindeutigen Namen fuer die Componente setzen
+ setUniqueName(rContent, xForm);
+ return xForm;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > FmFormPageImpl::FindForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > & rForm,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess > & rDatabase,
+ const ::rtl::OUString& rCursorSource,
+ sal_Int32 nCommandType)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xResultForm;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xDBForm(rForm, ::com::sun::star::uno::UNO_QUERY);
+ if (!xDBForm.is())
+ return NULL;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xConnAsChild;
+ try
+ {
+ xConnAsChild = ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > (::utl::calcConnection(xDBForm,::utl::getProcessServiceFactory()), ::com::sun::star::uno::UNO_QUERY);
+ }
+ catch(...)
+ {
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess > xDB;
+ if (xConnAsChild.is())
+ xDB = ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess > (xConnAsChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (xDB.is() && xDB == rDatabase)
+ {
+ // jetzt noch ueberpruefen ob CursorSource und Type uebereinstimmen
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(rForm, ::com::sun::star::uno::UNO_QUERY);
+ ::rtl::OUString aCursorSource = ::utl::getString(xSet->getPropertyValue(FM_PROP_COMMAND));
+ sal_Int32 nType = ::utl::getINT32(xSet->getPropertyValue(FM_PROP_COMMANDTYPE));
+ if (!aCursorSource.len() || ((nType == nCommandType) && (aCursorSource == rCursorSource))) // found the form
+ {
+ xResultForm = rForm;
+ // Ist noch keine Datenquelle gesetzt, wird dieses hier nachgeholt
+ if (!aCursorSource.len())
+ {
+ xSet->setPropertyValue(FM_PROP_COMMAND, ::com::sun::star::uno::makeAny(rCursorSource));
+ xSet->setPropertyValue(FM_PROP_COMMANDTYPE, ::com::sun::star::uno::makeAny((sal_Int32)nCommandType));
+ }
+ }
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xComponents(rForm, ::com::sun::star::uno::UNO_QUERY);
+ sal_Int32 nCount = xComponents->getCount();
+ for (sal_Int32 i = 0; !xResultForm.is() && i < nCount; ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xSearchForm(ANY_TO_IFACE(xComponents->getByIndex(i)), ::com::sun::star::uno::UNO_QUERY);
+ // jetzt innerhalb der ::com::sun::star::form weitersuchen
+ if (xSearchForm.is())
+ xResultForm = FindForm(xSearchForm, rDatabase, rCursorSource, nCommandType);
+ }
+ return xResultForm;
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString FmFormPageImpl::setUniqueName(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xFormComponent, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > & xControls)
+{
+ ::rtl::OUString sName;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(xFormComponent, ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ ::com::sun::star::uno::Any aValue = xSet->getPropertyValue(FM_PROP_NAME);
+ sName = ::utl::getString(aValue);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xNameAcc(xControls, ::com::sun::star::uno::UNO_QUERY);
+
+ if (!sName.len() || xNameAcc->hasByName(sName))
+ {
+ // setzen eines default Namens ueber die ClassId
+ ::com::sun::star::uno::Any aValue = xSet->getPropertyValue(FM_PROP_CLASSID);
+ sal_Int16 nClassId(::com::sun::star::form::FormComponentType::CONTROL);
+ aValue >>= nClassId;
+
+ ::rtl::OUString sDefaultName = getDefaultName(nClassId, xControls);
+ // bei Radiobuttons, die einen Namen haben, diesen nicht ueberschreiben!
+ if (!sName.len() || nClassId != ::com::sun::star::form::FormComponentType::RADIOBUTTON)
+ {
+ xSet->setPropertyValue(FM_PROP_NAME, ::com::sun::star::uno::makeAny(sDefaultName));
+ }
+
+ //////////////////////////////////////////////////////////////
+ // Labels anpassen
+ UniString aLabel = sDefaultName;
+ sal_uInt16 nResId = 0;
+
+ switch (nClassId)
+ {
+ case ::com::sun::star::form::FormComponentType::COMMANDBUTTON: nResId = RID_STR_PROPTITLE_PUSHBUTTON; break;
+ case ::com::sun::star::form::FormComponentType::RADIOBUTTON: nResId = RID_STR_PROPTITLE_RADIOBUTTON; break;
+ case ::com::sun::star::form::FormComponentType::CHECKBOX: nResId = RID_STR_PROPTITLE_CHECKBOX; break;
+ case ::com::sun::star::form::FormComponentType::GROUPBOX: nResId = RID_STR_PROPTITLE_GROUPBOX; break;
+ case ::com::sun::star::form::FormComponentType::FIXEDTEXT: nResId = RID_STR_PROPTITLE_FIXEDTEXT; break;
+ }
+
+ if (nResId)
+ {
+ aValue = xSet->getPropertyValue(FM_PROP_LABEL);
+ ::rtl::OUString aText;
+ aValue >>= aText;
+ if (!aText.len())
+ {
+ aLabel.SearchAndReplace( getDefaultName(nClassId), ::rtl::OUString(SVX_RES(nResId)) );
+ xSet->setPropertyValue( FM_PROP_LABEL, ::com::sun::star::uno::makeAny(::rtl::OUString(aLabel)) );
+ }
+ }
+
+ sName = sDefaultName;
+ }
+ }
+ return sName;
+}
+
+
+UniString FmFormPageImpl::getDefaultName(sal_Int16 nClassId)
+{
+ sal_uInt16 nResId;
+
+ switch (nClassId)
+ {
+ case ::com::sun::star::form::FormComponentType::TEXTFIELD: nResId = RID_STR_EDIT_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::COMMANDBUTTON: nResId = RID_STR_BUTTON_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::RADIOBUTTON: nResId = RID_STR_RADIOBUTTON_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::CHECKBOX: nResId = RID_STR_CHECKBOX_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::LISTBOX: nResId = RID_STR_LISTBOX_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::COMBOBOX: nResId = RID_STR_COMBOBOX_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::GROUPBOX: nResId = RID_STR_GROUPBOX_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::IMAGEBUTTON: nResId = RID_STR_IMAGE_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::FIXEDTEXT: nResId = RID_STR_FIXEDTEXT_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::GRIDCONTROL: nResId = RID_STR_GRID_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::FILECONTROL: nResId = RID_STR_FILECONTROL_CLASSNAME; break;
+
+ case ::com::sun::star::form::FormComponentType::DATEFIELD: nResId = RID_STR_DATEFIELD_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::TIMEFIELD: nResId = RID_STR_TIMEFIELD_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::NUMERICFIELD: nResId = RID_STR_NUMERICFIELD_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::CURRENCYFIELD: nResId = RID_STR_CURRENCYFIELD_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::PATTERNFIELD: nResId = RID_STR_PATTERNFIELD_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::IMAGECONTROL: nResId = RID_STR_IMAGECONTROL_CLASSNAME; break;
+ case ::com::sun::star::form::FormComponentType::HIDDENCONTROL: nResId = RID_STR_HIDDEN_CLASSNAME; break;
+
+ case ::com::sun::star::form::FormComponentType::CONTROL:
+ default:
+ nResId = RID_STR_CONTROL_CLASSNAME; break;
+ }
+
+ return SVX_RES(nResId);
+}
+
+//------------------------------------------------------------------------------
+::rtl::OUString FmFormPageImpl::getDefaultName(sal_Int16 nClassId, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > & xControls) const
+{
+ ::rtl::OUString aClassName=getDefaultName(nClassId);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xNamedSet(xControls, ::com::sun::star::uno::UNO_QUERY);
+ return getUniqueName(aClassName, xNamedSet);
+}
+
+//------------------------------------------------------------------
+::rtl::OUString FmFormPageImpl::getUniqueName(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNamedSet) const
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xIndexSet(xNamedSet, ::com::sun::star::uno::UNO_QUERY);
+ ::rtl::OUString sName;
+
+ if ( !xIndexSet.is() )
+ return sName;
+
+ sal_Int32 n = 0;
+ ::rtl::OUString sClassName = rName;
+ do
+ {
+ sName = sClassName + ::rtl::OUString::valueOf(++n);
+ } while (xNamedSet->hasByName(sName));
+ return sName;
+}
+
+//------------------------------------------------------------------------------
+void FmFormPageImpl::WriteData(SvStream& rOut) const
+{
+ // anlegen eines output streams fuer UNO
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > xSource(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.ObjectOutputStream")), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xMarkOut(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.MarkableOutputStream")), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > xMarkSource(xMarkOut, ::com::sun::star::uno::UNO_QUERY);
+
+ if (xSource.is())
+ {
+ xMarkSource->setOutputStream(new ::utl::OOutputStreamWrapper(rOut));
+ xSource->setOutputStream(xMarkOut);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream > xOutStrm(xSource, ::com::sun::star::uno::UNO_QUERY);
+ try
+ {
+ write(xOutStrm);
+ }
+ catch(...)
+ {
+ rOut.SetError( ERRCODE_CLASS_WRITE | ERRCODE_SVX_FORMS_READWRITEFAILED | ERRCODE_WARNING_MASK );
+ }
+
+ xOutStrm->closeOutput();
+ }
+ else
+ {
+ // let's do a hack : in former versions we didn't use UNO-stream but SvStreams, so there was
+ // no possibility that we couldn't write because of the lack of stream objects. Now, with UNO, this may happen
+ // (as it happended here). But the read-methods of the older versions don't expect that (there is no flag in
+ // the fileformat as it never was neccessary). To allow the old versions the read of the documents, we fake the
+ // write : the first token usually written by our impl is an sal_Int32 giving the number of forms within the forms
+ // collection. If this number is 0, no further reading will occur.
+ sal_Int32 nDummLength = 0; rOut << nDummLength; // this means 'no forms'
+ nDummLength = 0; rOut << nDummLength; // this means 'no form controls"
+ // To tell the user that something went wrong we set a warning on the stream.
+ rOut.SetError( ERRCODE_CLASS_WRITE | ERRCODE_SVX_FORMS_NOIOSERVICES | ERRCODE_WARNING_MASK );
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmFormPageImpl::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
+{
+ // Abholen des InputStreams ueber uno
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSink > xSink(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.ObjectInputStream")), ::com::sun::star::uno::UNO_QUERY);
+
+ // creating the mark streams
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xMarkIn(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.MarkableInputStream")), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSink > xMarkSink(xMarkIn, ::com::sun::star::uno::UNO_QUERY);
+
+ if (xSink.is())
+ {
+ ::utl::OInputStreamWrapper* pUnoStream = new ::utl::OInputStreamWrapper(rIn);
+ xMarkSink->setInputStream(::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > (pUnoStream));
+ xSink->setInputStream(xMarkIn);
+
+ // freigeben aller forms
+ xCurrentForm = NULL;
+
+ if (xForms->hasElements())
+ {
+ ::utl::disposeComponent(xForms);
+ Init();
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream > xInStrm(xSink,::com::sun::star::uno::UNO_QUERY);
+ try
+ {
+ read(xInStrm);
+ }
+ catch(...)
+ {
+ rIn.SetError( ERRCODE_CLASS_READ | ERRCODE_SVX_FORMS_READWRITEFAILED | ERRCODE_WARNING_MASK );
+ }
+
+
+ xInStrm->closeInput();
+ }
+ else
+ rIn.SetError( ERRCODE_CLASS_READ | ERRCODE_SVX_FORMS_NOIOSERVICES | ERRCODE_WARNING_MASK );
+}
+
+//------------------------------------------------------------------------------
+void FmFormPageImpl::write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream > & xOutStrm) const
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XMarkableStream > xMarkStrm(xOutStrm, ::com::sun::star::uno::UNO_QUERY);
+ if (!xMarkStrm.is())
+ return; // exception
+
+ // sortieren der objectlist nach der Reihenfolge
+ FmObjectList aList;
+ fillList(aList, *pPage, sal_True);
+
+ // schreiben aller forms
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject > xAsPersist(xForms, ::com::sun::star::uno::UNO_QUERY);
+ if (xAsPersist.is())
+ xAsPersist->write(xOutStrm);
+ // don't use the writeObject of the stream, as this wouldn't be compatible with older documents
+
+ // objectliste einfuegen
+ sal_Int32 nLength = aList.Count();
+
+ // schreiben der laenge
+ xOutStrm->writeLong(nLength);
+
+ for (sal_Int32 i = 0; i < nLength; i++)
+ {
+ // schreiben des Objects mit Marke
+ // Marke um an den Anfang zu springen
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject > xObj(aList.GetObject(i)->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xObj.is())
+ {
+ xOutStrm->writeObject(xObj);
+ }
+ else
+ ;// exception
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmFormPageImpl::read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream > & xInStrm)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XMarkableStream > xMarkStrm(xInStrm, ::com::sun::star::uno::UNO_QUERY);
+ if (!xMarkStrm.is())
+ return; // exception
+
+ // sortieren der objectlist nach der Reihenfolge
+ FmObjectList aList;
+ fillList(aList, *pPage, sal_False);
+
+ // lesen aller forms
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject > xAsPersist(xForms, ::com::sun::star::uno::UNO_QUERY);
+ if (xAsPersist.is())
+ xAsPersist->read(xInStrm);
+ // don't use the readObject of the stream, as this wouldn't be compatible with older documents
+
+ // Zuordnung der Formobjekte zu den FormComponents
+ sal_Int32 nLength = xInStrm->readLong();
+ DBG_ASSERT(nLength == (sal_Int32) aList.Count(), "Fehler beim Lesen der UnoModels");
+ for (sal_Int32 i = 0; i < nLength; i++)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > xRef(xInStrm->readObject(), ::com::sun::star::uno::UNO_QUERY);
+ if (i < (sal_Int32)aList.Count())
+ aList.GetObject(i)->SetUnoControlModel(xRef);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmFormPageImpl::fillList(FmObjectList& rList, const SdrObjList& rObjList, sal_Bool bConnected) const
+{
+ SdrObjListIter aIter(rObjList);
+ while (aIter.IsMore())
+ {
+ SdrObject* pObj = aIter.Next();
+ if (pObj && pObj->GetObjInventor() == FmFormInventor)
+ {
+ FmFormObj* pFormObj = PTR_CAST(FmFormObj, pObj);
+ DBG_ASSERT(!bConnected || pFormObj->GetUnoControlModel().is(), "Controlshape ohne Control");
+ if (!bConnected || pFormObj->GetUnoControlModel().is())
+ rList.Insert(pFormObj, LIST_APPEND);
+
+ }
+ }
+}
+
+
diff --git a/svx/source/form/fmprop.cxx b/svx/source/form/fmprop.cxx
new file mode 100644
index 0000000000..679ea0b99a
--- /dev/null
+++ b/svx/source/form/fmprop.cxx
@@ -0,0 +1,574 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmprop.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 USE_PROPERTY_HELPER
+
+#ifndef _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX //autogen
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _TOOLS_RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+#ifndef _SVX_FMHELP_HRC
+#include "fmhelp.hrc"
+#endif
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+
+#ifndef _XCEPTION_HXX_ //autogen
+#include <vos/xception.hxx>
+#endif
+#ifndef _FM_STATIC_HXX_
+#include "fmstatic.hxx"
+#endif
+
+sal_uInt16 FmPropertyInfoService::nCount = 0;
+FmPropertyInfo* FmPropertyInfoService::pPropertyInfos = NULL;
+
+
+// Vergleichen von Properties
+static int
+#if defined( WNT )
+ __cdecl
+#endif
+#if defined( ICC ) && defined( OS2 )
+_Optlink
+#endif
+ PropertyCompare( const void* pFirst, const void* pSecond)
+{
+ return ((::com::sun::star::beans::Property*)pFirst)->Name.compareTo(((::com::sun::star::beans::Property*)pSecond)->Name);
+}
+
+
+// Vergleichen von PropertyInfo
+static int
+#if defined( WNT )
+ __cdecl
+#endif
+#if defined( ICC ) && defined( OS2 )
+_Optlink
+#endif
+ PropertyInfoCompare(const void* pFirst, const void* pSecond)
+{
+ return reinterpret_cast<const FmPropertyInfo*>(pFirst)->aName.CompareTo(reinterpret_cast<const FmPropertyInfo*>(pSecond)->aName);
+}
+
+// PropertyNamen
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TABINDEX,"TabIndex");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TAG,"Tag");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_NAME,"Name");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CLASSID,"ClassId");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ROWCOUNT,"RowCount");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ROWCOUNTFINAL,"IsRowCountFinal");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FETCHSIZE,"FetchSize");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUE,"Value");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TEXT,"Text");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LABEL,"Label");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CANINSERT,"CanInsert");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CANUPDATE,"CanUpdate");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CANDELETE,"CanDelete");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_NAVIGATION,"NavigationBarMode");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HASNAVIGATION,"HasNavigationBar");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CYCLE,"Cycle");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCE,"DataField");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ENABLED,"Enabled");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_READONLY,"ReadOnly");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISREADONLY,"IsReadOnly");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FILTER_CRITERIA,"Filter");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISREQUIRED,"IsRequired");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_AUTOINCREMENT,"IsAutoIncrement");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CACHESIZE,"CacheSize");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATAENTRY,"DataEntry");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LASTDIRTY,"LastUpdated");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_STATEMENT,"Statement");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_WIDTH,"Width");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SEARCHABLE,"IsSearchable");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_MULTILINE,"MultiLine");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TARGET_URL,"TargetURL");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TARGET_FRAME,"TargetFrame");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULTCONTROL,"DefaultControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_MAXTEXTLEN,"MaxTextLen");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EDITMASK,"EditMask");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SIZE,"Size");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SPIN,"Spin");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATE,"Date");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIME,"Time");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_STATE,"State");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TRISTATE,"TriState");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HIDDEN_VALUE, "HiddenValue");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BUTTONTYPE,"ButtonType");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_STRINGITEMLIST,"StringItemList");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_TEXT,"DefaultText");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULTCHECKED,"DefaultState");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FORMATKEY,"FormatKey");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FORMATSSUPPLIER,"FormatsSupplier");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SUBMIT_ACTION,"SubmitAction");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SUBMIT_TARGET,"SubmitTarget");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SUBMIT_METHOD,"SubmitMethod");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SUBMIT_ENCODING,"SubmitEncoding");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_IMAGE_URL,"ImageURL");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EMPTY_IS_NULL,"ConvertEmptyToNull");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LISTSOURCETYPE,"ListSourceType");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LISTSOURCE,"ListSource");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SELECT_SEQ,"SelectedItems");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUE_SEQ,"ValueItemList");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_SELECT_SEQ,"DefaultSelection");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_MULTISELECTION,"MultiSelection");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ALIGN,"Align");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_DATE,"DefaultDate");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_TIME,"DefaultTime");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_VALUE,"DefaultValue");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DECIMAL_ACCURACY,"DecimalAccuracy");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURSORSOURCE,"DataSelection");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURSORSOURCETYPE,"DataSelectionType");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FIELDTYPE,"Type");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DECIMALS,"Decimals");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_REFVALUE,"RefValue");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUEMIN,"ValueMin");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUEMAX,"ValueMax");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_STRICTFORMAT,"StrictFormat");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ALLOWADDITIONS,"AllowInserts");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ALLOWEDITS,"AllowUpdates");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ALLOWDELETIONS,"AllowDeletes");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_MASTERFIELDS,"MasterFields");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISPASSTHROUGH,"IsPassThrough");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_QUERY,"Query");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LITERALMASK,"LiteralMask");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUESTEP,"ValueStep");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SHOWTHOUSANDSEP,"ShowThousandsSeparator");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURRENCYSYMBOL,"CurrencySymbol");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATEFORMAT,"DateFormat");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATEMIN,"DateMin");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATEMAX,"DateMax");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATE_SHOW_CENTURY,"DateShowCentury");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIMEFORMAT, "TimeFormat");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIMEMIN, "TimeMin");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIMEMAX,"TimeMax");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LINECOUNT,"LineCount");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BOUNDCOLUMN, "BoundColumn");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT,"FontDescriptor");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BACKGROUNDCOLOR,"BackgroundColor");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FILLCOLOR,"FillColor");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TEXTCOLOR,"TextColor");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LINECOLOR,"LineColor");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BORDER,"Border");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DROPDOWN,"Dropdown");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_MULTI,"Multi");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HSCROLL,"HScroll");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VSCROLL,"VScroll");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TABSTOP,"Tabstop");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_AUTOCOMPLETE,"Autocomplete");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HARDLINEBREAKS,"HardLineBreaks");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_PRINTABLE,"Printable");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ECHO_CHAR,"EchoChar");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ROWHEIGHT,"RowHeight");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HELPTEXT, "HelpText");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT_NAME, "FontName");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT_STYLENAME, "FontStyleName");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT_FAMILY, "FontFamily");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT_CHARSET, "FontCharset");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT_HEIGHT, "FontHeight");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT_WEIGHT, "FontWeight");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT_SLANT, "FontSlant");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT_UNDERLINE, "FontUnderline");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT_STRIKEOUT, "FontStrikeout");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HELPURL, "HelpURL");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_RECORDMARKER, "HasRecordMarker");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BOUNDFIELD, "BoundField");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TREATASNUMERIC, "TreatAsNumber");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_VALUE, "EffectiveValue");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_DEFAULT, "EffectiveDefault");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MIN, "EffectiveMin");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MAX, "EffectiveMax");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HIDDEN, "Hidden");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FILTERPROPOSAL, "UseFilterValueProposal");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FIELDSOURCE, "FieldSource");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TABLENAME, "TableName");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FILTERSUPPLIER, "FilterSupplier");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURRENTFILTER, "CurrentFilter");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SELECTED_FIELDS, "SelectedFields");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SELECTED_TABLES, "SelectedTables");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_THREADSAFE, "ThreadSafe");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISFILTERAPPLIED, "IsFilterApplied");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CONTROLLABEL, "LabelControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURRSYM_POSITION, "PrependCurrencySymbol");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SOURCE, "Source");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURSORCOLOR, "CursorColor");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ALWAYSSHOWCURSOR, "AlwaysShowCursor");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DISPLAYSYNCHRON, "DisplayIsSynchron");
+
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISMODIFIED, "IsModified");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISNEW, "IsNew");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_PRIVILEGES, "Privileges");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_COMMAND,"Command");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_COMMANDTYPE,"CommandType");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_RESULTSET_CONCURRENCY, "ResultSetConcurrency");
+// renamed
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_INSERTONLY, "IgnoreResult");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_RESULTSET_TYPE, "ResultSetType");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ESCAPE_PROCESSING, "EscapeProcessing");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_APPLYFILTER, "ApplyFilter");
+
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISNULLABLE, "IsNullable");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ACTIVECOMMAND, "ActiveCommand");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISCURRENCY, "IsCurrency");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_NUMBER_FORMATS_SUPPLIER, "NumberFormatsSupplier");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_URL, "URL");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TITLE, "Title");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ACTIVE_CONNECTION, "ActiveConnection");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SCALE, "Scale");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SORT, "Order");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATASOURCE, "DataSourceName");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DETAILFIELDS,"DetailFields");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_REALNAME,"RealName");
+IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCEPROPERTY,"DataFieldProperty");
+
+
+
+// Zuordnung von Namen auf Properties Id's, das koennten auch WhichId's fuer Itemset sein
+//------------------------------------------------------------------
+const FmPropertyInfo* FmPropertyInfoService::getPropertyInfo()
+{
+ // dieser umstaendliche Weg wird gewaehlt um die Reihenfolge der Initialisierung
+ // abzusichern
+
+ sal_uInt16 nPos=1;
+ if (pPropertyInfos == NULL)
+ {
+ static FmPropertyInfo __READONLY_DATA aPropertyInfos[] =
+ {
+ FmPropertyInfo(FM_PROP_NAME, FM_ATTR_NAME, sal_False, ::rtl::OUString(SVX_RES(RID_STR_NAME)), nPos++, HID_PROP_NAME) ,
+ FmPropertyInfo(FM_PROP_LABEL, FM_ATTR_LABEL, sal_True, ::rtl::OUString(SVX_RES(RID_STR_LABEL)), nPos++, HID_PROP_LABEL),
+ FmPropertyInfo(FM_PROP_CONTROLLABEL, FM_ATTR_CONTROLLABEL, sal_False, ::rtl::OUString(SVX_RES(RID_STR_LABELCONTROL)), nPos++, HID_PROP_CONTROLLABEL),
+ FmPropertyInfo(FM_PROP_TEXT, FM_ATTR_TEXT, sal_True, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_MAXTEXTLEN, FM_ATTR_MAXTEXTLEN, sal_True, ::rtl::OUString(SVX_RES(RID_STR_MAXTEXTLEN)), nPos++, HID_PROP_MAXTEXTLEN),
+ FmPropertyInfo(FM_PROP_EDITMASK, FM_ATTR_EDITMASK, sal_True, ::rtl::OUString(SVX_RES(RID_STR_EDITMASK)), nPos++, HID_PROP_EDITMASK),
+ FmPropertyInfo(FM_PROP_LITERALMASK, FM_ATTR_LITERALMASK, sal_True, ::rtl::OUString(SVX_RES(RID_STR_LITERALMASK)), nPos++, HID_PROP_LITERALMASK),
+ FmPropertyInfo(FM_PROP_STRICTFORMAT, FM_ATTR_STRICTFORMAT, sal_True, ::rtl::OUString(SVX_RES(RID_STR_STRICTFORMAT)), nPos++, HID_PROP_STRICTFORMAT),
+ FmPropertyInfo(FM_PROP_ENABLED, FM_ATTR_ENABLED, sal_True, ::rtl::OUString(SVX_RES(RID_STR_ENABLED)), nPos++, HID_PROP_ENABLED) ,
+ FmPropertyInfo(FM_PROP_READONLY, FM_ATTR_READONLY, sal_True, ::rtl::OUString(SVX_RES(RID_STR_READONLY)), nPos++, HID_PROP_READONLY) ,
+ FmPropertyInfo(FM_PROP_PRINTABLE, FM_ATTR_PRINTABLE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_PRINTABLE)), nPos++, HID_PROP_PRINTABLE) ,
+ FmPropertyInfo(::rtl::OUString::createFromAscii("GroupBox"), FM_ATTR_GROUPBOX, sal_True, ::rtl::OUString(SVX_RES(RID_STR_GROUPBOX)), nPos++, HID_PROP_GROUPBOX),
+ FmPropertyInfo(FM_PROP_CONTROLSOURCE, FM_ATTR_CONTROLSOURCE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_CONTROLSOURCE)), nPos++, HID_PROP_CONTROLSOURCE),
+ FmPropertyInfo(FM_PROP_TABSTOP, FM_ATTR_TABSTOP, sal_True, ::rtl::OUString(SVX_RES(RID_STR_TABSTOP)), nPos++, HID_PROP_TABSTOP),
+ FmPropertyInfo(FM_PROP_TABINDEX, FM_ATTR_TABINDEX, sal_True, ::rtl::OUString(SVX_RES(RID_STR_TABINDEX)), nPos++, HID_PROP_TABINDEX) ,
+ FmPropertyInfo(FM_PROP_DATASOURCE, FM_ATTR_DATASOURCE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DATASOURCE)), nPos++, HID_PROP_DATASOURCE) ,
+ FmPropertyInfo(FM_PROP_COMMAND, FM_ATTR_COMMAND, sal_False, ::rtl::OUString(SVX_RES(RID_STR_CURSORSOURCE)), nPos++, HID_PROP_CURSORSOURCE),
+ FmPropertyInfo(FM_PROP_COMMANDTYPE, FM_ATTR_COMMANDTYPE, sal_False, ::rtl::OUString(SVX_RES(RID_STR_CURSORSOURCETYPE)), nPos++, HID_PROP_CURSORSOURCETYPE),
+ FmPropertyInfo(FM_PROP_ESCAPE_PROCESSING, FM_ATTR_ESCAPE_PROCESSING, sal_False, ::rtl::OUString(SVX_RES(RID_STR_ESCAPE_PROCESSING)), nPos++, 0),
+ FmPropertyInfo(FM_PROP_FILTER_CRITERIA, FM_ATTR_FILTER_CRITERIA, sal_False, ::rtl::OUString(SVX_RES(RID_STR_FILTER_CRITERIA)), nPos++, HID_PROP_FILTER_CRITERIA ),
+ FmPropertyInfo(FM_PROP_SORT, FM_ATTR_SORT, sal_False, ::rtl::OUString(SVX_RES(RID_STR_SORT_CRITERIA)), nPos++, HID_PROP_SORT_CRITERIA) ,
+ FmPropertyInfo(FM_PROP_INSERTONLY, FM_ATTR_INSERTONLY, sal_False, ::rtl::OUString(SVX_RES(RID_STR_DATAENTRY)), nPos++, HID_PROP_DATAENTRY) ,
+ FmPropertyInfo(FM_PROP_ALLOWADDITIONS, FM_ATTR_ALLOWADDITIONS, sal_True, ::rtl::OUString(SVX_RES(RID_STR_ALLOW_ADDITIONS)), nPos++, HID_PROP_ALLOW_ADDITIONS) ,
+ FmPropertyInfo(FM_PROP_ALLOWEDITS, FM_ATTR_ALLOWEDITS, sal_True, ::rtl::OUString(SVX_RES(RID_STR_ALLOW_EDITS)), nPos++, HID_PROP_ALLOW_EDITS ) ,
+ FmPropertyInfo(FM_PROP_ALLOWDELETIONS, FM_ATTR_ALLOWDELETIONS, sal_True, ::rtl::OUString(SVX_RES(RID_STR_ALLOW_DELETIONS)), nPos++, HID_PROP_ALLOW_DELETIONS) ,
+ FmPropertyInfo(FM_PROP_INSERTONLY, FM_ATTR_INSERTONLY, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DATAENTRY)), nPos++, HID_PROP_DATAENTRY) ,
+ FmPropertyInfo(FM_PROP_NAVIGATION, FM_ATTR_NAVIGATION, sal_True, ::rtl::OUString(SVX_RES(RID_STR_NAVIGATION)), nPos++, HID_PROP_NAVIGATION) ,
+ FmPropertyInfo(FM_PROP_CYCLE, FM_ATTR_CYCLE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_CYCLE)), nPos++, HID_PROP_CYCLE) ,
+ FmPropertyInfo(FM_PROP_CACHESIZE, FM_ATTR_CACHESIZE, sal_True, ::rtl::OUString(), nPos++, 0) ,
+ FmPropertyInfo(FM_PROP_PRIVILEGES, FM_ATTR_PRIVILEGES, sal_False, ::rtl::OUString(), nPos++, 0),
+ // TODO : UI-Anbindung fuer Privilegien
+ FmPropertyInfo(FM_PROP_LASTDIRTY, FM_ATTR_LASTDIRTY, sal_True, ::rtl::OUString(), nPos++, 0) ,
+ FmPropertyInfo(FM_PROP_HIDDEN_VALUE, FM_ATTR_HIDDEN_VALUE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_VALUE)), nPos++, HID_PROP_HIDDEN_VALUE),
+ FmPropertyInfo(FM_PROP_VALUE, FM_ATTR_VALUE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_VALUE)), nPos++, HID_PROP_VALUE) ,
+ FmPropertyInfo(FM_PROP_VALUEMIN, FM_ATTR_VALUEMIN, sal_True, ::rtl::OUString(SVX_RES(RID_STR_VALUEMIN)), nPos++, HID_PROP_VALUEMIN) ,
+ FmPropertyInfo(FM_PROP_VALUEMAX, FM_ATTR_VALUEMAX, sal_True, ::rtl::OUString(SVX_RES(RID_STR_VALUEMAX)), nPos++, HID_PROP_VALUEMAX) ,
+ FmPropertyInfo(FM_PROP_VALUESTEP, FM_ATTR_VALUESTEP, sal_True, ::rtl::OUString(SVX_RES(RID_STR_VALUESTEP)), nPos++, HID_PROP_VALUESTEP) ,
+ FmPropertyInfo(FM_PROP_DEFAULT_VALUE, FM_ATTR_DEFAULT_VALUE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DEFAULTVALUE)), nPos++, HID_PROP_DEFAULT_LONG_VALUE ),
+ FmPropertyInfo(FM_PROP_DECIMAL_ACCURACY, FM_ATTR_DECIMAL_ACCURACY, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DECIMAL_ACCURACY)), nPos++, HID_PROP_DECIMAL_ACCURACY ),
+ FmPropertyInfo(FM_PROP_DECIMALS, FM_ATTR_DECIMALS, sal_True, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_SHOWTHOUSANDSEP, FM_ATTR_SHOWTHOUSANDSEP, sal_True, ::rtl::OUString(SVX_RES(RID_STR_SHOWTHOUSANDSEP)), nPos++, HID_PROP_SHOWTHOUSANDSEP),
+
+ FmPropertyInfo(FM_PROP_REFVALUE, FM_ATTR_REFVALUE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_REFVALUE)), nPos++, HID_PROP_REFVALUE),
+ FmPropertyInfo(FM_PROP_CURRENCYSYMBOL, FM_ATTR_CURRENCYSYMBOL, sal_True, ::rtl::OUString(SVX_RES(RID_STR_CURRENCYSYMBOL)), nPos++, HID_PROP_CURRENCYSYMBOL),
+ FmPropertyInfo(FM_PROP_CURRSYM_POSITION, FM_ATTR_CURRSYM_POSITION, sal_True, ::rtl::OUString(SVX_RES(RID_STR_CURRSYM_POSITION)), nPos++, HID_PROP_CURRSYM_POSITION),
+
+ FmPropertyInfo(FM_PROP_DATE, FM_ATTR_DATE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DATE)), nPos++, HID_PROP_DATE) ,
+ FmPropertyInfo(FM_PROP_DATEMIN, FM_ATTR_DATEMIN, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DATEMIN)), nPos++, HID_PROP_DATEMIN) ,
+ FmPropertyInfo(FM_PROP_DATEMAX, FM_ATTR_DATEMAX, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DATEMAX)), nPos++, HID_PROP_DATEMAX) ,
+ FmPropertyInfo(FM_PROP_DATEFORMAT, FM_ATTR_DATEFORMAT, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DATEFORMAT)), nPos++, HID_PROP_DATEFORMAT) ,
+ FmPropertyInfo(FM_PROP_DATE_SHOW_CENTURY, FM_ATTR_DATE_SHOW_CENTURY, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DATE_SHOW_CENTURY)), nPos++, HID_PROP_DATE_SHOW_CENTURY ),
+ FmPropertyInfo(FM_PROP_DEFAULT_DATE, FM_ATTR_DEFAULT_DATE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DEFAULTVALUE)), nPos++, HID_PROP_DEFAULT_DATE ),
+
+ FmPropertyInfo(FM_PROP_TIME, FM_ATTR_TIME, sal_True, ::rtl::OUString(SVX_RES(RID_STR_TIME)), nPos++, HID_PROP_TIME) ,
+ FmPropertyInfo(FM_PROP_TIMEMIN, FM_ATTR_TIMEMIN, sal_True, ::rtl::OUString(SVX_RES(RID_STR_TIMEMIN)), nPos++, HID_PROP_TIMEMIN) ,
+ FmPropertyInfo(FM_PROP_TIMEMAX, FM_ATTR_TIMEMAX, sal_True, ::rtl::OUString(SVX_RES(RID_STR_TIMEMAX)), nPos++, HID_PROP_TIMEMAX) ,
+ FmPropertyInfo(FM_PROP_TIMEFORMAT, FM_ATTR_TIMEFORMAT, sal_True, ::rtl::OUString(SVX_RES(RID_STR_TIMEFORMAT)), nPos++, HID_PROP_TIMEFORMAT) ,
+ FmPropertyInfo(FM_PROP_DEFAULT_TIME, FM_ATTR_DEFAULT_TIME, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DEFAULTVALUE)), nPos++, HID_PROP_DEFAULT_TIME ),
+
+ FmPropertyInfo(FM_PROP_SIZE, FM_ATTR_SIZE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_SIZE)), nPos++, HID_PROP_SIZE),
+ FmPropertyInfo(FM_PROP_CLASSID, FM_ATTR_CLASSID, sal_False, ::rtl::OUString(SVX_RES(RID_STR_CLASSID)), nPos++, HID_PROP_CLASSID),
+ FmPropertyInfo(::rtl::OUString::createFromAscii("Height"), FM_ATTR_HEIGHT, sal_True, ::rtl::OUString(SVX_RES(RID_STR_HEIGHT)), nPos++, HID_PROP_HEIGHT),
+ FmPropertyInfo(FM_PROP_WIDTH, FM_ATTR_WIDTH, sal_True, ::rtl::OUString(SVX_RES(RID_STR_WIDTH)), nPos++, HID_PROP_WIDTH),
+ FmPropertyInfo(FM_PROP_DEFAULTCONTROL, FM_ATTR_DEFAULTCONTROL, sal_True, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_BOUNDCOLUMN, FM_ATTR_BOUNDCOLUMN, sal_True, ::rtl::OUString(SVX_RES(RID_STR_BOUNDCOLUMN)), nPos++, HID_PROP_BOUNDCOLUMN),
+ FmPropertyInfo(FM_PROP_LISTSOURCETYPE, FM_ATTR_LISTSOURCETYPE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_LISTSOURCETYPE)), nPos++, HID_PROP_LISTSOURCETYPE),
+ FmPropertyInfo(FM_PROP_LISTSOURCE, FM_ATTR_LISTSOURCE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_LISTSOURCE)), nPos++, HID_PROP_LISTSOURCE),
+ FmPropertyInfo(::rtl::OUString::createFromAscii("ListIndex"), FM_ATTR_LISTINDEX, sal_True, ::rtl::OUString(SVX_RES(RID_STR_LISTINDEX)), nPos++, HID_PROP_LISTINDEX),
+ FmPropertyInfo(FM_PROP_STRINGITEMLIST, FM_ATTR_STRINGITEMLIST, sal_True, ::rtl::OUString(SVX_RES(RID_STR_STRINGITEMLIST)), nPos++, HID_PROP_STRINGITEMLIST),
+ FmPropertyInfo(FM_PROP_DEFAULT_TEXT, FM_ATTR_DEFAULT_TEXT, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DEFAULTVALUE)), nPos++, HID_PROP_DEFAULTVALUE ),
+ FmPropertyInfo(FM_PROP_FONT, FM_ATTR_FONT, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_FONT_NAME, FM_ATTR_FONT_NAME, sal_True, ::rtl::OUString(SVX_RES(RID_STR_FONT)), nPos++, HID_PROP_FONT),
+ FmPropertyInfo(FM_PROP_FONT_STYLENAME, FM_ATTR_FONT_STYLENAME, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_FONT_FAMILY, FM_ATTR_FONT_FAMILY, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_FONT_CHARSET, FM_ATTR_FONT_CHARSET, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_FONT_HEIGHT, FM_ATTR_FONT_HEIGHT, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_FONT_WEIGHT, FM_ATTR_FONT_WEIGHT, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_FONT_SLANT, FM_ATTR_FONT_SLANT, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_FONT_UNDERLINE, FM_ATTR_FONT_UNDERLINE, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_FONT_STRIKEOUT, FM_ATTR_FONT_STRIKEOUT, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_ALIGN, FM_ATTR_ALIGN, sal_True, ::rtl::OUString(SVX_RES(RID_STR_ALIGN)), nPos++, HID_PROP_ALIGN),
+ FmPropertyInfo(FM_PROP_ROWHEIGHT, FM_ATTR_ROWHEIGHT, sal_True, ::rtl::OUString(SVX_RES(RID_STR_ROWHEIGHT)), nPos++, HID_PROP_ROWHEIGHT),
+ FmPropertyInfo(FM_PROP_BACKGROUNDCOLOR, FM_ATTR_BACKGROUNDCOLOR, sal_True, ::rtl::OUString(SVX_RES(RID_STR_BACKGROUNDCOLOR)), nPos++, HID_PROP_BACKGROUNDCOLOR),
+ FmPropertyInfo(FM_PROP_FILLCOLOR, FM_ATTR_FILLCOLOR, sal_True, ::rtl::OUString(SVX_RES(RID_STR_FILLCOLOR)), nPos++, HID_PROP_FILLCOLOR),
+ FmPropertyInfo(FM_PROP_TEXTCOLOR, FM_ATTR_TEXTCOLOR, sal_True, ::rtl::OUString(SVX_RES(RID_STR_TEXTCOLOR)), nPos++, HID_PROP_TEXTCOLOR),
+ FmPropertyInfo(FM_PROP_LINECOLOR, FM_ATTR_LINECOLOR, sal_True, ::rtl::OUString(SVX_RES(RID_STR_LINECOLOR)), nPos++, HID_PROP_LINECOLOR),
+ FmPropertyInfo(FM_PROP_BORDER, FM_ATTR_BORDER, sal_True, ::rtl::OUString(SVX_RES(RID_STR_BORDER)), nPos++, HID_PROP_BORDER),
+ FmPropertyInfo(FM_PROP_DROPDOWN, FM_ATTR_DROPDOWN, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DROPDOWN)), nPos++, HID_PROP_DROPDOWN),
+ FmPropertyInfo(FM_PROP_AUTOCOMPLETE, FM_ATTR_AUTOCOMPLETE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_AUTOCOMPLETE)), nPos++, HID_PROP_AUTOCOMPLETE),
+ FmPropertyInfo(FM_PROP_LINECOUNT, FM_ATTR_LINECOUNT, sal_True, ::rtl::OUString(SVX_RES(RID_STR_LINECOUNT)), nPos++, HID_PROP_LINECOUNT),
+ FmPropertyInfo(FM_PROP_MULTI, FM_ATTR_MULTI, sal_True, ::rtl::OUString(SVX_RES(RID_STR_MULTILINE)), nPos++, HID_PROP_MULTILINE),
+ FmPropertyInfo(FM_PROP_MULTILINE, FM_ATTR_MULTILINE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_MULTILINE)), nPos++, HID_PROP_MULTILINE),
+ FmPropertyInfo(FM_PROP_MULTISELECTION, FM_ATTR_MULTISELECTION, sal_True, ::rtl::OUString(SVX_RES(RID_STR_MULTISELECTION)), nPos++, HID_PROP_MULTISELECTION),
+ FmPropertyInfo(FM_PROP_HARDLINEBREAKS, FM_ATTR_HARDLINEBREAKS, sal_True, ::rtl::OUString(SVX_RES(RID_STR_HARDLINEBREAKS)), nPos++, HID_PROP_HARDLINEBREAKS),
+ FmPropertyInfo(FM_PROP_HSCROLL, FM_ATTR_HSCROLL, sal_True, ::rtl::OUString(SVX_RES(RID_STR_HSCROLL)), nPos++, HID_PROP_HSCROLL),
+ FmPropertyInfo(FM_PROP_VSCROLL, FM_ATTR_VSCROLL, sal_True, ::rtl::OUString(SVX_RES(RID_STR_VSCROLL)), nPos++, HID_PROP_VSCROLL),
+ FmPropertyInfo(FM_PROP_SPIN, FM_ATTR_SPIN, sal_True, ::rtl::OUString(SVX_RES(RID_STR_SPIN)), nPos++, HID_PROP_SPIN),
+ FmPropertyInfo(FM_PROP_STATE, FM_ATTR_STATE, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_BUTTONTYPE, FM_ATTR_BUTTONTYPE, sal_True, ::rtl::OUString(SVX_RES(RID_STR_BUTTONTYPE)), nPos++, HID_PROP_BUTTONTYPE),
+ FmPropertyInfo(FM_PROP_TARGET_URL, FM_ATTR_TARGET_URL, sal_True, ::rtl::OUString(SVX_RES(RID_STR_TARGET_URL)), nPos++, HID_PROP_TARGET_URL ),
+ FmPropertyInfo(FM_PROP_TARGET_FRAME, FM_ATTR_TARGET_FRAME, sal_True, ::rtl::OUString(SVX_RES(RID_STR_TARGET_FRAME)), nPos++, HID_PROP_TARGET_FRAME ),
+ FmPropertyInfo(FM_PROP_SUBMIT_ACTION, FM_ATTR_SUBMIT_ACTION, sal_True, ::rtl::OUString(SVX_RES(RID_STR_SUBMIT_ACTION)), nPos++, HID_PROP_SUBMIT_ACTION ),
+ FmPropertyInfo(FM_PROP_SUBMIT_TARGET, FM_ATTR_SUBMIT_TARGET, sal_True, ::rtl::OUString(SVX_RES(RID_STR_SUBMIT_TARGET)), nPos++, HID_PROP_SUBMIT_TARGET ),
+ FmPropertyInfo(FM_PROP_SUBMIT_METHOD, FM_ATTR_SUBMIT_METHOD, sal_True, ::rtl::OUString(SVX_RES(RID_STR_SUBMIT_METHOD)), nPos++, HID_PROP_SUBMIT_METHOD ),
+ FmPropertyInfo(FM_PROP_SUBMIT_ENCODING, FM_ATTR_SUBMIT_ENCODING, sal_True, ::rtl::OUString(SVX_RES(RID_STR_SUBMIT_ENCODING)), nPos++, HID_PROP_SUBMIT_ENCODING ),
+ FmPropertyInfo(FM_PROP_DEFAULTCHECKED, FM_ATTR_DEFAULT_CHECKED, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DEFAULT_CHECKED)), nPos++, HID_PROP_DEFAULT_CHECKED ),
+ FmPropertyInfo(::rtl::OUString::createFromAscii("DefaultButton"), FM_ATTR_DEFAULT_BUTTON, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DEFAULT_BUTTON)), nPos++, HID_PROP_DEFAULT_BUTTON ),
+ FmPropertyInfo(FM_PROP_VALUE_SEQ, FM_ATTR_VALUE_SEQ, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_IMAGE_URL, FM_ATTR_IMAGE_URL, sal_True, ::rtl::OUString(SVX_RES(RID_STR_IMAGE_URL)), nPos++, HID_PROP_IMAGE_URL ),
+ FmPropertyInfo(FM_PROP_SELECT_SEQ, FM_ATTR_SELECT_SEQ, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_DEFAULT_SELECT_SEQ, FM_ATTR_DEFAULT_SELECT_SEQ, sal_True, ::rtl::OUString(SVX_RES(RID_STR_DEFAULT_SELECT_SEQ)), nPos++, HID_PROP_DEFAULT_SELECT_SEQ ),
+ FmPropertyInfo(FM_PROP_ECHO_CHAR, FM_ATTR_ECHO_CHAR, sal_True, ::rtl::OUString(SVX_RES(RID_STR_ECHO_CHAR)), nPos++, HID_PROP_ECHO_CHAR ),
+ FmPropertyInfo(FM_PROP_EMPTY_IS_NULL, FM_ATTR_EMPTY_IS_NULL, sal_True, ::rtl::OUString(SVX_RES(RID_STR_EMPTY_IS_NULL)), nPos++, HID_PROP_EMPTY_IS_NULL ),
+ FmPropertyInfo(FM_PROP_TRISTATE, FM_ATTR_TRISTATE , sal_True, ::rtl::OUString(SVX_RES(RID_STR_TRISTATE)), nPos++, HID_PROP_TRISTATE ),
+ FmPropertyInfo(FM_PROP_MASTERFIELDS, FM_ATTR_MASTERFIELDS, sal_True, ::rtl::OUString(SVX_RES(RID_STR_MASTERFIELDS)), nPos++, HID_PROP_MASTERFIELDS) ,
+ FmPropertyInfo(FM_PROP_DETAILFIELDS, FM_ATTR_DETAILFIELDS, sal_True, ::rtl::OUString(SVX_RES(RID_STR_SLAVEFIELDS)), nPos++, HID_PROP_SLAVEFIELDS),
+ FmPropertyInfo(FM_PROP_HASNAVIGATION, FM_ATTR_HASNAVIGATION, sal_True, ::rtl::OUString(SVX_RES(RID_STR_NAVIGATIONBAR)), nPos++, HID_PROP_NAVIGATIONBAR) ,
+ FmPropertyInfo(FM_PROP_RECORDMARKER, FM_ATTR_RECORDMARKER, sal_True, ::rtl::OUString(SVX_RES(RID_STR_RECORDMARKER)), nPos++, HID_PROP_RECORDMARKER) ,
+ FmPropertyInfo(FM_PROP_FILTERPROPOSAL, FM_ATTR_FILTERPROPOSAL, sal_True, ::rtl::OUString(SVX_RES(RID_STR_FILTERPROPOSAL)), nPos++, HID_PROP_FILTERPROPOSAL) ,
+ FmPropertyInfo(FM_PROP_QUERY, FM_ATTR_QUERY, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_ISPASSTHROUGH, FM_ATTR_ISPASSTHROUGH, sal_True, ::rtl::OUString(), nPos++, 0 ),
+ FmPropertyInfo(FM_PROP_FORMATKEY, FM_ATTR_FORMATKEY, sal_True, ::rtl::OUString(SVX_RES(RID_STR_FORMATKEY)), nPos++, HID_PROP_FORMATKEY),
+ FmPropertyInfo(FM_PROP_FORMATSSUPPLIER, FM_ATTR_FORMATSSUPPLIER, sal_True, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_TREATASNUMERIC, FM_ATTR_TREATASNUMERIC, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_EFFECTIVE_VALUE, FM_ATTR_EFFECTIVE_VALUE, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_EFFECTIVE_MIN, FM_ATTR_EFFECTIVE_MIN, sal_False, ::rtl::OUString(SVX_RES(RID_STR_VALUEMIN)), nPos++, HID_PROP_EFFECTIVEMIN),
+ FmPropertyInfo(FM_PROP_EFFECTIVE_MAX, FM_ATTR_EFFECTIVE_MAX, sal_False, ::rtl::OUString(SVX_RES(RID_STR_VALUEMAX)), nPos++, HID_PROP_EFFECTIVEMAX),
+ FmPropertyInfo(FM_PROP_EFFECTIVE_DEFAULT, FM_ATTR_EFFECTIVE_DEFAULT, sal_False, ::rtl::OUString(SVX_RES(RID_STR_DEFAULTVALUE)), nPos++, HID_PROP_EFFECTIVEDEFAULT),
+ FmPropertyInfo(FM_PROP_TAG, FM_ATTR_TAG, sal_True, ::rtl::OUString(SVX_RES(RID_STR_TAG)), nPos++, HID_PROP_TAG ),
+ FmPropertyInfo(FM_PROP_HELPTEXT, FM_ATTR_HELPTEXT, sal_False, ::rtl::OUString(SVX_RES(RID_STR_HELPTEXT)), nPos++, HID_PROP_HELPTEXT),
+ FmPropertyInfo(FM_PROP_HELPURL, FM_ATTR_HELPURL, sal_False, ::rtl::OUString(SVX_RES(RID_STR_HELPURL)), nPos++, HID_PROP_HELPURL),
+ FmPropertyInfo(FM_PROP_BOUNDFIELD, FM_ATTR_BOUNDFIELD, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_HIDDEN, FM_ATTR_HIDDEN, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_FIELDSOURCE, FM_ATTR_FIELDSOURCE, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_FILTERSUPPLIER, FM_ATTR_FILTERSUPPLIER, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_CURRENTFILTER, FM_ATTR_CURRENTFILTER, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_SELECTED_FIELDS, FM_ATTR_SELECTED_FIELDS, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_SELECTED_TABLES, FM_ATTR_SELECTED_TABLES, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_TABLENAME, FM_ATTR_TABLENAME, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_THREADSAFE, FM_ATTR_THREADSAFE, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_APPLYFILTER, FM_ATTR_APPLYFILTER, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_SOURCE, FM_ATTR_SOURCE, sal_False, ::rtl::OUString(), nPos++, 0),
+
+ FmPropertyInfo(FM_PROP_CURSORCOLOR, FM_ATTR_CURSORCOLOR, sal_True, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_ALWAYSSHOWCURSOR, FM_ATTR_ALWAYSSHOWCURSOR, sal_True, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_DISPLAYSYNCHRON, FM_ATTR_DISPLAYSYNCHRON, sal_True, ::rtl::OUString(), nPos++, 0),
+
+ FmPropertyInfo(FM_PROP_ISMODIFIED, FM_ATTR_ISMODIFIED, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_ISNEW, FM_ATTR_ISNEW, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_RESULTSET_CONCURRENCY, FM_ATTR_RESULTSET_CONCURRENCY, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_RESULTSET_TYPE, FM_ATTR_RESULTSET_TYPE, sal_False, ::rtl::OUString(), nPos++, 0),
+
+ FmPropertyInfo(FM_PROP_ISNULLABLE, FM_ATTR_ISNULLABLE, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_ACTIVECOMMAND, FM_ATTR_ACTIVECOMMAND, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_ISCURRENCY, FM_ATTR_ISCURRENCY, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_NUMBER_FORMATS_SUPPLIER, FM_ATTR_NUMBER_FORMATS_SUPPLIER, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_URL, FM_ATTR_URL, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_TITLE, FM_ATTR_TITLE, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_ACTIVE_CONNECTION, FM_ATTR_ACTIVE_CONNECTION, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_SCALE, FM_ATTR_SCALE, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_REALNAME, FM_ATTR_REALNAME, sal_False, ::rtl::OUString(), nPos++, 0),
+ FmPropertyInfo(FM_PROP_CONTROLSOURCEPROPERTY,FM_ATTR_CONTROLSOURCEPROPERTY, sal_False, ::rtl::OUString(), nPos++, 0)
+
+ };
+
+ pPropertyInfos = (FmPropertyInfo*)aPropertyInfos;
+ nCount = sizeof(aPropertyInfos) / sizeof(FmPropertyInfo);
+
+ // nochmal sortieren, sicher ist sicher
+ qsort((void*) aPropertyInfos,
+ nCount,
+ sizeof(FmPropertyInfo),
+ &PropertyInfoCompare);
+
+ }
+ return pPropertyInfos;
+}
+
+//------------------------------------------------------------------
+FmPropertyInfo::FmPropertyInfo(const UniString& _rName, sal_Int32 _nId, sal_Bool bMSel,
+ const UniString& aString, sal_uInt16 nP, sal_uInt32 nHid)
+
+ :aName(_rName),nId(_nId),bMultiSelectable(bMSel),
+ aTranslation(aString),nPos(nP),nHelpId(nHid)
+{}
+
+//------------------------------------------------------------------
+UniString FmPropertyInfoService::getPropertyTranslation(sal_Int32 _nId)
+{
+ const FmPropertyInfo* pInfo = getPropertyInfo(_nId);
+ return (pInfo) ? pInfo->aTranslation : UniString();
+}
+
+//------------------------------------------------------------------
+sal_uInt32 FmPropertyInfoService::getPropertyHelpId(sal_Int32 _nId)
+{
+ const FmPropertyInfo* pInfo = getPropertyInfo(_nId);
+ return (pInfo) ? pInfo->nHelpId : 0;
+}
+
+//------------------------------------------------------------------
+sal_Int32 FmPropertyInfoService::getPropertyId(const UniString& _rName)
+{
+ const FmPropertyInfo* pInfo = getPropertyInfo(_rName);
+ return pInfo ? pInfo->nId : -1;
+}
+
+//------------------------------------------------------------------
+sal_uInt16 FmPropertyInfoService::getPropertyPos(sal_Int32 _nId)
+{
+ const FmPropertyInfo* pInfo = getPropertyInfo(_nId);
+ return (pInfo) ? pInfo->nPos : 0xFFFF;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmPropertyInfoService::getPropertyMultiFlag(sal_Int32 _nId)
+{
+ const FmPropertyInfo* pInfo = getPropertyInfo(_nId);
+ return (pInfo) ? pInfo->bMultiSelectable : sal_False;
+}
+
+//------------------------------------------------------------------------
+const FmPropertyInfo* FmPropertyInfoService::getPropertyInfo(const UniString& _rName)
+{
+ // intialisierung
+ if(!pPropertyInfos)
+ getPropertyInfo();
+ FmPropertyInfo aSearch(_rName, 0L, sal_False,UniString(),0);
+
+ const FmPropertyInfo* pPropInfo = (FmPropertyInfo*) bsearch(&aSearch,
+ (void*) pPropertyInfos,
+ nCount,
+ sizeof(FmPropertyInfo),
+ &PropertyInfoCompare);
+
+ return pPropInfo;
+}
+
+
+//------------------------------------------------------------------------
+const FmPropertyInfo* FmPropertyInfoService::getPropertyInfo(sal_Int32 _nId)
+{
+ // intialisierung
+ if(!pPropertyInfos)
+ getPropertyInfo();
+
+ for (sal_uInt16 i = 0; i < nCount; i++)
+ if (pPropertyInfos[i].nId == _nId)
+ return &pPropertyInfos[i];
+
+ return NULL;
+}
+
+
+
diff --git a/svx/source/form/fmsearch.src b/svx/source/form/fmsearch.src
new file mode 100644
index 0000000000..0cc0585c4b
--- /dev/null
+++ b/svx/source/form/fmsearch.src
@@ -0,0 +1,919 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmsearch.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "fmresids.hrc"
+#include "fmsearch.hrc"
+#include "fmhelp.hrc"
+
+ModalDialog RID_SVXDLG_SEARCHFORM
+{
+ OutputSize = TRUE;
+ SVLook = TRUE;
+ Size = MAP_APPFONT( 300, 236 );
+ Text = "Datensatz-Suche";
+ Text [ ENGLISH ] = "Data record search";
+ Text [ english_us ] = "Record Search";
+ Moveable = TRUE;
+ Closeable = TRUE;
+ HelpId = HID_FM_DLG_SEARCH;
+
+ GroupBox GB_SEARCHFOR
+ {
+ Pos = MAP_APPFONT( 6, 8 );
+ Size = MAP_APPFONT( 219, 54 );
+ Text = "Suchen nach";
+ Text [ ENGLISH ] = "Search for";
+ Text[ english_us ] = "Search for";
+ Text[ portuguese ] = "Procurar por";
+ Text[ russian ] = "Íàéòè";
+ Text[ greek ] = "ÁíáæÞôçóç ôïõ";
+ Text[ dutch ] = "Zoeken naar";
+ Text[ french ] = "Rechercher";
+ Text[ spanish ] = "Buscar por";
+ Text[ italian ] = "Cerca";
+ Text[ danish ] = "Søg efter";
+ Text[ swedish ] = "Sök efter";
+ Text[ polish ] = "Szukaj:";
+ Text[ portuguese_brazilian ] = "Search for";
+ Text[ japanese ] = "ŒŸõðŒ";
+ Text[ korean ] = "ãÀ» ´ë»ó";
+ Text[ chinese_simplified ] = "ËÑÑ°";
+ Text[ chinese_traditional ] = "´M§ä¤º®e";
+ Text[ arabic ] = "ÇáÈÍË Úä";
+ Text[ turkish ] = "Ara:";
+ };
+ RadioButton RB_SEARCHFORTEXT
+ {
+ Pos = MAP_APPFONT( 12, 23 );
+ Size = MAP_APPFONT( 50, 10 );
+ Text = "~Text :";
+ Text [ ENGLISH ] = "~Text :";
+ Text[ italian ] = "~Testo :";
+ Text[ portuguese_brazilian ] = "~Text :";
+ Text[ portuguese ] = "~Texto :";
+ Text[ danish ] = "Tekst :";
+ Text[ french ] = "~Texte :";
+ Text[ swedish ] = "~Text :";
+ Text[ dutch ] = "~Tekst :";
+ Text[ spanish ] = "~Texto :";
+ Text[ english_us ] = "~Text :";
+ Text[ chinese_simplified ] = "ÎÄ×Ö£º(~T)";
+ Text[ russian ] = "Òåêñò :";
+ Text[ polish ] = "Tekst:";
+ Text[ japanese ] = "•¶Žš—ñ(~T)";
+ Text[ chinese_traditional ] = "¤å¦r(~T)";
+ Text[ arabic ] = "ÇáäÕ :";
+ Text[ greek ] = "Êåßìåíï :";
+ Text[ korean ] = "ÅؽºÆ®:(~T)";
+ Text[ turkish ] = "Metin:";
+ };
+ RadioButton RB_SEARCHFORNULL
+ {
+ Pos = MAP_APPFONT( 12, 36 );
+ Size = MAP_APPFONT( 100, 10 );
+ Text = "Feldinhalt ist ~NULL";
+ Text [ ENGLISH ] = "Field content is ~NULL";
+ Text[ english_us ] = "Field content is ~NULL";
+ Text[ portuguese ] = "Conteúdo do campo é ~NULL";
+ Text[ russian ] = "Ñîäåðæèìîå ïîëÿ ~NULL";
+ Text[ greek ] = "Ðåñéå÷üìåíï ðåäßïõ åßíáé ÌÇÄÅÍ (NULL)";
+ Text[ dutch ] = "Veldinhoud is ~NUL";
+ Text[ french ] = "Contenu de champ est ~NULL";
+ Text[ spanish ] = "Contenido del campo es ~NULL";
+ Text[ italian ] = "Il contenuto di campo è ~NULL";
+ Text[ danish ] = "Feltindhold er lig med NULL";
+ Text[ swedish ] = "Fältinnehåll är NULL";
+ Text[ polish ] = "Zawartoœci¹ pola jest ~NULL";
+ Text[ portuguese_brazilian ] = "Field content is ~NULL";
+ Text[ japanese ] = "̨°ÙÄÞ“à—e‚ÍNULL";
+ Text[ korean ] = "ÇÊµå ³»¿ëÀÌ NULLÀÓ(~N)";
+ Text[ chinese_simplified ] = "×Ö¶ÎÄÚÈÝÊÇNULL(~Z)";
+ Text[ chinese_traditional ] = "Äæ¦ì¤º®e¬O ~NULL";
+ Text[ arabic ] = "ãÍÊæíÇÊ ÇáÍÞá åí ÞíãÉ ÎÇáíÉ (NULL)";
+ Text[ turkish ] = "Alan içeriði NULL";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_SEARCHFORNOTNULL
+ {
+ Pos = MAP_APPFONT( 12, 49 );
+ Size = MAP_APPFONT( 100, 10 );
+ Text = "Feldinhalt ist ~ungleich NULL";
+ Text [ ENGLISH ] = "Field content is n~ot NULL";
+ Text[ english_us ] = "Field content is not NU~LL";
+ Text[ portuguese ] = "~Conteúdo do campo não é ZERO";
+ Text[ russian ] = "Ñîäðåæèìîå ïîëÿ íå NULL";
+ Text[ greek ] = "Ðåñéå÷üìåíï ðåäßïõ åßíáé äéÜöïñï ôïõ ÌÇÄÅÍ (NULL)";
+ Text[ dutch ] = "Veldinhoud is n~iet NUL";
+ Text[ french ] = "Contenu de champ est différent de ~NULL";
+ Text[ spanish ] = "Contenido del campo no es N~ULL";
+ Text[ italian ] = "Il contenuto di campo non è N~ULL";
+ Text[ danish ] = "Feltindhold er forskellig fra NULL";
+ Text[ swedish ] = "Fältinnehåll är inte NULL";
+ Text[ polish ] = "Zawartoœæ pola jest nierówna NULL";
+ Text[ portuguese_brazilian ] = "Field content is n~ot NULL";
+ Text[ japanese ] = "̨°ÙÄÞ“à—e‚ÍNULL‚Å‚Í‚È‚¢";
+ Text[ korean ] = "ÇÊµå ³»¿ëÀÌ NULL°ú ´Ù¸§(~L)";
+ Text[ chinese_simplified ] = "×Ö¶ÎÄÚÈݲ»ÊÇ NULL(~O)";
+ Text[ chinese_traditional ] = "Äæ¦ì¤º®e¤£¬O NULL";
+ Text[ arabic ] = "ãÍÊæíÇÊ ÇáÍÞá áÇ ÊÓÇæí ÞíãÉ ÎÇáíÉ (NULL)";
+ Text[ turkish ] = "Alan içeriði NULL deðil";
+ };
+ ComboBox CMB_SEARCHTEXT
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 65, 20 );
+ Size = MAP_APPFONT( 154, 80 );
+ DropDown = TRUE;
+ TabStop = TRUE;
+ HelpId = HID_SEARCH_TEXT;
+ };
+
+ GroupBox GB_WHERE
+ {
+ Pos = MAP_APPFONT( 6, 65 );
+ Size = MAP_APPFONT( 219, 58 );
+ Text = "Bereich";
+ Text [ ENGLISH ] = "Bereich";
+ Text[ italian ] = "Area";
+ Text[ portuguese_brazilian ] = "Bereich";
+ Text[ portuguese ] = "Área";
+ Text[ danish ] = "Område";
+ Text[ french ] = "Domaine";
+ Text[ swedish ] = "Område";
+ Text[ dutch ] = "Bereik";
+ Text[ spanish ] = "Área";
+ Text[ english_us ] = "Where to search";
+ Text[ chinese_simplified ] = "ÇøÓò";
+ Text[ russian ] = "Îáëàñòü ïîèñêà";
+ Text[ polish ] = "Obszar";
+ Text[ japanese ] = "”͈Í";
+ Text[ chinese_traditional ] = "°Ï°ì";
+ Text[ arabic ] = "äØÇÞ ÇáÈÍË";
+ Text[ greek ] = "Ðåñéï÷Þ";
+ Text[ korean ] = "ãÀ» ¹üÀ§";
+ Text[ turkish ] = "Aranacak bölüm";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_FORM
+ {
+ Pos = MAP_APPFONT( 12, 77 );
+ Size = MAP_APPFONT( 87, 10 );
+ Text = "~Formular :";
+ Text [ ENGLISH ] = "~Formular :";
+ Text[ english_us ] = "Form:";
+ Text[ portuguese ] = "~Formulário:";
+ Text[ russian ] = "Ôîðìóëÿð :";
+ Text[ dutch ] = "~Formulier :";
+ Text[ french ] = "~Formulaire :";
+ Text[ spanish ] = "~Formulario :";
+ Text[ italian ] = "Formulario :";
+ Text[ danish ] = "~Formular :";
+ Text[ swedish ] = "~Formulär :";
+ Text[ polish ] = "Formularz :";
+ Text[ portuguese_brazilian ] = "~Formular :";
+ Text[ japanese ] = "Ì«°Ñ:";
+ Text[ chinese_simplified ] = "±íµ¥£º";
+ Text[ chinese_traditional ] = "ªí³æ¡G";
+ Text[ arabic ] = "ÇáÇÓÊãÇÑÉ:";
+ Text[ greek ] = "Öüñìá:";
+ Text[ korean ] = "¾ç½Ä:";
+ Text[ turkish ] = "Form:";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_FORM
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 110, 76 );
+ Size = MAP_APPFONT( 109, 60 );
+ TabStop = TRUE;
+ DropDown = TRUE;
+ };
+ RadioButton RB_ALLFIELDS
+ {
+ Pos = MAP_APPFONT( 24, 91 );
+ Size = MAP_APPFONT( 75, 10 );
+ Text = "~Alle Felder";
+ Text [ ENGLISH ] = "~Alle Felder";
+ TabStop = TRUE;
+ HelpId = HID_SEARCH_ALLFIELDS;
+ Text[ italian ] = "tutti i campi";
+ Text[ portuguese_brazilian ] = "~alle Felder";
+ Text[ portuguese ] = "~Campos todos";
+ Text[ danish ] = "Alle felter";
+ Text[ french ] = "Tous les champs";
+ Text[ swedish ] = "Alla fält";
+ Text[ dutch ] = "~Alle velden";
+ Text[ spanish ] = "~Todos los campos";
+ Text[ english_us ] = "All Fields";
+ Text[ chinese_simplified ] = "È«²¿×Ö¶Î";
+ Text[ russian ] = "Âñå ïîëÿ";
+ Text[ polish ] = "Wszystkie pola";
+ Text[ japanese ] = "‚·‚ׂĂĮ̀°ÙÄÞ";
+ Text[ chinese_traditional ] = "¥þ³¡ªºÄæ¦ì";
+ Text[ arabic ] = "ßá ÇáÍÞæá";
+ Text[ greek ] = "¼ëá ôá ðåäßá";
+ Text[ korean ] = "¸ðµç Çʵå";
+ Text[ turkish ] = "Tüm alanlar";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_SINGLEFIELD
+ {
+ Pos = MAP_APPFONT( 24, 106 );
+ Size = MAP_APPFONT( 75, 10 );
+ Text = "Ein~zelnes Feld :";
+ Text [ ENGLISH ] = "Ein~zelnes Feld :";
+ TabStop = TRUE;
+ HelpId = HID_SEARCH_SINGLEFIELD;
+ Text[ italian ] = "Campo singolo:";
+ Text[ portuguese_brazilian ] = "ein~zelnes Feld :";
+ Text[ portuguese ] = "Campo ú~nico:";
+ Text[ danish ] = "Enkelt felt :";
+ Text[ french ] = "Champ individuel :";
+ Text[ swedish ] = "Enstaka fält:";
+ Text[ dutch ] = "~Een enkel veld :";
+ Text[ spanish ] = "~Campo individual :";
+ Text[ english_us ] = "Single field:";
+ Text[ chinese_simplified ] = "µ¥¸ö×ֶΣº";
+ Text[ russian ] = "Â îòäåëüíîì ïîëå :";
+ Text[ polish ] = "Pojedyncze pole :";
+ Text[ japanese ] = "ŒÂX‚Į̀°ÙÄÞ:";
+ Text[ chinese_traditional ] = "³æ­ÓÄæ¦ì¡G";
+ Text[ arabic ] = "ÍÞá ÝÑÏí :";
+ Text[ greek ] = "ÌåìïíùìÝíï ðåäßï:";
+ Text[ korean ] = "°³º° Çʵå:";
+ Text[ turkish ] = "Tek alan:";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_FIELD
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 110, 105 );
+ Size = MAP_APPFONT( 109, 60 );
+ TabStop = TRUE;
+ DropDown = TRUE;
+ HelpId = HID_SEARCH_FIELDSELECTION;
+ };
+ GroupBox GB_OPTIONS
+ {
+ Pos = MAP_APPFONT( 6, 126 );
+ Size = MAP_APPFONT( 288, 76 );
+ Text = "Einstellungen";
+ Text [ ENGLISH ] = "Einstellungen";
+ Text[ italian ] = "Impostazioni";
+ Text[ portuguese_brazilian ] = "Einstellungen";
+ Text[ portuguese ] = "Configuração";
+ Text[ danish ] = "Indstillinger";
+ Text[ french ] = "Paramètres";
+ Text[ swedish ] = "Inställningar";
+ Text[ dutch ] = "Instellingen";
+ Text[ spanish ] = "Configuración";
+ Text[ english_us ] = "Settings";
+ Text[ chinese_simplified ] = "É趨";
+ Text[ russian ] = "Íàñòðîéêè";
+ Text[ polish ] = "Ustawienia";
+ Text[ japanese ] = "Ý’è";
+ Text[ chinese_traditional ] = "³]©w";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ";
+ Text[ greek ] = "Ñõèìßóåéò";
+ Text[ korean ] = "¼³Á¤";
+ Text[ turkish ] = "Ayarlar";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_POSITION
+ {
+ Pos = MAP_APPFONT( 12, 138 );
+ Size = MAP_APPFONT( 40, 10 );
+ Text = "~Position :";
+ Text [ ENGLISH ] = "~Position :";
+ Text[ italian ] = "~Posizione :";
+ Text[ portuguese_brazilian ] = "~Position :";
+ Text[ portuguese ] = "~Posição:";
+ Text[ danish ] = "Placering :";
+ Text[ french ] = "~Position :";
+ Text[ swedish ] = "~Position:";
+ Text[ dutch ] = "~Positie :";
+ Text[ spanish ] = "~Posición :";
+ Text[ english_us ] = "Position :";
+ Text[ chinese_simplified ] = "λÖãº";
+ Text[ russian ] = "Ïîçèöèÿ :";
+ Text[ polish ] = "Pozycja :";
+ Text[ japanese ] = "ˆÊ’u:";
+ Text[ chinese_traditional ] = "¦ì¸m¡G";
+ Text[ arabic ] = "ÇáãæÖÚ:";
+ Text[ greek ] = "ÈÝóç :";
+ Text[ korean ] = "À§Ä¡:";
+ Text[ turkish ] = "Konum:";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_POSITION
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 110, 136 );
+ Size = MAP_APPFONT( 109, 60 );
+ TabStop = TRUE;
+ DropDown = TRUE;
+ HelpId = HID_SEARCH_POSITION;
+ };
+ CheckBox CB_USEFORMATTER
+ {
+ Pos = MAP_APPFONT( 12, 158 );
+ Size = MAP_APPFONT( 90, 10 );
+ Text = "Feldfor~matierung benutzen" ;
+ Text [ ENGLISH ] = "Feldfor~matierung benutzen" ;
+ TabStop = TRUE;
+ HelpId = HID_SEARCH_FORMATTER;
+ Text[ italian ] = "Usa formattazioni di campo";
+ Text[ portuguese_brazilian ] = "Feldfor~matierung benutzen";
+ Text[ portuguese ] = "Usar for~matação de campo";
+ Text[ danish ] = "Anvend feltformatering";
+ Text[ french ] = "Utiliser le f~ormatage de champ";
+ Text[ swedish ] = "Använd ~fältformatering";
+ Text[ dutch ] = "Veldop~maak gebruiken";
+ Text[ spanish ] = "Usar formato de ~campo";
+ Text[ english_us ] = "Apply field format";
+ Text[ chinese_simplified ] = "ʹÓÃ×ֶθñʽ";
+ Text[ russian ] = "Èïîëüçîâàòü ôîðìàò ïîëÿ";
+ Text[ polish ] = "Zastosuj formatowanie pola";
+ Text[ japanese ] = "̨°ÙÄÞ‚Ì‘Ž®Ý’è‚ðŽg—p";
+ Text[ chinese_traditional ] = "¨Ï¥ÎÄæ¦ì®æ¦¡";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ÊäÓíÞ ÇáÍÞá";
+ Text[ greek ] = "ÅöáñìïãÞ ìïñöÞ ðåäßïõ";
+ Text[ korean ] = "ÇÊµå ¼­½Ä Àû¿ë";
+ Text[ turkish ] = "Alan formatýný uygula";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_CASE
+ {
+ Pos = MAP_APPFONT( 12, 171 );
+ Size = MAP_APPFONT( 90, 10 );
+ Text = "E~xakte Suche";
+ Text [ ENGLISH ] = "E~xakte Suche";
+ TabStop = TRUE;
+ HelpId = HID_SEARCH_CASE;
+ Text[ italian ] = "Ricerca esatta";
+ Text[ portuguese_brazilian ] = "E~xakte Suche";
+ Text[ portuguese ] = "Procura e~xacta";
+ Text[ danish ] = "Søg eksakt";
+ Text[ french ] = "Respecter la ~casse";
+ Text[ swedish ] = "E~xakt sökning";
+ Text[ dutch ] = "E~xact dezelfde tekens";
+ Text[ spanish ] = "Busca ~exacta";
+ Text[ english_us ] = "Match case";
+ Text[ chinese_simplified ] = "¾«È·ËÑÑ°";
+ Text[ russian ] = "Òî÷íûé ïîèñê";
+ Text[ polish ] = "Dok³adne wyszukiwanie";
+ Text[ japanese ] = "Š®‘S‚É“¯ˆê‚È‚à‚Ì‚ÌŒŸõ";
+ Text[ chinese_traditional ] = "ºë½T´M§ä";
+ Text[ arabic ] = "ÈÍË ÏÞíÞ";
+ Text[ greek ] = "ÁêñéâÞò áíáæÞôçóç";
+ Text[ korean ] = "»ó¼¼ÇÏ°Ô Ã£±â";
+ Text[ turkish ] = "BÜYÜK/küçük harf duyarlý";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_BACKWARD
+ {
+ Pos = MAP_APPFONT( 110, 158 );
+ Size = MAP_APPFONT( 80, 10 );
+ Text = "Rüc~kwärts suchen";
+ Text [ ENGLISH ] = "Rüc~kwärts suchen";
+ TabStop = TRUE;
+ HelpId = HID_SEARCH_BACKWARD;
+ Text[ italian ] = "Cerca indietro";
+ Text[ portuguese_brazilian ] = "rüc~kwärts suchen";
+ Text[ portuguese ] = "Pro~curar para trás";
+ Text[ danish ] = "Søg baglæns";
+ Text[ french ] = "Recherche vers le haut";
+ Text[ swedish ] = "Sök ~bakåt";
+ Text[ dutch ] = "A~chterwaarts zoeken";
+ Text[ spanish ] = "Buscar hacia ~atrás";
+ Text[ english_us ] = "Search backwards";
+ Text[ chinese_simplified ] = "ÏòºóËÑÑ°";
+ Text[ russian ] = "Îáðàòíûé ïîèñê";
+ Text[ polish ] = "Szukaj wstecz";
+ Text[ japanese ] = "Œã–߂肵‚ÄŒŸõ";
+ Text[ chinese_traditional ] = "¦V«á´M§ä";
+ Text[ arabic ] = "ÈÍË ááÎáÝ";
+ Text[ greek ] = "Áíá~æÞôçóç ðßóù";
+ Text[ korean ] = "µÚ·Î ã±â";
+ Text[ turkish ] = "Geriye doðru ara";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_STARTOVER
+ {
+ Pos = MAP_APPFONT( 110, 171 );
+ Size = MAP_APPFONT( 80, 10 );
+ Text = "~Vom Anfang";
+ Text [ ENGLISH ] = "~Vom Anfang";
+ TabStop = TRUE;
+ HelpId = HID_SEARCH_STARTOVER;
+ Text[ italian ] = "~dall'inizio";
+ Text[ portuguese_brazilian ] = "~vom Anfang";
+ Text[ portuguese ] = "~do princípio";
+ Text[ danish ] = "Fra begyndelsen";
+ Text[ french ] = "À partir du début";
+ Text[ swedish ] = "~Från början";
+ Text[ dutch ] = "~Vanaf begin";
+ Text[ spanish ] = "~Desde el principio";
+ Text[ english_us ] = "From Beginning";
+ Text[ chinese_simplified ] = "´Ó¿ª¶Ë";
+ Text[ russian ] = "Ñ íà÷àëà";
+ Text[ polish ] = "Od pocz¹tku";
+ Text[ japanese ] = "ʼn‚©‚ç";
+ Text[ chinese_traditional ] = "±q¶}ºÝ";
+ Text[ arabic ] = "ãä ÇáÈÏÇíÉ";
+ Text[ greek ] = "Áðü ôçí áñ~÷Þ";
+ Text[ korean ] = "óÀ½ºÎÅÍ";
+ Text[ turkish ] = "Baþtan itibaren";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_WILDCARD
+ {
+ Pos = MAP_APPFONT( 190, 158 );
+ Size = MAP_APPFONT( 100, 10 );
+ Text = "P~latzhalter-Ausdruck";
+ Text [ ENGLISH ] = "P~latzhalter-Ausdruck";
+ TabStop = TRUE;
+ HelpId = HID_SEARCH_WILDCARD;
+ Text[ italian ] = "Espressione segnaposto";
+ Text[ portuguese_brazilian ] = "P~latzhalter-Ausdruck";
+ Text[ portuguese ] = "~Expressão polivalente";
+ Text[ danish ] = "Pladsholder-udtryk";
+ Text[ french ] = "E~xpression substituante";
+ Text[ swedish ] = "P~latshållaruttryck";
+ Text[ dutch ] = "P~laatsvervangende tekst";
+ Text[ spanish ] = "~Expresión comodín";
+ Text[ english_us ] = "Placeholder expression";
+ Text[ chinese_simplified ] = "ͨÅä·û±í´ï";
+ Text[ russian ] = "Âûðàæåíèå ìåòêè-çàïîëíèòåëÿ";
+ Text[ polish ] = "Wyra¿enie znaku-wype³niacza";
+ Text[ japanese ] = "ܲÙÄÞ¶°ÄÞ‚Ì•\\Œ»";
+ Text[ chinese_traditional ] = "³q°t²Å-ªí¹F";
+ Text[ arabic ] = "ÊÚÈíÑ ÚäÕÑ äÇÆÈ";
+ Text[ greek ] = "ÐáñÜóôáóç óõìâü~ëïõ êñÜôçóçò èÝóçò";
+ Text[ korean ] = "°³Ã¼ Ʋ Ç¥Çö";
+ Text[ turkish ] = "Genel arama terimi";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_REGULAR
+ {
+ Pos = MAP_APPFONT( 190, 171 );
+ Size = MAP_APPFONT( 84, 10 );
+ Text = "Re~gulärer Ausdruck";
+ Text [ ENGLISH ] = "Re~gulärer Ausdruck";
+ TabStop = TRUE;
+ HelpId = HID_SEARCH_REGULAR;
+ Text[ italian ] = "Espressione regolare";
+ Text[ portuguese_brazilian ] = "re~gulärer Ausdruck";
+ Text[ portuguese ] = "~Expressão regular";
+ Text[ danish ] = "Regulært udtryk";
+ Text[ french ] = "Caractère générique";
+ Text[ swedish ] = "Re~guljärt uttryck";
+ Text[ dutch ] = "Gangbare ~uitdrukking";
+ Text[ spanish ] = "Expresión ~regular";
+ Text[ english_us ] = "Regular expression";
+ Text[ chinese_simplified ] = "³£¹æ±í´ï";
+ Text[ russian ] = "Ðåãóëÿðíîå âûðàæåíèå";
+ Text[ polish ] = "Wyra¿enie regularne";
+ Text[ japanese ] = "ܲÙÄÞ¶°ÄÞ•¶Žš";
+ Text[ chinese_traditional ] = "±`³Wªí¹F";
+ Text[ arabic ] = "ÊÚÈíÑ ÇÚÊíÇÏí";
+ Text[ greek ] = "ÊáíïíéêÞ Ýêöñáóç";
+ Text[ korean ] = "º¸Åë Ç¥Çö";
+ Text[ turkish ] = "Genel arama terimi";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_APPROX
+ {
+ Pos = MAP_APPFONT( 190, 184 );
+ Size = MAP_APPFONT( 84, 10 );
+ Text = "~Ähnlichkeitssuche";
+ Text [ ENGLISH ] = "~Ähnlichkeitssuche";
+ TabStop = TRUE;
+ HelpId = HID_SEARCH_APPROX;
+ Text[ italian ] = "Ricerca per simili";
+ Text[ portuguese_brazilian ] = "~Ähnlichkeitssuche";
+ Text[ portuguese ] = "Pro~cura por semelhança";
+ Text[ danish ] = "Søg lignende";
+ Text[ french ] = "R~echerche de similarité";
+ Text[ swedish ] = "~Likhetssökning";
+ Text[ dutch ] = "~Zoeken naar overeenkomsten";
+ Text[ spanish ] = "~Búsqueda por semejanza";
+ Text[ english_us ] = "Similarity Search";
+ Text[ chinese_simplified ] = "ÀàËÆËÑÑ°";
+ Text[ russian ] = "Ïîèñê ïîõîæèõ";
+ Text[ polish ] = "Szukaj podobnych";
+ Text[ japanese ] = "—ÞŽ—ŒŸõ";
+ Text[ chinese_traditional ] = "Ãþ¦ü´M§ä";
+ Text[ arabic ] = "ÇáÈÍË Úä ßáãÇÊ ãÊÔÇÈåÉ";
+ Text[ greek ] = "ÁíáæÞôçóç ïìïéüôçôáò";
+ Text[ korean ] = "À¯»ç¼º ã±â";
+ Text[ turkish ] = "Benzerini ara";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_APPROXSETTINGS
+ {
+ Pos = MAP_APPFONT( 275, 182 );
+ Size = MAP_APPFONT( 14, 14 );
+ Text = "~..." ;
+ Text [ ENGLISH ] = "~..." ;
+ TabStop = TRUE ;
+ HelpId = HID_SEARCH_APPROXSETTINGS;
+ Text[ italian ] = "~...";
+ Text[ portuguese_brazilian ] = "~...";
+ Text[ portuguese ] = "~...";
+ Text[ danish ] = "...";
+ Text[ french ] = "~...";
+ Text[ swedish ] = "~...";
+ Text[ dutch ] = "~...";
+ Text[ spanish ] = "~...";
+ Text[ english_us ] = "...";
+ Text[ chinese_simplified ] = "...";
+ Text[ russian ] = "~...";
+ Text[ polish ] = "~...";
+ Text[ japanese ] = "...";
+ Text[ chinese_traditional ] = "~...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "~...";
+ Text[ korean ] = "...";
+ Text[ turkish ] = "~...";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_STATE
+ {
+ Pos = MAP_APPFONT( 6, 205 );
+ Size = MAP_APPFONT( 288, 25 );
+ Text = "Status" ;
+ Text [ ENGLISH ] = "State" ;
+ Text[ italian ] = "Stato";
+ Text[ portuguese_brazilian ] = "State";
+ Text[ portuguese ] = "Estado";
+ Text[ danish ] = "Status";
+ Text[ french ] = "Statut";
+ Text[ swedish ] = "Status";
+ Text[ dutch ] = "Status";
+ Text[ spanish ] = "Estado";
+ Text[ english_us ] = "State";
+ Text[ chinese_simplified ] = "״̬";
+ Text[ russian ] = "Ñîñòîÿíèå";
+ Text[ polish ] = "Stan";
+ Text[ japanese ] = "½Ã°À½";
+ Text[ chinese_traditional ] = "ª¬ºA";
+ Text[ arabic ] = "ÇáÍÇáÉ";
+ Text[ greek ] = "ÊáôÜóôáóç";
+ Text[ korean ] = "»óÅÂ";
+ Text[ turkish ] = "Durum";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_RECORDLABEL
+ {
+ Pos = MAP_APPFONT( 12, 215 );
+ Size = MAP_APPFONT( 40, 10 );
+ Text = "Datensatz :" ;
+ Text [ ENGLISH ] = "Datensatz :" ;
+ Text[ italian ] = "Record di dati:";
+ Text[ portuguese_brazilian ] = "Datensatz :";
+ Text[ portuguese ] = "Registo de dados:";
+ Text[ danish ] = "Datapost :";
+ Text[ french ] = "Enregistrement :";
+ Text[ swedish ] = "Datapost :";
+ Text[ dutch ] = "Record :";
+ Text[ spanish ] = "Registro :";
+ Text[ english_us ] = "Record :";
+ Text[ chinese_simplified ] = "Êý¾ÝÌõÄ¿£º";
+ Text[ russian ] = "Çàïèñü :";
+ Text[ polish ] = "Rekord :";
+ Text[ japanese ] = "Úº°ÄÞ:";
+ Text[ chinese_traditional ] = "¸ê®Æ¶µ¥Ø¡G";
+ Text[ arabic ] = "ÓÌá :";
+ Text[ greek ] = "ÅããñáöÞ :";
+ Text[ korean ] = "·¹ÄÚµå:";
+ Text[ turkish ] = "Veri kümesi:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_RECORD
+ {
+ Pos = MAP_APPFONT( 55, 215 );
+ Size = MAP_APPFONT( 30, 10 );
+ UniqueId = UID_SEARCH_RECORDSTATUS;
+ TabStop = TRUE;
+ };
+ FixedText FT_HINT
+ {
+ Pos = MAP_APPFONT( 99, 215 );
+ Size = MAP_APPFONT( 190, 10 );
+ };
+ PushButton PB_SEARCH
+ {
+ Pos = MAP_APPFONT( 244, 6 );
+ Size = MAP_APPFONT( 50, 14 );
+ Text = "~Suchen";
+ Text [ ENGLISH ] = "~Suchen";
+ TabStop = TRUE;
+ DefButton = TRUE;
+ HelpId = HID_SEARCH_BTN_SEARCH;
+ Text[ italian ] = "Cerca";
+ Text[ portuguese_brazilian ] = "~Suchen";
+ Text[ portuguese ] = "~Procurar";
+ Text[ danish ] = "Søg";
+ Text[ french ] = "~Rechercher";
+ Text[ swedish ] = "~Sök";
+ 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 ] = "AíáæÞôçóç";
+ Text[ korean ] = "ã±â";
+ Text[ turkish ] = "Ara";
+ Text[ language_user1 ] = " ";
+ };
+ CancelButton 1
+ {
+ Pos = MAP_APPFONT( 244, 26 );
+ Size = MAP_APPFONT( 50, 14 );
+ HelpId = HID_SEARCH_BTN_CLOSE;
+ Text = "S~chließen";
+ Text [ ENGLISH ] = "S~chließen";
+ TabStop = TRUE;
+ Text[ italian ] = "Chiudi";
+ Text[ portuguese_brazilian ] = "S~chließen";
+ Text[ portuguese ] = "~Fechar";
+ Text[ danish ] = "Luk";
+ Text[ french ] = "F~ermer";
+ Text[ swedish ] = "~Stäng";
+ Text[ dutch ] = "S~luiten";
+ Text[ spanish ] = "~Cerrar";
+ Text[ english_us ] = "~Close";
+ 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 1
+ {
+ Pos = MAP_APPFONT( 244, 46 );
+ Size = MAP_APPFONT( 50, 14 );
+ Text = "~Hilfe";
+ Text [ ENGLISH ] = "~Hilfe";
+ TabStop = TRUE;
+ Text[ italian ] = "?";
+ Text[ portuguese_brazilian ] = "~Hilfe";
+ Text[ portuguese ] = "~Ajuda";
+ Text[ danish ] = "~Hjælp";
+ Text[ french ] = "Ai~de";
+ Text[ swedish ] = "~Hjälp";
+ Text[ dutch ] = "~Help";
+ Text[ spanish ] = "~Ayuda";
+ Text[ english_us ] = "~Help";
+ Text[ chinese_simplified ] = "ÇóÖú(~H)";
+ Text[ russian ] = "Ñï~ðàâêà";
+ Text[ polish ] = "~Pomoc";
+ Text[ japanese ] = "ÍÙÌß(~H)";
+ Text[ chinese_traditional ] = "»¡©ú(~H)";
+ Text[ arabic ] = "ã~ÓÇÚÏÉ";
+ Text[ greek ] = "ÂïÞèåéá";
+ Text[ korean ] = "µµ¿ò¸»(~H)";
+ Text[ turkish ] = "Yardým";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ portuguese ] = "Localizar registo de dados";
+ Text[ russian ] = "Ïîèñê çàïèñè äàííûõ";
+ Text[ dutch ] = "Zoeken naar record";
+ Text[ french ] = "Recherche d'enregistrement";
+ Text[ spanish ] = "Búsqueda de registro de datos";
+ Text[ italian ] = "Ricerca record di dati";
+ Text[ danish ] = "Datapost-søgning";
+ Text[ swedish ] = "Datapostsökning";
+ Text[ polish ] = "Wyszukiwanie rekordów";
+ Text[ portuguese_brazilian ] = "Data record search";
+ Text[ japanese ] = "ÃÞ°À Úº°ÄÞ‚ÌŒŸõ";
+ Text[ chinese_simplified ] = "ËÑÑ°Êý¾Ý×é";
+ Text[ chinese_traditional ] = "´M§ä¼ÆÕu¶µ¥Ø";
+ Text[ arabic ] = "ÇáÈÍË Úä ÓÌá";
+ Text[ greek ] = "ÁíáæÞôçóç åããñáöÞò";
+ Text[ korean ] = "µ¥ÀÌÅÍ ·¹ÄÚµå ã±â";
+ Text[ turkish ] = "Veri kümesi aramasý";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_RECORDSEARCH_METHODS
+{
+ Text = "beliebig im Feld;am Feldanfang;am Feldende;ganzes Feld" ;
+ Text [ ENGLISH ] = "beliebig im Feld;am Feldanfang;am Feldende;ganzes Feld" ;
+ Text[ italian ] = "a piacere sul campo;all'inizio del campo;alla fine del campo;l'intero campo";
+ Text[ portuguese_brazilian ] = "beliebig im Feld;am Feldanfang;ganzes Feld";
+ Text[ portuguese ] = "qualquer posição dentro do campo; no início do campo; no fim do campo; no campo inteiro";
+ Text[ danish ] = "vilkårlig i feltet;ved feltets begyndelse;ved feltets slutning;hele feltet";
+ Text[ french ] = "à un endroit quelconque du champ;en début de champ;en fin de champ;le champ entier";
+ Text[ swedish ] = "var Du vill i fältet;i fältets början;i fältets slut;i hela fältet";
+ Text[ dutch ] = "willekeurige plaats in veld;aan veldeinde;aan veldbegin;compleet veld";
+ Text[ spanish ] = "cualquier parte en campo;al principio del campo;al final del campo;todo el campo";
+ Text[ english_us ] = "anywhere in the field;beginning of field;end of field;entire field";
+ Text[ chinese_simplified ] = "ÈÎÒâÒ»¸ö×ֶΣ»ÔÚ×ֶοª¶Ë£»Õû¸ö×Ö¶Î";
+ Text[ language_user1 ] = " ";
+ Text[ russian ] = "ïî æåëàíèþ â ïîëå;â íà÷àëå ïîëÿ;â êîíöå ïîëÿ;âñå ïîëå";
+ Text[ polish ] = "dowolnie w polu; na pocz¹tku pola; na koñcu pola;ca³e pole";
+ Text[ japanese ] = "̨°ÙÄÞ“à‚Ì‚ ‚éêŠ;̨°ÙÄނ̉‚ß;̨°ÙÄÞ‚ÌI‚è;̨°ÙÄÞ‘S‘Ì";
+ Text[ chinese_traditional ] = "¥ô·N¤@­ÓÄæ¦ì¡Q¦bÄæ¦ì¶}ºÝ¡Q¾ã­ÓÄæ¦ì";
+ Text[ arabic ] = "Ýí Ãí ãßÇä Ýí ÇáÍÞẠÝí ÈÏÇíÊå¡ Ýí äåÇíÊåº Ãæ ÇáÍÞá ßáå";
+ Text[ greek ] = "ôõ÷áßá;óôçí áñ÷Þ ôïõ ðåäßïõ;óôï ôÝëïò ôïõ ðåäßïõ;ïëüêëçñï ôï ðåäßï";
+ Text[ korean ] = "Çʵ忡¼­ ÀÓÀÇ·Î;Çʵå óÀ½¿¡;ÇÊµå ³¡¿¡;Àüü Çʵå";
+ Text[ turkish ] = "Alanda rasgele;Alan baþýnda;Alan sonunda;Tüm alanda";
+};
+
+String RID_STR_RECORDSEARCH_BUTTONS
+{
+ // Bem. : das 'Suchen' in diesem String muss genau das selbe sein wie die Beschriftung des PB_SEARCH-Buttons im Dialog
+ Text = "~Vom Anfang;~Vom Ende;~Suchen;~Abbrechen" ;
+ Text [ ENGLISH ] = "~Vom Anfang;~Vom Ende;~Suchen;~Abbrechen" ;
+ Text[ italian ] = "dall'inizio;dalla fine; cerca;annulla";
+ Text[ portuguese_brazilian ] = "~vom Anfang;~vom Ende";
+ Text[ portuguese ] = "~do princípio; do ~fim; ~Localizar; ~Cancelar";
+ Text[ danish ] = "Fra begyndelsen;Fra slutningen;Søg;Annuller";
+ Text[ french ] = "À partir du début ; À partir de la fin ; Rechercher ; Annuler";
+ Text[ swedish ] = "~Från början;~Från slutet;~Sök;~Avbryt";
+ Text[ dutch ] = "~Vanaf begin;~Vanaf einde;~Zoeken;~Stoppen";
+ Text[ spanish ] = "~Desde el principio;~Desde el final;~Buscar;~Cancelar";
+ Text[ english_us ] = "From top;From bottom;Search;Cancel";
+ Text[ chinese_simplified ] = "´Ó¿ª¶Ë£»´Óβ¶Ë£»ËÑÑ°£»È¡Ïû";
+ Text[ russian ] = "ñ íà÷àëà;~ñ êîíöà;~Íàéòè;~Îòìåíèòü";
+ Text[ polish ] = "od koñca;od pocz¹tku;Szukaj;Anuluj";
+ Text[ japanese ] = "ʼn‚©‚ç;Ōォ‚ç;ŒŸõ;·¬Ý¾Ù";
+ Text[ chinese_traditional ] = "±q¶}ºÝ¡F±q§ÀºÝ¡F´M§ä¡F¨ú®ø";
+ Text[ arabic ] = "ãä ÇáÈÏÇíɺ ãä ÇáäåÇíɺ ÈÍ˺ ÅáÛÇÁ";
+ Text[ greek ] = "Áðü ôçí áñ÷Þ;Áðü ôï ôÝëïò;ÁíáæÞôç~óç;~Áêýñùóç";
+ Text[ korean ] = "óÀ½ºÎÅÍ;³¡¿¡¼­ ºÎÅÍ;ã±â;Ãë¼Ò";
+ Text[ turkish ] = "Baþtan;Sondan;Ara;Ýptal";
+ Text[ language_user1 ] = " ";
+};
+
+ErrorBox RID_SVXERR_SEARCH_NORECORD
+{
+ Buttons = WB_OK;
+ Message = "Es wurden keine Datensätze, die zu Ihren Angaben passen, gefunden !" ;
+ Message [ ENGLISH ] = "Es wurden keine Datensätze, die zu Ihren Angaben passen, gefunden !" ;
+ Message[ italian ] = "Non sono stati trovati record di dati corrispondenti ai vostri dati!";
+ Message[ portuguese_brazilian ] = "Es wurden keine Datensätze, die zu Ihren Angaben passen, gefunden !";
+ Message[ portuguese ] = "Impossível encontrar registos de dados correspondentes às indicações fornecidas!";
+ Message[ danish ] = "Der blev ikke fundet nogen dataposter, som svarer til dine angivelser!";
+ Message[ french ] = "Aucun enregistrement trouvé qui corresponde à vos indications !";
+ Message[ swedish ] = "Inga dataposter har hittats som passar till Dina angivelser!";
+ Message[ dutch ] = "Er werden geen records gevonden die bij de vermelde gegevens passen !";
+ Message[ spanish ] = "¡No se encontró ningún registro de datos adecuado a su información!";
+ Message[ english_us ] = "No records corresponding to your data found!";
+ Message[ chinese_simplified ] = "ûÓÐÕÒµ½·ûºÏÄú¸ø¶¨µÄÊý¾ÝÌõÄ¿£¡";
+ Message[ russian ] = "Çàïèñè, ñîîòâåòñòâóþùèå Âàøèì äàííûì, íå îáíàðóæåíû !";
+ Message[ polish ] = "Nie znaleziono ¿adnych rekordów odpowiadaj¹cych wpisanym danym!";
+ Message[ japanese ] = "“ü—Í€–Ú‚ÉŠY“–‚·‚éÚº°ÄÞ‚ªŒ©‚‚©‚è‚Ü‚¹‚ñ!";
+ Message[ chinese_traditional ] = "¨S¦³§ä¨ì²Å¦X±z«ü©wªº¸ê®Æ¶µ¥Ø¡T";
+ Message[ arabic ] = "ÊÚÐÑ ÇáÚËæÑ Úáì ÓÌáÇÊ ÈíÇäÇÊ ÊÊãÇÔì ãÚ ÈíÇäÇÊß !";
+ Message[ greek ] = "Äåí âñÝèçêáí åããñáöÝò, ïé ïðïßåò íá åêðëçñþíïõí ôá äåäïìÝíá óáò!";
+ Message[ korean ] = "´ç½ÅÀÇ µ¥ÀÌÅÍ¿¡ ¸Â´Â ·¹Äڵ带 ãÁö ¸øÇß½À´Ï´Ù!";
+ Message[ turkish ] = "Girdiðiniz verilere uygun veri kümeleri bulunamadý!";
+ Message[ language_user1 ] = " ";
+};
+
+ErrorBox RID_SVXERR_SEARCH_GENERAL_ERROR
+{
+ Buttons = WB_OK;
+ Message = "Es trat ein nicht näher bekannter Fehler auf. Die Suche konnte nicht beendet werden !" ;
+ Message [ ENGLISH ] = "Es trat ein nicht näher bekannter Fehler auf. Die Suche konnte nicht beendet werden !" ;
+ Message[ english_us ] = "An unknown error occurred. The search could not be terminated!";
+ Message[ portuguese ] = "Surgiu um erro desconhecido. Impossível concluir a procura!";
+ Message[ russian ] = "Ïðîèçîøëà íåèçâåñòíàÿ îøèáêà. Çàêîí÷èòü ïîèñê íå óäàëîñü !";
+ Message[ dutch ] = "Er is een onbekende fout opgetreden: De zoekactie kon niet worden beëindigd!";
+ Message[ french ] = "Une erreur inconnue est survenue. La recherche n'a pas pu être terminée !";
+ Message[ spanish ] = "Ha ocurrido un error desconocido. La búsqueda no se pudo completar.";
+ Message[ italian ] = "Impossibile terminare la ricerca. Si è verificato un errore non ben definito.";
+ Message[ danish ] = "Der opstod en ukendt fejl. Det var ikke muligt at afslutte søgningen!";
+ Message[ swedish ] = "Ett okänt fel har uppstått. Sökningen kunde inte avslutas!";
+ Message[ polish ] = "Wyst¹pi³ bli¿ej nieznany b³¹d. Wyszukiwania ne mo¿na by³o zakoñczyæ!";
+ Message[ portuguese_brazilian ] = "Es trat ein nicht näher bekannter Fehler auf. Die Suche konnte nicht beendet werden !";
+ Message[ japanese ] = "‚æ‚­‚í‚©‚ç‚È‚¢´×°‚ª¶‚¶‚Ü‚µ‚½BŒŸõ‚ðI—¹‚Å‚«‚Ü‚¹‚ñ!";
+ Message[ chinese_simplified ] = "³öÏÖÒ»¸ö²»Ã÷µÄ´íÎó¡£ÎÞ·¨½áÊøËÑÑ°ÃüÁ";
+ Message[ chinese_traditional ] = "¥X²{¤@­Ó¤£©úªº¿ù»~¡CµLªkµ²§ô´M§ä©R¥O¡I";
+ Message[ arabic ] = "ÍÏË ÎØà ÛíÑ ãÚÑæÝ. ÊÚÐÑ ÅäåÇÁ ÇáÈÍË !";
+ Message[ greek ] = "ÐáñïõóéÜóôçêå Üãíùóôï óöÜëìá. Ç áíáæÞôçóç äåí Þôáí äõíáôüí íá ïëïêëçñùèåß!";
+ Message[ korean ] = "¾Ë·ÁÁöÁö ¾ÊÀº ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù. ã±â¸¦ Á¾·áÇÏÁö ¸øÇß½À´Ï´Ù!";
+ Message[ turkish ] = "Ayrýntýlarý bilinmeyen bir hata oluþtu. Arama iþlemi tamamlanamadý!";
+ Message[ language_user1 ] = " ";
+};
+
+String RID_STR_SEARCH_OVERFLOW
+{
+ Text = "Überlauf, Suche wurde am Anfang forgesetzt;Überlauf, Suche wurde am Ende forgesetzt" ;
+ Text [ ENGLISH ] = "Überlauf, Suche wurde am Anfang forgesetzt;Überlauf, Suche wurde am Ende forgesetzt" ;
+ Text[ italian ] = "Overflow, la ricerca è stata proseguita dall'inizio;Overflow, la ricerca è stata proseguita dalla fine";
+ Text[ portuguese_brazilian ] = "Überlauf, Suche wurde am Anfang forgesetzt;Überlauf, Suche wurde am Ende forgesetzt";
+ Text[ portuguese ] = "Transbordo - Localizar continua pelo início;Transbordo - Localizar continua pelo final.";
+ Text[ danish ] = "Overløb, søgning blev fortsat ved begyndelsen;Overløb, søgningen blev fortsat ved slutningen";
+ Text[ french ] = "Débordement ; la recherche a été poursuivie vers le haut;Débordement ; la recherche a été poursuivie vers le bas";
+ Text[ swedish ] = "Spill, Sökningen fortsätts från början;Spill, Sökningen fortsätts från slutet";
+ Text[ dutch ] = "Overloop, zoeken werd voortgezet aan het begin; Overloop, zoeken werd voortgezet aan het einde";
+ Text[ spanish ] = "Desbordamiento; la búsqueda continúa por el principio;Desbordamiento; la búsqueda continúa por el final";
+ Text[ english_us ] = "Overflow, search continued at the beginning;Overflow, search continued at the end";
+ Text[ chinese_simplified ] = "ÒçÖµ£¬ËÑÑ°´ÓÊ׶˼ÌÐø£»ÒçÖµ£¬ËÑÑ°´Óβ¶Ë¼ÌÐø";
+ Text[ language_user1 ] = " ";
+ Text[ russian ] = "Ïåðåïîëíåíèå, Ïîèñê ïðîäîëæåí â íà÷àëå;Ïåðåïîëíåíèå, Ïîèñê ïðîäîëæåí â êîíöå";
+ Text[ polish ] = "Przepe³nienie, Kontynuuj wyszukiwanie na pocz¹tku;Przepe³nienie, Kontynuuj wyszukiwanie na koñcu";
+ Text[ japanese ] = "µ°ÊÞ°ÌÛ°AŒŸõ‚Íʼn‚Å‘±s;µ°ÊÞ°ÌÛ°AŒŸõ‚ÍÅŒã‚Å‘±s";
+ Text[ chinese_traditional ] = "·¸­È¡A´M§ä±q­ººÝÄ~Äò¡F·¸­È¡A´M§ä±q§ÀºÝÄ~Äò";
+ Text[ arabic ] = "ÝÇÆÖ¡ Êã ãæÇÕáÉ ÇáÈÍË ÚäÏ ÇáÈÏÇíÉ; ÝÇÆÖ¡ Êã ãæÇÕáÉ ÇáÈÍË ÚäÏ ÇáäåÇíÉ";
+ Text[ greek ] = "Õðåñ÷åßëéóç, Ç áíáæÞôçóç óõíå÷ßóôçêå áðü ôçí áñ÷Þ,Õðåñ÷åßëéóç, Ç áíáæÞôçóç óõíå÷ßóôçêå áðü ôï ôÝëïò";
+ Text[ korean ] = "¿À¹öÇ÷Î- ã±â´Â óÀ½ºÎÅÍ °è¼ÓµÇ¾úÀ½;¿À¹öÇ÷Î-ã±â´Â ³¡¿¡¼­ ºÎÅÍ °è¼ÓµÇ¾úÀ½";
+ Text[ turkish ] = "Taþma, Arama iþlemine baþtan devam edildi;Taþma, Arama iþlemine sondan devam edildi";
+};
+
+String RID_STR_SEARCH_COUNTING
+{
+ Text = "zähle Datensätze" ;
+ Text [ ENGLISH ] = "zähle Datensätze" ;
+ Text[ italian ] = "Overflow, la ricerca è stata proseguita dall'inizio, la ricerca è stata proseguita dalla fine";
+ Text[ portuguese_brazilian ] = "Überlauf, Suche wurde am Anfang forgesetzt;Überlauf, Suche wurde am Ende forgesetzt";
+ Text[ portuguese ] = "Contar registos de dados";
+ Text[ danish ] = "tæller dataposter";
+ Text[ french ] = "Compter les enregistrements";
+ Text[ swedish ] = "Räkna dataposter";
+ Text[ dutch ] = "tel records";
+ Text[ spanish ] = "contando registros de datos";
+ Text[ english_us ] = "counting records";
+ Text[ chinese_simplified ] = "ÒçÖµ£¬ËÑÑ°´ÓÊ׶˼ÌÐø£»ÒçÖµ£¬ËÑÑ°´Óβ¶Ë¼ÌÐø";
+ Text[ russian ] = "Ïîäñ÷åò çàïèñåé";
+ Text[ polish ] = "Licz rekordy";
+ Text[ japanese ] = "Úº°Äނ𔂦‚é";
+ Text[ chinese_traditional ] = "·¸­È¡A´M§ä±q­ººÝÄ~Äò¡F·¸­È¡A´M§ä±q§ÀºÝÄ~Äò";
+ Text[ arabic ] = "ÚÏ ÓÌáÇÊ ÇáÈíÇäÇÊ";
+ Text[ greek ] = "áñßèìçóç åããñáöþí";
+ Text[ korean ] = "·¹ÄÚµå ¼ö ¼¼±â";
+ Text[ turkish ] = "Veri kümeleri sayýlýyor";
+ Text[ language_user1 ] = " ";
+};
+
diff --git a/svx/source/form/fmservs.cxx b/svx/source/form/fmservs.cxx
new file mode 100644
index 0000000000..68892e6205
--- /dev/null
+++ b/svx/source/form/fmservs.cxx
@@ -0,0 +1,256 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmservs.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _COM_SUN_STAR_CONTAINER_XSET_HPP_
+#include <com/sun/star/container/XSet.hpp>
+#endif
+#ifndef _FM_STATIC_HXX_
+#include "fmstatic.hxx"
+#endif
+
+#ifndef _CPPUHELPER_FACTORY_HXX_
+#include <cppuhelper/factory.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+IMPLEMENT_CONSTASCII_USTRING(AWT_CONTROL_TEXTFIELD,"com.sun.star.awt.TextField");
+
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_EDIT,"stardiv.vcl.control.Edit");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_LISTBOX,"stardiv.vcl.control.ListBox");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_COMBOBOX,"stardiv.vcl.control.ComboBox");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_RADIOBUTTON,"stardiv.vcl.control.RadioButton");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_GROUPBOX,"stardiv.vcl.control.GroupBox");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_FIXEDTEXT,"stardiv.vcl.control.FixedText");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_COMMANDBUTTON,"stardiv.vcl.control.Button");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_CHECKBOX,"stardiv.vcl.control.CheckBox");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_IMAGEBUTTON,"stardiv.vcl.control.ImageButton");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_FILECONTROL,"stardiv.vcl.control.FileControl");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_TIMEFIELD,"stardiv.vcl.control.TimeField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_DATEFIELD,"stardiv.vcl.control.DateField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_NUMERICFIELD,"stardiv.vcl.control.NumericField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_CURRENCYFIELD,"stardiv.vcl.control.CurrencyField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_PATTERNFIELD,"stardiv.vcl.control.PatternField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_FORMATTEDFIELD,"stardiv.vcl.control.FormattedField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROL_IMAGECONTROL,"stardiv.vcl.control.ImageControl");
+
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_EDIT,"stardiv.vcl.controlmodel.Edit");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_LISTBOX,"stardiv.vcl.controlmodel.ListBox");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_COMBOBOX,"stardiv.vcl.controlmodel.ComboBox");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_RADIOBUTTON,"stardiv.vcl.controlmodel.RadioButton");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_GROUPBOX,"stardiv.vcl.controlmodel.GroupBox");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_FIXEDTEXT,"stardiv.vcl.controlmodel.FixedText");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_COMMANDBUTTON,"stardiv.vcl.controlmodel.Button");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_CHECKBOX,"stardiv.vcl.controlmodel.CheckBox");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_IMAGEBUTTON,"stardiv.vcl.controlmodel.ImageButton");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_FILECONTROL,"stardiv.vcl.controlmodel.FileControl");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_TIMEFIELD,"stardiv.vcl.controlmodel.TimeField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_DATEFIELD,"stardiv.vcl.controlmodel.DateField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_NUMERICFIELD,"stardiv.vcl.controlmodel.NumericField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_CURRENCYFIELD,"stardiv.vcl.controlmodel.CurrencyField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_PATTERNFIELD,"stardiv.vcl.controlmodel.PatternField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_FORMATTEDFIELD,"stardiv.vcl.controlmodel.FormattedField");
+IMPLEMENT_CONSTASCII_USTRING(VCL_CONTROLMODEL_IMAGECONTROL,"stardiv.vcl.controlmodel.ImageControl");
+
+// -----------------------
+// service names for compatibility
+// -----------------------
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_FORM,"stardiv.one.form.component.Form");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_EDIT,"stardiv.one.form.component.Edit"); // compatibility
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_TEXTFIELD,"stardiv.one.form.component.TextField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_LISTBOX,"stardiv.one.form.component.ListBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_COMBOBOX,"stardiv.one.form.component.ComboBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_RADIOBUTTON,"stardiv.one.form.component.RadioButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_GROUPBOX,"stardiv.one.form.component.GroupBox"); // compatibility
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_FIXEDTEXT,"stardiv.one.form.component.FixedText"); // compatibility
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_COMMANDBUTTON,"stardiv.one.form.component.CommandButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_CHECKBOX,"stardiv.one.form.component.CheckBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_GRID,"stardiv.one.form.component.Grid"); // compatibility
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_GRIDCONTROL,"stardiv.one.form.component.GridControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_IMAGEBUTTON,"stardiv.one.form.component.ImageButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_FILECONTROL,"stardiv.one.form.component.FileControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_TIMEFIELD,"stardiv.one.form.component.TimeField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_DATEFIELD,"stardiv.one.form.component.DateField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_NUMERICFIELD,"stardiv.one.form.component.NumericField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_CURRENCYFIELD,"stardiv.one.form.component.CurrencyField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_PATTERNFIELD,"stardiv.one.form.component.PatternField");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_HIDDEN,"stardiv.one.form.component.Hidden");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_HIDDENCONTROL,"stardiv.one.form.component.HiddenControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_IMAGECONTROL,"stardiv.one.form.component.ImageControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_FORMATTEDFIELD,"stardiv.one.form.component.FormattedField");
+
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_EDIT,"stardiv.one.form.control.Edit"); // compatibility
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_TEXTFIELD,"stardiv.one.form.control.TextField");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_LISTBOX,"stardiv.one.form.control.ListBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_COMBOBOX,"stardiv.one.form.control.ComboBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_RADIOBUTTON,"stardiv.one.form.control.RadioButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_GROUPBOX,"stardiv.one.form.control.GroupBox"); // compatibility
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_FIXEDTEXT,"stardiv.one.form.control.FixedText"); // compatibility
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_COMMANDBUTTON,"stardiv.one.form.control.CommandButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_CHECKBOX,"stardiv.one.form.control.CheckBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_GRID,"stardiv.one.form.control.Grid"); // compatibility
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_GRIDCONTROL,"stardiv.one.form.control.GridControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_IMAGEBUTTON,"stardiv.one.form.control.ImageButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_TIMEFIELD,"stardiv.one.form.control.TimeField");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_DATEFIELD,"stardiv.one.form.control.DateField");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_NUMERICFIELD,"stardiv.one.form.control.NumericField");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_CURRENCYFIELD,"stardiv.one.form.control.CurrencyField");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_PATTERNFIELD,"stardiv.one.form.control.PatternField");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_IMAGECONTROL,"stardiv.one.form.control.ImageControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_FORMATTEDFIELD,"stardiv.one.form.control.FormattedField");
+
+// -----------------------
+// new (sun) service names
+// -----------------------
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORM,"com.sun.star.form.component.Form");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_TEXTFIELD,"com.sun.star.form.component.TextField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_LISTBOX,"com.sun.star.form.component.ListBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMBOBOX,"com.sun.star.form.component.ComboBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_RADIOBUTTON,"com.sun.star.form.component.RadioButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_GROUPBOX,"com.sun.star.form.component.GroupBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FIXEDTEXT,"com.sun.star.form.component.FixedText");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMMANDBUTTON,"com.sun.star.form.component.CommandButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_CHECKBOX,"com.sun.star.form.component.CheckBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_GRIDCONTROL,"com.sun.star.form.component.GridControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGEBUTTON,"com.sun.star.form.component.ImageButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FILECONTROL,"com.sun.star.form.component.FileControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_TIMEFIELD,"com.sun.star.form.component.TimeField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_DATEFIELD,"com.sun.star.form.component.DateField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_NUMERICFIELD,"com.sun.star.form.component.NumericField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_CURRENCYFIELD,"com.sun.star.form.component.CurrencyField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_PATTERNFIELD,"com.sun.star.form.component.PatternField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_HIDDENCONTROL,"com.sun.star.form.component.HiddenControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGECONTROL,"com.sun.star.form.component.ImageControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORMATTEDFIELD,"com.sun.star.form.component.FormattedField");
+
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_TEXTFIELD,"com.sun.star.form.control.TextField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_LISTBOX,"com.sun.star.form.control.ListBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_COMBOBOX,"com.sun.star.form.control.ComboBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_RADIOBUTTON,"com.sun.star.form.control.RadioButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_GROUPBOX,"com.sun.star.form.control.GroupBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_FIXEDTEXT,"com.sun.star.form.control.FixedText");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_COMMANDBUTTON,"com.sun.star.form.control.CommandButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_CHECKBOX,"com.sun.star.form.control.CheckBox");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_GRIDCONTROL,"com.sun.star.form.control.GridControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_IMAGEBUTTON,"com.sun.star.form.control.ImageButton");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_TIMEFIELD,"com.sun.star.form.control.TimeField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_DATEFIELD,"com.sun.star.form.control.DateField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_NUMERICFIELD,"com.sun.star.form.control.NumericField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_CURRENCYFIELD,"com.sun.star.form.control.CurrencyField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_PATTERNFIELD,"com.sun.star.form.control.PatternField");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_IMAGECONTROL,"com.sun.star.form.control.ImageControl");
+IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_FORMATTEDFIELD,"com.sun.star.form.control.FormattedField");
+
+IMPLEMENT_CONSTASCII_USTRING(FM_DATA_ENGINE,"com.sun.star.data.DatabaseEngine");
+IMPLEMENT_CONSTASCII_USTRING(FM_NUMBER_FORMATTER,"com.sun.star.util.NumberFormatter");
+IMPLEMENT_CONSTASCII_USTRING(FM_FORM_CONTROLLER,"com.sun.star.form.controller.FormController");
+IMPLEMENT_CONSTASCII_USTRING(SRV_SDB_ROWSET,"com.sun.star.sdb.RowSet");
+IMPLEMENT_CONSTASCII_USTRING(SRV_SDB_CONNECTION,"com.sun.star.sdb.Connection");
+IMPLEMENT_CONSTASCII_USTRING(SRV_SDBC_STATEMENT,"com.sun.star.sdbc.Statement");
+IMPLEMENT_CONSTASCII_USTRING(SRV_SDB_DATABASE_ENVIRONMENT,"com.sun.star.sdb.DatabaseEnvironment");
+IMPLEMENT_CONSTASCII_USTRING(SRV_SDB_DATABASE_ACCESS_CONNECTION,"com.sun.star.sdb.DatabaseAccessConnection");
+IMPLEMENT_CONSTASCII_USTRING(SRV_SDB_DATABASE_ACCESS_CONTEXT,"com.sun.star.sdb.DatabaseAccessContext");
+
+
+#define DECL_SERVICE(ImplName) \
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_NewInstance_Impl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &) throw( ::com::sun::star::uno::Exception );
+
+#define REGISTER_SERVICE(ImplName, ServiceName) \
+ sString = (ServiceName); \
+ xSingleFactory = ::cppu::createSingleFactory(xServiceFactory, \
+ ::rtl::OUString(), ImplName##_NewInstance_Impl, \
+ ::com::sun::star::uno::Sequence< ::rtl::OUString>(&sString, 1)); \
+ if (xSingleFactory.is()) \
+ xSet->insert(::com::sun::star::uno::makeAny(xSingleFactory));
+
+// Deklaration der ServiceMethoden
+// ------------------------------------------------------------------------
+DECL_SERVICE(FmXGridControl);
+DECL_SERVICE(FmXFormController);
+
+// ------------------------------------------------------------------------
+void ImplSmartRegisterUnoServices()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory(::utl::getProcessServiceFactory(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XSet > xSet(xServiceFactory, ::com::sun::star::uno::UNO_QUERY);
+ if (!xSet.is())
+ return;
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString> aServices;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > xSingleFactory;
+
+ ::rtl::OUString sString;
+
+ REGISTER_SERVICE(FmXFormController, FM_FORM_CONTROLLER);
+
+ // DBGridControl
+ // ------------------------------------------------------------------------
+ REGISTER_SERVICE(FmXGridControl, FM_CONTROL_GRID); // compatibility
+ REGISTER_SERVICE(FmXGridControl, FM_CONTROL_GRIDCONTROL);
+ REGISTER_SERVICE(FmXGridControl, FM_SUN_CONTROL_GRIDCONTROL);
+
+
+};
+
+
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
new file mode 100644
index 0000000000..16b74d8df4
--- /dev/null
+++ b/svx/source/form/fmshell.cxx
@@ -0,0 +1,1958 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmshell.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_FMVWIMP_HXX
+#include "fmvwimp.hxx"
+#endif
+
+#ifndef _SVX_FMSHELL_HXX
+#include "fmshell.hxx"
+#endif
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _SVX_FMUNOPGE_HXX
+#include "fmpgeimp.hxx"
+#endif
+#ifndef _SVX_FMITEMS_HXX
+#include "fmitems.hxx"
+#endif
+#ifndef _SVX_FMUNDO_HXX
+#include "fmundo.hxx"
+#endif
+
+#ifndef _SV_WAITOBJ_HXX
+#include <vcl/waitobj.hxx>
+#endif
+
+#ifndef _MULTIPRO_HXX
+#include "multipro.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
+#include <com/sun/star/form/XLoadable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DATA_XDATABASEDIALOGS_HPP_
+#include <com/sun/star/data/XDatabaseDialogs.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDDB_PRIVILEGE_HPP_
+#include <com/sun/star/sdbcx/Privilege.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FORM_XCONFIRMDELETELISTENER_HPP_
+#include <com/sun/star/form/XConfirmDeleteListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_ROWCHANGEACTION_HPP_
+#include <com/sun/star/sdb/RowChangeAction.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.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 _SFXVIEWFRM_HXX
+#include <sfx2/viewfrm.hxx>
+#endif
+
+#ifndef _SV_WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+
+#ifndef _SFXOBJFACE_HXX //autogen
+#include <sfx2/objface.hxx>
+#endif
+
+#ifndef _SFXREQUEST_HXX //autogen
+#include <sfx2/request.hxx>
+#endif
+
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+#ifndef _SFX_BINDINGS_HXX //autogen
+#include <sfx2/bindings.hxx>
+#endif
+
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+
+#ifndef _SVDOBJ_HXX //autogen
+#include "svdobj.hxx"
+#endif
+
+#ifndef _SVX_FMPAGE_HXX
+#include "fmpage.hxx"
+#endif
+
+#ifndef _SVDITER_HXX //autogen
+#include "svditer.hxx"
+#endif
+
+#ifndef _SVX_FMOBJ_HXX
+#include "fmobj.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SVX_ADTABDLG_HXX
+#include "adtabdlg.hxx"
+#endif
+
+#ifndef _SVX_TABORDER_HXX
+#include "taborder.hxx"
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _SVX_FMEXCH_HXX
+#include "fmexch.hxx"
+#endif
+
+#ifndef _SVX_FMGLOB_HXX
+#include "fmglob.hxx"
+#endif
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVDPAGE_HXX //autogen
+#include <svdpage.hxx>
+#endif
+
+#ifndef _SVX_PROPBRW_HXX
+#include "propbrw.hxx"
+#endif
+
+#ifndef _SVX_FMMODEL_HXX
+#include "fmmodel.hxx"
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SVX_FMSHIMP_HXX
+#include "fmshimp.hxx"
+#endif
+
+#ifndef _SVDPAGV_HXX //autogen
+#include "svdpagv.hxx"
+#endif
+
+#ifndef _SFX_OBJITEM_HXX //autogen
+#include <sfx2/objitem.hxx>
+#endif
+
+#ifndef _SFXVIEWSH_HXX //autogen
+#include <sfx2/viewsh.hxx>
+#endif
+
+#ifndef _SV_SOUND_HXX //autogen
+#include <vcl/sound.hxx>
+#endif
+
+#ifndef _SVX_FMEXPL_HXX
+#include "fmexpl.hxx"
+#endif
+
+#ifndef _NUMUNO_HXX //autogen
+#include <svtools/numuno.hxx>
+#endif
+
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+
+#define HANDLE_SQL_ERRORS( action, successflag, context, message ) \
+ try \
+ { \
+ successflag = sal_False; \
+ action; \
+ successflag = sal_True; \
+ } \
+ catch(::com::sun::star::sdbc::SQLException e) \
+ { \
+ ::com::sun::star::sdb::SQLContext eExtendedInfo = \
+ ::utl::prependContextInfo(e, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > (), context); \
+ displayException(eExtendedInfo); \
+ } \
+ catch(...) \
+ { \
+ DBG_ERROR(message); \
+ } \
+
+
+#define DO_SAFE_WITH_ERROR( action, message ) try { action; } catch(...) { DBG_ERROR(message); }
+
+
+extern SfxType0 aSfxVoidItem_Impl;
+
+#define FmFormShell
+#include <svxslots.hxx>
+#ifndef _SVX_SVXIDS_HRC
+#include <svxids.hrc>
+#endif
+
+#ifndef _SVX_TBXFORM_HXX
+#include "tbxform.hxx"
+#endif
+
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+
+// wird fuer Invalidate verwendet -> mitpflegen
+// aufsteigend sortieren !!!!!!
+sal_uInt16 ControllerSlotMap[] = // slots des Controllers
+{
+ SID_FM_CONFIG,
+ SID_FM_PUSHBUTTON,
+ SID_FM_RADIOBUTTON,
+ SID_FM_CHECKBOX,
+ SID_FM_FIXEDTEXT,
+ SID_FM_GROUPBOX,
+ SID_FM_EDIT,
+ SID_FM_LISTBOX,
+ SID_FM_COMBOBOX,
+ SID_FM_URLBUTTON,
+ SID_FM_DBGRID,
+ SID_FM_IMAGEBUTTON,
+ SID_FM_FILECONTROL,
+ SID_FM_CTL_PROPERTIES,
+ SID_FM_PROPERTIES,
+ SID_FM_TAB_DIALOG,
+ SID_FM_DESIGN_MODE,
+ SID_FM_FMEXPLORER_CONTROL,
+ SID_FM_DATEFIELD,
+ SID_FM_TIMEFIELD,
+ SID_FM_NUMERICFIELD,
+ SID_FM_CURRENCYFIELD,
+ SID_FM_PATTERNFIELD,
+ SID_FM_OPEN_READONLY,
+ SID_FM_IMAGECONTROL,
+ SID_FM_USE_WIZARDS,
+ SID_FM_FORMATTEDFIELD,
+ 0
+};
+
+sal_uInt16 DatabaseSlotMap[] = // slots des Controllers
+{
+ SID_FM_RECORD_FIRST,
+ SID_FM_RECORD_NEXT,
+ SID_FM_RECORD_PREV,
+ SID_FM_RECORD_LAST,
+ SID_FM_RECORD_NEW,
+ SID_FM_RECORD_DELETE,
+ SID_FM_RECORD_ABSOLUTE,
+ SID_FM_RECORD_TOTAL,
+ SID_FM_RECORD_SAVE,
+ SID_FM_RECORD_UNDO,
+ SID_FM_REMOVE_FILTER_SORT,
+ SID_FM_SORTUP,
+ SID_FM_SORTDOWN,
+ SID_FM_ORDERCRIT,
+ SID_FM_AUTOFILTER,
+ SID_FM_FORM_FILTERED,
+ SID_FM_REFRESH,
+ SID_FM_SEARCH,
+ SID_FM_FILTER_START,
+ SID_FM_VIEW_AS_GRID,
+ 0
+};
+
+sal_uInt16 AutoSlotMap[] =
+{
+ SID_FM_SORTUP,
+ SID_FM_SORTDOWN,
+ SID_FM_AUTOFILTER,
+ 0
+};
+
+//========================================================================
+//========================================================================
+#ifdef NOOLDSV
+//------------------------------------------------------------------------
+FmFormShell::FormShellWaitObject::FormShellWaitObject(const FmFormShell* _pShell)
+ :m_pWindow(NULL)
+{
+ const OutputDevice* pDevice = _pShell ? _pShell->GetCurrentViewDevice() : NULL;
+ m_pWindow = pDevice && (pDevice->GetOutDevType() == OUTDEV_WINDOW) ? const_cast<Window*>(static_cast<const Window*>(pDevice)) : NULL;
+
+ if (m_pWindow)
+ m_pWindow->EnterWait();
+ else
+ DBG_ERROR("FormShellWaitObject::FormShellWaitObject : could not find a window for the waitcursor !");
+}
+//------------------------------------------------------------------------
+FmFormShell::FormShellWaitObject::~FormShellWaitObject()
+{
+ if (m_pWindow)
+ m_pWindow->LeaveWait();
+}
+#else
+class FormShellWaitObject : public WaitObject
+{
+public:
+ FormShellWaitObject(FmFormShell* _pShell) { }
+};
+#endif
+//========================================================================
+//------------------------------------------------------------------------
+sal_Bool IsFormComponent( const SdrObject& rObj )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Gruppenobjekte rekursiv pruefen
+ if( rObj.IsGroupObject() )
+ {
+ SdrObject* pObj;
+ SdrObjListIter aIter( *rObj.GetSubList() );
+
+ while( aIter.IsMore() )
+ {
+ pObj = aIter.Next();
+
+ if( !IsFormComponent(*pObj) )
+ return sal_False;
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////
+ // ...ansonsten Pruefen, ob SdrObj eine FormComponent ist
+ else
+ {
+ if( !rObj.ISA(SdrUnoObj) )
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent(((SdrUnoObj*)&rObj)->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xFormComponent.is())
+ return sal_False;
+ }
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+sal_Bool IsFormComponentList( const SdrMarkList& rMarkList )
+{
+ SdrObject* pObj;
+ sal_uInt32 nMarkCount = rMarkList.GetMarkCount();
+
+ if( nMarkCount==0 )
+ return sal_False;
+
+ for( sal_uInt32 i=0; i<nMarkCount; i++ )
+ {
+ pObj = rMarkList.GetMark(i)->GetObj();
+ if( !IsFormComponent(*pObj) )
+ return sal_False;
+ }
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+sal_Bool IsFormComponentList( const SdrObjList& rSdrObjList )
+{
+ SdrObject* pSdrObj;
+
+
+ SdrObjListIter aIter( rSdrObjList );
+ while( aIter.IsMore() )
+ {
+ pSdrObj = aIter.Next();
+
+ //////////////////////////////////////////////////////////////////
+ // Gruppenobjekte rekursiv pruefen
+ if( pSdrObj->IsGroupObject() )
+ {
+ if( !IsFormComponentList(*pSdrObj->GetSubList()) )
+ return sal_False;
+ }
+
+ //////////////////////////////////////////////////////////////////
+ // ...ansonsten Pruefen, ob SdrObj eine FormComponent ist
+ else
+ {
+ if (!pSdrObj->ISA(SdrUnoObj))
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent(((SdrUnoObj*)pSdrObj)->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xFormComponent.is())
+ return sal_False;
+ }
+ }
+
+ return sal_True;
+}
+
+#if SUPD>500
+//========================================================================
+// class FmDesignModeChangedHint
+//========================================================================
+TYPEINIT1( FmDesignModeChangedHint, SfxHint );
+
+//------------------------------------------------------------------------
+FmDesignModeChangedHint::FmDesignModeChangedHint( sal_Bool bDesMode )
+ :m_bDesignMode( bDesMode )
+{
+}
+
+//------------------------------------------------------------------------
+FmDesignModeChangedHint::~FmDesignModeChangedHint()
+{
+}
+#endif
+
+//========================================================================
+const sal_uInt32 FM_UI_FEATURE_SHOW_DATABASEBAR = 0x00000001;
+const sal_uInt32 FM_UI_FEATURE_SHOW_FIELD = 0x00000002;
+const sal_uInt32 FM_UI_FEATURE_SHOW_PROPERTIES = 0x00000004;
+const sal_uInt32 FM_UI_FEATURE_SHOW_EXPLORER = 0x00000008;
+const sal_uInt32 FM_UI_FEATURE_SHOW_FILTERBAR = 0x00000010;
+const sal_uInt32 FM_UI_FEATURE_SHOW_FILTERNAVIGATOR = 0x00000020;
+
+SFX_IMPL_INTERFACE(FmFormShell, SfxShell, SVX_RES(RID_STR_FORMSHELL))
+{
+ SFX_FEATURED_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_NAVIGATION|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_READONLYDOC,
+ SVX_RES(RID_SVXTBX_FORM_NAVIGATION),
+ FM_UI_FEATURE_SHOW_DATABASEBAR );
+
+ SFX_FEATURED_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_NAVIGATION|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_READONLYDOC,
+ SVX_RES(RID_SVXTBX_FORM_FILTER),
+ FM_UI_FEATURE_SHOW_FILTERBAR );
+
+ SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_FM_ADD_FIELD, FM_UI_FEATURE_SHOW_FIELD);
+ SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_FM_SHOW_PROPERTIES, FM_UI_FEATURE_SHOW_PROPERTIES);
+ SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_FM_SHOW_FMEXPLORER, FM_UI_FEATURE_SHOW_EXPLORER);
+ SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_FM_FILTER_NAVIGATOR, FM_UI_FEATURE_SHOW_FILTERNAVIGATOR);
+}
+
+//========================================================================
+TYPEINIT1(FmFormShell,SfxShell)
+
+//------------------------------------------------------------------------
+FmFormShell::FmFormShell( SfxViewShell* _pParent, FmFormView* pView )
+ :SfxShell(_pParent)
+ ,m_pFormView( pView )
+ ,m_pFormModel( NULL )
+ ,m_pImpl(new FmXFormShell(this, _pParent->GetViewFrame()))
+ ,m_nLastSlot( 0 )
+ ,m_bDesignMode( sal_True )
+ ,m_bHasForms(sal_False)
+ ,m_pParentShell(_pParent)
+{
+ m_pImpl->acquire();
+ SetPool( &SFX_APP()->GetPool() );
+ String sName;
+ sName.AssignAscii("Form");
+ SetName( sName );
+ // SetHelpId( SVX_INTERFACE_FORM_SH );
+
+ SetView(m_pFormView);
+}
+
+//------------------------------------------------------------------------
+FmFormShell::~FmFormShell()
+{
+ if (m_pFormView)
+ {
+ GetImpl()->ResetForms();
+ m_pFormView->SetFormShell(NULL);
+ m_pFormView = NULL;
+ }
+
+ m_pImpl->dispose();
+ m_pImpl->release();
+
+ // reset the model after disposing the shell !
+ m_pFormModel = NULL;
+}
+
+//------------------------------------------------------------------------
+void FmFormShell::NotifyMarkListChanged(FmFormView* pWhichView)
+{
+ FmExplViewMarksChanged aChangeNotification(pWhichView);
+ Broadcast(aChangeNotification);
+}
+
+//------------------------------------------------------------------------
+sal_uInt16 FmFormShell::PrepareClose(sal_Bool bUI, sal_Bool bForBrowsing)
+{
+ sal_Bool nResult = sal_True;
+ // Save the data records, not in DesignMode and FilterMode
+ if (!m_bDesignMode && !GetImpl()->isInFilterMode() &&
+ m_pFormView && m_pFormView->GetActualOutDev() &&
+ m_pFormView->GetActualOutDev()->GetOutDevType() == OUTDEV_WINDOW)
+ {
+ if (GetImpl()->HasAnyPendingCursorAction())
+ GetImpl()->CancelAnyPendingCursorAction();
+
+ SdrPageView* pCurPageView = m_pFormView->GetPageViewPvNum(0);
+ sal_uInt16 nPos = pCurPageView ? pCurPageView->GetWinList().Find((OutputDevice*)m_pFormView->GetActualOutDev()) : SDRPAGEVIEWWIN_NOTFOUND;
+ if (nPos != SDRPAGEVIEWWIN_NOTFOUND)
+ {
+ // Zunaechst werden die aktuellen Inhalte der Controls gespeichert
+ // Wenn alles glatt gelaufen ist, werden die modifizierten Datensaetze gespeichert
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xController(GetImpl()->getActiveController());
+ if (xController.is() && FmXFormShell::CommitCurrent(xController))
+ {
+ sal_Bool bModified = FmXFormShell::IsModified(xController);
+
+ if (bModified)
+ {
+ QueryBox aQry(NULL, SVX_RES(RID_QRY_SAVEMODIFIED));
+ if (bForBrowsing)
+ aQry.AddButton(ResId(RID_STR_NEW_TASK), RET_NEWTASK,
+ BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
+
+ switch (aQry.Execute())
+ {
+ case RET_NO:
+ bModified = sal_False;
+ break;
+ case RET_CANCEL:
+ return sal_False;
+ case RET_NEWTASK:
+ return RET_NEWTASK;
+ }
+
+ if (bModified)
+ nResult = (sal_uInt16)FmXFormShell::SaveModified(xController, sal_False);
+ }
+ }
+ }
+ }
+ return nResult;
+}
+
+//------------------------------------------------------------------------
+void FmFormShell::SetDesignMode(sal_Bool bDesign)
+{
+ if (m_pFormView)
+ {
+ if (!bDesign)
+ m_nLastSlot = SID_FM_DESIGN_MODE;
+
+ GetImpl()->SetDesignMode(bDesign);
+ // mein m_bDesignMode wird auch von der Impl gesetzt ...
+ }
+ else
+ {
+ m_bHasForms = sal_False;
+ m_bDesignMode = bDesign;
+ UIFeatureChanged();
+ }
+
+ SFX_BINDINGS().Invalidate(ControllerSlotMap);
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmFormShell::HasUIFeature( sal_uInt32 nFeature )
+{
+ sal_Bool bResult = sal_False;
+ if ((nFeature & FM_UI_FEATURE_SHOW_DATABASEBAR) == FM_UI_FEATURE_SHOW_DATABASEBAR)
+ {
+ // nur wenn auch formulare verfuegbar
+ bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar() && !GetImpl()->isInFilterMode();
+ }
+ else if ((nFeature & FM_UI_FEATURE_SHOW_FILTERBAR) == FM_UI_FEATURE_SHOW_FILTERBAR)
+ {
+ // nur wenn auch formulare verfuegbar
+ bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar() && GetImpl()->isInFilterMode();
+ }
+ else if ((nFeature & FM_UI_FEATURE_SHOW_FILTERNAVIGATOR) == FM_UI_FEATURE_SHOW_FILTERNAVIGATOR)
+ {
+ bResult = !m_bDesignMode && GetImpl()->hasDatabaseBar() && GetImpl()->isInFilterMode();
+ }
+ else if ((nFeature & FM_UI_FEATURE_SHOW_FIELD) == FM_UI_FEATURE_SHOW_FIELD)
+ {
+ bResult = m_bDesignMode && m_pFormView && m_bHasForms;
+ }
+ else if ((nFeature & FM_UI_FEATURE_SHOW_PROPERTIES) == FM_UI_FEATURE_SHOW_PROPERTIES)
+ {
+ bResult = m_bDesignMode && m_pFormView && m_bHasForms;
+ }
+ else if ((nFeature & FM_UI_FEATURE_SHOW_EXPLORER) == FM_UI_FEATURE_SHOW_EXPLORER)
+ {
+ bResult = m_bDesignMode;
+ }
+ return bResult;
+}
+
+//------------------------------------------------------------------------
+void FmFormShell::Execute(SfxRequest &rReq)
+{
+ sal_uInt16 nSlot = rReq.GetSlot();
+
+ //////////////////////////////////////////////////////////////////////
+ // MasterSlot setzen
+ switch( nSlot )
+ {
+ case SID_FM_PUSHBUTTON:
+ case SID_FM_RADIOBUTTON:
+ case SID_FM_CHECKBOX:
+ case SID_FM_FIXEDTEXT:
+ case SID_FM_GROUPBOX:
+ case SID_FM_LISTBOX:
+ case SID_FM_COMBOBOX:
+ case SID_FM_URLBUTTON:
+ case SID_FM_EDIT:
+ case SID_FM_DBGRID:
+ case SID_FM_IMAGEBUTTON:
+ case SID_FM_IMAGECONTROL:
+ case SID_FM_FILECONTROL:
+ case SID_FM_DATEFIELD:
+ case SID_FM_TIMEFIELD:
+ case SID_FM_NUMERICFIELD:
+ case SID_FM_CURRENCYFIELD:
+ case SID_FM_PATTERNFIELD:
+ case SID_FM_FORMATTEDFIELD:
+ m_nLastSlot = nSlot;
+ SFX_BINDINGS().Invalidate( SID_FM_CONFIG );
+ break;
+ case SID_FM_DESIGN_MODE: // gibt es was zu tun?
+ {
+ // if we are moving our data source cursor currently ....
+ if (GetImpl()->HasAnyPendingCursorAction())
+ // ... cancel this
+ GetImpl()->CancelAnyPendingCursorAction();
+
+ SFX_REQUEST_ARG(rReq, pDesignItem, SfxBoolItem, nSlot, sal_False);
+ if (!pDesignItem || pDesignItem->GetValue() != m_bDesignMode)
+ {
+ m_nLastSlot = nSlot;
+ SFX_BINDINGS().Invalidate( SID_FM_CONFIG );
+ }
+ else
+ {
+ rReq.Done();
+ return;
+ }
+ } break;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Identifier und Inventor des Uno-Controls setzen
+ sal_uInt16 nIdentifier = 0;
+ switch( nSlot )
+ {
+ case SID_FM_CHECKBOX:
+ nIdentifier = OBJ_FM_CHECKBOX;
+ break;
+ case SID_FM_PUSHBUTTON:
+ nIdentifier = OBJ_FM_BUTTON;
+ break;
+ case SID_FM_FIXEDTEXT:
+ nIdentifier = OBJ_FM_FIXEDTEXT;
+ break;
+ case SID_FM_LISTBOX:
+ nIdentifier = OBJ_FM_LISTBOX;
+ break;
+ case SID_FM_EDIT:
+ nIdentifier = OBJ_FM_EDIT;
+ break;
+ case SID_FM_RADIOBUTTON:
+ nIdentifier = OBJ_FM_RADIOBUTTON;
+ break;
+ case SID_FM_GROUPBOX:
+ nIdentifier = OBJ_FM_GROUPBOX;
+ break;
+ case SID_FM_COMBOBOX:
+ nIdentifier = OBJ_FM_COMBOBOX;
+ break;
+ case SID_FM_DBGRID:
+ nIdentifier = OBJ_FM_GRID;
+ break;
+ case SID_FM_IMAGEBUTTON:
+ nIdentifier = OBJ_FM_IMAGEBUTTON;
+ break;
+ case SID_FM_IMAGECONTROL:
+ nIdentifier = OBJ_FM_IMAGECONTROL;
+ break;
+ case SID_FM_FILECONTROL:
+ nIdentifier = OBJ_FM_FILECONTROL;
+ break;
+ case SID_FM_DATEFIELD:
+ nIdentifier = OBJ_FM_DATEFIELD;
+ break;
+ case SID_FM_TIMEFIELD:
+ nIdentifier = OBJ_FM_TIMEFIELD;
+ break;
+ case SID_FM_NUMERICFIELD:
+ nIdentifier = OBJ_FM_NUMERICFIELD;
+ break;
+ case SID_FM_CURRENCYFIELD:
+ nIdentifier = OBJ_FM_CURRENCYFIELD;
+ break;
+ case SID_FM_PATTERNFIELD:
+ nIdentifier = OBJ_FM_PATTERNFIELD;
+ break;
+ case SID_FM_FORMATTEDFIELD:
+ nIdentifier = OBJ_FM_FORMATTEDFIELD;
+ break;
+ }
+
+ switch ( nSlot )
+ {
+ case SID_FM_CHECKBOX:
+ case SID_FM_PUSHBUTTON:
+ case SID_FM_FIXEDTEXT:
+ case SID_FM_LISTBOX:
+ case SID_FM_EDIT:
+ case SID_FM_RADIOBUTTON:
+ case SID_FM_COMBOBOX:
+ case SID_FM_GROUPBOX:
+ case SID_FM_DBGRID:
+ case SID_FM_IMAGEBUTTON:
+ case SID_FM_IMAGECONTROL:
+ case SID_FM_FILECONTROL:
+ case SID_FM_DATEFIELD:
+ case SID_FM_TIMEFIELD:
+ case SID_FM_NUMERICFIELD:
+ case SID_FM_CURRENCYFIELD:
+ case SID_FM_PATTERNFIELD:
+ case SID_FM_FORMATTEDFIELD:
+ {
+ SfxUInt16Item aIdentifierItem( SID_FM_CONTROL_IDENTIFIER, nIdentifier );
+ SfxUInt32Item aInventorItem( SID_FM_CONTROL_INVENTOR, FmFormInventor );
+ SFX_DISPATCHER().Execute( SID_FM_CREATE_CONTROL, SFX_CALLMODE_ASYNCHRON,
+ &aInventorItem, &aIdentifierItem, 0L );
+ rReq.Done();
+ } break;
+ }
+
+ sal_Bool bSortUp = sal_True;
+ // Individuelle Aktionen
+ switch( nSlot )
+ {
+ case SID_FM_VIEW_AS_GRID:
+ GetImpl()->CreateExternalView();
+ break;
+ case SID_FM_CONVERTTO_EDIT :
+ case SID_FM_CONVERTTO_BUTTON :
+ case SID_FM_CONVERTTO_FIXEDTEXT :
+ case SID_FM_CONVERTTO_LISTBOX :
+ case SID_FM_CONVERTTO_CHECKBOX :
+ case SID_FM_CONVERTTO_RADIOBUTTON :
+ case SID_FM_CONVERTTO_GROUPBOX :
+ case SID_FM_CONVERTTO_COMBOBOX :
+ case SID_FM_CONVERTTO_GRID :
+ case SID_FM_CONVERTTO_IMAGEBUTTON :
+ case SID_FM_CONVERTTO_FILECONTROL :
+ case SID_FM_CONVERTTO_DATE :
+ case SID_FM_CONVERTTO_TIME :
+ case SID_FM_CONVERTTO_NUMERIC :
+ case SID_FM_CONVERTTO_CURRENCY :
+ case SID_FM_CONVERTTO_PATTERN :
+ case SID_FM_CONVERTTO_IMAGECONTROL :
+ case SID_FM_CONVERTTO_FORMATTED :
+ GetImpl()->ExecuteControlConversionSlot(::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > (GetImpl()->getCurControl(), ::com::sun::star::uno::UNO_QUERY),
+ nSlot);
+ // nach dem Konvertieren die Selektion neu bestimmern, da sich ja das selektierte Objekt
+ // geaendert hat
+ GetImpl()->SetSelection(GetFormView()->GetMarkList());
+ break;
+ case SID_FM_LEAVE_CREATE:
+ m_nLastSlot = 0;
+ SFX_BINDINGS().Invalidate( SID_FM_CONFIG );
+ rReq.Done();
+ break;
+ case SID_FM_SHOW_PROPERTY_BROWSER:
+ {
+ SFX_REQUEST_ARG( rReq, pInterfaceItem, FmInterfaceItem, nSlot, sal_False );
+ SFX_REQUEST_ARG( rReq, pShowItem, SfxBoolItem, SID_FM_SHOW_PROPERTIES, sal_False );
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInterface;
+ sal_Bool bShow = sal_True;
+ if( pShowItem )
+ bShow = pShowItem->GetValue();
+ if( pInterfaceItem )
+ xInterface = pInterfaceItem->GetInterface();
+ GetImpl()->ShowProperties( xInterface, bShow );
+
+ rReq.Done();
+ } break;
+
+ case SID_FM_PROPERTIES:
+ {
+ // PropertyBrowser anzeigen
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSlot, sal_False);
+ sal_Bool bShow = pShowItem ? pShowItem->GetValue() : sal_True;
+ GetImpl()->setSelObject(GetImpl()->getCurForm());
+ GetImpl()->ShowProperties(GetImpl()->getCurForm(), bShow );
+
+ rReq.Done();
+ } break;
+
+ case SID_FM_CTL_PROPERTIES:
+ {
+ GetImpl()->setSelObject(GetImpl()->getCurControl());
+
+ // PropertyBrowser anzeigen
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSlot, sal_False);
+ sal_Bool bShow = pShowItem ? pShowItem->GetValue() : sal_True;
+ GetImpl()->ShowProperties( GetImpl()->getSelObject(), bShow );
+
+ rReq.Done();
+ } break;
+ case SID_FM_SHOW_PROPERTIES:
+ case SID_FM_ADD_FIELD:
+ case SID_FM_FILTER_NAVIGATOR:
+ {
+ GetViewShell()->GetViewFrame()->ExecuteSlot(rReq);
+ rReq.Done();
+ } break;
+ case SID_FM_SHOW_FMEXPLORER:
+ {
+ if (!m_pFormView) // setzen der ::com::sun::star::sdbcx::View Forcieren
+ SFX_DISPATCHER().Execute(SID_CREATE_SW_DRAWVIEW);
+
+ GetViewShell()->GetViewFrame()->ExecuteSlot(rReq);
+ rReq.Done();
+ } break;
+ case SID_FM_TAB_DIALOG:
+ {
+ FmTabOrderDlg aTabOrderDlg( GetpApp()->GetAppWindow(), this );
+ aTabOrderDlg.Execute();
+ rReq.Done();
+ } break;
+ case SID_FM_DESIGN_MODE:
+ {
+ SFX_REQUEST_ARG(rReq, pDesignItem, SfxBoolItem, nSlot, sal_False);
+ if (!pDesignItem || pDesignItem->GetValue() != m_bDesignMode)
+ {
+ FmFormModel* pModel = GetFormModel();
+ if (pModel)
+ { // fuer die Zeit des Uebergangs das Undo-Environment ausschalten, das sichert, dass man dort auch nicht-transiente
+ // Properties mal eben aendern kann (sollte allerdings mit Vorsicht genossen und beim Rueckschalten des Modes
+ // auch immer wieder rueckgaegig gemacht werden. Ein Beispiel ist das Setzen der maximalen Text-Laenge durch das
+ // OEditModel an seinem Control.)
+ pModel->GetUndoEnv().Lock();
+ }
+
+ // dann die eigentliche Umschaltung
+ if (m_bDesignMode || PrepareClose(sal_True))
+ {
+ SetDesignMode(!m_bDesignMode );
+ rReq.Done();
+ }
+ // und mein Undo-Environment wieder an
+ if (pModel)
+ pModel->GetUndoEnv().UnLock();
+ }
+ } break;
+ case SID_FM_OPEN_READONLY:
+ {
+ FmFormModel* pModel = GetFormModel();
+ DBG_ASSERT(pModel, "FmFormShell::Execute : ungueltiger Aufruf !");
+ // der Slot sollte in GetState disabled worden sein, wenn ich kein FormModel habe
+ pModel->SetOpenInDesignMode( !pModel->GetOpenInDesignMode() );
+ SFX_BINDINGS().Invalidate(SID_FM_OPEN_READONLY);
+ }
+ break;
+ case SID_FM_USE_WIZARDS:
+ {
+ GetImpl()->SetWizardUsing(!GetImpl()->GetWizardUsing());
+ SFX_BINDINGS().Invalidate(SID_FM_USE_WIZARDS);
+ }
+ break;
+ case SID_FM_SEARCH:
+ {
+ if (GetImpl()->SaveModified(GetImpl()->getActiveController()))
+ GetImpl()->ExecuteSearch();
+ rReq.Done();
+ } break;
+ // First, Next, Prev, Last, Absolute wirken auf den NavController
+ case SID_FM_RECORD_FIRST:
+ {
+ if (GetImpl()->SaveModified(GetImpl()->getNavController()))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(GetImpl()->getNavController()->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ DO_SAFE( xCursor->first(); );
+ }
+ rReq.Done();
+ } break;
+ case SID_FM_RECORD_NEXT:
+ {
+ if (!GetImpl()->CommitCurrent(GetImpl()->getNavController()))
+ {
+ rReq.Done();
+ break;
+ }
+ // SaveModified kann hier nicht verwendet werden
+ GetImpl()->MoveRight(GetImpl()->getNavController());
+ rReq.Done();
+ } break;
+ case SID_FM_RECORD_PREV:
+ {
+ if (!GetImpl()->CommitCurrent(GetImpl()->getNavController()))
+ {
+ rReq.Done();
+ break;
+ }
+ // SaveModified kann hier nicht verwendet werden
+ GetImpl()->MoveLeft(GetImpl()->getNavController());
+ rReq.Done();
+ } break;
+ case SID_FM_RECORD_LAST:
+ {
+ if (GetImpl()->SaveModified(GetImpl()->getNavController()))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(GetImpl()->getNavController()->getModel(), ::com::sun::star::uno::UNO_QUERY);
+
+ // run in an own thread if ...
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCursorProps(xCursor, ::com::sun::star::uno::UNO_QUERY);
+ // ... the data source is thread safe ...
+ sal_Bool bAllowOwnThread = ::utl::hasProperty(FM_PROP_THREADSAFE, xCursorProps) && ::utl::getBOOL(xCursorProps->getPropertyValue(FM_PROP_THREADSAFE));
+ // ... the record count is unknown
+ sal_Bool bNeedOwnThread = ::utl::hasProperty(FM_PROP_ROWCOUNTFINAL, xCursorProps) && !::utl::getBOOL(xCursorProps->getPropertyValue(FM_PROP_ROWCOUNTFINAL));
+
+ if (bNeedOwnThread && bAllowOwnThread)
+ GetImpl()->DoAsyncCursorAction(GetImpl()->getNavController(), FmXFormShell::CA_MOVE_TO_LAST);
+ else
+ DO_SAFE( xCursor->last(); );
+ }
+ rReq.Done();
+ } break;
+ case SID_FM_RECORD_NEW:
+ {
+ if (GetImpl()->SaveModified(GetImpl()->getActiveController()))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > xUpdateCursor(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ DO_SAFE( xUpdateCursor->moveToInsertRow(); );
+ }
+ rReq.Done();
+ } break;
+ case SID_FM_RECORD_DELETE:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > xUpdateCursor(xCursor, ::com::sun::star::uno::UNO_QUERY);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_uInt32 nCount = ::utl::getINT32(xSet->getPropertyValue(FM_PROP_ROWCOUNT));
+
+ // naechste position festellen
+ sal_Bool bLeft = xCursor->isLast() && nCount > 1;
+ sal_Bool bRight= !xCursor->isLast();
+ sal_Bool bSuccess = sal_False;
+ try
+ {
+ // ask for confirmation
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener > xConfirm(GetImpl()->getActiveController(),::com::sun::star::uno::UNO_QUERY);
+ if (xConfirm.is())
+ {
+ ::com::sun::star::sdb::RowChangeEvent aEvent;
+ aEvent.Source = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > (xCursor, ::com::sun::star::uno::UNO_QUERY);
+ aEvent.Action = ::com::sun::star::sdb::RowChangeAction::DELETE;
+ aEvent.Rows = 1;
+ bSuccess = xConfirm->confirmDelete(aEvent);
+ }
+
+ // das Ding loeschen
+ if (bSuccess)
+ xUpdateCursor->deleteRow();
+ }
+ catch(...)
+ {
+ bSuccess = sal_False;
+ }
+
+ if (bSuccess)
+ {
+ if (bLeft || bRight)
+ xCursor->relative(bRight ? 1 : -1);
+ else
+ {
+ sal_Bool bCanInsert = ::utl::canInsert(xSet);
+ // kann noch ein Datensatz eingefuegt weden
+ try
+ {
+ if (bCanInsert)
+ xUpdateCursor->moveToInsertRow();
+ else
+ // Datensatz bewegen um Stati neu zu setzen
+ xCursor->first();
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmFormShell::Execute : couldn't position on the next record !");
+ }
+ }
+ }
+ rReq.Done();
+ } break;
+ case SID_FM_RECORD_ABSOLUTE:
+ {
+ const SfxItemSet* pArgs = rReq.GetArgs();
+ sal_Int32 nRecord = -1;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+
+ if ( pArgs )
+ {
+ const SfxPoolItem* pItem;
+ if( (pArgs->GetItemState(SID_FM_RECORD_ABSOLUTE, sal_True, &pItem)) == SFX_ITEM_SET )
+ {
+ nRecord = Max((((const FmFormInfoItem*)pItem)->GetInfo().Pos), (sal_Int32)0);
+ }
+ }
+ else
+ {
+ FmInputRecordNoDialog dlg(NULL);
+ dlg.SetValue(xCursor->getRow());
+ if (dlg.Execute() == RET_OK)
+ {
+ nRecord = dlg.GetValue() - 1;
+ }
+ }
+
+ if (nRecord != -1)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet (GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bFinal = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ROWCOUNTFINAL));
+ sal_Int32 nRecordCount= ::utl::getINT32(xSet->getPropertyValue(FM_PROP_ROWCOUNT));
+
+ if (bFinal && (sal_uInt32)nRecord >= nRecordCount)
+ {
+ Sound::Beep();
+ rReq.Done();
+ break;
+ }
+ if (GetImpl()->SaveModified(GetImpl()->getNavController()))
+ DO_SAFE( xCursor->absolute(nRecord); );
+ }
+
+ rReq.Done();
+ } break;
+ case SID_FM_RECORD_SAVE:
+ {
+ if (!GetImpl()->CommitCurrent(GetImpl()->getActiveController()))
+ {
+ rReq.Done();
+ break;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bIsInserting = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW));
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > xUpdateCursor(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bSuccess = sal_True;
+ try
+ {
+ if (bIsInserting)
+ xUpdateCursor->insertRow();
+ else
+ xUpdateCursor->updateRow();
+ }
+ catch(...)
+ {
+ bSuccess = sal_False;
+ }
+
+
+ if (bSuccess && bIsInserting)
+ {
+ DO_SAFE( xCursor->last(); );
+ }
+
+ rReq.Done();
+ } break;
+ case SID_FM_RECORD_UNDO:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > xUpdateCursor(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bInserting = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW));
+ if (!bInserting)
+ xUpdateCursor->cancelRowUpdates();
+
+
+// GetImpl()->ResetCurrent(GetImpl()->getActiveController());
+ GetImpl()->ResetAll(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > (GetImpl()->getActiveController()->getModel(), ::com::sun::star::uno::UNO_QUERY));
+
+ if (bInserting) // wieder in den EinfuegeModus
+ DO_SAFE( xUpdateCursor->moveToInsertRow(); );
+
+ GetImpl()->m_bActiveModified = sal_False;
+ SFX_BINDINGS().Invalidate(DatabaseSlotMap);
+ rReq.Done();
+ } break;
+ case SID_FM_REMOVE_FILTER_SORT:
+ {
+ if (GetImpl()->SaveModified(GetImpl()->getActiveController()))
+ {
+ // gleichzeitiges Zuruecksetzen der Filter- und der Sort-Eigenschaft
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > xProperties(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ if (xProperties.is())
+ {
+ ::rtl::OUString ustrNames[2] = { FM_PROP_FILTER_CRITERIA, FM_PROP_SORT };
+ ::com::sun::star::uno::Any anyValues[2] = { ::com::sun::star::uno::makeAny(::rtl::OUString()),
+ ::com::sun::star::uno::makeAny(::rtl::OUString()) };
+ ::com::sun::star::uno::Sequence< ::rtl::OUString> seqNames(ustrNames, 2);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> seqValues(anyValues, 2);
+
+ FormShellWaitObject aWO(this);
+ xProperties->setPropertyValues(seqNames, seqValues);
+
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > xReload(xProperties, ::com::sun::star::uno::UNO_QUERY);
+ xReload->reload();
+ }
+ catch(::com::sun::star::sdbc::SQLException e)
+ {
+ e;
+ DBG_ERROR("FmFormShell::Execute(REMOVE_FILTER_SORT) : catched an SQL exeption !");
+ }
+
+ }
+ }
+ rReq.Done();
+ } break;
+ case SID_FM_SORTDOWN:
+ bSortUp = sal_False;
+ case SID_FM_SORTUP:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer > xParser = GetImpl()->getParser();
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xFormCtrler = GetImpl()->getActiveController();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl = xFormCtrler->getCurrentControl();
+ if (GetImpl()->SaveModified(xFormCtrler) && xControl.is() && xCursor.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xField = GetImpl()->GetBoundField(xControl, GetImpl()->getActiveForm());
+ if (xField.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xFormSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ ::rtl::OUString sOriginalSort;
+ try { sOriginalSort = ::utl::getString(xFormSet->getPropertyValue(FM_PROP_SORT)); }
+ catch(...) { }
+
+
+ // immer nur eine Sortierung
+ DO_SAFE_WITH_ERROR( xParser->setOrder(::rtl::OUString()), "FmFormShell::Execute(AUTOFILTER) : could not reset the parsers order !" );
+
+ sal_Bool bParserSuccess;
+ HANDLE_SQL_ERRORS(
+ xParser->appendOrderByColumn(xField, bSortUp),
+ bParserSuccess,
+ ::rtl::OUString(SVX_RES(RID_STR_COULDNOTSETORDER)),
+ "FmFormShell::Execute(SORTUP/DOWN) : unknown exception while updating the parser !"
+ )
+
+ if (bParserSuccess)
+ {
+ FormShellWaitObject aWO(this);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > xReload(xFormSet, ::com::sun::star::uno::UNO_QUERY);
+ try
+ {
+ xFormSet->setPropertyValue(FM_PROP_SORT, ::com::sun::star::uno::makeAny(xParser->getOrder()));
+ xReload->reload();
+ }
+ catch(...)
+ {
+ }
+
+
+ if (!isRowSetAlive(xFormSet))
+ { // restore the original state
+ try
+ {
+ xParser->setOrder(sOriginalSort);
+ xFormSet->setPropertyValue(FM_PROP_SORT, ::com::sun::star::uno::makeAny(xParser->getOrder()));
+ xReload->reload();
+ }
+ catch(...)
+ {
+ }
+
+ }
+ }
+ }
+ }
+ rReq.Done();
+ } break;
+ case SID_FM_FILTER_EXECUTE:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xController(GetImpl()->getActiveController());
+ if (xController.is() && !FmXFormShell::CommitCurrent(xController))
+ {
+ rReq.Done();
+ break;
+ }
+ } // continue !!!
+ case SID_FM_FILTER_EXIT:
+ GetImpl()->stopFiltering(SID_FM_FILTER_EXECUTE == nSlot);
+ rReq.Done();
+ break;
+ case SID_FM_FILTER_START:
+ {
+ GetImpl()->startFiltering();
+ rReq.Done();
+ } break;
+ case SID_FM_ORDERCRIT:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xFormCtrler = GetImpl()->getActiveController();
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl = xFormCtrler->getCurrentControl();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer > xParser = GetImpl()->getParser();
+ ::com::sun::star::uno::Reference< ::com::sun::star::data::XDatabaseDialogs > xDlgs(xParser, ::com::sun::star::uno::UNO_QUERY);
+
+ if (GetImpl()->SaveModified(xFormCtrler) && xDlgs.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(xSet, ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bIsDeleted = xCursor.is() && xCursor->rowDeleted();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > xField;
+ if (bIsDeleted)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(GetImpl()->GetBoundField(xControl, GetImpl()->getActiveForm()), ::com::sun::star::uno::UNO_QUERY);
+ xField = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > (xSet, ::com::sun::star::uno::UNO_QUERY);
+ // auslesen der Searchflags
+ if (xSet.is())
+ {
+ if (!::utl::getBOOL(xSet->getPropertyValue(FM_PROP_SEARCHABLE)))
+ xField = NULL;
+ }
+ }
+
+ xDlgs->executeSort(xField);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xFormSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ FormShellWaitObject aWO(this);
+ try
+ {
+ xFormSet->setPropertyValue(FM_PROP_SORT, ::com::sun::star::uno::makeAny(xParser->getOrder()));
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > xReload(xFormSet, ::com::sun::star::uno::UNO_QUERY);
+ xReload->reload();
+
+ }
+ catch(...)
+ {
+ }
+ }
+ rReq.Done();
+ } break;
+ case SID_FM_AUTOFILTER:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xFormCtrler = GetImpl()->getActiveController();
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl = xFormCtrler->getCurrentControl();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer > xParser = GetImpl()->getParser();
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+
+ if (GetImpl()->SaveModified(xFormCtrler) && xControl.is() && xCursor.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xField = GetImpl()->GetBoundField(xControl, GetImpl()->getActiveForm());
+ if (xField.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xActiveSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ ::rtl::OUString sOriginalFilter = ::utl::getString(xActiveSet->getPropertyValue(FM_PROP_FILTER_CRITERIA));
+ sal_Bool bApplied = ::utl::getBOOL(xActiveSet->getPropertyValue(FM_PROP_APPLYFILTER));
+
+ // do we have a filter but not applied, then we have to overwrite it, else append one
+ if (!bApplied)
+ {
+ DO_SAFE_WITH_ERROR( xParser->setFilter(::rtl::OUString()), "FmFormShell::Execute(AUTOFILTER) : could not reset the parsers filter !" );
+ }
+
+ sal_Bool bParserSuccess;
+ HANDLE_SQL_ERRORS(
+ xParser->appendFilterByColumn(xField),
+ bParserSuccess,
+ ::rtl::OUString(SVX_RES(RID_STR_COULDNOTSETFILTER)),
+ "FmFormShell::Execute(AUTOFILTER) : could not append the filter to my parser !"
+ )
+ if (bParserSuccess)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > xReload(xActiveSet, ::com::sun::star::uno::UNO_QUERY);
+ try
+ {
+ FormShellWaitObject aWO(this);
+ xActiveSet->setPropertyValue(FM_PROP_FILTER_CRITERIA, ::com::sun::star::uno::makeAny(xParser->getFilter()));
+ sal_Bool bB(sal_True);
+ xActiveSet->setPropertyValue(FM_PROP_APPLYFILTER, ::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+
+ xReload->reload();
+ }
+ catch(...)
+ {
+ }
+
+
+ if (!isRowSetAlive(xActiveSet))
+ { // restore the original state
+ try
+ {
+ xParser->setOrder(sOriginalFilter);
+ xActiveSet->setPropertyValue(FM_PROP_APPLYFILTER, ::com::sun::star::uno::Any(&bApplied,getBooleanCppuType()));
+ xActiveSet->setPropertyValue(FM_PROP_FILTER_CRITERIA, ::com::sun::star::uno::makeAny(xParser->getFilter()));
+ xReload->reload();
+ }
+ catch(...)
+ {
+ }
+
+ }
+ }
+ }
+ }
+ rReq.Done();
+ } break;
+ case SID_FM_REFRESH:
+ if (GetImpl()->SaveModified(GetImpl()->getActiveController()))
+ {
+ FormShellWaitObject aWO(this);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > xReload(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ xReload->reload();
+ }
+ rReq.Done();
+ break;
+ case SID_FM_FORM_FILTERED: // toggle the item
+ if (GetImpl()->SaveModified(GetImpl()->getActiveController()))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xActiveSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bApplied = ::utl::getBOOL(xActiveSet->getPropertyValue(FM_PROP_APPLYFILTER));
+
+ sal_Bool bB(!bApplied);
+ xActiveSet->setPropertyValue(FM_PROP_APPLYFILTER, ::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+
+ FormShellWaitObject aWO(this);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > xReload(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ xReload->reload();
+ }
+ rReq.Done();
+ break;
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFormShell::GetState(SfxItemSet &rSet)
+{
+ SfxWhichIter aIter( rSet );
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ while ( nWhich )
+ {
+ switch( nWhich )
+ {
+ case SID_FM_USE_WIZARDS:
+ if (!m_bDesignMode || !GetFormModel())
+ rSet.DisableItem( nWhich );
+ else
+ rSet.Put( SfxBoolItem(nWhich, GetImpl()->GetWizardUsing() ) );
+ break;
+ case SID_FM_OPEN_READONLY:
+ if (!m_bDesignMode || !GetFormModel())
+ rSet.DisableItem( nWhich );
+ else
+ rSet.Put( SfxBoolItem(nWhich, GetFormModel()->GetOpenInDesignMode() ) );
+ break;
+ case SID_FM_RADIOBUTTON:
+ case SID_FM_COMBOBOX:
+ case SID_FM_URLBUTTON:
+ case SID_FM_GROUPBOX:
+ case SID_FM_CHECKBOX:
+ case SID_FM_PUSHBUTTON:
+ case SID_FM_FIXEDTEXT:
+ case SID_FM_LISTBOX:
+ case SID_FM_EDIT:
+ case SID_FM_DBGRID:
+ case SID_FM_IMAGEBUTTON:
+ case SID_FM_IMAGECONTROL:
+ case SID_FM_FILECONTROL:
+ case SID_FM_DATEFIELD:
+ case SID_FM_TIMEFIELD:
+ case SID_FM_NUMERICFIELD:
+ case SID_FM_CURRENCYFIELD:
+ case SID_FM_PATTERNFIELD:
+ case SID_FM_FORMATTEDFIELD:
+ if (!m_bDesignMode)
+ rSet.DisableItem( nWhich );
+ else
+ {
+ sal_Bool bLayerLocked = sal_False;
+ if (m_pFormView)
+ {
+ // Ist der ::com::sun::star::drawing::Layer gelocked, so müssen die Slots disabled werden. #36897
+ SdrPageView* pPV = m_pFormView->GetPageViewPvNum(0);
+ bLayerLocked = pPV->IsLayerLocked(m_pFormView->GetActiveLayer());
+ }
+ if (bLayerLocked)
+ rSet.DisableItem( nWhich );
+ else
+ rSet.Put( SfxBoolItem(nWhich, (nWhich==m_nLastSlot)) );
+ }
+ break;
+ case SID_FM_FILTER_NAVIGATOR_CONTROL:
+ {
+ if (GetImpl()->isInFilterMode())
+ rSet.Put(SfxObjectItem(nWhich, this));
+ else
+ rSet.Put(SfxObjectItem(nWhich));
+ } break;
+ case SID_FM_FIELDS_CONTROL:
+ case SID_FM_PROPERTY_CONTROL:
+ {
+ if (!m_bDesignMode || !m_pFormView || !m_bHasForms)
+ rSet.Put(SfxObjectItem(nWhich));
+ else
+ rSet.Put(SfxObjectItem(nWhich, this));
+
+ } break;
+ case SID_FM_FMEXPLORER_CONTROL:
+ {
+ if (!m_bDesignMode || !m_pFormView)
+ rSet.Put(SfxObjectItem(nWhich));
+ else
+ rSet.Put(SfxObjectItem(nWhich, this));
+
+ } break;
+ case SID_FM_ADD_FIELD:
+ case SID_FM_SHOW_FMEXPLORER:
+ case SID_FM_SHOW_PROPERTIES:
+ case SID_FM_FILTER_NAVIGATOR:
+ {
+ if ( GetViewShell()->GetViewFrame()->KnowsChildWindow(nWhich) )
+ rSet.Put( SfxBoolItem( nWhich, GetViewShell()->GetViewFrame()->HasChildWindow(nWhich)) );
+ else
+ rSet.DisableItem(nWhich);
+ } break;
+
+ case SID_FM_SHOW_PROPERTY_BROWSER:
+ {
+ rSet.Put(SfxBoolItem(GetImpl()->IsPropBrwOpen()));
+ } break;
+
+ case SID_FM_CTL_PROPERTIES:
+ {
+ // der Impl eventuell die Moeglichjkeit geben, ihre an der aktuellen MarkList ausgerichteten Objekte
+ // auf den neuesten Stand zu bringen
+ if (GetImpl()->IsSelectionUpdatePending())
+ GetImpl()->ForceUpdateSelection(sal_False);
+
+ if (!m_pFormView || !m_bDesignMode || !GetImpl()->getCurControl().is())
+ rSet.DisableItem( nWhich );
+ else
+ {
+ sal_Bool bChecked = GetImpl()->IsPropBrwOpen() && (GetImpl()->getSelObject() == GetImpl()->getCurControl());
+ rSet.Put(SfxBoolItem(nWhich, bChecked));
+ }
+ } break;
+
+ case SID_FM_PROPERTIES:
+ {
+ // der Impl eventuell die Moeglichjkeit geben, ihre an der aktuellen MarkList ausgerichteten Objekte
+ // auf den neuesten Stand zu bringen
+ if (GetImpl()->IsSelectionUpdatePending())
+ GetImpl()->ForceUpdateSelection(sal_False);
+
+ if (!m_pFormView || !m_bDesignMode || !GetImpl()->getCurForm().is())
+ rSet.DisableItem( nWhich );
+ else
+ {
+ // aktuelle form
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(GetImpl()->getSelObject(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bChecked = GetImpl()->IsPropBrwOpen() && xForm.is();
+ rSet.Put(SfxBoolItem(nWhich, bChecked));
+ }
+ } break;
+ case SID_FM_TAB_DIALOG:
+ // der Impl eventuell die Moeglichjkeit geben, ihre an der aktuellen MarkList ausgerichteten Objekte
+ // auf den neuesten Stand zu bringen
+ if (GetImpl()->IsSelectionUpdatePending())
+ GetImpl()->ForceUpdateSelection(sal_False);
+
+ if (!m_pFormView || !m_bDesignMode || !GetImpl()->getCurForm().is() )
+ rSet.DisableItem( nWhich );
+ break;
+ case SID_FM_CONFIG:
+ rSet.Put(SfxUInt16Item(nWhich, m_nLastSlot));
+ break;
+ case SID_FM_DESIGN_MODE:
+ if (!m_pFormView)
+ rSet.DisableItem( nWhich );
+ else
+ rSet.Put( SfxBoolItem(nWhich, m_bDesignMode) );
+ break;
+ case SID_FM_SEARCH:
+ case SID_FM_RECORD_FIRST:
+ case SID_FM_RECORD_NEXT:
+ case SID_FM_RECORD_PREV:
+ case SID_FM_RECORD_LAST:
+ case SID_FM_RECORD_NEW:
+ case SID_FM_RECORD_DELETE:
+ case SID_FM_RECORD_ABSOLUTE:
+ case SID_FM_RECORD_TOTAL:
+ case SID_FM_RECORD_SAVE:
+ case SID_FM_RECORD_UNDO:
+ case SID_FM_FORM_FILTERED:
+ case SID_FM_REMOVE_FILTER_SORT:
+ case SID_FM_SORTUP:
+ case SID_FM_SORTDOWN:
+ case SID_FM_ORDERCRIT:
+ case SID_FM_FILTER_START:
+ case SID_FM_AUTOFILTER:
+ case SID_FM_REFRESH:
+ case SID_FM_VIEW_AS_GRID:
+ GetFormState(rSet,nWhich);
+ break;
+
+ case SID_FM_FILTER_EXECUTE:
+ case SID_FM_FILTER_EXIT:
+ break;
+ /*case SID_FM_FILTER_REMOVE:
+ {
+ if (!m_pFormView || !GetImpl()->isInFilterMode())
+ rSet.DisableItem( nWhich );
+ } break;*/
+ case SID_FM_CHANGECONTROLTYPE:
+ {
+ if (!m_pFormView || !m_bDesignMode || !GetImpl()->getCurControl().is())
+ rSet.DisableItem( nWhich );
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xSelAsComp(GetImpl()->getCurControl(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xSelAsComp.is())
+ rSet.DisableItem( nWhich );
+ }
+ } break;
+
+ case SID_FM_CONVERTTO_EDIT :
+ case SID_FM_CONVERTTO_BUTTON :
+ case SID_FM_CONVERTTO_FIXEDTEXT :
+ case SID_FM_CONVERTTO_LISTBOX :
+ case SID_FM_CONVERTTO_CHECKBOX :
+ case SID_FM_CONVERTTO_RADIOBUTTON :
+ case SID_FM_CONVERTTO_GROUPBOX :
+ case SID_FM_CONVERTTO_COMBOBOX :
+ case SID_FM_CONVERTTO_GRID :
+ case SID_FM_CONVERTTO_IMAGEBUTTON :
+ case SID_FM_CONVERTTO_FILECONTROL :
+ case SID_FM_CONVERTTO_DATE :
+ case SID_FM_CONVERTTO_TIME :
+ case SID_FM_CONVERTTO_NUMERIC :
+ case SID_FM_CONVERTTO_CURRENCY :
+ case SID_FM_CONVERTTO_PATTERN :
+ case SID_FM_CONVERTTO_IMAGECONTROL :
+ case SID_FM_CONVERTTO_FORMATTED :
+ {
+ if (!m_pFormView || !m_bDesignMode || !GetImpl()->getCurControl().is())
+ rSet.DisableItem( nWhich );
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSelProps(GetImpl()->getCurControl(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xSelProps.is() || !GetImpl()->IsConversionPossible(xSelProps, nWhich))
+ // it isn't a form component
+ rSet.DisableItem( nWhich );
+ else
+ rSet.Put(SfxBoolItem(nWhich, sal_False));
+ // just to have a defined state (available and not checked)
+ }
+ } break;
+ }
+ nWhich = aIter.NextWhich();
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFormShell::GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich)
+{
+ if ( !GetImpl()->getNavController().is()
+ || !isRowSetAlive(GetImpl()->getNavController()->getModel())
+ || !m_pFormView
+ || m_bDesignMode
+ || !GetImpl()->getActiveForm().is()
+ || GetImpl()->isInFilterMode()
+ || ( GetImpl()->HasPendingCursorAction(GetImpl()->getNavController())
+ && (SID_FM_RECORD_TOTAL != nWhich)
+ )
+ )
+ rSet.DisableItem(nWhich);
+ else
+ {
+ sal_Bool bEnable = sal_False;
+ switch (nWhich)
+ {
+ case SID_FM_VIEW_AS_GRID:
+ if (GetImpl()->m_xAttachedFrame.is() && GetImpl()->getNavController().is())
+ {
+ bEnable = sal_True;
+ sal_Bool bDisplayingCurrent = GetImpl()->getInternalForm(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > (GetImpl()->getNavController()->getModel(), ::com::sun::star::uno::UNO_QUERY)) == GetImpl()->m_xExternalDisplayedForm;
+ rSet.Put(SfxBoolItem(nWhich, bDisplayingCurrent));
+ }
+ break;
+
+ case SID_FM_SEARCH:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xNavSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Int32 nCount = ::utl::getINT32(xNavSet->getPropertyValue(FM_PROP_ROWCOUNT));
+ bEnable = nCount != 0;
+ } break;
+ case SID_FM_RECORD_FIRST:
+ case SID_FM_RECORD_PREV:
+ bEnable = GetImpl()->canNavigate() && GetImpl()->CanMoveLeft(GetImpl()->getNavController());
+ break;
+ case SID_FM_RECORD_NEXT:
+ if (GetImpl()->canNavigate())
+ {
+ if (GetImpl()->CanMoveRight(GetImpl()->getNavController()))
+ bEnable = sal_True;
+ else if (GetImpl()->getNavController() == GetImpl()->getActiveController() &&
+ GetImpl()->getActiveForm().is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xActiveSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bIsNew = ::utl::getBOOL(xActiveSet->getPropertyValue(FM_PROP_ISNEW));
+ bEnable = bIsNew && GetImpl()->isActiveModified();
+ }
+ }
+ break;
+ case SID_FM_RECORD_LAST:
+ {
+ if (GetImpl()->canNavigate())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xNavSet(GetImpl()->getNavController()->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(xNavSet, ::com::sun::star::uno::UNO_QUERY);
+ sal_Int32 nCount = ::utl::getINT32(xNavSet->getPropertyValue(FM_PROP_ROWCOUNT));
+ sal_Bool bIsNew = ::utl::getBOOL(xNavSet->getPropertyValue(FM_PROP_ISNEW));
+ bEnable = nCount && (!xCursor->isLast() || bIsNew);
+ }
+ } break;
+ case SID_FM_RECORD_NEW:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xActiveSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ bEnable = ::utl::canInsert(xActiveSet);
+ // if we are inserting we can move to the next row if the current record is modified
+ bEnable = ::utl::getBOOL(xActiveSet->getPropertyValue(FM_PROP_ISNEW))
+ ? GetImpl()->isActiveModified() || ::utl::getBOOL(xActiveSet->getPropertyValue(FM_PROP_ISMODIFIED))
+ : ::utl::canInsert(xActiveSet);
+ } break;
+ case SID_FM_RECORD_DELETE:
+ {
+ // already deleted ?
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bIsDeleted = !xCursor.is() || xCursor->rowDeleted();
+ if (!bIsDeleted)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xActiveSet(xCursor, ::com::sun::star::uno::UNO_QUERY);
+ // allowed to delete the row ?
+ bEnable = !::utl::getBOOL(xActiveSet->getPropertyValue(FM_PROP_ISNEW)) && ::utl::canDelete(xActiveSet);
+ }
+ else
+ bEnable = sal_False;
+ } break;
+ case SID_FM_RECORD_ABSOLUTE:
+ {
+ if (GetImpl()->canNavigate())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xNavSet(GetImpl()->getNavController()->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(xNavSet, ::com::sun::star::uno::UNO_QUERY);
+
+ sal_Int32 nPos = xCursor->getRow();
+ sal_Bool bIsNew = ::utl::getBOOL(xNavSet->getPropertyValue(FM_PROP_ISNEW));
+ sal_Int32 nCount = ::utl::getINT32(xNavSet->getPropertyValue(FM_PROP_ROWCOUNT));
+ sal_Bool bTotal = ::utl::getBOOL(xNavSet->getPropertyValue(FM_PROP_ROWCOUNTFINAL));
+ if (nPos >= 0 || bIsNew)
+ {
+ if (bTotal)
+ {
+ // Sonderfall, es koennen keine Datensaetze eingefuegt werden
+ // und es gibt keinen Datensatz -> dann
+ if (nCount == 0 && !::utl::canInsert(xNavSet))
+ {
+ bEnable = sal_False;
+ }
+ else
+ {
+ if (bIsNew)
+ nPos = ++nCount;
+ rSet.Put(FmFormInfoItem(nWhich, FmFormInfo(nPos, nCount, sal_False)));
+ bEnable = sal_True;
+ }
+ }
+ else
+ {
+ rSet.Put(FmFormInfoItem(nWhich, FmFormInfo(nPos, -1, sal_False)));
+ bEnable = sal_True;
+ }
+ }
+ }
+ } break;
+ case SID_FM_RECORD_TOTAL:
+ {
+ String aValue;
+ if (!GetImpl()->canNavigate())
+ {
+ aValue = String();
+ bEnable = sal_False;
+ }
+ else
+ {
+ bEnable = sal_True;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xNavSet(GetImpl()->getNavController()->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bIsNew = ::utl::getBOOL(xNavSet->getPropertyValue(FM_PROP_ISNEW));
+ sal_Int32 nCount = ::utl::getINT32(xNavSet->getPropertyValue(FM_PROP_ROWCOUNT));
+
+ if (bIsNew)
+ nCount++;
+
+ aValue = String(sal_uInt32(nCount));
+ }
+ rSet.Put(SfxStringItem(nWhich, aValue));
+ } break;
+ case SID_FM_REMOVE_FILTER_SORT:
+ if (GetImpl()->isParsable() && GetImpl()->hasFilter())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ bEnable = !::utl::getBOOL(xSet->getPropertyValue(FM_PROP_INSERTONLY));
+ }
+ break;
+ case SID_FM_SORTUP:
+ case SID_FM_SORTDOWN:
+ case SID_FM_AUTOFILTER:
+ if (GetImpl()->isParsable())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xActiveSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bInsertOnly = ::utl::getBOOL(xActiveSet->getPropertyValue(FM_PROP_INSERTONLY));
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xCursor(xActiveSet, ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bIsDeleted = xCursor.is() && xCursor->rowDeleted();
+
+ if (!bIsDeleted && !bInsertOnly)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xFormCtrler(GetImpl()->getActiveController());
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl(xFormCtrler->getCurrentControl());
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet = GetImpl()->GetBoundField(xControl, GetImpl()->getActiveForm());
+ // auslesen der Searchflags
+ if (xSet.is())
+ {
+ bEnable = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_SEARCHABLE));
+ }
+ }
+ } break;
+ case SID_FM_ORDERCRIT:
+ case SID_FM_FILTER_START:
+ if (GetImpl()->isParsable())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ bEnable = !::utl::getBOOL(xSet->getPropertyValue(FM_PROP_INSERTONLY));
+ }
+ break;
+ case SID_FM_REFRESH:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xRowSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ bEnable = ::utl::getConnection(xRowSet).is() && ::utl::getString(xSet->getPropertyValue(FM_PROP_ACTIVECOMMAND)).len();
+ } break;
+ case SID_FM_FORM_FILTERED:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xActiveSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ ::rtl::OUString aFilter = ::utl::getString(xActiveSet->getPropertyValue(FM_PROP_FILTER_CRITERIA));
+ if (aFilter.len())
+ {
+ rSet.Put(SfxBoolItem(nWhich, ::utl::getBOOL(xActiveSet->getPropertyValue(FM_PROP_APPLYFILTER))));
+ bEnable = !::utl::getBOOL(xActiveSet->getPropertyValue(FM_PROP_INSERTONLY));
+ }
+ } break;
+ case SID_FM_RECORD_SAVE:
+ case SID_FM_RECORD_UNDO:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xActiveSet(GetImpl()->getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bIsModified = ::utl::getBOOL(xActiveSet->getPropertyValue(FM_PROP_ISMODIFIED));
+ bEnable = bIsModified || GetImpl()->isActiveModified();
+ } break;
+ }
+ if (!bEnable)
+ rSet.DisableItem(nWhich);
+ }
+}
+
+//------------------------------------------------------------------------
+FmFormPage* FmFormShell::GetCurPage() const
+{
+ FmFormPage* pP = NULL;
+ if (m_pFormView && m_pFormView->GetPageViewPvNum(0))
+ pP = PTR_CAST(FmFormPage,m_pFormView->GetPageViewPvNum(0)->GetPage());
+ return pP;
+}
+
+//------------------------------------------------------------------------
+void FmFormShell::SetView(FmFormView* pView)
+{
+ if (m_pFormView)
+ {
+ m_pFormView->SetFormShell( NULL );
+ GetImpl()->ResetForms();
+ m_pFormModel = NULL;
+ }
+ if (pView)
+ {
+ m_pFormView = pView;
+ m_pFormView->SetFormShell( this );
+ m_pFormModel = (FmFormModel*)m_pFormView->GetModel();
+
+ // We activate our view if we are activated ourself, but sometimes the Activate precedes the SetView.
+ // But here we know both the view and our activation state so we at least are able to pass the latter
+ // to the former.
+ // FS - 30.06.99 - 67308
+ if (IsActive() && m_pFormView->GetImpl() && !m_pFormView->IsDesignMode())
+ m_pFormView->GetImpl()->Activate(m_pFormView->GetPageViewPvNum(0));
+
+ SetDesignMode(pView->IsDesignMode());
+ }
+ else
+ {
+ m_pFormView = NULL;
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFormShell::DetermineForms(sal_Bool bInvalidate)
+{
+ // Existieren Formulare auf der aktuellen Page
+ sal_Bool bForms = GetImpl()->hasForms();
+ if (bForms != m_bHasForms)
+ {
+ m_bHasForms = bForms;
+ if (bInvalidate)
+ UIFeatureChanged();
+ }
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmFormShell::GetY2KState(sal_uInt16& nReturn)
+{
+ return GetImpl()->GetY2KState(nReturn);
+}
+
+//------------------------------------------------------------------------
+void FmFormShell::SetY2KState(sal_uInt16 n)
+{
+ GetImpl()->SetY2KState(n);
+}
+
+//------------------------------------------------------------------------
+void FmFormShell::Activate(sal_Bool bMDI)
+{
+ SfxShell::Activate(bMDI);
+ // activate our view if we are activated ourself
+ // FS - 30.06.99 - 67308
+ if (m_pFormView && m_pFormView->GetImpl() && !m_pFormView->IsDesignMode())
+ {
+ SdrPageView* pCurPageView = m_pFormView->GetPageViewPvNum(0);
+ m_pFormView->GetImpl()->Activate(pCurPageView, sal_True);
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFormShell::Deactivate(sal_Bool bMDI)
+{
+ SfxShell::Deactivate(bMDI);
+ // deactivate our view if we are deactivated ourself
+ // FS - 30.06.99 - 67308
+ if (m_pFormView && m_pFormView->GetImpl() && !m_pFormView->IsDesignMode())
+ m_pFormView->GetImpl()->Deactivate(NULL, FALSE);
+}
+
+
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
new file mode 100644
index 0000000000..6cd5f10603
--- /dev/null
+++ b/svx/source/form/fmshimp.cxx
@@ -0,0 +1,4871 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmshimp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+
+#if STLPORT_VERSION>=321
+#include <math.h> // prevent conflict between exception and std::exception
+#endif
+
+#ifndef _SVX_GRIDCOLS_HXX
+#include "gridcols.hxx"
+#endif
+
+#ifndef _E3D_OBJ3D_HXX
+#include <obj3d.hxx>
+#endif
+
+#ifndef _SVX_FMVWIMP_HXX
+#include "fmvwimp.hxx"
+#endif
+
+#ifndef _SVX_FMSHIMP_HXX
+#include "fmshimp.hxx"
+#endif
+
+#ifndef _SVDPAGV_HXX //autogen
+#include "svdpagv.hxx"
+#endif
+
+#ifndef _SVX_FMPAGE_HXX
+#include "fmpage.hxx"
+#endif
+
+#ifndef _ISOLANG_HXX
+#include <tools/isolang.hxx>
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX //autogen
+#include <dialmgr.hxx>
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif // _SVX_FMRESIDS_HRC
+
+#ifndef _SVX_FMITEMS_HXX
+#include "fmitems.hxx"
+#endif
+
+#ifndef _SVX_FMOBJ_HXX
+#include "fmobj.hxx"
+#endif
+
+#ifndef _MULTIPRO_HXX
+#include "multipro.hxx"
+#endif
+
+#ifndef _SFX_BINDINGS_HXX //autogen
+#include <sfx2/bindings.hxx>
+#endif
+
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
+#include <com/sun/star/form/XLoadable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
+#include <com/sun/star/container/XContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATION_HPP_
+#include <com/sun/star/container/XEnumeration.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
+#include <com/sun/star/container/XIndexAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_XTEXTCOMPONENT_HPP_
+#include <com/sun/star/awt/XTextComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XBOUNDCOMPONENT_HPP_
+#include <com/sun/star/form/XBoundComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_LISTSOURCETYPE_HPP_
+#include <com/sun/star/form/ListSourceType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XEVENTATTACHERMANAGER_HPP_
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XBOUNDCONTROL_HPP_
+#include <com/sun/star/form/XBoundControl.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XRESET_HPP_
+#include <com/sun/star/form/XReset.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_UTIL_XNUMBERFORMATTER_HPP_
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XMODESELECTOR_HPP_
+#include <com/sun/star/util/XModeSelector.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XMODIFYBROADCASTER_HPP_
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XCANCELLABLE_HPP_
+#include <com/sun/star/util/XCancellable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+#ifndef _SVX_FMGLOB_HXX
+#include <fmglob.hxx>
+#endif
+
+#ifndef _SVDITER_HXX //autogen
+#include <svditer.hxx>
+#endif
+
+#ifndef _SFX_INIMGR_HXX //autogen
+#include <sfx2/inimgr.hxx>
+#endif
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+
+#ifndef _SFXVIEWSH_HXX //autogen wg. SfxViewShell
+#include <sfx2/viewsh.hxx>
+#endif
+
+#ifndef _SFXVIEWFRM_HXX //autogen wg. SfxViewFrame
+#include <sfx2/viewfrm.hxx>
+#endif
+
+#ifndef _SFXFRAME_HXX //autogen wg. SfxFrame
+#include <sfx2/frame.hxx>
+#endif
+
+#ifndef _SVT_SDBPARSE_HXX
+#include <svtools/sdbparse.hxx>
+#endif
+
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif // _SVX_FMSERVS_HXX
+
+#ifndef _TOOLS_COLOR_HXX
+#include <tools/color.hxx>
+#endif
+
+#ifndef _SVX_FMUNOPGE_HXX
+#include "fmpgeimp.hxx"
+#endif
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _SVX_FMSHELL_HXX
+#include "fmshell.hxx"
+#endif
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SVX_FMMODEL_HXX
+#include "fmmodel.hxx"
+#endif
+#ifndef _SVX_FMUNDO_HXX
+#include "fmundo.hxx"
+#endif
+
+#ifndef _SVX_FMURL_HXX
+#include "fmurl.hxx"
+#endif
+
+#ifndef _URLOBJ_HXX //autogen wg. INetURLObject
+#include <tools/urlobj.hxx>
+#endif
+
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+#ifndef _UTL_GUARDING_HXX_
+#include <unotools/guarding.hxx>
+#endif
+#ifndef _UTL_STLTYPES_HXX_
+#include <unotools/stl_types.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _CPPUHELPER_SERVICEFACTORY_HXX_
+#include <cppuhelper/servicefactory.hxx>
+#endif
+
+#if SUPD < 583
+
+#ifndef _USR_SMARTCONV_HXX_
+#include <usr/smartconv.hxx>
+#endif
+
+#include <smart/com/sun/star/frame/xframe.hxx>
+#include <smart/com/sun/star/awt/XControlContainer.hxx>
+#include <usr/xiface.hxx>
+
+// this method is teporary ... as long as we use some implementations in foreign projects
+// which do not work with UNO3
+template <class SMARTTYPE, class UNO3TYPE>
+void convertIFace(SMARTTYPE* _pIn, ::com::sun::star::uno::Reference<UNO3TYPE>& _rxOut)
+{
+ ::utl::InterfaceRef xUno3IFace;
+ ::usr::convertUsr2UnoInterface(xUno3IFace, static_cast<XInterface*>(_pIn));
+ _rxOut = ::com::sun::star::uno::Reference<UNO3TYPE>::query(xUno3IFace);
+}
+
+// this method is teporary ... as long as we use some implementations in foreign projects
+// which do not work with UNO3
+template <class SMARTREF>
+void convertIFace(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rxIn, SMARTREF& _rxOut)
+{
+ XInterfaceRef xUsr3IFace;
+ ::usr::convertUno2UsrInterface(xUsr3IFace, _rxIn);
+ _rxOut = SMARTREF(xUsr3IFace, USR_QUERY);
+}
+
+#endif
+
+extern sal_Int16 ControllerSlotMap[];
+
+extern sal_Int16 AutoSlotMap[];
+
+// wird fuer Invalidate verwendet -> mitpflegen
+extern sal_uInt16 DatabaseSlotMap[];
+
+// wird fuer Invalidate verwendet -> mitpflegen
+// aufsteigend sortieren !!!!!!
+sal_Int16 DlgSlotMap[] = // slots des Controllers
+{
+ SID_FM_CTL_PROPERTIES,
+ SID_FM_PROPERTIES,
+ SID_FM_TAB_DIALOG,
+ SID_FM_ADD_FIELD,
+ SID_FM_SHOW_FMEXPLORER,
+ SID_FM_FIELDS_CONTROL,
+ SID_FM_SHOW_PROPERTIES,
+ SID_FM_PROPERTY_CONTROL,
+ SID_FM_FMEXPLORER_CONTROL,
+ 0
+};
+
+sal_uInt16 ModifySlotMap[] = // slots des Controllers
+{
+ SID_FM_RECORD_NEXT,
+ SID_FM_RECORD_NEW,
+ SID_FM_RECORD_SAVE,
+ SID_FM_RECORD_UNDO,
+ 0
+};
+
+sal_Int16 SelObjectSlotMap[] = // vom SelObject abhaengige Slots
+{
+ SID_FM_CONVERTTO_EDIT,
+ SID_FM_CONVERTTO_BUTTON,
+ SID_FM_CONVERTTO_FIXEDTEXT,
+ SID_FM_CONVERTTO_LISTBOX,
+ SID_FM_CONVERTTO_CHECKBOX,
+ SID_FM_CONVERTTO_RADIOBUTTON,
+ SID_FM_CONVERTTO_GROUPBOX,
+ SID_FM_CONVERTTO_COMBOBOX,
+ SID_FM_CONVERTTO_GRID,
+ SID_FM_CONVERTTO_IMAGEBUTTON,
+ SID_FM_CONVERTTO_FILECONTROL,
+ SID_FM_CONVERTTO_DATE,
+ SID_FM_CONVERTTO_TIME,
+ SID_FM_CONVERTTO_NUMERIC,
+ SID_FM_CONVERTTO_CURRENCY,
+ SID_FM_CONVERTTO_PATTERN,
+ SID_FM_CONVERTTO_IMAGECONTROL,
+ SID_FM_CONVERTTO_FORMATTED,
+
+ SID_FM_FMEXPLORER_CONTROL,
+
+ 0
+};
+
+// die folgenden Arrays muessen kosistent sein, also einander entsprechende Eintraege an der selben relativen Position
+// innerhalb ihres jeweiligen Arrays stehen
+sal_Int16 nConvertSlots[] =
+{
+ SID_FM_CONVERTTO_EDIT,
+ SID_FM_CONVERTTO_BUTTON,
+ SID_FM_CONVERTTO_FIXEDTEXT,
+ SID_FM_CONVERTTO_LISTBOX,
+ SID_FM_CONVERTTO_CHECKBOX,
+ SID_FM_CONVERTTO_RADIOBUTTON,
+ SID_FM_CONVERTTO_GROUPBOX,
+ SID_FM_CONVERTTO_COMBOBOX,
+ SID_FM_CONVERTTO_GRID,
+ SID_FM_CONVERTTO_IMAGEBUTTON,
+ SID_FM_CONVERTTO_FILECONTROL,
+ SID_FM_CONVERTTO_DATE,
+ SID_FM_CONVERTTO_TIME,
+ SID_FM_CONVERTTO_NUMERIC,
+ SID_FM_CONVERTTO_CURRENCY,
+ SID_FM_CONVERTTO_PATTERN,
+ SID_FM_CONVERTTO_IMAGECONTROL,
+ SID_FM_CONVERTTO_FORMATTED
+};
+
+sal_Int16 nCreateSlots[] =
+{
+ SID_FM_EDIT,
+ SID_FM_PUSHBUTTON,
+ SID_FM_FIXEDTEXT,
+ SID_FM_LISTBOX,
+ SID_FM_CHECKBOX,
+ SID_FM_RADIOBUTTON,
+ SID_FM_GROUPBOX,
+ SID_FM_COMBOBOX,
+ SID_FM_DBGRID,
+ SID_FM_IMAGEBUTTON,
+ SID_FM_FILECONTROL,
+ SID_FM_DATEFIELD,
+ SID_FM_TIMEFIELD,
+ SID_FM_NUMERICFIELD,
+ SID_FM_CURRENCYFIELD,
+ SID_FM_PATTERNFIELD,
+ SID_FM_IMAGECONTROL,
+ SID_FM_FORMATTEDFIELD
+};
+
+sal_Int16 nObjectTypes[] =
+{
+ OBJ_FM_EDIT,
+ OBJ_FM_BUTTON,
+ OBJ_FM_FIXEDTEXT,
+ OBJ_FM_LISTBOX,
+ OBJ_FM_CHECKBOX,
+ OBJ_FM_RADIOBUTTON,
+ OBJ_FM_GROUPBOX,
+ OBJ_FM_COMBOBOX,
+ OBJ_FM_GRID,
+ OBJ_FM_IMAGEBUTTON,
+ OBJ_FM_FILECONTROL,
+ OBJ_FM_DATEFIELD,
+ OBJ_FM_TIMEFIELD,
+ OBJ_FM_NUMERICFIELD,
+ OBJ_FM_CURRENCYFIELD,
+ OBJ_FM_PATTERNFIELD,
+ OBJ_FM_IMAGECONTROL,
+ OBJ_FM_FORMATTEDFIELD
+};
+
+//------------------------------------------------------------------------------
+sal_Bool FmXBoundFormFieldIterator::ShouldStepInto(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rContainer) const
+{
+ if (_rContainer == m_xStartingPoint)
+ // would be quite stupid to step over the root ....
+ return sal_True;
+
+ return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>(_rContainer, ::com::sun::star::uno::UNO_QUERY).is();
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXBoundFormFieldIterator::ShouldHandleElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rElement)
+{
+ if (!_rElement.is())
+ // NULL element
+ return sal_False;
+
+ if (::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>(_rElement, ::com::sun::star::uno::UNO_QUERY).is() || ::com::sun::star::uno::Reference< ::com::sun::star::form::XGrid>(_rElement, ::com::sun::star::uno::UNO_QUERY).is())
+ // a forms or a grid
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(_rElement, ::com::sun::star::uno::UNO_QUERY);
+ if (!xSet.is() || !::utl::hasProperty(FM_PROP_BOUNDFIELD, xSet))
+ // no "BoundField" property
+ return sal_False;
+
+ ::com::sun::star::uno::Any aVal( xSet->getPropertyValue(FM_PROP_BOUNDFIELD) );
+ if (aVal.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE)
+ // void or invalid property value
+ return sal_False;
+
+ if (!((::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aVal.getValue())->is())
+ // empty ref
+ return sal_False;
+
+ return sal_True;
+}
+
+//==============================================================================
+
+DECL_CURSOR_ACTION_THREAD(FmMoveToLastThread);
+IMPL_CURSOR_ACTION_THREAD(FmMoveToLastThread, SVX_RES(RID_STR_MOVING_CURSOR), last());
+
+//------------------------------------------------------------------------------
+
+
+
+//------------------------------------------------------------------------------
+sal_Bool hasObject(SdrObjListIter& rIter, SdrObject* pObj)
+{
+ sal_Bool bFound = sal_False;
+ while (rIter.IsMore() && !bFound)
+ bFound = pObj == rIter.Next();
+
+ rIter.Reset();
+ return bFound;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool isControlList(const SdrMarkList& rMarkList)
+{
+ // enthaelt die liste nur Controls und mindestens ein control
+ sal_uInt32 nMarkCount = rMarkList.GetMarkCount();
+ sal_Bool bControlList = nMarkCount != 0;
+
+ sal_Bool bHadAnyLeafs = sal_False;
+
+ for (sal_uInt32 i = 0; i < nMarkCount && bControlList; i++)
+ {
+ SdrObject *pObj = rMarkList.GetMark(i)->GetObj();
+ E3dObject* pAs3DObject = PTR_CAST(E3dObject, pObj);
+ // E3dObject's do not contain any 2D-objects (by definition)
+ // we need this extra check here : an E3dObject->IsGroupObject says "YES", but an SdrObjListIter working
+ // with an E3dObject doesn't give me any Nodes (E3dObject has a sub list, but no members in that list,
+ // cause there implementation differs from the one of "normal" SdrObject's. Unfortunally SdrObject::IsGroupObject
+ // doesn't check the element count of the sub list, which is simply a bug in IsGroupObject we can't fix at the moment).
+ // So at the end of this function bControlList would have the same value it was initialized with above : sal_True
+ // And this would be wrong :)
+ // 03.02.00 - 72529 - FS
+ if (!pAs3DObject)
+ if (pObj->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pObj->GetSubList());
+ while (aIter.IsMore() && bControlList)
+ {
+ bControlList = FmFormInventor == aIter.Next()->GetObjInventor();
+ bHadAnyLeafs = sal_True;
+ }
+ }
+ else
+ {
+ bHadAnyLeafs = sal_True;
+ bControlList = FmFormInventor == pObj->GetObjInventor();
+ }
+ }
+
+ return bControlList && bHadAnyLeafs;
+}
+
+//------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> GetForm(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xChild(xElement, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xParent;
+ if (xChild.is())
+ xParent = xChild->getParent();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm(xParent, ::com::sun::star::uno::UNO_QUERY);
+ if (!xForm.is() && xParent.is())
+ xForm = GetForm(xParent);
+
+ return xForm;
+}
+
+//------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> GetForm(const FmFormObj* pObj)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm;
+ if (pObj)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent> xFormComponent(pObj->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xFormComponent.is())
+ xForm = ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>(xFormComponent->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ }
+ return xForm;
+}
+
+//------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> FmXFormShell::DetermineCurForm(const SdrMarkList& rMarkList, sal_Bool& bMixedWithFormControls)
+{
+ // gibt es eine aktuelle Form, wird ermittelt aus den selektierten Objekten
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xReferenceForm;
+ bMixedWithFormControls = sal_False;
+ sal_uInt32 nMarkCount = rMarkList.GetMarkCount();
+
+ sal_Bool bHasFormControls = sal_False;
+ sal_Bool bHasForeignControls = sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm;
+ for (sal_uInt32 i=0; i<nMarkCount; i++)
+ {
+ SdrObject* pObj = rMarkList.GetMark(i)->GetObj();
+ if (pObj->GetObjInventor() == FmFormInventor)
+ {
+ FmFormObj* pFormObj = PTR_CAST(FmFormObj, pObj);
+ xForm = GetForm(pFormObj);
+
+ if (!xReferenceForm.is())
+ {
+ xReferenceForm = xForm;
+ bHasFormControls = sal_True;
+ }
+ else if (xForm.is() && (::com::sun::star::form::XForm*)xReferenceForm.get() != (::com::sun::star::form::XForm*)xForm.get())
+ {
+ // mehr als eine Form selektiert
+ bMixedWithFormControls = sal_True;
+ return ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>();
+ }
+ }
+ else if (pObj->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pObj->GetSubList());
+ while (aIter.IsMore())
+ {
+ SdrObject* pObj = aIter.Next();
+ if (pObj->GetObjInventor() == FmFormInventor)
+ {
+ FmFormObj* pFormObj = PTR_CAST(FmFormObj, pObj);
+ xForm = GetForm(pFormObj);
+
+ if (!xReferenceForm.is())
+ {
+ xReferenceForm = xForm;
+ bHasFormControls = sal_True;
+ }
+ else if (xForm.is() && (::com::sun::star::form::XForm*)xReferenceForm.get() != (::com::sun::star::form::XForm*)xForm.get())
+ {
+ // mehr als eine Form selektiert
+ bMixedWithFormControls = sal_True;
+ return ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>();
+ }
+ } else
+ // irgendein Nicht-Form-Control
+ bHasForeignControls = sal_True;
+ }
+ } else
+ bHasForeignControls = sal_True;
+ }
+
+ // hierher komme ich nicht mehr, wenn Controls aus mindestens zwei Forms selektiert sind, also ermittelt sich
+ // bMixedWithFormControls wie folgt
+ bMixedWithFormControls = bHasForeignControls && bHasFormControls;
+ return xReferenceForm;
+}
+
+
+//========================================================================
+// class FmXFormShell
+//========================================================================
+//------------------------------------------------------------------------
+FmXFormShell::FmXFormShell( FmFormShell* _pShell, SfxViewFrame* _pViewFrame )
+ : ::cppu::OComponentHelper(m_aMutex)
+ ,m_pShell(_pShell)
+ ,m_bDatabaseBar(sal_False)
+ ,m_eNavigate(::com::sun::star::form::NavigationBarMode_NONE)
+ ,m_bActiveModified(sal_False)
+ ,m_bTrackProperties(sal_True)
+ ,m_pCheckForRemoval(NULL)
+ ,m_bInActivate(sal_False)
+ ,m_bSetFocus(sal_False)
+ ,m_nLockSlotInvalidation(0)
+ ,m_nInvalidationEvent(0)
+ ,m_bFilterMode(sal_False)
+ ,m_bHadPropBrw(sal_False)
+ ,m_pMainFrameInterceptor(NULL)
+ ,m_pExternalViewInterceptor(NULL)
+ ,m_bChangingDesignMode(sal_False)
+{
+ m_aMarkTimer.SetTimeout(100);
+ m_aMarkTimer.SetTimeoutHdl(LINK(this,FmXFormShell,OnTimeOut));
+
+ String sUseWizards(SFX_INIMANAGER()->Get(SFX_GROUP_DATABASE, String::CreateFromAscii("UseWizards")));
+ m_bUseWizards = (!sUseWizards.Len() || (sUseWizards.CompareToAscii("1") == COMPARE_EQUAL));
+ // wenn kein Ini-Eintrag oder =1
+
+ // we are a DispatchInterceptor, so we want to be inserted into the frame's dispatch chain, thus having
+ // a chance for frame-spanning communication (via UNO, not slots)
+ SfxFrame* pFrame = _pViewFrame ? _pViewFrame->GetFrame() : NULL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame> xUnoFrame;
+ if( pFrame)
+#if SUPD > 582
+ xUnoFrame = pFrame->GetFrameInterface();
+#else
+ convertIFace((XFrame*)pFrame->GetFrameInterface(),xUnoFrame);
+#endif
+ else
+ xUnoFrame = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>(NULL);
+
+ // to prevent deletion of this we acquire our refcounter once
+ ::utl::increment(OComponentHelper::m_refCount);
+
+ // dispatch interception for the frame
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception> xSupplier(xUnoFrame, ::com::sun::star::uno::UNO_QUERY);
+ m_pMainFrameInterceptor = new FmXDispatchInterceptorImpl(xSupplier, this, 0);
+ m_pMainFrameInterceptor->acquire();
+
+ m_xAttachedFrame = xUnoFrame;
+
+ // correct the refcounter
+ ::utl::decrement(OComponentHelper::m_refCount);
+}
+
+//------------------------------------------------------------------------
+FmXFormShell::~FmXFormShell()
+{
+ if (!rBHelper.bDisposed)
+ dispose();
+
+ ::osl::ClearableMutexGuard aGuard(m_aAsyncSafety);
+ if (HasAnyPendingCursorAction())
+ CancelAnyPendingCursorAction();
+ aGuard.clear();
+
+ if (m_pCheckForRemoval)
+ {
+ delete m_pCheckForRemoval;
+ m_pCheckForRemoval = NULL;
+ }
+
+ DBG_ASSERT(!m_nInvalidationEvent, "FmXFormShell::~FmXFormShell : still have an invalidation event !");
+ // should habe been deleted while beeing disposed
+
+ m_aMarkTimer.Stop();
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXFormShell::queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException )
+{
+
+ ::com::sun::star::uno::Any aRet = ::cppu::queryInterface(type,
+ // static_cast< ::com::sun::star::lang::XEventListener*>(this),
+ static_cast< ::com::sun::star::container::XContainerListener*>(this),
+ static_cast< ::com::sun::star::view::XSelectionChangeListener*>(this),
+ static_cast< ::com::sun::star::sdbc::XRowSetListener*>(this),
+ static_cast< ::com::sun::star::beans::XPropertyChangeListener*>(this),
+ static_cast< ::com::sun::star::util::XModifyListener*>(this),
+ // static_cast< ::com::sun::star::frame::XDispatchProviderInterceptor*>(this),
+ // static_cast< ::com::sun::star::frame::XDispatchProvider*>(this),
+ static_cast< ::com::sun::star::form::XFormControllerListener*>(this));
+ if(aRet.hasValue())
+ return aRet;
+ return OComponentHelper::queryInterface(type);
+}
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXFormShell::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypes(OComponentHelper::getTypes());
+ aTypes.realloc(6);
+ ::com::sun::star::uno::Type* pTypes = aTypes.getArray();
+
+ pTypes[aTypes.getLength()-6] = ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener>*)0);
+ pTypes[aTypes.getLength()-5] = ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener>*)0);
+ pTypes[aTypes.getLength()-4] = ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSetListener>*)0);
+ pTypes[aTypes.getLength()-3] = ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener>*)0);
+ pTypes[aTypes.getLength()-2] = ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener>*)0);
+ pTypes[aTypes.getLength()-1] = ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>*)0);
+
+ return aTypes;
+}
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL FmXFormShell::getImplementationId() throw(::com::sun::star::uno::RuntimeException)
+{
+ return ::form::OImplementationIds::getImplementationId(getTypes());
+}
+// EventListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormShell::disposing(const ::com::sun::star::lang::EventObject& e) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if (m_xActiveController == e.Source)
+ {
+ // wird der Controller freigeben dann alles loslassen
+ stopListening();
+ m_xActiveForm = NULL;
+ m_xActiveController = NULL;
+ m_xNavigationController = NULL;
+ SFX_BINDINGS().InvalidateShell(*m_pShell);
+ }
+
+ if (e.Source == m_xExternalViewController)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> xFormController(m_xExternalViewController, ::com::sun::star::uno::UNO_QUERY);
+ if (xFormController.is())
+ xFormController->removeActivateListener((::com::sun::star::form::XFormControllerListener*)this);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xComp(m_xExternalViewController, ::com::sun::star::uno::UNO_QUERY);
+ if (xComp.is())
+ xComp->removeEventListener((::com::sun::star::lang::XEventListener*)(::com::sun::star::beans::XPropertyChangeListener*)this);
+
+ m_xExternalViewController = NULL;
+ m_xExternalDisplayedForm = NULL;
+ m_xExtViewTriggerController = NULL;
+
+ InvalidateSlot(SID_FM_VIEW_AS_GRID, sal_True, sal_False);
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormShell::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt)
+{
+ if (evt.PropertyName == FM_PROP_ISMODIFIED)
+ {
+ if (!::utl::getBOOL(evt.NewValue))
+ m_bActiveModified = sal_False;
+ }
+ else if (evt.PropertyName == FM_PROP_ISNEW)
+ {
+ if (!::utl::getBOOL(evt.NewValue))
+ m_bActiveModified = sal_False;
+ }
+ else if (evt.PropertyName == FM_PROP_ROWCOUNT)
+ {
+ // Das gleich folgenden Update erzwingt ein Neu-Painten der entsprechenden Slots. Wenn ich mich aber hier nicht
+ // in dem HauptThread der Applikation befinde (weil zum Beispiel ein Cursor gerade Datensaetze zaehlt und mir dabei
+ // immer diese PropertyChanges beschert), kann sich das mit en normalen Paints im HauptThread der Applikation beissen.
+ // (Solche Paints passieren zum Beispiel, wenn man einfach nur eine andere Applikation ueber das Office legt und wieder
+ // zurueckschaltet).
+ // Deshalb die Benutzung des SolarMutex, der sichert das ab.
+ ::vos::IMutex& rSolarSafety = Application::GetSolarMutex();
+ if (rSolarSafety.tryToAcquire())
+ {
+ SFX_BINDINGS().Invalidate(SID_FM_RECORD_TOTAL , sal_True, sal_False);
+ SFX_BINDINGS().Update(SID_FM_RECORD_TOTAL);
+ rSolarSafety.release();
+ }
+ else
+ {
+ // with the following the slot is invalidated asynchron
+ LockSlotInvalidation(sal_True);
+ InvalidateSlot(SID_FM_RECORD_TOTAL , sal_True, sal_False);
+ LockSlotInvalidation(sal_False);
+ }
+ }
+ else if (m_xParser.is())
+ {
+ try
+ {
+ if (evt.PropertyName == FM_PROP_ACTIVECOMMAND)
+ m_xParser->setQuery(::utl::getString(evt.NewValue));
+ else if (evt.PropertyName == FM_PROP_FILTER_CRITERIA)
+ {
+ if (m_xParser->getFilter() != ::utl::getString(evt.NewValue))
+ m_xParser->setFilter(::utl::getString(evt.NewValue));
+ }
+ else if (evt.PropertyName == FM_PROP_SORT)
+ {
+ if (m_xParser->getOrder() != ::utl::getString(evt.NewValue))
+ m_xParser->setOrder(::utl::getString(evt.NewValue));
+ }
+ }
+ catch(...)
+ {
+ }
+
+ }
+
+ // this may be called from a non-main-thread so invalidate the shell asynchronously
+ LockSlotInvalidation(sal_True);
+ InvalidateSlot(0, 0, 0); // special meaning : invalidate m_pShell
+ LockSlotInvalidation(sal_False);
+}
+
+// ::com::sun::star::util::XModifyListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormShell::modified(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ if (!m_bActiveModified)
+ {
+ m_bActiveModified = sal_True;
+ SFX_BINDINGS().Invalidate(ModifySlotMap);
+ }
+}
+// #endif
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> FmXFormShell::interceptedQueryDispatch(sal_uInt16 _nId, const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard(m_aAsyncSafety);
+
+ if (!m_pShell)
+ return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch>();
+ // if we have no shell we are disposed, so we disposed all our dispatchers, too, so there is no need to supply a dispatcher
+ // (and no possibility : without our shell, methods like GetPageForms won't work properly)
+
+ // check if it is one of the form navigation urls
+ static ::rtl::OUString sFormNavUrls[] = {
+ FMURL_RECORD_MOVEFIRST,
+ FMURL_RECORD_MOVEPREV,
+ FMURL_RECORD_MOVENEXT,
+ FMURL_RECORD_MOVELAST,
+ FMURL_RECORD_MOVETONEW,
+ FMURL_RECORD_UNDO
+ };
+ static sal_Int16 nAccordingSlots[] = {
+ SID_FM_RECORD_FIRST,
+ SID_FM_RECORD_PREV,
+ SID_FM_RECORD_NEXT,
+ SID_FM_RECORD_LAST,
+ SID_FM_RECORD_NEW,
+ SID_FM_RECORD_UNDO
+ };
+ ::rtl::OUString sMark;
+ UniString sAccessPath,sExternalCheck,sPageId;
+ for (sal_Int16 i=0; i<sizeof(sFormNavUrls)/sizeof(sFormNavUrls[0]); ++i)
+ {
+ if (aURL.Main.equals(sFormNavUrls[i]))
+ {
+ sMark = aURL.Mark;
+ DBG_ASSERT(sMark.getLength(), "FmXFormShell::queryDispatch : invalid ::com::sun::star::util::URL !");
+ // form navigation slots should always have a mark describing their form model's access paths (FmXFormController builds such a mark)
+
+ sAccessPath = sMark.getStr();
+
+ // check if it comes from our external form grid view
+ UniString fComponentName = FMURL_COMPONENT_FORMGRIDVIEW;
+ sExternalCheck = fComponentName;
+// sExternalCheck = (UniString)FMURL_COMPONENT_FORMGRIDVIEW;
+ INetURLObject aExternalCheck(sExternalCheck);
+ if (UniString(aExternalCheck.GetURLPath()) == sAccessPath)
+ { // it comes from the external dispatcher
+ // -> correct the access path
+ DBG_ASSERT(m_xExternalDisplayedForm.is() && m_xExternalViewController.is(),
+ "FmXFormShell::queryDispatch : where did this dispatch request come from ?");
+ sAccessPath = GetAccessPathFromForm(m_xExternalDisplayedForm, GetPageId(m_xExternalDisplayedForm));
+ sMark = sAccessPath;
+
+ DBG_ASSERT(_nId == 1, "FmXFormShell::queryDispatch : where did this came from ?");
+ // the FmXDispatchInterceptorImpl which forwarded this request should be m_pExternalViewInterceptor, and this interceptor
+ // should have ID 1 ...
+ }
+#if DBG_UTIL
+ else
+ {
+ DBG_ASSERT(_nId == 0, "FmXFormShell::queryDispatch : where did this came from ?");
+ // the FmXDispatchInterceptorImpl which forwarded this request should be m_pMainFrameInterceptor, and this interceptor
+ // should have ID 0 ...
+ }
+#endif
+
+ // get the form the dispatcher is requested for
+ // first the page id
+ String sOriginalPathWithPagePrefix = sAccessPath;
+ xub_StrLen nSepPos = sAccessPath.Search('\\');
+ DBG_ASSERT(nSepPos != STRING_NOTFOUND, "FmXFormShell::queryDispatch : invalid ::com::sun::star::util::URL mark (no page prefix) !");
+ sPageId = sAccessPath.Copy(0, nSepPos);
+ sAccessPath = sAccessPath.Copy(nSepPos + 1, STRING_LEN);
+
+ // from this id the forms collection and the form
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xPageForms(GetPageForms(sPageId), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xAffectedForm(getElementFromAccessPath(xPageForms, UniString(sAccessPath)), ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xAffectedForm.is(), "FmXFormShell::queryDispatch : could not retrieve a form form the request !");
+
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xFormProps(xAffectedForm, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::form::NavigationBarMode eMode = *(::com::sun::star::form::NavigationBarMode*)xFormProps->getPropertyValue(FM_PROP_NAVIGATION).getValue();
+ if (eMode != ::com::sun::star::form::NavigationBarMode_CURRENT)
+ { // we can't supply a dispatcher for that : else we would have to listen to all operations on the parent
+ // form and to all ops on the affected form itself, just to keep the state up-to-date. This would be too much to do ...
+ // 73233 - 22.02.00 - FS
+ return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch>();
+ }
+
+ // get the dispatcher array for the form
+ SingleFormDispatchers& aDispatchers = m_aNavigationDispatcher[sMark];
+ // the [] operator will create a new one if it didn't exist before
+ if (!aDispatchers.size())
+ { // it was a new one -> fill it with initial NULL values
+ for (sal_Int16 j=0; j<sizeof(sFormNavUrls)/sizeof(sFormNavUrls[0]); ++j)
+ aDispatchers.insert(aDispatchers.begin(), (FmFormNavigationDispatcher*)NULL);
+ }
+
+ FmFormNavigationDispatcher*& pRequestedDispatcher = aDispatchers[i];
+ if (!pRequestedDispatcher)
+ {
+ // nobody requested a dispatcher for this form and this slot before -> create a new one
+ SFX_BINDINGS().DENTERREGISTRATIONS();
+ pRequestedDispatcher = new FmFormNavigationDispatcher(aURL, nAccordingSlots[i], SFX_BINDINGS(), xAffectedForm, sOriginalPathWithPagePrefix);
+ SFX_BINDINGS().DLEAVEREGISTRATIONS();
+ DBG_ASSERT(((sPageId += '\\') += sAccessPath) == GetAccessPathFromForm(xAffectedForm, GetPageId(xAffectedForm)),
+ "FmXFormShell::queryDispatch : hmmm ... what does this access path mean ?");
+
+ pRequestedDispatcher->acquire();
+ pRequestedDispatcher->setExecutor(LINK(this, FmXFormShell, OnExecuteNavSlot));
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xNavigationForm;
+ if (m_xNavigationController.is())
+ xNavigationForm = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(m_xNavigationController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ // xNavigationForm is the form which our navigation bar belongs to
+ // activate the new dispatcher if (and only if) it belongs to the same form
+ if (xAffectedForm == xNavigationForm)
+ {
+ pRequestedDispatcher->SetActive(sal_True);
+ }
+ else
+ {
+ pRequestedDispatcher->SetActive(sal_False);
+ UpdateFormDispatcher(pRequestedDispatcher);
+ }
+
+ return (::com::sun::star::frame::XDispatch*)pRequestedDispatcher;
+ }
+ }
+
+ return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch>();
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormShell::formActivated(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ DBG_ASSERT(rEvent.Source == m_xExternalViewController, "FmXFormShell::formActivated : where did this come from ?");
+ setActiveController(::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>(rEvent.Source, ::com::sun::star::uno::UNO_QUERY));
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormShell::formDeactivated(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ DBG_ASSERT(rEvent.Source == m_xExternalViewController, "FmXFormShell::formDeactivated : where did this come from ?");
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::disposing()
+{
+ OComponentHelper::disposing();
+
+ // dispose our interceptor helpers
+ if (m_pMainFrameInterceptor)
+ {
+ m_pMainFrameInterceptor->dispose();
+ m_pMainFrameInterceptor->release();
+ m_pMainFrameInterceptor = NULL;
+ }
+ if (m_pExternalViewInterceptor)
+ {
+ m_pExternalViewInterceptor->dispose();
+ m_pExternalViewInterceptor->release();
+ m_pExternalViewInterceptor = NULL;
+ }
+
+ m_xAttachedFrame = NULL;
+
+ CloseExternalFormViewer();
+
+ // dispose all our navigation dispatchers
+ for ( FormsDispatchersIterator aFormIter = m_aNavigationDispatcher.begin();
+ aFormIter != m_aNavigationDispatcher.end();
+ ++aFormIter
+ )
+ {
+ for ( SingleFormDispatchersIterator aDispIter = (*aFormIter).second.begin();
+ aDispIter < (*aFormIter).second.end();
+ ++aDispIter
+ )
+ {
+ FmFormNavigationDispatcher* pCurDispatcher = *aDispIter;
+ if (pCurDispatcher)
+ {
+ pCurDispatcher->dispose();
+ pCurDispatcher->release();
+ *aDispIter = NULL;
+ }
+ }
+ }
+ m_aNavigationDispatcher.clear();
+
+ {
+ ::osl::MutexGuard aGuard(m_aInvalidationSafety);
+ if (m_nInvalidationEvent)
+ {
+ Application::RemoveUserEvent(m_nInvalidationEvent);
+ m_nInvalidationEvent = 0;
+ }
+ }
+
+ // we are disposed from within the destructor of our shell, so now the shell pointer is invalid ....
+ m_pShell = NULL;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::InvalidateSlot(sal_Int16 nId, sal_Bool bWithItem, sal_Bool bWithId)
+{
+ ::osl::MutexGuard aGuard(m_aInvalidationSafety);
+ if (m_nLockSlotInvalidation)
+ {
+ m_arrInvalidSlots.Insert(nId, m_arrInvalidSlots.Count());
+ BYTE nFlags = (bWithItem ? 0x02 :0) + (bWithId ? 0x01 : 0);
+ m_arrInvalidSlots_Flags.Insert(nFlags, m_arrInvalidSlots_Flags.Count());
+ }
+ else
+ if (nId)
+ SFX_BINDINGS().Invalidate(nId, bWithItem, bWithId);
+ else
+ SFX_BINDINGS().InvalidateShell(*m_pShell);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::LockSlotInvalidation(sal_Bool bLock)
+{
+ ::osl::MutexGuard aGuard(m_aInvalidationSafety);
+ DBG_ASSERT(bLock || m_nLockSlotInvalidation>0, "FmXFormShell::LockSlotInvalidation : invalid call !");
+
+ if (bLock)
+ ++m_nLockSlotInvalidation;
+ else if (!--m_nLockSlotInvalidation)
+ {
+ // alles, was sich waehrend der gelockten Phase angesammelt hat, (asynchron) invalidieren
+ if (!m_nInvalidationEvent)
+ m_nInvalidationEvent = Application::PostUserEvent(LINK(this, FmXFormShell, OnInvalidateSlots));
+ }
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormShell, OnInvalidateSlots, void*, EMPTYARG)
+{
+ ::osl::MutexGuard aGuard(m_aInvalidationSafety);
+ m_nInvalidationEvent = 0;
+
+ DBG_ASSERT(m_arrInvalidSlots.Count() == m_arrInvalidSlots_Flags.Count(),
+ "FmXFormShell::OnInvalidateSlots : inconsistent slot arrays !");
+ BYTE nFlags;
+ for (sal_Int16 i=0; i<m_arrInvalidSlots.Count(); ++i)
+ {
+ nFlags = m_arrInvalidSlots_Flags[i];
+
+ if (m_arrInvalidSlots[i])
+ SFX_BINDINGS().Invalidate(m_arrInvalidSlots[i], (nFlags & 0x02), (nFlags & 0x01));
+ else
+ SFX_BINDINGS().InvalidateShell(*m_pShell);
+ }
+
+ m_arrInvalidSlots.Remove(0, m_arrInvalidSlots.Count());
+ m_arrInvalidSlots_Flags.Remove(0, m_arrInvalidSlots_Flags.Count());
+ return 0L;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::ForceUpdateSelection(sal_Bool bAllowInvalidation)
+{
+ if (IsSelectionUpdatePending())
+ {
+ m_aMarkTimer.Stop();
+
+ // die Invalidierung der Slots, die implizit von SetSelection besorgt wird, eventuell abschalten
+ if (!bAllowInvalidation)
+ LockSlotInvalidation(sal_True);
+
+ SetSelection(m_pShell->GetFormView()->GetMarkList());
+
+ if (!bAllowInvalidation)
+ LockSlotInvalidation(sal_False);
+ }
+}
+
+//------------------------------------------------------------------------------
+PopupMenu* FmXFormShell::GetConversionMenu()
+{
+ PopupMenu* pNewMenu = new PopupMenu(SVX_RES(RID_FMSHELL_CONVERSIONMENU));
+
+ ImageList aImageList( SVX_RES(RID_SVXIMGLIST_FMEXPL) );
+ for (int i=0; i<sizeof(nConvertSlots)/sizeof(nConvertSlots[0]); ++i)
+ {
+ // das entsprechende Image dran
+ pNewMenu->SetItemImage(nConvertSlots[i], aImageList.GetImage(nCreateSlots[i]));
+ }
+
+ return pNewMenu;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::IsControlConversionSlot(sal_uInt16 nSlotId)
+{
+ for (int i=0; i<sizeof(nConvertSlots)/sizeof(nConvertSlots[0]); ++i)
+ if (nConvertSlots[i] == nSlotId)
+ return sal_True;
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::ExecuteControlConversionSlot(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>& xContext, sal_uInt16 nSlotId)
+{
+ for (int i=0; i<sizeof(nConvertSlots)/sizeof(nConvertSlots[0]); ++i)
+ {
+ if (nConvertSlots[i] == nSlotId)
+ return ConvertControlTo(xContext, nObjectTypes[i]);
+ }
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::IsConversionPossible(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xContext, sal_Int16 nConversionSlot)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo> xInfo(xContext, ::com::sun::star::uno::UNO_QUERY);
+ if (!xInfo.is())
+ return sal_False;
+
+ sal_Int16 nObjectType = getControlTypeByObject(xInfo);
+
+ if ((OBJ_FM_HIDDEN == nObjectType) || (OBJ_FM_CONTROL == nObjectType) || (OBJ_FM_GRID == nObjectType))
+ return sal_False; // hiddens koennen nicht konvertiert werden
+
+ DBG_ASSERT(sizeof(nConvertSlots)/sizeof(nConvertSlots[0]) == sizeof(nObjectTypes)/sizeof(nObjectTypes[0]),
+ "FmXFormShell::IsConversionPossible : nConvertSlots & nObjectTypes must have the same size !");
+
+ for (sal_Int16 i=0; i<sizeof(nConvertSlots)/sizeof(nConvertSlots[0]); ++i)
+ if (nConvertSlots[i] == nConversionSlot)
+ return nObjectTypes[i] != nObjectType;
+
+ return sal_True; // alle anderen Slots nehmen wir als gueltig an
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::CheckControlConversionSlots(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xContext, Menu& rMenu)
+{
+ for (sal_Int16 i=0; i<rMenu.GetItemCount(); ++i)
+ // der Context ist schon von einem Typ, der dem Eitnrag entspricht -> disable
+ rMenu.EnableItem(rMenu.GetItemId(i), IsConversionPossible(xContext, rMenu.GetItemId(i)));
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::ConvertControlTo(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>& xModel, sal_uInt16 nTargetObjectId)
+{
+ if (!xModel.is())
+ // das wuerde ausser einem Performance-Verlust nix machen, aber trotzdem ...
+ return sal_False;
+
+ FmFormPage* pCurrentPage = m_pShell->GetCurPage();
+
+ SdrUnoObj* pFound = NULL;
+ for (int i=0; i<pCurrentPage->GetObjCount(); ++i)
+ {
+ SdrObject* pCurrent = pCurrentPage->GetObj(i);
+
+ // wenn das Ding eine Gruppierung ist -> durchiterieren
+ SdrObjListIter* pGroupIterator = NULL;
+ if (pCurrent->IsGroupObject())
+ {
+ pGroupIterator = new SdrObjListIter(*pCurrent->GetSubList());
+ pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL;
+ }
+
+ while (pCurrent)
+ {
+ if (pCurrent->IsUnoObj())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent> xCurrent(((SdrUnoObj*)pCurrent)->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if ((::com::sun::star::form::XFormComponent*)xCurrent.get() == (::com::sun::star::form::XFormComponent*)xModel.get())
+ break;
+ }
+
+ if (pGroupIterator) // ich iteriere gerade durch eine Gruppe von Controls
+ pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL;
+ else
+ pCurrent = NULL;
+ }
+ delete pGroupIterator;
+
+ if (pCurrent)
+ {
+ pFound = (SdrUnoObj*)pCurrent;
+ break;
+ }
+ }
+
+ if (!pFound)
+ return sal_False;
+
+ ::rtl::OUString uNewName(getServiceNameByControlType(nTargetObjectId));
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> xNewModel(::utl::getProcessServiceFactory()->createInstance(uNewName), ::com::sun::star::uno::UNO_QUERY);
+ if (!xNewModel.is())
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> xOldModel(pFound->GetUnoControlModel());
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo> xModelInfo(xOldModel, ::com::sun::star::uno::UNO_QUERY);
+ sal_Int16 nOldModelType = xModelInfo.is() ? getControlTypeByObject(xModelInfo) : OBJ_FM_CONTROL;
+
+ // Properties uebertragen
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xOldSet(xOldModel, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xNewSet(xNewModel, ::com::sun::star::uno::UNO_QUERY);
+
+ String sLanguage, sCountry;
+ ConvertLanguageToIsoNames(Application::GetAppInternational().GetLanguage(), sLanguage, sCountry);
+ ::com::sun::star::lang::Locale aNewLanguage(sLanguage, sCountry, ::rtl::OUString());
+ ::utl::TransferFormComponentProperties(xOldSet, xNewSet, aNewLanguage);
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor> aOldScripts;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xChild(xOldModel, ::com::sun::star::uno::UNO_QUERY);
+ if (xChild.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xParent(xChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+
+ // remember old script events
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager> xEvManager(xChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (xParent.is() && xEvManager.is())
+ {
+ sal_Int32 nIndex = getElementPos(xParent, xOldModel);
+ if (nIndex>=0 && nIndex<xParent->getCount())
+ aOldScripts = xEvManager->getScriptEvents(nIndex);
+ }
+
+ // replace the mdoel within the parent container
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> xNameParent(xChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (xNameParent.is())
+ {
+ // the form container works with FormComponents
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent> xComponent(xNewModel, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xComponent.is(), "FmXFormShell::ConvertControlTo : the new model is no form component !");
+ ::com::sun::star::uno::Any aNewModel(::com::sun::star::uno::makeAny(xComponent));
+ try
+ {
+ DBG_ASSERT(::utl::hasProperty(FM_PROP_NAME, xOldSet),
+ "FmXFormShell::ConvertControlTo : one of the models is invalid !");
+ xNameParent->replaceByName(::utl::getString(xOldSet->getPropertyValue(FM_PROP_NAME)), aNewModel);
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmXFormShell::ConvertControlTo : could not replace the model !");
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xNewComponent(xNewModel, ::com::sun::star::uno::UNO_QUERY);
+ if (xNewComponent.is())
+ xNewComponent->dispose();
+ return sal_False;
+ }
+
+ }
+ }
+
+ // special handling for the LabelControl-property : can only be set when the model is placed
+ // within the forms hierarchy
+ if (::utl::hasProperty(FM_PROP_CONTROLLABEL, xOldSet) && ::utl::hasProperty(FM_PROP_CONTROLLABEL, xNewSet))
+ {
+ try
+ {
+ xNewSet->setPropertyValue(FM_PROP_CONTROLLABEL, xOldSet->getPropertyValue(FM_PROP_CONTROLLABEL));
+ }
+ catch(...)
+ {
+ }
+
+ }
+
+ // neues Model setzen
+ pFound->SetChanged();
+ pFound->SetUnoControlModel(xNewModel);
+
+ // transfer script events
+ // (do this _after_ SetUnoControlModel as we need the new (implicitly created) control)
+ if (aOldScripts.getLength())
+ {
+ // das Control zum Model suchen
+ SdrPageView* pPageView = m_pShell->GetFormView()->GetPageViewPvNum(0);
+ DBG_ASSERT(pPageView->GetWinList().GetCount() > 0, "FmXFormShell::ConvertControlTo : no SdrPageViewWinRecs");
+ const SdrPageViewWinRec& rViewWinRec = pPageView->GetWinList()[0];
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> xControlContainer(rViewWinRec.GetControlContainerRef());
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > aControls( xControlContainer->getControls() );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>* pControls = aControls.getConstArray();
+
+ sal_uInt32 nLen = aControls.getLength();
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> xControl;
+ for (sal_uInt32 i=0 ; i<nLen; ++i)
+ {
+ if (pControls[i]->getModel() == xNewModel)
+ {
+ xControl = pControls[i];
+ break;
+ }
+ }
+ TransferEventScripts(xNewModel, xControl, aOldScripts);
+ }
+
+ // create an undo action
+ FmFormModel* pModel = m_pShell->GetFormModel();
+ DBG_ASSERT(pModel != NULL, "FmXFormShell::ConvertControlTo : my shell has no model !");
+ if (pModel)
+ pModel->AddUndo(new FmUndoModelReplaceAction(*pModel, pFound, xOldModel));
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::LoopGrids(sal_Int16 nWhat)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> xControlModels(m_xActiveForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xControlModels.is())
+ for (sal_Int16 i=0; i<xControlModels->getCount(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xModelSet(*(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)xControlModels->getByIndex(i).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xModelSet.is())
+ continue;
+
+ if (!::utl::hasProperty(FM_PROP_CLASSID, xModelSet))
+ continue;
+ sal_Int16 nClassId = ::utl::getINT16(xModelSet->getPropertyValue(FM_PROP_CLASSID));
+ if (::com::sun::star::form::FormComponentType::GRIDCONTROL != nClassId)
+ continue;
+
+ if (!::utl::hasProperty(FM_PROP_CURSORCOLOR, xModelSet) || !::utl::hasProperty(FM_PROP_ALWAYSSHOWCURSOR, xModelSet) || !::utl::hasProperty(FM_PROP_DISPLAYSYNCHRON, xModelSet))
+ continue;
+
+ switch (nWhat & GA_SYNC_MASK)
+ {
+ case GA_DISABLE_SYNC:
+ {
+ sal_Bool bB(sal_False);
+ xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, ::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+ }
+ break;
+ case GA_FORCE_SYNC:
+ {
+ ::com::sun::star::uno::Any aOldVal( xModelSet->getPropertyValue(FM_PROP_DISPLAYSYNCHRON) );
+ sal_Bool bB(sal_True);
+ xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, ::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+ xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, aOldVal);
+ }
+ break;
+ case GA_ENABLE_SYNC:
+ {
+ sal_Bool bB(sal_True);
+ xModelSet->setPropertyValue(FM_PROP_DISPLAYSYNCHRON, ::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+ }
+ break;
+ }
+
+ if (nWhat & GA_DISABLE_ROCTRLR)
+ {
+ sal_Bool bB(sal_False);
+ xModelSet->setPropertyValue(FM_PROP_ALWAYSSHOWCURSOR, ::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState> xModelPropState(xModelSet, ::com::sun::star::uno::UNO_QUERY);
+ if (xModelPropState.is())
+ xModelPropState->setPropertyToDefault(FM_PROP_CURSORCOLOR);
+ else
+ xModelSet->setPropertyValue(FM_PROP_CURSORCOLOR, ::com::sun::star::uno::Any()); // this should be the default
+ }
+ else if (nWhat & GA_ENABLE_ROCTRLR)
+ {
+ sal_Bool bB(sal_True);
+ xModelSet->setPropertyValue(FM_PROP_ALWAYSSHOWCURSOR, ::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+ xModelSet->setPropertyValue(FM_PROP_CURSORCOLOR, ::com::sun::star::uno::makeAny(sal_Int32(COL_LIGHTRED)));
+ }
+ }
+
+/* // alle Controls der Page durchiterieren und nach GridControls suchen ...
+ SdrPageView* pCurPageView = m_pShell->GetFormView()->GetPageViewPvNum(0);
+ // deren ViewWinRec-Liste, daraus das erste Element
+ DBG_ASSERT(pCurPageView->GetWinList().GetCount() > 0, "FmXFormShell::LoopGrids : unexpected : no SdrPageViewWinRecs");
+ const SdrPageViewWinRec& rViewWinRec = pCurPageView->GetWinList()[0];
+ // von dem bekomme ich alle Controls ...
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> xControlContainer( rViewWinRec.GetControlContainerRef());
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > seqControls = xControlContainer->getControls();
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>* pControls = seqControls.getConstArray();
+ // ... die ich dann durchsuchen kann
+ for (int i=0; i<seqControls.getLength(); ++i)
+ {
+ ::com::sun::star::uno::Reference<XGridPeer> xGridPeer(pControls[i]->getPeer(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xGridPeer.is())
+ continue;
+
+ FmXGridPeer* pPeer = (FmXGridPeer*)xGridPeer->getImplementation(FmXGridPeer_getReflection());
+ if (!pPeer)
+ continue;
+
+ FmGridControl* pGrid = (FmGridControl*)pPeer->GetWindow();
+ // what to do ?
+ // display synchronisation ?
+ switch (nWhat & GA_SYNC_MASK)
+ {
+ case GA_DISABLE_SYNC:
+ pGrid->setDisplaySynchron(sal_False); break;
+ case GA_FORCE_SYNC:
+ pGrid->forceSyncDisplay(); break;
+ case GA_ENABLE_SYNC:
+ pGrid->setDisplaySynchron(sal_True); break;
+ }
+
+ if (nWhat & GA_DISABLE_ROCTRLR)
+ pGrid->forceROController(sal_False);
+ else if (nWhat & GA_ENABLE_ROCTRLR)
+ pGrid->forceROController(sal_True);
+ }
+*/
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::ExecuteSearch()
+{
+ UniString sTestContexts;
+ // m_arrSearchContexts.Remove(0, m_arrSearchContexts.Count());
+ m_arrSearchContexts.clear();
+
+ // eine Sammlung aller (logischen) Formulare
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xAllForms(m_pShell->GetCurPage()->GetForms(),::com::sun::star::uno::UNO_QUERY);
+ // ::fml::convertIFace((XInterface*),xAllForms);
+ CollectFormContexts(xAllForms, String(), sTestContexts);
+ sTestContexts.EraseLeadingChars(';');
+
+ // hier sind jetzt dummerweise noch alle Forms drin, die ueberhaupt keine gueltigen Controls enthalten
+ // um das auszufiltern, benutze ich einfach meinen OnSearchContextRequest-Handler, der genau die gueltigen Controls einer Form sammelt
+ FmFormArray::reverse_iterator aIter = m_arrSearchContexts.rbegin();
+ sal_Int32 i = m_arrSearchContexts.size();
+ for (; aIter != m_arrSearchContexts.rend(); ++aIter,i--)
+ {
+ FmSearchContext fmscTest;
+ fmscTest.nContext = i-1;
+ sal_uInt32 lValidControls = LINK(this, FmXFormShell, OnSearchContextRequest).Call(&fmscTest);
+ if (lValidControls == 0)
+ {
+ m_arrSearchContexts.erase(aIter.base()-1);
+ sTestContexts.SetToken(i-1, ';', String());
+ }
+ }
+
+ // jetzt enthaelt die Context-Liste noch ein paar Leer-Token
+ UniString strRealContexts,strCurrentToken;
+ for (i=0; i<sTestContexts.GetTokenCount(';'); ++i)
+ {
+ strCurrentToken = sTestContexts.GetToken(i);
+ if (strCurrentToken.Len() != 0)
+ {
+ strRealContexts += ';';
+ strRealContexts += strCurrentToken;
+ }
+ }
+ strRealContexts.EraseLeadingChars(';');
+
+ if (m_arrSearchContexts.size() == 0)
+ { // es gibt keine Controls, die alle Bedingungen fuer eine Suche erfuellen
+ ErrorBox(NULL, WB_OK, SVX_RESSTR(RID_STR_NODATACONTROLS)).Execute();
+ return;
+ }
+
+ // jetzt brauche ich noch einen 'initial context'
+ sal_Int16 nInitialContext = 0;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xActiveForm( getActiveForm());
+ for (i=0; i<m_arrSearchContexts.size(); ++i)
+ {
+ if (m_arrSearchContexts.at(i) == xActiveForm)
+ {
+ nInitialContext = i;
+ break;
+ }
+ }
+
+ // wenn der Dialog initial den Text des aktiven Controls anbieten soll, muss dieses ein XTextComponent-Interface habe,
+ // ausserdem macht das nur Sinn, wenn das aktuelle Feld auch an ein Tabellen- (oder was-auch-immer-)Feld gebunden ist
+ UniString strActiveField;
+ UniString strInitialText;
+ // ... das bekomme ich von meinem FormController
+ DBG_ASSERT(m_xActiveController.is(), "FmXFormShell::ExecuteSearch : no active controller !");
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> xActiveControl( m_xActiveController->getCurrentControl());
+ if (xActiveControl.is())
+ {
+ // das Control kann mir sein Model sagen ...
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> xActiveModel( xActiveControl->getModel());
+ DBG_ASSERT(xActiveModel.is(), "FmXFormShell::ExecuteSearch : active control has no model !");
+
+ // das Model frage ich nach der ControlSource-Eigenschaft ...
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xProperties(xActiveControl->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (::utl::hasProperty(FM_PROP_CONTROLSOURCE, xProperties) && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xProperties))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xField( *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)(xProperties->getPropertyValue(FM_PROP_BOUNDFIELD).getValue()));
+ if (xField.is()) // (nur wenn das Ding wirklich gebunden ist)
+ {
+ // und das Control selber nach einem TextComponent-Interface (damit ich mir dort den Text abholen kann)
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent> xText(xActiveControl, ::com::sun::star::uno::UNO_QUERY);
+ if (xText.is())
+ {
+ strActiveField = getLabelName(xProperties).getStr();
+ strInitialText = xText->getText().getStr();
+ }
+ }
+ }
+ else
+ {
+ // das Control selber hat keine ControlSource, aber vielleicht ist es ein GridControl
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGrid> xGrid(xActiveControl, ::com::sun::star::uno::UNO_QUERY);
+ if (xGrid.is())
+ {
+ // fuer strActiveField brauche ich die die ControlSource der Column, dafuer den Columns-Container, dafuer die
+ // GridPeer
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridPeer> xGridPeer(xActiveControl->getPeer(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xColumns;
+ if (xGridPeer.is())
+ xColumns = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>(xGridPeer->getColumns(),::com::sun::star::uno::UNO_QUERY);
+
+ sal_Int16 nViewCol = xGrid->getCurrentColumnPosition();
+ sal_Int16 nModelCol = GridView2ModelPos(xColumns, nViewCol);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCurrentCol( xColumns.is() ? *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)xColumns->getByIndex(nModelCol).getValue() : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>(NULL));
+ if (xCurrentCol.is())
+ strActiveField = ::utl::getString(xCurrentCol->getPropertyValue(FM_PROP_LABEL)).getStr();
+
+ // the text fo the current column
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xColControls(xGridPeer, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xCurControl(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)xColControls->getByIndex(nViewCol).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ ::rtl::OUString sInitialText;
+ if (IsSearchableControl(xCurControl, &sInitialText))
+ strInitialText = sInitialText.getStr();
+ }
+ }
+ }
+
+ // um eventuelle GridControls, die ich kenne, kuemmern
+ LoopGrids(GA_DISABLE_SYNC /*| GA_ENABLE_ROCTRLR*/);
+
+ // jetzt bin ich reif fuer den Dialog
+ FmSearchDialog dlg(NULL, strInitialText, strRealContexts, nInitialContext, LINK(this, FmXFormShell, OnSearchContextRequest),
+ FmSearchDialog::SM_ALLOWSCHEDULE);
+ // wenn die potentiellen Deadlocks, die durch die Benutzung des Solar-Mutex in MTs VCLX...-Klasen entstehen, irgendwann mal
+ // ausgeraeumt sind, sollte hier ein SM_USETHREAD rein, denn die Suche in einem eigenen Thread ist doch etwas fluessiger
+ // sollte allerdings irgendwie von dem unterliegenden Cursor abhaengig gemacht werden, DAO zum Beispiel ist nicht thread-sicher
+
+ dlg.SetActiveField(strActiveField);
+
+ dlg.SetFoundHandler(LINK(this, FmXFormShell, OnFoundData));
+ dlg.SetCanceledNotFoundHdl(LINK(this, FmXFormShell, OnCanceledNotFound));
+ dlg.Execute();
+
+ // GridControls wieder restaurieren
+ LoopGrids(GA_ENABLE_SYNC | GA_DISABLE_ROCTRLR);
+
+ m_pShell->GetFormView()->UnMarkAll(m_pShell->GetFormView()->GetPageViewPvNum(0));
+ // da ich in OnFoundData (fals ich dort war) Controls markiert habe
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::GetY2KState(sal_uInt16& n)
+{
+ if (m_pShell->IsDesignMode())
+ // im Design-Modus (ohne aktive Controls) soll sich das Haupt-Dokument darum kuemmern
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm( getActiveForm());
+ if (!xForm.is())
+ // kein aktuelles Formular (also insbesondere kein aktuelles Control) -> das Haupt-Dokument soll sich kuemmern
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet> xDB(xForm, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xDB.is(), "FmXFormShell::GetY2KState : current form has no dbform-interface !");
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> xSupplier( ::utl::getNumberFormats(::utl::getConnection(xDB), sal_False));
+ if (xSupplier.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(xSupplier->getNumberFormatSettings());
+ if (xSet.is())
+ {
+ try
+ {
+ ::com::sun::star::uno::Any aVal( xSet->getPropertyValue(::rtl::OUString::createFromAscii("TwoDigitDateStart")) );
+ aVal >>= n;
+ return sal_True;
+ }
+ catch(...)
+ {
+ }
+
+ }
+ }
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::SetY2KState(sal_uInt16 n)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xActiveForm( getActiveForm());
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet> xDB(xActiveForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xDB.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> xSupplier( ::utl::getNumberFormats(::utl::getConnection(xDB), sal_False));
+ if (xSupplier.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(xSupplier->getNumberFormatSettings());
+ if (xSet.is())
+ {
+ try
+ {
+ ::com::sun::star::uno::Any aVal;
+ aVal <<= n;
+ xSet->setPropertyValue(::rtl::OUString::createFromAscii("TwoDigitDateStart"), aVal);
+ }
+ catch(...)
+ {
+ }
+
+ }
+ return;
+ }
+ }
+
+ // kein aktives Formular gefunden -> alle aktuell vorhandenen Formulare durchiterieren
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xCurrentForms( m_xForms);
+ if (!xCurrentForms.is())
+ { // im alive-Modus sind meine Forms nicht gesetzt, wohl aber die an der Page
+ if (m_pShell->GetCurPage())
+ xCurrentForms = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>(m_pShell->GetCurPage()->GetForms(), ::com::sun::star::uno::UNO_QUERY);
+ }
+ if (!xCurrentForms.is())
+ return;
+
+ ::utl::IndexAccessIterator aIter(xCurrentForms);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xCurrentElement( aIter.Next());
+ while (xCurrentElement.is())
+ {
+ // ist das aktuelle Element eine DatabaseForm ?
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet> xDB(xCurrentElement, ::com::sun::star::uno::UNO_QUERY);
+ if (xDB.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> xSupplier( ::utl::getNumberFormats(::utl::getConnection(xDB), sal_False));
+ if (!xSupplier.is())
+ continue;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(xSupplier->getNumberFormatSettings());
+ if (xSet.is())
+ {
+ try
+ {
+ ::com::sun::star::uno::Any aVal;
+ aVal <<= n;
+ xSet->setPropertyValue(::rtl::OUString::createFromAscii("TwoDigitDateStart"), aVal);
+ }
+ catch(...)
+ {
+ }
+
+ }
+ }
+ xCurrentElement = aIter.Next();
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::CanMoveLeft(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController)
+{
+ if (!xController.is())
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(xController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ return CanMoveLeft(xSet);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::CanMoveLeft(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xControllerModel)
+{
+ if (!_xControllerModel.is())
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xCursor(_xControllerModel, ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bIsNew = ::utl::getBOOL(_xControllerModel->getPropertyValue(FM_PROP_ISNEW));
+ sal_Int32 nCount = ::utl::getINT32(_xControllerModel->getPropertyValue(FM_PROP_ROWCOUNT));
+ return nCount && (!xCursor->isFirst() || bIsNew);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::CanMoveRight(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController)
+{
+ if (!xController.is())
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(xController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ return CanMoveRight(xSet);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::CanMoveRight(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xControllerModel)
+{
+ if (!_xControllerModel.is())
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xCursor(_xControllerModel, ::com::sun::star::uno::UNO_QUERY);
+ sal_Int32 nCount = ::utl::getINT32(_xControllerModel->getPropertyValue(FM_PROP_ROWCOUNT));
+ sal_Bool bIsModified = ::utl::getBOOL(_xControllerModel->getPropertyValue(FM_PROP_ISMODIFIED));
+ sal_Bool bIsNew = ::utl::getBOOL(_xControllerModel->getPropertyValue(FM_PROP_ISNEW));
+ sal_Bool bCanInsert = ::utl::canInsert(_xControllerModel);
+
+ return (
+ ( nCount
+ && !xCursor->isLast()
+ && !bIsNew
+ )
+ )
+ ||
+ (
+ bCanInsert && (!bIsNew || bIsModified)
+ );
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmXFormShell::CommitCurrent(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController)
+{
+ // muß noch ein Control commitet werden
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> xActiveControl(_xController->getCurrentControl());
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundControl> xLockingTest(xActiveControl, ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock();
+ sal_Bool bResult = sal_True;
+ if (xActiveControl.is() && !bControlIsLocked)
+ {
+ // zunaechst das Control fragen ob es das IFace unterstuetzt
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent> xBound(xActiveControl, ::com::sun::star::uno::UNO_QUERY);
+ if (!xBound.is())
+ xBound = ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent>(xActiveControl->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xBound.is() && !xBound->commit())
+ bResult = sal_False;
+ }
+ return bResult;
+}
+
+//------------------------------------------------------------------------
+void FmXFormShell::ResetCurrent(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> xActiveControl( _xController->getCurrentControl());
+ if (xActiveControl.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XReset> xReset(xActiveControl->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xReset.is())
+ xReset->reset();
+ }
+}
+
+//------------------------------------------------------------------------
+void FmXFormShell::ResetAll(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& _xForm)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xContainer(_xForm, ::com::sun::star::uno::UNO_QUERY);
+ for (sal_Int16 nBothViews=0; nBothViews<2; ++nBothViews)
+ {
+ if (xContainer.is())
+ {
+ for (sal_Int32 i=0; i<xContainer->getCount(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XReset> xReset(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)xContainer->getByIndex(i).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (xReset.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xAsForm(xReset, ::com::sun::star::uno::UNO_QUERY);
+ if (!xAsForm.is()) // no resets on the form
+ xReset->reset();
+ }
+ }
+ }
+
+ xContainer = NULL;
+ if ((nBothViews == 0) && (getInternalForm(_xForm) == m_xExternalDisplayedForm))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> xExternalFormController(m_xExternalViewController, ::com::sun::star::uno::UNO_QUERY);
+ if (xExternalFormController.is())
+ xContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>(xExternalFormController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>& _xCursor, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xSet, sal_Bool& _rRecordInserted)
+{
+ _rRecordInserted = sal_False;
+ if (!_xCursor.is())
+ return sal_False;
+
+ _xSet = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>(_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (!_xSet.is())
+ return sal_False;
+
+ // muß gespeichert werden ?
+ sal_Bool bIsNew = ::utl::getBOOL(_xSet->getPropertyValue(FM_PROP_ISNEW));
+ sal_Bool bIsModified = ::utl::getBOOL(_xSet->getPropertyValue(FM_PROP_ISMODIFIED));
+ sal_Bool bResult = !bIsModified;
+ if (bIsModified)
+ {
+ try
+ {
+ if (bIsNew)
+ _xCursor->insertRow();
+ else
+ _xCursor->updateRow();
+ bResult = sal_True;
+ }
+ catch(...)
+ {
+ }
+
+ _rRecordInserted = bIsNew && bResult;
+ }
+ return bResult;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>& xCursor,
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xSet,
+ sal_Bool& rRecordInserted)
+
+{
+ rRecordInserted = sal_False;
+
+ if (!xController.is())
+ return sal_False;
+
+ xCursor = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>(xController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ return SaveModified(xCursor, xSet, rRecordInserted);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::IsModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController)
+{
+ if (!xController.is())
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(xController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xSet.is())
+ return sal_False;
+
+ // Modifiziert
+ if (::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISMODIFIED)))
+ return sal_True;
+
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController, sal_Bool bCommit)
+{
+ if (!bCommit || CommitCurrent(xController))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate> xCursor;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet;
+ sal_Bool bInserted;
+ return SaveModified(xController,
+ xCursor,
+ xSet,
+ bInserted);
+ }
+ else
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::MoveRight(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>& _xCursor)
+{
+ if (!_xCursor.is())
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xReadCursor(_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xReadCursor.is(), "FmXFormShell::MoveRight : invalid cursor !");
+ sal_Bool bInserted;
+
+ sal_Bool bSuccess = SaveModified(_xCursor, xSet, bInserted);
+ if (bSuccess)
+ {
+ try
+ {
+ if (bInserted)
+ {
+ // go to insert row
+ _xCursor->moveToInsertRow();
+ }
+ else
+ {
+ if (xReadCursor->isLast())
+ _xCursor->moveToInsertRow();
+ else
+ xReadCursor->next();
+ }
+ }
+ catch(...)
+ {
+ }
+
+ }
+ return bSuccess;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::MoveRight(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController)
+{
+ if (!xController.is())
+ return sal_False;
+
+ return MoveRight(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>(xController->getModel(), ::com::sun::star::uno::UNO_QUERY));
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::MoveLeft(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>& _xCursor)
+{
+ if (!_xCursor.is())
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xReadCursor(_xCursor, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xReadCursor.is(), "FmXFormShell::MoveLeft : invalid cursor !");
+ sal_Bool bInserted;
+
+ sal_Bool bSuccess = SaveModified(_xCursor, xSet, bInserted);
+
+ if (bSuccess)
+ {
+ try
+ {
+ if (bInserted)
+ {
+ // retrieve the bookmark of the new record and move previous to that bookmark
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate> xLocate(xReadCursor, ::com::sun::star::uno::UNO_QUERY);
+ xLocate->moveRelativeToBookmark(xLocate->getBookmark(), -1);
+ }
+ else if (::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW)))
+ {
+ // we assume that the inserted record is now the last record in the
+ // result set
+ xReadCursor->last();
+ }
+ else
+ xReadCursor->previous();
+ }
+ catch(...)
+ {
+ }
+
+ }
+ return bSuccess;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::MoveLeft(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController)
+{
+ if (!xController.is())
+ return sal_False;
+
+ return MoveLeft(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>(xController->getModel(), ::com::sun::star::uno::UNO_QUERY));
+}
+
+// ::com::sun::star::sdbc::XRowSetListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormShell::cursorMoved(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_bActiveModified = sal_False;
+ SFX_BINDINGS().Invalidate(DatabaseSlotMap);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::CloseExternalFormViewer()
+{
+ if (!m_xExternalViewController.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame> xExternalViewFrame( m_xExternalViewController->getFrame());
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> xCommLink(xExternalViewFrame, ::com::sun::star::uno::UNO_QUERY);
+ if (!xCommLink.is())
+ return;
+
+ ::com::sun::star::util::URL aCloseUrl;
+ // tool windows (like the task local beamer used for the grid) are assumed to close when dispatching an empty ::com::sun::star::util::URL
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> xCloser( xCommLink->queryDispatch(aCloseUrl, ::rtl::OUString::createFromAscii(""), ::com::sun::star::frame::FrameSearchFlag::SELF | ::com::sun::star::frame::FrameSearchFlag::CHILDREN));
+ DBG_ASSERT(xCloser.is(), "FmXFormShell::CloseExternalFormViewer : don't know how to close the tool frame !");
+ if (xCloser.is())
+ xCloser->dispatch(aCloseUrl, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>());
+
+ m_xExternalViewController = NULL;
+ m_xExtViewTriggerController = NULL;
+ m_xExternalDisplayedForm = NULL;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> FmXFormShell::getInternalForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm) const
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> xExternalCtrlr(m_xExternalViewController, ::com::sun::star::uno::UNO_QUERY);
+ if (xExternalCtrlr.is() && (_xForm == xExternalCtrlr->getModel()))
+ {
+ DBG_ASSERT(m_xExternalDisplayedForm.is(), "FmXFormShell::getInternalForm : invalid external form !");
+ return m_xExternalDisplayedForm;
+ }
+ return _xForm;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> FmXFormShell::getInternalForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& _xForm) const
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> xExternalCtrlr(m_xExternalViewController, ::com::sun::star::uno::UNO_QUERY);
+ if (xExternalCtrlr.is() && (_xForm == xExternalCtrlr->getModel()))
+ {
+ DBG_ASSERT(m_xExternalDisplayedForm.is(), "FmXFormShell::getInternalForm : invalid external form !");
+ return ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>(m_xExternalDisplayedForm, ::com::sun::star::uno::UNO_QUERY);
+ }
+ return _xForm;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::ActivateDispatchers(const UniString& _sNavFormAccess, sal_Bool _bActivate)
+{
+ for ( ConstFormsDispatchersIterator aFormIter = m_aNavigationDispatcher.begin();
+ aFormIter != m_aNavigationDispatcher.end();
+ ++aFormIter
+ )
+ {
+ UniString sPath = aFormIter->first;
+
+ if (sPath == _sNavFormAccess)
+ {
+ for ( ConstSingleFormDispatchersIterator aDispIter = (*aFormIter).second.begin();
+ aDispIter < (*aFormIter).second.end();
+ ++aDispIter
+ )
+ {
+ FmFormNavigationDispatcher* pCurDispatcher = *aDispIter;
+ if (pCurDispatcher)
+ pCurDispatcher->SetActive(_bActivate);
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+UniString FmXFormShell::GetAccessPathFromForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm, const UniString& rAssumedPagePrefix) const
+{
+ UniString sReturn;
+ if (!_xForm.is())
+ return sReturn;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xForm(getInternalForm(_xForm));
+
+ sReturn = getFormComponentAccessPath(xForm);
+
+ // prepend the page ident to the path
+ UniString sPrefix( rAssumedPagePrefix );
+ if (!sPrefix.Len())
+ {
+ FmFormPage* pPage = m_pShell->GetCurPage();
+ DBG_ASSERT(pPage, "FmXFormShell::GetAccessPathFromForm : have no current page !");
+
+ if (pPage && pPage->GetImpl())
+ sPrefix = pPage->GetImpl()->GetPageId();
+ else
+ sPrefix.AssignAscii("no page");
+ }
+
+ sPrefix += '\\';
+ sPrefix += sReturn;
+ sReturn = sPrefix;
+
+ return sReturn;
+}
+
+//------------------------------------------------------------------------------
+UniString FmXFormShell::GetPageId(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm) const
+{
+ UniString sEmptyReturn;
+ FmFormModel* pModel = m_pShell->GetFormModel();
+ if (!pModel)
+ {
+ DBG_ERROR("FmXFormShell::GetPageId : have no form model !");
+ return sEmptyReturn;
+ }
+
+ // search the top level forms collection
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xTopLevelContainer( getInternalForm(_xForm));
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xAsResultSet(xTopLevelContainer, ::com::sun::star::uno::UNO_QUERY);
+ while (xAsResultSet.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xChild(xTopLevelContainer, ::com::sun::star::uno::UNO_QUERY);
+ xTopLevelContainer = xChild->getParent();
+ xAsResultSet = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(xTopLevelContainer, ::com::sun::star::uno::UNO_QUERY);
+ }
+
+ // search all pages of my model
+ for (sal_Int16 i=0; i<pModel->GetPageCount(); ++i)
+ {
+ FmFormPage* pCurrent = PTR_CAST(FmFormPage, pModel->GetPage(i));
+ if (!pCurrent)
+ continue;
+ if (pCurrent->GetForms() == xTopLevelContainer)
+ return pCurrent->GetImpl()->GetPageId();
+ }
+
+ return sEmptyReturn;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> FmXFormShell::GetPageForms(const UniString sPageId) const
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> aEmptyReturn;
+ FmFormModel* pModel = m_pShell->GetFormModel();
+ if (!pModel)
+ {
+ DBG_ERROR("FmXFormShell::GetPageForms : have no form model !");
+ return aEmptyReturn;
+ }
+
+ for (sal_uInt16 i=0; i<pModel->GetPageCount(); ++i)
+ {
+ FmFormPage* pCurrent = PTR_CAST(FmFormPage, pModel->GetPage(i));
+ if (!pCurrent)
+ continue;
+ if (pCurrent->GetImpl()->GetPageId() == sPageId)
+ return pCurrent->GetForms();
+ }
+
+ return aEmptyReturn;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::UpdateAllFormDispatchers(const UniString& _rPath)
+{
+ for ( FormsDispatchersIterator aDispIter = m_aNavigationDispatcher.begin();
+ aDispIter != m_aNavigationDispatcher.end();
+ ++aDispIter
+ )
+ {
+ UniString sThisRoundPath = aDispIter->first;
+ if (PathsInterfere(sThisRoundPath, _rPath))
+ // child or anchestor
+ {
+ SingleFormDispatchers& rDisp = (*aDispIter).second;
+ for ( SingleFormDispatchersIterator aIter = rDisp.begin();
+ aIter != rDisp.end();
+ ++aIter
+ )
+ {
+ FmFormNavigationDispatcher* pCurrent = *aIter;
+ if (pCurrent)
+ UpdateFormDispatcher(pCurrent);
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::UpdateFormDispatcher(FmFormNavigationDispatcher* _pDisp)
+{
+ sal_Bool bEnable = sal_False;
+ if (!_pDisp)
+ return;
+ // all navigation slots are disabled if the form is blocked because of a pending move
+ if (!HasPendingCursorAction(_pDisp->getForm()))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(_pDisp->getForm(), ::com::sun::star::uno::UNO_QUERY);
+ switch (_pDisp->getSlot())
+ {
+ case SID_FM_RECORD_UNDO:
+ bEnable = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISMODIFIED));
+ break;
+ case SID_FM_RECORD_PREV:
+ case SID_FM_RECORD_FIRST:
+ bEnable = CanMoveLeft(xSet);
+ break;
+ case SID_FM_RECORD_NEXT:
+ bEnable = CanMoveRight(xSet);
+ break;
+ case SID_FM_RECORD_LAST:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xCursor(xSet, ::com::sun::star::uno::UNO_QUERY);
+ sal_Int32 nCount = ::utl::getINT32(xSet->getPropertyValue(FM_PROP_ROWCOUNT));
+ bEnable = nCount && (!xCursor->isLast() || ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW)));
+ }
+ break;
+ case SID_FM_RECORD_NEW:
+ {
+ if (::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW)))
+ bEnable = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISMODIFIED));
+ else
+ bEnable = ::utl::canInsert(xSet);
+ }
+ break;
+ }
+ }
+ _pDisp->SetStatus(bEnable ? SFX_ITEM_AVAILABLE : SFX_ITEM_DISABLED, NULL);
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormShell, OnExecuteNavSlot, FmFormNavigationDispatcher*, pDispatcher)
+{
+ DBG_ASSERT(pDispatcher, "FmXFormShell::OnExecuteNavSlot : invalid argument !");
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xCursor(pDispatcher->getForm());
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate> xUpdateCursor(xCursor, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCursorSet;
+ sal_Bool bDoneSomething = sal_False;
+
+ switch (pDispatcher->getSlot())
+ {
+ case SID_FM_RECORD_UNDO:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(xCursor, ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bInserting = xSet.is() && ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW));
+ if (!bInserting)
+ xUpdateCursor->cancelRowUpdates();
+
+ ResetAll(getActiveForm());
+
+ if (bInserting) // wieder in den EinfuegeModus
+ DO_SAFE( xUpdateCursor->moveToInsertRow(); );
+
+ if (xCursor == getActiveForm())
+ {
+ m_bActiveModified = sal_False;
+ SFX_BINDINGS().Invalidate(DatabaseSlotMap);
+ }
+ }
+ break;
+ case SID_FM_RECORD_FIRST:
+ if (SaveModified(xUpdateCursor, xCursorSet, bDoneSomething))
+ {
+ DO_SAFE( xCursor->first(); );
+ }
+ break;
+ case SID_FM_RECORD_PREV:
+ MoveLeft(xUpdateCursor);
+ break;
+ case SID_FM_RECORD_NEXT:
+ MoveRight(xUpdateCursor);
+ break;
+ case SID_FM_RECORD_LAST:
+ if (SaveModified(xUpdateCursor, xCursorSet, bDoneSomething))
+ {
+ // run in an own thread if ...
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCursorProps(xCursor, ::com::sun::star::uno::UNO_QUERY);
+ // ... the data source is thread safe ...
+ sal_Bool bAllowOwnThread = ::utl::hasProperty(FM_PROP_THREADSAFE, xCursorProps) && ::utl::getBOOL(xCursorProps->getPropertyValue(FM_PROP_THREADSAFE));
+ // ... the record count is unknown
+ sal_Bool bNeedOwnThread = ::utl::hasProperty(FM_PROP_ROWCOUNTFINAL, xCursorProps) && !::utl::getBOOL(xCursorProps->getPropertyValue(FM_PROP_ROWCOUNTFINAL));
+
+
+ if (bNeedOwnThread && bAllowOwnThread)
+ DoAsyncCursorAction(pDispatcher->getForm(), FmXFormShell::CA_MOVE_TO_LAST);
+ else
+ DO_SAFE( xCursor->last(); );
+ }
+ break;
+ case SID_FM_RECORD_NEW:
+ if (SaveModified(xUpdateCursor, xCursorSet, bDoneSomething))
+ {
+ DO_SAFE( xUpdateCursor->moveToInsertRow(); );
+ }
+ break;
+ }
+ UpdateAllFormDispatchers(pDispatcher->getFormAccessPath());
+ return 0L;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::setActiveController(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController)
+{
+ if (m_bChangingDesignMode)
+ return;
+ DBG_ASSERT(!m_pShell->IsDesignMode(), "nur im alive mode verwenden");
+
+ // Ist die Routine ein zweites Mal gerufen worden,
+ // dann sollte der Focus nicht mehr umgesetzt werden
+ if (m_bInActivate)
+ {
+ m_bSetFocus = xController != m_xActiveController;
+ return;
+ }
+
+ if (xController != m_xActiveController)
+ {
+ // if there is a async cursor action running we have to restore the locking state of the controls of the old controller
+ if (HasPendingCursorAction(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(m_xActiveForm, ::com::sun::star::uno::UNO_QUERY)))
+ restoreControlLocks();
+
+ ::osl::ClearableMutexGuard aGuard(m_aAsyncSafety);
+ // switch all nav dispatchers belonging to the form of the current nav controller to 'non active'
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xNavigationForm;
+ if (m_xNavigationController.is())
+ xNavigationForm = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(m_xNavigationController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xNavigationForm.is())
+ ActivateDispatchers(GetAccessPathFromForm(xNavigationForm), sal_False);
+ aGuard.clear();
+
+ m_bInActivate = sal_True;
+
+ // check if the 2 controllers serve different forms
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xOldForm;
+ if (m_xActiveController.is())
+ xOldForm = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(m_xActiveController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xNewForm;
+ if (xController.is())
+ xNewForm = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(xController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ xOldForm = getInternalForm(xOldForm);
+ xNewForm = getInternalForm(xNewForm);
+ sal_Bool bNeedSave = (xOldForm != xNewForm);
+
+ if (m_xActiveController.is() && bNeedSave)
+ {
+ // beim Wechsel des Controllers den Inhalt speichern, ein Commit
+ // wurde bereits ausgefuehrt
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> xCurrentControl(m_xActiveController->getCurrentControl());
+ if (xCurrentControl.is())
+ {
+ m_bSetFocus = sal_True;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ if (IsModified(m_xActiveController))
+ {
+ sal_Bool bIsNew = ::utl::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW));
+ sal_Bool bResult = sal_False;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate> xCursor(getActiveForm(), ::com::sun::star::uno::UNO_QUERY);
+ try
+ {
+ if (bIsNew)
+ xCursor->insertRow();
+ else
+ xCursor->updateRow();
+ bResult = sal_True;
+ }
+ catch(...)
+ {
+ }
+
+
+ // Konnte nicht gespeichert werden, dann den Focus wieder zurueck setzen
+ if (!bResult && m_bSetFocus)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> xWindow(xCurrentControl, ::com::sun::star::uno::UNO_QUERY);
+ xWindow->setFocus();
+ m_bInActivate = sal_False;
+ return;
+ }
+
+ if (bResult && bIsNew)
+ {
+ DO_SAFE( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(xCursor, ::com::sun::star::uno::UNO_QUERY)->last(); );
+ }
+ }
+ }
+ }
+
+ stopListening();
+
+ m_xActiveController = xController;
+ if (m_xActiveController.is())
+ {
+ m_xActiveForm = getInternalForm(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>(m_xActiveController->getModel(), ::com::sun::star::uno::UNO_QUERY));
+ }
+ else
+ m_xActiveForm = NULL;
+
+ startListening();
+
+ // activate all dispatchers belonging to form of the new navigation controller
+ xNavigationForm = NULL;
+ if (m_xNavigationController.is())
+ xNavigationForm = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(m_xNavigationController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xNavigationForm.is())
+ ActivateDispatchers(GetAccessPathFromForm(xNavigationForm), sal_True);
+
+ // if there is a async cursor action running we have to lock the controls of the new controller
+ if (HasPendingCursorAction(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(m_xActiveForm, ::com::sun::star::uno::UNO_QUERY)))
+ setControlLocks();
+
+ m_bInActivate = sal_False;
+
+ m_pShell->UIFeatureChanged();
+ SFX_BINDINGS().InvalidateShell(*m_pShell);
+
+ InvalidateSlot(SID_FM_FILTER_NAVIGATOR_CONTROL, sal_True, sal_True);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::setCurControl( const SdrMarkList& rMarkList )
+{
+ if (isControlList(rMarkList))
+ {
+ // Aktuell selektiertes Objekt setzen
+ sal_uInt32 nMarkCount = rMarkList.GetMarkCount();
+ FmFormObj* pSelFormObj = NULL;
+ if (nMarkCount==1)
+ {
+ SdrObject *pObj=rMarkList.GetMark(0)->GetObj();
+
+ if( pObj->IsGroupObject() ) // Mehrfachselektion
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState> xMultiIFace(new FmXMultiSet( rMarkList ));
+ setCurControl( xMultiIFace );
+ }
+ else
+ {
+ pSelFormObj = PTR_CAST(FmFormObj, rMarkList.GetMark(0)->GetObj());
+
+ if ( pSelFormObj ) // Einfachselektion
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent> xFormComponent(pSelFormObj->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xFormComponent.is())
+ setCurControl(xFormComponent);
+ else
+ setCurControl( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>() );
+ }
+ else
+ setCurControl( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>() );
+ }
+ }
+ else if (nMarkCount > 1) // Mehrfachselektion
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState> xMultiIFace(new FmXMultiSet( rMarkList ));
+ setCurControl( xMultiIFace );
+ }
+ }
+ else // Keine Selektion oder gemischt
+ setCurControl( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>() );
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::setCurControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xNewControl)
+{
+ DBG_ASSERT(m_pShell->IsDesignMode(), "nur im designmode verwenden");
+
+ if (m_xCurControl == xNewControl)
+ return;
+
+ // Stammen beide Objecte vom gleichen Container
+ if (m_xCurControl.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xCur(m_xCurControl, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xNew(xNewControl, ::com::sun::star::uno::UNO_QUERY);
+ // wenn nichts selektiert oder unterschiedliche Väter und der Vater von xCurControl ist ein XSelectionSupplier
+ // dann muß dieser deselektieren.
+ if (!xNew.is() || xCur->getParent() != xNew->getParent())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier> xSel(xCur->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (xSel.is())
+ {
+ xSel->select(::com::sun::star::uno::Any());
+ }
+ }
+ }
+
+ m_xCurControl = xNewControl;
+
+ InvalidateSlot(SID_FM_CTL_PROPERTIES);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::setSelObject(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xNewObj)
+{
+ DBG_ASSERT(m_pShell->IsDesignMode(), "nur im designmode verwenden");
+
+ if (m_xSelObject != xNewObj)
+ {
+ m_xSelObject = xNewObj;
+ for (sal_Int16 i = 0; i<sizeof(SelObjectSlotMap)/sizeof(SelObjectSlotMap[0]); ++i)
+ InvalidateSlot(SelObjectSlotMap[i]);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::setCurForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& xF)
+{
+ DBG_ASSERT(m_pShell->IsDesignMode(), "nur im designmode verwenden");
+ if (xF != m_xCurForm)
+ {
+ m_xCurForm = xF;
+ FmFormPage* pPage = m_pShell->GetCurPage();
+ if (pPage)
+ pPage->GetImpl()->setCurForm( xF );
+ for (sal_Int16 i = 0; i<sizeof(DlgSlotMap)/sizeof(DlgSlotMap[0]); ++i)
+ InvalidateSlot(DlgSlotMap[i]);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::startListening()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet> xDatabaseForm(m_xActiveForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xDatabaseForm.is() && ::utl::getConnection(xDatabaseForm).is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xActiveFormSet(m_xActiveForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xActiveFormSet.is())
+ {
+ // wenn es eine Datenquelle gibt, dann den Listener aufbauen
+ ::rtl::OUString aSource = ::utl::getString(xActiveFormSet->getPropertyValue(FM_PROP_COMMAND));
+ if (aSource.len())
+ {
+ // datensatzwechsel mitbekommen
+ xDatabaseForm->addRowSetListener(this);
+
+ // Modify
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyBroadcaster> xBroadCaster(m_xActiveController, ::com::sun::star::uno::UNO_QUERY);
+ if (xBroadCaster.is())
+ xBroadCaster->addModifyListener(this);
+
+ sal_Bool bUseEscapeProcessing = ::utl::getBOOL(xActiveFormSet->getPropertyValue(FM_PROP_ESCAPE_PROCESSING));
+ if (bUseEscapeProcessing)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposerFactory> xFactory(::utl::getConnection(xDatabaseForm), ::com::sun::star::uno::UNO_QUERY);
+ if (xFactory.is())
+ m_xParser = xFactory->createQueryComposer();
+ }
+
+ m_bDatabaseBar = sal_True;
+
+ ::com::sun::star::uno::Any aVal = xActiveFormSet->getPropertyValue(FM_PROP_NAVIGATION);
+ m_eNavigate = *(::com::sun::star::form::NavigationBarMode*) aVal.getValue();
+
+ xActiveFormSet->addPropertyChangeListener(FM_PROP_ISMODIFIED,this);
+ xActiveFormSet->addPropertyChangeListener(FM_PROP_ISNEW, this);
+
+ switch (m_eNavigate)
+ {
+ case ::com::sun::star::form::NavigationBarMode_PARENT:
+ {
+ // suchen des Controllers, ueber den eine Navigation moeglich ist
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xChild(m_xActiveController, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> xParent;
+ while (xChild.is())
+ {
+ xChild = ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild>(xChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ xParent = ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>(xChild, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xParentSet;
+ if (xParent.is())
+ xParentSet = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>(xParent->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xParentSet.is())
+ {
+ ::com::sun::star::uno::Any aVal( xParentSet->getPropertyValue(FM_PROP_NAVIGATION) );
+ m_eNavigate = *(::com::sun::star::form::NavigationBarMode*) aVal.getValue();
+
+ if (m_eNavigate == ::com::sun::star::form::NavigationBarMode_CURRENT)
+ break;
+ }
+ }
+ m_xNavigationController = xParent;
+ } break;
+ case ::com::sun::star::form::NavigationBarMode_CURRENT:
+ m_xNavigationController = m_xActiveController;
+ break;
+ default:
+ m_xNavigationController = NULL;
+ m_bDatabaseBar = sal_False;
+ }
+
+ // an dem Controller, der die Navigation regelt, wg. RecordCount lauschen
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xNavigationSet;
+ if (m_xNavigationController.is())
+ {
+ xNavigationSet = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>(m_xNavigationController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xNavigationSet.is())
+ xNavigationSet->addPropertyChangeListener(FM_PROP_ROWCOUNT,this);
+ }
+
+ // und dem Parser die Query-/Filter-/Sort-Einstellungen der aktiven Form
+ if (m_xParser.is())
+ {
+ ::rtl::OUString aStatement = ::utl::getString(xActiveFormSet->getPropertyValue(FM_PROP_ACTIVECOMMAND));
+ ::rtl::OUString aFilter = ::utl::getString(xActiveFormSet->getPropertyValue(FM_PROP_FILTER_CRITERIA));
+ ::rtl::OUString aSort = ::utl::getString(xActiveFormSet->getPropertyValue(FM_PROP_SORT));
+
+ try
+ {
+ m_xParser->setQuery(aStatement);
+ m_xParser->setFilter(aFilter);
+ m_xParser->setOrder(aSort);
+ }
+ catch(...)
+ {
+ }
+
+
+ // nothing to do, change the parser on a reload
+ xActiveFormSet->addPropertyChangeListener(FM_PROP_ACTIVECOMMAND,this);
+ xActiveFormSet->addPropertyChangeListener(FM_PROP_FILTER_CRITERIA, this);
+ xActiveFormSet->addPropertyChangeListener(FM_PROP_SORT, this);
+ }
+ m_bActiveModified = sal_False;
+ return;
+ }
+ }
+ }
+
+ m_eNavigate = ::com::sun::star::form::NavigationBarMode_NONE;
+ m_bDatabaseBar = sal_False;
+ m_xNavigationController = NULL;
+ m_bActiveModified = sal_False;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::stopListening()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet> xDatabaseForm(m_xActiveForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xDatabaseForm.is() && m_bDatabaseBar)
+ {
+ // datensatzwechsel mitbekommen
+ xDatabaseForm->removeRowSetListener(this);
+
+ // Modify
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyBroadcaster> xBroadCaster(m_xActiveController, ::com::sun::star::uno::UNO_QUERY);
+ if (xBroadCaster.is())
+ xBroadCaster->removeModifyListener(this);
+
+ // satzstatus
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xActiveFormSet(m_xActiveForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xActiveFormSet.is())
+ {
+ xActiveFormSet->removePropertyChangeListener(FM_PROP_ISMODIFIED,this);
+ xActiveFormSet->removePropertyChangeListener(FM_PROP_ISNEW, this);
+
+ if (m_xParser.is())
+ {
+ xActiveFormSet->removePropertyChangeListener(FM_PROP_FILTER_CRITERIA, this);
+ xActiveFormSet->removePropertyChangeListener(FM_PROP_ACTIVECOMMAND,this);
+ xActiveFormSet->removePropertyChangeListener(FM_PROP_SORT,this);
+ }
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xComp(m_xParser, ::com::sun::star::uno::UNO_QUERY);
+ if (xComp.is())
+ xComp->dispose();
+ m_xParser = NULL;
+
+ if (m_xNavigationController.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(m_xNavigationController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ xSet->removePropertyChangeListener(FM_PROP_ROWCOUNT, this);
+
+ }
+ }
+
+ m_bDatabaseBar = sal_False;
+ m_eNavigate = ::com::sun::star::form::NavigationBarMode_NONE;
+ m_xNavigationController = NULL;
+ m_bActiveModified = sal_False;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::ShowProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& rxObject, sal_Bool bShow)
+{
+ // Evtl. noch aktuelles Objekt umsetzen
+ if (rxObject != m_xSelObject)
+ setSelObject( rxObject );
+
+ // Wenn Fenster bereits angezeigt wird, nur StatusUpdate
+ sal_Bool bHasChild = m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow(SID_FM_SHOW_PROPERTIES);
+ if (bHasChild && bShow)
+ InvalidateSlot(SID_FM_PROPERTY_CONTROL, sal_True, sal_True);
+
+ // Ansonsten Fenster ein-/ausblenden
+ else
+ m_pShell->GetViewShell()->GetViewFrame()->ToggleChildWindow(SID_FM_SHOW_PROPERTIES);
+
+ InvalidateSlot(SID_FM_PROPERTIES);
+ InvalidateSlot(SID_FM_CTL_PROPERTIES);
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere)
+{
+ DBG_ASSERT((pfriWhere->nContext >= 0) && (pfriWhere->nContext < m_arrSearchContexts.size()),
+ "FmXFormShell::OnFoundData : ungueltiger Kontext !");
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm( m_arrSearchContexts.at(pfriWhere->nContext));
+ DBG_ASSERT(xForm.is(), "FmXFormShell::OnFoundData : ungueltige Form !");
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate> xCursor(xForm, ::com::sun::star::uno::UNO_QUERY);
+ if (!xCursor.is())
+ return 0; // was soll ich da machen ?
+
+ // zum Datensatz
+ xCursor->moveToBookmark(pfriWhere->aPosition);
+
+ LoopGrids(GA_FORCE_SYNC);
+
+ // und zum Feld (dazu habe ich vor dem Start des Suchens die XVclComponent-Interfaces eingesammelt)
+ DBG_ASSERT(pfriWhere->nFieldPos < m_arrSearchedControls.Count(), "FmXFormShell::OnFoundData : ungueltige Daten uebergeben !");
+ SdrObject* pObject = m_arrSearchedControls.GetObject(pfriWhere->nFieldPos);
+ DBG_ASSERT(pObject != NULL, "FmXFormShell::OnFoundData : unerwartet : ungueltiges VclControl-Interface");
+
+ m_pShell->GetFormView()->UnMarkAll(m_pShell->GetFormView()->GetPageView(m_pShell->GetCurPage()));
+ m_pShell->GetFormView()->MarkObj(pObject, m_pShell->GetFormView()->GetPageView(m_pShell->GetCurPage()));
+
+ DBG_ASSERT(pObject->IsUnoObj(), "FmXFormShell::OnFoundData : ungueltiges Control !");
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> xControlModel( ((SdrUnoObj*)pObject)->GetUnoControlModel());
+ DBG_ASSERT(xControlModel.is(), "FmXFormShell::OnFoundData : ungueltiges Control !");
+
+ // disable the permanent cursor for the last grid we found a record
+ if (m_aLastGridFound.is() && (m_aLastGridFound != xControlModel))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xOldSet(m_aLastGridFound, ::com::sun::star::uno::UNO_QUERY);
+ sal_Bool bB(sal_False);
+ xOldSet->setPropertyValue(FM_PROP_ALWAYSSHOWCURSOR, ::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState> xOldSetState(xOldSet, ::com::sun::star::uno::UNO_QUERY);
+ if (xOldSetState.is())
+ xOldSetState->setPropertyToDefault(FM_PROP_CURSORCOLOR);
+ else
+ xOldSet->setPropertyValue(FM_PROP_CURSORCOLOR, ::com::sun::star::uno::Any());
+ }
+
+ // wenn das Feld sich in einem GridControl befindet, muss ich dort noch in die entsprechende Spalte gehen
+ sal_Int32 nGridColumn = m_arrRelativeGridColumn.GetObject(pfriWhere->nFieldPos);
+ if (nGridColumn != -1)
+ { // dummer weise muss ich mir das Control erst wieder besorgen
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> xControl( GetControlFromModel(xControlModel));
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGrid> xGrid(xControl, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xGrid.is(), "FmXFormShell::OnFoundData : ungueltiges Control !");
+ // wenn eine der Asserts anschlaegt, habe ich beim Aufbauen von m_arrSearchedControls wohl was falsch gemacht
+
+ // enable a permanent cursor for the grid so we can see the found text
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xModelSet(xControlModel, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xModelSet.is(), "FmXFormShell::OnFoundData : invalid control model (no property set) !");
+ sal_Bool bB(sal_True);
+ xModelSet->setPropertyValue(FM_PROP_ALWAYSSHOWCURSOR, ::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+ xModelSet->setPropertyValue(FM_PROP_CURSORCOLOR, ::com::sun::star::uno::makeAny(sal_Int32(COL_LIGHTRED)));
+ m_aLastGridFound = xControlModel;
+
+ xGrid->setCurrentColumnPosition(nGridColumn);
+ }
+
+ // als der Cursor neu positioniert wurde, habe ich (in positioned) meine Formularleisten-Slots invalidiert, aber das greift
+ // hier dummerweise nicht, da i.A. ja der (modale) Suchdialog oben ist ... also Gewalt ...
+ sal_uInt16 nPos = 0;
+ while (DatabaseSlotMap[nPos])
+ SFX_BINDINGS().Update(DatabaseSlotMap[nPos++]);
+ // leider geht das Update im Gegensatz zum Invalidate nur mit einzelnen Slots)
+
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormShell, OnCanceledNotFound, FmFoundRecordInformation*, pfriWhere)
+{
+ DBG_ASSERT((pfriWhere->nContext >= 0) && (pfriWhere->nContext < m_arrSearchContexts.size()),
+ "FmXFormShell::OnCanceledNotFound : ungueltiger Kontext !");
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm( m_arrSearchContexts.at(pfriWhere->nContext));
+ DBG_ASSERT(xForm.is(), "FmXFormShell::OnCanceledNotFound : ungueltige Form !");
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate> xCursor(xForm, ::com::sun::star::uno::UNO_QUERY);
+ if (!xCursor.is())
+ return 0; // was soll ich da machen ?
+
+ // zum Datensatz
+ xCursor->moveToBookmark(pfriWhere->aPosition);
+
+ m_pShell->GetFormView()->UnMarkAll(m_pShell->GetFormView()->GetPageViewPvNum(0));
+ return 0L;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextInfo)
+{
+ DBG_ASSERT(pfmscContextInfo->nContext < m_arrSearchContexts.size(), "FmXFormShell::OnSearchContextRequest : invalid parameter !");
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm( m_arrSearchContexts.at(pfmscContextInfo->nContext));
+ DBG_ASSERT(xForm.is(), "FmXFormShell::OnSearchContextRequest : unexpected : invalid context !");
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xIter(xForm, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xIter.is(), "FmXFormShell::OnSearchContextRequest : unexpected : context has no iterator !");
+
+ // --------------------------------------------------------------------------------------------
+ // die Liste der zu involvierenden Felder zusammenstellen (sind die ControlSources aller Felder, die eine solche Eigenschaft habe)
+ UniString strFieldList, sFieldDisplayNames;
+ m_arrSearchedControls.Remove(0, m_arrSearchedControls.Count());
+ m_arrRelativeGridColumn.Remove(0, m_arrRelativeGridColumn.Count());
+
+ // folgendes kleines Problem : Ich brauche, um gefundene Felder zu markieren, SdrObjekte. Um hier festzustellen, welche Controls
+ // ich in die Suche einbeziehen soll, brauche ich Controls (also ::com::sun::star::awt::XControl-Interfaces). Ich muss also ueber eines von beiden
+ // iterieren und mir das jeweils andere besorgen. Dummerweise gibt es keine direkte Verbindung zwischen beiden Welten (abgesehen
+ // von einem GetUnoControl an SdrUnoObject, das aber ein OutputDevice verlangt, womit ich nichts anfangen kann).
+ // Allerdings komme ich sowohl von einem Control als auch von einem SdrObject zum Model, und damit ist mir mit einer doppelten
+ // Schleife die Zuordnung SdrObject<->Control moeglich.
+ // Die Alternative zu dieser (unschoenen und sicher auch nicht ganz fixen) Loesung waere, auf das Cachen der SdrObjects zu
+ // verzichten, was dann aber in OnFoundData zu wesentlicher Mehrarbeit fuehren wuerde (da ich mir dort jedesmal das SdrObject
+ // erst besorgen muesste). Da aber OnFoundData i.d.R. oefter aufgerufen wird als ExecuteSearch, erledige ich das hier.
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> xValidFormFields;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> xSupplyCols(xIter, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xSupplyCols.is(), "FmXFormShell::OnSearchContextRequest : invalid cursor : no columns supplier !");
+ if (xSupplyCols.is())
+ xValidFormFields = xSupplyCols->getColumns();
+ DBG_ASSERT(xValidFormFields.is(), "FmXFormShell::OnSearchContextRequest : form has no fields !");
+
+ // aktuelle(r) Page/Controller
+ FmFormPage* pCurrentPage = m_pShell->GetCurPage();
+ DBG_ASSERT(pCurrentPage!=NULL, "FmXFormShell::OnSearchContextRequest : no page !");
+ // alle Sdr-Controls dieser Seite durchsuchen ...
+ ::rtl::OUString sControlSource, sCompareString,aName;
+ for (int i=0; i<pCurrentPage->GetObjCount(); ++i)
+ {
+ SdrObject* pCurrent = pCurrentPage->GetObj(i);
+
+ // wenn das Ding eine Gruppierung ist -> durchiterieren
+ SdrObjListIter* pGroupIterator = NULL;
+ if (pCurrent->IsGroupObject())
+ {
+ pGroupIterator = new SdrObjListIter(*pCurrent->GetSubList());
+ pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL;
+ }
+
+ while (pCurrent)
+ {
+ if (pCurrent->IsUnoObj())
+ {
+ // das Model zum aktuellen Object ...
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> xControlModel( ((SdrUnoObj*)pCurrent)->GetUnoControlModel());
+ DBG_ASSERT(xControlModel.is(), "FmXFormShell::OnSearchContextRequest : invalid objects !");
+ // ... als FormComponent
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent> xCurrentAsFormComponent(xControlModel, ::com::sun::star::uno::UNO_QUERY);
+ if (!xCurrentAsFormComponent.is())
+ {
+ if (pGroupIterator) // ich iteriere gerade durch eine Gruppe von Controls
+ pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL;
+ else
+ pCurrent = NULL;
+ continue;
+ }
+
+ // gehoert diese FormComponent ueberhaupt zu der Form, um die es geht ?
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xParentOfCurrent( xCurrentAsFormComponent->getParent());
+ if (xParentOfCurrent != xForm) // vergleich fuehrt zu richtigem Ergebnis, seit TF_ONE
+ {
+ if (pGroupIterator) // ich iteriere gerade durch eine Gruppe von Controls
+ pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL;
+ else
+ pCurrent = NULL;
+ continue;
+ }
+
+ // ... nach der ControlSource-Eigenschaft fragen
+ SearchableControlIterator iter(xCurrentAsFormComponent);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> xControlBehindModel;
+ // das Control, das als Model xControlModel hat
+ // (das folgende while kann mehrmals durchlaufen werden, ohne dass das Control sich aendert, dann muss
+ // ich nicht jedesmal neu suchen)
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xCurrent( iter.Next());
+ while (xCurrent.is())
+ {
+ sControlSource = iter.getCurrentValue();
+ if (sControlSource == sCompareString)
+ { // das aktuelle Element hat keine ControlSource, also ist es ein GridControl (das ist das einzige, was
+ // der SearchableControlIterator noch zulaesst)
+ xControlBehindModel = GetControlFromModel(xControlModel);
+ DBG_ASSERT(xControlBehindModel.is(), "FmXFormShell::OnSearchContextRequest : didn't ::std::find a control with requested model !");
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGridPeer> xGridPeer(xControlBehindModel->getPeer(), ::com::sun::star::uno::UNO_QUERY);
+ do
+ {
+ if (!xGridPeer.is())
+ break;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xPeerContainer(xGridPeer, ::com::sun::star::uno::UNO_QUERY);
+ if (!xPeerContainer.is())
+ break;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xModelColumns(xGridPeer->getColumns(), ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xModelColumns.is(), "FmXFormShell::OnSearchContextRequest : there is a grid control without columns !");
+ // the case 'no columns' should be indicated with an empty container, I think ...
+ DBG_ASSERT(xModelColumns->getCount() >= xPeerContainer->getCount(), "FmXFormShell::OnSearchContextRequest : impossible : have more view than model columns !");
+
+ for (sal_Int16 nViewPos=0; nViewPos<xPeerContainer->getCount(); ++nViewPos)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xCurrentColumn(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)xPeerContainer->getByIndex(nViewPos).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xCurrentColumn.is())
+ continue;
+
+ // can we use this column control fo searching ?
+ if (!IsSearchableControl(xCurrentColumn))
+ continue;
+
+ sal_Int16 nModelPos = GridView2ModelPos(xModelColumns, nViewPos);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCurrentColModel( *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)xModelColumns->getByIndex(nModelPos).getValue());
+ aName = ::utl::getString(xCurrentColModel->getPropertyValue(FM_PROP_CONTROLSOURCE));
+ // the cursor has a field matching the control source ?
+ if (xValidFormFields->hasByName(aName))
+ {
+ strFieldList += aName.getStr();
+ strFieldList += ';';
+
+ sFieldDisplayNames += ::utl::getString(xCurrentColModel->getPropertyValue(FM_PROP_LABEL)).getStr();
+ sFieldDisplayNames += ';';
+
+ pfmscContextInfo->arrFields.push_back(xCurrentColumn);
+
+ // und das SdrObjekt zum Feld
+ m_arrSearchedControls.C40_INSERT(SdrObject, pCurrent, m_arrSearchedControls.Count());
+ // die Nummer der Spalte
+ m_arrRelativeGridColumn.Insert(nViewPos, m_arrRelativeGridColumn.Count());
+ }
+ }
+ } while (sal_False);
+ }
+ else
+ {
+ if (sControlSource.getLength() && xValidFormFields->hasByName(sControlSource))
+ {
+ // jetzt brauche ich das Control zum SdrObject
+ if (!xControlBehindModel.is())
+ {
+ xControlBehindModel = GetControlFromModel(xControlModel);
+ DBG_ASSERT(xControlBehindModel.is(), "FmXFormShell::OnSearchContextRequest : didn't ::std::find a control with requested model !");
+ }
+
+ if (IsSearchableControl(xControlBehindModel))
+ { // alle Tests ueberstanden -> in die Liste mit aufnehmen
+ strFieldList += sControlSource.getStr();
+ strFieldList += ';';
+
+ // the label which should appear for the control :
+ sFieldDisplayNames += getLabelName(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>(xControlModel, ::com::sun::star::uno::UNO_QUERY)).getStr();
+ sFieldDisplayNames += ';';
+
+ // das SdrObjekt merken (beschleunigt die Behandlung in OnFoundData)
+ m_arrSearchedControls.C40_INSERT(SdrObject, pCurrent, m_arrSearchedControls.Count());
+
+ // die Nummer der Spalte (hier ein Dummy, nur fuer GridControls interesant)
+ m_arrRelativeGridColumn.Insert(-1, m_arrRelativeGridColumn.Count());
+
+ // und fuer die formatierte Suche ...
+ pfmscContextInfo->arrFields.push_back(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>(xControlBehindModel, ::com::sun::star::uno::UNO_QUERY));
+ }
+ }
+ }
+
+ xCurrent = iter.Next();
+ }
+ }
+
+ if (pGroupIterator) // ich iteriere gerade durch eine Gruppe von Controls
+ pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL;
+ else
+ pCurrent = NULL;
+ }
+ delete pGroupIterator;
+ }
+ strFieldList.EraseTrailingChars(';');
+ sFieldDisplayNames.EraseTrailingChars(';');
+
+ if (!pfmscContextInfo->arrFields.size())
+ {
+ pfmscContextInfo->arrFields.clear();
+ pfmscContextInfo->xCursor = NULL;
+ pfmscContextInfo->strUsedFields.Erase();
+ return 0L;
+ }
+
+ pfmscContextInfo->xCursor = xIter;
+ pfmscContextInfo->strUsedFields = strFieldList;
+ pfmscContextInfo->sFieldDisplayNames = sFieldDisplayNames;
+
+ // 66463 - 31.05.99 - FS
+ // wenn der Cursor sich in einem anderen RecordMode als STANDARD befindet, ruecksetzen
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCursorSet(pfmscContextInfo->xCursor, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate> xUpdateCursor(pfmscContextInfo->xCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (xUpdateCursor.is() && xCursorSet.is() && xCursorSet.is())
+ if (::utl::getBOOL(xCursorSet->getPropertyValue(FM_PROP_ISNEW)))
+ xUpdateCursor->moveToCurrentRow();
+ else
+ if (::utl::getBOOL(xCursorSet->getPropertyValue(FM_PROP_ISMODIFIED)))
+ xUpdateCursor->cancelRowUpdates();
+
+ return pfmscContextInfo->arrFields.size();
+}
+
+ // ::com::sun::star::container::XContainerListener
+//------------------------------------------------------------------------------
+void FmXFormShell::elementInserted(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ // neues Object zum lauschen
+ AddElement(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)evt.Element.getValue());
+ m_pShell->DetermineForms(sal_True);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::elementReplaced(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ RemoveElement(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)evt.ReplacedElement.getValue());
+ AddElement(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)evt.Element.getValue());
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::elementRemoved(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ RemoveElement(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)evt.Element.getValue());
+ m_pShell->DetermineForms(sal_True);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::ResetForms(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xForms, sal_Bool bInvalidate)
+{
+ if (m_xForms != _xForms)
+ {
+ RemoveElement(m_xForms);
+
+ m_xForms = _xForms;
+
+ AddElement(m_xForms);
+ }
+ m_pShell->DetermineForms(bInvalidate);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::AddElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element)
+{
+ // am Container horchen
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> xContainer(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ {
+ sal_uInt32 nCount = xContainer->getCount();
+ ::com::sun::star::uno::Any aElement;
+ for (sal_uInt32 i = 0; i < nCount; i++)
+ {
+ aElement = xContainer->getByIndex(i);
+ AddElement(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aElement.getValue());
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer> xCont(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xCont.is())
+ xCont->addContainerListener(this);
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier> xSelSupplier(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xSelSupplier.is())
+ xSelSupplier->addSelectionChangeListener(this);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::RemoveElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier> xSelSupplier(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xSelSupplier.is())
+ xSelSupplier->removeSelectionChangeListener(this);
+
+ // Verbindung zu Kindern aufheben
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> xContainer(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer> xCont(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xCont.is())
+ xCont->removeContainerListener(this);
+
+ sal_uInt32 nCount = xContainer->getCount();
+ ::com::sun::star::uno::Any aElement;
+ for (sal_uInt32 i = 0; i < nCount; i++)
+ {
+ aElement = xContainer->getByIndex(i);
+ RemoveElement(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aElement.getValue());
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::selectionChanged(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier> xSupplier(rEvent.Source, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Any aSelObj( xSupplier->getSelection() );
+ if (aSelObj.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE)
+ return;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xSelObj( *(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aSelObj.getValue());
+
+ // es wurde eine Selektion weggenommen, dieses kann nur durch die Shell vorgenommen werden
+ if (!xSelObj.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xPreviousObject( getSelObject());
+ EnableTrackProperties(sal_False);
+
+ m_pShell->GetFormView()->UnmarkAll();
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xNewForm( GetForm(rEvent.Source));
+
+ setCurControl(xSelObj);
+ setCurForm(xNewForm);
+
+ // wurde vorher Form angezeigt, dann wieder die Form anzeigen
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xOldForm(xPreviousObject, ::com::sun::star::uno::UNO_QUERY);
+ if (xOldForm.is())
+ setSelObject(m_xCurForm);
+ else
+ setSelObject(m_xCurControl);
+
+ if (IsPropBrwOpen() && m_xSelObject != xPreviousObject)
+ ShowProperties(m_xSelObject, sal_True);
+
+ EnableTrackProperties(sal_True);
+ m_pShell->NotifyMarkListChanged(m_pShell->GetFormView());
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormShell, OnTimeOut, void*, EMPTYTAG)
+{
+ if (m_pShell->IsDesignMode() && m_pShell->GetFormView())
+ SetSelection(m_pShell->GetFormView()->GetMarkList());
+
+ return 0;
+}
+
+//------------------------------------------------------------------------
+void FmXFormShell::SetSelectionDelayed(FmFormView* pView)
+{
+ if (m_pShell->IsDesignMode() && IsTrackPropertiesEnabled() && !m_aMarkTimer.IsActive())
+ m_aMarkTimer.Start();
+}
+
+//------------------------------------------------------------------------
+void FmXFormShell::SetSelection(const SdrMarkList& rMarkList)
+{
+ DetermineSelection(rMarkList);
+ m_pShell->NotifyMarkListChanged(m_pShell->GetFormView());
+}
+
+//------------------------------------------------------------------------
+void FmXFormShell::DetermineSelection(const SdrMarkList& rMarkList)
+{
+ // Aktuelles Objekt setzen
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xPreviousObject( m_xSelObject);
+ sal_Bool bMixedWithFormControls = sal_True;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xNewForm( DetermineCurForm(rMarkList, bMixedWithFormControls));
+
+ // Aktuelle Form anpassen
+ if (xNewForm.is() || bMixedWithFormControls)
+ {
+ // die Form wird nur angepasst, wenn eine eindeutige From gefunden wurde oder eine gemischte Selektion existiert,
+ // die auch FormControls enthaelt (NICHT bei einer Selektion ohne solche oder bei leerer Selektion)
+ if ((::com::sun::star::form::XForm*)xNewForm.get() != (::com::sun::star::form::XForm*)m_xCurForm.get())
+ setCurForm( xNewForm );
+ }
+
+ setCurControl(rMarkList);
+
+ // wurde vorher Form angezeigt, dann wieder die Form anzeigen
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xOldForm(m_xSelObject, ::com::sun::star::uno::UNO_QUERY);
+ if (xOldForm.is())
+ setSelObject(xNewForm);
+ else
+ setSelObject(m_xCurControl);
+
+ // Falls ein Propertybrowser angezeigt wird, diesen invalidieren
+ if (IsPropBrwOpen() && xPreviousObject != m_xSelObject)
+ ShowProperties(m_xSelObject, sal_True);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::SaveMarkList(const FmFormView* pView)
+{
+ m_aMark = pView->GetMarkList();
+ m_aMarkTimer.Stop();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::RestoreMarkList(FmFormView* pView)
+{
+ const SdrMarkList& rCurrentList = pView->GetMarkList();
+ FmFormPage* pPage = m_pShell->GetCurPage();
+ if (pPage)
+ {
+ // es gibt eine Markierung, dann diese beibehalten
+ if (rCurrentList.GetMarkCount())
+ {
+ m_aMark.Clear();
+ SetSelection(rCurrentList);
+ }
+ else
+ {
+ // wichtig ist das auf die Objecte der markliste nicht zugegriffen wird
+ // da diese bereits zerstoert sein koennen
+ SdrPageView* pCurPageView = pView->GetPageViewPvNum(0);
+ SdrObjListIter aPageIter( *pPage );
+ sal_Bool bFound = sal_True;
+
+ // gibt es noch alle Objecte
+ sal_uInt32 nCount = m_aMark.GetMarkCount();
+ for (sal_uInt32 i = 0; i < nCount && bFound; i++)
+ {
+ SdrMark* pMark = m_aMark.GetMark(i);
+ SdrObject* pObj = pMark->GetObj();
+ if (pObj->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pObj->GetSubList());
+ while (aIter.IsMore() && bFound)
+ bFound = hasObject(aPageIter, aIter.Next());
+ }
+ else
+ bFound = hasObject(aPageIter, pObj);
+
+ bFound = bFound && pCurPageView == pMark->GetPageView();
+ }
+
+ if (bFound)
+ {
+ // Das LastObject auswerten
+ if (nCount) // Objecte jetzt Markieren
+ {
+ sal_Bool bEnable = sal_False;
+ if (IsTrackPropertiesEnabled())
+ {
+ EnableTrackProperties(sal_False);
+ bEnable = sal_True;
+ }
+
+ for (sal_uInt32 i = 0; i < nCount; i++)
+ {
+ SdrMark* pMark = m_aMark.GetMark(i);
+ pView->MarkObj(pMark->GetObj(), pMark->GetPageView());
+ }
+
+ if (bEnable)
+ EnableTrackProperties(sal_True);
+
+ SetSelection(m_aMark);
+ }
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xCont(pPage->GetForms(), ::com::sun::star::uno::UNO_QUERY);
+
+ // Ist das aktuelle Object ein Element eines SelectionSuppliers?
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xChild(m_xCurControl,::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier> xSelectionSupplier;
+ if (xChild.is())
+ xSelectionSupplier = ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier>(xChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (xSelectionSupplier.is())
+ {
+ // suchen der Zugehoreigen Form
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm(GetForm(m_xCurControl));
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xIface(xForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xForm.is() && searchElement(xCont, xIface))
+ {
+ setCurForm(xForm);
+ setCurControl(m_xCurControl);
+
+ // jetzt noch die Selection vornehmen
+ xSelectionSupplier->select(::com::sun::star::uno::makeAny(m_xCurControl));
+ }
+ }
+ else
+ {
+ // Auswerten des letzen Objects
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm(m_xCurForm, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xIface(xForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xForm.is() && searchElement(xCont, xIface))
+ {
+ setCurForm(xForm);
+ }
+ else
+ {
+ if (pPage->GetImpl()->getCurForm().is())
+ xForm = pPage->GetImpl()->getCurForm();
+ else if (xCont->getCount())
+ xForm = pPage->GetImpl()->getDefaultForm();
+
+ if (xForm.is())
+ setCurForm(xForm);
+ }
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xPreviousObject(getSelObject());
+
+ // wurde vorher Form angezeigt, dann wieder die Form anzeigen
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xOldForm(xPreviousObject, ::com::sun::star::uno::UNO_QUERY);
+ if (xOldForm.is())
+ setSelObject(m_xCurForm);
+ else
+ setSelObject(m_xCurControl);
+
+ if (IsPropBrwOpen() && m_xSelObject != xPreviousObject)
+ ShowProperties(m_xSelObject, sal_True);
+ }
+ }
+ m_aMark.Clear();
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::IsPropBrwOpen() const
+{
+ return( ( m_pShell->GetViewShell() && m_pShell->GetViewShell()->GetViewFrame() ) ?
+ m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow(SID_FM_SHOW_PROPERTIES) : sal_False );
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::SetDesignMode(sal_Bool bDesign)
+{
+ DBG_ASSERT(m_pShell && m_pShell->GetFormView(), "FmXFormShell::SetDesignMode : invalid call (have no shell or no view) !");
+ m_bChangingDesignMode = sal_True;
+
+ // 67506 - 15.07.99 - FS
+ // if we're switching off the design mode we have to force the property browser to be closed
+ // so it can commit it's changes _before_ we load the forms
+ if (!bDesign)
+ {
+ m_bHadPropBrw = m_pShell->GetViewShell()->GetViewFrame()->HasChildWindow(SID_FM_SHOW_PROPERTIES);
+ if (m_bHadPropBrw)
+ m_pShell->GetViewShell()->GetViewFrame()->ToggleChildWindow(SID_FM_SHOW_PROPERTIES);
+ }
+
+ FmFormView* pFormView = m_pShell->GetFormView();
+ if (bDesign)
+ {
+ // we are currently filtering, so stop filtering
+ if (m_bFilterMode)
+ stopFiltering(sal_False);
+
+ // an den Objekten meiner MarkList als Listener abmelden
+ if (m_pCheckForRemoval)
+ {
+ m_pCheckForRemoval->EndListeningAll();
+ delete m_pCheckForRemoval;
+ m_pCheckForRemoval = NULL;
+ }
+ }
+ else
+ SaveMarkList(pFormView);
+
+ if (bDesign && m_xExternalViewController.is())
+ CloseExternalFormViewer();
+
+ pFormView->ChangeDesignMode(bDesign);
+
+ // Listener benachrichtigen
+ FmDesignModeChangedHint aChangedHint( bDesign );
+ m_pShell->Broadcast(aChangedHint);
+
+ FmFormPage* pPage = m_pShell->GetCurPage();
+ if (pPage)
+ {
+ if (bDesign)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xIndex(pPage->GetForms(), ::com::sun::star::uno::UNO_QUERY);
+ ResetForms(xIndex, sal_False);
+ }
+ else
+ ResetForms();
+ }
+
+ m_pShell->m_bDesignMode = bDesign;
+ if (bDesign)
+ RestoreMarkList(pFormView);
+ else
+ {
+ // am Model der View als Listener anmelden (damit ich mitbekomme, wenn jemand waehrend des Alive-Modus
+ // Controls loescht, die ich eigentlich mit SaveMarkList gespeichert habe) (60343)
+ if (!m_pCheckForRemoval)
+ {
+ m_pCheckForRemoval = new ObjectRemoveListener(this);
+ FmFormModel* pModel = m_pShell->GetFormModel();
+ DBG_ASSERT(pModel != NULL, "FmXFormShell::SetDesignMode : shell has no model !");
+ m_pCheckForRemoval->StartListening(*(SfxBroadcaster*)pModel);
+ }
+ else
+ DBG_ERROR("FmXFormShell::SetDesignMode : already listening !");
+ }
+
+ m_pShell->UIFeatureChanged();
+
+ // 67506 - 15.07.99 - FS
+ if (bDesign && m_bHadPropBrw)
+ {
+ // The UIFeatureChanged performes an update (a check of the available features) asynchronously.
+ // So we can't call ShowProperties directly as the according feature isn't enabled yet.
+ // That's why we use an asynchron execution on the dispatcher.
+ // (And that's why this has to be done AFTER the UIFeatureChanged.)
+ FmInterfaceItem aInterfaceItem( SID_FM_SHOW_PROPERTY_BROWSER, getSelObject() );
+ SFX_DISPATCHER().Execute( SID_FM_SHOW_PROPERTY_BROWSER, SFX_CALLMODE_ASYNCHRON,
+ &aInterfaceItem, 0L );
+ }
+ m_bChangingDesignMode = sal_False;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::ObjectRemovedInAliveMode(const SdrObject* pObject)
+{
+ // wenn das entfernte Objekt in meiner MarkList, die ich mir beim Umschalten in den Alive-Mode gemerkt habe, steht,
+ // muss ich es jetzt da rausnehmen, da ich sonst beim Zurueckschalten versuche, die Markierung wieder zu setzen
+ // (interesanterweise geht das nur bei gruppierten Objekten schief (beim Zugriff auf deren ObjList GPF), nicht bei einzelnen)
+
+ sal_uInt32 nCount = m_aMark.GetMarkCount();
+ for (sal_uInt32 i = 0; i < nCount; ++i)
+ {
+ SdrMark* pMark = m_aMark.GetMark(i);
+ SdrObject* pCurrent = pMark->GetObj();
+ if (pObject == pCurrent)
+ {
+ m_aMark.DeleteMark(i);
+ return;
+ }
+ // ich brauche nicht in GroupObjects absteigen : wenn dort unten ein Objekt geloescht wird, dann bleibt der
+ // Zeiger auf das GroupObject, den ich habe, trotzdem weiter gueltig bleibt ...
+ }
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> FmXFormShell::GetControlFromModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& xModel)
+{
+ // die View ...
+ SdrPageView* pCurPageView = m_pShell->GetFormView()->GetPageViewPvNum(0);
+ // deren ViewWinRec-Liste, daraus das erste Element
+ DBG_ASSERT(pCurPageView->GetWinList().GetCount() > 0, "FmXFormShell::GetControlFromModel : unexpected : no SdrPageViewWinRecs");
+ const SdrPageViewWinRec& rViewWinRec = pCurPageView->GetWinList()[0];
+ // von dem bekomme ich alle Controls ...
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> xControlContainer(rViewWinRec.GetControlContainerRef());
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > seqControls( xControlContainer->getControls() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>* pControls = seqControls.getArray();
+ // ... die ich dann durchsuchen kann
+ for (int i=0; i<seqControls.getLength(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> xSearchLoopModel( pControls[i]->getModel());
+ if ((::com::sun::star::awt::XControlModel*)xSearchLoopModel.get() == (::com::sun::star::awt::XControlModel*)xModel.get())
+ return pControls[i];
+ }
+ return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>(NULL);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::CollectFormContexts(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xStartingPoint, const UniString& sCurrentLevelPrefix, UniString& sNames)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xAllComponentIndizies(xStartingPoint, ::com::sun::star::uno::UNO_QUERY);
+
+ if (xAllComponentIndizies.is() && xAllComponentIndizies->getCount())
+ {
+ // das Ding hat Kinder, also gehen wir die alle durch
+ ::com::sun::star::uno::Any aElement;
+ UniString sCurrentFormName, sNextLevelPrefix;
+ for (sal_Int32 i=0; i<xAllComponentIndizies->getCount(); ++i)
+ {
+ aElement = xAllComponentIndizies->getByIndex(i);
+ // ist das aktuelle Kind eine Form ?
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xCurrentAsForm(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aElement.getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (xCurrentAsForm.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xAskForName(xCurrentAsForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xAskForName.is())
+ {
+ try { sCurrentFormName = ::utl::getString(xAskForName->getPropertyValue(FM_PROP_NAME)).getStr(); }
+ catch(...) { }
+ }
+ // den Namen an die Aufzaehlung haengen
+ sNames += ';';
+ sNames += sCurrentFormName;
+ if (sCurrentLevelPrefix.Len() != 0)
+ {
+ sNames.AppendAscii(" (");
+ sNames += sCurrentLevelPrefix;
+ sNames += ')';
+ }
+
+ // den Prefix fuer den naechsten Level
+ sNextLevelPrefix = sCurrentLevelPrefix;
+ if (sCurrentLevelPrefix.Len() != 0)
+ sNextLevelPrefix += '/';
+ sNextLevelPrefix += sCurrentFormName;
+
+ // das Interface merken
+ m_arrSearchContexts.push_back(xCurrentAsForm);
+
+ // und absteigen
+ CollectFormContexts(xCurrentAsForm, sNextLevelPrefix, sNames);
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> FmXFormShell::GetBoundField(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& _xControl, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& _xForm) const
+{
+ // sonderbehandlung fuer databaseGrid
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XGrid> xGrid(_xControl, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xModel, xField;
+
+ if (xGrid.is())
+ {
+ sal_Int16 nCurrentPos = xGrid->getCurrentColumnPosition();
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xCols(_xControl->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ nCurrentPos = GridView2ModelPos(xCols, nCurrentPos);
+ if (nCurrentPos != (sal_Int16)-1)
+ xModel = *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)xCols->getByIndex(nCurrentPos).getValue();
+ }
+ else if (_xControl.is())
+ {
+ xModel = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>(_xControl->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ }
+
+ // Das gebundene Feld ist jetzt eine extra Eigenschaft, nicht mehr indirekt ueber die ControlSource zu besorgen,
+ // da das Control selber durchaus entscheiden kann, dass es sich trotz gueltiger ControlSource nicht binden will.
+ // (zum Beispiel ein TextControl an ein Bild-Feld)
+ // (FS - 64265)
+ if (xModel.is() && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xModel))
+ {
+ ::com::sun::star::uno::Any aElement( xModel->getPropertyValue(FM_PROP_BOUNDFIELD) );
+ xField = *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)aElement.getValue();
+ }
+
+ return xField;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::SetWizardUsing(sal_Bool bUseThem)
+{
+ // gleich an die INI weiterreichen
+ SFX_INIMANAGER()->Set( (bUseThem ? '1' : '0'), SFX_GROUP_DATABASE, String::CreateFromAscii("UseWizards"));
+ m_bUseWizards = bUseThem;
+}
+
+//------------------------------------------------------------------------------
+FmXFormShell::ObjectRemoveListener::ObjectRemoveListener(FmXFormShell* pParent)
+ :SfxListener()
+ ,m_pParent(pParent)
+{
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::ObjectRemoveListener::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
+{
+ if (rHint.ISA(SdrHint) && (((SdrHint&)rHint).GetKind() == HINT_OBJREMOVED))
+ m_pParent->ObjectRemovedInAliveMode(((SdrHint&)rHint).GetObject());
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::startFiltering()
+{
+ // setting all forms in filter mode
+ FmXFormView* pXView = m_pShell->GetFormView()->GetImpl();
+
+ // if the active controller is our external one we have to use the trigger controller
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> xContainer;
+ if (getActiveController() == m_xExternalViewController)
+ {
+ DBG_ASSERT(m_xExtViewTriggerController.is(), "FmXFormShell::startFiltering : inconsistent : active external controller, but noone triggered this !");
+ xContainer = m_xExtViewTriggerController->getContainer();
+ }
+ else
+ xContainer = getActiveController()->getContainer();
+
+ FmWinRecList::iterator i = pXView->findWindow(xContainer);
+ if (i != pXView->getWindowList().end())
+ {
+ const ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> >& rControllerList = (*i)->GetList();
+ for (::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> >::const_iterator j = rControllerList.begin();
+ j != rControllerList.end(); ++j)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeSelector> xModeSelector(*j, ::com::sun::star::uno::UNO_QUERY);
+ if (xModeSelector.is())
+ xModeSelector->setMode(FILTER_MODE);
+ }
+ }
+
+ m_bFilterMode = sal_True;
+
+ m_pShell->UIFeatureChanged();
+ SFX_BINDINGS().InvalidateShell(*m_pShell);
+}
+
+//------------------------------------------------------------------------------
+void saveFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xFormAsSet(xController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xControllerAsSet(xController, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xControllerAsIndex(xController, ::com::sun::star::uno::UNO_QUERY);
+
+ // call the subcontroller
+ for (sal_Int32 i = 0, nCount = xControllerAsIndex->getCount();
+ i < nCount; i++)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> xController(*(::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>*)xControllerAsIndex->getByIndex(i).getValue());
+ saveFilter(xController);
+ }
+
+ try
+ {
+
+ xFormAsSet->setPropertyValue(FM_PROP_FILTER_CRITERIA, xControllerAsSet->getPropertyValue(FM_PROP_FILTER_CRITERIA));
+
+ sal_Bool bB(sal_True);
+ xFormAsSet->setPropertyValue(FM_PROP_APPLYFILTER, ::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+ }
+ catch(...)
+ {
+ }
+
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::stopFiltering(sal_Bool bSave)
+{
+ m_bFilterMode = sal_False;
+
+ FmXFormView* pXView = m_pShell->GetFormView()->GetImpl();
+
+ // if the active controller is our external one we have to use the trigger controller
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> xContainer;
+ if (getActiveController() == m_xExternalViewController)
+ {
+ DBG_ASSERT(m_xExtViewTriggerController.is(), "FmXFormShell::startFiltering : inconsistent : active external controller, but noone triggered this !");
+ xContainer = m_xExtViewTriggerController->getContainer();
+ }
+ else
+ xContainer = getActiveController()->getContainer();
+
+ FmWinRecList::iterator i = pXView->findWindow(xContainer);
+ if (i != pXView->getWindowList().end())
+ {
+ const ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> >& rControllerList = (*i)->GetList();
+ ::std::vector < ::rtl::OUString > aOriginalFilters;
+ ::std::vector < sal_Bool > aOriginalApplyFlags;
+
+ if (bSave)
+ {
+ for (::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> > ::const_iterator j = rControllerList.begin();
+ j != rControllerList.end(); ++j)
+ {
+ if (bSave)
+ { // remember the current filter settings in case we're goin to reload the forms below (which may fail)
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xFormAsSet((*j)->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ aOriginalFilters.push_back(::utl::getString(xFormAsSet->getPropertyValue(FM_PROP_FILTER_CRITERIA)));
+ aOriginalApplyFlags.push_back(::utl::getBOOL(xFormAsSet->getPropertyValue(FM_PROP_APPLYFILTER)));
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmXFormShell::stopFiltering : could not get the original filter !");
+ // put dummies into the arrays so the they have the right size
+
+ if (aOriginalFilters.size() == aOriginalApplyFlags.size())
+ // the first getPropertyValue failed -> use two dummies
+ aOriginalFilters.push_back( ::rtl::OUString() );
+ aOriginalApplyFlags.push_back( sal_False );
+ }
+ }
+ saveFilter(*j);
+ }
+ }
+ for (::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> > ::const_iterator j = rControllerList.begin();
+ j != rControllerList.end(); ++j)
+ {
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeSelector> xModeSelector(*j, ::com::sun::star::uno::UNO_QUERY);
+ if (xModeSelector.is())
+ xModeSelector->setMode(DATA_MODE);
+ }
+ if (bSave) // execute the filter
+ {
+ const ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> > & rControllerList = (*i)->GetList();
+ for (::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> > ::const_iterator j = rControllerList.begin();
+ j != rControllerList.end(); ++j)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable> xReload((*j)->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xReload.is())
+ continue;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xFormSet(xReload, ::com::sun::star::uno::UNO_QUERY);
+
+ try
+ {
+ xReload->reload();
+ }
+ catch(...)
+ {
+ }
+
+ if (!isRowSetAlive(xFormSet))
+ { // something went wrong -> restore the original state
+ ::rtl::OUString sOriginalFilter = aOriginalFilters[ j - rControllerList.begin() ];
+ sal_Bool bOriginalApplyFlag = aOriginalApplyFlags[ j - rControllerList.begin() ];
+ try
+ {
+ xFormSet->setPropertyValue(FM_PROP_FILTER_CRITERIA, ::com::sun::star::uno::makeAny(sOriginalFilter));
+ xFormSet->setPropertyValue(FM_PROP_APPLYFILTER, ::com::sun::star::uno::makeAny(bOriginalApplyFlag));
+ xReload->reload();
+ }
+ catch(...)
+ {
+ }
+ }
+ }
+ }
+ }
+
+ m_pShell->UIFeatureChanged();
+ SFX_BINDINGS().InvalidateShell(*m_pShell);
+}
+
+//------------------------------------------------------------------------------
+void clearFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xControllerAsSet(xController, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xControllerAsIndex(xController, ::com::sun::star::uno::UNO_QUERY);
+
+ // call the subcontroller
+ for (sal_Int32 i = 0, nCount = xControllerAsIndex->getCount();
+ i < nCount; i++)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> xController(*(::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>*)xControllerAsIndex->getByIndex(i).getValue());
+ clearFilter(xController);
+ }
+
+ // clear the filter
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> xContainer(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)xControllerAsSet->getPropertyValue(FM_PROP_FILTERSUPPLIER).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ {
+ // clear the current filter
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> aCondition;
+
+ // as there is always an empty row, if we have a filter:
+ if (xContainer->getCount())
+ {
+ xControllerAsSet->setPropertyValue(FM_PROP_CURRENTFILTER, ::com::sun::star::uno::makeAny(sal_Int32(xContainer->getCount() - 1)));
+ while (xContainer->getCount() > 1)
+ xContainer->removeByIndex(0);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::clearFilter()
+{
+ FmXFormView* pXView = m_pShell->GetFormView()->GetImpl();
+
+ // if the active controller is our external one we have to use the trigger controller
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> xContainer;
+ if (getActiveController() == m_xExternalViewController)
+ {
+ DBG_ASSERT(m_xExtViewTriggerController.is(), "FmXFormShell::startFiltering : inconsistent : active external controller, but noone triggered this !");
+ xContainer = m_xExtViewTriggerController->getContainer();
+ }
+ else
+ xContainer = getActiveController()->getContainer();
+
+ FmWinRecList::iterator i = pXView->findWindow(xContainer);
+ if (i != pXView->getWindowList().end())
+ {
+ const ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> > & rControllerList = (*i)->GetList();
+ for (::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> > ::const_iterator j = rControllerList.begin();
+ j != rControllerList.end(); ++j)
+ {
+ ::clearFilter(*j);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::setControlLocks()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController> xCtrler(getActiveController(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xCtrler.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> xControls(xCtrler->getContainer(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xControls.is())
+ return;
+
+ DBG_ASSERT(m_aControlLocks.Count() == 0, "FmXFormShell::setControlLocks : locking state array isn't empty (called me twice ?) !");
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > aControls = xControls->getControls();
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>* pControls = aControls.getConstArray();
+
+ // iterate through all bound controls, remember the old locking state, set the lock
+ for (sal_Int32 i=0; i<aControls.getLength(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundControl> xCtrl(pControls[i], ::com::sun::star::uno::UNO_QUERY);
+ if (!xCtrl.is())
+ {
+ // it may be a container of controls
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xContainer(pControls[i], ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ { // no recursion. we only know top level control containers (e.g. grid controls)
+ for (sal_Int16 i=0; i<xContainer->getCount(); ++i)
+ {
+ xCtrl = ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundControl>(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)xContainer->getByIndex(i).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xCtrl.is())
+ continue;
+
+ m_aControlLocks.Insert(xCtrl->getLock(), m_aControlLocks.Count());
+ xCtrl->setLock(sal_True);
+ }
+ }
+ continue;
+ }
+
+ m_aControlLocks.Insert(xCtrl->getLock(), m_aControlLocks.Count());
+ xCtrl->setLock(sal_True);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::restoreControlLocks()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController> xCtrler(getActiveController(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xCtrler.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> xControls(xCtrler->getContainer(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xControls.is())
+ return;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > aControls(xControls->getControls());
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>* pControls = aControls.getConstArray();
+
+ // iterate through all bound controls, restore the old locking state
+ sal_Int32 nBoundControl = 0;
+ for (sal_Int32 i=0; i<aControls.getLength(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundControl> xCtrl(pControls[i], ::com::sun::star::uno::UNO_QUERY);
+ if (!xCtrl.is())
+ {
+ // it may be a container of controls
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xContainer(pControls[i], ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ { // no recursion. we only know top level control containers (e.g. grid controls)
+ for (sal_Int16 i=0; i<xContainer->getCount(); ++i)
+ {
+ xCtrl = ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundControl>(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)xContainer->getByIndex(i).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xCtrl.is())
+ continue;
+
+ DBG_ASSERT(nBoundControl < m_aControlLocks.Count(), "FmXFormShell::restoreControlLocks : m_aControlLocks is invalid !");
+ xCtrl->setLock(m_aControlLocks.GetObject(nBoundControl++));
+ }
+ }
+ continue;
+ }
+
+ DBG_ASSERT(nBoundControl < m_aControlLocks.Count(), "FmXFormShell::restoreControlLocks : m_aControlLocks is invalid !");
+ // a violation of this condition would mean a) setControlLocks hasn't been called or b) the ControlContainer
+ // has changed since the last call to setControlLocks.
+ // a) clearly is a fault of the programmer and b) shouldn't be possible (as we are in alive mode)
+ xCtrl->setLock(m_aControlLocks.GetObject(nBoundControl++));
+ }
+ m_aControlLocks.Remove(0, m_aControlLocks.Count());
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::DoAsyncCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController, CURSOR_ACTION _eWhat)
+{
+ DBG_ASSERT(_xController.is(), "FmXFormShell::DoAsyncCursorAction : invalid argument !");
+ DoAsyncCursorAction(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(_xController->getModel(), ::com::sun::star::uno::UNO_QUERY), _eWhat);
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::DoAsyncCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm, CURSOR_ACTION _eWhat)
+{
+ ::osl::MutexGuard aGuard(m_aAsyncSafety);
+ DBG_ASSERT(_xForm.is(), "FmXFormShell::DoAsyncCursorAction : invalid argument !");
+
+ // get the id of the page the form belongs to
+ UniString sFormPageId = GetPageId(_xForm);
+ DBG_ASSERT(sFormPageId.Len(), "FmXFormShell::DoAsyncCursorAction : could not ::std::find the page the form belongs to !");
+
+ // build the access path for the form
+ if (HasPendingCursorAction(_xForm))
+ {
+ DBG_ERROR("FmXFormShell::DoAsyncCursorAction : invalid call !");
+ return;
+ }
+
+ UniString sPath = GetAccessPathFromForm(_xForm, sFormPageId);
+ DBG_ASSERT(sPath.Len(), "FmXFormShell::DoAsyncCursorAction : could not ::std::find a page for the form !");
+
+ CursorActionDescription& rDesc = m_aCursorActions[sPath];
+ // [] will create a new one if non-existent
+ DBG_ASSERT(rDesc.pThread == NULL, "FmXFormShell::DoAsyncCursorAction : the cursor action thread for this form is still alive !");
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xCursor(getInternalForm(_xForm), ::com::sun::star::uno::UNO_QUERY);
+ switch (_eWhat)
+ {
+ case CA_MOVE_TO_LAST :
+ rDesc.pThread = new FmMoveToLastThread(xCursor, sPath);
+ break;
+ case CA_MOVE_ABSOLUTE:
+ DBG_ERROR("FmXFormShell::DoAsyncCursorAction : CA_MOVE_ABSOLUTE not supported yet !");
+ return;
+ }
+ rDesc.pThread->SetTerminationHdl(LINK(this, FmXFormShell, OnCursorActionDone));
+ rDesc.pThread->EnableSelfDelete(sal_False);
+
+ rDesc.bCanceling = sal_False;
+
+ // set the control locks before starting the thread
+ DBG_ASSERT(getInternalForm(m_xActiveForm) == m_xActiveForm, "FmXFormShell::DoAsyncCursorAction : the active form should always be a internal one !");
+ if (getInternalForm(_xForm) == m_xActiveForm)
+ setControlLocks();
+
+ // go ...
+ rDesc.pThread->create();
+
+ // set a priority slightly below normal
+ rDesc.pThread->setPriority(::vos::OThread::TPriority_BelowNormal);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::HasPendingCursorAction(const UniString& _rAccessPath) const
+{
+ ::osl::MutexGuard aGuard(((FmXFormShell*)this)->m_aAsyncSafety);
+
+ for ( ConstCursorActionsIterator aIter = m_aCursorActions.begin();
+ aIter != m_aCursorActions.end();
+ ++aIter
+ )
+ {
+ if (!(*aIter).second.pThread && !(*aIter).second.nFinishedEvent)
+ continue;
+ UniString sThisThreadPath = (*aIter).second.pThread->getAccessPath();
+
+ // we have found a running thread. it blocks the form given by the access path if
+ // one of the two forms (the thread's or the given) is an anestor of the other
+ // this is the case if and only if one path is a prefix of the other
+ if (PathsInterfere(sThisThreadPath, _rAccessPath))
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::HasPendingCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm) const
+{
+ if (!_xForm.is())
+ return sal_False;
+
+ return HasPendingCursorAction(GetAccessPathFromForm(_xForm, GetPageId(_xForm)));
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::HasPendingCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController) const
+{
+ if (!xController.is())
+ return sal_False;
+
+ return HasPendingCursorAction(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(xController->getModel(), ::com::sun::star::uno::UNO_QUERY));
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::HasAnyPendingCursorAction() const
+{
+ ::osl::MutexGuard aGuard(((FmXFormShell*)this)->m_aAsyncSafety);
+
+ for (ConstCursorActionsIterator aIter = m_aCursorActions.begin(); aIter != m_aCursorActions.end(); ++aIter)
+ {
+ if (((*aIter).second.pThread != NULL) || ((*aIter).second.nFinishedEvent != 0))
+ return sal_True;
+ }
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::CancelAnyPendingCursorAction()
+{
+ ::utl::OReusableGuard< ::osl::Mutex> aGuard(m_aAsyncSafety);
+
+ CursorActionsIterator aIter;
+ for (aIter = m_aCursorActions.begin(); aIter != m_aCursorActions.end(); ++aIter)
+ {
+ if (!(*aIter).second.nFinishedEvent && (*aIter).second.pThread)
+ { // the thread is really running
+ (*aIter).second.bCanceling = sal_True;
+
+ aGuard.clear();
+ (*aIter).second.pThread->StopItWait();
+ // StopItWait returns after the termination handler (our OnCursorActionDone) has been called
+ aGuard.attach(m_aAsyncSafety);
+ }
+ }
+
+ // all threads are finished (means canceled), now do the cleanup
+ for (aIter = m_aCursorActions.begin(); aIter != m_aCursorActions.end(); ++aIter)
+ {
+ if ((*aIter).second.pThread)
+ {
+ LINK(this, FmXFormShell, OnCursorActionDoneMainThread).Call((*aIter).second.pThread);
+ DBG_ASSERT((*aIter).second.pThread == NULL, "FmXFormShell::CancelAnyPendingCursorAction : strange behaviour of OnCursorActionDoneMainThread !");
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormShell, OnCursorActionDone, FmCursorActionThread*, pThread)
+{
+ ::osl::MutexGuard aGuard(m_aAsyncSafety);
+
+ // search the pos of the thread within m_aCursorActions
+ CursorActionsIterator aIter;
+ for (aIter = m_aCursorActions.begin(); aIter != m_aCursorActions.end(); ++aIter)
+ {
+ if ((*aIter).second.pThread == pThread)
+ break;
+ }
+
+ DBG_ASSERT(aIter != m_aCursorActions.end(), "FmXFormShell::OnCursorActionDone : could not ::std::find the thread !");
+ DBG_ASSERT((*aIter).second.nFinishedEvent == 0, "FmXFormShell::OnCursorActionDone : another 'ActionDone' for this thread is pending !");
+ // as we allow only one async action at a time (per form) this shouldn't happen
+
+ if (!(*aIter).second.bCanceling)
+ (*aIter).second.nFinishedEvent = Application::PostUserEvent(LINK(this, FmXFormShell, OnCursorActionDoneMainThread), pThread);
+ // if bCanceling is sal_True an other thread's execution is in CancelAnyPendingCursorAction
+ return 0L;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool FmXFormShell::PathsInterfere(const UniString& _rPathLeft, const UniString& _rPathRight) const
+{
+ return ((_rPathLeft.Search(_rPathRight) == 0) || (_rPathRight.Search(_rPathLeft) == 0));
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormShell, OnCursorActionDoneMainThread, FmCursorActionThread*, pThread)
+{
+ ::osl::MutexGuard aGuard(m_aAsyncSafety);
+
+ // search the pos of the thread within m_aCursorActions
+ CursorActionsIterator aIter = m_aCursorActions.find(pThread->getAccessPath());
+ DBG_ASSERT(aIter != m_aCursorActions.end(), "FmXFormShell::OnCursorActionDoneMainThread : could not ::std::find the thread data !");
+ DBG_ASSERT((*aIter).second.pThread == pThread, "FmXFormShell::OnCursorActionDoneMainThread : invalid thread data !");
+
+ // remember some thread parameters
+ UniString sPath = pThread->getAccessPath();
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xForm(pThread->getDataSource(), ::com::sun::star::uno::UNO_QUERY);
+
+ // throw away the thread
+ delete (*aIter).second.pThread;
+ (*aIter).second.pThread = NULL;
+ (*aIter).second.nFinishedEvent = 0;
+ (*aIter).second.bCanceling = sal_False;
+ // as we allow exactly one thread per form we may remove this ones data from m_aCursorActions
+ m_aCursorActions.erase(aIter);
+
+ // there may be several dispatchers affected (one async move locks not only the form itself, but all forms
+ // which are an ancestor or a child)
+ // -> update their status
+ UpdateAllFormDispatchers(sPath);
+
+ DBG_ASSERT(getInternalForm(m_xActiveForm) == m_xActiveForm, "FmXFormShell::DoAsyncCursorAction : the active form should always be a internal one !");
+ DBG_ASSERT(getInternalForm(xForm) == xForm, "FmXFormShell::DoAsyncCursorAction : the thread's form should always be a internal one !");
+ // if one of the two asserts above fails the upcoming comparison is senseless
+ if (xForm == m_xActiveForm)
+ {
+ // the active controller belongs to the form where the action is finished
+ // -> re-enable the controls if they are not locked because of another running thread
+ if (!HasPendingCursorAction(xForm))
+ restoreControlLocks();
+ }
+
+ SFX_BINDINGS().Invalidate(DatabaseSlotMap);
+ // it may not be neccessary but me thinks it's faster without the check if we really have to do this
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormShell::CreateExternalView()
+{
+ DBG_ASSERT(m_xAttachedFrame.is(), "FmXFormShell::CreateExternalView : no frame !");
+
+ // the frame the external view is displayed in
+ sal_Bool bAlreadyExistent = m_xExternalViewController.is();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame> xExternalViewFrame;
+ ::rtl::OUString sFrameName = ::rtl::OUString::createFromAscii("_partwindow");
+ sal_Int32 nSearchFlags = ::com::sun::star::frame::FrameSearchFlag::SELF | ::com::sun::star::frame::FrameSearchFlag::PARENT | ::com::sun::star::frame::FrameSearchFlag::CREATE;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> xCurrentNavController( getNavController());
+ // the creation of the "partwindow" may cause a deactivate of the document which will result in our nav controller to be set to NULL
+
+ // _first_ check if we have any valid fields we can use for the grid view
+ // FS - 21.10.99 - 69219
+ FmXBoundFormFieldIterator aModelIterator(xCurrentNavController->getModel());
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCurrentModelSet;
+ sal_Bool bHaveUsableControls = sal_False;
+ while ((xCurrentModelSet = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>(aModelIterator.Next(), ::com::sun::star::uno::UNO_QUERY)).is())
+ {
+ // the FmXBoundFormFieldIterator only supplies controls with a valid control source
+ // so we just have to check the field type
+ sal_Int16 nClassId = ::utl::getINT16(xCurrentModelSet->getPropertyValue(FM_PROP_CLASSID));
+ switch (nClassId)
+ {
+ case ::com::sun::star::form::FormComponentType::IMAGECONTROL:
+ case ::com::sun::star::form::FormComponentType::CONTROL:
+ continue;
+ }
+ bHaveUsableControls = sal_True;
+ break;
+ }
+
+ if (!bHaveUsableControls)
+ {
+ ErrorBox(NULL, WB_OK, SVX_RESSTR(RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY)).Execute();
+ return;
+ }
+
+ // load the component for external form views
+ if (!bAlreadyExistent)
+ {
+ ::com::sun::star::util::URL aWantToDispatch;
+ aWantToDispatch.Complete = FMURL_COMPONENT_FORMGRIDVIEW;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> xProv(m_xAttachedFrame, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> xDisp;
+ if (xProv.is())
+ xDisp = xProv->queryDispatch(aWantToDispatch, sFrameName, nSearchFlags);
+ if (xDisp.is())
+ {
+ xDisp->dispatch(aWantToDispatch, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>());
+ }
+
+ // with this the component should be loaded, now search the frame where it resides in
+ xExternalViewFrame = m_xAttachedFrame->findFrame(sFrameName, nSearchFlags & ~::com::sun::star::frame::FrameSearchFlag::CREATE);
+ if (xExternalViewFrame.is())
+ {
+ m_xExternalViewController = xExternalViewFrame->getController();
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xComp(m_xExternalViewController, ::com::sun::star::uno::UNO_QUERY);
+ if (xComp.is())
+ xComp->addEventListener((::com::sun::star::lang::XEventListener*)(::com::sun::star::beans::XPropertyChangeListener*)this);
+ }
+ }
+ else
+ {
+ xExternalViewFrame = m_xExternalViewController->getFrame();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> xCommLink(xExternalViewFrame, ::com::sun::star::uno::UNO_QUERY);
+
+ // if we display the active form we interpret the slot as "remove it"
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xCurrentModel(xCurrentNavController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if ((xCurrentModel == m_xExternalDisplayedForm) || (getInternalForm(xCurrentModel) == m_xExternalDisplayedForm))
+ {
+ if (m_xExternalViewController == getActiveController())
+ CommitCurrent(::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>(m_xExternalViewController, ::com::sun::star::uno::UNO_QUERY));
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> xNewController(m_xExtViewTriggerController);
+ CloseExternalFormViewer();
+ setActiveController(xNewController);
+ return;
+ }
+
+ ::com::sun::star::util::URL aClearURL;
+ aClearURL.Complete = FMURL_GRIDVIEW_CLEARVIEW;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> xClear( xCommLink->queryDispatch(aClearURL, ::rtl::OUString::createFromAscii(""), 0));
+ if (xClear.is())
+ xClear->dispatch(aClearURL, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>());
+ }
+
+ // interception of slots of the external view
+ if (m_pExternalViewInterceptor)
+ { // already intercepting ...
+ if (m_pExternalViewInterceptor->getIntercepted() != xExternalViewFrame)
+ { // ... but another frame -> create a new interceptor
+ m_pExternalViewInterceptor->dispose();
+ m_pExternalViewInterceptor->release();
+ m_pExternalViewInterceptor = NULL;
+ }
+ }
+
+ if (!m_pExternalViewInterceptor)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception> xSupplier(xExternalViewFrame, ::com::sun::star::uno::UNO_QUERY);
+ m_pExternalViewInterceptor = new FmXDispatchInterceptorImpl(xSupplier, this, 1);
+ m_pExternalViewInterceptor->acquire();
+ }
+
+ // get the dispatch interface of the frame so we can communicate (interceptable) with the controller
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> xCommLink(xExternalViewFrame, ::com::sun::star::uno::UNO_QUERY);
+
+ if (m_xExternalViewController.is())
+ {
+ DBG_ASSERT(xCommLink.is(), "FmXFormShell::CreateExternalView : the component doesn't have the necessary interfaces !");
+ // collect the dispatchers we will need
+ ::com::sun::star::util::URL aAddColumnURL;
+ aAddColumnURL.Complete = FMURL_GRIDVIEW_ADDCOLUMN;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> xAddColumnDispatch( xCommLink->queryDispatch(aAddColumnURL, ::rtl::OUString::createFromAscii(""), 0));
+ ::com::sun::star::util::URL aAttachURL;
+ aAttachURL.Complete = FMURL_GRIDVIEW_ATTACHTOFORM;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> xAttachDispatch( xCommLink->queryDispatch(aAttachURL, ::rtl::OUString::createFromAscii(""), 0));
+
+ if (xAddColumnDispatch.is() && xAttachDispatch.is())
+ {
+ DBG_ASSERT(xCurrentNavController.is(), "FmXFormShell::CreateExternalView : invalid call : have no nav controller !");
+ // first : dispatch the descriptions for the columns to add
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > aCurrentControls(xCurrentNavController->getControls());
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>* pCurrentControl = aCurrentControls.getConstArray();
+
+ sal_Int16 nAddedColumns = 0;
+
+ // for radio buttons we need some special structures
+ DECLARE_STL_USTRINGACCESS_MAP(::com::sun::star::uno::Sequence< ::rtl::OUString>, MapUString2UstringSeq);
+ DECLARE_STL_ITERATORS(MapUString2UstringSeq);
+ DECLARE_STL_USTRINGACCESS_MAP(::rtl::OUString, FmMapUString2UString);
+ DECLARE_STL_USTRINGACCESS_MAP(sal_Int16, FmMapUString2Int16);
+ DECLARE_STL_ITERATORS(FmMapUString2Int16);
+
+ MapUString2UstringSeq aRadioValueLists;
+ MapUString2UstringSeq aRadioListSources;
+ FmMapUString2UString aRadioControlSources;
+ FmMapUString2Int16 aRadioPositions;
+
+ FmXBoundFormFieldIterator aModelIterator(xCurrentNavController->getModel());
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCurrentModelSet;
+ ::com::sun::star::uno::Any aCurrentBoundField;
+ ::rtl::OUString sColumnType,aGroupName,sControlSource;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property> aProps;
+ while ((xCurrentModelSet = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>(aModelIterator.Next(), ::com::sun::star::uno::UNO_QUERY)).is())
+ {
+ aCurrentBoundField = xCurrentModelSet->getPropertyValue(FM_PROP_BOUNDFIELD);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCurrentBoundField(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aCurrentBoundField.getValue(), ::com::sun::star::uno::UNO_QUERY);
+
+ // create a description of the column to be created
+ // first : determine it's type
+
+ sal_Int16 nClassId = ::utl::getINT16(xCurrentModelSet->getPropertyValue(FM_PROP_CLASSID));
+ switch (nClassId)
+ {
+ case ::com::sun::star::form::FormComponentType::RADIOBUTTON:
+ {
+ // get the label of the button (this is the access key for our structures)
+ aGroupName = getLabelName(xCurrentModelSet);
+
+ // add the reference value of the radio button to the list source sequence
+ ::com::sun::star::uno::Sequence< ::rtl::OUString>& aThisGroupLabels = aRadioListSources[aGroupName];
+ sal_Int32 nNewSizeL = aThisGroupLabels.getLength() + 1;
+ aThisGroupLabels.realloc(nNewSizeL);
+ aThisGroupLabels.getArray()[nNewSizeL - 1] = ::utl::getString(xCurrentModelSet->getPropertyValue(FM_PROP_REFVALUE));
+
+ // add the label to the value list sequence
+ ::com::sun::star::uno::Sequence< ::rtl::OUString>& aThisGroupControlSources = aRadioValueLists[aGroupName];
+ sal_Int32 nNewSizeC = aThisGroupControlSources.getLength() + 1;
+ aThisGroupControlSources.realloc(nNewSizeC);
+ aThisGroupControlSources.getArray()[nNewSizeC - 1] = ::utl::getString(xCurrentModelSet->getPropertyValue(FM_PROP_LABEL));
+
+ // remember the controls source of the radio group
+ sControlSource = ::utl::getString(xCurrentModelSet->getPropertyValue(FM_PROP_CONTROLSOURCE));
+ if (aRadioControlSources.find(aGroupName) == aRadioControlSources.end())
+ aRadioControlSources[aGroupName] = sControlSource;
+#ifdef DBG_UTIL
+ else
+ DBG_ASSERT(aRadioControlSources[aGroupName] == sControlSource,
+ "FmXFormShell::CreateExternalView : inconsistent radio buttons detected !");
+ // (radio buttons with the same name should have the same control source)
+#endif
+ // remember the position within the columns
+ if (aRadioPositions.find(aGroupName) == aRadioPositions.end())
+ aRadioPositions[aGroupName] = (sal_Int16)nAddedColumns;
+
+ // any further handling is done below
+ continue;
+ }
+ break;
+
+ case ::com::sun::star::form::FormComponentType::IMAGECONTROL:
+ case ::com::sun::star::form::FormComponentType::CONTROL:
+ // no grid columns for these types (though they have a control source)
+ continue;
+ case ::com::sun::star::form::FormComponentType::CHECKBOX:
+ sColumnType = FM_COL_CHECKBOX; break;
+ case ::com::sun::star::form::FormComponentType::LISTBOX:
+ sColumnType = FM_COL_LISTBOX; break;
+ case ::com::sun::star::form::FormComponentType::COMBOBOX:
+ sColumnType = FM_COL_COMBOBOX; break;
+ case ::com::sun::star::form::FormComponentType::DATEFIELD:
+ sColumnType = FM_COL_DATEFIELD; break;
+ case ::com::sun::star::form::FormComponentType::TIMEFIELD:
+ sColumnType = FM_COL_TIMEFIELD; break;
+ case ::com::sun::star::form::FormComponentType::NUMERICFIELD:
+ sColumnType = FM_COL_NUMERICFIELD; break;
+ case ::com::sun::star::form::FormComponentType::CURRENCYFIELD:
+ sColumnType = FM_COL_CURRENCYFIELD; break;
+ case ::com::sun::star::form::FormComponentType::PATTERNFIELD:
+ sColumnType = FM_COL_PATTERNFIELD; break;
+
+ case ::com::sun::star::form::FormComponentType::TEXTFIELD:
+ {
+ sColumnType = FM_COL_TEXTFIELD;
+ // we know at least two different controls which are TextFields : the basic edit field and the formatted
+ // field. we distinguish them by their service name
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo> xInfo(xCurrentModelSet, ::com::sun::star::uno::UNO_QUERY);
+ if (xInfo.is())
+ {
+ sal_Int16 nObjectType = getControlTypeByObject(xInfo);
+ if (OBJ_FM_FORMATTEDFIELD == nObjectType)
+ sColumnType = FM_COL_FORMATTEDFIELD;
+ }
+ }
+ break;
+ default:
+ sColumnType = FM_COL_TEXTFIELD; break;
+ }
+
+ const sal_Int16 nDispatchArgs = 3;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> aDispatchArgs(nDispatchArgs);
+ ::com::sun::star::beans::PropertyValue* pDispatchArgs = aDispatchArgs.getArray();
+
+ // properties describing "meta data" about the column
+ // the type
+ pDispatchArgs->Name = FMARG_ADDCOL_COLUMNTYPE;
+ pDispatchArgs->Value <<= sColumnType;
+ ++pDispatchArgs;
+
+ // the pos : append the col
+ pDispatchArgs->Name = FMARG_ADDCOL_COLUMNPOS;
+ pDispatchArgs->Value <<= nAddedColumns;
+ ++pDispatchArgs;
+
+ // the properties to forward to the new column
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> aColumnProps(1);
+ ::com::sun::star::beans::PropertyValue* pColumnProps = aColumnProps.getArray();
+
+ // the label
+ pColumnProps->Name = FM_PROP_LABEL;
+ pColumnProps->Value <<= getLabelName(xCurrentModelSet);
+ ++pColumnProps;
+
+ // for all other props : transfer them
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> xControlModelInfo( xCurrentModelSet->getPropertySetInfo());
+ DBG_ASSERT(xControlModelInfo.is(), "FmXFormShell::CreateExternalView : the control model has no property info ! This will crash !");
+ aProps = xControlModelInfo->getProperties();
+ const ::com::sun::star::beans::Property* pProps = aProps.getConstArray();
+
+ // realloc the control description sequence
+ sal_Int32 nExistentDescs = pColumnProps - aColumnProps.getArray();
+ aColumnProps.realloc(nExistentDescs + aProps.getLength());
+ pColumnProps = aColumnProps.getArray() + nExistentDescs;
+
+ for (sal_Int32 i=0; i<aProps.getLength(); ++i, ++pProps)
+ {
+ if (pProps->Name.equals(FM_PROP_LABEL))
+ // already set
+ continue;
+ if (pProps->Name.equals(FM_PROP_DEFAULTCONTROL))
+ // allow the column's own "default control"
+ continue;
+ if (pProps->Attributes & ::com::sun::star::beans::PropertyAttribute::READONLY)
+ // assume that properties which are readonly for the control are ro for the column to be created, too
+ continue;
+
+ pColumnProps->Name = pProps->Name;
+ pColumnProps->Value = xCurrentModelSet->getPropertyValue(pProps->Name);
+ ++pColumnProps;
+ }
+ aColumnProps.realloc(pColumnProps - aColumnProps.getArray());
+
+ // columns props are a dispatch argument
+ pDispatchArgs->Name = ::rtl::OUString::createFromAscii("ColumnProperties"); // TODO : fmurl.*
+ pDispatchArgs->Value = ::com::sun::star::uno::makeAny(aColumnProps);
+ ++pDispatchArgs;
+ DBG_ASSERT(nDispatchArgs == (pDispatchArgs - aDispatchArgs.getConstArray()),
+ "FmXFormShell::CreateExternalView : forgot to adjust nDispatchArgs ?");
+
+ // dispatch the "add column"
+ xAddColumnDispatch->dispatch(aAddColumnURL, aDispatchArgs);
+ ++nAddedColumns;
+ }
+
+ // now for the radio button handling
+ sal_Int16 nOffset(0);
+ // properties describing the "direct" column properties
+ const sal_Int16 nListBoxDescription = 6;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> aListBoxDescription(nListBoxDescription);
+ for ( ConstFmMapUString2UStringIterator aCtrlSource = aRadioControlSources.begin();
+ aCtrlSource != aRadioControlSources.end();
+ ++aCtrlSource, ++nOffset
+ )
+ {
+
+ ::com::sun::star::beans::PropertyValue* pListBoxDescription = aListBoxDescription.getArray();
+ // label
+ pListBoxDescription->Name = FM_PROP_LABEL;
+ pListBoxDescription->Value <<= (*aCtrlSource).first;
+ ++pListBoxDescription;
+
+ // control source
+ pListBoxDescription->Name = FM_PROP_CONTROLSOURCE;
+ pListBoxDescription->Value <<= (*aCtrlSource).second;
+ ++pListBoxDescription;
+
+ // bound column
+ pListBoxDescription->Name = FM_PROP_BOUNDCOLUMN;
+ pListBoxDescription->Value <<= (sal_Int16)1;
+ ++pListBoxDescription;
+
+ // content type
+ pListBoxDescription->Name = FM_PROP_LISTSOURCETYPE;
+ ::com::sun::star::form::ListSourceType eType = ::com::sun::star::form::ListSourceType_VALUELIST;
+ pListBoxDescription->Value = ::com::sun::star::uno::makeAny(eType);
+ ++pListBoxDescription;
+
+ // list source
+ MapUString2UstringSeq::const_iterator aCurrentListSource = aRadioListSources.find((*aCtrlSource).first);
+ DBG_ASSERT(aCurrentListSource != aRadioListSources.end(),
+ "FmXFormShell::CreateExternalView : inconsistent radio descriptions !");
+ pListBoxDescription->Name = FM_PROP_LISTSOURCE;
+ pListBoxDescription->Value = ::com::sun::star::uno::makeAny((*aCurrentListSource).second);
+ ++pListBoxDescription;
+
+ // value list
+ MapUString2UstringSeq::const_iterator aCurrentValueList = aRadioValueLists.find((*aCtrlSource).first);
+ DBG_ASSERT(aCurrentValueList != aRadioValueLists.end(),
+ "FmXFormShell::CreateExternalView : inconsistent radio descriptions !");
+ pListBoxDescription->Name = FM_PROP_STRINGITEMLIST;
+ pListBoxDescription->Value = ::com::sun::star::uno::makeAny(((*aCurrentValueList).second));
+ ++pListBoxDescription;
+
+ DBG_ASSERT(nListBoxDescription == (pListBoxDescription - aListBoxDescription.getConstArray()),
+ "FmXFormShell::CreateExternalView : forgot to adjust nListBoxDescription ?");
+
+ // properties describing the column "meta data"
+ const sal_Int16 nDispatchArgs = 3;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> aDispatchArgs(nDispatchArgs);
+ ::com::sun::star::beans::PropertyValue* pDispatchArgs = aDispatchArgs.getArray();
+
+ // column type : listbox
+ pDispatchArgs->Name = FMARG_ADDCOL_COLUMNTYPE;
+ ::rtl::OUString fColName = FM_COL_LISTBOX;
+ pDispatchArgs->Value <<= fColName;
+// pDispatchArgs->Value <<= (::rtl::OUString)FM_COL_LISTBOX;
+ ++pDispatchArgs;
+
+ // column position
+ pDispatchArgs->Name = FMARG_ADDCOL_COLUMNPOS;
+ FmMapUString2Int16::const_iterator aOffset = aRadioPositions.find((*aCtrlSource).first);
+ DBG_ASSERT(aOffset != aRadioPositions.end(),
+ "FmXFormShell::CreateExternalView : inconsistent radio descriptions !");
+ sal_Int16 nPosition = (*aOffset).second;
+ nPosition += nOffset;
+ // we alread inserted nOffset additinal columns ....
+ pDispatchArgs->Value <<= nPosition;
+ ++pDispatchArgs;
+
+ // the
+ pDispatchArgs->Name = ::rtl::OUString::createFromAscii("ColumnProperties"); // TODO : fmurl.*
+ pDispatchArgs->Value = ::com::sun::star::uno::makeAny(aListBoxDescription);
+ ++pDispatchArgs;
+ DBG_ASSERT(nDispatchArgs == (pDispatchArgs - aDispatchArgs.getConstArray()),
+ "FmXFormShell::CreateExternalView : forgot to adjust nDispatchArgs ?");
+
+ // dispatch the "add column"
+ xAddColumnDispatch->dispatch(aAddColumnURL, aDispatchArgs);
+ ++nAddedColumns;
+ }
+
+
+ DBG_ASSERT(nAddedColumns > 0, "FmXFormShell::CreateExternalView : no controls (inconsistent) !");
+ // we should have checked if we have any usable controls (see above).
+
+ // "load" the "form" of the external view
+ ::com::sun::star::beans::PropertyValue aArg;
+ aArg.Name = FMARG_ATTACHTO_MASTERFORM;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xForm(xCurrentNavController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ aArg.Value <<= xForm;
+
+ m_xExternalDisplayedForm = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(xForm, ::com::sun::star::uno::UNO_QUERY);
+ // do this before dispatching the "attach" command, as the atach may result in a call to our queryDispatch (for the FormSlots)
+ // whichs needs the m_xExternalDisplayedForm
+
+ xAttachDispatch->dispatch(aAttachURL, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>(&aArg, 1));
+
+ m_xExtViewTriggerController = xCurrentNavController;
+
+ // we want to know modifications done in the external view
+ // if the external controller is a ::com::sun::star::form::XFormController we can use all our default handlings for it
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> xFormController(m_xExternalViewController, ::com::sun::star::uno::UNO_QUERY);
+ if (xFormController.is())
+ xFormController->addActivateListener((::com::sun::star::form::XFormControllerListener*)this);
+ }
+ }
+#ifdef DBG_UTIL
+ else
+ {
+ DBG_ERROR("FmXFormShell::CreateExternalView : could not create the external form view !");
+ }
+#endif
+ InvalidateSlot(SID_FM_VIEW_AS_GRID, sal_True, sal_False);
+}
+
+//==============================================================================
+//==============================================================================
+SearchableControlIterator::SearchableControlIterator(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xStartingPoint)
+ :IndexAccessIterator(xStartingPoint)
+{
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SearchableControlIterator::ShouldHandleElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement)
+{
+ // wenn das Ding eine ControlSource und einen BoundField-::com::sun::star::beans::Property hat
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xProperties(xElement, ::com::sun::star::uno::UNO_QUERY);
+ if (::utl::hasProperty(FM_PROP_CONTROLSOURCE, xProperties) && ::utl::hasProperty(FM_PROP_BOUNDFIELD, xProperties))
+ {
+ // und das BoundField gueltig ist
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xField( *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)(xProperties->getPropertyValue(FM_PROP_BOUNDFIELD).getValue()));
+ if (xField.is())
+ {
+ // nehmen wir's
+ m_sCurrentValue = ::utl::getString(xProperties->getPropertyValue(FM_PROP_CONTROLSOURCE));
+ return sal_True;
+ }
+ }
+
+ // wenn es ein Grid-Control ist
+ if (::utl::hasProperty(FM_PROP_CLASSID, xProperties))
+ {
+ ::com::sun::star::uno::Any aClassId( xProperties->getPropertyValue(FM_PROP_CLASSID) );
+ if (::utl::getINT16(aClassId) == ::com::sun::star::form::FormComponentType::GRIDCONTROL)
+ {
+ m_sCurrentValue = ::rtl::OUString();
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool SearchableControlIterator::ShouldStepInto(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xContainer) const
+{
+ return sal_True;
+}
+
+//==============================================================================
+//==============================================================================
+SV_IMPL_PTRARR(StatusForwarderArray, SfxStatusForwarder*)
+
+SFX_IMPL_MENU_CONTROL(ControlConversionMenuController, SfxBoolItem);
+
+//------------------------------------------------------------------------------
+ControlConversionMenuController::ControlConversionMenuController(sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings)
+ :SfxMenuControl(nId, rBindings)
+ ,m_pMainMenu(&rMenu)
+ ,m_pConversionMenu(NULL)
+{
+ if (nId == SID_FM_CHANGECONTROLTYPE)
+ {
+ m_pConversionMenu = FmXFormShell::GetConversionMenu();
+ rMenu.SetPopupMenu(nId, m_pConversionMenu);
+
+ for (sal_Int16 i=0; i<m_pConversionMenu->GetItemCount(); ++i)
+ {
+ rBindings.Invalidate(m_pConversionMenu->GetItemId(i));
+ SfxStatusForwarder* pForwarder = new SfxStatusForwarder(m_pConversionMenu->GetItemId(i), *this);
+ m_aStatusForwarders.C40_INSERT(SfxStatusForwarder, pForwarder, m_aStatusForwarders.Count());
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+ControlConversionMenuController::~ControlConversionMenuController()
+{
+ m_pMainMenu->SetPopupMenu(SID_FM_CHANGECONTROLTYPE, NULL);
+ delete m_pConversionMenu;
+}
+
+//------------------------------------------------------------------------------
+void ControlConversionMenuController::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
+{
+ if (nSID == GetId())
+ SfxMenuControl::StateChanged(nSID, eState, pState);
+ else if (FmXFormShell::IsControlConversionSlot(nSID))
+ {
+ if ((m_pConversionMenu->GetItemPos(nSID) != MENU_ITEM_NOTFOUND) && (eState == SFX_ITEM_DISABLED))
+ {
+ m_pConversionMenu->RemoveItem(m_pConversionMenu->GetItemPos(nSID));
+ }
+ else if ((m_pConversionMenu->GetItemPos(nSID) == MENU_ITEM_NOTFOUND) && (eState != SFX_ITEM_DISABLED))
+ {
+ // We can't simply re-insert the item because we have a clear order for all the our items.
+ // So first we have to determine the position of the item to insert.
+ PopupMenu* pSource = FmXFormShell::GetConversionMenu();
+ sal_Int16 nSourcePos = pSource->GetItemPos(nSID);
+ DBG_ASSERT(nSourcePos != MENU_ITEM_NOTFOUND, "ControlConversionMenuController::StateChanged : FmXFormShell supplied an invalid menu !");
+ sal_Int16 nPrevInSource = nSourcePos;
+ sal_Int16 nPrevInConversion = MENU_ITEM_NOTFOUND;
+ while (nPrevInSource>0)
+ {
+ sal_Int16 nPrevId = pSource->GetItemId(--nPrevInSource);
+
+ // do we have the source's predecessor in our conversion menu, too ?
+ nPrevInConversion = m_pConversionMenu->GetItemPos(nPrevId);
+ if (nPrevInConversion != MENU_ITEM_NOTFOUND)
+ break;
+ }
+ if (MENU_ITEM_NOTFOUND == nPrevInConversion)
+ // none of the items which precede the nSID-slot in the source menu are present in our conversion menu
+ nPrevInConversion = 0 - 1; // put the item at the first position
+ m_pConversionMenu->InsertItem(nSID, pSource->GetItemText(nSID), pSource->GetItemBits(nSID), ++nPrevInConversion);
+ m_pConversionMenu->SetItemImage(nSID, pSource->GetItemImage(nSID));
+ m_pConversionMenu->SetHelpId(nSID, pSource->GetHelpId(nSID));
+
+ delete pSource;
+ }
+ m_pMainMenu->EnableItem(SID_FM_CHANGECONTROLTYPE, m_pConversionMenu->GetItemCount() > 0);
+ }
+ else
+ {
+ DBG_ERROR("ControlConversionMenuController::StateChanged : unknown id !");
+ }
+}
+
+//==================================================================
+
+FmCursorActionThread::FmCursorActionThread(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xDataSource, const UniString& _rStopperCaption,
+ const UniString& _rPath)
+ :m_xDataSource(_xDataSource)
+ ,m_sStopperCaption(_rStopperCaption)
+ ,m_bCanceled(sal_False)
+ ,m_bDeleteMyself(sal_False)
+ ,m_bDisposeCursor(sal_False)
+ ,m_bTerminated(sal_False)
+ ,m_bRunFailed(sal_False)
+ ,m_sAccessPath(_rPath)
+{
+ DBG_ASSERT(m_xDataSource.is() && ::com::sun::star::uno::Reference< ::com::sun::star::util::XCancellable>(m_xDataSource, ::com::sun::star::uno::UNO_QUERY).is(),
+ "FmCursorActionThread::FmCursorActionThread : invalid cursor !");
+}
+
+//------------------------------------------------------------------------------
+void FmCursorActionThread::run()
+{
+ // On instantiation of a SfxCancellable the application is notified and 'switches on' the red stop button.
+ // Unfortunally this is conditioned with the acquirement of the solar mutex, and the application tries
+ // only once and ignores the notification if it fails.
+ // To prevent that we get the solar mutex and _block_ 'til we got it.
+ // As we are in the 'top level execution' of this thread (with a rather small stack and no other mutexes locked)
+ // we shouldn't experience problems with deadlocks ...
+ ::vos::OClearableGuard aSolarGuard(Application::GetSolarMutex());
+ ThreadStopper* pStopper = new ThreadStopper(this, m_sStopperCaption);
+ aSolarGuard.clear();
+
+ // we're not canceled yet
+ ::osl::ClearableMutexGuard aInitGuard(m_aAccessSafety);
+ m_bCanceled = sal_False;
+ m_bRunFailed = sal_False;
+ aInitGuard.clear();
+
+ // start it
+ try
+ {
+ RunImpl();
+ }
+ catch(::com::sun::star::sdbc::SQLException e)
+ {
+ ::osl::MutexGuard aErrorGuard(m_aAccessSafety);
+ m_bRunFailed = sal_True;
+ m_aRunException = e;
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmCursorActionThread::run : catched a non-database exception !");
+ }
+
+
+ sal_Bool bReallyCanceled;
+ ::osl::ClearableMutexGuard aEvalGuard(m_aAccessSafety);
+ bReallyCanceled = m_bCanceled;
+ aEvalGuard.clear();
+
+ pStopper->OwnerTerminated();
+ // this will cause the stopper to delete itself (in the main thread) so we don't have to care of the
+ // solar mutex
+}
+
+//------------------------------------------------------------------------------
+void FmCursorActionThread::onTerminated()
+{
+ ::osl::ClearableMutexGuard aResetGuard(m_aAccessSafety);
+ if (m_aTerminationHandler.IsSet())
+ m_aTerminationHandler.Call(this);
+
+ if (IsCursorDisposeEnabled())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xDataSourceComponent(m_xDataSource, ::com::sun::star::uno::UNO_QUERY);
+ if (xDataSourceComponent.is())
+ xDataSourceComponent->dispose();
+ }
+
+ aResetGuard.clear();
+ // with this StopItWait has a chance to do it's Terminated()
+
+ ::osl::MutexGuard aGuard(m_aFinalExitControl);
+ // Terminated() in StopItWait still returns sal_False
+ m_bTerminated = sal_True;
+ // Terminated() now returns sal_True, but StopItWait can't exit until this method exits (because of the guarded m_aFinalExitControl)
+
+ if (IsSelfDeleteEnabled())
+ delete this;
+}
+
+//------------------------------------------------------------------------------
+void FmCursorActionThread::StopIt()
+{
+ ::osl::MutexGuard aGuard(m_aAccessSafety);
+ m_bCanceled = sal_True;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XCancellable> xCancel(m_xDataSource, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xCancel.is(), "FmCursorActionThread::StopIt : invalid cursor !");
+ xCancel->cancel();
+}
+
+//------------------------------------------------------------------------------
+void FmCursorActionThread::StopItWait()
+{
+ StopIt();
+
+ while (!Terminated())
+ ;
+
+ // OnTerminated has been called, but we can't simply exit : Suppose the caller want's to delete the thread object
+ // immediately after returning from StopItWait. With the following guard we ensure that we exit this method
+ // only after onTerminated has exited.
+ ::osl::ClearableMutexGuard aGuard(m_aFinalExitControl);
+
+ // now onTerminated has exited, so we can leave, too
+}
+
+//------------------------------------------------------------------------------
+FmCursorActionThread::ThreadStopper::ThreadStopper(FmCursorActionThread* pOwner, const UniString& rTitle)
+ :SfxCancellable(SFX_APP()->GetCancelManager(), rTitle)
+ ,m_pOwner(pOwner)
+{
+}
+
+//------------------------------------------------------------------------------
+void FmCursorActionThread::ThreadStopper::Cancel()
+{
+ if (!m_pOwner) // the owner is already terminated and we're waiting for the OnDeleteInMainThread event
+ return;
+
+ ::osl::MutexGuard aGuard(m_pOwner->m_aAccessSafety);
+ if (IsCancelled())
+ // we already did pass this to our owner
+ return;
+
+ SfxCancellable::Cancel();
+ m_pOwner->StopIt();
+}
+
+//------------------------------------------------------------------------------
+void FmCursorActionThread::ThreadStopper::OwnerTerminated()
+{
+ m_pOwner = NULL;
+ Application::PostUserEvent(LINK(this, FmCursorActionThread::ThreadStopper, OnDeleteInMainThread), this);
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmCursorActionThread::ThreadStopper, OnDeleteInMainThread, FmCursorActionThread::ThreadStopper*, pThis)
+{
+ delete pThis;
+ return 0L;
+}
+
+//==============================================================================
+//==============================================================================
+
+//------------------------------------------------------------------------------
+FmFormNavigationDispatcher::FmFormNavigationDispatcher(const ::com::sun::star::util::URL& _rUrl, sal_Int16 _nSlotId, SfxBindings& _rBindings, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm, const UniString& _rAccessPath)
+ :FmSlotDispatch(_rUrl, _nSlotId, _rBindings)
+ ,m_bActive(sal_False)
+ ,m_xCursor(_xForm)
+ ,m_sAccessPath(_rAccessPath)
+{
+}
+
+//------------------------------------------------------------------------------
+void FmFormNavigationDispatcher::SetActive(sal_Bool bEnable)
+{
+ if (m_bActive == bEnable)
+ return;
+
+ m_bActive = bEnable;
+
+ // broadcast the initial state
+ if (bEnable)
+ {
+ SfxPoolItem* pState = NULL;
+ SfxItemState eInitialState = GetBindings().QueryState(m_nSlot, pState);
+ NotifyState(eInitialState, pState);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmFormNavigationDispatcher::SetStatus(SfxItemState eState, const SfxPoolItem* pState)
+{
+ m_aNonActiveState = BuildEvent(eState, pState);
+ NOTIFY_LISTENERS(m_aStatusListeners, ::com::sun::star::frame::XStatusListener, statusChanged, m_aNonActiveState);
+}
+
+//------------------------------------------------------------------------------
+void FmFormNavigationDispatcher::StateChanged(sal_Int16 nSID, SfxItemState eState, const SfxPoolItem* pState)
+{
+ if (IsActive())
+ FmSlotDispatch::StateChanged(nSID, eState, pState);
+}
+
+//------------------------------------------------------------------------------
+void FmFormNavigationDispatcher::NotifyState(SfxItemState eState, const SfxPoolItem* pState, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>& rListener)
+{
+ if (IsActive())
+ FmSlotDispatch::NotifyState(eState, pState, rListener);
+ else
+ if (rListener.is())
+ rListener->statusChanged(m_aNonActiveState);
+ else
+ NOTIFY_LISTENERS(m_aStatusListeners, ::com::sun::star::frame::XStatusListener, statusChanged, m_aNonActiveState);
+}
+
+//------------------------------------------------------------------------------
+void FmFormNavigationDispatcher::dispose(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_aNonActiveState.Source = NULL;
+ // the Source is a reference to myself, so we would never be deleted without this
+ FmSlotDispatch::dispose();
+}
+
+//==============================================================================
+
+
+
+
diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx
new file mode 100644
index 0000000000..6925c4ad61
--- /dev/null
+++ b/svx/source/form/fmsrccfg.cxx
@@ -0,0 +1,356 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmsrccfg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _FMSRCCF_HXX_
+#include "fmsrccfg.hxx"
+#endif // _FMSRCCF_HXX_
+
+#ifndef _SFXFILEREC_HXX //autogen
+#include <svtools/filerec.hxx>
+#endif
+
+// ===================================================================================================
+// = struct FmSearchParams - Parameter einer Suche
+// ===================================================================================================
+
+//------------------------------------------------------------------------
+BOOL FmSearchParams::operator ==(const FmSearchParams& rComp) const
+{
+ if (!strHistory.Equals(rComp.strHistory))
+ return FALSE;
+ if (nSearchForType != rComp.nSearchForType)
+ return FALSE;
+ if (bAllFields != rComp.bAllFields)
+ return FALSE;
+ if (nPosition != rComp.nPosition)
+ return FALSE;
+ if (bUseFormatter != rComp.bUseFormatter)
+ return FALSE;
+ if (bCaseSensitive != rComp.bCaseSensitive)
+ return FALSE;
+ if (bBackwards != rComp.bBackwards)
+ return FALSE;
+ if (bWildcard != rComp.bWildcard)
+ return FALSE;
+ if (bRegular != rComp.bRegular)
+ return FALSE;
+ if (bApproxSearch != rComp.bApproxSearch)
+ return FALSE;
+ if (bLevRelaxed != rComp.bLevRelaxed)
+ return FALSE;
+ if (nLevOther != rComp.nLevOther)
+ return FALSE;
+ if (nLevShorter != rComp.nLevShorter)
+ return FALSE;
+ if (nLevLonger != rComp.nLevLonger)
+ return FALSE;
+
+ // strSingleSearchField wird nicht mit verglichen : dieser Operator ist nur fuer die persistenten Eigenschaften gedacht,
+ // und strSingleSearchField ist nicht persistent
+ return TRUE;
+}
+
+// ===================================================================================================
+// = class FmSearchConfigItem - ein ConfigItem, dass sich Suchparameter merkt
+// ===================================================================================================
+
+#define FM_SEARCH_TAG_PARAMS 1
+#define FM_SEARCH_CONFIG_VERSION_SO50 1 // nur in internen Versionen und der 5.1 beta benutzt worden
+#define FM_SEARCH_CONFIG_VERSION_SO51 2 // zur 5.1 eingesetzt
+#define FM_SEARCH_CONFIG_VERSION_SO52 3 // ab der SRC557
+
+//------------------------------------------------------------------------
+FmSearchConfigItem::FmSearchConfigItem() : SfxConfigItem(SFX_ITEMTYPE_SVXSEARCHPARAMS)
+{
+}
+
+//------------------------------------------------------------------------
+INT32 FmSearchConfigItem::CalcCheckSum(const FmSearchParams& aParams, short nFormatVersion)
+{
+ // ziemlich billig, aber es reicht ...
+ sal_Int32 nReturn = 0;
+ for (xub_StrLen i=0; i<aParams.strHistory.Len(); ++i)
+ nReturn += (sal_Int32)aParams.strHistory.GetChar(i);
+
+ nReturn += aParams.bAllFields;
+ nReturn += aParams.nPosition;
+ nReturn += aParams.bUseFormatter;
+ nReturn += aParams.bCaseSensitive;
+ nReturn += aParams.bBackwards;
+ nReturn += aParams.bWildcard;
+ nReturn += aParams.bRegular;
+ nReturn += aParams.bApproxSearch;
+ nReturn += aParams.bLevRelaxed;
+ nReturn += aParams.nLevOther;
+ nReturn += aParams.nLevShorter;
+ nReturn += aParams.nLevLonger;
+
+ if (nFormatVersion >= FM_SEARCH_CONFIG_VERSION_SO52)
+ nReturn += aParams.nSearchForType;
+
+ return nReturn;
+}
+
+//------------------------------------------------------------------------
+int FmSearchConfigItem::Load(SvStream& rStore)
+{
+ SfxSingleRecordReader aRecord(&rStore);
+
+ if (aRecord.GetTag() == FM_SEARCH_TAG_PARAMS)
+ {
+ if (aRecord.HasVersion(FM_SEARCH_CONFIG_VERSION_SO51)) // 5.1 oder groesser
+ {
+ INT32 nCheckSum;
+ *aRecord >> nCheckSum;
+
+ FmSearchParams aParams;
+ aParams.strSingleSearchField.Erase();
+
+ (*aRecord).ReadByteString(aParams.strHistory, gsl_getSystemTextEncoding());
+
+ INT16 nBitField;
+ *aRecord >> nBitField;
+ nBitField >>= 0; aParams.bAllFields = nBitField & 0x0001;
+ nBitField >>= 1; aParams.nPosition = nBitField & 0x0003;
+ nBitField >>= 2; aParams.bUseFormatter = nBitField & 0x0001;
+ nBitField >>= 1; aParams.bCaseSensitive = nBitField & 0x0001;
+ nBitField >>= 1; aParams.bBackwards = nBitField & 0x0001;
+ nBitField >>= 1; aParams.bWildcard = nBitField & 0x0001;
+ nBitField >>= 1; aParams.bRegular = nBitField & 0x0001;
+ nBitField >>= 1; aParams.bApproxSearch = nBitField & 0x0001;
+ nBitField >>= 1; aParams.bLevRelaxed = nBitField & 0x0001;
+
+ *aRecord >> aParams.nLevOther;
+ *aRecord >> aParams.nLevShorter;
+ *aRecord >> aParams.nLevLonger;
+
+ if (aRecord.HasVersion(FM_SEARCH_CONFIG_VERSION_SO52)) // 5.2 oder groesser
+ {
+ nBitField >>= 1; aParams.nSearchForType = nBitField & 0x0003;
+ }
+ else
+ aParams.nSearchForType = 0;
+
+
+ if (nCheckSum == CalcCheckSum(aParams, aRecord.GetVersion()))
+ {
+ m_aParams = aParams;
+ return ERR_OK;
+ }
+ }
+ else if (aRecord.HasVersion(FM_SEARCH_CONFIG_VERSION_SO50))
+ {
+ INT32 nCheckSum;
+ *aRecord >> nCheckSum;
+
+ FmSearchParams aParams;
+ aParams.strSingleSearchField.Erase();
+
+ (*aRecord).ReadByteString(aParams.strHistory, gsl_getSystemTextEncoding());
+
+ // kleine Verrenkung, da die Bools alle BitFields sind
+ BOOL bTempBool;
+ *aRecord >> bTempBool; aParams.bAllFields = bTempBool;
+ *aRecord >> bTempBool; aParams.bUseFormatter = bTempBool;
+ *aRecord >> bTempBool; aParams.bCaseSensitive = bTempBool;
+ *aRecord >> bTempBool; aParams.bBackwards = bTempBool;
+ *aRecord >> bTempBool; aParams.bWildcard = bTempBool;
+ *aRecord >> bTempBool; aParams.bRegular = bTempBool;
+ *aRecord >> bTempBool; aParams.bApproxSearch = bTempBool;
+ *aRecord >> bTempBool; aParams.bLevRelaxed = bTempBool;
+
+ *aRecord >> aParams.nLevOther;
+ *aRecord >> aParams.nLevShorter;
+ *aRecord >> aParams.nLevLonger;
+
+ USHORT nTempShort;
+ *aRecord >> nTempShort; aParams.nPosition = nTempShort;
+
+ if (nCheckSum == CalcCheckSum(aParams, FM_SEARCH_CONFIG_VERSION_SO50))
+ {
+ m_aParams = aParams;
+ return ERR_OK;
+ }
+ }
+ }
+
+ UseDefault();
+ return ERR_READ;
+}
+
+//------------------------------------------------------------------------
+BOOL FmSearchConfigItem::Store(SvStream& rStore)
+{
+ SfxSingleRecordWriter aRecord(&rStore, FM_SEARCH_TAG_PARAMS, FM_SEARCH_CONFIG_VERSION_SO52);
+
+ // eine Checksumme an den Anfang
+ INT32 nCheckSum = CalcCheckSum(m_aParams, FM_SEARCH_CONFIG_VERSION_SO52);
+ *aRecord << nCheckSum;
+
+ (*aRecord).WriteByteString(m_aParams.strHistory, gsl_getSystemTextEncoding());
+
+ INT16 nBitField = 0;
+ nBitField |= (INT16(m_aParams.bAllFields & 0x0001)) << 0;
+ nBitField |= (INT16(m_aParams.nPosition & 0x0003)) << 1;
+ nBitField |= (INT16(m_aParams.bUseFormatter & 0x0001)) << 3;
+ nBitField |= (INT16(m_aParams.bCaseSensitive & 0x0001)) << 4;
+ nBitField |= (INT16(m_aParams.bBackwards & 0x0001)) << 5;
+ nBitField |= (INT16(m_aParams.bWildcard & 0x0001)) << 6;
+ nBitField |= (INT16(m_aParams.bRegular & 0x0001)) << 7;
+ nBitField |= (INT16(m_aParams.bApproxSearch & 0x0001)) << 8;
+ nBitField |= (INT16(m_aParams.bLevRelaxed & 0x0001)) << 9;
+ nBitField |= (INT16(m_aParams.nSearchForType & 0x0003)) << 10;
+ // because of nSearchForType this is format version 5.2
+
+ *aRecord << nBitField;
+
+ *aRecord << m_aParams.nLevOther;
+ *aRecord << m_aParams.nLevShorter;
+ *aRecord << m_aParams.nLevLonger;
+
+ return TRUE;
+}
+
+//------------------------------------------------------------------------
+void FmSearchConfigItem::UseDefault()
+{
+ m_aParams.strHistory.Erase();
+ m_aParams.strSingleSearchField = String();
+ m_aParams.bAllFields = FALSE;
+ m_aParams.nPosition = MATCHING_ANYWHERE;
+ m_aParams.bUseFormatter = TRUE;
+ m_aParams.bCaseSensitive = FALSE;
+ m_aParams.bBackwards = FALSE;
+ m_aParams.bWildcard = FALSE;
+ m_aParams.bRegular = FALSE;
+ m_aParams.bApproxSearch = FALSE;
+ m_aParams.bLevRelaxed = TRUE;
+ m_aParams.nLevOther = 2;
+ m_aParams.nLevShorter = 2;
+ m_aParams.nLevLonger = 2;
+
+ SetDefault(TRUE);
+}
+
+// ===================================================================================================
+// = class FmSearchConfigAdmin - verwaltet den Zugriff auf das einzige FmSearchConfigItem, das es gibt
+// ===================================================================================================
+
+// die statics der Klasse
+FmSearchConfigItem* FmSearchConfigAdmin::s_pItem = NULL;
+INT32 FmSearchConfigAdmin::s_nUsageCounter = 0;
+
+// die Instanz, die durch ihre globale Instantiierung dafuer sorgt, dass das ConfigItem erst bei
+// Programmende aufgeraeumt wird
+//FmSearchConfigAdmin g_aEnsureLastPossibleDelete;
+ // da der FmSearchConfigAdmin einen Usage-Counter hat, wird das von ihm verwaltete Item wirklich erst
+ // mit dem Beenden des Office endgueltige aufgeraeumt, dann naemlich wird diese Instanz hier weggeworfen.
+ // Geladen wird es erst bei Benutzung : sobald naemlich jemand von einer FmSearchConfigAdmin-Instanz
+ // die Params erfragt. Also schadet dieses eine zusaetzliche Objekt niemandem.
+
+
+
+DBG_NAME(FmSearchConfigAdmin);
+//------------------------------------------------------------------------
+FmSearchConfigAdmin::FmSearchConfigAdmin()
+{
+ DBG_CTOR(FmSearchConfigAdmin,NULL);
+
+ ++s_nUsageCounter;
+}
+
+//------------------------------------------------------------------------
+FmSearchConfigAdmin::~FmSearchConfigAdmin()
+{
+ if (--s_nUsageCounter == 0)
+ {
+ if (s_pItem)
+ {
+ s_pItem->StoreConfig(TRUE);
+ delete s_pItem;
+ s_pItem = NULL;
+ }
+ }
+
+ DBG_DTOR(FmSearchConfigAdmin,NULL);
+}
+
+//------------------------------------------------------------------------
+FmSearchConfigItem* FmSearchConfigAdmin::GetItem() const
+{
+ if (s_pItem)
+ return s_pItem;
+
+ s_pItem = new FmSearchConfigItem;
+ s_pItem->Initialize();
+ return s_pItem;
+}
+
+//------------------------------------------------------------------------
+void FmSearchConfigAdmin::PutParams(const FmSearchParams& rParams)
+{
+ if (GetParams() != rParams)
+ {
+ GetItem()->m_aParams = rParams;
+ GetItem()->SetDefault(FALSE); // damit wird das Ding implizit auch modified gesetzt
+ }
+}
+
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
new file mode 100644
index 0000000000..a231ed0709
--- /dev/null
+++ b/svx/source/form/fmsrcimp.cxx
@@ -0,0 +1,1234 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmsrcimp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _MULTIPRO_HXX
+#include "multipro.hxx"
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+
+#ifndef _FMSRCCF_HXX_
+#include "fmsrccfg.hxx"
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _WLDCRD_HXX //autogen
+#include <tools/wldcrd.hxx>
+#endif
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX //autogen
+#include <dialmgr.hxx>
+#endif
+
+#ifndef _CPPUHELPER_SERVICEFACTORY_HXX_
+#include <cppuhelper/servicefactory.hxx>
+#endif
+
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _TXTCMP_HXX //autogen
+#include <svtools/txtcmp.hxx>
+#endif
+
+#ifndef _ISOLANG_HXX
+#include <tools/isolang.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_SDDB_XCOLUMNSSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_NUMBERFORMAT_HPP_
+#include <com/sun/star/util/NumberFormat.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATS_HPP_
+#include <com/sun/star/util/XNumberFormats.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+
+#ifndef _FMSRCIMP_HXX
+#include "fmsrcimp.hxx"
+#endif
+
+#ifndef _FMSEARCH_HXX
+#include "fmsearch.hxx"
+#endif
+
+#ifndef _FMSEARCH_HRC
+#include "fmsearch.hrc"
+#endif
+
+#ifndef _UTL_NUMBERS_HXX_
+#include <unotools/numbers.hxx>
+#endif
+
+
+//#define COMPARE_BOOKMARKS(a, b) compareUsrAny(a, b)
+#define COMPARE_BOOKMARKS(a, b) ::utl::compare(a, b)
+
+// damit ich waehrend des Debuggings keine inline-Methoden habe ...
+#if DEBUG || DBG_UTIL
+#define INLINE_METHOD
+#else
+#define INLINE_METHOD inline
+#endif // DEBUG || DBG_UTIL
+
+// ***************************************************************************************************
+
+SV_IMPL_OBJARR(SvInt32Array, sal_Int32);
+DECLARE_STL_VECTOR( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ,InterfaceArray);
+
+//========================================================================
+// = FmSearchThread
+//------------------------------------------------------------------------
+void FmSearchThread::run()
+{
+ m_pEngine->SearchNextImpl();
+};
+
+//------------------------------------------------------------------------
+void FmSearchThread::onTerminated()
+{
+ if (m_aTerminationHdl.IsSet())
+ m_aTerminationHdl.Call(this);
+ delete this;
+}
+
+//========================================================================
+// = FmRecordCountListener
+
+// SMART_UNO_IMPLEMENTATION(FmRecordCountListener, UsrObject);
+
+DBG_NAME(FmRecordCountListener);
+//------------------------------------------------------------------------
+FmRecordCountListener::FmRecordCountListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > & dbcCursor)
+{
+ DBG_CTOR(FmRecordCountListener,NULL);
+
+ m_xListening = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (dbcCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (!m_xListening.is())
+ return;
+
+ if (::utl::getBOOL(m_xListening->getPropertyValue(FM_PROP_ROWCOUNTFINAL)))
+ {
+ m_xListening = NULL;
+ // there's nothing to do as the record count is already known
+ return;
+ }
+
+ m_xListening->addPropertyChangeListener(FM_PROP_ROWCOUNT, (::com::sun::star::beans::XPropertyChangeListener*)this);
+}
+
+//------------------------------------------------------------------------
+Link FmRecordCountListener::SetPropChangeHandler(const Link& lnk)
+{
+ Link lnkReturn = m_lnkWhoWantsToKnow;
+ m_lnkWhoWantsToKnow = lnk;
+
+ if (m_xListening.is())
+ NotifyCurrentCount();
+
+ return lnkReturn;
+}
+
+//------------------------------------------------------------------------
+FmRecordCountListener::~FmRecordCountListener()
+{
+
+ DBG_DTOR(FmRecordCountListener,NULL);
+}
+
+//------------------------------------------------------------------------
+void FmRecordCountListener::DisConnect()
+{
+ if(m_xListening.is())
+ m_xListening->removePropertyChangeListener(FM_PROP_ROWCOUNT, (::com::sun::star::beans::XPropertyChangeListener*)this);
+ m_xListening = NULL;
+}
+
+//------------------------------------------------------------------------
+void SAL_CALL FmRecordCountListener::disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException )
+{
+ DBG_ASSERT(m_xListening.is(), "FmRecordCountListener::disposing should never have been called without a propset !");
+ DisConnect();
+}
+
+//------------------------------------------------------------------------
+void FmRecordCountListener::NotifyCurrentCount()
+{
+ if (m_lnkWhoWantsToKnow.IsSet())
+ {
+ DBG_ASSERT(m_xListening.is(), "FmRecordCountListener::NotifyCurrentCount : I have no propset ... !?");
+ void* pTheCount = (void*)::utl::getINT32(m_xListening->getPropertyValue(FM_PROP_ROWCOUNT));
+ m_lnkWhoWantsToKnow.Call(pTheCount);
+ }
+}
+
+//------------------------------------------------------------------------
+void FmRecordCountListener::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt)
+{
+ NotifyCurrentCount();
+}
+
+//========================================================================
+// FmSearchEngine - local classes
+//------------------------------------------------------------------------
+FmSearchEngine::SimpleTextWrapper::SimpleTextWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > & _xText)
+ :ControlTextWrapper(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > (_xText, ::com::sun::star::uno::UNO_QUERY))
+ ,m_xText(_xText)
+{
+ DBG_ASSERT(m_xText.is(), "FmSearchEngine::SimpleTextWrapper::SimpleTextWrapper : invalid argument !");
+}
+
+//------------------------------------------------------------------------
+::rtl::OUString FmSearchEngine::SimpleTextWrapper::getCurrentText() const
+{
+ return m_xText->getText();
+}
+
+//------------------------------------------------------------------------
+FmSearchEngine::ListBoxWrapper::ListBoxWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XListBox > & _xBox)
+ :ControlTextWrapper(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > (_xBox, ::com::sun::star::uno::UNO_QUERY))
+ ,m_xBox(_xBox)
+{
+ DBG_ASSERT(m_xBox.is(), "FmSearchEngine::ListBoxWrapper::ListBoxWrapper : invalid argument !");
+}
+
+//------------------------------------------------------------------------
+::rtl::OUString FmSearchEngine::ListBoxWrapper::getCurrentText() const
+{
+ return m_xBox->getSelectedItem();
+}
+
+//------------------------------------------------------------------------
+FmSearchEngine::CheckBoxWrapper::CheckBoxWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XCheckBox > & _xBox)
+ :ControlTextWrapper(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > (_xBox, ::com::sun::star::uno::UNO_QUERY))
+ ,m_xBox(_xBox)
+{
+ DBG_ASSERT(m_xBox.is(), "FmSearchEngine::CheckBoxWrapper::CheckBoxWrapper : invalid argument !");
+}
+
+//------------------------------------------------------------------------
+::rtl::OUString FmSearchEngine::CheckBoxWrapper::getCurrentText() const
+{
+ switch ((TriState)m_xBox->getState())
+ {
+ case STATE_NOCHECK: return rtl::OUString::createFromAscii("0");
+ case STATE_CHECK: return rtl::OUString::createFromAscii("1");
+ }
+ return rtl::OUString();
+}
+
+//========================================================================
+// = FmSearchEngine
+//------------------------------------------------------------------------
+sal_Bool FmSearchEngine::MoveCursor()
+{
+ sal_Bool bSuccess = sal_True;
+ try
+ {
+ if (m_bForward)
+ if (m_xSearchCursor.isLast())
+ m_xSearchCursor.first();
+ else
+ m_xSearchCursor.next();
+ else
+ if (m_xSearchCursor.isFirst())
+ {
+ FmRecordCountListener* prclListener = new FmRecordCountListener(m_xSearchCursor);
+ prclListener->acquire();
+ prclListener->SetPropChangeHandler(LINK(this, FmSearchEngine, OnNewRecordCount));
+
+ m_xSearchCursor.last();
+
+ prclListener->DisConnect();
+ prclListener->release();
+ }
+ else
+ m_xSearchCursor.previous();
+ }
+#if _DEBUG || DBG_UTIL
+ catch(::com::sun::star::sdbc::SQLException e)
+ {
+ String sDebugMessage;
+ sDebugMessage.AssignAscii("FmSearchEngine::MoveCursor : catched a DatabaseException (");
+ sDebugMessage += (const sal_Unicode*)e.SQLState;
+ sDebugMessage.AppendAscii(") !");
+ DBG_ERROR(ByteString(sDebugMessage, RTL_TEXTENCODING_ASCII_US).GetBuffer());
+
+ bSuccess = sal_False;
+ }
+ catch(::com::sun::star::uno::Exception e)
+ {
+ UniString sDebugMessage;
+ sDebugMessage.AssignAscii("FmSearchEngine::MoveCursor : catched an ::com::sun::star::uno::Exception (");
+ sDebugMessage += (const sal_Unicode*)e.Message;
+ sDebugMessage.AppendAscii(") !");
+ DBG_ERROR(ByteString(sDebugMessage, RTL_TEXTENCODING_ASCII_US).GetBuffer());
+
+ bSuccess = sal_False;
+ }
+#endif // _DEBUG || DBG_UTIL
+ catch(...)
+ {
+ DBG_ERROR("FmSearchEngine::MoveCursor : catched an unknown ::com::sun::star::uno::Exception !");
+ bSuccess = sal_False;
+ }
+
+
+ return bSuccess;
+}
+
+//------------------------------------------------------------------------
+INLINE_METHOD sal_Bool FmSearchEngine::MoveField(sal_Int32& nPos, FieldCollectionIterator& iter, const FieldCollectionIterator& iterBegin, const FieldCollectionIterator& iterEnd)
+{
+ sal_Bool bSuccess(sal_True);
+ if (m_bForward)
+ {
+ ++iter;
+ ++nPos;
+ if (iter == iterEnd)
+ {
+ bSuccess = MoveCursor();
+ iter = iterBegin;
+ nPos = 0;
+ }
+ } else
+ {
+ if (iter == iterBegin)
+ {
+ bSuccess = MoveCursor();
+ iter = iterEnd;
+ nPos = iter-iterBegin;
+ }
+ --iter;
+ --nPos;
+ }
+ return bSuccess;
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::BuildAndInsertFieldInfo(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xAllFields, sal_Int32 nField)
+{
+ // das Feld selber
+ ::com::sun::star::uno::Any anyCurrentField = xAllFields->getByIndex(nField);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xCurrentField = *(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)anyCurrentField.getValue();
+
+ // von dem weiss ich jetzt, dass es den DatabaseRecord-Service unterstuetzt (hoffe ich)
+ // fuer den FormatKey und den Typ brauche ich das PropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xProperties(xCurrentField, ::com::sun::star::uno::UNO_QUERY);
+
+ // die FieldInfo dazu aufbauen
+ FieldInfo fiCurrent;
+ fiCurrent.xContents = ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > (xCurrentField, ::com::sun::star::uno::UNO_QUERY);
+ fiCurrent.nFormatKey = ::utl::getINT32(xProperties->getPropertyValue(FM_PROP_FORMATKEY));
+ fiCurrent.bDoubleHandling = sal_False;
+ if (m_xFormatSupplier.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > xNumberFormats(m_xFormatSupplier->getNumberFormats());
+
+ sal_Int16 nFormatType = ::utl::getNumberFormatType(xNumberFormats, fiCurrent.nFormatKey) & ~((sal_Int16)::com::sun::star::util::NumberFormat::DEFINED);
+ fiCurrent.bDoubleHandling = (nFormatType != ::com::sun::star::util::NumberFormat::TEXT);
+ }
+
+ // und merken
+ m_arrUsedFields.insert(m_arrUsedFields.end(), fiCurrent);
+
+}
+//------------------------------------------------------------------------
+INLINE_METHOD ::rtl::OUString FmSearchEngine::FormatField(const FieldInfo& rField)
+{
+ DBG_ASSERT(!m_bUsingTextComponents, "FmSearchEngine::FormatField : im UsingTextComponents-Mode bitte FormatField(sal_Int32) benutzen !");
+
+ if (!m_xFormatter.is())
+ return ::rtl::OUString();
+ // sonst werden Datumsflder zum Beispiel zu irgendeinem Default-Wert formatiert
+
+ ::rtl::OUString sReturn;
+ try
+ {
+ if (rField.bDoubleHandling)
+ {
+ double fValue = rField.xContents->getDouble();
+ if (!rField.xContents->wasNull())
+ sReturn = m_xFormatter->convertNumberToString(rField.nFormatKey, fValue);
+ }
+ else
+ {
+ ::rtl::OUString sValue = rField.xContents->getString();
+ if (!rField.xContents->wasNull())
+ sReturn = m_xFormatter->formatString(rField.nFormatKey, sValue);
+ }
+ }
+ catch(...)
+ {
+ }
+
+
+ return sReturn;
+}
+
+//------------------------------------------------------------------------
+::rtl::OUString FmSearchEngine::FormatField(sal_Int32 nWhich)
+{
+ if (m_bUsingTextComponents)
+ {
+ DBG_ASSERT(nWhich < m_aControlTexts.size(), "FmSearchEngine::FormatField(sal_Int32) : invalid position !");
+ DBG_ASSERT(m_aControlTexts[nWhich] != NULL, "FmSearchEngine::FormatField(sal_Int32) : invalid object in array !");
+ DBG_ASSERT(m_aControlTexts[nWhich]->getControl().is(), "FmSearchEngine::FormatField : invalid control !");
+
+ if (m_nCurrentFieldIndex != -1)
+ {
+ DBG_ASSERT((nWhich == 0) || (nWhich == m_nCurrentFieldIndex), "FmSearchEngine::FormatField : Parameter nWhich ist ungueltig");
+ // analoge Situation wie unten
+ nWhich = m_nCurrentFieldIndex;
+ }
+
+ DBG_ASSERT((nWhich>=0) && (nWhich < m_aControlTexts.size()),
+ "FmSearchEngine::FormatField : invalid argument nWhich !");
+ return m_aControlTexts[m_nCurrentFieldIndex == -1 ? nWhich : m_nCurrentFieldIndex]->getCurrentText();
+ }
+ else
+ {
+ if (m_nCurrentFieldIndex != -1)
+ {
+ DBG_ASSERT((nWhich == 0) || (nWhich == m_nCurrentFieldIndex), "FmSearchEngine::FormatField : Parameter nWhich ist ungueltig");
+ // ich bin im single-field-modus, da ist auch die richtige Feld-Nummer erlaubt, obwohl dann der richtige ::com::sun::star::sdbcx::Index
+ // fuer meinen Array-Zugriff natuerlich 0 ist
+ nWhich = 0;
+ }
+
+ DBG_ASSERT((nWhich>=0) && (nWhich < (m_arrUsedFields.end() - m_arrUsedFields.begin())),
+ "FmSearchEngine::FormatField : Parameter nWhich ist ungueltig");
+ return FormatField(m_arrUsedFields[nWhich]);
+ }
+}
+
+//------------------------------------------------------------------------
+INLINE_METHOD FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchSpecial(sal_Bool _bSearchForNull, sal_Int32& nFieldPos,
+ FieldCollectionIterator& iterFieldLoop, const FieldCollectionIterator& iterBegin, const FieldCollectionIterator& iterEnd)
+{
+ // die Startposition merken
+ ::com::sun::star::uno::Any aStartMark = m_xSearchCursor.getBookmark();
+ FieldCollectionIterator iterInitialField = iterFieldLoop;
+
+ // --------------------------------------------------------------
+ sal_Bool bFound(sal_False);
+ sal_Bool bMovedAround(sal_False);
+ do
+ {
+ if (m_eMode == FmSearchDialog::SM_ALLOWSCHEDULE)
+ {
+ Application::Reschedule();
+ Application::Reschedule();
+ // do 2 reschedules because of #70226# : some things done within this loop's body may cause an user event
+ // to be posted (deep within vcl), and these user events will be handled before any keyinput or paintings
+ // or anything like that. So within each loop we create one user event and handle one user event (and no
+ // paintings and these), so the office seems to be frozen while searching.
+ // FS - 70226 - 02.12.99
+ }
+
+ // der aktuell zu vergleichende Inhalt
+ iterFieldLoop->xContents->getString(); // needed for wasNull
+ bFound = _bSearchForNull == iterFieldLoop->xContents->wasNull();
+ if (bFound)
+ break;
+
+ // naechstes Feld (implizit naechster Datensatz, wenn noetig)
+ if (!MoveField(nFieldPos, iterFieldLoop, iterBegin, iterEnd))
+ { // beim Bewegen auf das naechste Feld ging was schief ... weitermachen ist nicht drin, da das naechste Mal genau
+ // das selbe bestimmt wieder schief geht, also Abbruch
+ // vorher aber noch, damit das Weitersuchen an der aktuellen Position weitermacht :
+ m_aPreviousLocBookmark = m_xSearchCursor.getBookmark();
+ m_iterPreviousLocField = iterFieldLoop;
+ // und wech
+ return SR_ERROR;
+ }
+
+ bMovedAround = COMPARE_BOOKMARKS(aStartMark, m_xSearchCursor.getBookmark()) && (iterFieldLoop == iterInitialField);
+
+ if (nFieldPos == 0)
+ // das heisst, ich habe mich auf einen neuen Datensatz bewegt
+ PropagateProgress(bMovedAround);
+ // if we moved to the starting position we don't have to propagate an 'overflow' message
+ // FS - 07.12.99 - 68530
+
+ // abbrechen gefordert ?
+ if (CancelRequested())
+ return SR_CANCELED;
+
+ } while (!bMovedAround);
+
+ return bFound ? SR_FOUND : SR_NOTFOUND;
+}
+
+//------------------------------------------------------------------------
+INLINE_METHOD FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchWildcard(const ::rtl::OUString& strExpression, sal_Int32& nFieldPos,
+ FieldCollectionIterator& iterFieldLoop, const FieldCollectionIterator& iterBegin, const FieldCollectionIterator& iterEnd)
+{
+ // die Startposition merken
+ ::com::sun::star::uno::Any aStartMark = m_xSearchCursor.getBookmark();
+ FieldCollectionIterator iterInitialField = iterFieldLoop;
+
+ WildCard aSearchExpression(strExpression);
+
+ // --------------------------------------------------------------
+ sal_Bool bFound(sal_False);
+ sal_Bool bMovedAround(sal_False);
+ do
+ {
+ if (m_eMode == FmSearchDialog::SM_ALLOWSCHEDULE)
+ {
+ Application::Reschedule();
+ Application::Reschedule();
+ // do 2 reschedules because of #70226# : some things done within this loop's body may cause an user event
+ // to be posted (deep within vcl), and these user events will be handled before any keyinput or paintings
+ // or anything like that. So within each loop we create one user event and hanel one user event (and no
+ // paintings and these), so the office seems to be frozen while searching.
+ // FS - 70226 - 02.12.99
+ }
+
+ // der aktuell zu vergleichende Inhalt
+ ::rtl::OUString sCurrentCheck;
+ if (m_bFormatter)
+ sCurrentCheck = FormatField(nFieldPos);
+ else
+ sCurrentCheck = iterFieldLoop->xContents->getString();
+
+ if (!m_bCase)
+ {// normieren, wenn kein Gross/Klein
+ String sLanguage, sCountry;
+ ConvertLanguageToIsoNames(Application::GetAppInternational().GetLanguage(), sLanguage, sCountry);
+ sCurrentCheck.toLowerCase(::rtl::OLocale::registerLocale(sLanguage, sCountry));
+ }
+
+ // jetzt ist der Test einfach ...
+ bFound = aSearchExpression.Matches(sCurrentCheck);
+
+ if (bFound)
+ break;
+
+ // naechstes Feld (implizit naechster Datensatz, wenn noetig)
+ if (!MoveField(nFieldPos, iterFieldLoop, iterBegin, iterEnd))
+ { // beim Bewegen auf das naechste Feld ging was schief ... weitermachen ist nicht drin, da das naechste Mal genau
+ // das selbe bestimmt wieder schief geht, also Abbruch
+ // vorher aber noch, damit das Weitersuchen an der aktuellen Position weitermacht :
+ m_aPreviousLocBookmark = m_xSearchCursor.getBookmark();
+ m_iterPreviousLocField = iterFieldLoop;
+ // und wech
+ return SR_ERROR;
+ }
+
+ bMovedAround = COMPARE_BOOKMARKS(aStartMark, m_xSearchCursor.getBookmark()) && (iterFieldLoop == iterInitialField);
+
+ if (nFieldPos == 0)
+ // das heisst, ich habe mich auf einen neuen Datensatz bewegt
+ PropagateProgress(bMovedAround);
+ // if we moved to the starting position we don't have to propagate an 'overflow' message
+ // FS - 07.12.99 - 68530
+
+ // abbrechen gefordert ?
+ if (CancelRequested())
+ return SR_CANCELED;
+
+ } while (!bMovedAround);
+
+ return bFound ? SR_FOUND : SR_NOTFOUND;
+}
+
+//------------------------------------------------------------------------
+INLINE_METHOD FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchRegularApprox(const ::rtl::OUString& strExpression, sal_Int32& nFieldPos,
+ FieldCollectionIterator& iterFieldLoop, const FieldCollectionIterator& iterBegin, const FieldCollectionIterator& iterEnd)
+{
+ DBG_ASSERT(m_bLevenshtein || m_bRegular,
+ "FmSearchEngine::SearchRegularApprox : ungueltiger Suchmodus !");
+ DBG_ASSERT(!m_bLevenshtein || !m_bRegular,
+ "FmSearchEngine::SearchRegularApprox : kann nicht nach regulaeren Ausdruecken und nach Aehnlichkeiten gleichzeitig suchen !");
+
+ // Startposition merken
+ ::com::sun::star::uno::Any aStartMark = m_xSearchCursor.getBookmark();
+ FieldCollectionIterator iterInitialField = iterFieldLoop;
+
+ // Parameter sammeln
+ SearchParam aParam(strExpression, m_bRegular ? SearchParam::SRCH_REGEXP : SearchParam::SRCH_LEVDIST, m_bCase, sal_False, sal_False);
+ if (m_bLevenshtein)
+ {
+ aParam.SetSrchRelaxed(m_bLevRelaxed);
+ aParam.SetLEVOther(m_nLevOther);
+ aParam.SetLEVShorter(m_nLevShorter);
+ aParam.SetLEVLonger(m_nLevLonger);
+ }
+
+ SearchText aLocalEngine(aParam, GetpApp()->GetAppInternational());
+
+ // --------------------------------------------------------------
+ sal_Bool bFound(sal_False);
+ sal_Bool bMovedAround(sal_False);
+ do
+ {
+ if (m_eMode == FmSearchDialog::SM_ALLOWSCHEDULE)
+ {
+ Application::Reschedule();
+ Application::Reschedule();
+ // do 2 reschedules because of #70226# : some things done within this loop's body may cause an user event
+ // to be posted (deep within vcl), and these user events will be handled before any keyinput or paintings
+ // or anything like that. So within each loop we create one user event and handle one user event (and no
+ // paintings and these), so the office seems to be frozen while searching.
+ // FS - 70226 - 02.12.99
+ }
+
+ // der aktuell zu vergleichende Inhalt
+ ::rtl::OUString sCurrentCheck;
+ if (m_bFormatter)
+ sCurrentCheck = FormatField(nFieldPos);
+ else
+ sCurrentCheck = iterFieldLoop->xContents->getString();
+
+ // (um Case brauche ich mir hier nicht zu kuemmern, das macht der SearchText, da ich ihm meinen Case-Parameter mitgegeben habe)
+
+ xub_StrLen nStart = 0, nEnd = sCurrentCheck.getLength();
+ bFound = aLocalEngine.SearchFrwrd(sCurrentCheck, &nStart, &nEnd);
+ // das heisst hier 'forward' aber das bezieht sich nur auf die Suche innerhalb von sCurrentCheck, hat also mit
+ // der Richtung meines Datensatz-Durchwanderns nix zu tun (darum kuemmert sich MoveField)
+
+ // checken, ob die Position stimmt
+ if (bFound)
+ {
+ switch (m_nPosition)
+ {
+ case MATCHING_WHOLETEXT :
+ if (nEnd != sCurrentCheck.getLength() - 1)
+ {
+ bFound = sal_False;
+ break;
+ }
+ // laeuft in den naechsten Case rein !
+ case MATCHING_BEGINNING :
+ if (nStart != 0)
+ bFound = sal_False;
+ break;
+ case MATCHING_END :
+ if (nEnd != sCurrentCheck.getLength() - 1)
+ bFound = sal_False;
+ break;
+ }
+ }
+
+ if (bFound) // immer noch ?
+ break;
+
+ // naechstes Feld (implizit naechster Datensatz, wenn noetig)
+ if (!MoveField(nFieldPos, iterFieldLoop, iterBegin, iterEnd))
+ { // beim Bewegen auf das naechste Feld ging was schief ... weitermachen ist nicht drin, da das naechste Mal genau
+ // das selbe bestimmt wieder schief geht, also Abbruch (ohne Fehlermeldung, von der erwarte ich, dass sie im Move
+ // angezeigt wurde)
+ // vorher aber noch, damit das Weitersuchen an der aktuellen Position weitermacht :
+ m_aPreviousLocBookmark = m_xSearchCursor.getBookmark();
+ m_iterPreviousLocField = iterFieldLoop;
+ // und wech
+ return SR_ERROR;
+ }
+
+ bMovedAround = COMPARE_BOOKMARKS(aStartMark, m_xSearchCursor.getBookmark()) && (iterFieldLoop == iterInitialField);
+
+ if (nFieldPos == 0)
+ // das heisst, ich habe mich auf einen neuen Datensatz bewegt
+ PropagateProgress(bMovedAround);
+ // if we moved to the starting position we don't have to propagate an 'overflow' message
+ // FS - 07.12.99 - 68530
+
+ // abbrechen gefordert ?
+ if (CancelRequested())
+ return SR_CANCELED;
+
+ } while (!bMovedAround);
+
+ return bFound ? SR_FOUND : SR_NOTFOUND;
+}
+
+
+DBG_NAME(FmSearchEngine);
+//------------------------------------------------------------------------
+FmSearchEngine::FmSearchEngine(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > & xCursor, const ::rtl::OUString& sVisibleFields,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > & xFormatSupplier, FmSearchDialog::SEARCH_MODE eMode)
+ :m_xSearchCursor(xCursor)
+ ,m_xFormatSupplier(xFormatSupplier)
+ ,m_bUsingTextComponents(sal_False)
+ ,m_bCase(sal_False)
+ ,m_bFormatter(sal_False)
+ ,m_bForward(sal_False)
+ ,m_nPosition(MATCHING_ANYWHERE)
+ ,m_nCurrentFieldIndex(-2) // -1 hat schon eine Bedeutung, also nehme ich -2 fuer 'ungueltig'
+ ,m_eMode(eMode)
+ ,m_bCancelAsynchRequest(sal_False)
+ ,m_bSearchingCurrently(sal_False)
+{
+ DBG_CTOR(FmSearchEngine,NULL);
+
+ m_xFormatter = ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > (::utl::getProcessServiceFactory()
+ ->createInstance(FM_NUMBER_FORMATTER), ::com::sun::star::uno::UNO_QUERY);
+ if (m_xFormatter.is())
+ m_xFormatter->attachNumberFormatsSupplier(m_xFormatSupplier);
+
+ Init(sVisibleFields);
+}
+
+//------------------------------------------------------------------------
+FmSearchEngine::FmSearchEngine(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > & xCursor, const ::rtl::OUString& sVisibleFields,
+ const InterfaceArray& arrFields, FmSearchDialog::SEARCH_MODE eMode)
+ :m_xSearchCursor(xCursor)
+ ,m_xOriginalIterator(xCursor)
+ ,m_xClonedIterator(m_xOriginalIterator, sal_True)
+ ,m_bUsingTextComponents(sal_True)
+ ,m_bCase(sal_False)
+ ,m_bFormatter(sal_True) // das muss konsistent sein mit m_xSearchCursor, der i.A. == m_xOriginalIterator ist
+ ,m_bForward(sal_False)
+ ,m_nPosition(MATCHING_ANYWHERE)
+ ,m_nCurrentFieldIndex(-2)
+ ,m_eMode(eMode)
+ ,m_bCancelAsynchRequest(sal_False)
+ ,m_bSearchingCurrently(sal_False)
+{
+ DBG_CTOR(FmSearchEngine,NULL);
+
+ fillControlTexts(arrFields);
+ Init(sVisibleFields);
+}
+
+//------------------------------------------------------------------------
+FmSearchEngine::~FmSearchEngine()
+{
+ clearControlTexts();
+
+ DBG_DTOR(FmSearchEngine,NULL);
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::clearControlTexts()
+{
+ for ( ControlTextSuppliersIterator aIter = m_aControlTexts.begin();
+ aIter < m_aControlTexts.end();
+ ++aIter
+ )
+ {
+ delete *aIter;
+ }
+ m_aControlTexts.clear();
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::fillControlTexts(const InterfaceArray& arrFields)
+{
+ clearControlTexts();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xCurrent;
+ for (int i=0; i<arrFields.size(); ++i)
+ {
+ xCurrent = arrFields.at(i);
+ DBG_ASSERT(xCurrent.is(), "FmSearchEngine::fillControlTexts : invalid field interface !");
+ // check which type of control this is
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > xAsText(xCurrent, ::com::sun::star::uno::UNO_QUERY);
+ if (xAsText.is())
+ {
+ m_aControlTexts.insert(m_aControlTexts.end(), new SimpleTextWrapper(xAsText));
+ continue;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XListBox > xAsListBox(xCurrent, ::com::sun::star::uno::UNO_QUERY);
+ if (xAsListBox.is())
+ {
+ m_aControlTexts.insert(m_aControlTexts.end(), new ListBoxWrapper(xAsListBox));
+ continue;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XCheckBox > xAsCheckBox(xCurrent, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xAsCheckBox.is(), "FmSearchEngine::fillControlTexts : invalid field interface (no supported type) !");
+ // we don't have any more options ...
+ m_aControlTexts.insert(m_aControlTexts.end(), new CheckBoxWrapper(xAsCheckBox));
+ }
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::Init(const ::rtl::OUString& sVisibleFields)
+{
+ // die Felder der Tabelle auseinanderdroeseln
+ // ausserdem gleich das Mapping aufbauen: da die Liste der gueltigen Spalten durchaus kuerzer sein kann als die Liste der
+ // Spalten, die der Iterator verwaltet, brauche ich ein solches Mapping : die gueltige Spalte Nummer x entspricht der vom
+ // Iterator gelieferten Spalte y
+ m_arrFieldMapping.Remove(0, m_arrFieldMapping.Count());
+
+ // der Cursor kann mir einen Record (als PropertySet) liefern, dieser unterstuetzt den DatabaseRecord-Service
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(m_xSearchCursor, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::Init : invalid cursor (no columns supplier) !");
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xAllFieldNames = xSupplyCols->getColumns();
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > seqFieldNames = xAllFieldNames->getElementNames();
+ ::rtl::OUString* pFieldNames = seqFieldNames.getArray();
+
+ ::rtl::OUString sCurrentField;
+ UniString sVis(sVisibleFields.getStr());
+ for (xub_StrLen i=0; i<sVis.GetTokenCount(); ++i)
+ {
+ sCurrentField = sVis.GetToken(i);
+
+ // in der Feld-Sammlung suchen
+ sal_Int32 nFoundIndex = -1;
+ for (sal_Int32 j=0; j<seqFieldNames.getLength(); ++j, ++pFieldNames)
+ {
+ if (pFieldNames->equals(sCurrentField))
+ {
+ nFoundIndex = j;
+ break;
+ }
+ }
+ DBG_ASSERT(nFoundIndex != -1, "FmSearchEngine::Init : Es wurden ungueltige Feldnamen angegeben !");
+ m_arrFieldMapping.Insert(nFoundIndex, m_arrFieldMapping.Count());
+ }
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::SetFormatterUsing(sal_Bool bSet)
+{
+ if (m_bFormatter == bSet)
+ return;
+ m_bFormatter = bSet;
+
+ if (m_bUsingTextComponents)
+ {
+ // ich benutzte keinen Formatter, sondern TextComponents -> der SearchIterator muss angepasst werden
+ if (m_bFormatter)
+ {
+ DBG_ASSERT(m_xSearchCursor == m_xClonedIterator, "FmSearchEngine::SetFormatterUsing : inkonsistenter Zustand !");
+ m_xSearchCursor = m_xOriginalIterator;
+ m_xSearchCursor.moveToBookmark(m_xClonedIterator.getBookmark());
+ // damit ich mit dem neuen Iterator wirklich dort weitermache, wo ich vorher aufgehoert habe
+ }
+ else
+ {
+ DBG_ASSERT(m_xSearchCursor == m_xOriginalIterator, "FmSearchEngine::SetFormatterUsing : inkonsistenter Zustand !");
+ m_xSearchCursor = m_xClonedIterator;
+ m_xSearchCursor.moveToBookmark(m_xOriginalIterator.getBookmark());
+ }
+
+ // ich muss die Fields neu binden, da der Textaustausch eventuell ueber diese Fields erfolgt und sich der unterliegende Cursor
+ // geaendert hat
+ RebuildUsedFields(m_nCurrentFieldIndex, sal_True);
+ }
+ else
+ InvalidatePreviousLoc();
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::PropagateProgress(sal_Bool _bDontPropagateOverflow)
+{
+ if (m_aProgressHandler.IsSet())
+ {
+ FmSearchProgress aProgress;
+ aProgress.aSearchState = FmSearchProgress::STATE_PROGRESS;
+ aProgress.nCurrentRecord = m_xSearchCursor.getRow() - 1;
+ if (m_bForward)
+ aProgress.bOverflow = !_bDontPropagateOverflow && m_xSearchCursor.isFirst();
+ else
+ aProgress.bOverflow = !_bDontPropagateOverflow && m_xSearchCursor.isLast();
+ m_aProgressHandler.Call(&aProgress);
+ }
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::SearchNextImpl()
+{
+ DBG_ASSERT(!(m_bWildcard && m_bRegular) && !(m_bRegular && m_bLevenshtein) && !(m_bLevenshtein && m_bWildcard),
+ "FmSearchEngine::SearchNextImpl : Suchparameter schliessen sich gegenseitig aus !");
+
+ DBG_ASSERT(m_xSearchCursor.is(), "FmSearchEngine::SearchNextImpl : habe ungueltigen Iterator !");
+
+ // die Parameter der Suche
+ ::rtl::OUString strSearchExpression(m_strSearchExpression); // brauche ich non-const
+ if (!m_bCase)
+ {// normieren, wenn kein Gross/Klein
+ XubString sLanguage, sCountry;
+ ConvertLanguageToIsoNames(Application::GetAppInternational().GetLanguage(), sLanguage, sCountry);
+ strSearchExpression.toLowerCase(::rtl::OLocale::registerLocale(sLanguage, sCountry));
+ }
+
+ if (!m_bRegular && !m_bLevenshtein)
+ { // 'normale' Suche fuehre ich auf jeden Fall ueber WildCards durch, muss aber vorher je nach Modus den ::rtl::OUString anpassen
+
+ if (!m_bWildcard)
+ { // da natuerlich in allen anderen Faellen auch * und ? im Suchstring erlaubt sind, aber nicht als WildCards zaehlen
+ // sollen, muss ich normieren
+ UniString aTmp(strSearchExpression.getStr());
+ static const UniString s_sStar = UniString::CreateFromAscii("\\*");
+ static const UniString s_sQuotation = UniString::CreateFromAscii("\\?");
+ aTmp.SearchAndReplaceAll('*', s_sStar);
+ aTmp.SearchAndReplaceAll('?', s_sQuotation);
+ strSearchExpression = aTmp;
+
+ switch (m_nPosition)
+ {
+ case MATCHING_ANYWHERE :
+ strSearchExpression = ::rtl::OUString::createFromAscii("*") + strSearchExpression
+ + ::rtl::OUString::createFromAscii("*");
+ break;
+ case MATCHING_BEGINNING :
+ strSearchExpression = strSearchExpression + ::rtl::OUString::createFromAscii("*");
+ break;
+ case MATCHING_END :
+ strSearchExpression = ::rtl::OUString::createFromAscii("*") + strSearchExpression;
+ break;
+ case MATCHING_WHOLETEXT :
+ break;
+ default :
+ DBG_ERROR("FmSearchEngine::SearchNextImpl() : die Methoden-Listbox duerfte nur 4 Eintraege enthalten ...");
+ }
+ }
+ }
+
+ // fuer Arbeit auf Feldliste
+ FieldCollectionIterator iterBegin = m_arrUsedFields.begin();
+ FieldCollectionIterator iterEnd = m_arrUsedFields.end();
+ FieldCollectionIterator iterFieldCheck;
+
+ sal_Int32 nFieldPos;
+
+ if (HasPreviousLoc())
+ {
+ DBG_ASSERT(COMPARE_BOOKMARKS(m_aPreviousLocBookmark, m_xSearchCursor.getBookmark()),
+ "FmSearchEngine::SearchNextImpl : ungueltige Position !");
+ iterFieldCheck = m_iterPreviousLocField;
+ // im Feld nach (oder vor) der letzten Fundstelle weitermachen
+ nFieldPos = iterFieldCheck - iterBegin;
+ MoveField(nFieldPos, iterFieldCheck, iterBegin, iterEnd);
+ }
+ else
+ {
+ if (m_bForward)
+ iterFieldCheck = iterBegin;
+ else
+ {
+ iterFieldCheck = iterEnd;
+ --iterFieldCheck;
+ }
+ nFieldPos = iterFieldCheck - iterBegin;
+ }
+
+ // ---------------------
+ // die eigentliche Suche
+#ifndef NOOLDSV
+ if (m_eMode == FmSearchDialog::SM_BRUTE)
+ Application::EnterWait();
+#endif
+
+ PropagateProgress(sal_True);
+ SEARCH_RESULT srResult;
+ if (m_eSearchForType != SEARCHFOR_STRING)
+ srResult = SearchSpecial(m_eSearchForType == SEARCHFOR_NULL, nFieldPos, iterFieldCheck, iterBegin, iterEnd);
+ else if (!m_bRegular && !m_bLevenshtein)
+ srResult = SearchWildcard(strSearchExpression, nFieldPos, iterFieldCheck, iterBegin, iterEnd);
+ else
+ srResult = SearchRegularApprox(strSearchExpression, nFieldPos, iterFieldCheck, iterBegin, iterEnd);
+
+#ifndef NOOLDSV
+ if (m_eMode == FmSearchDialog::SM_BRUTE)
+ Application::LeaveWait();
+#endif
+
+ // ---------------------
+ m_srResult = srResult;
+
+ if (SR_ERROR == m_srResult)
+ return;
+
+ // gefunden ?
+ if (SR_FOUND == m_srResult)
+ {
+ // die Pos merken
+ m_aPreviousLocBookmark = m_xSearchCursor.getBookmark();
+ m_iterPreviousLocField = iterFieldCheck;
+ }
+ else
+ // die "letzte Fundstelle" invalidieren
+ InvalidatePreviousLoc();
+}
+
+//------------------------------------------------------------------------
+IMPL_LINK(FmSearchEngine, OnSearchTerminated, FmSearchThread*, pThread)
+{
+ if (!m_aProgressHandler.IsSet())
+ return 0L;
+
+ FmSearchProgress aProgress;
+ switch (m_srResult)
+ {
+ case SR_ERROR :
+ aProgress.aSearchState = FmSearchProgress::STATE_ERROR;
+ break;
+ case SR_FOUND :
+ aProgress.aSearchState = FmSearchProgress::STATE_SUCCESSFULL;
+ aProgress.aBookmark = m_aPreviousLocBookmark;
+ aProgress.nFieldIndex = m_iterPreviousLocField - m_arrUsedFields.begin();
+ break;
+ case SR_NOTFOUND :
+ aProgress.aSearchState = FmSearchProgress::STATE_NOTHINGFOUND;
+ aProgress.aBookmark = m_xSearchCursor.getBookmark();
+ break;
+ case SR_CANCELED :
+ aProgress.aSearchState = FmSearchProgress::STATE_CANCELED;
+ aProgress.aBookmark = m_xSearchCursor.getBookmark();
+ break;
+ }
+ aProgress.nCurrentRecord = m_xSearchCursor.getRow() - 1;
+
+ // per definitionem muss der Link Thread-sicher sein (das verlange ich einfach), so dass ich mich um so etwas hier nicht kuemmern muss
+ m_aProgressHandler.Call(&aProgress);
+
+ m_bSearchingCurrently = sal_False;
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+IMPL_LINK(FmSearchEngine, OnNewRecordCount, void*, pCounterAsVoid)
+{
+ if (!m_aProgressHandler.IsSet())
+ return 0L;
+
+ FmSearchProgress aProgress;
+ aProgress.nCurrentRecord = (sal_uInt32)pCounterAsVoid;
+ aProgress.aSearchState = FmSearchProgress::STATE_PROGRESS_COUNTING;
+ m_aProgressHandler.Call(&aProgress);
+
+ return 0L;
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmSearchEngine::CancelRequested()
+{
+ m_aCancelAsynchAccess.acquire();
+ sal_Bool bReturn = m_bCancelAsynchRequest;
+ m_aCancelAsynchAccess.release();
+ return bReturn;
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::CancelSearch()
+{
+ m_aCancelAsynchAccess.acquire();
+ m_bCancelAsynchRequest = sal_True;
+ m_aCancelAsynchAccess.release();
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmSearchEngine::SwitchToContext(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > & xCursor, const ::rtl::OUString& sVisibleFields, const InterfaceArray& arrFields,
+ sal_Int32 nFieldIndex)
+{
+ DBG_ASSERT(!m_bSearchingCurrently, "FmSearchEngine::SwitchToContext : please do not call while I'm searching !");
+ if (m_bSearchingCurrently)
+ return sal_False;
+
+ m_xSearchCursor = xCursor;
+ m_xOriginalIterator = xCursor;
+ m_xClonedIterator = CursorWrapper(m_xOriginalIterator, sal_True);
+ m_bUsingTextComponents = sal_True;
+
+ fillControlTexts(arrFields);
+
+ Init(sVisibleFields);
+ RebuildUsedFields(nFieldIndex, sal_True);
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::ImplStartNextSearch()
+{
+ m_bCancelAsynchRequest = sal_False;
+ m_bSearchingCurrently = sal_True;
+
+ if (m_eMode == FmSearchDialog::SM_USETHREAD)
+ {
+ FmSearchThread* pSearcher = new FmSearchThread(this);
+ // der loescht sich nach Beendigung selber ...
+ pSearcher->setTerminationHandler(LINK(this, FmSearchEngine, OnSearchTerminated));
+
+ pSearcher->createSuspended();
+ pSearcher->setPriority(::vos::OThread::TPriority_Lowest);
+ pSearcher->resume();
+ }
+ else
+ {
+ SearchNextImpl();
+ LINK(this, FmSearchEngine, OnSearchTerminated).Call(NULL);
+ }
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::SearchNext(const ::rtl::OUString& strExpression)
+{
+ m_strSearchExpression = strExpression;
+ m_eSearchForType = SEARCHFOR_STRING;
+ ImplStartNextSearch();
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::SearchNextSpecial(sal_Bool _bSearchForNull)
+{
+ m_eSearchForType = _bSearchForNull ? SEARCHFOR_NULL : SEARCHFOR_NOTNULL;
+ ImplStartNextSearch();
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::StartOver(const ::rtl::OUString& strExpression)
+{
+ if (m_bForward)
+ m_xSearchCursor.first();
+ else
+ m_xSearchCursor.last();
+
+ InvalidatePreviousLoc();
+ SearchNext(strExpression);
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::StartOverSpecial(sal_Bool _bSearchForNull)
+{
+ if (m_bForward)
+ m_xSearchCursor.first();
+ else
+ m_xSearchCursor.last();
+
+ InvalidatePreviousLoc();
+ SearchNextSpecial(_bSearchForNull);
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::InvalidatePreviousLoc()
+{
+ m_aPreviousLocBookmark.setValue(0,getVoidCppuType());
+ m_iterPreviousLocField = m_arrUsedFields.end();
+}
+
+//------------------------------------------------------------------------
+void FmSearchEngine::RebuildUsedFields(sal_Int32 nFieldIndex, sal_Bool bForce)
+{
+ if (!bForce && (nFieldIndex == m_nCurrentFieldIndex))
+ return;
+ // (da ich keinen Wechsel des Iterators von aussen zulasse, heisst selber ::com::sun::star::sdbcx::Index auch immer selbe Spalte, also habe ich nix zu tun)
+
+ DBG_ASSERT((nFieldIndex >= -1) && (nFieldIndex<m_arrFieldMapping.Count()), "FmSearchEngine::RebuildUsedFields : nFieldIndex ist ungueltig !");
+ // alle Felder, die ich durchsuchen muss, einsammeln
+ m_arrUsedFields.clear();
+ if (nFieldIndex == -1)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xFields;
+ for (sal_uInt16 i=0; i<m_arrFieldMapping.Count(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(m_xSearchCursor, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !");
+ xFields = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > (xSupplyCols->getColumns(), ::com::sun::star::uno::UNO_QUERY);
+ BuildAndInsertFieldInfo(xFields, m_arrFieldMapping.GetObject(i));
+ }
+ }
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xFields;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(m_xSearchCursor, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !");
+ xFields = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > (xSupplyCols->getColumns(), ::com::sun::star::uno::UNO_QUERY);
+ BuildAndInsertFieldInfo(xFields, m_arrFieldMapping.GetObject(nFieldIndex));
+ }
+
+ m_nCurrentFieldIndex = nFieldIndex;
+ // und natuerlich beginne ich die naechste Suche wieder jungfraeulich
+ InvalidatePreviousLoc();
+}
+
diff --git a/svx/source/form/fmstring.src b/svx/source/form/fmstring.src
new file mode 100644
index 0000000000..ac3bf4379b
--- /dev/null
+++ b/svx/source/form/fmstring.src
@@ -0,0 +1,6659 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmstring.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "fmresids.hrc"
+/* Strings fuer Uebersetzung */
+String RID_ERR_CONTEXT_ADDFORM
+{
+ Text = "Fehler beim Erzeugen eines Formulars" ;
+ Text [ English ] = "Error while creating form" ;
+ Text [ english_us ] = "Error while creating form" ;
+ Text [ portuguese_brazilian ] = "Fehler beim Erzeugen eines Formulars" ;
+ Text [ swedish ] = "Fel när ett formulär skapades" ;
+ Text [ danish ] = "Fejl under oprettelse af en formular" ;
+ Text [ italian ] = "Errore nella creazione di un formulario" ;
+ Text [ spanish ] = "Error en la creación de un formulario" ;
+ Text [ french ] = "Erreur lors de la création d'un formulaire" ;
+ Text [ dutch ] = "Fout bij het maken van een formulier" ;
+ Text [ portuguese ] = "Erro ao criar o formulário" ;
+ Text[ chinese_simplified ] = "ÔÚÉú³ÉÒ»¸ö±íµ¥Ê±·¢Éú´íÎó";
+ Text[ russian ] = "Îøèáêà ïðè ñîçäàíèè ôîðìóëÿðà";
+ Text[ polish ] = "B³¹d przy tworzeniu formularza";
+ Text[ japanese ] = "Ì«°Ñ쬂ÌÛ‚Ì´×°";
+ Text[ chinese_traditional ] = "¦b¥Í¦¨¤@­Óªí³æ®Éµo¥Í¿ù»~";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí äçìéïõñãßá öüñìáò";
+ Text[ korean ] = "¾ç½Ä ÀÛ¼º½Ã ¿À·ù";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÅäÔÇÁ ÇÓÊãÇÑÉ";
+ Text[ turkish ] = "Form oluþturma sýrasýnda hata";
+ Text[ language_user1 ] = " ";
+};
+String RID_ERR_FIELDREQUIRED
+{
+ Text = "Für das Feld '#' ist eine Eingabe erforderlich.\nGeben Sie dort einen Wert ein!" ;
+ Text [ English ] = "The field '#' requires input. Insert a value." ;
+ Text [ portuguese ] = "É necessária uma entrada para o campo '#'.\nEspecifique um valor!" ;
+ Text [ english_us ] = "Input required in field '#'. Please enter a value." ;
+ Text [ portuguese_brazilian ] = "Für das Feld '#' ist eine Eingabe erforderlich.\nGeben Sie dort einen Wert ein!" ;
+ Text [ swedish ] = "I fältet '#' behövs en inmatning.\nVar vänlig och mata in ett värde!" ;
+ Text [ danish ] = "Input kræves til feltet '#'.\nIndtast venligst en værdi!" ;
+ Text [ italian ] = "Nel campo '#' è necessario immettere dei dati.\nDigitate un valore!" ;
+ Text [ spanish ] = "El campo '#' requiere una entrada.\nPor favor escriba un valor." ;
+ Text [ french ] = "Saisie requise dans le champ \"#\".\nSaisissez-y une valeur !" ;
+ Text [ dutch ] = "Veld '#' moet worden ingevuld.\nGeef hier een waarde aan!" ;
+ Text[ chinese_simplified ] = "±ØÐëΪÕâ¸ö×ֶΠ'#' ÊäÈëÒ»¸öÊýÖµ£¡";
+ Text[ russian ] = "Äëÿ ïîëÿ '#' òðåáóåòñÿ ââîä äàííûõ.\nÏîæàëóéñòà, ââåäèòå çíà÷åíèå!";
+ Text[ polish ] = "Dla pola '#' wymagany jest wpis.\nProszê wstawiæ wartoœæ!";
+ Text[ japanese ] = "̨°ÙÄÞ'#'‚Ì‚½‚ß‚É“ü—Í‚ª•K—v‚Å‚·B\n‚»‚±‚Ö”’l‚ð“ü—Í‚µ‚ĉº‚³‚¢!";
+ Text[ chinese_traditional ] = "¥²¶·¬°³o­ÓÄæ¦ì '#' ¿é¤J¤@­Ó¼Æ­È¡T";
+ Text[ greek ] = "Áðáéôåßôáé åéóáãùãÞ óôï ðåäßï '#'.\nÐáñáêáëþ åéóÜãåôå ìéá ôéìÞ!.";
+ Text[ korean ] = "Çʵå'#'¿¡ ÀÔ·ÂÀ» ÇØ¾ß ÇÕ´Ï´Ù.\n¾î¶² °ªÀ» ÀÔ·ÂÇϽʽÿÀ!";
+ Text[ arabic ] = "ãØáæÈ ÅÏÎÇá Ýí ÇáÍÞá '#'. ÇáÑÌÇÁ ßÊÇÈÉ ÞíãÉ ãÇ åäÇß.";
+ Text[ turkish ] = "Alan '#' için bir giriþ yapýlmasý gerekiyor.\nLütfen bir deðer girin!";
+ Text[ language_user1 ] = " ";
+};
+String RID_ERR_DUPLICATE_NAME
+{
+ Text = "Eintrag existiert bereits.\nBitte wählen Sie einen anderen Namen." ;
+ Text [ English ] = "Entry does already exist.\nPlease choose another name." ;
+ Text [ portuguese ] = "Esta entrada já existe.\nSeleccione outro nome." ;
+ Text [ english_us ] = "Entry already exists.\nPlease choose another name." ;
+ Text [ portuguese_brazilian ] = "Eintrag existiert bereits.\nBitte wählen Sie einen anderen Namen." ;
+ Text [ swedish ] = "Inmatningen finns redan.\nVar vänlig och välj ett annat namn." ;
+ Text [ danish ] = "Elementet eksisterer allerede.\nVælg venligst et andet navn." ;
+ Text [ italian ] = "La voce esiste giài.\nScegliete un altro nome." ;
+ Text [ spanish ] = "El registro ya existe.\nPor favor elija otro nombre." ;
+ Text [ french ] = "Cette entrée existe déjà.\nVeuillez choisir un autre nom." ;
+ Text [ dutch ] = "Item bestaat reeds.\nKies een andere naam." ;
+ Text[ chinese_simplified ] = "ÌõÄ¿ÒѾ­´æÔÚ¡£\nÇëÄúÑ¡ÔñÁíÍâÒ»¸öÃû³Æ¡£";
+ Text[ russian ] = "Òàêàÿ çàïèñü óæå ñóùåñòâóåò.\nÂûáåðèòå, ïîæàëóéñòà, äðóãîå èìÿ.";
+ Text[ polish ] = "Wpis ju¿ istnieje.\nProszê wybraæ inn¹ nazwê.";
+ Text[ japanese ] = "“ü—Í‚Í‚·‚Å‚É‚ ‚è‚Ü‚·B\n‘¼‚Ì–¼‘O‚ð‘I‘ð‚µ‚Ä‰º‚³‚¢B";
+ Text[ chinese_traditional ] = "¶µ¥Ø¤w¸g¦s¦b¡C\n½Ð±z¿ï¾Ü¥t¥~¤@­Ó¦WºÙ¡C";
+ Text[ greek ] = "Ç åããñáöÞ õðÜñ÷åé Þäç.\nÐáñáêáëþ åðéëÝîôå Üëëï üíïìá.";
+ Text[ korean ] = "Ç׸ñÀÌ ÀÌ¹Ì ÀÖ½À´Ï´Ù.\n´Ù¸¥ À̸§À» ¼±ÅÃÇϽʽÿÀ.";
+ Text[ arabic ] = "åÐÇ ÇáÅÏÎÇá ãæÌæÏ ãÓÈÞÇð.\nÇáÑÌÇÁ ÇÎÊíÇÑ ÇÓã ÂÎÑ.";
+ Text[ turkish ] = "Bu giriþ mevcut durumda.\nLütfen baþka bir ad seçin.";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_NEW_FORM
+{
+ Text = "Neues Formular" ;
+ Text [ English ] = "New form" ;
+ Text [ portuguese ] = "Novo formulário" ;
+ Text [ english_us ] = "New form" ;
+ Text [ portuguese_brazilian ] = "Neues Formular" ;
+ Text [ swedish ] = "Nytt formulär" ;
+ Text [ danish ] = "Ny formular" ;
+ Text [ italian ] = "Nuovo formulario" ;
+ Text [ spanish ] = "Nuevo formulario" ;
+ Text [ french ] = "Nouveau formulaire" ;
+ Text [ dutch ] = "Nieuw formulier" ;
+ Text[ chinese_simplified ] = "ÐÂ±íµ¥";
+ Text[ russian ] = "Íîâûé ôîðìóëÿð";
+ Text[ polish ] = "Nowy formularz";
+ Text[ japanese ] = "V‚µ‚¢Ì«°Ñ";
+ Text[ chinese_traditional ] = "·sªí³æ";
+ Text[ greek ] = "Äçìéïõñãßá öüñìáò";
+ Text[ korean ] = "»õ Æû";
+ Text[ arabic ] = "ÇÓÊãÇÑÉ ÌÏíÏÉ";
+ Text[ turkish ] = "Yeni form";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ALIGNMENT
+{
+ Text = "Links;Zentriert;Rechts" ;
+ Text [ English ] = "Left;Center;Right" ;
+ Text [ portuguese ] = "Esquerda;Centrado;Direita" ;
+ Text [ english_us ] = "Left;Center;Right" ;
+ Text [ portuguese_brazilian ] = "Links;Zentriert;Rechts" ;
+ Text [ swedish ] = "Vänster;Centrerat;Höger" ;
+ Text [ danish ] = "Venstre;Centreret;Højre" ;
+ Text [ italian ] = "Sinistra;Centrato;Destra" ;
+ Text [ spanish ] = "Izquierda;Centrado;Derecha" ;
+ Text [ french ] = "Gauche;Centré;Droite" ;
+ Text [ dutch ] = "Links;Gecentreerd;Rechts" ;
+ Text[ chinese_simplified ] = "Ïò×ó£»¾ÓÖУ»ÏòÓÒ";
+ Text[ russian ] = "Ñëåâà;Ïî öåíòðó;Ñïðàâà";
+ Text[ polish ] = "Do lewej;Wyœrodkowany;Do prawej";
+ Text[ japanese ] = "¶‚É;’†‰›‚É;‰E‚É";
+ Text[ chinese_traditional ] = "¦V¥ª¡F¸m¤¤¡F¦V¥k";
+ Text[ greek ] = "ÁñéóôåñÜ,ÊÝíôñï,ÄåîéÜ";
+ Text[ korean ] = "¿ÞÂÊ;°¡¿îµ¥;¿À¸¥ÂÊ";
+ Text[ arabic ] = "ÇáíÓÇÑ;ÊæÓíØ;Çáíãíä";
+ Text[ turkish ] = "Sol;Orta;Sað";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LABEL
+{
+ Text = "Titel" ;
+ Text [ English ] = "Label" ;
+ Text [ portuguese ] = "Título" ;
+ Text [ english_us ] = "Label" ;
+ Text [ portuguese_brazilian ] = "Titel" ;
+ Text [ swedish ] = "Rubrik" ;
+ Text [ danish ] = "Titel" ;
+ Text [ italian ] = "Titolo" ;
+ Text [ spanish ] = "Título" ;
+ Text [ french ] = "Titre" ;
+ Text [ dutch ] = "Titel" ;
+ Text[ chinese_simplified ] = "±êÌâ";
+ Text[ russian ] = "Çàãîëîâîê";
+ Text[ polish ] = "Etykieta";
+ Text[ japanese ] = "À²ÄÙ";
+ Text[ chinese_traditional ] = "¼ÐÃD";
+ Text[ greek ] = "Ôßôëïò";
+ Text[ korean ] = "Á¦¸ñ";
+ Text[ arabic ] = "ÇáÚäæÇä";
+ Text[ turkish ] = "Baþlýk";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_CURSORTYPE
+{
+ Text = "Cursortyp" ;
+ Text [ English ] = "Cursor type" ;
+ Text [ english_us ] = "Cursor type" ;
+ Text [ portuguese_brazilian ] = "Cursortyp" ;
+ Text [ swedish ] = "Markörtyp" ;
+ Text [ danish ] = "Markørtype" ;
+ Text [ italian ] = "Tipo di cursore" ;
+ Text [ spanish ] = "Tipo de cursor" ;
+ Text [ french ] = "Type de curseur" ;
+ Text [ dutch ] = "Cursortype" ;
+ Text [ portuguese ] = "Tipo de cursor" ;
+ Text[ chinese_simplified ] = "¹â±êÀàÐÍ";
+ Text[ russian ] = "Òèï êóðñîðà";
+ Text[ polish ] = "Typ kursora";
+ Text[ japanese ] = "¶°¿Ù‚ÌŽí—Þ";
+ Text[ chinese_traditional ] = "¥ú¼ÐÃþ«¬";
+ Text[ greek ] = "Ôýðïò äåßêôç";
+ Text[ korean ] = "Ä¿¼­ À¯Çü";
+ Text[ arabic ] = "äæÚ ÇáãÄÔÑ";
+ Text[ turkish ] = "Ýmleç tipi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ALIGN
+{
+ Text = "Ausrichtung" ;
+ Text [ English ] = "Alignment" ;
+ Text [ portuguese ] = "Alinhamento" ;
+ Text [ english_us ] = "Alignment" ;
+ Text [ portuguese_brazilian ] = "Ausrichtung" ;
+ Text [ swedish ] = "Justering" ;
+ Text [ danish ] = "Justering" ;
+ Text [ italian ] = "Allineamento" ;
+ Text [ spanish ] = "Alineación" ;
+ Text [ french ] = "Alignement" ;
+ Text [ dutch ] = "Uitlijning" ;
+ Text[ chinese_simplified ] = "¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå";
+ Text[ polish ] = "Wyrównanie";
+ Text[ japanese ] = "”z’u";
+ Text[ chinese_traditional ] = "¹ï»ô";
+ Text[ greek ] = "Óôïß÷éóç";
+ Text[ korean ] = "¸ÂÃã";
+ Text[ arabic ] = "ÇáãÍÇÐÇÉ";
+ Text[ turkish ] = "Hizalama";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FONT
+{
+ Text = "Zeichensatz" ;
+ Text [ English ] = "Font" ;
+ Text [ portuguese ] = "Conjunto de caracteres" ;
+ Text [ english_us ] = "Character set" ;
+ Text [ portuguese_brazilian ] = "Zeichensatz" ;
+ Text [ swedish ] = "Teckenuppsättning" ;
+ Text [ danish ] = "Tegnsæt" ;
+ Text [ italian ] = "Tipo di carattere" ;
+ Text [ spanish ] = "Juego de caracteres" ;
+ Text [ french ] = "Jeu de caractères" ;
+ Text [ dutch ] = "Tekenset" ;
+ Text[ chinese_simplified ] = "×ÖÌå";
+ Text[ russian ] = "Íàáîð çíàêîâ";
+ Text[ polish ] = "Zbiór znaków";
+ Text[ japanese ] = "•¶Žš—ñ";
+ Text[ chinese_traditional ] = "¦r¤¸";
+ Text[ greek ] = "Óåô ÷áñáêôÞñùí";
+ Text[ korean ] = "¹®ÀÚ ¼¼Æ®";
+ Text[ arabic ] = "ãÌãæÚÉ ÃÍÑÝ";
+ Text[ turkish ] = "Karakter kümesi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_BACKGROUNDCOLOR
+{
+ Text = "Hintergrundfarbe" ;
+ Text [ English ] = "Background color" ;
+ Text [ portuguese ] = "Cor de fundo" ;
+ Text [ english_us ] = "Background color" ;
+ Text [ portuguese_brazilian ] = "Hintergrundfarbe" ;
+ Text [ swedish ] = "Bakgrundsfärg" ;
+ Text [ danish ] = "Baggrundsfarve" ;
+ Text [ italian ] = "Colore di sfondo" ;
+ Text [ spanish ] = "Color de fondo" ;
+ Text [ french ] = "Couleur d'arrière-plan" ;
+ Text [ dutch ] = "Achtergrondkleur" ;
+ Text[ chinese_simplified ] = "±³¾°ÑÕÉ«";
+ Text[ russian ] = "Öâåò ôîíà";
+ Text[ polish ] = "Kolor t³a";
+ Text[ japanese ] = "”wŒiF";
+ Text[ chinese_traditional ] = "­I´ºÃC¦â";
+ Text[ greek ] = "×ñþìá öüíôïõ";
+ Text[ korean ] = "¹è°æ»ö";
+ Text[ arabic ] = "áæä ÇáÎáÝíÉ";
+ Text[ turkish ] = "Artalan rengi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_BORDER
+{
+ Text = "Rahmen" ;
+ Text [ English ] = "Border" ;
+ Text [ portuguese ] = "Moldura" ;
+ Text [ english_us ] = "Border" ;
+ Text [ portuguese_brazilian ] = "Rahmen" ;
+ Text [ swedish ] = "Ram" ;
+ Text [ danish ] = "Ramme" ;
+ Text [ italian ] = "Cornice" ;
+ Text [ spanish ] = "Marco" ;
+ Text [ french ] = "Cadre" ;
+ Text [ dutch ] = "Kader" ;
+ Text[ chinese_simplified ] = "¿ò";
+ Text[ russian ] = "Ðàìêà";
+ Text[ polish ] = "Ramka";
+ Text[ japanese ] = "˜g";
+ Text[ chinese_traditional ] = "®Ø";
+ Text[ greek ] = "Ðåñßãñáììá";
+ Text[ korean ] = "Å׵θ®";
+ Text[ arabic ] = "ÅØÇÑ";
+ Text[ turkish ] = "Çerçeve";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_BORDER_TYPE
+{
+ Text = "Ohne Rahmen;3D-Look;Flach" ;
+ Text [ English ] = "Transparence;3D-Look;Flat" ;
+ Text [ portuguese ] = "Sem moldura;3D-Look;Plano" ;
+ Text [ english_us ] = "Without frame;3D look;Flat" ;
+ Text [ portuguese_brazilian ] = "Transparent;3D-Look;Flach" ;
+ Text [ swedish ] = "Utan ram;3D-look;Platt" ;
+ Text [ danish ] = "Uden ramme;3D-look;Flad" ;
+ Text [ italian ] = "Senza cornice;3D;Piano" ;
+ Text [ spanish ] = "Sin marco;3D-Look;Plano" ;
+ Text [ french ] = "Sans cadre;tridimensionnel;plat" ;
+ Text [ dutch ] = "Zonder kader;3D-look;vlak" ;
+ Text[ chinese_simplified ] = "ÎÞ¿ò£»3 άÏÔʾ£»Æ½Ãæ";
+ Text[ russian ] = "Áåç ðàìêè;3-Ì-Âèä;Ïëîñêèé";
+ Text[ polish ] = "PrzeŸroczysty; Ustawienie 3-W; P³aski";
+ Text[ japanese ] = "˜g‚È‚µ;3DŒ`Ž®;•½‚½‚¢";
+ Text[ chinese_traditional ] = "µL®Ø¡F3 ºûÅã¥Ü¡F¥­­±";
+ Text[ greek ] = "×ùñßò ðëáßóéï;ÅìöÜíéóç 3Ä;Åðßðåäï";
+ Text[ korean ] = "ÇÁ·¹ÀÓ ¾øÀÌ;3D º¸±â;Æò¸é";
+ Text[ arabic ] = "ÈÏæä ÅØÇÑ;ãÙåÑ ËáÇËí ÇáÃÈÚÇÏ; ãõÓØøÍ";
+ Text[ turkish ] = "Çerçevesiz;3B görünüm;Düz";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DEFAULT_CONTROL
+{
+ Text = "Standardkontrollelement" ;
+ Text [ English ] = "Default control" ;
+ Text [ portuguese ] = "Controlo padrão" ;
+ Text [ english_us ] = "Default control" ;
+ Text [ portuguese_brazilian ] = "Standard Kontrollelement" ;
+ Text [ swedish ] = "Standardkontrollelement" ;
+ Text [ danish ] = "Standardkontrolelement" ;
+ Text [ italian ] = "Elemento di controllo standard" ;
+ Text [ spanish ] = "Elemento de control estándar" ;
+ Text [ french ] = "Éléments de contrôle par défaut" ;
+ Text [ dutch ] = "Standaard controle-element" ;
+ Text[ chinese_simplified ] = "±ê×¼¿ØÖÆ";
+ Text[ russian ] = "Ñòàíäàðòíûé ýëåìåíò óïðàâëåíèÿ";
+ Text[ polish ] = "Domyœlny formant";
+ Text[ japanese ] = "•W€ºÝÄÛ°Ù—v‘f";
+ Text[ chinese_traditional ] = "¼Ð·Ç±±¨î¶µ";
+ Text[ greek ] = "Óôïé÷åßï åëÝã÷ïõ ðñïåðéëïãÞò";
+ Text[ korean ] = "±âº» ÄÁÆ®·Ñ";
+ Text[ arabic ] = "ÚäÕÑ ÊÍßã ÇÝÊÑÇÖí";
+ Text[ turkish ] = "Standart komut öðesi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_HSCROLL
+{
+ Text = "Horizontaler Scrollbar" ;
+ Text [ English ] = "Horizontal scrollbar" ;
+ Text [ portuguese ] = "Barra de deslocamento horizontal" ;
+ Text [ english_us ] = "Horizontal scroll bar" ;
+ Text [ portuguese_brazilian ] = "Horizontaler Scrollbar" ;
+ Text [ swedish ] = "Horisontal rullningslist" ;
+ Text [ danish ] = "Vandret rullepanel" ;
+ Text [ italian ] = "Barra di scorrimento orizzontale" ;
+ Text [ spanish ] = "Barra de deplazamiento horizontal" ;
+ Text [ french ] = "Barre de défilement horizontale" ;
+ Text [ dutch ] = "Horizontale beeldschuifbalk" ;
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò¹ö¶¯À¸";
+ Text[ russian ] = "Ãîðèçîíòàëüíàÿ ïîëîñà ïðîêðóòêè";
+ Text[ polish ] = "Poziomy pasek przewijania";
+ Text[ japanese ] = "…•½‚Ƚ¸Û°ÙÊÞ°";
+ Text[ chinese_traditional ] = "¤ô¥­¦¡¨÷¶b";
+ Text[ greek ] = "Ïñéæüíôéá ãñáììÞ êýëéóçò";
+ Text[ korean ] = "¼öÆò ½ºÅ©·Ñ ¸·´ë";
+ Text[ arabic ] = "ÔÑíØ ÊÍÑíß ÇáÕÝÍÉ ÃÝÞíÇð";
+ Text[ turkish ] = "Yatay kaydýrma çubuðu";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_VSCROLL
+{
+ Text = "Vertikaler Scrollbar" ;
+ Text [ English ] = "Vertical scrollbar" ;
+ Text [ portuguese ] = "Barra de desl. vertical" ;
+ Text [ english_us ] = "Vertical scroll bar" ;
+ Text [ portuguese_brazilian ] = "Vertikaler Scrollbar" ;
+ Text [ swedish ] = "Vertikal rullningslist" ;
+ Text [ danish ] = "Lodret rullepanel" ;
+ Text [ italian ] = "Barra di scorrimento verticale" ;
+ Text [ spanish ] = "Barra de desplazamiento vertical" ;
+ Text [ french ] = "Barre de défilement verticale" ;
+ Text [ dutch ] = "Verticale beeldschuifbalk" ;
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò¹ö¶¯À¸";
+ Text[ russian ] = "Âåðòèêàëüíàÿ ïîëîñà ïðîêðóòêè";
+ Text[ polish ] = "Pionowy pasek przesuwania";
+ Text[ japanese ] = "‚’¼‚Ƚ¸Û°ÙÊÞ°";
+ Text[ chinese_traditional ] = "««ª½¤è¦V¨÷¶b";
+ Text[ greek ] = "Êáôáêüñõöç ãñáììÞ êýëéóçò";
+ Text[ korean ] = "¼öÁ÷ ½ºÅ©·Ñ ¸·´ë";
+ Text[ arabic ] = "ÔÑíØ ÊÍÑíß ÇáÕÝÍÉ ÑÃÓíÇð";
+ Text[ turkish ] = "Dikey kaydýrma çubuðu";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_MULTILINE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Mehrzeilig : Mehrzeilige Eingabe */
+ Text = "Mehrzeilig" ;
+ Text [ English ] = "Multiline" ;
+ Text [ portuguese ] = "Várias linhas" ;
+ Text [ english_us ] = "Multiline Input" ;
+ Text [ portuguese_brazilian ] = "Mehrzeilige Eingabe" ;
+ Text [ swedish ] = "Flerradig" ;
+ Text [ danish ] = "Flerlinjede" ;
+ Text [ italian ] = "Digitazione a più righe" ;
+ Text [ spanish ] = "Varias líneas" ;
+ Text [ french ] = "Saisie à plusieurs lignes" ;
+ Text [ dutch ] = "Meerdere regels" ;
+ Text[ chinese_simplified ] = "¶àÐÐ";
+ Text[ russian ] = "Ìíîãîñòðî÷íûé";
+ Text[ polish ] = "Wielowierszowy";
+ Text[ japanese ] = "•¡”s";
+ Text[ chinese_traditional ] = "¦h¦æ";
+ Text[ greek ] = "Ðïëýóôõëï";
+ Text[ korean ] = "¿©·¯ ÁÙ ÀÔ·Â";
+ Text[ arabic ] = "ãÊÚÏÏ ÇáÃÓØÑ";
+ Text[ turkish ] = "Çok satýrlý giriþ";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_MULTISELECTION
+{
+ Text = "Mehrfachselektion" ;
+ Text [ English ] = "Multiselection" ;
+ Text [ portuguese ] = "Multi-selecção" ;
+ Text [ english_us ] = "Multiselection" ;
+ Text [ portuguese_brazilian ] = "Mehrfachselektion" ;
+ Text [ swedish ] = "Multipel markering" ;
+ Text [ danish ] = "Multimarkering" ;
+ Text [ italian ] = "Selezione multipla" ;
+ Text [ spanish ] = "Selección múltiple" ;
+ Text [ french ] = "Sélection multiple" ;
+ Text [ dutch ] = "Meevoudige selectie" ;
+ Text[ chinese_simplified ] = "¶àÖØÑ¡Ôñ";
+ Text[ russian ] = "Ãðóïïîâîå âûäåëåíèå";
+ Text[ polish ] = "Wielokrotny wybór";
+ Text[ japanese ] = "•¡”‘I‘ð";
+ Text[ chinese_traditional ] = "¦h­«¿ï¾Ü";
+ Text[ greek ] = "ÐïëëáðëÞ åðéëïãÞ";
+ Text[ korean ] = "´ÙÁß ¼±ÅÃ";
+ Text[ arabic ] = "ÊÍÏíÏ ãÊÚÏÏ";
+ Text[ turkish ] = "Çoklu seçim";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_NAME
+{
+ Text = "Name" ;
+ Text [ English ] = "Name" ;
+ Text [ portuguese ] = "Nome" ;
+ Text [ english_us ] = "Name" ;
+ 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[ greek ] = "¼íïìá";
+ Text[ korean ] = "À̸§";
+ Text[ arabic ] = "ÇáÇÓã";
+ Text[ turkish ] = "Ad";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TABSTOP
+{
+ Text = "Tabstop" ;
+ Text [ English ] = "Tabstop" ;
+ Text [ portuguese ] = "Tabstop" ;
+ Text [ english_us ] = "Tabstop" ;
+ Text [ portuguese_brazilian ] = "Tabstop" ;
+ Text [ swedish ] = "Tabbstopp" ;
+ Text [ danish ] = "Tabstop" ;
+ Text [ italian ] = "Tabstop" ;
+ Text [ spanish ] = "Tabstop" ;
+ Text [ french ] = "Tabstop" ;
+ Text [ dutch ] = "Tabstop" ;
+ Text[ chinese_simplified ] = "ÖƱí·û";
+ Text[ russian ] = "Tabstop";
+ Text[ polish ] = "Tabstop";
+ Text[ japanese ] = "ÀÌ޽įÌß";
+ Text[ chinese_traditional ] = "»sªí²Å";
+ Text[ greek ] = "ÓôçëïèÝôçò";
+ Text[ korean ] = "ÅÇ ÁßÁö";
+ Text[ arabic ] = "ÚáÇãÉ ÌÏæáÉ";
+ Text[ turkish ] = "Sekme duraðý";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TEXT
+{
+ Text = "Text" ;
+ Text [ English ] = "Text" ;
+ Text [ portuguese ] = "Texto" ;
+ Text [ english_us ] = "Text" ;
+ Text [ portuguese_brazilian ] = "Text" ;
+ Text [ swedish ] = "Text" ;
+ Text [ danish ] = "Tekst" ;
+ Text [ italian ] = "Testo" ;
+ Text [ spanish ] = "Texto" ;
+ Text [ french ] = "Texte" ;
+ Text [ dutch ] = "Tekst" ;
+ Text[ chinese_simplified ] = "ÎÄ×Ö";
+ Text[ russian ] = "Òåêñò";
+ Text[ polish ] = "Tekst";
+ Text[ japanese ] = "÷½Ä";
+ Text[ chinese_traditional ] = "¤å¦r";
+ Text[ greek ] = "Êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ®";
+ Text[ arabic ] = "ÇáäÕ";
+ Text[ turkish ] = "Metin";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_CONTROLSOURCE
+{
+ Text = "Datenfeld" ;
+ Text [ English ] = "Data field" ;
+ Text [ portuguese ] = "Campo de dados" ;
+ Text [ english_us ] = "Field name" ;
+ Text [ portuguese_brazilian ] = "Datenfeld" ;
+ Text [ swedish ] = "Datafält" ;
+ Text [ danish ] = "Datafelt" ;
+ Text [ italian ] = "Campo di dati" ;
+ Text [ spanish ] = "Campo de datos" ;
+ Text [ french ] = "Champ de données" ;
+ Text [ dutch ] = "Gegevensveld" ;
+ Text[ chinese_simplified ] = "Êý¾Ý×Ö¶Î";
+ Text[ russian ] = "Ïîëå äàííûõ";
+ Text[ polish ] = "Pole danych";
+ Text[ japanese ] = "ÃÞ°Ą̀°ÙÄÞ";
+ Text[ chinese_traditional ] = "¸ê®ÆÄæ¦ì";
+ Text[ greek ] = "Ðåäßï äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅÍ Çʵå";
+ Text[ arabic ] = "ÍÞá ÈíÇäÇÊ";
+ Text[ turkish ] = "Veri alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DROPDOWN
+{
+ Text = "Aufklappbar" ;
+ Text [ English ] = "Dropdown" ;
+ Text [ portuguese ] = "Desdobrável" ;
+ Text [ english_us ] = "Dropdown" ;
+ Text [ portuguese_brazilian ] = "Aufklappbar" ;
+ Text [ swedish ] = "Öppningsbar" ;
+ Text [ danish ] = "Udklappelig" ;
+ Text [ italian ] = "Apribile" ;
+ Text [ spanish ] = "Desplegable" ;
+ Text [ french ] = "Déroulante" ;
+ Text [ dutch ] = "Openslaan mogelijk" ;
+ Text[ chinese_simplified ] = "¿ÉÀ©Õ¹";
+ Text[ russian ] = "Ðàñêðûâàåìûé";
+ Text[ polish ] = "Rozwijany";
+ Text[ japanese ] = "ÄÞÛ¯ÌßÀÞ³Ý";
+ Text[ chinese_traditional ] = "¥iÂX®i";
+ Text[ greek ] = "Äõíáôüôçôá áíïßãìáôïò";
+ Text[ korean ] = "µå·Ó´Ù¿î";
+ Text[ arabic ] = "ãäÓÏá";
+ Text[ turkish ] = "Açýlabilir";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_BOUNDCOLUMN
+{
+ Text = "Gebundenes Feld" ;
+ Text [ English ] = "Bound field" ;
+ Text [ portuguese ] = "Coluna ligada" ;
+ Text [ english_us ] = "Bound column" ;
+ Text [ portuguese_brazilian ] = "Gebundenes Feld" ;
+ Text [ swedish ] = "Bundet fält" ;
+ Text [ danish ] = "Bundet felt" ;
+ Text [ italian ] = "Campo collegato" ;
+ Text [ spanish ] = "Campo ligado" ;
+ Text [ french ] = "Champ lié" ;
+ Text [ dutch ] = "Gebonden veld" ;
+ Text[ chinese_simplified ] = "¹Ì¶¨µÄ×Ö¶Î";
+ Text[ russian ] = "Ïðèâÿçàííîå ïîëå";
+ Text[ polish ] = "Powi¹zane pole";
+ Text[ japanese ] = "ŠÖ˜A‚ ‚ę́°ÙÄÞ";
+ Text[ chinese_traditional ] = "©T©wªºÄæ¦ì";
+ Text[ greek ] = "ÄåóìåõìÝíï ðåäßï";
+ Text[ korean ] = "¹Ù¿îµå ¿­";
+ Text[ arabic ] = "ÍÞá ãÑÈæØ";
+ Text[ turkish ] = "Baðlý alan";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LISTSOURCE
+{
+ Text = "Listeninhalt" ;
+ Text [ English ] = "Listsource" ;
+ Text [ portuguese ] = "Contéudo de lista" ;
+ Text [ english_us ] = "List content" ;
+ Text [ portuguese_brazilian ] = "Datenquelle" ;
+ Text [ swedish ] = "Listinnehåll" ;
+ Text [ danish ] = "Listeindhold" ;
+ Text [ italian ] = "Contenuto elenco" ;
+ Text [ spanish ] = "Contenido de lista" ;
+ Text [ french ] = "Contenu de liste" ;
+ Text [ dutch ] = "Lijstinhoud" ;
+ Text[ chinese_simplified ] = "ÁбíÄÚÈÝ";
+ Text[ russian ] = "Ñîäåðæèìîå ñïèñêà";
+ Text[ polish ] = "ZawartoϾ listy";
+ Text[ japanese ] = "ؽēà—e";
+ Text[ chinese_traditional ] = "²M³æ¤º®e";
+ Text[ greek ] = "Ðåñéå÷üìåíï ëßóôáò";
+ Text[ korean ] = "¸ñ·Ï ³»¿ë";
+ Text[ arabic ] = "ãÍÊæíÇÊ ÇáÞÇÆãÉ";
+ Text[ turkish ] = "Liste içeriði";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LISTSOURCETYPE
+{
+ Text = "Art des Listeninhalts" ;
+ Text [ English ] = "Type of listsource" ;
+ Text [ portuguese ] = "Tipo do conteúdo da lista" ;
+ Text [ english_us ] = "Type of list contents" ;
+ Text [ portuguese_brazilian ] = "Typ der Datenquelle" ;
+ Text [ swedish ] = "Typ av listinnehåll" ;
+ Text [ danish ] = "Listeindholdstype" ;
+ Text [ italian ] = "Tipo del contenuto della lista" ;
+ Text [ spanish ] = "Tipo del contenido de lista" ;
+ Text [ french ] = "Type du contenu de liste" ;
+ Text [ dutch ] = "Type lijstinhoud" ;
+ Text[ chinese_simplified ] = "ÁбíÄÚÈݵÄÀàÐÍ";
+ Text[ russian ] = "Òèï ñîäåðæèìîãî ñïèñêà";
+ Text[ polish ] = "Typ zawartoœci listy";
+ Text[ japanese ] = "ؽēà—e‚ÌŽí—Þ";
+ Text[ chinese_traditional ] = "²M³æ¤º®eªºÃþ«¬";
+ Text[ greek ] = "Åßäïò ôïõ ðåñéå÷ïìÝíïõ ëßóôáò";
+ Text[ korean ] = "¸ñ·Ï ³»¿ëÀÇ À¯Çü";
+ Text[ arabic ] = "äæÚ ãÍÊæíÇÊ ÇáÞÇÆãÉ";
+ Text[ turkish ] = "Liste içeriði türü";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_CURSORSOURCE
+{
+ Text = "Datenquelle" ;
+ Text [ English ] = "Datasource" ;
+ Text [ portuguese ] = "Fonte de dados" ;
+ Text [ english_us ] = "Data source" ;
+ Text [ portuguese_brazilian ] = "Datenquelle" ;
+ Text [ swedish ] = "Datakälla" ;
+ Text [ danish ] = "Datakilde" ;
+ Text [ italian ] = "Sorgente dati" ;
+ Text [ spanish ] = "Fuente de datos" ;
+ Text [ french ] = "Source de données" ;
+ Text [ dutch ] = "Gegevensbron" ;
+ Text[ chinese_simplified ] = "Êý¾ÝÔ´";
+ Text[ russian ] = "Èñòî÷íèê äàííûõ";
+ Text[ polish ] = "ród³o danych";
+ Text[ japanese ] = "ÃÞ°À¿°½";
+ Text[ chinese_traditional ] = "¸ê®Æ·½";
+ Text[ greek ] = "ÐñïÝëåõóç äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅÍ ¼Ò½º";
+ Text[ arabic ] = "ãÕÏÑ ÇáÈíÇäÇÊ";
+ Text[ turkish ] = "Veri kaynaðý";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_CURSORSOURCETYPE
+{
+ Text = "Art der Datenquelle" ;
+ Text [ English ] = "Type of Datasource" ;
+ Text [ portuguese ] = "Tipo da fonte de dados" ;
+ Text [ english_us ] = "Type of data source" ;
+ Text [ portuguese_brazilian ] = "Typ der Datenquelle" ;
+ Text [ swedish ] = "Typ av datakälla" ;
+ Text [ danish ] = "Datakildetype" ;
+ Text [ italian ] = "Tipo della sorgente dati" ;
+ Text [ spanish ] = "Tipo de fuente de datos" ;
+ Text [ french ] = "Type de la source de données" ;
+ Text [ dutch ] = "Type gegevensbron" ;
+ Text[ chinese_simplified ] = "Êý¾ÝÔ´µÄÀàÐÍ";
+ Text[ russian ] = "Òèï èñòî÷íèêà äàííûõ";
+ Text[ polish ] = "Typ Ÿród³a danych";
+ Text[ japanese ] = "ÃÞ°À¿°½‚ÌŽí—Þ";
+ Text[ chinese_traditional ] = "¸ê®Æ·½Ãþ«¬";
+ Text[ greek ] = "Ôýðïò ðñïÝëåõóçò äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅÍ ¼Ò½ºÀÇ À¯Çü";
+ Text[ arabic ] = "äæÚ ãÕÏÑ ÇáÈíÇäÇÊ";
+ Text[ turkish ] = "Veri kaynaðý türü";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ALLOW_ADDITIONS
+{
+ Text = "Daten hinzufügen" ;
+ Text [ English ] = "Allow additions" ;
+ Text [ portuguese ] = "Adicionar dados" ;
+ Text [ english_us ] = "Allow additions" ;
+ Text [ portuguese_brazilian ] = "Daten hinzufügen" ;
+ Text [ swedish ] = "Lägg till data" ;
+ Text [ danish ] = "Tilføj data" ;
+ Text [ italian ] = "Aggiungi dati" ;
+ Text [ spanish ] = "Añadir datos" ;
+ Text [ french ] = "Ajouter des données" ;
+ Text [ dutch ] = "Gegevens toevoegen" ;
+ Text[ chinese_simplified ] = "ÐÂÔöÊý¾Ý";
+ Text[ russian ] = "Äîáàâèòü äàííûå";
+ Text[ polish ] = "Dodaj dane";
+ Text[ japanese ] = "ÃÞ°À‚̒ljÁ";
+ Text[ chinese_traditional ] = "¼W¥[¸ê®Æ";
+ Text[ greek ] = "ÐñïóèÞêç äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅÍ Ãß°¡";
+ Text[ arabic ] = "ÅÖÇÝÉ ÈíÇäÇÊ";
+ Text[ turkish ] = "Veri ekle";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ALLOW_DELETIONS
+{
+ Text = "Daten löschen" ;
+ Text [ English ] = "Allow deletions" ;
+ Text [ portuguese ] = "Eliminar dados" ;
+ Text [ english_us ] = "Delete data" ;
+ Text [ portuguese_brazilian ] = "Daten löschen" ;
+ Text [ swedish ] = "Radera data" ;
+ Text [ danish ] = "Slet data" ;
+ Text [ italian ] = "Elimina dati" ;
+ Text [ spanish ] = "Eliminar datos" ;
+ Text [ french ] = "Supprimer les données" ;
+ Text [ dutch ] = "Gegevens wissen" ;
+ Text[ chinese_simplified ] = "ɾ³ýÊý¾Ý";
+ Text[ russian ] = "Óäàëèòü äàííûå";
+ Text[ polish ] = "Usuñ dane";
+ Text[ japanese ] = "ÃÞ°À‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£¸ê®Æ";
+ Text[ greek ] = "ÄéáãñáöÞ äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅÍ »èÁ¦";
+ Text[ arabic ] = "ÍÐÝ ÈíÇäÇÊ";
+ Text[ turkish ] = "Verileri sil";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ALLOW_EDITS
+{
+ Text = "Daten ändern" ;
+ Text [ English ] = "Allow edits" ;
+ Text [ portuguese ] = "Modificar dados" ;
+ Text [ english_us ] = "Allow modifications" ;
+ Text [ portuguese_brazilian ] = "Daten ändern" ;
+ Text [ swedish ] = "Ändra data" ;
+ Text [ danish ] = "Modificer data" ;
+ Text [ italian ] = "Modifica dati" ;
+ Text [ spanish ] = "Modificar datos" ;
+ Text [ french ] = "Modifier les données" ;
+ Text [ dutch ] = "Gegevens wijzigen" ;
+ Text[ chinese_simplified ] = "ÐÞ¸ÄÊý¾Ý";
+ Text[ russian ] = "Èçìåíèòü äàííûå";
+ Text[ polish ] = "Modyfikuj dane";
+ Text[ japanese ] = "ÃÞ°À‚Ì•ÏX";
+ Text[ chinese_traditional ] = "­×§ï¸ê®Æ";
+ Text[ greek ] = "Ôñïðïðïßçóç äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅÍ º¯°æ";
+ Text[ arabic ] = "ÊÛííÑ ÈíÇäÇÊ";
+ Text[ turkish ] = "Verileri deðiþtir";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DATAENTRY
+{
+ Text = "Nur Daten hinzufügen" ;
+ Text [ English ] = "Only additions allowed" ;
+ Text [ portuguese ] = "Adicionar apenas dados" ;
+ Text [ english_us ] = "Add data only " ;
+ Text [ portuguese_brazilian ] = "Nur Daten hinzufügen" ;
+ Text [ swedish ] = "Lägg endast till data" ;
+ Text [ danish ] = "Tilføj kun data" ;
+ Text [ italian ] = "Aggiungi solo i dati" ;
+ Text [ spanish ] = "Añadir solo datos" ;
+ Text [ french ] = "N'ajouter que des données" ;
+ Text [ dutch ] = "Alleen gegevens toevoegen" ;
+ Text[ chinese_simplified ] = "Ö»ÐÂÔöÊý¾Ý";
+ Text[ russian ] = "Äîáàâèòü òîëüêî äàííûå";
+ Text[ polish ] = "Dodaj tylko dane";
+ Text[ japanese ] = "ÃÞ°À‚̂ݒljÁ";
+ Text[ chinese_traditional ] = "¶È¼W¥[¸ê®Æ";
+ Text[ greek ] = "ÐñïóèÞêç äåäïìÝíùí ìüíï";
+ Text[ korean ] = "µ¥ÀÌÅ͸¸ Ãß°¡";
+ Text[ arabic ] = "ÅÖÇÝÉ ÈíÇäÇÊ ÝÞØ";
+ Text[ turkish ] = "Yalnýzca veri ekle";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DATASOURCE
+{
+ Text = "Datenbank" ;
+ Text [ English ] = "Database" ;
+ Text [ portuguese ] = "Base de dados" ;
+ Text [ english_us ] = "Database" ;
+ Text [ portuguese_brazilian ] = "Datenbank" ;
+ Text [ swedish ] = "Databas" ;
+ Text [ danish ] = "Database" ;
+ Text [ italian ] = "Database" ;
+ Text [ spanish ] = "Base de datos" ;
+ Text [ french ] = "Base de données" ;
+ Text [ dutch ] = "Database" ;
+ Text[ chinese_simplified ] = "Êý¾Ý¿â";
+ Text[ russian ] = "Áàçà äàííûõ";
+ Text[ polish ] = "Baza danych";
+ Text[ japanese ] = "ÃÞ°ÀÍÞ°½";
+ Text[ chinese_traditional ] = "¸ê®Æ®w";
+ Text[ greek ] = "ÂÜóç äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅͺ£À̽º";
+ Text[ arabic ] = "ÞÇÚÏÉ ÇáÈíÇäÇÊ";
+ Text[ turkish ] = "Veritabaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LOCKED
+{
+ Text = "Gesperrt" ;
+ Text [ English ] = "Locked" ;
+ Text [ portuguese ] = "Expandido" ;
+ Text [ english_us ] = "Locked" ;
+ Text [ portuguese_brazilian ] = "Gesperrt" ;
+ Text [ swedish ] = "Spärrat" ;
+ Text [ danish ] = "Låst" ;
+ Text [ italian ] = "Bloccato" ;
+ Text [ spanish ] = "Protegido" ;
+ Text [ french ] = "Vérrouillé" ;
+ Text [ dutch ] = "Versperd" ;
+ Text[ chinese_simplified ] = "Ëø¶¨µÄ";
+ Text[ russian ] = "Çàáëîêèðîâàíî";
+ Text[ polish ] = "Zablokowany";
+ Text[ japanese ] = "Û¯¸‚³‚ê‚Ä‚¢‚é";
+ Text[ chinese_traditional ] = "Âê©wªº";
+ Text[ greek ] = "ÊëåéäùìÝíï";
+ Text[ korean ] = "Àá±è";
+ Text[ arabic ] = "ãÄãä";
+ Text[ turkish ] = "Kilitli";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_MASTERFIELDS
+{
+ Text = "Verknüpfen von" ;
+ Text [ English ] = "Master fields" ;
+ Text [ portuguese ] = "Ligar de" ;
+ Text [ english_us ] = "Linking" ;
+ Text [ portuguese_brazilian ] = "Übergeordnete Felder" ;
+ Text [ swedish ] = "Länka från" ;
+ Text [ danish ] = "Kæde fra" ;
+ Text [ italian ] = "Collega da" ;
+ Text [ spanish ] = "Vinculación de" ;
+ Text [ french ] = "Établir un lien depuis" ;
+ Text [ dutch ] = "Koppelen van" ;
+ Text[ chinese_simplified ] = "Á´½Óµ½";
+ Text[ russian ] = "Ñâÿçè";
+ Text[ polish ] = "Po³¹cz";
+ Text[ japanese ] = "ØݸŒ³";
+ Text[ chinese_traditional ] = "³sµ²¨ì";
+ Text[ greek ] = "Óýíäåóç ôùí";
+ Text[ korean ] = "¿¬°á";
+ Text[ arabic ] = "ÑÈØ";
+ Text[ turkish ] = "Baðlantý öðeleri";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SLAVEFIELDS
+{
+ Text = "Verknüpfen nach" ;
+ Text [ English ] = "Subfields" ;
+ Text [ portuguese ] = "Ligar com" ;
+ Text [ english_us ] = "Subfields" ;
+ Text [ portuguese_brazilian ] = "Untergeordnete Felder" ;
+ Text [ swedish ] = "Länka till" ;
+ Text [ danish ] = "Kæde til" ;
+ Text [ italian ] = "Collega per" ;
+ Text [ spanish ] = "Vincular con" ;
+ Text [ french ] = "Établir un lien avec" ;
+ Text [ dutch ] = "Koppelen met" ;
+ Text[ chinese_simplified ] = "Á´½Óµ½";
+ Text[ russian ] = "Ñâÿçàòü ñ";
+ Text[ polish ] = "Po³¹cz z";
+ Text[ japanese ] = "Ú‘±æ";
+ Text[ chinese_traditional ] = "³sµ²¨ì";
+ Text[ greek ] = "Óýíäåóç ìå";
+ Text[ korean ] = "ÇÏÀ§ Çʵå";
+ Text[ arabic ] = "ÇÑÊÈÇØ ãÚ";
+ Text[ turkish ] = "Alt alanlar";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_CURSOR_TYPE
+{
+ Text = "Statisch;Dynamisch" ;
+ Text [ English ] = "Static;Dynamic" ;
+ Text [ portuguese ] = "Estático;Dinâmico" ;
+ Text [ english_us ] = "Static;Dynamic" ;
+ Text [ portuguese_brazilian ] = "Statisch;Dynamisch" ;
+ Text [ swedish ] = "Statisk;Dynamisk" ;
+ Text [ danish ] = "Statisk;Dynamisk" ;
+ Text [ italian ] = "Statico;dinamico" ;
+ Text [ spanish ] = "Estático;Dinámico" ;
+ Text [ french ] = "Statique;Dynamique" ;
+ Text [ dutch ] = "Statisch;Dynamisch" ;
+ Text[ chinese_simplified ] = "¾²Ì¬;¶¯Ì¬";
+ Text[ russian ] = "Ñòàòè÷íî;Äèíàìè÷íî";
+ Text[ polish ] = "Statyczny;Dynamiczny";
+ Text[ japanese ] = "ÓI;“®“I";
+ Text[ chinese_traditional ] = "ÀRºA¡F°ÊºA";
+ Text[ greek ] = "ÓôáôéêÜ;ÄõíáìéêÜ";
+ Text[ korean ] = "Á¤Àû;µ¿Àû";
+ Text[ arabic ] = "ÓÇßä;ÏíäÇãíßí";
+ Text[ turkish ] = "Statik;Dinamik";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVENTS
+{
+ Text = "Ereignisse" ;
+ Text [ English ] = "Events" ;
+ Text [ portuguese ] = "Eventos" ;
+ Text [ english_us ] = "Events" ;
+ Text [ portuguese_brazilian ] = "Ereignisse" ;
+ Text [ swedish ] = "Händelser" ;
+ Text [ danish ] = "Begivenheder" ;
+ Text [ italian ] = "Eventi" ;
+ Text [ spanish ] = "Acontecimientos" ;
+ Text [ french ] = "Événements" ;
+ Text [ dutch ] = "Gebeurtenissen" ;
+ Text[ chinese_simplified ] = "ʼþ";
+ Text[ russian ] = "Ñîáûòèÿ";
+ Text[ polish ] = "Wydarzenia";
+ Text[ japanese ] = "ŽÀsŒ_‹@";
+ Text[ chinese_traditional ] = "°Ê§@";
+ Text[ greek ] = "Ãåãïíüôá";
+ Text[ korean ] = "À̺¥Æ®";
+ Text[ arabic ] = "ÇáÃÍÏÇË";
+ Text[ turkish ] = "Olaylar";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FORMS
+{
+ Text = "Formulare" ;
+ Text [ English ] = "Forms" ;
+ Text [ portuguese ] = "Formulários" ;
+ Text [ english_us ] = "Forms" ;
+ Text [ portuguese_brazilian ] = "Formulare" ;
+ Text [ swedish ] = "Formulär" ;
+ Text [ danish ] = "Formularer" ;
+ Text [ italian ] = "Formulari" ;
+ Text [ spanish ] = "Formularios" ;
+ Text [ french ] = "Formulaires" ;
+ Text [ dutch ] = "Formulieren" ;
+ Text[ chinese_simplified ] = "±íµ¥";
+ Text[ russian ] = "Ôîðìóëÿðû";
+ Text[ polish ] = "Formularze";
+ Text[ japanese ] = "Ì«°Ñ";
+ Text[ chinese_traditional ] = "ªí³æ";
+ Text[ greek ] = "Öüñìåò";
+ Text[ korean ] = "¾ç½Ä";
+ Text[ arabic ] = "ÇÓÊãÇÑÇÊ";
+ Text[ turkish ] = "Formlar";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_NO_PROPERTIES
+{
+ Text = "Kein Kontrollelement markiert oder gemischte Selektion" ;
+ Text [ English ] = "No Control or mixed selection" ;
+ Text [ portuguese ] = "Nenhum controlo seleccionado" ;
+ Text [ english_us ] = "No control selected" ;
+ Text [ portuguese_brazilian ] = "Kein Control markiert" ;
+ Text [ swedish ] = "Inget kontrollelement markerat eller blandad markering" ;
+ Text [ danish ] = "Intet kontrolelement markeret eller blandet markering" ;
+ Text [ italian ] = "Nessun elemento di controllo selezionato o selezione mista" ;
+ Text [ spanish ] = "Ningún elemento de control seleccionado o selección mixta" ;
+ Text [ french ] = "Aucun élément de contrôle sélectionné ou sélection mélangée" ;
+ Text [ dutch ] = "Geen controle-element gemarkeerd of gemengde selectie" ;
+ Text[ chinese_simplified ] = "ûÓÐÑ¡Ôñ¿ØÖÆ»òÊÇÒ»¸ö»ìºÏµÄÑ¡Ôñ";
+ Text[ russian ] = "Íè îäèí ýëåìåíò óïðàâëåíèÿ íå âûäåëåí èëè ñìåøàííûé âûáîð";
+ Text[ polish ] = "Nie zaznaczono formantu lub mieszana selekcja";
+ Text[ japanese ] = "ºÝÄÛ°Ù—v‘f‚ªÏ°¸‚³‚ê‚Ä‚È‚¢‚© ¬‡‚µ‚½‘I‘ð";
+ Text[ chinese_traditional ] = "¨S¦³¿ï¨ú±±¨î¶µ©Î¬O¤@­Ó²V¦Xªº¿ï¨ú";
+ Text[ greek ] = "Äåí Ýãéíå åðéëïãÞ óôïé÷åßïõ åëÝã÷ïõ";
+ Text[ korean ] = "ÄÁÆ®·Ñ ¿ä¼Ò°¡ ¼±ÅõÇÁö ¾Ê¾Ò°Å³ª È¥ÇÕµÈ ¼±ÅÃÀÓ";
+ Text[ arabic ] = "áã íÊã ÊÍÏíÏ ÚäÕÑ ÊÍßã Ãæ Êã Úãá ÊÍÏíÏ ãÎÊáØ";
+ Text[ turkish ] = "Komut öðesi seçilmedi ya da karma seçim yapýldý.";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPERTIES_CONTROL
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Eigenschaften: : Kontrollelement Eigenschaften */
+ Text = "Eigenschaften: " ;
+ Text [ English ] = "Properties: " ;
+ Text [ portuguese ] = "Propriedades: " ;
+ Text [ english_us ] = "Properties: " ;
+ Text [ portuguese_brazilian ] = "Control-Eigenschaften " ;
+ Text [ swedish ] = "Egenskaper: " ;
+ Text [ danish ] = "Egenskaber: " ;
+ Text [ italian ] = "Proprietà: " ;
+ Text [ spanish ] = "Propiedades: " ;
+ Text [ french ] = "Propriétés : " ;
+ Text [ dutch ] = "Eigenschappen " ;
+ Text[ chinese_simplified ] = "ÊôÐÔ£º ";
+ Text[ russian ] = "Ñâîéñòâà: ";
+ Text[ polish ] = "W³aœciwoœci: ";
+ Text[ japanese ] = "ÌßÛÊßè: ";
+ Text[ chinese_traditional ] = "ÄÝ©Ê¡G ";
+ Text[ greek ] = "Éäéüôçôåò: ";
+ Text[ korean ] = "µî·ÏÁ¤º¸: ";
+ Text[ arabic ] = "ÇáÎÕÇÆÕ: ";
+ Text[ turkish ] = "Özellikler: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPERTIES_COLUMN
+{
+ Text = "Spalten-Eigenschaften: " ;
+ Text [ English ] = "Column properties: " ;
+ Text [ portuguese ] = "Propriedades de colunas: " ;
+ Text [ english_us ] = "Column properties: " ;
+ Text [ portuguese_brazilian ] = "Spalten-Eigenschaften" ;
+ Text [ swedish ] = "Kolumnegenskaper: " ;
+ Text [ danish ] = "Kolonneegenskaber: " ;
+ Text [ italian ] = "Proprietà colonne: " ;
+ Text [ spanish ] = "Propiedades de las columnas: " ;
+ Text [ french ] = "Propriétés des colonnes : " ;
+ Text [ dutch ] = "Kolomeigenschappen: " ;
+ Text[ chinese_simplified ] = "ÁÐÊôÐÔ£º ";
+ Text[ russian ] = "Ñâîéñòâà êîëîíîê: ";
+ Text[ polish ] = "W³aœciwoœci kolumny ";
+ Text[ japanese ] = "—ñ‚ÌÌßÛÊßè ";
+ Text[ chinese_traditional ] = "ÄæÄÝ©Ê¡G ";
+ Text[ greek ] = "Éäéüôçôåò óôÞëçò: ";
+ Text[ korean ] = "¿­ µî·ÏÁ¤º¸: ";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ ÇáÃÚãÏÉ: ";
+ Text[ turkish ] = "Sütun öðeleri: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPERTIES_FORM
+{
+ Text = "Formular-Eigenschaften" ;
+ Text [ English ] = "Form properties" ;
+ Text [ portuguese ] = "Propriedades de formulários" ;
+ Text [ english_us ] = "Form properties" ;
+ Text [ portuguese_brazilian ] = "Formular-Eigenschaften" ;
+ Text [ swedish ] = "Formuläregenskaper" ;
+ Text [ danish ] = "Formularegenskaber" ;
+ Text [ italian ] = "Proprietà formulario" ;
+ Text [ spanish ] = "Propiedades del formulario" ;
+ Text [ french ] = "Propriétés du formulaire" ;
+ Text [ dutch ] = "Formuliereigenschappen" ;
+ Text[ chinese_simplified ] = "±íµ¥ÊôÐÔ";
+ Text[ russian ] = "Ñâîéñòâà ôîðìóëÿðà";
+ Text[ polish ] = "W³aœciwoœci formularza";
+ Text[ japanese ] = "Ì«°Ñ‚Ì‘®«";
+ Text[ chinese_traditional ] = "ªí³æÄÝ©Ê";
+ Text[ greek ] = "Éäéüôçôåò öüñìáò";
+ Text[ korean ] = "¾ç½Ä µî·ÏÁ¤º¸";
+ Text[ arabic ] = "ÎÕÇÆÕ ÇáÇÓÊãÇÑÉ";
+ Text[ turkish ] = "Form özellikleri";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FMEXPLORER
+{
+ Text = "Formular Navigator" ;
+ Text [ English ] = "Form navigator" ;
+ Text [ portuguese ] = "Navegador - Formulários" ;
+ Text [ english_us ] = "Form Navigator" ;
+ Text [ portuguese_brazilian ] = "Formular Navigator" ;
+ Text [ swedish ] = "Formulär-Navigator" ;
+ Text [ danish ] = "Formular Navigator" ;
+ Text [ italian ] = "Navigatore formulario" ;
+ Text [ spanish ] = "Navegador de formulario" ;
+ Text [ french ] = "Navigateur de formulaires" ;
+ Text [ dutch ] = "Formulier-navigator" ;
+ Text[ chinese_simplified ] = "±íµ¥ÖúÊÖ";
+ Text[ russian ] = "Íàâèãàòîð ôîðìóëÿðà";
+ Text[ polish ] = "Nawigator formularza";
+ Text[ japanese ] = "Ì«°Ñ ÅËÞ¹Þ°À";
+ Text[ chinese_traditional ] = "ªí³æ§U¤â";
+ Text[ greek ] = "Navigator öüñìáò";
+ Text[ korean ] = "¾ç½Ä ³×ºñ°ÔÀÌÅÍ";
+ Text[ arabic ] = "äÇÝíÌíÊæÑ ÇáÇÓÊãÇÑÉ";
+ Text[ turkish ] = "Form navigatörü";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LISTSOURCE_TYPE
+{
+ Text = "Werteliste;Tabelle;Abfrage;Sql;Sql [Native];Tabellenfelder" ;
+ Text [ English ] = "Valuelist;Table;Query;Sql;Sql [Native];Tablefields" ;
+ Text [ portuguese ] = "Lista de valores;Tabela; Consulta; Sql;Sql [Native];Campos de tabela" ;
+ Text [ english_us ] = "Valuelist;Table;Query;Sql;Sql [Native];Tablefields" ;
+ Text [ portuguese_brazilian ] = "Werteliste;Tabelle;Abfrage;Sql;Sql [Native];Tabellenfelder" ;
+ Text [ swedish ] = "Värdelista;Tabell;Sökning;Sql;Sql [Native];Tabellfält" ;
+ Text [ danish ] = "Værdiliste;Tabel;Forespørgsel;Sql;Sql [native];Tabelfelter" ;
+ Text [ italian ] = "Lista valori;Tabella;Ricerca;Sql;Sql [native];Campi tabella" ;
+ Text [ spanish ] = "Lista de valores;Tabla;Consulta;Sql;Sql [Native];Campos de tablas" ;
+ Text [ french ] = "Liste de valeurs;Table;Requête;Sql;Sql [Natif];Champs de table" ;
+ Text [ dutch ] = "Waardenlijst;Tabel;Query;Sql;Sql [Native];Tabelvelden" ;
+ Text[ chinese_simplified ] = "ÊýÖµÁе¥;±í¸ñ;²éѯ;Sql;Sql [Native];¹¤×÷±í×Ö¶Î";
+ Text[ russian ] = "Ñïèñîê çíà÷åíèé;Òàáëèöà;Çàïðîñ;Sql;Sql [Native];Ïîëÿ òàáëèöû";
+ Text[ polish ] = "Lista wartoœci;Tabela;Kwerenda;Sql;Sql [Native];Pola tabeli";
+ Text[ japanese ] = "’lؽÄ;ðÌÞÙ;¸´Ø°;Sql;Sql [Native];ðÌÞŲ̀°ÙÄÞ";
+ Text[ greek ] = "Ëßóôá ôéìþí;Ðßíáêáò;Åñþôçìá;Sql;Sql [Native];Ðåäßá ðéíÜêùí";
+ Text[ korean ] = "°ª ¸ñ·Ï;Å×À̺í;ÁúÀÇ;Sql;Sql [Native];Å×À̺í Çʵå";
+ Text[ chinese_traditional ] = "¼Æ­È²M³æ;ªí®æ;¬d¸ß;Sql;Sql [Native];ªí®æÄæ¦ì";
+ Text[ arabic ] = "ÞÇÆãÉ Þíã;ÌÏæá;ÇÓÊÝÓÇÑ;Sql;Sql [Native]ÍÞæá ÌÏæá";
+ Text[ turkish ] = "Deðer listesi;Tablo;Sorgu;Sql;Sql [Native];Tablo alanlarý";
+};
+String RID_STR_CURSORSOURCE_TYPE
+{
+ Text = "Tabelle;Abfrage;SQL-Befehl" ;
+ Text [ English ] = "Table;Query;Sql;Sql [Native]" ;
+ Text [ english_us ] = "Table;Query;SQL command" ;
+ Text [ portuguese_brazilian ] = "Tabelle;Abfrage;Sql;Sql [Native]" ;
+ Text [ swedish ] = "Tabell;Sökning;SQL-kommando" ;
+ Text [ danish ] = "Tabel;Forespørgsel;SQL-kommando" ;
+ Text [ italian ] = "Tabella;Ricerca;Comando SQL" ;
+ Text [ spanish ] = "Tabla;Consulta;Comando SQL" ;
+ Text [ french ] = "Table;Requête;Commande SQL" ;
+ Text [ dutch ] = "Tabel;Query;Sql;Sql-opdracht" ;
+ Text [ portuguese ] = "Tabela;Consulta;Comando SQL" ;
+ Text[ chinese_simplified ] = "±í¸ñ;²éѯ;Sql Ö¸Áî";
+ Text[ russian ] = "Òàáëèöà;Çàïðîñ;Êîìàíäà SQL";
+ Text[ polish ] = "Tabela;kwerenda;polecenie SQL";
+ Text[ japanese ] = "ðÌÞÙ;¸´Ø°;SQLºÏÝÄÞ";
+ Text[ chinese_traditional ] = "ªí®æ;¬d¸ß;Sql;Sql [Native]";
+ Text[ greek ] = "Ðßíáêáò;Åñþôçìá;ÅíôïëÞ SQL";
+ Text[ korean ] = "Å×À̺í;ÁúÀÇ;SQL ¸í·É";
+ Text[ arabic ] = "ÌÏæá;ÇÓÊÝÓÇÑ;ÃãÑ SQL";
+ Text[ turkish ] = "Tablo;Sorgu;SQL komutu";
+};
+String RID_STR_COMMAND_TYPE
+{
+ Text = "Tabelle;Abfrage;SQL-Befehl";
+ Text [ English ] = "Table;Query;SQL command";
+ Text [ english_us ] = "Table;Query;SQL command";
+ Text[ portuguese ] = "Tabela;Consulta;Comando SQL";
+ Text[ russian ] = "Òàáëèöà;Çàïðîñ;Êîìàíäà SQL";
+ Text[ greek ] = "Ðßíáêáò;Åñþôçìá;ÅíôïëÞ SQL";
+ Text[ dutch ] = "Tabel;Query;SQL-opdracht";
+ Text[ french ] = "Table;Requête;Commande SQL";
+ Text[ spanish ] = "Tabla;consulta;comando SQL";
+ Text[ italian ] = "Tabella;Ricerca;Comando SQL";
+ Text[ danish ] = "Tabel;Forespørgsel;SQL-kommando";
+ Text[ swedish ] = "Tabell;Sökning;SQL-kommando";
+ Text[ polish ] = "Tabela;Kwerenda;Polecenie SQL";
+ Text[ portuguese_brazilian ] = ";Query;Table;SQL command";
+ Text[ japanese ] = "ðÌÞÙ;¸´Ø°;SQLºÏÝÄÞ";
+ Text[ korean ] = "Å×À̺í;ÁúÀÇ;SQL ¸í·É";
+ Text[ chinese_simplified ] = "±í¸ñ£»²éѯ£»SQL Ö¸Áî";
+ Text[ chinese_traditional ] = "¬d¸ß;ªí³æ;SQL «ü¥O";
+ Text[ arabic ] = "ÌÏæá;ÇÓÊÝÓÇÑ;ÃãÑ SQL";
+ Text[ turkish ] = "Tablo;Sorgu;SQL komutu";
+};
+String RID_STR_SEARCHING
+{
+ Text = "Suchfeld" ;
+ Text [ English ] = "Searchfield" ;
+ Text [ portuguese ] = "Campo de procura" ;
+ Text [ english_us ] = "Search field" ;
+ Text [ portuguese_brazilian ] = "Suchfeld" ;
+ Text [ swedish ] = "Sökfält" ;
+ Text [ danish ] = "Søgefelt" ;
+ Text [ italian ] = "Campo di ricerca" ;
+ Text [ spanish ] = "Campo de búsqueda" ;
+ Text [ french ] = "Champ de recherche" ;
+ Text [ dutch ] = "Zoekveld" ;
+ Text[ chinese_simplified ] = "ËÑÑ°×Ö¶Î";
+ Text[ russian ] = "Ïîëå ïîèñêà";
+ Text[ polish ] = "Pole wyszukiwania";
+ Text[ japanese ] = "ŒŸǫ̃°ÙÄÞ";
+ Text[ chinese_traditional ] = "´M§äÄæ¦ì";
+ Text[ greek ] = "Ðåäßï áíáæÞôçóçò";
+ Text[ korean ] = "ã±â Çʵå";
+ Text[ arabic ] = "ÍÞá ÇáÈÍË";
+ Text[ turkish ] = "Arama alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SEARCH_TYPE
+{
+ Text = "Nein;Aktiv;Passiv" ;
+ Text [ English ] = "No;Active;Passive" ;
+ Text [ portuguese ] = "Não;Activo;Passivo" ;
+ Text [ english_us ] = "No;Active;Passive" ;
+ Text [ portuguese_brazilian ] = "Nein;Aktiv;Passiv" ;
+ Text [ swedish ] = "Nej;Aktiv;Passiv" ;
+ Text [ danish ] = "Nej;Aktiv;Passiv" ;
+ Text [ italian ] = "No;Attivo:Passivo" ;
+ Text [ spanish ] = "No;Activo;Pasivo" ;
+ Text [ french ] = "Non;Actif;Passif" ;
+ Text [ dutch ] = "Nee;Aktief;Passief" ;
+ Text[ chinese_simplified ] = "·ñ;Ö÷¶¯;±»¶¯";
+ Text[ russian ] = "Íåò;Àêòèâíî;Ïàññèâíî";
+ Text[ polish ] = "Nie;Aktywny;Pasywny";
+ Text[ japanese ] = "‚¢‚¢‚¦;±¸Ã¨ÌÞ;½Ø°Ìß";
+ Text[ chinese_traditional ] = "§_;¥D°Ê;³Q°Ê";
+ Text[ greek ] = "¼÷é;ÅíåñãÜ;ÐáèçôéêÜ";
+ Text[ korean ] = "¾Æ´Ï¿À;´Éµ¿;¼öµ¿";
+ Text[ arabic ] = "áǺÝÚøÇáºÓáÈí";
+ Text[ turkish ] = "Hayýr;Etkin;Etkin deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_BOOL
+{
+ Text = "Nein;Ja" ;
+ Text [ English ] = "No;Yes" ;
+ Text [ portuguese ] = "Não;Sim" ;
+ Text [ english_us ] = "No;Yes" ;
+ Text [ portuguese_brazilian ] = "Nein;Ja" ;
+ Text [ swedish ] = "Nej;Ja" ;
+ Text [ danish ] = "Nej;Ja" ;
+ Text [ italian ] = "No;Sì" ;
+ Text [ spanish ] = "No;Sí" ;
+ Text [ french ] = "Non;Oui" ;
+ Text [ dutch ] = "Nee;Ja" ;
+ Text[ chinese_simplified ] = "·ñ£»ÊÇ";
+ Text[ russian ] = "Äà;Íåò";
+ Text[ polish ] = "Nie;Tak";
+ Text[ japanese ] = "‚¢‚¢‚¦;‚Í‚¢";
+ Text[ chinese_traditional ] = "§_¡F¬O";
+ Text[ greek ] = "¼÷é-Íáé";
+ Text[ korean ] = "¾Æ´Ï¿À;¿¹";
+ Text[ arabic ] = "áÇ;äÚã";
+ Text[ turkish ] = "Hayýr;Evet";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPPAGE_DEFAULT_TITLE
+{
+ Text = "Allgemein" ;
+ Text [ English ] = "Common" ;
+ Text [ portuguese ] = "Geral" ;
+ Text [ english_us ] = "General" ;
+ Text [ portuguese_brazilian ] = "Allgemein" ;
+ Text [ swedish ] = "Allmänt" ;
+ Text [ danish ] = "Generelt" ;
+ Text [ italian ] = "Generale" ;
+ Text [ spanish ] = "General" ;
+ Text [ french ] = "Général" ;
+ Text [ dutch ] = "Algemeen" ;
+ Text[ chinese_simplified ] = "³£¹æ";
+ Text[ russian ] = "Îáùèå";
+ Text[ polish ] = "Ogólne";
+ Text[ japanese ] = "‘S”Ê";
+ Text[ chinese_traditional ] = "¤@¯ë";
+ Text[ greek ] = "ÃåíéêÜ";
+ Text[ korean ] = "ÀϹÝ";
+ Text[ arabic ] = "ÚÇã";
+ Text[ turkish ] = "Genel";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FORM
+{
+ Text = "Formular" ;
+ Text [ English ] = "Form" ;
+ Text [ portuguese ] = "Formulário" ;
+ Text [ english_us ] = "Form" ;
+ Text [ portuguese_brazilian ] = "Formular" ;
+ Text [ swedish ] = "Formulär" ;
+ Text [ danish ] = "Formular" ;
+ Text [ italian ] = "Formulario" ;
+ Text [ spanish ] = "Formulario" ;
+ Text [ french ] = "Formulaire" ;
+ Text [ dutch ] = "Formulier" ;
+ Text[ chinese_simplified ] = "±íµ¥";
+ Text[ russian ] = "Ôîðìóëÿð";
+ Text[ polish ] = "Formularz";
+ Text[ japanese ] = "Ì«°Ñ";
+ Text[ chinese_traditional ] = "ªí³æ";
+ Text[ greek ] = "Öüñìá";
+ Text[ korean ] = "¾ç½Ä";
+ Text[ arabic ] = "ÇÓÊãÇÑÉ";
+ Text[ turkish ] = "Form";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPPAGE_FORMCTL_TITLE
+{
+ Text = "Daten" ;
+ Text [ English ] = "Data" ;
+ Text [ portuguese ] = "Dados" ;
+ Text [ english_us ] = "Data" ;
+ Text [ portuguese_brazilian ] = "Daten" ;
+ Text [ swedish ] = "Data" ;
+ Text [ danish ] = "Data" ;
+ Text [ italian ] = "Dati" ;
+ Text [ spanish ] = "Datos" ;
+ Text [ french ] = "Données" ;
+ Text [ dutch ] = "Gegevens" ;
+ Text[ chinese_simplified ] = "Êý¾Ý";
+ Text[ russian ] = "Äàííûå";
+ Text[ polish ] = "Dane";
+ Text[ japanese ] = "ÃÞ°À";
+ Text[ chinese_traditional ] = "¸ê®Æ";
+ Text[ greek ] = "ÄåäïìÝíá";
+ Text[ korean ] = "µ¥ÀÌÅÍ";
+ Text[ arabic ] = "ÈíÇäÇÊ";
+ Text[ turkish ] = "Veriler";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPPAGE_UNOCTL_TITLE
+{
+ Text = "Kontrollelement" ;
+ Text [ English ] = "Control" ;
+ Text [ portuguese ] = "Controlo" ;
+ Text [ english_us ] = "Control" ;
+ Text [ portuguese_brazilian ] = "Control" ;
+ Text [ swedish ] = "Kontrollelement" ;
+ Text [ danish ] = "Kontrolelement" ;
+ Text [ italian ] = "Elemento di controllo" ;
+ Text [ spanish ] = "Elemento de control" ;
+ Text [ french ] = "Élément de contrôle" ;
+ Text [ dutch ] = "Controle-element" ;
+ Text[ chinese_simplified ] = "¿ØÖÆ";
+ Text[ russian ] = "Ýëåìåíò óïðàâëåíèÿ";
+ Text[ polish ] = "Formant";
+ Text[ japanese ] = "ºÝÄÛ°Ù—v‘f";
+ Text[ chinese_traditional ] = "±±¨î¶µ";
+ Text[ greek ] = "Óôïé÷åßï åëÝã÷ïõ";
+ Text[ korean ] = "ÄÁÆ®·Ñ";
+ Text[ arabic ] = "ÚäÕÑ ÊÍßã";
+ Text[ turkish ] = "Komut öðesi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TABWIN_PREFIX
+{
+ Text = "Tabelle;Abfrage;Sql;Sql [Native]" ;
+ Text [ English ] = "Table;Query;Sql;Sql [Native]" ;
+ Text [ portuguese ] = "Tabela;Consulta;Sql;Sql (Native)" ;
+ Text [ english_us ] = "Table;Query;Sql;Sql [Native]" ;
+ Text [ portuguese_brazilian ] = "Tabelle;Abfrage;Sql;Sql [Native]" ;
+ Text [ swedish ] = "Tabell;Sökning;Sql;Sql [Native]" ;
+ Text [ danish ] = "Tabel;Forespørgsel;Sql;Sql [native]" ;
+ Text [ italian ] = "Tabella;Ricerca;Sql;Sql [native]" ;
+ Text [ spanish ] = "Tabla;Consulta;Sql;Sql [Native]" ;
+ Text [ french ] = "Table;Requête;Sql;Sql [Natif]" ;
+ Text [ dutch ] = "Tabel;Query;Sql;Sql [Native]" ;
+ Text[ chinese_simplified ] = "±í¸ñ;²éѯ;Sql;Sql [Native]";
+ Text[ russian ] = "Òàáëèöà;Çàïðîñ;Sql;Sql [Native]";
+ Text[ polish ] = "Tabela;Kwerenda;Sql; [Native]";
+ Text[ japanese ] = "ðÌÞÙ;¸´Ø°;Sql;Sql [Native]";
+ Text[ chinese_traditional ] = "ªí®æ;¬d¸ß;¿ï¾Ü;Sql";
+ Text[ greek ] = "Ðßíáêáò;Åñþôçìá;Sql;Sql [Native]";
+ Text[ korean ] = "Å×À̺í;ÁúÀÇ;Sql;Sql [Native]";
+ Text[ arabic ] = "ÌÏæá;ÇÓÊÝÓÇÑ;Sql;Sql [Native]";
+ Text[ turkish ] = "Tablo;Sorgu;Sql;Sql [Native]";
+};
+String RID_STR_FORMSHELL
+{
+ Text = "Formular" ;
+ Text [ ENGLISH ] = "Form" ;
+ Text [ english_us ] = "Form" ;
+ Text [ portuguese ] = "Formulário" ;
+ Text [ portuguese_brazilian ] = "Formular" ;
+ Text [ swedish ] = "Formulär" ;
+ Text [ danish ] = "Formular" ;
+ Text [ italian ] = "Formulario" ;
+ Text [ spanish ] = "Formulario" ;
+ Text [ french ] = "Formulaire" ;
+ Text [ dutch ] = "Formulier" ;
+ Text[ chinese_simplified ] = "±íµ¥";
+ Text[ russian ] = "Ôîðìóëÿð";
+ Text[ polish ] = "Formularz";
+ Text[ japanese ] = "Ì«°Ñ";
+ Text[ chinese_traditional ] = "ªí³æ";
+ Text[ greek ] = "Öüñìá";
+ Text[ korean ] = "¾ç½Ä";
+ Text[ arabic ] = "ÇÓÊãÇÑÉ";
+ Text[ turkish ] = "Form";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_STDFORMNAME
+{
+ Text = "Standard" ;
+};
+String RID_STR_STANDARD
+{
+ Text = "Standard" ;
+ Text [ ENGLISH ] = "Standard" ;
+ Text [ portuguese ] = "Padrão" ;
+ Text [ english_us ] = "Standard" ;
+ Text [ portuguese_brazilian ] = "Standard" ;
+ Text [ swedish ] = "Standard" ;
+ Text [ danish ] = "Standard" ;
+ Text [ italian ] = "Standard" ;
+ Text [ spanish ] = "Predeterminado" ;
+ Text [ french ] = "Standard" ;
+ Text [ dutch ] = "Standaard" ;
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ polish ] = "Standard";
+ Text[ japanese ] = "•W€";
+ Text[ chinese_traditional ] = "¼Ð·Ç";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "Ç¥ÁØ";
+ Text[ arabic ] = "ÞíÇÓí";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_URLBUTTON_CLASSNAME
+{
+ Text = "URLButton" ;
+};
+String RID_STR_CONTROL_CLASSNAME
+{
+ Text = "Control" ;
+};
+String RID_STR_CHECKBOX_CLASSNAME
+{
+ Text = "CheckBox" ;
+};
+String RID_STR_RADIOBUTTON_CLASSNAME
+{
+ Text = "OptionButton" ;
+};
+String RID_STR_BUTTON_CLASSNAME
+{
+ Text = "CommandButton" ;
+};
+String RID_STR_FIXEDTEXT_CLASSNAME
+{
+ Text = "Label" ;
+};
+String RID_STR_IMAGE_CLASSNAME
+{
+ Text = "ImageButton" ;
+};
+String RID_STR_GRID_CLASSNAME
+{
+ Text = "Grid" ;
+};
+String RID_STR_GROUPBOX_CLASSNAME
+{
+ Text = "FrameControl" ;
+};
+String RID_STR_LISTBOX_CLASSNAME
+{
+ Text = "ListBox" ;
+};
+String RID_STR_COMBOBOX_CLASSNAME
+{
+ Text = "ComboBox" ;
+};
+String RID_STR_EDIT_CLASSNAME
+{
+ Text = "TextField" ;
+};
+String RID_STR_FILECONTROL_CLASSNAME
+{
+ Text = "FileControl" ;
+};
+String RID_STR_DATEFIELD_CLASSNAME
+{
+ Text = "DateField" ;
+};
+String RID_STR_TIMEFIELD_CLASSNAME
+{
+ Text = "TimeField" ;
+};
+String RID_STR_NUMERICFIELD_CLASSNAME
+{
+ Text = "NumericField" ;
+};
+String RID_STR_CURRENCYFIELD_CLASSNAME
+{
+ Text = "CurrencyField" ;
+};
+String RID_STR_PATTERNFIELD_CLASSNAME
+{
+ Text = "PatternField" ;
+};
+String RID_STR_IMAGECONTROL_CLASSNAME
+{
+ Text = "ImageControl" ;
+};
+String RID_STR_HIDDEN_CLASSNAME
+{
+ Text = "Hidden" ;
+};
+String RID_STR_CONTROL
+{
+ Text = "Kontrollelement" ;
+ Text [ English ] = "Control" ;
+ Text [ portuguese ] = "Controlo" ;
+ Text [ english_us ] = "Control" ;
+ Text [ portuguese_brazilian ] = "Control" ;
+ Text [ swedish ] = "Kontrollelement" ;
+ Text [ danish ] = "Kontrolelement" ;
+ Text [ italian ] = "Elemento di controllo" ;
+ Text [ spanish ] = "Elemento de control" ;
+ Text [ french ] = "Élément de contrôle" ;
+ Text [ dutch ] = "Controle-element" ;
+ Text[ chinese_simplified ] = "¿ØÖÆ";
+ Text[ russian ] = "Ýëåìåíò óïðàâëåíèÿ";
+ Text[ polish ] = "Formant";
+ Text[ japanese ] = "ºÝÄÛ°Ù—v‘f";
+ Text[ chinese_traditional ] = "±±¨î¶µ";
+ Text[ greek ] = "Óôïé÷åßï åëÝã÷ïõ";
+ Text[ korean ] = "ÄÁÆ®·Ñ";
+ Text[ arabic ] = "ÚäÕÑ ÊÍßã";
+ Text[ turkish ] = "Komut alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_REC_TEXT
+{
+ Text = "Datensatz" ;
+ Text [ English ] = "Record" ;
+ Text [ portuguese ] = "Registo" ;
+ Text [ english_us ] = "Record" ;
+ Text [ portuguese_brazilian ] = "Datensatz" ;
+ Text [ swedish ] = "Datapost" ;
+ Text [ danish ] = "Datapost" ;
+ Text [ italian ] = "Record di dati" ;
+ Text [ spanish ] = "Registro" ;
+ Text [ french ] = "Enregistrement" ;
+ Text [ dutch ] = "Gegevensreeks" ;
+ Text[ chinese_simplified ] = "Êý¾ÝÌõÄ¿";
+ Text[ russian ] = "Çàïèñü";
+ Text[ polish ] = "Rekord";
+ Text[ japanese ] = "Úº°ÄÞ";
+ Text[ chinese_traditional ] = "¸ê®Æ¶µ¥Ø";
+ Text[ greek ] = "ÅããñáöÞ";
+ Text[ korean ] = "·¹ÄÚµå";
+ Text[ arabic ] = "ÓÌá";
+ Text[ turkish ] = "Veri kümesi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_REC_FROM_TEXT
+{
+ Text = "von" ;
+ Text [ English ] = "of" ;
+ Text [ portuguese ] = "de" ;
+ Text [ english_us ] = "of" ;
+ Text [ portuguese_brazilian ] = "von" ;
+ Text [ swedish ] = "från" ;
+ Text [ danish ] = "af" ;
+ Text [ italian ] = "da" ;
+ Text [ spanish ] = "de" ;
+ Text [ french ] = "de" ;
+ Text [ dutch ] = "van" ;
+ Text[ chinese_simplified ] = "×ܼÆ";
+ Text[ russian ] = "von";
+ Text[ polish ] = "z";
+ Text[ japanese ] = "Œó•â";
+ Text[ chinese_traditional ] = "Á`­p";
+ Text[ greek ] = "áðü";
+ Text[ korean ] = "ÀÇ";
+ Text[ arabic ] = "ãä";
+ Text[ turkish ] = "Ýlk";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FORM_FILTERED
+{
+ Text = "(gefiltert)" ;
+ Text [ English ] = "(filtered)" ;
+ Text [ english_us ] = "(filtered)" ;
+ Text[ italian ] = "(filtrato)";
+ Text[ portuguese_brazilian ] = "(filtered)";
+ Text[ portuguese ] = "(filtrado)";
+ Text[ danish ] = "(filtreret)";
+ Text[ french ] = "(filtré)";
+ Text[ swedish ] = "(filtrerad)";
+ Text[ dutch ] = "(gefilterd)";
+ Text[ spanish ] = "(filtrado)";
+ Text[ chinese_simplified ] = "(ÒѾ­É¸Ñ¡¹ý)";
+ Text[ russian ] = "(îòôèëüòðîâàíî)";
+ Text[ polish ] = "(przefiltrowany)";
+ Text[ japanese ] = "(̨ÙÀÏ‚Ý)";
+ Text[ chinese_traditional ] = "(¤w¸g¿z¿ï¹L)";
+ Text[ greek ] = "(öéëôñáñéóìÝíá)";
+ Text[ korean ] = "(ÇÊÅ͸µµÊ)";
+ Text[ arabic ] = "(Êã ÊÕÝíÊå)";
+ Text[ turkish ] = "(filtrelenmiþ)";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FIELDSELECTION
+{
+ Text = "Feldauswahl:" ;
+ Text [ English ] = "Fieldselection:" ;
+ Text [ portuguese ] = "Selecção de campos:" ;
+ Text [ english_us ] = "Field selection:" ;
+ Text [ portuguese_brazilian ] = "Feldauswahl:" ;
+ Text [ swedish ] = "Fälturval:" ;
+ Text [ danish ] = "Feltudvalg:" ;
+ Text [ italian ] = "Scelta campo:" ;
+ Text [ spanish ] = "Selección de campo:" ;
+ Text [ french ] = "Sélection de champ :" ;
+ Text [ dutch ] = "Veld selecteren:" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ×ֶΣº";
+ Text[ russian ] = "Âûáîð ïîëÿ:";
+ Text[ polish ] = "Wybór pola:";
+ Text[ japanese ] = "̨°ÙÄÞ‚Ì‘I‘ð:";
+ Text[ chinese_traditional ] = "¿ï¾ÜÄæ¦ì¡G";
+ Text[ greek ] = "ÅðéëïãÞ ðåäßïõ:";
+ Text[ korean ] = "ÇÊµå ¼±ÅÃ:";
+ Text[ arabic ] = "ÇÎÊíÇÑ ÇáÍÞá:";
+ Text[ turkish ] = "Alan seçimi:";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FIELDNULL
+{
+ Text = "<leer>" ;
+ Text [ English ] = "<empty>" ;
+ Text [ portuguese ] = "<vazio>" ;
+ Text [ english_us ] = "<blank>" ;
+ Text [ portuguese_brazilian ] = "<leer>" ;
+ Text [ swedish ] = "<tom>" ;
+ Text [ danish ] = "<tom>" ;
+ Text [ italian ] = "<vuoto>" ;
+ Text [ spanish ] = "<vacío>" ;
+ Text [ french ] = "<vide>" ;
+ Text [ dutch ] = "<leeg>" ;
+ Text[ chinese_simplified ] = "<¿Õ>";
+ Text[ russian ] = "<ïóñòî>";
+ Text[ polish ] = "<pusty>";
+ Text[ japanese ] = "<‹ó”’>";
+ Text[ chinese_traditional ] = "<ªÅ>";
+ Text[ greek ] = "<êÝíï>";
+ Text[ korean ] = "<ºñ¾î ÀÖÀ½>";
+ Text[ arabic ] = "<ÝÇÑÛ>";
+ Text[ turkish ] = "<Boþ>";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_READERROR
+{
+ Text = "Fehler beim Lesen von Daten aus der Datenbank" ;
+ Text [ ENGLISH ] = "Error while reading data from database" ;
+ Text [ norwegian ] = "Feil ved lesing av data fra database" ;
+ Text [ italian ] = "Errore durante la lettura di dati dal database" ;
+ Text [ portuguese_brazilian ] = "Erro ao ler dados da base de dados" ;
+ Text [ portuguese ] = "Erro ao ler dados da base de dados" ;
+ Text [ finnish ] = "Virhe luettaessa tietoja tietokannasta" ;
+ Text [ danish ] = "Fejl under læsning af data fra databasen" ;
+ Text [ french ] = "Erreur lors de la lecture des données de la base de données" ;
+ Text [ swedish ] = "Fel vid läsning av data från databasen" ;
+ Text [ dutch ] = "Fout bij lezen van gegevens in database" ;
+ Text [ spanish ] = "Error al leer los datos de la base de datos" ;
+ Text [ english_us ] = "Error reading data from database" ;
+ Text[ chinese_simplified ] = "ÔÚ¶ÁÈ¡Êý¾Ý¿âÊý¾Ýʱ·¢Éú´íÎó";
+ Text[ russian ] = "Îøèáêà ïðè ÷òåíèè äàííûõ èç áàçû äàííûõ";
+ Text[ polish ] = "B³¹d podczas odczytu danych z bazy danych";
+ Text[ japanese ] = "ÃÞ°ÀÍÞ°½‚©‚ç‚ÌÃÞ°À“Ç‚ÝŽæ‚è‚ÌÛ‚Ì´×°";
+ Text[ chinese_traditional ] = "Ū¨ú¸ê®Æ®w®Éµo¥Í¿ù»~";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí áíÜãíùóç äåäïìÝíùí áðü ôç âÜóç äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅͺ£À̽º¿¡¼­ µ¥ÀÌÅ͸¦ ÀÐÀ» ¶§ ¿À·ù ¹ß»ý";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÞÑÇÁÉ ÈíÇäÇÊ ãä ÞÇÚÏÉ ÇáÈíÇäÇÊ";
+ Text[ turkish ] = "Veritabanýndan veri okuma sýrasýnda hata";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_WRITEERROR
+{
+ Text = "Fehler beim Schreiben von Daten in die Datenbank" ;
+ Text [ ENGLISH ] = "Error while writing data to database" ;
+ Text [ dutch ] = "Fout bij het opslaan van gegevens in de database" ;
+ Text [ english_us ] = "Error writing data to database" ;
+ Text [ italian ] = "Errore nella scrittura dei dati nel database" ;
+ Text [ spanish ] = "Error al registrar datos en la base de datos" ;
+ Text [ french ] = "Erreur lors de l'enregistrement des données dans la base de données" ;
+ Text [ swedish ] = "Fel vid skrivandet av data i databasen" ;
+ Text [ danish ] = "Fejl ved skrivning af data til databasen" ;
+ Text [ portuguese ] = "Erro ao gravar dados na base de dados" ;
+ Text [ portuguese_brazilian ] = "Fehler beim Schreiben von Daten in die Datenbank" ;
+ Text[ chinese_simplified ] = "ÔÚдÈëÊý¾Ý¿âʱ·¢Éú´íÎó";
+ Text[ russian ] = "Îøèáêà ïðè çàïèñè äàííûõ â áàçó äàííûõ";
+ Text[ polish ] = "B³¹d przy zapisie danych do bazy danych";
+ Text[ japanese ] = "ÃÞ°ÀÍÞ°½‚ÉÃÞ°À‚ð‘‚«ž‚ÞÛ‚Ì´×°";
+ Text[ chinese_traditional ] = "¼g¤J¸ê®Æ®w®Éµo¥Í¿ù»~";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôç äéáäéêáóßá åããñáöÞò äåäïìÝíùí óôç âÜóç äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅͺ£À̽º¿¡ µ¥ÀÌÅ͸¦ ¾µ ¶§ ¿À·ù";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ßÊÇÈÉ ÈíÇäÇÊ Ýí ÞÇÚÏÉ ÇáÈíÇäÇÊ";
+ Text[ turkish ] = "Veritabanýna veri yazma sýrasýnda hata";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DELETEERROR
+{
+ Text = "Fehler beim Löschen von Daten. " ;
+ Text [ ENGLISH ] = "Error while deleting data" ;
+ Text [ english_us ] = "Error deleting data. " ;
+ Text [ portuguese_brazilian ] = "Fehler beim Loeschen von Daten. " ;
+ Text [ swedish ] = "Fel vid radering av data. " ;
+ Text [ danish ] = "Fejl ved sletning af data. " ;
+ Text [ italian ] = "Errore nel cancellare dati. " ;
+ Text [ spanish ] = "Error al eliminar datos. " ;
+ Text [ french ] = "Erreur lors de la suppression de données. " ;
+ Text [ dutch ] = "Fout bij wissen van gegevens. " ;
+ Text [ portuguese ] = "Erro ao eliminar dados. " ;
+ Text[ chinese_simplified ] = "ÔÚɾ³ýÊý¾Ýʱ·¢Éú´íÎó ";
+ Text[ russian ] = "Îøèáêà ïðè óäàëåíèè äàííûõ. ";
+ Text[ polish ] = "B³¹d przy usuwaniu danych. ";
+ Text[ japanese ] = "ÃÞ°À‚Ì휂ÌÛ‚Ì´×°¡ ";
+ Text[ chinese_traditional ] = "¦b§R°£¸ê®Æ®Éµo¥Í¤@­Ó¿ù»~ ";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôç äéáãñáöÞ äåäïìÝíùí. ";
+ Text[ korean ] = "µ¥ÀÌÅÍ »èÁ¦½Ã ¿À·ù. ";
+ Text[ arabic ] = "ÎØà ÃËäÇÁ ÍÐÝ ÈíÇäÇÊ. ";
+ Text[ turkish ] = "Veri silme sýrasýnda hata. ";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ERR_CONNECTLOST
+{
+ Text = "Die Verbindung zur Datenbank ist unterbrochen." ;
+ Text [ ENGLISH ] = "Connection to database lost." ;
+ Text [ english_us ] = "Connection to database lost." ;
+ Text [ portuguese ] = "Cancelada a ligação à base de dados." ;
+ Text [ portuguese_brazilian ] = "Die Verbindung zur Datenbank ist unterbrochen." ;
+ Text [ swedish ] = "Förbindelsen till databasen är avbruten." ;
+ Text [ danish ] = "Forbindelsen til databasen er afbrudt." ;
+ Text [ italian ] = "Il collegamento al database è interrotto." ;
+ Text [ spanish ] = "Interrumpida la conexión con la base de datos." ;
+ Text [ french ] = "La connexion à la base de données a été interrompue." ;
+ Text [ dutch ] = "De verbinding met de database is verbroken." ;
+ Text[ chinese_simplified ] = "ºÍÊý¾Ý¿âµÄÁ¬½ÓÒѾ­Öжϡ£";
+ Text[ russian ] = "Ñâÿçü ñ áàçîé äàííûõ ïðåðâàíà.";
+ Text[ polish ] = "Przerwano po³¹czenie z baz¹ danych.";
+ Text[ japanese ] = "ÃÞ°ÀÍÞ°½‚Ö‚ÌÚ‘±‚Í’†’f‚³‚ê‚Ü‚µ‚½B";
+ Text[ chinese_traditional ] = "¸ê®Æ®w³s½u¤w¸g¤¤Â_¡C";
+ Text[ greek ] = "ÄéáêïðÞ ôçò óýíäåóçò ìå ôç âÜóç äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅͺ£À̽º¿¡ ¿¬°áÀÌ ²÷°å½À´Ï´Ù.";
+ Text[ arabic ] = "Êã ÞØÚ ÇáÇÊÕÇá ÈÞÇÚÏÉ ÇáÈíÇäÇÊ.";
+ Text[ turkish ] = "Veri tabaný baðlantýsý kesildi.";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_CONNECTERROR
+{
+ Text = "Verbindungsaufbau gescheitert" ;
+ Text [ ENGLISH ] = "Can't create connection" ;
+ Text [ norwegian ] = "Kan ikke opprette forbindelse" ;
+ Text [ italian ] = "Impossibile creare la connessione" ;
+ Text [ portuguese_brazilian ] = "NÆo consigo criar a conexÆo" ;
+ Text [ portuguese ] = "Não foi possível estabelecer a ligação." ;
+ Text [ finnish ] = "Yhteyttä ei voi muodostaa" ;
+ Text [ danish ] = "Det var ikke muligt at oprette forbindelsen" ;
+ Text [ french ] = "Création de la connexion impossible" ;
+ Text [ swedish ] = "Uppkoppling avbruten" ;
+ Text [ dutch ] = "Kan geen verbinding tot stand brengen" ;
+ Text [ spanish ] = "La conexión ha fallado." ;
+ Text [ english_us ] = "Connection failed" ;
+ Text[ chinese_simplified ] = "Á¬½Óʧ°Ü";
+ Text[ russian ] = "Ïîäêëþ÷åíèå ïîâðåæäåíî";
+ Text[ polish ] = "Po³¹czenie nie dosz³o do skutku";
+ Text[ japanese ] = "Ú‘±‚ªŽ¸”s‚ÉI‚í‚è‚Ü‚µ‚½";
+ Text[ chinese_traditional ] = "³s½u¥¢±Ñ";
+ Text[ greek ] = "Ç óýíäåóç áðÝôõ÷å";
+ Text[ korean ] = "¿¬°á¿¡ ½ÇÆÐÇßÀ½";
+ Text[ arabic ] = "ÚãáíÉ ÇáÇÊÕÇá ÝÔáÊ";
+ Text[ turkish ] = "Baðlantý kurulamadý";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_SYNTAXERROR
+{
+ Text = "Fehler bei der Analyse des Anfrageausdrucks" ;
+ Text [ ENGLISH ] = "Error in syntax of query expression" ;
+ Text [ portuguese ] = "Erro ao analisar a expressão de consulta." ;
+ Text [ english_us ] = "Syntax error in query expression" ;
+ Text [ portuguese_brazilian ] = "Fehler bei der Analyse des Anfrageausdrucks" ;
+ Text [ swedish ] = "Fel vid analys av frågeuttryck" ;
+ Text [ danish ] = "Fejl under analysen af forespørgseludtrykket" ;
+ Text [ italian ] = "Errore nell'analizzare dell'espressione di ricerca" ;
+ Text [ spanish ] = "Ha ocurrido un error al analizar la expresión de la consulta" ;
+ Text [ french ] = "Erreur dans l'analyse de l'expression de la requête" ;
+ Text [ dutch ] = "Fout bij de analyse van queryafdruk" ;
+ Text[ chinese_simplified ] = "²éѯÓï¾ä³öÏÖÓï·¨´íÎó¡£";
+ Text[ russian ] = "Îøèáêà ïðè àíàëèçå âûðàæåíèÿ çàïðîñà";
+ Text[ polish ] = "B³¹d przy ocenie wydruku kwerendy";
+ Text[ japanese ] = "¸´Ø°Œ¾Œê‚Ì•ªÍ’†‚Å‚Ì´×°";
+ Text[ chinese_traditional ] = "¦b¤À¸Ñ¬d¸ß»y¥y®Éµo¥Í¤@­Ó¿ù»~¡C";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÊÍáíá ÚÈÇÑÉ ÇáÇÓÊÝÓÇÑ";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí áíÜëõóç ôïõ ïñßóìáôïò ôïõ åñùôÞìáôïò";
+ Text[ korean ] = "ÁúÀÇ ½ÄÀ» ºÐ¼®ÇÒ ¶§ ¿À·ù";
+ Text[ turkish ] = "Sorgu ifadesinde sözdizim hatasý";
+};
+
+String RID_STR_INSERTING_ALLOWED_ERROR
+{
+ Text = "Das Einfügen von Datensätzen ist nicht erlaubt!" ;
+ Text [ ENGLISH ] = "Inserting records isn't allowed!" ;
+ Text [ english_us ] = "Inserting records isn't allowed!" ;
+ Text[ portuguese ] = "Não é permitido inserir registos de dados!";
+ Text[ russian ] = "Âñòàâëÿòü çàïèñè äàííûõ íå ðàçðåøåíî!";
+ Text[ greek ] = "Äåí åðéôñÝðåôáé ç ðñïóèÞêç åããñáöþí äåäïìÝíùí!";
+ Text[ dutch ] = "Het invoegen van records is niet toegestaan!";
+ Text[ french ] = "L'insertion d'enregistrements n'est pas permise !";
+ Text[ spanish ] = "¡No se permite insertar registros de datos!";
+ Text[ italian ] = "Non è consentito inserire record di dati!";
+ Text[ danish ] = "Det er ikke tilladt at indsætte dataposter!";
+ Text[ swedish ] = "Det är inte tillåtet att infoga dataposter!";
+ Text[ polish ] = "Wstawianie rekordów jest niedozwolone!";
+ Text[ portuguese_brazilian ] = "Inserting records isn't allowed!";
+ Text[ japanese ] = "Úº°ÄÞ‚Ì‘}“ü‚Í‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ!";
+ Text[ korean ] = "·¹ÄÚµå »ðÀÔÀÌ Çã¿ëµÇÁö ¾Ê½À´Ï´Ù!";
+ Text[ chinese_simplified ] = "²»ÔÊÐí²åÈëÊý¾ÝÌõÄ¿£¡";
+ Text[ chinese_traditional ] = "¤£¤¹³\\´¡¤J¼ÆÕu±ø¥Ø¡I";
+ Text[ arabic ] = "áÇ íõÓãÍ ÈÅÏÎÇá ÇáÓÌáÇÊ!";
+ Text[ turkish ] = "Veri kümeleri eklenemez!";
+};
+
+String RID_STR_UPDATING_ALLOWED_ERROR
+{
+ Text = "Das Verändern von Datensätzen ist nicht erlaubt!" ;
+ Text [ ENGLISH ] = "Updating records isn't allowed!" ;
+ Text [ english_us ] = "Altering records isn't allowed!" ;
+ Text[ portuguese ] = "Não é permitido modificar registos de dados!";
+ Text[ russian ] = "Èçìåíÿòü çàïèñè äàííûõ íå ðàçðåøåíî!";
+ Text[ greek ] = "Ç áëëáãÞ åããñáöþí äåäïìÝíùí äåí åðéôñÝðåôáé!";
+ Text[ dutch ] = "Het wijzigen van records is niet toegestaan!";
+ Text[ french ] = "La modification d'enregistrements n'est pas permise !";
+ Text[ spanish ] = "¡No se permite modificar registros de datos!";
+ Text[ italian ] = "Non è consentito modificare i record di dati!";
+ Text[ danish ] = "Det er ikke tilladt at ændre dataposter!";
+ Text[ swedish ] = "Det är inte tillåtet att ändra dataposter!";
+ Text[ polish ] = "Zmienianie rekordów jest niedozwolone!";
+ Text[ portuguese_brazilian ] = "Updating records isn't allowed!";
+ Text[ japanese ] = "Úº°ÄÞ‚Ì•ÏX‚Í‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ!";
+ Text[ korean ] = "·¹ÄÚµå º¯°æÀÌ Çã¿ëµÇÁö ¾Ê½À´Ï´Ù!";
+ Text[ chinese_simplified ] = "²»ÔÊÐí¸ü¸ÄÊý¾ÝÌõÄ¿£¡";
+ Text[ chinese_traditional ] = "¤£¤¹³\\Åܧó¼ÆÕu±ø¥Ø¡I";
+ Text[ arabic ] = "áÇ íõÓãÍ ÈÊÚÏíá ÇáÓÌáÇÊ!";
+ Text[ turkish ] = "Veri kümeleri deðiþtirilemez!";
+};
+
+String RID_STR_DELETING_ALLOWED_ERROR
+{
+ Text = "Das Löschen von Datensätzen ist nicht erlaubt!" ;
+ Text [ ENGLISH ] = "Deleting records isn't allowed!" ;
+ Text [ english_us ] = "Deleting records isn't allowed!" ;
+ Text[ portuguese ] = "Não é permitido eliminar registos de dados!";
+ Text[ russian ] = "Óäàëÿòü çàïèñè äàííûõ íå ðàçðåøåíî!";
+ Text[ greek ] = "Äåí åðéôñÝðåôáé ç äéáãñáöÞ åããñáöþí äåäïìÝíùí!";
+ Text[ dutch ] = "Het wissen van records is niet toegestaan!";
+ Text[ french ] = "La suppression d'enregistrements n'est pas permise !";
+ Text[ spanish ] = "¡No se permite eliminar registros de datos!";
+ Text[ italian ] = "Non è consentito eliminare record di dati!";
+ Text[ danish ] = "Det er ikke tilladt at slette dataposter!";
+ Text[ swedish ] = "Det är inte tillåtet att radera dataposter!";
+ Text[ polish ] = "Usuwanie rekordów jest niedozwolone!";
+ Text[ portuguese_brazilian ] = "Deleting records isn't allowed!";
+ Text[ japanese ] = "Úº°ÄÞ‚Ì휂͋–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ!";
+ Text[ korean ] = "·¹ÄÚµå »èÁ¦°¡ Çã¿ëµÇÁö ¾Ê½À´Ï´Ù!";
+ Text[ chinese_simplified ] = "²»ÔÊÐíɾ³ýÊý¾ÝÌõÄ¿£¡";
+ Text[ chinese_traditional ] = "¤£¤¹³\\§R°£¼ÆÕu±ø¥Ø¡I";
+ Text[ arabic ] = "áÇ íõÓãÍ ÈÍÐÝ ÇáÓÌáÇÊ!";
+ Text[ turkish ] = "Veri kümeleri silinemez!";
+};
+
+String RID_STR_DELETECONFIRM_RECORD
+{
+ Text = "Sie beabsichtigen # Datensatz zu löschen." ;
+ Text [ ENGLISH ] = "You are going to delete # record." ;
+ Text [ english_us ] = "You will be deleting record #." ;
+ Text [ portuguese ] = "Eliminará # registo." ;
+ Text [ portuguese_brazilian ] = "Sie beabsichtigen # Datensatz zu löschen." ;
+ Text [ swedish ] = "Du tänker radera # dataposter." ;
+ Text [ danish ] = "Du er i gang med at slette # datapost." ;
+ Text [ italian ] = "Intendete eliminare il record # di dati." ;
+ Text [ spanish ] = "Usted pretende eliminar # registros de datos." ;
+ Text [ french ] = "Vous avez l'intention de supprimer l'enregistrement #." ;
+ Text [ dutch ] = "U wilt # record wissen." ;
+ Text[ chinese_simplified ] = "ÄúҪɾ³ýÊý¾ÝÌõÄ¿ # ¡£";
+ Text[ russian ] = "Âû íàìåðåíû óäàëèòü # çàïèñü.";
+ Text[ polish ] = "Zamierzasz # usun¹æ rekord.";
+ Text[ japanese ] = "# Úº°ÄÞ‚ð휂µ‚Ü‚·B";
+ Text[ chinese_traditional ] = "±z­n§R°£#¼ÆÕu¶µ¥Ø¡C";
+ Text[ greek ] = "Ç åããñáöÞ # ðñüêåéôáé íá äéáãñáöåß.";
+ Text[ korean ] = "·¹ÄÚµå#°¡ »èÁ¦µÉ °ÍÀÔ´Ï´Ù.";
+ Text[ arabic ] = "ÃäÊ Êäæí ÍÐÝ ÇáÓÌá #.";
+ Text[ turkish ] = "# kaydý silmek istiyorsunuz.";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DELETECONFIRM_RECORDS
+{
+ Text = "Sie beabsichtigen # Datensätze zu löschen." ;
+ Text [ ENGLISH ] = "You are going to delete # records." ;
+ Text [ english_us ] = "# records will be deleted." ;
+ Text [ portuguese ] = "Eliminará # registos." ;
+ Text [ portuguese_brazilian ] = "Sie beabsichtigen # Datensätze zu löschen." ;
+ Text [ swedish ] = "Du tänker radera # dataposter." ;
+ Text [ danish ] = "Du er i gang med at slette # dataposter." ;
+ Text [ italian ] = "Intendete eliminare i record # di dati." ;
+ Text [ spanish ] = "Usted pretende eliminar # registros de datos." ;
+ Text [ french ] = "Vous avez l'intention de supprimer # enregistrements." ;
+ Text [ dutch ] = "U wilt # records wissen." ;
+ Text[ chinese_simplified ] = "ÄúҪɾ³ýÊý¾ÝÌõÄ¿ # ¡£";
+ Text[ russian ] = "Âû íàìåðåíû óäàëèòü # çàïèñè.";
+ Text[ polish ] = "Zamierzasz # usun¹æ rekordy.";
+ Text[ japanese ] = "# Úº°ÄÞ‚ð휂µ‚Ü‚·B";
+ Text[ chinese_traditional ] = "±z­n§R°£¸ê®Æ¶µ¥Ø # ¡C";
+ Text[ greek ] = "Åðé÷åéñåßôå íá äéáãñÜøåôå # åããñáöÝò.";
+ Text[ korean ] = "·¹ÄÚµå#°¡ »èÁ¦µÉ °ÍÀÔ´Ï´Ù.";
+ Text[ arabic ] = "ÃäÊ Êäæí ÍÐÝ # ÓÌáÇÊ ÈíÇäÇÊ.";
+ Text[ turkish ] = "# kaydý silmek istiyorsunuz.";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DELETECONFIRM
+{
+ Text = "Wenn Ja ausgewählt wird, kann die Operation nicht mehr rückgängig gemacht werden!\nWollen Sie trotzdem fortfahren?" ;
+ Text [ ENGLISH ] = "If you click Yes, you won't be able to undo this operation!\n Continue deleting?" ;
+ Text [ english_us ] = "If you click Yes, you won't be able to undo this operation!\nDo you want to continue anyway?" ;
+ Text [ portuguese ] = "Se fizer clique em Sim, não lhe será possível anular esta operação! Continuar?" ;
+ Text [ portuguese_brazilian ] = "Wenn Ja ausgewählt wird, kann die Operation nicht mehr rückgängig gemacht werden!\nWollen Sie trotzdem fortfahren?" ;
+ Text [ swedish ] = "Om Du väljer Ja, kan Du inte ångra operationen mer!\nVill Du trots det fortsätta?" ;
+ Text [ danish ] = "Hvis du vælger Ja, er det ikke længere muligt at fortyde denne operation!\nVil du fortsætte alligevel?" ;
+ Text [ italian ] = "Se si sceglie Sì, non sarà più possibile annullare l'operazione!\nContinuare lo stesso?" ;
+ Text [ spanish ] = "¡Si ha pulsado Sí, la operación no se podrá deshacer!\n¿Desea continuar de todas formas?" ;
+ Text [ french ] = "Si vous choisissez Oui, l'opération ne peut plus être annulée !\nSouhaitez-vous tout de même poursuivre ?" ;
+ Text [ dutch ] = "Als Ja wordt geselecteerd kan de handeling niet meer ongedaan worden gemaakt!\nWilt u toch doorgaan?" ;
+ Text[ chinese_simplified ] = "Èç¹ûÑ¡Ôñ\"ÊÇ\"£¬Õâ¸ö²Ù×÷¾Í²»Äܱ»³·»Ø£¡\nÄú»¹ÊÇÒª¼ÌÐøÂð£¿";
+ Text[ russian ] = "Åñëè Âû íàæìåòå êíîïêó Äà, îòìåíèòü îïåðàöèþ óæå íåâîçìîæíî áóäåò!\nÂû õîòèòå ïðîäîëæèòü íåñìîòðÿ íà ýòî?";
+ Text[ polish ] = "Jeœli klikniesz Tak, nie bêdziesz móg³ cofn¹æ tej operacji!\nCzy chcesz mimo to kontynuowaæ?";
+ Text[ japanese ] = "‚Í‚¢‚ð‘I‘ð‚·‚é‚ÆA‘€ì‚ðŒ³‚É–ß‚·‚±‚Æ‚ªo—ˆ‚Ü‚¹‚ñ!\n‚»‚ê‚Å‚à‘±s‚µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "­Y¿ï¾Ü¡§¬O¡¨¡A´N¤£¯à°÷ºM®ø³o­Ó§@·~¡I\n­nÄ~Äò¡H";
+ Text[ greek ] = "Áí åðéëÝîåôå \"Íáé\" äåí èá åßíáé äõíáôüí íá áêõñùèåß áõôÞ ç åíÝñãåéá!\nÈÝëåôå íá óõíå÷ßóåôå;";
+ Text[ korean ] = "'¿¹'¸¦ Ŭ¸¯Çϸé ÀÌ ÀÛ¾÷ÀÇ ½ÇÇàÀ» Ãë¼ÒÇÒ ¼ö ¾ø½À´Ï´Ù.\n±×·¡µµ °è¼ÓÇϽðڽÀ´Ï±î?";
+ Text[ arabic ] = "ÅÐÇ ÞãÊ ÈÇÎÊíÇÑ \"äÚã\"¡ Ýáä íãßäß ÇáÊÑÇÌÚ Úä ÇáÚãáíÉ ÈÚÏ Ðáß!\nåá ÊÑíÏ ÇáãÊÇÈÚÉ ÈÇáÑÛã ãä Ðáß¿";
+ Text[ turkish ] = "\"Evet\" seçildiðinde, iþlem artýk geri alýnamaz!\nYinde de devam etmek istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_WARNING
+{
+ Text = "Warnung!" ;
+ Text [ ENGLISH ] = "Warning!" ;
+ Text [ english_us ] = "Warning!" ;
+ Text [ portuguese ] = "Aviso!" ;
+ Text [ portuguese_brazilian ] = "Warnung!" ;
+ Text [ swedish ] = "Varning!" ;
+ Text [ danish ] = "Advarsel!" ;
+ Text [ italian ] = "Attenzione!" ;
+ Text [ spanish ] = "¡Advertencia!" ;
+ Text [ french ] = "Avertissement !" ;
+ Text [ dutch ] = "Waarschuwing!" ;
+ Text[ chinese_simplified ] = "¾¯¸æ£¡";
+ Text[ russian ] = "Ïðåäóïðåæäåíèå!";
+ Text[ polish ] = "Ostrze¿enie!";
+ Text[ japanese ] = "Œx!";
+ Text[ chinese_traditional ] = "ĵ§i¡I";
+ Text[ greek ] = "Ðñïåéäïðïßçóç!";
+ Text[ korean ] = "°æ°í!";
+ Text[ arabic ] = "ÊÍÐíÑ!";
+ Text[ turkish ] = "Uyarý!";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_NO_FORM_CONNECT
+{
+ Text = "Die Verknüpfung von Formular '#' zu Formular '#' konnte nicht hergestellt werden." ;
+ Text [ ENGLISH ] = "Couldn't establish connection between form '#' and form '#'" ;
+ Text [ english_us ] = "Couldn't establish connection between form '#' and form '#'" ;
+ Text[ italian ] = "Non è stato possibile ripristinare il collegamento dal formulario '#' al formulario '#'.";
+ Text[ portuguese_brazilian ] = "Die Verknüpfung von Formular '#' zu Formular '#' konnte nicht hergestellt werden.";
+ Text[ portuguese ] = "Foi impossível estabelecer a ligação do formulário '#' ao formulário '#'.";
+ Text[ danish ] = "Det var ikke muligt at oprette kæden fra formular # til formular #.";
+ Text[ french ] = "Le lien entre le formulaire '#' et le formulaire '#' n'a pas pu être établi.";
+ Text[ swedish ] = "Länkningen mellan formuläret '#' och formuläret '#' kunde inte skapas.";
+ Text[ dutch ] = "De koppeling van formulier '#' naar formulier '#' kon niet worden uitgevoerd.";
+ Text[ spanish ] = "No se pudo realizar el vínculo entre el formulario '#' y el formulario '#'.";
+ Text[ chinese_simplified ] = "ÎÞ·¨½¨Á¢´Ó±íµ¥ '#' Ö¸Ïò±íµ¥ '#' µÄÁ´½Ó¡£";
+ Text[ russian ] = "Âîññòàíîâèòü ñâÿçü ôîðìóëÿðà '#' ñ ôîðìóëÿðîì '#' íåâîçìîæíî.";
+ Text[ polish ] = "Po³¹czenie formularza '#' z formularzem '#' nie mog³o zostaæ ustanowione.";
+ Text[ japanese ] = "'#'Ì«°Ñ‚©‚ç'#'Ì«°Ñ‚Ö‚ÌØݸ‚ÍÚ‘±‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ chinese_traditional ] = "µLªk«Ø¥ß±qªí³æ'#' «ü¦Vªí³æ'#' ªº±¶®|¡C";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá äçìéïõñãçèåß ç óýíäåóç áðü ôç öüñìá '#' óôç öüñìá '#'.";
+ Text[ korean ] = "¾ç½Ä'#'°ú ¾ç½Ä'#'À» ¿¬°áÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Text[ arabic ] = "ÊÚÐÑ Úãá ÇÑÊÈÇØ ãä ÇáÇÓÊãÇÑÉ '#' Åáì ÇáÇÓÊãÇÑÉ '#'.";
+ Text[ turkish ] = "Form '#' ile form '#' arasýnda baðlantý oluþturulamaz";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_FIELD_NOT_FOUND
+{
+ Text = "Das Feld '#' konnte nicht gefunden werden." ;
+ Text [ ENGLISH ] = "Field '#' not found" ;
+ Text [ english_us ] = "Field '#' not found" ;
+ Text[ italian ] = "Non è stato possibile trovare il campo '#'.";
+ Text[ portuguese_brazilian ] = "Das Feld '#' konnte nicht gefunden werden.";
+ Text[ portuguese ] = "Foi impossível encontrar o campo '#'.";
+ Text[ danish ] = "Det var ikke muligt at finde feltet #.";
+ Text[ french ] = "Le champ '#' n'a pas été trouvé";
+ Text[ swedish ] = "Fältet '#' kunde inte hittas.";
+ Text[ dutch ] = "Veld '#' niet gevonden";
+ Text[ spanish ] = "El campo '#' no pudo ser encontrado.";
+ Text[ chinese_simplified ] = "ÎÞ·¨ÕÒµ½×ֶΠ'#' ¡£";
+ Text[ russian ] = "Íàéòè ïîëå '#' íå óäàåòñÿ.";
+ Text[ polish ] = "Pole '#' nie zosta³o znalezione.";
+ Text[ japanese ] = "̨°ÙÄÞ'#'‚ÍŒ©‚‚©‚è‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ chinese_traditional ] = "µLªk§ä¨ìÄæ¦ì'#' ¡C";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá âñåèåß ôï ðåäßï '#'.";
+ Text[ korean ] = "Çʵå'#'¸¦ ãÁö ¸øÇß½À´Ï´Ù.";
+ Text[ arabic ] = "ÊÚÐÑ ÇáÚËæÑ Úáì ÇáÍÞá '#'.";
+ Text[ turkish ] = "Alan '#' bulunamadý.";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_TABLE_NOT_FOUND
+{
+ Text = "Die Tabelle '#' konnte nicht gefunden werden." ;
+ Text [ ENGLISH ] = "Table '#' not found" ;
+ Text [ english_us ] = "Table '#' not found" ;
+ Text[ italian ] = "Non è stato possibile trovare la tabella '#'.";
+ Text[ portuguese_brazilian ] = "Die Tabelle '#' konnte nicht gefunden werden.";
+ Text[ portuguese ] = "Foi impossível localizar a tabela '#'.";
+ Text[ danish ] = "Det var ikke muligt at finde tabel #.";
+ Text[ french ] = "Impossible de trouver le classeur '#'. ";
+ Text[ swedish ] = "Tabellen '#' kunde inte hittas.";
+ Text[ dutch ] = "Tabel '#' niet gevonden.";
+ Text[ spanish ] = "No se pudo encontrar la tabla '#'.";
+ Text[ chinese_simplified ] = "ÎÞ·¨ÕÒµ½±í¸ñ '#' ¡£";
+ Text[ russian ] = "Íàéòè òàáëèöó '#' íå óäàåòñÿ.";
+ Text[ polish ] = "Tabeli '#' nie znaleziono.";
+ Text[ japanese ] = "ðÌÞÙ'#'‚ÍŒ©‚‚©‚è‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ chinese_traditional ] = "µLªk§ä¨ìªí®æ '#' ¡C";
+ Text[ greek ] = "Äåí âñÝèçêå ï ðßíáêáò '#'.";
+ Text[ korean ] = "Å×À̺í'#'À» ãÁö ¸øÇß½À´Ï´Ù.";
+ Text[ arabic ] = "ÊÚÐÑ ÇáÚËæÑ Úáì ÇáÌÏæá '#'.";
+ Text[ turkish ] = "Tablo '#' bulunamadý.";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_QUERY_NOT_FOUND
+{
+ Text = "Die Abfrage '#' konnte nicht gefunden werden." ;
+ Text [ ENGLISH ] = "Query '#' not found" ;
+ Text [ english_us ] = "Query '#' not found" ;
+ Text[ italian ] = "Non è stato possibile trovare la ricerca '#'.";
+ Text[ portuguese_brazilian ] = "Die Abfrage '#' konnte nicht gefunden werden.";
+ Text[ portuguese ] = "Foi impossível localizar a consulta '#'.";
+ Text[ danish ] = "Det var ikke muligt at finde forespørgsel #.";
+ Text[ french ] = "La recherche '#' n'a pas abouti.";
+ Text[ swedish ] = "Sökningen '#' kunde inte hittas.";
+ Text[ dutch ] = "Query '#' niet gevonden.";
+ Text[ spanish ] = "No se pudo encontrar la consulta '#'.";
+ Text[ chinese_simplified ] = "ÎÞ·¨ÕÒµ½²éѯ '#' ¡£";
+ Text[ russian ] = "Íàéòè çàïðîñ '#' íå óäàåòñÿ.";
+ Text[ polish ] = "Kwerendy '#' nie znaleziono.";
+ Text[ japanese ] = "¸´Ø°'#'‚ÍŒ©‚‚©‚è‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ chinese_traditional ] = "µLªk§ä¨ì¬d¸ß'#' ¡C";
+ Text[ greek ] = "Äåí âñÝèçêå ôï åñþôçìá '#'.";
+ Text[ korean ] = "ÁúÀÇ'#'¸¦ ãÁö ¸øÇß½À´Ï´Ù.";
+ Text[ arabic ] = "ÊÚÐÑ ÇáÚËæÑ Úáì ÇáÇÓÊÝÓÇÑ '#'.";
+ Text[ turkish ] = "Sorgu '#' bulunamadý.";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_ERR_NO_ELEMENT_TITLE
+{
+ Text = "Der eingegebene Text ist kein Element der Liste." ;
+ Text [ ENGLISH ] = "The text entry is not an element of the list." ;
+ Text [ english_us ] = "The text entry does not correspont to one of the list items." ;
+ Text[ italian ] = "Il testo immesso non è un elemento dell'elenco.";
+ Text[ portuguese_brazilian ] = "Der eingegebene Text ist kein Element der Liste.";
+ Text[ portuguese ] = "O texto indicado não é um elemento da lista.";
+ Text[ danish ] = "Den indtastede tekst er ikke et element fra listen.";
+ Text[ french ] = "Le texte saisi n'est pas un élément de la liste";
+ Text[ swedish ] = "Den inmatade texten är inget element från listan.";
+ Text[ dutch ] = "De ingevoerde tekst komt niet overeen met een element uit de lijst.";
+ Text[ spanish ] = "El texto indicado no es ningún elemento de la lista.";
+ Text[ chinese_simplified ] = "ÊäÈëµÄÎÄ×Ö²»ÊÇÁбíÌõÄ¿¡£";
+ Text[ russian ] = "Ââåäåííûé òåêñò íå ñîâïàäàåò íè ñ êàêèì ýëåìåíòîì ñïèñêà.";
+ Text[ polish ] = "Wpisany tekst nie jest elementem listy.";
+ Text[ japanese ] = "“ü—Í‚µ‚½Ã·½Ä‚ÍؽĂ̗v‘f‚Å‚Í‚ ‚è‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "¿é¤Jªº¤å¦r¤£¬O²M³æ¶µ¥Ø¡C";
+ Text[ greek ] = "Ôï êåßìåíï ðïõ åéóÜãáôå äåí åßíáé óôïé÷åßï ôçò ëßóôáò.";
+ Text[ korean ] = "ÀÔ·ÂÇÑ ÅؽºÆ®´Â ¸ñ·ÏÀÇ Ç׸ñÀÌ ¾Æ´Õ´Ï´Ù.";
+ Text[ arabic ] = "áÇ ÊÔÊãá ÇáÞÇÆãÉ Úáì ÇáäÕ ÇáÐí Êã ÅÏÎÇáå.";
+ Text[ turkish ] = "Girilen metin, listede yer alan öðelerden deðil.";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_ERR_NO_ELEMENT
+{
+ Text = "Wählen Sie ein Element der Liste aus oder geben Sie Text ein, der mit einem der aufgelisteten Elemente übereinstimmt." ;
+ Text [ ENGLISH ] = "Choose an entry of the list." ;
+ Text [ english_us ] = "Choose an entry from the list or enter a text corresponding to one of the list items." ;
+ Text[ italian ] = "Selezionate un elemento dell'elenco oppure inserite un testo corrispondente a uno degli elementi elencati.";
+ Text[ portuguese_brazilian ] = "Wählen Sie ein Element der Liste aus oder geben Sie Text ein, der mit einem der aufgelisteten Elemente übereinstimmt.";
+ Text[ portuguese ] = "Seleccione um dos elementos da lista ou indique um texto correspondente a um dos elementos da referida lista.";
+ Text[ danish ] = "Vælg et element fra listen eller indtast tekst, som svarer til et af elementerne fra listen.";
+ Text[ french ] = "Sélectionnez une entrée de liste ou saisissez le texte concordant avec l'un des éléments listés.";
+ Text[ swedish ] = "Välj ut ett element från listan eller mata in text som stämmer överens med ett av elementen i listan.";
+ Text[ dutch ] = "Selecteer een element uit de lijst of typ een tekst die overeenkomt met een van deze elementen.";
+ Text[ spanish ] = "Seleccione un elemento de la lista o introduzca un texto que concuerde con uno de los elementos de la lista.";
+ Text[ chinese_simplified ] = "ÇëÄúÑ¡ÔñÁе¥ÄÚÒ»¸öÌõÄ¿»òÕßÄúÊäÈëÒ»¸ö·ûºÅÁбíÄÚÌõÄ¿µÄ×Ö·û¡£";
+ Text[ russian ] = "Âûáåðèòå ýëåìåíò ñïèñêà èëè ââåäèòå òåêñò, êîòîðûé ñîâïàäàåò ñ îäíèì èç ïåðå÷èñëåííûõ ýëåìåíòîâ.";
+ Text[ polish ] = "Wybierz element z listy lub wstaw tekst, który by³by zgodny z elementami listy.";
+ Text[ japanese ] = "ؽĂ̗v‘f‚ð‘I‘ð‚·‚é‚© ‚Ü‚½‚ÍؽĂ̒†‚Ì—v‘fˆê‚‚ƈê’v‚·‚é÷½Ä‚ð“ü—Í‚µ‚ĉº‚³‚¢B";
+ Text[ chinese_traditional ] = "½Ð±z¿ï¾Ü²M³æ¤º¤@­Ó¶µ¥Ø©ÎªÌ±z¿é¤J¤@­Ó²Å¸¹²M³æ¤º¶µ¥Øªº¦r²Å¡C";
+ Text[ greek ] = "ÅðéëÝîôå Ýíá óôïé÷åßï ôçò ëßóôáò Þ åéóÜãåôå ôï êåßìåíï ðïõ ôáõôßæåôáé ìå Ýíá áðü ôá óôïé÷åßá ôçò ëßóôáò";
+ Text[ korean ] = "¸ñ·Ï¿¡¼­ ÇÑ Ç׸ñÀ» ¼±ÅÃÇϰųª ¸ñ·ÏÀÇ Ç׸ñµé °¡¿îµ¥ ÇÑ °¡Áö¿Í ÀÏÄ¡ÇÏ´Â ÅؽºÆ®¸¦ ÀÔ·ÂÇϽʽÿÀ.";
+ Text[ arabic ] = "ÇÎÊÑ ÃÍÏ ÚäÇÕÑ ÇáÞÇÆãÉ Ãæ Þã ÈÅÏÎÇá äÕ íãÇËá ÃÍÏ ÚäÇÕÑ ÇáÞÇÆãÉ.";
+ Text[ turkish ] = "Listeden bir öðe seçin ya da listedeki öðelerden biriyle örtüþen bir metin girin.";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_READONLY
+{
+ Text = "Nur lesen" ;
+ Text [ ENGLISH ] = "Read only" ;
+ Text [ portuguese ] = "Só leitura" ;
+ Text [ english_us ] = "Read only" ;
+ Text [ portuguese_brazilian ] = "Nur lesen" ;
+ Text [ swedish ] = "Endast läsa" ;
+ Text [ danish ] = "Skrivebeskyttet" ;
+ Text [ italian ] = "Solo lettura" ;
+ Text [ spanish ] = "Solo lectura" ;
+ Text [ french ] = "En lecture seule" ;
+ Text [ dutch ] = "Alleen lezen" ;
+ 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 RID_STR_GROUPBOX
+{
+ Text = "Rahmenelement" ;
+ Text [ ENGLISH ] = "GroupBox" ;
+ Text [ portuguese ] = "Elemento de moldura" ;
+ Text [ english_us ] = "Frame element" ;
+ Text [ portuguese_brazilian ] = "Rahmenelement" ;
+ Text [ swedish ] = "Ramelement" ;
+ Text [ danish ] = "Rammeelement" ;
+ Text [ italian ] = "Elemento di cornice" ;
+ Text [ spanish ] = "Elemento del marco" ;
+ Text [ french ] = "Élément de cadre" ;
+ Text [ dutch ] = "Kaderelement" ;
+ Text[ chinese_simplified ] = "×éºÏ¿ò";
+ Text[ russian ] = "Ýëåìåíò ðàìêè";
+ Text[ polish ] = "Element ramki";
+ Text[ japanese ] = "˜g‚Ì—v‘f";
+ Text[ chinese_traditional ] = "¸s²Õ¤è¶ô";
+ Text[ greek ] = "Óôïé÷åßï ðëáéóßïõ";
+ Text[ korean ] = "ÇÁ·¹ÀÓ ¿ä¼Ò";
+ Text[ arabic ] = "ÚäÕÑ ÅØÇÑ";
+ Text[ turkish ] = "Çerçeve öðesi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TABINDEX
+{
+ Text = "Reihenfolge" ;
+ Text [ ENGLISH ] = "TabIndex" ;
+ Text [ portuguese ] = "Ordem" ;
+ Text [ english_us ] = "Order" ;
+ Text [ portuguese_brazilian ] = "Reihenfolge" ;
+ Text [ swedish ] = "Ordningsföljd" ;
+ Text [ danish ] = "Rækkefølge" ;
+ Text [ italian ] = "Sequenza" ;
+ Text [ spanish ] = "Orden" ;
+ Text [ french ] = "Ordre" ;
+ Text [ dutch ] = "Volgorde" ;
+ Text[ chinese_simplified ] = "˳Ðò";
+ Text[ russian ] = "Ïîðÿäîê";
+ Text[ polish ] = "KolejnoϾ";
+ Text[ japanese ] = "‡˜";
+ Text[ chinese_traditional ] = "¶¶§Ç";
+ Text[ greek ] = "ÄéÜôáîç";
+ Text[ korean ] = "¼ø¼­";
+ Text[ arabic ] = "ÇáÊÑÊíÈ";
+ Text[ turkish ] = "Sýra";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_NAVIGATION
+{
+ Text = "Navigation" ;
+ Text [ ENGLISH ] = "Navigation" ;
+ Text [ portuguese ] = "Navegação" ;
+ Text [ english_us ] = "Navigation" ;
+ Text [ portuguese_brazilian ] = "Navigation" ;
+ Text [ swedish ] = "Navigation" ;
+ Text [ danish ] = "Navigation" ;
+ Text [ italian ] = "Navigazione" ;
+ Text [ spanish ] = "Navegación" ;
+ Text [ french ] = "Navigation" ;
+ Text [ dutch ] = "Navigatie" ;
+ Text[ chinese_simplified ] = "ä¯ÀÀ";
+ Text[ russian ] = "Íàâèãàöèÿ";
+ Text[ polish ] = "Nawigacja";
+ Text[ japanese ] = "ÅËÞ¹Þ°¼®Ý";
+ Text[ chinese_traditional ] = "ÂsÄý";
+ Text[ greek ] = "Ìåôáêßíçóç";
+ Text[ korean ] = "Ž»ö";
+ Text[ arabic ] = "ÇáãáÇÍÉ";
+ Text[ turkish ] = "Dolaþma";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FILTER_CRITERIA
+{
+ Text = "Filter" ;
+ Text [ ENGLISH ] = "Filter" ;
+ Text [ english_us ] = "Filter" ;
+ Text[ italian ] = "Filtro";
+ Text[ portuguese_brazilian ] = "Filter";
+ Text[ portuguese ] = "Filtro";
+ Text[ danish ] = "Filter";
+ Text[ french ] = "Filtre";
+ Text[ swedish ] = "Filter";
+ Text[ dutch ] = "Filter";
+ Text[ spanish ] = "Filtro";
+ Text[ chinese_simplified ] = "ɸѡ";
+ Text[ russian ] = "Ôèëüòð";
+ Text[ polish ] = "Filtr";
+ Text[ japanese ] = "̨ÙÀ";
+ Text[ chinese_traditional ] = "¿z¿ï";
+ Text[ greek ] = "Ößëôñï";
+ Text[ korean ] = "ÇÊÅÍ";
+ Text[ arabic ] = "ÝáÊÑ";
+ Text[ turkish ] = "Filtre";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SORT_CRITERIA
+{
+ Text = "Sortierung" ;
+ Text [ ENGLISH ] = "Sort" ;
+ Text [ english_us ] = "Sort" ;
+ Text[ italian ] = "Ordina";
+ Text[ portuguese_brazilian ] = "Sort";
+ Text[ portuguese ] = "Ordenar";
+ Text[ danish ] = "Sorter";
+ Text[ french ] = "Tri";
+ Text[ swedish ] = "Sortering";
+ Text[ dutch ] = "Sortering";
+ Text[ spanish ] = "Ordenar";
+ Text[ chinese_simplified ] = "ÅÅÐò";
+ Text[ russian ] = "Ñîðòèðîâêà";
+ Text[ polish ] = "Sortowanie";
+ Text[ japanese ] = "•À‚בւ¦";
+ Text[ chinese_traditional ] = "±Æ§Ç";
+ Text[ greek ] = "Ôáîéíüìçóç";
+ Text[ korean ] = "Á¤·Ä";
+ Text[ arabic ] = "ÇáÝÑÒ";
+ Text[ turkish ] = "Sýralama";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_NAVIGATIONBAR
+{
+ Text = "Navigationsleiste" ;
+ Text [ ENGLISH ] = "Navigationbar" ;
+ Text [ english_us ] = "Navigation bar" ;
+ Text[ italian ] = "Barra di navigazione";
+ Text[ portuguese_brazilian ] = "Navigationbar";
+ Text[ portuguese ] = "Barra de navegação";
+ Text[ danish ] = "Navigationslinje";
+ Text[ french ] = "Barre de navigation";
+ Text[ swedish ] = "Navigationslist";
+ Text[ dutch ] = "Navigatiebalk";
+ Text[ spanish ] = "Barra de navegación";
+ Text[ chinese_simplified ] = "ä¯ÀÀµØÖ·À¸";
+ Text[ russian ] = "Ïàíåëü íàâèãàöèè";
+ Text[ polish ] = "Pasek nawigacji";
+ Text[ japanese ] = "ÅËÞ¹Þ°¼®Ý ÊÞ°";
+ Text[ chinese_traditional ] = "ÂsÄý¦ì§}¦C";
+ Text[ greek ] = "ÃñáììÞ ìåôáêßíçóçò";
+ Text[ korean ] = "Ž»ö Ç¥½ÃÁÙ";
+ Text[ arabic ] = "ÔÑíØ ÇáãáÇÍÉ";
+ Text[ turkish ] = "Dolaþma çubuðu";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_CYCLE
+{
+ Text = "Zyklus" ;
+ Text [ ENGLISH ] = "Cycle" ;
+ Text [ portuguese ] = "Ciclo" ;
+ Text [ english_us ] = "Cycle" ;
+ Text [ portuguese_brazilian ] = "Zyklus" ;
+ Text [ swedish ] = "Cykel" ;
+ Text [ danish ] = "Cyklus" ;
+ Text [ italian ] = "Ciclo" ;
+ Text [ spanish ] = "Ciclo" ;
+ Text [ french ] = "Cycle" ;
+ Text [ dutch ] = "Cyclus" ;
+ Text[ chinese_simplified ] = "Ñ­»·";
+ Text[ russian ] = "Öèêë";
+ Text[ polish ] = "Cykl";
+ Text[ japanese ] = "»²¸Ù";
+ Text[ chinese_traditional ] = "´`Àô";
+ Text[ greek ] = "Êýêëïò";
+ Text[ korean ] = "»çÀÌŬ";
+ Text[ arabic ] = "ÏÇÆÑÉ";
+ Text[ turkish ] = "Devre";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ENUM_CYCLE
+{
+ Text = "Alle Datensätze;Aktueller Datensatz;Aktuelle Seite" ;
+ Text [ ENGLISH ] = "All records;Activ record;Activ page" ;
+ Text [ english_us ] = "All records;Active record;Current page" ;
+ Text[ portuguese ] = "Registos todos;Registo actual;Página actual";
+ Text[ russian ] = "Âñå çàïèñè;Òåêóùèå çàïèñè;Òåêóùàÿ ñòðàíèöà";
+ Text[ dutch ] = "Alle records;Actueel record;Actuele pagina";
+ Text[ french ] = "Tous les enregistrements ; l'enregistrement actuel ; la page actuelle";
+ Text[ spanish ] = "Todos los registros de datos;Registro actual;Página actual";
+ Text[ italian ] = "Tutti i record di dati;record di dati attuale;pagina attuale";
+ Text[ danish ] = "Alle dataposter;Aktuel datapost;Aktuel side";
+ Text[ swedish ] = "Alla dataposter;Aktuell datapost;Aktuell sida";
+ Text[ polish ] = "Wszystkie rekordy;aktualny rekord, aktualna strona";
+ Text[ portuguese_brazilian ] = "Alle Datensätze;Aktueller Datensatz";
+ Text[ japanese ] = "‚·‚ׂĂÌÚº°ÄÞ;Œ»Ý‚ÌÚº°ÄÞ;Œ»Ý‚ÌÍß°¼Þ";
+ Text[ chinese_simplified ] = "ËùÓеÄÊý¾ÝÌõÄ¿;µ±Ç°µÄÊý¾ÝÌõÄ¿;µ±Ç°Ò³Ãæ";
+ Text[ chinese_traditional ] = "©Ò¦³ªº¸ê®Æ¶µ¥Ø;·í«eªº¸ê®Æ¶µ¥Ø;·í«e­¶­±";
+ Text[ greek ] = "¼ëåò ïé åããñáöÝò;ÔñÝ÷ïõóåò åããñáöÝò;ÔñÝ÷ïõóá óåëßäá";
+ Text[ korean ] = "¸ðµç ·¹ÄÚµå;È°¼º ·¹ÄÚµå;ÇöÀç ÆäÀÌÁö";
+ Text[ arabic ] = "ßá ÇáÓÌáÇÊ;ÇáÓÌá ÇáÍÇáí;ÇáÕÝÍÉ ÇáÍÇáíÉ";
+ Text[ turkish ] = "Tüm veri kümeleri;Yürürlükteki veri kümesi;Yürürlükteki sayfa";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ENUM_NAVIGATION
+{
+ Text = "Nein;Ja;Übergeordnetes Formular" ;
+ Text [ ENGLISH ] = "No;Yes;Parent";
+ Text [ english_us ] = "No;Yes;Parent Form";
+ Text[ italian ] = "No;Si;Formulario superiore";
+ Text[ portuguese_brazilian ] = "No;Yes;Parent";
+ Text[ portuguese ] = "Não; Sim;Formulário superior";
+ Text[ danish ] = "Nei;Ja;Overordnet formular";
+ Text[ french ] = "Non;Oui;Formulaire parent";
+ Text[ swedish ] = "Nej;Ja;Överordnat formulär";
+ Text[ dutch ] = "Nee;ja;Bovenliggend formulier";
+ Text[ spanish ] = "No;Sí;Formulario superior";
+ Text[ chinese_simplified ] = "·ñ;ÊÇ;ĸ±íµ¥";
+ Text[ russian ] = "Íåò;Äà;Âûøåñòîÿùèé ôîðìóëÿð";
+ Text[ polish ] = "Nie;Tak;Nadrzêdny formularz";
+ Text[ japanese ] = "‚¢‚¢‚¦;‚Í‚¢;ãˆÊ‚ÌŒ`Ž®";
+ Text[ chinese_traditional ] = "§_;¬O;¥Àªí³æ";
+ Text[ greek ] = "¼÷é;Íáé;Áíþôåñç öüñìá";
+ Text[ korean ] = "¾Æ´Ï¿À;¿¹;»óÀ§ Æû";
+ Text[ arabic ] = "áǺäÚãºÇáÇÓÊãÇÑÉ ÇáÃÕá";
+ Text[ turkish ] = "Hayýr;Evet;Üst düzey form";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DIRTY
+{
+ Text = "Geändert" ;
+ Text [ ENGLISH ] = "Dirty" ;
+ Text [ portuguese ] = "Modificado" ;
+ Text [ english_us ] = "Modified" ;
+ Text [ portuguese_brazilian ] = "Geändert" ;
+ Text [ swedish ] = "Ändrat" ;
+ Text [ danish ] = "Ændret" ;
+ Text [ italian ] = "Modificato" ;
+ Text [ spanish ] = "Modificado" ;
+ Text [ french ] = "Modifié" ;
+ Text [ dutch ] = "Gewijzigd" ;
+ Text[ chinese_simplified ] = "ÒѾ­¸ü¸Ä";
+ Text[ russian ] = "Èçìåíåíî";
+ Text[ polish ] = "Zmodyfikowany";
+ Text[ japanese ] = "•ÏX";
+ Text[ chinese_traditional ] = "¤w¸gÅܧó";
+ Text[ greek ] = "ÔñïðïðïéçìÝíï";
+ Text[ korean ] = "º¯°æµÊ";
+ Text[ arabic ] = "ãÚÏá";
+ Text[ turkish ] = "Deðiþtirildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_OLDVALUE
+{
+ Text = "Alter Wert" ;
+ Text [ ENGLISH ] = "Old value" ;
+ Text [ portuguese ] = "Valor antigo" ;
+ Text [ english_us ] = "Old value" ;
+ Text [ portuguese_brazilian ] = "Alter Wert" ;
+ Text [ swedish ] = "Gammalt värde" ;
+ Text [ danish ] = "Gammel værdi" ;
+ Text [ italian ] = "Valore precedente" ;
+ Text [ spanish ] = "Valor antiguo" ;
+ Text [ french ] = "Ancienne valeur" ;
+ Text [ dutch ] = "Oude waarde" ;
+ Text[ chinese_simplified ] = "¾ÉµÄÊýÖµ";
+ Text[ russian ] = "Ñòàðîå çíà÷åíèå";
+ Text[ polish ] = "Stara wartoϾ";
+ Text[ japanese ] = "ŒÃ‚¢”’l";
+ Text[ chinese_traditional ] = "¼ƭÈ";
+ Text[ greek ] = "ÐáëéÜ ôéìÞ";
+ Text[ korean ] = "ÀÌÀü °ª";
+ Text[ arabic ] = "ÇáÞíãÉ ÇáÞÏíãÉ";
+ Text[ turkish ] = "Eski deðer";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_VALUE
+{
+ Text = "Wert" ;
+ Text [ ENGLISH ] = "Value" ;
+ Text [ portuguese ] = "Valor" ;
+ Text [ english_us ] = "Value" ;
+ Text [ portuguese_brazilian ] = "Wert" ;
+ Text [ swedish ] = "Värde" ;
+ Text [ danish ] = "Værdi" ;
+ Text [ italian ] = "Valore" ;
+ Text [ spanish ] = "Valor" ;
+ Text [ french ] = "Valeur" ;
+ Text [ dutch ] = "Waarde" ;
+ Text[ chinese_simplified ] = "ÊýÖµ";
+ Text[ russian ] = "Çíà÷åíèå";
+ Text[ polish ] = "WartoϾ";
+ Text[ japanese ] = "’l";
+ Text[ chinese_traditional ] = "¼Æ­È";
+ Text[ greek ] = "ÔéìÞ";
+ Text[ korean ] = "°ª";
+ Text[ arabic ] = "ÇáÞíãÉ";
+ Text[ turkish ] = "Deðer";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FORMATKEY
+{
+ Text = "Formatierung" ;
+ Text [ ENGLISH ] = "Format" ;
+ Text [ portuguese ] = "Formato" ;
+ Text [ english_us ] = "Formatting" ;
+ Text [ portuguese_brazilian ] = "FormatKey" ;
+ Text [ swedish ] = "Formatering" ;
+ Text [ danish ] = "Formatering" ;
+ Text [ italian ] = "Formattazione" ;
+ Text [ spanish ] = "Formato" ;
+ Text [ french ] = "Formatage" ;
+ Text [ dutch ] = "Opmaak" ;
+ Text[ chinese_simplified ] = "¸ñʽ¼ü";
+ Text[ russian ] = "Ôîðìàòèðîâàíèå";
+ Text[ polish ] = "Formatowanie";
+ Text[ japanese ] = "‘Ž®Ý’è";
+ Text[ chinese_traditional ] = "®æ¦¡¤Æ";
+ Text[ greek ] = "Ìïñöïðïßçóç";
+ Text[ korean ] = "¼­½Ä Å°";
+ Text[ arabic ] = "ÇáÊäÓíÞ";
+ Text[ turkish ] = "Formatlama";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_REQUIRED
+{
+ Text = "Eingabe erforderlich" ;
+ Text [ ENGLISH ] = "Required" ;
+ Text [ portuguese ] = "Entrada necessária" ;
+ Text [ english_us ] = "Entry required" ;
+ Text [ portuguese_brazilian ] = "Eingabe erforderlich" ;
+ Text [ swedish ] = "Inmatning krävs" ;
+ Text [ danish ] = "Input kræves" ;
+ Text [ italian ] = "La digitazione è necessaria" ;
+ Text [ spanish ] = "Entrada requerida" ;
+ Text [ french ] = "Saisie requise" ;
+ Text [ dutch ] = "Invoer verlangd" ;
+ Text[ chinese_simplified ] = "±ØÐëÊäÈë";
+ Text[ russian ] = "Òðåáóåòñÿ ââîä";
+ Text[ polish ] = "Wymagany wpis";
+ Text[ japanese ] = "“ü—Í‚ª•K—v‚Å‚·";
+ Text[ chinese_traditional ] = "¥²¶·¿é¤J";
+ Text[ greek ] = "Áðáéôåßôáé åéóáãùãÞ";
+ Text[ korean ] = "ÀÔ·ÂÀÌ ¿ä±¸µÊ";
+ Text[ arabic ] = "ãØáæÈ ÅÏÎÇá";
+ Text[ turkish ] = "Giriþ gerekli";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SCALE
+{
+ Text = "Skalierung" ;
+ Text [ ENGLISH ] = "Scale" ;
+ Text [ portuguese ] = "Escala" ;
+ Text [ english_us ] = "Scale" ;
+ Text [ portuguese_brazilian ] = "Skalierung" ;
+ Text [ swedish ] = "Skalering" ;
+ Text [ danish ] = "Skalering" ;
+ Text [ italian ] = "Scala" ;
+ Text [ spanish ] = "Escala" ;
+ Text [ french ] = "Échelle" ;
+ Text [ dutch ] = "Schaalverdeling" ;
+ Text[ chinese_simplified ] = "ÏÔʾ¿Ì¶È";
+ Text[ russian ] = "Ìàñøòàáèðîâàíèå";
+ Text[ polish ] = "Skalowanie";
+ Text[ japanese ] = "½¹°Ù";
+ Text[ chinese_traditional ] = "Åã¥Ü¨è«×";
+ Text[ greek ] = "Êëßìáêá";
+ Text[ korean ] = "¹èÀ²";
+ Text[ arabic ] = "ÇáãÞíÇÓ";
+ Text[ turkish ] = "Ölçeklendirme";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SIZE
+{
+ Text = "Größe" ;
+ Text [ ENGLISH ] = "Size" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ english_us ] = "Size" ;
+ Text [ portuguese_brazilian ] = "Gesamtgröße" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ danish ] = "Størrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ spanish ] = "Tamaño" ;
+ Text [ french ] = "Taille" ;
+ Text [ dutch ] = "Grootte" ;
+ Text[ chinese_simplified ] = "´óС";
+ Text[ russian ] = "Ðàçìåð";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "»²½Þ";
+ Text[ chinese_traditional ] = "¤j¤p";
+ Text[ greek ] = "ÌÝãåèïò";
+ Text[ korean ] = "Å©±â";
+ Text[ arabic ] = "ÇáÍÌã";
+ Text[ turkish ] = "Boyut";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_UNIQUE
+{
+ Text = "Eindeutig" ;
+ Text [ ENGLISH ] = "Unique" ;
+ Text [ portuguese ] = "Único" ;
+ Text [ english_us ] = "Unique" ;
+ Text [ portuguese_brazilian ] = "Eindeutig" ;
+ Text [ swedish ] = "Entydig" ;
+ Text [ danish ] = "Entydig" ;
+ Text [ italian ] = "Univoco" ;
+ Text [ spanish ] = "Único" ;
+ Text [ french ] = "Univoque" ;
+ Text [ dutch ] = "Duidelijk" ;
+ Text[ chinese_simplified ] = "Ã÷È·µÄ";
+ Text[ russian ] = "Îäíîçíà÷íî";
+ Text[ polish ] = "Jednoznaczny";
+ Text[ japanese ] = "–¾Šm";
+ Text[ chinese_traditional ] = "©ú½Tªº";
+ Text[ greek ] = "Ìïíáäéêü";
+ Text[ korean ] = "´ÜÀÏ";
+ Text[ arabic ] = "æÇÖÍ";
+ Text[ turkish ] = "Benzersiz";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_CLASSID
+{
+ Text = "Klassenindex" ;
+ Text [ ENGLISH ] = "ClassId" ;
+ Text [ portuguese ] = "Índice de classe" ;
+ Text [ english_us ] = "Class ID" ;
+ Text [ portuguese_brazilian ] = "Klassenindex" ;
+ Text [ swedish ] = "Klassindex" ;
+ Text [ danish ] = "Klasseindeks" ;
+ Text [ italian ] = "Indice di classe" ;
+ Text [ spanish ] = "Índice de clase" ;
+ Text [ french ] = "Index de classe" ;
+ Text [ dutch ] = "Klassenindex" ;
+ Text[ chinese_simplified ] = "ÀàË÷Òý";
+ Text[ russian ] = "Èíäåêñ êëàññà";
+ Text[ polish ] = "Indeks klas";
+ Text[ japanese ] = "¸×½²ÝÃÞ¯¸½";
+ Text[ chinese_traditional ] = "µ{¦¡Ãþ¯Á¤Þ";
+ Text[ greek ] = "ÅõñåôÞñéï êëÜóçò";
+ Text[ korean ] = "Ŭ·¡½º ID";
+ Text[ arabic ] = "ÝåÑÓ ÇáØÈÞÇÊ";
+ Text[ turkish ] = "Sýnýf dizini";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LEFT
+{
+ Text = "Links" ;
+ Text [ ENGLISH ] = "Left" ;
+ Text [ portuguese ] = "Esquerda" ;
+ Text [ english_us ] = "Left" ;
+ Text [ portuguese_brazilian ] = "Links" ;
+ Text [ swedish ] = "Vänster" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ italian ] = "Sinistra" ;
+ Text [ spanish ] = "Izquierda" ;
+ Text [ french ] = "À gauche" ;
+ Text [ dutch ] = "Links" ;
+ Text[ chinese_simplified ] = "Ïò×ó";
+ Text[ russian ] = "Ñëåâà";
+ Text[ polish ] = "Z lewej";
+ Text[ japanese ] = "¶‚É";
+ Text[ chinese_traditional ] = "¦V¥ª";
+ Text[ greek ] = "ÁñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ";
+ Text[ arabic ] = "íÓÇÑ";
+ Text[ turkish ] = "Sol";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_RIGHT
+{
+ Text = "Rechts" ;
+ Text [ ENGLISH ] = "Right" ;
+ Text [ portuguese ] = "Direita" ;
+ Text [ english_us ] = "Right" ;
+ Text [ portuguese_brazilian ] = "Rechts" ;
+ Text [ swedish ] = "Höger" ;
+ Text [ danish ] = "Højre" ;
+ Text [ italian ] = "Destra" ;
+ Text [ spanish ] = "Derecha" ;
+ Text [ french ] = "À droite" ;
+ Text [ dutch ] = "Rechts" ;
+ Text[ chinese_simplified ] = "ÏòÓÒ";
+ Text[ russian ] = "Ñïðàâà";
+ Text[ polish ] = "Z prawej";
+ Text[ japanese ] = "‰E‚É";
+ Text[ chinese_traditional ] = "¦V¥k";
+ Text[ greek ] = "ÄåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ";
+ Text[ arabic ] = "íãíä";
+ Text[ turkish ] = "Sað";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_HEIGHT
+{
+ Text = "Höhe" ;
+ Text [ ENGLISH ] = "Height" ;
+ Text [ portuguese ] = "Altura" ;
+ Text [ english_us ] = "Height" ;
+ Text [ portuguese_brazilian ] = "Höhe" ;
+ Text [ swedish ] = "Höjd" ;
+ Text [ danish ] = "Højde" ;
+ Text [ italian ] = "Altezza" ;
+ Text [ spanish ] = "Altura" ;
+ Text [ french ] = "Hauteur" ;
+ Text [ dutch ] = "Hoogte" ;
+ Text[ chinese_simplified ] = "¸ß¶È";
+ Text[ russian ] = "Âûñîòà";
+ Text[ polish ] = "WysokoϾ";
+ Text[ japanese ] = "‚‚³";
+ Text[ chinese_traditional ] = "°ª«×";
+ Text[ greek ] = "¾øïò";
+ Text[ korean ] = "³ôÀÌ";
+ Text[ arabic ] = "ÇáÇÑÊÝÇÚ";
+ Text[ turkish ] = "Yükseklik";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_WIDTH
+{
+ Text = "Breite" ;
+ Text [ ENGLISH ] = "Width" ;
+ Text [ portuguese ] = "Largura" ;
+ Text [ english_us ] = "Width" ;
+ Text [ portuguese_brazilian ] = "Breite" ;
+ Text [ swedish ] = "Bredd" ;
+ Text [ danish ] = "Bredde" ;
+ Text [ italian ] = "Larghezza" ;
+ Text [ spanish ] = "Ancho" ;
+ Text [ french ] = "Largeur" ;
+ Text [ dutch ] = "Breedte" ;
+ Text[ chinese_simplified ] = "¿í¶È";
+ Text[ russian ] = "Øèðèíà";
+ Text[ polish ] = "SzerokoϾ";
+ Text[ japanese ] = "•";
+ Text[ chinese_traditional ] = "¼e«×";
+ Text[ greek ] = "ÐëÜôïò";
+ Text[ korean ] = "³Êºñ";
+ Text[ arabic ] = "ÇáÚÑÖ";
+ Text[ turkish ] = "Geniþlik";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LISTINDEX
+{
+ Text = "ListIndex" ;
+ Text [ ENGLISH ] = "ListIndex" ;
+ Text [ portuguese ] = "Índice de listas" ;
+ Text [ english_us ] = "List Index" ;
+ Text [ portuguese_brazilian ] = "ListIndex" ;
+ Text [ swedish ] = "Listindex" ;
+ Text [ danish ] = "ListIndeks" ;
+ Text [ italian ] = "Indice elenco" ;
+ Text [ spanish ] = "Indice de listas" ;
+ Text [ french ] = "Index de liste" ;
+ Text [ dutch ] = "ListIndex" ;
+ Text[ chinese_simplified ] = "ÁбíË÷Òý";
+ Text[ russian ] = "Èíäåêñ ñïèñêà";
+ Text[ polish ] = "Indeks list";
+ Text[ japanese ] = "ؽĂ̲ÝÃÞ¯¸½";
+ Text[ chinese_traditional ] = "²M³æ¯Á¤Þ";
+ Text[ greek ] = "ÅõñåôÞñéï ëßóôáò";
+ Text[ korean ] = "¸ñ·Ï À妽º";
+ Text[ arabic ] = "ÝåÑÓ ÇáÞÇÆãÉ";
+ Text[ turkish ] = "Liste dizini";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ROWHEIGHT
+{
+ Text = "Zeilenhöhe" ;
+ Text [ English ] = "Background color" ;
+ Text [ portuguese ] = "Altura de linhas" ;
+ Text [ english_us ] = "Row height" ;
+ Text [ portuguese_brazilian ] = "Zeilenhöhe" ;
+ Text [ swedish ] = "Radhöjd" ;
+ Text [ danish ] = "Rækkehøjde" ;
+ Text [ italian ] = "Altezza riga" ;
+ Text [ spanish ] = "Altura de fila" ;
+ Text [ french ] = "Hauteur de ligne" ;
+ Text [ dutch ] = "Rijhoogte" ;
+ Text[ chinese_simplified ] = "Ðиß";
+ Text[ russian ] = "Âûñîòà ñòðîê";
+ Text[ polish ] = "WysokoϾ wierszy";
+ Text[ japanese ] = "s‚Ì‚‚³";
+ Text[ chinese_traditional ] = "¦æ°ª";
+ Text[ greek ] = "¾øïò ãñáììÞò";
+ Text[ korean ] = "Çà ³ôÀÌ";
+ Text[ arabic ] = "ÇÑÊÝÇÚ ÇáÕÝ";
+ Text[ turkish ] = "Satýr yüksekliði";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FILLCOLOR
+{
+ Text = "Füllfarbe" ;
+ Text [ English ] = "FillColor" ;
+ Text [ portuguese ] = "Cor de preenchimento" ;
+ Text [ english_us ] = "Fill Color" ;
+ Text [ portuguese_brazilian ] = "Füllfarbe" ;
+ Text [ swedish ] = "Fyllningsfärg" ;
+ Text [ danish ] = "Fyldfarve" ;
+ Text [ italian ] = "Colore di riempimento" ;
+ Text [ spanish ] = "Color de relleno" ;
+ Text [ french ] = "Couleur de remplissage" ;
+ Text [ dutch ] = "Opvulkleur" ;
+ Text[ chinese_simplified ] = "³äÌîÑÕÉ«";
+ Text[ russian ] = "Öâåò çàëèâêè";
+ Text[ polish ] = "Kolor wype³nienia";
+ Text[ japanese ] = "“h‚è‚‚Ԃµ";
+ Text[ chinese_traditional ] = "¥R¶ñÃC¦â";
+ Text[ greek ] = "ÃÝìéóìá ìå ÷ñþìá";
+ Text[ korean ] = "»ö ä¿ì±â";
+ Text[ arabic ] = "áæä ÊÚÈÆÉ";
+ Text[ turkish ] = "Dolgu rengi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TEXTCOLOR
+{
+ Text = "Textfarbe" ;
+ Text [ English ] = "TextColor" ;
+ Text [ portuguese ] = "Cor do texto" ;
+ Text [ english_us ] = "Text color" ;
+ Text [ portuguese_brazilian ] = "Textfarbe" ;
+ Text [ swedish ] = "Textfärg" ;
+ Text [ danish ] = "Tekstfarve" ;
+ Text [ italian ] = "Colore testo" ;
+ Text [ spanish ] = "Color de texto" ;
+ Text [ french ] = "Couleur du texte" ;
+ Text [ dutch ] = "Tekstkleur" ;
+ Text[ chinese_simplified ] = "ÎÄ×ÖÑÕÉ«";
+ Text[ russian ] = "Öâåò òåêñòà";
+ Text[ polish ] = "Kolor tekstu";
+ Text[ japanese ] = "÷½Ä‚ÌF";
+ Text[ chinese_traditional ] = "¤å¦rÃC¦â";
+ Text[ greek ] = "×ñþìá êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® »ö";
+ Text[ arabic ] = "áæä ÇáäÕ";
+ Text[ turkish ] = "Metin rengi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LINECOLOR
+{
+ Text = "Linienfarbe" ;
+ Text [ English ] = "LineColor" ;
+ Text [ portuguese ] = "Cor da linha" ;
+ Text [ english_us ] = "Line Color" ;
+ Text [ portuguese_brazilian ] = "Linienfarbe" ;
+ Text [ swedish ] = "Linjefärg" ;
+ Text [ danish ] = "Stregfarve" ;
+ Text [ italian ] = "Colore linee" ;
+ Text [ spanish ] = "Color de línea" ;
+ Text [ french ] = "Couleur de ligne" ;
+ Text [ dutch ] = "Lijnkleur" ;
+ Text[ chinese_simplified ] = "ÏßÌõÑÕÉ«";
+ Text[ russian ] = "Öâåò ëèíèè";
+ Text[ polish ] = "Kolor linii";
+ Text[ japanese ] = "ü‚ÌF";
+ Text[ chinese_traditional ] = "½u±øÃC¦â";
+ Text[ greek ] = "×ñþìá ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ »ö";
+ Text[ arabic ] = "áæä ÇáÎØ";
+ Text[ turkish ] = "Çizgi rengi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_REFVALUE
+{
+ Text = "Referenzwert" ;
+ Text [ English ] = "RefValue" ;
+ Text [ portuguese ] = "Valor referencial" ;
+ Text [ english_us ] = "Reference value" ;
+ Text [ portuguese_brazilian ] = "Referenzwert" ;
+ Text [ swedish ] = "Referensvärde" ;
+ Text [ danish ] = "Referenceværdi" ;
+ Text [ italian ] = "Valore di riferimento" ;
+ Text [ spanish ] = "Valor referencial" ;
+ Text [ french ] = "Valeur référentielle" ;
+ Text [ dutch ] = "Referentiewaarde" ;
+ Text[ chinese_simplified ] = "ÒýÓÃÖµ";
+ Text[ russian ] = "Çíà÷åíèå ññûëêè";
+ Text[ polish ] = "Wartoœæ odwo³ania";
+ Text[ japanese ] = "ŽQÆ’l";
+ Text[ chinese_traditional ] = "°Ñ·Ó­È";
+ Text[ greek ] = "ÔéìÞ áíáöïñÜò";
+ Text[ korean ] = "ÂüÁ¶ °ª";
+ Text[ arabic ] = "ÞíãÉ ãÑÌÚíÉ";
+ Text[ turkish ] = "Referans deðer";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_STRINGITEMLIST
+{
+ Text = "Listen-Einträge" ;
+ Text [ English ] = "StringItemList" ;
+ Text [ portuguese ] = "Registos de listas" ;
+ Text [ english_us ] = "List entries" ;
+ Text [ portuguese_brazilian ] = "Listen-Einträge" ;
+ Text [ swedish ] = "Listposter" ;
+ Text [ danish ] = "Liste-elementer" ;
+ Text [ italian ] = "Voci dell'elenco" ;
+ Text [ spanish ] = "Entradas de listas" ;
+ Text [ french ] = "Entrées de liste" ;
+ Text [ dutch ] = "Items in lijsten" ;
+ Text[ chinese_simplified ] = "ÁбíÌõÄ¿";
+ Text[ russian ] = "Ýëåìåíòû ñïèñêà";
+ Text[ polish ] = "Pozycje list";
+ Text[ japanese ] = "ؽĂ̓ü—Í";
+ Text[ chinese_traditional ] = "²M³æ¶µ¥Ø";
+ Text[ greek ] = "ÅããñáöÝò ëéóôþí";
+ Text[ korean ] = "¸ñ·Ï Ç׸ñ";
+ Text[ arabic ] = "ÅÏÎÇáÇÊ ÇáÞÇÆãÉ";
+ Text[ turkish ] = "Liste giriþleri";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_COLUMN
+{
+ Text = "Spalte" ;
+ Text [ English ] = "Column" ;
+ Text [ portuguese ] = "Coluna" ;
+ Text [ english_us ] = "Column" ;
+ Text [ portuguese_brazilian ] = "Sp" ;
+ Text [ swedish ] = "Kolumn" ;
+ Text [ danish ] = "Kolonne" ;
+ Text [ italian ] = "Colonna" ;
+ Text [ spanish ] = "Columna" ;
+ Text [ french ] = "Colonne" ;
+ Text [ dutch ] = "Kolom" ;
+ Text[ chinese_simplified ] = "ÁÐ";
+ Text[ russian ] = "Êîëîíêà";
+ Text[ polish ] = "Kolumna";
+ Text[ japanese ] = "—ñ";
+ Text[ chinese_traditional ] = "Äæ";
+ Text[ greek ] = "ÓôÞëç";
+ Text[ korean ] = "¿­";
+ Text[ arabic ] = "ÚãæÏ";
+ Text[ turkish ] = "Sütun";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_BUTTONTYPE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Art der Schaltfläche : Art des Buttons */
+ Text = "Art der Schaltfläche" ;
+ Text [ English ] = "Button type" ;
+ Text [ portuguese ] = "Tipo de botão" ;
+ Text [ english_us ] = "Button type" ;
+ Text [ portuguese_brazilian ] = "Art des Buttons" ;
+ Text [ swedish ] = "Typ av kommandoknapp" ;
+ Text [ danish ] = "Knaptype" ;
+ Text [ italian ] = "Tipo di pulsante" ;
+ Text [ spanish ] = "Tipo de botón" ;
+ Text [ french ] = "Type de bouton" ;
+ Text [ dutch ] = "Soort knop" ;
+ Text[ chinese_simplified ] = "°´Å¥ÀàÐÍ";
+ Text[ russian ] = "Òèï êíîïêè";
+ Text[ polish ] = "Typ przycisku";
+ Text[ japanese ] = "ÎÞÀÝ‚ÌŽí—Þ";
+ Text[ chinese_traditional ] = "«ö¶sÃþ«¬";
+ Text[ greek ] = "Ôýðïò ðåäßïõ åíôïëÞò";
+ Text[ korean ] = "¹öÆ° À¯Çü";
+ Text[ arabic ] = "äæÚ ÇáãÝÊÇÍ";
+ Text[ turkish ] = "Düðme türü";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SUBMIT_ACTION
+{
+ Text = "URL" ;
+ Text [ English ] = "URL" ;
+ Text [ portuguese ] = "URL" ;
+ Text [ english_us ] = "URL" ;
+ Text [ portuguese_brazilian ] = "Submit URL" ;
+ Text [ swedish ] = "URL" ;
+ Text [ danish ] = "URL" ;
+ Text [ italian ] = "URL" ;
+ Text [ spanish ] = "URL" ;
+ Text [ french ] = "URL" ;
+ Text [ dutch ] = "URL" ;
+ Text[ chinese_simplified ] = "URL";
+ Text[ russian ] = "URL";
+ Text[ polish ] = "URL";
+ Text[ japanese ] = "URL";
+ Text[ chinese_traditional ] = "URL";
+ Text[ greek ] = "URL";
+ Text[ korean ] = "URL";
+ Text[ arabic ] = "URL";
+ Text[ turkish ] = "URL";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SUBMIT_METHOD
+{
+ Text = "Art des Submits" ;
+ Text [ English ] = "Kind of submission" ;
+ Text [ portuguese ] = "Tipo de submissão" ;
+ Text [ english_us ] = "Type of submission" ;
+ Text [ portuguese_brazilian ] = "Art der Submission" ;
+ Text [ swedish ] = "Sändningstyp" ;
+ Text [ danish ] = "Fremsendelsestype" ;
+ Text [ italian ] = "Tipo di submission" ;
+ Text [ spanish ] = "Tipo de submit" ;
+ Text [ french ] = "Type d'envoi" ;
+ Text [ dutch ] = "Submissietype" ;
+ Text[ chinese_simplified ] = "Ìá½»µÄÀàÐÍ";
+ Text[ russian ] = "Òèï ïåðåäà÷è";
+ Text[ polish ] = "Rodzaj submitu";
+ Text[ japanese ] = "’ño‚ÌŽí—Þ";
+ Text[ chinese_traditional ] = "´£¥æªºÃþ«¬";
+ Text[ greek ] = "Ôýðïò õðïâïëÞò";
+ Text[ korean ] = "Àü¼Û À¯Çü";
+ Text[ arabic ] = "äæÚ ÇáÅÑÓÇá";
+ Text[ turkish ] = "Gönderme türü";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SUBMIT_ENCODING
+{
+ Text = "Kodierung beim Submit" ;
+ Text [ English ] = "Encoding of submission" ;
+ Text [ portuguese ] = "Codificar submissão" ;
+ Text [ english_us ] = "Submission encoding" ;
+ Text [ portuguese_brazilian ] = "Kodierung der Submission" ;
+ Text [ swedish ] = "Kodning vid sändning" ;
+ Text [ danish ] = "Kodning ved fremsendelse" ;
+ Text [ italian ] = "Codifica all'invio" ;
+ Text [ spanish ] = "Codificar submit" ;
+ Text [ french ] = "Encodage de l'envoi" ;
+ Text [ dutch ] = "Codering bij de submissie" ;
+ Text[ chinese_simplified ] = "ÌύʱִÐбàÂë´¦Àí";
+ Text[ russian ] = "Êîäèðîâàíèå ïðè ïåðåäà÷å";
+ Text[ polish ] = "Kodowanie submitu";
+ Text[ japanese ] = "’ño‚Ì۴ݺ°ÄÞ‚·‚é";
+ Text[ chinese_traditional ] = "´£¥æ®É°õ¦æ½s½X³B²z";
+ Text[ greek ] = "ÕðïâïëÞ êùäéêïðïßçóçò";
+ Text[ korean ] = "Àü¼Û½Ã ÄÚµåÈ­";
+ Text[ arabic ] = "ÊÑãíÒ ÇáÅÑÓÇá";
+ Text[ turkish ] = "Gönderme sýrasýnda kodlama";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DEFAULTVALUE
+{
+ Text = "Standardwert" ;
+ Text [ English ] = "Default value" ;
+ Text [ portuguese ] = "Valor padrão" ;
+ Text [ english_us ] = "Default value" ;
+ Text [ portuguese_brazilian ] = "Defaultwert" ;
+ Text [ swedish ] = "Standardvärde" ;
+ Text [ danish ] = "Standardværdi" ;
+ Text [ italian ] = "Valore standard" ;
+ Text [ spanish ] = "Valor predeterminado" ;
+ Text [ french ] = "Valeur par défaut" ;
+ Text [ dutch ] = "Standaardwaarde" ;
+ Text[ chinese_simplified ] = "ĬÈÏÖµ";
+ Text[ russian ] = "Çíà÷åíèå ïî óìîë÷àíèþ";
+ Text[ polish ] = "Wartoœæ domyœlna";
+ Text[ japanese ] = "•W€’l";
+ Text[ chinese_traditional ] = "Àq»{­È";
+ Text[ greek ] = "ÐñïåðéëåãìÝíç ôéìÞ";
+ Text[ korean ] = "±âº»°ª";
+ Text[ arabic ] = "ÞíãÉ ÇÝÊÑÇÖíÉ";
+ Text[ turkish ] = "Standart deðer";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SUBMIT_TARGET
+{
+ Text = "Frame" ;
+ Text [ English ] = "Target frame" ;
+ Text [ portuguese ] = "Moldura de destino" ;
+ Text [ english_us ] = "Target frame" ;
+ Text [ portuguese_brazilian ] = "Zielrahmen" ;
+ Text [ swedish ] = "Ram" ;
+ Text [ danish ] = "Frame" ;
+ Text [ italian ] = "Frame" ;
+ Text [ spanish ] = "Frame" ;
+ Text [ french ] = "Frame" ;
+ Text [ dutch ] = "Kader" ;
+ Text[ chinese_simplified ] = "¿ò¶ÔÏó";
+ Text[ russian ] = "Êàäð";
+ Text[ polish ] = "Frame";
+ Text[ japanese ] = "ÌÚ°Ñ";
+ Text[ chinese_traditional ] = "°T®Ø";
+ Text[ greek ] = "Ðëáßóéï";
+ Text[ korean ] = "ÇÁ·¹ÀÓ";
+ Text[ arabic ] = "Frame";
+ Text[ turkish ] = "Frame";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ENUM_BUTTONTYPE
+{
+ Text = "Push;Submit;Reset;Url" ;
+ Text [ English ] = "Push;Submit;Reset;Url" ;
+ Text [ portuguese ] = "Push;Submit;Reset;Url" ;
+ Text [ english_us ] = "Push;Submit;Reset;Url" ;
+ Text [ portuguese_brazilian ] = "Push;Submit;Reset;Url" ;
+ Text [ swedish ] = "Push;Submit;Reset;Url" ;
+ Text [ danish ] = "Push;Submit;Reset;Url" ;
+ Text [ italian ] = "Push;Submit;Reset;Url" ;
+ Text [ spanish ] = "Push;Submit;Reset;Url" ;
+ Text [ french ] = "Push;Submit;Reset;Url" ;
+ Text [ dutch ] = "Push;Submit;Reset;Url" ;
+ Text[ chinese_simplified ] = "Push;Submit;Reset;Url";
+ Text[ russian ] = "Push;Submit;Reset;Url";
+ Text[ polish ] = "Push;Submit;Reset;Url";
+ Text[ japanese ] = "Push;Submit;Reset;Url";
+ Text[ chinese_traditional ] = "Push;Submit;Reset;Url";
+ Text[ greek ] = "Push;Submit;Reset;Url";
+ Text[ korean ] = "Push;Submit;Reset;Url";
+ Text[ arabic ] = "Push;Submit;Reset;Url";
+ Text[ turkish ] = "Push;Submit;Reset;Url";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ENUM_SUBMIT_METHOD
+{
+ Text = "Get;Post" ;
+ Text [ English ] = "Get;Post" ;
+ Text [ portuguese ] = "Get;Post" ;
+ Text [ english_us ] = "Get;Post" ;
+ Text [ portuguese_brazilian ] = "Get;Post" ;
+ Text [ swedish ] = "Get;Post" ;
+ Text [ danish ] = "Get;Post" ;
+ Text [ italian ] = "Get;Post" ;
+ Text [ spanish ] = "Get;Post" ;
+ Text [ french ] = "Get;Post" ;
+ Text [ dutch ] = "Get;Post" ;
+ Text[ chinese_simplified ] = "ÊÕÈ¡;¼Ä·¢";
+ Text[ russian ] = "Get;Post";
+ Text[ polish ] = "Get;Post";
+ Text[ japanese ] = "Get;Post";
+ Text[ chinese_traditional ] = "¦¬¨ú;µo°e";
+ Text[ greek ] = "Get;Post";
+ Text[ korean ] = "Get;Post";
+ Text[ arabic ] = "Get;Post";
+ Text[ turkish ] = "Get;Post";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ENUM_SUBMIT_ENCODING
+{
+ Text = "URL;Multipart;Text" ;
+ Text [ English ] = "URL;Multipart;Text" ;
+ Text [ portuguese ] = "URL;Multipart;Texto" ;
+ Text [ english_us ] = "URL;Multipart;Text" ;
+ Text [ portuguese_brazilian ] = "URL;Multipart" ;
+ Text [ swedish ] = "URL;Multipart;Text" ;
+ Text [ danish ] = "URL;Multipart;Tekst" ;
+ Text [ italian ] = "URL;Multipart;Testo" ;
+ Text [ spanish ] = "URL;Multipart;Texto" ;
+ Text [ french ] = "URL;Multipart;Texte" ;
+ Text [ dutch ] = "URL;Multipart;Tekst" ;
+ Text[ chinese_simplified ] = "URL;Multipart;Text" ;
+ Text[ russian ] = "URL;Multipart;Òåêñò";
+ Text[ polish ] = "URL;Multipart;Tekst" ;
+ Text[ japanese ] = "URL;Multipart;Text" ;
+ Text[ chinese_traditional ] = "URL;Multipart;Text" ;
+ Text[ greek ] = "URL;Multipart;Êåßìåíï" ;
+ Text[ korean ] = "URL;Multipart;ÅؽºÆ®" ;
+ Text[ arabic ] = "URL;Multipart;Text" ;
+ Text[ turkish ] = "URL;Multipart;Metin";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DEFAULT_CHECKED
+{
+ Text = "Standardstatus" ;
+ Text [ English ] = "Default checked" ;
+ Text [ portuguese ] = "Estado padrão" ;
+ Text [ english_us ] = "Default status" ;
+ Text [ portuguese_brazilian ] = "Default an" ;
+ Text [ swedish ] = "Standardstatus" ;
+ Text [ danish ] = "Standardstatus" ;
+ Text [ italian ] = "Default" ;
+ Text [ spanish ] = "Estado predeterminado" ;
+ Text [ french ] = "Statut par défaut" ;
+ Text [ dutch ] = "Standaardstatus" ;
+ Text[ chinese_simplified ] = "±ê׼״̬";
+ Text[ russian ] = "Ñòàòóñ ïî óìîë÷àíèþ";
+ Text[ polish ] = "Stan domyœlny";
+ Text[ japanese ] = "•W€½Ã°À½";
+ Text[ chinese_traditional ] = "¼Ð·Çª¬ºA";
+ Text[ greek ] = "ÐñïåðéëåãìÝíç êáôÜóôáóç";
+ Text[ korean ] = "±âº» »óÅÂ";
+ Text[ arabic ] = "ÍÇáÉ ÇÝÊÑÇÖíÉ";
+ Text[ turkish ] = "Standart durum";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ENUM_CHECKED
+{
+ Text = "Nicht ausgewählt;Ausgewählt;Unbestimmt" ;
+ Text [ English ] = "No;Yes;Unassigned" ;
+ Text [ portuguese ] = "Não seleccionado;Seleccionado;Indefinido" ;
+ Text [ english_us ] = "Not Selected;Selected;Not Defined" ;
+ Text [ portuguese_brazilian ] = "Nein;Ja;Unbestimmt" ;
+ Text [ swedish ] = "Ej utvalt;Utvalt;Obestämd" ;
+ Text [ danish ] = "Ikke valgt;Valgt;Udefineret" ;
+ Text [ italian ] = "Non selezionato;Selezionato;Indefinito" ;
+ Text [ spanish ] = "No seleccionado;Seleccionado;Indeterminado" ;
+ Text [ french ] = "Non sélectionné;Sélectionné;Indéterminé" ;
+ Text [ dutch ] = "Niet geselecteerd;Wel geselecteerd;Onbepaald" ;
+ Text[ chinese_simplified ] = "ûÓÐÑ¡Ôñ;ÒÑÑ¡Ôñ;䶨";
+ Text[ russian ] = "Íå âûáðàíî;Âûáðàíî;Íåîïðåäåëåíî";
+ Text[ polish ] = "Nie wybrany; Wybrany;Nieokreœlony";
+ Text[ japanese ] = "‘I‘ð‚³‚ê‚Ä‚¢‚È‚¢;‘I‘ð‚³‚ê‚½;•s’è";
+ Text[ chinese_traditional ] = "¨S¦³¿ï¾Ü;¤w¿ï¾Ü;¥¼©w";
+ Text[ greek ] = "Ìç åðéëåãìÝíá;ÅðéëåãìÝíá;Ìç ïñéóìÝíï";
+ Text[ korean ] = "¼±ÅõÇÁö ¾ÊÀ½;¼±ÅõÊ;ÁöÁ¤µÇÁö ¾ÊÀ½";
+ Text[ arabic ] = "ÛíÑ ãÍÏϺãÍÏϺÛíÑ ãÚÑÝ";
+ Text[ turkish ] = "Seçilmedi;Seçildi;Belirsiz";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ENUM_SUBMIT_TARGET
+{
+ Text = "_blank;_parent;_self;_top" ;
+};
+String RID_STR_IMAGE_URL
+{
+ Text = "Grafik" ;
+ Text [ English ] = "Graphic" ;
+ Text [ portuguese ] = "Imagem" ;
+ Text [ english_us ] = "Graphic" ;
+ Text [ portuguese_brazilian ] = "Grafik" ;
+ Text [ swedish ] = "Grafik" ;
+ Text [ danish ] = "Grafik" ;
+ Text [ italian ] = "Immagine" ;
+ Text [ spanish ] = "Imagen" ;
+ Text [ french ] = "Image" ;
+ Text [ dutch ] = "Afbeelding" ;
+ Text[ chinese_simplified ] = "ͼÐÎ";
+ Text[ russian ] = "Ðèñóíîê";
+ Text[ polish ] = "Grafika";
+ Text[ japanese ] = "¸Þ×̨¯¸";
+ Text[ chinese_traditional ] = "¹Ï¤ù";
+ Text[ greek ] = "Ãñáöéêü";
+ Text[ korean ] = "±×·¡ÇÈ";
+ Text[ arabic ] = "ÕæÑÉ";
+ Text[ turkish ] = "Grafik";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DEFAULT_SELECT_SEQ
+{
+ Text = "Standardselektion" ;
+ Text [ English ] = "Default selection" ;
+ Text [ portuguese ] = "Selecção padrão" ;
+ Text [ english_us ] = "Default selection" ;
+ Text [ portuguese_brazilian ] = "Default Selektion" ;
+ Text [ swedish ] = "Standardmarkering" ;
+ Text [ danish ] = "Standardudvalg" ;
+ Text [ italian ] = "Selezione standard" ;
+ Text [ spanish ] = "Selección predeterminada" ;
+ Text [ french ] = "Sélection par défaut" ;
+ Text [ dutch ] = "Standaardselectie" ;
+ Text[ chinese_simplified ] = "±ê׼ѡÔñ";
+ Text[ russian ] = "Âûáîð ïî óìîë÷àíèþ";
+ Text[ polish ] = "Selekcja domyœlna";
+ Text[ japanese ] = "•W€‘I‘ð”͈Í";
+ Text[ chinese_traditional ] = "¼Ð·Ç¿ï¾Ü";
+ Text[ greek ] = "ÐñïåðéëåãìÝíç åðéëïãÞ";
+ Text[ korean ] = "±âº» ¼±ÅÃ";
+ Text[ arabic ] = "ÊÍÏíÏ ÇÝÊÑÇÖí";
+ Text[ turkish ] = "Standart seçim";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_UNDO_PROPERTY
+{
+ Text = "Setzen der Eigenschaft '#'" ;
+ Text [ English ] = "Setting of property '#'" ;
+ Text [ portuguese ] = "Definir propriedade '#'" ;
+ Text [ english_us ] = "Set property '#'" ;
+ Text [ portuguese_brazilian ] = "Setzen der Eigenschaft '#'" ;
+ Text [ swedish ] = "Definiera egenskapen '#'" ;
+ Text [ danish ] = "Definer egenskab '#'" ;
+ Text [ italian ] = "Impostazione della proprietà '#'" ;
+ Text [ spanish ] = "Establecer propiedad '#'" ;
+ Text [ french ] = "Définir la propriété '#'" ;
+ Text [ dutch ] = "Definiëren van eigenschap '#'" ;
+ Text[ chinese_simplified ] = "É趨ÊôÐÔ '#'";
+ Text[ russian ] = "Óñòàíîâêà ñâîéñòâ '#'";
+ Text[ polish ] = "Ustaw w³aœciwoœæ '#'";
+ Text[ japanese ] = "ÌßÛÊßè'#'‚ÌÝ’è";
+ Text[ chinese_traditional ] = "³]©wÄÝ©Ê '#'";
+ Text[ greek ] = "Ïñéóìüò ôçò éäéüôçôáò '#'";
+ Text[ korean ] = "µî·ÏÁ¤º¸'#' ¼³Á¤";
+ Text[ arabic ] = "ÊÚíä ÇáÎÇÕíÉ '#'";
+ Text[ turkish ] = "'#' özelliðini belirle";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_UNDO_CONTAINER_INSERT
+{
+ Text = "Einfügen in Container" ;
+ Text [ English ] = "Insert of #" ;
+ Text [ english_us ] = "Insert in container" ;
+ TEXT[ italian ] = "Inserisci nel container";
+ TEXT[ portuguese_brazilian ] = "Einfügen in Container";
+ TEXT[ portuguese ] = "Inserir no contentor";
+ TEXT[ danish ] = "Indsæt i container";
+ TEXT[ french ] = "Insérer dans le container";
+ TEXT[ swedish ] = "Infoga i container";
+ TEXT[ dutch ] = "Invoegen in container";
+ TEXT[ spanish ] = "Insertar en el contenedor";
+ TEXT[ chinese_simplified ] = "²åÈëµ½Container";
+ TEXT[ russian ] = "Âñòàâèòü â êîíòåéíåð";
+ TEXT[ polish ] = "Wstaw do kontenera";
+ TEXT[ japanese ] = "ºÝÃÅ°‚É‘}“ü";
+ TEXT[ chinese_traditional ] = "´¡¤J¨ìContainer";
+ TEXT[ greek ] = "ÅéóáãùãÞ óôï êéâþôéï";
+ TEXT[ korean ] = "ÄÁÅ×À̳ʿ¡ Ãß°¡";
+ TEXT[ arabic ] = "ÅÏÑÇÌ Ýí ÍÇæíÉ";
+ TEXT[ turkish ] = "Tabloya ekle";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_STR_UNDO_CONTAINER_REMOVE
+{
+ Text = "# löschen" ;
+ Text [ English ] = "remove #" ;
+ Text [ english_us ] = "Delete #" ;
+ TEXT[ italian ] = "Elimina #";
+ TEXT[ portuguese_brazilian ] = "Entfernen aus Container";
+ TEXT[ portuguese ] = "Eliminar #";
+ TEXT[ danish ] = "Slet #";
+ TEXT[ french ] = "Supprimer #";
+ TEXT[ swedish ] = "Radera #";
+ TEXT[ dutch ] = "# wissen";
+ TEXT[ spanish ] = "Eliminar #";
+ TEXT[ chinese_simplified ] = "ɾ³ý #";
+ TEXT[ russian ] = "# óäàëèòü";
+ TEXT[ polish ] = "Usuñ #";
+ TEXT[ japanese ] = "#íœ";
+ TEXT[ chinese_traditional ] = "§R°£ #";
+ TEXT[ greek ] = "ÄéáãñáöÞ ôïõ #";
+ TEXT[ korean ] = "# »èÁ¦";
+ TEXT[ arabic ] = "ÍÐÝ #";
+ TEXT[ turkish ] = "Sil: #";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_STR_UNDO_CONTAINER_REMOVE_MULTIPLE
+{
+ Text = "# Objekte löschen" ;
+ Text [ English ] = "remove # objects" ;
+ Text [ english_us ] = "Delete # objects" ;
+ TEXT[ italian ] = "# Cancella oggetti";
+ TEXT[ portuguese_brazilian ] = "# Objekte löschen";
+ TEXT[ portuguese ] = "Eliminar # objectos";
+ TEXT[ danish ] = "Slet # objekter";
+ TEXT[ french ] = "Supprimer des objets #";
+ TEXT[ swedish ] = "Radera # objekt";
+ TEXT[ dutch ] = "# objecten wissen";
+ TEXT[ spanish ] = "Eliminar # objetos";
+ TEXT[ chinese_simplified ] = "ɾ³ý¶ÔÏó #";
+ TEXT[ russian ] = "Óäàëèòü îáúåêòîâ: #";
+ TEXT[ polish ] = "Usuñ obiekty #";
+ TEXT[ japanese ] = "#µÌÞ¼Þª¸Ä‚ðíœ";
+ TEXT[ chinese_traditional ] = "§R°£ª«¥ó #";
+ TEXT[ greek ] = "ÄéáãñáöÞ áíôéêåéìÝíùí #";
+ TEXT[ korean ] = "# °³Ã¼ »èÁ¦";
+ TEXT[ arabic ] = "ÍÐÝ # ßÇÆäÇÊ";
+ TEXT[ turkish ] = "# nesnelerini sil";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_STR_UNDO_CONTAINER_REPLACE
+{
+ Text = "Ersetzen eines Containerelements" ;
+ Text [ English ] = "Movement of #" ;
+ Text [ english_us ] = "Replace a container element" ;
+ TEXT[ italian ] = "Sostituzione di un elemnto di container";
+ TEXT[ portuguese_brazilian ] = "Ersetzen eines Containerelements";
+ TEXT[ portuguese ] = "Substituir um elemento do contentor";
+ TEXT[ danish ] = "Erstat et containerelement";
+ TEXT[ french ] = "Remplacement d'un élément de container";
+ TEXT[ swedish ] = "Ersättning av ett containerelement";
+ TEXT[ dutch ] = "Vervangen van een containerelement";
+ TEXT[ spanish ] = "Reemplazar un elemento del contenedor.";
+ TEXT[ chinese_simplified ] = "¸üÌæÒ»¸öContainerÌõÄ¿";
+ TEXT[ russian ] = "Çàìåíèòü îäèí êîíòåéíåð-ýëåìåíò";
+ TEXT[ polish ] = "Zamieñ element kontenera";
+ TEXT[ japanese ] = "ºÝÃÅ°—v‘f‚Ì’uŠ·";
+ TEXT[ chinese_traditional ] = "´À¥N¤@­ÓContainer¶µ¥Ø";
+ TEXT[ greek ] = "ÁíôéêáôÜóôáóç åíüò óôïé÷åßïõ ôïõ êéâùôßïõ";
+ TEXT[ korean ] = "ÄÁÅ×ÀÌ³Ê ¿ä¼Ò ´ëü";
+ TEXT[ arabic ] = "ÇÓÊÈÏÇá ÃÍÏ ÚäÇÕÑ ÇáÍÇæíÉ";
+ TEXT[ turkish ] = "Tablo öðesini deðiþtir";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_STR_UNDO_DELETE_LOGICAL
+{
+ Text = "Struktur löschen" ;
+ Text [ English ] = "delete structure" ;
+ Text [ english_us ] = "Delete structure" ;
+ TEXT[ italian ] = "Cancella struttura";
+ TEXT[ portuguese_brazilian ] = "Struktur löschen";
+ TEXT[ portuguese ] = "Eliminar estrutura";
+ TEXT[ danish ] = "Slet struktur";
+ TEXT[ french ] = "Supprimer la structure";
+ TEXT[ swedish ] = "Radera struktur";
+ TEXT[ dutch ] = "Structuur wissen";
+ TEXT[ spanish ] = "Eliminar estructura";
+ TEXT[ chinese_simplified ] = "ɾ³ý½á¹¹";
+ TEXT[ russian ] = "Óäàëèòü ñòðóêòóðó";
+ TEXT[ polish ] = "Usuñ strukturê";
+ TEXT[ japanese ] = "\\‘¢‚Ìíœ";
+ TEXT[ chinese_traditional ] = "§R°£µ²ºc";
+ TEXT[ greek ] = "ÄéáãñáöÞ äïìÞò";
+ TEXT[ korean ] = "±¸Á¶ »èÁ¦";
+ TEXT[ arabic ] = "ÍÐÝ ÇáÈäíÉ";
+ TEXT[ turkish ] = "Yapýyý sil";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_STR_UNDO_TABORDER
+{
+ Text = "Setzen der Aktivierungsreihenfolge" ;
+ Text [ English ] = "Setting of taborder" ;
+ Text [ portuguese ] = "Definir sequência de activação" ;
+ Text [ english_us ] = "Set tab order" ;
+ Text [ portuguese_brazilian ] = "Setzen der Aktivierungsreihenfolge" ;
+ Text [ swedish ] = "Definiera aktiveringsordningsföljden" ;
+ Text [ danish ] = "Definer aktiveringsrækkefølgen" ;
+ Text [ italian ] = "Impostazione della sequenza di attivazione" ;
+ Text [ spanish ] = "Establecer el orden de activación" ;
+ Text [ french ] = "Définir la séquence d'activation" ;
+ Text [ dutch ] = "Bepalen van de activeringsvolgorde" ;
+ Text[ chinese_simplified ] = "É趨˳Ðò";
+ Text[ russian ] = "Óñòàíîâêà ïîðÿäêà àêòèâèðîâàíèÿ";
+ Text[ polish ] = "Ustaw kolejnoϾ aktywacji";
+ Text[ japanese ] = "ÀÌÞµ°ÀÞ°‚ÌÝ’è";
+ Text[ chinese_traditional ] = "³]©w¶¶§Ç";
+ Text[ greek ] = "Ïñéóìüò ôçò äéÜôáîçò åíåñãïðïßçóçò";
+ Text[ korean ] = "ÅÇ ¼ø¼­ ¼³Á¤";
+ Text[ arabic ] = "ÊÚííä ÊÑÊíÈ ÇáÊäÔíØ";
+ Text[ turkish ] = "Etkinleþtirme sýrasýný belirle";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_UNDO_MODEL_REPLACE
+{
+ Text = "Kontrollfeld ersetzen";
+ Text [ english ] = "Replace Control";
+ Text[ english_us ] = "Replace Control";
+ Text[ portuguese ] = "Substituir controlo";
+ Text[ russian ] = "Çàìåíèòü ýëåìåíò óïðàâëåíèÿ";
+ Text[ greek ] = "ÁíôéêáôÜóôáóç ðåäßïõ åëÝã÷ïõ";
+ Text[ dutch ] = "Controleveld vervangen";
+ Text[ french ] = "Remplacer le champ de contrôle";
+ Text[ spanish ] = "Reemplazar campo de control";
+ Text[ italian ] = "Sostituisci il campo di controllo";
+ Text[ danish ] = "Erstat kontrolelement";
+ Text[ swedish ] = "Ersätt kontrollfält";
+ Text[ polish ] = "Zamieniæ pole kontrolne";
+ Text[ portuguese_brazilian ] = "Replace Control";
+ Text[ japanese ] = "ºÝÄÛ°Ų̀°ÙÄÞ‚Ì’uŠ·";
+ Text[ korean ] = "ÄÁÆ®·Ñ ÇÊµå ´ëü";
+ Text[ chinese_simplified ] = "Ìæ»»¿ØÖÆ×Ö¶Î";
+ Text[ chinese_traditional ] = "´À¥N±±¨î¶µ";
+ Text[ arabic ] = "ÇÓÊÈÏÇá ÚäÕÑ ÊÍßã";
+ Text[ turkish ] = "Komut öðelerini deðiþtir";
+};
+String RID_STR_DATE
+{
+ Text = "Datum" ;
+ Text [ English ] = "Date" ;
+ Text [ portuguese ] = "Data " ;
+ Text [ english_us ] = "Date" ;
+ Text [ portuguese_brazilian ] = "\nDatum: " ;
+ Text [ swedish ] = "Datum" ;
+ Text [ danish ] = "Dato" ;
+ Text [ italian ] = "Data" ;
+ Text [ spanish ] = "Fecha" ;
+ Text [ french ] = "Date " ;
+ Text [ dutch ] = "Datum" ;
+ Text[ chinese_simplified ] = "ÈÕÆÚ";
+ Text[ russian ] = "Äàòà";
+ Text[ polish ] = "Data";
+ Text[ japanese ] = "“ú•t";
+ Text[ chinese_traditional ] = "¤é´Á";
+ Text[ greek ] = "Çìåñïìçíßá";
+ Text[ korean ] = "³¯Â¥";
+ Text[ arabic ] = "ÇáÊÇÑíÎ";
+ Text[ turkish ] = "Tarih";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DATEMIN
+{
+ Text = "Min. Datum" ;
+ Text [ English ] = "Date min." ;
+ Text [ portuguese ] = "Data min." ;
+ Text [ english_us ] = "Date min." ;
+ Text [ portuguese_brazilian ] = "Min. Datum" ;
+ Text [ swedish ] = "Min. datum" ;
+ Text [ danish ] = "Min. dato" ;
+ Text [ italian ] = "Data min." ;
+ Text [ spanish ] = "Fecha mín." ;
+ Text [ french ] = "Date min." ;
+ Text [ dutch ] = "Min. datum" ;
+ Text[ chinese_simplified ] = "×î¶ÌµÄÈÕÆÚ";
+ Text[ russian ] = "Ìèí. äàòà";
+ Text[ polish ] = "Min. data";
+ Text[ japanese ] = "Ŭ “ú•t";
+ Text[ chinese_traditional ] = "³Ìµuªº¤é´Á";
+ Text[ greek ] = "Åëá÷. çìåñïìçíßá";
+ Text[ korean ] = "ÃÖ¼Ò ³¯Â¥";
+ Text[ arabic ] = "ÃÏäì ÊÇÑíÎ";
+ Text[ turkish ] = "Tarih (asgari)";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DATEMAX
+{
+ Text = "Max. Datum" ;
+ Text [ English ] = "Date max." ;
+ Text [ portuguese ] = "Data máx." ;
+ Text [ english_us ] = "Date max." ;
+ Text [ portuguese_brazilian ] = "Max. Datum" ;
+ Text [ swedish ] = "Max. datum" ;
+ Text [ danish ] = "Maks. dato" ;
+ Text [ italian ] = "Data max." ;
+ Text [ spanish ] = "Fecha máx." ;
+ Text [ french ] = "Date max." ;
+ Text [ dutch ] = "Max. datum" ;
+ Text[ chinese_simplified ] = "×µÄÈÕÆÚ";
+ Text[ russian ] = "Ìàêñ. äàòà";
+ Text[ polish ] = "Maks. data";
+ Text[ japanese ] = "Å‘å “ú•t";
+ Text[ chinese_traditional ] = "³Ìªøªº¤é´Á";
+ Text[ greek ] = "Ìåã. çìåñïìçíßá";
+ Text[ korean ] = "ÃÖ´ë ³¯Â¥";
+ Text[ arabic ] = "ÃÞÕì ÊÇÑíÎ";
+ Text[ turkish ] = "Tarih (azami)";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DATEFORMAT
+{
+ Text = "Datumsformat" ;
+ Text [ English ] = "Date format" ;
+ Text [ portuguese ] = "Formato da data" ;
+ Text [ english_us ] = "Date format" ;
+ Text [ portuguese_brazilian ] = "Datumsformat" ;
+ Text [ swedish ] = "Datumformat" ;
+ Text [ danish ] = "Datoformat" ;
+ Text [ italian ] = "Formato data" ;
+ Text [ spanish ] = "Formato de fecha" ;
+ Text [ french ] = "Format de date" ;
+ Text [ dutch ] = "Datumsformaat" ;
+ Text[ chinese_simplified ] = "ÈÕÆÚ¸ñʽ";
+ Text[ russian ] = "Ôîðìàò äàííûõ";
+ Text[ polish ] = "Format daty";
+ Text[ japanese ] = "“ú•t‚Ì‘Ž®";
+ Text[ chinese_traditional ] = "¤é´Á®æ¦¡";
+ Text[ greek ] = "ÌïñöÞ çìåñïìçíßáò";
+ Text[ korean ] = "³¯Â¥ ¼­½Ä";
+ Text[ arabic ] = "ÊäÓíÞ ÇáÈíÇäÇÊ";
+ Text[ turkish ] = "Tarih formatý";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DATEFORMAT_LIST
+{
+ Text = "Standard (kurz);Standard (kurz JJ);Standard (kurz JJJJ);Standard (lang);TT.MM.JJ;MM.TT.JJ;JJ.MM.TT;TT.MM.JJJJ;MM.TT.JJJJ;JJJJ.MM.TT;JJ-MM-TT (DIN5008);JJJJ-MM-TT (DIN5008)" ;
+ Text [ English ] = "Standard (short);Standard (short YY);Standard (short YYYY);Standard (long);DD.MM.YY;MM.DD.YY;YY.MM.DD;DD.MM.YYYY;MM.DD.YYYY;YYYY.MM.DD;YY-MM-DD (DIN5008);YYYY-MM-DD (DIN5008)" ;
+ Text [ portuguese ] = "Standard (curto);Standard (curto AA);Standard (curto AAAA);Standard (longo);DD.MM.AA;MM.DD.AA;AA.MM.DD;DD.MM.AAAA;MM.DD.AAAA;AAAA.MM.DD;AA-MM-DD (DIN5008);AAAA-MM-DD (DIN5008)" ;
+ Text [ english_us ] = "Standard (short);Standard (short YY);Standard (short YYYY);Standard (long);DD.MM.YY;MM.DD.YY;YY.MM.DD;DD.MM.YYYY;MM.DD.YYYY;YYYY.MM.DD;YY-MM-DD (DIN5008);YYYY-MM-DD (DIN5008)" ;
+ Text [ portuguese_brazilian ] = "Standard (kurz);Standard (kurz JJ);Standard (kurz JJJJ);Standard (lang);TT.MM.JJ;MM.TT.JJ;JJ.MM.TT;TT.MM.JJJJ;MM.TT.JJJJ;JJJJ.MM.TT;JJ-MM-TT (DIN5008);JJJJ-MM-TT (DIN5008)" ;
+ Text [ swedish ] = "Standard (kort);Standard (kort ÅÅ);Standard (kort ÅÅÅÅ);Standard (lång);DD.MM.ÅÅ;MM.DD.ÅÅ;ÅÅ.MM.DD;DD.MM.ÅÅÅÅ;MM.DD.ÅÅÅÅ;ÅÅÅÅ.MM.DD;ÅÅ-MM-DD (DIN5008);ÅÅÅÅ-MM-DD (DIN5008)" ;
+ Text [ danish ] = "Standard (kort);Standard (kort ÅÅ);Standard (kort ÅÅÅÅ);Standard (lang);DD.MM.ÅÅ;MM.DD.ÅÅ;ÅÅ.MM.DD;DD.MM.ÅÅÅÅ;MM.DD.ÅÅÅÅ;ÅÅÅÅ.MM.DD;ÅÅ-MM-DD (DIN5008);ÅÅÅÅ-MM-DD (DIN5008)" ;
+ Text [ italian ] = "Standard (breve);Standard (breve AA);Standard (breve AAAA);Standard (lungo);GG.MM.AA;MM.GG.AA;AA.MM.GG;GG.MM.AAAA;MM.GG.AAAA;AAAA.MM.GG;AA-MM-GG (DIN5008);AAAA-MM-GG (DIN5008)" ;
+ Text [ spanish ] = "Estándar (breve);Estándar (breve JJ);Estándar (breve JJJJ);Estándar (largo);DD.MM.AA;MM.DD.AA;AA.MM.DD;DD.MM.AAAA;MM.DD.AAAA;AAAA.MM.DD;AA-MM-DD (DIN5008);JJJJ-MM-TT (DIN5008)" ;
+ Text [ french ] = "Standard (court);Standard (court AA);Standard (court AAAA);Standard (long);JJ.MM.AA;MM.JJ.AA;AA.MM.JJ;JJ.MM.AAAA;MM.JJ.AAAA;.AAAAMM.JJ;AA-MM-JJ (DIN5008);AAAA-MM-JJ (DIN5008)" ;
+ Text [ dutch ] = "Standaard (kort);Standaard (kort JJ);Standaard (kort JJJJ);Standaard (lang);TT.MM.JJ;MM.TT.JJ;JJ.MM.TT;TT.MM.JJJJ;MM.TT.JJJJ;JJJJ.MM.TT;JJ-MM-TT;JJJJ-MM-TT" ;
+ Text[ chinese_simplified ] = "±ê×¼(Ëõд);±ê×¼(Ëõд JJ);±ê×¼(Ëõд JJJJ);±ê×¼ (ÍêÕû);DD.MM.YY;MM.DD.YY;YY.MM.DD;DD.MM.YYYY;MM.DD.YYYY;YYYY.MM.DD;YY-MM-DD (DIN5008);YYYY-MM-DD (DIN5008)";
+ Text[ russian ] = "Ñòàíäàðò (êðàòêèé);Ñòàíäàðò (êðàòêèé ÃÃ); (êðàòêèé ÃÃÃÃ);Ñòàíäàðò (ïîëíûé);ÄÄ.MM.ÃÃ;MM.ÄÄ.ÃÃ;ÃÃ.MM.ÄÄ;ÄÄ.ÌÌ.ÃÃÃÃ;ÃÃÃÃ.ÌÌ.ÄÄ;ÃÃ-ÌÌ-ÄÄ (DIN5008);ÃÃÃÃ-MM-ÄÄ (DIN5008)";
+ Text[ polish ] = "Standardowy (krótki);Standardowy (krótki JJ);Standardowy (krótki JJJJ);Standardowy (d³ugi);TT.MM.JJ;MM.TT.JJ;JJ.MM.TT;TT.MM.JJJJ;MM.TT.JJJJ;JJJJ.MM.TT;JJ-MM-TT (DIN5008);JJJJ-MM-TT (DIN5008)";
+ Text[ japanese ] = "•W€(’Z‚¢);•W€(’Z‚¢ YY);•W€(’Z‚¢ YYYY);•W€(’·‚¢j;DD.MM.YY;MM.DD.YY;YY.MM.DD;DD.MM.YYYY;MM.DD.YYYY;YYYY.MM.DD;YY-MM-DD (DIN5008);YYYY-MM-DD (DIN5008)";
+ Text[ chinese_traditional ] = "¼Ð·Ç(ÁY¼g);¼Ð·Ç(ÁY¼g JJ);¼Ð·Ç(ÁY¼g JJJJ);¼Ð·Ç(§¹¾ã);DD.MM.YY;MM.DD.YY;YY.MM.DD;DD.MM.YYYY;MM.DD.YYYY;YYYY.MM.DD;YY-MM-DD (DIN5008);YYYY-MM-DD (DIN5008)";
+ Text[ greek ] = "ÐñïåðéëïãÞ (óýíôïìï);ÐñïåðéëïãÞ (óýíôïìï YY);ÐñïåðéëïãÞ (óýíôïìï YYYY);ÐñïåðéëïãÞ (ìáêñý);DD.MM.YY;MM.DD.YY;YY.MM.DD;DD.MM.YYYY;MM.DD.YYYY;YYYY.MM.DD;YY-MM-DD (DIN5008);YYYY-MM-DD (DIN5008)";
+ Text[ korean ] = "Ç¥ÁØ(ª°Ô);Ç¥ÁØ(ª°ÔYY);Ç¥ÁØ(ª°ÔYYYY);Ç¥ÁØ(±æ°Ô);DD.MM.YY;MM.DD.YY;YY.MM.DD;DD.MM.YYYY;MM.DD.YYYY;YYYY.MM.DD;YY-MM-DD (DIN5008);YYYY-MM-DD (DIN5008)";
+ Text[ arabic ] = "ÞíÇÓí (ÞÕíÑ)ºÞíÇÓí (ÞÕíÑ YY)ºÞíÇÓí (ÞÕíÑ YYY)ºÞíÇÓí (Øæíá)ºDD.MM.YYºMM.DD.YYºYY.MM.DDºDD.MM.YYYYºMM.DD.YYYYºYYYY.MM.DDºYY-MM-DD (DIN5008)ºYYYY-MM-DD (DIN5008)";
+ Text[ turkish ] = "Standart (kýsa);Standart (kýsa YY);Standart (kýsa YYYY);Standart (uzun);GG.AA.YY;AA.GG.YY;YY.AA.GG;GG.AA.YYYY;AA.GG.YYYY;YYYY.AA.GG;YY-AA-GG (DIN5008);YYYY-AA-GG (DIN5008)";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TIME
+{
+ Text = "Zeit" ;
+ Text [ English ] = "Time" ;
+ Text [ portuguese ] = "Horas" ;
+ Text [ english_us ] = "Time" ;
+ Text [ portuguese_brazilian ] = "Zeit" ;
+ Text [ swedish ] = "Tid" ;
+ Text [ danish ] = "Klokkeslæt" ;
+ Text [ italian ] = "Orario" ;
+ Text [ spanish ] = "Hora" ;
+ Text [ french ] = "Heure" ;
+ Text [ dutch ] = "Tijd" ;
+ Text[ chinese_simplified ] = "ʱ¼ä";
+ Text[ russian ] = "Âðåìÿ";
+ Text[ polish ] = "Czas";
+ Text[ japanese ] = "ŽžŠÔ";
+ Text[ chinese_traditional ] = "®É¶¡";
+ Text[ greek ] = "¿ñá";
+ Text[ korean ] = "½Ã°£";
+ Text[ arabic ] = "ÇáæÞÊ";
+ Text[ turkish ] = "Zaman";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TIMEMIN
+{
+ Text = "Min. Zeit" ;
+ Text [ English ] = "Time min." ;
+ Text [ portuguese ] = "min. de horas" ;
+ Text [ english_us ] = "Time min." ;
+ Text [ portuguese_brazilian ] = "Min. Zeit" ;
+ Text [ swedish ] = "Min. tid" ;
+ Text [ danish ] = "Min. klokkeslæt" ;
+ Text [ italian ] = "Tempo min." ;
+ Text [ spanish ] = "Tiempo mín." ;
+ Text [ french ] = "Heure min." ;
+ Text [ dutch ] = "Min. tijd" ;
+ Text[ chinese_simplified ] = "×î¶Ìʱ¼ä";
+ Text[ russian ] = "Ìèí. âðåìÿ";
+ Text[ polish ] = "Min. czas";
+ Text[ japanese ] = "Œ᎞ŠÔ";
+ Text[ chinese_traditional ] = "³Ìµu®É¶¡";
+ Text[ greek ] = "Åëá÷. ÷ñüíïò";
+ Text[ korean ] = "ÃÖ¼Ò ½Ã°£";
+ Text[ arabic ] = "ÃÏäì æÞÊ";
+ Text[ turkish ] = "Zaman (asgari)";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TIMEMAX
+{
+ Text = "Max. Zeit" ;
+ Text [ English ] = "Time max." ;
+ Text [ portuguese ] = "máx. de horas" ;
+ Text [ english_us ] = "Time max." ;
+ Text [ portuguese_brazilian ] = "Max. Zeit" ;
+ Text [ swedish ] = "Max. tid" ;
+ Text [ danish ] = "Maks. klokkeslæt" ;
+ Text [ italian ] = "Tempo max." ;
+ Text [ spanish ] = "Tiempo máx." ;
+ Text [ french ] = "Heure max." ;
+ Text [ dutch ] = "Max.tijd" ;
+ Text[ chinese_simplified ] = "×ʱ¼ä";
+ Text[ russian ] = "Ìàêñ. âðåìÿ";
+ Text[ polish ] = "Maks. czas";
+ Text[ japanese ] = "Å‚ŽžŠÔ";
+ Text[ chinese_traditional ] = "³Ìªø®É¶¡";
+ Text[ greek ] = "Ìåã. ÷ñüíïò";
+ Text[ korean ] = "ÃÖ´ë ½Ã°£";
+ Text[ arabic ] = "ÃÞÕì æÞÊ";
+ Text[ turkish ] = "Saat (azami)";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TIMEFORMAT
+{
+ Text = "Zeitformat" ;
+ Text [ English ] = "Timeformat" ;
+ Text [ portuguese ] = "Formato das horas" ;
+ Text [ english_us ] = "Time Format" ;
+ Text [ portuguese_brazilian ] = "Zeitformat" ;
+ Text [ swedish ] = "Tidsformat" ;
+ Text [ danish ] = "Klokkeslætsformat" ;
+ Text [ italian ] = "Formato orario" ;
+ Text [ spanish ] = "Formato de hora" ;
+ Text [ french ] = "Format d'heure" ;
+ Text [ dutch ] = "Tijdformaat" ;
+ Text[ chinese_simplified ] = "ʱ¼ä¸ñʽ";
+ Text[ russian ] = "Ôîðìàò âðåìåíè";
+ Text[ polish ] = "Format czasu";
+ Text[ japanese ] = "ŽžŠÔ‚Ì‘Ž®";
+ Text[ chinese_traditional ] = "®É¶¡®æ¦¡";
+ Text[ greek ] = "ÌïñöÞ þñáò";
+ Text[ korean ] = "½Ã°£ ¼­½Ä";
+ Text[ arabic ] = "ÊäÓíÞ æÞÊ";
+ Text[ turkish ] = "Zaman formatý";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TIMEFORMAT_LIST
+{
+ Text = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text [ English ] = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text [ portuguese ] = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text [ english_us ] = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text [ portuguese_brazilian ] = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text [ swedish ] = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text [ danish ] = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text [ italian ] = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text [ spanish ] = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text [ french ] = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text [ dutch ] = "13:45;13:45:00;01:45 PM;01:45:00 PM" ;
+ Text[ chinese_simplified ] = "13:45;13:45:00;01:45 ÏÂÎç;01:45:00 ÏÂÎç";
+ Text[ russian ] = "13:45;13:45:00;01:45 PM;01:45:00 PM";
+ Text[ polish ] = "13:45;13:45:00;01:45 PM;01:45:00 PM";
+ Text[ japanese ] = "13:45;13:45:00;01:45 PM;01:45:00 PM";
+ Text[ chinese_traditional ] = "13:45;13:45:00;01:45 ¤U¤È;01:45:00 ¤U¤È";
+ Text[ greek ] = "13:45;13:45:00;01:45 PM;01:45:00 PM";
+ Text[ korean ] = "13:45;13:45:00;01:45 PM;01:45:00 PM";
+ Text[ arabic ] = "{\\rtf1\\ansi\\deff0\\deftab720{\\fonttbl{\\f0\\fnil MS Sans Serif;}{\\f1\\froman\\fcharset2{\\*\\fname Symbol;}MT Symbol;}{\\f2\\fbidi\\fswiss\\fcharset178 MS Sans Serif;}{\\f3\\fswiss MS Sans Serif;}{\\f4\\fbidi\\fswiss\\fcharset178 MS Sans Serif;}}{\\colortbl\\red0\\green0\\blue0;}\\deflang1025\\pard\\rtlpar\\qr\\plain\\ltrch\\lang1031\\f0\\fs16 13:45;13:45:00;01:45\'b7PM;01:45:00\'b7PM\\plain\\ltrch\\lang1031\\f2\\fs16 \\par }";
+ Text[ turkish ] = "13:45;13:45:00;01:45 PM;01:45:00 PM";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_VALUEMIN
+{
+ Text = "Min. Wert" ;
+ Text [ English ] = "Value min." ;
+ Text [ portuguese ] = "Valor min." ;
+ Text [ english_us ] = "Value min." ;
+ Text [ portuguese_brazilian ] = "Min. Wert" ;
+ Text [ swedish ] = "Min. värde" ;
+ Text [ danish ] = "Min. værdi" ;
+ Text [ italian ] = "Valore min." ;
+ Text [ spanish ] = "Valor mín." ;
+ Text [ french ] = "Valeur min." ;
+ Text [ dutch ] = "Min. waarde" ;
+ Text[ chinese_simplified ] = "×îСÊýÖµ";
+ Text[ russian ] = "Ìèí. çíà÷åíèå";
+ Text[ polish ] = "Min. wartoϾ";
+ Text[ japanese ] = "Å’á’l";
+ Text[ chinese_traditional ] = "³Ì¤p¼Æ­È";
+ Text[ greek ] = "ÅëÜ÷éóôç ôéìÞ";
+ Text[ korean ] = "ÃÖ¼Ò°ª";
+ Text[ arabic ] = "ÃÏäì ÞíãÉ";
+ Text[ turkish ] = "Asgari deðer";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_VALUEMAX
+{
+ Text = "Max. Wert" ;
+ Text [ English ] = "Value max." ;
+ Text [ portuguese ] = "Valor máx." ;
+ Text [ english_us ] = "Value max." ;
+ Text [ portuguese_brazilian ] = "Max. Wert" ;
+ Text [ swedish ] = "Max. värde" ;
+ Text [ danish ] = "Maks. værdi" ;
+ Text [ italian ] = "Valore max." ;
+ Text [ spanish ] = "Valor máx." ;
+ Text [ french ] = "Valeur max." ;
+ Text [ dutch ] = "Max. waarde" ;
+ Text[ chinese_simplified ] = "×î´óÊýÖµ";
+ Text[ russian ] = "Ìàêñ. çíà÷åíèå";
+ Text[ polish ] = "Maks. wartoϾ";
+ Text[ japanese ] = "Å‚’l";
+ Text[ chinese_traditional ] = "³Ì¤j¼Æ­È";
+ Text[ greek ] = "ÌÝãéóôç ôéìÞ";
+ Text[ korean ] = "ÃÖ´ë°ª";
+ Text[ arabic ] = "ÃÞÕì ÞíãÉ";
+ Text[ turkish ] = "Azami deðer";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_VALUESTEP
+{
+ Text = "Intervall" ;
+ Text [ English ] = "Value step" ;
+ Text [ portuguese ] = "Intervalo" ;
+ Text [ english_us ] = "Incr./Decrement value" ;
+ Text [ swedish ] = "Intervall" ;
+ Text [ italian ] = "Intervallo" ;
+ Text [ spanish ] = "Intervalo" ;
+ Text [ dutch ] = "Interval" ;
+ Text[ portuguese_brazilian ] = "Differenzwert";
+ Text[ danish ] = "Interval";
+ Text[ french ] = "Intervalle";
+ Text[ chinese_simplified ] = "Çø¼ä";
+ Text[ russian ] = "Çíà÷åíèå âîçðàñòàíèÿ/óáûâàíèÿ";
+ Text[ polish ] = "Przedzia³";
+ Text[ japanese ] = "ŠÔŠu";
+ Text[ chinese_traditional ] = "°Ï¶¡";
+ Text[ greek ] = "ÄéÜóôçìá";
+ Text[ korean ] = "Áõ°¨°ª";
+ Text[ arabic ] = "ÒíÇÏÉ/ÅäÞÇÕ ÇáÞíãÉ";
+ Text[ turkish ] = "Aralýk";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_CURRENCYSYMBOL
+{
+ Text = "Währungssymbol" ;
+ Text [ English ] = "Currencysymbol" ;
+ Text [ portuguese ] = "Símbolo de moeda" ;
+ Text [ english_us ] = "Currency symbol" ;
+ Text [ portuguese_brazilian ] = "Währungssymbol" ;
+ Text [ swedish ] = "Valutasymbol" ;
+ Text [ danish ] = "Valutasymbol" ;
+ Text [ italian ] = "Simbolo valuta" ;
+ Text [ spanish ] = "Símbolo de moneda" ;
+ Text [ french ] = "Symbole monétaire" ;
+ Text [ dutch ] = "Valutasymbool" ;
+ Text[ chinese_simplified ] = "»õ±Òͼ±ê";
+ Text[ russian ] = "Ñèìâîë âàëþòû";
+ Text[ polish ] = "Symbol waluty";
+ Text[ japanese ] = "’ʉݼÝÎÞÙ";
+ Text[ chinese_traditional ] = "³f¹ô¹Ï¥Ü";
+ Text[ greek ] = "Óýìâïëï íïìßóìáôïò";
+ Text[ korean ] = "ÅëÈ­ ±âÈ£";
+ Text[ arabic ] = "ÑãÒ ÇáÚãáÉ";
+ Text[ turkish ] = "Para birimi simgesi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_CURRSYM_POSITION
+{
+ Text = "Symbol voranstellen" ;
+ Text [ English ] = "prepend currency symbol" ;
+ Text[ english_us ] = "Prefix symbol";
+ Text[ portuguese ] = "Colocar símbolo antes do nome";
+ Text[ russian ] = "Óñòàíîâèòü ñíà÷àëà ñèìâîë";
+ Text[ greek ] = "ÔïðïèÝôçóç óõìâüëïõ ìðñïóôÜ";
+ Text[ dutch ] = "Valutateken vooraan";
+ Text[ french ] = "Placer le symbole avant le nombre";
+ Text[ spanish ] = "Situar símbolo delante";
+ Text[ italian ] = "Premetti simbolo";
+ Text[ danish ] = "Placer symbolet foran";
+ Text[ swedish ] = "Placera symbol framför";
+ Text[ polish ] = "Ustaw z przodu symbol";
+ Text[ portuguese_brazilian ] = "prepend currency symbol";
+ Text[ japanese ] = "¼ÝÎÞÙ‚ð‘O‚É’u‚­";
+ Text[ korean ] = "±âÈ£¸¦ ¾Õ¿¡ ºÙÀÓ";
+ Text[ chinese_simplified ] = "Ç°ÖÃͼ±ê";
+ Text[ chinese_traditional ] = "«e¸m¹Ï¥Ü";
+ Text[ arabic ] = "æÖÚ ÇáÑãÒ Ýí ÇáãÞÏãÉ";
+ Text[ turkish ] = "Simge öne ekle";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LIST_N_COMBO_FILLLIST
+{
+ Text = "Der Inhalt eines Kombinations- oder Listenfeldes konnte nicht ermittelt werden.";
+ Text [ ENGLISH ] = "The content of a combo or list box could not be determined.";
+ Text [ english_us ] = "The contents of a combo box or list field could not be determined.";
+ Text[ portuguese ] = "Foi impossível determinar o conteúdo de uma caixa de combinação ou caixa de listagem.";
+ Text[ russian ] = "Îïðåäåëèòü ñîäåðæèìîå ïîëÿ ñî ñïèñêîì èëè ïîëÿ ñïèñêà íå óäàåòñÿ.";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá ðñïóäéïñéóôåß ôï ðåñéå÷üìåíï åíüò ðåäßïõ óõíäõáóìïý Þ ìéáò ëßóôáò.";
+ Text[ dutch ] = "Combinatieveld/Keuzelijst: de inhoud kon niet worden weergegeven";
+ Text[ french ] = "Impossible de déterminer le contenu de la zone combinée/zone de liste.";
+ Text[ spanish ] = "No se pudo determinar el contenido de un campo combinado o un listado.";
+ Text[ italian ] = "Non è stato possibile determinare il contenuto di una casella combinata o di una casella di riepilogo.";
+ Text[ danish ] = "Det var ikke muligt at bestemme indholdet for en kombinationsboks eller rulleliste.";
+ Text[ swedish ] = "Innehållet i ett kombinationsfält eller en listruta kunde inte bestämmas.";
+ Text[ polish ] = "Nie mo¿na by³o ustaliæ zawartoœci pola kombi lub pola listy.";
+ Text[ portuguese_brazilian ] = "ComboBox/ListBox : determine the list contents";
+ Text[ japanese ] = "ºÝÎÞÎÞ¯¸½‚Ü‚½‚ÍؽÄÎÞ¯¸½‚Ì“à—e‚ªŠm‚ß‚ç‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ korean ] = "ÄÞº¸¹Ú½º³ª ¸ñ·ÏÇʵåÀÇ ³»¿ëÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨È·¶¨×éºÏ¿ò»òÕßÁбí¿òÄÚµÄÄÚÈÝ¡£";
+ Text[ chinese_traditional ] = "µLªk±q¸ê®Æ®w¤º´ú©w²Õ¦X¤è¶ô©Î²M³æ¤è¶ôªº¤º®e";
+ Text[ arabic ] = "ÊÚÐÑ ÇáÊÚÑÝ Úáì ãÍÊæíÇÊ ãÑÈÚ ÊÍÑíÑ æÓÑÏ Ãæ ãÑÈÚ ÞÇÆãÉ.";
+ Text[ turkish ] = "Kombinasyon alanýnýn ya da liste alanýnýn içeriði belirlenemedi.";
+};
+String RID_STR_EDITMASK
+{
+ Text = "Eingabemaske" ;
+ Text [ English ] = "Editmask" ;
+ Text [ portuguese ] = "Editar máscara" ;
+ Text [ english_us ] = "Edit mask" ;
+ Text [ portuguese_brazilian ] = "Eingabemaske" ;
+ Text [ swedish ] = "Inmatningsmask" ;
+ Text [ danish ] = "Redigeringsmaske" ;
+ Text [ italian ] = "Maschera di digitazione" ;
+ Text [ spanish ] = "Máscara de entrada" ;
+ Text [ french ] = "Masque de saisie" ;
+ Text [ dutch ] = "Invoervenster" ;
+ Text[ chinese_simplified ] = "±à¼­ÑÚÂë";
+ Text[ russian ] = "Ìàñêà ââîäà";
+ Text[ polish ] = "Maska wprowadzania";
+ Text[ japanese ] = "“ü—ÍϽ¸";
+ Text[ chinese_traditional ] = "½s¿è±»½X";
+ Text[ greek ] = "ÌÜóêá åéóáãùãÞò";
+ Text[ korean ] = "ÀÔ·Â ¸¶½ºÅ©";
+ Text[ arabic ] = "ÞäÇÚ ÇáÅÏÎÇá";
+ Text[ turkish ] = "Giriþ ekraný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LITERALMASK
+{
+ Text = "Zeichenmaske" ;
+ Text [ English ] = "Literal mask" ;
+ Text [ portuguese ] = "Máscara de caracteres" ;
+ Text [ english_us ] = "Literal mask" ;
+ Text [ portuguese_brazilian ] = "Zeichenmaske" ;
+ Text [ swedish ] = "Teckenmask" ;
+ Text [ danish ] = "Tegnmaske" ;
+ Text [ italian ] = "Maschera caratteri" ;
+ Text [ spanish ] = "Máscara de caracteres" ;
+ Text [ french ] = "Masque de caractères" ;
+ Text [ dutch ] = "Tekenmasker" ;
+ Text[ chinese_simplified ] = "×Ö·ûÑÚÂë";
+ Text[ russian ] = "Ìàñêà çíàêîâ";
+ Text[ polish ] = "Maska znaków";
+ Text[ japanese ] = "•¶ŽšÏ½¸";
+ Text[ chinese_traditional ] = "¦r¤¸±»½X";
+ Text[ greek ] = "ÌÜóêá ÷áñáêôÞñùí";
+ Text[ korean ] = "±âÈ£ ¸¶½ºÅ©";
+ Text[ arabic ] = "ÞäÇÚ ÇáÃÍÑÝ";
+ Text[ turkish ] = "Karakter ekraný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ENABLED
+{
+ Text = "Aktiviert" ;
+ Text [ English ] = "Enabled" ;
+ Text [ portuguese ] = "Activado" ;
+ Text [ english_us ] = "Enabled" ;
+ Text [ portuguese_brazilian ] = "Aktiviert" ;
+ Text [ swedish ] = "Aktiverad" ;
+ Text [ danish ] = "Aktiveret" ;
+ Text [ italian ] = "Abilitato" ;
+ Text [ spanish ] = "Activado" ;
+ Text [ french ] = "Activé" ;
+ Text [ dutch ] = "Geactiveerd" ;
+ Text[ chinese_simplified ] = "¼¤»îµÄ";
+ Text[ russian ] = "Àêòèâèðîâàíî";
+ Text[ polish ] = "Uaktywniony";
+ Text[ japanese ] = "±¸Ã¨ÌÞ‚É‚·‚é";
+ Text[ chinese_traditional ] = "¿E¬¡ªº";
+ Text[ greek ] = "ÅíåñãïðïéçìÝíï";
+ Text[ korean ] = "È°¼º »óÅÂ";
+ Text[ arabic ] = "äÔØ";
+ Text[ turkish ] = "Etkinleþtirildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_AUTOCOMPLETE
+{
+ Text = "Automatisch füllen" ;
+ Text [ English ] = "Autocomplete" ;
+ Text [ portuguese ] = "AutoPreenchimento" ;
+ Text [ english_us ] = "AutoFill" ;
+ Text [ portuguese_brazilian ] = "Automatisch füllen" ;
+ Text [ swedish ] = "Automatisk fyllning" ;
+ Text [ danish ] = "Fyld automatisk" ;
+ Text [ italian ] = "Riempi automaticamente" ;
+ Text [ spanish ] = "Rellenar automáticamente" ;
+ Text [ french ] = "AutoSaisie" ;
+ Text [ dutch ] = "Automatisch vullen" ;
+ Text[ chinese_simplified ] = "×Ô¶¯Íê³É";
+ Text[ russian ] = "Àâòîââîä";
+ Text[ polish ] = "Autowype³nianie";
+ Text[ japanese ] = "Ž©“®“ü—Í";
+ Text[ chinese_traditional ] = "¦Û°Ê§¹¦¨";
+ Text[ greek ] = "Áõôüìáôï ãÝìéóìá";
+ Text[ korean ] = "ÀÚµ¿ ä¿ì±â";
+ Text[ arabic ] = "ÊÚÈÆÉ ÊáÞÇÆíÉ";
+ Text[ turkish ] = "Otomatik olarak tamamla";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_LINECOUNT
+{
+ Text = "Anzahl der Zeilen" ;
+ Text [ English ] = "Linecount" ;
+ Text [ portuguese ] = "Contar linhas" ;
+ Text [ english_us ] = "Line count" ;
+ Text [ portuguese_brazilian ] = "Anzahl der Zeilen" ;
+ Text [ swedish ] = "Antal rader" ;
+ Text [ danish ] = "Antal rækker" ;
+ Text [ italian ] = "Numero delle righe" ;
+ Text [ spanish ] = "Número de líneas" ;
+ Text [ french ] = "Nombre de lignes" ;
+ Text [ dutch ] = "Aantal regels" ;
+ Text[ chinese_simplified ] = "ÐÐÊý";
+ Text[ russian ] = "Êîëè÷åñòâî ñòðîê";
+ Text[ polish ] = "Liczba linii";
+ Text[ japanese ] = "s”";
+ Text[ chinese_traditional ] = "¦æ¼Æ";
+ Text[ greek ] = "Áñéèìüò ãñáììþí";
+ Text[ korean ] = "ÁÙÀÇ ¼ö";
+ Text[ arabic ] = "ÚÏÏ ÇáÃÓØÑ";
+ Text[ turkish ] = "Satýr sayýsý";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_MAXTEXTLEN
+{
+ Text = "Max. Textlänge" ;
+ Text [ English ] = "Max. textlength" ;
+ Text [ portuguese ] = "Comprimento máx. do texto" ;
+ Text [ english_us ] = "Max. text length" ;
+ Text [ portuguese_brazilian ] = "Max. Textlänge" ;
+ Text [ swedish ] = "Max. textlängd" ;
+ Text [ danish ] = "Maks. tekstlængde" ;
+ Text [ italian ] = "Lunghezza testo max." ;
+ Text [ spanish ] = "Longitud máx. del texto" ;
+ Text [ french ] = "Longueur de texte max." ;
+ Text [ dutch ] = "Max. tekstlengte" ;
+ Text[ chinese_simplified ] = "×µÄÎÄ×Ö";
+ Text[ russian ] = "Ìàêñ. äëèíà òåêñòà";
+ Text[ polish ] = "Maks. d³ugoœæ tekstu";
+ Text[ japanese ] = "Å‚‚Ì÷½Ä‚Ì’·‚³";
+ Text[ chinese_traditional ] = "³Ìªøªº¤å¦r";
+ Text[ greek ] = "ÌÝãéóôï ìÞêïò êåéìÝíïõ";
+ Text[ korean ] = "ÃÖ´ë ÅؽºÆ® ±æÀÌ";
+ Text[ arabic ] = "ÇáØæá ÇáÃÞÕì ááäÕ";
+ Text[ turkish ] = "Azami metin uzunluðu";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SPIN
+{
+ Text = "Drehfeld" ;
+ Text [ English ] = "Spinbutton" ;
+ Text [ portuguese ] = "Botão de rotação" ;
+ Text [ english_us ] = "Spin Button" ;
+ Text [ portuguese_brazilian ] = "Drehfeld" ;
+ Text [ swedish ] = "Rotationsknapp" ;
+ Text [ danish ] = "Rulleknap" ;
+ Text [ italian ] = "Pulsante di selezione" ;
+ Text [ spanish ] = "Botón giratorio" ;
+ Text [ french ] = "Compteur" ;
+ Text [ dutch ] = "Draaiveld" ;
+ Text[ chinese_simplified ] = "Ñ¡Öµ¿ò";
+ Text[ language_user1 ] = " ";
+ Text[ russian ] = "Ñ÷åò÷èê";
+ Text[ polish ] = "Pole obrotu";
+ Text[ japanese ] = "½ËßÝÎÞÀÝ";
+ Text[ chinese_traditional ] = "½Õ¸`¤è¶ô";
+ Text[ greek ] = "Ðåäßï ðåñéóôñïöÞò";
+ Text[ korean ] = "ȸÀü Çʵå";
+ Text[ arabic ] = "ÒÑ ÒíÇÏÉ æäÞÕÇä";
+ Text[ turkish ] = "Deðer kutusu";
+};
+String RID_STR_STRICTFORMAT
+{
+ Text = "Formatüberprüfung" ;
+ Text [ English ] = "Strict format" ;
+ Text [ portuguese ] = "Controlar formato" ;
+ Text [ english_us ] = "Strict format" ;
+ Text [ portuguese_brazilian ] = "Formatüberprüfung" ;
+ Text [ swedish ] = "Formatkontroll" ;
+ Text [ danish ] = "Formatkontrol" ;
+ Text [ italian ] = "Controllo formato" ;
+ Text [ spanish ] = "Control de formato" ;
+ Text [ french ] = "Vérification de format" ;
+ Text [ dutch ] = "Formaatcontrole" ;
+ Text[ chinese_simplified ] = "¼ì²é¸ñʽ";
+ Text[ russian ] = "Ïðîâåðêà ôîðìàòà";
+ Text[ polish ] = "Sprawdzenie formatu";
+ Text[ japanese ] = "‘Ž®‚ÌÁª¯¸";
+ Text[ chinese_traditional ] = "Àˬd®æ¦¡";
+ Text[ greek ] = "¸ëåã÷ïò ìïñöÞò";
+ Text[ korean ] = "¼­½Ä °Ë»ç";
+ Text[ arabic ] = "ÝÍÕ ÇáÊäÓíÞ";
+ Text[ turkish ] = "Format denetimi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_SHOWTHOUSANDSEP
+{
+ Text = "Tausender-Trennz." ;
+ Text [ English ] = "Show thousandsep." ;
+ Text [ portuguese ] = "Separador de milhares" ;
+ Text [ english_us ] = "Thousands Separator" ;
+ Text [ portuguese_brazilian ] = "Tausender-Trennz." ;
+ Text [ swedish ] = "Tusentalsavgränsare" ;
+ Text [ danish ] = "Tusindtalsseparator" ;
+ Text [ italian ] = "Car. di separz. migliaia" ;
+ Text [ spanish ] = "Delimitador decimal" ;
+ Text [ french ] = "Séparateur de milliers" ;
+ Text [ dutch ] = "Scheidingsteken voor duizendtallen" ;
+ Text[ chinese_simplified ] = "ǧλ·Ö¸ô·û";
+ Text[ russian ] = "Ðàçäåëèòåëü ãðóïï ðàçðÿäîâ";
+ Text[ polish ] = "Separator tysiêczny";
+ Text[ japanese ] = "ç’PˆÊ¾ÊßÚ°À";
+ Text[ chinese_traditional ] = "¤d¦ì¤À¹j²Å";
+ Text[ greek ] = "Äéá÷ùñéóôéêü ÷éëßùí";
+ Text[ korean ] = "õ´ÜÀ§ ±¸ºÐ±âÈ£";
+ Text[ arabic ] = "ÚáÇãÉ ÝÕá ÇáÃáæÝ";
+ Text[ turkish ] = "Binlik ayýrma iþareti";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_HARDLINEBREAKS
+{
+ Text = "Harter Zeilenumbruch" ;
+ Text [ English ] = "Hard line breaks" ;
+ Text [ portuguese ] = "Quebra de linha dura" ;
+ Text [ english_us ] = "Hard line break" ;
+ Text [ portuguese_brazilian ] = "Harter Zeilenumbruch" ;
+ Text [ swedish ] = "Hård radbrytning" ;
+ Text [ danish ] = "Hårdt linjeskift" ;
+ Text [ italian ] = "Interruzione di riga fissa" ;
+ Text [ spanish ] = "Salto de línea rígido" ;
+ Text [ french ] = "Renvoi à la ligne forcé" ;
+ Text [ dutch ] = "Vast regeleinde" ;
+ Text[ chinese_simplified ] = "ÊÖ¹¤·ÖÐзû";
+ Text[ russian ] = "Æåñòêèé ðàçðûâ ñòðîêè";
+ Text[ polish ] = "Twardy podzia³ wiersza";
+ Text[ japanese ] = "‰üs";
+ Text[ chinese_traditional ] = "¤â¤u¤À¦æ²Å";
+ Text[ greek ] = "¸íôïíç áëëáãÞ ãñáììÞò";
+ Text[ korean ] = "°íÁ¤ Áٹٲٱâ";
+ Text[ arabic ] = "ÝÇÕá ÃÓØÑ íÏæí";
+ Text[ turkish ] = "Kullanýcý tanýmlý satýr sonu";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PRINTABLE
+{
+ Text = "Drucken" ;
+ Text [ English ] = "Printable" ;
+ Text [ portuguese ] = "Imprimir" ;
+ Text [ english_us ] = "Print" ;
+ Text [ portuguese_brazilian ] = "Drucken" ;
+ Text [ swedish ] = "Skriv ut" ;
+ Text [ danish ] = "Udskriv" ;
+ Text [ italian ] = "Stampa" ;
+ Text [ spanish ] = "Imprimir" ;
+ Text [ french ] = "Imprimer" ;
+ Text [ dutch ] = "Afdrukken" ;
+ Text[ chinese_simplified ] = "´òÓ¡";
+ Text[ russian ] = "Ïå÷àòü";
+ Text[ polish ] = "Drukuj";
+ Text[ japanese ] = "ˆóü";
+ Text[ chinese_traditional ] = "¦C¦L";
+ Text[ greek ] = "Åêôýðùóç";
+ Text[ korean ] = "Àμâ";
+ Text[ arabic ] = "ØÈÇÚÉ";
+ Text[ turkish ] = "Yazdýr";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TARGET_URL
+{
+ Text = "URL" ;
+ Text [ English ] = "URL" ;
+ Text [ portuguese ] = "URL" ;
+ Text [ english_us ] = "URL" ;
+ Text [ portuguese_brazilian ] = "URL" ;
+ Text [ swedish ] = "URL" ;
+ Text [ danish ] = "URL" ;
+ Text [ italian ] = "URL" ;
+ Text [ spanish ] = "URL" ;
+ Text [ french ] = "URL" ;
+ Text [ dutch ] = "URL" ;
+ Text[ chinese_simplified ] = "URL";
+ Text[ russian ] = "URL";
+ Text[ polish ] = "URL";
+ Text[ japanese ] = "URL";
+ Text[ chinese_traditional ] = "URL";
+ Text[ greek ] = "URL";
+ Text[ korean ] = "URL";
+ Text[ arabic ] = "URL";
+ Text[ turkish ] = "URL";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TARGET_FRAME
+{
+ Text = "Frame" ;
+ Text [ English ] = "TargetFrame" ;
+ Text [ portuguese ] = "Moldura" ;
+ Text [ english_us ] = "Target Frame" ;
+ Text [ portuguese_brazilian ] = "Frame" ;
+ Text [ swedish ] = "Ram" ;
+ Text [ danish ] = "Frame" ;
+ Text [ italian ] = "Frame" ;
+ Text [ spanish ] = "Frame" ;
+ Text [ french ] = "Frame" ;
+ Text [ dutch ] = "Frame" ;
+ Text[ chinese_simplified ] = "¿ò¶ÔÏó";
+ Text[ russian ] = "Êàäð";
+ Text[ polish ] = "Frame";
+ Text[ japanese ] = "ÌÚ°Ñ";
+ Text[ chinese_traditional ] = "°T®Ø";
+ Text[ greek ] = "Ðëáßóéï";
+ Text[ korean ] = "ÇÁ·¹ÀÓ";
+ Text[ arabic ] = "Frame";
+ Text[ turkish ] = "Frame";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_IMPORT_GRAPHIC
+{
+ Text = "Grafik einfügen" ;
+ Text [ English ] = "Insert graphic" ;
+ Text [ portuguese ] = "Inserir imagem" ;
+ Text [ english_us ] = "Insert graphics" ;
+ Text [ portuguese_brazilian ] = "Grafik einfügen" ;
+ Text [ swedish ] = "Infoga grafik" ;
+ Text [ danish ] = "Indsæt billede" ;
+ Text [ italian ] = "Inserisci immagine" ;
+ Text [ spanish ] = "Insertar imagen" ;
+ Text [ french ] = "Insérer une image" ;
+ Text [ dutch ] = "Afbeelding invoegen" ;
+ Text[ chinese_simplified ] = "²åÈëͼÐÎ";
+ Text[ russian ] = "Âñòàâèòü ðèñóíîê";
+ Text[ polish ] = "Wstaw grafikê";
+ Text[ japanese ] = "}‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤J¹Ï¤ù";
+ Text[ greek ] = "ÅéóáãùãÞ ãñáöéêïý";
+ Text[ korean ] = "±×·¡ÇÈ »ðÀÔ";
+ Text[ arabic ] = "ÅÏÑÇÌ ÑÓãÉ";
+ Text[ turkish ] = "Grafik ekle";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TAG
+{
+ Text = "Zusatzinformation" ;
+ Text [ English ] = "Tag" ;
+ Text [ portuguese ] = "Informação adicional" ;
+ Text [ english_us ] = "Additonal Information" ;
+ Text [ portuguese_brazilian ] = "Zusatzinformation" ;
+ Text [ swedish ] = "Ytterligare information" ;
+ Text [ danish ] = "Yderligere information" ;
+ Text [ italian ] = "Informazione aggiuntiva" ;
+ Text [ spanish ] = "Información adicional" ;
+ Text [ french ] = "Complément d'information" ;
+ Text [ dutch ] = "Verdere informatie" ;
+ Text[ chinese_simplified ] = "¸½¼ÓÐÅÏ¢";
+ Text[ russian ] = "Äîïîëíèòåëüíàÿ èíôîðìàöèÿ";
+ Text[ polish ] = "Dodatkowa informacja";
+ Text[ japanese ] = "’ljÁî•ñ";
+ Text[ chinese_traditional ] = "ªþ¥[¸ê°T";
+ Text[ greek ] = "Ðñüóèåôåò ðëçñïöïñßåò";
+ Text[ korean ] = "Ãß°¡ Á¤º¸";
+ Text[ arabic ] = "ãÚáæãÇÊ ÅÖÇÝíÉ";
+ Text[ turkish ] = "Ek bilgi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_ECHO_CHAR
+{
+ Text = "Zeichen für Passwörter" ;
+ Text [ English ] = "Password char" ;
+ Text [ portuguese ] = "Caracteres para senhas" ;
+ Text [ english_us ] = "Password characters" ;
+ Text [ portuguese_brazilian ] = "Zeichen für Passwörter" ;
+ Text [ swedish ] = "Tecken för lösenord" ;
+ Text [ danish ] = "Tegn til adgangskoder" ;
+ Text [ italian ] = "Caratteri per le password" ;
+ Text [ spanish ] = "Caracteres para contraseñas" ;
+ Text [ french ] = "Caractères de mots de passe" ;
+ Text [ dutch ] = "Teken voor wachtwoorden" ;
+ Text[ chinese_simplified ] = "¿ÚÁî×Ö·û";
+ Text[ russian ] = "Çíàêè äëÿ ïàðîëÿ";
+ Text[ polish ] = "Znaki dla hase³";
+ Text[ japanese ] = "Ê߽ܰÄÞ—p‚Ì•¶Žš";
+ Text[ chinese_traditional ] = "±K½X¦r¤¸";
+ Text[ greek ] = "×áñáêôÞñåò ãéá êùäéêïýò ðñüóâáóçò";
+ Text[ korean ] = "Æнº¿öµå¿ë ¹®ÀÚ";
+ Text[ arabic ] = "ÃÍÑÝ ßáãÇÊ ÇáÓÑ";
+ Text[ turkish ] = "Þifre karakterleri";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EMPTY_IS_NULL
+{
+ Text = "Leere Zeichenfolge ist NULL" ;
+ Text [ English ] = "Empty string is NULL" ;
+ Text [ portuguese ] = "Espaço vazio é ZERO" ;
+ Text [ english_us ] = "Empty string is NULL" ;
+ Text [ swedish ] = "Tom teckensträng är NOLL" ;
+ Text [ italian ] = "Lo string vuoto è ZERO" ;
+ Text [ spanish ] = "Serie de caracteres vacía es NULL" ;
+ Text [ french ] = "Espace vide égale NULL" ;
+ Text [ dutch ] = "Opvullen met NUL" ;
+ Text[ portuguese_brazilian ] = "Leerzeichen ist NULL";
+ Text[ danish ] = "Tom streng er NULL";
+ Text[ chinese_simplified ] = "¿Õ°××Ö·ûÊÇ NULL";
+ Text[ russian ] = "Ïóñòàÿ ñòðîêà - ÍÓËÜ";
+ Text[ polish ] = "Pusty ci¹g znaków jest ZEREM";
+ Text[ japanese ] = "‹ó”’‚Ì•¶Žš—ñ‚;ÞÛ";
+ Text[ chinese_traditional ] = "ªÅ¥Õ¦r¤¸¬O NULL";
+ Text[ greek ] = "ÊåíÞ áêïëïõèßá ÷áñáêôÞñùí åßíáé NULL (ÌÇÄÅÍ)";
+ Text[ korean ] = "ºñ¾î ÀÖ´Â ¹®ÀÚ¿­Àº NULLÀÓ";
+ Text[ arabic ] = "ÓáÓáÉ ÇáÃÍÑÝ ÇáÝÇÑÛÉ ÊÚÊÈÑ NULL";
+ Text[ turkish ] = "Boþ karakter dizilimi SIFIR";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DECIMAL_ACCURACY
+{
+ Text = "Nachkommastellen" ;
+ Text [ English ] = "Decimal accuracy" ;
+ Text [ portuguese ] = "Casas decimais" ;
+ Text [ english_us ] = "Decimal accuracy" ;
+ Text [ portuguese_brazilian ] = "Nachkommastellen" ;
+ Text [ swedish ] = "Decimalpositioner" ;
+ Text [ danish ] = "Antal decimaler" ;
+ Text [ italian ] = "Posizioni decimali" ;
+ Text [ spanish ] = "Decimales" ;
+ Text [ french ] = "Décimales" ;
+ Text [ dutch ] = "Plaatsen achter de komma" ;
+ Text[ chinese_simplified ] = "СÊýµã";
+ Text[ russian ] = "Äðîáíàÿ ÷àñòü";
+ Text[ polish ] = "Miejsca po przecinku";
+ Text[ japanese ] = "¬”“_ˆÈ‰º‚ÌŒ…";
+ Text[ chinese_traditional ] = "¤p¼ÆÂI";
+ Text[ greek ] = "ÄåêáäéêÜ øçößá";
+ Text[ korean ] = "¼Ò¼öÁ¡ ÀÌÇÏ ÀÚ¸®";
+ Text[ arabic ] = "ÇáãäÇÒá ÇáÚÔÑíÉ";
+ Text[ turkish ] = "Virgül sonrasý haneler";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DATE_SHOW_CENTURY
+{
+ Text = "Jahrhundert zeigen" ;
+ Text [ English ] = "Show Century" ;
+ Text [ portuguese ] = "Mostrar século" ;
+ Text [ english_us ] = "Show Century" ;
+ Text [ portuguese_brazilian ] = "Jahrhundert zeigen" ;
+ Text [ swedish ] = "Visa århundrade" ;
+ Text [ danish ] = "Vis århundrede" ;
+ Text [ italian ] = "Mostra secolo" ;
+ Text [ spanish ] = "Mostrar siglo" ;
+ Text [ french ] = "Afficher le siècle" ;
+ Text [ dutch ] = "Eeuw weergeven" ;
+ Text[ chinese_simplified ] = "4 λÄê·Ý";
+ Text[ russian ] = "Ïîêàçàòü âåê";
+ Text[ polish ] = "Poka¿ stulecie";
+ Text[ japanese ] = "•S”N‚ð•\\Ž¦";
+ Text[ chinese_traditional ] = "4 ¦ì¦~¥÷";
+ Text[ greek ] = "ÅìöÜíéóç áéþíá";
+ Text[ korean ] = "¼¼±â Ç¥½Ã";
+ Text[ arabic ] = "ÅÙåÇÑ ÇáÞÑä";
+ Text[ turkish ] = "Yüzyýlý görüntüle";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_DEFAULT_BUTTON
+{
+ Text = "Standardschaltfläche" ;
+ Text [ English ] = "Default button" ;
+ Text [ portuguese ] = "Botão padrão" ;
+ Text [ english_us ] = "Default button" ;
+ Text [ portuguese_brazilian ] = "Standard-Schaltfläche" ;
+ Text [ swedish ] = "Standardknapp" ;
+ Text [ danish ] = "Standardknap" ;
+ Text [ italian ] = "Pulsante standard" ;
+ Text [ spanish ] = "Botón predeterminado" ;
+ Text [ french ] = "Bouton par défaut" ;
+ Text [ dutch ] = "Standaardknop" ;
+ Text[ chinese_simplified ] = "±ê×¼°´Å¥";
+ Text[ russian ] = "Ñòàíäàðòíàÿ êíîïêà";
+ Text[ polish ] = "Przycisk domyœlny";
+ Text[ japanese ] = "•W€ÎÞÀÝ";
+ Text[ chinese_traditional ] = "¼Ð·Ç«ö¶s";
+ Text[ greek ] = "ÐñïåðéëåãìÝíï ðåäßï åíôïëÞò";
+ Text[ korean ] = "±âº» ¹öÆ°";
+ Text[ arabic ] = "ãÝÊÇÍ ÇÝÊÑÇÖí";
+ Text[ turkish ] = "Standart düðme";
+ Text[ language_user1 ] = " ";
+};
+ // Events
+String RID_STR_EVT_APPROVEPARAMETER
+{
+ Text = "Parameter füllen" ;
+ Text [ English ] = "Fill parameters" ;
+ Text [ english_us ] = "Fill parameters" ;
+ Text[ portuguese ] = "Preencher parâmetros";
+ Text[ russian ] = "Çàïîëíèòü ïàðàìåòðû";
+ Text[ greek ] = "ÐáñÜìåôñïé ãåìßóìáôïò";
+ Text[ dutch ] = "Parameter vullen";
+ Text[ french ] = "Remplir les paramètres";
+ Text[ spanish ] = "Rellenar parámetros";
+ Text[ italian ] = "Compila parametri";
+ Text[ danish ] = "Fyld parametre";
+ Text[ swedish ] = "Fyll parametrar";
+ Text[ polish ] = "Wype³nij parametry";
+ Text[ portuguese_brazilian ] = "Fill parameters";
+ Text[ japanese ] = "Êß×Ò°À‚Ì‘}“ü";
+ Text[ korean ] = "ÆĶó¹ÌÅÍ Ã¤¿ì±â";
+ Text[ chinese_simplified ] = "ÌîÈë²ÎÊý";
+ Text[ chinese_traditional ] = "¶ñ¤J§UÅܶq";
+ Text[ arabic ] = "ÊÚÈÆÉ ÇáãÚáãÇÊ";
+ Text[ turkish ] = "Parametreleri doldur";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_EVT_ACTIONPERFORMED
+{
+ Text = "Beim Auslösen" ;
+ Text [ English ] = "on click" ;
+ Text [ portuguese ] = "Ao iniciar" ;
+ Text [ english_us ] = "When initiating" ;
+ Text [ portuguese_brazilian ] = "Aktion ausgelöst" ;
+ Text [ swedish ] = "Vid utförande" ;
+ Text [ danish ] = "Under udførelse" ;
+ Text [ italian ] = "Durante l'esecuzione" ;
+ Text [ spanish ] = "Al ejecutar" ;
+ Text [ french ] = "Lors du déclenchement" ;
+ Text [ dutch ] = "Bij het oproepen" ;
+ Text[ chinese_simplified ] = "ÔÚÖ´ÐвÙ×÷ʱ";
+ Text[ russian ] = "Âî âðåìÿ âûïîëíåíèÿ";
+ Text[ polish ] = "Podczas wykonywania";
+ Text[ japanese ] = "ì“®‚ÌÛ";
+ Text[ chinese_traditional ] = "¦b¾Þ§@®É";
+ Text[ greek ] = "ÊáôÜ ôçí åêôÝëåóç";
+ Text[ korean ] = "½ÇÇàÇÒ ¶§";
+ Text[ arabic ] = "ÚäÏ ÇáÊäÝíÐ";
+ Text[ turkish ] = "Baþlatma sýrasýnda";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_AFTERDELETE
+{
+ Text = "Nach dem Löschen" ;
+ Text [ English ] = "After delete" ;
+ Text [ portuguese ] = "Depois de eliminar" ;
+ Text [ english_us ] = "After deleting" ;
+ Text [ portuguese_brazilian ] = "Nach dem Löschen" ;
+ Text [ swedish ] = "Efter radering" ;
+ Text [ danish ] = "Efter sletning" ;
+ Text [ italian ] = "Ad eliminazione avvenuta" ;
+ Text [ spanish ] = "Después de eliminar" ;
+ Text [ french ] = "Après la suppression" ;
+ Text [ dutch ] = "Na het wissen" ;
+ Text[ chinese_simplified ] = "ɾ³ýÖ®ºó";
+ Text[ russian ] = "Ïîñëå óäàëåíèÿ";
+ Text[ polish ] = "Po usuniêciu";
+ Text[ japanese ] = "휂̌ã";
+ Text[ chinese_traditional ] = "§R°£¤§«á";
+ Text[ greek ] = "ÌåôÜ ôç äéáãñáöÞ";
+ Text[ korean ] = "»èÁ¦ÇÑ ÈÄ";
+ Text[ arabic ] = "ÈÚÏ ÇáÍÐÝ";
+ Text[ turkish ] = "Silmeden sonra";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_AFTERINSERT
+{
+ Text = "Nach dem Einfügen" ;
+ Text [ English ] = "After insert" ;
+ Text [ portuguese ] = "Depois de inserir" ;
+ Text [ english_us ] = "After insert" ;
+ Text [ portuguese_brazilian ] = "Nach dem Einfügen" ;
+ Text [ swedish ] = "Efter infoga" ;
+ Text [ danish ] = "Efter indsæt" ;
+ Text [ italian ] = "Ad inserimento avvenuto" ;
+ Text [ spanish ] = "Después de insertar" ;
+ Text [ french ] = "Après l'insertion" ;
+ Text [ dutch ] = "Na het invoegen" ;
+ Text[ chinese_simplified ] = "²åÈëÖ®ºó";
+ Text[ russian ] = "Ïîñëå âñòàâêè";
+ Text[ polish ] = "Po wstawieniu";
+ Text[ japanese ] = "‘}“ü‚ÌŒã";
+ Text[ chinese_traditional ] = "´¡¤J¤§«á";
+ Text[ greek ] = "ÌåôÜ áðü ôçí åéóáãùãÞ";
+ Text[ korean ] = "»ðÀÔÇÑ ÈÄ";
+ Text[ arabic ] = "ÈÚÏ ÇáÅÏÑÇÌ";
+ Text[ turkish ] = "Eklemeden sonra";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_AFTERUPDATE
+{
+ Text = "Nach dem Aktualisieren" ;
+ Text [ English ] = "After update" ;
+ Text [ portuguese ] = "Depois de actualizar" ;
+ Text [ english_us ] = "After update" ;
+ Text [ portuguese_brazilian ] = "Nach dem Aktualisieren" ;
+ Text [ swedish ] = "Efter uppdatering" ;
+ Text [ danish ] = "Efter opdatering" ;
+ Text [ italian ] = "Ad aggiornamento avvenuto" ;
+ Text [ spanish ] = "Después de actualizar" ;
+ Text [ french ] = "Après l'actualisation" ;
+ Text [ dutch ] = "Na het actualiseren" ;
+ Text[ chinese_simplified ] = "¸üÐÂÖ®ºó";
+ Text[ russian ] = "Ïîñëå îáíîâëåíèÿ";
+ Text[ polish ] = "Po aktualizacji";
+ Text[ japanese ] = "XV‚ÌŒã";
+ Text[ chinese_traditional ] = "§ó·s¤§«á";
+ Text[ greek ] = "ÌåôÜ ôçí åíçìÝñùóç";
+ Text[ korean ] = "¾÷µ¥ÀÌÆ®ÇÑ ÈÄ";
+ Text[ arabic ] = "ÈÚÏ ÇáÊÍÏíË";
+ Text[ turkish ] = "Güncellemeden sonra";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_BEFOREDELETE
+{
+ Text = "Vor dem Löschen" ;
+ Text [ English ] = "Before delete" ;
+ Text [ portuguese ] = "Antes de eliminar" ;
+ Text [ english_us ] = "Before deletion" ;
+ Text [ portuguese_brazilian ] = "Vor dem Löschen" ;
+ Text [ swedish ] = "Innan radering" ;
+ Text [ danish ] = "Inden sletning" ;
+ Text [ italian ] = "Prima di eliminare" ;
+ Text [ spanish ] = "Antes de eliminar" ;
+ Text [ french ] = "Avant la suppression" ;
+ Text [ dutch ] = "Voor het wissen" ;
+ Text[ chinese_simplified ] = "ÔÚɾ³ý֮ǰ";
+ Text[ russian ] = "Ïåðåä óäàëåíèåì";
+ Text[ polish ] = "Przed usuniêciem";
+ Text[ japanese ] = "휂̑O";
+ Text[ chinese_traditional ] = "¦b§R°£¤§«e";
+ Text[ greek ] = "Ðñéí ôç äéáãñáöÞ";
+ Text[ korean ] = "»èÁ¦Çϱâ Àü";
+ Text[ arabic ] = "ÞÈá ÇáÍÐÝ";
+ Text[ turkish ] = "Silmeden önce";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_BEFOREINSERT
+{
+ Text = "Vor dem Einfügen" ;
+ Text [ English ] = "Before insert" ;
+ Text [ portuguese ] = "Antes de inserir" ;
+ Text [ english_us ] = "Before insert" ;
+ Text [ portuguese_brazilian ] = "Vor dem Einfügen" ;
+ Text [ swedish ] = "Innan infoga" ;
+ Text [ danish ] = "Inden indsæt" ;
+ Text [ italian ] = "Prima di inserire" ;
+ Text [ spanish ] = "Antes de insertar" ;
+ Text [ french ] = "Avant l'insertion" ;
+ Text [ dutch ] = "Voor het invoegen" ;
+ Text[ chinese_simplified ] = "ÔÚ²åÈë֮ǰ";
+ Text[ russian ] = "Ïåðåä âñòàâêîé";
+ Text[ polish ] = "Przed wstawieniem";
+ Text[ japanese ] = "‘}“ü‚Ì‘O";
+ Text[ chinese_traditional ] = "¦b´¡¤J¤§«e";
+ Text[ greek ] = "Ðñéí áðü ôçí åéóáãùãÞ";
+ Text[ korean ] = "»ðÀÔÇϱâ Àü";
+ Text[ arabic ] = "ÞÈá ÇáÅÏÑÇÌ";
+ Text[ turkish ] = "Eklemeden önce";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_BEFOREUPDATE
+{
+ Text = "Vor dem Aktualisieren" ;
+ Text [ English ] = "Before update" ;
+ Text [ portuguese ] = "Antes de actualizar" ;
+ Text [ english_us ] = "Before update" ;
+ Text [ portuguese_brazilian ] = "Vor dem Aktualisieren" ;
+ Text [ swedish ] = "Innan uppdatering" ;
+ Text [ danish ] = "Inden opdatering" ;
+ Text [ italian ] = "Prima di aggiornare" ;
+ Text [ spanish ] = "Antes de actualizar" ;
+ Text [ french ] = "Avant l'actualisation" ;
+ Text [ dutch ] = "Voor het actualiseren" ;
+ Text[ chinese_simplified ] = "ÔÚ¸üÐÂ֮ǰ";
+ Text[ russian ] = "Ïåðåä îáíîâëåíèåì";
+ Text[ polish ] = "Przed aktualizacj¹";
+ Text[ japanese ] = "XV‚Ì‘O";
+ Text[ chinese_traditional ] = "¦b§ó·s¤§«e";
+ Text[ greek ] = "Ðñéí ôçí åíçìÝñùóç";
+ Text[ korean ] = "¾÷µ¥ÀÌÆ®Çϱâ Àü";
+ Text[ arabic ] = "ÞÈá ÇáÊÍÏíË";
+ Text[ turkish ] = "Güncellemeden önce";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_EVT_APPROVEROWCHANGE
+{
+ Text = "Vor der Datensatzänderung" ;
+ Text [ English ] = "Before row change" ;
+ Text [ english_us ] = "Before record change" ;
+ Text[ portuguese ] = "Antes de modificar registo de dados";
+ Text[ russian ] = "Ïåðåä èçìåíåíèåì äàííûõ";
+ Text[ greek ] = "Ðñéí ôçí áëëáãÞ ôçò åããñáöÞò";
+ Text[ dutch ] = "Voor het veranderen van de record";
+ Text[ french ] = "Avant la modification de l'enregistrement";
+ Text[ spanish ] = "Antes de la modificación del registro de datos";
+ Text[ italian ] = "Prima la modifica dei record di dati";
+ Text[ danish ] = "Inden datapostændring";
+ Text[ swedish ] = "Innan datapoständring";
+ Text[ polish ] = "Przed zmian¹ rekordów";
+ Text[ portuguese_brazilian ] = "Before row change";
+ Text[ japanese ] = "Úº°ÄÞ•ÏX‚Ì‘O";
+ Text[ korean ] = "µ¥ÀÌÅÍ ·¹ÄÚµå º¯°æ Àü¿¡";
+ Text[ chinese_simplified ] = "¸ü¸ÄÊý¾ÝÌõĿ֮ǰ";
+ Text[ chinese_traditional ] = "¸ê®Æ±ø¥ØÅܧ󤧫e";
+ Text[ arabic ] = "ÞÈá ÊÛííÑ ÇáÓÌá";
+ Text[ turkish ] = "Veri kümesi deðiþikliðinden önce";
+};
+
+String RID_STR_EVT_ROWCHANGE
+{
+ Text = "Nach der Datensatzänderung" ;
+ Text [ English ] = "After row change" ;
+ Text [ english_us ] = "After record change" ;
+ Text[ portuguese ] = "Depois de modificar registo de dados";
+ Text[ russian ] = "Ïîñëå èçìåíåíèÿ äàííûõ";
+ Text[ greek ] = "ÌåôÜ ôçí áëëáãÞ ôçò åããñáöÞò";
+ Text[ dutch ] = "Na het veranderen van de record";
+ Text[ french ] = "Après la modification de l'enregistrement";
+ Text[ spanish ] = "Después de la modificación del registro de datos";
+ Text[ italian ] = "Dopo la modifica dei record di dati";
+ Text[ danish ] = "Efter datapostændring";
+ Text[ swedish ] = "Efter datapoständring";
+ Text[ polish ] = "Po zmianie rekordów";
+ Text[ portuguese_brazilian ] = "After row change";
+ Text[ japanese ] = "Úº°ÄÞ•ÏX‚ÌŒã";
+ Text[ korean ] = "µ¥ÀÌÅÍ ·¹ÄÚµå º¯°æ ÈÄ¿¡";
+ Text[ chinese_simplified ] = "¸ü¸ÄÊý¾ÝÌõÄ¿Ö®ºó";
+ Text[ chinese_traditional ] = "¸ê®Æ±ø¥ØÅܧ󤧫á";
+ Text[ arabic ] = "ÈÚÏ ÊÛííÑ ÇáÓÌá";
+ Text[ turkish ] = "Veri kümesi deðiþikliðinden sonra";
+};
+
+String RID_STR_EVT_COMPONENTHIDDEN
+{
+ Text = "Verstecken" ;
+ Text [ English ] = "Component hidden" ;
+ Text [ portuguese ] = "Ocultar" ;
+ Text [ english_us ] = "Hide" ;
+ Text [ portuguese_brazilian ] = "Verstecken" ;
+ Text [ swedish ] = "Dölj" ;
+ 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 ] = "”ñ•\\Ž¦";
+ Text[ chinese_traditional ] = "Áô¤J";
+ Text[ greek ] = "Áðüêñõøç";
+ Text[ korean ] = "¼û±â±â";
+ Text[ arabic ] = "ÅÎÝÇÁ";
+ Text[ turkish ] = "Gizle";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_COMPONENTMOVED
+{
+ Text = "Bewegen" ;
+ Text [ English ] = "Component moved" ;
+ Text [ portuguese ] = "Mover" ;
+ Text [ english_us ] = "Move" ;
+ Text [ portuguese_brazilian ] = "Bewegen" ;
+ Text [ swedish ] = "Flytta" ;
+ Text [ danish ] = "Flyt" ;
+ Text [ italian ] = "Sposta" ;
+ Text [ spanish ] = "Mover" ;
+ Text [ french ] = "Déplacer" ;
+ Text [ dutch ] = "Bewegen" ;
+ Text[ chinese_simplified ] = "»î¶¯";
+ Text[ russian ] = "Ïåðåìåùàòü";
+ Text[ polish ] = "Poruszaj";
+ Text[ japanese ] = "ˆÚ“®";
+ Text[ chinese_traditional ] = "¬¡°Ê";
+ Text[ greek ] = "Ìåôáêßíçóç";
+ Text[ korean ] = "À̵¿";
+ Text[ arabic ] = "ÊÍÑíß";
+ Text[ turkish ] = "Taþý";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_COMPONENTPAINT
+{
+ Text = "Neu zeichnen" ;
+ Text [ English ] = "Component paint" ;
+ Text [ portuguese ] = "Redesenhar" ;
+ Text [ english_us ] = "Refresh" ;
+ Text [ portuguese_brazilian ] = "Neu zeichnen" ;
+ Text [ swedish ] = "Rita om" ;
+ Text [ danish ] = "Gentegn" ;
+ Text [ italian ] = "Ridisegna" ;
+ Text [ spanish ] = "Volver a dibujar" ;
+ Text [ french ] = "Rafraîchir l'affichage" ;
+ Text [ dutch ] = "Opnieuw tekenen" ;
+ Text[ chinese_simplified ] = "ÖØлæÖÆ";
+ Text[ russian ] = "Ïåðåðèñîâàòü";
+ Text[ polish ] = "Rysuj ponownie";
+ Text[ japanese ] = "V‚µ‚­•`‚­";
+ Text[ chinese_traditional ] = "­«·sø»s";
+ Text[ greek ] = "ÅðáíÜëçøç ó÷åäéáóìïý";
+ Text[ korean ] = "»õ·Î ±×¸®±â";
+ Text[ arabic ] = "ÅÚÇÏÉ ÇáÑÓã";
+ Text[ turkish ] = "Yenile";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_COMPONENTRESIZED
+{
+ Text = "Größe geändert" ;
+ Text [ English ] = "Component resized" ;
+ Text [ portuguese ] = "Tamanho modificado" ;
+ Text [ english_us ] = "Component resized" ;
+ Text [ portuguese_brazilian ] = "Größe geändert" ;
+ Text [ swedish ] = "Storlek ändrad" ;
+ Text [ danish ] = "Størrelse ændret" ;
+ Text [ italian ] = "Dimensione cambiata" ;
+ Text [ spanish ] = "Tamaño modificado" ;
+ Text [ french ] = "Taille modifiée" ;
+ Text [ dutch ] = "Grootte gewijzigd" ;
+ Text[ chinese_simplified ] = "´óСÒѾ­¸ü¸Ä";
+ Text[ russian ] = "Ðàçìåð èçìåíåí";
+ Text[ polish ] = "Zmieniono rozmiar";
+ Text[ japanese ] = "»²½Þ‚Ì•ÏX";
+ Text[ chinese_traditional ] = "¤j¤p¤w¸gÅܧó";
+ Text[ greek ] = "Ôï ìÝãåèïòôñïðïðïéÞèçêå";
+ Text[ korean ] = "Å©±â º¯°æµÊ";
+ Text[ arabic ] = "Êã ÊÛííÑ ÇáÍÌã";
+ Text[ turkish ] = "Boyutu deðiþtirildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_COMPONENTSHOWN
+{
+ Text = "Anzeigen" ;
+ Text [ English ] = "Component shown" ;
+ Text [ portuguese ] = "Mostrar" ;
+ Text [ english_us ] = "Component shown" ;
+ Text [ portuguese_brazilian ] = "Anzeigen" ;
+ Text [ swedish ] = "Visa" ;
+ Text [ danish ] = "Vis" ;
+ Text [ italian ] = "Mostra" ;
+ Text [ spanish ] = "Mostrar" ;
+ Text [ french ] = "Afficher" ;
+ Text [ dutch ] = "Weergeven" ;
+ Text[ chinese_simplified ] = "ÏÔʾ";
+ Text[ russian ] = "Ïîêàçàòü";
+ Text[ polish ] = "Poka¿";
+ Text[ japanese ] = "•\\Ž¦";
+ Text[ chinese_traditional ] = "Åã¥Ü";
+ Text[ greek ] = "ÅìöÜíéóç";
+ Text[ korean ] = "Ç¥½Ã";
+ Text[ arabic ] = "ÅÙåÇÑ";
+ Text[ turkish ] = "Görüntüle";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_CONFIRMDELETE
+{
+ Text = "Löschen bestätigen" ;
+ Text [ English ] = "Confirm delete" ;
+ Text [ portuguese ] = "Confirmar eliminar" ;
+ Text [ english_us ] = "Confirm delete" ;
+ Text [ portuguese_brazilian ] = "Löschen bestätigen" ;
+ Text [ swedish ] = "Bekräfta radering" ;
+ Text [ danish ] = "Bekræft sletning" ;
+ Text [ italian ] = "Conferma 'Elimina'" ;
+ Text [ spanish ] = "Confirmar eliminación" ;
+ Text [ french ] = "Confirmation de suppression" ;
+ Text [ dutch ] = "Wissen bevestigen" ;
+ Text[ chinese_simplified ] = "È·¶¨É¾³ý";
+ Text[ russian ] = "Ïîäòâåðäèòü óäàëåíèå";
+ Text[ polish ] = "PotwierdŸ usuniêcie";
+ Text[ japanese ] = "휂̊m”F";
+ Text[ chinese_traditional ] = "½T©w§R°£";
+ Text[ greek ] = "Åðéâåâáßùóç äéáãñáöÞò";
+ Text[ korean ] = "»èÁ¦ È®ÀÎ";
+ Text[ arabic ] = "ÊÃßíÏ ÇáÍÐÝ";
+ Text[ turkish ] = "Silme iþlemini onayla";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_ELEMENTINSERTED
+{
+ Text = "Element eingefügt" ;
+ Text [ English ] = "Element inserted" ;
+ Text [ portuguese ] = "Elemento inserido" ;
+ Text [ english_us ] = "Element inserted" ;
+ Text [ portuguese_brazilian ] = "Element eingefügt" ;
+ Text [ swedish ] = "Element infogat" ;
+ Text [ danish ] = "Element indsat" ;
+ Text [ italian ] = "Elemento inserito" ;
+ Text [ spanish ] = "Elemento insertado" ;
+ Text [ french ] = "L'élément a été inséré" ;
+ Text [ dutch ] = "Element ingevoegd" ;
+ Text[ chinese_simplified ] = "²åÈëÌõÄ¿";
+ Text[ russian ] = "Âñòàâèòü ýëåìåíò";
+ Text[ polish ] = "Wstawiono element";
+ Text[ japanese ] = "—v‘f‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤J¶µ¥Ø";
+ Text[ greek ] = "Ôï óôïé÷åßï ðñïóôÝèçêå";
+ Text[ korean ] = "¿ä¼Ò »ðÀÔµÊ";
+ Text[ arabic ] = "Êã ÅÏÑÇÌ ÚäÕÑ";
+ Text[ turkish ] = "Öðe eklendi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_ELEMENTREMOVED
+{
+ Text = "Element entfernt" ;
+ Text [ English ] = "Element removed" ;
+ Text [ portuguese ] = "Elemento eliminado" ;
+ Text [ english_us ] = "Element removed" ;
+ Text [ portuguese_brazilian ] = "Element entfernt" ;
+ Text [ swedish ] = "Element borttaget" ;
+ Text [ danish ] = "Element fjernet" ;
+ Text [ italian ] = "Elemento rimosso" ;
+ Text [ spanish ] = "Elemento eliminado" ;
+ Text [ french ] = "l'élément a été enlevé" ;
+ Text [ dutch ] = "Element verwijderd" ;
+ Text[ chinese_simplified ] = "ɾ³ýÌõÄ¿";
+ Text[ russian ] = "Óäàëèòü ýëåìåíò";
+ Text[ polish ] = "Usuniêto element";
+ Text[ japanese ] = "—v‘f‚̉ðœ";
+ Text[ chinese_traditional ] = "§R°£¶µ¥Ø";
+ Text[ greek ] = "Ôï óôïé÷åßï Ý÷åé äéáãñáöåß";
+ Text[ korean ] = "¿ä¼Ò Á¦°ÅµÊ";
+ Text[ arabic ] = "Êã ÅÒÇáÉ ÚäÕÑ";
+ Text[ turkish ] = "Öðe kaldýrýldý";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_ELEMENTREPLACED
+{
+ Text = "Element ersetzt" ;
+ Text [ English ] = "Element Replaced" ;
+ Text [ portuguese ] = "Elemento substituído" ;
+ Text [ english_us ] = "Element replaced" ;
+ Text [ portuguese_brazilian ] = "Element ersetzt" ;
+ Text [ swedish ] = "Element ersatt" ;
+ Text [ danish ] = "Element erstattet" ;
+ Text [ italian ] = "Elemento sostituito" ;
+ Text [ spanish ] = "Elemento sustituido" ;
+ Text [ french ] = "L'élément recherché a été remplacé" ;
+ Text [ dutch ] = "Element vervangen" ;
+ Text[ chinese_simplified ] = "¸üÌæÌõÄ¿";
+ Text[ russian ] = "Ýëåìåíò çàìåíåí";
+ Text[ polish ] = "Zamieniono element";
+ Text[ japanese ] = "—v‘f‚Ì’uŠ·";
+ Text[ chinese_traditional ] = "´À¥N¶µ¥Ø";
+ Text[ greek ] = "Ôï óôïé÷åßï Ý÷åé áíôéêáôáóôáèåß";
+ Text[ korean ] = "¿ä¼Ò ´ëüµÊ";
+ Text[ arabic ] = "Êã ÇÓÊÈÏÇá ÚäÕÑ";
+ Text[ turkish ] = "Öðe baþkasýyla deðiþtirildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_ERROROCCURED
+{
+ Text = "Fehler aufgetreten" ;
+ Text [ English ] = "Error occured" ;
+ Text [ portuguese ] = "Surgiu erro" ;
+ Text [ english_us ] = "Error occurred" ;
+ Text [ portuguese_brazilian ] = "Fehler aufgetreten" ;
+ Text [ swedish ] = "Fel har uppstått" ;
+ Text [ danish ] = "Der opstod en fejl" ;
+ Text [ italian ] = "Si è verificato un errore" ;
+ Text [ spanish ] = "Ha ocurrido un error" ;
+ Text [ french ] = "Erreur survenue" ;
+ Text [ dutch ] = "Fout opgetreden" ;
+ Text[ chinese_simplified ] = "·¢ÉúÒ»¸ö´íÎó";
+ Text[ russian ] = "Ïðîèçîøëà îøèáêà";
+ Text[ polish ] = "Wyst¹pi³ b³¹d";
+ Text[ japanese ] = "´×°‚Ì”­¶";
+ Text[ chinese_traditional ] = "µo¥Í¤@­Ó¿ù»~";
+ Text[ greek ] = "ÐáñïõóéÜóôçêå óöÜëìá";
+ Text[ korean ] = "¿À·ù ¹ß»ý";
+ Text[ arabic ] = "ÍÏË ÎØÃ";
+ Text[ turkish ] = "Hata oluþtu";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_FIRING
+{
+ Text = "Abschuß" ;
+ Text [ English ] = "firing" ;
+ Text [ portuguese ] = "Disparar" ;
+ Text [ english_us ] = "Firing" ;
+ Text [ portuguese_brazilian ] = "Abschuß" ;
+ Text [ swedish ] = "Avfyrning" ;
+ Text [ danish ] = "Affyring" ;
+ Text [ italian ] = "Lancio" ;
+ Text [ spanish ] = "Disparo" ;
+ Text [ french ] = "Firing" ;
+ Text [ dutch ] = "Afsluiting" ;
+ Text[ chinese_simplified ] = "Çå³ý";
+ Text[ russian ] = "Çàïóñê";
+ Text[ polish ] = "Odstrza³";
+ Text[ japanese ] = "Firing";
+ Text[ chinese_traditional ] = "²M°£";
+ Text[ greek ] = "Åêôüîåõóç";
+ Text[ korean ] = "Á¡È­";
+ Text[ arabic ] = "ÅØáÇÞ";
+ Text[ turkish ] = "Firing";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_FOCUSGAINED
+{
+ Text = "Bei Fokuserhalt" ;
+ Text [ English ] = "Focus gained" ;
+ Text [ portuguese ] = "Ao receber foco" ;
+ Text [ english_us ] = "Focus gained" ;
+ Text [ portuguese_brazilian ] = "Bei Fokuserhalt" ;
+ Text [ swedish ] = "Vid fokusering" ;
+ Text [ danish ] = "Ved fokusopretholdelse" ;
+ Text [ italian ] = "Raggiungimento del punto focale" ;
+ Text [ spanish ] = "Recepción de foco" ;
+ Text [ french ] = "Réception de focus" ;
+ Text [ dutch ] = "Indien focus bereikt" ;
+ Text[ chinese_simplified ] = "ÔÚÃé׼ʱ";
+ Text[ russian ] = "Ïðè ïîëó÷åíèè ôîêóñà";
+ Text[ polish ] = "Przy otrzymaniu ogniska";
+ Text[ japanese ] = "Ì«°¶½‚𓾂½Û";
+ Text[ chinese_traditional ] = "¦bºË·Ç®É";
+ Text[ greek ] = "Óå ðåñßðôùóç åðéëïãÞò";
+ Text[ korean ] = "ÃÊÁ¡À» ¸ÂÃèÀ» ¶§";
+ Text[ arabic ] = "ÇáÍÕæá Úáì ÇáÊÑßíÒ";
+ Text[ turkish ] = "Odaklandý";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_FOCUSLOST
+{
+ Text = "Bei Fokusverlust" ;
+ Text [ English ] = "Focus lost" ;
+ Text [ portuguese ] = "Ao perder foco" ;
+ Text [ english_us ] = "Focus lost" ;
+ Text [ portuguese_brazilian ] = "Bei Fokusverlust" ;
+ Text [ swedish ] = "Vid fokusförlust" ;
+ Text [ danish ] = "Ved fokustab" ;
+ Text [ italian ] = "Perdita del punto focale" ;
+ Text [ spanish ] = "Pérdida de foco" ;
+ Text [ french ] = "Perte de focus" ;
+ Text [ dutch ] = "Bij focusverlies" ;
+ Text[ chinese_simplified ] = "ÔÚÆ«ÀëÄ¿±êʱ";
+ Text[ russian ] = "Ïðè ïîòåðå ôîêóñà";
+ Text[ polish ] = "Przy utracie ogniska";
+ Text[ japanese ] = "Ì«°¶½‚ðŽ¸‚Á‚½Û";
+ Text[ chinese_traditional ] = "¦b°¾Â÷¥Ø¼Ð®É";
+ Text[ greek ] = "Óôçí ðåñßðôùóç áðþëåéáò åóôßáò";
+ Text[ korean ] = "ÃÊÁ¡À» ÀÒ¾úÀ» ¶§";
+ Text[ arabic ] = "ÝÞÏÇä ÇáÊÑßíÒ";
+ Text[ turkish ] = "Odak kayboldu";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_ITEMSTATECHANGED
+{
+ Text = "Status geändert" ;
+ Text [ English ] = "Item state changed" ;
+ Text [ portuguese ] = "Estado modificado" ;
+ Text [ english_us ] = "Item status changed" ;
+ Text [ portuguese_brazilian ] = "Status geändert" ;
+ Text [ swedish ] = "Status ändrad" ;
+ Text [ danish ] = "Status ændret" ;
+ Text [ italian ] = "Stato modificato" ;
+ Text [ spanish ] = "Estado modificado" ;
+ Text [ french ] = "Statut modifié" ;
+ Text [ dutch ] = "Status gewijzigd" ;
+ Text[ chinese_simplified ] = "״̬ÒѾ­¸ü¸Ä";
+ Text[ russian ] = "Ñîñòîÿíèå èçìåíåíî";
+ Text[ polish ] = "Zmieniony stan";
+ Text[ japanese ] = "½Ã°À½‚Ì•ÏX";
+ Text[ chinese_traditional ] = "ª¬ºA¤w¸gÅܧó";
+ Text[ greek ] = "ÊáôÜóôáóç ôñïðïðïéÞèçêå";
+ Text[ korean ] = "»óÅ º¯°æ";
+ Text[ arabic ] = "Êã ÊÛííÑ ÇáÍÇáÉ";
+ Text[ turkish ] = "Durum deðiþtirildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_KEYTYPED
+{
+ Text = "Taste gedrückt" ;
+ Text [ English ] = "Key typed" ;
+ Text [ portuguese ] = "Tecla premida" ;
+ Text [ english_us ] = "Key typed" ;
+ Text [ portuguese_brazilian ] = "Nach Tastendruck" ;
+ Text [ swedish ] = "Tangent tryckt" ;
+ Text [ danish ] = "Knap trykket" ;
+ Text [ italian ] = "Tasto premuto" ;
+ Text [ spanish ] = "Tecla pulsada" ;
+ Text [ french ] = "Touche enfoncée" ;
+ Text [ dutch ] = "Met ingedrukte toets" ;
+ Text[ chinese_simplified ] = "°´×¡°´¼ü";
+ Text[ russian ] = "Êëàâèøà íàæàòà";
+ Text[ polish ] = "Wciœniêty przycisk";
+ Text[ japanese ] = "·°‚ð‰Ÿ‚·";
+ Text[ chinese_traditional ] = "«ö¦í«öÁä";
+ Text[ greek ] = "ÐëÞêôñï ðáôçìÝíï";
+ Text[ korean ] = "Å° ´©¸§";
+ Text[ arabic ] = "ÇáÖÛØ Úáì ÒÑ";
+ Text[ turkish ] = "Tuþ basýlý";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_EVT_KEYUP
+{
+ Text = "Taste losgelassen" ;
+ Text [ English ] = "Key up" ;
+ Text [ portuguese ] = "Depois de premir tecla" ;
+ Text [ english_us ] = "Key released" ;
+ Text [ portuguese_brazilian ] = "Nach Tastendruck" ;
+ Text [ swedish ] = "Efter tangenttryck" ;
+ Text [ danish ] = "Knap sluppet" ;
+ Text [ italian ] = "Dopo aver premuto il tasto" ;
+ Text [ spanish ] = "Tecla soltada" ;
+ Text [ french ] = "Après avoir lâché la touche" ;
+ Text [ dutch ] = "Toets losgelaten" ;
+ Text[ chinese_simplified ] = "·Å¿ª°´¼ü";
+ Text[ russian ] = "Îòïóùåííàÿ êëàâèøà";
+ Text[ polish ] = "Zwolniony przycisk";
+ Text[ japanese ] = "·°‚̉ðœ";
+ Text[ chinese_traditional ] = "©ñ¶}«öÁä";
+ Text[ greek ] = "ÐëÞêôñï áðåëåõèåñùìÝíï";
+ Text[ korean ] = "Å° ³õÀ½";
+ Text[ arabic ] = "æÞÝ ÇáÖÛØ Úáì ÒÑ";
+ Text[ turkish ] = "Tuþ býralkýldýðýnda";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_EVT_LOADED
+{
+ Text = "Beim Laden" ;
+ Text [ English ] = "When loading" ;
+ Text [ portuguese ] = "Ao carregar" ;
+ Text [ english_us ] = "When loading" ;
+ Text [ portuguese_brazilian ] = "Beim Laden" ;
+ Text [ swedish ] = "Vid laddning" ;
+ Text [ danish ] = "Ved indlæsning" ;
+ Text [ italian ] = "Durante il caricamento" ;
+ Text [ spanish ] = "Al cargar" ;
+ Text [ french ] = "En cours de chargement" ;
+ Text [ dutch ] = "Bij het laden" ;
+ Text[ chinese_simplified ] = "ÔÚ×°ÔØʱ";
+ Text[ russian ] = "Ïðè çàãðóçêå";
+ Text[ polish ] = "Przy ³adowaniu";
+ Text[ japanese ] = "“Ç‚Ýž‚Ý‚ÌÛ";
+ Text[ chinese_traditional ] = "¦b¸Ë¸ü®É";
+ Text[ greek ] = "ÊáôÜ ôç öüñôùóç";
+ Text[ korean ] = "·ÎµåÇÒ ¶§";
+ Text[ arabic ] = "ÚäÏ ÇáÊÍãíá";
+ Text[ turkish ] = "Yükleme sýrasýnda";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_EVT_RELOADED
+{
+ Text = "Beim erneuten Laden" ;
+ Text [ English ] = "When reloading" ;
+ Text [ english_us ] = "When reloading" ;
+ Text[ portuguese ] = "Ao recarregar";
+ Text[ russian ] = "Ïðè ïîâòîðíîé çàãðóçêå";
+ Text[ greek ] = "ÊáôÜ ôçí åðáíÜëçøç ôçò öüñôùóçò";
+ Text[ dutch ] = "Bij het opnieuw laden";
+ Text[ french ] = "Lors du nouveau chargement";
+ Text[ spanish ] = "Al recargar";
+ Text[ italian ] = "Durante il ricaricamento";
+ Text[ danish ] = "Under genladning";
+ Text[ swedish ] = "Vid omladdning";
+ Text[ polish ] = "Podczas ponownego ³adowania";
+ Text[ portuguese_brazilian ] = "When reloading";
+ Text[ japanese ] = "±ÝÛ°ÄÞ‚ÌÛ";
+ Text[ korean ] = "»õ·Î ·ÎµåÇÒ ¶§";
+ Text[ chinese_simplified ] = "ÔÚÖØÐÂ×°ÔØʱ";
+ Text[ chinese_traditional ] = "¦b­«·s¸Ë¸ü®É";
+ Text[ arabic ] = "ÚäÏ ÅÚÇÏÉ ÇáÊÍãíá";
+ Text[ turkish ] = "Yeniden yükleme sýrasýnda";
+};
+
+String RID_STR_EVT_MOUSEDRAGGED
+{
+ Text = "Mausbewegung bei Tastendruck" ;
+ Text [ English ] = "Mouse dragged" ;
+ Text [ portuguese ] = "Mover rato ao premir tecla" ;
+ Text [ english_us ] = "Mouse dragged while key pressed" ;
+ Text [ portuguese_brazilian ] = "Mausbewegung bei Tastendruck" ;
+ Text [ swedish ] = "Musrörelse vid tangenttryck" ;
+ Text [ danish ] = "Musbevægelse ved knaptryk" ;
+ Text [ italian ] = "Movimento del mouse premendo i tasti" ;
+ Text [ spanish ] = "Mover ratón por medio del teclado" ;
+ Text [ french ] = "Déplacement de la souris et touche enfoncée" ;
+ Text [ dutch ] = "Muisbeweging bij indrukken toets" ;
+ Text[ chinese_simplified ] = "ÔÚ°´»÷Êó±ê¼üµÄͬʱÍÏÀ­Òƶ¯Êó±ê";
+ Text[ russian ] = "Ïåðåìåùåíèå ìûøè ïðè íàæàòèè êëàâèøè";
+ Text[ polish ] = "Przemieszczanie myszy przy przyciœniêciu przycisku";
+ Text[ japanese ] = "·°‚ð‰Ÿ‚µ‚È‚ª‚çϳ½‚ð‘€ì";
+ Text[ chinese_traditional ] = "¦b«ö¦í·Æ¹««öÁ䬡°Ê®É";
+ Text[ greek ] = "Ìåôáêßíçóç ðïíôéêéïý êáôÜ ôï ðÜôçìá ðëÞêôñïõ";
+ Text[ korean ] = "Å°¸¦ ´©¸¦ ¶§ ¸¶¿ì½º À̵¿";
+ Text[ arabic ] = "ÊÍÑíß ÇáãÇæÓ ÃËäÇÁ ÇáÖÛØ Úáì ÇáÒÑ";
+ Text[ turkish ] = "Tuþa basarak fare hareketi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_MOUSEENTERED
+{
+ Text = "Maus innerhalb" ;
+ Text [ English ] = "Mouse entered" ;
+ Text [ portuguese ] = "Rato dentro" ;
+ Text [ english_us ] = "Mouse inside" ;
+ Text [ portuguese_brazilian ] = "Maus innerhalb" ;
+ Text [ swedish ] = "Mus inom" ;
+ Text [ danish ] = "Mus indenfor" ;
+ Text [ italian ] = "Mouse dentro" ;
+ Text [ spanish ] = "Ratón dentro" ;
+ Text [ french ] = "Souris à l'intérieur de" ;
+ Text [ dutch ] = "Muis binnen" ;
+ Text[ chinese_simplified ] = "Êó±ê½øÈë";
+ Text[ russian ] = "Ìûøü âíóòðè";
+ Text[ polish ] = "Mysz wewn¹trz";
+ Text[ japanese ] = "ϳ½‚𒆂Ö";
+ Text[ chinese_traditional ] = "¹«¼Ð¶i¤J";
+ Text[ greek ] = "Ðïíôßêé åíôüò";
+ Text[ korean ] = "¸¶¿ì½º ³»ºÎ";
+ Text[ arabic ] = "ÇáãÇæÓ ÈÇáÏÇÎá";
+ Text[ turkish ] = "Fare içerde";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_MOUSEEXITED
+{
+ Text = "Maus ausserhalb" ;
+ Text [ English ] = "Mouse exited" ;
+ Text [ portuguese ] = "Rato fora" ;
+ Text [ english_us ] = "Mouse outside" ;
+ Text [ portuguese_brazilian ] = "Maus ausserhalb" ;
+ Text [ swedish ] = "Mus utanför" ;
+ Text [ danish ] = "Mus udenfor" ;
+ Text [ italian ] = "Mouse fuori" ;
+ Text [ spanish ] = "Ratón fuera" ;
+ Text [ french ] = "Souris à l'extérieur de" ;
+ Text [ dutch ] = "Muis buiten" ;
+ Text[ chinese_simplified ] = "Êó±êÍ˳ö";
+ Text[ russian ] = "Ìûøü ñíàðóæè";
+ Text[ polish ] = "Mysz na zewn¹trz";
+ Text[ japanese ] = "ϳ½‚ðŠO‚Ö";
+ Text[ chinese_traditional ] = "¹«¼Ð°h¥X";
+ Text[ greek ] = "Ðïíôßêé åêôüò";
+ Text[ korean ] = "¸¶¿ì½º ¿ÜºÎ";
+ Text[ arabic ] = "ÇáãÇæÓ ÈÇáÎÇÑÌ";
+ Text[ turkish ] = "Fare dýþarda";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_MOUSEMOVED
+{
+ Text = "Mausbewegung" ;
+ Text [ English ] = "Mouse moved" ;
+ Text [ portuguese ] = "Mover rato" ;
+ Text [ english_us ] = "Mouse moved" ;
+ Text [ portuguese_brazilian ] = "Mausbewegung" ;
+ Text [ swedish ] = "Musrörelse" ;
+ Text [ danish ] = "Musbevægelse" ;
+ Text [ italian ] = "Movimento del mouse" ;
+ Text [ spanish ] = "Movimiento de ratón" ;
+ Text [ french ] = "Déplacement de la souris" ;
+ Text [ dutch ] = "Muisbeweging" ;
+ Text[ chinese_simplified ] = "Êó±ê»î¶¯";
+ Text[ russian ] = "Ïåðåìåùåíèå ìûøè";
+ Text[ polish ] = "Przesuniêcie myszy";
+ Text[ japanese ] = "ϳ½‚Ì‘€ì";
+ Text[ chinese_traditional ] = "¹«¼Ð¬¡°Ê";
+ Text[ greek ] = "Êßíçóç ðïíôéêéïý";
+ Text[ korean ] = "¸¶¿ì½º À̵¿";
+ Text[ arabic ] = "ÊÍÑíß ÇáãÇæÓ";
+ Text[ turkish ] = "Fare hareketi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_MOUSEPRESSED
+{
+ Text = "Maustaste gedrückt" ;
+ Text [ English ] = "Mouse pressed" ;
+ Text [ portuguese ] = "Premir botão do rato " ;
+ Text [ english_us ] = "Mouse pressed" ;
+ Text [ portuguese_brazilian ] = "Maustaste gedrückt" ;
+ Text [ swedish ] = "Musknapp nedtryckt" ;
+ Text [ danish ] = "Museknap trykket" ;
+ Text [ italian ] = "Tasto del mouse premuto" ;
+ Text [ spanish ] = "Pulsar botón del ratón" ;
+ Text [ french ] = "Bouton de souris enfoncé" ;
+ Text [ dutch ] = "Muistoets ingedrukt" ;
+ Text[ chinese_simplified ] = "°´×¡Êó±ê¼ü";
+ Text[ russian ] = "Êëàâèøà ìûøè íàæàòà";
+ Text[ polish ] = "Naciœniêty przycisk myszy";
+ Text[ japanese ] = "ϳ½ ÎÞÀÝ‚ð‰Ÿ‚·";
+ Text[ chinese_traditional ] = "«ö¦í·Æ¹«Áä";
+ Text[ greek ] = "Ðïíôßêé ðéåóìÝíï";
+ Text[ korean ] = "¸¶¿ì½º ´©¸§";
+ Text[ arabic ] = "ÇáÖÛØ Úáì ÒÑ ÇáãÇæÓ";
+ Text[ turkish ] = "Fare tuþu basýlý";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_MOUSERELEASED
+{
+ Text = "Maustaste losgelassen" ;
+ Text [ English ] = "Mouse released" ;
+ Text [ portuguese ] = "Soltar botão do rato" ;
+ Text [ english_us ] = "Mouse released" ;
+ Text [ portuguese_brazilian ] = "Maustaste losgelassen" ;
+ Text [ swedish ] = "Musknapp uppsläppt" ;
+ Text [ danish ] = "Museknap sluppet" ;
+ Text [ italian ] = "Tasto del mouse rilasciato" ;
+ Text [ spanish ] = "Soltar botón del ratón" ;
+ Text [ french ] = "Bouton de souris relâché" ;
+ Text [ dutch ] = "Muistoetst losgelaten" ;
+ Text[ chinese_simplified ] = "·Å¿ªÊó±ê¼ü";
+ Text[ russian ] = "Êëàâèøà ìûøè îòïóùåíà";
+ Text[ polish ] = "Zwolnij przycisk myszy";
+ Text[ japanese ] = "ϳ½ ÎÞÀ݂𗣂·";
+ Text[ chinese_traditional ] = "©ñ¶}·Æ¹«Áä";
+ Text[ greek ] = "Ðïíôßêé áðåëåõèåñùìÝíï";
+ Text[ korean ] = "¸¶¿ì½º ³õÀ½";
+ Text[ arabic ] = "æÞÝ ÇáÖÛØ Úáì ÒÑ ÇáãÇæÓ";
+ Text[ turkish ] = "Fare tuþu býrakýlmýþ";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_POSITIONING
+{
+ Text = "Vor dem Datensatzwechsel" ;
+ Text [ English ] = "Prior positioning" ;
+ Text [ english_us ] = "Before record change" ;
+ Text[ portuguese ] = "Posição anterior";
+ Text[ russian ] = "Äî çàìåíû çàïèñè";
+ Text[ greek ] = "Ðñéí ôçí áëëáãÞ åããñáöÞò";
+ Text[ dutch ] = "Voor wisselen van record";
+ Text[ french ] = "Avant le passage au suivant";
+ Text[ spanish ] = "Antes del cambio de registro de datos";
+ Text[ italian ] = "Prima del cambio record di dati";
+ Text[ danish ] = "Inden datapostskift";
+ Text[ swedish ] = "Före datapostväxling";
+ Text[ polish ] = "Przed zmian¹ rekordów";
+ Text[ portuguese_brazilian ] = "Prior positioning";
+ Text[ japanese ] = "Úº°ÄÞ‚Ì’uŠ·‘O‚̈ʒu";
+ Text[ korean ] = "·¹ÄÚµå º¯°æ Àü¿¡";
+ Text[ chinese_simplified ] = "ÔÚת»»Êý¾ÝÌõĿ֮ǰ";
+ Text[ chinese_traditional ] = "¦bÅÜ´«¸ê®Æ±ø¥Ø¤§«e";
+ Text[ arabic ] = "ÞÈá ÊÛííÑ ÇáÓÌá";
+ Text[ turkish ] = "Veri kümesi deðiþikliðinden önce";
+};
+String RID_STR_EVT_POSITIONED
+{
+ Text = "Nach dem Datensatzwechsel" ;
+ Text [ English ] = "After positioning" ;
+ Text [ english_us ] = "After record change" ;
+ Text [ portuguese_brazilian ] = "Position verändert" ;
+ Text [ swedish ] = "Efter datapostväxling" ;
+ Text [ danish ] = "Efter datapostskift" ;
+ Text [ italian ] = "Dopo il cambio record di dati" ;
+ Text [ spanish ] = "Tras el cambio de registro de datos" ;
+ Text [ french ] = "Après le passage au suivant" ;
+ Text [ dutch ] = "Na wisselen van record" ;
+ Text[ chinese_simplified ] = "ת»»Êý¾ÝÌõÄ¿ÒÔºó";
+ Text[ russian ] = "Ïîñëå çàìåíû çàïèñè";
+ Text[ polish ] = "Po zmianie rekordów";
+ Text[ japanese ] = "Úº°ÄÞ‚Ì’uŠ·Œã‚̈ʒu";
+ Text[ chinese_traditional ] = "¦bÅÜ´«¸ê®Æ±ø¥Ø¤§«á";
+ Text[ greek ] = "ÌåôÜ ôçí áëëáãÞ åããñáöÞò";
+ Text[ korean ] = "·¹ÄÚµå º¯°æ ÈÄ¿¡";
+ Text[ arabic ] = "ÈÚÏ ÊÛííÑ ÇáÓÌá";
+ Text[ portuguese ] = "Posição seguinte";
+ Text[ turkish ] = "Veri kümesi deðiþikliðinden sonra";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_PROPERTIESCHANGE
+{
+ Text = "Eigenschaften geändert" ;
+ Text [ English ] = "Properties change" ;
+ Text [ portuguese ] = "Propriedades modificadas" ;
+ Text [ english_us ] = "Properties change" ;
+ Text [ portuguese_brazilian ] = "Eigenschaften geändert" ;
+ Text [ swedish ] = "Egenskaper ändrade" ;
+ Text [ danish ] = "Egenskaber ændret" ;
+ Text [ italian ] = "Proprietà cambiate" ;
+ Text [ spanish ] = "Propiedades modificadas" ;
+ Text [ french ] = "Propriétés ont été changé" ;
+ Text [ dutch ] = "Eigenschappen gewijzigd" ;
+ Text[ chinese_simplified ] = "ÊôÐÔÒѾ­¸ü¸Ä";
+ Text[ russian ] = "Ñâîéñòâà èçìåíåíû";
+ Text[ polish ] = "Zmieniono w³aœciwoœci";
+ Text[ japanese ] = "ÌßÛÊßè‚Ì•ÏX";
+ Text[ chinese_traditional ] = "Äݩʤw¸gÅܧó";
+ Text[ greek ] = "Éäéüôçôåò ôñïðïðïéÞèçêáí";
+ Text[ korean ] = "µî·ÏÁ¤º¸ º¯°æ";
+ Text[ arabic ] = "Êã ÊÛííÑ ÇáÎÕÇÆÕ";
+ Text[ turkish ] = "Özellikler deðiþtirildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_PROPERTYCHANGE
+{
+ Text = "Eigenschaft geändert" ;
+ Text [ English ] = "Property changed" ;
+ Text [ portuguese ] = "Propriedade modificada" ;
+ Text [ english_us ] = "Property changed" ;
+ Text [ portuguese_brazilian ] = "Eigenschaft geändert" ;
+ Text [ swedish ] = "Egenskap ändrad" ;
+ Text [ danish ] = "Egenskab ændret" ;
+ Text [ italian ] = "Proprietà cambiata" ;
+ Text [ spanish ] = "Propiedad modificada" ;
+ Text [ french ] = "Propriété a été changé" ;
+ Text [ dutch ] = "Eigenschap gewijzigd" ;
+ Text[ chinese_simplified ] = "ÊôÐÔÒѾ­¸ü¸Ä";
+ Text[ russian ] = "Ñâîéñòâà èçìåíåíû";
+ Text[ polish ] = "Zmieniono w³aœciwoœci";
+ Text[ japanese ] = "ÌßÛÊßè‚Ì•ÏX";
+ Text[ chinese_traditional ] = "Äݩʤw¸gÅܧó";
+ Text[ greek ] = "Éäéüôçôá ôñïðïðïéÞèçêå";
+ Text[ korean ] = "µî·ÏÁ¤º¸ º¯°æ";
+ Text[ arabic ] = "Êã ÊÛííÑ ÇáÎÇÕíÉ";
+ Text[ turkish ] = "Özellik deðiþtirildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_PROPERTYSTATECHANGE
+{
+ Text = "Statuseigenschaft geändert" ;
+ Text [ English ] = "Property state changed" ;
+ Text [ portuguese ] = "Estado de propriedades modificado" ;
+ Text [ english_us ] = "Property status changed" ;
+ Text [ portuguese_brazilian ] = "Statuseigenschaft geändert" ;
+ Text [ swedish ] = "Statusegenskap ändrad" ;
+ Text [ danish ] = "Statusegenskab ændret" ;
+ Text [ italian ] = "Proprietà stato modificato" ;
+ Text [ spanish ] = "Propiedad de estado modificada" ;
+ Text [ french ] = "Propriété de statut modifiée" ;
+ Text [ dutch ] = "Statuseigenschap gewijzigd" ;
+ Text[ chinese_simplified ] = "״̬ÊôÐÔÒѾ­¸ü¸Ä";
+ Text[ russian ] = "Ñâîéñòâî ñîñòîÿíèÿ èçìåíåíî";
+ Text[ polish ] = "Zmieniony stan w³aœciwoœci";
+ Text[ japanese ] = "½Ã°À½‚ÌÌßÛÊßè‚Ì•ÏX";
+ Text[ chinese_traditional ] = "ª¬ºAÄݩʤw¸gÅܧó";
+ Text[ greek ] = "Éäéüôçôá êáôÜóôáóçò ôñïðïðïéÞèçêå";
+ Text[ korean ] = "»óÅ µî·ÏÁ¤º¸ º¯°æ";
+ Text[ arabic ] = "Êã ÊÛííÑ ÎÇÕíÉ ÇáÍÇáÉ";
+ Text[ turkish ] = "Durum özellikleri deðiþtirildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_RESETTED
+{
+ Text = "Nach dem Zurücksetzen" ;
+ Text [ English ] = "After reset" ;
+ Text [ portuguese ] = "Depois de restaurar" ;
+ Text [ english_us ] = "After resetting" ;
+ Text [ portuguese_brazilian ] = "Zurückgesetzt" ;
+ Text [ swedish ] = "Efter återställning" ;
+ Text [ danish ] = "Efter nulstilling" ;
+ Text [ italian ] = "Dopo aver ripristinato" ;
+ Text [ spanish ] = "Después de restaurar" ;
+ Text [ french ] = "Après la restauration" ;
+ Text [ dutch ] = "Na het terugzetten" ;
+ Text[ chinese_simplified ] = "ÖØÐÂÉ趨֮ºó";
+ Text[ russian ] = "Ïîñëå âîññòàíîâëåíèÿ";
+ Text[ polish ] = "Po cofniêciu";
+ Text[ japanese ] = "ؾ¯Ä‚µ‚½Œã";
+ Text[ chinese_traditional ] = "­«³]¤§«á";
+ Text[ greek ] = "ÌåôÜ ôçí åðáíáöïñÜ";
+ Text[ korean ] = "¿ø·¡´ë·Î ÇÑ ÈÄ¿¡";
+ Text[ arabic ] = "ÈÚÏ ÅÚÇÏÉ ÇáÊÚííä";
+ Text[ turkish ] = "Geri almadan sonra";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_EVT_APPROVERESETTED
+{
+ Text = "Vor dem Zurücksetzen" ;
+ Text [ English ] = "Approve resetted" ;
+ Text [ portuguese ] = "Antes de restaurar" ;
+ Text [ english_us ] = "Prior to Reset" ;
+ Text [ portuguese_brazilian ] = "Zurückgesetzt" ;
+ Text [ swedish ] = "Innan återställning" ;
+ Text [ danish ] = "Inden nulstilning" ;
+ Text [ italian ] = "Prima di ripristinare" ;
+ Text [ spanish ] = "Antes de restablecer" ;
+ Text [ french ] = "Avant la restauration" ;
+ Text [ dutch ] = "Voor het terugzetten" ;
+ Text[ chinese_simplified ] = "ÔÚÖØÉè֮ǰ";
+ Text[ russian ] = "Ïåðåä âîññòàíîâëåíèåì";
+ Text[ polish ] = "Przed zresetowaniem";
+ Text[ japanese ] = "ؾ¯Ä‚Ì‘O";
+ Text[ chinese_traditional ] = "¦b­«³]¤§«e";
+ Text[ greek ] = "Ðñéí ôçí åðáíáöïñÜ";
+ Text[ korean ] = "º¹¿øÇϱâ Àü¿¡";
+ Text[ arabic ] = "ÞÈá ÇáÇÓÊÚÇÏÉ";
+ Text[ turkish ] = "Geri almadan önce";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_EVT_APPROVEACTIONPERFORMED
+{
+ Text = "Vor dem Auslösen" ;
+ Text [ English ] = "Before click" ;
+ Text [ portuguese ] = "Antes de executar" ;
+ Text [ english_us ] = "Before commencing" ;
+ Text [ portuguese_brazilian ] = "Aktion ausgelöst" ;
+ Text [ swedish ] = "Innan utförande" ;
+ Text [ danish ] = "Inden udførelse" ;
+ Text [ italian ] = "Prima dell'esecuzione" ;
+ Text [ spanish ] = "antes de ejecutar" ;
+ Text [ french ] = "Avant le déclenchement" ;
+ Text [ dutch ] = "Voor het oproepen" ;
+ Text[ chinese_simplified ] = "ÔÚ²Ù×÷֮ǰ";
+ Text[ russian ] = "Ïåðåä âûïîëíåíèåì";
+ Text[ polish ] = "Przed wykonaniem";
+ Text[ japanese ] = "ì“®‘O";
+ Text[ chinese_traditional ] = "¦b¾Þ§@¤§«e";
+ Text[ greek ] = "Ðñéí ôçí åêôÝëåóç";
+ Text[ korean ] = "ÀÛµ¿ Àü¿¡";
+ Text[ arabic ] = "ÞÈá ÈÏÁ ÇáÅÌÑÇÁ";
+ Text[ turkish ] = "Baþlatmadan önce";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_EVT_SUBMITTED
+{
+ Text = "Vor dem Submit" ;
+ Text [ English ] = "Before submit" ;
+ Text [ english_us ] = "Before submitting" ;
+ Text[ portuguese ] = "Antes de submeter";
+ Text[ russian ] = "Ïåðåä ïîäòâåðæäåíèåì";
+ Text[ greek ] = "Ðñéí ôçí õðïâïëÞ";
+ Text[ dutch ] = "Voor submit";
+ Text[ french ] = "Avant l'envoi";
+ Text[ spanish ] = "Antes del envío";
+ Text[ italian ] = "Prima dell'invio";
+ Text[ danish ] = "Inden submitting";
+ Text[ swedish ] = "Innan sändning";
+ Text[ polish ] = "Przed submitem";
+ Text[ portuguese_brazilian ] = "Submit";
+ Text[ japanese ] = "»ÌÞЯĂ·‚é‘O";
+ Text[ korean ] = "Àü¼ÛÇϱâ Àü¿¡";
+ Text[ chinese_simplified ] = "Ìύ֮ǰ";
+ Text[ chinese_traditional ] = "´£¥æ¤§«e";
+ Text[ arabic ] = "ÞÈá ÇáÅÑÓÇá";
+ Text[ turkish ] = "Göndermeden önce";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_EVT_TEXTCHANGED
+{
+ Text = "Text modifiziert" ;
+ Text [ English ] = "Text changed" ;
+ Text [ portuguese ] = "Texto modificado" ;
+ Text [ english_us ] = "Text modified" ;
+ Text [ portuguese_brazilian ] = "Text modifiziert" ;
+ Text [ swedish ] = "Text modifierad" ;
+ Text [ danish ] = "Tekst ændret" ;
+ Text [ italian ] = "Testo modificato" ;
+ Text [ spanish ] = "Texto modificado" ;
+ Text [ french ] = "Texte modifié" ;
+ Text [ dutch ] = "Tekst gemodificeerd" ;
+ Text[ chinese_simplified ] = "ÎÄ×ÖÒѾ­ÐÞ¸Ä";
+ Text[ russian ] = "Òåêñò èçìåíåí";
+ Text[ polish ] = "Zmodyfikowany tekst";
+ Text[ japanese ] = "÷½Ä‚Ì•ÏX";
+ Text[ chinese_traditional ] = "¤å¦r¤w¸g­×§ï";
+ Text[ greek ] = "Ôñïðïðïßçóç êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® º¯°æ";
+ Text[ arabic ] = "Êã ÊÚÏíá ÇáäÕ";
+ Text[ turkish ] = "Metin deðiþtirildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_UNLOADED
+{
+ Text = "Beim Entladen" ;
+ Text [ English ] = "When unloading" ;
+ Text [ portuguese ] = "Ao descarregar" ;
+ Text [ english_us ] = "When unloading" ;
+ Text [ portuguese_brazilian ] = "Beim Schließen" ;
+ Text [ swedish ] = "Vid avladdning" ;
+ Text [ danish ] = "Under afladning" ;
+ Text [ italian ] = "Durante lo scaricamento" ;
+ Text [ spanish ] = "Al descargar" ;
+ Text [ french ] = "Lors du déchargement" ;
+ Text [ dutch ] = "Bij het sluiten" ;
+ Text[ chinese_simplified ] = "ÔÚÍËжʱ";
+ Text[ russian ] = "Ïðè ðàçãðóçêå";
+ Text[ polish ] = "Przy roz³adowywaniu";
+ Text[ japanese ] = "±ÝÛ°ÄÞ‚ÌÛ";
+ Text[ chinese_traditional ] = "¦bÃö³¬®É";
+ Text[ greek ] = "ÊáôÜ ôçí åêöüñôùóç";
+ Text[ korean ] = "¾ð·ÎµåÇÒ ¶§";
+ Text[ arabic ] = "ÚäÏ ÅáÛÇÁ ÇáÊÍãíá";
+ Text[ turkish ] = "Kapatma sýrasýnda";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_UPDATECANCELED
+{
+ Text = "Update abgebrochen" ;
+ Text [ English ] = "Update canceled" ;
+ Text [ portuguese ] = "Actualização cancelada" ;
+ Text [ english_us ] = "Update canceled" ;
+ Text [ portuguese_brazilian ] = "Update abgebrochen" ;
+ Text [ swedish ] = "Uppdatering avbruten" ;
+ Text [ danish ] = "Opdatering annulleret" ;
+ Text [ italian ] = "Update interrotto" ;
+ Text [ spanish ] = "Actualización interrumpida" ;
+ Text [ french ] = "Mise à jour annulée" ;
+ Text [ dutch ] = "Update gestopt" ;
+ Text[ chinese_simplified ] = "ÒѾ­ÖжϸüÐÂ";
+ Text[ russian ] = "Îáíîâëåíèå îòìåíåíî";
+ Text[ polish ] = "Aktualizacja zosta³a anulowana";
+ Text[ japanese ] = "XV‚Ì’†Ž~";
+ Text[ chinese_traditional ] = "¤w¸g¤¤Â_§ó·s";
+ Text[ greek ] = "Áêýñùóç åíçìÝñùóçò";
+ Text[ korean ] = "¾÷Å×ÀÌÆ® Ãë¼ÒµÊ";
+ Text[ arabic ] = "Êã ÞØÚ ÚãáíÉ ÇáÊÍÏíË";
+ Text[ turkish ] = "Güncelleme iptal edildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_VETOABLECHANGE
+{
+ Text = "Ablehnbare Änderung" ;
+ Text [ English ] = "Vetoable change" ;
+ Text [ portuguese ] = "Modificação rejeitável" ;
+ Text [ english_us ] = "Rejectable modification" ;
+ Text [ portuguese_brazilian ] = "Ablehnbare Änderung" ;
+ Text [ swedish ] = "Ignorerbar ändring" ;
+ Text [ danish ] = "Ændring som kan forkastes" ;
+ Text [ italian ] = "Modifica ricusabile" ;
+ Text [ spanish ] = "Modificación rechazable" ;
+ Text [ french ] = "Modification optionnelle" ;
+ Text [ dutch ] = "Wijziging kan ongedaan worden gemaakt" ;
+ Text[ chinese_simplified ] = "¿É¾Ü¾øµÄ¸ü¸Ä";
+ Text[ russian ] = "Îòêëîíÿåìîå èçìåíåíèå";
+ Text[ polish ] = "Zmiana mo¿liwa do odrzucenia";
+ Text[ japanese ] = "‹‘”Û‚Å‚«‚é•ÏX";
+ Text[ chinese_traditional ] = "¥i©Úµ´ªºÅܧó";
+ Text[ greek ] = "ÁëëáãÝò ìå äõíáôüôçôá áðüññéøçò";
+ Text[ korean ] = "°ÅºÎ °¡´ÉÇÑ º¯°æ";
+ Text[ arabic ] = "ÊÛííÑÇÊ ããßä ÑÝÖåÇ";
+ Text[ turkish ] = "Reddedilebilir deðiþiklik";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_PUSHBUTTON
+{
+ Text = "Schaltfläche" ;
+ Text [ ENGLISH ] = "Button" ;
+ Text [ portuguese ] = "Botão" ;
+ Text [ english_us ] = "Button" ;
+ Text [ portuguese_brazilian ] = "Button" ;
+ Text [ swedish ] = "Kommandoknapp" ;
+ Text [ danish ] = "Knap" ;
+ Text [ italian ] = "Pulsante" ;
+ Text [ spanish ] = "Botón" ;
+ Text [ french ] = "Bouton" ;
+ Text [ dutch ] = "Knop" ;
+ Text[ chinese_simplified ] = "°´Å¥";
+ Text[ russian ] = "Êíîïêà";
+ Text[ polish ] = "Przycisk";
+ Text[ japanese ] = "ÎÞÀÝ";
+ Text[ chinese_traditional ] = "«ö¶s";
+ Text[ greek ] = "Ðåäßï åíôïëÞò";
+ Text[ korean ] = "¹öÆ°";
+ Text[ arabic ] = "ãÝÊÇÍ";
+ Text[ turkish ] = "Düðme";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_RADIOBUTTON
+{
+ Text = "Optionsfeld" ;
+ Text [ ENGLISH ] = "OptionButton" ;
+ Text [ portuguese ] = "Botão de selecção" ;
+ Text [ english_us ] = "Option Button" ;
+ Text [ portuguese_brazilian ] = "Radio button" ;
+ Text [ swedish ] = "Alternativfält" ;
+ Text [ danish ] = "Alternativknap" ;
+ Text [ italian ] = "Pulsante di scelta" ;
+ Text [ spanish ] = "Botón radio" ;
+ Text [ french ] = "Bouton radio" ;
+ Text [ dutch ] = "Optieveld" ;
+ Text[ chinese_simplified ] = "Ñ¡Ïî°´Å¥";
+ Text[ russian ] = "Ïåðåêëþ÷àòåëü";
+ Text[ polish ] = "Pole opcji";
+ Text[ japanese ] = "×¼ÞµÎÞÀÝ";
+ Text[ chinese_traditional ] = "¿ï¶µ«ö¶s";
+ Text[ greek ] = "Ðåäßï åðéëïãÞò";
+ Text[ korean ] = "¿É¼Ç Çʵå";
+ Text[ arabic ] = "ÒÑ ÎíÇÑ";
+ Text[ turkish ] = "Seçim alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_CHECKBOX
+{
+ Text = "Markierfeld" ;
+ Text [ ENGLISH ] = "CheckBox" ;
+ Text [ portuguese ] = "Caixa de verificação" ;
+ Text [ english_us ] = "Check Box" ;
+ Text [ portuguese_brazilian ] = "Checkbox" ;
+ Text [ swedish ] = "Markeringsfält" ;
+ Text [ danish ] = "Afkrydsningsfelt" ;
+ Text [ italian ] = "Casella di controllo" ;
+ Text [ spanish ] = "Casilla de verificación" ;
+ Text [ french ] = "Case à cocher" ;
+ Text [ dutch ] = "Markeerveld" ;
+ Text[ chinese_simplified ] = "¸´Ñ¡¿ò";
+ Text[ russian ] = "Îêíî ôëàæêà";
+ Text[ polish ] = "Pole wyboru";
+ Text[ japanese ] = "Áª¯¸ÎÞ¯¸½";
+ Text[ chinese_traditional ] = "®Ö¨ú¤è¶ô";
+ Text[ greek ] = "Ðåäßï óÞìáíóçò";
+ Text[ korean ] = "È®Àζõ";
+ Text[ arabic ] = "ÎÇäÉ ÇÎÊíÇÑ";
+ Text[ turkish ] = "Seçme kutusu";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_FIXEDTEXT
+{
+ Text = "Beschriftungsfeld" ;
+ Text [ ENGLISH ] = "Label" ;
+ Text [ portuguese ] = "Campo de rótulo" ;
+ Text [ english_us ] = "Label field" ;
+ Text [ portuguese_brazilian ] = "Fixed text" ;
+ Text [ swedish ] = "Etikettfält" ;
+ Text [ danish ] = "Etiketfelt" ;
+ Text [ italian ] = "Testo fisso" ;
+ Text [ spanish ] = "Campo de etiqueta" ;
+ Text [ french ] = "Champ d'étiquette" ;
+ Text [ dutch ] = "Titelveld" ;
+ Text[ chinese_simplified ] = "±êÇ©À¸";
+ Text[ russian ] = "Ïîëå íàäïèñè";
+ Text[ polish ] = "Pole etykiety";
+ Text[ japanese ] = "×ÍÞŲ̀°ÙÄÞ";
+ Text[ chinese_traditional ] = "¼ÐÅÒÄæ¦ì";
+ Text[ greek ] = "Ðåäßï åðéãñáöÞò";
+ Text[ korean ] = "¶óº§ Çʵå";
+ Text[ arabic ] = "ÍÞá ÚäæäÉ";
+ Text[ turkish ] = "Etiket alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_GROUPBOX
+{
+ Text = "Gruppierungsrahmen" ;
+ Text [ ENGLISH ] = "FrameControl" ;
+ Text [ portuguese ] = "Caixa de grupo" ;
+ Text [ english_us ] = "Group Box" ;
+ Text [ portuguese_brazilian ] = "Groupbox" ;
+ Text [ swedish ] = "Grupperingsram" ;
+ Text [ danish ] = "Gruppeboks" ;
+ Text [ italian ] = "Casella di gruppo" ;
+ Text [ spanish ] = "Marco de grupo" ;
+ Text [ french ] = "Zone de groupe" ;
+ Text [ dutch ] = "Groepskader" ;
+ Text[ chinese_simplified ] = "С×é¿ò";
+ Text[ russian ] = "Ðàìêà ãðóïïû";
+ Text[ polish ] = "Pole grupy";
+ Text[ japanese ] = "¸ÞÙ°ÌßÎÞ¯¸½";
+ Text[ chinese_traditional ] = "¸s²Õ¤è¶ô";
+ Text[ greek ] = "Ðëáßóéï ïìáäïðïßçóçò";
+ Text[ korean ] = "±×·ì ¹Ú½º";
+ Text[ arabic ] = "ÅØÇÑ ÊÌãíÚ";
+ Text[ turkish ] = "Grup çerçevesi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_EDIT
+{
+ Text = "Textfeld" ;
+ Text [ ENGLISH ] = "Edit" ;
+ Text [ portuguese ] = "Campo de texto" ;
+ Text [ english_us ] = "Text Box" ;
+ Text [ portuguese_brazilian ] = "Edit" ;
+ Text [ swedish ] = "Textfält" ;
+ Text [ danish ] = "Tekstfelt" ;
+ Text [ italian ] = "Campo di testo" ;
+ Text [ spanish ] = "Campo de texto" ;
+ Text [ french ] = "Zone de texte" ;
+ Text [ dutch ] = "Tekstveld" ;
+ Text[ chinese_simplified ] = "ÎÄ×Ö¿ò";
+ Text[ russian ] = "Òåêñòîâîå ïîëå";
+ Text[ polish ] = "Pole tekstowe";
+ Text[ japanese ] = "÷½ÄÎÞ¯¸½";
+ Text[ chinese_traditional ] = "¤å¦r¤è¶ô";
+ Text[ greek ] = "Ðëáßóéï êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® Çʵå";
+ Text[ arabic ] = "ÍÞá ÇáäÕ";
+ Text[ turkish ] = "Metin alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_FORMATTED
+{
+ Text = "Formatiertes Feld" ;
+ Text [ ENGLISH ] = "Formatted Field" ;
+ Text[ english_us ] = "Formatted Field";
+ Text[ portuguese ] = "Campo formatado";
+ Text[ russian ] = "Îòôîðìàòèðîâàííîå ïîëå";
+ Text[ greek ] = "ÌïñöïðïéçìÝíï ðåäßï";
+ Text[ dutch ] = "Opgemaakt veld";
+ Text[ french ] = "Champ formaté";
+ Text[ spanish ] = "Campo formateado";
+ Text[ italian ] = "Campo formattato";
+ Text[ danish ] = "Formateret felt";
+ Text[ swedish ] = "Formaterat fält";
+ Text[ polish ] = "Formatowane pole";
+ Text[ portuguese_brazilian ] = "Formatted Field";
+ Text[ japanese ] = "‘Ž®Ý’肳‚ꂽ̨°ÙÄÞ";
+ Text[ korean ] = "¼­½ÄµÈ Çʵå";
+ Text[ chinese_simplified ] = "¸ñʽ»¯µÄÇøÓò";
+ Text[ chinese_traditional ] = "®æ¦¡¤ÆªºÄæ";
+ Text[ arabic ] = "ÍÞá ãõäÓøóÞ";
+ Text[ turkish ] = "Formatlý alan";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_MOVING_CURSOR
+{
+ Text = "Datenquelle ausrichten";
+ Text [ ENGLISH ] = "align data source";
+ Text[ english_us ] = "align data source";
+ Text[ portuguese ] = "Alinhar fonte de dados";
+ Text[ russian ] = "Âûðîâíÿòü èñòî÷íèê äàííûõ";
+ Text[ greek ] = "Óôïß÷éóç ðñïÝëåõóçò äåäïìÝíùí";
+ Text[ dutch ] = "gegevensbron uitlijnen";
+ Text[ french ] = "Aligner la source de données";
+ Text[ spanish ] = "Alinear fuente de datos";
+ Text[ italian ] = "Allinea sorgente dati";
+ Text[ danish ] = "Juster datakilde";
+ Text[ swedish ] = "Justera datakälla";
+ Text[ polish ] = "Wyrównaæ Ÿród³o danych";
+ Text[ portuguese_brazilian ] = "align data source";
+ Text[ japanese ] = "ÃÞ°À¿°½‚Ì”z’u";
+ Text[ korean ] = "µ¥ÀÌÅÍ ¼Ò½º ¸ÂÃã";
+ Text[ chinese_simplified ] = "ÅÅÁÐÊý¾ÝÔ´";
+ Text[ chinese_traditional ] = "½Õ¾ã¼ÆÕu·½";
+ Text[ arabic ] = "ãÍÇÐÇÉ ãÕÏÑ ÇáÈíÇäÇÊ";
+ Text[ turkish ] = "Veri kaynaðýný hizala";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_LISTBOX
+{
+ Text = "Listenfeld" ;
+ Text [ ENGLISH ] = "ListBox" ;
+ Text [ portuguese ] = "Caixa de listagem" ;
+ Text [ english_us ] = "List Box" ;
+ Text [ portuguese_brazilian ] = "Listbox" ;
+ Text [ swedish ] = "Listruta" ;
+ Text [ danish ] = "Rulleliste" ;
+ Text [ italian ] = "Casella di riepilogo" ;
+ Text [ spanish ] = "Listado" ;
+ Text [ french ] = "Zone de liste" ;
+ Text [ dutch ] = "Keuzelijst" ;
+ Text[ chinese_simplified ] = "Áбí¿ò";
+ Text[ russian ] = "Ñïèñîê";
+ Text[ polish ] = "Pole listy";
+ Text[ japanese ] = "ؽÄÎÞ¯¸½";
+ Text[ chinese_traditional ] = "²M³æ¤è¶ô";
+ Text[ greek ] = "Ðåäßï ëßóôáò";
+ Text[ korean ] = "¸ñ·Ï Çʵå";
+ Text[ arabic ] = "ãÑÈÚ ÞÇÆãÉ";
+ Text[ turkish ] = "Liste alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_COMBOBOX
+{
+ Text = "Kombinationsfeld" ;
+ Text [ ENGLISH ] = "ComboBox" ;
+ Text [ portuguese ] = "Caixa de combinação" ;
+ Text [ english_us ] = "Combo Box" ;
+ Text [ portuguese_brazilian ] = "Combobox" ;
+ Text [ swedish ] = "Kombinationsfält" ;
+ Text [ danish ] = "Kombinationsboks" ;
+ Text [ italian ] = "Casella combinata" ;
+ Text [ spanish ] = "Campo combinado" ;
+ Text [ french ] = "Zone combinée" ;
+ Text [ dutch ] = "Combinatieveld" ;
+ Text[ chinese_simplified ] = "×éºÏ¿ò";
+ Text[ russian ] = "Ïîëå ñî ñïèñêîì";
+ Text[ polish ] = "Pole kombi";
+ Text[ japanese ] = "ºÝÎÞÎÞ¯¸½";
+ Text[ chinese_traditional ] = "²Õ¦X¤è¶ô";
+ Text[ greek ] = "Ðåäßï óõíäõáóìïý";
+ Text[ korean ] = "ÄÞº¸ ¹Ú½º";
+ Text[ arabic ] = "ãÑÈÚ ÊÍÑíÑ æÓÑÏ";
+ Text[ turkish ] = "Kombinasyon alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_IMAGEBUTTON
+{
+ Text = "Grafische Schaltfläche" ;
+ Text [ ENGLISH ] = "ImageButton" ;
+ Text [ portuguese ] = "Botão de imagem" ;
+ Text [ english_us ] = "Image Button" ;
+ Text [ portuguese_brazilian ] = "Image button" ;
+ Text [ swedish ] = "Imageknapp" ;
+ Text [ danish ] = "Grafisk knap" ;
+ Text [ italian ] = "Pulsante immagine" ;
+ Text [ spanish ] = "Botón de imagen" ;
+ Text [ french ] = "Bouton imagé" ;
+ Text [ dutch ] = "Afbeeldingenknop" ;
+ Text[ chinese_simplified ] = "ͼʽ°´Å¥";
+ Text[ russian ] = "Êíîïêà ãðàôèêè";
+ Text[ polish ] = "Przycisk graficzny";
+ Text[ japanese ] = "²Ò°¼ÞÎÞÀÝ";
+ Text[ chinese_traditional ] = "¹Ï«¬«ö¶s";
+ Text[ greek ] = "Ãñáöéêü ðåäßï åíôïëÞò";
+ Text[ korean ] = "À̹ÌÁö ¹öÆ°";
+ Text[ arabic ] = "ãÝÊÇÍ ãÕæøÑ";
+ Text[ turkish ] = "Grafiksel düðme";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_IMAGECONTROL
+{
+ Text = "Grafisches Kontrollfeld" ;
+ Text [ ENGLISH ] = "ImageControl" ;
+ Text [ portuguese ] = "Controlo gráfico" ;
+ Text [ english_us ] = "Image Control" ;
+ Text [ portuguese_brazilian ] = "Grafisches Kontrollfeld" ;
+ Text [ swedish ] = "Grafiskt kontrollfält" ;
+ Text [ danish ] = "Grafisk kontrolelement" ;
+ Text [ italian ] = "Campo di controllo immagine" ;
+ Text [ spanish ] = "Control de imagen" ;
+ Text [ french ] = "Champ de contrôle graphique" ;
+ Text [ dutch ] = "Afbeeldingscontrole" ;
+ Text[ chinese_simplified ] = "ͼʽ¿ØÖÆ×Ö¶Î";
+ Text[ russian ] = "Ãðàôè÷åñêèé ýëåìåíò óïðàâëåíèÿ";
+ Text[ polish ] = "Graficzne pole kontrolne";
+ Text[ japanese ] = "²Ò°¼ÞºÝÄÛ°Ù";
+ Text[ chinese_traditional ] = "¹Ï¦¡±±¨î¶µ";
+ Text[ greek ] = "Ãñáöéêü ðåäßï åëÝã÷ïõ";
+ Text[ korean ] = "À̹ÌÁö ÄÁÆ®·Ñ Çʵå";
+ Text[ arabic ] = "ÚäÕÑ ÊÍßã ãÑÓæã";
+ Text[ turkish ] = "Grafiksel komut öðesi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_FILECONTROL
+{
+ Text = "Dateiauswahl" ;
+ Text [ ENGLISH ] = "FileControl" ;
+ Text [ portuguese ] = "Selecção de ficheiros" ;
+ Text [ english_us ] = "File Selection" ;
+ Text [ portuguese_brazilian ] = "Dateiauswahl" ;
+ Text [ swedish ] = "Filurval" ;
+ Text [ danish ] = "Filudvalg" ;
+ Text [ italian ] = "Scelta file" ;
+ Text [ spanish ] = "Selección de archivo" ;
+ Text [ french ] = "Sélection de fichier" ;
+ Text [ dutch ] = "Bestandselectie" ;
+ Text[ chinese_simplified ] = "Ñ¡ÔñÎļþ";
+ Text[ russian ] = "Âûáîð ôàéëà";
+ Text[ polish ] = "Wybór plików";
+ Text[ japanese ] = "̧²Ù‚Ì‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾ÜÀÉ®×";
+ Text[ greek ] = "ÅðéëïãÞ áñ÷åßïõ";
+ Text[ korean ] = "ÆÄÀÏ ¼±ÅÃ";
+ Text[ arabic ] = "ÇÎÊíÇÑ ÇáãáÝ";
+ Text[ turkish ] = "Dosya seçimi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_DATEFIELD
+{
+ Text = "Datumsfeld" ;
+ Text [ ENGLISH ] = "DateField" ;
+ Text [ portuguese ] = "Campo para data" ;
+ Text [ english_us ] = "Date Field" ;
+ Text [ portuguese_brazilian ] = "Datumsfeld" ;
+ Text [ swedish ] = "Datumfält" ;
+ Text [ danish ] = "Datofelt" ;
+ Text [ italian ] = "Campo data" ;
+ Text [ spanish ] = "Campo de fecha" ;
+ Text [ french ] = "Champ de date" ;
+ Text [ dutch ] = "Datumveld" ;
+ Text[ chinese_simplified ] = "ÈÕÆÚ×Ö¶Î";
+ Text[ russian ] = "Ïîëå äàòû";
+ Text[ polish ] = "Pole daty";
+ Text[ japanese ] = "“ú•tÎÞ¯¸½";
+ Text[ chinese_traditional ] = "¤é´ÁÄæ¦ì";
+ Text[ greek ] = "Ðåäßï çìåñïìçíßáò";
+ Text[ korean ] = "³¯Â¥ Çʵå";
+ Text[ arabic ] = "ÍÞá ÇáÊÇÑíÎ";
+ Text[ turkish ] = "Tarih alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_TIMEFIELD
+{
+ Text = "Zeitfeld" ;
+ Text [ ENGLISH ] = "TimeField" ;
+ Text [ portuguese ] = "Campo para hora" ;
+ Text [ english_us ] = "Time Field" ;
+ Text [ portuguese_brazilian ] = "Zeitfeld" ;
+ Text [ swedish ] = "Tidsfält" ;
+ Text [ danish ] = "Klokkeslætsfelt" ;
+ Text [ italian ] = "Campo orario" ;
+ Text [ spanish ] = "Campo horario" ;
+ Text [ french ] = "Champ horaire" ;
+ Text [ dutch ] = "Tijdveld" ;
+ Text[ chinese_simplified ] = "ʱ¼ä×Ö¶Î";
+ Text[ russian ] = "Ïîëå âðåìåíè";
+ Text[ polish ] = "Pole czasu";
+ Text[ japanese ] = "ŽžŠǪ̂°ÙÄÞ";
+ Text[ chinese_traditional ] = "®É¶¡Äæ¦ì";
+ Text[ greek ] = "Ðåäßï ÷ñüíïõ";
+ Text[ korean ] = "½Ã°£ Çʵå";
+ Text[ arabic ] = "ÍÞá ÇáæÞÊ";
+ Text[ turkish ] = "Zaman alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_NUMERICFIELD
+{
+ Text = "Numerisches Feld" ;
+ Text [ ENGLISH ] = "NumericField" ;
+ Text [ portuguese ] = "Campo numérico" ;
+ Text [ english_us ] = "Numeric Field" ;
+ Text [ portuguese_brazilian ] = "Numerisches Feld" ;
+ Text [ swedish ] = "Numeriskt fält" ;
+ Text [ danish ] = "Numerisk felt" ;
+ Text [ italian ] = "Campo numerico" ;
+ Text [ spanish ] = "Campo numérico" ;
+ Text [ french ] = "Champ numérique" ;
+ Text [ dutch ] = "Numeriek veld" ;
+ Text[ chinese_simplified ] = "Êý×ÖÀ¸";
+ Text[ russian ] = "×èñëîâîå ïîëå";
+ Text[ polish ] = "Pole numeryczne";
+ Text[ japanese ] = "”ŽšÎÞ¯¸½";
+ Text[ chinese_traditional ] = "¼Æ¦rÄæ¦ì";
+ Text[ greek ] = "Áñéèìçôéêü ðåäßï";
+ Text[ korean ] = "¼ýÀÚ Çʵå";
+ Text[ arabic ] = "ÍÞá ÑÞãí";
+ Text[ turkish ] = "Sayýsal alan";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_CURRENCYFIELD
+{
+ Text = "Währungsfeld" ;
+ Text [ ENGLISH ] = "CurrencyField" ;
+ Text [ portuguese ] = "Campo para moeda" ;
+ Text [ english_us ] = "Currency Field" ;
+ Text [ portuguese_brazilian ] = "Währungsfeld" ;
+ Text [ swedish ] = "Valutafält" ;
+ Text [ danish ] = "Valutafelt" ;
+ Text [ italian ] = "Campo di valuta" ;
+ Text [ spanish ] = "Campo de moneda" ;
+ Text [ french ] = "Champ monétaire" ;
+ Text [ dutch ] = "Valutaveld" ;
+ Text[ chinese_simplified ] = "»õ±Ò×Ö¶Î";
+ Text[ russian ] = "Ïîëå âàëþòû";
+ Text[ polish ] = "Pole walutowe";
+ Text[ japanese ] = "’ʉÝ̨°ÙÄÞ";
+ Text[ chinese_traditional ] = "³f¹ôÄæ¦ì";
+ Text[ greek ] = "Ðåäßï íïìßóìáôïò";
+ Text[ korean ] = "ÅëÈ­ Çʵå";
+ Text[ arabic ] = "ÍÞá ÇáÚãáÉ";
+ Text[ turkish ] = "Para birimi alaný";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_PATTERNFIELD
+{
+ Text = "Maskiertes Feld" ;
+ Text [ ENGLISH ] = "PatternField" ;
+ Text [ portuguese ] = "Campo mascarado" ;
+ Text [ english_us ] = "Pattern Field" ;
+ Text [ portuguese_brazilian ] = "Maskiertes Feld" ;
+ Text [ swedish ] = "Maskerat fält" ;
+ Text [ danish ] = "Maskeret felt" ;
+ Text [ italian ] = "Campo a maschera" ;
+ Text [ spanish ] = "Campo enmascarado" ;
+ Text [ french ] = "Champ masqué" ;
+ Text [ dutch ] = "Patroonveld" ;
+ Text[ chinese_simplified ] = "ÑÚÂëÀ¸";
+ Text[ russian ] = "Ïîëå îáðàçöà";
+ Text[ polish ] = "Pole wzorca";
+ Text[ japanese ] = "ÊßÀ°Ý̨°ÙÄÞ";
+ Text[ chinese_traditional ] = "±»½XÄæ¦ì";
+ Text[ greek ] = "ÊáëõììÝíï ðåäßï";
+ Text[ korean ] = "ÆÐÅÏ Çʵå";
+ Text[ arabic ] = "ÍÞá ãõÞäøÚ";
+ Text[ turkish ] = "Maskelenmiþ alan";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_DBGRID
+{
+ Text = "Tabellen-Kontrollfeld " ;
+ Text [ ENGLISH ] = "TableControl" ;
+ Text [ portuguese ] = "Controlo de tabelas " ;
+ Text [ english_us ] = "Table Control " ;
+ Text [ portuguese_brazilian ] = "Tabellen Control " ;
+ Text [ swedish ] = "Tabellkontrollfält " ;
+ Text [ danish ] = "Tabelkontrolelement " ;
+ Text [ italian ] = "Campo di controllo tabella " ;
+ Text [ spanish ] = "Control de tablas " ;
+ Text [ french ] = "Champ de contrôle de table " ;
+ Text [ dutch ] = "Tabelcontrole " ;
+ Text[ chinese_simplified ] = "±í¸ñ¿ØÖÆ×ֶΠ";
+ Text[ russian ] = "Ýëåìåíò óïðàâëåíèÿ òàáëèö ";
+ Text[ polish ] = "Pole kontrolne tabeli ";
+ Text[ japanese ] = "ðÌÞÙºÝÄÛ°Ù ";
+ Text[ chinese_traditional ] = "ªí®æ±±¨î¶µ ";
+ Text[ greek ] = "Ðåäßï åëÝã÷ïõ ðßíáêá ";
+ Text[ korean ] = "Å×À̺í ÄÁÆ®·Ñ Çʵå ";
+ Text[ arabic ] = "ÚäÕÑ ÇáÊÍßã ÎÇÕ ÈÇáÌÏÇæá ";
+ Text[ turkish ] = "Tablo komut öðesi ";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_PROPTITLE_MULTISELECT
+{
+ Text = "Mehrfachselektion" ;
+ Text [ ENGLISH ] = "Multiselection" ;
+ Text [ portuguese ] = "Multi-selecção" ;
+ Text [ english_us ] = "Multiselection" ;
+ Text [ portuguese_brazilian ] = "Mehrfachselektion" ;
+ Text [ swedish ] = "Multipel markering" ;
+ Text [ danish ] = "Multimarkering" ;
+ Text [ italian ] = "Selezione multipla" ;
+ Text [ spanish ] = "Selección múltiple" ;
+ Text [ french ] = "Sélection multiple" ;
+ Text [ dutch ] = "Meevoudige selectie" ;
+ Text[ chinese_simplified ] = "¶àÖØÑ¡Ôñ";
+ Text[ russian ] = "Ãðóïïîâîå âûäåëåíèå";
+ Text[ polish ] = "Wielokrotny wybór";
+ Text[ japanese ] = "•¡”‘I‘ð";
+ Text[ chinese_traditional ] = "¦h­«¿ï¾Ü";
+ Text[ greek ] = "ÐïëëáðëÞ åðéëïãÞ";
+ Text[ korean ] = "´ÙÁß ¼±ÅÃ";
+ Text[ arabic ] = "ÊÍÏíÏ ãÊÚÏÏ";
+ Text[ turkish ] = "Çoklu seçim";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_TRISTATE
+{
+ Text = "Dreifacher Status" ;
+ Text [ ENGLISH ] = "Tristate" ;
+ Text [ portuguese ] = "Estado triplo" ;
+ Text [ english_us ] = "Tristate" ;
+ Text [ portuguese_brazilian ] = "Dreifacher Status" ;
+ Text [ swedish ] = "Trefaldig status" ;
+ Text [ danish ] = "Tredobbelt status" ;
+ Text [ italian ] = "Stato triplo" ;
+ Text [ spanish ] = "Estado triple" ;
+ Text [ french ] = "Statut triple" ;
+ Text [ dutch ] = "Drievoudige status" ;
+ Text[ chinese_simplified ] = "ÈýÖØ״̬";
+ Text[ russian ] = "Òðîéíîå ñîñòîÿíèå";
+ Text[ polish ] = "Potrójny stan";
+ Text[ japanese ] = "3”{‚̽ðÀ½";
+ Text[ chinese_traditional ] = "¤T­«ª¬ºA";
+ Text[ greek ] = "ÔñéðëÞ êáôÜóôáóç";
+ Text[ korean ] = "»ïÁß »óÅÂ";
+ Text[ arabic ] = "ÍÇáÉ ËáÇËíÉ";
+ Text[ turkish ] = "Üçlü durum";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_EVT_CHANGED
+{
+ Text = "Modifiziert" ;
+ Text [ ENGLISH ] = "changed" ;
+ Text [ portuguese ] = "Modificado" ;
+ Text [ english_us ] = "changed" ;
+ Text [ portuguese_brazilian ] = "Modifiziert" ;
+ Text [ swedish ] = "Modifierad" ;
+ Text [ danish ] = "Modificeret" ;
+ Text [ italian ] = "Modificato" ;
+ Text [ spanish ] = "Modificado" ;
+ Text [ french ] = "Modifié(es)" ;
+ Text [ dutch ] = "Gemodificeerd" ;
+ Text[ chinese_simplified ] = "ÒѾ­ÐÞ¸Ä";
+ Text[ russian ] = "Èçìåíåíî";
+ Text[ polish ] = "Zmodyfikowany";
+ Text[ japanese ] = "•ÏX";
+ Text[ chinese_traditional ] = "¤w¸g­×§ï";
+ Text[ greek ] = "ÔñïðïðïéçìÝíï";
+ Text[ korean ] = "º¯°æµÊ";
+ Text[ arabic ] = "ãÚÏá";
+ Text[ turkish ] = "Deðiþtirildi";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_NODATACONTROLS
+{
+ Text = "Es existieren keine an ein gültiges Tabellenfeld gebundenen Controls im aktuellen Formular !" ;
+ Text [ ENGLISH ] = "Es existieren keine an ein gültiges Tabellenfeld gebundenen Controls im aktuellen Formular !" ;
+ Text [ portuguese ] = "Não existem quaisquer controlos unidos a um campo de tabela no formulário activo!" ;
+ Text [ english_us ] = "No data-related controls in the current form!" ;
+ Text [ portuguese_brazilian ] = "Es existieren keine an ein Tabellenfeld gebundenen Controls !" ;
+ Text [ swedish ] = "Det finns inga controls bundna till ett giltigt tabellfältet i det aktuella formuläret!" ;
+ Text [ danish ] = "Der findes ingen kontrolelementer i den aktuelle formular, som relaterer til et gyldigt tabelfelt!" ;
+ Text [ italian ] = "Non esistono controls connessi a un campo tabella valido!" ;
+ Text [ spanish ] = "¡En el formulario actual no existen controles unidos a un campo de tabla válido!" ;
+ Text [ french ] = "Il n'existe aucun caractère de contrôle lié à un champ de table correct dans le formulaire actif !" ;
+ Text [ dutch ] = "Er bestaan geen aan een tabellenveld gebonden controls in het actuele formulier!" ;
+ Text[ chinese_simplified ] = "ÔÚµ±Ç°µÄ±íµ¥ÄÚ²»´æÔÚÒ»¸öÓÐЧµÄºÍ±í¸ñ×Ö¶ÎÏàÁ¬µÄ¿ØÖÆ£¡";
+ Text[ russian ] = "Â òåêóùåì ôîðìóëÿðå ýëåìåíòû óïðàâëåíèÿ, ïðèâÿçàííûõ ê ïîëþ òàáëèöû íå ñóùåñòâóåò !";
+ Text[ polish ] = "Nie istniej¹ w aktualnym formularzu ¿adne formanty zwi¹zane z polem tabeli!";
+ Text[ japanese ] = "Œ»Ý‚ÌŒ`Ž®‚É—LŒø‚È•\\̨°ÙÄÞ‚ÉŠÖ˜A‚·‚éºÝÄÛ°Ù‚Í‚ ‚è‚Ü‚¹‚ñ!";
+ Text[ chinese_traditional ] = "·í«eªºªí³æ¨S¦³¤@­Ó¦³®Äªº©Mªí³æÄæ¦ì³sµ²ªº±±¨î¶µ¡T";
+ Text[ greek ] = "Óôç ôñÝ÷ïõóá öüñìá äåí õðÜñ÷ïõí óôïé÷åßá åëÝã÷ïõ ôá ïðïßá íá åßíáé äåóìåõìÝíá ìå Ýíá Ýãêõñï ðåäßï ðéíÜêùí!";
+ Text[ korean ] = "ÇöÀç Æû¿¡´Â À¯È¿ÇÑ Å×À̺í Çʵ忡 ¿¬°áµÈ ÄÁÆ®·ÑÀÌ ¾ø½À´Ï´Ù!";
+ Text[ arabic ] = "áÇ íæÌÏ ÚäÇÕÑ ÊÍßã ãÑÊÈØÉ ÈÍÞá ÌÏæá ÕÇáÍ Ýí ÇáÇÓÊãÇÑÉ ÇáÍÇáíÉ!";
+ Text[ turkish ] = "Yürürlükteki formda, geçerli bir tablo alanýna baðlý komut öðeleri yok!";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_HELPTEXT
+{
+ Text = "Hilfetext" ;
+ Text [ ENGLISH ] = "Helptext" ;
+ Text [ english_us ] = "Help text" ;
+ Text[ portuguese ] = "Texto de ajuda";
+ Text[ russian ] = "Òåêñò ñïðàâêè";
+ Text[ dutch ] = "Hulptekst";
+ Text[ french ] = "Texte d'aide";
+ Text[ spanish ] = "Texto de ayuda";
+ Text[ italian ] = "Testo della Guida";
+ Text[ danish ] = "Hjælp-tekst";
+ Text[ swedish ] = "Hjälptext";
+ Text[ polish ] = "Tekst pomocy";
+ Text[ portuguese_brazilian ] = "Helptext";
+ Text[ japanese ] = "ÍÙÌß÷½Ä";
+ Text[ chinese_simplified ] = "ÇóÖúÎÄ";
+ Text[ chinese_traditional ] = "»¡©ú¤å";
+ Text[ greek ] = "Êåßìåíï âïÞèåéáò";
+ Text[ korean ] = "µµ¿ò¸» ÅؽºÆ®";
+ Text[ arabic ] = "äÕ ÇáãÓÇÚÏÉ";
+ Text[ turkish ] = "Yardým metni";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_HELPURL
+{
+ Text = "Hilfe URL" ;
+ Text [ ENGLISH ] = "Help URL" ;
+ Text[ english_us ] = "Help URL";
+ Text[ portuguese ] = "URL da Ajuda";
+ Text[ russian ] = "URL ïîìîùè";
+ Text[ dutch ] = "Help URL";
+ Text[ french ] = "URL de l'aide";
+ Text[ spanish ] = "Ayuda URL";
+ Text[ italian ] = "URL della Guida";
+ Text[ danish ] = "Hjælp-URL";
+ Text[ swedish ] = "Hjälp URL";
+ Text[ polish ] = "Pomoc URL";
+ Text[ portuguese_brazilian ] = "Help URL";
+ Text[ japanese ] = "URLÍÙÌß";
+ Text[ chinese_simplified ] = "ÇóÖú URL";
+ Text[ chinese_traditional ] = "»¡©ú URL";
+ Text[ greek ] = "URL âïÞèåéáò";
+ Text[ korean ] = "URL µµ¿ò¸»";
+ Text[ arabic ] = "URL ÇáãÓÇÚÏÉ";
+ Text[ turkish ] = "URL yardýmý";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_RECORDMARKER
+{
+ Text = "Datensatzmarkierer" ;
+ Text[ english_us ] = "Record marker";
+ Text[ portuguese ] = "Marcador de registos";
+ Text[ russian ] = "Ìàðêåð çàïèñè";
+ Text[ dutch ] = "Record marker";
+ Text[ french ] = "Marqueur d'enregistrement";
+ Text[ spanish ] = "Marcador de registros";
+ Text[ italian ] = "Selezionatore record di dati";
+ Text[ danish ] = "Datapostmarkering";
+ Text[ swedish ] = "Datapostmarkör";
+ Text[ polish ] = "Znacznik rekordów";
+ Text[ portuguese_brazilian ] = "Record marker";
+ Text[ japanese ] = "Úº°ÄÞ Ï°¶°";
+ Text[ chinese_simplified ] = "Êý¾Ý±ê¼Ç";
+ Text[ chinese_traditional ] = "¸ê®Æ¼Ð°O";
+ Text[ greek ] = "ÓÞìáíóç åããñáöÞò";
+ Text[ korean ] = "·¹ÄÚµå Ç¥½Ä";
+ Text[ arabic ] = "ãõÍÏÏ ÇáÓÌá";
+ Text[ turkish ] = "Veri kümesi iþareti";
+ Text[ language_user1 ] = " ";
+};
+
+
+String RID_STR_DATETIME_LABELPOSTFIX
+{
+ Text = " (Datum); (Zeit)";
+ Text [ ENGLISH ] = " (Date); (Time)";
+ Text [ portuguese ] = "(Data); (Hora)";
+ Text [ english_us ] = "(Date); (Time)";
+ Text [ portuguese_brazilian ] = "(Data); (Hora)";
+ Text [ swedish ] = "(Datum); (Tid)";
+ Text [ danish ] = "(Dato); (Klokkeslæt)";
+ Text [ italian ] = "(Data); (Orario)";
+ Text [ spanish ] = "(Fecha); (Hora)";
+ Text [ french ] = "(Date); (Heure)";
+ Text [ dutch ] = "(Datum); (Tijd)";
+ Text[ polish ] = "(Data); (Czas)";
+ Text[ russian ] = "(Äàòà); (Âðåìÿ)";
+ Text[ greek ] = "(Çìåñïìçíßá); (¿ñá)";
+ Text[ japanese ] = "(“ú•t); (ŽžŠÔ)";
+ Text[ korean ] = "(³¯Â¥); (½Ã°£)";
+ Text[ chinese_simplified ] = "(ÈÕÆÚ)£»(ʱ¼ä)";
+ Text[ chinese_traditional ] = "(¤é´Á); (®É¶¡)";
+ Text[ arabic ] = "(ÇáÊÇÑíÎ); (ÇáæÞÊ)";
+ Text[ turkish ] = "(Tarih); (Saat)";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_FILTERPROPOSAL
+{
+ Text = "Filtervorschlag";
+ Text [ ENGLISH ] = " Filter proposal";
+ Text [ english_us ] = "Filter proposal";
+ Text[ portuguese ] = "Proposta de filtro";
+ Text[ russian ] = "Ðåêîìåíäàöèÿ ôèëüòðà";
+ Text[ greek ] = "Ðñïôåéíüìåíï ößëôñïõ";
+ Text[ dutch ] = "Filtervoorstel";
+ Text[ french ] = "Proposition de filtre";
+ Text[ spanish ] = "Propuesta de filtro";
+ Text[ italian ] = "Filtro proposto";
+ Text[ danish ] = "Filterforslag";
+ Text[ swedish ] = "Filterförslag";
+ Text[ polish ] = "Propozycja filtru";
+ Text[ portuguese_brazilian ] = "Filter proposal";
+ Text[ japanese ] = "̨ÙÀ‚ÌŒó•â";
+ Text[ korean ] = "ÇÊÅÍ Á¦¾È";
+ Text[ chinese_simplified ] = "½¨ÒéʹÓùýÂËÆ÷";
+ Text[ chinese_traditional ] = "«Øij¨Ï¥Î¹LÂo¾¹";
+ Text[ arabic ] = "ÇÞÊÑÇÍ ÝáÊÑ";
+ Text[ turkish ] = "Filtre önerisi";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_FILTER_NAVIGATOR
+{
+ Text = "Filter Navigator";
+ Text [ ENGLISH ] = " Filter navigator";
+ Text [ english_us ] = "Filter navigator";
+ Text[ portuguese ] = "Navegador de filtros";
+ Text[ russian ] = "Íàâèãàòîð ôèëüòðà";
+ Text[ greek ] = "Íavigator ößëôñïõ";
+ Text[ dutch ] = "Filter navigator";
+ Text[ french ] = "Navigateur de filtres";
+ Text[ spanish ] = "Navegador de filtros";
+ Text[ italian ] = "Navigatore filtro";
+ Text[ danish ] = "Filter Navigator";
+ Text[ swedish ] = "Filternavigator";
+ Text[ polish ] = "Nawigator filtru";
+ Text[ portuguese_brazilian ] = "Filter navigator";
+ Text[ japanese ] = "̨ÙÀ ÅËÞ¹Þ°À";
+ Text[ korean ] = "ÇÊÅÍ ³×ºñ°ÔÀÌÅÍ";
+ Text[ chinese_simplified ] = "¹ýÂËÆ÷ÖúÊÖ";
+ Text[ chinese_traditional ] = "¹LÂo¾¹ÂQ¾É";
+ Text[ arabic ] = "ãáÇÍ ÇáÝáÊÑ";
+ Text[ turkish ] = "Filtre navigatörü";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_FILTER_FILTER_FOR
+{
+ Text = "Filtern nach";
+ Text [ ENGLISH ] = " Filter for";
+ Text [ english_us ] = "Filter for";
+ Text[ portuguese ] = "Filtrar por";
+ Text[ russian ] = "Ôèëüòðèðîâàòü ïîñëå";
+ Text[ greek ] = "ÖéëôñÜñéóìá ùò ðñïò";
+ Text[ dutch ] = "Filter voor";
+ Text[ french ] = "Filtrer";
+ Text[ spanish ] = "Filtrar por";
+ Text[ italian ] = "Filtra per";
+ Text[ danish ] = "Filtrer efter";
+ Text[ swedish ] = "Filter efter";
+ Text[ polish ] = "Filtrowaæ do";
+ Text[ portuguese_brazilian ] = "Filter for";
+ Text[ japanese ] = "’ŠoðŒ";
+ Text[ korean ] = "ÇÊÅ͸µ";
+ Text[ chinese_simplified ] = "ɸѡÌõ¼þ";
+ Text[ chinese_traditional ] = "¿z¿ï¤º®e";
+ Text[ arabic ] = "ÇáÝáÊÑ Åáì";
+ Text[ turkish ] = "Filtrelenecek öðe";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_FILTER_FILTER_OR
+{
+ Text = "Oder";
+ Text [ ENGLISH ] = " Or";
+ Text [ english_us ] = "Or";
+ Text[ portuguese ] = "Ou";
+ Text[ russian ] = "Èëè";
+ Text[ greek ] = "¹";
+ Text[ dutch ] = "Of";
+ Text[ french ] = "Ou";
+ Text[ spanish ] = "O";
+ Text[ italian ] = "Oppure";
+ Text[ danish ] = "Eller";
+ Text[ swedish ] = "Eller";
+ Text[ polish ] = "Lub";
+ Text[ portuguese_brazilian ] = "Or";
+ Text[ japanese ] = "‚Ü‚½‚Í";
+ Text[ korean ] = "¶Ç´Â";
+ Text[ chinese_simplified ] = "»ò";
+ Text[ chinese_traditional ] = "©ÎªÌ";
+ Text[ arabic ] = "Ãæ";
+ Text[ turkish ] = "Veya";
+};
+
+String RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY
+{
+ Text = "Im aktuellen Formular existieren keine gültig gebundenen Controls, die für die Tabellenansicht verwendet werden könnten!";
+ Text [ ENGLISH ] = "No valid bound controls usable for the table view exist in the current form";
+ Text[ english_us ] = "Valid bound controls which can be used in the table view do not exist in the current form.";
+ Text[ portuguese ] = "No formulário actual não existem controlos ligados válidos que possam ser utilizados para a visualização da tabela!";
+ Text[ russian ] = "Â òåêóùåì ôîðìóëÿðå íå èìååòñÿ íè îäíîãî ïðàâèëüíî ñâÿçàííîãî ýëåìåíòà óïðàâëåíèÿ, êîòîðûé ìîã áû èñïîëüçîâàòüñÿ äëÿ âèäà òàáëèöû.";
+ Text[ greek ] = "Óôç ôñÝ÷ïõóá öüñìá äåí õðÜñ÷ïõí óôïé÷åßá åëÝã÷ïõ ôá ïðïßá íá åßíáé Ýãêõñá äåóìåõìÝíá êáé íá ìðïñåß íá ÷ñçóéìïðïéçèïýí ãéá ôçí ðñïâïëÞ ðéíÜêùí!";
+ Text[ dutch ] = "In het actuele formulier komen geen geldige bound controls voor die gebruikt kunnen worden voor de weergave van de tabel.";
+ Text[ french ] = "Le formulaire actif ne contient aucun contrôle correctement lié et donc susceptible d'être utilisé pour l'affichage de la table !";
+ Text[ spanish ] = "¡El formulario actual no contiene controles unidos válidos que se puedan usar para la visualización de una tabla!";
+ Text[ italian ] = "Nel formulario attuale non esistono control legati in modo valido da poter usare per la vista tabella.";
+ Text[ danish ] = "Der findes ingen gyldigt bundne kontrolelementer i det aktuelle formular, som kan bruges til tabelvisningen!";
+ Text[ swedish ] = "I det aktuella formuläret finns det inga giltigt bundna controls som kan användas för tabellvisningen!";
+ Text[ polish ] = "W aktualnym formularzu brak wa¿nych formantów, których mo¿na by by³o u¿yæ dla widoku tabeli!";
+ Text[ portuguese_brazilian ] = "No valid bound controls usable for the table view exist in the current form";
+ Text[ japanese ] = "•\\ËÞ­°‚ÉŽg—p‚Å‚«‚éAŒ‹‡‚Ì—LŒø‚ȺÝÄÛ°Ù‚ÍŒ»Ý‚ÌÌ«°Ñ‚Ì’†‚É‚ ‚è‚Ü‚¹‚ñB";
+ Text[ korean ] = "ÇöÀç Æû¿¡´Â Å×ÀÌºí º¸±â¿¡ »ç¿ëµÉ ¼ö ÀÖ´Â À¯È¿ ¹Ù¿îµå ÄÁÆ®·ÑÀÌ ¾ø½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "µ±Ç°µÄ±íµ¥ÄÚûÓпÉÓÃÓÚ±í¸ñÊÓͼµÄÓÐЧ¿Ø¼þ£¡";
+ Text[ chinese_traditional ] = "·í«eªºªí³æ¨S¦³¦³®Äªº±Ò°Êªí®æÀ˵ø¼Ò¦¡ªº±±¨î¥ó¡C";
+ Text[ arabic ] = "Ýí ÇáÇÓÊãÇÑÉ ÇáÍÇáíÉ¡ áÇ ÊæÌÏ ÚäÇÕÑ ÊÍßã ãÑÊÈØÉ ÈÔßá ÕÇáÍ íãßä ÇÓÊÎÏÇãåÇ Ýí ØÑíÞÉ ÚÑÖ ÇáÌÏæá!";
+ Text[ turkish ] = "Yürürlükteki formda, tablo görünümünde kullanýlabilecek geçerli bir biçimde baðlanmýþ komut öðeleri yok!";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_LABELCONTROL
+{
+ Text = "Beschriftungsfeld";
+ Text [ ENGLISH ] = "Label field";
+ Text[ english_us ] = "Label field";
+ Text[ portuguese ] = "Campo de rótulo";
+ Text[ russian ] = "Ïîëå ïîäïèñè";
+ Text[ greek ] = "Ðåäßï åðéãñáöÞò";
+ Text[ dutch ] = "Titelveld";
+ Text[ french ] = "Champ d'étiquette";
+ Text[ spanish ] = "Campo de etiqueta";
+ Text[ italian ] = "Testo fisso";
+ Text[ danish ] = "Etiketfelt";
+ Text[ swedish ] = "Etikettfält";
+ Text[ polish ] = "Pole etykiety";
+ Text[ portuguese_brazilian ] = "Label field";
+ Text[ japanese ] = "×ÍÞŲ̀°ÙÄÞ";
+ Text[ korean ] = "¶óº§ Çʵå";
+ Text[ chinese_simplified ] = "±êÇ©À¸";
+ Text[ chinese_traditional ] = "¼ÐÅÒÄæ¦ì";
+ Text[ arabic ] = "ÍÞá ÚäæäÉ";
+ Text[ turkish ] = "Etiket alaný";
+};
+
+String RID_STR_VETO_DATASOURCE
+{
+ Text = "Die Eigenschaft 'Datenbank' darf nicht verändert werden, da das Formular bereits Bestandteil einer Datenbank ist!";
+ Text [ ENGLISH ] = "The property 'Database' can not be changed as the form already belongs to a database!";
+ Text[ english_us ] = "The property 'Database' can not be changed as the form already belongs to a database!";
+ Text[ portuguese ] = "É impossível modificar a propriedade 'Base de dados', uma vez que o formulário já pertence a uma base de dados!";
+ Text[ russian ] = "Èçìåíèòü ñâîéñòâî 'Áàçà äàííûõ' íåëüçÿ, ïîñêîëüêó ýòîò ôîðìóëÿð ÿâëÿåòñÿ ÷àñòüþ áàçû äàííûõ!";
+ Text[ greek ] = "Ç éäéüôçôá 'ÂÜóç äåäïìÝíùí' äåí åðéôñÝðåôáé íá ôñïðïðïéçèåß åðåéäÞ ç öüñìá áðïôåëåß Þäç âáóéêü ôìÞìá ôçò âÜóçò äåäïìÝíùí!";
+ Text[ dutch ] = "De eigenschaft 'Database' mag niet worden veranderd daar het formulier reeds onderdeel is van een database.";
+ Text[ french ] = "Impossible de modifier la propriété 'Base de données' : le formulaire a déjà été intégré à une base de données !";
+ Text[ spanish ] = "¡La propiedad 'Base de datos' no se puede modificar porque el formulario ya forma parte de una base de datos!";
+ Text[ italian ] = "La proprietà 'database' non può essere cambiata in quanto il formulario è già parte del database.";
+ Text[ danish ] = "Det er ikke tilladt at ændre egenskaben 'Database', fordi formularen allerede er en del af en database!";
+ Text[ swedish ] = "Egenskapen 'Databas' får inte ändras eftersom formuläret redan är del av en databas!";
+ Text[ polish ] = "W³aœciwoœci 'Bazy danych' nie wolno zmieniaæ, poniwa¿ formularz jest ju¿ czêœci¹ bazy danych.";
+ Text[ portuguese_brazilian ] = "The property 'Database' can not be changed as the form already belongs to a database!";
+ Text[ japanese ] = "Ì«°Ñ‚ª‚·‚Å‚ÉÃÞ°ÀÍÞ°½‚Ì\\¬—v‘f‚È‚Ì‚ÅÌßÛÊßè[ÃÞ°ÀÍÞ°½]‚Í•ÏX‚Å‚«‚Ü‚¹‚ñ!";
+ Text[ korean ] = "¾ç½ÄÀÌ ÀÌ¹Ì ÇÑ µ¥ÀÌÅͺ£À̽ºÀÇ ±¸¼º¿ä¼ÒÀ̹ǷΠµî·ÏÁ¤º¸ 'µ¥ÀÌÅͺ£À̽º'¸¦ º¯°æÇÒ ¼ö ¾ø½À´Ï´Ù!";
+ Text[ chinese_simplified ] = "²»¿ÉÒÔ¸ü¸Ä¡°Êý¾Ý¿â¡±ÊôÐÔ£¬ÒòΪ±íµ¥ÒѾ­ÊÇÊý¾Ý¿âµÄ×é³É²¿·Ö£¡";
+ Text[ chinese_traditional ] = "¸ê®Æ®wÄݩʤ£¥i¥HÅܧó¡A¦]¬°ªí³æ¬O¸ê®Æ®wªº²Õ¦¨³¡¤À¡I";
+ Text[ arabic ] = "áÇ íõÓãÍ ÈÊÛííÑ ÇáÎÇÕíÉ 'ÞÇÚÏÉ ÈíÇäÇÊ'¡ áÃä ÇáÇÓÊãÇÑÉ åí ÈÇáÝÚá ÌÒÁ ãä ÞÇÚÏÉ ÈíÇäÇÊ!";
+ Text[ turkish ] = "Form bir veritabanýnýn öðesi olduðundan, 'veritabaný' özelliði deðiþtirilemez!";
+};
+
+String RID_STR_AUTOFIELD
+{
+ Text = "<AutoFeld>";
+ Text [ ENGLISH ] = "<AutoField>";
+ Text[ english_us ] = "<AutoField>";
+ Text[ portuguese ] = "<AutoCampo>";
+ Text[ russian ] = "<Àâòîïîëå>";
+ Text[ greek ] = "<ÁõôïÐåäßï>";
+ Text[ dutch ] = "<AutoVeld>";
+ Text[ french ] = "<AutoChamp>";
+ Text[ spanish ] = "<AutoCampo>";
+ Text[ italian ] = "<Campo automatico>";
+ Text[ danish ] = "<AutoFelt>";
+ Text[ swedish ] = "<AutoFält>";
+ Text[ polish ] = "<AutoPole>";
+ Text[ portuguese_brazilian ] = "<AutoField>";
+ Text[ japanese ] = "<µ°Ą̈°ÙÄÞ>";
+ Text[ korean ] = "<ÀÚµ¿ Çʵå>";
+ Text[ chinese_simplified ] = "<×Ô¶¯×Ö¶Î>";
+ Text[ chinese_traditional ] = "<¦Û°ÊÄæ¦ì>";
+ Text[ arabic ] = "<ÍÞá ÊáÞÇÆí>";
+ Text[ turkish ] = "<Otomatik alan>";
+};
+
+#define RID_STR_FILTER_FILTER_FOR (RID_FORMS_START +215)
+#define RID_STR_FILTER_FILTER_OR (RID_FORMS_START +215)
+
+
+QueryBox RID_QRY_SAVEMODIFIED
+{
+ Buttons = WB_YES_NO_CANCEL ;
+ DefButton = WB_DEF_YES ;
+ Message = "Der Inhalt des aktuellen Formulars wurde geändert.\nSollen die Änderungen gespeichert werden?" ;
+ Message [ English ] = "The content of the current form has been modified.\nDo you want to save your changes?" ;
+ Message [ english_us ] = "The content of the current form has been modified.\nDo you want to save your changes?" ;
+ Message[ portuguese ] = "O conteúdo do formulário activo foi modificado.\nGuardar modificações?";
+ Message[ russian ] = "Ñîäåðæàíèå òåêóùåãî ôîðìóëÿðà èçìåíåíî, íî íå ñîõðàíåíî.\nÑîõðàíèòü ýòè èçìåíåíèÿ?";
+ Message[ dutch ] = "De inhoud van het actuele formulier werd veranderd.\nWilt u de wijzigingen opslaan?";
+ Message[ french ] = "Le contenu du formulaire actif a été modifié.\nVoulez-vous enregistrer les modifications ?";
+ Message[ spanish ] = "El contenido del formulario actual ha sido modificado.\n¿Desea guardar los cambios?";
+ Message[ italian ] = "Il contenuto dell'attuale formulario è stato cambiato.\nSalvare le modifiche?";
+ Message[ danish ] = "Den aktuelle formulars indhold er blevet ændret.\nSkal ændringerne gemmes?";
+ Message[ swedish ] = "Innehållet i det aktuella formuläret har ändrats.\nVill Du spara ändringarna?";
+ Message[ polish ] = "Zawartoœæ aktualnego formularza zosta³a zmieniona.\nCzy zapisaæ zmiany?";
+ Message[ portuguese_brazilian ] = "The content of the current form has been modified.\nDo you want to save your changes?";
+ Message[ japanese ] = "Œ»Ý‚ÌŒ`Ž®‚Ì“à—e‚ª•ÏX‚³‚ê‚Ä‚¢‚Ü‚·B\n•ÏX‚ð•Û‘¶‚µ‚Ü‚·‚©?";
+ Message[ chinese_simplified ] = "±íµ¥µÄÄÚÈÝÒѾ­±»¸ü¸Ä¡£\nÄúÒª±£´æÕâЩ¸ü¸ÄÂð£¿";
+ Message[ chinese_traditional ] = "ªí³æ¤º®e¤w¸gÅܧó¡C\n±z­nÀx¦s³o¨ÇÅܧó¡H";
+ Message[ greek ] = "Ôï ðåñéå÷üìåíï ôçò ôñÝ÷ïõóáò öüñìáò Ý÷åé áëëÜîåé.\nÈÝëåôå íá áðïèçêåõôïýí ïé áëëáãÝò;";
+ Message[ korean ] = "ÇöÀç ÆûÀÇ ³»¿ëÀÌ º¯°æµÇ¾ú½À´Ï´Ù.\nº¯°æ »çÇ×À» ÀúÀåÇϽðڽÀ´Ï±î?";
+ Message[ arabic ] = "Êã ÊÛííÑ ãÍÊæíÇÊ ÇáÇÓÊãÇÑÉ ÇáÍÇáíÉ.\nåá ÊÑíÏ ÍÝÙ ÇáÊÛííÑÇÊ¿";
+ Message[ turkish ] = "Yürürlükteki formun içeriði deðiþtirildi.\nDeðiþiklikleri kaydetmek istiyor musunuz?";
+ Message[ language_user1 ] = " ";
+};
+String RID_STR_ESCAPE_PROCESSING
+{
+ Text = "SQL-Befehl analysieren";
+ Text [ English ] = "Analyze SQL command";
+ Text [ english_us ] = "Analyze SQL command";
+ Text[ portuguese ] = "Analisar comando SQL";
+ Text[ russian ] = "Àíàëèç êîìàíäû SQL";
+ Text[ greek ] = "ÁíÜëõóç åíôïëÞò SQL";
+ Text[ dutch ] = "SQL-opdracht analyseren";
+ Text[ french ] = "Analyser la commande SQL";
+ Text[ spanish ] = "Analizar comando SQL";
+ Text[ italian ] = "Analizza comando SQL";
+ Text[ danish ] = "Analyser SQL-kommando";
+ Text[ swedish ] = "Analysera SQL-kommando";
+ Text[ polish ] = "Analizuj polecenia SQL";
+ Text[ portuguese_brazilian ] = "direct SQL command";
+ Text[ japanese ] = "SQLºÏÝÄÞ‚Ì•ªÍ";
+ Text[ korean ] = "SQL ¸í·É ºÐ¼®";
+ Text[ chinese_simplified ] = "·ÖÎö SQL Ö¸Áî";
+ Text[ chinese_traditional ] = "¤ÀªR SQL «ü¥O";
+ Text[ arabic ] = "ÊÍáíá ÃãÑ SQL";
+ Text[ turkish ] = "SQL komutunu çözümle";
+};
+String RID_STR_COULDNOTSETORDER
+{
+ Text = "Fehler beim Setzen der Sortier-Kriterien";
+ Text [ english ] = "error setting the sort criteria";
+ Text [ english_us ] = "Error setting the sort criteria";
+ Text[ portuguese ] = "Erro ao definir critérios de ordem";
+ Text[ russian ] = "Îøèáêà ïðè óñòàíîâêå óñëîâèé ñîðòèðîâêè";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôïí ïñéóìü ôùí êñéôçñßùí ôáîéíüìçóçò";
+ Text[ dutch ] = "fout bij instellen van sorteercriteria";
+ Text[ french ] = "Erreur de définition des critères de tri";
+ Text[ spanish ] = "Error al definir los criterios de ordenación";
+ Text[ italian ] = "Errore nell'impostazione dei criteri di ordine";
+ Text[ danish ] = "Fejl ved definition af sorteringskriterierne";
+ Text[ swedish ] = "Fel vid definition av sorteringskriterier";
+ Text[ polish ] = "B³¹d podczas osadzania kryteriów sortowania";
+ Text[ portuguese_brazilian ] = "error setting the sort criteria";
+ Text[ japanese ] = "•À‚בւ¦ðŒ‚ÌÝ’è‚ÌÛ‚Ì´×°";
+ Text[ korean ] = "Á¤·Ä Á¶°Ç ¼³Á¤½Ã ¿À·ù";
+ Text[ chinese_simplified ] = "ÔÚÉ趨ÅÅÐòÌõ¼þʱ·¢Éú´íÎó";
+ Text[ chinese_traditional ] = "¦b³]©w±Æ¦C©w¸q®Éµo¥Í¿ù»~";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÊÚííä ãÚÇííÑ ÇáÝÑÒ";
+ Text[ turkish ] = "Sýralama ölçütünü belirlemede hata";
+};
+String RID_STR_COULDNOTSETFILTER
+{
+ Text = "Fehler beim Setzen der Filter-Kriterien";
+ Text [ english ] = "error setting the filter criteria";
+ Text [ english_us ] = "Error setting the filter criteria";
+ Text[ portuguese ] = "Erro ao definir critérios de filtragem";
+ Text[ russian ] = "Îøèáêà ïðè óñòàíîâêå óñëîâèé ôèëüòðà";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôïí ïñéóìü ôùí êñéôçñßùí ößëôñïõ";
+ Text[ dutch ] = "fout bij instellen van filtercriteria";
+ Text[ french ] = "Erreur de définition des critères de filtre";
+ Text[ spanish ] = "Error al definir los criterios de filtro";
+ Text[ italian ] = "Errore nell'impostazione dei criteri dei filtri";
+ Text[ danish ] = "Fejl ved definition af filterkriterierne";
+ Text[ swedish ] = "Fel vid definition av filterkriterier";
+ Text[ polish ] = "B³¹d podczas osadzania kryteriów filtra";
+ Text[ portuguese_brazilian ] = "error setting the filter criteria";
+ Text[ japanese ] = "̨ÙÀðŒ‚ÌÝ’è‚ÌÛ‚Ì´×°";
+ Text[ korean ] = "ÇÊÅÍ Á¶°Ç ¼³Á¤½Ã ¿À·ù";
+ Text[ chinese_simplified ] = "ÔÚÉ趨ɸѡÌõ¼þʱ·¢Éú´íÎó";
+ Text[ chinese_traditional ] = "¦b³]©w¿z¿ï©w¸q®Éµo¥Í¿ù»~";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÊÚííä ãÚÇííÑ ÇáÊÕÝíÉ";
+ Text[ turkish ] = "Filtreleme ölçütünü belirlemede hata";
+};
+String RID_STR_SQLEXCEPTIONTYPES
+{
+ Text = "Fehler;Warnung;Information;Details;SQL-Status;Fehler-Code";
+ Text [ english ] = "error;warning;information;details;SQL State;error code";
+ Text [ english_us ] = "Error;Warning;Information;Details;SQL status;Error code";
+ Text[ portuguese ] = "Erro;Aviso;Informação;Detalhes;Estado-SQL;Código de erro";
+ Text[ russian ] = "Îøèáêà;Ïðåäóïðåæäåíèå;Èíôîðìàöèÿ;Äåòàëè;Ñîñòîÿíèå SQL;Êîä îøèáêè";
+ Text[ greek ] = "ÓöÜëìá;åéäïðïßçóç;ðëçñïöïñßåò;ëåðôïìÝñåéåò;êôÜóôáóç SQL; êùäéêüò óöÜëìáôïò";
+ Text[ dutch ] = "fout;waarschuwing;informatie;details;SQL status; foutcode";
+ Text[ french ] = "Erreur;avertissement;information;détails;statut SQL;code d'erreur";
+ Text[ spanish ] = "Error;Aviso;Información;Detalles;Estado SQL;Código de error";
+ Text[ italian ] = "Errore;Avviso;Informazione;Dettagli;Stato SQL;Codice errato";
+ Text[ danish ] = "Fejl; Advarsel; Information;Detaljer;SQL-status;Fejlkode";
+ Text[ swedish ] = "fel;varning;information;detaljer;SQL-status; felkod";
+ Text[ polish ] = "b³¹d;ostrze¿enie;szczegó³y;stan SQL;kod b³êdu";
+ Text[ portuguese_brazilian ] = "error;warning;information;details;SQL State; error code";
+ Text[ japanese ] = "´×°;Œx;î•ñ;Ú×;SQL‚̽ðÀ½;´×°º°ÄÞ";
+ Text[ korean ] = "¿À·ù;°æ°í;Á¤º¸;»ó¼¼ÇÏ°Ô;SQL »óÅÂ; ¿À·ù ÄÚµå";
+ Text[ chinese_simplified ] = "´íÎó;¾¯¸æ;ÐÅÏ¢;ϸ½Ú;SQL״̬; ´íÎó´úÂë";
+ Text[ chinese_traditional ] = "¿ù»~;ĵ§i;¸ê°T;²Ó¸`;SQL ª¬ºA; ¿ù»~½X";
+ Text[ arabic ] = "ÎØÃ;ÊÍÐíÑ;ãÚáæãÉ;ÊÝÇÕíá;ÍÇáÉ SQL;ÑãÒ ÇáÎØÃ";
+ Text[ turkish ] = "Hata;Uyarý;Bilgi;Ayrýntýlar;SQL durumu;Hata kodu";
+};
+String RID_ERR_REFRESHING_SUB_FORM
+{
+ Text = "Die Dateninhalte des Unterformulars konnten nicht aktualisiert werden.";
+ Text [ english ] = "The data content of the sub form could not be refreshed.";
+ Text [ english_us ] = "The sub form data content could not be refreshed.";
+ Text[ portuguese ] = "Foi impossível actualizar o conteúdo dos dados do sub-formulário.";
+ Text[ russian ] = "Îáíîâèòü ñîäåðæèìîå äàííûõ ïîäôîðìóëÿðà íåâîçìîæíî.";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá ãßíåé åíçìÝñùóç ôùí ðåñéå÷ïìÝíùíá ôùí äåäïìÝíùí ôçò õðïöüñìáò.";
+ Text[ dutch ] = "De gegevens van het subformulier konden niet worden geactualiseerd.";
+ Text[ french ] = "Impossible d'actualiser le contenu des données du sous-formulaire.";
+ Text[ spanish ] = "No se pudieron actualizar los contenidos de los datos del subformulario.";
+ Text[ italian ] = "Non è stato possibile aggiornare i contenuti del formulario.";
+ Text[ danish ] = "Det var ikke muligt at opdatere underformularens dataindhold.";
+ Text[ swedish ] = "Datainnehållet i det underordnade formuläret kunde inte uppdateras.";
+ Text[ polish ] = "Nie mo¿na by³o zaktualizowaæ zawartoœci formularza podrzêdnego.";
+ Text[ portuguese_brazilian ] = "The data content of the sub form could not be refreshed.";
+ Text[ japanese ] = "»ÌÞÌ«°Ñ‚ÌÃÞ°À“à—e‚ªXV‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ korean ] = "ÇÏÀ§ ÆûÀÇ µ¥ÀÌÅÍ ³»¿ëÀ» »õ·Î °íÄ¡Áö ¸øÇß½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨¸üÐÂ×Ó±íµ¥ÄÚµÄÊý¾ÝÄÚÈÝ¡£";
+ Text[ chinese_traditional ] = "µLªk§ó·s¤lªí®æªº¸ê®Æ¤º®e";
+ Text[ arabic ] = "ÊÚÐÑ ÊÍÏíË ÇáãÍÊæíÇÊ ÇáÈíÇäíÉ ááÇÓÊãÇÑÉ ÇáÝÑÚíÉ.";
+ Text[ turkish ] = "Alt düzey formun veri içeriði güncellenemedi.";
+};
+String RID_ERR_LOADING_FORM
+{
+ Text = "Die Dateninhalte konnten nicht geladen werden.";
+ Text [ english ] = "The data content could not be loaded.";
+ Text [ english_us ] = "The data content could not be loaded.";
+ Text[ portuguese ] = "Foi impossível carregar o conteúdo dos dados.";
+ Text[ russian ] = "Çàãðóçèòü ñîäåðæèìîå äàííûõ íåâîçìîæíî.";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá ãßíåé öüñôùóç ôùí ðåñéå÷ïìÝíùí äåäïìÝíùí.";
+ Text[ dutch ] = "De gegevens konden niet worden geladen.";
+ Text[ french ] = "Impossible de charger le contenu des données.";
+ Text[ spanish ] = "No se pudieron cargar los contenidos de los datos.";
+ Text[ italian ] = "Non è stato possibile caricare i contenuti.";
+ Text[ danish ] = "Det var ikke muligt at indlæse dataindholdet.";
+ Text[ swedish ] = "Datainnehållet kunde inte laddas.";
+ Text[ polish ] = "Nie mo¿na by³o za³adowaæ zawartoœci danych.";
+ Text[ portuguese_brazilian ] = "The data content could not be loaded.";
+ Text[ japanese ] = "ÃÞ°À“à—e‚ª“Ç‚Ýž‚Ý‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ korean ] = "µ¥ÀÌÅÍ ³»¿ëÀ» ·ÎµåÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨×°ÔØÊý¾ÝÄÚÈÝ¡£";
+ Text[ chinese_traditional ] = "µLªk¸Ë¸ü¸ê®Æ¤º®e¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÊÍãíá ÇáãÍÊæíÇÊ ÇáÈíÇäíÉ.";
+ Text[ turkish ] = "Veri içeriði yüklenemedi.";
+};
+String RID_ERR_REFRESHING_FORM
+{
+ Text = "Die Dateninhalte konnten nicht aktualisiert werden.";
+ Text [ english ] = "The data content could not be refreshed.";
+ Text [ english_us ] = "The data content could not be refreshed.";
+ Text[ portuguese ] = "Foi impossível actualizar o conteúdo dos dados.";
+ Text[ russian ] = "Îáíîâèòü ñîäåðæèìîå äàííûõ íåâîçìîæíî.";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá ãßíåé åíçìÝñùóç ôùí ðåñéå÷ïìÝíùí äåäïìÝíùí.";
+ Text[ dutch ] = "De gegevens konden niet worden geactualiseerd:";
+ Text[ french ] = "Impossible d'actualiser le contenu des données.";
+ Text[ spanish ] = "No se pudieron actualizar los contenidos de los datos.";
+ Text[ italian ] = "Non è stato possibile aggiornare i contenuti.";
+ Text[ danish ] = "Det var ikke muligt at opdatere dataindholdet.";
+ Text[ swedish ] = "Datainnehållet kunde inte uppdateras.";
+ Text[ polish ] = "Nie mo¿na by³o zaktualizowaæ zawartoœci danych.";
+ Text[ portuguese_brazilian ] = "The data content could not be refreshed.";
+ Text[ japanese ] = "ÃÞ°À“à—e‚ªXV‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ korean ] = "µ¥ÀÌÅÍ ³»¿ëÀ» »õ·Î °íÄ¡Áö ¸øÇß½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨¸üÐÂÊý¾ÝÄÚÈÝ¡£";
+ Text[ chinese_traditional ] = "µLªk§ó·s¸ê®Æ¤º®e¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÊÍÏíË ÇáãÍÊæíÇÊ ÇáÈíÇäíÉ.";
+ Text[ turkish ] = "Veri içeriði güncellenemedi.";
+};
+String RID_STR_ERR_INSERTRECORD
+{
+ Text = "Fehler beim Einfügen des neuen Datensatzs";
+ Text [ english ] = "error inserting the new record";
+ Text [ english_us ] = "Error inserting the new record";
+ Text[ portuguese ] = "Erro ao inserir o novo registo de dados";
+ Text[ russian ] = "Îøèáêà ïðè ââîäå íîâîé çàïèñè";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí åéóáãùãÞ ôçò íÝáò åããñáöÞò";
+ Text[ dutch ] = "Fout bij invoegen van nieuwe record";
+ Text[ french ] = "Erreur lors de l'insertion du nouvel enregistrement";
+ Text[ spanish ] = "Error al insertar un nuevo registro de datos";
+ Text[ italian ] = "Errore nell'inserire il nuovo record di dati.";
+ Text[ danish ] = "Fejl ved indsættelse af den nye datapost";
+ Text[ swedish ] = "Fel vid infogning av den nya dataposten";
+ Text[ polish ] = "B³¹d przy wstawianiu nowego rekordu";
+ Text[ portuguese_brazilian ] = "error inserting the new record";
+ Text[ japanese ] = "V‚µ‚¢Úº°ÄÞ‚ð‘}“ü‚·‚éÛ‚Ì´×°";
+ Text[ korean ] = "»õ ·¹ÄÚµå »ðÀԽà ¿À·ù";
+ Text[ chinese_simplified ] = "ÔÚ²åÈëÐÂÊý¾ÝÌõĿʱ·¢Éú´íÎó";
+ Text[ chinese_traditional ] = "¦b´¡¤J·s¸ê®Æ±ø¥Ø®Éµo¥Í¿ù»~";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÅÏÑÇÌ ÇáÓÌá ÇáÌÏíÏ";
+ Text[ turkish ] = "Yeni veri kümesini ekleme sýrasýnda hata";
+};
+String RID_STR_ERR_UPDATERECORD
+{
+ Text = "Fehler beim Schreiben des aktuellen Datensatzes";
+ Text [ english ] = "error updating the current record";
+ Text [ english_us ] = "Error updating the current record";
+ Text[ portuguese ] = "Erro ao escrever o registo de dados activo";
+ Text[ russian ] = "Îøèáêà ïðè èçìåíåíèè òåêóùåé çàïèñè";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí åããñáöÞ ôçò ôñÝ÷ïõóáò åããñáöÞò";
+ Text[ dutch ] = "Fout bij schrijven van actuele record";
+ Text[ french ] = "Erreur lors de la saisie de l'enregistrement actif";
+ Text[ spanish ] = "Error al escribir el registro actual de datos";
+ Text[ italian ] = "Errore nello scrivere il record di dati corrente.";
+ Text[ danish ] = "Fejl ved skrivning af den aktuelle datapost";
+ Text[ swedish ] = "Fel vid skrivning av den aktuella dataposten";
+ Text[ polish ] = "B³¹d przy pisaniu aktualnego rekordu";
+ Text[ portuguese_brazilian ] = "error updating the current record";
+ Text[ japanese ] = "Œ»Ý‚ÌÚº°ÄÞ‚ð‘‚«ž‚ÞÛ‚Ì´×°";
+ Text[ korean ] = "ÇöÀç ·¹ÄÚµå ¾÷µ¥ÀÌÆ®½Ã ¿À·ù";
+ Text[ chinese_simplified ] = "ÔÚ¸üе±Ç°Êý¾ÝÌõĿʱ·¢Éú´íÎó";
+ Text[ chinese_traditional ] = "¦b¼g¤J¸ê®Æ±ø¥Ø®Éµo¥Í¿ù»~";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ßÊÇÈÉ ÇáÓÌá ÇáÍÇáí";
+ Text[ turkish ] = "Yürürlükteki veri kümesini güncelleme sýrasýnda hata";
+};
+String RID_STR_ERR_DELETERECORD
+{
+ Text = "Fehler beim Löschen des aktuellen Datensatzes";
+ Text [ english ] = "error deleting the current record";
+ Text [ english_us ] = "Error deleting the current record";
+ Text[ portuguese ] = "Erro ao eliminar o registo de dados activo";
+ Text[ russian ] = "Îøèáêà ïðè óäàëåíèè òåêóùåé çàïèñè";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí äéáãñáöÞ ôçò ôñÝ÷ïõóáò åããñáöÞò";
+ Text[ dutch ] = "Fout bij wissen van actuele record";
+ Text[ french ] = "Erreur lors de la suppression de l'enregistrement actif";
+ Text[ spanish ] = "Error al eliminar el registro actual de datos";
+ Text[ italian ] = "Errore nel cancellare il record di dati corrente.";
+ Text[ danish ] = "Fejl ved sletning af den aktuelle datapost";
+ Text[ swedish ] = "Fel vid radering av den aktuella dataposten";
+ Text[ polish ] = "B³¹d przy usuwaniu aktualnego rekordu";
+ Text[ portuguese_brazilian ] = "error deleting the current record";
+ Text[ japanese ] = "Œ»Ý‚ÌÚº°ÄÞ‚Ì휂ÌÛ‚Ì´×°";
+ Text[ korean ] = "ÇöÀç ·¹ÄÚµå »èÁ¦½Ã ¿À·ù";
+ Text[ chinese_simplified ] = "ÔÚɾ³ýµ±Ç°Êý¾ÝÌõĿʱ·¢Éú´íÎó";
+ Text[ chinese_traditional ] = "¦b§R°£¸ê®Æ±ø¥Ø®Éµo¥Í¿ù»~";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÍÐÝ ÇáÓÌá ÇáÍÇáí";
+ Text[ turkish ] = "Yürürlükteki veri kümesini silme sýrasýnda hata";
+};
+String RID_STR_ERR_DELETERECORDS
+{
+ Text = "Fehler beim Löschen der angegebenen Datensätze";
+ Text [ english ] = "error deleting the specified records";
+ Text [ english_us ] = "Error deleting the specified records";
+ Text[ portuguese ] = "Erro ao eliminar os registos de dados indicados.";
+ Text[ russian ] = "Îøèáêà ïðè óäàëåíèè çàäàííîé çàïèñè";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí äéáãñáöÞ ôùí åðéëåãìÝíùí åããñáöþí";
+ Text[ dutch ] = "Fout bij wissen van records";
+ Text[ french ] = "Erreur lors de la suppression des enregistrements spécifiés";
+ Text[ spanish ] = "Error al eliminar los registros de datos indicados.";
+ Text[ italian ] = "Errore nel cancellare i record di dati specificati.";
+ Text[ danish ] = "Fejl ved sletning af de angivne dataposter";
+ Text[ swedish ] = "Fel vid radering av de angivna dataposterna";
+ Text[ polish ] = "B³¹d przy usuwaniu podanych rekordów";
+ Text[ portuguese_brazilian ] = "error deleting the specified records";
+ Text[ japanese ] = "Žw’肵‚½Úº°ÄÞ‚Ì휂ÌÛ‚Ì´×°";
+ Text[ korean ] = "ÁöÁ¤µÈ ·¹ÄÚµå »èÁ¦½Ã ¿À·ù";
+ Text[ chinese_simplified ] = "ÔÚɾ³ýÖ¸¶¨µÄÊý¾ÝÌõĿʱ·¢Éú´íÎó";
+ Text[ chinese_traditional ] = "¦b§R°£«ü©w¸ê®Æ±ø¥Ø®Éµo¥Í¿ù»~";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÍÐÝ ÇáÓÌáÇÊ ÇáãÏÑÌÉ";
+ Text[ turkish ] = "Belirtilen veri kümelerini silme sýrasýnda hata";
+};
+String RID_STR_CONTROL_SUBSTITUTED_NAME
+{
+ Text = "ersetzt";
+ Text [ english ] = "substituted";
+ Text [ english_us ] = "substituted";
+ Text[ portuguese ] = "substituído";
+ Text[ russian ] = "çàìåíåíî";
+ Text[ greek ] = "áíôéêáôáóôÜèçêå";
+ Text[ dutch ] = "vervangen";
+ Text[ french ] = "remplace";
+ Text[ spanish ] = "reemplazado";
+ Text[ italian ] = "sostituito";
+ Text[ danish ] = "erstattet";
+ Text[ swedish ] = "ersatt";
+ Text[ polish ] = "zamieniono";
+ Text[ portuguese_brazilian ] = "substituted";
+ Text[ japanese ] = "’uŠ·";
+ Text[ korean ] = "´ëü";
+ Text[ chinese_simplified ] = "Ìæ»»";
+ Text[ chinese_traditional ] = "´À¥N";
+ Text[ arabic ] = "ãÓÊÈÏá";
+ Text[ turkish ] = "deðiþtirildi";
+};
+
+String RID_STR_CONTROL_SUBSTITUTED_EPXPLAIN
+{
+ Text = "Beim Laden dieses Controls trat ein Fehler auf. Es wurde daher durch einen Platzhalter ersetzt.";
+ Text [ english ] = "While loading this control an error occured. Thus it was replaced with a placeholder.";
+ Text [ english_us ] = "While loading this control an error occured. Therefore, it was replaced with a placeholder.";
+ Text[ portuguese ] = "Ao carregar este controlo ocorreu um erro. Por esta razão foi substituído por um marcador de posição.";
+ Text[ russian ] = "Ïðè çàãðóçêå ýòîãî ýëåìåíòà óïðàâëåíèÿ (control) ïðîèçîøëà îøèáêà. Ïîýòîìó îí áûë çàìåíåí ìåòêîé-çàïîëíèòåëåì.";
+ Text[ greek ] = "ÐñïÝêõøå óöÜëìá êáôÜ ôç öüñôùóç ôïõ óôïé÷åßïõ åëÝã÷ïõ. Ãéá áõôüí ôïí ëüãï áíôéêáôáóôÜèçêå ìå Ýíá óýìâïëï êñÜôçóçò èÝóçò.";
+ Text[ dutch ] = "Fout bjj het laden van control. Werd vervangen door plaatsvervanger.";
+ Text[ french ] = "Une erreur s'est produite lors du chargement du contrôle, qui a été remplacé par un substituant.";
+ Text[ spanish ] = "Ha ocurrido un error al cargar este Control. Por ello se ha reemplazado con un comodín.";
+ Text[ italian ] = "Durante il caricamento del control si è verificato un errore. Pertanto è stato sostituito con una variabile.";
+ Text[ danish ] = "Der opstod en fejl under indlæsningen af dette kontrolelement. Det blev derfor erstattet med en pladsholder.";
+ Text[ swedish ] = "När denna control laddades uppstod ett fel. Därför ersattes den av en platshållare.";
+ Text[ polish ] = "Wyst¹pi³ b³¹d podczas ³adowania pola kontrolnego (control). Zamieniono je dlatego na znak-wype³niacz.";
+ Text[ portuguese_brazilian ] = "While loading this control an error occured. Thus it was replaced with a placeholder.";
+ Text[ japanese ] = "‚±‚̺ÝÄÛ°Ù‚Ì“Ç‚Ýž‚Ý’†‚É´×°‚ª”­¶‚µ‚Ü‚µ‚½B‚»‚ê‚ÅܲÙÄÞ¶°ÄÞ‚É’uŠ·‚³‚ê‚Ü‚µ‚½B";
+ Text[ korean ] = "ÀÌ ÄÁÆ®·ÑÀ» ·ÎµåÇÒ ¶§ ¿À·ù°¡ ¹ß»ýÇؼ­ °³Ã¼ Ʋ·Î ´ëüµÇ¾ú½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÔÚ×°ÔØÕâ¸ö×Ö¶Îʱ³öÏÖÁËÒ»¸ö´íÎó£¬Òò´ËÓÃͨÅä·û´úÌæ×ֶΡ£";
+ Text[ chinese_traditional ] = "¦b¸Ë¸ü³o­Ó±±¨î¶µ®Éµo¥Í¤@­Ó¿ù»~¡C¦ý¤w¸g¥Î¤@­Ó³q°t²Å´À¥N¥¦¡C";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÊÍãíá ÚäÕÑ ÇáÊÍßã åÐÇ. áåÐÇ Êã ÇÓÊÈÏÇáå ÈÚäÕÑ äÇÆÈ.";
+ Text[ turkish ] = "Komut öðesi yüklenirken bir hata oluþtu. Bu nedenle komut öðesi yerine yer tutucu görüntüleniyor.";
+};
+String RID_STR_CREATECONTROLS_INVALIDSOURCE
+{
+ Text = "Sie können fuer diese Spalten in diesem Dokument keine Formular-Kontrollfelder anlegen:\n"
+ "Das Dokument gehört zu einer festen Datenbank ($docname$), die deshalb von allen Formular-Elementen als "
+ "Datenquelle benutzt wird.\n"
+ "Die von Ihnen benutzten Spalten gehören jedoch zu einer Tabelle oder Abfrage in einer anderen "
+ "Datenbank ($dropname$).";
+ Text [ english ] = "For this columns you can't create form controls within this document:\n"
+ "The document belongs to a fixed database ($docname$) which has to be used as data source for "
+ "all form elements.\n"
+ "But the columns You dropped are part of a table or query within another database ($dropname$).";
+ Text [ english_us ] = "You can't create form control fields in this document for these columns:\nThe document is part of a fixed database ($docname$) which is used as the data source by all form elements.\nThe columns used belong to a table or query in another database ($dropname$).";
+ Text[ portuguese ] = "Neste documento, é impossível criar para estas colunas campos de controlo para formulários.\nO documento pertence a uma base de dados fixa ($docname$) utilizada por todos os elementos de formulários como fonte de dados.\nAs colunas que eestá a utilizar pertencem a uma tabela ou consulta de outra base de dados ($dropname$).";
+ Text[ russian ] = "Ñîçäàòü ýëåìåíòû óïðàâëåíèÿ ôîðìóëÿðà äëÿ ñòîëáöà ýòîãî äîêóìåíòà íåâîçìîæíî:\nÝòîò äîêóìåíò îòíîñèòñÿ ê ïîñòîÿííîé áàçå äàííûõ ($docname$), êîòîðàÿ èñïîëüçóåòñÿ êàê èñòî÷íèê äàííûõ äëÿ âñåõ ýëåìåíòîâ ôîðìóëÿðà.\nÈñïîëüçóåìûå Âàìè ñòîëáöû ïðèíàäëåæàò ê òàáëèöå èëè çàïðîñó èç äðóãîé áàçû äàííûõ ($dropname$).";
+ Text[ greek ] = "Äåí åßíáé äõíáôüí íá äçìéïõñãÞóåôå óå áõôü ôï Ýããñáöï ðåäßá åëÝã÷ïõ öüñìáò ãéá áõôÝò ôéò óôÞëåò:\nÔï Ýããñáöï áíÞêåé óå ìéá óôáèåñÞ âÜóç äåäïìÝíùí ($docname$) ç ïðïßá ÷ñçóéìïðïéåßôáé ãéá áõôü ôï ëüãï áðü üëá ôá óôïé÷åßá ôçò öüñìáò ùò ðñïÝëåõóç ôùí äåäïìÝíùí.\nÏé óôÞëåò ðïõ åðéëÝîáôå áíÞêïõí üìùò óå Ýíáí ðßíáêá Þ Ýíá åñþôçìá êÜðïéáò Üëëçò âÜóçò äåäïìÝíùí ($dropname$).";
+ Text[ dutch ] = "U kunt voor deze kolommen in dit document geen formuliercontrolevelden maken:\nhet document behoort tot een vaste database ($docname$), die daarom door alle formulierelementen als gegevensbron wordt gebruikt.\nDe door u gebruikte kolommen horen echter bij een tabel of query in een andere database ($docname$).";
+ Text[ french ] = "Aucun champ de contrôle de formulaire ne peut être créé pour ces colonnes dans ce document :\ncelui-ci appartient à une base de données fixe ($docname$) qui est utilisée comme source de données par tous les éléments de formulaire.\nLes colonnes que vous utilisez font cependant partie d'une table ou d'une requête appartenant à une autre base de données ($dropname$).";
+ Text[ spanish ] = "Para estas columnas en este documento no puede crear campos de control:\nEl documento pertenece a una base de datos fija ($docname$), que es usada por todos los elementos del formulario como fuente de datos.\nLas columnas que usted usa pertenecen a una tabla o consulta en otra base de datos ($dropname$).";
+ Text[ italian ] = "Nelle colonne di questo documento non è possibile creare nessun campo di controllo per i formulari.\nIl documento appartiene a un database fisso ($docname$) che, in quanto tale, viene usato da tutti gli elementi del formulario come sorgente dati.\nLe colonne da voi usate appartengono a una tabella o a una query di un altro database ($dropname$).";
+ Text[ danish ] = "Du kan ikke oprette formularkontrolelementer for kolonnerne i dette dokument:\nDokumentet hører til en fast database ($docname$), som derfor bruges som datakilde af alle formular-elementer.\nDe kolonner, du bruger, hører dog til en tabel eller forespørgsel i en anden database ($dropname$).";
+ Text[ swedish ] = "Du kan inte skapa några formulärkontrollfält för de här kolumnerna i det här dokumentet:\nDokumentet hör till en fast databas ($docname$) som används som datakälla av alla formulärelement.\nMen kolumnerna som Du använder hör till en tabell eller sökning i en annan databas ($dropname$).";
+ Text[ polish ] = "Dla kolumn w tym dokumencie nie mozna utworzyc pól kontrolnych formularza:\nDokument ten jest czescia stalej bazy danych ($docname$), która wykorzystywana jest przez wszystkie elementy formularza jako zródlo danych.\nUzywane przez ciebie kolumny sa skladnikiem tabeli lub kwerendy innej bazy danych ($dropname$).";
+ Text[ japanese ] = "‚±‚ÌÄÞ·­ÒÝÄ’†‚Å‚±‚ê‚ç‚Ì—ñ‚ÉÌ«°Ñ‚̺ÝÄÛ°Ų̀°ÙÄÞ‚ÍŠi”[‚Å‚«‚Ü‚¹‚ñ:\nÄÞ·­ÒÝĂ͌Œ肵‚½ÃÞ°ÀÍÞ°½‚ɂ‚Ȃª‚Á‚Ä‚¢‚Ä ($docname$) ‚·‚ׂĂÌÌ«°Ñ—v‘f‚©‚ç‚à‚±‚ꂪÃÞ°À¿°½‚Æ‚µ‚ÄŽg‚í‚ê‚邽‚ß‚Å‚·B\n‚Æ‚±‚낪AŽg‚í‚ꂽ—ñ‚Í•Ê‚ÌÃÞ°ÀÍÞ°½‚ÌðÌÞÙ‚©¸´Ø°‚ɂ‚Ȃª‚Á‚Ä‚¢‚Ü‚·($dropname$)B";
+ Text[ korean ] = "For this columns you can't create form controls within this document:\nThe document belongs to a fixed database ($docname$) which has to be used as data source for all form elements.\nBut the columns You dropped are part of a table or query within another database ($dropname$).";
+ Text[ chinese_simplified ] = "ÎÞ·¨ÎªÎĵµÖеÄÕâÒ»Áн¨Á¢±íµ¥¿ØÖÆ×ֶΣº\nÕâ¸öÎĵµ¹éÊôÓÚÒ»¸öÓÉËùÓÐ±íµ¥ÔªËص±×÷Êý¾ÝԴʹÓõÄÊý¾Ý¿â($docname$)¡£\nÄúʹÓõÄÕâÒ»ÁÐÈ´¹éÊôÓÚÁíÒ»¸öÊý¾Ý¿â($dropname$)ÖеÄÒ»¸ö±í¸ñ»òÕß²éѯ¡£";
+ Text[ chinese_traditional ] = "µLªk¬°³o­Ó¤å¥óªºÄæ¦ì«Ø¥ß±±¨î¶µ¡G\n³o­Ó¤å¥óÄÝ©ó¤@­Ó©T©wªº¸ê®Æ®w¡C¦]¬°©Ò¦³ªí³æª«É²³£¨Ï¥Î³o­Ó¸ê®Æ®w·½¡C\n¨Ï¥ÎªºÄæ¦ìÄÝ©ó¥t¤@­Ó¸ê®Æ®w($dropname$)ªºªí®æ©M¬d¸ß¡C";
+ Text[ arabic ] = "áÇ íãßäß ÅäÔÇÁ ÍÞæá ÊÍßã ÎÇÕÉ ÈÇÓÊãÇÑÉ Ýí åÐÇ ÇáãÓÊäÏ áåÐå ÇáÃÚãÏÉ:\níäÊãí åÐÇ ÇáãÓÊäÏ Åáì ÞÇÚÏÉ ÈíÇäÇÊ ËÇÈÊÉ ($docname$) íÊã ÇÓÊÎÏÇãåÇ ãä ÞÈá ßÇÝÉ ÚäÇÕÑ ÇáÇÓÊãÇÑÉ ßãÕÏÑ ááÈíÇäÇÊ. \nÃãÇ ÇáÃÚãÏÉ ÇáÊí ÊÓÊÎÏãåÇ Ýåí ÊäÊãí Åáì ÌÏæá Ãæ ÇÓÊÝÓÇÑ Ýí ÞÇÚÏÉ ÈíÇäÇÊ ÃÎÑì ($dropname$).";
+ Text[ portuguese_brazilian ] = "For this columns you can't create form controls within this document:\nThe document belongs to a fixed database ($docname$) which has to be used as data source for all form elements.\nBut the columns You dropped are part of a table or query within another database ($dropname$).";
+ Text[ turkish ] = "Bu sütun için form komut öðeleri oluþturamazsýnýz:\nBelge, tüm form öðeleri tarafýndan veri kaynaðý olarak kullanýlan, sabit bir veritabaný ($docname$).\nAncak sizin kullandýðýnýz sütunlar, baþka bir veritabanýndaki ($dropname$) tablo ya da sorguya ait.";
+};
+
+Resource RID_RES_CONTROL_WIZARDS_ERROR_CONTEXTS
+{
+ String RID_SUB_GRIDCONTROL_WIZARD
+ {
+ Text = "Der Tabellen-Kontrollfeld-Autopilot konnte nicht gestartet werden";
+ Text [ ENGLISH ] = "The table control AutoPilot could not be started";
+ Text [ english_us ] = "The table check box AutoPilot could not be started";
+ Text[ portuguese ] = "Foi impossível iniciar o AutoPiloto dos campos de controlo de tabelas";
+ Text[ russian ] = "Çàïóñòèòü Àâòîïèëîòà ýëåìåíòîâ óïðàâëåíèÿ òàáëèöû íå óäàåòñÿ";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá ãßíåé åêêßíçóç ôïõ ðåäßïõ åëÝã÷ïõ ðßíáêá ôïõ AutoPilot";
+ Text[ dutch ] = "De AutoPiloot voor tabelcontrole kon niet worden gestart";
+ Text[ french ] = "Impossible de lancer l'AutoPilote de champ de contrôle de table";
+ Text[ spanish ] = "No se pudo iniciar el AutoPiloto de campos de control de tablas";
+ Text[ italian ] = "Non è stato possibile avviare il Pilota automatico dei campi di controllo.";
+ Text[ danish ] = "Det var ikke muligt at starte tabelkontrolelement-AutoPiloten";
+ Text[ swedish ] = "AutoPilot för tabellkontrollfält kunde inte startas";
+ Text[ polish ] = "Nie mo¿na by³o uruchomiæ AutoPilota pola kontrolnego tabeli";
+ Text[ portuguese_brazilian ] = "The table control AutoPilot could not be started";
+ Text[ japanese ] = "•\\ºÝÄÛ°Ù µ°ÄÊ߲ۯĂͽÀ°Ä‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½";
+ Text[ korean ] = "Å×À̺í ÄÁÆ®·Ñ ÀÚµ¿ ÆÄÀÏ·µÀ» ½ÃÀÛÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨Æô¶¯±í¸ñ¿ØÖÆ×ֶεÄ×Ô¶¯ÎļþÖúÀí";
+ Text[ chinese_traditional ] = "µLªk±Ò°Êªí®æ±±¨î¶µªº¦Û°ÊÀɮקU²zµ{¦¡¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÈÏÁ ÊÔÛíá ÇáãÑÔÏ ÇáÂáí áÚäÇÕÑ ÇáÊÍßã Ýí ÇáÌÏæá";
+ Text[ turkish ] = "Tablo komut öðesi OtoPilotu baþlatýlamadý";
+ };
+ String RID_SUB_LISTBOX_WIZARD
+ {
+ Text = "Der Listenfeld-Autopilot konnte nicht gestartet werden";
+ Text [ ENGLISH ] = "The list box AutoPilot could not be started";
+ Text [ english_us ] = "The list box AutoPilot could not be started";
+ Text[ portuguese ] = "Foi impossível iniciar o AutoPiloto de caixas de listagem.";
+ Text[ russian ] = "Çàïóñòèòü Àâòîïèëîòà ñïèñêà íå óäàåòñÿ";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá åêêéíÞóåé ôï ðñüãñáììá AutoPilot ãéá ðåäßá ëßóôáò";
+ Text[ dutch ] = "De AutoPiloot voor keuzelijsten kon niet worden gestart";
+ Text[ french ] = "Impossible de lancer l'AutoPilote de zone de liste";
+ Text[ spanish ] = "No se pudo iniciar el AutoPiloto de listado";
+ Text[ italian ] = "Non è stato possibile avviare il Pilota automatico delle caselle di riepilogo.";
+ Text[ danish ] = "Det var ikke muligt at starte rulleliste-AutoPiloten";
+ Text[ swedish ] = "AutoPilot för listrutor kunde inte startas";
+ Text[ polish ] = "Nie mo¿na by³o uruchomiæ AutoPilota pola listy";
+ Text[ portuguese_brazilian ] = "The list box AutoPilot could not be started";
+ Text[ japanese ] = "ؽÄÎÞ¯¸½ µ°ÄÊ߲ۯĂͽÀ°Ä‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½";
+ Text[ korean ] = "¸ñ·Ï Çʵå ÀÚµ¿ ÆÄÀÏ·µÀ» ½ÃÀÛÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨Æô¶¯ Áбí¿ò-×Ô¶¯ÎļþÖúÀí";
+ Text[ chinese_traditional ] = "µLªk±Ò°Ê²M³æ¤è¶ô¦Û°ÊÀɮקU²zµ{¦¡¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÈÏÁ ÊÔÛíá ÇáãÑÔÏ ÇáÂáí áãÑÈÚ ÇáÞÇÆãÉ";
+ Text[ turkish ] = "Liste alaný OtoPilotu baþlatýlamadý";
+ };
+ String RID_SUB_COMBOBOX_WIZARD
+ {
+ Text = "Der Kombinationsfeld-Autopilot konnte nicht gestartet werden";
+ Text [ ENGLISH ] = "The combo box AutoPilot could not be started";
+ Text [ english_us ] = "The combo box AutoPilot could not be started";
+ Text[ portuguese ] = "Foi impossível iniciar o AutoPiloto de caixas combinadas.";
+ Text[ russian ] = "Çàïóñòèòü Àâòîïèëîòà ïîëÿ ñî ñïèñêîì íå óäàåòñÿ";
+ Text[ greek ] = "Äåí Þôáí äõíáôÞ ç åêêßíçóç ôïõ AutoPilot ãéá ðåäßá óõíäõáóìïý";
+ Text[ dutch ] = "De AutoPiloot voor combinatievelden kon niet worden gestart";
+ Text[ french ] = "Impossible de lancer l'AutoPilote de zone combinée";
+ Text[ spanish ] = "No se pudo iniciar el AutoPiloto de campo combinado";
+ Text[ italian ] = "Non è stato possibile avviare il Pilota automatico delle caselle combinate.";
+ Text[ danish ] = "Det var ikke muligt at starte kombinationsboks-AutoPiloten";
+ Text[ swedish ] = "AutoPilot för kombinationsfält kunde inte startas";
+ Text[ polish ] = "Nie mo¿na by³o uruchomiæ AutoPilota pola kombi";
+ Text[ portuguese_brazilian ] = "The combo box AutoPilot could not be started";
+ Text[ japanese ] = "ºÝÎÞÎÞ¯¸½ µ°ÄÊ߲ۯĂͽÀ°Ä‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½";
+ Text[ korean ] = "ÄÞº¸ ¹Ú½º ÀÚµ¿ ÆÄÀÏ·µÀ» ½ÃÀÛÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨Æô¶¯ ×éºÏ¿ò-×Ô¶¯ÎļþÖúÀí";
+ Text[ chinese_traditional ] = "µLªk±Ò°Ê²Õ¦X¤è¶ô¦Û°ÊÀɮקU²zµ{¦¡";
+ Text[ arabic ] = "ÊÚÐÑ ÈÏÁ ÊÔÛíá ÇáãÑÔÏ ÇáÂáí áãÑÈÚ ÇáÊÍÑíÑ æÇáÓÑÏ";
+ Text[ turkish ] = "Kombinasyon alaný OtoPilotu baþlatýlamadý";
+ };
+ String RID_SUB_GROUPBOX_WIZARD
+ {
+ Text = "Der Gruppierungsrahmen-Autopilot konnte nicht gestartet werden";
+ Text [ ENGLISH ] = "The group box AutoPilot could not be started";
+ Text [ english_us ] = "The group box AutoPilot could not be started";
+ Text[ portuguese ] = "Foi impossível iniciar o AutoPiloto de caixas de grupo.";
+ Text[ russian ] = "Çàïóñòèòü Àâòîïèëîòà ðàìêè ãðóïïû íå óäàåòñÿ";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá åêêéíÞóåé ôï ðñüãñáììá AutoPilot ãéá ðëáßóéá ïìáäïðïßçóçò";
+ Text[ dutch ] = "De AutoPiloot voor groepskaders kon niet worden gestart";
+ Text[ french ] = "Impossible de lancer l'AutoPilote de zone de groupe";
+ Text[ spanish ] = "No se pudo iniciar el AutoPiloto de marcos de grupo";
+ Text[ italian ] = "Non è stato possibile avviare il Pilota automatico delle caselle di gruppo.";
+ Text[ danish ] = "Det var ikke muligt at starte gruppeboks-AutoPiloten";
+ Text[ swedish ] = "AutoPilot för grupperingsramar kunde inte startas";
+ Text[ polish ] = "Nie mo¿na by³o uruchomiæ AutoPilota ramki ugrupowañ";
+ Text[ portuguese_brazilian ] = "The group box AutoPilot could not be started";
+ Text[ japanese ] = "¸ÞÙ°ÌÞÎÞ¯¸½ µ°ÄÊ߲ۯĂͽÀ°Ä‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½";
+ Text[ korean ] = "±×·ì ¹Ú½º ÀÚµ¿ ÆÄÀÏ·µÀ» ½ÃÀÛÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨Æô¶¯ ×é¿ò-×Ô¶¯ÎļþÖúÀí";
+ Text[ chinese_traditional ] = "µLªk±Ò°Ê¸s²Õ¤è¶ô¦Û°ÊÀɮקU²zµ{¦¡";
+ Text[ arabic ] = "ÊÚÐÑ ÈÏÁ ÊÔÛíá ÇáãÑÔÏ ÇáÂáí áÅØÇÑ ÇáÊÌãíÚ";
+ Text[ turkish ] = "Grup çerçevesi OtoPilotu baþlatýlamadý";
+ };
+};
+
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
new file mode 100644
index 0000000000..c48fa9cf4a
--- /dev/null
+++ b/svx/source/form/fmtools.cxx
@@ -0,0 +1,2288 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmtools.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
+#include <com/sun/star/io/XPersistObject.hpp>
+#endif
+#ifndef _ISOLANG_HXX
+#include <tools/isolang.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
+#include <com/sun/star/lang/Locale.hpp>
+#endif
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+#ifndef _SVX_FMGLOB_HXX
+#include "fmglob.hxx"
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <wchar.h>
+
+#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_
+#include <com/sun/star/uno/XNamingService.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
+#include <com/sun/star/sdbc/XDataSource.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
+#include <com/sun/star/sdb/CommandType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
+#include <com/sun/star/sdb/XQueriesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XDATABASEENVIRONMENT_HPP_
+#include <com/sun/star/sdb/XDatabaseEnvironment.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
+#include <com/sun/star/sdb/SQLContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XRESULTSETACCESS_HPP_
+#include <com/sun/star/sdb/XResultSetAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
+#include <com/sun/star/sdbc/DataType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UTIL_NUMBERFORMAT_HPP_
+#include <com/sun/star/util/NumberFormat.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_SCRIPT_XEVENTATTACHERMANAGER_HPP_
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
+#include <com/sun/star/form/XForm.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCOMPONENT_HPP_
+#include <com/sun/star/form/XFormComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_LANGUAGE_HPP_
+#include <com/sun/star/util/Language.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATS_HPP_
+#include <com/sun/star/util/XNumberFormats.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTYPES_HPP_
+#include <com/sun/star/util/XNumberFormatTypes.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XCLONEABLE_HPP_
+#include <com/sun/star/util/XCloneable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
+#include <com/sun/star/io/XObjectInputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_
+#include <com/sun/star/io/XObjectOutputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REFLECTION_XIDLCLASS_HPP_
+#include <com/sun/star/reflection/XIdlClass.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REFLECTION_XIDLMETHOD_HPP_
+#include <com/sun/star/reflection/XIdlMethod.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XINTROSPECTION_HPP_
+#include <com/sun/star/beans/XIntrospection.hpp>
+#endif
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
+#include <com/sun/star/container/XChild.hpp>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+
+#ifndef _SBXVAR_HXX //autogen
+#include <svtools/sbxvar.hxx>
+#endif
+
+#ifndef _TOOLS_SOLMATH_HXX //autogen wg. SolarMath
+#include <tools/solmath.hxx>
+#endif
+
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _INTN_HXX //autogen
+#include <tools/intn.hxx>
+#endif
+
+#ifndef _SVX_DBERRBOX_HXX
+#include "dbmsgbox.hxx"
+#endif
+
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+
+#ifndef _SFX_BINDINGS_HXX //autogen wg. SfxBindings
+#include <sfx2/bindings.hxx>
+#endif
+
+#ifndef _SFXENUMITEM_HXX //autogen wg. SfxBoolItem
+#include <svtools/eitem.hxx>
+#endif
+
+#ifndef _SFXSTRITEM_HXX //autogen wg. SfxStringItem
+#include <svtools/stritem.hxx>
+#endif
+
+#ifndef _SVT_SDBPARSE_HXX
+#include <svtools/sdbparse.hxx>
+#endif
+
+#ifndef _CPPUHELPER_SERVICEFACTORY_HXX_
+#include <cppuhelper/servicefactory.hxx>
+#endif
+#ifndef _UTL_TYPES_HXX_
+#include <unotools/types.hxx>
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UTL_CONTAINER_HXX_
+#include <unotools/container.hxx>
+#endif
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _UTL_SEQUENCE_HXX_
+#include <unotools/sequence.hxx>
+#endif
+#ifndef _FM_STATIC_HXX_
+#include "fmstatic.hxx"
+#endif
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+#ifndef _UTL_UNO3_HXX_
+#include <unotools/uno3.hxx>
+#endif
+#ifndef _UTL_DB_EXCEPTION_HXX_
+#include <unotools/dbexception.hxx>
+#endif
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+
+
+IMPLEMENT_CONSTASCII_USTRING(DATA_MODE,"DataMode");
+IMPLEMENT_CONSTASCII_USTRING(FILTER_MODE,"FilterMode");
+
+Date STANDARD_DATE(1,1,1900);
+//------------------------------------------------------------------------------
+double ToStandardDate(const Date& rNullDate, double rVal)
+{
+ if (rNullDate != STANDARD_DATE)
+ rVal -= (STANDARD_DATE - rNullDate);
+ return rVal;
+}
+
+//------------------------------------------------------------------
+double ToNullDate(const Date& rNullDate, double rVal)
+{
+ if (rNullDate != STANDARD_DATE)
+ rVal += (STANDARD_DATE - rNullDate);
+ return rVal;
+}
+
+//------------------------------------------------------------------------------
+SdbSqlParser& getSQLParser()
+{
+ static SdbSqlParser aParser(Application::GetAppInternational().GetLanguage());
+ return aParser;
+}
+
+//==============================================================================
+//------------------------------------------------------------------------------
+void displayException(const ::utl::SQLExceptionInfo& _rError)
+{
+ ::vos::OGuard aGuard(Application::GetSolarMutex());
+ if (_rError.isKindOf(::utl::SQLExceptionInfo::SQL_EXCEPTION))
+ {
+ SvxDBMsgBox aSvxDBMsgBox(GetpApp()->GetAppWindow(), *(const ::com::sun::star::sdbc::SQLException*)_rError, WB_OK);
+ aSvxDBMsgBox.Execute();
+ }
+ else
+ {
+ DBG_ERROR("::displayException : invalid event (does not contain an ::com::sun::star::sdbc::SQLException) !");
+ ::com::sun::star::sdbc::SQLException aDummy;
+ SvxDBMsgBox aSvxDBMsgBox(GetpApp()->GetAppWindow(), aDummy, WB_OK);
+ aSvxDBMsgBox.Execute();
+ // the SvxDBMsgBox will create a default context info ("read error") for this
+ }
+}
+
+// ------------------------------------------------------------------------------
+void displayException(const ::com::sun::star::sdbc::SQLException& _rExcept, WinBits nStyle)
+{
+ ::utl::SQLExceptionInfo aInfo(_rExcept);
+ displayException(aInfo);
+}
+
+// ------------------------------------------------------------------------------
+void displayException(const ::com::sun::star::sdb::SQLErrorEvent& _rEvent, WinBits nStyle)
+{
+ ::utl::SQLExceptionInfo aInfo(_rEvent);
+ displayException(aInfo);
+}
+
+//------------------------------------------------------------------------------
+// Vergleichen von Properties
+extern "C" int
+#if defined( WNT )
+ __cdecl
+#endif
+#if defined( ICC ) && defined( OS2 )
+_Optlink
+#endif
+ PropertyCompare( const void* pFirst, const void* pSecond)
+{
+ return ((::com::sun::star::beans::Property*)pFirst)->Name.compareTo(((::com::sun::star::beans::Property*)pSecond)->Name);
+}
+
+
+
+
+
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> clone(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject>& _xObj)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xClone;
+ if (!_xObj.is())
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>();
+
+ // ::std::copy it by streaming
+
+ // creating a pipe
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream> xOutPipe(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.Pipe")), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream> xInPipe(xOutPipe, ::com::sun::star::uno::UNO_QUERY);
+
+ // creating the mark streams
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream> xMarkIn(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.MarkableInputStream")), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSink> xMarkSink(xMarkIn, ::com::sun::star::uno::UNO_QUERY);
+ xMarkSink->setInputStream(xInPipe);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream> xMarkOut(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.MarkableOutputStream")), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource> xMarkSource(xMarkOut, ::com::sun::star::uno::UNO_QUERY);
+ xMarkSource->setOutputStream(xOutPipe);
+
+ // connect mark and sink
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSink> xSink(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.ObjectInputStream")), ::com::sun::star::uno::UNO_QUERY);
+ xSink->setInputStream(xMarkIn);
+
+ // connect mark and source
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource> xSource(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.ObjectOutputStream")), ::com::sun::star::uno::UNO_QUERY);
+ xSource->setOutputStream(xMarkOut);
+
+ // write the string to source
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream> xOutStrm(xSource, ::com::sun::star::uno::UNO_QUERY);
+ xOutStrm->writeObject(_xObj);
+ xOutStrm->closeOutput();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream> xInStrm(xSink, ::com::sun::star::uno::UNO_QUERY);
+ xClone = xInStrm->readObject();
+ xInStrm->closeInput();
+
+ return xClone;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> cloneUsingProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject>& _xObj)
+{
+ if (!_xObj.is())
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>();
+
+ // create a new object
+ ::rtl::OUString aObjectService = _xObj->getServiceName();
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xDestSet(::utl::getProcessServiceFactory()->createInstance(aObjectService), ::com::sun::star::uno::UNO_QUERY);
+ if (!xDestSet.is())
+ {
+ DBG_ERROR("cloneUsingProperties : could not instantiate an object of the given type !");
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>();
+ }
+ // transfer properties
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSourceSet(_xObj, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> xSourceInfo( xSourceSet->getPropertySetInfo());
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property> aSourceProperties = xSourceInfo->getProperties();
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> xDestInfo( xDestSet->getPropertySetInfo());
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property> aDestProperties = xDestInfo->getProperties();
+ int nDestLen = aDestProperties.getLength();
+
+ ::com::sun::star::beans::Property* pSourceProps = aSourceProperties.getArray();
+ ::com::sun::star::beans::Property* pDestProps = aDestProperties.getArray();
+
+ for (sal_Int16 i=0; i<aSourceProperties.getLength(); ++i)
+ {
+ ::com::sun::star::beans::Property* pResult = (::com::sun::star::beans::Property*) bsearch(pSourceProps + i, (void*)pDestProps, nDestLen, sizeof(::com::sun::star::beans::Property),
+ &PropertyCompare);
+ if ( pResult
+ && (pResult->Attributes == pSourceProps[i].Attributes)
+ && ((pResult->Attributes & ::com::sun::star::beans::PropertyAttribute::READONLY) == 0)
+ && (pResult->Type.equals(pSourceProps[i].Type))
+ )
+ { // Attribute/type are the same and the prop isn't readonly
+ try
+ {
+ xDestSet->setPropertyValue(pResult->Name, xSourceSet->getPropertyValue(pResult->Name));
+ }
+ catch(::com::sun::star::lang::IllegalArgumentException e)
+ {
+ e;
+#ifdef DBG_UTIL
+ ::rtl::OString sMessage("cloneUsingProperties : could not transfer the value for property \"");
+ sMessage = sMessage + S(pResult->Name);
+ sMessage = sMessage + '\"';
+ DBG_ERROR(sMessage);
+#endif
+ }
+
+ }
+ }
+
+ return xDestSet;
+}
+
+//------------------------------------------------------------------------------
+void CloneForms(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& _xSource, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& _xDest)
+{
+ DBG_ASSERT(_xSource.is() && _xDest.is(), "CloneForms : invalid argument !");
+
+ sal_Int32 nSourceCount = _xSource->getCount();
+ for (sal_Int32 i=nSourceCount-1; i>=0; --i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet> xCurrent(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)_xSource->getByIndex(i).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xCurrent.is())
+ continue;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject> xCurrentPersist(xCurrent, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xCurrentPersist.is(), "CloneForms : a form should always be a PersistObject !");
+
+ // don't use a simple clone on xCurrentPersist as this would clone all childs, too
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xNewObject( cloneUsingProperties(xCurrentPersist));
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet> xNew(xNewObject, ::com::sun::star::uno::UNO_QUERY);
+ if (!xNew.is())
+ {
+ DBG_ERROR("CloneForms : could not clone a form object !");
+ ::utl::disposeComponent(xNewObject);
+ continue;
+ }
+ _xDest->insertByIndex(0, ::com::sun::star::uno::makeAny(xNew));
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> xStepIntoSource(xCurrent, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> xStepIntoDest(xNew, ::com::sun::star::uno::UNO_QUERY);
+ if (xStepIntoSource.is() && xStepIntoDest.is())
+ CloneForms(xStepIntoSource, xStepIntoDest);
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_Bool searchElement(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& xCont, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement)
+{
+ if (!xCont.is() || !xElement.is())
+ return sal_False;
+
+ sal_Int32 nCount = xCont->getCount();
+ ::com::sun::star::uno::Any aRet;
+ for (sal_Int32 i = 0; i < nCount; i++)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xComp;
+ try
+ {
+ aRet = xCont->getByIndex(i);
+ if (aRet.hasValue())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xIface(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*) aRet.getValue());
+ ::utl::query_interface(xIface, xComp);
+ if (((::com::sun::star::uno::XInterface *)xElement.get()) == (::com::sun::star::uno::XInterface*)xComp.get())
+ return sal_True;
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xCont2(xComp, ::com::sun::star::uno::UNO_QUERY);
+ if (xCont2.is() && searchElement(xCont2, xElement))
+ return sal_True;
+ }
+ }
+ }
+ catch(...)
+ {
+ }
+ }
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+sal_Int32 getElementPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& xCont, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement)
+{
+ sal_Int32 nIndex = -1;
+ if (!xCont.is())
+ return nIndex;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xToFind;
+ ::com::sun::star::uno::Type xRequestedElementClass( xCont->getElementType());
+
+ if (::utl::isA(xRequestedElementClass,(::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>*)0))
+ xToFind = ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>(xElement, ::com::sun::star::uno::UNO_QUERY);
+ else if (::utl::isA(xRequestedElementClass,(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>*)0))
+ xToFind = ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>(xElement, ::com::sun::star::uno::UNO_QUERY);
+ else if (::utl::isA(xRequestedElementClass,(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)0))
+ xToFind = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>(xElement, ::com::sun::star::uno::UNO_QUERY);
+
+ DBG_ASSERT(xToFind.is(), "Unknown Element");
+ if (xToFind.is())
+ {
+ // Feststellen an welcher Position sich das Kind befindet
+ nIndex = xCont->getCount();
+ while (nIndex--)
+ {
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xCurrent;
+ ::cppu::extractInterface(xCurrent, xCont->getByIndex(nIndex));
+ if (xToFind == xCurrent)
+ break;
+ }
+ catch(...)
+ {
+ }
+
+ }
+ }
+ return nIndex;
+}
+
+//------------------------------------------------------------------
+String getFormComponentAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xElement, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rTopLevelElement)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent> xChild(_xElement, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xParent;
+ if (xChild.is())
+ xParent = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>(xChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+
+ // while the current content is a form
+ String sReturn;
+ String sCurrentIndex;
+ while (xChild.is())
+ {
+ // get the content's relative pos within it's parent container
+ sal_Int32 nPos = getElementPos(xParent, xChild);
+
+ // prepend this current relaive pos
+ sCurrentIndex = String::CreateFromInt32(nPos);
+ if (sReturn.Len() != 0)
+ {
+ sCurrentIndex += '\\';
+ sCurrentIndex += sReturn;
+ }
+
+ sReturn = sCurrentIndex;
+
+ // travel up
+ if (::utl::query_interface((::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >)xParent,xChild))
+ xParent = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>(xChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ }
+
+ _rTopLevelElement = xParent;
+ return sReturn;
+}
+
+//------------------------------------------------------------------
+String getFormComponentAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xElement)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xDummy;
+ return getFormComponentAccessPath(_xElement, xDummy);
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> getElementFromAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xParent, const String& _rRelativePath)
+{
+ if (!_xParent.is())
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>();
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xContainer(_xParent);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xElement( _xParent);
+
+ String sPath(_rRelativePath);
+ while (sPath.Len() && xContainer.is())
+ {
+ sal_Int32 nSepPos = sPath.Search((sal_Unicode)'\\');
+
+ String sIndex(sPath.Copy(0, (nSepPos == -1) ? sPath.Len() : nSepPos));
+ // DBG_ASSERT(sIndex.IsNumeric(), "getElementFromAccessPath : invalid path !");
+
+ sPath = sPath.Copy((nSepPos == -1) ? sPath.Len() : nSepPos+1);
+
+ ::cppu::extractInterface(xElement, xContainer->getByIndex(sIndex.ToInt32()));
+ xContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>::query(xElement);
+ }
+
+ if (sPath.Len() != 0)
+ // the loop terminated because an element wasn't a container, but we stil have a path -> the path is invalid
+ xElement = NULL;
+
+ return xElement;
+}
+
+//------------------------------------------------------------------
+// Vergleichen von PropertyInfo
+extern "C" int
+#if defined( WNT )
+ __cdecl
+#endif
+#if defined( ICC ) && defined( OS2 )
+_Optlink
+#endif
+ NameCompare(const void* pFirst, const void* pSecond)
+{
+ return ((::rtl::OUString*)pFirst)->compareTo(*(::rtl::OUString*)pSecond);
+}
+
+//------------------------------------------------------------------------------
+sal_Bool hasString(const ::rtl::OUString& aStr, const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList)
+{
+ const ::rtl::OUString* pStrList = rList.getConstArray();
+ ::rtl::OUString* pResult = (::rtl::OUString*) bsearch(&aStr, (void*)pStrList, rList.getLength(), sizeof(::rtl::OUString),
+ &NameCompare);
+
+ return pResult != NULL;
+}
+
+//------------------------------------------------------------------------------
+sal_Int32 findPos(const ::rtl::OUString& aStr, const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList)
+{
+ const ::rtl::OUString* pStrList = rList.getConstArray();
+ ::rtl::OUString* pResult = (::rtl::OUString*) bsearch(&aStr, (void*)pStrList, rList.getLength(), sizeof(::rtl::OUString),
+ &NameCompare);
+
+ if (pResult)
+ return (pResult - pStrList);
+ else
+ return -1;
+}
+
+//------------------------------------------------------------------
+void ModifyPropertyAttributes(::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property>& seqProps, const ::rtl::OUString& ustrPropName, sal_Int16 nAddAttrib, sal_Int16 nRemoveAttrib)
+{
+ sal_Int32 nLen = seqProps.getLength();
+
+ // binaere Suche
+ ::com::sun::star::uno::Type type;
+ ::com::sun::star::beans::Property propSearchDummy(ustrPropName, 0, type, 0);
+ ::com::sun::star::beans::Property* pResult = (::com::sun::star::beans::Property*) bsearch(&propSearchDummy, (void*)seqProps.getArray(), nLen, sizeof(::com::sun::star::beans::Property),
+ &PropertyCompare);
+
+ // gefunden ?
+ if (pResult)
+ {
+ pResult->Attributes |= nAddAttrib;
+ pResult->Attributes &= ~nRemoveAttrib;
+ }
+}
+
+//------------------------------------------------------------------
+void RemoveProperty(::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property>& seqProps, const ::rtl::OUString& ustrPropName)
+{
+ sal_Int32 nLen = seqProps.getLength();
+
+ // binaere Suche
+ ::com::sun::star::uno::Type type;
+ ::com::sun::star::beans::Property propSearchDummy(ustrPropName, 0, type, 0);
+ const ::com::sun::star::beans::Property* pProperties = seqProps.getConstArray();
+ ::com::sun::star::beans::Property* pResult = (::com::sun::star::beans::Property*) bsearch(&propSearchDummy, (void*)pProperties, nLen, sizeof(::com::sun::star::beans::Property),
+ &PropertyCompare);
+
+ // gefunden ?
+ if (pResult)
+ {
+ DBG_ASSERT(pResult->Name == ustrPropName, "::RemoveProperty Properties nicht sortiert");
+ ::utl::removeElementAt(seqProps, pResult - pProperties);
+ }
+}
+
+//------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> getXModel(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xIface)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> xModel(xIface, ::com::sun::star::uno::UNO_QUERY);
+ if (xModel.is())
+ return xModel;
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xChild(xIface, ::com::sun::star::uno::UNO_QUERY);
+ if (xChild.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xParent( xChild->getParent());
+ return getXModel(xParent);
+ }
+ else
+ return NULL;
+ }
+}
+
+//------------------------------------------------------------------
+::rtl::OUString getLabelName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xControlModel)
+{
+ if (!xControlModel.is())
+ return ::rtl::OUString();
+
+ if (::utl::hasProperty(FM_PROP_CONTROLLABEL, xControlModel))
+ {
+ ::com::sun::star::uno::Any aLabelModel( xControlModel->getPropertyValue(FM_PROP_CONTROLLABEL) );
+ if (aLabelModel.getValueTypeClass() == ::com::sun::star::uno::TypeClass_INTERFACE)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xLabelSet(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aLabelModel.getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (xLabelSet.is() && ::utl::hasProperty(FM_PROP_LABEL, xLabelSet))
+ {
+ ::com::sun::star::uno::Any aLabel( xLabelSet->getPropertyValue(FM_PROP_LABEL) );
+ if ((aLabel.getValueTypeClass() == ::com::sun::star::uno::TypeClass_STRING) && ::utl::getString(aLabel).getLength())
+ return ::utl::getString(aLabel);
+ }
+ }
+ }
+
+ return ::utl::getString(xControlModel->getPropertyValue(FM_PROP_CONTROLSOURCE));
+}
+
+
+
+//------------------------------------------------------------------
+//sal_Bool set_impl(Reflection* pRefl, void* pData, const ::com::sun::star::uno::Any& rValue)
+//{
+// sal_Bool bRes = sal_True;
+// void* pConv = TypeConversion::to(pRefl, rValue);
+//
+// if (!pConv && pRefl->getTypeClass() != ::com::sun::star::uno::TypeClass_ANY)
+// bRes = pRefl->getTypeClass() == ::com::sun::star::uno::TypeClass_VOID;
+// else
+// {
+// switch (pRefl->getTypeClass())
+// {
+// case ::com::sun::star::uno::TypeClass_BOOLEAN:
+// *(sal_Bool*)pData = *(sal_Bool *)pConv; break;
+// case ::com::sun::star::uno::TypeClass_CHAR:
+// *(char*)pData = *(char *)pConv; break;
+// case ::com::sun::star::uno::TypeClass_STRING:
+// *(::rtl::OUString*)pData = *(::rtl::OUString *)pConv; break;
+// case ::com::sun::star::uno::TypeClass_FLOAT:
+// *(float*)pData = *(float *)pConv; break;
+// case ::com::sun::star::uno::TypeClass_DOUBLE:
+// *(double*)pData = *(double *)pConv; break;
+// case ::com::sun::star::uno::TypeClass_BYTE:
+// *(BYTE*)pData = *(BYTE *)pConv; break;
+// case ::com::sun::star::uno::TypeClass_SHORT:
+// *(sal_Int16*)pData = *(sal_Int16 *)pConv; break;
+// case ::com::sun::star::uno::TypeClass_LONG:
+// *(sal_Int32*)pData = *(sal_Int32 *)pConv; break;
+// case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT:
+// *(sal_uInt16*)pData = *(sal_uInt16 *)pConv; break;
+// case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG:
+// *(sal_uInt32*)pData = *(sal_uInt32 *)pConv; break;
+// case ::com::sun::star::uno::TypeClass_ANY:
+// *(::com::sun::star::uno::Any*)pData = rValue; break;
+// default:
+// bRes = sal_False;
+// }
+// }
+// return bRes;
+//}
+
+
+//------------------------------------------------------------------------------
+sal_uInt32 findValue(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& rList, const ::com::sun::star::uno::Any& rValue)
+{
+ sal_uInt32 nLen = rList.getLength();
+ const ::com::sun::star::uno::Any* pArray = (const ::com::sun::star::uno::Any*)rList.getConstArray();
+ sal_uInt32 i;
+ for (i = 0; i < nLen; i++)
+ {
+ if (::utl::compare(rValue, pArray[i]))
+ break;
+ }
+ return (i < nLen) ? i : LIST_ENTRY_NOTFOUND;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence<sal_Int16> findValueINT16(const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList, const ::rtl::OUString& rValue, sal_Bool bOnlyFirst )
+{
+ if( bOnlyFirst )
+ {
+ //////////////////////////////////////////////////////////////////////
+ // An welcher Position finde ich den Wert?
+ sal_Int32 nPos = -1;
+ const ::rtl::OUString* pTArray = (const ::rtl::OUString*)rList.getConstArray();
+ for (sal_uInt32 i = 0; i < rList.getLength(); i++)
+ {
+ if( rValue==pTArray[i] )
+ {
+ nPos = i;
+ break;
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // ::com::sun::star::uno::Sequence fuellen
+ if( nPos>-1 )
+ {
+ ::com::sun::star::uno::Sequence<sal_Int16> aRetSeq( 1 );
+ aRetSeq.getArray()[0] = (sal_Int16)nPos;
+
+ return aRetSeq;
+ }
+
+ return ::com::sun::star::uno::Sequence<sal_Int16>();
+
+ }
+ else
+ {
+ //////////////////////////////////////////////////////////////////////
+ // Wie oft kommt der Wert vor?
+ sal_uInt32 nCount = 0;
+ const ::rtl::OUString* pTArray = (const ::rtl::OUString*)rList.getConstArray();
+ sal_uInt32 i;
+ for (i = 0; i < rList.getLength(); i++)
+ {
+ if( rValue==pTArray[i] )
+ nCount++;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Jetzt ::com::sun::star::uno::Sequence fuellen
+ ::com::sun::star::uno::Sequence<sal_Int16> aRetSeq( nCount );
+ sal_uInt32 j = 0;
+ for (i = 0; i < rList.getLength(); i++)
+ {
+ if( rValue==pTArray[i] )
+ {
+ aRetSeq.getArray()[j] = (sal_Int16)i;
+ j++;
+ }
+ }
+
+ return aRetSeq;
+ }
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence<sal_Int16> findValue(const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList, const ::rtl::OUString& rValue, sal_Bool bOnlyFirst )
+{
+ if( bOnlyFirst )
+ {
+ //////////////////////////////////////////////////////////////////////
+ // An welcher Position finde ich den Wert?
+ sal_Int32 nPos = -1;
+ const ::rtl::OUString* pTArray = (const ::rtl::OUString*)rList.getConstArray();
+ for (sal_uInt32 i = 0; i < rList.getLength(); ++i, ++pTArray)
+ {
+ if( rValue == *pTArray )
+ {
+ nPos = i;
+ break;
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // ::com::sun::star::uno::Sequence fuellen
+ if( nPos>-1 )
+ {
+ ::com::sun::star::uno::Sequence<sal_Int16> aRetSeq( 1 );
+ aRetSeq.getArray()[0] = (sal_Int16)nPos;
+
+ return aRetSeq;
+ }
+
+ return ::com::sun::star::uno::Sequence<sal_Int16>();
+
+ }
+
+ else
+ {
+ //////////////////////////////////////////////////////////////////////
+ // Wie oft kommt der Wert vor?
+ sal_uInt32 nCount = 0;
+ const ::rtl::OUString* pTArray = (const ::rtl::OUString*)rList.getConstArray();
+ sal_uInt32 i;
+ for (i = 0; i < rList.getLength(); i++)
+ {
+ if( rValue==pTArray[i] )
+ ++nCount;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Jetzt ::com::sun::star::uno::Sequence fuellen
+ ::com::sun::star::uno::Sequence<sal_Int16> aRetSeq( nCount );
+ sal_uInt32 j = 0;
+ for (i = 0; i < rList.getLength(); i++)
+ {
+ if( rValue==pTArray[i] )
+ {
+ aRetSeq.getArray()[j] = (sal_Int16)i;
+ ++j;
+ }
+ }
+
+ return aRetSeq;
+ }
+}
+
+//------------------------------------------------------------------------------
+sal_uInt32 findValue1(const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList, const ::rtl::OUString& rValue)
+{
+ const ::rtl::OUString* pTArray = (const ::rtl::OUString*)rList.getConstArray();
+ ::rtl::OString aStr1 = S(rValue);
+ sal_uInt32 i;
+ for (i = 0; i < rList.getLength(); i++)
+ {
+ ::rtl::OString aStr2 = S(pTArray[i]);
+ if( rValue==pTArray[i] )
+ break;
+ }
+ return (i < rList.getLength()) ? i : LIST_ENTRY_NOTFOUND;
+}
+
+
+//==================================================================
+// StringConversion
+//==================================================================
+::rtl::OUString AnyToStr( const ::com::sun::star::uno::Any& aValue)
+{
+ UniString aRetStr;
+
+ switch( aValue.getValueTypeClass() )
+ {
+ case ::com::sun::star::uno::TypeClass_INTERFACE: aRetStr.AssignAscii("TYPE INTERFACE"); break;
+ case ::com::sun::star::uno::TypeClass_SERVICE: aRetStr.AssignAscii("TYPE SERVICE"); break;
+ case ::com::sun::star::uno::TypeClass_MODULE: aRetStr.AssignAscii("TYPE MODULE"); break;
+ case ::com::sun::star::uno::TypeClass_STRUCT: aRetStr.AssignAscii("TYPE STRUCT"); break;
+ case ::com::sun::star::uno::TypeClass_TYPEDEF: aRetStr.AssignAscii("TYPE TYPEDEF"); break;
+ case ::com::sun::star::uno::TypeClass_UNION: aRetStr.AssignAscii("TYPE UNION"); break;
+ case ::com::sun::star::uno::TypeClass_ENUM: aRetStr.AssignAscii("TYPE ENUM"); break;
+ case ::com::sun::star::uno::TypeClass_EXCEPTION: aRetStr.AssignAscii("TYPE EXCEPTION"); break;
+ case ::com::sun::star::uno::TypeClass_ARRAY: aRetStr.AssignAscii("TYPE ARRAY"); break;
+ case ::com::sun::star::uno::TypeClass_SEQUENCE: aRetStr.AssignAscii("TYPE SEQUENCE"); break;
+ case ::com::sun::star::uno::TypeClass_VOID: aRetStr.AssignAscii(""); break;
+ case ::com::sun::star::uno::TypeClass_ANY: aRetStr.AssignAscii("TYPE any"); break;
+ case ::com::sun::star::uno::TypeClass_UNKNOWN: aRetStr.AssignAscii("TYPE unknown"); break;
+ case ::com::sun::star::uno::TypeClass_BOOLEAN: aRetStr = ::utl::getBOOL(aValue) ? '1' : '0'; break;
+ case ::com::sun::star::uno::TypeClass_CHAR: aRetStr = String::CreateFromInt32(::utl::getINT16(aValue)); break;
+ case ::com::sun::star::uno::TypeClass_STRING: aRetStr = (const sal_Unicode*)::utl::getString(aValue); break;
+ // case ::com::sun::star::uno::TypeClass_FLOAT: SolarMath::DoubleToString( aRetStr, ::utl::getFloat(aValue), 'F', 40, '.', sal_True); break;
+ // case ::com::sun::star::uno::TypeClass_DOUBLE: SolarMath::DoubleToString( aRetStr, ::utl::getDouble(aValue), 'F', 400, '.', sal_True); break;
+ case ::com::sun::star::uno::TypeClass_FLOAT: aRetStr = String::CreateFromFloat( ::utl::getFloat(aValue));break;
+ case ::com::sun::star::uno::TypeClass_DOUBLE: aRetStr = String::CreateFromDouble( ::utl::getDouble(aValue));break;
+ // use SolarMath::DoubleToString instead of sprintf as it is more flexible
+ // with respect to the decimal digits (sprintf uses a default value for the number
+ // of dec digits and isn't able to cut trailing zeros)
+ // 67901 - 27.07.99 - FS
+ case ::com::sun::star::uno::TypeClass_BYTE: aRetStr = String::CreateFromInt32(::utl::getINT16(aValue)); break;
+ case ::com::sun::star::uno::TypeClass_SHORT: aRetStr = String::CreateFromInt32(::utl::getINT16(aValue)); break;
+ case ::com::sun::star::uno::TypeClass_LONG: aRetStr = String::CreateFromInt32(::utl::getINT32(aValue)); break;
+ case ::com::sun::star::uno::TypeClass_HYPER: aRetStr.AssignAscii("TYPE HYPER"); break;
+ case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: aRetStr = String::CreateFromInt32(::utl::getINT16(aValue)); break;
+ case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG: aRetStr = String::CreateFromInt32(::utl::getINT32(aValue)); break;
+ case ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER: aRetStr.AssignAscii("TYPE UNSIGNED_HYPER"); break;
+ }
+
+ return aRetStr;
+}
+
+// Hilfs-Funktion, um ein ::rtl::OUString in einen Any zu konvertieren
+::com::sun::star::uno::Any StringToAny( ::rtl::OUString _Str, ::com::sun::star::uno::TypeClass eTargetType )
+{
+ String aStr(_Str);
+ ::com::sun::star::uno::Any aRetAny;
+ switch( eTargetType )
+ {
+ case ::com::sun::star::uno::TypeClass_INTERFACE: break;
+ case ::com::sun::star::uno::TypeClass_SERVICE: break;
+ case ::com::sun::star::uno::TypeClass_MODULE: break;
+ case ::com::sun::star::uno::TypeClass_STRUCT: break;
+ case ::com::sun::star::uno::TypeClass_TYPEDEF: break;
+ case ::com::sun::star::uno::TypeClass_UNION: break;
+ case ::com::sun::star::uno::TypeClass_ENUM: break;
+ case ::com::sun::star::uno::TypeClass_EXCEPTION: break;
+ case ::com::sun::star::uno::TypeClass_ARRAY: break;
+ case ::com::sun::star::uno::TypeClass_SEQUENCE: break;
+ case ::com::sun::star::uno::TypeClass_VOID: break;
+ case ::com::sun::star::uno::TypeClass_ANY: break;
+ case ::com::sun::star::uno::TypeClass_UNKNOWN: break;
+ case ::com::sun::star::uno::TypeClass_BOOLEAN:
+ {
+ sal_Bool bB = (aStr.ToInt32() != 0);
+ aRetAny.setValue(&bB,getBooleanCppuType() );
+ break;
+ }
+ case ::com::sun::star::uno::TypeClass_CHAR:
+ {
+ sal_Char cC = (aStr.GetChar(0));
+ aRetAny.setValue(&cC,getCharCppuType() ); break;
+ }
+ case ::com::sun::star::uno::TypeClass_STRING: aRetAny <<= _Str; break;
+ case ::com::sun::star::uno::TypeClass_FLOAT: aRetAny <<= aStr.ToFloat(); break;
+ case ::com::sun::star::uno::TypeClass_DOUBLE: aRetAny <<= aStr.ToDouble(); break;
+ case ::com::sun::star::uno::TypeClass_BYTE: aRetAny <<= (sal_uInt8)aStr.ToInt32(); break;
+ case ::com::sun::star::uno::TypeClass_SHORT: aRetAny <<= (sal_Int16)aStr.ToInt32(); break;
+ case ::com::sun::star::uno::TypeClass_LONG: aRetAny <<= (sal_Int32)aStr.ToInt32(); break;
+ case ::com::sun::star::uno::TypeClass_HYPER: break;
+ case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: aRetAny <<= (sal_uInt16)aStr.ToInt32(); break;
+ case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG: aRetAny <<= (sal_uInt32)aStr.ToInt32(); break;
+ case ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER: break;
+ }
+ return aRetAny;
+}
+
+
+//========================================================================
+// = CursorWrapper
+//------------------------------------------------------------------------
+CursorWrapper::CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxCursor, sal_Bool bUseCloned)
+{
+ ImplConstruct(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(_rxCursor, ::com::sun::star::uno::UNO_QUERY), bUseCloned);
+}
+
+//------------------------------------------------------------------------
+CursorWrapper::CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _rxCursor, sal_Bool bUseCloned)
+{
+ ImplConstruct(_rxCursor, bUseCloned);
+}
+
+//------------------------------------------------------------------------
+void CursorWrapper::ImplConstruct(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _rxCursor, sal_Bool bUseCloned)
+{
+ if (bUseCloned)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XResultSetAccess> xAccess(_rxCursor, ::com::sun::star::uno::UNO_QUERY);
+ try
+ {
+ m_xMoveOperations = xAccess.is() ? xAccess->createResultSet() : ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>();
+ }
+ catch(...)
+ {
+ }
+ }
+ else
+ m_xMoveOperations = _rxCursor;
+
+ m_xBookmarkOperations = ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate>(m_xMoveOperations, ::com::sun::star::uno::UNO_QUERY);
+ m_xColumnsSupplier = ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>(m_xMoveOperations, ::com::sun::star::uno::UNO_QUERY);
+
+ if (!m_xMoveOperations.is() || !m_xBookmarkOperations.is() || !m_xColumnsSupplier.is())
+ { // all or nothing !!
+ m_xMoveOperations = NULL;
+ m_xBookmarkOperations = NULL;
+ m_xColumnsSupplier = NULL;
+ }
+}
+
+//------------------------------------------------------------------------
+const CursorWrapper& CursorWrapper::operator=(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxCursor)
+{
+ m_xMoveOperations = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>(_rxCursor, ::com::sun::star::uno::UNO_QUERY);
+ m_xBookmarkOperations = ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate>(_rxCursor, ::com::sun::star::uno::UNO_QUERY);
+ m_xColumnsSupplier = ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>(_rxCursor, ::com::sun::star::uno::UNO_QUERY);
+ if (!m_xMoveOperations.is() || !m_xBookmarkOperations.is() || !m_xColumnsSupplier.is())
+ { // all or nothing !!
+ m_xMoveOperations = NULL;
+ m_xBookmarkOperations = NULL;
+ m_xColumnsSupplier = NULL;
+ }
+ return *this;
+}
+
+//==============================================================================
+//==============================================================================
+//IndexAccessIterator::IndexAccessIterator(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xStartingPoint)
+// :m_xStartingPoint(xStartingPoint)
+// ,m_xCurrentObject(NULL)
+//{
+// DBG_ASSERT(m_xStartingPoint.is(), "IndexAccessIterator::IndexAccessIterator : no starting point !");
+//}
+//
+// ------------------------------------------------------------------------------
+//::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> IndexAccessIterator::Next()
+//{
+// sal_Bool bCheckingStartingPoint = !m_xCurrentObject.is();
+// // ist die aktuelle Node der Anfangspunkt ?
+// sal_Bool bAlreadyCheckedCurrent = m_xCurrentObject.is();
+// // habe ich die aktuelle Node schon mal mittels ShouldHandleElement testen ?
+// if (!m_xCurrentObject.is())
+// m_xCurrentObject = m_xStartingPoint;
+//
+// ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xSearchLoop( m_xCurrentObject);
+// sal_Bool bHasMoreToSearch = sal_True;
+// sal_Bool bFoundSomething = sal_False;
+// while (!bFoundSomething && bHasMoreToSearch)
+// {
+// // pre-order-traversierung
+// if (!bAlreadyCheckedCurrent && ShouldHandleElement(xSearchLoop))
+// {
+// m_xCurrentObject = xSearchLoop;
+// bFoundSomething = sal_True;
+// }
+// else
+// {
+// // zuerst absteigen, wenn moeglich
+// ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xContainerAccess(xSearchLoop, ::com::sun::star::uno::UNO_QUERY);
+// if (xContainerAccess.is() && xContainerAccess->getCount() && ShouldStepInto(xContainerAccess))
+// { // zum ersten Child
+// ::com::sun::star::uno::Any aElement(xContainerAccess->getByIndex(0));
+// xSearchLoop = *(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aElement.getValue();
+// bCheckingStartingPoint = sal_False;
+//
+// m_arrChildIndizies.Insert(ULONG(0), m_arrChildIndizies.Count());
+// }
+// else
+// {
+// // dann nach oben und nach rechts, wenn moeglich
+// while (m_arrChildIndizies.Count() > 0)
+// { // (mein Stack ist nich leer, also kann ich noch nach oben gehen)
+// ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xChild(xSearchLoop, ::com::sun::star::uno::UNO_QUERY);
+// DBG_ASSERT(xChild.is(), "IndexAccessIterator::Next : a content has no approriate interface !");
+//
+// ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xParent( xChild->getParent());
+// xContainerAccess = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>(xParent, ::com::sun::star::uno::UNO_QUERY);
+// DBG_ASSERT(xContainerAccess.is(), "IndexAccessIterator::Next : a content has an invalid parent !");
+//
+// // den Index, den SearchLoop in diesem Parent hatte, von meinem 'Stack'
+// ULONG nOldSearchChildIndex = m_arrChildIndizies.GetObject(m_arrChildIndizies.Count() - 1);
+// m_arrChildIndizies.Remove(m_arrChildIndizies.Count() - 1);
+//
+// if (nOldSearchChildIndex < xContainerAccess->getCount() - 1)
+// { // auf dieser Ebene geht es noch nach rechts
+// ++nOldSearchChildIndex;
+// // also das naechste Child
+// ::com::sun::star::uno::Any aElement(xContainerAccess->getByIndex(nOldSearchChildIndex));
+// xSearchLoop = *(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*) aElement.getValue();
+// bCheckingStartingPoint = sal_False;
+// // und dessen Position auf den 'Stack'
+// m_arrChildIndizies.Insert(ULONG(nOldSearchChildIndex), m_arrChildIndizies.Count());
+//
+// break;
+// }
+// // hierher komme ich, wenn es auf der aktuellen Ebene nicht nach rechts geht, dann mache ich eine darueber weiter
+// xSearchLoop = xParent;
+// bCheckingStartingPoint = sal_False;
+// }
+//
+// if ((m_arrChildIndizies.Count() == 0) && !bCheckingStartingPoint)
+// { // das ist genau dann der Fall, wenn ich keinen rechten Nachbarn fuer irgendeinen der direkten Vorfahren des
+// // urspruenglichen xSearchLoop gefunden habe
+// bHasMoreToSearch = sal_False;
+// }
+// }
+//
+// if (bHasMoreToSearch)
+// { // ich habe in xSearchLoop jetzt ein Interface eines 'Knotens' meines 'Baumes', den ich noch abtesten kann
+// if (ShouldHandleElement(xSearchLoop))
+// {
+// m_xCurrentObject = xSearchLoop;
+// bFoundSomething = sal_True;
+// }
+// else
+// if (bCheckingStartingPoint)
+// // ich bin noch am Anfang, konnte nicht absteigen, und habe an diesem Anfang nix gefunden -> nix mehr zu tun
+// bHasMoreToSearch = sal_False;
+// bAlreadyCheckedCurrent = sal_True;
+// }
+// }
+// }
+//
+// if (!bFoundSomething)
+// {
+// DBG_ASSERT(m_arrChildIndizies.Count() == 0, "IndexAccessIterator::Next : items left on stack ! how this ?");
+// Invalidate();
+// }
+//
+// return m_xCurrentObject;
+//}
+
+
+//------------------------------------------------------------------------------
+FmXDisposeListener::~FmXDisposeListener()
+{
+ setAdapter(NULL);
+}
+
+//------------------------------------------------------------------------------
+void FmXDisposeListener::setAdapter(FmXDisposeMultiplexer* pAdapter)
+{
+ if (m_pAdapter)
+ {
+ ::osl::MutexGuard aGuard(m_rMutex);
+ m_pAdapter->release();
+ m_pAdapter = NULL;
+ }
+
+ if (pAdapter)
+ {
+ ::osl::MutexGuard aGuard(m_rMutex);
+ m_pAdapter = pAdapter;
+ m_pAdapter->acquire();
+ }
+}
+
+//==============================================================================
+DBG_NAME(FmXDisposeMultiplexer);
+//------------------------------------------------------------------------------
+FmXDisposeMultiplexer::FmXDisposeMultiplexer(FmXDisposeListener* _pListener, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& _rxObject, sal_Int16 _nId)
+ :m_pListener(_pListener)
+ ,m_xObject(_rxObject)
+ ,m_nId(_nId)
+{
+ DBG_CTOR(FmXDisposeMultiplexer, NULL);
+ m_pListener->setAdapter(this);
+
+ if (m_xObject.is())
+ m_xObject->addEventListener(this);
+}
+
+//------------------------------------------------------------------------------
+FmXDisposeMultiplexer::~FmXDisposeMultiplexer()
+{
+ DBG_DTOR(FmXDisposeMultiplexer, NULL);
+}
+
+// ::com::sun::star::lang::XEventListener
+//------------------------------------------------------------------
+void FmXDisposeMultiplexer::disposing(const ::com::sun::star::lang::EventObject& _Source) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener> xPreventDelete(this);
+
+ if (m_pListener)
+ {
+ m_pListener->disposing(_Source, m_nId);
+ m_pListener->setAdapter(NULL);
+ m_pListener = NULL;
+ }
+ m_xObject = NULL;
+}
+
+//------------------------------------------------------------------
+void FmXDisposeMultiplexer::dispose()
+{
+ if (m_xObject.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener> xPreventDelete(this);
+
+ m_xObject->removeEventListener(this);
+ m_xObject = NULL;
+
+ m_pListener->setAdapter(NULL);
+ m_pListener = NULL;
+ }
+}
+
+//==============================================================================
+//------------------------------------------------------------------------------
+sal_Int16 getControlTypeByObject(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo>& _rxObject)
+{
+ // ask for the persistent service name
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject> xPersistence(_rxObject, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xPersistence.is(), "::getControlTypeByObject : argument shold be an ::com::sun::star::io::XPersistObject !");
+ if (!xPersistence.is())
+ return OBJ_FM_CONTROL;
+
+ ::rtl::OUString sPersistentServiceName = xPersistence->getServiceName();
+ if (sPersistentServiceName.equals(FM_COMPONENT_EDIT)) // 5.0-Name
+ {
+ // may be a simple edit field or a formatted field, dependent of the supported services
+ if (_rxObject->supportsService(FM_SUN_COMPONENT_FORMATTEDFIELD))
+ return OBJ_FM_FORMATTEDFIELD;
+ return OBJ_FM_EDIT;
+ }
+ if (sPersistentServiceName.equals(FM_COMPONENT_TEXTFIELD))
+ return OBJ_FM_EDIT;
+ if (sPersistentServiceName.equals(FM_COMPONENT_COMMANDBUTTON))
+ return OBJ_FM_BUTTON;
+ if (sPersistentServiceName.equals(FM_COMPONENT_FIXEDTEXT))
+ return OBJ_FM_FIXEDTEXT;
+ if (sPersistentServiceName.equals(FM_COMPONENT_LISTBOX))
+ return OBJ_FM_LISTBOX;
+ if (sPersistentServiceName.equals(FM_COMPONENT_CHECKBOX))
+ return OBJ_FM_CHECKBOX;
+ if (sPersistentServiceName.equals(FM_COMPONENT_RADIOBUTTON))
+ return OBJ_FM_RADIOBUTTON;
+ if (sPersistentServiceName.equals(FM_COMPONENT_GROUPBOX))
+ return OBJ_FM_GROUPBOX;
+ if (sPersistentServiceName.equals(FM_COMPONENT_COMBOBOX))
+ return OBJ_FM_COMBOBOX;
+ if (sPersistentServiceName.equals(FM_COMPONENT_GRID)) // 5.0-Name
+ return OBJ_FM_GRID;
+ if (sPersistentServiceName.equals(FM_COMPONENT_GRIDCONTROL))
+ return OBJ_FM_GRID;
+ if (sPersistentServiceName.equals(FM_COMPONENT_IMAGEBUTTON))
+ return OBJ_FM_IMAGEBUTTON;
+ if (sPersistentServiceName.equals(FM_COMPONENT_FILECONTROL))
+ return OBJ_FM_FILECONTROL;
+ if (sPersistentServiceName.equals(FM_COMPONENT_DATEFIELD))
+ return OBJ_FM_DATEFIELD;
+ if (sPersistentServiceName.equals(FM_COMPONENT_TIMEFIELD))
+ return OBJ_FM_TIMEFIELD;
+ if (sPersistentServiceName.equals(FM_COMPONENT_NUMERICFIELD))
+ return OBJ_FM_NUMERICFIELD;
+ if (sPersistentServiceName.equals(FM_COMPONENT_CURRENCYFIELD))
+ return OBJ_FM_CURRENCYFIELD;
+ if (sPersistentServiceName.equals(FM_COMPONENT_PATTERNFIELD))
+ return OBJ_FM_PATTERNFIELD;
+ if (sPersistentServiceName.equals(FM_COMPONENT_HIDDEN)) // 5.0-Name
+ return OBJ_FM_HIDDEN;
+ if (sPersistentServiceName.equals(FM_COMPONENT_HIDDENCONTROL))
+ return OBJ_FM_HIDDEN;
+ if (sPersistentServiceName.equals(FM_COMPONENT_IMAGECONTROL))
+ return OBJ_FM_IMAGECONTROL;
+ if (sPersistentServiceName.equals(FM_COMPONENT_FORMATTEDFIELD))
+ {
+ DBG_ERROR("::getControlTypeByObject : suspicious persistent service name (formatted field) !");
+ // objects with that service name should exist as they aren't compatible with older versions
+ return OBJ_FM_FORMATTEDFIELD;
+ }
+
+ DBG_ERROR("::getControlTypeByObject : unknown object type !");
+ return OBJ_FM_CONTROL;
+}
+
+/*
+sal_Int16 getControlTypeByModelName(const ::rtl::OUString& rModel)
+{
+ if (rModel.equals(FM_COMPONENT_EDIT)) // 5.0-Name
+ return OBJ_FM_EDIT;
+ if (rModel.equals(FM_COMPONENT_TEXTFIELD))
+ return OBJ_FM_EDIT;
+ if (rModel.equals(FM_COMPONENT_COMMANDBUTTON))
+ return OBJ_FM_BUTTON;
+ if (rModel.equals(FM_COMPONENT_FIXEDTEXT))
+ return OBJ_FM_FIXEDTEXT;
+ if (rModel.equals(FM_COMPONENT_LISTBOX))
+ return OBJ_FM_LISTBOX;
+ if (rModel.equals(FM_COMPONENT_CHECKBOX))
+ return OBJ_FM_CHECKBOX;
+ if (rModel.equals(FM_COMPONENT_RADIOBUTTON))
+ return OBJ_FM_RADIOBUTTON;
+ if (rModel.equals(FM_COMPONENT_GROUPBOX))
+ return OBJ_FM_GROUPBOX;
+ if (rModel.equals(FM_COMPONENT_COMBOBOX))
+ return OBJ_FM_COMBOBOX;
+ if (rModel.equals(FM_COMPONENT_GRID)) // 5.0-Name
+ return OBJ_FM_GRID;
+ if (rModel.equals(FM_COMPONENT_GRIDCONTROL))
+ return OBJ_FM_GRID;
+ if (rModel.equals(FM_COMPONENT_IMAGEBUTTON))
+ return OBJ_FM_IMAGEBUTTON;
+ if (rModel.equals(FM_COMPONENT_FILECONTROL))
+ return OBJ_FM_FILECONTROL;
+ if (rModel.equals(FM_COMPONENT_DATEFIELD))
+ return OBJ_FM_DATEFIELD;
+ if (rModel.equals(FM_COMPONENT_TIMEFIELD))
+ return OBJ_FM_TIMEFIELD;
+ if (rModel.equals(FM_COMPONENT_NUMERICFIELD))
+ return OBJ_FM_NUMERICFIELD;
+ if (rModel.equals(FM_COMPONENT_CURRENCYFIELD))
+ return OBJ_FM_CURRENCYFIELD;
+ if (rModel.equals(FM_COMPONENT_PATTERNFIELD))
+ return OBJ_FM_PATTERNFIELD;
+ if (rModel.equals(FM_COMPONENT_HIDDEN)) // 5.0-Name
+ return OBJ_FM_HIDDEN;
+ if (rModel.equals(FM_COMPONENT_HIDDENCONTROL))
+ return OBJ_FM_HIDDEN;
+ if (rModel.equals(FM_COMPONENT_IMAGECONTROL))
+ return OBJ_FM_IMAGECONTROL;
+ if (rModel.equals(FM_COMPONENT_FORMATTEDFIELD))
+ return OBJ_FM_FORMATTEDFIELD;
+ return OBJ_FM_CONTROL;
+}
+*/
+
+//------------------------------------------------------------------------------
+::rtl::OUString getServiceNameByControlType(sal_Int16 nType)
+{
+ switch (nType)
+ {
+ case OBJ_FM_EDIT : return FM_COMPONENT_TEXTFIELD;
+ case OBJ_FM_BUTTON : return FM_COMPONENT_COMMANDBUTTON;
+ case OBJ_FM_FIXEDTEXT : return FM_COMPONENT_FIXEDTEXT;
+ case OBJ_FM_LISTBOX : return FM_COMPONENT_LISTBOX;
+ case OBJ_FM_CHECKBOX : return FM_COMPONENT_CHECKBOX;
+ case OBJ_FM_RADIOBUTTON : return FM_COMPONENT_RADIOBUTTON;
+ case OBJ_FM_GROUPBOX : return FM_COMPONENT_GROUPBOX;
+ case OBJ_FM_COMBOBOX : return FM_COMPONENT_COMBOBOX;
+ case OBJ_FM_GRID : return FM_COMPONENT_GRIDCONTROL;
+ case OBJ_FM_IMAGEBUTTON : return FM_COMPONENT_IMAGEBUTTON;
+ case OBJ_FM_FILECONTROL : return FM_COMPONENT_FILECONTROL;
+ case OBJ_FM_DATEFIELD : return FM_COMPONENT_DATEFIELD;
+ case OBJ_FM_TIMEFIELD : return FM_COMPONENT_TIMEFIELD;
+ case OBJ_FM_NUMERICFIELD : return FM_COMPONENT_NUMERICFIELD;
+ case OBJ_FM_CURRENCYFIELD : return FM_COMPONENT_CURRENCYFIELD;
+ case OBJ_FM_PATTERNFIELD : return FM_COMPONENT_PATTERNFIELD;
+ case OBJ_FM_HIDDEN : return FM_COMPONENT_HIDDENCONTROL;
+ case OBJ_FM_IMAGECONTROL : return FM_COMPONENT_IMAGECONTROL;
+ case OBJ_FM_FORMATTEDFIELD : return FM_COMPONENT_FORMATTEDFIELD;
+ }
+ return ::rtl::OUString();
+}
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::rtl::OUString> getEventMethods(const ::com::sun::star::uno::Type& type)
+{
+ typelib_InterfaceTypeDescription *pType=0;
+ type.getDescription( (typelib_TypeDescription**)&pType);
+
+ if(!pType)
+ return ::com::sun::star::uno::Sequence< ::rtl::OUString>();
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString> aNames(pType->nMembers);
+ ::rtl::OUString* pNames = aNames.getArray();
+ for(sal_Int32 i=0;i<pType->nMembers;i++,++pNames)
+ {
+ *pNames = pType->ppMembers[i]->pTypeName;
+ }
+
+ typelib_typedescription_release( (typelib_TypeDescription *)pType );
+ return aNames;
+}
+
+
+//------------------------------------------------------------------------------
+void TransferEventScripts(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& xModel, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor>& rTransferIfAvailable)
+{
+ // first check if we have a XEventAttacherManager for the model
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xModelChild(xModel, ::com::sun::star::uno::UNO_QUERY);
+ if (!xModelChild.is())
+ return; // nothing to do
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager> xEventManager(xModelChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xEventManager.is())
+ return; // nothing to do
+
+ if (!rTransferIfAvailable.getLength())
+ return; // nothing to do
+
+ // check for the index of the model within it's parent
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xParentIndex(xModelChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xParentIndex.is())
+ return; // nothing to do
+ sal_Int32 nIndex = getElementPos(xParentIndex, xModel);
+ if (nIndex<0 || nIndex>=xParentIndex->getCount())
+ return; // nothing to do
+
+ // then we need informations about the listeners supported by the control and the model
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aModelListeners;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aControlListeners;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XIntrospection> xModelIntrospection(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.beans.Introspection")), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XIntrospection> xControlIntrospection(::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.beans.Introspection")), ::com::sun::star::uno::UNO_QUERY);
+
+ if (xModelIntrospection.is() && xModel.is())
+ {
+ ::com::sun::star::uno::Any aModel(::com::sun::star::uno::makeAny(xModel));
+ aModelListeners = xModelIntrospection->inspect(aModel)->getSupportedListeners();
+ }
+
+ if (xControlIntrospection.is() && xControl.is())
+ {
+ ::com::sun::star::uno::Any aControl(::com::sun::star::uno::makeAny(xControl));
+ aControlListeners = xControlIntrospection->inspect(aControl)->getSupportedListeners();
+ }
+
+ sal_Int32 nMaxNewLen = aModelListeners.getLength() + aControlListeners.getLength();
+ if (!nMaxNewLen)
+ return; // the model and the listener don't support any listeners (or we were unable to retrieve these infos)
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor> aTransferable(nMaxNewLen);
+ ::com::sun::star::script::ScriptEventDescriptor* pTransferable = aTransferable.getArray();
+
+ const ::com::sun::star::script::ScriptEventDescriptor* pCurrent = rTransferIfAvailable.getConstArray();
+ sal_Int32 i,j,k;
+ for (i=0; i<rTransferIfAvailable.getLength(); ++i, ++pCurrent)
+ {
+ // search the model/control idl classes for the event described by pCurrent
+ for ( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type>* pCurrentArray = &aModelListeners;
+ pCurrentArray;
+ pCurrentArray = (pCurrentArray == &aModelListeners) ? &aControlListeners : NULL
+ )
+ {
+ const ::com::sun::star::uno::Type* pCurrentListeners = pCurrentArray->getConstArray();
+ for (j=0; j<pCurrentArray->getLength(); ++j, ++pCurrentListeners)
+ {
+ UniString aListener = (*pCurrentListeners).getTypeName();
+ sal_Int32 nTokens = aListener.GetTokenCount('.');
+ if (nTokens)
+ aListener = aListener.GetToken(nTokens - 1, '.');
+
+ if (aListener == pCurrent->ListenerType.getStr())
+ // the current ::com::sun::star::script::ScriptEventDescriptor doesn't match the current listeners class
+ continue;
+
+ // now check the methods
+ ::com::sun::star::uno::Sequence< ::rtl::OUString> aMethodsNames = getEventMethods(*pCurrentListeners);
+ const ::rtl::OUString* pMethodsNames = aMethodsNames.getConstArray();
+ for (k=0; k<aMethodsNames.getLength(); ++k, ++pMethodsNames)
+ {
+ if ((*pMethodsNames).compareTo(pCurrent->EventMethod) != COMPARE_EQUAL)
+ // the current ::com::sun::star::script::ScriptEventDescriptor doesn't match the current listeners current method
+ continue;
+
+ // we can transfer the script event : the model (control) supports it
+ *pTransferable = *pCurrent;
+ ++pTransferable;
+ break;
+ }
+ if (k<aMethodsNames.getLength())
+ break;
+ }
+ }
+ }
+
+ sal_Int32 nRealNewLen = pTransferable - aTransferable.getArray();
+ aTransferable.realloc(nRealNewLen);
+
+ xEventManager->registerScriptEvents(nIndex, aTransferable);
+}
+
+//------------------------------------------------------------------------------
+sal_Int16 GridModel2ViewPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& rColumns, sal_Int16 nModelPos)
+{
+ if (rColumns.is())
+ {
+ // invalid pos ?
+ if (nModelPos >= rColumns->getCount())
+ return (sal_Int16)-1;
+
+ // the column itself shouldn't be hidden
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xAskedFor( *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)rColumns->getByIndex(nModelPos).getValue());
+ if (::utl::getBOOL(xAskedFor->getPropertyValue(FM_PROP_HIDDEN)))
+ {
+ DBG_ERROR("GridModel2ViewPos : invalid argument !");
+ return (sal_Int16)-1;
+ }
+
+ sal_Int16 nViewPos = nModelPos;
+ for (sal_Int16 i=0; i<nModelPos; ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCur( *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)rColumns->getByIndex(i).getValue());
+ if (::utl::getBOOL(xCur->getPropertyValue(FM_PROP_HIDDEN)))
+ --nViewPos;
+ }
+ return nViewPos;
+ }
+ return (sal_Int16)-1;
+}
+
+//------------------------------------------------------------------------------
+sal_Int16 GridView2ModelPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& rColumns, sal_Int16 nViewPos)
+{
+ if (rColumns.is())
+ {
+ // loop through all columns
+ sal_Int16 i;
+ for (i=0; i<rColumns->getCount(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCur( *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)rColumns->getByIndex(i).getValue());
+ if (!::utl::getBOOL(xCur->getPropertyValue(FM_PROP_HIDDEN)))
+ // for every visible col : if nViewPos is greater zero, decrement it, else we
+ // have found the model position
+ if (!nViewPos)
+ break;
+ else
+ --nViewPos;
+ }
+ if (i<rColumns->getCount())
+ return i;
+ }
+ return (sal_Int16)-1;
+}
+
+//------------------------------------------------------------------------------
+sal_Int16 GridViewColumnCount(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& rColumns)
+{
+ if (rColumns.is())
+ {
+ sal_Int16 nCount = rColumns->getCount();
+ // loop through all columns
+ for (sal_Int16 i=0; i<rColumns->getCount(); ++i)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCur( *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)rColumns->getByIndex(i).getValue());
+ if (::utl::getBOOL(xCur->getPropertyValue(FM_PROP_HIDDEN)))
+ --nCount;
+ }
+ return nCount;
+ }
+ return 0;
+}
+
+// dbtools
+//------------------------------------------------------------------------------
+UniString quoteName(const UniString& rQuote, const UniString& rName)
+{
+ UniString sReturn(rQuote);
+ sReturn += rName;
+ sReturn += rQuote;
+ return sReturn;
+}
+
+//------------------------------------------------------------------------------
+UniString quoteTableName(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _rxMeta, const UniString& rName)
+{
+ UniString sQuote = _rxMeta->getIdentifierQuoteString();
+ UniString sQuotedName;
+ UniString aTableName(rName);
+
+ if (_rxMeta->supportsCatalogsInDataManipulation())
+ {
+ sal_Unicode cSeparator = '.';
+ UniString sSeparator = _rxMeta->getCatalogSeparator();
+ if (sSeparator.Len() != 0)
+ cSeparator = sSeparator.GetChar(0);
+
+ if (aTableName.GetTokenCount(cSeparator) >= 2)
+ {
+ UniString aDatabaseName(aTableName.GetToken(0,cSeparator));
+ sQuotedName += quoteName(sQuote, aDatabaseName);
+ sQuotedName += cSeparator;
+ aTableName.Erase(0, aDatabaseName.Len() + 1);
+ }
+ }
+ if (_rxMeta->supportsSchemasInDataManipulation())
+ {
+ if (aTableName.GetTokenCount('.') == 2)
+ {
+ sQuotedName += quoteName(sQuote, aTableName.GetToken(0,'.'));
+ sQuotedName += '.';
+ sQuotedName += quoteName(sQuote, aTableName.GetToken(1,'.'));
+ }
+ else
+ sQuotedName += quoteName(sQuote, aTableName);
+ }
+ else
+ sQuotedName += quoteName(sQuote, aTableName);
+
+ return sQuotedName;
+}
+
+//==============================================================================
+// FmSlotDispatch - some kind of translator between the Sfx-Slots and the UNO-dispatchers
+//==============================================================================
+
+// SMART_UNO_IMPLEMENTATION(FmSlotDispatch, UsrObject);
+
+
+DBG_NAME(FmSlotDispatch);
+//------------------------------------------------------------------------------
+FmSlotDispatch::FmSlotDispatch(const ::com::sun::star::util::URL& rUrl, sal_Int16 nSlotId, SfxBindings& rBindings)
+ :SfxControllerItem(nSlotId, rBindings)
+ ,m_aDisposeListeners(m_aAccessSafety)
+ ,m_aStatusListeners(m_aAccessSafety)
+ ,m_aUrl(rUrl)
+ ,m_nSlot(nSlotId)
+{
+ DBG_CTOR(FmSlotDispatch,NULL);
+
+}
+
+//------------------------------------------------------------------------------
+FmSlotDispatch::~FmSlotDispatch()
+{
+
+ DBG_DTOR(FmSlotDispatch,NULL);
+}
+
+//------------------------------------------------------------------------------
+void FmSlotDispatch::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 )
+{
+ DBG_ASSERT(aURL.Main.compareTo(m_aUrl.Main) == COMPARE_EQUAL, "FmSlotDispatch::dispatch : invalid argument !");
+ DBG_ASSERT(m_aExecutor.IsSet(), "FmSlotDispatch::dispatch : no executor !");
+ // if we have no executor we would have disabled this feature in statusChanged-calls
+
+ m_aExecutor.Call(this);
+}
+
+//------------------------------------------------------------------------------
+void FmSlotDispatch::NotifyState(SfxItemState eState, const SfxPoolItem* pState, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>& rListener)
+{
+ ::com::sun::star::frame::FeatureStateEvent aEvent = BuildEvent(eState, pState);
+
+ if (rListener.is())
+ rListener->statusChanged(aEvent);
+ else
+ NOTIFY_LISTENERS(m_aStatusListeners, ::com::sun::star::frame::XStatusListener, statusChanged, aEvent);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmSlotDispatch::addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw(::com::sun::star::uno::RuntimeException)
+{
+ DBG_ASSERT((aURL.Main.getLength() == 0) || (aURL.Main.compareTo(m_aUrl.Main) == COMPARE_EQUAL),
+ "FmSlotDispatch::dispatch : invalid argument !");
+ m_aStatusListeners.addInterface( xControl );
+
+ // acknowledge the initial status
+ SfxPoolItem* pState = NULL;
+ SfxItemState eInitialState = GetBindings().QueryState(m_nSlot, pState);
+
+ NotifyState(eInitialState, pState, xControl);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmSlotDispatch::removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw(::com::sun::star::uno::RuntimeException)
+{
+ DBG_ASSERT((aURL.Main.getLength() == 0) || (aURL.Main.compareTo(m_aUrl.Main) == COMPARE_EQUAL),
+ "FmSlotDispatch::dispatch : invalid argument !");
+ m_aStatusListeners.removeInterface( xControl );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmSlotDispatch::dispose( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::lang::EventObject aEvt(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*this));
+ m_aDisposeListeners.disposeAndClear(aEvt);
+ m_aStatusListeners.disposeAndClear(aEvt);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmSlotDispatch::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException)
+{
+ m_aDisposeListeners.addInterface( xListener );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmSlotDispatch::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException)
+{
+ m_aDisposeListeners.removeInterface( aListener );
+}
+
+//------------------------------------------------------------------------------
+void FmSlotDispatch::StateChanged(sal_Int16 nSID, SfxItemState eState, const SfxPoolItem* pState)
+{
+ DBG_ASSERT(nSID == m_nSlot, "FmSlotDispatch::StateChanged : where did this come from ?");
+
+ ::com::sun::star::frame::FeatureStateEvent eEvent = BuildEvent(eState, pState);
+ NOTIFY_LISTENERS(m_aStatusListeners, ::com::sun::star::frame::XStatusListener, statusChanged, eEvent);
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::frame::FeatureStateEvent FmSlotDispatch::BuildEvent(SfxItemState eState, const SfxPoolItem* pState)
+{
+ ::com::sun::star::frame::FeatureStateEvent aReturn;
+ aReturn.Source = (::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >)(*this);
+ aReturn.FeatureURL = m_aUrl;
+ aReturn.IsEnabled = (SFX_ITEM_DISABLED != eState) && m_aExecutor.IsSet();
+ aReturn.Requery = sal_False;
+
+ if (pState)
+ {
+ if (pState->ISA(SfxBoolItem))
+ aReturn.State <<= ((SfxBoolItem*)pState)->GetValue();
+ else if (pState->ISA(SfxStringItem))
+ aReturn.State <<= ::rtl::OUString(((SfxStringItem*)pState)->GetValue());
+#if DBG_UTIL
+ else if (!pState->ISA(SfxVoidItem))
+ DBG_ERROR("FmSlotDispatch::BuildEvent : don't know what to do with the ItemState !");
+#endif
+ }
+
+ return aReturn;
+}
+
+// search in the hierarchy for a connection
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> findConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xParent)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection(xParent, ::com::sun::star::uno::UNO_QUERY);
+ if (!xConnection.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> xChild(xParent, ::com::sun::star::uno::UNO_QUERY);
+ if (xChild.is())
+ return findConnection(xChild->getParent());
+ }
+ return xConnection;
+}
+
+//========================================================================
+//= FmXDispatchInterceptorImpl
+//========================================================================
+
+DBG_NAME(FmXDispatchInterceptorImpl);
+//------------------------------------------------------------------------
+FmXDispatchInterceptorImpl::FmXDispatchInterceptorImpl(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _rToIntercept, FmDispatchInterceptor* _pMaster, sal_Int16 _nId)
+ : ::cppu::OComponentHelper(_pMaster && _pMaster->getInterceptorMutex() ? *_pMaster->getInterceptorMutex() : m_aFallback)
+ ,m_xIntercepted(_rToIntercept)
+ ,m_pMaster(_pMaster)
+ ,m_nId(_nId)
+{
+ DBG_CTOR(FmXDispatchInterceptorImpl,NULL);
+
+ ::osl::MutexGuard aGuard(getAccessSafety());
+ if (m_xIntercepted.is())
+ ::utl::increment(m_refCount);
+ {
+ m_xIntercepted->registerDispatchProviderInterceptor((::com::sun::star::frame::XDispatchProviderInterceptor*)this);
+ // this should make us the top-level dispatch-provider for the component, via a call to our
+ // setDispatchProvider we should have got an fallback for requests we (i.e. our master) cannot fullfill
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xInterceptedComponent(m_xIntercepted, ::com::sun::star::uno::UNO_QUERY);
+ if (xInterceptedComponent.is())
+ xInterceptedComponent->addEventListener((::com::sun::star::lang::XEventListener*)this);
+ }
+ ::utl::decrement(m_refCount);
+}
+
+//------------------------------------------------------------------------
+FmXDispatchInterceptorImpl::~FmXDispatchInterceptorImpl()
+{
+ if (!rBHelper.bDisposed)
+ dispose();
+
+ DBG_DTOR(FmXDispatchInterceptorImpl,NULL);
+}
+
+//------------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXDispatchInterceptorImpl::queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Any aOut = ::cppu::queryInterface(type,static_cast< ::com::sun::star::frame::XDispatchProviderInterceptor*>(this),
+ static_cast< ::com::sun::star::frame::XDispatchProvider*>(this),
+ static_cast< ::com::sun::star::lang::XEventListener*>(this));
+ if(aOut.hasValue())
+ return aOut;
+ return OComponentHelper::queryInterface(type);
+}
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXDispatchInterceptorImpl::getTypes( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypes(OComponentHelper::getTypes());
+ aTypes.realloc(2);
+ ::com::sun::star::uno::Type* pTypes = aTypes.getArray();
+
+ pTypes[aTypes.getLength()-2] = ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor>*)0);
+ pTypes[aTypes.getLength()-1] = ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener>*)0);
+ return aTypes;
+}
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL FmXDispatchInterceptorImpl::getImplementationId() throw(::com::sun::star::uno::RuntimeException)
+{
+ return ::form::OImplementationIds::getImplementationId(getTypes());
+}
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL FmXDispatchInterceptorImpl::queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard(getAccessSafety());
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> xResult;
+ // ask our 'real' interceptor
+ if (m_pMaster)
+ xResult = m_pMaster->interceptedQueryDispatch(m_nId, aURL, aTargetFrameName, nSearchFlags);
+
+ // ask our slave provider
+ if (!xResult.is() && m_xSlaveDispatcher.is())
+ xResult = m_xSlaveDispatcher->queryDispatch(aURL, aTargetFrameName, nSearchFlags);
+
+ return xResult;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL
+FmXDispatchInterceptorImpl::queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard(getAccessSafety());
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> > aReturn(aDescripts.getLength());
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch>* pReturn = aReturn.getArray();
+ const ::com::sun::star::frame::DispatchDescriptor* pDescripts = aDescripts.getConstArray();
+ for (sal_Int16 i=0; i<aDescripts.getLength(); ++i, ++pReturn, ++pDescripts)
+ {
+ *pReturn = queryDispatch(pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags);
+ }
+ return aReturn;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL FmXDispatchInterceptorImpl::getSlaveDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard(getAccessSafety());
+ return m_xSlaveDispatcher;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXDispatchInterceptorImpl::setSlaveDispatchProvider(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider>& xNewDispatchProvider) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard(getAccessSafety());
+ m_xSlaveDispatcher = xNewDispatchProvider;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> SAL_CALL FmXDispatchInterceptorImpl::getMasterDispatchProvider(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard(getAccessSafety());
+ return m_xMasterDispatcher;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXDispatchInterceptorImpl::setMasterDispatchProvider(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider>& xNewSupplier) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard(getAccessSafety());
+ m_xMasterDispatcher = xNewSupplier;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXDispatchInterceptorImpl::disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if (Source.Source == m_xIntercepted)
+ {
+ ImplDetach();
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXDispatchInterceptorImpl::ImplDetach()
+{
+ ::osl::MutexGuard aGuard(getAccessSafety());
+
+/*! PB: das macht der Frame lieber selber
+ // remove ourself from the interceptor chain
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor> xSlave(m_xSlaveDispatcher, ::com::sun::star::uno::UNO_QUERY);
+ if (xSlave.is())
+ xSlave->setMasterDispatchProvider(m_xMasterDispatcher);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor> xMaster(m_xMasterDispatcher, ::com::sun::star::uno::UNO_QUERY);
+ if (xMaster.is())
+ xMaster->setSlaveDispatchProvider(m_xSlaveDispatcher);
+
+ m_xSlaveDispatcher = m_xMasterDispatcher = NULL;
+*/
+
+ // deregister ourself from the interception component
+ if (m_xIntercepted.is())
+ m_xIntercepted->releaseDispatchProviderInterceptor((::com::sun::star::frame::XDispatchProviderInterceptor*)this);
+
+ m_xIntercepted = NULL;
+ m_pMaster = NULL;
+}
+
+//------------------------------------------------------------------------------
+void FmXDispatchInterceptorImpl::disposing()
+{
+ // remove ourself as event listener from the interception component
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xInterceptedComponent(m_xIntercepted, ::com::sun::star::uno::UNO_QUERY);
+ if (xInterceptedComponent.is())
+ xInterceptedComponent->removeEventListener((::com::sun::star::lang::XEventListener*)this);
+
+ // detach from the interception component
+ ImplDetach();
+
+}
+
+//==============================================================================
+//==============================================================================
+
+//------------------------------------------------------------------------------
+sal_Bool isLoadable(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xLoad)
+{
+ // determines whether a form should be loaded or not
+ // if there is no datasource or connection there is no reason to load a form
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xSet(xLoad, ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ try
+ {
+ // is there already a active connection
+ ::com::sun::star::uno::Any aConn( xSet->getPropertyValue(FM_PROP_ACTIVE_CONNECTION) );
+ if (aConn.getValueTypeClass() == ::com::sun::star::uno::TypeClass_INTERFACE &&
+ ((::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aConn.getValue())->is())
+ return sal_True;
+ else if (::utl::getString(xSet->getPropertyValue(FM_PROP_DATASOURCE)).len() ||
+ ::utl::getString(xSet->getPropertyValue(FM_PROP_URL)).len() ||
+ ::findConnection(xLoad).is())
+ return sal_True;
+ }
+ catch(...)
+ {
+ }
+
+ }
+ return sal_False;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getTableFields(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConn, const ::rtl::OUString& _rsName)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier> xSupplyTables(_rxConn, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xSupplyTables.is(), "::getTableFields : invalid connection !");
+ // the conn already said it would support the service sdb::Connection
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> xTables( xSupplyTables->getTables());
+ if (xTables.is() && xTables->hasByName(_rsName))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> xTableCols(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)xTables->getByName(_rsName).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xTableCols.is(), "::getTableFields : invalid table !");
+ // the table is expected to support the service sddb::Table, which requires an ::com::sun::star::sdbcx::XColumnsSupplier interface
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> xFieldNames(xTableCols->getColumns(), ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xFieldNames.is(), "::getTableFields : TableCols->getColumns doesn't export a NameAccess !");
+ return xFieldNames;
+ }
+
+ return ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>();
+}
+
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> getDataSource(const ::rtl::OUString& _rsTitleOrPath)
+{
+ DBG_ASSERT(_rsTitleOrPath.len(), "::getDataSource : invalid arg !");
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xReturn;
+
+ // is it a file url ?
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> xNamingContext(::utl::getProcessServiceFactory()->createInstance(SRV_SDB_DATABASE_ACCESS_CONTEXT), ::com::sun::star::uno::UNO_QUERY);
+ if (xNamingContext.is() && xNamingContext->hasByName(_rsTitleOrPath))
+ {
+ DBG_ASSERT(::com::sun::star::uno::Reference< ::com::sun::star::uno::XNamingService>(xNamingContext, ::com::sun::star::uno::UNO_QUERY).is(), "::getDataSource : no NamingService interface on the DatabaseAccessContext !");
+ xReturn = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>(::com::sun::star::uno::Reference< ::com::sun::star::uno::XNamingService>(xNamingContext, ::com::sun::star::uno::UNO_QUERY)->getRegisteredObject(_rsTitleOrPath), ::com::sun::star::uno::UNO_QUERY);
+ }
+ else
+ { // is it a favorite title ?
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseEnvironment> xEnvironment(::utl::getProcessServiceFactory()->createInstance(SRV_SDB_DATABASE_ENVIRONMENT), ::com::sun::star::uno::UNO_QUERY);
+ if (xEnvironment.is())
+ {
+ try
+ {
+ xReturn = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>(xEnvironment->getDatabaseAccess(_rsTitleOrPath), ::com::sun::star::uno::UNO_QUERY);
+ }
+ catch(::com::sun::star::sdbc::SQLException e)
+ { // allowed, the env may throw an exception in case of an invalid name
+ e; // make compiler happy
+ }
+
+ }
+
+ }
+
+ return xReturn;
+}
+
+
+//------------------------------------------------------------------------------
+void setConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConn)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xRowSetProps(_rxRowSet, ::com::sun::star::uno::UNO_QUERY);
+ if (xRowSetProps.is())
+ {
+ try
+ {
+ ::com::sun::star::uno::Any aConn(::com::sun::star::uno::makeAny(_rxConn));
+ xRowSetProps->setPropertyValue(FM_PROP_ACTIVE_CONNECTION, aConn);
+ }
+ catch(...)
+ {
+ DBG_ERROR("::setConnection : could not set the connection !");
+ }
+
+ }
+}
+
+// retrieve the current command of a rowset
+//------------------------------------------------------------------------------
+::rtl::OUString getCommand(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet, sal_Bool& bEscapeProcessing, ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& xConn)
+{
+ ::rtl::OUString aReturn;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xRowSetProps(_rxRowSet, ::com::sun::star::uno::UNO_QUERY);
+ if (xRowSetProps.is())
+ {
+ try
+ {
+ ::com::sun::star::uno::Any aConn( xRowSetProps->getPropertyValue(FM_PROP_ACTIVE_CONNECTION) );
+ if (aConn.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE)
+ return ::rtl::OUString();
+
+ ::cppu::extractInterface(xConn, aConn);
+
+ // which escapeProcessing we use?
+ bEscapeProcessing = ::utl::getBOOL(xRowSetProps->getPropertyValue(FM_PROP_ESCAPE_PROCESSING));
+
+ // get the command
+ ::rtl::OUString aCommand(::utl::getString( xRowSetProps->getPropertyValue(FM_PROP_COMMAND) ));
+
+ // and the command type
+ sal_Int32 nType = ::utl::getINT32(xRowSetProps->getPropertyValue(FM_PROP_COMMANDTYPE));
+ switch (nType)
+ {
+ case ::com::sun::star::sdb::CommandType::TABLE:
+ {
+ // ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> xMeta( xConn->getMetaData());
+ UniString aStmt;
+ aStmt.AssignAscii("SELECT * FROM ");
+ aStmt += quoteTableName(xConn->getMetaData(), aCommand);
+ aReturn = aStmt;
+ } break;
+ case ::com::sun::star::sdb::CommandType::QUERY:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XQueriesSupplier> xQueriesAccess(xConn, ::com::sun::star::uno::UNO_QUERY);
+ if (xQueriesAccess.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> xQueries(xQueriesAccess->getQueries());
+ if (xQueries->hasByName(aCommand))
+ {
+ ::com::sun::star::uno::Any aElement(xQueries->getByName(aCommand));
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xQuery(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)aElement.getValue(), ::com::sun::star::uno::UNO_QUERY);
+ aReturn= ::utl::getString(xQuery->getPropertyValue(FM_PROP_COMMAND));
+ bEscapeProcessing = ::utl::getBOOL(xQuery->getPropertyValue(FM_PROP_ESCAPE_PROCESSING));
+ }
+ }
+ } break;
+ default:
+ aReturn = aCommand;
+ }
+
+
+ }
+ catch(...)
+ {
+ }
+
+ }
+ return aReturn;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer> getCurrentSettingsComposer(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxRowSetProps)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer> xReturn;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet> xRowSet(_rxRowSetProps, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConn( ::utl::calcConnection(xRowSet,::utl::getProcessServiceFactory()));
+ try
+ {
+ if (xConn.is()) // implies xRowSet.is() implies _rxRowSetProps.is()
+ {
+ // build the statement the row set is based on (can't use the ActiveCommand property of the set
+ // as this reflects the status after the last execute, not the currently set properties
+
+ ::rtl::OUString sStatement;
+ // first ensure we have all properties needed
+ if (::utl::hasProperty(FM_PROP_COMMAND, _rxRowSetProps) && ::utl::hasProperty(FM_PROP_COMMANDTYPE, _rxRowSetProps)
+ && ::utl::hasProperty(FM_PROP_FILTER_CRITERIA, _rxRowSetProps) && ::utl::hasProperty(FM_PROP_SORT, _rxRowSetProps)
+ && ::utl::hasProperty(FM_PROP_ESCAPE_PROCESSING, _rxRowSetProps) && ::utl::hasProperty(FM_PROP_APPLYFILTER, _rxRowSetProps))
+ {
+ sal_Int32 nCommandType = ::utl::getINT32(_rxRowSetProps->getPropertyValue(FM_PROP_COMMANDTYPE));
+ ::rtl::OUString sCommand = ::utl::getString(_rxRowSetProps->getPropertyValue(FM_PROP_COMMAND));
+ sal_Bool bEscapeProcessing = ::utl::getBOOL(_rxRowSetProps->getPropertyValue(FM_PROP_ESCAPE_PROCESSING));
+ switch (nCommandType)
+ {
+ case ::com::sun::star::sdb::CommandType::COMMAND:
+ if (!bEscapeProcessing)
+ { // native sql -> no parsable statement
+ sStatement = ::rtl::OUString::createFromAscii("");
+ }
+ else
+ {
+ sStatement = sCommand;
+ }
+ break;
+ case ::com::sun::star::sdb::CommandType::TABLE:
+ {
+ if (!sCommand.getLength())
+ break;
+
+ UniString sTableName = quoteTableName(xConn->getMetaData(), sCommand);
+ sStatement = ::rtl::OUString::createFromAscii("SELECT * FROM ");
+ sStatement += sTableName;
+ }
+ break;
+ case ::com::sun::star::sdb::CommandType::QUERY:
+ {
+ // ask the connection for the query
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XQueriesSupplier> xSupplyQueries(xConn, ::com::sun::star::uno::UNO_QUERY);
+ if (!xSupplyQueries.is())
+ break;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> xQueries(xSupplyQueries->getQueries(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xQueries.is() || !xQueries->hasByName(sCommand))
+ break;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xQueryProps(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*)xQueries->getByName(sCommand).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xQueryProps.is())
+ break;
+
+ // a native query ?
+ if (!::utl::hasProperty(FM_PROP_ESCAPE_PROCESSING, xQueryProps))
+ break;
+ if (!::utl::getBOOL(xQueryProps->getPropertyValue(FM_PROP_ESCAPE_PROCESSING)))
+ break;
+
+ if (!::utl::hasProperty(FM_PROP_COMMAND, xQueryProps))
+ break;
+
+ // the command used by the query
+ sStatement = ::utl::getString(xQueryProps->getPropertyValue(FM_PROP_COMMAND));
+
+ // use an additional composer to build a statement from the query filter/order props
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposerFactory> xFactory(xConn, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer> xLocalComposer;
+ if (xFactory.is())
+ xLocalComposer = xFactory->createQueryComposer();
+ if (!xLocalComposer.is())
+ break;
+
+ xLocalComposer->setQuery(sStatement);
+ // the sort order
+ if (::utl::hasProperty(FM_PROP_SORT, xQueryProps))
+ xLocalComposer->setOrder(::utl::getString(xQueryProps->getPropertyValue(FM_PROP_SORT)));
+
+ sal_Bool bApplyFilter = sal_False;
+ if (::utl::hasProperty(FM_PROP_APPLYFILTER, xQueryProps))
+ bApplyFilter = ::utl::getBOOL(xQueryProps->getPropertyValue(FM_PROP_APPLYFILTER));
+
+ if (bApplyFilter)
+ {
+ if (::utl::hasProperty(FM_PROP_FILTER_CRITERIA, xQueryProps))
+ xLocalComposer->setFilter(::utl::getString(xQueryProps->getPropertyValue(FM_PROP_FILTER_CRITERIA)));
+ }
+ sStatement = xLocalComposer->getComposedQuery();
+ }
+ break;
+ default:
+ DBG_ERROR("::getCurrentSettingsComposer : no table, no query, no statement - what else ?!");
+ break;
+ }
+ }
+
+ if (sStatement.getLength())
+ {
+ // create an composer
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposerFactory> xFactory(xConn, ::com::sun::star::uno::UNO_QUERY);
+ if (xFactory.is())
+ xReturn = xFactory->createQueryComposer();
+ if (xReturn.is())
+ {
+ xReturn->setQuery(sStatement);
+ // append filter/sort
+ xReturn->setOrder(::utl::getString(_rxRowSetProps->getPropertyValue(FM_PROP_SORT)));
+ sal_Bool bApplyFilter = ::utl::getBOOL(_rxRowSetProps->getPropertyValue(FM_PROP_APPLYFILTER));
+ if (bApplyFilter)
+ xReturn->setFilter(::utl::getString(_rxRowSetProps->getPropertyValue(FM_PROP_FILTER_CRITERIA)));
+ }
+ }
+ }
+ }
+ catch(...)
+ {
+ DBG_ERROR("::getCurrentSettingsComposer : catched an exception !");
+ xReturn = NULL;
+ }
+
+
+ return xReturn;
+}
+
+//------------------------------------------------------------------------------
+sal_Bool isRowSetAlive(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rxRowSet)
+{
+ sal_Bool bIsAlive = sal_False;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> xSupplyCols(_rxRowSet, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> xCols;
+ if (xSupplyCols.is())
+ xCols = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>(xSupplyCols->getColumns(), ::com::sun::star::uno::UNO_QUERY);
+ if (xCols.is() && (xCols->getCount() > 0))
+ bIsAlive = sal_True;
+
+ return bIsAlive;
+}
+
+
+//==============================================================================
+DataColumn::DataColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxIFace)
+{
+ m_xPropertySet = _rxIFace;
+ m_xColumn = ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn>(_rxIFace, ::com::sun::star::uno::UNO_QUERY);
+ m_xColumnUpdate = ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumnUpdate>(_rxIFace, ::com::sun::star::uno::UNO_QUERY);
+
+ if (!m_xPropertySet.is() || !m_xColumn.is() || !m_xColumnUpdate.is())
+ {
+ m_xPropertySet = NULL;
+ m_xColumn = NULL;
+ m_xColumnUpdate = NULL;
+ }
+}
+
+
+
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
new file mode 100644
index 0000000000..b5b5fffd09
--- /dev/null
+++ b/svx/source/form/fmundo.cxx
@@ -0,0 +1,1132 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmundo.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_FMUNDO_HXX
+#include "fmundo.hxx"
+#endif
+
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLER_HPP_
+#include <com/sun/star/form/XFormController.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_SCRIPT_XEVENTATTACHERMANAGER_HPP_
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#endif
+
+#ifndef _FM_FMMODEL_HXX
+#include "fmmodel.hxx"
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+
+#ifndef _SVX_FMPAGE_HXX //autogen
+#include <fmpage.hxx>
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SVX_FMUNOPGE_HXX
+#include "fmpgeimp.hxx"
+#endif
+
+#ifndef _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif
+
+#ifndef _SFXMACITEM_HXX //autogen
+#include <svtools/macitem.hxx>
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SBXCLASS_HXX //autogen
+#include <svtools/sbx.hxx>
+#endif
+
+#ifndef _SB_SBUNO_HXX
+#include <basic/sbuno.hxx>
+#endif
+
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+
+#ifndef _SFXDOCFILE_HXX //autogen
+#include <sfx2/docfile.hxx>
+#endif
+
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+
+#ifndef _SFX_HRC
+#include <sfx2/sfx.hrc>
+#endif
+
+#ifndef _SFXEVENT_HXX //autogen
+#include <sfx2/event.hxx>
+#endif
+
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+
+#ifndef _SVDITER_HXX //autogen
+#include "svditer.hxx"
+#endif
+
+#ifndef _SVX_FMOBJ_HXX
+#include "fmobj.hxx"
+#endif
+
+#ifndef _OSL_MUTEX_HXX_ //autogen
+#include <osl/mutex.hxx>
+#endif
+
+#ifndef _SVX_FMGLOB_HXX
+#include "fmglob.hxx"
+#endif
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UTL_UNO3_HXX_
+#include <unotools/uno3.hxx>
+#endif
+#include <unotools/stl_types.hxx>
+
+#ifndef _SVX_FMSTL_HXX
+#include "fmstl.hxx"
+#endif
+
+//------------------------------------------------------------------------------
+// some helper structs for caching property infos
+//------------------------------------------------------------------------------
+struct PropertyInfo
+{
+ BOOL bIsTransientOrReadOnly : 1; // the property is transient or read-only, thus we need no undo action for it
+ BOOL bIsControlSourceProperty : 1; // the property is the special control source property, thus it may be handled
+ // as if it's transient or persistent
+};
+
+struct PropertySetInfo
+{
+ DECLARE_STL_USTRINGACCESS_MAP(PropertyInfo, AllProperties);
+
+ AllProperties aProps; // all properties of this set which we know so far
+ BOOL bHasEmptyControlSource; // sal_True -> the set has a DataField property, and the current value is an empty string
+ // sal_False -> the set has _no_ such property or it's value isn't empty
+};
+
+BOOL operator < (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& lhs,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rhs)
+{
+ return lhs.get() < rhs.get();
+}
+
+DECLARE_STL_STDKEY_MAP(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >, PropertySetInfo, PropertySetInfoCache);
+
+//------------------------------------------------------------------------------
+
+XubString static_STR_UNDO_PROPERTY;
+//------------------------------------------------------------------------------
+DBG_NAME(FmXUndoEnvironment);
+//------------------------------------------------------------------------------
+FmXUndoEnvironment::FmXUndoEnvironment(FmFormModel& _rModel)
+ :rModel(_rModel)
+ ,nLocks(0)
+ ,bReadOnly(sal_False)
+ ,m_pPropertySetCache(NULL)
+{
+ DBG_CTOR(FmXUndoEnvironment,NULL);
+}
+
+//------------------------------------------------------------------------------
+FmXUndoEnvironment::~FmXUndoEnvironment()
+{
+ DBG_DTOR(FmXUndoEnvironment,NULL);
+ if (m_pPropertySetCache)
+ delete static_cast<PropertySetInfoCache*>(m_pPropertySetCache);
+}
+
+//------------------------------------------------------------------------------
+void FmXUndoEnvironment::Clear()
+{
+ Lock();
+ sal_uInt16 nCount = rModel.GetPageCount();
+ sal_uInt16 i;
+ for (i = 0; i < nCount; i++)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt(((FmFormPage*)rModel.GetPage(i))->GetForms());
+ RemoveElement(xInt);
+ }
+
+ nCount = rModel.GetMasterPageCount();
+ for (i = 0; i < nCount; i++)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt(((FmFormPage*)rModel.GetMasterPage(i))->GetForms());
+ RemoveElement(xInt);
+ }
+ UnLock();
+
+ EndListening(*rModel.GetObjectShell());
+ if (IsListening(rModel))
+ EndListening(rModel);
+}
+
+//------------------------------------------------------------------------------
+void FmXUndoEnvironment::ModeChanged()
+{
+ if (bReadOnly != (rModel.GetObjectShell()->IsReadOnly() || rModel.GetObjectShell()->IsReadOnlyUI()))
+ {
+ bReadOnly = !bReadOnly;
+
+ sal_uInt16 nCount = rModel.GetPageCount();
+ sal_uInt16 i;
+ for (i = 0; i < nCount; i++)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt(((FmFormPage*)rModel.GetPage(i))->GetForms());
+ AlterPropertyListening(xInt);
+ }
+
+ nCount = rModel.GetMasterPageCount();
+ for (i = 0; i < nCount; i++)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt(((FmFormPage*)rModel.GetMasterPage(i))->GetForms());
+ AlterPropertyListening(xInt);
+ }
+
+ if (!bReadOnly)
+ StartListening(rModel);
+ else
+ EndListening(rModel);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXUndoEnvironment::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ if (rHint.ISA(SdrHint))
+ {
+ SdrHint* pSdrHint = (SdrHint*)&rHint;
+ switch( pSdrHint->GetKind() )
+ {
+ case HINT_OBJINSERTED:
+ {
+ SdrObject* pSdrObj = (SdrObject*)pSdrHint->GetObject();
+ Inserted( pSdrObj );
+ } break;
+ case HINT_OBJREMOVED:
+ {
+ SdrObject* pSdrObj = (SdrObject*)pSdrHint->GetObject();
+ Removed( pSdrObj );
+ }
+ break;
+ }
+ }
+ else if (rHint.ISA(SfxSimpleHint))
+ {
+ switch ( ((SfxSimpleHint&)rHint).GetId() )
+ {
+ case SFX_HINT_DYING:
+ Clear();
+ break;
+ case SFX_HINT_MODECHANGED:
+ ModeChanged();
+ break;
+ }
+ }
+ else if (rHint.ISA(SfxEventHint))
+ {
+ switch (((SfxEventHint&)rHint).GetEventId())
+ {
+ case SFX_EVENT_CREATEDOC:
+ case SFX_EVENT_OPENDOC:
+ ModeChanged();
+ break;
+ }
+ }
+
+}
+
+//------------------------------------------------------------------
+void FmXUndoEnvironment::Inserted(SdrObject* pObj)
+{
+ if (bReadOnly)
+ return;
+
+ if (pObj->GetObjInventor() == FmFormInventor)
+ {
+ FmFormObj* pFormObj = PTR_CAST(FmFormObj, pObj);
+ Inserted(pFormObj);
+ }
+ else if (pObj->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pObj->GetSubList());
+ while (aIter.IsMore())
+ {
+ SdrObject* pObj = aIter.Next();
+ Inserted(pObj);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXUndoEnvironment::Inserted(FmFormObj* pObj)
+{
+ // ist das Control noch einer ::com::sun::star::form::Form zugeordnet
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xModel = pObj->GetUnoControlModel();
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xContent(xModel, ::com::sun::star::uno::UNO_QUERY);
+ if (xContent.is() && pObj->GetPage())
+ {
+ // Komponente gehoert noch keiner ::com::sun::star::form::Form an
+ if (!xContent->getParent().is())
+ {
+ // Einfuegen in den Parent falls noetig
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xParent = pObj->GetParent();
+ // Suchen des ::com::sun::star::form::Form in der aktuellen Page
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xForm;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIface(xParent, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xForms(((FmFormPage*)pObj->GetPage())->GetForms(), ::com::sun::star::uno::UNO_QUERY);;
+
+ if (searchElement(xForms, xIface))
+ xForm = xParent;
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xTemp = ((FmFormPage*)pObj->GetPage())->GetImpl()->SetDefaults(xContent);
+ xForm = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (xTemp, ::com::sun::star::uno::UNO_QUERY);
+ }
+
+ // Position des Elements
+ sal_Int32 nPos = xForm->getCount();
+ if ((::com::sun::star::container::XIndexContainer*)xForm.get() == (::com::sun::star::container::XIndexContainer*)xParent.get())
+ {
+ if (nPos > pObj->GetPos())
+ nPos = xForm->getCount();
+ }
+
+ xForm->insertByIndex(nPos, ::com::sun::star::uno::makeAny(xContent));
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xManager(xForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xManager.is())
+ xManager->registerScriptEvents(nPos, pObj->GetEvents());
+ }
+
+ // FormObject zuruecksetzen
+ pObj->SetObjEnv(::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > ());
+ }
+}
+
+//------------------------------------------------------------------
+void FmXUndoEnvironment::Removed(SdrObject* pObj)
+{
+ if (bReadOnly)
+ return;
+
+ if (pObj->GetObjInventor() == FmFormInventor)
+ {
+ FmFormObj* pFormObj = PTR_CAST(FmFormObj, pObj);
+ Removed(pFormObj);
+ }
+ else if (pObj->IsGroupObject())
+ {
+ SdrObjListIter aIter(*pObj->GetSubList());
+ while (aIter.IsMore())
+ {
+ SdrObject* pObj = aIter.Next();
+ Removed(pObj);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXUndoEnvironment::Removed(FmFormObj* pObj)
+{
+ // ist das Control noch einer ::com::sun::star::form::Form zugeordnet
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xModel = pObj->GetUnoControlModel();
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xContent(xModel, ::com::sun::star::uno::UNO_QUERY);
+ if (xContent.is())
+ {
+ // das Object wird aus einer Liste herausgenommen
+ // existiert ein Vater wird das Object beim beim Vater entfernt und
+ // am FormObject gemerkt!
+
+ // wird das Object wieder eingefuegt und ein Parent existiert, so wird dieser
+ // Parent wiederum gesetzt
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xForm(xContent->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (xForm.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xIndexAccess((::com::sun::star::container::XIndexContainer*)xForm.get());
+ // Feststellen an welcher Position sich das Kind befunden hat
+ sal_Int32 nPos = getElementPos(xIndexAccess, xContent);
+ if (nPos >= 0)
+ {
+ ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor > aEvts;
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xManager(xForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xManager.is())
+ aEvts = xManager->getScriptEvents(nPos);
+
+ try
+ {
+ pObj->SetObjEnv(xForm, nPos, aEvts);
+ xForm->removeByIndex(nPos);
+ }
+ catch(...)
+ {
+ }
+
+ }
+ }
+ }
+}
+
+// ::com::sun::star::lang::XEventListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXUndoEnvironment::disposing(const ::com::sun::star::lang::EventObject& e) throw( ::com::sun::star::uno::RuntimeException )
+{
+ // check if it's an object we have cached informations about
+ if (m_pPropertySetCache)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSourceSet(e.Source, ::com::sun::star::uno::UNO_QUERY);
+ if (xSourceSet.is())
+ {
+ PropertySetInfoCache* pCache = static_cast<PropertySetInfoCache*>(m_pPropertySetCache);
+ PropertySetInfoCacheIterator aSetPos = pCache->find(xSourceSet);
+ if (aSetPos != pCache->end())
+ pCache->erase(aSetPos);
+ }
+ }
+}
+
+// ::com::sun::star::beans::XPropertyChangeListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXUndoEnvironment::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt)
+{
+ if (!IsLocked())
+ {
+ // kein Undo fuer transiente und readonly properties
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(evt.Source, ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ if (!m_pPropertySetCache)
+ m_pPropertySetCache = new PropertySetInfoCache;
+ PropertySetInfoCache* pCache = static_cast<PropertySetInfoCache*>(m_pPropertySetCache);
+
+ // let's see if we know something about the set
+ PropertySetInfoCacheIterator aSetPos = pCache->find(xSet);
+ if (aSetPos == pCache->end())
+ {
+ PropertySetInfo aNewEntry;
+ if (!::utl::hasProperty(FM_PROP_CONTROLSOURCE, xSet))
+ {
+ aNewEntry.bHasEmptyControlSource = sal_False;
+ }
+ else
+ {
+ try
+ {
+ ::com::sun::star::uno::Any aCurrentControlSource = xSet->getPropertyValue(FM_PROP_CONTROLSOURCE);
+ aNewEntry.bHasEmptyControlSource = !aCurrentControlSource.hasValue() || (::utl::getString(aCurrentControlSource).getLength() == 0);
+ }
+ catch(...)
+ {
+ }
+ }
+ (*pCache)[xSet] = aNewEntry;
+ aSetPos = pCache->find(xSet);
+ DBG_ASSERT(aSetPos != pCache->end(), "FmXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
+ }
+ else
+ { // is it the DataField property ?
+ if (evt.PropertyName.equals(FM_PROP_CONTROLSOURCE))
+ {
+ aSetPos->second.bHasEmptyControlSource = !evt.NewValue.hasValue() || (::utl::getString(evt.NewValue).getLength() == 0);
+ }
+ }
+
+ // now we have access to the cached info about the set
+ // let's see what we know about the property
+ PropertySetInfo::AllProperties& rPropInfos = aSetPos->second.aProps;
+ PropertySetInfo::AllPropertiesIterator aPropertyPos = rPropInfos.find(evt.PropertyName);
+ if (aPropertyPos == rPropInfos.end())
+ { // nothing 'til now ... have to change this ....
+ PropertyInfo aNewEntry;
+
+ // the attributes
+ INT32 nAttributes = xSet->getPropertySetInfo()->getPropertyByName(evt.PropertyName).Attributes;
+ aNewEntry.bIsTransientOrReadOnly = ((nAttributes & ::com::sun::star::beans::PropertyAttribute::READONLY) != 0) || ((nAttributes & ::com::sun::star::beans::PropertyAttribute::TRANSIENT) != 0);
+
+ // check if it is the special "DataFieldProperty"
+ aNewEntry.bIsControlSourceProperty = sal_False;
+ try
+ {
+ if (::utl::hasProperty(FM_PROP_CONTROLSOURCEPROPERTY, xSet))
+ {
+ ::com::sun::star::uno::Any aControlSourceProperty = xSet->getPropertyValue(FM_PROP_CONTROLSOURCEPROPERTY);
+ ::rtl::OUString sControlSourceProperty;
+ aControlSourceProperty >>= sControlSourceProperty;
+
+ aNewEntry.bIsControlSourceProperty = (sControlSourceProperty.equals(evt.PropertyName));
+ }
+ }
+ catch(...)
+ {
+ }
+
+ // insert the new entry
+ rPropInfos[evt.PropertyName] = aNewEntry;
+ aPropertyPos = rPropInfos.find(evt.PropertyName);
+ DBG_ASSERT(aPropertyPos != rPropInfos.end(), "FmXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
+ }
+
+ // now we have access to the cached info about the property affected
+ // and are able to decide wether or not we need an undo action
+
+ if (!aPropertyPos->second.bIsTransientOrReadOnly)
+ { // normally we would generate an undo action for all non-readonly and non-transient properties, but ...
+
+ // check if it is a special control property which is required for data field connectivity, these
+ // special properties may be handled as though they were transient ...
+ if (!aPropertyPos->second.bIsControlSourceProperty || aSetPos->second.bHasEmptyControlSource)
+ rModel.AddUndo(new FmUndoPropertyAction(rModel, evt));
+ }
+ }
+ }
+ else
+ {
+ // if it's the DataField property we may have to adjust our cache
+ if (m_pPropertySetCache && evt.PropertyName.equals(FM_PROP_CONTROLSOURCE))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(evt.Source, ::com::sun::star::uno::UNO_QUERY);
+ PropertySetInfoCache* pCache = static_cast<PropertySetInfoCache*>(m_pPropertySetCache);
+ PropertySetInfo& rSetInfo = (*pCache)[xSet];
+ rSetInfo.bHasEmptyControlSource = !evt.NewValue.hasValue() || (::utl::getString(evt.NewValue).getLength() == 0);
+ }
+ }
+}
+
+// ::com::sun::star::beans::XVetoableChangeListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXUndoEnvironment::vetoableChange(const ::com::sun::star::beans::PropertyChangeEvent& aEvent) throw( ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException )
+{
+ if (aEvent.PropertyName == FM_PROP_DATASOURCE)
+ {
+ // if the database form belongs to a connection
+ // it is not possible to change the connection
+ if (findConnection(aEvent.Source).is())
+ {
+ ::rtl::OUString aMessage = ::rtl::OUString(SVX_RES(RID_STR_VETO_DATASOURCE));
+ throw(::com::sun::star::beans::PropertyVetoException(aMessage, (::com::sun::star::beans::XVetoableChangeListener*)this));
+ }
+ }
+}
+
+// ::com::sun::star::container::XContainerListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXUndoEnvironment::elementInserted(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ // neues Object zum lauschen
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIface(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *) evt.Element.getValue());
+ AddElement(xIface);
+
+ if (!IsLocked() && rModel.GetObjectShell())
+ {
+ rModel.GetObjectShell()->SetModified(sal_True);
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXUndoEnvironment::elementReplaced(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIface(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *) evt.ReplacedElement.getValue());
+ RemoveElement(xIface);
+
+ xIface = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > (*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *) evt.Element.getValue());
+ AddElement(xIface);
+
+ if (!IsLocked() && rModel.GetObjectShell())
+ {
+ rModel.GetObjectShell()->SetModified(sal_True);
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXUndoEnvironment::elementRemoved(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIface(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)evt.Element.getValue());
+ RemoveElement(xIface);
+
+ if (!IsLocked() && rModel.GetObjectShell())
+ {
+ rModel.GetObjectShell()->SetModified(sal_True);
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXUndoEnvironment::AddForms(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & rForms)
+{
+ Lock();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt = rForms;
+ AddElement(xInt);
+ UnLock();
+}
+
+//------------------------------------------------------------------------------
+void FmXUndoEnvironment::RemoveForms(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & rForms)
+{
+ Lock();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt = rForms;
+ RemoveElement(xInt);
+ UnLock();
+}
+
+//------------------------------------------------------------------------------
+void FmXUndoEnvironment::AlterPropertyListening(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Element)
+{
+ // am ::com::sun::star::sdbcx::Container horchen
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ {
+ sal_uInt32 nCount = xContainer->getCount();
+ for (sal_uInt32 i = 0; i < nCount; i++)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIface(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xContainer->getByIndex(i).getValue());
+ AlterPropertyListening(xIface);
+ }
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ if (!bReadOnly)
+ xSet->addPropertyChangeListener(::rtl::OUString(), (::com::sun::star::beans::XPropertyChangeListener*)this);
+ else
+ xSet->removePropertyChangeListener(::rtl::OUString(), (::com::sun::star::beans::XPropertyChangeListener*)this);
+ }
+}
+
+
+//------------------------------------------------------------------------------
+void FmXUndoEnvironment::AddElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Element)
+{
+ // am ::com::sun::star::sdbcx::Container horchen
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ {
+ // Wenn der ::com::sun::star::sdbcx::Container ein EventAttachManager ist, mussen wir uns
+ // auch noch als ScriptListener anmelden.
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xEAManager(Element, ::com::sun::star::uno::UNO_QUERY);
+ if( xEAManager.is() )
+ xEAManager->addScriptListener( (::com::sun::star::script::XScriptListener*)this );
+
+ sal_uInt32 nCount = xContainer->getCount();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIface;
+ for (sal_uInt32 i = 0; i < nCount; i++)
+ {
+ xIface = *(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xContainer->getByIndex(i).getValue();
+ AddElement(xIface);
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xCont(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xCont.is())
+ xCont->addContainerListener((::com::sun::star::container::XContainerListener*)this);
+ }
+
+ if (!bReadOnly)
+ {
+ // auf Properties horchen
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ xSet->addPropertyChangeListener(::rtl::OUString(), (::com::sun::star::beans::XPropertyChangeListener*)this);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(xSet, ::com::sun::star::uno::UNO_QUERY);
+ if (xForm.is())
+ xSet->addVetoableChangeListener(FM_PROP_DATASOURCE, (::com::sun::star::beans::XVetoableChangeListener*)this);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXUndoEnvironment::RemoveElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Element)
+{
+ if (!bReadOnly)
+ {
+ // Verbindung zu PropertySet aufheben
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ xSet->removePropertyChangeListener(::rtl::OUString(), (::com::sun::star::beans::XPropertyChangeListener*)this);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(xSet, ::com::sun::star::uno::UNO_QUERY);
+ if (xForm.is())
+ xSet->removeVetoableChangeListener(FM_PROP_DATASOURCE, (::com::sun::star::beans::XVetoableChangeListener*)this);
+ }
+ }
+
+ // Verbindung zu Kindern aufheben
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xCont(Element, ::com::sun::star::uno::UNO_QUERY);
+ if (xCont.is())
+ xCont->removeContainerListener((::com::sun::star::container::XContainerListener*)this);
+
+ // Wenn der ::com::sun::star::sdbcx::Container ein EventAttachManager ist, mussen wir uns
+ // auch noch als ScriptListener anmelden.
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xEAManager(Element, ::com::sun::star::uno::UNO_QUERY);
+ if( xEAManager.is() )
+ xEAManager->removeScriptListener( (::com::sun::star::script::XScriptListener*)this );
+
+ sal_uInt32 nCount = xContainer->getCount();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIface;
+ for (sal_uInt32 i = 0; i < nCount; i++)
+ {
+ xIface = *(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xContainer->getByIndex(i).getValue();
+ RemoveElement(xIface);
+ }
+ }
+}
+
+
+// ::com::sun::star::script::XScriptListener
+void FmXUndoEnvironment::firing_Impl( const ::com::sun::star::script::ScriptEvent& evt, ::com::sun::star::uno::Any *pSyncRet )
+{
+ ::vos::OClearableGuard aGuard( Application::GetSolarMutex() );
+
+ SfxObjectShellRef xObjSh = rModel.GetObjectShell();
+ if( !xObjSh.Is() )
+ return;
+
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xThis;
+ if (evt.Helper.getValueType() ==
+ ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>*)0))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xController( *(::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > *)evt.Helper.getValue() );
+ xThis = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > (xController, ::com::sun::star::uno::UNO_QUERY);
+ }
+ else if (evt.Helper.getValueType() ==
+ ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)0))
+
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(*(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > *)evt.Helper.getValue());
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(xSet, ::com::sun::star::uno::UNO_QUERY);
+
+ if ( xForm.is())
+ {
+ // these events can't be called form a database ::com::sun::star::form::Form
+ if (evt.MethodName == ::rtl::OUString::createFromAscii("errorOccured"))
+ return;
+ else if (evt.MethodName == ::rtl::OUString::createFromAscii("approveCursorMove") ||
+ evt.MethodName == ::rtl::OUString::createFromAscii("approveRowChange") ||
+ evt.MethodName == ::rtl::OUString::createFromAscii("approveRowSetChange") ||
+ evt.MethodName == ::rtl::OUString::createFromAscii("approveParameter"))
+ {
+ sal_Bool bB = sal_True;
+ pSyncRet->setValue(&bB,::getBooleanCppuType());
+ return;
+ }
+ }
+ xThis = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > (xSet, ::com::sun::star::uno::UNO_QUERY);
+ }
+ else if( evt.Helper.getValueType() ==
+ ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>*)0) )
+
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > *)evt.Helper.getValue() );
+ xThis = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > (xControl, ::com::sun::star::uno::UNO_QUERY);
+ }
+
+ aGuard.clear();
+ if (xThis.is())
+ xObjSh->CallScript( evt.ScriptType, evt.ScriptCode,
+ xThis, (void *)&evt.Arguments,
+ pSyncRet );
+
+ }
+
+ // Objectshells are not thread safe, so guard the destruction
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ xObjSh = NULL;
+ }
+}
+
+void SAL_CALL FmXUndoEnvironment::firing(const ::com::sun::star::script::ScriptEvent& evt)
+{
+ firing_Impl( evt );
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXUndoEnvironment::approveFiring(const ::com::sun::star::script::ScriptEvent& evt)
+{
+ ::com::sun::star::uno::Any aRet;
+ firing_Impl( evt, &aRet );
+ return aRet;
+}
+
+//------------------------------------------------------------------------------
+FmUndoPropertyAction::FmUndoPropertyAction(FmFormModel& rNewMod, const ::com::sun::star::beans::PropertyChangeEvent& evt)
+ :SdrUndoAction(rNewMod)
+ ,aPropertyName(evt.PropertyName)
+ ,aNewValue(evt.NewValue)
+ ,aOldValue(evt.OldValue)
+ ,xObj(evt.Source, ::com::sun::star::uno::UNO_QUERY)
+{
+ if (rNewMod.GetObjectShell())
+ rNewMod.GetObjectShell()->SetModified(sal_True);
+ if(static_STR_UNDO_PROPERTY.Len() != 0)
+ static_STR_UNDO_PROPERTY = SVX_RES(RID_STR_UNDO_PROPERTY);
+}
+
+
+//------------------------------------------------------------------------------
+void FmUndoPropertyAction::Undo()
+{
+ FmXUndoEnvironment& rEnv = ((FmFormModel&)rMod).GetUndoEnv();
+
+ if (xObj.is() && !rEnv.IsLocked())
+ {
+ // Locking damit keine neue UndoAction entsteht
+ rEnv.Lock();
+ xObj->setPropertyValue(aPropertyName, aOldValue);
+ rEnv.UnLock();
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmUndoPropertyAction::Redo()
+{
+ FmXUndoEnvironment& rEnv = ((FmFormModel&)rMod).GetUndoEnv();
+
+ if (xObj.is() && !rEnv.IsLocked())
+ {
+ rEnv.Lock();
+ xObj->setPropertyValue(aPropertyName, aNewValue);
+ rEnv.UnLock();
+ }
+}
+
+//------------------------------------------------------------------------------
+XubString FmUndoPropertyAction::GetComment() const
+{
+ XubString aStr(static_STR_UNDO_PROPERTY);
+ sal_uInt16 nId = FmPropertyInfoService::getPropertyId(aPropertyName);
+ if (nId)
+ aStr.SearchAndReplace('#', FmPropertyInfoService::getPropertyTranslation(nId));
+ else
+ aStr.SearchAndReplace('#', aPropertyName);
+ return aStr;
+}
+
+
+DBG_NAME(FmUndoContainerAction);
+//------------------------------------------------------------------------------
+FmUndoContainerAction::FmUndoContainerAction(FmFormModel& rMod,
+ Action _eAction,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > & xCont,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xElem,
+ sal_Int32 nIdx)
+ :SdrUndoAction(rMod)
+ ,eAction(_eAction)
+ ,xContainer(xCont)
+ ,nIndex(nIdx)
+{
+ DBG_CTOR(FmUndoContainerAction,NULL);
+ if (xCont.is() && xElem.is())
+ {
+ // den Richtigen IFacePointer
+ ::utl::query_interface(xElem, xElement);
+ if (eAction == Removed)
+ {
+ if (nIndex < 0)
+ {
+ // Feststellen an welcher Position sich das Kind befunden hat
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xInd(xContainer,::com::sun::star::uno::UNO_QUERY);
+ nIndex = getElementPos(xInd, xElement);
+ }
+
+ if (nIndex >= 0)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xManager(xCont, ::com::sun::star::uno::UNO_QUERY);
+ if (xManager.is())
+ aEvts = xManager->getScriptEvents(nIndex);
+ }
+ else
+ xElement = NULL;
+
+ xOwnElement = xElement;
+ }
+ else
+ {
+ if (nIndex < 0)
+ nIndex = xContainer->getCount();
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+FmUndoContainerAction::~FmUndoContainerAction()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComp(xOwnElement, ::com::sun::star::uno::UNO_QUERY);
+ if (xComp.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xChild(xOwnElement, ::com::sun::star::uno::UNO_QUERY);
+ // nur wenn das Objekt frei schwebt
+ if (xChild.is() && !xChild->getParent().is())
+ xComp->dispose();
+ }
+ DBG_DTOR(FmUndoContainerAction,NULL);
+}
+
+//------------------------------------------------------------------------------
+void FmUndoContainerAction::Undo()
+{
+ FmXUndoEnvironment& rEnv = ((FmFormModel&)rMod).GetUndoEnv();
+ if (xContainer.is() && !rEnv.IsLocked() && xElement.is())
+ {
+ rEnv.Lock();
+ switch (eAction)
+ {
+ case Inserted:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xObj(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xContainer->getByIndex(nIndex).getValue()),
+ xIface;
+
+ ::utl::query_interface(xObj, xIface);
+ if ((::com::sun::star::uno::XInterface *)xElement.get() == (::com::sun::star::uno::XInterface *)xIface.get())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xManager(xContainer, ::com::sun::star::uno::UNO_QUERY);
+ if (xManager.is())
+ aEvts = xManager->getScriptEvents(nIndex);
+ xContainer->removeByIndex(nIndex);
+ xOwnElement = xElement;
+ }
+ } break;
+ case Removed:
+ if (xContainer->getCount() >= nIndex)
+ {
+ ::com::sun::star::uno::Any aVal;
+ if (xContainer->getElementType() == ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>*)0))
+
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFmcomp(xElement, ::com::sun::star::uno::UNO_QUERY);
+ aVal <<= xFmcomp;
+ }
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(xElement, ::com::sun::star::uno::UNO_QUERY);
+ aVal <<= xForm;
+ }
+
+ xContainer->insertByIndex(nIndex, aVal);
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xManager(xContainer, ::com::sun::star::uno::UNO_QUERY);
+ if (xManager.is())
+ xManager->registerScriptEvents(nIndex, aEvts);
+ xOwnElement = NULL;
+ } break;
+ }
+ rEnv.UnLock();
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmUndoContainerAction::Redo()
+{
+ FmXUndoEnvironment& rEnv = ((FmFormModel&)rMod).GetUndoEnv();
+ if (xContainer.is() && !rEnv.IsLocked() && xElement.is())
+ {
+ rEnv.Lock();
+ switch (eAction)
+ {
+ case Inserted:
+ {
+ if (xContainer->getCount() >= nIndex)
+ {
+ ::com::sun::star::uno::Any aVal;
+ if (xContainer->getElementType() ==
+ ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>*)0))
+
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFmcomp(xElement, ::com::sun::star::uno::UNO_QUERY);
+ aVal <<= xFmcomp;
+ }
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(xElement, ::com::sun::star::uno::UNO_QUERY);
+ aVal <<= xForm;
+ }
+
+ xContainer->insertByIndex(nIndex, aVal);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xManager(xContainer, ::com::sun::star::uno::UNO_QUERY);
+ if (xManager.is())
+ xManager->registerScriptEvents(nIndex, aEvts);
+ xOwnElement = NULL;
+ }
+ } break;
+ case Removed:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xObj(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xContainer->getByIndex(nIndex).getValue()),
+ xIface;
+ if ((::com::sun::star::uno::XInterface *)xElement.get() == (::com::sun::star::uno::XInterface *)xIface.get())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xManager(xContainer, ::com::sun::star::uno::UNO_QUERY);
+ if (xManager.is())
+ aEvts = xManager->getScriptEvents(nIndex);
+ xContainer->removeByIndex(nIndex);
+ xOwnElement = xElement;
+ }
+ } break;
+ }
+ rEnv.UnLock();
+ }
+}
+
+//------------------------------------------------------------------------------
+FmUndoModelReplaceAction::FmUndoModelReplaceAction(FmFormModel& _rMod, SdrUnoObj* _pObject, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xReplaced)
+ :SdrUndoAction(_rMod)
+ ,m_xReplaced(_xReplaced)
+ ,m_pObject(_pObject)
+{
+}
+
+//------------------------------------------------------------------------------
+FmUndoModelReplaceAction::~FmUndoModelReplaceAction()
+{
+ // dispose our element if nobody else is responsible for
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComp(m_xReplaced, ::com::sun::star::uno::UNO_QUERY);
+ if (xComp.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xChild(m_xReplaced, ::com::sun::star::uno::UNO_QUERY);
+ if (!xChild.is() || !xChild->getParent().is())
+ xComp->dispose();
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmUndoModelReplaceAction::Undo()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > xCurrentModel(m_pObject->GetUnoControlModel());
+
+ // replace the model within the parent
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xOldChild(m_xReplaced, ::com::sun::star::uno::UNO_QUERY);
+ if (xOldChild.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xParent(xOldChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (xParent.is())
+ {
+ // the form container works with ::com::sun::star::form::FormComponents
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xComponent(m_xReplaced, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xComponent.is(), "FmUndoModelReplaceAction::Undo : the new model is no form component !");
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCurrentSet(xCurrentModel, ::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(::utl::hasProperty(FM_PROP_NAME, xCurrentSet),
+ "FmUndoModelReplaceAction::Undo : one of the models is invalid !");
+ xParent->replaceByName(::utl::getString(xCurrentSet->getPropertyValue(FM_PROP_NAME)), ::com::sun::star::uno::makeAny(xComponent));
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmUndoModelReplaceAction::Undo : could not replace the model !");
+ }
+
+ }
+ }
+
+ m_pObject->SetUnoControlModel(m_xReplaced);
+ m_pObject->SetChanged();
+
+ m_xReplaced = xCurrentModel;
+}
+
+//------------------------------------------------------------------------------
+XubString FmUndoModelReplaceAction::GetComment() const
+{
+ return SVX_RES(RID_STR_UNDO_MODEL_REPLACE);
+}
+
+
+
+
diff --git a/svx/source/form/fmurl.cxx b/svx/source/form/fmurl.cxx
new file mode 100644
index 0000000000..0fcfa86e16
--- /dev/null
+++ b/svx/source/form/fmurl.cxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmurl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMURL_HXX
+#include "fmurl.hxx"
+#endif
+
+
+IMPLEMENT_CONSTASCII_USTRING(FMURL_FORMSLOTS_PREFIX,".uno:FormSlots/");
+
+IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVEFIRST,".uno:FormSlots/moveToFirst");
+IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVEPREV,".uno:FormSlots/moveToPrev");
+IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVENEXT,".uno:FormSlots/moveToNext");
+IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVELAST,".uno:FormSlots/moveToLast");
+IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVETONEW,".uno:FormSlots/moveToNew");
+IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_UNDO,".uno:FormSlots/undoRecord");
+
+IMPLEMENT_CONSTASCII_USTRING(FMURL_CONFIRM_DELETION,".uno:FormSlots/ConfirmDeletion");
+
+IMPLEMENT_CONSTASCII_USTRING(FMURL_COMPONENT_FORMGRIDVIEW,".component:DB/FormGridView");
+IMPLEMENT_CONSTASCII_USTRING(FMURL_GRIDVIEW_CLEARVIEW,".uno:FormSlots/ClearView");
+IMPLEMENT_CONSTASCII_USTRING(FMURL_GRIDVIEW_ADDCOLUMN,".uno:FormSlots/AddGridColumn");
+IMPLEMENT_CONSTASCII_USTRING(FMURL_GRIDVIEW_ATTACHTOFORM,".uno:FormSlots/AttachToForm");
+
+IMPLEMENT_CONSTASCII_USTRING(FMARG_ATTACHTO_MASTERFORM,"MasterForm");
+IMPLEMENT_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNTYPE,"ColumnType");
+IMPLEMENT_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNPOS,"ColumnPosition");
+
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
new file mode 100644
index 0000000000..cbbd6bfd0f
--- /dev/null
+++ b/svx/source/form/fmview.cxx
@@ -0,0 +1,1088 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmview.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _UTL_STLTYPES_HXX_
+#include <unotools/stl_types.hxx>
+#endif
+#ifndef _UTL_NUMBERS_HXX_
+#include <unotools/numbers.hxx>
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+#ifndef _CPPUHELPER_SERVICEFACTORY_HXX_
+#include <cppuhelper/servicefactory.hxx>
+#endif
+
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_
+#include <com/sun/star/uno/XNamingService.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XPREPAREDSTATEMENT_HPP_
+#include <com/sun/star/sdbc/XPreparedStatement.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
+#include <com/sun/star/sdb/XQueriesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDDB_XTABLESSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XDATABASEACCESS_HPP_
+#include <com/sun/star/sdb/XDatabaseAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
+#include <com/sun/star/sdbc/XConnection.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XDATABASEENVIRONMENT_HPP_
+#include <com/sun/star/sdb/XDatabaseEnvironment.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
+#include <com/sun/star/sdbc/DataType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
+#include <com/sun/star/form/XLoadable.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FORM_XRESET_HPP_
+#include <com/sun/star/form/XReset.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATS_HPP_
+#include <com/sun/star/util/XNumberFormats.hpp>
+#endif
+
+#ifndef _SVX_FMVWIMP_HXX
+#include "fmvwimp.hxx"
+#endif
+
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFX_BINDINGS_HXX //autogen
+#include <sfx2/bindings.hxx>
+#endif
+
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+#ifndef _SB_SBUNO_HXX
+#include <basic/sbuno.hxx>
+#endif
+#ifndef _SFX_MACROCONF_HXX //autogen
+#include <sfx2/macrconf.hxx>
+#endif
+
+#ifndef _SBXCLASS_HXX //autogen
+#include <svtools/sbx.hxx>
+#endif
+
+#ifndef _SVX_DIALMGR_HXX //autogen
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SVX_FMITEMS_HXX
+#include "fmitems.hxx"
+#endif
+
+#ifndef _SVDITER_HXX //autogen
+#include "svditer.hxx"
+#endif
+#ifndef _SVDPAGV_HXX //autogen
+#include "svdpagv.hxx"
+#endif
+#ifndef _SVDOGRP_HXX //autogen
+#include <svdogrp.hxx>
+#endif
+#ifndef _FM_FMVIEW_HXX
+#include "fmview.hxx"
+#endif
+#ifndef _FM_FMMODEL_HXX
+#include "fmmodel.hxx"
+#endif
+#ifndef _FM_FMPAGE_HXX
+#include "fmpage.hxx"
+#endif
+#ifndef _SVX_FMSHELL_HXX
+#include "fmshell.hxx"
+#endif
+#ifndef _SVX_FMPGEIMP_HXX
+#include "fmpgeimp.hxx"
+#endif
+#ifndef _SVX_FMGLOB_HXX
+#include "fmglob.hxx"
+#endif
+#ifndef _SVX_FMOBJ_HXX
+#include "fmobj.hxx"
+#endif
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#ifndef _SVX_FMSHIMP_HXX
+#include "fmshimp.hxx"
+#endif
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _SVX_FMUNDO_HXX
+#include "fmundo.hxx"
+#endif // _SVX_FMUNDO_HXX
+
+#ifndef _MULTIPRO_HXX
+#include "multipro.hxx"
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UTIL_XLOCALIZEDALIASES_HXX_
+#include <com/sun/star/util/XLocalizedAliases.hpp>
+#endif
+#ifndef _ISOLANG_HXX
+#include <tools/isolang.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+
+void getConnectionSpecs(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn, ::rtl::OUString& rURL, ::rtl::OUString& _rRegisteredTitle)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xURLSupplier(_rxConn, ::com::sun::star::uno::UNO_QUERY);
+ if (!::utl::hasProperty(FM_PROP_URL, xURLSupplier))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xChild(_rxConn, ::com::sun::star::uno::UNO_QUERY);
+ if (xChild.is())
+ xURLSupplier = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >(xChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ }
+ if (::utl::hasProperty(FM_PROP_URL, xURLSupplier))
+ {
+ try { rURL = ::utl::getString(xURLSupplier->getPropertyValue(FM_PROP_URL)); } catch(...) { }
+ }
+
+ if (rURL.getLength())
+ {
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XLocalizedAliases > xAliases(::utl::getProcessServiceFactory()->createInstance(SRV_SDB_DATABASE_ACCESS_CONTEXT), ::com::sun::star::uno::UNO_QUERY);
+ if (xAliases.is())
+ {
+ // get the application language
+ String sLanguage, sCountry;
+ ConvertLanguageToIsoNames(Application::GetAppInternational().GetLanguage(), sLanguage, sCountry);
+ _rRegisteredTitle = xAliases->lookupProgrammatic(::com::sun::star::lang::Locale(sLanguage, sCountry, ::rtl::OUString()), rURL);
+ }
+ }
+ catch(...)
+ {
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+TYPEINIT1(FmFormView, E3dView);
+
+//------------------------------------------------------------------------
+FmFormView::FmFormView( FmFormModel* pModel, OutputDevice* pOut )
+ :E3dView(pModel,pOut)
+{
+ Init();
+}
+
+//------------------------------------------------------------------------
+FmFormView::FmFormView( FmFormModel* pModel, ExtOutputDevice* pXOut )
+ :E3dView( pModel, pXOut )
+{
+ Init();
+}
+
+//------------------------------------------------------------------------
+FmFormView::FmFormView( FmFormModel* pModel )
+ :E3dView( pModel )
+{
+ Init();
+}
+
+//------------------------------------------------------------------------
+void FmFormView::Init()
+{
+ pFormShell = NULL;
+ pImpl = new FmXFormView(this);
+ pImpl->acquire();
+
+ //////////////////////////////////////////////////////////////////////
+ // Model setzen
+ SdrModel* pModel = GetModel();
+
+ DBG_ASSERT( pModel->ISA(FmFormModel), "Falsches Model" );
+ if( !pModel->ISA(FmFormModel) ) return;
+ FmFormModel* pFormModel = (FmFormModel*)pModel;
+
+ //////////////////////////////////////////////////////////////////////
+ // DesignMode vom Model holen
+ sal_Bool bInitDesignMode = pFormModel->GetOpenInDesignMode();
+ SfxObjectShell* pObjShell = pFormModel->GetObjectShell();
+ sal_Bool bReadOnly = sal_False;
+ if( pObjShell )
+ bReadOnly = pObjShell->IsReadOnly();
+ if( bReadOnly )
+ bInitDesignMode = sal_False;
+
+ // dieses wird in der Shell vorgenommen
+ // bDesignMode = !bInitDesignMode; // erzwingt, dass SetDesignMode ausgefuehrt wird
+ SetDesignMode( bInitDesignMode );
+}
+
+//------------------------------------------------------------------------
+FmFormView::~FmFormView()
+{
+ pImpl->release();
+
+ // Bei der Shell abmelden
+ if( pFormShell )
+ pFormShell->SetView( NULL );
+}
+
+//------------------------------------------------------------------------
+void FmFormView::MarkListHasChanged()
+{
+ E3dView::MarkListHasChanged();
+
+ if (pFormShell && IsDesignMode())
+ pFormShell->GetImpl()->SetSelectionDelayed(this);
+}
+
+//------------------------------------------------------------------------
+void FmFormView::AddWin(OutputDevice* pWin1)
+{
+ E3dView::AddWin(pWin1);
+}
+
+//------------------------------------------------------------------------
+void FmFormView::DelWin(OutputDevice* pWin1)
+{
+ E3dView::DelWin(pWin1);
+}
+
+//------------------------------------------------------------------------
+void FmFormView::ChangeDesignMode(sal_Bool bDesign)
+{
+ if (bDesign == IsDesignMode())
+ return;
+
+ FmFormModel* pModel = PTR_CAST(FmFormModel, GetModel());
+ if (pModel)
+ { // fuer die Zeit des Uebergangs das Undo-Environment ausschalten, das sichert, dass man dort auch nicht-transiente
+ // Properties mal eben aendern kann (sollte allerdings mit Vorsicht genossen und beim Rueckschalten des Modes
+ // auch immer wieder rueckgaegig gemacht werden. Ein Beispiel ist das Setzen der maximalen Text-Laenge durch das
+ // FmXEditModel an seinem Control.)
+ pModel->GetUndoEnv().Lock();
+ }
+
+ // Reihenfolge beim umsetzen !Designmode
+ // a.) Datenbankforms laden
+ // b.) Designmode an die ::com::sun::star::sdbcx::View weitergeben
+ // c.) Controls aktivieren
+
+ SdrPageView* pCurPageView = GetPageViewPvNum(0);
+ FmFormPage* pCurPage = pCurPageView ? PTR_CAST(FmFormPage,pCurPageView->GetPage()) : NULL;
+
+ if (pCurPage && bDesign)
+ {
+ DeactivateControls(pCurPageView);
+ pImpl->Deactivate(pCurPageView);
+ }
+
+ // über all angemeldeten Pages iterieren
+ // nur die aktive wird umgeschaltet
+ sal_uInt16 nCount = GetPageViewCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
+ {
+ FmFormPage* pPage = PTR_CAST(FmFormPage,GetPageViewPvNum(i)->GetPage());
+ if (pPage)
+ {
+ // Un/Load all forms
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xForms(((FmFormPage*)pPage)->GetForms(), ::com::sun::star::uno::UNO_QUERY);
+
+ // during load the environment covers the error handling
+ if (!bDesign)
+ ActivateControls(pCurPageView);
+
+ for (sal_Int32 i = 0, nCount = xForms->getCount(); i < nCount; i++)
+ {
+ ::com::sun::star::uno::Any aElement(xForms->getByIndex(i));
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XReset > xReset(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)aElement.getValue(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > xLoad(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)aElement.getValue(), ::com::sun::star::uno::UNO_QUERY);
+
+ if (bDesign)
+ {
+ if (xLoad.is() && xLoad->isLoaded())
+ xLoad->unload();
+
+ if (xReset.is())
+ xReset->reset();
+ }
+ else
+ {
+ if (::isLoadable(xLoad) && !xLoad->isLoaded())
+ xLoad->load();
+ }
+ }
+ }
+ }
+
+ SetDesignMode(bDesign);
+ if (pCurPage)
+ {
+ if (bDesign)
+ {
+ //////////////////////////////////////////////////////////////////
+ // UnoObjekte neu zeichnen
+ if (pCurPageView)
+ {
+ SdrObjListIter aIter(*pCurPage);
+ while( aIter.IsMore() )
+ {
+ SdrObject* pObj = aIter.Next();
+ if (pObj && pObj->IsUnoObj())
+ pObj->SendRepaintBroadcast();
+ }
+ }
+ }
+ else
+ {
+ UnmarkAll();
+
+ // Erste ::com::sun::star::form aktivieren
+ pImpl->Activate(NULL);
+ }
+ }
+
+ // und mein Undo-Environment wieder an
+ if (pModel)
+ pModel->GetUndoEnv().UnLock();
+}
+
+//------------------------------------------------------------------------
+SdrPageView* FmFormView::ShowPage(SdrPage* pPage, const Point& rOffs)
+{
+ SdrPageView* pPV = E3dView::ShowPage(pPage, rOffs);
+
+ if (pPage)
+ {
+ if (!IsDesignMode())
+ {
+ // creating the controllers
+ ActivateControls(pPV);
+
+ // Alles deselektieren
+ UnmarkAll();
+
+ // Erste ::com::sun::star::form aktivieren
+ pImpl->Activate(pPV);
+ } // nur wenn die Shell bereits im DesignMode ist
+ else if (pFormShell && pFormShell->IsDesignMode())
+ {
+ FmXFormShell* pFormShellImpl = pFormShell->GetImpl();
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xForms(((FmFormPage*)pPage)->GetForms(), ::com::sun::star::uno::UNO_QUERY);
+ pFormShellImpl->ResetForms(xForms, sal_True);
+
+ // damit der Formular-Navigator auf den Seitenwechsel reagieren kann
+ SFX_BINDINGS().Invalidate(SID_FM_FMEXPLORER_CONTROL , sal_True, sal_False);
+
+ pFormShellImpl->SetSelection(GetMarkList());
+ }
+ }
+ return pPV;
+}
+
+//------------------------------------------------------------------------
+void FmFormView::HidePage(SdrPageView* pPV)
+{
+ if (!IsDesignMode())
+ {
+ // Controls wieder deaktivieren
+ DeactivateControls(pPV);
+ pImpl->Deactivate(pPV);
+ }
+ E3dView::HidePage(pPV);
+}
+
+//------------------------------------------------------------------------
+SdrModel* FmFormView::GetMarkedObjModel() const
+{
+ return E3dView::GetMarkedObjModel();
+}
+
+//------------------------------------------------------------------------
+sal_Bool FmFormView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, sal_uInt32 nOptions)
+{
+ return E3dView::Paste(rMod, rPos, pLst, nOptions);
+}
+
+//------------------------------------------------------------------------
+void FmFormView::ActivateControls(SdrPageView* pPageView)
+{
+ if (!pPageView) return;
+ const SdrPageViewWinList& rWinList = pPageView->GetWinList();
+ for (sal_uInt16 i = 0; i < rWinList.GetCount(); i++)
+ {
+ if (rWinList[i].GetControlList().GetCount())
+ {
+ pImpl->addWindow(&rWinList[i]);
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFormView::DeactivateControls(SdrPageView* pPageView)
+{
+ if( !pPageView ) return;
+ const SdrPageViewWinList& rWinList = pPageView->GetWinList();
+ for (sal_uInt16 i = 0; i < rWinList.GetCount(); i++)
+ {
+ if (rWinList[i].GetControlList().GetCount())
+ {
+ pImpl->removeWindow(rWinList[i].GetControlContainerRef() );
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFormView::ObjectCreated(FmFormObj* pObj)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(pObj->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xSet.is())
+ return;
+
+ if (!pFormShell->GetImpl()->GetWizardUsing())
+ return;
+
+ ::com::sun::star::uno::Any aValue = xSet->getPropertyValue(FM_PROP_CLASSID);
+
+ sal_Int16 nClassId;
+ if(!(aValue >>= nClassId))
+ nClassId = ::com::sun::star::form::FormComponentType::CONTROL;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xChild(xSet, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xForm(xChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ String aWizardName;
+ ::com::sun::star::uno::Any aObj;
+
+ switch (nClassId)
+ {
+ case ::com::sun::star::form::FormComponentType::GRIDCONTROL:
+ aWizardName.AssignAscii("GridWizard.GridWizard.MainWithDefault");
+ aObj <<= xChild;
+ break;
+ case ::com::sun::star::form::FormComponentType::LISTBOX:
+ case ::com::sun::star::form::FormComponentType::COMBOBOX:
+ // Hat die ::com::sun::star::form eine Verbindung zur Datenbank?
+ {
+ sal_Bool bDataForm = sal_False;
+ try
+ {
+ bDataForm = xForm.is() && ::utl::calcConnection(xForm, ::utl::getProcessServiceFactory()).is();
+ }
+ catch(...)
+ {
+ }
+
+ if (bDataForm)
+ {
+ aWizardName.AssignAscii("ComboWizard.ComboWizard.MainWithDefault");
+ aObj <<= xChild;
+ }
+ } break;
+ case ::com::sun::star::form::FormComponentType::GROUPBOX:
+ // Hat die ::com::sun::star::form eine Verbindung zur Datenbank?
+ aWizardName.AssignAscii("GroupWizard.GroupWizard.MainWithDefault");
+ aObj <<= xChild;
+ break;
+ }
+
+ if (aWizardName.Len() != 0)
+ {
+ SfxApplication* pApp = SFX_APP();
+ SbxArrayRef xArray = new SbxArray();
+ SbxVariableRef xReturn = new SbxVariable();
+ SbxVariableRef xParam= new SbxVariable();
+ xParam->PutBool(sal_True);
+
+ SbxObjectRef xObj = ::GetSbUnoObject(String(), aObj);
+ xArray->Put(xObj,1);
+ xArray->Put(xParam,2);
+
+ pApp->EnterBasicCall();
+ ErrCode aResult = pApp->GetMacroConfig()->Call(NULL,aWizardName,pApp->GetBasicManager(),xArray,xReturn);
+ pApp->LeaveBasicCall();
+
+ if (ERRCODE_NONE != aResult)
+ {
+ sal_uInt16 nContextId(0);
+ switch (nClassId)
+ {
+ case ::com::sun::star::form::FormComponentType::GRIDCONTROL:
+ nContextId = RID_SUB_GRIDCONTROL_WIZARD;
+ break;
+ case ::com::sun::star::form::FormComponentType::LISTBOX:
+ nContextId = RID_SUB_LISTBOX_WIZARD;
+ break;
+ case ::com::sun::star::form::FormComponentType::COMBOBOX:
+ nContextId = RID_SUB_COMBOBOX_WIZARD;
+ break;
+ case ::com::sun::star::form::FormComponentType::GROUPBOX:
+ nContextId = RID_SUB_GROUPBOX_WIZARD;
+ break;
+ }
+ SfxErrorContext aContext(nContextId, NULL, RID_RES_CONTROL_WIZARDS_ERROR_CONTEXTS, DIALOG_MGR());
+ ErrorHandler::HandleError(aResult);
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFormView::CreateControlWithLabel(OutputDevice* pOutDev, sal_Int32 nYOffsetMM, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xField,
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > xNumberFormats, sal_uInt16 nObjID, const ::rtl::OUString& rFieldPostfix,
+ FmFormObj*& pLabel, FmFormObj*& pControl) const
+{
+ sal_Int32 nDataType = ::utl::getINT32(xField->getPropertyValue(FM_PROP_FIELDTYPE));
+ sal_Int32 nFormatKey = ::utl::getINT32(xField->getPropertyValue(FM_PROP_FORMATKEY));
+
+ ::com::sun::star::uno::Any aFieldName(xField->getPropertyValue(FM_PROP_NAME));
+ ::rtl::OUString sFieldName;
+ aFieldName >>= sFieldName;
+
+ // das Label
+ pLabel = (FmFormObj*)SdrObjFactory::MakeNewObject( FmFormInventor, OBJ_FM_FIXEDTEXT, NULL, NULL );
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xLabelSet(pLabel->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ xLabelSet->setPropertyValue(FM_PROP_LABEL, ::com::sun::star::uno::makeAny(sFieldName + rFieldPostfix));
+
+ // positionieren unter Beachtung der Einstellungen des Ziel-Output-Devices
+ Size aTextSize(pOutDev->GetTextWidth(sFieldName + rFieldPostfix), pOutDev->GetTextHeight());
+
+ SdrModel* pModel = GetModel();
+ MapMode eTargetMode(pOutDev->GetMapMode()),
+ eSourceMode(MAP_100TH_MM);
+
+ // Textbreite ist mindestens 5cm
+ // Texthoehe immer halber cm
+ Size aDefTxtSize(3000, 500);
+ Size aDefSize(4000, 500);
+ Size aDefImageSize(4000, 4000);
+ // Abstand zwischen Text und Control
+ Size aDelta(500, 0);
+
+ Size aRealSize = pOutDev->LogicToLogic(aTextSize, eTargetMode, eSourceMode);
+ aRealSize.Width() = max(aRealSize.Width(), aDefTxtSize.Width()) + aDelta.Width();
+ aRealSize.Height()= aDefSize.Height();
+
+ // je nach Skalierung des Zieldevices muss die Groesse noch normiert werden (#53523#)
+ aRealSize.Width() = sal_Int32(Fraction(aRealSize.Width(), 1) * eTargetMode.GetScaleX());
+ aRealSize.Height() = sal_Int32(Fraction(aRealSize.Height(), 1) * eTargetMode.GetScaleY());
+ pLabel->SetLogicRect(
+ Rectangle( pOutDev->LogicToLogic(Point(0, nYOffsetMM), eSourceMode, eTargetMode),
+ pOutDev->LogicToLogic(aRealSize, eSourceMode, eTargetMode)
+ ));
+
+ // jetzt das Control
+ pControl = (FmFormObj*)SdrObjFactory::MakeNewObject( FmFormInventor, nObjID, NULL, NULL );
+
+ // positionieren
+ Size szControlSize;
+ if (::com::sun::star::sdbc::DataType::BIT == nDataType)
+ szControlSize = aDefSize;
+ else if (OBJ_FM_IMAGECONTROL == nObjID || ::com::sun::star::sdbc::DataType::LONGVARCHAR == nDataType)
+ szControlSize = aDefImageSize;
+ else
+ szControlSize = aDefSize;
+
+ // normieren wie oben
+ szControlSize.Width() = sal_Int32(Fraction(szControlSize.Width(), 1) * eTargetMode.GetScaleX());
+ szControlSize.Height() = sal_Int32(Fraction(szControlSize.Height(), 1) * eTargetMode.GetScaleY());
+ pControl->SetLogicRect(
+ Rectangle( pOutDev->LogicToLogic(Point(aRealSize.Width(), nYOffsetMM), eSourceMode, eTargetMode),
+ pOutDev->LogicToLogic(szControlSize, eSourceMode, eTargetMode)
+ ));
+
+ // ein paar initiale Einstellungen am ControlModel
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xControlSet = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (pControl->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xControlSet.is())
+ {
+ // ein paar numersiche Eigenschaften durchschleifen
+ if (::utl::hasProperty(FM_PROP_DECIMAL_ACCURACY, xControlSet))
+ {
+ // Number braucht eine Scale
+ ::com::sun::star::uno::Any aScaleVal(::utl::getNumberFormatDecimals(xNumberFormats, nFormatKey));
+ xControlSet->setPropertyValue(FM_PROP_DECIMAL_ACCURACY, aScaleVal);
+ }
+ if (::utl::hasProperty(FM_PROP_VALUEMIN, xControlSet) && ::utl::hasProperty(FM_PROP_VALUEMAX, xControlSet))
+ {
+ // die minimale/maximale Zahl in diesem Feld
+ sal_Int32 nMinValue = -1000000000, nMaxValue = 1000000000;
+ switch (nDataType)
+ {
+ case ::com::sun::star::sdbc::DataType::TINYINT : nMinValue = 0; nMaxValue = 255; break;
+ case ::com::sun::star::sdbc::DataType::SMALLINT : nMinValue = -32768; nMaxValue = 32767; break;
+ case ::com::sun::star::sdbc::DataType::INTEGER : nMinValue = 0x80000000; nMaxValue = 0x7FFFFFFF; break;
+ // um die doubles/singles kuemmere ich mich nicht, da es ein wenig sinnlos ist
+ }
+ ::com::sun::star::uno::Any aVal;
+ aVal <<= nMinValue;
+ xControlSet->setPropertyValue(FM_PROP_VALUEMIN,aVal);
+ aVal <<= nMaxValue;
+ xControlSet->setPropertyValue(FM_PROP_VALUEMAX,aVal);
+ }
+
+ if (::utl::hasProperty(FM_PROP_STRICTFORMAT, xControlSet))
+ { // Formatueberpruefung fue numeric fields standardmaessig sal_True
+ sal_Bool bB(sal_True);
+ ::com::sun::star::uno::Any aVal(&bB,getBooleanCppuType());
+ xControlSet->setPropertyValue(FM_PROP_STRICTFORMAT, aVal);
+ }
+
+ xControlSet->setPropertyValue(FM_PROP_CONTROLSOURCE, aFieldName);
+ xControlSet->setPropertyValue(FM_PROP_NAME, aFieldName);
+
+ if (nDataType == ::com::sun::star::sdbc::DataType::LONGVARCHAR)
+ {
+ sal_Bool bB(sal_True);
+ xControlSet->setPropertyValue(FM_PROP_MULTILINE,::com::sun::star::uno::Any(&bB,getBooleanCppuType()));
+ }
+
+ if (nObjID == OBJ_FM_CHECKBOX)
+ xControlSet->setPropertyValue(FM_PROP_TRISTATE,
+ ::com::sun::star::uno::makeAny(xField->getPropertyValue(FM_PROP_ISNULLABLE))
+ );
+ }
+
+ // announce the label to the control
+ if (::utl::hasProperty(FM_PROP_CONTROLLABEL, xControlSet))
+ {
+ // (try-catch as the control may refuse a model without the right service name - which we don't know
+ // usually a fixed text we use as label should be accepted, but to be sure ....)
+ try
+ {
+ xControlSet->setPropertyValue(FM_PROP_CONTROLLABEL, ::com::sun::star::uno::makeAny(xLabelSet));
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmFormView::CreateControlWithLabel : could not marry the control and the label !");
+ }
+ ;
+ }
+}
+
+//------------------------------------------------------------------------
+SdrObject* FmFormView::CreateFieldControl(const UniString& rFieldDesc) const
+{
+ if (!IsDesignMode())
+ return NULL;
+
+ FmFormPage& rPage = *(FmFormPage*)GetPageViewPvNum(0)->GetPage();
+
+ // SBA_FIELDEXCHANGE_FORMAT
+ // "Datenbankname";"Tabellen/QueryName";1/0(fuer Tabelle/Abfrage);"Feldname"
+ ::rtl::OUString aDatabaseName = rFieldDesc.GetToken(0,char(11));
+ ::rtl::OUString aObjectName = rFieldDesc.GetToken(1,char(11));
+ sal_uInt16 nObjectType = rFieldDesc.GetToken(2,char(11)).ToInt32();
+ ::rtl::OUString aFieldName = rFieldDesc.GetToken(3,char(11));
+
+ if (!aFieldName.getLength() || !aObjectName.getLength() || !aDatabaseName.getLength())
+ return NULL;
+
+
+ // Datenbank, Tabelle/Abfrage und Feld bestimmen
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseEnvironment > xEnv(::utl::getProcessServiceFactory()->createInstance(SRV_SDB_DATABASE_ENVIRONMENT), ::com::sun::star::uno::UNO_QUERY);
+ if (!xEnv.is())
+ return NULL;
+
+ // Einlesen des default workspace
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > xConnection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess > xDatabase;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > xStatement;
+
+ try
+ {
+ ::rtl::OUString sDatabaseName = aDatabaseName;
+ try
+ {
+ xDatabase = xEnv->getDatabaseAccess(sDatabaseName);
+ }
+ catch(::com::sun::star::sdbc::SQLException e)
+ { // allowed, the env may throw an exception in case of an invalid name
+ e; // make compiler happy
+ }
+
+ if (!xDatabase.is())
+ { // aDatabaseName isn't a database path. maybe a favorite name ?
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XNamingService > xDatabaseAccesses(::utl::getProcessServiceFactory()->createInstance(SRV_SDB_DATABASE_ACCESS_CONTEXT), ::com::sun::star::uno::UNO_QUERY);
+ if (xDatabaseAccesses.is())
+ {
+ try
+ {
+ xDatabase = ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess > (xDatabaseAccesses->getRegisteredObject(sDatabaseName), ::com::sun::star::uno::UNO_QUERY);
+ }
+ catch( ::com::sun::star::container::NoSuchElementException e)
+ { // allowed, means aDatabaseName isn't a valid favorite name ....
+ e; // make compiler happy
+ }
+ }
+ }
+ if (!xDatabase.is())
+ {
+ DBG_ERROR("FmGridHeader::FmFormView::CreateFieldControl : could not retrieve the database access object !");
+ return NULL;
+ }
+ xConnection = xDatabase->getConnection(::rtl::OUString(), ::rtl::OUString());
+ if (!xConnection.is())
+ return NULL;
+
+ // check if the document is able to handle forms with the given data source
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > xDocParentConn = findConnection(rPage.GetForms());
+ if (xDocParentConn.is())
+ { // there is a connection which restricts the allowed data sources for the forms
+
+ // check if the new to-be-set data source (connection) complies to this restriction
+ ::rtl::OUString sDocParentConnURL, sDocParentConnTitle;
+ getConnectionSpecs(xDocParentConn, sDocParentConnURL, sDocParentConnTitle);
+
+ ::rtl::OUString sNewConnURL, sNewConnTitle;
+ getConnectionSpecs(xConnection, sNewConnURL, sNewConnTitle);
+
+ sal_Bool bCompliant = sal_True;
+ if (sDocParentConnTitle.getLength() && sNewConnTitle.getLength())
+ {
+ // both databases are registered
+ if (!sDocParentConnTitle.equals(sNewConnTitle))
+ // and they're registered under different names -> not allowed
+ bCompliant = sal_False;
+ }
+ else if (sDocParentConnTitle.getLength() + sNewConnTitle.getLength() != 0)
+ { // exactly one database is registered -> they're not equal -> not allowed
+ bCompliant = sal_False;
+ }
+ else
+ { // none of the data sources is registered -> compare the URLs
+ INetURLObject aNewConnURL(sNewConnURL);
+ INetURLObject aDocParentConnURL(sDocParentConnURL);
+ if (aNewConnURL != aDocParentConnURL)
+ bCompliant = sal_False;
+ }
+
+ if (!bCompliant)
+ {
+ pImpl->m_sErrorMessage = String(SVX_RES(RID_STR_CREATECONTROLS_INVALIDSOURCE));
+ pImpl->m_sErrorMessage.SearchAndReplaceAscii("$docname$", sDocParentConnTitle.getLength() ? sDocParentConnTitle : sDocParentConnURL);
+ pImpl->m_sErrorMessage.SearchAndReplaceAscii("$dropname$", sNewConnTitle.getLength() ? sNewConnTitle : sNewConnURL);
+
+ // no message boxes while DnD
+ DBG_ASSERT(pImpl->m_nErrorMessageEvent == 0, "FmFormView::CreateFieldControl : two error events : you can't be that fast !");
+ pImpl->m_nErrorMessageEvent = Application::PostUserEvent(LINK(pImpl, FmXFormView, OnDelayedErrorMessage));
+ return NULL;
+ }
+ }
+
+ // Festellen des Feldes
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xFields;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xField;
+ switch (nObjectType)
+ {
+ case 0: // old : DataSelectionType_TABLE:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > xSupplyTables(xConnection, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyColumns(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xSupplyTables->getTables()->getByName(aObjectName).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ xFields = xSupplyColumns->getColumns();
+ }
+ break;
+ case 1: // old : DataSelectionType_QUERY:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XQueriesSupplier > xSupplyQueries(xConnection, ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyColumns(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xSupplyQueries->getQueries()->getByName(aObjectName).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ xFields = xSupplyColumns->getColumns();
+ }
+ break;
+ default:
+ {
+ xStatement = xConnection->prepareStatement(aObjectName);
+ // not interested in any results
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (xStatement,::com::sun::star::uno::UNO_QUERY)->setPropertyValue(::rtl::OUString::createFromAscii("MaxRows"),::com::sun::star::uno::makeAny(sal_Int32(0)));
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(xStatement->executeQuery(), ::com::sun::star::uno::UNO_QUERY);
+ if (xSupplyCols.is())
+ xFields = xSupplyCols->getColumns();
+ }
+ }
+
+ if (xFields.is() && xFields->hasByName(aFieldName))
+ xField = *(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > *)xFields->getByName(aFieldName).getValue();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = ::utl::getNumberFormats(xConnection, sal_False);
+ if (!xSupplier.is())
+ return NULL;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > xNumberFormats(xSupplier->getNumberFormats());
+ if (!xNumberFormats.is())
+ return NULL;
+
+ // Vom Feld werden nun zwei Informationen benoetigt:
+ // a.) Name des Feldes fuer Label und ControlSource
+ // b.) FormatKey, um festzustellen, welches Feld erzeugt werden soll
+ sal_Int32 nDataType = ::utl::getINT32(xField->getPropertyValue(FM_PROP_FIELDTYPE));
+ sal_Int32 nFormatKey = ::utl::getINT32(xField->getPropertyValue(FM_PROP_FORMATKEY));
+
+ ::rtl::OUString sLabelPostfix;
+
+ ////////////////////////////////////////////////////////////////
+ // nur fuer Textgroesse
+ OutputDevice* pOutDev = NULL;
+ if (pActualOutDev && pActualOutDev->GetOutDevType() == OUTDEV_WINDOW)
+ pOutDev = (OutputDevice*)pActualOutDev;
+ else
+ {// OutDev suchen
+ SdrPageView* pPageView = GetPageViewPvNum(0);
+ if( pPageView && !pOutDev )
+ {
+ const SdrPageViewWinList& rWinList = pPageView->GetWinList();
+ for( sal_uInt16 i = 0; i < rWinList.GetCount(); i++ )
+ {
+ if( rWinList[i].GetOutputDevice()->GetOutDevType() == OUTDEV_WINDOW)
+ {
+ pOutDev = rWinList[i].GetOutputDevice();
+ break;
+ }
+ }
+ }
+ }
+
+ if (!pOutDev)
+ return NULL;
+
+ if ((::com::sun::star::sdbc::DataType::BINARY == nDataType) || (::com::sun::star::sdbc::DataType::VARBINARY == nDataType))
+ return NULL;
+ //////////////////////////////////////////////////////////////////////
+ // Anhand des FormatKeys wird festgestellt, welches Feld benoetigt wird
+ sal_uInt16 nOBJID = 0;
+ sal_Bool bDateNTimeField = sal_False;
+
+ sal_Bool bIsCurrency = sal_False;
+ if (::utl::hasProperty(FM_PROP_ISCURRENCY, xField))
+ bIsCurrency = ::utl::getBOOL(xField->getPropertyValue(FM_PROP_ISCURRENCY));
+
+ if (bIsCurrency)
+ nOBJID = OBJ_FM_CURRENCYFIELD;
+ else
+ switch (nDataType)
+ {
+ case ::com::sun::star::sdbc::DataType::LONGVARBINARY:
+ nOBJID = OBJ_FM_IMAGECONTROL;
+ break;
+ case ::com::sun::star::sdbc::DataType::LONGVARCHAR:
+ nOBJID = OBJ_FM_EDIT;
+ break;
+ case ::com::sun::star::sdbc::DataType::BINARY:
+ case ::com::sun::star::sdbc::DataType::VARBINARY:
+ return NULL;
+ case ::com::sun::star::sdbc::DataType::BIT:
+ nOBJID = OBJ_FM_CHECKBOX;
+ break;
+ case ::com::sun::star::sdbc::DataType::TINYINT:
+ case ::com::sun::star::sdbc::DataType::SMALLINT:
+ case ::com::sun::star::sdbc::DataType::INTEGER:
+ nOBJID = OBJ_FM_NUMERICFIELD;
+ break;
+ case ::com::sun::star::sdbc::DataType::REAL:
+ case ::com::sun::star::sdbc::DataType::DOUBLE:
+ case ::com::sun::star::sdbc::DataType::NUMERIC:
+ case ::com::sun::star::sdbc::DataType::DECIMAL:
+ nOBJID = OBJ_FM_FORMATTEDFIELD;
+ break;
+ case ::com::sun::star::sdbc::DataType::TIMESTAMP:
+ bDateNTimeField = sal_True;
+ sLabelPostfix = UniString(SVX_RES(RID_STR_DATETIME_LABELPOSTFIX)).GetToken(0, ';');
+ // DON'T break !
+ case ::com::sun::star::sdbc::DataType::DATE:
+ nOBJID = OBJ_FM_DATEFIELD;
+ break;
+ case ::com::sun::star::sdbc::DataType::TIME:
+ nOBJID = OBJ_FM_TIMEFIELD;
+ break;
+ case ::com::sun::star::sdbc::DataType::CHAR:
+ case ::com::sun::star::sdbc::DataType::VARCHAR:
+ default:
+ nOBJID = OBJ_FM_EDIT;
+ break;
+ }
+ if (!nOBJID)
+ return NULL;
+
+ FmFormObj* pLabel;
+ FmFormObj* pControl;
+ CreateControlWithLabel(pOutDev, 0, xField, xNumberFormats, nOBJID, sLabelPostfix, pLabel, pControl);
+ if (!pLabel || !pControl)
+ {
+ delete pLabel;
+ delete pControl;
+ return NULL;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Feststellen ob eine ::com::sun::star::form erzeugt werden muss
+ // Dieses erledigt die Page fuer uns bzw. die PageImpl
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xContent(pLabel->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > xContainer(rPage.GetImpl()->SetDefaults(xContent, xDatabase, aDatabaseName, aObjectName, nObjectType), ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ xContainer->insertByIndex(xContainer->getCount(), ::com::sun::star::uno::makeAny(xContent));
+
+ xContent = ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > (pControl->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY);
+ xContainer = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > (rPage.GetImpl()->SetDefaults(xContent, xDatabase, aDatabaseName, aObjectName, nObjectType), ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ xContainer->insertByIndex(xContainer->getCount(), ::com::sun::star::uno::makeAny(xContent));
+
+ //////////////////////////////////////////////////////////////////////
+ // Objekte gruppieren
+ SdrObjGroup* pGroup = new SdrObjGroup();
+ SdrObjList* pObjList = pGroup->GetSubList();
+ pObjList->InsertObject(pLabel);
+ pObjList->InsertObject(pControl);
+
+
+ if (bDateNTimeField)
+ { // wir haben bis jetzt nur ein Datums-Feld eingefuegt, brauchen aber noch ein extra Feld fuer
+ // die Zeit-Komponente
+ pLabel = pControl = NULL;
+ CreateControlWithLabel(pOutDev, 1000, xField, xNumberFormats, OBJ_FM_TIMEFIELD,
+ UniString(SVX_RES(RID_STR_DATETIME_LABELPOSTFIX)).GetToken(1, ';'),
+ pLabel, pControl);
+
+ if (pLabel && pControl)
+ {
+ pObjList->InsertObject(pLabel);
+ pObjList->InsertObject(pControl);
+ }
+ else
+ {
+ delete pLabel;
+ delete pControl;
+ }
+ }
+
+ return pGroup; // und fertig
+ }
+ catch(...)
+ {
+ DBG_ERROR("FmFormView::CreateFieldControl : catched an exception while creating the control !");
+ ::utl::disposeComponent(xStatement);
+ }
+
+
+ return NULL;
+}
+
+//------------------------------------------------------------------------
+void FmFormView::InsertControlContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & xCC)
+{
+ if( !IsDesignMode() )
+ {
+ SdrPageView* pPageView = GetPageViewPvNum(0);
+ if( pPageView )
+ {
+ const SdrPageViewWinList& rWinList = pPageView->GetWinList();
+ for( sal_uInt16 i = 0; i < rWinList.GetCount(); i++ )
+ {
+ if( rWinList[i].GetControlContainerRef() == xCC )
+ {
+ pImpl->addWindow(&rWinList[i]);
+ break;
+ }
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+void FmFormView::RemoveControlContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & xCC)
+{
+ if( !IsDesignMode() )
+ {
+ pImpl->removeWindow( xCC );
+ }
+}
+
+
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
new file mode 100644
index 0000000000..b27ce96a9b
--- /dev/null
+++ b/svx/source/form/fmvwimp.cxx
@@ -0,0 +1,656 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmvwimp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVX_FMCTRLER_HXX
+#include <fmctrler.hxx>
+#endif
+
+#ifndef _SVX_FMVWIMP_HXX
+#include "fmvwimp.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
+#include <com/sun/star/form/XLoadable.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_XTABCONTROLLERMODEL_HPP_
+#include <com/sun/star/awt/XTabControllerModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROLCONTAINER_HPP_
+#include <com/sun/star/awt/XControlContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XTABCONTROLLER_HPP_
+#include <com/sun/star/awt/XTabController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROL_HPP_
+#include <com/sun/star/awt/XControl.hpp>
+#endif
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#ifndef _SVX_FMMODEL_HXX //autogen wg. FmFormModel
+#include <fmmodel.hxx>
+#endif
+
+#ifndef _SVX_FMUNDO_HXX
+#include "fmundo.hxx"
+#endif
+
+#ifndef _SVX_FMPAGE_HXX
+#include "fmpage.hxx"
+#endif
+#ifndef _SVX_FMUNOPGE_HXX
+#include "fmpgeimp.hxx"
+#endif
+#ifndef _SVX_FMVIEW_HXX
+#include "fmview.hxx"
+#endif
+#ifndef _SVX_FMSHELL_HXX
+#include "fmshell.hxx"
+#endif
+#ifndef _SVX_FMSHIMP_HXX
+#include "fmshimp.hxx"
+#endif
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SVDPAGV_HXX
+#include "svdpagv.hxx"
+#endif
+
+#ifndef _UTL_ENUMHELPER_HXX_
+#include <unotools/enumhelper.hxx>
+#endif
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include <unotools/dbtools.hxx>
+#endif
+
+// SMART_UNO_IMPLEMENTATION(FmXPageViewWinRec, UsrObject);
+
+DBG_NAME(FmXPageViewWinRec);
+//------------------------------------------------------------------------
+FmXPageViewWinRec::FmXPageViewWinRec(const SdrPageViewWinRec* pWinRec,
+ FmXFormView* _pViewImpl)
+ :m_pViewImpl(_pViewImpl)
+ ,m_pWindow( (Window*)pWinRec->GetOutputDevice() )
+{
+ DBG_CTOR(FmXPageViewWinRec,NULL);
+
+ // legt fuer jede ::com::sun::star::form ein FormController an
+ FmFormPage* pP = NULL;
+ if (m_pViewImpl)
+ pP = PTR_CAST(FmFormPage,m_pViewImpl->getView()->GetPageViewPvNum(0)->GetPage());
+
+ DBG_ASSERT(pP,"kein Page gefunden");
+
+ if (pP)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xForms(pP->GetForms(), ::com::sun::star::uno::UNO_QUERY);
+ sal_uInt32 nLength = xForms->getCount();
+ ::com::sun::star::uno::Any aElement;
+ for (sal_uInt32 i = 0; i < nLength; i++)
+ {
+ aElement = xForms->getByIndex(i);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(*(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > *)aElement.getValue());
+ setController(xForm, pWinRec->GetControlContainerRef() );
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+FmXPageViewWinRec::~FmXPageViewWinRec()
+{
+
+ DBG_DTOR(FmXPageViewWinRec,NULL);
+}
+
+//------------------------------------------------------------------
+void FmXPageViewWinRec::dispose()
+{
+ for (vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > >::const_iterator i = m_aControllerList.begin();
+ i != m_aControllerList.end(); i++)
+ {
+ // detaching the events
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xChild((*i)->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xChild.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xEventManager(xChild->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIfc(*i, ::com::sun::star::uno::UNO_QUERY);
+ xEventManager->detach( i - m_aControllerList.begin(), xIfc );
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComp(*i, ::com::sun::star::uno::UNO_QUERY);
+ xComp->dispose();
+ }
+ m_aControllerList.clear();
+}
+
+
+//------------------------------------------------------------------------------
+sal_Bool SAL_CALL FmXPageViewWinRec::hasElements(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return getCount() != 0;
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Type SAL_CALL FmXPageViewWinRec::getElementType(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>*)0);
+}
+
+// ::com::sun::star::container::XEnumerationAccess
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL FmXPageViewWinRec::createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return new ::utl::OEnumerationByIndex(this);
+}
+
+// ::com::sun::star::container::XIndexAccess
+//------------------------------------------------------------------------------
+sal_Int32 SAL_CALL FmXPageViewWinRec::getCount(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return m_aControllerList.size();
+}
+
+//------------------------------------------------------------------------------
+::com::sun::star::uno::Any SAL_CALL FmXPageViewWinRec::getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+{
+ if (nIndex < 0 ||
+ nIndex >= getCount())
+ throw ::com::sun::star::lang::IndexOutOfBoundsException();
+
+ ::com::sun::star::uno::Any aElement;
+ aElement <<= m_aControllerList[nIndex];
+ return aElement;
+}
+
+//------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > getControllerSearchChilds( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > & xModel)
+{
+ if (xIndex.is() && xIndex->getCount())
+ {
+ for (sal_Int32 n = xIndex->getCount(); n--; )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xController(*(::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > *)xIndex->getByIndex(n).getValue());
+ if ((::com::sun::star::awt::XTabControllerModel*)xModel.get() == (::com::sun::star::awt::XTabControllerModel*)xController->getModel().get())
+ return xController;
+ else
+ return getControllerSearchChilds(::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > (xController, ::com::sun::star::uno::UNO_QUERY), xModel);
+ }
+ }
+ return ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > ();
+}
+
+// Search the according controller
+//------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > FmXPageViewWinRec::getController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > & xForm )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > xModel(xForm, ::com::sun::star::uno::UNO_QUERY);
+ for (::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > >::const_iterator i = m_aControllerList.begin();
+ i != m_aControllerList.end(); i++)
+ {
+ if ((::com::sun::star::awt::XTabControllerModel*)(*i)->getModel().get() == (::com::sun::star::awt::XTabControllerModel*)xModel.get())
+ return *i;
+
+ // the current-round controller isn't the right one. perhaps one of it's children ?
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xChildSearch = getControllerSearchChilds(::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > (*i, ::com::sun::star::uno::UNO_QUERY), xModel);
+ if (xChildSearch.is())
+ return xChildSearch;
+ }
+ return ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > ();
+}
+
+//------------------------------------------------------------------------
+void FmXPageViewWinRec::setController(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > & xForm,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & xCC,
+ FmXFormController* pParent, sal_Bool)
+{
+ DBG_ASSERT(xForm.is(), "Kein Formular angegeben");
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xFormCps(xForm, ::com::sun::star::uno::UNO_QUERY);
+ if (!xFormCps.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel > xTabOrder(xForm, ::com::sun::star::uno::UNO_QUERY);
+
+ FmFormPage* pCurrentPage = PTR_CAST(FmFormPage, m_pViewImpl->getView()->GetPageViewPvNum(0)->GetPage());
+ DBG_ASSERT(pCurrentPage, "FmXFormController::queryDispatch : could not retrieve my page !");
+ String sPageId = pCurrentPage ? pCurrentPage->GetImpl()->GetPageId() : String::CreateFromAscii("no page");
+ // this "no page" should result in a empty ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > provided by the controller's external dispatcher
+
+ // Anlegen des Tabcontrollers
+ FmXFormController* pController = new FmXFormController(m_pViewImpl->getView(), m_pWindow, sPageId);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xController(pController);
+
+ pController->setModel(xTabOrder);
+ pController->setContainer(xCC);
+ pController->activateTabOrder();
+ pController->addActivateListener(m_pViewImpl);
+
+ if (pParent)
+ pParent->addChild(pController);
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xController(pController);
+ m_aControllerList.push_back(xController);
+
+ pController->setParent(*this);
+
+ // attaching the events
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > xEventManager(xForm->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIfc(xController, ::com::sun::star::uno::UNO_QUERY);
+ xEventManager->attach(m_aControllerList.size() - 1, xIfc, ::com::sun::star::uno::makeAny(xController) );
+ }
+
+
+
+ // jetzt die Subforms durchgehen
+ sal_uInt32 nLength = xFormCps->getCount();
+ ::com::sun::star::uno::Any aElement;
+ for (sal_uInt32 i = 0; i < nLength; i++)
+ {
+ aElement = xFormCps->getByIndex(i);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)aElement.getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (xForm.is())
+ setController(xForm, xCC, pController);
+ }
+}
+
+//------------------------------------------------------------------------
+void FmXPageViewWinRec::updateTabOrder( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > & xControl,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & xCC )
+{
+ // Das TabControllerModel der ::com::sun::star::form ermitteln, in der das Control
+ // enthalten ist ...
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComp(xControl->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xFormComp.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(xFormComp->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ if (!xForm.is())
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > xTabCtrl(getController( xForm ), ::com::sun::star::uno::UNO_QUERY);
+ // Wenn es fuer dieses Formular noch keinen Tabcontroller gibt,
+ // dann einen neuen anlegen
+ if (!xTabCtrl.is())
+ {
+ // ist es ein Unterformular?
+ // dann muss ein Tabcontroller fuer den Parent existieren
+ // wichtig da ein hierarchischer Aufbau vorliegt
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xParentForm(::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > (xForm, ::com::sun::star::uno::UNO_QUERY)->getParent(), ::com::sun::star::uno::UNO_QUERY);
+ FmXFormController* pFormController = NULL;
+ // zugehoerigen controller suchen
+ if (xParentForm.is())
+ xTabCtrl = ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController >(getController(xParentForm), ::com::sun::star::uno::UNO_QUERY);
+
+ if (xTabCtrl.is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel(xTabCtrl,::com::sun::star::uno::UNO_QUERY);
+ DBG_ASSERT(xTunnel.is(), "FmPropController::ChangeFormatProperty : xTunnel is invalid!");
+ if(xTunnel.is())
+ {
+ pFormController = (FmXFormController*)xTunnel->getSomething(FmXFormController::getUnoTunnelImplementationId());
+ }
+ // ::utl::getImplementation(pFormController, xTunnel);
+ }
+
+ // Es gibt noch keinen TabController fuer das Formular, also muss
+ // ein neuer angelegt werden.
+ setController(xForm, xCC, pFormController);
+ }
+}
+
+//------------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > FmXPageViewWinRec::getControlContainer() const
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > xCC;
+ if (m_aControllerList.size())
+ xCC = m_aControllerList[0]->getContainer();
+ return xCC;
+}
+
+//------------------------------------------------------------------------
+FmXFormView::~FmXFormView()
+{
+ DBG_ASSERT(m_aWinList.size() == 0, "Liste nicht leer");
+ if (m_nEvent)
+ Application::RemoveUserEvent(m_nEvent);
+ if (m_nErrorMessageEvent)
+ Application::RemoveUserEvent(m_nErrorMessageEvent);
+}
+
+// EventListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormView::disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+// ::com::sun::star::form::XFormControllerListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormView::formActivated(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > xController(rEvent.Source, ::com::sun::star::uno::UNO_QUERY);
+ // benachrichtigung der Shell
+ if (m_pView && m_pView->GetFormShell())
+ {
+ FmXFormShell* pShImpl = m_pView->GetFormShell()->GetImpl();
+ if (pShImpl)
+ pShImpl->setActiveController(xController);
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormView::formDeactivated(const ::com::sun::star::lang::EventObject& rEvent)
+{
+ // deaktivierung wird nicht registriert
+}
+
+// ::com::sun::star::container::XContainerListener
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormView::elementInserted(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > xCC(evt.Source, ::com::sun::star::uno::UNO_QUERY);
+ if( xCC.is() )
+ {
+ FmWinRecList::iterator i = findWindow( xCC );
+ if ( i != m_aWinList.end() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl(*(::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > *)evt.Element.getValue());
+ if( xControl.is() )
+ (*i)->updateTabOrder( xControl, xCC );
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormView::elementReplaced(const ::com::sun::star::container::ContainerEvent& evt)
+{
+ elementInserted(evt);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL FmXFormView::elementRemoved(const ::com::sun::star::container::ContainerEvent& evt)
+{
+}
+
+//------------------------------------------------------------------------------
+FmWinRecList::const_iterator FmXFormView::findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & rCC ) const
+{
+ for (FmWinRecList::const_iterator i = m_aWinList.begin();
+ i != m_aWinList.end(); i++)
+ {
+ if (rCC == (*i)->getControlContainer())
+ return i;
+ }
+ return m_aWinList.end();
+}
+
+//------------------------------------------------------------------------------
+FmWinRecList::iterator FmXFormView::findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & rCC )
+{
+ for (FmWinRecList::iterator i = m_aWinList.begin();
+ i != m_aWinList.end(); i++)
+ {
+ if (rCC == (*i)->getControlContainer())
+ return i;
+ }
+ return m_aWinList.end();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormView::addWindow(const SdrPageViewWinRec* pRec)
+{
+ // Wird gerufen, wenn
+ // - in den aktiven Modus geschaltet wird
+ // - ein Window hinzugefuegt wird, waehrend man im Design-Modus ist
+ // - der Control-Container fuer ein Window angelegt wird, waehrend
+ // der aktive Modus eingeschaltet ist.
+
+ // Wenn es noch keinen Control-Container gibt oder am Control-Container
+ // noch keine Peer Erzeugt wurde, dann ist es noch zu frueh, um die
+ // Tab-Order einzustellen ...
+ if( pRec->GetOutputDevice()->GetOutDevType() == OUTDEV_WINDOW )
+ {
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & rCC = pRec->GetControlContainerRef();
+ if ( rCC.is() && findWindow( rCC ) == m_aWinList.end())
+ {
+ FmXPageViewWinRec *pFmRec = new FmXPageViewWinRec(pRec, this);
+ pFmRec->acquire();
+
+ m_aWinList.push_back(pFmRec);
+
+ // Am ControlContainer horchen um Aenderungen mitzbekommen
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xContainer(rCC, ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ xContainer->addContainerListener(this);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void FmXFormView::removeWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & rCC )
+{
+ // Wird gerufen, wenn
+ // - in den Design-Modus geschaltet wird
+ // - ein Window geloescht wird, waehrend man im Design-Modus ist
+ // - der Control-Container fuer ein Window entfernt wird, waehrend
+ // der aktive Modus eingeschaltet ist.
+ FmWinRecList::iterator i = findWindow( rCC );
+ if (i != m_aWinList.end())
+ {
+ // Am ControlContainer horchen um Aenderungen mitzbekommen
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > xContainer(rCC, ::com::sun::star::uno::UNO_QUERY);
+ if (xContainer.is())
+ xContainer->removeContainerListener(this);
+
+ (*i)->dispose();
+ (*i)->release();
+ m_aWinList.erase(i);
+ }
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormView, OnDelayedErrorMessage, void*, EMPTYTAG)
+{
+ m_nErrorMessageEvent = 0;
+ Window* pParentWindow = Application::GetDefDialogParent();
+ ErrorBox(pParentWindow, WB_OK, m_sErrorMessage).Execute();
+// ErrorBox(Application::GetDefDialogParent(), WB_OK, m_sErrorMessage).Execute();
+ return 0L;
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(FmXFormView, OnActivate, void*, EMPTYTAG)
+{
+ m_nEvent = 0;
+
+ if (m_pPageViewForActivation)
+ {
+ FmFormModel* pModel = PTR_CAST(FmFormModel, m_pView->GetModel());
+ if (pModel)
+ // lock the undo env so the forms can change non-transient properties while loading
+ // (without this my doc's modified flag would be set)
+ pModel->GetUndoEnv().Lock();
+
+ // Load all forms
+ FmFormPage* pPage = (FmFormPage*)m_pPageViewForActivation->GetPage();
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > xForms(pPage->GetForms(), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Any aElement;
+ for (sal_Int32 i = 0, nCount = xForms->getCount(); i < nCount; i++)
+ {
+ aElement = xForms->getByIndex(i);
+ // a database form must be loaded for
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > xForm(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)aElement.getValue(), ::com::sun::star::uno::UNO_QUERY);
+ if (::isLoadable(xForm) && !xForm->isLoaded())
+ xForm->load();
+ }
+
+ if (pModel)
+ // unlock the environment
+ pModel->GetUndoEnv().UnLock();
+ }
+
+ // setting the controller to activate
+ if (m_pView->GetFormShell() && m_pView->GetActualOutDev() && m_pView->GetActualOutDev()->GetOutDevType() == OUTDEV_WINDOW)
+ {
+ Window* pWindow = (Window*)m_pView->GetActualOutDev();
+ FmXPageViewWinRec* pFmRec = m_aWinList.size() ? m_aWinList[0] : NULL;
+ for (FmWinRecList::const_iterator i = m_aWinList.begin();
+ i != m_aWinList.end(); i++)
+ {
+ if (pWindow == (*i)->getWindow())
+ pFmRec =*i;
+ }
+
+ if (pFmRec)
+ {
+ for (vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > >::const_iterator i = pFmRec->GetList().begin();
+ i != pFmRec->GetList().end(); i++)
+ {
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & xController = *i;
+ if (xController.is())
+ {
+ // Nur bei Datenbankformularen erfolgt eine aktivierung
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > xForm(xController->getModel(), ::com::sun::star::uno::UNO_QUERY);
+ if (xForm.is() && ::utl::getConnection(xForm).is())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xFormSet(xForm, ::com::sun::star::uno::UNO_QUERY);
+ if (xFormSet.is())
+ {
+ // wenn es eine Datenquelle gibt, dann als aktive ::com::sun::star::form setzen
+ ::rtl::OUString aSource = ::utl::getString(xFormSet->getPropertyValue(FM_PROP_COMMAND));
+ if (aSource.len())
+ {
+ // benachrichtigung der Shell
+ FmXFormShell* pShImpl = m_pView->GetFormShell()->GetImpl();
+ if (pShImpl)
+ pShImpl->setActiveController(xController);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------------
+void FmXFormView::Activate(SdrPageView* pPageView, sal_Bool bSync)
+{
+ if (m_nEvent)
+ {
+ Application::RemoveUserEvent(m_nEvent);
+ m_nEvent = 0;
+ }
+
+ m_pPageViewForActivation = pPageView;
+ if (bSync)
+ {
+ LINK(this,FmXFormView,OnActivate).Call(NULL);
+ }
+ else
+ m_nEvent = Application::PostUserEvent(LINK(this,FmXFormView,OnActivate));
+}
+
+//------------------------------------------------------------------------------
+void FmXFormView::Deactivate(SdrPageView* pPageView, BOOL bDeactivateController)
+{
+ if (m_nEvent)
+ {
+ Application::RemoveUserEvent(m_nEvent);
+ m_nEvent = 0;
+ m_pPageViewForActivation = NULL;
+ }
+
+ FmXFormShell* pShImpl = m_pView->GetFormShell() ? m_pView->GetFormShell()->GetImpl() : NULL;
+ if (pShImpl && bDeactivateController)
+ pShImpl->setActiveController();
+}
+
+//------------------------------------------------------------------------------
+void FmXFormView::AttachControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > & rControl, sal_Bool bDetach )
+{
+ /* wird im fmctrler gemacht */
+}
+
+//------------------------------------------------------------------------------
+void FmXFormView::AttachControls( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > & rCtrlContainer,
+ sal_Bool bDetach )
+{
+}
+
+//------------------------------------------------------------------------------
+FmFormShell* FmXFormView::GetFormShell() const
+{
+ return m_pView ? m_pView->GetFormShell() : NULL;
+}
+
+
diff --git a/svx/source/form/makefile.mk b/svx/source/form/makefile.mk
new file mode 100644
index 0000000000..d6e4232f91
--- /dev/null
+++ b/svx/source/form/makefile.mk
@@ -0,0 +1,142 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning 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=form
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+IMGLST_SRS=$(SRS)$/form.srs
+BMP_IN=$(PRJ)$/win$/res
+
+SRS1NAME=form
+SRC1FILES= \
+ qryparam.src \
+ dbmsgbox.src \
+ fmexpl.src \
+ filtnav.src \
+ propbrw.src \
+ taborder.src \
+ fmstring.src \
+ tbxform.src \
+ fmsearch.src
+
+
+SLOFILES = \
+ $(SLO)$/dialogservices.obj \
+ $(SLO)$/fmundo.obj \
+ $(SLO)$/fmprop.obj \
+ $(SLO)$/fmmodel.obj \
+ $(SLO)$/fmexpl.obj \
+ $(SLO)$/fmctrler.obj \
+ $(SLO)$/propbrw.obj \
+ $(SLO)$/propbrw1.obj \
+ $(SLO)$/propbrw2.obj \
+ $(SLO)$/propbrw3.obj \
+ $(SLO)$/fmpgeimp.obj \
+ $(SLO)$/fmvwimp.obj \
+ $(SLO)$/fmpage.obj \
+ $(SLO)$/taborder.obj \
+ $(SLO)$/fmdpage.obj \
+ $(SLO)$/propctrs.obj \
+ $(SLO)$/propctr2.obj \
+ $(SLO)$/property.obj \
+ $(SLO)$/fmitems.obj \
+ $(SLO)$/tbxform.obj \
+ $(SLO)$/fmobj.obj \
+ $(SLO)$/fmdmod.obj \
+ $(SLO)$/fmobjfac.obj \
+ $(SLO)$/fmsrccfg.obj \
+ $(SLO)$/fmservs.obj \
+ $(SLO)$/typemap.obj \
+ $(SLO)$/fmexch.obj \
+ $(SLO)$/tabwin.obj \
+ $(SLO)$/multipro.obj \
+ $(SLO)$/qryparam.obj \
+ $(SLO)$/fmurl.obj \
+ $(SLO)$/fmfilter.obj \
+ $(SLO)$/filtnav.obj \
+ $(SLO)$/fmimplids.obj \
+ $(SLO)$/fmtools.obj \
+ $(SLO)$/fmshimp.obj \
+ $(SLO)$/dbmsgbox.obj \
+ $(SLO)$/fmshell.obj \
+ $(SLO)$/fmsearch.obj \
+ $(SLO)$/fmsrcimp.obj \
+ $(SLO)$/fmview.obj \
+
+SVXLIGHTOBJFILES= \
+ $(OBJ)$/fmpage.obj \
+ $(OBJ)$/fmmodel.obj
+
+.INCLUDE : target.mk
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
new file mode 100644
index 0000000000..e326a14757
--- /dev/null
+++ b/svx/source/form/tabwin.cxx
@@ -0,0 +1,542 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabwin.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:17 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_TABWIN_HXX
+#include "tabwin.hxx"
+#endif
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+#ifndef _SVX_FMSERVS_HXX
+#include "fmservs.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_
+#include <com/sun/star/sdb/CommandType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_
+#include <com/sun/star/sdb/XQueriesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XPREPAREDSTATEMENT_HPP_
+#include <com/sun/star/sdbc/XPreparedStatement.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROLCONTAINER_HPP_
+#include <com/sun/star/awt/XControlContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XLOCALIZEDALIASES_HPP_
+#include <com/sun/star/util/XLocalizedAliases.hpp>
+#endif
+
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+#ifndef _UTL_STLTYPES_HXX_
+#include "unotools/stl_types.hxx"
+#endif
+#ifndef _UTL_UNO3_DB_TOOLS_HXX_
+#include "unotools/dbtools.hxx"
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include "unotools/processfactory.hxx"
+#endif
+
+#ifndef _SVX_FMHELP_HRC
+#include "fmhelp.hrc"
+#endif
+
+#ifndef _SVX_FMSHELL_HXX
+#include "fmshell.hxx"
+#endif
+
+#ifndef _SVX_FMEXCH_HXX
+#include "fmexch.hxx"
+#endif
+
+#ifndef _SVX_FMPAGE_HXX
+#include "fmpage.hxx"
+#endif
+
+#ifndef _SVX_FMPGEIMP_HXX
+#include "fmpgeimp.hxx"
+#endif
+
+#ifndef _SVX_FMPROP_HXX
+#include "fmprop.hxx"
+#endif
+
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _SV_DRAG_HXX //autogen
+#include <vcl/drag.hxx>
+#endif
+
+#ifndef _SVDPAGV_HXX
+#include <svdpagv.hxx>
+#endif
+
+#ifndef _SFX_OBJITEM_HXX //autogen
+#include <sfx2/objitem.hxx>
+#endif
+
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+#ifndef _ISOLANG_HXX
+#include <tools/isolang.hxx>
+#endif
+#ifndef _UTL_PROPERTY_HXX_
+#include <unotools/property.hxx>
+#endif
+
+const long STD_WIN_POS_X = 50;
+const long STD_WIN_POS_Y = 50;
+
+const long STD_WIN_SIZE_X = 120;
+const long STD_WIN_SIZE_Y = 150;
+
+const long MIN_WIN_SIZE_X = 50;
+const long MIN_WIN_SIZE_Y = 50;
+
+const long LISTBOX_BORDER = 2;
+
+//==================================================================
+// class FmFieldWinListBox
+//==================================================================
+DBG_NAME(FmFieldWinListBox);
+//------------------------------------------------------------------------------
+FmFieldWinListBox::FmFieldWinListBox( FmFieldWin* pParent )
+ :SvTreeListBox( pParent, WB_HASBUTTONS|WB_BORDER )
+ ,pTabWin( pParent )
+{
+ DBG_CTOR(FmFieldWinListBox,NULL);
+ SetHelpId( HID_FIELD_SEL );
+
+ ::rtl::OUString aString;
+ for( sal_Int32 i=1; i<11; i++ )
+ {
+ aString = ::rtl::OUString::createFromAscii("Feld ");
+ aString += ::rtl::OUString::valueOf(i);
+ InsertEntry( aString );
+ }
+}
+
+//------------------------------------------------------------------------------
+FmFieldWinListBox::~FmFieldWinListBox()
+{
+ DBG_DTOR(FmFieldWinListBox,NULL);
+}
+
+//------------------------------------------------------------------------------
+void FmFieldWinListBox::Command(const CommandEvent& rEvt)
+{
+ switch (rEvt.GetCommand())
+ {
+ case COMMAND_STARTDRAG:
+ {
+ EndSelection();
+ Pointer aMovePtr( POINTER_COPYDATA ),
+ aCopyPtr( POINTER_COPYDATA ),
+ aLinkPtr( POINTER_LINKDATA );
+
+ UniString aCopyData = pTabWin->GetDatabaseName();
+ aCopyData += char(11);
+ aCopyData += pTabWin->GetObjectName().getStr();
+ aCopyData += char(11);
+ aCopyData += ::rtl::OUString::valueOf((sal_Int32)pTabWin->GetObjectType()).getStr();
+ aCopyData += char(11);
+
+ SvLBoxEntry* pFirstSelected = FirstSelected();
+ if( pFirstSelected )
+ aCopyData += UniString(GetEntryText( pFirstSelected ));
+
+ SvxFmFieldExchRef xFieldExch = new SvxFmFieldExch(aCopyData);
+ DragManager::ExecuteDrag( xFieldExch, DRAG_LINKABLE | DRAG_COPYABLE );
+ } break;
+ default:
+ Window::Command( rEvt );
+ }
+}
+
+
+//========================================================================
+// class FmFieldWinData
+//========================================================================
+DBG_NAME(FmFieldWinData);
+//-----------------------------------------------------------------------
+FmFieldWinData::FmFieldWinData()
+{
+ DBG_CTOR(FmFieldWinData,NULL);
+}
+
+//-----------------------------------------------------------------------
+FmFieldWinData::~FmFieldWinData()
+{
+ DBG_DTOR(FmFieldWinData,NULL);
+}
+
+//========================================================================
+// class FmFieldWin
+//========================================================================
+DBG_NAME(FmFieldWin);
+//-----------------------------------------------------------------------
+FmFieldWin::FmFieldWin(SfxBindings *pBindings, SfxChildWindow *pMgr, Window* pParent)
+ :SfxFloatingWindow(pBindings, pMgr, pParent, WinBits(WB_STDMODELESS|WB_SIZEABLE))
+ ,SfxControllerItem(SID_FM_FIELDS_CONTROL, *pBindings)
+ ,::utl::OPropertyChangeListener(m_aMutex)
+ ,pData(new FmFieldWinData)
+ ,m_nObjectType(0)
+ ,m_pChangeListener(NULL)
+{
+ DBG_CTOR(FmFieldWin,NULL);
+ SetHelpId( HID_FIELD_SEL_WIN );
+
+ SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor()) );
+ pListBox = new FmFieldWinListBox( this );
+ pListBox->Show();
+ Update(NULL);
+ SetSizePixel(Size(STD_WIN_SIZE_X,STD_WIN_SIZE_Y));
+}
+
+//-----------------------------------------------------------------------
+FmFieldWin::~FmFieldWin()
+{
+ if (m_pChangeListener)
+ {
+ m_pChangeListener->dispose();
+ m_pChangeListener->release();
+ // delete m_pChangeListener;
+ }
+ delete pListBox;
+ delete pData;
+ DBG_DTOR(FmFieldWin,NULL);
+}
+
+//-----------------------------------------------------------------------
+sal_Bool FmFieldWin::Close()
+{
+ return SfxFloatingWindow::Close();
+}
+
+//-----------------------------------------------------------------------
+void FmFieldWin::_propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm(evt.Source, ::com::sun::star::uno::UNO_QUERY);
+ Update(xForm);
+}
+
+//-----------------------------------------------------------------------
+void FmFieldWin::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
+{
+ if (!pState || SID_FM_FIELDS_CONTROL != nSID)
+ return;
+
+ if (eState >= SFX_ITEM_AVAILABLE)
+ {
+ FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell());
+ Update(pShell);
+ }
+ else
+ Update(NULL);
+}
+
+//-----------------------------------------------------------------------
+sal_Bool FmFieldWin::Update(FmFormShell* pShell)
+{
+ // ::com::sun::star::form::ListBox loeschen
+ pListBox->Clear();
+ ::rtl::OUString aTitle(SVX_RES(RID_STR_FIELDSELECTION));
+ SetText(aTitle);
+
+ if (!pShell || !pShell->GetFormView())
+ return sal_False;
+
+ SdrPageView* pPageView = pShell->GetFormView()->GetPageViewPvNum(0);
+ if( !pPageView )
+ return sal_False;
+
+ FmFormPage* pPage = PTR_CAST( FmFormPage, pPageView->GetPage() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm = pPage->GetImpl()->getCurForm();
+ if (!xForm.is())
+ return sal_False;
+
+ return Update(xForm);
+}
+
+//-----------------------------------------------------------------------
+sal_Bool FmFieldWin::Update(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > & xForm)
+{
+ // ::com::sun::star::form::ListBox loeschen
+ pListBox->Clear();
+ UniString aTitle(SVX_RES(RID_STR_FIELDSELECTION));
+ SetText(aTitle);
+
+ if (!xForm.is())
+ return sal_False;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > xStatement;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet(xForm, ::com::sun::star::uno::UNO_QUERY);
+
+ m_aObjectName = ::utl::getString(xSet->getPropertyValue(FM_PROP_COMMAND));
+ m_aDatabaseName = ::utl::getString(xSet->getPropertyValue(FM_PROP_DATASOURCE));
+ m_nObjectType = ::utl::getINT32(xSet->getPropertyValue(FM_PROP_COMMANDTYPE));
+
+ // maybe the database name is empty. this is allowed by the service definition
+ // (the form will use a connection it finds in it's parent hierarchy as it's datasource,
+ // so it does not need a data source description)
+ // of course we want to have a data source name anyway (if such a connection exists)
+ // FS - 74645 - 07.04.00
+ if (!m_aDatabaseName.getLength())
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > xConnection = findConnection(xSet);
+ if (xConnection.is())
+ {
+ ::rtl::OUString sDisplayName;
+ try
+ {
+ // first find somebody who can give us an URL the connection is build upon
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xTitleSupplier(xConnection, ::com::sun::star::uno::UNO_QUERY);
+ if (!xTitleSupplier.is() || !::utl::hasProperty(FM_PROP_URL, xTitleSupplier))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild > xConnAsChild(xConnection, ::com::sun::star::uno::UNO_QUERY);
+ if (xConnAsChild.is())
+ xTitleSupplier = ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >::query(xConnAsChild->getParent());
+ }
+
+ if (xTitleSupplier.is() && ::utl::hasProperty(FM_PROP_URL, xTitleSupplier))
+ {
+ xTitleSupplier->getPropertyValue(FM_PROP_URL) >>= sDisplayName;
+ // then check if we have an alias for the URL
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XLocalizedAliases >
+ xAliases(::utl::getProcessServiceFactory()->createInstance(SRV_SDB_DATABASE_ACCESS_CONTEXT), ::com::sun::star::uno::UNO_QUERY);
+ if (xAliases.is())
+ {
+ // get the application language
+ XubString sLanguage, sCountry;
+ ConvertLanguageToIsoNames(Application::GetAppInternational().GetLanguage(), sLanguage, sCountry);
+ sDisplayName = xAliases->lookupProgrammatic(::com::sun::star::lang::Locale(sLanguage, sCountry, ::rtl::OUString()), sDisplayName);
+ }
+ }
+ }
+ catch(...)
+ {
+ }
+ m_aDatabaseName = sDisplayName;
+ }
+ }
+
+ // Festellen des Feldes
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xFields;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xField;
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > xConnection = ::utl::calcConnection(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > (xForm, ::com::sun::star::uno::UNO_QUERY),::utl::getProcessServiceFactory());
+ if (!xConnection.is())
+ return sal_True;
+
+ switch (m_nObjectType)
+ {
+ case 0:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > xSupplyTables(xConnection, ::com::sun::star::uno::UNO_QUERY);
+ if (xSupplyTables.is() && xSupplyTables->getTables().is() && xSupplyTables->getTables()->hasByName(m_aObjectName))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyColumns(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xSupplyTables->getTables()->getByName(m_aObjectName).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ xFields = xSupplyColumns->getColumns();
+ }
+ }
+ break;
+ case 1:
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XQueriesSupplier > xSupplyQueries(xConnection, ::com::sun::star::uno::UNO_QUERY);
+ if (xSupplyQueries.is() && xSupplyQueries->getQueries().is() && xSupplyQueries->getQueries()->hasByName(m_aObjectName))
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyColumns(*(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > *)xSupplyQueries->getQueries()->getByName(m_aObjectName).getValue(), ::com::sun::star::uno::UNO_QUERY);
+ xFields = xSupplyColumns->getColumns();
+ }
+ }
+ break;
+ default:
+ {
+ xStatement = xConnection->prepareStatement(m_aObjectName);
+ // not interested in any results
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > (xStatement,::com::sun::star::uno::UNO_QUERY)->setPropertyValue(::rtl::OUString::createFromAscii("MaxRows"),::com::sun::star::uno::makeAny(sal_Int32(0)));
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(xStatement->executeQuery(), ::com::sun::star::uno::UNO_QUERY);
+ if (xSupplyCols.is())
+ xFields = xSupplyCols->getColumns();
+ }
+ }
+ }
+ catch(...)
+ {
+ DBG_WARNING("FmFieldWin::Update(::com::sun::star::form::XForm) : could not collect the fields of the current data source !");
+ }
+
+
+ if (xFields.is())
+ {
+ ::com::sun::star::uno::Sequence< ::rtl::OUString> aNames(xFields->getElementNames());
+ sal_Int32 nFieldsCount = aNames.getLength();
+ const ::rtl::OUString* pNames = aNames.getConstArray();
+
+ for (sal_Int32 i=0; i<nFieldsCount; i++)
+ pListBox->InsertEntry(pNames[i]);
+ }
+
+ // Prefix setzen
+ UniString aPrefix;
+ UniString aPrefixes( SVX_RES(RID_STR_TABWIN_PREFIX) );
+
+ switch (m_nObjectType)
+ {
+ case ::com::sun::star::sdb::CommandType::TABLE:
+ aPrefix = aPrefixes.GetToken(0);
+ break;
+ case ::com::sun::star::sdb::CommandType::QUERY:
+ aPrefix = aPrefixes.GetToken(1);
+ break;
+ default:
+ aPrefix = aPrefixes.GetToken(2);
+ break;
+ }
+
+ // an dem PropertySet nach Aenderungen der ControlSource lauschen
+ if (m_pChangeListener)
+ {
+ m_pChangeListener->dispose();
+ m_pChangeListener->release();
+ }
+ m_pChangeListener = new ::utl::OPropertyChangeMultiplexer(this, xSet);
+ m_pChangeListener->acquire();
+ m_pChangeListener->addProperty(FM_PROP_DATASOURCE);
+ m_pChangeListener->addProperty(FM_PROP_COMMAND);
+ m_pChangeListener->addProperty(FM_PROP_COMMANDTYPE);
+
+ // Titel setzen
+ aTitle.AppendAscii(" ");
+ aTitle += aPrefix;
+ aTitle.AppendAscii(" ");
+ aTitle += m_aObjectName.getStr();
+ SetText( aTitle );
+
+ return sal_True;
+}
+
+//-----------------------------------------------------------------------
+void FmFieldWin::Resize()
+{
+ SfxFloatingWindow::Resize();
+
+ Point aPos(GetPosPixel());
+ Size aSize( GetOutputSizePixel() );
+
+ //////////////////////////////////////////////////////////////////////
+
+ // Groesse der ::com::sun::star::form::ListBox anpassen
+ Point aLBPos( LISTBOX_BORDER, LISTBOX_BORDER );
+ Size aLBSize( aSize );
+ aLBSize.Width() -= (2*LISTBOX_BORDER);
+ aLBSize.Height() -= (2*LISTBOX_BORDER);
+
+ pListBox->SetPosSizePixel( aLBPos, aLBSize );
+}
+
+//-----------------------------------------------------------------------
+void FmFieldWin::FillInfo( SfxChildWinInfo& rInfo ) const
+{
+ rInfo.bVisible = sal_False;
+}
+
+//-----------------------------------------------------------------------
+SFX_IMPL_FLOATINGWINDOW(FmFieldWinMgr, SID_FM_ADD_FIELD)
+
+//-----------------------------------------------------------------------
+FmFieldWinMgr::FmFieldWinMgr(Window *pParent, sal_uInt16 nId,
+ SfxBindings *pBindings, SfxChildWinInfo* pInfo)
+ :SfxChildWindow(pParent, nId)
+{
+ pWindow = new FmFieldWin(pBindings, this, pParent);
+ SetHideNotDelete(sal_True);
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+ ((SfxFloatingWindow*)pWindow)->Initialize( pInfo );
+}
+
+
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
new file mode 100644
index 0000000000..5f05b68dbc
--- /dev/null
+++ b/svx/source/form/tbxform.cxx
@@ -0,0 +1,614 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxform.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _REF_HXX
+#include <tools/ref.hxx>
+#endif
+#ifndef _SHL_HXX
+#include <tools/shl.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 _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SV_TOOLBOX_HXX //autogen
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef _SV_FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SVX_FMITEMS_HXX //autogen
+#include "fmitems.hxx"
+#endif
+
+#ifndef _TOOLS_INTN_HXX //autogen
+#include <tools/intn.hxx>
+#endif
+
+#ifndef _SV_SOUND_HXX //autogen
+#include <vcl/sound.hxx>
+#endif
+
+#pragma hdrstop
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+#ifndef _SVX_DIALOGS_HRC
+#include "dialogs.hrc"
+#endif
+
+#ifndef _TBXCTL_HXX
+#include "tbxctl.hxx"
+#endif
+#ifndef _TBXDRAW_HXX
+#include "tbxdraw.hxx"
+#endif
+#ifndef _SVX_TBXFORM_HXX
+#include "tbxform.hxx"
+#endif
+#ifndef _SVX_FMRESIDS_HRC
+#include "fmresids.hrc"
+#endif
+#ifndef _SVX_FMITEMS_HXX
+#include "fmitems.hxx"
+#endif
+
+//========================================================================
+// class FmInputRecordNoDialog
+//========================================================================
+
+FmInputRecordNoDialog::FmInputRecordNoDialog(Window * pParent)
+ :ModalDialog( pParent, SVX_RES(RID_SVX_DLG_INPUTRECORDNO))
+ ,m_aLabel(this, ResId(1))
+ ,m_aRecordNo(this, ResId(1))
+ ,m_aOk(this, ResId(1))
+ ,m_aCancel(this, ResId(1))
+{
+ m_aRecordNo.SetMin(1);
+ m_aRecordNo.SetMax(0x7FFFFFFF);
+ m_aRecordNo.SetStrictFormat(TRUE);
+ m_aRecordNo.SetDecimalDigits(0);
+
+ FreeResource();
+}
+
+//========================================================================
+// class SvxFmAbsRecWin
+//========================================================================
+
+// -----------------------------------------------------------------------
+SvxFmAbsRecWin::SvxFmAbsRecWin( Window* _pParent, SfxToolBoxControl* _pController )
+ :NumericField( _pParent, WB_BORDER )
+ ,m_pController(_pController)
+{
+ SetMin(1);
+ SetFirst(1);
+ SetSpinSize(1);
+ SetSizePixel( Size(70,19) );
+
+ International rInt = GetInternational();
+ rInt.EnableNumThousandSep(FALSE);
+ SetInternational(rInt);
+ SetDecimalDigits(0);
+ SetStrictFormat(TRUE);
+}
+
+// -----------------------------------------------------------------------
+SvxFmAbsRecWin::~SvxFmAbsRecWin()
+{
+}
+
+// -----------------------------------------------------------------------
+void SvxFmAbsRecWin::FirePosition()
+{
+ INT32 nRecord = GetValue();
+ if (nRecord < GetMin() || nRecord > GetMax())
+ {
+ Sound::Beep();
+ return;
+ }
+
+ FmFormInfoItem aItem( SID_FM_RECORD_ABSOLUTE, FmFormInfo(nRecord,-1));
+
+ SFX_DISPATCHER().Execute( SID_FM_RECORD_ABSOLUTE, SFX_CALLMODE_RECORD, &aItem, 0L );
+
+ // to update our content we explicitly call StateChanged : a simple Invalidate(m_nId) is insufficient
+ // as our StateChanged won't be called if entered a invalid position which didn't cause the cursor
+ // to be moved.
+ SfxPoolItem* pState = NULL;
+ SfxItemState eState = m_pController->GetBindings().QueryState(m_pController->GetId(), pState);
+ ((SfxControllerItem*)m_pController)->StateChanged(m_pController->GetId(), eState, pState);
+ delete pState;
+}
+
+// -----------------------------------------------------------------------
+void SvxFmAbsRecWin::LoseFocus()
+{
+ FirePosition();
+}
+
+// -----------------------------------------------------------------------
+void SvxFmAbsRecWin::KeyInput( const KeyEvent& rKeyEvent )
+{
+ if( rKeyEvent.GetKeyCode() == KEY_RETURN && GetText().Len() )
+ FirePosition();
+ else
+ NumericField::KeyInput( rKeyEvent );
+}
+
+
+//========================================================================
+// class SvxFmConfigWin
+//========================================================================
+DBG_NAME(SvxFmConfigWin);
+SvxFmConfigWin::SvxFmConfigWin( USHORT nId, ResId aRIdWin, ResId aRIdTbx, SfxBindings& rBindings )
+ :SfxPopupWindow( nId, aRIdWin, rBindings )
+ ,aTbx( this, GetBindings(), aRIdTbx )
+{
+ DBG_CTOR(SvxFmConfigWin,NULL);
+ aTbx.Initialize();
+
+ ToolBox& rBox = aTbx.GetToolBox();
+ aSelectLink = rBox.GetSelectHdl();
+ rBox.SetSelectHdl( LINK(this, SvxFmConfigWin, TbxSelectHdl) );
+ Size aSize = aTbx.CalcWindowSizePixel();
+ rBox.SetSizePixel( aSize );
+ SetOutputSizePixel( aSize );
+ FreeResource();
+}
+
+// -----------------------------------------------------------------------
+SvxFmConfigWin::~SvxFmConfigWin()
+{
+ DBG_DTOR(SvxFmConfigWin,NULL);
+}
+
+// -----------------------------------------------------------------------
+void SvxFmConfigWin::PopupModeEnd()
+{
+ aTbx.GetToolBox().EndSelection();
+ SfxPopupWindow::PopupModeEnd();
+}
+
+// -----------------------------------------------------------------------
+void SvxFmConfigWin::Update()
+{
+ ToolBox *pBox = &aTbx.GetToolBox();
+ aTbx.Activate( pBox );
+ aTbx.Deactivate( pBox );
+}
+
+//-----------------------------------------------------------------------
+IMPL_LINK( SvxFmConfigWin, TbxSelectHdl, ToolBox*, pBox )
+{
+ if ( IsInPopupMode() )
+ EndPopupMode();
+
+ aSelectLink.Call( &aTbx.GetToolBox() );
+
+ return 0;
+}
+
+//========================================================================
+// class SvxFmTbxCtlConfig
+//========================================================================
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxCtlConfig, SfxUInt16Item );
+
+//-----------------------------------------------------------------------
+SvxFmTbxCtlConfig::SvxFmTbxCtlConfig( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings)
+ :SfxToolBoxControl( nId, rTbx, rBindings )
+ ,nLastSlot( 0 )
+{
+}
+
+//-----------------------------------------------------------------------
+void SvxFmTbxCtlConfig::StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+{
+ if (nSID == SID_FM_CONFIG)
+ {
+ UINT16 nSlot = 0;
+ if (eState >= SFX_ITEM_AVAILABLE)
+ nSlot = ((SfxUInt16Item*)pState)->GetValue();
+
+ //////////////////////////////////////////////////////////////////////
+ // Ist dieser Slot ein gueltiger Slot?
+ BOOL bValidSlot = FALSE;
+
+ switch( nSlot )
+ {
+ case SID_FM_PUSHBUTTON:
+ case SID_FM_RADIOBUTTON:
+ case SID_FM_CHECKBOX:
+ case SID_FM_FIXEDTEXT:
+ case SID_FM_GROUPBOX:
+ case SID_FM_LISTBOX:
+ case SID_FM_COMBOBOX:
+ case SID_FM_URLBUTTON:
+ case SID_FM_EDIT:
+ case SID_FM_DBGRID:
+ case SID_FM_IMAGEBUTTON:
+ case SID_FM_IMAGECONTROL:
+ case SID_FM_FILECONTROL:
+ case SID_FM_DATEFIELD:
+ case SID_FM_TIMEFIELD:
+ case SID_FM_NUMERICFIELD:
+ case SID_FM_CURRENCYFIELD:
+ case SID_FM_PATTERNFIELD:
+ case SID_FM_DESIGN_MODE:
+ bValidSlot = TRUE;
+ }
+ //////////////////////////////////////////////////////////////////////
+ // Setzen des Images
+ if (bValidSlot)
+ {
+ // Image aImage = SFX_IMAGEMANAGER()->GetImage( nSlot );
+ GetToolBox().SetItemImage( SID_FM_CONFIG, SFX_IMAGEMANAGER()->GetImage( nSlot ) );
+ nLastSlot = nSlot;
+ }
+ }
+ SfxToolBoxControl::StateChanged( nSID, eState,pState );
+}
+
+//-----------------------------------------------------------------------
+SfxPopupWindowType SvxFmTbxCtlConfig::GetPopupWindowType() const
+{
+ return( nLastSlot == 0 ? SFX_POPUPWINDOW_ONCLICK : SFX_POPUPWINDOW_ONTIMEOUT );
+}
+
+//-----------------------------------------------------------------------
+SfxPopupWindow* SvxFmTbxCtlConfig::CreatePopupWindow()
+{
+ if ( GetId() == SID_FM_CONFIG )
+ {
+ SvxFmConfigWin* pWin = new SvxFmConfigWin( GetId(), SVX_RES( RID_SVXTBX_FORM ),
+ SVX_RES( TBX_FORM ), GetBindings() );
+ pWin->StartPopupMode( &GetToolBox(), TRUE );
+ pWin->StartSelection();
+ pWin->Show();
+
+ return pWin;
+ }
+ return NULL;
+}
+
+//-----------------------------------------------------------------------
+void SvxFmTbxCtlConfig::Select( USHORT nModifier )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Click auf den Button SID_FM_CONFIG in der ObjectBar
+ if (nLastSlot)
+ SFX_DISPATCHER().Execute( nLastSlot );
+}
+
+
+//========================================================================
+// class SvxFmTbxCtlAbsRec
+//========================================================================
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxCtlAbsRec, FmFormInfoItem );
+DBG_NAME(SvxFmTbxCtlAbsRec);
+//-----------------------------------------------------------------------
+SvxFmTbxCtlAbsRec::SvxFmTbxCtlAbsRec( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings )
+ :SfxToolBoxControl( nId, rTbx, rBindings )
+{
+ DBG_CTOR(SvxFmTbxCtlAbsRec,NULL);
+}
+
+//-----------------------------------------------------------------------
+SvxFmTbxCtlAbsRec::~SvxFmTbxCtlAbsRec()
+{
+ DBG_DTOR(SvxFmTbxCtlAbsRec,NULL);
+}
+
+//-----------------------------------------------------------------------
+void SvxFmTbxCtlAbsRec::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+{
+ USHORT nId = GetId();
+ ToolBox* pToolBox = &GetToolBox();
+ SvxFmAbsRecWin* pWin = (SvxFmAbsRecWin*)( pToolBox->GetItemWindow(nId) );
+
+ DBG_ASSERT( pWin, "Control not found!" );
+
+ if (pState)
+ {
+ FmFormInfo aInfo = ((FmFormInfoItem*)pState)->GetInfo();
+ if (aInfo.Count > 0)
+ {
+ pWin->SetMax(aInfo.Count);
+ }
+ else
+ {
+ pWin->SetMax(LONG_MAX);
+ }
+ pWin->SetValue(aInfo.Pos);
+ pWin->SetReadOnly(aInfo.ReadOnly);
+ }
+
+ BOOL bEnable = SFX_ITEM_DISABLED != eState && pState;
+ if (!bEnable)
+ pWin->SetText(String());
+
+ //////////////////////////////////////////////////////////////////////
+ // Enablen/disablen des Fensters
+ pToolBox->EnableItem(nId, bEnable);
+ SfxToolBoxControl::StateChanged( nSID, eState,pState );
+}
+
+//-----------------------------------------------------------------------
+Window* SvxFmTbxCtlAbsRec::CreateItemWindow( Window* pParent )
+{
+ SvxFmAbsRecWin* pWin = new SvxFmAbsRecWin( pParent, this );
+ return pWin;
+}
+
+
+//========================================================================
+// SvxFmTbxCtlRecText
+//========================================================================
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxCtlRecText, SfxBoolItem );
+DBG_NAME(SvxFmTbxCtlRecText);
+//-----------------------------------------------------------------------
+SvxFmTbxCtlRecText::SvxFmTbxCtlRecText( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings )
+ :SfxToolBoxControl( nId, rTbx, rBindings )
+{
+ DBG_CTOR(SvxFmTbxCtlRecText,NULL);
+}
+
+//-----------------------------------------------------------------------
+SvxFmTbxCtlRecText::~SvxFmTbxCtlRecText()
+{
+ DBG_DTOR(SvxFmTbxCtlRecText,NULL);
+}
+
+//-----------------------------------------------------------------------
+Window* SvxFmTbxCtlRecText::CreateItemWindow( Window* pParent )
+{
+ XubString aText( SVX_RES(RID_STR_REC_TEXT) );
+ FixedText* pFixedText = new FixedText( pParent );
+ Size aSize( pFixedText->GetTextWidth( aText ), pFixedText->GetTextHeight( ) );
+ pFixedText->SetText( aText );
+ aSize.Width() += 6;
+ pFixedText->SetSizePixel( aSize );
+
+ return pFixedText;
+}
+
+
+//========================================================================
+// SvxFmTbxCtlRecFromText
+//========================================================================
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxCtlRecFromText, SfxBoolItem );
+DBG_NAME(SvxFmTbxCtlRecFromText);
+//-----------------------------------------------------------------------
+SvxFmTbxCtlRecFromText::SvxFmTbxCtlRecFromText( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings )
+ :SfxToolBoxControl( nId, rTbx, rBindings )
+{
+ DBG_CTOR(SvxFmTbxCtlRecFromText,NULL);
+}
+
+//-----------------------------------------------------------------------
+SvxFmTbxCtlRecFromText::~SvxFmTbxCtlRecFromText()
+{
+ DBG_DTOR(SvxFmTbxCtlRecFromText,NULL);
+}
+
+//-----------------------------------------------------------------------
+Window* SvxFmTbxCtlRecFromText::CreateItemWindow( Window* pParent )
+{
+ XubString aText( SVX_RES(RID_STR_REC_FROM_TEXT) );
+ FixedText* pFixedText = new FixedText( pParent, WB_CENTER );
+ Size aSize( pFixedText->GetTextWidth( aText ), pFixedText->GetTextHeight( ) );
+ aSize.Width() += 12;
+ pFixedText->SetText( aText );
+ pFixedText->SetSizePixel( aSize );
+
+ return pFixedText;
+}
+
+
+//========================================================================
+// SvxFmTbxCtlRecTotal
+//========================================================================
+DBG_NAME(SvxFmTbxCtlRecTotal);
+SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxCtlRecTotal, SfxStringItem );
+
+//-----------------------------------------------------------------------
+SvxFmTbxCtlRecTotal::SvxFmTbxCtlRecTotal( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings )
+ :SfxToolBoxControl( nId, rTbx, rBindings )
+ ,pFixedText( NULL )
+{
+ DBG_CTOR(SvxFmTbxCtlRecTotal,NULL);
+}
+
+//-----------------------------------------------------------------------
+SvxFmTbxCtlRecTotal::~SvxFmTbxCtlRecTotal()
+{
+ DBG_DTOR(SvxFmTbxCtlRecTotal,NULL);
+}
+
+//-----------------------------------------------------------------------
+Window* SvxFmTbxCtlRecTotal::CreateItemWindow( Window* pParent )
+{
+ pFixedText = new FixedText( pParent );
+ String aSample("123456", sizeof("123456"));
+ Size aSize( pFixedText->GetTextWidth( aSample ), pFixedText->GetTextHeight( ) );
+ aSize.Width() += 12;
+ pFixedText->SetSizePixel( aSize );
+ return pFixedText;
+}
+
+//-----------------------------------------------------------------------
+void SvxFmTbxCtlRecTotal::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Setzen des FixedTextes
+ if (GetId() != SID_FM_RECORD_TOTAL)
+ return;
+
+ XubString aText;
+ if (pState)
+ aText = ((SfxStringItem*)pState)->GetValue();
+ else
+ aText = '?';
+
+ pFixedText->SetText( aText );
+ pFixedText->Update();
+ pFixedText->Flush();
+
+ SfxToolBoxControl::StateChanged( nSID, eState,pState );
+}
+
+/*
+//========================================================================
+// SvxFmTbxCtlRecTotal
+//========================================================================
+SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxCtlFilterText, SfxBoolItem );
+
+//-----------------------------------------------------------------------
+SvxFmTbxCtlFilterText::SvxFmTbxCtlFilterText( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings )
+ :SfxToolBoxControl( nId, rTbx, rBindings )
+ ,pFixedText( NULL )
+ ,aText(SVX_RES(RID_STR_FORM_FILTERED))
+{
+}
+
+//-----------------------------------------------------------------------
+SvxFmTbxCtlFilterText::~SvxFmTbxCtlFilterText()
+{
+}
+
+//-----------------------------------------------------------------------
+Window* SvxFmTbxCtlFilterText::CreateItemWindow( Window* pParent )
+{
+ pFixedText = new FixedText( pParent );
+ Size aSize = pFixedText->GetTextSize( aText );
+ aSize.Width() += 6;
+ pFixedText->SetSizePixel( aSize );
+
+ return pFixedText;
+}
+
+//-----------------------------------------------------------------------
+void SvxFmTbxCtlFilterText::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+{
+ //////////////////////////////////////////////////////////////////////
+ // Setzen des FixedTextes
+ if (GetId() != SID_FM_FORM_FILTERED)
+ return;
+
+ if (pState && ((SfxBoolItem*)pState)->GetValue())
+ pFixedText->SetText( aText );
+ else
+ pFixedText->SetText( "" );
+
+ SfxToolBoxControl::StateChanged( nSID, eState,pState );
+} */
+
+//========================================================================
+// SvxFmTbxNextRec
+//========================================================================
+SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxNextRec, SfxBoolItem );
+
+//-----------------------------------------------------------------------
+SvxFmTbxNextRec::SvxFmTbxNextRec( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings )
+ :SfxToolBoxControl( nId, rTbx, rBindings )
+{
+ rTbx.SetItemBits(nId, rTbx.GetItemBits(nId) | TIB_REPEAT);
+
+ AllSettings aSettings = rTbx.GetSettings();
+ MouseSettings aMouseSettings = aSettings.GetMouseSettings();
+ aMouseSettings.SetButtonRepeat(aMouseSettings.GetButtonRepeat() / 4);
+ aSettings.SetMouseSettings(aMouseSettings);
+ rTbx.SetSettings(aSettings, TRUE);
+}
+
+//========================================================================
+// SvxFmTbxPrevRec
+//========================================================================
+SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxPrevRec, SfxBoolItem );
+
+//-----------------------------------------------------------------------
+SvxFmTbxPrevRec::SvxFmTbxPrevRec( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings )
+ :SfxToolBoxControl( nId, rTbx, rBindings )
+{
+ rTbx.SetItemBits(nId, rTbx.GetItemBits(nId) | TIB_REPEAT);
+
+ /*AllSettings aSettings = rTbx.GetSettings();
+ MouseSettings aMouseSettings = aSettings.GetMouseSettings();
+ aMouseSettings.SetButtonRepeat(aMouseSettings.GetButtonRepeat() / 2);
+ aSettings.SetMouseSettings(aMouseSettings);
+ rTbx.SetSettings(aSettings, TRUE);*/
+}
+
+
diff --git a/svx/source/form/tbxform.src b/svx/source/form/tbxform.src
new file mode 100644
index 0000000000..af6a7512bd
--- /dev/null
+++ b/svx/source/form/tbxform.src
@@ -0,0 +1,616 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxform.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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"
+#include "fmresids.hrc"
+
+#define IMAGE_STDBTN_COLOR Color { Red = 0xC000; Green = 0xC000; Blue = 0xC000; }
+
+String RID_SVXTBX_FORM_FILTER
+{
+ Text = "Filterleiste" ;
+ Text [ English ] = "Filter toolbox" ;
+ Text [ english_us ] = "Filter bar" ;
+ Text[ portuguese ] = "Barra de filtros";
+ Text[ russian ] = "Ïàíåëü ôèëüòðîâ";
+ Text[ greek ] = "ÃñáììÞ ößëôñïõ";
+ Text[ dutch ] = "Filterbalk";
+ Text[ french ] = "Barre de filtres";
+ Text[ spanish ] = "Barra de filtros";
+ Text[ italian ] = "Barra dei filtri";
+ Text[ danish ] = "Filterlinje";
+ Text[ swedish ] = "Filterlist";
+ Text[ polish ] = "Pasek filtru";
+ Text[ portuguese_brazilian ] = "Filter toolbox";
+ Text[ japanese ] = "̨ÙÀÊÞ°";
+ Text[ korean ] = "ÇÊÅÍ µµ±¸¸ðÀ½";
+ Text[ chinese_simplified ] = "ɸѡÀ¸";
+ Text[ chinese_traditional ] = "¹LÂo¾¹²M³æ";
+ Text[ arabic ] = "ÔÑíØ ÇáÝáÊÑ";
+ Text[ turkish ] = "Filtre çubuðu";
+ Text[ language_user1 ] = " ";
+};
+
+ //------------------------------------------------------------------------
+ // Navigation bar
+ToolBox RID_SVXTBX_FORM_FILTER
+{
+ Dockable = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ HideWhenDeactivate = TRUE ;
+ LineSpacing = TRUE ;
+ Text = "Filterleiste" ;
+ Text [ English ] = "Filter toolbox" ;
+ Text [ english_us ] = "Filter bar" ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 200 , 16 ) ;
+ ButtonType = BUTTON_SYMBOL ;
+ // die Images stehen in der Ofa-DLL
+ ItemList =
+ {
+ ToolboxItem
+ {
+ Identifier = SID_FM_FILTER_NAVIGATOR ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_FILTER_EXECUTE ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_FILTER_EXIT ;
+ };
+ /*ToolboxItem
+ {
+ Identifier = SID_FM_FILTER_REMOVE ;
+ };*/
+ };
+ Scroll = TRUE ;
+ Text[ portuguese ] = "Barra de filtros";
+ Text[ russian ] = "Ïàíåëü ôèëüòðîâ";
+ Text[ greek ] = "ÃñáììÞ ößëôñïõ";
+ Text[ dutch ] = "Filterbalk";
+ Text[ french ] = "Barre de filtres";
+ Text[ spanish ] = "Barra de filtros";
+ Text[ italian ] = "Barra dei filtri";
+ Text[ danish ] = "Filterlinje";
+ Text[ swedish ] = "Filterlist";
+ Text[ polish ] = "Pasek filtru";
+ Text[ portuguese_brazilian ] = "Filter toolbox";
+ Text[ japanese ] = "̨ÙÀÊÞ°";
+ Text[ korean ] = "ÇÊÅÍ µµ±¸¸ðÀ½";
+ Text[ chinese_simplified ] = "ɸѡÀ¸";
+ Text[ chinese_traditional ] = "¹LÂo¾¹²M³æ";
+ Text[ arabic ] = "ÔÑíØ ÇáÝáÊÑ";
+ Text[ turkish ] = "Filtre çubuðu";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_SVXTBX_FORM_NAVIGATION
+{
+ Text = "Datenbankleiste" ;
+ Text [ English ] = "Database toolbox" ;
+ Text [ english_us ] = "Database bar" ;
+ Text[ italian ] = "Barra degli strumenti per database";
+ Text[ portuguese_brazilian ] = "Database toolbox";
+ Text[ portuguese ] = "Barra de ferramentas da base de dados";
+ Text[ danish ] = "Databaselinje";
+ Text[ french ] = "Barre de base de données";
+ Text[ swedish ] = "Databaslist";
+ Text[ dutch ] = "Database-balk";
+ Text[ spanish ] = "Barra de base de datos";
+ Text[ chinese_simplified ] = "Êý¾Ý¿â¹¤¾ßÀ¸";
+ Text[ russian ] = "Ïàíåëü èíñòðóìåíòîâ áàçû äàííûõ";
+ Text[ polish ] = "Przybornik bazy danych";
+ Text[ japanese ] = "ÃÞ°ÀÍÞ°½ÊÞ°";
+ Text[ chinese_traditional ] = "¸ê®Æ®w¤u¨ã¦C";
+ Text[ greek ] = "ÃñáììÞ âÜóçò äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅͺ£À̽º µµ±¸¸ðÀ½";
+ Text[ arabic ] = "ÔÑíØ ÞÇÚÏÉ ÇáÈíÇäÇÊ";
+ Text[ turkish ] = "Veritabaný çubuðu";
+ Text[ language_user1 ] = " ";
+};
+
+ //------------------------------------------------------------------------
+ // Navigation bar
+ToolBox RID_SVXTBX_FORM_NAVIGATION
+{
+ Dockable = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ HideWhenDeactivate = TRUE ;
+ LineSpacing = TRUE ;
+ Text = "Datenbankleiste" ;
+ Text [ English ] = "Database toolbox" ;
+ Text [ english_us ] = "Database Bar" ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 200 , 16 ) ;
+ ButtonType = BUTTON_SYMBOL ;
+ // die Images stehen in der Ofa-DLL
+ ItemList =
+ {
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_TEXT ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_ABSOLUTE ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_FROM_TEXT ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_TOTAL ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_FIRST ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_PREV ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_NEXT ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_LAST ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_SAVE ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_UNDO ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_NEW ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_RECORD_DELETE ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_REFRESH ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_SEARCH ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_SORTUP ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_SORTDOWN ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_AUTOFILTER ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_FILTER_START ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_ORDERCRIT ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_REMOVE_FILTER_SORT ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_VIEW_AS_GRID ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolboxItem
+ {
+ Identifier = SID_FM_FORM_FILTERED ;
+ };
+ };
+ Scroll = TRUE ;
+ Text [ portuguese ] = "Barra de base de dados" ;
+ Text [ english_us ] = "Database Bar" ;
+ Text [ portuguese_brazilian ] = "Navigation" ;
+ Text [ swedish ] = "Databaslist" ;
+ Text [ danish ] = "Databaselinje" ;
+ Text [ italian ] = "Barra database" ;
+ Text [ spanish ] = "Barra de base de datos" ;
+ Text [ french ] = "Barre de base de données" ;
+ Text [ dutch ] = "Database-balk" ;
+ Text[ chinese_simplified ] = "Êý¾Ý¿â¹¤¾ßÀ¸";
+ Text[ russian ] = "Ïàíåëü áàçû äàííûõ";
+ Text[ polish ] = "Pasek bazy danych";
+ Text[ japanese ] = "ÃÞ°ÀÍÞ°½ÊÞ°";
+ Text[ chinese_traditional ] = "¸ê®Æ®w¤u¨ã¦C";
+ Text[ greek ] = "ÃñáììÞ âÜóçò äåäïìÝíùí";
+ Text[ korean ] = "µ¥ÀÌÅͺ£À̽º ¸ðÀ½";
+ Text[ arabic ] = "ÔÑíØ ÞÇÚÏÉ ÇáÈíÇäÇÊ";
+ Text[ turkish ] = "Veritabaný çubuðu";
+ Text[ language_user1 ] = " ";
+};
+
+ //------------------------------------------------------------------------
+ // Controller fuer controls
+FloatingWindow RID_SVXTBX_FORM
+{
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Text = "Formularfunktionen" ;
+ Text [ English ] = "Form functions" ;
+ ToolBox TBX_FORM
+ {
+ SVLook = TRUE ;
+ LineCount = 2 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_FM_PUSHBUTTON ;
+ HelpID = SID_FM_PUSHBUTTON ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_RADIOBUTTON ;
+ HelpID = SID_FM_RADIOBUTTON ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_CHECKBOX ;
+ HelpID = SID_FM_CHECKBOX ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_FIXEDTEXT ;
+ HelpID = SID_FM_FIXEDTEXT ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_GROUPBOX ;
+ HelpID = SID_FM_GROUPBOX ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_EDIT ;
+ HelpID = SID_FM_EDIT ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_LISTBOX ;
+ HelpID = SID_FM_LISTBOX ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_COMBOBOX ;
+ HelpID = SID_FM_COMBOBOX ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_IMAGEBUTTON ;
+ HelpID = SID_FM_IMAGEBUTTON ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_IMAGECONTROL ;
+ HelpID = SID_FM_IMAGECONTROL ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_FILECONTROL ;
+ HelpID = SID_FM_FILECONTROL ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_DATEFIELD ;
+ HelpID = SID_FM_DATEFIELD ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_TIMEFIELD ;
+ HelpID = SID_FM_TIMEFIELD ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_NUMERICFIELD ;
+ HelpID = SID_FM_NUMERICFIELD ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_FORMATTEDFIELD ;
+ HelpID = SID_FM_FORMATTEDFIELD ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_CURRENCYFIELD ;
+ HelpID = SID_FM_CURRENCYFIELD ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_PATTERNFIELD ;
+ HelpID = SID_FM_PATTERNFIELD ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_DBGRID ;
+ HelpID = SID_FM_DBGRID ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_SELECT ;
+ HelpID = SID_OBJECT_SELECT ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ };
+ ToolBoxItem { Type = TOOLBOXITEM_BREAK ; };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_CTL_PROPERTIES ;
+ HelpID = SID_FM_CTL_PROPERTIES ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_PROPERTIES ;
+ HelpID = SID_FM_PROPERTIES ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_TAB_DIALOG ;
+ HelpID = SID_FM_TAB_DIALOG ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_ADD_FIELD ;
+ HelpID = SID_FM_ADD_FIELD ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_SHOW_FMEXPLORER ;
+ HelpID = SID_FM_SHOW_FMEXPLORER ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_DESIGN_MODE ;
+ HelpID = SID_FM_DESIGN_MODE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_OPEN_READONLY ;
+ HelpID = SID_FM_OPEN_READONLY ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_FM_USE_WIZARDS ;
+ HelpID = SID_FM_USE_WIZARDS ;
+ };
+ };
+ };
+ Text [ english_us ] = "Form Functions" ;
+ Text [ portuguese_brazilian ] = "Formular Funktionen" ;
+ Text [ swedish ] = "Formulärfunktioner" ;
+ Text [ danish ] = "Formularfunktioner" ;
+ Text [ italian ] = "Funzioni formulario" ;
+ Text [ spanish ] = "Funciones formulario" ;
+ Text [ french ] = "Fonctions de formulaire" ;
+ Text [ dutch ] = "Formulierfuncties" ;
+ Text [ portuguese ] = "Funções de formulário" ;
+ Text[ chinese_simplified ] = "±íµ¥¹¦ÄÜ";
+ Text[ russian ] = "Ôóíêöèè ôîðìóëÿðà";
+ Text[ polish ] = "Funkcje formularza";
+ Text[ japanese ] = "Ì«°Ñ‚Ì‹@”\\";
+ Text[ chinese_traditional ] = "ªí³æ¥\\¯à";
+ Text[ greek ] = "Ëåéôïõñãßåò öüñìáò";
+ Text[ korean ] = "¾ç½Ä ±â´É";
+ Text[ arabic ] = "ãåÇã ÇáÇÓÊãÇÑÉ";
+ Text[ turkish ] = "Form iþlevleri";
+ Text[ language_user1 ] = " ";
+};
+
+ModalDialog RID_SVX_DLG_INPUTRECORDNO
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 130 , 45 ) ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Text = "Datensatznummer" ;
+ Text [ english ] = "Absolute Record";
+ Text [ english_us ] = "Record Number";
+ Text [ portuguese ] = "Número de registos";
+ Text [ russian ] = "Íîìåð çàïèñè";
+ Text [ dutch ] = "Recordnummer";
+ Text [ french ] = "Numéro d'enregistrement";
+ Text [ spanish ] = "Número de registro";
+ Text [ italian ] = "Numero record dati";
+ Text [ danish ] = "Datapostnummer";
+ Text [ swedish ] = "Datapostnummer";
+ Text [ polish ] = "Numer rekordu";
+ Text [ portuguese_brazilian ] = "AbsoluteRecord";
+ Text [ japanese ] = "Úº°ÄÞ”Ô†";
+ Text [ chinese_simplified ] = "Êý¾ÝÌõÄ¿±àºÅ";
+
+ FixedText 1
+ {
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 70 , 12 ) ;
+ Text = "gehe zu Datensatz";
+ Text [ ENGLISH ] = "go to record";
+ Text[ english_us ] = "go to record";
+ Text[ portuguese ] = "ir para registo";
+ Text[ russian ] = "ïåðåéòè ê çàïèñè";
+ Text[ greek ] = "ìåôÜâáóç óôçí åããñáöÞ";
+ Text[ dutch ] = "ga naar record";
+ Text[ french ] = "Passer à l'enregistrement";
+ Text[ spanish ] = "ir a registro";
+ Text[ italian ] = "Vai al record di dati";
+ Text[ danish ] = "gå til datapost";
+ Text[ swedish ] = "gå till datapost";
+ Text[ polish ] = "przejdŸ do rekordu";
+ Text[ portuguese_brazilian ] = "go to record";
+ Text[ japanese ] = "Úº°ÄÞ‚Ö";
+ Text[ korean ] = "·¹ÄÚµå·Î °¡±â";
+ Text[ chinese_simplified ] = "תµ½Êý¾ÝÌõÄ¿";
+ Text[ chinese_traditional ] = "Âà¨ì¼ÆÕu±ø¥Ø";
+ Text[ arabic ] = "ÇáÇäÊÞÇá Åáì ÇáÓÌá";
+ Text[ turkish ] = "Veri kümesine git";
+ };
+ NumericField 1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 79 , 6 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ TabStop = TRUE ;
+ };
+ OKButton 1
+ {
+ Pos = MAP_APPFONT ( 6 , 25 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton 1
+ {
+ Pos = MAP_APPFONT ( 74 , 25 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Text[ greek ] = "Áñéèìüò åããñáöÞò";
+ Text[ korean ] = "µ¥ÀÌÅÍ ·¹ÄÚµå ¹øÈ£";
+ Text[ chinese_traditional ] = "¼ÆÕu±ø¥Ø½s¸¹";
+ Text[ arabic ] = "ÑÞã ÇáÓÌá";
+ Text[ turkish ] = "Veri kümesi no.";
+};
+
diff --git a/svx/source/form/typemap.cxx b/svx/source/form/typemap.cxx
new file mode 100644
index 0000000000..ad5951547a
--- /dev/null
+++ b/svx/source/form/typemap.cxx
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * $RCSfile: typemap.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SFXMSG_HXX //autogen
+#include <sfx2/msg.hxx>
+#endif
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+
+#ifndef _FM_FMITEMS_HXX //autogen
+#include "fmitems.hxx"
+#endif
+
+#ifndef _SFX_OBJITEM_HXX //autogen
+#include <sfx2/objitem.hxx>
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+
+/************************************************************/
+extern SfxType0 aSfxUInt32Item_Impl;
+SfxType0 aSfxUInt32Item_Impl =
+{
+ TYPE(SfxUInt32Item), 0
+};
+
+/************************************************************/
+extern SfxType3 aFmFormInfoItem_Impl;
+SfxType3 aFmFormInfoItem_Impl =
+{
+ TYPE(FmFormInfoItem), 3, { {MID_POS,"Pos"}, {MID_COUNT,"Count"}, {MID_READONLY,"ReadOnly"} }
+};
+
+/************************************************************/
+extern SfxType0 aSfxObjectItem_Impl;
+SfxType0 aSfxObjectItem_Impl =
+{
+ TYPE(SfxObjectItem), 0
+};
+
+// diese werden nur bei einer Aufteilung in 2 Dll's gebraucht
+#if 1
+#if defined(WNT) || defined(OS2)
+/************************************************************/
+extern SfxType0 aSfxUInt16Item_Impl;
+SfxType0 aSfxUInt16Item_Impl =
+{
+ TYPE(SfxUInt16Item), 0
+};
+
+
+
+/************************************************************/
+extern SfxType0 aSfxVoidItem_Impl;
+SfxType0 aSfxVoidItem_Impl =
+{
+ TYPE(SfxVoidItem), 0
+};
+
+
+/************************************************************/
+extern SfxType0 aSfxStringItem_Impl;
+SfxType0 aSfxStringItem_Impl =
+{
+ TYPE(SfxStringItem), 0
+};
+
+
+/************************************************************/
+extern SfxType0 aSfxBoolItem_Impl;
+SfxType0 aSfxBoolItem_Impl =
+{
+ TYPE(SfxBoolItem), 0
+};
+
+#endif
+#endif
+
diff --git a/svx/source/gallery2/codec.cxx b/svx/source/gallery2/codec.cxx
new file mode 100644
index 0000000000..6ea82fd0cf
--- /dev/null
+++ b/svx/source/gallery2/codec.cxx
@@ -0,0 +1,369 @@
+/*************************************************************************
+ *
+ * $RCSfile: codec.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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.h>
+#include <tools/stream.hxx>
+#include <tools/new.hxx>
+#include <svtools/fltdefs.hxx>
+#include "codec.hxx"
+
+#define SUBBUFFER_SIZE 8192
+
+#ifdef WIN
+typedef BYTE huge* HPBYTE;
+#else
+typedef BYTE* HPBYTE;
+#endif
+
+/******************************************************************************
+|*
+|*
+|*
+\******************************************************************************/
+
+RLECodec::RLECodec( SvStream& rIOStm ) : rStm( rIOStm )
+{
+}
+
+
+/******************************************************************************
+|*
+|*
+|*
+\******************************************************************************/
+
+RLECodec::~RLECodec()
+{
+}
+
+
+/******************************************************************************
+|*
+|*
+|*
+\******************************************************************************/
+
+BOOL RLECodec::IsRLECoded( SvStream& rStm )
+{
+ const ULONG nPos = rStm.Tell();
+ BOOL bRet = FALSE;
+ BYTE cByte1, cByte2, cByte3, cByte4, cByte5, cByte6;
+
+ rStm >> cByte1 >> cByte2 >> cByte3 >> cByte4 >> cByte5 >> cByte6;
+
+ if ( cByte1 == 'S' && cByte2 == 'V' && cByte3 == 'R' &&
+ cByte4 == 'L' && cByte5 == 'E' && cByte6 == '1' )
+ {
+ bRet = TRUE;
+ }
+
+ rStm.Seek( nPos );
+
+ return bRet;
+}
+
+
+/******************************************************************************
+|*
+|*
+|*
+\******************************************************************************/
+
+ULONG RLECodec::Write( SvMemoryStream& rStmToWrite )
+{
+ UINT32 nPos;
+ UINT32 nCompSize;
+
+ rStmToWrite.Seek( STREAM_SEEK_TO_END );
+ const UINT32 nSize = rStmToWrite.Tell();
+ rStmToWrite.Seek( 0UL );
+
+ rStm << 'S' << 'V' << 'R' << 'L' << 'E' << '1';
+ rStm << nSize;
+
+ nPos = rStm.Tell();
+ rStm.SeekRel( 4UL );
+
+ ImpWriteBuffer( (BYTE*) rStmToWrite.GetData(), nSize );
+
+ nCompSize = rStm.Tell() - nPos - 4UL;
+ rStm.Seek( nPos );
+ rStm << nCompSize;
+ rStm.Seek( STREAM_SEEK_TO_END );
+
+ return 0UL;
+}
+
+
+/******************************************************************************
+|*
+|*
+|*
+\******************************************************************************/
+
+ULONG RLECodec::Read( SvMemoryStream& rStmToRead )
+{
+ UINT32 nReadBytes = 0UL;
+
+ if ( IsRLECoded( rStm ) )
+ {
+ UINT32 nCompressedSize;
+
+ rStm.SeekRel( 6 );
+ rStm >> nReadBytes;
+ rStm >> nCompressedSize;
+
+ HPBYTE pReadBuffer = (HPBYTE) SvMemAlloc( nCompressedSize );
+
+ // komprimierte Bytefolge lesen
+ rStm.Read( pReadBuffer, nCompressedSize );
+
+ // Dekomprimieren
+ rStmToRead.SetBuffer( (char*) ImpReadBuffer( pReadBuffer, nReadBytes ),
+ nReadBytes, TRUE, nReadBytes );
+
+ SvMemFree( pReadBuffer );
+ }
+
+ return nReadBytes;
+}
+
+
+/******************************************************************************
+|*
+|*
+|*
+\******************************************************************************/
+
+void RLECodec::ImpWriteBuffer( BYTE* pInBuf, const ULONG nSize )
+{
+ HPBYTE pTmpIn = (HPBYTE) pInBuf;
+ const ULONG nCount = nSize / SUBBUFFER_SIZE;
+ const ULONG nRest = nCount ? nSize % ( nCount * SUBBUFFER_SIZE ) : nSize;
+
+ for( ULONG i = 0; i < nCount; i++ )
+ ImpWriteSubBuffer( &pTmpIn[ i * SUBBUFFER_SIZE ], SUBBUFFER_SIZE );
+
+ if ( nRest )
+ ImpWriteSubBuffer( &pTmpIn[ nCount * SUBBUFFER_SIZE ], nRest );
+
+ // BlockEnde schreiben
+ rStm << (BYTE) 0;
+ rStm << (BYTE) 1;
+}
+
+
+/******************************************************************************
+|*
+|*
+|*
+\******************************************************************************/
+
+void RLECodec::ImpWriteSubBuffer( BYTE* pInBuf, const ULONG nSize )
+{
+ HPBYTE pTmpIn = (HPBYTE) pInBuf;
+ HPBYTE pOutBuf = (HPBYTE) SvMemAlloc( nSize << 1 );
+ HPBYTE pTmpOut = pOutBuf;
+ ULONG nIndex = 0UL;
+ ULONG nBufCount = 0UL;
+ ULONG nSaveIndex;
+ ULONG nCount;
+ BYTE cPix;
+ BYTE cLast;
+ BOOL bFound;
+
+ while( nIndex < nSize )
+ {
+ nCount = 1L;
+ cPix = pTmpIn[ nIndex++ ];
+
+ // Anzahl der aufeinanderf. gleichen Eintraege bestimmen
+ while( ( nIndex < nSize ) && ( nCount < 255L ) && ( pTmpIn[ nIndex ] == cPix ) )
+ {
+ nIndex++;
+ nCount++;
+ }
+
+ // gleiche Eintraege hintereinander werden kodiert geschrieben
+ if ( nCount > 1 )
+ {
+ *pTmpOut++ = (BYTE) nCount;
+ *pTmpOut++ = cPix;
+ nBufCount += 2;
+ }
+ else
+ {
+ cLast = cPix;
+ nSaveIndex = nIndex - 1;
+ bFound = FALSE;
+
+ // Anzahl der unterschiedlichen Eintraege bestimmen
+ while( ( nIndex < nSize ) && ( nCount < 256L ) && ( ( cPix = pTmpIn[ nIndex ] ) != cLast ) )
+ {
+ nIndex++;
+ nCount++;
+ cLast = cPix;
+ bFound = TRUE;
+ }
+
+ // Falls untersch. Eintrag gefunden, dec. wir den Index
+ // da der letzte Index der erste der neuen Sequenz
+ // sein soll
+ if ( bFound )
+ nIndex--;
+
+ // mehrere untersch. Eintraege ueber abs. Coding schreiben
+ if ( nCount > 3 )
+ {
+ // wir wollen nur so wenig wie moeglich
+ // unterschiedliche Eintraege schreiben
+ *pTmpOut++ = 0;
+ *pTmpOut++ = (BYTE) --nCount;
+
+ MEMCPY( pTmpOut, &pTmpIn[ nSaveIndex ], nCount );
+ pTmpOut += nCount;
+
+ // WORD-Alignment beachten
+ if ( nCount & 1 )
+ {
+ *pTmpOut++ = 0;
+ nBufCount += ( nCount + 3 );
+ }
+ else
+ nBufCount += ( nCount + 2 );
+ }
+ else
+ {
+ *pTmpOut++ = 1;
+ *pTmpOut++ = pTmpIn[ nSaveIndex ];
+
+ if ( nCount == 3 )
+ {
+ *pTmpOut++ = 1;
+ *pTmpOut++ = pTmpIn[ ++nSaveIndex ];
+ nBufCount += 4;
+ }
+ else
+ nBufCount += 2;
+ }
+ }
+ }
+
+ // Puffer schreiben
+ rStm.Write( pOutBuf, nBufCount );
+
+ // temp. Puffer wieder zerstoeren
+ SvMemFree( pOutBuf );
+}
+
+
+/******************************************************************************
+|*
+|*
+|*
+\******************************************************************************/
+
+BYTE* RLECodec::ImpReadBuffer( BYTE* pStmBuf, const ULONG nSize )
+{
+ HPBYTE pInBuf = (HPBYTE) pStmBuf;
+ HPBYTE pOutBuf = (HPBYTE) SvMemAlloc( nSize );
+ HPBYTE pTmpBuf = pOutBuf;
+ HPBYTE pLast = pOutBuf + nSize - 1;
+ ULONG nIndex = 0UL;
+ ULONG nCountByte;
+ ULONG nRunByte;
+ BOOL bEndDecoding = FALSE;
+
+ do
+ {
+ nCountByte = *pInBuf++;
+
+ if ( !nCountByte )
+ {
+ nRunByte = *pInBuf++;
+
+ if ( nRunByte > 2 )
+ {
+ // absolutes Fuellen
+ MEMCPY( &pTmpBuf[ nIndex ], pInBuf, nRunByte );
+ pInBuf += nRunByte;
+ nIndex += nRunByte;
+
+ // WORD-Alignment beachten
+ if ( nRunByte & 1 )
+ pInBuf++;
+ }
+ else if ( nRunByte == 1 ) // Ende des Bildes
+ bEndDecoding = TRUE;
+ }
+ else
+ {
+ const BYTE cVal = *pInBuf++;
+
+ MEMSET( &pTmpBuf[ nIndex ], cVal, nCountByte );
+ nIndex += nCountByte;
+ }
+ }
+ while ( !bEndDecoding && ( pTmpBuf <= pLast ) );
+
+ return pOutBuf;
+}
diff --git a/svx/source/gallery2/codec.hxx b/svx/source/gallery2/codec.hxx
new file mode 100644
index 0000000000..853cf13375
--- /dev/null
+++ b/svx/source/gallery2/codec.hxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * $RCSfile: codec.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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/gen.hxx>
+
+class SvStream;
+class SvMemoryStreamStream;
+
+// ------------------------------------------------------------------------
+
+class RLECodec
+{
+ SvStream& rStm;
+
+ void ImpWriteBuffer( BYTE* pOutBuf, const ULONG nSize );
+ void ImpWriteSubBuffer( BYTE* pOutBuf, const ULONG nSize );
+ BYTE* ImpReadBuffer( BYTE* pInBuf, const ULONG nSize );
+
+public:
+ RLECodec( SvStream& rIOStm );
+ ~RLECodec();
+
+ ULONG Write( SvMemoryStream& rStmToWrite );
+ ULONG Read( SvMemoryStream& rStmToRead );
+
+ static BOOL IsRLECoded( SvStream& rStm );
+};
diff --git a/svx/source/gallery2/galbrws.cxx b/svx/source/gallery2/galbrws.cxx
new file mode 100644
index 0000000000..fd79fd248b
--- /dev/null
+++ b/svx/source/gallery2/galbrws.cxx
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * $RCSfile: galbrws.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <vcl/split.hxx>
+#include <vcl/ctrl.hxx>
+#include <sfx2/sfxsids.hrc>
+#include <sfx2/inimgr.hxx>
+#include "gallery.hrc"
+#include "galmisc.hxx"
+#include "gallery1.hxx"
+#include "galbrws1.hxx"
+#include "galbrws2.hxx"
+#include "galbrws.hxx"
+
+// -------------------------
+// - SvxGalleryChildWindow -
+// -------------------------
+
+GalleryChildWindow::GalleryChildWindow( Window* pParent, USHORT nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) :
+ SfxChildWindow( pParent, nId )
+{
+ pWindow = new GalleryBrowser( pBindings, this, pParent, GAL_RESID( RID_SVXDLG_GALLERYBROWSER ) );
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+ ( (GalleryBrowser*) pWindow )->Initialize( pInfo );
+};
+
+// -----------------------------------------------------------------------------
+
+GalleryChildWindow::~GalleryChildWindow()
+{
+}
+
+// -----------------------------------------------------------------------------
+
+SFX_IMPL_DOCKINGWINDOW( GalleryChildWindow, SID_GALLERY )
+
+// ------------------
+// - GalleryBrowser -
+// ------------------
+
+GalleryBrowser::GalleryBrowser( SfxBindings* pBindings, SfxChildWindow* pCW,
+ Window* pParent, const ResId& rResId ) :
+ SfxDockingWindow( pBindings, pCW, pParent, rResId )
+{
+ mpGallery = Gallery::AcquireGallery( SFX_INIMANAGER()->Get( SFX_KEY_GALLERY_DIR ) );
+ mpBrowser1 = new GalleryBrowser1( this, GAL_RESID( GALLERY_BROWSER1 ), mpGallery );
+ mpSplitter = new Splitter( this, GAL_RESID( GALLERY_SPLITTER ) );
+ mpBrowser2 = new GalleryBrowser2( this, GAL_RESID( GALLERY_BROWSER2 ), mpGallery );
+
+ FreeResource();
+ SetMinOutputSizePixel( maLastSize = GetOutputSizePixel() );
+
+ mpBrowser1->SelectTheme( 0 );
+ mpBrowser1->Show( TRUE );
+
+ mpBrowser2->Show( TRUE );
+
+ mpSplitter->SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetDialogColor() ) );
+ mpSplitter->SetSplitHdl( LINK( this, GalleryBrowser, SplitHdl ) );
+ mpSplitter->Show( TRUE );
+}
+
+// -----------------------------------------------------------------------------
+
+GalleryBrowser::~GalleryBrowser()
+{
+ delete mpBrowser2;
+ delete mpSplitter;
+ delete mpBrowser1;
+ Gallery::ReleaseGallery( mpGallery );
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser::Resize()
+{
+ SfxDockingWindow::Resize();
+
+ const long nFrameWidth = LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width();
+ const long nFrameWidth2 = nFrameWidth << 1;
+ Size aMinSize( GetMinOutputSizePixel() );
+ Size aNewSize( GetOutputSizePixel() );
+ Point aSplitPos( mpSplitter->GetPosPixel() );
+ const Size aSplitSize( mpSplitter->GetOutputSizePixel() );
+
+ if( ( aSplitPos.X() + aSplitSize.Width() ) > ( aNewSize.Width() - nFrameWidth ) )
+ aSplitPos.X() = aNewSize.Width() - nFrameWidth - aSplitSize.Width();
+
+ mpBrowser1->SetPosSizePixel( Point( nFrameWidth, nFrameWidth ),
+ Size( aSplitPos.X() - nFrameWidth, aNewSize.Height() - nFrameWidth2 ) );
+
+ mpSplitter->SetPosSizePixel( aSplitPos, Size( aSplitSize.Width(), aNewSize.Height() ) );
+ mpSplitter->SetDragRectPixel( Rectangle( Point( nFrameWidth, 0 ), Size( aNewSize.Width() - nFrameWidth2, aNewSize.Height() ) ) );
+
+ mpBrowser2->SetPosSizePixel( Point( aSplitPos.X() + aSplitSize.Width(), nFrameWidth ),
+ Size( aNewSize.Width() - aSplitSize.Width() - aSplitPos.X() - nFrameWidth, aNewSize.Height() - nFrameWidth2 ) );
+
+ maLastSize = aNewSize;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryBrowser::Close()
+{
+ return SfxDockingWindow::Close();
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser::ThemeSelectionHasChanged()
+{
+ mpBrowser2->SelectTheme( mpBrowser1->GetSelectedTheme() );
+}
+
+// -----------------------------------------------------------------------------
+
+INetURLObject GalleryBrowser::GetURL() const
+{
+ return mpBrowser2->GetURL();
+}
+
+// -----------------------------------------------------------------------------
+
+String GalleryBrowser::GetFilterName() const
+{
+ return mpBrowser2->GetFilterName();
+}
+
+// -----------------------------------------------------------------------------
+
+Graphic GalleryBrowser::GetGraphic() const
+{
+ return mpBrowser2->GetGraphic();
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryBrowser::GetVCDrawModel( FmFormModel& rModel ) const
+{
+ return mpBrowser2->GetVCDrawModel( rModel );
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryBrowser::IsLinkage() const
+{
+ return mpBrowser2->IsLinkage();
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( GalleryBrowser, SplitHdl, void*, p )
+{
+ mpSplitter->SetPosPixel( Point( mpSplitter->GetSplitPosPixel(), mpSplitter->GetPosPixel().Y() ) );
+ Resize();
+
+ return 0L;
+}
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
new file mode 100644
index 0000000000..1cdea9a4e3
--- /dev/null
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -0,0 +1,470 @@
+/*************************************************************************
+ *
+ * $RCSfile: galbrws1.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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/datetime.hxx>
+#include <unotools/datetime.hxx>
+#include <vcl/msgbox.hxx>
+#include <ucbhelper/content.hxx>
+#include "gallery1.hxx"
+#include "galtheme.hxx"
+#include "galmisc.hxx"
+#include "galdlg.hxx"
+#include "galbrws1.hxx"
+
+#ifndef _COM_SUN_STAR_UTIL_DATETIME_HPP_
+#include <com/sun/star/util/DateTime.hpp>
+#endif
+
+// --------------
+// - Namespaces -
+// --------------
+
+using namespace ::ucb;
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::ucb;
+
+// -----------------------
+// - GalleryThemeListBox -
+// -----------------------
+
+GalleryThemeListBox::GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWinBits ) :
+ ListBox( pParent, nWinBits )
+{
+}
+
+// -----------------------------------------------------------------------------
+
+GalleryThemeListBox::~GalleryThemeListBox()
+{
+}
+
+// -----------------------------------------------------------------------------
+
+long GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt )
+{
+ long nRet = ListBox::PreNotify( rNEvt );
+
+ if( rNEvt.GetType() == EVENT_COMMAND )
+ {
+ const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
+
+ if( pCEvt->GetCommand() == COMMAND_CONTEXTMENU )
+ ( (GalleryBrowser1*) GetParent() )->ShowContextMenu();
+ }
+
+ return nRet;
+}
+
+// -------------------
+// - GalleryBrowser1 -
+// -------------------
+
+GalleryBrowser1::GalleryBrowser1( GalleryBrowser* pParent, const ResId& rResId, Gallery* pGallery ) :
+ Control ( pParent, rResId ),
+ maNewTheme ( this, WB_3DLOOK | WB_BORDER ),
+ mpThemes ( new GalleryThemeListBox( this, WB_3DLOOK | WB_BORDER | WB_HSCROLL | WB_VSCROLL | WB_AUTOHSCROLL | WB_SORT ) ),
+ mpGallery ( pGallery )
+{
+ StartListening( *mpGallery );
+
+ maNewTheme.SetText( String( GAL_RESID( RID_SVXSTR_GALLERY_CREATETHEME ) ) );
+ maNewTheme.SetClickHdl( LINK( this, GalleryBrowser1, ClickNewThemeHdl ) );
+
+ mpThemes->SetControlForeground( COL_WHITE );
+ mpThemes->SetControlBackground( COL_GRAY );
+ mpThemes->SetSelectHdl( LINK( this, GalleryBrowser1, SelectThemeHdl ) );
+
+ for( ULONG i = 0, nCount = mpGallery->GetThemeCount(); i < nCount; i++ )
+ ImplInsertThemeEntry( mpGallery->GetThemeInfo( i ) );
+
+ ImplAdjustControls();
+ maNewTheme.Show( TRUE );
+ mpThemes->Show( TRUE );
+}
+
+// -----------------------------------------------------------------------------
+
+GalleryBrowser1::~GalleryBrowser1()
+{
+ EndListening( *mpGallery );
+ delete mpThemes;
+}
+
+// -----------------------------------------------------------------------------
+
+ULONG GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEntry )
+{
+ ULONG nRet = LISTBOX_ENTRY_NOTFOUND;
+
+ if( pEntry && !pEntry->IsHidden() )
+ {
+ Bitmap aBMP( GAL_RESID( RID_SVXBMP_THEME_NORMAL ) );
+ static const Image aImgNormal( BitmapEx( aBMP, COL_LIGHTMAGENTA ) );
+ aBMP = Bitmap( GAL_RESID( RID_SVXBMP_THEME_DEFAULT ) );
+ static const Image aImgDefault( BitmapEx( aBMP, COL_LIGHTMAGENTA ) );
+ aBMP = Bitmap( GAL_RESID( RID_SVXBMP_THEME_READONLY ) );
+ static const Image aImgReadOnly( BitmapEx( aBMP, COL_LIGHTMAGENTA ) );
+ aBMP = Bitmap( GAL_RESID( RID_SVXBMP_THEME_IMPORTED ) );
+ static const Image aImgImported( BitmapEx( aBMP, COL_LIGHTMAGENTA ) );
+
+ const Image* pImage;
+
+ if( pEntry->IsImported() )
+ pImage = &aImgImported;
+ else if( pEntry->IsReadOnly() )
+ pImage = &aImgReadOnly;
+ else if( pEntry->IsDefault() )
+ pImage = &aImgDefault;
+ else
+ pImage = &aImgNormal;
+
+ nRet = mpThemes->InsertEntry( pEntry->GetThemeName(), *pImage );
+ }
+
+ return nRet;
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser1::ImplAdjustControls()
+{
+ const Size aOutSize( GetOutputSizePixel() );
+ const long nNewThemeHeight = LogicToPixel( Size( 0, 14 ), MAP_APPFONT ).Height();
+
+ maNewTheme.SetPosSizePixel( Point(),
+ Size( aOutSize.Width(), nNewThemeHeight ) );
+
+ mpThemes->SetPosSizePixel( Point( 0, nNewThemeHeight ),
+ Size( aOutSize.Width(), aOutSize.Height() - nNewThemeHeight ) );
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeData& rData )
+{
+ rData.pTheme = (GalleryTheme*) pThm;
+ rData.aEditedTitle = pThm->GetName();
+
+ try
+ {
+ Content aCnt( INetURLObject( pThm->GetThmPath(), INET_PROT_FILE ).GetMainURL(),
+ uno::Reference< XCommandEnvironment >() );
+ util::DateTime aDateTimeCreated, aDateTimeModified;
+ DateTime aDateTime;
+
+ aCnt.getPropertyValue( OUString::createFromAscii( "DateCreated" ) ) >>= aDateTimeCreated;
+ ::utl::typeConvert( aDateTimeCreated, aDateTime );
+ rData.aThemeCreateDate = aDateTime;
+ rData.aThemeCreateTime = aDateTime;
+
+ aCnt.getPropertyValue( OUString::createFromAscii( "DateModified" ) ) >>= aDateTimeModified;
+ ::utl::typeConvert( aDateTimeModified, aDateTime );
+ rData.aThemeChangeDate = aDateTime;
+ rData.aThemeChangeTime = aDateTime;
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "GalleryBrowser1::ImplFillExchangeData: ucb exception" );
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser1::Resize()
+{
+ Control::Resize();
+ ImplAdjustControls();
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser1::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ const GalleryHint& rGalleryHint = (const GalleryHint&) rHint;
+
+ switch( rGalleryHint.GetType() )
+ {
+ case( GALLERY_HINT_THEME_CREATED ):
+ ImplInsertThemeEntry( mpGallery->GetThemeInfo( rGalleryHint.GetThemeName() ) );
+ break;
+
+ case( GALLERY_HINT_THEME_RENAMED ):
+ {
+ const USHORT nCurSelectPos = mpThemes->GetSelectEntryPos();
+ const USHORT nRenameEntryPos = mpThemes->GetEntryPos( rGalleryHint.GetThemeName() );
+
+ mpThemes->RemoveEntry( rGalleryHint.GetThemeName() );
+ ImplInsertThemeEntry( mpGallery->GetThemeInfo( rGalleryHint.GetStringData() ) );
+
+ if( nCurSelectPos == nRenameEntryPos )
+ {
+ mpThemes->SelectEntry( rGalleryHint.GetStringData() );
+ SelectThemeHdl( NULL );
+ }
+ }
+ break;
+
+ case( GALLERY_HINT_THEME_REMOVED ):
+ {
+ mpThemes->RemoveEntry( rGalleryHint.GetThemeName() );
+ }
+ break;
+
+ case( GALLERY_HINT_CLOSE_THEME ):
+ {
+ const USHORT nCurSelectPos = mpThemes->GetSelectEntryPos();
+ const USHORT nCloseEntryPos = mpThemes->GetEntryPos( rGalleryHint.GetThemeName() );
+
+ if( nCurSelectPos == nCloseEntryPos )
+ {
+ if( nCurSelectPos < ( mpThemes->GetEntryCount() - 1 ) )
+ mpThemes->SelectEntryPos( nCurSelectPos + 1 );
+ else if( nCurSelectPos )
+ mpThemes->SelectEntryPos( nCurSelectPos - 1 );
+ else
+ mpThemes->SetNoSelection();
+
+ SelectThemeHdl( NULL );
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser1::ShowContextMenu()
+{
+ Application::PostUserEvent( LINK( this, GalleryBrowser1, ShowContextMenuHdl ), this );
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( GalleryBrowser1, ShowContextMenuHdl, void*, p )
+{
+ PopupMenu aMenu( GAL_RESID( RID_SVXMN_GALLERY1 ) );
+
+ aMenu.SetSelectHdl( LINK( this, GalleryBrowser1, PopupMenuHdl ) );
+ aMenu.RemoveDisabledEntries();
+ aMenu.Execute( this, GetPointerPosPixel() );
+
+ return 0L;
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( GalleryBrowser1, PopupMenuHdl, Menu*, pMenu )
+{
+ const USHORT nId = pMenu->GetCurItemId();
+
+ switch( nId )
+ {
+ case( MN_ACTUALIZE ):
+ {
+ GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this );
+ ActualizeProgress aActualizeProgress( this, pTheme );
+
+ aActualizeProgress.Update();
+ aActualizeProgress.Execute();
+ mpGallery->ReleaseTheme( pTheme, *this );
+ }
+ break;
+
+ case( MN_DELETE ):
+ {
+ mpGallery->RemoveTheme( mpThemes->GetSelectEntry() );
+ }
+ break;
+
+ case( MN_RENAME ):
+ {
+ GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this );
+ const String aOldName( pTheme->GetName() );
+ TitleDialog aDlg( this, aOldName );
+
+ if( aDlg.Execute() == RET_OK )
+ {
+ const String aNewName( aDlg.GetTitle() );
+
+ if( aNewName != aOldName )
+ {
+ String aName( aNewName );
+ USHORT nCount = 0;
+
+ while( mpGallery->HasTheme( aName ) && ( nCount++ < 16000 ) )
+ {
+ aName = aNewName;
+ aName += ' ';
+ aName += String::CreateFromInt32( nCount );
+ }
+
+ mpGallery->RenameTheme( aOldName, aName );
+ }
+ }
+
+ mpGallery->ReleaseTheme( pTheme, *this );
+ }
+ break;
+
+ case( MN_PROPERTIES ):
+ {
+ SfxItemSet aSet( SFX_APP()->GetPool() );
+ GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this );
+ ExchangeData aData; ImplFillExchangeData( pTheme, aData );
+ GalleryThemeProperties aThemeProps( NULL, &aData, &aSet );
+
+ if( RET_OK == aThemeProps.Execute() )
+ {
+ String aName( pTheme->GetName() );
+
+ if( aName != aData.aEditedTitle )
+ {
+ const String aOldName( aName );
+ String aName( aData.aEditedTitle );
+ USHORT nCount = 0;
+
+ while( mpGallery->HasTheme( aName ) && ( nCount++ < 16000 ) )
+ {
+ aName = aData.aEditedTitle;
+ aName += ' ';
+ aName += String::CreateFromInt32( nCount );
+ }
+
+ mpGallery->RenameTheme( aOldName, aName );
+ }
+ }
+
+ mpGallery->ReleaseTheme( pTheme, *this );
+ }
+ break;
+ }
+
+ return 0L;
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( GalleryBrowser1, SelectThemeHdl, void*, p )
+{
+ ( (GalleryBrowser*) GetParent() )->ThemeSelectionHasChanged();
+
+ return 0L;
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( GalleryBrowser1, ClickNewThemeHdl, void*, p )
+{
+ String aNewTheme( GAL_RESID( RID_SVXSTR_GALLERY_NEWTHEME ) );
+ String aName( aNewTheme );
+ ULONG nCount = 0;
+
+ while( mpGallery->HasTheme( aName ) && ( nCount++ < 16000 ) )
+ {
+ aName = aNewTheme;
+ aName += ' ';
+ aName += String::CreateFromInt32( nCount );
+ }
+
+ if( !mpGallery->HasTheme( aName ) && mpGallery->CreateTheme( aName ) )
+ {
+ GalleryTheme* pTheme = mpGallery->AcquireTheme( aName, *this );
+ SfxItemSet aSet( SFX_APP()->GetPool() );
+ ExchangeData aData; ImplFillExchangeData( pTheme, aData );
+ GalleryThemeProperties aThemeProps( NULL, &aData, &aSet );
+
+ if( RET_OK == aThemeProps.Execute() )
+ {
+ String aName( pTheme->GetName() );
+
+ if( aName != aData.aEditedTitle )
+ {
+ const String aOldName( aName );
+ String aName( aData.aEditedTitle );
+ USHORT nCount = 0;
+
+ while( mpGallery->HasTheme( aName ) && ( nCount++ < 16000 ) )
+ {
+ aName = aData.aEditedTitle;
+ aName += ' ';
+ aName += String::CreateFromInt32( nCount );
+ }
+
+ mpGallery->RenameTheme( aOldName, aName );
+ }
+
+ mpThemes->SelectEntry( pTheme->GetName() );
+ SelectThemeHdl( NULL );
+ mpGallery->ReleaseTheme( pTheme, *this );
+ }
+ else
+ {
+ mpGallery->ReleaseTheme( pTheme, *this );
+ mpGallery->RemoveTheme( aName );
+ }
+ }
+
+ return 0L;
+}
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
new file mode 100644
index 0000000000..590abfa092
--- /dev/null
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * $RCSfile: galbrws1.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <vcl/lstbox.hxx>
+#include <vcl/button.hxx>
+#include "galbrws.hxx"
+
+// -----------------------
+// - GalleryThemeListBox -
+// -----------------------
+
+class GalleryThemeListBox : public ListBox
+{
+private:
+
+protected:
+
+ virtual long PreNotify( NotifyEvent& rNEvt );
+
+public:
+
+ GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWinBits );
+ ~GalleryThemeListBox();
+};
+
+// -------------------
+// - GalleryBrowser1 -
+// -------------------
+
+class Gallery;
+class GalleryThemeEntry;
+struct ExchangeData;
+
+class GalleryBrowser1 : public Control, SfxListener
+{
+ friend class GalleryThemeListBox;
+
+private:
+
+ PushButton maNewTheme;
+ GalleryThemeListBox* mpThemes;
+ Gallery* mpGallery;
+
+ void ImplAdjustControls();
+ ULONG ImplInsertThemeEntry( const GalleryThemeEntry* pEntry );
+ void ImplFillExchangeData( const GalleryTheme* pThm, ExchangeData& rData );
+
+ // Control
+ virtual void Resize();
+
+ // SfxListener
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ DECL_LINK( ClickNewThemeHdl, void* );
+ DECL_LINK( SelectThemeHdl, void* );
+ DECL_LINK( ShowContextMenuHdl, void* );
+ DECL_LINK( PopupMenuHdl, Menu* );
+
+public:
+
+ GalleryBrowser1( GalleryBrowser* pParent, const ResId& rResId, Gallery* pGallery );
+ ~GalleryBrowser1();
+
+ void SelectTheme( const String& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); }
+ void SelectTheme( ULONG nThemePos ) { mpThemes->SelectEntryPos( nThemePos ); SelectThemeHdl( NULL ); }
+ String GetSelectedTheme() { return mpThemes->GetEntryCount() ? mpThemes->GetEntry( mpThemes->GetSelectEntryPos() ) : String(); }
+
+ void ShowContextMenu();
+};
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
new file mode 100644
index 0000000000..179405f931
--- /dev/null
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -0,0 +1,856 @@
+/*************************************************************************
+ *
+ * $RCSfile: galbrws2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ITEMID_BRUSH 0
+
+#include <sot/formats.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/drag.hxx>
+#include <svtools/valueset.hxx>
+#include <svtools/urlbmk.hxx>
+#include <svtools/stritem.hxx>
+#include <svtools/intitem.hxx>
+#include <svtools/eitem.hxx>
+#include <sfx2/exchobj.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/sfxsids.hrc>
+#include "impgrf.hxx"
+#include "brshitem.hxx"
+#include "helpid.hrc"
+#include "gallery1.hxx"
+#include "galtheme.hxx"
+#include "galmisc.hxx"
+#include "galdlg.hxx"
+#include "galbrws2.hxx"
+
+// -------------------
+// - GalleryValueSet -
+// -------------------
+
+class GalleryValueSet : public ValueSet
+{
+private:
+
+ GalleryTheme* mpTheme;
+
+ virtual void UserDraw( const UserDrawEvent& rUDEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual BOOL QueryDrop( DropEvent& rEvt );
+ virtual BOOL Drop( const DropEvent& rEvt );
+
+public:
+
+ GalleryValueSet( GalleryBrowser2* pParent, GalleryTheme* pTheme, WinBits nWinStyle );
+ ~GalleryValueSet();
+};
+
+// ------------------------------------------------------------------------
+
+GalleryValueSet::GalleryValueSet( GalleryBrowser2* pParent, GalleryTheme* pTheme, WinBits nWinStyle ) :
+ ValueSet( pParent, nWinStyle ),
+ mpTheme ( pTheme )
+{
+ EnableDrop( TRUE );
+}
+
+// ------------------------------------------------------------------------
+
+GalleryValueSet::~GalleryValueSet()
+{
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryValueSet::UserDraw( const UserDrawEvent& rUDEvt )
+{
+ const USHORT nId = rUDEvt.GetItemId();
+
+ if( nId && mpTheme )
+ {
+ SgaObject* pObj = mpTheme->AcquireObject( nId - 1 );
+
+ if( pObj )
+ {
+ const Rectangle& rRect = rUDEvt.GetRect();
+ OutputDevice* pDev = rUDEvt.GetDevice();
+ Graphic aGraphic;
+
+ if( pObj->IsThumbBitmap() )
+ {
+ Bitmap aBmp( pObj->GetThumbBmp() );
+
+ if( pObj->GetObjKind() == SGA_OBJ_SOUND )
+ aBmp.Replace( COL_LIGHTMAGENTA, COL_WHITE );
+
+ aGraphic = aBmp;
+ }
+ else
+ aGraphic = pObj->GetThumbMtf();
+
+ Size aSize( pDev->LogicToPixel( aGraphic.GetPrefSize(), aGraphic.GetPrefMapMode() ) );
+
+ if ( aSize.Width() && aSize.Height() )
+ {
+ Point aNewPos;
+ const double fBmpWH = (double) aSize.Width() / aSize.Height();
+ const double fThmpWH = (double) rRect.GetWidth() / rRect.GetHeight();
+
+ // Bitmap an Thumbgroesse anpassen
+ if ( fBmpWH < fThmpWH )
+ {
+ aSize.Width() = (long) ( rRect.GetHeight() * fBmpWH );
+ aSize.Height()= rRect.GetHeight();
+ }
+ else
+ {
+ aSize.Width() = rRect.GetWidth();
+ aSize.Height()= (long) ( rRect.GetWidth() / fBmpWH );
+ }
+
+ const Point aPos( ( ( rRect.GetWidth() - aSize.Width() ) >> 1 ) + rRect.Left(),
+ ( ( rRect.GetHeight() - aSize.Height() ) >> 1 ) + rRect.Top() );
+
+ aGraphic.Draw( pDev, aPos, aSize );
+ }
+
+ String aItemText;
+
+ if( mpTheme->IsImported() )
+ {
+ INetURLObject aPathTmp( mpTheme->GetParent()->GetImportPath( mpTheme->GetName() ), INET_PROT_FILE );
+
+ aPathTmp.removeSegment();
+ aPathTmp.Append( INetURLObject( mpTheme->GetObjectPath( nId - 1 ), INET_PROT_FILE ).GetName() );
+ aItemText = aPathTmp.PathToFileName();
+ }
+ else
+ aItemText = mpTheme->GetObjectPath( nId - 1 );
+
+ if( pObj->GetTitle().Len() )
+ {
+ String aTitleItemText( pObj->GetTitle() );
+
+ if( pObj->GetObjKind() != SGA_OBJ_SVDRAW )
+ {
+ aTitleItemText += String( RTL_CONSTASCII_USTRINGPARAM( " (" ) );
+ aTitleItemText += aItemText;
+ aTitleItemText += ')';
+ }
+
+ aItemText = aTitleItemText;
+ }
+
+ SetItemText( nId, aItemText );
+ mpTheme->ReleaseObject( pObj );
+ }
+ }
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryValueSet::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ ValueSet::MouseButtonDown( rMEvt );
+ GetParent()->MouseButtonDown( rMEvt );
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryValueSet::Command( const CommandEvent& rCEvt )
+{
+ Region aRegion;
+
+ ValueSet::Command( rCEvt );
+ StartDrag( rCEvt, aRegion );
+ GetParent()->Command( rCEvt );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryValueSet::QueryDrop( DropEvent& rDEvt )
+{
+ return( GetParent()->QueryDrop( rDEvt ) );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryValueSet::Drop( const DropEvent& rDEvt )
+{
+ return( GetParent()->Drop( rDEvt ) );
+}
+
+// --------------------------
+// - GalleryBackgroundPopup -
+// --------------------------
+
+class GalleryBackgroundPopup : public PopupMenu, public SfxControllerItem
+{
+ const GalleryTheme* mpTheme;
+ ULONG mnObjectPos;
+
+ virtual void Select();
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+
+public:
+
+ GalleryBackgroundPopup( const GalleryTheme* pTheme, ULONG nObjectPos );
+ ~GalleryBackgroundPopup();
+};
+
+// ------------------------------------------------------------------------
+
+GalleryBackgroundPopup::GalleryBackgroundPopup( const GalleryTheme* pTheme, ULONG nObjectPos ) :
+ SfxControllerItem ( SID_GALLERY_BG_BRUSH, SFX_BINDINGS() ),
+ mpTheme ( pTheme ),
+ mnObjectPos ( nObjectPos )
+{
+ SFX_BINDINGS().Update( SID_GALLERY_BG_BRUSH );
+ RemoveDisabledEntries();
+}
+
+// ------------------------------------------------------------------------
+
+GalleryBackgroundPopup::~GalleryBackgroundPopup()
+{
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryBackgroundPopup::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pItem )
+{
+ if ( ( nSID == SID_GALLERY_BG_BRUSH ) && pItem && ( eState != SFX_ITEM_DISABLED ) )
+ {
+ SfxStringListItem* pStrLstItem;
+ SfxStringItem* pStrItem;
+
+ PopupMenu::Clear();
+
+ if( ( pStrLstItem = PTR_CAST( SfxStringListItem, pItem ) ) != NULL )
+ {
+ List* pList = pStrLstItem->GetList();
+
+ if( pList )
+ for ( ULONG i = 0, nCount = pList->Count(); i < nCount; i++ )
+ InsertItem( (USHORT) i + 1, *(String*) pList->GetObject( i ) );
+ }
+ else if( ( pStrItem = PTR_CAST( SfxStringItem, pItem ) ) != NULL )
+ InsertItem( 1, pStrItem->GetValue() );
+ else
+ {
+ DBG_ERROR( "SgaBGPopup::StateChanged(...): Wrong item type!" );
+ }
+ }
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryBackgroundPopup::Select()
+{
+ Menu::Select();
+
+ const String aFilePath( mpTheme->GetObjectPath( mnObjectPos ) );
+ const SvxBrushItem aBrushItem( aFilePath, String(), GPOS_TILED, SID_GALLERY_BG_BRUSH );
+ const SfxUInt16Item aPosItem( SID_GALLERY_BG_POS, GetCurItemId() - 1 );
+ const SfxStringItem aPathItem( SID_FILE_NAME, aFilePath );
+
+ SFX_DISPATCHER().Execute( SID_GALLERY_BG_BRUSH,
+ SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
+ &aBrushItem, &aPosItem, &aPathItem, 0L );
+}
+
+// ---------------------
+// - GalleryThemePopup -
+// ---------------------
+
+class GalleryThemePopup : public PopupMenu, public SfxControllerItem
+{
+ GalleryBackgroundPopup maBackgroundPopup;
+ const GalleryTheme* mpTheme;
+ ULONG mnObjectPos;
+ BOOL mbPreview;
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+
+public:
+
+ GalleryThemePopup( const GalleryTheme* pTheme, ULONG nObjectPos, BOOL bPreview );
+ ~GalleryThemePopup();
+};
+
+// ------------------------------------------------------------------------
+
+GalleryThemePopup::GalleryThemePopup( const GalleryTheme* pTheme, ULONG nObjectPos, BOOL bPreview ) :
+ PopupMenu ( GAL_RESID( RID_SVXMN_GALLERY2 ) ),
+ SfxControllerItem ( SID_GALLERY_ENABLE_ADDCOPY, SFX_BINDINGS() ),
+ maBackgroundPopup ( pTheme, nObjectPos ),
+ mpTheme ( pTheme ),
+ mnObjectPos ( nObjectPos ),
+ mbPreview ( bPreview )
+{
+ const SgaObjKind eObjKind = mpTheme->GetObjectKind( mnObjectPos );
+ PopupMenu* pAddMenu = GetPopupMenu( MN_ADDMENU );
+ SfxBindings& rBindings = SFX_BINDINGS();
+
+ pAddMenu->EnableItem( MN_ADD_LINK, SGA_OBJ_SVDRAW != eObjKind );
+ CheckItem( MN_PREVIEW, mbPreview );
+
+ if( mpTheme->IsReadOnly() || !mpTheme->GetObjectCount() )
+ {
+ EnableItem( MN_DELETE, FALSE );
+ EnableItem( MN_TITLE, FALSE );
+ }
+ else
+ {
+ EnableItem( MN_DELETE, !bPreview );
+ EnableItem( MN_TITLE, TRUE );
+ }
+
+ if( !maBackgroundPopup.GetItemCount() || ( eObjKind == SGA_OBJ_SVDRAW ) )
+ pAddMenu->EnableItem( MN_BACKGROUND, FALSE );
+ else
+ {
+ pAddMenu->EnableItem( MN_BACKGROUND, TRUE );
+ pAddMenu->SetPopupMenu( MN_BACKGROUND, &maBackgroundPopup );
+ }
+
+ rBindings.Update( SID_GALLERY_ENABLE_ADDCOPY );
+ RemoveDisabledEntries();
+}
+
+// ------------------------------------------------------------------------
+
+GalleryThemePopup::~GalleryThemePopup()
+{
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryThemePopup::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pItem )
+{
+ if( ( nSID == SID_GALLERY_ENABLE_ADDCOPY ) && pItem && ( eState != SFX_ITEM_DISABLED ) )
+ {
+ SfxBoolItem* pBoolItem = PTR_CAST( SfxBoolItem, pItem );
+ DBG_ASSERT( pBoolItem || pBoolItem == 0, "SfxBoolItem erwartet!");
+ GetPopupMenu( MN_ADDMENU )->EnableItem( MN_ADD, pBoolItem->GetValue() );
+ }
+}
+
+// -------------------
+// - GalleryBrowser2 -
+// -------------------
+
+GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, Gallery* pGallery ) :
+ Control ( pParent, rResId ),
+ mpGallery ( pGallery ),
+ mpCurTheme ( NULL ),
+ mpValueSet ( NULL ),
+ mpPreview ( NULL ),
+ mnCurActionPos ( 0xffffffff ),
+ mbIsPreview ( FALSE ),
+ mbCurActionIsLinkage( FALSE )
+{
+}
+
+// -----------------------------------------------------------------------------
+
+GalleryBrowser2::~GalleryBrowser2()
+{
+ delete mpPreview;
+ delete mpValueSet;
+
+ if( mpCurTheme )
+ mpGallery->ReleaseTheme( mpCurTheme, *this );
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser2::Resize()
+{
+ Control::Resize();
+
+ const Size aOutSize( GetOutputSizePixel() );
+ USHORT nSelLine = 0;
+ USHORT nSelectId = 1;
+ USHORT nColCount = mpValueSet->GetColCount();
+
+ // Valueset und Preview-Fenster in der Groesse anpassen
+ if( mbIsPreview )
+ mpPreview->Hide();
+ else if( nColCount )
+ {
+ nSelectId = mpValueSet->GetSelectItemId();
+ nSelLine = (nSelectId - 1) / nColCount - mpValueSet->GetFirstLine();
+ mpValueSet->Hide();
+ }
+ else
+ mpValueSet->Hide();
+
+ mpValueSet->SetColCount( nColCount = Max( (USHORT) ( aOutSize.Width() / 80 ), (USHORT) 1 ) );
+ mpValueSet->SetLineCount( Max( (USHORT) ( aOutSize.Height() / 70 ), (USHORT) 1 ) );
+ mpValueSet->SetSizePixel( aOutSize );
+ mpPreview->SetSizePixel( aOutSize );
+
+ if( mbIsPreview )
+ mpPreview->Show();
+ else
+ {
+ USHORT nFirstLine = ( nSelectId - 1 ) / nColCount;
+
+ nSelLine = Min( (USHORT) nSelLine, (USHORT) ( mpValueSet->GetLineCount() - 1 ) );
+
+ if( nFirstLine > nSelLine )
+ nFirstLine -= nSelLine;
+
+ mpValueSet->SetFirstLine( nFirstLine );
+ mpValueSet->Show();
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser2::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ const GalleryHint& rGalleryHint = (const GalleryHint&) rHint;
+
+ switch( rGalleryHint.GetType() )
+ {
+ case( GALLERY_HINT_THEME_UPDATEVIEW ):
+ ImplUpdateValueSet( rGalleryHint.GetData1() + 1 );
+ break;
+
+ default:
+ break;
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser2::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if( rMEvt.GetClicks() > 1 )
+ ShowPreview( !mbIsPreview );
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser2::Command( const CommandEvent& rCEvt )
+{
+ const USHORT nId = mbIsPreview ? mpValueSet->GetSelectItemId() : mpValueSet->GetItemId( rCEvt.GetMousePosPixel() );
+
+ if( rCEvt.GetCommand() == COMMAND_STARTDRAG )
+ {
+ SgaDataObjectRef xDataObject( new SgaDataObject( mpCurTheme, nId - 1 ) );
+ Region aRegion( mpValueSet->GetItemRect( nId ) );
+ const DropAction eAction = xDataObject->ExecuteDrag( NULL,
+ POINTER_MOVEDATA, POINTER_COPYDATA, POINTER_LINKDATA,
+ DRAG_COPYABLE | DRAG_LINKABLE /*| DRAG_MOVEABLE*/,
+ &aRegion );
+ }
+ else if( ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) && rCEvt.IsMouseEvent() && mpCurTheme )
+ {
+ if( !mbIsPreview )
+ mpValueSet->SelectItem( nId );
+
+ SfxBindings& rBindings = SFX_BINDINGS();
+ rBindings.ENTERREGISTRATIONS();
+ GalleryThemePopup aMenu( mpCurTheme, nId - 1, mbIsPreview );
+ rBindings.LEAVEREGISTRATIONS();
+ aMenu.SetSelectHdl( LINK( this, GalleryBrowser2, MenuSelectHdl ) );
+ aMenu.Execute( this, rCEvt.GetMousePosPixel() );
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryBrowser2::QueryDrop( DropEvent& rDEvt )
+{
+ BOOL bRet = FALSE;
+
+ if( mpCurTheme && !mpCurTheme->IsReadOnly() && !mpCurTheme ->IsImported() )
+ {
+ bRet = mpCurTheme->IsDragging();
+
+ if( !bRet )
+ {
+ USHORT i = 0, nCount = DragServer::GetItemCount();
+
+ while( !bRet && ( i < nCount ) )
+ {
+ bRet = DragServer::HasFormat( i, FORMAT_BITMAP ) ||
+ DragServer::HasFormat( i, FORMAT_GDIMETAFILE ) ||
+ DragServer::HasFormat( i, FORMAT_FILE ) ||
+ DragServer::HasFormat( i, SOT_FORMATSTR_ID_SVXB ) ||
+ DragServer::HasFormat( i, SOT_FORMATSTR_ID_DRAWING ) ||
+ INetBookmark::DragServerHasFormat( i );
+
+ i++;
+ }
+
+ if( rDEvt.IsDefaultAction() )
+ rDEvt.SetAction( DROP_COPY );
+ }
+ else if( rDEvt.IsDefaultAction() )
+ rDEvt = DropEvent( rDEvt.GetPosPixel(), rDEvt.GetData(), DROP_MOVE, DROP_MOVE, rDEvt.GetWindowType(), rDEvt.IsDefaultAction() );
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryBrowser2::Drop( const DropEvent& rDEvt )
+{
+ BOOL bRet = FALSE;
+
+ if( mpCurTheme )
+ {
+ const USHORT nItemId = mbIsPreview ? mpValueSet->GetSelectItemId() : mpValueSet->GetItemId( rDEvt.GetPosPixel() );
+ const ULONG nInsertPos = ( nItemId ? ( nItemId - 1 ) : LIST_APPEND );
+
+ if( mpCurTheme->IsDragging() )
+ mpCurTheme->ChangeObjectPos( mpCurTheme->GetDragPos(), nInsertPos );
+ else
+ mpCurTheme->InsertDataXChgData( SvDataObject::PasteDragServer( rDEvt ) );
+
+ bRet = FALSE;
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser2::SelectTheme( const String& rThemeName )
+{
+ delete mpValueSet, mpValueSet = NULL;
+ delete mpPreview, mpPreview = NULL;
+ mbIsPreview = FALSE;
+
+ if( mpCurTheme )
+ mpGallery->ReleaseTheme( mpCurTheme, *this );
+
+ mpCurTheme = mpGallery->AcquireTheme( rThemeName, *this );
+
+ mpValueSet = new GalleryValueSet( this, mpCurTheme, WB_3DLOOK | WB_BORDER | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_VSCROLL );
+ mpValueSet->SetHelpId( HID_GALLERY_WINDOW );
+ mpValueSet->SetPosSizePixel( Point(), GetOutputSizePixel() );
+ mpValueSet->SetSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) );
+ mpValueSet->SetDoubleClickHdl( LINK( this, GalleryBrowser2, DoubleClickObjectHdl ) );
+ mpValueSet->SetColCount( 3 );
+ mpValueSet->SetLineCount( 3 );
+ mpValueSet->SetExtraSpacing( 2 );
+
+ mpPreview = new GalleryPreview( this, WB_BORDER ),
+ mpPreview->SetHelpId( HID_GALLERY_WINDOW );
+ mpPreview->Show( FALSE );
+
+ ImplUpdateValueSet( 1 );
+ Resize();
+ mpValueSet->Show( TRUE );
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser2::ShowPreview( BOOL bShow )
+{
+ if( mpCurTheme && mpValueSet && mpPreview )
+ {
+ if( mbIsPreview && !bShow )
+ {
+ mpPreview->Show( FALSE );
+ mpValueSet->Show( TRUE );
+
+ mpPreview->SetGraphic( Graphic() );
+ mpPreview->PreviewSound( String() );
+
+ mbIsPreview = FALSE;
+ }
+ else if( !mbIsPreview && bShow )
+ {
+ Graphic aGraphic;
+ const ULONG nPos = mpValueSet->GetSelectItemId() - 1;
+
+ if( mpCurTheme->GetGraphic( nPos, aGraphic ) &&
+ aGraphic.GetType() != GRAPHIC_NONE )
+ {
+ mpPreview->SetGraphic( aGraphic );
+
+ mpValueSet->Show( FALSE );
+ mpPreview->Show( TRUE );
+
+ if( mpCurTheme->GetObjectKind( nPos ) == SGA_OBJ_SOUND )
+ mpPreview->PreviewSound( mpCurTheme->GetObjectPath( nPos ) );
+
+ mbIsPreview = TRUE;
+ }
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryBrowser2::ImplUpdateValueSet( USHORT nSelectionId )
+{
+ USHORT nCurItemId = mpValueSet->GetSelectItemId();
+ USHORT nItem = ( ( nSelectionId > mpValueSet->GetItemCount() ) ? mpValueSet->GetItemCount() : nSelectionId );
+
+ mpValueSet->Clear();
+ mpPreview->Show( FALSE);
+
+ if( mpCurTheme )
+ {
+ for( ULONG i = 0, nCount = mpCurTheme->GetObjectCount(); i < nCount; )
+ mpValueSet->InsertItem( ++i );
+ }
+
+ mpValueSet->SelectItem( nItem );
+}
+
+// -----------------------------------------------------------------------------
+
+INetURLObject GalleryBrowser2::GetURL() const
+{
+ INetURLObject aURL;
+
+ if( mpCurTheme && mnCurActionPos != 0xffffffff )
+ aURL.SetSmartURL( mpCurTheme->GetObjectPath( mnCurActionPos ) );
+
+ return aURL;
+}
+
+// -----------------------------------------------------------------------------
+
+String GalleryBrowser2::GetFilterName() const
+{
+ String aFilterName;
+
+ if( mpCurTheme && mnCurActionPos != 0xffffffff )
+ {
+ const SgaObjKind eObjKind = mpCurTheme->GetObjectKind( mnCurActionPos );
+
+ if( ( SGA_OBJ_BMP == eObjKind ) || ( SGA_OBJ_ANIM == eObjKind ) )
+ {
+ GraphicFilter* pFilter = GetGrfFilter();
+ INetURLObject aURL; mpCurTheme->GetURL( mnCurActionPos, aURL );
+ const String aExt( aURL.GetExtension() );
+ Config& rConfig = pFilter->GetConfig();
+ const ByteString aOldGroup( rConfig.GetGroup() );
+ USHORT nFilter = GRFILTER_FORMAT_DONTKNOW;
+
+ rConfig.SetGroup( IMP_FILTERSECTION );
+
+ for( USHORT i = 0, nKeyCount = rConfig.GetKeyCount(); i < nKeyCount; i++ )
+ {
+ const String aStr( rConfig.ReadKey( i ).GetToken(2, ',').GetBuffer(), RTL_TEXTENCODING_UTF8 );
+
+ if( aStr.CompareIgnoreCaseToAscii( aExt ) == COMPARE_EQUAL )
+ {
+ nFilter = i;
+ break;
+ }
+ }
+
+ if( GRFILTER_FORMAT_DONTKNOW != nFilter )
+ aFilterName = pFilter->GetImportFormatName( nFilter );
+
+ rConfig.SetGroup( aOldGroup );
+ }
+ }
+
+ return aFilterName;
+}
+
+// -----------------------------------------------------------------------------
+
+Graphic GalleryBrowser2::GetGraphic() const
+{
+ Graphic aGraphic;
+
+ if( mpCurTheme && mnCurActionPos != 0xffffffff )
+ mpCurTheme->GetGraphic( mnCurActionPos, aGraphic );
+
+ return aGraphic;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryBrowser2::GetVCDrawModel( FmFormModel& rModel ) const
+{
+ BOOL bRet = FALSE;
+
+ if( mpCurTheme && mnCurActionPos != 0xffffffff )
+ bRet = mpCurTheme->GetModel( mnCurActionPos, rModel );
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryBrowser2::IsLinkage() const
+{
+ return mbCurActionIsLinkage;
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( GalleryBrowser2, MenuSelectHdl, Menu*, pMenu )
+{
+ if( pMenu )
+ {
+ const USHORT nId = pMenu->GetCurItemId();
+
+ mnCurActionPos = mpValueSet->GetSelectItemId() - 1;
+
+ switch( nId )
+ {
+ case( MN_ADD ):
+ case( MN_ADD_LINK ):
+ {
+ sal_uInt32 nFormat;
+
+ mbCurActionIsLinkage = ( MN_ADD_LINK == nId );
+
+ switch( mpCurTheme->GetObjectKind( mnCurActionPos ) )
+ {
+ case( SGA_OBJ_BMP ):
+ case( SGA_OBJ_ANIM ):
+ case( SGA_OBJ_INET ):
+ nFormat = SGA_FORMAT_GRAPHIC | SGA_FORMAT_STRING;
+ break;
+
+ case ( SGA_OBJ_SOUND ) :
+ nFormat = SGA_FORMAT_SOUND | SGA_FORMAT_STRING;
+ break;
+
+ case( SGA_OBJ_SVDRAW ):
+ nFormat = SGA_FORMAT_GRAPHIC | SGA_FORMAT_SVDRAW | SGA_FORMAT_STRING;
+ break;
+
+ default :
+ break;
+ }
+
+ const SfxUInt32Item aItem( SID_GALLERY_FORMATS, nFormat );
+ SFX_DISPATCHER().Execute( SID_GALLERY_FORMATS, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
+ }
+ break;
+
+ case( MN_PREVIEW ):
+ ShowPreview( !mbIsPreview );
+ break;
+
+ case( MN_DELETE ):
+ {
+ if( !mpCurTheme->IsReadOnly() &&
+ QueryBox( this, WB_YES_NO, String( GAL_RESID( RID_SVXSTR_GALLERY_DELETEOBJ ) ) ).Execute() == RET_YES )
+ {
+ mpCurTheme->RemoveObject( mnCurActionPos );
+ }
+ }
+ break;
+
+ case( MN_TITLE ):
+ {
+ SgaObject* pObj = mpCurTheme->AcquireObject( mnCurActionPos );
+
+ if( pObj )
+ {
+ TitleDialog aDlg( this, pObj->GetTitle() );
+
+ if( aDlg.Execute() == RET_OK )
+ {
+ const String aNewTitle( aDlg.GetTitle() );
+
+ if( aNewTitle != pObj->GetTitle() )
+ {
+ pObj->SetTitle( aNewTitle );
+ mpCurTheme->InsertObject( *pObj );
+ }
+ }
+
+ mpCurTheme->ReleaseObject( pObj );
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( GalleryBrowser2, SelectObjectHdl, void*, p )
+{
+ return 0L;
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( GalleryBrowser2, DoubleClickObjectHdl, void*, p )
+{
+ return 0L;
+}
diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx
new file mode 100644
index 0000000000..ab32026d59
--- /dev/null
+++ b/svx/source/gallery2/galexpl.cxx
@@ -0,0 +1,490 @@
+/*************************************************************************
+ *
+ * $RCSfile: galexpl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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/inimgr.hxx>
+#include <sfx2/viewfrm.hxx>
+#include "gallery1.hxx"
+#include "galtheme.hxx"
+#include "galbrws.hxx"
+#include "gallery.hxx"
+
+// -----------
+// - Statics -
+// -----------
+
+static SfxListener aDummyListener;
+
+// -------------------
+// - GalleryExplorer -
+// -------------------
+
+Gallery* GalleryExplorer::ImplGetGallery()
+{
+ static Gallery* pGallery = NULL;
+
+ if( !pGallery )
+ pGallery = Gallery::AcquireGallery( SFX_INIMANAGER()->Get( SFX_KEY_GALLERY_DIR ) );
+
+ return pGallery;
+}
+
+// ------------------------------------------------------------------------
+
+GalleryExplorer* GalleryExplorer::GetGallery()
+{
+ static GalleryExplorer* pThis = NULL;
+
+ // only create a dummy object which can be accessed
+ if( !pThis )
+ pThis = new GalleryExplorer;
+
+ return pThis;
+}
+
+// ------------------------------------------------------------------------
+
+INetURLObject GalleryExplorer::GetURL() const
+{
+ return GALLERYBROWSER()->GetURL();
+}
+
+String GalleryExplorer::GetFilterName() const
+{
+ return GALLERYBROWSER()->GetFilterName();
+}
+
+// ------------------------------------------------------------------------
+
+Graphic GalleryExplorer::GetGraphic() const
+{
+ return GALLERYBROWSER()->GetGraphic();
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::GetVCDrawModel( FmFormModel& rModel ) const
+{
+ return GALLERYBROWSER()->GetVCDrawModel( rModel );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::IsLinkage() const
+{
+ return GALLERYBROWSER()->IsLinkage();
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::FillThemeList( List& rThemeList )
+{
+ Gallery* pGal = ImplGetGallery();
+
+ if( pGal )
+ {
+ for( ULONG i = 0, nCount = pGal->GetThemeCount(); i < nCount; i++ )
+ {
+ const GalleryThemeEntry* pEntry = pGal->GetThemeInfo( i );
+
+ if( pEntry && !pEntry->IsReadOnly() && !pEntry->IsHidden() )
+ rThemeList.Insert( new String( pEntry->GetThemeName() ), LIST_APPEND );
+ }
+ }
+
+ return( rThemeList.Count() > 0 );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::FillObjList( const String& rThemeName, List& rObjList )
+{
+ Gallery* pGal = ImplGetGallery();
+
+ if( pGal )
+ {
+ GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aDummyListener );
+
+ if( pTheme )
+ {
+ for( ULONG i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ )
+ rObjList.Insert( new String( pTheme->GetObjectPath( i ) ), LIST_APPEND );
+
+ pGal->ReleaseTheme( pTheme, aDummyListener );
+ }
+ }
+
+ return( rObjList.Count() > 0 );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::FillObjList( ULONG nThemeId, List& rObjList )
+{
+ Gallery* pGal = ImplGetGallery();
+ return( pGal ? FillObjList( pGal->GetThemeName( nThemeId ), rObjList ) : FALSE );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::InsertURL( const String& rThemeName, const String& rURL )
+{
+ return InsertURL( rThemeName, rURL, SGA_FORMAT_ALL );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::InsertURL( ULONG nThemeId, const String& rURL )
+{
+ return InsertURL( nThemeId, rURL, SGA_FORMAT_ALL );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::InsertURL( const String& rThemeName, const String& rURL, const ULONG nSgaFormat )
+{
+ Gallery* pGal = ImplGetGallery();
+ BOOL bRet = FALSE;
+
+ if( pGal )
+ {
+ GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aDummyListener );
+
+ if( pTheme )
+ {
+ bRet = pTheme->InsertURL( INetURLObject( rURL, INET_PROT_FILE ) );
+ pGal->ReleaseTheme( pTheme, aDummyListener );
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::InsertURL( ULONG nThemeId, const String& rURL, const ULONG nSgaFormat )
+{
+ Gallery* pGal = ImplGetGallery();
+ return( pGal ? InsertURL( pGal->GetThemeName( nThemeId ), rURL, nSgaFormat ) : FALSE );
+}
+
+// ------------------------------------------------------------------------
+
+ULONG GalleryExplorer::GetObjCount( const String& rThemeName )
+{
+ Gallery* pGal = ImplGetGallery();
+ ULONG nRet = 0;
+
+ if( pGal )
+ {
+ GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aDummyListener );
+
+ if( pTheme )
+ {
+ nRet = pTheme->GetObjectCount();
+ pGal->ReleaseTheme( pTheme, aDummyListener );
+ }
+ }
+
+ return nRet;
+}
+
+// ------------------------------------------------------------------------
+
+ULONG GalleryExplorer::GetObjCount( ULONG nThemeId )
+{
+ Gallery* pGal = ImplGetGallery();
+ return( pGal ? GetObjCount( pGal->GetThemeName( nThemeId ) ) : FALSE );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::GetGraphicObj( const String& rThemeName, ULONG nPos,
+ Graphic* pGraphic, Bitmap* pThumb,
+ BOOL bProgress )
+{
+ Gallery* pGal = ImplGetGallery();
+ BOOL bRet = FALSE;
+
+ if( pGal )
+ {
+ GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aDummyListener );
+
+ if( pTheme )
+ {
+ if( pGraphic )
+ bRet = bRet || pTheme->GetGraphic( nPos, *pGraphic, bProgress );
+
+ if( pThumb )
+ bRet = bRet || pTheme->GetThumb( nPos, *pThumb, bProgress );
+
+ pGal->ReleaseTheme( pTheme, aDummyListener );
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::GetGraphicObj( ULONG nThemeId, ULONG nPos,
+ Graphic* pGraphic, Bitmap* pThumb,
+ BOOL bProgress )
+{
+ Gallery* pGal = ImplGetGallery();
+ return( pGal ? GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic, pThumb, bProgress ) : FALSE );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::InsertGraphicObj( const String& rThemeName, const Graphic& rGraphic )
+{
+ Gallery* pGal = ImplGetGallery();
+ BOOL bRet = FALSE;
+
+ if( pGal )
+ {
+ GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aDummyListener );
+
+ if( pTheme )
+ {
+ bRet = pTheme->InsertGraphic( rGraphic );
+ pGal->ReleaseTheme( pTheme, aDummyListener );
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::InsertGraphicObj( ULONG nThemeId, const Graphic& rGraphic )
+{
+ Gallery* pGal = ImplGetGallery();
+ return( pGal ? InsertGraphicObj( pGal->GetThemeName( nThemeId ), rGraphic ) : FALSE );
+}
+
+// ------------------------------------------------------------------------
+
+ULONG GalleryExplorer::GetSdrObjCount( const String& rThemeName )
+{
+ Gallery* pGal = ImplGetGallery();
+ ULONG nRet = 0;
+
+ if( pGal )
+ {
+ GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aDummyListener );
+
+ if( pTheme )
+ {
+ for( ULONG i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ )
+ if( SGA_OBJ_SVDRAW == pTheme->GetObjectKind( i ) )
+ nRet++;
+
+ pGal->ReleaseTheme( pTheme, aDummyListener );
+ }
+ }
+
+ return nRet;
+}
+
+// ------------------------------------------------------------------------
+
+ULONG GalleryExplorer::GetSdrObjCount( ULONG nThemeId )
+{
+ Gallery* pGal = ImplGetGallery();
+ return( pGal ? GetSdrObjCount( pGal->GetThemeName( nThemeId ) ) : FALSE );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::GetSdrObj( const String& rThemeName, ULONG nSdrModelPos,
+ FmFormModel* pModel, Bitmap* pThumb )
+{
+ Gallery* pGal = ImplGetGallery();
+ BOOL bRet = FALSE;
+
+ if( pGal )
+ {
+ GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aDummyListener );
+
+ if( pTheme )
+ {
+ BOOL bFound = FALSE;
+
+ for( ULONG i = 0, nCount = pTheme->GetObjectCount(), nActPos = 0; ( i < nCount ) && !bRet; i++ )
+ {
+ if( SGA_OBJ_SVDRAW == pTheme->GetObjectKind( i ) )
+ {
+ if( nActPos++ == nSdrModelPos )
+ {
+ if( pModel )
+ {
+ ULONG nStmErr = ERRCODE_NONE;
+ bRet = bRet || pTheme->GetModel( i, *pModel, nStmErr );
+ }
+
+ if( pThumb )
+ bRet = bRet || pTheme->GetThumb( i, *pThumb );
+ }
+ }
+ }
+
+ pGal->ReleaseTheme( pTheme, aDummyListener );
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::GetSdrObj( ULONG nThemeId, ULONG nSdrModelPos,
+ FmFormModel* pModel, Bitmap* pThumb )
+{
+ Gallery* pGal = ImplGetGallery();
+ return( pGal ? GetSdrObj( pGal->GetThemeName( nThemeId ), nSdrModelPos, pModel, pThumb ) : FALSE );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::InsertSdrObj( const String& rThemeName, FmFormModel& rModel )
+{
+ Gallery* pGal = ImplGetGallery();
+ BOOL bRet = FALSE;
+
+ if( pGal )
+ {
+ GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aDummyListener );
+
+ if( pTheme )
+ {
+ bRet = pTheme->InsertModel( rModel );
+ pGal->ReleaseTheme( pTheme, aDummyListener );
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryExplorer::InsertSdrObj( ULONG nThemeId, FmFormModel& rModel )
+{
+ Gallery* pGal = ImplGetGallery();
+ return( pGal ? InsertSdrObj( pGal->GetThemeName( nThemeId ), rModel ) : FALSE );
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryExplorer::BeginLocking( const String& rThemeName )
+{
+ Gallery* pGal = ImplGetGallery();
+ BOOL bRet = FALSE;
+
+ if( pGal )
+ {
+ GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aDummyListener );
+
+ if( pTheme )
+ bRet = TRUE;
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryExplorer::BeginLocking( ULONG nThemeId )
+{
+ Gallery* pGal = ImplGetGallery();
+ return( pGal ? BeginLocking( pGal->GetThemeName( nThemeId ) ) : FALSE );
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryExplorer::EndLocking( const String& rThemeName )
+{
+ Gallery* pGal = ImplGetGallery();
+ BOOL bRet = FALSE;
+
+ if( pGal )
+ {
+ GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aDummyListener );
+
+ if( pTheme )
+ {
+ // release twice ( 1. acquired theme, 2. locked theme )
+ pGal->ReleaseTheme( pTheme, aDummyListener );
+ pGal->ReleaseTheme( pTheme, aDummyListener );
+ bRet = TRUE;
+ }
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryExplorer::EndLocking( ULONG nThemeId )
+{
+ Gallery* pGal = ImplGetGallery();
+ return( pGal ? EndLocking( pGal->GetThemeName( nThemeId ) ) : FALSE );
+}
diff --git a/svx/source/gallery2/gallery.src b/svx/source/gallery2/gallery.src
new file mode 100644
index 0000000000..24454eae3e
--- /dev/null
+++ b/svx/source/gallery2/gallery.src
@@ -0,0 +1,2342 @@
+/*************************************************************************
+ *
+ * $RCSfile: gallery.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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/sfxsids.hrc>
+#include "helpid.hrc"
+#include "gallery.hrc"
+
+/******************************************************************************/
+
+DockingWindow RID_SVXDLG_GALLERYBROWSER
+{
+ HelpId = SID_GALLERY;
+ OutputSize = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 211, 150 ) ;
+ Text = "Gallery";
+ Text [ ENGLISH ] = "Gallery";
+ Sizeable = TRUE;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Dockable = TRUE ;
+ EnableResizing = TRUE ;
+
+ Control GALLERY_BROWSER1
+ {
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 69, 150 ) ;
+ Border = FALSE;
+ };
+
+ Splitter GALLERY_SPLITTER
+ {
+ Pos = MAP_APPFONT ( 70 , 0 ) ;
+ Size = MAP_APPFONT ( 3, 150 ) ;
+ HScroll = TRUE;
+ };
+
+ Control GALLERY_BROWSER2
+ {
+ Pos = MAP_APPFONT ( 73, 0 ) ;
+ Size = MAP_APPFONT ( 138, 150 ) ;
+ Border = FALSE;
+ };
+};
+
+
+/******************************************************************************/
+
+TabDialog RID_SVXTABDLG_GALLERY
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Text = "Eigenschaften von " ;
+ Text [ ENGLISH ] = "Settings of " ;
+ Text [ dutch ] = "Eigenschappen van " ;
+ Text [ english_us ] = "Properties of " ;
+ Text [ italian ] = "Proprietà di " ;
+ Text [ spanish ] = "Propiedades de " ;
+ Text [ french ] = "Propriétés de " ;
+ Text [ swedish ] = "Egenskaper för " ;
+ Text [ danish ] = "Egenskaber af " ;
+ Text [ portuguese ] = "Propriedades de " ;
+ Text [ portuguese_brazilian ] = "Eigenschaften von " ;
+ Moveable = TRUE ;
+ TabControl 1
+ {
+ OutputSize = TRUE ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXTABPAGE_GALLERY_GENERAL ;
+ Text = "Allgemein" ;
+ Text [ ENGLISH ] = "Common" ;
+ Text [ english_us ] = "General" ;
+ Text [ dutch ] = "Algemeen" ;
+ Text [ italian ] = "Generale" ;
+ Text [ spanish ] = "General" ;
+ Text [ french ] = "Général" ;
+ Text [ swedish ] = "Allmän" ;
+ Text [ danish ] = "Generelt" ;
+ Text [ portuguese ] = "Geral" ;
+ Text [ portuguese_brazilian ] = "Allgemein" ;
+ Text[ chinese_simplified ] = "³£¹æ";
+ Text[ russian ] = "Îáùèå";
+ Text[ polish ] = "Ogólne";
+ Text[ japanese ] = "‘S”Ê";
+ Text[ chinese_traditional ] = "¤@¯ë";
+ Text[ arabic ] = "ÚÇã";
+ Text[ dutch ] = "Algemeen";
+ Text[ chinese_simplified ] = "³£¹æ";
+ Text[ greek ] = "ÃåíéêÜ";
+ Text[ korean ] = "ÀϹÝ";
+ Text[ turkish ] = "Genel";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "ÊôÐÔ: ";
+ Text[ russian ] = "Ñâîéñòâà ";
+ Text[ polish ] = "W³aœciwoœci ";
+ Text[ japanese ] = "‘®« ";
+ Text[ chinese_traditional ] = "ÄÝ©Ê¡G ";
+ Text[ arabic ] = "ÎÕÇÆÕ";
+ Text[ dutch ] = "Eigenschappen van ";
+ Text[ chinese_simplified ] = "ÊôÐÔ: ";
+ Text[ greek ] = "Éäéüôçôåò ôïõ ";
+ Text[ korean ] = "µî·ÏÁ¤º¸ ";
+ Text[ turkish ] = "Özellikler: ";
+ Text[ language_user1 ] = " ";
+};
+
+/******************************************************************************/
+
+TabDialog RID_SVXTABDLG_GALLERYTHEME
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Text = "Eigenschaften von " ;
+ Text [ ENGLISH ] = "Settings of " ;
+ Text [ dutch ] = "Eigenschappen van " ;
+ Text [ english_us ] = "Properties of " ;
+ Text [ italian ] = "Proprietà di " ;
+ Text [ spanish ] = "Propiedades de " ;
+ Text [ french ] = "Propriétés de " ;
+ Text [ swedish ] = "Egenskaper för " ;
+ Text [ danish ] = "Egenskaber af " ;
+ Text [ portuguese ] = "Propriedades de " ;
+ Text [ portuguese_brazilian ] = "Eigenschaften von " ;
+ Moveable = TRUE ;
+ TabControl 1
+ {
+ OutputSize = TRUE ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXTABPAGE_GALLERY_GENERAL ;
+ Text = "Allgemein" ;
+ Text [ ENGLISH ] = "Common" ;
+ Text [ english_us ] = "General" ;
+ Text [ dutch ] = "Algemeen" ;
+ Text [ italian ] = "Generale" ;
+ Text [ spanish ] = "General" ;
+ Text [ french ] = "Général" ;
+ Text [ swedish ] = "Allmän" ;
+ Text [ danish ] = "Generelt" ;
+ Text [ portuguese ] = "Geral" ;
+ Text [ portuguese_brazilian ] = "Allgemein" ;
+ Text[ chinese_simplified ] = "³£¹æ";
+ Text[ russian ] = "Îáùèå";
+ Text[ polish ] = "Ogólne";
+ Text[ japanese ] = "‘S”Ê";
+ Text[ chinese_traditional ] = "¤@¯ë";
+ Text[ arabic ] = "ÚÇã";
+ Text[ dutch ] = "Algemeen";
+ Text[ chinese_simplified ] = "³£¹æ";
+ Text[ greek ] = "ÃåíéêÜ";
+ Text[ korean ] = "ÀϹÝ";
+ Text[ turkish ] = "Genel";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXTABPAGE_GALLERYTHEME_FILES ;
+ Text = "Dateien" ;
+ Text [ ENGLISH ] = "Files" ;
+ Text [ english_us ] = "Files" ;
+ Text [ dutch ] = "Bestanden" ;
+ Text [ italian ] = "File" ;
+ Text [ spanish ] = "Archivos" ;
+ Text [ french ] = "Fichiers" ;
+ Text [ swedish ] = "Filer" ;
+ Text [ danish ] = "Filer" ;
+ Text [ portuguese ] = "Ficheiros" ;
+ Text [ portuguese_brazilian ] = "Dateien" ;
+ Text[ chinese_simplified ] = "Îļþ";
+ Text[ russian ] = "Ôàéëû";
+ Text[ polish ] = "Pliki";
+ Text[ japanese ] = "̧²Ù";
+ Text[ chinese_traditional ] = "ÀÉ®×";
+ Text[ arabic ] = "ãáÝÇÊ";
+ Text[ dutch ] = "Bestanden";
+ Text[ chinese_simplified ] = "Îļþ";
+ Text[ greek ] = "Áñ÷åßá";
+ Text[ korean ] = "ÆÄÀϵé";
+ Text[ turkish ] = "Dosyalar";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "ÊôÐÔ: ";
+ Text[ russian ] = "Ñâîéñòâà ";
+ Text[ polish ] = "W³aœciwoœci ";
+ Text[ japanese ] = "‘®« ";
+ Text[ chinese_traditional ] = "ÄÝ©Ê¡G ";
+ Text[ arabic ] = "ÎÕÇÆÕ";
+ Text[ dutch ] = "Eigenschappen van ";
+ Text[ chinese_simplified ] = "ÊôÐÔ: ";
+ Text[ greek ] = "Éäéüôçôåò ôïõ ";
+ Text[ korean ] = "µî·ÏÁ¤º¸ ";
+ Text[ turkish ] = "Özellikler: ";
+ Text[ language_user1 ] = " ";
+};
+
+/******************************************************************************/
+
+TabPage RID_SVXTABPAGE_GALLERY_GENERAL
+{
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedImage FI_MS_IMAGE
+ {
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 20 , 20 ) ;
+ };
+ Edit EDT_MS_NAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 60 , 10 ) ;
+ Size = MAP_APPFONT ( 194 , 12 ) ;
+ };
+ FixedLine FL_MS_GENERAL_FIRST
+ {
+ Pos = MAP_APPFONT ( 6 , 32 ) ;
+ Size = MAP_APPFONT ( 248 , 1 ) ;
+ };
+ FixedText FT_MS_TYPE
+ {
+ Pos = MAP_APPFONT ( 6 , 39 ) ;
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ Text = "Typ:" ;
+ Text [ English ] = "Type:" ;
+ LeftLabel = TRUE ;
+ 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[ arabic ] = ":ÇáäæÚ";
+ Text[ dutch ] = "Type:";
+ Text[ chinese_simplified ] = "ÀàÐÍ:";
+ Text[ greek ] = "Ôýðïò:";
+ Text[ korean ] = "ÇüÅÂ:";
+ Text[ turkish ] = "Tip:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MS_SHOW_TYPE
+ {
+ Pos = MAP_APPFONT ( 60 , 39 ) ;
+ Size = MAP_APPFONT ( 194 , 10 ) ;
+ };
+ FixedText FT_MS_PATH
+ {
+ Pos = MAP_APPFONT ( 6 , 52 ) ;
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ Text = "Ort:" ;
+ Text [ English ] = "Path:" ;
+ LeftLabel = TRUE ;
+ Text [ english_us ] = "Location:" ;
+ Text [ italian ] = "Luogo:" ;
+ Text [ spanish ] = "Ubicación:" ;
+ Text [ french ] = "Emplacement :" ;
+ Text [ dutch ] = "Plaats:" ;
+ Text [ swedish ] = "Placering:" ;
+ Text [ danish ] = "Placering:" ;
+ Text [ portuguese_brazilian ] = "Ort:" ;
+ Text [ portuguese ] = "Local:" ;
+ Text[ chinese_simplified ] = "λÖÃ:";
+ Text[ russian ] = "Ìåñòîíàõîæäåíèå:";
+ Text[ polish ] = "Lokalizacja:";
+ Text[ japanese ] = "êŠ:";
+ Text[ chinese_traditional ] = "¦ì¸m¡G";
+ Text[ arabic ] = ":ÇáãæÞÚ";
+ Text[ dutch ] = "Plaats:";
+ Text[ chinese_simplified ] = "λÖÃ:";
+ Text[ greek ] = "Ôïðïèåóßá:";
+ Text[ korean ] = "Àå¼Ò:";
+ Text[ turkish ] = "Yer:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MS_SHOW_PATH
+ {
+ Pos = MAP_APPFONT ( 60 , 52 ) ;
+ Size = MAP_APPFONT ( 194 , 10 ) ;
+ };
+ FixedText FT_MS_CONTENT
+ {
+ Pos = MAP_APPFONT ( 6 , 65 ) ;
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ Text = "Inhalt:" ;
+ Text [ English ] = "Content:" ;
+ LeftLabel = TRUE ;
+ Text [ english_us ] = "Contents:" ;
+ Text [ italian ] = "Contenuto:" ;
+ Text [ spanish ] = "Contenido:" ;
+ Text [ french ] = "Contenu :" ;
+ Text [ dutch ] = "Inhoud:" ;
+ Text [ swedish ] = "Innehåll:" ;
+ Text [ danish ] = "Indhold:" ;
+ Text [ portuguese_brazilian ] = "Inhalt:" ;
+ Text [ portuguese ] = "Conteúdo:" ;
+ Text[ chinese_simplified ] = "ÄÚÈÝ:";
+ Text[ russian ] = "Ñîäåðæàíèå:";
+ Text[ polish ] = "ZawartoϾ:";
+ Text[ japanese ] = "“à—e:";
+ Text[ chinese_traditional ] = "¤º®e¡G";
+ Text[ arabic ] = ":ÇáãÍÊæíÇÊ";
+ Text[ dutch ] = "Inhoud:";
+ Text[ chinese_simplified ] = "ÄÚÈÝ:";
+ Text[ greek ] = "Ðåñéå÷üìåíï:";
+ Text[ korean ] = "³»¿ë:";
+ Text[ turkish ] = "Ýçerik:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MS_SHOW_CONTENT
+ {
+ Pos = MAP_APPFONT ( 60 , 65 ) ;
+ Size = MAP_APPFONT ( 194 , 10 ) ;
+ };
+ FixedLine FL_MS_GENERAL_SECOND
+ {
+ Pos = MAP_APPFONT ( 6 , 81 ) ;
+ Size = MAP_APPFONT ( 248 , 1 ) ;
+ };
+ FixedText FT_MS_CREATEDATE
+ {
+ Pos = MAP_APPFONT ( 6 , 88 ) ;
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ Text = "Erstellt am:" ;
+ Text [ English ] = "Created:" ;
+ LeftLabel = TRUE ;
+ Text [ english_us ] = "Created:" ;
+ Text [ italian ] = "Creato il:" ;
+ Text [ spanish ] = "Creado el:" ;
+ Text [ french ] = "Créé le :" ;
+ Text [ dutch ] = "Gemaakt op:" ;
+ Text [ swedish ] = "Skapad den:" ;
+ Text [ danish ] = "Oprettet den:" ;
+ Text [ portuguese_brazilian ] = "Erstellt am:" ;
+ Text [ portuguese ] = "Criado em:" ;
+ Text[ chinese_simplified ] = "½¨Á¢ÈÕÆÚ:";
+ Text[ russian ] = "Äàòà ñîçäàíèÿ:";
+ Text[ polish ] = "Utworzono:";
+ Text[ japanese ] = "쬓ú:";
+ Text[ chinese_traditional ] = "«Ø¥ß¤é´Á¡G";
+ Text[ arabic ] = ":ÊÇÑíÎ ÇáÅäÔÇÁ";
+ Text[ dutch ] = "Gemaakt op:";
+ Text[ chinese_simplified ] = "½¨Á¢ÈÕÆÚ:";
+ Text[ greek ] = "ÄçìéïõñãÞèçêå ôç:";
+ Text[ korean ] = "ÀÛ¼º³¯Â¥:";
+ Text[ turkish ] = "Oluþturma tarihi:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MS_SHOW_CREATEDATE
+ {
+ Pos = MAP_APPFONT ( 60 , 88 ) ;
+ Size = MAP_APPFONT ( 194 , 10 ) ;
+ };
+ FixedText FT_MS_CHANGEDATE
+ {
+ Pos = MAP_APPFONT ( 6 , 101 ) ;
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Geändert am: : Geõndert am: */
+ /* ### ACHTUNG: Neuer Text in Resource? Geändert am: : Geõndert am: */
+ Text = "Geändert am:" ;
+ Text [ English ] = "Changed:" ;
+ LeftLabel = TRUE ;
+ Text [ dutch ] = "Gewijzigd op:" ;
+ Text [ english_us ] = "Modified:" ;
+ Text [ italian ] = "Modificato il:" ;
+ Text [ spanish ] = "Modificado el:" ;
+ Text [ french ] = "Modifié le :" ;
+ Text [ swedish ] = "Ändrad den:" ;
+ Text [ danish ] = "Ændret den:" ;
+ Text [ portuguese ] = "Alterado em:" ;
+ Text [ portuguese_brazilian ] = "Geändert am:" ;
+ Text[ chinese_simplified ] = "¸ü¸ÄÈÕÆÚ:";
+ Text[ russian ] = "Äàòà èçìåíåíèÿ:";
+ Text[ polish ] = "Zmieniono:";
+ Text[ japanese ] = "•ÏX“ú:";
+ Text[ chinese_traditional ] = "Åܧó¤é´Á¡G";
+ Text[ arabic ] = ":ÊÇÑíÎ ÇáÊÚÏíá";
+ Text[ dutch ] = "Gewijzigd op:";
+ Text[ chinese_simplified ] = "¸ü¸ÄÈÕÆÚ:";
+ Text[ greek ] = "Ôñïðïðïßçóç:";
+ Text[ korean ] = "º¯°æ ³¯Â¥:";
+ Text[ turkish ] = "Deðiþiklik tarihi:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MS_SHOW_CHANGEDATE
+ {
+ Pos = MAP_APPFONT ( 60 , 101 ) ;
+ Size = MAP_APPFONT ( 194 , 10 ) ;
+ };
+};
+
+/******************************************************************************/
+
+TabPage RID_SVXTABPAGE_GALLERYTHEME_FILES
+{
+ HelpId = HID_GALLERY_BROWSER ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_FILETYPE
+ {
+ Pos = MAP_APPFONT ( 6 , 8 ) ;
+ Size = MAP_APPFONT ( 35 , 10 ) ;
+ Text = "Dateityp" ;
+ Text [ ENGLISH ] = "Filetype" ;
+ Text [ english_us ] = "File Type" ;
+ Text [ italian ] = "Tipo file" ;
+ Text [ spanish ] = "Tipo de archivo" ;
+ Text [ french ] = "Type" ;
+ Text [ dutch ] = "Bestandstype" ;
+ Text [ swedish ] = "Filtyp" ;
+ Text [ danish ] = "Filtype" ;
+ Text [ portuguese_brazilian ] = "Dateityp" ;
+ Text [ portuguese ] = "Tipo de ficheiro" ;
+ Text[ chinese_simplified ] = "ÎļþÀàÐÍ";
+ Text[ russian ] = "Òèï ôàéëà";
+ Text[ polish ] = "Typ pliku";
+ Text[ japanese ] = "̧²Ù‚ÌŽí—Þ";
+ Text[ chinese_traditional ] = "ÀÉ®×Ãþ«¬";
+ Text[ arabic ] = "äæÚ ÇáãáÝ";
+ Text[ dutch ] = "Bestandstype";
+ Text[ chinese_simplified ] = "ÎļþÀàÐÍ";
+ Text[ greek ] = "Ôýðïò áñ÷åßïõ";
+ Text[ korean ] = "ÆÄÀÏ ÇüÅÂ";
+ Text[ turkish ] = "Dosya tipi";
+ Text[ language_user1 ] = " ";
+ };
+ ComboBox CBB_FILETYPE
+ {
+ Pos = MAP_APPFONT ( 44 , 6 ) ;
+ Size = MAP_APPFONT ( 134 , 69 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ HScroll = TRUE ;
+ };
+ MultiListBox LBX_FOUND
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 23 ) ;
+ Size = MAP_APPFONT ( 172 , 106 ) ;
+ TabStop = TRUE ;
+ SimpleMode = TRUE ;
+ };
+ PushButton BTN_SEARCH
+ {
+ Pos = MAP_APPFONT ( 184 , 6 ) ;
+ Size = MAP_APPFONT ( 70 , 14 ) ;
+ Text = "Dateien su~chen..." ;
+ Text [ ENGLISH ] = "~Search files..." ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Find files..." ;
+ Text [ italian ] = "~Cerca file..." ;
+ Text [ spanish ] = "Bus~car archivos..." ;
+ Text [ french ] = "~Recherche de fichiers..." ;
+ Text [ dutch ] = "~Bestanden zoeken..." ;
+ Text [ swedish ] = "Sö~k filer..." ;
+ Text [ danish ] = "Søg filer..." ;
+ Text [ portuguese_brazilian ] = "Dateien su~chen..." ;
+ Text [ portuguese ] = "~Localizar ficheiros..." ;
+ Text[ chinese_simplified ] = "ËÑÑ°Îļþ(~F)...";
+ Text[ russian ] = "Íàéòè ôàéëû...";
+ Text[ polish ] = "Szukaj plików...";
+ Text[ japanese ] = "̧²Ù‚ÌŒŸõ(~F)...";
+ Text[ chinese_traditional ] = "´M§äÀÉ®×(~F)...";
+ Text[ arabic ] = "...ÈÍË Úä ãáÝÇÊ";
+ Text[ dutch ] = "~Bestanden zoeken...";
+ Text[ chinese_simplified ] = "ËÑÑ°Îļþ(~F)...";
+ Text[ greek ] = "Åýñåóç áñ÷åßùí...";
+ Text[ korean ] = "ÆÄÀÏ Ã£±â(~F)...";
+ Text[ turkish ] = "Dosyayý bul";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_TAKE
+ {
+ Pos = MAP_APPFONT ( 184 , 23 ) ;
+ Size = MAP_APPFONT ( 70 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Hinzufügen : ~Hinzuf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Hinzufügen : ~Hinzuf³gen */
+ Text = "~Hinzufügen" ;
+ Text [ ENGLISH ] = "~Add" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "Toe~voegen" ;
+ Text [ english_us ] = "~Add" ;
+ Text [ italian ] = "A~ggiungi" ;
+ Text [ spanish ] = "~Añadir" ;
+ Text [ french ] = "~Ajouter" ;
+ Text [ swedish ] = "~Lägg till" ;
+ Text [ danish ] = "Tilføj" ;
+ Text [ portuguese_brazilian ] = "~Hinzufügen" ;
+ Text [ portuguese ] = "~Adicionar" ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)";
+ Text[ russian ] = "Äîáàâèòü";
+ Text[ polish ] = "Dodaj";
+ Text[ japanese ] = "’ljÁ(~A)";
+ Text[ chinese_traditional ] = "¥[¤J(~A)";
+ Text[ arabic ] = "ÅÖÇÝÉ";
+ Text[ dutch ] = "Toe~voegen";
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)";
+ Text[ greek ] = "ÐñïóèÞêç";
+ Text[ korean ] = "Ãß°¡(~A)";
+ Text[ turkish ] = "Ekle";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_TAKEALL
+ {
+ Pos = MAP_APPFONT ( 184 , 40 ) ;
+ Size = MAP_APPFONT ( 70 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Alle hinzufügen : ~Alle hinzuf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Alle hinzufügen : ~Alle hinzuf³gen */
+ Text = "~Alle hinzufügen" ;
+ Text [ ENGLISH ] = "A~dd all" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "~Alle toevoegen" ;
+ Text [ english_us ] = "A~dd All" ;
+ Text [ italian ] = "Aggiungi tutti" ;
+ Text [ spanish ] = "Añadir ~todos" ;
+ Text [ french ] = "Ajouter ~tout" ;
+ Text [ swedish ] = "Lägg till ~alla" ;
+ Text [ danish ] = "Tilføj alle" ;
+ Text [ portuguese_brazilian ] = "~Alle hinzufügen" ;
+ Text [ portuguese ] = "~A~dicionar todos" ;
+ Text[ chinese_simplified ] = "È«²¿¼ÓÈë(~D)";
+ Text[ russian ] = "Äîáàâèòü âñå";
+ Text[ polish ] = "Dodaj wszystkie";
+ Text[ japanese ] = "‚·‚ׂĒljÁ(~D)";
+ Text[ chinese_traditional ] = "¥þ³¡¥[¤J(~D)";
+ Text[ arabic ] = "ÅÖÇÝÉ Çáßá";
+ Text[ dutch ] = "~Alle toevoegen";
+ Text[ chinese_simplified ] = "È«²¿¼ÓÈë(~D)";
+ Text[ greek ] = "ÐñïóèÞêç üëùí";
+ Text[ korean ] = "¸ðµÎ Ãß°¡(~D)";
+ Text[ turkish ] = "Tümünü ekle";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CBX_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 184 , 57 ) ;
+ Size = MAP_APPFONT ( 70 , 12 ) ;
+ Text = "V~orschau" ;
+ Text [ ENGLISH ] = "Pr~eview" ;
+ Text [ NORWEGIAN ] = "Pr~eview" ;
+ Text [ DANISH ] = "Eksempel" ;
+ Text [ ENGLISH_US ] = "Pr~eview" ;
+ Text [ SPANISH ] = "Pr~evisualización" ;
+ Text [ FINNISH ] = "~Esikatselu" ;
+ Text [ FRENCH ] = "~Aperçu" ;
+ Text [ ITALIAN ] = "Ant~eprima" ;
+ Text [ DUTCH ] = "~Voorbeeld" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Ex~aminar" ;
+ Text [ SWEDISH ] = "~Förhandsvisning" ;
+ Text [ PORTUGUESE ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ(~E)";
+ Text[ russian ] = "Ïðîñìîòð";
+ Text[ polish ] = "Podgl¹d";
+ Text[ japanese ] = "ÌßÚËÞ­°(~E)";
+ Text[ chinese_traditional ] = "¹wÄý(~E)";
+ Text[ arabic ] = "ãÚÇíäÉ";
+ Text[ dutch ] = "~Voorbeeld";
+ Text[ chinese_simplified ] = "Ô¤ÊÓ(~E)";
+ Text[ greek ] = "Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â(~E)";
+ Text[ turkish ] = "Ön izleme";
+ Text[ language_user1 ] = " ";
+ };
+ Window WND_BRSPRV
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 184 , 72 ) ;
+ Size = MAP_APPFONT ( 70 , 57 ) ;
+ };
+ PushButton BTN_MADDIN1
+ {
+ Pos = MAP_APPFONT ( 220 , 63 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Maddin1" ;
+ Text [ ENGLISH ] = "Maddin1" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "Maddin1" ;
+ Text [ italian ] = "Maddin1" ;
+ Text [ spanish ] = "Maddin1" ;
+ Text [ french ] = "Maddin1" ;
+ Text [ dutch ] = "Maddin1" ;
+ Text [ swedish ] = "Maddin1" ;
+ Text [ danish ] = "Maddin1" ;
+ Text [ portuguese_brazilian ] = "Maddin1" ;
+ Text [ portuguese ] = "Maddin1" ;
+ Text[ chinese_simplified ] = "Maddin1";
+ Text[ russian ] = "Maddin1";
+ Text[ polish ] = "Maddin1";
+ Text[ japanese ] = "Maddin1";
+ Text[ chinese_traditional ] = "Maddin1";
+ Text[ arabic ] = "Maddin1";
+ Text[ dutch ] = "Maddin1";
+ Text[ chinese_simplified ] = "Maddin1";
+ Text[ greek ] = "Maddin1";
+ Text[ korean ] = "Maddin1";
+ Text[ turkish ] = "Maddin1";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_MADDIN2
+ {
+ Pos = MAP_APPFONT ( 220 , 80 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Maddin2" ;
+ Text [ ENGLISH ] = "Maddin2" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "Maddin2" ;
+ Text [ italian ] = "Maddin2" ;
+ Text [ spanish ] = "Maddin2" ;
+ Text [ french ] = "Maddin2" ;
+ Text [ dutch ] = "Maddin2" ;
+ Text [ swedish ] = "Maddin2" ;
+ Text [ danish ] = "Maddin2" ;
+ Text [ portuguese_brazilian ] = "Maddin2" ;
+ Text [ portuguese ] = "Maddin2" ;
+ Text[ chinese_simplified ] = "Maddin2";
+ Text[ russian ] = "Maddin2";
+ Text[ polish ] = "Maddin2";
+ Text[ japanese ] = "Maddin2";
+ Text[ chinese_traditional ] = "Maddin2";
+ Text[ arabic ] = "Maddin2";
+ Text[ dutch ] = "Maddin2";
+ Text[ chinese_simplified ] = "Maddin2";
+ Text[ greek ] = "Maddin2";
+ Text[ korean ] = "Maddin2";
+ Text[ turkish ] = "Maddin2";
+ Text[ language_user1 ] = " ";
+ };
+};
+
+/******************************************************************************/
+
+ModalDialog RID_SVXDLG_GALLERY_TITLE
+{
+ HelpId = HID_GALLERY_TITLE;
+ OutputSize = TRUE ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 168 , 63 ) ;
+ Text = "Titel eingeben" ;
+ Text [ ENGLISH ] = "Edit title" ;
+ Text [ english_us ] = "Enter title" ;
+ Moveable = TRUE ;
+
+ OkButton BTN_OK
+ {
+ DefButton = TRUE ;
+ Pos = MAP_APPFONT ( 112 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 112 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton BTN_HELP
+ {
+ Pos = MAP_APPFONT ( 112 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+
+ GroupBox GRP_TITLE
+ {
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 100 , 30 ) ;
+ Text = "Titel" ;
+ Text [ ENGLISH ] = "Title" ;
+ Text [ english_us ] = "Title" ;
+ Text[ portuguese ] = "Título";
+ Text[ russian ] = "Çàãîëîâîê";
+ Text[ greek ] = "Ôßôëïò";
+ Text[ dutch ] = "Titel";
+ Text[ french ] = "Titre";
+ Text[ spanish ] = "Título";
+ Text[ italian ] = "Titolo";
+ Text[ danish ] = "Titel";
+ Text[ swedish ] = "Titel";
+ Text[ polish ] = "Tytu³";
+ Text[ portuguese_brazilian ] = "Title";
+ Text[ japanese ] = "À²ÄÙ";
+ Text[ korean ] = "Á¦¸ñ";
+ Text[ chinese_simplified ] = "±êÌâ";
+ Text[ chinese_traditional ] = "¼ÐÃD";
+ Text[ arabic ] = "ÚäæÇä";
+ Text[ turkish ] = "Baþlýk";
+ };
+ Edit EDT_TITLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 18 ) ;
+ Size = MAP_APPFONT ( 88, 12 ) ;
+ };
+ Text[ portuguese ] = "Indicar título";
+ Text[ russian ] = "Ââåñòè çàãîëîâîê";
+ Text[ greek ] = "ÅéóáãùãÞ ôßôëïõ";
+ Text[ dutch ] = "Titel invoeren";
+ Text[ french ] = "Saisir le titre";
+ Text[ spanish ] = "Introducir título";
+ Text[ italian ] = "Indicazione titolo";
+ Text[ danish ] = "Indtast titel";
+ Text[ swedish ] = "Mata in titel";
+ Text[ polish ] = "Wpisz tytu³";
+ Text[ portuguese_brazilian ] = "Edit title";
+ Text[ japanese ] = "À²ÄÙ‚Ì“ü—Í";
+ Text[ korean ] = "Á¦¸ñ ÀÔ·Â";
+ Text[ chinese_simplified ] = "ÊäÈë±êÌâ";
+ Text[ chinese_traditional ] = "Áä¤J¼ÐÃD";
+ Text[ arabic ] = "ÅÏÎÇá ÇáÚäæÇä";
+ Text[ turkish ] = "Baþlýk gir";
+};
+
+/******************************************************************************/
+
+ModalDialog RID_SVXDLG_GALLERY_SEARCH_PROGRESS
+{
+ HelpId = HID_GALLERY_SEARCH ;
+ OutputSize = TRUE ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 124 , 86 ) ;
+ Text = "Suchen" ;
+ Text [ ENGLISH ] = "Searching" ;
+ Moveable = TRUE ;
+ GroupBox GRP_SEARCH_DIR
+ {
+ Pos = MAP_APPFONT ( 6 , 33 ) ;
+ Size = MAP_APPFONT ( 112 , 27 ) ;
+ Text = "Verzeichnis" ;
+ Text [ ENGLISH ] = "Directory" ;
+ Text [ dutch ] = "Map" ;
+ Text [ english_us ] = "Directory" ;
+ Text [ italian ] = "Cartella" ;
+ Text [ spanish ] = "Directorio" ;
+ Text [ french ] = "Répertoire" ;
+ Text [ swedish ] = "Katalog" ;
+ Text [ danish ] = "Bibliotek" ;
+ Text [ portuguese ] = "Directório" ;
+ Text [ portuguese_brazilian ] = "Verzeichnis" ;
+ Text[ chinese_simplified ] = "Ŀ¼";
+ Text[ russian ] = "Êàòàëîã";
+ Text[ polish ] = "Spis";
+ Text[ japanese ] = "ÃÞ¨Ú¸ÄØ";
+ Text[ chinese_traditional ] = "¥Ø¿ý";
+ Text[ arabic ] = "ÇáÏáíá";
+ Text[ dutch ] = "Map";
+ Text[ chinese_simplified ] = "Ŀ¼";
+ Text[ greek ] = "ÊáôÜëïãïò";
+ Text[ korean ] = "µð·ºÅ͸®";
+ Text[ turkish ] = "Dizin";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_SEARCH_DIR
+ {
+ Pos = MAP_APPFONT ( 12 , 44 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 37 , 66 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_SEARCH_TYPE
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 112 , 27 ) ;
+ Text = "Dateityp" ;
+ Text [ ENGLISH ] = "Type of file" ;
+ Text [ english_us ] = "File type" ;
+ Text [ italian ] = "Tipo di file" ;
+ Text [ spanish ] = "Tipo de archivo" ;
+ Text [ french ] = "Type de fichier" ;
+ Text [ dutch ] = "Bestandstype" ;
+ Text [ swedish ] = "Filtyp" ;
+ Text [ danish ] = "Filtype" ;
+ Text [ portuguese_brazilian ] = "Dateityp" ;
+ Text [ portuguese ] = "Tipo de ficheiro" ;
+ Text[ chinese_simplified ] = "ÎļþÀàÐÍ";
+ Text[ russian ] = "Òèï ôàéëà";
+ Text[ polish ] = "Typ pliku";
+ Text[ japanese ] = "̧²Ù‚ÌŽí—Þ";
+ Text[ chinese_traditional ] = "ÀÉ®×Ãþ«¬";
+ Text[ arabic ] = "äæÚ ÇáãáÝ";
+ Text[ dutch ] = "Bestandstype";
+ Text[ chinese_simplified ] = "ÎļþÀàÐÍ";
+ Text[ greek ] = "Ôýðïò áñ÷åßïõ";
+ Text[ korean ] = "ÆÄÀÏ ÇüÅÂ";
+ Text[ turkish ] = "Dosya tipi";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_SEARCH_TYPE
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ };
+ Text [ english_us ] = "Search" ;
+ Text [ italian ] = "Cerca" ;
+ Text [ spanish ] = "Buscar" ;
+ Text [ french ] = "Rechercher" ;
+ Text [ dutch ] = "Zoeken" ;
+ Text [ swedish ] = "Sök" ;
+ Text [ danish ] = "Søg" ;
+ Text [ portuguese ] = "Procurar" ;
+ Text [ portuguese_brazilian ] = "Suchen" ;
+ Text[ chinese_simplified ] = "ËÑÑ°";
+ Text[ russian ] = "Íàéòè";
+ Text[ polish ] = "Szukaj";
+ Text[ japanese ] = "ŒŸõ";
+ Text[ chinese_traditional ] = "´M§ä";
+ Text[ arabic ] = "ÈÍË";
+ Text[ dutch ] = "Zoeken";
+ Text[ chinese_simplified ] = "ËÑÑ°";
+ Text[ greek ] = "ÁíáæÞôçóç";
+ Text[ korean ] = "ã±â";
+ Text[ turkish ] = "Ara";
+ Text[ language_user1 ] = " ";
+};
+
+/******************************************************************************/
+
+ModalDialog RID_SVXDLG_GALLERY_TAKE_PROGRESS
+{
+ HelpId = HID_GALLERY_APPLY ;
+ OutputSize = TRUE ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 124 , 56 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Übernehmen : šbernehmen */
+ /* ### ACHTUNG: Neuer Text in Resource? Übernehmen : šbernehmen */
+ Text = "Übernehmen" ;
+ Text [ ENGLISH ] = "Apply" ;
+ Moveable = TRUE ;
+ GroupBox GRP_TAKE_PROGRESS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 112 , 27 ) ;
+ Text = "Datei" ;
+ Text [ ENGLISH ] = "File" ;
+ Text [ dutch ] = "Bestand" ;
+ Text [ english_us ] = "File" ;
+ Text [ italian ] = "File" ;
+ Text [ spanish ] = "Archivo" ;
+ Text [ french ] = "Fichier" ;
+ Text [ swedish ] = "Fil" ;
+ Text [ danish ] = "Fil" ;
+ Text [ portuguese ] = "Ficheiro" ;
+ Text [ portuguese_brazilian ] = "Datei" ;
+ Text[ chinese_simplified ] = "Îļþ";
+ Text[ russian ] = "Ôàéë";
+ Text[ polish ] = "Plik";
+ Text[ japanese ] = "̧²Ù";
+ Text[ chinese_traditional ] = "ÀÉ®×";
+ Text[ arabic ] = "ãáÝ";
+ Text[ dutch ] = "Bestand";
+ Text[ chinese_simplified ] = "Îļþ";
+ Text[ greek ] = "Áñ÷åßï";
+ Text[ korean ] = "ÆÄÀÏ";
+ Text[ turkish ] = "Dosya";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_TAKE_FILE
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 37 , 36 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Text [ english_us ] = "Apply" ;
+ Text [ italian ] = "Applica" ;
+ Text [ spanish ] = "Aplicar" ;
+ Text [ french ] = "Appliquer" ;
+ Text [ dutch ] = "Overnemen" ;
+ Text [ swedish ] = "Överta" ;
+ Text [ danish ] = "Anvend" ;
+ Text [ portuguese ] = "Aplicar" ;
+ Text [ portuguese_brazilian ] = "Übernehmen" ;
+ Text[ chinese_simplified ] = "Ì×ÓÃ";
+ Text[ russian ] = "Ïðèíÿòü";
+ Text[ polish ] = "Zastosuj";
+ Text[ japanese ] = "“K—p";
+ Text[ chinese_traditional ] = "¨Ï¥Î";
+ Text[ arabic ] = "ÊØÈíÞ";
+ Text[ dutch ] = "Overnemen";
+ Text[ chinese_simplified ] = "Ì×ÓÃ";
+ Text[ greek ] = "ÅöáñìïãÞ";
+ Text[ korean ] = "Àû¿ë";
+ Text[ turkish ] = "Kullan";
+ Text[ language_user1 ] = " ";
+};
+
+/******************************************************************************/
+
+ModalDialog RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS
+{
+ HelpId = HID_GALLERY_ACTUALIZE ;
+ OutputSize = TRUE ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 124 , 56 ) ;
+ Text = "Aktualisieren" ;
+ Text [ ENGLISH ] = "Actualize" ;
+ Text [ english_us ] = "Update" ;
+ Moveable = TRUE ;
+ GroupBox GRP_ACTUALIZE_PROGRESS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 112 , 27 ) ;
+ Text = "Datei" ;
+ Text [ ENGLISH ] = "File" ;
+ Text [ dutch ] = "Bestand" ;
+ Text [ english_us ] = "File" ;
+ 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[ dutch ] = "Bestand";
+ Text[ chinese_simplified ] = "Îļþ";
+ Text[ greek ] = "Áñ÷åßï";
+ Text[ korean ] = "ÆÄÀÏ";
+ Text[ turkish ] = "Dosya";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ACTUALIZE_FILE
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 37 , 36 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Text [ italian ] = "Aggiorna" ;
+ Text [ spanish ] = "Actualizar" ;
+ Text [ french ] = "Actualiser" ;
+ Text [ dutch ] = "Actualiseren" ;
+ Text [ swedish ] = "Uppdatera" ;
+ Text [ danish ] = "Opdater" ;
+ Text [ portuguese_brazilian ] = "Aktualisieren" ;
+ Text [ portuguese ] = "Actualizar" ;
+ Text[ chinese_simplified ] = "¸üÐÂ";
+ Text[ russian ] = "Îáíîâèòü";
+ Text[ polish ] = "Aktualizuj";
+ Text[ japanese ] = "XV";
+ Text[ chinese_traditional ] = "§ó·s";
+ Text[ arabic ] = "ÊÍÏíË";
+ Text[ dutch ] = "Actualiseren";
+ Text[ chinese_simplified ] = "¸üÐÂ";
+ Text[ greek ] = "ÅíçìÝñùóç";
+ Text[ korean ] = "¾÷µ¥ÀÌÆ®";
+ Text[ turkish ] = "Güncelle";
+ Text[ language_user1 ] = " ";
+};
+
+ModalDialog RID_SVXDLG_GALLERY_THEMEID
+{
+ OutputSize = TRUE ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 180 , 63 ) ;
+ Text = "Themen-ID" ;
+ Text [ ENGLISH ] = "Theme ID" ;
+ Text [ english_us ] = "Theme ID" ;
+ Moveable = TRUE ;
+ OkButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 124 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 124 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_ID
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 112 , 54 ) ;
+ Text = "ID" ;
+ Text[ ENGLISH ] = "ID";
+ Text[ english_us ] = "ID";
+ Text[ portuguese ] = "ID";
+ Text[ russian ] = "ID";
+ Text[ dutch ] = "ID";
+ Text[ french ] = "ID";
+ Text[ spanish ] = "ID";
+ Text[ italian ] = "ID";
+ Text[ danish ] = "ID";
+ Text[ swedish ] = "ID";
+ Text[ polish ] = "ID";
+ Text[ portuguese_brazilian ] = "ID";
+ Text[ japanese ] = "ID";
+ Text[ chinese_simplified ] = "ID";
+ Text[ chinese_traditional ] = "ID";
+ Text[ arabic ] = "ÊÚÑíÝ";
+ Text[ dutch ] = "ID";
+ Text[ chinese_simplified ] = "ID";
+ Text[ greek ] = "Ôáõôüôçôá (ID)";
+ Text[ korean ] = "ID";
+ Text[ turkish ] = "Tanýtýcý";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_RESNAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 100 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ HScroll = TRUE ;
+ VScroll = TRUE ;
+ };
+ Text[ portuguese ] = "ID Tema";
+ Text[ russian ] = "ID Òåìû";
+ Text[ dutch ] = "Onderwerp ID";
+ Text[ french ] = "Thème ID";
+ Text[ spanish ] = "Temas ID";
+ Text[ italian ] = "ID tema";
+ Text[ danish ] = "Emne-ID";
+ Text[ swedish ] = "Tema ID";
+ Text[ polish ] = "Identyfikator tematów";
+ Text[ portuguese_brazilian ] = "Theme ID";
+ Text[ japanese ] = "ðÏID";
+ Text[ chinese_simplified ] = "Ö÷Ìâ - ID";
+ Text[ chinese_traditional ] = "¥DÃD - ID";
+ Text[ arabic ] = "ÊÚÑíÝ ÇáãæÇÖíÚ";
+ Text[ dutch ] = "Onderwerp ID";
+ Text[ chinese_simplified ] = "Ö÷Ìâ - ID";
+ Text[ greek ] = "Ôáõôüôçôá (ID) èÝìáôïò";
+ Text[ korean ] = "ÁÖÁ¦ ID";
+ Text[ turkish ] = "Konu tanýtýcýsý";
+ Text[ language_user1 ] = " ";
+};
+
+/******************************************************************************/
+
+CheckBox RID_SVXDLG_GALLERY_CBX
+{
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 120 , 12 ) ;
+ Text = "~Unterverzeichnisse";
+ Text [ ENGLISH ] = "~Subdirectories" ;
+ TabStop = TRUE ;
+ Text [ dutch ] = "~Submappen" ;
+ Text [ english_us ] = "~Subdirectories" ;
+ Text [ italian ] = "~Sottocartelle" ;
+ Text [ spanish ] = "~Subdirectorios" ;
+ Text [ french ] = "~Sous-répertoires" ;
+ Text [ swedish ] = "~Underordnade kataloger" ;
+ Text [ danish ] = "Underbiblioteker" ;
+ Text [ portuguese_brazilian ] = "~Unterverzeichnisse" ;
+ Text [ portuguese ] = "~Subdirectórios" ;
+ Text[ chinese_simplified ] = "·ÖĿ¼(~S)";
+ Text[ russian ] = "Ïîäêàòàëîãè";
+ Text[ polish ] = "Podkatalogi";
+ Text[ japanese ] = "»ÌÞÃÞ¨Ú¸ÄØ(~S)";
+ Text[ chinese_traditional ] = "¤À¥Ø¿ý(~S)";
+ Text[ arabic ] = "ÏáÇÆá ÝÑÚíÉ";
+ Text[ dutch ] = "~Submappen";
+ Text[ chinese_simplified ] = "·ÖĿ¼(~S)";
+ Text[ greek ] = "ÕðïêáôÜëïãïé";
+ Text[ korean ] = "¼­ºêµð·ºÅ丮(~S)";
+ Text[ turkish ] = "Alt dizinler";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_ACTUALIZE_PROGRESS
+{
+ Text = "Aktualisieren" ;
+ Text [ ENGLISH ] = "Update";
+ Text [ dutch ] = "Actualiseren";
+ Text [ english_us ] = "Update";
+ Text [ italian ] = "Aggiorna";
+ Text [ spanish ] = "Actualizar";
+ Text [ french ] = "Mise à jour";
+ Text [ swedish ] = "Uppdatera";
+ Text [ danish ] = "Opdater";
+ Text [ portuguese ] = "Actualizar";
+ Text [ portuguese_brazilian ] = "Aktualisieren";
+ Text[ chinese_simplified ] = "¸üÐÂ";
+ Text[ russian ] = "Îáíîâèòü";
+ Text[ polish ] = "Aktualizuj";
+ Text[ japanese ] = "XV";
+ Text[ chinese_traditional ] = "§ó·s";
+ Text[ arabic ] = "ÊÍÏíË";
+ Text[ dutch ] = "Actualiseren";
+ Text[ chinese_simplified ] = "¸üÐÂ";
+ Text[ greek ] = "ÅíçìÝñùóç";
+ Text[ korean ] = "¾÷µ¥ÀÌÆ®";
+ Text[ turkish ] = "Güncelle";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_FOPENERROR
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Diese Datei kann nicht geöffnet werden : Diese Datei kann nicht ge÷ffnet werden */
+ /* ### ACHTUNG: Neuer Text in Resource? Diese Datei kann nicht geöffnet werden : Diese Datei kann nicht ge÷ffnet werden */
+ Text = "Diese Datei kann nicht geöffnet werden" ;
+ Text [ ENGLISH ] = "This file can not be opened" ;
+ Text [ dutch ] = "Dit bestand kan niet worden geopend" ;
+ Text [ english_us ] = "This file cannot be opened" ;
+ Text [ italian ] = "Il file non può essere aperto" ;
+ Text [ spanish ] = "No se puede abrir este archivo" ;
+ Text [ french ] = "Impossible d'ouvrir ce fichier." ;
+ Text [ swedish ] = "Denna fil kan inte öppnas" ;
+ Text [ danish ] = "Denne fil kan ikke åbnes" ;
+ Text [ portuguese ] = "Impossível abrir este ficheiro." ;
+ Text [ portuguese_brazilian ] = "Diese Datei kann nicht geöffnet werden" ;
+ Text[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÕâ¸öÎļþ¡£";
+ Text[ russian ] = "Îòêðûòü ýòîò ôàéë íå óäàåòñÿ";
+ Text[ polish ] = "Pliku nie mo¿na otworzyæ";
+ Text[ japanese ] = "‚±‚Ì̧²Ù‚ðŠJ‚­‚±‚Æ‚Í‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªk¶}±Ò³o­ÓÀɮסC";
+ Text[ arabic ] = "áÇ íãßä ÝÊÍ åÐÇ ÇáãáÝ";
+ Text[ dutch ] = "Dit bestand kan niet worden geopend";
+ Text[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÕâ¸öÎļþ¡£";
+ Text[ greek ] = "Äåí åßíáé äõíáôüí íá áíïé÷èåß áõôü ôï áñ÷åßï";
+ Text[ korean ] = "ÀÌ ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù";
+ Text[ turkish ] = "Bu dosya açýlamýyor";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_NOFILES
+{
+ Text = "<Keine Dateien>" ;
+ Text [ ENGLISH ] = "<No files>" ;
+ Text [ dutch ] = "<Geen bestanden>" ;
+ Text [ english_us ] = "<No files>" ;
+ Text [ italian ] = "<nessun file>" ;
+ Text [ spanish ] = "<Ningún archivo>" ;
+ Text [ french ] = "<Aucun fichier>" ;
+ Text [ swedish ] = "<Inga filer>" ;
+ Text [ danish ] = "<Ingen filer>" ;
+ Text [ portuguese ] = "<Sem ficheiros>" ;
+ Text [ portuguese_brazilian ] = "<Keine Dateien>" ;
+ Text[ chinese_simplified ] = "<ÎÞÎļþ>";
+ Text[ russian ] = "<Áåç ôàéëîâ>";
+ Text[ polish ] = "<Brak plików>";
+ Text[ japanese ] = "<̧²Ù ‚È‚µ>";
+ Text[ chinese_traditional ] = "<µLÀÉ®×>";
+ Text[ arabic ] = "<ÈÏæä ãáÝÇÊ>";
+ Text[ dutch ] = "<Geen bestanden>";
+ Text[ chinese_simplified ] = "<ÎÞÎļþ>";
+ Text[ greek ] = "<ÊáíÝíá áñ÷åßï>";
+ Text[ korean ] = "<ÆÄÀϾøÀ½>";
+ Text[ turkish ] = "<Dosya yok>";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_NOTHEME
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Der Themenname ist ungültig! : Der Themenname ist ung³ltig! */
+ /* ### ACHTUNG: Neuer Text in Resource? Der Themenname ist ungültig! : Der Themenname ist ung³ltig! */
+ Text = "Der Themenname ist ungültig!" ;
+ Text [ ENGLISH ] = "Not a valid themename!" ;
+ Text [ dutch ] = "De naam van het onderwerp is ongeldig!" ;
+ Text [ english_us ] = "Theme name invalid!" ;
+ Text [ italian ] = "Il nome dell'argomento non è valido!" ;
+ Text [ spanish ] = "¡El nombre del tema no es válido!" ;
+ Text [ french ] = "Aucun thème de ce nom !" ;
+ Text [ swedish ] = "Temanamnet är ogiltigt!" ;
+ Text [ danish ] = "Emnenavnet er ugyldigt!" ;
+ Text [ portuguese ] = "O nome do tema não é válido!" ;
+ Text [ portuguese_brazilian ] = "Der Themenname ist ungültig!" ;
+ Text[ chinese_simplified ] = "Õâ¸öÖ÷ÌâÃû³ÆÎÞЧ£¡";
+ Text[ russian ] = "Íåïðàâèëüíîå íàçâàíèå òåìû!";
+ Text[ polish ] = "Nazwa tematu jest nieprawid³owa!";
+ Text[ japanese ] = "ðϖ¼‚ª•s“KØ‚Å‚·!";
+ Text[ chinese_traditional ] = "³o­Ó¥DÃD¦WºÙµL®Ä¡T";
+ Text[ arabic ] = "!ÇÓã ÇáãæÖæÚ ÛíÑ ÕÇáÍ";
+ Text[ dutch ] = "De naam van het onderwerp is ongeldig!";
+ Text[ chinese_simplified ] = "Õâ¸öÖ÷ÌâÃû³ÆÎÞЧ£¡";
+ Text[ greek ] = "Ìç áðïäåêôü üíïìá èÝìáôïò!";
+ Text[ korean ] = "ÁÖÁ¦¸íÀÌ À¯È¿ÇÏÁö ¾Ê½À´Ï´Ù!";
+ Text[ turkish ] = "Bu konu adý geçerli deðil!";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_DELETEOBJ
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie dieses Objekt\nwirklich löschen? : M÷chten Sie dieses Objekt\nwirklich l÷schen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie dieses Objekt\nwirklich löschen? : M÷chten Sie dieses Objekt\nwirklich l÷schen? */
+ Text = "Möchten Sie dieses Objekt\nwirklich löschen?" ;
+ Text [ ENGLISH ] = "Do you really want to\n delete this object?" ;
+ Text [ dutch ] = "Wilt u dit object\nwerkelijk wissen?" ;
+ Text [ english_us ] = "Do you really want to\n delete this object?" ;
+ Text [ italian ] = "Cancellare veramente\nl'oggetto?" ;
+ Text [ spanish ] = "¿Desea realmente\neliminar este objeto?" ;
+ Text [ french ] = "Voulez-vous vraiment\nsupprimer cet objet ?" ;
+ Text [ swedish ] = "Vill Du verkligen radera\ndetta objekt?" ;
+ Text [ danish ] = "Er du sikker på,\nat du vil slette dette objekt?" ;
+ Text [ portuguese ] = "Eliminar realmente\neste objecto?" ;
+ Text [ portuguese_brazilian ] = "Möchten Sie dieses Objekt\nwirklich löschen?" ;
+ Text[ chinese_simplified ] = "ÄúÕæµÄҪɾ³ýÕâ¸ö¶ÔÏóÂð£¿";
+ Text[ russian ] = "Âû äåéñòâèòåëüíî õîòèòå óäàëèòü\nýòîò îáúåêò?";
+ Text[ polish ] = "Chcesz na pewno usun¹æ ten obiekt\n?";
+ Text[ japanese ] = "–{“–‚É‚±‚̵ÌÞ¼Þª¸Ä‚ð\n휂µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "±z¯u­n§R°£³o­Óª«¥ó¡H";
+ Text[ arabic ] = "åá ÊÑíÏ ÈÇáÝÚá ÍÐÝ\nåÐÇ ÇáßÇÆä¿";
+ Text[ dutch ] = "Wilt u dit object\nwerkelijk wissen?";
+ Text[ chinese_simplified ] = "ÄúÕæµÄҪɾ³ýÕâ¸ö¶ÔÏóÂð£¿";
+ Text[ greek ] = "ÈÝëåôå ðñáãìáôéêÜ íá\näéáãñáöåß áõôü ôï áíôéêåßìåíï;";
+ Text[ korean ] = "ÀÌ °³Ã¼¸¦\n Á´¸»·Î »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Bu nesneyi gerçekten\nsilmek istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_EXTFORMAT1_SYS
+{
+ Text = "wav" ;
+};
+String RID_SVXSTR_EXTFORMAT1_UI
+{
+ Text = "Wave - Klangdatei" ;
+ Text [ ENGLISH ] = "Wave - Soundfile" ;
+ Text [ dutch ] = "Wave - geluidsbestand" ;
+ Text [ english_us ] = "Wave - Sound File" ;
+ Text [ italian ] = "File wave o di suono" ;
+ Text [ spanish ] = "Wave - archivo de sonido" ;
+ Text [ french ] = "Wave - Fichier des sons" ;
+ Text [ swedish ] = "Wave - ljudfil" ;
+ Text [ danish ] = "Wave - lydfil" ;
+ Text [ portuguese ] = "Onda - Ficheiro de som" ;
+ Text [ portuguese_brazilian ] = "Wave - Klangdatei" ;
+ Text[ chinese_simplified ] = "Wave - ÒôƵÎļþ";
+ Text[ russian ] = "Wave - Ôàéë çâóêîâ";
+ Text[ polish ] = "Plik dŸwiêkowy typu Wave";
+ Text[ japanese ] = "Wave »³ÝÄÞ̧²Ù";
+ Text[ chinese_traditional ] = "Wave - Án­µÀÉ®×";
+ Text[ arabic ] = "Wave - Sound ãáÝ";
+ Text[ dutch ] = "Wave - geluidsbestand";
+ Text[ chinese_simplified ] = "Wave - ÒôƵÎļþ";
+ Text[ greek ] = "Wave - Áñ÷åßï Þ÷ïõ";
+ Text[ korean ] = "¿þÀÌºê »ç¿îµå ÆÄÀÏ";
+ Text[ turkish ] = "Wave - Ses dosyasý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_EXTFORMAT2_SYS
+{
+ Text = "aif" ;
+};
+String RID_SVXSTR_EXTFORMAT2_UI
+{
+ Text = "Audio Interchange File Format" ;
+ Text [ ENGLISH ] = "Audio Interchange File Format" ;
+ Text [ english_us ] = "Audio Interchange File Format" ;
+ Text [ italian ] = "Audio Interchange File Format" ;
+ Text [ spanish ] = "Audio Interchange File Format" ;
+ Text [ french ] = "Format Fichier Audio Interchange" ;
+ Text [ dutch ] = "Audio Interchange bestandsformaat" ;
+ Text [ swedish ] = "Audio Interchange File Format" ;
+ Text [ danish ] = "Audio Interchange filformat" ;
+ Text [ portuguese ] = "Formato Ficheiro Intercâmbio de Audio" ;
+ Text [ portuguese_brazilian ] = "Audio Interchange File Format" ;
+ Text[ chinese_simplified ] = "ÒôƵ½»»»Îļþ¸ñʽ(AIFF)";
+ Text[ russian ] = "Ôîðìàò ôàéëà Audio Interchange";
+ Text[ polish ] = "Format pliku Audio Interchange";
+ Text[ japanese ] = "µ°ÃÞ¨µ ²ÝÀ°ÁªÝ¼Þ ̧²Ù Ì«°Ï¯Ä(AIFF)";
+ Text[ chinese_traditional ] = "Án­µ¥æ´«Àɮ׮榡(AIFF)";
+ Text[ arabic ] = "ÊäÓíÞ ãáÝ ÊÈÇÏá ÓãÚí";
+ Text[ dutch ] = "Audio Interchange bestandsformaat";
+ Text[ chinese_simplified ] = "ÒôƵ½»»»Îļþ¸ñʽ(AIFF)";
+ Text[ greek ] = "ÌïñöÞ áñ÷åßïõ Audio Interchange";
+ Text[ korean ] = "¿Àµð¿À ±³È¯ ÆÄÀÏ ¼­½Ä";
+ Text[ turkish ] = "Audio Interchange dosya formatý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_EXTFORMAT3_SYS
+{
+ Text = "au" ;
+};
+String RID_SVXSTR_EXTFORMAT3_UI
+{
+ Text = "AU - Klangdatei" ;
+ Text [ ENGLISH ] = "AU - Soundfile" ;
+ Text [ english_us ] = "AU - Sound File" ;
+ Text[ portuguese ] = "AU - ficheiro áudio";
+ Text[ russian ] = "Ôàéë çâóêîâ AU";
+ Text[ greek ] = "Áñ÷åßï Þ÷ïõ AU";
+ Text[ dutch ] = "AU - geluidsbestand";
+ Text[ french ] = "Fichier son - AU";
+ Text[ spanish ] = "Archivo audio AU";
+ Text[ italian ] = "File sound - AU";
+ Text[ danish ] = "AU - lydfil";
+ Text[ swedish ] = "AU - ljudfil";
+ Text[ polish ] = "Plik dŸwiêkowy AU";
+ Text[ portuguese_brazilian ] = "AU - Sound File";
+ Text[ japanese ] = "AU »³ÝÄÞ Ì§²Ù";
+ Text[ korean ] = "AU - »ç¿îµå ÆÄÀÏ";
+ Text[ chinese_simplified ] = "AU ÉùÒôÎļþ";
+ Text[ chinese_traditional ] = "AU - Án­µÀÉ®×";
+ Text[ arabic ] = "ãáÝ ÕæÊíAU ";
+ Text[ turkish ] = "AU - Ses dosyasý";
+};
+String RID_SVXSTR_GALLERY_FILTER
+{
+ Text = "Grafikfilter" ;
+ Text [ ENGLISH ] = "Graphicsfilter" ;
+ Text [ english_us ] = "Graphics filter" ;
+ Text [ italian ] = "Filtro grafico" ;
+ Text [ spanish ] = "Filtro de imagen" ;
+ Text [ french ] = "Filtre d'image" ;
+ Text [ dutch ] = "Grafische filter" ;
+ Text [ swedish ] = "Grafikfilter" ;
+ Text [ danish ] = "Grafikfilter" ;
+ Text [ portuguese ] = "Filtro gráfico" ;
+ Text [ portuguese_brazilian ] = "Grafikfilter" ;
+ Text[ chinese_simplified ] = "ͼÐιýÂË";
+ Text[ russian ] = "Ãðàôè÷åñêèé ôèëüòð";
+ Text[ polish ] = "Filtr graficzny";
+ Text[ japanese ] = "¸Þ×̨¯¸ ̨ÙÀ";
+ Text[ chinese_traditional ] = "¹Ï¤ù¹LÂo";
+ Text[ arabic ] = "ÝáÊÑ ÇáÑÓæãÇÊ";
+ Text[ dutch ] = "Grafische filter";
+ Text[ chinese_simplified ] = "ͼÐιýÂË";
+ Text[ greek ] = "Ößëôñï ãñáöéêþí";
+ Text[ korean ] = "±×·¡ÇÈ ÇÊÅÍ";
+ Text[ turkish ] = "Grafik filtresi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_LENGTH
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Länge: : Lõnge: */
+ /* ### ACHTUNG: Neuer Text in Resource? Länge: : Lõnge: */
+ Text = "Länge:" ;
+ Text [ ENGLISH ] = "Length:" ;
+ Text [ english_us ] = "Length:" ;
+ Text [ italian ] = "Lunghezza:" ;
+ Text [ spanish ] = "Longitud:" ;
+ Text [ french ] = "Longueur :" ;
+ Text [ dutch ] = "Lengte:" ;
+ Text [ swedish ] = "Längd:" ;
+ Text [ danish ] = "Længde:" ;
+ Text [ portuguese ] = "Comprimento:" ;
+ Text [ portuguese_brazilian ] = "Länge:" ;
+ Text[ chinese_simplified ] = "³¤¶È:";
+ Text[ russian ] = "Äëèíà:";
+ Text[ polish ] = "D³ugoœæ:";
+ Text[ japanese ] = "’·‚³:";
+ Text[ chinese_traditional ] = "ªø«×:";
+ Text[ arabic ] = ":ÇáØæá";
+ Text[ dutch ] = "Lengte:";
+ Text[ chinese_simplified ] = "³¤¶È:";
+ Text[ greek ] = "ÌÞêïò:";
+ Text[ korean ] = "±æÀÌ:";
+ Text[ turkish ] = "Uzunluk:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_SIZE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Größe: : Gr÷˜e: */
+ /* ### ACHTUNG: Neuer Text in Resource? Größe: : Gr÷˜e: */
+ Text = "Größe:" ;
+ Text [ ENGLISH ] = "Size:" ;
+ Text [ dutch ] = "Grootte:" ;
+ Text [ english_us ] = "Size:" ;
+ Text [ italian ] = "Dimensione:" ;
+ Text [ spanish ] = "Tamaño:" ;
+ Text [ french ] = "Taille :" ;
+ Text [ swedish ] = "Storlek:" ;
+ Text [ danish ] = "Størrelse:" ;
+ Text [ portuguese ] = "Tamanho:" ;
+ Text [ portuguese_brazilian ] = "Größe:" ;
+ Text[ chinese_simplified ] = "´óС:";
+ Text[ russian ] = "Ðàçìåð:";
+ Text[ polish ] = "Rozmiar:";
+ Text[ japanese ] = "»²½Þ:";
+ Text[ chinese_traditional ] = "¤j¤p:";
+ Text[ arabic ] = ":ÇáÍÌã";
+ Text[ dutch ] = "Grootte:";
+ Text[ chinese_simplified ] = "´óС:";
+ Text[ greek ] = "ÌÝãåèïò:";
+ Text[ korean ] = "Å©±â:";
+ Text[ turkish ] = "Büyüklük:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_DELETEDD
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie die verknüpfte Datei löschen? : M÷chten Sie die verkn³pfte Datei l÷schen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie die verknüpfte Datei löschen? : M÷chten Sie die verkn³pfte Datei l÷schen? */
+ Text = "Möchten Sie die verknüpfte Datei löschen?" ;
+ Text [ ENGLISH ] = "Do you want to delete the linked file?" ;
+ Text [ dutch ] = "Wilt u het gekoppelde bestand wissen ?" ;
+ Text [ english_us ] = "Do you want to delete the linked file?" ;
+ Text [ italian ] = "Eliminare il file collegato?" ;
+ Text [ spanish ] = "¿Desea eliminar el archivo enlazado?" ;
+ Text [ french ] = "Voulez-vous supprimer le fichier lié?" ;
+ Text [ swedish ] = "Vill Du radera den länkade filen?" ;
+ Text [ danish ] = "Vil du slette den kædede fil?" ;
+ Text [ portuguese ] = "Deseja eliminar o ficheiro ligado?" ;
+ Text [ portuguese_brazilian ] = "Möchten Sie die verknüpfte Datei löschen?" ;
+ Text[ chinese_simplified ] = "ÄúҪɾ³ýÁ´½ÓµÄÎļþÂð£¿";
+ Text[ russian ] = "Âû õîòèòå óäàëèòü ñâÿçàííûé ôàéë?";
+ Text[ polish ] = "Chcesz na pewno usun¹æ po³¹czony plik?";
+ Text[ japanese ] = "Øݸ‚µ‚½Ì§²Ù‚ð휂µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "±z­n§R°£³sµ²ªºÀɮסS";
+ Text[ arabic ] = "åá ÊÑíÏ ÍÐÝ ÇáãáÝ ÇáãÑÊÈØ¿";
+ Text[ dutch ] = "Wilt u het gekoppelde bestand wissen ?";
+ Text[ chinese_simplified ] = "ÄúҪɾ³ýÁ´½ÓµÄÎļþÂð£¿";
+ Text[ greek ] = "ÈÝëåôå íá äéáãñáöåß ôï óõíäåäåìÝíï áñ÷åßï;";
+ Text[ korean ] = "¿¬°áµÈ ÆÄÀÏÀ» »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Baðlantý oluþturduðunuz dosyayý silmek istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_SEARCH
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie die Dateiliste aktualisieren? : M÷chten Sie die Dateiliste aktualisieren? */
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie die Dateiliste aktualisieren? : M÷chten Sie die Dateiliste aktualisieren? */
+ Text = "Möchten Sie die Dateiliste aktualisieren?" ;
+ Text [ ENGLISH ] = "Do you want to search again for files?" ;
+ Text [ english_us ] = "Do you want to update the file list?" ;
+ Text [ italian ] = "Aggiornare l'elenco dei file?" ;
+ Text [ spanish ] = "¿Desea actualizar la lista de archivos?" ;
+ Text [ french ] = "Voulez-vous actualiser la liste des fichiers ?" ;
+ Text [ dutch ] = "Wilt u de bestandslijst actualiseren ?" ;
+ Text [ swedish ] = "Vill Du uppdatera fillistan?" ;
+ Text [ danish ] = "Vil du opdatere fillisten?" ;
+ Text [ portuguese ] = "Deseja actualizar a lista de ficheiros?" ;
+ Text [ portuguese_brazilian ] = "Möchten Sie die Dateiliste aktualisieren?" ;
+ Text[ chinese_simplified ] = "ÄúÒª¸üÐÂÕâ¸öÎļþÁе¥Âð£¿";
+ Text[ russian ] = "Âû õîòèòå îáíîâèòü ñïèñîê ôàéëà?";
+ Text[ polish ] = "Czy chcesz aktualizowaæ listê plików?";
+ Text[ japanese ] = "̧²ÙؽĂðXV‚µ‚Ü‚·‚©H";
+ Text[ chinese_traditional ] = "±z­n§ó·s³o­ÓÀɮײM³æ¡S";
+ Text[ arabic ] = "åá ÊÑíÏ ÊÍÏíË ÞÇÆãÉ ÇáãáÝÇÊ¿";
+ Text[ dutch ] = "Wilt u de bestandslijst actualiseren ?";
+ Text[ chinese_simplified ] = "ÄúÒª¸üÐÂÕâ¸öÎļþÁе¥Âð£¿";
+ Text[ greek ] = "ÈÝëåôå íá åíçìåñùèåß ç ëßóôá áñ÷åßùí;";
+ Text[ korean ] = "ÆÄÀϸñ·ÏÀ» ¾÷µ¥ÀÌÆ®ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Dosya listesini güncellemek istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_SGIERROR
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Diese Datei kann nicht geöffnet werden.\nMöchten Sie einen anderen Suchpfad angeben? : Diese Datei kann nicht ge÷ffnet werden.\nM÷chten Sie einen anderen Suchpfad angeben? */
+ /* ### ACHTUNG: Neuer Text in Resource? Diese Datei kann nicht geöffnet werden.\nMöchten Sie einen anderen Suchpfad angeben? : Diese Datei kann nicht ge÷ffnet werden.\nM÷chten Sie einen anderen Suchpfad angeben? */
+ Text = "Diese Datei kann nicht geöffnet werden.\nMöchten Sie einen anderen Suchpfad angeben? " ;
+ Text [ ENGLISH ] = "This file can not be opened.\nDo you want to set a new search path?" ;
+ Text [ english_us ] = "This file cannot be opened. \nDo you want to enter a different search path? " ;
+ Text [ italian ] = "Questo file non può essere aperto.\nDigitare un nuovo percorso di ricerca? " ;
+ Text [ spanish ] = "No se puede abrir este archivo. \n¿Desea usted establecer otra ruta de búsqueda? " ;
+ Text [ french ] = "Impossible d'ouvrir ce fichier.\nVoulez-vous indiquer un nouveau chemin de recherche ? " ;
+ Text [ dutch ] = "Dit bestand kan niet worden geopend. \nWilt u een ander zoekpad aangeven?? " ;
+ Text [ swedish ] = "Denna fil kan inte öppnas.\nVill Du ange en annan sökväg? " ;
+ Text [ danish ] = "Denne fil kan ikke åbnes.\nVil du prøve en ny søgesti? " ;
+ Text [ portuguese ] = "Impossível abrir este ficheiro.\nDeseja indicar outro atalho de localização? " ;
+ Text [ portuguese_brazilian ] = "Diese Datei kann nicht geöffnet werden. \nMöchten Sie einen anderen Suchpfad angeben? " ;
+ Text[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÕâ¸öÎļþ¡£\nÄúÒª¸ø¶¨Ò»¸öÆäËûµÄ·¾¶Â𣿠";
+ Text[ russian ] = "Îòêðûòü ýòîò ôàéë íå óäàåòñÿ.\nÂû õîòèòå çàäàòü äðóãîé ïóòü ïîèñêà? ";
+ Text[ polish ] = "Tego pliku nie mo¿na otworzyæ.\nCzy chcesz podaæ inn¹ œcie¿kê wyszukiwania? ";
+ Text[ japanese ] = "‚±‚Ì̧²Ù‚ÍŠJ‚­‚±‚Æ‚ª‚Å‚«‚Ü‚¹‚ñB\n•Ê‚ÌŒŸõÊß½–¼‚ð“ü—Í‚µ‚Ü‚·‚©? ";
+ Text[ chinese_traditional ] = "µLªk¶}±Ò³o­ÓÀɮסC\n±z­n¿é¤J¤@­Ó¨ä¥Lªº¸ô®|¡S ";
+ Text[ arabic ] = "áÇ íãßä ÝÊÍ åÐÇ ÇáãáÝ.\nåá ÊÑíÏ ÅÏÎÇá ãÓÇÑ ÈÍË ÂÎÑ¿ ";
+ Text[ dutch ] = "Dit bestand kan niet worden geopend. \nWilt u een ander zoekpad aangeven?? ";
+ Text[ chinese_simplified ] = "ÎÞ·¨´ò¿ªÕâ¸öÎļþ¡£\nÄúÒª¸ø¶¨Ò»¸öÆäËûµÄ·¾¶Â𣿠";
+ Text[ greek ] = "Äåí åßíáé äõíáôüí íá áíïé÷èåß áõôü ôï áñ÷åßï.\nÈÝëåôå íá åéóÜãåôå ìéá äéáöïñåôéêÞ äéáäñïìÞ áíáæÞôçóçò; ";
+ Text[ korean ] = "ÀÌ ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù. \n´Ù¸¥ °Ë»ö°æ·Î¸¦ ÀÔ·ÂÇϽðڽÀ´Ï±î? ";
+ Text[ turkish ] = "Bu dosya açýlamýyor.\nBaþka bir veri yolu girmek istiyor musunuz? ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_NEWTHEME
+{
+ Text = "Neues Thema" ;
+ Text [ ENGLISH ] = "New theme" ;
+ Text [ english_us ] = "New Theme" ;
+ Text [ dutch ] = "Nieuw onderwerp" ;
+ Text [ swedish ] = "Nytt tema" ;
+ Text [ danish ] = "Nyt emne" ;
+ Text [ italian ] = "Nuovo argomento" ;
+ Text [ spanish ] = "Nuevo Tema" ;
+ Text [ french ] = "Nouveau thème" ;
+ Text [ portuguese ] = "Novo tema" ;
+ Text [ portuguese_brazilian ] = "~Thema" ;
+ Text[ chinese_simplified ] = "ÐÂÖ÷Ìâ";
+ Text[ russian ] = "Íîâàÿ òåìà";
+ Text[ polish ] = "Nowy temat";
+ Text[ japanese ] = "V‚µ‚¢Ã°Ï";
+ Text[ chinese_traditional ] = "·s«Ø¥DÃD";
+ Text[ arabic ] = "ãæÖæÚ ÌÏíÏ";
+ Text[ dutch ] = "Nieuw onderwerp";
+ Text[ chinese_simplified ] = "ÐÂÖ÷Ìâ";
+ Text[ greek ] = "ÍÝï èÝìá";
+ Text[ korean ] = "»õ ÁÖÁ¦";
+ Text[ turkish ] = "Yeni konu";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_BROWSER
+{
+ Text = "~Verwaltung..." ;
+ Text [ ENGLISH ] = "~Browser..." ;
+ Text [ dutch ] = "~Beheer...." ;
+ Text [ english_us ] = "~Organizer..." ;
+ Text [ italian ] = "~Gestisci..." ;
+ Text [ spanish ] = "~Administración..." ;
+ Text [ french ] = "~Organiser..." ;
+ Text [ swedish ] = "~Förvalta..." ;
+ Text [ danish ] = "Administration..." ;
+ Text [ portuguese ] = "~Organizador..." ;
+ Text [ portuguese_brazilian ] = "~Verwaltung..." ;
+ Text[ chinese_simplified ] = "¹ÜÀí(~O)...";
+ Text[ russian ] = "Îðãàíèçîâàòü...";
+ Text[ polish ] = "Zarz¹dzanie...";
+ Text[ japanese ] = "ŠÇ—(~O)...";
+ Text[ chinese_traditional ] = "ºÞ²z(~O)...";
+ Text[ arabic ] = "...ÊäÙíã";
+ Text[ dutch ] = "~Beheer....";
+ Text[ chinese_simplified ] = "¹ÜÀí(~O)...";
+ Text[ greek ] = "Äéá÷åßñéóç...";
+ Text[ korean ] = "°ü¸®(~O)...";
+ Text[ turkish ] = "Yönet...";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_THEMEERR
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Dieser Themenname existiert bereits.\nBitte wählen Sie einen anderen Namen. : Dieser Themenname existiert bereits.\nBitte wõhlen Sie einen anderen Namen. */
+ /* ### ACHTUNG: Neuer Text in Resource? Dieser Themenname existiert bereits.\nBitte wählen Sie einen anderen Namen. : Dieser Themenname existiert bereits.\nBitte wõhlen Sie einen anderen Namen. */
+ Text = "Dieser Themenname existiert bereits.\nBitte wählen Sie einen anderen Namen." ;
+ Text [ ENGLISH ] = "This themename already exists.\nPlease choose a different name." ;
+ Text [ dutch ] = "Deze naam bestaat reeds.\nKies een andere." ;
+ Text [ english_us ] = "This theme name already exists.\nPlease choose a different name." ;
+ Text [ italian ] = "Il nome dell'argomento esiste già.\nScegliere un altro." ;
+ Text [ spanish ] = "Este nombre de tema ya existe.\nPor favor elija otro nombre." ;
+ Text [ french ] = "Le nom de ce thème existe déjà.\nVeuillez choisir un autre nom." ;
+ Text [ swedish ] = "Detta temanamn finns redan.\nVälj ett annat namn." ;
+ Text [ danish ] = "Dette emnenavn eksisterer allerede.\nVælg venligst et andet navn." ;
+ Text [ portuguese ] = "Este nome do tema já existe.\nEscolha outro." ;
+ Text [ portuguese_brazilian ] = "Dieser Themenname existiert bereits.\nBitte wählen Sie einen anderen Namen." ;
+ Text[ chinese_simplified ] = "Õâ¸öÖ÷ÌâÃû³ÆÒѾ­´æÔÚ¡£\nÇëÄúÑ¡ÔñÒ»¸öÆäËûµÄÃû³Æ¡£";
+ Text[ russian ] = "Òàêîå íàçâàíèå òåìû óæå ñóùåñòâóåò.\nÂûáåðèòå, ïîæàëóéñòà, äðóãîå íàçâàíèå.";
+ Text[ polish ] = "Ta nazwa tematu ju¿ istnieje.\nWybierz inn¹ nazwê.";
+ Text[ japanese ] = "‚±‚Ìðϖ¼‚Í‚·‚Å‚É‚ ‚è‚Ü‚·B\n•Ê‚Ì–¼‘O‚ð‘I‘ð‚µ‚Ä‰º‚³‚¢B";
+ Text[ chinese_traditional ] = "³o­Ó¥DÃD¦WºÙ¤w¸g¦s¦b¡C\n½Ð±z¿ï¾Ü¤@­Ó¨ä¥Lªº¦WºÙ¡C";
+ Text[ arabic ] = "ÇÓã ÇáãæÖæÚ åÐÇ ãæÌæÏ ãÓÈÞÇð.\nÇáÑÌÇÁ ÇÎÊíÇÑ ÇÓã ÂÎÑ.";
+ Text[ dutch ] = "Deze naam bestaat reeds.\nKies een andere.";
+ Text[ chinese_simplified ] = "Õâ¸öÖ÷ÌâÃû³ÆÒѾ­´æÔÚ¡£\nÇëÄúÑ¡ÔñÒ»¸öÆäËûµÄÃû³Æ¡£";
+ Text[ greek ] = "Áõôü ôï üíïìá èÝìáôïò õðÜñ÷åé Þäç.\nÐáñáêáëþ åðéëÝîôå Ýíá Üëëï üíïìá.";
+ Text[ korean ] = "ÀÌ ÁÖÁ¦¸íÀº ÀÌ¹Ì ÀÖ½À´Ï´Ù.\n´Ù¸¥ À̸§À» ¼±ÅÃÇϽʽÿÀ.";
+ Text[ turkish ] = "Bu konu adý mevcut durumda.\nBaþka bir ad seçin.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERYPROPS_THEME
+{
+ Text = "Thema;Themen" ;
+ Text [ ENGLISH ] = "Theme;Themes" ;
+ Text [ english_us ] = "Theme;Themes" ;
+ Text [ italian ] = "Argomento;Argomenti" ;
+ Text [ spanish ] = "Tema;Temas" ;
+ Text [ french ] = "Thème;Thèmes" ;
+ Text [ dutch ] = "Onderwerp;Onderwerpen" ;
+ Text [ swedish ] = "Tema;Teman" ;
+ Text [ danish ] = "Emne;Emner" ;
+ Text [ portuguese_brazilian ] = "Thema;Themen" ;
+ Text [ portuguese ] = "Tema;Temas" ;
+ Text[ chinese_simplified ] = "Ö÷Ìâ;Ö÷Ìâ";
+ Text[ russian ] = "Òåìà;Òåìû";
+ Text[ polish ] = "Temat;Tematy";
+ Text[ japanese ] = "ðÏ";
+ Text[ chinese_traditional ] = "¥DÃD;¥DÃD";
+ Text[ arabic ] = "ãæÖæÚ;ãæÖæÚÇÊ";
+ Text[ dutch ] = "Onderwerp;Onderwerpen";
+ Text[ chinese_simplified ] = "Ö÷Ìâ;Ö÷Ìâ";
+ Text[ greek ] = "ÈÝìá, ÈÝìáôá";
+ Text[ korean ] = "ÁÖÁ¦;ÁÖÁ¦µé";
+ Text[ turkish ] = "Konu;Konular";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERYPROPS_OBJECT
+{
+ Text = "Objekt;Objekte" ;
+ Text [ ENGLISH ] = "Object;Objects" ;
+ Text [ english_us ] = "Object;Objects" ;
+ Text [ italian ] = "Oggetto;oggetti" ;
+ Text [ spanish ] = "Objeto;Objetos" ;
+ Text [ french ] = "Objet;Objets" ;
+ Text [ dutch ] = "Object;Objecten" ;
+ Text [ swedish ] = "Objekt;Objekt" ;
+ Text [ danish ] = "Objekt;Objekter" ;
+ Text [ portuguese_brazilian ] = "Objekt;Objekte" ;
+ Text [ portuguese ] = "Objecto;Objectos" ;
+ Text[ chinese_simplified ] = "¶ÔÏó;¶ÔÏó";
+ Text[ russian ] = "Îáúåêò;Îáúåêòû";
+ Text[ polish ] = "Obiekt;Obiekty";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä;µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ª«¥ó;ª«¥ó";
+ Text[ arabic ] = "ßÇÆä;ßÇÆäÇÊ";
+ Text[ dutch ] = "Object;Objecten";
+ Text[ chinese_simplified ] = "¶ÔÏó;¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíï, Áíôéêåßìåíá";
+ Text[ korean ] = "°³Ã¼ ; °³Ã¼µé";
+ Text[ turkish ] = "Nesne;Nesneler";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERYPROPS_GALTHEME
+{
+ Text = "Gallery-Thema" ;
+ Text [ ENGLISH ] = "Gallery theme" ;
+ Text [ english_us ] = "Gallery Theme" ;
+ Text [ dutch ] = "Gallery-onderwerp" ;
+ Text [ italian ] = "Argomento Gallery" ;
+ Text [ spanish ] = "Tema Gallery" ;
+ Text [ french ] = "Thème Gallery" ;
+ Text [ swedish ] = "Gallery-tema" ;
+ Text [ danish ] = "Gallery-emne" ;
+ Text [ portuguese ] = "Tema da Gallery" ;
+ Text [ portuguese_brazilian ] = "Gallery-Thema" ;
+ Text[ chinese_simplified ] = "»­ÀÈ-Ö÷Ìâ";
+ Text[ russian ] = "Òåìà ãàëåðåè";
+ Text[ polish ] = "Temat galerii";
+ Text[ japanese ] = "·Þ¬×Ø° ðÏ";
+ Text[ chinese_traditional ] = "µe´Y¥DÃD";
+ Text[ arabic ] = "ãæÖæÚ ÇáÌÇáíÑí";
+ Text[ dutch ] = "Gallery-onderwerp";
+ Text[ chinese_simplified ] = "»­ÀÈ-Ö÷Ìâ";
+ Text[ greek ] = "ÈÝìá Gallery";
+ Text[ korean ] = "Gallery ÁÖÁ¦";
+ Text[ turkish ] = "Galleri konusu";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_IMPORTTHEME
+{
+ Text = "~Importieren..." ;
+ Text [ English ] = "~Import..." ;
+ Text [ english_us ] = "I~mport..." ;
+ Text [ dutch ] = "Im~porteren..." ;
+ Text [ swedish ] = "~Importera..." ;
+ Text [ danish ] = "Importer..." ;
+ Text [ italian ] = "Im~porta..." ;
+ Text [ spanish ] = "Im~portar..." ;
+ Text [ french ] = "Im~porter..." ;
+ Text [ portuguese ] = "Im~portar..." ;
+ Text [ portuguese_brazilian ] = "Im~portieren..." ;
+ Text[ chinese_simplified ] = "ÊäÈë(~M)...";
+ Text[ russian ] = "Èìïîðò...";
+ Text[ polish ] = "Importuj..";
+ Text[ japanese ] = "²ÝÎß°Ä(~M)...";
+ Text[ chinese_traditional ] = "¿é¤J(~M)...";
+ Text[ arabic ] = "...ÇÓÊíÑÇÏ";
+ Text[ dutch ] = "Im~porteren...";
+ Text[ chinese_simplified ] = "ÊäÈë(~M)...";
+ Text[ greek ] = "ÅéóáãùãÞ...";
+ Text[ korean ] = "°¡Á® ¿À±â(~M)...";
+ Text[ turkish ] = "Ýç~e aktar...";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GALLERY_CREATETHEME
+{
+ Text = "Neues Thema..." ;
+ Text [ ENGLISH ] = "New theme..." ;
+ Text [ english_us ] = "New Theme..." ;
+ Text [ dutch ] = "Nieuw onderwerp..." ;
+ Text [ swedish ] = "Nytt tema..." ;
+ Text [ danish ] = "Nyt emne..." ;
+ Text [ italian ] = "Nuovo argomento..." ;
+ Text [ spanish ] = "Nuevo tema..." ;
+ Text [ french ] = "Nouveau thème..." ;
+ Text [ portuguese ] = "Novo tema..." ;
+ Text [ portuguese_brazilian ] = "Neues Thema" ;
+ Text[ chinese_simplified ] = "н¨Ö÷Ìâ...";
+ Text[ russian ] = "Íîâàÿ òåìà";
+ Text[ polish ] = "Nowy temat";
+ Text[ japanese ] = "V‚µ‚¢Ã°Ï";
+ Text[ chinese_traditional ] = "·s«Ø¥DÃD...";
+ Text[ arabic ] = "...ãæÖæÚ ÌÏíÏ";
+ Text[ dutch ] = "Nieuw onderwerp...";
+ Text[ chinese_simplified ] = "н¨Ö÷Ìâ...";
+ Text[ greek ] = "ÍÝï èÝìá...";
+ Text[ korean ] = "»õ ÁÖÁ¦...";
+ Text[ turkish ] = "Yeni konu...";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_SVXSTR_GALLERY_READONLY
+{
+ Text = " (schreibgeschützt)" ;
+ 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[ arabic ] = "(ãÍãí ÖÏ ÇáßÊÇÈÉ)";
+ Text[ dutch ] = "(alleen lezen)";
+ Text[ chinese_simplified ] = "(·À¸²Ð´)";
+ Text[ greek ] = "(ìüíï ãéá áíÜãíùóç)";
+ Text[ korean ] = "(¾²±âº¸È£)";
+ Text[ turkish ] = "(Salt okunur)";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_SVXSTR_GALLERY_ALLFILES
+{
+ 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[ dutch ] = "<Alle bestanden>";
+ Text[ chinese_simplified ] = "<È«²¿µÄÎļþ>";
+ Text[ greek ] = "<¼ëá ôá áñ÷åßá>";
+ Text[ korean ] = "<¸ðµç ÆÄÀÏ>";
+ Text[ turkish ] = "<Tüm dosyalar>";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_SVXSTR_GALLERY_DIALOGID
+{
+ Text = "ID vergeben" ;
+ Text [ English ] = "Assign ID" ;
+ Text [ english_us ] = "Assign ID" ;
+ Text[ portuguese ] = "Atribuir ID";
+ Text[ russian ] = "Íàçíà÷èòü ID";
+ Text[ dutch ] = "ID bezet";
+ Text[ french ] = "Attribuer un ID";
+ Text[ spanish ] = "Asignar ID";
+ Text[ italian ] = "Attribuisci ID";
+ Text[ danish ] = "Tildel ID";
+ Text[ swedish ] = "Tilldela ID";
+ Text[ polish ] = "Przypisz identyfikator";
+ Text[ portuguese_brazilian ] = "Assign ID";
+ Text[ japanese ] = "ID ‚ÌŠ„‚è“–‚Ä";
+ Text[ chinese_simplified ] = "·ÖÅä ID";
+ Text[ chinese_traditional ] = "¤À°t ID";
+ Text[ arabic ] = "ÊÚííä ÇáÊÚÑíÝ";
+ Text[ dutch ] = "ID bezet";
+ Text[ chinese_simplified ] = "·ÖÅä ID";
+ Text[ greek ] = "ÁðïíïìÞ ôáõôüôçôáò (ID)";
+ Text[ korean ] = "ID ÁöÁ¤";
+ Text[ turkish ] = "Tanýtýcý ata";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_SVXSTR_GALLERY_ID_EXISTS
+{
+ Text = "Diese ID existiert bereits..." ;
+ Text [ English ] = "This ID already exists..." ;
+ Text [ english_us ] = "This ID already exists..." ;
+ Text[ portuguese ] = "Este ID já existe...";
+ Text[ russian ] = "Ýòà ID óæå ñóùåñòâóåò...";
+ Text[ dutch ] = "ID bestaat reeds...";
+ Text[ french ] = "Cet ID existe déjà...";
+ Text[ spanish ] = "Esta ID ya existe...";
+ Text[ italian ] = "Questo ID esiste già...";
+ Text[ danish ] = "Denne ID eksisterer allerede...";
+ Text[ swedish ] = "Det här ID existerar redan...";
+ Text[ polish ] = "Ten ID ju¿ istnieje...";
+ Text[ portuguese_brazilian ] = "This ID already exists...";
+ Text[ japanese ] = "‚±‚Ì ID ‚Í‚·‚Å‚É‚ ‚è‚Ü‚·...";
+ Text[ chinese_simplified ] = "Õâ¸ö ID ÒѾ­´æÔÚ...";
+ Text[ chinese_traditional ] = "³o­Ó ID ¤w¸g¦s¦b...";
+ Text[ arabic ] = "...åÐÇ ÇáÊÚÑíÝ ãæÌæÏ ãÓÈÞÇð";
+ Text[ dutch ] = "ID bestaat reeds...";
+ Text[ chinese_simplified ] = "Õâ¸ö ID ÒѾ­´æÔÚ...";
+ Text[ greek ] = "ÁõôÞ ç ôáõôüôçôá ( ID) õðÜñ÷åé Þäç...";
+ Text[ korean ] = "ÀÌ ID´Â ÀÌ¹Ì ÀÖ½À´Ï´Ù ...";
+ Text[ turkish ] = "Bu tanýtýcý mevcut durumda...";
+ Text[ language_user1 ] = " ";
+};
+
+/******************************************************************************/
+
+Bitmap RID_SVXBMP_GALLERY
+{
+ File = "lx03135.bmp" ;
+};
+
+Bitmap RID_SVXBMP_THEME_NORMAL
+{
+ File = "galnors.bmp" ;
+};
+
+Bitmap RID_SVXBMP_THEME_NORMAL_BIG
+{
+ File = "galnorl.bmp" ;
+};
+
+Bitmap RID_SVXBMP_THEME_IMPORTED
+{
+ File = "galimps.bmp" ;
+};
+
+Bitmap RID_SVXBMP_THEME_IMPORTED_BIG
+{
+ File = "galimpl.bmp" ;
+};
+
+Bitmap RID_SVXBMP_THEME_READONLY
+{
+ File = "galrdos.bmp" ;
+};
+
+Bitmap RID_SVXBMP_THEME_READONLY_BIG
+{
+ File = "galrdol.bmp" ;
+};
+
+Bitmap RID_SVXBMP_THEME_DEFAULT
+{
+ File = "galdefs.bmp" ;
+};
+
+Bitmap RID_SVXBMP_THEME_DEFAULT_BIG
+{
+ File = "galdefl.bmp" ;
+};
+
+Bitmap RID_SVXBMP_GALLERY_SOUND_0
+{
+ File = "galsnd0.bmp";
+};
+
+Bitmap RID_SVXBMP_GALLERY_SOUND_1
+{
+ File = "galsnd1.bmp";
+};
+
+Bitmap RID_SVXBMP_GALLERY_SOUND_2
+{
+ File = "galsnd2.bmp";
+};
+
+Bitmap RID_SVXBMP_GALLERY_SOUND_3
+{
+ File = "galsnd3.bmp";
+};
+
+Bitmap RID_SVXBMP_GALLERY_SOUND_4
+{
+ File = "galsnd4.bmp";
+};
+
+Bitmap RID_SVXBMP_GALLERY_SOUND_5
+{
+ File = "galsnd5.bmp";
+};
+
+Bitmap RID_SVXBMP_GALLERY_SOUND_6
+{
+ File = "galsnd6.bmp";
+};
+
+Bitmap RID_SVXBMP_GALLERY_SOUND_7
+{
+ File = "galsnd7.bmp";
+};
+
+/******************************************************************************/
+
+Menu RID_SVXMN_GALLERY1
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_ACTUALIZE;
+ HelpId = HID_GALLERY_ACTUALIZE;
+ Text = "~Aktualisieren" ;
+ Text [ ENGLISH ] = "~Update";
+ Text [ dutch ] = "~Actualiseren";
+ Text [ english_us ] = "Update ";
+ Text [ italian ] = "Aggiorna";
+ Text [ spanish ] = "Actuali~zar";
+ Text [ french ] = "Mise à jour";
+ Text [ swedish ] = "Uppd~atera";
+ Text [ danish ] = "Opdater";
+ Text [ portuguese ] = "Actualizar";
+ Text [ portuguese_brazilian ] = "Aktualisieren";
+ Text[ chinese_simplified ] = "¸üÐÂ";
+ Text[ russian ] = "Îáíîâèòü";
+ Text[ polish ] = "Aktualizuj";
+ Text[ japanese ] = "XV";
+ Text[ chinese_traditional ] = "§ó·s";
+ Text[ arabic ] = "ÊÍÏíË";
+ Text[ dutch ] = "~Actualiseren";
+ Text[ chinese_simplified ] = "¸üÐÂ";
+ Text[ greek ] = "~ÅíçìÝñùóç";
+ Text[ korean ] = "¾÷µ¥ÀÌÆ®";
+ Text[ turkish ] = "Güncelle";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = MN_DELETE ;
+ HelpId = HID_GALLERY_MN_DELETE ;
+ Text = "~Löschen" ;
+ Text [ ENGLISH ] = "~Delete" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ italian ] = "~Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "~Slet" ;
+ Text [ portuguese_brazilian ] = "~Löschen" ;
+ Text [ portuguese ] = "E~liminar" ;
+ Text[ russian ] = "Óäàëèòü";
+ Text[ polish ] = "Usuñ";
+ Text[ japanese ] = "íœ(~D)";
+ Text[ chinese_simplified ] = "ɾ³ý(~D)";
+ Text[ greek ] = "Äéáãñá~öÞ";
+ Text[ korean ] = "»èÁ¦(~D)";
+ Text[ chinese_traditional ] = "§R°£(~D)";
+ Text[ arabic ] = "ÍÐÝ";
+ Text[ turkish ] = "Sil";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_RENAME;
+ HelpId = HID_GALLERY_RENAME;
+ Text = "~Umbenennen" ;
+ Text [ English ] = "~Rename" ;
+ Text [ english_us ] = "~Rename" ;
+ Text [ portuguese_brazilian ] = "~Umbenennen" ;
+ Text [ swedish ] = "~Byt namn" ;
+ Text [ danish ] = "O~mdøb" ;
+ Text [ italian ] = "~Rinomina" ;
+ Text [ spanish ] = "~Cambiar nombre" ;
+ Text [ french ] = "~Renommer" ;
+ Text [ dutch ] = "~Naam wijzigen" ;
+ Text [ portuguese ] = "~Mudar nome" ;
+ Text[ chinese_simplified ] = "ÖØÃüÃû(~R)";
+ Text[ russian ] = "Ïåðåèìåíîâàòü";
+ Text[ polish ] = "Zmieñ nazwê";
+ Text[ japanese ] = "‰ü–¼(~R)";
+ Text[ chinese_traditional ] = "­«·s©R¦W(~R)";
+ Text[ arabic ] = "ÅÚÇÏÉ ÊÓãíÉ";
+ Text[ dutch ] = "~Naam wijzigen";
+ Text[ chinese_simplified ] = "ÖØÃüÃû(~R)";
+ Text[ greek ] = "~Ìåôïíïìáóßá";
+ Text[ korean ] = "À̸§ º¯°æ(~R)";
+ Text[ turkish ] = "Ye~niden adlandýr";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = MN_PROPERTIES;
+ HelpId = HID_GALLERY_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 ] = "~Propriétés ..." ;
+ Text [ dutch ] = "~Eigenschappen ..." ;
+ Text [ portuguese_brazilian ] = "~Eigenschaften ..." ;
+ Text [ portuguese ] = "~Propriedades ..." ;
+ Text[ chinese_simplified ] = "ÊôÐÔ(~I)...";
+ Text[ russian ] = "Ñâîéñòâà ...";
+ Text[ polish ] = "W³aœciwoœci ...";
+ 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 ] = " ";
+ };
+ };
+};
+
+/******************************************************************************/
+
+Menu RID_SVXMN_GALLERY2
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_ADDMENU ;
+ HelpId = HID_GALLERY_MN_ADDMENU ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Hinzufügen : ~Hinzuf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Hinzufügen : ~Hinzuf³gen */
+ Text = "~Hinzufügen" ;
+ Text [ ENGLISH ] = "~Add" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_ADD ;
+ HelpId = HID_GALLERY_MN_ADD ;
+ Text = "~Kopie" ;
+ Text [ ENGLISH ] = "~Copy" ;
+ Text [ english_us ] = "~Copy" ;
+ Text [ italian ] = "~Copia" ;
+ Text [ spanish ] = "~Copia" ;
+ Text [ french ] = "C~opie" ;
+ Text [ dutch ] = "~Kopie" ;
+ Text [ swedish ] = "~Kopia" ;
+ Text [ danish ] = "Kopi" ;
+ Text [ portuguese ] = "~Cópia" ;
+ Text [ portuguese_brazilian ] = "~Kopie" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fügt das gewählte Objekt\nals Kopie in das Dokument ein : F³gt das gewõhlte Objekt\nals Kopie in das Dokument ein */
+ Text[ chinese_simplified ] = "¸´ÖÆ(~C)";
+ Text[ russian ] = "Êîïèÿ";
+ Text[ polish ] = "Kopia";
+ Text[ japanese ] = "ºËß°(~C)";
+ Text[ chinese_traditional ] = "½Æ»s(~C)";
+ Text[ arabic ] = "äÓÎÉ";
+ Text[ dutch ] = "~Kopie";
+ Text[ chinese_simplified ] = "¸´ÖÆ(~C)";
+ Text[ greek ] = "Áíôß~ãñáöï";
+ Text[ korean ] = "º¹»ç(~C)";
+ Text[ turkish ] = "Kopya";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_ADD_LINK ;
+ HelpId = HID_GALLERY_MN_ADD_LINK ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Verknüpfung : ~Verkn³pfung */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Verknüpfung : ~Verkn³pfung */
+ Text = "~Verknüpfung" ;
+ Text [ ENGLISH ] = "~Linkage" ;
+ Text [ english_us ] = "Link" ;
+ Text [ italian ] = "C~ollegamento" ;
+ Text [ spanish ] = "~Vínculo" ;
+ Text [ french ] = "~Lien" ;
+ Text [ dutch ] = "~Koppeling" ;
+ Text [ swedish ] = "Lä~nk" ;
+ Text [ danish ] = "Kæde" ;
+ Text [ portuguese_brazilian ] = "~Verknüpfung" ;
+ Text [ portuguese ] = "~Ligação" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fügt das gewählte Objekt als\nVerknüpfung in das Dokument ein : F³gt das gewõhlte Objekt als\nVerkn³pfung in das Dokument ein */
+ Text[ chinese_simplified ] = "Á´½Ó(~L)";
+ Text[ russian ] = "Ññûëêà";
+ Text[ polish ] = "£¹cze";
+ Text[ japanese ] = "ØÝk";
+ Text[ chinese_traditional ] = "±¶®|(~L)";
+ Text[ arabic ] = "ÇÑÊÈÇØ";
+ Text[ dutch ] = "~Koppeling";
+ Text[ chinese_simplified ] = "Á´½Ó(~L)";
+ Text[ greek ] = "Óý~íäåóç";
+ Text[ korean ] = "¿¬°á";
+ Text[ turkish ] = "Baðlantý";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = MN_BACKGROUND ;
+ HelpId = HID_GALLERY_MN_BACKGROUND ;
+ Text = "~Hintergrund" ;
+ Text [ ENGLISH ] = "~Background" ;
+ Text [ english_us ] = "Bac~kground" ;
+ Text [ portuguese_brazilian ] = "~Hintergrund" ;
+ Text [ swedish ] = "~Bakgrund" ;
+ Text [ danish ] = "Baggrund" ;
+ Text [ italian ] = "Sfondo" ;
+ Text [ spanish ] = "~Fondo" ;
+ Text [ french ] = "~Arrière-plan" ;
+ Text [ dutch ] = "~Achtergrond" ;
+ Text [ portuguese ] = "~Plano de fundo" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fügt das gewählte Objekt in\nden Hintergrund des Dokumentes ein : F³gt das gewõhlte Objekt in\nden Hintergrund des Dokumentes ein */
+ Text[ chinese_simplified ] = "±³¾°(~K)";
+ Text[ russian ] = "Ôîí";
+ Text[ polish ] = "T³o";
+ Text[ japanese ] = "”wŒi(~K)";
+ Text[ chinese_traditional ] = "­I´º(~K)";
+ Text[ arabic ] = "ÇáÎáÝíÉ";
+ Text[ dutch ] = "~Achtergrond";
+ Text[ chinese_simplified ] = "±³¾°(~K)";
+ Text[ greek ] = "~Öüíôï";
+ Text[ korean ] = "¹è°æ(~K)";
+ Text[ turkish ] = "Artalan";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text [ dutch ] = "~Toevoegen" ;
+ Text [ english_us ] = "~Insert" ;
+ Text [ italian ] = "A~ggiungi" ;
+ Text [ spanish ] = "~Añadir" ;
+ Text [ french ] = "~Ajouter" ;
+ Text [ swedish ] = "~Lägg till" ;
+ Text [ danish ] = "Tilføj" ;
+ Text [ portuguese_brazilian ] = "~Hinzufügen" ;
+ Text [ portuguese ] = "~Adicionar" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fügt das gewählte Objekt\nin das Dokument ein : F³gt das gewõhlte Objekt\nin das Dokument ein */
+ Text[ chinese_simplified ] = "¼ÓÈë(~I)";
+ Text[ russian ] = "Äîáàâèòü";
+ Text[ polish ] = "Dodaj";
+ Text[ japanese ] = "‘}“ü(~I)";
+ Text[ chinese_traditional ] = "¥[¤J(~I)";
+ Text[ arabic ] = "ÅÖÇÝÉ";
+ Text[ dutch ] = "~Toevoegen";
+ Text[ chinese_simplified ] = "¼ÓÈë(~I)";
+ Text[ greek ] = "ÐñïóèÞê~ç";
+ Text[ korean ] = "»ðÀÔ(~I)";
+ Text[ turkish ] = "Ekle";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ Text [ english_us ] = "~Insert" ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Hinzufügen : ~Hinzuf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Hinzufügen : ~Hinzuf³gen */
+ Text = "~Hinzufügen" ;
+ Text [ swedish ] = "~Lägg till" ;
+ Text [ danish ] = "Tilføj" ;
+ Text [ italian ] = "A~ggiungi" ;
+ Text [ spanish ] = "~Añadir" ;
+ Text [ french ] = "~Ajouter" ;
+ Text [ dutch ] = "~Toevoegen" ;
+ Text [ portuguese_brazilian ] = "~Hinzufügen" ;
+ Text [ portuguese ] = "~Adicionar" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fügt das gewählte Objekt\nin das Dokument ein : F³gt das gewõhlte Objekt\nin das Dokument ein */
+ Text[ english_us ] = "~Insert";
+ Text[ chinese_simplified ] = "¼ÓÈë(~I)";
+ Text[ russian ] = "Äîáàâèòü";
+ Text[ polish ] = "Dodaj";
+ Text[ japanese ] = "‘}“ü(~I)";
+ Text[ chinese_traditional ] = "¥[¤J(~I)";
+ Text[ arabic ] = "ÅÖÇÝÉ";
+ Text[ dutch ] = "~Toevoegen";
+ Text[ chinese_simplified ] = "¼ÓÈë(~I)";
+ Text[ greek ] = "ÐñïóèÞê~ç";
+ Text[ korean ] = "»ðÀÔ(~I)";
+ Text[ turkish ] = "Ekle";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_PREVIEW ;
+ HelpId = HID_GALLERY_MN_PREVIEW ;
+ Text = "~Vorschau" ;
+ Text [ ENGLISH ] = "~Preview" ;
+ Text [ english_us ] = "~Preview" ;
+ Text [ italian ] = "Ante~prima" ;
+ Text [ spanish ] = "~Previsualización" ;
+ Text [ french ] = "~Aperçu" ;
+ Text [ dutch ] = "~Voorbeeld" ;
+ Text [ swedish ] = "Förhands~visning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ portuguese_brazilian ] = "~Vorschau" ;
+ Text [ portuguese ] = "~Previsualizar" ;
+ Text[ russian ] = "Ïðåäâàðèòåëüíûé ïðîñìîòð";
+ Text[ polish ] = "Podgl¹~d";
+ Text[ japanese ] = "ÌßÚËÞ­°(~P)";
+ Text[ chinese_simplified ] = "Ô¤ÊÓ(~P)";
+ Text[ greek ] = "~Ðñïåðéóêüðçóç";
+ Text[ korean ] = "¹Ì¸® º¸±â(~P)";
+ Text[ chinese_traditional ] = "¹wÄý(~P)";
+ Text[ arabic ] = "ãÚÇíäÉ";
+ Text[ turkish ] = "Önizleme";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = MN_TITLE ;
+ HelpId = HID_GALLERY_TITLE;
+ Text = "~Titel" ;
+ Text [ ENGLISH ] = "~Title" ;
+ Text [ english_us ] = "~Title" ;
+ Text[ portuguese ] = "~Título";
+ Text[ russian ] = "~Çàãîëîâîê";
+ Text[ greek ] = "~Ôßôëïò";
+ Text[ dutch ] = "~Titel";
+ Text[ french ] = "~Titre";
+ Text[ spanish ] = "~Título";
+ Text[ italian ] = "~Titolo";
+ Text[ danish ] = "~Titel";
+ Text[ swedish ] = "~Titel";
+ Text[ polish ] = "~Tytu³";
+ Text[ portuguese_brazilian ] = "~Title";
+ Text[ japanese ] = "À²ÄÙ(~T)";
+ Text[ korean ] = "Á¦¸ñ(~T)";
+ Text[ chinese_simplified ] = "±êÌâ";
+ Text[ chinese_traditional ] = "¼ÐÃD(~T)";
+ Text[ arabic ] = "ÚäæÇä";
+ Text[ turkish ] = "Baþlýk";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = MN_DELETE ;
+ HelpId = HID_GALLERY_MN_DELETE ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ Text [ ENGLISH ] = "~Delete" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ italian ] = "~Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "~Slet" ;
+ Text [ portuguese_brazilian ] = "~Löschen" ;
+ Text [ portuguese ] = "E~liminar" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Entfernt das gewählte Objekt : Entfernt das gewõhlte Objekt */
+ Text[ russian ] = "Óäàëèòü";
+ Text[ polish ] = "Usuñ";
+ Text[ japanese ] = "íœ(~D)";
+ Text[ chinese_simplified ] = "ɾ³ý(~D)";
+ Text[ greek ] = "Äéáãñá~öÞ";
+ Text[ korean ] = "»èÁ¦(~D)";
+ Text[ chinese_traditional ] = "§R°£(~D)";
+ Text[ arabic ] = "ÍÐÝ";
+ Text[ turkish ] = "Sil";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
new file mode 100644
index 0000000000..2e0c6c3f15
--- /dev/null
+++ b/svx/source/gallery2/gallery1.cxx
@@ -0,0 +1,883 @@
+/*************************************************************************
+ *
+ * $RCSfile: gallery1.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:18 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ENABLE_BYTESTRING_STREAM_OPERATORS
+
+#include <tools/vcompat.hxx>
+#include <sfx2/inimgr.hxx>
+#include <ucbhelper/content.hxx>
+#include "gallery.hxx"
+#include "galmisc.hxx"
+#include "galtheme.hxx"
+#include "gallery1.hxx"
+
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCONTENTACCESS_HPP_
+#include <com/sun/star/ucb/XContentAccess.hpp>
+#endif
+
+#define ENABLE_BYTESTRING_STREAM_OPERATORS
+
+// --------------
+// - Namespaces -
+// --------------
+
+using namespace ::ucb;
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::ucb;
+
+// ---------------------
+// - GalleryCacheEntry -
+// ---------------------
+
+class GalleryCacheEntry
+{
+private:
+
+ Gallery* mpGallery;
+ String maInitPath;
+ ULONG mnRefCount;
+
+public:
+
+ GalleryCacheEntry( Gallery* pGallery, const String& rInitPath ) :
+ mpGallery( pGallery ), maInitPath( rInitPath ) {}
+ ~GalleryCacheEntry() { delete mpGallery; }
+
+ Gallery* GetGallery() const { return mpGallery; }
+ const String& GetInitPath() const { return maInitPath; }
+
+ ULONG GetRefCount() const { return mnRefCount; }
+ void IncRefCount() { mnRefCount++; }
+ void DecRefCount() { mnRefCount--; }
+};
+
+// ---------------------
+// - GalleryThemeEntry -
+// ---------------------
+
+GalleryThemeEntry::GalleryThemeEntry( const String& rBasePath, const String& rName,
+ UINT32 _nFileNumber, BOOL _bReadOnly, BOOL _bImported,
+ BOOL _bNewFile, UINT32 _nId, BOOL _bThemeNameFromResource ) :
+ nFileNumber ( _nFileNumber ),
+ nId ( _nId ),
+ bReadOnly ( _bReadOnly || _bImported ),
+ bImported ( _bImported ),
+ bThemeNameFromResource ( _bThemeNameFromResource )
+{
+ ImplSetPath( rBasePath );
+ SetModified( _bNewFile );
+
+ if( nId && bThemeNameFromResource )
+ aName = String( GAL_RESID( RID_GALLERYSTR_THEME_START + (USHORT) nId ) );
+
+ if( !aName.Len() )
+ aName = rName;
+}
+
+// -----------------------------------------------------------------------------
+
+String GalleryThemeEntry::ImplGetFileNameIgnoreCase( const String& rFile ) const
+{
+ String aFileName;
+ BOOL bExists = FALSE;
+ INetURLObject aFileObj( rFile, INET_PROT_FILE );
+
+ // check original file name
+ if( FileExists( aFileObj ) )
+ bExists = TRUE;
+ else
+ {
+ // check upper case file name
+ aFileObj.setName( aFileObj.getName().ToUpperAscii() );
+
+ if( FileExists( aFileObj ) )
+ bExists = TRUE;
+ else
+ {
+ // check lower case file name
+ aFileObj.setName( aFileObj.getName().ToLowerAscii() );
+
+ if( FileExists( aFileObj ) )
+ bExists = TRUE;
+ }
+ }
+
+ return aFileObj.PathToFileName();
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryThemeEntry::ImplSetPath( const String& rPath )
+{
+ INetURLObject aFile( rPath, INET_PROT_FILE );
+ String aFileName( String( RTL_CONSTASCII_USTRINGPARAM( "sg" ) ) );
+
+ aFile.Append( ( aFileName += String::CreateFromInt32( nFileNumber ) ) += String( RTL_CONSTASCII_USTRINGPARAM( ".thm" ) ) );
+ aThmPath = ImplGetFileNameIgnoreCase( aFile.PathToFileName() );
+
+ aFile.setExtension( String( RTL_CONSTASCII_USTRINGPARAM( "sdg" ) ) );
+ aSdgPath = ImplGetFileNameIgnoreCase( aFile.PathToFileName() );
+
+ aFile.setExtension( String( RTL_CONSTASCII_USTRINGPARAM( "sdv" ) ) );
+ aSdvPath = ImplGetFileNameIgnoreCase( aFile.PathToFileName() );
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryThemeEntry::SetName( const String& rNewName )
+{
+ if( aName != rNewName )
+ {
+ aName = rNewName;
+ SetModified( TRUE );
+ bThemeNameFromResource = FALSE;
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void GalleryThemeEntry::SetId( UINT32 nNewId, BOOL bResetThemeName )
+{
+ nId = nNewId;
+ SetModified( TRUE );
+ bThemeNameFromResource = ( nId && bResetThemeName );
+}
+
+// ---------------------------
+// - GalleryImportThemeEntry -
+// ---------------------------
+
+SvStream& operator<<( SvStream& rOut, const GalleryImportThemeEntry& rEntry )
+{
+ rOut << ByteString( rEntry.aThemeName, RTL_TEXTENCODING_UTF8 ) <<
+ ByteString( rEntry.aUIName, RTL_TEXTENCODING_UTF8 ) <<
+ ByteString( rEntry.aFileName, RTL_TEXTENCODING_UTF8 ) <<
+ ByteString( rEntry.aImportName, RTL_TEXTENCODING_UTF8 ) <<
+ ByteString( rEntry.aRoot, RTL_TEXTENCODING_UTF8 );
+
+ return rOut;
+}
+
+// ------------------------------------------------------------------------
+
+SvStream& operator>>( SvStream& rIn, GalleryImportThemeEntry& rEntry )
+{
+ ByteString aTmpStr;
+
+ rIn >> aTmpStr; rEntry.aThemeName = String( aTmpStr, RTL_TEXTENCODING_UTF8 );
+ rIn >> aTmpStr; rEntry.aUIName = String( aTmpStr, RTL_TEXTENCODING_UTF8 );
+ rIn >> aTmpStr; rEntry.aFileName = String( aTmpStr, RTL_TEXTENCODING_UTF8 );
+ rIn >> aTmpStr; rEntry.aImportName = String( aTmpStr, RTL_TEXTENCODING_UTF8 );
+ rIn >> aTmpStr; rEntry.aRoot = String( aTmpStr, RTL_TEXTENCODING_UTF8 );
+
+ return rIn;
+}
+
+// --------------------------
+// - GalleryThemeCacheEntry -
+// --------------------------
+
+class GalleryThemeCacheEntry
+{
+private:
+
+ const GalleryThemeEntry* mpThemeEntry;
+ GalleryTheme* mpTheme;
+
+public:
+
+ GalleryThemeCacheEntry( const GalleryThemeEntry* pThemeEntry, GalleryTheme* pTheme ) :
+ mpThemeEntry( pThemeEntry ), mpTheme( pTheme ) {}
+ ~GalleryThemeCacheEntry() { delete mpTheme; }
+
+ const GalleryThemeEntry* GetThemeEntry() const { return mpThemeEntry; }
+ GalleryTheme* GetTheme() const { return mpTheme; }
+};
+
+// -----------
+// - Statics -
+// -----------
+
+List Gallery::aGalleryCache;
+
+// -----------
+// - Gallery -
+// -----------
+
+Gallery::Gallery( const String& rInitPath ) :
+ bMultiPath ( FALSE ),
+ nReadTextEncoding ( gsl_getSystemTextEncoding() ),
+ nLastFileNumber ( 0 )
+{
+ ImplLoad( rInitPath );
+}
+
+// ------------------------------------------------------------------------
+
+Gallery::~Gallery()
+{
+ // Themen-Liste loeschen
+ for( GalleryThemeEntry* pThemeEntry = aThemeList.First(); pThemeEntry; pThemeEntry = aThemeList.Next() )
+ delete pThemeEntry;
+
+ // Import-Liste loeschen
+ for( GalleryImportThemeEntry* pImportEntry = aImportList.First(); pImportEntry; pImportEntry = aImportList.Next() )
+ delete pImportEntry;
+}
+
+// ------------------------------------------------------------------------
+
+Gallery* Gallery::AcquireGallery( const String& rInitPath )
+{
+ Gallery* pGallery = NULL;
+ GalleryCacheEntry* pEntry;
+ GalleryCacheEntry* pFound;
+
+ for( pEntry = (GalleryCacheEntry*) aGalleryCache.First(); pEntry && !pGallery; pEntry = (GalleryCacheEntry*) aGalleryCache.Next() )
+ if( rInitPath == pEntry->GetInitPath() )
+ pGallery = ( pFound = pEntry )->GetGallery();
+
+ if( !pGallery )
+ aGalleryCache.Insert( pFound = new GalleryCacheEntry( new Gallery( rInitPath ), rInitPath ), LIST_APPEND );
+
+ pFound->IncRefCount();
+
+ return( pFound->GetGallery() );
+}
+
+// ------------------------------------------------------------------------
+
+void Gallery::ReleaseGallery( Gallery* pGallery )
+{
+ GalleryCacheEntry* pFound = NULL;
+ GalleryCacheEntry* pEntry;
+
+ for( pEntry = (GalleryCacheEntry*) aGalleryCache.First(); pEntry && !pFound; pEntry = (GalleryCacheEntry*) aGalleryCache.Next() )
+ if( pGallery == pEntry->GetGallery() )
+ pFound = pEntry;
+
+ DBG_ASSERT( pFound, "Gallery::ReleaseGallery(...): Gallery entry not found" );
+ pFound->DecRefCount();
+
+ if( !pFound->GetRefCount() )
+ delete (GalleryCacheEntry*) aGalleryCache.Remove( pFound );
+}
+
+// ------------------------------------------------------------------------
+
+void Gallery::ImplLoad( const String& rInitPath )
+{
+ const USHORT nTokenCount = rInitPath.GetTokenCount( ';' );
+
+ bMultiPath = ( nTokenCount > 0 );
+ aUserPath = SFX_INIMANAGER()->Get( SFX_KEY_CONFIG_DIR );
+ ImplLoadSubDirs( aUserPath, bMultiPath );
+
+ if( bMultiPath )
+ {
+ aRelPath = rInitPath.GetToken( 0, ';' );
+ aUserPath = rInitPath.GetToken( nTokenCount - 1, ';' );
+
+ for( USHORT i = 0UL; i < nTokenCount; i++ )
+ ImplLoadSubDirs( rInitPath.GetToken( i, ';' ), i < ( nTokenCount - 1 ) );
+ }
+ else
+ aRelPath = rInitPath;
+
+ aRelPath.Len();
+ aUserPath.Len();
+
+ ImplLoadImports();
+}
+
+// ------------------------------------------------------------------------
+
+void Gallery::ImplLoadSubDirs( const String& rBase, BOOL bReadOnly )
+{
+ try
+ {
+ uno::Reference< XCommandEnvironment > xEnv;
+ Content aCnt( INetURLObject( rBase, INET_PROT_FILE ).GetMainURL(), xEnv );
+
+ uno::Sequence< OUString > aProps( 1 );
+ aProps.getArray()[ 0 ] == OUString::createFromAscii( "Url" );
+
+ uno::Reference< sdbc::XResultSet > xResultSet( aCnt.createCursor( aProps, INCLUDE_DOCUMENTS_ONLY ) );
+
+ if( xResultSet.is() )
+ {
+ uno::Reference< XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
+
+ if( xContentAccess.is() )
+ {
+ while( xResultSet->next() )
+ {
+ INetURLObject aThmFile;
+
+ aThmFile.SetSmartURL( xContentAccess->queryContentIdentfierString() );
+
+ if( aThmFile.GetExtension().CompareIgnoreCaseToAscii( "thm" ) == COMPARE_EQUAL )
+ {
+ INetURLObject aSdgFile( aThmFile ); aSdgFile.SetExtension( OUString::createFromAscii( "sdg" ) );
+ INetURLObject aSdvFile( aThmFile ); aSdvFile.SetExtension( OUString::createFromAscii( "sdv" ) );
+ const OUString aTitleProp( OUString::createFromAscii( "Title" ) );
+ const OUString aReadOnlyProp( OUString::createFromAscii( "IsReadOnly" ) );
+ OUString aTitle;
+ sal_Bool bReadOnly = sal_False;
+
+ Content aThmCnt( aThmFile.GetMainURL(), xEnv );
+ Content aSdgCnt( aSdgFile.GetMainURL(), xEnv );
+ Content aSdvCnt( aSdvFile.GetMainURL(), xEnv );
+
+ aThmCnt.getPropertyValue( aTitleProp ) >>= aTitle;
+
+ if( aTitle.getLength() )
+ {
+ aThmCnt.getPropertyValue( aReadOnlyProp ) >>= bReadOnly;
+
+ if( !bReadOnly )
+ {
+ aSdgCnt.getPropertyValue( aTitleProp ) >>= aTitle;
+
+ if( aTitle.getLength() )
+ aSdgCnt.getPropertyValue( aReadOnlyProp ) >>= bReadOnly;
+ }
+
+ if( !bReadOnly )
+ {
+ aSdvCnt.getPropertyValue( aTitleProp ) >>= aTitle;
+
+ if( aTitle.getLength() )
+ aSdvCnt.getPropertyValue( aReadOnlyProp ) >>= bReadOnly;
+ }
+
+ GalleryThemeEntry* pEntry = GalleryTheme::CreateThemeEntry( aThmFile.PathToFileName(), bReadOnly );
+
+ if( pEntry )
+ {
+ String aBase( aThmFile.GetBase() );
+ const ULONG nFileNumber = (ULONG) aBase.Erase( 0, 2 ).Erase( 6 ).ToInt32();
+
+ aThemeList.Insert( pEntry, LIST_APPEND );
+
+ if( nFileNumber > nLastFileNumber )
+ nLastFileNumber = nFileNumber;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "GetFolderContents: Any other exception" );
+ }
+}
+
+// ------------------------------------------------------------------------
+
+void Gallery::ImplLoadImports()
+{
+ INetURLObject aPath( GetUserPath(), INET_PROT_FILE );
+
+ aPath.Append( String( RTL_CONSTASCII_USTRINGPARAM( "gallery.sdi" ) ) );
+
+ if( FileExists( aPath ) )
+ {
+ SvFileStream aInStm( aPath.PathToFileName(), STREAM_READ );
+
+ if( aInStm.IsOpen() )
+ {
+ GalleryThemeEntry* pThemeEntry;
+ GalleryImportThemeEntry* pImportEntry;
+ INetURLObject aFile;
+ UINT32 nInventor;
+ UINT32 nCount;
+ UINT16 nId;
+ UINT16 i;
+ UINT16 nTempCharSet;
+
+ for( pImportEntry = aImportList.First(); pImportEntry; pImportEntry = aImportList.Next() )
+ delete pImportEntry;
+
+ aImportList.Clear();
+ aInStm >> nInventor;
+
+ if( nInventor == COMPAT_FORMAT( 'S', 'G', 'A', '3' ) )
+ {
+ aInStm >> nId >> nCount >> nTempCharSet;
+
+ for( i = 0; i < nCount; i++ )
+ {
+ pImportEntry = new GalleryImportThemeEntry;
+
+ aInStm >> *pImportEntry;
+ aImportList.Insert( pImportEntry, LIST_APPEND );
+ aFile = INetURLObject( pImportEntry->aFileName, INET_PROT_FILE );
+ String aNumberStr( aFile.GetBase() );
+ pThemeEntry = new GalleryThemeEntry( aFile.GetPath(),
+ pImportEntry->aUIName,
+ aNumberStr.Erase( 0, 2 ).Erase( 6 ).ToInt32(),
+ TRUE, TRUE, FALSE, 0, FALSE );
+
+ aThemeList.Insert( pThemeEntry, LIST_APPEND );
+ }
+ }
+ }
+ }
+}
+
+// ------------------------------------------------------------------------
+
+void Gallery::ImplWriteImportList()
+{
+ SvFileStream aOutStm;
+ INetURLObject aPath( GetUserPath(), INET_PROT_FILE );
+
+ aPath.Append( ( String( "gallery.sdi", RTL_TEXTENCODING_UTF8 ) ) );
+ aOutStm.Open( aPath.PathToFileName(), STREAM_WRITE | STREAM_TRUNC );
+
+ if( aOutStm.IsOpen() )
+ {
+ const UINT32 nInventor = (UINT32) COMPAT_FORMAT( 'S', 'G', 'A', '3' );
+ const UINT16 nId = 0x0004;
+
+ aOutStm << nInventor << nId << (UINT32) aImportList.Count() << (UINT16) gsl_getSystemTextEncoding();
+
+ for( GalleryImportThemeEntry* pImportEntry = aImportList.First(); pImportEntry; pImportEntry = aImportList.Next() )
+ aOutStm << *pImportEntry;
+
+ if( aOutStm.GetError() )
+ ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
+ }
+}
+
+// ------------------------------------------------------------------------
+
+GalleryThemeEntry* Gallery::ImplGetThemeEntry( const String& rThemeName )
+{
+ GalleryThemeEntry* pFound = NULL;
+
+ if( rThemeName.Len() )
+ for( GalleryThemeEntry* pEntry = aThemeList.First(); pEntry && !pFound; pEntry = aThemeList.Next() )
+ if( rThemeName == pEntry->GetThemeName() )
+ pFound = pEntry;
+
+ return pFound;
+}
+
+// ------------------------------------------------------------------------
+
+GalleryImportThemeEntry* Gallery::ImplGetImportThemeEntry( const String& rImportName )
+{
+ GalleryImportThemeEntry* pFound = NULL;
+
+ for( GalleryImportThemeEntry* pImportEntry = aImportList.First(); pImportEntry && !pFound; pImportEntry = aImportList.Next() )
+ if ( rImportName == pImportEntry->aUIName )
+ pFound = pImportEntry;
+
+ return pFound;
+}
+
+// ------------------------------------------------------------------------
+
+String Gallery::GetThemeName( ULONG nThemeId ) const
+{
+ GalleryThemeEntry* pFound = NULL;
+
+ for( ULONG n = 0, nCount = aThemeList.Count(); n < nCount; n++ )
+ {
+ GalleryThemeEntry* pEntry = aThemeList.GetObject( n );
+
+ if( nThemeId == pEntry->GetId() )
+ pFound = pEntry;
+ }
+
+ // try fallback, if no entry was found
+ if( !pFound )
+ {
+ ByteString aFallback;
+
+ switch( nThemeId )
+ {
+ case( GALLERY_THEME_3D ): aFallback = "3D"; break;
+ case( GALLERY_THEME_BULLETS ): aFallback = "Bullets"; break;
+ case( GALLERY_THEME_HOMEPAGE ): aFallback = "Homepage"; break;
+ case( GALLERY_THEME_HTMLBUTTONS ): aFallback = "private://gallery/hidden/HtmlExportButtons"; break;
+ case( GALLERY_THEME_POWERPOINT ): aFallback = "private://gallery/hidden/imgppt"; break;
+ case( GALLERY_THEME_RULERS ): aFallback = "Rulers"; break;
+ case( GALLERY_THEME_SOUNDS ): aFallback = "Sounds"; break;
+
+ default:
+ break;
+ }
+
+ pFound = ( (Gallery*) this )->ImplGetThemeEntry( String::CreateFromAscii( aFallback.GetBuffer() ) );
+ }
+
+ return( pFound ? pFound->GetThemeName() : String() );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL Gallery::HasTheme( const String& rThemeName )
+{
+ return( ImplGetThemeEntry( rThemeName ) != NULL );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL Gallery::CreateTheme( const String& rThemeName )
+{
+ BOOL bRet = FALSE;
+
+ if( !HasTheme( rThemeName ) )
+ {
+ GalleryThemeEntry* pNewEntry = new GalleryThemeEntry( GetUserPath(), rThemeName,
+ ++nLastFileNumber,
+ FALSE, FALSE, TRUE, 0, FALSE );
+
+ aThemeList.Insert( pNewEntry, LIST_APPEND );
+ delete( new GalleryTheme( this, pNewEntry ) );
+ Broadcast( GalleryHint( GALLERY_HINT_THEME_CREATED, rThemeName ) );
+ bRet = TRUE;
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL Gallery::CreateImportTheme( const String& rPath, const String& rImportName )
+{
+ INetURLObject aPath( rPath, INET_PROT_FILE );
+ BOOL bRet = FALSE;
+
+ if( FileExists( aPath ) )
+ {
+ SvFileStream aInStm( aPath.PathToFileName(), STREAM_READ );
+
+ if( aInStm.IsOpen() )
+ {
+ ULONG nStmErr;
+ UINT16 nId;
+
+ aInStm >> nId;
+
+ if( nId > 0x0004 )
+ {
+ aInStm.Close();
+ ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
+ }
+ else
+ {
+ ByteString aTmpStr;
+ String aThemeName; aInStm >> aTmpStr; aThemeName = String( aTmpStr, RTL_TEXTENCODING_UTF8 );
+ String aNumberStr( aPath.GetBase() );
+ GalleryThemeEntry* pThemeEntry = new GalleryThemeEntry( aPath.GetPath(), rImportName,
+ aNumberStr.Erase( 0, 2 ).Erase( 6 ).ToInt32(),
+ TRUE, TRUE, TRUE, 0, FALSE );
+ GalleryTheme* pImportTheme = new GalleryTheme( this, pThemeEntry );
+
+ aInStm.Seek( STREAM_SEEK_TO_BEGIN );
+ aInStm >> *pImportTheme;
+ nStmErr = aInStm.GetError();
+ aInStm.Close();
+
+ if( nStmErr )
+ {
+ delete pThemeEntry;
+ ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
+ }
+ else
+ {
+ String aName( rImportName );
+ String aNewName( aName );
+ ULONG nCount = 0;
+
+ aName += ' ';
+
+ while ( HasTheme( aNewName ) && ( nCount++ < 16000 ) )
+ {
+ aNewName = aName;
+ aNewName += nCount;
+ }
+
+ pImportTheme->SetImportName( aNewName );
+ aThemeList.Insert( pThemeEntry, LIST_APPEND );
+
+ // Thema in Import-Liste eintragen und Import-Liste speichern
+ GalleryImportThemeEntry* pImportEntry = new GalleryImportThemeEntry;
+ pImportEntry->aThemeName = pImportEntry->aUIName = aNewName;
+ pImportEntry->aFileName = aPath.GetFull();
+ pImportEntry->aImportName = rImportName;
+ aImportList.Insert( pImportEntry, LIST_APPEND );
+ ImplWriteImportList();
+ bRet = TRUE;
+ }
+
+ delete pImportTheme;
+ }
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL Gallery::RenameTheme( const String& rOldName, const String& rNewName )
+{
+ GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rOldName );
+ BOOL bRet = FALSE;
+
+ // Ueberpruefen, ob neuer Themenname schon vorhanden ist
+ if( pThemeEntry && !HasTheme( rNewName ) && ( !pThemeEntry->IsReadOnly() || pThemeEntry->IsImported() ) )
+ {
+ SfxListener aDummyListener;
+ GalleryTheme* pThm = AcquireTheme( rOldName, aDummyListener );
+
+ if( pThm )
+ {
+ const String aOldName( rOldName );
+
+ pThemeEntry->SetName( rNewName );
+ pThm->ImplWrite();
+
+ if( pThemeEntry->IsImported() )
+ {
+ pThm->SetImportName( rNewName );
+
+ GalleryImportThemeEntry* pImportEntry = ImplGetImportThemeEntry( rOldName );
+
+ if( pImportEntry )
+ {
+ pImportEntry->aUIName = rNewName;
+ ImplWriteImportList();
+ }
+ }
+
+ Broadcast( GalleryHint( GALLERY_HINT_THEME_RENAMED, aOldName, pThm->GetName() ) );
+ ReleaseTheme( pThm, aDummyListener );
+ bRet = TRUE;
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL Gallery::RemoveTheme( const String& rThemeName )
+{
+ GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rThemeName );
+ BOOL bRet = FALSE;
+
+ if( pThemeEntry && ( !pThemeEntry->IsReadOnly() || pThemeEntry->IsImported() ) )
+ {
+ Broadcast( GalleryHint( GALLERY_HINT_CLOSE_THEME, rThemeName ) );
+
+ if( pThemeEntry->IsImported() )
+ {
+ GalleryImportThemeEntry* pImportEntry = ImplGetImportThemeEntry( rThemeName );
+
+ if( pImportEntry )
+ {
+ delete aImportList.Remove( pImportEntry );
+ ImplWriteImportList();
+ }
+ }
+ else
+ {
+ SfxListener aDummyListener;
+ GalleryTheme* pThm = AcquireTheme( rThemeName, aDummyListener );
+ const INetURLObject aThmURL( pThm->GetThmPath(), INET_PROT_FILE );
+ const INetURLObject aSdgURL( pThm->GetSdgPath(), INET_PROT_FILE );
+ const INetURLObject aSdvURL( pThm->GetSdvPath(), INET_PROT_FILE );
+
+ ReleaseTheme( pThm, aDummyListener );
+
+ if( FileExists( aThmURL ) )
+ KillFile( aThmURL );
+
+ if( FileExists( aSdgURL ) )
+ KillFile( aSdgURL );
+
+ if( FileExists( aSdvURL ) )
+ KillFile( aSdvURL );
+ }
+
+ delete aThemeList.Remove( pThemeEntry );
+ Broadcast( GalleryHint( GALLERY_HINT_THEME_REMOVED, rThemeName ) );
+
+ bRet = TRUE;
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+String Gallery::GetImportPath(const String& rThemeName)
+{
+ String aPath;
+ GalleryImportThemeEntry* pImportEntry = ImplGetImportThemeEntry( rThemeName );
+
+ if( pImportEntry )
+ aPath = pImportEntry->aFileName;
+
+ return aPath;
+}
+
+// ------------------------------------------------------------------------
+
+GalleryTheme* Gallery::ImplGetCachedTheme( const GalleryThemeEntry* pThemeEntry )
+{
+ GalleryTheme* pTheme = NULL;
+
+ if( pThemeEntry )
+ {
+ GalleryThemeCacheEntry* pEntry;
+
+ for( pEntry = (GalleryThemeCacheEntry*) aThemeCache.First(); pEntry && !pTheme; pEntry = (GalleryThemeCacheEntry*) aThemeCache.Next() )
+ if( pThemeEntry == pEntry->GetThemeEntry() )
+ pTheme = pEntry->GetTheme();
+
+ if( !pTheme )
+ {
+ INetURLObject aPath;
+
+ if( !pThemeEntry->IsImported() )
+ aPath = INetURLObject( pThemeEntry->GetThmPath(), INET_PROT_FILE );
+ else
+ aPath = INetURLObject( GetImportPath( pThemeEntry->GetThemeName() ), INET_PROT_FILE );
+
+ if( FileExists( aPath ) )
+ {
+ SvFileStream aInStm( aPath.PathToFileName(), STREAM_READ );
+
+ if( aInStm.IsOpen() )
+ {
+ pTheme = new GalleryTheme( this, (GalleryThemeEntry*) pThemeEntry );
+ aInStm >> *pTheme;
+
+ if( aInStm.GetError() )
+ delete pTheme, pTheme = NULL;
+ else if( pThemeEntry->IsImported() )
+ pTheme->SetImportName( pThemeEntry->GetThemeName() );
+ }
+ }
+
+ if( pTheme )
+ aThemeCache.Insert( new GalleryThemeCacheEntry( pThemeEntry, pTheme ), LIST_APPEND );
+ }
+ }
+
+ return pTheme;
+}
+
+// ------------------------------------------------------------------------
+
+void Gallery::ImplDeleteCachedTheme( GalleryTheme* pTheme )
+{
+ GalleryThemeCacheEntry* pEntry;
+ BOOL bDone = FALSE;
+
+ for( pEntry = (GalleryThemeCacheEntry*) aThemeCache.First(); pEntry && !bDone; pEntry = (GalleryThemeCacheEntry*) aThemeCache.Next() )
+ {
+ if( pTheme == pEntry->GetTheme() )
+ {
+ delete (GalleryThemeCacheEntry*) aThemeCache.Remove( pEntry );
+ bDone = TRUE;
+ }
+ }
+}
+
+// ------------------------------------------------------------------------
+
+GalleryTheme* Gallery::AcquireTheme( const String& rThemeName, SfxListener& rListener )
+{
+ GalleryTheme* pTheme = NULL;
+ GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rThemeName );
+
+ if( pThemeEntry && ( ( pTheme = ImplGetCachedTheme( pThemeEntry ) ) != NULL ) )
+ rListener.StartListening( *pTheme );
+
+ return pTheme;
+}
+
+// ------------------------------------------------------------------------
+
+void Gallery::ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener )
+{
+ if( pTheme )
+ {
+ rListener.EndListening( *pTheme );
+
+ if( !pTheme->HasListeners() )
+ ImplDeleteCachedTheme( pTheme );
+ }
+}
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
new file mode 100644
index 0000000000..decc668eaa
--- /dev/null
+++ b/svx/source/gallery2/galmisc.cxx
@@ -0,0 +1,563 @@
+/*************************************************************************
+ *
+ * $RCSfile: galmisc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <unotools/processfactory.hxx>
+#include <ucbhelper/content.hxx>
+#include <tools/resmgr.hxx>
+#include <tools/intn.hxx>
+#include <tools/urlobj.hxx>
+#include <svtools/solar.hrc>
+#include <svtools/urihelper.hxx>
+#include <svtools/filter.hxx>
+#include <svtools/itempool.hxx>
+#include <sfx2/docfile.hxx>
+#include "impgrf.hxx"
+#include "svdpage.hxx"
+#include "svdograf.hxx"
+#include "fmmodel.hxx"
+#include "fmview.hxx"
+#include "codec.hxx"
+#include "gallery.hrc"
+#include "gallery1.hxx"
+#include "galtheme.hxx"
+#include "galmisc.hxx"
+
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCONTENTACCESS_HPP_
+#include <com/sun/star/ucb/XContentAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_TRANSFERINFO_HPP_
+#include <com/sun/star/ucb/TransferInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_NAMECLASH_HPP_
+#include <com/sun/star/ucb/NameClash.hpp>
+#endif
+
+// --------------
+// - Namespaces -
+// --------------
+
+using namespace ::ucb;
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::ucb;
+
+// -----------
+// - Defines -
+// -----------
+
+#define GALLERY_PROGRESS_RANGE 10000
+
+// ----------
+// - ResMgr -
+// ----------
+
+ResMgr* GetGalleryResMgr()
+{
+ static ResMgr* pGalleryResMgr = NULL;
+
+ if( !pGalleryResMgr )
+ {
+ ByteString aResMgrName( "gal" );
+ aResMgrName += ByteString::CreateFromInt32( SOLARUPD );
+ pGalleryResMgr = ResMgr::CreateResMgr(
+ aResMgrName.GetBuffer(), Application::GetAppInternational().GetLanguage() );
+ }
+
+ return pGalleryResMgr;
+}
+
+// ----------------------
+// - SgaUserDataFactory -
+// ----------------------
+
+IMPL_LINK( SgaUserDataFactory, MakeUserData, SdrObjFactory*, pObjFactory )
+{
+ if ( pObjFactory->nInventor == IV_IMAPINFO && pObjFactory->nIdentifier == ID_IMAPINFO )
+ pObjFactory->pNewData = new SgaIMapInfo;
+
+ return 0L;
+}
+
+// -------------
+// - SGAImport -
+// -------------
+
+USHORT SGAImport( const String& rFile, Graphic& rGraphic,
+ String& rFilterName, BOOL bShowProgress, const USHORT nDepth )
+{
+ USHORT nRet = SGA_IMPORT_NONE;
+
+ // Wir duerfen hier maximal 2-mal reinlaufen (1.INET => 2.reelles File );
+ // alles andere fuehrt zu einer unendlichen Rekursion => kein gueltiges File
+ if ( nDepth < 2 )
+ {
+ // INet-Download oder normales Laden
+ if ( ( INetURLObject( ::URIHelper::SmartRelToAbs( rFile, FALSE,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS ) ).GetProtocol() != INET_PROT_FILE ) )
+ {
+ SfxMedium aMed( rFile, STREAM_READ, TRUE );
+ String aFilterName;
+
+ aMed.SetTransferPriority( SFX_TFPRIO_VISIBLE_HIGHRES_GRAPHIC | SFX_TFPRIO_SYNCHRON );
+ aMed.DownLoad();
+
+ // kleine Rekursion
+ if ( SGAImport( aMed.GetPhysicalName(), rGraphic, rFilterName, bShowProgress, nDepth + 1 ) == SGA_IMPORT_FILE )
+ nRet = SGA_IMPORT_INET;
+ }
+ else
+ {
+ GraphicFilter* pGraphicFilter = GetGrfFilter();
+ GalleryProgress* pProgress = bShowProgress ? new GalleryProgress( pGraphicFilter ) : NULL;
+ USHORT nFormat;
+
+ if( !pGraphicFilter->ImportGraphic( rGraphic, INetURLObject( rFile, INET_PROT_FILE ), GRFILTER_FORMAT_DONTKNOW, &nFormat ) )
+ {
+ rFilterName = pGraphicFilter->GetImportFormatName( nFormat );
+ nRet = SGA_IMPORT_FILE;
+ }
+
+ delete pProgress;
+ }
+ }
+
+ return nRet;
+}
+
+// -------------------
+// - SGASvDrawImport -
+// -------------------
+
+BOOL SGASvDrawImport( SvStream& rIStm, FmFormModel& rModel )
+{
+ BOOL bRet;
+
+ if ( RLECodec::IsRLECoded( rIStm ) )
+ {
+ SvMemoryStream aMemStm;
+ RLECodec aCodec( rIStm );
+
+ aCodec.Read( aMemStm );
+ aMemStm.Seek( 0UL );
+ bRet = SGASvDrawImport( aMemStm, rModel );
+ }
+ else
+ {
+ SgaUserDataFactory aFactory;
+
+ rIStm.SetVersion( SOFFICE_FILEFORMAT_NOW );
+ rModel.SetStreamingSdrModel( TRUE );
+ rModel.GetItemPool().Load( rIStm );
+ rIStm >> rModel;
+ rModel.SetStreamingSdrModel( FALSE );
+ rModel.GetItemPool().LoadCompleted();
+ bRet = ( rIStm.GetError() == 0 );
+ }
+
+ return bRet;
+}
+
+// ------------------
+// - SGAIsSoundFile -
+// ------------------
+
+BOOL SGAIsSoundFile( const String& rFile )
+{
+ const String aExt( INetURLObject( rFile, INET_PROT_FILE ).GetExtension().ToLowerAscii() );
+ BOOL bRet = FALSE;
+
+ if( ( aExt == String( RTL_CONSTASCII_USTRINGPARAM( "wav" ) ) ) ||
+ ( aExt == String( RTL_CONSTASCII_USTRINGPARAM( "aif" ) ) ) ||
+ ( aExt == String( RTL_CONSTASCII_USTRINGPARAM( "au" ) ) ) )
+ bRet = TRUE;
+ else
+ {
+ // File anlesen
+ SvFileStream aIStm( rFile, STREAM_READ );
+
+ if ( aIStm.IsOpen() )
+ {
+ BYTE cVal1, cVal2, cVal3, cVal4;
+
+ aIStm >> cVal1 >> cVal2 >> cVal3 >> cVal4;
+
+ if ( ( cVal1 == 'R' && cVal2 == 'I' && cVal3 == 'F' && cVal4 == 'F' ) ||
+ ( cVal1 == '.' && cVal2 == 's' && cVal3 == 'n' && cVal4 == 'd' ) )
+ {
+ bRet = TRUE;
+ }
+ }
+ }
+
+ return bRet;
+}
+
+// ---------------------
+// - CreateIMapGraphic -
+// ---------------------
+
+BOOL CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap )
+{
+ BOOL bRet = FALSE;
+
+ if ( rModel.GetPageCount() )
+ {
+ const SdrPage* pPage = rModel.GetPage( 0 );
+ const SdrObject* pObj = pPage->GetObj( 0 );
+
+ if ( pPage->GetObjCount() == 1 && pObj->ISA( SdrGrafObj ) )
+ {
+ const USHORT nCount = pObj->GetUserDataCount();
+
+ // gibt es in den User-Daten eine IMap-Information?
+ for ( USHORT i = 0; i < nCount; i++ )
+ {
+ const SdrObjUserData* pUserData = pObj->GetUserData( i );
+
+ if ( ( pUserData->GetInventor() == IV_IMAPINFO ) && ( pUserData->GetId() == ID_IMAPINFO ) )
+ {
+ rGraphic = ( (SdrGrafObj*) pObj )->GetGraphic();
+ rImageMap = ( (SgaIMapInfo*) pUserData )->GetImageMap();
+ bRet = TRUE;
+ break;
+ }
+ }
+ }
+ }
+
+ return bRet;
+}
+
+// ----------------
+// - ReduceString -
+// ----------------
+
+String ReduceString( const String& rString )
+{
+ String aStr;
+
+ if ( rString.Len() > 30 )
+ {
+ const String aName( INetURLObject( rString, INET_PROT_FILE ).GetName() );
+
+ aStr = rString.Copy( 0, 30 - aName.Len() - 4 );
+ aStr += String( RTL_CONSTASCII_USTRINGPARAM( "..." ) );
+ aStr += '/';
+ aStr += aName;
+ }
+ else
+ aStr = rString;
+
+ return aStr;
+}
+
+// ------------------------
+// - CreateUniqueFileName -
+// ------------------------
+
+INetURLObject CreateUniqueFileName( Gallery* pGallery, SgaObjKind eObjKind )
+{
+ SvFileStream aStm;
+ INetURLObject aPath( pGallery->GetUserPath(), INET_PROT_FILE );
+ INetURLObject aTmpPath( aPath );
+ sal_uInt32 nNextNumber;
+
+ aTmpPath.Append( String( RTL_CONSTASCII_USTRINGPARAM( "sdddndx1" ) ) );
+
+ if( FileExists( aTmpPath ) )
+ {
+ aStm.Open( aTmpPath.PathToFileName(), STREAM_READ );
+ aStm >> nNextNumber;
+ aStm.Close();
+ }
+ else
+ nNextNumber = 1999;
+
+ String aNextFileName( RTL_CONSTASCII_USTRINGPARAM( "dd" ) );
+ aNextFileName += String::CreateFromInt32( ++nNextNumber % ( eObjKind == SGA_OBJ_SVDRAW ? 99999999L : 999999L ) );
+
+ aStm.Open( aTmpPath.PathToFileName(), STREAM_WRITE | STREAM_TRUNC );
+
+ if( aStm.IsOpen() )
+ {
+ aStm << nNextNumber;
+ aStm.Close();
+ }
+
+ aPath.Append( String( RTL_CONSTASCII_USTRINGPARAM( "dragdrop" ) ) );
+ CreateDir( aPath );
+ aPath.Append( aNextFileName += String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) ) );
+
+ return aPath;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL FileExists( const INetURLObject& rURL )
+{
+ BOOL bRet = FALSE;
+
+ try
+ {
+ Content aCnt( rURL.GetMainURL(), uno::Reference< XCommandEnvironment >() );
+ OUString aTitle;
+
+ aCnt.getPropertyValue( OUString::createFromAscii( "Title" ) ) >>= aTitle;
+ bRet = ( aTitle.getLength() > 0 );
+ }
+ catch( ... )
+ {
+ DBG_ERROR( "Gallery: FileExists: ucb error" );
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL CreateDir( const INetURLObject& rURL )
+{
+ BOOL bRet = FileExists( rURL );
+
+ if( !bRet )
+ {
+ try
+ {
+ uno::Reference< XCommandEnvironment > aCmdEnv;
+ INetURLObject aNewFolderURL( rURL );
+ INetURLObject aParentURL( aNewFolderURL ); aParentURL.removeSegment();
+ Content aParent( aParentURL.GetMainURL(), aCmdEnv );
+ uno::Sequence< OUString > aProps( 2 );
+ uno::Sequence< uno::Any > aValues( 2 );
+
+ aProps.getArray()[ 0 ] = OUString::createFromAscii( "Title" );
+ aValues.getArray()[ 0 ] = uno::makeAny( OUString( aNewFolderURL.GetName() ) );
+
+ aProps.getArray()[ 1 ] = OUString::createFromAscii( "IsFolder" );
+ aValues.getArray()[ 1 ] = uno::makeAny( sal_Bool( sal_True ) );
+
+ bRet = aParent.insertNewContent( OUString::createFromAscii( "FSysFolder" ), aProps, aValues,
+ Content( aNewFolderURL.GetMainURL(), aCmdEnv ) );
+ }
+ catch( ... )
+ {
+ DBG_ERROR( "Gallery: CreateDir: ucb error" );
+ }
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL )
+{
+ BOOL bRet = FALSE;
+
+ try
+ {
+ Content aDestPath( rDstURL.GetMainURL(), uno::Reference< XCommandEnvironment >() );
+
+ aDestPath.executeCommand( OUString::createFromAscii( "transfer" ),
+ uno::makeAny( TransferInfo( sal_False, rSrcURL.GetMainURL(),
+ rDstURL.GetName(), NameClash::OVERWRITE ) ) );
+ bRet = TRUE;
+ }
+ catch( ... )
+ {
+ DBG_ERROR( "Gallery: CopyFile: ucb error" );
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL KillFile( const INetURLObject& rURL )
+{
+ BOOL bRet = FileExists( rURL );
+
+ if( bRet )
+ {
+ try
+ {
+ Content aCnt( rURL.GetMainURL(), uno::Reference< XCommandEnvironment >() );
+ aCnt.executeCommand( OUString::createFromAscii( "delete" ), uno::makeAny( sal_Bool( sal_True ) ) );
+ }
+ catch( ... )
+ {
+ bRet = FALSE;
+ DBG_ERROR( "Gallery: KillFile: ucb error" );
+ }
+ }
+
+ return bRet;
+}
+
+// -------------------
+// - GalleryProgress -
+// -------------------
+
+GalleryProgress::GalleryProgress( GraphicFilter* pFilter ) :
+ mpFilter( pFilter )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( ::utl::getProcessServiceFactory() );
+
+ if( xMgr.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XProgressMonitor > xMonitor( xMgr->createInstance(
+ ::rtl::OUString::createFromAscii( "com.sun.star.awt.XProgressMonitor" ) ),
+ ::com::sun::star::uno::UNO_QUERY );
+
+ if ( xMonitor.is() )
+ {
+ mxProgressBar = ::com::sun::star::uno::Reference< ::com::sun::star::awt::XProgressBar >( xMonitor,
+ ::com::sun::star::uno::UNO_QUERY );
+
+ if( mxProgressBar.is() )
+ {
+ String aProgressText;
+
+ if( mpFilter )
+ {
+ aProgressText = String( GAL_RESID( RID_SVXSTR_GALLERY_FILTER ) );
+ mpFilter->SetUpdatePercentHdl( LINK( this, GalleryProgress, Update ) );
+ }
+ else
+ aProgressText = String( RTL_CONSTASCII_USTRINGPARAM( "Gallery" ) );
+
+ xMonitor->addText( String( RTL_CONSTASCII_USTRINGPARAM( "Gallery" ) ), aProgressText, sal_False ) ;
+ mxProgressBar->setRange( 0, GALLERY_PROGRESS_RANGE );
+ }
+ }
+ }
+}
+
+// ------------------------------------------------------------------------
+
+GalleryProgress::~GalleryProgress()
+{
+ if( mpFilter )
+ mpFilter->SetUpdatePercentHdl( Link() );
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryProgress::Update( ULONG nVal, ULONG nMaxVal )
+{
+ if( mxProgressBar.is() && nMaxVal )
+ mxProgressBar->setValue( Min( (ULONG)( (double) nVal / nMaxVal * GALLERY_PROGRESS_RANGE ), (ULONG) GALLERY_PROGRESS_RANGE ) );
+}
+
+// ------------------------------------------------------------------------
+
+IMPL_LINK( GalleryProgress, Update, GraphicFilter*, pFilter )
+{
+ Update( pFilter->GetPercent(), 100 );
+ return 0L;
+}
+
+// -----------------
+// - SgaDataObject -
+// -----------------
+
+SgaDataObject::SgaDataObject( GalleryTheme* pTheme, ULONG nActualObjPos ) :
+ mpTheme ( pTheme ),
+ mnObjPos( nActualObjPos )
+{
+ mpTheme->SetDragging( TRUE );
+ mpTheme->SetDragPos( mnObjPos );
+}
+
+// ------------------------------------------------------------------------
+
+SgaDataObject::~SgaDataObject()
+{
+ mpTheme->SetDragging( FALSE );
+ mpTheme->SetDragPos( 0 );
+ maTypeList.Clear();
+}
+
+// ------------------------------------------------------------------------
+
+BOOL SgaDataObject::GetData( SvData* pData )
+{
+ BOOL bRet = FALSE;
+
+ if( GetTypeList().Get( *pData ) && mpTheme )
+ bRet = mpTheme->GetDataXChgData( pData, pData->GetFormat(), mnObjPos );
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+const SvDataTypeList& SgaDataObject::GetTypeList() const
+{
+ if( !maTypeList.Count() )
+ ( (SgaDataObject*) this )->maTypeList = mpTheme->GetDataXChgTypeList( maTypeList, mnObjPos );
+
+ return maTypeList;
+}
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
new file mode 100644
index 0000000000..bac40e94a5
--- /dev/null
+++ b/svx/source/gallery2/galobj.cxx
@@ -0,0 +1,499 @@
+/*************************************************************************
+ *
+ * $RCSfile: galobj.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ENABLE_BYTESTRING_STREAM_OPERATORS
+
+#include <tools/vcompat.hxx>
+#include <vcl/virdev.hxx>
+#include <svtools/itempool.hxx>
+#include "fmmodel.hxx"
+#include "fmview.hxx"
+#include "gallery.hrc"
+#include "galmisc.hxx"
+#include "galobj.hxx"
+
+// -----------
+// - Defines -
+// -----------
+
+#define S_THUMB 80
+
+// -------------
+// - SgaObject -
+// -------------
+
+SgaObject::SgaObject() :
+ bIsValid ( FALSE ),
+ bIsThumbBmp ( TRUE )
+{
+}
+
+// ------------------------------------------------------------------------
+
+BOOL SgaObject::CreateThumb( const Bitmap& rBitmap )
+{
+ const Size aBmpSize( rBitmap.GetSizePixel() );
+ BOOL bRet = FALSE;
+
+ if( aBmpSize.Width() && aBmpSize.Height() )
+ {
+ const float fFactor = (float) aBmpSize.Width() / aBmpSize.Height();
+ const Size aNewSize( Max( (long) (fFactor < 1. ? S_THUMB * fFactor : S_THUMB), 8L ),
+ Max( (long) (fFactor < 1. ? S_THUMB : S_THUMB / fFactor), 8L ) );
+
+ aThumbBmp = rBitmap;
+
+ if( aThumbBmp.Scale( (double) aNewSize.Width() / aBmpSize.Width(),
+ (double) aNewSize.Height() / aBmpSize.Height(), BMP_SCALE_INTERPOLATE ) )
+ {
+ aThumbBmp.Dither( BMP_DITHER_FLOYD );
+ bRet = TRUE;
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL SgaObject::CreateThumbMetaFile( const Graphic& rGraphic )
+{
+ const Size aMtfSize( rGraphic.GetPrefSize() );
+ BOOL bRet = FALSE;
+
+ if( aMtfSize.Width() && aMtfSize.Height() )
+ {
+ VirtualDevice* pVDev = new VirtualDevice;
+ Size aVSize( S_THUMB, S_THUMB );
+ Point aVPos;
+ Size aLogSize;
+ const double fFactor = (double) aMtfSize.Width() / aMtfSize.Height();
+ const Size aNewSize((USHORT)(fFactor < 1. ? S_THUMB * fFactor : S_THUMB),
+ (USHORT)(fFactor < 1. ? S_THUMB : S_THUMB / fFactor));
+
+ pVDev->SetOutputSizePixel( aNewSize );
+ rGraphic.Draw( pVDev, aVPos, aNewSize );
+
+ aThumbBmp = pVDev->GetBitmap( aVPos, aNewSize );
+ delete pVDev;
+
+ if( !!aThumbBmp )
+ {
+ aThumbBmp.Dither( BMP_DITHER_FLOYD );
+ bRet = TRUE;
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+void SgaObject::WriteData( SvStream& rOut ) const
+{
+ static const UINT32 nInventor = COMPAT_FORMAT( 'S', 'G', 'A', '3' );
+
+ rOut << nInventor << (UINT16) 0x0004 << GetVersion() << (UINT16) GetObjKind();
+ rOut << bIsThumbBmp;
+
+ if( bIsThumbBmp )
+ {
+ const USHORT nOldCompressMode = rOut.GetCompressMode();
+ const ULONG nOldVersion = rOut.GetVersion();
+
+ rOut.SetCompressMode( COMPRESSMODE_ZBITMAP );
+ rOut.SetVersion( SOFFICE_FILEFORMAT_NOW );
+
+ rOut << aThumbBmp;
+
+ rOut.SetVersion( nOldVersion );
+ rOut.SetCompressMode( nOldCompressMode );
+ }
+ else
+ rOut << aThumbMtf;
+
+ rOut << ByteString( aPath, RTL_TEXTENCODING_UTF8 );
+}
+
+// ------------------------------------------------------------------------
+
+void SgaObject::ReadData(SvStream& rIn, UINT16& rReadVersion )
+{
+ ByteString aTmpStr;
+ UINT32 nTmp32;
+ UINT16 nTmp16;
+
+ rIn >> nTmp32 >> nTmp16 >> rReadVersion >> nTmp16 >> bIsThumbBmp;
+
+ if( bIsThumbBmp )
+ rIn >> aThumbBmp;
+ else
+ rIn >> aThumbMtf;
+
+ rIn >> aTmpStr; aPath = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 );
+}
+
+// ------------------------------------------------------------------------
+
+SvStream& operator<<( SvStream& rOut, const SgaObject& rObj )
+{
+ rObj.WriteData( rOut );
+ return rOut;
+}
+
+// ------------------------------------------------------------------------
+
+SvStream& operator>>( SvStream& rIn, SgaObject& rObj )
+{
+ UINT16 nReadVersion;
+
+ rObj.ReadData( rIn, nReadVersion );
+ rObj.bIsValid = ( rIn.GetError() == ERRCODE_NONE );
+
+ return rIn;
+}
+
+// ----------------
+// - SgaObjectBmp -
+// ----------------
+
+SgaObjectBmp::SgaObjectBmp()
+{
+}
+
+// ------------------------------------------------------------------------
+
+SgaObjectBmp::SgaObjectBmp( const String& rFile )
+{
+ Graphic aGraphic;
+ String aStr;
+
+ aGraphic.SetLink( GfxLink() );
+
+ if ( SGA_IMPORT_NONE != SGAImport( rFile, aGraphic, aStr ) )
+ Init( aGraphic, rFile );
+}
+
+// ------------------------------------------------------------------------
+
+SgaObjectBmp::SgaObjectBmp( const Graphic& rGraphic, const String& rFile, const String& rFormat )
+{
+ const INetURLObject aURL( rFile, INET_PROT_FILE );
+
+ if( FileExists( aURL ) )
+ Init( rGraphic, rFile );
+}
+
+// ------------------------------------------------------------------------
+
+void SgaObjectBmp::Init( const Graphic& rGraphic, const String& rFile )
+{
+ aPath = rFile;
+
+ if ( rGraphic.GetType() == GRAPHIC_BITMAP )
+ bIsValid = CreateThumb( rGraphic.GetBitmap() );
+ else if( rGraphic.GetType() != GRAPHIC_NONE )
+ bIsValid = CreateThumbMetaFile( rGraphic );
+ else
+ bIsValid = FALSE;
+}
+
+// ------------------------------------------------------------------------
+
+void SgaObjectBmp::WriteData( SvStream& rOut ) const
+{
+ String aDummyStr;
+ char aDummy[ 10 ];
+
+ // Version setzen
+ SgaObject::WriteData( rOut );
+ rOut.Write( aDummy, 10 );
+ rOut << ByteString( aDummyStr, RTL_TEXTENCODING_UTF8 ) << ByteString( aTitle, RTL_TEXTENCODING_UTF8 );
+}
+
+// ------------------------------------------------------------------------
+
+void SgaObjectBmp::ReadData( SvStream& rIn, UINT16& rReadVersion )
+{
+ ByteString aTmpStr;
+
+ SgaObject::ReadData( rIn, rReadVersion );
+ rIn.SeekRel( 10 ); // 16, 16, 32, 16
+ rIn >> aTmpStr; // dummy
+
+ if( rReadVersion >= 5 )
+ {
+ rIn >> aTmpStr; aTitle = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 );
+ }
+}
+
+// ------------------
+// - SgaObjectSound -
+// ------------------
+
+SgaObjectSound::SgaObjectSound() :
+ eSoundType( SOUND_STANDARD )
+{
+}
+
+// ------------------------------------------------------------------------
+
+SgaObjectSound::SgaObjectSound( const String& rFile ) :
+ eSoundType( SOUND_STANDARD )
+{
+ const INetURLObject aURL( rFile, INET_PROT_FILE );
+
+ if( FileExists( aURL ) )
+ {
+ aPath = rFile;
+ aThumbBmp = Bitmap( Size( 1, 1 ), 1 );
+ bIsValid = TRUE;
+ }
+ else
+ bIsValid = FALSE;
+}
+
+// ------------------------------------------------------------------------
+
+SgaObjectSound::~SgaObjectSound()
+{
+}
+
+// ------------------------------------------------------------------------
+
+Bitmap SgaObjectSound::GetThumbBmp() const
+{
+ USHORT nId;
+
+ switch( eSoundType )
+ {
+ case( SOUND_COMPUTER ): nId = RID_SVXBMP_GALLERY_SOUND_1; break;
+ case( SOUND_MISC ): nId = RID_SVXBMP_GALLERY_SOUND_2; break;
+ case( SOUND_MUSIC ): nId = RID_SVXBMP_GALLERY_SOUND_3; break;
+ case( SOUND_NATURE ): nId = RID_SVXBMP_GALLERY_SOUND_4; break;
+ case( SOUND_SPEECH ): nId = RID_SVXBMP_GALLERY_SOUND_5; break;
+ case( SOUND_TECHNIC ): nId = RID_SVXBMP_GALLERY_SOUND_6; break;
+ case( SOUND_ANIMAL ): nId = RID_SVXBMP_GALLERY_SOUND_7; break;
+
+ // standard
+ default:
+ nId = RID_SVXBMP_GALLERY_SOUND_0;
+ break;
+ }
+
+ return Bitmap( GAL_RESID( nId ) );
+}
+
+// ------------------------------------------------------------------------
+
+void SgaObjectSound::WriteData( SvStream& rOut ) const
+{
+ SgaObject::WriteData( rOut );
+ rOut << (UINT16) eSoundType << ByteString( aTitle, RTL_TEXTENCODING_UTF8 );
+}
+
+// ------------------------------------------------------------------------
+
+void SgaObjectSound::ReadData( SvStream& rIn, UINT16& rReadVersion )
+{
+ SgaObject::ReadData( rIn, rReadVersion );
+
+ if( rReadVersion >= 5 )
+ {
+ ByteString aTmpStr;
+ UINT16 nTmp16;
+
+ rIn >> nTmp16; eSoundType = (GalSoundType) nTmp16;
+
+ if( rReadVersion >= 6 )
+ {
+ rIn >> aTmpStr; aTitle = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 );
+ }
+ }
+}
+
+// -----------------
+// - SgaObjectAnim -
+// -----------------
+
+SgaObjectAnim::SgaObjectAnim()
+{
+}
+
+// ------------------------------------------------------------------------
+
+SgaObjectAnim::SgaObjectAnim( const Graphic& rGraphic, const String& rFile, const String& rFormatName )
+{
+ aPath = rFile;
+ bIsValid = CreateThumb( rGraphic.GetBitmap() );
+}
+
+// -----------------
+// - SgaObjectINet -
+// -----------------
+
+SgaObjectINet::SgaObjectINet()
+{
+}
+
+// ------------------------------------------------------------------------
+
+SgaObjectINet::SgaObjectINet( const Graphic& rGraphic, const String& rFile, const String& rFormatName ) :
+ SgaObjectAnim ( rGraphic, rFile, rFormatName )
+{
+}
+
+// -------------------
+// - SgaObjectSvDraw -
+// -------------------
+
+SgaObjectSvDraw::SgaObjectSvDraw()
+{
+}
+
+// ------------------------------------------------------------------------
+
+SgaObjectSvDraw::SgaObjectSvDraw( const FmFormModel& rModel, const INetURLObject& rURL )
+{
+ aPath = rURL.GetBase();
+ bIsValid = CreateThumb( rModel );
+}
+
+// ------------------------------------------------------------------------
+
+SgaObjectSvDraw::SgaObjectSvDraw( SvStream& rIStm, const INetURLObject& rURL )
+{
+ FmFormModel aModel;
+
+ aModel.GetItemPool().FreezeIdRanges();
+
+ if( SGASvDrawImport( rIStm, aModel ) )
+ {
+ aPath = rURL.GetBase();
+ bIsValid = CreateThumb( aModel );
+ }
+}
+
+// ------------------------------------------------------------------------
+
+BOOL SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel )
+{
+ Graphic aGraphic;
+ ImageMap aImageMap;
+ BOOL bRet = FALSE;
+
+ // Falls das Draw-Objekt nur eine Graphik enthaelt,
+ // erzeugen wir mit dieser den Thumb
+ if ( CreateIMapGraphic( rModel, aGraphic, aImageMap ) )
+ bRet = SgaObject::CreateThumb( aGraphic.GetBitmap() );
+ else
+ {
+ VirtualDevice aVDev;
+ GDIMetaFile aMtf;
+
+ aVDev.SetMapMode( MapMode( MAP_100TH_MM ) );
+ FmFormView aView( &(FmFormModel&) rModel, &aVDev );
+
+ aView.SetMarkHdlHidden( TRUE );
+ aView.ShowPagePgNum( 0, Point() );
+ aView.MarkAll();
+ aThumbMtf = aView.GetAllMarkedMetaFile();
+
+ const Graphic aGraphic( aThumbMtf );
+ const Size aMtfSize( aGraphic.GetPrefSize() );
+ Point aVPos;
+ Size aLogSize;
+ const double fFactor = (double) aMtfSize.Width() / aMtfSize.Height();
+ Size aNewSize( (USHORT) (fFactor < 1. ? S_THUMB * fFactor : S_THUMB ),
+ (USHORT) (fFactor < 1. ? S_THUMB : S_THUMB / fFactor ) );
+
+ aThumbMtf = GDIMetaFile();
+ aVDev.SetOutputSizePixel( aNewSize );
+ aVDev.SetMapMode( MapMode() );
+ aGraphic.Draw( &aVDev, aVPos, aNewSize );
+ aThumbBmp = aVDev.GetBitmap( aVPos, aNewSize );
+ aThumbBmp.Convert( BMP_CONVERSION_8BIT_COLORS );
+ bRet = TRUE;
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+void SgaObjectSvDraw::WriteData( SvStream& rOut ) const
+{
+ SgaObject::WriteData( rOut );
+ rOut << ByteString( aTitle, RTL_TEXTENCODING_UTF8 );
+}
+
+// ------------------------------------------------------------------------
+
+void SgaObjectSvDraw::ReadData( SvStream& rIn, UINT16& rReadVersion )
+{
+ SgaObject::ReadData( rIn, rReadVersion );
+
+ if( rReadVersion >= 5 )
+ {
+ ByteString aTmpStr;
+ rIn >> aTmpStr; aTitle = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 );
+ }
+}
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
new file mode 100644
index 0000000000..e0c3f80205
--- /dev/null
+++ b/svx/source/gallery2/galtheme.cxx
@@ -0,0 +1,1526 @@
+/*************************************************************************
+ *
+ * $RCSfile: galtheme.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ENABLE_BYTESTRING_STREAM_OPERATORS
+
+#include <tools/urlobj.hxx>
+#include <tools/vcompat.hxx>
+#include <tools/new.hxx>
+#include <tools/tempfile.hxx>
+#include <ucbhelper/content.hxx>
+#include <so3/svstor.hxx>
+#include <sot/formats.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/cvtgrf.hxx>
+#include <svtools/itempool.hxx>
+#include "svdograf.hxx"
+#include "fmpage.hxx"
+#include "codec.hxx"
+#include "fmmodel.hxx"
+#include "fmview.hxx"
+#include "galmisc.hxx"
+#include "galtheme.hxx"
+
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCONTENTACCESS_HPP_
+#include <com/sun/star/ucb/XContentAccess.hpp>
+#endif
+
+// --------------
+// - Namespaces -
+// --------------
+
+using namespace ::ucb;
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::ucb;
+
+// ------------
+// - SgaTheme -
+// ------------
+
+GalleryTheme::GalleryTheme( Gallery* pGallery, GalleryThemeEntry* pThemeEntry ) :
+ pParent ( pGallery ),
+ pThm ( pThemeEntry ),
+ mnLockCount ( 0 ),
+ nDragPos ( 0 ),
+ bDragging ( FALSE )
+{
+ if( pThm->IsImported() )
+ {
+ aSvDrawStorageRef = new SvStorage();
+ aImportName = pThm->GetThemeName();
+ }
+ else
+ aSvDrawStorageRef = new SvStorage( GetSdvPath(), pThm->IsReadOnly() ? STREAM_READ : STREAM_STD_READWRITE );
+}
+
+// ------------------------------------------------------------------------
+
+GalleryTheme::~GalleryTheme()
+{
+ ImplWrite();
+
+ for( GalleryObject* pEntry = aObjectList.First(); pEntry; pEntry = aObjectList.Next() )
+ delete pEntry;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, ULONG nPos, GalleryObject* pExistentEntry )
+{
+ SvFileStream aOStm;
+ BOOL bRet = FALSE;
+
+ aOStm.Open( GetSdgPath(), STREAM_WRITE );
+
+ if( aOStm.IsOpen() )
+ {
+ const sal_uInt32 nOffset = aOStm.Seek( STREAM_SEEK_TO_END );
+
+ aOStm << rObj;
+
+ if( !aOStm.GetError() )
+ {
+ GalleryObject* pEntry;
+
+ if( !pExistentEntry )
+ {
+ pEntry = new GalleryObject;
+ aObjectList.Insert( pEntry, nPos );
+ }
+ else
+ pEntry = pExistentEntry;
+
+ pEntry->aPath = rObj.GetPath();
+ pEntry->nOffset = nOffset;
+ pEntry->eObjKind = rObj.GetObjKind();
+ bRet = TRUE;
+ }
+
+ aOStm.Close();
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+SgaObject* GalleryTheme::ImplReadSgaObject( GalleryObject* pEntry )
+{
+ SgaObject* pSgaObj = NULL;
+
+ if( pEntry )
+ {
+ SvFileStream aIStm( GetSdgPath(), STREAM_READ );
+
+ if( aIStm.IsOpen() )
+ {
+ sal_uInt32 nInventor;
+
+ // Ueberpruefen, ob das File ein gueltiges SGA-File ist
+ aIStm.Seek( pEntry->nOffset );
+ aIStm >> nInventor;
+
+ if( nInventor == COMPAT_FORMAT( 'S', 'G', 'A', '3' ) )
+ {
+ aIStm.Seek( pEntry->nOffset );
+
+ switch( pEntry->eObjKind )
+ {
+ case ( SGA_OBJ_BMP ) :
+ {
+ SgaObjectBmp* pObj = new SgaObjectBmp();
+ aIStm >> *pObj;
+ pSgaObj = (SgaObject*) pObj;
+ }
+ break;
+
+ case ( SGA_OBJ_ANIM ) :
+ {
+ SgaObjectAnim* pObj = new SgaObjectAnim();
+ aIStm >> *pObj;
+ pSgaObj = (SgaObject*) pObj;
+ }
+ break;
+
+ case ( SGA_OBJ_INET ) :
+ {
+ SgaObjectINet* pObj = new SgaObjectINet();
+ aIStm >> *pObj;
+ pSgaObj = (SgaObject*) pObj;
+ }
+ break;
+
+ case ( SGA_OBJ_SVDRAW ) :
+ {
+ SgaObjectSvDraw* pObj = new SgaObjectSvDraw();
+ aIStm >> *pObj;
+ pSgaObj = (SgaObject*) pObj;
+ }
+ break;
+
+ case ( SGA_OBJ_SOUND ) :
+ {
+ SgaObjectSound* pObj = new SgaObjectSound();
+ aIStm >> *pObj;
+ pSgaObj = (SgaObject*) pObj;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+ }
+
+ return pSgaObj;
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryTheme::ImplRead()
+{
+ SvFileStream aIStm( GetThmPath(), STREAM_READ );
+
+ if( aIStm.IsOpen() )
+ aIStm >> *this;
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryTheme::ImplWrite()
+{
+ if( IsModified() )
+ {
+ const INetURLObject aFileName( GetThmPath(), INET_PROT_FILE );
+ const INetURLObject aFilePath( aFileName.GetPath(), INET_PROT_FILE );
+
+ if( FileExists( aFilePath ) || CreateDir( aFilePath ) )
+ {
+#ifdef UNX
+ SvFileStream aOStm( aFileName.PathToFileName(), STREAM_WRITE | STREAM_COPY_ON_SYMLINK | STREAM_TRUNC );
+#else
+ SvFileStream aOStm( aFileName.PathToFileName(), STREAM_WRITE | STREAM_TRUNC );
+#endif
+
+ if( aOStm.IsOpen() )
+ aOStm << *this;
+
+ ImplSetModified( FALSE );
+ }
+ }
+}
+
+// ------------------------------------------------------------------------
+
+String GalleryTheme::ImplGetPathToFile( const GalleryObject* pObject ) const
+{
+ String aFilePath;
+
+ if( pObject )
+ {
+ if( IsImported() )
+ {
+ INetURLObject aPath( GetParent()->GetImportPath( GetName() ), INET_PROT_FILE );
+
+ aPath.removeSegment();
+ aPath.Append( INetURLObject( pObject->aPath, INET_PROT_FILE ).GetName() );
+ aFilePath = aPath.PathToFileName();
+ }
+ else
+ aFilePath = pObject->aPath;
+ }
+
+ return aFilePath;
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryTheme::ImplBroadcast( ULONG nUpdatePos )
+{
+ if( !IsBroadcasterLocked() )
+ Broadcast( GalleryHint( GALLERY_HINT_THEME_UPDATEVIEW, GetName(), nUpdatePos ) );
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryTheme::UnlockBroadcaster( ULONG nUpdatePos )
+{
+ DBG_ASSERT( mnLockCount, "Broadcaster is not locked" );
+
+ if( mnLockCount && !--mnLockCount )
+ ImplBroadcast( nUpdatePos );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryTheme::InsertObject( const SgaObject& rObj, ULONG nInsertPos )
+{
+ BOOL bRet = FALSE;
+
+ if( rObj.IsValid() )
+ {
+ GalleryObject aNewEntry;
+ GalleryObject* pEntry = aObjectList.First();
+ GalleryObject* pFoundEntry = NULL;
+ ULONG nUpdatePos = LIST_APPEND;
+
+ for( ; pEntry && !pFoundEntry; pEntry = aObjectList.Next() )
+ if( pEntry->aPath == rObj.GetPath() )
+ pFoundEntry = pEntry;
+
+ if( pFoundEntry && ImplWriteSgaObject( rObj, nInsertPos, &aNewEntry ) )
+ pFoundEntry->nOffset = aNewEntry.nOffset;
+ else
+ ImplWriteSgaObject( rObj, nInsertPos, NULL );
+
+ ImplSetModified( bRet = TRUE );
+ ImplBroadcast( pFoundEntry ? aObjectList.GetPos( pFoundEntry ) : nInsertPos );
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+SgaObject* GalleryTheme::AcquireObject( ULONG nPos )
+{
+ return ImplReadSgaObject( aObjectList.GetObject( nPos ) );
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryTheme::ReleaseObject( SgaObject* pObject )
+{
+ delete pObject;
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryTheme::RemoveObject( ULONG nPos )
+{
+ GalleryObject* pEntry = aObjectList.Remove( nPos );
+
+ if( !aObjectList.Count() )
+ KillFile( INetURLObject( GetSdgPath(), INET_PROT_FILE ) );
+
+ if( pEntry )
+ {
+ if( SGA_OBJ_SVDRAW == pEntry->eObjKind )
+ aSvDrawStorageRef->Remove( pEntry->aPath );
+
+ delete pEntry;
+ ImplSetModified( TRUE );
+ ImplBroadcast( nPos );
+ }
+
+ return( pEntry != NULL );
+}
+
+// ------------------------------------------------------------------------
+
+BOOL GalleryTheme::ChangeObjectPos( ULONG nOldPos, ULONG nNewPos )
+{
+ BOOL bRet = FALSE;
+
+ if( nOldPos != nNewPos )
+ {
+ GalleryObject* pEntry = aObjectList.GetObject( nOldPos );
+
+ if( pEntry )
+ {
+ aObjectList.Insert( pEntry, nNewPos );
+
+ if( nNewPos < nOldPos )
+ nOldPos++;
+
+ aObjectList.Remove( nOldPos );
+ ImplSetModified( bRet = TRUE );
+ ImplBroadcast( nNewPos );
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProgress )
+{
+ if( !IsReadOnly() && !IsImported() )
+ {
+ Graphic aGraphic;
+ String aFormat;
+ GalleryObject* pEntry;
+ const ULONG nCount = aObjectList.Count();
+ ULONG i;
+
+ LockBroadcaster();
+ bAbortActualize = FALSE;
+
+ // LoeschFlag zuruecksetzen
+ for ( i = 0; i < nCount; i++ )
+ aObjectList.GetObject( i )->bDummy = FALSE;
+
+ for( i = 0; ( i < nCount ) && !bAbortActualize; i++ )
+ {
+ if( pProgress )
+ pProgress->Update( i, nCount - 1 );
+
+ pEntry = aObjectList.GetObject( i );
+ aActualizeFile = pEntry->aPath;
+ rActualizeLink.Call( this );
+
+ // SvDraw-Objekte werden spaeter aktualisiert
+ if( pEntry->eObjKind != SGA_OBJ_SVDRAW )
+ {
+ // Hier muss noch etwas eingebaut werden,
+ // das Files auf den ensprechenden Eintrag matched
+ // Grafiken als Grafik-Objekte in die Gallery aufnehmen
+#ifndef MAC
+ if( INetURLObject( pEntry->aPath, INET_PROT_FILE ).GetExtension().CompareIgnoreCaseToAscii( "wav" ) != COMPARE_EQUAL )
+#else
+ if( TRUE )
+#endif
+ {
+ // vermeiden, dass ein native Link angelegt wird,
+ // da dies an dieser Stelle nicht noetig ist
+ aGraphic.Clear();
+ aGraphic.SetLink( GfxLink() );
+
+ if ( SGAImport( aActualizeFile, aGraphic, aFormat ) )
+ {
+ SgaObject* pNewObj;
+
+ if ( SGA_OBJ_INET == pEntry->eObjKind )
+ pNewObj = (SgaObject*) new SgaObjectINet( aGraphic, aActualizeFile, aFormat );
+ else if ( aGraphic.IsAnimated() )
+ pNewObj = (SgaObject*) new SgaObjectAnim( aGraphic, aActualizeFile, aFormat );
+ else
+ pNewObj = (SgaObject*) new SgaObjectBmp( aGraphic, aActualizeFile, aFormat );
+
+ if( !InsertObject( *pNewObj ) )
+ pEntry->bDummy = TRUE;
+
+ delete pNewObj;
+ }
+ else
+ pEntry->bDummy = TRUE; // Loesch-Flag setzen
+ }
+ // restliche Sachen als Sound-Objekte aufnehmen
+ else
+ {
+ SgaObjectSound aObjSound( aActualizeFile );
+ if( !InsertObject( aObjSound ) )
+ pEntry->bDummy = TRUE;
+ }
+ }
+ else
+ {
+ INetURLObject aURL( pEntry->aPath, INET_PROT_FILE );
+
+ if ( aSvDrawStorageRef.Is() )
+ {
+ SvStorageStreamRef pIStm = aSvDrawStorageRef->OpenStream( aURL.GetBase(), STREAM_READ );
+
+ if ( pIStm && !pIStm->GetError() )
+ {
+ SvMemoryStream aMemStm;
+
+ pIStm->SetBufferSize( 16384 );
+
+ if ( !RLECodec::IsRLECoded( *pIStm ) )
+ {
+ const ULONG nSize = pIStm->Seek( STREAM_SEEK_TO_END );
+ void* pBuffer = SvMemAlloc( nSize );
+
+ pIStm->Seek( STREAM_SEEK_TO_BEGIN );
+
+ if ( pBuffer && nSize )
+ {
+ pIStm->Read( pBuffer, nSize );
+
+ pIStm->SetBufferSize( 0 );
+ pIStm.Clear();
+ pIStm = aSvDrawStorageRef->OpenStream( aURL.GetBase(), STREAM_WRITE | STREAM_TRUNC );
+ pIStm->SetBufferSize( 16384 );
+ pIStm->Seek( STREAM_SEEK_TO_BEGIN );
+
+ RLECodec aCodec( *pIStm );
+
+ aMemStm.SetBuffer( (char*) pBuffer, nSize, FALSE, nSize );
+ aCodec.Write( aMemStm );
+
+ SgaObjectSvDraw aNewObj( aMemStm, aURL );
+ if( !InsertObject( aNewObj ) )
+ pEntry->bDummy = TRUE;
+ }
+
+ if( pBuffer )
+ SvMemFree( pBuffer );
+ }
+ else
+ {
+ SgaObjectSvDraw aNewObj( *pIStm, aURL );
+ if( !InsertObject( aNewObj ) )
+ pEntry->bDummy = TRUE;
+ }
+
+ pIStm->SetBufferSize( 0L );
+ }
+ }
+ }
+ }
+
+ // alle Eintraege mit gesetztem LoeschFlag
+ // aus der ObjektListe entfernen
+ pEntry = aObjectList.First();
+ while( pEntry )
+ {
+ if ( pEntry->bDummy )
+ {
+ delete aObjectList.Remove( pEntry );
+ pEntry = aObjectList.GetCurObject();
+ }
+ else
+ pEntry = aObjectList.Next();
+ }
+
+ // Thema komplett neu aufbauen
+ INetURLObject aTempFile( TempFile::CreateTempName(), INET_PROT_FILE );
+ SvFileStream aIStm( GetSdgPath(), STREAM_READ );
+ SvFileStream aOStm( aTempFile.PathToFileName(), STREAM_WRITE | STREAM_TRUNC );
+
+ pEntry = aObjectList.First();
+
+ while( pEntry )
+ {
+ switch( pEntry->eObjKind )
+ {
+ case( SGA_OBJ_BMP ):
+ {
+ SgaObjectBmp* pObj = new SgaObjectBmp();
+ aIStm.Seek( pEntry->nOffset );
+ aIStm >> *pObj;
+ pEntry->nOffset = aOStm.Tell();
+ aOStm << *pObj;
+ delete pObj;
+ }
+ break;
+
+ case( SGA_OBJ_ANIM ):
+ {
+ SgaObjectAnim* pObj = new SgaObjectAnim();
+ aIStm.Seek( pEntry->nOffset );
+ aIStm >> *pObj;
+ pEntry->nOffset = aOStm.Tell();
+ aOStm << *pObj;
+ delete pObj;
+ }
+ break;
+
+ case( SGA_OBJ_INET ) :
+ {
+ SgaObjectINet* pObj = new SgaObjectINet();
+ aIStm.Seek( pEntry->nOffset );
+ aIStm >> *pObj;
+ pEntry->nOffset = aOStm.Tell();
+ aOStm << *pObj;
+ delete pObj;
+ }
+ break;
+
+ case( SGA_OBJ_SVDRAW ) :
+ {
+ SgaObjectSvDraw* pObj = new SgaObjectSvDraw();
+ aIStm.Seek( pEntry->nOffset );
+ aIStm >> *pObj;
+ pEntry->nOffset = aOStm.Tell();
+ aOStm << *pObj;
+ delete pObj;
+ }
+ break;
+
+ case (SGA_OBJ_SOUND) :
+ {
+ SgaObjectSound* pObj = new SgaObjectSound();
+ aIStm.Seek( pEntry->nOffset );
+ aIStm >> *pObj;
+ pEntry->nOffset = aOStm.Tell();
+ aOStm << *pObj;
+ delete pObj;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ pEntry = aObjectList.Next();
+ }
+
+ aIStm.Close();
+ aOStm.Close();
+
+ CopyFile( aTempFile, INetURLObject( GetSdgPath(), INET_PROT_FILE ) );
+ KillFile( aTempFile );
+
+ // storage updaten (kopieren)
+ SvStorageRef aTempStorageRef( new SvStorage( aTempFile.PathToFileName() ) );
+ aSvDrawStorageRef->CopyTo( aTempStorageRef );
+
+ if( !aSvDrawStorageRef->GetError() )
+ {
+ aSvDrawStorageRef.Clear();
+ aTempStorageRef.Clear();
+ CopyFile( aTempFile, INetURLObject( GetSdvPath(), INET_PROT_FILE ) );
+ aSvDrawStorageRef = new SvStorage( GetSdvPath() );
+ }
+
+ KillFile( aTempFile );
+ ImplSetModified( TRUE );
+ ImplWrite();
+ UnlockBroadcaster();
+ }
+}
+
+// ------------------------------------------------------------------------
+
+GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const String& rFile, BOOL bReadOnly )
+{
+ GalleryThemeEntry* pRet = NULL;
+
+ if( FileExists( INetURLObject( rFile, INET_PROT_FILE ) ) )
+ {
+ SvFileStream aThmStm( rFile, STREAM_READ );
+ String aThemeName;
+ sal_uInt32 nThemeId = 0;
+ sal_uInt16 nVersion;
+ BOOL bThemeNameFromResource = FALSE;
+
+ aThmStm >> nVersion;
+
+ if( nVersion <= 0x00ff )
+ {
+ ByteString aTmpStr;
+
+ aThmStm >> aTmpStr; aThemeName = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 );
+
+ // Charakterkonvertierung durchfuehren
+ if( nVersion >= 0x0004 )
+ {
+ sal_uInt32 nCount;
+ sal_uInt16 nTemp16;
+
+ aThmStm >> nCount >> nTemp16;
+ aThmStm.Seek( STREAM_SEEK_TO_END );
+
+ // pruefen, ob es sich um eine neuere Version handelt;
+ // daher um 520Bytes (8Bytes Kennung + 512Bytes Reserverpuffer ) zurueckspringen,
+ // falls dies ueberhaupt moeglich ist
+ if( aThmStm.Tell() >= 520 )
+ {
+ ULONG nId1, nId2;
+
+ aThmStm.SeekRel( -520 );
+ aThmStm >> nId1 >> nId2;
+
+ if( nId1 == COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) &&
+ nId2 == COMPAT_FORMAT( 'E', 'S', 'R', 'V' ) )
+ {
+ VersionCompat* pCompat = new VersionCompat( aThmStm, STREAM_READ );
+
+ aThmStm >> nThemeId;
+
+ if( pCompat->GetVersion() >= 2 )
+ {
+ aThmStm >> bThemeNameFromResource;
+ }
+
+ delete pCompat;
+ }
+ }
+ }
+
+ INetURLObject aFileObj( rFile, INET_PROT_FILE );
+ pRet = new GalleryThemeEntry( aFileObj.GetPath(), aThemeName,
+ aFileObj.GetBase().Copy( 2, 6 ).ToInt32(),
+ bReadOnly, FALSE, FALSE, nThemeId,
+ bThemeNameFromResource );
+ }
+ }
+
+ return pRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryTheme::GetThumb( ULONG nPos, Bitmap& rBmp, BOOL bProgress )
+{
+ SgaObject* pObj = AcquireObject( nPos );
+ BOOL bRet = FALSE;
+
+ if( pObj )
+ {
+ rBmp = pObj->GetThumbBmp();
+ ReleaseObject( pObj );
+ bRet = TRUE;
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryTheme::GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress )
+{
+ const GalleryObject* pObject = ImplGetGalleryObject( nPos );
+ BOOL bRet = FALSE;
+
+ if( pObject )
+ {
+ const String aPath( ImplGetPathToFile( pObject ) );
+
+ switch( pObject->eObjKind )
+ {
+ case( SGA_OBJ_BMP ):
+ case( SGA_OBJ_ANIM ):
+ case( SGA_OBJ_INET ):
+ {
+ String aFilterDummy;
+ bRet = ( SGAImport( aPath, rGraphic, aFilterDummy, bProgress ) != SGA_IMPORT_NONE );
+ }
+ break;
+
+ case( SGA_OBJ_SVDRAW ):
+ {
+ FmFormModel aModel;
+
+ aModel.GetItemPool().FreezeIdRanges();
+
+ if( GetModel( nPos, aModel, bProgress ) )
+ {
+ ImageMap aIMap;
+
+ if( CreateIMapGraphic( aModel, rGraphic, aIMap ) )
+ bRet = TRUE;
+ else
+ {
+ VirtualDevice aVDev;
+ aVDev.SetMapMode( MapMode( MAP_100TH_MM ) );
+ FmFormView aView( &aModel, &aVDev );
+
+ aView.SetMarkHdlHidden( TRUE );
+ aView.ShowPagePgNum( 0, Point() );
+ aView.MarkAll();
+ rGraphic = aView.GetAllMarkedMetaFile();
+ bRet = TRUE;
+ }
+ }
+ }
+ break;
+
+ case( SGA_OBJ_SOUND ):
+ {
+ SgaObject* pObj = AcquireObject( nPos );
+
+ if( pObj )
+ {
+ rGraphic = BitmapEx( pObj->GetThumbBmp(), COL_LIGHTMAGENTA );
+ ReleaseObject( pObj );
+ bRet = TRUE;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryTheme::InsertGraphic( const Graphic& rGraphic, ULONG nInsertPos )
+{
+ BOOL bRet = FALSE;
+
+ if( rGraphic.GetType() != GRAPHIC_NONE )
+ {
+ INetURLObject aURL( CreateUniqueFileName( GetParent(), SGA_OBJ_BMP ) );
+ SvFileStream aOStm;
+
+ if( rGraphic.GetType() == GRAPHIC_BITMAP )
+ {
+ ULONG nExportFormat;
+
+ if( rGraphic.IsAnimated() )
+ {
+ aURL.SetExtension( String( RTL_CONSTASCII_USTRINGPARAM( "gif" ) ) );
+ nExportFormat = CVT_GIF;
+ }
+ else
+ {
+ aURL.SetExtension( String( RTL_CONSTASCII_USTRINGPARAM( "png" ) ) );
+ nExportFormat = CVT_PNG;
+ }
+
+ aOStm.Open( aURL.PathToFileName(), STREAM_WRITE | STREAM_TRUNC );
+
+ if( aOStm.IsOpen() )
+ {
+ aOStm.SetVersion( SOFFICE_FILEFORMAT_NOW );
+ bRet = ( GraphicConverter::Export( aOStm, rGraphic, nExportFormat ) == ERRCODE_NONE );
+ aOStm.Close();
+ }
+ }
+ else
+ {
+ aURL.SetExtension( String( RTL_CONSTASCII_USTRINGPARAM( "svm" ) ) );
+ aOStm.Open( aURL.PathToFileName(), STREAM_WRITE | STREAM_TRUNC );
+
+ if( aOStm.IsOpen() )
+ {
+ GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() );
+ aOStm.SetVersion( SOFFICE_FILEFORMAT_NOW );
+ aMtf.Write( aOStm );
+ bRet = ( aOStm.GetError() == ERRCODE_NONE );
+ aOStm.Close();
+ }
+ }
+
+ if( bRet )
+ {
+ const SgaObjectBmp aObjBmp( aURL.PathToFileName() );
+ InsertObject( aObjBmp, nInsertPos );
+ }
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryTheme::GetModel( ULONG nPos, FmFormModel& rModel, BOOL bProgress )
+{
+ const GalleryObject* pObject = ImplGetGalleryObject( nPos );
+ BOOL bRet = FALSE;
+
+ if( pObject && ( SGA_OBJ_SVDRAW == pObject->eObjKind ) )
+ {
+ const INetURLObject aFile( ImplGetPathToFile( pObject ), INET_PROT_FILE );
+ SvStorageRef xStor( GetSvDrawStorage() );
+
+ if( xStor.Is() )
+ {
+ SvStorageStreamRef xIStm( xStor->OpenStream( aFile.GetBase(), STREAM_READ ) );
+
+ if( xIStm.Is() && !xIStm->GetError() )
+ {
+ xIStm->SetBufferSize( STREAMBUF_SIZE );
+ bRet = SGASvDrawImport( *xIStm, rModel );
+ xIStm->SetBufferSize( 0L );
+ }
+ }
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryTheme::InsertModel( const FmFormModel& rModel, ULONG nInsertPos )
+{
+ INetURLObject aURL( CreateUniqueFileName( GetParent(), SGA_OBJ_SVDRAW ) );
+ SvStorageRef xStor( GetSvDrawStorage() );
+ BOOL bRet = FALSE;
+
+ if( xStor.Is() )
+ {
+ SvStorageStreamRef xOStm( xStor->OpenStream( aURL.GetBase(), STREAM_WRITE | STREAM_TRUNC ) );
+
+ if( xOStm.Is() && !xOStm->GetError() )
+ {
+ SvMemoryStream aMemStm( 65535, 65535 );
+ RLECodec aCodec( *xOStm );
+
+ aMemStm.SetVersion( SOFFICE_FILEFORMAT_NOW );
+ ( (FmFormModel&) rModel ).SetStreamingSdrModel( TRUE );
+ rModel.GetItemPool().Store( aMemStm );
+ aMemStm << rModel;
+ ( (FmFormModel&) rModel ).SetStreamingSdrModel( FALSE );
+ aMemStm.Seek( 0L );
+
+ xOStm->SetBufferSize( STREAMBUF_SIZE );
+ aCodec.Write( aMemStm );
+
+ if( !xOStm->GetError() )
+ {
+ SgaObjectSvDraw aObjSvDraw( rModel, aURL );
+ InsertObject( aObjSvDraw, nInsertPos );
+ bRet = TRUE;
+ }
+
+ xOStm->SetBufferSize( 0L );
+ }
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryTheme::GetURL( ULONG nPos, INetURLObject& rURL, BOOL bProgress )
+{
+ const GalleryObject* pObject = ImplGetGalleryObject( nPos );
+ BOOL bRet = FALSE;
+
+ if( pObject )
+ {
+ rURL = INetURLObject( ImplGetPathToFile( pObject ), INET_PROT_FILE );
+ bRet = TRUE;
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryTheme::InsertURL( const INetURLObject& rURL, ULONG nInsertPos )
+{
+ Graphic aGraphic;
+ String aFormat;
+ SgaObject* pNewObj = NULL;
+ const String aFileName( rURL.PathToFileName() );
+ const USHORT nImportRet = SGAImport( aFileName, aGraphic, aFormat );
+ BOOL bRet = FALSE;
+
+ aGraphic.SetLink( GfxLink() );
+
+ if( nImportRet != SGA_IMPORT_NONE )
+ {
+ if ( SGA_IMPORT_INET == nImportRet )
+ pNewObj = (SgaObject*) new SgaObjectINet( aGraphic, aFileName, aFormat );
+ else if ( aGraphic.IsAnimated() )
+ pNewObj = (SgaObject*) new SgaObjectAnim( aGraphic, aFileName, aFormat );
+ else
+ pNewObj = (SgaObject*) new SgaObjectBmp( aGraphic, aFileName, aFormat );
+ }
+ else if( SGAIsSoundFile( aFileName ) )
+ pNewObj = (SgaObject*) new SgaObjectSound( aFileName );
+
+ if( pNewObj && InsertObject( *pNewObj, nInsertPos ) )
+ bRet = TRUE;
+
+ delete pNewObj;
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+SvDataTypeList GalleryTheme::GetDataXChgTypeList( const SvDataTypeList& rTypeList, ULONG nPos )
+{
+ SvDataTypeList aTypeList( rTypeList );
+ const GalleryObject* pObj = ImplGetGalleryObject( nPos );
+
+ if( pObj )
+ {
+ if( pObj->eObjKind == SGA_OBJ_SVDRAW )
+ {
+ FmFormModel aModel;
+ Graphic aGraphic;
+ ImageMap aIMap;
+
+ aModel.GetItemPool().FreezeIdRanges();
+
+ if( GetModel( nPos, aModel ) && CreateIMapGraphic( aModel, aGraphic, aIMap ) )
+ {
+ aTypeList.Insert( SvDataType( SOT_FORMATSTR_ID_SVXB, MEDIUM_STREAM | MEDIUM_MEMORY ), LIST_APPEND );
+ aTypeList.Insert( SvDataType( SOT_FORMATSTR_ID_SVIM, MEDIUM_STREAM | MEDIUM_MEMORY ), LIST_APPEND );
+ }
+ else
+ aTypeList.Insert( SvDataType( SOT_FORMATSTR_ID_DRAWING ), LIST_APPEND );
+ }
+ else
+ {
+ aTypeList.Insert( SvDataType( FORMAT_FILE, MEDIUM_MEMORY ), LIST_APPEND );
+
+ if( ( pObj->eObjKind == SGA_OBJ_BMP ) || ( pObj->eObjKind == SGA_OBJ_ANIM ) )
+ {
+ aTypeList.Insert( SvDataType( SOT_FORMATSTR_ID_SVXB, MEDIUM_STREAM | MEDIUM_MEMORY ), LIST_APPEND );
+ aTypeList.Insert( SvDataType( FORMAT_GDIMETAFILE, MEDIUM_MEMORY ), LIST_APPEND );
+ aTypeList.Insert( SvDataType( FORMAT_BITMAP, MEDIUM_MEMORY ), LIST_APPEND );
+ }
+ }
+ }
+
+ return aTypeList;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryTheme::GetDataXChgData( SvData* pData, ULONG nFormat, ULONG nPos )
+{
+ BOOL bRet = FALSE;
+
+ if( pData )
+ {
+ if( nFormat == SOT_FORMATSTR_ID_SVXB )
+ {
+ Graphic aGraphic;
+ bRet = GetGraphic( nPos, aGraphic );
+
+ if( bRet )
+ pData->SetData( (SvDataCopyStream*) &aGraphic );
+ }
+ else if( nFormat == SOT_FORMATSTR_ID_SVIM )
+ {
+ FmFormModel aModel;
+ Graphic aGraphic;
+ ImageMap aIMap;
+
+ aModel.GetItemPool().FreezeIdRanges();
+ bRet = ( GetModel( nPos, aModel ) && CreateIMapGraphic( aModel, aGraphic, aIMap ) );
+
+ if( bRet )
+ pData->SetData( (SvDataCopyStream*) &aIMap );
+ }
+ else if( nFormat == SOT_FORMATSTR_ID_DRAWING )
+ {
+ SvStorageRef xStor( GetSvDrawStorage() );
+
+ if( xStor.Is() )
+ {
+ SvStorageStreamRef xIStm( xStor->OpenStream( INetURLObject( GetObjectPath( nPos ), INET_PROT_FILE ).GetBase(), STREAM_READ ) );
+
+ if( xIStm.Is() && !xIStm->GetError() )
+ {
+ xIStm->SetBufferSize( 16384 );
+
+ if( RLECodec::IsRLECoded( *xIStm ) )
+ {
+ SvMemoryStream aMemStm;
+ RLECodec aCodec( *xIStm );
+ ULONG nSize;
+
+ nSize = aCodec.Read( aMemStm );
+ pData->SetData( (void*) aMemStm.GetData(), nSize, TRANSFER_COPY );
+ bRet = TRUE;
+ }
+ else
+ {
+ const ULONG nSize = xIStm->Seek( STREAM_SEEK_TO_END );
+ void* pBuffer = SvMemAlloc( nSize );
+
+ if ( pBuffer && nSize )
+ {
+ xIStm->Seek( STREAM_SEEK_TO_BEGIN );
+ xIStm->Read( pBuffer, nSize );
+ pData->SetData( pBuffer, nSize, TRANSFER_COPY );
+ bRet = TRUE;
+ }
+
+ if ( pBuffer )
+ SvMemFree( pBuffer );
+ }
+
+ xIStm->SetBufferSize( 0L );
+ }
+ }
+ }
+ else
+ {
+ switch( nFormat )
+ {
+ case( FORMAT_FILE ):
+ {
+ pData->SetData( GetObjectPath( nPos ) );
+ bRet = TRUE;
+ }
+ break;
+
+
+ case( FORMAT_BITMAP ):
+ {
+ Graphic aGraphic;
+
+ bRet = GetGraphic( nPos, aGraphic );
+
+ if( bRet )
+ {
+ Bitmap aBmp( aGraphic.GetBitmap() );
+ pData->SetData( &aBmp );
+ }
+ }
+ break;
+
+
+ case( FORMAT_GDIMETAFILE ):
+ {
+ Graphic aGraphic;
+
+ bRet = GetGraphic( nPos, aGraphic );
+
+ if( bRet )
+ {
+ GDIMetaFile aMtf( aGraphic.GetGDIMetaFile() );
+ pData->SetData( &aMtf );
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL GalleryTheme::InsertDataXChgData( SvDataObjectRef& rxData, ULONG nInsertPos )
+{
+ const SvDataTypeList& rTypeList = rxData->GetTypeList();
+ Graphic* pGraphic = NULL;
+ BOOL bRet = FALSE;
+
+ for( ULONG n = 0, nCount = rTypeList.Count(); ( n < nCount ) && !bRet ; n++ )
+ {
+ const ULONG nFormat = rTypeList.GetObject( n ).GetFormat();
+
+ if( SOT_FORMATSTR_ID_DRAWING == nFormat )
+ {
+ SvData aData( SOT_FORMATSTR_ID_DRAWING );
+
+ if( rxData->GetData( &aData ) )
+ {
+ void* pSvDrawData = NULL;
+
+ if( aData.GetData( &pSvDrawData, TRANSFER_MOVE ) )
+ {
+ FmFormModel aModel;
+ SvMemoryStream aMemStm;
+ const ULONG nSvDrawDataSize = aData.GetMinMemorySize();
+
+ aModel.GetItemPool().FreezeIdRanges();
+ aMemStm.SetBuffer( (char*) pSvDrawData, nSvDrawDataSize, FALSE, nSvDrawDataSize );
+
+ if( SGASvDrawImport( aMemStm, aModel ) )
+ bRet = InsertModel( aModel, nInsertPos );
+ }
+ }
+ }
+ else if( FORMAT_FILE == nFormat )
+ {
+ SvData aData( FORMAT_FILE );
+
+ if( rxData->GetData( &aData ) )
+ {
+ String aFile;
+
+ if( aData.GetData( aFile ) )
+ {
+ try
+ {
+ INetURLObject aURL( aFile, INET_PROT_FILE );
+
+ Content aCnt( aURL.GetMainURL(), uno::Reference< XCommandEnvironment >() );
+ sal_Bool bFolder;
+
+ aCnt.getPropertyValue( OUString::createFromAscii( "IsFolder" ) ) >>= bFolder;
+
+ if( bFolder )
+ {
+ uno::Sequence< OUString > aProps( 1 );
+ aProps.getArray()[ 0 ] == OUString::createFromAscii( "Url" );
+ uno::Reference< sdbc::XResultSet > xResultSet( aCnt.createCursor( aProps, INCLUDE_DOCUMENTS_ONLY ) );
+
+ if( xResultSet.is() )
+ {
+ uno::Reference< XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
+
+ if( xContentAccess.is() )
+ {
+ while( xResultSet->next() )
+ {
+ aURL.SetSmartURL( xContentAccess->queryContentIdentfierString() );
+ bRet = bRet || InsertURL( aURL, nInsertPos );
+ }
+ }
+ }
+ }
+ else
+ bRet = InsertURL( aURL, nInsertPos );
+ }
+ catch( ... )
+ {
+ DBG_ERROR( "GalleryTheme::InsertDataXChgData: ucb error" );
+ }
+ }
+ }
+ }
+ else if( SOT_FORMATSTR_ID_SVXB == nFormat )
+ {
+ SvData aData( SOT_FORMATSTR_ID_SVXB );
+
+ if( rxData->GetData( &aData ) )
+ {
+ if( aData.GetData( (SvDataCopyStream**) &pGraphic, Graphic::StaticType(), TRANSFER_MOVE ) )
+ bRet = TRUE;
+ else
+ delete pGraphic, pGraphic = NULL;
+ }
+ }
+ else if( FORMAT_GDIMETAFILE == nFormat )
+ {
+ SvData aData( FORMAT_GDIMETAFILE );
+
+ if( rxData->GetData( &aData ) )
+ {
+ GDIMetaFile* pMtf = NULL;
+
+ if( aData.GetData( &pMtf, TRANSFER_MOVE ) && pMtf )
+ {
+ pGraphic = new Graphic( *pMtf );
+ bRet = TRUE;
+ }
+
+ delete pMtf;
+ }
+ }
+ else if ( FORMAT_BITMAP == nFormat )
+ {
+ SvData aData( FORMAT_BITMAP );
+
+ if( rxData->GetData( &aData ) )
+ {
+ Bitmap* pBmp = NULL;
+
+ if( aData.GetData( &pBmp, TRANSFER_MOVE ) && pBmp )
+ {
+ pGraphic = new Graphic( *pBmp );
+ bRet = TRUE;
+ }
+
+ delete pBmp;
+ }
+ }
+ }
+
+ if( pGraphic )
+ {
+ bRet = FALSE;
+
+ if( rTypeList.HasEqualType( SvDataType( SOT_FORMATSTR_ID_SVIM, MEDIUM_STREAM | MEDIUM_MEMORY ) ) )
+ {
+ SvData aData( SOT_FORMATSTR_ID_SVIM );
+
+ if( rxData->GetData( &aData ) )
+ {
+ ImageMap* pIMap = NULL;
+
+ if( aData.GetData( (SvDataCopyStream**) &pIMap, ImageMap::StaticType(), TRANSFER_MOVE ) && pIMap )
+ {
+ FmFormModel aModel;
+ SgaUserDataFactory aFactory;
+
+ aModel.GetItemPool().FreezeIdRanges();
+
+ SdrPage* pPage = aModel.AllocPage( FALSE );
+ SdrGrafObj* pGrafObj = new SdrGrafObj( *pGraphic );
+
+ pGrafObj->InsertUserData( new SgaIMapInfo( *pIMap ) );
+ pPage->InsertObject( pGrafObj );
+ aModel.SetPageNotValid( TRUE );
+ aModel.InsertPage( pPage );
+ bRet = InsertModel( aModel, nInsertPos );
+ }
+
+ delete pIMap;
+ }
+ }
+
+ if( !bRet )
+ bRet = InsertGraphic( *pGraphic, nInsertPos );
+
+ delete pGraphic;
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
+{
+ const String aRelParent1( GetParent()->GetRelativePath() );
+ const String aRelParent2( GetParent()->GetUserPath() );
+ String aNewPath, aTemp;
+ sal_uInt32 nCount = GetObjectCount();
+ BOOL bRel;
+
+ rOStm << (sal_uInt16) 0x0004;
+ rOStm << ByteString( GetRealName(), RTL_TEXTENCODING_UTF8 );
+ rOStm << nCount << (sal_uInt16) gsl_getSystemTextEncoding();
+
+ for( sal_uInt32 i = 0; i < nCount; i++ )
+ {
+ const GalleryObject* pObj = ImplGetGalleryObject( i );
+
+ aTemp = pObj->aPath;
+ bRel = ( ( aTemp.Erase( aRelParent1.Len() ) ) == aRelParent1 );
+
+ if( bRel && ( pObj->aPath.Len() > ( aRelParent1.Len() + 1 ) ) )
+ {
+ aTemp = pObj->aPath;
+ aNewPath = aTemp.Erase( 0, aRelParent1.Len() + 1 );
+ }
+ else
+ {
+ aTemp = pObj->aPath;
+ bRel = ( ( aTemp.Erase( aRelParent2.Len() ) ) == aRelParent2 );
+
+ if( bRel && ( pObj->aPath.Len() > ( aRelParent2.Len() + 1 ) ) )
+ {
+ aTemp = pObj->aPath;
+ aNewPath = aTemp.Erase( 0, aRelParent2.Len() + 1 );
+ }
+ else
+ aNewPath = pObj->aPath;
+ }
+
+ rOStm << bRel << ByteString( aNewPath, RTL_TEXTENCODING_UTF8 );
+ rOStm << pObj->nOffset << (sal_uInt16) pObj->eObjKind;
+ }
+
+ // neuerdings wird ein 512-Byte-Reservepuffer gechrieben;
+ // um diesen zu erkennen werden zwei ULONG-Ids geschrieben
+ rOStm << COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) << COMPAT_FORMAT( 'E', 'S', 'R', 'V' );
+
+ const long nReservePos = rOStm.Tell();
+ VersionCompat* pCompat = new VersionCompat( rOStm, STREAM_WRITE, 2 );
+
+ rOStm << (sal_uInt32) GetId() << IsThemeNameFromResource(); // ab Version 2
+
+ delete pCompat;
+
+ // Rest des Puffers auffuellen
+ const long nRest = Max( 512L - ( (long) rOStm.Tell() - nReservePos ), 0L );
+
+ if( nRest )
+ {
+ char* pReserve = new char[ nRest ];
+ memset( pReserve, 0, nRest );
+ rOStm.Write( pReserve, nRest );
+ delete[] pReserve;
+ }
+
+ return rOStm;
+}
+
+// ------------------------------------------------------------------------
+
+SvStream& GalleryTheme::ReadData( SvStream& rIStm )
+{
+ sal_uInt32 nCount;
+ sal_uInt16 nVersion;
+ ByteString aTmpStr;
+ String aThemeName;
+ rtl_TextEncoding nTextEncoding;
+ static char cSystemDelimiter = 0;
+
+ if( !cSystemDelimiter )
+ {
+#ifdef MAC
+ cSystemDelimiter = ':';
+#elif defined WIN || defined WNT || defined OS2
+ cSystemDelimiter = '\\';
+#else
+ cSystemDelimiter = '/';
+#endif
+ }
+
+ aImportName = String();
+
+ rIStm >> nVersion >> aTmpStr >> nCount;
+
+ if( nVersion >= 0x0004 )
+ {
+ UINT16 nTmp16;
+ rIStm >> nTmp16;
+ nTextEncoding = (rtl_TextEncoding) nTmp16;
+ }
+ else
+ nTextEncoding = RTL_TEXTENCODING_UTF8;
+
+ aThemeName = String( aTmpStr.GetBuffer(), nTextEncoding );
+
+ if( nCount <= ( 1L << 14 ) )
+ {
+ GalleryObject* pObj;
+ String aRelParent1( GetParent()->GetRelativePath() ), aRelParent2( GetParent()->GetUserPath() );
+ sal_uInt32 nId1, nId2;
+ BOOL bRel;
+
+ for( pObj = aObjectList.First(); pObj; pObj = aObjectList.Next() )
+ delete pObj;
+
+ aObjectList.Clear();
+
+ for( sal_uInt32 i = 0; i < nCount; i++ )
+ {
+ pObj = new GalleryObject;
+
+ ByteString aTmpStr;
+ String aFileName;
+ String aPath;
+ sal_uInt16 nTemp;
+
+ rIStm >> bRel >> aTmpStr >> pObj->nOffset;
+ rIStm >> nTemp; pObj->eObjKind = (SgaObjKind) nTemp;
+
+ aFileName = String( aTmpStr.GetBuffer(), gsl_getSystemTextEncoding() );
+ aFileName.SearchAndReplaceAll( '\\', cSystemDelimiter );
+
+ if( bRel )
+ {
+ aPath = aRelParent1;
+
+ if( aFileName.GetChar( 0 ) != cSystemDelimiter )
+ aPath += cSystemDelimiter;
+
+ aPath += aFileName;
+
+ if( FileExists( INetURLObject( aPath, INET_PROT_FILE ) ) )
+ pObj->aPath = aPath;
+ else
+ {
+ aPath = aRelParent2;
+
+ if( aFileName.GetChar( 0 ) != cSystemDelimiter )
+ aPath += cSystemDelimiter;
+
+ aPath += aFileName;
+
+ if( FileExists( INetURLObject( aPath, INET_PROT_FILE ) ) )
+ pObj->aPath = aPath;
+ }
+ }
+ else
+ pObj->aPath = aFileName;
+
+ aObjectList.Insert( pObj, LIST_APPEND );
+ }
+
+ rIStm >> nId1 >> nId2;
+
+ // in neueren Versionen befindet sich am Ende ein 512-Byte-Reservepuffer;
+ // die Daten befinden sich am Anfang dieses Puffers und
+ // sind durch eine VersionCompat geklammert
+ if( !rIStm.IsEof() &&
+ nId1 == COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) &&
+ nId2 == COMPAT_FORMAT( 'E', 'S', 'R', 'V' ) )
+ {
+ VersionCompat* pCompat = new VersionCompat( rIStm, STREAM_READ );
+ sal_uInt32 nTemp32;
+ BOOL bThemeNameFromResource = FALSE;
+
+ rIStm >> nTemp32;
+
+ if( pCompat->GetVersion() >= 2 )
+ {
+ rIStm >> bThemeNameFromResource;
+ }
+
+ SetId( nTemp32, bThemeNameFromResource );
+ delete pCompat;
+ }
+ }
+ else
+ rIStm.SetError( SVSTREAM_READ_ERROR );
+
+ ImplSetModified( FALSE );
+
+ return rIStm;
+}
+
+// ------------------------------------------------------------------------
+
+SvStream& operator<<( SvStream& rOut, const GalleryTheme& rTheme )
+{
+ return rTheme.WriteData( rOut );
+}
+
+// ------------------------------------------------------------------------
+
+SvStream& operator>>( SvStream& rIn, GalleryTheme& rTheme )
+{
+ return rTheme.ReadData( rIn );
+}
diff --git a/svx/source/gallery2/galtheme.src b/svx/source/gallery2/galtheme.src
new file mode 100644
index 0000000000..36f3003f93
--- /dev/null
+++ b/svx/source/gallery2/galtheme.src
@@ -0,0 +1,669 @@
+/*************************************************************************
+ *
+ * $RCSfile: galtheme.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "gallery.hrc"
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_3D
+{
+ // !!! zunaechst bitte nicht uebersetzen
+ Text = "3D";
+ Text[ENGLISH] = "3D";
+ Text[english_us] = "3D";
+ Text[ portuguese ] = "3D";
+ Text[ russian ] = "3-Ì";
+ Text[ dutch ] = "3D";
+ Text[ french ] = "3D";
+ Text[ spanish ] = "3D";
+ Text[ italian ] = "3D";
+ Text[ danish ] = "3D";
+ Text[ swedish ] = "3D";
+ Text[ polish ] = "3-W";
+ Text[ portuguese_brazilian ] = "3D";
+ Text[ japanese ] = "3D";
+ Text[ chinese_simplified ] = "3 ά";
+/*
+ Text = "3D";
+ Text[ENGLISH] = "3D";
+ Text[english_us] = "3-D";
+ Text[ portuguese ] = "3D";
+ Text[ russian ] = "3D";
+ Text[ dutch ] = "3D";
+ Text[ french ] = "3D";
+ Text[ spanish ] = "3D";
+ Text[ italian ] = "3D";
+ Text[ danish ] = "3D";
+ Text[ swedish ] = "3D";
+ Text[ polish ] = "3-W";
+ Text[ portuguese_brazilian ] = "3D";
+ Text[ japanese ] = "3D";
+ Text[ chinese_simplified ] = "3 άͼÐÎ";
+*/
+ Text[ chinese_traditional ] = "3 ºû";
+ Text[ arabic ] = "ÃÔßÇá ËáÇËíÉ ÇáÃÈÚÇÏ";
+ Text[ greek ] = "3Ä";
+ Text[ korean ] = "3D";
+ Text[ turkish ] = "3B";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_ANIMATIONS
+{
+ Text = "Animationen";
+ Text[ENGLISH] = "Animations";
+ Text[english_us] = "Animations";
+ Text[ portuguese ] = "Animações";
+ Text[ russian ] = "Àíèìàöèè";
+ Text[ dutch ] = "Animatie";
+ Text[ french ] = "Animations";
+ Text[ spanish ] = "Animaciones";
+ Text[ italian ] = "Animazioni";
+ Text[ danish ] = "Animationer";
+ Text[ swedish ] = "Animeringar";
+ Text[ polish ] = "Animacje";
+ Text[ portuguese_brazilian ] = "Animations";
+ Text[ japanese ] = "±ÆÒ°¼®Ý";
+ Text[ chinese_simplified ] = "¶¯»­";
+ Text[ chinese_traditional ] = "°Êµe";
+ Text[ arabic ] = "ÊÃËíÑÇÊ ÍÑßÉ";
+ Text[ greek ] = "ÅöÝ êéíÞóåùí";
+ Text[ korean ] = "¾Ö´Ï¸ÞÀ̼Ç";
+ Text[ turkish ] = "Canlandýrmalar";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_BULLETS
+{
+ // !!! zunaechst bitte nicht uebersetzen
+ Text = "Bullets";
+ Text[ENGLISH] = "Bullets";
+ Text[english_us] = "Bullets";
+ Text[ portuguese ] = "Marcas";
+ Text[ russian ] = "Ìàðêåðû";
+ Text[ dutch ] = "Opsommingstekens";
+ Text[ french ] = "Bullets";
+ Text[ spanish ] = "Viñetas";
+ Text[ italian ] = "Bullets";
+ Text[ danish ] = "Punkttegn";
+ Text[ swedish ] = "Bullets";
+ Text[ polish ] = "Znaki wypunktowania";
+ Text[ portuguese_brazilian ] = "Bullets";
+ Text[ japanese ] = "‰Óð‘‚«¼ÝÎÞÙ";
+ Text[ chinese_simplified ] = "¸÷ʽͼ±ê";
+
+/*
+ Text = "Bullets";
+ Text[ENGLISH] = "Bullets";
+ Text[english_us] = "Bullets";
+ Text[ portuguese ] = "Marcas";
+ Text[ russian ] = "Bullets";
+ Text[ dutch ] = "Opsommingstekens";
+ Text[ french ] = "Bullets";
+ Text[ spanish ] = "Viñetas";
+ Text[ italian ] = "Bullets";
+ Text[ danish ] = "Bullets";
+ Text[ swedish ] = "Bullets";
+ Text[ polish ] = "Bullets";
+ Text[ portuguese_brazilian ] = "Bullets";
+ Text[ japanese ] = "Bullets";
+ Text[ chinese_simplified ] = "¸÷ʽͼ±ê";
+*/
+ Text[ chinese_traditional ] = "¦U¦¡¹Ï¼Ð";
+ Text[ arabic ] = "ÚáÇãÇÊ ÊÚÏÇÏ";
+ Text[ greek ] = "Êïõêßäåò";
+ Text[ korean ] = "±Û¸Ó¸®Ç¥";
+ Text[ turkish ] = "Madde iþaretleri";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_CLIPARTS
+{
+ Text = "Clipart";
+ Text[ENGLISH] = "Clipart";
+ Text[english_us] = "Clipart";
+ Text[ portuguese ] = "Cliparts";
+ Text[ russian ] = "Êàðòèíêè Clipart";
+ Text[ dutch ] = "Clipart";
+ Text[ french ] = "Clipart";
+ Text[ spanish ] = "Clipart";
+ Text[ italian ] = "Clipart";
+ Text[ danish ] = "Clipart";
+ Text[ swedish ] = "Clipart";
+ Text[ polish ] = "Clipart";
+ Text[ portuguese_brazilian ] = "Clipart";
+ Text[ japanese ] = "¸Ø¯Ìß±°Ä";
+ Text[ chinese_simplified ] = "¼ôÌù»­";
+ Text[ chinese_traditional ] = "¬ü³N¹Ï¤ù";
+ Text[ arabic ] = "Clipart";
+ Text[ greek ] = "Clipart";
+ Text[ korean ] = "Ŭ¸³¾ÆÆ®";
+ Text[ turkish ] = "Clipart";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_FLAGS
+{
+ Text = "Flaggen";
+ Text[ENGLISH] = "Flags";
+ Text[english_us] = "Flags";
+ Text[ portuguese ] = "Bandeiras";
+ Text[ russian ] = "Ôëàãè";
+ Text[ dutch ] = "Vlaggen";
+ Text[ french ] = "Drapeaux";
+ Text[ spanish ] = "Banderas";
+ Text[ italian ] = "Bandiere";
+ Text[ danish ] = "Flag";
+ Text[ swedish ] = "Flaggor";
+ Text[ polish ] = "Flagi";
+ Text[ portuguese_brazilian ] = "Flags";
+ Text[ japanese ] = "Šø";
+ Text[ chinese_simplified ] = "¸÷ʽ¹úÆì";
+ Text[ chinese_traditional ] = "¦U¦¡°êºX";
+ Text[ arabic ] = "ÃÚáÇã";
+ Text[ greek ] = "Óçìáßåò";
+ Text[ korean ] = "Ç÷¡±×";
+ Text[ turkish ] = "Bayraklar";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_FLOWCHARTS
+{
+ Text = "Flußdiagramme";
+ Text[ENGLISH] = "Flowcharts";
+ Text[english_us] = "Flow charts";
+ Text[ portuguese ] = "Fluxogramas";
+ Text[ russian ] = "Áëîê-ñõåìà";
+ Text[ dutch ] = "Stroomdiagrammen";
+ Text[ french ] = "Diagrammes de flux";
+ Text[ spanish ] = "Diagramas de flujo";
+ Text[ italian ] = "Diagramma di flusso";
+ Text[ danish ] = "Rutediagrammer";
+ Text[ swedish ] = "Flödesdiagram";
+ Text[ polish ] = "Wykresy blokowy";
+ Text[ portuguese_brazilian ] = "Flowcharts";
+ Text[ japanese ] = "ÌÛ°Á¬°Ä";
+ Text[ chinese_simplified ] = "¸÷ʽͼ±í";
+ Text[ chinese_traditional ] = "¦U¦¡¹Ïªí";
+ Text[ arabic ] = "ÑÓæã ÈíÇäíÉ ÇäÓíÇÈíÉ";
+ Text[ greek ] = "ÄéáãñÜììáôá ñïÞò";
+ Text[ korean ] = "¼ø¼­µµ";
+ Text[ turkish ] = "Akýþ þemalarý";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_FORMS
+{
+ Text = "Formen";
+ Text[ENGLISH] = "Forms";
+ Text[english_us] = "Shapes";
+ Text[ portuguese ] = "Formas";
+ Text[ russian ] = "Ôèãóðû";
+ Text[ dutch ] = "Vormen";
+ Text[ french ] = "Formes";
+ Text[ spanish ] = "Formas";
+ Text[ italian ] = "Forme";
+ Text[ danish ] = "Former";
+ Text[ swedish ] = "Former";
+ Text[ polish ] = "Kszta³ty";
+ Text[ portuguese_brazilian ] = "Forms";
+ Text[ japanese ] = "¼ª²Ìß";
+ Text[ chinese_simplified ] = "¸÷ʽͼ°¸";
+ Text[ chinese_traditional ] = "¦U¦¡¹Ï®×";
+ Text[ arabic ] = "ÃÔßÇá";
+ Text[ greek ] = "Ó÷Þìáôá";
+ Text[ korean ] = "µµÇü";
+ Text[ turkish ] = "Þekiller";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_PHOTOS
+{
+ Text = "Fotos";
+ Text[ENGLISH] = "Photos";
+ Text[english_us] = "Pictures";
+ Text[ portuguese ] = "Fotografias";
+ Text[ russian ] = "Ôîòîãðàôèè";
+ Text[ dutch ] = "Foto's";
+ Text[ french ] = "Photos";
+ Text[ spanish ] = "Fotos";
+ Text[ italian ] = "Fotografie";
+ Text[ danish ] = "Fotografier";
+ Text[ swedish ] = "Foton";
+ Text[ polish ] = "Zdjêcia";
+ Text[ portuguese_brazilian ] = "Photos";
+ Text[ japanese ] = "ŽÊ^";
+ Text[ chinese_simplified ] = "²ÊÉ«ÕÕƬ";
+ Text[ chinese_traditional ] = "±m¦â·Ó¤ù";
+ Text[ arabic ] = "ÕæÑ";
+ Text[ greek ] = "Öùôïãñáößåò";
+ Text[ korean ] = "»çÁø";
+ Text[ turkish ] = "Fotoðraflar";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_BACKGROUNDS
+{
+ Text = "Hintergründe";
+ Text[ENGLISH] = "Backgrounds";
+ Text[english_us] = "Backgrounds";
+ Text[ portuguese ] = "Planos de fundo";
+ Text[ russian ] = "Ôîíû";
+ Text[ dutch ] = "Achtergronden";
+ Text[ french ] = "Arrière-plans";
+ Text[ spanish ] = "Fondos";
+ Text[ italian ] = "Sfondi";
+ Text[ danish ] = "Baggrunde";
+ Text[ swedish ] = "Bakgrunder";
+ Text[ polish ] = "T³a";
+ Text[ portuguese_brazilian ] = "Backgrounds";
+ Text[ japanese ] = "”wŒi";
+ Text[ chinese_simplified ] = "¸÷ʽ±³¾°";
+ Text[ chinese_traditional ] = "¦U¦¡­I´º";
+ Text[ arabic ] = "ÎáÝíÇÊ";
+ Text[ greek ] = "ÅðéëïãÝò öüíôïõ";
+ Text[ korean ] = "¹è°æ";
+ Text[ turkish ] = "Artalanlar";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_HOMEPAGE
+{
+ Text = "Homepage";
+ Text[ENGLISH] = "Homepage";
+ Text[english_us] = "Homepage";
+ Text[ portuguese ] = "Homepage";
+ Text[ russian ] = "Íà÷àëüíàÿ ñòðàíèöà";
+ Text[ dutch ] = "Homepage";
+ Text[ french ] = "Homepage";
+ Text[ spanish ] = "Página principal";
+ Text[ italian ] = "Homepage";
+ Text[ danish ] = "Hjemmeside";
+ Text[ swedish ] = "Hemsida";
+ Text[ polish ] = "Strona macierzysta";
+ Text[ portuguese_brazilian ] = "Homepage";
+ Text[ japanese ] = "ΰÑÍß°¼Þ";
+ Text[ chinese_simplified ] = "Ö÷Ò³";
+ Text[ chinese_traditional ] = "ºô¸ô¥D­¶";
+ Text[ arabic ] = "ãÝÇÊíÍ";
+ Text[ greek ] = "ÊåíôñéêÞ óåëßäá";
+ Text[ korean ] = "ȨÆäÀÌÁö";
+ Text[ turkish ] = "Web sayfasý";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_INTERACTION
+{
+ Text = "Interaktion";
+ Text[ENGLISH] = "Interaction";
+ Text[english_us] = "Interaction";
+ Text[ portuguese ] = "Interacção";
+ Text[ russian ] = "Èíòåðàêöèÿ";
+ Text[ dutch ] = "Interactie";
+ Text[ french ] = "Interaction";
+ Text[ spanish ] = "Interacción";
+ Text[ italian ] = "Interazione";
+ Text[ danish ] = "Interaktioner";
+ Text[ swedish ] = "Interaktion";
+ Text[ polish ] = "Interakcja";
+ Text[ portuguese_brazilian ] = "Interaction";
+ Text[ japanese ] = "²ÝÀ׸¼®Ý";
+ Text[ chinese_simplified ] = "½»»¥Ê½";
+ Text[ chinese_traditional ] = "¤¬°Ê¦¡";
+ Text[ arabic ] = "ÃÒÑÇÑ ÊÍßã";
+ Text[ greek ] = "Áëëçëåðßäñáóç";
+ Text[ korean ] = "»óÈ£ÀÛ¿ë";
+ Text[ turkish ] = "Etkileþim";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_MAPS
+{
+ Text = "Karten";
+ Text[ENGLISH] = "Maps";
+ Text[english_us] = "Maps";
+ Text[ portuguese ] = "Mapas";
+ Text[ russian ] = "Êàðòû";
+ Text[ dutch ] = "Kaarten";
+ Text[ french ] = "Cartes";
+ Text[ spanish ] = "Mapas";
+ Text[ italian ] = "Cartine";
+ Text[ danish ] = "Kort";
+ Text[ swedish ] = "Kartor";
+ Text[ polish ] = "Mapy";
+ Text[ portuguese_brazilian ] = "Maps";
+ Text[ japanese ] = "’n}";
+ Text[ chinese_simplified ] = "ÊÀ½çµØͼ";
+ Text[ chinese_traditional ] = "¥@¬É¦a¹Ï";
+ Text[ arabic ] = "ÎÑÇÆØ";
+ Text[ greek ] = "×Üñôåò";
+ Text[ korean ] = "Áöµµ";
+ Text[ turkish ] = "Haritalar";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_FURNITURE
+{
+ Text = "Möbel";
+ Text[ENGLISH] = "Furniture";
+ Text[english_us] = "Furniture";
+ Text[ portuguese ] = "Móveis";
+ Text[ russian ] = "Ìåáåëü";
+ Text[ dutch ] = "Meubels";
+ Text[ french ] = "Meubles";
+ Text[ spanish ] = "Muebles";
+ Text[ italian ] = "Mobili";
+ Text[ danish ] = "Møbler";
+ Text[ swedish ] = "Möbler";
+ Text[ polish ] = "Meble";
+ Text[ portuguese_brazilian ] = "Furniture";
+ Text[ japanese ] = "‰Æ‹ï";
+ Text[ chinese_simplified ] = "¼Ò¾ß¼òͼ";
+ Text[ chinese_traditional ] = "³Ã¨ã²¹Ï";
+ Text[ arabic ] = "ÃËÇË";
+ Text[ greek ] = "¸ðéðëá";
+ Text[ korean ] = "°¡±¸";
+ Text[ turkish ] = "Eþyalar";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_SURFACES
+{
+ Text = "Oberflächen";
+ Text[ENGLISH] = "Surfaces";
+ Text[english_us] = "Surfaces";
+ Text[ portuguese ] = "Texturas";
+ Text[ russian ] = "Ïîâåðõíîñòè";
+ Text[ dutch ] = "Oppervlakken";
+ Text[ french ] = "Textures";
+ Text[ spanish ] = "Superficies";
+ Text[ italian ] = "Superfici";
+ Text[ danish ] = "Overflader";
+ Text[ swedish ] = "Ytor";
+ Text[ polish ] = "Powierzchnie";
+ Text[ portuguese_brazilian ] = "Surfaces";
+ Text[ japanese ] = "•\\–Ê";
+ Text[ chinese_simplified ] = "²ÊɫƽÃæ";
+ Text[ chinese_traditional ] = "±m¦â¥­­±";
+ Text[ arabic ] = "ÃÓØÍ";
+ Text[ greek ] = "ÅðéöÜíåéåò";
+ Text[ korean ] = "Ç¥¸é";
+ Text[ turkish ] = "Yüzeyler";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_HTMLBUTTONS
+{
+ // !!! bitte nicht uebersetzen
+ Text = "private://gallery/hidden/HtmlExportButtons";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_POWERPOINT
+{
+ // !!! bitte nicht uebersetzen
+ Text = "private://gallery/hidden/imgppt";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_RULERS
+{
+ // !!! zunaechst bitte nicht uebersetzen
+ Text = "Rulers";
+ Text[ENGLISH] = "Rulers";
+ Text[english_us] = "Rulers";
+ Text[ portuguese ] = "Réguas";
+ Text[ russian ] = "Ëèíåéêè ðàçìåòêè";
+ Text[ dutch ] = "Linealen";
+ Text[ french ] = "Règles";
+ Text[ spanish ] = "Rulers";
+ Text[ italian ] = "Rulers";
+ Text[ danish ] = "Linealer";
+ Text[ swedish ] = "Linjaler";
+ Text[ polish ] = "Obramowania";
+ Text[ portuguese_brazilian ] = "Rulers";
+ Text[ japanese ] = "Ù°×°";
+ Text[ chinese_simplified ] = "²ÊÉ«ÏßÌõ";
+
+/*
+ Text = "Begrenzungen";
+ Text[ENGLISH] = "Rulers";
+ Text[english_us] = "Rulers";
+ Text[ portuguese ] = "Réguas";
+ Text[ russian ] = "Rulers";
+ Text[ dutch ] = "Begrenzingen";
+ Text[ french ] = "Règles";
+ Text[ spanish ] = "Límites";
+ Text[ italian ] = "Delimitazioni";
+ Text[ danish ] = "Rulers";
+ Text[ swedish ] = "Linjer";
+ Text[ polish ] = "Rulers";
+ Text[ portuguese_brazilian ] = "Rulers";
+ Text[ japanese ] = "Rulers";
+ Text[ chinese_simplified ] = "²ÊÉ«ÏßÌõ";
+*/
+ Text[ chinese_traditional ] = "±m¦â½u±ø";
+ Text[ arabic ] = "ãÓÇØÑ";
+ Text[ greek ] = "×Üñáêåò";
+ Text[ korean ] = "´«±ÝÀÚ";
+ Text[ turkish ] = "Çizgiler";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_SOUNDS
+{
+ // !!! zunaechst bitte nicht uebersetzen
+ Text = "Sounds";
+ Text[ENGLISH] = "Sounds";
+ Text[english_us] = "Sounds";
+ Text[ portuguese ] = "Sons";
+ Text[ russian ] = "Çâóêè";
+ Text[ dutch ] = "Geluiden";
+ Text[ french ] = "Sons";
+ Text[ spanish ] = "Sonidos";
+ Text[ italian ] = "Suoni";
+ Text[ danish ] = "Lyde";
+ Text[ swedish ] = "Ljud";
+ Text[ polish ] = "DŸwiêki";
+ Text[ portuguese_brazilian ] = "Sounds";
+ Text[ japanese ] = "»³ÝÄÞ";
+ Text[ chinese_simplified ] = "ÉùÒôͼ±ê";
+/*
+ Text = "Klänge";
+ Text[ENGLISH] = "Sounds";
+ Text[english_us] = "Sounds";
+ Text[ portuguese ] = "Sons";
+ Text[ russian ] = "Sounds";
+ Text[ dutch ] = "Geluiden";
+ Text[ french ] = "Sons";
+ Text[ spanish ] = "Sonidos";
+ Text[ italian ] = "Suoni";
+ Text[ danish ] = "Sounds";
+ Text[ swedish ] = "Ljud";
+ Text[ polish ] = "DŸwiêki";
+ Text[ portuguese_brazilian ] = "Sounds";
+ Text[ japanese ] = "Sounds";
+ Text[ chinese_simplified ] = "ÉùÒôͼ±ê";
+*/
+ Text[ chinese_traditional ] = "Án­µ¹Ï¥Ü";
+ Text[ arabic ] = "ÃÕæÇÊ";
+ Text[ greek ] = "¹÷ïò";
+ Text[ korean ] = "»ç¿îµå";
+ Text[ turkish ] = "Sesler";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_SYMBOLS
+{
+ Text = "Symbole";
+ Text[ENGLISH] = "Symbols";
+ Text[english_us] = "Symbols";
+ Text[ portuguese ] = "Símbolos";
+ Text[ russian ] = "Ñèìâîëû";
+ Text[ dutch ] = "Symbolen";
+ Text[ french ] = "Symboles";
+ Text[ spanish ] = "Iconos";
+ Text[ italian ] = "Simboli";
+ Text[ danish ] = "Symboler";
+ Text[ swedish ] = "Symboler";
+ Text[ polish ] = "Symbole";
+ Text[ portuguese_brazilian ] = "Symbols";
+ Text[ japanese ] = "¼ÝÎÞÙ";
+ Text[ chinese_simplified ] = "¸÷ʽͼ±ê";
+ Text[ chinese_traditional ] = "¦U¦¡¹Ï¥Ü";
+ Text[ arabic ] = "ÑãæÒ";
+ Text[ greek ] = "Óýìâïëá";
+ Text[ korean ] = "±âÈ£";
+ Text[ turkish ] = "Simgeler";
+ Text[ language_user1 ] = " ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_MYTHEME
+{
+ Text = "Eigenes Thema";
+ Text[ENGLISH] = "My theme";
+ Text[english_us] = "My Theme";
+ Text[ portuguese ] = "Temas próprios";
+ Text[ russian ] = "Ìîÿ òåìà";
+ Text[ greek ] = "Ðñïóùðéêü èÝìá";
+ Text[ dutch ] = "Eigen onderwerp";
+ Text[ french ] = "Mon thème";
+ Text[ spanish ] = "Mis temas";
+ Text[ italian ] = "Argomento proprio";
+ Text[ danish ] = "Eget emne";
+ Text[ swedish ] = "Eget tema";
+ Text[ polish ] = "Wlasny temat";
+ Text[ portuguese_brazilian ] = "My theme";
+ Text[ japanese ] = "“ÆŽ©‚ÌðÏ";
+ Text[ korean ] = "My theme";
+ Text[ chinese_simplified ] = "¸öÈËÖ÷Ìâ";
+ Text[ chinese_traditional ] = "¦Û­q¥DÃD";
+ Text[ turkish ] = "Kullanýcý konusu";
+ Text[ arabic ] = "ãæÖæÚ ÎÇÕ";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_DUMMY2
+{
+ // !!! bitte nicht uebersetzen
+ Text = "Dummy 2";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_DUMMY3
+{
+ // !!! bitte nicht uebersetzen
+ Text = "Dummy 3";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_DUMMY4
+{
+ // !!! bitte nicht uebersetzen
+ Text = "Dummy 4";
+};
+
+// -----------------------------------------------------------------------------
+
+String RID_GALLERYSTR_THEME_DUMMY5
+{
+ // !!! bitte nicht uebersetzen
+ Text = "Dummy 5";
+};
diff --git a/svx/source/gallery2/makefile.mk b/svx/source/gallery2/makefile.mk
new file mode 100644
index 0000000000..7a868bc977
--- /dev/null
+++ b/svx/source/gallery2/makefile.mk
@@ -0,0 +1,102 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning 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=gal
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+
+SRCFILES = \
+ gallery.src \
+ galtheme.src
+
+SLOFILES = \
+ $(SLO)$/galexpl.obj \
+ $(SLO)$/galdlg.obj \
+ $(SLO)$/gallery1.obj \
+ $(SLO)$/galtheme.obj \
+ $(SLO)$/galmisc.obj \
+ $(SLO)$/galobj.obj \
+ $(SLO)$/codec.obj \
+ $(SLO)$/galbrws.obj \
+ $(SLO)$/galbrws1.obj \
+ $(SLO)$/galbrws2.obj
+
+EXCEPTIONSFILES = \
+ $(SLO)$/galdlg.obj \
+ $(SLO)$/gallery1.obj \
+ $(SLO)$/galtheme.obj \
+ $(SLO)$/galmisc.obj \
+ $(SLO)$/galbrws1.obj
+
+RESLIB1NAME = $(TARGET)
+RESLIB1SRSFILES = $(SRS)$/$(TARGET).srs
+
+# --- Targets --------------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
new file mode 100644
index 0000000000..05a2680af1
--- /dev/null
+++ b/svx/source/inc/filtnav.hxx
@@ -0,0 +1,362 @@
+/*************************************************************************
+ *
+ * $RCSfile: filtnav.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FILTNAV_HXX
+#define _SVX_FILTNAV_HXX
+
+#ifndef _COM_SUN_STAR_AWT_XTEXTCOMPONENT_HPP_
+#include <com/sun/star/awt/XTextComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
+#include <com/sun/star/form/XForm.hpp>
+#endif
+
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+
+#ifndef _SFXBRDCST_HXX //autogen
+#include <svtools/brdcst.hxx>
+#endif
+
+#ifndef _SV_WINDOW_HXX //autogen
+#include <vcl/window.hxx>
+#endif
+
+#ifndef _SFX_CHILDWIN_HXX //autogen
+#include <sfx2/childwin.hxx>
+#endif
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+#ifndef _SFX_BINDINGS_HXX //autogen
+#include <sfx2/bindings.hxx>
+#endif
+
+#ifndef _SFXDOCKWIN_HXX //autogen
+#include <sfx2/dockwin.hxx>
+#endif
+
+#ifndef _DTRANS_HXX
+#include <so3/dtrans.hxx>
+#endif
+
+#ifndef _SFXCTRLITEM_HXX //autogen
+#include <sfx2/ctrlitem.hxx>
+#endif
+
+#ifndef _SV_IMAGE_HXX
+#include <vcl/image.hxx>
+#endif
+
+#ifndef _SVTREEBOX_HXX //autogen
+#include <svtools/svtreebx.hxx>
+#endif
+
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+
+#ifndef _SV_DOCKWIN_HXX //autogen
+#include <vcl/dockwin.hxx>
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include <fmtools.hxx>
+#endif // _SVX_FMTOOLS_HXX
+
+class FmFormShell;
+class FmFilterItem;
+class FmFilterItems;
+class FmParentData;
+class FmFilterAdapter;
+
+//========================================================================
+// data structure for the filter model
+//========================================================================
+class FmFilterData
+{
+ FmParentData* m_pParent;
+ ::rtl::OUString m_aText;
+
+public:
+ TYPEINFO();
+ FmFilterData(FmParentData* pParent = NULL, const ::rtl::OUString& rText = ::rtl::OUString())
+ :m_pParent(pParent), m_aText(rText){}
+ virtual ~FmFilterData(){}
+
+ void SetText( const ::rtl::OUString& rText ){ m_aText = rText; }
+ ::rtl::OUString GetText() const { return m_aText; }
+ FmParentData* GetParent() const {return m_pParent;}
+ virtual Image GetImage() const;
+};
+
+//========================================================================
+class FmParentData : public FmFilterData
+{
+protected:
+ vector<FmFilterData*> m_aChilds;
+
+public:
+ TYPEINFO();
+ FmParentData(FmParentData* pParent, const ::rtl::OUString& rText):FmFilterData(pParent, rText){}
+ virtual ~FmParentData();
+
+ vector<FmFilterData*>& GetChilds() {return m_aChilds;}
+};
+
+//========================================================================
+// Item representing the forms and subforms
+class FmFormItem : public FmParentData
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > m_xController;
+ sal_Int32 m_nCurrent;
+
+public:
+ TYPEINFO();
+ FmFormItem():FmParentData(NULL, ::rtl::OUString()){}
+ FmFormItem(FmParentData* _pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & _xController,
+ const ::rtl::OUString& _rText):FmParentData(_pParent, _rText)
+ ,m_xController(_xController)
+ ,m_nCurrent(0){}
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & GetController(){return m_xController;}
+ void SetCurrentPosition(sal_Int32 nCurrent){m_nCurrent = nCurrent;}
+ sal_Int32 GetCurrentPosition() const {return m_nCurrent;}
+ virtual Image GetImage() const;
+};
+
+//========================================================================
+class FmFilterItems : public FmParentData
+{
+public:
+ TYPEINFO();
+ FmFilterItems():FmParentData(NULL, ::rtl::OUString()){}
+ FmFilterItems(FmFormItem* pParent, const ::rtl::OUString& rText ):FmParentData(pParent, rText){}
+
+ FmFilterItem* Find(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > & xText) const;
+ virtual Image GetImage() const;
+};
+
+//========================================================================
+class FmFilterItem : public FmFilterData
+{
+ ::rtl::OUString m_aFieldName;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > m_xText;
+
+public:
+ TYPEINFO();
+ FmFilterItem(FmFilterItems* pParent,
+ const ::rtl::OUString& aFieldName,
+ const ::rtl::OUString& aCondition,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > & xText);
+
+ const ::rtl::OUString& GetFieldName() const {return m_aFieldName;}
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > & GetTextComponent() const {return m_xText;}
+
+ virtual Image GetImage() const;
+};
+
+//========================================================================
+class FmFilterModel : public FmParentData
+ ,public SfxBroadcaster
+{
+ friend class FmFilterAdapter;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xControllers;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > m_xController;
+ FmFilterAdapter* m_pAdapter;
+ FmFilterItems* m_pCurrentItems;
+
+public:
+ TYPEINFO();
+ FmFilterModel();
+ virtual ~FmFilterModel();
+
+ void Update(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & xCurrent);
+ void Clear();
+ sal_Bool ValidateText(FmFilterItem* pItem, UniString& rText, UniString& rErrorMsg) const;
+ void Append(FmFilterItems* pItems, FmFilterItem* pFilterItem);
+ void SetText(FmFilterItem* pItem, const ::rtl::OUString& rText);
+
+ FmFormItem* GetCurrentForm() const {return m_pCurrentItems ? (FmFormItem*)m_pCurrentItems->GetParent() : NULL;}
+ FmFilterItems* GetCurrentItems() const {return m_pCurrentItems;}
+ void SetCurrentItems(FmFilterItems* pCurrent);
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & GetControllers() const {return m_xControllers;}
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & GetCurrentController() const {return m_xController;}
+ void SetCurrentController(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & xController);
+
+ void Remove(FmFilterData* pFilterItem);
+ void AppendFilterItems(FmFormItem* pItem);
+ void CheckIntegrity(FmParentData* pItem);
+
+protected:
+ void Insert(const vector<FmFilterData*>::iterator& rPos, FmFilterData* pFilterItem);
+ void Remove(const vector<FmFilterData*>::iterator& rPos, FmFilterData* pFilterItem);
+ FmFormItem* Find(const ::std::vector<FmFilterData*>& rItems, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & xController) const;
+ FmFormItem* Find(const ::std::vector<FmFilterData*>& rItems, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm) const;
+ void Update(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers, FmParentData* pParent);
+};
+
+//========================================================================
+class FmFilterNavigator : public SvTreeListBox, public SfxListener
+{
+ enum DROP_ACTION{ DA_SCROLLUP, DA_SCROLLDOWN, DA_EXPANDNODE };
+
+ FmFilterModel* m_pModel;
+ Timer m_aSelectTimer;
+
+ AutoTimer m_aDropActionTimer;
+ unsigned short m_aTimerCounter;
+ Point m_aTimerTriggered; // die Position, an der der DropTimer angeschaltet wurde
+ DROP_ACTION m_aDropActionType;
+
+public:
+ FmFilterNavigator( Window* pParent );
+ virtual ~FmFilterNavigator();
+
+ void Update(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > & xCurrent);
+ FmFilterModel* const GetFilterModel() const {return m_pModel;}
+
+protected:
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void Command( const CommandEvent& rEvt );
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ virtual void InitEntry(SvLBoxEntry* pEntry, const XubString& rStr, const Image& rImg1, const Image& rImg2);
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSelection );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+ virtual sal_Bool QueryDrop( DropEvent& rDEvt );
+ virtual sal_Bool Drop( const DropEvent& rDEvt );
+
+ void DeleteSelection();
+ void Clear();
+ SvLBoxEntry* FindEntry(FmFilterData* pItem);
+ void Insert(FmFilterData* pItem, sal_Int32 nPos);
+ void Remove(FmFilterData* pItem);
+
+ DECL_LINK(OnRemove, SvLBoxEntry*);
+ DECL_LINK(OnEdited, SvLBoxEntry*);
+ DECL_LINK(OnSelect, void*);
+ DECL_LINK(OnDropActionTimer, void*);
+};
+
+//========================================================================
+class FmFilterNavigatorWin : public SfxDockingWindow, public SfxControllerItem
+{
+private:
+ FmFilterNavigator* m_pNavigator;
+
+protected:
+ virtual void Resize();
+ virtual sal_Bool Close();
+ virtual Size CalcDockingSize( SfxChildAlignment );
+ virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment );
+
+public:
+ FmFilterNavigatorWin( SfxBindings *pBindings, SfxChildWindow *pMgr,
+ Window* pParent );
+ virtual ~FmFilterNavigatorWin();
+
+ void Update( FmFormShell* pFormShell );
+ void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
+ void FillInfo( SfxChildWinInfo& rInfo ) const;
+};
+
+//========================================================================
+class FmFilterNavigatorWinMgr : public SfxChildWindow
+{
+public:
+ FmFilterNavigatorWinMgr( Window *pParent, sal_uInt16 nId, SfxBindings *pBindings,
+ SfxChildWinInfo *pInfo );
+ SFX_DECL_CHILDWINDOW( FmFilterNavigatorWinMgr );
+};
+
+//========================================================================
+class FmFormItem;
+class FmFilterItem;
+class SvxFmFilterExch : public SvDataObject
+{
+ SvDataTypeList m_aDataTypeList;
+ vector<FmFilterItem*> m_aDraggedEntries;
+ FmFormItem* m_pFormItem; // ensure that we drop on the same form
+
+public:
+ SvxFmFilterExch(FmFormItem* pFormItem, const vector<FmFilterItem*>& lstWhich );
+
+ virtual const SvDataTypeList& GetTypeList() const { return m_aDataTypeList; }
+ virtual sal_Bool GetData( SvData* );
+
+ const vector<FmFilterItem*>& GetDraggedEntries() const { return m_aDraggedEntries; }
+ FmFormItem* GetFormItem() const {return m_pFormItem;}
+};
+
+SV_DECL_IMPL_REF( SvxFmFilterExch );
+
+#endif // _SVX_FILTNAV_HXX
+
diff --git a/svx/source/inc/fmcontr.hxx b/svx/source/inc/fmcontr.hxx
new file mode 100644
index 0000000000..f792b5410f
--- /dev/null
+++ b/svx/source/inc/fmcontr.hxx
@@ -0,0 +1,310 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmcontr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMCONTR_HXX
+#define _SVX_FMCONTR_HXX
+
+#include <unotools/stl_types.hxx>
+
+#ifndef _COM_SUN_STAR_FORM_XFORMCOMPONENT_HPP_
+#include <com/sun/star/form/XFormComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XEVENTATTACHERMANAGER_HPP_
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_SCRIPTEVENT_HPP_
+#include <com/sun/star/script/ScriptEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_SCRIPTEVENTDESCRIPTOR_HPP_
+#include <com/sun/star/script/ScriptEventDescriptor.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_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_LANG_XEVENTLISTENER_HPP_
+#include <com/sun/star/lang/XEventListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_EVENTOBJECT_HPP_
+#include <com/sun/star/lang/EventObject.hpp>
+#endif
+
+typedef ::std::hash_multimap< ::rtl::OUString, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > , ::utl::UStringHash, ::utl::UStringEqual> OInterfaceMap;
+
+DECLARE_STL_VECTOR(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > ,InterfaceArray);
+
+class ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream > ;
+class ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream > ;
+
+//==================================================================
+// FmForms
+// Implementiert den UNO-::com::sun::star::sdbcx::Container fuer Formulare
+// enthaelt alle zugeordneten ::com::sun::star::form::Forms
+// dieses ::com::sun::star::sdbcx::Container kann selbst den Context fuer Formulare darstellen
+// oder außen einen Context uebergeben bekommen
+//==================================================================
+class FmXInterfaceContainer : public ::com::sun::star::container::XNameContainer,
+ public ::com::sun::star::container::XIndexContainer,
+ public ::com::sun::star::container::XContainer,
+ public ::com::sun::star::container::XEnumerationAccess,
+ public ::com::sun::star::script::XEventAttacherManager,
+ public ::com::sun::star::beans::XPropertyChangeListener
+{
+protected:
+ OInterfaceMap m_aMap;
+ OInterfaceArray m_aItems;
+ ::usr::OInterfaceContainerHelper
+ m_aContainerListeners;
+
+ InterfaceReflection* m_pElementReflection;
+ ::VOS::IMutex& m_rMutex;
+ ::com::sun::star::uno::Uik m_aElementUik;
+
+
+ // EventManager
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager > m_xEventAttacher;
+
+public:
+ FmXInterfaceContainer(::VOS::IMutex& _rMutex, InterfaceReflection* pElementReflection, const ::com::sun::star::uno::Uik& rUik );
+
+public:
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut );
+
+
+// ::com::sun::star::io::XPersistObject
+ void write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream > & OutStream);
+ void read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream > & InStream);
+
+// ::com::sun::star::lang::XEventListener
+ virtual void disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::beans::XPropertyChangeListener
+ virtual void propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt);
+
+// ::com::sun::star::container::XElementAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > getElementType(void) const throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool hasElements(void) const throw( ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::container::XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::container::XNameAccess
+ virtual ::com::sun::star::uno::Any getByName(const ::rtl::OUString& Name) const throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > getElementNames(void) const throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool hasByName(const ::rtl::OUString& Name) const throw( ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::container::XNameReplace
+ virtual void replaceByName(const ::rtl::OUString& Name, const ::com::sun::star::uno::Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::container::XNameContainer
+ virtual void insertByName(const ::rtl::OUString& Name, const ::com::sun::star::uno::Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual void removeByName(const ::rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::container::XIndexAccess
+ virtual sal_Int32 getCount(void) const throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any getByIndex(sal_Int32 ::com::sun::star::sdbcx::Index) const throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::container::XIndexReplace
+ virtual void replaceByIndex(sal_Int32 ::com::sun::star::sdbcx::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 );
+
+// ::com::sun::star::container::XIndexContainer
+ virtual void insertByIndex(sal_Int32 ::com::sun::star::sdbcx::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 );
+ virtual void removeByIndex(sal_Int32 ::com::sun::star::sdbcx::Index) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::container::XContainer
+ virtual void addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener > & l) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void removeContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener > & l) throw( ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::script::XEventAttacherManager
+ virtual void registerScriptEvent(sal_Int32 nIndex, const ::com::sun::star::script::ScriptEventDescriptor& ::com::sun::star::script::ScriptEvent);
+ virtual void registerScriptEvents(sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor >& ScriptEvents);
+ virtual void revokeScriptEvent(sal_Int32 nIndex, const ::rtl::OUString& ListenerType, const ::rtl::OUString& EventMethod, const ::rtl::OUString& rRemoveListenerParam);
+ virtual void revokeScriptEvents(sal_Int32 nIndex);
+ virtual void insertEntry(sal_Int32 nIndex);
+ virtual void removeEntry(sal_Int32 nIndex);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor > getScriptEvents(sal_Int32 nIndex);
+ virtual void attach(sal_Int32 nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Object, const ::com::sun::star::uno::Any& Helper);
+ virtual void detach(sal_Int32 nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xObject);
+ virtual void addScriptListener(const ::com::sun::star::uno::Reference< ::com::sun::star::script::XScriptListener > & aListener);
+ virtual void removeScriptListener(const ::com::sun::star::uno::Reference< ::com::sun::star::script::XScriptListener > & aListener);
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > getStaticIdlClass();
+
+protected:
+ // helper
+ virtual void disposing();
+ virtual void insert(sal_Int32 ::com::sun::star::sdbcx::Index, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & _Object, sal_Bool bEvents = sal_True)
+ throw( ::com::sun::star::lang::IllegalArgumentException );
+ virtual void removeElementsNoEvents(sal_Int32 nIndex);
+
+ // called after the object is inserted, but before the "real listeners" are notified
+ virtual void implInserted(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & _rxObject) { }
+ // called after the object is removed, but before the "real listeners" are notified
+ virtual void implRemoved(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & _rxObject) { }
+
+ void writeEvents(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream > & OutStream);
+ void readEvents(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream > & InStream, sal_Int32 nCount);
+};
+
+//==================================================================
+// FmForms
+// Implementiert den UNO-::com::sun::star::sdbcx::Container fuer Formulare
+// enthaelt alle zugeordneten ::com::sun::star::form::Forms
+// dieses ::com::sun::star::sdbcx::Container kann selbst den Context fuer Formulare darstellen
+// oder außen einen Context uebergeben bekommen
+//==================================================================
+class FmXForms : public ::usr::OComponentHelper,
+ public FmXInterfaceContainer,
+ public ::com::sun::star::container::XChild
+
+{
+ friend Reflection* ::getCppuType((const FmXForms*)0);
+ ::osl::Mutex m_aMutex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent; // Parent
+
+public:
+ FmXForms();
+ virtual ~FmXForms();
+
+public:
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut )
+
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// { return OComponentHelper::queryInterface( aUik, rOut ); }
+
+ virtual sal_Bool queryAggregation(::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut);
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void);
+
+// automatisch auskommentiert - [getImplementation] - Wird von OWeakObject nicht weiter unterstützt!
+// virtual void* getImplementation(Reflection * pRef);
+
+ virtual void acquire() { OComponentHelper::acquire(); }
+ virtual void release() { OComponentHelper::release(); }
+
+// OComponentHelper
+ virtual void disposing();
+
+// ::com::sun::star::container::XChild
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getParent(void) const throw( ::com::sun::star::uno::RuntimeException );
+ virtual void setParent(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Parent) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException );
+};
+
+//==================================================================
+// FmForm
+// Implementiert den UNO-::com::sun::star::sdbcx::Container fuer FormularControls
+//==================================================================
+class FmXFormComponents : public ::usr::OComponentHelper,
+ public FmXInterfaceContainer,
+ public ::com::sun::star::form::XFormComponent
+{
+protected:
+ ::osl::Mutex m_aMutex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent; // Parent
+
+public:
+ FmXFormComponents();
+ virtual ~FmXFormComponents();
+
+ SMART_UNO_DECLARATION(FmXFormComponents, OComponentHelper);
+
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut )
+
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// { return OComponentHelper::queryInterface( aUik, rOut ); }
+
+ virtual sal_Bool queryAggregation(::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut);
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void);
+
+
+// OComponentHelper
+ virtual void disposing();
+
+// ::com::sun::star::form::XFormComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getParent(void) const throw( ::com::sun::star::uno::RuntimeException );
+ virtual void setParent(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Parent) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > getStaticIdlClass();
+};
+
+
+#endif // _SVX_FMCONTR_HXX
+
diff --git a/svx/source/inc/fmctrler.hxx b/svx/source/inc/fmctrler.hxx
new file mode 100644
index 0000000000..3d0be76150
--- /dev/null
+++ b/svx/source/inc/fmctrler.hxx
@@ -0,0 +1,592 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmctrler.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMCTRLER_HXX
+#define _SVX_FMCTRLER_HXX
+
+#ifndef _UTL_STLTYPES_HXX_
+#include <unotools/stl_types.hxx>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XSQLERRORBROADCASTER_HPP_
+#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XSQLERRORLISTENER_HPP_
+#include <com/sun/star/sdb/XSQLErrorListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSERFACTORY_HPP_
+#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XROWSETAPPROVEBROADCASTER_HPP_
+#include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XROWSETAPPROVELISTENER_HPP_
+#include <com/sun/star/sdb/XRowSetApproveListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XROWSETLISTENER_HPP_
+#include <com/sun/star/sdbc/XRowSetListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XRESETLISTENER_HPP_
+#include <com/sun/star/form/XResetListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_
+#include <com/sun/star/container/XIndexContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_CONTAINEREVENT_HPP_
+#include <com/sun/star/container/ContainerEvent.hpp>
+#endif
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
+#include <com/sun/star/container/XContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
+#include <com/sun/star/container/XChild.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
+#include <com/sun/star/container/XContainerListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XFOCUSLISTENER_HPP_
+#include <com/sun/star/awt/XFocusListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FOCUSEVENT_HPP_
+#include <com/sun/star/awt/FocusEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XCONFIRMDELETEBROADCASTER_HPP_
+#include <com/sun/star/form/XConfirmDeleteBroadcaster.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_DATABASEPARAMETEREVENT_HPP_
+#include <com/sun/star/form/DatabaseParameterEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_DATABASEDELETEEVENT_HPP_
+#include <com/sun/star/form/DatabaseDeleteEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XDATABASEPARAMETERLISTENER_HPP_
+#include <com/sun/star/form/XDatabaseParameterListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XLOADLISTENER_HPP_
+#include <com/sun/star/form/XLoadListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XCONFIRMDELETELISTENER_HPP_
+#include <com/sun/star/form/XConfirmDeleteListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_ERROREVENT_HPP_
+#include <com/sun/star/form/ErrorEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XDATABASEPARAMETERBROADCASTER_HPP_
+#include <com/sun/star/form/XDatabaseParameterBroadcaster.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLER_HPP_
+#include <com/sun/star/form/XFormController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLERLISTENER_HPP_
+#include <com/sun/star/form/XFormControllerListener.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_XDISPATCHPROVIDERINTERCEPTION_HPP_
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_DISPATCHDESCRIPTOR_HPP_
+#include <com/sun/star/frame/DispatchDescriptor.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 _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.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_XPROPERTYSETINFO_HPP_
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XEVENTATTACHERMANAGER_HPP_
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XTEXTLISTENER_HPP_
+#include <com/sun/star/awt/XTextListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XITEMLISTENER_HPP_
+#include <com/sun/star/awt/XItemListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XTEXTCOMPONENT_HPP_
+#include <com/sun/star/awt/XTextComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XTABCONTROLLERMODEL_HPP_
+#include <com/sun/star/awt/XTabControllerModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROLMODEL_HPP_
+#include <com/sun/star/awt/XControlModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROLCONTAINER_HPP_
+#include <com/sun/star/awt/XControlContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XTABCONTROLLER_HPP_
+#include <com/sun/star/awt/XTabController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROL_HPP_
+#include <com/sun/star/awt/XControl.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#endif
+
+#ifndef _SV_TIMER_HXX //autogen
+#include <vcl/timer.hxx>
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+#ifndef _CPPUHELPER_PROPSHLP_HXX
+#include <cppuhelper/propshlp.hxx>
+#endif
+#ifndef _FM_IMPLEMENTATION_IDS_HXX_
+#include <fmimplids.hxx>
+#endif
+#ifndef _UNOTOOLS_PROPERTY_ARRAY_HELPER_HXX_
+#include <unotools/proparrhlp.hxx>
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+struct FmXTextComponentLess : public binary_function< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent> , sal_Bool>
+{
+ sal_Bool operator() (const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >& x, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >& y) const
+ {
+ return reinterpret_cast<sal_Int64>(x.get()) < reinterpret_cast<sal_Int64>(y.get());
+ }
+};
+
+typedef map< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >, FmXTextComponentLess> FmFilterControls;
+typedef map< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >, ::rtl::OUString, FmXTextComponentLess> FmFilterRow;
+typedef vector< FmFilterRow > FmFilterRows;
+typedef vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > > FmFormControllers;
+
+struct FmFieldInfo;
+class FmXFormController;
+class FmFormView;
+class Window;
+
+//==================================================================
+// FmXFormController
+//==================================================================
+class FmXFormController :public ::cppu::OComponentHelper
+ ,public ::cppu::OPropertySetHelper
+ ,public ::com::sun::star::form::XFormController
+ ,public ::com::sun::star::container::XChild
+ ,public ::com::sun::star::container::XIndexAccess // zugriff auf child contoller
+ ,public ::com::sun::star::container::XEnumerationAccess
+ ,public ::com::sun::star::awt::XFocusListener
+ ,public ::com::sun::star::form::XLoadListener
+ ,public ::com::sun::star::beans::XPropertyChangeListener
+ ,public ::com::sun::star::awt::XTextListener
+ ,public ::com::sun::star::awt::XItemListener
+ ,public ::com::sun::star::container::XContainerListener
+ ,public ::com::sun::star::util::XModifyListener
+ ,public ::com::sun::star::util::XModifyBroadcaster
+ ,public ::com::sun::star::util::XModeSelector
+ ,public ::com::sun::star::form::XConfirmDeleteListener
+ ,public ::com::sun::star::form::XConfirmDeleteBroadcaster
+ ,public ::com::sun::star::sdb::XSQLErrorListener
+ ,public ::com::sun::star::sdb::XSQLErrorBroadcaster
+ ,public ::com::sun::star::sdbc::XRowSetListener
+ ,public ::com::sun::star::sdb::XRowSetApproveListener
+ ,public ::com::sun::star::sdb::XRowSetApproveBroadcaster
+ ,public ::com::sun::star::form::XDatabaseParameterListener
+ ,public ::com::sun::star::form::XDatabaseParameterBroadcaster
+ ,public ::com::sun::star::lang::XServiceInfo
+ ,public ::com::sun::star::form::XResetListener
+ ,public ::com::sun::star::lang::XUnoTunnel
+ ,public FmDispatchInterceptor
+ ,public ::utl::OAggregationArrayUsageHelper< FmXFormController>
+{
+ friend class FmXPageViewWinRec;
+
+ // friend Reflection* FmXFormController_getReflection();
+
+ ::osl::Mutex m_aMutex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation> m_xAggregate;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController> m_xTabController, m_xNavigationController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> m_xActiveControl, m_xCurrentControl;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> m_xModelAsIndex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager> m_xModelAsManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xParent;
+ // Composer used for checking filter conditions
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer> m_xComposer;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > m_aControls;
+ ::cppu::OInterfaceContainerHelper
+ m_aActivateListeners,
+ m_aModifyListeners,
+ m_aErrorListeners,
+ m_aDeleteListeners,
+ m_aRowSetApproveListeners,
+ m_aParameterListeners;
+
+ FmFormControllers m_aChilds;
+ FmFilterControls m_aFilterControls;
+ FmFilterRows m_aFilters;
+ ::form::OImplementationIdsRef m_aHoldImplIdHelper;
+
+ Timer m_aInsertTimer;
+
+ FmFormView* m_pView;
+ Window* m_pWindow;
+
+ ::rtl::OUString m_aMode;
+
+ sal_uInt32 m_nLoadEvent;
+ sal_uInt32 m_nUpdateDispatcherEvent;
+ sal_uInt32 m_nToggleEvent;
+
+ sal_Int32 m_nCurrentFilterPosition; // current level for filtering (or-criteria)
+ ::rtl::OUString m_sDispatchPrefix;
+
+ sal_Bool m_bCurrentRecordModified : 1;
+ sal_Bool m_bCurrentRecordNew : 1;
+ sal_Bool m_bLocked : 1;
+ sal_Bool m_bDBConnection : 1; // Focuslistener nur fuer Datenbankformulare
+ sal_Bool m_bCycle : 1;
+ sal_Bool m_bCanInsert : 1;
+ sal_Bool m_bCanUpdate : 1;
+ sal_Bool m_bCommitLock : 1; // lock the committing of controls see focusGained
+ sal_Bool m_bModified : 1; // ist der Inhalt eines Controls modifiziert ?
+ sal_Bool m_bControlsSorted : 1;
+ sal_Bool m_bFiltering : 1;
+ sal_Bool m_bAttachEvents : 1;
+ sal_Bool m_bDetachEvents : 1;
+
+ // as we want to intercept dispatches of _all_ controls we're responsible for, and an object implementing
+ // the ::com::sun::star::frame::XDispatchProviderInterceptor interface can intercept only _one_ objects dispatches, we need a helper class
+ DECLARE_STL_VECTOR(FmXDispatchInterceptorImpl*, Interceptors);
+ Interceptors m_aControlDispatchInterceptors;
+
+public:
+ FmXFormController(FmFormView* _pView = NULL, Window* _pWindow = NULL, const UniString& _sDispatchPrefix = UniString());
+ ~FmXFormController();
+
+ // UNO Anbindung
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException )
+ { return OComponentHelper::queryInterface( type ); }
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() { OComponentHelper::acquire(); }
+ virtual void SAL_CALL release() { OComponentHelper::release(); }
+
+// XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException)
+ {
+ return ::form::OImplementationIds::getImplementationId(getTypes());
+ }
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+
+// XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
+
+
+// ::com::sun::star::container::XChild
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL getParent(void) throw( ::com::sun::star::uno::RuntimeException ) {return m_xParent;}
+ virtual void SAL_CALL setParent(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Parent) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException )
+ {m_xParent = Parent;}
+
+// ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
+
+// OComponentHelper
+ virtual void SAL_CALL disposing();
+
+// OPropertySetHelper
+ virtual sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue,
+ sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
+ throw( ::com::sun::star::lang::IllegalArgumentException );
+
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue );
+ virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo();
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
+
+// XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasElements(void) 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(void) throw( ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::container::XContainerListener
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent);
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent);
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent);
+
+// 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 );
+
+// 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(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedModes(void) 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::XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) 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 );
+
+// 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);
+
+// XFocusListener
+ virtual void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& e);
+ virtual void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& e);
+
+// ::com::sun::star::beans::XPropertyChangeListener -> aenderung der stati
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt);
+
+// XTextListener -> modify setzen
+ virtual void SAL_CALL textChanged(const ::com::sun::star::awt::TextEvent& rEvent);
+
+// XItemListener -> modify setzen
+ virtual void SAL_CALL itemStateChanged(const ::com::sun::star::awt::ItemEvent& rEvent);
+
+// XModifyListener -> modify setzen
+ virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& rEvent);
+
+// XFormController
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> SAL_CALL getCurrentControl(void) {return m_xCurrentControl;}
+ virtual void SAL_CALL addActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>& l);
+ virtual void SAL_CALL removeActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>& l);
+
+// XTabController
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > SAL_CALL getControls(void);
+
+ virtual void SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel>& Model);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel> SAL_CALL getModel();
+
+ virtual void SAL_CALL setContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer>& Container);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> SAL_CALL getContainer();
+
+ virtual void SAL_CALL autoTabOrder();
+ virtual void SAL_CALL activateTabOrder();
+
+ virtual void SAL_CALL activateFirst();
+ virtual void SAL_CALL activateLast();
+
+// 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 );
+
+// XRowSetApproveListener
+ virtual sal_Bool SAL_CALL approveCursorMove(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL approveRowChange(const ::com::sun::star::sdb::RowChangeEvent& event) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL approveRowSetChange(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
+
+// XRowSetApproveBroadcaster
+ virtual void SAL_CALL addRowSetApproveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener>& listener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeRowSetApproveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener>& listener) throw( ::com::sun::star::uno::RuntimeException );
+
+// XSQLErrorBroadcaster
+ virtual void SAL_CALL errorOccured(const ::com::sun::star::sdb::SQLErrorEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+// XSQLErrorListener
+ virtual void SAL_CALL addSQLErrorListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener>& _rListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeSQLErrorListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener>& _rListener) throw( ::com::sun::star::uno::RuntimeException );
+
+// XDatabaseParameterBroadcaster
+ virtual void SAL_CALL addParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+// XDatabaseParameterListener
+ virtual sal_Bool SAL_CALL approveParameter(const ::com::sun::star::form::DatabaseParameterEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+// XConfirmDeleteBroadcaster
+ virtual void SAL_CALL addConfirmDeleteListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeConfirmDeleteListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+// XConfirmDeleteListener
+ virtual sal_Bool SAL_CALL confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+// XServiceInfo
+ virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw(::com::sun::star::uno::RuntimeException);
+
+// 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 );
+
+// method for registration
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > static_getSupportedServiceNames(void);
+
+ // utl::OPropertyArrayUsageHelper
+ virtual void fillProperties(
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
+ ) const;
+
+// access to the controls for filtering
+ const FmFilterControls& getFilterControls() const {return m_aFilterControls;}
+
+// access to the current filter rows
+ const FmFilterRows& getFilterRows() const {return m_aFilters;}
+ FmFilterRows& getFilterRows() {return m_aFilters;}
+
+ // just decr. the positions no notifications for the view
+ void decrementCurrentFilterPosition()
+ {
+ DBG_ASSERT(m_nCurrentFilterPosition, "Invalid Position");
+ --m_nCurrentFilterPosition;
+ }
+
+ void setCurrentFilterPosition(sal_Int32 nPos);
+ sal_Int32 getCurrentFilterPosition() const {return m_nCurrentFilterPosition;}
+
+protected:
+ // FmDispatchInterceptor
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch>
+ interceptedQueryDispatch(sal_uInt16 _nId,const ::com::sun::star::util::URL& aURL,
+ const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::osl::Mutex* getInterceptorMutex() { return &m_aMutex; }
+
+ void startFiltering();
+ void stopFiltering();
+ void setFilter(vector<FmFieldInfo>&);
+ void startListening();
+ void stopListening();
+ void startControlListening(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void stopControlListening(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void setLocks();
+ void setControlLock(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void addToEventAttacher(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void removeFromEventAttacher(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void toggleAutoFields(sal_Bool bAutoFields);
+ void unload() throw( ::com::sun::star::uno::RuntimeException );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> findControl(::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> >& rCtrls, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& rxCtrlModel ) const;
+
+ void insertControl(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+ void removeControl(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
+
+ void onModify();
+ void onActivate();
+
+ sal_Bool isLocked() const {return m_bLocked;}
+ sal_Bool determineLockState() const;
+
+ Window* getDialogParentWindow();
+ // returns m_pWindow or - if m_pWindow is NULL - the window of the currently set container
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor> createInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _xInterception);
+ // create a new interceptor, register it on the given object
+ void deleteInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _xInterception);
+ // if createInterceptor was called for the given object the according interceptor will be removed
+ // from the objects interceptor chain and released
+
+ // in filter mode we do not listen for changes
+ sal_Bool isListeningForChanges() const {return m_bDBConnection && !m_bFiltering && !isLocked();}
+ void addChild(FmXFormController* pChild);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> isInList(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer>& xPeer) const;
+
+ DECL_LINK( OnTimeout, void* );
+ DECL_LINK( OnLoad, void* );
+ DECL_LINK( OnToggleAutoFields, void* );
+ DECL_LINK( OnUpdateDispatchers, void* );
+};
+
+
+#endif // _SVX_FMCTRLER_HXX
+
diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx
new file mode 100644
index 0000000000..28c7d68152
--- /dev/null
+++ b/svx/source/inc/fmexch.hxx
@@ -0,0 +1,152 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmexch.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMEXCH_HXX
+#define _SVX_FMEXCH_HXX
+
+#include <unotools/stl_types.hxx>
+
+#ifndef _SOT_DTRANS_HXX //autogen
+#include <sot/dtrans.hxx>
+#endif
+
+#ifndef _DTRANS_HXX //autogen
+#include <so3/dtrans.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
+#include <com/sun/star/uno/Sequence.hxx>
+#endif
+
+class FmFormShell;
+class FmFormPage;
+class SvLBoxEntry;
+
+//========================================================================
+// Exchange types
+#define SVX_FM_FIELD_EXCH String("SvxFormFieldExch", sizeof("SvxFormFieldExch"))
+#define SVX_FM_CONTROL_EXCH String("SvxFormExplCtrlExch", sizeof("SvxFormExplCtrlExch"))
+#define SVX_FM_CONTROLS_AS_PATH String("SvxFormControlsAsPathExchange", sizeof("SvxFormControlsAsPathExchange"))
+#define SVX_FM_HIDDEN_CONTROLS String("SvxFormHiddenControlsExchange", sizeof("SvxFormHiddenControlsExchange"))
+#define SVX_FM_FILTER_FIELDS String("SvxFilterFieldExchange", sizeof("SvxFilterFieldExchange"))
+
+//========================================================================
+
+typedef ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence<sal_uInt32> > FmControlPaths;
+
+//========================================================================
+class SvTreeListBox;
+class SvxFmExplCtrlExch : public SvDataObject
+{
+ FmFormShell* m_pShell;
+ FmFormPage* m_pPage;
+
+ SvDataTypeList m_aDataTypeList;
+
+ std::vector<SvLBoxEntry*> m_aDraggedEntries;
+ FmControlPaths m_aControlPaths;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > m_seqControls;
+
+public:
+ SvxFmExplCtrlExch( const std::vector<SvLBoxEntry*>& lstWhich, FmFormShell* pShell, FmFormPage* pPage );
+ SvxFmExplCtrlExch( SvLBoxEntry* pEntry );
+
+ virtual const SvDataTypeList& GetTypeList() const { return m_aDataTypeList; }
+ virtual sal_Bool GetData( SvData* );
+
+ SvLBoxEntry* GetDragEntry() const { return m_aDraggedEntries.front(); }
+ void AddItem(SvLBoxEntry* pNew) { m_aDraggedEntries.push_back( pNew ); }
+
+ FmFormShell* GetShell() const { return m_pShell; }
+ FmFormPage* GetPage() const { return m_pPage; }
+ const ::std::vector<SvLBoxEntry*>& GetDraggedEntries() const { return m_aDraggedEntries; }
+ const FmControlPaths GetControlPaths() { return m_aControlPaths; }
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > GetHiddenControls() { return m_seqControls; }
+
+ void BuildPathFormat(SvTreeListBox* pTreeBox, SvLBoxEntry* pRoot);
+ // baut aus m_aDraggedEntries m_aControlPaths auf
+ // (es wird davon ausgegangen, dass die Eintraege in m_aDraggedEntries sortiert sind in Bezug auf die Nachbar-Beziehung)
+ void BuildListFromPath(SvTreeListBox* pTreeBox, SvLBoxEntry* pRoot);
+ // der umgekehrte Weg : wirft alles aus m_aDraggedEntries weg und baut es mittels m_aControlPaths neu auf
+
+ void AddHiddenControlsFormat(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > seqInterfaces);
+ // fuegt ein SVX_FML_HIDDEN_CONTROLS-Format hinzu und merk sich dafuer die uebergebenen Interfaces
+ // (es erfolgt KEINE Ueberpruefung, ob dadurch auch tatsaechlich nur hidden Controls bezeichnet werden, dass muss der
+ // Aufrufer sicherstellen)
+};
+
+SV_DECL_IMPL_REF( SvxFmExplCtrlExch );
+
+//========================================================================
+class SvxFmFieldExch : public SotDataObject
+{
+ String aFieldDesc;
+ SvDataTypeList aDataTypeList;
+
+public:
+ SvxFmFieldExch(const String& rFieldDesc);
+
+ virtual const SvDataTypeList& GetTypeList() const { return aDataTypeList; }
+ virtual sal_Bool GetData( SvData* );
+};
+
+SV_DECL_IMPL_REF( SvxFmFieldExch );
+#endif
+
diff --git a/svx/source/inc/fmexpl.hrc b/svx/source/inc/fmexpl.hrc
new file mode 100644
index 0000000000..a711268726
--- /dev/null
+++ b/svx/source/inc/fmexpl.hrc
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmexpl.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMEXPL_HRC
+#define _SVX_FMEXPL_HRC
+
+#define FT_PATH 1
+
+#define GB_PATH 1
+
+#define PB_OK 1
+#define PB_CANCEL 2
+#define PB_HELP 3
+
+#endif //_SVX_FMEXPL_HRC
+
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
new file mode 100644
index 0000000000..fcfef2ec54
--- /dev/null
+++ b/svx/source/inc/fmexpl.hxx
@@ -0,0 +1,600 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmexpl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMEXPL_HXX
+#define _SVX_FMEXPL_HXX
+
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+
+#ifndef _SFXBRDCST_HXX //autogen
+#include <svtools/brdcst.hxx>
+#endif
+
+#ifndef _SV_WINDOW_HXX //autogen
+#include <vcl/window.hxx>
+#endif
+
+#ifndef _SFX_CHILDWIN_HXX //autogen
+#include <sfx2/childwin.hxx>
+#endif
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+#ifndef _SFX_BINDINGS_HXX //autogen
+#include <sfx2/bindings.hxx>
+#endif
+
+#ifndef _SFXDOCKWIN_HXX //autogen
+#include <sfx2/dockwin.hxx>
+#endif
+
+#ifndef _SFXCTRLITEM_HXX //autogen
+#include <sfx2/ctrlitem.hxx>
+#endif
+
+#ifndef _SV_IMAGE_HXX
+#include <vcl/image.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FORM_XFORMCOMPONENT_HPP_
+#include <com/sun/star/form/XFormComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+
+
+#ifndef _SVTREEBOX_HXX //autogen
+#include <svtools/svtreebx.hxx>
+#endif
+
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+
+#ifndef _EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+
+#ifndef _SV_DOCKWIN_HXX //autogen
+#include <vcl/dockwin.hxx>
+#endif
+
+#ifndef _SVX_FMVIEW_HXX
+#include "fmview.hxx"
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include <fmtools.hxx>
+#endif
+
+class SdrObjListIter;
+//========================================================================
+class FmEntryData;
+class FmExplInsertedHint : public SfxHint
+{
+ FmEntryData* pEntryData;
+ sal_uInt32 nPos;
+
+public:
+ TYPEINFO();
+ FmExplInsertedHint( FmEntryData* pInsertedEntryData, sal_uInt32 nRelPos );
+ virtual ~FmExplInsertedHint();
+
+ FmEntryData* GetEntryData() const { return pEntryData; }
+ sal_uInt32 GetRelPos() const { return nPos; }
+};
+
+//========================================================================
+class FmExplModelReplacedHint : public SfxHint
+{
+ FmEntryData* pEntryData; // die Daten des Eintrages, der ein neues Model bekommen hat
+
+public:
+ TYPEINFO();
+ FmExplModelReplacedHint( FmEntryData* pAffectedEntryData );
+ virtual ~FmExplModelReplacedHint();
+
+ FmEntryData* GetEntryData() const { return pEntryData; }
+};
+
+//========================================================================
+class FmExplRemovedHint : public SfxHint
+{
+ FmEntryData* pEntryData;
+
+public:
+ TYPEINFO();
+ FmExplRemovedHint( FmEntryData* pInsertedEntryData );
+ virtual ~FmExplRemovedHint();
+
+ FmEntryData* GetEntryData() const { return pEntryData; }
+};
+
+//========================================================================
+class FmExplNameChangedHint : public SfxHint
+{
+ FmEntryData* pEntryData;
+ ::rtl::OUString aNewName;
+
+public:
+ TYPEINFO();
+ FmExplNameChangedHint( FmEntryData* pData, const ::rtl::OUString& rNewName );
+ virtual ~FmExplNameChangedHint();
+
+ FmEntryData* GetEntryData() const { return pEntryData; }
+ ::rtl::OUString GetNewName() const { return aNewName; }
+};
+
+//========================================================================
+class FmExplClearedHint : public SfxHint
+{
+public:
+ TYPEINFO();
+ FmExplClearedHint();
+ virtual ~FmExplClearedHint();
+};
+
+//========================================================================
+class FmExplViewMarksChanged : public SfxHint
+{
+ FmFormView* pView;
+public:
+ TYPEINFO();
+ FmExplViewMarksChanged(FmFormView* pWhichView) { pView = pWhichView; }
+ virtual ~FmExplViewMarksChanged() {}
+
+ FmFormView* GetAffectedView() { return pView; }
+};
+
+//========================================================================
+class FmEntryDataList;
+class FmEntryData
+{
+protected:
+ Image aCollapsedImage;
+ Image aExpandedImage;
+ ::rtl::OUString aText;
+
+ FmEntryDataList* pChildList;
+ FmEntryData* pParent;
+
+public:
+ TYPEINFO();
+
+ FmEntryData( FmEntryData* pParentData );
+ FmEntryData( const FmEntryData& rEntryData );
+ virtual ~FmEntryData();
+
+ void Clear();
+ void SetText( const ::rtl::OUString& rText ){ aText = rText; }
+ void SetParent( FmEntryData* pParentData ){ pParent = pParentData; }
+
+ Image GetCollapsedImage() const { return aCollapsedImage; }
+ Image GetExpandedImage() const { return aExpandedImage; }
+ ::rtl::OUString GetText() const { return aText; }
+ FmEntryData* GetParent() const { return pParent; }
+ FmEntryDataList* GetChildList() const { return pChildList; }
+
+ virtual sal_Bool IsEqualWithoutChilds( FmEntryData* pEntryData );
+ virtual FmEntryData* Clone() = 0;
+
+ virtual const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& GetElement() const = 0;
+};
+
+//========================================================================
+DECLARE_LIST( FmEntryDataBaseList, FmEntryData* );
+
+class FmEntryDataList : public FmEntryDataBaseList
+{
+public:
+ FmEntryDataList();
+ virtual ~FmEntryDataList();
+};
+
+//========================================================================
+// FmExplRequestSelectHint - jemand teilt dem FmExplorer mit, dass er bestimmte Eintraege selektieren soll
+
+typedef FmEntryData* FmEntryDataPtr;
+SV_DECL_PTRARR_SORT( FmEntryDataArray, FmEntryDataPtr, 16, 16 )
+
+class FmExplRequestSelectHint : public SfxHint
+{
+ FmEntryDataArray m_arredToSelect;
+ sal_Bool m_bMixedSelection;
+public:
+ TYPEINFO();
+ FmExplRequestSelectHint() { }
+ virtual ~FmExplRequestSelectHint() {}
+
+ void SetMixedSelection(sal_Bool bMixedSelection) { m_bMixedSelection = bMixedSelection; }
+ sal_Bool IsMixedSelection() { return m_bMixedSelection; }
+ void AddItem(FmEntryData* pEntry) { m_arredToSelect.Insert(pEntry); }
+ void ClearItems() { m_arredToSelect.Remove(sal_uInt16(0), m_arredToSelect.Count()); }
+ FmEntryDataArray& GetItems() { return m_arredToSelect; }
+};
+
+//========================================================================
+class FmFormData : public FmEntryData
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > m_xForm;
+
+public:
+ TYPEINFO();
+
+ FmFormData( ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > xForm, const ImageList& ilNavigatorImages, FmFormData* pParent=NULL );
+ FmFormData( const FmFormData& rFormData );
+ virtual ~FmFormData();
+
+ void SetForm( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm ){ m_xForm = xForm; }
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& GetFormIface() const { return m_xForm; }
+ virtual sal_Bool IsEqualWithoutChilds( FmEntryData* pEntryData );
+ virtual FmEntryData* Clone();
+
+ virtual const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& GetElement() const { return m_xForm;}
+};
+
+
+//========================================================================
+class FmControlData : public FmEntryData
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > m_xFormComponent;
+
+ Image GetImage(const ImageList& ilNavigatorImages) const;
+
+public:
+ TYPEINFO();
+
+ FmControlData( ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > xFormComponent, const ImageList& ilNavigatorImages, FmFormData* pParent );
+ FmControlData( const FmControlData& rControlData );
+ virtual ~FmControlData();
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& GetFormComponent() const { return m_xFormComponent; }
+ virtual sal_Bool IsEqualWithoutChilds( FmEntryData* pEntryData );
+ virtual FmEntryData* Clone();
+ virtual const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& GetElement() const { return m_xFormComponent;}
+
+ void ModelReplaced(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& xNew, const ImageList& ilNavigatorImages);
+};
+
+//========================================================================
+class FmExplorerModel;
+class FmXExplPropertyChangeList : public ::cppu::WeakImplHelper2< ::com::sun::star::beans::XPropertyChangeListener,
+ ::com::sun::star::container::XContainerListener>
+{
+ FmExplorerModel* m_pExplModel;
+ sal_uInt32 m_nLocks;
+ sal_Bool m_bCanUndo;
+
+public:
+ FmXExplPropertyChangeList(FmExplorerModel* pModel);
+
+ // UNO-Anbindung
+ // DECLARE_UNO3_AGG_DEFAULTS( FmXExplPropertyChangeList, UsrObject );
+ // virtual sal_Bool queryInterface(::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rOut);
+
+// XEventListenerListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::beans::XPropertyChangeListener
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt);
+
+// ::com::sun::star::container::XContainerListener
+
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent);
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent);
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent);
+
+ void Lock() { m_nLocks++; }
+ void UnLock() { m_nLocks--; }
+ sal_Bool IsLocked() const { return m_nLocks != 0; }
+ sal_Bool CanUndo() const { return m_bCanUndo; }
+ void ReleaseModel() { m_pExplModel = NULL; }
+protected:
+ void Insert(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xIface, sal_Int32 nIndex);
+};
+
+//========================================================================
+class FmFormShell;
+class SdrObject;
+class FmFormModel;
+class FmExplorerModel : public SfxBroadcaster
+ ,public SfxListener
+{
+ friend class FmExplorer;
+ friend class FmXExplPropertyChangeList;
+
+ FmEntryDataList* m_pRootList;
+ FmFormShell* m_pFormShell;
+ FmFormPage* m_pFormPage;
+ FmFormModel* m_pFormModel;
+ FmXExplPropertyChangeList* m_pPropChangeList;
+
+ const ImageList m_ilNavigatorImages;
+
+ void Update( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xForms );
+ FmControlData* CreateControlData( ::com::sun::star::form::XFormComponent* pFormComponent );
+
+ void InsertForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm, sal_uInt32 nRelPos);
+ void RemoveForm(FmFormData* pFormData);
+
+ void InsertFormComponent(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& xComp, sal_uInt32 nRelPos);
+ void RemoveFormComponent(FmControlData* pControlData);
+ void InsertSdrObj(const SdrObject* pSdrObj);
+ void RemoveSdrObj(const SdrObject* pSdrObj);
+
+ void ReplaceFormComponent(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& xOld, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& xNew);
+
+ void BroadcastMarkedObjects(const SdrMarkList& mlMarked);
+ // einen RequestSelectHint mit den aktuell markierten Objekten broadcasten
+ sal_Bool InsertFormComponent(FmExplRequestSelectHint& rHint, SdrObject* pObject);
+ // ist ein Helper fuer vorherige, managet das Abteigen in SdrObjGroups
+ // Rueckgabe sal_True, wenn das Objekt eine FormComponent ist (oder rekursiv nur aus solchen besteht)
+
+public:
+ FmExplorerModel(const ImageList& ilNavigatorImages);
+ virtual ~FmExplorerModel();
+
+ void FillBranch( FmFormData* pParentData );
+ void ClearBranch( FmFormData* pParentData );
+ void Update( FmFormShell* pNewShell );
+
+ void Insert( FmEntryData* pEntryData, sal_uInt32 nRelPos = LIST_APPEND,
+ sal_Bool bAlterModel = sal_False );
+ void Remove( FmEntryData* pEntryData, sal_Bool bAlterModel = sal_False );
+
+ sal_Bool Rename( FmEntryData* pEntryData, const ::rtl::OUString& rNewText );
+ sal_Bool IsNameAlreadyDefined( const ::rtl::OUString& rName, FmFormData* pParentData );
+ void Clear();
+ sal_Bool CheckEntry( FmEntryData* pEntryData );
+ void SetModified( sal_Bool bMod=sal_True );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > GetForms() const;
+ FmFormShell* GetFormShell() const { return m_pFormShell; }
+ FmFormPage* GetFormPage() const { return m_pFormPage; }
+ FmEntryData* FindData( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xElement, FmEntryDataList* pDataList, sal_Bool bRecurs=sal_True );
+ FmEntryData* FindData( const ::rtl::OUString& rText, FmFormData* pParentData, sal_Bool bRecurs=sal_True );
+ FmEntryDataList* GetRootList() const { return m_pRootList; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > GetFormComponents( FmFormData* pParentFormData );
+ SdrObject* GetSdrObj( FmControlData* pControlData );
+ SdrObject* Search(SdrObjListIter& rIter, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& xComp);
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+};
+
+
+//========================================================================
+typedef SvLBoxEntry* SvLBoxEntryPtr;
+SV_DECL_PTRARR_SORT( SvLBoxEntrySortedArray, SvLBoxEntryPtr, 16, 16 )
+
+class FmExplorer : public SvTreeListBox, public SfxListener
+{
+ enum DROP_ACTION { DA_SCROLLUP, DA_SCROLLDOWN, DA_EXPANDNODE };
+ enum SELDATA_ITEMS { SDI_DIRTY, SDI_ALL, SDI_NORMALIZED, SDI_NORMALIZED_FORMARK };
+
+ // beim Droppen will ich scrollen und Folder aufklappen koennen, dafuer :
+ AutoTimer m_aDropActionTimer;
+ Timer m_aSynchronizeTimer;
+ // die Meta-Daten ueber meine aktuelle Selektion
+ SvLBoxEntrySortedArray m_arrCurrentSelection;
+ // die Images, die ich brauche (und an FormDatas und EntryDatas weiterreiche)
+ ImageList m_ilNavigatorImages;
+
+ FmExplorerModel* m_pExplModel;
+ SvLBoxEntry* m_pRootEntry;
+ SvLBoxEntry* m_pEditEntry;
+
+ sal_uInt32 nEditEvent;
+
+ Image m_aCollapsedNodeImg;
+ Image m_aExpandedNodeImg;
+ Image m_aRootImg;
+
+ SELDATA_ITEMS m_sdiState;
+ Point m_aTimerTriggered; // die Position, an der der DropTimer angeschaltet wurde
+ DROP_ACTION m_aDropActionType;
+
+ sal_uInt16 m_nSelectLock;
+ sal_uInt16 m_nFormsSelected;
+ sal_uInt16 m_nControlsSelected;
+ sal_uInt16 m_nHiddenControls; // (die Zahl geht in m_nControlsSelected mit ein)
+
+ unsigned short m_aTimerCounter;
+
+ sal_Bool m_bShellOrPageChanged:1; // wird in jedem Update(FmFormShell*) auf sal_True gesetzt
+ sal_Bool m_bDragDataDirty:1; // dito
+ sal_Bool m_bPrevSelectionMixed:1;
+ sal_Bool m_bMarkingObjects:1; // wenn das sal_True ist, brauche ich auf die RequestSelectHints nicht reagieren
+ sal_Bool m_bRootSelected:1;
+ sal_Bool m_bInitialUpdate:1; // bin ich das erste Mal im Update ?
+
+
+ void Update();
+ sal_Bool IsDeleteAllowed();
+ FmControlData* NewControl( const ::rtl::OUString& rServiceName, SvLBoxEntry* pParentEntry, sal_Bool bEditName = sal_True );
+ void NewForm( SvLBoxEntry* pParentEntry );
+ SvLBoxEntry* Insert( FmEntryData* pEntryData, sal_uInt32 nRelPos=LIST_APPEND );
+ void Remove( FmEntryData* pEntryData );
+
+
+ void CollectSelectionData(SELDATA_ITEMS sdiHow);
+ // sammelt in m_arrCurrentSelection die aktuell selektierten Eintraege, normalisiert die Liste wenn verlangt
+ // SDI_NORMALIZED bedeutet einfach, dass alle Eintraege, die schon einen selektierten Vorfahren haben, nicht mit gesammelt
+ // werden.
+ // SDI_NORMALIZED_FORMARK bedeutet, dass wie bei SDI_NORMALIZED verfahren wird, aber Eintraege, deren direktes Elter nicht
+ // selektiert ist, aufgenommen werden (unabhaengig vom Status weiterer Vorfahren), desgleichen Formulare, die selektiert sind,
+ // unabhaengig vom Status irgendwelcher Vorfahren
+ // Bei beiden Normalized-Modi enthalten die m_nFormsSelected, ... die richtige Anzahl, auch wenn nicht alle dieser Eintraege
+ // in m_arrCurrentSelection landen.
+ // SDI_DIRTY ist natuerlich nicht erlaubt als Parameter
+
+ // ein einziges Interface fuer alle selektierten Eintraege zusammensetzen
+ void ShowSelectionProperties(sal_Bool bForce = sal_False);
+ // alle selektierten Elemnte loeschen
+ void DeleteSelection();
+
+ void SynchronizeSelection(FmEntryDataArray& arredToSelect);
+ // nach dem Aufruf dieser Methode sind genau die Eintraege selektiert, die in dem Array bezeichnet sind
+ void SynchronizeSelection();
+ // macht das selbe, nimmt die MarkList der ::com::sun::star::sdbcx::View
+ void SynchronizeMarkList();
+ // umgekehrte Richtung von SynchronizeMarkList : markiert in der ::com::sun::star::sdbcx::View alle der aktuellen Selektion entsprechenden Controls
+
+ // im Select aktualisiere ich normalerweise die Marklist der zugehoerigen ::com::sun::star::sdbcx::View, mit folgenden Funktionen
+ // kann ich das Locking dieses Verhaltens steuern
+ void LockSelectionHandling() { ++m_nSelectLock; }
+ void UnlockSelectionHandling() { --m_nSelectLock; }
+ sal_Bool IsSelectionHandlingLocked() const { return m_nSelectLock>0; }
+
+ sal_Bool IsHiddenControl(FmEntryData* pEntryData);
+
+ DECL_LINK( OnEdit, void* );
+ DECL_LINK( OnDropActionTimer, void* );
+
+ DECL_LINK(OnEntrySelDesel, FmExplorer*);
+ DECL_LINK(OnSynchronizeTimer, void*);
+
+protected:
+ virtual void Command( const CommandEvent& rEvt );
+
+public:
+ FmExplorer( Window* pParent );
+ virtual ~FmExplorer();
+
+ void Clear();
+ void Update( FmFormShell* pFormShell );
+ void MarkViewObj( FmFormData* pFormData, sal_Bool bMark, sal_Bool bDeep = sal_False );
+ void MarkViewObj( FmControlData* pControlData, sal_Bool bMarkHandles, sal_Bool bMark );
+ void UnmarkAllViewObj();
+
+ sal_Bool IsFormEntry( SvLBoxEntry* pEntry );
+ sal_Bool IsFormComponentEntry( SvLBoxEntry* pEntry );
+
+ ::rtl::OUString GenerateName( FmEntryData* pEntryData );
+
+ FmExplorerModel* GetExplModel() const { return m_pExplModel; }
+ SvLBoxEntry* FindEntry( FmEntryData* pEntryData );
+
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+ virtual sal_Bool QueryDrop( DropEvent& rDEvt );
+ virtual sal_Bool Drop( const DropEvent& rDEvt );
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+};
+
+
+//========================================================================
+class FmFormShell;
+class FmExplorerWin : public SfxDockingWindow, public SfxControllerItem
+{
+private:
+ FmExplorer* m_pFmExplorer;
+
+protected:
+ virtual void Resize();
+ virtual sal_Bool Close();
+ virtual Size CalcDockingSize( SfxChildAlignment );
+ virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment );
+
+public:
+ FmExplorerWin( SfxBindings *pBindings, SfxChildWindow *pMgr,
+ Window* pParent );
+ virtual ~FmExplorerWin();
+
+ void Update( FmFormShell* pFormShell );
+ void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
+ void FillInfo( SfxChildWinInfo& rInfo ) const;
+};
+
+//========================================================================
+class FmExplorerWinMgr : public SfxChildWindow
+{
+public:
+ FmExplorerWinMgr( Window *pParent, sal_uInt16 nId, SfxBindings *pBindings,
+ SfxChildWinInfo *pInfo );
+ SFX_DECL_CHILDWINDOW( FmExplorerWinMgr );
+};
+
+#endif // _SVX_FMEXPL_HXX
+
diff --git a/svx/source/inc/fmgroup.hxx b/svx/source/inc/fmgroup.hxx
new file mode 100644
index 0000000000..16a543c7f8
--- /dev/null
+++ b/svx/source/inc/fmgroup.hxx
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmgroup.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMGROUP_HXX
+#define _SVX_FMGROUP_HXX
+
+#ifndef _SVX_FMCPONT_HXX
+#include "fmcpont.hxx"
+#endif
+
+#ifndef __DBFORM_HXX
+#include <dbform.hxx>
+#endif
+
+DECLARE_LIST( FmCtrlModelList, XInterface* );
+
+struct FmXGroupModel_Impl;
+
+//==================================================================
+// FmXGroupModel
+//==================================================================
+class FmXGroupModel : public XBoundControl,
+ public XLoadListener,
+ public XPropertyChangeListener,
+ public XGroup,
+ public FmXControlModel
+{
+ FmFormControlMap aControlMap;
+
+ friend Reflection* FmXGroupModel_getReflection();
+ FmXGroupModel_Impl* pGroupModelData; // Properties
+
+public:
+ FmXGroupModel();
+ virtual ~FmXGroupModel();
+
+ // UNO Anbindung
+ SMART_UNO_DECLARATION( FmXGroupModel, FmXControlModel );
+ virtual XInterface* queryInterface(UsrUik);
+ virtual XIdlClassRef getIdlClass();
+
+ // XGroup
+ virtual INT32 getFormControlCount();
+ virtual XFormControlRef getFormControlByName( const XubString& sName ) const;
+ virtual XFormControlRef getFormControlByIndex( INT32 Index ) const;
+ virtual void appendFormControl( const XFormControlRef& FormControl );
+ virtual XFormControlRef removeFormControl( const XFormControlRef& FormControl );
+
+ // XFormControl
+ virtual void setParent( const XFormRef& Parent );
+
+ // XEventListener
+ virtual void disposing( const EventObject& Source );
+
+ // XPropertiesChangeListener
+ virtual void propertyChange( const PropertyChangeEvent& evt );
+
+ // XLoadListener
+ virtual void loaded( const EventObject& rEvent );
+ virtual void unloaded( const EventObject& rEvent );
+
+ // XBoundControl
+ virtual void addBoundControlListener( const XBoundControlListenerRef& l );
+ virtual void removeBoundControlListener( const XBoundControlListenerRef& l );
+
+ // XPersistObject
+ virtual XubString getServiceName( void ) const;
+ virtual void write( const XObjectOutputStreamRef& OutStream );
+ virtual void read( const XObjectInputStreamRef& InStream );
+
+ // PropertySetInterface
+ virtual FmXPropertySetInfo* createPropertySetInfo() const;
+ virtual BOOL setPropertyValue( UINT16 nId, const XubString& aPropertyName,
+ const UsrAny& aValue,
+ PropertyChangeEventSequence* pSeq,
+ INT32 nIndex );
+ virtual UsrAny getPropertyValue( UINT16 nId, const XubString& aPropertyName ) const;
+ virtual void addPropertyChangeListener( const XubString& aPropertyName, const XPropertyChangeListenerRef& aListener );
+ virtual void removePropertyChangeListener( const XubString& aPropertyName, const XPropertyChangeListenerRef& aListener );
+};
+
+//==================================================================
+// FmXGroupModelInfo
+// Properties:
+//==================================================================
+class FmXGroupModelInfo : public FmXControlModelInfo
+{
+ friend class FmXGroupModel;
+
+protected:
+ FmXGroupModelInfo( const FmXGroupModel* pCp );
+ virtual void fillProperties( UINT32& nIndex, PropertySequence& aSeq ) const;
+};
+
+
+#endif // _SVX_FMGROUP_HXX
+
diff --git a/svx/source/inc/fmhlpids.hrc b/svx/source/inc/fmhlpids.hrc
new file mode 100644
index 0000000000..69e62b5181
--- /dev/null
+++ b/svx/source/inc/fmhlpids.hrc
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmhlpids.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMHLPIDS_HRC
+#define _SVX_FMHLPIDS_HRC
+
+// include -----------------------------------------------------------
+#ifndef _SVX_FMHELP_HRC
+#include "fmhelp.hrc"
+#endif
+
+#endif
+
diff --git a/svx/source/inc/fmitems.hxx b/svx/source/inc/fmitems.hxx
new file mode 100644
index 0000000000..0edd331238
--- /dev/null
+++ b/svx/source/inc/fmitems.hxx
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmitems.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMITEMS_HXX
+#define _SVX_FMITEMS_HXX
+
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+#include <unotools/uno3.hxx>
+// FORWARD_DECLARE_INTERFACE(awt,XControlContainer)
+FORWARD_DECLARE_INTERFACE(uno,Any)
+// class ::com::sun::star::uno::Any;
+
+struct FmFormInfo
+{
+ sal_Int32 Pos;
+ sal_Int32 Count;
+ sal_Bool ReadOnly;
+ FmFormInfo(sal_Int32 _Pos = 0, sal_Int32 _Count = -1, sal_Bool _ReadOnly = sal_False)
+ :Pos(_Pos)
+ ,Count(_Count)
+ ,ReadOnly(_ReadOnly){}
+ sal_Bool operator == (const FmFormInfo& rInfo) const
+ {return Pos == rInfo.Pos && Count == rInfo.Count && ReadOnly==rInfo.ReadOnly;}
+};
+
+//==================================================================
+class FmFormInfoItem : public SfxPoolItem
+{
+ FmFormInfo aInfo;
+
+public:
+ TYPEINFO();
+
+ FmFormInfoItem(const sal_uInt16 nId, const FmFormInfo& rInfo = FmFormInfo())
+ :SfxPoolItem(nId)
+ ,aInfo(rInfo){}
+
+ inline FmFormInfoItem& operator=( const FmFormInfoItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( ::com::sun::star::uno::Any& rVal, sal_Int8 nMemberId = 0 ) const;
+ virtual sal_Bool SetValue( const ::com::sun::star::uno::Any& rVal, sal_Int8 nMemberId = 0 );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+
+ const FmFormInfo& GetInfo() const { return aInfo; }
+ void SetInfo(const FmFormInfo& rInfo) { aInfo = rInfo; }
+};
+
+inline FmFormInfoItem& FmFormInfoItem::operator=( const FmFormInfoItem &rCpy )
+{
+ aInfo = rCpy.aInfo;
+ return *this;
+}
+
+
+//==================================================================
+class FmInterfaceItem : public SfxPoolItem
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInterface;
+
+public:
+ TYPEINFO();
+
+ FmInterfaceItem( const sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxInterface )
+ :SfxPoolItem( nId )
+ ,xInterface( rxInterface )
+ {}
+
+ inline FmInterfaceItem& operator=( const FmInterfaceItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( ::com::sun::star::uno::Any& rVal, sal_Int8 nMemberId = 0 ) const;
+ virtual sal_Bool SetValue( const ::com::sun::star::uno::Any& rVal, sal_Int8 nMemberId = 0 );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetInterface() const { return xInterface; }
+};
+
+inline FmInterfaceItem& FmInterfaceItem::operator=( const FmInterfaceItem &rCpy )
+{
+ xInterface = rCpy.xInterface;
+
+ return *this;
+}
+
+
+
+#endif // _SVX_FMITEMS_HXX
+
diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx
new file mode 100644
index 0000000000..435bd71839
--- /dev/null
+++ b/svx/source/inc/fmobj.hxx
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmobj.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMOBJ_HXX
+#define _SVX_FMOBJ_HXX
+
+#ifndef _SVDOUNO_HXX
+#include "svdouno.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_SCRIPT_SCRIPTEVENTDESCRIPTOR_HPP_
+#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_
+#include <com/sun/star/container/XIndexContainer.hpp>
+#endif
+
+class FmFormView;
+
+//==================================================================
+// FmFormObj
+//==================================================================
+class FmXForms;
+class FmFormObj: public SdrUnoObj
+{
+ friend class FmForm;
+ friend class FmFormPage;
+ friend class FmFormPageImpl;
+ friend class FmFormObjFactory;
+ friend class FmXUndoEnvironment;
+ friend class SvxFmDrawPage;
+ friend class SvxFmMSFactory;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor > aEvts; // events des Objects
+ ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor> m_aEventsHistory;
+ // valid if and only if m_pEnvironmentHistory != NULL, this are the events which we're set when
+ // m_pEnvironmentHistory was created
+
+ FmFormView* pTempView;
+ sal_uInt32 nEvent;
+
+ // Informationen fuer die Controlumgebung
+ // werden nur vorgehalten, wenn ein Object sich nicht in einer Objectliste befindet
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> xParent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > m_xEnvironmentHistory;
+ sal_Int32 nPos;
+
+public:
+ TYPEINFO();
+
+protected:
+ FmFormObj(const ::rtl::OUString& rModelName);
+ FmFormObj();
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& GetParent() const {return xParent;}
+ void SetObjEnv(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& xForm, sal_Int32 nIdx = -1,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor >& rEvts= ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor >());
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor >& GetEvents() const {return aEvts;}
+ sal_Int32 GetPos() const {return nPos;}
+
+public:
+ virtual ~FmFormObj();
+ virtual void SetPage(SdrPage* pNewPage);
+
+ virtual sal_uInt32 GetObjInventor() const;
+ virtual sal_uInt16 GetObjIdentifier() const;
+
+ virtual SdrObject* Clone() const;
+ virtual SdrObject* Clone(SdrPage* pPage, SdrModel* pModel) const;
+ virtual void operator= (const SdrObject& rObj);
+
+ virtual void clonedFrom(const FmFormObj* _pSource);
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> ensureModelEnv(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rSourceContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> _rTopLevelDestContainer);
+
+protected:
+ virtual void WriteData(SvStream& rOut) const;
+ virtual void ReadData(const SdrObjIOHeader& rHead, SvStream& rIn);
+ virtual FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
+
+ DECL_LINK(OnCreate, void* );
+};
+
+
+#endif // _FM_FMOBJ_HXX
+
diff --git a/svx/source/inc/fmpgeimp.hxx b/svx/source/inc/fmpgeimp.hxx
new file mode 100644
index 0000000000..9c27669833
--- /dev/null
+++ b/svx/source/inc/fmpgeimp.hxx
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmpgeimp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMUNOPGE_HXX
+#define _SVX_FMUNOPGE_HXX
+
+#ifndef _COM_SUN_STAR_SDB_XDATABASEACCESS_HPP_
+#include <com/sun/star/sdb/XDatabaseAccess.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
+#include <com/sun/star/container/XNameAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCOMPONENT_HPP_
+#include <com/sun/star/form/XFormComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
+#include <com/sun/star/form/XForm.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+
+
+#ifndef _LIST_HXX //autogen
+#include <tools/list.hxx>
+#endif
+
+#ifndef _UTL_UNO3_HXX_
+#include <unotools/uno3.hxx>
+#endif
+
+class SvStream;
+class SdrIOHeader;
+class FmFormObj;
+class SdrObject;
+
+//FORWARD_DECLARE_INTERFACE(uno,Reference)
+FORWARD_DECLARE_INTERFACE(io,XObjectOutputStream)
+FORWARD_DECLARE_INTERFACE(io,XObjectInputStream)
+FORWARD_DECLARE_INTERFACE(container,XIndexContainer)
+
+class SdrObjList;
+
+DECLARE_LIST(FmObjectList, FmFormObj*);
+
+//==================================================================
+// FmFormPageImpl
+// lauscht an allen Containern, um festzustellen, wann Objecte
+// eingefuegt worden sind und wann diese entfernt wurden
+//==================================================================
+
+class FmFormPageImpl
+{
+ friend class FmFormPage;
+ friend class FmFormObj;
+ friend class FmXFormShell;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xCurrentForm; // aktuelles Formular
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> xForms; // Liste aller Forms
+
+ FmFormPage* pPage;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> xModel;
+
+ UniString m_sPageId;
+
+protected:
+ FmFormPageImpl(FmFormPage* _pPage);
+ FmFormPageImpl(FmFormPage* _pPage, const FmFormPageImpl& rImpl);
+ ~FmFormPageImpl();
+
+ void Init();
+
+public:
+ // nur wichtig fuer den DesignMode
+ void setCurForm(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm);
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& getCurForm() {return xCurrentForm;}
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> getDefaultForm();
+
+ // Defaults fuer ein Object setzen
+ // Eindeutigen Namen, Zuordnen zu einer Form falls noch nicht erfolgt
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> SetDefaults(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>& rContent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess>& rDatabase = ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess>(),
+ const ::rtl::OUString& rDBTitle = ::rtl::OUString(),
+ const ::rtl::OUString& rCursorSource = ::rtl::OUString(),
+ sal_Int32 nCommandType = 0);
+
+ UniString GetPageId() const { return m_sPageId; }
+
+protected:
+ // lesen und schreiben der Objecte
+ void WriteData(SvStream& rOut) const; //
+ void ReadData(const SdrIOHeader& rHead, SvStream& rIn); //
+
+ void write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& OutStream) const;
+ void read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& InStream);
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& getForms() {return xForms;}
+
+ void fillList(FmObjectList& rList, const SdrObjList& rObjList, sal_Bool bConnected) const;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> FindForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& rForm,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseAccess>& rDatabase,
+ const ::rtl::OUString& rCursorSource,
+ sal_Int32 nCommandType);
+
+ ::rtl::OUString getDefaultName(sal_Int16 nClassId, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& xControls) const;
+
+public:
+
+ static UniString getDefaultName(sal_Int16 nClassId);
+
+ ::rtl::OUString setUniqueName(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>& xFormComponent, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& xControls);
+ ::rtl::OUString getUniqueName(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& xNamedSet) const;
+};
+
+#define GET_DEFNAME(Id) \
+ FmFormPageImpl::getDefaultName(Id)
+
+
+#endif // _SVX_FMUNOPGE_HXX
+
diff --git a/svx/source/inc/fmprop.hrc b/svx/source/inc/fmprop.hrc
new file mode 100644
index 0000000000..a99d948325
--- /dev/null
+++ b/svx/source/inc/fmprop.hrc
@@ -0,0 +1,398 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmprop.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMPROP_HRC
+#define _SVX_FMPROP_HRC
+
+#ifndef _FM_STATIC_HXX_
+#include "fmstatic.hxx"
+#endif
+// PropertyId's, welche eine Zuordnung zu einen PropertyName haben, das koennten
+// auch in Zukunft WhichIds sein -> Itemset
+#define FM_ATTR_START 0
+
+#define FM_ATTR_NAME (FM_ATTR_START + 1)
+#define FM_ATTR_TABINDEX (FM_ATTR_START + 2)
+#define FM_ATTR_CONTROLSOURCE (FM_ATTR_START + 3)
+#define FM_ATTR_MASTERFIELDS (FM_ATTR_START + 4)
+#define FM_ATTR_DATASOURCE (FM_ATTR_START + 6)
+#define FM_ATTR_CLASSID (FM_ATTR_START + 9)
+#define FM_ATTR_CURSORTYPE (FM_ATTR_START + 10)
+#define FM_ATTR_READONLY (FM_ATTR_START + 11)
+#define FM_ATTR_NAVIGATION (FM_ATTR_START + 13)
+#define FM_ATTR_CYCLE (FM_ATTR_START + 14)
+#define FM_ATTR_ALLOWADDITIONS (FM_ATTR_START + 15)
+#define FM_ATTR_ALLOWEDITS (FM_ATTR_START + 16)
+#define FM_ATTR_ALLOWDELETIONS (FM_ATTR_START + 17)
+#define FM_ATTR_CACHESIZE (FM_ATTR_START + 19)
+#define FM_ATTR_LASTDIRTY (FM_ATTR_START + 24)
+#define FM_ATTR_VALUE (FM_ATTR_START + 31) // sal_Int32
+#define FM_ATTR_FORMATKEY (FM_ATTR_START + 33) // sal_uInt32
+#define FM_ATTR_SIZE (FM_ATTR_START + 37) // sal_uInt32
+#define FM_ATTR_HEIGHT (FM_ATTR_START + 41) // sal_uInt16
+#define FM_ATTR_WIDTH (FM_ATTR_START + 42) // sal_uInt16
+#define FM_ATTR_DEFAULTCONTROL (FM_ATTR_START + 43) // string
+#define FM_ATTR_BOUNDCOLUMN (FM_ATTR_START + 44) // sal_uInt16 may be null
+#define FM_ATTR_LISTSOURCETYPE (FM_ATTR_START + 45) // sal_uInt16
+#define FM_ATTR_LISTSOURCE (FM_ATTR_START + 46) // string
+#define FM_ATTR_LISTINDEX (FM_ATTR_START + 47) // sal_uInt32
+#define FM_ATTR_TEXT (FM_ATTR_START + 48) // string
+#define FM_ATTR_STRINGITEMLIST (FM_ATTR_START + 49) // wsstringsequence
+#define FM_ATTR_LABEL (FM_ATTR_START + 50) // string
+#define FM_ATTR_STATE (FM_ATTR_START + 52) // sal_uInt16
+#define FM_ATTR_GROUPBOX (FM_ATTR_START + 53) // string
+#define FM_ATTR_FONT (FM_ATTR_START + 54) // font
+#define FM_ATTR_HASNAVIGATION (FM_ATTR_START + 55)
+#define FM_ATTR_ROWHEIGHT (FM_ATTR_START + 57) // sal_uInt16
+#define FM_ATTR_BACKGROUNDCOLOR (FM_ATTR_START + 58) // sal_uInt32
+#define FM_ATTR_FILLCOLOR (FM_ATTR_START + 59) // sal_uInt32
+#define FM_ATTR_TEXTCOLOR (FM_ATTR_START + 60) // sal_uInt32
+#define FM_ATTR_LINECOLOR (FM_ATTR_START + 61) // sal_uInt32
+#define FM_ATTR_BORDER (FM_ATTR_START + 62) // sal_uInt16
+#define FM_ATTR_ALIGN (FM_ATTR_START + 63) // sal_uInt16
+#define FM_ATTR_DROPDOWN (FM_ATTR_START + 64) // sal_Bool
+#define FM_ATTR_MULTI (FM_ATTR_START + 65) // sal_Bool
+#define FM_ATTR_HSCROLL (FM_ATTR_START + 66) // sal_Bool
+#define FM_ATTR_VSCROLL (FM_ATTR_START + 67) // sal_Bool
+#define FM_ATTR_TABSTOP (FM_ATTR_START + 68) // sal_Bool
+#define FM_ATTR_REFVALUE (FM_ATTR_START + 69) // ::rtl::OUString
+#define FM_ATTR_BUTTONTYPE (FM_ATTR_START + 70) // sal_uInt16
+#define FM_ATTR_DEFAULT_TEXT (FM_ATTR_START + 71) // ::rtl::OUString
+#define FM_ATTR_SUBMIT_ACTION (FM_ATTR_START + 72) // string
+#define FM_ATTR_SUBMIT_METHOD (FM_ATTR_START + 73) // FmSubmitMethod
+#define FM_ATTR_SUBMIT_ENCODING (FM_ATTR_START + 74) // FmSubmitEncoding
+#define FM_ATTR_DEFAULT_VALUE (FM_ATTR_START + 75) // ::rtl::OUString
+#define FM_ATTR_SUBMIT_TARGET (FM_ATTR_START + 76) // ::rtl::OUString
+#define FM_ATTR_DEFAULT_CHECKED (FM_ATTR_START + 77) // sal_uInt16
+#define FM_ATTR_VALUE_SEQ (FM_ATTR_START + 78) // StringSeq
+#define FM_ATTR_IMAGE_URL (FM_ATTR_START + 79) // ::rtl::OUString
+#define FM_ATTR_SELECT_SEQ (FM_ATTR_START + 91) // INT16Seq
+#define FM_ATTR_DEFAULT_SELECT_SEQ (FM_ATTR_START + 92) // INT16Seq
+#define FM_ATTR_MULTISELECTION (FM_ATTR_START + 93) // sal_Bool
+#define FM_ATTR_MULTILINE (FM_ATTR_START + 94) // sal_Bool
+#define FM_ATTR_DATE (FM_ATTR_START + 95) // sal_uInt32
+#define FM_ATTR_DATEMIN (FM_ATTR_START + 96) // sal_uInt32
+#define FM_ATTR_DATEMAX (FM_ATTR_START + 97) // sal_uInt32
+#define FM_ATTR_DATEFORMAT (FM_ATTR_START + 98) // sal_uInt16
+#define FM_ATTR_TIME (FM_ATTR_START + 99) // sal_uInt32
+#define FM_ATTR_TIMEMIN (FM_ATTR_START +100) // sal_uInt32
+#define FM_ATTR_TIMEMAX (FM_ATTR_START +101) // sal_uInt32
+#define FM_ATTR_TIMEFORMAT (FM_ATTR_START +102) // sal_uInt16
+#define FM_ATTR_VALUEMIN (FM_ATTR_START +103) // sal_Int32
+#define FM_ATTR_VALUEMAX (FM_ATTR_START +104) // sal_Int32
+#define FM_ATTR_VALUESTEP (FM_ATTR_START +105) // sal_Int32
+#define FM_ATTR_CURRENCYSYMBOL (FM_ATTR_START +106) // ::rtl::OUString
+#define FM_ATTR_EDITMASK (FM_ATTR_START +107) // ::rtl::OUString
+#define FM_ATTR_LITERALMASK (FM_ATTR_START +108) // ::rtl::OUString
+#define FM_ATTR_ENABLED (FM_ATTR_START +109) // sal_Bool
+#define FM_ATTR_AUTOCOMPLETE (FM_ATTR_START +110) // sal_Bool
+#define FM_ATTR_LINECOUNT (FM_ATTR_START +111) // sal_uInt16
+#define FM_ATTR_MAXTEXTLEN (FM_ATTR_START +112) // sal_uInt16
+#define FM_ATTR_SPIN (FM_ATTR_START +113) // sal_Bool
+#define FM_ATTR_STRICTFORMAT (FM_ATTR_START +114) // sal_Bool
+#define FM_ATTR_SHOWTHOUSANDSEP (FM_ATTR_START +115) // sal_Bool
+#define FM_ATTR_HARDLINEBREAKS (FM_ATTR_START +116) // sal_Bool
+#define FM_ATTR_PRINTABLE (FM_ATTR_START +117) // sal_Bool
+#define FM_ATTR_TARGET_URL (FM_ATTR_START +118) // ::rtl::OUString
+#define FM_ATTR_TARGET_FRAME (FM_ATTR_START +119) // ::rtl::OUString
+#define FM_ATTR_TAG (FM_ATTR_START +120) // ::rtl::OUString
+#define FM_ATTR_ECHO_CHAR (FM_ATTR_START +121) // sal_uInt16
+#define FM_ATTR_EMPTY_IS_NULL (FM_ATTR_START +126) // Bool
+#define FM_ATTR_DECIMAL_ACCURACY (FM_ATTR_START +127) // sal_uInt16
+#define FM_ATTR_DATE_SHOW_CENTURY (FM_ATTR_START +128) // Bool
+#define FM_ATTR_TRISTATE (FM_ATTR_START +129) // Bool
+#define FM_ATTR_DEFAULT_BUTTON (FM_ATTR_START +130) // Bool
+#define FM_ATTR_HIDDEN_VALUE (FM_ATTR_START +131) // ::rtl::OUString
+#define FM_ATTR_DECIMALS (FM_ATTR_START +132) // sal_uInt16
+#define FM_ATTR_AUTOINCREMENT (FM_ATTR_START +133) // sal_uInt16
+#define FM_ATTR_FILTER_CRITERIA (FM_ATTR_START +135) // ::rtl::OUString
+#define FM_ATTR_QUERY (FM_ATTR_START +137) // ::rtl::OUString
+#define FM_ATTR_DEFAULT_LONG_VALUE (FM_ATTR_START +138) // Double
+#define FM_ATTR_DEFAULT_DATE (FM_ATTR_START +139) // sal_uInt32
+#define FM_ATTR_DEFAULT_TIME (FM_ATTR_START +140)
+#define FM_ATTR_HELPTEXT (FM_ATTR_START +141)
+#define FM_ATTR_FONT_NAME (FM_ATTR_START +142)
+#define FM_ATTR_FONT_STYLENAME (FM_ATTR_START +143)
+#define FM_ATTR_FONT_FAMILY (FM_ATTR_START +144)
+#define FM_ATTR_FONT_CHARSET (FM_ATTR_START +145)
+#define FM_ATTR_FONT_HEIGHT (FM_ATTR_START +146)
+#define FM_ATTR_FONT_WEIGHT (FM_ATTR_START +147)
+#define FM_ATTR_FONT_SLANT (FM_ATTR_START +148)
+#define FM_ATTR_FONT_UNDERLINE (FM_ATTR_START +149)
+#define FM_ATTR_FONT_STRIKEOUT (FM_ATTR_START +150)
+#define FM_ATTR_ISPASSTHROUGH (FM_ATTR_START +151)
+#define FM_ATTR_HELPURL (FM_ATTR_START +152) // ::rtl::OUString
+#define FM_ATTR_RECORDMARKER (FM_ATTR_START +153)
+#define FM_ATTR_BOUNDFIELD (FM_ATTR_START +154)
+#define FM_ATTR_FORMATSSUPPLIER (FM_ATTR_START +155) // ::com::sun::star::util::XNumberFormatsSupplier
+#define FM_ATTR_TREATASNUMERIC (FM_ATTR_START +156) // sal_Bool
+#define FM_ATTR_EFFECTIVE_VALUE (FM_ATTR_START +157) // ANY (string or double)
+#define FM_ATTR_EFFECTIVE_DEFAULT (FM_ATTR_START +158) // dito
+#define FM_ATTR_EFFECTIVE_MIN (FM_ATTR_START +159) // dito
+#define FM_ATTR_EFFECTIVE_MAX (FM_ATTR_START +160) // dito
+#define FM_ATTR_HIDDEN (FM_ATTR_START +161) // sal_Bool
+#define FM_ATTR_FILTERPROPOSAL (FM_ATTR_START +162) // sal_Bool
+#define FM_ATTR_FIELDSOURCE (FM_ATTR_START +163) // String
+#define FM_ATTR_TABLENAME (FM_ATTR_START +164) // String
+#define FM_ATTR_FILTERSUPPLIER (FM_ATTR_START +165) // ::com::sun::star::container::XIndexAccess
+#define FM_ATTR_CURRENTFILTER (FM_ATTR_START +166) // sal_Int32
+#define FM_ATTR_SELECTED_FIELDS (FM_ATTR_START +167)
+#define FM_ATTR_SELECTED_TABLES (FM_ATTR_START +168)
+#define FM_ATTR_THREADSAFE (FM_ATTR_START +169) // sal_Bool
+#define FM_ATTR_CONTROLLABEL (FM_ATTR_START +171) // ::com::sun::star::beans::XPropertySet
+#define FM_ATTR_CURRSYM_POSITION (FM_ATTR_START +172) // String
+#define FM_ATTR_SOURCE (FM_ATTR_START +173) // ::com::sun::star::uno::XInterface
+#define FM_ATTR_CURSORCOLOR (FM_ATTR_START +174) // sal_Int32
+#define FM_ATTR_ALWAYSSHOWCURSOR (FM_ATTR_START +175) // sal_Bool
+#define FM_ATTR_DISPLAYSYNCHRON (FM_ATTR_START +176) // sal_Bool
+
+#define FM_ATTR_ISMODIFIED (FM_ATTR_START +177) // sal_Bool
+#define FM_ATTR_ISNEW (FM_ATTR_START +178) // sal_Bool
+#define FM_ATTR_PRIVILEGES (FM_ATTR_START +179) // sal_Int32
+#define FM_ATTR_DETAILFIELDS (FM_ATTR_START +180) // ::com::sun::star::uno::Sequence<::rtl::OUString>
+#define FM_ATTR_COMMAND (FM_ATTR_START +181) // String
+#define FM_ATTR_COMMANDTYPE (FM_ATTR_START +182) // sal_Int32 (com::sun::star::sdb::CommandType)
+#define FM_ATTR_RESULTSET_CONCURRENCY (FM_ATTR_START +183)// sal_Int32 (com::sun::star::sdbc::ResultSetConcurrency)
+#define FM_ATTR_INSERTONLY (FM_ATTR_START +184) // sal_Bool
+#define FM_ATTR_RESULTSET_TYPE (FM_ATTR_START +185) // sal_Int32 (com::sun::star::sdbc::ResultSetType)
+#define FM_ATTR_ESCAPE_PROCESSING (FM_ATTR_START +186) // sal_Bool
+#define FM_ATTR_APPLYFILTER (FM_ATTR_START +187) // sal_Bool
+
+#define FM_ATTR_ISNULLABLE (FM_ATTR_START +188) // sal_Bool
+#define FM_ATTR_ACTIVECOMMAND (FM_ATTR_START +189) // String
+#define FM_ATTR_ISCURRENCY (FM_ATTR_START +190) // sal_Bool
+#define FM_ATTR_NUMBER_FORMATS_SUPPLIER (FM_ATTR_START +191)// sal_Bool
+#define FM_ATTR_URL (FM_ATTR_START +192) // String
+#define FM_ATTR_TITLE (FM_ATTR_START +193) // String
+#define FM_ATTR_ACTIVE_CONNECTION (FM_ATTR_START +194) // com::sun::star::sdbc::::com::sun::star::sdbc::XConnection
+#define FM_ATTR_SCALE (FM_ATTR_START +195) // sal_Int32
+#define FM_ATTR_SORT (FM_ATTR_START +196) // String
+#define FM_ATTR_CONTROLSOURCEPROPERTY (FM_ATTR_START +197)
+#define FM_ATTR_REALNAME (FM_ATTR_START +198) // String
+
+
+// start ID fuer aggregierte Properties
+#define FM_ATTR_AGGREGATE_ID (FM_ATTR_START + 10000)
+
+// extern declaration fuer vordefinierte Strings, laengst nicht vollstaendig
+DECLARE_CONSTASCII_USTRING(FM_PROP_NAME);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TAG);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TABINDEX);
+DECLARE_CONSTASCII_USTRING(FM_PROP_CLASSID);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ALIGN);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ROWCOUNT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ROWCOUNTFINAL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FETCHSIZE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_VALUE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_VALUEMIN);
+DECLARE_CONSTASCII_USTRING(FM_PROP_VALUEMAX);
+DECLARE_CONSTASCII_USTRING(FM_PROP_VALUESTEP);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TEXT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_LABEL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_NAVIGATION);
+DECLARE_CONSTASCII_USTRING(FM_PROP_CYCLE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ENABLED);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SPIN);
+DECLARE_CONSTASCII_USTRING(FM_PROP_READONLY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FILTER_CRITERIA);
+DECLARE_CONSTASCII_USTRING(FM_PROP_AUTOINCREMENT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_CACHESIZE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_LASTDIRTY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_STATEMENT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_WIDTH);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SEARCHABLE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_MULTILINE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TARGET_URL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULTCONTROL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_MAXTEXTLEN);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SIZE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DATE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TIME);
+DECLARE_CONSTASCII_USTRING(FM_PROP_STATE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TRISTATE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_HIDDEN_VALUE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TARGET_FRAME);
+DECLARE_CONSTASCII_USTRING(FM_PROP_BUTTONTYPE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_STRINGITEMLIST);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_TEXT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULTCHECKED);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_DATE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_TIME);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_VALUE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FORMATKEY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FORMATSSUPPLIER);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SUBMIT_ACTION);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SUBMIT_TARGET);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SUBMIT_METHOD);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SUBMIT_ENCODING);
+DECLARE_CONSTASCII_USTRING(FM_PROP_IMAGE_URL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_EMPTY_IS_NULL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_LISTSOURCETYPE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_LISTSOURCE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SELECT_SEQ);
+DECLARE_CONSTASCII_USTRING(FM_PROP_VALUE_SEQ);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_SELECT_SEQ);
+DECLARE_CONSTASCII_USTRING(FM_PROP_MULTISELECTION);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DECIMAL_ACCURACY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_EDITMASK);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ISREADONLY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ISREQUIRED);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FIELDTYPE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DECIMALS);
+DECLARE_CONSTASCII_USTRING(FM_PROP_REFVALUE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_STRICTFORMAT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DATASOURCE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ALLOWADDITIONS);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ALLOWEDITS);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ALLOWDELETIONS);
+DECLARE_CONSTASCII_USTRING(FM_PROP_MASTERFIELDS);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ISPASSTHROUGH);
+DECLARE_CONSTASCII_USTRING(FM_PROP_QUERY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_LITERALMASK);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SHOWTHOUSANDSEP);
+DECLARE_CONSTASCII_USTRING(FM_PROP_CURRENCYSYMBOL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DATEFORMAT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DATEMIN);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DATEMAX);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DATE_SHOW_CENTURY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TIMEFORMAT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TIMEMIN);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TIMEMAX);
+DECLARE_CONSTASCII_USTRING(FM_PROP_LINECOUNT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_BOUNDCOLUMN);
+DECLARE_CONSTASCII_USTRING(FM_PROP_HASNAVIGATION);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FONT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_BACKGROUNDCOLOR);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FILLCOLOR);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TEXTCOLOR);
+DECLARE_CONSTASCII_USTRING(FM_PROP_LINECOLOR);
+DECLARE_CONSTASCII_USTRING(FM_PROP_BORDER);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DROPDOWN);
+DECLARE_CONSTASCII_USTRING(FM_PROP_MULTI);
+DECLARE_CONSTASCII_USTRING(FM_PROP_HSCROLL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_VSCROLL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TABSTOP);
+DECLARE_CONSTASCII_USTRING(FM_PROP_AUTOCOMPLETE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_HARDLINEBREAKS);
+DECLARE_CONSTASCII_USTRING(FM_PROP_PRINTABLE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ECHO_CHAR);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ROWHEIGHT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_HELPTEXT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FONT_NAME);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FONT_STYLENAME);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FONT_FAMILY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FONT_CHARSET);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FONT_HEIGHT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FONT_WEIGHT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FONT_SLANT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FONT_UNDERLINE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FONT_STRIKEOUT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_HELPURL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_RECORDMARKER);
+DECLARE_CONSTASCII_USTRING(FM_PROP_BOUNDFIELD);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TREATASNUMERIC);
+DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_VALUE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_DEFAULT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MIN);
+DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MAX);
+DECLARE_CONSTASCII_USTRING(FM_PROP_HIDDEN);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FILTERPROPOSAL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FIELDSOURCE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TABLENAME);
+DECLARE_CONSTASCII_USTRING(FM_PROP_FILTERSUPPLIER);
+DECLARE_CONSTASCII_USTRING(FM_PROP_CURRENTFILTER);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SELECTED_FIELDS);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SELECTED_TABLES);
+DECLARE_CONSTASCII_USTRING(FM_PROP_THREADSAFE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_CONTROLLABEL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_CURRSYM_POSITION);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SOURCE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_CURSORCOLOR);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ALWAYSSHOWCURSOR);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DISPLAYSYNCHRON);
+
+DECLARE_CONSTASCII_USTRING(FM_PROP_ISMODIFIED);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ISNEW);
+DECLARE_CONSTASCII_USTRING(FM_PROP_PRIVILEGES);
+DECLARE_CONSTASCII_USTRING(FM_PROP_DETAILFIELDS);
+DECLARE_CONSTASCII_USTRING(FM_PROP_COMMAND);
+DECLARE_CONSTASCII_USTRING(FM_PROP_COMMANDTYPE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_RESULTSET_CONCURRENCY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_INSERTONLY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_RESULTSET_TYPE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ESCAPE_PROCESSING);
+DECLARE_CONSTASCII_USTRING(FM_PROP_APPLYFILTER);
+
+DECLARE_CONSTASCII_USTRING(FM_PROP_ISNULLABLE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ACTIVECOMMAND);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ISCURRENCY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_NUMBER_FORMATS_SUPPLIER);
+DECLARE_CONSTASCII_USTRING(FM_PROP_URL);
+DECLARE_CONSTASCII_USTRING(FM_PROP_TITLE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_ACTIVE_CONNECTION);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SCALE);
+DECLARE_CONSTASCII_USTRING(FM_PROP_SORT);
+DECLARE_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCEPROPERTY);
+DECLARE_CONSTASCII_USTRING(FM_PROP_REALNAME);
+
+
+#endif // _SVX_FMPROP_HRC
+
diff --git a/svx/source/inc/fmresids.hrc b/svx/source/inc/fmresids.hrc
new file mode 100644
index 0000000000..a2a6cf8ed2
--- /dev/null
+++ b/svx/source/inc/fmresids.hrc
@@ -0,0 +1,492 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmresids.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMRESIDS_HRC
+#define _SVX_FMRESIDS_HRC
+
+// include -----------------------------------------------------------
+#include <svtools/solar.hrc>
+
+// unnamed ressources -------------------------------------------------------
+#define RID_RES_CONTROL_WIZARDS_ERROR_CONTEXTS (RID_FORMS_START + 0)
+// sub ressources .....................
+#define RID_SUB_GRIDCONTROL_WIZARD 1
+#define RID_SUB_LISTBOX_WIZARD 2
+#define RID_SUB_COMBOBOX_WIZARD 3
+#define RID_SUB_GROUPBOX_WIZARD 4
+
+// ImageList-Id's -----------------------------------------------------------
+#define RID_SVXIMGLIST_FMEXPL (RID_FORMS_START + 0)
+#define RID_SVXIMGLIST_DBBRW (RID_FORMS_START + 1)
+
+// Image-Id's -----------------------------------------------------------
+#define RID_SVXIMG_FORM SID_FM_CONFIG
+#define RID_SVXIMG_CONTROL SID_CHOOSE_CONTROLS
+#define RID_SVXIMG_COLLAPSEDNODE (RID_FORMS_START + 2)
+#define RID_SVXIMG_EXPANDEDNODE (RID_FORMS_START + 3)
+#define RID_SVXIMG_BUTTON SID_FM_PUSHBUTTON
+#define RID_SVXIMG_RADIOBUTTON SID_FM_RADIOBUTTON
+#define RID_SVXIMG_CHECKBOX SID_FM_CHECKBOX
+#define RID_SVXIMG_FIXEDTEXT SID_FM_FIXEDTEXT
+#define RID_SVXIMG_GROUPBOX SID_FM_GROUPBOX
+#define RID_SVXIMG_EDIT SID_FM_EDIT
+#define RID_SVXIMG_LISTBOX SID_FM_LISTBOX
+#define RID_SVXIMG_COMBOBOX SID_FM_COMBOBOX
+#define RID_SVXIMG_URLBUTTON SID_FM_URLBUTTON
+#define RID_SVXIMG_FORMS (RID_FORMS_START +13)
+#define RID_SVXIMG_IMAGEBUTTON SID_FM_IMAGEBUTTON
+#define RID_SVXIMG_IMAGECONTROL SID_FM_IMAGECONTROL
+#define RID_SVXIMG_FILECONTROL SID_FM_FILECONTROL
+#define RID_SVXIMG_DATEFIELD SID_FM_DATEFIELD
+#define RID_SVXIMG_TIMEFIELD SID_FM_TIMEFIELD
+#define RID_SVXIMG_NUMERICFIELD SID_FM_NUMERICFIELD
+#define RID_SVXIMG_CURRENCYFIELD SID_FM_CURRENCYFIELD
+#define RID_SVXIMG_PATTERNFIELD SID_FM_PATTERNFIELD
+#define RID_SVXIMG_HIDDEN (RID_FORMS_START +22)
+#define RID_SVXIMG_GRID SID_FM_DBGRID
+#define RID_SVXIMG_FORMATTEDFIELD SID_FM_FORMATTEDFIELD
+#define RID_SVXIMG_FILTER SID_FM_FILTERCRIT
+#define RID_SVXIMG_DATE_N_TIME_FIELDS SID_FM_TWOFIELDS_DATE_N_TIME
+#define RID_SVXIMG_FIELD (RID_FORMS_START +27)
+#define RID_SVXIMG_ERROR (RID_FORMS_START +28)
+#define RID_SVXIMG_WARNING (RID_FORMS_START +29)
+#define RID_SVXIMG_INFO (RID_FORMS_START +30)
+
+// Dialog-Id's -----------------------------------------------------------
+#define RID_SVXTBX_FORM (RID_FORMS_START + 1)
+#define TBX_FORM (RID_FORMS_START + 2)
+#define RID_SVXTBX_FORM_NAVIGATION (RID_FORMS_START + 3)
+#define RID_SVXTBX_FORM_FILTER (RID_FORMS_START + 4)
+#define RID_SVXDLG_ADD_TABLE (RID_FORMS_START + 5)
+#define RID_SVXDLG_TAB_ORDER (RID_FORMS_START + 6)
+#define RID_SVXDLG_PROPBRW (RID_FORMS_START + 7)
+#define RID_SVX_PROPBRW (RID_FORMS_START + 8)
+#define RID_SVXDLG_SETFORM (RID_FORMS_START + 9)
+#define RID_SVX_FMEXPLORER (RID_FORMS_START + 10)
+#define RID_SVXDLG_DBINFO (RID_FORMS_START + 11)
+#define RID_SVXDLG_FMMACRO (RID_FORMS_START + 12)
+#define RID_SVXDLG_FMFONT (RID_FORMS_START + 13)
+#define RID_SVXDLG_SEARCHFORM (RID_FORMS_START + 14)
+#define RID_SVXERR_SEARCH_NORECORD (RID_FORMS_START + 15)
+#define RID_SVXERR_SEARCH_GENERAL_ERROR (RID_FORMS_START + 16)
+#define RID_SVX_DLG_INPUTRECORDNO (RID_FORMS_START + 17)
+#define RID_SVX_DLG_SHOWGRIDCOLUMNS (RID_FORMS_START + 18)
+#define RID_SVX_DLG_QUERYPARAMS (RID_FORMS_START + 19)
+#define RID_SVX_DLG_LABELCONTROL (RID_FORMS_START + 20)
+#define RID_SVX_DLG_SQLEXCEPTIONDETAILS (RID_FORMS_START + 21)
+
+// Menu-Id's -----------------------------------------------------------
+#define RID_FMEXPLORER_POPUPMENU (RID_FORMS_START + 0)
+#define RID_SVXMNU_ROWS (RID_FORMS_START + 1)
+#define RID_SVXMNU_COLS (RID_FORMS_START + 2)
+#define RID_SVXMNU_CELL (RID_FORMS_START + 3)
+#define RID_FMSHELL_CONVERSIONMENU (RID_FORMS_START + 4)
+#define RID_FM_FILTER_MENU (RID_FORMS_START + 5)
+
+
+// QueryBox-Id's -----------------------------------------------------------
+#define RID_QRY_SAVEMODIFIED (RID_FORMS_START + 1)
+
+// String-Id's -----------------------------------------------------------
+#define RID_STR_FORMSHELL (RID_FORMS_START + 10)
+#define RID_STR_STDFORMNAME (RID_FORMS_START + 11)
+#define RID_STR_REC_TEXT (RID_FORMS_START + 12)
+#define RID_STR_REC_FROM_TEXT (RID_FORMS_START + 13)
+#define RID_STR_FORM_FILTERED (RID_FORMS_START + 14)
+
+// Undo Strings
+#define RID_STR_UNDO_PROPERTY (RID_FORMS_START + 17)
+#define RID_STR_UNDO_CONTAINER_INSERT (RID_FORMS_START + 18)
+#define RID_STR_UNDO_CONTAINER_REMOVE (RID_FORMS_START + 19)
+#define RID_STR_UNDO_CONTAINER_REMOVE_MULTIPLE (RID_FORMS_START + 20)
+#define RID_STR_UNDO_CONTAINER_REPLACE (RID_FORMS_START + 21)
+#define RID_STR_UNDO_TABORDER (RID_FORMS_START + 22)
+#define RID_STR_UNDO_DELETE_LOGICAL (RID_FORMS_START + 23)
+#define RID_STR_UNDO_MODEL_REPLACE (RID_FORMS_START + 24)
+
+// ErrorStrings
+#define RID_STR_ERR_CONNECTLOST (RID_FORMS_START + 30)
+
+#define RID_STR_FILTER_CRITERIA (RID_FORMS_START + 36)
+#define RID_STR_SORT_CRITERIA (RID_FORMS_START + 37)
+#define RID_STR_NAVIGATIONBAR (RID_FORMS_START + 38)
+#define RID_STR_ALIGN (RID_FORMS_START + 39)
+#define RID_STR_BACKGROUNDCOLOR (RID_FORMS_START + 40)
+#define RID_STR_BORDER (RID_FORMS_START + 41)
+#define RID_STR_DEFAULT_CONTROL (RID_FORMS_START + 42)
+#define RID_STR_HSCROLL (RID_FORMS_START + 43)
+#define RID_STR_VSCROLL (RID_FORMS_START + 44)
+#define RID_STR_MULTILINE (RID_FORMS_START + 45)
+#define RID_STR_NAME (RID_FORMS_START + 46)
+#define RID_STR_TABSTOP (RID_FORMS_START + 47)
+#define RID_STR_TEXT (RID_FORMS_START + 48)
+#define RID_STR_CONTROLSOURCE (RID_FORMS_START + 49)
+#define RID_STR_DROPDOWN (RID_FORMS_START + 50)
+#define RID_STR_BOUNDCOLUMN (RID_FORMS_START + 51)
+#define RID_STR_LISTSOURCE (RID_FORMS_START + 52)
+#define RID_STR_LISTSOURCETYPE (RID_FORMS_START + 53)
+#define RID_STR_CURSORSOURCE (RID_FORMS_START + 54)
+#define RID_STR_CURSORSOURCETYPE (RID_FORMS_START + 55)
+#define RID_STR_ALLOW_ADDITIONS (RID_FORMS_START + 56)
+#define RID_STR_ALLOW_DELETIONS (RID_FORMS_START + 57)
+#define RID_STR_ALLOW_EDITS (RID_FORMS_START + 58)
+#define RID_STR_DATAENTRY (RID_FORMS_START + 59)
+#define RID_STR_DATASOURCE (RID_FORMS_START + 60)
+#define RID_STR_LOCKED (RID_FORMS_START + 61)
+#define RID_STR_MASTERFIELDS (RID_FORMS_START + 62)
+#define RID_STR_SLAVEFIELDS (RID_FORMS_START + 63)
+#define RID_STR_FONT (RID_FORMS_START + 64)
+#define RID_STR_SEARCHING (RID_FORMS_START + 65)
+#define RID_STR_SEARCH_TYPE (RID_FORMS_START + 66)
+#define RID_STR_CURSORTYPE (RID_FORMS_START + 67)
+#define RID_STR_LABEL (RID_FORMS_START + 68)
+#define RID_STR_ALIGNMENT (RID_FORMS_START + 69)
+#define RID_STR_NEW_FORM (RID_FORMS_START + 70)
+#define RID_STR_TABWIN_PREFIX (RID_FORMS_START + 71)
+#define RID_STR_FORM (RID_FORMS_START + 72)
+#define RID_STR_PROPPAGE_FORMCTL_TITLE (RID_FORMS_START + 73)
+#define RID_STR_PROPPAGE_UNOCTL_TITLE (RID_FORMS_START + 74)
+#define RID_STR_PROPPAGE_DEFAULT_TITLE (RID_FORMS_START + 75)
+#define RID_STR_CURSORSOURCE_TYPE (RID_FORMS_START + 76)
+#define RID_STR_BOOL (RID_FORMS_START + 77)
+#define RID_STR_FIELDSELECTION (RID_FORMS_START + 78)
+#define RID_STR_FIELDNULL (RID_FORMS_START + 79)
+#define RID_STR_NO_PROPERTIES (RID_FORMS_START + 80)
+#define RID_STR_PROPERTIES_CONTROL (RID_FORMS_START + 81)
+#define RID_STR_PROPERTIES_FORM (RID_FORMS_START + 82)
+#define RID_STR_FMEXPLORER (RID_FORMS_START + 83)
+#define RID_STR_FORMS (RID_FORMS_START + 84)
+#define RID_STR_LISTSOURCE_TYPE (RID_FORMS_START + 85)
+#define RID_STR_EVENTS (RID_FORMS_START + 86)
+#define RID_STR_CURSOR_TYPE (RID_FORMS_START + 87)
+
+#define RID_STR_READERROR (RID_FORMS_START + 88)
+#define RID_STR_WRITEERROR (RID_FORMS_START + 89)
+#define RID_STR_DELETEERROR (RID_FORMS_START + 90)
+#define RID_STR_WARNING (RID_FORMS_START + 91)
+#define RID_STR_CONNECTERROR (RID_FORMS_START + 92)
+#define RID_STR_DELETECONFIRM_RECORD (RID_FORMS_START + 93)
+#define RID_STR_DELETECONFIRM (RID_FORMS_START + 94)
+#define RID_STR_PROPERTIES_COLUMN (RID_FORMS_START + 95)
+
+#define RID_STR_READONLY (RID_FORMS_START + 96)
+#define RID_STR_GROUPBOX (RID_FORMS_START + 97)
+#define RID_STR_TABINDEX (RID_FORMS_START + 98)
+#define RID_STR_NAVIGATION (RID_FORMS_START + 99)
+#define RID_STR_CYCLE (RID_FORMS_START +100)
+#define RID_STR_DIRTY (RID_FORMS_START +101)
+#define RID_STR_OLDVALUE (RID_FORMS_START +102)
+#define RID_STR_VALUE (RID_FORMS_START +103)
+#define RID_STR_FORMATKEY (RID_FORMS_START +104)
+#define RID_STR_REQUIRED (RID_FORMS_START +105)
+#define RID_STR_SCALE (RID_FORMS_START +106)
+#define RID_STR_SIZE (RID_FORMS_START +107)
+#define RID_STR_UNIQUE (RID_FORMS_START +108)
+#define RID_STR_CLASSID (RID_FORMS_START +109)
+#define RID_STR_LEFT (RID_FORMS_START +110)
+#define RID_STR_RIGHT (RID_FORMS_START +111)
+#define RID_STR_HEIGHT (RID_FORMS_START +112)
+#define RID_STR_WIDTH (RID_FORMS_START +113)
+#define RID_STR_LISTINDEX (RID_FORMS_START +114)
+#define RID_STR_ROWHEIGHT (RID_FORMS_START +115)
+#define RID_STR_FILLCOLOR (RID_FORMS_START +116)
+#define RID_STR_TEXTCOLOR (RID_FORMS_START +117)
+#define RID_STR_LINECOLOR (RID_FORMS_START +118)
+#define RID_STR_REFVALUE (RID_FORMS_START +119)
+#define RID_STR_STRINGITEMLIST (RID_FORMS_START +120)
+#define RID_STR_COLUMN (RID_FORMS_START +121)
+#define RID_STR_BUTTONTYPE (RID_FORMS_START +122)
+#define RID_STR_SUBMIT_ACTION (RID_FORMS_START +123)
+#define RID_STR_SUBMIT_METHOD (RID_FORMS_START +124)
+#define RID_STR_SUBMIT_ENCODING (RID_FORMS_START +125)
+#define RID_STR_DEFAULTVALUE (RID_FORMS_START +126)
+#define RID_STR_SUBMIT_TARGET (RID_FORMS_START +127)
+#define RID_STR_ENUM_BUTTONTYPE (RID_FORMS_START +128)
+#define RID_STR_ENUM_SUBMIT_METHOD (RID_FORMS_START +129)
+#define RID_STR_ENUM_SUBMIT_ENCODING (RID_FORMS_START +130)
+#define RID_STR_DEFAULT_CHECKED (RID_FORMS_START +131)
+#define RID_STR_ENUM_SUBMIT_TARGET (RID_FORMS_START +132)
+#define RID_STR_IMAGE_URL (RID_FORMS_START +133)
+#define RID_STR_STRING_ITEM_LIST (RID_FORMS_START +134)
+#define RID_STR_DEFAULT_SELECT_SEQ (RID_FORMS_START +135)
+#define RID_STR_DEFAULT_FORM_NAME (RID_FORMS_START +136)
+#define RID_STR_DEFAULT_CONTROL_NAME (RID_FORMS_START +137)
+#define RID_STR_STANDARD (RID_FORMS_START +138)
+#define RID_STR_MULTISELECTION (RID_FORMS_START +139)
+
+#define RID_STR_DATE (RID_FORMS_START +140)
+#define RID_STR_DATEMIN (RID_FORMS_START +141)
+#define RID_STR_DATEMAX (RID_FORMS_START +142)
+#define RID_STR_DATEFORMAT (RID_FORMS_START +143)
+#define RID_STR_TIME (RID_FORMS_START +144)
+#define RID_STR_TIMEMIN (RID_FORMS_START +145)
+#define RID_STR_TIMEMAX (RID_FORMS_START +146)
+#define RID_STR_TIMEFORMAT (RID_FORMS_START +147)
+#define RID_STR_VALUEMIN (RID_FORMS_START +148)
+#define RID_STR_VALUEMAX (RID_FORMS_START +149)
+#define RID_STR_VALUESTEP (RID_FORMS_START +150)
+#define RID_STR_CURRENCYSYMBOL (RID_FORMS_START +151)
+#define RID_STR_EDITMASK (RID_FORMS_START +152)
+#define RID_STR_LITERALMASK (RID_FORMS_START +153)
+#define RID_STR_ENABLED (RID_FORMS_START +154)
+#define RID_STR_AUTOCOMPLETE (RID_FORMS_START +155)
+#define RID_STR_LINECOUNT (RID_FORMS_START +156)
+#define RID_STR_MAXTEXTLEN (RID_FORMS_START +157)
+#define RID_STR_SPIN (RID_FORMS_START +158)
+#define RID_STR_STRICTFORMAT (RID_FORMS_START +159)
+#define RID_STR_SHOWTHOUSANDSEP (RID_FORMS_START +160)
+#define RID_STR_HARDLINEBREAKS (RID_FORMS_START +161)
+#define RID_STR_PRINTABLE (RID_FORMS_START +162)
+#define RID_STR_TARGET_URL (RID_FORMS_START +163)
+#define RID_STR_TARGET_FRAME (RID_FORMS_START +164)
+#define RID_STR_IMPORT_GRAPHIC (RID_FORMS_START +165)
+#define RID_STR_DATEFORMAT_LIST (RID_FORMS_START +166)
+#define RID_STR_TIMEFORMAT_LIST (RID_FORMS_START +167)
+#define RID_STR_TAG (RID_FORMS_START +168)
+#define RID_STR_ECHO_CHAR (RID_FORMS_START +169)
+#define RID_STR_EMPTY_IS_NULL (RID_FORMS_START +170)
+#define RID_STR_DECIMAL_ACCURACY (RID_FORMS_START +171)
+#define RID_STR_DATE_SHOW_CENTURY (RID_FORMS_START +172)
+#define RID_STR_BORDER_TYPE (RID_FORMS_START +173)
+#define RID_STR_ENUM_CHECKED (RID_FORMS_START +174)
+#define RID_STR_DEFAULT_BUTTON (RID_FORMS_START +175)
+#define RID_STR_ENUM_CYCLE (RID_FORMS_START +176)
+
+#define RID_STR_PROPTITLE_PUSHBUTTON (RID_FORMS_START +177)
+#define RID_STR_PROPTITLE_RADIOBUTTON (RID_FORMS_START +178)
+#define RID_STR_PROPTITLE_CHECKBOX (RID_FORMS_START +179)
+#define RID_STR_PROPTITLE_FIXEDTEXT (RID_FORMS_START +180)
+#define RID_STR_PROPTITLE_GROUPBOX (RID_FORMS_START +181)
+#define RID_STR_PROPTITLE_EDIT (RID_FORMS_START +182)
+#define RID_STR_PROPTITLE_LISTBOX (RID_FORMS_START +183)
+#define RID_STR_PROPTITLE_COMBOBOX (RID_FORMS_START +184)
+#define RID_STR_PROPTITLE_IMAGEBUTTON (RID_FORMS_START +185)
+#define RID_STR_PROPTITLE_IMAGECONTROL (RID_FORMS_START +186)
+#define RID_STR_PROPTITLE_FILECONTROL (RID_FORMS_START +187)
+#define RID_STR_PROPTITLE_DATEFIELD (RID_FORMS_START +188)
+#define RID_STR_PROPTITLE_TIMEFIELD (RID_FORMS_START +189)
+#define RID_STR_PROPTITLE_NUMERICFIELD (RID_FORMS_START +190)
+#define RID_STR_PROPTITLE_CURRENCYFIELD (RID_FORMS_START +191)
+#define RID_STR_PROPTITLE_PATTERNFIELD (RID_FORMS_START +192)
+#define RID_STR_PROPTITLE_DBGRID (RID_FORMS_START +193)
+#define RID_STR_PROPTITLE_MULTISELECT (RID_FORMS_START +194)
+
+#define RID_STR_DELETECONFIRM_RECORDS (RID_FORMS_START +195)
+#define RID_STR_TRISTATE (RID_FORMS_START +196)
+#define RID_STR_CONTROL (RID_FORMS_START +197)
+#define RID_STR_NO_FORM_CONNECT (RID_FORMS_START +198)
+#define RID_STR_FIELD_NOT_FOUND (RID_FORMS_START +199)
+#define RID_STR_TABLE_NOT_FOUND (RID_FORMS_START +200)
+#define RID_STR_QUERY_NOT_FOUND (RID_FORMS_START +201)
+#define RID_STR_ENUM_NAVIGATION (RID_FORMS_START +202)
+
+#define RID_STR_RECORDSEARCH_DIRECTIONS (RID_FORMS_START +203)
+#define RID_STR_RECORDSEARCH_METHODS (RID_FORMS_START +204)
+#define RID_STR_RECORDSEARCH_BUTTONS (RID_FORMS_START +205)
+#define RID_STR_SEARCH_OVERFLOW (RID_FORMS_START +206)
+#define RID_STR_SEARCH_COUNTING (RID_FORMS_START +207)
+
+#define RID_STR_NODATACONTROLS (RID_FORMS_START +208)
+#define RID_STR_HELPTEXT (RID_FORMS_START +209)
+#define RID_STR_HELPURL (RID_FORMS_START +210)
+#define RID_STR_RECORDMARKER (RID_FORMS_START +211)
+#define RID_STR_DATETIME_LABELPOSTFIX (RID_FORMS_START +212)
+#define RID_STR_FILTERPROPOSAL (RID_FORMS_START +213)
+#define RID_STR_FILTER_NAVIGATOR (RID_FORMS_START +214)
+#define RID_STR_FILTER_FILTER_FOR (RID_FORMS_START +215)
+#define RID_STR_FILTER_FILTER_OR (RID_FORMS_START +216)
+
+#define RID_STR_PROPTITLE_FORMATTED (RID_FORMS_START +217)
+#define RID_STR_SYNTAXERROR (RID_FORMS_START +218)
+#define RID_STR_INSERTING_ALLOWED_ERROR (RID_FORMS_START +219)
+#define RID_STR_UPDATING_ALLOWED_ERROR (RID_FORMS_START +220)
+#define RID_STR_DELETING_ALLOWED_ERROR (RID_FORMS_START +221)
+#define RID_STR_MOVING_CURSOR (RID_FORMS_START +222)
+
+#define RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY (RID_FORMS_START +223)
+
+#define RID_STR_LABELCONTROL (RID_FORMS_START +224)
+#define RID_STR_VETO_DATASOURCE (RID_FORMS_START +225)
+
+#define RID_STR_CURRSYM_POSITION (RID_FORMS_START +226)
+#define RID_STR_LIST_N_COMBO_FILLLIST (RID_FORMS_START +227)
+#define RID_STR_COMMAND_TYPE (RID_FORMS_START +228)
+#define RID_STR_ESCAPE_PROCESSING (RID_FORMS_START +229)
+#define RID_STR_COULDNOTSETORDER (RID_FORMS_START +230)
+#define RID_STR_COULDNOTSETFILTER (RID_FORMS_START +231)
+#define RID_STR_SQLEXCEPTIONTYPES (RID_FORMS_START +232)
+#define RID_STR_ERR_INSERTRECORD (RID_FORMS_START +233)
+#define RID_STR_ERR_UPDATERECORD (RID_FORMS_START +234)
+#define RID_STR_ERR_DELETERECORD (RID_FORMS_START +235)
+#define RID_STR_ERR_DELETERECORDS (RID_FORMS_START +236)
+#define RID_STR_AUTOFIELD (RID_FORMS_START +237)
+#define RID_STR_CONTROL_SUBSTITUTED_NAME (RID_FORMS_START +238)
+#define RID_STR_CONTROL_SUBSTITUTED_EPXPLAIN (RID_FORMS_START +239)
+#define RID_STR_CREATECONTROLS_INVALIDSOURCE (RID_FORMS_START +240)
+
+// ClassNames
+#define RID_CLASSNAMES_START (RID_FORMS_START + 300)
+
+#define RID_STR_EDIT_CLASSNAME (RID_CLASSNAMES_START + 0)
+#define RID_STR_BUTTON_CLASSNAME (RID_CLASSNAMES_START + 1)
+#define RID_STR_FIXEDTEXT_CLASSNAME (RID_CLASSNAMES_START + 2)
+#define RID_STR_CHECKBOX_CLASSNAME (RID_CLASSNAMES_START + 3)
+#define RID_STR_RADIOBUTTON_CLASSNAME (RID_CLASSNAMES_START + 4)
+#define RID_STR_LISTBOX_CLASSNAME (RID_CLASSNAMES_START + 5)
+#define RID_STR_COMBOBOX_CLASSNAME (RID_CLASSNAMES_START + 6)
+#define RID_STR_URLBUTTON_CLASSNAME (RID_CLASSNAMES_START + 7)
+#define RID_STR_GROUPBOX_CLASSNAME (RID_CLASSNAMES_START + 8)
+#define RID_STR_CONTROL_CLASSNAME (RID_CLASSNAMES_START + 9)
+#define RID_STR_IMAGE_CLASSNAME (RID_CLASSNAMES_START + 10)
+#define RID_STR_GRID_CLASSNAME (RID_CLASSNAMES_START + 11)
+#define RID_STR_FILECONTROL_CLASSNAME (RID_CLASSNAMES_START + 12)
+
+#define RID_STR_DATEFIELD_CLASSNAME (RID_CLASSNAMES_START + 13)
+#define RID_STR_TIMEFIELD_CLASSNAME (RID_CLASSNAMES_START + 14)
+#define RID_STR_NUMERICFIELD_CLASSNAME (RID_CLASSNAMES_START + 15)
+#define RID_STR_CURRENCYFIELD_CLASSNAME (RID_CLASSNAMES_START + 16)
+#define RID_STR_PATTERNFIELD_CLASSNAME (RID_CLASSNAMES_START + 17)
+#define RID_STR_IMAGECONTROL_CLASSNAME (RID_CLASSNAMES_START + 18)
+#define RID_STR_HIDDEN_CLASSNAME (RID_CLASSNAMES_START + 19)
+
+// Events
+#define RID_STR_EVT_START (RID_FORMS_START +400)
+
+#define RID_STR_EVT_ACTIONPERFORMED (RID_STR_EVT_START + 0)
+#define RID_STR_EVT_AFTERDELETE (RID_STR_EVT_START + 1)
+#define RID_STR_EVT_AFTERINSERT (RID_STR_EVT_START + 2)
+#define RID_STR_EVT_AFTERUPDATE (RID_STR_EVT_START + 3)
+#define RID_STR_EVT_BEFOREDELETE (RID_STR_EVT_START + 4)
+#define RID_STR_EVT_BEFOREINSERT (RID_STR_EVT_START + 5)
+#define RID_STR_EVT_BEFOREUPDATE (RID_STR_EVT_START + 6)
+#define RID_STR_EVT_COMPONENTHIDDEN (RID_STR_EVT_START + 7)
+#define RID_STR_EVT_COMPONENTMOVED (RID_STR_EVT_START + 8)
+#define RID_STR_EVT_COMPONENTPAINT (RID_STR_EVT_START + 9)
+#define RID_STR_EVT_COMPONENTRESIZED (RID_STR_EVT_START + 10)
+#define RID_STR_EVT_COMPONENTSHOWN (RID_STR_EVT_START + 11)
+#define RID_STR_EVT_CONFIRMDELETE (RID_STR_EVT_START + 12)
+#define RID_STR_EVT_ELEMENTINSERTED (RID_STR_EVT_START + 13)
+#define RID_STR_EVT_ELEMENTREMOVED (RID_STR_EVT_START + 14)
+#define RID_STR_EVT_ELEMENTREPLACED (RID_STR_EVT_START + 15)
+#define RID_STR_EVT_ERROROCCURED (RID_STR_EVT_START + 16)
+#define RID_STR_EVT_FIRING (RID_STR_EVT_START + 17)
+#define RID_STR_EVT_FOCUSGAINED (RID_STR_EVT_START + 18)
+#define RID_STR_EVT_FOCUSLOST (RID_STR_EVT_START + 19)
+#define RID_STR_EVT_ITEMSTATECHANGED (RID_STR_EVT_START + 20)
+#define RID_STR_EVT_KEYTYPED (RID_STR_EVT_START + 21)
+#define RID_STR_EVT_LOADED (RID_STR_EVT_START + 22)
+#define RID_STR_EVT_MOUSEDRAGGED (RID_STR_EVT_START + 23)
+#define RID_STR_EVT_MOUSEENTERED (RID_STR_EVT_START + 24)
+#define RID_STR_EVT_MOUSEEXITED (RID_STR_EVT_START + 25)
+#define RID_STR_EVT_MOUSEMOVED (RID_STR_EVT_START + 26)
+#define RID_STR_EVT_MOUSEPRESSED (RID_STR_EVT_START + 27)
+#define RID_STR_EVT_MOUSERELEASED (RID_STR_EVT_START + 28)
+#define RID_STR_EVT_POSITIONED (RID_STR_EVT_START + 29)
+#define RID_STR_EVT_PROPERTIESCHANGE (RID_STR_EVT_START + 30)
+#define RID_STR_EVT_PROPERTYCHANGE (RID_STR_EVT_START + 31)
+#define RID_STR_EVT_PROPERTYSTATECHANGE (RID_STR_EVT_START + 32)
+#define RID_STR_EVT_RESETTED (RID_STR_EVT_START + 33)
+#define RID_STR_EVT_SUBMITTED (RID_STR_EVT_START + 34)
+#define RID_STR_EVT_TEXTCHANGED (RID_STR_EVT_START + 35)
+#define RID_STR_EVT_UNLOADED (RID_STR_EVT_START + 36)
+#define RID_STR_EVT_UPDATECANCELED (RID_STR_EVT_START + 37)
+#define RID_STR_EVT_VETOABLECHANGE (RID_STR_EVT_START + 38)
+#define RID_STR_EVT_CHANGED (RID_STR_EVT_START + 39)
+#define RID_STR_EVT_APPROVERESETTED (RID_STR_EVT_START + 40)
+#define RID_STR_EVT_APPROVEACTIONPERFORMED (RID_STR_EVT_START + 41)
+#define RID_STR_EVT_KEYUP (RID_STR_EVT_START + 42)
+#define RID_STR_EVT_APPROVEPARAMETER (RID_STR_EVT_START + 43)
+#define RID_STR_EVT_POSITIONING (RID_STR_EVT_START + 44)
+#define RID_STR_EVT_APPROVEROWCHANGE (RID_STR_EVT_START + 45)
+#define RID_STR_EVT_ROWCHANGE (RID_STR_EVT_START + 46)
+#define RID_STR_EVT_RELOADED (RID_STR_EVT_START + 47)
+
+// Error-String-Id's -----------------------------------------------------------
+#define RID_ERR_START (RID_FORMS_START + 600)
+#define RID_ERR_CONTEXT_ADDFORM (RID_ERR_START + 0)
+#define RID_ERR_DUPLICATE_NAME (RID_ERR_START + 1)
+#define RID_ERR_FIELDREQUIRED (RID_ERR_START + 2)
+#define RID_ERR_NO_ELEMENT_TITLE (RID_ERR_START + 3)
+#define RID_ERR_NO_ELEMENT (RID_ERR_START + 4)
+#define RID_ERR_COULD_NOT_CONVERT_PARAM (RID_ERR_START + 5)
+#define RID_ERR_REFRESHING_SUB_FORM (RID_ERR_START + 6)
+#define RID_ERR_LOADING_FORM (RID_ERR_START + 7)
+#define RID_ERR_REFRESHING_FORM (RID_ERR_START + 8)
+
+// Error-Id's -----------------------------------------------------------
+
+
+// Ueberlaufpruefung -----------------------------------------------------
+
+// Dialog-Id's
+#define ACTFRM_RID_END RID_SVXDLG_DBINFO
+#if ACTFRM_RID_END > RID_FORMS_END
+#error Resource-Ueberlauf in #line, #file
+#endif
+
+// Strings
+#define ACTFRM_RID_STREND RID_ERR_FIELDREQUIRED
+#if ACTFRM_RID_STREND > RID_FORMS_END
+#error Resource-Ueberlauf in #line, #file
+#endif
+
+
+#endif // _FM_FMPAGE_HXX
+
diff --git a/svx/source/inc/fmsearch.hrc b/svx/source/inc/fmsearch.hrc
new file mode 100644
index 0000000000..39193b4d63
--- /dev/null
+++ b/svx/source/inc/fmsearch.hrc
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmsearch.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _FMSEARCH_HRC
+#define _FMSEARCH_HRC
+
+#define FT_SEARCHTEXT 1
+#define FT_FORM 2
+#define FT_POSITION 3
+#define FT_RECORDLABEL 4
+#define FT_RECORD 5
+#define FT_HINT 6
+
+
+#define CMB_SEARCHTEXT 1
+
+#define RB_ALLFIELDS 1
+#define RB_SINGLEFIELD 2
+#define RB_SEARCHFORTEXT 3
+#define RB_SEARCHFORNULL 4
+#define RB_SEARCHFORNOTNULL 5
+
+#define LB_FORM 1
+#define LB_FIELD 2
+#define LB_POSITION 3
+
+#define PB_APPROXSETTINGS 1
+#define PB_SEARCH 2
+
+#define GB_SEARCHFOR 1
+#define GB_WHERE 2
+#define GB_OPTIONS 3
+#define GB_STATE 4
+
+#define CB_USEFORMATTER 1
+#define CB_BACKWARD 2
+#define CB_STARTOVER 3
+#define CB_CASE 4
+#define CB_WILDCARD 5
+#define CB_REGULAR 6
+#define CB_APPROX 7
+
+#endif // _FMSEARCH_HRC
diff --git a/svx/source/inc/fmservs.hxx b/svx/source/inc/fmservs.hxx
new file mode 100644
index 0000000000..d06741284f
--- /dev/null
+++ b/svx/source/inc/fmservs.hxx
@@ -0,0 +1,264 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmservs.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMSERVS_HXX
+#define _SVX_FMSERVS_HXX
+
+#ifndef _FM_STATIC_HXX_
+#include "fmstatic.hxx"
+#endif
+// alle serviceNamen
+DECLARE_CONSTASCII_USTRING(FM_NUMBER_FORMATTER);
+
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_EDIT);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_LISTBOX);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_COMBOBOX);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_RADIOBUTTON);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_GROUPBOX);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_FIXEDTEXT);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_COMMANDBUTTON);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_CHECKBOX);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_IMAGEBUTTON);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_FILECONTROL);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_TIMEFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_DATEFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_NUMERICFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_CURRENCYFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_PATTERNFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_FORMATTEDFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROL_IMAGECONTROL);
+
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_EDIT);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_LISTBOX);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_COMBOBOX);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_RADIOBUTTON);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_GROUPBOX);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_FIXEDTEXT);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_COMMANDBUTTON);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_CHECKBOX);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_IMAGEBUTTON);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_FILECONTROL);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_TIMEFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_DATEFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_NUMERICFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_CURRENCYFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_PATTERNFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_FORMATTEDFIELD);
+DECLARE_CONSTASCII_USTRING(VCL_CONTROLMODEL_IMAGECONTROL);
+
+DECLARE_CONSTASCII_USTRING(AWT_CONTROL_TEXTFIELD);
+
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_FORM);
+
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_EDIT); // alter service name (5.0)
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_TEXTFIELD);
+
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_LISTBOX);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_COMBOBOX);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_RADIOBUTTON);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_GROUPBOX);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_FIXEDTEXT);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_COMMANDBUTTON);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_CHECKBOX);
+
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_GRID); // alter service name (5.0)
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_GRIDCONTROL);
+
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_IMAGEBUTTON);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_FILECONTROL);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_TIMEFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_DATEFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_NUMERICFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_CURRENCYFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_PATTERNFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_FORMATTEDFIELD);
+
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_HIDDEN); // alter service name (5.0)
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_HIDDENCONTROL);
+
+DECLARE_CONSTASCII_USTRING(FM_COMPONENT_IMAGECONTROL);
+
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_LISTBOX);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_RADIOBUTTON);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_COMBOBOX);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_GROUPBOX);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_CHECKBOX);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_FIXEDTEXT);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_COMMANDBUTTON);
+
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_GRID);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_GRIDCONTROL);
+
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_IMAGEBUTTON);
+
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_EDIT); // alt
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_TEXTFIELD);
+
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_TIMEFIELD);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_DATEFIELD);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_NUMERICFIELD);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_CURRENCYFIELD);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_PATTERNFIELD);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_FILECONTROL);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_IMAGECONTROL);
+DECLARE_CONSTASCII_USTRING(FM_CONTROL_FORMATTEDFIELD);
+
+DECLARE_CONSTASCII_USTRING(FM_FORM_CONTROLLER);
+DECLARE_CONSTASCII_USTRING(SRV_SDB_ROWSET);
+DECLARE_CONSTASCII_USTRING(SRV_SDB_CONNECTION);
+DECLARE_CONSTASCII_USTRING(SRV_SDBC_STATEMENT);
+DECLARE_CONSTASCII_USTRING(SRV_SDB_DATABASE_ENVIRONMENT);
+DECLARE_CONSTASCII_USTRING(SRV_SDB_DATABASE_ACCESS_CONNECTION);
+DECLARE_CONSTASCII_USTRING(SRV_SDB_DATABASE_ACCESS_CONTEXT);
+
+
+
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORM);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_TEXTFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_LISTBOX);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMBOBOX);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_RADIOBUTTON);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_GROUPBOX);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FIXEDTEXT);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMMANDBUTTON);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_CHECKBOX);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_GRIDCONTROL);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGEBUTTON);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FILECONTROL);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_TIMEFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_DATEFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_NUMERICFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_CURRENCYFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_PATTERNFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_HIDDENCONTROL);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGECONTROL);
+DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORMATTEDFIELD);
+
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_TEXTFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_LISTBOX);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_COMBOBOX);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_RADIOBUTTON);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_GROUPBOX);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_FIXEDTEXT);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_COMMANDBUTTON);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_CHECKBOX);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_GRIDCONTROL);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_IMAGEBUTTON);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_TIMEFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_DATEFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_NUMERICFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_CURRENCYFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_PATTERNFIELD);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_IMAGECONTROL);
+DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_FORMATTEDFIELD);
+
+// alle Reflections
+// Components
+//Reflection* FmXDatabaseForm_getReflection();
+//Reflection* FmXGridControlModel_getReflection();
+//Reflection * FmXEditModel_getReflection();
+//Reflection* FmXTextModel_getReflection();
+//Reflection* FmXCheckBoxModel_getReflection();
+//Reflection* FmXRadioButtonModel_getReflection();
+//Reflection* FmXImageButtonModel_getReflection();
+//Reflection* FmXComboBoxModel_getReflection();
+//Reflection* FmXGroupBoxModel_getReflection();
+//Reflection* FmXButtonModel_getReflection();
+//Reflection* FmXListBoxModel_getReflection();
+//Reflection* FmXFileControlModel_getReflection();
+//Reflection* FmXDateModel_getReflection();
+//Reflection* FmXTimeModel_getReflection();
+//Reflection* FmXNumericModel_getReflection();
+//Reflection* FmXCurrencyModel_getReflection();
+//Reflection* FmXPatternModel_getReflection();
+//Reflection* FmXHiddenModel_getReflection();
+//Reflection* FmXImageControlModel_getReflection();
+
+// Controls
+//Reflection* FmXGridControl_getReflection();
+//Reflection * FmXEditControl_getReflection();
+//Reflection* FmXImageButtonControl_getReflection();
+//Reflection* FmXRadioButtonControl_getReflection();
+//Reflection* FmXComboBoxControl_getReflection();
+//Reflection* FmXCheckBoxControl_getReflection();
+//Reflection* FmXGroupBoxControl_getReflection();
+//Reflection* FmXButtonControl_getReflection();
+//Reflection* FmXListBoxControl_getReflection();
+//Reflection* FmXDateControl_getReflection();
+//Reflection* FmXTimeControl_getReflection();
+//Reflection* FmXNumericControl_getReflection();
+//Reflection* FmXCurrencyControl_getReflection();
+//Reflection* FmXPatternControl_getReflection();
+//Reflection* FmXFileControlControl_getReflection();
+//Reflection* FmXImageControlControl_getReflection();
+
+// Peers
+// Reflection* FmXGridPeer_getReflection();
+
+// other internal objects
+// Reflection* FmXFilterControl_getReflection();
+// Reflection* FmXFilterCell_getReflection();
+
+void ImplSmartRegisterUnoServices();
+
+
+
+#endif // _SVX_FMSERVS_HXX
+
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
new file mode 100644
index 0000000000..f12e7ba7ee
--- /dev/null
+++ b/svx/source/inc/fmshimp.hxx
@@ -0,0 +1,801 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmshimp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMSHIMP_HXX
+#define _SVX_FMSHIMP_HXX
+
+#ifndef _COM_SUN_STAR_SDBC_XROWSETLISTENER_HPP_
+#include <com/sun/star/sdbc/XRowSetListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSER_HPP_
+#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
+#include <com/sun/star/frame/XStatusListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_CONTAINEREVENT_HPP_
+#include <com/sun/star/container/ContainerEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
+#include <com/sun/star/container/XContainerListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROL_HPP_
+#include <com/sun/star/awt/XControl.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XMODIFYLISTENER_HPP_
+#include <com/sun/star/util/XModifyListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
+#include <com/sun/star/form/XForm.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLER_HPP_
+#include <com/sun/star/form/XFormController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCOMPONENT_HPP_
+#include <com/sun/star/form/XFormComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_NAVIGATIONBARMODE_HPP_
+#include <com/sun/star/form/NavigationBarMode.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_VIEW_XSELECTIONCHANGELISTENER_HPP_
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_
+#include <com/sun/star/beans/XFastPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+
+#ifndef _SV_TIMER_HXX //autogen
+#include <vcl/timer.hxx>
+#endif
+
+#ifndef _SFXAPP_HXX //autogen wg. SFX_APP
+#include <sfx2/app.hxx>
+#endif
+
+#ifndef _SVDMARK_HXX
+#include "svdmark.hxx"
+#endif
+
+#ifndef _SVX_SVXIDS_HRC
+#include "svxids.hrc"
+#endif
+
+#ifndef _SVARRAY_HXX //autogen
+#include <svtools/svarray.hxx>
+#endif
+
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+
+#define _SVSTDARR_BOOLS
+#define _SVSTDARR_BYTES
+#define _SVSTDARR_LONGS
+#define _SVSTDARR_ULONGS
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+
+#ifndef _SFXMNUITEM_HXX //autogen
+#include <sfx2/mnuitem.hxx>
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+
+#ifndef _FMSEARCH_HXX
+#include "fmsearch.hxx"
+#endif
+
+#ifndef _FMSRCCF_HXX_
+#include "fmsrccfg.hxx"
+#endif
+
+#include <osl/mutex.hxx>
+
+#ifndef _VOS_THREAD_HXX_ //autogen
+#include <vos/thread.hxx>
+#endif
+
+#ifndef _SFXCANCEL_HXX //autogen
+#include <svtools/cancel.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen wg. DBG_WARNING
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _CPPUHELPER_COMPONENT_HXX_
+#include <cppuhelper/component.hxx>
+#endif
+#ifndef _UTL_STLTYPES_HXX_
+#include "unotools/stl_types.hxx"
+#endif
+#ifndef _UTL_CONTAINER_HXX_
+#include "unotools/container.hxx"
+#endif
+#ifndef _FM_IMPLEMENTATION_IDS_HXX_
+#include "fmimplids.hxx"
+#endif
+
+
+SV_DECL_PTRARR(SdrObjArray, SdrObject*, 32, 16);
+// SV_DECL_OBJARR(FmFormArray, ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>, 32, 16);
+DECLARE_STL_VECTOR( ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > ,FmFormArray);
+
+// catch databse exceptions if occur
+#define DO_SAFE(statement) try { statement; } catch(...) { DBG_WARNING("unhandled exception (I tried to move a cursor (or something like that).)"); }
+
+#define GA_DISABLE_SYNC 1
+#define GA_FORCE_SYNC 2
+#define GA_ENABLE_SYNC 3
+#define GA_SYNC_MASK 3
+#define GA_DISABLE_ROCTRLR 4
+#define GA_ENABLE_ROCTRLR 8
+
+//==============================================================================
+// FmFormNavigationDispatcher - a dispatcher responsible for a form navigation slot
+//==============================================================================
+
+class FmFormNavigationDispatcher : public FmSlotDispatch
+{
+ ::com::sun::star::frame::FeatureStateEvent m_aNonActiveState; // the state to report to the listeners if we're inactive
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> m_xCursor; // the cursor we're responsible for
+ sal_Bool m_bActive; // forward the StateChanged as statusChanged to our listeners ?
+ UniString m_sAccessPath; // the access path of m_xCursor (redundant but more performant)
+
+public:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> getForm() const { return m_xCursor; }
+ UniString getFormAccessPath() const { return m_sAccessPath; }
+
+public:
+ FmFormNavigationDispatcher(const ::com::sun::star::util::URL& _rUrl, sal_Int16 _nSlotId, SfxBindings& _rBindings, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm, const UniString& _rAccessPath);
+
+ void SetActive(sal_Bool bEnable);
+ sal_Bool IsActive() const { return m_bActive; }
+
+ // set a specific state which will be broadcasted to the listeners (no matter if we are active or not)
+ void SetStatus(SfxItemState eState, const SfxPoolItem* pState);
+
+ // XComponent
+ virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+
+protected:
+ // SfxControllerItem
+ virtual void StateChanged(sal_Int16 nSID, SfxItemState eState, const SfxPoolItem* pState);
+
+ virtual void NotifyState(SfxItemState eState, const SfxPoolItem* pState, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>& rListener = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>());
+};
+
+//==============================================================================
+// a class iterating through all fields of a form which are bound to a field
+// sub forms are ignored, grid columns (where the grid is a direct child of the form) are included
+class FmXBoundFormFieldIterator : public ::utl::IndexAccessIterator
+{
+public:
+ FmXBoundFormFieldIterator(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rStartingPoint) : ::utl::IndexAccessIterator(_rStartingPoint) { }
+
+protected:
+ virtual sal_Bool ShouldHandleElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rElement);
+ virtual sal_Bool ShouldStepInto(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rContainer) const;
+};
+
+//========================================================================
+// I would prefer this to be a struct local to FmXFormShell but unfortunately local structs/classes
+// are somewhat difficult with some of our compilers
+class FmCursorActionThread;
+struct CursorActionDescription
+{
+ FmCursorActionThread* pThread;
+ sal_uInt32 nFinishedEvent;
+ // we want to do the cleanup of the thread in the main thread so we post an event to ourself
+ sal_Bool bCanceling;
+ // this thread is being canceled
+
+ CursorActionDescription() : pThread(NULL), nFinishedEvent(0), bCanceling(sal_False) { }
+};
+
+//========================================================================
+class SfxViewFrame;
+class FmXFormShell : public ::com::sun::star::sdbc::XRowSetListener,
+ public ::com::sun::star::beans::XPropertyChangeListener,
+ public ::com::sun::star::util::XModifyListener,
+ public ::com::sun::star::container::XContainerListener,
+ public ::com::sun::star::view::XSelectionChangeListener,
+ public ::com::sun::star::form::XFormControllerListener,
+ public ::cppu::OComponentHelper,
+ public FmDispatchInterceptor
+ // public ::cppu::OWeakObject
+{
+ friend class FmFormShell;
+ friend class FmFormView;
+
+ // Timer um verzoegerte Markierung vorzunehmen
+ Timer m_aMarkTimer;
+ SdrObjArray m_arrSearchedControls;
+ // We enable a permanent cursor for the grid we found a searched text, it's disabled in the next "found" event.
+ FmFormArray m_arrSearchContexts;
+
+ // Liste der markierten Object, dient zur Restauration beim Umschalten von Alive in DesignMode
+ SdrMarkList m_aMark;
+
+ // some typedefs :
+ // all dispatchers belonging to a form
+ DECLARE_STL_VECTOR(FmFormNavigationDispatcher*, SingleFormDispatchers);
+
+ // a map from a form access path (like "1/4/2") to the dispatchers array for this form
+ DECLARE_STL_USTRINGACCESS_MAP(SingleFormDispatchers, FormsDispatchers);
+ FormsDispatchers m_aNavigationDispatcher;
+
+ FmSearchConfigAdmin m_aConfigDummy;
+ // das sorgt dafuer, das das SearchConfigItem (ein singleton) aufgeraeumt wird, sobald die letzte FormShell
+ // geschlossen wird. Benutzt man keine Suche, dann wird auch kein ConfigItem angezogen (so schlau ist der
+ // ConfigAdmin schon ;)), so dass dieses Member hier nicht weiter stoert
+
+ ::form::OImplementationIdsRef m_aHoldImplIdHelper;
+
+ SvUShorts m_arrInvalidSlots;
+ SvBytes m_arrInvalidSlots_Flags;
+ // we explicitly switch off the propbrw before leaving the design mode
+ // this flag tells us if we have to switch it on again when reentering
+
+ DECLARE_STL_USTRINGACCESS_MAP(CursorActionDescription, CursorActions);
+ CursorActions m_aCursorActions;
+ // all actions on async cursors
+
+ SvBools m_aControlLocks;
+ // while doing a async cursor action we have to lock all controls of the active controller.
+ // m_aControlLocks remembers the previous lock states to be restored afterwards.
+ ::osl::Mutex m_aAsyncSafety;
+ // secure the access to our thread related members
+ ::osl::Mutex m_aInvalidationSafety;
+ // secure the access to all our slot invalidation related members
+
+ ::com::sun::star::form::NavigationBarMode m_eNavigate; // Art der Navigation
+
+ // da ich beim Suchen fuer die Behandlung des "gefunden" ein SdrObject markieren will, besorge ich mir vor dem
+ // Hochreissen des Suchen-Dialoges alle relevanten Objekte
+ // (das Array ist damit auch nur waehrend des Suchvorganges gueltig)
+ SvLongs m_arrRelativeGridColumn;
+
+ ::osl::Mutex m_aMutex;
+ sal_uInt32 m_nInvalidationEvent;
+
+ FmFormShell* m_pShell;
+
+ // aktuelle Form, Controller
+ // nur im alive mode verfuegbar
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> m_xActiveController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> m_xNavigationController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> m_xActiveForm;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer> m_xParser;
+
+ // Aktueller container einer Page
+ // nur im designmode verfuegbar
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> m_xForms;
+
+ // aktuell selektiertes Object (Form oder Control)
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xSelObject;
+
+ // aktuelles Control, keine Form
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xCurControl;
+
+ // aktuelle Form
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> m_xCurForm;
+
+
+ // und das ist ebenfalls fuer's 'gefunden' : Beim Finden in GridControls brauche ich die Spalte, bekomme aber
+ // nur die Nummer des Feldes, die entspricht der Nummer der Spalte + <offset>, wobei der Offset von der Position
+ // des GridControls im Formular abhaengt. Also hier eine Umrechnung.
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> m_aLastGridFound;
+ // we want to be a DispatchInterceptor within our frame
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame> m_xAttachedFrame;
+ // Administration of external form views (see the SID_FM_VIEW_AS_GRID-slot)
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController> m_xExternalViewController; // the controller for the external form view
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController> m_xExtViewTriggerController; // the nav controller at the time the external display was triggered
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> m_xExternalDisplayedForm; // the form which the external view is based on
+
+ FmXDispatchInterceptorImpl* m_pMainFrameInterceptor;
+ FmXDispatchInterceptorImpl* m_pExternalViewInterceptor;
+
+ sal_Int16 m_nLockSlotInvalidation;
+ sal_Bool m_bHadPropBrw:1;
+
+ sal_Bool m_bUseWizards : 1;
+
+ sal_Bool m_bTrackProperties : 1;
+ // soll ich (bzw. der Owner diese Impl-Klasse) mich um die Aktualisierung des ::com::sun::star::beans::Property-Browsers kuemmern ?
+
+ sal_Bool m_bActiveModified : 1; // Controller modifiziert
+ sal_Bool m_bDatabaseBar : 1; // Gibt es eine Datenbankleiste
+ sal_Bool m_bInActivate : 1; // Wird ein Controller aktiviert
+ sal_Bool m_bSetFocus : 1; // Darf der Focus umgesetzt werden
+ sal_Bool m_bFilterMode : 1; // Wird gerade ein Filter auf die Controls angesetzt
+ sal_Bool m_bChangingDesignMode:1; // sal_True within SetDesignMode
+
+public:
+ FmXFormShell(FmFormShell* _pShell, SfxViewFrame* _pViewFrame);
+ ~FmXFormShell();
+
+ // UNO Anbindung
+ DECLARE_UNO3_DEFAULTS(FmXFormShell, OComponentHelper);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) 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::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+
+// EventListener
+ 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& rEvent);
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent);
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent);
+
+// XSelectionChangeListener
+ virtual void SAL_CALL selectionChanged(const ::com::sun::star::lang::EventObject& rEvent);
+
+// ::com::sun::star::beans::XPropertyChangeListener
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt);
+
+// ::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::util::XModifyListener -> modify setzen
+ virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& Source);
+
+// ::com::sun::star::frame::XDispatchProviderInterceptor
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> interceptedQueryDispatch(sal_uInt16 _nId,
+ const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::osl::Mutex* getInterceptorMutex() { return &m_aAsyncSafety; }
+
+// ::com::sun::star::form::XFormControllerListener
+ virtual void SAL_CALL formActivated(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL formDeactivated(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+// OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ void EnableTrackProperties( sal_Bool bEnable) { m_bTrackProperties = bEnable; }
+ sal_Bool IsTrackPropertiesEnabled() {return m_bTrackProperties;}
+
+protected:
+ void ResetForms(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xForms = ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>(), sal_Bool bInvalidate = sal_False);
+ void AddElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element);
+ void RemoveElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element);
+
+ void startListening();
+ void stopListening();
+
+ void ExecuteSearch(); // execute SID_FM_SEARCH
+
+ void CreateExternalView(); // execute SID_FM_VIEW_AS_GRID
+
+ sal_Bool GetY2KState(sal_uInt16& n);
+ void SetY2KState(sal_uInt16 n);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> GetBoundField(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& _xControl, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& _xForm) const;
+
+ void ObjectRemovedInAliveMode(const SdrObject* pObject);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> GetControlFromModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& xModel);
+ // liefert das Control, welches das angegebene Model hat
+ void CollectFormContexts(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xStartingPoint, const UniString& strCurrentLevelPrefix, UniString& strNames);
+ // sammelt in strNames die Namen aller Formulare, fuegt die entsprechenden XFormRefs in m_arrSearchContexts ein
+
+ static sal_Bool CanMoveRight(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xControllerModel);
+ static sal_Bool CanMoveLeft(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xControllerModel);
+ static sal_Bool SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>& _xCursor, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xSet, sal_Bool& _rRecordInserted);
+ static sal_Bool MoveRight(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>& _xCursor);
+ static sal_Bool MoveLeft(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>& _xCursor);
+
+public:
+ static sal_Bool CanMoveRight(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController);
+ static sal_Bool CanMoveLeft(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController);
+ static sal_Bool MoveRight(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController);
+ static sal_Bool MoveLeft(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController);
+ static sal_Bool CommitCurrent(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController);
+ static sal_Bool IsModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController);
+ static void ResetCurrent(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController);
+ void ResetAll(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& _xForm);
+ static sal_Bool SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController, sal_Bool bCommit = sal_True);
+
+ // methode fuer nicht designmode (alive mode)
+ void setActiveController(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController = ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>());
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& getActiveController() const {return m_xActiveController;}
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& getActiveInternalController() const { return m_xActiveController == m_xExternalViewController ? m_xExtViewTriggerController : m_xActiveController; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& getActiveForm() const {return m_xActiveForm;}
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& getNavController() const {return m_xNavigationController;}
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLQueryComposer> getParser() const { return m_xParser; }
+
+ // nur im design mode verwenden, aktuell selektiertes Formular oder Control
+ void setCurForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& xF);
+ void setCurControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xObj);
+ void setCurControl(const SdrMarkList& rMarkList);
+ void setSelObject(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xObj);
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& getCurForm() const {return m_xCurForm;}
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& getCurControl() const {return m_xCurControl;}
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& getSelObject() const {return m_xSelObject;}
+
+ sal_Bool hasForms() const {return m_xForms.is() && m_xForms->getCount() != 0;}
+ sal_Bool isActiveModified() const {return m_bActiveModified;}
+ sal_Bool hasDatabaseBar() const {return m_bDatabaseBar;}
+ sal_Bool canNavigate() const {return m_xNavigationController.is();}
+ sal_Bool isParsable() const {return m_xParser.is() && m_xParser->getQuery().len();}
+ sal_Bool hasFilter() const { return isParsable() &&
+ (m_xParser->getFilter().len() || m_xParser->getOrder().len()); }
+
+ void ShowProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& rxObject, sal_Bool bShow=sal_True );
+ sal_Bool IsPropBrwOpen() const;
+
+ void DetermineSelection(const SdrMarkList& rMarkList);
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> DetermineCurForm(const SdrMarkList& rMarkList, sal_Bool&);
+ void SetSelection(const SdrMarkList& rMarkList);
+ void SetSelectionDelayed(FmFormView* pView);
+
+ void SaveMarkList(const FmFormView* pView);
+ void RestoreMarkList(FmFormView* pView);
+
+ void SetDesignMode(sal_Bool bDesign);
+
+ sal_Bool GetWizardUsing() const { return m_bUseWizards; }
+ void SetWizardUsing(sal_Bool bUseThem);
+
+ // Setzen des Filtermodus
+ sal_Bool isInFilterMode() const {return m_bFilterMode;}
+ void startFiltering();
+ void stopFiltering(sal_Bool bSave);
+ void clearFilter();
+
+ static PopupMenu* GetConversionMenu();
+ // ein Menue, das alle ControlConversion-Eintraege enthaelt
+ sal_Bool ConvertControlTo(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>& xModel, sal_uInt16 nTargetObjectId);
+ // umwandeln eines Controls
+ static sal_Bool IsControlConversionSlot(sal_uInt16 nSlotId);
+ // ein gueltiger ControlConversionSlot
+ static sal_Bool IsConversionPossible(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xContext, sal_Int16 nConversionSlot);
+ // Konvertierung der Komponente mit geg. Slot moeglich
+ static void CheckControlConversionSlots(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xContext, Menu& rMenu);
+ // iteriertes IsConversionPossible
+ sal_Bool ExecuteControlConversionSlot(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>& xContext, sal_uInt16 nSlotId);
+ // verkapptes ConvertControlTo
+
+private:
+ static sal_Bool SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate>& xCursor,
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xSet,
+ sal_Bool& rRecordInserted);
+
+
+ DECL_LINK(OnFoundData, FmFoundRecordInformation*);
+ DECL_LINK(OnCanceledNotFound, FmFoundRecordInformation*);
+ DECL_LINK(OnSearchContextRequest, FmSearchContext*);
+ DECL_LINK(OnTimeOut, void*);
+
+ class ObjectRemoveListener : public SfxListener
+ {
+ FmXFormShell* m_pParent;
+ public:
+ ObjectRemoveListener(FmXFormShell* pParent);
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
+ };
+ ObjectRemoveListener* m_pCheckForRemoval;
+ friend class ObjectRemoveListener;
+
+ void LoopGrids(sal_Int16 nWhat);
+
+ // das Setzen des curObject/selObject/curForm erfolgt verzoegert (SetSelectionDelayed), mit den folgenden
+ // Funktionen laesst sich das abfragen/erzwingen
+ inline sal_Bool IsSelectionUpdatePending();
+ void ForceUpdateSelection(sal_Bool bLockInvalidation);
+
+ // Invalidierung von Slots
+ void InvalidateSlot(sal_Int16 nId, sal_Bool bWithItem = sal_True, sal_Bool bWithId = sal_False);
+ // Locking der Invalidierung - wenn der interne Locking-Counter auf 0 geht, werden alle aufgelaufenen Slots
+ // (asynchron) invalidiert
+ void LockSlotInvalidation(sal_Bool bLock);
+
+ DECL_LINK(OnInvalidateSlots, void*);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> getInternalForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& _xForm) const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> getInternalForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm) const;
+ // if the form belongs to the controller (extern) displaying a grid, the according internal form will
+ // be displayed, _xForm else
+
+ void CloseExternalFormViewer();
+ // closes the task-local beamer displaying a grid view for a form
+
+ // ---------------------------------------------------
+ // asyncronous cursor actions/navigation slot handling
+
+ void ActivateDispatchers(const UniString& sNavFormAccess, sal_Bool bActivate);
+ // (de)activate all dispatchers belonging to the form with the given access path
+ DECL_LINK(OnExecuteNavSlot, FmFormNavigationDispatcher*);
+
+ UniString GetAccessPathFromForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm, const UniString& rAssumedPagePrefix = UniString()) const;
+ // return the access path of the given form (if rAssumedPagePrefix the current page's id is taken as page prefix)
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> GetPageForms(const UniString sPageId) const;
+ // return the forms collection of the page with the given id
+ UniString GetPageId(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm) const;
+ // get the id of the page to which's forms collection _xForms belongs
+
+ sal_Bool PathsInterfere(const UniString& _rPathLeft, const UniString& _rPathRight) const;
+
+ void UpdateFormDispatcher(FmFormNavigationDispatcher* _pDisp);
+ void UpdateAllFormDispatchers(const UniString& _rPath);
+
+ void setControlLocks(); // lock all controls of the active controller
+ void restoreControlLocks(); // restore the lock state of all controls of the active controller
+
+ enum CURSOR_ACTION { CA_MOVE_TO_LAST, CA_MOVE_ABSOLUTE };
+ void DoAsyncCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController, CURSOR_ACTION _eWhat);
+ void DoAsyncCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm, CURSOR_ACTION _eWhat);
+
+ sal_Bool HasAnyPendingCursorAction() const;
+ void CancelAnyPendingCursorAction();
+
+ sal_Bool HasPendingCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& _xController) const;
+ sal_Bool HasPendingCursorAction(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xForm) const;
+ sal_Bool HasPendingCursorAction(const UniString& _rAccessPath) const;
+
+ DECL_LINK(OnCursorActionDone, FmCursorActionThread*);
+ DECL_LINK(OnCursorActionDoneMainThread, FmCursorActionThread*);
+};
+
+//------------------------------------------------------------------------------
+inline sal_Bool FmXFormShell::IsSelectionUpdatePending()
+{
+ return m_aMarkTimer.IsActive();
+}
+
+// ========================================================================
+// = ein Iterator, der ausgehend von einem Interface ein Objekt sucht, dessen
+// = ::com::sun::star::beans::Property-Set eine ControlSource- sowie eine BoundField-Eigenschaft hat,
+// = wobei letztere einen Wert ungleich NULL haben muss.
+// = Wenn das Interface selber diese Bedingung nicht erfuellt, wird getestet,
+// = ob es ein Container ist (also ueber eine ::com::sun::star::container::XIndexAccess verfuegt), dann
+// = wird dort abgestiegen und fuer jedes Element des Containers das selbe
+// = versucht (wiederum eventuell mit Abstieg).
+// = Wenn irgendein Objekt dabei die geforderte Eigenschaft hat, entfaellt
+// = der Teil mit dem Container-Test fuer dieses Objekt.
+// =
+
+class SearchableControlIterator : public ::utl::IndexAccessIterator
+{
+ ::rtl::OUString m_sCurrentValue;
+ // der aktuelle Wert der ControlSource-::com::sun::star::beans::Property
+
+public:
+ ::rtl::OUString getCurrentValue() const { return m_sCurrentValue; }
+
+public:
+ SearchableControlIterator(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xStartingPoint);
+
+ virtual sal_Bool ShouldHandleElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& rElement);
+ virtual sal_Bool ShouldStepInto(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xContainer) const;
+ virtual void Invalidate() { IndexAccessIterator::Invalidate(); m_sCurrentValue = ::rtl::OUString(); }
+};
+
+// ========================================================================
+SV_DECL_PTRARR_DEL(StatusForwarderArray, SfxStatusForwarder*, 16, 0)
+class ControlConversionMenuController : public SfxMenuControl
+{
+protected:
+ StatusForwarderArray m_aStatusForwarders;
+ Menu* m_pMainMenu;
+ PopupMenu* m_pConversionMenu;
+
+public:
+ ControlConversionMenuController(sal_uInt16 nId, Menu& rMenu, SfxBindings& rBindings);
+ virtual ~ControlConversionMenuController();
+ SFX_DECL_MENU_CONTROL();
+
+ virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState);
+};
+
+//==================================================================
+// FmCursorActionThread
+//==================================================================
+
+class FmCursorActionThread : public ::vos::OThread
+{
+ Link m_aTerminationHandler; // the handler to be called upon termination
+ ::com::sun::star::sdbc::SQLException m_aRunException; // the database exception thrown by RunImpl
+ ::osl::Mutex m_aAccessSafety; // for securing the multi-thread access
+ ::osl::Mutex m_aFinalExitControl; // see StopItWait
+
+protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> m_xDataSource; // the cursor which we work with
+ UniString m_sAccessPath;
+
+private:
+
+ UniString m_sStopperCaption; // the caption for the ThreadStopper
+ sal_Bool m_bCanceled:1; // StopIt has been called ?
+ sal_Bool m_bDeleteMyself:1; // delete the thread upon termination (defaults to sal_False) ?
+ sal_Bool m_bDisposeCursor:1; // dispose the cursor upon termination (defaults to sal_False) ?
+ sal_Bool m_bTerminated:1; // onTerminated already called ?
+ sal_Bool m_bRunFailed:1; // a database execption occured in RunImpl ?
+
+ // a ThreadStopper will be instantiated so that the open can be canceled via the UI
+ class ThreadStopper : protected SfxCancellable
+ {
+ FmCursorActionThread* m_pOwner;
+
+ virtual ~ThreadStopper() { }
+
+ public:
+ ThreadStopper(FmCursorActionThread* pOwner, const UniString& rTitle);
+
+ virtual void Cancel();
+
+ virtual void OwnerTerminated();
+ // Normally the Owner (a FmCursorActionThread) would delete the stopper when terminated.
+ // Unfortunally the application doesn't remove the 'red light' when a SfxCancellable is deleted
+ // if it (the app) can't acquire the solar mutex. The deletion is IGNORED then. So we have make
+ // sure that a) the stopper is deleted from inside the main thread (where the solar mutex is locked)
+ // and b) that in the time between the termination of the thread and the deletion of the stopper
+ // the latter doesn't access the former.
+ // The OwnerTerminated cares for both aspects.
+ // SO DON'T DELETE THE STOPPER EXPLICITLY !
+
+ protected:
+ // HACK HACK HACK HACK HACK : this should be private, but MSVC doesn't accept the LINK-macro then ....
+ DECL_LINK(OnDeleteInMainThread, ThreadStopper*);
+ };
+ friend class FmCursorActionThread::ThreadStopper;
+
+
+public:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> getDataSource() const { return m_xDataSource; }
+ UniString getAccessPath() const { return m_sAccessPath; }
+
+private:
+ sal_Bool Terminated() { ::osl::MutexGuard aGuard(m_aAccessSafety); return m_bTerminated; }
+
+public:
+ FmCursorActionThread(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xDataSource, const UniString& _rStopperCaption, const UniString& _rPath);
+ virtual ~FmCursorActionThread() {}
+
+ // control of self-deletion
+ sal_Bool IsSelfDeleteEnabled() { ::osl::MutexGuard aGuard(m_aAccessSafety); return m_bDeleteMyself; }
+ void EnableSelfDelete(sal_Bool bEnable) { ::osl::MutexGuard aGuard(m_aAccessSafety); m_bDeleteMyself = bEnable; }
+
+ // control of cursor-dipose
+ sal_Bool IsCursorDisposeEnabled() { ::osl::MutexGuard aGuard(m_aAccessSafety); return m_bDisposeCursor; }
+ void EnableCursorDispose(sal_Bool bEnable) { ::osl::MutexGuard aGuard(m_aAccessSafety); m_bDisposeCursor = bEnable; }
+
+ // error-access
+ sal_Bool RunFailed() { ::osl::MutexGuard aGuard(m_aAccessSafety); return m_bRunFailed; }
+ ::com::sun::star::sdbc::SQLException GetRunException() { ::osl::MutexGuard aGuard(m_aAccessSafety); return m_aRunException; }
+
+ /// the excution (within the method "run") was canceled ?
+ sal_Bool WasCanceled(sal_Bool bEnable) { ::osl::MutexGuard aGuard(m_aAccessSafety); return m_bCanceled; }
+
+ /// the handler will be called synchronously (the parameter is a pointer to the thread)
+ void SetTerminationHdl(const Link& aTermHdl) { ::osl::MutexGuard aGuard(m_aAccessSafety); m_aTerminationHandler = aTermHdl; }
+
+ /// cancels the process. returns to the caller immediately. to be called from another thread (of course ;)
+ void StopIt();
+
+ /// cancels the process. does not return to the caller until the thread is terminated.
+ void StopItWait();
+
+protected:
+ virtual void SAL_CALL run();
+ virtual void SAL_CALL onTerminated();
+
+ /// called from within run. run itself handles (de)initialisation of the cancel handling.
+ virtual void RunImpl() = 0;
+};
+
+//------------------------------------------------------------------------------
+
+#define DECL_CURSOR_ACTION_THREAD(classname) \
+ \
+class classname : public FmCursorActionThread \
+{ \
+public: \
+ classname(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xDataSource, \
+ const UniString& _rPath); \
+protected: \
+ virtual void RunImpl(); \
+}; \
+
+
+//------------------------------------------------------------------------------
+
+#define IMPL_CURSOR_ACTION_THREAD(classname, caption, action) \
+ \
+classname::classname(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xDataSource, \
+ const UniString& _rPath) \
+ :FmCursorActionThread(_xDataSource, caption, _rPath) \
+{ \
+} \
+ \
+void classname::RunImpl() \
+{ \
+ m_xDataSource->action; \
+} \
+
+
+
+#endif // _SVX_FMSHIMP_HXX
diff --git a/svx/source/inc/fmsrccfg.hxx b/svx/source/inc/fmsrccfg.hxx
new file mode 100644
index 0000000000..7f36c09c61
--- /dev/null
+++ b/svx/source/inc/fmsrccfg.hxx
@@ -0,0 +1,167 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmsrccfg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _FMSRCCF_HXX_
+#define _FMSRCCF_HXX_
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+
+#ifndef _SFXCFGITEM_HXX //autogen
+#include <sfx2/cfgitem.hxx>
+#endif
+
+// ===================================================================================================
+
+#define MATCHING_ANYWHERE 0
+#define MATCHING_BEGINNING 1
+#define MATCHING_END 2
+#define MATCHING_WHOLETEXT 3
+
+// diese Konstanten duerfen NICHT einfach geaendert werden, da der SearchDialog aus den Einstellungen seiner ListBox
+// keine Umrechnungen vornimmt, sondern die einfach in die entsprechenden Methoden der SearchEngine steckt
+// (wenn man also die Konstanten oder die Reihenfolge der Listbox-Eintraege im Dialog aendert, muss das jeweils andere
+// angepasst werden)
+
+
+// ===================================================================================================
+// = struct FmSearchParams - Parameter einer Suche
+// ===================================================================================================
+
+struct FmSearchParams
+{
+public:
+ String strHistory;
+ // der Dialog haelt maximal MAX_HISTORY_ENTRIES Eintraege
+ String strSingleSearchField;
+ INT16 nSearchForType : 2;
+ UINT16 nPosition : 2;
+ INT16 nLevOther;
+ INT16 nLevShorter;
+ INT16 nLevLonger;
+
+ BOOL bAllFields : 1;
+ BOOL bUseFormatter : 1;
+ BOOL bCaseSensitive : 1;
+ BOOL bBackwards : 1;
+ BOOL bWildcard : 1;
+ BOOL bRegular : 1;
+ BOOL bApproxSearch : 1;
+ // die letzten 3 schliessen sich gegenseitig aus !
+ // fuer Levenshtein-Suche :
+ BOOL bLevRelaxed : 1;
+
+public:
+ // Vergleich nur unter Beachtung der persistenten Eigenschaften !
+ BOOL operator ==(const FmSearchParams& rComp) const;
+ BOOL operator !=(const FmSearchParams& rComp) const { return !(*this == rComp); }
+};
+
+// ===================================================================================================
+// = class FmSearchConfigItem - ein ConfigItem, dass sich Suchparameter merkt
+// ===================================================================================================
+
+class FmSearchConfigItem : public SfxConfigItem
+{
+ friend class FmSearchConfigAdmin;
+
+private:
+ FmSearchParams m_aParams;
+
+private:
+ FmSearchConfigItem();
+
+public:
+ virtual int Load(SvStream&);
+ virtual BOOL Store(SvStream&);
+ virtual void UseDefault();
+
+protected:
+ INT32 CalcCheckSum(const FmSearchParams&, short);
+};
+
+// ===================================================================================================
+// = class FmSearchConfigAdmin - verwaltet den Zugriff auf das einzige FmSearchConfigItem, das es gibt
+// ===================================================================================================
+
+class FmSearchConfigAdmin
+{
+private:
+ static FmSearchConfigItem* s_pItem;
+ static INT32 s_nUsageCounter;
+
+public:
+ FmSearchConfigAdmin();
+ ~FmSearchConfigAdmin();
+
+public:
+ FmSearchParams GetParams() const { return GetItem()->m_aParams; }
+ void PutParams(const FmSearchParams& rParams);
+
+protected:
+ FmSearchConfigItem* GetItem() const;
+};
+
+// ===================================================================================================
+
+#endif // _FMSRCCF_HXX_
+
diff --git a/svx/source/inc/fmsrcimp.hxx b/svx/source/inc/fmsrcimp.hxx
new file mode 100644
index 0000000000..1e3aab11b3
--- /dev/null
+++ b/svx/source/inc/fmsrcimp.hxx
@@ -0,0 +1,423 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmsrcimp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _FMSRCIMP_HXX
+#define _FMSRCIMP_HXX
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif // _SVX_FMTOOLS_HXX
+
+#ifndef _VOS_THREAD_HXX_ //autogen
+#include <vos/thread.hxx>
+#endif
+
+#ifndef _OSL_MUTEX_HXX_ //autogen
+#include <osl/mutex.hxx>
+#endif
+
+#ifndef _FMSEARCH_HXX
+#include "fmsearch.hxx"
+#endif // _FMSEARCH_HXX
+
+#ifndef _COM_SUN_STAR_AWT_XTEXTCOMPONENT_HPP_
+#include <com/sun/star/awt/XTextComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCHECKBOX_HPP_
+#include <com/sun/star/awt/XCheckBox.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XLISTBOX_HPP_
+#include <com/sun/star/awt/XListBox.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#endif
+
+#include <unotools/stl_types.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+// ===================================================================================================
+// Hilfsstrukturen
+
+SV_DECL_OBJARR(SvInt32Array, sal_Int32, 16, 16);
+
+// ===================================================================================================
+// = class FmSearchThread - wie der Name schon sagt
+// ===================================================================================================
+
+class FmSearchThread : public ::vos::OThread
+{
+ FmSearchEngine* m_pEngine;
+ Link m_aTerminationHdl;
+
+ virtual void SAL_CALL run();
+ virtual void SAL_CALL onTerminated();
+
+public:
+ FmSearchThread(FmSearchEngine* pEngine) : m_pEngine(pEngine) { }
+ void setTerminationHandler(Link aHdl) { m_aTerminationHdl = aHdl; }
+};
+
+// ===================================================================================================
+// = struct FmSearchProgress - diese Struktur bekommt der Owner der SearchEngine fuer Status-Updates
+// = (und am Ende der Suche)
+// ===================================================================================================
+
+struct FmSearchProgress
+{
+ enum STATE { STATE_PROGRESS, STATE_PROGRESS_COUNTING, STATE_CANCELED, STATE_SUCCESSFULL, STATE_NOTHINGFOUND, STATE_ERROR };
+ // (Bewegung auf neuen Datensatz; Fortschritt beim Zaehlen von Datensaetzen; abgebrochen; Datensatz gefunden;
+ // nichts gefunden, irgendein nicht zu handelnder Fehler)
+ STATE aSearchState;
+
+ // aktueller Datensatz - immer gueltig (ist zum Beispiel bei Abbrechen auch fuer das Weitersuchen interesant)
+ sal_uInt32 nCurrentRecord;
+ // Ueberlauf - nur gueltig bei STATE_PROGRESS
+ sal_Bool bOverflow;
+
+ // die Position des Such-Cursors - bei STATE_SUCCESSFULL, STATE_CANCELED und STATE_NOTHING_FOUND gueltig
+ ::com::sun::star::uno::Any aBookmark;
+ // das Feld, in dem der Text gefunden wurde - bei STATE_SUCCESSFULL gueltig
+ sal_Int32 nFieldIndex;
+};
+
+// ===================================================================================================
+// = class FmRecordCountListener - Hilfsklasse fuer FmSearchEngine, lauscht an einem Cursor und teilt
+// = Aenderungem im RecordCount mit
+// ===================================================================================================
+
+class FmRecordCountListener : public ::cppu::WeakImplHelper1< ::com::sun::star::beans::XPropertyChangeListener>
+{
+// Atribute
+ Link m_lnkWhoWantsToKnow;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xListening;
+
+// Attribut-Zugriff
+public:
+ Link SetPropChangeHandler(const Link& lnk);
+
+// Oprationen
+public:
+ FmRecordCountListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& dbcCursor);
+ // the set has to support the sdb::ResultSet service
+ virtual ~FmRecordCountListener();
+
+ // DECLARE_UNO3_AGG_DEFAULTS(FmPropertyListener, UsrObject);
+ // virtual sal_Bool queryInterface(::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rOut);
+
+// ::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::beans::XPropertyChangeListener
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt);
+
+ void DisConnect();
+
+private:
+ void NotifyCurrentCount();
+
+};
+
+// ===================================================================================================
+// = class FmSearchEngine - Impl-Klasse fuer FmSearchDialog
+// ===================================================================================================
+
+class FmSearchEngine
+{
+ friend class FmSearchThread;
+
+ enum SEARCH_RESULT { SR_FOUND, SR_NOTFOUND, SR_ERROR, SR_CANCELED };
+ enum SEARCHFOR_TYPE { SEARCHFOR_STRING, SEARCHFOR_NULL, SEARCHFOR_NOTNULL };
+
+ // zugrundeliegende Daten
+ CursorWrapper m_xSearchCursor;
+ SvInt32Array m_arrFieldMapping;
+ // da der Iterator durchaus mehr Spalten haben kann, als ich eigentlich verwalte (in meiner Feld-Listbox),
+ // muss ich mir hier ein Mapping dieser ::com::sun::star::form-Schluessel auf die Indizies der entsprechenden Spalten im Iterator halten
+
+ // der Formatter
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > m_xFormatSupplier;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter;
+
+ // die Sammlung aller interesanten Felder (bzw. ihre ::com::sun::star::data::XDatabaseVariant-Interfaces und ihre FormatKeys)
+ struct FieldInfo
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > xContents;
+ sal_uInt32 nFormatKey;
+ sal_Bool bDoubleHandling;
+ };
+
+ DECLARE_STL_VECTOR(FieldInfo, FieldCollection);
+ FieldCollection m_arrUsedFields;
+ sal_Int32 m_nCurrentFieldIndex; // der letzte Parameter von RebuildUsedFields, ermoeglicht mir Checks in FormatField
+
+ // We have three possible control types we may search in, determined by the supported interfaces : ::com::sun::star::awt::XTextComponent, ::com::sun::star::awt::XListBox, ::com::sun::star::awt::XCheckBox.
+ // While searching we don't want to do this distinction for every control in every round. So we need some helpers.
+ class ControlTextWrapper
+ {
+ // attributes
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xControl;
+ // attribute access
+ public:
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getControl() const{ return m_xControl; }
+ public:
+ ControlTextWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xControl) { m_xControl = _xControl; }
+ virtual ~ControlTextWrapper() { }
+
+ virtual ::rtl::OUString getCurrentText() const = 0;
+ };
+ class SimpleTextWrapper : public ControlTextWrapper
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > m_xText;
+ public:
+ SimpleTextWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >& _xText);
+ virtual ::rtl::OUString getCurrentText() const;
+ };
+ class ListBoxWrapper : public ControlTextWrapper
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XListBox > m_xBox;
+ public:
+ ListBoxWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XListBox >& _xBox);
+ virtual ::rtl::OUString getCurrentText() const;
+ };
+ class CheckBoxWrapper : public ControlTextWrapper
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XCheckBox > m_xBox;
+ public:
+ CheckBoxWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XCheckBox >& _xBox);
+ virtual ::rtl::OUString getCurrentText() const;
+ };
+ DECLARE_STL_VECTOR(ControlTextWrapper*, ControlTextSuppliers);
+ ControlTextSuppliers m_aControlTexts;
+
+ sal_Bool m_bUsingTextComponents;
+ CursorWrapper m_xOriginalIterator;
+ CursorWrapper m_xClonedIterator;
+
+ // Daten fuer Entscheidung, in welchem Feld ich ein "Found" akzeptiere
+ ::com::sun::star::uno::Any m_aPreviousLocBookmark; // Position, an der ich zuletzt fuendig war
+ FieldCollectionIterator m_iterPreviousLocField; // dito Feld
+ // Kommunikation mit dem Thread, der die eigentliche Suche durchfuehrt
+ ::rtl::OUString m_strSearchExpression; // Hinrichtung
+ SEARCHFOR_TYPE m_eSearchForType; // dito
+ SEARCH_RESULT m_srResult; // Rueckrichtung
+
+ // der Link, dem ich Fortschritte und Ergebnisse mitteile
+ Link m_aProgressHandler;
+ sal_Bool m_bSearchingCurrently; // laeuft gerade eine (asynchrone) Suche ?
+ sal_Bool m_bCancelAsynchRequest : 1; // soll abgebrochen werden ?
+ ::osl::Mutex m_aCancelAsynchAccess; // Zugriff auf m_bCancelAsynchRequest (eigentlich nur bei
+ // m_eMode == SM_USETHREAD interesant)
+ FmSearchDialog::SEARCH_MODE m_eMode; // der aktuelle Modus
+
+ // Parameter fuer die Suche
+ sal_Bool m_bCase : 1; // case-sensitive
+ sal_Bool m_bFormatter : 1; // Feldformatierung benutzen
+ sal_Bool m_bForward : 1; // Richtung
+ sal_Bool m_bWildcard : 1; // Platzhalter-Suche ?
+ sal_Bool m_bRegular : 1; // regulaerer Ausdruck
+ sal_Bool m_bLevenshtein : 1; // Levenshtein-Suche
+
+ sal_Bool m_bLevRelaxed : 1; // Parameter fuer Levenshtein-Suche
+ sal_uInt16 m_nLevOther;
+ sal_uInt16 m_nLevShorter;
+ sal_uInt16 m_nLevLonger;
+
+ sal_uInt16 m_nPosition; // wenn nicht regulaer oder lev, dann einer der MATCHING_...-Werte
+
+// -------------
+// Memberzugriff
+private:
+ sal_Bool CancelRequested(); // liefert eine durch m_aCancelAsynchAccess gesicherte Auswertung von m_bCancelAsynchRequest
+
+public:
+ void SetCaseSensitive(sal_Bool bSet) { m_bCase = bSet; }
+ sal_Bool GetCaseSensitive() const { return m_bCase; }
+
+ void SetFormatterUsing(sal_Bool bSet); // das ist etwas umfangreicher, deshalb kein hier inline ....
+ sal_Bool GetFormatterUsing() const { return m_bFormatter; }
+
+ void SetDirection(sal_Bool bForward) { m_bForward = bForward; }
+ sal_Bool GetDirection() const { return m_bForward; }
+
+ void SetWildcard(sal_Bool bSet) { m_bWildcard = bSet; }
+ sal_Bool GetWildcard() const { return m_bWildcard; }
+
+ void SetRegular(sal_Bool bSet) { m_bRegular = bSet; }
+ sal_Bool GetRegular() const { return m_bRegular; }
+
+ void SetLevenshtein(sal_Bool bSet) { m_bLevenshtein = bSet; }
+ sal_Bool GetLevenshtein() const { return m_bLevenshtein; }
+
+ void SetLevRelaxed(sal_Bool bSet) { m_bLevRelaxed = bSet; }
+ sal_Bool GetLevRelaxed() const { return m_bLevRelaxed; }
+ void SetLevOther(sal_uInt16 nHowMuch) { m_nLevOther = nHowMuch; }
+ sal_uInt16 GetLevOther() const { return m_nLevOther; }
+ void SetLevShorter(sal_uInt16 nHowMuch) { m_nLevShorter = nHowMuch; }
+ sal_uInt16 GetLevShorter() const { return m_nLevShorter; }
+ void SetLevLonger(sal_uInt16 nHowMuch) { m_nLevLonger = nHowMuch; }
+ sal_uInt16 GetLevLonger() const { return m_nLevLonger; }
+ // die ganzen Lev-Werte werden nur bei m_bLevenshtein==sal_True beachtet
+
+ void SetPosition(sal_uInt16 nValue) { m_nPosition = nValue; }
+ sal_uInt16 GetPosition() const { return m_nPosition; }
+ // Position wird bei m_bWildCard==sal_True nicht beachtet
+
+ sal_Bool GetSearchMode() const { return m_eMode; }
+
+public:
+ /** zwei Constructoren, beide analog zu denen des FmSearchDialog, Erklaerung siehe also dort ....
+ xCursor muss jeweils den ::com::sun::star::data::DatabaseCursor-Service implementieren.
+ wenn eMode == SM_USETHREAD, sollte ein ProgressHandler gesetzt sein, da dann die Ergebnisuebermittlung ueber diesen
+ Handler erfolgt.
+ Ist eMode != SM_USETHREAD, kehren SearchNext und StarOver nicht zurueck, bevor die Suche (erfolgreich oder nicht) beendet
+ wurde, dann kann man das Ergebnis danach abfragen. Ist zusaetzlich der ProgressHandler gesetzt, wird dieser fuer jeden neuen
+ Datensatz sowie am Ende der Suche aufgerufen.
+ */
+ FmSearchEngine(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& xCursor, const ::rtl::OUString& strVisibleFields, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xFormat,
+ FmSearchDialog::SEARCH_MODE eMode);
+ FmSearchEngine(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& xCursor, const ::rtl::OUString& strVisibleFields, const InterfaceArray& arrFields,
+ FmSearchDialog::SEARCH_MODE eMode);
+
+ virtual ~FmSearchEngine();
+
+ /** der Link wird fuer jeden Datensatz und nach Beendigung der Suche aufgerufen, Parameter ist ein Zeiger auf
+ eine FmSearchProgress-Struktur
+ der Handler sollte auf jeden Fall Thread-sicher sein
+ */
+ void SetProgressHandler(Link aHdl) { m_aProgressHandler = aHdl; }
+
+ /// das naechste Vorkommen suchen (Werte fuer nDirection siehe DIRECTION_*-defines)
+ void SearchNext(const ::rtl::OUString& strExpression);
+ /// analogous, search for "NULL" (_bSearchForNull==sal_True) or "not NULL"
+ void SearchNextSpecial(sal_Bool _bSearchForNull);
+ /// das naechste Vorkommen suchen, abhaengig von nDirection wird dabei am Anfang oder am Ende neu begonnen
+ void StartOver(const ::rtl::OUString& strExpression);
+ /// analogous, search for "NULL" (_bSearchForNull==sal_True) or "not NULL"
+ void StartOverSpecial(sal_Bool _bSearchForNull);
+ /// die Angaben ueber letzte Fundstelle invalidieren
+ void InvalidatePreviousLoc();
+
+ /** baut m_arrUsedFields neu auf (nFieldIndex==-1 bedeutet alle Felder, ansonsten gibt es den Feldindex an)
+ wenn bForce nicht gesetzt ist, passiert bei nFieldIndex == m_nCurrentFieldIndex nichts
+ (ruft InvalidatePreviousLoc auf)
+ */
+ void RebuildUsedFields(sal_Int32 nFieldIndex, sal_Bool bForce = sal_False);
+ ::rtl::OUString FormatField(sal_Int32 nWhich);
+
+ /// kehrt sofort zurueck; nachdem wirklich abgebrochen wurde, wird der ProgressHandler mit STATE_CANCELED aufgerufen
+ void CancelSearch();
+
+ /** nur gueltig, wenn nicht gerade eine (asynchrone) Suche laeuft, die naechste Suche wird dann auf dem neuen Iterator
+ mit den neuen Parametern durchgefuehrt
+ */
+ sal_Bool SwitchToContext(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& xCursor, const ::rtl::OUString& strVisibleFields, const InterfaceArray& arrFields,
+ sal_Int32 nFieldIndex);
+
+protected:
+ void Init(const ::rtl::OUString& strVisibleFields);
+
+ void SearchNextImpl();
+ // diese Impl-Methode laeuft im SearchThread
+
+ // start a thread-search (or call SearchNextImpl directly, depending on the search mode)
+ void ImplStartNextSearch();
+
+private:
+ void clearControlTexts();
+ void fillControlTexts(const InterfaceArray& arrFields);
+
+ // three methods implementing a complete search loop (null/not null, wildcard, SearchText)
+ // (they all have some code in common, but with this solution we have do do a distinction only once per search (before
+ // starting the loop), not in every loop step
+ SEARCH_RESULT SearchSpecial(sal_Bool _bSearchForNull, sal_Int32& nFieldPos, FieldCollectionIterator& iterFieldLoop,
+ const FieldCollectionIterator& iterBegin, const FieldCollectionIterator& iterEnd);
+ SEARCH_RESULT SearchWildcard(const ::rtl::OUString& strExpression, sal_Int32& nFieldPos, FieldCollectionIterator& iterFieldLoop,
+ const FieldCollectionIterator& iterBegin, const FieldCollectionIterator& iterEnd);
+ SEARCH_RESULT SearchRegularApprox(const ::rtl::OUString& strExpression, sal_Int32& nFieldPos, FieldCollectionIterator& iterFieldLoop,
+ const FieldCollectionIterator& iterBegin, const FieldCollectionIterator& iterEnd);
+
+ void PropagateProgress(sal_Bool _bDontPropagateOverflow);
+ // ruft den ProgressHandler mit STATE_PROGRESS und der aktuellen Position des SearchIterators auf
+
+ // helpers, die ich mehrmals brauche
+ sal_Bool MoveCursor();
+ // bewegt m_xSearchIterator unter Beachtung von Richtung/Ueberlauf Cursor
+ sal_Bool MoveField(sal_Int32& nPos, FieldCollectionIterator& iter, const FieldCollectionIterator& iterBegin, const FieldCollectionIterator& iterEnd);
+ // bewegt den Iterator unter Beachtung von Richtung/Ueberlauf Iterator/Ueberlauf Cursor
+ void BuildAndInsertFieldInfo(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xAllFields, sal_Int32 nField);
+ // baut eine FieldInfo zum Feld Nummer nField (in xAllFields) auf und fuegt sie zu m_arrUsedFields hinzu
+ // xAllFields muss den DatabaseRecord-Service unterstuetzen
+ ::rtl::OUString FormatField(const FieldInfo& rField);
+ // formatiert das Feld mit dem NumberFormatter
+
+ sal_Bool HasPreviousLoc() { return m_aPreviousLocBookmark.getValue() != NULL; }
+
+ DECL_LINK(OnSearchTerminated, FmSearchThread*);
+ // wird vom SuchThread benutzt, nach Rueckkehr aus diesem Handler loescht sich der Thread selber
+ DECL_LINK(OnNewRecordCount, void*);
+};
+
+#endif // _FMSRCIMP_HXX
+
diff --git a/svx/source/inc/fmstatic.hxx b/svx/source/inc/fmstatic.hxx
new file mode 100644
index 0000000000..1988180b73
--- /dev/null
+++ b/svx/source/inc/fmstatic.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmstatic.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _FM_STATIC_HXX_
+#define _FM_STATIC_HXX_
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+
+struct UStringDescription
+{
+ const sal_Char* pZeroTerminatedName;
+
+ UStringDescription(sal_Char* _pName) { pZeroTerminatedName = _pName; }
+ operator ::rtl::OUString() const { return ::rtl::OUString::createFromAscii(pZeroTerminatedName); }
+ operator UniString() const { return UniString::CreateFromAscii(pZeroTerminatedName); }
+private:
+ UStringDescription();
+};
+
+#define DECLARE_CONSTASCII_USTRING(name) \
+ extern UStringDescription name
+
+#define IMPLEMENT_CONSTASCII_USTRING(name, asciivalue) \
+ UStringDescription name(asciivalue)
+
+//#define DECLARE_CONSTASCII_USTRING(name) extern ::rtl::OUString name;
+//#define IMPLEMENT_CONSTASCII_USTRING(name, asciivalue) ::rtl::OUString name = ::rtl::OUString::createFromAscii(asciivalue)
+
+
+#endif _FM_STATIC_HXX_
+
diff --git a/svx/source/inc/fmtools.hxx b/svx/source/inc/fmtools.hxx
new file mode 100644
index 0000000000..76945ab129
--- /dev/null
+++ b/svx/source/inc/fmtools.hxx
@@ -0,0 +1,959 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmtools.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMTOOLS_HXX
+#define _SVX_FMTOOLS_HXX
+
+#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
+#include <com/sun/star/sdb/SQLContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSERFACTORY_HPP_
+#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_PRIVILEGE_HPP_
+#include <com/sun/star/sdbcx/Privilege.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
+#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_
+#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
+#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XCOLUMN_HPP_
+#include <com/sun/star/sdb/XColumn.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XCOLUMNUPDATE_HPP_
+#include <com/sun/star/sdb/XColumnUpdate.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_SQLERROREVENT_HPP_
+#include <com/sun/star/sdb/SQLErrorEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
+#include <com/sun/star/sdbc/XConnection.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSETUPDATE_HPP_
+#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBCX_XROWLOCATE_HPP_
+#include <com/sun/star/sdbcx/XRowLocate.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTION_HPP_
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTOR_HPP_
+#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_
+#include <com/sun/star/container/XIndexContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
+#include <com/sun/star/frame/XDispatch.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
+#include <com/sun/star/frame/XStatusListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FEATURESTATEEVENT_HPP_
+#include <com/sun/star/frame/FeatureStateEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_SCRIPTEVENTDESCRIPTOR_HPP_
+#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
+#include <com/sun/star/container/XNameAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATION_HPP_
+#include <com/sun/star/container/XEnumeration.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
+#include <com/sun/star/container/XIndexAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROLMODEL_HPP_
+#include <com/sun/star/awt/XControlModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROL_HPP_
+#include <com/sun/star/awt/XControl.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTSLANT_HPP_
+#include <com/sun/star/awt/FontSlant.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
+#include <com/sun/star/awt/FontDescriptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTUNDERLINE_HPP_
+#include <com/sun/star/awt/FontUnderline.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTSTRIKEOUT_HPP_
+#include <com/sun/star/awt/FontStrikeout.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _SV_WINTYPES_HXX //autogen
+#include <vcl/wintypes.hxx>
+#endif
+
+#ifndef _VOS_MUTEX_HXX_ //autogen
+#include <vos/mutex.hxx>
+#endif
+
+#ifndef _SVSTDARR_ULONGS
+#define _SVSTDARR_ULONGS
+#include <svtools/svstdarr.hxx>
+#endif
+
+#ifndef _SFXCTRLITEM_HXX //autogen wg. SfxControllerItem
+#include <sfx2/ctrlitem.hxx>
+#endif
+
+// #ifndef _USR_ITERHLP_HXX //autogen wg. OInterfaceContainerHelper
+// #include <usr/iterhlp.hxx>
+// #endif
+
+#ifndef _LINK_HXX
+#include <tools/link.hxx>
+#endif
+
+#ifndef _DATE_HXX
+#include <tools/date.hxx>
+#endif
+#ifndef _TOOLS_TIME_HXX
+#include <tools/time.hxx>
+#endif
+#ifndef _DATETIME_HXX
+#include <tools/datetime.hxx>
+#endif
+
+#ifndef _SVX_FMPROP_HRC
+#include "fmprop.hrc"
+#endif
+#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
+#include <com/sun/star/io/XObjectInputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_
+#include <com/sun/star/io/XObjectOutputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
+#include <com/sun/star/io/XPersistObject.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATS_HPP_
+#include <com/sun/star/util/XNumberFormats.hpp>
+#endif
+#ifndef _CPPUHELPER_INTERFACECONTAINER_H_
+#include <cppuhelper/interfacecontainer.h>
+#endif
+#ifndef _UTL_UNO3_HXX_
+#include <unotools/uno3.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+#ifndef _CPPUHELPER_COMPONENT_HXX_
+#include <cppuhelper/component.hxx>
+#endif
+
+#ifndef _FM_IMPLEMENTATION_IDS_HXX_
+#include "fmimplids.hxx"
+#endif
+
+#ifndef _FM_STATIC_HXX_
+#include "fmstatic.hxx"
+#endif
+
+
+class SdbSqlParser;
+
+// one SQLParser for the form layer
+SdbSqlParser& getSQLParser();
+
+//==================================================================
+// allgemeine Typen
+//==================================================================
+// displaying a database exception for the user
+// display info about a simple ::com::sun::star::sdbc::SQLException
+void displayException(const ::com::sun::star::sdbc::SQLException&, WinBits nStyle = WB_OK | WB_DEF_OK);
+// display info about chained SQLExceptions
+void displayException(const ::com::sun::star::sdb::SQLErrorEvent&, WinBits nStyle = WB_OK | WB_DEF_OK);
+
+
+// StringConversion
+#define U(x) \
+ ::rtl::OStringToOUString( x, RTL_TEXTENCODING_ASCII_US )
+#define S(aUniCode) \
+ ::rtl::OUStringToOString(aUniCode, RTL_TEXTENCODING_ASCII_US)
+
+// modes for the XModeSelector
+DECLARE_CONSTASCII_USTRING(DATA_MODE);
+DECLARE_CONSTASCII_USTRING(FILTER_MODE);
+
+
+// Kopieren von Persistenten Objecten
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> clone(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject>& _xObj);
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> cloneUsingProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject>& _xObj);
+void CloneForms(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& _xSource, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& _xDest);
+
+// Suchen eines Wertes in einer StringListe
+// Fehler 0xFFFFFFFF (LIST_ENTRY_NOTFOUND)
+//------------------------------------------------------------------------------
+sal_uInt32 findValue(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& rList, const ::com::sun::star::uno::Any& rValue);
+
+::com::sun::star::uno::Sequence<sal_Int16> findValueINT16(const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList, const ::rtl::OUString& rValue, sal_Bool bOnlyFirst=sal_False );
+::com::sun::star::uno::Sequence<sal_Int16> findValue(const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList, const ::rtl::OUString& rValue, sal_Bool bOnlyFirst=sal_False );
+
+sal_uInt32 findValue1(const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList, const ::rtl::OUString& rValue);
+
+// geht von einer sortierten !!! sequence aus
+sal_Bool hasString(const ::rtl::OUString& aStr, const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList);
+
+sal_Int32 findPos(const ::rtl::OUString& aStr, const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rList);
+
+// void checkArg(const ::com::sun::star::uno::Any& Element, Reflection* pRefl) throw( ::com::sun::star::lang::IllegalArgumentException );
+
+// Suchen in einer Indexliste nach einem Element
+sal_Bool searchElement(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& xCont, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement);
+
+sal_Int32 getElementPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& xCont, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElement);
+String getFormComponentAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xElement);
+String getFormComponentAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xElement, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rTopLevelElement);
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> getElementFromAccessPath(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& _xParent, const String& _rRelativePath);
+
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> getXModel(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xIface);
+
+::rtl::OUString getLabelName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xControlModel);
+::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> findConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xParent);
+
+// date conversion
+extern Date STANDARD_DATE;
+double ToStandardDate(const Date& rNullDate, double rVal);
+double ToNullDate(const Date& rNullDate, double rVal);
+
+
+// ===================================================================================================
+// = class CursorWrapper - eine Hilfsklasse, die parallel mit je einem ::com::sun::star::uno::Reference<XDatabaseUpdateCursor>,
+// XDatabaseBookmarkCursor und XDatabaseDirectCursor arbeitet
+// ===================================================================================================
+
+class CursorWrapper
+{
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> m_xMoveOperations;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate> m_xBookmarkOperations;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> m_xColumnsSupplier;
+
+public:
+ // Construction/Destruction
+ CursorWrapper() { }
+ CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxCursor, sal_Bool bUseCloned = sal_False);
+ CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _rxCursor, sal_Bool bUseCloned = sal_False);
+ // bei bUseCloned == sal_True wird der Cursor ueber das XCloneable-Interface (dass er besitzen muss) gedoubled und
+ // erst dann benutzt
+
+ sal_Bool is() const { return m_xMoveOperations.is(); }
+ sal_Bool Is() const { return m_xMoveOperations.is(); }
+
+ CursorWrapper* operator ->() { return this; }
+ operator ::com::sun::star::uno::XInterface* () const { return (::com::sun::star::uno::XInterface *)m_xMoveOperations.get(); }
+ operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> () const{ return (::com::sun::star::uno::XInterface *)m_xMoveOperations.get(); }
+
+ // 'Konvertierungen'
+ const CursorWrapper& operator=(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& xCursor);
+ operator const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& () const { return m_xMoveOperations; }
+ operator const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate>& () const { return m_xBookmarkOperations; }
+ operator const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>& () const { return m_xColumnsSupplier; }
+
+ // das normale queryInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException )
+ { return m_xMoveOperations->queryInterface(type); }
+
+ // ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XRowLocate>
+ ::com::sun::star::uno::Any getBookmark(void)
+ throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+ { return m_xBookmarkOperations->getBookmark(); }
+ sal_Bool moveToBookmark(const ::com::sun::star::uno::Any& bookmark) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { return m_xBookmarkOperations->moveToBookmark(bookmark); }
+ sal_Bool moveRelativeToBookmark(const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { return m_xBookmarkOperations->moveRelativeToBookmark(bookmark, rows); }
+ sal_Int32 compareBookmarks(const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second) const throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { return m_xBookmarkOperations->compareBookmarks(first, second); }
+ sal_Int32 hasOrderedBookmarks(void) const throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { return m_xBookmarkOperations->hasOrderedBookmarks(); }
+ sal_Int32 hashBookmark(const ::com::sun::star::uno::Any& bookmark) const throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException ) { return m_xBookmarkOperations->hashBookmark(bookmark); }
+
+ // ::com::sun::star::sdbc::XResultSet
+ sal_Bool isBeforeFirst() const { return m_xMoveOperations->isBeforeFirst(); }
+ sal_Bool isAfterLast() const { return m_xMoveOperations->isAfterLast(); }
+ sal_Bool isFirst() const { return m_xMoveOperations->isFirst(); }
+ sal_Bool isLast() const { return m_xMoveOperations->isLast(); }
+// void moveBeforeFirst() { m_xMoveOperations->moveBeforeFirst(); }
+// void moveAfterLast() { m_xMoveOperations->moveAfterLast(); }
+ sal_Bool first() { return m_xMoveOperations->first(); }
+ sal_Bool last() { return m_xMoveOperations->last(); }
+ sal_Int32 getRow() const { return m_xMoveOperations->getRow(); }
+ sal_Bool absolute(sal_Int32 nPosition) { return m_xMoveOperations->absolute(nPosition); }
+ sal_Bool relative(sal_Int32 nCount) { return m_xMoveOperations->relative(nCount); }
+ sal_Bool previous() { return m_xMoveOperations->previous(); }
+ sal_Bool next() { return m_xMoveOperations->next(); }
+ void refreshRow() { m_xMoveOperations->refreshRow(); }
+ sal_Bool rowUpdated() { return m_xMoveOperations->rowUpdated(); }
+ sal_Bool rowInserted() { return m_xMoveOperations->rowInserted(); }
+ sal_Bool rowDeleted() { return m_xMoveOperations->rowDeleted(); }
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> getStatement() { return m_xMoveOperations->getStatement(); }
+ // ::com::sun::star::sdbcx::XColumnsSupplier
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getColumns() const throw( ::com::sun::star::uno::RuntimeException ) { return m_xColumnsSupplier->getColumns(); }
+private:
+ void ImplConstruct(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _rxCursor, sal_Bool bUseCloned);
+};
+
+
+//==================================================================
+// FmXSequenceIndexAccess - a class which wraps a ::com::sun::star::uno::Sequence so it's
+// elements may be accessed via XIndexAccess-methods
+//==================================================================
+
+template <class ElementType>
+class FmXSequenceIndexAccess : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XIndexAccess>
+{
+ ::com::sun::star::uno::Sequence<ElementType> m_aElements;
+
+public:
+ FmXSequenceIndexAccess(const ::com::sun::star::uno::Sequence<ElementType>& _rElements) : m_aElements(_rElements) { }
+
+ // UNO
+ DECLARE_UNO3_DEFAULTS(FmXSequenceIndexAccess, cppu::WeakImplHelper1< ::com::sun::star::container::XIndexAccess> );
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XIndexAccess
+ virtual sal_Int32 getCount(void) const throw( ::com::sun::star::uno::RuntimeException ) { return m_aElements.getLength(); }
+ virtual ::com::sun::star::uno::Any getByIndex(sal_Int32 Index) const throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+ { // we implement this in-place as MSVC41 doesn't like a non-in-place template implementation with a throw-clause
+ if ((Index < 0) || (Index >= getCount()))
+ {
+ throw ::com::sun::star::lang::IndexOutOfBoundsException();
+ }
+
+ return ::com::sun::star::uno::Any(m_aElements.getConstArray() + Index, ::getReflection((ElementType*)NULL));
+ }
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException)
+ { return ::getCppuType((ElementType*)NULL); }
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException)
+ { return m_aElements.getLength() > 0; }
+
+protected:
+ ~FmXSequenceIndexAccess() { }
+};
+
+//------------------------------------------------------------------
+template <class ElementType>
+::com::sun::star::uno::Any SAL_CALL FmXSequenceIndexAccess<ElementType>::queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ return cppu::WeakImplHelper1< ::com::sun::star::container::XIndexAccess >::queryInterface(type);
+}
+
+//==================================================================
+// Einfacher Adapter fuer Components
+//==================================================================
+class FmXDisposeMultiplexer;
+class FmXDisposeListener
+{
+ friend class FmXDisposeMultiplexer;
+
+ FmXDisposeMultiplexer* m_pAdapter;
+ ::osl::Mutex& m_rMutex;
+
+public:
+ FmXDisposeListener(::osl::Mutex& _rMutex) : m_pAdapter(NULL), m_rMutex(_rMutex) { }
+ virtual ~FmXDisposeListener();
+
+ virtual void disposing(const ::com::sun::star::lang::EventObject& _rEvent, sal_Int16 _nId) throw( ::com::sun::star::uno::RuntimeException ) = 0;
+
+protected:
+ void setAdapter(FmXDisposeMultiplexer* pAdapter);
+};
+
+typedef ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener> FmXDisposeMultiplexer_x;
+//==============================================================================
+
+
+class FmXDisposeMultiplexer :public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener>
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> m_xObject;
+ FmXDisposeListener* m_pListener;
+ sal_Int16 m_nId;
+
+ virtual ~FmXDisposeMultiplexer();
+public:
+ FmXDisposeMultiplexer(FmXDisposeListener* _pListener, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& _rxObject, sal_Int16 _nId = -1);
+
+// ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ void dispose();
+};
+
+// ==================================================================
+
+//==============================================================================
+// FmSlotDispatch - some kind of translator between the Sfx-Slots and the UNO-dispatchers
+//==============================================================================
+
+typedef ::cppu::WeakImplHelper1< ::com::sun::star::frame::XDispatch > FmSlotDispatch_x;
+class FmSlotDispatch
+ :public SfxControllerItem
+ ,public ::cppu::WeakImplHelper2< ::com::sun::star::frame::XDispatch, ::com::sun::star::lang::XComponent>
+ // ,public XComponent
+{
+protected:
+ ::cppu::OInterfaceContainerHelper m_aDisposeListeners;
+ ::cppu::OInterfaceContainerHelper m_aStatusListeners;
+
+ Link m_aExecutor;
+ ::com::sun::star::util::URL m_aUrl; // the URL we're responsible for
+ ::osl::Mutex m_aAccessSafety;
+ sal_Int16 m_nSlot; // the slot 'translation' of the URL
+
+public:
+ const ::com::sun::star::util::URL& getUrl() const { return m_aUrl; }
+ sal_Int16 getSlot() const { return m_nSlot; }
+
+ void setExecutor(const Link& aExecutor) { m_aExecutor = aExecutor; }
+ Link getExecutor() const { return m_aExecutor; }
+
+public:
+ FmSlotDispatch(const ::com::sun::star::util::URL& rUrl, sal_Int16 nSlotId, SfxBindings& rBindings);
+ virtual ~FmSlotDispatch();
+
+ // ::com::sun::star::frame::XDispatch
+ virtual void SAL_CALL 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);
+ virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw(::com::sun::star::uno::RuntimeException);
+
+ // 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 >& xListener ) 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);
+
+protected:
+ // SfxControllerItem
+ virtual void StateChanged(sal_Int16 nSID, SfxItemState eState, const SfxPoolItem* pState);
+
+ ::com::sun::star::frame::FeatureStateEvent BuildEvent(SfxItemState eState, const SfxPoolItem* pState);
+
+ virtual void NotifyState(SfxItemState eState, const SfxPoolItem* pState, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>& rListener = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>());
+ // the default implementations notifies the given listeners (or all available listeners) with a statusChanged
+};
+
+//========================================================================
+//= dispatch interception helper classes
+//========================================================================
+
+//------------------------------------------------------------------------
+//- FmDispatchInterceptor
+//------------------------------------------------------------------------
+class FmDispatchInterceptor
+{
+public:
+ FmDispatchInterceptor() { }
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> interceptedQueryDispatch(sal_uInt16 _nId,
+ const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException ) = 0;
+
+ virtual ::osl::Mutex* getInterceptorMutex() = 0;
+};
+
+//------------------------------------------------------------------------
+//- FmXDispatchInterceptorImpl
+//------------------------------------------------------------------------
+class FmXDispatchInterceptorImpl
+ :public ::com::sun::star::frame::XDispatchProviderInterceptor
+ ,public ::com::sun::star::lang::XEventListener
+ ,public ::cppu::OComponentHelper
+
+{
+ ::osl::Mutex m_aFallback;
+ ::form::OImplementationIdsRef m_aHoldImplIdHelper;
+
+ // the component which's dispatches we're intercepting
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception> m_xIntercepted;
+ // the real interceptor
+ FmDispatchInterceptor* m_pMaster;
+
+ // chaining
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> m_xSlaveDispatcher;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> m_xMasterDispatcher;
+ // our id
+ sal_Int16 m_nId;
+
+ virtual ~FmXDispatchInterceptorImpl();
+
+public:
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception> getIntercepted() const { return m_xIntercepted; }
+
+public:
+ FmXDispatchInterceptorImpl(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _rToIntercept, FmDispatchInterceptor* _pMaster, sal_Int16 _nId);
+
+ // StarOne
+ DECLARE_UNO3_DEFAULTS(FmXDispatchInterceptorImpl, OComponentHelper);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) 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::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) 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::XDispatchProviderInterceptor
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setSlaveDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewDispatchProvider ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMasterDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewSupplier ) 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);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+protected:
+ void ImplDetach();
+
+ ::osl::Mutex& getAccessSafety()
+ {
+ if (m_pMaster && m_pMaster->getInterceptorMutex())
+ return *m_pMaster->getInterceptorMutex();
+ return m_aFallback;
+ }
+};
+
+//==================================================================
+// Stringkonvertierung
+//==================================================================
+::rtl::OUString AnyToStr( const ::com::sun::star::uno::Any& aValue);
+::com::sun::star::uno::Any StringToAny( ::rtl::OUString aStr, ::com::sun::star::uno::TypeClass eTargetType );
+::com::sun::star::uno::Sequence< ::rtl::OUString> getEventMethods(const ::com::sun::star::uno::Type& type);
+
+//==================================================================
+// ...
+//==================================================================
+//sal_Int16 getControlTypeByModelName(const ::rtl::OUString& rModel);
+//::rtl::OUString getModelNameByControlType(sal_Int16 nType);
+::rtl::OUString getServiceNameByControlType(sal_Int16 nType);
+ // get a service name to create a model of the given type (OBJ_FM_...)
+sal_Int16 getControlTypeByObject(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo>& _rxObject);
+ // get the object type (OBJ_FM_...) from the services the object supports
+
+// void TransferFormComponentProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xOld, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xNew);
+void TransferEventScripts(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& xModel, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor>& rTransferIfAvailable);
+
+sal_Int16 GridModel2ViewPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& rColumns, sal_Int16 nModelPos);
+sal_Int16 GridView2ModelPos(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& rColumns, sal_Int16 nViewPos);
+sal_Int16 GridViewColumnCount(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& rColumns);
+
+//==================================================================
+UniString quoteName(const UniString& rQuote, const UniString& rName);
+UniString quoteTableName(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& xMeta, const UniString& rName);
+
+//==================================================================
+//::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getTableFields(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConn, const ::rtl::OUString& _rsName);
+sal_Bool isLoadable(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xLoad);
+sal_Bool isRowSetAlive(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rxRowSet);
+ // checks if the ::com::sun::star::sdbcx::XColumnsSupplier provided by _rxRowSet supllies any columns
+
+
+//==================================================================
+//= a class wrapping an object implementing a sdb::DataColumn service
+//==================================================================
+class DataColumn
+{
+ // interfaces needed for sddb::Column
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xPropertySet;
+ // interfaces needed for sdb::DataColumn
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn> m_xColumn;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumnUpdate> m_xColumnUpdate;
+
+public:
+ DataColumn() { };
+ DataColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxIFace);
+ // if the object behind _rxIFace doesn't fully support the DataColumn service,
+ // (which is checked via the supported interfaces) _all_ members will be set to
+ // void !, even if the object has some of the needed interfaces.
+
+ sal_Bool is() const { return m_xColumn.is(); }
+ sal_Bool Is() const { return m_xColumn.is(); }
+
+ DataColumn* operator ->() { return this; }
+ // operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> () const { return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xColumn; }
+ operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> () const{ return m_xColumn;; }
+
+ // 'conversions'
+ operator const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>&() const { return m_xPropertySet; }
+ operator const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn>&() const { return m_xColumn; }
+ operator const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumnUpdate>&() const
+ {
+ DBG_ASSERT(m_xColumnUpdate.is() , "operator XColumnUpdate(): is NULL!");
+ return m_xColumnUpdate;
+ }
+
+ // das normale queryInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException )
+ { return m_xColumn->queryInterface(type); }
+
+ // ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> getPropertySetInfo() const throw( ::com::sun::star::uno::RuntimeException );
+ inline void setPropertyValue(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue) 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 );
+ inline ::com::sun::star::uno::Any getPropertyValue(const ::rtl::OUString& PropertyName) const throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ inline void addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener>& xListener) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ inline void removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener>& aListener) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ inline void addVetoableChangeListener(const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener>& aListener) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ inline void removeVetoableChangeListener(const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener>& aListener) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::sdb::XColumn
+ inline sal_Bool wasNull() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::rtl::OUString getString() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline sal_Bool getBoolean() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline sal_Int8 getByte() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline sal_Int16 getShort() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline sal_Int32 getInt() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline sal_Int64 getLong() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline float getFloat() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline double getDouble() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::uno::Sequence< sal_Int8 > getBytes() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::util::Date getDate() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::util::Time getTime() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::util::DateTime getTimestamp() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream> getBinaryStream() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream> getCharacterStream() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::uno::Any getObject(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& typeMap) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef> getRef() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob> getBlob() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob> getClob() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray> getArray() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+
+ // XColumnUpdate
+ inline void updateNull(void) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateBoolean(sal_Bool x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateByte(sal_Int8 x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateShort(sal_Int16 x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateInt(sal_Int32 x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateLong(sal_Int64 x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateFloat(float x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateDouble(double x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateString(const ::rtl::OUString& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateBytes(const ::com::sun::star::uno::Sequence< sal_Int8 >& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateDate(const com::sun::star::util::Date& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateTime(const ::com::sun::star::util::Time& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateTimestamp(const ::com::sun::star::util::DateTime& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateBinaryStream(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateCharacterStream(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateObject(const ::com::sun::star::uno::Any& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+ inline void updateNumericObject(const ::com::sun::star::uno::Any& x, sal_Int32 scale) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
+};
+
+// ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>
+::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> DataColumn::getPropertySetInfo() const throw( ::com::sun::star::uno::RuntimeException )
+{
+ return m_xPropertySet->getPropertySetInfo();
+}
+
+void DataColumn::setPropertyValue(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue) 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 )
+{
+ m_xPropertySet->setPropertyValue(aPropertyName, aValue);
+}
+
+::com::sun::star::uno::Any DataColumn::getPropertyValue(const ::rtl::OUString& PropertyName) const throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xPropertySet->getPropertyValue(PropertyName);
+}
+
+void DataColumn::addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener>& xListener) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xPropertySet->addPropertyChangeListener(aPropertyName, xListener);
+}
+
+void DataColumn::removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener>& aListener) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xPropertySet->removePropertyChangeListener(aPropertyName, aListener);
+}
+
+void DataColumn::addVetoableChangeListener(const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener>& aListener) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xPropertySet->addVetoableChangeListener(PropertyName, aListener);
+}
+
+void DataColumn::removeVetoableChangeListener(const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener>& aListener) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xPropertySet->removeVetoableChangeListener(PropertyName, aListener);
+}
+
+// ::com::sun::star::sdb::XColumn
+sal_Bool DataColumn::wasNull() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->wasNull();
+}
+
+::rtl::OUString DataColumn::getString() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getString();
+}
+
+sal_Bool DataColumn::getBoolean() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getBoolean();
+}
+
+sal_Int8 DataColumn::getByte() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getByte();
+}
+
+sal_Int16 DataColumn::getShort() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getShort();
+}
+
+sal_Int32 DataColumn::getInt() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getInt();
+}
+
+sal_Int64 DataColumn::getLong() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getLong();
+}
+
+float DataColumn::getFloat() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getFloat();
+}
+
+double DataColumn::getDouble() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getDouble();
+}
+
+::com::sun::star::uno::Sequence< sal_Int8 > DataColumn::getBytes() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getBytes();
+}
+
+::com::sun::star::util::Date DataColumn::getDate() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getDate();
+}
+
+::com::sun::star::util::Time DataColumn::getTime() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getTime();
+}
+
+::com::sun::star::util::DateTime DataColumn::getTimestamp() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getTimestamp();
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream> DataColumn::getBinaryStream() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getBinaryStream();
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream> DataColumn::getCharacterStream() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getCharacterStream();
+}
+
+::com::sun::star::uno::Any DataColumn::getObject(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& typeMap) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getObject(typeMap);
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef> DataColumn::getRef() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getRef();
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob> DataColumn::getBlob() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getBlob();
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob> DataColumn::getClob() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getClob();
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray> DataColumn::getArray() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ return m_xColumn->getArray();
+}
+
+// XColumnUpdate
+void DataColumn::updateNull() throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateNull();
+}
+
+void DataColumn::updateBoolean(sal_Bool x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateBoolean(x);
+}
+
+void DataColumn::updateByte(sal_Int8 x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateByte(x);
+}
+
+void DataColumn::updateShort(sal_Int16 x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateShort(x);
+}
+
+void DataColumn::updateInt(sal_Int32 x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateInt(x);
+}
+
+void DataColumn::updateLong(sal_Int64 x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateLong(x);
+}
+
+void DataColumn::updateFloat(float x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateFloat(x);
+}
+
+void DataColumn::updateDouble(double x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateDouble(x);
+}
+
+void DataColumn::updateString(const ::rtl::OUString& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateString(x);
+}
+
+void DataColumn::updateBytes(const ::com::sun::star::uno::Sequence< sal_Int8 >& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateBytes(x);
+}
+
+void DataColumn::updateDate(const com::sun::star::util::Date& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateDate(x);
+}
+
+void DataColumn::updateTime(const ::com::sun::star::util::Time& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateTime(x);
+}
+
+void DataColumn::updateTimestamp(const ::com::sun::star::util::DateTime& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateTimestamp(x);
+}
+
+void DataColumn::updateBinaryStream(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateBinaryStream(x, length);
+}
+
+void DataColumn::updateCharacterStream(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream>& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateCharacterStream(x, length);
+}
+
+void DataColumn::updateObject(const ::com::sun::star::uno::Any& x) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateObject(x);
+}
+
+void DataColumn::updateNumericObject(const ::com::sun::star::uno::Any& x, sal_Int32 scale) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException )
+{
+ m_xColumnUpdate->updateNumericObject(x, scale);
+}
+
+
+
+#endif // _SVX_FMTOOLS_HXX
+
diff --git a/svx/source/inc/fmundo.hxx b/svx/source/inc/fmundo.hxx
new file mode 100644
index 0000000000..1c8c3a27af
--- /dev/null
+++ b/svx/source/inc/fmundo.hxx
@@ -0,0 +1,284 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmundo.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMUNDO_HXX
+#define _SVX_FMUNDO_HXX
+
+#ifndef _SVDUNDO_HXX
+#include "svdundo.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP_
+#include <com/sun/star/beans/XVetoableChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_SCRIPTEVENT_HPP_
+#include <com/sun/star/script/ScriptEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XSCRIPTLISTENER_HPP_
+#include <com/sun/star/script/XScriptListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_SCRIPTEVENTDESCRIPTOR_HPP_
+#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_
+#include <com/sun/star/container/XIndexContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
+#include <com/sun/star/container/XContainerListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_CONTAINEREVENT_HPP_
+#include <com/sun/star/container/ContainerEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+
+#include <cppuhelper/implbase4.hxx>
+
+
+
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+
+#ifndef _SVDOUNO_HXX //autogen wg. SdrUnoObj
+#include "svdouno.hxx"
+#endif
+
+#include <unotools/uno3.hxx>
+
+class FmFormModel;
+class FmFormObj;
+class SdrObject;
+class FmXFormView;
+
+FORWARD_DECLARE_INTERFACE(awt,XControl)
+FORWARD_DECLARE_INTERFACE(awt,XControlContainer)
+//FORWARD_DECLARE_INTERFACE(uno,Reference)
+
+//==================================================================
+// FmUndoPropertyAction
+//==================================================================
+class FmUndoPropertyAction: public SdrUndoAction
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xObj;
+ ::rtl::OUString aPropertyName;
+ ::com::sun::star::uno::Any aNewValue;
+ ::com::sun::star::uno::Any aOldValue;
+
+public:
+ FmUndoPropertyAction(FmFormModel& rMod, const ::com::sun::star::beans::PropertyChangeEvent& evt);
+
+ virtual void Undo();
+ virtual void Redo();
+
+#ifndef ENABLEUNICODE
+ virtual String GetComment() const;
+#else
+ virtual UniString GetComment() const;
+#endif
+
+};
+
+//==================================================================
+// FmUndoContainerAction
+//==================================================================
+class FmUndoContainerAction: public SdrUndoAction
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> xContainer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xElement;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xOwnElement; // Object das der Action gehoert
+ sal_Int32 nIndex;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor > aEvts; // events des Objects
+
+public:
+ enum Action
+ {
+ Inserted = 1,
+ Removed = 2
+ };
+
+private:
+ Action eAction;
+
+public:
+ FmUndoContainerAction(FmFormModel& rMod,
+ Action _eAction,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& xCont,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xElem,
+ sal_Int32 nIdx = -1);
+ ~FmUndoContainerAction();
+
+ virtual void Undo();
+ virtual void Redo();
+};
+
+//==================================================================
+// FmUndoModelReplaceAction
+//==================================================================
+class FmUndoModelReplaceAction : public SdrUndoAction
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> m_xReplaced;
+ SdrUnoObj* m_pObject;
+
+public:
+ FmUndoModelReplaceAction(FmFormModel& rMod, SdrUnoObj* pObject, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& xReplaced);
+ ~FmUndoModelReplaceAction();
+
+ virtual void Undo();
+ virtual void Redo() { Undo(); }
+
+#ifndef ENABLEUNICODE
+ virtual String GetComment() const;
+#else
+ virtual UniString GetComment() const;
+#endif
+};
+
+//========================================================================
+class FmXUndoEnvironment : public ::cppu::WeakImplHelper4< ::com::sun::star::beans::XVetoableChangeListener,
+ ::com::sun::star::beans::XPropertyChangeListener,
+ ::com::sun::star::container::XContainerListener,
+ ::com::sun::star::script::XScriptListener>,
+ public SfxListener
+ // public ::cppu::OWeakObject
+{
+ friend class FmFormModel;
+ friend class FmXFormView;
+ FmFormModel& rModel;
+
+ void* m_pPropertySetCache;
+ sal_uInt32 nLocks;
+ sal_Bool bReadOnly;
+
+
+ void firing_Impl( const ::com::sun::star::script::ScriptEvent& evt, ::com::sun::star::uno::Any *pSyncRet=0 );
+
+public:
+ FmXUndoEnvironment(FmFormModel& _rModel);
+ ~FmXUndoEnvironment();
+
+ // UNO Anbindung
+ // SMART_UNO_DECLARATION(FmXUndoEnvironment, ::cppu::OWeakObject);
+ // virtual sal_Bool queryInterface(UsrUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>&);
+ // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass>> getIdlClasses(void);
+
+ void Lock() {nLocks++;}
+ void UnLock() {nLocks--;}
+ sal_Bool IsLocked() const {return nLocks != 0;}
+
+protected:
+// ::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::beans::XPropertyChangeListener
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt);
+
+// XVetoableChangeListener
+ virtual void SAL_CALL vetoableChange(const ::com::sun::star::beans::PropertyChangeEvent& aEvent) throw( ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException );
+
+// ::com::sun::star::container::XContainerListener
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent);
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent);
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent);
+
+// XScriptListener
+ virtual void SAL_CALL firing(const ::com::sun::star::script::ScriptEvent& evt);
+ virtual ::com::sun::star::uno::Any SAL_CALL approveFiring(const ::com::sun::star::script::ScriptEvent& evt);
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+// Einfuegen von Objekten
+ void AddForms(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& rForms);
+ void RemoveForms(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& rForms);
+
+ void SetReadOnly(sal_Bool bRead) {bReadOnly = bRead;}
+ sal_Bool IsReadOnly() const {return bReadOnly;}
+
+ void ModeChanged();
+ void Clear();
+
+private:
+ void AddElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element);
+ void RemoveElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element);
+ void AlterPropertyListening(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element);
+
+public:
+ // Methoden zur Zuordnung von Controls zu Forms,
+ // werden von der Seite und der UndoUmgebung genutzt
+ void Inserted(SdrObject* pObj);
+ void Removed(SdrObject* pObj);
+
+ void Inserted(FmFormObj* pObj);
+ void Removed(FmFormObj* pObj);
+};
+
+
+#endif //_SVX_FMUNDO_HXX
+
diff --git a/svx/source/inc/fmurl.hxx b/svx/source/inc/fmurl.hxx
new file mode 100644
index 0000000000..e7f917ff2e
--- /dev/null
+++ b/svx/source/inc/fmurl.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmurl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMURL_HXX
+#define _SVX_FMURL_HXX
+
+#ifndef _FM_STATIC_HXX_
+#include "fmstatic.hxx"
+#endif
+
+DECLARE_CONSTASCII_USTRING(FMURL_FORMSLOTS_PREFIX);
+
+DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVEFIRST);
+DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVEPREV);
+DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVENEXT);
+DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVELAST);
+DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVETONEW);
+DECLARE_CONSTASCII_USTRING(FMURL_RECORD_UNDO);
+
+DECLARE_CONSTASCII_USTRING(FMURL_CONFIRM_DELETION);
+
+DECLARE_CONSTASCII_USTRING(FMURL_COMPONENT_FORMGRIDVIEW);
+DECLARE_CONSTASCII_USTRING(FMURL_GRIDVIEW_CLEARVIEW);
+DECLARE_CONSTASCII_USTRING(FMURL_GRIDVIEW_ADDCOLUMN);
+DECLARE_CONSTASCII_USTRING(FMURL_GRIDVIEW_ATTACHTOFORM);
+
+DECLARE_CONSTASCII_USTRING(FMARG_ATTACHTO_MASTERFORM);
+DECLARE_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNTYPE);
+DECLARE_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNPOS);
+
+#endif // _SVX_FMURL_HXX
+
diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx
new file mode 100644
index 0000000000..027aa0b4cc
--- /dev/null
+++ b/svx/source/inc/fmvwimp.hxx
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmvwimp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_FMVWIMP_HXX
+#define _SVX_FMVWIMP_HXX
+
+#include <unotools/stl_types.hxx>
+
+
+#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
+#include <com/sun/star/form/XForm.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
+#include <com/sun/star/container/XIndexAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATION_HPP_
+#include <com/sun/star/container/XEnumeration.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLER_HPP_
+#include <com/sun/star/form/XFormController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
+#include <com/sun/star/container/XContainerListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_CONTAINEREVENT_HPP_
+#include <com/sun/star/container/ContainerEvent.hpp>
+#endif
+
+#ifndef _LINK_HXX //autogen
+#include <tools/link.hxx>
+#endif
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+#ifndef _UTL_UNO3_HXX_
+#include <unotools/uno3.hxx>
+#endif
+
+class SdrPageViewWinRec;
+class SdrPageView;
+class Window;
+//FORWARD_DECLARE_INTERFACE(uno,Reference)
+FORWARD_DECLARE_INTERFACE(awt,XControl)
+class FmXFormController;
+
+//==================================================================
+// FmXPageViewWinRec
+//==================================================================
+class FmXPageViewWinRec : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XIndexAccess>
+{
+ friend class FmXFormView;
+
+ ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > > m_aControllerList;
+ FmXFormView* m_pViewImpl;
+ Window* m_pWindow;
+
+public:
+ FmXPageViewWinRec(const SdrPageViewWinRec*, FmXFormView* pView);
+ ~FmXPageViewWinRec();
+
+// UNO Anbindung
+ // DECLARE_UNO3_AGG_DEFAULTS(FmXPageViewWinRec, WeakImplHelper1< ::com::sun::star::container::XIndexAccess> );
+ // virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rOut );
+ // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses();
+
+// ::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 _Index) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ const vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > >& GetList() {return m_aControllerList;}
+
+protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > getController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm );
+ void setController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& xForm,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& xCC,
+ FmXFormController* pParent = NULL,
+ sal_Bool bCheck=sal_False );
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > getControlContainer() const;
+ void updateTabOrder( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& xControl,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& xCC );
+ void dispose();
+ Window* getWindow() const {return m_pWindow;}
+};
+
+typedef vector<FmXPageViewWinRec*> FmWinRecList;
+//==================================================================
+// FmXFormView
+//==================================================================
+class FmXFormView : public ::cppu::WeakImplHelper2<
+ ::com::sun::star::form::XFormControllerListener,
+ ::com::sun::star::container::XContainerListener>
+{
+ friend class FmFormView;
+ friend class FmFormShell;
+ friend class FmXFormShell;
+ friend class FmXPageViewWinRec;
+
+ FmWinRecList m_aWinList; // dieses Liste wird nur im nicht designmodus gefuellt
+
+ FmFormView* m_pView;
+ SdrPageView* m_pPageViewForActivation;
+ sal_uInt32 m_nEvent;
+ sal_uInt32 m_nErrorMessageEvent;
+
+ String m_sErrorMessage;
+
+ void AttachControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& rControl, sal_Bool bDetach );
+ void AttachControls( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >&, sal_Bool bDetach );
+
+ FmFormShell* GetFormShell() const;
+
+protected:
+ FmXFormView(FmFormView* _pView)
+ :m_pView(_pView)
+ ,m_pPageViewForActivation(NULL)
+ ,m_nEvent(0)
+ ,m_nErrorMessageEvent(0) { }
+ ~FmXFormView();
+
+public:
+ // UNO Anbindung
+ // DECLARE_UNO3_AGG_DEFAULTS(FmXFormView, WeakImplHelper2<
+ // ::com::sun::star::form::XFormControllerListener,
+ // ::com::sun::star::container::XContainerListener>);
+ // virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rOut );
+ // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses();
+
+// ::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& rEvent);
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent);
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent);
+
+// ::com::sun::star::form::XFormControllerListener
+ virtual void SAL_CALL formActivated(const ::com::sun::star::lang::EventObject& rEvent);
+ virtual void SAL_CALL formDeactivated(const ::com::sun::star::lang::EventObject& rEvent);
+
+ FmFormView* getView() const {return m_pView;}
+ FmWinRecList::const_iterator findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& rCC ) const;
+ const FmWinRecList& getWindowList() const {return m_aWinList;}
+
+protected:
+ FmWinRecList::iterator findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& rCC );
+ void addWindow(const SdrPageViewWinRec*);
+ void removeWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& rCC );
+ void Activate(SdrPageView* pPageView, sal_Bool bSync = sal_False);
+ void Deactivate(SdrPageView* pPageView, BOOL bDeactivateController = TRUE);
+
+ DECL_LINK(OnActivate, void* );
+ DECL_LINK(OnDelayedErrorMessage, void*);
+};
+
+
+
+#endif // _SVX_FMVWIMP_HXX
+
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
new file mode 100644
index 0000000000..f3ef87126b
--- /dev/null
+++ b/svx/source/inc/gridcell.hxx
@@ -0,0 +1,758 @@
+/*************************************************************************
+ *
+ * $RCSfile: gridcell.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_GRIDCELL_HXX
+#define _SVX_GRIDCELL_HXX
+
+#ifndef _SVX_GRIDCTRL_HXX
+#include "gridctrl.hxx"
+#endif
+
+#ifndef _SVX_FMTOOLS_HXX
+#include "fmtools.hxx"
+#endif
+
+#ifndef _CPPUHELPER_COMPONENT_HXX_
+#include <cppuhelper/component.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_SDB_XCOLUMN_HPP_
+#include <com/sun/star/sdb/XColumn.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XBOUNDCONTROL_HPP_
+#include <com/sun/star/form/XBoundControl.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XTEXTCOMPONENT_HPP_
+#include <com/sun/star/awt/XTextComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XLISTBOX_HPP_
+#include <com/sun/star/awt/XListBox.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_TEXTALIGN_HPP_
+#include <com/sun/star/awt/TextAlign.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROLMODEL_HPP_
+#include <com/sun/star/awt/XControlModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROL_HPP_
+#include <com/sun/star/awt/XControl.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCHECKBOX_HPP_
+#include <com/sun/star/awt/XCheckBox.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_
+#include <com/sun/star/beans/XFastPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#endif
+
+#ifndef _UNOTOOLS_PROPERTY_MULTIPLEX_HXX_
+#include <unotools/propmultiplex.hxx>
+#endif
+
+class DbCellControl;
+class Edit;
+class FmXGridCell;
+
+//==================================================================
+// DbGridColumn, Spaltenbeschreibung
+//==================================================================
+class DbGridColumn
+{
+ friend class DbGridControl;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xField; // Verbindung zum Datenbankfeld
+ DbCellControllerRef m_xController; // Struktur zum Verwalten der Controls fuer eine Spalte
+ // diese wird von der DbBrowseBox auf die jeweiligen Zellen
+ // einer Spalte positioniert
+ FmXGridCell* m_pCell;
+
+protected:
+ DbGridControl& m_rParent;
+
+private:
+ sal_Int32 m_nLastVisibleWidth; // nur gueltig, wenn m_bHidden == sal_True
+ sal_Int32 m_nFormatKey;
+ sal_Int16 m_nFieldType;
+ sal_Int16 m_nTypeId;
+ sal_uInt16 m_nId;
+ sal_Int16 m_nFieldPos;
+ sal_Int16 m_nAlign; // wird mit TXT_ALIGN_LEFT .... angegeben
+ sal_Bool m_bRequired : 1;
+ sal_Bool m_bReadOnly : 1;
+ sal_Bool m_bAutoValue : 1;
+ sal_Bool m_bInSave : 1;
+ sal_Bool m_bNumeric : 1;
+ sal_Bool m_bObject : 1; // Verweist die Column auf ein Object Datentyp?
+ sal_Bool m_bHidden : 1;
+ sal_Bool m_bLocked : 1;
+ sal_Bool m_bDateTime : 1;
+
+ static DbCellControllerRef s_xEmptyController;
+ // used by locked columns
+
+public:
+ DbGridColumn(sal_uInt16 _nId, DbGridControl& rParent)
+ :m_nId(_nId)
+ ,m_rParent(rParent)
+ ,m_nFieldType(0)
+ ,m_nFormatKey(0)
+ ,m_pCell(NULL)
+ ,m_bNumeric(sal_False)
+ ,m_bDateTime(sal_False)
+ ,m_nAlign(::com::sun::star::awt::TextAlign::LEFT)
+ ,m_nFieldPos(-1)
+ ,m_bRequired(sal_False)
+ ,m_bReadOnly(sal_False)
+ ,m_bAutoValue(sal_False)
+ ,m_bInSave(sal_False)
+ ,m_bHidden(sal_False)
+ ,m_nLastVisibleWidth(-1)
+ ,m_nTypeId(0)
+ ,m_bLocked(sal_False) {}
+
+ ~DbGridColumn();
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& getModel() const {return m_xModel;}
+ void setModel(::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _xModel) {m_xModel = _xModel;}
+
+
+ sal_uInt16 GetId() const {return m_nId;}
+ sal_Bool IsRequired() const {return m_bRequired;}
+ sal_Bool IsReadOnly() const {return m_bReadOnly;}
+ sal_Bool IsAutoValue() const {return m_bAutoValue;}
+ sal_Bool IsUpdating() const {return m_bInSave;}
+ sal_Int16 GetAlignment() const {return m_nAlign;}
+ sal_Int16 GetType() const {return m_nFieldType;}
+ sal_Int16 GetFieldPos() const {return m_nFieldPos; }
+ sal_Bool IsNumeric() const {return m_bNumeric;}
+ sal_Bool IsDateTime() const {return m_bDateTime;}
+ sal_Bool IsObject() const {return m_bObject;}
+ sal_Bool IsHidden() const {return m_bHidden;}
+ sal_Int32 GetKey() const {return m_nFormatKey;}
+ const DbCellControllerRef& GetController() const {return m_bLocked ? s_xEmptyController : m_xController;}
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& GetField() const {return m_xField;}
+ DbGridControl& GetParent() const {return m_rParent;}
+ FmXGridCell* GetCell() const {return m_pCell;}
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn > GetCurrentFieldValue() const;
+
+ // Zeichnen eines Feldes an einer Position, ist ein ::com::sun::star::sdbcx::View gesetzt
+ // uebernimmt dieser das Zeichnen, z.B. fuer CheckBoxen
+ void Paint(OutputDevice& rDev,
+ const Rectangle& rRect,
+ const DbGridRow* pRow,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+
+
+ // Inititialierung im alive mode
+ // Ist kein ColumnController gesetzt, wird eine DefaultInitialisierung
+ // vorgenommen
+ void CreateControl(sal_Int32 _nFieldPos, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xField, sal_Int32 nTypeId);
+ void UpdateControl()
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xField(m_xField);
+ CreateControl(m_nFieldPos, xField, m_nTypeId);
+ }
+
+ // Editieren einer Zelle
+ void UpdateFromField(const DbGridRow* pRow, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ sal_Bool Commit();
+
+ // freigeben aller Daten, die fuer den AliveMode noetig sind
+ void Clear();
+
+ XubString GetCellText(const DbGridRow* pRow, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
+ XubString GetCellText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
+
+ void SetReadOnly(sal_Bool bRead){m_bReadOnly = bRead;}
+ void SetObject(sal_Int16 nPos) {m_bObject = m_bReadOnly = sal_True; m_nFieldPos = nPos;}
+ void ImplInitSettings(Window* pParent, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground);
+
+ // Properties, die auf den ::com::sun::star::frame::Controller durchschlagen koennen
+ sal_Int16 SetAlignment(sal_Int16 _nAlign);
+ // if _nAlign is -1, the alignment is calculated from the type of the field we are bound to
+ // the value really set is returned
+ sal_Int16 SetAlignmentFromModel(sal_Int16 nStandardAlign);
+ // set the alignment according to the "Align"-property of m_xModel, use the given standard
+ // alignment if the property if void, return the really set alignment
+
+ // column locking
+ sal_Bool isLocked() const { return m_bLocked; }
+ void setLock(sal_Bool _bLock);
+};
+
+//==================================================================
+// DbCellControl, liefert die Daten fuer einen CellController
+// wird in der Regel nur für komplexe Controls wie z.B ComboBoxen
+// benoetigt
+//==================================================================
+class DbCellControl
+{
+protected:
+ DbGridColumn& m_rColumn;
+ Window* m_pWindow;
+ Window* m_pPainter;
+ sal_Bool m_bTransparent : 1;
+ sal_Bool m_bAlignedController : 1;
+
+public:
+ DbCellControl(DbGridColumn& _rColumn, sal_Bool _bText = sal_True)
+ :m_rColumn(_rColumn)
+ ,m_pWindow(NULL)
+ ,m_pPainter(NULL)
+ ,m_bTransparent(sal_False)
+ ,m_bAlignedController(sal_True){}
+
+ virtual ~DbCellControl();
+ Window* GetControl() const {return m_pWindow;}
+
+ sal_Bool IsAlignedController() const { return m_bAlignedController; }
+ void AlignControl(sal_Int16 nAlignment);
+
+ // Initialisieren bevor ein Control angezeigt wird
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor);
+ virtual DbCellControllerRef CreateController() const = 0;
+
+ // Schreiben des Wertes in das Model
+ virtual sal_Bool Commit() = 0;
+
+ // Formatting the field data to output text
+ virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL) { return XubString(); }
+
+ virtual void Update(){}
+ // Refresh the control by the field data
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) {}
+
+ // Painten eines Zellinhalts im vorgegeben Rechteck
+ virtual void Paint(OutputDevice& rDev, const Rectangle& rRect);
+ virtual void Paint(OutputDevice& rDev, const Rectangle& rRect, const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+ { Paint(rDev, rRect); }
+
+ void ImplInitSettings(Window* pParent, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground);
+
+protected:
+ double GetValue(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
+};
+
+//==================================================================
+class DbFormattedField : public DbCellControl, public ::utl::OPropertyChangeListener
+{
+protected:
+ ::utl::OPropertyChangeMultiplexer* m_pFormatListener;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > m_xSupplier;
+ sal_Int16 m_nKeyType;
+
+ ::osl::Mutex m_aDummy;
+ // only for the base class OPropertyChangeListener, in UNO3 we can't use the SolarMutex anymore
+
+public:
+ DbFormattedField(DbGridColumn& _rColumn);
+ virtual ~DbFormattedField();
+
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
+ virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL);
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ virtual DbCellControllerRef CreateController() const;
+ virtual sal_Bool Commit();
+
+protected:
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
+};
+
+//==================================================================
+class DbTextField : public DbCellControl
+{
+ sal_Int16 m_nKeyType;
+public:
+ DbTextField(DbGridColumn& _rColumn);
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
+ virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL);
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ virtual DbCellControllerRef CreateController() const;
+ virtual sal_Bool Commit();
+};
+
+//==================================================================
+class DbCheckBox : public DbCellControl
+{
+public:
+ DbCheckBox(DbGridColumn& _rColumn):DbCellControl(_rColumn, sal_True) { m_bAlignedController = sal_False; };
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ virtual DbCellControllerRef CreateController() const;
+ virtual sal_Bool Commit();
+ virtual void Paint(OutputDevice& rDev, const Rectangle& rRect,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+
+};
+
+//==================================================================
+class DbComboBox :public DbCellControl
+ ,public ::utl::OPropertyChangeListener
+{
+ sal_Int16 m_nKeyType;
+ ::osl::Mutex m_aDummy;
+ // only for the base class OPropertyChangeListener, in UNO3 we can't use the SolarMutex anymore
+
+public:
+ DbComboBox(DbGridColumn& _rColumn);
+
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
+ virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL);
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ virtual DbCellControllerRef CreateController() const;
+ virtual sal_Bool Commit();
+
+// OPropertyChangeListener
+ virtual void _propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& ) throw(::com::sun::star::uno::RuntimeException);
+
+ void SetList(const ::com::sun::star::uno::Any& rItems);
+};
+
+//==================================================================
+class DbListBox : public DbCellControl,
+ public ::utl::OPropertyChangeListener
+{
+ sal_Bool m_bBound : 1;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aValueList;
+ ::osl::Mutex m_aDummy;
+ // only for the base class OPropertyChangeListener, in UNO3 we can't use the SolarMutex anymore
+
+public:
+ DbListBox(DbGridColumn& _rColumn);
+
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
+ virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL);
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ virtual DbCellControllerRef CreateController() const;
+ virtual sal_Bool Commit();
+
+// OPropertyChangeListener
+ virtual void _propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& ) throw(::com::sun::star::uno::RuntimeException);
+
+ void SetList(const ::com::sun::star::uno::Any& rItems);
+};
+
+//==================================================================
+class DbPatternField : public DbCellControl
+{
+public:
+ DbPatternField(DbGridColumn& _rColumn):DbCellControl(_rColumn){};
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
+ virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL);
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ virtual DbCellControllerRef CreateController() const;
+ virtual sal_Bool Commit();
+};
+
+//==================================================================
+class DbDateField : public DbCellControl
+{
+public:
+ DbDateField(DbGridColumn& _rColumn):DbCellControl(_rColumn){};
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
+ virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL);
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ virtual DbCellControllerRef CreateController() const;
+ virtual sal_Bool Commit();
+};
+
+//==================================================================
+class DbTimeField : public DbCellControl
+{
+public:
+ DbTimeField(DbGridColumn& _rColumn):DbCellControl(_rColumn){};
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
+ virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL);
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ virtual DbCellControllerRef CreateController() const;
+ virtual sal_Bool Commit();
+};
+
+//==================================================================
+class DbCurrencyField : public DbCellControl
+{
+ sal_Int16 m_nScale;
+
+public:
+ DbCurrencyField(DbGridColumn& _rColumn):DbCellControl(_rColumn),m_nScale(0){};
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
+ virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL);
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ virtual DbCellControllerRef CreateController() const;
+ virtual sal_Bool Commit();
+
+protected:
+ double GetCurrency(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter) const;
+};
+
+//==================================================================
+class DbNumericField : public DbCellControl
+{
+public:
+ DbNumericField(DbGridColumn& _rColumn):DbCellControl(_rColumn){};
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
+ virtual XubString GetFormatText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter, Color** ppColor = NULL);
+ virtual void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+ virtual DbCellControllerRef CreateController() const;
+ virtual sal_Bool Commit();
+};
+
+//==================================================================
+class DbFilterField : public DbCellControl
+{
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aValueList;
+ XubString m_aText;
+ Link m_aCommitLink;
+ sal_Int16 m_nControlClass;
+ sal_Bool m_bFilterList : 1;
+ sal_Bool m_bFilterListFilled : 1;
+ sal_Bool m_bBound : 1;
+
+public:
+ DbFilterField(DbGridColumn& _rColumn);
+ virtual ~DbFilterField();
+
+ virtual void Init(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor);
+ virtual DbCellControllerRef CreateController() const;
+ virtual void Paint(OutputDevice& rDev, const Rectangle& rRect);
+ virtual sal_Bool Commit();
+ virtual void Update();
+
+ const XubString& GetText() const {return m_aText;}
+ void SetText(const XubString& rText);
+
+ void SetCommitHdl( const Link& rLink ) { m_aCommitLink = rLink; }
+ const Link& GetCommitHdl() const { return m_aCommitLink; }
+
+protected:
+ void SetList(const ::com::sun::star::uno::Any& rItems, sal_Bool bComboBox);
+ void CreateControl(Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xModel);
+ DECL_LINK( OnClick, void* );
+};
+
+//==================================================================
+// Base class providing the access to a grid cell
+//==================================================================
+class FmXGridCell : public ::cppu::OComponentHelper,
+ public ::com::sun::star::awt::XControl,
+ public ::com::sun::star::form::XBoundControl
+{
+protected:
+ ::osl::Mutex m_aMutex;
+ DbGridColumn* m_pColumn;
+ DbCellControl* m_pCellControl;
+
+public:
+ TYPEINFO();
+ FmXGridCell(DbGridColumn* pColumn, DbCellControl* pControl);
+ virtual ~FmXGridCell();
+
+ DECLARE_UNO3_AGG_DEFAULTS(FmXGridCell, OComponentHelper);
+ 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< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
+
+// OComponentHelper
+ virtual void SAL_CALL disposing();
+
+// ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException){OComponentHelper::dispose();}
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener)throw(::com::sun::star::uno::RuntimeException) { OComponentHelper::addEventListener(aListener);}
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener)throw(::com::sun::star::uno::RuntimeException) { OComponentHelper::removeEventListener(aListener);}
+
+// ::com::sun::star::awt::XControl
+ virtual void SAL_CALL setContext(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Context) throw(::com::sun::star::uno::RuntimeException){}
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getContext() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL createPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent) throw(::com::sun::star::uno::RuntimeException){}
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > SAL_CALL getPeer() {return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > ();}
+ virtual sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) {return sal_False;}
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView() {return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > ();}
+ virtual void SAL_CALL setDesignMode(sal_Bool bOn) {}
+ virtual sal_Bool SAL_CALL isDesignMode() {return sal_False;}
+ virtual sal_Bool SAL_CALL isTransparent() {return sal_False;}
+
+// ::com::sun::star::form::XBoundControl
+ virtual sal_Bool SAL_CALL getLock() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLock(sal_Bool _bLock) throw(::com::sun::star::uno::RuntimeException);
+
+ sal_Bool Commit() {return m_pCellControl->Commit();}
+ void ImplInitSettings(Window* pParent, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground)
+ { m_pCellControl->ImplInitSettings(pParent, bFont, bForeground, bBackground); }
+
+ sal_Bool IsAlignedController() const { return m_pCellControl->IsAlignedController(); }
+ void AlignControl(sal_Int16 nAlignment)
+ { m_pCellControl->AlignControl(nAlignment);}
+};
+
+//==================================================================
+class FmXDataCell : public FmXGridCell
+{
+public:
+ TYPEINFO();
+ FmXDataCell(DbGridColumn* pColumn, DbCellControl* pControl):FmXGridCell(pColumn, pControl){}
+
+ virtual void Paint(OutputDevice& rDev,
+ const Rectangle& rRect,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+
+ void UpdateFromField(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
+ { m_pCellControl->UpdateFromField(xField, xFormatter); }
+
+protected:
+ void UpdateFromColumn();
+};
+
+//==================================================================
+class FmXTextCell : public FmXDataCell
+{
+public:
+ TYPEINFO();
+ FmXTextCell(DbGridColumn* pColumn, DbCellControl* pControl):FmXDataCell(pColumn, pControl){}
+
+ virtual void Paint(OutputDevice& rDev,
+ const Rectangle& rRect,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& xField,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter);
+
+ XubString GetText(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _xVariant,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter,
+ Color** ppColor = NULL)
+ {return m_pCellControl->GetFormatText(_xVariant, xFormatter, ppColor);}
+};
+
+//==================================================================
+class FmXEditCell : public FmXTextCell,
+ public ::com::sun::star::awt::XTextComponent
+{
+protected:
+ ::cppu::OInterfaceContainerHelper m_aTextListeners;
+ Edit* m_pEdit;
+
+public:
+ FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl);
+ ~FmXEditCell();
+
+ DECLARE_UNO3_AGG_DEFAULTS(FmXEditCell, FmXTextCell);
+ 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);
+
+// OComponentHelper
+ virtual void SAL_CALL disposing();
+
+// ::com::sun::star::awt::XTextComponent
+ virtual void SAL_CALL addTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) 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 insertText(const ::com::sun::star::awt::Selection& Sel, const ::rtl::OUString& Text) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setSelection(const ::com::sun::star::awt::Selection& aSelection) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Selection SAL_CALL getSelection() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isEditable() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setEditable(sal_Bool bEditable) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getMaxTextLen() throw(::com::sun::star::uno::RuntimeException);
+
+protected:
+ DECL_LINK( OnTextChanged, void* );
+};
+
+//==================================================================
+class FmXCheckBoxCell : public FmXDataCell,
+ public ::com::sun::star::awt::XCheckBox
+{
+ ::cppu::OInterfaceContainerHelper m_aItemListeners;
+ CheckBox* m_pBox;
+
+public:
+ FmXCheckBoxCell(DbGridColumn* pColumn, DbCellControl* pControl);
+ ~FmXCheckBoxCell();
+
+// UNO
+ DECLARE_UNO3_AGG_DEFAULTS(FmXCheckBoxCell, FmXDataCell);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+
+// OComponentHelper
+ virtual void SAL_CALL disposing();
+
+// ::com::sun::star::awt::XCheckBox
+ virtual void SAL_CALL addItemListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItemListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getState() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setState(sal_Int16 n) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLabel(const ::rtl::OUString& Label) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL enableTriState(sal_Bool b) throw(::com::sun::star::uno::RuntimeException);
+
+protected:
+ DECL_LINK( OnClick, void* );
+};
+
+//==================================================================
+class FmXListBoxCell : public FmXTextCell,
+ public ::com::sun::star::awt::XListBox
+{
+ ::cppu::OInterfaceContainerHelper m_aItemListeners,
+ m_aActionListeners;
+ ListBox* m_pBox;
+
+public:
+ FmXListBoxCell(DbGridColumn* pColumn, DbCellControl* pControl);
+ ~FmXListBoxCell();
+
+ DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+
+// OComponentHelper
+ virtual void SAL_CALL disposing();
+
+// ::com::sun::star::awt::XListBox
+ virtual void SAL_CALL addItemListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItemListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addActionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeActionListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addItem(const ::rtl::OUString& aItem, sal_Int16 nPos) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addItems(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aItems, sal_Int16 nPos) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItems(sal_Int16 nPos, sal_Int16 nCount) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getItemCount() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getItem(sal_Int16 nPos) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getSelectedItemPos() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedItem() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSelectedItems() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL SAL_CALL selectItemPos(sal_Int16 nPos, sal_Bool bSelect) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL SAL_CALL selectItemsPos(const ::com::sun::star::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL SAL_CALL selectItem(const ::rtl::OUString& aItem, sal_Bool bSelect) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isMutipleMode() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL SAL_CALL setMultipleMode(sal_Bool bMulti) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getDropDownLineCount() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL SAL_CALL setDropDownLineCount(sal_Int16 nLines) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL SAL_CALL makeVisible(sal_Int16 nEntry) throw(::com::sun::star::uno::RuntimeException);
+
+protected:
+ DECL_LINK( OnSelect, void* );
+ DECL_LINK( OnDoubleClick, void* );
+};
+
+//==================================================================
+class FmXFilterCell :public FmXGridCell
+ ,public ::com::sun::star::awt::XTextComponent
+ ,public ::com::sun::star::lang::XUnoTunnel
+{
+ ::cppu::OInterfaceContainerHelper m_aTextListeners;
+public:
+ TYPEINFO();
+ FmXFilterCell(DbGridColumn* pColumn = NULL, DbCellControl* pControl = NULL);
+ ~FmXFilterCell();
+
+ DECLARE_UNO3_AGG_DEFAULTS(FmXFilterCell, FmXGridCell);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+
+// XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+// helpers for XUnoTunnel
+ static const ::com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
+ static FmXFilterCell* getImplementation(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxObject);
+
+// Painting the filter text
+ void Paint(OutputDevice& rDev, const Rectangle& rRect);
+ void Update(){m_pCellControl->Update();}
+
+// OComponentHelper
+ virtual void SAL_CALL disposing();
+
+// ::com::sun::star::awt::XTextComponent
+ virtual void SAL_CALL addTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTextListener(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l) 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 insertText(const ::com::sun::star::awt::Selection& Sel, const ::rtl::OUString& Text) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setSelection(const ::com::sun::star::awt::Selection& aSelection) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Selection SAL_CALL getSelection() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isEditable() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setEditable(sal_Bool bEditable) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getMaxTextLen() throw(::com::sun::star::uno::RuntimeException);
+
+protected:
+ DECL_LINK( OnCommit, void* );
+};
+
+#endif // _SVX_GRIDCELL_HXX
+
diff --git a/svx/source/inc/gridcols.hxx b/svx/source/inc/gridcols.hxx
new file mode 100644
index 0000000000..43c7e3184f
--- /dev/null
+++ b/svx/source/inc/gridcols.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * $RCSfile: gridcols.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_GRIDCOLS_HXX
+#define _SVX_GRIDCOLS_HXX
+
+#ifndef _FM_STATIC_HXX_
+#include "fmstatic.hxx"
+#endif
+
+// liste der moeglichen Controls
+DECLARE_CONSTASCII_USTRING(FM_COL_TEXTFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COL_CHECKBOX);
+DECLARE_CONSTASCII_USTRING(FM_COL_COMBOBOX);
+DECLARE_CONSTASCII_USTRING(FM_COL_LISTBOX);
+DECLARE_CONSTASCII_USTRING(FM_COL_NUMERICFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COL_DATEFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COL_TIMEFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COL_CURRENCYFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COL_PATTERNFIELD);
+DECLARE_CONSTASCII_USTRING(FM_COL_FORMATTEDFIELD);
+
+
+// column type ids
+#define TYPE_CHECKBOX 0
+#define TYPE_COMBOBOX 1
+#define TYPE_CURRENCYFIELD 2
+#define TYPE_DATEFIELD 3
+#define TYPE_FORMATTEDFIELD 4
+#define TYPE_LISTBOX 5
+#define TYPE_NUMERICFIELD 6
+#define TYPE_PATTERNFIELD 7
+#define TYPE_TEXTFIELD 8
+#define TYPE_TIMEFIELD 9
+
+//------------------------------------------------------------------------------
+sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName);
+
+
+#endif // _SVX_GRIDCOLS_HXX
+
diff --git a/svx/source/inc/hlmarkwn.hrc b/svx/source/inc/hlmarkwn.hrc
new file mode 100644
index 0000000000..a7435fea66
--- /dev/null
+++ b/svx/source/inc/hlmarkwn.hrc
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * $RCSfile: hlmarkwn.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_APPLY 1
+#define BT_CLOSE 2
+#define TLB_MARK 3
+
+//#define HYPERLINK_BMP_EXPAND 301
+//#define HYPERLINK_BMP_COLLAPSE 302
+
diff --git a/svx/source/inc/hlmarkwn.hxx b/svx/source/inc/hlmarkwn.hxx
new file mode 100644
index 0000000000..63b073dab7
--- /dev/null
+++ b/svx/source/inc/hlmarkwn.hxx
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ * $RCSfile: hlmarkwn.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_BKWND_HYPERLINK_HXX
+#define _SVX_BKWND_HYPERLINK_HXX
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
+#include <com/sun/star/container/XNameAccess.hpp>
+#endif
+
+#ifndef _SV_FLOATWIN_HXX
+#include <vcl/floatwin.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _SVTREEBOX_HXX
+#include <svtools/svtreebx.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include <rtl/ustring>
+#endif
+
+class SvxHyperlinkTabPageBase;
+
+#define LERR_NOERROR 0
+#define LERR_NOENTRIES 1
+#define LERR_DOCNOTOPEN 2
+
+//########################################################################
+//# #
+//# Tree-Window #
+//# #
+//########################################################################
+
+class SvxHlinkDlgMarkWnd;
+
+class SvxHlmarkTreeLBox : public SvTreeListBox
+{
+private:
+ SvxHlinkDlgMarkWnd* mpParentWnd;
+
+public:
+ SvxHlmarkTreeLBox( Window* pParent, const ResId& rResId );
+
+ virtual void Paint( const Rectangle& rRect );
+};
+
+//########################################################################
+//# #
+//# Window-Class #
+//# #
+//########################################################################
+
+class SvxHlinkDlgMarkWnd : public FloatingWindow
+{
+private:
+ friend SvxHlmarkTreeLBox;
+
+ PushButton maBtApply;
+ PushButton maBtClose;
+ //SvTreeListBox maLbTree;
+ SvxHlmarkTreeLBox maLbTree;
+
+ BOOL mbUserMoved;
+ BOOL mbFirst;
+
+ SvxHyperlinkTabPageBase* mpParent;
+
+ String maStrLastURL;
+
+ USHORT mnError;
+
+protected:
+ BOOL RefreshFromDoc( ::rtl::OUString aURL );
+
+ SvLBoxEntry* FindEntry ( String aStrName );
+ void ClearTree();
+ int FillTree( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xLinks, SvLBoxEntry* pParentEntry =NULL );
+
+ virtual void Move ();
+
+ DECL_LINK (ClickApplyHdl_Impl, void * );
+ DECL_LINK (ClickCloseHdl_Impl, void * );
+
+public:
+ SvxHlinkDlgMarkWnd (SvxHyperlinkTabPageBase *pParent);
+ ~SvxHlinkDlgMarkWnd();
+
+ const BOOL MoveTo ( Point aNewPos );
+ void RefreshTree ( String aStrURL );
+ void SelectEntry ( String aStrMark );
+
+ const BOOL ConnectToDialog( BOOL bDoit = TRUE );
+
+ USHORT SetError( USHORT nError);
+};
+
+
+#endif // _SVX_BKWND_HYPERLINK_HXX
diff --git a/svx/source/inc/hyperdlg.hrc b/svx/source/inc/hyperdlg.hrc
new file mode 100644
index 0000000000..d99437632f
--- /dev/null
+++ b/svx/source/inc/hyperdlg.hrc
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: hyperdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+/* Tabpage : Hyperlink - Internet */
+
+#define GRP_LINKTYPE 1
+#define RB_LINKTYP_INTERNET 2
+#define RB_LINKTYP_FTP 3
+#define RB_LINKTYP_TELNET 4
+#define FT_TARGET_HTML 5
+#define CB_TARGET_HTML 6
+#define FT_LOGIN 7
+#define ED_LOGIN 8
+#define FT_PASSWD 9
+#define ED_PASSWD 10
+#define CBX_ANONYMOUS 11
+#define BTN_BROWSE 12
+#define BTN_TARGET 13
+
+/* Tabpage : Hyperlink - Mail & News */
+
+#define GRP_MAILNEWS 1
+#define RB_LINKTYP_MAIL 2
+#define RB_LINKTYP_NEWS 3
+#define FT_RECEIVER 4
+#define CB_RECEIVER 5
+#define FT_SUBJECT 6
+#define ED_SUBJECT 7
+#define BTN_ADRESSBOOK 8
+
+/* Tabpage : Hyperlink - Document */
+
+#define GRP_DOCUMENT 1
+#define FT_PATH_DOC 2
+#define CB_PATH_DOC 3
+#define BTN_FILEOPEN 4
+#define GRP_TARGET 5
+#define FT_TARGET_DOC 6
+#define ED_TARGET_DOC 7
+#define FT_URL 8
+#define FT_FULL_URL 9
+
+/* Tabpage : Hyperlink - New document */
+
+#define GRP_NEWDOCUMENT 1
+#define RB_EDITNOW 2
+#define RB_EDITLATER 3
+#define FT_PATH_NEWDOC 4
+#define ED_PATH_NEWDOC 5
+#define FT_DOCUMENT_TYPES 6
+#define LB_DOCUMENT_TYPES 7
+#define BTN_CREATE 8
+
+/* Tabpage-section : Hyperlink - more justifications */
+
+#define GRP_MORE 30
+#define FT_FRAME 31
+#define CB_FRAME 32
+#define FT_FORM 33
+#define LB_FORM 34
+#define FT_INDICATION 35
+#define ED_INDICATION 36
+#define FT_TEXT 37
+#define ED_TEXT 38
+#define BTN_SCRIPT 39
+
diff --git a/svx/source/inc/linectrl.hrc b/svx/source/inc/linectrl.hrc
new file mode 100644
index 0000000000..6e063a6789
--- /dev/null
+++ b/svx/source/inc/linectrl.hrc
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * $RCSfile: linectrl.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_SVXCTRL_LINECTRL 257
+
diff --git a/svx/source/inc/tabwin.hxx b/svx/source/inc/tabwin.hxx
new file mode 100644
index 0000000000..58fe65c5a9
--- /dev/null
+++ b/svx/source/inc/tabwin.hxx
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabwin.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_TABWIN_HXX
+#define _SVX_TABWIN_HXX
+
+#ifndef _SVTREEBOX_HXX //autogen
+#include <svtools/svtreebx.hxx>
+#endif
+
+#ifndef _SV_FLOATWIN_HXX //autogen
+#include <vcl/floatwin.hxx>
+#endif
+
+#ifndef _BASEDLGS_HXX //autogen
+#include <sfx2/basedlgs.hxx>
+#endif
+
+#ifndef _SFX_CHILDWIN_HXX //autogen
+#include <sfx2/childwin.hxx>
+#endif
+
+#ifndef _SFXCTRLITEM_HXX //autogen
+#include <sfx2/ctrlitem.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_FORM_XFORM_HPP_
+#include <com/sun/star/form/XForm.hpp>
+#endif
+
+//#ifndef _SVX_FMTOOLS_HXX
+//#include "fmtools.hxx"
+//#endif
+
+#include <unotools/propmultiplex.hxx>
+
+//==================================================================
+class FmFieldWin;
+class FmFieldWinListBox: public SvTreeListBox
+{
+ FmFieldWin* pTabWin;
+
+protected:
+ virtual void Command( const CommandEvent& rEvt );
+
+public:
+ FmFieldWinListBox( FmFieldWin* pParent );
+ virtual ~FmFieldWinListBox();
+
+ virtual sal_Bool QueryDrop( DropEvent& rDEvt )
+ {
+ return (!nDragDropMode) ? sal_False : SvTreeListBox::QueryDrop(rDEvt);
+ }
+ // this prevents an assertion the base class makes (unjustified ?) to fail - 67071 - fs - 21.06.99
+};
+
+//========================================================================
+class FmFormShell;
+class FmFieldWinData
+{
+public:
+ FmFieldWinData();
+ ~FmFieldWinData();
+};
+
+//========================================================================
+class FmFieldWin : public SfxFloatingWindow,
+ public SfxControllerItem,
+ public ::utl::OPropertyChangeListener
+{
+ ::osl::Mutex m_aMutex;
+ FmFieldWinListBox* pListBox;
+ FmFieldWinData* pData;
+ ::rtl::OUString m_aDatabaseName,
+ m_aObjectName;
+ sal_Int32 m_nObjectType;
+
+ ::utl::OPropertyChangeMultiplexer* m_pChangeListener;
+
+public:
+ FmFieldWin(SfxBindings *pBindings,
+ SfxChildWindow *pMgr, Window* pParent);
+
+ virtual ~FmFieldWin();
+ virtual void Resize();
+ virtual sal_Bool Close();
+ virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState);
+
+ FmFieldWinData* GetData() const {return pData;}
+
+ sal_Bool Update(FmFormShell*);
+ sal_Bool Update(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > &);
+ void FillInfo( SfxChildWinInfo& rInfo ) const;
+
+ const ::rtl::OUString& GetDatabaseName() const { return m_aDatabaseName; }
+ const ::rtl::OUString& GetObjectName() const { return m_aObjectName; }
+ sal_Int32 GetObjectType() const { return m_nObjectType; }
+
+ // FmXChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+//========================================================================
+class FmFieldWinMgr : public SfxChildWindow
+{
+public:
+ FmFieldWinMgr(Window *pParent, sal_uInt16 nId,
+ SfxBindings *pBindings, SfxChildWinInfo *pInfo);
+ SFX_DECL_CHILDWINDOW(FmFieldWinMgr);
+};
+
+
+#endif
+
diff --git a/svx/source/inc/tbxform.hxx b/svx/source/inc/tbxform.hxx
new file mode 100644
index 0000000000..cfc28279c8
--- /dev/null
+++ b/svx/source/inc/tbxform.hxx
@@ -0,0 +1,249 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxform.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_TBXFORM_HXX
+#define _SVX_TBXFORM_HXX
+
+#ifndef _SFXTBXCTRL_HXX //autogen
+#include <sfx2/tbxctrl.hxx>
+#endif
+
+#ifndef _SFXTBXMGR_HXX //autogen
+#include <sfx2/tbxmgr.hxx>
+#endif
+
+#ifndef _SV_FIELD_HXX //autogen
+#include <vcl/field.hxx>
+#endif
+
+#ifndef _SV_DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+
+//========================================================================
+
+class FmInputRecordNoDialog : public ModalDialog
+{
+public:
+ FixedText m_aLabel;
+ NumericField m_aRecordNo;
+ OKButton m_aOk;
+ CancelButton m_aCancel;
+
+public:
+ FmInputRecordNoDialog(Window * pParent);
+
+ void SetValue(double dNew) { m_aRecordNo.SetValue(dNew); }
+ long GetValue() const { return m_aRecordNo.GetValue(); }
+};
+
+//========================================================================
+class SvxFmAbsRecWin : public NumericField
+{
+ SfxToolBoxControl* m_pController;
+ // for invalidating our content whe losing the focus
+public:
+ SvxFmAbsRecWin( Window* _pParent, SfxToolBoxControl* _pController );
+ ~SvxFmAbsRecWin();
+
+ virtual void KeyInput( const KeyEvent& rKeyEvt );
+ virtual void LoseFocus();
+
+protected:
+ virtual void FirePosition();
+};
+
+
+//========================================================================
+class SvxFmConfigWin : public SfxPopupWindow
+{
+private:
+ SfxToolBoxManager aTbx;
+ Link aSelectLink;
+
+ DECL_LINK( TbxSelectHdl, ToolBox* );
+
+public:
+ SvxFmConfigWin( USHORT nId, ResId aRIdWin, ResId aRIdTbx, SfxBindings& rBindings );
+ ~SvxFmConfigWin();
+
+ void StartSelection()
+ { aTbx.GetToolBox().StartSelection(); }
+ void Update();
+ virtual void PopupModeEnd();
+};
+
+
+//========================================================================
+class SvxFmTbxCtlConfig : public SfxToolBoxControl
+{
+private:
+ UINT16 nLastSlot;
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlConfig( USHORT nId, ToolBox& rTbx, SfxBindings& );
+ ~SvxFmTbxCtlConfig() {}
+
+ virtual void Select( USHORT nModifier );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+};
+
+//========================================================================
+class FixedText;
+class SvxFmTbxCtlAbsRec : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlAbsRec( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+ ~SvxFmTbxCtlAbsRec();
+
+ virtual Window* CreateItemWindow( Window* pParent );
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+
+//========================================================================
+class SvxFmTbxCtlRecText : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlRecText( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+ ~SvxFmTbxCtlRecText();
+
+ virtual Window* CreateItemWindow( Window* pParent );
+};
+
+//========================================================================
+class SvxFmTbxCtlRecFromText : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlRecFromText( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+ ~SvxFmTbxCtlRecFromText();
+
+ virtual Window* CreateItemWindow( Window* pParent );
+};
+
+//========================================================================
+class SvxFmTbxCtlRecTotal : public SfxToolBoxControl
+{
+ FixedText* pFixedText;
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlRecTotal( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+ ~SvxFmTbxCtlRecTotal();
+
+ virtual Window* CreateItemWindow( Window* pParent );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+
+/*
+//========================================================================
+class SvxFmTbxCtlFilterText : public SfxToolBoxControl
+{
+ FixedText* pFixedText;
+ XubString aText;
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxFmTbxCtlFilterText( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+ ~SvxFmTbxCtlFilterText();
+
+ virtual Window* CreateItemWindow( Window* pParent );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+*/
+
+//========================================================================
+class SvxFmTbxNextRec : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxFmTbxNextRec( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+};
+
+//========================================================================
+class SvxFmTbxPrevRec : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxFmTbxPrevRec( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+};
+
+
+#endif
+
diff --git a/svx/source/inc/trace.hxx b/svx/source/inc/trace.hxx
new file mode 100644
index 0000000000..6f6aff7145
--- /dev/null
+++ b/svx/source/inc/trace.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * $RCSfile: trace.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _TRACE_HXX_
+#define _TRACE_HXX_
+
+#if defined(DBG_UTIL) && defined(ENABLE_RANGE_TRACING)
+
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+#ifndef _VOS_THREAD_HXX_
+#include <vos/thread.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+#ifndef _SVX_FMSTL_HXX
+#include "fmstl.hxx"
+#endif
+
+
+class Tracer
+{
+ ByteString m_sBlockDescription;
+
+ static map< ::vos::OThread::TThreadIdentifier, INT32, ::std::less< ::vos::OThread::TThreadIdentifier > >
+ s_aThreadIndents;
+
+ static ::vos::OMutex s_aMapSafety;
+
+public:
+ Tracer(const char* _pBlockDescription);
+ ~Tracer();
+
+ void TraceString(const char* _pMessage);
+ void TraceString1StringParam(const char* _pMessage, const char* _pParam);
+};
+
+
+#define TRACE_RANGE(range_description) Tracer aTrace(range_description);
+#define TRACE_RANGE_MESSAGE(message) { aTrace.TraceString(message); }
+#define TRACE_RANGE_MESSAGE1(message, param) { aTrace.TraceString1StringParam(message, param); }
+
+#else
+
+#define TRACE_RANGE(range_description) ;
+#define TRACE_RANGE_MESSAGE(message) ;
+#define TRACE_RANGE_MESSAGE1(message, param) ;
+
+#endif
+
+#endif // _TRACE_HXX_
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
new file mode 100644
index 0000000000..f806345a6b
--- /dev/null
+++ b/svx/source/items/algitem.cxx
@@ -0,0 +1,669 @@
+/*************************************************************************
+ *
+ * $RCSfile: algitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "svxitems.hrc"
+
+#define ITEMID_HORJUSTIFY 0
+#define ITEMID_VERJUSTIFY 0
+#define ITEMID_ORIENTATION 0
+#define ITEMID_LINEBREAK 0
+#define ITEMID_MARGIN 0
+
+#include <tools/stream.hxx>
+
+#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
+#include <com/sun/star/table/BorderLine.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLVERTJUSTIFY_HPP_
+#include <com/sun/star/table/CellVertJustify.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_SHADOWLOCATION_HPP_
+#include <com/sun/star/table/ShadowLocation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_TABLEBORDER_HPP_
+#include <com/sun/star/table/TableBorder.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_SHADOWFORMAT_HPP_
+#include <com/sun/star/table/ShadowFormat.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLRANGEADDRESS_HPP_
+#include <com/sun/star/table/CellRangeAddress.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLCONTENTTYPE_HPP_
+#include <com/sun/star/table/CellContentType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_TABLEORIENTATION_HPP_
+#include <com/sun/star/table/TableOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLHORIJUSTIFY_HPP_
+#include <com/sun/star/table/CellHoriJustify.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_SORTFIELD_HPP_
+#include <com/sun/star/util/SortField.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_SORTFIELDTYPE_HPP_
+#include <com/sun/star/util/SortFieldType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLORIENTATION_HPP_
+#include <com/sun/star/table/CellOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLADDRESS_HPP_
+#include <com/sun/star/table/CellAddress.hpp>
+#endif
+
+#include "algitem.hxx"
+#include "dialmgr.hxx"
+#include "itemtype.hxx"
+#include "unomid.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// Konvertierung fuer UNO
+#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
+#define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
+
+// STATIC DATA -----------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY( SvxHorJustifyItem, SfxEnumItem );
+TYPEINIT1_AUTOFACTORY( SvxVerJustifyItem, SfxEnumItem );
+TYPEINIT1_AUTOFACTORY( SvxOrientationItem, SfxEnumItem );
+TYPEINIT1_AUTOFACTORY( SvxMarginItem, SfxPoolItem );
+
+// class SvxHorJustifyItem -----------------------------------------------
+
+SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify,
+ const USHORT nId ) :
+ SfxEnumItem( nId, eJustify )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxHorJustifyItem::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 = GetValueText( GetValue() );
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ table::CellHoriJustify eUno = table::CellHoriJustify_STANDARD;
+ switch ( (SvxCellHorJustify)GetValue() )
+ {
+ case SVX_HOR_JUSTIFY_STANDARD: eUno = table::CellHoriJustify_STANDARD; break;
+ case SVX_HOR_JUSTIFY_LEFT: eUno = table::CellHoriJustify_LEFT; break;
+ case SVX_HOR_JUSTIFY_CENTER: eUno = table::CellHoriJustify_CENTER; break;
+ case SVX_HOR_JUSTIFY_RIGHT: eUno = table::CellHoriJustify_RIGHT; break;
+ case SVX_HOR_JUSTIFY_BLOCK: eUno = table::CellHoriJustify_BLOCK; break;
+ case SVX_HOR_JUSTIFY_REPEAT: eUno = table::CellHoriJustify_REPEAT; break;
+ }
+ rVal <<= eUno;
+ return sal_True;
+}
+
+sal_Bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ table::CellHoriJustify eUno;
+ if(!(rVal >>= eUno))
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ eUno = (table::CellHoriJustify)nValue;
+ }
+ SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD;
+ switch (eUno)
+ {
+ case table::CellHoriJustify_STANDARD: eSvx = SVX_HOR_JUSTIFY_STANDARD; break;
+ case table::CellHoriJustify_LEFT: eSvx = SVX_HOR_JUSTIFY_LEFT; break;
+ case table::CellHoriJustify_CENTER: eSvx = SVX_HOR_JUSTIFY_CENTER; break;
+ case table::CellHoriJustify_RIGHT: eSvx = SVX_HOR_JUSTIFY_RIGHT; break;
+ case table::CellHoriJustify_BLOCK: eSvx = SVX_HOR_JUSTIFY_BLOCK; break;
+ case table::CellHoriJustify_REPEAT: eSvx = SVX_HOR_JUSTIFY_REPEAT; break;
+ }
+ SetValue( eSvx );
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+XubString SvxHorJustifyItem::GetValueText( USHORT nVal ) const
+{
+ DBG_ASSERT( nVal <= SVX_HOR_JUSTIFY_REPEAT, "enum overflow!" );
+ return SVX_RESSTR(RID_SVXITEMS_HORJUST_STANDARD + nVal);
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxHorJustifyItem::Clone( SfxItemPool* ) const
+{
+ return new SvxHorJustifyItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, USHORT ) const
+{
+ USHORT nVal;
+ rStream >> nVal;
+ return new SvxHorJustifyItem( (SvxCellHorJustify)nVal, Which() );
+}
+//------------------------------------------------------------------------
+
+USHORT SvxHorJustifyItem::GetValueCount() const
+{
+ return SVX_HOR_JUSTIFY_REPEAT + 1; // letzter Enum-Wert + 1
+}
+
+// class SvxVerJustifyItem -----------------------------------------------
+
+SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify,
+ const USHORT nId ) :
+ SfxEnumItem( nId, eJustify )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxVerJustifyItem::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 = GetValueText( GetValue() );
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ table::CellVertJustify eUno = table::CellVertJustify_STANDARD;
+ switch ( (SvxCellVerJustify)GetValue() )
+ {
+ case SVX_VER_JUSTIFY_STANDARD: eUno = table::CellVertJustify_STANDARD; break;
+ case SVX_VER_JUSTIFY_TOP: eUno = table::CellVertJustify_TOP; break;
+ case SVX_VER_JUSTIFY_CENTER: eUno = table::CellVertJustify_CENTER; break;
+ case SVX_VER_JUSTIFY_BOTTOM: eUno = table::CellVertJustify_BOTTOM; break;
+ }
+ rVal <<= eUno;
+ return sal_True;
+}
+
+sal_Bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ table::CellVertJustify eUno;
+ if(!(rVal >>= eUno))
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ eUno = (table::CellVertJustify)nValue;
+ }
+
+ SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
+ switch (eUno)
+ {
+ case table::CellVertJustify_STANDARD: eSvx = SVX_VER_JUSTIFY_STANDARD; break;
+ case table::CellVertJustify_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break;
+ case table::CellVertJustify_CENTER: eSvx = SVX_VER_JUSTIFY_CENTER; break;
+ case table::CellVertJustify_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break;
+ }
+ SetValue( eSvx );
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+XubString SvxVerJustifyItem::GetValueText( USHORT nVal ) const
+{
+ DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
+ return SVX_RESSTR(RID_SVXITEMS_VERJUST_STANDARD + nVal);
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxVerJustifyItem::Clone( SfxItemPool* ) const
+{
+ return new SvxVerJustifyItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, USHORT ) const
+{
+ USHORT nVal;
+ rStream >> nVal;
+ return new SvxVerJustifyItem( (SvxCellVerJustify)nVal, Which() );
+}
+
+//------------------------------------------------------------------------
+
+USHORT SvxVerJustifyItem::GetValueCount() const
+{
+ return SVX_VER_JUSTIFY_BOTTOM + 1; // letzter Enum-Wert + 1
+}
+
+// class SvxOrientationItem ----------------------------------------------
+
+SvxOrientationItem::SvxOrientationItem( const SvxCellOrientation eOrientation,
+ const USHORT nId):
+ SfxEnumItem( nId, eOrientation )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxOrientationItem::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 = GetValueText( GetValue() );
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SvxOrientationItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ table::CellOrientation eUno = table::CellOrientation_STANDARD;
+ switch ( (SvxCellOrientation)GetValue() )
+ {
+ case SVX_ORIENTATION_STANDARD: eUno = table::CellOrientation_STANDARD; break;
+ case SVX_ORIENTATION_TOPBOTTOM: eUno = table::CellOrientation_TOPBOTTOM; break;
+ case SVX_ORIENTATION_BOTTOMTOP: eUno = table::CellOrientation_BOTTOMTOP; break;
+ case SVX_ORIENTATION_STACKED: eUno = table::CellOrientation_STACKED; break;
+ }
+ rVal <<= eUno;
+ return sal_True;
+}
+
+sal_Bool SvxOrientationItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ table::CellOrientation eOrient;
+ if(!(rVal >>= eOrient))
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ eOrient = (table::CellOrientation)nValue;
+ }
+ SvxCellOrientation eSvx = SVX_ORIENTATION_STANDARD;
+ switch (eOrient)
+ {
+ case table::CellOrientation_STANDARD: eSvx = SVX_ORIENTATION_STANDARD; break;
+ case table::CellOrientation_TOPBOTTOM: eSvx = SVX_ORIENTATION_TOPBOTTOM; break;
+ case table::CellOrientation_BOTTOMTOP: eSvx = SVX_ORIENTATION_BOTTOMTOP; break;
+ case table::CellOrientation_STACKED: eSvx = SVX_ORIENTATION_STACKED; break;
+ }
+ SetValue( eSvx );
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+XubString SvxOrientationItem::GetValueText( USHORT nVal ) const
+{
+ DBG_ASSERT( nVal <= SVX_ORIENTATION_STACKED, "enum overflow!" );
+ return SVX_RESSTR(RID_SVXITEMS_ORI_STANDARD + nVal);
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxOrientationItem::Clone( SfxItemPool* ) const
+{
+ return new SvxOrientationItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxOrientationItem::Create( SvStream& rStream, USHORT ) const
+{
+ USHORT nVal;
+ rStream >> nVal;
+ return new SvxOrientationItem( (SvxCellOrientation)nVal, Which() );
+}
+
+//------------------------------------------------------------------------
+
+USHORT SvxOrientationItem::GetValueCount() const
+{
+ return SVX_ORIENTATION_STACKED + 1; // letzter Enum-Wert + 1
+}
+
+// class SvxMarginItem ---------------------------------------------------
+
+SvxMarginItem::SvxMarginItem( const USHORT nId ) :
+
+ SfxPoolItem( nId ),
+
+ nLeftMargin ( 20 ),
+ nTopMargin ( 20 ),
+ nRightMargin ( 20 ),
+ nBottomMargin( 20 )
+{
+}
+
+//------------------------------------------------------------------------
+
+SvxMarginItem::SvxMarginItem( sal_Int16 nLeft,
+ sal_Int16 nTop,
+ sal_Int16 nRight,
+ sal_Int16 nBottom,
+ const USHORT nId ) :
+ SfxPoolItem( nId ),
+
+ nLeftMargin ( nLeft ),
+ nTopMargin ( nTop ),
+ nRightMargin ( nRight ),
+ nBottomMargin( nBottom )
+{
+}
+
+
+//------------------------------------------------------------------------
+
+SvxMarginItem::SvxMarginItem( const SvxMarginItem& rItem ) :
+
+ SfxPoolItem( rItem.Which() )
+{
+ nLeftMargin = rItem.nLeftMargin;
+ nTopMargin = rItem.nTopMargin;
+ nRightMargin = rItem.nRightMargin;
+ nBottomMargin = rItem.nBottomMargin;
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxMarginItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ {
+ rText = GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ rText += GetMetricText( (long)nTopMargin, eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ rText += GetMetricText( (long)nRightMargin, eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ rText += GetMetricText( (long)nBottomMargin, eCoreUnit, ePresUnit );
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+ }
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ rText = SVX_RESSTR(RID_SVXITEMS_MARGIN_LEFT);
+ rText += GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ rText += cpDelim;
+ rText += SVX_RESSTR(RID_SVXITEMS_MARGIN_TOP);
+ rText += GetMetricText( (long)nTopMargin, eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ rText += cpDelim;
+ rText += SVX_RESSTR(RID_SVXITEMS_MARGIN_RIGHT);
+ rText += GetMetricText( (long)nRightMargin, eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ rText += cpDelim;
+ rText += SVX_RESSTR(RID_SVXITEMS_MARGIN_BOTTOM);
+ rText += GetMetricText( (long)nBottomMargin, eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ }
+#endif
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+int SvxMarginItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+
+ return ( ( nLeftMargin == ( (SvxMarginItem&)rItem ).nLeftMargin ) &&
+ ( nTopMargin == ( (SvxMarginItem&)rItem ).nTopMargin ) &&
+ ( nRightMargin == ( (SvxMarginItem&)rItem ).nRightMargin ) &&
+ ( nBottomMargin == ( (SvxMarginItem&)rItem ).nBottomMargin ) );
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxMarginItem::Clone( SfxItemPool* ) const
+{
+ return new SvxMarginItem(*this);
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxMarginItem::Create( SvStream& rStream, USHORT ) const
+{
+ sal_Int16 nLeft;
+ sal_Int16 nTop;
+ sal_Int16 nRight;
+ sal_Int16 nBottom;
+ rStream >> nLeft;
+ rStream >> nTop;
+ rStream >> nRight;
+ rStream >> nBottom;
+ return new SvxMarginItem( nLeft, nTop, nRight, nBottom, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SvStream& SvxMarginItem::Store( SvStream &rStream, USHORT nItemVersion) const
+{
+ rStream << nLeftMargin;
+ rStream << nTopMargin;
+ rStream << nRightMargin;
+ rStream << nBottomMargin;
+ return rStream;
+}
+
+
+//------------------------------------------------------------------------
+
+sal_Bool SvxMarginItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ sal_Bool bConvert = ( ( nMemberId & CONVERT_TWIPS ) != 0 );
+ switch ( nMemberId & ~CONVERT_TWIPS )
+ {
+ // jetzt alles signed
+ case MID_MARGIN_L_MARGIN:
+ rVal <<= (sal_Int32)( bConvert ? TWIP_TO_MM100(nLeftMargin) : nLeftMargin );
+ break;
+ case MID_MARGIN_R_MARGIN:
+ rVal <<= (sal_Int32)( bConvert ? TWIP_TO_MM100(nRightMargin) : nRightMargin );
+ break;
+ case MID_MARGIN_UP_MARGIN:
+ rVal <<= (sal_Int32)( bConvert ? TWIP_TO_MM100(nTopMargin) : nTopMargin );
+ break;
+ case MID_MARGIN_LO_MARGIN:
+ rVal <<= (sal_Int32)( bConvert ? TWIP_TO_MM100(nBottomMargin) : nBottomMargin );
+ break;
+ default:
+ DBG_ERROR("unknown MemberId");
+ return sal_False;
+ }
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SvxMarginItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Bool bConvert = ( ( nMemberId & CONVERT_TWIPS ) != 0 );
+ long nMaxVal = bConvert ? TWIP_TO_MM100(SHRT_MAX) : SHRT_MAX; // Members sind sal_Int16
+ sal_Int32 nVal;
+ if(!(rVal >>= nVal) || (nVal > nMaxVal))
+ return sal_False;
+
+ switch ( nMemberId & ~CONVERT_TWIPS )
+ {
+ case MID_MARGIN_L_MARGIN:
+ nLeftMargin = (sal_Int16)( bConvert ? MM100_TO_TWIP(nVal) : nVal );
+ break;
+ case MID_MARGIN_R_MARGIN:
+ nRightMargin = (sal_Int16)( bConvert ? MM100_TO_TWIP(nVal) : nVal );
+ break;
+ case MID_MARGIN_UP_MARGIN:
+ nTopMargin = (sal_Int16)( bConvert ? MM100_TO_TWIP(nVal) : nVal );
+ break;
+ case MID_MARGIN_LO_MARGIN:
+ nBottomMargin = (sal_Int16)( bConvert ? MM100_TO_TWIP(nVal) : nVal );
+ break;
+ default:
+ DBG_ERROR("unknown MemberId");
+ return sal_False;
+ }
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SvxMarginItem::SetLeftMargin( sal_Int16 nLeft )
+{
+ nLeftMargin = nLeft;
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SvxMarginItem::SetTopMargin( sal_Int16 nTop )
+{
+ nTopMargin = nTop;
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SvxMarginItem::SetRightMargin( sal_Int16 nRight )
+{
+ nRightMargin = nRight;
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SvxMarginItem::SetBottomMargin( sal_Int16 nBottom )
+{
+ nBottomMargin = nBottom;
+ return sal_True;
+}
+
+
diff --git a/svx/source/items/boxobj.hxx b/svx/source/items/boxobj.hxx
new file mode 100644
index 0000000000..7c93a9dbdb
--- /dev/null
+++ b/svx/source/items/boxobj.hxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * $RCSfile: boxobj.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_BOXOBJ_HXX
+#define _SVX_BOXOBJ_HXX
+
+
+#ifndef _SFX_SHOBJ_HXX //autogen
+#include <sfx2/shobj.hxx>
+#endif
+class SvxBoxItem;
+class SvxBoxInfoItem;
+class SvxBorderLine;
+
+//-------------------------------------------------------------------------
+
+class SvxBoxObject: public SfxShellSubObject
+
+/* [Beschreibung]
+
+ Diese SbxObject-Subklasse kann das <SvxBoxItem> und <SvxBoxInfoItem>
+ im SBX-System recorden und wieder abspielen. Hier werden keine
+ G"ultigkeitspr"ufungen durchgef"uhrt, diese m"ussen in abgeleiteten
+ Klassen spezifisch implementiert werden; dazu sind virtuelle Methoden
+ vorhanden.
+*/
+
+{
+friend class SvxBoxLineObject_Impl;
+
+ SvxBoxItem* pBox;
+ SvxBoxInfoItem* pBoxInfo;
+
+#ifdef _SVX_BOXOBJ_CXX
+private:
+ const SvxBorderLine* GetLine_Impl( USHORT nSID ) const;
+ BOOL SetLine_Impl( USHORT nSID, const SvxBorderLine *pLine );
+ void Update_Impl() const;
+#endif
+
+protected:
+ // Schnittstelle zum SbxObject/SvDispatch/SfxShell..Object
+ void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+ virtual ULONG SetProperty( USHORT nSID, SbxVariable &rRet );
+ virtual ULONG GetProperty( USHORT nSID, SbxVariable &rRet );
+
+ // bei den folgenden Methoden sind die Items bereits besorgt worden
+ virtual SbxError GetLineColor( USHORT nSID, Color &rColor ) const;
+ virtual SbxError GetLineStyle( USHORT nSID,
+ USHORT &rOutWidth, USHORT &rDist, USHORT &rInWidth ) const;
+ virtual SbxError GetDistance( USHORT &rDist ) const;
+
+ // nach den folgenden Methoden werden die Items wieder in die Shell gesetzt
+ virtual SbxError SetLineColor( USHORT nSID, const Color &rColor );
+ virtual SbxError SetLineStyle( USHORT nSID,
+ USHORT nOutWidth, USHORT nDist, USHORT nInWidth );
+ virtual SbxError SetDistance( USHORT nDist );
+
+public:
+ TYPEINFO();
+ SvxBoxObject( SfxShell *pShell = 0 );
+
+ ~SvxBoxObject();
+
+ const SvxBoxItem& GetBoxItem() const { return *pBox; }
+ const SvxBoxInfoItem& GetBoxInfoItem() const { return *pBoxInfo; }
+
+ virtual String GenerateSource( const String &rLinePrefix,
+ const SbxObject *pRelativeTo );
+};
+
+
+#endif
+
diff --git a/svx/source/items/bulitem.cxx b/svx/source/items/bulitem.cxx
new file mode 100644
index 0000000000..060f2f130c
--- /dev/null
+++ b/svx/source/items/bulitem.cxx
@@ -0,0 +1,463 @@
+/*************************************************************************
+ *
+ * $RCSfile: bulitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+#ifndef _SV_SYSTEM_HXX
+#include <vcl/system.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_BULITEM_CXX
+
+#include "bulitem.hxx"
+#include "svxerr.hxx"
+
+#define BULITEM_VERSION ((USHORT)2)
+
+// -----------------------------------------------------------------------
+
+TYPEINIT1(SvxBulletItem,SfxPoolItem);
+
+// -----------------------------------------------------------------------
+
+void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont )
+{
+ USHORT nTemp;
+
+ rStream << rFont.GetColor();
+ nTemp = (USHORT)rFont.GetFamily(); rStream << nTemp;
+ nTemp = (USHORT)GetStoreCharSet( rFont.GetCharSet(),
+ rStream.GetVersion() );
+ rStream << nTemp;
+ nTemp = (USHORT)rFont.GetPitch(); rStream << nTemp;
+ nTemp = (USHORT)rFont.GetAlign(); rStream << nTemp;
+ nTemp = (USHORT)rFont.GetWeight(); rStream << nTemp;
+ nTemp = (USHORT)rFont.GetUnderline(); rStream << nTemp;
+ nTemp = (USHORT)rFont.GetStrikeout(); rStream << nTemp;
+ nTemp = (USHORT)rFont.GetItalic(); rStream << nTemp;
+
+ // UNICODE: rStream << rFont.GetName();
+ rStream.WriteByteString(rFont.GetName());
+
+ rStream << rFont.IsOutline();
+ rStream << rFont.IsShadow();
+ rStream << rFont.IsTransparent();
+}
+
+// -----------------------------------------------------------------------
+
+Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer )
+{
+ Font aFont;
+ Color aColor;
+ rStream >> aColor; aFont.SetColor( aColor );
+ USHORT nTemp;
+ rStream >> nTemp; aFont.SetFamily((FontFamily)nTemp);
+ rStream >> nTemp; aFont.SetCharSet((rtl_TextEncoding)nTemp);
+ rStream >> nTemp; aFont.SetPitch((FontPitch)nTemp);
+ rStream >> nTemp; aFont.SetAlign((FontAlign)nTemp);
+ rStream >> nTemp; aFont.SetWeight((FontWeight)nTemp);
+ rStream >> nTemp; aFont.SetUnderline((FontUnderline)nTemp);
+ rStream >> nTemp; aFont.SetStrikeout((FontStrikeout)nTemp);
+ rStream >> nTemp; aFont.SetItalic((FontItalic)nTemp);
+
+ // UNICODE: rStream >> aName; aFont.SetName( aName );
+ String aName;
+ rStream.ReadByteString(aName);
+ aFont.SetName( aName );
+
+ if( nVer == 1 )
+ {
+ long nHeight, nWidth;
+ rStream >> nHeight; rStream >> nWidth; Size aSize( nWidth, nHeight );
+ aFont.SetSize( aSize );
+ }
+
+ BOOL bTemp;
+ rStream >> bTemp; aFont.SetOutline( bTemp );
+ rStream >> bTemp; aFont.SetShadow( bTemp );
+ rStream >> bTemp; aFont.SetTransparent( bTemp );
+ return aFont;
+}
+
+
+// -----------------------------------------------------------------------
+
+SvxBulletItem::SvxBulletItem( USHORT nWhich ) : SfxPoolItem( nWhich )
+{
+ SetDefaultFont_Impl();
+ SetDefaults_Impl();
+ nValidMask = 0xFFFF;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBulletItem::SvxBulletItem( BYTE nNewStyle, const Font& rFont, USHORT nStart,
+ USHORT nWhich ) : SfxPoolItem( nWhich )
+{
+ SetDefaults_Impl();
+ nStyle = nNewStyle;
+ aFont = rFont;
+ nValidMask = 0xFFFF;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb,
+ USHORT nWhich ) : SfxPoolItem( nWhich )
+{
+ SetDefaults_Impl();
+ aFont = rFont;
+ cSymbol = cSymb;
+ nStyle = BS_BULLET;
+ nValidMask = 0xFFFF;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, USHORT nWhich ) :
+ SfxPoolItem( nWhich ),
+ aGraphicObject( rBmp )
+{
+ SetDefaults_Impl();
+ nStyle = BS_BMP;
+ nValidMask = 0xFFFF;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, USHORT nWhich ) :
+ SfxPoolItem( nWhich ),
+ aGraphicObject( rGraphicObject )
+{
+ SetDefaults_Impl();
+ nStyle = BS_BMP;
+ nValidMask = 0xFFFF;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBulletItem::SvxBulletItem( SvStream& rStrm, USHORT nWhich )
+ : SfxPoolItem( nWhich )
+{
+ rStrm >> nStyle;
+ if( nStyle != BS_BMP )
+ aFont = CreateFont( rStrm, BULITEM_VERSION );
+ else
+ {
+ // Sicheres Laden mit Test auf leere Bitmap
+ Bitmap aBmp;
+ const UINT32 nOldPos = rStrm.Tell();
+ // #69345# Errorcode beim Bitmap lesen ignorieren,
+ // siehe Kommentar #67581# in SvxBulletItem::Store()
+ BOOL bOldError = rStrm.GetError() ? TRUE : FALSE;
+ rStrm >> aBmp;
+ if ( !bOldError && rStrm.GetError() )
+ {
+ rStrm.ResetError();
+ // #71493# Keine Warnung: Das BulletItem interessiert seit 5.0 im Dateiformat nicht mehr.
+ // rStrm.SetError(ERRCODE_CLASS_READ | ERRCODE_SVX_BULLETITEM_NOBULLET | ERRCODE_WARNING_MASK);
+ }
+
+ if(!aBmp)
+ {
+ // Korrektur bei leerer Bitmap
+ rStrm.Seek( nOldPos );
+ nStyle = BS_NONE;
+ }
+ else
+ aGraphicObject.SetGraphic( aBmp );
+ }
+ rStrm >> nWidth;
+ rStrm >> nStart;
+ rStrm >> nJustify;
+
+ char cTmpSymbol;
+ rStrm >> cTmpSymbol;
+ cSymbol = ByteString::ConvertToUnicode( cTmpSymbol, aFont.GetCharSet() );
+
+ rStrm >> nScale;
+
+ // UNICODE: rStrm >> aPrevText;
+ rStrm.ReadByteString(aPrevText);
+
+ // UNICODE: rStrm >> aFollowText;
+ rStrm.ReadByteString(aFollowText);
+
+ nValidMask = 0xFFFF;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBulletItem::SvxBulletItem( const SvxBulletItem& rItem)
+ : SfxPoolItem( rItem )
+{
+ aFont = rItem.aFont;
+ aGraphicObject = rItem.aGraphicObject;
+ aPrevText = rItem.aPrevText;
+ aFollowText = rItem.aFollowText;
+ nStart = rItem.nStart;
+ nStyle = rItem.nStyle;
+ nWidth = rItem.nWidth;
+ nScale = rItem.nScale;
+ cSymbol = rItem.cSymbol;
+ nJustify = rItem.nJustify;
+ nValidMask = rItem.nValidMask;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBulletItem::Clone( SfxItemPool *pPool ) const
+{
+ return new SvxBulletItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, USHORT nVersion ) const
+{
+ return new SvxBulletItem( rStrm, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBulletItem::SetDefaultFont_Impl()
+{
+ aFont = System::GetStandardFont( STDFONT_ROMAN );
+ aFont.SetAlign( ALIGN_BOTTOM);
+ aFont.SetTransparent( TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBulletItem::SetDefaults_Impl()
+{
+ nWidth = 1200; // 1.2cm
+ nStart = 1;
+ nStyle = BS_123;
+ nJustify = BJ_HLEFT | BJ_VCENTER;
+ cSymbol = sal_Unicode(' ');
+ nScale = 75;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxBulletItem::GetVersion( USHORT nVersion ) const
+{
+ return BULITEM_VERSION;
+}
+
+
+void SvxBulletItem::CopyValidProperties( const SvxBulletItem& rCopyFrom )
+{
+ Font aFont = GetFont();
+ Font aNewFont = rCopyFrom.GetFont();
+ if ( rCopyFrom.IsValid( VALID_FONTNAME ) )
+ {
+ aFont.SetName( aNewFont.GetName() );
+ aFont.SetFamily( aNewFont.GetFamily() );
+ aFont.SetStyleName( aNewFont.GetStyleName() );
+ }
+ if ( rCopyFrom.IsValid( VALID_FONTCOLOR ) )
+ aFont.SetColor( aNewFont.GetColor() );
+ if ( rCopyFrom.IsValid( VALID_SYMBOL ) )
+ SetSymbol( rCopyFrom.GetSymbol() );
+ if ( rCopyFrom.IsValid( VALID_BITMAP ) )
+ SetGraphicObject( rCopyFrom.GetGraphicObject() );
+ if ( rCopyFrom.IsValid( VALID_SCALE ) )
+ SetScale( rCopyFrom.GetScale() );
+ if ( rCopyFrom.IsValid( VALID_START ) )
+ SetStart( rCopyFrom.GetStart() );
+ if ( rCopyFrom.IsValid( VALID_STYLE ) )
+ SetStyle( rCopyFrom.GetStyle() );
+ if ( rCopyFrom.IsValid( VALID_PREVTEXT ) )
+ SetPrevText( rCopyFrom.GetPrevText() );
+ if ( rCopyFrom.IsValid( VALID_FOLLOWTEXT ) )
+ SetFollowText( rCopyFrom.GetFollowText() );
+
+ SetFont( aFont );
+}
+
+
+// -----------------------------------------------------------------------
+
+int SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT(rItem.ISA(SvxBulletItem),"operator==Types not matching");
+ const SvxBulletItem& rBullet = (const SvxBulletItem&)rItem;
+ // ValidMask mitvergleichen, da sonst kein Putten in ein AttrSet moeglich,
+ // wenn sich das Item nur in der ValidMask von einem existierenden unterscheidet.
+ if( nValidMask != rBullet.nValidMask ||
+ nStyle != rBullet.nStyle ||
+ nScale != rBullet.nScale ||
+ nJustify != rBullet.nJustify ||
+ nWidth != rBullet.nWidth ||
+ nStart != rBullet.nStart ||
+ cSymbol != rBullet.cSymbol ||
+ aPrevText != rBullet.aPrevText ||
+ aFollowText != rBullet.aFollowText )
+ return 0;
+
+ if( ( nStyle != BS_BMP ) && ( aFont != rBullet.aFont ) )
+ return 0;
+ if( ( nStyle == BS_BMP ) && ( aGraphicObject != rBullet.aGraphicObject ) )
+ return 0;
+ if( ( nStyle == BS_BMP ) && ( aGraphicObject.GetPrefSize() != rBullet.aGraphicObject.GetPrefSize() ) )
+ return 0;
+
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT nItemVersion ) const
+{
+ // Korrektur bei leerer Bitmap
+ if((nStyle == BS_BMP) && (aGraphicObject.GetType() == GRAPHIC_NONE ))
+ {
+ ((SvxBulletItem*)this)->nStyle = BS_NONE;
+ }
+
+ rStrm << nStyle;
+ if( nStyle != BS_BMP )
+ StoreFont( rStrm, aFont );
+ else
+ {
+ ULONG nStart = rStrm.Tell();
+
+ // Kleine Vorab-Schaetzung der Groesse...
+ USHORT nFac = ( rStrm.GetCompressMode() != COMPRESSMODE_NONE ) ? 3 : 1;
+ const Bitmap aBmp( aGraphicObject.GetGraphic().GetBitmap() );
+ ULONG nBytes = aBmp.GetSizeBytes();
+ if ( nBytes < (0xFF00*nFac) )
+ rStrm << aBmp;
+
+ ULONG nEnd = rStrm.Tell();
+ // #67581# Item darf mit Overhead nicht mehr als 64K schreiben,
+ // sonst platzt der SfxMultiRecord
+ // Dann lieber auf die Bitmap verzichten, ist nur fuer Outliner
+ // und auch nur fuer <= 5.0 wichtig.
+ // Beim Einlesen merkt der Stream-Operator der Bitmap, dass dort keine steht.
+ // Hiermit funktioniert jetzt der Fall das die grosse Bitmap aus einem anderen
+ // Fileformat entstanden ist, welches keine 64K belegt, aber wenn eine
+ // Bitmap > 64K verwendet wird, hat das SvxNumBulletItem beim Laden ein Problem,
+ // stuerzt aber nicht ab.
+
+ if ( (nEnd-nStart) > 0xFF00 )
+ rStrm.Seek( nStart );
+ }
+ rStrm << nWidth;
+ rStrm << nStart;
+ rStrm << nJustify;
+ rStrm << (char)ByteString::ConvertFromUnicode( cSymbol, aFont.GetCharSet() );
+ rStrm << nScale;
+
+ // UNICODE: rStrm << aPrevText;
+ rStrm.WriteByteString(aPrevText);
+
+ // UNICODE: rStrm << aFollowText;
+ rStrm.WriteByteString(aFollowText);
+
+ return rStrm;
+}
+
+//------------------------------------------------------------------------
+
+XubString SvxBulletItem::GetFullText() const
+{
+ XubString aStr( aPrevText );
+ aStr += cSymbol;
+ aStr += aFollowText;
+ return aStr;
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxBulletItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ SfxItemPresentation eRet = SFX_ITEM_PRESENTATION_NONE;
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ eRet = SFX_ITEM_PRESENTATION_NONE;
+ break;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetFullText();
+ eRet = SFX_ITEM_PRESENTATION_COMPLETE;
+ break;
+ }
+ return eRet;
+}
+
+
diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx
new file mode 100644
index 0000000000..0b4a5e2739
--- /dev/null
+++ b/svx/source/items/chrtitem.cxx
@@ -0,0 +1,522 @@
+/*************************************************************************
+ *
+ * $RCSfile: chrtitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+#ifndef __SBX_SBXVARIABLE_HXX
+#include <svtools/sbxvar.hxx>
+#endif
+#if defined UNX && !defined LINUX
+#include <wchar.h>
+#endif
+
+#ifdef MAC
+#include <stdlib.h>
+#endif
+
+#include <stdio.h>
+#include <float.h>
+
+#define ITEMID_CHARTSTYLE 0
+#define ITEMID_CHARTDATADESCR 0
+#define ITEMID_CHARTLEGENDPOS 0
+#define ITEMID_CHARTTEXTORDER 0
+#define ITEMID_CHARTTEXTORIENT 0
+#define ITEMID_CHARTKINDERROR 0
+#define ITEMID_CHARTINDICATE 0
+#define ITEMID_DOUBLE 0
+#define ITEMID_CHARTREGRESS 0
+
+#include "chrtitem.hxx"
+
+#pragma hdrstop
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+// -----------------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SvxChartStyleItem, SfxEnumItem);
+TYPEINIT1(SvxChartDataDescrItem, SfxEnumItem);
+TYPEINIT1(SvxChartLegendPosItem, SfxEnumItem);
+TYPEINIT1(SvxChartTextOrderItem, SfxEnumItem);
+TYPEINIT1(SvxChartTextOrientItem, SfxEnumItem);
+TYPEINIT1(SvxChartIndicateItem, SfxEnumItem);
+TYPEINIT1(SvxChartKindErrorItem, SfxEnumItem);
+TYPEINIT1(SvxChartRegressItem, SfxEnumItem);
+TYPEINIT1(SvxDoubleItem, SfxPoolItem);
+
+/*************************************************************************
+|*
+|* SvxChartStyleItem
+|*
+*************************************************************************/
+
+SvxChartStyleItem::SvxChartStyleItem(SvxChartStyle eStyle, USHORT nId) :
+ SfxEnumItem(nId, eStyle)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxChartStyleItem::SvxChartStyleItem(SvStream& rIn, USHORT nId) :
+ SfxEnumItem(nId, rIn)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartStyleItem::Clone(SfxItemPool* pPool) const
+{
+ return new SvxChartStyleItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartStyleItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SvxChartStyleItem(rIn, Which());
+}
+
+/*************************************************************************
+|*
+|* SvxChartDataDescrItem
+|*
+*************************************************************************/
+
+SvxChartDataDescrItem::SvxChartDataDescrItem(SvxChartDataDescr eDataDescr,
+ USHORT nId) :
+ SfxEnumItem(nId, eDataDescr)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxChartDataDescrItem::SvxChartDataDescrItem(SvStream& rIn, USHORT nId) :
+ SfxEnumItem(nId, rIn)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartDataDescrItem::Clone(SfxItemPool* pPool) const
+{
+ return new SvxChartDataDescrItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartDataDescrItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SvxChartDataDescrItem(rIn, Which());
+}
+
+/*************************************************************************
+|*
+|* SvxChartLegendPosItem
+|*
+*************************************************************************/
+
+SvxChartLegendPosItem::SvxChartLegendPosItem(SvxChartLegendPos eLegendPos,
+ USHORT nId) :
+ SfxEnumItem(nId, eLegendPos)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxChartLegendPosItem::SvxChartLegendPosItem(SvStream& rIn, USHORT nId) :
+ SfxEnumItem(nId, rIn)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartLegendPosItem::Clone(SfxItemPool* pPool) const
+{
+ return new SvxChartLegendPosItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartLegendPosItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SvxChartLegendPosItem(rIn, Which());
+}
+
+/*************************************************************************
+|*
+|* SvxChartTextOrderItem
+|*
+*************************************************************************/
+
+SvxChartTextOrderItem::SvxChartTextOrderItem(SvxChartTextOrder eOrder,
+ USHORT nId) :
+ SfxEnumItem(nId, eOrder)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxChartTextOrderItem::SvxChartTextOrderItem(SvStream& rIn, USHORT nId) :
+ SfxEnumItem(nId, rIn)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartTextOrderItem::Clone(SfxItemPool* pPool) const
+{
+ return new SvxChartTextOrderItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartTextOrderItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SvxChartTextOrderItem(rIn, Which());
+}
+
+/*************************************************************************
+|*
+|* SvxChartTextOrientItem
+|*
+*************************************************************************/
+
+SvxChartTextOrientItem::SvxChartTextOrientItem(SvxChartTextOrient eOrient,
+ USHORT nId) :
+ SfxEnumItem(nId, eOrient)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxChartTextOrientItem::SvxChartTextOrientItem(SvStream& rIn, USHORT nId) :
+ SfxEnumItem(nId, rIn)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartTextOrientItem::Clone(SfxItemPool* pPool) const
+{
+ return new SvxChartTextOrientItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartTextOrientItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SvxChartTextOrientItem(rIn, Which());
+}
+
+/*************************************************************************
+|*
+|* SvxDoubleItem
+|*
+*************************************************************************/
+
+SvxDoubleItem::SvxDoubleItem(double fValue, USHORT nId) :
+ SfxPoolItem(nId),
+ fVal(fValue)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxDoubleItem::SvxDoubleItem(SvStream& rIn, USHORT nId) :
+ SfxPoolItem(nId)
+{
+ rIn >> fVal;
+}
+
+// -----------------------------------------------------------------------
+
+SvxDoubleItem::SvxDoubleItem(const SvxDoubleItem& rItem) :
+ SfxPoolItem(rItem),
+ fVal(rItem.fVal)
+{
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxDoubleItem::GetValueText() const
+{
+ char cBuff[80];
+ sprintf(cBuff, "%e", fVal);
+
+ return String(cBuff, sizeof(cBuff), gsl_getSystemTextEncoding());
+}
+
+// -----------------------------------------------------------------------
+
+SfxItemPresentation SvxDoubleItem::GetPresentation
+ ( SfxItemPresentation ePresentation, SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresentationMetric, XubString& rText, const International *) const
+{
+ char cBuff[80];
+ sprintf(cBuff, "%e", fVal);
+
+ rText.Erase();
+ rText.AppendAscii(cBuff);
+
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxDoubleItem::operator == (const SfxPoolItem& rItem) const
+{
+ return (((SvxDoubleItem&)rItem).fVal == fVal);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxDoubleItem::Clone(SfxItemPool* Pool) const
+{
+ return new SvxDoubleItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxDoubleItem::Create(SvStream& rIn, USHORT nVersion) const
+{
+ double fVal;
+ rIn >> fVal;
+ return new SvxDoubleItem(fVal, Which());
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxDoubleItem::Store(SvStream& rOut, USHORT nItemVersion) const
+{
+ rOut << fVal;
+ return rOut;
+}
+
+// -----------------------------------------------------------------------
+
+double SvxDoubleItem::GetMin() const
+{
+ return DBL_MIN;
+}
+
+// -----------------------------------------------------------------------
+
+double SvxDoubleItem::GetMax() const
+{
+ return DBL_MAX;
+}
+
+// -----------------------------------------------------------------------
+
+SfxFieldUnit SvxDoubleItem::GetUnit() const
+{
+ return SFX_FUNIT_NONE;
+}
+
+
+
+
+// -----------------------------------------------------------------------
+sal_Bool SvxDoubleItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (float)fVal;
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool SvxDoubleItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ return rVal >>= fVal;
+}
+
+
+
+/*************************************************************************
+|*
+|* SvxChartKindErrorItem
+|*
+*************************************************************************/
+
+SvxChartKindErrorItem::SvxChartKindErrorItem(SvxChartKindError eOrient,
+ USHORT nId) :
+ SfxEnumItem(nId, eOrient)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxChartKindErrorItem::SvxChartKindErrorItem(SvStream& rIn, USHORT nId) :
+ SfxEnumItem(nId, rIn)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartKindErrorItem::Clone(SfxItemPool* pPool) const
+{
+ return new SvxChartKindErrorItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartKindErrorItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SvxChartKindErrorItem(rIn, Which());
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxChartKindErrorItem::GetVersion (USHORT nFileFormatVersion) const
+{
+ return (nFileFormatVersion == SOFFICE_FILEFORMAT_31)
+ ? USHRT_MAX
+ : 0;
+}
+
+/*************************************************************************
+|*
+|* SvxChartIndicateItem
+|*
+*************************************************************************/
+
+SvxChartIndicateItem::SvxChartIndicateItem(SvxChartIndicate eOrient,
+ USHORT nId) :
+ SfxEnumItem(nId, eOrient)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxChartIndicateItem::SvxChartIndicateItem(SvStream& rIn, USHORT nId) :
+ SfxEnumItem(nId, rIn)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartIndicateItem::Clone(SfxItemPool* pPool) const
+{
+ return new SvxChartIndicateItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartIndicateItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SvxChartIndicateItem(rIn, Which());
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxChartIndicateItem::GetVersion (USHORT nFileFormatVersion) const
+{
+ return (nFileFormatVersion == SOFFICE_FILEFORMAT_31)
+ ? USHRT_MAX
+ : 0;
+}
+
+/*************************************************************************
+|*
+|* SvxChartRegressItem
+|*
+*************************************************************************/
+
+SvxChartRegressItem::SvxChartRegressItem(SvxChartRegress eOrient,
+ USHORT nId) :
+ SfxEnumItem(nId, eOrient)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxChartRegressItem::SvxChartRegressItem(SvStream& rIn, USHORT nId) :
+ SfxEnumItem(nId, rIn)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartRegressItem::Clone(SfxItemPool* pPool) const
+{
+ return new SvxChartRegressItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxChartRegressItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SvxChartRegressItem(rIn, Which());
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxChartRegressItem::GetVersion (USHORT nFileFormatVersion) const
+{
+ return (nFileFormatVersion == SOFFICE_FILEFORMAT_31)
+ ? USHRT_MAX
+ : 0;
+}
+
+
diff --git a/svx/source/items/drawitem.cxx b/svx/source/items/drawitem.cxx
new file mode 100644
index 0000000000..6e9e4434b8
--- /dev/null
+++ b/svx/source/items/drawitem.cxx
@@ -0,0 +1,418 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "svxids.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_GRADIENT_LIST SID_GRADIENT_LIST
+#define ITEMID_HATCH_LIST SID_HATCH_LIST
+#define ITEMID_BITMAP_LIST SID_BITMAP_LIST
+#define ITEMID_DASH_LIST SID_DASH_LIST
+#define ITEMID_LINEEND_LIST SID_LINEEND_LIST
+
+#include "xoutx.hxx"
+#include "drawitem.hxx"
+
+// -----------------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY( SvxColorTableItem, SfxPoolItem );
+TYPEINIT1_AUTOFACTORY( SvxGradientListItem, SfxPoolItem );
+TYPEINIT1_AUTOFACTORY( SvxHatchListItem, SfxPoolItem );
+TYPEINIT1_AUTOFACTORY( SvxBitmapListItem, SfxPoolItem );
+TYPEINIT1_AUTOFACTORY( SvxDashListItem, SfxPoolItem );
+TYPEINIT1_AUTOFACTORY( SvxLineEndListItem, SfxPoolItem );
+
+//==================================================================
+//
+// SvxColorTableItem
+//
+//==================================================================
+
+SvxColorTableItem::SvxColorTableItem()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxColorTableItem::SvxColorTableItem( XColorTable* pTable, sal_uInt16 nW ) :
+ SfxPoolItem( nW ),
+ pColorTable( pTable )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxColorTableItem::SvxColorTableItem( const SvxColorTableItem& rItem ) :
+ SfxPoolItem( rItem ),
+ pColorTable( rItem.pColorTable )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxColorTableItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxColorTableItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+ return ( ( SvxColorTableItem& ) rItem).pColorTable == pColorTable;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxColorTableItem::Clone( SfxItemPool * ) const
+{
+ return new SvxColorTableItem( *this );
+}
+
+//==================================================================
+//
+// SvxGradientListItem
+//
+//==================================================================
+
+SvxGradientListItem::SvxGradientListItem()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxGradientListItem::SvxGradientListItem( XGradientList* pList, sal_uInt16 nW ) :
+ SfxPoolItem( nW ),
+ pGradientList( pList )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxGradientListItem::SvxGradientListItem( const SvxGradientListItem& rItem ) :
+ SfxPoolItem( rItem ),
+ pGradientList( rItem.pGradientList )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxGradientListItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxGradientListItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+ return ( ( SvxGradientListItem& ) rItem).pGradientList == pGradientList;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxGradientListItem::Clone( SfxItemPool * ) const
+{
+ return new SvxGradientListItem( *this );
+}
+
+//==================================================================
+//
+// SvxHatchListItem
+//
+//==================================================================
+
+SvxHatchListItem::SvxHatchListItem()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxHatchListItem::SvxHatchListItem( XHatchList* pList, sal_uInt16 nW ) :
+ SfxPoolItem( nW ),
+ pHatchList( pList )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxHatchListItem::SvxHatchListItem( const SvxHatchListItem& rItem ) :
+ SfxPoolItem( rItem ),
+ pHatchList( rItem.pHatchList )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxHatchListItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxHatchListItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+ return ( ( SvxHatchListItem& ) rItem).pHatchList == pHatchList;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxHatchListItem::Clone( SfxItemPool * ) const
+{
+ return new SvxHatchListItem( *this );
+}
+
+//==================================================================
+//
+// SvxBitmapListItem
+//
+//==================================================================
+
+SvxBitmapListItem::SvxBitmapListItem()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxBitmapListItem::SvxBitmapListItem( XBitmapList* pList, sal_uInt16 nW ) :
+ SfxPoolItem( nW ),
+ pBitmapList( pList )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxBitmapListItem::SvxBitmapListItem( const SvxBitmapListItem& rItem ) :
+ SfxPoolItem( rItem ),
+ pBitmapList( rItem.pBitmapList )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxBitmapListItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxBitmapListItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+ return ( ( SvxBitmapListItem& ) rItem).pBitmapList == pBitmapList;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBitmapListItem::Clone( SfxItemPool * ) const
+{
+ return new SvxBitmapListItem( *this );
+}
+
+
+//==================================================================
+//
+// SvxDashListItem
+//
+//==================================================================
+
+SvxDashListItem::SvxDashListItem()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxDashListItem::SvxDashListItem( XDashList* pList, sal_uInt16 nW ) :
+ SfxPoolItem( nW ),
+ pDashList( pList )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxDashListItem::SvxDashListItem( const SvxDashListItem& rItem ) :
+ SfxPoolItem( rItem ),
+ pDashList( rItem.pDashList )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxDashListItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxDashListItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+ return ( ( SvxDashListItem& ) rItem).pDashList == pDashList;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxDashListItem::Clone( SfxItemPool * ) const
+{
+ return new SvxDashListItem( *this );
+}
+
+//==================================================================
+//
+// SvxLineEndListItem
+//
+//==================================================================
+
+SvxLineEndListItem::SvxLineEndListItem()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineEndListItem::SvxLineEndListItem( XLineEndList* pList, sal_uInt16 nW ) :
+ SfxPoolItem( nW ),
+ pLineEndList( pList )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineEndListItem::SvxLineEndListItem( const SvxLineEndListItem& rItem ) :
+ SfxPoolItem( rItem ),
+ pLineEndList( rItem.pLineEndList )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxLineEndListItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLineEndListItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+ return ( ( SvxLineEndListItem& ) rItem).pLineEndList == pLineEndList;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxLineEndListItem::Clone( SfxItemPool * ) const
+{
+ return new SvxLineEndListItem( *this );
+}
+
+
diff --git a/svx/source/items/e3ditem.cxx b/svx/source/items/e3ditem.cxx
new file mode 100644
index 0000000000..3e1fd463b9
--- /dev/null
+++ b/svx/source/items/e3ditem.cxx
@@ -0,0 +1,191 @@
+/*************************************************************************
+ *
+ * $RCSfile: e3ditem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_DRAWING_DIRECTION3D_HPP_
+#include <com/sun/star/drawing/Direction3D.hpp>
+#endif
+#ifndef _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+#pragma hdrstop
+
+#include "e3ditem.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// STATIC DATA -----------------------------------------------------------
+
+DBG_NAME(SvxVector3DItem);
+
+// -----------------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SvxVector3DItem, SfxPoolItem);
+
+// -----------------------------------------------------------------------
+
+SvxVector3DItem::SvxVector3DItem()
+{
+ DBG_CTOR(SvxVector3DItem, 0);
+}
+
+// -----------------------------------------------------------------------
+
+SvxVector3DItem::SvxVector3DItem( USHORT nWhich, const Vector3D& rVal ) :
+ SfxPoolItem( nWhich ),
+ aVal( rVal )
+{
+ DBG_CTOR(SvxVector3DItem, 0);
+}
+
+// -----------------------------------------------------------------------
+
+SvxVector3DItem::SvxVector3DItem( USHORT nWhich, SvStream& rStream ) :
+ SfxPoolItem( nWhich )
+{
+ DBG_CTOR(SvxVector3DItem, 0);
+ rStream >> aVal;
+}
+
+// -----------------------------------------------------------------------
+
+SvxVector3DItem::SvxVector3DItem( const SvxVector3DItem& rItem ) :
+ SfxPoolItem( rItem ),
+ aVal( rItem.aVal )
+{
+ DBG_CTOR(SvxVector3DItem, 0);
+}
+
+// -----------------------------------------------------------------------
+
+int SvxVector3DItem::operator==( const SfxPoolItem &rItem ) const
+{
+ DBG_CHKTHIS(SvxVector3DItem, 0);
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+ return ((SvxVector3DItem&)rItem).aVal == aVal;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxVector3DItem::Clone( SfxItemPool *pPool ) const
+{
+ DBG_CHKTHIS(SvxVector3DItem, 0);
+ return new SvxVector3DItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxVector3DItem::Create(SvStream &rStream, USHORT nVersion) const
+{
+ DBG_CHKTHIS(SvxVector3DItem, 0);
+ Vector3D aStr;
+ rStream >> aStr;
+ return new SvxVector3DItem(Which(), aStr);
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxVector3DItem::Store(SvStream &rStream, USHORT nItemVersion) const
+{
+ DBG_CHKTHIS(SvxVector3DItem, 0);
+
+ if (nItemVersion) rStream << aVal;
+
+ return rStream;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxVector3DItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ drawing::Direction3D aDirection;
+
+ // Werte eintragen
+ aDirection.DirectionX = aVal.X();
+ aDirection.DirectionY = aVal.Y();
+ aDirection.DirectionZ = aVal.Z();
+
+ rVal <<= aDirection;
+ return( sal_True );
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxVector3DItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::Direction3D aDirection;
+ if(!(rVal >>= aDirection))
+ return sal_False;
+
+ aVal.X() = aDirection.DirectionX;
+ aVal.Y() = aDirection.DirectionY;
+ aVal.Z() = aDirection.DirectionZ;
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxVector3DItem::GetVersion (USHORT nFileFormatVersion) const
+{
+ return (nFileFormatVersion == SOFFICE_FILEFORMAT_31) ? USHRT_MAX : 0;
+}
+
+
diff --git a/svx/source/items/flditem.cxx b/svx/source/items/flditem.cxx
new file mode 100644
index 0000000000..5b5192cdc7
--- /dev/null
+++ b/svx/source/items/flditem.cxx
@@ -0,0 +1,965 @@
+/*************************************************************************
+ *
+ * $RCSfile: flditem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _INTN_HXX
+#include <tools/intn.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SV_SYSTEM_HXX
+#include <vcl/system.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_FLDITEM_CXX
+
+#define ITEMID_FIELD 0
+#include "flditem.hxx"
+#include "adritem.hxx"
+
+#define FRAME_MARKER (ULONG)0x21981357
+#define CHARSET_MARKER (FRAME_MARKER+1)
+
+// -----------------------------------------------------------------------
+
+TYPEINIT1( SvxFieldItem, SfxPoolItem );
+
+SV_IMPL_PERSIST1( SvxFieldData, SvPersistBase );
+
+// -----------------------------------------------------------------------
+
+SvxFieldData::SvxFieldData()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxFieldData::~SvxFieldData()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxFieldData* SvxFieldData::Clone() const
+{
+ return new SvxFieldData;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxFieldData::operator==( const SvxFieldData& rFld ) const
+{
+ DBG_ASSERT( Type() == rFld.Type(), "==: Verschiedene Typen" );
+ return TRUE; // Basicklasse immer gleich.
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFieldData::Load( SvPersistStream & rStm )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFieldData::Save( SvPersistStream & rStm )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const USHORT nId ) :
+ SfxPoolItem( nId )
+{
+ pField = pFld; // gehoert direkt dem Item
+}
+
+// -----------------------------------------------------------------------
+
+SvxFieldItem::SvxFieldItem( const SvxFieldData& rField, const USHORT nId ) :
+ SfxPoolItem( nId )
+{
+ pField = rField.Clone();
+}
+
+// -----------------------------------------------------------------------
+
+SvxFieldItem::SvxFieldItem( const SvxFieldItem& rItem ) :
+ SfxPoolItem ( rItem )
+{
+ pField = rItem.GetField() ? rItem.GetField()->Clone() : 0;
+}
+
+// -----------------------------------------------------------------------
+
+SvxFieldItem::~SvxFieldItem()
+{
+ delete pField;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFieldItem::Clone( SfxItemPool* ) const
+{
+ return new SvxFieldItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, USHORT ) const
+{
+ SvxFieldData* pData = 0;
+ SvPersistStream aPStrm( GetClassManager(), &rStrm );
+ aPStrm >> pData;
+
+ if( aPStrm.IsEof() )
+ aPStrm.SetError( SVSTREAM_GENERALERROR );
+
+ if ( aPStrm.GetError() == ERRCODE_IO_NOFACTORY )
+ aPStrm.ResetError(); // Eigentlich einen Code, dass nicht alle Attr gelesen wurden...
+
+ return new SvxFieldItem( pData, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxFieldItem::Store( SvStream& rStrm, USHORT nItemVersion ) const
+{
+ DBG_ASSERT( pField, "SvxFieldItem::Store: Feld?!" );
+ SvPersistStream aPStrm( GetClassManager(), &rStrm );
+ // Das ResetError in der obigen Create-Methode gab es in 3.1 noch nicht,
+ // deshalb duerfen beim 3.x-Export neuere Items nicht gespeichert werden!
+ if ( ( rStrm.GetVersion() <= SOFFICE_FILEFORMAT_31 ) && pField &&
+ pField->GetClassId() == 50 /* SdrMeasureField */ )
+ {
+ // SvxFieldData reicht nicht, weil auch nicht am ClassMgr angemeldet
+ SvxURLField aDummyData;
+ aPStrm << &aDummyData;
+ }
+ else
+ aPStrm << pField;
+
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxFieldItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" );
+
+ const SvxFieldData* pOtherFld = ((const SvxFieldItem&)rItem).GetField();
+ if ( !pField && !pOtherFld )
+ return TRUE;
+
+ if ( ( !pField && pOtherFld ) || ( pField && !pOtherFld ) )
+ return FALSE;
+
+ return ( ( pField->Type() == pOtherFld->Type() )
+ && ( *pField == *pOtherFld ) );
+}
+
+// =================================================================
+// Es folgen die Ableitungen von SvxFieldData...
+// =================================================================
+
+SV_IMPL_PERSIST1( SvxDateField, SvxFieldData );
+
+// -----------------------------------------------------------------------
+
+SvxDateField::SvxDateField()
+{
+ nFixDate = Date().GetDate();
+ eType = SVXDATETYPE_VAR;
+ eFormat = SVXDATEFORMAT_STDSMALL;
+}
+
+// -----------------------------------------------------------------------
+
+SvxDateField::SvxDateField( const Date& rDate, SvxDateType eT, SvxDateFormat eF )
+{
+ nFixDate = rDate.GetDate();
+ eType = eT;
+ eFormat = eF;
+}
+
+// -----------------------------------------------------------------------
+
+SvxFieldData* SvxDateField::Clone() const
+{
+ return new SvxDateField( *this );
+}
+
+// -----------------------------------------------------------------------
+
+int SvxDateField::operator==( const SvxFieldData& rOther ) const
+{
+ if ( rOther.Type() != Type() )
+ return FALSE;
+
+ const SvxDateField& rOtherFld = (const SvxDateField&) rOther;
+ return ( ( nFixDate == rOtherFld.nFixDate ) &&
+ ( eType == rOtherFld.eType ) &&
+ ( eFormat == rOtherFld.eFormat ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxDateField::Load( SvPersistStream & rStm )
+{
+ USHORT nType, nFormat;
+
+ rStm >> nFixDate;
+ rStm >> nType;
+ rStm >> nFormat;
+
+ eType = (SvxDateType)nType;
+ eFormat= (SvxDateFormat)nFormat;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxDateField::Save( SvPersistStream & rStm )
+{
+ rStm << nFixDate;
+ rStm << (USHORT)eType;
+ rStm << (USHORT)eFormat;
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxDateField::GetFormatted( LanguageType eLanguage, LanguageType eFmt ) const
+{
+ International aInter( eLanguage, eFmt );
+ int bLongDate = FALSE;
+
+ Date aDate; // aktuelles
+ if ( eType == SVXDATETYPE_FIX )
+ aDate.SetDate( nFixDate );
+
+ SvxDateFormat eTmpFormat = eFormat;
+
+ if ( eTmpFormat == SVXDATEFORMAT_SYSTEM )
+ {
+ DBG_ERROR( "SVXDATEFORMAT_SYSTEM nicht implementiert!" );
+ eTmpFormat = SVXDATEFORMAT_STDSMALL;
+ }
+ else if ( eTmpFormat == SVXDATEFORMAT_APPDEFAULT )
+ {
+ DBG_ERROR( "SVXDATEFORMAT_APPDEFAULT: Woher nehmen?" );
+ eTmpFormat = SVXDATEFORMAT_STDSMALL;
+ }
+
+ switch( eTmpFormat )
+ {
+ // kurze Formate standard
+ case SVXDATEFORMAT_STDSMALL:
+ break;
+ case SVXDATEFORMAT_STDBIG:
+ {
+ bLongDate = TRUE;
+ }
+ break;
+ case SVXDATEFORMAT_A:
+ {
+ // 13.02.96
+ aInter.SetDateCentury( FALSE );
+ }
+ break;
+ case SVXDATEFORMAT_B:
+ {
+ // 13.02.1996
+ aInter.SetDateCentury( TRUE );
+ }
+ break;
+ case SVXDATEFORMAT_C:
+ {
+ // 13.Feb 1996
+ aInter.SetLongDateDayOfWeekFormat( DAYOFWEEK_NONE );
+ aInter.SetLongDateMonthFormat( MONTH_SHORT );
+ aInter.SetDateCentury( TRUE );
+ bLongDate = TRUE;
+ }
+ break;
+ case SVXDATEFORMAT_D:
+ {
+ // 13.Februar 1996
+ aInter.SetLongDateDayOfWeekFormat(DAYOFWEEK_NONE);
+ aInter.SetLongDateMonthFormat(MONTH_LONG);
+ aInter.SetDateCentury(TRUE);
+ bLongDate = TRUE;
+ }
+ break;
+ case SVXDATEFORMAT_E:
+ {
+ // Die, 13.Februar 1996
+ aInter.SetLongDateDayOfWeekFormat(DAYOFWEEK_SHORT);
+ aInter.SetLongDateMonthFormat(MONTH_LONG);
+ aInter.SetDateCentury(TRUE);
+ bLongDate = TRUE;
+ }
+ break;
+ case SVXDATEFORMAT_F:
+ {
+ // Dienstag, 13.Februar 1996
+ aInter.SetLongDateDayOfWeekFormat(DAYOFWEEK_LONG);
+ aInter.SetLongDateMonthFormat(MONTH_LONG);
+ aInter.SetDateCentury(TRUE);
+ bLongDate = TRUE;
+ }
+ break;
+ }
+
+ if( bLongDate )
+ return aInter.GetLongDate( aDate );
+ return aInter.GetDate( aDate );
+}
+
+
+SV_IMPL_PERSIST1( SvxURLField, SvxFieldData );
+
+// -----------------------------------------------------------------------
+
+SvxURLField::SvxURLField()
+{
+ eFormat = SVXURLFORMAT_URL;
+}
+
+// -----------------------------------------------------------------------
+
+SvxURLField::SvxURLField( const XubString& rURL, const XubString& rRepres, SvxURLFormat eFmt )
+ : aURL( rURL ), aRepresentation( rRepres )
+{
+ eFormat = eFmt;
+}
+
+// -----------------------------------------------------------------------
+
+SvxFieldData* SvxURLField::Clone() const
+{
+ return new SvxURLField( *this );
+}
+
+// -----------------------------------------------------------------------
+
+int SvxURLField::operator==( const SvxFieldData& rOther ) const
+{
+ if ( rOther.Type() != Type() )
+ return FALSE;
+
+ const SvxURLField& rOtherFld = (const SvxURLField&) rOther;
+ return ( ( eFormat == rOtherFld.eFormat ) &&
+ ( aURL == rOtherFld.aURL ) &&
+ ( aRepresentation == rOtherFld.aRepresentation ) &&
+ ( aTargetFrame == rOtherFld.aTargetFrame ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxURLField::Load( SvPersistStream & rStm )
+{
+ USHORT nFormat;
+ ULONG nFrameMarker, nCharSetMarker;
+ long nUlongSize = (long)sizeof(ULONG);
+ String aTmpURL;
+
+ rStm >> nFormat;
+
+ // UNICODE: rStm >> aTmpURL;
+ rStm.ReadByteString(aTmpURL);
+
+ // UNICODE: rStm >> aRepresentation;
+ // read to a temp string first, read text encoding and
+ // convert later to stay compatible to fileformat
+ ByteString aTempString;
+ rtl_TextEncoding aTempEncoding;
+ rStm.ReadByteString(aTempString);
+
+ rStm >> nFrameMarker;
+ if ( nFrameMarker == FRAME_MARKER )
+ {
+ // UNICODE: rStm >> aTargetFrame;
+ rStm.ReadByteString(aTargetFrame);
+
+ rStm >> nCharSetMarker;
+ if ( nCharSetMarker == CHARSET_MARKER )
+ {
+ USHORT nCharSet;
+ rStm >> nCharSet;
+
+ // remember encoding
+ aTempEncoding = (rtl_TextEncoding)nCharSet;
+ }
+ else
+ rStm.SeekRel( -nUlongSize );
+ }
+ else
+ rStm.SeekRel( -nUlongSize );
+
+ // now build representation string due to known encoding
+ aRepresentation = String(aTempString, aTempEncoding);
+
+ eFormat= (SvxURLFormat)nFormat;
+
+ // Relatives Speichern => Beim laden absolut machen.
+ aURL = INetURLObject::RelToAbs( aTmpURL );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxURLField::Save( SvPersistStream & rStm )
+{
+ // Relatives Speichern der URL
+ String aTmpURL = INetURLObject::AbsToRel( aURL );
+
+ rStm << (USHORT)eFormat;
+
+ // UNICODE: rStm << aTmpURL;
+ rStm.WriteByteString(aTmpURL);
+
+ // UNICODE: rStm << aRepresentation;
+ rStm.WriteByteString(aRepresentation);
+
+ rStm << FRAME_MARKER;
+
+ // UNICODE: rStm << aTargetFrame;
+ rStm.WriteByteString(aTargetFrame);
+
+ rStm << CHARSET_MARKER;
+ rStm << (USHORT)GetStoreCharSet( gsl_getSystemTextEncoding(),
+ rStm.GetVersion() );
+}
+
+// =================================================================
+// Die Felder, die aus Calc ausgebaut wurden:
+// =================================================================
+
+SV_IMPL_PERSIST1( SvxPageField, SvxFieldData );
+
+SvxFieldData* __EXPORT SvxPageField::Clone() const
+{
+ return new SvxPageField; // leer
+}
+
+int __EXPORT SvxPageField::operator==( const SvxFieldData& rCmp ) const
+{
+ return ( rCmp.Type() == TYPE(SvxPageField) );
+}
+
+void __EXPORT SvxPageField::Load( SvPersistStream & rStm )
+{
+}
+
+void __EXPORT SvxPageField::Save( SvPersistStream & rStm )
+{
+}
+
+SV_IMPL_PERSIST1( SvxPagesField, SvxFieldData );
+
+SvxFieldData* __EXPORT SvxPagesField::Clone() const
+{
+ return new SvxPagesField; // leer
+}
+
+int __EXPORT SvxPagesField::operator==( const SvxFieldData& rCmp ) const
+{
+ return ( rCmp.Type() == TYPE(SvxPagesField) );
+}
+
+void __EXPORT SvxPagesField::Load( SvPersistStream & rStm )
+{
+}
+
+void __EXPORT SvxPagesField::Save( SvPersistStream & rStm )
+{
+}
+
+SV_IMPL_PERSIST1( SvxTimeField, SvxFieldData );
+
+SvxFieldData* __EXPORT SvxTimeField::Clone() const
+{
+ return new SvxTimeField; // leer
+}
+
+int __EXPORT SvxTimeField::operator==( const SvxFieldData& rCmp ) const
+{
+ return ( rCmp.Type() == TYPE(SvxTimeField) );
+}
+
+void __EXPORT SvxTimeField::Load( SvPersistStream & rStm )
+{
+}
+
+void __EXPORT SvxTimeField::Save( SvPersistStream & rStm )
+{
+}
+
+SV_IMPL_PERSIST1( SvxFileField, SvxFieldData );
+
+SvxFieldData* __EXPORT SvxFileField::Clone() const
+{
+ return new SvxFileField; // leer
+}
+
+int __EXPORT SvxFileField::operator==( const SvxFieldData& rCmp ) const
+{
+ return ( rCmp.Type() == TYPE(SvxFileField) );
+}
+
+void __EXPORT SvxFileField::Load( SvPersistStream & rStm )
+{
+}
+
+void __EXPORT SvxFileField::Save( SvPersistStream & rStm )
+{
+}
+
+SV_IMPL_PERSIST1( SvxTableField, SvxFieldData );
+
+SvxFieldData* __EXPORT SvxTableField::Clone() const
+{
+ return new SvxTableField; // leer
+}
+
+int __EXPORT SvxTableField::operator==( const SvxFieldData& rCmp ) const
+{
+ return ( rCmp.Type() == TYPE(SvxTableField) );
+}
+
+void __EXPORT SvxTableField::Load( SvPersistStream & rStm )
+{
+}
+
+void __EXPORT SvxTableField::Save( SvPersistStream & rStm )
+{
+}
+
+//----------------------------------------------------------------------------
+// SvxExtTimeField
+//----------------------------------------------------------------------------
+
+SV_IMPL_PERSIST1( SvxExtTimeField, SvxFieldData );
+
+//----------------------------------------------------------------------------
+
+SvxExtTimeField::SvxExtTimeField()
+{
+ nFixTime = Time().GetTime();
+ eType = SVXTIMETYPE_VAR;
+ eFormat = SVXTIMEFORMAT_STANDARD;
+}
+
+//----------------------------------------------------------------------------
+
+SvxExtTimeField::SvxExtTimeField( const Time& rTime, SvxTimeType eT, SvxTimeFormat eF )
+{
+ nFixTime = rTime.GetTime();
+ eType = eT;
+ eFormat = eF;
+}
+
+//----------------------------------------------------------------------------
+
+SvxFieldData* SvxExtTimeField::Clone() const
+{
+ return new SvxExtTimeField( *this );
+}
+
+//----------------------------------------------------------------------------
+
+int SvxExtTimeField::operator==( const SvxFieldData& rOther ) const
+{
+ if ( rOther.Type() != Type() )
+ return FALSE;
+
+ const SvxExtTimeField& rOtherFld = (const SvxExtTimeField&) rOther;
+ return ( ( nFixTime == rOtherFld.nFixTime ) &&
+ ( eType == rOtherFld.eType ) &&
+ ( eFormat == rOtherFld.eFormat ) );
+}
+
+//----------------------------------------------------------------------------
+
+void SvxExtTimeField::Load( SvPersistStream & rStm )
+{
+ USHORT nType, nFormat;
+
+ rStm >> nFixTime;
+ rStm >> nType;
+ rStm >> nFormat;
+
+ eType = (SvxTimeType) nType;
+ eFormat= (SvxTimeFormat) nFormat;
+}
+
+//----------------------------------------------------------------------------
+
+void SvxExtTimeField::Save( SvPersistStream & rStm )
+{
+ rStm << nFixTime;
+ rStm << (USHORT) eType;
+ rStm << (USHORT) eFormat;
+}
+
+//----------------------------------------------------------------------------
+
+XubString SvxExtTimeField::GetFormatted( LanguageType eLanguage, LanguageType eFmt ) const
+{
+ International aInter( eLanguage, eFmt );
+ XubString aStrTime;
+
+ Time aTime; // aktuelle Zeit
+ if ( eType == SVXTIMETYPE_FIX )
+ aTime.SetTime( nFixTime );
+
+ SvxTimeFormat eTmpFormat = eFormat;
+
+ if ( eTmpFormat == SVXTIMEFORMAT_SYSTEM )
+ {
+ DBG_ERROR( "SVXTIMEFORMAT_SYSTEM nicht implementiert!" );
+ eTmpFormat = SVXTIMEFORMAT_STANDARD;
+ }
+ else if ( eTmpFormat == SVXTIMEFORMAT_APPDEFAULT )
+ {
+ DBG_ERROR( "SVXTIMEFORMAT_APPDEFAULT: Woher nehmen?" );
+ eTmpFormat = SVXTIMEFORMAT_STANDARD;
+ }
+
+ // 12 oder 24 Stunden
+ switch( eTmpFormat )
+ {
+ case SVXTIMEFORMAT_24_HM:
+ case SVXTIMEFORMAT_24_HMS:
+ case SVXTIMEFORMAT_24_HMSH:
+ aInter.SetTimeFormat( HOUR_24 );
+ break;
+
+ default:
+ aInter.SetTimeFormat( HOUR_12 );
+ break;
+ }
+ switch( eTmpFormat )
+ {
+ case SVXTIMEFORMAT_12_HM:
+ case SVXTIMEFORMAT_24_HM:
+ aStrTime = aInter.GetTime( aTime, FALSE );
+ break;
+
+ case SVXTIMEFORMAT_12_HMSH:
+ case SVXTIMEFORMAT_24_HMSH:
+ aStrTime = aInter.GetTime( aTime, TRUE, TRUE );
+ break;
+
+ case SVXTIMEFORMAT_STANDARD:
+ case SVXTIMEFORMAT_12_HMS:
+ case SVXTIMEFORMAT_24_HMS:
+ default:
+ aStrTime = aInter.GetTime( aTime, TRUE );
+ break;
+
+ }
+
+ return( aStrTime );
+}
+
+//----------------------------------------------------------------------------
+// SvxExtFileField
+//----------------------------------------------------------------------------
+
+SV_IMPL_PERSIST1( SvxExtFileField, SvxFieldData );
+
+//----------------------------------------------------------------------------
+
+SvxExtFileField::SvxExtFileField()
+{
+ eType = SVXFILETYPE_VAR;
+ eFormat = SVXFILEFORMAT_FULLPATH;
+}
+
+//----------------------------------------------------------------------------
+
+SvxExtFileField::SvxExtFileField( const XubString& rStr, SvxFileType eT, SvxFileFormat eF )
+{
+ aFile = rStr;
+ eType = eT;
+ eFormat = eF;
+}
+
+//----------------------------------------------------------------------------
+
+SvxFieldData* SvxExtFileField::Clone() const
+{
+ return new SvxExtFileField( *this );
+}
+
+//----------------------------------------------------------------------------
+
+int SvxExtFileField::operator==( const SvxFieldData& rOther ) const
+{
+ if ( rOther.Type() != Type() )
+ return FALSE;
+
+ const SvxExtFileField& rOtherFld = (const SvxExtFileField&) rOther;
+ return ( ( aFile == rOtherFld.aFile ) &&
+ ( eType == rOtherFld.eType ) &&
+ ( eFormat == rOtherFld.eFormat ) );
+}
+
+//----------------------------------------------------------------------------
+
+void SvxExtFileField::Load( SvPersistStream & rStm )
+{
+ USHORT nType, nFormat;
+
+ // UNICODE: rStm >> aFile;
+ rStm.ReadByteString(aFile);
+
+ rStm >> nType;
+ rStm >> nFormat;
+
+ eType = (SvxFileType) nType;
+ eFormat= (SvxFileFormat) nFormat;
+}
+
+//----------------------------------------------------------------------------
+
+void SvxExtFileField::Save( SvPersistStream & rStm )
+{
+ // UNICODE: rStm << aFile;
+ rStm.WriteByteString(aFile);
+
+ rStm << (USHORT) eType;
+ rStm << (USHORT) eFormat;
+}
+
+//----------------------------------------------------------------------------
+
+XubString SvxExtFileField::GetFormatted() const
+{
+ XubString aString;
+
+ INetURLObject aURLObj( aFile );
+
+ if( INET_PROT_FILE == aURLObj.GetProtocol() )
+ {
+ switch( eFormat )
+ {
+ case SVXFILEFORMAT_FULLPATH:
+ aString = aURLObj.GetFull();
+ break;
+
+ case SVXFILEFORMAT_PATH:
+ aString = aURLObj.GetPath();
+ break;
+
+ case SVXFILEFORMAT_NAME:
+ aString = aURLObj.GetBase();
+ break;
+
+ case SVXFILEFORMAT_NAME_EXT:
+ aString = aURLObj.GetName();
+ break;
+ }
+ }
+ else
+ {
+ switch( eFormat )
+ {
+ case SVXFILEFORMAT_FULLPATH:
+ aString = aURLObj.GetMainURL();
+ break;
+
+ case SVXFILEFORMAT_PATH:
+ aString = aURLObj.GetMainURL();
+ aString.Erase( aString.Search( aURLObj.GetLastName() ) );
+ break;
+
+ case SVXFILEFORMAT_NAME:
+ aString = aURLObj.GetBase();
+ break;
+
+ case SVXFILEFORMAT_NAME_EXT:
+ aString = aURLObj.GetLastName();
+ break;
+ }
+ }
+
+ return( aString );
+}
+
+//----------------------------------------------------------------------------
+// SvxAuthorField
+//----------------------------------------------------------------------------
+
+SV_IMPL_PERSIST1( SvxAuthorField, SvxFieldData );
+
+//----------------------------------------------------------------------------
+
+SvxAuthorField::SvxAuthorField()
+{
+ eType = SVXAUTHORTYPE_VAR;
+ eFormat = SVXAUTHORFORMAT_FULLNAME;
+}
+
+//----------------------------------------------------------------------------
+
+SvxAuthorField::SvxAuthorField( const SvxAddressItem& rAdrItem,
+ SvxAuthorType eT, SvxAuthorFormat eF )
+{
+ aName = rAdrItem.GetName();
+ aFirstName = rAdrItem.GetFirstName();
+ aShortName = rAdrItem.GetShortName();
+ eType = eT;
+ eFormat = eF;
+}
+
+//----------------------------------------------------------------------------
+
+SvxFieldData* SvxAuthorField::Clone() const
+{
+ return new SvxAuthorField( *this );
+}
+
+//----------------------------------------------------------------------------
+
+int SvxAuthorField::operator==( const SvxFieldData& rOther ) const
+{
+ if ( rOther.Type() != Type() )
+ return FALSE;
+
+ const SvxAuthorField& rOtherFld = (const SvxAuthorField&) rOther;
+ return ( ( aName == rOtherFld.aName ) &&
+ ( aFirstName == rOtherFld.aFirstName ) &&
+ ( aShortName == rOtherFld.aShortName ) &&
+ ( eType == rOtherFld.eType ) &&
+ ( eFormat == rOtherFld.eFormat ) );
+}
+
+//----------------------------------------------------------------------------
+
+void SvxAuthorField::Load( SvPersistStream & rStm )
+{
+ USHORT nType, nFormat;
+
+ // UNICODE: rStm >> aName;
+ rStm.ReadByteString(aName);
+
+ // UNICODE: rStm >> aFirstName;
+ rStm.ReadByteString(aFirstName);
+
+ // UNICODE: rStm >> aShortName;
+ rStm.ReadByteString(aShortName);
+
+ rStm >> nType;
+ rStm >> nFormat;
+
+ eType = (SvxAuthorType) nType;
+ eFormat= (SvxAuthorFormat) nFormat;
+}
+
+//----------------------------------------------------------------------------
+
+void SvxAuthorField::Save( SvPersistStream & rStm )
+{
+ // UNICODE: rStm << aName;
+ rStm.WriteByteString(aName);
+
+ // UNICODE: rStm << aFirstName;
+ rStm.WriteByteString(aFirstName);
+
+ // UNICODE: rStm << aShortName;
+ rStm.WriteByteString(aShortName);
+
+ rStm << (USHORT) eType;
+ rStm << (USHORT) eFormat;
+}
+
+//----------------------------------------------------------------------------
+
+XubString SvxAuthorField::GetFormatted() const
+{
+ XubString aString;
+
+ switch( eFormat )
+ {
+ case SVXAUTHORFORMAT_FULLNAME:
+ aString = aFirstName;
+ aString += sal_Unicode(' ');
+ aString += aName;
+ break;
+
+ case SVXAUTHORFORMAT_NAME:
+ aString = aName;
+ break;
+
+ case SVXAUTHORFORMAT_FIRSTNAME:
+ aString = aFirstName;
+ break;
+
+ case SVXAUTHORFORMAT_SHORTNAME:
+ aString = aShortName;
+ break;
+ }
+
+ return( aString );
+}
+
+
diff --git a/svx/source/items/frmitems.cxx b/svx/source/items/frmitems.cxx
new file mode 100644
index 0000000000..0ee38e9293
--- /dev/null
+++ b/svx/source/items/frmitems.cxx
@@ -0,0 +1,5342 @@
+/*************************************************************************
+ *
+ * $RCSfile: frmitems.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#include <limits.h>
+
+#pragma hdrstop
+
+#define ITEMID_PAPERBIN 0
+#define ITEMID_SIZE 0
+#define ITEMID_LRSPACE 0
+#define ITEMID_ULSPACE 0
+#define ITEMID_PRINT 0
+#define ITEMID_OPAQUE 0
+#define ITEMID_PROTECT 0
+#define ITEMID_SHADOW 0
+#define ITEMID_BOX 0
+#define ITEMID_BOXINFO 0
+#define ITEMID_FMTBREAK 0
+#define ITEMID_FMTKEEP 0
+#define ITEMID_LINE 0
+#define ITEMID_BRUSH 0
+
+
+#ifndef _ARGS_HXX //autogen
+#include <svtools/args.hxx>
+#endif
+#ifndef _GRFMGR_HXX //autogen
+#include <goodies/grfmgr.hxx>
+#endif
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+#ifndef SVX_LIGHT
+#ifndef _SFXDOCFILE_HXX //autogen
+#include <sfx2/docfile.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#endif // !SVX_LIGHT
+#include <svtools/sbx.hxx>
+#define GLOBALOVERFLOW3
+
+#define _SVX_FRMITEMS_CXX
+
+#include <svtools/memberid.hrc>
+
+#ifndef _WALLITEM_HXX
+#include <svtools/wallitem.hxx>
+#endif
+#ifndef _CNTWALL_HXX
+#include <svtools/cntwall.hxx>
+#endif
+
+// xml stuff
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include <xmloff/xmlkywd.hxx>
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include <xmloff/xmluconv.hxx>
+#endif
+#ifndef _XMLOFF_XMLITMAP_HXX
+#include <xmloff/xmlitmap.hxx>
+#endif
+#ifndef _XMLOFF_XMLITEM_HXX
+#include <xmloff/xmlitem.hxx>
+#endif
+#include <rtl/ustring>
+#include <rtl/ustrbuf.hxx>
+
+#include <impgrf.hxx>
+#include "svxids.hrc"
+#include "svxitems.hrc"
+#include "dialogs.hrc"
+
+#include "pbinitem.hxx"
+#include "sizeitem.hxx"
+#include "lrspitem.hxx"
+#include "ulspitem.hxx"
+#include "prntitem.hxx"
+#include "opaqitem.hxx"
+#include "protitem.hxx"
+#include "shaditem.hxx"
+#include "boxitem.hxx"
+#include "brkitem.hxx"
+#include "keepitem.hxx"
+#include "bolnitem.hxx"
+#include "brshitem.hxx"
+#include "backgrnd.hxx"
+
+#include "itemtype.hxx"
+#include "dialmgr.hxx"
+#include "svxerr.hxx"
+
+#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
+#include <com/sun/star/table/BorderLine.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLVERTJUSTIFY_HPP_
+#include <com/sun/star/table/CellVertJustify.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_SHADOWLOCATION_HPP_
+#include <com/sun/star/table/ShadowLocation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_TABLEBORDER_HPP_
+#include <com/sun/star/table/TableBorder.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_SHADOWFORMAT_HPP_
+#include <com/sun/star/table/ShadowFormat.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLRANGEADDRESS_HPP_
+#include <com/sun/star/table/CellRangeAddress.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLCONTENTTYPE_HPP_
+#include <com/sun/star/table/CellContentType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_TABLEORIENTATION_HPP_
+#include <com/sun/star/table/TableOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLHORIJUSTIFY_HPP_
+#include <com/sun/star/table/CellHoriJustify.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_SORTFIELD_HPP_
+#include <com/sun/star/util/SortField.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_SORTFIELDTYPE_HPP_
+#include <com/sun/star/util/SortFieldType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLORIENTATION_HPP_
+#include <com/sun/star/table/CellOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLADDRESS_HPP_
+#include <com/sun/star/table/CellAddress.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_PAGESTYLELAYOUT_HPP_
+#include <com/sun/star/style/PageStyleLayout.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_BREAKTYPE_HPP_
+#include <com/sun/star/style/BreakType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_GRAPHICLOCATION_HPP_
+#include <com/sun/star/style/GraphicLocation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_RECTANGLE_HPP_
+#include <com/sun/star/awt/Rectangle.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_SELECTION_HPP_
+#include <com/sun/star/awt/Selection.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_SIZE_HPP_
+#include <com/sun/star/awt/Size.hpp>
+#endif
+
+#ifndef _SVX_UNOMID_HXX
+#include <unomid.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+
+// Konvertierung fuer UNO
+#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
+#define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
+
+// STATIC DATA -----------------------------------------------------------
+
+
+inline void SetValueProp( XubString& rStr, const sal_uInt16 nValue,
+ const sal_uInt16 nProp )
+{
+ if( 100 == nProp )
+ rStr += String::CreateFromInt32( nValue );
+ else
+ ( rStr += String::CreateFromInt32( nProp )) += sal_Unicode('%');
+}
+
+inline void SetValueProp( XubString& rStr, const short nValue,
+ const sal_uInt16 nProp )
+{
+ if( 100 == nProp )
+ rStr += String::CreateFromInt32( nValue );
+ else
+ ( rStr += String::CreateFromInt32( nProp )) += sal_Unicode('%');
+}
+
+// -----------------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SvxPaperBinItem, SfxByteItem);
+TYPEINIT1_AUTOFACTORY(SvxSizeItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxLRSpaceItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxULSpaceItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxPrintItem, SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SvxOpaqueItem, SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SvxProtectItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxBrushItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxShadowItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxBoxItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxBoxInfoItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxFmtBreakItem, SfxEnumItem);
+TYPEINIT1_AUTOFACTORY(SvxFmtKeepItem, SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SvxLineItem, SfxPoolItem);
+
+// class SvxPaperBinItem ------------------------------------------------
+
+SfxPoolItem* SvxPaperBinItem::Clone( SfxItemPool* ) const
+{
+ return new SvxPaperBinItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxPaperBinItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ rStrm << GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxPaperBinItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_Int8 nBin;
+ rStrm >> nBin;
+ return new SvxPaperBinItem( Which(), nBin );
+}
+
+// -----------------------------------------------------------------------
+
+SfxItemPresentation SvxPaperBinItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ rText = String::CreateFromInt32( GetValue() );
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ sal_Int8 nValue = GetValue();
+
+ if ( PAPERBIN_PRINTER_SETTINGS == nValue )
+ rText = SVX_RESSTR(RID_SVXSTR_PAPERBIN_SETTINGS);
+ else
+ {
+ rText = SVX_RESSTR(RID_SVXSTR_PAPERBIN);
+ rText += sal_Unicode(' ');
+ rText += String::CreateFromInt32( nValue );
+ }
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// class SvxSizeItem -----------------------------------------------------
+
+SvxSizeItem::SvxSizeItem( const sal_uInt16 nId, const Size& rSize ) :
+
+ SfxPoolItem( nId ),
+
+ aSize( rSize )
+{
+}
+
+// -----------------------------------------------------------------------
+sal_Bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ awt::Size aTmp(aSize.Width(), aSize.Height());
+ if(nMemberId&CONVERT_TWIPS)
+ {
+ aTmp.Height = TWIP_TO_MM100(aTmp.Height);
+ aTmp.Width = TWIP_TO_MM100(aTmp.Width);
+ }
+ switch(nMemberId&(~CONVERT_TWIPS))
+ {
+ case MID_SIZE_SIZE: rVal <<= aTmp; break;
+ case MID_SIZE_WIDTH: rVal <<= aTmp.Width; break;
+ case MID_SIZE_HEIGHT: rVal <<= aTmp.Height; break;
+ }
+ return sal_True;
+}
+// -----------------------------------------------------------------------
+sal_Bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+ switch(nMemberId&(~CONVERT_TWIPS))
+ {
+ case MID_SIZE_SIZE:
+ {
+ awt::Size aTmp;
+ if( rVal >>= aTmp )
+ {
+ if(bConvert)
+ {
+ aTmp.Height = MM100_TO_TWIP(aTmp.Height);
+ aTmp.Width = MM100_TO_TWIP(aTmp.Width);
+ }
+ aSize = Size( aTmp.Width, aTmp.Height );
+ }
+ else
+ {
+ return sal_False;
+ }
+ }
+ break;
+ case MID_SIZE_WIDTH:
+ {
+ sal_Int32 nVal;
+ if(!(rVal >>= nVal ))
+ return sal_False;
+
+ aSize.Width() = bConvert ? MM100_TO_TWIP(nVal) : nVal;
+ }
+ break;
+ case MID_SIZE_HEIGHT:
+ {
+ sal_Int32 nVal;
+ if(!(rVal >>= nVal))
+ return sal_True;
+
+ aSize.Height() = bConvert ? MM100_TO_TWIP(nVal) : nVal;
+ }
+ break;
+ default:
+ return sal_False;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+SvxSizeItem::SvxSizeItem( const sal_uInt16 nId ) :
+
+ SfxPoolItem( nId )
+{
+}
+
+// -----------------------------------------------------------------------
+
+int SvxSizeItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return ( aSize == ( (SvxSizeItem&)rAttr ).GetSize() );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxSizeItem::Clone( SfxItemPool* ) const
+{
+ return new SvxSizeItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxSizeItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ rText = GetMetricText( aSize.Width(), eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ rText += GetMetricText( aSize.Height(), eCoreUnit, ePresUnit );
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = SVX_RESSTR(RID_SVXITEMS_SIZE_WIDTH);
+ rText += GetMetricText( aSize.Width(), eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ rText += cpDelim;
+ rText += SVX_RESSTR(RID_SVXITEMS_SIZE_HEIGHT);
+ rText += GetMetricText( aSize.Height(), eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxSizeItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ rStrm << aSize.Width();
+ rStrm << aSize.Height();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxSizeItem::ScaleMetrics( long nMult, long nDiv )
+{
+ aSize.Width() = Scale( aSize.Width(), nMult, nDiv );
+ aSize.Height() = Scale( aSize.Height(), nMult, nDiv );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxSizeItem::HasMetrics() const
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+
+SfxPoolItem* SvxSizeItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ long nWidth, nHeight;
+ rStrm >> nWidth >> nHeight;
+
+ SvxSizeItem* pAttr = new SvxSizeItem( Which() );
+ pAttr->SetSize(Size(nWidth, nHeight));
+
+ return pAttr;
+}
+
+// class SvxLRSpaceItem --------------------------------------------------
+
+SvxLRSpaceItem::SvxLRSpaceItem( const sal_uInt16 nId ) :
+
+ SfxPoolItem( nId ),
+
+ nFirstLineOfst ( 0 ), nPropFirstLineOfst( 100 ),
+ nTxtLeft ( 0 ),
+ nLeftMargin ( 0 ), nPropLeftMargin( 100 ),
+ nRightMargin ( 0 ), nPropRightMargin( 100 ),
+ bBulletFI ( 0 ),
+ bAutoFirst ( 0 )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxLRSpaceItem::SvxLRSpaceItem( const sal_Int32 nLeft, const sal_Int32 nRight,
+ const sal_Int32 nTLeft, const short nOfset,
+ const sal_uInt16 nId ) :
+
+ SfxPoolItem( nId ),
+
+ nFirstLineOfst ( nOfset ), nPropFirstLineOfst( 100 ),
+ nTxtLeft ( nTLeft ),
+ nLeftMargin ( nLeft ), nPropLeftMargin( 100 ),
+ nRightMargin ( nRight ), nPropRightMargin( 100 ),
+ bBulletFI ( 0 ),
+ bAutoFirst ( 0 )
+{
+}
+
+// -----------------------------------------------------------------------
+sal_Bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ sal_Bool bRet = sal_True;
+ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+ nMemberId &= ~CONVERT_TWIPS;
+ switch( nMemberId )
+ {
+ // jetzt alles signed
+ case MID_L_MARGIN:
+ rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nLeftMargin) : nLeftMargin);
+ break;
+
+ case MID_R_MARGIN:
+ rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nRightMargin) : nRightMargin);
+ break;
+ case MID_L_REL_MARGIN:
+ rVal <<= (sal_Int16)nPropLeftMargin;
+ break;
+ case MID_R_REL_MARGIN:
+ rVal <<= (sal_Int16)nPropRightMargin;
+ break;
+
+ case MID_FIRST_LINE_INDENT:
+ rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nFirstLineOfst) : nFirstLineOfst);
+ break;
+
+ case MID_FIRST_LINE_REL_INDENT:
+ rVal <<= (sal_Int16)(nPropFirstLineOfst);
+ break;
+
+ case MID_FIRST_AUTO:
+ rVal = Bool2Any(IsAutoFirst());
+ break;
+
+ default:
+ bRet = sal_False;
+ DBG_ERROR("unknown MemberId");
+ }
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+ nMemberId &= ~CONVERT_TWIPS;
+ sal_Int32 nMaxVal = bConvert ? TWIP_TO_MM100(USHRT_MAX) : USHRT_MAX;
+ sal_Int32 nVal;
+ if( nMemberId != MID_FIRST_AUTO &&
+ nMemberId != MID_L_REL_MARGIN && nMemberId != MID_R_REL_MARGIN)
+ if(!(rVal >>= nVal))
+ return sal_False;
+
+ switch( nMemberId )
+ {
+ case MID_L_MARGIN:
+ SetLeft((sal_Int32)bConvert ? MM100_TO_TWIP(nVal) : nVal);
+ break;
+
+ case MID_R_MARGIN:
+ SetRight((sal_Int32) bConvert ? MM100_TO_TWIP(nVal) : nVal);
+ break;
+ case MID_L_REL_MARGIN:
+ case MID_R_REL_MARGIN:
+ {
+ sal_Int32 nRel;
+ if((rVal >>= nRel) && nRel > 1)
+ {
+ if(MID_L_REL_MARGIN== nMemberId)
+ nPropLeftMargin = nRel;
+ else
+ nPropRightMargin = nRel;
+ }
+ else
+ return FALSE;
+ }
+ break;
+ case MID_FIRST_LINE_INDENT :
+ SetTxtFirstLineOfst(bConvert ? MM100_TO_TWIP(nVal) : nVal);
+ break;
+
+ case MID_FIRST_LINE_REL_INDENT:
+ SetPropTxtFirstLineOfst ( nVal );
+ break;
+
+ case MID_FIRST_AUTO:
+ SetAutoFirst( Any2Bool(rVal) );
+ break;
+
+ default:
+ DBG_ERROR("unknown MemberId");
+ return sal_False;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxLRSpaceItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+ sal_Bool bOk = sal_False;
+#ifndef SVX_LIGHT
+
+ switch( nMemberId )
+ {
+ case MID_L_MARGIN:
+ case MID_R_MARGIN:
+ {
+ sal_Int32 nProp = 100;
+ sal_Int32 nAbs = 0;
+
+ if( rValue.indexOf( sal_Unicode('%') ) != -1 )
+ bOk = rUnitConverter.convertPercent( nProp, rValue );
+ else
+ bOk = rUnitConverter.convertMeasure( nAbs, rValue, 0x0000, 0xffff );
+
+ if( bOk )
+ {
+ switch( nMemberId )
+ {
+ case MID_L_MARGIN:
+ SetTxtLeft( (sal_Int32)nAbs, (sal_uInt16)nProp );
+ break;
+ case MID_R_MARGIN:
+ SetRight( (sal_Int32)nAbs, (sal_uInt16)nProp );
+ break;
+ case MID_FIRST_LINE_INDENT:
+ break;
+ }
+ }
+ }
+ break;
+ case MID_FIRST_LINE_INDENT:
+ {
+ sal_Int32 nProp = 100;
+ sal_Int32 nAbs = 0;
+
+ if( rValue.indexOf( sal_Unicode('%') ) != -1 )
+ bOk = rUnitConverter.convertPercent( nProp, rValue );
+ else
+ bOk = rUnitConverter.convertMeasure( nAbs, rValue, -0x7fff, 0x7fff );
+
+ SetTxtFirstLineOfst( (short)nAbs, (sal_uInt16)nProp );
+ }
+
+ case MID_FIRST_AUTO:
+ {
+ sal_Bool bAutoFirst;
+ bOk = rUnitConverter.convertBool( bAutoFirst, rValue );
+ if( bOk )
+ SetAutoFirst( bAutoFirst );
+ }
+ break;
+
+ default:
+ DBG_ERROR( "unknown member id!");
+ }
+
+#endif
+ return bOk;
+}
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxLRSpaceItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ // HACK FINAL_ASSERT( !rLRSpace.IsBulletFI(), "svxxml_out_SvxLRSpaceItem_para: Remember MIB to ask MT if this is OK" );
+ OUStringBuffer aOut;
+
+ sal_Bool bRet = sal_True;
+ switch( nMemberId )
+ {
+ case MID_L_MARGIN:
+ if(GetPropLeft() != 100)
+ rUnitConverter.convertPercent( aOut, GetPropLeft() );
+ else
+ rUnitConverter.convertMeasure( aOut, GetTxtLeft() );
+ break;
+
+ case MID_R_MARGIN:
+ if(GetPropRight() != 100)
+ rUnitConverter.convertPercent( aOut, GetPropRight() );
+ else
+ rUnitConverter.convertMeasure( aOut, GetRight() );
+ break;
+
+ case MID_FIRST_AUTO:
+ if( IsAutoFirst() )
+ rUnitConverter.convertBool( aOut, IsAutoFirst() );
+ else
+ bRet = sal_False;
+ break;
+
+ case MID_FIRST_LINE_INDENT:
+ if( !IsAutoFirst() )
+ {
+ if(GetPropTxtFirstLineOfst() != 100)
+ rUnitConverter.convertPercent( aOut,
+ GetPropTxtFirstLineOfst() );
+ else
+ rUnitConverter.convertMeasure( aOut,
+ nFirstLineOfst );
+ }
+ else
+ bRet = sal_False;
+ break;
+
+ default:
+ DBG_ERROR( "unknown member id!");
+ bRet = sal_False;
+ break;
+ }
+
+ rValue = aOut.makeStringAndClear();
+
+ return bRet;
+#else
+ return sal_False;
+#endif
+}
+
+
+// -----------------------------------------------------------------------
+
+// nLeftMargin und nTxtLeft anpassen.
+
+void SvxLRSpaceItem::AdjustLeft()
+{
+ if ( 0 > nFirstLineOfst )
+ nLeftMargin = nTxtLeft + nFirstLineOfst;
+ else
+ nLeftMargin = nTxtLeft;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLRSpaceItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return (
+ nLeftMargin == ((SvxLRSpaceItem&)rAttr).GetLeft() &&
+ nRightMargin == ((SvxLRSpaceItem&)rAttr).GetRight() &&
+ nFirstLineOfst == ((SvxLRSpaceItem&)rAttr).GetTxtFirstLineOfst() &&
+ nPropLeftMargin == ((SvxLRSpaceItem&)rAttr).GetPropLeft() &&
+ nPropRightMargin == ((SvxLRSpaceItem&)rAttr).GetPropRight() &&
+ nPropFirstLineOfst == ((SvxLRSpaceItem&)rAttr).GetPropTxtFirstLineOfst() &&
+ bBulletFI == ((SvxLRSpaceItem&)rAttr).IsBulletFI() &&
+ bAutoFirst == ((SvxLRSpaceItem&)rAttr).IsAutoFirst() );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxLRSpaceItem::Clone( SfxItemPool* ) const
+{
+ return new SvxLRSpaceItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxLRSpaceItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ {
+ if ( 100 != nPropLeftMargin )
+ ( rText = String::CreateFromInt32( nPropLeftMargin )) += sal_Unicode('%');
+ else
+ rText = GetMetricText( (long)nLeftMargin,
+ eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ if ( 100 != nPropFirstLineOfst )
+ ( rText += String::CreateFromInt32( nPropFirstLineOfst )) += sal_Unicode('%');
+ else
+ rText += GetMetricText( (long)nFirstLineOfst,
+ eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ if ( 100 != nRightMargin )
+ ( rText += String::CreateFromInt32( nRightMargin )) += sal_Unicode('%');
+ else
+ rText += GetMetricText( (long)nRightMargin,
+ eCoreUnit, ePresUnit );
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+ }
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ rText = SVX_RESSTR(RID_SVXITEMS_LRSPACE_LEFT);
+ if ( 100 != nPropLeftMargin )
+ ( rText += String::CreateFromInt32( nPropLeftMargin )) += sal_Unicode('%');
+ else
+ {
+ rText += GetMetricText( (long)nLeftMargin,
+ eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ }
+ rText += cpDelim;
+ if ( 100 != nPropFirstLineOfst || nFirstLineOfst )
+ {
+ rText += SVX_RESSTR(RID_SVXITEMS_LRSPACE_FLINE);
+ if ( 100 != nPropFirstLineOfst )
+ ( rText += String::CreateFromInt32( nPropFirstLineOfst ))
+ += sal_Unicode('%');
+ else
+ {
+ rText += GetMetricText( (long)nFirstLineOfst,
+ eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ }
+ rText += cpDelim;
+ }
+ rText += SVX_RESSTR(RID_SVXITEMS_LRSPACE_RIGHT);
+ if ( 100 != nPropRightMargin )
+ ( rText += String::CreateFromInt32( nPropRightMargin )) += sal_Unicode('%');
+ else
+ {
+ rText += GetMetricText( (long)nRightMargin,
+ eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ }
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ }
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+// MT: BulletFI: Vor 501 wurde im Outliner das Bullet nicht auf der Position des
+// FI positioniert, deshalb muss in aelteren Dokumenten der FI auf 0 stehen.
+
+#define BULLETLR_MARKER 0x599401FE
+
+SvStream& SvxLRSpaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ short nSaveFI = nFirstLineOfst;
+ if ( IsBulletFI() )
+ ((SvxLRSpaceItem*)this)->SetTxtFirstLineOfst( 0 ); // nLeftMargin wird mitmanipuliert, siehe Create()
+
+ sal_uInt16 nMargin = 0;
+ if( nLeftMargin > 0 )
+ nMargin = sal_uInt16( nLeftMargin );
+ rStrm << nMargin;
+ rStrm << nPropLeftMargin;
+ if( nRightMargin > 0 )
+ nMargin = sal_uInt16( nRightMargin );
+ else
+ nMargin = 0;
+ rStrm << nMargin;
+ rStrm << nPropRightMargin;
+ rStrm << nFirstLineOfst;
+ rStrm << nPropFirstLineOfst;
+ if( nTxtLeft > 0 )
+ nMargin = sal_uInt16( nTxtLeft );
+ else
+ nMargin = 0;
+ rStrm << nMargin;
+ if( nItemVersion >= LRSPACE_AUTOFIRST_VERSION )
+ {
+ sal_Int8 nAutoFirst = bAutoFirst ? 1 : 0;
+ if( nItemVersion >= LRSPACE_NEGATIVE_VERSION &&
+ ( nLeftMargin < 0 || nRightMargin < 0 || nTxtLeft < 0 ) )
+ nAutoFirst |= 0x80;
+ rStrm << nAutoFirst;
+
+ if ( IsBulletFI() )
+ {
+ // Ab 6.0 keine Magicnumber schreiben...
+ DBG_ASSERT( SOFFICE_FILEFORMAT_NOW <= SOFFICE_FILEFORMAT_50, "MT: Fileformat SvxLRSpaceItem aendern!" );
+ rStrm << (sal_uInt32) BULLETLR_MARKER;
+ rStrm << nSaveFI;
+ }
+ if( 0x80 & nAutoFirst )
+ {
+ rStrm << nLeftMargin;
+ rStrm << nRightMargin;
+ }
+ }
+
+ if ( IsBulletFI() )
+ ((SvxLRSpaceItem*)this)->SetTxtFirstLineOfst( nSaveFI );
+
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxLRSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
+{
+ sal_uInt16 left, prpleft, right, prpright, prpfirstline, txtleft;
+ short firstline;
+ sal_Int8 autofirst = 0;
+
+ if ( nVersion >= LRSPACE_AUTOFIRST_VERSION )
+ {
+ rStrm >> left >> prpleft >> right >> prpright >> firstline >>
+ prpfirstline >> txtleft >> autofirst;
+
+ sal_uInt32 nPos = rStrm.Tell();
+ sal_uInt32 nMarker;
+ rStrm >> nMarker;
+ if ( nMarker == BULLETLR_MARKER )
+ {
+ rStrm >> firstline;
+ if ( firstline < 0 )
+ left += firstline; // s.u.: txtleft = ...
+ }
+ else
+ rStrm.Seek( nPos );
+ }
+ else if ( nVersion == LRSPACE_TXTLEFT_VERSION )
+ {
+ rStrm >> left >> prpleft >> right >> prpright >> firstline >>
+ prpfirstline >> txtleft;
+ }
+ else if ( nVersion == LRSPACE_16_VERSION )
+ {
+ rStrm >> left >> prpleft >> right >> prpright >> firstline >>
+ prpfirstline;
+ }
+ else
+ {
+ sal_Int8 nL, nR, nFL;
+ rStrm >> left >> nL >> right >> nR >> firstline >> nFL;
+ prpleft = (sal_uInt16)nL;
+ prpright = (sal_uInt16)nR;
+ prpfirstline = (sal_uInt16)nFL;
+ }
+
+ txtleft = firstline >= 0 ? left : left - firstline;
+ SvxLRSpaceItem* pAttr = new SvxLRSpaceItem( Which() );
+
+ pAttr->nLeftMargin = left;
+ pAttr->nPropLeftMargin = prpleft;
+ pAttr->nRightMargin = right;
+ pAttr->nPropRightMargin = prpright;
+ pAttr->nFirstLineOfst = firstline;
+ pAttr->nPropFirstLineOfst = prpfirstline;
+ pAttr->nTxtLeft = txtleft;
+ pAttr->bAutoFirst = autofirst & 0x01;
+ if( nVersion >= LRSPACE_NEGATIVE_VERSION && ( autofirst & 0x80 ) )
+ {
+ sal_Int32 nMargin;
+ rStrm >> nMargin;
+ pAttr->nLeftMargin = nMargin;
+ pAttr->nTxtLeft = firstline >= 0 ? nMargin : nMargin - firstline;
+ rStrm >> nMargin;
+ pAttr->nRightMargin = nMargin;
+ }
+ return pAttr;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxLRSpaceItem::GetVersion( sal_uInt16 nFileVersion ) const
+{
+ return (nFileVersion == SOFFICE_FILEFORMAT_31)
+ ? LRSPACE_TXTLEFT_VERSION
+ : LRSPACE_NEGATIVE_VERSION;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLRSpaceItem::ScaleMetrics( long nMult, long nDiv )
+{
+ nFirstLineOfst = (short)Scale( nFirstLineOfst, nMult, nDiv );
+ nTxtLeft = Scale( nTxtLeft, nMult, nDiv );
+ nLeftMargin = Scale( nLeftMargin, nMult, nDiv );
+ nRightMargin = Scale( nRightMargin, nMult, nDiv );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLRSpaceItem::HasMetrics() const
+{
+ return 1;
+}
+
+// class SvxULSpaceItem --------------------------------------------------
+
+SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nId ) :
+
+ SfxPoolItem( nId ),
+
+ nUpper( 0 ), nPropUpper( 100 ),
+ nLower( 0 ), nPropLower( 100 )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow,
+ const sal_uInt16 nId ) :
+
+ SfxPoolItem( nId ),
+
+ nUpper( nUp ), nPropUpper( 100 ),
+ nLower( nLow ), nPropLower( 100 )
+{
+}
+
+// -----------------------------------------------------------------------
+sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+ nMemberId &= ~CONVERT_TWIPS;
+ switch( nMemberId )
+ {
+ // jetzt alles signed
+ case MID_UP_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nUpper) : nUpper); break;
+ case MID_LO_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nLower) : nLower); break;
+ case MID_UP_REL_MARGIN: rVal <<= (sal_Int16) nPropUpper; break;
+ case MID_LO_REL_MARGIN: rVal <<= (sal_Int16) nPropLower; break;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+ nMemberId &= ~CONVERT_TWIPS;
+ sal_Int32 nVal;
+ switch( nMemberId )
+ {
+ case MID_UP_MARGIN :
+ if(!(rVal >>= nVal) || nVal < 0)
+ return sal_False;
+ SetUpper((sal_uInt16)bConvert ? MM100_TO_TWIP(nVal) : nVal);
+ break;
+ case MID_LO_MARGIN :
+ if(!(rVal >>= nVal) || nVal < 0)
+ return sal_False;
+ SetLower((sal_uInt16)bConvert ? MM100_TO_TWIP(nVal) : nVal);
+ break;
+ case MID_UP_REL_MARGIN:
+ case MID_LO_REL_MARGIN:
+ {
+ sal_Int32 nRel;
+ if((rVal >>= nRel) && nRel > 1 )
+ {
+ if(MID_UP_REL_MARGIN == nMemberId)
+ nPropUpper = nRel;
+ else
+ nPropLower = nRel;
+ }
+ else
+ return FALSE;
+ }
+ break;
+
+
+ default:
+ DBG_ERROR("unknown MemberId");
+ return sal_False;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxULSpaceItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+ sal_Bool bOk = sal_False;
+#ifndef SVX_LIGHT
+ sal_Int32 nProp = 100;
+ sal_Int32 nAbs = 0;
+
+ if( rValue.indexOf( sal_Unicode('%') ) != -1 )
+ bOk = rUnitConverter.convertPercent( nProp, rValue );
+ else
+ bOk = rUnitConverter.convertMeasure( nAbs, rValue );
+
+ switch( nMemberId )
+ {
+ case MID_UP_MARGIN:
+ SetUpper( (sal_uInt16)nAbs, (sal_uInt16)nProp );
+ break;
+ case MID_LO_MARGIN:
+ SetLower( (sal_uInt16)nAbs, (sal_uInt16)nProp );
+ break;
+ default:
+ DBG_ERROR("unknown MemberId");
+ };
+#endif
+ return bOk;
+}
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxULSpaceItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+
+ OUStringBuffer aOut;
+
+ switch( nMemberId )
+ {
+ case MID_UP_MARGIN:
+ if( GetPropUpper() != 100 )
+ rUnitConverter.convertPercent( aOut, GetPropUpper() );
+ else
+ rUnitConverter.convertMeasure( aOut, GetUpper() );
+ break;
+
+ case MID_LO_MARGIN:
+ if( GetPropLower() != 100 )
+ rUnitConverter.convertPercent( aOut, GetPropLower() );
+ else
+ rUnitConverter.convertMeasure( aOut, GetLower() );
+ break;
+
+ default:
+ DBG_ERROR("unknown MemberId");
+ };
+
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+int SvxULSpaceItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return ( nUpper == ( (SvxULSpaceItem&)rAttr ).nUpper &&
+ nLower == ( (SvxULSpaceItem&)rAttr ).nLower &&
+ nPropUpper == ( (SvxULSpaceItem&)rAttr ).nPropUpper &&
+ nPropLower == ( (SvxULSpaceItem&)rAttr ).nPropLower );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxULSpaceItem::Clone( SfxItemPool* ) const
+{
+ return new SvxULSpaceItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxULSpaceItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ {
+ if ( 100 != nPropUpper )
+ ( rText = String::CreateFromInt32( nPropUpper )) += sal_Unicode('%');
+ else
+ rText = GetMetricText( (long)nUpper, eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ if ( 100 != nPropLower )
+ ( rText += String::CreateFromInt32( nPropLower )) += sal_Unicode('%');
+ else
+ rText += GetMetricText( (long)nLower, eCoreUnit, ePresUnit );
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+ }
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ rText = SVX_RESSTR(RID_SVXITEMS_ULSPACE_UPPER);
+ if ( 100 != nPropUpper )
+ ( rText += String::CreateFromInt32( nPropUpper )) += sal_Unicode('%');
+ else
+ {
+ rText += GetMetricText( (long)nUpper, eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ }
+ rText += cpDelim;
+ rText += SVX_RESSTR(RID_SVXITEMS_ULSPACE_LOWER);
+ if ( 100 != nPropLower )
+ ( rText += String::CreateFromInt32( nPropLower )) += sal_Unicode('%');
+ else
+ {
+ rText += GetMetricText( (long)nLower, eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ }
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ }
+#endif
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxULSpaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ rStrm << GetUpper()
+ << GetPropUpper()
+ << GetLower()
+ << GetPropLower();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxULSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
+{
+ sal_uInt16 upper, lower, nPL = 0, nPU = 0;
+
+ if ( nVersion == ULSPACE_16_VERSION )
+ rStrm >> upper >> nPU >> lower >> nPL;
+ else
+ {
+ sal_Int8 nU, nL;
+ rStrm >> upper >> nU >> lower >> nL;
+ nPL = (sal_uInt16)nL;
+ nPU = (sal_uInt16)nU;
+ }
+
+ SvxULSpaceItem* pAttr = new SvxULSpaceItem( Which() );
+ pAttr->SetUpperValue( upper );
+ pAttr->SetLowerValue( lower );
+ pAttr->SetPropUpper( nPU );
+ pAttr->SetPropLower( nPL );
+ return pAttr;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxULSpaceItem::GetVersion( sal_uInt16 nFileVersion ) const
+{
+ return ULSPACE_16_VERSION;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxULSpaceItem::ScaleMetrics( long nMult, long nDiv )
+{
+ nUpper = (sal_uInt16)Scale( nUpper, nMult, nDiv );
+ nLower = (sal_uInt16)Scale( nLower, nMult, nDiv );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxULSpaceItem::HasMetrics() const
+{
+ return 1;
+}
+
+
+// class SvxPrintItem ----------------------------------------------------
+
+SfxPoolItem* SvxPrintItem::Clone( SfxItemPool* ) const
+{
+ return new SvxPrintItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxPrintItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_Int8)GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxPrintItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_Int8 bIsPrint;
+ rStrm >> bIsPrint;
+ return new SvxPrintItem( Which(), sal_Bool( bIsPrint != 0 ) );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxPrintItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ sal_uInt16 nId = RID_SVXITEMS_PRINT_FALSE;
+
+ if ( GetValue() )
+ nId = RID_SVXITEMS_PRINT_TRUE;
+ rText = SVX_RESSTR(nId);
+ return ePres;
+ }
+ }
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxPrintItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_Bool bValue;
+ sal_Bool bOk = rUnitConverter.convertBool( bValue, rValue );
+ SetValue( bValue );
+ return bOk;
+#else
+ return sal_False;
+#endif
+}
+
+sal_Bool SvxPrintItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+ rUnitConverter.convertBool( aOut, GetValue() );
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// class SvxOpaqueItem ---------------------------------------------------
+
+SfxPoolItem* SvxOpaqueItem::Clone( SfxItemPool* ) const
+{
+ return new SvxOpaqueItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxOpaqueItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_Int8)GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxOpaqueItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_Int8 bIsOpaque;
+ rStrm >> bIsOpaque;
+ return new SvxOpaqueItem( Which(), sal_Bool( bIsOpaque != 0 ) );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxOpaqueItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ sal_uInt16 nId = RID_SVXITEMS_OPAQUE_FALSE;
+
+ if ( GetValue() )
+ nId = RID_SVXITEMS_OPAQUE_TRUE;
+ rText = SVX_RESSTR(nId);
+ return ePres;
+ }
+ }
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxOpaqueItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ SetValue( rValue.compareToAscii(sXML_opaque_foreground ) );
+ return GetValue() || rValue.compareToAscii( sXML_opaque_background );
+#else
+ return sal_False;
+#endif
+}
+
+sal_Bool SvxOpaqueItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ if(GetValue())
+ {
+ //rValue = ACP2WS( sXML_opaque_foreground );
+ rValue = OUString( sXML_opaque_foreground, sizeof(sXML_opaque_foreground),
+ gsl_getSystemTextEncoding() );
+ }
+ else
+ {
+ //rValue = ACP2WS( sXML_opaque_background );
+ rValue = OUString( sXML_opaque_background, sizeof(sXML_opaque_background),
+ gsl_getSystemTextEncoding() );
+ }
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// class SvxProtectItem --------------------------------------------------
+
+int SvxProtectItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return ( bCntnt == ( (SvxProtectItem&)rAttr ).bCntnt &&
+ bSize == ( (SvxProtectItem&)rAttr ).bSize &&
+ bPos == ( (SvxProtectItem&)rAttr ).bPos );
+}
+
+/*-----------------16.03.98 12:42-------------------
+--------------------------------------------------*/
+sal_Bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ sal_Bool bValue;
+ switch(nMemberId)
+ {
+ case MID_PROTECT_CONTENT : bValue = bCntnt; break;
+ case MID_PROTECT_SIZE : bValue = bSize; break;
+ case MID_PROTECT_POSITION: bValue = bPos; break;
+ default:
+ DBG_ERROR("falsche MemberId");
+ return sal_False;
+ }
+
+ rVal = Bool2Any( bValue );
+ return sal_True;
+}
+/*-----------------16.03.98 12:42-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Bool bVal( Any2Bool(rVal) );
+ switch(nMemberId)
+ {
+ case MID_PROTECT_CONTENT : bCntnt = bVal; break;
+ case MID_PROTECT_SIZE : bSize = bVal; break;
+ case MID_PROTECT_POSITION: bPos = bVal; break;
+ default:
+ DBG_ERROR("falsche MemberId");
+ return sal_False;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxProtectItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ OUString sContent(sXML_protect_content, sizeof(sXML_protect_content), gsl_getSystemTextEncoding());
+ OUString sSize(sXML_protect_size, sizeof(sXML_protect_size), gsl_getSystemTextEncoding());
+ OUString sPosition(sXML_protect_position, sizeof(sXML_protect_position), gsl_getSystemTextEncoding());
+
+ bCntnt = rValue.indexOf(sContent) != -1;
+ bSize = rValue.indexOf(sSize) != -1;
+ bPos = rValue.indexOf(sPosition) != -1;
+
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxProtectItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+ sal_Bool bEmpty = sal_True;
+
+ if( bCntnt )
+ {
+ aOut.appendAscii( sXML_protect_content );
+ bEmpty = sal_False;
+ }
+
+ if( bSize )
+ {
+ if( bEmpty )
+ bEmpty = sal_True;
+ else
+ aOut.appendAscii( " " );
+
+ aOut.appendAscii( sXML_protect_size );
+ }
+
+ if( bPos )
+ {
+ if( !bEmpty )
+ aOut.appendAscii( " " );
+
+ aOut.appendAscii( sXML_protect_position );
+ }
+
+ rValue = aOut.makeStringAndClear();
+
+ return rValue.getLength() != 0;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxProtectItem::Clone( SfxItemPool* ) const
+{
+ return new SvxProtectItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxProtectItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ sal_uInt16 nId = RID_SVXITEMS_PROT_CONTENT_FALSE;
+
+ if ( bCntnt )
+ nId = RID_SVXITEMS_PROT_CONTENT_TRUE;
+ rText = SVX_RESSTR(nId);
+ rText += cpDelim;
+ nId = RID_SVXITEMS_PROT_SIZE_FALSE;
+
+ if ( bSize )
+ nId = RID_SVXITEMS_PROT_SIZE_TRUE;
+ rText += SVX_RESSTR(nId);
+ rText += cpDelim;
+ nId = RID_SVXITEMS_PROT_POS_FALSE;
+
+ if ( bPos )
+ nId = RID_SVXITEMS_PROT_POS_TRUE;
+ rText += SVX_RESSTR(nId);
+ return ePres;
+ }
+ }
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxProtectItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ sal_Int8 cProt = 0;
+ if( IsPosProtected() ) cProt |= 0x01;
+ if( IsSizeProtected() ) cProt |= 0x02;
+ if( IsCntntProtected() ) cProt |= 0x04;
+ rStrm << (sal_Int8) cProt;
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxProtectItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_Int8 cFlags;
+ rStrm >> cFlags;
+ SvxProtectItem* pAttr = new SvxProtectItem( Which() );
+ pAttr->SetPosProtect( sal_Bool( ( cFlags & 0x01 ) != 0 ) );
+ pAttr->SetSizeProtect( sal_Bool( ( cFlags & 0x02 ) != 0 ) );
+ pAttr->SetCntntProtect( sal_Bool( ( cFlags & 0x04 ) != 0 ) );
+ return pAttr;
+}
+
+// class SvxShadowItem ---------------------------------------------------
+
+SvxShadowItem::SvxShadowItem( const USHORT nId,
+ const Color *pColor, const USHORT nW,
+ const SvxShadowLocation eLoc ) :
+ SfxEnumItemInterface( nId ),
+ aShadowColor(COL_GRAY),
+ nWidth ( nW ),
+ eLocation ( eLoc )
+{
+ if ( pColor )
+ aShadowColor = *pColor;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ table::ShadowFormat aShadow;
+ table::ShadowLocation eSet = table::ShadowLocation_NONE;
+ switch( eLocation )
+ {
+ case SVX_SHADOW_TOPLEFT : eSet = table::ShadowLocation_TOP_LEFT ; break;
+ case SVX_SHADOW_TOPRIGHT : eSet = table::ShadowLocation_TOP_RIGHT ; break;
+ case SVX_SHADOW_BOTTOMLEFT : eSet = table::ShadowLocation_BOTTOM_LEFT ; break;
+ case SVX_SHADOW_BOTTOMRIGHT: eSet = table::ShadowLocation_BOTTOM_RIGHT; break;
+ }
+ aShadow.Location = eSet;
+ aShadow.ShadowWidth = nMemberId&CONVERT_TWIPS ? TWIP_TO_MM100(nWidth) : nWidth;
+ aShadow.IsTransparent = aShadowColor.GetTransparency() > 0;
+ aShadow.Color = aShadowColor.GetColor();
+ rVal <<= aShadow;
+ return sal_True;
+}
+// -----------------------------------------------------------------------
+sal_Bool SvxShadowItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ table::ShadowFormat aShadow;
+
+ if(rVal >>= aShadow)
+ {
+ SvxShadowLocation eSet = SVX_SHADOW_NONE;
+ switch( aShadow.Location )
+ {
+ case table::ShadowLocation_TOP_LEFT : eLocation = SVX_SHADOW_TOPLEFT; break;
+ case table::ShadowLocation_TOP_RIGHT : eLocation = SVX_SHADOW_TOPRIGHT; break;
+ case table::ShadowLocation_BOTTOM_LEFT : eLocation = SVX_SHADOW_BOTTOMLEFT ; break;
+ case table::ShadowLocation_BOTTOM_RIGHT: eLocation = SVX_SHADOW_BOTTOMRIGHT; break;
+ }
+ nWidth = nMemberId&CONVERT_TWIPS ? MM100_TO_TWIP(aShadow.ShadowWidth) : aShadow.ShadowWidth;
+ Color aSet(aShadow.Color);
+ aSet.SetTransparency(aShadow.IsTransparent ? 0xff : 0);
+ aShadowColor = aSet;
+ return sal_True;
+ }
+ return sal_False;
+}
+
+sal_Bool SvxShadowItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_Bool bOk = sal_False;
+
+ sal_Bool bColorFound = sal_False;
+ sal_Bool bOffsetFound = sal_False;
+
+ SvXMLTokenEnumerator aTokenEnum( rValue );
+
+ Color aColor( 128,128, 128 );
+ eLocation = SVX_SHADOW_BOTTOMRIGHT;
+
+ OUString aToken;
+ while( aTokenEnum.getNextToken( aToken ) )
+ {
+ if( aToken.compareToAscii( sXML_none ) )
+ {
+ eLocation = SVX_SHADOW_NONE;
+ return sal_True;
+ }
+ else if( !bColorFound && aToken.compareToAscii( "#", 1 ) == 0 )
+ {
+ bOk = rUnitConverter.convertColor( aColor, aToken );
+ if( !bOk )
+ return sal_False;
+
+ bColorFound = sal_True;
+ }
+ else if( !bOffsetFound )
+ {
+ sal_Int32 nX = 0, nY = 0;
+
+ bOk = rUnitConverter.convertMeasure( nX, aToken );
+ if( bOk && aTokenEnum.getNextToken( aToken ) )
+ bOk = rUnitConverter.convertMeasure( nY, aToken );
+
+ if( bOk )
+ {
+ if( nX < 0 )
+ {
+ if( nY < 0 )
+ {
+ eLocation = SVX_SHADOW_TOPLEFT;
+ }
+ else
+ {
+ eLocation = SVX_SHADOW_TOPRIGHT;
+ }
+ }
+ else
+ {
+ if( nY < 0 )
+ {
+ eLocation = SVX_SHADOW_BOTTOMLEFT;
+ }
+ else
+ {
+ eLocation = SVX_SHADOW_BOTTOMRIGHT;
+ }
+ }
+
+ if( nX < 0 ) nX *= -1;
+ if( nY < 0 ) nY *= -1;
+
+ nWidth = (nX + nY) >> 1;
+ }
+ }
+ }
+
+ if( bOk && ( bColorFound || bOffsetFound ) )
+ {
+ aShadowColor = aColor;
+ return sal_True;
+ }
+ else
+#endif
+ return sal_False;
+}
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxShadowItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ sal_Int32 nX = 1, nY = 1;
+ switch( eLocation )
+ {
+ case SVX_SHADOW_TOPLEFT:
+ nX = -1;
+ nY = -1;
+ break;
+ case SVX_SHADOW_TOPRIGHT:
+ nY = -1;
+ break;
+ case SVX_SHADOW_BOTTOMLEFT:
+ nX = -1;
+ break;
+ case SVX_SHADOW_BOTTOMRIGHT:
+ break;
+ case SVX_SHADOW_NONE:
+ default:
+ rValue = OUString( sXML_none, sizeof(sXML_none), gsl_getSystemTextEncoding() );
+ return sal_True;
+ }
+
+ nX *= nWidth;
+ nY *= nWidth;
+
+ OUStringBuffer aOut;
+
+ rUnitConverter.convertColor( aOut, aShadowColor );
+ aOut.append( sal_Unicode(' ') );
+ rUnitConverter.convertMeasure( aOut, nX );
+ aOut.append( sal_Unicode(' ') );
+ rUnitConverter.convertMeasure( aOut, nY );
+
+ rValue = aOut.makeStringAndClear();
+
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+int SvxShadowItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return ( ( aShadowColor == ( (SvxShadowItem&)rAttr ).aShadowColor ) &&
+ ( nWidth == ( (SvxShadowItem&)rAttr ).GetWidth() ) &&
+ ( eLocation == ( (SvxShadowItem&)rAttr ).GetLocation() ) );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxShadowItem::Clone( SfxItemPool* ) const
+{
+ return new SvxShadowItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxShadowItem::CalcShadowSpace( sal_uInt16 nShadow ) const
+{
+ sal_uInt16 nSpace = 0;
+
+ switch ( nShadow )
+ {
+ case SHADOW_TOP:
+ if ( eLocation == SVX_SHADOW_TOPLEFT ||
+ eLocation == SVX_SHADOW_TOPRIGHT )
+ nSpace = nWidth;
+ break;
+
+ case SHADOW_BOTTOM:
+ if ( eLocation == SVX_SHADOW_BOTTOMLEFT ||
+ eLocation == SVX_SHADOW_BOTTOMRIGHT )
+ nSpace = nWidth;
+ break;
+
+ case SHADOW_LEFT:
+ if ( eLocation == SVX_SHADOW_TOPLEFT ||
+ eLocation == SVX_SHADOW_BOTTOMLEFT )
+ nSpace = nWidth;
+ break;
+
+ case SHADOW_RIGHT:
+ if ( eLocation == SVX_SHADOW_TOPRIGHT ||
+ eLocation == SVX_SHADOW_BOTTOMRIGHT )
+ nSpace = nWidth;
+ break;
+
+ default:
+ DBG_ERROR( "wrong shadow" );
+ }
+ return nSpace;
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxShadowItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ {
+ rText = ::GetColorString( aShadowColor );
+ rText += cpDelim;
+ sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE;
+
+ if ( aShadowColor.GetTransparency() )
+ nId = RID_SVXITEMS_TRANSPARENT_TRUE;
+ rText += SVX_RESSTR(nId);
+ rText += cpDelim;
+ rText += GetMetricText( (long)nWidth, eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ rText += SVX_RESSTR(RID_SVXITEMS_SHADOW_BEGIN + eLocation);
+ return ePres;
+ }
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ rText = SVX_RESSTR(RID_SVXITEMS_SHADOW_COMPLETE);
+ rText += ::GetColorString( aShadowColor );
+ rText += cpDelim;
+
+ sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE;
+ if ( aShadowColor.GetTransparency() )
+ nId = RID_SVXITEMS_TRANSPARENT_TRUE;
+ rText += SVX_RESSTR(nId);
+ rText += cpDelim;
+ rText += GetMetricText( (long)nWidth, eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ rText += cpDelim;
+ rText += SVX_RESSTR(RID_SVXITEMS_SHADOW_BEGIN + eLocation);
+ return ePres;
+ }
+ }
+#endif
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxShadowItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_Int8) GetLocation()
+ << (sal_uInt16) GetWidth()
+ << (sal_Bool)(aShadowColor.GetTransparency() > 0)
+ << GetColor()
+ << GetColor()
+ << (sal_Int8)(aShadowColor.GetTransparency() > 0 ? 0 : 1); //BRUSH_NULL : BRUSH_SOLID
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxShadowItem::ScaleMetrics( long nMult, long nDiv )
+{
+ nWidth = (sal_uInt16)Scale( nWidth, nMult, nDiv );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxShadowItem::HasMetrics() const
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxShadowItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_Int8 cLoc;
+ sal_uInt16 nWidth;
+ sal_Bool bTrans;
+ Color aColor;
+ Color aFillColor;
+ sal_Int8 nStyle;
+ rStrm >> cLoc >> nWidth
+ >> bTrans >> aColor >> aFillColor >> nStyle;
+ aColor.SetTransparency(bTrans ? 0xff : 0);
+ return new SvxShadowItem( Which(), &aColor, nWidth, (SvxShadowLocation)cLoc );
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxShadowItem::GetValueCount() const
+{
+ return SVX_SHADOW_END; // SVX_SHADOW_BOTTOMRIGHT + 1
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxShadowItem::GetValueTextByPos( sal_uInt16 nPos ) const
+{
+ DBG_ASSERT( nPos < SVX_SHADOW_END, "enum overflow!" );
+ return XubString( SVX_RES( RID_SVXITEMS_SHADOW_BEGIN + nPos ) );
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxShadowItem::GetEnumValue() const
+{
+ return GetLocation();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShadowItem::SetEnumValue( sal_uInt16 nVal )
+{
+ SetLocation( (const SvxShadowLocation)nVal );
+}
+
+// class SvxBorderLine --------------------------------------------------
+
+SvxBorderLine::SvxBorderLine( const Color *pCol, sal_uInt16 nOut, sal_uInt16 nIn,
+ sal_uInt16 nDist ) :
+
+ nOutWidth( nOut ),
+ nInWidth ( nIn ),
+ nDistance( nDist )
+
+{
+ if ( pCol )
+ aColor = *pCol;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBorderLine::ScaleMetrics( long nMult, long nDiv )
+{
+ nOutWidth = (sal_uInt16)Scale( nOutWidth, nMult, nDiv );
+ nInWidth = (sal_uInt16)Scale( nInWidth, nMult, nDiv );
+ nDistance = (sal_uInt16)Scale( nDistance, nMult, nDiv );
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxBorderLine::operator==( const SvxBorderLine& rCmp ) const
+{
+ return ( ( aColor == rCmp.GetColor() ) &&
+ ( nInWidth == rCmp.GetInWidth() ) &&
+ ( nOutWidth == rCmp.GetOutWidth() ) &&
+ ( nDistance == rCmp.GetDistance() ) );
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit,
+ SfxMapUnit eDestUnit,
+ sal_Bool bMetricStr) const
+{
+#ifndef SVX_LIGHT
+ sal_uInt16 nResId = 0;
+
+ if ( 0 == nDistance )
+ {
+ // einfach Linie
+ if ( DEF_LINE_WIDTH_0 == nOutWidth )
+ nResId = RID_SINGLE_LINE0;
+ else if ( DEF_LINE_WIDTH_1 == nOutWidth )
+ nResId = RID_SINGLE_LINE1;
+ else if ( DEF_LINE_WIDTH_2 == nOutWidth )
+ nResId = RID_SINGLE_LINE2;
+ else if ( DEF_LINE_WIDTH_3 == nOutWidth )
+ nResId = RID_SINGLE_LINE3;
+ else if ( DEF_LINE_WIDTH_4 == nOutWidth )
+ nResId = RID_SINGLE_LINE4;
+ }
+ else if ( DEF_LINE_WIDTH_1 == nDistance )
+ {
+ // doppelte Linie, kleiner Abstand
+ if ( DEF_LINE_WIDTH_0 == nOutWidth && DEF_LINE_WIDTH_0 == nInWidth )
+ nResId = RID_DOUBLE_LINE0;
+ else if ( DEF_LINE_WIDTH_1 == nOutWidth &&
+ DEF_LINE_WIDTH_1 == nInWidth )
+ nResId = RID_DOUBLE_LINE2;
+ else if ( DEF_LINE_WIDTH_1 == nOutWidth &&
+ DEF_LINE_WIDTH_2 == nInWidth )
+ nResId = RID_DOUBLE_LINE8;
+ }
+ else if ( DEF_LINE_WIDTH_2 == nDistance )
+ {
+ // doppelte Linie, gro\ser Abstand
+ if ( DEF_LINE_WIDTH_0 == nOutWidth && DEF_LINE_WIDTH_0 == nInWidth )
+ nResId = RID_DOUBLE_LINE1;
+ else if ( DEF_LINE_WIDTH_2 == nOutWidth &&
+ DEF_LINE_WIDTH_2 == nInWidth )
+ nResId = RID_DOUBLE_LINE3;
+ else if ( DEF_LINE_WIDTH_1 == nOutWidth &&
+ DEF_LINE_WIDTH_0 == nInWidth )
+ nResId = RID_DOUBLE_LINE4;
+ else if ( DEF_LINE_WIDTH_2 == nOutWidth &&
+ DEF_LINE_WIDTH_0 == nInWidth )
+ nResId = RID_DOUBLE_LINE5;
+ else if ( DEF_LINE_WIDTH_3 == nOutWidth &&
+ DEF_LINE_WIDTH_0 == nInWidth )
+ nResId = RID_DOUBLE_LINE6;
+ else if ( DEF_LINE_WIDTH_2 == nOutWidth &&
+ DEF_LINE_WIDTH_1 == nInWidth )
+ nResId = RID_DOUBLE_LINE7;
+ else if ( DEF_LINE_WIDTH_3 == nOutWidth &&
+ DEF_LINE_WIDTH_2 == nInWidth )
+ nResId = RID_DOUBLE_LINE9;
+ else if ( DEF_LINE_WIDTH_2 == nOutWidth &&
+ DEF_LINE_WIDTH_3 == nInWidth )
+ nResId = RID_DOUBLE_LINE10;
+ }
+ String aStr;
+ aStr += sal_Unicode('(');
+ aStr += ::GetColorString( aColor );
+ aStr += cpDelim;
+
+ if ( nResId )
+ aStr += SVX_RESSTR(nResId);
+ else
+ {
+ String sMetric = SVX_RESSTR(GetMetricId( eDestUnit ));
+ aStr += GetMetricText( (long)nInWidth, eSrcUnit, eDestUnit );
+ if ( bMetricStr )
+ aStr += sMetric;
+ aStr += cpDelim;
+ aStr += GetMetricText( (long)nOutWidth, eSrcUnit, eDestUnit );
+ if ( bMetricStr )
+ aStr += sMetric;
+ aStr += cpDelim;
+ aStr += GetMetricText( (long)nDistance, eSrcUnit, eDestUnit );
+ if ( bMetricStr )
+ aStr += sMetric;
+ }
+ aStr += sal_Unicode(')');
+ return aStr;
+#else
+ return UniString();
+#endif
+}
+
+// class SvxBoxItem ------------------------------------------------------
+
+SvxBoxItem::SvxBoxItem( const SvxBoxItem& rCpy ) :
+
+ SfxPoolItem ( rCpy ),
+ nTopDist ( rCpy.nTopDist ),
+ nBottomDist ( rCpy.nBottomDist ),
+ nLeftDist ( rCpy.nLeftDist ),
+ nRightDist ( rCpy.nRightDist )
+
+{
+ pTop = rCpy.GetTop() ? new SvxBorderLine( *rCpy.GetTop() ) : 0;
+ pBottom = rCpy.GetBottom() ? new SvxBorderLine( *rCpy.GetBottom() ) : 0;
+ pLeft = rCpy.GetLeft() ? new SvxBorderLine( *rCpy.GetLeft() ) : 0;
+ pRight = rCpy.GetRight() ? new SvxBorderLine( *rCpy.GetRight() ) : 0;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBoxItem::SvxBoxItem( const sal_uInt16 nId ) :
+ SfxPoolItem( nId ),
+
+ pTop ( 0 ),
+ pBottom ( 0 ),
+ pLeft ( 0 ),
+ pRight ( 0 ),
+ nTopDist ( 0 ),
+ nBottomDist ( 0 ),
+ nLeftDist ( 0 ),
+ nRightDist ( 0 )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxBoxItem::~SvxBoxItem()
+{
+ delete pTop;
+ delete pBottom;
+ delete pLeft;
+ delete pRight;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBoxItem& SvxBoxItem::operator=( const SvxBoxItem& rBox )
+{
+ nTopDist = rBox.nTopDist;
+ nBottomDist = rBox.nBottomDist;
+ nLeftDist = rBox.nLeftDist;
+ nRightDist = rBox.nRightDist;
+ SetLine( rBox.GetTop(), BOX_LINE_TOP );
+ SetLine( rBox.GetBottom(), BOX_LINE_BOTTOM );
+ SetLine( rBox.GetLeft(), BOX_LINE_LEFT );
+ SetLine( rBox.GetRight(), BOX_LINE_RIGHT );
+ return *this;
+}
+
+// -----------------------------------------------------------------------
+
+inline sal_Bool CmpBrdLn( const SvxBorderLine* pBrd1, const SvxBorderLine* pBrd2 )
+{
+ sal_Bool bRet;
+ if( 0 != pBrd1 ? 0 == pBrd2 : 0 != pBrd2 )
+ bRet = sal_False;
+ else
+ if( !pBrd1 )
+ bRet = sal_True;
+ else
+ bRet = (*pBrd1 == *pBrd2);
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxBoxItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return (
+ ( nTopDist == ( (SvxBoxItem&)rAttr ).nTopDist ) &&
+ ( nBottomDist == ( (SvxBoxItem&)rAttr ).nBottomDist ) &&
+ ( nLeftDist == ( (SvxBoxItem&)rAttr ).nLeftDist ) &&
+ ( nRightDist == ( (SvxBoxItem&)rAttr ).nRightDist ) &&
+ CmpBrdLn( pTop, ( (SvxBoxItem&)rAttr ).GetTop() ) &&
+ CmpBrdLn( pBottom, ( (SvxBoxItem&)rAttr ).GetBottom() ) &&
+ CmpBrdLn( pLeft, ( (SvxBoxItem&)rAttr ).GetLeft() ) &&
+ CmpBrdLn( pRight, ( (SvxBoxItem&)rAttr ).GetRight() ) );
+}
+
+// -----------------------------------------------------------------------
+table::BorderLine lcl_SvxLineToLine(const SvxBorderLine* pLine, sal_Bool bConvert)
+{
+ table::BorderLine aLine;
+ if(pLine)
+ {
+ aLine.Color = pLine->GetColor().GetColor() ;
+ aLine.InnerLineWidth = bConvert ? TWIP_TO_MM100(pLine->GetInWidth() ): pLine->GetInWidth() ;
+ aLine.OuterLineWidth = bConvert ? TWIP_TO_MM100(pLine->GetOutWidth()): pLine->GetOutWidth() ;
+ aLine.LineDistance = bConvert ? TWIP_TO_MM100(pLine->GetDistance()): pLine->GetDistance() ;
+ }
+ else
+ aLine.Color = aLine.InnerLineWidth = aLine.OuterLineWidth = aLine.LineDistance = 0;
+ return aLine;
+}
+// -----------------------------------------------------------------------
+sal_Bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+ table::BorderLine aRetLine;
+ sal_uInt16 nDist;
+ sal_Bool bDistMember = sal_False;
+ nMemberId &= ~CONVERT_TWIPS;
+ switch(nMemberId)
+ {
+ case LEFT_BORDER:
+ aRetLine = lcl_SvxLineToLine(GetLeft(), bConvert);
+ break;
+ case RIGHT_BORDER:
+ aRetLine = lcl_SvxLineToLine(GetRight(), bConvert);
+ break;
+ case BOTTOM_BORDER:
+ aRetLine = lcl_SvxLineToLine(GetBottom(), bConvert);
+ break;
+ case TOP_BORDER:
+ aRetLine = lcl_SvxLineToLine(GetTop(), bConvert);
+ break;
+ case BORDER_DISTANCE:
+ nDist = GetDistance();
+ bDistMember = sal_True;
+ break;
+ case TOP_BORDER_DISTANCE:
+ nDist = nTopDist;
+ bDistMember = sal_True;
+ break;
+ case BOTTOM_BORDER_DISTANCE:
+ nDist = nBottomDist;
+ bDistMember = sal_True;
+ break;
+ case LEFT_BORDER_DISTANCE:
+ nDist = nLeftDist;
+ bDistMember = sal_True;
+ break;
+ case RIGHT_BORDER_DISTANCE:
+ nDist = nRightDist;
+ bDistMember = sal_True;
+ break;
+ }
+
+ if( bDistMember )
+ rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nDist) : nDist);
+ else
+ rVal <<= aRetLine;
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool lcl_LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
+{
+ rSvxLine.SetColor( Color(rLine.Color));
+ rSvxLine.SetInWidth( bConvert ? MM100_TO_TWIP(rLine.InnerLineWidth) : rLine.InnerLineWidth );
+ rSvxLine.SetOutWidth(bConvert ? MM100_TO_TWIP(rLine.OuterLineWidth) : rLine.OuterLineWidth );
+ rSvxLine.SetDistance(bConvert ? MM100_TO_TWIP(rLine.LineDistance ) : rLine.LineDistance );
+ sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+ sal_uInt16 nLine = BOX_LINE_TOP;
+ sal_Bool bDistMember = sal_False;
+ nMemberId &= ~CONVERT_TWIPS;
+ switch(nMemberId)
+ {
+ case LEFT_BORDER_DISTANCE:
+ bDistMember = sal_True;
+ case LEFT_BORDER:
+ nLine = BOX_LINE_LEFT;
+ break;
+ case RIGHT_BORDER_DISTANCE:
+ bDistMember = sal_True;
+ case RIGHT_BORDER:
+ nLine = BOX_LINE_RIGHT;
+ break;
+ case BOTTOM_BORDER_DISTANCE:
+ bDistMember = sal_True;
+ case BOTTOM_BORDER:
+ nLine = BOX_LINE_BOTTOM;
+ break;
+ case TOP_BORDER_DISTANCE:
+ bDistMember = sal_True;
+ case TOP_BORDER:
+ nLine = BOX_LINE_TOP;
+ break;
+ }
+
+ if( bDistMember || nMemberId == BORDER_DISTANCE )
+ {
+ sal_Int32 nDist;
+ if(!(rVal >>= nDist))
+ return sal_False;
+
+ if(nDist >= 0)
+ {
+ if( bConvert )
+ nDist = MM100_TO_TWIP(nDist);
+ if( nMemberId == BORDER_DISTANCE )
+ SetDistance( nDist );
+ else
+ SetDistance( nDist, nLine );
+ }
+ }
+ else
+ {
+ SvxBorderLine aLine;
+ if( !rVal.hasValue() || rVal.getValueType() != ::getCppuType((const ::com::sun::star::table::BorderLine*)0) )
+ return sal_False;
+
+ table::BorderLine* pLine = (table::BorderLine*)rVal.getValue();
+ sal_Bool bSet = lcl_LineToSvxLine(*pLine, aLine, bConvert);
+ SetLine(bSet ? &aLine : 0, nLine);
+ }
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+
+#define SVX_XML_BORDER_STYLE_NONE 0
+#define SVX_XML_BORDER_STYLE_SOLID 1
+#define SVX_XML_BORDER_STYLE_DOUBLE 2
+
+#define SVX_XML_BORDER_WIDTH_THIN 0
+#define SVX_XML_BORDER_WIDTH_MIDDLE 1
+#define SVX_XML_BORDER_WIDTH_THICK 2
+
+
+SvXMLEnumMapEntry psXML_BorderStyles[] =
+{
+ { sXML_none, SVX_XML_BORDER_STYLE_NONE },
+ { sXML_hidden, SVX_XML_BORDER_STYLE_NONE },
+ { sXML_solid, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_double, SVX_XML_BORDER_STYLE_DOUBLE },
+ { sXML_dotted, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_dashed, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_groove, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_ridge, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_inset, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_outset, SVX_XML_BORDER_STYLE_SOLID },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry psXML_NamedBorderWidths[] =
+{
+ { sXML_thin, SVX_XML_BORDER_WIDTH_THIN },
+ { sXML_middle, SVX_XML_BORDER_WIDTH_MIDDLE },
+ { sXML_thick, SVX_XML_BORDER_WIDTH_THICK },
+ { 0, 0 }
+};
+// mapping tables to map external xml input to intarnal box line widths
+
+// Ein Eintrag besteht aus vier USHORTs. Der erste ist die Gesamtbreite,
+// die anderen sind die 3 Einzelbreiten
+
+#define SBORDER_ENTRY( n ) \
+ DEF_LINE_WIDTH_##n, DEF_LINE_WIDTH_##n, 0, 0
+
+#define DBORDER_ENTRY( n ) \
+ DEF_DOUBLE_LINE##n##_OUT + DEF_DOUBLE_LINE##n##_IN + \
+ DEF_DOUBLE_LINE##n##_DIST, \
+ DEF_DOUBLE_LINE##n##_OUT, \
+ DEF_DOUBLE_LINE##n##_IN, \
+ DEF_DOUBLE_LINE##n##_DIST
+
+#define TDBORDER_ENTRY( n ) \
+ DEF_DOUBLE_LINE##n##_OUT, \
+ DEF_DOUBLE_LINE##n##_OUT, \
+ DEF_DOUBLE_LINE##n##_IN, \
+ DEF_DOUBLE_LINE##n##_DIST
+
+
+static sal_uInt16 __READONLY_DATA aSBorderWidths[] =
+{
+ SBORDER_ENTRY( 0 ), SBORDER_ENTRY( 1 ), SBORDER_ENTRY( 2 ),
+ SBORDER_ENTRY( 3 ), SBORDER_ENTRY( 4 )
+};
+
+static sal_uInt16 __READONLY_DATA aDBorderWidths[] =
+{
+ DBORDER_ENTRY( 0 ),
+ DBORDER_ENTRY( 7 ),
+ DBORDER_ENTRY( 1 ),
+ DBORDER_ENTRY( 8 ),
+ DBORDER_ENTRY( 4 ),
+ DBORDER_ENTRY( 9 ),
+ DBORDER_ENTRY( 3 ),
+ DBORDER_ENTRY( 10 ),
+ DBORDER_ENTRY( 2 ),
+ DBORDER_ENTRY( 6 ),
+ DBORDER_ENTRY( 5 )
+};
+
+sal_Bool lcl_frmitems_parseXMLBorder( const OUString& rValue,
+ const SvXMLUnitConverter& rUnitConverter,
+ sal_Bool& rHasStyle, sal_uInt16& rStyle,
+ sal_Bool& rHasWidth, sal_uInt16& rWidth,
+ sal_uInt16& rNamedWidth,
+ sal_Bool& rHasColor, Color& rColor )
+{
+ OUString aToken;
+ SvXMLTokenEnumerator aTokens( rValue );
+
+ rHasStyle = sal_False;
+ rHasWidth = sal_False;
+ rHasColor = sal_False;
+
+ rStyle = USHRT_MAX;
+ rWidth = 0;
+ rNamedWidth = USHRT_MAX;
+
+ long nTemp;
+ while( aTokens.getNextToken( aToken ) && aToken.getLength() != 0 )
+ {
+ if( !rHasWidth &&
+ rUnitConverter.convertEnum( rNamedWidth, aToken,
+ psXML_NamedBorderWidths ) )
+ {
+ rHasWidth = sal_True;
+ }
+ else if( !rHasStyle &&
+ rUnitConverter.convertEnum( rStyle, aToken,
+ psXML_BorderStyles ) )
+ {
+ rHasStyle = sal_True;
+ }
+ else if( !rHasColor && rUnitConverter.convertColor( rColor, aToken ) )
+ {
+ rHasColor = sal_True;
+ }
+ else if( !rHasWidth &&
+ rUnitConverter.convertMeasure( nTemp, aToken, 0,
+ USHRT_MAX ) )
+ {
+ rWidth = (sal_uInt16)nTemp;
+ rHasWidth = sal_True;
+ }
+ else
+ {
+ // missformed
+ return sal_False;
+ }
+ }
+
+ return rHasStyle || rHasWidth || rHasColor;
+}
+
+void lcl_frmitems_setXMLBorderWidth( SvxBorderLine& rLine,
+ sal_uInt16 nOutWidth, sal_uInt16 nInWidth,
+ sal_uInt16 nDistance )
+{
+ rLine.SetOutWidth( nOutWidth );
+ rLine.SetInWidth( nInWidth );
+ rLine.SetDistance( nDistance );
+}
+
+void lcl_frmitems_setXMLBorderWidth( SvxBorderLine& rLine,
+ sal_uInt16 nWidth, sal_Bool bDouble )
+{
+ const sal_uInt16 *aWidths;
+ sal_uInt16 nSize;
+ if( !bDouble )
+ {
+ aWidths = aSBorderWidths;
+ nSize = sizeof( aSBorderWidths );
+ }
+ else
+ {
+ aWidths = aDBorderWidths;
+ nSize = sizeof( aDBorderWidths );
+ }
+
+ sal_uInt16 i = (nSize / sizeof(sal_uInt16)) - 4;
+ while( i>0 &&
+ nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) )
+ {
+ DBG_ASSERT( aWidths[i] >= aWidths[i-4],
+ "line widths are unordered!" );
+ i -= 4;
+ }
+
+ rLine.SetOutWidth( aWidths[i+1] );
+ rLine.SetInWidth( aWidths[i+2] );
+ rLine.SetDistance( aWidths[i+3] );
+}
+
+sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
+ sal_Bool bHasStyle, sal_uInt16 nStyle,
+ sal_Bool bHasWidth, sal_uInt16 nWidth,
+ sal_uInt16 nNamedWidth,
+ sal_Bool bHasColor, const Color& rColor )
+{
+ // first of all, delete an empty line
+ if( (bHasStyle && SVX_XML_BORDER_STYLE_NONE == nStyle) ||
+ (bHasWidth && USHRT_MAX == nNamedWidth && 0 == nWidth) )
+ {
+ sal_Bool bRet = 0 != rpLine;
+ if( rpLine )
+ {
+ delete rpLine;
+ rpLine = 0;
+ }
+
+ return bRet;
+ }
+
+ // if there is no line and no style and no with, there will never be a line
+ if( !rpLine && !(bHasStyle && bHasWidth) )
+ return sal_False;
+
+ // We now do know that there will be a line
+ if( !rpLine )
+ rpLine = new SvxBorderLine;
+
+ if( ( bHasWidth &&
+ (USHRT_MAX != nNamedWidth || (nWidth != rpLine->GetOutWidth() +
+ rpLine->GetInWidth() +
+ rpLine->GetDistance()) ) ) ||
+ ( bHasStyle &&
+ ((SVX_XML_BORDER_STYLE_SOLID == nStyle && rpLine->GetDistance()) ||
+ (SVX_XML_BORDER_STYLE_DOUBLE == nStyle && !rpLine->GetDistance())) ))
+ {
+ sal_Bool bDouble = (bHasWidth && SVX_XML_BORDER_STYLE_DOUBLE == nStyle) ||
+ rpLine->GetDistance();
+
+ // The width has to be changed
+ if( bHasWidth && USHRT_MAX != nNamedWidth )
+ {
+ const sal_uInt16 *aWidths = bDouble ? aDBorderWidths
+ : aSBorderWidths;
+ sal_uInt16 nNWidth = nNamedWidth * 4;
+ rpLine->SetOutWidth( aWidths[nNWidth+1] );
+ rpLine->SetInWidth( aWidths[nNWidth+2] );
+ rpLine->SetDistance( aWidths[nNWidth+3] );
+
+ }
+ else
+ {
+ if( !bHasWidth )
+ nWidth = rpLine->GetInWidth() + rpLine->GetDistance() +
+ rpLine->GetOutWidth();
+
+ lcl_frmitems_setXMLBorderWidth( *rpLine, nWidth, bDouble );
+ }
+ }
+
+ // set color
+ if( bHasColor )
+ rpLine->SetColor( rColor );
+
+ return sal_True;
+}
+
+void lcl_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
+ sal_uInt16 nWidth, sal_uInt16 nOutWidth,
+ sal_uInt16 nInWidth, sal_uInt16 nDistance )
+{
+ if( !rpLine )
+ rpLine = new SvxBorderLine;
+
+ if( nWidth > 0 )
+ lcl_frmitems_setXMLBorderWidth( *rpLine, nWidth, sal_True );
+ else
+ lcl_frmitems_setXMLBorderWidth( *rpLine, nOutWidth, nInWidth,
+ nDistance );
+}
+#endif
+
+sal_Bool SvxBoxItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+
+ sal_Int32 nTemp;
+
+ switch( nMemberId )
+ {
+ case ALL_BORDER_PADDING:
+ case LEFT_BORDER_PADDING:
+ case RIGHT_BORDER_PADDING:
+ case TOP_BORDER_PADDING:
+ case BOTTOM_BORDER_PADDING:
+ if(!rUnitConverter.convertMeasure( nTemp, rValue, 0, 0xffff ))
+ return sal_False;
+
+ if( nMemberId == LEFT_BORDER_PADDING ||
+ nMemberId == ALL_BORDER_PADDING )
+ nLeftDist = (sal_uInt16)nTemp;
+ if( nMemberId == RIGHT_BORDER_PADDING ||
+ nMemberId == ALL_BORDER_PADDING )
+ nRightDist = (sal_uInt16)nTemp;
+ if( nMemberId == TOP_BORDER_PADDING ||
+ nMemberId == ALL_BORDER_PADDING )
+ nTopDist = (sal_uInt16)nTemp;
+ if( nMemberId == BOTTOM_BORDER_PADDING ||
+ nMemberId == ALL_BORDER_PADDING )
+ nBottomDist = (sal_uInt16)nTemp;
+ break;
+
+ case ALL_BORDER:
+ case LEFT_BORDER:
+ case RIGHT_BORDER:
+ case TOP_BORDER:
+ case BOTTOM_BORDER:
+ {
+ sal_Bool bHasStyle = sal_False, bHasWidth = sal_False, bHasColor = sal_False;
+ sal_uInt16 nStyle = USHRT_MAX, nWidth = 0, nNamedWidth = USHRT_MAX;
+ Color aColor( COL_BLACK );
+
+ if( !lcl_frmitems_parseXMLBorder( rValue, rUnitConverter,
+ bHasStyle, nStyle,
+ bHasWidth, nWidth, nNamedWidth,
+ bHasColor, aColor ) )
+ return sal_False;
+
+ if( TOP_BORDER == nMemberId || ALL_BORDER == nMemberId )
+ lcl_frmitems_setXMLBorder( pTop,
+ bHasStyle, nStyle,
+ bHasWidth, nWidth, nNamedWidth,
+ bHasColor, aColor );
+
+ if( BOTTOM_BORDER == nMemberId || ALL_BORDER == nMemberId )
+ lcl_frmitems_setXMLBorder( pBottom,
+ bHasStyle, nStyle,
+ bHasWidth, nWidth, nNamedWidth,
+ bHasColor, aColor );
+
+ if( LEFT_BORDER == nMemberId || ALL_BORDER == nMemberId )
+ lcl_frmitems_setXMLBorder( pLeft,
+ bHasStyle, nStyle,
+ bHasWidth, nWidth, nNamedWidth,
+ bHasColor, aColor );
+
+ if( RIGHT_BORDER == nMemberId || ALL_BORDER == nMemberId )
+ lcl_frmitems_setXMLBorder( pRight,
+ bHasStyle, nStyle,
+ bHasWidth, nWidth, nNamedWidth,
+ bHasColor, aColor );
+ }
+ break;
+ case ALL_BORDER_LINE_WIDTH:
+ case LEFT_BORDER_LINE_WIDTH:
+ case RIGHT_BORDER_LINE_WIDTH:
+ case TOP_BORDER_LINE_WIDTH:
+ case BOTTOM_BORDER_LINE_WIDTH:
+ {
+ SvXMLTokenEnumerator aTokenEnum( rValue );
+
+ sal_Int32 nInWidth, nDistance, nOutWidth;
+
+ OUString aToken;
+ if( !aTokenEnum.getNextToken( aToken ) )
+ return sal_False;
+
+ if( !rUnitConverter.convertMeasure( nInWidth, aToken,
+ DEF_LINE_WIDTH_0,
+ DEF_LINE_WIDTH_4 ) )
+ return sal_False;
+
+ if( !aTokenEnum.getNextToken( aToken ) )
+ return sal_False;
+
+ if( !rUnitConverter.convertMeasure( nDistance, aToken,
+ DEF_LINE_WIDTH_0,
+ DEF_LINE_WIDTH_4 ) )
+ return sal_False;
+
+ if( !aTokenEnum.getNextToken( aToken ) )
+ return sal_False;
+
+ if( !rUnitConverter.convertMeasure( nOutWidth, aToken,
+ DEF_LINE_WIDTH_0,
+ DEF_LINE_WIDTH_4 ) )
+ return sal_False;
+
+ sal_uInt16 nSize = sizeof( aDBorderWidths );
+ for( sal_uInt16 i=0; i < nSize; i += 4 )
+ {
+ if( aDBorderWidths[i+1] == nOutWidth &&
+ aDBorderWidths[i+2] == nInWidth &&
+ aDBorderWidths[i+3] == nDistance )
+ break;
+ }
+
+ sal_uInt16 nWidth = i < nSize ? 0 : nOutWidth + nInWidth + nDistance;
+
+ if( TOP_BORDER_LINE_WIDTH == nMemberId ||
+ ALL_BORDER_LINE_WIDTH == nMemberId )
+ lcl_frmitems_setXMLBorder( pTop, nWidth, nOutWidth,
+ nInWidth, nDistance );
+
+ if( BOTTOM_BORDER_LINE_WIDTH == nMemberId ||
+ ALL_BORDER_LINE_WIDTH == nMemberId )
+ lcl_frmitems_setXMLBorder( pBottom, nWidth, nOutWidth,
+ nInWidth, nDistance );
+
+ if( LEFT_BORDER_LINE_WIDTH == nMemberId ||
+ ALL_BORDER_LINE_WIDTH == nMemberId )
+ lcl_frmitems_setXMLBorder( pLeft, nWidth, nOutWidth,
+ nInWidth, nDistance );
+
+ if( RIGHT_BORDER_LINE_WIDTH == nMemberId ||
+ ALL_BORDER_LINE_WIDTH == nMemberId )
+ lcl_frmitems_setXMLBorder( pRight, nWidth, nOutWidth,
+ nInWidth, nDistance );
+ }
+ break;
+ }
+
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+/**
+ xml -> MemberId
+
+ border-padding ALL_BORDER_PADDING
+ border-padding-before LEFT_BORDER_PADDING
+ border-padding-after RIGHT_BORDER_PADDING
+ border-padding-start TOP_BORDER_PADDING
+ border-padding-end BOTTOM_BORDER_PADDING
+
+ border ALL_BORDER
+ border-before LEFT_BORDER
+ border-after RIGHT_BORDER
+ border-start TOP_BORDER
+ border-end BOTTOM_BORDER
+
+ border-line-width ALL_BORDER_LINE_WIDTH
+ border-line-width-before LEFT_BORDER_LINE_WIDTH
+ border-line-width-after RIGHT_BORDER_LINE_WIDTH
+ border-line-width-start TOP_BORDER_LINE_WIDTH
+ border-line-width-end BOTTOM_BORDER_LINE_WIDTH
+*/
+sal_Bool SvxBoxItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+
+ OUStringBuffer aOut;
+
+ // check if we need to export it
+ switch( nMemberId )
+ {
+ case ALL_BORDER_PADDING:
+ case LEFT_BORDER_PADDING:
+ case RIGHT_BORDER_PADDING:
+ case TOP_BORDER_PADDING:
+ case BOTTOM_BORDER_PADDING:
+ {
+ sal_Bool bEqual = nLeftDist == nRightDist &&
+ nLeftDist == nTopDist &&
+ nLeftDist == nBottomDist;
+ // don't export individual paddings if all paddings are equal and
+ // don't export all padding if some paddings are not equal
+ if( (bEqual && ALL_BORDER_PADDING != nMemberId) ||
+ (!bEqual && ALL_BORDER_PADDING == nMemberId) )
+ return sal_False;
+ }
+ break;
+ case ALL_BORDER:
+ case LEFT_BORDER:
+ case RIGHT_BORDER:
+ case TOP_BORDER:
+ case BOTTOM_BORDER:
+ {
+ sal_Bool bEqual = ( NULL == pTop && NULL == pBottom &&
+ NULL == pLeft && NULL == pRight ) ||
+ ( pTop && pBottom && pLeft && pRight &&
+ *pTop == *pBottom && *pTop == *pLeft &&
+ *pTop == *pRight );
+
+ // don't export individual borders if all are the same and
+ // don't export all borders if some are not equal
+ if( (bEqual && ALL_BORDER != nMemberId) ||
+ (!bEqual && ALL_BORDER == nMemberId) )
+ return sal_False;
+ }
+ break;
+ case ALL_BORDER_LINE_WIDTH:
+ case LEFT_BORDER_LINE_WIDTH:
+ case RIGHT_BORDER_LINE_WIDTH:
+ case TOP_BORDER_LINE_WIDTH:
+ case BOTTOM_BORDER_LINE_WIDTH:
+ {
+ // if no line is set, there is nothing to export
+ if( !pTop && !pBottom && !pLeft && !pRight )
+ return sal_False;
+
+ sal_Bool bEqual = NULL != pTop &&
+ NULL != pBottom &&
+ NULL != pLeft &&
+ NULL != pRight;
+
+ if( bEqual )
+ {
+ const sal_uInt16 nDistance = pTop->GetDistance();
+ const sal_uInt16 nInWidth = pTop->GetInWidth();
+ const sal_uInt16 nOutWidth = pTop->GetOutWidth();
+
+ bEqual = nDistance == pLeft->GetDistance() &&
+ nInWidth == pLeft->GetInWidth() &&
+ nOutWidth == pLeft->GetOutWidth() &&
+ nDistance == pRight->GetDistance() &&
+ nInWidth == pRight->GetInWidth() &&
+ nOutWidth == pRight->GetOutWidth() &&
+ nDistance == pBottom->GetDistance() &&
+ nInWidth == pBottom->GetInWidth() &&
+ nOutWidth == pBottom->GetOutWidth();
+ }
+
+ switch( nMemberId )
+ {
+ case ALL_BORDER_LINE_WIDTH:
+ if( !bEqual || pTop->GetDistance() == 0 )
+ return sal_False;
+ break;
+ case LEFT_BORDER_LINE_WIDTH:
+ if( bEqual || NULL == pLeft || 0 == pLeft->GetDistance() )
+ return sal_False;
+ break;
+ case RIGHT_BORDER_LINE_WIDTH:
+ if( bEqual || NULL == pRight || 0 == pRight->GetDistance() )
+ return sal_False;
+ break;
+ case TOP_BORDER_LINE_WIDTH:
+ if( bEqual || NULL == pTop || 0 == pTop->GetDistance() )
+ return sal_False;
+ break;
+ case BOTTOM_BORDER_LINE_WIDTH:
+ if( bEqual || NULL == pBottom || 0 == pBottom->GetDistance() )
+ return sal_False;
+ break;
+
+ }
+ }
+ break;
+ }
+
+ // now export it export
+
+ switch( nMemberId )
+ {
+ // padding
+ case ALL_BORDER_PADDING:
+ case LEFT_BORDER_PADDING:
+ rUnitConverter.convertMeasure( aOut, nLeftDist );
+ break;
+ case RIGHT_BORDER_PADDING:
+ rUnitConverter.convertMeasure( aOut, nRightDist );
+ break;
+ case TOP_BORDER_PADDING:
+ rUnitConverter.convertMeasure( aOut, nTopDist );
+ break;
+ case BOTTOM_BORDER_PADDING:
+ rUnitConverter.convertMeasure( aOut, nBottomDist );
+ break;
+ // border
+ case ALL_BORDER:
+ case LEFT_BORDER:
+ case RIGHT_BORDER:
+ case TOP_BORDER:
+ case BOTTOM_BORDER:
+ {
+ SvxBorderLine* pLine;
+ switch( nMemberId )
+ {
+ case ALL_BORDER:
+ case LEFT_BORDER:
+ pLine = pLeft;
+ break;
+ case RIGHT_BORDER:
+ pLine = pRight;
+ break;
+ case TOP_BORDER:
+ pLine = pTop;
+ break;
+ case BOTTOM_BORDER:
+ pLine = pBottom;
+ break;
+ default:
+ pLine = NULL;
+ break;
+ }
+
+ if( NULL != pLine )
+ {
+ sal_Int32 nWidth = pLine->GetOutWidth();
+ const sal_uInt16 nDistance = pLine->GetDistance();
+ if( 0 != nDistance )
+ {
+ nWidth += nDistance;
+ nWidth += pLine->GetInWidth();
+ }
+
+ char *pStyle = (0 == nDistance) ? sXML_solid : sXML_double;
+
+ rUnitConverter.convertMeasure( aOut, nWidth );
+
+ aOut.append( sal_Unicode( ' ' ) );
+
+ aOut.appendAscii( pStyle );
+
+ aOut.append( sal_Unicode( ' ' ) );
+
+ rUnitConverter.convertColor( aOut, pLine->GetColor() );
+
+ }
+ else
+ {
+ aOut.appendAscii( sXML_none );
+ }
+
+ }
+ break;
+ // width
+ case ALL_BORDER_LINE_WIDTH:
+ case LEFT_BORDER_LINE_WIDTH:
+ case RIGHT_BORDER_LINE_WIDTH:
+ case TOP_BORDER_LINE_WIDTH:
+ case BOTTOM_BORDER_LINE_WIDTH:
+ SvxBorderLine* pLine;
+ switch( nMemberId )
+ {
+ case ALL_BORDER_LINE_WIDTH:
+ case LEFT_BORDER_LINE_WIDTH:
+ pLine = pLeft;
+ break;
+ case RIGHT_BORDER_LINE_WIDTH:
+ pLine = pRight;
+ break;
+ case TOP_BORDER_LINE_WIDTH:
+ pLine = pTop;
+ break;
+ case BOTTOM_BORDER_LINE_WIDTH:
+ pLine = pBottom;
+ break;
+ default:
+ return sal_False;
+ }
+ rUnitConverter.convertMeasure( aOut, pLine->GetInWidth() );
+ aOut.append( sal_Unicode( ' ' ) );
+ rUnitConverter.convertMeasure( aOut, pLine->GetDistance() );
+ aOut.append( sal_Unicode( ' ' ) );
+ rUnitConverter.convertMeasure( aOut, pLine->GetOutWidth() );
+ break;
+ }
+
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#endif
+ return sal_False;
+}
+
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBoxItem::Clone( SfxItemPool* ) const
+{
+ return new SvxBoxItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxBoxItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ {
+ rText.Erase();
+
+ if ( pTop )
+ {
+ rText = pTop->GetValueString( eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ }
+ if( !(pTop && pBottom && pLeft && pRight &&
+ *pTop == *pBottom && *pTop == *pLeft && *pTop == *pRight) )
+ {
+ if ( pBottom )
+ {
+ rText += pBottom->GetValueString( eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ }
+ if ( pLeft )
+ {
+ rText += pLeft->GetValueString( eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ }
+ if ( pRight )
+ {
+ rText += pRight->GetValueString( eCoreUnit, ePresUnit );
+ rText += cpDelim;
+ }
+ }
+ rText += GetMetricText( (long)nTopDist, eCoreUnit, ePresUnit );
+ if( nTopDist != nBottomDist || nTopDist != nLeftDist ||
+ nTopDist != nRightDist )
+ {
+ (((((rText += cpDelim)
+ += GetMetricText( (long)nBottomDist, eCoreUnit,
+ ePresUnit ))
+ += cpDelim)
+ += GetMetricText( (long)nLeftDist, eCoreUnit, ePresUnit ))
+ += cpDelim)
+ += GetMetricText( (long)nRightDist, eCoreUnit,
+ ePresUnit );
+ }
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+ }
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ if( !(pTop || pBottom || pLeft || pRight) )
+ {
+ rText = SVX_RESSTR(RID_SVXITEMS_BORDER_NONE);
+ rText += cpDelim;
+ }
+ else
+ {
+ rText = SVX_RESSTR(RID_SVXITEMS_BORDER_COMPLETE);
+ if( pTop && pBottom && pLeft && pRight &&
+ *pTop == *pBottom && *pTop == *pLeft && *pTop == *pRight )
+ {
+ rText += pTop->GetValueString( eCoreUnit, ePresUnit, sal_True );
+ rText += cpDelim;
+ }
+ else
+ {
+ if ( pTop )
+ {
+ rText += SVX_RESSTR(RID_SVXITEMS_BORDER_TOP);
+ rText += pTop->GetValueString( eCoreUnit, ePresUnit, sal_True );
+ rText += cpDelim;
+ }
+ if ( pBottom )
+ {
+ rText += SVX_RESSTR(RID_SVXITEMS_BORDER_BOTTOM);
+ rText += pBottom->GetValueString( eCoreUnit, ePresUnit, sal_True );
+ rText += cpDelim;
+ }
+ if ( pLeft )
+ {
+ rText += SVX_RESSTR(RID_SVXITEMS_BORDER_LEFT);
+ rText += pLeft->GetValueString( eCoreUnit, ePresUnit, sal_True );
+ rText += cpDelim;
+ }
+ if ( pRight )
+ {
+ rText += SVX_RESSTR(RID_SVXITEMS_BORDER_RIGHT);
+ rText += pRight->GetValueString( eCoreUnit, ePresUnit, sal_True );
+ rText += cpDelim;
+ }
+ }
+ }
+
+ rText += SVX_RESSTR(RID_SVXITEMS_BORDER_DISTANCE);
+ if( nTopDist == nBottomDist && nTopDist == nLeftDist &&
+ nTopDist == nRightDist )
+ {
+ rText += GetMetricText( (long)nTopDist, eCoreUnit,
+ ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ }
+ else
+ {
+ (((rText += SVX_RESSTR(RID_SVXITEMS_BORDER_TOP))
+ += GetMetricText( (long)nTopDist, eCoreUnit,
+ ePresUnit ))
+ += SVX_RESSTR(GetMetricId(ePresUnit)))
+ += cpDelim;
+ (((rText += SVX_RESSTR(RID_SVXITEMS_BORDER_BOTTOM))
+ += GetMetricText( (long)nBottomDist, eCoreUnit,
+ ePresUnit ))
+ += SVX_RESSTR(GetMetricId(ePresUnit)))
+ += cpDelim;
+ (((rText += SVX_RESSTR(RID_SVXITEMS_BORDER_LEFT))
+ += GetMetricText( (long)nLeftDist, eCoreUnit,
+ ePresUnit ))
+ += SVX_RESSTR(GetMetricId(ePresUnit)))
+ += cpDelim;
+ ((rText += SVX_RESSTR(RID_SVXITEMS_BORDER_RIGHT))
+ += GetMetricText( (long)nRightDist, eCoreUnit,
+ ePresUnit ))
+ += SVX_RESSTR(GetMetricId(ePresUnit));
+ }
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ }
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxBoxItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_uInt16) GetDistance();
+ const SvxBorderLine* pLine[ 4 ]; // top, left, right, bottom
+ pLine[ 0 ] = GetTop();
+ pLine[ 1 ] = GetLeft();
+ pLine[ 2 ] = GetRight();
+ pLine[ 3 ] = GetBottom();
+
+ for( int i = 0; i < 4; i++ )
+ {
+ const SvxBorderLine* l = pLine[ i ];
+ if( l )
+ {
+ rStrm << (sal_Int8) i
+ << l->GetColor()
+ << (sal_uInt16) l->GetOutWidth()
+ << (sal_uInt16) l->GetInWidth()
+ << (sal_uInt16) l->GetDistance();
+ }
+ }
+ sal_Int8 cLine = 4;
+ if( nItemVersion >= BOX_4DISTS_VERSION &&
+ !(nTopDist == nLeftDist &&
+ nTopDist == nRightDist &&
+ nTopDist == nBottomDist) )
+ {
+ cLine |= 0x10;
+ }
+
+ rStrm << cLine;
+
+ if( nItemVersion >= BOX_4DISTS_VERSION && (cLine & 0x10) != 0 )
+ {
+ rStrm << (sal_uInt16)nTopDist
+ << (sal_uInt16)nLeftDist
+ << (sal_uInt16)nRightDist
+ << (sal_uInt16)nBottomDist;
+ }
+
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxBoxItem::GetVersion( sal_uInt16 nFFVer ) const
+{
+ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+ SOFFICE_FILEFORMAT_40==nFFVer ||
+ SOFFICE_FILEFORMAT_NOW==nFFVer,
+ "SvxBoxItem: Gibt es ein neues Fileformat?" );
+ return SOFFICE_FILEFORMAT_31==nFFVer ||
+ SOFFICE_FILEFORMAT_40==nFFVer ? 0 : BOX_4DISTS_VERSION;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxBoxItem::ScaleMetrics( long nMult, long nDiv )
+{
+ if ( pTop ) pTop->ScaleMetrics( nMult, nDiv );
+ if ( pBottom ) pBottom->ScaleMetrics( nMult, nDiv );
+ if ( pLeft ) pLeft->ScaleMetrics( nMult, nDiv );
+ if ( pRight ) pBottom->ScaleMetrics( nMult, nDiv );
+ nTopDist = (sal_uInt16)Scale( nTopDist, nMult, nDiv );
+ nBottomDist = (sal_uInt16)Scale( nBottomDist, nMult, nDiv );
+ nLeftDist = (sal_uInt16)Scale( nLeftDist, nMult, nDiv );
+ nRightDist = (sal_uInt16)Scale( nRightDist, nMult, nDiv );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxBoxItem::HasMetrics() const
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBoxItem::Create( SvStream& rStrm, sal_uInt16 nIVersion ) const
+{
+ sal_uInt16 nDistance;
+ rStrm >> nDistance;
+ SvxBoxItem* pAttr = new SvxBoxItem( Which() );
+
+ sal_uInt16 aLineMap[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
+ BOX_LINE_RIGHT, BOX_LINE_BOTTOM };
+
+ sal_Int8 cLine;
+ while( sal_True )
+ {
+ rStrm >> cLine;
+
+ if( cLine > 3 )
+ break;
+ sal_uInt16 nOutline, nInline, nDistance;
+ Color aColor;
+ rStrm >> aColor >> nOutline >> nInline >> nDistance;
+ SvxBorderLine aBorder( &aColor, nOutline, nInline, nDistance );
+
+ pAttr->SetLine( &aBorder, aLineMap[cLine] );
+ }
+
+ if( nIVersion >= BOX_4DISTS_VERSION && (cLine&0x10) != 0 )
+ {
+ for( sal_uInt16 i=0; i < 4; i++ )
+ {
+ sal_uInt16 nDist;
+ rStrm >> nDist;
+ pAttr->SetDistance( nDist, aLineMap[i] );
+ }
+ }
+ else
+ {
+ pAttr->SetDistance( nDistance );
+ }
+
+ return pAttr;
+}
+
+// -----------------------------------------------------------------------
+
+const SvxBorderLine *SvxBoxItem::GetLine( sal_uInt16 nLine ) const
+{
+ const SvxBorderLine *pRet = 0;
+
+ switch ( nLine )
+ {
+ case BOX_LINE_TOP:
+ pRet = pTop;
+ break;
+ case BOX_LINE_BOTTOM:
+ pRet = pBottom;
+ break;
+ case BOX_LINE_LEFT:
+ pRet = pLeft;
+ break;
+ case BOX_LINE_RIGHT:
+ pRet = pRight;
+ break;
+ default:
+ DBG_ERROR( "wrong line" );
+ break;
+ }
+
+ return pRet;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBoxItem::SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine )
+{
+ SvxBorderLine* pTmp = pNew ? new SvxBorderLine( *pNew ) : 0;
+
+ switch ( nLine )
+ {
+ case BOX_LINE_TOP:
+ delete pTop;
+ pTop = pTmp;
+ break;
+ case BOX_LINE_BOTTOM:
+ delete pBottom;
+ pBottom = pTmp;
+ break;
+ case BOX_LINE_LEFT:
+ delete pLeft;
+ pLeft = pTmp;
+ break;
+ case BOX_LINE_RIGHT:
+ delete pRight;
+ pRight = pTmp;
+ break;
+ default:
+ DBG_ERROR( "wrong line" );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxBoxItem::GetDistance() const
+{
+ // The smallest distance that is not 0 will be returned.
+ sal_uInt16 nDist = nTopDist;
+ if( nBottomDist && (!nDist || nBottomDist < nDist) )
+ nDist = nBottomDist;
+ if( nLeftDist && (!nDist || nLeftDist < nDist) )
+ nDist = nLeftDist;
+ if( nRightDist && (!nDist || nRightDist < nDist) )
+ nDist = nRightDist;
+
+ return nDist;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxBoxItem::GetDistance( sal_uInt16 nLine ) const
+{
+ sal_uInt16 nDist = 0;
+ switch ( nLine )
+ {
+ case BOX_LINE_TOP:
+ nDist = nTopDist;
+ break;
+ case BOX_LINE_BOTTOM:
+ nDist = nBottomDist;
+ break;
+ case BOX_LINE_LEFT:
+ nDist = nLeftDist;
+ break;
+ case BOX_LINE_RIGHT:
+ nDist = nRightDist;
+ break;
+ default:
+ DBG_ERROR( "wrong line" );
+ }
+
+ return nDist;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBoxItem::SetDistance( sal_uInt16 nNew, sal_uInt16 nLine )
+{
+ switch ( nLine )
+ {
+ case BOX_LINE_TOP:
+ nTopDist = nNew;
+ break;
+ case BOX_LINE_BOTTOM:
+ nBottomDist = nNew;
+ break;
+ case BOX_LINE_LEFT:
+ nLeftDist = nNew;
+ break;
+ case BOX_LINE_RIGHT:
+ nRightDist = nNew;
+ break;
+ default:
+ DBG_ERROR( "wrong line" );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxBoxItem::CalcLineSpace( sal_uInt16 nLine, sal_Bool bIgnoreLine ) const
+{
+ SvxBorderLine* pTmp = 0;
+ sal_uInt16 nDist = 0;
+ switch ( nLine )
+ {
+ case BOX_LINE_TOP:
+ pTmp = pTop;
+ nDist = nTopDist;
+ break;
+ case BOX_LINE_BOTTOM:
+ pTmp = pBottom;
+ nDist = nBottomDist;
+ break;
+ case BOX_LINE_LEFT:
+ pTmp = pLeft;
+ nDist = nLeftDist;
+ break;
+ case BOX_LINE_RIGHT:
+ pTmp = pRight;
+ nDist = nRightDist;
+ break;
+ default:
+ DBG_ERROR( "wrong line" );
+ }
+
+ if( pTmp )
+ {
+ nDist += pTmp->GetOutWidth();
+ nDist += pTmp->GetInWidth();
+ nDist += pTmp->GetDistance();
+ }
+ else if( !bIgnoreLine )
+ nDist = 0;
+ return nDist;
+}
+
+// class SvxBoxInfoItem --------------------------------------------------
+
+SvxBoxInfoItem::SvxBoxInfoItem( const sal_uInt16 nId ) :
+
+ SfxPoolItem( nId ),
+
+ pHori ( 0 ),
+ pVert ( 0 ),
+ nDefDist( 0 )
+
+{
+ bTable = bDist = bMinDist = sal_False;
+ ResetFlags();
+}
+
+// -----------------------------------------------------------------------
+
+SvxBoxInfoItem::SvxBoxInfoItem( const SvxBoxInfoItem& rCpy ) :
+
+ SfxPoolItem( rCpy )
+
+{
+ pHori = rCpy.GetHori() ? new SvxBorderLine( *rCpy.GetHori() ) : 0;
+ pVert = rCpy.GetVert() ? new SvxBorderLine( *rCpy.GetVert() ) : 0;
+ bTable = rCpy.IsTable();
+ bDist = rCpy.IsDist();
+ bMinDist = rCpy.IsMinDist();
+ nValidFlags = rCpy.nValidFlags;
+ nDefDist = rCpy.GetDefDist();
+}
+
+// -----------------------------------------------------------------------
+
+SvxBoxInfoItem::~SvxBoxInfoItem()
+{
+ delete pHori;
+ delete pVert;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBoxInfoItem &SvxBoxInfoItem::operator=( const SvxBoxInfoItem& rCpy )
+{
+ delete pHori;
+ delete pVert;
+ pHori = rCpy.GetHori() ? new SvxBorderLine( *rCpy.GetHori() ) : 0;
+ pVert = rCpy.GetVert() ? new SvxBorderLine( *rCpy.GetVert() ) : 0;
+ bTable = rCpy.IsTable();
+ bDist = rCpy.IsDist();
+ bMinDist = rCpy.IsMinDist();
+ nValidFlags = rCpy.nValidFlags;
+ nDefDist = rCpy.GetDefDist();
+ return *this;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxBoxInfoItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ SvxBoxInfoItem& rBoxInfo = (SvxBoxInfoItem&)rAttr;
+
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return ( bTable == rBoxInfo.IsTable()
+ && bDist == rBoxInfo.IsDist()
+ && bMinDist == rBoxInfo.IsMinDist()
+ && nValidFlags == rBoxInfo.nValidFlags
+ && nDefDist == rBoxInfo.GetDefDist()
+ && CmpBrdLn( pHori, rBoxInfo.GetHori() )
+ && CmpBrdLn( pVert, rBoxInfo.GetVert() )
+ );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBoxInfoItem::SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine )
+{
+ SvxBorderLine* pTmp = pNew ? new SvxBorderLine( *pNew ) : 0;
+
+ if ( BOXINFO_LINE_HORI == nLine )
+ {
+ delete pHori;
+ pHori = pTmp;
+ }
+ else if ( BOXINFO_LINE_VERT == nLine )
+ {
+ delete pVert;
+ pVert = pTmp;
+ }
+ else
+ DBG_ERROR( "wrong line" );
+}
+
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBoxInfoItem::Clone( SfxItemPool* ) const
+{
+ return new SvxBoxInfoItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxBoxInfoItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+/*!!!
+ ResMgr* pMgr = DIALOG_MGR();
+ if ( pHori )
+ {
+ rText += pHori->GetValueString();
+ rText += cpDelim;
+ }
+ if ( pVert )
+ {
+ rText += pVert->GetValueString();
+ rText += cpDelim;
+ }
+ if ( bTable )
+ rText += String( ResId( RID_SVXITEMS_BOXINF_TABLE_TRUE, pMgr ) );
+ else
+ rText += String( ResId( RID_SVXITEMS_BOXINF_TABLE_FALSE, pMgr ) );
+ rText += cpDelim;
+ if ( bDist )
+ rText += String( ResId( RID_SVXITEMS_BOXINF_DIST_TRUE, pMgr ) );
+ else
+ rText += String( ResId( RID_SVXITEMS_BOXINF_DIST_FALSE, pMgr ) );
+ rText += cpDelim;
+ if ( bMinDist )
+ rText += String( ResId( RID_SVXITEMS_BOXINF_MDIST_TRUE, pMgr ) );
+ else
+ rText += String( ResId( RID_SVXITEMS_BOXINF_MDIST_FALSE, pMgr ) );
+ rText += cpDelim;
+ rText += nDefDist;
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+*/
+ rText.Erase();
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxBoxInfoItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ sal_Int8 cFlags = 0;
+
+ if ( IsTable() )
+ cFlags |= 0x01;
+ if ( IsDist() )
+ cFlags |= 0x02;
+ if ( IsMinDist() )
+ cFlags |= 0x04;
+ rStrm << (sal_Int8) cFlags
+ << (sal_uInt16) GetDefDist();
+ const SvxBorderLine* pLine[ 2 ];
+ pLine[ 0 ] = GetHori();
+ pLine[ 1 ] = GetVert();
+
+ for( int i = 0; i < 2; i++ )
+ {
+ const SvxBorderLine* l = pLine[ i ];
+ if( l )
+ {
+ rStrm << (char) i
+ << l->GetColor()
+ << (short) l->GetOutWidth()
+ << (short) l->GetInWidth()
+ << (short) l->GetDistance();
+ }
+ }
+ rStrm << (char) 2;
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxBoxInfoItem::ScaleMetrics( long nMult, long nDiv )
+{
+ if ( pHori ) pHori->ScaleMetrics( nMult, nDiv );
+ if ( pVert ) pVert->ScaleMetrics( nMult, nDiv );
+ nDefDist = (sal_uInt16)Scale( nDefDist, nMult, nDiv );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxBoxInfoItem::HasMetrics() const
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_Int8 cFlags;
+ sal_uInt16 nDefDist;
+ rStrm >> cFlags >> nDefDist;
+
+ SvxBoxInfoItem* pAttr = new SvxBoxInfoItem( Which() );
+
+ pAttr->SetTable ( ( cFlags & 0x01 ) != 0 );
+ pAttr->SetDist ( ( cFlags & 0x02 ) != 0 );
+ pAttr->SetMinDist( ( cFlags & 0x04 ) != 0 );
+ pAttr->SetDefDist( nDefDist );
+
+ while( sal_True )
+ {
+ sal_Int8 cLine;
+ rStrm >> cLine;
+
+ if( cLine > 1 )
+ break;
+ short nOutline, nInline, nDistance;
+ Color aColor;
+ rStrm >> aColor >> nOutline >> nInline >> nDistance;
+ SvxBorderLine aBorder( &aColor, nOutline, nInline, nDistance );
+
+ switch( cLine )
+ {
+ case 0: pAttr->SetLine( &aBorder, BOXINFO_LINE_HORI ); break;
+ case 1: pAttr->SetLine( &aBorder, BOXINFO_LINE_VERT ); break;
+ }
+ }
+ return pAttr;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBoxInfoItem::ResetFlags()
+{
+ nValidFlags = 0x7F; // alles g"ultig au/ser Disable
+}
+
+// class SvxFmtBreakItem -------------------------------------------------
+
+int SvxFmtBreakItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "unequal types" );
+
+ return GetValue() == ( (SvxFmtBreakItem&)rAttr ).GetValue();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxFmtBreakItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ 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 = GetValueTextByPos( GetValue() );
+ return ePres;
+ }
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxFmtBreakItem::GetValueTextByPos( sal_uInt16 nPos ) const
+{
+ DBG_ASSERT( nPos < SVX_BREAK_END, "enum overflow!" );
+ XubString aStr( SVX_RES( RID_SVXITEMS_BREAK_BEGIN + nPos ) );
+ return aStr;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ style::BreakType eBreak = style::BreakType_NONE;
+ switch ( (SvxBreak)GetValue() )
+ {
+ case SVX_BREAK_COLUMN_BEFORE: eBreak = style::BreakType_COLUMN_BEFORE; break;
+ case SVX_BREAK_COLUMN_AFTER: eBreak = style::BreakType_COLUMN_AFTER ; break;
+ case SVX_BREAK_COLUMN_BOTH: eBreak = style::BreakType_COLUMN_BOTH ; break;
+ case SVX_BREAK_PAGE_BEFORE: eBreak = style::BreakType_PAGE_BEFORE ; break;
+ case SVX_BREAK_PAGE_AFTER: eBreak = style::BreakType_PAGE_AFTER ; break;
+ case SVX_BREAK_PAGE_BOTH: eBreak = style::BreakType_PAGE_BOTH ; break;
+ }
+ rVal <<= eBreak;
+ return sal_True;
+}
+// -----------------------------------------------------------------------
+sal_Bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ style::BreakType nBreak;
+
+ if(!(rVal >>= nBreak))
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ nBreak = (style::BreakType) nValue;
+ }
+
+ SvxBreak eBreak = SVX_BREAK_NONE;
+ switch( nBreak )
+ {
+ case style::BreakType_COLUMN_BEFORE: eBreak = SVX_BREAK_COLUMN_BEFORE; break;
+ case style::BreakType_COLUMN_AFTER: eBreak = SVX_BREAK_COLUMN_AFTER; break;
+ case style::BreakType_COLUMN_BOTH: eBreak = SVX_BREAK_COLUMN_BOTH; break;
+ case style::BreakType_PAGE_BEFORE: eBreak = SVX_BREAK_PAGE_BEFORE; break;
+ case style::BreakType_PAGE_AFTER: eBreak = SVX_BREAK_PAGE_AFTER; break;
+ case style::BreakType_PAGE_BOTH: eBreak = SVX_BREAK_PAGE_BOTH; break;
+ }
+ SetValue((sal_uInt16) eBreak);
+
+ return sal_True;
+}
+
+#ifndef SVX_LIGHT
+SvXMLEnumMapEntry psXML_BreakType[] =
+{
+ { sXML_auto, 0 },
+ { sXML_column, 1 },
+ { sXML_page, 2 },
+ { sXML_even_page, 2 },
+ { sXML_odd_page, 2 },
+ { 0, 0}
+};
+#endif
+
+sal_Bool SvxFmtBreakItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_uInt16 eEnum;
+
+ if( !rUnitConverter.convertEnum( eEnum, rValue, psXML_BreakType ) )
+ return sal_False;
+
+ if( eEnum == 0 )
+ {
+ SetValue( SVX_BREAK_NONE );
+ return sal_True;
+ }
+
+ switch( nMemberId )
+ {
+ case MID_BREAK_BEFORE:
+ SetValue( (eEnum == 1)?SVX_BREAK_COLUMN_BEFORE:SVX_BREAK_PAGE_BEFORE );
+ break;
+ case MID_BREAK_AFTER:
+ SetValue( (eEnum == 1)?SVX_BREAK_COLUMN_AFTER:SVX_BREAK_PAGE_AFTER );
+ break;
+ }
+
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxFmtBreakItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ sal_uInt16 eEnum = 0;
+
+ switch( nMemberId )
+ {
+ case MID_BREAK_BEFORE:
+ switch( GetValue() )
+ {
+ case SVX_BREAK_COLUMN_BEFORE:
+ eEnum = 1;
+ break;
+ case SVX_BREAK_PAGE_BEFORE:
+ eEnum = 2;
+ break;
+ case SVX_BREAK_NONE:
+ eEnum = 0;
+ break;
+ default:
+ return sal_False;
+ }
+ break;
+ case MID_BREAK_AFTER:
+ switch( GetValue() )
+ {
+ case SVX_BREAK_COLUMN_AFTER:
+ eEnum = 1;
+ break;
+ case SVX_BREAK_PAGE_AFTER:
+ eEnum = 2;
+ break;
+ case SVX_BREAK_NONE:
+ eEnum = 0;
+ break;
+ default:
+ return sal_False;
+ }
+ break;
+ }
+
+ OUStringBuffer aOut;
+ sal_Bool bOk = rUnitConverter.convertEnum( aOut, eEnum, psXML_BreakType );
+ rValue = aOut.makeStringAndClear();
+ return bOk;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFmtBreakItem::Clone( SfxItemPool* ) const
+{
+ return new SvxFmtBreakItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxFmtBreakItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_Int8)GetValue();
+ if( FMTBREAK_NOAUTO > nItemVersion )
+ rStrm << (sal_Int8)0x01;
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxFmtBreakItem::GetVersion( sal_uInt16 nFFVer ) const
+{
+ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+ SOFFICE_FILEFORMAT_40==nFFVer ||
+ SOFFICE_FILEFORMAT_NOW==nFFVer,
+ "SvxFmtBreakItem: Gibt es ein neues Fileformat?" );
+ return SOFFICE_FILEFORMAT_31==nFFVer ||
+ SOFFICE_FILEFORMAT_40==nFFVer ? 0 : FMTBREAK_NOAUTO;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFmtBreakItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
+{
+ sal_Int8 eBreak, bDummy;
+ rStrm >> eBreak;
+ if( FMTBREAK_NOAUTO > nVersion )
+ rStrm >> bDummy;
+ return new SvxFmtBreakItem( (const SvxBreak)eBreak, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxFmtBreakItem::GetValueCount() const
+{
+ return SVX_BREAK_END; // SVX_BREAK_PAGE_BOTH + 1
+}
+
+// class SvxFmtKeepItem -------------------------------------------------
+
+SfxPoolItem* SvxFmtKeepItem::Clone( SfxItemPool* ) const
+{
+ return new SvxFmtKeepItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxFmtKeepItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_Int8)GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFmtKeepItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_Int8 bIsKeep;
+ rStrm >> bIsKeep;
+ return new SvxFmtKeepItem( sal_Bool( bIsKeep != 0 ), Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxFmtKeepItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ sal_uInt16 nId = RID_SVXITEMS_FMTKEEP_FALSE;
+
+ if ( GetValue() )
+ nId = RID_SVXITEMS_FMTKEEP_TRUE;
+ rText = SVX_RESSTR(nId);
+ return ePres;
+ }
+ }
+#endif
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxFmtKeepItem::importXML( const OUString& rValue,
+ sal_uInt16 nMemberId,
+ const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_Bool bValue;
+ if(!rUnitConverter.convertBool( bValue, rValue ) )
+ return sal_False;
+
+ SetValue( bValue );
+
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+sal_Bool SvxFmtKeepItem::exportXML( OUString& rValue,
+ sal_uInt16 nMemberId,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+ rUnitConverter.convertBool( aOut, GetValue() );
+ rValue = aOut.makeStringAndClear();
+
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// class SvxLineItem ------------------------------------------------------
+
+SvxLineItem::SvxLineItem( const sal_uInt16 nId ) :
+
+ SfxPoolItem ( nId ),
+
+ pLine( NULL )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineItem::SvxLineItem( const SvxLineItem& rCpy ) :
+
+ SfxPoolItem ( rCpy )
+{
+ pLine = rCpy.GetLine() ? new SvxBorderLine( *rCpy.GetLine() ) : 0;
+}
+
+
+// -----------------------------------------------------------------------
+
+SvxLineItem::~SvxLineItem()
+{
+ delete pLine;
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineItem& SvxLineItem::operator=( const SvxLineItem& rLine )
+{
+ SetLine( rLine.GetLine() );
+
+ return *this;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLineItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return CmpBrdLn( pLine, ((SvxLineItem&)rAttr).GetLine() );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxLineItem::Clone( SfxItemPool* ) const
+{
+ return new SvxLineItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxLineItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return SFX_ITEM_PRESENTATION_NONE;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ if ( pLine )
+ rText = pLine->GetValueString( eCoreUnit, ePresUnit,
+ (SFX_ITEM_PRESENTATION_COMPLETE == ePres) );
+ return ePres;
+ }
+ }
+#endif
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxLineItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
+{
+ if( pLine )
+ {
+ rStrm << pLine->GetColor()
+ << (short)pLine->GetOutWidth()
+ << (short)pLine->GetInWidth()
+ << (short)pLine->GetDistance();
+ }
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLineItem::ScaleMetrics( long nMult, long nDiv )
+{
+ if ( pLine ) pLine->ScaleMetrics( nMult, nDiv );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLineItem::HasMetrics() const
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxLineItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ SvxLineItem* pLine = new SvxLineItem( Which() );
+ short nOutline, nInline, nDistance;
+ Color aColor;
+
+ rStrm >> aColor >> nOutline >> nInline >> nDistance;
+ SvxBorderLine aLine( &aColor, nOutline, nInline, nDistance );
+ pLine->SetLine( &aLine );
+ return pLine;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineItem::SetLine( const SvxBorderLine* pNew )
+{
+ delete pLine;
+ pLine = pNew ? new SvxBorderLine( *pNew ) : 0;
+}
+
+#ifdef WNT
+#pragma optimize ( "", off )
+#endif
+
+// class SvxBrushItem ----------------------------------------------------
+
+#define LOAD_GRAPHIC ((sal_uInt16)0x0001)
+#define LOAD_LINK ((sal_uInt16)0x0002)
+#define LOAD_FILTER ((sal_uInt16)0x0004)
+
+// class SvxBrushItem_Impl -----------------------------------------------
+
+class SvxBrushItem_Impl
+{
+public:
+ GraphicObject* pGraphicObject;
+#ifndef SVX_LIGHT
+ SfxMediumRef xMedium;
+#endif
+ Link aDoneLink;
+
+ SvxBrushItem_Impl( GraphicObject* p ) : pGraphicObject( p ) {}
+};
+
+// class SvxBrushItemLink_Impl -------------------------------------------
+
+class SvxBrushItemLink_Impl : public SfxBrushItemLink
+{
+ virtual Graphic GetGraphic( const String& rLink, const String& rFilter );
+ virtual CreateSvxBrushTabPage GetBackgroundTabpageCreateFunc();
+ virtual GetSvxBrushTabPageRanges GetBackgroundTabpageRanges();
+};
+
+// -----------------------------------------------------------------------
+
+Graphic SvxBrushItemLink_Impl::GetGraphic( const String& rLink, const String& rFilter)
+{
+ Graphic aResult;
+ SvxBrushItem aItem( rLink, rFilter, GPOS_TILED );
+ const Graphic* pGraph = aItem.GetGraphic();
+ if( pGraph )
+ aResult = *pGraph;
+ return aResult;
+}
+
+// -----------------------------------------------------------------------
+
+CreateSvxBrushTabPage SvxBrushItemLink_Impl::GetBackgroundTabpageCreateFunc()
+{
+#ifndef SVX_LIGHT
+ return (CreateSvxBrushTabPage)SvxBackgroundTabPage::Create;
+#else
+ return CreateSvxBrushTabPage();
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+GetSvxBrushTabPageRanges SvxBrushItemLink_Impl::GetBackgroundTabpageRanges()
+{
+#ifndef SVX_LIGHT
+ return (GetSvxBrushTabPageRanges)SvxBackgroundTabPage::GetRanges;
+#else
+ return GetSvxBrushTabPageRanges();
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBrushItem::InitSfxLink()
+{
+ SfxBrushItemLink::Set( new SvxBrushItemLink_Impl );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBrushItem::SetDoneLink( const Link& rLink )
+{
+ pImpl->aDoneLink = rLink;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBrushItem::SvxBrushItem( sal_uInt16 nWhich ) :
+
+ SfxPoolItem( nWhich ),
+
+ aColor ( COL_TRANSPARENT ),
+ pImpl ( new SvxBrushItem_Impl( 0 ) ),
+ pStrLink ( NULL ),
+ pStrFilter ( NULL ),
+ eGraphicPos ( GPOS_NONE ),
+ bLoadAgain ( sal_True )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxBrushItem::SvxBrushItem( const Color& rColor, sal_uInt16 nWhich) :
+
+ SfxPoolItem( nWhich ),
+
+ aColor ( rColor ),
+ pImpl ( new SvxBrushItem_Impl( 0 ) ),
+ pStrLink ( NULL ),
+ pStrFilter ( NULL ),
+ eGraphicPos ( GPOS_NONE ),
+ bLoadAgain ( sal_True )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxBrushItem::SvxBrushItem( const Graphic& rGraphic, SvxGraphicPosition ePos, sal_uInt16 nWhich ) :
+
+ SfxPoolItem( nWhich ),
+
+ pImpl ( new SvxBrushItem_Impl( new GraphicObject( rGraphic ) ) ),
+ pStrLink ( NULL ),
+ pStrFilter ( NULL ),
+ eGraphicPos ( ( GPOS_NONE != ePos ) ? ePos : GPOS_MM ),
+ bLoadAgain ( sal_True )
+
+{
+ DBG_ASSERT( GPOS_NONE != ePos, "SvxBrushItem-Ctor with GPOS_NONE == ePos" );
+}
+
+// -----------------------------------------------------------------------
+
+SvxBrushItem::SvxBrushItem( const GraphicObject& rGraphicObj, SvxGraphicPosition ePos, sal_uInt16 nWhich ) :
+
+ SfxPoolItem( nWhich ),
+
+ pImpl ( new SvxBrushItem_Impl( new GraphicObject( rGraphicObj ) ) ),
+ pStrLink ( NULL ),
+ pStrFilter ( NULL ),
+ eGraphicPos ( ( GPOS_NONE != ePos ) ? ePos : GPOS_MM ),
+ bLoadAgain ( sal_True )
+
+{
+ DBG_ASSERT( GPOS_NONE != ePos, "SvxBrushItem-Ctor with GPOS_NONE == ePos" );
+}
+
+// -----------------------------------------------------------------------
+
+SvxBrushItem::SvxBrushItem(
+ const String& rLink, const String& rFilter, SvxGraphicPosition ePos, sal_uInt16 nWhich ) :
+
+ SfxPoolItem( nWhich ),
+
+ pImpl ( new SvxBrushItem_Impl( NULL ) ),
+ pStrLink ( new String( rLink ) ),
+ pStrFilter ( new String( rFilter ) ),
+ eGraphicPos ( ( GPOS_NONE != ePos ) ? ePos : GPOS_MM ),
+ bLoadAgain ( sal_True )
+
+{
+ DBG_ASSERT( GPOS_NONE != ePos, "SvxBrushItem-Ctor with GPOS_NONE == ePos" );
+}
+
+// -----------------------------------------------------------------------
+
+SvxBrushItem::SvxBrushItem( SvStream& rStream, sal_uInt16 nVersion, sal_uInt16 nWhich ) :
+
+ SfxPoolItem( nWhich ),
+
+ pImpl ( new SvxBrushItem_Impl( NULL ) ),
+ pStrLink ( NULL ),
+ pStrFilter ( NULL ),
+ eGraphicPos ( GPOS_NONE )
+
+{
+ sal_Bool bTrans;
+ Color aTempColor;
+ Color aTempFillColor;
+ sal_Int8 nStyle;
+
+ rStream >> bTrans;
+ rStream >> aTempColor;
+ rStream >> aTempFillColor;
+ rStream >> nStyle;
+
+ switch ( nStyle )
+ {
+ case 8://BRUSH_25:
+ {
+ sal_uInt32 nRed = aTempColor.GetRed();
+ sal_uInt32 nGreen = aTempColor.GetGreen();
+ sal_uInt32 nBlue = aTempColor.GetBlue();
+ nRed += (sal_uInt32)(aTempFillColor.GetRed())*2;
+ nGreen += (sal_uInt32)(aTempFillColor.GetGreen())*2;
+ nBlue += (sal_uInt32)(aTempFillColor.GetBlue())*2;
+ aColor = Color( (sal_Int8)(nRed/3), (sal_Int8)(nGreen/3), (sal_Int8)(nBlue/3) );
+ }
+ break;
+
+ case 9://BRUSH_50:
+ {
+ sal_uInt32 nRed = aTempColor.GetRed();
+ sal_uInt32 nGreen = aTempColor.GetGreen();
+ sal_uInt32 nBlue = aTempColor.GetBlue();
+ nRed += (sal_uInt32)(aTempFillColor.GetRed());
+ nGreen += (sal_uInt32)(aTempFillColor.GetGreen());
+ nBlue += (sal_uInt32)(aTempFillColor.GetBlue());
+ aColor = Color( (sal_Int8)(nRed/2), (sal_Int8)(nGreen/2), (sal_Int8)(nBlue/2) );
+ }
+ break;
+
+ case 10://BRUSH_75:
+ {
+ sal_uInt32 nRed = aTempColor.GetRed()*2;
+ sal_uInt32 nGreen = aTempColor.GetGreen()*2;
+ sal_uInt32 nBlue = aTempColor.GetBlue()*2;
+ nRed += (sal_uInt32)(aTempFillColor.GetRed());
+ nGreen += (sal_uInt32)(aTempFillColor.GetGreen());
+ nBlue += (sal_uInt32)(aTempFillColor.GetBlue());
+ aColor = Color( (sal_Int8)(nRed/3), (sal_Int8)(nGreen/3), (sal_Int8)(nBlue/3) );
+ }
+ break;
+
+ case 0://BRUSH_NULL:
+ aColor = Color( COL_TRANSPARENT );
+ break;
+
+ default:
+ aColor = aTempColor;
+ }
+
+ if ( nVersion >= BRUSH_GRAPHIC_VERSION )
+ {
+ sal_uInt16 nDoLoad = 0;
+ sal_Int8 nPos;
+
+ rStream >> nDoLoad;
+
+ if ( nDoLoad & LOAD_GRAPHIC )
+ {
+ Graphic aGraphic;
+
+ rStream >> aGraphic;
+ pImpl->pGraphicObject = new GraphicObject( aGraphic );
+
+ if( SVSTREAM_FILEFORMAT_ERROR == rStream.GetError() )
+ {
+ rStream.ResetError();
+ rStream.SetError( ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT|
+ ERRCODE_WARNING_MASK );
+ }
+ }
+
+ if ( nDoLoad & LOAD_LINK )
+ {
+ String aRel;
+ // UNICODE: rStream >> aRel;
+ rStream.ReadByteString(aRel);
+
+ String aAbs = INetURLObject::RelToAbs( aRel );
+ pStrLink = new String( aAbs );
+ }
+
+ if ( nDoLoad & LOAD_FILTER )
+ {
+ pStrFilter = new String;
+ // UNICODE: rStream >> *pStrFilter;
+ rStream.ReadByteString(*pStrFilter);
+ }
+
+ rStream >> nPos;
+
+ eGraphicPos = (SvxGraphicPosition)nPos;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SvxBrushItem::SvxBrushItem( const SvxBrushItem& rItem ) :
+
+ SfxPoolItem( rItem.Which() ),
+
+ pImpl ( new SvxBrushItem_Impl( NULL ) ),
+ pStrLink ( NULL ),
+ pStrFilter ( NULL ),
+ eGraphicPos ( GPOS_NONE ),
+ bLoadAgain ( sal_True )
+
+{
+ *this = rItem;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBrushItem::~SvxBrushItem()
+{
+#ifndef SVX_LIGHT
+ if( pImpl->xMedium.Is() )
+ pImpl->xMedium->SetDoneLink( Link() );
+#endif
+ delete pImpl->pGraphicObject;
+ delete pImpl;
+ delete pStrLink;
+ delete pStrFilter;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxBrushItem::GetVersion( sal_uInt16 nFileVersion ) const
+{
+ return BRUSH_GRAPHIC_VERSION;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch( nMemberId)
+ {
+ case MID_BACK_COLOR:
+ rVal <<= (sal_Int32)( aColor.GetColor() );
+ break;
+
+ case MID_GRAPHIC_POSITION:
+ rVal <<= (style::GraphicLocation)(sal_uInt16)eGraphicPos;
+ break;
+
+ case MID_GRAPHIC:
+ DBG_ERRORFILE( "not implemented" );
+ break;
+
+ case MID_GRAPHIC_TRANSPARENT:
+ rVal = Bool2Any( aColor.GetTransparency() );
+ break;
+
+ case MID_GRAPHIC_URL:
+ {
+ OUString sLink;
+ if ( pStrLink )
+ sLink = *pStrLink;
+ rVal <<= sLink;
+ }
+ break;
+
+ case MID_GRAPHIC_FILTER:
+ {
+ OUString sFilter;
+ if ( pStrFilter )
+ sFilter = *pStrFilter;
+ rVal <<= sFilter;
+ }
+ break;
+ }
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ switch( nMemberId)
+ {
+ case MID_BACK_COLOR:
+ {
+ sal_Int32 nCol;
+ if ( !( rVal >>= nCol ) )
+ return sal_False;
+ aColor = Color( nCol );
+ }
+ break;
+
+ case MID_GRAPHIC_POSITION:
+ {
+ style::GraphicLocation eLocation;
+ if ( !( rVal>>=eLocation ) )
+ {
+ sal_Int32 nValue;
+ if ( !( rVal >>= nValue ) )
+ return sal_False;
+ eLocation = (style::GraphicLocation)nValue;
+ }
+ SetGraphicPos( (SvxGraphicPosition)(sal_uInt16)eLocation );
+ }
+ break;
+
+ case MID_GRAPHIC:
+ DBG_ERRORFILE( "not implemented" );
+ break;
+
+ case MID_GRAPHIC_TRANSPARENT:
+ aColor.SetTransparency( Any2Bool( rVal ) ? 0xff : 0 );
+ break;
+
+ case MID_GRAPHIC_URL:
+ {
+ if ( rVal.getValueType() == ::getCppuType( (OUString*)0 ) )
+ {
+ OUString sLink;
+ rVal >>= sLink;
+ SetGraphicLink(sLink);
+ if ( sLink.getLength() && eGraphicPos == GPOS_NONE )
+ eGraphicPos = GPOS_MM;
+ else if( !sLink.getLength() )
+ eGraphicPos = GPOS_NONE;
+ }
+ }
+ break;
+
+ case MID_GRAPHIC_FILTER:
+ {
+ if( rVal.getValueType() == ::getCppuType( (OUString*)0 ) )
+ {
+ OUString sLink;
+ rVal >>= sLink;
+ SetGraphicFilter( sLink );
+ }
+ }
+ break;
+ }
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+
+SvXMLEnumMapEntry psXML_BrushRepeat[] =
+{
+ { sXML_background_repeat, GPOS_TILED },
+ { sXML_background_no_repeat, GPOS_MM },
+ { sXML_background_stretch, GPOS_AREA },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry psXML_BrushHoriPos[] =
+{
+ { sXML_left, GPOS_LM },
+ { sXML_right, GPOS_RM },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry psXML_BrushVertPos[] =
+{
+ { sXML_top, GPOS_MT },
+ { sXML_bottom, GPOS_MB },
+ { 0, 0 }
+};
+
+void lcl_frmitems_MergeXMLHoriPos( SvxGraphicPosition& ePos,
+ SvxGraphicPosition eHori )
+{
+ DBG_ASSERT( GPOS_LM==eHori || GPOS_MM==eHori || GPOS_RM==eHori,
+ "lcl_frmitems_MergeXMLHoriPos: vertical pos must be middle" );
+
+ switch( ePos )
+ {
+ case GPOS_LT:
+ case GPOS_MT:
+ case GPOS_RT:
+ ePos = GPOS_LM==eHori ? GPOS_LT : (GPOS_MM==eHori ? GPOS_MT : GPOS_RT);
+ break;
+
+ case GPOS_LM:
+ case GPOS_MM:
+ case GPOS_RM:
+ ePos = eHori;
+ break;
+
+ case GPOS_LB:
+ case GPOS_MB:
+ case GPOS_RB:
+ ePos = GPOS_LM==eHori ? GPOS_LB : (GPOS_MM==eHori ? GPOS_MB : GPOS_RB);
+ break;
+ }
+}
+
+void lcl_frmitems_MergeXMLVertPos( SvxGraphicPosition& ePos,
+ SvxGraphicPosition eVert )
+{
+ DBG_ASSERT( GPOS_MT==eVert || GPOS_MM==eVert || GPOS_MB==eVert,
+ "lcl_frmitems_MergeXMLVertPos: horizontal pos must be middle" );
+
+ switch( ePos )
+ {
+ case GPOS_LT:
+ case GPOS_LM:
+ case GPOS_LB:
+ ePos = GPOS_MT==eVert ? GPOS_LT : (GPOS_MM==eVert ? GPOS_LM : GPOS_LB);
+ ePos = eVert;
+ break;
+
+ case GPOS_MT:
+ case GPOS_MM:
+ case GPOS_MB:
+ ePos = eVert;
+ break;
+
+ case GPOS_RT:
+ case GPOS_RM:
+ case GPOS_RB:
+ ePos = GPOS_MT==eVert ? GPOS_RT : (GPOS_MM==eVert ? GPOS_RM : GPOS_RB);
+ break;
+ }
+}
+
+#endif
+
+// note: the graphic is only imported if nMemberId equals MID_GRAPHIC.
+// If not, only the color or transparency is imported
+sal_Bool SvxBrushItem::importXML( const OUString& rValue,
+ sal_uInt16 nMemberId,
+ const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+
+ sal_Bool bRet = sal_False;
+ Color aTempColor;
+ switch( nMemberId )
+ {
+ case MID_BACK_COLOR:
+ if( 0 == rValue.compareToAscii( sXML_transparent ) )
+ {
+ aColor.SetTransparency(0xff);
+ bRet = sal_True;
+ }
+ else if( rUnitConverter.convertColor( aTempColor, rValue ) )
+ {
+ aColor = aTempColor;
+ aColor.SetTransparency(0);
+ bRet = sal_True;
+ }
+ break;
+
+ case MID_GRAPHIC_LINK:
+ pStrLink = new String( rValue.getStr() );
+ if( GPOS_NONE == eGraphicPos )
+ eGraphicPos = GPOS_TILED;
+ bRet = sal_True ;
+ break;
+
+ case MID_GRAPHIC_REPEAT:
+ {
+ sal_uInt16 nPos = GPOS_NONE;
+ if( rUnitConverter.convertEnum( nPos, rValue,
+ psXML_BrushRepeat ) )
+ {
+ if( GPOS_MM != nPos || GPOS_NONE == eGraphicPos ||
+ GPOS_AREA == eGraphicPos || GPOS_TILED == eGraphicPos )
+ eGraphicPos = (SvxGraphicPosition)nPos;
+ bRet = sal_True;
+ }
+ }
+ break;
+
+ case MID_GRAPHIC_POSITION:
+ {
+ SvxGraphicPosition ePos = GPOS_NONE, eTmp;
+ sal_uInt16 nTmp;
+ SvXMLTokenEnumerator aTokenEnum( rValue );
+ OUString aToken;
+ sal_Bool bHori = sal_False, bVert = sal_False;
+ bRet = sal_True;
+ while( bRet && aTokenEnum.getNextToken( aToken ) )
+ {
+ if( bHori && bVert )
+ {
+ bRet = sal_False;
+ }
+ else if( -1 != aToken.indexOf( sal_Unicode('%') ) )
+ {
+ long nPrc = 50;
+ if( rUnitConverter.convertPercent( nPrc, aToken ) )
+ {
+ if( !bHori )
+ {
+ ePos = nPrc < 25 ? GPOS_LT : (nPrc < 75 ? GPOS_MM
+ : GPOS_RB);
+ bHori = sal_True;
+ }
+ else
+ {
+ eTmp = nPrc < 25 ? GPOS_LT: (nPrc < 75 ? GPOS_LM
+ : GPOS_LB);
+ lcl_frmitems_MergeXMLVertPos( ePos, eTmp );
+ bVert = sal_True;
+ }
+ }
+ else
+ {
+ // wrong percentage
+ bRet = sal_False;
+ }
+ }
+ else if( aToken.compareToAscii( sXML_center ) )
+ {
+ if( bHori )
+ lcl_frmitems_MergeXMLVertPos( ePos, GPOS_MM );
+ else if ( bVert )
+ lcl_frmitems_MergeXMLHoriPos( ePos, GPOS_MM );
+ else
+ ePos = GPOS_MM;
+ }
+ else if( rUnitConverter.convertEnum( nTmp, aToken,
+ psXML_BrushHoriPos ) )
+ {
+ if( bVert )
+ lcl_frmitems_MergeXMLHoriPos(
+ ePos, (SvxGraphicPosition)nTmp );
+ else if( !bHori )
+ ePos = (SvxGraphicPosition)nTmp;
+ else
+ bRet = sal_False;
+ bHori = sal_True;
+ }
+ else if( rUnitConverter.convertEnum( nTmp, aToken,
+ psXML_BrushVertPos ) )
+ {
+ if( bHori )
+ lcl_frmitems_MergeXMLVertPos(
+ ePos, (SvxGraphicPosition)nTmp );
+ else if( !bVert )
+ ePos = (SvxGraphicPosition)nTmp;
+ else
+ bRet = sal_False;
+ bVert = sal_True;
+ }
+ else
+ {
+ bRet = sal_False;
+ }
+ }
+
+ bRet &= GPOS_NONE != ePos;
+ if( bRet )
+ eGraphicPos = ePos;
+ }
+ break;
+
+ case MID_GRAPHIC_FILTER:
+ pStrFilter = new String( rValue.getStr() );
+ bRet = sal_True;
+ break;
+ }
+
+ return bRet;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+// note: the graphic is only exported if nMemberId equals MID_GRAPHIC.
+// If not, only the color or transparency is exported
+sal_Bool SvxBrushItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+ sal_Bool bRet = sal_False;
+
+ switch( nMemberId )
+ {
+ case MID_BACK_COLOR:
+ if ( aColor.GetTransparency() )
+ aOut.appendAscii( sXML_transparent );
+ else
+ rUnitConverter.convertColor( aOut, aColor );
+ bRet = sal_True;
+ break;
+
+ case MID_GRAPHIC_LINK:
+ if( eGraphicPos != GPOS_NONE && pStrLink )
+ {
+ aOut.append( pStrLink->GetBuffer() );
+ bRet = sal_True;
+ }
+ break;
+
+ case MID_GRAPHIC_POSITION:
+ switch( eGraphicPos )
+ {
+ case GPOS_LT:
+ case GPOS_MT:
+ case GPOS_RT:
+ aOut.appendAscii( sXML_top );
+ bRet = sal_True;
+ break;
+ case GPOS_LM:
+ case GPOS_MM:
+ case GPOS_RM:
+ aOut.appendAscii( sXML_center );
+ bRet = sal_True;
+ break;
+ case GPOS_LB:
+ case GPOS_MB:
+ case GPOS_RB:
+ aOut.appendAscii( sXML_bottom );
+ bRet = sal_True;
+ break;
+ }
+
+ if( bRet )
+ {
+ aOut.append( sal_Unicode( ' ' ) );
+
+ switch( eGraphicPos )
+ {
+ case GPOS_LT:
+ case GPOS_LB:
+ case GPOS_LM:
+ aOut.appendAscii( sXML_left );
+ break;
+ case GPOS_MT:
+ case GPOS_MM:
+ case GPOS_MB:
+ aOut.appendAscii( sXML_center );
+ break;
+ case GPOS_RM:
+ case GPOS_RT:
+ case GPOS_RB:
+ aOut.appendAscii( sXML_right );
+ break;
+ }
+ }
+ break;
+
+ case MID_GRAPHIC_REPEAT:
+ if( GPOS_AREA == eGraphicPos )
+ {
+ aOut.appendAscii( sXML_background_stretch );
+ bRet = sal_True;
+ }
+ else if( GPOS_NONE != eGraphicPos && GPOS_TILED != eGraphicPos )
+ {
+ aOut.appendAscii( sXML_background_no_repeat );
+ bRet = sal_True;
+ }
+ break;
+
+ case MID_GRAPHIC_FILTER:
+ if( eGraphicPos != GPOS_NONE && pStrFilter )
+ {
+ aOut.append( pStrFilter->GetBuffer() );
+ bRet = sal_True;
+ }
+ break;
+ }
+
+ rValue = aOut.makeStringAndClear();
+ return bRet;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+SfxItemPresentation SvxBrushItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ if ( GPOS_NONE == eGraphicPos )
+ {
+ rText = ::GetColorString( aColor );
+ rText += cpDelim;
+ sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE;
+
+ if ( aColor.GetTransparency() )
+ nId = RID_SVXITEMS_TRANSPARENT_TRUE;
+ rText += SVX_RESSTR(nId);
+ }
+ else
+ {
+ rText = SVX_RESSTR(RID_SVXITEMS_GRAPHIC);
+ }
+
+ return ePres;
+ }
+ }
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SvxBrushItem& SvxBrushItem::operator=( const SvxBrushItem& rItem )
+{
+ aColor = rItem.aColor;
+ eGraphicPos = rItem.eGraphicPos;
+
+ DELETEZ( pImpl->pGraphicObject );
+ DELETEZ( pStrLink );
+ DELETEZ( pStrFilter );
+
+ if ( GPOS_NONE != eGraphicPos )
+ {
+ if ( rItem.pStrLink )
+ pStrLink = new String( *rItem.pStrLink );
+ if ( rItem.pStrFilter )
+ pStrFilter = new String( *rItem.pStrFilter );
+ if ( rItem.pImpl->pGraphicObject )
+ pImpl->pGraphicObject = new GraphicObject( *rItem.pImpl->pGraphicObject );
+ }
+ return *this;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxBrushItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ SvxBrushItem& rCmp = (SvxBrushItem&)rAttr;
+ sal_Bool bEqual = ( aColor == rCmp.aColor && eGraphicPos == rCmp.eGraphicPos );
+
+ if ( bEqual )
+ {
+ if ( GPOS_NONE != eGraphicPos )
+ {
+ if ( !rCmp.pStrLink )
+ bEqual = !pStrLink;
+ else
+ bEqual = pStrLink && ( *pStrLink == *rCmp.pStrLink );
+
+ if ( bEqual )
+ {
+ if ( !rCmp.pStrFilter )
+ bEqual = !pStrFilter;
+ else
+ bEqual = pStrFilter && ( *pStrFilter == *rCmp.pStrFilter );
+ }
+
+ if ( bEqual && !rCmp.pStrLink )
+ {
+ if ( !rCmp.pImpl->pGraphicObject )
+ bEqual = !pImpl->pGraphicObject;
+ else
+ bEqual = pImpl->pGraphicObject &&
+ ( *pImpl->pGraphicObject == *rCmp.pImpl->pGraphicObject );
+ }
+ }
+ }
+
+ return bEqual;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBrushItem::Clone( SfxItemPool* ) const
+{
+ return new SvxBrushItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBrushItem::Create( SvStream& rStream, sal_uInt16 nVersion ) const
+{
+ return new SvxBrushItem( rStream, nVersion, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 nItemVersion ) const
+{
+ rStream << (sal_Bool)sal_False;
+ rStream << aColor;
+ rStream << aColor;
+ rStream << (sal_Int8)(aColor.GetTransparency() > 0 ? 0 : 1); //BRUSH_NULL : BRUSH_SOLID
+
+ sal_uInt16 nDoLoad = 0;
+
+ if ( pImpl->pGraphicObject && !pStrLink )
+ nDoLoad |= LOAD_GRAPHIC;
+ if ( pStrLink )
+ nDoLoad |= LOAD_LINK;
+ if ( pStrFilter )
+ nDoLoad |= LOAD_FILTER;
+ rStream << nDoLoad;
+
+ if ( pImpl->pGraphicObject && !pStrLink )
+ rStream << pImpl->pGraphicObject->GetGraphic();
+ if ( pStrLink )
+ {
+ String aRel = INetURLObject::AbsToRel( *pStrLink );
+ // UNICODE: rStream << aRel;
+ rStream.WriteByteString(aRel);
+ }
+ if ( pStrFilter )
+ {
+ // UNICODE: rStream << *pStrFilter;
+ rStream.WriteByteString(*pStrFilter);
+ }
+ rStream << (sal_Int8)eGraphicPos;
+ return rStream;
+}
+
+// -----------------------------------------------------------------------
+// const wegcasten, da const als logisches const zu verstehen ist
+// wenn GetGraphic() gerufen wird, soll sich das Item darum kuemmern,
+// eine gelinkte Grafik zu holen.
+
+
+GraphicFilter* GetGrfFilter();
+
+IMPL_STATIC_LINK( SvxBrushItem, DoneHdl_Impl, void*, EMPTYARG )
+{
+#ifndef SVX_LIGHT
+ pThis->pImpl->pGraphicObject = new GraphicObject;
+ SvStream* pStream = pThis->pImpl->xMedium->GetInStream();
+ if( pStream && !pStream->GetError() )
+ {
+ Graphic aGraphic;
+ int nRes;
+ pStream->Seek( STREAM_SEEK_TO_BEGIN );
+ nRes = GetGrfFilter()->
+ ImportGraphic( aGraphic, *pThis->pStrLink, *pStream );
+ if( nRes != GRFILTER_OK )
+ {
+ DELETEZ( pThis->pImpl->pGraphicObject );
+ pThis->bLoadAgain = sal_False;
+ }
+ else
+ pThis->pImpl->pGraphicObject->SetGraphic( aGraphic );
+ }
+ else
+ pThis->bLoadAgain = sal_False;
+
+ pThis->pImpl->xMedium.Clear();
+ pThis->pImpl->aDoneLink.Call( pThis );
+#endif
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBrushItem::PurgeGraphic() const
+{
+#ifndef SVX_LIGHT
+ PurgeMedium();
+ DELETEZ( pImpl->pGraphicObject );
+ ((SvxBrushItem*)this)->bLoadAgain = sal_True;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBrushItem::PurgeMedium() const
+{
+#ifndef SVX_LIGHT
+ pImpl->xMedium.Clear();
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+const GraphicObject* SvxBrushItem::GetGraphicObject( SfxObjectShell* pSh ) const
+{
+#ifndef SVX_LIGHT
+ if ( bLoadAgain && pStrLink && !pImpl->pGraphicObject && !pImpl->xMedium.Is() )
+ // wenn Grafik schon geladen, als Cache benutzen
+ {
+ if( pSh && pSh->IsAbortingImport() )
+ {
+ SvxBrushItem* pThis = (SvxBrushItem*)this;
+ pThis->bLoadAgain = sal_False;
+ return 0;
+ }
+ pImpl->xMedium = new SfxMedium(
+ *pStrLink, STREAM_STD_READ, sal_False );
+
+ pImpl->xMedium->SetTransferPriority( SFX_TFPRIO_VISIBLE_LOWRES_GRAPHIC );
+ if( pImpl->xMedium->IsRemote() )
+ {
+ if( pSh )
+ pSh->RegisterTransfer( *pImpl->xMedium );
+ else
+ DBG_WARNING( "SvxBrushItem::GetGraphic ohne DocShell" );
+ }
+
+ SfxMediumRef xRef( pImpl->xMedium );
+ // Ref halten wg. synchr. DoneCallback
+ if( pImpl->aDoneLink.IsSet() )
+ {
+ // Auf besonderen Wunsch des Writers wird der synchrone und der
+ // asynchrone Fall was die Benachrichtigung angeht unterschiedlich
+ // behandelt. Der Callback erfolgt nur bei asynchronem Eintreffen
+ // der Daten
+
+ Link aTmp = pImpl->aDoneLink;
+ pImpl->aDoneLink = Link();
+ pImpl->xMedium->DownLoad(
+ STATIC_LINK( this, SvxBrushItem, DoneHdl_Impl ) );
+ pImpl->aDoneLink = aTmp;
+ }
+ else
+ {
+ pImpl->xMedium->DownLoad( );
+ DoneHdl_Impl( (SvxBrushItem*)this, 0 );
+ }
+ }
+#endif
+ return pImpl->pGraphicObject;
+}
+
+// -----------------------------------------------------------------------
+
+const Graphic* SvxBrushItem::GetGraphic( SfxObjectShell* pSh ) const
+{
+ const GraphicObject* pGrafObj = GetGraphicObject( pSh );
+ return( pGrafObj ? &( pGrafObj->GetGraphic() ) : NULL );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBrushItem::SetGraphicPos( SvxGraphicPosition eNew )
+{
+ eGraphicPos = eNew;
+
+ if ( GPOS_NONE == eGraphicPos )
+ {
+ DELETEZ( pImpl->pGraphicObject );
+ DELETEZ( pStrLink );
+ DELETEZ( pStrFilter );
+ }
+ else
+ {
+ if ( !pImpl->pGraphicObject && !pStrLink )
+ {
+ pImpl->pGraphicObject = new GraphicObject; // dummy anlegen
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBrushItem::SetGraphic( const Graphic& rNew )
+{
+ if ( !pStrLink )
+ {
+ if ( pImpl->pGraphicObject )
+ pImpl->pGraphicObject->SetGraphic( rNew );
+ else
+ pImpl->pGraphicObject = new GraphicObject( rNew );
+
+ if ( GPOS_NONE == eGraphicPos )
+ eGraphicPos = GPOS_MM; // None waere Brush, also Default: Mitte
+ }
+ else
+ DBG_ERROR( "SetGraphic() on linked graphic! :-/" );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBrushItem::SetGraphicObject( const GraphicObject& rNewObj )
+{
+ if ( !pStrLink )
+ {
+ if ( pImpl->pGraphicObject )
+ *pImpl->pGraphicObject = rNewObj;
+ else
+ pImpl->pGraphicObject = new GraphicObject( rNewObj );
+
+ if ( GPOS_NONE == eGraphicPos )
+ eGraphicPos = GPOS_MM; // None waere Brush, also Default: Mitte
+ }
+ else
+ DBG_ERROR( "SetGraphic() on linked graphic! :-/" );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBrushItem::SetGraphicLink( const String& rNew )
+{
+ if ( !rNew.Len() )
+ DELETEZ( pStrLink );
+ else
+ {
+ if ( pStrLink )
+ *pStrLink = rNew;
+ else
+ pStrLink = new String( rNew );
+
+ DELETEZ( pImpl->pGraphicObject );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBrushItem::SetGraphicFilter( const String& rNew )
+{
+ if ( !rNew.Len() )
+ DELETEZ( pStrFilter );
+ else
+ {
+ if ( pStrFilter )
+ *pStrFilter = rNew;
+ else
+ pStrFilter = new String( rNew );
+ }
+}
+
+//static
+SvxGraphicPosition SvxBrushItem::WallpaperStyle2GraphicPos( WallpaperStyle eStyle )
+{
+ SvxGraphicPosition eResult;
+ // der Switch ist nicht der schnellste, dafuer aber am sichersten
+ switch( eStyle )
+ {
+ case WALLPAPER_NULL: eResult = GPOS_NONE; break;
+ case WALLPAPER_TILE: eResult = GPOS_TILED; break;
+ case WALLPAPER_CENTER: eResult = GPOS_MM; break;
+ case WALLPAPER_SCALE: eResult = GPOS_AREA; break;
+ case WALLPAPER_TOPLEFT: eResult = GPOS_LT; break;
+ case WALLPAPER_TOP: eResult = GPOS_MT; break;
+ case WALLPAPER_TOPRIGHT: eResult = GPOS_RT; break;
+ case WALLPAPER_LEFT: eResult = GPOS_LM; break;
+ case WALLPAPER_RIGHT: eResult = GPOS_RM; break;
+ case WALLPAPER_BOTTOMLEFT: eResult = GPOS_LB; break;
+ case WALLPAPER_BOTTOM: eResult = GPOS_MB; break;
+ case WALLPAPER_BOTTOMRIGHT: eResult = GPOS_RB; break;
+ default: eResult = GPOS_NONE;
+ }
+ return eResult;
+};
+
+//static
+WallpaperStyle SvxBrushItem::GraphicPos2WallpaperStyle( SvxGraphicPosition ePos )
+{
+ WallpaperStyle eResult;
+ switch( ePos )
+ {
+ case GPOS_NONE: eResult = WALLPAPER_NULL; break;
+ case GPOS_TILED: eResult = WALLPAPER_TILE; break;
+ case GPOS_MM: eResult = WALLPAPER_CENTER; break;
+ case GPOS_AREA: eResult = WALLPAPER_SCALE; break;
+ case GPOS_LT: eResult = WALLPAPER_TOPLEFT; break;
+ case GPOS_MT: eResult = WALLPAPER_TOP; break;
+ case GPOS_RT: eResult = WALLPAPER_TOPRIGHT; break;
+ case GPOS_LM: eResult = WALLPAPER_LEFT; break;
+ case GPOS_RM: eResult = WALLPAPER_RIGHT; break;
+ case GPOS_LB: eResult = WALLPAPER_BOTTOMLEFT; break;
+ case GPOS_MB: eResult = WALLPAPER_BOTTOM; break;
+ case GPOS_RB: eResult = WALLPAPER_BOTTOMRIGHT; break;
+ default: eResult = WALLPAPER_NULL;
+ }
+ return eResult;
+}
+
+
+SvxBrushItem::SvxBrushItem( const CntWallpaperItem& rItem, sal_uInt16 nWhich ) :
+ SfxPoolItem( nWhich ),
+ pImpl( new SvxBrushItem_Impl( 0 ) ),
+ bLoadAgain( sal_True ),
+ pStrLink(0),
+ pStrFilter(0)
+{
+ aColor = rItem.GetColor();
+
+ if( rItem.GetBitmapURL().Len() )
+ {
+ pStrLink = new String( rItem.GetBitmapURL() );
+ SetGraphicPos( WallpaperStyle2GraphicPos((WallpaperStyle)rItem.GetStyle() ) );
+ }
+}
+
+CntWallpaperItem* SvxBrushItem::CreateCntWallpaperItem() const
+{
+ CntWallpaperItem* pItem = new CntWallpaperItem( 0 );
+ pItem->SetColor( aColor.GetColor() );
+ pItem->SetStyle( GraphicPos2WallpaperStyle( GetGraphicPos() ) );
+ sal_Bool bLink = (pStrLink != 0);
+ if( bLink )
+ {
+ String aURL = *pStrLink;
+ pItem->SetBitmapURL( aURL );
+ }
+ if( pImpl->pGraphicObject )
+ DBG_ERRORFILE( "Don't know what to do with a graphic" );
+// pItem->SetGraphic( *pImpl->pGraphic, bLink );
+
+ return pItem;
+}
+
+
diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx
new file mode 100644
index 0000000000..8c951f3a44
--- /dev/null
+++ b/svx/source/items/grfitem.cxx
@@ -0,0 +1,221 @@
+/*************************************************************************
+ *
+ * $RCSfile: grfitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:20 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+#ifndef _SVX_GRFCROP_HXX
+#include <grfcrop.hxx>
+#endif
+#ifndef _SVX_ITEMTYPE_HXX //autogen
+#include <itemtype.hxx>
+#endif
+
+using namespace ::com::sun::star;
+
+//TYPEINIT1_AUTOFACTORY( SvxGrfCrop, SfxPoolItem )
+
+/******************************************************************************
+ * Implementierung class SwCropGrf
+ ******************************************************************************/
+
+SvxGrfCrop::SvxGrfCrop( USHORT nItemId )
+ : SfxPoolItem( nItemId ),
+ nLeft( 0 ), nRight( 0 ), nTop( 0 ), nBottom( 0 )
+{}
+
+SvxGrfCrop::SvxGrfCrop( sal_Int32 nL, sal_Int32 nR,
+ sal_Int32 nT, sal_Int32 nB, USHORT nItemId )
+ : SfxPoolItem( nItemId ),
+ nLeft( nL ), nRight( nR ), nTop( nT ), nBottom( nB )
+{}
+
+SvxGrfCrop::~SvxGrfCrop()
+{
+}
+
+int SvxGrfCrop::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "not equal attributes" );
+ return nLeft == ((const SvxGrfCrop&)rAttr).GetLeft() &&
+ nRight == ((const SvxGrfCrop&)rAttr).GetRight() &&
+ nTop == ((const SvxGrfCrop&)rAttr).GetTop() &&
+ nBottom == ((const SvxGrfCrop&)rAttr).GetBottom();
+}
+
+/*
+SfxPoolItem* SvxGrfCrop::Clone( SfxItemPool* ) const
+{
+ return new SvxGrfCrop( *this );
+}
+*/
+
+/*
+USHORT SvxGrfCrop::GetVersion( USHORT nFFVer ) const
+{
+ DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
+ SOFFICE_FILEFORMAT_40==nFFVer ||
+ SOFFICE_FILEFORMAT_NOW==nFFVer,
+ "SvxGrfCrop: exist a new fileformat?" );
+ return GRFCROP_VERSION_SWDEFAULT;
+}
+*/
+
+SfxPoolItem* SvxGrfCrop::Create( SvStream& rStrm, USHORT nVersion ) const
+{
+ INT32 top, left, right, bottom;
+ rStrm >> top >> left >> right >> bottom;
+
+ if( GRFCROP_VERSION_SWDEFAULT == nVersion )
+ top = -top, bottom = -bottom, left = -left, right = -right;
+
+ SvxGrfCrop* pNew = (SvxGrfCrop*)Clone();
+ pNew->SetLeft( left );
+ pNew->SetRight( right );
+ pNew->SetTop( top );
+ pNew->SetBottom( bottom );
+ return pNew;
+}
+
+
+SvStream& SvxGrfCrop::Store( SvStream& rStrm, USHORT nVersion ) const
+{
+ INT32 left = GetLeft(), right = GetRight(),
+ top = GetTop(), bottom = GetBottom();
+ if( GRFCROP_VERSION_SWDEFAULT == nVersion )
+ top = -top, bottom = -bottom, left = -left, right = -right;
+
+ rStrm << top << left << right << bottom;
+
+ return rStrm;
+}
+
+
+
+BOOL SvxGrfCrop::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+/* ????????
+ text::GraphicCrop aCrop;
+ aCrop.Left = TWIP_TO_MM100(nLeft);
+ aCrop.Right = TWIP_TO_MM100(nRight) ;
+ aCrop.Top = TWIP_TO_MM100(nTop) ;
+ aCrop.Bottom = TWIP_TO_MM100(nBottom) );
+ rVal.setValue( &aCrop, ::getCppuType((text::GraphicCrop*)0) );
+ ????????*/
+ return sal_True;
+}
+
+BOOL SvxGrfCrop::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Bool bRet = sal_False;
+/*
+ if(rVal.getValueType() == ::getCppuType((const text::GraphicCrop*)0))
+ {
+ const text::GraphicCrop* pCrop = (const text::GraphicCrop*)rVal.getValue();
+ nLeft = MM100_TO_TWIP(pCrop->Left );
+ nRight = MM100_TO_TWIP(pCrop->Right );
+ nTop = MM100_TO_TWIP(pCrop->Top );
+ nBottom = MM100_TO_TWIP(pCrop->Bottom);
+ bRet = sal_True;
+ }
+ else
+ //exception(wrong_type)
+ ;
+*/
+ return bRet;
+}
+
+SfxItemPresentation SvxGrfCrop::GetPresentation(
+ SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit,
+ String &rText, const International* pIntl ) const
+{
+ rText.Erase();
+ switch( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ {
+ ( rText.AssignAscii( "L: " )) += ::GetMetricText( GetLeft(),
+ eCoreUnit, SFX_MAPUNIT_MM );
+ ( rText.AppendAscii( " R: " )) += ::GetMetricText( GetRight(),
+ eCoreUnit, SFX_MAPUNIT_MM );
+ ( rText.AppendAscii( " T: " )) += ::GetMetricText( GetTop(),
+ eCoreUnit, SFX_MAPUNIT_MM );
+ ( rText.AppendAscii( " B: " )) += ::GetMetricText( GetBottom(),
+ eCoreUnit, SFX_MAPUNIT_MM );
+ }
+ break;
+
+ default:
+ ePres = SFX_ITEM_PRESENTATION_NONE;
+ break;
+ }
+ return ePres;
+}
+
+
+
+
diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx
new file mode 100644
index 0000000000..41fb261c71
--- /dev/null
+++ b/svx/source/items/hlnkitem.cxx
@@ -0,0 +1,398 @@
+/*************************************************************************
+ *
+ * $RCSfile: hlnkitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+
+#define _SVX_HLNKITEM_CXX
+
+#ifndef _SVX_SVXIDS_HRC
+#include <svxids.hrc>
+#endif
+#ifndef _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+
+#ifndef _MEMBERID_HRC
+#include <memberid.hrc>
+#endif
+
+#ifndef __SBX_SBXVARIABLE_HXX
+#include <svtools/sbxvar.hxx>
+#endif
+
+#include "hlnkitem.hxx"
+
+// -----------------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SvxHyperlinkItem, SfxPoolItem);
+
+// class SvxHyperlinkItem ------------------------------------------------
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+#define HYPERLINKFF_MARKER 0x599401FE
+
+SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+{
+ // store 'simple' data
+ // UNICODE: rStrm << sName;
+ rStrm.WriteByteString(sName);
+
+ // UNICODE: rStrm << sURL;
+ rStrm.WriteByteString(sURL);
+
+ // UNICODE: rStrm << sTarget;
+ rStrm.WriteByteString(sTarget);
+
+ rStrm << (sal_uInt32) eType;
+
+ // marker for versioninfo
+ rStrm << (sal_uInt32) HYPERLINKFF_MARKER;
+
+ // new data
+ // UNICODE: rStrm << sIntName;
+ rStrm.WriteByteString(sIntName);
+
+ // macro-events
+ rStrm << nMacroEvents;
+
+ // store macros
+ sal_uInt16 nCnt = pMacroTable ? (sal_uInt16)pMacroTable->Count() : 0;
+ sal_uInt16 nMax = nCnt;
+ if( nCnt )
+ {
+ for( SvxMacro* pMac = pMacroTable->First(); pMac; pMac = pMacroTable->Next() )
+ if( STARBASIC != pMac->GetScriptType() )
+ --nCnt;
+ }
+
+ rStrm << nCnt;
+
+ if( nCnt )
+ {
+ // 1. StarBasic-Macros
+ for( SvxMacro* pMac = pMacroTable->First(); pMac; pMac = pMacroTable->Next() )
+ {
+ if( STARBASIC == pMac->GetScriptType() )
+ {
+ rStrm << (sal_uInt16)pMacroTable->GetCurKey();
+
+ // UNICODE: rStrm << pMac->GetLibName();
+ rStrm.WriteByteString(pMac->GetLibName());
+
+ // UNICODE: rStrm << pMac->GetMacName();
+ rStrm.WriteByteString(pMac->GetMacName());
+ }
+ }
+ }
+
+ nCnt = nMax - nCnt;
+ rStrm << nCnt;
+ if( nCnt )
+ {
+ // 2. ::com::sun::star::script::JavaScript-Macros
+ for( SvxMacro* pMac = pMacroTable->First(); pMac; pMac = pMacroTable->Next() )
+ {
+ if( STARBASIC != pMac->GetScriptType() )
+ {
+ rStrm << (sal_uInt16)pMacroTable->GetCurKey();
+
+ // UNICODE: rStrm << pMac->GetLibName();
+ rStrm.WriteByteString(pMac->GetLibName());
+
+ // UNICODE: rStrm << pMac->GetMacName();
+ rStrm.WriteByteString(pMac->GetMacName());
+
+ rStrm << (sal_uInt16)pMac->GetScriptType();
+ }
+ }
+ }
+
+ return rStrm;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 nItemVersion ) const
+{
+ SvxHyperlinkItem* pNew = new SvxHyperlinkItem( Which() );
+ sal_uInt32 nType;
+
+ // simple data-types
+ // UNICODE: rStrm >> pNew->sName;
+ rStrm.ReadByteString(pNew->sName);
+
+ // UNICODE: rStrm >> pNew->sURL;
+ rStrm.ReadByteString(pNew->sURL);
+
+ // UNICODE: rStrm >> pNew->sTarget;
+ rStrm.ReadByteString(pNew->sTarget);
+
+ rStrm >> nType;
+ pNew->eType = (SvxLinkInsertMode) nType;
+
+ sal_uInt32 nPos = rStrm.Tell();
+ sal_uInt32 nMarker;
+ rStrm >> nMarker;
+ if ( nMarker == HYPERLINKFF_MARKER )
+ {
+ // new data
+ // UNICODE: rStrm >> pNew->sIntName;
+ rStrm.ReadByteString(pNew->sIntName);
+
+ // macro-events
+ rStrm >> pNew->nMacroEvents;
+
+ // macros
+ sal_uInt16 nCnt;
+ rStrm >> nCnt;
+ while( nCnt-- )
+ {
+ sal_uInt16 nCurKey;
+ String aLibName, aMacName;
+
+ rStrm >> nCurKey;
+ // UNICODE: rStrm >> aLibName;
+ rStrm.ReadByteString(aLibName);
+
+ // UNICODE: rStrm >> aMacName;
+ rStrm.ReadByteString(aMacName);
+
+ pNew->SetMacro( nCurKey, SvxMacro( aMacName, aLibName, STARBASIC ) );
+ }
+
+ rStrm >> nCnt;
+ while( nCnt-- )
+ {
+ sal_uInt16 nCurKey, nScriptType;
+ String aLibName, aMacName;
+
+ rStrm >> nCurKey;
+
+ // UNICODE: rStrm >> aLibName;
+ rStrm.ReadByteString(aLibName);
+
+ // UNICODE: rStrm >> aMacName;
+ rStrm.ReadByteString(aMacName);
+
+ rStrm >> nScriptType;
+
+ pNew->SetMacro( nCurKey, SvxMacro( aMacName, aLibName,
+ (ScriptType)nScriptType ) );
+ }
+ }
+ else
+ rStrm.Seek( nPos );
+
+ return pNew;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+SvxHyperlinkItem::SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem ):
+ SfxPoolItem(rHyperlinkItem)
+{
+ sName = rHyperlinkItem.sName;
+ sURL = rHyperlinkItem.sURL;
+ sTarget = rHyperlinkItem.sTarget;
+ eType = rHyperlinkItem.eType;
+ sIntName = rHyperlinkItem.sIntName;
+ nMacroEvents = rHyperlinkItem.nMacroEvents;
+
+ if( rHyperlinkItem.GetMacroTbl() )
+ pMacroTable = new SvxMacroTableDtor( *rHyperlinkItem.GetMacroTbl() );
+ else
+ pMacroTable=NULL;
+
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+SvxHyperlinkItem::SvxHyperlinkItem( sal_uInt16 nWhich, String& rName, String& rURL,
+ String& rTarget, String& rIntName, SvxLinkInsertMode eTyp,
+ sal_uInt16 nEvents, SvxMacroTableDtor *pMacroTbl ):
+ SfxPoolItem (nWhich),
+ sName (rName),
+ sURL (rURL),
+ sTarget (rTarget),
+ eType (eTyp),
+ sIntName (rIntName),
+ nMacroEvents (nEvents)
+{
+ if (pMacroTbl)
+ pMacroTable = new SvxMacroTableDtor ( *pMacroTbl );
+ else
+ pMacroTable=NULL;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+SfxPoolItem* SvxHyperlinkItem::Clone( SfxItemPool* ) const
+{
+ return new SvxHyperlinkItem( *this );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+int SvxHyperlinkItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+
+ const SvxHyperlinkItem& rItem = (const SvxHyperlinkItem&) rAttr;
+
+ sal_Bool bRet = ( sName == rItem.sName &&
+ sURL == rItem.sURL &&
+ sTarget == rItem.sTarget &&
+ eType == rItem.eType &&
+ sIntName == rItem.sIntName &&
+ nMacroEvents == rItem.nMacroEvents);
+ if (!bRet)
+ return sal_False;
+
+ const SvxMacroTableDtor* pOther = ((SvxHyperlinkItem&)rAttr).pMacroTable;
+ if( !pMacroTable )
+ return ( !pOther || !pOther->Count() );
+ if( !pOther )
+ return 0 == pMacroTable->Count();
+
+ const SvxMacroTableDtor& rOwn = *pMacroTable;
+ const SvxMacroTableDtor& rOther = *pOther;
+
+ // Anzahl unterschiedlich => auf jeden Fall ungleich
+ if( rOwn.Count() != rOther.Count() )
+ return sal_False;
+
+ // einzeln vergleichen; wegen Performance ist die Reihenfolge wichtig
+ for( sal_uInt16 nNo = 0; nNo < rOwn.Count(); ++nNo )
+ {
+ const SvxMacro *pOwnMac = rOwn.GetObject(nNo);
+ const SvxMacro *pOtherMac = rOther.GetObject(nNo);
+ if ( rOwn.GetKey(pOwnMac) != rOther.GetKey(pOtherMac) ||
+ pOwnMac->GetLibName() != pOtherMac->GetLibName() ||
+ pOwnMac->GetMacName() != pOtherMac->GetMacName() )
+ return sal_False;
+ }
+
+ return sal_True;
+}
+
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+void SvxHyperlinkItem::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro )
+{
+ if( nEvent < EVENT_SFX_START )
+ {
+ switch( nEvent )
+ {
+ case HYPERDLG_EVENT_MOUSEOVER_OBJECT:
+ nEvent = SFX_EVENT_MOUSEOVER_OBJECT;
+ break;
+ case HYPERDLG_EVENT_MOUSECLICK_OBJECT:
+ nEvent = SFX_EVENT_MOUSECLICK_OBJECT;
+ break;
+ case HYPERDLG_EVENT_MOUSEOUT_OBJECT:
+ nEvent = SFX_EVENT_MOUSEOUT_OBJECT;
+ break;
+ }
+ }
+
+ if( !pMacroTable )
+ pMacroTable = new SvxMacroTableDtor;
+
+ SvxMacro *pOldMacro;
+ if( 0 != ( pOldMacro = pMacroTable->Get( nEvent )) )
+ {
+ delete pOldMacro;
+ pMacroTable->Replace( nEvent, new SvxMacro( rMacro ) );
+ }
+ else
+ pMacroTable->Insert( nEvent, new SvxMacro( rMacro ) );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+void SvxHyperlinkItem::SetMacroTable( const SvxMacroTableDtor& rTbl )
+{
+ if ( pMacroTable )
+ delete pMacroTable;
+
+ pMacroTable = new SvxMacroTableDtor ( rTbl );
+}
+
+
diff --git a/svx/source/items/itemtype.cxx b/svx/source/items/itemtype.cxx
new file mode 100644
index 0000000000..4cc9417f18
--- /dev/null
+++ b/svx/source/items/itemtype.cxx
@@ -0,0 +1,283 @@
+/*************************************************************************
+ *
+ * $RCSfile: itemtype.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _LIST_HXX //autogen
+#include <tools/list.hxx>
+#endif
+#ifndef _SV_OUTDEV_HXX
+#include <vcl/outdev.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#pragma hdrstop
+
+#include "svxids.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+
+#include "xtable.hxx"
+#include "drawitem.hxx"
+#include "itemtype.hxx"
+
+// -----------------------------------------------------------------------
+
+XubString GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit )
+{
+ sal_Bool bNeg = sal_False;
+ long nRet = 0;
+ XubString sRet;
+
+ if ( nVal < 0 )
+ {
+ bNeg = sal_True;
+ nVal *= -1;
+ }
+
+ switch ( eDestUnit )
+ {
+ case SFX_MAPUNIT_100TH_MM:
+ case SFX_MAPUNIT_10TH_MM:
+ case SFX_MAPUNIT_MM:
+ case SFX_MAPUNIT_CM:
+ {
+ nRet = (long)OutputDevice::LogicToLogic(
+ nVal, (MapUnit)eSrcUnit, (MapUnit)SFX_MAPUNIT_100TH_MM );
+
+ switch ( eDestUnit )
+ {
+ case SFX_MAPUNIT_100TH_MM: nRet *= 1000; break;
+ case SFX_MAPUNIT_10TH_MM: nRet *= 100; break;
+ case SFX_MAPUNIT_MM: nRet *= 10; break;
+ }
+ break;
+ }
+
+ case SFX_MAPUNIT_1000TH_INCH:
+ case SFX_MAPUNIT_100TH_INCH:
+ case SFX_MAPUNIT_10TH_INCH:
+ case SFX_MAPUNIT_INCH:
+ {
+ nRet = (long)OutputDevice::LogicToLogic(
+ nVal, (MapUnit)eSrcUnit, (MapUnit)SFX_MAPUNIT_1000TH_INCH );
+
+ switch ( eDestUnit )
+ {
+ case SFX_MAPUNIT_1000TH_INCH: nRet *= 1000; break;
+ case SFX_MAPUNIT_100TH_INCH: nRet *= 100; break;
+ case SFX_MAPUNIT_10TH_INCH: nRet *= 10; break;
+ }
+ break;
+ }
+
+ case SFX_MAPUNIT_POINT:
+ case SFX_MAPUNIT_TWIP:
+ case SFX_MAPUNIT_PIXEL:
+ return String::CreateFromInt32( (long)OutputDevice::LogicToLogic(
+ nVal, (MapUnit)eSrcUnit, (MapUnit)eDestUnit ));
+
+ default:
+ DBG_ERROR( "not supported mapunit" );
+ return sRet;
+ }
+
+ if ( SFX_MAPUNIT_CM == eDestUnit || SFX_MAPUNIT_INCH == eDestUnit )
+ {
+ long nMod = nRet % 10;
+
+ if ( nMod > 4 )
+ nRet += 10 - nMod;
+ else if ( nMod > 0 )
+ nRet -= nMod;
+ }
+
+ if ( bNeg )
+ sRet += sal_Unicode('-');
+
+ long nDiff = 1000;
+ for( int nDigits = 4; nDigits; --nDigits, nDiff /= 10 )
+ {
+ if ( nRet < nDiff )
+ sRet += sal_Unicode('0');
+ else
+ sRet += String::CreateFromInt32( nRet / nDiff );
+ nRet %= nDiff;
+ if( 4 == nDigits )
+ {
+ sRet += sal_Unicode(',');
+ if( !nRet )
+ {
+ sRet += sal_Unicode('0');
+ break;
+ }
+ }
+ else if( !nRet )
+ break;
+ }
+ return sRet;
+}
+
+// -----------------------------------------------------------------------
+
+XubString GetSvxString( sal_uInt16 nId )
+{
+ return SVX_RESSTR( nId );
+}
+
+#ifndef SVX_LIGHT
+
+// -----------------------------------------------------------------------
+
+XubString GetColorString( const Color& rCol )
+{
+ const SfxPoolItem* pItem = NULL;
+ XColorTable* pCol = NULL;
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ if ( pSh && ( pItem = pSh->GetItem( SID_COLOR_TABLE ) ) )
+ pCol = ( (SvxColorTableItem*)pItem )->GetColorTable();
+
+ XubString sStr;
+
+ FASTBOOL bFound = sal_False;
+ ColorData nColData =
+ RGB_COLORDATA( rCol.GetRed(), rCol.GetGreen(), rCol.GetBlue() );
+ sal_uInt16 nColor = 0, nColCount = 16;
+
+ static ColorData aColAry[] = {
+ COL_BLACK, COL_BLUE, COL_GREEN, COL_CYAN,
+ COL_RED, COL_MAGENTA, COL_BROWN, COL_GRAY,
+ COL_LIGHTGRAY, COL_LIGHTBLUE, COL_LIGHTGREEN, COL_LIGHTCYAN,
+ COL_LIGHTRED, COL_LIGHTMAGENTA, COL_YELLOW, COL_WHITE };
+
+ while ( !bFound && nColor < nColCount )
+ {
+ if ( aColAry[nColor] == nColData )
+ bFound = sal_True;
+ else
+ nColor++;
+ }
+
+ if ( nColor < nColCount )
+ sStr = SVX_RESSTR( RID_SVXITEMS_COLOR_BEGIN + nColor + 1 );
+
+ if ( !sStr.Len() )
+ {
+ sStr.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "RGB" ));
+ sStr += sal_Unicode('(');
+ sStr += String::CreateFromInt32( rCol.GetRed() );
+ sStr += cpDelim;
+ sStr += String::CreateFromInt32( rCol.GetGreen() );
+ sStr += cpDelim;
+ sStr += String::CreateFromInt32( rCol.GetBlue() );
+ sStr += sal_Unicode(')');
+ }
+ return sStr;
+}
+
+#endif
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 GetMetricId( SfxMapUnit eUnit )
+{
+ sal_uInt16 nId = RID_SVXITEMS_METRIC_MM;
+
+ switch ( eUnit )
+ {
+ case SFX_MAPUNIT_100TH_MM:
+ case SFX_MAPUNIT_10TH_MM:
+ case SFX_MAPUNIT_MM:
+ nId = RID_SVXITEMS_METRIC_MM;
+ break;
+
+ case SFX_MAPUNIT_CM:
+ nId = RID_SVXITEMS_METRIC_CM;
+ break;
+
+ case SFX_MAPUNIT_1000TH_INCH:
+ case SFX_MAPUNIT_100TH_INCH:
+ case SFX_MAPUNIT_10TH_INCH:
+ case SFX_MAPUNIT_INCH:
+ nId = RID_SVXITEMS_METRIC_INCH;
+ break;
+
+ case SFX_MAPUNIT_POINT:
+ nId = RID_SVXITEMS_METRIC_POINT;
+ break;
+
+ case SFX_MAPUNIT_TWIP:
+ nId = RID_SVXITEMS_METRIC_TWIP;
+ break;
+
+ case SFX_MAPUNIT_PIXEL:
+ nId = RID_SVXITEMS_METRIC_PIXEL;
+ break;
+
+ default:
+ DBG_ERROR( "not supported mapunit" );
+ }
+ return nId;
+}
+
+
diff --git a/svx/source/items/makefile.mk b/svx/source/items/makefile.mk
new file mode 100644
index 0000000000..bb5b8d9bca
--- /dev/null
+++ b/svx/source/items/makefile.mk
@@ -0,0 +1,140 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning 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
+#ENABLE_EXCEPTIONS=TRUE
+
+PRJNAME=svx
+TARGET=items
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+SRS1NAME=svxitems
+SRC1FILES = \
+ svxerr.src \
+ svxitems.src
+
+SLOFILES= \
+ $(SLO)$/frmitems.obj \
+ $(SLO)$/paraitem.obj \
+ $(SLO)$/textitem.obj \
+ $(SLO)$/postattr.obj \
+ $(SLO)$/flditem.obj \
+ $(SLO)$/hlnkitem.obj \
+ $(SLO)$/svxfont.obj \
+ $(SLO)$/pageitem.obj \
+ $(SLO)$/paperinf.obj \
+ $(SLO)$/drawitem.obj \
+ $(SLO)$/algitem.obj \
+ $(SLO)$/itemtype.obj \
+ $(SLO)$/rotmodit.obj \
+ $(SLO)$/numinf.obj \
+ $(SLO)$/svxerr.obj \
+ $(SLO)$/numfmtsh.obj \
+ $(SLO)$/zoomitem.obj \
+ $(SLO)$/chrtitem.obj \
+ $(SLO)$/bulitem.obj \
+ $(SLO)$/e3ditem.obj \
+ $(SLO)$/numitem.obj \
+ $(SLO)$/grfitem.obj \
+ $(SLO)$/svxempty.obj
+
+EXCEPTIONSFILES= \
+ $(SLO)$/paraitem.obj \
+ $(OBJ)$/sxl_paraitem.obj
+
+SVXLIGHTOBJFILES= \
+ $(OBJ)$/frmitems.obj \
+ $(OBJ)$/paraitem.obj \
+ $(OBJ)$/textitem.obj \
+ $(OBJ)$/postattr.obj \
+ $(OBJ)$/flditem.obj \
+ $(OBJ)$/svxfont.obj \
+ $(OBJ)$/pageitem.obj \
+ $(OBJ)$/paperinf.obj \
+ $(OBJ)$/drawitem.obj \
+ $(OBJ)$/algitem.obj \
+ $(OBJ)$/itemtype.obj \
+ $(OBJ)$/rotmodit.obj \
+ $(OBJ)$/numinf.obj \
+ $(OBJ)$/svxerr.obj \
+ $(OBJ)$/numfmtsh.obj \
+ $(OBJ)$/zoomitem.obj \
+ $(OBJ)$/chrtitem.obj \
+ $(OBJ)$/bulitem.obj \
+ $(OBJ)$/e3ditem.obj \
+ $(OBJ)$/numitem.obj
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
new file mode 100644
index 0000000000..fe7d07e3d6
--- /dev/null
+++ b/svx/source/items/numfmtsh.cxx
@@ -0,0 +1,1835 @@
+/*************************************************************************
+ *
+ * $RCSfile: numfmtsh.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_COLOR_HXX
+#include <vcl/color.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_NUMFMTSH_CXX
+#define _SVSTDARR_STRINGSDTOR
+
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+
+#define _ZFORLIST_DECLARE_TABLE
+#ifndef _ZFORLIST_HXX //autogen
+#include <svtools/zforlist.hxx>
+#endif
+
+#ifndef _ZFORMAT_HXX //autogen
+#include <svtools/zformat.hxx>
+#endif
+
+#ifndef _SVX_LANGTAB_HXX //autogen
+#include <langtab.hxx>
+#endif
+
+#include "numfmtsh.hxx"
+// class SvxNumberFormatShell --------------------------------------------
+
+const double SvxNumberFormatShell::DEFAULT_NUMVALUE = 1234.56789;
+
+SV_IMPL_PTRARR( NfShCurrencyEntries, NfCurrencyEntry* );
+
+// -----------------------------------------------------------------------
+
+
+
+SvxNumberFormatShell* SvxNumberFormatShell::Create( SvNumberFormatter* pNumFormatter,
+ sal_uInt32 nFormatKey,
+ SvxNumberValueType eNumValType,
+ const String& rNumStr )
+{
+ return new SvxNumberFormatShell(pNumFormatter,nFormatKey,
+ eNumValType,rNumStr );
+}
+
+SvxNumberFormatShell* SvxNumberFormatShell::Create( SvNumberFormatter* pNumFormatter,
+ sal_uInt32 nFormatKey,
+ SvxNumberValueType eNumValType,
+ double nNumVal )
+{
+ return new SvxNumberFormatShell(pNumFormatter,nFormatKey,
+ eNumValType,nNumVal );
+}
+
+// -----------------------------------------------------------------------
+
+#define _INIT \
+ pFormatter ( pNumFormatter ), \
+ pCurFmtTable ( NULL ), \
+ nCurFormatKey ( nFormatKey ), \
+ nInitFormatKey ( nFormatKey ), \
+ eValType ( eNumValType ), \
+ pCurCurrencyEntry(NULL), \
+ bBankingSymbol (sal_False), \
+ nCurCurrencyEntryPos((sal_uInt16) SELPOS_NONE), \
+ bUndoAddList ( sal_True )
+
+// -----------------------------------------------------------------------
+
+SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
+ sal_uInt32 nFormatKey,
+ SvxNumberValueType eNumValType,
+ const String& rNumStr )
+ : _INIT
+{
+ nValNum = DEFAULT_NUMVALUE;
+
+ switch ( eValType )
+ {
+ case SVX_VALUE_TYPE_STRING:
+ aValStr = rNumStr;
+ break;
+ case SVX_VALUE_TYPE_NUMBER:
+ case SVX_VALUE_TYPE_UNDEFINED:
+ default:
+ aValStr.Erase();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
+ sal_uInt32 nFormatKey,
+ SvxNumberValueType eNumValType,
+ double nNumVal )
+ : _INIT
+{
+ aValStr.Erase();
+
+ switch ( eValType )
+ {
+ case SVX_VALUE_TYPE_NUMBER:
+ nValNum = nNumVal;
+ break;
+ case SVX_VALUE_TYPE_STRING:
+ case SVX_VALUE_TYPE_UNDEFINED:
+ default:
+ nValNum = DEFAULT_NUMVALUE;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SvxNumberFormatShell::~SvxNumberFormatShell()
+{
+ /*
+ * An dieser Stelle wird abhaengig davon, ob die
+ * hinzugefuegten, benutzerdefinierten als gueltig
+ * erklaert wurden (ValidateNewEntries()), die
+ * Add-Liste wieder aus dem Zahlenformatierer entfernt.
+ *
+ * Loeschen von Formaten aus dem Formatierer passiert
+ * aus Undo-Gruenden nur in der aufrufenden Instanz.
+ */
+
+ if ( bUndoAddList )
+ {
+ // Hinzugefuegte Formate sind nicht gueltig:
+ // => wieder entfernen:
+
+ for ( sal_uInt16 i = 0; i < aAddList.Count(); ++i )
+ pFormatter->DeleteEntry( aAddList[i] );
+ }
+
+ //--------------------------------
+ // Add-/Remove-Listen leerraeumen:
+ //--------------------------------
+ aAddList.Remove( 0, aAddList.Count() );
+ aDelList.Remove( 0, aAddList.Count() );
+
+ if(aCurrencyFormatList.Count()>0)
+ aCurrencyFormatList.DeleteAndDestroy(0,aCurrencyFormatList.Count());
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt32 SvxNumberFormatShell::GetUpdateDataCount() const
+{
+ return aDelList.Count();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberFormatShell::GetUpdateData( sal_uInt32* pDelArray, const sal_uInt32 nSize )
+{
+ const sal_uInt32 nCount = aDelList.Count();
+
+ DBG_ASSERT( pDelArray && ( nSize == nCount ), "Array nicht initialisiert!" );
+
+ if ( pDelArray && ( nSize == nCount ) )
+ for ( sal_uInt16 i = 0; i < aDelList.Count(); ++i )
+ *pDelArray++ = aDelList[i];
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberFormatShell::CategoryChanged( sal_uInt16 nCatLbPos,
+ short& rFmtSelPos,
+ SvStrings& rFmtEntries )
+{
+ PosToCategory_Impl( nCatLbPos, nCurCategory );
+ pCurFmtTable = &( pFormatter->GetEntryTable( nCurCategory,
+ nCurFormatKey,
+ eCurLanguage ) );
+ rFmtSelPos = FillEntryList_Impl( rFmtEntries );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberFormatShell::LanguageChanged( LanguageType eLangType,
+ short& rFmtSelPos,
+ SvStrings& rFmtEntries )
+{
+ eCurLanguage = eLangType;
+ pCurFmtTable = &(pFormatter->ChangeCL( nCurCategory,
+ nCurFormatKey,
+ eCurLanguage ) );
+ rFmtSelPos = FillEntryList_Impl( rFmtEntries );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberFormatShell::FormatChanged( sal_uInt16 nFmtLbPos,
+ String& rPreviewStr,
+ Color& rFontColor )
+{
+ //nCurFormatKey = pCurFmtTable->GetKey( pCurFmtTable->GetObject( nFmtLbPos ) );
+
+ if(nFmtLbPos<aCurEntryList.Count())
+ {
+ nCurFormatKey=aCurEntryList[nFmtLbPos];
+
+ if(nCurFormatKey!=NUMBERFORMAT_ENTRY_NOT_FOUND)
+ {
+ GetPreviewString_Impl( rPreviewStr, rFontColor );
+ }
+ else if(nCurCategory==NUMBERFORMAT_CURRENCY)
+ {
+ if(nFmtLbPos<aCurrencyFormatList.Count())
+ {
+ //nCurFormatKey=nFmtLbPos;
+ MakePrevStringFromVal(*aCurrencyFormatList[nFmtLbPos],
+ rPreviewStr,rFontColor,nValNum);
+ }
+ }
+ }
+}
+// -----------------------------------------------------------------------
+
+sal_Bool SvxNumberFormatShell::AddFormat( String& rFormat, sal_uInt32& rErrPos,
+ sal_uInt16& rCatLbSelPos, short& rFmtSelPos,
+ SvStrings& rFmtEntries )
+{
+ sal_Bool bInserted = sal_False;
+ sal_uInt32 nAddKey = pFormatter->GetEntryKey( rFormat, eCurLanguage );
+
+ if ( nAddKey != NUMBERFORMAT_ENTRY_NOT_FOUND ) // bereits vorhanden?
+ {
+ if ( IsRemoved_Impl( nAddKey ) )
+ {
+ // Key suchen und loeschen
+ sal_Bool bFound = sal_False;
+ sal_uInt16 nAt = 0;
+
+ for ( sal_uInt16 i = 0; !bFound && i < aDelList.Count(); ++i )
+ {
+ if ( aDelList[i] == nAddKey )
+ {
+ bFound = sal_True;
+ nAt = i;
+ }
+ }
+ DBG_ASSERT( bFound, "Key not found" );
+ aDelList.Remove( nAt );
+ bInserted = sal_True;
+ }
+ else
+ DBG_ERROR( "Doppeltes Format!" );
+ }
+ else // neues Format
+ {
+ xub_StrLen nErrPos = (xub_StrLen)rErrPos;
+ bInserted = pFormatter->PutEntry( rFormat, nErrPos,
+ nCurCategory, nAddKey,
+ eCurLanguage );
+ rErrPos = sal_uInt32(nErrPos);
+ }
+
+ if ( bInserted ) // eingefuegt
+ {
+ nCurFormatKey = nAddKey;
+ DBG_ASSERT( !IsAdded_Impl( nCurFormatKey ), "Doppeltes Format!" );
+ aAddList.Insert( nCurFormatKey, aAddList.Count() );
+
+ // aktuelle Tabelle holen
+ pCurFmtTable = &(pFormatter->GetEntryTable( nCurCategory,
+ nCurFormatKey,
+ eCurLanguage ));
+ nCurCategory=pFormatter->GetType(nAddKey); //@@ ???
+ CategoryToPos_Impl( nCurCategory, rCatLbSelPos );
+ rFmtSelPos = FillEntryList_Impl( rFmtEntries );
+ }
+ else if ( rErrPos != 0 ) // Syntaxfehler
+ ;
+ else // Doppelt einfuegen nicht moeglich
+ DBG_ERROR( "Doppeltes Format!" ); // oder doch?
+
+ return bInserted;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxNumberFormatShell::RemoveFormat( const String& rFormat,
+ sal_uInt16& rCatLbSelPos,
+ short& rFmtSelPos,
+ SvStrings& rFmtEntries )
+{
+ sal_uInt32 nDelKey = pFormatter->GetEntryKey( rFormat, eCurLanguage );
+
+ DBG_ASSERT( nDelKey != NUMBERFORMAT_ENTRY_NOT_FOUND, "Eintrag nicht gefunden!" );
+ DBG_ASSERT( !IsRemoved_Impl( nDelKey ), "Eintrag bereits geloescht!" );
+
+ if ( (nDelKey != NUMBERFORMAT_ENTRY_NOT_FOUND) && !IsRemoved_Impl( nDelKey ) )
+ {
+ aDelList.Insert( nDelKey, aDelList.Count() );
+
+ if ( IsAdded_Impl( nDelKey ) )
+ {
+ // Key suchen und loeschen
+ sal_Bool bFound = sal_False;
+ sal_uInt16 nAt = 0;
+
+ for ( sal_uInt16 i = 0; !bFound && i < aAddList.Count(); ++i )
+ {
+ if ( aAddList[i] == nDelKey )
+ {
+ bFound = sal_True;
+ nAt = i;
+ }
+ }
+ DBG_ASSERT( bFound, "Key not found" );
+ aAddList.Remove( nAt );
+ }
+
+ nCurCategory=pFormatter->GetType(nDelKey); //@@ 01.10.97
+ pCurFmtTable = &(pFormatter->GetEntryTable( nCurCategory,
+ nCurFormatKey,
+ eCurLanguage ));
+
+ nCurFormatKey=pFormatter->GetStandardFormat(nCurCategory,
+ eCurLanguage );
+
+ CategoryToPos_Impl( nCurCategory, rCatLbSelPos );
+ rFmtSelPos = FillEntryList_Impl( rFmtEntries );
+ //rFmtSelPos = (short) nCurFormatKey; //@@ 01.10.97
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberFormatShell::MakeFormat( String& rFormat,
+ sal_Bool bThousand, sal_Bool bNegRed,
+ sal_uInt16 nPrecision, sal_uInt16 nLeadingZeroes,
+ sal_uInt16 nCurrencyPos)
+{
+ if(aCurrencyFormatList.Count()>nCurrencyPos)
+ {
+ sal_uInt32 rErrPos=0;
+ sal_uInt16 rCatLbSelPos=0;
+ short rFmtSelPos=0;
+ SvStrings aFmtEList;
+
+ sal_uInt32 nFound = pFormatter->TestNewString( *aCurrencyFormatList[nCurrencyPos], eCurLanguage );
+
+ if ( nFound == NUMBERFORMAT_ENTRY_NOT_FOUND )
+ {
+ AddFormat( *aCurrencyFormatList[nCurrencyPos],rErrPos,rCatLbSelPos,
+ rFmtSelPos,aFmtEList);
+ }
+
+ if(rErrPos==0)
+ {
+ pFormatter->GenerateFormat( rFormat, nCurFormatKey,
+ eCurLanguage,
+ bThousand, bNegRed,
+ nPrecision, nLeadingZeroes );
+ }
+ aFmtEList.DeleteAndDestroy(0,aFmtEList.Count());
+ }
+ else
+ {
+ pFormatter->GenerateFormat( rFormat, nCurFormatKey,
+ eCurLanguage,
+ bThousand, bNegRed,
+ nPrecision, nLeadingZeroes );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberFormatShell::GetOptions( const String& rFormat,
+ sal_Bool& rThousand,
+ sal_Bool& rNegRed,
+ sal_uInt16& rPrecision,
+ sal_uInt16& rLeadingZeroes,
+ sal_uInt16& rCatLbPos )
+{
+
+ sal_uInt32 nFmtKey = pFormatter->GetEntryKey( rFormat, eCurLanguage );
+
+ if(nFmtKey != NUMBERFORMAT_ENTRY_NOT_FOUND)
+ {
+ if ( nFmtKey != NUMBERFORMAT_ENTRY_NOT_FOUND )
+ {
+ pFormatter->GetFormatSpecialInfo( nFmtKey,
+ rThousand, rNegRed,
+ rPrecision, rLeadingZeroes );
+
+ CategoryToPos_Impl( pFormatter->GetType( nFmtKey ), rCatLbPos );
+ }
+ else
+ rCatLbPos = CAT_USERDEFINED;
+ }
+ else
+ {
+ sal_Bool bTestBanking=sal_False;
+ sal_uInt16 nPos=FindCurrencyTableEntry(rFormat, bTestBanking );
+
+ if(IsInTable(nPos,bTestBanking,rFormat) &&
+ pFormatter->GetFormatSpecialInfo( rFormat,rThousand, rNegRed,
+ rPrecision, rLeadingZeroes,eCurLanguage)==0)
+ {
+ rCatLbPos = CAT_CURRENCY;
+ }
+ else
+ rCatLbPos = CAT_USERDEFINED;
+ }
+
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberFormatShell::MakePreviewString( const String& rFormatStr,
+ String& rPreviewStr,
+ Color& rFontColor )
+{
+ Color* pColor = NULL;
+
+ pFormatter->GetPreviewString( rFormatStr, nValNum, rPreviewStr,
+ &pColor, eCurLanguage );
+ if ( pColor )
+ rFontColor = *pColor;
+ else
+ rFontColor = Color( COL_BLACK );
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxNumberFormatShell::IsUserDefined( const String& rFmtString )
+{
+ sal_uInt32 nFound = pFormatter->GetEntryKey( rFmtString, eCurLanguage );
+
+ sal_Bool bFlag=sal_False;
+ if ( nFound != NUMBERFORMAT_ENTRY_NOT_FOUND )
+ {
+ bFlag=pFormatter->IsUserDefined( rFmtString, eCurLanguage );
+
+ if(bFlag)
+ {
+ const SvNumberformat* pNumEntry = pFormatter->GetEntry(nFound);
+
+ if(pNumEntry!=NULL && pNumEntry->HasNewCurrency())
+ {
+ sal_Bool bTestBanking;
+ sal_uInt16 nPos=FindCurrencyTableEntry(rFmtString,bTestBanking);
+ bFlag=!IsInTable(nPos,bTestBanking,rFmtString);
+ }
+ }
+ }
+ return bFlag;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxNumberFormatShell::FindEntry( const String& rFmtString, sal_uInt32* pAt /* = NULL */ )
+{
+ sal_Bool bRes=sal_False;
+ sal_uInt32 nFound = pFormatter->TestNewString( rFmtString, eCurLanguage );
+
+ if ( nFound == NUMBERFORMAT_ENTRY_NOT_FOUND )
+ {
+ sal_Bool bTestBanking=sal_False;
+ sal_uInt16 nPos=FindCurrencyTableEntry(rFmtString, bTestBanking );
+
+ if(IsInTable(nPos,bTestBanking,rFmtString))
+ {
+ nFound=NUMBERFORMAT_ENTRY_NEW_CURRENCY;
+ bRes=sal_True;
+ }
+ }
+ else
+ {
+ bRes=!IsRemoved_Impl( nFound );
+ }
+
+ if ( pAt )
+ *pAt = nFound;
+
+ return bRes;
+}
+
+
+// -----------------------------------------------------------------------
+
+void SvxNumberFormatShell::GetInitSettings( sal_uInt16& nCatLbPos,
+ LanguageType& rLangType,
+ sal_uInt16& nFmtLbSelPos,
+ SvStrings& rFmtEntries,
+ String& rPrevString,
+ Color& rPrevColor )
+{
+ // -------------------------------------------------------------------
+ // Vorbedingung: Zahlenformatierer gefunden
+ DBG_ASSERT( pFormatter != NULL, "Zahlenformatierer nicht gefunden!" );
+
+ sal_uInt16 nCount = 0;
+ short nSelPos = SELPOS_NONE;
+ SvNumberFormatTable* pFmtTable = NULL;
+
+ // Sonderbehandlung fuer undefiniertes Zahlenformat:
+ if ( (eValType == SVX_VALUE_TYPE_UNDEFINED) && (nCurFormatKey == 0) )
+ PosToCategory_Impl( CAT_ALL, nCurCategory ); // Kategorie = Alle
+ else
+ nCurCategory = NUMBERFORMAT_UNDEFINED; // Kategorie = Undefiniert
+
+ pCurFmtTable = &(pFormatter->GetFirstEntryTable( nCurCategory,
+ nCurFormatKey,
+ eCurLanguage ));
+
+
+
+ CategoryToPos_Impl( nCurCategory, nCatLbPos );
+ rLangType = eCurLanguage;
+
+ nSelPos = FillEntryList_Impl( rFmtEntries );
+
+ DBG_ASSERT( nSelPos != SELPOS_NONE, "Leere Formatliste!" );
+
+ nFmtLbSelPos = (nSelPos != SELPOS_NONE) ? (sal_uInt16)nSelPos : 0;
+ GetPreviewString_Impl( rPrevString, rPrevColor );
+}
+
+// -----------------------------------------------------------------------
+
+short SvxNumberFormatShell::FillEntryList_Impl( SvStrings& rList )
+{
+ /* Erstellen einer aktuellen Liste von Format-Eintraegen.
+ * Rueckgabewert ist die Listenposition des aktuellen Formates.
+ * Ist die Liste leer oder gibt es kein aktuelles Format,
+ * so wird SELPOS_NONE geliefert.
+ */
+ short nSelPos=0;
+ aCurEntryList.Remove(nSelPos,aCurEntryList.Count());
+ sal_uInt16 nPrivCat;
+ nSelPos=SELPOS_NONE;
+
+ if(nCurCategory==NUMBERFORMAT_ALL)
+ {
+ FillEListWithStd_Impl(rList,CAT_NUMBER,nSelPos);
+ FillEListWithStd_Impl(rList,CAT_PERCENT,nSelPos);
+ FillEListWithStd_Impl(rList,CAT_CURRENCY,nSelPos);
+ FillEListWithStd_Impl(rList,CAT_DATE,nSelPos);
+ FillEListWithStd_Impl(rList,CAT_TIME,nSelPos);
+ FillEListWithStd_Impl(rList,CAT_SCIENTIFIC,nSelPos);
+ FillEListWithStd_Impl(rList,CAT_FRACTION,nSelPos);
+ FillEListWithStd_Impl(rList,CAT_BOOLEAN,nSelPos);
+ FillEListWithStd_Impl(rList,CAT_TEXT,nSelPos);
+ }
+ else
+ {
+ CategoryToPos_Impl(nCurCategory, nPrivCat);
+ FillEListWithStd_Impl(rList,nPrivCat,nSelPos);
+ }
+
+ if( nPrivCat!=CAT_CURRENCY)
+ nSelPos=FillEListWithUsD_Impl(rList,nSelPos);
+
+ return nSelPos;
+}
+
+void SvxNumberFormatShell::FillEListWithStd_Impl( SvStrings& rList,sal_uInt16 nPrivCat,short &nSelPos )
+{
+ /* Erstellen einer aktuellen Liste von Format-Eintraegen.
+ * Rueckgabewert ist die Listenposition des aktuellen Formates.
+ * Ist die Liste leer oder gibt es kein aktuelles Format,
+ * so wird SELPOS_NONE geliefert.
+ */
+ DBG_ASSERT( pCurFmtTable != NULL, "Unbekanntes Zahlenformat!" );
+
+ if(aCurrencyFormatList.Count()>0)
+ aCurrencyFormatList.DeleteAndDestroy(0,aCurrencyFormatList.Count());
+
+
+ SvNumberformat* pNumEntry = (SvNumberformat*)( pCurFmtTable->First() );
+ sal_uInt16 nCount = 0;
+ String aStrComment;
+ String aNewFormNInfo;
+ String aPrevString;
+ String a2PrevString;
+ Color aColor;
+
+ short nMyCat = SELPOS_NONE;
+ short nIq=0;
+
+ NfIndexTableOffset eOffsetStart;
+ NfIndexTableOffset eOffsetEnd;
+
+ switch(nPrivCat)
+ {
+ case CAT_NUMBER :eOffsetStart=NF_NUMBER_START;
+ eOffsetEnd=NF_NUMBER_END;
+ break;
+ case CAT_PERCENT :eOffsetStart=NF_PERCENT_START;
+ eOffsetEnd=NF_PERCENT_END;
+ break;
+ case CAT_CURRENCY :eOffsetStart=NF_CURRENCY_START;
+ eOffsetEnd=NF_CURRENCY_END;
+ break;
+ case CAT_DATE :eOffsetStart=NF_DATE_START;
+ eOffsetEnd=NF_DATE_END;
+ break;
+ case CAT_TIME :eOffsetStart=NF_TIME_START;
+ eOffsetEnd=NF_TIME_END;
+ break;
+ case CAT_SCIENTIFIC :eOffsetStart=NF_SCIENTIFIC_START;
+ eOffsetEnd=NF_SCIENTIFIC_END;
+ break;
+ case CAT_FRACTION :eOffsetStart=NF_FRACTION_START;
+ eOffsetEnd=NF_FRACTION_END;
+ break;
+ case CAT_BOOLEAN :eOffsetStart=NF_BOOLEAN;
+ eOffsetEnd=NF_BOOLEAN;
+ break;
+ case CAT_TEXT :eOffsetStart=NF_TEXT;
+ eOffsetEnd=NF_TEXT;
+ break;
+ default :return;
+ break;
+ }
+
+ if(nPrivCat==CAT_CURRENCY)
+ {
+ nSelPos=FillEListWithCurrency_Impl(rList,nSelPos);
+ }
+ else
+ {
+ nSelPos=FillEListWithFormats_Impl(rList,nSelPos,eOffsetStart,eOffsetEnd);
+
+ if(nPrivCat==CAT_DATE || nPrivCat==CAT_TIME)
+ {
+ nSelPos=FillEListWithDateTime_Impl(rList,nSelPos);
+ //if(nSelPos!=SELPOS_NONE) nSelPos=nTmpPos;
+ }
+ }
+}
+
+short SvxNumberFormatShell::FillEListWithFormats_Impl( SvStrings& rList,short nSelPos,
+ NfIndexTableOffset eOffsetStart,
+ NfIndexTableOffset eOffsetEnd)
+{
+ /* Erstellen einer aktuellen Liste von Format-Eintraegen.
+ * Rueckgabewert ist die Listenposition des aktuellen Formates.
+ * Ist die Liste leer oder gibt es kein aktuelles Format,
+ * so wird SELPOS_NONE geliefert.
+ */
+ sal_uInt16 nMyType;
+
+ DBG_ASSERT( pCurFmtTable != NULL, "Unbekanntes Zahlenformat!" );
+
+ SvNumberformat* pNumEntry = (SvNumberformat*)( pCurFmtTable->First() );
+ sal_uInt16 nCount = 0;
+ sal_uInt32 nNFEntry;
+ String aStrComment;
+ String aNewFormNInfo;
+ String aPrevString;
+ String a2PrevString;
+ Color aColor;
+
+ short nMyCat = SELPOS_NONE;
+ short nIq=0;
+
+ long nIndex;
+
+ for(nIndex=eOffsetStart;nIndex<=eOffsetEnd;nIndex++)
+ {
+ nNFEntry=pFormatter->GetFormatIndex((NfIndexTableOffset)nIndex,eCurLanguage);
+
+ pNumEntry = (SvNumberformat*)pFormatter->GetEntry(nNFEntry);
+
+ if(pNumEntry==NULL) continue;
+
+ nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ aStrComment=pNumEntry->GetComment();
+ CategoryToPos_Impl(nMyCat,nMyType);
+ aNewFormNInfo= pNumEntry->GetFormatstring();
+
+ const StringPtr pStr = new String(aNewFormNInfo);
+
+ if ( nNFEntry == nCurFormatKey )
+ {
+ nSelPos = ( !IsRemoved_Impl( nNFEntry ) ) ? aCurEntryList.Count() : SELPOS_NONE;
+ }
+
+ rList.Insert( pStr,rList.Count());
+ aCurEntryList.Insert( nNFEntry, aCurEntryList.Count() );
+ }
+
+ return nSelPos;
+}
+
+short SvxNumberFormatShell::FillEListWithDateTime_Impl( SvStrings& rList,short nSelPos)
+{
+ sal_uInt16 nMyType;
+
+ DBG_ASSERT( pCurFmtTable != NULL, "Unbekanntes Zahlenformat!" );
+
+ SvNumberformat* pNumEntry = (SvNumberformat*)( pCurFmtTable->First() );
+ sal_uInt16 nCount = 0;
+ sal_uInt32 nNFEntry;
+ String aStrComment;
+ String aNewFormNInfo;
+ String aPrevString;
+ String a2PrevString;
+ Color aColor;
+
+ short nMyCat = SELPOS_NONE;
+ short nIq=0;
+
+ long nIndex;
+
+ for(nIndex=NF_DATETIME_START;nIndex<=NF_DATETIME_END;nIndex++)
+ {
+ nNFEntry=pFormatter->GetFormatIndex((NfIndexTableOffset)nIndex,eCurLanguage);
+
+ pNumEntry = (SvNumberformat*)pFormatter->GetEntry(nNFEntry);
+ if(pNumEntry!=NULL)
+ {
+ nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ aStrComment=pNumEntry->GetComment();
+ CategoryToPos_Impl(nMyCat,nMyType);
+ aNewFormNInfo= pNumEntry->GetFormatstring();
+
+ const StringPtr pStr = new String(aNewFormNInfo);
+
+ if ( nNFEntry == nCurFormatKey )
+ {
+ nSelPos = ( !IsRemoved_Impl( nNFEntry ) ) ? aCurEntryList.Count() : SELPOS_NONE;
+ }
+
+ rList.Insert( pStr,rList.Count());
+ aCurEntryList.Insert( nNFEntry, aCurEntryList.Count() );
+ }
+ }
+
+ return nSelPos;
+}
+
+short SvxNumberFormatShell::FillEListWithCurrency_Impl( SvStrings& rList,short nSelPos)
+{
+ /* Erstellen einer aktuellen Liste von Format-Eintraegen.
+ * Rueckgabewert ist die Listenposition des aktuellen Formates.
+ * Ist die Liste leer oder gibt es kein aktuelles Format,
+ * so wird SELPOS_NONE geliefert.
+ */
+ DBG_ASSERT( pCurFmtTable != NULL, "Unbekanntes Zahlenformat!" );
+
+ const NfCurrencyTable& rCurrencyTable=pFormatter->GetTheCurrencyTable();
+ sal_uInt16 nCount=rCurrencyTable.Count();
+
+ const NfCurrencyEntry* pTmpCurrencyEntry;
+ sal_Bool bTmpBanking;
+ XubString rSymbol;
+ XubString rBankSymbol;
+
+ sal_Bool bFlag=pFormatter->GetNewCurrencySymbolString(nCurFormatKey,rSymbol,
+ &pTmpCurrencyEntry,&bTmpBanking);
+
+ if((!bFlag && pCurCurrencyEntry==NULL) ||
+ (bFlag && pTmpCurrencyEntry==NULL) ||
+ nCurCategory==NUMBERFORMAT_ALL)
+ {
+ nSelPos=FillEListWithSysCurrencys(rList,nSelPos);
+ }
+ else
+ {
+ nSelPos=FillEListWithUserCurrencys(rList,nSelPos);
+ }
+
+ return nSelPos;
+}
+
+
+short SvxNumberFormatShell::FillEListWithSysCurrencys( SvStrings& rList,short nSelPos)
+{
+ /* Erstellen einer aktuellen Liste von Format-Eintraegen.
+ * Rueckgabewert ist die Listenposition des aktuellen Formates.
+ * Ist die Liste leer oder gibt es kein aktuelles Format,
+ * so wird SELPOS_NONE geliefert.
+ */
+ sal_uInt16 nMyType;
+
+ DBG_ASSERT( pCurFmtTable != NULL, "Unbekanntes Zahlenformat!" );
+
+ SvNumberformat* pNumEntry = (SvNumberformat*)( pCurFmtTable->First() );
+ sal_uInt16 nCount = 0;
+ sal_uInt32 nNFEntry;
+ String aStrComment;
+ String aNewFormNInfo;
+ String aPrevString;
+ String a2PrevString;
+ Color aColor;
+
+ nCurCurrencyEntryPos=0;
+
+ short nMyCat = SELPOS_NONE;
+ short nIq=0;
+
+ NfIndexTableOffset eOffsetStart=NF_CURRENCY_START;
+ NfIndexTableOffset eOffsetEnd=NF_CURRENCY_END;;
+ long nIndex;
+
+ for(nIndex=eOffsetStart;nIndex<=eOffsetEnd;nIndex++)
+ {
+ nNFEntry=pFormatter->GetFormatIndex((NfIndexTableOffset)nIndex,eCurLanguage);
+
+ pNumEntry = (SvNumberformat*)pFormatter->GetEntry(nNFEntry);
+
+ if(pNumEntry==NULL) continue;
+
+ nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ aStrComment=pNumEntry->GetComment();
+ CategoryToPos_Impl(nMyCat,nMyType);
+ aNewFormNInfo= pNumEntry->GetFormatstring();
+
+ const StringPtr pStr = new String(aNewFormNInfo);
+
+ if ( nNFEntry == nCurFormatKey )
+ {
+ nSelPos = ( !IsRemoved_Impl( nNFEntry ) ) ? aCurEntryList.Count() : SELPOS_NONE;
+ }
+
+ rList.Insert( pStr,rList.Count());
+ aCurEntryList.Insert( nNFEntry, aCurEntryList.Count() );
+ }
+
+ if(nCurCategory!=NUMBERFORMAT_ALL)
+ {
+ pNumEntry = (SvNumberformat*)( pCurFmtTable->First() );
+ nCount = 0;
+ while ( pNumEntry )
+ {
+ sal_uInt32 nKey = pCurFmtTable->GetCurKey();
+
+ nCount++;
+
+ if ( !IsRemoved_Impl( nKey ))
+ {
+ sal_Bool bUserNewCurrency=sal_False;
+ if(pNumEntry->HasNewCurrency())
+ {
+ const NfCurrencyEntry* pTmpCurrencyEntry;
+ sal_Bool bTmpBanking;
+ XubString rSymbol;
+
+ pFormatter->GetNewCurrencySymbolString(nKey,rSymbol,
+ &pTmpCurrencyEntry,&bTmpBanking);
+
+ bUserNewCurrency=(pTmpCurrencyEntry!=NULL);
+ }
+
+ if(!bUserNewCurrency &&(pNumEntry->GetType() & NUMBERFORMAT_DEFINED))
+ {
+ nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ aStrComment=pNumEntry->GetComment();
+ CategoryToPos_Impl(nMyCat,nMyType);
+ aNewFormNInfo= pNumEntry->GetFormatstring();
+
+ const StringPtr pStr = new String(aNewFormNInfo);
+
+ if ( nKey == nCurFormatKey ) nSelPos =aCurEntryList.Count();
+ rList.Insert( pStr,rList.Count());
+ aCurEntryList.Insert( nKey, aCurEntryList.Count() );
+ }
+ }
+ pNumEntry = (SvNumberformat*)( pCurFmtTable->Next() );
+ }
+ }
+ return nSelPos;
+}
+
+short SvxNumberFormatShell::FillEListWithUserCurrencys( SvStrings& rList,short nSelPos)
+{
+ /* Erstellen einer aktuellen Liste von Format-Eintraegen.
+ * Rueckgabewert ist die Listenposition des aktuellen Formates.
+ * Ist die Liste leer oder gibt es kein aktuelles Format,
+ * so wird SELPOS_NONE geliefert.
+ */
+ sal_uInt16 nMyType;
+
+ DBG_ASSERT( pCurFmtTable != NULL, "Unbekanntes Zahlenformat!" );
+
+ sal_uInt16 nCount = 0;
+ String aStrComment;
+ String aNewFormNInfo;
+ String aPrevString;
+ String a2PrevString;
+ Color aColor;
+ short nMyCat = SELPOS_NONE;
+ short nIq=0;
+
+ const NfCurrencyEntry* pTmpCurrencyEntry;
+ sal_Bool bTmpBanking;
+ XubString rSymbol;
+ XubString rBankSymbol;
+
+ SvStrings aList;
+ SvULongs aKeyList;
+
+ sal_Bool bFlag=pFormatter->GetNewCurrencySymbolString(nCurFormatKey,rSymbol,
+ &pTmpCurrencyEntry,&bTmpBanking);
+
+ XubString rShortSymbol;
+
+ if(pCurCurrencyEntry==NULL)
+ {
+ pCurCurrencyEntry=(NfCurrencyEntry*)pTmpCurrencyEntry;
+ bBankingSymbol=bTmpBanking;
+ nCurCurrencyEntryPos=FindCurrencyFormat(pTmpCurrencyEntry,bTmpBanking);
+ }
+ else
+ {
+ pTmpCurrencyEntry=pCurCurrencyEntry;
+ bTmpBanking=bBankingSymbol;
+ }
+
+ if(pTmpCurrencyEntry!=NULL)
+ {
+ pTmpCurrencyEntry->BuildSymbolString(rSymbol,sal_False);
+ pTmpCurrencyEntry->BuildSymbolString(rBankSymbol,sal_True);
+ pTmpCurrencyEntry->BuildSymbolString(rShortSymbol,bTmpBanking,sal_True);
+ }
+
+ SvNumberformat* pNumEntry = (SvNumberformat*)( pCurFmtTable->First() );
+
+ while ( pNumEntry )
+ {
+ sal_uInt32 nKey = pCurFmtTable->GetCurKey();
+
+ nCount++;
+
+ if ( !IsRemoved_Impl( nKey ) )
+ {
+ if(pNumEntry->GetType() & NUMBERFORMAT_DEFINED)
+ {
+ nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ aStrComment=pNumEntry->GetComment();
+ CategoryToPos_Impl(nMyCat,nMyType);
+ aNewFormNInfo= pNumEntry->GetFormatstring();
+
+ sal_Bool bInsFlag=sal_False;
+ if(!bTmpBanking && aNewFormNInfo.Search(rSymbol)!=STRING_NOTFOUND||
+ bTmpBanking && aNewFormNInfo.Search(rBankSymbol)!=STRING_NOTFOUND)
+ {
+ bInsFlag=sal_True;
+ }
+ else if(aNewFormNInfo.Search(rShortSymbol)!=STRING_NOTFOUND)
+ {
+ XubString rTstSymbol;
+ const NfCurrencyEntry* pTstCurrencyEntry;
+ sal_Bool bTstBanking;
+
+ sal_Bool bTstFlag=pFormatter->GetNewCurrencySymbolString(nKey,rTstSymbol,
+ &pTstCurrencyEntry,&bTstBanking);
+
+ if(pTmpCurrencyEntry==pTstCurrencyEntry && bTstBanking==bTmpBanking)
+ {
+ bInsFlag=sal_True;
+ }
+
+ }
+
+ if(bInsFlag)
+ {
+ const StringPtr pStr = new String(aNewFormNInfo);
+
+ aList.Insert( pStr,aList.Count());
+ aKeyList.Insert( nKey, aKeyList.Count() );
+ }
+ }
+ }
+ pNumEntry = (SvNumberformat*)( pCurFmtTable->Next() );
+ }
+
+ NfWSStringsDtor aWSStringsDtor;
+ sal_uInt16 nDefault;
+ if ( pTmpCurrencyEntry )
+ nDefault = pFormatter->GetCurrencyFormatStrings( aWSStringsDtor,
+ *pTmpCurrencyEntry, bTmpBanking );
+ else
+ nDefault = 0;
+
+ nSelPos=nDefault;
+
+ sal_uInt16 i,nPos;
+ for(i=0,nPos=0;i<aWSStringsDtor.Count();i++)
+ {
+ sal_Bool bFlag=sal_True;
+ String aInsStr(*aWSStringsDtor[i]);
+ sal_uInt16 j;
+ for(j=0;j<aList.Count();j++)
+ {
+ const StringPtr pTestStr=aList[j];
+
+ if(*pTestStr==aInsStr)
+ {
+ bFlag=sal_False;
+ break;
+ }
+ }
+ if(bFlag)
+ {
+ rList.Insert(new String(aInsStr),nPos);
+ aCurEntryList.Insert( NUMBERFORMAT_ENTRY_NOT_FOUND, nPos++);
+ }
+ else
+ {
+ rList.Insert(aList[j],nPos);
+ aList.Remove(j);
+ aCurEntryList.Insert( aKeyList[j],nPos++);
+ aKeyList.Remove(j);
+ }
+ }
+
+ for(i=0;i<aKeyList.Count();i++)
+ {
+ if(aKeyList[i]!=NUMBERFORMAT_ENTRY_NOT_FOUND)
+ {
+ rList.Insert(aList[i],rList.Count());
+ aCurEntryList.Insert( aKeyList[i],aCurEntryList.Count());
+ }
+ }
+
+ for(i=0;i<rList.Count();i++)
+ {
+ aCurrencyFormatList.Insert(new String(*rList[i]),aCurrencyFormatList.Count());
+
+ if ( aCurEntryList[i]== nCurFormatKey ) nSelPos =i;
+ }
+
+ if(nCurCategory!=NUMBERFORMAT_ALL && nSelPos==SELPOS_NONE)
+ {
+ nSelPos=0;
+ }
+
+ return nSelPos;
+}
+
+
+short SvxNumberFormatShell::FillEListWithUsD_Impl( SvStrings& rList,short nSelPos)
+{
+ /* Erstellen einer aktuellen Liste von Format-Eintraegen.
+ * Rueckgabewert ist die Listenposition des aktuellen Formates.
+ * Ist die Liste leer oder gibt es kein aktuelles Format,
+ * so wird SELPOS_NONE geliefert.
+ */
+ sal_uInt16 nMyType;
+
+ DBG_ASSERT( pCurFmtTable != NULL, "Unbekanntes Zahlenformat!" );
+
+ SvNumberformat* pNumEntry = (SvNumberformat*)( pCurFmtTable->First() );
+ sal_uInt16 nCount = 0;
+ String aStrComment;
+ String aNewFormNInfo;
+ String aPrevString;
+ String a2PrevString;
+ Color aColor;
+
+
+ short nMyCat = SELPOS_NONE;
+ short nIq=0;
+
+ while ( pNumEntry )
+ {
+ sal_uInt32 nKey = pCurFmtTable->GetCurKey();
+
+ nCount++;
+
+ if ( !IsRemoved_Impl( nKey ) )
+ {
+ if(pNumEntry->GetType() & NUMBERFORMAT_DEFINED)
+ {
+ nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ aStrComment=pNumEntry->GetComment();
+ CategoryToPos_Impl(nMyCat,nMyType);
+ aNewFormNInfo= pNumEntry->GetFormatstring();
+
+ sal_Bool bFlag=sal_True;
+ if(pNumEntry->HasNewCurrency())
+ {
+ sal_Bool bTestBanking;
+ sal_uInt16 nPos=FindCurrencyTableEntry(aNewFormNInfo,bTestBanking);
+ bFlag=!IsInTable(nPos,bTestBanking,aNewFormNInfo);
+ }
+ if(bFlag)
+ {
+ const StringPtr pStr = new String(aNewFormNInfo);
+
+ if ( nKey == nCurFormatKey ) nSelPos =aCurEntryList.Count();
+ rList.Insert( pStr,rList.Count());
+ aCurEntryList.Insert( nKey, aCurEntryList.Count() );
+ }
+ }
+ }
+ pNumEntry = (SvNumberformat*)( pCurFmtTable->Next() );
+ }
+ return nSelPos;
+}
+
+
+// -----------------------------------------------------------------------
+
+void SvxNumberFormatShell::GetPreviewString_Impl( String& rString,
+ Color& rColor )
+{
+ Color* pColor = NULL;
+
+ if ( eValType == SVX_VALUE_TYPE_STRING )
+ pFormatter->GetOutputString( aValStr, nCurFormatKey,
+ rString, &pColor );
+ else
+ pFormatter->GetOutputString( nValNum, nCurFormatKey,
+ rString, &pColor );
+
+ if ( pColor )
+ rColor = *pColor;
+ else
+ rColor = Color( COL_BLACK );
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxNumberFormatShell::IsRemoved_Impl( sal_uInt32 nKey )
+{
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 i = 0; !bFound && i < aDelList.Count(); ++i )
+ if ( aDelList[i] == nKey )
+ bFound = sal_True;
+ return bFound;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxNumberFormatShell::IsAdded_Impl( sal_uInt32 nKey )
+{
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 i = 0; !bFound && i < aAddList.Count(); ++i )
+ if ( aAddList[i] == nKey )
+ bFound = sal_True;
+ return bFound;
+}
+
+// -----------------------------------------------------------------------
+// Konvertierungs-Routinen:
+// ------------------------
+
+void SvxNumberFormatShell::PosToCategory_Impl( sal_uInt16 nPos, short& rCategory )
+{
+ // Kategorie ::com::sun::star::form-Positionen abbilden (->Resource)
+ switch ( nPos )
+ {
+ case CAT_USERDEFINED: rCategory = NUMBERFORMAT_DEFINED; break;
+ case CAT_NUMBER: rCategory = NUMBERFORMAT_NUMBER; break;
+ case CAT_PERCENT: rCategory = NUMBERFORMAT_PERCENT; break;
+ case CAT_CURRENCY: rCategory = NUMBERFORMAT_CURRENCY; break;
+ case CAT_DATE: rCategory = NUMBERFORMAT_DATE; break;
+ case CAT_TIME: rCategory = NUMBERFORMAT_TIME; break;
+ case CAT_SCIENTIFIC: rCategory = NUMBERFORMAT_SCIENTIFIC; break;
+ case CAT_FRACTION: rCategory = NUMBERFORMAT_FRACTION; break;
+ case CAT_BOOLEAN: rCategory = NUMBERFORMAT_LOGICAL; break;
+ case CAT_TEXT: rCategory = NUMBERFORMAT_TEXT; break;
+ case CAT_ALL:
+ default: rCategory = NUMBERFORMAT_ALL; break;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberFormatShell::CategoryToPos_Impl( short nCategory, sal_uInt16& rPos )
+{
+ // Kategorie auf ::com::sun::star::form-Positionen abbilden (->Resource)
+ switch ( nCategory )
+ {
+ case NUMBERFORMAT_DEFINED: rPos = CAT_USERDEFINED; break;
+ case NUMBERFORMAT_NUMBER: rPos = CAT_NUMBER; break;
+ case NUMBERFORMAT_PERCENT: rPos = CAT_PERCENT; break;
+ case NUMBERFORMAT_CURRENCY: rPos = CAT_CURRENCY; break;
+ case NUMBERFORMAT_DATETIME:
+ case NUMBERFORMAT_DATE: rPos = CAT_DATE; break;
+ case NUMBERFORMAT_TIME: rPos = CAT_TIME; break;
+ case NUMBERFORMAT_SCIENTIFIC: rPos = CAT_SCIENTIFIC; break;
+ case NUMBERFORMAT_FRACTION: rPos = CAT_FRACTION; break;
+ case NUMBERFORMAT_LOGICAL: rPos = CAT_BOOLEAN; break;
+ case NUMBERFORMAT_TEXT: rPos = CAT_TEXT; break;
+ case NUMBERFORMAT_ALL:
+ default: rPos = CAT_ALL;
+ }
+}
+
+
+/*************************************************************************
+#* Member: MakePrevStringFromVal Datum:19.09.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatShell
+#*
+#* Funktion: Formatiert die Zahl nValue abhaengig von rFormatStr
+#* und speichert das Ergebnis in rPreviewStr.
+#*
+#* Input: FormatString, Farbe, zu formatierende Zahl
+#*
+#* Output: Ausgabestring rPreviewStr
+#*
+#************************************************************************/
+
+void SvxNumberFormatShell::MakePrevStringFromVal( const String& rFormatStr,
+ String& rPreviewStr,
+ Color& rFontColor,
+ double nValue)
+{
+ Color* pColor = NULL;
+
+ pFormatter->GetPreviewString( rFormatStr, nValue, rPreviewStr,
+ &pColor, eCurLanguage );
+ if ( pColor )
+ rFontColor = *pColor;
+ else
+ rFontColor = Color( COL_BLACK );
+}
+/*************************************************************************
+#* Member: GetComment4Entry Datum:30.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatShell
+#*
+#* Funktion: Liefert den Kommentar fuer einen gegebenen
+#* Eintrag zurueck.
+#*
+#* Input: Nummer des Eintrags
+#*
+#* Output: Kommentar-String
+#*
+#************************************************************************/
+
+void SvxNumberFormatShell::SetComment4Entry(short nEntry,String aEntStr)
+{
+ SvNumberformat *pNumEntry;
+ if(nEntry<0) return;
+ sal_uInt32 nMyNfEntry=aCurEntryList[nEntry];
+ pNumEntry = (SvNumberformat*)pFormatter->GetEntry(nMyNfEntry);
+ if(pNumEntry!=NULL) pNumEntry->SetComment(aEntStr);
+}
+
+/*************************************************************************
+#* Member: GetComment4Entry Datum:30.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatShell
+#*
+#* Funktion: Liefert den Kommentar fuer einen gegebenen
+#* Eintrag zurueck.
+#*
+#* Input: Nummer des Eintrags
+#*
+#* Output: Kommentar-String
+#*
+#************************************************************************/
+
+String SvxNumberFormatShell::GetComment4Entry(short nEntry)
+{
+ SvNumberformat *pNumEntry;
+
+ if(nEntry < 0)
+ return String();
+
+ if(nEntry<aCurEntryList.Count())
+ {
+ sal_uInt32 nMyNfEntry=aCurEntryList[nEntry];
+ pNumEntry = (SvNumberformat*)pFormatter->GetEntry(nMyNfEntry);
+ if(pNumEntry!=NULL)
+ return pNumEntry->GetComment();
+ }
+
+ return String();
+}
+
+/*************************************************************************
+#* Member: GetCategory4Entry Datum:30.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatShell
+#*
+#* Funktion: Liefert die Kategorie- Nummer fuer einen gegebenen
+#* Eintrag zurueck.
+#*
+#* Input: Nummer des Eintrags
+#*
+#* Output: Kategorie- Nummer
+#*
+#************************************************************************/
+
+short SvxNumberFormatShell::GetCategory4Entry(short nEntry)
+{
+ SvNumberformat *pNumEntry;
+ if(nEntry<0) return 0;
+
+ if(nEntry<aCurEntryList.Count())
+ {
+ sal_uInt32 nMyNfEntry=aCurEntryList[nEntry];
+
+ if(nMyNfEntry!=NUMBERFORMAT_ENTRY_NOT_FOUND)
+ {
+ pNumEntry = (SvNumberformat*)pFormatter->GetEntry(nMyNfEntry);
+ sal_uInt16 nMyCat,nMyType;
+ if(pNumEntry!=NULL)
+ {
+ nMyCat=pNumEntry->GetType() & ~NUMBERFORMAT_DEFINED;
+ CategoryToPos_Impl(nMyCat,nMyType);
+
+ return (short) nMyType;
+ }
+ return 0;
+ }
+ else if(aCurrencyFormatList.Count()>0)
+ {
+ return CAT_CURRENCY;
+ }
+ }
+ return 0;
+
+}
+
+/*************************************************************************
+#* Member: GetUserDefined4Entry Datum:31.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatShell
+#*
+#* Funktion: Liefert die Information, ob ein Eintrag
+#* benutzerspezifisch ist zurueck.
+#*
+#* Input: Nummer des Eintrags
+#*
+#* Output: Benutzerspezifisch?
+#*
+#************************************************************************/
+
+sal_Bool SvxNumberFormatShell::GetUserDefined4Entry(short nEntry)
+{
+ SvNumberformat *pNumEntry;
+ if(nEntry<0) return 0;
+ if(nEntry<aCurEntryList.Count())
+ {
+ sal_uInt32 nMyNfEntry=aCurEntryList[nEntry];
+ pNumEntry = (SvNumberformat*)pFormatter->GetEntry(nMyNfEntry);
+
+ if(pNumEntry!=NULL)
+ {
+ if((pNumEntry->GetType() & NUMBERFORMAT_DEFINED)>0)
+ {
+ return sal_True;
+ }
+ }
+ }
+ return sal_False;
+}
+
+
+/*************************************************************************
+#* Member: GetFormat4Entry Datum:30.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatShell
+#*
+#* Funktion: Liefert den Format- String fuer einen gegebenen
+#* Eintrag zurueck.
+#*
+#* Input: Nummer des Eintrags
+#*
+#* Output: Format- String
+#*
+#************************************************************************/
+
+String SvxNumberFormatShell::GetFormat4Entry(short nEntry)
+{
+ SvNumberformat *pNumEntry;
+
+ if(nEntry < 0)
+ return String();
+
+ if(aCurrencyFormatList.Count()>0)
+ {
+ if(aCurrencyFormatList.Count()>nEntry)
+ return *aCurrencyFormatList[nEntry];
+ }
+ else
+ {
+ sal_uInt32 nMyNfEntry=aCurEntryList[nEntry];
+ pNumEntry = (SvNumberformat*)pFormatter->GetEntry(nMyNfEntry);
+
+ if(pNumEntry!=NULL)
+ return pNumEntry->GetFormatstring();
+ }
+ return String();
+}
+
+/*************************************************************************
+#* Member: GetListPos4Entry Datum:31.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatShell
+#*
+#* Funktion: Liefert die Listen- Nummer fuer einen gegebenen
+#* Formatindex zurueck.
+#*
+#* Input: Nummer des Eintrags
+#*
+#* Output: Kategorie- Nummer
+#*
+#************************************************************************/
+
+short SvxNumberFormatShell::GetListPos4Entry(sal_uInt32 nIdx)
+{
+ short nSelP=SELPOS_NONE;
+ for(int i=0;i<aCurEntryList.Count();i++)
+ {
+ if(aCurEntryList[i]==nIdx)
+ {
+ nSelP=i;
+ break;
+ }
+ }
+ return nSelP;
+}
+
+short SvxNumberFormatShell::GetListPos4Entry( const String& rFmtString )
+{
+ sal_uInt32 nAt=0;
+ short nSelP=SELPOS_NONE;
+ if(FindEntry(rFmtString, &nAt))
+ {
+ if(NUMBERFORMAT_ENTRY_NOT_FOUND!=nAt && NUMBERFORMAT_ENTRY_NEW_CURRENCY!=nAt)
+ {
+ nSelP=GetListPos4Entry(nAt);
+ }
+ else
+ {
+ if(aCurrencyFormatList.Count()>0)
+ {
+ for(sal_uInt16 i=0;i<aCurrencyFormatList.Count();i++)
+ {
+ if (rFmtString==*aCurrencyFormatList[i])
+ {
+ nSelP=i;
+ break;
+ }
+ }
+ }
+ }
+ }
+ return nSelP;
+}
+
+void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope, sal_uInt16* pPos)
+{
+
+ const NfCurrencyEntry* pTmpCurrencyEntry=pFormatter->MatchSystemCurrency();
+
+ sal_Bool bFlag=(pTmpCurrencyEntry==NULL);
+
+ GetCurrencySymbols(rList,rStrEurope, bFlag);
+
+ if(pPos!=NULL)
+ {
+ const NfCurrencyTable& rCurrencyTable=pFormatter->GetTheCurrencyTable();
+ sal_uInt16 nCount=rCurrencyTable.Count();
+
+ *pPos=0;
+ nCount=aCurCurrencyList.Count();
+
+ if(bFlag)
+ {
+ *pPos=1;
+ nCurCurrencyEntryPos=1;
+ }
+ else
+ {
+ for(sal_uInt16 i=1;i<nCount;i++)
+ {
+ if(aCurCurrencyList[i]!=(sal_uInt16)-1 &&
+ pTmpCurrencyEntry==rCurrencyTable[aCurCurrencyList[i]])
+ {
+ *pPos=i;
+ nCurCurrencyEntryPos=i;
+ break;
+ }
+ }
+ }
+ }
+
+}
+
+void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope, sal_Bool bFlag)
+{
+ aCurCurrencyList.Remove(0,aCurCurrencyList.Count());
+
+ const NfCurrencyTable& rCurrencyTable=pFormatter->GetTheCurrencyTable();
+ sal_uInt16 nCount=rCurrencyTable.Count();
+
+ SvxLanguageTable* pLanguageTable=new SvxLanguageTable;
+
+ sal_uInt16 nStart=2;
+ sal_uInt16 i,j;
+
+ XubString aString(rCurrencyTable[0]->GetSymbol());
+ aString += sal_Unicode(' ');
+ aString += pLanguageTable->GetString(rCurrencyTable[0]->GetLanguage());
+
+ WSStringPtr pStr = new XubString(aString);
+ rList.Insert( pStr,rList.Count());
+ sal_uInt16 nAuto=(sal_uInt16)-1;
+ aCurCurrencyList.Insert(nAuto,aCurCurrencyList.Count());
+
+ if(bFlag)
+ {
+ pStr = new XubString(aString);
+ rList.Insert( pStr,rList.Count());
+ aCurCurrencyList.Insert((sal_uInt16)0,aCurCurrencyList.Count());
+ nStart=3;
+ }
+
+ aString = rCurrencyTable[1]->GetSymbol();
+ aString += sal_Unicode(' ');
+ aString += rStrEurope;
+
+ pStr = new XubString(aString);
+ rList.Insert( pStr,rList.Count());
+ aCurCurrencyList.Insert((sal_uInt16)1,aCurCurrencyList.Count());
+
+ for(i=2;i<nCount;i++)
+ {
+ XubString aString(rCurrencyTable[i]->GetSymbol());
+ aString += sal_Unicode(' ');
+ aString += pLanguageTable->GetString(rCurrencyTable[i]->GetLanguage());
+
+ pStr = new XubString(aString);
+
+ for(j=nStart;j<rList.Count();j++)
+ {
+ const StringPtr pTestStr=rList[j];
+
+ if(*pTestStr>aString) break;
+ }
+ rList.Insert( pStr,j);
+ aCurCurrencyList.Insert(i,j);
+ }
+
+ pStr = new XubString(rCurrencyTable[1]->GetBankSymbol());
+ rList.Insert( pStr,rList.Count());
+ aCurCurrencyList.Insert(1,aCurCurrencyList.Count());
+
+ sal_uInt16 nCont=nCount+1;
+ if(bFlag)nCont++;
+
+ for(i=2;i<nCount;i++)
+ {
+ sal_Bool bTest=sal_True;
+ pStr = new XubString(rCurrencyTable[i]->GetBankSymbol());
+
+ for(j=nCont;j<rList.Count();j++)
+ {
+ const StringPtr pTestStr=rList[j];
+
+ if(*pTestStr==*pStr)
+ bTest=sal_False;
+ else
+ if(*pTestStr>*pStr) break;
+ }
+ if(bTest)
+ {
+ rList.Insert( pStr,j);
+ aCurCurrencyList.Insert(i,j);
+ }
+ }
+}
+
+void SvxNumberFormatShell::GetCurrencyFormats(SvStrings& aListDtor)
+{
+ if(pCurCurrencyEntry!=NULL)
+ {
+ NfWSStringsDtor aWSStringsDtor;
+ sal_uInt16 nDefault = pFormatter->GetCurrencyFormatStrings( aWSStringsDtor,
+ *pCurCurrencyEntry, bBankingSymbol );
+
+ for(sal_uInt16 i=0;i<aWSStringsDtor.Count();i++)
+ {
+ aListDtor.Insert(new String(*aWSStringsDtor[i]),aListDtor.Count());
+ }
+ }
+}
+
+sal_Bool SvxNumberFormatShell::IsBankingSymbol(sal_uInt16 nPos)
+{
+ const NfCurrencyTable& rCurrencyTable=pFormatter->GetTheCurrencyTable();
+ sal_uInt16 nCount=rCurrencyTable.Count();
+
+ return (nPos>nCount);
+}
+
+void SvxNumberFormatShell::SetCurrencySymbol(sal_uInt16 nPos)
+{
+ const NfCurrencyTable& rCurrencyTable=pFormatter->GetTheCurrencyTable();
+ sal_uInt16 nCount=rCurrencyTable.Count();
+
+ bBankingSymbol=(nPos>=nCount);
+
+ if(nPos<aCurCurrencyList.Count())
+ {
+ sal_uInt16 nCurrencyPos=aCurCurrencyList[nPos];
+ if(nCurrencyPos!=(sal_uInt16)-1)
+ {
+ pCurCurrencyEntry=rCurrencyTable[nCurrencyPos];
+ nCurCurrencyEntryPos=nPos;
+ nCurFormatKey=NUMBERFORMAT_ENTRY_NEW_CURRENCY;
+ }
+ else
+ {
+ pCurCurrencyEntry=NULL;
+ nCurCurrencyEntryPos=0;
+ nCurFormatKey=pFormatter->GetFormatIndex(
+ NF_CURRENCY_1000DEC2_RED, eCurLanguage);
+ }
+ }
+}
+
+sal_uInt32 SvxNumberFormatShell::GetCurrencySymbol()
+{
+ return nCurCurrencyEntryPos;
+}
+
+NfCurrencyEntry* SvxNumberFormatShell::GetCurCurrencyEntry()
+{
+ return pCurCurrencyEntry;
+}
+
+void SvxNumberFormatShell::SetCurCurrencyEntry(NfCurrencyEntry* pCEntry)
+{
+ pCurCurrencyEntry=pCEntry;
+}
+
+sal_Bool SvxNumberFormatShell::IsTmpCurrencyFormat( const String& rFmtString )
+{
+ sal_uInt32 nFound;
+ sal_Bool bRes=FindEntry(rFmtString, &nFound);
+
+ if(nFound==NUMBERFORMAT_ENTRY_NEW_CURRENCY)
+ {
+ return sal_True;
+ }
+ return sal_False;
+}
+
+sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat( const String& rFmtString )
+{
+ const NfCurrencyTable& rCurrencyTable=pFormatter->GetTheCurrencyTable();
+ sal_uInt16 nCount=rCurrencyTable.Count();
+
+ sal_Bool bTestBanking=sal_False;
+
+ sal_uInt16 nPos=FindCurrencyTableEntry(rFmtString, bTestBanking);
+
+ sal_uInt16 nStart=0;
+
+ if(nPos!=(sal_uInt16)-1)
+ {
+ if(bTestBanking && aCurCurrencyList.Count()>nPos)
+ {
+ nStart=nCount;
+ }
+ for(sal_uInt16 j=nStart;j<aCurCurrencyList.Count();j++)
+ {
+ if(aCurCurrencyList[j]==nPos) return j;
+ }
+ }
+ return (sal_uInt16) -1;
+}
+
+sal_uInt16 SvxNumberFormatShell::FindCurrencyTableEntry( const String& rFmtString, sal_Bool &bTestBanking )
+{
+ const NfCurrencyTable& rCurrencyTable=pFormatter->GetTheCurrencyTable();
+ sal_uInt16 nCount=rCurrencyTable.Count();
+
+ sal_uInt16 nPos=(sal_uInt16) -1;
+ for(sal_uInt16 i=0;i<nCount;i++)
+ {
+ const NfCurrencyEntry* pTmpCurrencyEntry=rCurrencyTable[i];
+ XubString rSymbol;
+ XubString rBankSymbol;
+ pTmpCurrencyEntry->BuildSymbolString(rSymbol,sal_False);
+ pTmpCurrencyEntry->BuildSymbolString(rBankSymbol,sal_True);
+
+ if(rFmtString.Search(rSymbol)!=STRING_NOTFOUND)
+ {
+ bTestBanking=sal_False;
+ nPos=i;
+ break;
+ }
+ else if(rFmtString.Search(rBankSymbol)!=STRING_NOTFOUND)
+ {
+ bTestBanking=sal_True;
+ nPos=i;
+ break;
+ }
+ }
+
+ return nPos;
+}
+
+sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat(const NfCurrencyEntry* pTmpCurrencyEntry,sal_Bool bTmpBanking)
+{
+ const NfCurrencyTable& rCurrencyTable=pFormatter->GetTheCurrencyTable();
+ sal_uInt16 nCount=rCurrencyTable.Count();
+
+ sal_Bool bTestBanking=sal_False;
+ sal_uInt16 nPos=0;
+ for(sal_uInt16 i=0;i<nCount;i++)
+ {
+ if(pTmpCurrencyEntry==rCurrencyTable[i])
+ {
+ nPos=i;
+ break;
+ }
+ }
+
+ sal_uInt16 nStart=0;
+ if(bTmpBanking && aCurCurrencyList.Count()>nPos)
+ {
+ nStart=nCount;
+ }
+ for(sal_uInt16 j=nStart;j<aCurCurrencyList.Count();j++)
+ {
+ if(aCurCurrencyList[j]==nPos) return j;
+ }
+ return (sal_uInt16) -1;
+}
+
+sal_Bool SvxNumberFormatShell::IsInTable(sal_uInt16 nPos,sal_Bool bTmpBanking,const String &rFmtString)
+{
+ sal_Bool bFlag=sal_False;
+
+ if(nPos!=(sal_uInt16)-1)
+ {
+ const NfCurrencyTable& rCurrencyTable=pFormatter->GetTheCurrencyTable();
+ sal_uInt16 nCount=rCurrencyTable.Count();
+
+ if(nPos<nCount)
+ {
+ NfWSStringsDtor aWSStringsDtor;
+ sal_uInt16 nDefault;
+
+ const NfCurrencyEntry* pTmpCurrencyEntry=rCurrencyTable[nPos];
+
+ if ( pTmpCurrencyEntry!=NULL)
+ {
+ nDefault = pFormatter->GetCurrencyFormatStrings( aWSStringsDtor,
+ *pTmpCurrencyEntry, bTmpBanking );
+
+ for(sal_uInt16 i=0;i<aWSStringsDtor.Count();i++)
+ {
+ if(*aWSStringsDtor[i]==rFmtString)
+ {
+ bFlag=sal_True;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return bFlag;
+}
+
diff --git a/svx/source/items/numinf.cxx b/svx/source/items/numinf.cxx
new file mode 100644
index 0000000000..f89f9ec191
--- /dev/null
+++ b/svx/source/items/numinf.cxx
@@ -0,0 +1,275 @@
+/*************************************************************************
+ *
+ * $RCSfile: numinf.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+
+#define _SVX_NUMINF_CXX
+#define ITEMID_NUMBERINFO 0
+
+#include "numinf.hxx"
+
+// -----------------------------------------------------------------------
+
+TYPEINIT1(SvxNumberInfoItem, SfxPoolItem);
+
+// class SvxNumberInfoItem -----------------------------------------------
+
+#define INIT(pNum,eVal,nDouble,rStr) \
+ SfxPoolItem ( nId ), \
+ \
+ pFormatter ( pNum ), \
+ eValueType ( eVal ), \
+ nDoubleVal ( nDouble ), \
+ aStringVal ( rStr ), \
+ pDelFormatArr ( NULL ), \
+ nDelCount ( 0 )
+
+SvxNumberInfoItem::SvxNumberInfoItem( const sal_uInt16 nId ) :
+
+ INIT( NULL, SVX_VALUE_TYPE_UNDEFINED, 0, String() )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter,
+ const sal_uInt16 nId ) :
+
+ INIT( pNumFormatter, SVX_VALUE_TYPE_UNDEFINED, 0, String() )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter,
+ const String& rVal, const sal_uInt16 nId ) :
+
+ INIT( pNumFormatter, SVX_VALUE_TYPE_STRING, 0, rVal )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter,
+ const double& rVal, const sal_uInt16 nId ) :
+
+ INIT( pNumFormatter, SVX_VALUE_TYPE_NUMBER, rVal, String() )
+
+{
+}
+
+#undef INIT
+
+// -----------------------------------------------------------------------
+
+SvxNumberInfoItem::SvxNumberInfoItem( const SvxNumberInfoItem& rItem ) :
+
+ SfxPoolItem( rItem.Which() ),
+
+ pFormatter ( rItem.pFormatter ),
+ eValueType ( rItem.eValueType ),
+ nDoubleVal ( rItem.nDoubleVal ),
+ aStringVal ( rItem.aStringVal ),
+ pDelFormatArr( NULL ),
+ nDelCount ( rItem.nDelCount )
+
+{
+ if ( rItem.nDelCount > 0 )
+ {
+ pDelFormatArr = new sal_uInt32[ rItem.nDelCount ];
+
+ for ( sal_uInt16 i = 0; i < rItem.nDelCount; ++i )
+ pDelFormatArr[i] = rItem.pDelFormatArr[i];
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SvxNumberInfoItem::~SvxNumberInfoItem()
+{
+ if ( pDelFormatArr )
+ delete []pDelFormatArr;
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxNumberInfoItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ String& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxNumberInfoItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" );
+
+ SvxNumberInfoItem& rOther = (SvxNumberInfoItem&)rItem;
+
+ sal_Bool bEqual = sal_False;
+
+ if ( nDelCount == rOther.nDelCount )
+ {
+ if ( nDelCount > 0 )
+ {
+ if ( pDelFormatArr != NULL && rOther.pDelFormatArr != NULL )
+ {
+ bEqual = sal_True;
+
+ for ( sal_uInt16 i = 0; i < nDelCount && bEqual; ++i )
+ bEqual = ( pDelFormatArr[i] == rOther.pDelFormatArr[i] );
+ }
+ }
+ else if ( nDelCount == 0 )
+ bEqual = ( pDelFormatArr == NULL && rOther.pDelFormatArr == NULL );
+
+ bEqual = bEqual &&
+ pFormatter == rOther.pFormatter &&
+ eValueType == rOther.eValueType &&
+ nDoubleVal == rOther.nDoubleVal &&
+ aStringVal == rOther.aStringVal;
+ }
+ return bEqual;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxNumberInfoItem::Clone( SfxItemPool * ) const
+{
+ return new SvxNumberInfoItem( *this );
+}
+
+// Laden/Speichern wird nicht gebraucht!
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxNumberInfoItem::Create( SvStream& rStream, sal_uInt16 ) const
+{
+ return new SvxNumberInfoItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxNumberInfoItem::Store( SvStream &rStream, sal_uInt16 nItemVersion ) const
+{
+ return rStream;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberInfoItem::SetNumberFormatter( SvNumberFormatter* pNumFormatter )
+{
+ pFormatter = pNumFormatter;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberInfoItem::SetStringValue( const String& rNewVal )
+{
+ aStringVal = rNewVal;
+ eValueType = SVX_VALUE_TYPE_STRING;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberInfoItem::SetDoubleValue( const double& rNewVal )
+{
+ nDoubleVal = rNewVal;
+ eValueType = SVX_VALUE_TYPE_NUMBER;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberInfoItem::SetDelFormatArray( const sal_uInt32* pData,
+ const sal_uInt32 nCount )
+{
+ if ( pDelFormatArr )
+ {
+ delete []pDelFormatArr;
+ pDelFormatArr = NULL;
+ }
+
+ nDelCount = nCount;
+
+ if ( nCount > 0 )
+ {
+ pDelFormatArr = new sal_uInt32[ nCount ];
+
+ if ( pData != NULL )
+ {
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ pDelFormatArr[i] = pData[i];
+ }
+ }
+}
+
+
diff --git a/svx/source/items/numitem.cxx b/svx/source/items/numitem.cxx
new file mode 100644
index 0000000000..b2915c46f9
--- /dev/null
+++ b/svx/source/items/numitem.cxx
@@ -0,0 +1,886 @@
+/*************************************************************************
+ *
+ * $RCSfile: numitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <numitem.hxx>
+
+#define ITEMID_BRUSH SID_ATTR_BRUSH
+#ifndef _SVX_BRSHITEM_HXX //autogen
+#include <brshitem.hxx>
+#endif
+#ifndef _SV_FONT_HXX //autogen
+#include <vcl/font.hxx>
+#endif
+#ifndef _SVX_SVXIDS_HRC
+#include <svxids.hrc>
+#endif
+#ifndef _SVX_NUMDEF_HXX
+#include <numdef.hxx>
+#endif
+#ifndef _SV_GRAPH_HXX //autogen
+#include <vcl/graph.hxx>
+#endif
+#ifndef _SV_WINDOW_HXX //autogen
+#include <vcl/window.hxx>
+#endif
+#include <vcl/svapp.hxx>
+
+SvxNumberFormat SvxNumRule::aStdNumFmt(SVX_NUM_ARABIC);
+SvxNumberFormat SvxNumRule::aStdOutlineNumFmt(SVX_NUM_NUMBER_NONE);
+
+#define MM100_TO_TWIP(MM100) ((MM100*72L+63L)/127L)
+
+#define DEF_WRITER_LSPACE 500 //Standardeinrueckung
+#define DEF_DRAW_LSPACE 800 //Standardeinrueckung
+
+/* -----------------27.10.98 10:33-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumberFormat::SvxNumberFormat(SvxExtNumType eType) :
+ eNumType(eType),
+ eNumAdjust(SVX_ADJUST_LEFT),
+ nInclUpperLevels(0),
+ nStart(1),
+ cBullet(SVX_DEF_BULLET),
+ nFirstLineOffset(0),
+ nAbsLSpace(0),
+ nLSpace(0),
+ nCharTextDistance(0),
+ pGraphicBrush(0),
+ eVertOrient(SVX_VERT_NONE),
+ nBulletRelSize(100),
+ nBulletColor(COL_BLACK),
+ pBulletFont(0),
+ bShowSymbol(TRUE)
+{
+}
+/* -----------------27.10.98 10:56-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumberFormat::SvxNumberFormat(const SvxNumberFormat& rFormat)
+{
+ eNumType = rFormat.eNumType;
+ eNumAdjust = rFormat.eNumAdjust;
+ nInclUpperLevels = rFormat.nInclUpperLevels;
+ nStart = rFormat.nStart;
+ cBullet = rFormat.cBullet;
+ nFirstLineOffset = rFormat.nFirstLineOffset;
+ nAbsLSpace = rFormat.nAbsLSpace;
+ nLSpace = rFormat.nLSpace;
+ nCharTextDistance = rFormat.nCharTextDistance;
+ sPrefix = rFormat.sPrefix;
+ sSuffix = rFormat.sSuffix;
+ sCharStyleName = rFormat.sCharStyleName;
+ pGraphicBrush = rFormat.pGraphicBrush ? new SvxBrushItem(*rFormat.pGraphicBrush) : 0;
+ eVertOrient = rFormat.eVertOrient;
+ pBulletFont = rFormat.pBulletFont ? new Font(*rFormat.pBulletFont) : 0;
+ aGraphicSize = rFormat.aGraphicSize;
+ nBulletColor = rFormat.nBulletColor;
+ nBulletRelSize = rFormat.nBulletRelSize;
+ bShowSymbol = rFormat.bShowSymbol;
+}
+/* -----------------27.10.98 10:56-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumberFormat::~SvxNumberFormat()
+{
+ delete pGraphicBrush;
+ delete pBulletFont;
+}
+/* -----------------08.12.98 11:14-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumberFormat::SvxNumberFormat(SvStream &rStream)
+{
+ USHORT nVersion;
+ rStream >> nVersion;
+
+ USHORT nUSHORT;
+ rStream >> nUSHORT;
+ eNumType = (SvxExtNumType )nUSHORT;
+ rStream >> nUSHORT;
+ eNumAdjust = (SvxAdjust)nUSHORT;
+ rStream >> nUSHORT;
+ nInclUpperLevels = (BYTE)nUSHORT;
+ rStream >> nUSHORT;
+ nStart = nUSHORT;
+ rStream >> nUSHORT;
+ cBullet = nUSHORT;
+
+ short nShort;
+ rStream >> nShort;
+ nFirstLineOffset = nShort;
+ rStream >> nShort;
+ nAbsLSpace = nShort;
+ rStream >> nShort;
+ nLSpace = nShort;
+
+ rStream >> nShort;
+ nCharTextDistance = nShort;
+ rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
+ rStream.ReadByteString(sPrefix, eEnc);
+ rStream.ReadByteString(sSuffix, eEnc);
+ rStream.ReadByteString(sCharStyleName, eEnc);
+ rStream >> nUSHORT;
+ if(nUSHORT)
+ {
+ SvxBrushItem aHelper;
+ pGraphicBrush = (SvxBrushItem*) aHelper.Create( rStream, BRUSH_GRAPHIC_VERSION );
+ }
+ else
+ pGraphicBrush = 0;
+
+ rStream >> nUSHORT;
+ eVertOrient = (SvxFrameVertOrient)nUSHORT;
+
+ rStream >> nUSHORT;
+ if(nUSHORT)
+ {
+ pBulletFont = new Font;
+ rStream >> *pBulletFont;
+ }
+ else
+ pBulletFont = 0;
+ rStream >> aGraphicSize;
+
+ rStream >> nBulletColor;
+ rStream >> nUSHORT;
+ nBulletRelSize = nUSHORT;
+ rStream >> nUSHORT;
+ bShowSymbol = (BOOL)nUSHORT;
+
+ if( nVersion < NUMITEM_VERSION_03 )
+ cBullet = ByteString::ConvertToUnicode( cBullet,
+ pBulletFont ? pBulletFont->GetCharSet()
+ : RTL_TEXTENCODING_SYMBOL );
+}
+/* -----------------08.12.98 11:14-------------------
+ *
+ * --------------------------------------------------*/
+SvStream& SvxNumberFormat::Store(SvStream &rStream)
+{
+ rStream << (USHORT)NUMITEM_VERSION_03;
+
+ rStream << (USHORT)eNumType;
+ rStream << (USHORT)eNumAdjust;
+ rStream << (USHORT)nInclUpperLevels;
+ rStream << nStart;
+ rStream << (USHORT)cBullet;
+
+ rStream << nFirstLineOffset;
+ rStream << nAbsLSpace;
+ rStream << nLSpace;
+
+ rStream << nCharTextDistance;
+ rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
+ rStream.WriteByteString(sPrefix, eEnc);
+ rStream.WriteByteString(sSuffix, eEnc);
+ rStream.WriteByteString(sCharStyleName, eEnc);
+ if(pGraphicBrush)
+ {
+ rStream << (USHORT)1;
+
+ // #75113# in SD or SI force bullet itself to be stored,
+ // for that purpose throw away link when link and graphic
+ // are present, so Brush save is forced
+ if(pGraphicBrush->GetGraphicLink() && pGraphicBrush->GetGraphic())
+ {
+ String aEmpty;
+ pGraphicBrush->SetGraphicLink(aEmpty);
+ }
+
+ pGraphicBrush->Store(rStream, BRUSH_GRAPHIC_VERSION);
+ }
+ else
+ rStream << (USHORT)0;
+
+ rStream << (USHORT)eVertOrient;
+ if(pBulletFont)
+ {
+ rStream << (USHORT)1;
+ rStream << *pBulletFont;
+ }
+ else
+ rStream << (USHORT)0;
+ rStream << aGraphicSize;
+
+ rStream << nBulletColor;
+ rStream << nBulletRelSize;
+ rStream << (USHORT)bShowSymbol;
+ return rStream;
+}
+
+/* -----------------27.10.98 10:56-------------------
+ *
+ * --------------------------------------------------*/
+BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const
+{
+ if( eNumType != rFormat.eNumType ||
+ eNumAdjust != rFormat.eNumAdjust ||
+ nInclUpperLevels != rFormat.nInclUpperLevels ||
+ nStart != rFormat.nStart ||
+ cBullet != rFormat.cBullet ||
+ nFirstLineOffset != rFormat.nFirstLineOffset ||
+ nAbsLSpace != rFormat.nAbsLSpace ||
+ nLSpace != rFormat.nLSpace ||
+ nCharTextDistance != rFormat.nCharTextDistance ||
+ eVertOrient != rFormat.eVertOrient ||
+ sPrefix != rFormat.sPrefix ||
+ sSuffix != rFormat.sSuffix ||
+ aGraphicSize != rFormat.aGraphicSize ||
+ nBulletColor != rFormat.nBulletColor ||
+ nBulletRelSize != rFormat.nBulletRelSize ||
+ bShowSymbol != rFormat.bShowSymbol ||
+ sCharStyleName != rFormat.sCharStyleName
+ )
+ return FALSE;
+ if(pGraphicBrush && !rFormat.pGraphicBrush ||
+ !pGraphicBrush && rFormat.pGraphicBrush ||
+ pGraphicBrush && *pGraphicBrush != *rFormat.pGraphicBrush )
+ return FALSE;
+ if(pBulletFont && !rFormat.pBulletFont ||
+ !pBulletFont && rFormat.pBulletFont ||
+ pBulletFont && *pBulletFont != *rFormat.pBulletFont)
+ return FALSE;
+ return TRUE;
+}
+/* -----------------28.10.98 09:53-------------------
+ *
+ * --------------------------------------------------*/
+void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem,
+ const Size* pSize, const SvxFrameVertOrient* pOrient)
+{
+ if(!pBrushItem)
+ {
+ delete pGraphicBrush;
+ pGraphicBrush = 0;
+ }
+ else if(!pGraphicBrush || pGraphicBrush && !(*pBrushItem == *pGraphicBrush))
+ {
+ delete pGraphicBrush;
+ pGraphicBrush = (SvxBrushItem*)pBrushItem->Clone();
+ }
+
+ if(pOrient)
+ eVertOrient = *pOrient;
+ else
+ eVertOrient = SVX_VERT_NONE;
+ if(pSize)
+ aGraphicSize = *pSize;
+ else
+ aGraphicSize.Width() = aGraphicSize.Height() = 0;
+}
+/* -----------------28.10.98 09:59-------------------
+ *
+ * --------------------------------------------------*/
+void SvxNumberFormat::SetGraphic( const String& rName )
+{
+ const String* pName;
+ if( pGraphicBrush &&
+ 0 != (pName = pGraphicBrush->GetGraphicLink())
+ && *pName == rName )
+ return ;
+
+ delete pGraphicBrush;
+ String sTmp;
+ pGraphicBrush = new SvxBrushItem( rName, sTmp, GPOS_AREA );
+ pGraphicBrush->SetDoneLink( STATIC_LINK( this, SvxNumberFormat, GraphicArrived) );
+ if( eVertOrient == SVX_VERT_NONE )
+ eVertOrient = SVX_VERT_TOP;
+
+ aGraphicSize.Width() = aGraphicSize.Height() = 0;
+}
+void SvxNumberFormat::SetBulletFont(const Font* pFont)
+{
+ delete pBulletFont;
+ pBulletFont = pFont ? new Font(*pFont): 0;
+}
+
+/* -----------------28.10.98 10:03-------------------
+ *
+ * --------------------------------------------------*/
+IMPL_STATIC_LINK( SvxNumberFormat, GraphicArrived, void *, EMPTYARG )
+{
+ // ggfs. die GrfSize setzen:
+ if( !pThis->aGraphicSize.Width() || !pThis->aGraphicSize.Height() )
+ {
+ const Graphic* pGrf = pThis->pGraphicBrush->GetGraphic();
+ if( pGrf )
+ pThis->aGraphicSize = SvxNumberFormat::GetGraphicSizeMM100( pGrf );
+ }
+ return 0;
+}
+/* -----------------28.10.98 10:38-------------------
+ *
+ * --------------------------------------------------*/
+Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic)
+{
+ const MapMode aMapMM100( MAP_100TH_MM );
+ const Size& rSize = pGraphic->GetPrefSize();
+ Size aRetSize;
+ if ( pGraphic->GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ {
+ OutputDevice* pOutDev = Application::GetDefaultDevice();
+ MapMode aOldMap( pOutDev->GetMapMode() );
+ pOutDev->SetMapMode( aMapMM100 );
+ aRetSize = pOutDev->PixelToLogic( rSize );
+ pOutDev->SetMapMode( aOldMap );
+ }
+ else
+ aRetSize = OutputDevice::LogicToLogic( rSize, pGraphic->GetPrefMapMode(), aMapMM100 );
+ return aRetSize;
+}
+/* -----------------28.10.98 15:57-------------------
+ *
+ * --------------------------------------------------*/
+String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper )
+{
+ nNo %= 4000; // mehr kann nicht dargestellt werden
+// i, ii, iii, iv, v, vi, vii, vii, viii, ix
+// (Dummy),1000,500,100,50,10,5,1
+ char *cRomanArr = bUpper
+ ? "MDCLXVI--" // +2 Dummy-Eintraege !!
+ : "mdclxvi--"; // +2 Dummy-Eintraege !!
+
+ String sRet;
+ USHORT nMask = 1000;
+ while( nMask )
+ {
+ BYTE nZahl = BYTE(nNo / nMask);
+ BYTE nDiff = 1;
+ nNo %= nMask;
+
+ if( 5 < nZahl )
+ {
+ if( nZahl < 9 )
+ sRet += sal_Unicode(*(cRomanArr-1));
+ ++nDiff;
+ nZahl -= 5;
+ }
+ switch( nZahl )
+ {
+ case 3: { sRet += sal_Unicode(*cRomanArr); }
+ case 2: { sRet += sal_Unicode(*cRomanArr); }
+ case 1: { sRet += sal_Unicode(*cRomanArr); }
+ break;
+
+ case 4: {
+ sRet += sal_Unicode(*cRomanArr);
+ sRet += sal_Unicode(*(cRomanArr-nDiff));
+ }
+ break;
+ case 5: { sRet += sal_Unicode(*(cRomanArr-nDiff)); }
+ break;
+ }
+
+ nMask /= 10; // zur naechsten Dekade
+ cRomanArr += 2;
+ }
+ return sRet;
+}
+
+
+void SvxNumberFormat::GetCharStr( ULONG nNo, String& rStr ) const
+{
+ DBG_ASSERT( nNo, "0 ist eine ungueltige Nummer !!" );
+
+ const ULONG coDiff = 'Z' - 'A' +1;
+ char cAdd = (SVX_NUM_CHARS_UPPER_LETTER == eNumType ? 'A' : 'a') - 1;
+ ULONG nCalc;
+
+ do {
+ nCalc = nNo % coDiff;
+ if( !nCalc )
+ nCalc = coDiff;
+ rStr.Insert( sal_Unicode(cAdd + nCalc ), 0 );
+ nNo -= nCalc;
+ if( nNo )
+ nNo /= coDiff;
+ } while( nNo );
+}
+
+void SvxNumberFormat::GetCharStrN( ULONG nNo, String& rStr ) const
+{
+ DBG_ASSERT( nNo, "0 ist eine ungueltige Nummer !!" );
+
+ const ULONG coDiff = 'Z' - 'A' +1;
+ char cChar = (char)(--nNo % coDiff);
+ if( SVX_NUM_CHARS_UPPER_LETTER_N == eNumType )
+ cChar += 'A';
+ else
+ cChar += 'a';
+
+ rStr.Fill( (USHORT)(nNo / coDiff) + 1, sal_Unicode(cChar) );
+}
+
+/* -----------------28.10.98 15:56-------------------
+ *
+ * --------------------------------------------------*/
+String SvxNumberFormat::GetNumStr( ULONG nNo ) const
+{
+ String aTmpStr;
+ if(bShowSymbol)
+ {
+ if( nNo )
+ {
+ switch( eNumType )
+ {
+ case SVX_NUM_CHARS_UPPER_LETTER:
+ case SVX_NUM_CHARS_LOWER_LETTER:
+ GetCharStr( nNo, aTmpStr );
+ break;
+
+ case SVX_NUM_CHARS_UPPER_LETTER_N:
+ case SVX_NUM_CHARS_LOWER_LETTER_N:
+ GetCharStrN( nNo, aTmpStr );
+ break;
+
+ case SVX_NUM_ROMAN_UPPER:
+ case SVX_NUM_ROMAN_LOWER:
+ aTmpStr += CreateRomanString( nNo, SVX_NUM_ROMAN_UPPER == eNumType );
+ break;
+
+ case SVX_NUM_NUMBER_NONE:
+ break;
+
+ // SVX_NUM_CHAR_SPECIAL:
+ // ????
+
+ // case SVX_NUM_ARABIC: ist jetzt default
+ default:
+ aTmpStr = UniString::CreateFromInt32( nNo );
+ break;
+ }
+ }
+ else
+ aTmpStr = sal_Unicode('0');
+ }
+ return aTmpStr;
+}
+
+/* -----------------27.10.98 10:38-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumRule::SvxNumRule(ULONG nFeatures, USHORT nLevels, BOOL bCont, SvxNumRuleType eType) :
+ nLevelCount(nLevels),
+ nFeatureFlags(nFeatures),
+ bContinuousNumbering(bCont),
+ eNumberingType(eType)
+{
+ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ {
+ if(i < nLevels)
+ {
+ aFmts[i] = new SvxNumberFormat(SVX_NUM_CHARS_UPPER_LETTER);
+ //daran wird zwischen writer und draw unterschieden
+ if(bContinuousNumbering)
+ {
+ aFmts[i]->SetLSpace( MM100_TO_TWIP(DEF_WRITER_LSPACE) );
+ aFmts[i]->SetAbsLSpace( MM100_TO_TWIP(DEF_WRITER_LSPACE * (i+1)) );
+ }
+ else
+ {
+ aFmts[i]->SetLSpace( DEF_DRAW_LSPACE );
+ aFmts[i]->SetAbsLSpace( DEF_DRAW_LSPACE * (i) );
+ }
+ }
+ else
+ aFmts[i] = 0;
+ aFmtsSet[i] = FALSE;
+ }
+}
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumRule::SvxNumRule(const SvxNumRule& rCopy)
+{
+ nLevelCount = rCopy.nLevelCount ;
+ nFeatureFlags = rCopy.nFeatureFlags ;
+ bContinuousNumbering = rCopy.bContinuousNumbering;
+ eNumberingType = rCopy.eNumberingType;
+ memset( aFmts, 0, sizeof( aFmts ));
+ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ {
+ if(rCopy.aFmts[i])
+ aFmts[i] = new SvxNumberFormat(*rCopy.aFmts[i]);
+ else
+ aFmts[i] = 0;
+ aFmtsSet[i] = rCopy.aFmtsSet[i];
+ }
+}
+/* -----------------08.12.98 11:07-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumRule::SvxNumRule(SvStream &rStream)
+{
+ USHORT nVersion;
+ USHORT nTemp;
+ rStream >> nVersion;
+ rStream >> nLevelCount;
+ rStream >> nTemp;
+ nFeatureFlags = nTemp;
+ rStream >> nTemp;
+ bContinuousNumbering = (BOOL)nTemp;
+ rStream >> nTemp;
+ eNumberingType = (SvxNumRuleType)nTemp;
+ memset( aFmts, 0, sizeof( aFmts ));
+
+ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ {
+ USHORT nSet;
+ rStream >> nSet;
+ if(nSet)
+ aFmts[i] = new SvxNumberFormat(rStream);
+ else
+ aFmts[i] = 0;
+ aFmtsSet[i] = aFmts[i] ? TRUE : FALSE;
+ }
+ if(NUMITEM_VERSION_02 <= nVersion)
+ {
+ USHORT nShort;
+ rStream >> nShort;
+ nFeatureFlags = nShort;
+ }
+}
+
+/* -----------------08.12.98 11:07-------------------
+ *
+ * --------------------------------------------------*/
+SvStream& SvxNumRule::Store(SvStream &rStream)
+{
+ rStream<<(USHORT)NUMITEM_VERSION_03;
+ rStream<<nLevelCount;
+ //first save of nFeatureFlags for old versions
+ rStream<<(USHORT)nFeatureFlags;
+ rStream<<(USHORT)bContinuousNumbering;
+ rStream<<(USHORT)eNumberingType;
+
+ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ {
+ if(aFmts[i])
+ {
+ rStream << USHORT(1);
+ aFmts[i]->Store(rStream);
+ }
+ else
+ rStream << USHORT(0);
+ }
+ //second save of nFeatureFlags for new versions
+ rStream<<(USHORT)nFeatureFlags;
+
+ return rStream;
+}
+
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumRule::~SvxNumRule()
+{
+ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ delete aFmts[i];
+}
+/* -----------------29.10.98 16:07-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumRule& SvxNumRule::operator=( const SvxNumRule& rCopy )
+{
+ nLevelCount = rCopy.nLevelCount;
+ nFeatureFlags = rCopy.nFeatureFlags;
+ bContinuousNumbering = rCopy.bContinuousNumbering;
+ eNumberingType = rCopy.eNumberingType;
+ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ {
+ delete aFmts[i];
+ if(rCopy.aFmts[i])
+ aFmts[i] = new SvxNumberFormat(*rCopy.aFmts[i]);
+ else
+ aFmts[i] = 0;
+ aFmtsSet[i] = rCopy.aFmtsSet[i];
+ }
+ return *this;
+}
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+int SvxNumRule::operator==( const SvxNumRule& rCopy) const
+{
+ if(nLevelCount != rCopy.nLevelCount ||
+ nFeatureFlags != rCopy.nFeatureFlags ||
+ bContinuousNumbering != rCopy.bContinuousNumbering ||
+ eNumberingType != rCopy.eNumberingType)
+ return FALSE;
+ for(USHORT i = 0; i < nLevelCount; i++)
+ {
+ if( aFmtsSet[i] != rCopy.aFmtsSet[i] ||
+ !aFmts[i] && rCopy.aFmts[i] ||
+ aFmts[i] && !rCopy.aFmts[i] ||
+ aFmts[i] && *aFmts[i] != *rCopy.aFmts[i] )
+ return FALSE;
+ }
+ return TRUE;
+}
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const
+{
+ DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" )
+ return aFmtsSet[nLevel] ? aFmts[nLevel] : 0;
+}
+/* -----------------02.11.98 09:10-------------------
+ *
+ * --------------------------------------------------*/
+const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const
+{
+ DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" )
+ return aFmts[nLevel] ?
+ *aFmts[nLevel] : eNumberingType == SVX_RULETYPE_NUMBERING ?
+ aStdNumFmt : aStdOutlineNumFmt;
+}
+
+/* -----------------29.10.98 09:08-------------------
+ *
+ * --------------------------------------------------*/
+void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsValid )
+{
+ if( !aFmtsSet[i] || !(rNumFmt == *Get( i )) )
+ {
+ delete aFmts[ i ];
+ aFmts[ i ] = new SvxNumberFormat( rNumFmt );
+ aFmtsSet[i] = bIsValid;
+// bInvalidRuleFlag = TRUE;
+ }
+}
+/* -----------------30.10.98 12:44-------------------
+ *
+ * --------------------------------------------------*/
+void SvxNumRule::SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt)
+{
+ aFmtsSet[nLevel] = 0 != pFmt;
+ if(pFmt)
+ SetLevel(nLevel, *pFmt);
+ else
+ {
+ delete aFmts[nLevel];
+ aFmts[nLevel] = 0;
+ }
+}
+/* -----------------28.10.98 15:38-------------------
+ *
+ * --------------------------------------------------*/
+String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) const
+{
+ String aStr;
+ if( SVX_NO_NUM > rNum.GetLevel() && !( SVX_NO_NUMLEVEL & rNum.GetLevel() ) )
+ {
+ const SvxNumberFormat& rMyNFmt = GetLevel( rNum.GetLevel() );
+ if( SVX_NUM_NUMBER_NONE != rMyNFmt.GetNumType() )
+ {
+ BYTE i = rNum.GetLevel();
+
+ if( !IsContinuousNumbering() &&
+ 1 < rMyNFmt.GetIncludeUpperLevels() ) // nur der eigene Level ?
+ {
+ BYTE n = rMyNFmt.GetIncludeUpperLevels();
+ if( 1 < n )
+ {
+ if( i+1 >= n )
+ i -= n - 1;
+ else
+ i = 0;
+ }
+ }
+
+ for( ; i <= rNum.GetLevel(); ++i )
+ {
+ const SvxNumberFormat& rNFmt = GetLevel( i );
+ if( SVX_NUM_NUMBER_NONE == rNFmt.GetNumType() )
+ {
+ // Soll aus 1.1.1 --> 2. NoNum --> 1..1 oder 1.1 ??
+ // if( i != rNum.nMyLevel )
+ // aStr += aDotStr;
+ continue;
+ }
+
+ if( rNum.GetLevelVal()[ i ] )
+ aStr += rNFmt.GetNumStr( rNum.GetLevelVal()[ i ] );
+ else
+ aStr += sal_Unicode('0'); // alle 0-Level sind eine 0
+ if( i != rNum.GetLevel() )
+ aStr += sal_Unicode('.');
+ }
+ }
+
+ if( bInclStrings )
+ {
+ aStr.Insert( rMyNFmt.GetPrefix(), 0 );
+ aStr += rMyNFmt.GetSuffix();
+ }
+ }
+ return aStr;
+}
+/* -----------------18.08.99 10:18-------------------
+ Description: changes linked to embedded bitmaps
+ --------------------------------------------------*/
+BOOL SvxNumRule::UnLinkGraphics()
+{
+ BOOL bRet = FALSE;
+ for(USHORT i = 0; i < GetLevelCount(); i++)
+ {
+ SvxNumberFormat aFmt(GetLevel(i));
+ const SvxBrushItem* pBrush = aFmt.GetBrush();
+ const String* pLinkStr;
+ const Graphic* pGraphic;
+ if(SVX_NUM_BITMAP == aFmt.GetNumType())
+ {
+ if(pBrush &&
+ 0 != (pLinkStr = pBrush->GetGraphicLink()) &&
+ pLinkStr->Len() &&
+ 0 !=(pGraphic = pBrush->GetGraphic()))
+ {
+ SvxBrushItem aTempItem(*pBrush);
+ aTempItem.SetGraphicLink( String());
+ aTempItem.SetGraphic(*pGraphic);
+ SvxFrameVertOrient eOrient = aFmt.GetVertOrient();
+ aFmt.SetGraphicBrush( &aTempItem, &aFmt.GetGraphicSize(), &eOrient );
+ bRet = TRUE;
+ }
+ }
+ else if((SVX_NUM_BITMAP|LINK_TOKEN) == aFmt.GetNumType())
+ aFmt.SetNumType(SVX_NUM_BITMAP);
+ SetLevel(i, aFmt);
+ }
+ return bRet;
+}
+
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule) :
+ SfxPoolItem(SID_ATTR_NUMBERING_RULE),
+ pNumRule(new SvxNumRule(rRule))
+{
+}
+
+/*-----------------23.11.98 10:36-------------------
+ MT: Das sind ja sehr sinnige Kommentare...
+--------------------------------------------------*/
+SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule, USHORT nWhich ) :
+ SfxPoolItem(nWhich),
+ pNumRule(new SvxNumRule(rRule))
+{
+}
+
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumBulletItem::SvxNumBulletItem(const SvxNumBulletItem& rCopy) :
+ SfxPoolItem(rCopy.Which())
+{
+ pNumRule = new SvxNumRule(*rCopy.pNumRule);
+}
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+SvxNumBulletItem::~SvxNumBulletItem()
+{
+ delete pNumRule;
+}
+
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+int SvxNumBulletItem::operator==( const SfxPoolItem& rCopy) const
+{
+ return *pNumRule == *((SvxNumBulletItem&)rCopy).pNumRule;
+}
+/* -----------------27.10.98 10:41-------------------
+ *
+ * --------------------------------------------------*/
+SfxPoolItem* SvxNumBulletItem::Clone( SfxItemPool *pPool ) const
+{
+ return new SvxNumBulletItem(*this);
+}
+/* -----------------08.12.98 10:43-------------------
+ *
+ * --------------------------------------------------*/
+SfxPoolItem* SvxNumBulletItem::Create(SvStream &rStream, USHORT) const
+{
+ SvxNumRule aRule(rStream);
+ return new SvxNumBulletItem(aRule, Which() );
+}
+/* -----------------08.12.98 10:43-------------------
+ *
+ * --------------------------------------------------*/
+SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT nItemVersion )const
+{
+ pNumRule->Store(rStream);
+ return rStream;
+}
+/* -----------------08.12.98 10:43-------------------
+ *
+ * --------------------------------------------------*/
+USHORT SvxNumBulletItem::GetVersion( USHORT nFileVersion ) const
+{
+ return NUMITEM_VERSION_03;
+}
+
+
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
new file mode 100644
index 0000000000..55a94e700e
--- /dev/null
+++ b/svx/source/items/pageitem.cxx
@@ -0,0 +1,378 @@
+/*************************************************************************
+ *
+ * $RCSfile: pageitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+#pragma hdrstop
+
+// Erstmal definieren, damit die Klassendeklarionen angezogen werden.
+#define ITEMID_PAGE 0
+#define ITEMID_SETITEM 0
+
+#include "pageitem.hxx"
+#include "itemtype.hxx"
+#include <unomid.hxx>
+
+#ifndef _COM_SUN_STAR_STYLE_PAGESTYLELAYOUT_HPP_
+#include <com/sun/star/style/PageStyleLayout.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_BREAKTYPE_HPP_
+#include <com/sun/star/style/BreakType.hpp>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// STATIC DATA -----------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY( SvxPageItem, SfxPoolItem );
+
+/*--------------------------------------------------------------------
+ Beschreibung: Konstruktor
+ --------------------------------------------------------------------*/
+
+SvxPageItem::SvxPageItem( const USHORT nId ) : SfxPoolItem( nId ),
+
+ eNumType ( SVX_ARABIC ),
+ bLandscape ( sal_False ),
+ eUse ( SVX_PAGE_ALL )
+{
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Copy-Konstruktor
+ --------------------------------------------------------------------*/
+
+SvxPageItem::SvxPageItem( const SvxPageItem& rItem )
+ : SfxPoolItem( rItem )
+{
+ eNumType = rItem.eNumType;
+ bLandscape = rItem.bLandscape;
+ eUse = rItem.eUse;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Clonen
+ --------------------------------------------------------------------*/
+
+SfxPoolItem* SvxPageItem::Clone( SfxItemPool *pPool ) const
+{
+ return new SvxPageItem( *this );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Abfrage auf Gleichheit
+ --------------------------------------------------------------------*/
+
+int SvxPageItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+ const SvxPageItem& rItem = (SvxPageItem&)rAttr;
+ return ( eNumType == rItem.eNumType &&
+ bLandscape == rItem.bLandscape &&
+ eUse == rItem.eUse );
+}
+
+inline XubString GetUsageText( const USHORT eU )
+{
+ if ( eU & SVX_PAGE_LEFT )
+ return SVX_RESSTR(RID_SVXITEMS_PAGE_USAGE_LEFT);
+ if ( eU & SVX_PAGE_RIGHT )
+ return SVX_RESSTR(RID_SVXITEMS_PAGE_USAGE_RIGHT);
+ if ( eU & SVX_PAGE_ALL )
+ return SVX_RESSTR(RID_SVXITEMS_PAGE_USAGE_ALL);
+ if ( eU & SVX_PAGE_MIRROR )
+ return SVX_RESSTR(RID_SVXITEMS_PAGE_USAGE_MIRROR);
+ return String();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxPageItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return SFX_ITEM_PRESENTATION_NONE;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ {
+ if ( aDescName.Len() )
+ {
+ rText = aDescName;
+ rText += cpDelim;
+ }
+ DBG_ASSERT( eNumType <= SVX_NUMBER_NONE, "enum overflow" );
+ rText += SVX_RESSTR(RID_SVXITEMS_PAGE_NUM_BEGIN + eNumType);
+ rText += cpDelim;
+ if ( bLandscape )
+ rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_TRUE);
+ else
+ rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_FALSE);
+ rText += GetUsageText( eUse );
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+ }
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ rText += SVX_RESSTR(RID_SVXITEMS_PAGE_COMPLETE);
+ if ( aDescName.Len() )
+ {
+ rText += aDescName;
+ rText += cpDelim;
+ }
+ DBG_ASSERT( eNumType <= SVX_NUMBER_NONE, "enum overflow" );
+ rText += SVX_RESSTR(RID_SVXITEMS_PAGE_NUM_BEGIN + eNumType);
+ rText += cpDelim;
+ if ( bLandscape )
+ rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_TRUE);
+ else
+ rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_FALSE);
+ rText += GetUsageText( eUse );
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+sal_Bool SvxPageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch( nMemberId )
+ {
+ case MID_PAGE_NUMTYPE:
+ {
+ //! die Konstanten sind nicht mehr in den IDLs ?!?
+ rVal <<= (sal_Int16)( eNumType );
+ }
+ break;
+ case MID_PAGE_ORIENTATION:
+ //Landscape= sal_True
+ rVal = Bool2Any(bLandscape);
+ break;
+ case MID_PAGE_LAYOUT :
+ {
+ style::PageStyleLayout eRet;
+ switch(eUse & 0x0f)
+ {
+ case SVX_PAGE_LEFT : eRet = style::PageStyleLayout_LEFT; break;
+ case SVX_PAGE_RIGHT : eRet = style::PageStyleLayout_RIGHT; break;
+ case SVX_PAGE_ALL : eRet = style::PageStyleLayout_ALL; break;
+ case SVX_PAGE_MIRROR: eRet = style::PageStyleLayout_MIRRORED; break;
+ default:
+ DBG_ERROR("was fuer ein Layout ist das?");
+ return sal_False;
+ }
+ rVal <<= eRet;
+ }
+ break;
+ }
+
+ return sal_True;
+}
+//------------------------------------------------------------------------
+sal_Bool SvxPageItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ switch( nMemberId )
+ {
+ case MID_PAGE_NUMTYPE:
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ eNumType = (SvxNumType)nValue;
+ }
+ break;
+ case MID_PAGE_ORIENTATION:
+ bLandscape = Any2Bool(rVal);
+ break;
+ case MID_PAGE_LAYOUT :
+ {
+ style::PageStyleLayout eLayout;
+ if(!(rVal >>= eLayout))
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ eLayout = (style::PageStyleLayout)eLayout;
+ }
+ eUse &= 0xfff0;
+ switch( eLayout )
+ {
+ case style::PageStyleLayout_LEFT : eUse |= SVX_PAGE_LEFT ; break;
+ case style::PageStyleLayout_RIGHT : eUse |= SVX_PAGE_RIGHT; break;
+ case style::PageStyleLayout_ALL : eUse |= SVX_PAGE_ALL ; break;
+ case style::PageStyleLayout_MIRRORED: eUse |= SVX_PAGE_MIRROR;break;
+ }
+ }
+ break;
+ }
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxPageItem::Create( SvStream& rStream, USHORT ) const
+{
+ XubString sStr;
+ BYTE eType;
+ sal_Bool bLand;
+ USHORT nUse;
+
+ // UNICODE: rStream >> sStr;
+ rStream.ReadByteString( sStr );
+
+ rStream >> eType;
+ rStream >> bLand;
+ rStream >> nUse;
+
+ SvxPageItem* pPage = new SvxPageItem( Which() );
+ pPage->SetDescName( sStr );
+ pPage->SetNumType( (SvxNumType)eType );
+ pPage->SetLandscape( bLand );
+ pPage->SetPageUsage( nUse );
+ return pPage;
+}
+
+//------------------------------------------------------------------------
+
+SvStream& SvxPageItem::Store( SvStream &rStrm, USHORT nItemVersion ) const
+{
+ // UNICODE: rStrm << aDescName;
+ rStrm.WriteByteString(aDescName);
+
+ rStrm << (BYTE)eNumType << bLandscape << eUse;
+ return rStrm;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: HeaderFooterSet
+ --------------------------------------------------------------------*/
+
+SvxSetItem::SvxSetItem( const USHORT nId, const SfxItemSet& rSet ) :
+
+ SfxSetItem( nId, rSet )
+{
+}
+
+SvxSetItem::SvxSetItem( const SvxSetItem& rItem ) :
+
+ SfxSetItem( rItem )
+{
+}
+
+SvxSetItem::SvxSetItem( const USHORT nId, SfxItemSet* pSet ) :
+
+ SfxSetItem( nId, pSet )
+{
+}
+
+SfxPoolItem* SvxSetItem::Clone( SfxItemPool *pPool ) const
+{
+ return new SvxSetItem(*this);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxSetItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+SfxPoolItem* SvxSetItem::Create(SvStream &rStrm, USHORT nVersion) const
+{
+ SfxItemSet* pSet = new SfxItemSet( *GetItemSet().GetPool(),
+ GetItemSet().GetRanges() );
+
+ pSet->Load( rStrm );
+
+ return new SvxSetItem( Which(), *pSet );
+}
+
+SvStream& SvxSetItem::Store(SvStream &rStrm, USHORT nItemVersion) const
+{
+ GetItemSet().Store( rStrm, nItemVersion );
+
+ return rStrm;
+}
+
+
diff --git a/svx/source/items/paperinf.cxx b/svx/source/items/paperinf.cxx
new file mode 100644
index 0000000000..36d6a94e19
--- /dev/null
+++ b/svx/source/items/paperinf.cxx
@@ -0,0 +1,378 @@
+/*************************************************************************
+ *
+ * $RCSfile: paperinf.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#include <vcl/svapp.hxx>
+#pragma hdrstop
+
+#include "dialogs.hrc"
+
+#include "paperinf.hxx"
+#include "dialmgr.hxx"
+
+#define SVX_PAPER_OFFSET 3 // Anfang: enum Paper A3 - SvxPaper A0; Diff=3
+
+// STATIC DATA -----------------------------------------------------------
+
+static Size __FAR_DATA aDinTab[] =
+{
+ Size(lA0Width,lA0Height), // A0
+ Size(lA1Width,lA1Height), // A1
+ Size(lA2Width,lA2Height), // A2
+ Size(lA3Width,lA3Height), // A3
+ Size(lA4Width,lA4Height), // A4
+ Size(lA5Width,lA5Height), // A5
+ Size(lB4Width, lB4Height), // B4
+ Size(lB5Width,lB5Height), // B5
+ Size(lLetterWidth,lLetterHeight), // LETTER
+ Size(lLegalWidth,lLegalHeight), // LEGAL
+ Size(lTabloidWidth,lTabloidHeight), // TABLOID
+ Size(0, 0), // USER
+ Size(lB6Width, lB6Height), // B6
+ Size(lC4Width, lC4Height), // C4
+ Size(lC5Width, lC5Height), // C5
+ Size(lC6Width, lC6Height), // C6
+ Size(lC65Width, lC65Height), // C65
+ Size(lDLWidth, lDLHeight), // DL
+ Size(lDiaWidth,lDiaHeight ), // DIA
+ Size(lScreenWidth, lScreenHeight), // SCREEN
+ Size(lAWidth, lAHeight), // A
+ Size(lBWidth, lBHeight), // B
+ Size(lCWidth, lCHeight), // C
+ Size(lDWidth, lDHeight), // D
+ Size(lEWidth, lEHeight), // E
+ Size(lExeWidth, lExeHeight), // Executive
+ Size(lLegal2Width, lLegal2Height), // Legal2
+ Size(lMonarchWidth, lMonarchHeight),// Monarch
+ Size(lCom675Width, lCom675Height), // COM-6 3/4
+ Size(lCom9Width, lCom9Height), // COM-9
+ Size(lCom10Width, lCom10Height), // COM-10
+ Size(lCom11Width, lCom11Height), // COM-11
+ Size(lCom12Width, lCom12Height), // COM-12
+ Size(lKai16Width, lKai16Height), // 16 kai
+ Size(lKai32Width, lKai32Height), // 32 kai
+ Size(lKai32BigWidth, lKai32BigHeight) // 32 kai gross
+};
+
+static const int nTabSize = sizeof(aDinTab) / sizeof(aDinTab[0]);
+
+// -----------------------------------------------------------------------
+
+long TwipsTo100thMM( long nIn )
+{
+ long nRet = OutputDevice::LogicToLogic( nIn, MAP_TWIP, MAP_100TH_MM );
+ long nTmp = nRet % 10;
+
+ if ( nTmp )
+ nRet += 10 - nTmp;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+Size ConvertTo100thMM( Size& rSize )
+{
+ // Convert form TWIPS to 100TH_MM
+ long nW = TwipsTo100thMM( rSize.Width() );
+ long nH = TwipsTo100thMM( rSize.Height() );
+
+ rSize.Width() = nW;
+ rSize.Height() = nH;
+ return rSize;
+}
+
+// -----------------------------------------------------------------------
+
+long HundMMToTwips( long nIn )
+{
+ long nRet = OutputDevice::LogicToLogic( nIn, MAP_100TH_MM, MAP_TWIP );
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+Size ConvertToTwips( Size& rSize )
+{
+ // Convert form TWIPS to 100TH_MM
+ long nW = HundMMToTwips( rSize.Width() );
+ long nH = HundMMToTwips( rSize.Height() );
+
+ rSize.Width() = nW;
+ rSize.Height() = nH;
+ return rSize;
+}
+
+// -----------------------------------------------------------------------
+
+SvxPaper GetPaper_Impl( const Size &rSize, MapUnit eUnit, BOOL bSloppy )
+{
+ DBG_ASSERT( eUnit == MAP_TWIP || eUnit == MAP_100TH_MM,
+ "map unit not supported" );
+ Size aSize = rSize;
+
+ if ( eUnit == MAP_100TH_MM )
+ ConvertToTwips( aSize );
+
+ for ( USHORT i = 0; i < nTabSize; i++ )
+ {
+ if ( aDinTab[i] == aSize )
+ return (SvxPaper)i;
+ else if ( bSloppy )
+ {
+ long lDiffW = Abs(aDinTab[i].Width () - aSize.Width ()),
+ lDiffH = Abs(aDinTab[i].Height() - aSize.Height());
+
+ if ( lDiffW < 6 && lDiffH < 6 )
+ return (SvxPaper)i;
+ }
+ }
+ return SVX_PAPER_USER;
+}
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ist der Printer gueltig
+ --------------------------------------------------------------------*/
+
+inline BOOL IsValidPrinter(const Printer *pPtr)
+{
+ return pPtr->GetName().Len() ? TRUE : FALSE;
+}
+
+/*------------------------------------------------------------------------
+ Beschreibung: Konvertierung eines SV-Defines fuer Papiergroesse in
+ Twips.
+ Funktioniert logischerweise nicht fuer User Groessen
+ (ASSERT).
+------------------------------------------------------------------------*/
+
+Size SvxPaperInfo::GetPaperSize( SvxPaper ePaper, MapUnit eUnit )
+{
+ DBG_ASSERT( ePaper < nTabSize, "Tabelle der Papiergroessen ueberindiziert" );
+ DBG_ASSERT( eUnit == MAP_TWIP || eUnit == MAP_100TH_MM, "this MapUnit not supported" );
+ Size aSize = aDinTab[ePaper]; // in Twips
+
+ if ( eUnit == MAP_100TH_MM )
+ ConvertTo100thMM( aSize );
+ return aSize;
+}
+
+/*------------------------------------------------------------------------
+ Beschreibung: Papiergroesse der Druckers liefern, aligned auf
+ die eigenen Groessen.
+ Falls kein Printer im System eingestellt ist,
+ wird DIN A4 Portrait als Defaultpapiergroesse geliefert.
+------------------------------------------------------------------------*/
+
+Size SvxPaperInfo::GetPaperSize( const Printer* pPrinter )
+{
+ if ( !IsValidPrinter(pPrinter) )
+ return GetPaperSize( SVX_PAPER_A4 );
+ const SvxPaper ePaper = (SvxPaper)(pPrinter->GetPaper() + SVX_PAPER_OFFSET);
+
+ if ( ePaper == SVX_PAPER_USER )
+ {
+ // Orientation nicht beruecksichtigen, da durch SV bereits
+ // die richtigen Masze eingestellt worden sind.
+ Size aPaperSize = pPrinter->GetPaperSize();
+ const Size aInvalidSize;
+
+ if ( aPaperSize == aInvalidSize )
+ {
+#ifdef OS2
+ // Workaround fuer OS/2, da class Printer unter OS/2 Macken hat
+ LanguageType eLType =
+ GetpApp()->GetAppInternational().GetLanguage();
+
+ if ( eLType == LANGUAGE_ENGLISH_US ||
+ eLType == LANGUAGE_ENGLISH_UK )
+ return GetPaperSize(SVX_PAPER_LETTER);
+ else
+ return GetPaperSize(SVX_PAPER_A4);
+#else
+ return GetPaperSize(SVX_PAPER_A4);
+#endif
+ }
+ MapMode aMap1 = pPrinter->GetMapMode();
+ MapMode aMap2;
+
+ if ( aMap1 == aMap2 )
+ aPaperSize =
+ pPrinter->PixelToLogic( aPaperSize, MapMode( MAP_TWIP ) );
+ return aPaperSize;
+ }
+
+ const Orientation eOrient = pPrinter->GetOrientation();
+ Size aSize( GetPaperSize( ePaper ) );
+ // bei Landscape die Seiten tauschen, ist bei SV schon geschehen
+ if ( eOrient == ORIENTATION_LANDSCAPE )
+ Swap( aSize );
+ return aSize;
+}
+
+/*------------------------------------------------------------------------
+ Beschreibung: Konvertierung einer Papiergroesse in Twips in das
+ SV-Define. Ist bSloppy TRUE, so wird nur auf 1/10 mm genau
+ verglichen.
+------------------------------------------------------------------------*/
+
+SvxPaper SvxPaperInfo::GetPaper( const Size &rSize, MapUnit eUnit,
+ BOOL bSloppy )
+{
+ return GetPaper_Impl( rSize, eUnit, bSloppy );
+}
+
+// -----------------------------------------------------------------------
+
+SvxPaper SvxPaperInfo::GetSvxPaper( const Size &rSize, MapUnit eUnit,
+ BOOL bSloppy )
+{
+ return GetPaper_Impl( rSize, eUnit, bSloppy );
+}
+
+// -----------------------------------------------------------------------
+
+Paper SvxPaperInfo::GetSvPaper( const Size &rSize, MapUnit eUnit,
+ BOOL bSloppy )
+{
+ SvxPaper ePaper = GetPaper_Impl( rSize, eUnit, bSloppy );
+
+ switch ( ePaper )
+ {
+ case SVX_PAPER_A3: return PAPER_A3;
+ case SVX_PAPER_A4: return PAPER_A4;
+ case SVX_PAPER_A5: return PAPER_A5;
+ case SVX_PAPER_B4: return PAPER_B4;
+ case SVX_PAPER_B5: return PAPER_B5;
+ case SVX_PAPER_LETTER: return PAPER_LETTER;
+ case SVX_PAPER_LEGAL: return PAPER_LEGAL;
+ case SVX_PAPER_TABLOID: return PAPER_TABLOID;
+ default: return PAPER_USER;
+ }
+}
+
+/*------------------------------------------------------------------------
+ Beschreibung: String Repr"asentation f"ur die SV-Defines f"ur
+ Papiergroessen.
+------------------------------------------------------------------------*/
+
+String SvxPaperInfo::GetName( SvxPaper ePaper )
+{
+ USHORT nResId = 0;
+
+ switch ( ePaper )
+ {
+ case SVX_PAPER_A0: nResId = RID_SVXSTR_PAPER_A0; break;
+ case SVX_PAPER_A1: nResId = RID_SVXSTR_PAPER_A1; break;
+ case SVX_PAPER_A2: nResId = RID_SVXSTR_PAPER_A2; break;
+ case SVX_PAPER_A3: nResId = RID_SVXSTR_PAPER_A3; break;
+ case SVX_PAPER_A4: nResId = RID_SVXSTR_PAPER_A4; break;
+ case SVX_PAPER_A5: nResId = RID_SVXSTR_PAPER_A5; break;
+ case SVX_PAPER_B4: nResId = RID_SVXSTR_PAPER_B4; break;
+ case SVX_PAPER_B5: nResId = RID_SVXSTR_PAPER_B5; break;
+ case SVX_PAPER_LETTER: nResId = RID_SVXSTR_PAPER_LETTER; break;
+ case SVX_PAPER_LEGAL: nResId = RID_SVXSTR_PAPER_LEGAL; break;
+ case SVX_PAPER_TABLOID: nResId = RID_SVXSTR_PAPER_TABLOID; break;
+ case SVX_PAPER_USER: nResId = RID_SVXSTR_PAPER_USER; break;
+ case SVX_PAPER_B6: nResId = RID_SVXSTR_PAPER_B6; break;
+ case SVX_PAPER_C4: nResId = RID_SVXSTR_PAPER_C4; break;
+ case SVX_PAPER_C5: nResId = RID_SVXSTR_PAPER_C5; break;
+ case SVX_PAPER_C6: nResId = RID_SVXSTR_PAPER_C6; break;
+ case SVX_PAPER_C65: nResId = RID_SVXSTR_PAPER_C65; break;
+ case SVX_PAPER_DL: nResId = RID_SVXSTR_PAPER_DL; break;
+ case SVX_PAPER_DIA: nResId = RID_SVXSTR_PAPER_DIA; break;
+ case SVX_PAPER_SCREEN: nResId = RID_SVXSTR_PAPER_SCREEN; break;
+ case SVX_PAPER_A: nResId = RID_SVXSTR_PAPER_A; break;
+ case SVX_PAPER_B: nResId = RID_SVXSTR_PAPER_B; break;
+ case SVX_PAPER_C: nResId = RID_SVXSTR_PAPER_C; break;
+ case SVX_PAPER_D: nResId = RID_SVXSTR_PAPER_D; break;
+ case SVX_PAPER_E: nResId = RID_SVXSTR_PAPER_E; break;
+ case SVX_PAPER_EXECUTIVE: nResId = RID_SVXSTR_PAPER_EXECUTIVE;break;
+ case SVX_PAPER_LEGAL2: nResId = RID_SVXSTR_PAPER_LEGAL2; break;
+ case SVX_PAPER_MONARCH: nResId = RID_SVXSTR_PAPER_MONARCH; break;
+ case SVX_PAPER_COM675: nResId = RID_SVXSTR_PAPER_COM675; break;
+ case SVX_PAPER_COM9: nResId = RID_SVXSTR_PAPER_COM9; break;
+ case SVX_PAPER_COM10: nResId = RID_SVXSTR_PAPER_COM10; break;
+ case SVX_PAPER_COM11: nResId = RID_SVXSTR_PAPER_COM11; break;
+ case SVX_PAPER_COM12: nResId = RID_SVXSTR_PAPER_COM12; break;
+ case SVX_PAPER_KAI16: nResId = RID_SVXSTR_PAPER_KAI16; break;
+ case SVX_PAPER_KAI32: nResId = RID_SVXSTR_PAPER_KAI32; break;
+ case SVX_PAPER_KAI32BIG: nResId = RID_SVXSTR_PAPER_KAI32BIG; break;
+
+ default: DBG_ERROR( "unknown papersize" );
+ }
+
+ if ( nResId )
+ return String( SVX_RES( nResId ) );
+ return String();
+}
+
+
diff --git a/svx/source/items/paraitem.cxx b/svx/source/items/paraitem.cxx
new file mode 100644
index 0000000000..9e3c83acc8
--- /dev/null
+++ b/svx/source/items/paraitem.cxx
@@ -0,0 +1,1740 @@
+/*************************************************************************
+ *
+ * $RCSfile: paraitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _COM_SUN_STAR_STYLE_TABSTOP_HPP_
+#include <com/sun/star/style/TabStop.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_TEXTADJUST_HPP_
+#include <com/sun/star/drawing/TextAdjust.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_LINESPACING_HPP_
+#include <com/sun/star/style/LineSpacing.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_LINESPACINGMODE_HPP_
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
+#include <com/sun/star/uno/Sequence.hxx>
+#endif
+#ifndef _UTL_TYPES_HXX_
+#include <unotools/types.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+#define ITEMID_TABSTOP 0
+#define ITEMID_LINESPACING 0
+#define ITEMID_ADJUST 0
+#define ITEMID_ORPHANS 0
+#define ITEMID_WIDOWS 0
+#define ITEMID_PAGEMODEL 0
+#define ITEMID_FMTSPLIT 0
+#define ITEMID_HYPHENZONE 0
+
+#include <tools/rtti.hxx>
+#include <svtools/sbx.hxx>
+#define GLOBALOVERFLOW3
+
+#define _SVX_PARAITEM_CXX
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _ARGS_HXX //autogen
+#include <svtools/args.hxx>
+#endif
+#include <svtools/memberid.hrc>
+#include "svxitems.hrc"
+
+#include "lspcitem.hxx"
+#include "adjitem.hxx"
+#include "orphitem.hxx"
+#include "widwitem.hxx"
+#include "tstpitem.hxx"
+#include "pmdlitem.hxx"
+#include "spltitem.hxx"
+#include "hyznitem.hxx"
+
+
+// xml stuff
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include <xmloff/xmlkywd.hxx>
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include <xmloff/xmluconv.hxx>
+#endif
+#include <rtl/ustring>
+#include <rtl/ustrbuf.hxx>
+
+#include <unomid.hxx>
+
+#include "itemtype.hxx"
+#include "dialmgr.hxx"
+#include "paperinf.hxx"
+
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// Konvertierung fuer UNO
+#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
+#define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
+
+// Adjust
+const drawing::TextAdjust aSvxToUnoAdjust[] =
+{
+ drawing::TextAdjust_LEFT,
+ drawing::TextAdjust_RIGHT,
+ drawing::TextAdjust_BLOCK,
+ drawing::TextAdjust_CENTER,
+ drawing::TextAdjust_STRETCH
+};
+
+const SvxAdjust aUnoToSvxAdjust[] =
+{
+ SVX_ADJUST_LEFT,
+ SVX_ADJUST_RIGHT,
+ SVX_ADJUST_BLOCK,
+ SVX_ADJUST_CENTER,
+ SVX_ADJUST_BLOCKLINE
+};
+
+// STATIC DATA -----------------------------------------------------------
+
+
+// -----------------------------------------------------------------------
+
+
+TYPEINIT1_AUTOFACTORY(SvxLineSpacingItem, SfxPoolItem );
+TYPEINIT1_AUTOFACTORY(SvxAdjustItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxWidowsItem, SfxByteItem);
+TYPEINIT1_AUTOFACTORY(SvxOrphansItem, SfxByteItem);
+TYPEINIT1_AUTOFACTORY(SvxHyphenZoneItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxTabStopItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxFmtSplitItem, SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SvxPageModelItem, SfxStringItem);
+
+
+SV_IMPL_VARARR_SORT( SvxTabStopArr, SvxTabStop )
+
+// -----------------------------------------------------------------------
+
+SvxLineSpacingItem::SvxLineSpacingItem( sal_uInt16 nHeight, const sal_uInt16 nId )
+ : SfxEnumItemInterface( nId )
+{
+ nPropLineSpace = 100;
+ nInterLineSpace = 0;
+ nLineHeight = nHeight;
+ eLineSpace = SVX_LINE_SPACE_AUTO;
+ eInterLineSpace = SVX_INTER_LINE_SPACE_OFF;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ const SvxLineSpacingItem& rLineSpace = (const SvxLineSpacingItem&)rAttr;
+ return (
+ // Gleiche Linespacing Rule?
+ (eLineSpace == rLineSpace.eLineSpace)
+ // Bei maximalem und minimalem Linespacing muss das Mass
+ // uebereinstimmen.
+ && (eLineSpace == SVX_LINE_SPACE_AUTO ||
+ nLineHeight == rLineSpace.nLineHeight)
+ // Gleiche Interlinespacing Rule?
+ && ( eInterLineSpace == rLineSpace.eInterLineSpace )
+ // Entweder proportional oder draufaddieren eingestellt.
+ && (( eInterLineSpace == SVX_INTER_LINE_SPACE_OFF)
+ || (eInterLineSpace == SVX_INTER_LINE_SPACE_PROP
+ && nPropLineSpace == rLineSpace.nPropLineSpace)
+ || (eInterLineSpace == SVX_INTER_LINE_SPACE_FIX
+ && (nInterLineSpace == rLineSpace.nInterLineSpace)))) ?
+ 1 : 0;
+}
+
+/*-----------------18.03.98 16:32-------------------
+ os: wer weiss noch, wieso das LineSpacingItem so
+ kompliziert ist? Fuer UNO koennen wir das nicht
+ gebrauchen. Da gibt es nur zwei Werte:
+ - ein sal_uInt16 fuer den Modus
+ - ein sal_uInt32 fuer alle Werte (Abstand, Hoehe, rel. Angaben)
+
+--------------------------------------------------*/
+sal_Bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ style::LineSpacing aLSp;
+ switch( eLineSpace )
+ {
+ case SVX_LINE_SPACE_AUTO:
+ if(eInterLineSpace == SVX_INTER_LINE_SPACE_FIX)
+ {
+ aLSp.Mode = style::LineSpacingMode::LEADING;
+ aLSp.Height = nInterLineSpace;
+ }
+ else if(eInterLineSpace == SVX_INTER_LINE_SPACE_OFF)
+ {
+ aLSp.Mode = style::LineSpacingMode::PROP;
+ aLSp.Height = 100;
+ }
+ else
+ {
+ aLSp.Mode = style::LineSpacingMode::PROP;
+ aLSp.Height = nPropLineSpace;
+ }
+ break;
+ case SVX_LINE_SPACE_FIX :
+ case SVX_LINE_SPACE_MIN :
+ aLSp.Mode = eLineSpace == SVX_LINE_SPACE_FIX ? style::LineSpacingMode::FIX : style::LineSpacingMode::MINIMUM;
+ aLSp.Height = nMemberId&CONVERT_TWIPS ? TWIP_TO_MM100(nLineHeight) : nLineHeight;
+ break;
+ }
+ rVal <<= aLSp;
+
+ return sal_True;
+}
+/*-----------------18.03.98 16:32-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ style::LineSpacing aLSp;
+ if(!(rVal >>= aLSp))
+ return sal_False;
+
+ switch( aLSp.Mode )
+ {
+ case style::LineSpacingMode::LEADING:
+ {
+ eInterLineSpace = SVX_INTER_LINE_SPACE_FIX;
+ eLineSpace = SVX_LINE_SPACE_AUTO;
+ nInterLineSpace = aLSp.Height;
+ }
+ break;
+ case style::LineSpacingMode::PROP:
+ {
+ eLineSpace = SVX_LINE_SPACE_AUTO;
+ nPropLineSpace = (sal_Int8)min(aLSp.Height, 0xFF);
+ if(100 == aLSp.Height)
+ eInterLineSpace = SVX_INTER_LINE_SPACE_OFF;
+ else
+ eInterLineSpace = SVX_INTER_LINE_SPACE_PROP;
+ }
+ break;
+ case style::LineSpacingMode::FIX:
+ case style::LineSpacingMode::MINIMUM:
+ {
+ eInterLineSpace = SVX_INTER_LINE_SPACE_OFF;
+ eLineSpace = aLSp.Mode == style::LineSpacingMode::FIX ? SVX_LINE_SPACE_FIX : SVX_LINE_SPACE_MIN;
+ nLineHeight = aLSp.Height;
+ if(nMemberId&CONVERT_TWIPS)
+ nLineHeight = MM100_TO_TWIP(nLineHeight);
+ }
+ break;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxLineSpacingItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+
+ style::LineSpacing aLSp;
+ sal_Int32 nTemp = 0;
+
+ switch( nMemberId )
+ {
+ case MID_LS_FIXED:
+ if( -1 != rValue.indexOf( sal_Unicode( '%' ) ) )
+ {
+ aLSp.Mode = style::LineSpacingMode::PROP;
+ if(!rUnitConverter.convertPercent( nTemp, rValue ))
+ return sal_False;
+
+ aLSp.Height = nTemp;
+ }
+ else if( rValue.compareToAscii( sXML_casemap_normal ) )
+ {
+ aLSp.Mode = style::LineSpacingMode::PROP;
+ aLSp.Height = 100;
+ }
+ else
+ {
+ aLSp.Mode = style::LineSpacingMode::FIX;
+ }
+ break;
+
+ case MID_LS_MINIMUM:
+ aLSp.Mode = style::LineSpacingMode::MINIMUM;
+ break;
+
+ case MID_LS_DISTANCE:
+ aLSp.Mode = style::LineSpacingMode::LEADING;
+ break;
+ }
+
+ if( aLSp.Mode != style::LineSpacingMode::PROP )
+ {
+ // get the height
+ if(!rUnitConverter.convertMeasure( nTemp, rValue, 0x0000, 0xffff ))
+ return sal_False;
+ aLSp.Height = nTemp;
+ }
+
+ // use PutValue to set set the LineSpace
+ uno::Any aAny(&aLSp, ::getCppuType((const style::LineSpacing*)0));
+ return PutValue( aAny, 0 );
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxLineSpacingItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+
+ uno::Any aAny;
+ QueryValue( aAny, 0 );
+ style::LineSpacing* pLSp = (style::LineSpacing*)aAny.getValue();
+
+ const sal_Int16 Mode = pLSp->Mode;
+ const sal_Int16 Height = pLSp->Height;
+
+ // check if this memberid is valid for export
+ switch( nMemberId )
+ {
+ case MID_LS_FIXED:
+ if( style::LineSpacingMode::PROP != Mode &&
+ style::LineSpacingMode::FIX != Mode )
+ return sal_False;
+ break;
+
+ case MID_LS_MINIMUM:
+ if( style::LineSpacingMode::MINIMUM != Mode )
+ return sal_False;
+ break;
+
+ case MID_LS_DISTANCE:
+ if( style::LineSpacingMode::LEADING != Mode )
+ return sal_False;
+ break;
+ }
+
+ if( style::LineSpacingMode::PROP == Mode )
+ {
+ rUnitConverter.convertPercent( aOut, Height );
+ }
+ else
+ {
+ rUnitConverter.convertMeasure( aOut, Height );
+ }
+
+ rValue = aOut.makeStringAndClear();
+#endif
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxLineSpacingItem::Clone( SfxItemPool * ) const
+{
+ return new SvxLineSpacingItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxLineSpacingItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef PRODUCT
+ rText.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "SvxLineSpacingItem" ));
+#else
+ rText.Erase();
+#endif
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxLineSpacingItem::Create(SvStream& rStrm, sal_uInt16) const
+{
+ sal_Int8 nPropSpace;
+ short nInterSpace;
+ sal_uInt16 nHeight;
+ sal_Int8 nRule, nInterRule;
+
+ rStrm >> nPropSpace
+ >> nInterSpace
+ >> nHeight
+ >> nRule
+ >> nInterRule;
+
+ SvxLineSpacingItem* pAttr = new SvxLineSpacingItem( nHeight, Which() );
+ pAttr->SetInterLineSpace( nInterSpace );
+ pAttr->SetPropLineSpace( nPropSpace );
+ pAttr->GetLineSpaceRule() = (SvxLineSpace)nRule;
+ pAttr->GetInterLineSpaceRule() = (SvxInterLineSpace)nInterRule;
+ return pAttr;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxLineSpacingItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_Int8) GetPropLineSpace()
+ << (short) GetInterLineSpace()
+ << (sal_uInt16) GetLineHeight()
+ << (sal_Int8) GetLineSpaceRule()
+ << (sal_Int8) GetInterLineSpaceRule();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxLineSpacingItem::GetValueCount() const
+{
+ return SVX_LINESPACE_END; // SVX_LINESPACE_TWO_LINES + 1
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxLineSpacingItem::GetValueTextByPos( sal_uInt16 nPos ) const
+{
+ //! Strings demnaechst aus Resource laden
+ XubString aText;
+ switch ( nPos )
+ {
+ case SVX_LINESPACE_USER : aText.AppendAscii( "Benutzer" ); break;
+ case SVX_LINESPACE_ONE_LINE : aText.AppendAscii( "Einzeilig" ); break;
+ case SVX_LINESPACE_ONE_POINT_FIVE_LINES : aText.AppendAscii( "1,5zeilig" ); break;
+ case SVX_LINESPACE_TWO_LINES : aText.AppendAscii( "Zweizeilig" ); break;
+ }
+ return aText;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxLineSpacingItem::GetEnumValue() const
+{
+ sal_uInt16 nVal;
+ switch ( nPropLineSpace )
+ {
+ case 100: nVal = SVX_LINESPACE_ONE_LINE; break;
+ case 150: nVal = SVX_LINESPACE_ONE_POINT_FIVE_LINES; break;
+ case 200: nVal = SVX_LINESPACE_TWO_LINES; break;
+ default: nVal = SVX_LINESPACE_USER; break;
+ }
+ return nVal;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineSpacingItem::SetEnumValue( sal_uInt16 nVal )
+{
+ switch ( nVal )
+ {
+ case SVX_LINESPACE_ONE_LINE: nPropLineSpace = 100; break;
+ case SVX_LINESPACE_ONE_POINT_FIVE_LINES: nPropLineSpace = 150; break;
+ case SVX_LINESPACE_TWO_LINES: nPropLineSpace = 200; break;
+ }
+}
+
+// class SvxAdjustItem ---------------------------------------------------
+
+SvxAdjustItem::SvxAdjustItem(const SvxAdjust eAdjst, const sal_uInt16 nId )
+ : SfxEnumItemInterface( nId ),
+ bOneBlock( sal_False ), bLastCenter( sal_False ), bLastBlock( sal_False )
+{
+ SetAdjust( eAdjst );
+}
+
+// -----------------------------------------------------------------------
+
+int SvxAdjustItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return( ( GetAdjust() == ((SvxAdjustItem&)rAttr).GetAdjust() &&
+ bOneBlock == ((SvxAdjustItem&)rAttr).bOneBlock &&
+ bLastCenter == ((SvxAdjustItem&)rAttr).bLastCenter &&
+ bLastBlock == ((SvxAdjustItem&)rAttr).bLastBlock )
+ ? 1 : 0 );
+}
+
+/*-----------------18.03.98 16:15-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch( nMemberId )
+ {
+ case MID_PARA_ADJUST : rVal <<= (sal_Int16)(aSvxToUnoAdjust[(sal_uInt16)GetAdjust()]); break;
+ case MID_LAST_LINE_ADJUST : rVal <<= (sal_Int16)(aSvxToUnoAdjust[(sal_uInt16)GetLastBlock()]); break;
+ case MID_EXPAND_SINGLE :
+ {
+ sal_Bool bValue = bOneBlock;
+ rVal.setValue( &bValue, ::getCppuBooleanType() );
+ break;
+ }
+ }
+ return sal_True;
+}
+/*-----------------18.03.98 16:15-------------------
+
+--------------------------------------------------*/
+
+sal_Bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ switch( nMemberId )
+ {
+ case MID_PARA_ADJUST :
+ case MID_LAST_LINE_ADJUST :
+ {
+ sal_Int32 eVal = - 1;
+ try
+ {
+ eVal = utl::getEnumAsINT32(rVal);
+ }
+ catch(...) {}
+ if(eVal > 0 && eVal <= 4)
+ {
+ eVal = aUnoToSvxAdjust[eVal];
+ if(eVal < (sal_uInt16)SVX_ADJUST_END)
+ nMemberId == MID_PARA_ADJUST ?
+ SetAdjust((SvxAdjust)eVal) :
+ SetLastBlock((SvxAdjust)eVal);
+ }
+ }
+ break;
+ case MID_EXPAND_SINGLE :
+ bOneBlock = Any2Bool(rVal);
+ break;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+SvXMLEnumMapEntry pXML_para_adjust_enums[] =
+{
+ { sXML_start, SVX_ADJUST_LEFT },
+ { sXML_end, SVX_ADJUST_RIGHT },
+ { sXML_center, SVX_ADJUST_CENTER },
+ { sXML_justify, SVX_ADJUST_BLOCK },
+ { sXML_justified, SVX_ADJUST_BLOCK },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry pXML_para_align_last_enums[] =
+{
+ { sXML_start, SVX_ADJUST_LEFT },
+ { sXML_center, SVX_ADJUST_CENTER },
+ { sXML_justify, SVX_ADJUST_BLOCK },
+ { sXML_justified, SVX_ADJUST_BLOCK },
+ { 0, 0 }
+};
+#endif
+
+sal_Bool SvxAdjustItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+ sal_Bool bOk = sal_False;
+#ifndef SVX_LIGHT
+ switch( nMemberId )
+ {
+ case MID_PARA_ADJUST:
+ sal_uInt16 eAdjust;
+ if( rUnitConverter.convertEnum( eAdjust, rValue, pXML_para_adjust_enums ) )
+ {
+ SetAdjust( (SvxAdjust)eAdjust );
+ bOk = sal_True;
+ }
+ break;
+
+ case MID_LAST_LINE_ADJUST:
+ {
+ sal_uInt16 eAdjust;
+ if( rUnitConverter.convertEnum( eAdjust, rValue,
+ pXML_para_align_last_enums ) )
+ {
+ SetLastBlock( (SvxAdjust)eAdjust );
+ bOk = sal_True;
+ }
+ }
+ break;
+ case MID_EXPAND_SINGLE:
+ {
+ sal_Bool bBlock;
+ if( rUnitConverter.convertBool( bBlock, rValue ) )
+ {
+ SetOneWord( bBlock ? SVX_ADJUST_BLOCK : SVX_ADJUST_LEFT );
+ bOk = sal_True;
+ }
+ }
+ break;
+ }
+
+#endif
+ return bOk;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxAdjustItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bOk = sal_False;
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+
+ switch( nMemberId )
+ {
+ case MID_PARA_ADJUST:
+ bOk = rUnitConverter.convertEnum( aOut,
+ GetAdjust(),
+ pXML_para_adjust_enums, sXML_start );
+ break;
+ case MID_LAST_LINE_ADJUST:
+ {
+ if( GetAdjust() == SVX_ADJUST_BLOCK )
+ {
+ SvxAdjust eAdjust = GetLastBlock();
+ if( eAdjust != SVX_ADJUST_LEFT )
+ bOk = rUnitConverter.convertEnum( aOut, eAdjust,
+ pXML_para_align_last_enums );
+ }
+ }
+ break;
+ case MID_EXPAND_SINGLE:
+ {
+ if( GetAdjust() == SVX_ADJUST_BLOCK &&
+ GetLastBlock() == SVX_ADJUST_BLOCK &&
+ GetOneWord() == SVX_ADJUST_BLOCK )
+ {
+ rUnitConverter.convertBool( aOut, sal_True );
+ bOk = sal_True;
+ }
+ }
+ break;
+ }
+
+ rValue = aOut.makeStringAndClear();
+#endif
+ return bOk;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxAdjustItem::Clone( SfxItemPool * ) const
+{
+ return new SvxAdjustItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxAdjustItem::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 = GetValueTextByPos( (sal_uInt16)GetAdjust() );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxAdjustItem::GetValueCount() const
+{
+ return SVX_ADJUST_END; // SVX_ADJUST_BLOCKLINE + 1
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxAdjustItem::GetValueTextByPos( sal_uInt16 nPos ) const
+{
+ DBG_ASSERT( nPos <= (sal_uInt16)SVX_ADJUST_BLOCKLINE, "enum overflow!" );
+ return SVX_RESSTR(RID_SVXITEMS_ADJUST_BEGIN + nPos);
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxAdjustItem::GetEnumValue() const
+{
+ return GetAdjust();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxAdjustItem::SetEnumValue( sal_uInt16 nVal )
+{
+ SetAdjust( (const SvxAdjust)nVal );
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxAdjustItem::GetVersion( sal_uInt16 nFileVersion ) const
+{
+ return (nFileVersion == SOFFICE_FILEFORMAT_31)
+ ? 0 : ADJUST_LASTBLOCK_VERSION;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxAdjustItem::Create(SvStream& rStrm, sal_uInt16 nVersion) const
+{
+ char eAdjustment;
+ rStrm >> eAdjustment;
+ SvxAdjustItem *pRet = new SvxAdjustItem( (SvxAdjust)eAdjustment, Which() );
+ if( nVersion >= ADJUST_LASTBLOCK_VERSION )
+ {
+ sal_Int8 nFlags;
+ rStrm >> nFlags;
+ pRet->bOneBlock = 0 != (nFlags & 0x0001);
+ pRet->bLastCenter = 0 != (nFlags & 0x0002);
+ pRet->bLastBlock = 0 != (nFlags & 0x0004);
+ }
+ return pRet;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxAdjustItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+{
+ rStrm << (char)GetAdjust();
+ if ( nItemVersion >= ADJUST_LASTBLOCK_VERSION )
+ {
+ sal_Int8 nFlags = 0;
+ if ( bOneBlock )
+ nFlags |= 0x0001;
+ if ( bLastCenter )
+ nFlags |= 0x0002;
+ if ( bLastBlock )
+ nFlags |= 0x0004;
+ rStrm << (sal_Int8) nFlags;
+ }
+ return rStrm;
+}
+
+// class SvxWidowsItem ---------------------------------------------------
+
+SvxWidowsItem::SvxWidowsItem(const BYTE nL, const USHORT nId ) :
+ SfxByteItem( nId, nL )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxWidowsItem::Clone( SfxItemPool * ) const
+{
+ return new SvxWidowsItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxWidowsItem::Create(SvStream& rStrm, sal_uInt16) const
+{
+ sal_Int8 nLines;
+ rStrm >> nLines;
+ return new SvxWidowsItem( nLines, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxWidowsItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_Int8)GetValue();
+ return rStrm;
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxWidowsItem::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:
+ rText = String::CreateFromInt32( GetValue() );
+ rText += SVX_RESSTR(RID_SVXITEMS_LINES);
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText += SVX_RESSTR(RID_SVXITEMS_WIDOWS_COMPLETE);
+ rText += String::CreateFromInt32( GetValue() );
+ rText += SVX_RESSTR(RID_SVXITEMS_LINES);
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxWidowsItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_Int32 nValue;
+ sal_Bool bOk = rUnitConverter.convertNumber( nValue, rValue, 0, 0xff );
+ if( bOk )
+ SetValue( nValue );
+ return bOk;
+#else
+ return sal_False;
+#endif
+}
+
+sal_Bool SvxWidowsItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+ rUnitConverter.convertNumber( aOut, (sal_Int32) GetValue() );
+ rValue = aOut.makeStringAndClear();
+#endif
+ return sal_True;
+}
+
+// class SvxOrphansItem --------------------------------------------------
+
+SvxOrphansItem::SvxOrphansItem(const BYTE nL, const USHORT nId ) :
+ SfxByteItem( nId, nL )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxOrphansItem::Clone( SfxItemPool * ) const
+{
+ return new SvxOrphansItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxOrphansItem::Create(SvStream& rStrm, sal_uInt16) const
+{
+ sal_Int8 nLines;
+ rStrm >> nLines;
+ return new SvxOrphansItem( nLines, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxOrphansItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_Int8) GetValue();
+ return rStrm;
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxOrphansItem::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:
+ rText = String::CreateFromInt32( GetValue() );
+ rText += SVX_RESSTR(RID_SVXITEMS_LINES);
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText += SVX_RESSTR(RID_SVXITEMS_ORPHANS_COMPLETE);
+ rText += String::CreateFromInt32( GetValue() );
+ rText += SVX_RESSTR(RID_SVXITEMS_LINES);
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxOrphansItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_Int32 nValue;
+ sal_Bool bOk = rUnitConverter.convertNumber( nValue, rValue, 0x00, 0xff );
+ if( bOk )
+ SetValue( nValue );
+ return bOk;
+#else
+ return sal_False;
+#endif
+}
+
+sal_Bool SvxOrphansItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+ rUnitConverter.convertNumber( aOut, (sal_Int32) GetValue() );
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// class SvxHyphenZoneItem -----------------------------------------------
+
+SvxHyphenZoneItem::SvxHyphenZoneItem( const sal_Bool bHyph, const sal_uInt16 nId ) :
+ SfxPoolItem( nId )
+{
+ bHyphen = bHyph;
+ bPageEnd = sal_True;
+ nMinLead = nMinTrail = 0;
+ nMaxHyphens = 255;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch(nMemberId)
+ {
+ case MID_IS_HYPHEN:
+ rVal = Bool2Any(bHyphen);
+ break;
+ case MID_HYPHEN_MIN_LEAD:
+ rVal <<= (sal_Int16)nMinLead;
+ break;
+ case MID_HYPHEN_MIN_TRAIL:
+ rVal <<= (sal_Int16)nMinTrail;
+ break;
+ case MID_HYPHEN_MAX_HYPHENS:
+ rVal <<= (sal_Int16)nMaxHyphens;
+ break;
+ }
+ return sal_True;
+}
+// -----------------------------------------------------------------------
+sal_Bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int16 nNewVal = 0;
+
+ if( nMemberId != MID_IS_HYPHEN )
+ if(!(rVal >>= nNewVal))
+ return sal_False;
+
+ switch(nMemberId)
+ {
+ case MID_IS_HYPHEN:
+ bHyphen = Any2Bool(rVal);
+ break;
+ case MID_HYPHEN_MIN_LEAD:
+ nMinLead = nNewVal;
+ break;
+ case MID_HYPHEN_MIN_TRAIL:
+ nMinTrail = nNewVal;
+ break;
+ case MID_HYPHEN_MAX_HYPHENS:
+ nMaxHyphens = nNewVal;
+ break;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxHyphenZoneItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+ sal_Bool bOk = sal_False;
+#ifndef SVX_LIGHT
+
+ sal_Int32 nTemp;
+ switch( nMemberId )
+ {
+ case MID_IS_HYPHEN:
+ sal_Bool bNewHyphen;
+ bOk = rUnitConverter.convertBool( bNewHyphen, rValue );
+ bHyphen = bNewHyphen;
+ break;
+
+ case MID_HYPHEN_MIN_LEAD:
+ bOk = rUnitConverter.convertNumber( nTemp, rValue );
+ nMinLead = nTemp;
+ break;
+
+ case MID_HYPHEN_MIN_TRAIL:
+ bOk = rUnitConverter.convertNumber( nTemp, rValue );
+ nMinTrail = nTemp;
+ break;
+
+ case MID_HYPHEN_MAX_HYPHENS:
+ if( rValue.compareToAscii( sXML_no_limit ) )
+ {
+ nMaxHyphens = 0;
+ bOk = sal_True;
+ }
+ else
+ {
+ bOk = rUnitConverter.convertNumber( nTemp, rValue );
+ nMaxHyphens = nTemp;
+ }
+ break;
+ }
+#endif
+ return bOk;
+}
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxHyphenZoneItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+
+ switch( nMemberId )
+ {
+ case MID_IS_HYPHEN:
+ rUnitConverter.convertBool( aOut, bHyphen );
+ break;
+
+ case MID_HYPHEN_MIN_LEAD:
+ if( !bHyphen )
+ return sal_False;
+ rUnitConverter.convertNumber( aOut, (sal_Int32) nMinLead );
+ break;
+
+ case MID_HYPHEN_MIN_TRAIL:
+ if( !bHyphen )
+ return sal_False;
+ rUnitConverter.convertNumber( aOut, (sal_Int32) nMinTrail );
+ break;
+
+ case MID_HYPHEN_MAX_HYPHENS:
+ if( !bHyphen )
+ return sal_False;
+ if( nMaxHyphens == 0 )
+ aOut.appendAscii( sXML_no_limit );
+ else
+ rUnitConverter.convertNumber( aOut, (sal_Int32) nMaxHyphens );
+ break;
+ }
+
+ rValue = aOut.makeStringAndClear();
+
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+int SvxHyphenZoneItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return ( (((SvxHyphenZoneItem&)rAttr).bHyphen == bHyphen)
+ && (((SvxHyphenZoneItem&)rAttr).bPageEnd == bPageEnd)
+ && (((SvxHyphenZoneItem&)rAttr).nMinLead == nMinLead)
+ && (((SvxHyphenZoneItem&)rAttr).nMinTrail == nMinTrail)
+ && (((SvxHyphenZoneItem&)rAttr).nMaxHyphens == nMaxHyphens) );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxHyphenZoneItem::Clone( SfxItemPool * ) const
+{
+ return new SvxHyphenZoneItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxHyphenZoneItem::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:
+ {
+ sal_uInt16 nId = RID_SVXITEMS_HYPHEN_FALSE;
+
+ if ( bHyphen )
+ nId = RID_SVXITEMS_HYPHEN_TRUE;
+ rText = SVX_RESSTR(nId);
+ rText += cpDelim;
+ nId = RID_SVXITEMS_PAGE_END_FALSE;
+
+ if ( bPageEnd )
+ nId = RID_SVXITEMS_PAGE_END_TRUE;
+ rText += SVX_RESSTR(nId);
+ rText += cpDelim;
+ rText += String::CreateFromInt32( nMinLead );
+ rText += cpDelim;
+ rText += String::CreateFromInt32( nMinTrail );
+ rText += cpDelim;
+ rText += String::CreateFromInt32( nMaxHyphens );
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ sal_uInt16 nId = RID_SVXITEMS_HYPHEN_FALSE;
+
+ if ( bHyphen )
+ nId = RID_SVXITEMS_HYPHEN_TRUE;
+ rText = SVX_RESSTR(nId);
+ rText += cpDelim;
+ nId = RID_SVXITEMS_PAGE_END_FALSE;
+
+ if ( bPageEnd )
+ nId = RID_SVXITEMS_PAGE_END_TRUE;
+ rText += SVX_RESSTR(nId);
+ rText += cpDelim;
+ rText += String::CreateFromInt32(nMinLead);
+ rText += SVX_RESSTR(RID_SVXITEMS_HYPHEN_MINLEAD);
+ rText += cpDelim;
+ rText += String::CreateFromInt32(nMinTrail);
+ rText += SVX_RESSTR(RID_SVXITEMS_HYPHEN_MINTRAIL);
+ rText += cpDelim;
+ rText += String::CreateFromInt32(nMaxHyphens);
+ rText += SVX_RESSTR(RID_SVXITEMS_HYPHEN_MAX);
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxHyphenZoneItem::Create(SvStream& rStrm, sal_uInt16) const
+{
+ sal_Int8 bHyphen, bHyphenPageEnd;
+ sal_Int8 nMinLead, nMinTrail, nMaxHyphens;
+ rStrm >> bHyphen >> bHyphenPageEnd >> nMinLead >> nMinTrail >> nMaxHyphens;
+ SvxHyphenZoneItem* pAttr = new SvxHyphenZoneItem( sal_False, Which() );
+ pAttr->SetHyphen( sal_Bool( bHyphen != 0 ) );
+ pAttr->SetPageEnd( sal_Bool( bHyphenPageEnd != 0 ) );
+ pAttr->GetMinLead() = nMinLead;
+ pAttr->GetMinTrail() = nMinTrail;
+ pAttr->GetMaxHyphens() = nMaxHyphens;
+ return pAttr;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxHyphenZoneItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_Int8) IsHyphen()
+ << (sal_Int8) IsPageEnd()
+ << (sal_Int8) GetMinLead()
+ << (sal_Int8) GetMinTrail()
+ << (sal_Int8) GetMaxHyphens();
+ return rStrm;
+}
+
+// class SvxTabStop ------------------------------------------------------
+
+SvxTabStop::SvxTabStop()
+{
+ nTabPos = 0;
+ eAdjustment = SVX_TAB_ADJUST_LEFT;
+ cDecimal = GetpApp()->GetAppInternational().GetNumDecimalSep();
+ cFill = cDfltFillChar;
+}
+
+// -----------------------------------------------------------------------
+
+SvxTabStop::SvxTabStop( const long nPos, const SvxTabAdjust eAdjst,
+ const sal_Unicode cDec, const sal_Unicode cFil )
+{
+ nTabPos = nPos;
+ eAdjustment = eAdjst;
+
+ if ( cDfltDecimalChar == cDec )
+ // default aus der International-Klasse besorgen
+ cDecimal = GetpApp()->GetAppInternational().GetNumDecimalSep();
+ else
+ cDecimal = cDec;
+ cFill = cFil;
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxTabStop::GetValueString() const
+{
+ XubString aStr;
+
+ aStr += sal_Unicode( '(' );
+ aStr += UniString::CreateFromInt32(nTabPos);
+ aStr += cpDelim;
+ aStr += XubString( ResId( RID_SVXITEMS_TAB_ADJUST_BEGIN + (sal_uInt16)eAdjustment, DIALOG_MGR() ) );
+
+ aStr += cpDelim;
+ aStr += sal_Unicode('[');
+ aStr += XubString( ResId( RID_SVXITEMS_TAB_DECIMAL_CHAR, DIALOG_MGR() ) );
+ aStr += cDecimal;
+ aStr += sal_Unicode(']');
+ aStr += cpDelim;
+ aStr += cpDelim;
+ aStr += sal_Unicode('[');
+ aStr += XubString( ResId( RID_SVXITEMS_TAB_FILL_CHAR, DIALOG_MGR() ) );
+ aStr += cFill;
+ aStr += sal_Unicode(']');
+ aStr += sal_Unicode(')');
+
+ return aStr;
+}
+
+// class SvxTabStopItem --------------------------------------------------
+
+SvxTabStopItem::SvxTabStopItem( sal_uInt16 nWhich ) :
+ SfxPoolItem( nWhich ),
+ SvxTabStopArr( (sal_Int8)SVX_TAB_DEFCOUNT )
+{
+ const sal_uInt16 nTabs = SVX_TAB_DEFCOUNT, nDist = SVX_TAB_DEFDIST;
+ const SvxTabAdjust eAdjst= SVX_TAB_ADJUST_DEFAULT;
+
+ if( nTabs )
+ {
+ SvxTabStop aInitTab( nDist, eAdjst );
+ SvxTabStop* pInitArr =
+ (SvxTabStop*)new char[ sizeof(SvxTabStop) * nTabs ];
+ for( sal_uInt16 i = 0; i < nTabs; ++i )
+ {
+ *( pInitArr + i ) = aInitTab;
+ aInitTab.GetTabPos() += nDist;
+ }
+ SvxTabStopArr::InitData( pInitArr, nTabs );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SvxTabStopItem::SvxTabStopItem( const sal_uInt16 nTabs,
+ const sal_uInt16 nDist,
+ const SvxTabAdjust eAdjst,
+ sal_uInt16 nWhich ) :
+ SfxPoolItem( nWhich ),
+ SvxTabStopArr( (sal_Int8)nTabs )
+{
+ if( nTabs )
+ {
+ SvxTabStop aInitTab( nDist, eAdjst );
+ SvxTabStop* pInitArr =
+ (SvxTabStop*)new char[ sizeof(SvxTabStop) * nTabs ];
+ for( sal_uInt16 i = 0; i < nTabs; ++i )
+ {
+ *( pInitArr + i ) = aInitTab;
+ aInitTab.GetTabPos() += nDist;
+ }
+ SvxTabStopArr::InitData( pInitArr, nTabs );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SvxTabStopItem::SvxTabStopItem( const SvxTabStopItem& rTSI ) :
+ SfxPoolItem( rTSI.Which() ),
+ SvxTabStopArr( (sal_Int8)rTSI.Count() )
+{
+ SvxTabStopArr::Insert( &rTSI );
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxTabStopItem::GetPos( const SvxTabStop& rTab ) const
+{
+ sal_uInt16 nFound;
+ return Seek_Entry( rTab, &nFound ) ? nFound : SVX_TAB_NOTFOUND;
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxTabStopItem::GetPos( const long nPos ) const
+{
+ sal_uInt16 nFound;
+ return Seek_Entry( SvxTabStop( nPos ), &nFound ) ? nFound : SVX_TAB_NOTFOUND;
+}
+
+// -----------------------------------------------------------------------
+
+SvxTabStopItem& SvxTabStopItem::operator=( const SvxTabStopItem& rTSI )
+{
+ Remove( 0, Count() );
+ SvxTabStopArr::Insert( &rTSI );
+ return *this;
+}
+
+
+/*
+ enum ::com::sun::star::style::TabAlign
+{
+ TABALIGN_LEFT,
+ TABALIGN_CENTER,
+ TABALIGN_RIGHT,
+ TABALIGN_DECIMAL
+};
+
+struct ::com::sun::star::style::TabStop
+{
+ long Position;
+ ::com::sun::star::style::TabAlign ::com::sun::star::drawing::Alignment;
+ unsigned short DecimalChar;
+ unsigned short FillChar;
+};
+typedef sequence ::com::sun::star::style::TabStop> TabSTopSequence;
+
+ */
+/*-----------------19.03.98 08:50-------------------
+
+--------------------------------------------------*/
+
+sal_Bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ sal_uInt16 nCount = Count();
+ uno::Sequence< style::TabStop> aSeq(nCount);
+ style::TabStop* pArr = aSeq.getArray();
+ for(sal_uInt16 i = 0; i < nCount; i++)
+ {
+ const SvxTabStop& rTab = *(GetStart() + i);
+ pArr[i].Position = nMemberId&CONVERT_TWIPS ? TWIP_TO_MM100(rTab.GetTabPos()) : rTab.GetTabPos();
+ switch(rTab.GetAdjustment())
+ {
+ case SVX_TAB_ADJUST_LEFT : pArr[i].Alignment = style::TabAlign_LEFT; break;
+ case SVX_TAB_ADJUST_RIGHT : pArr[i].Alignment = style::TabAlign_RIGHT; break;
+ case SVX_TAB_ADJUST_DECIMAL: pArr[i].Alignment = style::TabAlign_DECIMAL; break;
+ case SVX_TAB_ADJUST_CENTER : pArr[i].Alignment = style::TabAlign_CENTER; break;
+ default: //SVX_TAB_ADJUST_DEFAULT
+ pArr[i].Alignment = style::TabAlign_DEFAULT;
+
+ }
+ pArr[i].DecimalChar = rTab.GetDecimal();
+ pArr[i].FillChar = rTab.GetFill();
+ }
+
+ rVal <<= aSeq;
+
+ return sal_True;
+}
+/*-----------------19.03.98 08:50-------------------
+
+--------------------------------------------------*/
+
+sal_Bool SvxTabStopItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ uno::Sequence< style::TabStop> aSeq;
+ if(!(rVal >>= aSeq))
+ return sal_False;
+
+ SvxTabStopArr::Remove( 0, Count() );
+ const style::TabStop* pArr = aSeq.getConstArray();
+ const sal_uInt16 nCount = (sal_uInt16)aSeq.getLength();
+ for(sal_uInt16 i = 0; i < nCount ; i++)
+ {
+ SvxTabAdjust eAdjust = SVX_TAB_ADJUST_DEFAULT;
+ switch(pArr[i].Alignment)
+ {
+ case style::TabAlign_LEFT : eAdjust = SVX_TAB_ADJUST_LEFT; break;
+ case style::TabAlign_CENTER : eAdjust = SVX_TAB_ADJUST_CENTER; break;
+ case style::TabAlign_RIGHT : eAdjust = SVX_TAB_ADJUST_RIGHT; break;
+ case style::TabAlign_DECIMAL: eAdjust = SVX_TAB_ADJUST_DECIMAL; break;
+ }
+ sal_Unicode cFill = pArr[i].FillChar;
+ sal_Unicode cDecimal = pArr[i].DecimalChar;
+
+ SvxTabStop aTab( nMemberId&CONVERT_TWIPS ? MM100_TO_TWIP(pArr[i].Position) : pArr[i].Position,
+ eAdjust,
+ cDecimal,
+ cFill );
+ Insert(aTab);
+ }
+ return sal_True;
+}
+// -----------------------------------------------------------------------
+
+int SvxTabStopItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ const SvxTabStopItem& rTSI = (SvxTabStopItem&)rAttr;
+
+ if ( Count() != rTSI.Count() )
+ return 0;
+
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
+ if( !(*this)[i].IsEqual( rTSI[i] ) )
+ return 0;
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxTabStopItem::Clone( SfxItemPool * ) const
+{
+ return new SvxTabStopItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxTabStopItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ if ( ePres > SFX_ITEM_PRESENTATION_NONE )
+ {
+#ifndef SVX_LIGHT
+ sal_Bool bComma = sal_False;
+
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
+ {
+ if ( SVX_TAB_ADJUST_DEFAULT != ((*this)[i]).GetAdjustment() )
+ {
+ if ( bComma )
+ rText += sal_Unicode(',');
+ rText += GetMetricText(
+ (long)((*this)[i]).GetTabPos(), eCoreUnit, ePresUnit );
+ if ( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ bComma = sal_True;
+ }
+ }
+#endif
+ }
+ return ePres;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxTabStopItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_Int8 nTabs;
+ rStrm >> nTabs;
+ SvxTabStopItem* pAttr =
+ new SvxTabStopItem( 0, 0, SVX_TAB_ADJUST_DEFAULT, Which() );
+
+ for ( sal_Int8 i = 0; i < nTabs; i++ )
+ {
+ long nPos;
+ sal_Int8 eAdjust;
+ unsigned char cDecimal, cFill;
+ rStrm >> nPos >> eAdjust >> cDecimal >> cFill;
+ if( !i || SVX_TAB_ADJUST_DEFAULT != eAdjust )
+ pAttr->Insert( SvxTabStop
+ ( nPos, (SvxTabAdjust)eAdjust, sal_Unicode(cDecimal), sal_Unicode(cFill) ) );
+ }
+ return pAttr;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+{
+ //MA 05. Sep. 96: Default-Tabs werden nur noch fuer das default-Attr
+ //expandiert. Fuer vollstaendige Rueckwaertskompatibilitaet (<=304)
+ //muessten alle Tabs expandiert werden, dass blaeht aber das File u.U.
+ //enorm auf.
+ //Alles nur SWG!
+
+ const SfxItemPool *pPool = SfxItemPool::GetStoringPool();
+ const FASTBOOL bStoreDefTabs = pPool
+ && pPool->GetName().EqualsAscii("SWG")
+ && ::IsDefaultItem( this );
+
+ const short nTabs = Count();
+ sal_uInt16 nCount = 0, nDefDist;
+ long nNew;
+
+ if( bStoreDefTabs )
+ {
+ const SvxTabStopItem& rDefTab = (const SvxTabStopItem &)
+ pPool->GetDefaultItem( pPool->GetWhich( SID_ATTR_TABSTOP, sal_False ) );
+ nDefDist = sal_uInt16( rDefTab.GetStart()->GetTabPos() );
+ const long nPos = nTabs > 0 ? (*this)[nTabs-1].GetTabPos() : 0;
+ nCount = (sal_uInt16)(nPos / nDefDist);
+ nNew = (nCount + 1) * nDefDist;
+
+ if( nNew <= nPos + 50 )
+ nNew += nDefDist;
+
+ nCount = nNew < lA3Width ? ( lA3Width - nNew ) / nDefDist + 1 : 0;
+ }
+
+ rStrm << (sal_Int8) ( nTabs + nCount );
+ for ( short i = 0; i < nTabs; i++ )
+ {
+ const SvxTabStop& rTab = (*this)[ i ];
+ rStrm << (long) rTab.GetTabPos()
+ << (sal_Int8) rTab.GetAdjustment()
+ << (unsigned char) rTab.GetDecimal()
+ << (unsigned char) rTab.GetFill();
+ }
+
+ if ( bStoreDefTabs )
+ for( ; nCount; --nCount )
+ {
+ SvxTabStop aSwTabStop(nNew, SVX_TAB_ADJUST_DEFAULT);
+ rStrm << (long) aSwTabStop.GetTabPos()
+ << (sal_Int8) aSwTabStop.GetAdjustment()
+ << (unsigned char) aSwTabStop.GetDecimal()
+ << (unsigned char) aSwTabStop.GetFill();
+ nNew += nDefDist;
+ }
+
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool SvxTabStopItem::Insert( const SvxTabStop& rTab )
+{
+ sal_uInt16 nTabPos = GetPos(rTab);
+ if(SVX_TAB_NOTFOUND != nTabPos )
+ Remove(nTabPos);
+ return SvxTabStopArr::Insert( rTab );
+}
+// -----------------------------------------------------------------------
+void SvxTabStopItem::Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart,
+ sal_uInt16 nEnd )
+{
+ for( sal_uInt16 i = nStart; i < nEnd && i < pTabs->Count(); i++ )
+ {
+ const SvxTabStop& rTab = (*pTabs)[i];
+ sal_uInt16 nTabPos = GetPos(rTab);
+ if(SVX_TAB_NOTFOUND != nTabPos)
+ Remove(nTabPos);
+ }
+ SvxTabStopArr::Insert( pTabs, nStart, nEnd );
+}
+
+
+
+// class SvxFmtSplitItem -------------------------------------------------
+
+SfxPoolItem* SvxFmtSplitItem::Clone( SfxItemPool * ) const
+{
+ return new SvxFmtSplitItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxFmtSplitItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_Int8)GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFmtSplitItem::Create( SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_Int8 bIsSplit;
+ rStrm >> bIsSplit;
+ return new SvxFmtSplitItem( sal_Bool( bIsSplit != 0 ), Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxFmtSplitItem::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:
+ {
+ sal_uInt16 nId = RID_SVXITEMS_FMTSPLIT_FALSE;
+
+ if ( GetValue() )
+ nId = RID_SVXITEMS_FMTSPLIT_TRUE;
+ rText = SVX_RESSTR(nId);
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// --------------------------------------------------------------------
+
+sal_Bool SvxFmtSplitItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ SetValue( rValue.compareToAscii(sXML_columnsplit_auto ) );
+ return GetValue() || rValue.compareToAscii(sXML_columnsplit_avoid );
+#else
+ return sal_False;
+#endif
+}
+
+sal_Bool SvxFmtSplitItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ if(GetValue())
+ {
+ rValue = OUString(sXML_columnsplit_auto, sizeof(sXML_columnsplit_auto),
+ gsl_getSystemTextEncoding());
+ }
+ else
+ {
+ rValue = OUString(sXML_columnsplit_avoid, sizeof(sXML_columnsplit_avoid),
+ gsl_getSystemTextEncoding());
+ }
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// --------------------------------------------------------------------
+
+SfxPoolItem* SvxPageModelItem::Clone( SfxItemPool* ) const
+{
+ return new SvxPageModelItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxPageModelItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ FASTBOOL bSet = ( GetValue().Len() > 0 );
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return SFX_ITEM_PRESENTATION_NONE;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ if ( bSet )
+ rText = GetValue();
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ if ( bSet )
+ {
+ rText = SVX_RESSTR(RID_SVXITEMS_PAGEMODEL_COMPLETE);
+ rText += GetValue();
+ }
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+
diff --git a/svx/source/items/postattr.cxx b/svx/source/items/postattr.cxx
new file mode 100644
index 0000000000..7ce55fe748
--- /dev/null
+++ b/svx/source/items/postattr.cxx
@@ -0,0 +1,224 @@
+/*************************************************************************
+ *
+ * $RCSfile: postattr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+
+#define _SVX_POSTATTR_CXX
+#define ITEMID_AUTHOR 0
+#define ITEMID_DATE 0
+#define ITEMID_TEXT 0
+
+#include "postattr.hxx"
+#include "itemtype.hxx"
+
+// -----------------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SvxPostItAuthorItem, SfxStringItem);
+TYPEINIT1_AUTOFACTORY(SvxPostItDateItem, SfxStringItem);
+TYPEINIT1_AUTOFACTORY(SvxPostItTextItem, SfxStringItem);
+
+// class SvxPostItAuthorItem ---------------------------------------------
+
+SvxPostItAuthorItem::SvxPostItAuthorItem( sal_uInt16 nWhich )
+{
+ SetWhich( nWhich );
+}
+
+// -----------------------------------------------------------------------
+
+SvxPostItAuthorItem::SvxPostItAuthorItem( const XubString& rAuthor,
+ sal_uInt16 nWhich ) :
+ SfxStringItem( nWhich, rAuthor )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxPostItAuthorItem::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:
+ rText = GetValue();
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = SVX_RESSTR(RID_SVXITEMS_AUTHOR_COMPLETE);
+ rText += GetValue();
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* __EXPORT SvxPostItAuthorItem::Clone( SfxItemPool * ) const
+{
+ return new SvxPostItAuthorItem( *this );
+}
+
+// class SvxPostItDateItem -----------------------------------------------
+
+SvxPostItDateItem::SvxPostItDateItem( sal_uInt16 nWhich )
+{
+ SetWhich( nWhich );
+}
+
+// -----------------------------------------------------------------------
+
+SvxPostItDateItem::SvxPostItDateItem( const XubString& rDate, sal_uInt16 nWhich ) :
+
+ SfxStringItem( nWhich, rDate )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxPostItDateItem::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:
+ rText = GetValue();
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = SVX_RESSTR(RID_SVXITEMS_DATE_COMPLETE);
+ rText += GetValue();
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* __EXPORT SvxPostItDateItem::Clone( SfxItemPool * ) const
+{
+ return new SvxPostItDateItem( *this );
+}
+
+// class SvxPostItTextItem -----------------------------------------------
+
+SvxPostItTextItem::SvxPostItTextItem( sal_uInt16 nWhich )
+{
+ SetWhich( nWhich );
+}
+
+// -----------------------------------------------------------------------
+
+SvxPostItTextItem::SvxPostItTextItem( const XubString& rText, sal_uInt16 nWhich ) :
+
+ SfxStringItem( nWhich, rText )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxPostItTextItem::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:
+ rText = GetValue();
+ return SFX_ITEM_PRESENTATION_NAMELESS;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = SVX_RESSTR(RID_SVXITEMS_TEXT_COMPLETE);
+ rText += GetValue();
+ return SFX_ITEM_PRESENTATION_COMPLETE;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* __EXPORT SvxPostItTextItem::Clone( SfxItemPool * ) const
+{
+ return new SvxPostItTextItem( *this );
+}
+
+
diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx
new file mode 100644
index 0000000000..ab95e9a0f3
--- /dev/null
+++ b/svx/source/items/rotmodit.cxx
@@ -0,0 +1,238 @@
+/*************************************************************************
+ *
+ * $RCSfile: rotmodit.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+#pragma hdrstop
+
+#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
+#include <com/sun/star/table/BorderLine.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLVERTJUSTIFY_HPP_
+#include <com/sun/star/table/CellVertJustify.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_SHADOWLOCATION_HPP_
+#include <com/sun/star/table/ShadowLocation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_TABLEBORDER_HPP_
+#include <com/sun/star/table/TableBorder.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_SHADOWFORMAT_HPP_
+#include <com/sun/star/table/ShadowFormat.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLRANGEADDRESS_HPP_
+#include <com/sun/star/table/CellRangeAddress.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLCONTENTTYPE_HPP_
+#include <com/sun/star/table/CellContentType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_TABLEORIENTATION_HPP_
+#include <com/sun/star/table/TableOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLHORIJUSTIFY_HPP_
+#include <com/sun/star/table/CellHoriJustify.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_SORTFIELD_HPP_
+#include <com/sun/star/util/SortField.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_SORTFIELDTYPE_HPP_
+#include <com/sun/star/util/SortFieldType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLORIENTATION_HPP_
+#include <com/sun/star/table/CellOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_CELLADDRESS_HPP_
+#include <com/sun/star/table/CellAddress.hpp>
+#endif
+
+#include "rotmodit.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// STATIC DATA -----------------------------------------------------------
+
+TYPEINIT1(SvxRotateModeItem, SfxEnumItem);
+
+
+//-----------------------------------------------------------------------
+// SvxRotateModeItem - Ausrichtung bei gedrehtem Text
+//-----------------------------------------------------------------------
+
+SvxRotateModeItem::SvxRotateModeItem( SvxRotateMode eMode, USHORT nWhich )
+ : SfxEnumItem( nWhich, eMode )
+{
+}
+
+SvxRotateModeItem::SvxRotateModeItem( const SvxRotateModeItem& rItem )
+ : SfxEnumItem( rItem )
+{
+}
+
+__EXPORT SvxRotateModeItem::~SvxRotateModeItem()
+{
+}
+
+SfxPoolItem* __EXPORT SvxRotateModeItem::Create( SvStream& rStream, USHORT ) const
+{
+ USHORT nVal;
+ rStream >> nVal;
+ return new SvxRotateModeItem( (SvxRotateMode) nVal,Which() );
+}
+
+SfxItemPresentation __EXPORT SvxRotateModeItem::GetPresentation(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit,
+ String& rText, const International * ) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText.AppendAscii("...");
+ rText.AppendAscii(": ");
+// break; // DURCHFALLEN!!!
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ rText += UniString::CreateFromInt32( GetValue() );
+ break;
+ }
+
+ return ePres;
+}
+
+String __EXPORT SvxRotateModeItem::GetValueText( USHORT nVal ) const
+{
+ String aText;
+
+ switch ( nVal )
+ {
+ case SVX_ROTATE_MODE_STANDARD:
+ case SVX_ROTATE_MODE_TOP:
+ case SVX_ROTATE_MODE_CENTER:
+ case SVX_ROTATE_MODE_BOTTOM:
+ aText.AppendAscii("...");
+ break;
+ default:
+ DBG_ERROR("SvxRotateModeItem: falscher enum");
+ break;
+ }
+ return aText;
+}
+
+USHORT __EXPORT SvxRotateModeItem::GetValueCount() const
+{
+ return 4; // STANDARD, TOP, CENTER, BOTTOM
+}
+
+SfxPoolItem* __EXPORT SvxRotateModeItem::Clone( SfxItemPool* ) const
+{
+ return new SvxRotateModeItem( *this );
+}
+
+USHORT __EXPORT SvxRotateModeItem::GetVersion( USHORT nFileVersion ) const
+{
+ return 0;
+}
+
+// QueryValue/PutValue: Der ::com::sun::star::table::CellVertJustify enum wird mitbenutzt...
+
+sal_Bool SvxRotateModeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ table::CellVertJustify eUno = table::CellVertJustify_STANDARD;
+ switch ( (SvxRotateMode)GetValue() )
+ {
+ case SVX_ROTATE_MODE_STANDARD: eUno = table::CellVertJustify_STANDARD; break;
+ case SVX_ROTATE_MODE_TOP: eUno = table::CellVertJustify_TOP; break;
+ case SVX_ROTATE_MODE_CENTER: eUno = table::CellVertJustify_CENTER; break;
+ case SVX_ROTATE_MODE_BOTTOM: eUno = table::CellVertJustify_BOTTOM; break;
+ }
+ rVal <<= eUno;
+ return sal_True;
+}
+
+sal_Bool SvxRotateModeItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ table::CellVertJustify eUno;
+ if(!(rVal >>= eUno))
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ eUno = (table::CellVertJustify)nValue;
+ }
+
+ SvxRotateMode eSvx = SVX_ROTATE_MODE_STANDARD;
+ switch (eUno)
+ {
+ case table::CellVertJustify_STANDARD: eSvx = SVX_ROTATE_MODE_STANDARD; break;
+ case table::CellVertJustify_TOP: eSvx = SVX_ROTATE_MODE_TOP; break;
+ case table::CellVertJustify_CENTER: eSvx = SVX_ROTATE_MODE_CENTER; break;
+ case table::CellVertJustify_BOTTOM: eSvx = SVX_ROTATE_MODE_BOTTOM; break;
+ }
+ SetValue( eSvx );
+ return sal_True;
+}
+
+
+
diff --git a/svx/source/items/svxempty.cxx b/svx/source/items/svxempty.cxx
new file mode 100644
index 0000000000..d3fe8bbcf8
--- /dev/null
+++ b/svx/source/items/svxempty.cxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxempty.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "svxempty.hxx"
+
+// Statischer Empty-String -----------------------------------------------
+
+static XubString aImplSVXEmptyStr;
+XubString& rImplEmptyStr = aImplSVXEmptyStr;
+#ifdef ENABLEUNICODE
+static String aImplSVXEmptySStr;
+String& rImplEmptySStr = aImplSVXEmptySStr;
+#endif
+
+
diff --git a/svx/source/items/svxerr.cxx b/svx/source/items/svxerr.cxx
new file mode 100644
index 0000000000..b7ff7948f9
--- /dev/null
+++ b/svx/source/items/svxerr.cxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxerr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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
+#pragma hdrstop
+
+#include "svxerr.hxx"
+#include "dialmgr.hxx"
+
+#include "dialogs.hrc"
+
+SvxErrorHandler::SvxErrorHandler() :
+
+ SfxErrorHandler(
+ RID_SVXERRCODE, ERRCODE_AREA_SVX, ERRCODE_AREA_SVX_END, DIALOG_MGR() )
+{
+}
+
+
diff --git a/svx/source/items/svxerr.src b/svx/source/items/svxerr.src
new file mode 100644
index 0000000000..3b39dff726
--- /dev/null
+++ b/svx/source/items/svxerr.src
@@ -0,0 +1,645 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxerr.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 ---------------------------------------------------------------
+#define __RSC
+#include "svxerr.hxx"
+#include "dialogs.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // Error-Context ---------------------------------------------------------
+Resource RID_SVXERRCTX
+{
+ String ERRCTX_SVX_LINGU_THESAURUS&ERRCODE_RES_MASK
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? $(ERR) beim Ausführen des Thesaurus. : $(ERR) beim Ausf³hren des Thesaurus. */
+ /* ### ACHTUNG: Neuer Text in Resource? $(ERR) beim Ausführen des Thesaurus. : $(ERR) beim Ausf³hren des Thesaurus. */
+ TEXT = "$(ERR) beim Ausführen des Thesaurus." ;
+ Text [ English ] = "$(ERR) executing the thesaurus." ;
+ Text [ english_us ] = "$(ERR) executing the thesaurus." ;
+ Text [ italian ] = "$(ERR) nell'uso del dizionario dei sinonimi." ;
+ Text [ spanish ] = "$(ERR) al ejecutar el diccionario de sinónimos." ;
+ Text [ french ] = "$(ERR) lors de l'exécution du dictionnaire des synonymes" ;
+ Text [ dutch ] = "$(ERR) bij het uitvoeren van de thesaurus." ;
+ Text [ swedish ] = "$(ERR) vid användandet av synonymordboken." ;
+ Text [ danish ] = "$(ERR) ved brug af synonymordbogen." ;
+ Text [ portuguese ] = "$(ERR) ao executar o dicionário de sinónimos." ;
+ Text [ portuguese_brazilian ] = "$(ERR) beim Ausführen des Thesaurus." ;
+ Text[ chinese_simplified ] = "$(ERR)·¢ÉúÔÚʹÓôʵäʱ¡£";
+ Text[ russian ] = "$(ERR) ïðè âûïîëíåíèè òåçàóðóñà.";
+ Text[ polish ] = "$(ERR) przy wykonywaniu Tezaurusa.";
+ Text[ japanese ] = "$(ERR) —ތꎫ“TŽg—p‚ÌÛ‚É”­¶B";
+ Text[ chinese_traditional ] = "$(ERR)µo¥Í¦b¨Ï¥Îµü¨å®É¡C";
+ Text[ arabic ] = "$(ERR) ÃËäÇÁ ÊäÝíÐ ÞÇãæÓ ÇáãÑÇÏÝÇÊ.";
+ Text[ dutch ] = "$(ERR) bij het uitvoeren van de thesaurus.";
+ Text[ chinese_simplified ] = "$(ERR)·¢ÉúÔÚʹÓôʵäʱ¡£";
+ Text[ greek ] = "$(ERR) êáôÜ ôçí åêôÝëåóç ôïõ èçóáõñïý ëÝîåùí.";
+ Text[ korean ] = "µ¿ÀÇ¾î »çÀü ½ÇÇà½Ã $(ERR)";
+ Text[ turkish ] = "Eþanlamlýlar kullanýmý sýrasýnda $(ERR).";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCTX_SVX_LINGU_SPELLING&ERRCODE_RES_MASK
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? $(ERR) bei der Ausführung der Rechtschreibprüfung. : $(ERR) bei der Ausf³hrung der Rechtschreibpr³fung. */
+ /* ### ACHTUNG: Neuer Text in Resource? $(ERR) bei der Ausführung der Rechtschreibprüfung. : $(ERR) bei der Ausf³hrung der Rechtschreibpr³fung. */
+ TEXT = "$(ERR) bei der Ausführung der Rechtschreibprüfung." ;
+ Text [ English ] = "$(ERR) executing the spellchecker." ;
+ Text [ english_us ] = "$(ERR) executing the spellcheck." ;
+ Text [ italian ] = "$(ERR) nell'eseguire il controllo ortografico." ;
+ Text [ spanish ] = "$(ERR) al ejecutar la revisión ortográfica." ;
+ Text [ french ] = "$(ERR) lors de l'exécution de la vérification de l'orthographe." ;
+ Text [ dutch ] = "$(ERR) bij het uitvoeren van de spellingcontrole" ;
+ Text [ swedish ] = "$(ERR) vid utförandet av rättstavningskontrollen." ;
+ Text [ danish ] = "$(ERR) under køring af stavekontrollen." ;
+ Text [ portuguese ] = "$(ERR) ao executar a verificação ortográfica." ;
+ Text [ portuguese_brazilian ] = "$(ERR) bei der Ausführung der Rechtschreibprüfung." ;
+ Text[ chinese_simplified ] = "$(ERR) ·¢ÉúÔÚÖ´ÐÐÕý×Ö·¨¼ì²éʱ¡£";
+ Text[ russian ] = "$(ERR) ïðè âûïîëíåíèè ïðîâåðêè ïðàâîïèñàíèÿ.";
+ Text[ polish ] = "$(ERR) przy sprawdzaniu pisowni.";
+ Text[ japanese ] = "$(ERR) ½ÍßÙÁª¯¸ŽÀs’†‚É”­¶B";
+ Text[ chinese_traditional ] = "$(ERR)µo¥Í¦b¨Ï¥Î«÷¦r¥\\¯à®É¡C";
+ Text[ arabic ] = "$(ERR) ÃËäÇÁ ÊäÝíÐ ÚãáíÉ ÇáÊÏÞíÞ ÇáÅãáÇÆí.";
+ Text[ dutch ] = "$(ERR) bij het uitvoeren van de spellingcontrole";
+ Text[ chinese_simplified ] = "$(ERR) ·¢ÉúÔÚÖ´ÐÐÕý×Ö·¨¼ì²éʱ¡£";
+ Text[ greek ] = "$(ERR) êáôÜ ôçí åêôÝëåóç ôïõ ïñèïãñáöéêïý åëÝã÷ïõ.";
+ Text[ korean ] = "¸ÂÃã¹ý °Ë»ç ½ÇÇà½Ã $(ERR)";
+ Text[ turkish ] = "Yazým denetimi sýrasýnda $(ERR).";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCTX_SVX_LINGU_HYPHENATION&ERRCODE_RES_MASK
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? $(ERR) bei der Ausführung der Trennhilfe. : $(ERR) bei der Ausf³hrung der Trennhilfe. */
+ /* ### ACHTUNG: Neuer Text in Resource? $(ERR) bei der Ausführung der Trennhilfe. : $(ERR) bei der Ausf³hrung der Trennhilfe. */
+ TEXT = "$(ERR) bei der Ausführung der Trennhilfe." ;
+ Text [ English ] = "$(ERR) executing the hyphenation." ;
+ Text [ english_us ] = "$(ERR) executing the hyphenation." ;
+ Text [ italian ] = "$(ERR) nell'eseguire la sillabazione." ;
+ Text [ spanish ] = "$(ERR) al ejecutar la separación silábica." ;
+ Text [ french ] = "$(ERR) lors de l'exécution de la césure." ;
+ Text [ dutch ] = "$(ERR) bij het uitvoeren van de woordafbreking" ;
+ Text [ swedish ] = "$(ERR) vid utförandet av avstavningen." ;
+ Text [ danish ] = "$(ERR) under køring af orddelingen." ;
+ Text [ portuguese ] = "$(ERR) ao executar a divisão silábica." ;
+ Text [ portuguese_brazilian ] = "$(ERR) bei der Ausführung der Trennhilfe." ;
+ Text[ chinese_simplified ] = "$(ERR) ·¢ÉúÔÚʹÓÃÁ¬×Ö·ûʱ¡£";
+ Text[ russian ] = "$(ERR) ïðè âûïîëíåíèè ðàññòîíîâêè ïåðåíîñîâ.";
+ Text[ polish ] = "$(ERR) przy wykonywaniu dzielenia s³ów na sylaby.";
+ Text[ japanese ] = "$(ERR) ʲÌÈ°¼®ÝŽÀs’†‚É”­¶B";
+ Text[ chinese_traditional ] = "$(ERR)µo¥Í¦b¨Ï¥Î³s¦r²Å®É¡C";
+ Text[ arabic ] = "$(ERR) ÃËäÇÁ ÊäÝíÐ ÚãáíÉ ÝÕá ÇáãÞÇØÚ.";
+ Text[ dutch ] = "$(ERR) bij het uitvoeren van de woordafbreking";
+ Text[ chinese_simplified ] = "$(ERR) ·¢ÉúÔÚʹÓÃÁ¬×Ö·ûʱ¡£";
+ Text[ greek ] = "$(ERR) êáôÜ ôçí åêôÝëåóç ôçò âïÞèåéáò óõëëáâéóìïý.";
+ Text[ korean ] = "ÇÏÀÌÇ ½ÇÇà½Ã $(ERR)";
+ Text[ turkish ] = "Heceleme yardýmýný yürütme sýrasýnda $(ERR).";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCTX_SVX_LINGU_DICTIONARY&ERRCODE_RES_MASK
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? $(ERR) beim Anlegen eines Wörterbuches. : $(ERR) beim Anlegen eines W÷rterbuches. */
+ /* ### ACHTUNG: Neuer Text in Resource? $(ERR) beim Anlegen eines Wörterbuches. : $(ERR) beim Anlegen eines W÷rterbuches. */
+ TEXT = "$(ERR) beim Anlegen eines Wörterbuches." ;
+ Text [ English ] = "$(ERR) creating a dictionary." ;
+ Text [ english_us ] = "$(ERR) creating a dictionary." ;
+ Text [ italian ] = "$(ERR) nel creare un dizionario." ;
+ Text [ spanish ] = "$(ERR) al crear un diccionario." ;
+ Text [ french ] = "$(ERR) lors de la création d'un dictionnaire" ;
+ Text [ dutch ] = "$(ERR) bij het maken van een woordenboek" ;
+ Text [ swedish ] = "$(ERR) vid skapandet av en ordbok." ;
+ Text [ danish ] = "$(ERR) under oprettelse af en ordbog." ;
+ Text [ portuguese ] = "$(ERR) ao criar dicionário." ;
+ Text [ portuguese_brazilian ] = "$(ERR) beim Anlegen eines Wörterbuches." ;
+ Text[ chinese_simplified ] = "$(ERR) ·¢ÉúÔÚ½¨Á¢Ò»¸ö´Êµäʱ¡£";
+ Text[ russian ] = "$(ERR) ïðè ñîçäàíèè ñëîâàðÿ.";
+ Text[ polish ] = "$(ERR) przy tworzeniu s³ownika.";
+ Text[ japanese ] = "$(ERR)Ž«‘쬂ÌÛ‚É”­¶B";
+ Text[ chinese_traditional ] = "$(ERR)µo¥Í¦b¥Í¦¨¤@­Óµü¨å®É¡C";
+ Text[ arabic ] = "$(ERR) ÃËäÇÁ ÅäÔÇÁ ÞÇãæÓ.";
+ Text[ dutch ] = "$(ERR) bij het maken van een woordenboek";
+ Text[ chinese_simplified ] = "$(ERR) ·¢ÉúÔÚ½¨Á¢Ò»¸ö´Êµäʱ¡£";
+ Text[ greek ] = "$(ERR) êáôÜ ôç äçìéïõñãßá åíüò ëåîéêïý.";
+ Text[ korean ] = "»çÀü ÀÛ¼º½Ã $(ERR)";
+ Text[ turkish ] = "Sözlük oluþturma sýrasýnda $(ERR).";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCTX_SVX_BACKGROUND&ERRCODE_RES_MASK
+ {
+ TEXT = "$(ERR) beim Festlegen eines Hintergrundattributes." ;
+ Text [ English ] = "$(ERR) setting background attribute." ;
+ Text [ english_us ] = "$(ERR) setting background attribute." ;
+ Text [ italian ] = "$(ERR) nel definire un attributo dello sfondo." ;
+ Text [ spanish ] = "$(ERR) al definir un atributo de fondo." ;
+ Text [ french ] = "$(ERR) lors du paramétrage de l'attribut d'arrière-plan" ;
+ Text [ dutch ] = "$(ERR) bij het maken van een achtergrondattribuut" ;
+ Text [ swedish ] = "$(ERR) vid fastställandet av bakgrundsattributen." ;
+ Text [ danish ] = "$(ERR) under indstilling af et baggrundsattribut." ;
+ Text [ portuguese ] = "$(ERR) ao definir atributo do plano de fundo." ;
+ Text [ portuguese_brazilian ] = "$(ERR) beim Festlegen eines Hintergrundattributes." ;
+ Text[ chinese_simplified ] = "$(ERR) ·¢ÉúÔÚÈ·¶¨Ò»¸ö±³¾°ÊôÐÔʱ¡£";
+ Text[ russian ] = "$(ERR) ïðè óñòàíîâêå àòðèáóòà ôîíà.";
+ Text[ polish ] = "$(ERR) przy ustawianiu atrybutów t³a.";
+ Text[ japanese ] = "$(ERR) ”wŒi‘®«‚ðÝ’è‚·‚éÛ‚É”­¶B";
+ Text[ chinese_traditional ] = "$(ERR)µo¥Í¦b½T©w¤@­Ó­I´ºÄݩʮɡC";
+ Text[ arabic ] = "$(ERR) ÃËäÇÁ ÊÚííä ÅÍÏì ÓãÇÊ ÇáÎáÝíÉ.";
+ Text[ dutch ] = "$(ERR) bij het maken van een achtergrondattribuut";
+ Text[ chinese_simplified ] = "$(ERR) ·¢ÉúÔÚÈ·¶¨Ò»¸ö±³¾°ÊôÐÔʱ¡£";
+ Text[ greek ] = "$(ERR) êáôÜ ôïí ïñéóìü ìéáò éäéüôçôáò öüíôïõ.";
+ Text[ korean ] = "¹è°æ ¼Ó¼º ¼³Á¤½Ã $(ERR)";
+ Text[ turkish ] = "Artalan özniteliklerinin tanýmlanmasý sýrasýnda $(ERR) .";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCTX_SVX_IMPORT_GRAPHIC&ERRCODE_RES_MASK
+ {
+ TEXT = "$(ERR) beim Laden einer Grafik." ;
+ Text [ English ] = "$(ERR) loading graphic." ;
+ Text [ english_us ] = "$(ERR) loading the graphics." ;
+ Text [ italian ] = "$(ERR) nel caricare un'immagine." ;
+ Text [ spanish ] = "$(ERR) al cargar una imagen." ;
+ Text [ french ] = "$(ERR) lors du chargement d'un graphique" ;
+ Text [ dutch ] = "$(ERR) bij het laden van een afbeelding" ;
+ Text [ swedish ] = "$(ERR) vid laddning av en grafik." ;
+ Text [ danish ] = "$(ERR) under indlæsning af et billede." ;
+ Text [ portuguese ] = "$(ERR) ao carregar imagem." ;
+ Text [ portuguese_brazilian ] = "$(ERR) beim Laden einer Grafik." ;
+ Text[ chinese_simplified ] = "$(ERR) ·¢ÉúÔÚ×°ÔØÒ»¸öͼÐÎʱ¡£";
+ Text[ russian ] = "$(ERR) ïðè çàãðóçêå ãðàôèêè.";
+ Text[ polish ] = "$(ERR) przy ³adowaniu grafiki.";
+ Text[ japanese ] = "$(ERR) ¸Þ×̨¯¸‚ðÛ°ÄÞ’†‚É”­¶B";
+ Text[ chinese_traditional ] = "$(ERR)µo¥Í¦b¸Ë¸ü¤@­Ó¹Ï¤ù®É¡C";
+ Text[ arabic ] = "$(ERR) ÃËäÇÁ ÊÍãíá ÇáÑÓã.";
+ Text[ dutch ] = "$(ERR) bij het laden van een afbeelding";
+ Text[ chinese_simplified ] = "$(ERR) ·¢ÉúÔÚ×°ÔØÒ»¸öͼÐÎʱ¡£";
+ Text[ greek ] = "$(ERR) êáôÜ ôç öüñôùóç åíüò ãñáöéêïý.";
+ Text[ korean ] = "±×·¡ÇÈ ·Îµå½Ã $(ERR)";
+ Text[ turkish ] = "Grafik yükleme sýrasýnda $(ERR).";
+ Text[ language_user1 ] = " ";
+ };
+};
+ // Error-Code ------------------------------------------------------------
+Resource RID_SVXERRCODE
+{
+ String ERRCODE_SVX_LINGU_THESAURUSNOTEXISTS&ERRCODE_RES_MASK
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Ein Thesaurus für die eingestellte Sprache ist nicht verfügbar.\nÜberprüfen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gewünschte Sprache : Ein Thesaurus f³r die eingestellte Sprache ist nicht verf³gbar.\nšberpr³fen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gew³nschte Sprache */
+ /* ### ACHTUNG: Neuer Text in Resource? Ein Thesaurus für die eingestellte Sprache ist nicht verfügbar.\nÜberprüfen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gewünschte Sprache : Ein Thesaurus f³r die eingestellte Sprache ist nicht verf³gbar.\nšberpr³fen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gew³nschte Sprache */
+ TEXT = "Ein Thesaurus für die eingestellte Sprache ist nicht verfügbar.\nÜberprüfen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gewünschte Sprache" ;
+ TEXT [ English ] = "For the current Language no Thesaurus is available.\nPlease check your installation and install the desired language." ;
+ Text [ english_us ] = "No thesaurus available for the current language.\nPlease check your installation and install the desired language" ;
+ Text [ italian ] = "Per la lingua scelta non esiste un dizionario dei sinonimi..\nControllare l'installazione ed installare se necessario il linguaggio desiderato" ;
+ Text [ spanish ] = "No hay ningún diccionario de sinónimos disponible para el idioma seleccionado.\nExamine por favor su instalación e instale en caso dado el idioma deseado." ;
+ Text [ french ] = "Aucun dictionnaire des synonymes n'est disponible pour la langue sélectionnée.\nVeuillez vérifiez l'installation et installer\nle cas échéant la langue concernée." ;
+ Text [ dutch ] = "Een thesaurus voor de ingestelde taal is niet beschikbaar.\nControleer uw installatie en installeer de gewenste taal" ;
+ Text [ swedish ] = "Ingen synonymordbok är tillgänglig för det inställda språket.\nKontrollera Din installation och installera eventuellt det önskade språket." ;
+ Text [ danish ] = "Synonymordbogen står ikke til rådighed for det indstillede sprog.\nKontroller venligst din installation og installer i givet fald det ønskede sprog." ;
+ Text [ portuguese ] = "O dicionário de sinónimos não se encontra disponível para a língua especificada.\nConfira a sua instalação e, se necessário, instale a língua desejada." ;
+ Text [ portuguese_brazilian ] = "Ein Thesaurus für die eingestellte Sprache ist nicht verfügbar.\nÜberprüfen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gewünschte Sprache" ;
+ Text[ chinese_simplified ] = "ÄúËùÉ趨µÄÓïÑÔûÓÐÏàÓ¦µÄ´Êµä¡£\nÇëÄú¼ì²é°²×°£¬ÈçÓбØÒª£¬ÇëÄú°²×°ËùҪʹÓõÄÓïÑÔ°æ±¾¡£";
+ Text[ russian ] = "Äëÿ óñòàíîâëåííîãî ÿçûêà òåçàóðóñ íåäîñòóïåí.\nÏðîâåðüòå, ïîæàëóéñòà. Âàøó èíñòàëëÿöèþ è, â ñëó÷àå íåîáõîäèìîñòè, èíñòàëëèðóéòå òðåáóåìûé ÿçûê.";
+ Text[ polish ] = "Tezaurus jest niedostêpny dla wybranego jêzyka.\nProszê sprawdziæ instalacjê i zainstalowaæ potrzebny jêzyk.";
+ Text[ japanese ] = "ݒ肳‚ꂽŒ¾Œê—p‚̗ތꎫ“T‚ÍŽg—p‚Å‚«‚Ü‚¹‚ñB\n‚²Žg—p‚ÌÌßÛ¸Þ×т̲ݽİقðÄÁª¯¸‚µ‚ÄAꇂɂæ‚Á‚Ä‚ÍA‚²Šó–]‚ÌŒ¾Œê‚ð²Ý½Ä°Ù‚µ‚ĉº‚³‚¢B";
+ Text[ chinese_traditional ] = "±z©Ò³]©wªº»y¨¥¨S¦³¬ÛÀ³ªºµü¨å¡C\n½Ð±zÀˬd¦w¸Ë¡M­Y¦³¥²­n¡M½Ð¦w¸Ë©Ò­n¨Ï¥Îªº»y¨¥ª©¥»¡C";
+ Text[ arabic ] = "áÇ íæÌÏ ÞÇãæÓ ãÑÇÏÝÇÊ ááÛÉ ÇáÊí Êã ÊÍÏíÏåÇ.\nÇáÑÌÇÁ ÝÍÕ ÇáÊËÈíÊ ÇáÎÇÕ Èß¡ Ëã ÇáÞíÇã ÈÊËÈíÊ ÇááÛÉ ÇáãØáæÈÉ¡ ÅÐÇ áÒã ÇáÃãÑ";
+ Text[ dutch ] = "Een thesaurus voor de ingestelde taal is niet beschikbaar.\nControleer uw installatie en installeer de gewenste taal";
+ Text[ chinese_simplified ] = "ÄúËùÉ趨µÄÓïÑÔûÓÐÏàÓ¦µÄ´Êµä¡£\nÇëÄú¼ì²é°²×°£¬ÈçÓбØÒª£¬ÇëÄú°²×°ËùҪʹÓõÄÓïÑÔ°æ±¾¡£";
+ Text[ greek ] = "Äåí õðÜñ÷åé äéáèÝóéìïò èçóáõñüò ëÝîåùí ãéá ôçí åðéëåãìÝíç \nãëþóóá. Ðáñáêáëþ åëÝãîôå ôçí åãêáôÜóôáóç êáé, áí ÷ñåéáóôåß, åêôåëÝóôå ôçí åãêáôÜóôáóç ôçò ãëþóóáò ðïõ åðéèõìåßôå";
+ Text[ korean ] = "¼³Á¤µÈ ¾ð¾î¿¡ µ¿ÀÇ¾î »çÀüÀ» ÀÌ¿ëÇÒ ¼ö ¾ø½À´Ï´Ù. \n¼³Ä¡ÇÑ °ÍÀ» °ËÅäÇÏ°í ÇÊ¿äÇÏ¸é ¿øÇÏ´Â ¾ð¾î¸¦ ¼³Ä¡ÇϽʽÿÀ.";
+ Text[ turkish ] = "Ayarlanan dile iliþkin eþanlamlýlar mevcut deðil.\nLütfen kurulumu kontrol edin ve gerekirse istenilen dili kurun.";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS&ERRCODE_RES_MASK
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? $(ARG1) ist für die Prüfung nicht verfügbar.\nÜberprüfen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gewünschte Sprache. : $(ARG1) ist f³r die Pr³fung nicht verf³gbar.\nšberpr³fen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gew³nschte Sprache. */
+ /* ### ACHTUNG: Neuer Text in Resource? $(ARG1) ist für die Prüfung nicht verfügbar.\nÜberprüfen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gewünschte Sprache. : $(ARG1) ist f³r die Pr³fung nicht verf³gbar.\nšberpr³fen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gew³nschte Sprache. */
+ TEXT = "$(ARG1) ist für die Prüfung nicht verfügbar.\nÜberprüfen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gewünschte Sprache." ;
+ TEXT [ English ] = "$(ARG1) is not available for spellchecking.\nPlease check your installation and install the desired language." ;
+ Text [ english_us ] = "$(ARG1) is not available for spellchecking.\nPlease check your installation and install the desired language." ;
+ Text [ italian ] = "$(ARG1) non è disponibile per il controllo.\nControllare l'installazione ed installare se necessario la lingua desiderata." ;
+ Text [ spanish ] = "$(ARG1) no disponible para la revisión ortográfica.\n Examine por favor su instalación e instale en caso dado el idioma deseado." ;
+ Text [ french ] = "$(ARG1) n'est pas disponible pour vérification. \nVeuillez vérifier l'installation et installer le cas échéant la langue souhaitée." ;
+ Text [ dutch ] = "$(ARG1) voor de controle is niet beschikbaar.\nControleer uw installatie en installeer de gewenste taal" ;
+ Text [ swedish ] = "$(ARG1) är inte tillgänglig för stavningskontrollen.\nKontrollera installationen och installera eventuellt det önskade språket." ;
+ Text [ danish ] = "$(ARG1) står ikke til rådighed for kontrollen.\nKontroller venligst din installation og installer i givet fald det ønskede sprog." ;
+ Text [ portuguese ] = "$(ARG1) não está disponível para a verificação ortográfica. \nConfira a sua instalação e, se necessário, instale a língua desejada." ;
+ Text [ portuguese_brazilian ] = "$(ARG1) ist für die Prüfung nicht verfügbar.\nÜberprüfen Sie bitte Ihre Installation und installieren Sie gegebenenfalls die gewünschte Sprache." ;
+ Text[ chinese_simplified ] = "$(ARG1)²»´æÔÚ¡£\nÇëÄú¼ì²é°²×°£¬ÈçÓбØÒªÇë°²×°ËùÐèµÄÓïÑÔ°æ±¾¡£";
+ Text[ russian ] = "$(ARG1) äëÿ ïðîâåðêè íåäîñòóïåí.\nÏðîâåðüòå, ïîæàëóéñòà. Âàøó èíñòàëëÿöèþ è, â ñëó÷àå íåîáõîäèìîñòè, èíñòàëëèðóéòå òðåáóåìûé ÿçûê.";
+ Text[ polish ] = "$(ARG1) jest dla sprawdzania pisowni niedostêpny.\nProszê sprawdziæ instalacjê i zainstalowaæ potrzebny jêzyk.";
+ Text[ japanese ] = "$(ARG1)‚ͽÍßÙÁª¯¸‚ÉŽg—p‚Å‚«‚Ü‚¹‚ñB\n‚²Žg—p‚ÌÌßÛ¸Þ×т̲ݽİقðÄÁª¯¸‚µ‚ÄAꇂɂæ‚Á‚Ä‚ÍA‚²Šó–]‚ÌŒ¾Œê‚ð²Ý½Ä-Ù‚µ‚Ä‚­‚¾‚³‚¢B";
+ Text[ chinese_traditional ] = "$(ARG1)¤£¦s¦b¡C\n½Ð±zÀˬd¦w¸Ë¡M­Y¦³¥²­n½Ð±z¦w¸Ë©Ò»Ýªº»y¨¥ª©¥»¡C";
+ Text[ arabic ] = "$(ARG1) ÛíÑ ãÊæÝÑ ááÊÏÞíÞ ÇáÅãáÇÆí.\nÇáÑÌÇÁ ÝÍÕ ÇáÊËÈíÊ ÇáÎÇÕ Èß¡ æÊËÈíÊ ÇááÛÉ ÇáãØáæÈÉ¡ ÅÐÇ áÒã ÇáÃãÑ.";
+ Text[ dutch ] = "$(ARG1) voor de controle is niet beschikbaar.\nControleer uw installatie en installeer de gewenste taal";
+ Text[ chinese_simplified ] = "$(ARG1)²»´æÔÚ¡£\nÇëÄú¼ì²é°²×°£¬ÈçÓбØÒªÇë°²×°ËùÐèµÄÓïÑÔ°æ±¾¡£";
+ Text[ greek ] = "$(ARG1) äåí åßíáé äéáèÝóéìï ãéá ôïí ïñèïãñáöéêü Ýëåã÷ï.\nÐáñáêáëþ åëÝãîôå ôçí åãêáôÜóôáóç êáé åãêáôáóôÞóôå áí ÷ñåéáóôåß ôçí ãëþóóá ðïõ åðéèõìåßôáé.";
+ Text[ korean ] = "$(ARG1)´Â ¸ÂÃã¹ý °Ë»ç¿¡ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.\n¼³Ä¡ÇÑ °ÍÀ» °ËÅäÇÏ°í ÇÊ¿äÇÏ¸é ¿øÇÏ´Â ¾ð¾î¸¦ ¼³Ä¡ÇϽʽÿÀ.";
+ Text[ turkish ] = "$(ARG1) yazým denetiminde kullanýlamýyor.\nLütfen kurulumu kontrol edin ve gerekirse istenilen dili kurun.";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCODE_SVX_LINGU_LINGUNOTEXISTS&ERRCODE_RES_MASK
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Die Rechtschreibprüfung ist nicht verfügbar. : Die Rechtschreibpr³fung ist nicht verf³gbar. */
+ /* ### ACHTUNG: Neuer Text in Resource? Die Rechtschreibprüfung ist nicht verfügbar. : Die Rechtschreibpr³fung ist nicht verf³gbar. */
+ TEXT = "Die Rechtschreibprüfung ist nicht verfügbar." ;
+ TEXT [ English ] = "Spellchecking is not available." ;
+ Text [ english_us ] = "Spellcheck is not available." ;
+ Text [ italian ] = "Il controllo ortografico non è disponibile." ;
+ Text [ spanish ] = "La revisión ortográfica no está disponible." ;
+ Text [ french ] = "La vérification de l'orthographe n'est pas disponible." ;
+ Text [ dutch ] = "De spellingcontrole is niet beschikbaar." ;
+ Text [ swedish ] = "Rättstavningskontrollen är inte tillgänglig." ;
+ Text [ danish ] = "Stavekontrollen står ikke til rådighed." ;
+ Text [ portuguese ] = "A verificação ortográfica não está disponível." ;
+ Text [ portuguese_brazilian ] = "Die Rechtschreibprüfung ist nicht verfügbar." ;
+ Text[ chinese_simplified ] = "²»ÌṩÕâ¸öÕý×Ö·¨¼ì²é¹¦ÄÜ¡£";
+ Text[ russian ] = "Ïðîâåðêà ïðàâîïèñàíèÿ íåäîñòóïíà.";
+ Text[ polish ] = "Sprawdzanie pisowni jest niedostêpne.";
+ Text[ japanese ] = "‚±‚Ì•¶ÍZ³‚ÍŽg—p‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "³o­Ó«÷¦r¥\\¯à¤£¦s¦b¡C";
+ Text[ arabic ] = "ÇáÊÏÞíÞ ÇáÅãáÇÆí ÛíÑ ãÊæÝÑ.";
+ Text[ dutch ] = "De spellingcontrole is niet beschikbaar.";
+ Text[ chinese_simplified ] = "²»ÌṩÕâ¸öÕý×Ö·¨¼ì²é¹¦ÄÜ¡£";
+ Text[ greek ] = "Ï ïñèïãñáöéêüò Ýëåã÷ïò äåí åßíáé äéáèÝóéìïò.";
+ Text[ korean ] = "¸ÂÃã¹ý °Ë»ç¸¦ ÇÒ ¼ö ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "Yazým denetimi iþlevi kullanýlamýyor.";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCODE_SVX_LINGU_HYPHENNOTEXISTS&ERRCODE_RES_MASK
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Die Trennhilfe ist nicht verfügbar. : Die Trennhilfe ist nicht verf³gbar. */
+ /* ### ACHTUNG: Neuer Text in Resource? Die Trennhilfe ist nicht verfügbar. : Die Trennhilfe ist nicht verf³gbar. */
+ TEXT = "Die Trennhilfe ist nicht verfügbar." ;
+ TEXT [ English ] = "Hyphenation is not available." ;
+ Text [ english_us ] = "Hyphenation not available." ;
+ Text [ italian ] = "La sillabazione non è disponibile." ;
+ Text [ spanish ] = "La ayuda para la separación silábica no está disponible." ;
+ Text [ french ] = "La césure n'est pas disponible." ;
+ Text [ dutch ] = "De modus Woordafbreken is niet beschikbaar." ;
+ Text [ swedish ] = "Avstavningshjälpen är inte tillgänglig." ;
+ Text [ danish ] = "Orddelingen står ikke til rådighed." ;
+ Text [ portuguese ] = "A separação silábica não está disponível." ;
+ Text [ portuguese_brazilian ] = "Die Trennhilfe ist nicht verfügbar." ;
+ Text[ chinese_simplified ] = "Á¬×Ö·û²»´æÔÚ¡£";
+ Text[ russian ] = "Ïîìîùü â ðàññòàíîâêå ïåðåíîñîâ íåäîñòóïíà.";
+ Text[ polish ] = "Dzielenie wyrazów jest niedostêpne.";
+ Text[ japanese ] = "ʲÌÈ°¼®Ý‚ªŽg—p‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "³s¦r²Å¤£¦s¦b¡C";
+ Text[ arabic ] = "ãÓÇÚÏÉ ÝÕá ÇáãÞÇØÚ ÛíÑ ãÊæÝÑÉ.";
+ Text[ dutch ] = "De modus Woordafbreken is niet beschikbaar.";
+ Text[ chinese_simplified ] = "Á¬×Ö·û²»´æÔÚ¡£";
+ Text[ greek ] = "Ç âïÞèåéá óõëëáâéóìïý äåí åßíáé äéáèÝóéìç.";
+ Text[ korean ] = "ÇÏÀÌÇÂÀ» »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "Heceleme yardýmý mevcut deðil.";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCODE_SVX_LINGU_DICT_NOTREADABLE&ERRCODE_RES_MASK
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Das persönliche Wörterbuch $(ARG1) kann nicht gelesen werden. : Das pers÷nliche W÷rterbuch $(ARG1) kann nicht gelesen werden. */
+ /* ### ACHTUNG: Neuer Text in Resource? Das persönliche Wörterbuch $(ARG1) kann nicht gelesen werden. : Das pers÷nliche W÷rterbuch $(ARG1) kann nicht gelesen werden. */
+ TEXT = "Das persönliche Wörterbuch $(ARG1) kann nicht gelesen werden." ;
+ TEXT [ English ] = "The personal dictionary $(ARG1) cannot be read." ;
+ Text [ english_us ] = "The custom dictionary $(ARG1) cannot be read." ;
+ Text [ italian ] = "Il dizionario personalizzato $(ARG1) non può essere letto" ;
+ Text [ spanish ] = "No es posible leer el diccionario personal $(ARG1)." ;
+ Text [ french ] = "Impossible de lire le dictionnaire personnalisé $(ARG1)." ;
+ Text [ dutch ] = "Het persoonlijke woordenboek $(ARG1) kan niet worden gelezen." ;
+ Text [ swedish ] = "Den personliga ordboken $(ARG1) kan inte läsas." ;
+ Text [ danish ] = "Det er ikke muligt at læse den personlige ordbog $(ARG1)." ;
+ Text [ portuguese ] = "Impossível ler o dicionário pessoal $(ARG1)." ;
+ Text [ portuguese_brazilian ] = "Das persönliche Wörterbuch $(ARG1) kann nicht gelesen werden." ;
+ Text[ chinese_simplified ] = "ÎÞ·¨¶Á³ö˽È˴ʵä $(ARG1)¡£";
+ Text[ russian ] = "Ïðî÷èòàòü ñëîâàðü ïîëüçîâàòåëÿ $(ARG1) íå óäàåòñÿ.";
+ Text[ polish ] = "S³ownik u¿ytkownika $(ARG1) nie móg³ zostaæ odczytany.";
+ Text[ japanese ] = "Õ°»Þ°Ž«‘$(ARG1)‚ª“Ç‚ÝŽæ‚ê‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªkŪ¥X­Ó¤Hµü¨å $(ARG1)¡C";
+ Text[ arabic ] = "áÇ íãßä ÞÑÇÁÉ ÇáÞÇãæÓ ÇáÔÎÕí $(ARG1).";
+ Text[ dutch ] = "Het persoonlijke woordenboek $(ARG1) kan niet worden gelezen.";
+ Text[ chinese_simplified ] = "ÎÞ·¨¶Á³ö˽È˴ʵä $(ARG1)¡£";
+ Text[ greek ] = "Äåí åßíáé äõíáôüí íá ãßíåé áíÜãíùóç ôïõ ðñïóùðéêïý ëåîéêïý $(ARG1).";
+ Text[ korean ] = "»ç¿ëÀÚ Á¤ÀÇ »çÀü$(ARG1)À» ÀÐÀ» ¼ö ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "Özel sözlük $(ARG1) okunamýyor.";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCODE_SVX_LINGU_DICT_NOTWRITEABLE&ERRCODE_RES_MASK
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Das persönliche Wörterbuch $(ARG1) kann nicht angelegt werden. : Das pers÷nliche W÷rterbuch $(ARG1) kann nicht angelegt werden. */
+ /* ### ACHTUNG: Neuer Text in Resource? Das persönliche Wörterbuch $(ARG1) kann nicht angelegt werden. : Das pers÷nliche W÷rterbuch $(ARG1) kann nicht angelegt werden. */
+ TEXT = "Das persönliche Wörterbuch $(ARG1) kann nicht angelegt werden." ;
+ TEXT [ English ] = "The personal dictionary $(ARG1) cannot be created." ;
+ Text [ english_us ] = "The custom dictionary $(ARG1) cannot be created." ;
+ Text [ italian ] = "Il dizionario personalizzato $(ARG1) non può essere letto" ;
+ Text [ spanish ] = "No se puede crear el diccionario personal $(ARG1)." ;
+ Text [ french ] = "Impossible d'installer le dictionnaire $(ARG1)." ;
+ Text [ dutch ] = "Het persoonlijke woordenboek $(ARG1) kan niet worden aangelegd." ;
+ Text [ swedish ] = "Den personliga ordboken $(ARG1) kan inte skapas." ;
+ Text [ danish ] = "Det er ikke muligt at oprette den personlige ordbog $(ARG1)." ;
+ Text [ portuguese ] = "Impossível criar o dicionário pessoal $(ARG1)." ;
+ Text [ portuguese_brazilian ] = "Das persönliche Wörterbuch $(ARG1) kann nicht angelegt werden." ;
+ Text[ chinese_simplified ] = "ÎÞ·¨½¨Á¢Ë½È˴ʵä $(ARG1)¡£";
+ Text[ russian ] = "Ñîçäàòü ñëîâàðü ïîëüçîâàòåëÿ $(ARG1) íå óäàåòñÿ.";
+ Text[ polish ] = "S³ownik u¿ytkownika $(ARG1) nie móg³ zostaæ odczytany.";
+ Text[ japanese ] = "Õ°»Þ°Ž«‘$(ARG1)‚ªì¬‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªk«Ø¥ß­Ó¤Hµü¨å $(ARG1)¡C";
+ Text[ arabic ] = "áÇ íãßä ÅäÔÇÁ ÇáÞÇãæÓ ÇáÔÎÕí $(ARG1).";
+ Text[ dutch ] = "Het persoonlijke woordenboek $(ARG1) kan niet worden aangelegd.";
+ Text[ chinese_simplified ] = "ÎÞ·¨½¨Á¢Ë½È˴ʵä $(ARG1)¡£";
+ Text[ greek ] = "Äåí åßíáé äõíáôüí íá äçìéïõñãçèåß ôï ðñïóùðéêü ëåîéêü $(ARG1).";
+ Text[ korean ] = "»ç¿ëÀÚ Á¤ÀÇ »çÀü$(ARG1)À» ¸¸µé ¼ö ¾ø½À´Ï´Ù.";
+ Text[ turkish ] = "Özel sözlük $(ARG1) oluþturulamýyor.";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCODE_SVX_GRAPHIC_NOTREADABLE&ERRCODE_RES_MASK
+ {
+ TEXT = "Die Grafik $(ARG1) konnte nicht gefunden werden." ;
+ TEXT [ English ] = "$(ARG1) could not be found." ;
+ Text [ english_us ] = "The graphic $(ARG1) could not be found." ;
+ Text [ italian ] = "L'immagine $(ARG1) non è stata trovata" ;
+ Text [ spanish ] = "No se pudo encontrar la imagen $(ARG1)." ;
+ Text [ french ] = "Impossible de trouver le fichier §(ARG1)." ;
+ Text [ dutch ] = "Afbeelding $(ARG1) niet gevonden." ;
+ Text [ swedish ] = "Grafiken $(ARG1) kunde inte hittas." ;
+ Text [ danish ] = "Det var ikke muligt at finde billedet $(ARG1)." ;
+ Text [ portuguese_brazilian ] = "Die Grafik $(ARG1) konnte nicht gefunden werden." ;
+ Text [ portuguese ] = "Foi impossível encontrar a imagem $(ARG1)." ;
+ Text[ chinese_simplified ] = "ÎÞ·¨ÕÒµ½Í¼ÐÎ $(ARG1)¡£";
+ Text[ russian ] = "Íàéòè ãðàôèêó $(ARG1) íå óäàåòñÿ.";
+ Text[ polish ] = "Grafiki $(ARG1) nie znaleziono.";
+ Text[ japanese ] = "¸Þ×̨¯¸‚Ì$(ARG1)‚ªŒ©‚‚©‚è‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "µLªk§ä¨ì¹Ï¤ù $(ARG1)¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÇáÚËæÑ Úáì ÇáÑÓã $(ARG1).";
+ Text[ dutch ] = "Afbeelding $(ARG1) niet gevonden.";
+ Text[ chinese_simplified ] = "ÎÞ·¨ÕÒµ½Í¼ÐÎ $(ARG1)¡£";
+ Text[ greek ] = "Äåí âñÝèçêå ôï ãñáöéêü $(ARG1).";
+ Text[ korean ] = "±×·¡ÇÈ$(ARG1)À» ãÁö ¸øÇß½À´Ï´Ù.";
+ Text[ turkish ] = "Grafik $(ARG1) bulunamadý.";
+ Text[ language_user1 ] = " ";
+ };
+ String ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT&ERRCODE_RES_MASK
+ {
+ TEXT = "Eine unverknüpfte Grafik konnte nicht geladen werden" ;
+ TEXT [ English ] = "An embedded graphic could not be read" ;
+ TEXT[ english_us ] = "An unlinked graphic could not be loaded";
+ TEXT[ portuguese ] = "Foi impossível carregar uma imagem não ligada.";
+ TEXT[ greek ] = "Äåí Þôáí äõíáôüí íá öïñôùèåß êÜðïéï ãñáöéêü ÷ùñßò óýíäåóç";
+ TEXT[ dutch ] = "Niet-gekoppelde afbeelding kon niet worden geladen";
+ TEXT[ french ] = "Une image (non liée) n'a pas pu être chargée.";
+ TEXT[ spanish ] = "No se pudo cargar una imagen no vinculada";
+ TEXT[ swedish ] = "En grafik utan länk kunde inte laddas";
+ TEXT[ russian ] = "Çàãðóçèòü íå ïðèâÿçàííóþ ãðàôèêó íå óäàåòñÿ";
+ TEXT[ italian ] = "Non è stato possibile caricare un'immagine non collegata";
+ TEXT[ danish ] = "Det var ikke muligt at indlæse en ikke-kædet grafik";
+ TEXT[ polish ] = "Nie mo¿na by³o za³adowaæ po³¹czonej grafiki";
+ TEXT[ portuguese_brazilian ] = "An embedded graphic could not be read";
+ TEXT[ japanese ] = "Øݸ‚³‚ê‚Ä‚¢‚È‚¢}‚Í“Ç‚Ýž‚Ý‚Å‚«‚Ü‚¹‚ñ";
+ TEXT[ korean ] = "¿¬°áµÇÁö ¾ÊÀº ±×·¡ÇÈÀº ·ÎµåÇÏÁö ¸øÇß½À´Ï´Ù.";
+ TEXT[ chinese_simplified ] = "ÎÞ·¨×°ÔØÒ»¸öÉÐδÁ´½ÓµÄͼÐÎ";
+ TEXT[ chinese_traditional ] = "µLªk¸Ë¸ü¤@­Ó©|¥¼³sµ²ªº¹Ï§Î";
+ TEXT[ arabic ] = "ÊÚÐÑ ÊÍãíá ÅÍÏì ÇáÕæÑ ÇáÛíÑ ãÑÊÈØÉ";
+ TEXT[ turkish ] = "Baðlantý oluþturulmamýþ bir grafik yüklenemedi";
+ };
+ String ERRCODE_SVX_LINGU_NOLANGUAGE&ERRCODE_RES_MASK
+ {
+ TEXT = "Am ausgewählten Begriff ist keine Sprache eingestellt." ;
+ TEXT [ English ] = "There's no language at the selected object." ;
+ TEXT[ english_us ] = "A language has not been fixed for the selected term.";
+ TEXT[ portuguese ] = "Não foi especificada a língua para o termo seleccionado.";
+ TEXT[ greek ] = "Äåí Ý÷åé åðéëå÷èåß ãëþóóá ãéá ôïí óõãêåêñéìÝíï üñï.";
+ TEXT[ dutch ] = "Voor het geselecteerde item werd geen taal vastgelegd.";
+ TEXT[ french ] = "Aucune langue n'a été spécifiée pour le terme sélectionné.";
+ TEXT[ spanish ] = "No hay idioma determinado para la entrada seleccionada";
+ TEXT[ swedish ] = "Inget språk har ställts in för det utvalda begreppet.";
+ TEXT[ russian ] = "ßçûê äëÿ âûäåëåííîãî ïîíÿòèÿ íå óñòàíîâëåí.";
+ TEXT[ italian ] = "Non è stata impostata la lingua per il termine selezionato.";
+ TEXT[ danish ] = "Der er ikke indstillet et sprog ved det valgte udtryk.";
+ TEXT[ polish ] = "Nie ustawiono jêzyka przy wybranym haœle.";
+ TEXT[ portuguese_brazilian ] = "There's no language at the selected object.";
+ TEXT[ japanese ] = "‘I‘ð‚µ‚½‚à‚Ì‚ÉŠY“–‚·‚錾Œê‚ª‚ ‚è‚Ü‚¹‚ñB";
+ TEXT[ korean ] = "¼±ÅÃµÈ ¿ë¾î¿¡´Â ¾Æ¹« ¾ð¾îµµ ¼³Á¤µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù.";
+ TEXT[ chinese_simplified ] = "ûÓÐÉ趨ÓïÑÔ¡£";
+ TEXT[ chinese_traditional ] = "¨S¦³¿ï¾Ü¤@­Ó»y¨¥¡C";
+ TEXT[ arabic ] = "áÇ ÊæÌÏ áÛÉ Úáì ÇáßÇÆä ÇáãõÍÏÏ.";
+ TEXT[ turkish ] = "Seçilen sözcük için dil belirlenmedi.";
+ };
+ String (ERRCODE_SVX_FORMS_NOIOSERVICES | ERRCODE_CLASS_READ) & ERRCODE_RES_MASK
+ {
+ Text = "Die Formular-Schicht wurden nicht geladen, da notwendige IO-Services (stardiv.uno.io.*) nicht instantiiert werden konnten";
+ Text [ english ] = "The form layer wasn't loaded as neccessary io-services (stardiv.uno.io.*) could not be instantiated";
+ Text[ english_us ] = "The form layer wasn't loaded as the required IO-services (stardiv.uno.io.*) could not be instantiated";
+ Text[ portuguese ] = "Impossível carregar a camada do formulário: foi impossível instanciar os serviços IO (stardiv.uno.io.*) necessários";
+ Text[ greek ] = "Äåí öïñôþèçêå ç óôñþóç ôçò öüñìáò, åðåéäÞ äåí Þôáí äõíáôüí íá ãßíåé åíçìÝñùóç êÜðïéùí áðáéôïõìÝíùí õðçñåóéþí åéóüäïõ - åîüäïõ (stardiv.uno.io.*).";
+ Text[ dutch ] = "Formulier-level kon niet worden geladen daar noodzakelijke io--services (stardiv.uno.io.*) niet konden worden geïnstantieerd.";
+ Text[ french ] = "La couche de formulaire n'a pas été chargée : impossible d'instancier les services IO (stardiv.uno.io.*) requis.";
+ Text[ spanish ] = "No se cargó la capa de formulario porque no se pudieron instanciar servicios IO necesarios (stardiv.uno.io.*)";
+ Text[ swedish ] = "Formulärskiktet laddades inte eftersom nödvändig IO-service (stardiv.uno.io.*) inte kunde instantieras.";
+ Text[ language_user1 ] = " ";
+ Text[ russian ] = "Ñëîé ôîðìóëÿðà íå çàãðóæåí, ïîñêîëüêó íåîáõîäèìàÿ äëÿ ýòîãî ñëóæáà io (stardiv.uno.io.*) íå êîíêðåòèçèðîâàíà.";
+ Text[ italian ] = "Lo strato del formulario non è stato caricato poichè stato possibile creare i servizi IO (strdiv.uno.io.*) necessari.";
+ Text[ danish ] = "Formularlaget blev ikke indlæst, fordi det ikke var muligt at instantiere den krævede IO-service (stardiv.uno.io.*).";
+ Text[ polish ] = "Warstwa formularza nie zosta³a za³adowana, poniewa¿ nie mo¿na by³o utworzyæ wymaganych serwisów IO (stardiv.uno.io.*)";
+ Text[ portuguese_brazilian ] = "The form layer wasn't loaded as neccessary io-services (stardiv.uno.io.*) could not be instantiated";
+ Text[ japanese ] = "IO»°ËÞ½(stardiv.uno.io.*)‚ª²Ý½Ä°Ù‚Å‚«‚È‚©‚Á‚½‚½‚ßAÌ«°Ñ‘w‚Í“Ç‚Ýž‚Ü‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ korean ] = "ÇÊ¿äÇÑ IO¼­ºñ½º(stardiv.uno.io.*)¸¦ ¿¹½ÃÇÏÁö ¸øÇ߱⠶§¹®¿¡ Æû °èÃþÀÌ ·ÎµåµÇÁö ¾Ê¾Ò½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÒòΪÎÞ·¨°²×°ÐèÒªµÄ IO ·þÎñ(stardiv.uno.io.*)£¬ËùÒÔ²»ÄÜ×°ÔØ±íµ¥·Ö²ãÐÅÏ¢";
+ Text[ chinese_traditional ] = "¦]¬°¨S¦³¦w¸Ë¥²­nªº IO ªA°È(stardiv.uno.io.*)¦ÓµLªk¸Ë¸üªí³æ¼h¦¸¡C";
+ Text[ arabic ] = "áã íÊã ÊÍãíá ØÈÞÉ ÇáÇÓÊãÇÑÉ¡ ÅÐ ÊÚÐÑ ÅäÔÇÁ ÎÏãÇÊ IO ÇááÇÒãÉ (stardiv.uno.io.*)";
+ Text[ turkish ] = "Gerekli IO hizmetleri (stardiv.uno.io.*) baþlatýlamadýðý için, form düzeyi yüklenemedi.";
+ };
+ String (ERRCODE_SVX_FORMS_NOIOSERVICES | ERRCODE_CLASS_WRITE) & ERRCODE_RES_MASK
+ {
+ Text = "Die Formular-Schicht wurden nicht geschrieben, da notwendige IO-Services (stardiv.uno.io.*) nicht instantiiert werden konnten";
+ Text [ english ] = "The form layer wasn't written as neccessary io-services (stardiv.uno.io.*) could not be instantiated";
+ Text[ english_us ] = "The form layer wasn't written as the required IO services (stardiv.uno.io.*) could not be instantiated";
+ Text[ portuguese ] = "Impossível escrever a camada do formulário: foi impossível instanciar os serviços IO (stardiv.uno.io.*) necessários.";
+ Text[ greek ] = "Äåí öïñôþèçêå ç óôñþóç ôçò öüñìáò, åðåéäÞ äåí Þôáí äõíáôüí íá ãßíåé åíçìÝñùóç êÜðïéùí áðáéôïõìÝíùí õðçñåóéþí åéóüäïõ - åîüäïõ (stardiv.uno.io.*).";
+ Text[ dutch ] = "Formulier-level werd niet geschreven daar noodzakelijke io-services (stardiv.uno.io.*) niet konden worden geïnstantieerd.";
+ Text[ french ] = "La couche de formulaire n'a pas été écrite : impossible d'instancier les services IO (stardiv.uno.io.*) requis.";
+ Text[ spanish ] = "No se pudo escribir la capa de formulario porque no se pudieron instanciar servicios IO necesarios (stardiv.uno.io.*)";
+ Text[ swedish ] = "Formulärskiktet skrevs inte eftersom nödvändig IO-service (stardiv.uno.io.*) inte kunde instantieras";
+ Text[ russian ] = "Ñëîé ôîðìóëÿðà íå çàïèñàí, ïîñêîëüêó íåîáõîäèìàÿ äëÿ ýòîãî ñëóæáà io (stardiv.uno.io.*) íå êîíêðåòèçèðîâàíà.";
+ Text[ italian ] = "Lo strato del formulario non è stato scritto perché non non è stato possibile creare i servizi IO (stardiv.uno.io.*) necessari.";
+ Text[ danish ] = "Formularlaget blev ikke skrevet, fordi det ikke var muligt at instantiere den krævede IO-service (stardiv.uno.io.*).";
+ Text[ polish ] = "Warstwa formularza nie zosta³a zapisana, poniewa¿ nie mo¿na by³o utworzyæ wymaganych serwisów IO (stardiv.uno.io.*)";
+ Text[ portuguese_brazilian ] = "The form layer wasn't written as neccessary io-services (stardiv.uno.io.*) could not be instantiated";
+ Text[ japanese ] = "IO»°ËÞ½(stardiv.uno.io.*)‚ª²Ý½Ä°Ù‚Å‚«‚È‚©‚Á‚½‚½‚ßAÌ«°Ñ‘w‚Í‘‚«‚±‚ß‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ korean ] = "ÇÊ¿äÇÑ IO¼­ºñ½º(stardiv.uno.io.*)¸¦ ¿¹½ÃÇÏÁö ¸øÇ߱⠶§¹®¿¡ Æû °èÃþÀÌ ±â·ÏµÇÁö ¾Ê¾Ò½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÒòΪÎÞ·¨°²×°ÐèÒªµÄ IO ·þÎñ(stardiv.uno.io.*)£¬ËùÒÔ²»ÄÜдÈë±íµ¥·Ö²ãÐÅÏ¢";
+ Text[ chinese_traditional ] = "¦]¬°¨S¦³¦w¸Ë¥²­nªº IO ªA°È(stardiv.uno.io.*)¦ÓµLªk¼g¤Jªí³æ¼h¦¸¡C";
+ Text[ arabic ] = "áã íÊã ßÊÇÈÉ ØÈÞÉ ÇáÇÓÊãÇÑÉ¡ ÅÐ ÊÚÐÑ ÅäÔÇÁ ÎÏãÇÊ IO ÇááÇÒãÉ (stardiv.uno.io.*)";
+ Text[ turkish ] = "Gerekli IO hizmetleri (stardiv.uno.io.*) baþlatýlamadýðý için, form düzeyi yazýlamadý.";
+ };
+ String (ERRCODE_SVX_FORMS_READWRITEFAILED | ERRCODE_CLASS_READ) & ERRCODE_RES_MASK
+ {
+ Text = "Beim Lesen der Formular-Controls trat ein Fehler auf. Die Formular-Schicht wurde nicht geladen";
+ Text [ english ] = "While reading the form controls an error occured. The form layer has not been loaded";
+ Text[ english_us ] = "An error occurred while reading the form controls. The form layer has not been loaded";
+ Text[ portuguese ] = "Ocorreu um erro na leitura dos controlos do formulário. Foi impossível carregar a camada do formulário.";
+ Text[ greek ] = "ÊáôÜ ôçí áíÜãíùóç ôùí óôïé÷åßùí åëÝã÷ïõ ôçò öüñìáò ðáñïõóéÜóôçêå Ýíá óöÜëìá. Ç óôñþóç ôçò öüñìáò äåí öïñôþèçêå.";
+ Text[ dutch ] = "Fout bij lezen van formulier-controls. Formulier-level werd niet geladen.";
+ Text[ french ] = "Une erreur est survenue lors de la lecture des contrôles de formulaire. La couche de formulaire n'a pas été chargée.";
+ Text[ spanish ] = "Ha ocurrido un error al leer los controles de formulario. No se cargó la capa de formulario.";
+ Text[ swedish ] = "Det uppstod ett fel vid läsning av formulär-controls. Formulärskiktet laddades inte";
+ Text[ russian ] = "Ïðè ÷òåíèè ýëåìåíòîâ óïðàâëåíèÿ ôîðìóëÿðà ïðîèçîøëà îøèáêà. Ñëîé ôîðìóëÿðà íå çàãðóæåí.";
+ Text[ italian ] = "Si è verificato un errore nella lettura del formulario Controls. Lo strato del formulario non è stato caricato";
+ Text[ danish ] = "Der opstod en fejl under læsning af formular-kontrolelementerne. Formularlaget blev ikke indlæst.";
+ Text[ polish ] = "Podczas odczytu kontroli formularza wyst¹pi³ b³¹d. Warstwa formularza nie zosta³a za³adowana";
+ Text[ portuguese_brazilian ] = "While reading the form controls an error occured. The form layer has not been loaded";
+ Text[ japanese ] = "Ì«°Ñ‘w‚Ì“Ç‚ÝŽæ‚è’†‚ɃGƒ‰[”­¶B‚±‚ÌÌ«°Ñ‘w‚Í“Ç‚Ýž‚Ü‚ê‚Ä‚¢‚Ü‚¹‚ñB";
+ Text[ korean ] = "¾ç½Ä ÄÁÆ®·ÑÀ» ÀÐÀ» ¶§ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù. ¾ç½Ä °èÃþÀÌ ·ÎµåµÇÁö ¾Ê¾Ò½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÔÚ¶ÁÈ¡±íµ¥¿ØÖÆÇøʱ·¢ÉúÒ»¸ö´íÎó¡£ÎÞ·¨×°ÔØ±íµ¥·Ö²ãÐÅÏ¢¡£";
+ Text[ chinese_traditional ] = "¦bŪ¨úªí³æ±±¨î¶µ®Éµo¥Í¿ù»~¡CµLªk¸Ë¸üªí³æ¼h¦¸¡C";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÞÑÇÁÉ ÚäÇÕÑ ÊÍßã ÇáÇÓÊãÇÑÉ. áã íÊã ÊÍãíá ØÈÞÉ ÇáÇÓÊãÇÑÉ";
+ Text[ turkish ] = "Form komut öðeleri okunurken bir hata oluþtu. Form düzeyi yüklenemedi.";
+ };
+ String (ERRCODE_SVX_FORMS_READWRITEFAILED | ERRCODE_CLASS_WRITE) & ERRCODE_RES_MASK
+ {
+ Text = "Beim Schreiben der Formular-Controls trat ein Fehler auf. Die Formular-Schicht wurde nicht gespeichert";
+ Text [ english ] = "While writing the form controls an error occured. The form layer has not been saved";
+ Text[ english_us ] = "An error occurred while writing the form controls. The form layer has not been saved";
+ Text[ portuguese ] = "Ocorreu um erro ao escrever os controlos do formulário. Foi impossível guardar a camada do formulário.";
+ Text[ greek ] = "ÊáôÜ ôçí åããñáöÞ ôùí óôïé÷åßùí åëÝã÷ïõ ôçò öüñìáò ðáñïõóéÜóôçêå Ýíá óöÜëìá. Ç óôñþóç ôçò öüñìáò äåí öïñôþèçêå.";
+ Text[ dutch ] = "Fout bij schrijven van formulier-controls. Formulier-level werd niet opgeslagen.";
+ Text[ french ] = "Une erreur est survenue lors de l'écriture des contrôles de formulaire. La couche de formulaire n'a pas été enregistrée.";
+ Text[ spanish ] = "Ha ocurrido un error al escribir los controles de formulario. No se guardó la capa de formulario.";
+ Text[ swedish ] = "Det uppstod ett fel vid skrivning av formulär-controls. Formulärskiktet sparades inte";
+ Text[ russian ] = "Ïðè íàïèñàíèè ýëåìåíòîâ óïðàâëåíèÿ ôîðìóëÿðà ïðîèçîøëà îøèáêà. Ñëîé ôîðìóëÿðà íå ñîõðàíåí.";
+ Text[ italian ] = "Si è verificato un errore durante la compilazione del formulario controls. Lo strato del formulario non è stato salvato.";
+ Text[ danish ] = "Der opstod en fejl under skrivning af formular-kontrolelementerne. Formularlaget blev ikke gemt.";
+ Text[ polish ] = "Podczas zapisu kontroli formularza wyst¹pi³ b³¹d. Warstwa formularza nie zosta³a zapisana";
+ Text[ portuguese_brazilian ] = "While writing the form controls an error occured. The form layer has not been saved";
+ Text[ japanese ] = "Ì«°Ñ‘w‚Ì‘‚«ž‚Ý’†‚ɃGƒ‰[”­¶BÌ«°Ñ‘w‚Í•Û‘¶‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB";
+ Text[ korean ] = "¾ç½Ä ÄÁÆ®·ÑÀ» ±â·ÏÇÒ ¶§ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù. ¾ç½Ä °èÃþÀÌ ÀúÀåµÇÁö ¾Ê¾Ò½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÔÚдÈë±íµ¥¿ØÖÆÇøʱ·¢ÉúÒ»¸ö´íÎó¡£ÎÞ·¨´æÅÌ±íµ¥·Ö²ãÐÅÏ¢¡£";
+ Text[ chinese_traditional ] = "¦b¼g¤Jªí³æ±±¨î¶µ®Éµo¥Í¤@­Ó¿ù»~¡C¨S¦³Àx¦sªí³æ¼h¦¸¡C";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ßÊÇÈÉ ÚäÇÕÑ ÊÍßã ÇáÇÓÊãÇÑÉ. áã íÊã ÍÝÙ ØÈÞÉ ÇáÇÓÊãÇÑÉ";
+ Text[ turkish ] = "Form komut öðeleri yazýlýrken bir hata oluþtu. Form düzeyi kaydedilemedi.";
+ };
+ String (ERRCODE_SVX_BULLETITEM_NOBULLET | ERRCODE_CLASS_READ) & ERRCODE_RES_MASK
+ {
+ Text = "Beim Lesen eines Bullets trat ein Fehler auf. Es konnten nicht alle Bullets geladen werden";
+ Text [ english ] = "There occurred an error during reading a bullet. Not all Bullets coud be read correctly";
+ Text[ english_us ] = "An error occurred while reading one of the bullets. Not all of the bullets were loaded.";
+ Text[ portuguese ] = "Surgiu um erro durante a leitura de uma marca. Foi impossível carregá-las todas.";
+ Text[ russian ] = "Âî âðåìÿ ÷òåíèÿ îäíîãî ìàðêåðà ïðîèçîøëà îøèáêà. Ïîýòîìó çàãðóçèòü âñå ìàðêåðû íå óäàñòñÿ.";
+ Text[ greek ] = "ÊáôÜ ôçí áíÜãíùóç ìéáò êïõêßäáò ðáñïõóéÜóôçêå Ýíá óöÜëìá. Äåí Þôáí äõíáôüí íá ãßíåé öüñôùóç üëùí ôùí êïõêßäùí";
+ Text[ dutch ] = "Fout bij laden van opsommingsteken. Niet alle konden worden geladen.";
+ Text[ french ] = "Une erreur s'est produite pendant la lecture d'une puce. Certaines puces n'ont pas pu être chargées.";
+ Text[ spanish ] = "Ha ocurrido un error al leer una viñeta. No se pudieron cargar todas las viñetas.";
+ Text[ italian ] = "Durante la lettura di un bullet si è verificato un errore. Non è stato possibile caricare tutti i bullet.";
+ Text[ danish ] = "Der opstod en fejl ved læsning af et punkttegn. Det var ikke muligt at indlæse alle punkttegn.";
+ Text[ swedish ] = "Det uppstod ett fel vid läsning av en bullet. Alla bullets kunde inte laddas";
+ Text[ polish ] = "Wyst¹pi³ b³¹d przy odczycie wypunktowania. Nie mo¿na by³o za³adowaæ wszystkich wypunktowañ.";
+ Text[ portuguese_brazilian ] = "There occurred an error during reading a bullet. Not all Bullets coud be read correctly";
+ Text[ japanese ] = "‰Óð‘‚«‚ð“Ç‚Ýž‚ÞÛ‚É´×°‚ª”­¶‚µ‚Ü‚µ‚½B‚·‚ׂẲÓð‘‚«‚ð“Ç‚Ýž‚ß‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ korean ] = "±Û¸Ó¸®Ç¥¸¦ ÀÐÀ» ¶§ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù. ±Û¸Ó¸®Ç¥¸¦ ¸ðµÎ ·ÎµåÇÏÁö´Â ¸øÇß½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÔÚ¶ÁÈ¡Ò»¸öͼ±ê·ûºÅʱ·¢Éú´íÎó¡£ÎÞ·¨×°ÔØÈ«²¿Í¼±ê·ûºÅ¡£";
+ Text[ chinese_traditional ] = "¦bŪ¨ú¤@­Ó¶µ¥Ø²Å¸¹®Éµo¥Í¿ù»~¡CµLªk¸Ë¸ü©Ò¦³ªº¶µ¥Ø²Å¸¹¡C";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ÞÑÇÁÉ ÅÍÏì ÚáÇãÇÊ ÇáÊÚÏÇÏ. ÊÚÐÑ ÊÍãíá ßá ÚáÇãÇÊ ÇáÊÚÏÇÏ.";
+ Text[ turkish ] = "Madde iþaretleri okunurken hata oluþtu. Bu nedenle tüm madde iþaretleri yüklenemedi.";
+ };
+
+ String ERRCODE_SVX_MODIFIED_VBASIC_STORAGE & ERRCODE_RES_MASK
+ {
+// TEXT = "Der Basic-Code wurde verändert und kann somit nicht mehr als Original gespeichert werden." ;
+// TEXT [ English ] = "The Basic-Code is modified and so it can not be saved as original." ;
+ TEXT = "Alle Veränderungen am Dokument Basic Code gehen verloren. Stattdessen wird der originale VBA Makrocode gespeichert." ;
+ TEXT [ English ] = "All changes made on the document Basic code will be lost. The original VBA macro code will be saved instead." ;
+ TEXT[ english_us ] = "All changes to the Basic Code are lost.The original VBA Macro Code is saved instead.";
+ TEXT[ portuguese ] = "As modificações efectuadas no documento Basic Code perder-se-ão. No seu lugar será guardado o código macro VBA.";
+ TEXT[ russian ] = "Âñå èçìåíåíèÿ äîêóìåíòà Basic Code áóäóò óòåðÿíû. Âìåñòî ýòîãî áóäåò ñîõðàíåí èñõîäíûé VBA ìàêðîêîä.";
+ TEXT[ greek ] = "¼ëåò ïé áëëáãÝò ôïõ åããñÜöïõ Basic Code èá ÷áèïýí. Áíôß áõôïý èá áðïèçêåõôåß ôï áõèåíôéêü VBA Makrocode.";
+ TEXT[ dutch ] = "De Basic-code werd veranderd en kan daardoor niet meer als origineel worden opgeslagen.";
+ TEXT[ french ] = "Comme les modifications apportées au code Basic du document vont être perdues, c'est le code de macro VBA d'origine qui va être enregistré à la place.";
+ TEXT[ spanish ] = "Se perderán todas las modificaciones del Basic Code del documento. En su lugar se guardará el código macro VBA original.";
+ TEXT[ italian ] = "Tutte le modifiche apportate al documento Basic Code andranno perdute. Pertanto verrà salvato l'originale VBA.";
+ TEXT[ danish ] = "Alle ændringer i dokumentet Basic Code går tabt. I stedet gemmes gemmes den originale VBA Macro Code.";
+ TEXT[ swedish ] = "Alla ändringar av dokument-Basic Code går förlorade. I stället sparas original-VBA-makrokoden.";
+ TEXT[ polish ] = "Wszelkie modyfikacje dotycz¹ce Basic Code dokumentu bêd¹ anulowane. Zapisany zostanie za to oryginalny kod makro VBA.";
+ TEXT[ portuguese_brazilian ] = "The Basic-Code is modified and so it can not be saved as original.";
+ TEXT[ japanese ] = "Basic Code ÄÞ·­ÒÝÄ‚Ì‚·‚ׂĂ̕ÏX‚ÍŽ¸‚í‚ê‚Ü‚µ‚½BµØ¼ÞÅÙ‚Ì VBA Makrocode‚ª‚»‚Ì‘ã‚è‚É•Û‘¶‚³‚ê‚Ü‚·B";
+ TEXT[ korean ] = "Basic-Code°¡ º¯°æµÇ¾î ÀÌÁ¦´Â ¿øº»À¸·Î ÀúÀåÇÒ ¼ö ¾ø½À´Ï´Ù.";
+ TEXT[ chinese_simplified ] = "¶ªÊ§Á˶ÔBasic CodeÎĵµ½øÐеĸü¸Ä¡£´æÅ̵ÄÖ»ÊÇÔ´VBAºêÂë¡£";
+ TEXT[ chinese_traditional ] = "¤å¥óªº Basic ½X©Ò¦³Åܧó¤w¸g¬y¥¢¡C¤w¸gÀx¦s·½ VBA ¥¨¶°¡C";
+ TEXT[ turkish ] = "Basic Code belgesindeki tüm deðiþiklikler kaybolacak. Bunun yerine orjinal VBA Macrocode kaydedilecek.";
+ TEXT[ arabic ] = "ÓæÝ ÊÖíÚ ßÇÝÉ ÇáÊÚÏíáÇÊ ÇáÊí Êã ÅÏÎÇáåÇ Úáì Basic Code ÇáãÓÊäÏ¡ æÓæÝ íÊã ÍÝÙ VBA Macro Code ÈÏáÇð ãäåÇ.";
+ };
+
+ String ERRCODE_SVX_VBASIC_STORAGE_EXIST & ERRCODE_RES_MASK
+ {
+ TEXT = "Der im Dokument enthaltene originale VBA Basic Code wird nicht gespeichert." ;
+ TEXT [ English ] = "The original VBA basic code contained in the document will no be saved." ;
+ TEXT[ english_us ] = "The original VBA Basic Code contained in the document will not be saved.";
+ TEXT[ portuguese ] = "O código VBA original contido no documento não será guardado.";
+ TEXT[ russian ] = "Ñîäåðæàùèéñÿ â äîêóìåíòå èñõîäíûé VBA Basic Code ñîõðàíåí íå áóäåò.";
+ TEXT[ greek ] = "Äåí èá ãßíåé áðïèÞêåõóç ôïõ áõèåíôéêïý VBA basic code ðïõ ðåñéÝ÷åôáé óôï Ýããñáöï.";
+ TEXT[ dutch ] = "The original VBA basic code contained in the document will no be saved.";
+ TEXT[ french ] = "Le code VBA basic d'origine contenu dans le document ne sera pas enregistré.";
+ TEXT[ spanish ] = "No se guardará el Basic Code VBA incluido en el documento.";
+ TEXT[ italian ] = "Non è possibile salvare il codice VBA Basic contenuto nel documeto.";
+ TEXT[ danish ] = "Den originale VBA Basic Code, som er indeholdt i dokumentet, gemmes ikke.";
+ TEXT[ swedish ] = "Original-VBA-basickoden som finns i dokumentet sparas inte.";
+ TEXT[ polish ] = "Zawarty w dokumencie oryginalny VBA Basic Code nie zostanie zapisany.";
+ TEXT[ portuguese_brazilian ] = "The original VBA basic code contained in the document will no be saved.";
+ TEXT[ japanese ] = "ÄÞ·­ÒÝÄ‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚éµØ¼ÞÅÙ‚Ì VBA Basic Code ‚Í•Û‘¶‚³‚ê‚Ü‚¹‚ñB";
+ TEXT[ korean ] = "The original VBA basic code contained in the document will no be saved.";
+ TEXT[ chinese_simplified ] = "²»»á´æÅÌÎĵµÖк¬ÓеÄÔ´VBA Basic Code¡£";
+ TEXT[ chinese_traditional ] = "¤å¥ó§t¦³ªº·½ VBA basic ½X¤£·|³QÀx¦s¡C";
+ TEXT[ turkish ] = "Belgede bulunan ilk VBA basic kodu kaydedilmeyecek.";
+ TEXT[ arabic ] = "áä íÊã ÍÝÙ ÇáÜ VBA Basic CodeÇáÃÕáí ÇáãæÌæÏ Ýí ÇáãÓÊäÏ.";
+ };
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/items/svxfont.cxx b/svx/source/items/svxfont.cxx
new file mode 100644
index 0000000000..0b8c825733
--- /dev/null
+++ b/svx/source/items/svxfont.cxx
@@ -0,0 +1,793 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxfont.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _INTN_HXX //autogen
+#include <tools/intn.hxx>
+#endif
+#ifndef _OUTDEV_HXX //autogen
+#include <vcl/outdev.hxx>
+#endif
+#ifndef _PRINT_HXX //autogen
+#include <vcl/print.hxx>
+#endif
+#ifndef _SV_POLY_HXX //autogen
+#include <vcl/poly.hxx>
+#endif
+#pragma hdrstop
+
+#define ITEMID_ESCAPEMENT 0
+
+#define _SVX_SVXFONT_CXX
+
+#include "svxfont.hxx"
+#include "escpitem.hxx"
+
+// Minimum: Prozentwert fuers kernen
+#define MINKERNPERCENT 5
+
+// prop. Groesse der Kleinbuchstaben bei Kapitaelchen
+#define KAPITAELCHENPROP 66
+
+#ifndef REDUCEDSVXFONT
+ const sal_Unicode CH_BLANK = sal_Unicode(' '); // ' ' Leerzeichen
+ const XubString aDoubleSpace = (sal_Unicode*)" ";
+#endif
+
+/*************************************************************************
+ * class SvxFont
+ *************************************************************************/
+
+SvxFont::SvxFont()
+{
+ nKern = nEsc = 0;
+ nPropr = 100;
+ eCaseMap = SVX_CASEMAP_NOT_MAPPED;
+ eLang = LANGUAGE_SYSTEM;
+}
+
+SvxFont::SvxFont( const Font &rFont )
+ : Font( rFont )
+{
+ nKern = nEsc = 0;
+ nPropr = 100;
+ eCaseMap = SVX_CASEMAP_NOT_MAPPED;
+ eLang = LANGUAGE_SYSTEM;
+}
+
+/*************************************************************************
+ * class SvxFont: Copy-Ctor
+ *************************************************************************/
+
+SvxFont::SvxFont( const SvxFont &rFont )
+ : Font( rFont )
+{
+ nKern = rFont.GetFixKerning();
+ nEsc = rFont.GetEscapement();
+ nPropr = rFont.GetPropr();
+ eCaseMap = rFont.GetCaseMap();
+ eLang = rFont.GetLanguage();
+}
+
+/*************************************************************************
+ * static SvxFont::DrawArrow
+ *************************************************************************/
+
+void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect,
+ const Size& rSize, const Color& rCol, BOOL bLeft )
+{
+ long nLeft = ( rRect.Left() + rRect.Right() - rSize.Width() )/ 2;
+ long nRight = nLeft + rSize.Width();
+ long nMid = ( rRect.Top() + rRect.Bottom() ) / 2;
+ long nTop = nMid - rSize.Height() / 2;
+ long nBottom = nTop + rSize.Height();
+ if( nLeft < rRect.Left() )
+ {
+ nLeft = rRect.Left();
+ nRight = rRect.Right();
+ }
+ if( nTop < rRect.Top() )
+ {
+ nTop = rRect.Top();
+ nBottom = rRect.Bottom();
+ }
+ Polygon aPoly;
+ Point aTmp( bLeft ? nLeft : nRight, nMid );
+ Point aNxt( bLeft ? nRight : nLeft, nTop );
+ aPoly.Insert( 0, aTmp );
+ aPoly.Insert( 0, aNxt );
+ aNxt.Y() = nBottom;
+ aPoly.Insert( 0, aNxt );
+ aPoly.Insert( 0, aTmp );
+ Color aOldLineColor = rOut.GetLineColor();
+ Color aOldFillColor = rOut.GetFillColor();
+ rOut.SetFillColor( rCol );
+ rOut.SetLineColor( Color( COL_BLACK ) );
+ rOut.DrawPolygon( aPoly );
+ rOut.DrawLine( aTmp, aNxt );
+ rOut.SetLineColor( aOldLineColor );
+ rOut.SetFillColor( aOldFillColor );
+}
+
+/*************************************************************************
+ * SvxFont::CalcCaseMap
+ *************************************************************************/
+
+XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const
+{
+ if( !IsCaseMap() || !rTxt.Len() ) return rTxt;
+ XubString aTxt( rTxt );
+ // Ich muss mir noch die Sprache besorgen
+ const LanguageType eLng = LANGUAGE_DONTKNOW == eLang
+ ? LANGUAGE_SYSTEM : eLang;
+ International aInter( eLng );
+
+ switch( eCaseMap )
+ {
+ case SVX_CASEMAP_KAPITAELCHEN:
+ case SVX_CASEMAP_VERSALIEN:
+ {
+ aInter.ToUpper( aTxt );
+ break;
+ }
+
+ case SVX_CASEMAP_GEMEINE:
+ {
+ aInter.ToLower( aTxt );
+ break;
+ }
+ case SVX_CASEMAP_TITEL:
+ {
+ // Jeder Wortbeginn wird gross geschrieben,
+ // der Rest des Wortes wird unbesehen uebernommen.
+ // Bug: wenn das Attribut mitten im Wort beginnt.
+ BOOL bBlank = TRUE;
+
+ for( UINT32 i = 0; i < aTxt.Len(); ++i )
+ {
+ if( sal_Unicode(' ') == aTxt.GetChar(i) || sal_Unicode('\t') == aTxt.GetChar(i) )
+ bBlank = TRUE;
+ else
+ {
+ if( bBlank )
+ {
+ XubString aTemp;
+
+ aTemp += aTxt.GetChar( i );
+ aInter.ToUpper( aTemp );
+ aTxt.Replace( i, 1, aTemp );
+ }
+ bBlank = FALSE;
+ }
+ }
+ break;
+ }
+ default:
+ {
+ DBG_ASSERT(!this, "SvxFont::CaseMapTxt: unknown casemap");
+ break;
+ }
+ }
+ return aTxt;
+}
+
+/*************************************************************************
+ * Hier beginnen die Methoden, die im Writer nicht benutzt werden koennen,
+ * deshalb kann man diesen Bereich durch setzen von REDUCEDSVXFONT ausklammern.
+ *************************************************************************/
+#ifndef REDUCEDSVXFONT
+
+/*************************************************************************
+ * class SvxDoCapitals
+ * die virtuelle Methode Do wird von SvxFont::DoOnCapitals abwechselnd mit
+ * den "Gross-" und "Kleinbuchstaben"-Teilen aufgerufen.
+ * Die Ableitungen von SvxDoCapitals erfuellen diese Methode mit Leben.
+ *************************************************************************/
+
+class SvxDoCapitals
+{
+protected:
+ OutputDevice *pOut;
+ const XubString &rTxt;
+ const xub_StrLen nIdx;
+ const xub_StrLen nLen;
+
+public:
+ SvxDoCapitals( OutputDevice *pOut, const XubString &rTxt,
+ const xub_StrLen nIdx, const xub_StrLen nLen )
+ : pOut(pOut), rTxt(rTxt), nIdx(nIdx), nLen(nLen)
+ { }
+
+ virtual void DoSpace( const BOOL bDraw );
+ virtual void SetSpace();
+ virtual void Do( const XubString &rTxt,
+ const xub_StrLen nIdx, const xub_StrLen nLen,
+ const BOOL bUpper ) = 0;
+
+ inline OutputDevice *GetOut() { return pOut; }
+ inline const XubString &GetTxt() const { return rTxt; }
+ inline const xub_StrLen GetIdx() const { return nIdx; }
+ inline const xub_StrLen GetLen() const { return nLen; }
+};
+
+void SvxDoCapitals::DoSpace( const BOOL bDraw ) { }
+
+void SvxDoCapitals::SetSpace() { }
+
+void SvxDoCapitals::Do( const XubString &rTxt, const xub_StrLen nIdx,
+ const xub_StrLen nLen, const BOOL bUpper ) { }
+
+/*************************************************************************
+ * SvxFont::DoOnCapitals() const
+ * zerlegt den String in Gross- und Kleinbuchstaben und ruft jeweils die
+ * Methode SvxDoCapitals::Do( ) auf.
+ *************************************************************************/
+// 4251: Es gibt Zeichen, die Upper _und_ Lower sind (z.B. das Blank).
+// Solche Zweideutigkeiten fuehren ins Chaos, deswegen werden diese
+// Zeichen der Menge Lower zugeordnet !
+
+inline BOOL IsUpperCap( const International &rInter, const xub_Unicode &rChar )
+{
+ return rInter.IsUpper( rChar ) && !rInter.IsLower( rChar );
+}
+
+void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
+{
+ OutputDevice *pOut = rDo.GetOut();
+ const XubString &rTxt = rDo.GetTxt();
+ const xub_StrLen nIdx = rDo.GetIdx();
+ const xub_StrLen nLen = STRING_LEN == nPartLen ? rDo.GetLen() : nPartLen;
+
+ const XubString aTxt( CalcCaseMap( rTxt ) );
+ const USHORT nTxtLen = Min( rTxt.Len(), nLen );
+ USHORT nPos = 0;
+ USHORT nOldPos = nPos;
+
+ const LanguageType eLng = LANGUAGE_DONTKNOW == eLang
+ ? LANGUAGE_SYSTEM : eLang;
+ const International aInter( eLng );
+ xub_Unicode aChar;
+
+ while( nPos < nTxtLen )
+ {
+ // Erst kommen die Upper-Chars dran
+ aChar = rTxt.GetChar( nPos + nIdx );
+ while( nPos < nTxtLen && IsUpperCap( aInter, aChar ) )
+ aChar = rTxt.GetChar( ++nPos + nIdx );
+ if( nOldPos != nPos )
+ {
+ rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, TRUE );
+ nOldPos = nPos;
+ }
+ // Nun werden die Lower-Chars verarbeitet (ohne Blanks)
+ while( nPos < nTxtLen && aInter.IsLower( aChar ) &&
+ CH_BLANK != aChar )
+ aChar = rTxt.GetChar( ++nPos + nIdx );
+
+ if( nOldPos != nPos )
+ {
+ rDo.Do( aTxt, nIdx + nOldPos, nPos-nOldPos, FALSE );
+ nOldPos = nPos;
+ }
+ // Nun werden die Blanks verarbeitet
+ while( nPos < nTxtLen && CH_BLANK == aChar )
+ aChar = rTxt.GetChar( ++nPos + nIdx );
+
+ if( nOldPos != nPos )
+ {
+ rDo.DoSpace( FALSE );
+ rDo.Do( aTxt, nIdx + nOldPos, nPos - nOldPos, FALSE );
+ nOldPos = nPos;
+ rDo.SetSpace();
+ }
+ }
+ rDo.DoSpace( TRUE );
+}
+
+/**************************************************************************
+ * SvxFont::SetPhysFont()
+ *************************************************************************/
+
+void SvxFont::SetPhysFont( OutputDevice *pOut ) const
+{
+ const Font& rCurrentFont = pOut->GetFont();
+ if ( nPropr == 100 )
+ {
+ if ( !rCurrentFont.IsSameInstance( *this ) )
+ pOut->SetFont( *this );
+ }
+ else
+ {
+ Font aNewFont( *this );
+ Size aSize( aNewFont.GetSize() );
+ aNewFont.SetSize( Size( aSize.Width() * nPropr / 100L,
+ aSize.Height() * nPropr / 100L ) );
+ if ( !rCurrentFont.IsSameInstance( aNewFont ) )
+ pOut->SetFont( aNewFont );
+ }
+}
+
+/*************************************************************************
+ * SvxFont::ChgPhysFont()
+ *************************************************************************/
+
+Font SvxFont::ChgPhysFont( OutputDevice *pOut ) const
+{
+ Font aOldFont( pOut->GetFont() );
+ SetPhysFont( pOut );
+ return aOldFont;
+}
+
+/*************************************************************************
+ * SvxFont::GetPhysTxtSize()
+ *************************************************************************/
+
+Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const XubString &rTxt,
+ const xub_StrLen nIdx, const xub_StrLen nLen ) const
+{
+ if ( !IsCaseMap() && !IsKern() )
+ return Size( pOut->GetTextWidth( rTxt, nIdx, nLen ),
+ pOut->GetTextHeight() );
+
+ Size aTxtSize;
+ aTxtSize.setHeight( pOut->GetTextHeight() );
+ if ( !IsCaseMap() )
+ aTxtSize.setWidth( pOut->GetTextWidth( rTxt, nIdx, nLen ) );
+ else
+ aTxtSize.setWidth(pOut->GetTextWidth( CalcCaseMap(rTxt), nIdx, nLen ));
+
+ if( IsKern() && ( nLen > 1 ) )
+ aTxtSize.Width() += ( ( nLen-1 ) * long( nKern ) );
+
+ return aTxtSize;
+}
+
+Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const XubString &rTxt )
+{
+ if ( !IsCaseMap() && !IsKern() )
+ return Size( pOut->GetTextWidth( rTxt ), pOut->GetTextHeight() );
+
+ Size aTxtSize;
+ aTxtSize.setHeight( pOut->GetTextHeight() );
+ if ( !IsCaseMap() )
+ aTxtSize.setWidth( pOut->GetTextWidth( rTxt ) );
+ else
+ aTxtSize.setWidth( pOut->GetTextWidth( CalcCaseMap( rTxt ) ) );
+
+ if( IsKern() && ( rTxt.Len() > 1 ) )
+ aTxtSize.Width() += ( ( rTxt.Len()-1 ) * long( nKern ) );
+
+ return aTxtSize;
+}
+
+Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const XubString &rTxt,
+ const USHORT nIdx, const USHORT nLen, long* pDXArray ) const
+{
+ if ( !IsCaseMap() && !IsKern() )
+ return Size( pOut->GetTextArray( rTxt, pDXArray, nIdx, nLen ),
+ pOut->GetTextHeight() );
+
+ Size aTxtSize;
+ aTxtSize.setHeight( pOut->GetTextHeight() );
+ if ( !IsCaseMap() )
+ aTxtSize.setWidth( pOut->GetTextArray( rTxt, pDXArray, nIdx, nLen ) );
+ else
+ aTxtSize.setWidth( pOut->GetTextArray( CalcCaseMap( rTxt ),
+ pDXArray, nIdx, nLen ) );
+
+ if( IsKern() && ( nLen > 1 ) )
+ {
+ aTxtSize.Width() += ( ( nLen-1 ) * long( nKern ) );
+
+ if ( pDXArray )
+ {
+ for ( xub_StrLen i = 0; i < nLen; i++ )
+ pDXArray[i] += ( (i+1) * long( nKern ) );
+ // Der letzte ist um ein nKern zu gross:
+ pDXArray[nLen-1] -= nKern;
+ }
+ }
+ return aTxtSize;
+}
+
+/*************************************************************************
+ * SvxFont::GetTxtSize()
+ *************************************************************************/
+
+Size SvxFont::GetTxtSize( const OutputDevice *pOut, const XubString &rTxt,
+ const xub_StrLen nIdx, const xub_StrLen nLen )
+{
+ xub_StrLen nTmp = nLen;
+ if ( nTmp == STRING_LEN ) // schon initialisiert?
+ nTmp = rTxt.Len();
+ Font aOldFont( ChgPhysFont((OutputDevice *)pOut) );
+ Size aTxtSize;
+ if( IsCapital() && rTxt.Len() )
+ {
+ aTxtSize = GetCapitalSize( pOut, rTxt, nIdx, nTmp );
+ }
+ else aTxtSize = GetPhysTxtSize(pOut,rTxt,nIdx,nTmp);
+ ((OutputDevice *)pOut)->SetFont( aOldFont );
+ return aTxtSize;
+}
+
+/*************************************************************************
+ * SvxFont::DrawText()
+ *************************************************************************/
+
+void SvxFont::DrawText( OutputDevice *pOut,
+ const Point &rPos, const XubString &rTxt,
+ const xub_StrLen nIdx, const xub_StrLen nLen ) const
+{
+ if( !nLen || !rTxt.Len() ) return;
+ xub_StrLen nTmp = nLen;
+ if ( nTmp == STRING_LEN ) // schon initialisiert?
+ nTmp = rTxt.Len();
+ Point aPos( rPos );
+ if ( nEsc )
+ {
+ Size aSize = (this->GetSize());
+ aPos.Y() -= ((nEsc*long(aSize.Height()))/ 100L);
+ }
+ Font aOldFont( ChgPhysFont( pOut ) );
+
+ if ( IsCapital() )
+ DrawCapital( pOut, aPos, rTxt, nIdx, nTmp );
+ else
+ {
+ Size aSize = GetPhysTxtSize( pOut, rTxt, nIdx, nTmp );
+
+ if ( !IsCaseMap() )
+ pOut->DrawStretchText( aPos, aSize.Width(), rTxt, nIdx, nTmp );
+ else
+ pOut->DrawStretchText( aPos, aSize.Width(), CalcCaseMap( rTxt ),
+ nIdx, nTmp );
+ }
+ pOut->SetFont(aOldFont);
+}
+
+void SvxFont::QuickDrawText( OutputDevice *pOut,
+ const Point &rPos, const XubString &rTxt,
+ const xub_StrLen nIdx, const xub_StrLen nLen, const long* pDXArray ) const
+{
+ // Font muss ins OutputDevice selektiert sein...
+ if ( !IsCaseMap() && !IsCapital() && !IsKern() && !IsEsc() )
+ {
+ pOut->DrawTextArray( rPos, rTxt, pDXArray, nIdx, nLen );
+ return;
+ }
+
+ Point aPos( rPos );
+ if ( nEsc )
+ aPos.Y() -= nEsc * GetSize().Height() / 100L ;
+
+ if( IsCapital() )
+ {
+ DBG_ASSERT( !pDXArray, "DrawCapital nicht fuer TextArray!" );
+ DrawCapital( pOut, aPos, rTxt, nIdx, nLen );
+ }
+ else
+ {
+ if ( IsKern() && !pDXArray )
+ {
+ Size aSize = GetPhysTxtSize( pOut, rTxt, nIdx, nLen );
+
+ if ( !IsCaseMap() )
+ pOut->DrawStretchText( aPos, aSize.Width(), rTxt, nIdx, nLen );
+ else
+ pOut->DrawStretchText( aPos, aSize.Width(), CalcCaseMap( rTxt ), nIdx, nLen );
+ }
+ else
+ {
+ if ( !IsCaseMap() )
+ pOut->DrawTextArray( aPos, rTxt, pDXArray, nIdx, nLen );
+ else
+ pOut->DrawTextArray( aPos, CalcCaseMap( rTxt ), pDXArray, nIdx, nLen );
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter,
+ const Point &rPos, const XubString &rTxt,
+ const xub_StrLen nIdx, const xub_StrLen nLen ) const
+{
+ if ( !nLen || !rTxt.Len() )
+ return;
+ xub_StrLen nTmp = nLen;
+
+ if ( nTmp == STRING_LEN ) // schon initialisiert?
+ nTmp = rTxt.Len();
+ Point aPos( rPos );
+
+ if ( nEsc )
+ {
+ short nTmpEsc;
+ if( DFLT_ESC_AUTO_SUPER == nEsc )
+ nTmpEsc = 33;
+ else if( DFLT_ESC_AUTO_SUB == nEsc )
+ nTmpEsc = -20;
+ else
+ nTmpEsc = nEsc;
+ Size aSize = ( this->GetSize() );
+ aPos.Y() -= ( ( nTmpEsc * long( aSize.Height() ) ) / 100L );
+ }
+ Font aOldFont( ChgPhysFont( pOut ) );
+ Font aOldPrnFont( ChgPhysFont( pPrinter ) );
+
+ if ( IsCapital() )
+ DrawCapital( pOut, aPos, rTxt, nIdx, nTmp );
+ else
+ {
+ Size aSize = GetPhysTxtSize( pPrinter, rTxt, nIdx, nTmp );
+
+ if ( !IsCaseMap() )
+ pOut->DrawStretchText( aPos, aSize.Width(), rTxt, nIdx, nTmp );
+ else
+ pOut->DrawStretchText( aPos, aSize.Width(), CalcCaseMap( rTxt ),
+ nIdx, nTmp );
+ }
+ pOut->SetFont(aOldFont);
+ pPrinter->SetFont( aOldPrnFont );
+}
+
+// -----------------------------------------------------------------------
+
+SvxFont& SvxFont::operator=( const Font& rFont )
+{
+ Font::operator=( rFont );
+ return *this;
+}
+
+SvxFont& SvxFont::operator=( const SvxFont& rFont )
+{
+ Font::operator=( rFont );
+ eLang = rFont.eLang;
+ eCaseMap = rFont.eCaseMap;
+ nEsc = rFont.nEsc;
+ nPropr = rFont.nPropr;
+ nKern = rFont.nKern;
+ return *this;
+}
+
+
+/*************************************************************************
+ * class SvxDoGetCapitalSize
+ * wird von SvxFont::GetCapitalSize() zur Berechnung der TxtSize bei
+ * eingestellten Kapitaelchen benutzt.
+ *************************************************************************/
+
+class SvxDoGetCapitalSize : public SvxDoCapitals
+{
+protected:
+ SvxFont* pFont;
+ Size aTxtSize;
+ short nKern;
+public:
+ SvxDoGetCapitalSize( SvxFont *pFnt, const OutputDevice *pOut,
+ const XubString &rTxt, const xub_StrLen nIdx,
+ const xub_StrLen nLen, const short nKrn )
+ : SvxDoCapitals( (OutputDevice*)pOut, rTxt, nIdx, nLen ),
+ pFont( pFnt ),
+ nKern( nKrn )
+ { }
+
+ virtual void Do( const XubString &rTxt, const xub_StrLen nIdx,
+ const xub_StrLen nLen, const BOOL bUpper );
+
+ inline const Size &GetSize() const { return aTxtSize; };
+};
+
+void SvxDoGetCapitalSize::Do( const XubString &rTxt, const xub_StrLen nIdx,
+ const xub_StrLen nLen, const BOOL bUpper )
+{
+ Size aPartSize;
+ if ( !bUpper )
+ {
+ BYTE nProp = pFont->GetPropr();
+ pFont->SetProprRel( KAPITAELCHENPROP );
+ pFont->SetPhysFont( pOut );
+ aPartSize.setWidth( pOut->GetTextWidth( rTxt, nIdx, nLen ) );
+ aPartSize.setHeight( pOut->GetTextHeight() );
+ aTxtSize.Height() = aPartSize.Height();
+ pFont->SetPropr( nProp );
+ pFont->SetPhysFont( pOut );
+ }
+ else
+ {
+ aPartSize.setWidth( pOut->GetTextWidth( rTxt, nIdx, nLen ) );
+ aPartSize.setHeight( pOut->GetTextHeight() );
+ }
+ aTxtSize.Width() += aPartSize.Width();
+ aTxtSize.Width() += ( nLen * long( nKern ) );
+}
+
+/*************************************************************************
+ * SvxFont::GetCapitalSize()
+ * berechnet TxtSize, wenn Kapitaelchen eingestellt sind.
+ *************************************************************************/
+
+Size SvxFont::GetCapitalSize( const OutputDevice *pOut, const XubString &rTxt,
+ const xub_StrLen nIdx, const xub_StrLen nLen) const
+{
+ // Start:
+ SvxDoGetCapitalSize aDo( (SvxFont *)this, pOut, rTxt, nIdx, nLen, nKern );
+ DoOnCapitals( aDo );
+ Size aTxtSize( aDo.GetSize() );
+
+ // End:
+ if( !aTxtSize.Height() )
+ {
+ aTxtSize.setWidth( 0 );
+ aTxtSize.setHeight( pOut->GetTextHeight() );
+ }
+ return aTxtSize;
+}
+
+/*************************************************************************
+ * class SvxDoDrawCapital
+ * wird von SvxFont::DrawCapital zur Ausgabe von Kapitaelchen benutzt.
+ *************************************************************************/
+
+class SvxDoDrawCapital : public SvxDoCapitals
+{
+protected:
+ SvxFont *pFont;
+ Point aPos;
+ Point aSpacePos;
+ short nKern;
+public:
+ SvxDoDrawCapital( SvxFont *pFnt, OutputDevice *pOut, const XubString &rTxt,
+ const xub_StrLen nIdx, const xub_StrLen nLen,
+ const Point &rPos, const short nKrn )
+ : SvxDoCapitals( pOut, rTxt, nIdx, nLen ),
+ pFont( pFnt ),
+ aPos( rPos ),
+ aSpacePos( rPos ),
+ nKern( nKrn )
+ { }
+ virtual void DoSpace( const BOOL bDraw );
+ virtual void SetSpace();
+ virtual void Do( const XubString &rTxt, const xub_StrLen nIdx,
+ const xub_StrLen nLen, const BOOL bUpper );
+};
+
+void SvxDoDrawCapital::DoSpace( const BOOL bDraw )
+{
+ if ( bDraw || pFont->IsWordLineMode() )
+ {
+ USHORT nDiff = (USHORT)(aPos.X() - aSpacePos.X());
+ if ( nDiff )
+ {
+ BOOL bWordWise = pFont->IsWordLineMode();
+ BOOL bTrans = pFont->IsTransparent();
+ pFont->SetWordLineMode( FALSE );
+ pFont->SetTransparent( TRUE );
+ pFont->SetPhysFont( pOut );
+ pOut->DrawStretchText( aSpacePos, nDiff, aDoubleSpace, 0, 2 );
+ pFont->SetWordLineMode( bWordWise );
+ pFont->SetTransparent( bTrans );
+ pFont->SetPhysFont( pOut );
+ }
+ }
+}
+
+void SvxDoDrawCapital::SetSpace()
+{
+ if ( pFont->IsWordLineMode() )
+ aSpacePos.X() = aPos.X();
+}
+
+void SvxDoDrawCapital::Do( const XubString &rTxt, const xub_StrLen nIdx,
+ const xub_StrLen nLen, const BOOL bUpper)
+{
+ BYTE nProp;
+ Size aPartSize;
+
+ // Einstellen der gewuenschten Fonts
+ FontUnderline eUnder = pFont->GetUnderline();
+ FontStrikeout eStrike = pFont->GetStrikeout();
+ pFont->SetUnderline( UNDERLINE_NONE );
+ pFont->SetStrikeout( STRIKEOUT_NONE );
+ if ( !bUpper )
+ {
+ nProp = pFont->GetPropr();
+ pFont->SetProprRel( KAPITAELCHENPROP );
+ }
+ pFont->SetPhysFont( pOut );
+
+ aPartSize.setWidth( pOut->GetTextWidth( rTxt, nIdx, nLen ) );
+ aPartSize.setHeight( pOut->GetTextHeight() );
+ long nWidth = aPartSize.Width();
+ if ( nKern )
+ {
+ aPos.X() += (nKern/2);
+ if ( nLen ) nWidth += (nLen*long(nKern));
+ }
+ pOut->DrawStretchText(aPos,nWidth-nKern,rTxt,nIdx,nLen);
+
+ // Font restaurieren
+ pFont->SetUnderline( eUnder );
+ pFont->SetStrikeout( eStrike );
+ if ( !bUpper )
+ pFont->SetPropr( nProp );
+ pFont->SetPhysFont( pOut );
+
+ aPos.X() += nWidth-(nKern/2);
+}
+
+/*************************************************************************
+ * SvxFont::DrawCapital() gibt Kapitaelchen aus.
+ *************************************************************************/
+
+void SvxFont::DrawCapital( OutputDevice *pOut,
+ const Point &rPos, const XubString &rTxt,
+ const xub_StrLen nIdx, const xub_StrLen nLen ) const
+{
+ SvxDoDrawCapital aDo( (SvxFont *)this,pOut,rTxt,nIdx,nLen,rPos,nKern );
+ DoOnCapitals( aDo );
+}
+
+#endif // !REDUCEDSVXFONT
+
+
diff --git a/svx/source/items/svxitems.src b/svx/source/items/svxitems.src
new file mode 100644
index 0000000000..cab9a0663b
--- /dev/null
+++ b/svx/source/items/svxitems.src
@@ -0,0 +1,7155 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxitems.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 "svxitems.hrc"
+ // pragma -------------------------------------------------------------------
+
+ // Value-Strings ------------------------------------------------------------
+String RID_SVXITEMS_TRUE
+{
+ Text = "Wahr" ;
+ Text [ English ] = "True" ;
+ Text [ norwegian ] = "Riktig" ;
+ Text [ italian ] = "Vero" ;
+ Text [ portuguese_brazilian ] = "Verdadeiro" ;
+ Text [ portuguese ] = "Verdadeiro" ;
+ Text [ finnish ] = "Tosi" ;
+ Text [ danish ] = "Sand" ;
+ Text [ french ] = "Vrai" ;
+ Text [ swedish ] = "Sant" ;
+ Text [ dutch ] = "Waar" ;
+ Text [ spanish ] = "Verdadero" ;
+ Text [ english_us ] = "True" ;
+ Text[ chinese_simplified ] = "Õæ";
+ Text[ russian ] = "Èñòèíà";
+ Text[ polish ] = "Prawda";
+ Text[ japanese ] = "^(TRUE)";
+ Text[ chinese_traditional ] = "¯u";
+ Text[ arabic ] = "ÍÞíÞí";
+ Text[ greek ] = "ÁëçèÞò";
+ Text[ korean ] = "Âü";
+ Text[ turkish ] = "Doðru";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_FALSE
+{
+ Text = "Falsch" ;
+ Text [ English ] = "False" ;
+ Text [ norwegian ] = "Feil" ;
+ Text [ italian ] = "Falso" ;
+ Text [ portuguese_brazilian ] = "Falso" ;
+ Text [ portuguese ] = "Falso" ;
+ Text [ finnish ] = "Epätosi" ;
+ Text [ danish ] = "Falsk" ;
+ Text [ french ] = "Faux" ;
+ Text [ swedish ] = "Falsk" ;
+ Text [ dutch ] = "Fout" ;
+ Text [ spanish ] = "Falso" ;
+ Text [ english_us ] = "False" ;
+ Text[ chinese_simplified ] = "´íÎó";
+ Text[ russian ] = "Ëîæü";
+ Text[ polish ] = "Fa³sz";
+ Text[ japanese ] = "ŠÔˆá‚¢";
+ Text[ chinese_traditional ] = "¿ù»~";
+ Text[ arabic ] = "ÎØÃ";
+ Text[ greek ] = "ËÜèïò";
+ Text[ korean ] = "°ÅÁþ";
+ Text[ turkish ] = "Yanlýþ";
+ Text[ language_user1 ] = " ";
+};
+ // Extras -------------------------------------------------------------------
+String RID_SVXITEMS_EXTRAS_CHARCOLOR
+{
+ Text = "Zeichenfarbe" ;
+ Text [ English ] = "Char color" ;
+ Text [ norwegian ] = "Tegnfarge" ;
+ Text [ italian ] = "Colore carattere" ;
+ Text [ portuguese_brazilian ] = "Cor do caracter" ;
+ Text [ portuguese ] = "Cor dos caracteres" ;
+ Text [ finnish ] = "Merkin väri" ;
+ Text [ danish ] = "Tegnfarve" ;
+ Text [ french ] = "Couleur de caractères" ;
+ Text [ swedish ] = "Teckenfärg" ;
+ Text [ dutch ] = "Tekenkleur" ;
+ Text [ spanish ] = "Color del carácter" ;
+ Text [ english_us ] = "Font Color" ;
+ Text[ chinese_simplified ] = "×ÖÌåÑÕÉ«";
+ Text[ russian ] = "Öâåò øðèôòà";
+ Text[ polish ] = "Kolor czcionki";
+ Text[ japanese ] = "Ì«ÝÄ‚ÌF";
+ Text[ chinese_traditional ] = "¦r«¬ÃC¦â";
+ Text[ arabic ] = "áæä ÇáÎØ";
+ Text[ greek ] = "×ñþìá ãñáììáôïóåéñÜò";
+ Text[ korean ] = "±Û²Ã »ö";
+ Text[ turkish ] = "Yazýtipi rengi";
+ Text[ language_user1 ] = " ";
+};
+ // SvxSearchItem ------------------------------------------------------------
+ // Kommando
+String RID_SVXITEMS_SEARCHCMD_FIND
+{
+ Text = "Suchen" ;
+ Text [ English ] = "Search" ;
+ Text [ norwegian ] = "Søk" ;
+ Text [ italian ] = "Cerca" ;
+ Text [ portuguese_brazilian ] = "Localizar" ;
+ Text [ portuguese ] = "Localizar" ;
+ Text [ finnish ] = "Etsi" ;
+ Text [ danish ] = "Søg" ;
+ Text [ french ] = "Rechercher" ;
+ Text [ swedish ] = "Sök" ;
+ 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 RID_SVXITEMS_SEARCHCMD_FIND_ALL
+{
+ Text = "Alle suchen" ;
+ Text [ English ] = "Search all" ;
+ Text [ norwegian ] = "Søk alle" ;
+ Text [ italian ] = "Cerca tutto" ;
+ Text [ portuguese_brazilian ] = "Buscar em tudo" ;
+ Text [ portuguese ] = "Localizar todos" ;
+ Text [ finnish ] = "Etsi kaikki" ;
+ Text [ danish ] = "Søg alle" ;
+ Text [ french ] = "Rechercher tous" ;
+ Text [ swedish ] = "Sök alla" ;
+ Text [ dutch ] = "Alle zoeken" ;
+ Text [ spanish ] = "Buscar todo" ;
+ Text [ english_us ] = "Find All" ;
+ Text[ chinese_simplified ] = "È«²¿ËÑÑ°";
+ Text[ russian ] = "Íàéòè âñå";
+ Text[ polish ] = "Wyszukuj wszystkie";
+ Text[ japanese ] = "‚·‚ׂČŸõ";
+ Text[ chinese_traditional ] = "´M§ä¥þ³¡";
+ Text[ arabic ] = "ÈÍË Çáßá";
+ Text[ greek ] = "ÁíáæÞôçóç üëùí";
+ Text[ korean ] = "¸ðµÎ ã±â";
+ Text[ turkish ] = "Tümünü ara";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SEARCHCMD_REPLACE
+{
+ Text = "Ersetzen" ;
+ Text [ English ] = "Replace" ;
+ Text [ norwegian ] = "Replace" ;
+ Text [ italian ] = "Sostituisci" ;
+ Text [ portuguese_brazilian ] = "Substituir" ;
+ Text [ portuguese ] = "Substituir" ;
+ Text [ finnish ] = "Korvaa" ;
+ Text [ danish ] = "Erstat" ;
+ Text [ french ] = "Remplacer" ;
+ Text [ swedish ] = "Ersätt" ;
+ Text [ dutch ] = "Vervangen" ;
+ Text [ spanish ] = "Reemplazar" ;
+ Text [ english_us ] = "Replace" ;
+ Text[ chinese_simplified ] = "¸üÌæ";
+ Text[ russian ] = "Çàìåíèòü";
+ Text[ polish ] = "Zamieñ";
+ Text[ japanese ] = "’uŠ·";
+ Text[ chinese_traditional ] = "¥N´À";
+ Text[ arabic ] = "ÇÓÊÈÏÇá";
+ Text[ greek ] = "ÁíôéêáôÜóôáóç";
+ Text[ korean ] = "´ëü";
+ Text[ turkish ] = "Deðiþtir";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SEARCHCMD_REPLACE_ALL
+{
+ Text = "Alle ersetzen" ;
+ Text [ English ] = "Replace all" ;
+ Text [ norwegian ] = "Erstatt alle" ;
+ Text [ italian ] = "Sostituisci tutto" ;
+ Text [ portuguese_brazilian ] = "Substitui tudo" ;
+ Text [ portuguese ] = "Substituir tudo" ;
+ Text [ finnish ] = "Korvaa kaikki" ;
+ Text [ danish ] = "Erstat alle" ;
+ Text [ french ] = "Remplacer tout" ;
+ Text [ swedish ] = "Ersätt alla" ;
+ Text [ dutch ] = "Alle vervangen" ;
+ Text [ spanish ] = "Reemplazar todo" ;
+ Text [ english_us ] = "Replace all" ;
+ Text[ chinese_simplified ] = "È«²¿¸üÌæ";
+ Text[ russian ] = "Çàìåíèòü âñå";
+ Text[ polish ] = "Zamieñ wszyst.";
+ Text[ japanese ] = "‚·‚ׂĒuŠ·‚·‚é";
+ Text[ chinese_traditional ] = "¥þ³¡´À¥N";
+ Text[ arabic ] = "ÇÓÊÈÏÇá Çáßá";
+ Text[ greek ] = "ÁíôéêáôÜóôáóç üëá";
+ Text[ korean ] = "¸ðµÎ ´ëü";
+ Text[ turkish ] = "Tümünü deðiþtir";
+ Text[ language_user1 ] = " ";
+};
+ // Vorlagen
+String RID_SVXITEMS_SEARCHSTYL_CHAR
+{
+ Text = "Zeichenvorlage" ;
+ Text [ English ] = "Stylesheet" ;
+ Text [ norwegian ] = "Stilark" ;
+ Text [ italian ] = "Modello di carattere" ;
+ Text [ portuguese_brazilian ] = "Folha de estilos" ;
+ Text [ portuguese ] = "Estilos de caracteres" ;
+ Text [ finnish ] = "Tyylitiedosto" ;
+ Text [ danish ] = "Tegntypografi" ;
+ Text [ french ] = "Style de caractères" ;
+ Text [ swedish ] = "Teckenformatmall" ;
+ Text [ dutch ] = "Tekenopmaakprofiel" ;
+ Text [ spanish ] = "Estilo de caracteres" ;
+ Text [ english_us ] = "Character Style" ;
+ Text[ chinese_simplified ] = "×Ö·ûÑùʽ";
+ Text[ russian ] = "Ñòèëü çíàêîâ";
+ Text[ polish ] = "Styl znaku";
+ Text[ japanese ] = "•¶Žš½À²Ù";
+ Text[ chinese_traditional ] = "¦r«¬¼Ë¦¡";
+ Text[ arabic ] = "äãØ ÇáÃÍÑÝ";
+ Text[ greek ] = "Óôõë ÷áñáêôÞñùí";
+ Text[ korean ] = "¹®ÀÚ À¯Çü";
+ Text[ turkish ] = "Karakter biçimi";
+ Text[ language_user1 ] = "All \"Vorlage\"/Styles are always written with capital S. 10.5.00EM";
+};
+String RID_SVXITEMS_SEARCHSTYL_PARA
+{
+ Text = "Absatzvorlage" ;
+ Text [ English ] = "Stylesheet" ;
+ Text [ norwegian ] = "Stilark" ;
+ Text [ italian ] = "Modello di paragrafo" ;
+ Text [ portuguese_brazilian ] = "Folha de estilos" ;
+ Text [ portuguese ] = "Estilo de parágrafo" ;
+ Text [ finnish ] = "Tyylitiedosto" ;
+ Text [ danish ] = "Afsnitstypografi" ;
+ Text [ french ] = "Style de paragraphe" ;
+ Text [ swedish ] = "Styckeformatmall" ;
+ Text [ dutch ] = "Alinea-opmaakprofiel" ;
+ Text [ spanish ] = "Estilo de párrafo" ;
+ Text [ english_us ] = "Paragraph Style" ;
+ Text[ chinese_simplified ] = "¶ÎÂäÑùʽ";
+ Text[ russian ] = "Ñòèëü àáçàöà";
+ Text[ polish ] = "Styl akapitu";
+ Text[ japanese ] = "’i—Ž½À²Ù";
+ Text[ chinese_traditional ] = "¬q¸¨¼Ë¦¡";
+ Text[ arabic ] = "äãØ ÝÞÑÉ";
+ Text[ greek ] = "Ðñüôõðï ðáñáãñÜöïõ";
+ Text[ korean ] = "´Ü¶ô À¯Çü";
+ Text[ turkish ] = "Paragraf biçimi";
+ Text[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM";
+};
+String RID_SVXITEMS_SEARCHSTYL_FRAME
+{
+ Text = "Rahmenvorlage" ;
+ Text [ English ] = "Stylesheet" ;
+ Text [ norwegian ] = "Stilark" ;
+ Text [ italian ] = "Modello di cornice" ;
+ Text [ portuguese_brazilian ] = "Folha de estilos" ;
+ Text [ portuguese ] = "Estilos de molduras" ;
+ Text [ finnish ] = "Tyylitiedosto" ;
+ Text [ danish ] = "Rammetypografi" ;
+ Text [ french ] = "Style de cadre" ;
+ Text [ swedish ] = "Ramformatmall" ;
+ Text [ dutch ] = "Kaderopmaakprofiel" ;
+ Text [ spanish ] = "Estilo de marcos" ;
+ Text [ english_us ] = "Frame Style" ;
+ Text[ chinese_simplified ] = "¿òÑùʽ";
+ Text[ russian ] = "Ñòèëü ðàìêè";
+ Text[ polish ] = "Styl ramki";
+ Text[ japanese ] = "˜g½À²Ù";
+ Text[ chinese_traditional ] = "°T®Ø¼Ë¦¡";
+ Text[ arabic ] = "äãØ ÅØÇÑ";
+ Text[ greek ] = "Óôõë ðëáéóßïõ";
+ Text[ korean ] = "ÇÁ·¹ÀÓ À¯Çü";
+ Text[ turkish ] = "Çerçeve biçimi";
+ Text[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM";
+};
+String RID_SVXITEMS_SEARCHSTYL_PAGE
+{
+ Text = "Seitenvorlage" ;
+ Text [ English ] = "Stylesheet" ;
+ Text [ norwegian ] = "Stilark" ;
+ Text [ italian ] = "Modello di pagina" ;
+ Text [ portuguese_brazilian ] = "Folha de estilos" ;
+ Text [ portuguese ] = "Estilos de página" ;
+ Text [ finnish ] = "Tyylitiedosto" ;
+ Text [ danish ] = "Sidetypografi" ;
+ Text [ french ] = "Style de page" ;
+ Text [ swedish ] = "Sidformatmall" ;
+ Text [ dutch ] = "Pagina-opmaakprofiel" ;
+ Text [ spanish ] = "Estilo de página" ;
+ Text [ english_us ] = "Page Style" ;
+ Text[ chinese_simplified ] = "Ò³ÃæÑùʽ";
+ Text[ russian ] = "Ñòèëü ñòðàíèöû";
+ Text[ polish ] = "Styl strony";
+ Text[ japanese ] = "Íß°¼Þ½À²Ù";
+ Text[ chinese_traditional ] = "­¶­±¼Ë¦¡";
+ Text[ arabic ] = "äãØ ÕÝÍÉ";
+ Text[ greek ] = "Ðñüôõðï óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö À¯Çü";
+ Text[ turkish ] = "Sayfa biçimi";
+ Text[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM";
+};
+ // Zellen-Typ
+String RID_SVXITEMS_SEARCHIN_FORMULA
+{
+ Text = "Formel" ;
+ Text [ English ] = "Formula" ;
+ Text [ norwegian ] = "Formel" ;
+ Text [ italian ] = "Formula" ;
+ Text [ portuguese_brazilian ] = "Fórmula" ;
+ Text [ portuguese ] = "Fórmula" ;
+ Text [ finnish ] = "Kaava" ;
+ Text [ danish ] = "Formel" ;
+ Text [ french ] = "Formule" ;
+ Text [ swedish ] = "Formel" ;
+ Text [ dutch ] = "Formule" ;
+ Text [ spanish ] = "Fórmula" ;
+ Text [ english_us ] = "Formula" ;
+ Text[ chinese_simplified ] = "¹«Ê½";
+ Text[ russian ] = "Ôîðìóëà";
+ Text[ polish ] = "Formu³a";
+ Text[ japanese ] = "”Ž®";
+ Text[ chinese_traditional ] = "¤½¦¡";
+ Text[ arabic ] = "ÕíÛÉ";
+ Text[ greek ] = "Ôýðïò";
+ Text[ korean ] = "¼ö½Ä";
+ Text[ turkish ] = "Formül";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SEARCHIN_VALUE
+{
+ Text = "Wert" ;
+ Text [ English ] = "Value" ;
+ Text [ norwegian ] = "Verdi" ;
+ Text [ italian ] = "Valore" ;
+ Text [ portuguese_brazilian ] = "Valor" ;
+ Text [ portuguese ] = "Valor" ;
+ Text [ finnish ] = "Arvo" ;
+ Text [ danish ] = "Værdi" ;
+ Text [ french ] = "Valeur" ;
+ Text [ swedish ] = "Värde" ;
+ Text [ dutch ] = "Waarde" ;
+ Text [ spanish ] = "Valor" ;
+ Text [ english_us ] = "Value" ;
+ Text[ chinese_simplified ] = "ÊýÖµ";
+ Text[ russian ] = "Çíà÷åíèå";
+ Text[ polish ] = "WartoϾ";
+ Text[ japanese ] = "’l";
+ Text[ chinese_traditional ] = "¼Æ­È";
+ Text[ arabic ] = "ÇáÞíãÉ";
+ Text[ greek ] = "ÔéìÞ";
+ Text[ korean ] = "°ª";
+ Text[ turkish ] = "Deðer";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SEARCHIN_NOTE
+{
+ Text = "Notiz" ;
+ Text [ English ] = "Note" ;
+ Text [ norwegian ] = "Merknad" ;
+ Text [ italian ] = "Nota" ;
+ Text [ portuguese_brazilian ] = "Observação" ;
+ Text [ portuguese ] = "Anotação" ;
+ Text [ finnish ] = "Huomautus" ;
+ Text [ danish ] = "Note" ;
+ Text [ french ] = "Note" ;
+ Text [ swedish ] = "Anteckning" ;
+ Text [ dutch ] = "Aantekening" ;
+ Text [ spanish ] = "Nota" ;
+ Text [ english_us ] = "Note" ;
+ Text[ chinese_simplified ] = "±¸×¢";
+ Text[ russian ] = "Çàìåòêà";
+ Text[ polish ] = "Notatka";
+ Text[ japanese ] = "ÒÓ";
+ Text[ chinese_traditional ] = "³Æª`";
+ Text[ arabic ] = "ãáÇÍÙÉ";
+ Text[ greek ] = "Óçìåßùóç";
+ Text[ korean ] = "¸Þ¸ð";
+ Text[ turkish ] = "Not";
+ Text[ language_user1 ] = " ";
+};
+ // Applikation
+String RID_SVXITEMS_SEARCHAPP_WRITER
+{
+ Text = "StarWriter" ;
+};
+String RID_SVXITEMS_SEARCHAPP_CALC
+{
+ Text = "StarCalc" ;
+};
+String RID_SVXITEMS_SEARCHAPP_DRAW
+{
+ Text = "StarDraw" ;
+};
+String RID_SVXITEMS_SEARCHAPP_BASE
+{
+ Text = "StarBase" ;
+};
+ // enum SvxBreak ------------------------------------------------------------
+String RID_SVXITEMS_BREAK_NONE
+{
+ Text = "Kein Umbruch" ;
+ Text [ English ] = "No break" ;
+ Text [ norwegian ] = "Ingen skift" ;
+ Text [ italian ] = "Nessuna interruzione" ;
+ Text [ portuguese_brazilian ] = "Sem interrupção" ;
+ Text [ portuguese ] = "Sem quebra" ;
+ Text [ finnish ] = "Ei väliä" ;
+ Text [ danish ] = "Ingen skift" ;
+ Text [ french ] = "Aucun saut" ;
+ Text [ swedish ] = "Ingen brytning" ;
+ Text [ dutch ] = "Geen einde" ;
+ Text [ spanish ] = "Continuo" ;
+ Text [ english_us ] = "No break" ;
+ Text[ chinese_simplified ] = "²»·Ö¸ô";
+ Text[ russian ] = "Áåç ðàçðûâà";
+ Text[ polish ] = "Bez podzia³u";
+ Text[ japanese ] = "‹æØ‚è‚È‚µ";
+ Text[ chinese_traditional ] = "¤£¤À¹j";
+ Text[ arabic ] = "ÈÏæä ÝÇÕá";
+ Text[ greek ] = "Íá ìçí ãßíåé áëëáãÞ";
+ Text[ korean ] = "³ª´©±â ¾øÀ½";
+ Text[ turkish ] = "Kesme yok";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BREAK_COLUMN_BEFORE
+{
+ Text = "Umbruch vor neuer Spalte" ;
+ Text [ English ] = "Break before new column" ;
+ Text [ norwegian ] = "Skift før ny kolonne" ;
+ Text [ italian ] = "Interrompi prima di nuova colonna" ;
+ Text [ portuguese_brazilian ] = "Interromper antes de nova coluna" ;
+ Text [ portuguese ] = "Quebra antes de nova coluna" ;
+ Text [ finnish ] = "Väli ennen uutta palstaa" ;
+ Text [ danish ] = "Skift før ny kolonne" ;
+ Text [ french ] = "Saut avant nouvelle colonne" ;
+ Text [ swedish ] = "Bryt före ny kolumn" ;
+ Text [ dutch ] = "Einde voor nieuwe kolom" ;
+ Text [ spanish ] = "Salto antes de nueva columna" ;
+ Text [ english_us ] = "Break before new column" ;
+ Text[ chinese_simplified ] = "ÔÚÐÂÁÐ֮ǰ·Ö¿ª";
+ Text[ russian ] = "Ðàçðûâ ïåðåä íîâîé êîëîíêîé";
+ Text[ polish ] = "Podzia³ przed now¹ kolumn¹";
+ Text[ japanese ] = "V‚µ‚¢—ñ‚Ì‘O‚ʼnüs";
+ Text[ chinese_traditional ] = "¦b·sÄ椧«e¤À¶}";
+ Text[ arabic ] = "ÝÇÕá ÞÈá ÇáÚãæÏ ÇáÌÏíÏ";
+ Text[ greek ] = "ÁëëáãÞ ðñéí áðü íÝá óôÞëç";
+ Text[ korean ] = "»õ ¿­ ¾Õ¿¡¼­ ³ª´©±â";
+ Text[ turkish ] = "Yeni sütundan önce kes";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BREAK_COLUMN_AFTER
+{
+ Text = "Umbruch nach neuer Spalte" ;
+ Text [ English ] = "Break after new column" ;
+ Text [ norwegian ] = "Skiftt etter ny kolonne" ;
+ Text [ italian ] = "Interrompi dopo nuova colonna" ;
+ Text [ portuguese_brazilian ] = "Interromper após nova coluna" ;
+ Text [ portuguese ] = "Quebra após nova coluna" ;
+ Text [ finnish ] = "Väli uuden palstan jälkeen" ;
+ Text [ danish ] = "Skift efter ny kolonne" ;
+ Text [ french ] = "Saut après nouvelle colonne" ;
+ Text [ swedish ] = "Bryt efter ny kolumn" ;
+ Text [ dutch ] = "Einde na nieuwe kolom" ;
+ Text [ spanish ] = "Salto después de nueva columna" ;
+ Text [ english_us ] = "Break after new column" ;
+ Text[ chinese_simplified ] = "ÔÚÐÂÁÐÖ®ºó·Ö¿ª";
+ Text[ russian ] = "Ðàçðûâ ïîñëå íîâîé êîëîíêè";
+ Text[ polish ] = "Podzia³ po nowej kolumnie";
+ Text[ japanese ] = "V‚µ‚¢—ñ‚ÌŒã‚ʼnüs";
+ Text[ chinese_traditional ] = "¦b·sÄ椧«á¤À¶}";
+ Text[ arabic ] = "ÝÇÕá ÈÚÏ ÇáÚãæÏ ÇáÌÏíÏ";
+ Text[ greek ] = "ÁëëáãÞ ìåôÜ áðü íÝá óôÞëç";
+ Text[ korean ] = "»õ ¿­ µÚ¿¡¼­ ³ª´©±â";
+ Text[ turkish ] = "Yeni sütundan sonra kes";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BREAK_COLUMN_BOTH
+{
+ Text = "Umbruch vor und nach neuer Spalte" ;
+ Text [ English ] = "Break before and after new column" ;
+ Text [ norwegian ] = "Skift før og etter ny kolonne" ;
+ Text [ italian ] = "Interrompi prima e dopo nuova colonna" ;
+ Text [ portuguese_brazilian ] = "Interromper antes e após nova coluna" ;
+ Text [ portuguese ] = "Quebra antes e após nova coluna" ;
+ Text [ finnish ] = "Väli ennen ja jälkeen uuden palstan" ;
+ Text [ danish ] = "Skift før og efter ny kolonne" ;
+ Text [ french ] = "Sauts avant et après nouvelle colonne" ;
+ Text [ swedish ] = "Bryt före och efter ny kolumn" ;
+ Text [ dutch ] = "Einde voor en na nieuwe kolom" ;
+ Text [ spanish ] = "Salto antes y después de nueva columna" ;
+ Text [ english_us ] = "Break before and after new column" ;
+ Text[ chinese_simplified ] = "ÔÚÐÂÁÐÇ°ºó·Ö¿ª";
+ Text[ russian ] = "Ðàçðûâ ïåðåä íîâîé êîëîíêîé è ïîñëå íåå";
+ Text[ polish ] = "Podzia³ przed i po nowej kolumnie";
+ Text[ japanese ] = "V‚µ‚¢—ñ‚Ì‘OŒã‚ʼnüs";
+ Text[ chinese_traditional ] = "¦b·sÄæ«e«á¤À¶}";
+ Text[ arabic ] = "ÝÇÕá ÞÈá æÈÚÏ ÇáÚãæÏ ÇáÌÏíÏ";
+ Text[ greek ] = "ÁëëáãÞ ðñéí êáé ìåôÜ áðü íÝá óôÞëç";
+ Text[ korean ] = "»õ ¿­ÀÇ ¾ÕµÚ¿¡¼­ ³ª´©±â";
+ Text[ turkish ] = "Yeni sütundan önce ve sonra kes";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BREAK_PAGE_BEFORE
+{
+ Text = "Umbruch vor neuer Seite" ;
+ Text [ English ] = "Break before new page" ;
+ Text [ norwegian ] = "Skift før ny side" ;
+ Text [ italian ] = "Interrompi prima di nuova pagina" ;
+ Text [ portuguese_brazilian ] = "Interromper antes de nova página" ;
+ Text [ portuguese ] = "Quebra antes de nova página" ;
+ Text [ finnish ] = "Väli ennen uutta sivua" ;
+ Text [ danish ] = "Skift før ny side" ;
+ Text [ french ] = "Saut avant nouvelle page" ;
+ Text [ swedish ] = "Bryt före ny sida" ;
+ Text [ dutch ] = "Einde voor nieuwe pagina" ;
+ Text [ spanish ] = "Salto antes de página nueva" ;
+ Text [ english_us ] = "Break before new page" ;
+ Text[ chinese_simplified ] = "ÔÚÐÂҳ֮ǰ»»Ò³";
+ Text[ russian ] = "Ðàçðûâ ïåðåä íîâîé ñòðàíèöåé";
+ Text[ polish ] = "Podzia³ przed now¹ stron¹";
+ Text[ japanese ] = "V‚µ‚¢Íß°¼Þ‚Ì‘O‚Å‹æØ‚é";
+ Text[ chinese_traditional ] = "¦b·s­¶¤§«e´«­¶";
+ Text[ arabic ] = "ÝÇÕá ÞÈá ÇáÕÝÍÉ ÇáÌÏíÏÉ";
+ Text[ greek ] = "ÁëëáãÞ ðñéí áðü íÝá óåëßäá";
+ Text[ korean ] = "»õ ÆäÀÌÁö ¾Õ¿¡¼­ ³ª´©±â";
+ Text[ turkish ] = "Yeni sayfadan önce kes";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BREAK_PAGE_AFTER
+{
+ Text = "Umbruch nach neuer Seite" ;
+ Text [ English ] = "Break after new page" ;
+ Text [ norwegian ] = "Skift etter ny side" ;
+ Text [ italian ] = "Interrompi dopo nuova pagina" ;
+ Text [ portuguese_brazilian ] = "Interromper após nova página" ;
+ Text [ portuguese ] = "Quebra após nova página" ;
+ Text [ finnish ] = "Väli uuden sivun jälkeen" ;
+ Text [ danish ] = "Skift efter ny side" ;
+ Text [ french ] = "Saut après nouvelle page" ;
+ Text [ swedish ] = "Bryt efter ny sida" ;
+ Text [ dutch ] = "Einde na nieuwe pagina" ;
+ Text [ spanish ] = "Salto después de página nueva" ;
+ Text [ english_us ] = "Break after new page" ;
+ Text[ chinese_simplified ] = "ÔÚÐÂÒ³Ö®ºó»»Ò³";
+ Text[ russian ] = "Ðàçðûâ ïîñëå íîâîé ñòðàíèöû";
+ Text[ polish ] = "Podzia³ po nowej stronie";
+ Text[ japanese ] = "V‚µ‚¢Íß°¼Þ‚ÌŒã‚Å‹æØ‚é";
+ Text[ chinese_traditional ] = "¦b·s­¶¤§«á´«­¶";
+ Text[ arabic ] = "ÝÇÕá ÈÚÏ ÇáÕÝÍÉ ÇáÌÏíÏÉ";
+ Text[ greek ] = "ÁëëáãÞ ìåôÜ áðü íÝá óåëßäá";
+ Text[ korean ] = "»õ ÆäÀÌÁö ´ÙÀ½¿¡¼­ ³ª´©±â";
+ Text[ turkish ] = "Yeni sayfadan sonra kes";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BREAK_PAGE_BOTH
+{
+ Text = "Umbruch vor und nach neuer Seite" ;
+ Text [ English ] = "Break before and after new page" ;
+ Text [ norwegian ] = "Skift før og etter ny side" ;
+ Text [ italian ] = "Interrompi prima e dopo nuova pagina" ;
+ Text [ portuguese_brazilian ] = "Interromper antes e após nova página" ;
+ Text [ portuguese ] = "Quebra antes e após nova página" ;
+ Text [ finnish ] = "Väli ennen ja jälkeen uuden sivun" ;
+ Text [ danish ] = "Skift før og efter ny side" ;
+ Text [ french ] = "Sauts avant et après nouvelle page" ;
+ Text [ swedish ] = "Bryt före och efter ny sida" ;
+ Text [ dutch ] = "Einde voor en na nieuwe pagina" ;
+ Text [ spanish ] = "Salto antes y después de nueva página" ;
+ Text [ english_us ] = "Break before and after new page" ;
+ Text[ chinese_simplified ] = "ÔÚÐÂҳǰºó»»Ò³";
+ Text[ russian ] = "Ðàçðûâ ïåðåä íîâîé ñòðàíèöåé è ïîñëå íåå";
+ Text[ polish ] = "Podzia³ przed i po nowej stronie";
+ Text[ japanese ] = "V‚µ‚¢Íß°¼Þ‚Ì‘OŒã‚Å‹æØ‚é";
+ Text[ chinese_traditional ] = "¦b·s­¶«e«á´«­¶";
+ Text[ arabic ] = "ÝÇÕá ÞÈá æÈÚÏ ÇáÕÝÍÉ ÇáÌÏíÏÉ";
+ Text[ greek ] = "ÁëëáãÞ ðñéí êáé ìåôÜ áðü íÝá óåëßäá";
+ Text[ korean ] = "»õ ÆäÀÌÁö ¾ÕµÚ¿¡¼­ ³ª´©±â";
+ Text[ turkish ] = "Yeni sayfadan önce ve sonra kes";
+ Text[ language_user1 ] = " ";
+};
+ // enum SvxShadowLocation ---------------------------------------------------
+String RID_SVXITEMS_SHADOW_NONE
+{
+ Text = "Kein Schatten" ;
+ Text [ English ] = "No Shadow" ;
+ Text [ norwegian ] = "Ingen Skygge" ;
+ Text [ italian ] = "Nessuna ombra" ;
+ Text [ portuguese_brazilian ] = "Sem sombra" ;
+ Text [ portuguese ] = "Sem sombras" ;
+ Text [ finnish ] = "Ei varjoa" ;
+ Text [ danish ] = "Ingen skygge" ;
+ Text [ french ] = "Pas d'ombre" ;
+ Text [ swedish ] = "Ingen skuggning" ;
+ Text [ dutch ] = "Geen schaduw" ;
+ Text [ spanish ] = "Sin sombra" ;
+ Text [ english_us ] = "No Shadow" ;
+ Text[ chinese_simplified ] = "²»´øÒõÓ°";
+ Text[ russian ] = "Áåç òåíè";
+ Text[ polish ] = "Brak cienia";
+ Text[ japanese ] = "‰e‚È‚µ";
+ Text[ chinese_traditional ] = "¤£±a³±¼v";
+ Text[ arabic ] = "ÈÏæä Ùá";
+ Text[ greek ] = "×ùñßò óêéÜ";
+ Text[ korean ] = "À½¿µ ¾øÀ½";
+ Text[ turkish ] = "Gölge yok";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SHADOW_TOPLEFT
+{
+ Text = "Schatten oben links" ;
+ Text [ English ] = "Shadow top left" ;
+ Text [ norwegian ] = "Skygge venstre topp" ;
+ Text [ italian ] = "Ombra in alto a sinistra" ;
+ Text [ portuguese_brazilian ] = "Sombra no topo à esquerda" ;
+ Text [ portuguese ] = "Sombra em cima à esquerda" ;
+ Text [ finnish ] = "Varjo ylävasemmalla" ;
+ Text [ danish ] = "Skygge øverst til venstre" ;
+ Text [ french ] = "Ombre supérieure gauche" ;
+ Text [ swedish ] = "Skugga uppe vänster" ;
+ Text [ dutch ] = "Schaduw linksboven" ;
+ Text [ spanish ] = "Sombra arriba a la izquierda" ;
+ Text [ english_us ] = "Shadow top left" ;
+ Text[ chinese_simplified ] = "×óÉÏ·½ÒõÓ°";
+ Text[ russian ] = "Òåíü ââåðõó ñëåâà";
+ Text[ polish ] = "Cieñ w górze z lewej";
+ Text[ japanese ] = "¶ã‚̉e";
+ Text[ chinese_traditional ] = "¥ª¤W¤è³±¼v";
+ Text[ arabic ] = "ÇáÙá ÃÚáì ÇáíÓÇÑ";
+ Text[ greek ] = "ÓêéÜ ðÜíù áñéóôåñÜ";
+ Text[ korean ] = "À§ ¿ÞÂÊ¿¡ À½¿µ";
+ Text[ turkish ] = "Sol üstte gölge";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SHADOW_TOPRIGHT
+{
+ Text = "Schatten oben rechts" ;
+ Text [ English ] = "Shadow top right" ;
+ Text [ norwegian ] = "Skygge høyre topp" ;
+ Text [ italian ] = "Ombra in alto a destra" ;
+ Text [ portuguese_brazilian ] = "Sombra no topo à direita" ;
+ Text [ portuguese ] = "Sombra em cima à direita" ;
+ Text [ finnish ] = "Varjo yläoikealla" ;
+ Text [ danish ] = "Skygge øverst til højre" ;
+ Text [ french ] = "Ombre supérieure droite" ;
+ Text [ swedish ] = "Skugga uppe höger" ;
+ Text [ dutch ] = "Schaduw rechtsboven" ;
+ Text [ spanish ] = "Sombra arriba a la derecha" ;
+ Text [ english_us ] = "Shadow top right" ;
+ Text[ chinese_simplified ] = "ÓÒÉÏ·½ÒõÓ°";
+ Text[ russian ] = "Òåíü ââåðõó ñïðàâà";
+ Text[ polish ] = "Cieñ w górze z prawej";
+ Text[ japanese ] = "‰Eã‚̉e";
+ Text[ chinese_traditional ] = "¥k¤W¤è³±¼v";
+ Text[ arabic ] = "ÇáÙá ÃÚáì Çáíãíä";
+ Text[ greek ] = "ÓêéÜ ðÜíù äåîéÜ";
+ Text[ korean ] = "À§ ¿À¸¥ÂÊ¿¡ À½¿µ";
+ Text[ turkish ] = "Sað üstte gölge";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SHADOW_BOTTOMLEFT
+{
+ Text = "Schatten unten links" ;
+ Text [ English ] = "Shadow bottom left" ;
+ Text [ norwegian ] = "Skygge venstre bunn" ;
+ Text [ italian ] = "Ombra in basso a sinistra" ;
+ Text [ portuguese_brazilian ] = "Sombra na base à esquerda" ;
+ Text [ portuguese ] = "Sombra em baixo à esquerda" ;
+ Text [ finnish ] = "Varjo alavasemmalla" ;
+ Text [ danish ] = "Skygge nederst til venstre" ;
+ Text [ french ] = "Ombre inférieure gauche" ;
+ Text [ swedish ] = "Skugga nere vänster" ;
+ Text [ dutch ] = "Schaduw linksonder" ;
+ Text [ spanish ] = "Sombra abajo a la izquierda" ;
+ Text [ english_us ] = "Shadow bottom left" ;
+ Text[ chinese_simplified ] = "×óÏ·½ÒõÓ°";
+ Text[ russian ] = "Òåíü âíèçó ñëåâà";
+ Text[ polish ] = "Cieñ w dole z lewej";
+ Text[ japanese ] = "¶‰º‚̉e";
+ Text[ chinese_traditional ] = "¥ª¤U¤è³±¼v";
+ Text[ arabic ] = "ÇáÙá ÃÓÝá ÇáíÓÇÑ";
+ Text[ greek ] = "ÓêéÜ êÜôù áñéóôåñÜ";
+ Text[ korean ] = "¾Æ·¡ ¿ÞÂÊ¿¡ À½¿µ";
+ Text[ turkish ] = "Sol altta gölge";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SHADOW_BOTTOMRIGHT
+{
+ Text = "Schatten unten rechts" ;
+ Text [ English ] = "Shadow bottom right" ;
+ Text [ norwegian ] = "Skygge høyre bunn" ;
+ Text [ italian ] = "Ombra in basso a destra" ;
+ Text [ portuguese_brazilian ] = "Sombra na base à direita" ;
+ Text [ portuguese ] = "Sombra em baixo à direita" ;
+ Text [ finnish ] = "Varjo alaoikealla" ;
+ Text [ danish ] = "Skygge nederst til højre" ;
+ Text [ french ] = "Ombre inférieure droite" ;
+ Text [ swedish ] = "Skugga nere höger" ;
+ Text [ dutch ] = "Schaduw rechtsonder" ;
+ Text [ spanish ] = "Sombra abajo a la derecha" ;
+ Text [ english_us ] = "Shadow bottom right" ;
+ Text[ chinese_simplified ] = "ÓÒÏ·½ÒõÓ°";
+ Text[ russian ] = "Òåíü âíèçó ñïðàâà";
+ Text[ polish ] = "Cieñ w dole z prawej";
+ Text[ japanese ] = "‰E‰º‚̉e";
+ Text[ chinese_traditional ] = "¥k¤U¤è³±¼v";
+ Text[ arabic ] = "ÇáÙá ÃÓÝá Çáíãíä";
+ Text[ greek ] = "ÓêéÜ êÜôù äåîéÜ";
+ Text[ korean ] = "¾Æ·¡ ¿À¸¥ÂÊ¿¡ À½¿µ";
+ Text[ turkish ] = "Sað altta gölge";
+ Text[ language_user1 ] = " ";
+};
+ // enum BrushStyle ----------------------------------------------------------
+String RID_SVXITEMS_BRUSHSTYLE_NULL
+{
+ 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";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BRUSHSTYLE_SOLID
+{
+ Text = "Voll" ;
+ Text [ English ] = "Solid" ;
+ Text [ norwegian ] = "Solid" ;
+ Text [ italian ] = "Pieno" ;
+ Text [ portuguese_brazilian ] = "Sólido" ;
+ Text [ portuguese ] = "Cheio" ;
+ Text [ finnish ] = "Tasainen" ;
+ Text [ danish ] = "Massiv" ;
+ Text [ french ] = "Plein" ;
+ Text [ swedish ] = "Solid" ;
+ Text [ dutch ] = "Vol" ;
+ Text [ spanish ] = "Sólido" ;
+ Text [ english_us ] = "Solid" ;
+ Text[ chinese_simplified ] = "³äÌî";
+ Text[ russian ] = "Ïîëíûé";
+ Text[ polish ] = "Pe³ny";
+ Text[ japanese ] = "“h‚è‚‚Ԃµ";
+ Text[ chinese_traditional ] = "¥R¶ñ";
+ Text[ arabic ] = "ããÊáÆ";
+ Text[ greek ] = "ÐëÞñçò";
+ Text[ korean ] = "½Ç¼±";
+ Text[ turkish ] = "Dolu";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BRUSHSTYLE_HORZ
+{
+ 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 ] = "Horisontal" ;
+ Text [ dutch ] = "Horizontaal" ;
+ Text [ spanish ] = "Horizontal" ;
+ Text [ english_us ] = "Horizontal" ;
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò";
+ Text[ russian ] = "Ïî ãîðèçîíòàëè";
+ Text[ polish ] = "Poziomo";
+ Text[ japanese ] = "…•½";
+ Text[ chinese_traditional ] = "¤ô¥­¤è¦V";
+ Text[ arabic ] = "ÃÝÞí";
+ Text[ greek ] = "Ïñéæüíôéá";
+ Text[ korean ] = "¼öÆò";
+ Text[ turkish ] = "Yatay";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BRUSHSTYLE_VERT
+{
+ 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 ] = "Vertikal" ;
+ Text [ dutch ] = "Verticaal" ;
+ Text [ spanish ] = "Vertical" ;
+ Text [ english_us ] = "Vertical" ;
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò";
+ Text[ russian ] = "Ïî âåðòèêàëè";
+ Text[ polish ] = "Pionowo";
+ Text[ japanese ] = "‚’¼";
+ Text[ chinese_traditional ] = "««ª½¤è¦V";
+ Text[ arabic ] = "ÑÃÓí";
+ Text[ greek ] = "Êáôáêüñõöá";
+ Text[ korean ] = "¼öÁ÷";
+ Text[ turkish ] = "Dikey";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BRUSHSTYLE_CROSS
+{
+ Text = "Karo" ;
+ Text [ English ] = "Square" ;
+ Text [ norwegian ] = "Kvadratisk" ;
+ Text [ italian ] = "Quadrato" ;
+ Text [ portuguese_brazilian ] = "Quadrado" ;
+ Text [ portuguese ] = "Grelha" ;
+ Text [ finnish ] = "Neliö" ;
+ Text [ danish ] = "Ruder" ;
+ Text [ french ] = "Carré" ;
+ Text [ swedish ] = "Kvadrat" ;
+ Text [ dutch ] = "Vierkant" ;
+ Text [ spanish ] = "Cuadriculado" ;
+ Text [ english_us ] = "Grid" ;
+ Text[ chinese_simplified ] = "¸ñ×Ó";
+ Text[ russian ] = "Â êëåòêó";
+ Text[ polish ] = "Siatka";
+ Text[ japanese ] = "ŠiŽq";
+ Text[ chinese_traditional ] = "®æ¤l";
+ Text[ arabic ] = "ÔÈßÉ";
+ Text[ greek ] = "Êáñü";
+ Text[ korean ] = "¹ÙµÏÆÇ ¹«´Ì";
+ Text[ turkish ] = "Karo";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BRUSHSTYLE_DIAGCROSS
+{
+ Text = "Karo diagonal" ;
+ Text [ English ] = "Diamond" ;
+ Text [ norwegian ] = "uter" ;
+ Text [ italian ] = "Losanga" ;
+ Text [ portuguese_brazilian ] = "Diamante" ;
+ Text [ portuguese ] = "Losango" ;
+ Text [ finnish ] = "Vinoneliö" ;
+ Text [ danish ] = "Ruder diagonal" ;
+ Text [ french ] = "Losange" ;
+ Text [ swedish ] = "Romb" ;
+ Text [ dutch ] = "Ruit" ;
+ Text [ spanish ] = "Cuadriculado diagonal" ;
+ Text [ english_us ] = "Diamond" ;
+ Text[ chinese_simplified ] = "¶Ô½Ç¸ñ×Ó";
+ Text[ russian ] = "Äèàãîíàëüíàÿ êëåòêà";
+ Text[ polish ] = "Siatka po przek¹tnej";
+ Text[ japanese ] = "‚ЂµŒ`";
+ Text[ chinese_traditional ] = "¹ï¨¤®æ¤l";
+ Text[ arabic ] = "ãõÚøíä";
+ Text[ greek ] = "Êáñü äéáãþíéá";
+ Text[ korean ] = "¸¶¸§¸ð ¹«´Ì";
+ Text[ turkish ] = "Baklava dilimi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BRUSHSTYLE_UPDIAG
+{
+ Text = "Diagonal hoch" ;
+ Text [ English ] = "Diagonal up" ;
+ Text [ norwegian ] = "Diagonal opp" ;
+ Text [ italian ] = "Diagonale su" ;
+ Text [ portuguese_brazilian ] = "Diagonal para cima" ;
+ Text [ portuguese ] = "Diagonal para cima" ;
+ Text [ finnish ] = "Vinosti ylös" ;
+ Text [ danish ] = "Diagonal op" ;
+ Text [ french ] = "Diagonale vers le haut" ;
+ Text [ swedish ] = "Diagonalt uppåt" ;
+ Text [ dutch ] = "Diagonaal omhoog" ;
+ Text [ spanish ] = "Diagonal hacia arriba" ;
+ Text [ english_us ] = "Diagonal up" ;
+ Text[ chinese_simplified ] = "¶Ô½ÇÏòÉÏ";
+ Text[ russian ] = "Ïî äèàãîíàëè ââåðõ";
+ Text[ polish ] = "Po przek¹tnej w górê";
+ Text[ japanese ] = "ŽÎ‚ßã";
+ Text[ chinese_traditional ] = "¹ï¨¤¦V¤W";
+ Text[ arabic ] = "ÞØÑí áÃÚáì";
+ Text[ greek ] = "Äéáãþíéá ðÜíù";
+ Text[ korean ] = "´ë°¢¼±À» À§·Î";
+ Text[ turkish ] = "Diyagonal yukarý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BRUSHSTYLE_DOWNDIAG
+{
+ Text = "Diagonal runter" ;
+ Text [ English ] = "Diagonal down" ;
+ Text [ norwegian ] = "Diagonal ned" ;
+ Text [ italian ] = "Diagonale giù" ;
+ Text [ portuguese_brazilian ] = "Diagonal para baixo" ;
+ Text [ portuguese ] = "Diagonal para baixo" ;
+ Text [ finnish ] = "Vinosti alas" ;
+ Text [ danish ] = "Diagonal ned" ;
+ Text [ french ] = "Diagonale vers le bas" ;
+ Text [ swedish ] = "Diagonalt nedåt" ;
+ Text [ dutch ] = "Diagonaal omlaag" ;
+ Text [ spanish ] = "Diagonal hacia abajo" ;
+ Text [ english_us ] = "Diagonal down" ;
+ Text[ chinese_simplified ] = "¶Ô½ÇÏòÏÂ";
+ Text[ russian ] = "Ïî äèàãîíàëè âíèç";
+ Text[ polish ] = "Po przek¹tnej w dó³";
+ Text[ japanese ] = "ŽÎ‚߉º";
+ Text[ chinese_traditional ] = "¹ï¨¤¦V¤U";
+ Text[ arabic ] = "ÞØÑí áÃÓÝá";
+ Text[ greek ] = "Äéáãþíéá êÜôù";
+ Text[ korean ] = "´ë°¢¼± ¾Æ·¡·Î";
+ Text[ turkish ] = "Diyagonal aþaðý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BRUSHSTYLE_25
+{
+ Text = "25%" ;
+};
+String RID_SVXITEMS_BRUSHSTYLE_50
+{
+ Text = "50%" ;
+};
+String RID_SVXITEMS_BRUSHSTYLE_75
+{
+ Text = "75%" ;
+};
+String RID_SVXITEMS_BRUSHSTYLE_BITMAP
+{
+ Text = "Bild" ;
+ Text [ English ] = "Bitmap" ;
+ Text [ norwegian ] = "Bitmap" ;
+ Text [ italian ] = "Immagine" ;
+ Text [ portuguese_brazilian ] = "Bitmap" ;
+ Text [ portuguese ] = "Imagem" ;
+ Text [ finnish ] = "Bittikartta" ;
+ Text [ danish ] = "Billede" ;
+ Text [ french ] = "Image" ;
+ Text [ swedish ] = "Bild" ;
+ Text [ dutch ] = "Afbeelding" ;
+ Text [ spanish ] = "Imagen" ;
+ Text [ english_us ] = "Image" ;
+ Text[ chinese_simplified ] = "λͼ";
+ Text[ russian ] = "Òî÷å÷íûé ðèñóíîê";
+ Text[ polish ] = "Rysunek";
+ Text[ japanese ] = "²Ò°¼Þ";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï";
+ Text[ arabic ] = "ÕæÑÉ";
+ Text[ greek ] = "Åéêüíá";
+ Text[ korean ] = "ºñÆ®¸Ê";
+ Text[ turkish ] = "Resim";
+ Text[ language_user1 ] = " ";
+};
+ // enum ColorName -----------------------------------------------------------
+String RID_SVXITEMS_COLOR
+{
+ Text = "Farbe " ;
+ Text [ English ] = "Color " ;
+ Text [ norwegian ] = "Farge" ;
+ Text [ italian ] = "Colore " ;
+ Text [ portuguese_brazilian ] = "Cor " ;
+ Text [ portuguese ] = "Cor " ;
+ Text [ finnish ] = "Väri " ;
+ Text [ danish ] = "Farve " ;
+ Text [ french ] = "Couleur " ;
+ Text [ swedish ] = "Färg " ;
+ Text [ dutch ] = "Kleur " ;
+ Text [ spanish ] = "Color " ;
+ Text [ english_us ] = "Color " ;
+ Text[ chinese_simplified ] = "ÑÕÉ« ";
+ Text[ russian ] = "Öâåò ";
+ Text[ polish ] = "Kolor ";
+ Text[ japanese ] = "F ";
+ Text[ chinese_traditional ] = "ÃC¦â ";
+ Text[ arabic ] = "Çááæä ";
+ Text[ greek ] = "×ñþìá ";
+ Text[ korean ] = "»ö ";
+ Text[ turkish ] = "Renk ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_BLACK
+{
+ Text = "Schwarz" ;
+ Text [ English ] = "Black" ;
+ Text [ norwegian ] = "Black" ;
+ Text [ italian ] = "Nero" ;
+ Text [ portuguese_brazilian ] = "Preto" ;
+ Text [ portuguese ] = "Preto" ;
+ Text [ finnish ] = "Musta" ;
+ Text [ danish ] = "Sort" ;
+ Text [ french ] = "Noir" ;
+ Text [ swedish ] = "Svart" ;
+ Text [ dutch ] = "Zwart" ;
+ Text [ spanish ] = "Negro" ;
+ Text [ english_us ] = "Black" ;
+ Text[ chinese_simplified ] = "ºÚÉ«";
+ Text[ russian ] = "×åðíûé";
+ Text[ polish ] = "Czarny";
+ Text[ japanese ] = "•";
+ Text[ chinese_traditional ] = "¶Â¦â";
+ Text[ arabic ] = "ÃÓæÏ";
+ Text[ greek ] = "Ìáýñï";
+ Text[ korean ] = "°ËÀº»ö";
+ Text[ turkish ] = "Siyah";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_BLUE
+{
+ Text = "Blau" ;
+ Text [ English ] = "Blue" ;
+ Text [ norwegian ] = "Blue" ;
+ Text [ italian ] = "Blu" ;
+ Text [ portuguese_brazilian ] = "Azul" ;
+ Text [ portuguese ] = "Azul" ;
+ Text [ finnish ] = "Sininen" ;
+ Text [ danish ] = "Blå" ;
+ Text [ french ] = "Bleu" ;
+ Text [ swedish ] = "Blått" ;
+ Text [ dutch ] = "Blauw" ;
+ Text [ spanish ] = "Azul" ;
+ Text [ english_us ] = "Blue" ;
+ Text[ chinese_simplified ] = "À¶É«";
+ Text[ russian ] = "Ñèíèé";
+ Text[ polish ] = "Nieb.";
+ Text[ japanese ] = "Â";
+ Text[ chinese_traditional ] = "ÂŦâ";
+ Text[ arabic ] = "ÃÒÑÞ";
+ Text[ greek ] = "Ìðëå";
+ Text[ korean ] = "û»ö";
+ Text[ turkish ] = "Mavi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_GREEN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Grün : Gr³n */
+ Text = "Grün" ;
+ Text [ English ] = "Green" ;
+ Text [ norwegian ] = "Green" ;
+ Text [ italian ] = "Verde" ;
+ Text [ portuguese_brazilian ] = "Verde" ;
+ Text [ portuguese ] = "Verde" ;
+ Text [ finnish ] = "Vihreä" ;
+ Text [ danish ] = "Grøn" ;
+ Text [ french ] = "Vert" ;
+ Text [ swedish ] = "Grönt" ;
+ Text [ dutch ] = "Groen" ;
+ Text [ spanish ] = "Verde" ;
+ Text [ english_us ] = "Green" ;
+ Text[ chinese_simplified ] = "ÂÌÉ«";
+ Text[ russian ] = "Çåëåíûé";
+ Text[ polish ] = "Zielony";
+ Text[ japanese ] = "—Î";
+ Text[ chinese_traditional ] = "ºñ¦â";
+ Text[ arabic ] = "ÃÎÖÑ";
+ Text[ greek ] = "ÐñÜóéíï";
+ Text[ korean ] = "³ì»ö";
+ Text[ turkish ] = "Yeþil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_CYAN
+{
+ Text = "Cyan" ;
+ Text [ English ] = "Cyan" ;
+ Text [ norwegian ] = "Cyan" ;
+ Text [ italian ] = "Ciano" ;
+ Text [ portuguese_brazilian ] = "Ciano" ;
+ Text [ portuguese ] = "Cobalto" ;
+ Text [ french ] = "Cyan" ;
+ Text [ dutch ] = "Cyaan" ;
+ Text [ spanish ] = "Cian" ;
+ Text [ danish ] = "Cyan" ;
+ Text [ swedish ] = "Cyan" ;
+ Text [ finnish ] = "Cyan" ;
+ Text [ english_us ] = "Cyan" ;
+ Text[ chinese_simplified ] = "À¶ÂÌÉ«";
+ Text[ russian ] = "Ãîëóáîé";
+ Text[ polish ] = "Nieb.-ziel.";
+ Text[ japanese ] = "¼±ÝF";
+ Text[ chinese_traditional ] = "Âźñ¦â";
+ Text[ arabic ] = "ÃÒÑÞ ÓãÇæí";
+ Text[ greek ] = "Êõáíü";
+ Text[ korean ] = "¿Á»ö";
+ Text[ turkish ] = "Camgöbeði";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_RED
+{
+ Text = "Rot" ;
+ Text [ English ] = "Red" ;
+ Text [ norwegian ] = "Red" ;
+ Text [ italian ] = "Rosso" ;
+ Text [ portuguese_brazilian ] = "Vermelho" ;
+ Text [ portuguese ] = "Vermelho" ;
+ Text [ finnish ] = "Punainen" ;
+ Text [ danish ] = "Rød" ;
+ Text [ french ] = "Rouge" ;
+ Text [ swedish ] = "Rött" ;
+ Text [ dutch ] = "Rood" ;
+ Text [ spanish ] = "Rojo" ;
+ Text [ english_us ] = "Red" ;
+ Text[ chinese_simplified ] = "ºìÉ«";
+ Text[ russian ] = "Êðàñíûé";
+ Text[ polish ] = "Czerw.";
+ Text[ japanese ] = "Ô";
+ Text[ chinese_traditional ] = "¬õ¦â";
+ Text[ arabic ] = "ÃÍãÑ";
+ Text[ greek ] = "Êüêêéíï";
+ Text[ korean ] = "Àû»ö";
+ Text[ turkish ] = "Kýrmýzý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_MAGENTA
+{
+ Text = "Magenta" ;
+ Text [ English ] = "Magenta" ;
+ Text [ norwegian ] = "Magenta" ;
+ Text [ italian ] = "Magenta" ;
+ Text [ portuguese_brazilian ] = "Magenta" ;
+ Text [ portuguese ] = "Magenta" ;
+ Text [ finnish ] = "Magenta" ;
+ Text [ danish ] = "Magenta" ;
+ Text [ french ] = "Magenta" ;
+ Text [ swedish ] = "Magenta" ;
+ Text [ dutch ] = "Magenta" ;
+ Text [ spanish ] = "Magenta" ;
+ Text [ english_us ] = "Magenta" ;
+ Text[ chinese_simplified ] = "×ϺìÉ«";
+ Text[ russian ] = "Ëèëîâûé";
+ Text[ polish ] = "Purpurowy";
+ Text[ japanese ] = "ϾÞÝÀ";
+ Text[ chinese_traditional ] = "µµ¬õ¦â";
+ Text[ arabic ] = "ÃÑÌæÇäí";
+ Text[ greek ] = "ÌáôæÝíôá";
+ Text[ korean ] = "¸¶Á¨Å¸»ö";
+ Text[ turkish ] = "Mor";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_BROWN
+{
+ Text = "Braun" ;
+ Text [ English ] = "Brown" ;
+ Text [ norwegian ] = "Brown" ;
+ Text [ italian ] = "Marrone" ;
+ Text [ portuguese_brazilian ] = "Marrom" ;
+ Text [ portuguese ] = "Castanho" ;
+ Text [ finnish ] = "Ruskea" ;
+ Text [ danish ] = "Brun" ;
+ Text [ french ] = "Marron" ;
+ Text [ swedish ] = "Brunt" ;
+ Text [ dutch ] = "Bruin" ;
+ Text [ spanish ] = "Marrón" ;
+ Text [ english_us ] = "Brown" ;
+ Text[ chinese_simplified ] = "×ØÉ«";
+ Text[ russian ] = "Êîðè÷íåâûé";
+ Text[ polish ] = "Br¹zowy";
+ Text[ japanese ] = "’ƒF";
+ Text[ chinese_traditional ] = "´Ä¦â";
+ Text[ arabic ] = "Èäí";
+ Text[ greek ] = "ÊáöÝ";
+ Text[ korean ] = "°¥»ö";
+ Text[ turkish ] = "Kahverengi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_GRAY
+{
+ Text = "Grau" ;
+ Text [ English ] = "Gray" ;
+ Text [ norwegian ] = "Grå" ;
+ Text [ italian ] = "Grigio" ;
+ Text [ portuguese_brazilian ] = "Cinza" ;
+ Text [ portuguese ] = "Cinzento" ;
+ Text [ finnish ] = "Harmaa" ;
+ Text [ danish ] = "Grå" ;
+ Text [ french ] = "Gris" ;
+ Text [ swedish ] = "Grått" ;
+ Text [ dutch ] = "Grijs" ;
+ Text [ spanish ] = "Gris" ;
+ Text [ english_us ] = "Gray" ;
+ Text[ chinese_simplified ] = "»ÒÉ«";
+ Text[ russian ] = "Ñåðûé";
+ Text[ polish ] = "Szary";
+ Text[ japanese ] = "ŠDF";
+ Text[ chinese_traditional ] = "¦Ç¦â";
+ Text[ arabic ] = "ÑãÇÏí";
+ Text[ greek ] = "Ãêñé";
+ Text[ korean ] = "ȸ»ö";
+ Text[ turkish ] = "Gri";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_LIGHTGRAY
+{
+ Text = "Hellgrau" ;
+ Text [ English ] = "Light Gray" ;
+ Text [ norwegian ] = "Lys Grå" ;
+ Text [ italian ] = "Grigio chiaro" ;
+ Text [ portuguese_brazilian ] = "Cinza Claro" ;
+ Text [ portuguese ] = "Cinzento-claro" ;
+ Text [ finnish ] = "Vaalea harmaa" ;
+ Text [ danish ] = "Lysegrå" ;
+ Text [ french ] = "Gris clair" ;
+ Text [ swedish ] = "Ljusgrått" ;
+ Text [ dutch ] = "Lichtgrijs" ;
+ Text [ spanish ] = "Gris claro" ;
+ Text [ english_us ] = "Light Gray" ;
+ Text[ chinese_simplified ] = "dz»ÒÉ«";
+ Text[ russian ] = "Ñâåòëî-ñåðûé";
+ Text[ polish ] = "Jasnoszary";
+ Text[ japanese ] = "–¾‚é‚¢ŠDF";
+ Text[ chinese_traditional ] = "²L¦Ç¦â";
+ Text[ arabic ] = "ÑãÇÏí ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü ãêñé";
+ Text[ korean ] = "¹àÀº ȸ»ö";
+ Text[ turkish ] = "Açýk gri";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_LIGHTBLUE
+{
+ Text = "Hellblau" ;
+ Text [ English ] = "Light Blue" ;
+ Text [ norwegian ] = "Lys Blå" ;
+ Text [ italian ] = "Blu chiaro" ;
+ Text [ portuguese_brazilian ] = "Azul Claro" ;
+ Text [ portuguese ] = "Azul-claro" ;
+ Text [ finnish ] = "Vaalea sininen" ;
+ Text [ danish ] = "Lyseblå" ;
+ Text [ french ] = "Bleu roi" ;
+ Text [ swedish ] = "Ljusblått" ;
+ Text [ dutch ] = "Lichtblauw" ;
+ Text [ spanish ] = "Azul claro" ;
+ Text [ english_us ] = "Light Blue" ;
+ Text[ chinese_simplified ] = "dzÀ¶É«";
+ Text[ russian ] = "Ñâåòëî-ñèíèé";
+ Text[ polish ] = "Jasnoniebieski";
+ Text[ japanese ] = "–¾‚é‚¢Â";
+ Text[ chinese_traditional ] = "²LÂŦâ";
+ Text[ arabic ] = "ÃÒÑÞ ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü ìðëå";
+ Text[ korean ] = "¹àÀº û»ö";
+ Text[ turkish ] = "Açýk mavi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_LIGHTGREEN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Hellgrün : Hellgr³n */
+ Text = "Hellgrün" ;
+ Text [ English ] = "Light Green" ;
+ Text [ norwegian ] = "Lys Grønn" ;
+ Text [ italian ] = "Verde chiaro" ;
+ Text [ portuguese_brazilian ] = "Verde Claro" ;
+ Text [ portuguese ] = "Verde-claro" ;
+ Text [ finnish ] = "Vaalea vihreä" ;
+ Text [ danish ] = "Lysegrøn" ;
+ Text [ french ] = "Vert clair" ;
+ Text [ swedish ] = "Ljusgrönt" ;
+ Text [ dutch ] = "Lichtgroen" ;
+ Text [ spanish ] = "Verde claro" ;
+ Text [ english_us ] = "Light Green" ;
+ Text[ chinese_simplified ] = "dzÂÌÉ«";
+ Text[ russian ] = "Ñâåòëî-çåëåíûé";
+ Text[ polish ] = "Jasnozielony";
+ Text[ japanese ] = "–¾‚é‚¢—Î";
+ Text[ chinese_traditional ] = "²Lºñ¦â";
+ Text[ arabic ] = "ÃÎÖÑ ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü ðñÜóéíï";
+ Text[ korean ] = "¹àÀº ³ì»ö";
+ Text[ turkish ] = "Açýk yeþil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_LIGHTCYAN
+{
+ Text = "Hellcyan" ;
+ Text [ English ] = "Light Cyan" ;
+ Text [ norwegian ] = "Lys Cyanfarge" ;
+ Text [ italian ] = "Ciano chiaro" ;
+ Text [ portuguese_brazilian ] = "Ciano Claro" ;
+ Text [ portuguese ] = "Cobalto-claro" ;
+ Text [ finnish ] = "Vaalea syaani" ;
+ Text [ danish ] = "Lys cyan" ;
+ Text [ french ] = "Cyan clair" ;
+ Text [ swedish ] = "Ljus cyan" ;
+ Text [ dutch ] = "Lichtcyaan" ;
+ Text [ spanish ] = "Cian claro" ;
+ Text [ english_us ] = "Light Cyan" ;
+ Text[ chinese_simplified ] = "dzÀ¶ÂÌÉ«";
+ Text[ russian ] = "Ñâåòëî-ãîëóáîé";
+ Text[ polish ] = "Jasny niebieskozielony";
+ Text[ japanese ] = "–¾‚é‚¢¼±ÝF";
+ Text[ chinese_traditional ] = "²LÂźñ¦â";
+ Text[ arabic ] = "ÓãÇæí ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü êõáíü";
+ Text[ korean ] = "¹àÀº ¿Á»ö";
+ Text[ turkish ] = "Açýk camgöbeði";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_LIGHTRED
+{
+ Text = "Hellrot" ;
+ Text [ English ] = "Light Red" ;
+ Text [ norwegian ] = "Lys Rød" ;
+ Text [ italian ] = "Rosso chiaro" ;
+ Text [ portuguese_brazilian ] = "Vermelho Claro" ;
+ Text [ portuguese ] = "Vermelho-claro" ;
+ Text [ finnish ] = "Vaalea punainen" ;
+ Text [ danish ] = "Lys rød" ;
+ Text [ french ] = "Rouge clair" ;
+ Text [ swedish ] = "Ljusrött" ;
+ Text [ dutch ] = "Lichtrood" ;
+ Text [ spanish ] = "Rojo claro" ;
+ Text [ english_us ] = "Light Red" ;
+ Text[ chinese_simplified ] = "dzºìÉ«";
+ Text[ russian ] = "Ñâåòëî-êðàñíûé";
+ Text[ polish ] = "Jasnoczerwony";
+ Text[ japanese ] = "–¾‚é‚¢Ô";
+ Text[ chinese_traditional ] = "²L¬õ¦â";
+ Text[ arabic ] = "ÃÍãÑ ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü êüêêéíï";
+ Text[ korean ] = "¹àÀº Àû»ö";
+ Text[ turkish ] = "Açýk kýrmýzý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_LIGHTMAGENTA
+{
+ Text = "Hellmagenta" ;
+ Text [ English ] = "Light Magenta" ;
+ Text [ norwegian ] = "Lys Magentarød" ;
+ Text [ italian ] = "Magenta chiaro" ;
+ Text [ portuguese_brazilian ] = "Magenta Claro" ;
+ Text [ portuguese ] = "Magenta-claro" ;
+ Text [ finnish ] = "Vaalea magenta" ;
+ Text [ danish ] = "Lys magenta" ;
+ Text [ french ] = "Magenta clair" ;
+ Text [ swedish ] = "Ljus magenta" ;
+ Text [ dutch ] = "Lichtmagenta" ;
+ Text [ spanish ] = "Magenta claro" ;
+ Text [ english_us ] = "Light Magenta" ;
+ Text[ chinese_simplified ] = "dz×ϺìÉ«";
+ Text[ russian ] = "Ñâåòëî-ëèëîâûé";
+ Text[ polish ] = "Jasnopurpurowy";
+ Text[ japanese ] = "–¾‚邢ϾÞÝÀ";
+ Text[ chinese_traditional ] = "²Lµµ¬õ¦â";
+ Text[ arabic ] = "ÃÑÌæÇäí ÝÇÊÍ";
+ Text[ greek ] = "Áíïé÷ôü ìáôæÝíôá";
+ Text[ korean ] = "¹àÀº ¸¶Á¨Å¸»ö";
+ Text[ turkish ] = "Eflatun";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_YELLOW
+{
+ Text = "Gelb" ;
+ Text [ English ] = "Yellow" ;
+ Text [ norwegian ] = "Yellow" ;
+ Text [ italian ] = "Giallo" ;
+ Text [ portuguese_brazilian ] = "Amarelo" ;
+ Text [ portuguese ] = "Amarelo" ;
+ Text [ finnish ] = "Keltainen" ;
+ Text [ danish ] = "Gul" ;
+ Text [ french ] = "Jaune" ;
+ Text [ swedish ] = "Gult" ;
+ Text [ dutch ] = "Geel" ;
+ Text [ spanish ] = "Amarillo" ;
+ Text [ english_us ] = "Yellow" ;
+ Text[ chinese_simplified ] = "»ÆÉ«";
+ Text[ russian ] = "Æåëòûé";
+ Text[ polish ] = "¯ó³ty";
+ Text[ japanese ] = "‰©F";
+ Text[ chinese_traditional ] = "¶À¦â";
+ Text[ arabic ] = "ÃÕÝÑ";
+ Text[ greek ] = "Êßôñéíï";
+ Text[ korean ] = "Ȳ»ö";
+ Text[ turkish ] = "Sarý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_WHITE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Weiß : Wei˜ */
+ Text = "Weiß" ;
+ Text [ English ] = "White" ;
+ Text [ norwegian ] = "White" ;
+ Text [ italian ] = "Bianco" ;
+ Text [ portuguese_brazilian ] = "Branco" ;
+ Text [ portuguese ] = "Branco" ;
+ Text [ finnish ] = "Valkoinen" ;
+ Text [ danish ] = "Hvid" ;
+ Text [ french ] = "Blanc" ;
+ Text [ swedish ] = "Vitt" ;
+ Text [ dutch ] = "Wit" ;
+ Text [ spanish ] = "Blanco" ;
+ Text [ english_us ] = "White" ;
+ Text[ chinese_simplified ] = "°×É«";
+ Text[ russian ] = "Áåëûé";
+ Text[ polish ] = "Bia³y";
+ Text[ japanese ] = "”’";
+ Text[ chinese_traditional ] = "¥Õ¦â";
+ Text[ arabic ] = "ÃÈíÖ";
+ Text[ greek ] = "Ëåõêü";
+ Text[ korean ] = "Èò»ö";
+ Text[ turkish ] = "Beyaz";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_COLOR_MENUBAR
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_MENUBARTEXT
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_POPUPMENU
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_POPUPMENUTEXT
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_WINDOWTEXT
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_WINDOWWORKSPACE
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_HIGHLIGHT
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_HIGHLIGHTTEXT
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_3DTEXT
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_3DFACE
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_3DLIGHT
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_3DSHADOW
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_SCROLLBAR
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_FIELD
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_COLOR_FIELDTEXT
+{
+ Text = "?" ;
+};
+ // enum FontItalic -------------------------------------------------------
+String RID_SVXITEMS_ITALIC_NONE
+{
+ Text = "Nicht kursiv" ;
+ Text [ English ] = "Not italic" ;
+ Text [ norwegian ] = "Ikke kursiv" ;
+ Text [ italian ] = "Non corsivo" ;
+ Text [ portuguese_brazilian ] = "Não itálico" ;
+ Text [ portuguese ] = "Sem Itálico" ;
+ Text [ finnish ] = "Ei kursivoitu" ;
+ Text [ danish ] = "Ikke kursiv" ;
+ Text [ french ] = "Non italique" ;
+ Text [ swedish ] = "Inte kursiv" ;
+ Text [ dutch ] = "Niet cursief" ;
+ Text [ spanish ] = "No cursiva" ;
+ Text [ english_us ] = "Not Italic" ;
+ Text[ chinese_simplified ] = "²»ÊÇбÌå";
+ Text[ russian ] = "Íå êóðñèâ";
+ Text[ polish ] = "Nie kursywa";
+ Text[ japanese ] = "ŽÎ‘Ì‚Å‚È‚¢";
+ Text[ chinese_traditional ] = "¤£¬O±×Åé";
+ Text[ arabic ] = "ÛíÑ ãÇÆá";
+ Text[ greek ] = "¼÷é ðëÜãéá";
+ Text[ korean ] = "±â¿ïÀӲà ¾øÀ½";
+ Text[ turkish ] = "Ýtalik deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ITALIC_OBLIQUE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Schräger kursiv : Schrõger kursiv */
+ Text = "Schräger kursiv" ;
+ Text [ English ] = "Oblique italic" ;
+ Text [ norwegian ] = "+++Oblique kursiv" ;
+ Text [ italian ] = "Corsivo obliquo" ;
+ Text [ portuguese_brazilian ] = "Itálico oblíquo" ;
+ Text [ portuguese ] = "Itálico oblíquo" ;
+ Text [ finnish ] = "Vino kursivoitu" ;
+ Text [ danish ] = "Skrå kursiv" ;
+ Text [ french ] = "Italique oblique" ;
+ Text [ swedish ] = "Sned kursiv" ;
+ Text [ dutch ] = "Schuiner cursief" ;
+ Text [ spanish ] = "Cursiva oblicua" ;
+ Text [ english_us ] = "Oblique italic" ;
+ Text[ chinese_simplified ] = "ÄÚÇãбÌå";
+ Text[ russian ] = "Íàêëîííûé êóðñèâ";
+ Text[ polish ] = "Skoœna kursywa";
+ Text[ japanese ] = "ŽÎ“Š‰e–@‚̎ΑÌ";
+ Text[ chinese_traditional ] = "¤º¶É±×Åé";
+ Text[ arabic ] = "ãÇÆá ãäÍÏÑ";
+ Text[ greek ] = "ÐëÜãéá ìå ìåãÜëç êëßóç";
+ Text[ korean ] = "ºñ½ºµëÇÑ ±â¿ïÀÓ²Ã";
+ Text[ turkish ] = "Eðri italik";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ITALIC_NORMAL
+{
+ Text = "Kursiv" ;
+ Text [ English ] = "Italic" ;
+ Text [ norwegian ] = "Kursiv" ;
+ Text [ italian ] = "Corsivo" ;
+ Text [ portuguese_brazilian ] = "Itálico" ;
+ Text [ portuguese ] = "Itálico" ;
+ Text [ finnish ] = "Kursivoitu" ;
+ Text [ danish ] = "Kursiv" ;
+ Text [ french ] = "Italique" ;
+ Text [ swedish ] = "Kursiv" ;
+ Text [ dutch ] = "Cursief" ;
+ Text [ spanish ] = "Cursiva" ;
+ Text [ english_us ] = "Italic" ;
+ Text[ chinese_simplified ] = "бÌå";
+ Text[ russian ] = "Êóðñèâ";
+ Text[ polish ] = "Kursywa";
+ Text[ japanese ] = "ŽÎ‘Ì";
+ Text[ chinese_traditional ] = "±×Åé";
+ Text[ arabic ] = "ãÇÆá";
+ Text[ greek ] = "ÐëÜãéá";
+ Text[ korean ] = "±â¿ïÀÓ²Ã";
+ Text[ turkish ] = "Ýtalik";
+ Text[ language_user1 ] = " ";
+};
+ // enum FontWeight -------------------------------------------------------
+String RID_SVXITEMS_WEIGHT_DONTKNOW
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_WEIGHT_THIN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? dünn : d³nn */
+ Text = "dünn" ;
+ Text [ English ] = "thin" ;
+ Text [ norwegian ] = "tynn" ;
+ Text [ italian ] = "sottile" ;
+ Text [ portuguese_brazilian ] = "fino" ;
+ Text [ portuguese ] = "fino" ;
+ Text [ finnish ] = "kapea" ;
+ Text [ danish ] = "tynd" ;
+ Text [ french ] = "Fin" ;
+ Text [ swedish ] = "tunn" ;
+ Text [ dutch ] = "dun" ;
+ Text [ spanish ] = "delgada" ;
+ Text [ english_us ] = "thin" ;
+ Text[ chinese_simplified ] = "ϸÌå";
+ Text[ russian ] = "òîíêèé";
+ Text[ polish ] = "cienki";
+ Text[ japanese ] = "׎š";
+ Text[ chinese_traditional ] = "²ÓÅé";
+ Text[ arabic ] = "ÑÝíÚ";
+ Text[ greek ] = "ëåðôü";
+ Text[ korean ] = "°¡´Ã°Ô";
+ Text[ turkish ] = "Ýnce";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WEIGHT_ULTRALIGHT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? ultra dünn : ultra d³nn */
+ Text = "ultra dünn" ;
+ Text [ English ] = "ultra thin" ;
+ Text [ norwegian ] = "ultra tynn" ;
+ Text [ italian ] = "ultrasottile" ;
+ Text [ portuguese_brazilian ] = "ultra fino" ;
+ Text [ portuguese ] = "ultrafino" ;
+ Text [ finnish ] = "erikoiskapea" ;
+ Text [ danish ] = "ultra tynd" ;
+ Text [ french ] = "Ultra-fin" ;
+ Text [ swedish ] = "extra mager" ;
+ Text [ dutch ] = "extra dun" ;
+ Text [ spanish ] = "ultra delgada" ;
+ Text [ english_us ] = "ultra thin" ;
+ Text[ chinese_simplified ] = "ÌØϸ";
+ Text[ russian ] = "î÷åíü òîíêèé";
+ Text[ polish ] = "super cienki";
+ Text[ japanese ] = "’´×Žš";
+ Text[ chinese_traditional ] = "¯S²Ó";
+ Text[ arabic ] = "ÑÝíÚ ááÛÇíÉ";
+ Text[ greek ] = "Ðïëý ëåðôü";
+ Text[ korean ] = "¾ÆÁÖ °¡´Ã°Ô";
+ Text[ turkish ] = "Çok ince";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WEIGHT_LIGHT
+{
+ Text = "leicht" ;
+ Text [ English ] = "light" ;
+ Text [ norwegian ] = "lys" ;
+ Text [ italian ] = "leggero" ;
+ Text [ portuguese_brazilian ] = "claro" ;
+ Text [ portuguese ] = "claro" ;
+ Text [ finnish ] = "laiha" ;
+ Text [ danish ] = "let" ;
+ Text [ french ] = "Léger" ;
+ Text [ swedish ] = "lätt" ;
+ Text [ dutch ] = "licht" ;
+ Text [ spanish ] = "claro" ;
+ Text [ english_us ] = "light" ;
+ Text[ chinese_simplified ] = "ϸÌå";
+ Text[ russian ] = "òîíêèé";
+ Text[ polish ] = "lekko";
+ Text[ japanese ] = "ׂ¢";
+ Text[ chinese_traditional ] = "²ÓÅé";
+ Text[ arabic ] = "ÎÝíÝ";
+ Text[ greek ] = "áðáëü";
+ Text[ korean ] = "¹à°Ô";
+ Text[ turkish ] = "Ýnce";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WEIGHT_SEMILIGHT
+{
+ Text = "halb leicht" ;
+ Text [ English ] = "semi light" ;
+ Text [ norwegian ] = "halv lys" ;
+ Text [ italian ] = "semileggero" ;
+ Text [ portuguese_brazilian ] = "semi-claro" ;
+ Text [ portuguese ] = "semi-claro" ;
+ Text [ finnish ] = "puolilaiha" ;
+ Text [ danish ] = "semi let" ;
+ Text [ french ] = "Semi-clair" ;
+ Text [ swedish ] = "halvmager" ;
+ Text [ dutch ] = "halflicht" ;
+ Text [ spanish ] = "semi claro" ;
+ Text [ english_us ] = "semi light" ;
+ Text[ chinese_simplified ] = "°ëϸ";
+ Text[ russian ] = "ïîëóòîíêèé";
+ Text[ polish ] = "pó³-lekki";
+ Text[ japanese ] = "‚â‚â׎š";
+ Text[ chinese_traditional ] = "¥b²Ó";
+ Text[ arabic ] = "äÕÝ ÎÝíÝ";
+ Text[ greek ] = "çìé-áðáëü";
+ Text[ korean ] = "Áß°£ ¹à°Ô";
+ Text[ turkish ] = "Yarý ince";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WEIGHT_NORMAL
+{
+ Text = "normal" ;
+ Text [ English ] = "normal" ;
+ Text [ norwegian ] = "normal" ;
+ Text [ italian ] = "normale" ;
+ Text [ portuguese_brazilian ] = "normal" ;
+ Text [ portuguese ] = "normal" ;
+ Text [ finnish ] = "normaali" ;
+ Text [ danish ] = "normal" ;
+ Text [ french ] = "Normal" ;
+ Text [ swedish ] = "normal" ;
+ Text [ dutch ] = "normaal" ;
+ Text [ spanish ] = "normal" ;
+ Text [ english_us ] = "normal" ;
+ Text[ chinese_simplified ] = "ÆÕͨ";
+ Text[ russian ] = "îáû÷íûé";
+ Text[ polish ] = "normalny";
+ Text[ japanese ] = "’Êí";
+ Text[ chinese_traditional ] = "´¶³q";
+ Text[ arabic ] = "ÚÇÏí";
+ Text[ greek ] = "êáíïíéêÜ";
+ Text[ korean ] = "º¸Åë";
+ Text[ turkish ] = "Normal";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WEIGHT_MEDIUM
+{
+ Text = "mittel" ;
+ Text [ English ] = "medium" ;
+ Text [ norwegian ] = "medium" ;
+ Text [ italian ] = "medio" ;
+ Text [ portuguese_brazilian ] = "médio" ;
+ Text [ portuguese ] = "médio" ;
+ Text [ finnish ] = "tavallinen" ;
+ Text [ danish ] = "middel" ;
+ Text [ french ] = "Moyen" ;
+ Text [ swedish ] = "medel" ;
+ Text [ dutch ] = "medium" ;
+ Text [ spanish ] = "medio" ;
+ Text [ english_us ] = "medium" ;
+ Text[ chinese_simplified ] = "ÖеÈ";
+ Text[ russian ] = "ñðåäíèé";
+ Text[ polish ] = "œrednio";
+ Text[ japanese ] = "•’Ê";
+ Text[ chinese_traditional ] = "¤¤µ¥";
+ Text[ arabic ] = "ãÊæÓØ";
+ Text[ greek ] = "ìåóáßï";
+ Text[ korean ] = "Áß°£";
+ Text[ turkish ] = "Orta";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WEIGHT_SEMIBOLD
+{
+ Text = "halb fett" ;
+ Text [ English ] = "semi bold" ;
+ Text [ norwegian ] = "halv uthevet" ;
+ Text [ italian ] = "semigrassetto" ;
+ Text [ portuguese_brazilian ] = "semi-negrito" ;
+ Text [ portuguese ] = "semi-negrito" ;
+ Text [ finnish ] = "puolilihava" ;
+ Text [ danish ] = "semi fed" ;
+ Text [ french ] = "Semi-gras" ;
+ Text [ swedish ] = "halvfet" ;
+ Text [ dutch ] = "halfvet" ;
+ Text [ spanish ] = "semi negrita" ;
+ Text [ english_us ] = "semi bold" ;
+ Text[ chinese_simplified ] = "°ë´Ö";
+ Text[ russian ] = "ïîëóæèðíûé";
+ Text[ polish ] = "pó³pogrubiony";
+ Text[ japanese ] = "‚â‚⑾Žš";
+ Text[ chinese_traditional ] = "¥b²Ê";
+ Text[ arabic ] = "äÕÝ ÚÑíÖ";
+ Text[ greek ] = "çìé-Ýíôïíï";
+ Text[ korean ] = "Áß°£ ÁøÇÏ°Ô";
+ Text[ turkish ] = "Yarý kalýn";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WEIGHT_BOLD
+{
+ Text = "fett" ;
+ Text [ English ] = "bold" ;
+ Text [ norwegian ] = "uthevet" ;
+ Text [ italian ] = "grassetto" ;
+ Text [ portuguese_brazilian ] = "negrito" ;
+ Text [ portuguese ] = "negrito" ;
+ Text [ finnish ] = "lihava" ;
+ Text [ danish ] = "fed" ;
+ Text [ french ] = "Gras" ;
+ Text [ swedish ] = "Fet" ;
+ Text [ dutch ] = "vet" ;
+ Text [ spanish ] = "negrita" ;
+ Text [ english_us ] = "bold" ;
+ Text[ chinese_simplified ] = "´ÖÌå";
+ Text[ russian ] = "æèðíûé";
+ Text[ polish ] = "Pogrubiona";
+ Text[ japanese ] = "‘¾Žš";
+ Text[ chinese_traditional ] = "²ÊÅé";
+ Text[ arabic ] = "ÚÑíÖ";
+ Text[ greek ] = "Ýíôïíï";
+ Text[ korean ] = "ÁøÇÏ°Ô";
+ Text[ turkish ] = "Kalýn";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WEIGHT_ULTRABOLD
+{
+ Text = "ultra fett" ;
+ Text [ English ] = "ultra bold" ;
+ Text [ norwegian ] = "ekstra uthevet" ;
+ Text [ italian ] = "grassetto doppio" ;
+ Text [ portuguese_brazilian ] = "ultra negrito" ;
+ Text [ portuguese ] = "ultranegrito" ;
+ Text [ finnish ] = "erittäin lihava" ;
+ Text [ danish ] = "ultra fed" ;
+ Text [ french ] = "Très gras" ;
+ Text [ swedish ] = "extra fet" ;
+ Text [ dutch ] = "extra vet" ;
+ Text [ spanish ] = "ultra negrita" ;
+ Text [ english_us ] = "ultra bold" ;
+ Text[ chinese_simplified ] = "ÌØ´Ö";
+ Text[ russian ] = "î÷åíü æèðíûé";
+ Text[ polish ] = "super wyt³uszczony";
+ Text[ japanese ] = "’´‘¾Žš";
+ Text[ chinese_traditional ] = "¯S²Ê";
+ Text[ arabic ] = "ÚÑíÖ ááÛÇíÉ";
+ Text[ greek ] = "ðïëý Ýíôïíá";
+ Text[ korean ] = "¾ÆÁÖ ÁøÇÏ°Ô";
+ Text[ turkish ] = "Çok kalýn";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WEIGHT_BLACK
+{
+ Text = "schwarz" ;
+ Text [ English ] = "black" ;
+ Text [ norwegian ] = "svart" ;
+ Text [ italian ] = "nero" ;
+ Text [ portuguese_brazilian ] = "preto" ;
+ Text [ portuguese ] = "preto" ;
+ Text [ finnish ] = "musta" ;
+ Text [ danish ] = "sort" ;
+ Text [ french ] = "Noir" ;
+ Text [ swedish ] = "svart" ;
+ Text [ dutch ] = "zwart" ;
+ Text [ spanish ] = "negro" ;
+ Text [ english_us ] = "black" ;
+ Text[ chinese_simplified ] = "ºÚÉ«";
+ Text[ russian ] = "÷åðíûé";
+ Text[ polish ] = "czarny";
+ Text[ japanese ] = "•";
+ Text[ chinese_traditional ] = "¶Â¦â";
+ Text[ arabic ] = "ÃÓæÏ";
+ Text[ greek ] = "ìáýñï";
+ Text[ korean ] = "°ËÀº»ö";
+ Text[ turkish ] = "Siyah";
+ Text[ language_user1 ] = " ";
+};
+ // enum FontUnderline ----------------------------------------------------
+String RID_SVXITEMS_UL_NONE
+{
+ Text = "Nicht unterstrichen" ;
+ Text [ English ] = "No underline" ;
+ Text [ norwegian ] = "Ingen understreking" ;
+ Text [ italian ] = "Senza sottolineatura" ;
+ Text [ portuguese_brazilian ] = "Sem sublinhado" ;
+ Text [ portuguese ] = "Sem sublinhado" ;
+ Text [ finnish ] = "Ei alleviivausta" ;
+ Text [ danish ] = "Ikke understreget" ;
+ Text [ french ] = "Non souligné" ;
+ Text [ swedish ] = "Inte understruken" ;
+ Text [ dutch ] = "Niet onderstreept" ;
+ Text [ spanish ] = "Sin subrayado" ;
+ Text [ english_us ] = "No underline" ;
+ Text[ chinese_simplified ] = "ûÓÐÏ»®Ïß";
+ Text[ russian ] = "Áåç ïîä÷åðêèâàíèÿ";
+ Text[ polish ] = "Nie podkreœlony";
+ Text[ japanese ] = "‰ºü‚È‚µ";
+ Text[ chinese_traditional ] = "¨S¦³¤U¹º½u";
+ Text[ arabic ] = "ÈÏæä ÎØ ÊÍÊí";
+ Text[ greek ] = "×ùñßò õðïãñÜììéóç";
+ Text[ korean ] = "¹ØÁÙ ¾øÀ½";
+ Text[ turkish ] = "Altý çizili deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_SINGLE
+{
+ Text = "Einfach unterstrichen" ;
+ Text [ English ] = "Single underline" ;
+ Text [ norwegian ] = "Enkel understreking" ;
+ Text [ italian ] = "Sottolineatura singola" ;
+ Text [ portuguese_brazilian ] = "Sublinhado simples" ;
+ Text [ portuguese ] = "Sublinhado simples" ;
+ Text [ finnish ] = "Yksi alleviivaus" ;
+ Text [ danish ] = "Enkelt understreget" ;
+ Text [ french ] = "Soulignage simple" ;
+ Text [ swedish ] = "Enkelt understruken" ;
+ Text [ dutch ] = "Enkel onderstreept" ;
+ Text [ spanish ] = "Subrayado sencillo" ;
+ Text [ english_us ] = "Single underline" ;
+ Text[ chinese_simplified ] = "µ¥Ï»®Ïß";
+ Text[ russian ] = "Îäèíàðíîå ïîä÷åðêèâàíèå";
+ Text[ polish ] = "Pojedyncze podkreœlenie";
+ Text[ japanese ] = "伟";
+ Text[ chinese_traditional ] = "³æ¤U¹º½u";
+ Text[ arabic ] = "ÎØ ÊÍÊí ãÝÑÏ";
+ Text[ greek ] = "ÁðëÞ õðïãñÜììéóç";
+ Text[ korean ] = "´ÜÀÏ ¹ØÁÙ";
+ Text[ turkish ] = "Altý tek çizili";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_DOUBLE
+{
+ Text = "Doppelt unterstrichen" ;
+ Text [ English ] = "Double underlne" ;
+ Text [ norwegian ] = "Dobbel understreking" ;
+ Text [ italian ] = "Sottolineatura doppia" ;
+ Text [ portuguese_brazilian ] = "Sublinhado duplo" ;
+ Text [ portuguese ] = "Sublinhado duplo" ;
+ Text [ finnish ] = "Kaksoisalleviivaus" ;
+ Text [ danish ] = "Dobbelt understreget" ;
+ Text [ french ] = "Soulignage double" ;
+ Text [ swedish ] = "Dubbelt understruken" ;
+ Text [ dutch ] = "Dubbel onderstreept" ;
+ Text [ spanish ] = "Subrayado doble" ;
+ Text [ english_us ] = "Double underlne" ;
+ Text[ chinese_simplified ] = "Ë«Ï»®Ïß";
+ Text[ russian ] = "Äâîéíîå ïîä÷åðêèâàíèå";
+ Text[ polish ] = "Podwójne podkreœlenie";
+ Text[ japanese ] = "Җd伟";
+ Text[ chinese_traditional ] = "Âù¤U¹º½u";
+ Text[ arabic ] = "ÎØ ÊÍÊí ãÒÏæÌ";
+ Text[ greek ] = "ÄéðëÞ õðïãñÜììéóç";
+ Text[ korean ] = "ÀÌÁß ¹ØÁÙ";
+ Text[ turkish ] = "Altý çift çizili";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_DOTTED
+{
+ Text = "Gepunktet unterstrichen" ;
+ Text [ English ] = "Dotted underline" ;
+ Text [ norwegian ] = "Prikket linjeDotted underline" ;
+ Text [ italian ] = "Sottolineatura punteggiata" ;
+ Text [ portuguese_brazilian ] = "Sublinhado pontilhado" ;
+ Text [ portuguese ] = "Sublinhado pontilhado" ;
+ Text [ finnish ] = "Pistealleviivaus" ;
+ Text [ danish ] = "Punkteret understreget" ;
+ Text [ french ] = "Soulignage en pointillé" ;
+ Text [ swedish ] = "Punkterat understruken" ;
+ Text [ dutch ] = "Onderstreept met stippen" ;
+ Text [ spanish ] = "Subrayado punteado" ;
+ Text [ english_us ] = "Dotted underline" ;
+ Text[ chinese_simplified ] = "Ï»®µãÏß";
+ Text[ russian ] = "Òî÷å÷íîå ïîä÷åðêèâàíèå";
+ Text[ polish ] = "Kropkowanie podkreœlone";
+ Text[ japanese ] = "“_‰ºü";
+ Text[ chinese_traditional ] = "¤U¹ºÂI½u";
+ Text[ arabic ] = "ÎØ ÊÍÊí ãäÞØ";
+ Text[ greek ] = "ÕðïãñÜììéóç: ÄéÜóôéêôï";
+ Text[ korean ] = "Á¡¼± ¹ØÁÙ";
+ Text[ turkish ] = "Noktalarla altý çizili";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_DONTKNOW
+{
+ Text = "Unterstrichen" ;
+ Text [ English ] = "Underline" ;
+ Text[ english_us ] = "Underline";
+ Text[ portuguese ] = "Sublinhado";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå";
+ Text[ dutch ] = "Onderstreept";
+ Text[ french ] = "Soulignage";
+ Text[ spanish ] = "Subrayado";
+ Text[ italian ] = "Sottolineato";
+ Text[ danish ] = "Understreget";
+ Text[ swedish ] = "Understruken";
+ Text[ polish ] = "Podkreœlenie";
+ Text[ portuguese_brazilian ] = "Underline";
+ Text[ japanese ] = "伟";
+ Text[ chinese_simplified ] = "Ï»®Ïß";
+ Text[ chinese_traditional ] = "¤U¹º½u";
+ Text[ arabic ] = "ÊÍÊå ÎØ";
+ Text[ greek ] = "YðïãñÜììéóç";
+ Text[ korean ] = "¹ØÁÙ";
+ Text[ turkish ] = "Altý çizili";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_DASH
+{
+ Text = "Unterstrichen (Strich)" ;
+ Text [ English ] = "Underline (Dash)" ;
+ Text[ english_us ] = "Underline (dashes)";
+ Text[ portuguese ] = "Sublinhado (traço)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (øòðèõ)";
+ Text[ dutch ] = "Onderstreept (streepjes)";
+ Text[ french ] = "Soulignage (tirets)";
+ Text[ spanish ] = "Subrayado (trazo)";
+ Text[ italian ] = "Sottolineato (tratto)";
+ Text[ danish ] = "Understreget (streg)";
+ Text[ swedish ] = "Understruken (streck)";
+ Text[ polish ] = "Podkreœlenie (Kreska)";
+ Text[ portuguese_brazilian ] = "Underline (Dash)";
+ Text[ japanese ] = "‰ºü(”jü)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(»®Ïß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(¹º½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí (ÔõÑóØ)";
+ Text[ greek ] = "YðïãñÜììéóç (Ðáýëá)";
+ Text[ korean ] = "¹ØÁÙ(´ë½Ã)";
+ Text[ turkish ] = "Altý çizili (çizgi)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_LONGDASH
+{
+ Text = "Unterstrichen (Strich lang)" ;
+ Text [ English ] = "Underline (Long dash)" ;
+ Text[ english_us ] = "Underline (long dashes)";
+ Text[ portuguese ] = "Sublinhado (traço longo)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (äëèííûé øòðèõ)";
+ Text[ dutch ] = "Onderstreept (lange streepjes)";
+ Text[ french ] = "Soulignage (tirets longs)";
+ Text[ spanish ] = "Subrayado (trazo largo)";
+ Text[ italian ] = "Sottolineato (tratto lungo)";
+ Text[ danish ] = "Understreget (streg lang)";
+ Text[ swedish ] = "Understruken (långt streck)";
+ Text[ polish ] = "Podkreœlenie (D³ugi ³¹cznik)";
+ Text[ portuguese_brazilian ] = "Underline (Long dash)";
+ Text[ japanese ] = "‰ºü(’·‚ß‚Ì”jü)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(³¤»®Ïß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(ªø¹º½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí (ÔõÑóØ ØæíáÉ)";
+ Text[ greek ] = "YðïãñÜììéóç (ÌáêñéÜ ðáýëá)";
+ Text[ korean ] = "¹ØÁÙ (±ä ´ë½Ã)";
+ Text[ turkish ] = "Altý çizili (uzun çizgi)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_DASHDOT
+{
+ Text = "Unterstrichen (Punkt Strich)" ;
+ Text [ English ] = "Underline (Dot dash)" ;
+ Text[ english_us ] = "Underline (dot dash)";
+ Text[ portuguese ] = "Sublinhado (ponto traço)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (òî÷êà øòðèõ)";
+ Text[ dutch ] = "Onderstreept (punt-streepje)";
+ Text[ french ] = "Soulignage (point tiret)";
+ Text[ spanish ] = "Subrayado (punto trazo)";
+ Text[ italian ] = "Sottolineato (punto tratto)";
+ Text[ danish ] = "Understreget (prik streg)";
+ Text[ swedish ] = "Understruken (punkt streck)";
+ Text[ polish ] = "Podkreœlenie (Kropka-Kreska)";
+ Text[ portuguese_brazilian ] = "Underline (Dot dash)";
+ Text[ japanese ] = "‰ºü(“_ü)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(µã»®Ïß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(ÂI¹º½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí (äÞØÉ ÔÑØÉ)";
+ Text[ greek ] = "YðïãñÜììéóç (Ôåëåßá Ðáýëá)";
+ Text[ korean ] = "¹ØÁÙ (Á¡ ´ë½Ã)";
+ Text[ turkish ] = "Altý çizili (nokta çizgi)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_DASHDOTDOT
+{
+ Text = "Unterstrichen (Punkt Punkt Strich)" ;
+ Text [ English ] = "Underline (Dot dot dash)" ;
+ Text[ english_us ] = "Underline (dot dot dash)";
+ Text[ portuguese ] = "Sublinhado (ponto ponto traço)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (òî÷êà òî÷êà øòðèõ)";
+ Text[ dutch ] = "Onderstreept (punt punt streepje)";
+ Text[ french ] = "Soulignage (point point tiret)";
+ Text[ spanish ] = "Subrayado (punto punto trazo)";
+ Text[ italian ] = "Sottolineato (punto punto tratto)";
+ Text[ danish ] = "Understreget (prik prik streg)";
+ Text[ swedish ] = "Understruken (punkt punkt streck)";
+ Text[ polish ] = "Podkreœlenie (Kropka-Kropka-Kreska)";
+ Text[ portuguese_brazilian ] = "Underline (Dot dot dash)";
+ Text[ japanese ] = "‰ºü(“ñ“_½ü)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(µãµã»®Ïß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(ÂIÂI¹º½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí (äÞØÉ äÞØÉ ÔÑØÉ)";
+ Text[ greek ] = "YðïãñÜììéóç (Ôåëåßá Ôåëåßá Ðáýëá)";
+ Text[ korean ] = "¹ØÁÙ (Á¡ Á¡ ´ë½Ã)";
+ Text[ turkish ] = "Altý çizili (nokta nokta çizgi)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_SMALLWAVE
+{
+ Text = "Unterstrichen (Welle klein)" ;
+ Text [ English ] = "Underline (Small wave)" ;
+ Text[ english_us ] = "Underline (small wave)";
+ Text[ portuguese ] = "Sublinhado (ondulação pequena)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (ìåëêàÿ âîëíà)";
+ Text[ dutch ] = "Onderstreept (klein golfje)";
+ Text[ french ] = "Soulignage (petite ondulation)";
+ Text[ spanish ] = "Subrayado (ondulación pequeña)";
+ Text[ italian ] = "Sottolineato (linea ondulata piccola)";
+ Text[ danish ] = "Understreget (bølger små)";
+ Text[ swedish ] = "Understruken (liten våg)";
+ Text[ polish ] = "Podkreœlenie (Cienka fala)";
+ Text[ portuguese_brazilian ] = "Underline (Small wave)";
+ Text[ japanese ] = "‰ºü(¬”g)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(С²¨ÀËÏß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(¤pªi®ö½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí (ãæÌÉ ÕÛíÑÉ)";
+ Text[ greek ] = "YðïãñÜììéóç (Êýìá ìéêñü)";
+ Text[ korean ] = "¹ØÁÙ (ÀÛÀº Æļ±)";
+ Text[ turkish ] = "Altý çizili (küçük dalga)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_WAVE
+{
+ Text = "Unterstrichen (Welle)" ;
+ Text [ English ] = "Underline (Wave)" ;
+ Text[ english_us ] = "Underline (Wave)";
+ Text[ portuguese ] = "Sublinhado (ondulação)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (âîëíà)";
+ Text[ dutch ] = "Onderstreept (golf)";
+ Text[ french ] = "Soulignage (ondulation)";
+ Text[ spanish ] = "Subrayado (ondulado)";
+ Text[ italian ] = "Sottolienato (linea ondulata)";
+ Text[ danish ] = "Understreget (bølger)";
+ Text[ swedish ] = "Understruken (våg)";
+ Text[ polish ] = "Podkreœlenie (Fala)";
+ Text[ portuguese_brazilian ] = "Underline (Wave)";
+ Text[ japanese ] = "‰ºü(”gü)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(²¨ÀËÏß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(ªi®ö½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí (ãæÌÉ)";
+ Text[ greek ] = "YðïãñÜììéóç (Êýìá)";
+ Text[ korean ] = "¹ØÁÙ (Æļ±)";
+ Text[ turkish ] = "Altý çizili (dalga)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_DOUBLEWAVE
+{
+ Text = "Unterstrichen (Welle doppelt)" ;
+ Text [ English ] = "Underline (Double wave)" ;
+ Text[ english_us ] = "Underline (Double wave)";
+ Text[ portuguese ] = "Sublinhado (ondulação dupla)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (äâîéíàÿ âîëíà)";
+ Text[ dutch ] = "Onderstreept (dubbele golf)";
+ Text[ french ] = "Soulignage (ondulation double)";
+ Text[ spanish ] = "Subrayado (ondulado doble)";
+ Text[ italian ] = "Sottolineato (linea ondulata doppia)";
+ Text[ danish ] = "Understreget (bølger dobbelt)";
+ Text[ swedish ] = "Understruken (dubbel våg)";
+ Text[ polish ] = "Podkreœlenie (Podwójna fala)";
+ Text[ portuguese_brazilian ] = "Underline (Double wave)";
+ Text[ japanese ] = "‰ºü(“ñd”gü)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(Ë«²¨ÀËÏß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(Âùªi®ö½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí (ãæÌÉ ãÒÏæÌÉ)";
+ Text[ greek ] = "YðïãñÜììéóç (Êýìá äéðëü)";
+ Text[ korean ] = "¹ØÁÙ (ÀÌÁß Æļ±)";
+ Text[ turkish ] = "Altý çizili (çift dalga)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_BOLD
+{
+ Text = "Fett unterstrichen" ;
+ Text [ English ] = "Bold underline" ;
+ Text[ english_us ] = "Underlined (Bold)";
+ Text[ portuguese ] = "Sublinhado negrito";
+ Text[ russian ] = "Æèðíîå ïîä÷åðêèâàíèå";
+ Text[ dutch ] = "Vet onderstreept";
+ Text[ french ] = "Soulignage gras";
+ Text[ spanish ] = "Subrayado negrita";
+ Text[ italian ] = "Sottolineato grassetto";
+ Text[ danish ] = "Understreget (fed)";
+ Text[ swedish ] = "Fet understruken";
+ Text[ polish ] = "Podkreœlenie pogrubione";
+ Text[ portuguese_brazilian ] = "Bold underline";
+ Text[ japanese ] = "‘¾‚¢‰ºü";
+ Text[ chinese_simplified ] = "´ÖÐÍÏ»®Ïß";
+ Text[ chinese_traditional ] = "²Ê«¬¤U¹º½u";
+ Text[ arabic ] = "ÎØ ÊÍÊí ÚÑíÖ";
+ Text[ greek ] = "ÕðïãñÜììéóç (¸íôïíá)";
+ Text[ korean ] = "ÁøÇÏ°Ô ¹ØÁÙ";
+ Text[ turkish ] = "Altý çizili (kalýn)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_BOLDDOTTED
+{
+ Text = "Fett gepunktet unterstrichen" ;
+ Text [ English ] = "Bold dotted underline" ;
+ Text[ english_us ] = "Dotted underline (Bold)";
+ Text[ portuguese ] = "Sublinhado negrito pontilhado";
+ Text[ russian ] = "Æèðíîå òî÷å÷íîå ïîä÷åðêèâàíèå";
+ Text[ dutch ] = "Vet gestippelde onderstreping";
+ Text[ french ] = "Soulignage pointillé gras";
+ Text[ spanish ] = "Subrayado negrita punteado";
+ Text[ italian ] = "Sottolineato grassetto punteggiato";
+ Text[ danish ] = "Understreget (fed punkteret)";
+ Text[ swedish ] = "Fet prickad understruken";
+ Text[ polish ] = "Podkreœlenie w kropki pogrubione";
+ Text[ portuguese_brazilian ] = "Bold dotted underline";
+ Text[ japanese ] = "‘¾‚¢“_‰ºü";
+ Text[ chinese_simplified ] = "´ÖÐÍÏ»®µãÏß";
+ Text[ chinese_traditional ] = "²Ê«¬¤U¹ºÂI½u";
+ Text[ arabic ] = "ÎØ ÊÍÊí ãäÞØ ÚÑíÖ";
+ Text[ greek ] = "ÕðïãñÜììéóç: ÄéÜóôéêôï, Ýíôïíá";
+ Text[ korean ] = "ÁøÇÑ Á¡¼± ¹ØÁÙ";
+ Text[ turkish ] = "Noktalarla altý çizili (kalýn)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_BOLDDASH
+{
+ Text = "Unterstrichen (Strich fett)" ;
+ Text [ English ] = "Underline (Bold dash)" ;
+ Text[ english_us ] = "Underline (Dash bold)";
+ Text[ portuguese ] = "Sublinhado (traço negrito)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (æèðíûé øòðèõ)";
+ Text[ dutch ] = "Onderstreept (vet streepje)";
+ Text[ french ] = "Soulignage (tirets gras)";
+ Text[ spanish ] = "Subrayado (trazo negrita)";
+ Text[ italian ] = "Sottolineato (tratto grassetto)";
+ Text[ danish ] = "Understreget (streg fed)";
+ Text[ swedish ] = "Understruken (streck fet)";
+ Text[ polish ] = "Podkreœlenie (Gruba kreska)";
+ Text[ portuguese_brazilian ] = "Underline (Bold dash)";
+ Text[ japanese ] = "‰ºü(‘¾‚¢”jü)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(´ÖÐÍ»®Ïß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(²Ê«¬¹º½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí ÚÑíÖ (ÔÑØÉ)";
+ Text[ greek ] = "ÕðïãñÜììéóç (¸íôïíç ðáýëá)";
+ Text[ korean ] = "¹ØÁÙ(ÁøÇÑ ´ë½Ã)";
+ Text[ turkish ] = "Altý çizili (kalýn çizgi)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_BOLDLONGDASH
+{
+ Text = "Unterstrichen (Strich fett lang)" ;
+ Text [ English ] = "Underline (Bold long dash)" ;
+ Text[ english_us ] = "Underline (long dash, bold)";
+ Text[ portuguese ] = "Sublinhado (traço longo negrito)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (æèðíûé äëèííûé øòðèõ)";
+ Text[ dutch ] = "Onderstreept (vet lang streepje)";
+ Text[ french ] = "Soulignage (tirets longs gras)";
+ Text[ spanish ] = "Subrayado (trazo negrita largo)";
+ Text[ italian ] = "Sottolineato (tratto grassetto lungo)";
+ Text[ danish ] = "Undertreget (streg fed lang)";
+ Text[ swedish ] = "Understruken (streck fet lång)";
+ Text[ polish ] = "Podkreœlenie (Gruby d³ugi ³¹cznik)";
+ Text[ portuguese_brazilian ] = "Underline (Bold long dash)";
+ Text[ japanese ] = "‰ºü(‘¾‚­‚Ä’·‚¢”jü)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(´ÖÐͳ¤»®Ïß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(²Ê«¬ªø¹º½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí ÚÑíÖ (ÔÑØÉ ØæíáÉ)";
+ Text[ greek ] = "ÕðïãñÜììéóç (ÌáêñÜ ðáýëá, Ýíôïíá)";
+ Text[ korean ] = "¹ØÁÙ (ÁøÇÏ°Ô ±ä ´ë½Ã)";
+ Text[ turkish ] = "Altý çizili (uzun kalýn çizgi)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_BOLDDASHDOT
+{
+ Text = "Unterstrichen (Punkt Strich fett)" ;
+ Text [ English ] = "Underline (Bold dot dash)" ;
+ Text[ english_us ] = "Underline (dot dash, bold)";
+ Text[ portuguese ] = "Sublinhado (ponto traço negrito)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (æèðíûå òî÷êà øòðèõ)";
+ Text[ dutch ] = "Onderstreept (punt streepje vet)";
+ Text[ french ] = "Soulignage (point tiret gras)";
+ Text[ spanish ] = "Subrayado (punto trazo negrita)";
+ Text[ italian ] = "Sottolineato (punto tratto grassetto)";
+ Text[ danish ] = "Understreget (prik streg fed)";
+ Text[ swedish ] = "Understruken (punkt streck fet)";
+ Text[ polish ] = "Podkreœlenie (Kropka-Gruba kreska)";
+ Text[ portuguese_brazilian ] = "Underline (Bold dot dash)";
+ Text[ japanese ] = "‰ºü(‘¾‚¢ˆê“_½üj";
+ Text[ chinese_simplified ] = "Ï»®Ïß(´ÖÐ͵㻮Ïß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(²Ê«¬ÂI¹º½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí ÚÑíÖ (äÞØÉ ÔÑØÉ)";
+ Text[ greek ] = "ÕðïãñÜììéóç (Ôåëåßá-Ðáýëá, Ýíôïíá)";
+ Text[ korean ] = "¹ØÁÙ (ÁøÇÏ°Ô Á¡ ´ë½Ã)";
+ Text[ turkish ] = "Altý çizili (kalýn nokta çizgi)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_BOLDDASHDOTDOT
+{
+ Text = "Unterstrichen (Punkt Punkt Strich fett)" ;
+ Text [ English ] = "Underline (Bold dot dot dash)" ;
+ Text[ english_us ] = "Underline (dot dot dash, bold)";
+ Text[ portuguese ] = "Sublinhado (ponto ponto traço negrito)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (æèðíûå òî÷êà òî÷êà øòðèõ)";
+ Text[ dutch ] = "Onderstreept (punt punt streepje vet)";
+ Text[ french ] = "Soulignage (point point tiret gras)";
+ Text[ spanish ] = "Subrayado (punto punto trazo negrita)";
+ Text[ italian ] = "Sottolineato (punto punto tratto grassetto)";
+ Text[ danish ] = "Understreget (prik prik streg fed)";
+ Text[ swedish ] = "Understruken (punkt punkt streck fet)";
+ Text[ polish ] = "Podkreœlenie (Kropka-Kropka-Gruba kreska)";
+ Text[ portuguese_brazilian ] = "Underline (Bold dot dot dash)";
+ Text[ japanese ] = "‰ºü(‘¾‚¢“ñ“_½ü)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(´ÖÐ͵ãµã»®Ïß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(²Ê«¬ÂIÂI¹º½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí ÚÑíÖ (äÞØÉ äÞØÉ ÔÑØÉ)";
+ Text[ greek ] = "ÕðïãñÜììéóç (Ôåëåßá-Ôåëåßá-Ðáýëá, Ýíôïíá)";
+ Text[ korean ] = "¹ØÁÙ (ÁøÇÏ°Ô Á¡ Á¡ ´ë½Ã)";
+ Text[ turkish ] = "Altý çizili (kalýn nokta nokta çizgi)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_UL_BOLDWAVE
+{
+ Text = "Unterstrichen (Welle fett)" ;
+ Text [ English ] = "Underline (Bold wave)" ;
+ Text[ english_us ] = "Underline (wave, bold)";
+ Text[ portuguese ] = "Sublinhado (ondulação negrito)";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå (æèðíàÿ âîëíà)";
+ Text[ dutch ] = "Onderstreept (golf vet)";
+ Text[ french ] = "Soulignage (ondulation grasse)";
+ Text[ spanish ] = "Subrayado (ondulado negrita)";
+ Text[ italian ] = "Sottolineato (linea ondulata grassetto)";
+ Text[ danish ] = "Understreget (bølge fed)";
+ Text[ swedish ] = "Understruken (våg fet)";
+ Text[ polish ] = "Podkreœlenie (Gruba fala)";
+ Text[ portuguese_brazilian ] = "Underline (Bold wave)";
+ Text[ japanese ] = "‰ºü(‘¾‚¢”gü)";
+ Text[ chinese_simplified ] = "Ï»®Ïß(´ÖÐͲ¨ÀËÏß)";
+ Text[ chinese_traditional ] = "¤U¹º½u(²Ê«¬ªi®ö½u)";
+ Text[ arabic ] = "ÎØ ÊÍÊí ÚÑíÖ (ãæÌÉ)";
+ Text[ greek ] = "ÕðïãñÜììéóç (¸íôïíç êõìáôéóôÞ ðáýëá)";
+ Text[ korean ] = "¹ØÁÙ (ÁøÇÑ Æļ±)";
+ Text[ turkish ] = "Altý çizili (kalýn dalga)";
+ Text[ language_user1 ] = " ";
+};
+ // enum FontStrikeout ----------------------------------------------------
+String RID_SVXITEMS_STRIKEOUT_NONE
+{
+ Text = "Nicht durchgestrichen" ;
+ Text [ English ] = "No strike through" ;
+ Text [ norwegian ] = "Ingen gjennomstrekning" ;
+ Text [ italian ] = "Non barrato" ;
+ Text [ portuguese_brazilian ] = "Sem riscado" ;
+ Text [ portuguese ] = "Não rasurado" ;
+ Text [ finnish ] = "Ei yliviivausta" ;
+ Text [ danish ] = "Ikke gennemstreget" ;
+ Text [ french ] = "Non barré" ;
+ Text [ swedish ] = "Inte genomstruken" ;
+ Text [ dutch ] = "Niet doorhalen" ;
+ Text [ spanish ] = "Sin tachar" ;
+ Text [ english_us ] = "No strikethrough" ;
+ Text[ chinese_simplified ] = "²»ÓÃɾ³ýÏß";
+ Text[ russian ] = "Áåç çà÷åðêèâàíèÿ";
+ Text[ polish ] = "Nie przekreœlony";
+ Text[ japanese ] = "Žæ‚èÁ‚µü‚È‚µ";
+ Text[ chinese_traditional ] = "¤£¥Î§R°£½u";
+ Text[ arabic ] = "ÛíÑ ãÔØæÈ";
+ Text[ greek ] = "×ùñßò äéáãñÜììéóç";
+ Text[ korean ] = "Ãë¼Ò¼± ¾øÀ½";
+ Text[ turkish ] = "Üstü çizili deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_STRIKEOUT_SINGLE
+{
+ Text = "Einfach durchgestrichen" ;
+ Text [ English ] = "Single strike through" ;
+ Text [ norwegian ] = "Enkel gjennomstrekning" ;
+ Text [ italian ] = "Barra singola" ;
+ Text [ portuguese_brazilian ] = "Riscado simples" ;
+ Text [ portuguese ] = "Rasurado simples" ;
+ Text [ finnish ] = "Yli yliviivaus" ;
+ Text [ danish ] = "Enkelt gennemstreget" ;
+ Text [ french ] = "Barré simple" ;
+ Text [ swedish ] = "Enkelt genomstruken" ;
+ Text [ dutch ] = "Enkel doorhalen" ;
+ Text [ spanish ] = "Tachado sencillo" ;
+ Text [ english_us ] = "Single strikethrough" ;
+ Text[ chinese_simplified ] = "µ¥É¾³ýÏß";
+ Text[ russian ] = "Îäèíàðíîå çà÷åðêèâàíèå";
+ Text[ polish ] = "Pojedyncze podkreœlenie";
+ Text[ japanese ] = "Žæ‚èÁ‚µü";
+ Text[ chinese_traditional ] = "³æ§R°£½u";
+ Text[ arabic ] = "ãÔØæÈ ãÑÉ æÇÍÏÉ";
+ Text[ greek ] = "ÁðëÞ äéáãñÜììéóç";
+ Text[ korean ] = "´ÜÀÏ Ãë¼Ò¼±";
+ Text[ turkish ] = "Tek çizgiyle üstü çizili";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_STRIKEOUT_DOUBLE
+{
+ Text = "Doppelt durchgestrichen" ;
+ Text [ English ] = "Double strike through" ;
+ Text [ norwegian ] = "Dobbel gjennomstrekning" ;
+ Text [ italian ] = "Barrato doppio" ;
+ Text [ portuguese_brazilian ] = "Riscado duplo" ;
+ Text [ portuguese ] = "Rasurado duplo" ;
+ Text [ finnish ] = "Kaksoisyliviivaus" ;
+ Text [ danish ] = "Dobbelt gennemstreget" ;
+ Text [ french ] = "Barré double" ;
+ Text [ swedish ] = "Dubbelt genomstruken" ;
+ Text [ dutch ] = "Dubbel doorhalen" ;
+ Text [ spanish ] = "Tachado doble" ;
+ Text [ english_us ] = "Double strikethrough" ;
+ Text[ chinese_simplified ] = "˫ɾ³ýÏß";
+ Text[ russian ] = "Äâîéíîå çà÷åðêèâàíèå";
+ Text[ polish ] = "Podwójne przekreœlenie";
+ Text[ japanese ] = "“ñdŽæ‚èÁ‚µü";
+ Text[ chinese_traditional ] = "Âù§R°£½u";
+ Text[ arabic ] = "ãÔØæÈ ÈÎØ ãÒÏæÌ";
+ Text[ greek ] = "ÄéðëÞ äéáãñÜììéóç";
+ Text[ korean ] = "ÀÌÁß Ãë¼Ò¼±";
+ Text[ turkish ] = "Çift çizgiyle üstü çizili";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_STRIKEOUT_BOLD
+{
+ Text = "Fett durchgestrichen" ;
+ Text [ English ] = "Bold strike through" ;
+ Text[ english_us ] = "Bold strikethrough";
+ Text[ portuguese ] = "Rasurado negrito";
+ Text[ russian ] = "Æèðíîå çà÷åðêèâàíèå";
+ Text[ dutch ] = "Vet doorhalen";
+ Text[ french ] = "Barré gras";
+ Text[ spanish ] = "Tachado negrita";
+ Text[ italian ] = "Barrato grassetto";
+ Text[ danish ] = "Fed gennemstreget";
+ Text[ swedish ] = "Fet genomstruken";
+ Text[ polish ] = "Przekreœlenie pogrubione";
+ Text[ portuguese_brazilian ] = "Bold strike through";
+ Text[ japanese ] = "‘¾‚¢Žæ‚èÁ‚µü";
+ Text[ chinese_simplified ] = "´ÖÐÍɾ³ýÏß";
+ Text[ chinese_traditional ] = "²Ê«¬§R°£½u";
+ Text[ arabic ] = "ÔØÈ ÈÎØ ÚÑíÖ";
+ Text[ greek ] = "¸íôïíç äéáãñÜììéóç";
+ Text[ korean ] = "ÁøÇÑ Ãë¼Ò¼±";
+ Text[ turkish ] = "Kalýn çizgiyle üstü çizili";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_STRIKEOUT_SLASH
+{
+ Text = "Durchgestrichen mit /" ;
+ Text [ English ] = "Strike through with /" ;
+ Text[ english_us ] = "Strike through with slash";
+ Text[ portuguese ] = "Rasurado com /";
+ Text[ russian ] = "Çà÷åðêèâàíèå ñ /";
+ Text[ dutch ] = "Doorhalen met /";
+ Text[ french ] = "Barré avec /";
+ Text[ spanish ] = "Tachado con /";
+ Text[ italian ] = "Barrato con /";
+ Text[ danish ] = "Gennemstreget med /";
+ Text[ swedish ] = "Genomstruken med /";
+ Text[ polish ] = "Przekreœlenie przez /";
+ Text[ portuguese_brazilian ] = "Strike through with /";
+ Text[ japanese ] = "/‚ÅŽæ‚èÁ‚µ";
+ Text[ chinese_simplified ] = "Óà / ´úÌæɾ³ýÏß";
+ Text[ chinese_traditional ] = "¥Î / ¥N´À§R°£½u";
+ Text[ arabic ] = "ãÔØæÈ ÈÔÑØ ãÇÆáÉ";
+ Text[ greek ] = "ÄéáãñáöÞ ìå /";
+ Text[ korean ] = "/°¡ ÀÖ´Â Ãë¼Ò¼±";
+ Text[ turkish ] = "/ ile üstü çizili";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_STRIKEOUT_X
+{
+ Text = "Durchgestrichen mit X" ;
+ Text [ English ] = "Strike through with X" ;
+ Text[ english_us ] = "Strike through with Xes";
+ Text[ portuguese ] = "Rasurado com X";
+ Text[ russian ] = "Çà÷åðêèâàíèå ñ X";
+ Text[ dutch ] = "Doorhalen met X";
+ Text[ french ] = "Barré avec X";
+ Text[ spanish ] = "Tachado con X";
+ Text[ italian ] = "Barrato con X";
+ Text[ danish ] = "Gennemstreget med X";
+ Text[ swedish ] = "Genomstruken med X";
+ Text[ polish ] = "Przekreœlenie przez X";
+ Text[ portuguese_brazilian ] = "Strike through with X";
+ Text[ japanese ] = "X‚ÅŽæ‚èÁ‚µ";
+ Text[ chinese_simplified ] = "Óà X ´úÌæɾ³ýÏß";
+ Text[ chinese_traditional ] = "¥Î X ´À¥N§R°£½u";
+ Text[ arabic ] = "ãÔØæÈ ÈÚáÇãÇÊ X";
+ Text[ greek ] = "ÄéáãñÜììéóç ìå ×";
+ Text[ korean ] = "X°¡ ÀÖ´Â Ãë¼Ò¼±";
+ Text[ turkish ] = "X ile üstü çizili";
+ Text[ language_user1 ] = " ";
+};
+ // enum CASEMAP ----------------------------------------------------------
+String RID_SVXITEMS_CASEMAP_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";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_CASEMAP_VERSALIEN
+{
+ Text = "Versalien" ;
+ Text [ English ] = "All caps" ;
+ Text [ norwegian ] = "Alle bokstaver" ;
+ Text [ italian ] = "Tutto maiuscole" ;
+ Text [ portuguese_brazilian ] = "Tudo em maiúsculas" ;
+ Text [ portuguese ] = "Maiúsculas" ;
+ Text [ finnish ] = "Isoin kirjaimin" ;
+ Text [ danish ] = "Store bogstaver" ;
+ Text [ french ] = "Majuscules" ;
+ Text [ swedish ] = "Versaler" ;
+ Text [ dutch ] = "Hoofdletters" ;
+ Text [ spanish ] = "Mayúsculas" ;
+ Text [ english_us ] = "Caps" ;
+ Text[ chinese_simplified ] = "´óд×Öĸ";
+ Text[ russian ] = "Ïðîïèñíûå";
+ Text[ polish ] = "Wersaliki";
+ Text[ japanese ] = "‘啶Žš";
+ Text[ chinese_traditional ] = "¤j¼g¦r¥À";
+ Text[ arabic ] = "ÃÍÑÝ ßÈíÑÉ";
+ Text[ greek ] = "Êåöáëáßá";
+ Text[ korean ] = "´ë¹®ÀÚ";
+ Text[ turkish ] = "Büyük harflerle";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_CASEMAP_GEMEINE
+{
+ Text = "Gemeine" ;
+ Text [ English ] = "Lower case" ;
+ Text [ norwegian ] = "Liten skrift" ;
+ Text [ italian ] = "Minuscolo" ;
+ Text [ portuguese_brazilian ] = "Caixa baixa" ;
+ Text [ portuguese ] = "Minúsculas" ;
+ Text [ finnish ] = "Pienin kirjaimin" ;
+ Text [ danish ] = "Små bogstaver" ;
+ Text [ french ] = "Minuscules" ;
+ Text [ swedish ] = "Gemener" ;
+ Text [ dutch ] = "Kleine letters" ;
+ Text [ spanish ] = "Minúsculas" ;
+ Text [ english_us ] = "Lower case" ;
+ Text[ chinese_simplified ] = "Сд";
+ Text[ russian ] = "Ñòðî÷íûå";
+ Text[ polish ] = "Ma³e litery";
+ Text[ japanese ] = "¬•¶Žš";
+ Text[ chinese_traditional ] = "¤p¼g";
+ Text[ arabic ] = "ÃÍÑÝ ÕÛíÑÉ";
+ Text[ greek ] = "ÐåæÜ";
+ Text[ korean ] = "¾Æ·¡ ´ë/¼Ò¹®ÀÚ";
+ Text[ turkish ] = "Küçük harflerle";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_CASEMAP_TITEL
+{
+ Text = "Titelschrift" ;
+ Text [ English ] = "Title" ;
+ Text [ norwegian ] = "Tittel" ;
+ Text [ italian ] = "Titolo" ;
+ Text [ portuguese_brazilian ] = "Título" ;
+ Text [ portuguese ] = "Título" ;
+ Text [ finnish ] = "Otsikko" ;
+ Text [ danish ] = "Titelskrift" ;
+ Text [ french ] = "Caractères du titre" ;
+ Text [ swedish ] = "Titelteckensnitt" ;
+ Text [ dutch ] = "Titel" ;
+ Text [ spanish ] = "Caracteres del título" ;
+ Text [ english_us ] = "Title" ;
+ Text[ chinese_simplified ] = "±êÌâ";
+ Text[ russian ] = "Çàãëàâíûé øðèôò";
+ Text[ polish ] = "Czcionka tytu³owa";
+ Text[ japanese ] = "À²ÄÙ•¶Žš";
+ Text[ chinese_traditional ] = "¼ÐÃD";
+ Text[ arabic ] = "ÎØ ÇáÚäæÇä";
+ Text[ greek ] = "ÃñáììáôïóåéñÜ ôßôëïõ";
+ Text[ korean ] = "Á¦¸ñ";
+ Text[ turkish ] = "Baþlýk";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_CASEMAP_KAPITAELCHEN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Kapitälchen : Kapitõlchen */
+ Text = "Kapitälchen" ;
+ Text [ English ] = "Small caps" ;
+ Text [ norwegian ] = "Små bokstaver" ;
+ Text [ italian ] = "Maiuscoletto" ;
+ Text [ portuguese_brazilian ] = "Versaletes" ;
+ Text [ portuguese ] = "Versaletes" ;
+ Text [ finnish ] = "Kapiteelein" ;
+ Text [ danish ] = "Kapitæler" ;
+ Text [ french ] = "Petites majuscules" ;
+ Text [ swedish ] = "Små kapitäler" ;
+ Text [ dutch ] = "Klein kapitaal" ;
+ Text [ spanish ] = "Versalitas" ;
+ Text [ english_us ] = "Small caps" ;
+ Text[ chinese_simplified ] = "СÐÍ´óд×Öĸ";
+ Text[ russian ] = "Ìàëûå ïðîïèñíûå";
+ Text[ polish ] = "Kapitaliki";
+ Text[ japanese ] = "¬Œ^‘啶Žš";
+ Text[ chinese_traditional ] = "¤p«¬¤j¼g¦r¥À";
+ Text[ arabic ] = "ÍÑÝ ÈÏÇíÉ ÃßÈÑ";
+ Text[ greek ] = "ÌéêñÜ êåöáëáßá";
+ Text[ korean ] = "ÀÛÀº ´ë¹®ÀÚ";
+ Text[ turkish ] = "Küçük büyük harflerle";
+ Text[ language_user1 ] = " ";
+};
+ // enum ESCAPEMENT -------------------------------------------------------
+String RID_SVXITEMS_ESCAPEMENT_OFF
+{
+ Text = "Normalstellung" ;
+ Text [ English ] = "Normalposition" ;
+ Text [ norwegian ] = "Normalposisjon" ;
+ Text [ italian ] = "Normale" ;
+ Text [ portuguese_brazilian ] = "Normalposition" ;
+ Text [ portuguese ] = "Posição padrão" ;
+ Text [ english_us ] = "Normal position" ;
+ Text [ finnish ] = "Normalposition" ;
+ Text [ danish ] = "Normal position" ;
+ Text [ french ] = "Position normale" ;
+ Text [ swedish ] = "Normalposition" ;
+ Text [ dutch ] = "Normale positie" ;
+ Text [ spanish ] = "Posición normal" ;
+ Text[ chinese_simplified ] = "ÆÕͨλÖÃ";
+ Text[ russian ] = "Îáû÷íîå ïîëîæåíèå";
+ Text[ polish ] = "Normalna pozycja";
+ Text[ japanese ] = "’ÊíˆÊ’u";
+ Text[ chinese_traditional ] = "´¶³q¦ì¸m";
+ Text[ arabic ] = "æÖÚ ÚÇÏí";
+ Text[ greek ] = "ÊáíïíéêÞ èÝóç";
+ Text[ korean ] = "º¸Åë À§Ä¡";
+ Text[ turkish ] = "Normal duruþ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ESCAPEMENT_SUPER
+{
+ Text = "Hochgestellt " ;
+ Text [ English ] = "Superposition " ;
+ Text [ norwegian ] = "Superposition " ;
+ Text [ italian ] = "Apice " ;
+ Text [ portuguese_brazilian ] = "Superposition " ;
+ Text [ portuguese ] = "Superior à linha " ;
+ Text [ english_us ] = "Superscript " ;
+ Text [ finnish ] = "Superposition " ;
+ Text [ danish ] = "Hævet " ;
+ Text [ french ] = "Exposant " ;
+ Text [ swedish ] = "Upphöjt " ;
+ Text [ dutch ] = "Superscript " ;
+ Text [ spanish ] = "Superíndice " ;
+ Text[ chinese_simplified ] = "Éϱê ";
+ Text[ russian ] = "Âåðõíèé èíäåêñ ";
+ Text[ polish ] = "Indeks górny ";
+ Text[ japanese ] = "ã•t‚« ";
+ Text[ chinese_traditional ] = "¤W¼Ð ";
+ Text[ arabic ] = "ãÑÊÝÚ ";
+ Text[ greek ] = "ÅêèÝôçò ";
+ Text[ korean ] = "À§ ÷ÀÚ ";
+ Text[ turkish ] = "Üst simge ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ESCAPEMENT_SUB
+{
+ Text = "Tiefgestellt " ;
+ Text [ English ] = "Subposition " ;
+ Text [ norwegian ] = "Subposition " ;
+ Text [ italian ] = "Pedice " ;
+ Text [ portuguese_brazilian ] = "Subposition " ;
+ Text [ portuguese ] = "Inferior à linha " ;
+ Text [ english_us ] = "Subscript " ;
+ Text [ finnish ] = "Subposition " ;
+ Text [ danish ] = "Sænket " ;
+ Text [ french ] = "Indice " ;
+ Text [ swedish ] = "Nedsänkt " ;
+ Text [ dutch ] = "Subscript " ;
+ Text [ spanish ] = "Subíndice " ;
+ Text[ chinese_simplified ] = "챐 ";
+ Text[ russian ] = "Íèæíèé èíäåêñ ";
+ Text[ polish ] = "Indeks dolny ";
+ Text[ japanese ] = "‰º•t‚« ";
+ Text[ chinese_traditional ] = "¤U¼Ð ";
+ Text[ arabic ] = "ãäÎÝÖ ";
+ Text[ greek ] = "Äåßêôçò ";
+ Text[ korean ] = "¾Æ·¡ ÷ÀÚ ";
+ Text[ turkish ] = "Alt simge ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ESCAPEMENT_AUTO
+{
+ Text = "automatisch" ;
+ Text [ ENGLISH ] = "automatic" ;
+ Text [ portuguese ] = "automaticamente" ;
+ Text [ english_us ] = "automatic" ;
+ Text [ portuguese_brazilian ] = "automatisch" ;
+ Text [ swedish ] = "automatiskt" ;
+ Text [ danish ] = "automatisk" ;
+ Text [ italian ] = "automatico" ;
+ Text [ spanish ] = "automático" ;
+ Text [ french ] = "automatique" ;
+ Text [ dutch ] = "automatisch" ;
+ 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 ] = " ";
+};
+ // enum SvxAdjust -----------------------------------------------------------
+String RID_SVXITEMS_ADJUST_LEFT
+{
+ Text = "Ausrichtung nach links" ;
+ Text [ English ] = "Adjust left" ;
+ Text [ norwegian ] = "Juster til venstre" ;
+ Text [ italian ] = "Allinea a sinistra" ;
+ Text [ portuguese_brazilian ] = "Ajustar o esquerda" ;
+ Text [ portuguese ] = "Ajustar à esquerda" ;
+ Text [ finnish ] = "Tasaa vasemmalle" ;
+ Text [ danish ] = "Venstrejusteret" ;
+ Text [ french ] = "Alignement à gauche" ;
+ Text [ swedish ] = "Vänsterjustera" ;
+ Text [ dutch ] = "Op links uitlijnen" ;
+ Text [ spanish ] = "Alinear a la izquierda" ;
+ Text [ english_us ] = "Align left" ;
+ Text[ chinese_simplified ] = "Ïò×ó¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå âëåâî";
+ Text[ polish ] = "Wyrównanie do lewej";
+ Text[ japanese ] = "¶‘µ‚¦";
+ Text[ chinese_traditional ] = "¦V¥ª¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ Åáì ÇáíÓÇÑ";
+ Text[ greek ] = "Óôïß÷éóç ðñïò ôá áñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ ¸ÂÃã";
+ Text[ turkish ] = "Sola hizala";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ADJUST_RIGHT
+{
+ Text = "Ausrichtung nach rechts" ;
+ Text [ English ] = "Adjust right" ;
+ Text [ norwegian ] = "Juster til høyre " ;
+ Text [ italian ] = "Allinea a destra" ;
+ Text [ portuguese_brazilian ] = "Ajustar o direita" ;
+ Text [ portuguese ] = "Ajustar à direita" ;
+ Text [ finnish ] = "Tasaa oikealle" ;
+ Text [ danish ] = "Højrejusteret" ;
+ Text [ french ] = "Alignement à droite" ;
+ Text [ swedish ] = "Högerjustera" ;
+ Text [ dutch ] = "Op rechts uitlijnen" ;
+ Text [ spanish ] = "Alinear a la derecha" ;
+ Text [ english_us ] = "Align right" ;
+ Text[ chinese_simplified ] = "ÏòÓÒ¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå âïðàâî";
+ Text[ polish ] = "Wyrównanie do prawej";
+ Text[ japanese ] = "‰E‘µ‚¦";
+ Text[ chinese_traditional ] = "¦V¥k¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ Åáì Çáíãíä";
+ Text[ greek ] = "Óôïß÷éóç ðñïò ôá äåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ ¸ÂÃã";
+ Text[ turkish ] = "Saða hizala";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ADJUST_BLOCK
+{
+ Text = "Blockausrichtung" ;
+ Text [ English ] = "Block" ;
+ Text [ norwegian ] = "Datablokk " ;
+ Text [ italian ] = "Giustificato" ;
+ Text [ portuguese_brazilian ] = "Bloco" ;
+ Text [ portuguese ] = "Justificado" ;
+ Text [ finnish ] = "Lohko" ;
+ Text [ danish ] = "Lige margener" ;
+ Text [ french ] = "Alignement justifié" ;
+ Text [ swedish ] = "Blockjustering" ;
+ Text [ dutch ] = "Uitvullen" ;
+ Text [ spanish ] = "Justificado" ;
+ Text [ english_us ] = "Justify" ;
+ Text[ chinese_simplified ] = "×óÓÒ¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå ïî øèðèíå";
+ Text[ polish ] = "Wyjustowanie";
+ Text[ japanese ] = "‹Ï“™Š„•t";
+ Text[ chinese_traditional ] = "¥ª¥k¹ï»ô";
+ Text[ arabic ] = "ÖÈØ";
+ Text[ greek ] = "ÐëÞñçò óôïß÷éóç";
+ Text[ korean ] = "¾çÂÊ ¸ÂÃã";
+ Text[ turkish ] = "Ýki yana yasla";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ADJUST_CENTER
+{
+ Text = "Zentriert" ;
+ Text [ English ] = "Center" ;
+ Text [ norwegian ] = "Midtstill " ;
+ Text [ italian ] = "Centrato" ;
+ Text [ portuguese_brazilian ] = "Centralizar" ;
+ Text [ portuguese ] = "Centrado" ;
+ Text [ finnish ] = "Keskitä pystysuunnassa" ;
+ Text [ danish ] = "Centreret" ;
+ Text [ french ] = "Centré" ;
+ Text [ swedish ] = "Centrerat" ;
+ Text [ dutch ] = "Gecentreerd" ;
+ Text [ spanish ] = "Centrado" ;
+ Text [ english_us ] = "Centered" ;
+ Text[ chinese_simplified ] = "¾ÓÖÐ";
+ Text[ russian ] = "Ïî öåíòðó";
+ Text[ polish ] = "Wyœrodkowany";
+ Text[ japanese ] = "’†‰›‘µ‚¦";
+ Text[ chinese_traditional ] = "¸m¤¤";
+ Text[ arabic ] = "ÊæÓíØ";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá";
+ Text[ korean ] = "°¡¿îµ¥ ¸ÂÃã";
+ Text[ turkish ] = "Ortala";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ADJUST_BLOCKLINE
+{
+ Text = "Blockausrichtung" ;
+ Text [ English ] = "Blockline" ;
+ Text [ norwegian ] = "Datablokklinje" ;
+ Text [ italian ] = "Giustificato" ;
+ Text [ portuguese_brazilian ] = "Linha do bloco" ;
+ Text [ portuguese ] = "Justificado" ;
+ Text [ finnish ] = "Lohkoviiva" ;
+ Text [ danish ] = "Lige margener" ;
+ Text [ french ] = "Alignement justifié" ;
+ Text [ swedish ] = "Blockjustering" ;
+ Text [ dutch ] = "Uitvullen" ;
+ Text [ spanish ] = "Justificado" ;
+ Text [ english_us ] = "Justify" ;
+ Text[ chinese_simplified ] = "×óÓÒ¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå ïî øèðèíå";
+ Text[ polish ] = "Wyjustowanie";
+ Text[ japanese ] = "‹Ï“™Š„•t";
+ Text[ chinese_traditional ] = "¥ª¥k¹ï»ô";
+ Text[ arabic ] = "ÖÈØ";
+ Text[ greek ] = "ÐëÞñçò óôïß÷éóç";
+ Text[ korean ] = "¾çÂÊ ¸ÂÃã";
+ Text[ turkish ] = "Ýki yana yasla";
+ Text[ language_user1 ] = " ";
+};
+ // DB-Server-Connect --------------------------------------------------------
+String RID_SVXITEMS_DBTYPE_ODBC
+{
+ Text = "ODBC" ;
+};
+String RID_SVXITEMS_DBTYPE_WATCOM
+{
+ Text = "Watcom SQL" ;
+};
+String RID_SVXITEMS_DBTYPE_DB2
+{
+ Text = "DB2" ;
+};
+String RID_SVXITEMS_DBTYPE_DBF
+{
+ Text = "dBase" ;
+};
+String RID_SVXITEMS_DBTYPE_FLAT
+{
+ Text = "Text" ;
+ Text [ English ] = "Text" ;
+ Text [ norwegian ] = "Text" ;
+ Text [ italian ] = "Testo" ;
+ Text [ portuguese_brazilian ] = "Texto" ;
+ Text [ portuguese ] = "Texto" ;
+ Text [ french ] = "Texte" ;
+ Text [ dutch ] = "Tekst" ;
+ Text [ spanish ] = "Texto" ;
+ Text [ danish ] = "Tekst" ;
+ Text [ swedish ] = "Text" ;
+ Text [ finnish ] = "Text" ;
+ Text [ english_us ] = "Text" ;
+ 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 ] = " ";
+};
+ // enum SvxTabAdjust --------------------------------------------------------
+String RID_SVXITEMS_TAB_DECIMAL_CHAR
+{
+ Text = "Dezimalzeichen:" ;
+ Text [ English ] = "Decimal-Char:" ;
+ Text [ norwegian ] = "Desimal-Tegn:" ;
+ Text [ italian ] = "Carattere decimale:" ;
+ Text [ portuguese_brazilian ] = "Caracter-Decimal:" ;
+ Text [ portuguese ] = "Carácter decimal:" ;
+ Text [ finnish ] = "Desimaalimerkki" ;
+ Text [ danish ] = "Decimaltegn:" ;
+ Text [ french ] = "Car. décimal :" ;
+ Text [ swedish ] = "Decimaltecken:" ;
+ Text [ dutch ] = "Decimaalteken:" ;
+ Text [ spanish ] = "Carácter decimal:" ;
+ Text [ english_us ] = "Decimal Symbol:" ;
+ Text[ chinese_simplified ] = "СÊýµã·ûºÅ£º";
+ Text[ russian ] = "Äåñÿòè÷íûå çíàêè:";
+ Text[ polish ] = "Znak dziesiêtny:";
+ Text[ japanese ] = "¬”“_:";
+ Text[ chinese_traditional ] = "¤p¼ÆÂI²Å¸¹¡G";
+ Text[ arabic ] = "ÚáÇãÉ ÚÔÑíÉ:";
+ Text[ greek ] = "Óýìâïëï äåêáäéêþí:";
+ Text[ korean ] = "¼Ò¼öÁ¡ ±âÈ£:";
+ Text[ turkish ] = "Ondalýk ayýrýcýsý:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_TAB_FILL_CHAR
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Füllzeichen: : F³llzeichen: */
+ Text = "Füllzeichen:" ;
+ Text [ English ] = "Fill-Char:" ;
+ Text [ norwegian ] = "Fyll-Tegn:" ;
+ Text [ italian ] = "Carattere di riempimento:" ;
+ Text [ portuguese_brazilian ] = "Preencher-Caracter:" ;
+ Text [ portuguese ] = "Carácter de preenchim.:" ;
+ Text [ finnish ] = "Täytemerkki:" ;
+ Text [ danish ] = "Fyldtegn:" ;
+ Text [ french ] = "Caractères de remplissage :" ;
+ Text [ swedish ] = "Utfyllnadstecken:" ;
+ Text [ dutch ] = "Opvulteken:" ;
+ Text [ spanish ] = "Carácter de relleno:" ;
+ Text [ english_us ] = "Leader:" ;
+ Text[ chinese_simplified ] = "Ç°µ¼×Ö·û£º";
+ Text[ russian ] = "Çàïîëíèòåëü:";
+ Text[ polish ] = "Znaki wiod¹ce:";
+ Text[ japanese ] = "Ø°ÀÞ°:";
+ Text[ chinese_traditional ] = "«e¾É¦r¤¸¡G";
+ Text[ arabic ] = "ÍÑÝ ÓÇÈÞ:";
+ Text[ greek ] = "×áñáêôÞñáò ãåìßóìáôïò:";
+ Text[ korean ] = "ä¿ò ±âÈ£:";
+ Text[ turkish ] = "Öncü:";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_TAB_ADJUST_LEFT
+{
+ Text = "Links" ;
+ Text [ English ] = "Left" ;
+ Text [ norwegian ] = "Left" ;
+ Text [ italian ] = "Sinistra" ;
+ Text [ portuguese_brazilian ] = "A Esquerda" ;
+ Text [ portuguese ] = "Esquerda" ;
+ Text [ finnish ] = "Vasen" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ french ] = "À gauche" ;
+ Text [ swedish ] = "Vänster" ;
+ Text [ dutch ] = "Links" ;
+ Text [ spanish ] = "Izquierda" ;
+ Text [ english_us ] = "Left" ;
+ Text[ chinese_simplified ] = "Ïò×ó";
+ Text[ russian ] = "Ñëåâà";
+ Text[ polish ] = "Z lewej";
+ Text[ japanese ] = "¶‘µ‚¦";
+ Text[ chinese_traditional ] = "¦V¥ª";
+ Text[ arabic ] = "íÓÇÑ";
+ Text[ greek ] = "ÁñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ";
+ Text[ turkish ] = "Sol";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_TAB_ADJUST_RIGHT
+{
+ Text = "Rechts" ;
+ Text [ English ] = "Right" ;
+ Text [ norwegian ] = "Right" ;
+ Text [ italian ] = "Destra" ;
+ Text [ portuguese_brazilian ] = "A Direita" ;
+ Text [ portuguese ] = "Direita" ;
+ Text [ finnish ] = "Oikea" ;
+ Text [ danish ] = "Højre" ;
+ Text [ french ] = "À droite" ;
+ Text [ swedish ] = "Höger" ;
+ Text [ dutch ] = "Rechts" ;
+ Text [ spanish ] = "Derecha" ;
+ Text [ english_us ] = "Right" ;
+ Text[ chinese_simplified ] = "ÏòÓÒ";
+ Text[ russian ] = "Ñïðàâà";
+ Text[ polish ] = "Z prawej";
+ Text[ japanese ] = "‰E‘µ‚¦";
+ Text[ chinese_traditional ] = "¦V¥k";
+ Text[ arabic ] = "íãíä";
+ Text[ greek ] = "ÄåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ";
+ Text[ turkish ] = "Sað";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_TAB_ADJUST_DECIMAL
+{
+ Text = "Dezimal" ;
+ Text [ English ] = "Decimal" ;
+ Text [ norwegian ] = "Desimal" ;
+ Text [ italian ] = "Decimale" ;
+ Text [ portuguese_brazilian ] = "Decimal" ;
+ Text [ portuguese ] = "Decimal" ;
+ Text [ finnish ] = "Desimaali" ;
+ Text [ danish ] = "Decimal" ;
+ Text [ french ] = "Décimal" ;
+ Text [ swedish ] = "Decimal" ;
+ Text [ dutch ] = "Decimaal" ;
+ Text [ spanish ] = "Decimal" ;
+ Text [ english_us ] = "Decimal" ;
+ Text[ chinese_simplified ] = "СÊýµã";
+ Text[ russian ] = "Äåñÿòè÷íûé";
+ Text[ polish ] = "Dziesiêtny";
+ Text[ japanese ] = "¬”“_‘µ‚¦";
+ Text[ chinese_traditional ] = "¤p¼ÆÂI";
+ Text[ arabic ] = "ÚÔÑí";
+ Text[ greek ] = "ÄåêáäéêÜ";
+ Text[ korean ] = "¼Ò¼öÁ¡";
+ Text[ turkish ] = "Ondalýk";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_TAB_ADJUST_CENTER
+{
+ Text = "Zentriert" ;
+ Text [ English ] = "Center" ;
+ Text [ norwegian ] = "Midtstill " ;
+ Text [ italian ] = "Centrato" ;
+ Text [ portuguese_brazilian ] = "Centralizar" ;
+ Text [ portuguese ] = "Centrado" ;
+ Text [ finnish ] = "Keskitä pystysuunnassa" ;
+ Text [ danish ] = "Centreret" ;
+ Text [ french ] = "Centré" ;
+ Text [ swedish ] = "Centrerat" ;
+ Text [ dutch ] = "Gecentreerd" ;
+ Text [ spanish ] = "Centrado" ;
+ Text [ english_us ] = "Centered" ;
+ Text[ chinese_simplified ] = "¾ÓÖÐ";
+ Text[ russian ] = "Ïî öåíòðó";
+ Text[ polish ] = "Wyœrodkowany";
+ Text[ japanese ] = "’†‰›‘µ‚¦";
+ Text[ chinese_traditional ] = "¸m¤¤";
+ Text[ arabic ] = "ÊæÓíØ";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá";
+ Text[ korean ] = "°¡¿îµ¥";
+ Text[ turkish ] = "Orta";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_TAB_ADJUST_DEFAULT
+{
+ Text = "Default" ;
+ Text [ English ] = "Default" ;
+ Text [ norwegian ] = "Standard" ;
+ Text [ italian ] = "Predefinito" ;
+ Text [ portuguese_brazilian ] = "Padrão" ;
+ Text [ portuguese ] = "Padrão" ;
+ Text [ finnish ] = "Oletus" ;
+ Text [ danish ] = "Standard" ;
+ Text [ french ] = "Par défaut" ;
+ Text [ swedish ] = "Standard" ;
+ Text [ dutch ] = "Standaard" ;
+ Text [ spanish ] = "Predeterminado" ;
+ Text [ english_us ] = "Default" ;
+ Text[ chinese_simplified ] = "ĬÈÏ";
+ Text[ russian ] = "Ïî óìîë÷àíèþ";
+ Text[ polish ] = "Domyœlnie";
+ Text[ japanese ] = "Šù’è’l";
+ Text[ chinese_traditional ] = "Àq»{";
+ Text[ arabic ] = "ÇÝÊÑÇÖí";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "񃧯";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+};
+ // Typ-Namen der SlotIds ----------------------------------------------------
+String RID_ATTR_ZOOM
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Maßstab : Ma˜stab */
+ Text = "Maßstab" ;
+ Text [ English ] = "Zoom" ;
+ Text [ norwegian ] = "Zoom" ;
+ Text [ italian ] = "Zoom" ;
+ Text [ portuguese_brazilian ] = "Zoom" ;
+ Text [ portuguese ] = "Zoom" ;
+ Text [ finnish ] = "Zoomaus" ;
+ Text [ danish ] = "Målestok" ;
+ Text [ french ] = "Zoom" ;
+ Text [ swedish ] = "Skala" ;
+ Text [ dutch ] = "Schaal" ;
+ Text [ spanish ] = "Escala" ;
+ Text [ english_us ] = "Scale" ;
+ Text[ chinese_simplified ] = "ÏÔʾ±ÈÀý";
+ Text[ russian ] = "Ìàñøòàá";
+ Text[ polish ] = "Skala";
+ Text[ japanese ] = "½Þ°Ñ";
+ Text[ chinese_traditional ] = "Åã¥Ü¤ñ¨Ò";
+ Text[ arabic ] = "ÊßÈíÑ/ÊÕÛíÑ";
+ Text[ greek ] = "Êëßìáêá";
+ Text[ korean ] = "¹èÀ²";
+ Text[ turkish ] = "Ölçek";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_BRUSH
+{
+ Text = "Pinsel" ;
+ Text [ English ] = "Brush" ;
+ Text [ norwegian ] = "Pensel" ;
+ Text [ italian ] = "Pennello" ;
+ Text [ portuguese_brazilian ] = "Pintar" ;
+ Text [ portuguese ] = "Pintar" ;
+ Text [ finnish ] = "Sivellin" ;
+ Text [ danish ] = "Pensel" ;
+ Text [ french ] = "Pinceau" ;
+ Text [ swedish ] = "Pensel" ;
+ Text [ dutch ] = "Penseel" ;
+ Text [ spanish ] = "Pincel" ;
+ Text [ english_us ] = "Brush" ;
+ Text[ chinese_simplified ] = "»­±Ê";
+ Text[ russian ] = "Êèñòü";
+ Text[ polish ] = "Pêdzel";
+ Text[ japanese ] = "ÌÞ×¼";
+ Text[ chinese_traditional ] = "µeµ§";
+ Text[ arabic ] = "ÇáÝÑÔÇÉ";
+ Text[ greek ] = "ÐéíÝëï";
+ Text[ korean ] = "º×";
+ Text[ turkish ] = "Fýrça";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_TABSTOP
+{
+ Text = "Tabulatoren" ;
+ Text [ English ] = "Tabstops" ;
+ Text [ norwegian ] = "Tabulatorstoppere" ;
+ Text [ italian ] = "Tabulazioni" ;
+ Text [ portuguese_brazilian ] = "Paradas de tabulação" ;
+ Text [ portuguese ] = "Tabulações" ;
+ Text [ finnish ] = "Sarkainkohdat" ;
+ Text [ danish ] = "Tabulatorer" ;
+ Text [ french ] = "Tabulations" ;
+ Text [ swedish ] = "Tabulatorer" ;
+ Text [ dutch ] = "Tabstops" ;
+ Text [ spanish ] = "Tabuladores" ;
+ Text [ english_us ] = "Tab Stops" ;
+ Text[ chinese_simplified ] = "ÖƱí·û";
+ Text[ russian ] = "Òàáóëÿòîðû";
+ Text[ polish ] = "Tabulatory";
+ Text[ japanese ] = "ÀÌ޽įÌß";
+ Text[ chinese_traditional ] = "»sªí²Å";
+ Text[ arabic ] = "ÚáÇãÇÊ ÇáÌÏæáÉ";
+ Text[ greek ] = "ÓôçëïèÝôåò";
+ Text[ korean ] = "ÅÇ Á¤Áö";
+ Text[ turkish ] = "Sekme duraklarý";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_TABSTOP_DEFAULTS
+{
+ Text = "?" ;
+};
+String RID_ATTR_TABSTOP_POS
+{
+ Text = "?" ;
+};
+String RID_ATTR_TABSTOP_OFFSET
+{
+ Text = "?" ;
+};
+String RID_ATTR_CHAR
+{
+ Text = "Zeichen" ;
+ Text [ English ] = "Char" ;
+ Text [ norwegian ] = "Char" ;
+ Text [ italian ] = "Carattere" ;
+ Text [ portuguese_brazilian ] = "Gráfico" ;
+ Text [ portuguese ] = "Caracteres" ;
+ Text [ finnish ] = "Merkki" ;
+ Text [ danish ] = "Tegn" ;
+ Text [ french ] = "Caractère" ;
+ Text [ swedish ] = "Tecken" ;
+ Text [ dutch ] = "Teken" ;
+ Text [ spanish ] = "Carácter" ;
+ Text [ english_us ] = "Character" ;
+ Text[ chinese_simplified ] = "×Ö·û";
+ Text[ russian ] = "Çíàê";
+ Text[ polish ] = "Znak";
+ Text[ japanese ] = "•¶Žš";
+ Text[ chinese_traditional ] = "¦r¤¸";
+ Text[ arabic ] = "ÍÑÝ";
+ Text[ greek ] = "×áñáêôÞñåò";
+ Text[ korean ] = "±âÈ£";
+ Text[ turkish ] = "Karakter";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_FONT
+{
+ Text = "Schrift" ;
+ Text [ English ] = "Font" ;
+ Text [ norwegian ] = "Skrift" ;
+ Text [ italian ] = "Carattere" ;
+ Text [ portuguese_brazilian ] = "Fonte" ;
+ Text [ portuguese ] = "Tipo de letra" ;
+ Text [ french ] = "Police" ;
+ Text [ dutch ] = "Lettertype" ;
+ Text [ spanish ] = "Fuente" ;
+ Text [ danish ] = "Skrifttype" ;
+ Text [ swedish ] = "Teckensnitt" ;
+ Text [ finnish ] = "Font" ;
+ 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 ] = "Yazýtipi";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_POSTURE
+{
+ Text = "Fontstellung" ;
+ Text [ English ] = "Fontposture" ;
+ Text [ norwegian ] = "Skriftstilling" ;
+ Text [ italian ] = "Orientamento del font" ;
+ Text [ portuguese_brazilian ] = "Postura de fonte" ;
+ Text [ portuguese ] = "Posição do tipo de letra" ;
+ Text [ finnish ] = "Fontin asento" ;
+ Text [ danish ] = "Skriftposition" ;
+ Text [ french ] = "Inclinaison" ;
+ Text [ swedish ] = "Teckenställning" ;
+ Text [ dutch ] = "Letterpositie" ;
+ Text [ spanish ] = "Posición de la fuente" ;
+ Text [ english_us ] = "Font Posture" ;
+ Text[ chinese_simplified ] = "É趨×ÖÌå";
+ Text[ russian ] = "Ïîëîæåíèå øðèôòà";
+ Text[ polish ] = "Pozycja czcionki";
+ Text[ japanese ] = "Ì«ÝÄ‚ÌŒ`‘Ô";
+ Text[ chinese_traditional ] = "³]©w¦r«¬";
+ Text[ arabic ] = "æÖÚ ÇáÎØ";
+ Text[ greek ] = "ÈÝóç ãñáììáôïóåéñÜò";
+ Text[ korean ] = "±Û²Ã À§Ä¡";
+ Text[ turkish ] = "Yazýtipi duruþu";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_WEIGHT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Fontstärke : Fontstõrke */
+ Text = "Fontstärke" ;
+ Text [ English ] = "Fontweight" ;
+ Text [ norwegian ] = "Skriftvekt" ;
+ Text [ italian ] = "Spessore del font" ;
+ Text [ portuguese_brazilian ] = "Peso de fonte" ;
+ Text [ portuguese ] = "Espessura da letra" ;
+ Text [ finnish ] = "Fontin paino" ;
+ Text [ danish ] = "Skrifttykkelse" ;
+ Text [ french ] = "Graisse" ;
+ Text [ swedish ] = "Teckenstyrka" ;
+ Text [ dutch ] = "Letterdikte" ;
+ Text [ spanish ] = "Peso de fuente" ;
+ Text [ english_us ] = "Font Weight" ;
+ Text[ chinese_simplified ] = "×ÖÌå´Öϸ";
+ Text[ russian ] = "Òîëùèíà øðèôòà";
+ Text[ polish ] = "GruboϾ czcionki";
+ Text[ japanese ] = "Ì«ÝÄ‚Ì‘¾‚³";
+ Text[ chinese_traditional ] = "¦r«¬²Ê²Ó";
+ Text[ arabic ] = "ÚÑÖ ÇáÎØ";
+ Text[ greek ] = "ÐÜ÷ïò ãñáììáôïóåéñÜò";
+ Text[ korean ] = "±Û²Ã µÎ²²";
+ Text[ turkish ] = "Yazýtipi kalýnlýðý";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_SHADOWED
+{
+ Text = "Schattiert" ;
+ Text [ English ] = "Shadowed" ;
+ Text [ norwegian ] = "Skygget" ;
+ Text [ italian ] = "Ombreggiato" ;
+ Text [ portuguese_brazilian ] = "Sombreado" ;
+ Text [ portuguese ] = "Sombreado" ;
+ Text [ finnish ] = "Varjostettu" ;
+ Text [ danish ] = "Afskygget" ;
+ Text [ french ] = "Ombré" ;
+ Text [ swedish ] = "Skuggad" ;
+ Text [ dutch ] = "Schaduw" ;
+ Text [ spanish ] = "Sombreado" ;
+ Text [ english_us ] = "Shadowed" ;
+ Text[ chinese_simplified ] = "´øÒõÓ°";
+ Text[ russian ] = "Çàòåíåíèå";
+ Text[ polish ] = "Wycieniowany";
+ Text[ japanese ] = "‰e•t‚«";
+ Text[ chinese_traditional ] = "±a³±¼v";
+ Text[ arabic ] = "ãÙáá";
+ Text[ greek ] = "ÓêéáóìÝíï";
+ Text[ korean ] = "À½¿µ";
+ Text[ turkish ] = "Gölgeli";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_WORDLINEMODE
+{
+ Text = "Wortweise" ;
+ Text [ English ] = "Words only" ;
+ Text [ norwegian ] = "Bare ord" ;
+ Text [ italian ] = "Solo parole" ;
+ Text [ portuguese_brazilian ] = "Apenas palavras" ;
+ Text [ portuguese ] = "Só palavras" ;
+ Text [ finnish ] = "Vain sanat" ;
+ Text [ danish ] = "Ordvis" ;
+ Text [ french ] = "Mot par mot" ;
+ Text [ swedish ] = "Ordvis" ;
+ Text [ dutch ] = "Alleen woorden" ;
+ Text [ spanish ] = "Solo palabras" ;
+ Text [ english_us ] = "Individual Words" ;
+ Text[ chinese_simplified ] = "Öð×Ö";
+ Text[ russian ] = "Òîëüêî ñëîâà";
+ Text[ polish ] = "Po s³owie";
+ Text[ japanese ] = "’PŒê‚²‚Æ‚É‚·‚é";
+ Text[ chinese_traditional ] = "³v¦r";
+ Text[ arabic ] = "ßáãÇÊ ÝÑÏíÉ";
+ Text[ greek ] = "ÊáôÜ ëÝîç";
+ Text[ korean ] = "´Ü¾îº°";
+ Text[ turkish ] = "Yalnýzca sözcükler";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_CONTOUR
+{
+ Text = "Kontur" ;
+ Text [ English ] = "Contour" ;
+ Text [ norwegian ] = "Kontur" ;
+ Text [ italian ] = "Contorno" ;
+ Text [ portuguese_brazilian ] = "Contorno" ;
+ Text [ portuguese ] = "Contorno" ;
+ Text [ finnish ] = "Ääriviiva" ;
+ Text [ danish ] = "Kontur" ;
+ Text [ french ] = "Contour" ;
+ Text [ swedish ] = "Kontur" ;
+ Text [ dutch ] = "Contour" ;
+ Text [ spanish ] = "Contorno" ;
+ Text [ english_us ] = "Outline" ;
+ Text[ chinese_simplified ] = "ÂÖÀª";
+ Text[ russian ] = "Êîíòóð";
+ Text[ polish ] = "Kontur";
+ Text[ japanese ] = "—ÖŠs";
+ Text[ chinese_traditional ] = "½ü¹ø";
+ Text[ arabic ] = "ÇáÎØ ÇáßöÝÇÝí";
+ Text[ greek ] = "Ðåñßãñáììá";
+ Text[ korean ] = "À±°û";
+ Text[ turkish ] = "Kontur";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_STRIKEOUT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Durchgestrichen : Durchstrichen */
+ /* ### ACHTUNG: Neuer Text in Resource? Durchgestrichen : Durchstrichen */
+ Text = "Durchgestrichen" ;
+ Text [ English ] = "Cross out" ;
+ Text [ norwegian ] = "Stryk ut" ;
+ Text [ italian ] = "Barrato" ;
+ Text [ portuguese_brazilian ] = "Cruzado" ;
+ Text [ portuguese ] = "Rasurado" ;
+ Text [ finnish ] = "Päällekirjoitettu" ;
+ Text [ danish ] = "Gennemstreget" ;
+ Text [ french ] = "Barré" ;
+ Text [ swedish ] = "Genomstruken" ;
+ Text [ dutch ] = "Doorhalen" ;
+ Text [ spanish ] = "Tachado" ;
+ Text [ english_us ] = "Strikethrough" ;
+ Text[ chinese_simplified ] = "ɾ³ýÏß";
+ Text[ russian ] = "Çà÷åðêíóòûé";
+ Text[ polish ] = "Przekreœlony";
+ Text[ japanese ] = "Žæ‚èÁ‚µü";
+ Text[ chinese_traditional ] = "§R°£½u";
+ Text[ arabic ] = "ÔØÈ";
+ Text[ greek ] = "ÄéáãñÜììéóç";
+ Text[ korean ] = "Ãë¼Ò¼±";
+ Text[ turkish ] = "Üstü çizili";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_UNDERLINE
+{
+ Text = "Unterstrichen" ;
+ Text [ English ] = "Underline" ;
+ Text [ norwegian ] = "Underline" ;
+ Text [ italian ] = "Sottolineato" ;
+ Text [ portuguese_brazilian ] = "Sublinhado" ;
+ Text [ portuguese ] = "Sublinhado" ;
+ Text [ finnish ] = "Alleviivattu" ;
+ Text [ danish ] = "Understreget" ;
+ Text [ french ] = "Soulignage" ;
+ Text [ swedish ] = "Understruken" ;
+ Text [ dutch ] = "Onderstrepen" ;
+ Text [ spanish ] = "Subrayado" ;
+ Text [ english_us ] = "Underline" ;
+ Text[ chinese_simplified ] = "Ï»®Ïß";
+ Text[ russian ] = "Ïîä÷åðêíóòûé";
+ Text[ polish ] = "Podkreœlenie";
+ Text[ japanese ] = "伟";
+ Text[ chinese_traditional ] = "¤U¹º½u";
+ Text[ arabic ] = "ÊÍÊå ÎØ";
+ Text[ greek ] = "YðïãñÜììéóç";
+ Text[ korean ] = "¹ØÁÙ";
+ Text[ turkish ] = "Altý çizili";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_FONTHEIGHT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Fonthöhe : Fonth÷he */
+ Text = "Fonthöhe" ;
+ Text [ English ] = "Fontheight" ;
+ Text [ norwegian ] = "Skrifthøyde" ;
+ Text [ italian ] = "Altezza font" ;
+ Text [ portuguese_brazilian ] = "Altura de fonte" ;
+ Text [ portuguese ] = "Altura do tipo de letra" ;
+ Text [ finnish ] = "Fontin korkeus" ;
+ Text [ danish ] = "Skrifthøjde" ;
+ Text [ french ] = "Hauteur des caractères" ;
+ Text [ swedish ] = "Teckenhöjd" ;
+ Text [ dutch ] = "Letterhoogte" ;
+ Text [ spanish ] = "Altura de la fuente" ;
+ Text [ english_us ] = "Font Height" ;
+ Text[ chinese_simplified ] = "×ÖÌå¸ß¶È";
+ Text[ russian ] = "Âûñîòà øðèôòà";
+ Text[ polish ] = "WysokoϾ czcionki";
+ Text[ japanese ] = "Ì«ÝÄ‚Ìc";
+ Text[ chinese_traditional ] = "¦r«¬°ª«×";
+ Text[ arabic ] = "ÇÑÊÝÇÚ ÇáÎØ";
+ Text[ greek ] = "¾øïò ãñáììáôïóåéñÜò";
+ Text[ korean ] = "±Û²Ã ³ôÀÌ";
+ Text[ turkish ] = "Yazýtipi boyu";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_PROPSIZE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Rel. Fontgröße : Rel. Fontgr÷˜e */
+ Text = "Rel. Fontgröße" ;
+ Text [ English ] = "rel. Fontsize" ;
+ Text [ norwegian ] = "rel. Skriftstørrelse" ;
+ Text [ italian ] = "Dimensione font rel." ;
+ Text [ portuguese_brazilian ] = "Tamanho relativo de letra" ;
+ Text [ portuguese ] = "Tamanho da letra relativo" ;
+ Text [ finnish ] = "Suht. fontin koko" ;
+ Text [ danish ] = "Rel. skriftstørrelse" ;
+ Text [ french ] = "Taille relative" ;
+ Text [ swedish ] = "Rel. teckenstorlek" ;
+ Text [ dutch ] = "Relatieve letterhoogte" ;
+ Text [ spanish ] = "Tamaño relativo" ;
+ Text [ english_us ] = "Rel. Font Size" ;
+ Text[ chinese_simplified ] = "±ê×¼×ÖÌå´óС";
+ Text[ russian ] = "Ðàçìåð îòíîñèò.";
+ Text[ polish ] = "Wzglêdna wielkoœæ czcionki";
+ Text[ japanese ] = "‘Š‘ΓI Ì«ÝÄ‚Ì»²½Þ";
+ Text[ chinese_traditional ] = "¼Ð·Ç¦r«¬¤j¤p";
+ Text[ arabic ] = "ÇáÍÌã ÇáäÓÈí ááÎØ";
+ Text[ greek ] = "Ó÷åô. ìÝãåèïò ãñáììáôïóåéñÜò";
+ Text[ korean ] = "»ó´ëÀû ±Û²Ã Å©±â";
+ Text[ turkish ] = "Orantýlý yazýtipi";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_COLOR
+{
+ Text = "Fontfarbe" ;
+ Text [ English ] = "Fontcolor" ;
+ Text [ norwegian ] = "Skriftfarge" ;
+ Text [ italian ] = "Colore font" ;
+ Text [ portuguese_brazilian ] = "Cor de fonte" ;
+ Text [ portuguese ] = "Cor do tipo de letra" ;
+ Text [ finnish ] = "Fontin väri" ;
+ Text [ danish ] = "Skriftfarve" ;
+ Text [ french ] = "Couleur de police" ;
+ Text [ swedish ] = "Teckenfärg" ;
+ Text [ dutch ] = "Letterkleur" ;
+ Text [ spanish ] = "Color de fuente" ;
+ Text [ english_us ] = "Font Color" ;
+ Text[ chinese_simplified ] = "×ÖÌåÑÕÉ«";
+ Text[ russian ] = "Öâåò øðèôòà";
+ Text[ polish ] = "Kolor czcionki";
+ Text[ japanese ] = "Ì«ÝÄ‚ÌF";
+ Text[ chinese_traditional ] = "¦r«¬ÃC¦â";
+ Text[ arabic ] = "áæä ÇáÎØ";
+ Text[ greek ] = "×ñþìá ãñáììáôïóåéñÜò";
+ Text[ korean ] = "±Û²Ã »ö";
+ Text[ turkish ] = "Yazýtipi rengi";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_KERNING
+{
+ Text = "Kerning" ;
+ Text [ English ] = "Kerning" ;
+ Text [ norwegian ] = "Kerning" ;
+ Text [ italian ] = "Crenatura" ;
+ Text [ portuguese_brazilian ] = "Kerning" ;
+ Text [ portuguese ] = "Kerning" ;
+ Text [ french ] = "Crénage" ;
+ Text [ dutch ] = "Kerning" ;
+ Text [ spanish ] = "Ajuste entre caracteres" ;
+ Text [ danish ] = "Knibning" ;
+ Text [ swedish ] = "Kerning" ;
+ Text [ finnish ] = "Kerning" ;
+ Text [ english_us ] = "Kerning" ;
+ Text[ chinese_simplified ] = "×Öĸ¼ä¸ôÏàµÈ";
+ Text[ russian ] = "Êåðíèíã";
+ Text[ polish ] = "Kerning";
+ Text[ japanese ] = "¶°ÆݸÞ";
+ Text[ chinese_traditional ] = "¦r¥À¶¡¹j¬Ûµ¥";
+ Text[ arabic ] = "ÊÞäíä ÇáÃÍÑÝ";
+ Text[ greek ] = "Ðýêíùóç";
+ Text[ korean ] = "Ä¿´×";
+ Text[ language_user1 ] = " ";
+ Text[ turkish ] = "Kerning";
+};
+String RID_ATTR_CHAR_CASEMAP
+{
+ Text = "Auszeichnung" ;
+ Text [ English ] = "Casemap" ;
+ Text [ norwegian ] = "+++Casemap" ;
+ Text [ italian ] = "Stile carattere" ;
+ Text [ portuguese_brazilian ] = "Mapa de caixa" ;
+ Text [ portuguese ] = "Marca" ;
+ Text [ finnish ] = "Kirjainkoko" ;
+ Text [ danish ] = "Typografi" ;
+ Text [ french ] = "Casse" ;
+ Text [ swedish ] = "Effekter" ;
+ Text [ dutch ] = "Effecten" ;
+ Text [ spanish ] = "Efectos" ;
+ Text [ english_us ] = "Effects" ;
+ Text[ chinese_simplified ] = "Ч¹û";
+ Text[ russian ] = "Ýôôåêòû";
+ Text[ polish ] = "Wyró¿nienie";
+ Text[ japanese ] = "•¶Žšü‚è";
+ Text[ chinese_traditional ] = "®ÄªG";
+ Text[ arabic ] = "ÊÃËíÑÇÊ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "ÄéÜêñéóç";
+ Text[ korean ] = "È¿°ú";
+ Text[ turkish ] = "Efektler";
+};
+String RID_ATTR_CHAR_LANGUAGE
+{
+ Text = "Sprache" ;
+ Text [ English ] = "Language" ;
+ Text [ norwegian ] = "Språk" ;
+ Text [ italian ] = "Lingua" ;
+ Text [ portuguese_brazilian ] = "Idioma" ;
+ Text [ portuguese ] = "Língua" ;
+ Text [ finnish ] = "Kieli" ;
+ Text [ danish ] = "Sprog" ;
+ Text [ french ] = "Langue" ;
+ Text [ swedish ] = "Språk" ;
+ Text [ dutch ] = "Taal" ;
+ Text [ spanish ] = "Idioma" ;
+ Text [ english_us ] = "Language" ;
+ Text[ chinese_simplified ] = "ÓïÑÔ";
+ Text[ russian ] = "ßçûê";
+ Text[ polish ] = "Jêzyk";
+ Text[ japanese ] = "Œ¾Œê";
+ Text[ chinese_traditional ] = "»y¨¥";
+ Text[ arabic ] = "ÇááÛÉ";
+ Text[ greek ] = "Ãëþóóá";
+ Text[ korean ] = "¾ð¾î";
+ Text[ turkish ] = "Dil";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_ESCAPEMENT
+{
+ Text = "Position" ;
+ Text [ English ] = "Escapement" ;
+ Text [ norwegian ] = "+++Escapement" ;
+ Text [ italian ] = "Posizione" ;
+ Text [ portuguese_brazilian ] = "Escapamento" ;
+ Text [ portuguese ] = "Posição" ;
+ Text [ finnish ] = "Paikka" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "Position" ;
+ Text [ swedish ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posición" ;
+ Text [ english_us ] = "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 ] = " ";
+};
+String RID_ATTR_CHAR_FONTLIST
+{
+ Text = "?" ;
+};
+String RID_ATTR_CHAR_BLINK
+{
+ Text = "Blinkend" ;
+ Text [ English ] = "Flashed" ;
+ Text [ dutch ] = "Knipperend" ;
+ Text [ english_us ] = "Blinking" ;
+ Text [ italian ] = "Lampeggiante" ;
+ Text [ spanish ] = "Intermitente" ;
+ Text [ french ] = "Clignotant" ;
+ Text [ swedish ] = "Blinkande" ;
+ Text [ danish ] = "Blinkende" ;
+ Text [ portuguese ] = "Intermitente" ;
+ Text [ portuguese_brazilian ] = "Blinkend" ;
+ Text[ chinese_simplified ] = "ÉÁ˸";
+ Text[ russian ] = "Ìèãàíèå";
+ Text[ polish ] = "Miganie";
+ Text[ japanese ] = "“_–Å‚·‚é";
+ Text[ chinese_traditional ] = "°{Ã{";
+ Text[ arabic ] = "æãÇÖ";
+ Text[ greek ] = "Íá áíáâïóâÞíåé";
+ Text[ korean ] = "±ô¹ÚÀÓ";
+ Text[ turkish ] = "Yanýp sönme";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_CHAR_CHARSETCOLOR
+{
+ Text = "Zeichensatzfarbe" ;
+ Text [ English ] = "Charset Color" ;
+ Text[ english_us ] = "Character set color";
+ Text[ portuguese ] = "Cor dos caracteres";
+ Text[ russian ] = "Öâåò íàáîðà çíàêîâ";
+ Text[ greek ] = "×ñþìá óåô ÷áñáêôÞñùí";
+ Text[ dutch ] = "Kleur tekenset";
+ Text[ french ] = "Couleur de jeu de caractères";
+ Text[ spanish ] = "Color de carácter";
+ Text[ italian ] = "Colore tipo di carattere";
+ Text[ danish ] = "Tegnsætfarve";
+ Text[ swedish ] = "Färg för teckenuppsättning";
+ Text[ polish ] = "Kolor zbioru znaków";
+ Text[ portuguese_brazilian ] = "Charset Color";
+ Text[ japanese ] = "•¶Žš—ñ‚ÌF";
+ Text[ korean ] = "¹®ÀÚ ¼¼Æ® »ö";
+ Text[ chinese_simplified ] = "×ÖÌåÑÕÉ«";
+ Text[ chinese_traditional ] = "¦r«¬ÃC¦â";
+ Text[ arabic ] = "áæä ãÌãæÚÉ ÇáÃÍÑÝ";
+ Text[ turkish ] = "Karakter kümesi rengi";
+};
+String RID_ATTR_BORDER_INNER
+{
+ Text = "?" ;
+};
+String RID_ATTR_BORDER_OUTER
+{
+ Text = "?" ;
+};
+String RID_ATTR_BORDER_SHADOW
+{
+ Text = "?" ;
+};
+String RID_ATTR_PARA
+{
+ Text = "Absatz" ;
+ Text [ English ] = "Paragraph" ;
+ Text [ norwegian ] = "Avsnitt" ;
+ Text [ italian ] = "Paragrafo" ;
+ Text [ portuguese_brazilian ] = "Parágrafo" ;
+ Text [ portuguese ] = "Parágrafo" ;
+ Text [ finnish ] = "Kappale" ;
+ Text [ danish ] = "Afsnit" ;
+ Text [ french ] = "Paragraphe" ;
+ Text [ swedish ] = "Stycke" ;
+ Text [ dutch ] = "Alinea" ;
+ Text [ spanish ] = "Párrafo" ;
+ Text [ english_us ] = "Paragraph" ;
+ Text[ chinese_simplified ] = "¶ÎÂä";
+ Text[ russian ] = "Àáçàö";
+ Text[ polish ] = "Akapit";
+ Text[ japanese ] = "’i—Ž";
+ Text[ chinese_traditional ] = "¬q¸¨";
+ Text[ arabic ] = "ÝÞÑÉ";
+ Text[ greek ] = "ÐáñÜãñáöïò";
+ Text[ korean ] = "´Ü¶ô";
+ Text[ turkish ] = "Paragraf";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PARA_ADJUST
+{
+ Text = "Ausrichtung" ;
+ Text [ English ] = "Adjust" ;
+ Text [ norwegian ] = "Juster" ;
+ Text [ italian ] = "Allinea" ;
+ Text [ portuguese_brazilian ] = "Ajustar" ;
+ Text [ portuguese ] = "Alinhar" ;
+ Text [ finnish ] = "Muotoile" ;
+ Text [ danish ] = "Justering" ;
+ Text [ french ] = "Alignement" ;
+ Text [ swedish ] = "Justering" ;
+ Text [ dutch ] = "Uitlijnen" ;
+ Text [ spanish ] = "Alineación" ;
+ Text [ english_us ] = "Alignment" ;
+ Text[ chinese_simplified ] = "¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå";
+ Text[ polish ] = "Wyrównanie";
+ Text[ japanese ] = "”z’u";
+ Text[ chinese_traditional ] = "¹ï»ô";
+ Text[ arabic ] = "ÇáãÍÇÐÇÉ";
+ Text[ greek ] = "Óôïß÷éóç";
+ Text[ korean ] = "¸ÂÃã";
+ Text[ turkish ] = "Hizalama";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PARA_ADJUST_LEFT
+{
+ Text = "?" ;
+};
+String RID_ATTR_PARA_ADJUST_RIGHT
+{
+ Text = "?" ;
+};
+String RID_ATTR_PARA_ADJUST_CENTER
+{
+ Text = "?" ;
+};
+String RID_ATTR_PARA_ADJUST_BLOCK
+{
+ Text = "?" ;
+};
+String RID_ATTR_PARA_ADJUST_BLOCKLINE
+{
+ Text = "?" ;
+};
+String RID_ATTR_PARA_LINESPACE
+{
+ Text = "Zeilenabstand" ;
+ Text [ English ] = "Linespace" ;
+ Text [ norwegian ] = "Linjemellomrom" ;
+ Text [ italian ] = "Interlinea" ;
+ Text [ portuguese_brazilian ] = "Espaço de linha" ;
+ Text [ portuguese ] = "Entrelinhas" ;
+ Text [ finnish ] = "Riviväli" ;
+ Text [ danish ] = "Linjeafstand" ;
+ Text [ french ] = "Interligne" ;
+ Text [ swedish ] = "Radavstånd" ;
+ Text [ dutch ] = "Regelafstand" ;
+ Text [ spanish ] = "Interlineado" ;
+ Text [ english_us ] = "Line Spacing" ;
+ Text[ chinese_simplified ] = "Ðоà";
+ Text[ russian ] = "ìåæäó ñòðîêàìè";
+ Text[ polish ] = "Odstêp wierszy";
+ Text[ japanese ] = "sŠÔ";
+ Text[ chinese_traditional ] = "¦æ¶Z";
+ Text[ arabic ] = "ÊÈÇÚÏ ÇáÃÓØÑ";
+ Text[ greek ] = "ÄéÜóôé÷ï";
+ Text[ korean ] = "ÁÙ °£°Ý";
+ Text[ turkish ] = "Satýr aralýðý";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PARA_LINESPACE_10
+{
+ Text = "?" ;
+};
+String RID_ATTR_PARA_LINESPACE_15
+{
+ Text = "?" ;
+};
+String RID_ATTR_PARA_LINESPACE_20
+{
+ Text = "?" ;
+};
+String RID_ATTR_PARA_PAGEBREAK
+{
+ Text = "Seitenumbruch" ;
+ Text [ English ] = "Pagebreak" ;
+ Text [ norwegian ] = "Sideskift" ;
+ Text [ italian ] = "Interruzione di pagina" ;
+ Text [ portuguese_brazilian ] = "Quebra de página" ;
+ Text [ portuguese ] = "Quebra de página" ;
+ Text [ finnish ] = "Sivunvaihto" ;
+ Text [ danish ] = "Sideskift" ;
+ Text [ french ] = "Saut de page" ;
+ Text [ swedish ] = "Sidbrytning" ;
+ Text [ dutch ] = "Pagina-einde" ;
+ Text [ spanish ] = "Salto de página" ;
+ Text [ english_us ] = "Page Break" ;
+ Text[ chinese_simplified ] = "»»Ò³";
+ Text[ russian ] = "Ðàçðûâ ñòðàíèöû";
+ Text[ polish ] = "Podzia³ stron";
+ Text[ japanese ] = "‰üÍß°¼Þ";
+ Text[ chinese_traditional ] = "´«­¶";
+ Text[ arabic ] = "ÝÇÕá ÕÝÍÇÊ";
+ Text[ greek ] = "ÁëëáãÞ óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö ³ª´©±â";
+ Text[ turkish ] = "Sayfa sonu";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PARA_HYPHENZONE
+{
+ Text = "Silbentrennung" ;
+ Text [ English ] = "Hyphenzone" ;
+ Text [ norwegian ] = "Orddelingssone" ;
+ Text [ italian ] = "Sillabazione" ;
+ Text [ portuguese_brazilian ] = "Zona de hífen" ;
+ Text [ portuguese ] = "Divisão silábica" ;
+ Text [ finnish ] = "Tavutusalue" ;
+ Text [ danish ] = "Orddeling" ;
+ Text [ french ] = "Coupure de mots" ;
+ Text [ swedish ] = "Avstavning" ;
+ Text [ dutch ] = "Woordafbreking" ;
+ Text [ spanish ] = "Separación silábica" ;
+ Text [ english_us ] = "Hyphenation" ;
+ Text[ chinese_simplified ] = "Á¬×Ö·û";
+ Text[ russian ] = "Ðàññòàíîâêà ïåðåíîñîâ";
+ Text[ polish ] = "Dzielenie wyrazów";
+ Text[ japanese ] = "ʲÌÈ°¼®Ý";
+ Text[ chinese_traditional ] = "³s¦r²Å";
+ Text[ arabic ] = "ÝÕá ÇáãÞÇØÚ";
+ Text[ greek ] = "Óõëëáâéóìüò";
+ Text[ korean ] = "ÇÏÀÌÇ ³Ö±â";
+ Text[ turkish ] = "Heceleme";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PARA_SPLIT
+{
+ Text = "Absatz trennen" ;
+ Text [ English ] = "Split paragraph" ;
+ Text [ norwegian ] = "Del opp avsnitt" ;
+ Text [ italian ] = "Dividi paragrafo" ;
+ Text [ portuguese_brazilian ] = "Partir parágrafo" ;
+ Text [ portuguese ] = "Dividir parágrafo" ;
+ Text [ finnish ] = "Jaettu kappalei" ;
+ Text [ danish ] = "Del afsnit" ;
+ Text [ french ] = "Lignes non solidaires" ;
+ Text [ swedish ] = "Dela stycke" ;
+ Text [ dutch ] = "Alinea splitsen" ;
+ Text [ spanish ] = "Dividir párrafo" ;
+ Text [ english_us ] = "Split Paragraph" ;
+ Text[ chinese_simplified ] = "·Ö¿ª¶ÎÂä";
+ Text[ russian ] = "Ðàçîðâàòü àáçàö";
+ Text[ polish ] = "Podziel akapit";
+ Text[ japanese ] = "’i—Ž‚Ì•ªŠ„";
+ Text[ chinese_traditional ] = "¤À¶}¬q¸¨";
+ Text[ arabic ] = "ÊÞÓíã ÇáÝÞÑÉ";
+ Text[ greek ] = "Äéá÷ùñéóìüò ðáñáãñÜöïõ";
+ Text[ korean ] = "´Ü¶ô ³ª´©±â";
+ Text[ turkish ] = "Paragrafý ayýr";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PARA_WIDOWS
+{
+ Text = "Schusterjungen" ;
+ Text [ English ] = "Widows" ;
+ Text [ norwegian ] = "Enkelinjer øverst" ;
+ Text [ italian ] = "Vedove" ;
+ Text [ portuguese_brazilian ] = "Viovas" ;
+ Text [ portuguese ] = "Viúvas" ;
+ Text [ finnish ] = "Leskirivit" ;
+ Text [ danish ] = "Franske horeunger" ;
+ Text [ french ] = "Orphelines" ;
+ Text [ swedish ] = "Änkor" ;
+ Text [ dutch ] = "Orphans" ;
+ Text [ spanish ] = "Huérfanas" ;
+ Text [ english_us ] = "Orphans" ;
+ Text[ chinese_simplified ] = "¶ÎÖв»·ÖÒ³";
+ Text[ russian ] = "Êîíöåâûå âèñÿ÷èå ñòðîêè";
+ Text[ polish ] = "Bez oddz. pierw. wiersza akap.";
+ Text[ japanese ] = "‰üÍß°¼ÞŽž‚ÉŽc‚·s”";
+ Text[ chinese_traditional ] = "¬q¤¤¤£¤À­¶";
+ Text[ arabic ] = "ÇáÃÓØÑ ÇáÃæáì ááÝÞÑÉ";
+ Text[ greek ] = "\"ÏñöáíÜ\"";
+ Text[ korean ] = "óÀ½ ÇÑÁÙ";
+ Text[ turkish ] = "Tek satýr (paragraf baþý)";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PARA_ORPHANS
+{
+ Text = "Hurenkinder" ;
+ Text [ English ] = "Orphans" ;
+ Text [ norwegian ] = "Enkelinjer nederst" ;
+ Text [ italian ] = "Orfane" ;
+ Text [ portuguese_brazilian ] = "Órfãos" ;
+ Text [ portuguese ] = "Órfãos" ;
+ Text [ finnish ] = "Orporivit" ;
+ Text [ danish ] = "Horeunger" ;
+ Text [ french ] = "Veuves" ;
+ Text [ swedish ] = "Horungar" ;
+ Text [ dutch ] = "Widows" ;
+ Text [ spanish ] = "Viudas" ;
+ Text [ english_us ] = "Widows" ;
+ Text[ chinese_simplified ] = "ÓëÏ߶Ëͬҳ";
+ Text[ russian ] = "Íà÷àëüíûå âèñÿ÷èå ñòðîêè";
+ Text[ polish ] = "Bez oddz. ost. wiersza akap.";
+ Text[ japanese ] = "’i—Ž‘O‚ʼnüÍß°¼Þ";
+ Text[ chinese_traditional ] = "»P½uºÝ¦P­¶";
+ Text[ arabic ] = "ÇáÃÓØÑ ÇáÃÎíÑÉ ááÝÞÑÉ";
+ Text[ greek ] = "\"×Þñåò\"";
+ Text[ korean ] = "¸¶Áö¸· ÇÑÁÙ";
+ Text[ turkish ] = "Tek satýr (paragraf sonu)";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PARA_ULSPACE
+{
+ Text = "Abstand" ;
+ Text [ English ] = "Distance" ;
+ Text [ norwegian ] = "Avstand" ;
+ Text [ italian ] = "Distanza" ;
+ Text [ portuguese_brazilian ] = "Distância" ;
+ Text [ portuguese ] = "Espaçamento" ;
+ Text [ finnish ] = "Etäisyys" ;
+ Text [ danish ] = "Mellemrum" ;
+ Text [ french ] = "Écart" ;
+ Text [ swedish ] = "Avstånd" ;
+ Text [ dutch ] = "Afstand" ;
+ Text [ spanish ] = "Espacio" ;
+ Text [ english_us ] = "Spacing" ;
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ polish ] = "Odstêp";
+ Text[ japanese ] = "ŠÔŠu";
+ Text[ chinese_traditional ] = "¶¡¹j";
+ Text[ arabic ] = "ÊÈÇÚÏ";
+ Text[ greek ] = "Áðüóôáóç";
+ Text[ korean ] = "°£°Ý";
+ Text[ turkish ] = "Aralýk";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PARA_LRSPACE
+{
+ Text = "Einzug" ;
+ Text [ English ] = "Indent" ;
+ Text [ norwegian ] = "Innrykk" ;
+ Text [ italian ] = "Rientro" ;
+ Text [ portuguese_brazilian ] = "Indentar" ;
+ Text [ portuguese ] = "Avanço de parágrafo" ;
+ Text [ finnish ] = "Sisennys" ;
+ Text [ danish ] = "Indrykning" ;
+ Text [ french ] = "Retrait" ;
+ Text [ swedish ] = "Indrag" ;
+ Text [ dutch ] = "Inspringen" ;
+ Text [ spanish ] = "Sangría" ;
+ Text [ english_us ] = "Indent" ;
+ Text[ chinese_simplified ] = "Ëõ½ø";
+ Text[ russian ] = "Îòñòóï";
+ Text[ polish ] = "Wciêcie";
+ Text[ japanese ] = "²ÝÃÞÝÄ";
+ Text[ chinese_traditional ] = "ÁY±Æ";
+ Text[ arabic ] = "ÇáÅÒÇÍÉ";
+ Text[ greek ] = "Åóï÷Þ";
+ Text[ korean ] = "Indent";
+ Text[ turkish ] = "Girinti";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_POSTIT_AUTHOR
+{
+ Text = "?" ;
+};
+String RID_ATTR_POSTIT_DATE
+{
+ Text = "?" ;
+};
+String RID_ATTR_POSTIT_TEXT
+{
+ Text = "?" ;
+};
+String RID_ATTR_SEARCH
+{
+ Text = "?" ;
+};
+String RID_ATTR_LRSPACE
+{
+ Text = "Einzug" ;
+ Text [ English ] = "Indent" ;
+ Text [ norwegian ] = "Innrykk" ;
+ Text [ italian ] = "Rientro" ;
+ Text [ portuguese_brazilian ] = "Indentar" ;
+ Text [ portuguese ] = "Avanço de parágrafo" ;
+ Text [ finnish ] = "Sisennys" ;
+ Text [ danish ] = "Indrykning" ;
+ Text [ french ] = "Retrait" ;
+ Text [ swedish ] = "Indrag" ;
+ Text [ dutch ] = "Inspringen" ;
+ Text [ spanish ] = "Sangría" ;
+ Text [ english_us ] = "Indent" ;
+ Text[ chinese_simplified ] = "Ëõ½ø";
+ Text[ russian ] = "Îòñòóï";
+ Text[ polish ] = "Wciêcie";
+ Text[ japanese ] = "²ÝÃÞÝÄ";
+ Text[ chinese_traditional ] = "ÁY±Æ";
+ Text[ arabic ] = "ÇáÅÒÇÍÉ";
+ Text[ greek ] = "Åóï÷Þ";
+ Text[ korean ] = "µé¿©¾²±â";
+ Text[ turkish ] = "Girinti";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_ULSPACE
+{
+ Text = "Abstand" ;
+ Text [ English ] = "Distance" ;
+ Text [ norwegian ] = "Avstand" ;
+ Text [ italian ] = "Distanza" ;
+ Text [ portuguese_brazilian ] = "Distância" ;
+ Text [ portuguese ] = "Espaçamento" ;
+ Text [ finnish ] = "Etäisyys" ;
+ Text [ danish ] = "Mellemrum" ;
+ Text [ french ] = "Écart" ;
+ Text [ swedish ] = "Avstånd" ;
+ Text [ dutch ] = "Afstand" ;
+ Text [ spanish ] = "Espacio" ;
+ Text [ english_us ] = "Spacing" ;
+ Text[ chinese_simplified ] = "¼ä¸ô";
+ Text[ russian ] = "Èíòåðâàë";
+ Text[ polish ] = "Odstêp";
+ Text[ japanese ] = "ŠÔŠu";
+ Text[ chinese_traditional ] = "¶¡¹j";
+ Text[ arabic ] = "ÊÈÇÚÏ";
+ Text[ greek ] = "Áðüóôáóç";
+ Text[ korean ] = "°£°Ý";
+ Text[ turkish ] = "Aralýk";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PAGE
+{
+ Text = "Seite" ;
+ Text [ English ] = "Page" ;
+ Text [ norwegian ] = "Page" ;
+ Text [ italian ] = "Pagina" ;
+ Text [ portuguese_brazilian ] = "Página" ;
+ Text [ portuguese ] = "Página" ;
+ Text [ finnish ] = "Sivu" ;
+ Text [ danish ] = "Side" ;
+ Text [ french ] = "Page" ;
+ Text [ swedish ] = "Sida" ;
+ Text [ dutch ] = "Pagina" ;
+ Text [ spanish ] = "Página" ;
+ Text [ english_us ] = "Page" ;
+ Text[ chinese_simplified ] = "Ò³";
+ Text[ russian ] = "Ñòðàíèöà";
+ Text[ polish ] = "Strona";
+ Text[ japanese ] = "Íß°¼Þ";
+ Text[ chinese_traditional ] = "­¶";
+ Text[ arabic ] = "ÇáÕÝÍÉ";
+ Text[ greek ] = "Óåëßäá";
+ Text[ korean ] = "ÆäÀÌÁö";
+ Text[ turkish ] = "Sayfa";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PAGE_SIZE
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_MAXSIZE
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_PAPERTRAY
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_PAPERBIN
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_APP
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_EXT1
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_EXT2
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_HEADERSET
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_FOOTERSET
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_ON
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_DYNAMIC
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_SHARED
+{
+ Text = "?" ;
+};
+String RID_ATTR_PAGE_BSP
+{
+ Text = "?" ;
+};
+String RID_ATTR_CHAR_MAPTYPE
+{
+ Text = "?" ;
+};
+String RID_ATTR_PARA_MODEL
+{
+ Text = "Seitenvorlage" ;
+ Text [ English ] = "Stylesheets" ;
+ Text [ norwegian ] = "Stilark" ;
+ Text [ italian ] = "Modelli di pagina" ;
+ Text [ portuguese_brazilian ] = "Folhas de Estilo" ;
+ Text [ portuguese ] = "Estilo de página" ;
+ Text [ finnish ] = "Tyylitiedostot" ;
+ Text [ danish ] = "Sidetypografi" ;
+ Text [ french ] = "Style de page" ;
+ Text [ swedish ] = "Sidformatmall" ;
+ Text [ dutch ] = "Opmaakprofielen" ;
+ Text [ spanish ] = "Estilo de página" ;
+ Text [ english_us ] = "Page Style" ;
+ Text[ chinese_simplified ] = "Ò³ÃæÑùʽ";
+ Text[ russian ] = "Ñòèëü ñòðàíèöû";
+ Text[ polish ] = "Styl strony";
+ Text[ japanese ] = "Íß°¼Þ½À²Ù";
+ Text[ chinese_traditional ] = "­¶­±¼Ë¦¡";
+ Text[ arabic ] = "äãØ ÕÝÍÉ";
+ Text[ greek ] = "Ðñüôõðï óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö À¯Çü";
+ Text[ turkish ] = "Sayfa biçimi";
+ Text[ language_user1 ] = " ";
+};
+String RID_ATTR_PARA_KEEP
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Absätze zusammenhalten : Absõtze zusammenhalten */
+ Text = "Absätze zusammenhalten" ;
+ Text [ English ] = "Keep paragraphs together" ;
+ Text [ norwegian ] = "Hold avsnitt samlet" ;
+ Text [ italian ] = "Tieni paragrafi assieme" ;
+ Text [ portuguese_brazilian ] = "Manter parágrafos juntos" ;
+ Text [ portuguese ] = "Manter parágrafos juntos" ;
+ Text [ finnish ] = "Pidä kappaleet yhdessä" ;
+ Text [ danish ] = "Hold sammen med næste afsnit" ;
+ Text [ french ] = "Paragraphes solidaires" ;
+ Text [ swedish ] = "Håll ihop stycken" ;
+ Text [ dutch ] = "Alinea's bijeenhouden" ;
+ Text [ spanish ] = "Mantener párrafos juntos" ;
+ Text [ english_us ] = "Keep with Next Paragraph" ;
+ Text[ chinese_simplified ] = "²»·Ö¿ª¶ÎÂä";
+ Text[ russian ] = "Âìåñòå ñî ñëåäóþùèì àáçàöåì";
+ Text[ polish ] = "Razem z nastêpnym";
+ Text[ japanese ] = "’i—Ž‚ÌÚ‡";
+ Text[ chinese_traditional ] = "¤£¤À¶}¬q¸¨";
+ Text[ arabic ] = "ÊÑÇÈØ ÇáÝÞÑÇÊ";
+ Text[ greek ] = "ÄéáôÞñçóç ðáñáãñÜöùí ìáæß";
+ Text[ korean ] = "´Ü¶ôµéÀ» °°Àº ÆäÀÌÁö¿¡";
+ Text[ turkish ] = "Paragraflarý bir arada tut";
+ Text[ language_user1 ] = " ";
+};
+String RID_SINGLE_LINE0
+{
+ Text = "Einfach, Haarlinie" ;
+ Text [ English ] = "Single, Fine line" ;
+ Text [ portuguese ] = "Simples, linha fina" ;
+ Text [ english_us ] = "Single, fine lines" ;
+ Text [ portuguese_brazilian ] = "Einfach, Haarlinie" ;
+ Text [ swedish ] = "Enkel, fin linje" ;
+ Text [ danish ] = "Enkelt, hårfin streg" ;
+ Text [ italian ] = "Semplice, linea sottile" ;
+ Text [ spanish ] = "Sencillo, líneas finas" ;
+ Text [ french ] = "Ligne pointillée" ;
+ Text [ dutch ] = "Enkel, haarlijn" ;
+ Text[ chinese_simplified ] = "µ¥£¬Ï¸Ïß";
+ Text[ russian ] = "Îáû÷íàÿ ëèíèÿ, î÷åíü òîíêàÿ";
+ Text[ polish ] = "Pojedyncza, bardzo cienka linia";
+ Text[ japanese ] = "ü¤‹É×";
+ Text[ chinese_traditional ] = "³æ¡M²Ó½u";
+ Text[ arabic ] = "ãÝÑÏ¡ ÎØ ÏÞíÞ";
+ Text[ greek ] = "ÁðëÞ ëåðôÞ ãñáììÞ";
+ Text[ korean ] = "´ÜÀÏ °¡´Â ¼±";
+ Text[ turkish ] = "Tek, Ýnce Çizgi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SINGLE_LINE1
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Einfach, dünn : Einfach, d³nn */
+ Text = "Einfach, dünn" ;
+ Text [ English ] = "Single, thin" ;
+ Text [ portuguese ] = "Simples, fina" ;
+ Text [ english_us ] = "Single, thin" ;
+ Text [ portuguese_brazilian ] = "Einfach, dünn" ;
+ Text [ swedish ] = "Enkel, tunn" ;
+ Text [ danish ] = "Enkelt, tynd" ;
+ Text [ italian ] = "Semplice, sottile" ;
+ Text [ spanish ] = "Sencilla, delgada" ;
+ Text [ french ] = "Ligne fine" ;
+ Text [ dutch ] = "Eenvoudig, dun" ;
+ Text[ chinese_simplified ] = "µ¥£¬Ï¸";
+ Text[ russian ] = "Îáû÷íàÿ òîíêàÿ ëèíèÿ";
+ Text[ polish ] = "Pojedyncza, cienka";
+ Text[ japanese ] = "ü¤×‚¢";
+ Text[ chinese_traditional ] = "³æ¡M²Ó";
+ Text[ arabic ] = "ãÝÑÏ¡ ÑÝíÚ";
+ Text[ greek ] = "Áðëü, ëåðôü";
+ Text[ korean ] = "´ÜÀÏ, ¾ãÀ½";
+ Text[ turkish ] = "Tek, Ýnce";
+ Text[ language_user1 ] = " ";
+};
+String RID_SINGLE_LINE2
+{
+ Text = "Einfach, dick" ;
+ Text [ English ] = "Single, thick" ;
+ Text [ portuguese ] = "Simples, grossa" ;
+ Text [ english_us ] = "Single, thick" ;
+ Text [ portuguese_brazilian ] = "Einfach, dick" ;
+ Text [ swedish ] = "Enkel, tjock" ;
+ Text [ danish ] = "Enkelt, tyk" ;
+ Text [ italian ] = "Semplice, spesso" ;
+ Text [ spanish ] = "Sencilla, gruesa" ;
+ Text [ french ] = "Ligne épaisse" ;
+ Text [ dutch ] = "Eenvoudig, dik" ;
+ Text[ chinese_simplified ] = "µ¥£¬´Ö";
+ Text[ russian ] = "Îáû÷íàÿ òîëñòàÿ ëèíèÿ";
+ Text[ polish ] = "Pojedyncza, gruba";
+ Text[ japanese ] = "ü¤‘¾‚¢";
+ Text[ chinese_traditional ] = "³æ¡M²Ê";
+ Text[ arabic ] = "ãÝÑÏ¡ ËÎíä";
+ Text[ greek ] = "Áðëü, ðá÷ý";
+ Text[ korean ] = "´ÜÀÏ, µÎ²¨¿ò";
+ Text[ turkish ] = "Tek, Kalýn";
+ Text[ language_user1 ] = " ";
+};
+String RID_SINGLE_LINE3
+{
+ Text = "Einfach, sehr dick" ;
+ Text [ English ] = "Single, very thick" ;
+ Text [ portuguese ] = "Simples, muito grossa" ;
+ Text [ english_us ] = "Single, very thick" ;
+ Text [ portuguese_brazilian ] = "Einfach, sehr dick" ;
+ Text [ swedish ] = "Enkel, mycket tjock" ;
+ Text [ danish ] = "Enkelt, meget tyk" ;
+ Text [ italian ] = "Semplice, molto spesso" ;
+ Text [ spanish ] = "Sencilla, muy gruesa" ;
+ Text [ french ] = "Ligne extra épaisse" ;
+ Text [ dutch ] = "Eenvoudig, zeer dik" ;
+ Text[ chinese_simplified ] = "µ¥£¬ºÜ´Ö";
+ Text[ russian ] = "Îáû÷íàÿ, î÷åíü òîëñòàÿ ëèíèÿ";
+ Text[ polish ] = "Pojedyncza, bardzo gruba";
+ Text[ japanese ] = "ü¤‹É‘¾";
+ Text[ chinese_traditional ] = "³æ¡M«Ü²Ê";
+ Text[ arabic ] = "ãÝÑÏ¡ ËÎíä ÌÏÇð";
+ Text[ greek ] = "Áðëü, ðïëý ðá÷ý";
+ Text[ korean ] = "´ÜÀÏ, ¸Å¿ì µÎ²¨¿ò";
+ Text[ turkish ] = "Tek, Çok kalýn";
+ Text[ language_user1 ] = " ";
+};
+String RID_SINGLE_LINE4
+{
+ Text = "Einfach, fett" ;
+ Text [ English ] = "Single, bold" ;
+ Text [ portuguese ] = "Simples, negrito" ;
+ Text [ english_us ] = "Single, bold" ;
+ Text [ portuguese_brazilian ] = "Einfach, fett" ;
+ Text [ swedish ] = "Enkel, fet" ;
+ Text [ danish ] = "Enkelt, fed" ;
+ Text [ italian ] = "Semplice, grassetto" ;
+ Text [ spanish ] = "Sencillo, negrita" ;
+ Text [ french ] = "Ligne grasse" ;
+ Text [ dutch ] = "Eenvoudig, vet" ;
+ Text[ chinese_simplified ] = "µ¥£¬´Ö";
+ Text[ russian ] = "Îáû÷íàÿ, æèðíàÿ ëèíèÿ";
+ Text[ polish ] = "Pojedyncza, gruba";
+ Text[ japanese ] = "ü¤‘¾Žš";
+ Text[ chinese_traditional ] = "³æ¡M²Ê";
+ Text[ arabic ] = "ãÝÑÏ¡ ÚÑíÖ";
+ Text[ greek ] = "ÁðëÜ, Ýíôïíá";
+ Text[ korean ] = "´ÜÀÏ, ÁøÇÔ";
+ Text[ turkish ] = "Tek, Kalýn";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE0
+{
+ Text = "Doppelt, Haarlinie, Abstand: klein" ;
+ Text [ English ] = "Double, Fine line, Dist.: small" ;
+ Text [ portuguese ] = "Dupla, linha fina, espaçamento: pequeno" ;
+ Text [ english_us ] = "Double, fine lines, spacing: small" ;
+ Text [ portuguese_brazilian ] = "Doppelt, Haarlinie, Abstand: klein" ;
+ Text [ swedish ] = "Dubbel, fin linje, avstånd: litet" ;
+ Text [ danish ] = "Dobbelt, hårfin streg, afstand: lille" ;
+ Text [ italian ] = "Doppio, linea sottile, distanza: piccola" ;
+ Text [ spanish ] = "Doble, Líneas finas, Espacio: pequeño" ;
+ Text [ french ] = "Double, pointillé, écart : petit" ;
+ Text [ dutch ] = "Dubbel, haarlijn, afstand: klein" ;
+ Text[ chinese_simplified ] = "Ë«£»Ï¸Ïߣ»¼ä¸ô£ºÐ¡";
+ Text[ russian ] = "Äâîéíàÿ, î÷åíü òîíêàÿ ëèíèÿ, èíòåðâàë: êîðîòêèé";
+ Text[ polish ] = "Podwójne, Bardzo cienkie linie, Odstêp: ma³y";
+ Text[ japanese ] = "“ñdü¤‹ÉפŠÔŠu:‹·‚¢";
+ Text[ chinese_traditional ] = "Âù¡A²Ó½u¡A¶¡¹j¡G¤p";
+ Text[ arabic ] = "ãÒÏæÌ¡ ÎØ ÏÞíÞ¡ ÇáÊÈÇÚÏ: ÕÛíÑ";
+ Text[ greek ] = "ÄéðëÞ, ëåðôÞ ãñáììÞ, Áðüóôáóç: ìéêñÞ";
+ Text[ korean ] = "ÀÌÁß, °¡´Â ¼±, °£°Ý: ÀÛ°Ô";
+ Text[ turkish ] = "Çift, Ýnce çizgi, Aralýk: küçük";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE1
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Doppelt, Haarlinie, Abstand: groß : Doppelt, Haarlinie, Abstand: gro˜ */
+ Text = "Doppelt, Haarlinie, Abstand: groß" ;
+ Text [ English ] = "Double, Fine line, Dist.: big" ;
+ Text [ portuguese ] = "Dupla, linha fina, espaçamento: grande" ;
+ Text [ english_us ] = "Double, fine line, spacing: large" ;
+ Text [ portuguese_brazilian ] = "Doppelt, Haarlinie, Abstand: groß" ;
+ Text [ swedish ] = "Dubbel, fin linje, avstånd: stort" ;
+ Text [ danish ] = "Dobbelt, hårfin streg, afstand: stor" ;
+ Text [ italian ] = "Doppio, linea sottile, distanza: grande" ;
+ Text [ spanish ] = "Doble, Línea fina, Espacio: grande" ;
+ Text [ french ] = "Double, pointillé, écart : grand" ;
+ Text [ dutch ] = "Dubbel, haarlijn, afstand: groot" ;
+ Text[ chinese_simplified ] = "Ë«£¬Ï¸Ïߣ¬¼ä¸ô£º´ó";
+ Text[ russian ] = "Äâîéíàÿ, î÷åíü òîíêàÿ ëèíèÿ, èíòåðâàë: äëèííûé";
+ Text[ polish ] = "Podwójna, Bardzo cienka linia, Odstêp: du¿y";
+ Text[ japanese ] = "“ñdü¤×‚¢ü¤ŠÔŠu:L‚¢";
+ Text[ chinese_traditional ] = "Âù¡A²Ó½u¡A¶¡¹j¡G¤j";
+ Text[ arabic ] = "ãÒÏæÌ¡ ÎØ ÏÞíÞ¡ ÇáÊÈÇÚÏ: ßÈíÑ";
+ Text[ greek ] = "ÄéðëÞ, ëåðôÞ ãñáììÞ, Áðüóôáóç: ìåãÜëç";
+ Text[ korean ] = "ÀÌÁß, °¡´Â ¼±, °£°Ý: Å©°Ô";
+ Text[ turkish ] = "Çift, Ýnce çizgi, Aralýk: büyük";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE2
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Doppelt, dünn, Abstand: klein : Doppelt, d³nn, Abstand: klein */
+ Text = "Doppelt, dünn, Abstand: klein" ;
+ Text [ English ] = "Double, thin, Dist.: small" ;
+ Text [ portuguese ] = "Dupla, fina, espaçamento: pequeno" ;
+ Text [ english_us ] = "Double, thin, spacing: small" ;
+ Text [ portuguese_brazilian ] = "Doppelt, dünn, Abstand: klein" ;
+ Text [ swedish ] = "Dubbel, tunn, avstånd: litet" ;
+ Text [ danish ] = "Dobbelt, tynd, afstand: lille" ;
+ Text [ italian ] = "Doppio, sottile, distanza: piccola" ;
+ Text [ spanish ] = "Doble, delgada, Espacio: pequeño" ;
+ Text [ french ] = "Double, fine, écart : petit" ;
+ Text [ dutch ] = "Dubbel, dun, afstand: klein" ;
+ Text[ chinese_simplified ] = "Ë«£¬Ï¸£¬¼ä¸ô£ºÐ¡";
+ Text[ russian ] = "Äâîéíàÿ ëèíèÿ, òîíêàÿ, èíòåðâàë: êîðîòêèé";
+ Text[ polish ] = "Podwójna, cienka, Odstêp: ma³y";
+ Text[ japanese ] = "“ñdü¤×‚¢¤ŠÔŠu:‹·‚¢";
+ Text[ chinese_traditional ] = "Âù¡A²Ó¡A¶¡¹j¡G¤p";
+ Text[ arabic ] = "ãÒÏæÌ¡ ÑÝíÚ¡ ÇáÊÈÇÚÏ: ÕÛíÑ";
+ Text[ greek ] = "ÄéðëÜ, ëåðôÞ, Áðüóôáóç: ìéêñÞ";
+ Text[ korean ] = "ÀÌÁß, ¾ã°Ô, °£°Ý: ÀÛ°Ô";
+ Text[ turkish ] = "Çift, Ýnce, Aralýk: küçük";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE3
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Doppelt, dick, Abstand: groß : Doppelt, dick, Abstand: gro˜ */
+ Text = "Doppelt, dick, Abstand: groß" ;
+ Text [ English ] = "Double, thin, Dist.: big" ;
+ Text [ portuguese ] = "Dupla, grossa, espaçamento: grande" ;
+ Text [ english_us ] = "Double, thick, spacing: large" ;
+ Text [ portuguese_brazilian ] = "Doppelt, dick, Abstand: groß" ;
+ Text [ swedish ] = "Dubbel, tjock, avstånd: stort" ;
+ Text [ danish ] = "Dobbelt, tyk, afstand: stor" ;
+ Text [ italian ] = "Doppio, spesso, distanza: grande" ;
+ Text [ spanish ] = "Doble, gruesa, Espacio: grande" ;
+ Text [ french ] = "Double, épaisse, écart : grand" ;
+ Text [ dutch ] = "Dubbel, dik, afstand: groot" ;
+ Text[ chinese_simplified ] = "Ë«£¬´Ö£¬¼ä¸ô£º´ó";
+ Text[ russian ] = "Äâîéíàÿ, òîëñòàÿ ëèíèÿ, èíòåðâàë:äëèííûé";
+ Text[ polish ] = "Podwójna, gruba, Odstêp: du¿y";
+ Text[ japanese ] = "“ñdü¤‘¾‚¢¤ŠÔŠu:L‚¢";
+ Text[ chinese_traditional ] = "Âù¡A²Ê¡A¶¡¹j¡G¤j";
+ Text[ arabic ] = "ãÒÏæÌ¡ ËÎíä¡ ÇáÊÈÇÚÏ: ßÈíÑ";
+ Text[ greek ] = "ÄéðëÜ, ðá÷ý, Áðüóôáóç: ìåãÜëç";
+ Text[ korean ] = "ÀÌÁß, µÎ²®°Ô, °£°Ý: Å©°Ô";
+ Text[ turkish ] = "Çift, Kalýn, Aralýk: büyük";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE4
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Doppelt, Innen: Haarlinie, Außen: dünn, Abstand: groß : Doppelt, Innen: Haarlinie, Au˜en: d³nn, Abstand: gro˜ */
+ Text = "Doppelt, Innen: Haarlinie, Außen: dünn, Abstand: groß" ;
+ Text [ English ] = "Double, In: Fine line, Out: thin, Dist.: big" ;
+ Text [ portuguese ] = "Dupla, Interior: linhas finas, Exterior: fina, Espaçamento: grande" ;
+ Text [ english_us ] = "Double, inside: fine lines, outside: thin, spacing: large" ;
+ Text [ portuguese_brazilian ] = "Doppelt, Innen: Haarlinie, Außen: dünn, Abstand: groß" ;
+ Text [ swedish ] = "Dubbel, innanför: fin linje, utanför: tunn avstånd: stort" ;
+ Text [ danish ] = "Dobbelt, inderside: hårfin streg, yderside: tynd, afstand: stor" ;
+ Text [ italian ] = "Doppio, interno: linea sottile, esterno: sottile, distanza: grande" ;
+ Text [ spanish ] = "Doble, interior: Línea fina, exterior: delgada, Espacio: grande" ;
+ Text [ french ] = "Double, intérieure : pointillé, extérieure : fine, écart: grand" ;
+ Text [ dutch ] = "Dubbel, binnen: haarlijn, buiten: dun, afstand: groot" ;
+ Text[ chinese_simplified ] = "Ë«£¬ÄÚ£ºÏ¸Ïߣ¬Í⣺ϸ£¬¼ä¸ô£º´ó";
+ Text[ russian ] = "Äâîéíàÿ ëèíèÿ, âíóòðè: î÷åíü òîíêàÿ, ñíàðóæè: òîíêàÿ, èíòåðâàë: äëèííûé";
+ Text[ polish ] = "Podwójna, Wewnêtrzna: Bardzo cienka linia, Zewnêtrzna: cienka, Odstêp: du¿y";
+ Text[ japanese ] = "“ñdü¤“à‘¤:‹ÉפŠO‘¤:•ÀפŠÔŠu:L‚¢";
+ Text[ chinese_traditional ] = "Âù¡A¤º¡G²Ó½u¡A¥~¡G²Ó¡A¶¡¹j¡G¤j";
+ Text[ arabic ] = "ãÒÏæÌ¡ ÇáÏÇÎá: ÎØ ÏÞíÞ¡ ÇáÎÇÑÌ: ÑÝíÚ¡ ÇáÊÈÇÚÏ: ßÈíÑ";
+ Text[ greek ] = "ÄéðëÞ, ÅóùôåñéêÜ: ëåðôÞ ãñáììÞ, ÅîùôåñéêÜ: ëåðôÞ, Áðüóôáóç: ìåãÜëç";
+ Text[ korean ] = "ÀÌÁß, ¾È: °¡´Â ¼±, ¹Ù±ù: ¾ã°Ô, °£°Ý: Å©°Ô";
+ Text[ turkish ] = "Çift, Ýç: ince çizgi, Dýþ: ince, Aralýk: büyük";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE5
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Doppelt, Innen: Haarlinie, Außen: dick, Abstand: groß : Doppelt, Innen: Haarlinie, Au˜en: dick, Abstand: gro˜ */
+ Text = "Doppelt, Innen: Haarlinie, Außen: dick, Abstand: groß" ;
+ Text [ English ] = "Double, In: Fine line, Out: thick, Dist.: big" ;
+ Text [ portuguese ] = "Dupla, Interior: linhas finas, Exterior: grossa, Espaçamento: grande" ;
+ Text [ english_us ] = "Double, inside: fine lines, outside: thick, spacing: large" ;
+ Text [ portuguese_brazilian ] = "Doppelt, Innen: Haarlinie, Außen: dick, Abstand: groß" ;
+ Text [ swedish ] = "Dubbel, innanför: fin linje, utanför: tjock, avstånd: stort" ;
+ Text [ danish ] = "Dobbelt, inderside: hårfin streg, yderside: tyk, afstand: stor" ;
+ Text [ italian ] = "Doppio, interno: linea sottile, esterno: spesso, distanza: grande" ;
+ Text [ spanish ] = "Doble, interior: Línea fina, exterior: gruesa, Espacio: grande" ;
+ Text [ french ] = "Double, intérieure : pointillé, extérieure : épaisse, écart : grand" ;
+ Text [ dutch ] = "Dubbel, binnen: haarlijn, buiten: dik, afstand: groot" ;
+ Text[ chinese_simplified ] = "Ë«£¬ÄÚ£ºÏ¸Ïߣ¬Í⣺´Ö£¬¼ä¸ô£º´ó";
+ Text[ russian ] = "Äâîéíàÿ ëèíèÿ, âíóòðè: î÷åíü òîíêàÿ, ñíàðóæè: òîëñòàÿ, èíòåðâàë: äëèííûé";
+ Text[ polish ] = "Podwójna, Wewnêtrzna: Bardzo cienka linia, Zewnêtrzna: gruba, Odstêp: du¿y";
+ Text[ japanese ] = "“ñdü¤“à‘¤:‹ÉפŠO‘¤:•À‘¾¤ŠÔŠu:L‚¢";
+ Text[ chinese_traditional ] = "Âù¡A¤º¡G²Ó½u¡A¥~¡G²Ê¡A¶¡¹j¡G¤j";
+ Text[ arabic ] = "ãÒÏæÌ¡ ÇáÏÇÎá: ÎØ ÏÞíÞ¡ ÇáÎÇÑÌ: ËÎíä¡ ÇáÊÈÇÚÏ: ßÈíÑ";
+ Text[ greek ] = "ÄéðëÞ, ÅóùôåñéêÜ: ëåðôÞ ãñáììÞ, ÅîùôåñéêÜ: Ýíôïíç, Áðüóôáóç: ìéêñÞ";
+ Text[ korean ] = "ÀÌÁß, ¾È: °¡´Â ¼±, ¹Ù±ù: µÎ²®°Ô, °£°Ý: Å©°Ô";
+ Text[ turkish ] = "Çift, Ýç: ince çizgi, Dýþ: kalýn, Aralýk: büyük";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE6
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Doppelt, Innen: Haarlinie, Außen: sehr dick, Abstand: groß : Doppelt, Innen: Haarlinie, Au˜en: sehr dick, Abstand: gro˜ */
+ Text = "Doppelt, Innen: Haarlinie, Außen: sehr dick, Abstand: groß" ;
+ Text [ English ] = "Double, In: Fine line, Out: very thick, Dist.: big" ;
+ Text [ portuguese ] = "Dupla, Interior: linhas finas, Exterior: muito grossa, Espaçamento: grande" ;
+ Text [ english_us ] = "Double, inside: fine lines, outside: very thick, spacing: large" ;
+ Text [ portuguese_brazilian ] = "Doppelt, Innen: Haarlinie, Außen: sehr dick, Abstand: groß" ;
+ Text [ swedish ] = "Dubbel, innanför: fin linje, utanför: mycket tjock, avstånd: stort" ;
+ Text [ danish ] = "Dobbelt, inderside: hårfin streg, yderside: meget tyk, afstand: stor" ;
+ Text [ italian ] = "Doppio, interno: linea sottile, esterno: molto spesso, distanza: grande" ;
+ Text [ spanish ] = "Doble, interior: Línea fina, exterior: muy gruesa, Espacio: grande" ;
+ Text [ french ] = "Double, intérieure : pointillé, extérieure : très épaisse, écart : grand" ;
+ Text [ dutch ] = "Dubbel, binnen: haarlijn, buiten: zeer dik, afstand: groot" ;
+ Text[ chinese_simplified ] = "Ë«£¬ÄÚ£ºÏ¸Ïߣ¬Í⣺ºÜ´Ö£¬¼ä¸ô£º´ó";
+ Text[ russian ] = "Äâîéíàÿ ëèíèÿ, âíóòðè: î÷åíü òîíêàÿ, ñíàðóæè: î÷åíü òîëñòàÿ, èíòåðâàë: äëèííûé";
+ Text[ polish ] = "Podwójna, Zewnêtrzna: Bardzo cienka linia, Zewnêtrzna: bardzo gruba, Odstêp: du¿y";
+ Text[ japanese ] = "“ñdü¤“à‘¤:‹ÉפŠO‘¤:‹É‘¾¤ŠÔŠu:L‚¢";
+ Text[ chinese_traditional ] = "Âù¡A¤º¡G²Ó½u¡A¥~¡G«Ü²Ê¡A¶¡¹j¡G¤j";
+ Text[ arabic ] = "ãÒÏæÌ¡ ÇáÏÇÎá: ÎØ ÏÞíÞ¡ ÇáÎÇÑÌ: ËÎíä ÌÏÇð¡ ÇáÊÈÇÚÏ: ßÈíÑ";
+ Text[ greek ] = "ÄéðëÞ, ÅóùôåñéêÜ: ëåðôÞ ãñáììÞ, ÅîùôåñéêÜ: ðïëý Ýíôïíç, Áðüóôáóç: ìåãÜëç";
+ Text[ korean ] = "ÀÌÁß, ¾È: °¡´Â ¼±, ¹Ù±ù: ¸Å¿ì µÎ²®°Ô, °£°Ý: Å©°Ô";
+ Text[ turkish ] = "Çift, Ýç: ince çizgi, Dýþ: çok kalýn, Aralýk: büyük";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE7
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Doppelt, Innen: dünn, Außen: dick, Abstand: groß : Doppelt, Innen: d³nn, Au˜en: dick, Abstand: gro˜ */
+ Text = "Doppelt, Innen: dünn, Außen: dick, Abstand: groß" ;
+ Text [ English ] = "Double, In: thin, Out: thick, Dist.: big" ;
+ Text [ portuguese ] = "Dupla, Interior: fina, Exterior: grossa, Espaçamento: grande" ;
+ Text [ english_us ] = "Double, inside: thin, outside: thick, spacing: large" ;
+ Text [ portuguese_brazilian ] = "Doppelt, Innen: dünn, Außen: dick, Abstand: groß" ;
+ Text [ swedish ] = "Dubbel, innanför: tunn, utanför: tjock, avstånd: stort" ;
+ Text [ danish ] = "Dobbelt, inderside: tynd, yderside: tyk, afstand: stor" ;
+ Text [ italian ] = "Doppio, interno: sottile, esterno: spesso, distanza: grande" ;
+ Text [ spanish ] = "Doble, interior: fina, exterior: gruesa, Espacio: grande" ;
+ Text [ french ] = "Double, intérieure : fine, extérieure : épaisse, écart : grande" ;
+ Text [ dutch ] = "Dubbel, binnen: dun, buiten: dik, afstand: groot" ;
+ Text[ chinese_simplified ] = "Ë«£¬ÄÚ£ºÏ¸£¬Í⣺´Ö£¬¼ä¸ô£º´ó";
+ Text[ russian ] = "Äâîéíàÿ ëèíèÿ, âíóòðè: òîíêàÿ, ñíàðóæè: òîëñòàÿ, èíòåðâàë: äëèííûé";
+ Text[ polish ] = "Podwójna, Wewnêtrzna: cienka, Zewnêtrzna: gruba, Odstêp: du¿y";
+ Text[ japanese ] = "“ñdü¤“à‘¤:ׂ¢¤ŠO‘¤:‘¾‚¢¤ŠÔŠu:L‚¢";
+ Text[ chinese_traditional ] = "Âù¡A¤º¡G²Ó¡A¥~¡G²Ê¡A¶¡¹j¡G¤j";
+ Text[ arabic ] = "ãÒÏæÌ¡ ÇáÏÇÎá: ÑÝíÚ¡ ÇáÎÇÑÌ: ËÎíä¡ ÇáÊÈÇÚÏ: ßÈíÑ";
+ Text[ greek ] = "ÄéðëÜ, ÅóùôåñéêÜ: ëåðôü, ÅîùôåñéêÜ: ðá÷ý, Áðüóôáóç: ìåãÜëç";
+ Text[ korean ] = "ÀÌÁß, ¾È: ¾ã°Ô, ¹Ù±ù: µÎ²®°Ô, °£°Ý: Å©°Ô";
+ Text[ turkish ] = "Çift, Ýç: ince, Dýþ: kalýn, Aralýk: büyük";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE8
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Doppelt, Innen: dick, Außen: dünn, Abstand: klein : Doppelt, Innen: dick, Au˜en: d³nn, Abstand: klein */
+ Text = "Doppelt, Innen: dick, Außen: dünn, Abstand: klein" ;
+ Text [ English ] = "Double, In: thick, Out: thin, Dist.: small" ;
+ Text [ portuguese ] = "Dupla, Interior: grossa, Exterior: fina, Espaçamento: pequeno" ;
+ Text [ english_us ] = "Double, inside: thick, outside: thin, spacing: small" ;
+ Text [ portuguese_brazilian ] = "Doppelt, Innen: dick, Außen: dünn, Abstand: klein" ;
+ Text [ swedish ] = "Dubbel, innanför: tjock, utanför: tunn, avstånd: litet" ;
+ Text [ danish ] = "Dobbelt, inderside: tyk, yderside: tynd, afstand: lille" ;
+ Text [ italian ] = "Doppio, interno: spesso, esterno: sottile, distanza: piccola" ;
+ Text [ spanish ] = "Doble, interior: gruesa, exterior: delgada, Espacio: pequeño" ;
+ Text [ french ] = "Double, intérieure : épaisse, extérieure : fine, écart : petit" ;
+ Text [ dutch ] = "Dubbel, binnen: dik, buiten: dun, afstand: klein" ;
+ Text[ chinese_simplified ] = "Ë«, ÄÚ: ´Ö, Íâ: ϸ, ¼ä¸ô: С";
+ Text[ russian ] = "Äâîéíàÿ ëèíèÿ, âíóòðè: òîëñòàÿ, ñíàðóæè òîíêàÿ, èíòåðâàë: êîðîòêèé";
+ Text[ polish ] = "Podwójna, Wewnêtrzna: gruba; Zewnêtrzna: cienka, Odstêp: du¿y";
+ Text[ japanese ] = "“ñdü¤“à‘¤:‘¾‚¢¤ŠO‘¤:ׂ¢¤ŠÔŠu:‹·‚¢";
+ Text[ chinese_traditional ] = "Âù, ¤º: ²Ê, ¥~: ²Ó, ¶¡¹j: ¤p";
+ Text[ arabic ] = "ãÒÏæÌ¡ ÇáÏÇÎá: ËÎíä¡ ÇáÎÇÑÌ: ÑÝíÚ¡ ÇáÊÈÇÚÏ: ÕÛíÑ";
+ Text[ greek ] = "ÄéðëÜ, ÅóùôåñéêÜ: ðá÷ý, ÅîùôåñéêÜ: ëåðôü, Áðüóôáóç: ìéêñÞ";
+ Text[ korean ] = "ÀÌÁß, ¾È: µÎ²®°Ô, ¹Ù±ù: ¾ã°Ô, °£°Ý: ÀÛ°Ô";
+ Text[ turkish ] = "Çift, Ýç: kalýn, Dýþ: ince, Aralýk: küçük";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE9
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Doppelt, Innen: dick, Außen: sehr dick, Abstand: groß : Doppelt, Innen: dick, Au˜en: sehr dick, Abstand: gro˜ */
+ Text = "Doppelt, Innen: dick, Außen: sehr dick, Abstand: groß" ;
+ Text [ English ] = "Double, In: thick, Out: very thick, Dist.: big" ;
+ Text [ portuguese ] = "Dupla, Interior: grossa, Exterior: muito grossa, Espaçamento: grande" ;
+ Text [ english_us ] = "Double, inside: thick, outside: very thick, spacing: large" ;
+ Text [ portuguese_brazilian ] = "Doppelt, Innen: dick, Außen: sehr dick, Abstand: groß" ;
+ Text [ swedish ] = "Dubbel, innanför: tjock, utanför: mycket tjock, avstånd: stort" ;
+ Text [ danish ] = "Dobbelt, inderside: tyk, yderside: meget tyk, afstand: stor" ;
+ Text [ italian ] = "Doppio, interno: molto spesso, distanza: grande" ;
+ Text [ spanish ] = "Doble, interior: gruesa, Exterior: muy gruesa, Espacio: grande" ;
+ Text [ french ] = "Double, intérieure : épaisse, extérieure : très épaisse, écart : grand" ;
+ Text [ dutch ] = "Dubbel, binnen: dik, buiten: zeer dik, afstand: groot" ;
+ Text[ chinese_simplified ] = "Ë«£¬ÄÚ£º´Ö£¬Í⣺ºÜ´Ö£¬¼ä¸ô£º´ó";
+ Text[ russian ] = "Äâîéíàÿ ëèíèÿ, âíóòðè: òîëñòàÿ, ñíàðóæè: î÷åíü òîëñòàÿ, èíòåðâàë: äëèííûé";
+ Text[ polish ] = "Podwójna, Wewnêtrzna: gruba, Zewnêtrzna: bardzo gruba, Odstêp: du¿y";
+ Text[ japanese ] = "“ñdü¤“à‘¤:•À‘¾¤ŠO‘¤:‹É‘¾¤ŠÔŠu:L‚¢";
+ Text[ chinese_traditional ] = "Âù¡A¤º¡G²Ê¡A¥~¡G«Ü²Ê¡A¶¡¹j¡G¤j";
+ Text[ arabic ] = "ãÒÏæÌ¡ ÇáÏÇÎá: ËÎíä¡ ÇáÎÇÑÌ: ËÎíä ÌÏÇð¡ ÇáÊÈÇÚÏ: ßÈíÑ";
+ Text[ greek ] = "ÄéðëÜ, ÅóùôåñéêÜ: ðá÷ý, ÅîùôåñéêÜ: ðïëý Ýíôïíï, Áðüóôáóç: ìåãÜëç";
+ Text[ korean ] = "ÀÌÁß, ¾È: µÎ²®°Ô, ¹Ù±ù: ¸Å¿ì µÎ²®°Ô, °£°Ý: Å©°Ô";
+ Text[ turkish ] = "Çift, Ýç: kalýn, Dýþ: çok kalýn, Aralýk: büyük";
+ Text[ language_user1 ] = " ";
+};
+String RID_DOUBLE_LINE10
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Doppelt, Innen: sehr dick, Außen: dick, Abstand: groß : Doppelt, Innen: sehr dick, Au˜en: dick, Abstand: gro˜ */
+ Text = "Doppelt, Innen: sehr dick, Außen: dick, Abstand: groß" ;
+ Text [ English ] = "Double, In: very thick, Out: thick, Dist.: big" ;
+ Text [ portuguese ] = "Dupla, Interior: muito grossa, Exterior: grossa, Espaçamento: grande" ;
+ Text [ english_us ] = "Double, inside: very thick, outside: thick, Spacing: large" ;
+ Text [ portuguese_brazilian ] = "Doppelt, Innen: sehr dick, Außen: dick, Abstand: groß" ;
+ Text [ swedish ] = "Dubbel, innanför: mycket tjock, utanför: tjock, avstånd: stort" ;
+ Text [ danish ] = "Dobbelt, inderside: meget tyk, yderside: tyk, afstand: stor" ;
+ Text [ italian ] = "Doppio, interno: molto spesso, esterno:spesso, distanza: grande" ;
+ Text [ spanish ] = "Doble, interior: muy gruesa, Exterior: gruesa, Espacio: grande" ;
+ Text [ french ] = "Double, intérieure : très épaisse, extérieure : épaisse, écart : grand" ;
+ Text [ dutch ] = "Dubbel, binnen: zeer dik, buiten: dik, afstand: groot" ;
+ Text[ chinese_simplified ] = "Ë«£¬ÄÚ£ººÜ´Ö£¬Í⣺´Ö£¬¼ä¸ô£º´ó";
+ Text[ russian ] = "Äâîéíàÿ ëèíèÿ, âíóòðè: î÷åíü òîëñòàÿ, ñíàðóæè: òîëñòàÿ, èíòåðâàë: äëèííûé";
+ Text[ polish ] = "Podwójna, Wewnêtrzna: bardzo gruba, Zewnêtrzna: gruba, Odstêp: du¿y";
+ Text[ japanese ] = "“ñdü¤“à‘¤:‹É‘¾¤ŠO‘¤:•À‘¾¤ŠÔŠu:L‚¢";
+ Text[ chinese_traditional ] = "Âù¡A¤º¡G«Ü²Ê¡G¥~¡G²Ê¡A¶¡¹j¡G¤j";
+ Text[ arabic ] = "ãÒÏæÌ¡ ÇáÏÇÎá: ßÈíÑ ÌÏÇð¡ ÇáÎÇÑÌ: ËÎíä¡ ÇáÊÈÇÚÏ: ßÈíÑ";
+ Text[ greek ] = "ÄéðëÜ, ÅóùôåñéêÜ:ðïëý ðá÷ý, ÅîùôåñéêÜ: ðá÷ý, Áðüóôáóç: ìåãÜëç";
+ Text[ korean ] = "ÀÌÁß, ¾È: ¸Å¿ì µÎ²®°Ô, ¹Ù±ù: µÎ²®°Ô, °£°Ý: Å©°Ô";
+ Text[ turkish ] = "Çift, Ýç: çok kalýn, Dýþ: kalýn, Aralýk: büyük";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_METRIC_MM
+{
+ Text = "mm" ;
+};
+String RID_SVXITEMS_METRIC_CM
+{
+ Text = "cm" ;
+};
+String RID_SVXITEMS_METRIC_INCH
+{
+ Text = "inch" ;
+};
+String RID_SVXITEMS_METRIC_POINT
+{
+ Text = "pt" ;
+};
+String RID_SVXITEMS_METRIC_TWIP
+{
+ Text = "twip" ;
+};
+String RID_SVXITEMS_METRIC_PIXEL
+{
+ Text = "pixel" ;
+};
+String RID_SVXITEMS_HORJUST_STANDARD
+{
+ Text = "Horizontale Ausrichtung Standard" ;
+ Text [ ENGLISH ] = "Adjust standard" ;
+ Text [ norwegian ] = "Tilpass Standard " ;
+ Text [ italian ] = "Allineamento orizzontale standard" ;
+ Text [ portuguese_brazilian ] = "Ajuste padrão" ;
+ Text [ portuguese ] = "Alinhamento padrão horizontal" ;
+ Text [ finnish ] = "Vakiotasaus" ;
+ Text [ danish ] = "Vandretjustering standard" ;
+ Text [ french ] = "Alignement horizontal par défaut" ;
+ Text [ swedish ] = "Horisontell justering standard" ;
+ Text [ dutch ] = "Standaard horizontaal uitlijnen" ;
+ Text [ spanish ] = "Alineación horizontal estándar" ;
+ Text [ english_us ] = "Horizontal alignment default" ;
+ Text[ chinese_simplified ] = "ˮƽ¶ÔÆë ±ê×¼";
+ Text[ russian ] = "Ãîðèçîíòàëüíîå âûðàâíèâàíèå (ñòàíäàðò)";
+ Text[ polish ] = "Standardowe wyrównanie w poziomie";
+ Text[ japanese ] = "‰¡ˆÊ’u•W€";
+ Text[ chinese_traditional ] = "¤ô¥­¹ï»ô ¼Ð·Ç";
+ Text[ arabic ] = "ãÍÇÐÇÉ ÃÝÞíÉ ÞíÇÓíÉ";
+ Text[ greek ] = "Ïñéæüíôéá óôïß÷éóç ùò ðñïåðéëïãÞ";
+ Text[ korean ] = "¼öÆò ¸ÂÃã Ç¥ÁØ";
+ Text[ turkish ] = "Yatay hizalama (standart)";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_HORJUST_LEFT
+{
+ Text = "Ausrichtung nach links" ;
+ Text [ ENGLISH ] = "Adjust left" ;
+ Text [ norwegian ] = "Juster til venstre" ;
+ Text [ italian ] = "Allinea a sinistra" ;
+ Text [ portuguese_brazilian ] = "Ajustar o esquerda" ;
+ Text [ portuguese ] = "Alinhar à esquerda" ;
+ Text [ finnish ] = "Tasaa vasemmalle" ;
+ Text [ danish ] = "Venstrejusteret" ;
+ Text [ french ] = "Alignement à gauche" ;
+ Text [ swedish ] = "Vänsterjustera" ;
+ Text [ dutch ] = "Op links uitlijnen" ;
+ Text [ spanish ] = "Alinear a la izquierda" ;
+ Text [ english_us ] = "Align left" ;
+ Text[ chinese_simplified ] = "Ïò×ó¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå âëåâî";
+ Text[ polish ] = "Wyrównanie do lewej";
+ Text[ japanese ] = "¶‘µ‚¦";
+ Text[ chinese_traditional ] = "¦V¥ª¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ Åáì ÇáíÓÇÑ";
+ Text[ greek ] = "Óôïß÷éóç ðñïò ôá áñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ ¸ÂÃã";
+ Text[ turkish ] = "Sola hizala";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_HORJUST_CENTER
+{
+ Text = "Horizontal zentriert" ;
+ Text [ ENGLISH ] = "Center horizontally" ;
+ Text [ norwegian ] = "Midtstill horisontal " ;
+ Text [ italian ] = "Centra in senso orizzontale" ;
+ Text [ portuguese_brazilian ] = "Centrar horizontalmente" ;
+ Text [ portuguese ] = "Centrado na horizontal" ;
+ Text [ finnish ] = "Keskitä vaakasuunnassa" ;
+ Text [ danish ] = "Centrer vandret" ;
+ Text [ french ] = "Centré horizontalement" ;
+ Text [ swedish ] = "Horisontellt centrerad" ;
+ Text [ dutch ] = "Horizontaal gecentreerd" ;
+ Text [ spanish ] = "Centrado horizontal" ;
+ Text [ english_us ] = "Centered horizontally" ;
+ Text[ chinese_simplified ] = "ˮƽ¾ÓÖÐ";
+ Text[ russian ] = "Ïî ãîðèçîíòàëè â öåíòðå";
+ Text[ polish ] = "Wyœrodkowany poziomo";
+ Text[ japanese ] = "…•½‚É’†‰›‘µ‚¦";
+ Text[ chinese_traditional ] = "¤ô¥­¸m¤¤";
+ Text[ arabic ] = "ÊæÓíØ ÃÝÞí";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá ïñéæüíôéá";
+ Text[ korean ] = "¼öÆò °¡¿îµ¥";
+ Text[ turkish ] = "Yatay ortala";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_HORJUST_RIGHT
+{
+ Text = "Ausrichtung nach rechts" ;
+ Text [ ENGLISH ] = "Adjust right" ;
+ Text [ norwegian ] = "Juster til høyre " ;
+ Text [ italian ] = "Allinea a destra" ;
+ Text [ portuguese_brazilian ] = "Ajustar o direita" ;
+ Text [ portuguese ] = "Alinhar à direita" ;
+ Text [ finnish ] = "Tasaa oikealle" ;
+ Text [ danish ] = "Højrejusteret" ;
+ Text [ french ] = "Alignement à droite" ;
+ Text [ swedish ] = "Högerjustera" ;
+ Text [ dutch ] = "Op rechts uitlijnen" ;
+ Text [ spanish ] = "Ajustar a la derecha" ;
+ Text [ english_us ] = "Align right" ;
+ Text[ chinese_simplified ] = "ÏòÓÒ¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå âïðàâî";
+ Text[ polish ] = "Wyrównanie do lewej";
+ Text[ japanese ] = "‰E‘µ‚¦";
+ Text[ chinese_traditional ] = "¦V¥k¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ Åáì Çáíãíä";
+ Text[ greek ] = "Óôïß÷éóç ðñïò ôá äåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ ¸ÂÃã";
+ Text[ turkish ] = "Saða hizala";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_HORJUST_BLOCK
+{
+ Text = "Blockausrichtung" ;
+ Text [ ENGLISH ] = "Block" ;
+ Text [ norwegian ] = "Datablokk " ;
+ Text [ italian ] = "Giustificato" ;
+ Text [ portuguese_brazilian ] = "Bloco" ;
+ Text [ portuguese ] = "Justificado" ;
+ Text [ finnish ] = "Lohko" ;
+ Text [ danish ] = "Lige margener" ;
+ Text [ french ] = "Alignement justifié" ;
+ Text [ swedish ] = "Blockjustering" ;
+ Text [ dutch ] = "Uitgevuld" ;
+ Text [ spanish ] = "Justificado" ;
+ Text [ english_us ] = "Justify" ;
+ Text[ chinese_simplified ] = "×óÓÒ¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå ïî øèðèíå";
+ Text[ polish ] = "Wyjustowanie";
+ Text[ japanese ] = "‹Ï“™Š„•t";
+ Text[ chinese_traditional ] = "¥ª¥k¹ï»ô";
+ Text[ arabic ] = "ÖÈØ";
+ Text[ greek ] = "ÐëÞñçò óôïß÷éóç";
+ Text[ korean ] = "¾çÂÊ ¸ÂÃã";
+ Text[ turkish ] = "Ýki yana yasla";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_HORJUST_REPEAT
+{
+ Text = "Ausrichtung wiederholen" ;
+ Text [ ENGLISH ] = "Adjust repeat" ;
+ Text [ norwegian ] = "Juster gjenta+++Adjust repeat" ;
+ Text [ italian ] = "Ripeti allineamento" ;
+ Text [ portuguese_brazilian ] = "Ajuste repetido" ;
+ Text [ portuguese ] = "Repetir alinhamento" ;
+ Text [ finnish ] = "Toisto" ;
+ Text [ danish ] = "Gentag justering" ;
+ Text [ french ] = "Répéter l'alignement" ;
+ Text [ swedish ] = "Upprepa justering" ;
+ Text [ dutch ] = "Uitlijnen herhalen" ;
+ Text [ spanish ] = "Repetir ajuste" ;
+ Text [ english_us ] = "Repeat alignment" ;
+ Text[ chinese_simplified ] = "Öظ´¶ÔÆë";
+ Text[ russian ] = "Ïîâòîðèòü âûðàâíèâàíèå";
+ Text[ polish ] = "Powtórz justowanie";
+ Text[ japanese ] = "’²®‚ÌŒJ‚è•Ô‚µ";
+ Text[ chinese_traditional ] = "­«½Æ¹ï»ô";
+ Text[ arabic ] = "ÊßÑÇÑ ÇáãÍÇÐÇÉ";
+ Text[ greek ] = "ÅðáíÜëçøç óôïß÷éóçò";
+ Text[ korean ] = "¸ÂÃ㠹ݺ¹";
+ Text[ turkish ] = "Hizalamayý yinele";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_VERJUST_STANDARD
+{
+ Text = "Vertikale Ausrichtung Standard" ;
+ Text [ ENGLISH ] = "Adjust Standard" ;
+ Text [ norwegian ] = "Tilpass Standard" ;
+ Text [ italian ] = "Allineamento verticale standard" ;
+ Text [ portuguese_brazilian ] = "Ajustar Padrão" ;
+ Text [ portuguese ] = "Alinhamento padrão vertical" ;
+ Text [ finnish ] = "Vakiotasaus" ;
+ Text [ danish ] = "Lodretjustering standard" ;
+ Text [ french ] = "Alignement vertical par défaut" ;
+ Text [ swedish ] = "Vertikal justering standard" ;
+ Text [ dutch ] = "Standaard verticaal uitlijnen" ;
+ Text [ spanish ] = "Alineación vertical estándar" ;
+ Text [ english_us ] = "Vertical alignment default" ;
+ Text[ chinese_simplified ] = "±ê×¼´¹Ö±¶ÔÆë";
+ Text[ russian ] = "Âåðòèêàëüíîå âûðàâíèâàíèå (ñòàíäàðò)";
+ Text[ polish ] = "Standardowe wyrównanie w pionie";
+ Text[ japanese ] = "cˆÊ’u•W€";
+ Text[ chinese_traditional ] = "¼Ð·Ç««ª½¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ ÑÃÓíÉ ÞíÇÓíÉ";
+ Text[ greek ] = "Ïñéæüíôéá óôïß÷éóç ùò ðñïåðéëïãÞ";
+ Text[ korean ] = "¼öÁ÷ ¸ÂÃã Ç¥ÁØ";
+ Text[ turkish ] = "Standart dikey hizalama";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_VERJUST_TOP
+{
+ Text = "Ausrichtung nach oben" ;
+ Text [ ENGLISH ] = "Adjust top" ;
+ Text [ norwegian ] = "Tilpass Topp " ;
+ Text [ italian ] = "Allinea in alto" ;
+ Text [ portuguese_brazilian ] = "Ajustar topo" ;
+ Text [ portuguese ] = "Alinhar para baixo" ;
+ Text [ finnish ] = "Tasaa ylös" ;
+ Text [ danish ] = "Juster opad" ;
+ Text [ french ] = "Alignement au bord supérieur" ;
+ Text [ swedish ] = "Justera uppåt" ;
+ Text [ dutch ] = "Op bovenkant uitlijnen" ;
+ Text [ spanish ] = "Alinear arriba" ;
+ Text [ english_us ] = "Align to top" ;
+ Text[ chinese_simplified ] = "ÏòÉ϶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå ââåðõ";
+ Text[ polish ] = "Wyrównanie do góry";
+ Text[ japanese ] = "㑵‚¦";
+ Text[ chinese_traditional ] = "¦V¤W¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ Åáì ÃÚáì";
+ Text[ greek ] = "Óôïß÷éóç ðÜíù";
+ Text[ korean ] = "À§·Î ¸ÂÃã";
+ Text[ turkish ] = "Yukarý doðru hizala";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_VERJUST_CENTER
+{
+ Text = "Vertikal zentriert" ;
+ Text [ ENGLISH ] = "Center vertically" ;
+ Text [ norwegian ] = "Midtstill vertikal " ;
+ Text [ italian ] = "Centra verticalmente" ;
+ Text [ portuguese_brazilian ] = "Centrar verticalmente" ;
+ Text [ portuguese ] = "Centrado na vertical" ;
+ Text [ finnish ] = "Pystykeskitys" ;
+ Text [ danish ] = "Centrer lodret" ;
+ Text [ french ] = "Centré verticalement" ;
+ Text [ swedish ] = "Vertikalt centrerad" ;
+ Text [ dutch ] = "Verticaal gecentreerd" ;
+ Text [ spanish ] = "Centrado vertical" ;
+ Text [ english_us ] = "Centered vertically" ;
+ Text[ chinese_simplified ] = "´¹Ö±¾ÓÖÐ";
+ Text[ russian ] = "Âåðòèêàëüíî ïî öåíòðó";
+ Text[ polish ] = "Wyœrodkowany pionowo";
+ Text[ japanese ] = "㉺‚É’†‰›‘µ‚¦";
+ Text[ chinese_traditional ] = "««ª½¸m¤¤";
+ Text[ arabic ] = "ÊæÓíØ ÚãæÏí";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá êáôáêüñõöá";
+ Text[ korean ] = "¼öÁ÷ °¡¿îµ¥";
+ Text[ turkish ] = "Dikey ortala";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_VERJUST_BOTTOM
+{
+ Text = "Ausrichtung nach unten" ;
+ Text [ ENGLISH ] = "Adjust bottom" ;
+ Text [ norwegian ] = "Tilpass Bunn" ;
+ Text [ italian ] = "Allinea in basso" ;
+ Text [ portuguese_brazilian ] = "Ajuste na base" ;
+ Text [ portuguese ] = "Alinhar para baixo" ;
+ Text [ finnish ] = "Tasaa alas" ;
+ Text [ danish ] = "Juster nedad" ;
+ Text [ french ] = "Alignement au bord inférieur" ;
+ Text [ swedish ] = "Justera nedåt" ;
+ Text [ dutch ] = "Op onderkant uitlijnen" ;
+ Text [ spanish ] = "Alinear abajo" ;
+ Text [ english_us ] = "Align to bottom" ;
+ Text[ chinese_simplified ] = "Ïò϶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå âíèç";
+ Text[ polish ] = "Wyrównanie do do³u";
+ Text[ japanese ] = "‰º‘µ‚¦";
+ Text[ chinese_traditional ] = "¦V¤U¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ Åáì ÃÓÝá";
+ Text[ greek ] = "Óôïß÷éóç ðñïò ôá êÜôù";
+ Text[ korean ] = "¾Æ·¡·Î ¸ÂÃã";
+ Text[ turkish ] = "Aþaðý hizala";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ORI_STANDARD
+{
+ Text = "Schreibrichtung Standard" ;
+ Text [ ENGLISH ] = "Orientation standard" ;
+ Text [ norwegian ] = "Retningsstandard" ;
+ Text [ italian ] = "Orientamento standard" ;
+ Text [ portuguese_brazilian ] = "Orientação padrão" ;
+ Text [ portuguese ] = "Orientação padrão" ;
+ Text [ finnish ] = "Vakiosuunta" ;
+ Text [ danish ] = "Standardskriveretning" ;
+ Text [ french ] = "Sens d'écriture par défaut" ;
+ Text [ swedish ] = "Standardorientering" ;
+ Text [ dutch ] = "Standaard-afdrukstand" ;
+ Text [ spanish ] = "Orientación predeterminada" ;
+ Text [ english_us ] = "Default orientation" ;
+ Text[ chinese_simplified ] = "±ê×¼ÊäÈë·½Ïò";
+ Text[ russian ] = "Ñòàíäàðòíîå íàïðàâëåíèå ïèñüìà";
+ Text[ polish ] = "Orientacja domyœlna";
+ Text[ japanese ] = "‹L“ü•ûŒü •W€";
+ Text[ chinese_traditional ] = "¼Ð·Ç¿é¤J¤è¦V";
+ Text[ arabic ] = "ÇÊÌÇå ÇáßÊÇÈÉ ÇáÇÝÊÑÇÖí";
+ Text[ greek ] = "ÐñïåðéëïãÞ êáôåýèõíóçò ãñáöÞò";
+ Text[ korean ] = "±âº» ¹æÇâ";
+ Text[ turkish ] = "Standart yazma yönü";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ORI_TOPBOTTOM
+{
+ Text = "Von oben nach unten" ;
+ Text [ ENGLISH ] = "Top to bottom" ;
+ Text [ norwegian ] = "Topp til bunn " ;
+ Text [ italian ] = "Dall'alto in basso" ;
+ Text [ portuguese_brazilian ] = "Topo para a base" ;
+ Text [ portuguese ] = "De cima para baixo" ;
+ Text [ finnish ] = "Ylhäältä alas" ;
+ Text [ danish ] = "Fra øverst til nederst" ;
+ Text [ french ] = "Du haut en bas" ;
+ Text [ swedish ] = "Uppifrån ned" ;
+ Text [ dutch ] = "Van boven naar beneden" ;
+ Text [ spanish ] = "De arriba hacia abajo" ;
+ Text [ english_us ] = "From top to bottom" ;
+ Text[ chinese_simplified ] = "´ÓÉÏÏòÏÂ";
+ Text[ russian ] = "Ñâåðõó âíèç";
+ Text[ polish ] = "Z góry do do³u";
+ Text[ japanese ] = "ã‚©‚牺‚Ö";
+ Text[ chinese_traditional ] = "±q¤W¦V¤U";
+ Text[ arabic ] = "ãä ÃÚáì Åáì ÃÓÝá";
+ Text[ greek ] = "Áðü ðÜíù ðñïò ôá êÜôù";
+ Text[ korean ] = "À§¿¡¼­ ¾Æ·¡·Î";
+ Text[ turkish ] = "Yukarýdan aþaðý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ORI_BOTTOMTOP
+{
+ Text = "Von unten nach oben" ;
+ Text [ ENGLISH ] = "Bottom to Top" ;
+ Text [ norwegian ] = "Bunn til topp " ;
+ Text [ italian ] = "Dal basso in alto" ;
+ Text [ portuguese_brazilian ] = "Base para o topo" ;
+ Text [ portuguese ] = "De baixo para cima" ;
+ Text [ finnish ] = "Alhaalta ylös" ;
+ Text [ danish ] = "Fra nederst til øverst" ;
+ Text [ french ] = "Du bas en haut" ;
+ Text [ swedish ] = "Nedifrån upp" ;
+ Text [ dutch ] = "Van beneden naar boven" ;
+ Text [ spanish ] = "De abajo hacia arriba" ;
+ Text [ english_us ] = "Bottom to Top" ;
+ Text[ chinese_simplified ] = "´ÓÏÂÏòÉÏ";
+ Text[ russian ] = "Ñíèçó ââåðõ";
+ Text[ polish ] = "Z do³u do góry";
+ Text[ japanese ] = "‰º‚©‚çã‚Ö";
+ Text[ chinese_traditional ] = "±q¤U¦V¤W";
+ Text[ arabic ] = "ãä ÃÓÝá Åáì ÃÚáì";
+ Text[ greek ] = "Áðï êÜôù ðñïò ôá ðÜíù";
+ Text[ korean ] = "¾Æ·¡¿¡¼­ À§·Î";
+ Text[ turkish ] = "Aþaðýdan yukarý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ORI_STACKED
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Übereinander : šbereinander */
+ Text = "Übereinander" ;
+ Text [ ENGLISH ] = "Stacked" ;
+ Text [ norwegian ] = "Stablet" ;
+ Text [ italian ] = "Impilato" ;
+ Text [ portuguese_brazilian ] = "Empilhado" ;
+ Text [ portuguese ] = "Empilhado" ;
+ Text [ finnish ] = "Pinossa" ;
+ Text [ danish ] = "Over hinanden" ;
+ Text [ french ] = "Empilé" ;
+ Text [ swedish ] = "Över varandra" ;
+ Text [ dutch ] = "gestapeld" ;
+ Text [ spanish ] = "Apilado" ;
+ Text [ english_us ] = "Stacked" ;
+ Text[ chinese_simplified ] = "Öصþ";
+ Text[ russian ] = "Ïîâåðõ";
+ Text[ polish ] = "Stosowo";
+ Text[ japanese ] = "½À¯¸";
+ Text[ chinese_traditional ] = "­«Å|";
+ Text[ arabic ] = "ãÊÑÇßãÉ";
+ Text[ greek ] = "Óå óôïßâá";
+ Text[ korean ] = "½×±â";
+ Text[ turkish ] = "Üst üste";
+ Text[ language_user1 ] = " ";
+};
+ // GetValueText von BoolItems
+String RID_SVXITEMS_SHADOWED_TRUE
+{
+ Text = "Schattiert" ;
+ Text [ ENGLISH ] = "Shadowed" ;
+ Text [ norwegian ] = "Skygget" ;
+ Text [ italian ] = "Ombreggiato" ;
+ Text [ portuguese_brazilian ] = "Sombreado" ;
+ Text [ portuguese ] = "Sombreado" ;
+ Text [ finnish ] = "Varjostettu" ;
+ Text [ danish ] = "Afskygget" ;
+ Text [ french ] = "Ombré" ;
+ Text [ swedish ] = "Skuggad" ;
+ Text [ dutch ] = "Schaduw" ;
+ Text [ spanish ] = "Sombreado" ;
+ Text [ english_us ] = "Shadowed" ;
+ Text[ chinese_simplified ] = "´øÒõÓ°";
+ Text[ russian ] = "Çàòåíåíèå";
+ Text[ polish ] = "Wycieniowany";
+ Text[ japanese ] = "‰e•t‚«";
+ Text[ chinese_traditional ] = "±a³±¼v";
+ Text[ arabic ] = "ãÙáá";
+ Text[ greek ] = "ÓêéáóìÝíï";
+ Text[ korean ] = "À½¿µ";
+ Text[ turkish ] = "Gölgeli";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SHADOWED_FALSE
+{
+ Text = "Nicht Schattiert" ;
+ Text [ ENGLISH ] = "Not Shadowed" ;
+ Text [ norwegian ] = "Ikke Skygget" ;
+ Text [ italian ] = "Non ombreggiato" ;
+ Text [ portuguese_brazilian ] = "Não Sombreado" ;
+ Text [ portuguese ] = "Sem sombreado" ;
+ Text [ finnish ] = "Ei varjostettu" ;
+ Text [ danish ] = "Ikke afskygget" ;
+ Text [ french ] = "Non ombré" ;
+ Text [ swedish ] = "Skugga inte" ;
+ Text [ dutch ] = "Geen schaduw" ;
+ Text [ spanish ] = "Sin sombra" ;
+ Text [ english_us ] = "Not Shadowed" ;
+ Text[ chinese_simplified ] = "ûÓÐÒõÓ°";
+ Text[ russian ] = "Áåç çàòåíåíèÿ";
+ Text[ polish ] = "Nie wycieniowany";
+ Text[ japanese ] = "‰e‚È‚µ";
+ Text[ chinese_traditional ] = "¨S¦³³±¼v";
+ Text[ arabic ] = "ÛíÑ ãÙáá";
+ Text[ greek ] = "×ùñßò óêéÜ";
+ Text[ korean ] = "À½¿µ ¾øÀ½";
+ Text[ turkish ] = "Gölgeli deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BLINK_TRUE
+{
+ Text = "Blinkend" ;
+ Text [ ENGLISH ] = "Flashed" ;
+ Text [ dutch ] = "Knipperend" ;
+ Text [ english_us ] = "Blinking" ;
+ Text [ italian ] = "Lampeggiante" ;
+ Text [ spanish ] = "Intermitente" ;
+ Text [ french ] = "Clignotant" ;
+ Text [ swedish ] = "Blinkande" ;
+ Text [ danish ] = "Blinkende" ;
+ Text [ portuguese ] = "Intermitente" ;
+ Text [ portuguese_brazilian ] = "Blinkend" ;
+ Text[ chinese_simplified ] = "ÉÁ˸";
+ Text[ russian ] = "Ìèãàíèå";
+ Text[ polish ] = "Miganie";
+ Text[ japanese ] = "“_–Å‚·‚é";
+ Text[ chinese_traditional ] = "°{Ã{";
+ Text[ arabic ] = "æãÇÖ";
+ Text[ greek ] = "Íá áíáâïóâÞíåé";
+ Text[ korean ] = "±ô¹ÚÀÓ";
+ Text[ turkish ] = "Yanýp sönme";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BLINK_FALSE
+{
+ Text = "Nicht Blinkend" ;
+ Text [ ENGLISH ] = "Not Flashed" ;
+ Text [ dutch ] = "Niet knipperend" ;
+ Text [ english_us ] = "Not Blinking" ;
+ Text [ italian ] = "Non lampeggiante" ;
+ Text [ spanish ] = "No intermitente" ;
+ Text [ french ] = "Pas clignotant" ;
+ Text [ swedish ] = "Icke blinkande" ;
+ Text [ danish ] = "Ikke blinkende" ;
+ Text [ portuguese ] = "Não intermitente" ;
+ Text [ portuguese_brazilian ] = "Nicht Blinkend" ;
+ Text[ chinese_simplified ] = "²»ÉÁ˸";
+ Text[ russian ] = "Íå ìèãàþùèé";
+ Text[ polish ] = "Nie migaj¹cy";
+ Text[ japanese ] = "“_–Å‚µ‚È‚¢";
+ Text[ chinese_traditional ] = "¤£°{Ã{";
+ Text[ arabic ] = "ÛíÑ æãÇÖ";
+ Text[ greek ] = "Íá ìçí áíáâïóâÞíåé";
+ Text[ korean ] = "±ô¹ÚÀÓ ¾øÀ½";
+ Text[ turkish ] = "Yanýp sönme yok";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_AUTOKERN_TRUE
+{
+ Text = "Paarweises Kerning" ;
+ Text [ ENGLISH ] = "Auto Kerning" ;
+ Text [ norwegian ] = "Auto Bokstavsperring" ;
+ Text [ italian ] = "Crenatura a coppia" ;
+ Text [ portuguese_brazilian ] = "Kerning Automático" ;
+ Text [ portuguese ] = "Kerning de pares" ;
+ Text [ finnish ] = "Automaattinen välistys" ;
+ Text [ danish ] = "Parvis knibning" ;
+ Text [ french ] = "Crénage pair" ;
+ Text [ swedish ] = "Parvis Kerning" ;
+ Text [ dutch ] = "Paarsgewijze Kerning" ;
+ Text [ spanish ] = "Ajuste par entre caracteres " ;
+ Text [ english_us ] = "Pair Kerning" ;
+ Text[ chinese_simplified ] = "×Öĸ¼ä¸ôÏàµÈ";
+ Text[ russian ] = "Ïàðíûé êåðíèíã";
+ Text[ polish ] = "Kerning w parze";
+ Text[ japanese ] = "•¶Žš‘g‚̶݂°ÆݸÞ";
+ Text[ chinese_traditional ] = "¦r¥À¶¡¹j¬Ûµ¥";
+ Text[ arabic ] = "ÊÞäíä ÃÍÑÝ ÒæÌí";
+ Text[ greek ] = "ÄéáãñáììÜôùóç áíÜ æåýãç";
+ Text[ korean ] = "½Ö Ä¿´×";
+ Text[ turkish ] = "Aralýk azaltma";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_AUTOKERN_FALSE
+{
+ Text = "Kein Paarweises Kerning" ;
+ Text [ ENGLISH ] = "No Auto Kerning" ;
+ Text [ norwegian ] = "Ingen Auto Bokstavsperring" ;
+ Text [ italian ] = "Senza kerning automatico" ;
+ Text [ portuguese_brazilian ] = "Sem Kerning Automático" ;
+ Text [ portuguese ] = "Sem Kerning de pares" ;
+ Text [ finnish ] = "Ei automaattista välistystä" ;
+ Text [ danish ] = "Ingen parvis knibning" ;
+ Text [ french ] = "Pas de crénage pair" ;
+ Text [ swedish ] = "Ingen parvis kerning" ;
+ Text [ dutch ] = "Geen paarsgewijze Kerning" ;
+ Text [ spanish ] = "Sin ajuste par entre caracteres" ;
+ Text [ english_us ] = "No pair kerning" ;
+ Text[ chinese_simplified ] = "×Öĸ¼ä¸ô²»ÏàµÈ";
+ Text[ russian ] = "Áåç ïàðíîãî êåðíèíãà";
+ Text[ polish ] = "Brak kerningu w parze";
+ Text[ japanese ] = "•¶Žš‘g‚̶݂°ÆݸނȂµ";
+ Text[ chinese_traditional ] = "¦r¥À¶¡¹j¤£¬Ûµ¥";
+ Text[ arabic ] = "ÈÏæä ÊÞäíä ÃÍÑÝ ÒæÌí";
+ Text[ greek ] = "×ùñßò äéáãñáììÜôùóç áíÜ æåýãç";
+ Text[ korean ] = "½Ö Ä¿´× ¾øÀ½";
+ Text[ turkish ] = "Aralýk azaltma yok";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WORDLINE_TRUE
+{
+ Text = "Wortweise" ;
+ Text [ ENGLISH ] = "Words Only" ;
+ Text [ norwegian ] = "Bare Ord" ;
+ Text [ italian ] = "Solo parole" ;
+ Text [ portuguese_brazilian ] = "Apenas Palavras" ;
+ Text [ portuguese ] = "Só palavras" ;
+ Text [ finnish ] = "Vain sanat" ;
+ Text [ danish ] = "Ordvis" ;
+ Text [ french ] = "Mot par mot" ;
+ Text [ swedish ] = "Ordvis" ;
+ Text [ dutch ] = "Heel woord" ;
+ Text [ spanish ] = "Solo palabras" ;
+ Text [ english_us ] = "Individual words" ;
+ Text[ chinese_simplified ] = "Öð×Ö";
+ Text[ russian ] = "Òîëüêî ñëîâà";
+ Text[ polish ] = "Po s³owie";
+ Text[ japanese ] = "’PŒê‚²‚Æ‚É‚·‚é";
+ Text[ chinese_traditional ] = "³v¦r";
+ Text[ arabic ] = "ßáãÇÊ ÝÑÏíÉ";
+ Text[ greek ] = "ÊáôÜ ëÝîç";
+ Text[ korean ] = "´Ü¾îº°";
+ Text[ turkish ] = "Yalnýzca sözcükler";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WORDLINE_FALSE
+{
+ Text = "Nicht Wortweise" ;
+ Text [ ENGLISH ] = "Not Words Only" ;
+ Text [ norwegian ] = "Kun innrykk av ord" ;
+ Text [ italian ] = "Non solo parole" ;
+ Text [ portuguese_brazilian ] = "Não Apenas Palavras" ;
+ Text [ portuguese ] = "Não só palavras" ;
+ Text [ finnish ] = "Ei vain sanoja" ;
+ Text [ danish ] = "Ikke ordvis" ;
+ Text [ french ] = "Plus d'un mot" ;
+ Text [ swedish ] = "Inte ordvis" ;
+ Text [ dutch ] = "Niet alleen woorden" ;
+ Text [ spanish ] = "No solo palabras" ;
+ Text [ english_us ] = "Not Words Only" ;
+ Text[ chinese_simplified ] = "²»ÊÇÖð×Ö";
+ Text[ russian ] = "Íå òîëüêî ñëîâà";
+ Text[ polish ] = "Nie po s³owie";
+ Text[ japanese ] = "’PŒê‚²‚Æ‚É‚µ‚È‚¢";
+ Text[ chinese_traditional ] = "¤£¬O³v¦r";
+ Text[ arabic ] = "áíÓ ßáãÉ ßáãÉ";
+ Text[ greek ] = "¼÷é êáôÜ ëÝîç";
+ Text[ korean ] = "´Ü¾îº°·Î ÇÏÁö ¾ÊÀ½";
+ Text[ turkish ] = "Yalnýzca sözcükler deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_CONTOUR_TRUE
+{
+ Text = "Konturschrift" ;
+ Text [ ENGLISH ] = "Outline" ;
+ Text [ norwegian ] = "Outline" ;
+ Text [ italian ] = "Contorno" ;
+ Text [ portuguese_brazilian ] = "Esboço" ;
+ Text [ portuguese ] = "Contorno" ;
+ Text [ finnish ] = "Jäsennys" ;
+ Text [ danish ] = "Konturskrift" ;
+ Text [ french ] = "Contour" ;
+ Text [ swedish ] = "Kontur" ;
+ Text [ dutch ] = "Open letters" ;
+ Text [ spanish ] = "Contorno" ;
+ Text [ english_us ] = "Outline" ;
+ Text[ chinese_simplified ] = "ÂÖÀª";
+ Text[ russian ] = "Êîíòóð";
+ Text[ polish ] = "Kontur";
+ Text[ japanese ] = "’†”²‚«•¶Žš";
+ Text[ chinese_traditional ] = "½ü¹ø";
+ Text[ arabic ] = "ÇáÎØ ÇáßöÝÇÝí";
+ Text[ greek ] = "ÃñáììáôïóåéñÜ ðåñéãñÜììáôïò";
+ Text[ korean ] = "À±°û";
+ Text[ turkish ] = "Konturlu yazý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_CONTOUR_FALSE
+{
+ Text = "Keine Konturschrift" ;
+ Text [ ENGLISH ] = "No Outline" ;
+ Text [ norwegian ] = "Ingen Omriss" ;
+ Text [ italian ] = "Nessun contorno" ;
+ Text [ portuguese_brazilian ] = "Não Vazado" ;
+ Text [ portuguese ] = "Sem contornos" ;
+ Text [ finnish ] = "Ei ääriviivaa" ;
+ Text [ danish ] = "Ingen konturskrift" ;
+ Text [ french ] = "Police sans contour" ;
+ Text [ swedish ] = "Ingen kontur" ;
+ Text [ dutch ] = "Geen open letters" ;
+ Text [ spanish ] = "Sin contornos" ;
+ Text [ english_us ] = "No Outline" ;
+ Text[ chinese_simplified ] = "²»ÏÔʾÂÖÀª";
+ Text[ russian ] = "Áåç êîíòóðíîãî øðèôòà";
+ Text[ polish ] = "Nie kontur";
+ Text[ japanese ] = "’†”²‚«•¶Žš‚È‚µ";
+ Text[ chinese_traditional ] = "¤£Åã¥Ü½ü¹ø";
+ Text[ arabic ] = "ÈÏæä ÎØ ßÝÇÝí";
+ Text[ greek ] = "×ùñßò ãñáììáôïóåéñÜ ðåñéãñÜììáôïò";
+ Text[ korean ] = "À±°û ¾øÀ½";
+ Text[ turkish ] = "Konturlu yazý deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_NOLINEBREAK_TRUE
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_NOLINEBREAK_FALSE
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_NOHYPHEN_TRUE
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_NOHYPHEN_FALSE
+{
+ Text = "?" ;
+};
+String RID_SVXITEMS_PRINT_TRUE
+{
+ 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 ] = "¦C¦L";
+ Text[ arabic ] = "ØÈÇÚÉ";
+ Text[ greek ] = "Åêôýðùóç";
+ Text[ korean ] = "Àμâ";
+ Text[ turkish ] = "Yazdýr";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PRINT_FALSE
+{
+ Text = "Nicht Drucken" ;
+ Text [ ENGLISH ] = "Not Print" ;
+ Text [ norwegian ] = "Ikke Skriv ut" ;
+ Text [ italian ] = "Non stampare" ;
+ Text [ portuguese_brazilian ] = "Não Imprimir" ;
+ Text [ portuguese ] = "Não imprimir" ;
+ Text [ finnish ] = "Ei tulostuva" ;
+ Text [ danish ] = "Udskriv ikke" ;
+ Text [ french ] = "Pas d'impression" ;
+ Text [ swedish ] = "Skriv inte ut" ;
+ Text [ dutch ] = "Niet afdrukken" ;
+ Text [ spanish ] = "No imprimir" ;
+ Text [ english_us ] = "Don't print" ;
+ Text[ chinese_simplified ] = "²»Òª´òÓ¡";
+ Text[ russian ] = "Áåç ïå÷àòè";
+ Text[ polish ] = "Nie drukuj";
+ Text[ japanese ] = "ˆóü‚µ‚È‚¢";
+ Text[ chinese_traditional ] = "¤£­n¦C¦L";
+ Text[ arabic ] = "ÚÏã ÇáØÈÇÚÉ";
+ Text[ greek ] = "Íá ìçí åêôõðùèåß";
+ Text[ korean ] = "ÀμâÇÏÁö ¾ÊÀ½";
+ Text[ turkish ] = "Yazdýrma";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_OPAQUE_TRUE
+{
+ Text = "Undurchsichtig" ;
+ Text [ ENGLISH ] = "Opaque" ;
+ Text [ norwegian ] = "Ugjennomsiktig" ;
+ Text [ italian ] = "Opaco" ;
+ Text [ portuguese_brazilian ] = "Opaco" ;
+ Text [ portuguese ] = "Opaco" ;
+ Text [ finnish ] = "Peittävä" ;
+ Text [ danish ] = "Uigennemsigtig" ;
+ Text [ french ] = "Opaque" ;
+ Text [ swedish ] = "Ogenomskinlig" ;
+ Text [ dutch ] = "Ondoorzichtig" ;
+ Text [ spanish ] = "Opaco" ;
+ Text [ english_us ] = "Opaque" ;
+ Text[ chinese_simplified ] = "²»Í¸Ã÷";
+ Text[ russian ] = "Íåïðîçðà÷íûé";
+ Text[ polish ] = "Nieprzezroczysty";
+ Text[ japanese ] = "•s“§–¾";
+ Text[ chinese_traditional ] = "¤£³z©ú";
+ Text[ arabic ] = "ÛíÑ ÔÝÇÝ";
+ Text[ greek ] = "ÁäéáöáíÞò";
+ Text[ korean ] = "ºÒÅõ¸í";
+ Text[ turkish ] = "Opak";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_OPAQUE_FALSE
+{
+ Text = "Nicht Undurchsichtig" ;
+ Text [ ENGLISH ] = "Not Opaque" ;
+ Text [ norwegian ] = "Ikke Ugjennomsiktig" ;
+ Text [ italian ] = "Non opaco" ;
+ Text [ portuguese_brazilian ] = "Não Opaco" ;
+ Text [ portuguese ] = "Não opaco" ;
+ Text [ finnish ] = "Ei peittävä" ;
+ Text [ danish ] = "Ikke uigennemsigtig" ;
+ Text [ french ] = "Non opaque" ;
+ Text [ swedish ] = "Inte ogenomskinlig" ;
+ Text [ dutch ] = "Niet ondoorzichtig" ;
+ Text [ spanish ] = "No opaco" ;
+ Text [ english_us ] = "Not Opaque" ;
+ Text[ chinese_simplified ] = "͸Ã÷";
+ Text[ russian ] = "Ïðîçðà÷íûé";
+ Text[ polish ] = "Przezroczysty";
+ Text[ japanese ] = "•s“§–¾‚Å‚È‚¢";
+ Text[ chinese_traditional ] = "³z©ú";
+ Text[ arabic ] = "ÔÝÇÝ";
+ Text[ greek ] = "¼÷é áäéáöáíÞò";
+ Text[ korean ] = "ºÒÅõ¸íÇÏÁö ¾Ê°Ô";
+ Text[ turkish ] = "Opak deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_FMTKEEP_TRUE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Absätze zusammenhalten : Absõtze zusammenhalten */
+ Text = "Absätze zusammenhalten" ;
+ Text [ ENGLISH ] = "Keep Paragraphs Together" ;
+ Text [ norwegian ] = "Hold Avsnittene Samlet" ;
+ Text [ italian ] = "Tieni paragrafi assieme" ;
+ Text [ portuguese_brazilian ] = "Manter Parágrafos Juntos" ;
+ Text [ portuguese ] = "Manter parágrafos juntos" ;
+ Text [ finnish ] = "Kappaleet yhdessä" ;
+ Text [ danish ] = "Hold sammen med næste afsnit" ;
+ Text [ french ] = "Paragraphes solidaires" ;
+ Text [ swedish ] = "Håll ihop stycken" ;
+ Text [ dutch ] = "Alinea's bijeenhouden" ;
+ Text [ spanish ] = "Mantener párrafos juntos" ;
+ Text [ english_us ] = "Keep with next paragraph" ;
+ Text[ chinese_simplified ] = "¶ÎÂä²»·Ö¿ª";
+ Text[ russian ] = "Âìåñòå ñî ñëåäóþùèì àáçàöåì";
+ Text[ polish ] = "Razem z nastêpnym";
+ Text[ japanese ] = "’i—Ž‚ðÚ‡‚·‚é";
+ Text[ chinese_traditional ] = "¬q¸¨¤£¤À¶}";
+ Text[ arabic ] = "ÊÑÇÈØ ÇáÝÞÑÇÊ";
+ Text[ greek ] = "ÄéáôÞñçóç ðáñáãñÜöùí ìáæß";
+ Text[ korean ] = "´Ü¶ôµéÀ» °°Àº ÆäÀÌÁö¿¡";
+ Text[ turkish ] = "Paragraflarý bir arada tut";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_FMTKEEP_FALSE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Absätze nicht zusammenhalten : Absõtze nicht zusammenhalten */
+ Text = "Absätze nicht zusammenhalten" ;
+ Text [ ENGLISH ] = "Not Keep Paragraphs Together" ;
+ Text [ norwegian ] = "Hold ikke Avsnittene Samlet" ;
+ Text [ italian ] = "Non tenere paragrafi assieme" ;
+ Text [ portuguese_brazilian ] = "Não Manter Parágrafos Juntos" ;
+ Text [ portuguese ] = "Não manter parágrafos juntos" ;
+ Text [ finnish ] = "Kappalet eivät yhdessä" ;
+ Text [ danish ] = "Hold afsnit ikke sammen" ;
+ Text [ french ] = "Paragraphes non solidaires" ;
+ Text [ swedish ] = "Håll inte ihop stycken" ;
+ Text [ dutch ] = "Alinea's niet bijeenhouden" ;
+ Text [ spanish ] = "No mantener párrafos juntos" ;
+ Text [ english_us ] = "Don't Keep Paragraphs Together" ;
+ Text[ chinese_simplified ] = "¶ÎÂä¿ÉÒÔ·Ö¿ª";
+ Text[ russian ] = "Áåç ñëåäóþùåãî àáçàöà";
+ Text[ polish ] = "Akapit nie razem z nastêpnym";
+ Text[ japanese ] = "’i—Ž‚ðÚ‡‚µ‚È‚¢";
+ Text[ chinese_traditional ] = "¬q¸¨¥i¥H¤À¶}";
+ Text[ arabic ] = "ÚÏã ÊÑÇÈØ ÇáÝÞÑÇÊ";
+ Text[ greek ] = "ÐáñÜãñáöïé ü÷é ìáæß";
+ Text[ korean ] = "´Ü¶ôµéÀ» °°Àº ÆäÀÌÁö¿¡ ³õÁö ¾ÊÀ½";
+ Text[ turkish ] = "Paragraflarý bir arada tutma";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_FMTSPLIT_TRUE
+{
+ Text = "Absatz trennen" ;
+ Text [ ENGLISH ] = "Split Paragraph" ;
+ Text [ norwegian ] = "Del opp Avsnitt" ;
+ Text [ italian ] = "Dividi paragrafo" ;
+ Text [ portuguese_brazilian ] = "Quebrar Parágrafo" ;
+ Text [ portuguese ] = "Dividir parágrafo" ;
+ Text [ finnish ] = "Jaettu kappale" ;
+ Text [ danish ] = "Del afsnit" ;
+ Text [ french ] = "Lignes non solidaires" ;
+ Text [ swedish ] = "Dela stycke" ;
+ Text [ dutch ] = "De alinea splitsen" ;
+ Text [ spanish ] = "Dividir párrafo" ;
+ Text [ english_us ] = "Split Paragraph" ;
+ Text[ chinese_simplified ] = "·Ö¿ª¶ÎÂä";
+ Text[ russian ] = "Ðàçîðâàòü àáçàö";
+ Text[ polish ] = "Podziel akapit";
+ Text[ japanese ] = "’i—Ž‚𕪊„‚·‚é";
+ Text[ chinese_traditional ] = "¤À¶}¬q¸¨";
+ Text[ arabic ] = "ÊÞÓíã ÇáÝÞÑÉ";
+ Text[ greek ] = "Äéá÷ùñéóìüò ðáñáãñÜöïõ";
+ Text[ korean ] = "´Ü¶ô ³ª´©±â";
+ Text[ turkish ] = "Paragrafý ayýr";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_FMTSPLIT_FALSE
+{
+ Text = "Absatz nicht trennen" ;
+ Text [ ENGLISH ] = "Not Split Paragraph" ;
+ Text [ norwegian ] = "Del ikke opp avsnitt" ;
+ Text [ italian ] = "Non dividere paragrafo" ;
+ Text [ portuguese_brazilian ] = "Não Quebrar Parágrafo" ;
+ Text [ portuguese ] = "Não dividir parágrafo" ;
+ Text [ finnish ] = "Ei jaettu kappale" ;
+ Text [ danish ] = "Del afsnit ikke" ;
+ Text [ french ] = "Lignes solidaires" ;
+ Text [ swedish ] = "Dela inte upp stycket" ;
+ Text [ dutch ] = "Alinea niet splitsen" ;
+ Text [ spanish ] = "No dividir párrafo" ;
+ Text [ english_us ] = "Don't split paragraph" ;
+ Text[ chinese_simplified ] = "¶ÎÂä²»·Ö¿ª";
+ Text[ russian ] = "Àáçàö íå ðàçðûâàòü";
+ Text[ polish ] = "Nie dziel akapitu";
+ Text[ japanese ] = "’i—Ž‚𕪊„‚µ‚È‚¢";
+ Text[ chinese_traditional ] = "¬q¸¨¤£¤À¶}";
+ Text[ arabic ] = "ÚÏã ÊÞÓíã ÇáÝÞÑÉ";
+ Text[ greek ] = "Íá ìçí ÷ùñéóôïýí ïé ðáñÜãñáöïé";
+ Text[ korean ] = "´Ü¶ô ³ª´©Áö ¾Ê±â";
+ Text[ turkish ] = "Paragrafý ayýrma";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PROT_CONTENT_TRUE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Inhalt geschützt : Inhalt gesch³tzt */
+ Text = "Inhalt geschützt" ;
+ Text [ ENGLISH ] = "Content protected" ;
+ Text [ norwegian ] = "Innholdsbeskyttet" ;
+ Text [ italian ] = "Contenuto protetto" ;
+ Text [ portuguese_brazilian ] = "Conteúdo protegido" ;
+ Text [ portuguese ] = "Conteúdo protegido" ;
+ Text [ finnish ] = "Sisältö suojattu" ;
+ Text [ danish ] = "Indholdet er beskyttet" ;
+ Text [ french ] = "Contenu protégé" ;
+ Text [ swedish ] = "Innehåll skyddat" ;
+ Text [ dutch ] = "Inhoud beveiligd" ;
+ Text [ spanish ] = "Contenido protegido" ;
+ Text [ english_us ] = "Contents protected" ;
+ Text[ chinese_simplified ] = "ÄÚÈÝÊÇÊܱ£»¤µÄ";
+ Text[ russian ] = "Ñîäåðæàíèå çàùèùåíî";
+ Text[ polish ] = "ZawartoϾ chroniona";
+ Text[ japanese ] = "“à—e‚͕ی삳‚ê‚Ä‚¢‚Ü‚·B";
+ Text[ chinese_traditional ] = "¤º®e¨ü«OÅ@";
+ Text[ arabic ] = "ÇáãÍÊæíÇÊ ãÍãíÉ";
+ Text[ greek ] = "Ðñïóôáôåõüìåíï ðåñéå÷üìåíï";
+ Text[ korean ] = "³»¿ë º¸È£";
+ Text[ turkish ] = "Ýçerik korunuyor";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PROT_CONTENT_FALSE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Inhalt nicht geschützt : Inhalt nicht gesch³tzt */
+ Text = "Inhalt nicht geschützt" ;
+ Text [ ENGLISH ] = "Content not protected" ;
+ Text [ norwegian ] = "Innhold ikke beskyttet" ;
+ Text [ italian ] = "Contenuto non protetto" ;
+ Text [ portuguese_brazilian ] = "Conteúdo não protegido" ;
+ Text [ portuguese ] = "Conteúdo desprotegido" ;
+ Text [ finnish ] = "Sisältöä ei suojattu" ;
+ Text [ danish ] = "Indholdet er ikke beskyttet" ;
+ Text [ french ] = "Contenu non protégé" ;
+ Text [ swedish ] = "Innehåll inte skyddat" ;
+ Text [ dutch ] = "Inhoud niet beveiligd" ;
+ Text [ spanish ] = "Contenido no protegido" ;
+ Text [ english_us ] = "Contents not protected" ;
+ Text[ chinese_simplified ] = "ûÓб£»¤ÄÚÈÝ";
+ Text[ russian ] = "Ñîäåðæàíèå íå çàùèùåíî";
+ Text[ polish ] = "ZawartoϾ nie chroniona";
+ Text[ japanese ] = "“à—e‚͕ی삳‚ê‚Ä‚¢‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "¤º®e¤£¨ü«OÅ@";
+ Text[ arabic ] = "ÇáãÍÊæíÇÊ ÛíÑ ãÍãíÉ";
+ Text[ greek ] = "Ìç ðñïóôáôåõüìåíï ðåñéå÷üìåíï";
+ Text[ korean ] = "³»¿ë º¸È£ ¾øÀ½";
+ Text[ turkish ] = "Ýçerik korunmuyor";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PROT_SIZE_TRUE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Größe geschützt : Gr÷˜e gesch³tzt */
+ Text = "Größe geschützt" ;
+ Text [ ENGLISH ] = "Size protected" ;
+ Text [ norwegian ] = "SørrelsesbeskyttetSize protected" ;
+ Text [ italian ] = "Dimensione protetta" ;
+ Text [ portuguese_brazilian ] = "Tamanho protegido" ;
+ Text [ portuguese ] = "Tamanho protegido" ;
+ Text [ finnish ] = "Koko suojattu" ;
+ Text [ danish ] = "Størrelsen er beskyttet" ;
+ Text [ french ] = "Dimensions protégées" ;
+ Text [ swedish ] = "Storlek skyddad" ;
+ Text [ dutch ] = "Grootte beveiligd" ;
+ Text [ spanish ] = "Tamaño protegido" ;
+ Text [ english_us ] = "Size protected" ;
+ Text[ chinese_simplified ] = "´óСÊܱ£»¤";
+ Text[ russian ] = "Ðàçìåð çàùèùåí";
+ Text[ polish ] = "Rozmiar chroniony";
+ Text[ japanese ] = "»²½Þ‚͕ی삳‚ê‚Ä‚¢‚Ü‚·B";
+ Text[ chinese_traditional ] = "¤j¤p¨ü«OÅ@";
+ Text[ arabic ] = "ÇáÍÌã ãÍãí";
+ Text[ greek ] = "Ðñïóôáôåõüìåíï ìÝãåèïò";
+ Text[ korean ] = "Å©±â º¸È£";
+ Text[ turkish ] = "Boyut korunuyor";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PROT_SIZE_FALSE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Größe nicht geschützt : Gr÷˜e nicht gesch³tzt */
+ Text = "Größe nicht geschützt" ;
+ Text [ ENGLISH ] = "Size not protected" ;
+ Text [ norwegian ] = "Størrelse ikke beskyttet" ;
+ Text [ italian ] = "Dimensione non protetta" ;
+ Text [ portuguese_brazilian ] = "Tamanho não protegido" ;
+ Text [ portuguese ] = "Tamanho desprotegido" ;
+ Text [ finnish ] = "Kokoa ei suojattu" ;
+ Text [ danish ] = "Størrelsen er ikke beskyttet" ;
+ Text [ french ] = "Dimensions non protégées" ;
+ Text [ swedish ] = "Storlek inte skyddad" ;
+ Text [ dutch ] = "Grootte niet beveiligd" ;
+ Text [ spanish ] = "Tamaño no protegido" ;
+ Text [ english_us ] = "Size not protected" ;
+ Text[ chinese_simplified ] = "ûÓб£»¤´óС";
+ Text[ russian ] = "Ðàçìåð íå çàùèùåí";
+ Text[ polish ] = "Rozmiar nie chroniony";
+ Text[ japanese ] = "»²½Þ‚͕ی삳‚ê‚Ä‚¢‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "¤j¤p¤£¨ü«OÅ@";
+ Text[ arabic ] = "ÇáÍÌã ÛíÑ ãÍãí";
+ Text[ greek ] = "Ôï ìÝãåèïò äåí ðñïóôáôåýåôáé";
+ Text[ korean ] = "Å©±â º¸È£ ¾øÀ½";
+ Text[ turkish ] = "Boyut korunmuyor";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PROT_POS_TRUE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Position geschützt : Position gesch³tzt */
+ Text = "Position geschützt" ;
+ Text [ ENGLISH ] = "Position protected" ;
+ Text [ norwegian ] = "Posisjonsbeskyttet" ;
+ Text [ italian ] = "Posizione protetta" ;
+ Text [ portuguese_brazilian ] = "Posição protegida" ;
+ Text [ portuguese ] = "Posição protegida" ;
+ Text [ finnish ] = "Paikka suojattu" ;
+ Text [ danish ] = "Placeringen er beskyttet" ;
+ Text [ french ] = "Position protégée" ;
+ Text [ swedish ] = "Positionen skyddad" ;
+ Text [ dutch ] = "Positie beveiligd" ;
+ Text [ spanish ] = "Posición protegida" ;
+ Text [ english_us ] = "Position protected" ;
+ Text[ chinese_simplified ] = "λÖÃÊܱ£»¤µÄ";
+ Text[ russian ] = "Ïîëîæåíèå çàùèùåíî";
+ Text[ polish ] = "Pozycja chroniona";
+ Text[ japanese ] = "ˆÊ’u‚͕ی삳‚ê‚Ä‚¢‚Ü‚·B";
+ Text[ chinese_traditional ] = "¦ì¸m¨ü«OÅ@";
+ Text[ arabic ] = "ÇáãæÖÚ ãÍãí";
+ Text[ greek ] = "Ðñïóôáóßá èÝóçò";
+ Text[ korean ] = "À§Ä¡ º¸È£";
+ Text[ turkish ] = "Konum korunuyor";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PROT_POS_FALSE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Position nicht geschützt : Position nicht gesch³tzt */
+ Text = "Position nicht geschützt" ;
+ Text [ ENGLISH ] = "Position not protected" ;
+ Text [ norwegian ] = "Posisjon ikke beskyttet" ;
+ Text [ italian ] = "Posizione non protetta" ;
+ Text [ portuguese_brazilian ] = "Posição não protegida" ;
+ Text [ portuguese ] = "Posição desprotegida" ;
+ Text [ finnish ] = "Paikkaa ei suojattu" ;
+ Text [ danish ] = "Placeringen er ikke beskyttet" ;
+ Text [ french ] = "Position non protégée" ;
+ Text [ swedish ] = "Positionen ej skyddad" ;
+ Text [ dutch ] = "Positie niet beveiligd" ;
+ Text [ spanish ] = "Posición no protegida" ;
+ Text [ english_us ] = "Position not protected" ;
+ Text[ chinese_simplified ] = "λÖÃûÓÐÊܱ£»¤";
+ Text[ russian ] = "Ïîëîæåíèå íå çàùèùåíî";
+ Text[ polish ] = "Pozycja nie chroniona";
+ Text[ japanese ] = "ˆÊ’u‚͕ی삳‚ê‚Ä‚¢‚Ü‚¹‚ñ";
+ Text[ chinese_traditional ] = "¦ì¸m¤£¨ü«OÅ@";
+ Text[ arabic ] = "ÇáãæÖÚ ÛíÑ ãÍãí";
+ Text[ greek ] = "Ç èÝóç äåí ðñïóôáôåýåôáé";
+ Text[ korean ] = "À§Ä¡ º¸È£ ¾øÀ½";
+ Text[ turkish ] = "Konum korunmuyor";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_TRANSPARENT_TRUE
+{
+ Text = "Transparent" ;
+ Text [ English ] = "Transparent" ;
+ Text [ norwegian ] = "Transparent" ;
+ Text [ italian ] = "Lucido" ;
+ Text [ portuguese_brazilian ] = "Transparente" ;
+ Text [ portuguese ] = "Transparente" ;
+ Text [ french ] = "Transparent" ;
+ Text [ dutch ] = "Transparant" ;
+ Text [ spanish ] = "Transparente" ;
+ Text [ danish ] = "Transparent" ;
+ Text [ swedish ] = "Transparent" ;
+ Text [ finnish ] = "Transparent" ;
+ Text [ english_us ] = "Transparent" ;
+ Text[ chinese_simplified ] = "͸Ã÷";
+ Text[ russian ] = "Ïðîçðà÷íûé";
+ Text[ polish ] = "Przezroczysty";
+ Text[ japanese ] = "“§‰ß«‚ ‚è";
+ Text[ chinese_traditional ] = "³z©ú";
+ Text[ arabic ] = "ÔÝÇÝ";
+ Text[ greek ] = "ÄéáöáíÝò";
+ Text[ korean ] = "Åõ¸í";
+ Text[ turkish ] = "Saydam";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_TRANSPARENT_FALSE
+{
+ Text = "Nicht Transparent" ;
+ Text [ ENGLISH ] = "Not Transparent" ;
+ Text [ norwegian ] = "Ikke Transparent" ;
+ Text [ italian ] = "Non trasparente" ;
+ Text [ portuguese_brazilian ] = "Não Transparente" ;
+ Text [ portuguese ] = "Não transparente" ;
+ Text [ finnish ] = "Ei läpinäkyvä" ;
+ Text [ danish ] = "Ikke transparent" ;
+ Text [ french ] = "Non transparent" ;
+ Text [ swedish ] = "Inte transparent" ;
+ Text [ dutch ] = "Niet transparant" ;
+ Text [ spanish ] = "No transparente" ;
+ Text [ english_us ] = "Not Transparent" ;
+ Text[ chinese_simplified ] = "²»Í¸Ã÷";
+ Text[ russian ] = "Íåïðîçðà÷íûé";
+ Text[ polish ] = "Nie przezroczysty";
+ Text[ japanese ] = "“§–¾‚Å‚È‚¢";
+ Text[ chinese_traditional ] = "¤£³z©ú";
+ Text[ arabic ] = "ÛíÑ ÔÝÇÝ";
+ Text[ greek ] = "¼÷é äéáöáíÝò";
+ Text[ korean ] = "Åõ¸íÇÏÁö ¾Ê°Ô";
+ Text[ turkish ] = "Saydam deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BOXINF_TABLE_TRUE
+{
+ Text = "Tabelle" ;
+ Text [ ENGLISH ] = "Table" ;
+ Text [ norwegian ] = "Table" ;
+ Text [ italian ] = "Tabella" ;
+ Text [ portuguese_brazilian ] = "Tabela" ;
+ Text [ portuguese ] = "Tabela" ;
+ Text [ finnish ] = "Taulukko" ;
+ Text [ danish ] = "Tabel" ;
+ Text [ french ] = "Table" ;
+ Text [ swedish ] = "Tabell" ;
+ Text [ dutch ] = "Tabel" ;
+ Text [ spanish ] = "Tabla" ;
+ Text [ english_us ] = "Table" ;
+ Text[ chinese_simplified ] = "±í¸ñ";
+ Text[ russian ] = "Òàáëèöà";
+ Text[ polish ] = "Tabela";
+ Text[ japanese ] = "•\\";
+ Text[ chinese_traditional ] = "ªí®æ";
+ Text[ arabic ] = "ÇáÌÏæá";
+ Text[ greek ] = "Ðßíáêáò";
+ Text[ korean ] = "Å×À̺í";
+ Text[ turkish ] = "Tablo";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BOXINF_TABLE_FALSE
+{
+ Text = "Nicht Tabelle" ;
+ Text [ ENGLISH ] = "Not Table" ;
+ Text [ norwegian ] = "Ikke Tabell" ;
+ Text [ italian ] = "Non tabella" ;
+ Text [ portuguese_brazilian ] = "Não Tabela" ;
+ Text [ portuguese ] = "Sem tabela" ;
+ Text [ finnish ] = "Ei taulukko" ;
+ Text [ danish ] = "Ikke tabel" ;
+ Text [ french ] = "Pas de table" ;
+ Text [ swedish ] = "Inte tabell" ;
+ Text [ dutch ] = "Geen tabel" ;
+ Text [ spanish ] = "Sin tabla" ;
+ Text [ english_us ] = "Not Table" ;
+ Text[ chinese_simplified ] = "²»ÊDZí¸ñ";
+ Text[ russian ] = "Íå òàáëèöà";
+ Text[ polish ] = "Nie tabela";
+ Text[ japanese ] = "•\\‚Å‚È‚¢";
+ Text[ chinese_traditional ] = "¤£¬Oªí®æ";
+ Text[ arabic ] = "ÈÏæä ÌÏæá";
+ Text[ greek ] = "¼÷é ðßíáêá";
+ Text[ korean ] = "Å×ÀÌºí ¾øÀ½";
+ Text[ turkish ] = "Tablo deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BOXINF_DIST_TRUE
+{
+ Text = "Abstand freigeschaltet" ;
+ Text [ ENGLISH ] = "Distance enabled" ;
+ Text [ norwegian ] = "+++Distance enabled" ;
+ Text [ italian ] = "Distanza abilitata" ;
+ Text [ portuguese_brazilian ] = "Distância ativada" ;
+ Text [ portuguese ] = "Espaçamento activado" ;
+ Text [ finnish ] = "Etäisyys käytössä" ;
+ Text [ danish ] = "Afstand aktiveret" ;
+ Text [ french ] = "Écart activé" ;
+ Text [ swedish ] = "Avstånd aktiverat" ;
+ Text [ dutch ] = "Afstand ingeschakeld" ;
+ Text [ spanish ] = "Espacio activado" ;
+ Text [ english_us ] = "Spacing enabled" ;
+ Text[ chinese_simplified ] = "²ÉÓüä¸ô";
+ Text[ russian ] = "Èíòåðâàë ðàçðåøåí";
+ Text[ polish ] = "Zezwolenie na odstêp";
+ Text[ japanese ] = "ŠÔŠu‚ðŽ©—R‚É‚·‚é";
+ Text[ chinese_traditional ] = "±Ä¥Î¶¡¹j";
+ Text[ arabic ] = "ÇáÓãÇÍ ÈÇáÊÈÇÚÏ";
+ Text[ greek ] = "Áðüóôáóç åíåñãïðïéçìÝíç";
+ Text[ korean ] = "°£°Ý »ç¿ë °¡´É";
+ Text[ turkish ] = "Aralýk etkin";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BOXINF_DIST_FALSE
+{
+ Text = "Abstand nicht freigeschaltet" ;
+ Text [ ENGLISH ] = "Distance disabled" ;
+ Text [ norwegian ] = "+++Distance disabled" ;
+ Text [ italian ] = "Distanza disabilitata" ;
+ Text [ portuguese_brazilian ] = "Distância desativada" ;
+ Text [ portuguese ] = "Espaçamento desactivado" ;
+ Text [ finnish ] = "Etäisyys ei käytössä" ;
+ Text [ danish ] = "Afstand deaktiveret" ;
+ Text [ french ] = "Écart désactivé" ;
+ Text [ swedish ] = "Avstånd deaktiverat" ;
+ Text [ dutch ] = "Afstand uitgeschakeld" ;
+ Text [ spanish ] = "Espacio desactivado" ;
+ Text [ english_us ] = "Spacing disabled" ;
+ Text[ chinese_simplified ] = "²»²ÉÓüä¸ô";
+ Text[ russian ] = "Èíòåðâàë çàáëîêèðîâàí";
+ Text[ polish ] = "Odstêpy niedostêpne";
+ Text[ japanese ] = "ŠÔŠu‚ð—}§‚·‚é";
+ Text[ chinese_traditional ] = "¤£±Ä¥Î¶¡¹j";
+ Text[ arabic ] = "ãäÚ ÇáÊÈÇÚÏ";
+ Text[ greek ] = "Áðüóôáóç áðåíåñãïðïéçìÝíç";
+ Text[ korean ] = "°£°Ý »ç¿ë ºÒ°¡´É";
+ Text[ turkish ] = "Aralýk etkin deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BOXINF_MDIST_TRUE
+{
+ Text = "Abstand nicht unterschreiten" ;
+ Text [ ENGLISH ] = "Not fall short of distance" ;
+ Text [ norwegian ] = "+++Not fall short of distance" ;
+ Text [ italian ] = "Brevi distanze non consentite" ;
+ Text [ portuguese_brazilian ] = "Não ficar com distância insuficiente" ;
+ Text [ portuguese ] = "Manter espaçamento" ;
+ Text [ finnish ] = "Etäisyyttä ei saa lyhentää" ;
+ Text [ danish ] = "Underskrid afstand ikke" ;
+ Text [ french ] = "Ne pas dépasser l'espace" ;
+ Text [ swedish ] = "Underskrid inte avståndet" ;
+ Text [ dutch ] = "Te kleine afstand niet toegestaan" ;
+ Text [ spanish ] = "Mantener el espacio" ;
+ Text [ english_us ] = "Keep spacing interval" ;
+ Text[ chinese_simplified ] = "²»Ð¡ÓÚ¼ä¸ô";
+ Text[ russian ] = "Íå äîïóñêàåòñÿ ìåíüøèé èíòåðâàë, ÷åì ïðåäóñìîòðåíî";
+ Text[ polish ] = "Odstêp nie mo¿e byæ mniejszy ni¿ przewidziany";
+ Text[ japanese ] = "ŠÔŠu‚ð‹·‚­‚Å‚«‚È‚¢";
+ Text[ chinese_traditional ] = "¤£¤p©ó¶¡¹j";
+ Text[ arabic ] = "ÇáÅÈÞÇÁ Úáì ÇáÍÏ ÇáÃÏäì ááÊÈÇÚÏ";
+ Text[ greek ] = "Íá ìçí ìåéùèåß ç áðüóôáóç";
+ Text[ korean ] = "°£°Ý ¹Ì´Þ ¾øÀ½";
+ Text[ turkish ] = "Aralýk küçültülemez";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BOXINF_MDIST_FALSE
+{
+ Text = "Abstand unterschreiten erlaubt" ;
+ Text [ ENGLISH ] = "Allowed to fall short of distance" ;
+ Text [ norwegian ] = "+++Allowed to fall short of distance" ;
+ Text [ italian ] = "Brevi distanze consentite" ;
+ Text [ portuguese_brazilian ] = "Permitido ficar com distância insuficiente" ;
+ Text [ portuguese ] = "Permitido espaçamento menor do que o especificado" ;
+ Text [ finnish ] = "Etäisyyttä saa lyhentää" ;
+ Text [ danish ] = "Tilladt at underskride afstand" ;
+ Text [ french ] = "Autorisation d'un espace inférieur" ;
+ Text [ swedish ] = "Tillåtet att underskrida avstånd" ;
+ Text [ dutch ] = "Te kleine afstand toegestaan" ;
+ Text [ spanish ] = "Permitir espacio menor al especificado" ;
+ Text [ english_us ] = "Allowed to fall short of spacing interval" ;
+ Text[ chinese_simplified ] = "ÔÊÐíСÓÚ¼ä¸ô";
+ Text[ russian ] = "Äîïóñêàåòñÿ ìåíüøèé èíòåðâàë, ÷åì ïðåäóñìîòðåíî";
+ Text[ polish ] = "Dozwolony mniejszy odstêp ni¿ przewidziany";
+ Text[ japanese ] = "ŠÔŠu‚ð‹·‚­‚Å‚«‚é";
+ Text[ chinese_traditional ] = "¤¹³\\¤p©ó¶¡¹j";
+ Text[ arabic ] = "ÇáÓãÇÍ ÈÚÏã ÇáÅÈÞÇÁ Úáì ÇáÍÏ ÇáÃÏäì ááÊÈÇÚÏ";
+ Text[ greek ] = "Íá åðéôñáðåß ç õðÝñâáóç ôïõ êÜôù ïñßïõ";
+ Text[ korean ] = "°£°Ý ¹Ì´Þ Çã¿ë";
+ Text[ turkish ] = "Aralýk küçültülebilir";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_HYPHEN_TRUE
+{
+ Text = "Silbentrennung" ;
+ Text [ ENGLISH ] = "Hyphen" ;
+ Text [ norwegian ] = "Bindestrek" ;
+ Text [ italian ] = "Sillabazione" ;
+ Text [ portuguese_brazilian ] = "Hífen" ;
+ Text [ portuguese ] = "Divisão silábica" ;
+ Text [ finnish ] = "Tavuviiva" ;
+ Text [ danish ] = "Orddeling" ;
+ Text [ french ] = "Coupure de mots" ;
+ Text [ swedish ] = "Avstavning" ;
+ Text [ dutch ] = "Woordafbreking" ;
+ Text [ spanish ] = "Separación silábica" ;
+ Text [ english_us ] = "Hyphenation" ;
+ Text[ chinese_simplified ] = "Á¬×Ö·û";
+ Text[ russian ] = "Ðàññòàíîâêà ïåðåíîñîâ";
+ Text[ polish ] = "Dzielenie wyrazów";
+ Text[ japanese ] = "ʲÌÈ°¼®Ý";
+ Text[ chinese_traditional ] = "³s¦r²Å";
+ Text[ arabic ] = "ÝÕá ÇáãÞÇØÚ";
+ Text[ greek ] = "Óõëëáâéóìüò";
+ Text[ korean ] = "ÇÏÀÌÇ ³Ö±â";
+ Text[ turkish ] = "Heceleme";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_HYPHEN_FALSE
+{
+ Text = "Keine Silbentrennung" ;
+ Text [ ENGLISH ] = "No Hyphen" ;
+ Text [ norwegian ] = "Ingen Bindestrek" ;
+ Text [ italian ] = "Senza sillabazione" ;
+ Text [ portuguese_brazilian ] = "Sem Hífen" ;
+ Text [ portuguese ] = "Sem divisão silábica" ;
+ Text [ finnish ] = "Ei tavuviivaa" ;
+ Text [ danish ] = "Ingen orddeling" ;
+ Text [ french ] = "Pas de coupure de mots" ;
+ Text [ swedish ] = "Ingen avstavning" ;
+ Text [ dutch ] = "Geen woordafbreking" ;
+ Text [ spanish ] = "Sin separación silábica" ;
+ Text [ english_us ] = "No hyphenation" ;
+ Text[ chinese_simplified ] = "²»Ê¹ÓÃÁ¬×Ö·û";
+ Text[ russian ] = "Áåç ðàññòàíîâêè ïåðåíîñîâ";
+ Text[ polish ] = "Bez dzielenia wyrazów";
+ Text[ japanese ] = "ʲÌÝ‹æØ‚è‚È‚µ";
+ Text[ chinese_traditional ] = "¤£¨Ï¥Î³s¦r²Å";
+ Text[ arabic ] = "ÈÏæä ÝÕá ÇáãÞÇØÚ";
+ Text[ greek ] = "×ùñßò óõëëáâéóìü";
+ Text[ korean ] = "ÇÏÀÌÇ ¾øÀ½";
+ Text[ turkish ] = "Heceleme yok";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_END_TRUE
+{
+ Text = "Seitenende" ;
+ Text [ ENGLISH ] = "Page End" ;
+ Text [ norwegian ] = "Sideslutt" ;
+ Text [ italian ] = "Fine pagina" ;
+ Text [ portuguese_brazilian ] = "Final de Página" ;
+ Text [ portuguese ] = "Fim de página" ;
+ Text [ finnish ] = "Sivun loppu" ;
+ Text [ danish ] = "Sideslutning" ;
+ Text [ french ] = "Fin de page" ;
+ Text [ swedish ] = "Sidslut" ;
+ Text [ dutch ] = "Pagina-einde" ;
+ Text [ spanish ] = "Fin de página" ;
+ Text [ english_us ] = "Page End" ;
+ Text[ chinese_simplified ] = "Ò³Ãæ½áβ";
+ Text[ russian ] = "Êîíåö ñòðàíèöû";
+ Text[ polish ] = "Koniec strony";
+ Text[ japanese ] = "Íß°¼Þ––";
+ Text[ chinese_traditional ] = "­¶­±µ²§À";
+ Text[ arabic ] = "äåÇíÉ ÇáÕÝÍÉ";
+ Text[ greek ] = "ÔÝëïò óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö ³¡";
+ Text[ turkish ] = "Sayfa sonu";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_END_FALSE
+{
+ Text = "Kein Seitenende" ;
+ Text [ ENGLISH ] = "No Page End" ;
+ Text [ norwegian ] = "Ingen Sideslutt" ;
+ Text [ italian ] = "Nessuna fine pagina" ;
+ Text [ portuguese_brazilian ] = "Sem Final de Página" ;
+ Text [ portuguese ] = "Sem fim de página" ;
+ Text [ finnish ] = "Ei sivun loppu" ;
+ Text [ danish ] = "Ingen sideslutning" ;
+ Text [ french ] = "Pas de fin de page" ;
+ Text [ swedish ] = "Inget sidslut" ;
+ Text [ dutch ] = "Geen pagina-einde" ;
+ Text [ spanish ] = "Sin fin de página" ;
+ Text [ english_us ] = "No Page End" ;
+ Text[ chinese_simplified ] = "ÎÞÒ³Ãæ½áβ";
+ Text[ russian ] = "Áåç êîíöà ñòðàíèöû";
+ Text[ polish ] = "Brak koñca strony";
+ Text[ japanese ] = "Íß°¼Þ––‚È‚µ";
+ Text[ chinese_traditional ] = "µL­¶­±µ²§À";
+ Text[ arabic ] = "ÈÏæä äåÇíÉ ÕÝÍÉ";
+ Text[ greek ] = "×ùñßò ôÝëïò óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö ³¡ ¾øÀ½";
+ Text[ turkish ] = "Sayfa sonu deðil";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_MARGIN_LEFT
+{
+ Text = "Linker Rand: " ;
+ Text [ English ] = "Left margin: " ;
+ Text [ norwegian ] = "Venstremarg: " ;
+ Text [ italian ] = "Margine sinistro: " ;
+ Text [ portuguese_brazilian ] = "Margem esquerda: " ;
+ Text [ portuguese ] = "Margem esquerda: " ;
+ Text [ english_us ] = "Left margin: " ;
+ Text [ finnish ] = "Left margin: " ;
+ Text [ danish ] = "Venstre margen: " ;
+ Text [ french ] = "Marge gauche : " ;
+ Text [ swedish ] = "Vänster marginal: " ;
+ Text [ dutch ] = "Marge links: " ;
+ Text [ spanish ] = "Margen izquierdo: " ;
+ Text[ chinese_simplified ] = "×ó·½Ò³±ß¾à£º ";
+ Text[ russian ] = "Ëåâîå ïîëå: ";
+ Text[ polish ] = "Lewy margines: ";
+ Text[ japanese ] = "¶—]”’: ";
+ Text[ chinese_traditional ] = "¥ªÃä¬É¡G ";
+ Text[ arabic ] = "ÇáåÇãÔ ÇáÃíÓÑ: ";
+ Text[ greek ] = "Áñéóôåñü ðåñéèþñéï: ";
+ Text[ korean ] = "¿ÞÂÊ ¿©¹é: ";
+ Text[ turkish ] = "Sol kenar: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_MARGIN_TOP
+{
+ Text = "Oberer Rand: " ;
+ Text [ English ] = "Top margin: " ;
+ Text [ norwegian ] = "Toppmarg: " ;
+ Text [ italian ] = "Margine superiore: " ;
+ Text [ portuguese_brazilian ] = "Top margin: " ;
+ Text [ portuguese ] = "Margem superior: " ;
+ Text [ english_us ] = "Top margin: " ;
+ Text [ finnish ] = "Top margin: " ;
+ Text [ danish ] = "Topmargen: " ;
+ Text [ french ] = "Marge supérieure : " ;
+ Text [ swedish ] = "Övre marginal: " ;
+ Text [ dutch ] = "Marge boven: " ;
+ Text [ spanish ] = "Margen superior: " ;
+ Text[ chinese_simplified ] = "ÉÏ·½Ò³±ß¾à£º ";
+ Text[ russian ] = "Âåðõíåå ïîëå: ";
+ Text[ polish ] = "Górny margines: ";
+ Text[ japanese ] = "ã—]”’: ";
+ Text[ chinese_traditional ] = "¤WÃä¬É¡G ";
+ Text[ arabic ] = "ÇáåÇãÔ ÇáÚáæí: ";
+ Text[ greek ] = "ÐÜíù ðåñéèþñéï: ";
+ Text[ korean ] = "À§ ¿©¹é: ";
+ Text[ turkish ] = "Üst kenar: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_MARGIN_RIGHT
+{
+ Text = "Rechter Rand: " ;
+ Text [ English ] = "Right margin: " ;
+ Text [ norwegian ] = "Høyremarg: " ;
+ Text [ italian ] = "Margine destro: " ;
+ Text [ portuguese_brazilian ] = "Margem direita: " ;
+ Text [ portuguese ] = "Margem direita: " ;
+ Text [ english_us ] = "Right margin: " ;
+ Text [ finnish ] = "Right margin: " ;
+ Text [ danish ] = "Højre margen: " ;
+ Text [ french ] = "Marge droite : " ;
+ Text [ swedish ] = "Höger marginal: " ;
+ Text [ dutch ] = "Marge rechts: " ;
+ Text [ spanish ] = "Margen derecho: " ;
+ Text[ chinese_simplified ] = "ÓÒ·½Ò³±ß¾à£º ";
+ Text[ russian ] = "Ïðàâîå ïîëå: ";
+ Text[ polish ] = "Prawy margines: ";
+ Text[ japanese ] = "‰E—]”’: ";
+ Text[ chinese_traditional ] = "¥kÃä¬É¡G ";
+ Text[ arabic ] = "ÇáåÇãÔ ÇáÃíãä: ";
+ Text[ greek ] = "Äåîéü ðåñéèþñéï: ";
+ Text[ korean ] = "¿À¸¥ÂÊ ¿©¹é: ";
+ Text[ turkish ] = "Sað kenar: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_MARGIN_BOTTOM
+{
+ Text = "Unterer Rand: " ;
+ Text [ English ] = "Bottom margin: " ;
+ Text [ norwegian ] = "Bunnmarg: " ;
+ Text [ italian ] = "Margine inferiore: " ;
+ Text [ portuguese_brazilian ] = "Margem base: " ;
+ Text [ portuguese ] = "Margem inferior: " ;
+ Text [ english_us ] = "Bottom margin: " ;
+ Text [ finnish ] = "Bottom margin: " ;
+ Text [ danish ] = "Bundmargen: " ;
+ Text [ french ] = "Marge inférieure : " ;
+ Text [ swedish ] = "Undre marginal: " ;
+ Text [ dutch ] = "Marge beneden: " ;
+ Text [ spanish ] = "Margen inferior: " ;
+ Text[ chinese_simplified ] = "Ï·½Ò³±ß¾à£º ";
+ Text[ russian ] = "Íèæíåå ïîëå: ";
+ Text[ polish ] = "Dolny margines: ";
+ Text[ japanese ] = "‰º—]”’: ";
+ Text[ chinese_traditional ] = "¤UÃä¬É¡G ";
+ Text[ arabic ] = "ÇáåÇãÔ ÇáÓÝáí: ";
+ Text[ greek ] = "ÊÜôù ðåñéèþñéï: ";
+ Text[ korean ] = "¾Æ·¡ ¿©¹é: ";
+ Text[ turkish ] = "Alt kenar: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SIZE_WIDTH
+{
+ Text = "Breite: " ;
+ Text [ English ] = "Width: " ;
+ Text [ norwegian ] = "Bredde: " ;
+ Text [ italian ] = "Larghezza: " ;
+ Text [ portuguese_brazilian ] = "Largura: " ;
+ Text [ portuguese ] = "Largura: " ;
+ Text [ english_us ] = "Width: " ;
+ Text [ finnish ] = "Width: " ;
+ Text [ danish ] = "Bredde: " ;
+ Text [ french ] = "Largeur : " ;
+ Text [ swedish ] = "Bredd: " ;
+ Text [ dutch ] = "Breedte: " ;
+ Text [ spanish ] = "Ancho: " ;
+ Text[ chinese_simplified ] = "¿í¶È£º ";
+ Text[ russian ] = "Øèðèíà: ";
+ Text[ polish ] = "SzerokoϾ: ";
+ Text[ japanese ] = "•: ";
+ Text[ chinese_traditional ] = "¼e«×¡G ";
+ Text[ arabic ] = "ÇáÚÑÖ: ";
+ Text[ greek ] = "ÐëÜôïò: ";
+ Text[ korean ] = "³Êºñ: ";
+ Text[ turkish ] = "Geniþlik: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SIZE_HEIGHT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Höhe: : H÷he: */
+ Text = "Höhe: " ;
+ Text [ English ] = "Height: " ;
+ Text [ norwegian ] = "Høyde: " ;
+ Text [ italian ] = "Altezza: " ;
+ Text [ portuguese_brazilian ] = "Altura: " ;
+ Text [ portuguese ] = "Altura: " ;
+ Text [ english_us ] = "Height: " ;
+ Text [ finnish ] = "Height: " ;
+ Text [ danish ] = "Højde: " ;
+ Text [ french ] = "Hauteur : " ;
+ Text [ swedish ] = "Höjd: " ;
+ Text [ dutch ] = "Hoogte: " ;
+ Text [ spanish ] = "Alto: " ;
+ Text[ chinese_simplified ] = "¸ß¶È£º ";
+ Text[ russian ] = "Âûñîòà: ";
+ Text[ polish ] = "WysokoϾ: ";
+ Text[ japanese ] = "‚‚³: ";
+ Text[ chinese_traditional ] = "°ª«×¡G ";
+ Text[ arabic ] = "ÇáÇÑÊÝÇÚ: ";
+ Text[ greek ] = "¾øïò: ";
+ Text[ korean ] = "³ôÀÌ: ";
+ Text[ turkish ] = "Yükseklik: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_LRSPACE_LEFT
+{
+ Text = "Einzug links " ;
+ Text [ English ] = "From left " ;
+ Text [ norwegian ] = "Fra venstre " ;
+ Text [ italian ] = "Rientro sinistro " ;
+ Text [ portuguese_brazilian ] = "From left " ;
+ Text [ portuguese ] = "Avanço de parágrafo, esquerda " ;
+ Text [ english_us ] = "Indent left " ;
+ Text [ finnish ] = "From left " ;
+ Text [ danish ] = "Indrykning venstre " ;
+ Text [ french ] = "Retrait à gauche " ;
+ Text [ swedish ] = "Indrag vänster " ;
+ Text [ dutch ] = "Links inspringen " ;
+ Text [ spanish ] = "Sangría a la izquierda " ;
+ Text[ chinese_simplified ] = "×óËõ½ø ";
+ Text[ russian ] = "Îòñòóï ñëåâà ";
+ Text[ polish ] = "Wciêcie z lewej ";
+ Text[ japanese ] = "¶²ÝÃÞÝÄ ";
+ Text[ chinese_traditional ] = "¥ªÁY±Æ ";
+ Text[ arabic ] = "ÅÒÇÍÉ íÓÑì ";
+ Text[ greek ] = "Åóï÷Þ áñéóôåñÜ ";
+ Text[ korean ] = "¿ÞÂÊ µé¿© ¾²±â ";
+ Text[ turkish ] = "Sol girinti ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_LRSPACE_FLINE
+{
+ Text = "Erste Zeile " ;
+ Text [ English ] = "First line " ;
+ Text [ norwegian ] = "Første linje " ;
+ Text [ italian ] = "Prima riga " ;
+ Text [ portuguese_brazilian ] = "First line " ;
+ Text [ portuguese ] = "1ª linha " ;
+ Text [ english_us ] = "First Line " ;
+ Text [ finnish ] = "First line " ;
+ Text [ danish ] = "Første række " ;
+ Text [ french ] = "Première ligne " ;
+ Text [ swedish ] = "Första raden " ;
+ Text [ dutch ] = "Eerste regel " ;
+ Text [ spanish ] = "Primera línea " ;
+ Text[ chinese_simplified ] = "Ê×ÐÐ ";
+ Text[ russian ] = "Ïåðâàÿ ñòðîêà ";
+ Text[ polish ] = "Pierw. wiersz ";
+ Text[ japanese ] = "ʼn‚Ìs ";
+ Text[ chinese_traditional ] = "­º¦æ ";
+ Text[ arabic ] = "ÇáÓØÑ ÇáÃæá ";
+ Text[ greek ] = "Ðñþôç ãñáììÞ ";
+ Text[ korean ] = "ù ÁÙ ";
+ Text[ turkish ] = "Ýlk satýr ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_LRSPACE_RIGHT
+{
+ Text = "Einzug rechts " ;
+ Text [ English ] = "From right " ;
+ Text [ norwegian ] = "Fra høyre " ;
+ Text [ italian ] = "Rientro destro " ;
+ Text [ portuguese_brazilian ] = "From right " ;
+ Text [ portuguese ] = "Avanço de parágrafo, direita " ;
+ Text [ english_us ] = "Indent right " ;
+ Text [ finnish ] = "From right " ;
+ Text [ danish ] = "Indrykning højre " ;
+ Text [ french ] = "Retrait à droite " ;
+ Text [ swedish ] = "Indrag höger " ;
+ Text [ dutch ] = "Rechts inspringen " ;
+ Text [ spanish ] = "Sangría a la derecha " ;
+ Text[ chinese_simplified ] = "ÓÒËõ½ø ";
+ Text[ russian ] = "Îòñòóï ñïðàâà ";
+ Text[ polish ] = "Wciêcie z prawej ";
+ Text[ japanese ] = "‰E²ÝÃÞÝÄ ";
+ Text[ chinese_traditional ] = "¥kÁY±Æ ";
+ Text[ arabic ] = "ÅÒÇÍÉ íãäì ";
+ Text[ greek ] = "Åóï÷Þ äåîéÜ ";
+ Text[ korean ] = "¿À¸¥ÂÊ µé¿© ¾²±â ";
+ Text[ turkish ] = "Sað girinti ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_SHADOW_COMPLETE
+{
+ Text = "Schatten: " ;
+ Text [ English ] = "Shadow: " ;
+ Text [ norwegian ] = "Skygge: " ;
+ Text [ italian ] = "Ombra: " ;
+ Text [ portuguese_brazilian ] = "Sombra: " ;
+ Text [ portuguese ] = "Sombras: " ;
+ Text [ english_us ] = "Shadow: " ;
+ Text [ finnish ] = "Shadow: " ;
+ Text [ danish ] = "Skygge: " ;
+ Text [ french ] = "Ombre : " ;
+ Text [ swedish ] = "Skugga: " ;
+ Text [ dutch ] = "Schaduw: " ;
+ Text [ spanish ] = "Sombra: " ;
+ Text[ chinese_simplified ] = "ÒõÓ°£º ";
+ Text[ russian ] = "Òåíü: ";
+ Text[ polish ] = "Cieñ: ";
+ Text[ japanese ] = "‰e: ";
+ Text[ chinese_traditional ] = "³±¼v¡G ";
+ Text[ arabic ] = "ÇáÙá: ";
+ Text[ greek ] = "ÓêéÜ: ";
+ Text[ korean ] = "À½¿µ: ";
+ Text[ turkish ] = "Gölge: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BORDER_COMPLETE
+{
+ Text = "Umrandung " ;
+ Text [ English ] = "Border " ;
+ Text [ norwegian ] = "Kantlinje: " ;
+ Text [ italian ] = "Bordo " ;
+ Text [ portuguese_brazilian ] = "Borda: " ;
+ Text [ portuguese ] = "Contornos " ;
+ Text [ english_us ] = "Borders " ;
+ Text [ finnish ] = "Border: " ;
+ Text [ danish ] = "Ramme: " ;
+ Text [ french ] = "Bordure : " ;
+ Text [ swedish ] = "Inramning: " ;
+ Text [ dutch ] = "Omranding: " ;
+ Text [ spanish ] = "Bordes " ;
+ Text[ chinese_simplified ] = "±ß¿ò ";
+ Text[ russian ] = "Îáðàìëåíèå ";
+ Text[ polish ] = "Obramowanie ";
+ Text[ japanese ] = "ŠO˜g: ";
+ Text[ chinese_traditional ] = "Ãä®Ø ";
+ Text[ arabic ] = "ÇáÍÏæÏ ";
+ Text[ greek ] = "Ðåñßãñáììá: ";
+ Text[ korean ] = "Å׵θ®: ";
+ Text[ turkish ] = "Kenarlýk ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BORDER_NONE
+{
+ Text = "Keine Umrandung";
+ Text [ English ] = "No border" ;
+ Text[ english_us ] = "No border";
+ Text[ portuguese ] = "Sem contornos";
+ Text[ russian ] = "Áåç îáðàìëåíèÿ";
+ Text[ greek ] = "×ùñßò ðåñßãñáììá";
+ Text[ dutch ] = "Geen omranding";
+ Text[ french ] = "Aucune bordure";
+ Text[ spanish ] = "Sin bordes";
+ Text[ italian ] = "Senza bordo";
+ Text[ danish ] = "Ingen ramme";
+ Text[ swedish ] = "Ingen inramning";
+ Text[ polish ] = "Bez obramowania";
+ Text[ portuguese_brazilian ] = "No border";
+ Text[ japanese ] = "ŠO˜g‚È‚µ";
+ Text[ korean ] = "Å׵θ® ¾øÀ½";
+ Text[ chinese_simplified ] = "Îޱ߿ò";
+ Text[ chinese_traditional ] = "¨S¦³Ãä®Ø";
+ Text[ arabic ] = "ÈÏæä ÍÏæÏ";
+ Text[ turkish ] = "Kenarlýk yok";
+};
+String RID_SVXITEMS_BORDER_TOP
+{
+ Text = "oben " ;
+ Text [ English ] = "top " ;
+ Text [ norwegian ] = "Topp " ;
+ Text [ italian ] = "In alto " ;
+ Text [ portuguese_brazilian ] = "Topo " ;
+ Text [ portuguese ] = "em cima " ;
+ Text [ english_us ] = "top " ;
+ Text [ finnish ] = "Top " ;
+ Text [ danish ] = "foroven " ;
+ Text [ french ] = "en haut " ;
+ Text [ swedish ] = "överst " ;
+ Text [ dutch ] = "boven " ;
+ Text [ spanish ] = "arriba " ;
+ Text[ chinese_simplified ] = "ÉÏ ";
+ Text[ russian ] = "ñâåðõó ";
+ Text[ polish ] = "W górze ";
+ Text[ japanese ] = "ã ";
+ Text[ chinese_traditional ] = "¤W ";
+ Text[ arabic ] = "ÃÚáì ";
+ Text[ greek ] = "ðÜíù ";
+ Text[ korean ] = "ˤ ";
+ Text[ turkish ] = "Üst ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BORDER_BOTTOM
+{
+ Text = "unten " ;
+ Text [ English ] = "bottom " ;
+ Text [ norwegian ] = "Bunn " ;
+ Text [ italian ] = "In basso " ;
+ Text [ portuguese_brazilian ] = "Base " ;
+ Text [ portuguese ] = "em baixo " ;
+ Text [ english_us ] = "bottom " ;
+ Text [ finnish ] = "Bottom " ;
+ Text [ danish ] = "forneden " ;
+ Text [ french ] = "en bas " ;
+ Text [ swedish ] = "nederst " ;
+ Text [ dutch ] = "beneden " ;
+ Text [ spanish ] = "abajo " ;
+ Text[ chinese_simplified ] = "ÏÂ ";
+ Text[ russian ] = "ñíèçó ";
+ Text[ polish ] = "W dole ";
+ Text[ japanese ] = "‰º ";
+ Text[ chinese_traditional ] = "¤U ";
+ Text[ arabic ] = "ÃÓÝá ";
+ Text[ greek ] = "êÜôù ";
+ Text[ korean ] = "¾Æ·¡ ";
+ Text[ turkish ] = "Alt ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BORDER_LEFT
+{
+ Text = "links " ;
+ Text [ English ] = "left " ;
+ Text [ norwegian ] = "Venstre" ;
+ Text [ italian ] = "Sinistra " ;
+ Text [ portuguese_brazilian ] = "A Esquerda " ;
+ Text [ portuguese ] = "esquerda " ;
+ Text [ english_us ] = "left " ;
+ Text [ finnish ] = "Left " ;
+ Text [ danish ] = "til venstre " ;
+ Text [ french ] = "à gauche " ;
+ Text [ swedish ] = "vänster " ;
+ Text [ dutch ] = "links " ;
+ Text [ spanish ] = "izquierda " ;
+ Text[ chinese_simplified ] = "×ó ";
+ Text[ russian ] = "ñëåâà ";
+ Text[ polish ] = "Z lewej ";
+ Text[ japanese ] = "¶ ";
+ Text[ chinese_traditional ] = "¥ª ";
+ Text[ arabic ] = "íÓÇÑ ";
+ Text[ greek ] = "áñéóôåñÜ ";
+ Text[ korean ] = "¿ÞÂÊ ";
+ Text[ turkish ] = "Sol ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BORDER_RIGHT
+{
+ Text = "rechts " ;
+ Text [ English ] = "right " ;
+ Text [ norwegian ] = "Høyre" ;
+ Text [ italian ] = "Destra " ;
+ Text [ portuguese_brazilian ] = "A Direita " ;
+ Text [ portuguese ] = "direita " ;
+ Text [ english_us ] = "right " ;
+ Text [ finnish ] = "Right " ;
+ Text [ danish ] = "til højre " ;
+ Text [ french ] = "à droite " ;
+ Text [ swedish ] = "höger " ;
+ Text [ dutch ] = "rechts " ;
+ Text [ spanish ] = "derecha " ;
+ Text[ chinese_simplified ] = "ÓÒ ";
+ Text[ russian ] = "ñïðàâà ";
+ Text[ polish ] = "Z prawej ";
+ Text[ japanese ] = "‰E ";
+ Text[ chinese_traditional ] = "¥k ";
+ Text[ arabic ] = "íãíä ";
+ Text[ greek ] = "äåîéÜ ";
+ Text[ korean ] = "¿À¸¥ÂÊ ";
+ Text[ turkish ] = "Sað ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BORDER_DISTANCE
+{
+ Text = "Abstand " ;
+ Text [ English ] = "Distance " ;
+ Text [ norwegian ] = "Avsnitt " ;
+ Text [ italian ] = "Distanza " ;
+ Text [ portuguese_brazilian ] = "Distância " ;
+ Text [ portuguese ] = "Espaçamento " ;
+ Text [ english_us ] = "Spacing " ;
+ Text [ finnish ] = "Distance " ;
+ Text [ danish ] = "Afstand " ;
+ Text [ french ] = "Écart " ;
+ Text [ swedish ] = "Avstånd " ;
+ Text [ dutch ] = "Afstand " ;
+ Text [ spanish ] = "Espacio " ;
+ Text[ chinese_simplified ] = "¼ä¸ô ";
+ Text[ russian ] = "Èíòåðâàë ";
+ Text[ polish ] = "Odstêp ";
+ Text[ japanese ] = "ŠÔŠu ";
+ Text[ chinese_traditional ] = "¶¡¹j ";
+ Text[ arabic ] = "ÊÈÇÚÏ ";
+ Text[ greek ] = "Áðüóôáóç ";
+ Text[ korean ] = "°£°Ý ";
+ Text[ turkish ] = "Aralýk ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ULSPACE_UPPER
+{
+ Text = "Von oben " ;
+ Text [ English ] = "To top " ;
+ Text [ norwegian ] = "Til topp" ;
+ Text [ italian ] = "Dall'alto " ;
+ Text [ portuguese_brazilian ] = "To top " ;
+ Text [ portuguese ] = "De cima " ;
+ Text [ english_us ] = "From top " ;
+ Text [ finnish ] = "To top " ;
+ Text [ danish ] = "Fra toppen " ;
+ Text [ french ] = "Du haut " ;
+ Text [ swedish ] = "Uppifrån " ;
+ Text [ dutch ] = "Van boven " ;
+ Text [ spanish ] = "Desde arriba " ;
+ Text[ chinese_simplified ] = "´ÓÉÏ ";
+ Text[ russian ] = "Ñâåðõó ";
+ Text[ polish ] = "Z góry ";
+ Text[ japanese ] = "ã‚©‚ç ";
+ Text[ chinese_traditional ] = "±q¤W ";
+ Text[ arabic ] = "ãä ÃÚáì ";
+ Text[ greek ] = "Áðü ðÜíù ";
+ Text[ korean ] = "À§ºÎÅÍ ";
+ Text[ turkish ] = "Yukarýdan ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ULSPACE_LOWER
+{
+ Text = "Von unten " ;
+ Text [ English ] = "To bottom " ;
+ Text [ norwegian ] = "Til bunn " ;
+ Text [ italian ] = "Dal basso " ;
+ Text [ portuguese_brazilian ] = "To bottom " ;
+ Text [ portuguese ] = "De baixo " ;
+ Text [ english_us ] = "From bottom " ;
+ Text [ finnish ] = "To bottom " ;
+ Text [ danish ] = "Fra bunden " ;
+ Text [ french ] = "Du bas " ;
+ Text [ swedish ] = "Nedifrån " ;
+ Text [ dutch ] = "Van beneden " ;
+ Text [ spanish ] = "Desde abajo " ;
+ Text[ chinese_simplified ] = "´ÓÏÂ ";
+ Text[ russian ] = "Ñíèçó ";
+ Text[ polish ] = "Z do³u ";
+ Text[ japanese ] = "‰º‚©‚ç ";
+ Text[ chinese_traditional ] = "±q¤U ";
+ Text[ arabic ] = "ãä ÃÓÝá ";
+ Text[ greek ] = "Áðü êÜôù ";
+ Text[ korean ] = "¾Æ·¡ºÎÅÍ ";
+ Text[ turkish ] = "Aþaðýdan ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_COMPLETE
+{
+ Text = "Seitenbeschreibung: " ;
+ Text [ English ] = "Pagedescription: " ;
+ Text [ norwegian ] = "Sidebeskrivelse: " ;
+ Text [ italian ] = "Descrizione pagina: " ;
+ Text [ portuguese_brazilian ] = "Pagedescription: " ;
+ Text [ portuguese ] = "Descrição de páginas: " ;
+ Text [ english_us ] = "Page Description: " ;
+ Text [ finnish ] = "Pagedescription: " ;
+ Text [ danish ] = "Sidebeskrivelse: " ;
+ Text [ french ] = "Description page : " ;
+ Text [ swedish ] = "Sidbeskrivning: " ;
+ Text [ dutch ] = "Paginabeschrijving: " ;
+ Text [ spanish ] = "Descripción de la página: " ;
+ Text[ chinese_simplified ] = "Ò³Ãæ˵Ã÷£º ";
+ Text[ russian ] = "Îïèñàíèå ñòðàíèöû: ";
+ Text[ polish ] = "Opis strony: ";
+ Text[ japanese ] = "Íß°¼Þ”Ô†•t‚¯: ";
+ Text[ chinese_traditional ] = "­¶­±»¡©ú¡G ";
+ Text[ arabic ] = "æÕÝ ÇáÕÝÍÉ: ";
+ Text[ greek ] = "ÐåñéãñáöÞ óåëßäáò: ";
+ Text[ korean ] = "ÆäÀÌÁö ¼³¸í: ";
+ Text[ turkish ] = "Sayfa açýklamasý: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_NUM_CHR_UPPER
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Großbuchstaben : Gro˜buchstaben */
+ Text = "Großbuchstaben" ;
+ Text [ English ] = "Capitals" ;
+ Text [ norwegian ] = "Store Bokstaver" ;
+ Text [ italian ] = "Maiuscole" ;
+ Text [ portuguese_brazilian ] = "Capitals" ;
+ Text [ portuguese ] = "Maiúsculas" ;
+ Text [ english_us ] = "Capitals" ;
+ Text [ finnish ] = "Capitals" ;
+ Text [ danish ] = "Store bogstaver" ;
+ Text [ french ] = "Majuscules" ;
+ Text [ swedish ] = "Stora bokstäver" ;
+ Text [ dutch ] = "Hoofdletters" ;
+ Text [ spanish ] = "Mayúsculas" ;
+ Text[ chinese_simplified ] = "´óд×Öĸ";
+ Text[ russian ] = "Ïðîïèñíûå áóêâû";
+ Text[ polish ] = "Du¿e litery";
+ Text[ japanese ] = "‘啶Žš";
+ Text[ chinese_traditional ] = "¤j¼g¦r¥À";
+ Text[ arabic ] = "ÃÍÑÝ ÇÓÊåáÇáíÉ";
+ Text[ greek ] = "Êåöáëáßá";
+ Text[ korean ] = "´ë¹®ÀÚ";
+ Text[ turkish ] = "Büyük harf";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_NUM_CHR_LOWER
+{
+ Text = "Kleinbuchstaben" ;
+ Text [ English ] = "Lower case" ;
+ Text [ norwegian ] = "Liten skrift" ;
+ Text [ italian ] = "Minuscole" ;
+ Text [ portuguese_brazilian ] = "Caixa baixa" ;
+ Text [ portuguese ] = "Minúsculas" ;
+ Text [ english_us ] = "Lower case" ;
+ Text [ finnish ] = "Pienin kirjaimin" ;
+ Text [ danish ] = "Små bogstaver" ;
+ Text [ french ] = "Minuscules" ;
+ Text [ swedish ] = "Små bokstäver" ;
+ Text [ dutch ] = "Kleine letters" ;
+ Text [ spanish ] = "Minúsculas" ;
+ Text[ chinese_simplified ] = "Сд×Öĸ";
+ Text[ russian ] = "Ñòðî÷íûå áóêâû";
+ Text[ polish ] = "Ma³e litery";
+ Text[ japanese ] = "¬•¶Žš";
+ Text[ chinese_traditional ] = "¤p¼g¦r¥À";
+ Text[ arabic ] = "ÃÍÑÝ ÕÛíÑÉ";
+ Text[ greek ] = "ÐåæÜ ãñÜììáôá";
+ Text[ korean ] = "¼Ò¹®ÀÚ";
+ Text[ turkish ] = "Küçük harf";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_NUM_ROM_UPPER
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Römisch groß : R÷misch gro˜ */
+ Text = "Römisch groß" ;
+ Text [ English ] = "Capital roman" ;
+ Text [ norwegian ] = "Stor bokstav roman" ;
+ Text [ italian ] = "Maiuscolo roman" ;
+ Text [ portuguese_brazilian ] = "Capital roman" ;
+ Text [ portuguese ] = "Maiúsculas romanas" ;
+ Text [ english_us ] = "Capital Roman" ;
+ Text [ finnish ] = "Capital roman" ;
+ Text [ danish ] = "Romersk store" ;
+ Text [ french ] = "Capitales romaines" ;
+ Text [ swedish ] = "Romerska versaler" ;
+ Text [ dutch ] = "Romeinse cijfers hoofdletters" ;
+ Text [ spanish ] = "Mayúsculas romanas" ;
+ Text[ chinese_simplified ] = "´óдÂÞÂíÊý";
+ Text[ russian ] = "Ðèìñêîå áîëüøîå";
+ Text[ polish ] = "Du¿e litery rzymskie";
+ Text[ japanese ] = "Û°Ï”Žš(‘å)";
+ Text[ chinese_traditional ] = "¤j¼gù°¨¼Æ";
+ Text[ arabic ] = "ÃÍÑÝ ÇÓÊåáÇáíÉ ÑæãÇäíÉ";
+ Text[ greek ] = "Roman êåöáëáßá";
+ Text[ korean ] = "·Î¸¶ ´ë¹®ÀÚ";
+ Text[ turkish ] = "Büyük Romen rakamlarý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_NUM_ROM_LOWER
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Römisch klein : R÷misch klein */
+ Text = "Römisch klein" ;
+ Text [ English ] = "Lower case roman" ;
+ Text [ norwegian ] = "Små bokstaver roman" ;
+ Text [ italian ] = "Minuscolo roman" ;
+ Text [ portuguese_brazilian ] = "Lower case roman" ;
+ Text [ portuguese ] = "Minúsculas romanas" ;
+ Text [ english_us ] = "Lower case Roman" ;
+ Text [ finnish ] = "Lower case roman" ;
+ Text [ danish ] = "Romersk små" ;
+ Text [ french ] = "Minuscules romaines" ;
+ Text [ swedish ] = "Romerska små" ;
+ Text [ dutch ] = "Romeinse cijfers klein" ;
+ Text [ spanish ] = "Minúsculas romanas" ;
+ Text[ chinese_simplified ] = "СдÂÞÂíÊý";
+ Text[ russian ] = "Ðèìñêîå ìàëåíüêîå";
+ Text[ polish ] = "Ma³e litery rzymskie";
+ Text[ japanese ] = "Û°Ï”Žš(¬)";
+ Text[ chinese_traditional ] = "¤p¼gù°¨¼Æ";
+ Text[ arabic ] = "ÑæãÇäí ÕÛíÑ";
+ Text[ greek ] = "ÐåæÜ Roman";
+ Text[ korean ] = "·Î¸¶ ¼Ò¹®ÀÚ";
+ Text[ turkish ] = "Küçük Romen rakamlarý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_NUM_ARABIC
+{
+ Text = "Arabisch" ;
+ Text [ English ] = "Arabic" ;
+ Text [ norwegian ] = "Arabisk" ;
+ Text [ italian ] = "Arabo" ;
+ Text [ portuguese_brazilian ] = "Arábico" ;
+ Text [ portuguese ] = "Árabe" ;
+ Text [ english_us ] = "Arabic" ;
+ Text [ finnish ] = "Arabia" ;
+ Text [ danish ] = "Arabisk" ;
+ Text [ french ] = "Arabe" ;
+ Text [ swedish ] = "Arabiska" ;
+ Text [ dutch ] = "Arabisch" ;
+ Text [ spanish ] = "Árabe" ;
+ Text[ chinese_simplified ] = "°¢À­²®Êý×Ö";
+ Text[ russian ] = "Àðàáñêèé";
+ Text[ polish ] = "Arabski";
+ Text[ japanese ] = "±×ËÞ±”Žš";
+ Text[ chinese_traditional ] = "ªü©Ô§B¼Æ¦r";
+ Text[ arabic ] = "ÚÑÈí";
+ Text[ greek ] = "ÁñáâéêÜ";
+ Text[ korean ] = "¾Æ¶óºñ¾È";
+ Text[ turkish ] = "Arap rakamlarý";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_NUM_NONE
+{
+ Text = "Ohne" ;
+ Text [ English ] = "None" ;
+ Text [ norwegian ] = "Ingen" ;
+ Text [ italian ] = "Senza" ;
+ Text [ portuguese_brazilian ] = "Nenhum" ;
+ Text [ portuguese ] = "Sem" ;
+ Text [ english_us ] = "None" ;
+ Text [ finnish ] = "Ei ole" ;
+ Text [ danish ] = "Uden" ;
+ Text [ french ] = "Aucun(e)" ;
+ Text [ swedish ] = "Utan" ;
+ Text [ dutch ] = "Zonder" ;
+ Text [ spanish ] = "Ninguno" ;
+ Text[ chinese_simplified ] = "ÎÞ";
+ Text[ russian ] = "Áåç";
+ Text[ polish ] = "Brak";
+ Text[ japanese ] = "‚È‚µ";
+ Text[ chinese_traditional ] = "µL";
+ Text[ arabic ] = "ÈÏæä";
+ Text[ greek ] = "×ùñßò";
+ Text[ korean ] = "¾øÀ½";
+ Text[ turkish ] = "Yok";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_LAND_TRUE
+{
+ Text = "Quer" ;
+ Text [ English ] = "Landscape" ;
+ Text [ norwegian ] = "Landskap" ;
+ Text [ italian ] = "Orizzontale" ;
+ Text [ portuguese_brazilian ] = "Landscape" ;
+ Text [ portuguese ] = "Horizontal" ;
+ Text [ english_us ] = "Landscape" ;
+ Text [ finnish ] = "Landscape" ;
+ Text [ danish ] = "Liggende" ;
+ Text [ french ] = "Paysage" ;
+ Text [ swedish ] = "Liggande" ;
+ Text [ dutch ] = "Liggend" ;
+ Text [ spanish ] = "Horizontal" ;
+ Text[ chinese_simplified ] = "ºáÏò";
+ Text[ russian ] = "Àëüáîìíûé";
+ Text[ polish ] = "Poziomo";
+ Text[ japanese ] = "‰¡‘‚«";
+ Text[ chinese_traditional ] = "¾î¦V";
+ Text[ arabic ] = "ÈÇáÚÑÖ";
+ Text[ greek ] = "Ïñéæüíôéá";
+ Text[ korean ] = "°¡·Î ¹æÇâ";
+ Text[ turkish ] = "Yatay";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_LAND_FALSE
+{
+ Text = "Hoch" ;
+ Text [ English ] = "Portrait" ;
+ Text [ norwegian ] = "Portrett" ;
+ Text [ italian ] = "Verticale" ;
+ Text [ portuguese_brazilian ] = "Portrait" ;
+ Text [ portuguese ] = "Vertical" ;
+ Text [ english_us ] = "Portrait" ;
+ Text [ finnish ] = "Portrait" ;
+ Text [ danish ] = "Stående" ;
+ Text [ french ] = "Portrait" ;
+ Text [ swedish ] = "Stående" ;
+ Text [ dutch ] = "Staand" ;
+ Text [ spanish ] = "Vertical" ;
+ Text[ chinese_simplified ] = "×ÝÏò";
+ Text[ russian ] = "Êíèæíûé";
+ Text[ polish ] = "Pionowo";
+ Text[ japanese ] = "c‘‚«";
+ Text[ chinese_traditional ] = "Áa¦V";
+ Text[ arabic ] = "ÈÇáØæá";
+ Text[ greek ] = "Êáôáêüñõöá";
+ Text[ korean ] = "¼¼·Î ¹æÇâ";
+ Text[ turkish ] = "Dikey";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_USAGE_LEFT
+{
+ Text = "Links" ;
+ Text [ English ] = "Left" ;
+ Text [ norwegian ] = "Left" ;
+ Text [ italian ] = "Sinistra" ;
+ Text [ portuguese_brazilian ] = "A Esquerda" ;
+ Text [ portuguese ] = "Esquerda" ;
+ Text [ english_us ] = "Left" ;
+ Text [ finnish ] = "Vasen" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ french ] = "Page de gauche" ;
+ Text [ swedish ] = "Vänster" ;
+ Text [ dutch ] = "Links" ;
+ Text [ spanish ] = "Izquierda" ;
+ Text[ chinese_simplified ] = "Ïò×ó";
+ Text[ russian ] = "Ñëåâà";
+ Text[ polish ] = "Z lewej";
+ Text[ japanese ] = "¶";
+ Text[ chinese_traditional ] = "¦V¥ª";
+ Text[ arabic ] = "íÓÇÑ";
+ Text[ greek ] = "ÁñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ";
+ Text[ turkish ] = "Sol";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_USAGE_RIGHT
+{
+ Text = "Rechts" ;
+ Text [ English ] = "Right" ;
+ Text [ norwegian ] = "Right" ;
+ Text [ italian ] = "Destra" ;
+ Text [ portuguese_brazilian ] = "A Direita" ;
+ Text [ portuguese ] = "Direita" ;
+ Text [ english_us ] = "Right" ;
+ Text [ finnish ] = "Oikea" ;
+ Text [ danish ] = "Højre" ;
+ Text [ french ] = "Page de droite" ;
+ Text [ swedish ] = "Höger" ;
+ Text [ dutch ] = "Rechts" ;
+ Text [ spanish ] = "Derecha" ;
+ Text[ chinese_simplified ] = "ÏòÓÒ";
+ Text[ russian ] = "Ñïðàâà";
+ Text[ polish ] = "Z prawej";
+ Text[ japanese ] = "‰E";
+ Text[ chinese_traditional ] = "¦V¥k";
+ Text[ arabic ] = "íãíä";
+ Text[ greek ] = "ÄåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ";
+ Text[ turkish ] = "Sað";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_USAGE_ALL
+{
+ Text = "Alle" ;
+ Text [ English ] = "All" ;
+ Text [ norwegian ] = "All" ;
+ Text [ italian ] = "Tutto" ;
+ Text [ portuguese_brazilian ] = "Tudo" ;
+ Text [ portuguese ] = "Tudo" ;
+ Text [ english_us ] = "All" ;
+ Text [ finnish ] = "Kaikki" ;
+ Text [ danish ] = "Alle" ;
+ Text [ french ] = "Toutes les pages" ;
+ Text [ swedish ] = "Alla" ;
+ Text [ dutch ] = "Alle" ;
+ Text [ spanish ] = "Todo" ;
+ Text[ chinese_simplified ] = "È«²¿";
+ Text[ russian ] = "Âñå";
+ Text[ polish ] = "Wszystkie";
+ Text[ japanese ] = "‚·‚ׂÄ";
+ Text[ chinese_traditional ] = "¥þ³¡";
+ Text[ arabic ] = "Çáßá";
+ Text[ greek ] = "¼ëá";
+ Text[ korean ] = "¸ðµÎ";
+ Text[ turkish ] = "Tümü";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGE_USAGE_MIRROR
+{
+ Text = "Gespiegelt" ;
+ Text [ English ] = "Mirrored" ;
+ Text [ norwegian ] = "Speilet" ;
+ Text [ italian ] = "Rispecchiato" ;
+ Text [ portuguese_brazilian ] = "Espelhado" ;
+ Text [ portuguese ] = "Invertido" ;
+ Text [ english_us ] = "Mirrored" ;
+ Text [ finnish ] = "Peilikuva" ;
+ Text [ danish ] = "Spejlvendt" ;
+ Text [ french ] = "Pages en vis-à-vis" ;
+ Text [ swedish ] = "Speglad" ;
+ Text [ dutch ] = "Gespiegeld" ;
+ Text [ spanish ] = "Reflejado" ;
+ Text[ chinese_simplified ] = "·´Ó³µÄ";
+ Text[ russian ] = "Îòðàæåíèå";
+ Text[ polish ] = "Odbity";
+ Text[ japanese ] = "¶‰E‘ÎÌ";
+ Text[ chinese_traditional ] = "¤Ï¬Mªº";
+ Text[ arabic ] = "ãäÚßÓ";
+ Text[ greek ] = "Ìå êáôüðôñéóç";
+ Text[ korean ] = "´ëĪ";
+ Text[ turkish ] = "Yansýma";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_LINES
+{
+ Text = " Zeilen" ;
+ Text [ English ] = " Lines" ;
+ Text [ norwegian ] = " Lines" ;
+ Text [ italian ] = "righe" ;
+ Text [ portuguese_brazilian ] = "Lines" ;
+ Text [ portuguese ] = "Linhas" ;
+ Text [ english_us ] = "Lines" ;
+ Text [ finnish ] = " Viivat" ;
+ Text [ danish ] = "Rækker" ;
+ Text [ french ] = "Lignes" ;
+ Text [ swedish ] = "Rader" ;
+ Text [ dutch ] = "regels" ;
+ Text [ spanish ] = "Líneas" ;
+ Text[ chinese_simplified ] = "ÐÐ";
+ Text[ russian ] = "Ñòðîêè";
+ Text[ polish ] = "Wiersze";
+ Text[ japanese ] = "s";
+ Text[ chinese_traditional ] = "¦æ";
+ Text[ arabic ] = "ÃÓØÑ";
+ Text[ greek ] = "ÃñáììÝò";
+ Text[ korean ] = "ÁÙ";
+ Text[ turkish ] = "Satýr";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_WIDOWS_COMPLETE
+{
+ Text = "Schusterjungenregelung " ;
+ Text [ English ] = "Widows " ;
+ Text [ norwegian ] = "Enkelinjer øverst " ;
+ Text [ italian ] = "Vedove " ;
+ Text [ portuguese_brazilian ] = "Widows " ;
+ Text [ portuguese ] = "Linhas isoladas " ;
+ Text [ english_us ] = "Orphan control " ;
+ Text [ finnish ] = "Widows " ;
+ Text [ danish ] = "Fransk horeunge-ordning " ;
+ Text [ french ] = "Traitement des orphelines" ;
+ Text [ swedish ] = "Änkekontroll " ;
+ Text [ dutch ] = "Zwevende regels: Orphans " ;
+ Text [ spanish ] = "Huérfanas " ;
+ Text[ chinese_simplified ] = "¶ÎÖв»·ÖÒ³ ";
+ Text[ russian ] = "Óïðàâëåíèå êîíöåâûìè âèñÿ÷èìè ñòðîêàìè ";
+ Text[ polish ] = "Bez oddz. pierw. wiersza akap. ";
+ Text[ japanese ] = "‰üÍß°¼ÞŽž‚ÉŽc‚·s” ";
+ Text[ chinese_traditional ] = "¬q¤¤¤£¤À­¶ ";
+ Text[ arabic ] = "ÊÚÏíá ÇäÝÕÇá ÓØÑ ÇáÝÞÑÉ ÇáÃæá ";
+ Text[ greek ] = "Êáíüíáò ïñöáíïý ";
+ Text[ korean ] = "óÀ½ ÇÑÁÙ ºÐ¸® ¹æÁö ";
+ Text[ turkish ] = "Ýlk satýrý paragrafla birleþtir ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_ORPHANS_COMPLETE
+{
+ Text = "Hurenkinderregelung " ;
+ Text [ English ] = "Orphans " ;
+ Text [ norwegian ] = "Enkelinjer nederst " ;
+ Text [ italian ] = "Orfane " ;
+ Text [ portuguese_brazilian ] = "Órfãos " ;
+ Text [ portuguese ] = "Controlar orfãos " ;
+ Text [ english_us ] = "Widow control " ;
+ Text [ finnish ] = "Orphans " ;
+ Text [ danish ] = "Horeunge-ordning " ;
+ Text [ french ] = "Traitement des veuves " ;
+ Text [ swedish ] = "Horungekontroll " ;
+ Text [ dutch ] = "Zwevende regels: Widows " ;
+ Text [ spanish ] = "Viudas " ;
+ Text[ chinese_simplified ] = "ÓëÏ߶Ëͬҳ ";
+ Text[ russian ] = "Óïðàâëåíèå íà÷àëüíûìè âèñÿ÷èìè ñòðîêàìè ";
+ Text[ polish ] = "Bez oddz. ost. wiersza akap. ";
+ Text[ japanese ] = "’i—Ž‘O‚ʼnüÍß°¼Þ ";
+ Text[ chinese_traditional ] = "»P½uºÝ¦P­¶ ";
+ Text[ arabic ] = "ÊÚÏíá ÇäÝÕÇá ÓØÑ ÇáÝÞÑÉ ÇáÃÎíÑ ";
+ Text[ greek ] = "Êáíüíáò \"÷Þñáò\" ";
+ Text[ korean ] = "¸¶Áö¸· ÇÑÁÙ ºÐ¸® ¹æÁö ";
+ Text[ turkish ] = "Son satýrý paragrafla birleþtir ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_HYPHEN_MINLEAD
+{
+ Text = " Zeichen am Zeilenende" ;
+ Text [ English ] = " chars" ;
+ Text [ norwegian ] = " tegn" ;
+ Text [ italian ] = "caratteri alla fine della riga" ;
+ Text [ portuguese_brazilian ] = "caracteres" ;
+ Text [ portuguese ] = "Caracteres no fim da linha" ;
+ Text [ english_us ] = "Characters at end of line" ;
+ Text [ finnish ] = " chars" ;
+ Text [ danish ] = "Tegn ved rækkens slutning" ;
+ Text [ french ] = "Caractères en fin de ligne" ;
+ Text [ swedish ] = "Tecken vid radslut" ;
+ Text [ dutch ] = "tekens aan einde van de regel" ;
+ Text [ spanish ] = "Caracteres al final de la línea" ;
+ Text[ chinese_simplified ] = "×Ö·ûÔÚÐÐÄ©";
+ Text[ russian ] = "çíàêà â êîíöå ñòðîêè";
+ Text[ polish ] = "Znak koñca wiersza";
+ Text[ japanese ] = "s––‚Ì‹L†";
+ Text[ chinese_traditional ] = "¦r¤¸¦b¦æ¥½";
+ Text[ arabic ] = "ÃÍÑÝ ÚäÏ äåÇíÉ ÇáÓØÑ";
+ Text[ greek ] = "×áñáêôÞñåò óôï ôÝëïò ôçò ãñáììÞò";
+ Text[ korean ] = "ÁÙ³¡ ¹®ÀÚ";
+ Text[ turkish ] = "Satýr sonunda karakterler";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_HYPHEN_MINTRAIL
+{
+ Text = " Zeichen am Zeilenanfang" ;
+ Text [ English ] = " chars" ;
+ Text [ norwegian ] = " tegn" ;
+ Text [ italian ] = "caratteri all'inizio della riga" ;
+ Text [ portuguese_brazilian ] = "caracteres" ;
+ Text [ portuguese ] = "Caracteres no início da linha" ;
+ Text [ english_us ] = "Characters at beginning of line" ;
+ Text [ finnish ] = " chars" ;
+ Text [ danish ] = "Tegn rækkens begyndelse" ;
+ Text [ french ] = "Caractères en début de ligne" ;
+ Text [ swedish ] = "Tecken vid radens början" ;
+ Text [ dutch ] = "tekens aan begin van de regel" ;
+ Text [ spanish ] = "caracteres al comienzo de la línea" ;
+ Text[ chinese_simplified ] = "×Ö·ûÔÚÐÐÊ×";
+ Text[ russian ] = "çíàêà â íà÷àëå ñòðîêè";
+ Text[ polish ] = "Znak pocz¹tku wiersza";
+ Text[ japanese ] = "s“ª‚Ì‹L†";
+ Text[ chinese_traditional ] = "¦r¤¸¦b¦æ­º";
+ Text[ arabic ] = "ÃÍÑÝ ÚäÏ ÈÏÇíÉ ÇáÓØÑ";
+ Text[ greek ] = "×áñáêôÞñåò óôçí áñ÷Þ ôçò ãñáììÞò";
+ Text[ korean ] = "Á٠óÀ½ ¹®ÀÚ";
+ Text[ turkish ] = "Satýr baþýnda karakterler";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_HYPHEN_MAX
+{
+ Text = " Trennstellen" ;
+ Text [ English ] = " Hyphens" ;
+ Text [ norwegian ] = " Bindestreker" ;
+ Text [ italian ] = "sillabazioni" ;
+ Text [ portuguese_brazilian ] = "Hyphens" ;
+ Text [ portuguese ] = "Hífens" ;
+ Text [ english_us ] = "Hyphens" ;
+ Text [ finnish ] = " Hyphens" ;
+ Text [ danish ] = "Orddelinger" ;
+ Text [ french ] = "Césure" ;
+ Text [ swedish ] = "Avstavningsställe" ;
+ Text [ dutch ] = "Koppeltekens" ;
+ Text [ spanish ] = "guiones" ;
+ Text[ chinese_simplified ] = "·Ö¸ôµã";
+ Text[ russian ] = "Ðàçäåëèòåëÿ";
+ Text[ polish ] = "Miejsca podzia³u";
+ Text[ japanese ] = "ʲÌ݈ʒu";
+ Text[ chinese_traditional ] = "¤À¹jÂI";
+ Text[ arabic ] = "ãäÇØÞ ÝÕá";
+ Text[ greek ] = "ÈÝóåéò äéá÷ùñéóìïý";
+ Text[ korean ] = "ÇÏÀÌÇ ÀÚ¸®";
+ Text[ turkish ] = "Ayýrma yerleri";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PAGEMODEL_COMPLETE
+{
+ Text = "Seitenvorlage: " ;
+ Text [ English ] = "Pagestylesheet: " ;
+ Text [ norwegian ] = "Sidestilark: " ;
+ Text [ italian ] = "Modello di pagina: " ;
+ Text [ portuguese_brazilian ] = "Pagestylesheet: " ;
+ Text [ portuguese ] = "Estilo de página: " ;
+ Text [ english_us ] = "Page Style: " ;
+ Text [ finnish ] = "Pagestylesheet: " ;
+ Text [ danish ] = "Sidetypografi: " ;
+ Text [ french ] = "Style de page : " ;
+ Text [ swedish ] = "Sidformatmall: " ;
+ Text [ dutch ] = "Pagina-opmaakprofiel: " ;
+ Text [ spanish ] = "Estilo de página: " ;
+ Text[ chinese_simplified ] = "Ò³ÃæÑùʽ£º ";
+ Text[ russian ] = "Ñòèëü ñòðàíèöû: ";
+ Text[ polish ] = "Styl strony: ";
+ Text[ japanese ] = "Íß°¼Þ½À²Ù: ";
+ Text[ chinese_traditional ] = "­¶­±¼Ë¦¡¡G ";
+ Text[ arabic ] = "ÞÇáÈ ÇáÕÝÍÉ: ";
+ Text[ greek ] = "Ðñüôõðï óåëßäáò: ";
+ Text[ korean ] = "ÆäÀÌÁö À¯Çü: ";
+ Text[ turkish ] = "Sayfa biçimi: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_KERNING_COMPLETE
+{
+ Text = "Kerning " ;
+ Text [ English ] = "Kerning " ;
+ Text [ norwegian ] = "Bokstavsperring" ;
+ Text [ italian ] = "Crenatura " ;
+ Text [ portuguese_brazilian ] = "Kerning " ;
+ Text [ portuguese ] = "Kerning " ;
+ Text [ english_us ] = "Kerning " ;
+ Text [ finnish ] = "Kerning " ;
+ Text [ danish ] = "Knibning " ;
+ Text [ french ] = "Crénage " ;
+ Text [ swedish ] = "Kerning " ;
+ Text [ dutch ] = "Kerning " ;
+ Text [ spanish ] = "Ajuste entre caracteres " ;
+ Text[ chinese_simplified ] = "×Öĸ¼ä¸ôÏàµÈ ";
+ Text[ russian ] = "Êåðíèíã ";
+ Text[ polish ] = "Kerning ";
+ Text[ japanese ] = "¶°ÆÝ¸Þ ";
+ Text[ chinese_traditional ] = "¦r¥À¶¡¹j¬Ûµ¥ ";
+ Text[ arabic ] = "ÊÞäíä ÇáÃÍÑÝ ";
+ Text[ greek ] = "ÄéáãñáììÜôùóç ";
+ Text[ korean ] = "Ä¿´× ";
+ Text[ turkish ] = "Aralýk azaltma ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_KERNING_EXPANDED
+{
+ Text = "gesperrt " ;
+ Text [ English ] = "expanded " ;
+ Text [ norwegian ] = "utvidet" ;
+ Text [ italian ] = "espansa " ;
+ Text [ portuguese_brazilian ] = "expanded " ;
+ Text [ portuguese ] = "Expandido " ;
+ Text [ english_us ] = "Expanded " ;
+ Text [ finnish ] = "expanded " ;
+ Text [ danish ] = "bred " ;
+ Text [ french ] = "étendu " ;
+ Text [ swedish ] = "spärrad " ;
+ Text [ dutch ] = "verbreed " ;
+ Text [ spanish ] = "bloqueado " ;
+ Text[ chinese_simplified ] = "Ëø¶¨ ";
+ Text[ russian ] = "ðàçðåæåííûé ";
+ Text[ polish ] = "Rozszerzony ";
+ Text[ japanese ] = "ŽšŠÔ‚ð‚ ‚¯‚é ";
+ Text[ chinese_traditional ] = "Âê©w ";
+ Text[ arabic ] = "ãæÓÚ";
+ Text[ greek ] = "åêôåôáìÝíá ";
+ Text[ korean ] = "Æó¼âµÊ ";
+ Text[ turkish ] = "Geniþ ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_KERNING_CONDENSED
+{
+ Text = "schmal " ;
+ Text [ English ] = "condensed " ;
+ Text [ norwegian ] = "fortettet " ;
+ Text [ italian ] = "Ridotta " ;
+ Text [ portuguese_brazilian ] = "condensed " ;
+ Text [ portuguese ] = "Condensado " ;
+ Text [ english_us ] = "Condensed " ;
+ Text [ finnish ] = "condensed " ;
+ Text [ danish ] = "smal " ;
+ Text [ french ] = "Condensé " ;
+ Text [ swedish ] = "smal " ;
+ Text [ dutch ] = "versmald " ;
+ Text [ spanish ] = "condensada " ;
+ Text[ chinese_simplified ] = "ÊÝÐÎ ";
+ Text[ russian ] = "óïëîòíåííûé ";
+ Text[ polish ] = "W¹ski ";
+ Text[ japanese ] = "ŽšŠÔ‚ð‹l‚ß‚é ";
+ Text[ chinese_traditional ] = "½G§Î ";
+ Text[ arabic ] = "ãßËÝ ";
+ Text[ greek ] = "óõìðçêíùìÝíá ";
+ Text[ korean ] = "Á¼°Ô ";
+ Text[ turkish ] = "Dar ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_AUTHOR_COMPLETE
+{
+ Text = "Autor: " ;
+ Text [ English ] = "Author: " ;
+ Text [ norwegian ] = "Forfatter: " ;
+ Text [ italian ] = "Autore: " ;
+ Text [ portuguese_brazilian ] = "Autor: " ;
+ Text [ portuguese ] = "Autor: " ;
+ Text [ english_us ] = "Author: " ;
+ Text [ finnish ] = "Author: " ;
+ Text [ danish ] = "Forfatter: " ;
+ Text [ french ] = "Auteur : " ;
+ Text [ swedish ] = "Författare: " ;
+ Text [ dutch ] = "Auteur: " ;
+ Text [ spanish ] = "Autor: " ;
+ Text[ chinese_simplified ] = "×÷Õߣº ";
+ Text[ russian ] = "Àâòîð: ";
+ Text[ polish ] = "Autor: ";
+ Text[ japanese ] = "ìŽÒ: ";
+ Text[ chinese_traditional ] = "§@ªÌ¡G ";
+ Text[ arabic ] = "ÇáãÄáÝ: ";
+ Text[ greek ] = "ÓõíôÜêôçò: ";
+ Text[ korean ] = "ÀÛ¼ºÀÎ: ";
+ Text[ turkish ] = "Yazan: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_DATE_COMPLETE
+{
+ Text = "Datum: " ;
+ Text [ English ] = "Date: " ;
+ Text [ norwegian ] = "Dato: " ;
+ Text [ italian ] = "Data: " ;
+ Text [ portuguese_brazilian ] = "Data: " ;
+ Text [ portuguese ] = "Data: " ;
+ Text [ english_us ] = "Date: " ;
+ Text [ finnish ] = "Date: " ;
+ Text [ danish ] = "Dato: " ;
+ Text [ french ] = "Date : " ;
+ Text [ swedish ] = "Datum: " ;
+ Text [ dutch ] = "Datum: " ;
+ Text [ spanish ] = "Fecha: " ;
+ Text[ chinese_simplified ] = "ÈÕÆÚ£º ";
+ Text[ russian ] = "Äàòà: ";
+ Text[ polish ] = "Data: ";
+ Text[ japanese ] = "“ú•t: ";
+ Text[ chinese_traditional ] = "¤é´Á¡G ";
+ Text[ arabic ] = "ÇáÊÇÑíÎ: ";
+ Text[ greek ] = "Çìåñïìçíßá: ";
+ Text[ korean ] = "³¯Â¥: ";
+ Text[ turkish ] = "Tarih: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_TEXT_COMPLETE
+{
+ Text = "Text: " ;
+ Text [ English ] = "Text: " ;
+ Text [ norwegian ] = "Tekst: " ;
+ Text [ italian ] = "Testo: " ;
+ Text [ portuguese_brazilian ] = "Texto: " ;
+ Text [ portuguese ] = "Texto: " ;
+ Text [ english_us ] = "Text: " ;
+ Text [ finnish ] = "Text: " ;
+ Text [ danish ] = "Tekst: " ;
+ Text [ french ] = "Texte : " ;
+ Text [ swedish ] = "Text: " ;
+ Text [ dutch ] = "Tekst: " ;
+ Text [ spanish ] = "Texto: " ;
+ Text[ chinese_simplified ] = "ÎÄ×Ö£º ";
+ Text[ russian ] = "Òåêñò: ";
+ Text[ polish ] = "Tekst: ";
+ Text[ japanese ] = "÷½Ä: ";
+ Text[ chinese_traditional ] = "¤å¦r¡G ";
+ Text[ arabic ] = "ÇáäÕ: ";
+ Text[ greek ] = "Êåßìåíï: ";
+ Text[ korean ] = "ÅؽºÆ®: ";
+ Text[ turkish ] = "Metin: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_BACKGROUND_COLOR
+{
+ Text = "Hintergrundfarbe: " ;
+ Text [ English ] = "Backgroundcolor: " ;
+ Text [ dutch ] = "Achtergrondkleur: " ;
+ Text [ english_us ] = "Background color: " ;
+ Text [ italian ] = "Colore di sfondo: " ;
+ Text [ spanish ] = "Color de fondo: " ;
+ Text [ french ] = "Couleur d'arrière-plan : " ;
+ Text [ swedish ] = "Bakgrundsfärg: " ;
+ Text [ danish ] = "Baggrundsfarve: " ;
+ Text [ portuguese ] = "Cor do plano de fundo: " ;
+ Text [ portuguese_brazilian ] = "Hintergrundfarbe: " ;
+ Text[ chinese_simplified ] = "±³¾°ÑÕÉ«£º ";
+ Text[ russian ] = "Öâåò ôîíà: ";
+ Text[ polish ] = "Kolor t³a: ";
+ Text[ japanese ] = "”wŒiF: ";
+ Text[ chinese_traditional ] = "­I´ºÃC¦â¡G ";
+ Text[ arabic ] = "áæä ÇáÎáÝíÉ: ";
+ Text[ greek ] = "×ñþìá öüíôïõ: ";
+ Text[ korean ] = "¹è°æ»ö: ";
+ Text[ turkish ] = "Artalan rengi: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_PATTERN_COLOR
+{
+ Text = "Musterfarbe: " ;
+ Text [ English ] = "Patterncolor: " ;
+ Text [ english_us ] = "Pattern color: " ;
+ Text [ italian ] = "Colore motivo: " ;
+ Text [ spanish ] = "Color del modelo: " ;
+ Text [ french ] = "Couleur de motif : " ;
+ Text [ dutch ] = "Patroonkleur: " ;
+ Text [ swedish ] = "Mönsterfärg: " ;
+ Text [ danish ] = "Mønsterfarve: " ;
+ Text [ portuguese ] = "Cor modelo: " ;
+ Text [ portuguese_brazilian ] = "Musterfarbe: " ;
+ Text[ chinese_simplified ] = "ͼ°¸Ñùʽ£º ";
+ Text[ russian ] = "Öâåò îáðàçöà: ";
+ Text[ polish ] = "Kolor wzorca: ";
+ Text[ japanese ] = "ÊßÀ°Ý‚ÌF: ";
+ Text[ chinese_traditional ] = "¹Ï®×¼Ë¦¡¡G ";
+ Text[ arabic ] = "áæä ÇáäÞÔ: ";
+ Text[ greek ] = "×ñþìá ìïôßâïõ: ";
+ Text[ korean ] = "¹«´Ì »ö: ";
+ Text[ turkish ] = "Desen rengi: ";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXITEMS_GRAPHIC
+{
+ Text = "Grafik" ;
+ Text [ English ] = "Image" ;
+ Text [ English_US ] = "Graphic" ;
+ Text [ dutch ] = "Afbeelding" ;
+ Text [ italian ] = "Grafico" ;
+ Text [ spanish ] = "Imagen" ;
+ Text [ french ] = "Image" ;
+ 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[ greek ] = "Ãñáöéêü";
+ Text[ korean ] = "±×·¡ÇÈ";
+ Text[ turkish ] = "Grafik";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_SVXITEMS_BRUSH_CHAR
+{
+ Text = "Zeichenhintergrund" ;
+ Text [ English ] = "Character background" ;
+ Text[ italian ] = "Sfondo caratteri";
+ Text[ portuguese_brazilian ] = "Character background";
+ Text[ portuguese ] = "Fundo de caracteres";
+ Text[ danish ] = "Tegnbaggrund";
+ Text[ french ] = "Trame de fond";
+ Text[ swedish ] = "Teckenbakgrund";
+ Text[ dutch ] = "Tekenachtergrond";
+ Text[ spanish ] = "Fondo de carácter";
+ Text[ english_us ] = "Character background";
+ Text[ chinese_simplified ] = "×Ö·û±³¾°";
+ Text[ russian ] = "Ôîí çíàêîâ";
+ Text[ polish ] = "T³o znaku";
+ Text[ japanese ] = "•¶Žš‚Ì”wŒi";
+ Text[ chinese_traditional ] = "¦r¤¸­I´º";
+ Text[ arabic ] = "ÎáÝíÉ ÇáÎØ";
+ Text[ greek ] = "Öüíôï ÷áñáêôÞñùí";
+ Text[ korean ] = "¹®ÀÚ ¹è°æ";
+ Text[ turkish ] = "Karakter artalaný";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/items/textitem.cxx b/svx/source/items/textitem.cxx
new file mode 100644
index 0000000000..032e536941
--- /dev/null
+++ b/svx/source/items/textitem.cxx
@@ -0,0 +1,3668 @@
+/*************************************************************************
+ *
+ * $RCSfile: textitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _COM_SUN_STAR_STYLE_CASEMAP_HPP_
+#include <com/sun/star/style/CaseMap.hpp>
+#endif
+
+#ifndef _SV_BITMAPEX_HXX
+#include <vcl/bitmapex.hxx>
+#endif
+#ifndef _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+#include <toolkit/unohlp.hxx>
+
+#pragma hdrstop
+
+#define ITEMID_FONTLIST 0
+#define ITEMID_FONT 0
+#define ITEMID_POSTURE 0
+#define ITEMID_WEIGHT 0
+#define ITEMID_FONTHEIGHT 0
+#define ITEMID_UNDERLINE 0
+#define ITEMID_CROSSEDOUT 0
+#define ITEMID_SHADOWED 0
+#define ITEMID_AUTOKERN 0
+#define ITEMID_WORDLINEMODE 0
+#define ITEMID_CONTOUR 0
+#define ITEMID_PROPSIZE 0
+#define ITEMID_COLOR 0
+#define ITEMID_CHARSETCOLOR 0
+#define ITEMID_KERNING 0
+#define ITEMID_CASEMAP 0
+#define ITEMID_ESCAPEMENT 0
+#define ITEMID_LANGUAGE 0
+#define ITEMID_NOLINEBREAK 0
+#define ITEMID_NOHYPHENHERE 0
+#define ITEMID_BLINK 0
+
+#include <svtools/sbx.hxx>
+#define GLOBALOVERFLOW3
+
+
+#include <svtools/memberid.hrc>
+#include "svxids.hrc"
+#include "svxitems.hrc"
+
+#ifndef NOOLDSV //autogen
+#include <vcl/system.hxx>
+#endif
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+// xml stuff
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include <xmloff/xmlkywd.hxx>
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include <xmloff/xmluconv.hxx>
+#endif
+#include <rtl/ustring>
+#include <rtl/ustrbuf.hxx>
+#ifndef _ISOLANG_HXX
+#include <tools/isolang.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_CASEMAP_HPP_
+#include <com/sun/star/style/CaseMap.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_SIMPLEFONTMETRIC_HPP_
+#include <com/sun/star/awt/SimpleFontMetric.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTWEIGHT_HPP_
+#include <com/sun/star/awt/FontWeight.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTSLANT_HPP_
+#include <com/sun/star/awt/FontSlant.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_CHARSET_HPP_
+#include <com/sun/star/awt/CharSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
+#include <com/sun/star/awt/FontDescriptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTWIDTH_HPP_
+#include <com/sun/star/awt/FontWidth.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XFONT_HPP_
+#include <com/sun/star/awt/XFont.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTTYPE_HPP_
+#include <com/sun/star/awt/FontType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTUNDERLINE_HPP_
+#include <com/sun/star/awt/FontUnderline.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTSTRIKEOUT_HPP_
+#include <com/sun/star/awt/FontStrikeout.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTFAMILY_HPP_
+#include <com/sun/star/awt/FontFamily.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTPITCH_HPP_
+#include <com/sun/star/awt/FontPitch.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
+#include <com/sun/star/lang/Locale.hpp>
+#endif
+
+#ifndef _SVX_UNOMID_HXX
+#include <unomid.hxx>
+#endif
+
+
+#include "flstitem.hxx"
+#include "fontitem.hxx"
+#include "postitem.hxx"
+#include "wghtitem.hxx"
+#include "fhgtitem.hxx"
+#include "fwdtitem.hxx"
+#include "udlnitem.hxx"
+#include "crsditem.hxx"
+#include "shdditem.hxx"
+#include "akrnitem.hxx"
+#include "wrlmitem.hxx"
+#include "cntritem.hxx"
+#include "prszitem.hxx"
+#include "colritem.hxx"
+#include "cscoitem.hxx"
+#include "kernitem.hxx"
+#include "cmapitem.hxx"
+#include "escpitem.hxx"
+#include "langitem.hxx"
+#include "nlbkitem.hxx"
+#include "nhypitem.hxx"
+#include "lcolitem.hxx"
+#include "blnkitem.hxx"
+#include "itemtype.hxx"
+#include "dialmgr.hxx"
+#include "langtab.hxx"
+#include "dlgutil.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// Konvertierung fuer UNO
+#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
+#define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
+
+// STATIC DATA -----------------------------------------------------------
+
+// -----------------------------------------------------------------------
+
+TYPEINIT1(SvxFontListItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxFontItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxPostureItem, SfxEnumItem);
+TYPEINIT1_AUTOFACTORY(SvxWeightItem, SfxEnumItem);
+TYPEINIT1_AUTOFACTORY(SvxFontHeightItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxFontWidthItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxUnderlineItem, SfxEnumItem);
+TYPEINIT1_AUTOFACTORY(SvxCrossedOutItem, SfxEnumItem);
+TYPEINIT1_AUTOFACTORY(SvxShadowedItem, SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SvxAutoKernItem, SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SvxWordLineModeItem, SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SvxContourItem, SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SvxPropSizeItem, SfxUInt16Item);
+TYPEINIT1_AUTOFACTORY(SvxColorItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxCharSetColorItem, SvxColorItem);
+TYPEINIT1_AUTOFACTORY(SvxKerningItem, SfxInt16Item);
+TYPEINIT1_AUTOFACTORY(SvxCaseMapItem, SfxEnumItem);
+TYPEINIT1_AUTOFACTORY(SvxEscapementItem, SfxPoolItem);
+TYPEINIT1_AUTOFACTORY(SvxLanguageItem, SfxEnumItem);
+TYPEINIT1_AUTOFACTORY(SvxNoLinebreakItem, SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SvxNoHyphenItem, SfxBoolItem);
+TYPEINIT1_AUTOFACTORY(SvxLineColorItem, SvxColorItem);
+TYPEINIT1_AUTOFACTORY(SvxBlinkItem, SfxBoolItem);
+
+// class SvxFontListItem -------------------------------------------------
+
+SvxFontListItem::SvxFontListItem( const FontList* pFontLst,
+ const USHORT nId ) :
+ SfxPoolItem( nId ),
+ pFontList( pFontLst )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxFontListItem::SvxFontListItem( const SvxFontListItem& rItem ) :
+
+ SfxPoolItem( rItem ),
+ pFontList( rItem.GetFontList() )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFontListItem::Clone( SfxItemPool* ) const
+{
+ return new SvxFontListItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+int SvxFontListItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return( pFontList == ((SvxFontListItem&)rAttr).pFontList );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxFontListItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// class SvxFontItem -----------------------------------------------------
+
+SvxFontItem::SvxFontItem( const USHORT nId ) :
+ SfxPoolItem( nId )
+{
+ eFamily = FAMILY_SWISS;
+ ePitch = PITCH_VARIABLE;
+ eTextEncoding = RTL_TEXTENCODING_DONTKNOW;
+}
+
+// -----------------------------------------------------------------------
+
+SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName,
+ const XubString& aStName, const FontPitch eFontPitch,
+ const rtl_TextEncoding eFontTextEncoding, const USHORT nId ) :
+
+ SfxPoolItem( nId ),
+
+ aFamilyName(aName),
+ aStyleName(aStName)
+{
+ eFamily = eFam;
+ ePitch = eFontPitch;
+ eTextEncoding = eFontTextEncoding;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch(nMemberId)
+ {
+ case MID_FONT_FAMILY_NAME :
+ rVal <<= OUString(aFamilyName.GetBuffer());
+ break;
+ case MID_FONT_STYLE_NAME:
+ rVal <<= OUString(aStyleName.GetBuffer());
+ break;
+ case MID_FONT_FAMILY : rVal <<= (sal_Int16)(eFamily); break;
+ case MID_FONT_CHAR_SET : rVal <<= (sal_Int16)(eTextEncoding); break;
+ case MID_FONT_PITCH : rVal <<= (sal_Int16)(ePitch); break;
+ }
+ return sal_True;
+}
+// -----------------------------------------------------------------------
+sal_Bool SvxFontItem::PutValue( const uno::Any& rVal, BYTE nMemberId)
+{
+ switch(nMemberId)
+ {
+ case MID_FONT_FAMILY_NAME :
+ {
+ OUString aStr;
+ if(!(rVal >>= aStr))
+ return sal_False;
+ aFamilyName = aStr.getStr();
+ }
+ break;
+ case MID_FONT_STYLE_NAME:
+ {
+ OUString aStr;
+ if(!(rVal >>= aStr))
+ return sal_False;
+ aStyleName = aStr.getStr();
+ }
+ break;
+ case MID_FONT_FAMILY :
+ {
+ sal_Int16 nFamily;
+ if(!(rVal >>= nFamily))
+ return sal_False;
+ eFamily = (FontFamily)nFamily;
+ }
+ break;
+ case MID_FONT_CHAR_SET :
+ {
+ sal_Int16 nSet;
+ if(!(rVal >>= nSet))
+ return sal_False;
+ eTextEncoding = (rtl_TextEncoding)nSet;
+ }
+ break;
+ case MID_FONT_PITCH :
+ {
+ sal_Int16 nPitch;
+ if(!(rVal >>= nPitch))
+ return sal_False;
+ ePitch = (FontPitch)nPitch;
+ }
+ break;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+
+void xml_in_font_family_impl( SvxFontItem& rItem, const OUString& rValue )
+{
+ String sValue;
+
+ sal_Int32 nPos = 0;
+ do
+ {
+ sal_Int32 nFirst = nPos;
+ nPos = SvXMLUnitConverter::indexOfComma( rValue, nPos );
+ sal_Int32 nLast = (-1 == nPos ? rValue.getLength() : nPos);
+ if( nLast > 0 )
+ nLast--;
+
+ // skip trailing blanks
+ while( sal_Unicode(' ') == rValue[nLast] && nLast > nFirst )
+ nLast--;
+
+ // skip leading blanks
+ while( sal_Unicode(' ') == rValue[nFirst] && nFirst <= nLast )
+ nFirst++;
+
+ // remove quotes
+ sal_Unicode c = rValue[nFirst];
+ if( nFirst < nLast && (sal_Unicode('\'') == c || sal_Unicode('\"') == c) && rValue[nLast] == c )
+ {
+ nFirst++;
+ nLast--;
+ }
+
+ if( nFirst <= nLast )
+ {
+ if( sValue.Len() != 0 )
+ sValue += sal_Unicode(';');
+
+ OUString sTemp = rValue.copy( nFirst, nLast-nFirst+1 );
+ sValue += sTemp.getStr();
+ }
+
+ if( -1 != nPos )
+ nPos++;
+ }
+ while( -1 != nPos );
+
+ if( sValue.Len() )
+ rItem.GetFamilyName() = sValue;
+}
+
+static SvXMLEnumMapEntry __READONLY_DATA aFontFamilyGenericMap[] =
+{
+ { sXML_decorative, FAMILY_DECORATIVE },
+
+ { sXML_modern, FAMILY_MODERN },
+ { sXML_roman, FAMILY_ROMAN },
+ { sXML_script, FAMILY_SCRIPT },
+ { sXML_swiss, FAMILY_SWISS },
+ { sXML_system, FAMILY_SYSTEM },
+ { 0, 0 }
+};
+
+static SvXMLEnumMapEntry __READONLY_DATA aFontPitchMap[] =
+{
+ { sXML_fixed, PITCH_FIXED },
+
+ { sXML_variable, PITCH_VARIABLE },
+ { 0, 0 }
+};
+#endif
+
+sal_Bool SvxFontItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ switch( nMemberId )
+ {
+ case MID_FONT_FAMILY_NAME:
+ xml_in_font_family_impl( *this, rValue );
+ break;
+ case MID_FONT_STYLE_NAME:
+ aStyleName = rValue.getStr();
+ break;
+ case MID_FONT_FAMILY:
+ {
+ sal_uInt16 eNewFamily;
+ if( !rUnitConverter.convertEnum( eNewFamily, rValue, aFontFamilyGenericMap ) )
+ return sal_False;
+ eFamily = (FontFamily)eNewFamily;
+ }
+ break;
+ case MID_FONT_CHAR_SET:
+ if( rValue.compareToAscii(sXML_x_symbol ) )
+ eTextEncoding = RTL_TEXTENCODING_SYMBOL;
+ break;
+ case MID_FONT_PITCH:
+ {
+ USHORT eNewPitch;
+ if( !rUnitConverter.convertEnum( eNewPitch, rValue, aFontPitchMap ) )
+ return sal_False;
+ ePitch = (FontPitch)eNewPitch;
+ }
+ break;
+ }
+
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+void xml_out_font_family_impl( const SvxFontItem& rFont, OUString& rValue )
+{
+ OUString sFamilies( rFont.GetFamilyName().GetBuffer() );
+
+ OUStringBuffer sValue( sFamilies.getLength() + 2L );
+ sal_Int32 nPos = 0L;
+ do
+ {
+ sal_Int32 nFirst = nPos;
+ nPos = sFamilies.indexOf( sal_Unicode(';'), nPos );
+ sal_Int32 nLast = (-1L == nPos ? sFamilies.getLength() : nPos);
+ if( nLast > 0L )
+ nLast--;
+
+ // skip trailing blanks
+ while( sal_Unicode(' ') == sFamilies[nLast] && nLast > nFirst )
+ nLast--;
+
+ // skip leading blanks
+ while( sal_Unicode(' ') == sFamilies[nFirst] && nFirst <= nLast )
+ nFirst++;
+
+ if( nFirst <= nLast )
+ {
+ if( sValue.getLength() != 0L )
+ {
+ sValue.append( sal_Unicode( ',' ) );
+ sValue.append( sal_Unicode( ' ' ));
+ }
+ sal_Int32 nLen = nLast-nFirst+1L;
+ OUString sFamily( sFamilies.copy( nFirst, nLen ) );
+ sal_Bool bQuote = sal_False;
+ for( sal_Int32 i=0; i < nLen; i++ )
+ {
+ sal_Unicode c = sFamily[i];
+ if( sal_Unicode(' ') == c || sal_Unicode(',') == c )
+ {
+ bQuote = sal_True;
+ break;
+ }
+ }
+ if( bQuote )
+ sValue.append( sal_Unicode('\'') );
+ sValue.append( sFamily );
+ if( bQuote )
+ sValue.append( sal_Unicode('\'') );
+ }
+
+ if( -1L != nPos )
+ nPos++;
+ }
+ while( -1L != nPos );
+
+ rValue = sValue.makeStringAndClear();
+}
+#endif
+
+sal_Bool SvxFontItem::exportXML( OUString& rValue, USHORT nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bOk = sal_False;
+#ifndef SVX_LIGHT
+
+ OUStringBuffer aOut;
+
+ switch( nMemberId )
+ {
+ case MID_FONT_FAMILY_NAME:
+ xml_out_font_family_impl( *this, rValue );
+ return sal_True;
+
+ case MID_FONT_STYLE_NAME:
+ if( aStyleName.Len() != 0 )
+ {
+ OUString sTmp( aStyleName.GetBuffer() );
+ aOut.append( sTmp );
+ bOk = sal_True;
+ }
+ break;
+
+ case MID_FONT_FAMILY:
+ if( eFamily != FAMILY_DONTKNOW )
+ bOk = rUnitConverter.convertEnum( aOut, eFamily, aFontFamilyGenericMap );
+ break;
+
+ case MID_FONT_CHAR_SET:
+ // MIB 30.9.99: As long as we don't support unicode at the core, we
+ // must know if a font is a symbol font. This is not required to
+ // convert characters, but to set the right encoding within the
+ // font attributes.
+
+ // see:
+ // ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets
+ // http://msdn.microsoft.com/workshop/author/dhtml/reference/charsets/charset4.asp
+ // Mozilla (libi18n/csnametb.c)
+ if( eTextEncoding == RTL_TEXTENCODING_SYMBOL )
+ {
+ aOut.appendAscii( sXML_x_symbol );
+ bOk = sal_True;
+ }
+ break;
+
+ case MID_FONT_PITCH:
+ if( PITCH_DONTKNOW != ePitch )
+ bOk = rUnitConverter.convertEnum( aOut, ePitch, aFontPitchMap, sXML_fixed );
+ break;
+ }
+
+ rValue = aOut.makeStringAndClear();
+
+#endif
+ return bOk;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxFontItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ const SvxFontItem& rItem = (const SvxFontItem&)rAttr;
+
+ int bRet = ( eFamily == rItem.eFamily &&
+ aFamilyName == rItem.aFamilyName &&
+ aStyleName == rItem.aStyleName );
+
+ if ( bRet )
+ {
+ if ( ePitch != rItem.ePitch || eTextEncoding != rItem.eTextEncoding )
+ {
+ bRet = sal_False;
+ DBG_WARNING( "FontItem::operator==(): nur Pitch oder rtl_TextEncoding unterschiedlich" );
+ }
+ }
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFontItem::Clone( SfxItemPool * ) const
+{
+ return new SvxFontItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxFontItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (BYTE) GetFamily()
+ << (BYTE) GetPitch()
+ << (BYTE) GetStoreCharSet( GetCharSet(), rStrm.GetVersion() );
+
+ // UNICODE: rStrm << GetFamilyName();
+ rStrm.WriteByteString(GetFamilyName());
+
+ // UNICODE: rStrm << GetStyleName();
+ rStrm.WriteByteString(GetStyleName());
+
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE eFamily, eFontPitch, eFontTextEncoding;
+ String aName, aStyle;
+ rStrm >> eFamily;
+ rStrm >> eFontPitch;
+ rStrm >> eFontTextEncoding;
+
+ // UNICODE: rStrm >> aName;
+ rStrm.ReadByteString(aName);
+
+ // UNICODE: rStrm >> aStyle;
+ rStrm.ReadByteString(aStyle);
+
+ // irgendwann wandelte sich der StarBats vom ANSI- zum SYMBOL-Font
+ if ( RTL_TEXTENCODING_SYMBOL != eFontTextEncoding && aName.EqualsAscii("StarBats") )
+ eFontTextEncoding = RTL_TEXTENCODING_SYMBOL;
+
+ return new SvxFontItem( (FontFamily)eFamily, aName, aStyle,
+ (FontPitch)eFontPitch, (rtl_TextEncoding)eFontTextEncoding,
+ Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxFontItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = aFamilyName;
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// class SvxPostureItem --------------------------------------------------
+
+SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const USHORT nId ) :
+ SfxEnumItem( nId, ePosture )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxPostureItem::Clone( SfxItemPool * ) const
+{
+ return new SvxPostureItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxPostureItem::GetValueCount() const
+{
+ return ITALIC_NORMAL + 1; // auch ITALIC_NONE geh"ort dazu
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxPostureItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (BYTE)GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nPosture;
+ rStrm >> nPosture;
+ return new SvxPostureItem( (const FontItalic)nPosture, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxPostureItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetValueTextByPos( GetValue() );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxPostureItem::GetValueTextByPos( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos <= (USHORT)ITALIC_NORMAL, "enum overflow!" );
+
+ XubString sTxt;
+ FontItalic eItalic = (FontItalic)nPos;
+ USHORT nId = 0;
+
+ switch ( eItalic )
+ {
+ case ITALIC_NONE: nId = RID_SVXITEMS_ITALIC_NONE; break;
+ case ITALIC_OBLIQUE: nId = RID_SVXITEMS_ITALIC_OBLIQUE; break;
+ case ITALIC_NORMAL: nId = RID_SVXITEMS_ITALIC_NORMAL; break;
+ }
+
+ if ( nId )
+ sTxt = SVX_RESSTR( nId );
+ return sTxt;
+}
+
+
+/*-----------------13.03.98 14:28-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch( nMemberId )
+ {
+ case MID_ITALIC:
+ rVal = Bool2Any(GetBoolValue());
+ break;
+ case MID_POSTURE:
+ rVal <<= (awt::FontSlant)GetValue(); // Werte von awt::FontSlant und FontItalic sind gleich
+ break;
+ }
+ return sal_True;
+}
+/*-----------------13.03.98 14:28-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ switch( nMemberId )
+ {
+ case MID_ITALIC:
+ SetBoolValue(Any2Bool(rVal));
+ break;
+ case MID_POSTURE:
+ {
+ awt::FontSlant eSlant;
+ if(!(rVal >>= eSlant))
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ eSlant = (awt::FontSlant)nValue;
+ }
+ SetValue((sal_Int32)eSlant);
+ }
+ }
+ return sal_True;
+}
+
+#ifndef SVX_LIGHT
+static SvXMLEnumMapEntry __READONLY_DATA aPostureGenericMap[] =
+{
+ { sXML_posture_normal, ITALIC_NONE },
+ { sXML_posture_italic, ITALIC_NORMAL },
+ { sXML_posture_oblique, ITALIC_OBLIQUE },
+ { 0, 0 }
+};
+#endif
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxPostureItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_uInt16 ePosture;
+ if( rUnitConverter.convertEnum( ePosture, rValue, aPostureGenericMap ) )
+ {
+ SetValue( ePosture );
+ return sal_True;
+ }
+
+#endif
+ return sal_False;
+}
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxPostureItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+ if( rUnitConverter.convertEnum( aOut, GetValue(), aPostureGenericMap ) )
+ {
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+ }
+
+#endif
+ return sal_False;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxPostureItem::HasBoolValue() const
+{
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxPostureItem::GetBoolValue() const
+{
+ return ( (FontItalic)GetValue() >= ITALIC_OBLIQUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxPostureItem::SetBoolValue( sal_Bool bVal )
+{
+ SetValue( bVal ? ITALIC_NORMAL : ITALIC_NONE );
+}
+
+// class SvxWeightItem ---------------------------------------------------
+
+SvxWeightItem::SvxWeightItem( const FontWeight eWght, const USHORT nId ) :
+ SfxEnumItem( nId, eWght )
+{
+}
+
+
+
+// -----------------------------------------------------------------------
+
+int SvxWeightItem::HasBoolValue() const
+{
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxWeightItem::GetBoolValue() const
+{
+ return (FontWeight)GetValue() >= WEIGHT_BOLD;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxWeightItem::SetBoolValue( sal_Bool bVal )
+{
+ SetValue( bVal ? WEIGHT_BOLD : WEIGHT_NORMAL );
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxWeightItem::GetValueCount() const
+{
+ return WEIGHT_BLACK; // WEIGHT_DONTKNOW geh"ort nicht dazu
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxWeightItem::Clone( SfxItemPool * ) const
+{
+ return new SvxWeightItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxWeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (BYTE)GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nWeight;
+ rStrm >> nWeight;
+ return new SvxWeightItem( (FontWeight)nWeight, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxWeightItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetValueTextByPos( GetValue() );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxWeightItem::GetValueTextByPos( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos <= (USHORT)WEIGHT_BLACK, "enum overflow!" );
+ return SVX_RESSTR( RID_SVXITEMS_WEIGHT_BEGIN + nPos );
+}
+
+/*-----------------13.03.98 14:18-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch( nMemberId )
+ {
+ case MID_BOLD :
+ rVal = Bool2Any(GetBoolValue());
+ break;
+ case MID_WEIGHT:
+ {
+ rVal <<= (float)( VCLUnoHelper::ConvertFontWeight( (FontWeight)GetValue() ) );
+ }
+ break;
+ }
+ return sal_True;
+}
+/*-----------------13.03.98 14:18-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ switch( nMemberId )
+ {
+ case MID_BOLD :
+ SetBoolValue(Any2Bool(rVal));
+ break;
+ case MID_WEIGHT:
+ {
+ float fValue;
+ if(!(rVal >>= fValue))
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ fValue = (float)nValue;
+ }
+ SetValue( VCLUnoHelper::ConvertFontWeight(fValue) );
+ }
+ break;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+// TODO:.is this apropriate?
+#ifndef SVX_LIGHT
+
+static struct
+{
+ FontWeight eWeight;
+ USHORT nValue;
+}
+aFontWeightMap[] =
+{
+ { WEIGHT_DONTKNOW, 0 },
+ { WEIGHT_THIN, 100 },
+ { WEIGHT_ULTRALIGHT, 150 },
+ { WEIGHT_LIGHT, 250 },
+ { WEIGHT_SEMILIGHT, 350 },
+ { WEIGHT_NORMAL, 400 },
+ { WEIGHT_MEDIUM, 450 },
+ { WEIGHT_SEMIBOLD, 600 },
+ { WEIGHT_BOLD, 700 },
+ { WEIGHT_ULTRABOLD, 800 },
+ { WEIGHT_BLACK, 900 },
+ { (FontWeight)USHRT_MAX, 1000 }
+};
+#endif
+
+sal_Bool SvxWeightItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_uInt16 nWeight = 0;
+
+ if( rValue.compareToAscii( sXML_weight_normal ) )
+ {
+ nWeight = 400;
+ }
+ else if( rValue.compareToAscii( sXML_weight_bold ) )
+ {
+ nWeight = 700;
+ }
+ else
+ {
+ sal_Int32 nTemp;
+ if( !rUnitConverter.convertNumber( nTemp, rValue, 100, 900 ) )
+ return sal_False;
+ nWeight = nTemp;
+ }
+
+ for( int i = 0; aFontWeightMap[i].eWeight != USHRT_MAX; i++ )
+ {
+ if( (nWeight >= aFontWeightMap[i].nValue) && (nWeight <= aFontWeightMap[i+1].nValue) )
+ {
+ sal_uInt16 nDiff1 = aFontWeightMap[i].nValue - nWeight;
+ sal_uInt16 nDiff2 = nWeight - aFontWeightMap[i+1].nValue;
+
+ if( nDiff1 < nDiff2 )
+ SetValue( aFontWeightMap[i].eWeight );
+ else
+ SetValue( aFontWeightMap[i+1].eWeight );
+
+ return sal_True;
+ }
+ }
+
+ SetValue( WEIGHT_DONTKNOW );
+#endif
+ return sal_False;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxWeightItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ sal_uInt16 nWeight = 0;
+
+ for( int i = 0; aFontWeightMap[i].eWeight != -1; i++ )
+ {
+ if( aFontWeightMap[i].eWeight == GetValue() )
+ {
+ nWeight = aFontWeightMap[i].nValue;
+ break;
+ }
+ }
+
+ OUStringBuffer aOut;
+
+ if( 400 == nWeight )
+ aOut.appendAscii( sXML_weight_normal );
+ else if( 700 == nWeight )
+ aOut.appendAscii( sXML_weight_bold );
+ else
+ rUnitConverter.convertNumber( aOut, (sal_Int32) nWeight );
+
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// class SvxFontHeightItem -----------------------------------------------
+
+SvxFontHeightItem::SvxFontHeightItem( const ULONG nSz,
+ const USHORT nPrp,
+ const USHORT nId ) :
+ SfxPoolItem( nId )
+{
+ SetHeight( nSz,nPrp ); // mit den Prozenten rechnen
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFontHeightItem::Clone( SfxItemPool * ) const
+{
+ return new SvxFontHeightItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxFontHeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (USHORT)GetHeight();
+
+ if( FONTHEIGHT_UNIT_VERSION <= nItemVersion )
+ rStrm << GetProp() << (USHORT)GetPropUnit();
+ else
+ {
+ // JP 30.06.98: beim Export in alte Versionen geht die relative
+ // Angabe verloren, wenn es keine Prozentuale ist
+ USHORT nProp = GetProp();
+ if( SFX_MAPUNIT_RELATIVE != GetPropUnit() )
+ nProp = 100;
+ rStrm << nProp;
+ }
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm,
+ USHORT nVersion ) const
+{
+ USHORT nsize, nprop = 0, nPropUnit = SFX_MAPUNIT_RELATIVE;
+
+ rStrm >> nsize;
+
+ if( FONTHEIGHT_16_VERSION <= nVersion )
+ rStrm >> nprop;
+ else
+ {
+ BYTE nP;
+ rStrm >> nP;
+ nprop = (USHORT)nP;
+ }
+
+ if( FONTHEIGHT_UNIT_VERSION <= nVersion )
+ rStrm >> nPropUnit;
+
+ SvxFontHeightItem* pItem = new SvxFontHeightItem( nsize, 100, Which() );
+ pItem->SetProp( nprop, (SfxMapUnit)nPropUnit );
+ return pItem;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxFontHeightItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+ return GetHeight() == ((SvxFontHeightItem&)rItem).GetHeight() &&
+ GetProp() == ((SvxFontHeightItem&)rItem).GetProp() &&
+ GetPropUnit() == ((SvxFontHeightItem&)rItem).GetPropUnit();
+}
+
+/*-----------------13.03.98 14:53-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ // In StarOne sind im uno::Any immer 1/100mm. Ueber die MemberId wird
+ // gesteuert, ob der Wert im Item 1/100mm oder Twips sind.
+
+ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+ nMemberId &= ~CONVERT_TWIPS;
+ switch( nMemberId )
+ {
+ case MID_FONTHEIGHT:
+ {
+ // Point (also Twips) sind gefragt,
+ // also umrechnen, wenn CONVERT_TWIPS nicht gesetzt ist
+ long nTwips = bConvert ? nHeight : MM100_TO_TWIP(nHeight);
+ rVal <<= (float)( nTwips / 20.0 );
+ }
+ break;
+ case MID_FONTHEIGHT_PROP:
+ rVal <<= (sal_Int16)(SFX_MAPUNIT_RELATIVE == ePropUnit ? nProp : 100);
+ break;
+ case MID_FONTHEIGHT_DIFF:
+ {
+ float fRet = (float)nProp;
+ switch( ePropUnit )
+ {
+ case SFX_MAPUNIT_RELATIVE:
+ fRet = 0.;
+ break;
+ case SFX_MAPUNIT_100TH_MM:
+ fRet = MM100_TO_TWIP(fRet);
+ fRet /= 20.;
+ break;
+ case SFX_MAPUNIT_POINT:
+
+ break;
+ case SFX_MAPUNIT_TWIP:
+ fRet /= 20.;
+ break;
+ }
+ rVal <<= fRet;
+ }
+ break;
+ }
+ return sal_True;
+}
+/* -----------------01.07.98 13:43-------------------
+ * Relative Abweichung aus der Hoehe herausrechnen
+ * --------------------------------------------------*/
+sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, SfxMapUnit eProp, sal_Bool bCoreInTwip)
+{
+ sal_uInt32 nRet = nHeight;
+ short nDiff = 0;
+ switch( eProp )
+ {
+ case SFX_MAPUNIT_RELATIVE:
+ nRet *= 100;
+ nRet /= nProp;
+ break;
+ case SFX_MAPUNIT_POINT:
+ {
+ short nTemp = (short)nDiff;
+ nDiff = nTemp * 20;
+ if(!bCoreInTwip)
+ nDiff = (short)TWIP_TO_MM100((long)(nDiff));
+ }
+ break;
+ case SFX_MAPUNIT_100TH_MM:
+ //dann ist die Core doch wohl auch in 1/100 mm
+ nDiff = (short)nProp;
+ break;
+ case SFX_MAPUNIT_TWIP:
+ // hier doch sicher TWIP
+ nDiff = ((short)nProp);
+ break;
+ }
+ nRet -= nDiff;
+
+ return nRet;
+}
+
+/*-----------------13.03.98 14:53-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxFontHeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+ nMemberId &= ~CONVERT_TWIPS;
+ switch( nMemberId )
+ {
+ case MID_FONTHEIGHT:
+ {
+ ePropUnit = SFX_MAPUNIT_RELATIVE;
+ nProp = 100;
+ float fPoint;
+ if(!(rVal >>= fPoint))
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ fPoint = (float)nValue;
+ }
+
+ nHeight = (long)( fPoint * 20.0 + 0.5 ); // Twips
+ if (!bConvert)
+ nHeight = TWIP_TO_MM100(nHeight); // umrechnen, wenn das Item 1/100mm enthaelt
+ }
+ break;
+ case MID_FONTHEIGHT_PROP:
+ {
+ sal_Int16 nNew;
+ if(!(rVal >>= nNew))
+ return sal_True;
+
+ nHeight = lcl_GetRealHeight_Impl(nHeight, nProp, ePropUnit, bConvert);
+
+ nHeight *= nNew;
+ nHeight /= 100;
+ nProp = nNew;
+ ePropUnit = SFX_MAPUNIT_RELATIVE;
+ }
+ break;
+ case MID_FONTHEIGHT_DIFF:
+ {
+ nHeight = lcl_GetRealHeight_Impl(nHeight, nProp, ePropUnit, bConvert);
+ float fValue;
+ if(!(rVal >>= fValue))
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ fValue = (float)nValue;
+ }
+ sal_uInt16 nCoreDiffValue = (sal_uInt16)(fValue * 20.);
+ nHeight += bConvert ? nCoreDiffValue : TWIP_TO_MM100(nCoreDiffValue);
+ nProp = (sal_uInt16)fValue;
+ ePropUnit = SFX_MAPUNIT_POINT;
+ }
+ break;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxFontHeightItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+ sal_Bool bOk = sal_False;
+#ifndef SVX_LIGHT
+
+ sal_Int32 nPrc = 100;
+ sal_Int32 nAbs = 0;
+
+ if( rValue.indexOf( sal_Unicode('%') ) != -1 )
+ bOk = rUnitConverter.convertPercent( nPrc, rValue );
+ else
+ bOk = rUnitConverter.convertMeasure( nAbs, rValue );
+
+ if( bOk )
+ SetHeight( (sal_uInt32)nAbs, (sal_uInt16)nPrc );
+
+#endif
+ return bOk;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxFontHeightItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+
+ if( GetProp() != 100 )
+ rUnitConverter.convertPercent( aOut, GetProp() );
+ else
+ SvXMLUnitConverter::convertMeasure( aOut, GetHeight(),
+ rUnitConverter.getCoreMeasureUnit(),
+ MAP_POINT );
+
+ rValue = aOut.makeStringAndClear();
+
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxFontHeightItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ if( SFX_MAPUNIT_RELATIVE != ePropUnit )
+ {
+ ( rText = String::CreateFromInt32( (short)nProp ) ) +=
+ SVX_RESSTR( GetMetricId( ePropUnit ) );
+ if( 0 <= (short)nProp )
+ rText.Insert( sal_Unicode('+'), 0 );
+ }
+ else if( 100 == nProp )
+ {
+ rText = GetMetricText( (long)nHeight,
+ eCoreUnit, SFX_MAPUNIT_POINT );
+ rText += SVX_RESSTR(GetMetricId(SFX_MAPUNIT_POINT));
+ }
+ else
+ ( rText = String::CreateFromInt32( nProp )) += sal_Unicode('%');
+ return ePres;
+ }
+ }
+#endif
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxFontHeightItem::GetVersion(USHORT nFileVersion) const
+{
+ return (nFileVersion <= SOFFICE_FILEFORMAT_40)
+ ? FONTHEIGHT_16_VERSION
+ : FONTHEIGHT_UNIT_VERSION;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxFontHeightItem::ScaleMetrics( long nMult, long nDiv )
+{
+ nHeight = (sal_uInt32)Scale( nHeight, nMult, nDiv );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxFontHeightItem::HasMetrics() const
+{
+ return 1;
+}
+
+void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const USHORT nNewProp,
+ SfxMapUnit eUnit )
+{
+ DBG_ASSERT( GetRef() == 0, "SetValue() with pooled item" );
+
+#ifndef SVX_LIGHT
+ if( SFX_MAPUNIT_RELATIVE != eUnit )
+ nHeight = nNewHeight + ::ItemToControl( (short)nNewProp, eUnit,
+ SFX_FUNIT_TWIP );
+ else
+#endif // !SVX_LIGHT
+ if( 100 != nNewProp )
+ nHeight = sal_uInt32(( nNewHeight * nNewProp ) / 100 );
+ else
+ nHeight = nNewHeight;
+
+ nProp = nNewProp;
+ ePropUnit = eUnit;
+}
+
+void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, USHORT nNewProp,
+ SfxMapUnit eMetric, SfxMapUnit eCoreMetric )
+{
+ DBG_ASSERT( GetRef() == 0, "SetValue() with pooled item" );
+
+#ifndef SVX_LIGHT
+ if( SFX_MAPUNIT_RELATIVE != eMetric )
+ nHeight = nNewHeight +
+ ::ControlToItem( ::ItemToControl((short)nNewProp, eMetric,
+ SFX_FUNIT_TWIP ), SFX_FUNIT_TWIP,
+ eCoreMetric );
+ else
+#endif // !SVX_LIGHT
+ if( 100 != nNewProp )
+ nHeight = sal_uInt32(( nNewHeight * nNewProp ) / 100 );
+ else
+ nHeight = nNewHeight;
+
+ nProp = nNewProp;
+ ePropUnit = eMetric;
+}
+
+// class SvxFontWidthItem -----------------------------------------------
+
+SvxFontWidthItem::SvxFontWidthItem( const USHORT nSz, const USHORT nPrp, const USHORT nId ) :
+ SfxPoolItem( nId )
+{
+ nWidth = nSz;
+ nProp = nPrp;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFontWidthItem::Clone( SfxItemPool * ) const
+{
+ return new SvxFontWidthItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxFontWidthItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << GetWidth() << GetProp();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxFontWidthItem::ScaleMetrics( long nMult, long nDiv )
+{
+ nWidth = (USHORT)Scale( nWidth, nMult, nDiv );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxFontWidthItem::HasMetrics() const
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxFontWidthItem::Create( SvStream& rStrm,
+ USHORT nVersion ) const
+{
+ USHORT nS;
+ USHORT nP;
+
+ rStrm >> nS;
+ rStrm >> nP;
+ SvxFontWidthItem* pItem = new SvxFontWidthItem( 0, nP, Which() );
+ pItem->SetWidthValue( nS );
+ return pItem;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxFontWidthItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
+ return GetWidth() == ((SvxFontWidthItem&)rItem).GetWidth() &&
+ GetProp() == ((SvxFontWidthItem&)rItem).GetProp();
+}
+
+/*-----------------13.03.98 16:03-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxFontWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch(nMemberId)
+ {
+ case MID_FONTWIDTH:
+ rVal <<= (sal_Int16)(nWidth);
+ break;
+ case MID_FONTWIDTH_PROP:
+ rVal <<= (sal_Int16)(nProp);
+ break;
+ }
+ return sal_True;
+}
+/*-----------------13.03.98 16:03-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxFontWidthItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int16 nVal;
+ if(!(rVal >>= nVal))
+ return sal_False;
+
+ switch(nMemberId)
+ {
+ case MID_FONTWIDTH:
+ nProp = nVal;
+ break;
+ case MID_FONTWIDTH_PROP:
+ nWidth = nVal;
+ break;
+ }
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxFontWidthItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ if ( 100 == nProp )
+ {
+ rText = GetMetricText( (long)nWidth,
+ eCoreUnit, SFX_MAPUNIT_POINT );
+ rText += SVX_RESSTR(GetMetricId(SFX_MAPUNIT_POINT));
+ }
+ else
+ ( rText = String::CreateFromInt32( nProp )) += sal_Unicode('%');
+ return ePres;
+ }
+ }
+#endif
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// class SvxUnderlineItem ------------------------------------------------
+
+SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const USHORT nId )
+ : SfxEnumItem( nId, eSt )
+{
+}
+
+// -----------------------------------------------------------------------
+
+int SvxUnderlineItem::HasBoolValue() const
+{
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxUnderlineItem::GetBoolValue() const
+{
+ return (FontUnderline)GetValue() != UNDERLINE_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxUnderlineItem::SetBoolValue( sal_Bool bVal )
+{
+ SetValue( bVal ? UNDERLINE_SINGLE : UNDERLINE_NONE );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const
+{
+ return new SvxUnderlineItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxUnderlineItem::GetValueCount() const
+{
+ return UNDERLINE_DOTTED + 1; // auch UNDERLINE_NONE geh"ort dazu
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxUnderlineItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (BYTE)GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nState;
+ rStrm >> nState;
+ return new SvxUnderlineItem( (FontUnderline)nState, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxUnderlineItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetValueTextByPos( GetValue() );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxUnderlineItem::GetValueTextByPos( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" );
+ return SVX_RESSTR( RID_SVXITEMS_UL_BEGIN + nPos );
+}
+
+/*-----------------13.03.98 16:25-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxUnderlineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch(nMemberId)
+ {
+ case MID_UNDERLINED:
+ rVal = Bool2Any(GetBoolValue());
+ break;
+ case MID_UNDERLINE:
+ {
+ rVal <<= (sal_Int16)(GetValue());
+ }
+ break;
+ }
+ return sal_True;
+
+}
+/*-----------------13.03.98 16:28-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxUnderlineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ switch(nMemberId)
+ {
+ case MID_UNDERLINED:
+ SetBoolValue(Any2Bool(rVal));
+ break;
+ case MID_UNDERLINE:
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ SetValue((sal_Int16)nValue);
+ }
+ break;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+
+SvXMLEnumMapEntry pXML_underline_enums[] =
+{
+ { sXML_underline_none, UNDERLINE_NONE },
+ { sXML_underline_single, UNDERLINE_SINGLE },
+ { sXML_underline_double, UNDERLINE_DOUBLE },
+ { sXML_underline_dotted, UNDERLINE_DOTTED },
+ { sXML_underline_dash, UNDERLINE_DASH },
+ { sXML_underline_long_dash, UNDERLINE_LONGDASH },
+ { sXML_underline_dot_dash, UNDERLINE_DASHDOT },
+ { sXML_underline_dot_dot_dash, UNDERLINE_DASHDOTDOT },
+ { sXML_underline_wave, UNDERLINE_WAVE },
+ { sXML_underline_bold, UNDERLINE_BOLD },
+ { sXML_underline_bold_dotted, UNDERLINE_BOLDDOTTED },
+ { sXML_underline_bold_dash, UNDERLINE_BOLDDASH },
+ { sXML_underline_bold_long_dash, UNDERLINE_BOLDLONGDASH },
+ { sXML_underline_bold_dot_dash, UNDERLINE_BOLDDASHDOT },
+ { sXML_underline_bold_dot_dot_dash, UNDERLINE_BOLDDASHDOTDOT },
+ { sXML_underline_bold_wave, UNDERLINE_BOLDWAVE },
+ { sXML_underline_double_wave, UNDERLINE_DOUBLEWAVE },
+ { sXML_underline_small_wave, UNDERLINE_SMALLWAVE },
+ { 0, 0 }
+};
+#endif
+
+sal_Bool SvxUnderlineItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+
+ sal_uInt16 eUnderline;
+ if( rUnitConverter.convertEnum( eUnderline, rValue, pXML_underline_enums ) )
+ {
+ SetValue( eUnderline );
+ return sal_True;
+ }
+#endif
+ return sal_False;
+}
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxUnderlineItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+
+ if( rUnitConverter.convertEnum( aOut, GetValue(), pXML_underline_enums ) )
+ {
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+ }
+#endif
+ return sal_False;
+}
+
+// class SvxCrossedOutItem -----------------------------------------------
+
+SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const USHORT nId )
+ : SfxEnumItem( nId, eSt )
+{
+}
+
+// -----------------------------------------------------------------------
+
+int SvxCrossedOutItem::HasBoolValue() const
+{
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxCrossedOutItem::GetBoolValue() const
+{
+ return (FontStrikeout)GetValue() != STRIKEOUT_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCrossedOutItem::SetBoolValue( sal_Bool bVal )
+{
+ SetValue( bVal ? STRIKEOUT_SINGLE : STRIKEOUT_NONE );
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxCrossedOutItem::GetValueCount() const
+{
+ return STRIKEOUT_DOUBLE + 1; // auch STRIKEOUT_NONE geh"ort dazu
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxCrossedOutItem::Clone( SfxItemPool * ) const
+{
+ return new SvxCrossedOutItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (BYTE)GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE eCross;
+ rStrm >> eCross;
+ return new SvxCrossedOutItem( (FontStrikeout)eCross, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxCrossedOutItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetValueTextByPos( GetValue() );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxCrossedOutItem::GetValueTextByPos( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos <= (USHORT)STRIKEOUT_X, "enum overflow!" );
+ return SVX_RESSTR( RID_SVXITEMS_STRIKEOUT_BEGIN + nPos );
+}
+
+/*-----------------13.03.98 16:28-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch(nMemberId)
+ {
+ case MID_CROSSED_OUT:
+ rVal = Bool2Any(GetBoolValue());
+ break;
+ case MID_CROSS_OUT:
+ rVal <<= (sal_Int16)(GetValue());
+ break;
+ }
+ return sal_True;
+}
+/*-----------------13.03.98 16:29-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ switch(nMemberId)
+ {
+ case MID_CROSSED_OUT:
+ SetBoolValue(Any2Bool(rVal));
+ break;
+ case MID_CROSS_OUT:
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ SetValue((sal_Int16)nValue);
+ }
+ break;
+ }
+ return sal_True;
+}
+
+#ifndef SVX_LIGHT
+SvXMLEnumMapEntry pXML_crossedout_enums[] =
+{
+ { sXML_crossedout_none, STRIKEOUT_NONE },
+ { sXML_crossedout_single, STRIKEOUT_SINGLE },
+ { sXML_crossedout_double, STRIKEOUT_DOUBLE },
+ { sXML_crossedout_thick, STRIKEOUT_BOLD },
+ { sXML_crossedout_slash, STRIKEOUT_SLASH },
+ { sXML_crossedout_cross, STRIKEOUT_X }
+};
+#endif
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxCrossedOutItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_uInt16 eCross;
+ if( rUnitConverter.convertEnum( eCross, rValue, pXML_crossedout_enums ) )
+ {
+ SetValue( eCross );
+ return sal_True;
+ }
+#endif
+ return sal_False;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxCrossedOutItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+
+ OUStringBuffer aOut;
+ if( rUnitConverter.convertEnum( aOut, GetValue(), pXML_crossedout_enums ) )
+ {
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+ }
+#endif
+ return sal_False;
+}
+
+// class SvxShadowedItem -------------------------------------------------
+
+SvxShadowedItem::SvxShadowedItem( const sal_Bool bShadowed, const USHORT nId ) :
+ SfxBoolItem( nId, bShadowed )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxShadowedItem::Clone( SfxItemPool * ) const
+{
+ return new SvxShadowedItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxShadowedItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (BYTE) GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nState;
+ rStrm >> nState;
+ return new SvxShadowedItem( nState, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxShadowedItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ USHORT nId = RID_SVXITEMS_SHADOWED_FALSE;
+
+ if ( GetValue() )
+ nId = RID_SVXITEMS_SHADOWED_TRUE;
+ rText = SVX_RESSTR(nId);
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxShadowedItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+
+ SetValue( !rValue.compareToAscii( sXML_none ) );
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+sal_Bool SvxShadowedItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ if(GetValue())
+ {
+ rValue = OUString("1pt 1pt", 7 , gsl_getSystemTextEncoding());
+ }
+ else
+ {
+ rValue = OUString(sXML_none, sizeof(sXML_none), gsl_getSystemTextEncoding());
+ }
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+
+// class SvxAutoKernItem -------------------------------------------------
+
+SvxAutoKernItem::SvxAutoKernItem( const sal_Bool bAutoKern, const USHORT nId ) :
+ SfxBoolItem( nId, bAutoKern )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxAutoKernItem::Clone( SfxItemPool * ) const
+{
+ return new SvxAutoKernItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxAutoKernItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (BYTE) GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nState;
+ rStrm >> nState;
+ return new SvxAutoKernItem( nState, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxAutoKernItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ USHORT nId = RID_SVXITEMS_AUTOKERN_FALSE;
+
+ if ( GetValue() )
+ nId = RID_SVXITEMS_AUTOKERN_TRUE;
+ rText = SVX_RESSTR(nId);
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxAutoKernItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_Bool bValue;
+ if( rUnitConverter.convertBool( bValue, rValue ) )
+ {
+ SetValue( bValue );
+ return sal_True;
+ }
+#endif
+ return sal_False;
+}
+
+sal_Bool SvxAutoKernItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+
+ OUStringBuffer aOut;
+
+ rUnitConverter.convertBool( aOut, GetValue() );
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// class SvxWordLineModeItem ---------------------------------------------
+
+SvxWordLineModeItem::SvxWordLineModeItem( const sal_Bool bWordLineMode,
+ const USHORT nId ) :
+ SfxBoolItem( nId, bWordLineMode )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxWordLineModeItem::Clone( SfxItemPool * ) const
+{
+ return new SvxWordLineModeItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (sal_Bool) GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, USHORT) const
+{
+ sal_Bool bValue;
+ rStrm >> bValue;
+ return new SvxWordLineModeItem( bValue, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxWordLineModeItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ USHORT nId = RID_SVXITEMS_WORDLINE_FALSE;
+
+ if ( GetValue() )
+ nId = RID_SVXITEMS_WORDLINE_TRUE;
+ rText = SVX_RESSTR(nId);
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxWordLineModeItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_Bool bValue;
+ if( rUnitConverter.convertBool( bValue, rValue ) )
+ {
+ SetValue( !bValue );
+ return sal_True;
+ }
+#endif
+ return sal_False;
+}
+
+sal_Bool SvxWordLineModeItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+ rUnitConverter.convertBool( aOut, !GetValue() );
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// class SvxContourItem --------------------------------------------------
+
+SvxContourItem::SvxContourItem( const sal_Bool bContoured, const USHORT nId ) :
+ SfxBoolItem( nId, bContoured )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxContourItem::Clone( SfxItemPool * ) const
+{
+ return new SvxContourItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxContourItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (sal_Bool) GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, USHORT) const
+{
+ sal_Bool bValue;
+ rStrm >> bValue;
+ return new SvxContourItem( bValue, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxContourItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ USHORT nId = RID_SVXITEMS_CONTOUR_FALSE;
+
+ if ( GetValue() )
+ nId = RID_SVXITEMS_CONTOUR_TRUE;
+ rText = SVX_RESSTR(nId);
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxContourItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_Bool bValue;
+ if( rUnitConverter.convertBool( bValue, rValue ) )
+ {
+ SetValue( bValue );
+ return sal_True;
+ }
+#endif
+ return sal_False;
+}
+
+sal_Bool SvxContourItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+ rUnitConverter.convertBool( aOut, GetValue() );
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+
+// class SvxPropSizeItem -------------------------------------------------
+
+SvxPropSizeItem::SvxPropSizeItem( const USHORT nPercent, const USHORT nId ) :
+ SfxUInt16Item( nId, nPercent )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxPropSizeItem::Clone( SfxItemPool * ) const
+{
+ return new SvxPropSizeItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxPropSizeItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (USHORT) GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxPropSizeItem::Create(SvStream& rStrm, USHORT) const
+{
+ USHORT nSize;
+ rStrm >> nSize;
+ return new SvxPropSizeItem( nSize, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxPropSizeItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// class SvxColorItem ----------------------------------------------------
+
+SvxColorItem::SvxColorItem( const USHORT nId ) :
+ SfxPoolItem( nId ),
+ mColor( COL_BLACK )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxColorItem::SvxColorItem( const Color& rCol, const USHORT nId ) :
+ SfxPoolItem( nId ),
+ mColor( rCol )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxColorItem::SvxColorItem( SvStream &rStrm, const USHORT nId ) :
+ SfxPoolItem( nId )
+{
+ Color aColor;
+ rStrm >> aColor;
+ mColor = aColor;
+}
+
+// -----------------------------------------------------------------------
+
+SvxColorItem::SvxColorItem( const SvxColorItem &rCopy ) :
+ SfxPoolItem( rCopy ),
+ mColor( rCopy.mColor )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxColorItem::~SvxColorItem()
+{
+}
+
+// -----------------------------------------------------------------------
+
+int SvxColorItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return mColor == ( (const SvxColorItem&)rAttr ).mColor;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxColorItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)(mColor.GetColor());
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxColorItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nColor;
+ if(!(rVal >>= nColor))
+ return sal_False;
+
+ mColor.SetColor( nColor );
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxColorItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ return rUnitConverter.convertColor( mColor, rValue );
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxColorItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+
+ OUStringBuffer aOut;
+ rUnitConverter.convertColor( aOut, mColor );
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxColorItem::Clone( SfxItemPool * ) const
+{
+ return new SvxColorItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxColorItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << mColor;
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, USHORT nVer ) const
+{
+ return new SvxColorItem( rStrm, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxColorItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = ::GetColorString( mColor );
+ return ePres;
+ }
+#endif
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorItem::SetValue( const Color& rNewCol )
+{
+ mColor = rNewCol;
+}
+
+// class SvxCharSetColorItem ---------------------------------------------
+
+SvxCharSetColorItem::SvxCharSetColorItem( const USHORT nId ) :
+ SvxColorItem( nId ),
+
+ eFrom( RTL_TEXTENCODING_DONTKNOW )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxCharSetColorItem::SvxCharSetColorItem( const Color& rCol,
+ const rtl_TextEncoding eFrom,
+ const USHORT nId ) :
+ SvxColorItem( rCol, nId ),
+
+ eFrom( eFrom )
+{
+}
+
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxCharSetColorItem::Clone( SfxItemPool * ) const
+{
+ return new SvxCharSetColorItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (BYTE) GetStoreCharSet( GetCharSet(), rStrm.GetVersion() )
+ << GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxCharSetColorItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE cSet;
+ Color aColor;
+ rStrm >> cSet >> aColor;
+ return new SvxCharSetColorItem( aColor, (rtl_TextEncoding)cSet, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxCharSetColorItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// class SvxKerningItem --------------------------------------------------
+
+SvxKerningItem::SvxKerningItem( const short nKern, const USHORT nId ) :
+ SfxInt16Item( nId, nKern )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxKerningItem::Clone( SfxItemPool * ) const
+{
+ return new SvxKerningItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxKerningItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (short) GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxKerningItem::ScaleMetrics( long nMult, long nDiv )
+{
+ SetValue( (sal_Int16)Scale( GetValue(), nMult, nDiv ) );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxKerningItem::HasMetrics() const
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxKerningItem::Create(SvStream& rStrm, USHORT) const
+{
+ short nValue;
+ rStrm >> nValue;
+ return new SvxKerningItem( nValue, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxKerningItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ rText = GetMetricText( (long)GetValue(), eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ rText = SVX_RESSTR(RID_SVXITEMS_KERNING_COMPLETE);
+ USHORT nId = 0;
+
+ if ( GetValue() > 0 )
+ nId = RID_SVXITEMS_KERNING_EXPANDED;
+ else if ( GetValue() < 0 )
+ nId = RID_SVXITEMS_KERNING_CONDENSED;
+
+ if ( nId )
+ rText += SVX_RESSTR(nId);
+ rText += GetMetricText( (long)GetValue(), eCoreUnit, ePresUnit );
+ rText += SVX_RESSTR(GetMetricId(ePresUnit));
+ return ePres;
+ }
+ }
+#endif
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxKerningItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+
+ if( rValue.compareToAscii( sXML_kerning_normal ) )
+ {
+ SetValue( 0 );
+ return sal_True;
+ }
+ else
+ {
+ sal_Int32 eKerning;
+ if( rUnitConverter.convertMeasure( eKerning, rValue ) )
+ {
+ SetValue(eKerning);
+ return sal_True;
+ }
+ }
+#endif
+ return sal_False;
+}
+
+sal_Bool SvxKerningItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+
+ OUStringBuffer aOut;
+
+ if( GetValue() == 0 )
+ aOut.appendAscii( sXML_kerning_normal );
+ else
+ rUnitConverter.convertMeasure( aOut, GetValue() );
+
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// class SvxCaseMapItem --------------------------------------------------
+
+SvxCaseMapItem::SvxCaseMapItem( const SvxCaseMap eMap, const USHORT nId ) :
+ SfxEnumItem( nId, eMap )
+{
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxCaseMapItem::GetValueCount() const
+{
+ return SVX_CASEMAP_END; // SVX_CASEMAP_KAPITAELCHEN + 1
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxCaseMapItem::Clone( SfxItemPool * ) const
+{
+ return new SvxCaseMapItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxCaseMapItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (BYTE) GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE cMap;
+ rStrm >> cMap;
+ return new SvxCaseMapItem( (const SvxCaseMap)cMap, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxCaseMapItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetValueTextByPos( GetValue() );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxCaseMapItem::GetValueTextByPos( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos < (USHORT)SVX_CASEMAP_END, "enum overflow!" );
+ return SVX_RESSTR( RID_SVXITEMS_CASEMAP_BEGIN + nPos );
+}
+
+/*-----------------13.03.98 16:29-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ sal_Int16 nRet = style::CaseMap::NONE;
+ switch( GetValue() )
+ {
+// case SVX_CASEMAP_NOT_MAPPED : nRet = style::CaseMap::NONE ; break;
+ case SVX_CASEMAP_VERSALIEN : nRet = style::CaseMap::UPPERCASE; break;
+ case SVX_CASEMAP_GEMEINE : nRet = style::CaseMap::LOWERCASE; break;
+ case SVX_CASEMAP_TITEL : nRet = style::CaseMap::TITLE ; break;
+ case SVX_CASEMAP_KAPITAELCHEN: nRet = style::CaseMap::SMALLCAPS; break;
+ }
+ rVal <<= (sal_Int16)(nRet);
+ return sal_True;
+}
+/*-----------------13.03.98 16:29-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_uInt16 nVal;
+ if(!(rVal >>= nVal))
+ return sal_False;
+
+ switch( nVal )
+ {
+ case style::CaseMap::NONE : nVal = SVX_CASEMAP_NOT_MAPPED ; break;
+ case style::CaseMap::UPPERCASE: nVal = SVX_CASEMAP_VERSALIEN ; break;
+ case style::CaseMap::LOWERCASE: nVal = SVX_CASEMAP_GEMEINE ; break;
+ case style::CaseMap::TITLE : nVal = SVX_CASEMAP_TITEL ; break;
+ case style::CaseMap::SMALLCAPS: nVal = SVX_CASEMAP_KAPITAELCHEN; break;
+ }
+ SetValue(nVal);
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+#ifndef SVX_LIGHT
+static SvXMLEnumMapEntry pXML_casemap_enums[] =
+{
+ { sXML_none, SVX_CASEMAP_NOT_MAPPED },
+ { sXML_casemap_lowercase, SVX_CASEMAP_GEMEINE },
+ { sXML_casemap_uppercase, SVX_CASEMAP_VERSALIEN },
+ { sXML_casemap_capitalize, SVX_CASEMAP_TITEL },
+ { 0,0 }
+};
+#endif
+
+sal_Bool SvxCaseMapItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_uInt16 nVal = SVX_CASEMAP_NOT_MAPPED;
+ switch( nMemberId )
+ {
+ case MID_CASEMAP_VARIANT:
+ if( rValue.compareToAscii( sXML_casemap_small_caps ) )
+ nVal = SVX_CASEMAP_KAPITAELCHEN;
+ else
+ if( !rValue.compareToAscii(sXML_casemap_normal ) )
+ return sal_False;
+ break;
+ case MID_CASEMAP_TRANS:
+ if(!rUnitConverter.convertEnum( nVal, rValue, pXML_casemap_enums ))
+ return sal_False;
+ break;
+ }
+
+ SetValue( (sal_uInt16)nVal );
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxCaseMapItem::exportXML( OUString& rValue, sal_uInt16 nMemberId,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+
+ sal_uInt16 nVal = GetValue();
+
+ OUStringBuffer aOut;
+
+ switch( nMemberId )
+ {
+ case MID_CASEMAP_VARIANT:
+ if( nVal == SVX_CASEMAP_KAPITAELCHEN || nVal == SVX_CASEMAP_NOT_MAPPED )
+ aOut.appendAscii( nVal == SVX_CASEMAP_KAPITAELCHEN ?
+ sXML_casemap_small_caps :
+ sXML_casemap_normal );
+ else
+ return sal_False;
+ break;
+ case MID_CASEMAP_TRANS:
+ if(!rUnitConverter.convertEnum( aOut, nVal, pXML_casemap_enums ))
+ return sal_False;
+ break;
+ }
+
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+
+// class SvxEscapementItem -----------------------------------------------
+
+SvxEscapementItem::SvxEscapementItem( const USHORT nId ) :
+ SfxEnumItemInterface( nId ),
+
+ nEsc ( 0 ),
+ nProp ( 100 )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxEscapementItem::SvxEscapementItem( const SvxEscapement eEscape,
+ const USHORT nId ) :
+ SfxEnumItemInterface( nId ),
+ nProp( 100 )
+{
+ SetEscapement( eEscape );
+ if( nEsc )
+ nProp = 58;
+}
+
+// -----------------------------------------------------------------------
+
+SvxEscapementItem::SvxEscapementItem( const short nEsc,
+ const BYTE nProp,
+ const USHORT nId ) :
+ SfxEnumItemInterface( nId ),
+ nEsc ( nEsc ),
+ nProp ( nProp )
+{
+}
+
+// -----------------------------------------------------------------------
+
+int SvxEscapementItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return( nEsc == ((SvxEscapementItem&)rAttr).nEsc &&
+ nProp == ((SvxEscapementItem&)rAttr).nProp );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxEscapementItem::Clone( SfxItemPool * ) const
+{
+ return new SvxEscapementItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxEscapementItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ short nEsc = GetEsc();
+ if( SOFFICE_FILEFORMAT_31 == rStrm.GetVersion() )
+ {
+ if( DFLT_ESC_AUTO_SUPER == nEsc )
+ nEsc = DFLT_ESC_SUPER;
+ else if( DFLT_ESC_AUTO_SUB == nEsc )
+ nEsc = DFLT_ESC_SUB;
+ }
+ rStrm << (BYTE) GetProp()
+ << (short) nEsc;
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nProp;
+ short nEsc;
+ rStrm >> nProp >> nEsc;
+ return new SvxEscapementItem( nEsc, nProp, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxEscapementItem::GetValueCount() const
+{
+ return SVX_ESCAPEMENT_END; // SVX_ESCAPEMENT_SUBSCRIPT + 1
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxEscapementItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ rText = GetValueTextByPos( GetEnumValue() );
+
+ if ( nEsc != 0 )
+ {
+ if( DFLT_ESC_AUTO_SUPER == nEsc || DFLT_ESC_AUTO_SUB == nEsc )
+ rText += String( SVX_RESSTR(RID_SVXITEMS_ESCAPEMENT_AUTO) );
+ else
+ ( rText += String::CreateFromInt32( nEsc )) += sal_Unicode('%');
+ }
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxEscapementItem::GetValueTextByPos( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos < (USHORT)SVX_ESCAPEMENT_END, "enum overflow!" );
+ return SVX_RESSTR(RID_SVXITEMS_ESCAPEMENT_BEGIN + nPos);
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxEscapementItem::GetEnumValue() const
+{
+ if ( nEsc < 0 )
+ return SVX_ESCAPEMENT_SUBSCRIPT;
+ else if ( nEsc > 0 )
+ return SVX_ESCAPEMENT_SUPERSCRIPT;
+ return SVX_ESCAPEMENT_OFF;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxEscapementItem::SetEnumValue( USHORT nVal )
+{
+ SetEscapement( (const SvxEscapement)nVal );
+}
+
+/*-----------------13.03.98 17:05-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch(nMemberId)
+ {
+ case MID_ESC:
+ rVal <<= (sal_Int16)(nEsc);
+ break;
+ case MID_ESC_HEIGHT:
+ rVal <<= (sal_Int8)(nProp);
+ break;
+ case MID_AUTO_ESC:
+ rVal = Bool2Any(DFLT_ESC_AUTO_SUB == nEsc || DFLT_ESC_AUTO_SUPER == nEsc);
+ break;
+ }
+ return sal_True;
+}
+/*-----------------13.03.98 17:05-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ switch(nMemberId)
+ {
+ case MID_ESC:
+ {
+ sal_Int16 nVal;
+ if( (rVal >>= nVal) && (Abs(nVal) <= 101))
+ nEsc = nVal;
+ else
+ return sal_False;
+ }
+ break;
+ case MID_ESC_HEIGHT:
+ {
+ BYTE nVal;
+ if( (rVal >>= nVal) && (nVal <= 100))
+ nProp = nVal;
+ else
+ return sal_False;
+ }
+ break;
+ case MID_AUTO_ESC:
+ {
+ BOOL bVal = Any2Bool(rVal);
+ if(bVal)
+ {
+ if(nEsc < 0)
+ nEsc = DFLT_ESC_AUTO_SUB;
+ else
+ nEsc = DFLT_ESC_AUTO_SUPER;
+ }
+ else
+ if(DFLT_ESC_AUTO_SUPER == nEsc )
+ --nEsc;
+ else if(DFLT_ESC_AUTO_SUB == nEsc)
+ ++nEsc;
+ }
+ break;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxEscapementItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+
+ SvXMLTokenEnumerator aTokens( rValue );
+
+ OUString aToken;
+ if( ! aTokens.getNextToken( aToken ) )
+ return sal_False;
+
+ if( aToken.compareToAscii( sXML_escapement_sub ) )
+ {
+ nEsc = DFLT_ESC_AUTO_SUB;
+ }
+ else if( aToken.compareToAscii( sXML_escapement_super ) )
+ {
+ nEsc = DFLT_ESC_AUTO_SUPER;
+ }
+ else
+ {
+ sal_Int32 nNewEsc;
+ if( !rUnitConverter.convertPercent( nNewEsc, aToken ) )
+ return sal_False;
+
+ nEsc = (sal_uInt16) nNewEsc;
+ }
+
+ if( aTokens.getNextToken( aToken ) )
+ {
+ sal_Int32 nNewProp;
+ if( !rUnitConverter.convertPercent( nNewProp, aToken ) )
+ return sal_False;
+ nProp = (sal_uInt16)nNewProp;
+ }
+ else
+ {
+ nProp = (sal_uInt16) DFLT_ESC_PROP;
+ }
+
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxEscapementItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+ if( nEsc == DFLT_ESC_AUTO_SUPER )
+ {
+ aOut.appendAscii( sXML_escapement_super );
+ }
+ else if( nEsc == DFLT_ESC_AUTO_SUB )
+ {
+ aOut.appendAscii( sXML_escapement_sub );
+ }
+ else
+ {
+ rUnitConverter.convertPercent( aOut, nEsc );
+ }
+
+ aOut.append( sal_Unicode(' '));
+ rUnitConverter.convertPercent( aOut, nProp );
+
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+// class SvxLanguageItem -------------------------------------------------
+
+SvxLanguageItem::SvxLanguageItem( const LanguageType eLang, const USHORT nId )
+ : SfxEnumItem( nId , eLang )
+{
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxLanguageItem::GetValueCount() const
+{
+ return LANGUAGE_COUNT; // aus tlintl.hxx
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxLanguageItem::Clone( SfxItemPool * ) const
+{
+ return new SvxLanguageItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxLanguageItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (USHORT) GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, USHORT) const
+{
+ USHORT nValue;
+ rStrm >> nValue;
+ return new SvxLanguageItem( (LanguageType)nValue, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxLanguageItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+#ifndef SVX_LIGHT
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ SvxLanguageTable aLangTable;
+ rText = aLangTable.GetString( (LanguageType)GetValue() );
+ return ePres;
+ }
+ }
+#endif // !SVX_LIGHT
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+/*-----------------14.03.98 14:13-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ switch(nMemberId)
+ {
+ case MID_LANG_INT:
+ rVal <<= (sal_Int16)(GetValue());
+ break;
+ case MID_LANG_LOCALE:
+ String sLanguage, sCountry;
+ ::ConvertLanguageToIsoNames( GetValue(), sLanguage, sCountry );
+ lang::Locale aRet;
+ aRet.Language = sLanguage;
+ aRet.Country = sCountry;
+ rVal <<= aRet;
+ break;
+ }
+ return sal_True;
+}
+/*-----------------14.03.98 14:13-------------------
+
+--------------------------------------------------*/
+sal_Bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ switch(nMemberId)
+ {
+ case MID_LANG_INT:
+ {
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ SetValue((sal_Int16)nValue);
+ }
+ break;
+ case MID_LANG_LOCALE:
+ {
+ lang::Locale aLocale;
+ if(!(rVal >>= aLocale))
+ return sal_False;
+
+ if (aLocale.Language.getLength() || aLocale.Country.getLength())
+ SetValue(ConvertIsoNamesToLanguage( aLocale.Language, aLocale.Country ));
+ else
+ SetValue(LANGUAGE_NONE);
+ }
+ break;
+ }
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SvxLanguageItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_Bool bRet = sal_False;
+ switch( nMemberId )
+ {
+ case MID_LANGUAGE:
+ case MID_COUNTRY:
+ {
+ String sLanguage, sCountry;
+ if( LANGUAGE_DONTKNOW != GetLanguage() &&
+ LANGUAGE_NONE != GetLanguage() &&
+ LANGUAGE_SYSTEM != GetLanguage() )
+ {
+ ConvertLanguageToIsoNames( GetLanguage(), sLanguage, sCountry );
+ DBG_ASSERT( !sCountry.Len(),
+ "SvxLanguageItem::importXML: setting contry first is unimplemented" );
+ }
+
+ String sValue;
+ if( !rValue.compareToAscii( sXML_none ) )
+ sValue = rValue.getStr();
+
+ if( MID_LANGUAGE == nMemberId )
+ sLanguage = sValue;
+ else
+ sCountry = sValue;
+
+ if( 0 == sLanguage.Len() && 0 == sCountry.Len() )
+ {
+ SetLanguage( LANGUAGE_NONE );
+ bRet = sal_True;
+ }
+ else
+ {
+ LanguageType eLang = ConvertIsoNamesToLanguage( sLanguage,
+ sCountry );
+ if( LANGUAGE_NONE != eLang )
+ {
+ SetLanguage( eLang );
+ bRet = sal_True;
+ }
+ }
+ }
+ break;
+ case MID_LANG_COUNTRY:
+ if( rValue.getLength() )
+ {
+ LanguageType eLang = ConvertIsoStringToLanguage( rValue.getStr() );
+ if( LANGUAGE_NONE != eLang )
+ {
+ SetLanguage( eLang );
+ bRet = sal_True;
+ }
+ }
+ else
+ {
+ SetLanguage( LANGUAGE_NONE );
+ bRet = sal_True;
+ }
+ break;
+ }
+
+ return bRet;
+#else
+ return sal_False;
+#endif
+}
+
+// -----------------------------------------------------------------------
+
+
+sal_Bool SvxLanguageItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ sal_Bool bRet = sal_False;
+ switch( nMemberId )
+ {
+ case MID_LANGUAGE:
+ case MID_COUNTRY:
+ if( LANGUAGE_NONE == GetLanguage() ||
+ LANGUAGE_DONTKNOW == GetLanguage() ||
+ LANGUAGE_SYSTEM == GetLanguage() )
+ {
+ rValue = OUString( sXML_none, sizeof(sXML_none), gsl_getSystemTextEncoding() );
+ bRet = sal_True;
+ }
+ else
+ {
+ String sLang, sCountry;
+ ConvertLanguageToIsoNames( GetLanguage(), sLang, sCountry );
+ if( MID_LANGUAGE == nMemberId )
+ rValue = sLang.GetBuffer();
+ else
+ rValue = sCountry.GetBuffer();
+ bRet = 0 != rValue.getLength();
+ }
+ break;
+
+ case MID_LANG_COUNTRY:
+ if( LANGUAGE_NONE == GetLanguage() ||
+ LANGUAGE_DONTKNOW == GetLanguage() ||
+ LANGUAGE_SYSTEM == GetLanguage() )
+ {
+ rValue = OUString();
+ bRet = sal_True;
+ }
+ else
+ {
+ rValue = ConvertLanguageToIsoString( GetLanguage() ).GetBuffer();
+ bRet = 0 != rValue.getLength();
+ }
+ break;
+ }
+
+ return bRet;
+#else
+ return sal_False;
+#endif
+}
+
+// class SvxNoLinebreakItem ----------------------------------------------
+
+SvxNoLinebreakItem::SvxNoLinebreakItem( const sal_Bool bBreak, const USHORT nId ) :
+ SfxBoolItem( nId, bBreak )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxNoLinebreakItem::Clone( SfxItemPool* ) const
+{
+ return new SvxNoLinebreakItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (sal_Bool)GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxNoLinebreakItem::Create(SvStream& rStrm, USHORT) const
+{
+ sal_Bool bValue;
+ rStrm >> bValue;
+ return new SvxNoLinebreakItem( bValue, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxNoLinebreakItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// class SvxNoHyphenItem -------------------------------------------------
+
+SvxNoHyphenItem::SvxNoHyphenItem( const sal_Bool bHyphen, const USHORT nId ) :
+ SfxBoolItem( nId , bHyphen )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxNoHyphenItem::Clone( SfxItemPool* ) const
+{
+ return new SvxNoHyphenItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (sal_Bool) GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxNoHyphenItem::Create( SvStream& rStrm, USHORT ) const
+{
+ sal_Bool bValue;
+ rStrm >> bValue;
+ return new SvxNoHyphenItem( bValue, Which() );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxNoHyphenItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+/*
+ * Dummy-Item fuer ToolBox-Controls:
+ *
+ */
+
+// -----------------------------------------------------------------------
+// class SvxLineColorItem (== SvxColorItem)
+// -----------------------------------------------------------------------
+
+SvxLineColorItem::SvxLineColorItem( const USHORT nId ) :
+ SvxColorItem( nId )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineColorItem::SvxLineColorItem( const Color& rCol, const USHORT nId ) :
+ SvxColorItem( rCol, nId )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineColorItem::SvxLineColorItem( SvStream &rStrm, const USHORT nId ) :
+ SvxColorItem( rStrm, nId )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineColorItem::SvxLineColorItem( const SvxLineColorItem &rCopy ) :
+ SvxColorItem( rCopy )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineColorItem::~SvxLineColorItem()
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxLineColorItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText,
+ const International * pInternational
+) const
+{
+ return SvxColorItem::GetPresentation( ePres, eCoreUnit, ePresUnit,
+ rText, pInternational );
+}
+
+// class SvxBlinkItem -------------------------------------------------
+
+
+SvxBlinkItem::SvxBlinkItem( const sal_Bool bBlink, const USHORT nId ) :
+ SfxBoolItem( nId, bBlink )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBlinkItem::Clone( SfxItemPool * ) const
+{
+ return new SvxBlinkItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxBlinkItem::Store( SvStream& rStrm , USHORT nItemVersion ) const
+{
+ rStrm << (BYTE) GetValue();
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nState;
+ rStrm >> nState;
+ return new SvxBlinkItem( nState, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+SfxItemPresentation SvxBlinkItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ USHORT nId = RID_SVXITEMS_BLINK_FALSE;
+
+ if ( GetValue() )
+ nId = RID_SVXITEMS_BLINK_TRUE;
+ rText = SVX_RESSTR(nId);
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool SvxBlinkItem::importXML( const OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter )
+{
+#ifndef SVX_LIGHT
+ sal_Bool bValue;
+ if( rUnitConverter.convertBool( bValue, rValue ) )
+ {
+ SetValue( bValue );
+ return sal_True;
+ }
+#endif
+ return sal_False;
+}
+
+sal_Bool SvxBlinkItem::exportXML( OUString& rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter& rUnitConverter ) const
+{
+#ifndef SVX_LIGHT
+ OUStringBuffer aOut;
+
+ rUnitConverter.convertBool( aOut, GetValue() );
+ rValue = aOut.makeStringAndClear();
+ return sal_True;
+#else
+ return sal_False;
+#endif
+}
+
+
diff --git a/svx/source/items/zoomitem.cxx b/svx/source/items/zoomitem.cxx
new file mode 100644
index 0000000000..b678a0ae13
--- /dev/null
+++ b/svx/source/items/zoomitem.cxx
@@ -0,0 +1,151 @@
+/*************************************************************************
+ *
+ * $RCSfile: zoomitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+#ifndef __SBX_SBXVARIABLE_HXX
+#include <svtools/sbxvar.hxx>
+#endif
+#pragma hdrstop
+
+#include "zoomitem.hxx"
+
+// -----------------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SvxZoomItem,SfxUInt16Item);
+
+// -----------------------------------------------------------------------
+
+SvxZoomItem::SvxZoomItem
+(
+ SvxZoomType eZoomType,
+ sal_uInt16 nVal,
+ sal_uInt16 nWhich
+)
+: SfxUInt16Item( nWhich, nVal ),
+ nValueSet( SVX_ZOOM_ENABLE_ALL ),
+ eType( eZoomType )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxZoomItem::SvxZoomItem( const SvxZoomItem& rOrig )
+: SfxUInt16Item( rOrig.Which(), rOrig.GetValue() ),
+ nValueSet( rOrig.GetValueSet() ),
+ eType( rOrig.GetType() )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxZoomItem::~SvxZoomItem()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxZoomItem::Clone( SfxItemPool *pPool ) const
+{
+ return new SvxZoomItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxZoomItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
+{
+ sal_uInt16 nValue;
+ sal_uInt16 nValSet;
+ sal_Int8 nType;
+ rStrm >> nValue >> nValSet >> nType;
+ SvxZoomItem* pNew = new SvxZoomItem( (SvxZoomType)nType, nValue, Which() );
+ pNew->SetValueSet( nValSet );
+ return pNew;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SvxZoomItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const
+{
+ rStrm << (sal_uInt16)GetValue()
+ << nValueSet
+ << (sal_Int8)eType;
+ return rStrm;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxZoomItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ SvxZoomItem& rItem = (SvxZoomItem&)rAttr;
+
+ return ( GetValue() == rItem.GetValue() &&
+ nValueSet == rItem.GetValueSet() &&
+ eType == rItem.GetType() );
+}
+
+
diff --git a/svx/source/mnuctrls/fntctl.cxx b/svx/source/mnuctrls/fntctl.cxx
new file mode 100644
index 0000000000..4c29638f8e
--- /dev/null
+++ b/svx/source/mnuctrls/fntctl.cxx
@@ -0,0 +1,232 @@
+/*************************************************************************
+ *
+ * $RCSfile: fntctl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 headern
+
+#ifndef _STDMENU_HXX //autogen
+#include <svtools/stdmenu.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#pragma hdrstop
+
+#define ITEMID_FONT 1
+#define ITEMID_FONTLIST 2
+
+#include "fntctl.hxx" // ITEMID_FONT muss vorher definiert sein!
+#include "svxids.hrc"
+
+#ifndef _SVX_FLSTITEM_HXX //autogen
+#include "flstitem.hxx"
+#endif
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include "fontitem.hxx"
+#endif
+
+// STATIC DATA -----------------------------------------------------------
+
+SFX_IMPL_MENU_CONTROL(SvxFontMenuControl, SvxFontItem);
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Ctor; setzt den Select-Handler am Men"u und tr"agt das Men"u
+ in seinen Parent ein.
+*/
+
+SvxFontMenuControl::SvxFontMenuControl
+(
+ USHORT nId,
+ Menu& rMenu,
+ SfxBindings& rBindings
+) :
+ pMenu ( new FontNameMenu ),
+ rParent ( rMenu )
+{
+ rMenu.SetPopupMenu( nId, pMenu );
+ pMenu->SetSelectHdl( LINK( this, SvxFontMenuControl, MenuSelect ) );
+ StartListening( rBindings );
+ FillMenu();
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ F"ullt das Men"u mit den aktuellen Fonts aus der Fontlist
+ der DocumentShell.
+*/
+
+void SvxFontMenuControl::FillMenu()
+{
+ SfxObjectShell *pDoc = SfxObjectShell::Current();
+
+ if ( pDoc )
+ {
+ const SvxFontListItem* pFonts =
+ (const SvxFontListItem*)pDoc->GetItem( SID_ATTR_CHAR_FONTLIST );
+ const FontList* pList = pFonts ? pFonts->GetFontList(): 0;
+ DBG_ASSERT( pList, "Kein Fonts gefunden" );
+ pMenu->Fill( pList );
+ }
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Statusbenachrichtigung;
+ f"ullt ggf. das Men"u mit den aktuellen Fonts aus der Fontlist
+ der DocumentShell.
+ Ist die Funktionalit"at disabled, wird der entsprechende
+ Men"ueintrag im Parentmen"u disabled, andernfalls wird er enabled.
+ Der aktuelle Font wird mit einer Checkmark versehen.
+*/
+
+void SvxFontMenuControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ rParent.EnableItem( GetId(), SFX_ITEM_DISABLED != eState );
+
+ if ( SFX_ITEM_AVAILABLE == eState )
+ {
+ if ( !pMenu->GetItemCount() )
+ FillMenu();
+ const SvxFontItem* pFontItem = PTR_CAST( SvxFontItem, pState );
+ String aFont;
+
+ if ( pFontItem )
+ aFont = pFontItem->GetFamilyName();
+ pMenu->SetCurName( aFont );
+ }
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Statusbenachrichtigung "uber Bindings; bei DOCCHANGED
+ wird das Men"u mit den aktuellen Fonts aus der Fontlist
+ der DocumentShell gef"ullt.
+*/
+
+void SvxFontMenuControl::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType )
+{
+ if ( rHint.Type() != TYPE(SfxSimpleHint) &&
+ ( (SfxSimpleHint&)rHint ).GetId() == SFX_HINT_DOCCHANGED )
+ FillMenu();
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Select-Handler des Men"us; der Name des selektierten Fonts
+ wird in einem SvxFontItem verschickt. Das F"ullen mit den
+ weiteren Fontinformationen mu\s durch die Applikation geschehen.
+*/
+
+IMPL_LINK_INLINE_START( SvxFontMenuControl, MenuSelect, FontNameMenu *, pMen )
+{
+ SvxFontItem aItem( GetId() );
+ aItem.GetFamilyName() = pMen->GetCurName();
+ GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_RECORD, &aItem, 0L );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxFontMenuControl, MenuSelect, FontNameMenu *, pMen )
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Dtor; gibt das Men"u frei.
+*/
+
+SvxFontMenuControl::~SvxFontMenuControl()
+{
+ delete pMenu;
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Gibt das Men"u zur"uck
+*/
+
+PopupMenu* SvxFontMenuControl::GetPopup() const
+{
+ return pMenu;
+}
+
+
+
diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx
new file mode 100644
index 0000000000..233c63b4df
--- /dev/null
+++ b/svx/source/mnuctrls/fntszctl.cxx
@@ -0,0 +1,273 @@
+/*************************************************************************
+ *
+ * $RCSfile: fntszctl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 headern
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _STDMENU_HXX //autogen
+#include <svtools/stdmenu.hxx>
+#endif
+#ifndef _CTRLTOOL_HXX //autogen
+#include <svtools/ctrltool.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXVIEWFRM_HXX //autogen
+#include <sfx2/viewfrm.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#pragma hdrstop
+
+#define ITEMID_FONTHEIGHT 1
+#define ITEMID_FONTLIST 2
+#define ITEMID_FONT 3
+
+#include "fntszctl.hxx" // ITEMID_FONTHEIGHT muss vorher definiert sein!
+#include "dialogs.hrc"
+
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include "fhgtitem.hxx"
+#endif
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include "fontitem.hxx"
+#endif
+#ifndef _SVX_FLSTITEM_HXX //autogen
+#include "flstitem.hxx"
+#endif
+
+#include "dlgutil.hxx"
+#include "dialmgr.hxx"
+
+#define LOGIC OutputDevice::LogicToLogic
+
+SFX_IMPL_MENU_CONTROL(SvxFontSizeMenuControl, SvxFontHeightItem);
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Select-Handler des Men"us; die aktuelle Fontgr"o\se
+ wird in einem SvxFontHeightItem verschickt.
+*/
+
+IMPL_LINK( SvxFontSizeMenuControl, MenuSelect, FontSizeMenu*, pMen )
+{
+ SfxViewFrame* pFrm = SfxViewFrame::Current();
+ SfxShell* pSh = pFrm ? pFrm->GetDispatcher()->GetShell( 0 ) : NULL;
+
+ if ( !pSh )
+ return 0;
+
+ const SfxItemPool& rPool = pSh->GetPool();
+ USHORT nWhich = rPool.GetWhich( SID_ATTR_CHAR_FONTHEIGHT );
+ const SfxMapUnit eUnit = rPool.GetMetric( nWhich );
+ long nH = LOGIC( pMen->GetCurHeight(), MAP_POINT, (MapUnit)eUnit ) / 10;
+ SvxFontHeightItem aItem( nH, 100, GetId() );
+ GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_RECORD, &aItem, 0L );
+ return 1;
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Statusbenachrichtigung;
+ Ist die Funktionalit"at disabled, wird der entsprechende
+ Men"ueintrag im Parentmenu disabled, andernfalls wird er enabled.
+ die aktuelle Fontgr"o\se wird mit einer Checkmark versehen.
+*/
+
+void SvxFontSizeMenuControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ rParent.EnableItem( GetId(), SFX_ITEM_DISABLED != eState );
+
+ if ( SFX_ITEM_AVAILABLE == eState )
+ {
+ if ( pState->ISA(SvxFontHeightItem) )
+ {
+ const SvxFontHeightItem* pItem =
+ PTR_CAST( SvxFontHeightItem, pState );
+ long nVal = 0;
+
+ if ( pItem )
+ {
+ SfxViewFrame* pFrm = SfxViewFrame::Current();
+ SfxShell* pSh = pFrm ? pFrm->GetDispatcher()->GetShell( 0 )
+ : NULL;
+
+ if ( !pSh )
+ return;
+
+ const SfxItemPool& rPool = pSh->GetPool();
+ USHORT nWhich = rPool.GetWhich( SID_ATTR_CHAR_FONTHEIGHT );
+ const SfxMapUnit eUnit = rPool.GetMetric( nWhich );
+ long nH = pItem->GetHeight();
+ nVal = LOGIC( nH, (MapUnit)eUnit, MAP_POINT ) * 10;
+ }
+ pMenu->SetCurHeight( nVal );
+ }
+ else if ( pState->ISA(SvxFontItem) )
+ {
+ const SvxFontItem* pItem = PTR_CAST( SvxFontItem, pState );
+
+ if ( pItem )
+ {
+ SfxObjectShell *pDoc = SfxObjectShell::Current();
+
+ if ( pDoc )
+ {
+ const SvxFontListItem* pFonts = (const SvxFontListItem*)
+ pDoc->GetItem( SID_ATTR_CHAR_FONTLIST );
+ const FontList* pList = pFonts ? pFonts->GetFontList(): 0;
+
+ if ( pList )
+ {
+ FontInfo aFntInf = pList->Get( pItem->GetFamilyName(),
+ pItem->GetStyleName() );
+ pMenu->Fill( aFntInf, pList );
+ }
+ // else manche Shells haben keine Fontliste (z.B. Image)
+ }
+ }
+ }
+ }
+ else
+ {
+ // irgendwie muss man ja das Men"u f"ullen
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ if ( pSh )
+ {
+ // daf"ur von der Shell eine Fontliste besorgen
+ const SvxFontListItem* pFonts =
+ (const SvxFontListItem*)pSh->GetItem( SID_ATTR_CHAR_FONTLIST );
+ const FontList* pList = pFonts ? pFonts->GetFontList(): NULL;
+ if ( pList )
+#if SUPD < 547
+ pMenu->Fill( pList->Get(0), pList );
+#else
+ pMenu->Fill( pList->GetFontName(0), pList );
+#endif
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Ctor; setzt den Select-Handler am Men"u und tr"agt Men"u
+ in seinen Parent ein.
+*/
+
+SvxFontSizeMenuControl::SvxFontSizeMenuControl
+(
+ USHORT nId,
+ Menu& rMenu,
+ SfxBindings& rBindings
+) :
+ SfxMenuControl( nId, rBindings ),
+
+ pMenu ( new FontSizeMenu ),
+ rParent ( rMenu ),
+ aFontNameForwarder( SID_ATTR_CHAR_FONT, *this )
+
+{
+ rMenu.SetPopupMenu( nId, pMenu );
+ pMenu->SetSelectHdl( LINK( this, SvxFontSizeMenuControl, MenuSelect ) );
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Dtor; gibt das Men"u frei.
+*/
+
+SvxFontSizeMenuControl::~SvxFontSizeMenuControl()
+{
+ delete pMenu;
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Gibt das Men"u zur"uck
+*/
+
+PopupMenu* SvxFontSizeMenuControl::GetPopup() const
+{
+ return pMenu;
+}
+
+
diff --git a/svx/source/mnuctrls/makefile.mk b/svx/source/mnuctrls/makefile.mk
new file mode 100644
index 0000000000..0ac332dcc7
--- /dev/null
+++ b/svx/source/mnuctrls/makefile.mk
@@ -0,0 +1,120 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning 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=mnuctrls
+AUTOSEG=true
+VERSION=$(UPD)
+
+# --- 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 --------------------------------------------------------
+
+.IF "$(header)" == ""
+
+CXXFILES = \
+ fntctl.cxx \
+ fntszctl.cxx
+
+SRCFILES = \
+ mnuctrls.src
+
+SLOFILES= \
+ $(SLO)$/fntctl.obj \
+ $(SLO)$/fntszctl.obj
+
+.ENDIF
+
+HXX1TARGET=mnuctrls
+HXX1EXT= hxx
+HXX1EXCL= -E:*include*
+HXX1DEPN=\
+ $(INC)$/fntctl.hxx \
+ $(INC)$/fntszctl.hxx
+
+
+# --- Targets -------------------------------------------------------
+
+.IF "$(depend)" == ""
+
+all: \
+ ALLTAR
+
+.ENDIF
+
+.INCLUDE : target.mk
diff --git a/svx/source/mnuctrls/mnuctrls.src b/svx/source/mnuctrls/mnuctrls.src
new file mode 100644
index 0000000000..c8221fd5ab
--- /dev/null
+++ b/svx/source/mnuctrls/mnuctrls.src
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * $RCSfile: mnuctrls.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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"
+
+Menu RID_MN_FONTSIZE {
+ ItemList = {
+ MenuItem {
+ Text = "6";
+ Identifier = 6;
+ };
+ MenuItem {
+ Text = "8";
+ Identifier = 8;
+ };
+ MenuItem {
+ Text = "10";
+ Identifier = 10;
+ };
+ MenuItem {
+ Text = "12";
+ Identifier = 12;
+ };
+ MenuItem {
+ Text = "14";
+ Identifier = 14;
+ };
+ MenuItem {
+ Text = "18";
+ Identifier = 18;
+ };
+ MenuItem {
+ Text = "24";
+ Identifier = 24;
+ };
+ MenuItem {
+ Text = "36";
+ Identifier = 36;
+ };
+ MenuItem {
+ Text = "48";
+ Identifier = 48;
+ };
+ MenuItem {
+ Text = "60";
+ Identifier = 60;
+ };
+ MenuItem {
+ Text = "72";
+ Identifier = 72;
+ };
+ };
+};
+
+
+
+
diff --git a/svx/source/msfilter/escherex.cxx b/svx/source/msfilter/escherex.cxx
new file mode 100644
index 0000000000..ca8eff2050
--- /dev/null
+++ b/svx/source/msfilter/escherex.cxx
@@ -0,0 +1,1312 @@
+/*************************************************************************
+ *
+ * $RCSfile: escherex.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _ESCHESDO_HXX
+#include "eschesdo.hxx"
+#endif
+#ifndef _SVX_ESCHEREX_HXX
+#include "escherex.hxx"
+#endif
+#ifndef _SV_GRADIENT_HXX
+#include <vcl/gradient.hxx>
+#endif
+#ifndef _SV_GRAPH_HXX
+#include <vcl/graph.hxx>
+#endif
+#ifndef _SV_CVTGRF_HXX
+#include <vcl/cvtgrf.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+#ifndef _ZCODEC_HXX
+#include <tools/zcodec.hxx>
+#endif
+#ifndef _INC_STDLIB
+#include <stdlib.h>
+#endif
+#ifndef _FILTER_HXX
+#include <svtools/filter.hxx>
+#endif
+#ifndef _COM_SUN_STAR_AWT_GRADIENTSTYLE_HPP_
+#include <com/sun/star/awt/GradientStyle.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_RASTEROPERATION_HPP_
+#include <com/sun/star/awt/RasterOperation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_
+#include <com/sun/star/awt/Gradient.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XGRAPHICS_HPP_
+#include <com/sun/star/awt/XGraphics.hpp>
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
+using namespace ::rtl;
+
+// ---------------------------------------------------------------------------------------------
+
+EscherExClientRecord_Base::~EscherExClientRecord_Base()
+{
+}
+
+EscherExClientAnchor_Base::~EscherExClientAnchor_Base()
+{
+}
+
+// ---------------------------------------------------------------------------------------------
+
+struct EscherPropSortStruct
+{
+ BYTE* pBuf;
+ UINT32 nPropSize;
+ UINT32 nPropValue;
+ UINT16 nPropId;
+};
+
+
+struct ESCHER_GDIStruct
+{
+ Rectangle GDIBoundRect;
+ Size GDISize;
+ UINT32 GDIUncompressedSize;
+};
+
+// ---------------------------------------------------------------------------------------------
+
+EscherPersistTable::EscherPersistTable()
+{
+}
+
+// ---------------------------------------------------------------------------------------------
+
+EscherPersistTable::~EscherPersistTable()
+{
+ for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
+ delete (EscherPersistEntry*)pPtr;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+BOOL EscherPersistTable::PtIsID( UINT32 nID )
+{
+ for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
+ {
+ if ( ((EscherPersistEntry*)pPtr)->mnID == nID )
+ return TRUE;
+ }
+ return FALSE;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherPersistTable::PtInsert( UINT32 nID, UINT32 nOfs )
+{
+ maPersistTable.Insert( new EscherPersistEntry( nID, nOfs ) );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherPersistTable::PtDelete( UINT32 nID )
+{
+ for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
+ {
+ if ( ((EscherPersistEntry*)pPtr)->mnID == nID )
+ {
+ UINT32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset;
+ delete (EscherPersistEntry*) maPersistTable.Remove();
+ }
+ }
+ return 0;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherPersistTable::PtGetOffsetByID( UINT32 nID )
+{
+ for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
+ {
+ if ( ((EscherPersistEntry*)pPtr)->mnID == nID )
+ return ((EscherPersistEntry*)pPtr)->mnOffset;
+ }
+ return 0;
+};
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherPersistTable::PtReplace( UINT32 nID, UINT32 nOfs )
+{
+ for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
+ {
+ if ( ((EscherPersistEntry*)pPtr)->mnID == nID )
+ {
+ UINT32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset;
+ ((EscherPersistEntry*)pPtr)->mnOffset = nOfs;
+ return nRetValue;
+ }
+ }
+ return 0;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherPersistTable::PtReplaceOrInsert( UINT32 nID, UINT32 nOfs )
+{
+ for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
+ {
+ if ( ((EscherPersistEntry*)pPtr)->mnID == nID )
+ {
+ UINT32 nRetValue = ((EscherPersistEntry*)pPtr)->mnOffset;
+ ((EscherPersistEntry*)pPtr)->mnOffset = nOfs;
+ return nRetValue;
+ }
+ }
+ PtInsert( nID, nOfs );
+ return 0;
+}
+
+// ---------------------------------------------------------------------------------------------
+// ---------------------------------------------------------------------------------------------
+// ---------------------------------------------------------------------------------------------
+
+EscherBlibEntry::EscherBlibEntry( SvMemoryStream& rStream, ESCHER_BlibType eBlibType, UINT32 nPictureOffset )
+{
+ UINT32* pPtr = &mnIdentifier[0];
+ UINT32 nLenght, nType, nPos, nCRC, nOldPos = rStream.Tell();
+ mnSizeExtra = 0;
+ mnRefCount = 1;
+ rStream.Seek( STREAM_SEEK_TO_END );
+ mnSize = rStream.Tell();
+ rStream.Seek( STREAM_SEEK_TO_BEGIN );
+ mnPictureOffset = nPictureOffset;
+ meBlibType = eBlibType;
+ if ( eBlibType == PNG ) // Bitmap ID ermitteln, um keine doppelten Grafiken abzuspeichern
+ {
+ rStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+ rStream.SeekRel( 8 );
+ do
+ {
+ rStream >> nLenght >> nType; // wir ermitteln die den Identifier anhand der Checksumme des PNG IDat chunks
+ nPos = rStream.Tell() + nLenght; // naechste chunk position
+ if ( nPos >= mnSize ) // kein IDAT -> break;
+ break;
+ rStream.Seek( nPos );
+ rStream >> nCRC;
+ }
+ while ( nType != 0x49444154 ); // IDAT chunk suchen
+ }
+ else
+ {
+ if ( mnSize > 8 )
+ {
+ rStream.SeekRel( mnSize - 8 );
+ rStream >> nPos >> nCRC; // ( Komprimiertes UINT32 + Checksumme des ZCodec ) ergeben einen Teil der UID
+ nLenght = mnSize;
+ }
+ }
+ *pPtr++ = nCRC; // LitteEndian / BigEndian ist fuer die Checksumme egal
+ *pPtr++ = nLenght;
+ *pPtr++ = nPos;
+ *pPtr = 0;
+ rStream.Seek( nOldPos );
+};
+
+// ---------------------------------------------------------------------------------------------
+
+EscherBlibEntry::~EscherBlibEntry()
+{
+};
+
+// ---------------------------------------------------------------------------------------------
+
+BOOL EscherBlibEntry::operator==( const EscherBlibEntry& rEscherBlibEntry ) const
+{
+ if ( meBlibType != rEscherBlibEntry.meBlibType )
+ return FALSE;
+ for ( int i = 0; i < 3; i++ )
+ {
+ if ( mnIdentifier[ i ] != rEscherBlibEntry.mnIdentifier[ i ] )
+ return FALSE;
+ }
+ return TRUE;
+}
+
+// ---------------------------------------------------------------------------------------------
+// ---------------------------------------------------------------------------------------------
+// ---------------------------------------------------------------------------------------------
+
+EscherEx::EscherEx( SvStream& rOutStrm, UINT32 nDrawings ) :
+ mpOutStrm ( &rOutStrm ),
+ mpPicOutStrm ( NULL ),
+ mpOffsets ( new UINT32[ 32 ] ),
+ mpSizes ( new UINT32[ 32 ] ),
+ mpRecTypes ( new UINT16[ 32 ] ),
+ mnDrawings ( nDrawings ),
+ mnLevel ( 0 ),
+ mbEscherSpgr ( FALSE ),
+ mbEscherDgg ( FALSE ), // TRUE, wenn jemals ein ESCHER_Dgg angelegt wurde, dieser wird dann im Dest. aktualisiert
+ mbEscherDg ( FALSE ),
+ mbOleEmf ( FALSE ),
+ mpSortStruct ( NULL ),
+ mpBlibEntrys ( NULL ),
+ mnBlibBufSize ( 0 ),
+ mnBlibEntrys ( 0 ),
+ mnGroupLevel ( 0 ),
+ mnHellLayerId ( USHRT_MAX )
+{
+ mpSizes[ 0 ] = 0;
+ mnStrmStartOfs = mpOutStrm->Tell();
+ mpImplEscherExSdr = new ImplEscherExSdr( *this );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::Flush( SvStream* pPicStreamMergeBSE /* = NULL */ )
+{
+ if ( mbEscherDgg ) // ESCHER_Dgg anpassen
+ {
+ PtReplaceOrInsert( ESCHER_Persist_CurrentPosition, mpOutStrm->Tell() );
+ if ( ImplSeek( ESCHER_Persist_Dgg ) )
+ {
+ *mpOutStrm << mnCurrentShapeID << (UINT32)( mnFIDCLs + 1 ) << mnTotalShapesDgg << mnDrawings;
+ }
+ if ( mnBlibEntrys )
+ {
+ if ( ImplSeek( ESCHER_Persist_BlibStoreContainer ) ) // ESCHER_BlibStoreContainer schreiben
+ {
+ UINT32 nAddBytes = 44 * mnBlibEntrys;
+ if ( pPicStreamMergeBSE )
+ {
+ for ( UINT32 i = 0; i < mnBlibEntrys; i++ )
+ {
+ nAddBytes += mpBlibEntrys[ i ]->mnSize + mpBlibEntrys[ i ]->mnSizeExtra;
+ }
+ }
+ InsertAtCurrentPos( 8 + nAddBytes, TRUE ); // platz schaffen fuer Blib Container samt seinen Blib Atomen
+ OpenContainer( ESCHER_BstoreContainer, 1 );
+ if ( pPicStreamMergeBSE )
+ {
+ ULONG nOldPos = pPicStreamMergeBSE->Tell();
+ const nBuf = 0x40000; // 256KB buffer
+ BYTE* pBuf = new BYTE[ nBuf ];
+ for ( UINT32 i = 0; i < mnBlibEntrys; i++ )
+ {
+ EscherBlibEntry* pBlibEntry = mpBlibEntrys[ i ];
+ BYTE nBlibType = pBlibEntry->meBlibType;
+ UINT32 nBlipSize = pBlibEntry->mnSize + pBlibEntry->mnSizeExtra;
+ AddAtom( 36 + nBlipSize, ESCHER_BSE, 2, nBlibType );
+ // FBSE
+ *mpOutStrm << nBlibType;
+ switch ( nBlibType )
+ {
+ case EMF :
+ case WMF : // EMF/WMF auf OS2 zu Pict Konvertieren
+ *mpOutStrm << BYTE(PICT);
+ break;
+ default:
+ *mpOutStrm << nBlibType;
+ }
+ mpOutStrm->Write( &pBlibEntry->mnIdentifier[ 0 ], 16 );
+ *mpOutStrm
+ << (UINT16)0
+ << nBlipSize
+ << pBlibEntry->mnRefCount
+ << (UINT32)0 // yes, the offset is always zero
+ << (UINT32)0;
+ // BLIP
+ pPicStreamMergeBSE->Seek( pBlibEntry->mnPictureOffset );
+ UINT16 n16;
+ // record version and instance
+ *pPicStreamMergeBSE >> n16;
+ *mpOutStrm << n16;
+ // record type
+ *pPicStreamMergeBSE >> n16;
+ *mpOutStrm << UINT16( ESCHER_BlipFirst + nBlibType );
+ DBG_ASSERT( n16 == ESCHER_BlipFirst + nBlibType , "EscherEx::Flush: BLIP record types differ" );
+ UINT32 n32;
+ // record size
+ *pPicStreamMergeBSE >> n32;
+ nBlipSize -= 8;
+ *mpOutStrm << nBlipSize;
+ DBG_ASSERT( nBlipSize == n32, "EscherEx::Flush: BLIP sizes differ" );
+ // record
+ while ( nBlipSize )
+ {
+ UINT32 nBytes = ( nBlipSize > nBuf ? nBuf : nBlipSize );
+ pPicStreamMergeBSE->Read( pBuf, nBytes );
+ mpOutStrm->Write( pBuf, nBytes );
+ nBlipSize -= nBytes;
+ }
+ }
+ delete [] pBuf;
+ pPicStreamMergeBSE->Seek( nOldPos );
+ }
+ else
+ {
+ for ( UINT32 i = 0; i < mnBlibEntrys; i++ )
+ {
+ EscherBlibEntry* pBlibEntry = mpBlibEntrys[ i ];
+ BYTE nBlibType = pBlibEntry->meBlibType;
+ AddAtom( 36, ESCHER_BSE, 2, nBlibType );
+ *mpOutStrm << nBlibType;
+ if ( nBlibType == 3 )
+ *mpOutStrm << (BYTE)4; // WMF auf OS2 zu Pict Konvertieren
+ else
+ *mpOutStrm << nBlibType;
+ mpOutStrm->Write( &pBlibEntry->mnIdentifier[ 0 ], 16 );
+ *mpOutStrm
+ << (UINT16)0
+ << UINT32( pBlibEntry->mnSize + pBlibEntry->mnSizeExtra )
+ << pBlibEntry->mnRefCount
+ << pBlibEntry->mnPictureOffset
+ << (UINT32)0;
+ }
+ }
+ CloseContainer(); // ESCHER_BlibStoreContainer
+ }
+ }
+ mpOutStrm->Seek( PtGetOffsetByID( ESCHER_Persist_CurrentPosition ) );
+ }
+}
+
+// ---------------------------------------------------------------------------------------------
+
+EscherEx::~EscherEx()
+{
+ for ( UINT32 i = 0; i < mnBlibEntrys; delete mpBlibEntrys[ i++ ] );
+ delete mpBlibEntrys;
+ delete[] mpSortStruct;
+ delete[] mpRecTypes;
+ delete[] mpSizes;
+ delete[] mpOffsets;
+ delete mpImplEscherExSdr;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::ImplInsertBlib( EscherBlibEntry* pEscherBlibEntry )
+{
+ if ( mnBlibBufSize == mnBlibEntrys )
+ {
+ mnBlibBufSize += 64;
+ EscherBlibEntry** pTemp = new EscherBlibEntry*[ mnBlibBufSize ];
+ for ( UINT32 i = 0; i < mnBlibEntrys; i++ )
+ {
+ pTemp[ i ] = mpBlibEntrys[ i ];
+ }
+ delete mpBlibEntrys;
+ mpBlibEntrys = pTemp;
+ }
+ mpBlibEntrys[ mnBlibEntrys++ ] = pEscherBlibEntry;
+ return mnBlibEntrys;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::ImplGetBlibID( SvMemoryStream& rSource, ESCHER_BlibType eBlibType, const ESCHER_GDIStruct* pGDI )
+{
+ EscherBlibEntry* pEscherBlibEntry = new EscherBlibEntry( rSource, eBlibType, mpPicOutStrm->Tell() );
+ for ( UINT32 i = 0; i < mnBlibEntrys; i++ )
+ {
+ if ( *( mpBlibEntrys[ i ] ) == *pEscherBlibEntry )
+ {
+ mpBlibEntrys[ i ]->mnRefCount++;
+ delete pEscherBlibEntry;
+ return i + 1;
+ }
+ }
+ switch ( eBlibType )
+ {
+ case PNG :
+ {
+ const UINT32 nExtra = 17;
+ pEscherBlibEntry->mnSizeExtra += 8 + nExtra;
+ *mpPicOutStrm << (UINT32)0xf01e6e00 << (UINT32)( pEscherBlibEntry->mnSize + nExtra );
+ mpPicOutStrm->Write( pEscherBlibEntry->mnIdentifier, 16 );
+ *mpPicOutStrm << (BYTE)0xff;
+ mpPicOutStrm->Write( rSource.GetData(), pEscherBlibEntry->mnSize );
+ }
+ break;
+ case WMF :
+ case EMF :
+ {
+ const UINT32 nExtra = (eBlibType == WMF ? 0x42 : 0x32);
+ const UINT32 nHeaderID = (eBlibType == WMF ? 0xf01b2170 : 0xf01a3d40);
+ pEscherBlibEntry->mnSizeExtra += 8 + nExtra;
+ *mpPicOutStrm << nHeaderID << (UINT32)( pEscherBlibEntry->mnSize + nExtra );
+ if ( eBlibType == WMF )
+ mpPicOutStrm->Write( pEscherBlibEntry->mnIdentifier, 16 );
+ mpPicOutStrm->Write( pEscherBlibEntry->mnIdentifier, 16 );
+
+
+ UINT32 nWidth = pGDI->GDIBoundRect.GetWidth() * 360;
+ UINT32 nHeight = pGDI->GDIBoundRect.GetHeight() * 360;
+ double fWidth = (double)pGDI->GDIBoundRect.GetWidth() / 10000.0 * 1027.0;
+ double fHeight = (double)pGDI->GDIBoundRect.GetHeight() / 10000.0 * 1027.0;
+
+ *mpPicOutStrm << (UINT32)( pGDI->GDIUncompressedSize )// WMFSize ohne FileHeader
+ << (INT32)0 // da die Originalgroesse des WMF's (ohne FileHeader)
+ << (INT32)0 // nicht mehr feststellbar ist, schreiben wir 10cm / x
+ << (INT32)fWidth
+ << (INT32)fHeight
+ << nWidth
+ << nHeight
+
+/*
+ double fQuo = (double)pGDI->GDIBoundRect.GetHeight() / pGDI->GDIBoundRect.GetWidth();
+ *mpPicOutStrm << (UINT32)( pGDI->GDIUncompressedSize )// WMFSize ohne FileHeader
+ << (INT32)0 // da die Originalgroesse des WMF's (ohne FileHeader)
+ << (INT32)0 // nicht mehr feststellbar ist, schreiben wir 10cm / x
+ << (INT32)1027
+ << (INT32)( 1027 * fQuo )
+ << (UINT32)0x36ee80
+ << (UINT32)( 0x36ee80 * fQuo )
+*/
+ << (UINT32)( pEscherBlibEntry->mnSize )
+ << (UINT16)0xfe00; // compression Flags
+ mpPicOutStrm->Write( rSource.GetData(), pEscherBlibEntry->mnSize );
+ }
+ break;
+ default:
+ DBG_ERRORFILE( "EscherEx::ImplGetBlibID: BlibType not handled" );
+ }
+ return ImplInsertBlib( pEscherBlibEntry );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::InsertAtCurrentPos( UINT32 nBytes, BOOL bContainer )
+{
+ UINT32 i, nSize, nType, nSource, nBufSize, nToCopy, nCurPos = mpOutStrm->Tell();
+ BYTE* pBuf;
+
+ // Persist table anpassen
+ for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() )
+ {
+ UINT32 nOfs = ((EscherPersistEntry*)pPtr)->mnOffset;
+ if ( nOfs >= nCurPos )
+ ((EscherPersistEntry*)pPtr)->mnOffset += nBytes;
+ }
+
+ // container und atom sizes anpassen
+ mpOutStrm->Seek( mnStrmStartOfs );
+ while ( mpOutStrm->Tell() < nCurPos )
+ {
+ *mpOutStrm >> nType >> nSize;
+ if ( ( mpOutStrm->Tell() + nSize ) >= ( ( bContainer ) ? nCurPos + 1 : nCurPos ) )
+ {
+ mpOutStrm->SeekRel( -4 );
+ *mpOutStrm << (UINT32)( nSize + nBytes );
+ if ( ( nType & 0xf ) != 0xf )
+ mpOutStrm->SeekRel( nSize );
+ }
+ else
+ mpOutStrm->SeekRel( nSize );
+ }
+
+ // Container Offsets verschieben
+ for ( i = 1; i <= (UINT32)mnLevel; i++ )
+ {
+ if ( mpOffsets[ i ] > nCurPos )
+ mpOffsets[ i ] += nBytes;
+ }
+ mpOutStrm->Seek( STREAM_SEEK_TO_END );
+ nSource = mpOutStrm->Tell();
+ nToCopy = nSource - nCurPos; // Stream um nBytes vergroessern
+ pBuf = new BYTE[ 0x40000 ]; // 256KB Buffer
+ while ( nToCopy )
+ {
+ nBufSize = ( nToCopy >= 0x40000 ) ? 0x40000 : nToCopy;
+ nToCopy -= nBufSize;
+ nSource -= nBufSize;
+ mpOutStrm->Seek( nSource );
+ mpOutStrm->Read( pBuf, nBufSize );
+ mpOutStrm->Seek( nSource + nBytes );
+ mpOutStrm->Write( pBuf, nBufSize );
+ }
+ delete pBuf;
+ mpOutStrm->Seek( nCurPos );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+BOOL EscherEx::SeekBehindRecHeader( UINT16 nRecType )
+{
+ UINT32 nOldPos, nStreamEnd, nType, nSize;
+
+ nOldPos = mpOutStrm->Tell();
+ nStreamEnd = mpOutStrm->Seek( STREAM_SEEK_TO_END );
+ mpOutStrm->Seek( nOldPos );
+ while ( mpOutStrm->Tell() < nStreamEnd )
+ {
+ *mpOutStrm >> nType >> nSize;
+ if ( ( nType >> 16 ) == nRecType )
+ return TRUE;
+ if ( ( nType & 0xf ) != 0xf )
+ mpOutStrm->SeekRel( nSize );
+ }
+ mpOutStrm->Seek( nOldPos );
+ return FALSE;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::InsertPersistOffset( UINT32 nKey, UINT32 nOffset )
+{
+ PtInsert( ESCHER_Persist_PrivateEntry | nKey, nOffset );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+BOOL EscherEx::ImplSeek( UINT32 nKey )
+{
+ UINT32 nPos = PtGetOffsetByID( nKey );
+ if ( nPos )
+ mpOutStrm->Seek( nPos );
+ else
+ {
+ if (! PtIsID( nKey ) )
+ return FALSE;
+ mpOutStrm->Seek( 0 );
+ }
+ return TRUE;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+BOOL EscherEx::SeekToPersistOffset( UINT32 nKey )
+{
+ return ImplSeek( ESCHER_Persist_PrivateEntry | nKey );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+BOOL EscherEx::InsertAtPersistOffset( UINT32 nKey, UINT32 nValue )
+{
+ UINT32 nOldPos = mpOutStrm->Tell();
+ BOOL bRetValue = SeekToPersistOffset( nKey );
+ if ( bRetValue )
+ {
+ *mpOutStrm << nValue;
+ mpOutStrm->Seek( nOldPos );
+ }
+ return bRetValue;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::OpenContainer( UINT16 nEscherContainer, int nRecInstance )
+{
+ if ( mnLevel == 0 )
+ mpSizes[ 0 ] = 0;
+
+ mpSizes[ mnLevel++ ] += 8;
+ *mpOutStrm << (UINT16)( ( nRecInstance << 4 ) | 0xf ) << nEscherContainer << (UINT32)0;
+ mpOffsets[ mnLevel ] = mpOutStrm->Tell() - 4;
+ mpSizes[ mnLevel ] = 0;
+ mpRecTypes[ mnLevel ] = nEscherContainer;
+
+ switch( nEscherContainer )
+ {
+ case ESCHER_DggContainer :
+ {
+ mbEscherDgg = TRUE;
+ mnFIDCLs = mnDrawings;
+ mnCurrentDg = 0;
+ mnCurrentShapeID = 0;
+ mnTotalShapesDgg = 0;
+ mnCurrentShapeMaximumID = 0;
+ AddAtom( 16 + ( mnDrawings << 3 ), ESCHER_Dgg ); // an FDGG and several FIDCLs
+ PtReplaceOrInsert( ESCHER_Persist_Dgg, mpOutStrm->Tell() );
+ *mpOutStrm << (UINT32)0 // the current maximum shape ID
+ << (UINT32)0 // the number of ID clusters + 1
+ << (UINT32)0 // the number of total shapes saved
+ << (UINT32)0; // the total number of drawings saved
+ PtReplaceOrInsert( ESCHER_Persist_Dgg_FIDCL, mpOutStrm->Tell() );
+ for ( UINT32 i = 0; i < mnFIDCLs; i++ ) // Dummy FIDCLs einfuegen
+ {
+ *mpOutStrm << (UINT32)0 << (UINT32)0; // Drawing Nummer, Anzahl der Shapes in diesem IDCL
+ }
+ PtReplaceOrInsert( ESCHER_Persist_BlibStoreContainer, mpOutStrm->Tell() );
+ }
+ break;
+
+ case ESCHER_DgContainer :
+ {
+ if ( mbEscherDgg )
+ {
+ if ( !mbEscherDg )
+ {
+ mbEscherDg = TRUE;
+ mnCurrentDg++;
+ mnTotalShapesDg = 0;
+ mnTotalShapeIdUsedDg = 0;
+ mnCurrentShapeID = ( mnCurrentShapeMaximumID &~0x3ff ) + 0x400; // eine neue Seite bekommt immer eine neue ShapeId die ein vielfaches von 1024 ist,
+ // damit ist erste aktuelle Shape ID 0x400
+ AddAtom( 8, ESCHER_Dg, 0, mnCurrentDg );
+ PtReplaceOrInsert( ESCHER_Persist_Dg | mnCurrentDg, mpOutStrm->Tell() );
+ *mpOutStrm << (UINT32)0 // The number of shapes in this drawing
+ << (UINT32)0; // The last MSOSPID given to an SP in this DG
+ }
+ }
+ }
+ break;
+
+ case ESCHER_SpgrContainer :
+ {
+ if ( mbEscherDg )
+ {
+ mbEscherSpgr = TRUE;
+ }
+ }
+ break;
+
+ case ESCHER_SpContainer :
+ {
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::CloseContainer()
+{
+ UINT32 nOldPos = mpOutStrm->Tell();
+ mpOutStrm->Seek( mpOffsets[ mnLevel ] );
+ UINT32 nSize = mpSizes[ mnLevel ];
+ *mpOutStrm << nSize;
+ switch( mpRecTypes[ mnLevel ] )
+ {
+ case ESCHER_DgContainer :
+ {
+ if ( mbEscherDg )
+ {
+ mbEscherDg = FALSE;
+ if ( ImplSeek( ESCHER_Persist_Dg | mnCurrentDg ) )
+ {
+ // shapeanzahl des drawings setzen
+ mnTotalShapesDgg += mnTotalShapesDg;
+ *mpOutStrm << mnTotalShapesDg << mnCurrentShapeMaximumID;
+ if ( ImplSeek( ESCHER_Persist_Dgg_FIDCL ) )
+ {
+ if ( mnTotalShapesDg == 0 )
+ {
+ mpOutStrm->SeekRel( 8 );
+ }
+ else
+ {
+ if ( mnTotalShapeIdUsedDg )
+ {
+ // die benutzten Shape Ids des drawings in die fidcls setzen
+ UINT32 i, nFIDCL = ( ( mnTotalShapeIdUsedDg - 1 ) / 0x400 );
+ if ( nFIDCL )
+ {
+ if ( nOldPos > mpOutStrm->Tell() )
+ nOldPos += ( nFIDCL << 3 );
+
+ mnFIDCLs += nFIDCL;
+ InsertAtCurrentPos( nFIDCL << 3 ); // platz schaffen fuer weitere FIDCL's
+ }
+ for ( i = 0; i <= nFIDCL; i++ )
+ {
+ *mpOutStrm << mnCurrentDg;
+ if ( i < nFIDCL )
+ *mpOutStrm << (UINT32)0x400;
+ else
+ {
+ UINT32 nShapesLeft = mnTotalShapeIdUsedDg % 0x400;
+ if ( !nShapesLeft )
+ nShapesLeft = 0x400;
+ *mpOutStrm << (UINT32)nShapesLeft;
+ }
+ }
+ }
+ }
+ PtReplaceOrInsert( ESCHER_Persist_Dgg_FIDCL, mpOutStrm->Tell() ); // neuen FIDCL Offset fuer naechste Seite
+ }
+ }
+ }
+ }
+ break;
+
+ case ESCHER_SpgrContainer :
+ {
+ if ( mbEscherSpgr )
+ {
+ mbEscherSpgr = FALSE;
+
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ mpSizes[ --mnLevel ] += nSize;
+ mpOutStrm->Seek( nOldPos );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::BeginAtom()
+{
+ mnCountOfs = mpOutStrm->Tell();
+ *mpOutStrm << (UINT32)0 << (UINT32)0; // record header wird spaeter geschrieben
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::EndAtom( UINT16 nRecType, int nRecVersion, int nRecInstance )
+{
+ UINT32 nOldPos = mpOutStrm->Tell();
+ mpOutStrm->Seek( mnCountOfs );
+ mnCountSize = nOldPos - mnCountOfs;
+ mpSizes[ mnLevel ] += mnCountSize;
+ *mpOutStrm << (UINT16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) << nRecType << (UINT32)( mnCountSize - 8 );
+ mpOutStrm->Seek( nOldPos );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::AddAtom( UINT32 nAtomSize, UINT16 nRecType, int nRecVersion, int nRecInstance )
+{
+ mpSizes[ mnLevel ] += nAtomSize + 8;
+ *mpOutStrm << (UINT16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) << nRecType << nAtomSize;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::AddClientAnchor( const Rectangle& rRect )
+{
+ AddAtom( 8, ESCHER_ClientAnchor );
+ *mpOutStrm << (INT16)rRect.Top() << (INT16)rRect.Left() << (INT16)rRect.Right() << (INT16)rRect.Bottom();
+}
+
+// ---------------------------------------------------------------------------------------------
+
+EscherExHostAppData* EscherEx::EnterAdditionalTextGroup()
+{
+ return NULL;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::EnterGroup( const Rectangle* pBoundRect )
+{
+ Rectangle aRect;
+ if( pBoundRect )
+ aRect = *pBoundRect;
+
+ OpenContainer( ESCHER_SpgrContainer );
+ OpenContainer( ESCHER_SpContainer );
+ AddAtom( 16, ESCHER_Spgr, 1 );
+ PtReplaceOrInsert( ESCHER_Persist_Grouping_Snap | mnGroupLevel,
+ mpOutStrm->Tell() );
+ *mpOutStrm << (INT32)aRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden
+ << (INT32)aRect.Top()
+ << (INT32)aRect.Right()
+ << (INT32)aRect.Bottom();
+
+ UINT32 nShapeId = GetShapeID();
+ if ( !mnGroupLevel )
+ {
+ AddShape( ESCHER_ShpInst_Min, 5, nShapeId ); // Flags: Group | Patriarch
+ CloseContainer(); // ESCHER_SpContainer
+ }
+ else
+ {
+ AddShape( ESCHER_ShpInst_Min, 0x201, nShapeId ); // Flags: Group | HaveAnchor
+
+#if EES_WRITE_EPP
+ AddAtom( 8, ESCHER_ClientAnchor );
+ PtReplaceOrInsert( ESCHER_Persist_Grouping_Logic | mnGroupLevel,
+ mpOutStrm->Tell() );
+ *mpOutStrm << (INT16)aRect.Top() << (INT16)aRect.Left()
+ << (INT16)aRect.Right() << (INT16)aRect.Bottom();
+#else // !EES_WRITE_EPP
+ BeginCount();
+ AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x00040004 );
+ EndCount( ESCHER_OPT, 3 );
+ if ( mnGroupLevel > 1 )
+ {
+ AddAtom( 16, ESCHER_ChildAnchor );
+ *mpOutStrm << (INT32)aRect.Left()
+ << (INT32)aRect.Top()
+ << (INT32)aRect.Right()
+ << (INT32)aRect.Bottom();
+ }
+ EscherExHostAppData* pAppData = mpImplEscherExSdr->ImplGetHostData();
+ if( pAppData )
+ {
+ if ( mnGroupLevel <= 1 )
+ pAppData->WriteClientAnchor( *this, aRect );
+ pAppData->WriteClientData( *this );
+ }
+#endif // EES_WRITE_EPP
+
+ CloseContainer(); // ESCHER_SpContainer
+ }
+ mnGroupLevel++;
+ return nShapeId;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+BOOL EscherEx::SetGroupSnapRect( UINT32 nGroupLevel, const Rectangle& rRect )
+{
+ BOOL bRetValue = FALSE;
+ if ( nGroupLevel )
+ {
+ UINT32 nCurrentPos = mpOutStrm->Tell();
+ if ( ImplSeek( ESCHER_Persist_Grouping_Snap | ( nGroupLevel - 1 ) ) )
+ {
+ *mpOutStrm << (INT32)rRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden
+ << (INT32)rRect.Top()
+ << (INT32)rRect.Right()
+ << (INT32)rRect.Bottom();
+ mpOutStrm->Seek( nCurrentPos );
+ }
+ }
+ return bRetValue;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+BOOL EscherEx::SetGroupLogicRect( UINT32 nGroupLevel, const Rectangle& rRect )
+{
+ BOOL bRetValue = FALSE;
+ if ( nGroupLevel )
+ {
+ UINT32 nCurrentPos = mpOutStrm->Tell();
+ if ( ImplSeek( ESCHER_Persist_Grouping_Logic | ( nGroupLevel - 1 ) ) )
+ {
+ *mpOutStrm << (INT16)rRect.Top() << (INT16)rRect.Left() << (INT16)rRect.Right() << (INT16)rRect.Bottom();
+ mpOutStrm->Seek( nCurrentPos );
+ }
+ }
+ return bRetValue;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::LeaveGroup()
+{
+ --mnGroupLevel;
+ PtDelete( ESCHER_Persist_Grouping_Snap | mnGroupLevel );
+ PtDelete( ESCHER_Persist_Grouping_Logic | mnGroupLevel );
+ CloseContainer();
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::AddShape( UINT32 nShpInstance, UINT32 nFlags, UINT32 nShapeID )
+{
+ AddAtom( 8, ESCHER_Sp, 2, nShpInstance );
+
+ if ( !nShapeID )
+ nShapeID = GetShapeID();
+
+ if ( nFlags ^ 1 ) // is this a group shape ?
+ { // if not
+ if ( mnGroupLevel > 1 )
+ nFlags |= 2; // this not a topmost shape
+ }
+ *mpOutStrm << nShapeID << nFlags;
+
+ if ( mbEscherSpgr )
+ mnTotalShapesDg++;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::GetShapeID()
+{
+ mnCurrentShapeMaximumID = mnCurrentShapeID; // maximum setzen
+ mnCurrentShapeID++; // mnCurrentShape ID auf nachste freie ID
+ mnTotalShapeIdUsedDg++;
+ return mnCurrentShapeMaximumID;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+extern "C" int __LOADONCALLAPI EscherPropSortFunc( const void* p1, const void* p2 )
+{
+ INT16 nID1 = ((EscherPropSortStruct*)p1)->nPropId &~0xc000;
+ INT16 nID2 = ((EscherPropSortStruct*)p2)->nPropId &~0xc000;
+
+ if( nID1 < nID2 )
+ return -1;
+ else if( nID1 > nID2 )
+ return 1;
+ else
+ return 0;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::BeginCount()
+{
+ mnCountOfs = mpOutStrm->Tell();
+ *mpOutStrm << (UINT32)0 << (UINT32)0; // record header wird spaeter geschrieben
+ mnSortCount = 0; // normale Properties werden automatisch sortiert
+ mnCountCount = 0;
+ mnCountSize = 8;
+
+ if ( !mpSortStruct )
+ mpSortStruct = new EscherPropSortStruct[ mnSortBufSize = 64 ];
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::AddOpt( UINT16 nPropID, UINT32 nPropValue, BOOL bBlib )
+{
+ AddOpt( nPropID, bBlib, nPropValue, NULL, 0 );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::AddOpt( UINT16 nPropID, BOOL bBlib, UINT32 nPropValue, BYTE* pProp, UINT32 nPropSize )
+{
+ if ( bBlib ) // bBlib is only valid when fComplex = 0
+ nPropID |= 0x4000;
+ if ( pProp )
+ nPropID |= 0x8000; // fComplex = TRUE;
+
+ UINT32 i;
+ for( i = 0; i < mnSortCount; i++ )
+ {
+ if ( ( mpSortStruct[ i ].nPropId &~0xc000 ) == ( nPropID &~0xc000 ) ) // pruefen, ob Property nur ersetzt wird
+ {
+ mpSortStruct[ i ].nPropId = nPropID;
+ if ( mpSortStruct[ i ].pBuf )
+ {
+ mnCountSize -= mpSortStruct[ i ].nPropSize;
+ delete mpSortStruct[ i ].pBuf;
+ }
+ mpSortStruct[ i ].pBuf = pProp;
+ mpSortStruct[ i ].nPropSize = nPropSize;
+ mpSortStruct[ i ].nPropValue = nPropValue;
+ if ( pProp )
+ mnCountSize += nPropSize;
+ return;
+ }
+ }
+ mnCountCount++;
+ mnCountSize += 6;
+ if ( mnSortCount == mnSortBufSize ) // buffer vergroessern
+ {
+ mnSortBufSize <<= 1;
+ EscherPropSortStruct* pTemp = new EscherPropSortStruct[ mnSortBufSize ];
+ for( i = 0; i < mnSortCount; i++ )
+ {
+ pTemp[ i ] = mpSortStruct[ i ];
+ }
+ delete mpSortStruct;
+ mpSortStruct = pTemp;
+ }
+ mpSortStruct[ mnSortCount ].nPropId = nPropID; // property einfuegen
+ mpSortStruct[ mnSortCount ].pBuf = pProp;
+ mpSortStruct[ mnSortCount ].nPropSize = nPropSize;
+ mpSortStruct[ mnSortCount++ ].nPropValue = nPropValue;
+
+ if ( pProp )
+ mnCountSize += nPropSize;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::AddColor( UINT32 nColor )
+{
+ mnCountCount++;
+ mnCountSize += 4;
+ *mpOutStrm << nColor;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::EndCount( UINT16 nRecType, UINT16 nRecVersion )
+{
+ UINT32 nOldPos = mpOutStrm->Tell();
+ mpOutStrm->Seek( mnCountOfs );
+ mpSizes[ mnLevel ] += mnCountSize;
+ *mpOutStrm << (UINT16)( ( mnCountCount << 4 ) | ( nRecVersion & 0xf ) ) << (UINT16)nRecType << (UINT32)( mnCountSize - 8 );
+ mpOutStrm->Seek( nOldPos );
+ if ( mnSortCount )
+ {
+ qsort( mpSortStruct, mnSortCount, sizeof( EscherPropSortStruct ), EscherPropSortFunc );
+ BOOL bComplex = FALSE;
+ UINT32 i;
+ for ( i = 0; i < mnSortCount; i++ )
+ {
+ *mpOutStrm << (UINT16)mpSortStruct[ i ].nPropId
+ << (UINT32)mpSortStruct[ i ].nPropValue;
+ if ( mpSortStruct[ i ].pBuf )
+ bComplex = TRUE;
+ }
+ if ( bComplex )
+ {
+ for ( i = 0; i < mnSortCount; i++ )
+ {
+ if ( mpSortStruct[ i ].pBuf )
+ {
+ mpOutStrm->Write( mpSortStruct[ i ].pBuf, mpSortStruct[ i ].nPropSize );
+ delete mpSortStruct[ i ].pBuf;
+ }
+ }
+ }
+ mnSortCount = 0;
+ }
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::GetColor( const UINT32 nSOColor, BOOL bSwap )
+{
+ if ( bSwap )
+ {
+ UINT32 nColor = nSOColor & 0xff00; // GRUEN
+ nColor |= (BYTE)( nSOColor ) << 16; // ROT
+ nColor |= (BYTE)( nSOColor >> 16 ); // BLAU
+ return nColor;
+ }
+ else
+ return nSOColor & 0xffffff;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::GetColor( const Color& rSOColor, BOOL bSwap )
+{
+ UINT32 nColor = ( rSOColor.GetRed() << 16 );
+ nColor |= ( rSOColor.GetGreen() << 8 );
+ nColor |= rSOColor.GetBlue();
+
+ if ( !bSwap )
+ nColor = GetColor( nColor, TRUE );
+
+ return nColor;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::GetGradientColor( const awt::Gradient* pVCLGradient, UINT32 nStartColor )
+{
+ UINT32 nIntensity;
+ Color aColor;
+ if ( nStartColor & 1 )
+ {
+ nIntensity = pVCLGradient->StartIntensity;
+ aColor = pVCLGradient->StartColor;
+ }
+ else
+ {
+ nIntensity = pVCLGradient->EndIntensity;
+ aColor = pVCLGradient->EndColor;
+ }
+ UINT32 nRed = ( ( aColor.GetRed() * nIntensity ) / 100 );
+ UINT32 nGreen = ( ( aColor.GetGreen() * nIntensity ) / 100 ) << 8;
+ UINT32 nBlue = ( ( aColor.GetBlue() * nIntensity ) / 100 ) << 16;
+ return nRed | nGreen | nBlue;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::WriteGradient( const awt::Gradient* pVCLGradient )
+{
+ UINT32 nFillFocus = 0x64;
+ UINT32 nFirstColor = 0;
+
+
+ switch ( pVCLGradient->Style )
+ {
+ default:
+ case GradientStyle_LINEAR :
+ {
+ }
+ break;
+ case GradientStyle_AXIAL :
+ {
+ nFillFocus = 0x32;
+ nFirstColor = 1;
+ }
+ break;
+ case GradientStyle_RADIAL :
+ {
+ }
+ break;
+ case GradientStyle_ELLIPTICAL :
+ {
+ }
+ break;
+ case GradientStyle_SQUARE :
+ {
+ }
+ break;
+ case GradientStyle_RECT :
+ {
+ }
+ break;
+ }
+ AddOpt( ESCHER_Prop_fillType, ESCHER_FillShadeScale );
+ AddOpt( ESCHER_Prop_fillAngle, ( ( -3600 + pVCLGradient->Angle ) << 16 ) / 10 );
+ AddOpt( ESCHER_Prop_fillColor, GetGradientColor( pVCLGradient, nFirstColor ) );
+ AddOpt( ESCHER_Prop_fillBackColor, GetGradientColor( pVCLGradient, nFirstColor ^ 1 ) );
+ AddOpt( ESCHER_Prop_fillFocus, nFillFocus );
+};
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::AddGraphic( SvStream& rStrm, const Graphic& rGraphic )
+{
+ mpPicOutStrm = &rStrm;
+ UINT32 nId = 0;
+ switch( rGraphic.GetType() )
+ {
+ case GRAPHIC_BITMAP:
+ {
+ SvMemoryStream aDestStrm;
+ if( ERRCODE_NONE == GraphicConverter::Export( aDestStrm,
+ rGraphic, CVT_PNG ) )
+ nId = ImplGetBlibID( aDestStrm, PNG );
+ }
+ break;
+
+ case GRAPHIC_GDIMETAFILE:
+ {
+ SvMemoryStream aGrfStrm;
+ WriteWindowMetafile( aGrfStrm, rGraphic.GetGDIMetaFile() );
+ const BYTE* pMem = (BYTE*)aGrfStrm.GetData();
+ UINT32 nLen = aGrfStrm.GetSize();
+
+ const MapMode aMap100mm( MAP_100TH_MM );
+ Size aSize( rGraphic.GetPrefSize() );
+ if( MAP_PIXEL == rGraphic.GetPrefMapMode().GetMapUnit() )
+ aSize = Application::GetDefaultDevice()->PixelToLogic( aSize,
+ aMap100mm );
+ else
+ aSize = OutputDevice::LogicToLogic( aSize,
+ rGraphic.GetPrefMapMode(), aMap100mm );
+
+ Rectangle aRect( Point(0,0), aSize );
+
+ nId = AddWMF( *mpPicOutStrm, pMem + 22, nLen - 22, aRect );
+ }
+ break;
+ }
+ return nId;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::ImplAddMetafile( SvStream& rStrm, const BYTE* pSource,
+ UINT32 nSize, const Rectangle& rRect, ESCHER_BlibType eType )
+{
+ ESCHER_GDIStruct aGDIStruct;
+ aGDIStruct.GDIBoundRect = rRect;
+ aGDIStruct.GDISize = rRect.GetSize();
+ aGDIStruct.GDIUncompressedSize = nSize;
+ mpPicOutStrm = &rStrm;
+ ZCodec aZCodec( 0x8000, 0x8000 );
+ aZCodec.BeginCompression();
+ SvMemoryStream aDestStrm;
+ aZCodec.Write( aDestStrm, pSource, nSize );
+ aZCodec.EndCompression();
+ return ImplGetBlibID( aDestStrm, eType, &aGDIStruct );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::AddWMF( SvStream& rStrm, const BYTE* pSource, UINT32 nSize, const Rectangle& rRect )
+{
+ return ImplAddMetafile( rStrm, pSource, nSize, rRect, WMF );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 EscherEx::AddEMF( SvStream& rStrm, const BYTE* pSource, UINT32 nSize, const Rectangle& rRect )
+{
+ return ImplAddMetafile( rStrm, pSource, nSize, rRect, EMF );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void EscherEx::SetNewBlipStreamOffset( INT32 nOffset )
+{
+ for( UINT32 i = 0; i < mnBlibEntrys; i++ )
+ {
+ EscherBlibEntry* pBlibEntry = mpBlibEntrys[ i ];
+ pBlibEntry->mnPictureOffset += nOffset;
+ }
+}
+
+
diff --git a/svx/source/msfilter/eschesdo.cxx b/svx/source/msfilter/eschesdo.cxx
new file mode 100644
index 0000000000..dd851cb32b
--- /dev/null
+++ b/svx/source/msfilter/eschesdo.cxx
@@ -0,0 +1,2635 @@
+/*************************************************************************
+ *
+ * $RCSfile: eschesdo.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 <math.h>
+
+#ifndef _ESCHESDO_HXX
+#include "eschesdo.hxx"
+#endif
+#ifndef _SVX_ESCHEREX_HXX
+#include "escherex.hxx"
+#endif
+
+#ifndef _SVDOBJ_HXX //autogen wg. SdrObject
+#include "svdobj.hxx"
+#endif
+
+#ifndef _SVX_UNOSHAPE_HXX //autogen wg. SvxShape
+#include "unoshape.hxx"
+#endif
+
+#ifndef _SV_OUTDEV_HXX //autogen wg. OutputDevice
+#include <vcl/outdev.hxx>
+#endif
+#ifndef _SV_POLY_HXX //autogen wg. PolyFlags
+#include <vcl/poly.hxx>
+#endif
+#ifndef _SV_BITMAPEX_HXX //autogen wg. BitmapEx
+#include <vcl/bitmapex.hxx>
+#endif
+#ifndef _SV_GRAPH_HXX //autogen wg. Graphic
+#include <vcl/graph.hxx>
+#endif
+#ifndef _TOOLS_DEBUG_HXX //autogen wg. DBG_ASSERT
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _SVX_FMDPAGE_HXX //autogen wg. SvxFmDrawPage
+#include <fmdpage.hxx>
+#endif
+
+#ifndef _TOOLKIT_UNOHLP_HXX //autogen wg. VCLXBitmap
+#include <toolkit/unohlp.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_VERTICALALIGNMENT_HPP_
+#include <com/sun/star/style/VerticalAlignment.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_
+#include <com/sun/star/awt/Gradient.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequence.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCESEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONBEZIERCOORDS_HPP_
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_FLAGSEQUENCE_HPP_
+#include <com/sun/star/drawing/FlagSequence.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_TEXTADJUST_HPP_
+#include <com/sun/star/drawing/TextAdjust.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_LINEDASH_HPP_
+#include <com/sun/star/drawing/LineDash.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_
+#include <com/sun/star/text/XText.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_CIRCLEKIND_HPP_
+#include <com/sun/star/drawing/CircleKind.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_CONNECTORTYPE_HPP_
+#include <com/sun/star/drawing/ConnectorType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_FILLSTYLE_HPP_
+#include <com/sun/star/drawing/FillStyle.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATOR_HPP_
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#endif
+
+#include <cppuhelper/extract.hxx>
+
+#ifndef _XCEPTION_HXX_ //autogen wg. TRY
+#include <vos/xception.hxx>
+#endif
+
+#ifndef _FLTCALL_HXX
+#include <svtools/fltcall.hxx>
+#endif
+#ifndef _SV_CVTGRF_HXX
+#include <vcl/cvtgrf.hxx>
+#endif
+
+using namespace ::vos;
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::task;
+using namespace ::com::sun::star::style;
+
+BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
+ PFilterCallback pCallback, void * pCallerData );
+
+#define EES_MAP_FRACTION 1440 // 1440 dpi
+
+#define ANY_FLAGS_LINE 0x01
+#define ANY_FLAGS_POLYLINE 0x02
+#define ANY_FLAGS_POLYPOLYGON 0x04
+
+// we don't write any PowerPoint specific data, implementations left out,
+// for example all the text stuff
+#define EES_WRITE_EPP 0
+
+// PowerPoint TextStyles
+#define EPP_TEXTSTYLE_NORMAL 0x00000001
+#define EPP_TEXTSTYLE_TITLE 0x00000010
+#define EPP_TEXTSTYLE_BODY 0x00000100
+#define EPP_TEXTSTYLE_TEXT 0x00001000
+
+// PowerPoint PLACEHOLDER_ID
+#define EPP_PLACEHOLDER_NONE 0 /* 0 None */
+#define EPP_PLACEHOLDER_MASTERTITLE 1 /* 1 Master title */
+#define EPP_PLACEHOLDER_MASTERBODY 2 /* 2 Master body */
+#define EPP_PLACEHOLDER_MASTERCENTEREDTITLE 3 /* 3 Master centered title */
+#define EPP_PLACEHOLDER_MASTERNOTESSLIDEIMAGE 4 /* 4 Master notes slide image */
+#define EPP_PLACEHOLDER_MASTERNOTESBODYIMAGE 5 /* 5 Master notes body image */
+#define EPP_PLACEHOLDER_MASTERDATE 6 /* 6 Master date */
+#define EPP_PLACEHOLDER_MASTERSLIDENUMBER 7 /* 7 Master slide number */
+#define EPP_PLACEHOLDER_MASTERFOOTER 8 /* 8 Master footer */
+#define EPP_PLACEHOLDER_MASTERHEADER 9 /* 9 Master header */
+#define EPP_PLACEHOLDER_MASTERSUBTITLE 10 /* 10 Master subtitle */
+#define EPP_PLACEHOLDER_GENERICTEXTOBJECT 11 /* 11 Generic text object */
+#define EPP_PLACEHOLDER_TITLE 13 /* 12 Title */
+#define EPP_PLACEHOLDER_BODY 14 /* 13 Body */
+//#define EPP_PLACEHOLDER_NOTESBODY 14 /* 14 Notes body */
+#define EPP_PLACEHOLDER_CENTEREDTITLE 15 /* 15 Centered title */
+#define EPP_PLACEHOLDER_SUBTITLE 16 /* 16 Subtitle */
+#define EPP_PLACEHOLDER_VERTICALTEXTTITLE 17 /* 17 Vertical text title */
+#define EPP_PLACEHOLDER_VERTICALTEXTBODY 18 /* 18 Vertical text body */
+#define EPP_PLACEHOLDER_NOTESSLIDEIMAGE 19 /* 19 Notes slide image */
+#define EPP_PLACEHOLDER_OBJECT 20 /* 20 Object (no matter the size) */
+#define EPP_PLACEHOLDER_GRAPH 21 /* 21 Graph */
+#define EPP_PLACEHOLDER_TABLE 22 /* 22 Table */
+#define EPP_PLACEHOLDER_CLIPART 23 /* 23 Clip Art */
+#define EPP_PLACEHOLDER_ORGANISZATIONCHART 24 /* 24 Organization Chart */
+#define EPP_PLACEHOLDER_MEDIACLIP 25 /* 25 Media Clip */
+
+
+// ===================================================================
+
+// ---------------------------------------------------------------------------------------------
+// bei Rechtecken bei Ellipsen bei Polygonen
+//
+// nRule = 0 ->Top 0 ->Top nRule = Index auf ein (Poly)Polygon Punkt
+// 1 ->Left 2 ->Left
+// 2 ->Bottom 4 ->Bottom
+// 3 ->Right 6 ->Right
+
+UINT32 ImplEESdrConnectorListEntry::GetConnectorRule( BOOL bFirst )
+{
+ UINT32 nRule = 0;
+
+ Point aRefPoint( ( bFirst ) ? maPointA : maPointB );
+ Reference< XShape > aXShape( ( bFirst ) ? mXConnectToA : mXConnectToB );
+
+ String aType( aXShape->getShapeType() );
+ aType.Erase( 0, 12 ); // "stardiv.one.drawing." entfernen
+ xub_StrLen nPos = aType.SearchAscii( "Shape" );
+ aType.Erase( nPos, 5 );
+
+ if( aType.EqualsAscii( "drawing.PolyPolygon" ) ||
+ aType.EqualsAscii( "drawing.PolyLine" ) )
+ {
+ Reference< XPropertySet > aPropertySet( aXShape, uno::UNO_QUERY );
+ if ( aPropertySet.is() )
+ {
+ try
+ {
+ Any aAny( aPropertySet->getPropertyValue( rtl::OUString::createFromAscii("PolyPolygon") ) );
+ if ( aAny.getValue() )
+ {
+ PointSequenceSequence* pSourcePolyPolygon = (PointSequenceSequence*)aAny.getValue();
+ INT32 nOuterSequenceCount = pSourcePolyPolygon->getLength();
+ PointSequence* pOuterSequence = pSourcePolyPolygon->getArray();
+
+ if ( pOuterSequence )
+ {
+ INT32 a, b, nIndex = 0;
+ UINT32 nDistance = 0xffffffff;
+ for( a = 0; a < nOuterSequenceCount; a++ )
+ {
+ PointSequence* pInnerSequence = pOuterSequence++;
+ if ( pInnerSequence )
+ {
+ awt::Point* pArray = pInnerSequence->getArray();
+ if ( pArray )
+ {
+ for ( b = 0; b < pInnerSequence->getLength(); b++, nIndex++, pArray++ )
+ {
+ UINT32 nDist = (UINT32)hypot( aRefPoint.X() - pArray->X, aRefPoint.Y() - pArray->Y );
+ if ( nDist < nDistance )
+ {
+ nRule = nIndex;
+ nDistance = nDist;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch(...)
+ {
+ }
+ }
+ }
+ else if ( aType.EqualsAscii( "drawing.OpenBezier" ) ||
+ aType.EqualsAscii( "drawing.OpenFreeHand" ) ||
+ aType.EqualsAscii( "drawing.PolyLinePath" ) ||
+ aType.EqualsAscii( "drawing.ClosedBezier" ) ||
+ aType.EqualsAscii("drawing.ClosedFreeHand" ) ||
+ aType.EqualsAscii("drawing.PolyPolygonPath" ) )
+ {
+ Reference< XPropertySet > aPropertySet( aXShape, uno::UNO_QUERY );
+ if( aPropertySet.is() )
+ {
+ try
+ {
+ Any aAny( aPropertySet->getPropertyValue( rtl::OUString::createFromAscii("PolyPolygonBezier") ) );
+ if ( aAny.getValue() )
+ {
+ PolyPolygonBezierCoords* pSourcePolyPolygon = (PolyPolygonBezierCoords*)aAny.getValue();
+ INT32 nOuterSequenceCount = pSourcePolyPolygon->Coordinates.getLength();
+
+ // Zeiger auf innere sequences holen
+ PointSequence* pOuterSequence = pSourcePolyPolygon->Coordinates.getArray();
+ FlagSequence* pOuterFlags = pSourcePolyPolygon->Flags.getArray();
+
+ if ( pOuterSequence && pOuterFlags )
+ {
+ INT32 a, b, nIndex = 0;
+ UINT32 nDistance = 0xffffffff;
+
+ for ( a = 0; a < nOuterSequenceCount; a++ )
+ {
+ PointSequence* pInnerSequence = pOuterSequence++;
+ FlagSequence* pInnerFlags = pOuterFlags++;
+ if ( pInnerSequence && pInnerFlags )
+ {
+ awt::Point* pArray = pInnerSequence->getArray();
+ PolygonFlags* pFlags = pInnerFlags->getArray();
+ if ( pArray && pFlags )
+ {
+ for ( b = 0; b < pInnerSequence->getLength(); b++, pArray++ )
+ {
+ PolyFlags ePolyFlags = *( (PolyFlags*)pFlags++ );
+ if ( ePolyFlags == POLY_CONTROL )
+ continue;
+ UINT32 nDist = (UINT32)hypot( aRefPoint.X() - pArray->X, aRefPoint.Y() - pArray->Y );
+ if ( nDist < nDistance )
+ {
+ nRule = nIndex;
+ nDistance = nDist;
+ }
+ nIndex++;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch(...)
+ {
+ }
+ }
+ }
+ else
+ {
+ Rectangle aRect( aXShape->getPosition().X, aXShape->getPosition().Y, aXShape->getSize().Width, aXShape->getSize().Height );
+ nRule = 0;
+ if ( aRefPoint.X() == aRect.Left() )
+ nRule++;
+ else if ( aRefPoint.Y() == aRect.Bottom() )
+ nRule = 2;
+ else if ( aRefPoint.X() == aRect.Right() )
+ nRule = 3;
+ }
+ if( aType.EqualsAscii( "drawing.Ellipse" ))
+ nRule <<= 1; // In PPT hat eine Ellipse 8 Möglichkeiten sich zu connecten
+
+ return nRule;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+ImplEESdrSolverContainer::~ImplEESdrSolverContainer()
+{
+ void *pP;
+ for( pP = maShapeList.First(); pP; pP = maShapeList.Next() )
+ delete (ImplEESdrShapeListEntry*)pP;
+ for( pP = maConnectorList.First(); pP; pP = maConnectorList.Next() )
+ delete (ImplEESdrConnectorListEntry*)pP;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void ImplEESdrSolverContainer::AddShape( const Reference< XShape >& rXShape, UINT32 nId )
+{
+ maShapeList.Insert( new ImplEESdrShapeListEntry( rXShape, nId ),
+ LIST_APPEND );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void ImplEESdrSolverContainer::AddConnector( const Reference< XShape >& rConnector,
+ const Point& rPA, const Reference< XShape >& rConA,
+ const Point& rPB, const Reference< XShape >& rConB )
+{
+ maConnectorList.Insert( new ImplEESdrConnectorListEntry(
+ rConnector, rPA, rConA, rPB, rConB ), LIST_APPEND );
+}
+
+// ---------------------------------------------------------------------------------------------
+
+UINT32 ImplEESdrSolverContainer::ImplGetId( const Reference< XShape >& rXShape )
+{
+ for ( ImplEESdrShapeListEntry* pPtr = (ImplEESdrShapeListEntry*)maShapeList.First(); pPtr; pPtr = (ImplEESdrShapeListEntry*)maShapeList.Next() )
+ {
+ if ( rXShape == pPtr->aXShape )
+ return ( pPtr->nEscherId );
+ }
+ return 0;
+}
+
+// ---------------------------------------------------------------------------------------------
+
+void ImplEESdrSolverContainer::WriteSolver( EscherEx& rEscherEx )
+{
+ UINT32 nCount = maConnectorList.Count();
+ if ( nCount )
+ {
+ SvStream& rStrm = rEscherEx.GetStream();
+ rEscherEx.OpenContainer( ESCHER_SolverContainer, nCount );
+
+ ImplEESdrConnectorRule aConnectorRule;
+ aConnectorRule.nRuleId = 2;
+ for ( ImplEESdrConnectorListEntry* pPtr = (ImplEESdrConnectorListEntry*)maConnectorList.First(); pPtr; pPtr = (ImplEESdrConnectorListEntry*)maConnectorList.Next() )
+ {
+ aConnectorRule.ncptiA = aConnectorRule.ncptiB = 0xffffffff;
+ aConnectorRule.nShapeC = ImplGetId( pPtr->mXConnector );
+ aConnectorRule.nShapeA = ImplGetId( pPtr->mXConnectToA );
+ aConnectorRule.nShapeB = ImplGetId( pPtr->mXConnectToB );
+
+ if ( aConnectorRule.nShapeC )
+ {
+ if ( aConnectorRule.nShapeA )
+ aConnectorRule.ncptiA = pPtr->GetConnectorRule( TRUE );
+ if ( aConnectorRule.nShapeB )
+ aConnectorRule.ncptiB = pPtr->GetConnectorRule( FALSE );
+ }
+ rEscherEx.AddAtom( 24, ESCHER_ConnectorRule, 1 );
+ rStrm << aConnectorRule.nRuleId
+ << aConnectorRule.nShapeA
+ << aConnectorRule.nShapeB
+ << aConnectorRule.nShapeC
+ << aConnectorRule.ncptiA
+ << aConnectorRule.ncptiB;
+
+ aConnectorRule.nRuleId += 2;
+ }
+ rEscherEx.CloseContainer(); // ESCHER_SolverContainer
+ }
+}
+
+
+// ===================================================================
+
+ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx )
+ :
+ mpEscherEx ( &rEx ),
+ maMapModeSrc ( MAP_100TH_MM ),
+ // PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi
+ maMapModeDest( MAP_INCH, Point(), Fraction( 1, EES_MAP_FRACTION ), Fraction( 1, EES_MAP_FRACTION ) ),
+ mbStatus ( FALSE ),
+// mXModel ( rXModel ),
+// mXStatusIndicator ( rXStatInd ),
+ mbStatusIndicator ( FALSE ),
+ mnPagesWritten ( 0 ),
+// mnTxId ( 0x7a2f64 ),
+ mnShapeMasterTitle ( 0 ),
+ mnShapeMasterBody ( 0 ),
+ mpPicStrm ( NULL ),
+ mpHostAppData ( NULL )
+{
+}
+
+
+// -------------------------------------------------------------------
+
+Point ImplEESdrWriter::ImplMapPoint( const Point& rPoint )
+{
+ return OutputDevice::LogicToLogic( rPoint, maMapModeSrc, maMapModeDest );
+}
+
+
+// -------------------------------------------------------------------
+
+Size ImplEESdrWriter::ImplMapSize( const Size& rSize )
+{
+ Size aRetSize( OutputDevice::LogicToLogic( rSize, maMapModeSrc, maMapModeDest ) );
+
+ if ( !aRetSize.Width() )
+ aRetSize.Width()++;
+ if ( !aRetSize.Height() )
+ aRetSize.Height()++;
+ return aRetSize;
+}
+
+
+// -------------------------------------------------------------------
+#if 0
+BOOL ImplEESdrWriter::ImplGetShapeByIndex( UINT32 nIndex, BOOL bGroup )
+{
+ while(TRUE)
+ {
+ if ( ( bGroup == FALSE ) || ( GetCurrentGroupLevel() == 0 ) )
+ mXShape = *(Reference< XShape >*)mXShapes->getByIndex( nIndex ).get();
+ else
+ mXShape = *(Reference< XShape >*)GetCurrentGroupAccess()->getByIndex( GetCurrentGroupIndex() ).get();
+
+ if ( !ImplInitCurrentShape() )
+ break;
+
+ return TRUE;
+ }
+ return FALSE;
+}
+#endif
+
+// -------------------------------------------------------------------
+
+void ImplEESdrWriter::ImplWriteTextBundle( ImplEESdrObject& rObj )
+{
+ if( rObj.ImplGetText() )
+ {
+ ESCHER_AnchorText eAnchor = ESCHER_AnchorTop;
+ UINT32 nTextAttr = 0x40004; // rotate text with shape
+
+ VerticalAlignment* pVAlign =
+ ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("TextVerticalAdjust") ) )
+ ? (VerticalAlignment*)rObj.GetUsrAny().getValue()
+ : NULL;
+ if ( pVAlign )
+ {
+ switch ( *pVAlign )
+ {
+ case VerticalAlignment_MIDDLE :
+ eAnchor = ESCHER_AnchorMiddle;
+ break;
+
+ case VerticalAlignment_BOTTOM :
+ eAnchor = ESCHER_AnchorBottom;
+ break;
+
+ default :
+ case VerticalAlignment_TOP :
+ eAnchor = ESCHER_AnchorTop;
+ break;
+ }
+ }
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("TextHorizontalAdjust") ) )
+ {
+ switch ( *(TextAdjust*)rObj.GetUsrAny().getValue() )
+ {
+ case TextAdjust_CENTER :
+ case TextAdjust_RIGHT :
+ case TextAdjust_LEFT :
+ {
+ switch( eAnchor )
+ {
+ case ESCHER_AnchorMiddle :
+ eAnchor = ESCHER_AnchorMiddleCentered;
+ break;
+ case ESCHER_AnchorBottom :
+ eAnchor = ESCHER_AnchorBottomCentered;
+ break;
+ case ESCHER_AnchorTop :
+ eAnchor = ESCHER_AnchorTopCentered;
+ break;
+ }
+ }
+ break;
+ case TextAdjust_STRETCH :
+ case TextAdjust_BLOCK :
+ break;
+ }
+ }
+/*
+ if ( ImplGetPropertyValue( L"TextFitToSize" ) )
+ {
+ if ( *( (INT16*)mAny.get() ) == 1 )
+ {
+ nTextAttr |= 0x10001;
+ mpEscherEx->AddOpt( ESCHER_Prop_scaleText, ? );
+ }
+ }
+*/
+
+ INT32 nLeft = rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("TextLeftDistance"));
+ INT32 nTop = rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("TextUpperDistance"));
+ INT32 nRight = rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("TextRightDistance"));
+ INT32 nBottom = rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("TextLowerDistance"));
+
+ if ( nLeft >= 200 )
+ nLeft -= 200;
+ if ( nRight >= 200 )
+ nRight -=200;
+
+ mpEscherEx->AddOpt( ESCHER_Prop_dxTextLeft, nLeft * 360 );
+ mpEscherEx->AddOpt( ESCHER_Prop_dxTextRight, nRight * 360 );
+ mpEscherEx->AddOpt( ESCHER_Prop_dyTextTop, nTop * 360 );
+ mpEscherEx->AddOpt( ESCHER_Prop_dyTextBottom, nBottom * 360 );
+
+ mpEscherEx->AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapSquare );
+ mpEscherEx->AddOpt( ESCHER_Prop_AnchorText, eAnchor );
+ mpEscherEx->AddOpt( ESCHER_Prop_FitTextToShape, nTextAttr );
+ UINT32 nTxtBxId = mpEscherEx->QueryTextID( rObj.GetShapeRef(),
+ rObj.GetShapeId() );
+ mpEscherEx->AddOpt( ESCHER_Prop_lTxid, nTxtBxId );
+ }
+}
+
+
+// -------------------------------------------------------------------
+
+void ImplEESdrWriter::ImplFlipBoundingBox( ImplEESdrObject& rObj,
+ const Point& rRefPoint )
+{
+ INT32 nAngle = rObj.GetAngle();
+ Rectangle aRect( rObj.GetRect() );
+
+ if ( nAngle < 0 )
+ nAngle = ( 36000 + nAngle ) % 36000;
+ else
+ nAngle = ( 36000 - ( nAngle % 36000 ) );
+
+ double fVal = (double)nAngle * F_PI18000;
+ double fCos = cos( fVal );
+ double fSin = sin( fVal );
+
+ double nWidthHalf = (double) aRect.GetWidth() / 2;
+ double nHeightHalf = (double) aRect.GetHeight() / 2;
+
+ INT32 nXDiff = fCos * nWidthHalf + fSin * (-nHeightHalf);
+ INT32 nYDiff = - ( fSin * nWidthHalf - fCos * ( -nHeightHalf ) );
+
+ aRect.Move( -( nWidthHalf - nXDiff ), - ( nHeightHalf + nYDiff ) );
+
+#if EES_WRITE_EPP
+// this is not true for Excel, what about Word?
+ if ( ( nAngle > 4500 && nAngle <= 13500 ) ||
+ ( nAngle > 22500 && nAngle <= 31500 ) )
+ {
+ // In diesen beiden Bereichen steht in PPT gemeinerweise die
+ // BoundingBox bereits senkrecht. Daher muss diese VOR
+ // DER ROTATION flachgelegt werden.
+ Point aTopLeft( aRect.Left() + nWidthHalf - nHeightHalf,
+ aRect.Top() + nHeightHalf - nWidthHalf );
+ Size aNewSize( aRect.GetHeight(), aRect.GetWidth() );
+ aRect = Rectangle( aTopLeft, aNewSize );
+ }
+#endif // EES_WRITE_EPP
+
+ nAngle *= 655;
+ nAngle += 0x8000;
+ nAngle &=~0xffff; // nAngle auf volle Gradzahl runden
+ mpEscherEx->AddOpt( ESCHER_Prop_Rotation, nAngle );
+
+ rObj.SetAngle( nAngle );
+ rObj.SetRect( aRect );
+}
+
+// -----------------------------------------------------------------------
+
+void ImplEESdrWriter::ImplWriteAny( ImplEESdrObject& rObj,
+ UINT32 nFlags, BOOL bBezier,
+ Polygon* pPolygon )
+{
+ PolyPolygon aPolyPolygon;
+ Polygon aPolygon;
+
+ if ( pPolygon )
+ aPolyPolygon.Insert( *pPolygon, POLYPOLY_APPEND );
+ else
+ {
+ if ( bBezier )
+ {
+ if ( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("PolyPolygonBezier") ) )
+ return;
+ }
+ else if ( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("PolyPolygon") ) )
+ return;
+
+ if ( bBezier )
+ {
+ PolyPolygonBezierCoords* pSourcePolyPolygon =
+ (PolyPolygonBezierCoords*)rObj.GetUsrAny().getValue();
+ INT32 nOuterSequenceCount = pSourcePolyPolygon->Coordinates.getLength();
+
+ // Zeiger auf innere sequences holen
+ PointSequence* pOuterSequence = pSourcePolyPolygon->Coordinates.getArray();
+ FlagSequence* pOuterFlags = pSourcePolyPolygon->Flags.getArray();
+
+ if ( ! ( pOuterSequence && pOuterFlags ) )
+ return;
+
+ INT32 a, b, nInnerSequenceCount;
+ awt::Point* pArray;
+
+ // dies wird ein Polygon set
+ for ( a = 0; a < nOuterSequenceCount; a++ )
+ {
+ PointSequence* pInnerSequence = pOuterSequence++;
+ FlagSequence* pInnerFlags = pOuterFlags++;
+
+ if ( ! ( pInnerSequence && pInnerFlags ) )
+ return;
+
+ // Zeiger auf Arrays holen
+ pArray = pInnerSequence->getArray();
+ PolygonFlags* pFlags = pInnerFlags->getArray();
+
+ if ( pArray && pFlags )
+ {
+ nInnerSequenceCount = pInnerSequence->getLength();
+ aPolygon = Polygon( nInnerSequenceCount );
+ for( b = 0; b < nInnerSequenceCount; b++)
+ {
+ PolyFlags ePolyFlags( *( (PolyFlags*)pFlags++ ) );
+ aPolygon[ b ] = Point( pArray->X, pArray->Y );
+ pArray++;
+ aPolygon.SetFlags( b, ePolyFlags );
+
+ if ( ePolyFlags == POLY_CONTROL )
+ continue;
+ }
+ aPolyPolygon.Insert( aPolygon, POLYPOLY_APPEND );
+ }
+ }
+ }
+ else
+ {
+ PointSequenceSequence* pSourcePolyPolygon =
+ (PointSequenceSequence*)rObj.GetUsrAny().getValue();
+ INT32 nOuterSequenceCount = pSourcePolyPolygon->getLength();
+
+ // Zeiger auf innere sequences holen
+ PointSequence* pOuterSequence = pSourcePolyPolygon->getArray();
+ if ( !( pOuterSequence ) )
+ return;
+
+ // ist dies ein Polygon oder gar ein PolyPolygon ?
+ // sogar eine einfache Line wird als Polygon verpackt !!! ????
+
+ if ( nFlags & ANY_FLAGS_LINE )
+ {
+ PointSequence* pInnerSequence = pOuterSequence++;
+ if ( !( pInnerSequence ) )
+ return;
+
+ awt::Point* pArray = pInnerSequence->getArray();
+ if ( pArray )
+ rObj.SetRect( Rectangle( ImplMapPoint( Point( pArray[ 0 ].X, pArray[ 0 ].Y) ),
+ ImplMapPoint( Point( pArray[ 1 ].X, pArray[ 1 ].Y) ) ));
+ return;
+ }
+ INT32 a, b, nInnerSequenceCount;
+ awt::Point* pArray;
+
+ // dies wird ein Polygon set
+ for( a = 0; a < nOuterSequenceCount; a++ )
+ {
+ PointSequence* pInnerSequence = pOuterSequence++;
+ if ( !( pInnerSequence ) )
+ return;
+
+ // Zeiger auf Arrays holen
+ if ( pArray = pInnerSequence->getArray() )
+ {
+ nInnerSequenceCount = pInnerSequence->getLength();
+ aPolygon = Polygon( nInnerSequenceCount );
+ for( b = 0; b < nInnerSequenceCount; b++)
+ aPolygon[ b ] = Point( pArray->X, pArray->Y );
+ pArray++;
+ aPolyPolygon.Insert( aPolygon, POLYPOLY_APPEND );
+ }
+ }
+ }
+ }
+ INT32 i, j, k, nPoints, nBezPoints, nPolyCount = aPolyPolygon.Count();
+
+ Rectangle aGeoRect( aPolyPolygon.GetBoundRect() );
+ rObj.SetRect( ImplMapPoint( aGeoRect.TopLeft() ),
+ ImplMapSize( aGeoRect.GetSize() ) );
+
+ for ( nBezPoints = nPoints = i = 0; i < nPolyCount; i++ )
+ {
+ k = aPolyPolygon[ i ].GetSize();
+ nPoints += k;
+ for ( j = 0; j < k; j++ )
+ {
+ if ( aPolyPolygon[ i ].GetFlags( j ) != POLY_CONTROL )
+ nBezPoints++;
+ }
+ }
+ UINT32 nVerticesBufSize = ( nPoints << 2 ) + 6;
+ BYTE* pVerticesBuf = new BYTE[ nVerticesBufSize ];
+
+
+ UINT32 nSegmentBufSize = ( ( nBezPoints << 2 ) + 8 );
+ if ( nPolyCount > 1 )
+ nSegmentBufSize += ( nPolyCount << 1 );
+ BYTE* pSegmentBuf = new BYTE[ nSegmentBufSize ];
+
+ BYTE* pPtr = pVerticesBuf;
+ *pPtr++ = (BYTE)( nPoints ); // Little endian // Little endian
+ *pPtr++ = (BYTE)( nPoints >> 8 );
+ *pPtr++ = (BYTE)( nPoints );
+ *pPtr++ = (BYTE)( nPoints >> 8 );
+ *pPtr++ = (BYTE)0xf0;
+ *pPtr++ = (BYTE)0xff;
+
+ for ( j = 0; j < nPolyCount; j++ )
+ {
+ aPolygon = aPolyPolygon[ j ];
+ nPoints = aPolygon.GetSize();
+ for ( i = 0; i < nPoints; i++ ) // Punkte aus Polygon in Buffer schreiben
+ {
+ Point aPoint = aPolygon[ i ];
+ aPoint.X() -= aGeoRect.Left();
+ aPoint.Y() -= aGeoRect.Top();
+
+ *pPtr++ = (BYTE)( aPoint.X() );
+ *pPtr++ = (BYTE)( aPoint.X() >> 8 );
+ *pPtr++ = (BYTE)( aPoint.Y() );
+ *pPtr++ = (BYTE)( aPoint.Y() >> 8 );
+ }
+ }
+
+ pPtr = pSegmentBuf;
+ *pPtr++ = (BYTE)( ( nSegmentBufSize - 6 ) >> 1 );
+ *pPtr++ = (BYTE)( ( nSegmentBufSize - 6 ) >> 9 );
+ *pPtr++ = (BYTE)( ( nSegmentBufSize - 6 ) >> 1 );
+ *pPtr++ = (BYTE)( ( nSegmentBufSize - 6 ) >> 9 );
+ *pPtr++ = (BYTE)2;
+ *pPtr++ = (BYTE)0;
+
+ for ( j = 0; j < nPolyCount; j++ )
+ {
+ *pPtr++ = 0x0; // Polygon start
+ *pPtr++ = 0x40;
+ aPolygon = aPolyPolygon[ j ];
+ nPoints = aPolygon.GetSize();
+ for ( i = 0; i < nPoints; i++ ) // Polyflags in Buffer schreiben
+ {
+ *pPtr++ = 0;
+ if ( bBezier )
+ *pPtr++ = 0xb3;
+ else
+ *pPtr++ = 0xac;
+ if ( ( i + 1 ) != nPoints )
+ {
+ *pPtr++ = 1;
+ if ( aPolygon.GetFlags( i + 1 ) == POLY_CONTROL )
+ {
+ *pPtr++ = 0x20;
+ i += 2;
+ }
+ else
+ *pPtr++ = 0;
+ }
+ }
+ if ( nPolyCount > 1 )
+ {
+ *pPtr++ = 1; // end of polygon
+ *pPtr++ = 0x60;
+ }
+ }
+ *pPtr++ = 0;
+ *pPtr++ = 0x80;
+
+ mpEscherEx->AddOpt( ESCHER_Prop_geoRight, aGeoRect.GetSize().Width() );
+ mpEscherEx->AddOpt( ESCHER_Prop_geoBottom, aGeoRect.GetSize().Height() );
+
+ mpEscherEx->AddOpt( ESCHER_Prop_shapePath, ESCHER_ShapeComplex );
+ mpEscherEx->AddOpt( ESCHER_Prop_pVertices, TRUE, nVerticesBufSize - 6, (BYTE*)pVerticesBuf, nVerticesBufSize );
+ mpEscherEx->AddOpt( ESCHER_Prop_pSegmentInfo, TRUE, nSegmentBufSize, (BYTE*)pSegmentBuf, nSegmentBufSize );
+}
+
+// -----------------------------------------------------------------------
+
+#define ADD_SHAPE( nType, nFlags ) \
+{ \
+ nShapeType = nType; \
+ nShapeID = mpEscherEx->GetShapeID(); \
+ rObj.SetShapeId( nShapeID ); \
+ mpEscherEx->AddShape( (UINT32)nType, (UINT32)nFlags, nShapeID ); \
+ rSolverContainer.AddShape( rObj.GetShapeRef(), nShapeID ); \
+}
+
+#define SHAPE_TEXT( bFill ) \
+{ \
+ mnTextStyle = EPP_TEXTSTYLE_TEXT; \
+ mpEscherEx->OpenContainer( ESCHER_SpContainer ); \
+ ADD_SHAPE( ESCHER_ShpInst_TextBox, 0xa00 ); \
+ mpEscherEx->BeginCount(); \
+ if ( bFill ) \
+ ImplWriteFillBundle( rObj, TRUE ); \
+ ImplWriteTextBundle( rObj ); \
+}
+
+UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
+ ImplEESdrSolverContainer& rSolverContainer,
+ ImplEESdrPageType ePageType )
+{
+ UINT32 nShapeID = 0;
+ UINT16 nShapeType = 0;
+ BOOL bAdditionalText = FALSE;
+ UINT32 nGrpShapeID = 0;
+
+ do {
+ mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef() );
+ if ( mpHostAppData && mpHostAppData->DontWriteShape() )
+ break;
+
+ Point aTextRefPoint;
+
+ if( rObj.GetType().EqualsAscii( "drawing.Group" ))
+ {
+ Reference< XIndexAccess > xXIndexAccess( rObj.GetShapeRef(), UNO_QUERY );
+
+ if( xXIndexAccess.is() && 0 != xXIndexAccess->getCount() )
+ {
+ nShapeID = mpEscherEx->EnterGroup( &rObj.GetRect() );
+ nShapeType = ESCHER_ShpInst_Min;
+
+ for( UINT32 n = 0, nCnt = xXIndexAccess->getCount();
+ n < nCnt; ++n )
+ {
+ ImplEESdrObject aObj( *this, *(Reference< XShape >*)
+ xXIndexAccess->getByIndex( n ).getValue() );
+ if( aObj.IsValid() )
+ ImplWriteShape( aObj, rSolverContainer, ePageType );
+ }
+ mpEscherEx->LeaveGroup();
+ }
+ break;
+ }
+ rObj.SetAngle( rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("RotateAngle") ));
+
+ if( ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("IsFontwork") ) &&
+ ::cppu::any2bool( rObj.GetUsrAny() ) ) ||
+ rObj.GetType().EqualsAscii( "drawing.Measure" ))
+ {
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("BoundRect") ) )
+ {
+ Rectangle aRect( *(Rectangle*)rObj.GetUsrAny().getValue() );
+ rObj.SetRect( ImplMapPoint( aRect.TopLeft() ),
+ ImplMapSize( aRect.GetSize() ) );
+ }
+ rObj.SetType( String( RTL_CONSTASCII_STRINGPARAM(
+ "drawing.dontknow" ),
+ RTL_TEXTENCODING_MS_1252 ));
+ }
+
+ BYTE nPlaceHolderAtom = EPP_PLACEHOLDER_NONE;
+
+ rObj.SetShadow( 2 );
+ mnTextStyle = EPP_TEXTSTYLE_NORMAL;
+#if EES_WRITE_EPP
+ mpCurrentDefault->SetObject( TEXT );
+#endif // EES_WRITE_EPP
+
+ if ( rObj.GetType().EqualsAscii( "drawing.Rectangle" ))
+ {
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ UINT32 nRadius = (UINT32)rObj.ImplGetInt32PropertyValue(
+ ::rtl::OUString::createFromAscii("CornerRadius"));
+ if( nRadius )
+ {
+ nRadius = ImplMapSize( Size( nRadius, 0 )).Width();
+ ADD_SHAPE( ESCHER_ShpInst_RoundRectangle, 0xa00 ); // Flags: Connector | HasSpt
+ mpEscherEx->BeginCount();
+ INT32 nLenght = rObj.GetRect().GetWidth();
+ if ( nLenght > rObj.GetRect().GetHeight() )
+ nLenght = rObj.GetRect().GetHeight();
+ nLenght >>= 1;
+ if ( nRadius >= nLenght )
+ nRadius = 0x2a30; // 0x2a30 ist PPTs maximum radius
+ else
+ nRadius = ( 0x2a30 * nRadius ) / nLenght;
+ mpEscherEx->AddOpt( ESCHER_Prop_adjustValue, nRadius );
+ }
+ else
+ {
+ ADD_SHAPE( ESCHER_ShpInst_Rectangle, 0xa00 ); // Flags: Connector | HasSpt
+ mpEscherEx->BeginCount();
+ }
+ ImplWriteFillBundle( rObj, TRUE );
+ ImplWriteTextBundle( rObj );
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.Ellipse" ))
+ {
+ CircleKind eCircleKind = CircleKind_FULL;
+ PolyStyle ePolyKind;
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("CircleKind") ) )
+ {
+ eCircleKind = *( (CircleKind*)rObj.GetUsrAny().getValue() );
+ switch ( eCircleKind )
+ {
+ case CircleKind_SECTION :
+ {
+ ePolyKind = POLY_PIE;
+ }
+ break;
+ case CircleKind_ARC :
+ {
+ ePolyKind = POLY_ARC;
+ }
+ break;
+
+ case CircleKind_CUT :
+ {
+ ePolyKind = POLY_CHORD;
+ }
+ break;
+
+ default:
+ eCircleKind = CircleKind_FULL;
+ }
+ }
+ if ( eCircleKind == CircleKind_FULL )
+ {
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ADD_SHAPE( ESCHER_ShpInst_Ellipse, 0xa00 ); // Flags: Connector | HasSpt
+ mpEscherEx->BeginCount();
+ ImplWriteFillBundle( rObj, TRUE );
+ }
+ else
+ {
+ INT32 nStartAngle, nEndAngle;
+ if ( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("CircleStartAngle") ) )
+ break;
+ nStartAngle = *( (INT32*)rObj.GetUsrAny().getValue() );
+ if( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("CircleEndAngle") ) )
+ break;
+ nEndAngle = *( (INT32*)rObj.GetUsrAny().getValue() );
+
+// warum??
+// maPosition = mXShape->getPosition();
+// maSize = mXShape->getSize();
+// maRect = Rectangle( maPosition, maSize );
+
+ Point aStart, aEnd, aCenter;
+ aStart.X() = (INT32)( ( cos( (double)( nStartAngle *
+ F_PI18000 ) ) * 100.0 ) );
+ aStart.Y() = - (INT32)( ( sin( (double)( nStartAngle *
+ F_PI18000 ) ) * 100.0 ) );
+ aEnd.X() = (INT32)( ( cos( (double)( nEndAngle *
+ F_PI18000 ) ) * 100.0 ) );
+ aEnd.Y() = - (INT32)( ( sin( (double)( nEndAngle *
+ F_PI18000 ) ) * 100.0 ) );
+ const Rectangle& rRect = rObj.GetRect();
+ aCenter.X() = rRect.Left() + ( rRect.GetWidth() / 2 );
+ aCenter.Y() = rRect.Top() + ( rRect.GetHeight() / 2 );
+ aStart.X() += aCenter.X();
+ aStart.Y() += aCenter.Y();
+ aEnd.X() += aCenter.X();
+ aEnd.Y() += aCenter.Y();
+ Polygon aPolygon( rRect, aStart, aEnd, ePolyKind );
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt
+ mpEscherEx->BeginCount();
+ switch ( ePolyKind )
+ {
+ case POLY_PIE :
+ case POLY_CHORD :
+ {
+ ImplWriteAny( rObj, ANY_FLAGS_POLYPOLYGON, FALSE,
+ &aPolygon );
+ ImplWriteFillBundle( rObj, TRUE );
+ }
+ break;
+
+ case POLY_ARC :
+ {
+ ImplWriteAny( rObj, ANY_FLAGS_POLYLINE, FALSE,
+ &aPolygon );
+ ImplWriteLineBundle( rObj, FALSE );
+ }
+ break;
+ }
+ }
+ ImplWriteTextBundle( rObj );
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.Control" ))
+ {
+ break;
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.Connector" ))
+ {
+ Reference< XShape > aShapeA, aShapeB;
+
+ Point aStartPoint, aEndPoint;
+
+ if ( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("EdgeKind") ) )
+ break;
+ ConnectorType eCt;
+ ::cppu::any2enum< ConnectorType >( eCt, rObj.GetUsrAny() );
+
+ if ( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("EdgeStartPoint") ) )
+ break;
+ aStartPoint = *(Point*)rObj.GetUsrAny().getValue();
+
+ if ( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("EdgeEndPoint") ) )
+ break;
+ aEndPoint = *(Point*)rObj.GetUsrAny().getValue();
+
+ UINT32 nAdjustValue1, nAdjustValue2, nAdjustValue3;
+ nAdjustValue1 = nAdjustValue2 = nAdjustValue3 = 0x2a30;
+
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("EdgeStartConnection") ) )
+ {
+ aShapeA = *(Reference< XShape >*)rObj.GetUsrAny().getValue();
+ }
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("EdgeEndConnection") ) )
+ {
+ aShapeB = *(Reference< XShape >*)rObj.GetUsrAny().getValue();
+ }
+
+/* if ( ImplGetPropertyValue( L"EdgeLine1Delta" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"EdgeLine2Delta" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"EdgeLine3Delta" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"EdgeNode1HorzDist" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"EdgeNode1VertDist" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"EdgeNode2HorzDist" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"EdgeNode2VertDist" ) )
+ {
+ }
+*/
+ rSolverContainer.AddConnector( rObj.GetShapeRef(), aStartPoint,
+ aShapeA, aEndPoint, aShapeB );
+ rObj.SetRect( Rectangle( ImplMapPoint( aStartPoint ),
+ ImplMapPoint( aEndPoint ) ) );
+ ImplWriteAny( rObj, ANY_FLAGS_LINE, FALSE );
+ const Rectangle& rRect = rObj.GetRect();
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ UINT32 nFlags = 0xa00; // Flags: Connector | HasSpt
+ if( rRect.Top() > rRect.Bottom() )
+ nFlags |= 0x80; // Flags: VertMirror
+ if( rRect.Left() > rRect.Right() )
+ nFlags |= 0x40; // Flags: HorzMirror
+
+ Rectangle aJustifiedRect( rRect );
+ aJustifiedRect.Justify();
+
+ switch ( eCt )
+ {
+ case ConnectorType_CURVE :
+ {
+ ADD_SHAPE( ESCHER_ShpInst_CurvedConnector3, nFlags );
+ mpEscherEx->BeginCount();
+ mpEscherEx->AddOpt( ESCHER_Prop_cxstyle, ESCHER_cxstyleCurved );
+ mpEscherEx->AddOpt( ESCHER_Prop_adjustValue, nAdjustValue1 );
+ mpEscherEx->AddOpt( ESCHER_Prop_adjust2Value, -nAdjustValue2 );
+ }
+ break;
+
+ case ConnectorType_STANDARD : // Connector 2->5
+ {
+ ADD_SHAPE( ESCHER_ShpInst_BentConnector3, nFlags );
+ mpEscherEx->BeginCount();
+ mpEscherEx->AddOpt( ESCHER_Prop_cxstyle, ESCHER_cxstyleBent );
+ }
+ break;
+
+ default:
+ case ConnectorType_LINE :
+ case ConnectorType_LINES : // Connector 2->5
+ {
+ nFlags |= 0x100;
+ ADD_SHAPE( ESCHER_ShpInst_StraightConnector1, nFlags );
+ mpEscherEx->BeginCount();
+ mpEscherEx->AddOpt( ESCHER_Prop_cxstyle, ESCHER_cxstyleStraight );
+ }
+ break;
+ }
+ ImplWriteLineBundle( rObj, FALSE );
+ rObj.SetAngle( 0 );
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.Measure" ))
+ {
+/*
+ if ( ImplGetPropertyValue( L"MeasureKind" ) )
+ {
+ mpEscherEx->EnterGroup( &maRect );
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ImplWriteAny( ANY_FLAGS_LINE, FALSE );
+ UINT32 nFlags = 0xa00; // Flags: Connector | HasSpt
+ if ( maRect.Top() > maRect.Bottom() )
+ nFlags |= 0x80; // Flags: VertMirror
+ if ( maRect.Left() > maRect.Right() )
+ nFlags |= 0x40; // Flags: HorzMirror
+
+ ADD_SHAPE( ESCHER_ShpInst_Line, nFlags );
+ mpEscherEx->BeginCount();
+ mpEscherEx->AddOpt( ESCHER_Prop_shapePath, ESCHER_ShapeComplex );
+ ImplWriteLineBundle( FALSE );
+ mpEscherEx->EndCount( ESCHER_OPT, 3 );
+ maRect.Justify();
+ mpEscherEx->AddClientAnchor( maRect );
+ mpEscherEx->CloseContainer(); // ESCHER_SpContainer
+
+ if ( ImplGetPropertyValue( L"MeasureTextHorizontalPosition" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureTextVerticalPosition" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureLineDistance" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureHelpLineOverhang" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureHelpLineDistance" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureHelpLine1Length" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureHelpLine2Length" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureBelowReferenceEdge" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureTextRotate90" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureTextUpsideDown" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureOverhang" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureUnit" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureScale" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureShowUnit" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureFormatString" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureTextAutoAngle" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureTextAutoAngleView" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureTextIsFixedAngle" ) )
+ {
+ }
+ if ( ImplGetPropertyValue( L"MeasureTextFixedAngle" ) )
+ {
+ }
+ mpEscherEx->LeaveGroup();
+ }
+*/
+ break;
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.Line" ))
+ {
+ ImplWriteAny( rObj, ANY_FLAGS_LINE, FALSE );
+ if( rObj.ImplHasText() )
+ {
+ aTextRefPoint = rObj.GetRect().TopLeft();
+ bAdditionalText = TRUE;
+ nGrpShapeID = ImplEnterAdditionalTextGroup( rObj.GetShapeRef(), &rObj.GetRect() );
+ }
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ const Rectangle& rRect = rObj.GetRect();
+ UINT32 nFlags = 0xa00; // Flags: Connector | HasSpt
+ if( rRect.Top() > rRect.Bottom() )
+ nFlags |= 0x80; // Flags: VertMirror
+ if( rRect.Left() > rRect.Right() )
+ nFlags |= 0x40; // Flags: HorzMirror
+
+ ADD_SHAPE( ESCHER_ShpInst_Line, nFlags );
+ mpEscherEx->BeginCount();
+ mpEscherEx->AddOpt( ESCHER_Prop_shapePath, ESCHER_ShapeComplex );
+ ImplWriteLineBundle( rObj, FALSE );
+ rObj.SetAngle( 0 );
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.PolyPolygon" ))
+ {
+ if( rObj.ImplHasText() )
+ {
+ nGrpShapeID = ImplEnterAdditionalTextGroup( rObj.GetShapeRef(), &rObj.GetRect() );
+ bAdditionalText = TRUE;
+ }
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt
+ mpEscherEx->BeginCount();
+ ImplWriteAny( rObj, ANY_FLAGS_POLYPOLYGON, FALSE );
+ ImplWriteFillBundle( rObj, TRUE );
+ rObj.SetAngle( 0 );
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.PolyLine" ))
+ {
+ if( rObj.ImplHasText() )
+ {
+ nGrpShapeID = ImplEnterAdditionalTextGroup( rObj.GetShapeRef(), &rObj.GetRect() );
+ bAdditionalText = TRUE;
+ }
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt
+ mpEscherEx->BeginCount();
+ ImplWriteAny( rObj, ANY_FLAGS_POLYLINE, FALSE );
+ ImplWriteLineBundle( rObj, FALSE );
+ rObj.SetAngle( 0 );
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.OpenBezier" ) ||
+ rObj.GetType().EqualsAscii( "drawing.OpenFreeHand" ) ||
+ rObj.GetType().EqualsAscii( "drawing.PolyLinePath" ) )
+ {
+ if ( rObj.ImplHasText() )
+ {
+ nGrpShapeID = ImplEnterAdditionalTextGroup( rObj.GetShapeRef(), &rObj.GetRect() );
+ bAdditionalText = TRUE;
+ }
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt
+ mpEscherEx->BeginCount();
+ ImplWriteAny( rObj, ANY_FLAGS_POLYLINE, TRUE );
+ ImplWriteLineBundle( rObj, FALSE );
+ rObj.SetAngle( 0 );
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.ClosedBezier" ) ||
+ rObj.GetType().EqualsAscii( "drawing.ClosedFreeHand" ) ||
+ rObj.GetType().EqualsAscii( "drawing.PolyPolygonPath" ) )
+ {
+ if ( rObj.ImplHasText() )
+ {
+ nGrpShapeID = ImplEnterAdditionalTextGroup( rObj.GetShapeRef(), &rObj.GetRect() );
+ bAdditionalText = TRUE;
+ }
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ADD_SHAPE( ESCHER_ShpInst_NotPrimitive, 0xa00 ); // Flags: Connector | HasSpt
+ mpEscherEx->BeginCount();
+ ImplWriteAny( rObj, ANY_FLAGS_POLYPOLYGON, TRUE );
+ ImplWriteFillBundle( rObj, TRUE );
+ rObj.SetAngle( 0 );
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.GraphicObject" ))
+ {
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+
+ // ein GraphicObject kann auch ein ClickMe Element sein
+ if( rObj.IsEmptyPresObj() && ( ePageType == NORMAL ) )
+ {
+ nPlaceHolderAtom = 19; // EPP_PLACEHOLDER_OBJECT;
+#if EES_WRITE_EPP
+ if ( mnLayout == 8 )
+ nPlaceHolderAtom = 21; // EPP_PLACEHOLDER_OBJECT_TABLE
+ else if ( ( mnLayout == 2 ) || ( mnLayout == 4 ) || ( mnLayout == 7 ) )
+ nPlaceHolderAtom = 20; // EPP_PLACEHOLDER_GRAPH;
+ else if ( ( mnLayout == 9 ) || ( mnLayout == 6 ) )
+ nPlaceHolderAtom = 22; // EPP_PLACEHOLDER_CLIPART
+#endif // EES_WRITE_EPP
+ ADD_SHAPE( ESCHER_ShpInst_Rectangle, 0x220 ); // Flags: HaveAnchor | HaveMaster
+ mpEscherEx->BeginCount();
+ UINT32 nTxtBxId = mpEscherEx->QueryTextID( rObj.GetShapeRef(),
+ rObj.GetShapeId() );
+ mpEscherEx->AddOpt( ESCHER_Prop_lTxid, nTxtBxId );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x10001 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x10001 );
+ mpEscherEx->AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterBody );
+ }
+ else
+ {
+ if( rObj.ImplGetText() )
+ {
+ ADD_SHAPE( ESCHER_ShpInst_Rectangle, 0xa00 ); // Flags: Connector | HasSpt
+ mpEscherEx->BeginCount();
+ if( ImplGetGraphic( rObj, ::rtl::OUString::createFromAscii("GraphicObjectFillBitmap"),TRUE ) )
+ {
+ mpEscherEx->AddOpt( ESCHER_Prop_WrapText,
+ ESCHER_WrapNone );
+ mpEscherEx->AddOpt( ESCHER_Prop_AnchorText,
+ ESCHER_AnchorMiddle );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest,
+ 0x140014 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fillBackColor,
+ 0x8000000 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash,
+ 0x80000 );
+ ImplWriteTextBundle( rObj );
+ }
+ }
+ else
+ {
+ ADD_SHAPE( ESCHER_ShpInst_PictureFrame, 0xa00 );
+ mpEscherEx->BeginCount();
+ if( ImplGetGraphic( rObj, ::rtl::OUString::createFromAscii("GraphicObjectFillBitmap"), FALSE ) )
+ mpEscherEx->AddOpt( ESCHER_Prop_LockAgainstGrouping,
+ 0x800080 );
+ }
+ }
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.Text" ))
+ {
+ SHAPE_TEXT( TRUE );
+ }
+ else if ( rObj.GetType().EqualsAscii( "presentation.TitleText" ))
+ {
+ if ( mbIsTitlePossible )
+ {
+ mbIsTitlePossible = FALSE;
+
+ if ( ePageType == MASTER )
+ break;
+
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+#if EES_WRITE_EPP
+ mpCurrentDefault->SetObject( TITLETEXT );
+#endif // EES_WRITE_EPP
+ mnTextStyle = EPP_TEXTSTYLE_TITLE;
+ nPlaceHolderAtom = EPP_PLACEHOLDER_TITLE;
+ ADD_SHAPE( ESCHER_ShpInst_Rectangle, 0x220 ); // Flags: HaveAnchor | HaveMaster
+ mpEscherEx->BeginCount();
+ mpEscherEx->AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterTitle );
+ ImplWriteFillBundle( rObj, TRUE );
+ ImplWriteTextBundle( rObj );
+ if( rObj.IsEmptyPresObj() )
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90001 );
+ }
+ else
+ {
+ rObj.SetType( String( RTL_CONSTASCII_STRINGPARAM(
+ "drawing.Text" ),
+ RTL_TEXTENCODING_MS_1252 ));
+
+ SHAPE_TEXT( TRUE );
+ }
+ }
+ else if ( rObj.GetType().EqualsAscii( "presentation.Outliner" ))
+ {
+ mnOutlinerCount++;
+
+ if ( ( mnOutlinerCount == 1 ) ||
+ ( ( mnOutlinerCount == 2 ) &&
+ ( mnPrevTextStyle == EPP_TEXTSTYLE_BODY ) ) )
+ {
+ if ( ePageType == MASTER )
+ {
+ mnPrevTextStyle = EPP_TEXTSTYLE_TITLE;
+ break;
+ }
+#if EES_WRITE_EPP
+ mpCurrentDefault->SetObject( OUTLINER );
+#endif // EES_WRITE_EPP
+ mnTextStyle = EPP_TEXTSTYLE_BODY;
+ nPlaceHolderAtom = EPP_PLACEHOLDER_BODY;
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ADD_SHAPE( ESCHER_ShpInst_Rectangle, 0x220 ); // Flags: HaveAnchor | HaveMaster
+ mpEscherEx->BeginCount();
+ mpEscherEx->AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterBody );
+ ImplWriteFillBundle( rObj, TRUE );
+ ImplWriteTextBundle( rObj );
+
+ if ( rObj.IsEmptyPresObj() )
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90001 );
+ }
+ else
+ {
+ rObj.SetType( String( RTL_CONSTASCII_STRINGPARAM(
+ "drawing.Text" ),
+ RTL_TEXTENCODING_MS_1252 ));
+ SHAPE_TEXT( TRUE );
+ }
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.Page" ))
+ {
+ nPlaceHolderAtom = EPP_PLACEHOLDER_GENERICTEXTOBJECT;
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ADD_SHAPE( ESCHER_ShpInst_Rectangle, 0xa00 );
+ mpEscherEx->BeginCount();
+ mpEscherEx->AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x40004 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fFillOK, 0x100001 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x110011 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90008 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fshadowObscured, 0x10001 );
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.Frame" ))
+ {
+ break;
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.OLE2" ))
+ {
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ if( rObj.IsEmptyPresObj() && ( ePageType == NORMAL ) )
+ {
+ nPlaceHolderAtom = 19; // EPP_PLACEHOLDER_OBJECT;
+#if EES_WRITE_EPP
+ if ( mnLayout == 8 )
+ nPlaceHolderAtom = 21; // EPP_PLACEHOLDER_OBJECT_TABLE
+ else if ( ( mnLayout == 2 ) || ( mnLayout == 4 ) || ( mnLayout == 7 ) )
+ nPlaceHolderAtom = 20; // EPP_PLACEHOLDER_GRAPH;
+ else if ( ( mnLayout == 9 ) || ( mnLayout == 6 ) )
+ nPlaceHolderAtom = 22; // EPP_PLACEHOLDER_CLIPART
+#endif // EES_WRITE_EPP
+ ADD_SHAPE( ESCHER_ShpInst_Rectangle, 0x220 ); // Flags: HaveAnchor | HaveMaster
+ mpEscherEx->BeginCount();
+ UINT32 nTxtBxId = mpEscherEx->QueryTextID( rObj.GetShapeRef(),
+ rObj.GetShapeId() );
+ mpEscherEx->AddOpt( ESCHER_Prop_lTxid, nTxtBxId );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x10001 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x10001 );
+ mpEscherEx->AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterBody );
+ }
+ else
+ {
+ //2do: could be made an option in HostAppData whether OLE object should be written or not
+ BOOL bAppOLE = TRUE;
+ ADD_SHAPE( ESCHER_ShpInst_PictureFrame,
+ 0xa00 | (bAppOLE ? SHAPEFLAG_OLESHAPE : 0) );
+ mpEscherEx->BeginCount();
+ if ( ImplGetGraphic( rObj, ::rtl::OUString::createFromAscii("MetaFile"), FALSE ) )
+ {
+ if ( bAppOLE )
+ { // snooped from Xcl hex dump, nobody knows the trouble I have seen
+ mpEscherEx->AddOpt( ESCHER_Prop_FitTextToShape, 0x00080008 );
+ mpEscherEx->AddOpt( ESCHER_Prop_pictureId, 0x00000001 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fillColor, 0x08000041 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fillBackColor, 0x08000041 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x00110010 );
+ mpEscherEx->AddOpt( ESCHER_Prop_lineColor, 0x08000040 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash,0x00080008 );
+// mpEscherEx->AddOpt( ESCHER_Prop_fshadowObscured,0x00020000 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fPrint, 0x00080000 );
+ }
+ mpEscherEx->AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
+ }
+ }
+ }
+ else if( '3' == rObj.GetType().GetChar(8 ) &&
+ 'D' == rObj.GetType().GetChar( 9 ) ) // drawing.3D
+ {
+ // SceneObject, CubeObject, SphereObject, LatheObject, ExtrudeObject, PolygonObject
+ if ( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("Bitmap") ) )
+ break;
+
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ADD_SHAPE( ESCHER_ShpInst_PictureFrame, 0xa00 );
+ mpEscherEx->BeginCount();
+
+ if ( ImplGetGraphic( rObj, ::rtl::OUString::createFromAscii("Bitmap"), FALSE ) )
+ mpEscherEx->AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
+ }
+ else if ( rObj.GetType().EqualsAscii( "drawing.dontknow" ))
+ {
+ rObj.SetAngle( 0 );
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ ADD_SHAPE( ESCHER_ShpInst_PictureFrame, 0xa00 );
+ mpEscherEx->BeginCount();
+ if ( ImplGetGraphic( rObj, ::rtl::OUString::createFromAscii("MetaFile"), FALSE ) )
+ mpEscherEx->AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
+ }
+ else
+ {
+ break;
+ }
+
+ if( rObj.GetShadow() ) // shadow wird nur ausgegeben, wenn es mindestens einen LinesStyle oder FillStyle gibt
+ {
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("Shadow") ) )
+ {
+ if ( ::cppu::any2bool( rObj.GetUsrAny() ) )
+ {
+ mpEscherEx->AddOpt( ESCHER_Prop_fshadowObscured, 0x20002 );
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("ShadowColor") ) )
+ mpEscherEx->AddOpt( ESCHER_Prop_shadowColor,
+ mpEscherEx->GetColor(
+ *((UINT32*)rObj.GetUsrAny().getValue()) ) );
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("ShadowXDistance") ) )
+ mpEscherEx->AddOpt( ESCHER_Prop_shadowOffsetX,
+ *((INT32*)rObj.GetUsrAny().getValue()) * 360 );
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("ShadowYDistance") ) )
+ mpEscherEx->AddOpt( ESCHER_Prop_shadowOffsetY,
+ *((INT32*)rObj.GetUsrAny().getValue()) * 360 );
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("ShadowTransparence") ) )
+ mpEscherEx->AddOpt( ESCHER_Prop_shadowOpacity,
+ ( ( 100 - (*((UINT16*)rObj.GetUsrAny().getValue()) )
+ << 16 ) / 100 ) );
+ }
+ }
+ }
+
+ if( USHRT_MAX != mpEscherEx->GetHellLayerId() &&
+ rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("LayerID") ) &&
+ (*((UINT16*)rObj.GetUsrAny().getValue()) ) == mpEscherEx->GetHellLayerId() )
+ {
+ mpEscherEx->AddOpt( ESCHER_Prop_fPrint, 0x200020 );
+ }
+
+ {
+ Rectangle aRect( rObj.GetRect() );
+ aRect.Justify();
+ rObj.SetRect( aRect );
+ }
+
+ if( rObj.GetAngle() )
+ {
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("RotationPointX") ))
+ {
+ Point aRefPoint( *( (INT32*)rObj.GetUsrAny().getValue() ), 0 );
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("RotationPointY") ))
+ {
+ aRefPoint.Y() = *( (INT32*)rObj.GetUsrAny().getValue() );
+ ImplFlipBoundingBox( rObj, ImplMapPoint( aRefPoint ) );
+ }
+ }
+ }
+ mpEscherEx->EndCount( ESCHER_OPT, 3 );
+
+ if( mpEscherEx->GetGroupLevel() > 1 )
+ {
+ mpEscherEx->AddAtom( 16, ESCHER_ChildAnchor );
+ const Rectangle& rRect = rObj.GetRect();
+ mpEscherEx->GetStream() << (INT32)rRect.Left()
+ << (INT32)rRect.Top()
+ << (INT32)rRect.Right()
+ << (INT32)rRect.Bottom();
+ }
+
+#if EES_WRITE_EPP
+ // ClientAnchor
+ mpEscherEx->AddClientAnchor( maRect );
+
+ // ClientData
+ AnimationEffect eAe = AnimationEffect_NONE;
+ ClickAction eCa = ClickAction_NONE;
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("Effect") ))
+ eAe = (AnimationEffect)rObj.GetUsrAny().getEnumAsINT32();
+
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("PresentationOrder") ))
+ mnEffectCount = *(UINT16*)rObj.GetUsrAny().getValue();
+
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("OnClick") ))
+ eCa = (ClickAction)rObj.GetUsrAny().getEnumAsINT32();
+
+ INT32 nPlacementID = -1;
+
+ BOOL bEffect = ( ( eAe != AnimationEffect_NONE ) ||
+ ( ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("SoundOn") ) ) &&
+ rObj.GetUsrAny().getBOOL() ) );
+ BOOL bClientData = ( bEffect || ( eCa != ClickAction_NONE ) ||
+ nPlaceHolderAtom );
+ if ( bClientData )
+ {
+ mpEscherEx->OpenContainer( ESCHER_ClientData );
+
+ if ( nPlaceHolderAtom )
+ {
+ if( mnTextStyle == EPP_TEXTSTYLE_TITLE
+ || mnTextStyle == EPP_TEXTSTYLE_BODY
+ || nPlaceHolderAtom == EPP_PLACEHOLDER_GENERICTEXTOBJECT
+ || nPlaceHolderAtom >= 19 )
+ nPlacementID = mnIndices++;
+
+ mpEscherEx->AddAtom( 8, EPP_OEPlaceholderAtom );
+ *mpStrm << nPlacementID // PlacementID
+ << (BYTE)nPlaceHolderAtom // PlaceHolderID
+ << (BYTE)0 // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER )
+ << (UINT16)0; // padword
+ }
+ if ( bEffect )
+ ImplWriteObjectEffect( eAe, ++mnEffectCount );
+
+ if ( eCa != ClickAction_NONE )
+ ImplWriteClickAction( eCa );
+
+ mpEscherEx->CloseContainer(); // Escher_ClientData
+ }
+
+ // ClientTextbox
+ if ( rObj.GetTextSize() )
+ {
+ mpEscherEx->OpenContainer( ESCHER_ClientTextbox );
+ if ( mnTextStyle == EPP_TEXTSTYLE_TITLE )
+ {
+ mpEscherEx->AddAtom( 4, EPP_OutlineTextRefAtom );
+ *mpStrm << nPlacementID;
+ }
+ else if ( mnTextStyle == EPP_TEXTSTYLE_BODY )
+ {
+ mpEscherEx->AddAtom( 4, EPP_OutlineTextRefAtom );
+ *mpStrm << nPlacementID;
+ }
+ else
+ {
+ mpEscherEx->AddAtom( 4, EPP_TextHeaderAtom );
+ *mpStrm << (UINT32)EPP_TEXTTYPE_Other; // Text in a Shape
+ }
+ if ( ( mnTextStyle != EPP_TEXTSTYLE_BODY ) &&
+ ( mnTextStyle != EPP_TEXTSTYLE_TITLE ) )
+ ImplWriteTextStyleAtom();
+ mpEscherEx->CloseContainer(); // ESCHER_ClientTextBox
+ }
+ else if ( nPlaceHolderAtom >= 19 )
+ {
+ mpEscherEx->OpenContainer( ESCHER_ClientTextbox );
+ mpEscherEx->AddAtom( 4, EPP_TextHeaderAtom );
+ *mpStrm << (UINT32)7;
+ mpEscherEx->CloseContainer(); // ESCHER_ClientTextBox
+ }
+#else // !EES_WRITE_EPP
+ if ( mpHostAppData )
+ { //! with AdditionalText the App has to control whether these are written or not
+ mpHostAppData->WriteClientAnchor( *mpEscherEx, rObj.GetRect() );
+ mpHostAppData->WriteClientData( *mpEscherEx );
+ mpHostAppData->WriteClientTextbox( *mpEscherEx );
+ }
+#endif // EES_WRITE_EPP
+
+ mpEscherEx->CloseContainer(); // ESCHER_SpContainer
+
+ if( bAdditionalText )
+ {
+ mpEscherEx->EndShape( nShapeType, nShapeID );
+ ImplWriteAdditionalText( rObj, aTextRefPoint );
+ }
+
+ } while ( 0 );
+
+ if ( bAdditionalText )
+ mpEscherEx->EndShape( ESCHER_ShpInst_Min, nGrpShapeID );
+ else
+ mpEscherEx->EndShape( nShapeType, nShapeID );
+ return nShapeID;
+}
+
+void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
+ const Point& rTextRefPoint )
+{
+ UINT32 nShapeID = 0;
+ UINT16 nShapeType = 0;
+ do
+ {
+ mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef() );
+ if ( mpHostAppData && mpHostAppData->DontWriteShape() )
+ break;
+
+ rObj.SetAngle( rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("RotateAngle")));
+ INT32 nAngle = rObj.GetAngle();
+ if( rObj.GetType().EqualsAscii( "drawing.Line" ))
+ {
+//2do: this does not work right
+ double fDist = hypot( rObj.GetRect().GetWidth(),
+ rObj.GetRect().GetHeight() );
+ rObj.SetRect( Rectangle( rTextRefPoint, Point( rTextRefPoint.X() +
+ fDist, rTextRefPoint.Y() - 1 ) ));
+
+ mnTextStyle = EPP_TEXTSTYLE_TEXT;
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ mpEscherEx->AddShape( ESCHER_ShpInst_TextBox, 0xa00 );
+ mpEscherEx->BeginCount();
+ ImplWriteTextBundle( rObj );
+
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90000 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100000 );
+ mpEscherEx->AddOpt( ESCHER_Prop_FitTextToShape, 0x60006 ); // Size Shape To Fit Text
+ if ( nAngle < 0 )
+ nAngle = ( 36000 + nAngle ) % 36000;
+ if ( nAngle )
+ ImplFlipBoundingBox( rObj, rObj.GetRect().TopLeft() );
+ }
+ else
+ {
+ mnTextStyle = EPP_TEXTSTYLE_TEXT;
+ mpEscherEx->OpenContainer( ESCHER_SpContainer );
+ nShapeID = mpEscherEx->GetShapeID();
+ mpEscherEx->AddShape( nShapeType = ESCHER_ShpInst_TextBox, 0xa00, nShapeID );
+ mpEscherEx->BeginCount();
+ ImplWriteTextBundle( rObj );
+
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90000 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100000 );
+
+ if( nAngle < 0 )
+ nAngle = ( 36000 + nAngle ) % 36000;
+ else
+ nAngle = ( 36000 - ( nAngle % 36000 ) );
+
+ nAngle *= 655;
+ nAngle += 0x8000;
+ nAngle &=~0xffff; // nAngle auf volle Gradzahl runden
+ mpEscherEx->AddOpt( ESCHER_Prop_Rotation, nAngle );
+ mpEscherEx->SetGroupSnapRect( mpEscherEx->GetGroupLevel(),
+ rObj.GetRect() );
+ mpEscherEx->SetGroupLogicRect( mpEscherEx->GetGroupLevel(),
+ rObj.GetRect() );
+ }
+ rObj.SetAngle( nAngle );
+ mpEscherEx->EndCount( ESCHER_OPT, 3 );
+
+ // write the childanchor
+ mpEscherEx->AddAtom( 16, ESCHER_ChildAnchor );
+ const Rectangle& rRect = rObj.GetRect();
+ mpEscherEx->GetStream() << (INT32)rRect.Left()
+ << (INT32)rRect.Top()
+ << (INT32)rRect.Right()
+ << (INT32)rRect.Bottom();
+
+#if EES_WRITE_EPP
+ // ClientAnchor
+ mpEscherEx->AddClientAnchor( maRect );
+ // ClientTextbox
+ mpEscherEx->OpenContainer( ESCHER_ClientTextbox );
+ mpEscherEx->AddAtom( 4, EPP_TextHeaderAtom );
+ *mpStrm << (UINT32)EPP_TEXTTYPE_Other; // Text in a Shape
+ ImplWriteTextStyleAtom();
+ mpEscherEx->CloseContainer(); // ESCHER_ClientTextBox
+#else // !EES_WRITE_EPP
+ if ( mpHostAppData )
+ { //! the App has to control whether these are written or not
+ mpHostAppData->WriteClientAnchor( *mpEscherEx, rObj.GetRect() );
+ mpHostAppData->WriteClientData( *mpEscherEx );
+ mpHostAppData->WriteClientTextbox( *mpEscherEx );
+ }
+#endif // EES_WRITE_EPP
+ mpEscherEx->CloseContainer(); // ESCHER_SpContainer
+ } while ( 0 );
+ mpEscherEx->LeaveGroup();
+ mpEscherEx->EndShape( nShapeType, nShapeID );
+}
+
+
+// -------------------------------------------------------------------
+
+UINT32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShape >& rShape,
+ const Rectangle* pBoundRect )
+{
+ mpHostAppData = mpEscherEx->EnterAdditionalTextGroup();
+ UINT32 nGrpId = mpEscherEx->EnterGroup( pBoundRect );
+ mpHostAppData = mpEscherEx->StartShape( rShape );
+ return nGrpId;
+}
+
+
+// -------------------------------------------------------------------
+
+BOOL ImplEESdrWriter::ImplInitPageValues()
+{
+ mnIndices = 0;
+ mnOutlinerCount = 0; // die gliederungsobjekte muessen dem layout entsprechen,
+ mnPrevTextStyle = mnTextStyle; // es darf nicht mehr als zwei geben
+ mnEffectCount = 0;
+ mbIsTitlePossible = TRUE; // bei mehr als einem title geht powerpoint in die knie
+
+ return TRUE;
+}
+
+
+// -------------------------------------------------------------------
+
+void ImplEESdrWriter::ImplWritePage(
+ ImplEESdrSolverContainer& rSolverContainer,
+ ImplEESdrPageType ePageType, BOOL bBackGround )
+{
+#if 0
+ ImplInitPageValues();
+
+ UINT32 nShapes, nShapeCount, nLastPer;
+
+ ResetGroupTable( nShapes = mXShapes->getCount() );
+
+ nLastPer = nShapeCount = 0;
+
+ while( GetNextGroupEntry() )
+ {
+ nShapeCount++;
+
+ UINT32 nPer = ( 5 * nShapeCount ) / nShapes;
+ if ( nPer != nLastPer )
+ {
+ nLastPer = nPer;
+ UINT32 nValue = mnPagesWritten * 5 + nPer;
+ if ( nValue > mnStatMaxValue )
+ nValue = mnStatMaxValue;
+ if ( mbStatusIndicator )
+ mXStatusIndicator->setValue( nValue );
+ }
+ UINT32 nGroups = GetGroupsClosed();
+ for ( UINT32 i = 0; i < nGroups; i++, mpEscherEx->LeaveGroup() );
+
+ if ( ImplGetShapeByIndex( GetCurrentGroupIndex(), TRUE ) )
+ {
+ if( bBackGround && ( nShapeCount == 1 ) &&
+ rObj.GetType().EqualsAscii( "drawing.Rectangle" ) ) // background shape auf der MasterPage
+ continue; // wird uebersprungen
+ ImplWriteShape( rSolverContainer, ePageType );
+ }
+ mnPrevTextStyle = mnTextStyle;
+ }
+ ClearGroupTable(); // gruppierungen wegschreiben, sofern noch irgendwelche offen sind, was eigendlich nicht sein sollte
+ UINT32 nGroups = GetGroupsClosed();
+ for ( UINT32 i = 0; i < nGroups; i++, mpEscherEx->LeaveGroup() );
+ mnPagesWritten++;
+
+#else
+
+ ImplInitPageValues();
+
+ UINT32 nLastPer = 0, nShapes = mXShapes->getCount();
+ for( UINT32 n = 0; n < nShapes; ++n )
+ {
+ UINT32 nPer = ( 5 * n ) / nShapes;
+ if( nPer != nLastPer )
+ {
+ nLastPer = nPer;
+ UINT32 nValue = mnPagesWritten * 5 + nPer;
+ if( nValue > mnStatMaxValue )
+ nValue = mnStatMaxValue;
+ if( mbStatusIndicator )
+ mXStatusIndicator->setValue( nValue );
+ }
+
+ ImplEESdrObject aObj( *this, *(Reference< XShape >*)
+ mXShapes->getByIndex( n ).getValue() );
+ if( aObj.IsValid() )
+ {
+ ImplWriteShape( aObj, rSolverContainer, ePageType );
+ }
+
+#if EES_WRITE_EPP
+ mnPrevTextStyle = mnTextStyle;
+#endif
+ }
+
+ mnPagesWritten++;
+
+#endif
+}
+
+
+// -------------------------------------------------------------------
+
+void ImplEESdrWriter::ImplWriteLineBundle( ImplEESdrObject& rObj, BOOL bEdge )
+{
+ UINT32 nLineFlags = 0x80008;
+ ESCHER_LineEnd eLineEnd = ESCHER_LineArrowEnd;
+
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("LineStart") ))
+ {
+ PointSequence* pPolyPolygon = (PointSequence*)rObj.GetUsrAny().getValue();
+ INT32 nSequenceCount = pPolyPolygon->getLength();
+ if ( nSequenceCount )
+ {
+ // Zeiger auf innere sequences holen
+ awt::Point* pSequence = pPolyPolygon->getArray();
+ if ( pSequence )
+ {
+ switch ( nSequenceCount )
+ {
+ case 0x4 :
+ {
+ switch( pSequence->X )
+ {
+ case 0 : eLineEnd = ESCHER_LineArrowDiamondEnd; break;
+ case 0x529 : eLineEnd = ESCHER_LineArrowStealthEnd; break;
+ }
+ }
+ break;
+ case 0x7 : eLineEnd = ESCHER_LineArrowDiamondEnd; break;
+ case 0xa : eLineEnd = ESCHER_LineArrowStealthEnd; break;
+ case 0xd :
+ {
+ switch ( pSequence->X )
+ {
+ case 0 : eLineEnd = ESCHER_LineArrowDiamondEnd; break;
+ case 0x64 : eLineEnd = ESCHER_LineArrowOvalEnd; break;
+ case 0x87c : ESCHER_LineArrowStealthEnd; break;
+ }
+ }
+ }
+ mpEscherEx->AddOpt( ESCHER_Prop_lineStartArrowLength, 1 );
+ mpEscherEx->AddOpt( ESCHER_Prop_lineStartArrowWidth, 1 );
+ mpEscherEx->AddOpt( ESCHER_Prop_lineStartArrowhead, eLineEnd );
+ nLineFlags |= 0x100010;
+ }
+ }
+ }
+
+ eLineEnd = ESCHER_LineArrowEnd;
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("LineEnd") ))
+ {
+ PointSequence* pPolyPolygon = (PointSequence*)rObj.GetUsrAny().getValue();
+ INT32 nSequenceCount = pPolyPolygon->getLength();
+ if ( nSequenceCount )
+ {
+ // Zeiger auf innere sequences holen
+ awt::Point* pSequence = pPolyPolygon->getArray();
+ if ( pSequence )
+ {
+ switch ( nSequenceCount )
+ {
+ case 0x4 :
+ {
+ switch( pSequence->X )
+ {
+ case 0 : eLineEnd = ESCHER_LineArrowDiamondEnd; break;
+ case 0x529 : eLineEnd = ESCHER_LineArrowStealthEnd; break;
+ }
+ }
+ break;
+ case 0x7 : eLineEnd = ESCHER_LineArrowDiamondEnd; break;
+ case 0xa : eLineEnd = ESCHER_LineArrowStealthEnd; break;
+ case 0xd :
+ {
+ switch ( pSequence->X )
+ {
+ case 0 : eLineEnd = ESCHER_LineArrowDiamondEnd; break;
+ case 0x64 : eLineEnd = ESCHER_LineArrowOvalEnd; break;
+ case 0x87c : ESCHER_LineArrowStealthEnd; break;
+ }
+ }
+ }
+ mpEscherEx->AddOpt( ESCHER_Prop_lineEndArrowLength, 1 );
+ mpEscherEx->AddOpt( ESCHER_Prop_lineEndArrowWidth, 1 );
+ mpEscherEx->AddOpt( ESCHER_Prop_lineEndArrowhead, eLineEnd );
+ nLineFlags |= 0x100010;
+ }
+ }
+ }
+
+ rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("LineStyle"));
+
+ LineStyle* pLineStyle = (LineStyle*)rObj.GetUsrAny().getValue();
+
+ rObj.SetShadow( rObj.GetShadow() | 1 );
+ if ( pLineStyle )
+ {
+ switch ( *pLineStyle )
+ {
+ case LineStyle_NONE :
+ {
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90000 ); // 80000
+ rObj.SetShadow( rObj.GetShadow() ^ 1 );
+ }
+ break;
+
+ case LineStyle_DASH :
+ {
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("LineDash") ))
+ {
+ ESCHER_LineDashing eDash = ESCHER_LineSolid;
+ LineDash* pLineDash = (LineDash*)rObj.GetUsrAny().getValue();
+ UINT32 nDistance = pLineDash->Distance << 1;
+ switch ( pLineDash->Style )
+ {
+ case DashStyle_ROUND :
+ case DashStyle_ROUNDRELATIVE :
+ mpEscherEx->AddOpt( ESCHER_Prop_lineEndCapStyle, 0 ); // Style Round setzen
+ break;
+ }
+ if ( ((!(pLineDash->Dots )) ||
+ (!(pLineDash->Dashes )) ) ||
+ ( pLineDash->DotLen == pLineDash->DashLen ) )
+ {
+ UINT32 nLen = pLineDash->DotLen;
+ if ( pLineDash->Dashes )
+ nLen = pLineDash->DashLen;
+
+ if ( nLen >= nDistance )
+ eDash = ESCHER_LineLongDashGEL;
+ else if ( pLineDash->Dots )
+ eDash = ESCHER_LineDotSys;
+ else
+ eDash = ESCHER_LineDashGEL;
+ }
+ else // X Y
+ {
+ if ( pLineDash->Dots != pLineDash->Dashes )
+ {
+ if ( ( pLineDash->DashLen > nDistance ) ||
+ ( pLineDash->DotLen > nDistance ) )
+ eDash = ESCHER_LineLongDashDotDotGEL;
+ else
+ eDash = ESCHER_LineDashDotDotSys;
+ }
+ else // X Y Y
+ {
+ if ( ( pLineDash->DashLen > nDistance ) ||
+ ( pLineDash->DotLen > nDistance ) )
+ eDash = ESCHER_LineLongDashDotGEL;
+ else
+ eDash = ESCHER_LineDashDotGEL;
+
+ }
+ }
+ mpEscherEx->AddOpt( ESCHER_Prop_lineDashing, eDash );
+ }
+ }
+ case LineStyle_SOLID :
+ default:
+ {
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoLineDrawDash, nLineFlags );
+ }
+ break;
+ }
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("LineColor") ))
+ {
+ UINT32 nLineColor = mpEscherEx->GetColor(
+ *((UINT32*)rObj.GetUsrAny().getValue()) );
+ mpEscherEx->AddOpt( ESCHER_Prop_lineColor, nLineColor );
+ mpEscherEx->AddOpt( ESCHER_Prop_lineBackColor, nLineColor ^ 0xffffff );
+ }
+ }
+
+ UINT32 nLineSize = (UINT32)rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("LineWidth"));
+
+ if ( nLineSize > 1 )
+ mpEscherEx->AddOpt( ESCHER_Prop_lineWidth, nLineSize * 360 ); // 100TH MM -> PT , 1PT = 12700 EMU
+ if ( bEdge == FALSE )
+ {
+ mpEscherEx->AddOpt( ESCHER_Prop_fFillOK, 0x1001 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100000 );
+ }
+}
+
+
+// -------------------------------------------------------------------
+
+void ImplEESdrWriter::ImplWriteFillBundle( ImplEESdrObject& rObj, BOOL bEdge )
+{
+ mpEscherEx->AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapNone );
+ mpEscherEx->AddOpt( ESCHER_Prop_AnchorText, ESCHER_AnchorMiddle );
+
+ UINT32 nFillBackColor = 0;
+ rObj.SetShadow( rObj.GetShadow() | 2 );
+
+ FillStyle* pFillStyle = ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("FillStyle") ))
+ ? (FillStyle*)rObj.GetUsrAny().getValue()
+ : 0;
+ if ( pFillStyle )
+ {
+ switch( *pFillStyle )
+ {
+ case FillStyle_GRADIENT :
+ {
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("FillGradient") ))
+ {
+ awt::Gradient* pVCLGradient = (awt::Gradient*)rObj.GetUsrAny().getValue();
+ mpEscherEx->WriteGradient( pVCLGradient );
+ }
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x140014 );
+ }
+ break;
+
+ case FillStyle_BITMAP :
+ {
+ ImplGetGraphic( rObj, ::rtl::OUString::createFromAscii("FillBitmap"), TRUE );
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x140014 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fillBackColor, nFillBackColor );
+ }
+ break;
+ case FillStyle_HATCH :
+ case FillStyle_SOLID :
+ default:
+ {
+ sal_Int16 nTransparency = 0;
+ if( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("FillTransparence") ))
+ rObj.GetUsrAny() >>= nTransparency;
+ if ( nTransparency != 100 )
+ {
+ if ( nTransparency ) // opacity
+ mpEscherEx->AddOpt( ESCHER_Prop_fillOpacity, ( ( 100 - nTransparency ) << 16 ) / 100 );
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("FillColor") ))
+ {
+ UINT32 nFillColor = mpEscherEx->GetColor(
+ *((UINT32*)rObj.GetUsrAny().getValue()) );
+ nFillBackColor = nFillColor ^ 0xffffff;
+ mpEscherEx->AddOpt( ESCHER_Prop_fillColor, nFillColor );
+ }
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100010 );
+ mpEscherEx->AddOpt( ESCHER_Prop_fillBackColor, nFillBackColor );
+ break;
+ }
+ }
+ case FillStyle_NONE :
+ {
+ mpEscherEx->AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100000 );
+ rObj.SetShadow( rObj.GetShadow() ^ 2 );
+ }
+ break;
+ }
+ }
+ ImplWriteLineBundle( rObj, bEdge );
+}
+
+
+// -------------------------------------------------------------------
+#ifdef USED
+BOOL ImplEESdrWriter::ImplIsMetaFile( ImplEESdrObject& rObj )
+{
+ if( !rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("GraphicObjectFillBitmap") ))
+ return FALSE;
+ return ( rObj.GetUsrAny().getReflection() != XBitmap_getReflection() );
+}
+#endif
+
+// -------------------------------------------------------------------
+
+BOOL ImplEESdrWriter::ImplGetGraphic( ImplEESdrObject& rObj,
+ const sal_Unicode* pName, BOOL bFillBitmap )
+{
+ if( rObj.ImplGetPropertyValue( pName ) )
+ {
+#if EES_WRITE_EEP
+ if ( !mpPicStrm )
+ mpPicStrm = mrStg->OpenStream( "Pictures" );
+#else // !EES_WRITE_EEP
+ if ( !mpPicStrm )
+ mpPicStrm = mpEscherEx->QueryPicStream();
+#endif // EES_WRITE_EEP
+ if ( mpPicStrm )
+ {
+ if( rObj.GetUsrAny().getValueType() == ::getCppuType(( const Reference< awt::XBitmap >*)0) ) // bitmap oder wmf ?
+ {
+ Reference< awt::XBitmap > xBitmap( *(Reference< awt::XBitmap >*)rObj.GetUsrAny().getValue() );
+ if ( xBitmap.is() )
+ {
+ BitmapEx aBitmapEx( VCLUnoHelper::GetBitmap(xBitmap) );
+ OUString aName( pName );
+
+ if( aName.compareToAscii("FillBitmap") == 0 &&
+ rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("FillBitmapTile")) &&
+ ::cppu::any2bool( rObj.GetUsrAny() ) )
+ mpEscherEx->AddOpt( ESCHER_Prop_fillType,
+ ESCHER_FillTexture );
+ else
+ {
+ if( rObj.GetAngle() ) // PPoint kann keine gedrehten Grafiken darstellen !
+ {
+ rObj.SetAngle( ( rObj.GetAngle() + 5 ) / 10 );
+ Polygon aPoly( rObj.GetRect() );
+ aPoly.Rotate( rObj.GetRect().TopLeft(),
+ rObj.GetAngle() );
+ rObj.SetRect( aPoly.GetBoundRect() );
+ aBitmapEx.Rotate( rObj.GetAngle(), COL_TRANSPARENT );
+ rObj.SetAngle( 0 );
+ }
+ mpEscherEx->AddOpt( ESCHER_Prop_fillType,
+ ESCHER_FillPicture );
+ }
+ mpEscherEx->AddOpt( bFillBitmap ? ESCHER_Prop_fillBlip
+ : ESCHER_Prop_pib,
+ mpEscherEx->AddGraphic( *mpPicStrm,
+ Graphic( aBitmapEx ) ), TRUE );
+ return TRUE;
+ }
+ }
+ else
+ {
+ BOOL bExportEMF( FALSE );
+ Rectangle aRect( rObj.GetRect() );
+ Any aOLE2Any( rObj.GetUsrAny() );
+
+ if ( !aOLE2Any.hasValue() )
+ return FALSE;
+
+ if ( mpEscherEx->IsOleEmf() &&
+ rObj.GetType().EqualsAscii( "drawing.OLE2" ))
+ {
+ if ( rObj.ImplGetPropertyValue( ::rtl::OUString::createFromAscii("OriginalSize") ) )
+ {
+ Any aAny( rObj.GetUsrAny() );
+ if ( aAny.getValueType() == ::getCppuType(( const awt::Size *)0) )
+ {
+ awt::Size aSize( *(awt::Size*)aAny.getValue() );
+ aRect = Rectangle( Point(), Size( aSize.Width, aSize.Height ) ); // only real ole2 objects supports this property
+ bExportEMF = TRUE;
+ }
+ }
+ }
+ if ( bExportEMF )
+ {
+ Graphic aGraphic;
+ int nRes = 0;
+ {
+ Sequence<sal_Int8> aWmfSeq(*(Sequence<sal_Int8>*)aOLE2Any.getValue());
+ const sal_Int8* pAry = aWmfSeq.getArray();
+ UINT32 nAryLen = aWmfSeq.getLength();
+ if ( pAry && nAryLen )
+ {
+ SvMemoryStream aSource( (sal_Char*)pAry, nAryLen, STREAM_READ );
+ nRes = GraphicConverter::Import( aSource, aGraphic, CVT_WMF );
+ }
+ }
+ SvMemoryStream aDest;
+ nRes = GraphicConverter::Export( aDest, aGraphic, CVT_EMF );
+
+ if ( nRes )
+ return FALSE;
+
+ aDest.Seek( STREAM_SEEK_TO_END );
+ mpEscherEx->AddOpt( ESCHER_Prop_pib, mpEscherEx->AddEMF(
+ *mpPicStrm, (const BYTE*)aDest.GetData(), aDest.Tell(),
+ aRect ), TRUE );
+ }
+ else
+ {
+ Sequence<sal_Int8> aWmfSeq(*(Sequence<sal_Int8>*)aOLE2Any.getValue());
+ const sal_Int8* pAry = aWmfSeq.getArray();
+ if ( pAry )
+ mpEscherEx->AddOpt( ESCHER_Prop_pib, mpEscherEx->AddWMF(
+ *mpPicStrm, (BYTE*)pAry, aWmfSeq.getLength(),
+ aRect ), TRUE );
+ }
+ return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
+
+
+// ===================================================================
+
+ImplEscherExSdr::ImplEscherExSdr( EscherEx& rEx )
+ :
+ ImplEESdrWriter( rEx ),
+ mpSdrPage( NULL ),
+ mpSolverContainer( NULL )
+{
+}
+
+
+// -------------------------------------------------------------------
+
+ImplEscherExSdr::~ImplEscherExSdr()
+{
+ DBG_ASSERT( !mpSolverContainer, "ImplEscherExSdr::~ImplEscherExSdr: unwritten SolverContainer" );
+ delete mpSolverContainer;
+}
+
+
+// -------------------------------------------------------------------
+
+SvxDrawPage* ImplEscherExSdr::ImplInitPage( const SdrPage& rPage )
+{
+ do
+ {
+ SvxDrawPage* pSvxDrawPage;
+ if ( mpSdrPage != &rPage || !mXDrawPage.is() )
+ {
+ // eventually write SolverContainer of current page, deletes the Solver
+ ImplFlushSolverContainer();
+
+ mpSdrPage = NULL;
+ // why not declare a const parameter if the object will not be modified?
+// mXDrawPage = pSvxDrawPage = new SvxDrawPage( (SdrPage*) &rPage );
+ mXDrawPage = pSvxDrawPage = new SvxFmDrawPage( (SdrPage*) &rPage );
+ mXShapes = Reference< XShapes >::query( mXDrawPage );
+ if ( !mXShapes.is() )
+ break;
+ if ( !ImplInitPageValues() ) // ImplEESdrWriter
+ break;
+ mpSdrPage = &rPage;
+
+ mpSolverContainer = new ImplEESdrSolverContainer;
+ }
+ else
+ pSvxDrawPage = SvxDrawPage::getImplementation(mXDrawPage);
+
+ return pSvxDrawPage;
+ } while ( 0 );
+
+ return NULL;
+}
+
+
+// -------------------------------------------------------------------
+
+void ImplEscherExSdr::ImplExitPage()
+{
+ ImplFlushSolverContainer();
+ mpSdrPage = NULL; // reset page for next init
+}
+
+
+// -------------------------------------------------------------------
+
+void ImplEscherExSdr::ImplFlushSolverContainer()
+{
+ if ( mpSolverContainer )
+ {
+ mpSolverContainer->WriteSolver( *mpEscherEx );
+ delete mpSolverContainer;
+ mpSolverContainer = NULL;
+ }
+}
+
+
+// -------------------------------------------------------------------
+
+void ImplEscherExSdr::ImplWriteCurrentPage()
+{
+ DBG_ASSERT( mpSolverContainer, "ImplEscherExSdr::ImplWriteCurrentPage: no SolverContainer" );
+ ImplWritePage( *mpSolverContainer, NORMAL );
+ ImplExitPage();
+}
+
+
+// -------------------------------------------------------------------
+
+UINT32 ImplEscherExSdr::ImplWriteTheShape( ImplEESdrObject& rObj )
+{
+ DBG_ASSERT( mpSolverContainer, "ImplEscherExSdr::ImplWriteShape: no SolverContainer" );
+ return ImplWriteShape( rObj, *mpSolverContainer, NORMAL );
+}
+
+
+// ===================================================================
+
+void EscherEx::AddSdrPage( const SdrPage& rPage )
+{
+ if ( mpImplEscherExSdr->ImplInitPage( rPage ) )
+ mpImplEscherExSdr->ImplWriteCurrentPage();
+}
+
+
+// -------------------------------------------------------------------
+
+UINT32 EscherEx::AddSdrObject( const SdrObject& rObj )
+{
+ ImplEESdrObject aObj( *mpImplEscherExSdr, rObj );
+ if( aObj.IsValid() )
+ return mpImplEscherExSdr->ImplWriteTheShape( aObj );
+ return 0;
+}
+
+
+// -------------------------------------------------------------------
+
+void EscherEx::EndSdrObjectPage()
+{
+ mpImplEscherExSdr->ImplExitPage();
+}
+
+// -------------------------------------------------------------------
+
+EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& rShape )
+{
+ return NULL;
+}
+
+// -------------------------------------------------------------------
+
+void EscherEx::EndShape( UINT16 nShapeType, UINT32 nShapeID )
+{
+}
+
+// -------------------------------------------------------------------
+
+SvStream* EscherEx::QueryPicStream()
+{
+ return NULL;
+}
+
+// -------------------------------------------------------------------
+
+UINT32 EscherEx::QueryTextID( const Reference< XShape >&, UINT32 )
+{
+ return 0;
+}
+
+// -------------------------------------------------------------------
+// add an dummy rectangle shape into the escher stream
+UINT32 EscherEx::AddDummyShape( const SdrObject& rObj )
+{
+ OpenContainer( ESCHER_SpContainer );
+ UINT32 nShapeID = GetShapeID();
+ AddShape( ESCHER_ShpInst_Rectangle, 0xa00, nShapeID );
+//?? aSolverContainer.AddShape( mXShape, nShapeID );
+ CloseContainer();
+
+ return nShapeID;
+}
+
+// -------------------------------------------------------------------
+
+// static
+const SdrObject* EscherEx::GetSdrObject( const Reference< XShape >& rShape )
+{
+ const SdrObject* pRet = 0;
+ const SvxShape* pSvxShape = SvxShape::getImplementation( rShape );
+ DBG_ASSERT( pSvxShape, "EscherEx::GetSdrObject: no SvxShape" );
+ if( pSvxShape )
+ {
+ pRet = pSvxShape->GetSdrObject();
+ DBG_ASSERT( pRet, "EscherEx::GetSdrObject: no SdrObj" );
+ }
+ return pRet;
+}
+
+
+// -------------------------------------------------------------------
+
+ImplEESdrObject::ImplEESdrObject( ImplEscherExSdr& rEx,
+ const SdrObject& rObj )
+ : mbValid( FALSE ), mbPresObj( FALSE ), mbEmptyPresObj( FALSE ),
+ mnShapeId( 0 ), mnAngle( 0 ), mnShadow( 0 ), mnTextSize( 0 )
+{
+ SdrPage* pPage = rObj.GetPage();
+ DBG_ASSERT( pPage, "ImplEESdrObject::ImplEESdrObject: no SdrPage" );
+ if( pPage )
+ {
+ SvxDrawPage* pSvxDrawPage = rEx.ImplInitPage( *pPage );
+ if( pSvxDrawPage )
+ {
+ // why not declare a const parameter if the object will
+ // not be modified?
+ mXShape = pSvxDrawPage->_CreateShape( (SdrObject*) &rObj );
+ Init( rEx );
+ }
+ }
+}
+
+ImplEESdrObject::ImplEESdrObject( ImplEESdrWriter& rEx,
+ const Reference< XShape >& rShape )
+ : mbValid( FALSE ), mbPresObj( FALSE ), mbEmptyPresObj( FALSE ),
+ mnShapeId( 0 ), mnAngle( 0 ), mnShadow( 0 ), mXShape( rShape ),
+ mnTextSize( 0 )
+{
+ Init( rEx );
+}
+
+
+ImplEESdrObject::~ImplEESdrObject()
+{
+}
+
+void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
+{
+ mXPropSet = Reference< XPropertySet >::query( mXShape );
+ if( mXPropSet.is() )
+ {
+ SetRect( rEx.ImplMapPoint( Point( mXShape->getPosition().X, mXShape->getPosition().Y ) ),
+ rEx.ImplMapSize( Size( mXShape->getSize().Width, mXShape->getSize().Height ) ) );
+ mType = String( mXShape->getShapeType() );
+ mType.Erase( 0, 13 ); // strip "com.sun.star."
+ xub_StrLen nPos = mType.SearchAscii( "Shape" );
+ mType.Erase( nPos, 5 );
+
+ static const OUString sPresStr(rtl::OUString::createFromAscii("IsPresentationObject"));
+ static const OUString sEmptyPresStr(rtl::OUString::createFromAscii("IsEmptyPresentationObject"));
+
+ if( ImplGetPropertyValue( sPresStr ) )
+ mbPresObj = ::cppu::any2bool( mAny );
+
+ if( mbPresObj && ImplGetPropertyValue( sEmptyPresStr ) )
+ mbEmptyPresObj = ::cppu::any2bool( mAny );
+
+ mbValid = TRUE;
+ }
+}
+
+//BOOL ImplEESdrObject::ImplGetPropertyValue( const OUString& rString )
+BOOL ImplEESdrObject::ImplGetPropertyValue( const sal_Unicode* rString )
+{
+ BOOL bRetValue = FALSE;
+ if( mbValid )
+ {
+ try
+ {
+ mAny = mXPropSet->getPropertyValue( rString );
+ if( mAny.hasValue() )
+ bRetValue = TRUE;
+ }
+ catch(...)
+ {
+ bRetValue = FALSE;
+ }
+ }
+ return bRetValue;
+}
+
+#ifdef USED
+BOOL ImplEESdrObject::ImplGetPropertyValue( const Reference< XPropertySet >& rXPropSet,
+ const OUString& rString )
+{
+ BOOL bRetValue = FALSE;
+ if( mbValid )
+ {
+ TRY
+ {
+ mAny = rXPropSet->getPropertyValue( rString );
+ if( 0 != mAny.get() )
+ bRetValue = TRUE;
+ }
+ CATCH_ALL()
+ {
+ bRetValue = FALSE;
+ }
+ END_CATCH;
+ }
+ return bRetValue;
+}
+#endif
+
+void ImplEESdrObject::SetRect( const Point& rPos, const Size& rSz )
+{
+ maPosition = rPos;
+ maSize = rSz;
+ maRect = Rectangle( maPosition, maSize );
+}
+
+const SdrObject* ImplEESdrObject::GetSdrObject() const
+{
+ return EscherEx::GetSdrObject( mXShape );
+}
+
+// laedt und konvertiert text aus shape, ergebnis ist mnTextSize gespeichert
+UINT32 ImplEESdrObject::ImplGetText()
+{
+ Reference< XText > xXText( mXShape, UNO_QUERY );
+ mnTextSize = 0;
+ if( xXText.is() )
+ mnTextSize = xXText->getString().getLength();
+ return mnTextSize;
+}
+
+BOOL ImplEESdrObject::ImplHasText() const
+{
+ Reference< XText > xXText( mXShape, UNO_QUERY );
+ return xXText.is();
+}
+
diff --git a/svx/source/msfilter/eschesdo.hxx b/svx/source/msfilter/eschesdo.hxx
new file mode 100644
index 0000000000..d7994ee537
--- /dev/null
+++ b/svx/source/msfilter/eschesdo.hxx
@@ -0,0 +1,389 @@
+/*************************************************************************
+ *
+ * $RCSfile: eschesdo.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _ESCHESDO_HXX
+#define _ESCHESDO_HXX
+
+#ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
+#include <com/sun/star/awt/FontDescriptor.hpp>
+#endif
+
+#ifndef _SVX_UNOWPAGE_HXX //autogen wg. SvxDrawPage
+#include "unopage.hxx"
+#endif
+
+#ifndef _SV_MAPMOD_HXX //autogen wg. MapMode
+#include <vcl/mapmod.hxx>
+#endif
+
+// ===================================================================
+// fractions of Draw PPTWriter etc.
+
+enum ImplEESdrPageType { NORMAL = 0, MASTER = 1, NOTICE = 2, UNDEFINED = 3 };
+
+struct ImplEESdrSOParagraph
+{
+ BOOL bDepth;
+ BOOL bExtendedParameters;
+ UINT32 nParaFlags;
+ INT16 nBulletFlags;
+ String sPrefix;
+ String sSuffix;
+ String sGraphicUrl; // String auf eine Graphic
+ UINT32 nNumberingType; // in wirlichkeit ist dies ein SvxEnum
+ UINT32 nHorzAdjust;
+ UINT32 nBulletColor;
+ INT32 nFirstOffset;
+ INT16 nStartWith; // Start der nummerierung
+ INT16 nLeftMargin;
+ INT16 nBulletRealSize;// GroessenVerhaeltnis in Proz
+ INT16 nDepth; // aktuelle tiefe
+ sal_Unicode cBulletId; // wenn Numbering Type == CharSpecial
+ ::com::sun::star::awt::FontDescriptor aFontDesc;
+
+ ImplEESdrSOParagraph()
+ {
+ nDepth = 0;
+ bDepth = TRUE;
+ bExtendedParameters = FALSE;
+ nParaFlags = 0;
+ nBulletFlags = 0;
+ };
+};
+
+
+// -------------------------------------------------------------------
+
+struct ImplEESdrConnectorRule
+{
+ UINT32 nRuleId;
+ UINT32 nShapeA; // SPID of shape A
+ UINT32 nShapeB; // SPID of shape B
+ UINT32 nShapeC; // SPID of connector shape
+ UINT32 ncptiA; // Connection site Index of shape A
+ UINT32 ncptiB; // Connection site Index of shape B
+};
+
+
+// -------------------------------------------------------------------
+
+class ImplEESdrShapeListEntry
+{
+
+ friend class ImplEESdrSolverContainer;
+
+protected:
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > aXShape;
+ UINT32 nEscherId;
+
+public:
+ ImplEESdrShapeListEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape,
+ UINT32 nId )
+ :aXShape ( rShape ),
+ nEscherId ( nId )
+ {}
+};
+
+
+// -------------------------------------------------------------------
+
+class ImplEESdrConnectorListEntry
+{
+
+ friend class ImplEESdrSolverContainer;
+
+protected:
+
+ Point maPointA;
+ Point maPointB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnector;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnectToA;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnectToB;
+
+public:
+
+ UINT32 GetConnectorRule( BOOL bFirst );
+ ImplEESdrConnectorListEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rC,
+ const Point& rPA, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rSA,
+ const Point& rPB, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rSB )
+ : mXConnector( rC ),
+ maPointA ( rPA ),
+ maPointB ( rPB ),
+ mXConnectToA( rSA ),
+ mXConnectToB( rSB )
+ {}
+};
+
+
+// -------------------------------------------------------------------
+
+class EscherEx;
+class ImplEESdrSolverContainer
+{
+ List maShapeList;
+ List maConnectorList;
+
+ UINT32 ImplGetId( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape );
+
+public:
+ void AddShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >&, UINT32 nId );
+ void AddConnector( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rConnector,
+ const Point& rA, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rConA,
+ const Point& rB, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rConB );
+
+ void WriteSolver( EscherEx& );
+
+ ImplEESdrSolverContainer(){};
+ ~ImplEESdrSolverContainer();
+};
+
+
+// -------------------------------------------------------------------
+
+class ImplEESdrWriter;
+class ImplEscherExSdr;
+
+class ImplEESdrObject
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXShape;
+// XTextRef mXText; // TextRef des globalen Text
+ ::com::sun::star::uno::Any mAny;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mXPropSet;
+ Size maSize;
+ Point maPosition;
+ Rectangle maRect;
+ String mType;
+ UINT32 mnShapeId;
+ UINT32 mnTextSize;
+ INT32 mnAngle;
+ INT32 mnShadow; // eq 0 if fillstyle && linestyle == None
+ BOOL mbValid : 1;
+ BOOL mbPresObj : 1;
+ BOOL mbEmptyPresObj : 1;
+
+ void Init( ImplEESdrWriter& rEx );
+public:
+
+ ImplEESdrObject( ImplEscherExSdr& rEx, const SdrObject& rObj );
+ ImplEESdrObject( ImplEESdrWriter& rEx, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape );
+ ~ImplEESdrObject();
+
+ BOOL ImplGetPropertyValue( const sal_Unicode* pString );
+
+ INT32 ImplGetInt32PropertyValue( const sal_Unicode* pStr, UINT32 nDef = 0 )
+ { return ImplGetPropertyValue( pStr ) ? *(INT32*)mAny.getValue() : nDef; }
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& GetShapeRef() const { return mXShape; }
+ const ::com::sun::star::uno::Any& GetUsrAny() const { return mAny; }
+ const String& GetType() const { return mType; }
+ void SetType( const String& rS ) { mType = rS; }
+
+ const Size& GetSize() const { return maSize; }
+ const Point& GetPos() const { return maPosition; }
+ const Rectangle& GetRect() const { return maRect; }
+ void SetRect( const Point& rPos, const Size& rSz );
+ void SetRect( const Rectangle& rRect )
+ { maRect = rRect; }
+
+ INT32 GetAngle() const { return mnAngle; }
+ void SetAngle( INT32 nVal ) { mnAngle = nVal; }
+
+ INT32 GetShadow() const { return mnShadow; }
+ void SetShadow( INT32 nVal ) { mnShadow = nVal; }
+
+ UINT32 GetTextSize() const { return mnTextSize; }
+
+ BOOL IsValid() const { return mbValid; }
+ BOOL IsPresObj() const { return mbPresObj; }
+ BOOL IsEmptyPresObj() const { return mbEmptyPresObj; }
+ UINT32 GetShapeId() const { return mnShapeId; }
+ void SetShapeId( UINT32 nVal ) { mnShapeId = nVal; }
+
+ const SdrObject* GetSdrObject() const;
+
+ UINT32 ImplGetText();
+ BOOL ImplHasText() const;
+};
+
+
+
+// -------------------------------------------------------------------
+// fractions of the Draw PPTWriter
+
+class EscherEx;
+namespace com { namespace sun { namespace star {
+ namespace drawing {
+ class XDrawPage;
+ class XShape;
+ }
+ namespace task {
+ class XStatusIndicator;
+ }
+}}}
+class EscherExHostAppData;
+class Polygon;
+
+class ImplEESdrWriter
+{
+protected:
+ EscherEx* mpEscherEx;
+ BOOL mbStatus;
+ UINT32 mnStatMaxValue;
+ MapMode maMapModeSrc;
+ MapMode maMapModeDest;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > mXStatusIndicator;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > mXDrawPage;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mXShapes;
+ BOOL mbStatusIndicator;
+ UINT32 mnTextStyle;
+
+ UINT32 mnPagesWritten;
+
+ UINT32 mnShapeMasterTitle;
+ UINT32 mnShapeMasterBody;
+
+ SvStream* mpPicStrm;
+
+
+ // own extensions
+
+ EscherExHostAppData* mpHostAppData;
+
+ // per page values
+ UINT32 mnIndices;
+ UINT32 mnOutlinerCount;
+ UINT32 mnPrevTextStyle;
+ UINT16 mnEffectCount;
+ BOOL mbIsTitlePossible;
+
+
+ ImplEESdrWriter( EscherEx& rEx );
+
+ BOOL ImplInitPageValues();
+
+ void ImplWritePage(
+ ImplEESdrSolverContainer& rSolver,
+ ImplEESdrPageType ePageType,
+ BOOL bBackGround = FALSE );
+// BOOL ImplGetShapeByIndex( UINT32 nIndex, BOOL bGroup = FALSE );
+
+ UINT32 ImplWriteShape( ImplEESdrObject& rObj,
+ ImplEESdrSolverContainer& rSolver,
+ ImplEESdrPageType ePageType ); // returns ShapeID
+
+ void ImplFlipBoundingBox( ImplEESdrObject& rObj,
+ const Point& rRefPoint );
+ BOOL ImplGetText( ImplEESdrObject& rObj );
+ void ImplWriteLineBundle( ImplEESdrObject& rObj,
+ BOOL bEdge );
+ void ImplWriteFillBundle( ImplEESdrObject& rObj,
+ BOOL bEdge );
+ void ImplWriteTextBundle( ImplEESdrObject& rObj );
+ void ImplWriteAny( ImplEESdrObject& rObj,
+ UINT32 nFlags, BOOL bBezier,
+ Polygon* pPolygon = NULL );
+ BOOL ImplIsMetaFile( ImplEESdrObject& rObj );
+ BOOL ImplGetGraphic( ImplEESdrObject& rObj,
+ const sal_Unicode*, BOOL bFillBitmap );
+ void ImplWriteAdditionalText(
+ ImplEESdrObject& rObj,
+ const Point& rTextRefPoint );
+ UINT32 ImplEnterAdditionalTextGroup(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape,
+ const Rectangle* pBoundRect = NULL );
+
+
+public:
+ Point ImplMapPoint( const Point& rPoint );
+ Size ImplMapSize( const Size& rSize );
+ EscherExHostAppData* ImplGetHostData() { return mpHostAppData; }
+};
+
+
+// ===================================================================
+
+class SdrObject;
+class SdrPage;
+
+class ImplEscherExSdr : public ImplEESdrWriter
+{
+private:
+ const SdrPage* mpSdrPage;
+ ImplEESdrSolverContainer* mpSolverContainer;
+
+public:
+ ImplEscherExSdr( EscherEx& rEx );
+ virtual ~ImplEscherExSdr();
+
+ SvxDrawPage* ImplInitPage( const SdrPage& rPage );
+ void ImplWriteCurrentPage();
+
+ UINT32 ImplWriteTheShape( ImplEESdrObject& rObj );
+
+ void ImplExitPage();
+ void ImplFlushSolverContainer();
+};
+
+
+
+#endif // _ESCHESDO_HXX
diff --git a/svx/source/msfilter/makefile.mk b/svx/source/msfilter/makefile.mk
new file mode 100644
index 0000000000..a8711c8678
--- /dev/null
+++ b/svx/source/msfilter/makefile.mk
@@ -0,0 +1,93 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01:21 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning 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=msfilter
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES=\
+ $(SLO)$/escherex.obj \
+ $(SLO)$/eschesdo.obj \
+ $(SLO)$/msdffimp.obj \
+ $(SLO)$/msoleexp.obj \
+ $(SLO)$/msvbasic.obj \
+ $(SLO)$/msashape.obj \
+ $(SLO)$/svxmsbas.obj
+
+EXCEPTIONSFILES= \
+ $(SLO)$/eschesdo.obj
+
+SVXLIGHTOBJFILES=\
+ $(OBJ)$/msdffimp.obj
+
+.INCLUDE : target.mk
diff --git a/svx/source/msfilter/msashape.cxx b/svx/source/msfilter/msashape.cxx
new file mode 100644
index 0000000000..be9e861833
--- /dev/null
+++ b/svx/source/msfilter/msashape.cxx
@@ -0,0 +1,4031 @@
+/*************************************************************************
+ *
+ * $RCSfile: msashape.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _MSASHAPE_HXX
+#include <msashape.hxx>
+#endif
+#ifndef _SVDOCIRC_HXX
+#include <svdocirc.hxx>
+#endif
+#ifndef _SVDOGRP_HXX
+#include <svdogrp.hxx>
+#endif
+#ifndef _SVDOPATH_HXX
+#include <svdopath.hxx>
+#endif
+#ifndef _SVDPAGE_HXX
+#include <svdpage.hxx>
+#endif
+#ifndef _SVX_XFLCLIT_HXX
+#include <xflclit.hxx>
+#endif
+#ifndef _SDASAITM_HXX
+#include <sdasaitm.hxx>
+#endif
+#ifndef _SFXITEMSET_HXX
+#include <svtools/itemset.hxx>
+#endif
+#ifndef _SVDMODEL_HXX
+#include <svdmodel.hxx>
+#endif
+#ifndef _RTL_CRC_H_
+#include <rtl/crc.h>
+#endif
+
+struct SvxMSDffCalculationData
+{
+ sal_uInt16 nFlags;
+ sal_Int16 nVal[ 3 ];
+};
+
+struct mso_AutoShape
+{
+ sal_Int32* pVertices;
+ sal_uInt32 nVertices;
+ sal_uInt16* pElements;
+ sal_uInt32 nElements;
+ SvxMSDffCalculationData* pCalculation;
+ sal_uInt32 nCalculation;
+ sal_Int32* pDefData;
+ sal_Int32* pTextRect;
+ sal_Int32* pBoundRect;
+ sal_Int32 nXRef;
+ sal_Int32 nYRef;
+};
+
+/*
+static const sal_Int32 Vert[] =
+{
+ 0, 0,
+};
+static const sal_uInt16 Segm[] =
+{
+ 0x4000,
+ 0x8000
+};
+static const SvxMSDffCalculationData Calc[] =
+{
+ { 0x0000, 0, 0, 0 }
+};
+static const sal_Int32 Default[] =
+{
+ 0
+};
+static const sal_Int32 TextRect[] =
+{
+ 0
+};
+static const sal_Int32 BoundRect[] =
+{
+ 0, 0, 21600, 21600
+};
+static const mso_AutoShape mso =
+{
+ (sal_Int32*)mso_sptVert, sizeof( mso_sptVert ) >> 3,
+ (sal_uInt16*)mso_sptSegm, sizeof( mso_sptSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptCalc, sizeof( mso_sptCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault,
+ (sal_Int32*)mso_sptTextRect,
+ (sal_Int32*)mso_sptBoundRect,
+ 0x80000000, 0x80000000
+};
+*/
+
+#define MSO_I | (sal_Int32)0x80000000
+
+static const sal_Int32 mso_sptDefault1400[] =
+{
+ 1, 1400
+};
+static const sal_Int32 mso_sptDefault2700[] =
+{
+ 1, 2700
+};
+static const sal_Int32 mso_sptDefault3600[] =
+{
+ 1, 3600
+};
+static const sal_Int32 mso_sptDefault5400[] =
+{
+ 1, 5400
+};
+static const sal_Int32 mso_sptDefault10800[] =
+{
+ 1, 10800
+};
+
+static const sal_Int32 mso_sptRectangleDefault[] =
+{
+ 1, 0
+};
+static const mso_AutoShape msoRectangle =
+{
+ NULL, 0,
+ NULL, 0,
+ NULL, 0,
+ (sal_Int32*)mso_sptRectangleDefault,
+ NULL,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const SvxMSDffCalculationData mso_sptRoundRectangleCalc[] = // adjustment1 : 0 - 10800
+{
+ { 0x2001, DFF_Prop_adjustValue, 1, 3 },
+ { 0x8000, 21600, 0, 0x400 }
+};
+static const sal_Int32 mso_sptRoundRectangleTextRect[] =
+{
+ 1, 0 MSO_I, 0 MSO_I, 1 MSO_I, 1 MSO_I
+};
+static const mso_AutoShape msoRoundRectangle =
+{
+ NULL, 0,
+ NULL, 0,
+ (SvxMSDffCalculationData*)mso_sptRoundRectangleCalc, sizeof( mso_sptRoundRectangleCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault3600,
+ (sal_Int32*)mso_sptRoundRectangleTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptRightTriangleVert[] =
+{
+ 0, 0, 21600, 21600, 0, 21600
+};
+static const sal_Int32 mso_sptRightTriangleTextRect[] =
+{
+ 1, 1900, 12700, 12700, 19700
+};
+static const mso_AutoShape msoRightTriangle =
+{
+ (sal_Int32*)mso_sptRightTriangleVert, sizeof( mso_sptRightTriangleVert ) >> 3,
+ NULL, 0,
+ NULL, 0,
+ NULL,
+ (sal_Int32*)mso_sptRightTriangleTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptEllipseTextRect[] =
+{
+ 1, 3200, 3200, 18400, 18400
+};
+static const mso_AutoShape msoEllipse =
+{
+ NULL, 0,
+ NULL, 0,
+ NULL, 0,
+ NULL,
+ (sal_Int32*)mso_sptEllipseTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptParallelogramVert[] = // adjustment1 : 0 - 21600
+{
+ 0 MSO_I, 0,
+ 21600, 0,
+ 1 MSO_I, 21600,
+ 0, 21600
+};
+static const sal_uInt16 mso_sptParallelogramSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptParallelogramCalc[] =
+{
+ { 0x4000, 0, DFF_Prop_adjustValue, 0 },
+ { 0x8000, 0, 21600, DFF_Prop_adjustValue },
+ { 0x2001, DFF_Prop_adjustValue, 10, 24 },
+ { 0x2000, 0x0402, 1750, 0 },
+ { 0x8000, 21600, 0, 0x0403 }
+};
+
+static const sal_Int32 mso_sptParallelogramTextRect[] =
+{
+ 1, 3 MSO_I, 3 MSO_I, 4 MSO_I, 4 MSO_I
+};
+static const mso_AutoShape msoParallelogram =
+{
+ (sal_Int32*)mso_sptParallelogramVert, sizeof( mso_sptParallelogramVert ) >> 3,
+ (sal_uInt16*)mso_sptParallelogramSegm, sizeof( mso_sptParallelogramSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptParallelogramCalc, sizeof( mso_sptParallelogramCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault5400,
+ (sal_Int32*)mso_sptParallelogramTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptDiamondVert[] =
+{
+ 10800, 0,
+ 21600, 10800,
+ 10800, 21600,
+ 0, 10800
+};
+static const sal_Int32 mso_sptDiamondTextRect[] =
+{
+ 1, 5400, 5400, 16200, 16200
+};
+static const mso_AutoShape msoDiamond =
+{
+ (sal_Int32*)mso_sptDiamondVert, sizeof( mso_sptDiamondVert ) >> 3,
+ NULL, 0,
+ NULL, 0,
+ NULL,
+ (sal_Int32*)mso_sptDiamondTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptTrapezoidVert[] = // adjustment1 : 0 - 10800
+{
+ 0, 0,
+ 21600, 0,
+ 0 MSO_I,21600,
+ 1 MSO_I,21600
+
+};
+static const sal_uInt16 mso_sptTrapezoidSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptTrapezoidCalc[] =
+{
+ { 0x8000, 21600, 0, DFF_Prop_adjustValue },
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2001, DFF_Prop_adjustValue, 10, 18 },
+ { 0x2000, 0x0402, 1750, 0 },
+ { 0x8000, 21600, 0, 0x403 }
+};
+static const sal_Int32 mso_sptTrapezoidTextRect[] =
+{
+ 1, 3 MSO_I, 3 MSO_I, 4 MSO_I, 4 MSO_I
+};
+static const mso_AutoShape msoTrapezoid =
+{
+ (sal_Int32*)mso_sptTrapezoidVert, sizeof( mso_sptTrapezoidVert ) >> 3,
+ (sal_uInt16*)mso_sptTrapezoidSegm, sizeof( mso_sptTrapezoidSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptTrapezoidCalc, sizeof( mso_sptTrapezoidCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault5400,
+ (sal_Int32*)mso_sptTrapezoidTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptOctagonVert[] = // adjustment1 : 0 - 10800
+{
+ 0 MSO_I, 0,
+ 1 MSO_I, 0,
+ 21600, 0 MSO_I,
+ 21600, 2 MSO_I,
+ 1 MSO_I, 21600,
+ 0 MSO_I, 21600,
+ 0, 2 MSO_I,
+ 0, 0 MSO_I
+};
+static const sal_uInt16 mso_sptOctagonSegm[] =
+{
+ 0x4000, 0x0007, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptOctagonCalc[] =
+{
+ { 0x4000, 0, DFF_Prop_adjustValue, 0 },
+ { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
+ { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
+ { 0x2001, DFF_Prop_adjustValue, 1, 2 },
+ { 0xa000, DFF_Prop_geoRight, 0, 0x403 },
+ { 0xa000, DFF_Prop_geoBottom, 0, 0x403 }
+};
+static const sal_Int32 mso_sptOctagonDefault[] =
+{
+ 1, 5000
+};
+static const sal_Int32 mso_sptOctagonTextRect[] =
+{
+ 1, 3 MSO_I, 3 MSO_I, 4 MSO_I, 5 MSO_I
+};
+static const mso_AutoShape msoOctagon =
+{
+ (sal_Int32*)mso_sptOctagonVert, sizeof( mso_sptOctagonVert ) >> 3,
+ (sal_uInt16*)mso_sptOctagonSegm, sizeof( mso_sptOctagonSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptOctagonCalc, sizeof( mso_sptOctagonCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptOctagonDefault,
+ (sal_Int32*)mso_sptOctagonTextRect,
+ NULL,
+ 10800, 10800
+};
+
+static const sal_Int32 mso_sptIsocelesTriangleVert[] = // adjustment1 : 0 - 21600
+{
+ 0 MSO_I, 0,
+ 21600, 21600,
+ 0, 21600
+};
+static const sal_uInt16 mso_sptIsocelesTriangleSegm[] =
+{
+ 0x4000, 0x0002, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptIsocelesTriangleCalc[] =
+{
+ { 0x4000, 0, DFF_Prop_adjustValue, 0 },
+ { 0x2001, DFF_Prop_adjustValue, 1, 2 },
+ { 0x2000, 0x401, 10800, 0 },
+ { 0x2001, DFF_Prop_adjustValue, 2, 3 },
+ { 0x2000, 0x403, 7200, 0 }
+
+};
+static const sal_Int32 mso_sptIsocelesTriangleTextRect[] =
+{
+ 2, 1 MSO_I, 10800, 2 MSO_I, 18000,
+ 3 MSO_I, 7200, 4 MSO_I, 21600
+};
+static const mso_AutoShape msoIsocelesTriangle =
+{
+ (sal_Int32*)mso_sptIsocelesTriangleVert, sizeof( mso_sptIsocelesTriangleVert ) >> 3,
+ (sal_uInt16*)mso_sptIsocelesTriangleSegm, sizeof( mso_sptIsocelesTriangleSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptIsocelesTriangleCalc, sizeof( mso_sptIsocelesTriangleCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault10800,
+ (sal_Int32*)mso_sptIsocelesTriangleTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptHexagonVert[] = // adjustment1 : 0 - 10800
+{
+ 0 MSO_I, 0,
+ 1 MSO_I, 0,
+ 21600, 10800,
+ 1 MSO_I, 21600,
+ 0 MSO_I, 21600,
+ 0, 10800
+};
+static const sal_uInt16 mso_sptHexagonSegm[] =
+{
+ 0x4000, 0x0005, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptHexagonCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x8000, 21600, 0, DFF_Prop_adjustValue },
+ { 0x2001, DFF_Prop_adjustValue, 100, 234 },
+ { 0x2000, 0x402, 1700, 0 },
+ { 0x8000, 21600, 0, 0x403 }
+};
+static const sal_Int32 mso_sptHexagonTextRect[] =
+{
+ 1, 3 MSO_I, 3 MSO_I, 4 MSO_I, 4 MSO_I
+};
+static const mso_AutoShape msoHexagon =
+{
+ (sal_Int32*)mso_sptHexagonVert, sizeof( mso_sptHexagonVert ) >> 3,
+ (sal_uInt16*)mso_sptHexagonSegm, sizeof( mso_sptHexagonSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptHexagonCalc, sizeof( mso_sptHexagonCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault5400,
+ (sal_Int32*)mso_sptHexagonTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+
+static const sal_Int32 mso_sptPentagonVert[] =
+{
+ 0, 8260, 10800, 0, 21600, 8260, 17370, 21600, 4230, 21600
+};
+static const sal_Int32 mso_sptPentagonTextRect[] =
+{
+ 1, 4230, 5080, 17370, 21600
+};
+static const mso_AutoShape msoPentagon =
+{
+ (sal_Int32*)mso_sptPentagonVert, sizeof( mso_sptPentagonVert ) >> 3,
+ NULL, 0,
+ NULL, 0,
+ NULL,
+ (sal_Int32*)mso_sptPentagonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptPlusVert[] = // adjustment1 : 0 - 10800
+{
+ 1 MSO_I,0,
+ 2 MSO_I,0,
+ 2 MSO_I,1 MSO_I,
+ 21600, 1 MSO_I,
+ 21600, 2 MSO_I,
+ 2 MSO_I,2 MSO_I,
+ 2 MSO_I,21600,
+ 1 MSO_I,21600,
+ 1 MSO_I,2 MSO_I,
+ 0, 2 MSO_I,
+ 0, 1 MSO_I,
+ 1 MSO_I,1 MSO_I
+};
+static const SvxMSDffCalculationData mso_sptPlusCalc[] =
+{
+ { 0x2001, DFF_Prop_adjustValue, 10799, 10800 },
+ { 0x2000, 0x400, 0, 0 },
+ { 0x8000, 21600, 0, 0x400 }
+};
+static const sal_Int32 mso_sptPlusTextRect[] =
+{
+ 1, 1 MSO_I, 1 MSO_I, 2 MSO_I, 2 MSO_I
+};
+static const mso_AutoShape msoPlus =
+{
+ (sal_Int32*)mso_sptPlusVert, sizeof( mso_sptPlusVert ) >> 3,
+ NULL, 0,
+ (SvxMSDffCalculationData*)mso_sptPlusCalc, sizeof( mso_sptPlusCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault5400,
+ (sal_Int32*)mso_sptPlusTextRect,
+ (sal_Int32*)NULL,
+ 10800, 10800
+};
+
+static const sal_Int32 mso_sptCanVert[] = // adjustment1 : 0 - 10800
+{
+ 44, 0, // P0
+ 20, 0, // C1
+ 0, 2 MSO_I, // C2
+ 0, 0 MSO_I, // P3
+ 0, 3 MSO_I, // P4
+ 0, 4 MSO_I, // C5
+ 20, 10800, // C6
+ 44, 10800, // P7
+ 68, 10800, // C8
+ 88, 4 MSO_I, // C9
+ 88, 3 MSO_I, // P10
+ 88, 0 MSO_I, // P11
+ 88, 2 MSO_I, // C12
+ 68, 0, // C13
+ 44, 0, // P14
+ 44, 0, // P0
+ 20, 0, // C1
+ 0, 2 MSO_I, // C2
+ 0, 0 MSO_I, // P3
+ 0, 5 MSO_I, // C4
+ 20, 6 MSO_I, // C5
+ 44, 6 MSO_I, // P6
+ 68, 6 MSO_I, // C7
+ 88, 5 MSO_I, // C8
+ 88, 0 MSO_I, // P9
+ 88, 2 MSO_I, // C10
+ 68, 0, // C11
+ 44, 0 // P12
+};
+static const sal_uInt16 mso_sptCanSegm[] =
+{
+ 0x4000, 0x2001, 0x0001, 0x2002, 0x0001, 0x2001, 0x6001, 0x8000,
+ 0x4000, 0x2004, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptCanCalc[] =
+{
+ { 0x2001, DFF_Prop_adjustValue, 1, 4 }, // 1/4
+ { 0x2001, 0x0400, 6, 11 },
+ { 0xa000, 0x0400, 0, 0x0401 },
+ { 0x8000, 10800, 0, 0x0400 },
+ { 0x6000, 0x0403, 0x0401, 0 },
+ { 0x6000, 0x0400, 0x0401, 0 },
+ { 0x2001, DFF_Prop_adjustValue, 1, 2 }
+};
+static const sal_Int32 mso_sptCanTextRect[] =
+{
+ 1, 0, 6 MSO_I, 88, 3 MSO_I
+};
+static const sal_Int32 mso_sptCanBoundRect[] =
+{
+ 0, 0, 88, 10800
+};
+static const mso_AutoShape msoCan =
+{
+ (sal_Int32*)mso_sptCanVert, sizeof( mso_sptCanVert ) >> 3,
+ (sal_uInt16*)mso_sptCanSegm, sizeof( mso_sptCanSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptCanCalc, sizeof( mso_sptCanCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault5400,
+ (sal_Int32*)mso_sptCanTextRect,
+ (sal_Int32*)mso_sptCanBoundRect,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptArrowVert[] = // adjustment1: x 0 - 21600
+{ // adjustment2: y 0 - 10800
+ 0, 0 MSO_I,
+ 1 MSO_I,0 MSO_I,
+ 1 MSO_I,0,
+ 21600, 10800,
+ 1 MSO_I,21600,
+ 1 MSO_I,2 MSO_I,
+ 0, 2 MSO_I
+};
+static const sal_uInt16 mso_sptArrowSegm[] =
+{
+ 0x4000, 0x0006, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }
+};
+static const sal_Int32 mso_sptArrowDefault[] =
+{
+ 2, 16200, 5400
+};
+static const sal_Int32 mso_sptArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoArrow =
+{
+ (sal_Int32*)mso_sptArrowVert, sizeof( mso_sptArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptArrowSegm, sizeof( mso_sptArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptArrowCalc, sizeof( mso_sptArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptArrowDefault,
+ (sal_Int32*)mso_sptArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptLeftArrowVert[] = // adjustment1: x 0 - 21600
+{ // adjustment2: y 0 - 10800
+ 21600, 0 MSO_I,
+ 1 MSO_I,0 MSO_I,
+ 1 MSO_I,0,
+ 0, 10800,
+ 1 MSO_I,21600,
+ 1 MSO_I,2 MSO_I,
+ 21600, 2 MSO_I
+};
+static const sal_uInt16 mso_sptLeftArrowSegm[] =
+{
+ 0x4000, 0x0006, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptLeftArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }
+};
+static const sal_Int32 mso_sptLeftArrowDefault[] =
+{
+ 2, 5400, 5400
+};
+static const sal_Int32 mso_sptLeftArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoLeftArrow =
+{
+ (sal_Int32*)mso_sptLeftArrowVert, sizeof( mso_sptLeftArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptLeftArrowSegm, sizeof( mso_sptLeftArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptLeftArrowCalc, sizeof( mso_sptLeftArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptLeftArrowDefault,
+ (sal_Int32*)mso_sptLeftArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptDownArrowVert[] = // adjustment1: x 0 - 21600
+{ // adjustment2: y 0 - 10800
+ 0 MSO_I,0,
+ 0 MSO_I,1 MSO_I,
+ 0, 1 MSO_I,
+ 10800, 21600,
+ 21600, 1 MSO_I,
+ 2 MSO_I,1 MSO_I,
+ 2 MSO_I,0
+};
+static const sal_uInt16 mso_sptDownArrowSegm[] =
+{
+ 0x4000, 0x0006, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptDownArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }
+};
+static const sal_Int32 mso_sptDownArrowDefault[] =
+{
+ 2, 16200, 5400
+};
+static const sal_Int32 mso_sptDownArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoDownArrow =
+{
+ (sal_Int32*)mso_sptDownArrowVert, sizeof( mso_sptDownArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptDownArrowSegm, sizeof( mso_sptDownArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptDownArrowCalc, sizeof( mso_sptDownArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDownArrowDefault,
+ (sal_Int32*)mso_sptDownArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptUpArrowVert[] = // adjustment1: x 0 - 21600
+{ // adjustment2: y 0 - 10800
+ 0 MSO_I,21600,
+ 0 MSO_I,1 MSO_I,
+ 0, 1 MSO_I,
+ 10800, 0,
+ 21600, 1 MSO_I,
+ 2 MSO_I,1 MSO_I,
+ 2 MSO_I,21600
+};
+static const sal_uInt16 mso_sptUpArrowSegm[] =
+{
+ 0x4000, 0x0006, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptUpArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }
+};
+static const sal_Int32 mso_sptUpArrowDefault[] =
+{
+ 2, 5400, 5400
+};
+static const sal_Int32 mso_sptUpArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoUpArrow =
+{
+ (sal_Int32*)mso_sptUpArrowVert, sizeof( mso_sptUpArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptUpArrowSegm, sizeof( mso_sptUpArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptUpArrowCalc, sizeof( mso_sptUpArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptUpArrowDefault,
+ (sal_Int32*)mso_sptUpArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptLeftRightArrowVert[] = // adjustment1: x 0 - 10800
+{ // adjustment2: y 0 - 10800
+ 0, 10800,
+ 0 MSO_I,0,
+ 0 MSO_I,1 MSO_I,
+ 2 MSO_I,1 MSO_I,
+ 2 MSO_I,0,
+ 21600,10800,
+ 2 MSO_I,21600,
+ 2 MSO_I,3 MSO_I,
+ 0 MSO_I,3 MSO_I,
+ 0 MSO_I,21600
+};
+static const sal_uInt16 mso_sptLeftRightArrowSegm[] =
+{
+ 0x4000, 0x0009, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptLeftRightArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x8000, 21600, 0, DFF_Prop_adjustValue },
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }
+};
+static const sal_Int32 mso_sptLeftRightArrowDefault[] =
+{
+ 2, 4300, 5400
+};
+static const sal_Int32 mso_sptLeftRightArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoLeftRightArrow =
+{
+ (sal_Int32*)mso_sptLeftRightArrowVert, sizeof( mso_sptLeftRightArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptLeftRightArrowSegm, sizeof( mso_sptLeftRightArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptLeftRightArrowCalc, sizeof( mso_sptLeftRightArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptLeftRightArrowDefault,
+ (sal_Int32*)mso_sptLeftRightArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptUpDownArrowVert[] = // adjustment1: x 0 - 10800
+{ // adjustment2: y 0 - 10800
+ 0, 0 MSO_I,
+ 10800, 0,
+ 21600, 0 MSO_I,
+ 2 MSO_I,0 MSO_I,
+ 2 MSO_I,3 MSO_I,
+ 21600, 3 MSO_I,
+ 10800, 21600,
+ 0, 3 MSO_I,
+ 1 MSO_I,3 MSO_I,
+ 1 MSO_I,0 MSO_I
+};
+static const sal_uInt16 mso_sptUpDownArrowSegm[] =
+{
+ 0x4000, 0x0009, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptUpDownArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x8000, 21600, 0, DFF_Prop_adjustValue },
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }
+};
+static const sal_Int32 mso_sptUpDownArrowDefault[] =
+{
+ 2, 5400, 4300
+};
+static const sal_Int32 mso_sptUpDownArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoUpDownArrow =
+{
+ (sal_Int32*)mso_sptUpDownArrowVert, sizeof( mso_sptUpDownArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptUpDownArrowSegm, sizeof( mso_sptUpDownArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptUpDownArrowCalc, sizeof( mso_sptUpDownArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptUpDownArrowDefault,
+ (sal_Int32*)mso_sptUpDownArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptQuadArrowVert[] = // adjustment1: x 0 - 10800
+{ // adjustment2: x 0 - 10800
+ 0, 10800, // adjustment3: y 0 - 10800
+ 0 MSO_I,1 MSO_I, // P1
+ 0 MSO_I,2 MSO_I, // P2
+ 2 MSO_I,2 MSO_I, // P3
+ 2 MSO_I,0 MSO_I, // P4
+ 1 MSO_I,0 MSO_I, // P5
+ 10800, 0, // P6
+ 3 MSO_I,0 MSO_I, // P7
+ 4 MSO_I,0 MSO_I, // P8
+ 4 MSO_I,2 MSO_I, // P9
+ 5 MSO_I,2 MSO_I, // P10
+ 5 MSO_I,1 MSO_I, // P11
+ 21600, 10800, // P12
+ 5 MSO_I,3 MSO_I, // P13
+ 5 MSO_I,4 MSO_I, // P14
+ 4 MSO_I,4 MSO_I, // P15
+ 4 MSO_I,5 MSO_I, // P16
+ 3 MSO_I,5 MSO_I, // P17
+ 10800, 21600, // P18
+ 1 MSO_I,5 MSO_I, // P19
+ 2 MSO_I,5 MSO_I, // P20
+ 2 MSO_I,4 MSO_I, // P21
+ 0 MSO_I,4 MSO_I, // P22
+ 0 MSO_I,3 MSO_I // P23
+};
+static const sal_uInt16 mso_sptQuadArrowSegm[] =
+{
+ 0x4000, 0x0017, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptQuadArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x8000, 21600, 0, DFF_Prop_adjustValue },
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value },
+ { 0x8000, 21600, 0, DFF_Prop_adjust3Value }
+};
+static const sal_Int32 mso_sptQuadArrowDefault[] =
+{
+ 3, 6500, 8600, 4300
+};
+static const sal_Int32 mso_sptQuadArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoQuadArrow =
+{
+ (sal_Int32*)mso_sptQuadArrowVert, sizeof( mso_sptQuadArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptQuadArrowSegm, sizeof( mso_sptQuadArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptQuadArrowCalc, sizeof( mso_sptQuadArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptQuadArrowDefault,
+ (sal_Int32*)mso_sptQuadArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptLeftRightUpArrowVert[] = // adjustment1: x 0 - 10800
+{ // adjustment2: x 0 - 10800
+ 10800, 0, // adjustment3: y 0 - 21600
+ 3 MSO_I,2 MSO_I, // P1
+ 4 MSO_I,2 MSO_I, // P2
+ 4 MSO_I,1 MSO_I, // P3
+ 5 MSO_I,1 MSO_I, // P4
+ 5 MSO_I,0 MSO_I, // P5
+ 21600, 10800, // P6
+ 5 MSO_I,3 MSO_I, // P7
+ 5 MSO_I,4 MSO_I, // P8
+ 2 MSO_I,4 MSO_I, // P9
+ 2 MSO_I,3 MSO_I, // P10
+ 0, 10800, // P11
+ 2 MSO_I,0 MSO_I, // P12
+ 2 MSO_I,1 MSO_I, // P13
+ 1 MSO_I,1 MSO_I, // P14
+ 1 MSO_I,2 MSO_I, // P15
+ 0 MSO_I,2 MSO_I // P16
+};
+static const sal_uInt16 mso_sptLeftRightUpArrowSegm[] =
+{
+ 0x4000, 0x0010, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptLeftRightUpArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 1
+ { 0x6001, 0x0403, DFF_Prop_adjust3Value, 21600 }, // 2
+ { 0x8000, 21600, 0, DFF_Prop_adjustValue }, // 3
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }, // 4
+ { 0x8000, 21600, 0, 0x0402 } // 5
+};
+static const sal_Int32 mso_sptLeftRightUpArrowDefault[] =
+{
+ 3, 6500, 8600, 6200
+};
+static const sal_Int32 mso_sptLeftRightUpArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoLeftRightUpArrow =
+{
+ (sal_Int32*)mso_sptLeftRightUpArrowVert, sizeof( mso_sptLeftRightUpArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptLeftRightUpArrowSegm, sizeof( mso_sptLeftRightUpArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptLeftRightUpArrowCalc, sizeof( mso_sptLeftRightUpArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptLeftRightUpArrowDefault,
+ (sal_Int32*)mso_sptLeftRightUpArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptBentArrowVert[] = // adjustment1 : x 12427 - 21600
+{ // adjustment2 : y 0 - 6079
+ 0, 21600, // P0
+ 0, 12160, // P1
+ 12427, 1 MSO_I,
+ 0 MSO_I,1 MSO_I,
+ 0 MSO_I,0,
+ 21600, 6079,
+ 0 MSO_I,12158,
+ 0 MSO_I,2 MSO_I,
+ 12427, 2 MSO_I,
+ 4 MSO_I,12160,
+ 4 MSO_I,21600
+};
+static const sal_uInt16 mso_sptBentArrowSegm[] =
+{
+ 0x4000, 0x0001, 0xa801, 0x0006, 0xa701, 0x0001, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptBentArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x8000, 12158, 0, DFF_Prop_adjust2Value },
+ { 0x8000, 6079, 0, DFF_Prop_adjust2Value },
+ { 0x2001, 0x0403, 2, 1 }
+};
+static const sal_Int32 mso_sptBentArrowDefault[] =
+{
+ 2, 15100, 2900
+};
+static const sal_Int32 mso_sptBentArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoBentArrow =
+{
+ (sal_Int32*)mso_sptBentArrowVert, sizeof( mso_sptBentArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptBentArrowSegm, sizeof( mso_sptBentArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptBentArrowCalc, sizeof( mso_sptBentArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptBentArrowDefault,
+ (sal_Int32*)mso_sptBentArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptLeftUpArrowVert[] = // adjustment1 : x 0 - 21600
+{ // adjustment2 : x 0 - 21600
+ 0, 5 MSO_I, // adjustment3 : y 0 - 21600
+ 2 MSO_I,0 MSO_I, // P1
+ 2 MSO_I,7 MSO_I, // P2
+ 7 MSO_I,7 MSO_I, // P3
+ 7 MSO_I,2 MSO_I, // P4
+ 0 MSO_I,2 MSO_I, // P5
+ 5 MSO_I,0, // P6
+ 21600,2 MSO_I, // P7
+ 1 MSO_I,2 MSO_I, // P8
+ 1 MSO_I,1 MSO_I, // P9
+ 2 MSO_I,1 MSO_I, // P10
+ 2 MSO_I,21600 // P11
+};
+static const sal_uInt16 mso_sptLeftUpArrowSegm[] =
+{
+ 0x4000, 0x000b, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptLeftUpArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 1
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 }, // 2
+ { 0x8000, 21600, 0, DFF_Prop_adjustValue }, // 3
+ { 0x2001, 0x0403, 1, 2 }, // 4
+ { 0x6000, DFF_Prop_adjustValue, 0x0404, 0 }, // 5
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }, // 6
+ { 0x6000, DFF_Prop_adjustValue, 0x0406, 0 } // 7
+};
+static const sal_Int32 mso_sptLeftUpArrowDefault[] =
+{
+ 3, 9340, 18500, 6200
+};
+static const sal_Int32 mso_sptLeftUpArrowTextRect[] =
+{
+ 2, 2 MSO_I, 7 MSO_I, 1 MSO_I, 1 MSO_I,
+ 7 MSO_I, 2 MSO_I, 1 MSO_I, 1 MSO_I
+};
+static const mso_AutoShape msoLeftUpArrow =
+{
+ (sal_Int32*)mso_sptLeftUpArrowVert, sizeof( mso_sptLeftUpArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptLeftUpArrowSegm, sizeof( mso_sptLeftUpArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptLeftUpArrowCalc, sizeof( mso_sptLeftUpArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptLeftUpArrowDefault,
+ (sal_Int32*)mso_sptLeftUpArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptBentUpArrowVert[] = // adjustment1 : x 0 - 21600
+{ // adjustment2 : x 0 - 21600
+ 0, 8 MSO_I, // adjustment3 : y 0 - 21600
+ 7 MSO_I,8 MSO_I, // P1
+ 7 MSO_I,2 MSO_I, // P2
+ 0 MSO_I,2 MSO_I, // P3
+ 5 MSO_I,0, // P4
+ 21600, 2 MSO_I, // P5
+ 1 MSO_I,2 MSO_I, // P6
+ 1 MSO_I,21600, // P7
+ 0, 21600 // P8
+};
+static const sal_uInt16 mso_sptBentUpArrowSegm[] =
+{
+ 0x4000, 0x0008, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptBentUpArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 1
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 }, // 2
+ { 0x8000, 21600, 0, DFF_Prop_adjustValue }, // 3
+ { 0x2001, 0x0403, 1, 2 }, // 4
+ { 0x6000, DFF_Prop_adjustValue, 0x0404, 0 }, // 5
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }, // 6
+ { 0x6000, DFF_Prop_adjustValue, 0x0406, 0 }, // 7
+ { 0x6000, 0x0407, 0x0406, 0 } // 8
+};
+static const sal_Int32 mso_sptBentUpArrowDefault[] =
+{
+ 3, 9340, 18500, 7200
+};
+static const sal_Int32 mso_sptBentUpArrowTextRect[] =
+{
+ 2, 2 MSO_I, 7 MSO_I, 1 MSO_I, 1 MSO_I,
+ 7 MSO_I, 2 MSO_I, 1 MSO_I, 1 MSO_I
+};
+static const mso_AutoShape msoBentUpArrow =
+{
+ (sal_Int32*)mso_sptBentUpArrowVert, sizeof( mso_sptBentUpArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptBentUpArrowSegm, sizeof( mso_sptBentUpArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptBentUpArrowCalc, sizeof( mso_sptBentUpArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptBentUpArrowDefault,
+ (sal_Int32*)mso_sptBentUpArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptCurvedRightArrowVert[] = // adjustment1 : y 10800 - 21600 !!!!!!!!
+{ // adjustment2 : y 16424 - 21600
+ 21600, 0, // adjustment3 : x 0 - 21600
+ 9675, 0, // C1
+ 0, 10 MSO_I, // C2
+ 0, 9 MSO_I, // P3
+ 0, 11 MSO_I, // P4
+ 0, 14 MSO_I, // C5
+ 15 MSO_I,1 MSO_I, // C6
+ 2 MSO_I,1 MSO_I, // P7
+ 2 MSO_I,21600, // P8
+ 21600, 7 MSO_I, // P9
+ 2 MSO_I,0 MSO_I, // P10
+ 2 MSO_I,16 MSO_I, // P11
+ 2 MSO_I,16 MSO_I, // C12
+ 80, 8 MSO_I, // C13
+ 80, 8 MSO_I, // P14
+ 80, 8 MSO_I, // C16
+ 21600, 5 MSO_I, // C17
+ 21600, 0 // P18
+};
+static const sal_uInt16 mso_sptCurvedRightArrowSegm[] =
+{
+ 0x4000, 0x2001, 0x0001, 0x2001, 0x0004, 0x2002, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptCurvedRightArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 1
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 }, // 2
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }, // 3
+ { 0xa000, DFF_Prop_adjust2Value, 0, DFF_Prop_adjustValue }, // 4
+ { 0xa000, 0x0404, 0, 0x0403 }, // 5
+ { 0x2001, 0x0405, 1, 2 }, // 6
+ { 0xa000, DFF_Prop_adjust2Value, 0, 0x0406 }, // 7
+ { 0x2001, DFF_Prop_adjust2Value, 1, 2 }, // 8
+ { 0xa000, 0x0408, 0, 0x0406 }, // 9
+ { 0x2001, 0x0409, 10000, 22326 }, // 10
+ { 0x6000, 0x0409, 0x0405, 0 }, // 11
+ { 0xa000, DFF_Prop_adjust2Value, 0, 0x040b }, // 12
+ { 0x2001, 0x040c, 10000, 23148 }, // 13
+ { 0x6000, 0x040d, 0x040b, 0 }, // 14
+ { 0x2001, DFF_Prop_adjust3Value, 10000, 25467 }, // 15
+ { 0x6000, DFF_Prop_adjustValue, 0x0403, 0 } // 16
+};
+static const sal_Int32 mso_sptCurvedRightArrowDefault[] =
+{
+ 3, 13000, 19400, 14400
+};
+static const sal_Int32 mso_sptCurvedRightArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoCurvedRightArrow =
+{
+ (sal_Int32*)mso_sptCurvedRightArrowVert, sizeof( mso_sptCurvedRightArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptCurvedRightArrowSegm, sizeof( mso_sptCurvedRightArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptCurvedRightArrowCalc, sizeof( mso_sptCurvedRightArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptCurvedRightArrowDefault,
+ (sal_Int32*)mso_sptCurvedRightArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptStripedRightArrowVert[] = // adjustment1 : x 3375 - 21600
+{ // adjustment2 : y 0 - 10800
+ 3375, 0 MSO_I,
+ 1 MSO_I,0 MSO_I,
+ 1 MSO_I,0,
+ 21600, 10800,
+ 1 MSO_I,21600,
+ 1 MSO_I,2 MSO_I,
+ 3375, 2 MSO_I,
+ 0, 0 MSO_I,
+ 675, 0 MSO_I,
+ 675, 2 MSO_I,
+ 0, 2 MSO_I,
+ 1350, 0 MSO_I,
+ 2700, 0 MSO_I,
+ 2700, 2 MSO_I,
+ 1350, 2 MSO_I
+};
+static const sal_uInt16 mso_sptStripedRightArrowSegm[] =
+{
+ 0x4000, 0x0006, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptStripedRightArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x8000, 21600, 0, DFF_Prop_adjust2Value }
+};
+static const sal_Int32 mso_sptStripedRightArrowDefault[] =
+{
+ 2, 16200, 5400
+};
+static const sal_Int32 mso_sptStripedRightArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoStripedRightArrow =
+{
+ (sal_Int32*)mso_sptStripedRightArrowVert, sizeof( mso_sptStripedRightArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptStripedRightArrowSegm, sizeof( mso_sptStripedRightArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptStripedRightArrowCalc, sizeof( mso_sptStripedRightArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptStripedRightArrowDefault,
+ (sal_Int32*)mso_sptStripedRightArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptHomePlateVert[] = // adjustment1 : x 0 - 21600
+{
+ 0, 0,
+ 0 MSO_I,0,
+ 21600,10800,
+ 0 MSO_I,21600,
+ 0, 21600
+};
+static const sal_uInt16 mso_sptHomePlateSegm[] =
+{
+ 0x4000, 0x0004, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptHomePlateCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 }
+};
+static const sal_Int32 mso_sptHomePlateDefault[] =
+{
+ 1, 16200
+};
+static const sal_Int32 mso_sptHomePlateTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoHomePlate =
+{
+ (sal_Int32*)mso_sptHomePlateVert, sizeof( mso_sptHomePlateVert ) >> 3,
+ (sal_uInt16*)mso_sptHomePlateSegm, sizeof( mso_sptHomePlateSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptHomePlateCalc, sizeof( mso_sptHomePlateCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptHomePlateDefault,
+ (sal_Int32*)mso_sptHomePlateTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptChevronVert[] = // adjustment1 : x 0 - 21600
+{
+ 0, 0,
+ 0 MSO_I,0,
+ 21600,10800,
+ 0 MSO_I,21600,
+ 0, 21600,
+ 1 MSO_I,10800
+};
+static const sal_uInt16 mso_sptChevronSegm[] =
+{
+ 0x4000, 0x0005, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptChevronCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x8000, 21600, 0, 0x0400 }
+};
+static const sal_Int32 mso_sptChevronDefault[] =
+{
+ 1, 16200
+};
+static const sal_Int32 mso_sptChevronTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoChevron =
+{
+ (sal_Int32*)mso_sptChevronVert, sizeof( mso_sptChevronVert ) >> 3,
+ (sal_uInt16*)mso_sptChevronSegm, sizeof( mso_sptChevronSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptChevronCalc, sizeof( mso_sptChevronCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptChevronDefault,
+ (sal_Int32*)mso_sptChevronTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptRightArrowCalloutVert[] = // adjustment1 : x 0 - 21000
+{ // adjustment2 : y 0 - 10800
+ 0, 0,
+ 0 MSO_I,0,
+ 0 MSO_I,3 MSO_I,
+ 2 MSO_I,3 MSO_I,
+ 2 MSO_I,1 MSO_I,
+ 21600, 10800,
+ 2 MSO_I,4 MSO_I,
+ 2 MSO_I,5 MSO_I,
+ 0 MSO_I,5 MSO_I,
+ 0 MSO_I,21600,
+ 0, 21600
+};
+static const sal_uInt16 mso_sptRightArrowCalloutSegm[] =
+{
+ 0x4000, 0x000a, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptRightArrowCalloutCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
+ { 0x8000, 21600, 0, 0x0401 },
+ { 0x8000, 21600, 0, 0x0403 }
+};
+static const sal_Int32 mso_sptRightArrowCalloutDefault[] =
+{
+ 4, 14400, 5400, 18000, 8100
+};
+static const sal_Int32 mso_sptRightArrowCalloutTextRect[] =
+{
+ 1, 0, 0, 0 MSO_I, 21600
+};
+static const mso_AutoShape msoRightArrowCallout =
+{
+ (sal_Int32*)mso_sptRightArrowCalloutVert, sizeof( mso_sptRightArrowCalloutVert ) >> 3,
+ (sal_uInt16*)mso_sptRightArrowCalloutSegm, sizeof( mso_sptRightArrowCalloutSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptRightArrowCalloutCalc, sizeof( mso_sptRightArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptRightArrowCalloutDefault,
+ (sal_Int32*)mso_sptRightArrowCalloutTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptLeftArrowCalloutVert[] = // adjustment1 : x 0 - 21600
+{ // adjustment2 : y 0 - 10800
+ 0 MSO_I,0, // adjustment3 : x 0 - 21600
+ 21600, 0, // adjustment4 : y 0 - 10800
+ 21600, 21600,
+ 0 MSO_I,21600,
+ 0 MSO_I,5 MSO_I,
+ 2 MSO_I,5 MSO_I,
+ 2 MSO_I,4 MSO_I,
+ 0, 10800,
+ 2 MSO_I,1 MSO_I,
+ 2 MSO_I,3 MSO_I,
+ 0 MSO_I,3 MSO_I
+};
+static const sal_uInt16 mso_sptLeftArrowCalloutSegm[] =
+{
+ 0x4000, 0x000a, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptLeftArrowCalloutCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
+ { 0x8000, 21600, 0, 0x0401 },
+ { 0x8000, 21600, 0, 0x0403 }
+};
+static const sal_Int32 mso_sptLeftArrowCalloutDefault[] =
+{
+ 4, 7200, 5400, 3600, 8100
+};
+static const sal_Int32 mso_sptLeftArrowCalloutTextRect[] =
+{
+ 1, 0 MSO_I, 0, 21600, 21600
+};
+static const mso_AutoShape msoLeftArrowCallout =
+{
+ (sal_Int32*)mso_sptLeftArrowCalloutVert, sizeof( mso_sptLeftArrowCalloutVert ) >> 3,
+ (sal_uInt16*)mso_sptLeftArrowCalloutSegm, sizeof( mso_sptLeftArrowCalloutSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptLeftArrowCalloutCalc, sizeof( mso_sptLeftArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptLeftArrowCalloutDefault,
+ (sal_Int32*)mso_sptLeftArrowCalloutTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptUpArrowCalloutVert[] =
+{
+ 21600, 0 MSO_I,
+ 21600, 21600,
+ 0, 21600,
+ 0, 0 MSO_I,
+ 3 MSO_I,0 MSO_I,
+ 3 MSO_I,2 MSO_I,
+ 1 MSO_I,2 MSO_I,
+ 10800, 0,
+ 4 MSO_I,2 MSO_I,
+ 5 MSO_I,2 MSO_I,
+ 5 MSO_I,0 MSO_I
+};
+static const sal_uInt16 mso_sptUpArrowCalloutSegm[] =
+{
+ 0x4000, 0x000a, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptUpArrowCalloutCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
+ { 0x8000, 21600, 0, 0x0401 },
+ { 0x8000, 21600, 0, 0x0403 }
+};
+static const sal_Int32 mso_sptUpArrowCalloutDefault[] =
+{
+ 4, 7200, 5400, 3600, 8100
+};
+static const sal_Int32 mso_sptUpArrowCalloutTextRect[] =
+{
+ 1, 0, 0 MSO_I, 21600, 21600
+};
+static const mso_AutoShape msoUpArrowCallout =
+{
+ (sal_Int32*)mso_sptUpArrowCalloutVert, sizeof( mso_sptUpArrowCalloutVert ) >> 3,
+ (sal_uInt16*)mso_sptUpArrowCalloutSegm, sizeof( mso_sptUpArrowCalloutSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptUpArrowCalloutCalc, sizeof( mso_sptUpArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptUpArrowCalloutDefault,
+ (sal_Int32*)mso_sptUpArrowCalloutTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptDownArrowCalloutVert[] =
+{
+ 0, 0 MSO_I,
+ 0, 0,
+ 21600, 0,
+ 21600, 0 MSO_I,
+ 5 MSO_I,0 MSO_I,
+ 5 MSO_I,2 MSO_I,
+ 4 MSO_I,2 MSO_I,
+ 10800, 21600,
+ 1 MSO_I,2 MSO_I,
+ 3 MSO_I,2 MSO_I,
+ 3 MSO_I,0 MSO_I
+};
+static const sal_uInt16 mso_sptDownArrowCalloutSegm[] =
+{
+ 0x4000, 0x000a, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptDownArrowCalloutCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
+ { 0x8000, 21600, 0, 0x0401 },
+ { 0x8000, 21600, 0, 0x0403 }
+};
+static const sal_Int32 mso_sptDownArrowCalloutDefault[] =
+{
+ 4, 14400, 5400, 18000, 8100
+};
+static const sal_Int32 mso_sptDownArrowCalloutTextRect[] =
+{
+ 1, 0, 0, 21600, 0 MSO_I
+};
+static const mso_AutoShape msoDownArrowCallout =
+{
+ (sal_Int32*)mso_sptDownArrowCalloutVert, sizeof( mso_sptDownArrowCalloutVert ) >> 3,
+ (sal_uInt16*)mso_sptDownArrowCalloutSegm, sizeof( mso_sptDownArrowCalloutSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptDownArrowCalloutCalc, sizeof( mso_sptDownArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDownArrowCalloutDefault,
+ (sal_Int32*)mso_sptDownArrowCalloutTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptLeftRightArrowCalloutVert[] =
+{
+ 0 MSO_I,0,
+ 4 MSO_I,0,
+ 4 MSO_I,3 MSO_I,
+ 6 MSO_I,3 MSO_I,
+ 6 MSO_I,1 MSO_I,
+ 21600, 10800,
+ 6 MSO_I,5 MSO_I,
+ 6 MSO_I,7 MSO_I,
+ 4 MSO_I,7 MSO_I,
+ 4 MSO_I,21600,
+ 0 MSO_I,21600,
+ 0 MSO_I,7 MSO_I,
+ 2 MSO_I,7 MSO_I,
+ 2 MSO_I,5 MSO_I,
+ 0, 10800,
+ 2 MSO_I,1 MSO_I,
+ 2 MSO_I,3 MSO_I,
+ 0 MSO_I,3 MSO_I
+};
+static const sal_uInt16 mso_sptLeftRightArrowCalloutSegm[] =
+{
+ 0x4000, 0x0011, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptLeftRightArrowCalloutCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
+ { 0x8000, 21600, 0, 0x0400 },
+ { 0x8000, 21600, 0, 0x0401 },
+ { 0x8000, 21600, 0, 0x0402 },
+ { 0x8000, 21600, 0, 0x0403 }
+};
+static const sal_Int32 mso_sptLeftRightArrowCalloutDefault[] =
+{
+ 4, 5400, 5500, 2700, 8100
+};
+static const sal_Int32 mso_sptLeftRightArrowCalloutTextRect[] =
+{
+ 1, 0 MSO_I, 0, 4 MSO_I, 21600
+};
+static const mso_AutoShape msoLeftRightArrowCallout =
+{
+ (sal_Int32*)mso_sptLeftRightArrowCalloutVert, sizeof( mso_sptLeftRightArrowCalloutVert ) >> 3,
+ (sal_uInt16*)mso_sptLeftRightArrowCalloutSegm, sizeof( mso_sptLeftRightArrowCalloutSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptLeftRightArrowCalloutCalc, sizeof( mso_sptLeftRightArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptLeftRightArrowCalloutDefault,
+ (sal_Int32*)mso_sptLeftRightArrowCalloutTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptUpDownArrowCalloutVert[] =
+{
+ 0, 0 MSO_I,
+ 0, 4 MSO_I,
+ 3 MSO_I,4 MSO_I,
+ 3 MSO_I,6 MSO_I,
+ 1 MSO_I,6 MSO_I,
+ 10800, 21600,
+ 5 MSO_I,6 MSO_I,
+ 7 MSO_I,6 MSO_I,
+ 7 MSO_I,4 MSO_I,
+ 21600, 4 MSO_I,
+ 21600, 0 MSO_I,
+ 7 MSO_I,0 MSO_I,
+ 7 MSO_I,2 MSO_I,
+ 5 MSO_I,2 MSO_I,
+ 10800, 0,
+ 1 MSO_I,2 MSO_I,
+ 3 MSO_I,2 MSO_I,
+ 3 MSO_I,0 MSO_I
+};
+static const sal_uInt16 mso_sptUpDownArrowCalloutSegm[] =
+{
+ 0x4000, 0x0011, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptUpDownArrowCalloutCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
+ { 0x8000, 21600, 0, 0x0400 },
+ { 0x8000, 21600, 0, 0x0401 },
+ { 0x8000, 21600, 0, 0x0402 },
+ { 0x8000, 21600, 0, 0x0403 }
+};
+static const sal_Int32 mso_sptUpDownArrowCalloutDefault[] =
+{
+ 4, 5400, 5500, 2700, 8100
+};
+static const sal_Int32 mso_sptUpDownArrowCalloutTextRect[] =
+{
+ 1, 0, 0 MSO_I, 21600, 4 MSO_I
+};
+static const mso_AutoShape msoUpDownArrowCallout =
+{
+ (sal_Int32*)mso_sptUpDownArrowCalloutVert, sizeof( mso_sptUpDownArrowCalloutVert ) >> 3,
+ (sal_uInt16*)mso_sptUpDownArrowCalloutSegm, sizeof( mso_sptUpDownArrowCalloutSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptUpDownArrowCalloutCalc, sizeof( mso_sptUpDownArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptUpDownArrowCalloutDefault,
+ (sal_Int32*)mso_sptUpDownArrowCalloutTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptQuadArrowCalloutVert[] =
+{
+ 0 MSO_I,0 MSO_I, // P0
+ 3 MSO_I,0 MSO_I, // P1
+ 3 MSO_I,2 MSO_I, // P2
+ 1 MSO_I,2 MSO_I, // P3
+ 10800, 0, // P4
+ 5 MSO_I,2 MSO_I, // P5
+ 7 MSO_I,2 MSO_I, // P6
+ 7 MSO_I,0 MSO_I, // P7
+ 4 MSO_I,0 MSO_I, // P8
+ 4 MSO_I,3 MSO_I, // P9
+ 6 MSO_I,3 MSO_I, // P10
+ 6 MSO_I,1 MSO_I, // P11
+ 21600, 10800, // P12
+ 6 MSO_I,5 MSO_I, // P13
+ 6 MSO_I,7 MSO_I, // P14
+ 4 MSO_I,7 MSO_I, // P15
+ 4 MSO_I,4 MSO_I, // P16
+ 7 MSO_I,4 MSO_I, // P17
+ 7 MSO_I,6 MSO_I, // P18
+ 5 MSO_I,6 MSO_I, // P19
+ 10800, 21600, // P20
+ 1 MSO_I,6 MSO_I, // P21
+ 3 MSO_I,6 MSO_I, // P22
+ 3 MSO_I,4 MSO_I, // P23
+ 0 MSO_I,4 MSO_I, // P24
+ 0 MSO_I,7 MSO_I, // P25
+ 2 MSO_I,7 MSO_I, // P26
+ 2 MSO_I,5 MSO_I, // P27
+ 0, 10800, // P28
+ 2 MSO_I,1 MSO_I, // P29
+ 2 MSO_I,3 MSO_I, // P30
+ 0 MSO_I,3 MSO_I // P31
+};
+static const sal_uInt16 mso_sptQuadArrowCalloutSegm[] =
+{
+ 0x4000, 0x001f, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptQuadArrowCalloutCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 },
+ { 0x2000, DFF_Prop_adjust4Value, 0, 0 },
+ { 0x8000, 21600, 0, 0x0400 },
+ { 0x8000, 21600, 0, 0x0401 },
+ { 0x8000, 21600, 0, 0x0402 },
+ { 0x8000, 21600, 0, 0x0403 }
+};
+static const sal_Int32 mso_sptQuadArrowCalloutDefault[] =
+{
+ 4, 5400, 8100, 2700, 9400
+};
+static const sal_Int32 mso_sptQuadArrowCalloutTextRect[] =
+{
+ 1, 0 MSO_I, 0 MSO_I, 4 MSO_I, 4 MSO_I
+};
+static const mso_AutoShape msoQuadArrowCallout =
+{
+ (sal_Int32*)mso_sptQuadArrowCalloutVert, sizeof( mso_sptQuadArrowCalloutVert ) >> 3,
+ (sal_uInt16*)mso_sptQuadArrowCalloutSegm, sizeof( mso_sptQuadArrowCalloutSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptQuadArrowCalloutCalc, sizeof( mso_sptQuadArrowCalloutCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptQuadArrowCalloutDefault,
+ (sal_Int32*)mso_sptQuadArrowCalloutTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptCircularArrowVert[] = //!!!!!!!!!!!!!!!!!
+{
+ 3 MSO_I, 3 MSO_I,
+ 20 MSO_I,20 MSO_I,
+ 19 MSO_I,18 MSO_I,
+ 17 MSO_I,16 MSO_I,
+ 0, 0,
+ 21600, 21600,
+ 9 MSO_I,8 MSO_I,
+ 11 MSO_I,10 MSO_I,
+ 24 MSO_I,23 MSO_I,
+ 40 MSO_I,39 MSO_I,
+ 29 MSO_I,28 MSO_I
+};
+static const sal_uInt16 mso_sptCircularArrowSegm[] =
+{
+ 0xa404, 0xa504, 0x0003, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptCircularArrowCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
+ { 0x2000, DFF_Prop_adjust2Value, 0, 0 }, // 1
+ { 0x2000, DFF_Prop_adjust3Value, 0, 0 }, // 2
+ { 0x8000, 10800, 0,DFF_Prop_adjust3Value }, // 3
+ { 0x4009, 10800, DFF_Prop_adjustValue, 0 }, // 4
+ { 0x400a, 10800, DFF_Prop_adjustValue, 0 }, // 5
+ { 0x4009, 10800, DFF_Prop_adjust2Value, 0 }, // 6
+ { 0x400a, 10800, DFF_Prop_adjust2Value, 0 }, // 7
+ { 0x2000, 0x0404, 10800, 0 }, // 8
+ { 0x2000, 0x0405, 10800, 0 }, // 9
+ { 0x2000, 0x0406, 10800, 0 }, // 10
+ { 0x2000, 0x0407, 10800, 0 }, // 11
+ { 0x6009, 0x0403, DFF_Prop_adjustValue, 0 }, // 12
+ { 0x600a, 0x0403, DFF_Prop_adjustValue, 0 }, // 13
+ { 0x6009, 0x0403, DFF_Prop_adjust2Value, 0 }, // 14
+ { 0x600a, 0x0403, DFF_Prop_adjust2Value, 0 }, // 15
+ { 0x2000, 0x040c, 10800, 0 }, // 16
+ { 0x2000, 0x040d, 10800, 0 }, // 17
+ { 0x2000, 0x040e, 10800, 0 }, // 18
+ { 0x2000, 0x040f, 10800, 0 }, // 19
+ { 0x8000, 21600, 0, 0x0403 }, // 20
+ { 0x4009, 12600, DFF_Prop_adjust2Value, 0 }, // 21
+ { 0x400a, 12600, DFF_Prop_adjust2Value, 0 }, // 22
+ { 0x2000, 0x0415, 10800, 0 }, // 23
+ { 0x2000, 0x0416, 10800, 0 }, // 24
+ { 0x2000, DFF_Prop_adjust3Value, 0, 1800 }, // 25
+ { 0x6009, 0x0419, DFF_Prop_adjust2Value, 0 }, // 26
+ { 0x600a, 0x0419, DFF_Prop_adjust2Value, 0 }, // 27
+ { 0x2000, 0x041a, 10800, 0 }, // 28
+ { 0x2000, 0x041b, 10800, 0 }, // 29
+ { 0x2001, 0x0403, 1, 2 }, // 30
+ { 0x8000, 10800, 0, 0x041e }, // 31
+ { 0x4001, 35, 0x0403, 10800 }, // 32
+ { 0x2000, 0x0420, 10, 0 }, // 33
+ { 0x2001, 0x0421, 256, 1 }, // 34
+ { 0x2001, 0x0422, 256, 1 }, // 35
+ { 0x6000, 0x0423, DFF_Prop_adjust2Value, 0 }, // 36
+ { 0x6009, 0x041f, 0x0424, 0 }, // 37
+ { 0x600a, 0x041f, 0x0424, 0 }, // 38
+ { 0x2000, 0x0425, 10800, 0 }, // 39
+ { 0x2000, 0x0426, 10800, 0 } // 40
+};
+static const sal_Int32 mso_sptCircularArrowDefault[] =
+{
+ 3, 180 << 16, 0, 5500
+};
+static const sal_Int32 mso_sptCircularArrowTextRect[] =
+{
+ 0
+};
+static const mso_AutoShape msoCircularArrow =
+{
+ (sal_Int32*)mso_sptCircularArrowVert, sizeof( mso_sptCircularArrowVert ) >> 3,
+ (sal_uInt16*)mso_sptCircularArrowSegm, sizeof( mso_sptCircularArrowSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptCircularArrowCalc, sizeof( mso_sptCircularArrowCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptCircularArrowDefault,
+ (sal_Int32*)mso_sptCircularArrowTextRect,
+ (sal_Int32*)NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptCubeVert[] =
+{
+ 0, 21600,
+ 0, 1 MSO_I,
+ 2 MSO_I,0,
+ 21600, 0,
+ 21600, 3 MSO_I,
+ 4 MSO_I,21600,
+ 0, 1 MSO_I,
+ 2 MSO_I,0,
+ 21600, 0,
+ 4 MSO_I,1 MSO_I,
+ 4 MSO_I, 21600,
+ 4 MSO_I,1 MSO_I,
+ 21600, 0,
+ 21600, 3 MSO_I
+};
+static const sal_uInt16 mso_sptCubeSegm[] =
+{
+ 0x4000, 0x0005, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptCubeCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x6000, DFF_Prop_geoTop, 0x400, 0 },
+ { 0x6000, DFF_Prop_geoLeft, 0x400, 0 },
+ { 0xa000, DFF_Prop_geoBottom, 0, 0x400 },
+ { 0xa000, DFF_Prop_geoRight, 0, 0x400 }
+};
+static const sal_Int32 mso_sptCubeTextRect[] =
+{
+ 1, 0, 1 MSO_I, 4 MSO_I, 21600
+};
+static const mso_AutoShape msoCube =
+{
+ (sal_Int32*)mso_sptCubeVert, sizeof( mso_sptCubeVert ) >> 3,
+ (sal_uInt16*)mso_sptCubeSegm, sizeof( mso_sptCubeSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptCubeCalc, sizeof( mso_sptCubeCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault5400,
+ (sal_Int32*)mso_sptCubeTextRect,
+ (sal_Int32*)NULL,
+ 10800, 10800
+};
+
+static const sal_Int32 mso_sptBevelVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 1 MSO_I, 0 MSO_I, 0 MSO_I, 0 MSO_I,
+ 21600, 0, 21600, 21600, 1 MSO_I, 1 MSO_I, 1 MSO_I, 0 MSO_I,
+ 21600, 21600, 0, 21600, 0 MSO_I,1 MSO_I, 1 MSO_I,1 MSO_I,
+ 0, 21600, 0, 0, 0 MSO_I,0 MSO_I, 0 MSO_I,1 MSO_I
+};
+static const sal_uInt16 mso_sptBevelSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptBevelCalc[] =
+{
+ { 0x2001, DFF_Prop_adjustValue, 21599, 21600 },
+ { 0x8000, 21600, 0, 0x400 }
+};
+static const sal_Int32 mso_sptBevelTextRect[] =
+{
+ 1, 0 MSO_I, 0 MSO_I, 1 MSO_I, 1 MSO_I
+};
+static const mso_AutoShape msoBevel =
+{
+ (sal_Int32*)mso_sptBevelVert, sizeof( mso_sptBevelVert ) >> 3,
+ (sal_uInt16*)mso_sptBevelSegm, sizeof( mso_sptBevelSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptBevelCalc, sizeof( mso_sptBevelCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault2700,
+ (sal_Int32*)mso_sptBevelTextRect,
+ NULL,
+ 10800, 10800
+};
+
+static const sal_Int32 mso_sptFoldedCornerVert[] = // adjustment1 : x 10800 - 21600
+{
+ 0, 0,
+ 21600, 0,
+ 21600, 0 MSO_I,
+ 0 MSO_I,21600,
+ 0, 21600,
+ 0 MSO_I,21600,
+ 3 MSO_I,0 MSO_I,
+ 8 MSO_I,9 MSO_I,
+ 10 MSO_I, 11 MSO_I,
+ 21600,0 MSO_I
+};
+static const sal_uInt16 mso_sptFoldedCornerSegm[] =
+{
+ 0x4000, 0x0004, 0x6001, 0x8000,
+ 0x4000, 0x0001, 0x2001, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptFoldedCornerCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x8000, 21600, 0, 0x400 },
+ { 0x2001, 0x0401, 8000, 10800 },
+ { 0x8000, 21600, 0, 0x0402 },
+ { 0x2001, 0x0401, 1, 2 },
+ { 0x2001, 0x0401, 1, 4 },
+ { 0x2001, 0x0401, 1, 7 },
+ { 0x2001, 0x0401, 1, 16 },
+ { 0x6000, 0x0403, 0x405, 0 },
+ { 0x6000, 0x0400, 0x406, 0 },
+ { 0x8000, 21600, 0, 0x404 },
+ { 0x6000, 0x400, 0x407, 0 }
+};
+static const sal_Int32 mso_sptFoldedCornerDefault[] =
+{
+ 1, 18900
+};
+static const sal_Int32 mso_sptFoldedCornerTextRect[] =
+{
+ 1, 0, 0, 21600, 11 MSO_I
+};
+static const mso_AutoShape msoFoldedCorner =
+{
+ (sal_Int32*)mso_sptFoldedCornerVert, sizeof( mso_sptFoldedCornerVert ) >> 3,
+ (sal_uInt16*)mso_sptFoldedCornerSegm, sizeof( mso_sptFoldedCornerSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptFoldedCornerCalc, sizeof( mso_sptFoldedCornerCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptFoldedCornerDefault,
+ (sal_Int32*)mso_sptFoldedCornerTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonBlankVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 1 MSO_I, 0 MSO_I, 0 MSO_I, 0 MSO_I,
+ 21600, 0, 21600, 21600, 1 MSO_I, 1 MSO_I, 1 MSO_I, 0 MSO_I,
+ 21600, 21600, 0, 21600, 0 MSO_I,1 MSO_I, 1 MSO_I,1 MSO_I,
+ 0, 21600, 0, 0, 0 MSO_I,0 MSO_I, 0 MSO_I,1 MSO_I
+};
+static const sal_uInt16 mso_sptActionButtonBlankSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptActionButtonBlankCalc[] =
+{
+ { 0x2001, DFF_Prop_adjustValue, 21599, 21600 },
+ { 0x8000, 21600, 0, 0x400 }
+};
+static const sal_Int32 mso_sptActionButtonBlankTextRect[] =
+{
+ 1, 0 MSO_I, 0 MSO_I, 1 MSO_I, 1 MSO_I
+};
+static const mso_AutoShape msoActionButtonBlank =
+{
+ (sal_Int32*)mso_sptActionButtonBlankVert, sizeof( mso_sptActionButtonBlankVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonBlankSegm, sizeof( mso_sptActionButtonBlankSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonBlankCalc, sizeof( mso_sptActionButtonBlankCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonBlankTextRect,
+ NULL,
+ 10800, 10800
+};
+
+static const sal_Int32 mso_sptActionButtonTextRect[] =
+{
+ 1, 1 MSO_I, 2 MSO_I, 3 MSO_I, 4 MSO_I
+};
+static const sal_Int32 mso_sptActionButtonHomeVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 10800, 0xa MSO_I,
+ 0xc MSO_I, 0xe MSO_I,
+ 0xc MSO_I, 0x10 MSO_I,
+ 0x12 MSO_I, 0x10 MSO_I,
+ 0x12 MSO_I, 0x14 MSO_I,
+ 0x16 MSO_I, 10800,
+ 0x18 MSO_I, 10800,
+ 0x18 MSO_I, 0x1a MSO_I,
+ 0x1c MSO_I, 0x1a MSO_I,
+ 0x1c MSO_I, 10800,
+ 0x1e MSO_I, 10800,
+
+ 0xc MSO_I, 0xe MSO_I,
+ 0xc MSO_I, 0x10 MSO_I,
+ 0x12 MSO_I, 0x10 MSO_I,
+ 0x12 MSO_I, 0x14 MSO_I,
+
+ 0x20 MSO_I, 0x24 MSO_I,
+ 0x22 MSO_I, 0x24 MSO_I,
+ 0x22 MSO_I, 0x1a MSO_I,
+ 0x18 MSO_I, 0x1a MSO_I,
+ 0x18 MSO_I, 10800,
+ 0x1c MSO_I, 10800,
+ 0x1c MSO_I, 0x1a MSO_I,
+ 0x20 MSO_I, 0x1a MSO_I
+
+};
+static const sal_uInt16 mso_sptActionButtonHomeSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x000a, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0007, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptActionButtonHomeCalc[] = // adj value 0 - 5400
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
+ { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
+ { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
+ { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
+ { 0x8000, 10800, 0, DFF_Prop_adjustValue },
+ { 0x2001, 0x0405, 1, 10800 }, // scaling 6
+ { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
+ { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
+
+ { 0x4001, -8000, 0x0406, 1 }, // 9
+ { 0x6000, 0x0409, 0x0408, 0 }, // a
+ { 0x4001, 2960, 0x0406, 1 }, // b
+ { 0x6000, 0x040b, 0x0407, 0 }, // c
+ { 0x4001, -5000, 0x0406, 1 }, // d
+ { 0x6000, 0x040d, 0x0408, 0 }, // e
+ { 0x4001, -7000, 0x0406, 1 }, // f
+ { 0x6000, 0x040f, 0x0408, 0 }, // 10
+ { 0x4001, 5000, 0x0406, 1 }, // 11
+ { 0x6000, 0x0411, 0x0407, 0 }, // 12
+ { 0x4001, -2960, 0x0406, 1 }, // 13
+ { 0x6000, 0x0413, 0x0408, 0 }, // 14
+ { 0x4001, 8000, 0x0406, 1 }, // 15
+ { 0x6000, 0x0415,0x0407, 0 }, // 16
+ { 0x4001, 6100, 0x0406, 1 }, // 17
+ { 0x6000, 0x0417,0x0407, 0 }, // 18
+ { 0x4001, 8260, 0x0406, 1 }, // 19
+ { 0x6000, 0x0419, 0x0408, 0 }, // 1a
+ { 0x4001, -6100, 0x0406, 1 }, // 1b
+ { 0x6000, 0x041b, 0x0407, 0 }, // 1c
+ { 0x4001, -8000, 0x0406, 1 }, // 1d
+ { 0x6000, 0x041d, 0x0407, 0 }, // 1e
+ { 0x4001, -1060, 0x0406, 1 }, // 1f
+ { 0x6000, 0x041f, 0x0407, 0 }, // 20
+ { 0x4001, 1060, 0x0406, 1 }, // 21
+ { 0x6000, 0x0421, 0x0407, 0 }, // 22
+ { 0x4001, 4020, 0x0406, 1 }, // 23
+ { 0x6000, 0x0423, 0x0408, 0 } // 24
+
+};
+static const mso_AutoShape msoActionButtonHome =
+{
+ (sal_Int32*)mso_sptActionButtonHomeVert, sizeof( mso_sptActionButtonHomeVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonHomeSegm, sizeof( mso_sptActionButtonHomeSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonHomeCalc, sizeof( mso_sptActionButtonHomeCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonHelpVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 0xa MSO_I, 0xc MSO_I, 0xe MSO_I, 0x10 MSO_I,
+
+ 0x12 MSO_I, 0x14 MSO_I, // p0
+ 0x12 MSO_I, 0x16 MSO_I, // p1
+ 0x12 MSO_I, 0x18 MSO_I, // c2
+ 0x1a MSO_I, 10800, // c3
+ 0x1c MSO_I, 10800, // p4
+ 0x1e MSO_I, 10800, // c5
+ 0x20 MSO_I, 0x22 MSO_I, // c6
+ 0x20 MSO_I, 0x24 MSO_I, // p7
+ 0x20 MSO_I, 0x26 MSO_I, // c8
+ 0x28 MSO_I, 0x2a MSO_I, // c9
+ 10800, 0x2a MSO_I, // p10
+ 0x2c MSO_I, 0x2a MSO_I, // c11
+ 0x2e MSO_I, 0x26 MSO_I, // c12
+ 0x2e MSO_I, 0x24 MSO_I, // p13
+ 0x30 MSO_I, 0x24 MSO_I, // p14
+ 0x30 MSO_I, 0x32 MSO_I, // c15
+ 0x34 MSO_I, 0x36 MSO_I, // c16
+ 10800, 0x36 MSO_I, // p17
+ 0x12 MSO_I, 0x36 MSO_I, // c18
+ 0x1c MSO_I, 0x32 MSO_I, // c19
+ 0x1c MSO_I, 0x24 MSO_I, // p20
+ 0x1c MSO_I, 0x38 MSO_I, // c21
+ 0x3a MSO_I, 0x3c MSO_I, // c22
+ 0x12 MSO_I, 0x3c MSO_I, // p23
+ 10800, 0x3c MSO_I, // c24
+ 0x34 MSO_I, 10800, // c25
+ 0x34 MSO_I, 0x16 MSO_I, // p26
+ 0x34 MSO_I, 0x14 MSO_I // p27
+};
+static const sal_uInt16 mso_sptActionButtonHelpSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0xa302, 0x6000, 0x8000,
+ 0x4000, 0x0001, 0x2004, 0x0001, 0x2004, 0x0001, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptActionButtonHelpCalc[] = // adj value 0 - 5400
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
+ { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
+ { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
+ { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
+ { 0x8000, 10800, 0, DFF_Prop_adjustValue },
+ { 0x2001, 0x0405, 1, 10800 }, // scaling 6
+ { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
+ { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
+
+ { 0x4001, -1690, 0x0406, 1 }, // 9
+ { 0x6000, 0x0409, 0x0407, 0 }, // a
+ { 0x4001, 4600, 0x0406, 1 }, // b
+ { 0x6000, 0x040b, 0x0408, 0 }, // c
+ { 0x4001, 1690, 0x0406, 1 }, // d
+ { 0x6000, 0x040d, 0x0407, 0 }, // e
+ { 0x4001, 7980, 0x0406, 1 }, // f
+ { 0x6000, 0x040f, 0x0408, 0 }, // 10
+ { 0x4001, 1270, 0x0406, 1 }, // 11
+ { 0x6000, 0x0411, 0x0407, 0 }, // 12
+ { 0x4001, 4000, 0x0406, 1 }, // 13
+ { 0x6000, 0x0413, 0x0408, 0 }, // 14
+ { 0x4001, 1750, 0x0406, 1 }, // 15
+ { 0x6000, 0x0415, 0x0408, 0 }, // 16
+ { 0x4001, 800, 0x0406, 1 }, // 17
+ { 0x6000, 0x0417, 0x0408, 0 }, // 18
+ { 0x4001, 1650, 0x0406, 1 }, // 19
+ { 0x6000, 0x0419, 0x0407, 0 }, // 1a
+ { 0x4001, 2340, 0x0406, 1 }, // 1b
+ { 0x6000, 0x041b, 0x0407, 0 }, // 1c
+ { 0x4001, 3640, 0x0406, 1 }, // 1d
+ { 0x6000, 0x041d, 0x0407, 0 }, // 1e
+ { 0x4001, 4670, 0x0406, 1 }, // 1f
+ { 0x6000, 0x041f, 0x0407, 0 }, // 20
+ { 0x4001, -1570, 0x0406, 1 }, // 21
+ { 0x6000, 0x0421, 0x0408, 0 }, // 22
+ { 0x4001, -3390, 0x0406, 1 }, // 23
+ { 0x6000, 0x0423, 0x0408, 0 }, // 24
+ { 0x4001, -6050, 0x0406, 1 }, // 25
+ { 0x6000, 0x0425, 0x0408, 0 }, // 26
+ { 0x4001, 2540, 0x0406, 1 }, // 27
+ { 0x6000, 0x0427, 0x0407, 0 }, // 28
+ { 0x4001, -8050, 0x0406, 1 }, // 29
+ { 0x6000, 0x0429, 0x0408, 0 }, // 2a
+ { 0x4001, -2540, 0x0406, 1 }, // 2b
+ { 0x6000, 0x042b, 0x0407, 0 }, // 2c
+ { 0x4001, -4460, 0x0406, 1 }, // 2d
+ { 0x6000, 0x042d, 0x0407, 0 }, // 2e
+ { 0x4001, -2330, 0x0406, 1 }, // 2f
+ { 0x6000, 0x042f, 0x0407, 0 }, // 30
+ { 0x4001, -4700, 0x0406, 1 }, // 31
+ { 0x6000, 0x0431, 0x0408, 0 }, // 32
+ { 0x4001, -1270, 0x0406, 1 }, // 33
+ { 0x6000, 0x0433, 0x0407, 0 }, // 34
+ { 0x4001, -5720, 0x0406, 1 }, // 35
+ { 0x6000, 0x0435, 0x0408, 0 }, // 36
+ { 0x4001, -2540, 0x0406, 1 }, // 37
+ { 0x6000, 0x0437, 0x0408, 0 }, // 38
+ { 0x4001, 1800, 0x0406, 1 }, // 39
+ { 0x6000, 0x0439, 0x0407, 0 }, // 3a
+ { 0x4001, -1700, 0x0406, 1 }, // 3b
+ { 0x6000, 0x043b, 0x0408, 0 } // 3c
+};
+static const mso_AutoShape msoActionButtonHelp =
+{
+ (sal_Int32*)mso_sptActionButtonHelpVert, sizeof( mso_sptActionButtonHelpVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonHelpSegm, sizeof( mso_sptActionButtonHelpSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonHelpCalc, sizeof( mso_sptActionButtonHelpCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonInformationVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 0xa MSO_I, 0xc MSO_I, 0xe MSO_I, 0x10 MSO_I,
+
+ 0x12 MSO_I, 0x14 MSO_I, 0x16 MSO_I, 0x18 MSO_I,
+
+ 0x1a MSO_I, 0x1c MSO_I,
+ 0x1e MSO_I, 0x1c MSO_I,
+ 0x1e MSO_I, 0x20 MSO_I,
+ 0x22 MSO_I, 0x20 MSO_I,
+ 0x22 MSO_I, 0x24 MSO_I,
+ 0x1a MSO_I, 0x24 MSO_I,
+ 0x1a MSO_I, 0x20 MSO_I,
+ 0x26 MSO_I, 0x20 MSO_I,
+ 0x26 MSO_I, 0x28 MSO_I,
+ 0x1a MSO_I, 0x28 MSO_I
+};
+static const sal_uInt16 mso_sptActionButtonInformationSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0xa302, 0x6000, 0x8000,
+ 0xa302, 0x6000, 0x8000,
+ 0x4000, 0x0009, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptActionButtonInformationCalc[] = // adj value 0 - 5400
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
+ { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
+ { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
+ { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
+ { 0x8000, 10800, 0, DFF_Prop_adjustValue },
+ { 0x2001, 0x0405, 1, 10800 }, // scaling 6
+ { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
+ { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
+
+ { 0x4001, -8050, 0x0406, 1 }, // 9
+ { 0x6000, 0x0409, 0x0407, 0 }, // a
+ { 0x4001, -8050, 0x0406, 1 }, // b
+ { 0x6000, 0x040b, 0x0408, 0 }, // c
+ { 0x4001, 8050, 0x0406, 1 }, // d
+ { 0x6000, 0x040d, 0x0407, 0 }, // e
+ { 0x4001, 8050, 0x0406, 1 }, // f
+ { 0x6000, 0x040f, 0x0408, 0 }, // 10
+
+ { 0x4001, -2060, 0x0406, 1 }, // 11
+ { 0x6000, 0x0411, 0x0407, 0 }, // 12
+ { 0x4001, -7620, 0x0406, 1 }, // 13
+ { 0x6000, 0x0413, 0x0408, 0 }, // 14
+ { 0x4001, 2060, 0x0406, 1 }, // 15
+ { 0x6000, 0x0415, 0x0407, 0 }, // 16
+ { 0x4001, -3500, 0x0406, 1 }, // 17
+ { 0x6000, 0x0417, 0x0408, 0 }, // 18
+
+ { 0x4001, -2960, 0x0406, 1 }, // 19
+ { 0x6000, 0x0419, 0x0407, 0 }, // 1a
+ { 0x4001, -2960, 0x0406, 1 }, // 1b
+ { 0x6000, 0x041b, 0x0408, 0 }, // 1c
+ { 0x4001, 1480, 0x0406, 1 }, // 1d
+ { 0x6000, 0x041d, 0x0407, 0 }, // 1e
+ { 0x4001, 5080, 0x0406, 1 }, // 1f
+ { 0x6000, 0x041f, 0x0408, 0 }, // 20
+ { 0x4001, 2960, 0x0406, 1 }, // 21
+ { 0x6000, 0x0421, 0x0407, 0 }, // 22
+ { 0x4001, 6140, 0x0406, 1 }, // 23
+ { 0x6000, 0x0423, 0x0408, 0 }, // 24
+ { 0x4001, -1480, 0x0406, 1 }, // 25
+ { 0x6000, 0x0425, 0x0407, 0 }, // 26
+ { 0x4001, -1920, 0x0406, 1 }, // 27
+ { 0x6000, 0x0427, 0x0408, 0 } // 28
+};
+static const mso_AutoShape msoActionButtonInformation =
+{
+ (sal_Int32*)mso_sptActionButtonInformationVert, sizeof( mso_sptActionButtonInformationVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonInformationSegm, sizeof( mso_sptActionButtonInformationSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonInformationCalc, sizeof( mso_sptActionButtonInformationCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonBackPreviousVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 0xa MSO_I, 10800,
+ 0xe MSO_I, 0xc MSO_I,
+ 0xe MSO_I, 0x10 MSO_I
+};
+static const sal_uInt16 mso_sptActionButtonForwardBackSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0002, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptActionButtonForwardBackCalc[] = // adj value 0 - 5400
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
+ { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
+ { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
+ { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
+ { 0x8000, 10800, 0, DFF_Prop_adjustValue },
+ { 0x2001, 0x0405, 1, 10800 }, // scaling 6
+ { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
+ { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
+
+ { 0x4001, -8050, 0x0406, 1 }, // 9
+ { 0x6000, 0x0409, 0x0407, 0 }, // a
+ { 0x4001, -8050, 0x0406, 1 }, // b
+ { 0x6000, 0x040b, 0x0408, 0 }, // c
+ { 0x4001, 8050, 0x0406, 1 }, // d
+ { 0x6000, 0x040d, 0x0407, 0 }, // e
+ { 0x4001, 8050, 0x0406, 1 }, // f
+ { 0x6000, 0x040f, 0x0408, 0 } // 10
+};
+static const mso_AutoShape msoActionButtonBackPrevious =
+{
+ (sal_Int32*)mso_sptActionButtonBackPreviousVert, sizeof( mso_sptActionButtonBackPreviousVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonForwardBackSegm, sizeof( mso_sptActionButtonForwardBackSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonForwardBackCalc, sizeof( mso_sptActionButtonForwardBackCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonForwardNextVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 0xa MSO_I, 0xc MSO_I,
+ 0xe MSO_I, 10800,
+ 0xa MSO_I, 0x10 MSO_I
+};
+static const mso_AutoShape msoActionButtonForwardNext =
+{
+ (sal_Int32*)mso_sptActionButtonForwardNextVert, sizeof( mso_sptActionButtonForwardNextVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonForwardBackSegm, sizeof( mso_sptActionButtonForwardBackSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonForwardBackCalc, sizeof( mso_sptActionButtonForwardBackCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonBeginningVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 0xa MSO_I, 10800,
+ 0xe MSO_I, 0xc MSO_I,
+ 0xe MSO_I, 0x10 MSO_I,
+
+ 0x12 MSO_I, 0xc MSO_I,
+ 0x14 MSO_I, 0xc MSO_I,
+ 0x14 MSO_I, 0x10 MSO_I,
+ 0x12 MSO_I, 0x10 MSO_I
+};
+static const sal_uInt16 mso_sptActionButtonBeginningEndSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+
+ 0x4000, 0x0002, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptActionButtonBeginningEndCalc[] = // adj value 0 - 5400
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
+ { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
+ { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
+ { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
+ { 0x8000, 10800, 0, DFF_Prop_adjustValue },
+ { 0x2001, 0x0405, 1, 10800 }, // scaling 6
+ { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
+ { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
+
+ { 0x4001, -4020, 0x0406, 1 }, // 9
+ { 0x6000, 0x0409, 0x0407, 0 }, // a
+ { 0x4001, -8050, 0x0406, 1 }, // b
+ { 0x6000, 0x040b, 0x0408, 0 }, // c
+ { 0x4001, 8050, 0x0406, 1 }, // d
+ { 0x6000, 0x040d, 0x0407, 0 }, // e
+ { 0x4001, 8050, 0x0406, 1 }, // f
+ { 0x6000, 0x040f, 0x0408, 0 }, // 10
+
+ { 0x4001, -8050, 0x0406, 1 }, // 11
+ { 0x6000, 0x0411, 0x0407, 0 }, // 12
+ { 0x4001, -6140, 0x0406, 1 }, // 13
+ { 0x6000, 0x0413, 0x0407, 0 }, // 14
+
+
+ { 0x4001, 4020, 0x0406, 1 }, // 15
+ { 0x6000, 0x0415, 0x0407, 0 }, // 16
+ { 0x4001, 6140, 0x0406, 1 }, // 17
+ { 0x6000, 0x0417, 0x0407, 0 } // 18
+};
+static const mso_AutoShape msoActionButtonBeginning =
+{
+ (sal_Int32*)mso_sptActionButtonBeginningVert, sizeof( mso_sptActionButtonBeginningVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonBeginningEndSegm, sizeof( mso_sptActionButtonBeginningEndSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonBeginningEndCalc, sizeof( mso_sptActionButtonBeginningEndCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonEndVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 0x16 MSO_I, 10800,
+ 0x12 MSO_I, 0x10 MSO_I,
+ 0x12 MSO_I, 0xc MSO_I,
+
+ 0x18 MSO_I, 0xc MSO_I,
+ 0x18 MSO_I, 0x10 MSO_I,
+ 0xe MSO_I, 0x10 MSO_I,
+ 0xe MSO_I, 0xc MSO_I
+};
+static const mso_AutoShape msoActionButtonEnd =
+{
+ (sal_Int32*)mso_sptActionButtonEndVert, sizeof( mso_sptActionButtonEndVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonBeginningEndSegm, sizeof( mso_sptActionButtonBeginningEndSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonBeginningEndCalc, sizeof( mso_sptActionButtonBeginningEndCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonReturnVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 0xa MSO_I, 0xc MSO_I, // p0
+ 0xe MSO_I, 0xc MSO_I, // p1
+ 0xe MSO_I, 0x10 MSO_I, // p2
+ 0xe MSO_I, 0x12 MSO_I, // c3
+ 0x14 MSO_I, 0x16 MSO_I, // c4
+ 0x18 MSO_I, 0x16 MSO_I, // p5
+ 10800, 0x16 MSO_I, // p6
+ 0x1a MSO_I, 0x16 MSO_I, // c7
+ 0x1c MSO_I, 0x12 MSO_I, // c8
+ 0x1c MSO_I, 0x10 MSO_I, // p9
+ 0x1c MSO_I, 0xc MSO_I, // p10
+ 10800, 0xc MSO_I, // p11
+ 0x1e MSO_I, 0x20 MSO_I, // p12
+ 0x22 MSO_I, 0xc MSO_I, // p13
+ 0x24 MSO_I, 0xc MSO_I, // p14
+ 0x24 MSO_I, 0x10 MSO_I, // p15
+ 0x24 MSO_I, 0x26 MSO_I, // c16
+ 0x28 MSO_I, 0x2a MSO_I, // c17
+ 10800, 0x2a MSO_I, // p18
+ 0x18 MSO_I, 0x2a MSO_I, // p19
+ 0x2c MSO_I, 0x2a MSO_I, // c20
+ 0xa MSO_I, 0x26 MSO_I, // c21
+ 0xa MSO_I, 0x10 MSO_I // p22
+};
+static const sal_uInt16 mso_sptActionButtonReturnSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0002, 0x2001, 0x0001, 0x2001, 0x0006,0x2001, 0x0001, 0x2001, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptActionButtonReturnCalc[] = // adj value 0 - 5400
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
+ { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
+ { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
+ { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
+ { 0x8000, 10800, 0, DFF_Prop_adjustValue },
+ { 0x2001, 0x0405, 1, 10800 }, // scaling 6
+ { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
+ { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
+
+ { 0x4001, -8050, 0x0406, 1 }, // 9
+ { 0x6000, 0x0409, 0x0407, 0 }, // a
+ { 0x4001, -3800, 0x0406, 1 }, // b
+ { 0x6000, 0x040b, 0x0408, 0 }, // c
+ { 0x4001, -4020, 0x0406, 1 }, // d
+ { 0x6000, 0x040d, 0x0407, 0 }, // e
+ { 0x4001, 2330, 0x0406, 1 }, // f
+ { 0x6000, 0x040f, 0x0408, 0 }, // 10
+ { 0x4001, 3390, 0x0406, 1 }, // 11
+ { 0x6000, 0x0411, 0x0408, 0 }, // 12
+ { 0x4001, -3100, 0x0406, 1 }, // 13
+ { 0x6000, 0x0413, 0x0407, 0 }, // 14
+ { 0x4001, 4230, 0x0406, 1 }, // 15
+ { 0x6000, 0x0415, 0x0408, 0 }, // 16
+ { 0x4001, -1910, 0x0406, 1 }, // 17
+ { 0x6000, 0x0417, 0x0407, 0 }, // 18
+ { 0x4001, 1190, 0x0406, 1 }, // 19
+ { 0x6000, 0x0419, 0x0407, 0 }, // 1a
+ { 0x4001, 2110, 0x0406, 1 }, // 1b
+ { 0x6000, 0x041b, 0x0407, 0 }, // 1c
+ { 0x4001, 4030, 0x0406, 1 }, // 1d
+ { 0x6000, 0x041d, 0x0407, 0 }, // 1e
+ { 0x4001, -7830, 0x0406, 1 }, // 1f
+ { 0x6000, 0x041f, 0x0408, 0 }, // 20
+ { 0x4001, 8250, 0x0406, 1 }, // 21
+ { 0x6000, 0x0421, 0x0407, 0 }, // 22
+ { 0x4001, 6140, 0x0406, 1 }, // 23
+ { 0x6000, 0x0423, 0x0407, 0 }, // 24
+ { 0x4001, 5510, 0x0406, 1 }, // 25
+ { 0x6000, 0x0425, 0x0408, 0 }, // 26
+ { 0x4001, 3180, 0x0406, 1 }, // 27
+ { 0x6000, 0x0427, 0x0407, 0 }, // 28
+ { 0x4001, 8450, 0x0406, 1 }, // 29
+ { 0x6000, 0x0429, 0x0408, 0 }, // 2a
+ { 0x4001, -5090, 0x0406, 1 }, // 2b
+ { 0x6000, 0x042b, 0x0407, 0 } // 2c
+};
+static const mso_AutoShape msoActionButtonReturn =
+{
+ (sal_Int32*)mso_sptActionButtonReturnVert, sizeof( mso_sptActionButtonReturnVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonReturnSegm, sizeof( mso_sptActionButtonReturnSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonReturnCalc, sizeof( mso_sptActionButtonReturnCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonDocumentVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 0xa MSO_I, 0xc MSO_I,
+ 0xe MSO_I, 0xc MSO_I,
+ 0x10 MSO_I, 0x12 MSO_I,
+ 0x10 MSO_I, 0x14 MSO_I,
+ 0xa MSO_I, 0x14 MSO_I,
+
+ 0xe MSO_I, 0xc MSO_I,
+ 0x10 MSO_I, 0x12 MSO_I,
+ 0xe MSO_I, 0x12 MSO_I
+};
+static const sal_uInt16 mso_sptActionButtonDocumentSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+
+ 0x4000, 0x0004, 0x6001, 0x8000,
+ 0x4000, 0x0002, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptActionButtonDocumentCalc[] = // adj value 0 - 5400
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
+ { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
+ { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
+ { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
+ { 0x8000, 10800, 0, DFF_Prop_adjustValue },
+ { 0x2001, 0x0405, 1, 10800 }, // scaling 6
+ { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
+ { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
+
+ { 0x4001, -6350, 0x0406, 1 }, // 9
+ { 0x6000, 0x0409, 0x0407, 0 }, // a
+ { 0x4001, -7830, 0x0406, 1 }, // b
+ { 0x6000, 0x040b, 0x0408, 0 }, // c
+ { 0x4001, 1690, 0x0406, 1 }, // d
+ { 0x6000, 0x040d, 0x0407, 0 }, // e
+ { 0x4001, 6350, 0x0406, 1 }, // f
+ { 0x6000, 0x040f, 0x0407, 0 }, // 10
+ { 0x4001, -3810, 0x0406, 1 }, // 11
+ { 0x6000, 0x0411, 0x0408, 0 }, // 12
+ { 0x4001, 7830, 0x0406, 1 }, // 13
+ { 0x6000, 0x0413, 0x0408, 0 } // 14
+};
+static const mso_AutoShape msoActionButtonDocument =
+{
+ (sal_Int32*)mso_sptActionButtonDocumentVert, sizeof( mso_sptActionButtonDocumentVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonDocumentSegm, sizeof( mso_sptActionButtonDocumentSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonDocumentCalc, sizeof( mso_sptActionButtonDocumentCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonSoundVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 0xa MSO_I, 0xc MSO_I,
+ 0xe MSO_I, 0xc MSO_I,
+ 0x10 MSO_I, 0x12 MSO_I,
+ 0x10 MSO_I, 0x14 MSO_I,
+ 0xe MSO_I, 0x16 MSO_I,
+ 0xa MSO_I, 0x16 MSO_I,
+
+ 0x18 MSO_I, 10800,
+ 0x1a MSO_I, 10800,
+
+ 0x18 MSO_I, 0xc MSO_I,
+ 0x1a MSO_I, 0x1c MSO_I,
+
+ 0x18 MSO_I, 0x16 MSO_I,
+ 0x1a MSO_I, 0x1e MSO_I
+};
+static const sal_uInt16 mso_sptActionButtonSoundSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+
+ 0x4000, 0x0005, 0x6001, 0x8000,
+ 0x4000, 0x0001, 0x8000,
+ 0x4000, 0x0001, 0x8000,
+ 0x4000, 0x0001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptActionButtonSoundCalc[] = // adj value 0 - 5400
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
+ { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
+ { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
+ { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
+ { 0x8000, 10800, 0, DFF_Prop_adjustValue },
+ { 0x2001, 0x0405, 1, 10800 }, // scaling 6
+ { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
+ { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
+
+ { 0x4001, -8050, 0x0406, 1 }, // 9
+ { 0x6000, 0x0409, 0x0407, 0 }, // a
+ { 0x4001, -2750, 0x0406, 1 }, // b
+ { 0x6000, 0x040b, 0x0408, 0 }, // c
+ { 0x4001, -2960, 0x0406, 1 }, // d
+ { 0x6000, 0x040d, 0x0407, 0 }, // e
+ { 0x4001, 2120, 0x0406, 1 }, // f
+ { 0x6000, 0x040f, 0x0407, 0 }, // 10
+ { 0x4001, -8050, 0x0406, 1 }, // 11
+ { 0x6000, 0x0411, 0x0408, 0 }, // 12
+ { 0x4001, 8050, 0x0406, 1 }, // 13
+ { 0x6000, 0x0413, 0x0408, 0 }, // 14
+ { 0x4001, 2750, 0x0406, 1 }, // 15
+ { 0x6000, 0x0415, 0x0408, 0 }, // 16
+ { 0x4001, 4020, 0x0406, 1 }, // 17
+ { 0x6000, 0x0417, 0x0407, 0 }, // 18
+ { 0x4001, 8050, 0x0406, 1 }, // 19
+ { 0x6000, 0x0419, 0x0407, 0 }, // 1a
+ { 0x4001, -5930, 0x0406, 1 }, // 1b
+ { 0x6000, 0x041b, 0x0408, 0 }, // 1c
+ { 0x4001, 5930, 0x0406, 1 }, // 1d
+ { 0x6000, 0x041d, 0x0408, 0 } // 1e
+};
+static const mso_AutoShape msoActionButtonSound =
+{
+ (sal_Int32*)mso_sptActionButtonSoundVert, sizeof( mso_sptActionButtonSoundVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonSoundSegm, sizeof( mso_sptActionButtonSoundSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonSoundCalc, sizeof( mso_sptActionButtonSoundCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptActionButtonMovieVert[] =
+{
+ 0, 0, 21600, 0, 21600, 21600, 0, 21600,
+ 0, 0, 21600, 0, 3 MSO_I, 2 MSO_I, 1 MSO_I, 2 MSO_I,
+ 21600, 0, 21600, 21600, 3 MSO_I, 4 MSO_I, 3 MSO_I, 2 MSO_I,
+ 21600, 21600, 0, 21600, 1 MSO_I,4 MSO_I, 3 MSO_I,4 MSO_I,
+ 0, 21600, 0, 0, 1 MSO_I,2 MSO_I, 1 MSO_I,4 MSO_I,
+
+ 0xa MSO_I, 0xc MSO_I, // p0
+ 0xe MSO_I, 0xc MSO_I, // p1
+ 0x10 MSO_I, 0x12 MSO_I, // p2
+ 0x14 MSO_I, 0x12 MSO_I, // p3
+ 0x16 MSO_I, 0x18 MSO_I, // p4
+ 0x16 MSO_I, 0x1a MSO_I, // p5
+ 0x1c MSO_I, 0x1a MSO_I, // p6
+ 0x1e MSO_I, 0x18 MSO_I, // p7
+ 0x20 MSO_I, 0x18 MSO_I, // p8
+ 0x20 MSO_I, 0x22 MSO_I, // p9
+ 0x1e MSO_I, 0x22 MSO_I, // p10
+ 0x1c MSO_I, 0x24 MSO_I, // p11
+ 0x16 MSO_I, 0x24 MSO_I, // p12
+ 0x16 MSO_I, 0x26 MSO_I, // p13
+ 0x2a MSO_I, 0x26 MSO_I, // p14
+ 0x2a MSO_I, 0x28 MSO_I, // p15
+ 0x10 MSO_I, 0x28 MSO_I, // p16
+ 0xe MSO_I, 0x2c MSO_I, // p17,
+ 0xa MSO_I, 0x2c MSO_I // p18
+};
+static const sal_uInt16 mso_sptActionButtonMovieSegm[] =
+{
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0003, 0x6001, 0x8000,
+ 0x4000, 0x0012, 0x6001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptActionButtonMovieCalc[] = // adj value 0 - 5400
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x6000, DFF_Prop_geoLeft, DFF_Prop_adjustValue, 0 },
+ { 0x6000, DFF_Prop_geoTop, DFF_Prop_adjustValue, 0 },
+ { 0xa000, DFF_Prop_geoRight, 0, DFF_Prop_adjustValue },
+ { 0xa000, DFF_Prop_geoBottom, 0, DFF_Prop_adjustValue },
+ { 0x8000, 10800, 0, DFF_Prop_adjustValue },
+ { 0x2001, 0x0405, 1, 10800 }, // scaling 6
+ { 0x6000, DFF_Prop_geoRight, DFF_Prop_geoLeft, 10800 }, // lr center 7
+ { 0x6000, DFF_Prop_geoBottom, DFF_Prop_geoTop, 10800 }, // ul center 8
+
+ { 0x4001, -8050, 0x0406, 1 }, // 9
+ { 0x6000, 0x0409, 0x0407, 0 }, // a
+ { 0x4001, -4020, 0x0406, 1 }, // b
+ { 0x6000, 0x040b, 0x0408, 0 }, // c
+ { 0x4001, -7000, 0x0406, 1 }, // d
+ { 0x6000, 0x040d, 0x0407, 0 }, // e
+ { 0x4001, -6560, 0x0406, 1 }, // f
+ { 0x6000, 0x040f, 0x0407, 0 }, // 10
+ { 0x4001, -3600, 0x0406, 1 }, // 11
+ { 0x6000, 0x0411, 0x0408, 0 }, // 12
+ { 0x4001, 4020, 0x0406, 1 }, // 13
+ { 0x6000, 0x0413, 0x0407, 0 }, // 14
+ { 0x4001, 4660, 0x0406, 1 }, // 15
+ { 0x6000, 0x0415, 0x0407, 0 }, // 16
+ { 0x4001, -2960, 0x0406, 1 }, // 17
+ { 0x6000, 0x0417, 0x0408, 0 }, // 18
+ { 0x4001, -2330, 0x0406, 1 }, // 19
+ { 0x6000, 0x0419, 0x0408, 0 }, // 1a
+ { 0x4001, 6780, 0x0406, 1 }, // 1b
+ { 0x6000, 0x041b, 0x0407, 0 }, // 1c
+ { 0x4001, 7200, 0x0406, 1 }, // 1d
+ { 0x6000, 0x041d, 0x0407, 0 }, // 1e
+ { 0x4001, 8050, 0x0406, 1 }, // 1f
+ { 0x6000, 0x041f, 0x0407, 0 }, // 20
+ { 0x4001, 2960, 0x0406, 1 }, // 21
+ { 0x6000, 0x0421, 0x0408, 0 }, // 22
+ { 0x4001, 2330, 0x0406, 1 }, // 23
+ { 0x6000, 0x0423, 0x0408, 0 }, // 24
+ { 0x4001, 3800, 0x0406, 1 }, // 25
+ { 0x6000, 0x0425, 0x0408, 0 }, // 26
+ { 0x4001, -1060, 0x0406, 1 }, // 27
+ { 0x6000, 0x0427, 0x0408, 0 }, // 28
+ { 0x4001, -6350, 0x0406, 1 }, // 29
+ { 0x6000, 0x0429, 0x0407, 0 }, // 2a
+ { 0x4001, -640, 0x0406, 1 }, // 2b
+ { 0x6000, 0x042b, 0x0408, 0 } // 2c
+};
+static const mso_AutoShape msoActionButtonMovie =
+{
+ (sal_Int32*)mso_sptActionButtonMovieVert, sizeof( mso_sptActionButtonMovieVert ) >> 3,
+ (sal_uInt16*)mso_sptActionButtonMovieSegm, sizeof( mso_sptActionButtonMovieSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptActionButtonMovieCalc, sizeof( mso_sptActionButtonMovieCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault1400,
+ (sal_Int32*)mso_sptActionButtonTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptSmileyFaceVert[] = // adj value 15510 - 17520
+{
+ 0, 0, 21600, 21600,
+ 6140, 6350, 8470, 8680,
+ 13130, 6350, 15460, 8680,
+ 4870, 1 MSO_I,8680, 2 MSO_I,
+ 12920, 2 MSO_I,16730, 1 MSO_I
+
+};
+static const sal_uInt16 mso_sptSmileyFaceSegm[] =
+{
+ 0xa302, 0x6000, 0x8000,
+ 0xa302, 0x6000, 0x8000,
+ 0xa302, 0x6000, 0x8000,
+ 0x4000, 0x2001, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptSmileyFaceCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 15510 },
+ { 0x8000, 17520, 0, 0x400 },
+ { 0x4000, 15510, 0x400, 0 }
+};
+
+static const sal_Int32 mso_sptSmileyFaceTextRect[] =
+{
+ 1, 0, 1 MSO_I, 4 MSO_I, 21600
+};
+static const sal_Int32 mso_sptSmileyFaceDefault[] =
+{
+ 1, 17520
+};
+static const mso_AutoShape msoSmileyFace =
+{
+ (sal_Int32*)mso_sptSmileyFaceVert, sizeof( mso_sptSmileyFaceVert ) >> 3,
+ (sal_uInt16*)mso_sptSmileyFaceSegm, sizeof( mso_sptSmileyFaceSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptSmileyFaceCalc, sizeof( mso_sptSmileyFaceCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptSmileyFaceDefault,
+ (sal_Int32*)mso_sptEllipseTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptDonutVert[] = // adj value 0 - 10800
+{
+ 0, 0, 21600, 21600,
+ 0 MSO_I,0 MSO_I,1 MSO_I,1 MSO_I
+};
+static const sal_uInt16 mso_sptDonutSegm[] =
+{
+ 0xa302, 0xa302, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptDonutCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 },
+ { 0x8000, 21600, 0, DFF_Prop_adjustValue }
+};
+static const mso_AutoShape msoDonut =
+{
+ (sal_Int32*)mso_sptDonutVert, sizeof( mso_sptDonutVert ) >> 3,
+ (sal_uInt16*)mso_sptDonutSegm, sizeof( mso_sptDonutSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptDonutCalc, sizeof( mso_sptDonutCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault5400,
+ (sal_Int32*)mso_sptEllipseTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+static const sal_Int32 mso_sptNoSmokingVert[] = // adj value 0 - 7200
+{
+ 0, 0, 21600, 21600,
+ 0 MSO_I,0 MSO_I,1 MSO_I,1 MSO_I,
+ 9 MSO_I,0xa MSO_I, 0xb MSO_I, 0xc MSO_I,
+ 0 MSO_I,0 MSO_I,1 MSO_I,1 MSO_I,
+ 0xd MSO_I, 0xe MSO_I, 0xf MSO_I, 0x10 MSO_I
+};
+static const sal_uInt16 mso_sptNoSmokingSegm[] =
+{
+ 0xa302, 0xa404, 0xa404, 0x6000, 0x8000
+};
+static const SvxMSDffCalculationData mso_sptNoSmokingCalc[] =
+{
+ { 0x2000, DFF_Prop_adjustValue, 0, 0 }, // 0
+ { 0x8000, 21600, 0, DFF_Prop_adjustValue }, // 1
+ { 0x8000, 10800, 0, DFF_Prop_adjustValue }, // 2
+ { 0x2001, DFF_Prop_adjustValue, 1, 2 }, // 3
+ { 0xa080, 0x403, 0, 0x402 }, // 4
+ { 0x8000, 10800, 0, 0x403 }, // 5 x1
+ { 0x4000, 10800, 0x403, 0 }, // 6 x2
+ { 0x8000, 10800, 0, 0x404 }, // 7 y1
+ { 0x4000, 10800, 0x404, 0 }, // 8 y2
+ { 0x6081, 0x405, 0x407, 450 }, // 9
+ { 0x6082, 0x405, 0x407, 450 }, // a
+ { 0x6081, 0x405, 0x408, 450 }, // b
+ { 0x6082, 0x405, 0x408, 450 }, // c
+ { 0x6081, 0x406, 0x408, 450 }, // d
+ { 0x6082, 0x406, 0x408, 450 }, // e
+ { 0x6081, 0x406, 0x407, 450 }, // f
+ { 0x6082, 0x406, 0x407, 450 } // 10
+};
+
+static const mso_AutoShape msoNoSmoking =
+{
+ (sal_Int32*)mso_sptNoSmokingVert, sizeof( mso_sptNoSmokingVert ) >> 3,
+ (sal_uInt16*)mso_sptNoSmokingSegm, sizeof( mso_sptNoSmokingSegm ) >> 1,
+ (SvxMSDffCalculationData*)mso_sptNoSmokingCalc, sizeof( mso_sptNoSmokingCalc ) / sizeof( SvxMSDffCalculationData ),
+ (sal_Int32*)mso_sptDefault2700,
+ (sal_Int32*)mso_sptEllipseTextRect,
+ NULL,
+ 0x80000000, 0x80000000
+};
+
+class SvxMSDffAdjustmentHandle
+{
+ sal_Int32 nAdjustValue;
+ sal_Int32 nDefaultValue;
+ sal_Bool bIsDefault;
+
+ public :
+ SvxMSDffAdjustmentHandle() : nAdjustValue( 0 ), nDefaultValue( 0 ), bIsDefault( TRUE ) {};
+
+ void SetAdjustValue( sal_Int32 nVal ) { nAdjustValue = nVal; bIsDefault = FALSE; };
+ sal_Int32 GetAdjustValue() const { return bIsDefault ? nDefaultValue : nAdjustValue; };
+ void SetDefaultValue( sal_Int32 nVal ) { nDefaultValue = nVal; };
+ sal_Bool IsDefault() const { return bIsDefault; };
+};
+
+SvxMSDffAutoShape::~SvxMSDffAutoShape()
+{
+ if ( bVertAlloc )
+ delete pVertData;
+ if ( bSegAlloc )
+ delete pSegData;
+ if ( bTextRectAlloc )
+ delete pTextRectData;
+ if ( bCalcAlloc )
+ delete pCalculationData;
+ delete[] pAdjustmentHandles;
+}
+
+SvxMSDffAutoShape::SvxMSDffAutoShape( const DffPropertyReader& rPropReader, SvStream& rSt,
+ DffObjData& rData, Rectangle& rGeo, sal_Int32 nAngle ) :
+ eSpType ( rData.eShapeType ),
+ aSnapRect ( rGeo ),
+ nFix16Angle ( nAngle ),
+ nXRef ( 0x80000000 ),
+ nYRef ( 0x80000000 ),
+ nColorData ( 0 ),
+ nCalculationData ( 0 ),
+ nAdjustmentHandles ( 0 ),
+ pAdjustmentHandles ( NULL ),
+ pVertData ( NULL ),
+ pSegData ( NULL ),
+ pCalculationData ( NULL ),
+ pTextRectData ( NULL ),
+ bIsEmpty ( TRUE ),
+ bVertAlloc ( FALSE ),
+ bSegAlloc ( FALSE ),
+ bCalcAlloc ( FALSE ),
+ bTextRectAlloc ( FALSE ),
+ bTextFlow ( ( (MSO_TextFlow)rPropReader.GetPropertyValue( DFF_Prop_txflTextFlow ) ) == mso_txflTtoBA ),
+ bFilled ( ( rPropReader.GetPropertyValue( DFF_Prop_fNoFillHitTest ) & 0x10 ) != 0 ), // pie <-> arc
+ bFlipH ( ( rData.nSpFlags & SP_FFLIPH ) != 0 ),
+ bFlipV ( ( rData.nSpFlags & SP_FFLIPV ) != 0 )
+{
+ const sal_Int32* pBoundRect = NULL;
+ const sal_Int32* pDefData = NULL;
+ const mso_AutoShape* pDefAutoShape = NULL;
+
+ switch( eSpType )
+ {
+ case mso_sptRectangle : pDefAutoShape = &msoRectangle; break;
+ case mso_sptParallelogram : pDefAutoShape = &msoParallelogram; break;
+ case mso_sptTrapezoid : pDefAutoShape = &msoTrapezoid; break;
+ case mso_sptDiamond : pDefAutoShape = &msoDiamond; break;
+ case mso_sptRoundRectangle : pDefAutoShape = &msoRoundRectangle; break;
+ case mso_sptOctagon : pDefAutoShape = &msoOctagon; break;
+ case mso_sptIsocelesTriangle : pDefAutoShape = &msoIsocelesTriangle; break;
+ case mso_sptRightTriangle : pDefAutoShape = &msoRightTriangle; break;
+ case mso_sptEllipse : pDefAutoShape = &msoEllipse; break;
+ case mso_sptHexagon : pDefAutoShape = &msoHexagon; break;
+ case mso_sptPlus : pDefAutoShape = &msoPlus; break;
+ case mso_sptPentagon : pDefAutoShape = &msoPentagon; break;
+ case mso_sptCan :
+ {
+ pDefAutoShape = &msoCan;
+ nColorData = 0x20200000;
+ }
+ break;
+ case mso_sptCube :
+ {
+ pDefAutoShape = &msoCube;
+ nColorData = 0x302d0000;
+ }
+ break;
+
+ case mso_sptActionButtonBlank :
+ {
+ pDefAutoShape = &msoActionButtonBlank;
+ nColorData = 0x502ad400;
+ }
+ break;
+ case mso_sptActionButtonHome :
+ {
+ pDefAutoShape = &msoActionButtonHome;
+ nColorData = 0x702ad4ad;
+ }
+ break;
+ case mso_sptActionButtonHelp :
+ {
+ pDefAutoShape = &msoActionButtonHelp;
+ nColorData = 0x602ad4a0;
+ }
+ break;
+ case mso_sptActionButtonInformation :
+ {
+ pDefAutoShape = &msoActionButtonInformation;
+ nColorData = 0x702ad4a5;
+ }
+ break;
+ case mso_sptActionButtonBackPrevious :
+ {
+ pDefAutoShape = &msoActionButtonBackPrevious;
+ nColorData = 0x602ad4a0;
+ }
+ break;
+ case mso_sptActionButtonForwardNext :
+ {
+ pDefAutoShape = &msoActionButtonForwardNext;
+ nColorData = 0x602ad4a0;
+ }
+ break;
+ case mso_sptActionButtonBeginning :
+ {
+ pDefAutoShape = &msoActionButtonBeginning;
+ nColorData = 0x602ad4a0;
+ }
+ break;
+ case mso_sptActionButtonEnd :
+ {
+ pDefAutoShape = &msoActionButtonEnd;
+ nColorData = 0x602ad4a0;
+ }
+ break;
+ case mso_sptActionButtonReturn :
+ {
+ pDefAutoShape = &msoActionButtonReturn;
+ nColorData = 0x602ad4a0;
+ }
+ break;
+ case mso_sptActionButtonDocument :
+ {
+ pDefAutoShape =&msoActionButtonDocument;
+ nColorData = 0x702ad4da;
+ }
+ break;
+ case mso_sptActionButtonSound :
+ {
+ pDefAutoShape = &msoActionButtonSound;
+ nColorData = 0x602ad4a0;
+ }
+ break;
+ case mso_sptActionButtonMovie :
+ {
+ pDefAutoShape = &msoActionButtonMovie;
+ nColorData = 0x602ad4a0;
+ }
+ break;
+ case mso_sptBevel :
+ {
+ pDefAutoShape = &msoBevel;
+ nColorData = 0x502ad400;
+ }
+ break;
+
+ case mso_sptFoldedCorner :
+ {
+ pDefAutoShape = &msoFoldedCorner;
+ nColorData = 0x20d00000;
+ }
+ break;
+ case mso_sptSmileyFace :
+ {
+ pDefAutoShape = &msoSmileyFace;
+ nColorData = 0x20d00000;
+ }
+ break;
+ case mso_sptDonut : pDefAutoShape = &msoDonut; break;
+ case mso_sptNoSmoking : pDefAutoShape = &msoNoSmoking; break;
+ case mso_sptArrow : pDefAutoShape = &msoArrow; break;
+ case mso_sptUpArrow : pDefAutoShape = &msoUpArrow; break;
+ case mso_sptDownArrow : pDefAutoShape = &msoDownArrow; break;
+ case mso_sptLeftArrow : pDefAutoShape = &msoLeftArrow; break;
+ case mso_sptLeftRightArrow : pDefAutoShape = &msoLeftRightArrow; break;
+ case mso_sptUpDownArrow : pDefAutoShape = &msoUpDownArrow; break;
+ case mso_sptQuadArrow : pDefAutoShape = &msoQuadArrow; break;
+ case mso_sptLeftRightUpArrow : pDefAutoShape = &msoLeftRightUpArrow; break;
+ case mso_sptBentArrow : pDefAutoShape = &msoBentArrow; break;
+ case mso_sptLeftUpArrow : pDefAutoShape = &msoLeftUpArrow; break;
+ case mso_sptBentUpArrow : pDefAutoShape = &msoBentUpArrow; break;
+// case mso_sptCurvedRightArrow : pDefAutoShape = &msoCurvedRightArrow; break; // !!!!!
+ case mso_sptStripedRightArrow : pDefAutoShape = &msoStripedRightArrow; break;
+ case mso_sptHomePlate : pDefAutoShape = &msoHomePlate; break;
+ case mso_sptChevron : pDefAutoShape = &msoChevron; break;
+ case mso_sptRightArrowCallout : pDefAutoShape = &msoRightArrowCallout; break;
+ case mso_sptLeftArrowCallout : pDefAutoShape = &msoLeftArrowCallout; break;
+ case mso_sptUpArrowCallout : pDefAutoShape = &msoUpArrowCallout; break;
+ case mso_sptDownArrowCallout : pDefAutoShape = &msoDownArrowCallout; break;
+ case mso_sptLeftRightArrowCallout : pDefAutoShape = &msoLeftRightArrowCallout; break;
+ case mso_sptUpDownArrowCallout : pDefAutoShape = &msoUpDownArrowCallout; break;
+ case mso_sptQuadArrowCallout : pDefAutoShape = &msoQuadArrowCallout; break;
+ case mso_sptCircularArrow : pDefAutoShape = &msoCircularArrow; break;
+ default :
+ break;
+ }
+ if ( pDefAutoShape )
+ {
+ nNumElemVert = pDefAutoShape->nVertices;
+ pVertData = pDefAutoShape->pVertices;
+ nNumElemSeg = pDefAutoShape->nElements;
+ pSegData = pDefAutoShape->pElements;
+ nCalculationData = pDefAutoShape->nCalculation;
+ pCalculationData = pDefAutoShape->pCalculation;
+ pDefData = pDefAutoShape->pDefData;
+ pTextRectData = pDefAutoShape->pTextRect;
+ pBoundRect = pDefAutoShape->pBoundRect;
+ nXRef = pDefAutoShape->nXRef;
+ nYRef = pDefAutoShape->nYRef;
+ }
+ if ( rPropReader.SeekToContent( DFF_Prop_pVertices, rSt ) )
+ {
+ sal_uInt16 nTmp16, nNumElemMemVert, nElemSizeVert;
+ rSt >> nTmp16 >> nNumElemMemVert >> nElemSizeVert;
+ if ( nTmp16 )
+ {
+ nNumElemVert = nTmp16;
+ sal_uInt32 i = nNumElemVert << 1;
+ bVertAlloc = TRUE;
+ pVertData = new sal_Int32[ i ];
+ sal_Int32 *pTmp = pVertData;
+ if ( nElemSizeVert == 8 )
+ {
+ while( i-- )
+ {
+ rSt >> *pTmp++;
+ }
+ }
+ else
+ {
+ sal_Int16 nTmp;
+ while ( i-- )
+ {
+ rSt >> nTmp;
+ *pTmp++ = nTmp;
+ }
+ }
+ }
+ }
+ if ( pVertData || pDefAutoShape )
+ {
+ bIsEmpty = FALSE;
+ if ( rPropReader.SeekToContent( DFF_Prop_pSegmentInfo, rSt ) )
+ {
+ sal_uInt16 nTmp16, nNumElemMemSeg, nElemSizeSeg;
+ rSt >> nTmp16 >> nNumElemMemSeg >> nElemSizeSeg;
+ if ( nTmp16 )
+ {
+ nNumElemSeg = nTmp16;
+ bSegAlloc = TRUE;
+ pSegData = new sal_uInt16[ nNumElemSeg ];
+#ifdef __BIGENDIAN
+ sal_uInt32 i = nNumElemSeg;
+ sal_uInt16* pTmp = pSegData;
+ while( i-- )
+
+ {
+ rSt >> *pTmp++;
+ }
+#else
+ rSt.Read( pSegData, nNumElemSeg << 1 );
+#endif
+ }
+ }
+ if ( rPropReader.SeekToContent( 342, rSt ) )
+ {
+ sal_uInt16 nTmp16, nNumElemMem, nElemSize;
+ rSt >> nTmp16 >> nNumElemMem >> nElemSize;
+ if ( nTmp16 && ( nElemSize == 8 ) )
+ {
+ nCalculationData = nTmp16;
+ pCalculationData = new SvxMSDffCalculationData[ nCalculationData ];
+ bCalcAlloc = TRUE;
+ sal_uInt32 i;
+ sal_uInt16 nVal0, nVal1, nVal2;
+ for ( i = 0; i < nCalculationData; i++ )
+ {
+ SvxMSDffCalculationData& rDat = pCalculationData[ i ];
+ rSt >> rDat.nFlags
+ >> nVal0 >> nVal1 >> nVal2;
+ rDat.nVal[ 0 ] = nVal0;
+ rDat.nVal[ 1 ] = nVal1;
+ rDat.nVal[ 2 ] = nVal2;
+ }
+ }
+ }
+
+ if ( rPropReader.SeekToContent( 343, rSt ) )
+ {
+ sal_uInt16 nTmp16, nNumElemMem, nElemSize;
+ rSt >> nTmp16 >> nNumElemMem >> nElemSize;
+ if ( nTmp16 && ( nElemSize == 16 ) )
+ {
+ sal_Int32 nNumElem = nTmp16;
+ if ( nNumElem > 1 )
+ nNumElem = 2;
+ bTextRectAlloc = TRUE;
+ pTextRectData = new sal_Int32[ ( nNumElemMem << 2 ) + 1 ];
+ sal_Int32* pTmp = pTextRectData;
+ *pTmp++ = nNumElem;
+#ifdef __BIGENDIAN
+ sal_uInt32 i = nNumElem << 2;
+ while( i-- )
+ {
+ rSt >> *pTmp++;
+ }
+#else
+ rSt.Read( pTmp, nNumElem << 4 );
+#endif
+ }
+ }
+
+ const sal_Int32* pTmp = pDefData;
+ sal_Int32 nDefaults = 0;
+ if ( pTmp )
+ nDefaults = nAdjustmentHandles = *pTmp++;
+ sal_Int32 i = 10;
+ sal_Int32 nProperty = DFF_Prop_adjust10Value;
+ do
+ {
+ if ( rPropReader.IsProperty( nProperty-- ) )
+ break;
+ }
+ while ( --i );
+ if ( i > nAdjustmentHandles )
+ nAdjustmentHandles = i;
+ if ( nAdjustmentHandles )
+ {
+ pAdjustmentHandles = new SvxMSDffAdjustmentHandle[ nAdjustmentHandles ];
+ for ( i = 0; i < nAdjustmentHandles; i++ )
+ {
+ if ( i < nDefaults )
+ pAdjustmentHandles[ i ].SetDefaultValue( *pTmp++ );
+ if ( rPropReader.IsProperty( i + DFF_Prop_adjustValue ) )
+ pAdjustmentHandles[ i ].SetAdjustValue( rPropReader.GetPropertyValue( i + DFF_Prop_adjustValue ) );
+ }
+ }
+ if ( pBoundRect )
+ aBoundRect = Rectangle( Point( pBoundRect[ 0 ], pBoundRect[ 1 ] ), Point( pBoundRect[ 2 ], pBoundRect[ 3 ] ) );
+ else
+ {
+ if ( pCalculationData )
+ aBoundRect = Rectangle( Point(), Size( 21600, 21600 ) );
+ else
+ aBoundRect = Rectangle( Point(), aSnapRect.GetSize() );
+ }
+ fXScale = (double)aSnapRect.GetWidth() / (double)aBoundRect.GetWidth();
+ fYScale = (double)aSnapRect.GetHeight() / (double)aBoundRect.GetHeight();
+
+ if ( rPropReader.IsProperty( 339 ) )
+ nXRef = rPropReader.GetPropertyValue( 339 );
+ if ( rPropReader.IsProperty( 340 ) )
+ nYRef = rPropReader.GetPropertyValue( 340 );
+ }
+}
+
+sal_Int32 SvxMSDffAutoShape::Fix16ToAngle( sal_Int32 nAngle ) const
+{
+ if ( nAngle )
+ {
+ nAngle = ( (sal_Int16)( nAngle >> 16) * 100L ) + ( ( ( nAngle & 0x0000ffff) * 100L ) >> 16 );
+ nAngle = NormAngle360( -nAngle );
+ }
+ return nAngle;
+}
+
+sal_Int32 SvxMSDffAutoShape::GetAdjustValue( sal_Int32 nIndex ) const
+{
+ return ( nIndex < nAdjustmentHandles ) ? pAdjustmentHandles[ nIndex ].GetAdjustValue() : 0;
+}
+
+sal_Int32 SvxMSDffAutoShape::GetAdjustValue( sal_Int32 nIndex, sal_Int32 nDefault ) const
+{
+ if ( ( nIndex >= nAdjustmentHandles ) || pAdjustmentHandles[ nIndex ].IsDefault() )
+ return nDefault;
+ else
+ return pAdjustmentHandles[ nIndex ].GetAdjustValue();
+}
+
+sal_Int32 SvxMSDffAutoShape::GetValue( sal_uInt32 nDat, sal_Bool bScale, sal_Bool bScaleWidth ) const
+{
+ double fVal;
+ sal_uInt32 nGeometryFlags = 0;
+ if ( ( nDat >> 16 ) == 0x8000 )
+ fVal = ImplGetValue( (sal_uInt16)nDat, nGeometryFlags );
+ else
+ fVal = (sal_Int32)nDat;
+
+ if ( bScale )
+ {
+ if ( nGeometryFlags & 0xc )
+ {
+
+ }
+ if ( bScaleWidth )
+ {
+ if ( ( aSnapRect.GetWidth() > aSnapRect.GetHeight() ) && ( ( nXRef != 0x80000000 ) || nGeometryFlags ) )
+ {
+ sal_Bool bGeo = ( ( ( nGeometryFlags & 1 ) == 0 ) && ( fVal > nXRef ) )
+ || ( ( nGeometryFlags & 4 ) != 0 );
+ if ( ( nGeometryFlags & 5 ) == 5 )
+ {
+ fVal -= (double)aBoundRect.GetWidth() * 0.5;
+ fVal *= fYScale;
+ fVal += (double)aSnapRect.GetWidth() * 0.5;
+ }
+ else
+ {
+ fVal *= fYScale;
+ if ( bGeo )
+ fVal += (double)aBoundRect.GetWidth() * fXScale - (double)aBoundRect.GetWidth() * fYScale;
+ }
+ }
+ else
+ {
+ fVal -= aBoundRect.Left();
+ fVal *= fXScale;
+ }
+ }
+ else
+ {
+ if ( ( aSnapRect.GetHeight() > aSnapRect.GetWidth() ) && ( ( nYRef != 0x80000000 ) || nGeometryFlags ) )
+ {
+ sal_Bool bGeo = ( ( ( nGeometryFlags & 2 ) == 0 ) && ( fVal > nYRef ) )
+ || ( ( nGeometryFlags & 8 ) != 0 );
+ if ( ( nGeometryFlags & 10 ) == 10 )
+ {
+ fVal -= (double)aBoundRect.GetHeight() * 0.5;
+ fVal *= fXScale;
+ fVal += (double)aSnapRect.GetHeight() * 0.5;
+ }
+ else
+ {
+ fVal *= fXScale;
+ if ( bGeo )
+ fVal += (double)aBoundRect.GetHeight() * fYScale - (double)aBoundRect.GetHeight() * fXScale;
+ }
+ }
+ else
+ {
+ fVal -= aBoundRect.Top();
+ fVal *= fYScale;
+ }
+ }
+ }
+ return fVal;
+}
+
+double SvxMSDffAutoShape::ImplGetValue( sal_Int16 nIndex, sal_uInt32& nGeometryFlags ) const
+{
+ if ( !pCalculationData )
+ return 0;
+ if ( nCalculationData <= nIndex )
+ return 0;
+
+ double fVal[ 3 ];
+ sal_Int16 i, nFlags = pCalculationData[ nIndex ].nFlags;
+ for ( i = 0; i < 3; i++ )
+ {
+ if ( nFlags & ( 0x2000 << i ) )
+ {
+ sal_Int16 nVal = pCalculationData[ nIndex ].nVal[ i ];
+ if ( nVal & 0x400 )
+ fVal[ i ] = ImplGetValue( nVal & 0xff, nGeometryFlags );
+ else
+ {
+ switch ( nVal )
+ {
+ case DFF_Prop_adjustValue :
+ case DFF_Prop_adjust2Value :
+ case DFF_Prop_adjust3Value :
+ case DFF_Prop_adjust4Value :
+ case DFF_Prop_adjust5Value :
+ case DFF_Prop_adjust6Value :
+ case DFF_Prop_adjust7Value :
+ case DFF_Prop_adjust8Value :
+ case DFF_Prop_adjust9Value :
+ case DFF_Prop_adjust10Value :
+ fVal[ i ] = GetAdjustValue( nVal - DFF_Prop_adjustValue );
+ break;
+ case DFF_Prop_geoLeft :
+ {
+ nGeometryFlags |= 1;
+ fVal[ i ] = 0.0;
+ }
+ break;
+ case DFF_Prop_geoTop :
+ {
+ nGeometryFlags |= 2;
+ fVal[ i ] = 0.0;
+ }
+ break;
+ case DFF_Prop_geoRight :
+ {
+ nGeometryFlags |= 4;
+ fVal[ i ] = aBoundRect.GetWidth();
+ }
+ break;
+ case DFF_Prop_geoBottom :
+ {
+ nGeometryFlags |= 8;
+ fVal[ i ] = aBoundRect.GetHeight();
+ }
+ break;
+ default:
+ fVal[ i ] = 0.0;
+ break;
+ }
+ }
+ }
+ else
+ fVal[ i ] = pCalculationData[ nIndex ].nVal[ i ];
+ }
+ switch ( nFlags & 0xff )
+ {
+ case 0 :
+ {
+ fVal[ 0 ] += fVal[ 1 ];
+ fVal[ 0 ] -= fVal[ 2 ];
+ }
+ break;
+
+ case 1 :
+ {
+ if ( fVal[ 1 ] != 0.0 )
+ fVal[ 0 ] *= fVal[ 1 ];
+ if ( fVal[ 2 ] != 0.0 )
+ fVal[ 0 ] /= fVal[ 2 ];
+ }
+ break;
+
+ case 3 :
+ {
+
+ }
+ break;
+
+ case 6 :
+ {
+ return fVal[ 0 ];
+ }
+ break;
+
+ case 9 : // in this special case the second parameter is a fixed fload
+ { // which has to be divided by 0x10000
+ fVal[ 0 ] *= sin( fVal[ 1 ] / 65536 * F_PI180 );
+ }
+ break;
+
+ case 0xa : // in this special case the second parameter is a fixed fload
+ { // which has to be divided by 0x10000
+ fVal[ 0 ] *= cos( fVal[ 1 ] / 65536 * F_PI180 );
+ }
+ break;
+
+ case 0xe :
+ {
+ return fVal[ 0 ];
+ }
+ break;
+
+ case 0x80 :
+ {
+ // fVal[0]^2 + fVal[1]^2 = fVal[2]^2
+ if ( fVal[ 2 ] == 0.0 )
+ fVal[ 0 ] = sqrt( fVal[ 0 ] * fVal[ 0 ] + fVal[ 1 ] * fVal[ 1 ] );
+ else
+ {
+ double fA = fVal[ 0 ] != 0.0 ? fVal[ 0 ] : fVal[ 1 ];
+ fVal[ 0 ] = sqrt( fVal[ 2 ] * fVal[ 2 ] - fA * fA );
+ }
+ }
+ break;
+ case 0x81 :
+ {
+ double fAngle = F_PI1800 * fVal[ 2 ];
+ fVal[ 0 ] = ( cos( fAngle ) * ( fVal[ 0 ] - 10800 )
+ + sin( fAngle ) * ( fVal[ 1 ] - 10800 ) ) + 10800;
+ }
+ break;
+ case 0x82 :
+ {
+ double fAngle = F_PI1800 * fVal[ 2 ];
+ fVal[ 0 ] = - ( sin( fAngle ) * ( fVal[ 0 ] - 10800 )
+ - cos( fAngle ) * ( fVal[ 1 ] - 10800 ) ) + 10800;
+ }
+ break;
+ default :
+ {
+
+ }
+ break;
+ }
+ return fVal[ 0 ];
+}
+
+// nLumDat 28-31 = number of luminance entries in nLumDat
+// nLumDat 27-24 = nLumDatEntry 0
+// nLumDat 23-20 = nLumDatEntry 1 ...
+// each 4bit entry is to be interpreted as a 10 percent signed luminance changing
+Color SvxMSDffAutoShape::ImplGetColorData( const Color& rFillColor, sal_uInt32 nIndex )
+{
+ Color aRetColor;
+
+ sal_uInt32 i, nColor, nTmp, nCount = nColorData >> 28;
+
+ if ( nCount )
+ {
+ if ( nIndex >= nCount )
+ nIndex = nCount - 1;
+
+ sal_uInt32 nFillColor = (sal_uInt32)rFillColor.GetRed() |
+ ((sal_uInt32)rFillColor.GetGreen() << 8 ) |
+ ((sal_uInt32)rFillColor.GetBlue() << 16 );
+
+ sal_Int32 nLumDat = nColorData << ( ( 1 + nIndex ) << 2 );
+ sal_Int32 nLuminance = ( nLumDat >> 28 ) * 12;
+
+ nTmp = nFillColor;
+ nColor = 0;
+ for ( i = 0; i < 3; i++ )
+ {
+ sal_Int32 nC = (sal_uInt8)nTmp;
+ nTmp >>= 8;
+ nC += ( ( nLuminance * nC ) >> 8 );
+ if ( nC < 0 )
+ nC = 0;
+ else if ( nC &~ 0xff )
+ nC = 0xff;
+ nColor >>= 8;
+ nColor |= nC << 16;
+ }
+ aRetColor = Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
+ }
+ return aRetColor;
+}
+
+sal_Bool SvxMSDffAutoShape::IsEmpty() const
+{
+ return bIsEmpty;
+}
+
+Rectangle SvxMSDffAutoShape::GetTextRect() const
+{
+ sal_Int32 nTextRectCount = 0;
+ sal_Int32* pTmp = pTextRectData;
+ if ( pTmp )
+ nTextRectCount = *pTmp++;
+
+ if ( !nTextRectCount || ( aBoundRect.GetWidth() == 0 ) || ( aBoundRect.GetHeight() == 0 ) )
+ return aSnapRect;
+ sal_Int32 aAry[ 4 ], nPtNum;
+ if ( bTextFlow && ( nTextRectCount > 1 ) )
+ pTmp += 4;
+ for ( nPtNum = 0; nPtNum < 4; nPtNum++ )
+ aAry[ nPtNum ] = GetValue( *pTmp++, TRUE, ( nPtNum & 1 ) != 1 );
+ Point aTopLeft( aAry[ 0 ], aAry[ 1 ] );
+ Point aBottomRight( aAry[ 2 ], aAry[ 3 ] );
+ Rectangle aRect( aTopLeft, aBottomRight );
+ aRect.Move( aSnapRect.Left(), aSnapRect.Top() );
+ return aRect;
+}
+
+SdrObject* SvxMSDffAutoShape::GetObject( SdrModel* pSdrModel, SfxItemSet& rSet, sal_Bool bSetAutoShapeAdjustItem )
+{
+ SdrObject* pRet = NULL;
+
+ if ( !IsEmpty() )
+ {
+ if ( eSpType == mso_sptRectangle )
+ pRet = new SdrRectObj( aSnapRect );
+ else if ( eSpType == mso_sptRoundRectangle )
+ {
+ sal_Int32 nW = aSnapRect.Right() - aSnapRect.Left();
+ sal_Int32 nH = aSnapRect.Bottom() - aSnapRect.Top();
+ if ( nH < nW )
+ nW = nH;
+ double fAdjust = (double)GetAdjustValue( 0, 3600 ) / 21600.0;
+ nW = (double)nW * fAdjust;
+ rSet.Put( SdrEckenradiusItem( nW ) );
+ pRet = new SdrRectObj( aSnapRect );
+ }
+ else if ( eSpType == mso_sptEllipse )
+ pRet = new SdrCircObj( OBJ_CIRC, aSnapRect );
+
+ if ( pRet )
+ {
+ pRet->SetModel( pSdrModel );
+ pRet->NbcSetAttributes( rSet, FALSE );
+ }
+ else
+ {
+ // Header auswerten
+ XPolygon aXP( (sal_uInt16)nNumElemVert );
+ const sal_Int32* pTmp = pVertData;
+ sal_uInt32 nVal32, nPtNum, nPtCount = nNumElemVert << 1;
+
+ sal_Bool bScale = ( eSpType != mso_sptArc );
+
+ for ( nPtNum = 0; nPtNum < nPtCount; nPtNum++ )
+ {
+ nVal32 = GetValue( *pTmp++, bScale, ( nPtNum & 1 ) != 1 );
+
+ if ( nPtNum & 1 )
+ aXP[ (sal_uInt16)( nPtNum >> 1 ) ].Y() = nVal32;
+ else
+ aXP[ (sal_uInt16)( nPtNum >> 1 ) ].X() = nVal32;
+ }
+ Rectangle aPolyBoundRect( aXP.GetBoundRect() );
+
+ // the arc is something special, because sometimes the snaprect does not match
+ if ( eSpType == mso_sptArc )
+ {
+ // Groesse des Polygons mit allen Punkten korrigieren
+
+ sal_Int32 nEndAngle = Fix16ToAngle( GetAdjustValue( 0, 270 << 16 ) );
+ sal_Int32 nStartAngle = Fix16ToAngle( GetAdjustValue( 1, 0 ) );
+
+ if ( nStartAngle == nEndAngle )
+ return NULL;
+
+ if ( bFilled ) // ( filled ) ? we have to import an pie : we have to construct an arc
+ pRet = new SdrCircObj( OBJ_SECT, aPolyBoundRect, nStartAngle, nEndAngle );
+ else
+ {
+ Point aStart, aEnd, aCenter( aPolyBoundRect.Center() );
+ aStart.X() = (sal_Int32)( ( cos( ( (double)nStartAngle * F_PI18000 ) ) * 1000.0 ) );
+ aStart.Y() = - (sal_Int32)( ( sin( ( (double)nStartAngle * F_PI18000 ) ) * 1000.0 ) );
+ aEnd.X() = (sal_Int32)( ( cos( ( (double)nEndAngle * F_PI18000 ) ) * 1000.0 ) );
+ aEnd.Y() = - (sal_Int32)( ( sin( ( (double)nEndAngle * F_PI18000 ) ) * 1000.0 ) );
+ aStart.X() += aCenter.X();
+ aStart.Y() += aCenter.Y();
+ aEnd.X() += aCenter.X();
+ aEnd.Y() += aCenter.Y();
+
+ Polygon aPolygon( aPolyBoundRect, aStart, aEnd, POLY_PIE );
+ Rectangle aPolyPieRect( aPolygon.GetBoundRect() );
+
+ USHORT nPt = aPolygon.GetSize();
+
+ if ( nPt < 4 )
+ return NULL;
+
+ aPolygon[ 0 ] = aPolygon[ 1 ]; // try to get the arc boundrect
+ aPolygon[ nPt - 1 ] = aPolygon[ nPt - 2 ];
+ Rectangle aPolyArcRect( aPolygon.GetBoundRect() );
+
+ if ( aPolyArcRect != aPolyPieRect )
+ {
+ double fYScale, fXScale;
+ double fYOfs, fXOfs;
+ int nCond;
+
+ fYOfs = fXOfs = 0.0;
+ if ( aPolyPieRect.GetWidth() != aPolyArcRect.GetWidth() )
+ {
+ nCond = ( (sal_uInt32)( nStartAngle - 9000 ) > 18000 ) && ( (sal_uInt32)( nEndAngle - 9000 ) > 18000 ) ? 1 : 0;
+ nCond ^= bFlipH ? 1 : 0;
+ if ( nCond )
+ {
+ fXScale = (double)aSnapRect.GetWidth() / (double)aPolyPieRect.GetWidth();
+ fXOfs = ( (double)aPolyPieRect.GetWidth() - (double)aPolyArcRect.GetWidth() ) * fXScale;
+ }
+ }
+ if ( aPolyPieRect.GetHeight() != aPolyArcRect.GetHeight() )
+ {
+ nCond = ( ( nStartAngle > 18000 ) && ( nEndAngle > 18000 ) ) ? 1 : 0;
+ nCond ^= bFlipV ? 1 : 0;
+ if ( nCond )
+ {
+ fYScale = (double)aSnapRect.GetHeight() / (double)aPolyPieRect.GetHeight();
+ fYOfs = ( (double)aPolyPieRect.GetHeight() - (double)aPolyArcRect.GetHeight() ) * fYScale;
+ }
+ }
+ fXScale = (double)aPolyArcRect.GetWidth() / (double)aPolyPieRect.GetWidth();
+ fYScale = (double)aPolyArcRect.GetHeight() / (double)aPolyPieRect.GetHeight();
+
+ aSnapRect = Rectangle( Point( aSnapRect.Left() + fXOfs, aSnapRect.Top() + fYOfs ),
+ Size( aSnapRect.GetWidth() * fXScale, aSnapRect.GetHeight() * fYScale ) );
+
+ }
+ pRet = new SdrCircObj( OBJ_CARC, aPolyBoundRect, nStartAngle, nEndAngle );
+
+ }
+ pRet->NbcSetSnapRect( aSnapRect );
+ pRet->SetModel( pSdrModel );
+ pRet->NbcSetAttributes( rSet, FALSE );
+ }
+ if ( !pRet )
+ {
+ if ( aPolyBoundRect.GetSize() != aSnapRect.GetSize() )
+ {
+ double fXScale = (double)aSnapRect.GetWidth() / (double)aPolyBoundRect.GetWidth();
+ double fYScale = (double)aSnapRect.GetHeight() / (double)aPolyBoundRect.GetHeight();
+ aXP.Scale( fXScale, fYScale );
+ }
+ if ( !pSegData )
+ {
+ FASTBOOL bClosed = aXP[ 0 ] == aXP[ (sal_uInt16)( aXP.GetPointCount() - 1 ) ];
+ pRet = new SdrPathObj( bClosed ? OBJ_POLY : OBJ_PLIN, aXP );
+ pRet->NbcSetSnapRect( aSnapRect );
+ pRet->SetModel( pSdrModel );
+ pRet->NbcSetAttributes( rSet, FALSE );
+ }
+ else
+ {
+ SdrObjGroup* pGrp = NULL;
+ SdrPathObj* pSdrPathObj = NULL;
+
+ XPolyPolygon aPolyPoly;
+ XPolygon aPoly;
+
+ XPolyPolygon aEmptyPolyPoly;
+ XPolygon aEmptyPoly;
+
+ BOOL bClosed;
+ sal_uInt16 nPolyFlags;
+
+ Color aFillColor( COL_WHITE );
+ sal_uInt32 nColorCount = nColorData >> 28;
+ sal_uInt32 nColorIndex = 0;
+ sal_uInt16 nSrcPt = 0;
+
+ Rectangle aUnion;
+
+ const sal_uInt16* pTmp = pSegData;
+
+ if ( nColorCount )
+ {
+ const SfxPoolItem* pPoolItem = NULL;
+ SfxItemState eState = rSet.GetItemState( XATTR_FILLCOLOR, FALSE, &pPoolItem );
+ if( SFX_ITEM_SET == eState )
+ {
+ if ( pPoolItem )
+ aFillColor = ((XFillColorItem*)pPoolItem)->GetValue();
+ }
+ }
+ for ( sal_uInt16 i = 0; i < nNumElemSeg; i++ )
+ {
+ nPolyFlags = *pTmp++;
+ switch ( nPolyFlags >> 12 )
+ {
+ case 0x4 :
+ {
+ if ( aPoly.GetPointCount() > 1 )
+ {
+ if ( bClosed )
+ aPoly[ aPoly.GetPointCount() ] = aPoly[ 0 ];
+ aPolyPoly.Insert( aPoly );
+ }
+ bClosed = FALSE;
+ aPoly = aEmptyPoly;
+ aPoly[ 0 ] = aXP[ nSrcPt++ ];
+ }
+ break;
+ case 0x8 :
+ {
+ if ( aPoly.GetPointCount() > 1 )
+ {
+ if ( bClosed )
+ aPoly[ aPoly.GetPointCount() ] = aPoly[ 0 ];
+ aPolyPoly.Insert( aPoly );
+ }
+ aPoly = aEmptyPoly;
+ if ( aPolyPoly.Count() )
+ {
+ if ( pSdrPathObj )
+ {
+ pGrp = new SdrObjGroup();
+ pGrp->SetModel( pSdrModel );
+ pGrp->NbcSetLogicRect( aSnapRect );
+ pGrp->GetSubList()->NbcInsertObject( pSdrPathObj );
+ }
+ aUnion.Union( aPolyPoly.GetBoundRect() );
+ pSdrPathObj = new SdrPathObj( bClosed ? OBJ_POLY : OBJ_PLIN, aPolyPoly );
+ pSdrPathObj->SetModel( pSdrModel );
+ if ( !bClosed )
+ rSet.Put( SdrShadowItem( FALSE ) );
+ else
+ {
+ if ( nColorIndex < nColorCount )
+ {
+ Color aColor( ImplGetColorData( aFillColor, nColorIndex++ ) );
+ rSet.Put( XFillColorItem( String(), aColor ) );
+ }
+ }
+ pSdrPathObj->NbcSetAttributes( rSet, FALSE );
+ if ( pGrp )
+ {
+ if ( pSdrPathObj )
+ {
+ pGrp->GetSubList()->NbcInsertObject( pSdrPathObj );
+ pSdrPathObj = NULL;
+ }
+ }
+ aPolyPoly = aEmptyPolyPoly;
+ }
+ }
+ break;
+ case 0x6 :
+ {
+ bClosed = TRUE;
+ }
+ break;
+ case 0x2 :
+ {
+ sal_uInt16 nDstPt = aPoly.GetPointCount();
+ for ( sal_uInt16 i = 0; i < ( nPolyFlags & 0xfff ); i++ )
+ {
+ aPoly[ nDstPt ] = aXP[ nSrcPt++ ];
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ aPoly[ nDstPt ] = aXP[ nSrcPt++ ];
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ aPoly[ nDstPt++ ] = aXP[ nSrcPt++ ];
+ }
+ }
+ break;
+ case 0xa :
+ case 0xb :
+ {
+ sal_uInt16 nPntCount = (BYTE)nPolyFlags;
+ if ( nPntCount )
+ {
+ sal_uInt32 nMod = ( nPolyFlags >> 8 ) & 0xf;
+ switch ( nMod )
+ {
+ case 3 :
+ case 4 :
+ case 5 :
+ {
+ sal_uInt16 nDstPt = aPoly.GetPointCount();
+ if ( nDstPt > 1 )
+ {
+ if ( bClosed )
+ aPoly[ aPoly.GetPointCount() ] = aPoly[ 0 ];
+ aPolyPoly.Insert( aPoly );
+ aPoly = aEmptyPoly;
+ nDstPt = 0;
+ }
+ if ( nPntCount == 2 )
+ { // create a circle
+ Rectangle aRect( aXP[ nSrcPt ], aXP[ nSrcPt + 1 ] );
+ sal_Int32 nXControl = (sal_Int32)((double)aRect.GetWidth() * 0.2835 );
+ sal_Int32 nYControl = (sal_Int32)((double)aRect.GetHeight() * 0.2835 );
+ Point aCenter( aRect.Center() );
+ aPoly[ nDstPt++ ] = Point( aCenter.X(), aRect.Top() );
+ aPoly[ nDstPt ] = Point( aCenter.X() + nXControl, aRect.Top() );
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ aPoly[ nDstPt ] = Point( aRect.Right(), aCenter.Y() - nYControl );
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ aPoly[ nDstPt++ ] = Point( aRect.Right(), aCenter.Y() );
+ aPoly[ nDstPt ] = Point( aRect.Right(), aCenter.Y() + nYControl );
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ aPoly[ nDstPt ] = Point( aCenter.X() + nXControl, aRect.Bottom() );
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ aPoly[ nDstPt++ ] = Point( aCenter.X(), aRect.Bottom() );
+ aPoly[ nDstPt ] = Point( aCenter.X() - nXControl, aRect.Bottom() );
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ aPoly[ nDstPt ] = Point( aRect.Left(), aCenter.Y() + nYControl );
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ aPoly[ nDstPt++ ] = Point( aRect.Left(), aCenter.Y() );
+ aPoly[ nDstPt ] = Point( aRect.Left(), aCenter.Y() - nYControl );
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ aPoly[ nDstPt ] = Point( aCenter.X() - nXControl, aRect.Top() );
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ aPoly[ nDstPt++ ] = Point( aCenter.X(), aRect.Top() );
+ nSrcPt += 2;
+ }
+ else
+ {
+ sal_uInt32 nXor = ( nMod == 5 ) ? 3 : 2;
+ for ( sal_uInt32 i = 0; i < ( nPntCount >> 2 ); i++ )
+ {
+ PolyStyle ePolyStyle = POLY_ARC;
+ Rectangle aRect( aXP[ nSrcPt ], aXP[ nSrcPt + 1 ] );
+ Point aCenter( aRect.Center() );
+ Point aStart( aXP[ nSrcPt + nXor ] );
+ Point aEnd( aXP[ nSrcPt + ( nXor ^ 1 ) ] );
+ aStart.X() = ( (double)( aStart.X() - aCenter.X() ) / fXScale ) + aCenter.X();
+ aStart.Y() = ( (double)( aStart.Y() - aCenter.Y() ) / fYScale ) + aCenter.Y();
+ aEnd.X() = ( (double)( aEnd.X() - aCenter.X() ) / fXScale ) + aCenter.X();
+ aEnd.Y() = ( (double)( aEnd.Y() - aCenter.Y() ) / fYScale ) + aCenter.Y();
+
+ Polygon aTempPoly( aRect, aStart, aEnd, ePolyStyle );
+ if ( nMod == 5 )
+ {
+ for ( sal_uInt16 j = aTempPoly.GetSize(); j--; )
+ aPoly[ nDstPt++ ] = aTempPoly[ j ];
+ }
+ else
+ {
+ for ( sal_uInt16 j = 0; j < aTempPoly.GetSize(); j++ )
+ aPoly[ nDstPt++ ] = aTempPoly[ j ];
+ }
+ nSrcPt += 4;
+ }
+ }
+ }
+ break;
+ case 0 :
+ case 1 :
+ case 2 :
+ case 6 :
+ case 9 :
+ case 0xa :
+ case 0xb :
+ case 0xc :
+ case 0xd :
+ case 0xe :
+ case 0xf :
+
+ case 7 :
+ case 8 :
+ {
+ BOOL bFirstDirection;
+ sal_uInt16 nDstPt = aPoly.GetPointCount();
+ for ( sal_uInt16 i = 0; i < ( nPolyFlags & 0xff ); i++ )
+ {
+ sal_uInt32 nModT = ( nMod == 7 ) ? 1 : 0;
+ Point aCurrent( aXP[ nSrcPt ] );
+ if ( nSrcPt ) // we need a previous point
+ {
+ Point aPrev( aXP[ nSrcPt - 1 ] );
+ sal_Int32 nX, nY;
+ nX = aCurrent.X() - aPrev.X();
+ nY = aCurrent.Y() - aPrev.Y();
+ if ( ( nY ^ nX ) & 0x80000000 )
+ {
+ if ( !i )
+ bFirstDirection = TRUE;
+ else if ( !bFirstDirection )
+ nModT ^= 1;
+ }
+ else
+ {
+ if ( !i )
+ bFirstDirection = FALSE;
+ else if ( bFirstDirection )
+ nModT ^= 1;
+ }
+ if ( nModT ) // get the right corner
+ {
+ nX = aCurrent.X();
+ nY = aPrev.Y();
+ }
+ else
+ {
+ nX = aPrev.X();
+ nY = aCurrent.Y();
+ }
+ sal_Int32 nXVec = ( nX - aPrev.X() ) >> 1;
+ sal_Int32 nYVec = ( nY - aPrev.Y() ) >> 1;
+ Point aControl1( aPrev.X() + nXVec, aPrev.Y() + nYVec );
+ aPoly[ nDstPt ] = aControl1;
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ nXVec = ( nX - aCurrent.X() ) >> 1;
+ nYVec = ( nY - aCurrent.Y() ) >> 1;
+ Point aControl2( aCurrent.X() + nXVec, aCurrent.Y() + nYVec );
+ aPoly[ nDstPt ] = aControl2;
+ aPoly.SetFlags( nDstPt++, XPOLY_CONTROL );
+ }
+ aPoly[ nDstPt ] = aCurrent;
+ nSrcPt++;
+ nDstPt++;
+ }
+ }
+ break;
+ }
+ }
+ }
+ break;
+ case 0x0 :
+ {
+ sal_uInt16 nDstPt = aPoly.GetPointCount();
+ for ( sal_uInt16 i = 0; i < ( nPolyFlags & 0xfff ); i++ )
+ aPoly[ nDstPt++ ] = aXP[ nSrcPt++ ];
+ }
+ break;
+#ifdef DBG_AUTOSHAPE
+ default :
+ {
+ ByteString aString( "autoshapes::unknown PolyFlagValue :" );
+ aString.Append( ByteString::CreateFromInt32( nPolyFlags ) );
+ DBG_ERROR( aString.GetBuffer() );
+ }
+ break;
+#endif
+ }
+ }
+ if ( pGrp )
+ pRet = pGrp;
+ else
+ pRet = pSdrPathObj;
+ if ( pRet )
+ {
+ pRet->NbcSetSnapRect( Rectangle( Point( aSnapRect.Left() + aUnion.Left(),
+ aSnapRect.Top() + aUnion.Top() ),
+ aUnion.GetSize() ) );
+ }
+ }
+ }
+ }
+ }
+ if ( pRet )
+ {
+ if ( nFix16Angle )
+ {
+ double a = nFix16Angle * nPi180;
+ pRet->NbcRotate( aSnapRect.Center(), nFix16Angle, sin( a ), cos( a ) );
+ }
+ if ( bSetAutoShapeAdjustItem )
+ {
+ if ( pRet->ISA( SdrObjGroup ) || pRet->ISA( SdrPathObj ) )
+ {
+ sal_uInt32 i, nCount = 0;
+ SdrObject* pFirstObject = pRet;
+ SdrObjList* pObjectList = NULL;
+ if ( pRet->ISA( SdrPathObj ) )
+ nCount = 1;
+ else
+ {
+ pObjectList = ((SdrObjGroup*)pRet)->GetSubList();
+ if ( pObjectList )
+ nCount = pObjectList->GetObjCount();
+ if ( nCount )
+ pFirstObject = pObjectList->GetObj( 0 );
+ }
+ if ( nCount )
+ {
+ SdrAutoShapeAdjustmentItem aAdjustItem;
+ SdrAutoShapeAdjustmentValue aAdjustValue;
+ if ( nAdjustmentHandles )
+ {
+ for ( i = 0; i < nAdjustmentHandles; i++ )
+ {
+ aAdjustValue.SetValue( pAdjustmentHandles[ i ].GetAdjustValue() );
+ aAdjustItem.SetValue( i, aAdjustValue );
+ }
+ }
+ if ( bVertAlloc == FALSE )
+ {
+ sal_uInt32 nMagicNumber = 0x80001234; // this magic number identifies ms objects
+ sal_uInt32 nType = (sal_uInt32)eSpType << 16 // hiword is the shapetype
+ | nCount; // loword the number of Path objects
+ sal_uInt32 nChecksum = 0; // checksum is used later to be sure that
+ // the object is not changed
+
+ // here we are calculating the checksum
+ Rectangle aTRect( pRet->GetSnapRect() );
+ sal_Int32 nLeft = aTRect.Left();
+ sal_Int32 nTop = aTRect.Top();
+
+ SdrObject* pNext = pFirstObject;
+ for ( i = 0; i < nCount; i++ )
+ {
+ if ( i )
+ pNext = pObjectList->GetObj( i );
+
+ if ( !pNext->ISA( SdrPathObj ) ) // just only SdrPathObjs are valid as Autoshapes
+ {
+ nChecksum = 0;
+ break;
+ }
+ const XPolyPolygon& rPolyPolygon = ((SdrPathObj*)pNext)->GetPathPoly();
+ sal_uInt16 j, k = rPolyPolygon.Count();
+ sal_Int32 aVal[ 3 ];
+ while( k )
+ {
+ const XPolygon& rPoly = rPolyPolygon[ --k ];
+ j = rPoly.GetPointCount();
+ while( j )
+ {
+ const Point& rPoint = rPoly[ --j ];
+#ifdef __LITTLEENDIAN
+ aVal[ 0 ] = SWAPLONG( rPoint.X() - nLeft );
+ aVal[ 1 ] = SWAPLONG( rPoint.Y() - nTop );
+ aVal[ 2 ] = SWAPLONG( rPoly.GetFlags( j ) );
+#else
+ aVal[ 0 ] = rPoint.X() - nLeft;
+ aVal[ 1 ] = rPoint.Y() - nTop;
+ aVal[ 2 ] = rPoly.GetFlags( j );
+#endif
+ nChecksum = rtl_crc32( nChecksum, &aVal[ 0 ], 12 );
+ }
+ }
+ }
+
+ if ( nChecksum )
+ {
+ i = aAdjustItem.GetCount();
+ aAdjustValue.SetValue( nChecksum ); // the last 3 entries in the adjustment item must be in this
+ aAdjustItem.SetValue( i++, aAdjustValue ); // order, otherwise it will be not possible to recreate the original
+ aAdjustValue.SetValue( nType ); // autoshape when exporting into ms formats
+ aAdjustItem.SetValue( i++, aAdjustValue );
+ aAdjustValue.SetValue( nMagicNumber );
+ aAdjustItem.SetValue( i++, aAdjustValue );
+ }
+ }
+ SfxItemSet aSet( pSdrModel->GetItemPool() );
+ aSet.Put( aAdjustItem );
+ pFirstObject->NbcSetAttributes( aSet, FALSE );
+ }
+ }
+ }
+ }
+ return pRet;
+}
diff --git a/svx/source/msfilter/msashape.hxx b/svx/source/msfilter/msashape.hxx
new file mode 100644
index 0000000000..1d96da7d76
--- /dev/null
+++ b/svx/source/msfilter/msashape.hxx
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * $RCSfile: msashape.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _MSASHAPE_HXX
+#define _MSASHAPE_HXX
+
+#ifndef _MSDFFDEF_HXX
+#include <msdffdef.hxx>
+#endif
+#ifndef _MSDFFIMP_HXX
+#include <msdffimp.hxx>
+#endif
+
+class SdrModel;
+class SfxItemSet;
+struct SvxMSDffCalculationData;
+class SvxMSDffAdjustmentHandle;
+class SvxMSDffAutoShape
+{
+ MSO_SPT eSpType;
+
+ Rectangle aSnapRect;
+ Rectangle aBoundRect;
+
+ double fXScale;
+ double fYScale;
+
+ sal_Int32 nFix16Angle;
+ sal_Int32 nXRef;
+ sal_Int32 nYRef;
+
+ sal_uInt32 nNumElemVert;
+ sal_uInt32 nNumElemSeg;
+
+ sal_Int32* pVertData;
+ sal_uInt16* pSegData;
+ sal_Int32* pTextRectData;
+
+ sal_uInt32 nColorData;
+ sal_uInt32 nCalculationData;
+ SvxMSDffCalculationData* pCalculationData;
+ sal_uInt32 nAdjustmentHandles;
+ SvxMSDffAdjustmentHandle* pAdjustmentHandles;
+
+ sal_Bool bIsEmpty : 1;
+ sal_Bool bVertAlloc : 1;
+ sal_Bool bSegAlloc : 1;
+ sal_Bool bCalcAlloc : 1;
+ sal_Bool bTextRectAlloc : 1;
+
+ sal_Bool bTextFlow : 1;
+ sal_Bool bFilled : 1;
+ sal_Bool bFlipH : 1;
+ sal_Bool bFlipV : 1;
+
+ sal_Int32 GetAdjustValue( sal_Int32 nIndex ) const;
+ sal_Int32 GetAdjustValue( sal_Int32 nIndex, sal_Int32 nDefault ) const;
+ sal_Int32 Fix16ToAngle( sal_Int32 nAngle ) const;
+ Color ImplGetColorData( const Color& rFillColor, sal_uInt32 nIndex );
+ double ImplGetValue( sal_Int16 nIndex, sal_uInt32& nGeometryFlags ) const;
+ sal_Int32 GetValue( sal_uInt32 nDat, sal_Bool bScale = TRUE, sal_Bool bScaleHeight = TRUE ) const;
+
+ public :
+
+ SdrObject* GetObject( SdrModel* pSdrModel, SfxItemSet& rSet, sal_Bool bSetAdjustmentItem );
+ sal_Bool IsEmpty() const;
+
+ Rectangle GetTextRect() const;
+
+ SvxMSDffAutoShape( const DffPropertyReader& rPropReader, SvStream&,
+ DffObjData& rObjDat, Rectangle& rSnapRect, sal_Int32 nFix16Angle );
+ ~SvxMSDffAutoShape();
+
+};
+
+#endif
+
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
new file mode 100644
index 0000000000..fd4832c689
--- /dev/null
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -0,0 +1,5070 @@
+/*************************************************************************
+ *
+ * $RCSfile: msdffimp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef SVX_LIGHT
+#define _IPOBJ_HXX
+#endif
+
+#include <math.h>
+
+#include <limits.h>
+
+#ifndef _SOLAR_H
+ #include <tools/solar.h> // UINTXX
+#endif
+
+#pragma hdrstop
+
+// SvxItem-Mapping. Wird benoetigt um die SvxItem-Header erfolgreich zu includen
+
+#ifndef _EDITDATA_HXX
+#include <editdata.hxx>
+#endif
+
+#include <svtools/urihelper.hxx>
+
+// textitem.hxx editdata.hxx
+#define ITEMID_COLOR EE_CHAR_COLOR
+#define ITEMID_FONT EE_CHAR_FONTINFO
+#define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT
+#define ITEMID_FONTWIDTH EE_CHAR_FONTWIDTH
+#define ITEMID_WEIGHT EE_CHAR_WEIGHT
+#define ITEMID_UNDERLINE EE_CHAR_UNDERLINE
+#define ITEMID_CROSSEDOUT EE_CHAR_STRIKEOUT
+#define ITEMID_POSTURE EE_CHAR_ITALIC
+#define ITEMID_CONTOUR EE_CHAR_OUTLINE
+#define ITEMID_SHADOWED EE_CHAR_SHADOW
+#define ITEMID_ESCAPEMENT EE_CHAR_ESCAPEMENT
+#define ITEMID_AUTOKERN EE_CHAR_PAIRKERNING
+#define ITEMID_WORDLINEMODE EE_CHAR_WLM
+// paraitem.hxx editdata.hxx
+#define ITEMID_ADJUST EE_PARA_JUST
+#define ITEMID_FIELD EE_FEATURE_FIELD
+
+
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+#ifndef _TOOLS_ZCODEC_HXX
+#include <tools/zcodec.hxx>
+#endif
+#ifndef _FILTER_HXX //autogen
+#include <svtools/filter.hxx>
+#endif
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _TOOLS_URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SV_VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+#ifndef _SV_BMPACC_HXX
+#include <vcl/bmpacc.hxx>
+#endif
+#ifndef _IPOBJ_HXX //autogen
+#include <so3/ipobj.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+
+#ifndef _SFX_OBJFAC_HXX
+#include <sfx2/docfac.hxx>
+#endif
+#ifndef _SFX_DOCFILT_HACK_HXX
+#include <sfx2/docfilt.hxx>
+#endif
+#ifndef _SFXDOCFILE_HXX
+#include <sfx2/docfile.hxx>
+#endif
+#ifndef _SFX_FCONTNR_HXX
+#include <sfx2/fcontnr.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+
+
+#ifndef _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+#ifndef _SDGMOITM_HXX
+#include <sdgmoitm.hxx>
+#endif
+#ifndef _EEITEMID_HXX
+#include "eeitemid.hxx"
+#endif
+#ifndef _SVX_TSPTITEM_HXX
+#include "tstpitem.hxx"
+#endif
+#ifndef _SVX_FMMODEL_HXX
+#include "fmmodel.hxx"
+#endif
+#ifndef _SVDMODEL_HXX
+#include "svdmodel.hxx"
+#endif
+#ifndef _SVDOBJ_HXX
+#include "svdobj.hxx"
+#endif
+#ifndef _SVDPAGE_HXX
+#include "svdpage.hxx"
+#endif
+#ifndef _SVDOGRP_HXX
+#include "svdogrp.hxx"
+#endif
+#ifndef _SVDOGRAF_HXX
+#include "svdograf.hxx"
+#endif
+#ifndef _SVDOTEXT_HXX
+#include "svdotext.hxx"
+#endif
+#ifndef _SVDORECT_HXX
+#include "svdorect.hxx"
+#endif
+#ifndef _SVDOCAPT_HXX
+#include "svdocapt.hxx"
+#endif
+
+#ifndef _SVDOEDGE_HXX
+#include "svdoedge.hxx"
+#endif
+
+#ifndef _SVDOCIRC_HXX
+#include "svdocirc.hxx"
+#endif
+#ifndef _SVDOUTL_HXX
+#include "svdoutl.hxx"
+#endif
+#ifndef _SVDOOLE2_HXX
+#include <svdoole2.hxx>
+#endif
+#ifndef _SVDOPATH_HXX
+#include <svdopath.hxx>
+#endif
+
+#ifndef _SVDTRANS_HXX
+#include <svdtrans.hxx>
+#endif
+
+#ifndef _SDGLUITM_HXX
+#include <sdgluitm.hxx>
+#endif
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include <fhgtitem.hxx>
+#endif
+#ifndef _SVX_WGHTITEM_HXX //autogen
+#include <wghtitem.hxx>
+#endif
+#ifndef _SVX_POSTITEM_HXX //autogen
+#include <postitem.hxx>
+#endif
+#ifndef _SVX_UDLNITEM_HXX //autogen
+#include <udlnitem.hxx>
+#endif
+#ifndef _SVX_CRSDITEM_HXX //autogen
+#include <crsditem.hxx>
+#endif
+#ifndef _SVX_SHDDITEM_HXX //autogen
+#include <shdditem.hxx>
+#endif
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include <fontitem.hxx>
+#endif
+#ifndef _SVX_COLRITEM_HXX //autogen
+#include <colritem.hxx>
+#endif
+#ifndef _SXEKITM_HXX
+#include <sxekitm.hxx>
+#endif
+
+#ifndef _SVX_BULITEM_HXX
+#include <bulitem.hxx>
+#endif
+#ifndef _E3D_POLYSC3D_HXX
+#include "polysc3d.hxx"
+#endif
+#ifndef _E3D_EXTRUD3D_HXX
+#include "extrud3d.hxx"
+#endif
+#ifndef _SVDITER_HXX
+#include "svditer.hxx"
+#endif
+
+#ifndef _XPOLY_HXX
+#include "xpoly.hxx"
+#endif
+
+#ifndef _XATTR_HXX
+#include "xattr.hxx"
+#endif
+
+#ifndef _IMPGRF_HXX //autogen
+#include "impgrf.hxx"
+#endif
+
+#define _MSDFFIMP_CXX
+
+#ifndef _MSDFFIMP_HXX
+#include "msdffimp.hxx" // extern sichtbare Header-Datei
+#endif
+#ifndef _MSASHAPE_HXX
+#include "msashape.hxx"
+#endif
+#ifndef _GALLERY_HXX_
+#include "gallery.hxx"
+#endif
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+//---------------------------------------------------------------------------
+// Hilfs Routinen
+//---------------------------------------------------------------------------
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+
+BOOL SvxMSDffManager::ReadINT32( SvStream& rStrm, INT32& rTarget )
+{
+ rStrm >> rTarget;
+ return 0 == rStrm.GetError();
+}
+BOOL SvxMSDffManager::ReadINT16( SvStream& rStrm, INT16& rTarget )
+{
+ rStrm >> rTarget;
+ return 0 == rStrm.GetError();
+}
+BOOL SvxMSDffManager::ReadBYTE( SvStream& rStrm, BYTE& rTarget )
+{
+ rStrm >> rTarget;
+ return 0 == rStrm.GetError();
+}
+
+
+//---------------------------------------------------------------------------
+// Hilfs Klassen aus MSDFFDEF.HXX
+//---------------------------------------------------------------------------
+
+SvStream& operator>>( SvStream& rIn, DffRecordHeader& rRec )
+{
+ rRec.nFilePos = rIn.Tell();
+ UINT16 nTmp;
+ rIn >> nTmp;
+ rRec.nImpVerInst = nTmp;
+ rRec.nRecVer = nTmp & 0x000F;
+ rRec.nRecInstance = nTmp >> 4;
+ rIn >> rRec.nRecType;
+ rIn >> rRec.nRecLen;
+ return rIn;
+}
+
+// Masse fuer dashed lines
+#define LLEN_MIDDLE (450)
+#define LLEN_SPACE_MIDDLE (360)
+#define LLEN_LONG (LLEN_MIDDLE * 2)
+#define LLEN_SPACE_LONG (LLEN_SPACE_MIDDLE + 20)
+#define LLEN_POINT (LLEN_MIDDLE / 4)
+#define LLEN_SPACE_POINT (LLEN_SPACE_MIDDLE / 4)
+
+SvStream& operator>>( SvStream& rIn, DffPropSet& rRec )
+{
+ rRec.InitializePropSet();
+
+ DffRecordHeader aHd;
+ rIn >> aHd;
+ UINT32 nPropCount = aHd.nRecInstance;
+
+ // FilePos der ComplexData merken
+ UINT32 nComplexDataFilePos = rIn.Tell() + ( nPropCount * 6 );
+
+ for( UINT32 nPropNum = 0; nPropNum < nPropCount; nPropNum++ )
+ {
+ UINT16 nTmp;
+ UINT32 nRecType, nContent, nContentEx = 0xffff0000;
+ rIn >> nTmp
+ >> nContent;
+
+ nRecType = nTmp & 0x3fff;
+
+ if ( nRecType > 0x3ff )
+ break;
+ if ( ( nRecType & 0x3f ) == 0x3f )
+ { // clear flags that have to be cleared
+ rRec.mpContents[ nRecType ] &= ( ( nContent >> 16 ) ^ 0xffffffff );
+ // set flags that have to be set
+ rRec.mpContents[ nRecType ] |= nContent;
+ nContentEx |= nContent & ( nContent >> 16 );
+ rRec.Replace( nRecType, (void*)nContentEx );
+ }
+ else
+ {
+ DffPropFlags aPropFlag = { 1, 0, 0, 0 };
+ if ( nTmp & 0x4000 )
+ aPropFlag.bBlip = TRUE;
+ if ( nTmp & 0x8000 )
+ aPropFlag.bComplex = TRUE;
+ if ( aPropFlag.bComplex )
+ {
+ if ( nContent )
+ {
+ if ( nRecType == DFF_Prop_pVertices )
+ { // the ContentValue may be 6 bytes too small sometimes
+ UINT32 nOldPos = rIn.Tell();
+ INT16 nSize, nNumElem;
+ rIn.Seek( nComplexDataFilePos );
+ rIn >> nNumElem >> nSize >> nSize;
+ if ( nSize < 0 )
+ nSize = ( -nSize ) >> 2;
+ if ( ( nSize * nNumElem ) == nContent )
+ nContent += 6;
+ rIn.Seek( nOldPos );
+ }
+ nContentEx = nComplexDataFilePos;
+ nComplexDataFilePos += nContent;
+ }
+ else
+ aPropFlag.bSet = FALSE;
+ }
+ rRec.mpContents[ nRecType ] = nContent;
+ rRec.mpFlags[ nRecType ] = aPropFlag;
+ rRec.Insert( nRecType, (void*)nContentEx );
+ }
+ }
+ aHd.SeekToEndOfRecord( rIn );
+ return rIn;
+}
+
+void DffPropSet::InitializePropSet() const
+{
+ memset( ( (DffPropSet*) this )->mpFlags, 0, 0x400 * sizeof( DffPropFlags ) );
+ ( (DffPropSet*) this )->Clear();
+
+ DffPropFlags nFlags = { 1, 0, 0, 1 };
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_LockAgainstGrouping ] = 0x0000; //0x01ff0000;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_LockAgainstGrouping ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_LockAgainstGrouping, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_FitTextToShape ] = 0x0010; //0x001f0010;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_FitTextToShape ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_FitTextToShape, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_gtextFStrikethrough ] = 0x0000; //0xffff0000;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_gtextFStrikethrough ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_gtextFStrikethrough, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_pictureActive ] = 0x0000; //0x000f0000;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_pictureActive ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_pictureActive, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fFillOK ] = 0x0039; //0x003f0039;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fFillOK ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fFillOK, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fNoFillHitTest ] = 0x001c; //0x001f001c;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fNoFillHitTest ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fNoFillHitTest, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fNoLineDrawDash ] = 0x001e; //0x001f000e;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fNoLineDrawDash ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fNoLineDrawDash, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fshadowObscured ] = 0x0000; //0x00030000;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fshadowObscured ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fshadowObscured, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fPerspective ] = 0x0000; //0x00010000;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fPerspective ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fPerspective, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fc3DLightFace ] = 0x0001; //0x000f0001;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fc3DLightFace ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fc3DLightFace, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fc3DFillHarsh ] = 0x0016; //0x001f0016;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fc3DFillHarsh ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fc3DFillHarsh, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fBackground ] = 0x0000; //0x001f0000;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fBackground ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fBackground, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fCalloutLengthSpecified ] = 0x0010; //0x00ef0010;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fCalloutLengthSpecified ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fCalloutLengthSpecified, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fPrint ] = 0x0001; //0x00ef0001;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fPrint ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fPrint, (void*)0xffff0000 );
+
+ ( (DffPropSet*) this )->mpContents[ DFF_Prop_fillColor ] = 0xffffff;
+ ( (DffPropSet*) this )->mpFlags[ DFF_Prop_fillColor ] = nFlags;
+ ( (DffPropSet*) this )->Insert( DFF_Prop_fillColor, (void*)0xffff0000 );
+}
+
+void DffPropSet::Merge( DffPropSet& rMaster ) const
+{
+ for ( void* pDummy = rMaster.First(); pDummy; pDummy = rMaster.Next() )
+ {
+ UINT32 nRecType = rMaster.GetCurKey();
+ if ( ( nRecType & 0x3f ) == 0x3f ) // this is something called FLAGS
+ {
+ UINT32 nCurrentFlags = mpContents[ nRecType ];
+ UINT32 nMergeFlags = rMaster.mpContents[ nRecType ];
+ nMergeFlags &= ( nMergeFlags >> 16 ) | 0xffff0000; // clearing low word
+ nMergeFlags &= ( ( nCurrentFlags & 0xffff0000 ) // remove allready hard set
+ | ( nCurrentFlags >> 16 ) ) ^ 0xffffffff; // attributes from mergeflags
+ nCurrentFlags &= ( ( nMergeFlags & 0xffff0000 ) // apply zero master bits
+ | ( nMergeFlags >> 16 ) ) ^ 0xffffffff;
+ nCurrentFlags |= (UINT16)nMergeFlags; // apply filled master bits
+ ( (DffPropSet*) this )->mpContents[ nRecType ] = nCurrentFlags;
+ }
+ else
+ {
+ if ( !IsProperty( nRecType ) || !IsHardAttribute( nRecType ) )
+ {
+ ( (DffPropSet*) this )->mpContents[ nRecType ] = rMaster.mpContents[ nRecType ];
+ DffPropFlags nFlags( rMaster.mpFlags[ nRecType ] );
+ nFlags.bSoftAttr = TRUE;
+ ( (DffPropSet*) this )->mpFlags[ nRecType ] = nFlags;
+ ( (DffPropSet*) this )->Insert( nRecType, pDummy );
+ }
+ }
+ }
+}
+
+BOOL DffPropSet::IsHardAttribute( UINT32 nId ) const
+{
+ BOOL bRetValue = TRUE;
+ nId &= 0x3ff;
+ if ( ( nId & 0x3f ) >= 48 ) // is this a flag id
+ {
+ if ( ((DffPropSet*)this)->Seek( nId | 0x3f ) )
+ {
+ UINT32 nContentEx = (UINT32)GetCurObject();
+ bRetValue = ( nContentEx & ( 1 << ( 0xf - ( nId & 0xf ) ) ) ) != 0;
+ }
+ }
+ else
+ bRetValue = ( mpFlags[ nId ].bSoftAttr == 0 );
+ return bRetValue;
+};
+
+UINT32 DffPropSet::GetPropertyValue( UINT32 nId, UINT32 nDefault ) const
+{
+ nId &= 0x3ff;
+ return ( mpFlags[ nId ].bSet ) ? mpContents[ nId ] : nDefault;
+};
+
+void DffPropSet::SetPropertyValue( UINT32 nId, UINT32 nValue ) const
+{
+ if ( !mpFlags[ nId ].bSet )
+ {
+ ( (DffPropSet*) this )->Insert( nId, (void*)nValue );
+ ( (DffPropSet*) this )->mpFlags[ nId ].bSet = TRUE;
+ }
+ ( (DffPropSet*) this )->mpContents[ nId ] = nValue;
+};
+
+BOOL DffPropSet::SeekToContent( UINT32 nRecType, SvStream& rStrm ) const
+{
+ nRecType &= 0x3ff;
+ if ( mpFlags[ nRecType ].bSet )
+ {
+ if ( mpFlags[ nRecType ].bComplex )
+ {
+ if ( ((DffPropSet*)this)->Seek( nRecType ) )
+ {
+ UINT32 nOffset = (UINT32)GetCurObject();
+ if ( nOffset && ( ( nOffset & 0xffff0000 ) != 0xffff0000 ) )
+ {
+ rStrm.Seek( nOffset );
+ return TRUE;
+ }
+ }
+ }
+ }
+ return FALSE;
+}
+
+DffPropertyReader::DffPropertyReader( const SvxMSDffManager& rMan ) :
+ rManager( rMan ),
+ pDefaultPropSet( NULL )
+{
+ InitializePropSet();
+}
+
+void DffPropertyReader::SetDefaultPropSet( SvStream& rStCtrl, UINT32 nOffsDgg ) const
+{
+ delete pDefaultPropSet;
+ UINT32 nMerk = rStCtrl.Tell();
+ rStCtrl.Seek( nOffsDgg );
+ DffRecordHeader aRecHd;
+ rStCtrl >> aRecHd;
+ if ( aRecHd.nRecType == DFF_msofbtDggContainer )
+ {
+ if ( rManager.SeekToRec( rStCtrl, DFF_msofbtOPT, aRecHd.GetRecEndFilePos() ) )
+ {
+ ( (DffPropertyReader*) this )->pDefaultPropSet = new DffPropSet;
+ rStCtrl >> *pDefaultPropSet;
+ }
+ }
+ rStCtrl.Seek( nMerk );
+}
+
+#ifdef DBG_AUTOSHAPE
+void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData, UINT32 nShapeId ) const
+#else
+void DffPropertyReader::ReadPropSet( SvStream& rIn, void* pClientData ) const
+#endif
+{
+ ULONG nFilePos = rIn.Tell();
+ rIn >> (DffPropertyReader&)*this;
+
+ if ( IsProperty( DFF_Prop_hspMaster ) )
+ {
+ if ( rManager.SeekToShape( rIn, pClientData, GetPropertyValue( DFF_Prop_hspMaster ) ) )
+ {
+ DffRecordHeader aRecHd;
+ rIn >> aRecHd;
+ if ( rManager.SeekToRec( rIn, DFF_msofbtOPT, aRecHd.GetRecEndFilePos() ) )
+ {
+ DffPropSet aMasterPropSet;
+ rIn >> aMasterPropSet;
+ Merge( aMasterPropSet );
+ }
+ }
+ }
+// if ( pDefaultPropSet )
+// Merge( *( pDefaultPropSet ) );
+
+ ( (DffPropertyReader*) this )->mnFix16Angle = Fix16ToAngle( GetPropertyValue( DFF_Prop_Rotation, 0 ) );
+
+#ifdef DBG_AUTOSHAPE
+
+ SvFileStream aOut( String( RTL_CONSTASCII_STRINGPARAM( "d:\\ashape.dbg" ) ), STREAM_WRITE );
+ aOut.Seek( STREAM_SEEK_TO_END );
+
+ if ( IsProperty( DFF_Prop_adjustValue ) || IsProperty( DFF_Prop_pVertices ) )
+ {
+ aOut.WriteLine( "" );
+ ByteString aString( "ShapeId: " );
+ aString.Append( ByteString::CreateFromInt32( nShapeId ) );
+ aOut.WriteLine( aString );
+ }
+ for ( sal_uInt32 i = DFF_Prop_adjustValue; i <= DFF_Prop_adjust10Value; i++ )
+ {
+ if ( IsProperty( i ) )
+ {
+ ByteString aString( "Prop_adjustValue" );
+ aString.Append( ByteString::CreateFromInt32( ( i - DFF_Prop_adjustValue ) + 1 ) );
+ aString.Append( ":" );
+ aString.Append( ByteString::CreateFromInt32( GetPropertyValue( i ) ) );
+ aOut.WriteLine( aString );
+ }
+ }
+ for ( i = 320; i < 383; i++ )
+ {
+ if ( ( i >= DFF_Prop_adjustValue ) && ( i <= DFF_Prop_adjust10Value ) )
+ continue;
+ if ( IsProperty( i ) )
+ {
+ if ( SeekToContent( i, rIn ) )
+ {
+ INT32 nLen = (INT32)GetPropertyValue( i );
+ if ( nLen )
+ {
+ aOut.WriteLine( "" );
+ ByteString aDesc( "Property:" );
+ aDesc.Append( ByteString::CreateFromInt32( i ) );
+ aDesc.Append( ByteString( " Size:" ) );
+ aDesc.Append( ByteString::CreateFromInt32( nLen ) );
+ aOut.WriteLine( aDesc );
+ INT16 nNumElem, nNumElemMem, nNumSize;
+ rIn >> nNumElem >> nNumElemMem >> nNumSize;
+ aDesc = ByteString( "Entries: " );
+ aDesc.Append( ByteString::CreateFromInt32( nNumElem ) );
+ aDesc.Append( ByteString( " Size:" ) );
+ aDesc.Append( ByteString::CreateFromInt32( nNumSize ) );
+ aOut.WriteLine( aDesc );
+ if ( nNumSize < 0 )
+ nNumSize = ( ( -nNumSize ) >> 2 );
+ if ( !nNumSize )
+ nNumSize = 16;
+ nLen -= 6;
+ while ( nLen > 0 )
+ {
+ ByteString aString;
+ for ( UINT32 j = 0; nLen && ( j < ( nNumSize >> 1 ) ); j++ )
+ {
+ for ( UINT32 k = 0; k < 2; k++ )
+ {
+ if ( nLen )
+ {
+ BYTE nVal;
+ rIn >> nVal;
+ if ( ( nVal >> 4 ) > 9 )
+ aOut << (BYTE)( ( nVal >> 4 ) + 'A' - 10 );
+ else
+ aOut << (BYTE)( ( nVal >> 4 ) + '0' );
+
+ if ( ( nVal & 0xf ) > 9 )
+ aOut << (BYTE)( ( nVal & 0xf ) + 'A' - 10 );
+ else
+ aOut << (BYTE)( ( nVal & 0xf ) + '0' );
+
+ nLen--;
+ }
+ }
+ aOut << (char)( ' ' );
+ }
+ aOut.WriteLine( aString );
+ }
+ }
+ }
+ else
+ {
+ ByteString aString( "Property" );
+ aString.Append( ByteString::CreateFromInt32( i ) );
+ aString.Append( ":" );
+ aString.Append( ByteString::CreateFromInt32( GetPropertyValue( i ) ) );
+ aOut.WriteLine( aString );
+ }
+ }
+ }
+
+#endif
+
+ rIn.Seek( nFilePos );
+}
+
+
+INT32 DffPropertyReader::Fix16ToAngle( INT32 nContent ) const
+{
+ INT32 nAngle = 0;
+ if ( nContent )
+ {
+ nAngle = ( (INT16)( nContent >> 16) * 100L ) + ( ( ( nContent & 0x0000ffff) * 100L ) >> 16 );
+ nAngle = NormAngle360( -nAngle );
+ }
+ return nAngle;
+}
+
+DffPropertyReader::~DffPropertyReader()
+{
+ delete pDefaultPropSet;
+}
+
+void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, SdrObject* pObj ) const
+{
+ MapUnit eMap( rManager.GetModel()->GetScaleUnit() );
+
+ for ( void* pDummy = ((DffPropertyReader*)this)->First(); pDummy; pDummy = ((DffPropertyReader*)this)->Next() )
+ {
+ UINT32 nRecType = GetCurKey();
+ UINT32 nContent = mpContents[ nRecType ];
+ switch ( nRecType )
+ {
+ case DFF_Prop_gtextSize :
+ rSet.Put( SvxFontHeightItem( rManager.ScalePt( nContent ) ) );
+ break;
+ // GeoText
+ case DFF_Prop_gtextFStrikethrough :
+ {
+ if ( nContent & 0x20 )
+ rSet.Put( SvxWeightItem( nContent ? WEIGHT_BOLD : WEIGHT_NORMAL ) );
+ if ( nContent & 0x10 )
+ rSet.Put( SvxPostureItem( nContent ? ITALIC_NORMAL : ITALIC_NONE ) );
+ if ( nContent & 0x08 )
+ rSet.Put( SvxUnderlineItem( nContent ? UNDERLINE_SINGLE : UNDERLINE_NONE ) );
+ if ( nContent & 0x40 )
+ rSet.Put(SvxShadowedItem( nContent != 0 ) );
+// if ( nContent & 0x02 )
+// rSet.Put( SvxCaseMapItem( nContent ? SVX_CASEMAP_KAPITAELCHEN : SVX_CASEMAP_NOT_MAPPED ) );
+ if ( nContent & 0x01 )
+ rSet.Put( SvxCrossedOutItem( nContent ? STRIKEOUT_SINGLE : STRIKEOUT_NONE ) );
+ }
+ break;
+ // FillStyle
+ case DFF_Prop_fillOpacity :
+ rSet.Put( XFillTransparenceItem( USHORT( 100 - ( ( nContent * 100 ) >> 16 ) ) ) );
+ break;
+ case DFF_Prop_fillColor :
+ rSet.Put( XFillColorItem( String(), rManager.MSO_CLR_ToColor( nContent, DFF_Prop_fillColor ) ) );
+ break;
+
+ // ShadowStyle
+ case DFF_Prop_shadowType :
+ {
+ MSO_ShadowType eShadowType = (MSO_ShadowType)nContent;
+ if( eShadowType != mso_shadowOffset )
+ {
+ // mso_shadowDouble
+ // mso_shadowRich
+ // mso_shadowEmbossOrEngrave
+ // koennen wir nicht, kreiere Default-Schatten mit default-
+ // Abstand
+ rSet.Put( SdrShadowXDistItem( 35 ) ); // 0,35 mm Schattendistanz
+ rSet.Put( SdrShadowYDistItem( 35 ) );
+ }
+ }
+ break;
+ case DFF_Prop_shadowColor :
+ rSet.Put( SdrShadowColorItem( String(), rManager.MSO_CLR_ToColor( nContent, DFF_Prop_shadowColor ) ) );
+ break;
+ case DFF_Prop_shadowOffsetX :
+ {
+ INT32 nVal = (INT32)nContent;
+ rManager.ScaleEmu( nVal );
+ if ( nVal )
+ rSet.Put( SdrShadowXDistItem( nVal ) );
+ }
+ break;
+ case DFF_Prop_shadowOffsetY :
+ {
+ INT32 nVal = (INT32)nContent;
+ rManager.ScaleEmu( nVal );
+ if ( nVal )
+ rSet.Put( SdrShadowYDistItem( nVal ) );
+ }
+ break;
+ case DFF_Prop_fshadowObscured :
+ {
+ if ( ( nContent & 0x02 ) == 0 )
+ break;
+ }
+ case DFF_Prop_fShadow :
+ {
+ rSet.Put( SdrShadowItem( nContent != 0 ) );
+ if ( nContent )
+ {
+ if ( !IsProperty( DFF_Prop_shadowOffsetX ) )
+ rSet.Put( SdrShadowXDistItem( 35 ) );
+ if ( !IsProperty( DFF_Prop_shadowOffsetY ) )
+ rSet.Put( SdrShadowYDistItem( 35 ) );
+ }
+ }
+ break;
+ // Protection
+ case DFF_Prop_LockPosition :
+ {
+ if ( pObj )
+ pObj->SetMoveProtect( nContent != 0 );
+ }
+ break;
+ case DFF_Prop_LockAgainstSelect :
+ {
+ if ( pObj )
+ pObj->SetMarkProtect( nContent != 0 );
+ }
+ break;
+ }
+ }
+
+ UINT32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
+ if ( nLineFlags & 8 )
+ { // Linienattribute
+ MSO_LineDashing eLineDashing = (MSO_LineDashing)GetPropertyValue( DFF_Prop_lineDashing, mso_lineSolid );
+ if ( eLineDashing == mso_lineSolid )
+ rSet.Put(XLineStyleItem( XLINE_SOLID ) );
+ else
+ {
+ switch ( eLineDashing )
+ {
+ case mso_lineDotSys : rSet.Put(XLineDashItem(String(),XDash(XDASH_RECT,1,LLEN_POINT,0,0,LLEN_SPACE_POINT))); break;
+ case mso_lineDashGEL : rSet.Put(XLineDashItem(String(),XDash(XDASH_RECT,0,0,1,LLEN_MIDDLE,LLEN_SPACE_MIDDLE))); break;
+ case mso_lineDashDotGEL : rSet.Put(XLineDashItem(String(),XDash(XDASH_RECT,1,LLEN_POINT,1,LLEN_MIDDLE, LLEN_SPACE_MIDDLE))); break;
+ case mso_lineLongDashGEL : rSet.Put(XLineDashItem(String(),XDash(XDASH_RECT,0,0,1,LLEN_LONG,LLEN_SPACE_LONG))); break;
+ case mso_lineLongDashDotGEL : rSet.Put(XLineDashItem(String(),XDash(XDASH_RECT,1,LLEN_POINT,1,LLEN_LONG,LLEN_SPACE_LONG))); break;
+ case mso_lineLongDashDotDotGEL: rSet.Put(XLineDashItem(String(),XDash(XDASH_RECT,2,LLEN_POINT,1,LLEN_LONG,LLEN_SPACE_LONG))); break;
+ }
+ rSet.Put( XLineStyleItem( XLINE_DASH ) );
+ }
+ rSet.Put( XLineColorItem( String(), rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_lineColor ), DFF_Prop_lineColor ) ) );
+ if ( IsProperty( DFF_Prop_lineOpacity ) )
+ rSet.Put( XLineTransparenceItem( USHORT( 100 - ( ( GetPropertyValue( DFF_Prop_lineOpacity, 0x10000 ) * 100 ) >> 16 ) ) ) );
+
+ INT32 nVal = (INT32)GetPropertyValue( DFF_Prop_lineWidth, 9525 );
+ rManager.ScaleEmu( nVal );
+ rSet.Put( XLineWidthItem( nVal ) );
+
+ if ( nLineFlags & 0x10 )
+ {
+ ///////////////
+ // LineStart //
+ ///////////////
+ if ( IsProperty( DFF_Prop_lineStartArrowhead ) )
+ {
+ MSO_LineEnd aLineEnd = (MSO_LineEnd)GetPropertyValue( DFF_Prop_lineStartArrowhead );
+ FASTBOOL bLineCenter = FALSE;
+ XPolygon aPoly;
+ INT32 nWdt = ( (const XLineWidthItem&)( rSet.Get( XATTR_LINEWIDTH ) ) ).GetValue();
+ if ( !nWdt )
+ nWdt = 9;
+
+ switch ( aLineEnd )
+ {
+ case mso_lineArrowEnd :
+ {
+ XPolygon aTriangle( 3 );
+ aTriangle[0].X()=1000; aTriangle[0].Y()= 0;
+ aTriangle[1].X()= 0; aTriangle[1].Y()=2000;
+ aTriangle[2].X()=2000; aTriangle[2].Y()=2000;
+ aPoly = aTriangle;
+ }
+ break;
+ case mso_lineArrowOpenEnd :
+ {
+ XPolygon aTriangle( 6 );
+ aTriangle[0].X()=1000; aTriangle[0].Y()= 0;
+ aTriangle[1].X()= 0; aTriangle[1].Y()=2000;
+ aTriangle[2].X()= 400; aTriangle[2].Y()=2000;
+ aTriangle[3].X()=1000; aTriangle[3].Y()= 500;
+ aTriangle[4].X()=2000 - 400; aTriangle[4].Y()=2000;
+ aTriangle[5].X()=2000; aTriangle[5].Y()=2000;
+ aPoly = aTriangle;
+ }
+ break;
+ case mso_lineArrowStealthEnd :
+ {
+ XPolygon aTriangle(4);
+ aTriangle[0].X()=1000; aTriangle[0].Y()= 0;
+ aTriangle[1].X()= 0; aTriangle[1].Y()=2000;
+ aTriangle[2].X()=1000; aTriangle[2].Y()=1500;
+ aTriangle[3].X()=2000; aTriangle[3].Y()=2000;
+ aPoly=aTriangle;
+ }
+ break;
+ case mso_lineArrowDiamondEnd :
+ {
+ XPolygon aTriangle(4);
+ aTriangle[0].X()=1000; aTriangle[0].Y()= 0;
+ aTriangle[1].X()= 0; aTriangle[1].Y()=1000;
+ aTriangle[2].X()=1000; aTriangle[2].Y()=2000;
+ aTriangle[3].X()=2000; aTriangle[3].Y()=1000;
+ aPoly=aTriangle;
+ bLineCenter=TRUE ;
+
+ }
+ break;
+ case mso_lineArrowOvalEnd :
+ {
+ aPoly = XPolygon( Point( 1000, 0 ), 1000, 1000, 0, 3600 );
+ bLineCenter = TRUE;
+ }
+ break;
+ }
+ // ggfs. Pfeilende/Start an Writer-Mass anpassen
+ double nArrowScaleFactor = ( MAP_TWIP == rManager.GetModel()->GetScaleUnit() ) ? 2.1 : 1.0;
+ rSet.Put( XLineStartWidthItem( (INT32)( ( 280 + (INT32)( (double)nWdt * 2.5 ) ) / nArrowScaleFactor ) ) );
+ rSet.Put( XLineStartItem( String(
+ RTL_CONSTASCII_STRINGPARAM( "linestart" ),
+ RTL_TEXTENCODING_MS_1252 ),
+ aPoly ) );
+ rSet.Put( XLineStartCenterItem( bLineCenter ) );
+
+ MSO_LineEndWidth eWidth = (MSO_LineEndWidth)GetPropertyValue( DFF_Prop_lineStartArrowWidth, mso_lineMediumWidthArrow );
+ double fFactor;
+ switch( eWidth )
+ {
+ case mso_lineNarrowArrow :
+ fFactor = 0.583;
+ break;
+ case mso_lineWideArrow :
+ fFactor = 1.715;
+ break;
+ default:
+ case mso_lineMediumWidthArrow :
+ fFactor = 1.0;
+ break;
+ }
+ if( 1.0 != fFactor )
+ {
+ const SfxPoolItem* pPoolItem=NULL;
+ if ( rSet.GetItemState( XATTR_LINESTART, FALSE, &pPoolItem ) == SFX_ITEM_SET )
+ {
+ XPolygon aNewPoly( ( (const XLineStartItem*)pPoolItem )->GetValue() );
+ aNewPoly.Scale( fFactor, 1.0 );
+ rSet.Put( XLineStartItem( String(), aNewPoly ) );
+ }
+ if ( rSet.GetItemState( XATTR_LINESTARTWIDTH, FALSE, &pPoolItem ) == SFX_ITEM_SET )
+ {
+ INT32 nNewWidth = ( (const XLineStartWidthItem*)pPoolItem )->GetValue();
+ nNewWidth = (INT32)( fFactor * (double)nNewWidth );
+ rSet.Put( XLineStartWidthItem( nNewWidth ) );
+ }
+ }
+ MSO_LineEndLength eLength = (MSO_LineEndLength)GetPropertyValue( DFF_Prop_lineStartArrowLength, mso_lineMediumLenArrow );
+ switch ( eLength )
+ {
+ case mso_lineShortArrow :
+ fFactor = 1.715;
+ break;
+ case mso_lineLongArrow :
+ fFactor = 0.583;
+ break;
+ default :
+ case mso_lineMediumLenArrow :
+ fFactor = 1.0;
+ break;
+ }
+ if ( fFactor != 1.0 )
+ {
+ const SfxPoolItem* pPoolItem = NULL;
+ if ( rSet.GetItemState( XATTR_LINESTART, FALSE, &pPoolItem ) == SFX_ITEM_SET )
+ {
+ XPolygon aNewPoly( ( (const XLineStartItem*)pPoolItem )->GetValue() );
+ aNewPoly.Scale( fFactor, 1.0 );
+ rSet.Put( XLineStartItem( String(), aNewPoly ) );
+ }
+ }
+ }
+ /////////////
+ // LineEnd //
+ /////////////
+ if ( IsProperty( DFF_Prop_lineEndArrowhead ) )
+ {
+ MSO_LineEnd aLineEnd = (MSO_LineEnd)GetPropertyValue( DFF_Prop_lineEndArrowhead );
+ FASTBOOL bLineCenter = FALSE;
+ XPolygon aPoly;
+ INT32 nWdt = ( (const XLineWidthItem&)( rSet.Get( XATTR_LINEWIDTH ) ) ).GetValue();
+ if ( !nWdt )
+ nWdt = 9;
+
+ switch ( aLineEnd )
+ {
+ case mso_lineArrowEnd :
+ {
+ XPolygon aTriangle( 3 );
+ aTriangle[0].X()=1000; aTriangle[0].Y()= 0;
+ aTriangle[1].X()= 0; aTriangle[1].Y()=2000;
+ aTriangle[2].X()=2000; aTriangle[2].Y()=2000;
+ aPoly = aTriangle;
+ }
+ break;
+ case mso_lineArrowOpenEnd :
+ {
+ XPolygon aTriangle( 6 );
+ aTriangle[0].X()=1000; aTriangle[0].Y()= 0;
+ aTriangle[1].X()= 0; aTriangle[1].Y()=2000;
+ aTriangle[2].X()= 400; aTriangle[2].Y()=2000;
+ aTriangle[3].X()=1000; aTriangle[3].Y()= 500;
+ aTriangle[4].X()=2000 - 400; aTriangle[4].Y()=2000;
+ aTriangle[5].X()=2000; aTriangle[5].Y()=2000;
+ aPoly = aTriangle;
+ }
+ break;
+ case mso_lineArrowStealthEnd :
+ {
+ XPolygon aTriangle(4);
+ aTriangle[0].X()=1000; aTriangle[0].Y()= 0;
+ aTriangle[1].X()= 0; aTriangle[1].Y()=2000;
+ aTriangle[2].X()=1000; aTriangle[2].Y()=1500;
+ aTriangle[3].X()=2000; aTriangle[3].Y()=2000;
+ aPoly=aTriangle;
+ }
+ break;
+ case mso_lineArrowDiamondEnd :
+ {
+ XPolygon aTriangle(4);
+ aTriangle[0].X()=1000; aTriangle[0].Y()= 0;
+ aTriangle[1].X()= 0; aTriangle[1].Y()=1000;
+ aTriangle[2].X()=1000; aTriangle[2].Y()=2000;
+ aTriangle[3].X()=2000; aTriangle[3].Y()=1000;
+ aPoly=aTriangle;
+ bLineCenter=TRUE ;
+
+ }
+ break;
+ case mso_lineArrowOvalEnd :
+ {
+ aPoly = XPolygon( Point( 1000, 0 ), 1000, 1000, 0, 3600 );
+ bLineCenter = TRUE;
+ }
+ break;
+ }
+ // ggfs. Pfeilende/Start an Writer-Mass anpassen
+ double nArrowScaleFactor = ( MAP_TWIP == rManager.GetModel()->GetScaleUnit() ) ? 2.1 : 1.0;
+ rSet.Put( XLineEndWidthItem( (INT32)( ( 280 + (INT32)( (double)nWdt * 2.5 ) ) / nArrowScaleFactor ) ) );
+ rSet.Put( XLineEndItem( String(
+ RTL_CONSTASCII_STRINGPARAM( "lineend" ),
+ RTL_TEXTENCODING_MS_1252 ),
+ aPoly ) );
+ rSet.Put( XLineEndCenterItem( bLineCenter ) );
+
+ MSO_LineEndWidth eWidth =( MSO_LineEndWidth)GetPropertyValue( DFF_Prop_lineEndArrowWidth, mso_lineMediumWidthArrow );
+ double fFactor;
+ switch( eWidth )
+ {
+ case mso_lineNarrowArrow :
+ fFactor = 0.583;
+ break;
+ case mso_lineWideArrow :
+ fFactor = 1.715;
+ break;
+ default:
+ case mso_lineMediumWidthArrow :
+ fFactor = 1.0;
+ break;
+ }
+ if( 1.0 != fFactor )
+ {
+ const SfxPoolItem* pPoolItem = NULL;
+ if ( rSet.GetItemState( XATTR_LINEEND,FALSE, &pPoolItem ) == SFX_ITEM_SET )
+ {
+ XPolygon aNewPoly( ( (const XLineEndItem*)pPoolItem )->GetValue() );
+ // Basisbreite des Pfeilspizendreiecks veraendern
+ aNewPoly.Scale( fFactor, 1.0 );
+ rSet.Put( XLineEndItem( String(), aNewPoly ) );
+ }
+ if ( rSet.GetItemState( XATTR_LINEENDWIDTH, FALSE, &pPoolItem ) == SFX_ITEM_SET )
+ {
+ INT32 nNewWidth = ( (const XLineEndWidthItem*)pPoolItem )->GetValue();
+ nNewWidth = (INT32)( fFactor * (double)nNewWidth );
+ rSet.Put( XLineEndWidthItem( nNewWidth ) );
+ }
+ }
+ MSO_LineEndLength eLength = (MSO_LineEndLength)GetPropertyValue( DFF_Prop_lineEndArrowLength, mso_lineMediumLenArrow );
+ switch ( eLength )
+ {
+ case mso_lineShortArrow :
+ fFactor = 1.715;
+ break;
+ case mso_lineLongArrow :
+ fFactor = 0.583;
+ break;
+ default :
+ case mso_lineMediumLenArrow :
+ fFactor = 1.0;
+ break;
+ }
+ if( 1.0 != fFactor )
+ {
+ const SfxPoolItem* pPoolItem = NULL;
+ if ( rSet.GetItemState( XATTR_LINEEND, FALSE, &pPoolItem ) == SFX_ITEM_SET )
+ {
+ XPolygon aNewPoly( ( (const XLineEndItem*)pPoolItem )->GetValue() );
+ // Schenkellaenge des Pfeilspizendreiecks veraendern
+ aNewPoly.Scale( fFactor, 1.0 );
+ rSet.Put( XLineEndItem( String(), aNewPoly ) );
+ }
+ }
+ }
+
+ if ( IsProperty( DFF_Prop_lineEndCapStyle ) )
+ {
+ MSO_LineCap eLineCap = (MSO_LineCap)GetPropertyValue( DFF_Prop_lineEndCapStyle );
+ const SfxPoolItem* pPoolItem = NULL;
+ if ( rSet.GetItemState( XATTR_LINEDASH, FALSE, &pPoolItem ) == SFX_ITEM_SET )
+ {
+ XDashStyle eNewStyle = XDASH_RECT;
+ if ( eLineCap == mso_lineEndCapRound )
+ eNewStyle = XDASH_ROUND;
+ const XDash& rOldDash = ( (const XLineDashItem*)pPoolItem )->GetValue();
+ if ( rOldDash.GetDashStyle() != eNewStyle )
+ {
+ XDash aNew( rOldDash );
+ aNew.SetDashStyle( eNewStyle );
+ rSet.Put( XLineDashItem( XubString(), aNew ) );
+ }
+ }
+ }
+ }
+ }
+ else
+ rSet.Put( XLineStyleItem( XLINE_NONE ) );
+
+ if ( GetPropertyValue( DFF_Prop_fNoFillHitTest ) & 0x10 )
+ {
+ MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid );
+ XFillStyle eXFill = XFILL_NONE;
+ switch( eMSO_FillType )
+ {
+ case mso_fillSolid : // Fill with a solid color
+ eXFill = XFILL_SOLID;
+ break;
+ case mso_fillPattern : // Fill with a pattern (bitmap)
+ case mso_fillTexture : // A texture (pattern with its own color map)
+ case mso_fillPicture : // Center a picture in the shape
+ eXFill = XFILL_BITMAP;
+ break;
+ case mso_fillShade : // Shade from start to end points
+ case mso_fillShadeCenter : // Shade from bounding rectangle to end point
+ case mso_fillShadeShape : // Shade from shape outline to end point
+ case mso_fillShadeScale : // Similar to mso_fillShade, but the fillAngle
+ case mso_fillShadeTitle : // special type - shade to title --- for PP
+ eXFill = XFILL_GRADIENT;
+ break;
+// case mso_fillBackground : // Use the background fill color/pattern
+ }
+ rSet.Put( XFillStyleItem( eXFill ) );
+
+ if ( eXFill == XFILL_GRADIENT ) // hier nehmen wir mal lieber die Implementierung aus dem PPT
+ { // die urspruengliche ist angehaengt
+ // Rotationswinkel des Objeltes einbeziehen, da bei uns die Fuellung
+ // mit dem Objekt mitdreht - im Gegensatz zu PPT
+ long nAngle = 1800;
+ if ( mnFix16Angle )
+ nAngle = nAngle + ( 3600 - ( ( mnFix16Angle + 5 ) / 10 ) );
+
+ // FadeAngle der Fuellung feststellen
+ INT32 nFadeAngle = GetPropertyValue( DFF_Prop_fillAngle, 0 );
+ if ( nFadeAngle )
+ nFadeAngle = 1800 + ( 3600 - ( ( Fix16ToAngle( nFadeAngle ) + 5 ) / 10 ) );
+ else
+ nFadeAngle = 1800;
+
+ // FadeAngle auf Objektrotation aufschlagen
+ if ( nFadeAngle )
+ nAngle = nAngle + nFadeAngle;
+
+ // Rotationswinkel in Bereich zwingen
+ while ( nAngle >= 3600 )
+ nAngle -= 3600;
+ while ( nAngle < 0 )
+ nAngle += 3600;
+
+ long nFocus = GetPropertyValue( DFF_Prop_fillFocus, 0 );
+ XGradientStyle eGrad = XGRAD_LINEAR;
+ BOOL bChgColors(FALSE);
+
+ if ( nFadeAngle == 1800 )
+ bChgColors = !bChgColors;
+
+ if ( !nFocus )
+ bChgColors = !bChgColors;
+ else if ( nFocus < 0 ) // Bei negativem Focus sind die Farben zu tauschen
+ {
+ nFocus =- nFocus;
+ bChgColors = !bChgColors;
+ }
+ if( nFocus > 40 && nFocus < 60 )
+ {
+ eGrad = XGRAD_AXIAL; // Besser gehts leider nicht
+ bChgColors = !bChgColors;
+ }
+
+ USHORT nFocusX = (USHORT)nFocus;
+ USHORT nFocusY = (USHORT)nFocus;
+
+ switch( eMSO_FillType )
+ {
+ case mso_fillShadeShape :
+ {
+ eGrad = XGRAD_RECT;
+ nFocus = 50;
+ }
+ break;
+ case mso_fillShadeCenter :
+ {
+ eGrad = XGRAD_RECT;
+ nFocusX = ( IsProperty( DFF_Prop_fillToRight ) ) ? 100 : 0;
+ nFocusY = ( IsProperty( DFF_Prop_fillToBottom ) ) ? 100 : 0;
+ bChgColors = !bChgColors;
+ }
+ break;
+ }
+ Color aCol1( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillColor, COL_WHITE ), DFF_Prop_fillColor ) );
+ Color aCol2( rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillBackColor, COL_WHITE ), DFF_Prop_fillBackColor ) );
+
+ if ( bChgColors )
+ {
+ Color aZwi( aCol1 );
+ aCol1 = aCol2;
+ aCol2 = aZwi;
+ }
+
+ XGradient aGrad( aCol2, aCol1, eGrad, nAngle, nFocusX, nFocusY );
+ aGrad.SetStartIntens( 100 );
+ aGrad.SetEndIntens( 100 );
+ rSet.Put( XFillGradientItem( String(), aGrad ) );
+ }
+ else if ( eXFill == XFILL_BITMAP )
+ {
+ ULONG nWdt = GetPropertyValue( DFF_Prop_fillWidth, 0 );
+ ULONG nHgt = GetPropertyValue( DFF_Prop_fillHeight, 0 );
+ if( IsProperty( DFF_Prop_fillBlip ) )
+ {
+ Graphic aGraf;
+ if ( rManager.GetBLIP( GetPropertyValue( DFF_Prop_fillBlip ), aGraf ) )
+ {
+ Bitmap aBmp( aGraf.GetBitmap() );
+
+ if ( eMSO_FillType == mso_fillPattern )
+ {
+ Color aCol1( COL_WHITE ), aCol2( COL_WHITE );
+ if ( IsProperty( DFF_Prop_fillColor ) )
+ aCol1 = rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillColor ), DFF_Prop_fillColor );
+ if ( IsProperty( DFF_Prop_fillBackColor ) )
+ aCol2 = rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillBackColor ), DFF_Prop_fillBackColor );
+
+ XOBitmap aXOBitmap;
+
+ // Bitmap einsetzen
+ aXOBitmap.SetBitmap( aBmp );
+ aXOBitmap.SetBitmapType( XBITMAP_IMPORT );
+
+ if( aBmp.GetSizePixel().Width() == 8 && aBmp.GetSizePixel().Height() == 8 && aBmp.GetColorCount() == 2)
+ {
+ aXOBitmap.Bitmap2Array();
+ aXOBitmap.SetBitmapType( XBITMAP_8X8 );
+ aXOBitmap.SetPixelSize( aBmp.GetSizePixel() );
+
+ if( aXOBitmap.GetBackgroundColor() == COL_BLACK )
+ {
+ aXOBitmap.SetPixelColor( aCol1 );
+ aXOBitmap.SetBackgroundColor( aCol2 );
+ }
+ else
+ {
+ aXOBitmap.SetPixelColor( aCol2 );
+ aXOBitmap.SetBackgroundColor( aCol1 );
+ }
+ }
+ rSet.Put( XFillBitmapItem( String(), aXOBitmap ) );
+ }
+ else
+ {
+ XOBitmap aXBmp( aBmp, XBITMAP_STRETCH );
+ rSet.Put( XFillBitmapItem( String(), aXBmp ) );
+ if ( eMSO_FillType == mso_fillPicture )
+ rSet.Put( XFillBmpTileItem( FALSE ) );
+ }
+ }
+ }
+ }
+ }
+ else
+ rSet.Put( XFillStyleItem( XFILL_NONE ) );
+}
+
+//---------------------------------------------------------------------------
+//- Record Manager ----------------------------------------------------------
+//---------------------------------------------------------------------------
+
+DffRecordList::DffRecordList( DffRecordList* pList ) :
+ nCount ( 0 ),
+ nCurrent ( 0 ),
+ pPrev ( pList ),
+ pNext ( NULL )
+{
+ if ( pList )
+ pList->pNext = this;
+}
+
+DffRecordList::~DffRecordList()
+{
+ delete pNext;
+}
+
+DffRecordManager::DffRecordManager() :
+ DffRecordList ( NULL ),
+ pCList ( (DffRecordList*)this )
+{
+}
+
+DffRecordManager::DffRecordManager( SvStream& rIn ) :
+ DffRecordList ( NULL ),
+ pCList ( (DffRecordList*)this )
+{
+ Consume( rIn );
+}
+
+DffRecordManager::~DffRecordManager()
+{
+};
+
+
+void DffRecordManager::Consume( SvStream& rIn, BOOL bAppend, UINT32 nStOfs )
+{
+ if ( !bAppend )
+ Clear();
+ UINT32 nOldPos = rIn.Tell();
+ if ( !nStOfs )
+ {
+ DffRecordHeader aHd;
+ rIn >> aHd;
+ if ( aHd.nRecVer == DFF_PSFLAG_CONTAINER )
+ nStOfs = aHd.GetRecEndFilePos();
+ }
+ if ( nStOfs )
+ {
+ pCList = (DffRecordList*)this;
+ while ( pCList->pNext )
+ pCList = pCList->pNext;
+ while ( ( rIn.GetError() == 0 ) && ( ( rIn.Tell() + 8 ) <= nStOfs ) )
+ {
+ if ( pCList->nCount == DFF_RECORD_MANAGER_BUF_SIZE )
+ pCList = new DffRecordList( pCList );
+ rIn >> pCList->mHd[ pCList->nCount ];
+ pCList->mHd[ pCList->nCount++ ].SeekToEndOfRecord( rIn );
+ }
+ rIn.Seek( nOldPos );
+ }
+}
+
+void DffRecordManager::Clear()
+{
+ pCList = (DffRecordList*)this;
+ delete pNext, pNext = NULL;
+ nCurrent = 0;
+ nCount = 0;
+}
+
+DffRecordHeader* DffRecordManager::Current()
+{
+ DffRecordHeader* pRet = NULL;
+ if ( pCList->nCurrent < pCList->nCount )
+ pRet = &pCList->mHd[ pCList->nCurrent ];
+ return pRet;
+}
+
+DffRecordHeader* DffRecordManager::First()
+{
+ DffRecordHeader* pRet = NULL;
+ pCList = (DffRecordList*)this;
+ if ( pCList->nCount )
+ {
+ pCList->nCurrent = 0;
+ pRet = &pCList->mHd[ 0 ];
+ }
+ return pRet;
+}
+
+DffRecordHeader* DffRecordManager::Next()
+{
+ DffRecordHeader* pRet = NULL;
+ UINT32 nC = pCList->nCurrent + 1;
+ if ( nC < pCList->nCount )
+ {
+ pCList->nCurrent++;
+ pRet = &pCList->mHd[ nC ];
+ }
+ else if ( pCList->pNext )
+ {
+ pCList = pCList->pNext;
+ pCList->nCurrent = 0;
+ pRet = &pCList->mHd[ 0 ];
+ }
+ return pRet;
+}
+
+DffRecordHeader* DffRecordManager::Prev()
+{
+ DffRecordHeader* pRet = NULL;
+ UINT32 nCurrent = pCList->nCurrent;
+ if ( !nCurrent && pCList->pPrev )
+ {
+ pCList = pCList->pPrev;
+ nCurrent = pCList->nCount;
+ }
+ if ( nCurrent-- )
+ {
+ pCList->nCurrent = nCurrent;
+ pRet = &pCList->mHd[ nCurrent ];
+ }
+ return pRet;
+}
+
+DffRecordHeader* DffRecordManager::Last()
+{
+ DffRecordHeader* pRet = NULL;
+ while ( pCList->pNext )
+ pCList = pCList->pNext;
+ UINT32 nCount = pCList->nCount;
+ if ( nCount-- )
+ {
+ pCList->nCurrent = nCount;
+ pRet = &pCList->mHd[ nCount ];
+ }
+ return pRet;
+}
+
+BOOL DffRecordManager::SeekToContent( SvStream& rIn, UINT16 nRecId, DffSeekToContentMode eMode )
+{
+ DffRecordHeader* pHd = GetRecordHeader( nRecId, eMode );
+ if ( pHd )
+ {
+ pHd->SeekToContent( rIn );
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+DffRecordHeader* DffRecordManager::GetRecordHeader( UINT16 nRecId, DffSeekToContentMode eMode )
+{
+ UINT32 nOldCurrent = pCList->nCurrent;
+ DffRecordList* pOldList = pCList;
+ DffRecordHeader* pHd;
+
+ if ( eMode == SEEK_FROM_BEGINNING )
+ pHd = First();
+ else
+ pHd = Next();
+
+ while ( pHd )
+ {
+ if ( pHd->nRecType == nRecId )
+ break;
+ pHd = Next();
+ }
+ if ( !pHd && eMode == SEEK_FROM_CURRENT_AND_RESTART )
+ {
+ DffRecordHeader* pBreak = &pOldList->mHd[ nOldCurrent ];
+ pHd = First();
+ if ( pHd )
+ {
+ while ( pHd != pBreak )
+ {
+ if ( pHd->nRecType == nRecId )
+ break;
+ pHd = Next();
+ }
+ if ( pHd->nRecType != nRecId )
+ pHd = NULL;
+ }
+ }
+ if ( !pHd )
+ {
+ pCList = pOldList;
+ pOldList->nCurrent = nOldCurrent;
+ }
+ return pHd;
+}
+
+//---------------------------------------------------------------------------
+// private Methoden
+//---------------------------------------------------------------------------
+
+void SvxMSDffManager::Scale( long& rVal ) const
+{
+ if ( bNeedMap )
+ rVal = BigMulDiv( rVal, nMapMul, nMapDiv );
+}
+
+void SvxMSDffManager::Scale( Point& rPos ) const
+{
+ rPos.X() += nMapXOfs;
+ rPos.Y() += nMapYOfs;
+ if ( bNeedMap )
+ {
+ rPos.X() = BigMulDiv( rPos.X(), nMapMul, nMapDiv );
+ rPos.Y() = BigMulDiv( rPos.Y(), nMapMul, nMapDiv );
+ }
+}
+
+void SvxMSDffManager::Scale( Size& rSiz ) const
+{
+ if ( bNeedMap )
+ {
+ rSiz.Width() = BigMulDiv( rSiz.Width(), nMapMul, nMapDiv );
+ rSiz.Height() = BigMulDiv( rSiz.Height(), nMapMul, nMapDiv );
+ }
+}
+
+void SvxMSDffManager::Scale( Rectangle& rRect ) const
+{
+ rRect.Move( nMapXOfs, nMapYOfs );
+ if ( bNeedMap )
+ {
+ rRect.Left() =BigMulDiv( rRect.Left() , nMapMul, nMapDiv );
+ rRect.Top() =BigMulDiv( rRect.Top() , nMapMul, nMapDiv );
+ rRect.Right() =BigMulDiv( rRect.Right() , nMapMul, nMapDiv );
+ rRect.Bottom()=BigMulDiv( rRect.Bottom(), nMapMul, nMapDiv );
+ }
+}
+
+void SvxMSDffManager::Scale( Polygon& rPoly ) const
+{
+ if ( !bNeedMap )
+ return;
+ USHORT nPointAnz = rPoly.GetSize();
+ for ( USHORT nPointNum = 0; nPointNum < nPointAnz; nPointNum++ )
+ Scale( rPoly[ nPointNum ] );
+}
+
+void SvxMSDffManager::Scale( PolyPolygon& rPoly ) const
+{
+ if ( !bNeedMap )
+ return;
+ USHORT nPolyAnz = rPoly.Count();
+ for ( USHORT nPolyNum = 0; nPolyNum < nPolyAnz; nPolyNum++ )
+ Scale( rPoly[ nPolyNum ] );
+}
+
+void SvxMSDffManager::Scale( XPolygon& rPoly ) const
+{
+ if ( !bNeedMap )
+ return;
+ USHORT nPointAnz = rPoly.GetPointCount();
+ for ( USHORT nPointNum = 0; nPointNum < nPointAnz; nPointNum++ )
+ Scale( rPoly[ nPointNum ] );
+}
+
+void SvxMSDffManager::Scale( XPolyPolygon& rPoly ) const
+{
+ if ( !bNeedMap )
+ return;
+ USHORT nPolyAnz = rPoly.Count();
+ for ( USHORT nPolyNum = 0; nPolyNum < nPolyAnz; nPolyNum++ )
+ Scale( rPoly[ nPolyNum ] );
+}
+
+void SvxMSDffManager::ScaleEmu( long& rVal ) const
+{
+ rVal = BigMulDiv( rVal, nEmuMul, nEmuDiv );
+}
+
+UINT32 SvxMSDffManager::ScalePt( UINT32 nVal ) const
+{
+ MapUnit eMap = pSdrModel->GetScaleUnit();
+ Fraction aFact( GetMapFactor( MAP_POINT, eMap ).X() );
+ long aMul = aFact.GetNumerator();
+ long aDiv = aFact.GetDenominator() * 65536;
+ aFact = Fraction( aMul, aDiv ); // nochmal versuchen zu kuerzen
+ return BigMulDiv( nVal, aFact.GetNumerator(), aFact.GetDenominator() );
+}
+
+INT32 SvxMSDffManager::ScalePoint( INT32 nVal ) const
+{
+ return BigMulDiv( nVal, nPntMul, nPntDiv );
+};
+
+void SvxMSDffManager::SetModel(SdrModel* pModel, long nApplicationScale)
+{
+ pSdrModel = pModel;
+ if( pModel && (0 < nApplicationScale) )
+ {
+ // PPT arbeitet nur mit Einheiten zu 576DPI
+ // WW hingegen verwendet twips, dh. 1440DPI.
+ MapUnit eMap = pSdrModel->GetScaleUnit();
+ Fraction aFact( GetMapFactor(MAP_INCH, eMap).X() );
+ long nMul=aFact.GetNumerator();
+ long nDiv=aFact.GetDenominator()*nApplicationScale;
+ aFact=Fraction(nMul,nDiv); // nochmal versuchen zu kuerzen
+ // Bei 100TH_MM -> 2540/576=635/144
+ // Bei Twip -> 1440/576=5/2
+ nMapMul = aFact.GetNumerator();
+ nMapDiv = aFact.GetDenominator();
+ bNeedMap = nMapMul!=nMapDiv;
+
+ // MS-DFF-Properties sind grossteils in EMU (English Metric Units) angegeben
+ // 1mm=36000emu, 1twip=635emu
+ aFact=GetMapFactor(MAP_100TH_MM,eMap).X();
+ nMul=aFact.GetNumerator();
+ nDiv=aFact.GetDenominator()*360;
+ aFact=Fraction(nMul,nDiv); // nochmal versuchen zu kuerzen
+ // Bei 100TH_MM -> 1/360
+ // Bei Twip -> 14,40/(25,4*360)=144/91440=1/635
+ nEmuMul=aFact.GetNumerator();
+ nEmuDiv=aFact.GetDenominator();
+
+ // Und noch was fuer typografische Points
+ aFact=GetMapFactor(MAP_POINT,eMap).X();
+ nPntMul=aFact.GetNumerator();
+ nPntDiv=aFact.GetDenominator();
+ }
+ else
+ {
+ pModel = 0;
+ nMapMul = nMapDiv = nMapXOfs = nMapYOfs = nEmuMul = nEmuDiv = nPntMul = nPntDiv = 0;
+ bNeedMap = FALSE;
+ }
+}
+
+BOOL SvxMSDffManager::SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const
+{
+ BOOL bRet = FALSE;
+ if ( mpFidcls )
+ {
+ UINT32 nMerk = rSt.Tell();
+ UINT32 nShapeId, nSec = ( nId >> 10 ) - 1;
+ if ( nSec < mnIdClusters )
+ {
+ UINT32 nOfs = (UINT32)maDgOffsetTable.Get( mpFidcls[ nSec ].dgid );
+ if ( nOfs )
+ {
+ rSt.Seek( nOfs );
+ DffRecordHeader aEscherF002Hd;
+ rSt >> aEscherF002Hd;
+ ULONG nEscherF002End = aEscherF002Hd.GetRecEndFilePos();
+ DffRecordHeader aEscherObjListHd;
+ while ( rSt.Tell() < nEscherF002End )
+ {
+ rSt >> aEscherObjListHd;
+ if ( aEscherObjListHd.nRecVer != 0xf )
+ aEscherObjListHd.SeekToEndOfRecord( rSt );
+ else if ( aEscherObjListHd.nRecType == DFF_msofbtSpContainer )
+ {
+ DffRecordHeader aShapeHd;
+ if ( SeekToRec( rSt, DFF_msofbtSp, aEscherObjListHd.GetRecEndFilePos(), &aShapeHd ) )
+ {
+ rSt >> nShapeId;
+ if ( nId == nShapeId )
+ {
+ aEscherObjListHd.SeekToBegOfRecord( rSt );
+ bRet = TRUE;
+ break;
+ }
+ }
+ aEscherObjListHd.SeekToEndOfRecord( rSt );
+ }
+ }
+ }
+ }
+ if ( !bRet )
+ rSt.Seek( nMerk );
+ }
+ return bRet;
+}
+
+FASTBOOL SvxMSDffManager::SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd, ULONG nSkipCount ) const
+{
+ FASTBOOL bRet = FALSE;
+ ULONG nFPosMerk = rSt.Tell(); // FilePos merken fuer ggf. spaetere Restauration
+ DffRecordHeader aHd;
+ do
+ {
+ rSt >> aHd;
+ if ( aHd.nRecType == nRecId )
+ {
+ if ( nSkipCount )
+ nSkipCount--;
+ else
+ {
+ bRet = TRUE;
+ if ( pRecHd != NULL )
+ *pRecHd = aHd;
+ else
+ aHd.SeekToBegOfRecord( rSt );
+ }
+ }
+ if ( !bRet )
+ aHd.SeekToEndOfRecord( rSt );
+ }
+ while ( rSt.GetError() == 0 && rSt.Tell() < nMaxFilePos && !bRet );
+ if ( !bRet )
+ rSt.Seek( nFPosMerk ); // FilePos restaurieren
+ return bRet;
+}
+
+FASTBOOL SvxMSDffManager::SeekToRec2( USHORT nRecId1, USHORT nRecId2, ULONG nMaxFilePos, DffRecordHeader* pRecHd, ULONG nSkipCount ) const
+{
+ FASTBOOL bRet = FALSE;
+ ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer ggf. spaetere Restauration
+ DffRecordHeader aHd;
+ do
+ {
+ rStCtrl >> aHd;
+ if ( aHd.nRecType == nRecId1 || aHd.nRecType == nRecId2 )
+ {
+ if ( nSkipCount )
+ nSkipCount--;
+ else
+ {
+ bRet = TRUE;
+ if ( pRecHd )
+ *pRecHd = aHd;
+ else
+ aHd.SeekToBegOfRecord( rStCtrl );
+ }
+ }
+ if ( !bRet )
+ aHd.SeekToEndOfRecord( rStCtrl );
+ }
+ while ( rStCtrl.GetError() == 0 && rStCtrl.Tell() < nMaxFilePos && !bRet );
+ if ( !bRet )
+ rStCtrl.Seek( nFPosMerk ); // FilePos restaurieren
+ return bRet;
+}
+
+
+FASTBOOL SvxMSDffManager::GetColorFromPalette( USHORT nNum, Color& rColor ) const
+{
+ // diese Methode ist in der zum Excel-Import
+ // abgeleiteten Klasse zu ueberschreiben...
+ rColor.SetColor( COL_WHITE );
+ return TRUE;
+}
+
+
+Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContentProperty ) const
+{
+ Color aColor( mnDefaultColor );
+
+ // Fuer Textfarben: Header ist 0xfeRRGGBB
+ if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
+ nColorCode &= 0x00ffffff;
+
+ sal_uInt8 nUpper = (sal_uInt8)( nColorCode >> 24 );
+ if( nUpper & 0x1b ) // if( nUpper & 0x1f )
+ {
+ if( ( nUpper & 0x08 ) || ( ( nUpper & 0x10 ) == 0 ) )
+ {
+ // SCHEMECOLOR
+ if ( !GetColorFromPalette( ( nUpper & 8 ) ? (sal_uInt16)nColorCode : nUpper, aColor ) )
+ {
+ switch( nContentProperty )
+ {
+ case DFF_Prop_pictureTransparent :
+ case DFF_Prop_shadowColor :
+ case DFF_Prop_fillBackColor :
+ case DFF_Prop_fillColor :
+ aColor = Color( COL_WHITE );
+ break;
+ case DFF_Prop_lineColor :
+ {
+ aColor = Color( COL_BLACK );
+ }
+ break;
+ }
+ }
+ }
+ else // SYSCOLOR
+ {
+ UINT16 nParameter = (BYTE)( nColorCode >> 16);
+ UINT16 nFunctionBits = (UINT16)( ( nColorCode & 0x00000f00 ) >> 8 );
+ UINT16 nAdditionalFlags = (UINT16)( ( nColorCode & 0x0000f000) >> 8 );
+ UINT16 nColorIndex = (BYTE)nColorCode;
+ UINT32 nPropColor;
+
+ sal_uInt16 nCProp = DFF_Prop_lineColor;
+ switch ( nColorIndex )
+ {
+ case 0xf0 : // msocolorFillColor
+ {
+ nPropColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff );
+ nCProp = DFF_Prop_fillColor;
+ }
+ break;
+ case 0xf1 : // msocolorLineOrFillColor ( use the line color only if there is a line )
+ {
+ if ( GetPropertyValue( DFF_Prop_fNoLineDrawDash ) & 8 )
+ {
+ nPropColor = GetPropertyValue( DFF_Prop_lineColor, 0 );
+ nCProp = DFF_Prop_lineColor;
+ }
+ else
+ {
+ nPropColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff );
+ nCProp = DFF_Prop_fillColor;
+ }
+ }
+ break;
+ case 0xf2 : // msocolorLineColor
+ {
+ nPropColor = GetPropertyValue( DFF_Prop_lineColor, 0 );
+ nCProp = DFF_Prop_lineColor;
+ }
+ break;
+ case 0xf3 : // msocolorShadowColor
+ {
+ nPropColor = GetPropertyValue( DFF_Prop_shadowColor, 0x808080 );
+ nCProp = DFF_Prop_shadowColor;
+ }
+ break;
+ case 0xf4 : // msocolorThis ( use this color ... )
+ {
+ nPropColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff ); //?????????????
+ nCProp = DFF_Prop_fillColor;
+ }
+ break;
+ case 0xf5 : // msocolorFillBackColor
+ {
+ nPropColor = GetPropertyValue( DFF_Prop_fillBackColor, 0xffffff );
+ nCProp = DFF_Prop_fillBackColor;
+ }
+ break;
+ case 0xf6 : // msocolorLineBackColor
+ {
+ nPropColor = GetPropertyValue( DFF_Prop_lineBackColor, 0xffffff );
+ nCProp = DFF_Prop_lineBackColor;
+ }
+ break;
+ case 0xf7 : // msocolorFillThenLine ( use the fillcolor unless no fill and line )
+ {
+ nPropColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff ); //?????????????
+ nCProp = DFF_Prop_fillColor;
+ }
+ break;
+ case 0xff : // msocolorIndexMask ( extract the color index )
+ {
+ nPropColor = GetPropertyValue( DFF_Prop_fillColor, 0xffffff ); //?????????????
+ nCProp = DFF_Prop_fillColor;
+ }
+ break;
+ }
+ if ( ( nPropColor & 0x10000000 ) == 0 ) // beware of looping recursive
+ aColor = MSO_CLR_ToColor( nPropColor, nCProp );
+ if( nAdditionalFlags & 0x80 ) // make color gray
+ {
+ UINT8 nZwi = aColor.GetLuminance();
+ aColor = Color( nZwi, nZwi, nZwi );
+ }
+ switch( nFunctionBits )
+ {
+ case 0x01 : // darken color by parameter
+ {
+ aColor.SetRed( ( nParameter * aColor.GetRed() ) >> 8 );
+ aColor.SetGreen( ( nParameter * aColor.GetGreen() ) >> 8 );
+ aColor.SetBlue( ( nParameter * aColor.GetBlue() ) >> 8 );
+ }
+ break;
+ case 0x02 : // lighten color by parameter
+ {
+ UINT16 nInvParameter = ( 0x00ff - nParameter ) * 0xff;
+ aColor.SetRed( ( nInvParameter + ( nParameter * aColor.GetRed() ) ) >> 8 );
+ aColor.SetGreen( ( nInvParameter + ( nParameter * aColor.GetGreen() ) ) >> 8 );
+ aColor.SetBlue( ( nInvParameter + ( nParameter * aColor.GetBlue() ) ) >> 8 );
+ }
+ break;
+ case 0x03 : // add grey level RGB(p,p,p)
+ {
+ INT16 nR = (INT16)aColor.GetRed() + (INT16)nParameter;
+ INT16 nG = (INT16)aColor.GetGreen() + (INT16)nParameter;
+ INT16 nB = (INT16)aColor.GetBlue() + (INT16)nParameter;
+ if ( nR > 0x00ff )
+ nR = 0x00ff;
+ if ( nG > 0x00ff )
+ nG = 0x00ff;
+ if ( nB > 0x00ff )
+ nB = 0x00ff;
+ aColor = Color( (UINT8)nR, (UINT8)nG, (UINT8)nB );
+ }
+ break;
+ case 0x04 : // substract grey level RGB(p,p,p)
+ {
+ INT16 nR = (INT16)aColor.GetRed() - (INT16)nParameter;
+ INT16 nG = (INT16)aColor.GetGreen() - (INT16)nParameter;
+ INT16 nB = (INT16)aColor.GetBlue() - (INT16)nParameter;
+ if ( nR < 0 )
+ nR = 0;
+ if ( nG < 0 )
+ nG = 0;
+ if ( nB < 0 )
+ nB = 0;
+ aColor = Color( (UINT8)nR, (UINT8)nG, (UINT8)nB );
+ }
+ break;
+ case 0x05 : // substract from grey level RGB(p,p,p)
+ {
+ INT16 nR = (INT16)nParameter - (INT16)aColor.GetRed();
+ INT16 nG = (INT16)nParameter - (INT16)aColor.GetGreen();
+ INT16 nB = (INT16)nParameter - (INT16)aColor.GetBlue();
+ if ( nR < 0 )
+ nR = 0;
+ if ( nG < 0 )
+ nG = 0;
+ if ( nB < 0 )
+ nB = 0;
+ aColor = Color( (UINT8)nR, (UINT8)nG, (UINT8)nB );
+ }
+ break;
+ case 0x06 : // per component: black if < p, white if >= p
+ {
+ aColor.SetRed( aColor.GetRed() < nParameter ? 0x00 : 0xff );
+ aColor.SetGreen( aColor.GetGreen() < nParameter ? 0x00 : 0xff );
+ aColor.SetBlue( aColor.GetBlue() < nParameter ? 0x00 : 0xff );
+ }
+ break;
+ }
+ if ( nAdditionalFlags & 0x40 ) // top-bit invert
+ aColor = Color( aColor.GetRed() ^ 0x80, aColor.GetGreen() ^ 0x80, aColor.GetBlue() ^ 0x80 );
+
+ if ( nAdditionalFlags & 0x20 ) // invert color
+ aColor = Color(0xff - aColor.GetRed(), 0xff - aColor.GetGreen(), 0xff - aColor.GetBlue());
+ }
+ }
+ else if ( ( nUpper & 4 ) && ( ( nColorCode & 0xfffff8 ) == 0 ) )
+ { // case of nUpper == 4 powerpoint takes this as agrument for a colorschemecolor
+ GetColorFromPalette( nUpper, aColor );
+ }
+ else // hart attributiert, eventuell mit Hinweis auf SYSTEMRGB
+ aColor = Color( (BYTE)nColorCode, (BYTE)( nColorCode >> 8 ), (BYTE)( nColorCode >> 16 ) );
+ return aColor;
+}
+
+FASTBOOL SvxMSDffManager::ReadDffString(SvStream& rSt, String& rTxt) const
+{
+ FASTBOOL bRet=FALSE;
+ DffRecordHeader aStrHd;
+ if( !ReadCommonRecordHeader(aStrHd, rSt) )
+ rSt.Seek( aStrHd.nFilePos );
+ else if ( aStrHd.nRecType == DFF_PST_TextBytesAtom || aStrHd.nRecType == DFF_PST_TextCharsAtom )
+ {
+ FASTBOOL bUniCode=aStrHd.nRecType==DFF_PST_TextCharsAtom;
+ bRet=TRUE;
+ ULONG nBytes = aStrHd.nRecLen;
+ MSDFFReadZString( rSt, rTxt, nBytes, bUniCode );
+ if( !bUniCode )
+ {
+ for ( xub_StrLen n = 0; n < nBytes; n++ )
+ {
+ if( rTxt.GetChar( n ) == 0x0B )
+ rTxt.SetChar( n, ' ' ); // Weicher Umbruch
+ // TODO: Zeilenumbruch im Absatz via Outliner setzen.
+ }
+ }
+ aStrHd.SeekToEndOfRecord( rSt );
+ }
+ else
+ aStrHd.SeekToBegOfRecord( rSt );
+ return bRet;
+}
+
+FASTBOOL SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) const
+{
+ FASTBOOL bRet=FALSE;
+ SdrTextObj* pText = PTR_CAST(SdrTextObj, pObj);
+ if( pText )
+ {
+ DffRecordHeader aTextHd;
+ if( !ReadCommonRecordHeader(aTextHd, rSt) )
+ rSt.Seek( aTextHd.nFilePos );
+ else if ( aTextHd.nRecType==DFF_msofbtClientTextbox )
+ {
+ bRet=TRUE;
+ ULONG nRecEnd=aTextHd.GetRecEndFilePos();
+ DffRecordHeader aHd;
+ String aText;
+ UINT32 nInvent=pText->GetObjInventor();
+ UINT16 nIdent=pText->GetObjIdentifier();
+
+ SdrOutliner& rOutliner=pText->ImpGetDrawOutliner();
+ USHORT nMinDepth = rOutliner.GetMinDepth();
+#if SUPD>601
+ USHORT nOutlMode = rOutliner.GetMode();
+#endif
+ { // Wohl 'nen kleiner Bug der EditEngine, das die
+ // Absastzattribute bei Clear() nicht entfernt werden.
+ FASTBOOL bClearParaAttribs = TRUE;
+#if SUPD>601
+ rOutliner.SetStyleSheet( 0, NULL );
+#endif
+ SfxItemSet aSet(rOutliner.GetEmptyItemSet());
+ aSet.Put(SvxColorItem( COL_BLACK ));
+ rOutliner.SetParaAttribs(0,aSet);
+ pText->NbcSetAttributes(aSet,FALSE);
+
+ bClearParaAttribs = FALSE;
+ if( bClearParaAttribs )
+ {
+ // Wohl 'nen kleiner Bug der EditEngine, dass die
+ // Absastzattribute bei Clear() nicht entfernt werden.
+ rOutliner.SetParaAttribs(0,rOutliner.GetEmptyItemSet());
+ }
+ }
+#if SUPD>601
+ rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
+#endif
+ rOutliner.SetMinDepth(0);
+
+ ULONG nFilePosMerker=rSt.Tell();
+ ////////////////////////////////////
+ // TextString und MetaChars lesen //
+ ////////////////////////////////////
+ do
+ {
+ if( !ReadCommonRecordHeader(aHd, rSt) )
+ rSt.Seek( aHd.nFilePos );
+ else
+ {
+ switch (aHd.nRecType)
+ {
+ //case TextHeaderAtom
+ //case TextSpecInfoAtom
+ case DFF_PST_TextBytesAtom:
+ case DFF_PST_TextCharsAtom:
+ {
+ aHd.SeekToBegOfRecord(rSt);
+ ReadDffString(rSt, aText);
+ }
+ break;
+ case DFF_PST_TextRulerAtom :
+ {
+ UINT16 nLen = (UINT16)aHd.nRecLen;
+ if(nLen)
+ {
+ UINT16 nVal1, nVal2, nVal3;
+ UINT16 nDefaultTab = 2540; // PPT def: 1 Inch //rOutliner.GetDefTab();
+ UINT16 nMostrightTab = 0;
+ SfxItemSet aSet(rOutliner.GetEmptyItemSet());
+ SvxTabStopItem aTabItem(0, 0);
+
+ rSt >> nVal1;
+ rSt >> nVal2;
+ nLen -= 4;
+
+ // Allg. TAB verstellt auf Wert in nVal3
+ if(nLen && (nVal1 & 0x0001))
+ {
+ rSt >> nVal3;
+ nLen -= 2;
+ nDefaultTab = (UINT16)(((UINT32)nVal3 * 1000) / 240);
+ }
+
+ // Weitere, frei gesetzte TABs
+ if(nLen && (nVal1 & 0x0004))
+ {
+ rSt >> nVal1;
+ nLen -= 2;
+
+ // fest gesetzte TABs importieren
+ while(nLen && nVal1--)
+ {
+ rSt >> nVal2;
+ rSt >> nVal3;
+ nLen -= 4;
+
+ UINT16 nNewTabPos = (UINT16)(((UINT32)nVal2 * 1000) / 240);
+ if(nNewTabPos > nMostrightTab)
+ nMostrightTab = nNewTabPos;
+
+ SvxTabStop aTabStop(nNewTabPos);
+ aTabItem.Insert(aTabStop);
+ }
+ }
+
+ // evtl. noch default-TABs ergaenzen (immer)
+ UINT16 nObjWidth = pObj->GetSnapRect().GetWidth() + 1;
+ UINT16 nDefaultTabPos = nDefaultTab;
+
+ while(nDefaultTabPos <= nObjWidth && nDefaultTabPos <= nMostrightTab)
+ nDefaultTabPos += nDefaultTab;
+
+ while(nDefaultTabPos <= nObjWidth)
+ {
+ SvxTabStop aTabStop(nDefaultTabPos);
+ aTabItem.Insert(aTabStop);
+ nDefaultTabPos += nDefaultTab;
+ }
+
+ // Falls TABs angelegt wurden, setze diese
+ if(aTabItem.Count())
+ {
+ aSet.Put(aTabItem);
+ rOutliner.SetParaAttribs(0, aSet);
+ }
+ }
+ }
+ break;
+ }
+ aHd.SeekToEndOfRecord( rSt );
+ }
+ }
+ while ( rSt.GetError() == 0 && rSt.Tell() < nRecEnd );
+
+ ////////////////////////
+ // SHIFT-Ret ersetzen //
+ ////////////////////////
+ if ( aText.Len() )
+ {
+ aText += ' ';
+ aText.SetChar( aText.Len()-1, 0x0D );
+ rOutliner.SetText( aText, rOutliner.GetParagraph( 0 ) );
+
+ // SHIFT-Ret ersetzen im Outliner
+ if(aText.GetTokenCount(0x0B) > 1)
+ {
+ UINT32 nParaCount = rOutliner.GetParagraphCount();
+ for(UINT16 a=0;a<nParaCount;a++)
+ {
+ Paragraph* pActPara = rOutliner.GetParagraph(a);
+ String aParaText = rOutliner.GetText(pActPara);
+ for(UINT16 b=0;b<aParaText.Len();b++)
+ {
+ if( aParaText.GetChar( b ) == 0x0B)
+ {
+ ESelection aSelection(a, b, a, b+1);
+ rOutliner.QuickInsertLineBreak(aSelection);
+ }
+ }
+ }
+ }
+ }
+#if SUPD>601
+ OutlinerParaObject* pNewText=rOutliner.CreateParaObject();
+ rOutliner.Init( nOutlMode );
+ rOutliner.SetMinDepth(nMinDepth);
+ pText->NbcSetOutlinerParaObject(pNewText);
+#endif
+ }
+ else
+ aTextHd.SeekToBegOfRecord(rSt);
+
+ }
+ return bRet;
+}
+
+
+void SvxMSDffManager::RetrieveNameOfBLIP(SvStream& rSt,
+ String& rGraphName,
+ ULONG nMaxRead)
+{
+ rGraphName.Erase();
+ DffPropSet* pProps = 0;
+ ULONG nOldPosData = rSt.Tell();
+ DffRecordHeader aRecHd;
+ ULONG nRead = 0;
+ while( nRead < nMaxRead )
+ {
+ if( !ReadCommonRecordHeader(aRecHd, rSt) )
+ {
+ rSt.Seek( aRecHd.nFilePos );
+ break;
+ }
+ else
+ {
+ switch( aRecHd.nRecType )
+ {
+ case DFF_msofbtOPT:
+ {
+ aRecHd.SeekToBegOfRecord( rSt );
+ pProps = new DffPropSet( TRUE );
+ if ( pProps )
+ rSt >> *pProps;
+ }
+ break;
+ }
+ aRecHd.SeekToEndOfRecord( rSt );
+ nRead += aRecHd.nRecLen;
+ }
+ }
+ if( pProps )
+ {
+ MSO_BlipFlags eFlags = (MSO_BlipFlags)pProps->GetPropertyValue( DFF_Prop_pibFlags, mso_blipflagDefault );
+ String aFileName;
+ if( pProps->SeekToContent( DFF_Prop_pibName, rSt ) )
+ MSDFFReadZString( rSt, aFileName,
+ pProps->GetPropertyValue( DFF_Prop_pibName ), TRUE );
+ if ((eFlags & mso_blipflagType) == mso_blipflagComment)
+ rGraphName = aFileName;
+ else
+ {
+ INetURLObject aURL;
+ aURL.SetSmartURL( aFileName );
+ rGraphName = aURL.getBase();
+ }
+ delete pProps;
+ }
+ rSt.Seek( nOldPosData );
+}
+
+
+
+void SvxMSDffManager::MSDFFReadZString( SvStream& rIn, String& rStr,
+ ULONG nRecLen, FASTBOOL bUniCode ) const
+{
+ if( nRecLen > STRING_NOTFOUND )
+ nRecLen = STRING_NOTFOUND;
+
+ if( nRecLen )
+ {
+ sal_uInt32 nLen = nRecLen;
+ if ( bUniCode )
+ nLen >>= 1;
+
+ String sBuf;
+ sal_Unicode* pBuf = sBuf.AllocBuffer( nLen );
+
+ if( bUniCode )
+ {
+ rIn.Read( (sal_Char*)pBuf, nLen << 1 );
+
+#ifdef __BIGENDIAN
+ for( sal_uInt32 n = 0; n < nLen; ++n, ++pBuf )
+ *pBuf = SWAPSHORT( *pBuf );
+#endif // ifdef __BIGENDIAN
+ }
+ else
+ {
+ // use the String-Data as buffer for the 8bit characters and
+ // change then all to unicode
+ sal_Char* pReadPos = ((sal_Char*)pBuf) + nLen;
+ rIn.Read( (sal_Char*)pReadPos, nLen );
+ for( ULONG n = 0; n < nLen; ++n, ++pBuf, ++pReadPos )
+ *pBuf = ByteString::ConvertToUnicode( *pReadPos,
+ RTL_TEXTENCODING_MS_1252 );
+ }
+
+ rStr = sBuf.EraseTrailingChars( 0 );
+ }
+ else
+ rStr.Erase();
+}
+
+
+SdrObject* SvxMSDffManager::Import3DObject( SdrObject* pRet, SfxItemSet& aSet, Rectangle& aBoundRect, BOOL bIsAutoText ) const
+{
+ // pRet Umwandeln in Szene mit 3D Objekt
+ E3dDefaultAttributes a3DDefaultAttr;
+ a3DDefaultAttr.SetDefaultLatheCharacterMode( TRUE );
+ a3DDefaultAttr.SetDefaultExtrudeCharacterMode( TRUE );
+
+ E3dScene* pScene = new E3dPolyScene( a3DDefaultAttr );
+ double fDepth = 1270.0;
+ BOOL bSceneHasObjects( FALSE );
+
+ if( pRet->IsGroupObject() )
+ {
+ SdrObjListIter aIter( *pRet, IM_DEEPWITHGROUPS );
+ while( aIter.IsMore() )
+ {
+ SdrObject* pPartObj = aIter.Next();
+ SdrObject* pNewObj = pPartObj->ConvertToPolyObj( FALSE, FALSE );
+ SdrPathObj* pPath = PTR_CAST( SdrPathObj, pNewObj );
+
+ if( pPath )
+ {
+ E3dCompoundObject* p3DObj = new E3dExtrudeObj( a3DDefaultAttr, pPath->GetPathPoly(), fDepth );
+ p3DObj->NbcSetLayer( pRet->GetLayer() );
+ aSet.Put( XLineStyleItem( XLINE_NONE ) ); // ... aber keine Linien
+ // Feststellen, ob ein FILL_Attribut gesetzt ist.
+ // Falls nicht, Fuellattribut hart setzen
+ XFillStyle eFillStyle = ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem );
+ if ( eFillStyle == XFILL_NONE )
+ aSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ pScene->Insert3DObj( p3DObj );
+ bSceneHasObjects = TRUE;
+ }
+ delete pNewObj; // Aufraeumen
+ }
+ }
+ else
+ {
+ SdrObject* pNewObj = pRet->ConvertToPolyObj( FALSE, FALSE );
+ SdrPathObj* pPath = PTR_CAST( SdrPathObj, pNewObj );
+
+ if ( pPath )
+ {
+ E3dCompoundObject* p3DObj = new E3dExtrudeObj( a3DDefaultAttr, pPath->GetPathPoly(), fDepth );
+ p3DObj->NbcSetLayer( pRet->GetLayer() );
+ aSet.Put( XLineStyleItem( XLINE_NONE ) );// ... aber keine Linien
+ // Feststellen, ob ein FILL_Attribut gesetzt ist.
+ // Falls nicht, Fuellattribut hart setzen
+ XFillStyle eFillStyle = ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem );
+ if( eFillStyle == XFILL_NONE )
+ aSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ pScene->Insert3DObj( p3DObj );
+ bSceneHasObjects = TRUE;
+ }
+ delete pNewObj; // Aufraeumen
+ }
+
+ // Hat das Umwandeln geklappt?
+ if ( bSceneHasObjects )
+ {
+ // Returnwert aendern
+ delete pRet;
+ pRet = pScene;
+
+ // Kameraeinstellungen, Perspektive ...
+ Camera3D& rCamera = (Camera3D&)pScene->GetCamera();
+ const Volume3D& rVolume = pScene->GetBoundVolume();
+ Point aCenter = aBoundRect.Center();
+ Matrix4D aMatrix;
+ // 3D-Objekt auf die Mitte des Gesamtrechtecks zentrieren
+ aMatrix.Translate( Vector3D( -aCenter.X(), aCenter.Y(), 0.0 ) );
+ pScene->ApplyTransform( aMatrix );
+ pScene->CorrectSceneDimensions();
+ pScene->NbcSetSnapRect( aBoundRect );
+
+ // InitScene replacement
+ 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( 0.0, 0.0, 0.0 );
+
+ double fCaMX = 3472.0;
+ double fCaMY = 3472.0;
+ double fCaMZ = fCamZ < 100.0 ? 100.0 : fCamZ;
+ INT32 nVal = GetPropertyValue( DFF_Prop_c3DXViewpoint, 0 );
+ if ( nVal )
+ {
+ ScaleEmu( nVal );
+ fCaMX = (double)nVal;
+ }
+ nVal = GetPropertyValue( DFF_Prop_c3DYViewpoint, 0 );
+ if ( nVal )
+ {
+ ScaleEmu(nVal);
+ fCaMY = (double)-nVal;
+ }
+ nVal = GetPropertyValue( DFF_Prop_c3DZViewpoint, 0 );
+ if ( nVal )
+ {
+ ScaleEmu(nVal);
+ fCaMZ = (double)nVal;
+ }
+ Vector3D aCamPos( fCaMX, fCaMY, fCaMZ );
+ rCamera.SetPosAndLookAt( aCamPos, aLookAt );
+ rCamera.SetFocalLength( 100.0 );
+ rCamera.SetDefaults( Vector3D( 0.0, 0.0, 100.0 ), aLookAt, 100.0 );
+
+ // Default: non perspective
+
+ rCamera.SetProjection( GetPropertyValue( DFF_Prop_fc3DFillHarsh, 0 ) & 4 ? PR_PERSPECTIVE : PR_PARALLEL );
+ pScene->SetCamera( rCamera );
+ pScene->NbcSetAttributes( aSet, FALSE );
+ pScene->SetRectsDirty();
+ pScene->InitTransformationSet();
+
+ // Merker fuer Kameraaenderungen
+
+ INT32 nLightKeyX = GetPropertyValue( DFF_Prop_c3DKeyX, 0 );
+ INT32 nLightKeyY = GetPropertyValue( DFF_Prop_c3DKeyY, 0 );
+ INT32 nLightKeyZ = GetPropertyValue( DFF_Prop_c3DKeyZ, 0 );
+ if ( nLightKeyX )
+ ScaleEmu( nLightKeyX );
+ else
+ nLightKeyX = 139;
+ if ( nLightKeyY )
+ ScaleEmu( nLightKeyY );
+ if ( nLightKeyZ )
+ ScaleEmu( nLightKeyZ );
+ else
+ nLightKeyZ = 1;
+ Vector3D aLightKey( (double)nLightKeyX, (double)nLightKeyY, (double)nLightKeyZ );
+
+ UINT32 nAmbient = GetPropertyValue( DFF_Prop_c3DAmbientIntensity, 16000 ) / 1000;
+ UINT32 nSpecular = GetPropertyValue( DFF_Prop_c3DSpecularAmt, 0 );
+ UINT32 nDiffuse = GetPropertyValue( DFF_Prop_c3DDiffuseAmt, 0 );
+ INT32 n3dRotate = GetPropertyValue( DFF_Prop_c3DYRotationAngle, 0 );
+ if ( n3dRotate )
+ pScene->NbcRotateY( (double)Fix16ToAngle( n3dRotate ) * nPi180 );
+ n3dRotate = GetPropertyValue( DFF_Prop_c3DXRotationAngle, 0 );
+ if ( n3dRotate )
+ pScene->NbcRotateX( (double)Fix16ToAngle( n3dRotate ) * nPi180 );
+ if ( IsProperty( DFF_Prop_c3DRenderMode ) )
+ {
+ MSO_3DRenderMode eRenderMode = (MSO_3DRenderMode)GetPropertyValue( DFF_Prop_c3DRenderMode, 0 );
+ if ( eRenderMode == mso_Wireframe )
+ {
+ aSet.Put( XLineStyleItem( XLINE_SOLID ) ); // Linien: Durchgehend
+ aSet.Put( XFillStyleItem ( XFILL_NONE ) ); // Flaeche: unsichtbar
+ pScene->NbcSetAttributes( aSet, FALSE );
+
+ // 3D: Doppelseitig
+ SdrObjListIter aIter( *pScene, IM_DEEPWITHGROUPS );
+ while ( aIter.IsMore() )
+ {
+ SdrObject* pSingleObj = aIter.Next();
+ if ( pSingleObj->ISA(E3dExtrudeObj ) )
+ {
+ E3dExtrudeObj* pSingleExtrude = (E3dExtrudeObj*)pSingleObj;
+ pSingleExtrude->SetDoubleSided( TRUE );
+ }
+ }
+ }
+ }
+
+ BOOL bUseBackSide = FALSE;
+ if ( IsProperty( DFF_Prop_c3DExtrudeBackward ) || IsProperty( DFF_Prop_c3DExtrudeForward ) )
+ {
+ nVal = GetPropertyValue( DFF_Prop_c3DExtrudeBackward, GetPropertyValue( DFF_Prop_c3DExtrudeForward, 0 ) );
+ ScaleEmu( nVal );
+ SdrObjListIter aIter( *pScene, IM_DEEPWITHGROUPS );
+ while( aIter.IsMore() )
+ {
+ SdrObject* pSingleObj = aIter.Next();
+ if ( pSingleObj->ISA( E3dExtrudeObj ) )
+ {
+ E3dExtrudeObj* pSingleExtrude = (E3dExtrudeObj*)pSingleObj;
+ if ( nVal != (long)pSingleExtrude->GetExtrudeDepth() )
+ {
+ if ( nVal == 338667 )
+ {
+ // MS unendlich
+ pSingleExtrude->SetExtrudeDepth( fDepth * 18.0 );
+ pSingleExtrude->SetExtrudeBackScale( 0.1 );
+ pSingleExtrude->SetExtrudePercentDiag( 0.01 );
+ Matrix4D aMirrorMat;
+ aMirrorMat.Scale( 1.0, -1.0, -1.0 );
+ pSingleExtrude->NbcSetTransform( pSingleExtrude->GetTransform() * aMirrorMat);
+ bUseBackSide = TRUE;
+ }
+ else
+ pSingleExtrude->SetExtrudeDepth( (double)nVal );
+ }
+ }
+ }
+ }
+
+ // Ausgleichsrotation
+ if( (INT32)aCamPos.X() != 0 && (INT32)aCamPos.Y() != 0 )
+ {
+ // Ausgleichsdrehung notwendig...
+ double fArcTan = atan2( rCamera.GetVUV().Y(), rCamera.GetVUV().X() );
+ fArcTan = ( nPi / 2.0 ) - fArcTan;
+ rCamera.SetBankAngle( fArcTan );
+ pScene->SetCamera( rCamera );
+ }
+ if ( (INT32)aCamPos.X() == 0 && (INT32)aCamPos.Y() == 0 )
+ {
+ // Ausgleichsrotation fuer plane Flaechen
+ pScene->NbcRotateX( 0.5 * nPi180 );
+ }
+
+ // Licht
+ aLightKey.Normalize();
+
+ // Beleuchtung umdrehen bei AutoText-Objekten
+ if ( bIsAutoText )
+ aLightKey = -aLightKey;
+
+ pScene->GetLightGroup().SetDirection( aLightKey );
+ nAmbient = ( nAmbient - 4 ) << 3;
+ Color aAmbientCol( (UINT8)nAmbient, (UINT8)nAmbient, (UINT8)nAmbient );
+ pScene->GetLightGroup().SetIntensity( aAmbientCol, Base3DMaterialAmbient );
+ pScene->GetLightGroup().SetGlobalAmbientLight( aAmbientCol );
+ if ( nSpecular )
+ { // 80% statt 100% (?)
+ Color aSpecularCol( 204, 204, 204 );
+ pScene->GetLightGroup().SetIntensity( aSpecularCol, Base3DMaterialSpecular );
+ }
+ if ( nDiffuse )
+ { // 43% von 80% (?)
+ Color aDiffuseCol( 45, 45, 45 );
+ pScene->GetLightGroup().SetIntensity( aDiffuseCol, Base3DMaterialDiffuse );
+ }
+
+ // Positionierung anpassen
+ // aBoundRect: 2D-Position des Ursprungsshapes
+ Rectangle aFrontPos;
+ Rectangle aNewSize;
+ Rectangle aOldSize;
+
+ // OldSize ermitteln. NICHT ueber pScene->GetSnapRect, dies liefert
+ // nur GetCamera().GetDeviceWindow() !!!
+ SdrObjListIter aIter( *pScene, IM_DEEPWITHGROUPS );
+ while ( aIter.IsMore() )
+ {
+ SdrObject* pSingleObj = aIter.Next();
+ if ( pSingleObj->ISA( E3dExtrudeObj ) )
+ {
+ E3dExtrudeObj* pSingleExtrude = (E3dExtrudeObj*)pSingleObj;
+ aOldSize.Union( pSingleExtrude->GetSnapRect() );
+ }
+ }
+
+ // Groesse der 2D-Bildschirmabbildung der Original-Frontpolygone berechnen
+ aIter.Reset();
+ while ( aIter.IsMore() )
+ {
+ SdrObject* pSingleObj = aIter.Next();
+ if ( pSingleObj->ISA( E3dExtrudeObj ) )
+ {
+ E3dExtrudeObj* pSingleExtrude = (E3dExtrudeObj*)pSingleObj;
+ double fFrontPlaneDepth = pSingleExtrude->GetExtrudeDepth();
+ if ( bUseBackSide )
+ fFrontPlaneDepth = 0.0;
+ Matrix4D aFullTransMat = pSingleExtrude->GetFullTransform();
+ pScene->GetCameraSet().SetObjectTrans( aFullTransMat );
+
+ const PolyPolygon3D& rSourcePolyPoly = pSingleExtrude->GetExtrudePolygon();
+ for ( UINT16 a = 0; a < rSourcePolyPoly.Count(); a++ )
+ {
+ const Polygon3D& rSourcePoly = rSourcePolyPoly[ a ];
+ for ( UINT16 b = 0; b < rSourcePoly.GetPointCount(); b++ )
+ {
+ Vector3D aPoint = rSourcePoly[ b ];
+ aPoint.Z() = fFrontPlaneDepth;
+ aPoint = pScene->GetCameraSet().ObjectToViewCoor( aPoint );
+ Point aPolyPoint( (long)( aPoint.X() + 0.5 ), (long)( aPoint.Y() + 0.5 ) );
+ aFrontPos.Union( Rectangle( aPolyPoint, aPolyPoint ) );
+ }
+ }
+ }
+ }
+ // in aFrontPos steht nun die 2D-Abbildung des Urspruenglichen Objektes
+ if ( aFrontPos.Left() )
+ aNewSize.Left() = ( aOldSize.Left() * aBoundRect.Left() ) / aFrontPos.Left();
+ if ( aFrontPos.Right() )
+ aNewSize.Right() = ( aOldSize.Right() * aBoundRect.Right() ) / aFrontPos.Right();
+ if ( aFrontPos.Top() )
+ aNewSize.Top() = ( aOldSize.Top() * aBoundRect.Top() ) / aFrontPos.Top();
+ if ( aFrontPos.Bottom() )
+ aNewSize.Bottom() = ( aOldSize.Bottom() * aBoundRect.Bottom() ) / aFrontPos.Bottom();
+
+ // UpperLeft uebertragen
+ pScene->NbcSetSnapRect( aNewSize );
+ pScene->SetModel( pSdrModel );
+ pScene->NbcSetAttributes( aSet, FALSE );
+ }
+ else
+ delete pScene; // Aufraeumen
+ return pRet;
+}
+
+SdrObject* SvxMSDffManager::ImportWordArt( SvStream& rStCtrl, SfxItemSet& rSet, Rectangle& rBoundRect ) const
+{
+ SdrObject* pRet = NULL;
+ String aObjectText;
+ String aFontName;
+ INT32 nAngle = mnFix16Angle;
+ BOOL bTextRotate = FALSE;
+
+ ((SvxMSDffManager*)this)->mnFix16Angle = 0; // we don't want to use this property in future
+ if ( SeekToContent( DFF_Prop_gtextUNICODE, rStCtrl ) )
+ MSDFFReadZString( rStCtrl, aObjectText, GetPropertyValue( DFF_Prop_gtextUNICODE ), TRUE );
+ if ( SeekToContent( DFF_Prop_gtextFont, rStCtrl ) )
+ MSDFFReadZString( rStCtrl, aFontName, GetPropertyValue( DFF_Prop_gtextFont ), TRUE );
+ if ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x2000 )
+ {
+ // Text ist senkrecht formatiert, Box Kippen
+ INT32 nHalfWidth = ( rBoundRect.GetWidth() + 1) >> 1;
+ INT32 nHalfHeight = ( rBoundRect.GetHeight() + 1) >> 1;
+ Point aTopLeft( rBoundRect.Left() + nHalfWidth - nHalfHeight,
+ rBoundRect.Top() + nHalfHeight - nHalfWidth);
+ Size aNewSize( rBoundRect.GetHeight(), rBoundRect.GetWidth() );
+ Rectangle aNewRect( aTopLeft, aNewSize );
+ rBoundRect = aNewRect;
+
+ String aSrcText( aObjectText );
+ aObjectText.Erase();
+ for( UINT16 a = 0; a < aSrcText.Len(); a++ )
+ {
+ aObjectText += aSrcText.GetChar( a );
+ aObjectText += '\n';
+ }
+ rSet.Put( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_CENTER ) );
+ bTextRotate = TRUE;
+ }
+ if ( aObjectText.Len() )
+ { // WordArt-Objekt Mit dem Text in aObjectText erzeugen
+ SdrObject* pNewObj = new SdrRectObj( OBJ_TEXT, rBoundRect );
+ if( pNewObj )
+ {
+ ((SdrRectObj*)pNewObj)->SetText( aObjectText );
+ SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
+ rSet.Put( SdrTextFitToSizeTypeItem( eFTS ) );
+ rSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ rSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
+ rSet.Put( SvxFontItem( FAMILY_DONTKNOW, aFontName, String() ) );
+ pNewObj->SetModel( pSdrModel );
+ pNewObj->NbcSetAttributes( rSet, FALSE );
+
+ pRet = pNewObj->ConvertToPolyObj( FALSE, FALSE );
+ if( !pRet )
+ pRet = pNewObj;
+ else
+ {
+ pRet->NbcSetSnapRect( rBoundRect );
+ delete pNewObj;
+ }
+ if( nAngle || bTextRotate )
+ {
+ if ( bTextRotate )
+ nAngle = NormAngle360( nAngle + 9000 );
+ if( nAngle )
+ {
+ double a = nAngle * nPi180;
+ pRet->NbcRotate( rBoundRect.Center(), nAngle, sin( a ), cos( a ) );
+ }
+ }
+ }
+ }
+ return pRet;
+}
+
+SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, Rectangle& aBoundRect, const DffObjData& rObjData ) const
+{
+ SdrObject* pRet = NULL;
+
+ Graphic aGraf;
+ String aFilename;
+
+ MSO_BlipFlags eFlags = (MSO_BlipFlags)GetPropertyValue( DFF_Prop_pibFlags, mso_blipflagDefault );
+ ULONG nBlipId = GetPropertyValue( DFF_Prop_pib, 0 );
+ BOOL bGrfRead = FALSE,
+ // Grafik verlinkt
+ bLinkGrf = 0 != ( eFlags & mso_blipflagLinkToFile );
+
+ if( SeekToContent( DFF_Prop_pibName, rSt ) )
+ MSDFFReadZString( rSt, aFilename, GetPropertyValue( DFF_Prop_pibName ), TRUE );
+
+ // UND, ODER folgendes:
+ if( !( eFlags & mso_blipflagDoNotSave ) ) // Grafik embedded
+ bGrfRead = GetBLIP( nBlipId, aGraf );
+
+ if ( bGrfRead )
+ { // impress is not able to handle crop attributes, so the graphic must be cropped finaly
+ if ( GetSvxMSDffSettings() & SVXMSDFF_SETTINGS_CROP_BITMAPS )
+ {
+ sal_uInt32 nCropTop = GetPropertyValue( DFF_Prop_cropFromTop, 0 );
+ sal_uInt32 nCropBottom = GetPropertyValue( DFF_Prop_cropFromBottom, 0 );
+ sal_uInt32 nCropLeft = GetPropertyValue( DFF_Prop_cropFromLeft, 0 );
+ sal_uInt32 nCropRight = GetPropertyValue( DFF_Prop_cropFromRight, 0 );
+
+ if( nCropTop || nCropBottom || nCropLeft || nCropRight )
+ { // Grafik wird gecroppt
+ double fFactor;
+ BitmapEx aCropBmp( aGraf.GetBitmapEx() );
+ Size aCropSize( aCropBmp.GetSizePixel() );
+ UINT32 nTop( 0 ), nBottom( aCropSize.Height() + 1 ), nLeft( 0 ), nRight( aCropSize.Width() + 1 );
+
+ if ( nCropTop )
+ {
+ fFactor = (double)nCropTop / 65536.0;
+ nTop += (UINT32)( ( (double)( aCropSize.Height() + 1 ) * fFactor ) + 0.5 );
+ }
+ if ( nCropBottom )
+ {
+ fFactor = (double)nCropBottom / 65536.0;
+ nBottom -= (UINT32)( ( (double)( aCropSize.Height() + 1 ) * fFactor ) + 0.5 );
+ }
+ if ( nCropLeft )
+ {
+ fFactor = (double)nCropLeft / 65536.0;
+ nLeft += (UINT32)( ( (double)( aCropSize.Width() + 1 ) * fFactor ) + 0.5 );
+ }
+ if ( nCropRight )
+ {
+ fFactor = (double)nCropRight / 65536.0;
+ nRight -= (UINT32)( ( (double)( aCropSize.Width() + 1 ) * fFactor ) + 0.5 );
+ }
+ Rectangle aCropRect( nLeft, nTop, nRight, nBottom );
+ aCropBmp.Crop( aCropRect );
+ aGraf = aCropBmp;
+ }
+ }
+ if ( IsProperty( DFF_Prop_pictureTransparent ) )
+ {
+ UINT32 nTransColor = GetPropertyValue( DFF_Prop_pictureTransparent, 0 );
+
+ if ( aGraf.GetType() == GRAPHIC_BITMAP )
+ {
+ BitmapEx aBitmapEx( aGraf.GetBitmapEx() );
+ Bitmap aBitmap( aBitmapEx.GetBitmap() );
+ Bitmap aMask( aBitmap.CreateMask( MSO_CLR_ToColor( nTransColor, DFF_Prop_pictureTransparent ), 8 ) );
+ if ( aBitmapEx.IsTransparent() )
+ aMask.CombineSimple( aBitmapEx.GetMask(), BMP_COMBINE_OR );
+ aGraf = BitmapEx( aBitmap, aMask );
+ }
+ }
+
+ sal_Int32 nContrast = GetPropertyValue( DFF_Prop_pictureContrast, 65536 );
+ if ( nContrast <= 0x10000 )
+ nContrast = ( nContrast / 656 ) - 99;
+ else if ( nContrast < 0x14835 )
+ nContrast = ( nContrast - 0x10000 ) / 800;
+ else if ( nContrast < 0x1b961 )
+ nContrast = ( nContrast - 0x14835 ) / 1350 + 21;
+ else
+ {
+ nContrast = nContrast / 5000 + 40;
+ if ( nContrast > 100 )
+ nContrast = 100;
+ }
+
+ sal_Int16 nBrightness = (sal_Int16)( (sal_Int32)GetPropertyValue( DFF_Prop_pictureBrightness, 0 ) / 327 );
+ sal_Int32 nGamma = GetPropertyValue( DFF_Prop_pictureGamma, 0x10000 );
+ GraphicDrawMode eDrawMode = GRAPHICDRAWMODE_STANDARD;
+ switch ( GetPropertyValue( DFF_Prop_pictureActive ) & 6 )
+ {
+ case 4 : eDrawMode = GRAPHICDRAWMODE_GREYS; break;
+ case 6 : eDrawMode = GRAPHICDRAWMODE_MONO; break;
+ case 0 :
+ {
+ if ( ( GetPropertyValue( DFF_Prop_pictureContrast, 0 ) == 0x4ccd )
+ && ( GetPropertyValue( DFF_Prop_pictureBrightness, 0 ) == 0x599a ) )
+ {
+ nContrast = 0;
+ nBrightness = 0;
+ eDrawMode = GRAPHICDRAWMODE_WATERMARK;
+ };
+ }
+ break;
+ }
+
+ if ( nContrast || nBrightness || ( nGamma != 0x10000 ) || ( eDrawMode != GRAPHICDRAWMODE_STANDARD ) )
+ {
+ // currently the luminance and contrast items are available in impress only
+ if ( ( GetSvxMSDffSettings() & SVXMSDFF_SETTINGS_IMPORT_PPT )
+ && ( ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 ) )
+ {
+ if ( nBrightness )
+ rSet.Put( SdrGrafLuminanceItem( nBrightness ) );
+ if ( nContrast )
+ rSet.Put( SdrGrafContrastItem( (sal_Int16)nContrast ) );
+ if ( nGamma != 0x10000 )
+ rSet.Put( SdrGrafGamma100Item( nGamma / 655 ) );
+ if ( eDrawMode != GRAPHICDRAWMODE_STANDARD )
+ rSet.Put( SdrGrafModeItem( eDrawMode ) );
+ }
+ else
+ {
+ if ( eDrawMode == GRAPHICDRAWMODE_WATERMARK )
+ {
+ nContrast = 60;
+ nBrightness = 70;
+ eDrawMode = GRAPHICDRAWMODE_STANDARD;
+ }
+ switch ( aGraf.GetType() )
+ {
+ case GRAPHIC_BITMAP :
+ {
+ BitmapEx aBitmapEx( aGraf.GetBitmapEx() );
+ if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
+ aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, FALSE );
+ if ( eDrawMode == GRAPHICDRAWMODE_GREYS )
+ aBitmapEx.Convert( BMP_CONVERSION_8BIT_GREYS );
+ else if ( eDrawMode == GRAPHICDRAWMODE_MONO )
+ aBitmapEx.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ aGraf = aBitmapEx;
+
+ }
+ break;
+
+ case GRAPHIC_GDIMETAFILE :
+ {
+ GDIMetaFile aGdiMetaFile( aGraf.GetGDIMetaFile() );
+ if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
+ aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, FALSE );
+ if ( eDrawMode == GRAPHICDRAWMODE_GREYS )
+ aGdiMetaFile.Convert( MTF_CONVERSION_8BIT_GREYS );
+ else if ( eDrawMode == GRAPHICDRAWMODE_MONO )
+ aGdiMetaFile.Convert( MTF_CONVERSION_1BIT_THRESHOLD );
+ aGraf = aGdiMetaFile;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ // sollte es ein OLE-Object sein?
+ if( bGrfRead && !bLinkGrf && IsProperty( DFF_Prop_pictureId ) )
+ pRet = ImportOLE( GetPropertyValue( DFF_Prop_pictureId ), aGraf, aBoundRect );
+ if( !pRet )
+ {
+ pRet = new SdrGrafObj;
+ if( bGrfRead )
+ ((SdrGrafObj*)pRet)->SetGraphic( aGraf );
+#if SUPD>601
+ if( bLinkGrf )
+ ((SdrGrafObj*)pRet)->SetFileName( ::URIHelper::SmartRelToAbs( aFilename, FALSE,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS ) );
+#endif
+ }
+ if ( !pRet->GetName().Len() ) // SJ 22.02.00 : PPT OLE IMPORT:
+ { // name is already set in ImportOLE !!
+ // JP 01.12.99: SetName before SetModel - because in the other order the Bug 70098 is active
+ if ( ( eFlags & mso_blipflagType ) != mso_blipflagComment )
+ {
+ INetURLObject aURL;
+ aURL.SetSmartURL( aFilename );
+ pRet->SetName( aURL.getBase() );
+ }
+ else
+ pRet->SetName( aFilename );
+ }
+ pRet->SetModel( pSdrModel ); // fuer GraphicLink erforderlich
+ pRet->SetLogicRect( aBoundRect );
+ return pRet;
+}
+
+// PptSlidePersistEntry& rPersistEntry, SdPage* pPage
+SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, void* pClientData,
+ const Rectangle* pRect,
+ int nCalledByGroup )
+{
+ SdrObject* pRet = NULL;
+ ULONG nFPosMerk = rSt.Tell(); // FilePos merken fuer spaetere Restauration
+ DffRecordHeader aObjHd;
+ rSt >> aObjHd;
+ ULONG nFPosMerk1 = rSt.Tell();
+ ULONG nObjRecEnd = aObjHd.GetRecEndFilePos();
+ Rectangle aBoundRect;
+ if ( pRect )
+ aBoundRect = *pRect;
+ if ( aObjHd.nRecType == DFF_msofbtSpgrContainer )
+ {
+ mnFix16Angle = 0;
+ FASTBOOL b1st = TRUE;
+ INT32 nGroupRotateAngle = 0;
+ INT32 nSpFlags = 0;
+ Rectangle aGroupBound( aBoundRect );
+ while ( rSt.GetError() == 0 && rSt.Tell() < nObjRecEnd )
+ {
+ DffRecordHeader aRecHd;
+ rSt >> aRecHd;
+ if ( aObjHd.nRecType == DFF_msofbtSpContainer ||
+ aObjHd.nRecType == DFF_msofbtSpgrContainer )
+ {
+ aRecHd.SeekToBegOfRecord( rSt );
+ SdrObject* pTmp = ImportObj( rSt, pClientData, &aGroupBound, nCalledByGroup+1);
+ if( b1st )
+ { // Gruppenattribute, ...
+ b1st = FALSE;
+ if ( !pTmp )
+ break;
+ pRet = pTmp;
+ aGroupBound = pRet->GetSnapRect();
+ nGroupRotateAngle = mnFix16Angle;
+ nSpFlags = nGroupShapeFlags;
+ }
+ else if ( pTmp )
+ ((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pTmp );
+ }
+ aRecHd.SeekToEndOfRecord( rSt );
+ }
+ if( !aGroupBound.IsEmpty() )
+ {
+ pRet->NbcSetSnapRect( aGroupBound );
+ if ( nGroupRotateAngle )
+ {
+ double a = nGroupRotateAngle * nPi180;
+ pRet->NbcRotate( aGroupBound.Center(), nGroupRotateAngle, sin( a ), cos( a ) );
+ }
+ if ( nSpFlags & SP_FFLIPV ) // Vertikal gespiegelt?
+ { // BoundRect in aBoundRect
+ Point aLeft( aGroupBound.Left(), ( aGroupBound.Top() + aGroupBound.Bottom() ) >> 1 );
+ Point aRight( aLeft.X() + 1000, aLeft.Y() );
+ pRet->NbcMirror( aLeft, aRight );
+ }
+ if ( nSpFlags & SP_FFLIPH ) // Horizontal gespiegelt?
+ { // BoundRect in aBoundRect
+ Point aTop( ( aGroupBound.Left() + aGroupBound.Right() ) >> 1, aGroupBound.Top() );
+ Point aBottom( aTop.X(), aTop.Y() + 1000 );
+ pRet->NbcMirror( aTop, aBottom );
+ }
+ }
+ }
+ else if ( aObjHd.nRecType == DFF_msofbtSpContainer )
+ {
+ DffObjData aObjData( aObjHd, aBoundRect, nCalledByGroup, nFPosMerk );
+ aObjHd.SeekToBegOfRecord( rSt );
+ maShapeRecords.Consume( rSt, FALSE );
+ aObjData.bShapeType = maShapeRecords.SeekToContent( rSt, DFF_msofbtSp, SEEK_FROM_BEGINNING );
+ if ( aObjData.bShapeType )
+ {
+ rSt >> aObjData.nShapeId
+ >> aObjData.nSpFlags;
+ aObjData.eShapeType = (MSO_SPT)maShapeRecords.Current()->nRecInstance;
+ }
+ else
+ {
+ aObjData.nShapeId = 0;
+ aObjData.nSpFlags = 0;
+ aObjData.eShapeType = mso_sptNil;
+ }
+ aObjData.bOpt = maShapeRecords.SeekToContent( rSt, DFF_msofbtOPT, SEEK_FROM_CURRENT_AND_RESTART );
+ if ( aObjData.bOpt )
+ {
+ maShapeRecords.Current()->SeekToBegOfRecord( rSt );
+#ifdef DBG_AUTOSHAPE
+ ReadPropSet( rSt, pClientData, (UINT32)aObjData.eShapeType );
+#else
+ ReadPropSet( rSt, pClientData );
+#endif
+ }
+ else
+ {
+ InitializePropSet(); // get the default PropSet
+ ( (DffPropertyReader*) this )->mnFix16Angle = 0;
+ }
+
+ aObjData.bChildAnchor = maShapeRecords.SeekToContent( rSt, DFF_msofbtChildAnchor, SEEK_FROM_CURRENT_AND_RESTART );
+ if ( aObjData.bChildAnchor )
+ {
+ INT32 l, o, r, u;
+ rSt >> l >> o >> r >> u;
+ Scale( l );
+ Scale( o );
+ Scale( r );
+ Scale( u );
+ aObjData.aChildAnchor = Rectangle( l, o, r, u );
+ }
+
+ aObjData.bClientAnchor = maShapeRecords.SeekToContent( rSt, DFF_msofbtClientAnchor, SEEK_FROM_CURRENT_AND_RESTART );
+ if ( aObjData.bClientAnchor )
+ ProcessClientAnchor2( rSt, *maShapeRecords.Current(), pClientData, aObjData );
+
+ if ( aObjData.bChildAnchor )
+ aBoundRect = aObjData.aChildAnchor;
+
+ if ( aObjData.nSpFlags & SP_FBACKGROUND )
+ aBoundRect = Rectangle( Point(), Size( 1, 1 ) );
+
+ Rectangle aTextRect( aBoundRect );
+ if ( !aBoundRect.IsEmpty() )
+ { // Rotation auf BoundingBox anwenden, BEVOR ien Objekt generiert wurde
+ rSt.Seek( nFPosMerk );
+ if( mnFix16Angle )
+ {
+ long nAngle = mnFix16Angle;
+ if ( ( nAngle > 4500 && nAngle <= 13500 ) || ( nAngle > 22500 && nAngle <= 31500 ) )
+ {
+ INT32 nHalfWidth = ( aBoundRect.GetWidth() + 1 ) >> 1;
+ INT32 nHalfHeight = ( aBoundRect.GetHeight() + 1 ) >> 1;
+ Point aTopLeft( aBoundRect.Left() + nHalfWidth - nHalfHeight,
+ aBoundRect.Top() + nHalfHeight - nHalfWidth );
+ Size aNewSize( aBoundRect.GetHeight(), aBoundRect.GetWidth() );
+ Rectangle aNewRect( aTopLeft, aNewSize );
+ aBoundRect = aNewRect;
+ }
+ }
+ FASTBOOL bGraphic = IsProperty( DFF_Prop_pib ) ||
+ IsProperty( DFF_Prop_pibName ) ||
+ IsProperty( DFF_Prop_pibFlags );
+
+ if ( aObjData.nSpFlags & SP_FGROUP )
+ {
+ pRet = new SdrObjGroup;
+ pRet->NbcSetLogicRect( aBoundRect );
+ nGroupShapeFlags = aObjData.nSpFlags; // #73013#
+ }
+ else if ( ( aObjData.eShapeType != mso_sptNil ) || IsProperty( DFF_Prop_pVertices ) || bGraphic )
+ {
+ UINT32 nSpecialGroupSettings = 0;
+ SfxItemSet aSet( pSdrModel->GetItemPool() );
+
+ sal_Bool bIsConnector = ( ( aObjData.eShapeType >= mso_sptStraightConnector1 ) && ( aObjData.eShapeType <= mso_sptCurvedConnector5 ) );
+ sal_Bool bIsAutoShape = FALSE;
+
+ if ( bGraphic )
+ {
+ pRet = ImportGraphic( rSt, aSet, aBoundRect, aObjData );
+ if ( pRet )
+ {
+ if ( !IsHardAttribute( DFF_Prop_fFilled ) ) // the default for graphic objects is: not filled
+ {
+ UINT32 nOldProp = GetPropertyValue( DFF_Prop_fNoFillHitTest );
+ if ( nOldProp & 0x10 )
+ SetPropertyValue( DFF_Prop_fNoFillHitTest, nOldProp &~0x10 );
+ }
+ if ( !IsHardAttribute( DFF_Prop_fLine ) ) // the default for graphic objects is: no line
+ {
+ UINT32 nOldProp = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
+ if ( nOldProp & 8 )
+ SetPropertyValue( DFF_Prop_fNoLineDrawDash, nOldProp &~8 );
+ }
+ if ( GetSvxMSDffSettings() & ( SVXMSDFF_SETTINGS_IMPORT_PPT | SVXMSDFF_SETTINGS_IMPORT_EXCEL ) )
+ { // impress does not support line propertys on graphic objects
+ BOOL bFilled = ( GetPropertyValue( DFF_Prop_fNoFillHitTest ) & 16 ) != 0;
+ BOOL bLine = ( GetPropertyValue( DFF_Prop_fNoLineDrawDash ) & 8 ) != 0;
+ if ( bLine || bFilled )
+ {
+ SdrObject* pRect;
+ SdrObject* pGroup = new SdrObjGroup;
+ if ( pGroup )
+ {
+ if ( bFilled )
+ {
+ pRect = new SdrRectObj( aBoundRect );
+ if ( pRect )
+ {
+ pGroup->GetSubList()->NbcInsertObject( pRect );
+ nSpecialGroupSettings = 2;
+ }
+ }
+ pGroup->GetSubList()->NbcInsertObject( pRet );
+ if ( bLine )
+ {
+ pRect = new SdrRectObj( aBoundRect );
+ if ( pRect )
+ pGroup->GetSubList()->NbcInsertObject( pRect );
+ }
+ pRet = pGroup;
+ }
+ }
+ }
+ }
+ aObjData.nSpFlags &=~ ( SP_FFLIPH | SP_FFLIPV ); // #68396#
+ }
+ else
+ {
+ SvxMSDffAutoShape aAutoShape( *this, rSt, aObjData, aBoundRect, mnFix16Angle );
+ if ( !aAutoShape.IsEmpty() )
+ {
+ ApplyAttributes( rSt, aSet, NULL );
+ pRet = aAutoShape.GetObject( pSdrModel, aSet, TRUE );
+ aTextRect = aAutoShape.GetTextRect();
+ bIsAutoShape = TRUE;
+ }
+ else if ( aObjData.eShapeType == mso_sptTextBox )
+ {
+ if ( ( GetPropertyValue( DFF_Prop_fNoLineDrawDash ) & 8 )
+ || ( GetPropertyValue( DFF_Prop_fNoFillHitTest ) & 0x10 ) )
+ pRet = new SdrRectObj( OBJ_TEXT, aBoundRect );
+ }
+ else if (
+ mso_sptWedgeRectCallout == aObjData.eShapeType ||
+ mso_sptWedgeRRectCallout == aObjData.eShapeType ||
+ mso_sptWedgeEllipseCallout == aObjData.eShapeType ||
+ mso_sptBalloon == aObjData.eShapeType ||
+ mso_sptCloudCallout == aObjData.eShapeType )
+ {
+ // Balloon mappen
+ if( mso_sptBalloon == aObjData.eShapeType )
+ aObjData.eShapeType = mso_sptWedgeRRectCallout;
+
+ pRet = GetAutoForm( aObjData.eShapeType );
+ if ( pRet )
+ pRet->NbcSetSnapRect( aBoundRect ); // Groesse setzen
+ }
+ else if ( ( ( aObjData.eShapeType >= mso_sptCallout1 ) && ( aObjData.eShapeType <= mso_sptAccentBorderCallout3 ) )
+ || ( aObjData.eShapeType == mso_sptCallout90 )
+ || ( aObjData.eShapeType == mso_sptAccentCallout90 )
+ || ( aObjData.eShapeType == mso_sptBorderCallout90 )
+ || ( aObjData.eShapeType == mso_sptAccentBorderCallout90 ) )
+ {
+ pRet = new SdrCaptionObj( aBoundRect );
+ INT32 nAdjust0 = GetPropertyValue( DFF_Prop_adjustValue, 0 );
+ INT32 nAdjust1 = GetPropertyValue( DFF_Prop_adjust2Value, 0 );
+ if( nAdjust0 | nAdjust1 )
+ { // AdjustValues anwenden, nur welche ?!?
+ nAdjust0 = ( nAdjust0 * 100 ) / 850;
+ nAdjust1 = ( nAdjust1 * 100 ) / 1275;
+ Point aTailPos( nAdjust0 + aBoundRect.Left(), nAdjust1 + aBoundRect.Top() );
+ ((SdrCaptionObj*)pRet)->NbcSetTailPos( aTailPos );
+ }
+ }
+ else if( ( aObjData.eShapeType >= mso_sptTextPlainText ) && ( aObjData.eShapeType <= mso_sptTextCanDown ) ) // WordArt
+ {
+ aObjData.bIsAutoText = TRUE;
+ pRet = ImportWordArt( rSt, aSet, aBoundRect );
+ }
+ else if ( aObjData.eShapeType == mso_sptLine )
+ {
+ pRet = new SdrPathObj( aBoundRect.TopLeft(), aBoundRect.BottomRight() );
+ }
+ else if( bIsConnector )
+ {
+ // Konnektoren
+ MSO_ConnectorStyle eConnectorStyle = (MSO_ConnectorStyle)GetPropertyValue( DFF_Prop_cxstyle, mso_cxstyleStraight );
+
+ pRet = new SdrEdgeObj();
+ if( pRet )
+ {
+ pRet->SetLogicRect(aBoundRect);
+
+ ((SdrEdgeObj*)pRet)->ConnectToNode(TRUE, NULL);
+ ((SdrEdgeObj*)pRet)->ConnectToNode(FALSE, NULL);
+
+ Point aPoint1( aBoundRect.TopLeft() );
+ Point aPoint2( aBoundRect.BottomRight() );
+
+ // Rotationen beachten
+ if ( mnFix16Angle )
+ {
+ double a = mnFix16Angle * nPi180;
+ Point aCenter( aBoundRect.Center() );
+ double ss = sin(a);
+ double cc = cos(a);
+
+ RotatePoint(aPoint1, aCenter, ss, cc);
+ RotatePoint(aPoint2, aCenter, ss, cc);
+ }
+
+ // Linie innerhalb des Bereiches zurechtdrehen/spiegeln
+ if ( aObjData.nSpFlags & SP_FFLIPH )
+ {
+ INT32 n = aPoint1.X();
+ aPoint1.X() = aPoint2.X();
+ aPoint2.X() = n;
+ }
+ if ( aObjData.nSpFlags & SP_FFLIPV )
+ {
+ INT32 n = aPoint1.Y();
+ aPoint1.Y() = aPoint2.Y();
+ aPoint2.Y() = n;
+ }
+ aObjData.nSpFlags &= ~( SP_FFLIPV | SP_FFLIPH );
+
+ pRet->NbcSetPoint(aPoint1, 0); // Startpunkt
+ pRet->NbcSetPoint(aPoint2, 1); // Endpunkt
+
+ switch( eConnectorStyle )
+ {
+ case mso_cxstyleBent:
+ aSet.Put( SdrEdgeKindItem( SDREDGE_ORTHOLINES ) );
+ break;
+ case mso_cxstyleCurved:
+ aSet.Put( SdrEdgeKindItem( SDREDGE_BEZIER ) );
+ break;
+ default: // mso_cxstyleStraight || mso_cxstyleNone
+ aSet.Put( SdrEdgeKindItem( SDREDGE_ONELINE ) );
+ break;
+ }
+ }
+ }
+ else if ( ( (int)aObjData.eShapeType > (int)mso_sptRectangle ) && ( (int)aObjData.eShapeType < (int)mso_sptTextBox ) )
+ {
+ pRet = GetAutoForm( aObjData.eShapeType );
+ if ( pRet )
+ pRet->NbcSetSnapRect( aBoundRect ); // Groesse setzen
+ }
+ }
+ if ( pRet )
+ {
+ if ( !bIsAutoShape )
+ {
+ ApplyAttributes( rSt, aSet, pRet );
+ if ( !GetPropertyValue( DFF_Prop_gtextSize, 0 ) )
+ aSet.Put( SvxFontHeightItem( ScalePt( 24 << 16 ) ) );
+ pRet->SetModel( pSdrModel );
+ pRet->NbcSetAttributes( aSet, FALSE );
+ // Rotieren
+ if( mnFix16Angle && !bIsConnector )
+ {
+ double a = mnFix16Angle * nPi180;
+ pRet->NbcRotate( aBoundRect.Center(), mnFix16Angle, sin( a ), cos( a ) );
+ }
+ }
+ // FillStyle != XFILL_NONE und nicht geschlossenes Polygon-Objekt?
+ if( pRet->ISA( SdrPathObj ) )
+ {
+ XFillStyle eFillStyle = ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem );
+ if( eFillStyle != XFILL_NONE )
+ {
+ // Das Polygon des Objektes muss geschlossen werden
+ if(!((SdrPathObj*)pRet)->IsClosed())
+ ((SdrPathObj*)pRet)->ToggleClosed(0);
+ }
+ }
+ // Handelt es sich um 3D?
+ if( GetPropertyValue( DFF_Prop_fc3DLightFace ) & 8 )
+ pRet = Import3DObject( pRet, aSet, aBoundRect, aObjData.bIsAutoText );
+ }
+ if ( pRet )
+ {
+ if ( nSpecialGroupSettings )
+ {
+ SdrObjList* pObjectList = pObjectList = pRet->GetSubList();
+ if ( pObjectList )
+ {
+ INT32 nCount = pObjectList->GetObjCount();
+ if ( nSpecialGroupSettings == 2 )
+ {
+ // a graphic was imported into impress, the fill attribute has
+ // to be set on the first object only
+ aSet.Put( XFillStyleItem( XFILL_NONE ) );
+ for ( INT32 i = nCount; --i > 0; )
+ {
+ SdrObject* pObj = pObjectList->GetObj( i );
+ if ( pObj )
+ pObj->NbcSetAttributes( aSet, FALSE );
+ }
+ }
+ }
+ }
+ // Horizontal gespiegelt?
+ if ( aObjData.nSpFlags & SP_FFLIPH )
+ {
+ Rectangle aBoundRect( pRet->GetSnapRect() );
+ Point aTop( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() );
+ Point aBottom( aTop.X(), aTop.Y() + 1000 );
+ pRet->NbcMirror( aTop, aBottom );
+ }
+ // Vertikal gespiegelt?
+ if ( aObjData.nSpFlags & SP_FFLIPV )
+ {
+ Rectangle aBoundRect( pRet->GetSnapRect() );
+ Point aLeft( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 );
+ Point aRight( aLeft.X() + 1000, aLeft.Y() );
+ pRet->NbcMirror( aLeft, aRight );
+ }
+ }
+ }
+ }
+ pRet =
+ ProcessObj( rSt, aObjData, pClientData, aTextRect, pRet);
+ }
+ rSt.Seek( nFPosMerk ); // FilePos restaurieren
+ return pRet;
+}
+
+
+SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
+ DffObjData& rObjData,
+ void* pData,
+ Rectangle& rTextRect,
+ SdrObject* pObj
+ )
+{
+ if( !rTextRect.IsEmpty() )
+ {
+ SvxMSDffImportData& rImportData = *(SvxMSDffImportData*)pData;
+ SvxMSDffImportRec* pImpRec = new SvxMSDffImportRec;
+ SvxMSDffImportRec* pTextImpRec = pImpRec;
+
+ // fill Import Record with data
+ pImpRec->nShapeId = rObjData.nShapeId;
+ pImpRec->eShapeType = rObjData.eShapeType;
+
+ MSO_WrapMode eWrapMode( (MSO_WrapMode)GetPropertyValue(
+ DFF_Prop_WrapText,
+ mso_wrapSquare ) );
+ rObjData.bClientAnchor = maShapeRecords.SeekToContent( rSt,
+ DFF_msofbtClientAnchor,
+ SEEK_FROM_CURRENT_AND_RESTART );
+ if( rObjData.bClientAnchor )
+ ProcessClientAnchor( rSt,
+ maShapeRecords.Current()->nRecLen,
+ pImpRec->pClientAnchorBuffer, pImpRec->nClientAnchorLen );
+
+ rObjData.bClientData = maShapeRecords.SeekToContent( rSt,
+ DFF_msofbtClientData,
+ SEEK_FROM_CURRENT_AND_RESTART );
+ if( rObjData.bClientData )
+ ProcessClientData( rSt,
+ maShapeRecords.Current()->nRecLen,
+ pImpRec->pClientDataBuffer, pImpRec->nClientDataLen );
+
+
+ // process user (== Winword) defined parameters in 0xF122 record
+ if( maShapeRecords.SeekToContent( rSt,
+ DFF_msofbtUDefProp,
+ SEEK_FROM_CURRENT_AND_RESTART )
+ && maShapeRecords.Current()->nRecLen )
+ {
+ UINT32 nBytesLeft = maShapeRecords.Current()->nRecLen;
+ UINT32 nLongDummy;
+ UINT32* pUDData;
+ UINT16 nPID;
+ while( 5 < nBytesLeft )
+ {
+ if( !ReadUINT16(rSt, nPID) )
+ break;
+ switch( nPID )
+ {
+ case 0x038F: pUDData = &pImpRec->nXAlign; break;
+ case 0x0390: pUDData = &pImpRec->nXRelTo; break;
+ case 0x0391: pUDData = &pImpRec->nYAlign; break;
+ case 0x0392: pUDData = &pImpRec->nYRelTo; break;
+ default: pUDData = &nLongDummy;
+ }
+ if( !ReadUINT32(rSt, *pUDData) )
+ break;
+ pImpRec->bHasUDefProp = TRUE;
+ nBytesLeft -= 6;
+ }
+ }
+
+
+ // Textrahmen, auch Title oder Outline
+ SdrObject* pOrgObj = pObj;
+ SdrRectObj* pTextObj = 0;
+ UINT32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
+ if( nTextId )
+ {
+ SfxItemSet aSet( pSdrModel->GetItemPool() );
+
+ // Distance of Textbox to it's surrounding Autoshape
+ INT32 nTextLeft =GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
+ INT32 nTextRight =GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
+ INT32 nTextTop =GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
+ INT32 nTextBottom=GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
+
+ ScaleEmu( nTextLeft );
+ ScaleEmu( nTextRight );
+ ScaleEmu( nTextTop );
+ ScaleEmu( nTextBottom );
+
+ // Die vertikalen Absatzeinrueckungen sind im BoundRect mit drin, hier rausrechnen
+ rTextRect.Bottom() -= nTextTop + nTextBottom;
+
+ INT32 nTextRotationAngle = 0;
+ if ( IsProperty( DFF_Prop_txflTextFlow ) )
+ {
+ MSO_TextFlow eTextFlow = (MSO_TextFlow)( GetPropertyValue( DFF_Prop_txflTextFlow ) & 0xFFFF );
+ switch( eTextFlow )
+ {
+ case mso_txflBtoT : // Bottom to Top non-@, unten -> oben
+ nTextRotationAngle = 9000;
+ break;
+ case mso_txflTtoBA : /* #68110# */ // Top to Bottom @-font, oben -> unten
+ case mso_txflTtoBN : // Top to Bottom non-@, oben -> unten
+ case mso_txflVertN : // Vertical, non-@, oben -> unten
+ nTextRotationAngle = 27000;
+ break;
+ case mso_txflHorzN : // Horizontal non-@, normal
+ case mso_txflHorzA : // Horizontal @-font, normal
+ default :
+ nTextRotationAngle = 0;
+ break;
+ }
+ if ( nTextRotationAngle )
+ {
+ if ( rObjData.nSpFlags & SP_FFLIPV )
+ {
+ if ( nTextRotationAngle == 9000 )
+ nTextRotationAngle = 27000;
+ else if ( nTextRotationAngle == 27000 )
+ nTextRotationAngle = 9000;
+ }
+ Point nCenter( rTextRect.Center() );
+ long nDX = rTextRect.Right() - rTextRect.Left();
+ long nDY = rTextRect.Bottom() - rTextRect.Top();
+ rTextRect.Left() = nCenter.X() - nDY/2;
+ rTextRect.Top() = nCenter.Y() - nDX/2;
+ rTextRect.Right() = rTextRect.Left() + nDY;
+ rTextRect.Bottom() = rTextRect.Top() + nDX;
+ }
+ }
+
+ FASTBOOL bTextFrame = ( ( pImpRec->eShapeType
+ == mso_sptTextSimple )
+ || ( pImpRec->eShapeType
+ == mso_sptTextBox )
+ || ( ( ( pImpRec->eShapeType
+ == mso_sptRectangle )
+ || ( pImpRec->eShapeType
+ == mso_sptRoundRectangle )
+ )
+ && ( eWrapMode == mso_wrapSquare )
+ && ShapeHasText(pImpRec->nShapeId,
+ rObjData.nOldFilePos)
+ ) );
+
+ if( bTextFrame && pObj )
+ pTextObj = PTR_CAST(SdrRectObj, pObj);
+ if( !pTextObj )
+ pTextObj = new SdrRectObj( OBJ_TEXT, rTextRect );
+
+ if( pTextObj != pObj )
+ pTextImpRec = new SvxMSDffImportRec( *pImpRec );
+
+ // Nur falls es eine einfache Textbox ist, darf der Writer
+ // das Objekt durch einen Rahmen ersetzen, ansonsten
+ if( bTextFrame )
+ {
+ SvxMSDffShapeInfo aTmpRec( 0, pImpRec->nShapeId );
+ aTmpRec.bSortByShapeId = TRUE;
+
+ USHORT nFound;
+ if( pShapeInfos->Seek_Entry( &aTmpRec, &nFound ) )
+ {
+ SvxMSDffShapeInfo& rInfo = *pShapeInfos->GetObject(nFound);
+ pTextImpRec->bReplaceByFly = rInfo.bReplaceByFly;
+ pTextImpRec->bLastBoxInChain = rInfo.bLastBoxInChain;
+ }
+ }
+
+ if( !pObj )
+ ApplyAttributes( rSt, aSet, pTextObj );
+
+ if ( nTextRotationAngle )
+ {
+ double a = nTextRotationAngle * nPi180;
+ pTextObj->NbcRotate( rTextRect.Center(), nTextRotationAngle, sin( a ), cos( a ) );
+ }
+
+ switch ( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) )
+ {
+ case mso_wrapNone :
+ {
+ if ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) // be sure this is FitShapeToText
+ aSet.Put( SdrTextAutoGrowWidthItem( TRUE ) );
+ }
+ break;
+
+ case mso_wrapByPoints :
+ aSet.Put( SdrTextContourFrameItem( TRUE ) );
+ break;
+ }
+
+ // Abstaende an den Raendern der Textbox setzen
+ aSet.Put( SdrTextLeftDistItem( nTextLeft ) );
+ aSet.Put( SdrTextRightDistItem( nTextRight ) );
+ aSet.Put( SdrTextUpperDistItem( nTextTop ) );
+ aSet.Put( SdrTextLowerDistItem( nTextBottom ) );
+ pTextImpRec->nDxTextLeft = nTextLeft;
+ pTextImpRec->nDyTextTop = nTextTop;
+ pTextImpRec->nDxTextRight = nTextRight;
+ pTextImpRec->nDyTextBottom = nTextBottom;
+
+ // Textverankerung lesen
+ if ( IsProperty( DFF_Prop_anchorText ) )
+ {
+ MSO_Anchor eTextAnchor = (MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText );
+
+ SdrTextVertAdjust eTVA = SDRTEXTVERTADJUST_CENTER;
+ BOOL bTVASet(FALSE);
+ SdrTextHorzAdjust eTHA = SDRTEXTHORZADJUST_CENTER;
+ BOOL bTHASet(FALSE);
+
+ switch( eTextAnchor )
+ {
+ case mso_anchorTop:
+ {
+ eTVA = SDRTEXTVERTADJUST_TOP;
+ bTVASet = TRUE;
+ }
+ break;
+ case mso_anchorTopCentered:
+ {
+ eTVA = SDRTEXTVERTADJUST_TOP;
+ bTVASet = TRUE;
+ bTHASet = TRUE;
+ }
+ break;
+
+ case mso_anchorMiddle:
+ bTVASet = TRUE;
+ break;
+ case mso_anchorMiddleCentered:
+ {
+ bTVASet = TRUE;
+ bTHASet = TRUE;
+ }
+ break;
+ case mso_anchorBottom:
+ {
+ eTVA = SDRTEXTVERTADJUST_BOTTOM;
+ bTVASet = TRUE;
+ }
+ break;
+ case mso_anchorBottomCentered:
+ {
+ eTVA = SDRTEXTVERTADJUST_BOTTOM;
+ bTVASet = TRUE;
+ bTHASet = TRUE;
+ }
+ break;
+ /*
+ case mso_anchorTopBaseline:
+ case mso_anchorBottomBaseline:
+ case mso_anchorTopCenteredBaseline:
+ case mso_anchorBottomCenteredBaseline:
+ break;
+ */
+ }
+ // Einsetzen
+ if ( bTVASet )
+ aSet.Put( SdrTextVertAdjustItem( eTVA ) );
+ if ( bTHASet )
+ aSet.Put( SdrTextHorzAdjustItem( eTHA ) );
+ }
+ aSet.Put( SdrTextMinFrameHeightItem( rTextRect.Bottom() - rTextRect.Top() ) );
+
+ pTextObj->SetModel( pSdrModel );
+ pTextObj->NbcSetAttributes( aSet, FALSE );
+
+ // rotate text with shape ?
+ if ( mnFix16Angle )
+ {
+ double a = mnFix16Angle * nPi180;
+ pTextObj->NbcRotate( rObjData.rBoundRect.Center(), mnFix16Angle, sin( a ), cos( a ) );
+ }
+
+ if( !pObj )
+ {
+ pObj = pTextObj;
+ }
+ else
+ {
+ if( pTextObj != pObj )
+ {
+ SdrObject* pGroup = new SdrObjGroup;
+ pGroup->GetSubList()->NbcInsertObject( pObj );
+ pGroup->GetSubList()->NbcInsertObject( pTextObj );
+ pOrgObj = pObj;
+ pObj = pGroup;
+ }
+ }
+ }
+ else if( !pObj )
+ {
+ // simple rectangular objects are ignored by ImportObj() :-(
+ // this is OK for Draw but not for Calc and Writer
+ // cause here these objects have a default border
+ pObj = new SdrRectObj( rTextRect );
+ pOrgObj = pObj;
+ pObj->SetModel( pSdrModel );
+ SfxItemSet aSet( pSdrModel->GetItemPool() );
+ ApplyAttributes( rSt, aSet, pObj );
+
+ const SfxPoolItem* pPoolItem=NULL;
+ SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
+ FALSE, &pPoolItem );
+ if( SFX_ITEM_DEFAULT == eState )
+ aSet.Put( XFillColorItem( String(),
+ Color( mnDefaultColor ) ) );
+
+ pObj->NbcSetAttributes( aSet, FALSE );
+
+ }
+
+ pImpRec->bDrawHell = (BOOL)GetPropertyValue( DFF_Prop_fPrint, 0 );
+ pTextImpRec->bDrawHell = pImpRec->bDrawHell;
+ pImpRec->nNextShapeId = GetPropertyValue( DFF_Prop_hspNext, 0 );
+ pTextImpRec->nNextShapeId=pImpRec->nNextShapeId;
+
+ if ( nTextId )
+ {
+ pTextImpRec->aTextId.nTxBxS = (UINT16)( nTextId >> 16 );
+ pTextImpRec->aTextId.nSequence = (UINT16)nTextId;
+ }
+
+ pTextImpRec->nDxWrapDistLeft = GetPropertyValue(
+ DFF_Prop_dxWrapDistLeft, 0 ) / 635L;
+ pTextImpRec->nDyWrapDistTop = GetPropertyValue(
+ DFF_Prop_dyWrapDistTop, 0 ) / 635L;
+ pTextImpRec->nDxWrapDistRight = GetPropertyValue(
+ DFF_Prop_dxWrapDistRight, 0 ) / 635L;
+ pTextImpRec->nDyWrapDistBottom = GetPropertyValue(
+ DFF_Prop_dyWrapDistBottom, 0 ) / 635L;
+ // 16.16 fraction times total image width or height, as appropriate.
+
+ pImpRec->nCropFromTop = GetPropertyValue(
+ DFF_Prop_cropFromTop, 0 );
+ pImpRec->nCropFromBottom = GetPropertyValue(
+ DFF_Prop_cropFromBottom, 0 );
+ pImpRec->nCropFromLeft = GetPropertyValue(
+ DFF_Prop_cropFromLeft, 0 );
+ pImpRec->nCropFromRight = GetPropertyValue(
+ DFF_Prop_cropFromRight, 0 );
+
+ UINT32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
+ pImpRec->eLineStyle = (nLineFlags & 8)
+ ? (MSO_LineStyle)GetPropertyValue(
+ DFF_Prop_lineStyle,
+ mso_lineSimple )
+ : (MSO_LineStyle)USHRT_MAX;
+ pTextImpRec->eLineStyle = pImpRec->eLineStyle;
+
+ if( pImpRec->nShapeId )
+ {
+ // Import-Record-Liste ergaenzen
+ if( pOrgObj )
+ {
+ pImpRec->pObj = pOrgObj;
+ rImportData.aRecords.Insert( pImpRec );
+ }
+
+ if( pTextObj && (pOrgObj != pTextObj) )
+ {
+ // Modify ShapeId (must be unique)
+ pImpRec->nShapeId |= 0x8000000;
+ pTextImpRec->pObj = pTextObj;
+ rImportData.aRecords.Insert( pTextImpRec );
+ }
+
+ // Eintrag in Z-Order-Liste um Zeiger auf dieses Objekt ergaenzen
+ /*Only store objects which are not deep inside the tree*/
+ if( ( rObjData.nCalledByGroup == 0 )
+ ||
+ ( (rObjData.nSpFlags & SP_FGROUP)
+ && (rObjData.nCalledByGroup < 2) )
+ )
+ StoreShapeOrder( pImpRec->nShapeId,
+ ( ( (ULONG)pImpRec->aTextId.nTxBxS ) << 16 )
+ + pImpRec->aTextId.nSequence, pObj );
+ }
+ else
+ delete pImpRec;
+ }
+
+ return pObj;
+};
+
+void SvxMSDffManager::StoreShapeOrder(ULONG nId,
+ ULONG nTxBx,
+ SdrObject* pObject,
+ SwFlyFrmFmt* pFly,
+ short nHdFtSection) const
+{
+ USHORT nShapeCount = pShapeOrders->Count();
+ for (USHORT nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
+ {
+ SvxMSDffShapeOrder& rOrder
+ = *(SvxMSDffShapeOrder*)(pShapeOrders->GetObject( nShapeNum ));
+
+ if( rOrder.nShapeId == nId )
+ {
+ rOrder.nTxBxComp = nTxBx;
+ rOrder.pObj = pObject;
+ rOrder.pFly = pFly;
+ rOrder.nHdFtSection = nHdFtSection;
+ }
+ }
+}
+
+
+void SvxMSDffManager::ExchangeInShapeOrder( SdrObject* pOldObject,
+ ULONG nTxBx,
+ SwFlyFrmFmt* pFly,
+ SdrObject* pObject) const
+{
+ USHORT nShapeCount = pShapeOrders->Count();
+ for (USHORT nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
+ {
+ SvxMSDffShapeOrder& rOrder
+ = *(SvxMSDffShapeOrder*)(pShapeOrders->GetObject( nShapeNum ));
+
+ if( rOrder.pObj == pOldObject )
+ {
+ rOrder.pFly = pFly;
+ rOrder.pObj = pObject;
+ rOrder.nTxBxComp = nTxBx;
+ }
+ }
+}
+
+
+void SvxMSDffManager::RemoveFromShapeOrder( SdrObject* pObject ) const
+{
+ USHORT nShapeCount = pShapeOrders->Count();
+ for (USHORT nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
+ {
+ SvxMSDffShapeOrder& rOrder
+ = *(SvxMSDffShapeOrder*)(pShapeOrders->GetObject( nShapeNum ));
+
+ if( rOrder.pObj == pObject )
+ {
+ rOrder.pObj = 0;
+ rOrder.pFly = 0;
+ rOrder.nTxBxComp = 0;
+ }
+ }
+}
+
+
+
+
+//---------------------------------------------------------------------------
+// Hilfs Deklarationen
+//---------------------------------------------------------------------------
+
+/*struct SvxMSDffBLIPInfo -> in's Header-File
+{
+ USHORT nBLIPType; // Art des BLIP: z.B. 6 fuer PNG
+ ULONG nFilePos; // Offset des BLIP im Daten-Stream
+ ULONG nBLIPSize; // Anzahl Bytes, die der BLIP im Stream einnimmt
+ SvxMSDffBLIPInfo(USHORT nBType, ULONG nFPos, ULONG nBSize):
+ nBLIPType( nBType ), nFilePos( nFPos ), nBLIPSize( nBSize ){}
+};
+*/
+
+SV_IMPL_PTRARR( SvxMSDffBLIPInfos, SvxMSDffBLIPInfo_Ptr );
+
+SV_IMPL_PTRARR( SvxMSDffShapeOrders, SvxMSDffShapeOrder_Ptr );
+
+SV_IMPL_OP_PTRARR_SORT( SvxMSDffShapeInfos, SvxMSDffShapeInfo_Ptr );
+
+SV_IMPL_OP_PTRARR_SORT( SvxMSDffShapeTxBxSort, SvxMSDffShapeOrder_Ptr );
+
+
+// Liste aller SvxMSDffImportRec fuer eine Gruppe
+SV_IMPL_OP_PTRARR_SORT(MSDffImportRecords, MSDffImportRec_Ptr)
+
+
+
+
+//---------------------------------------------------------------------------
+// exportierte Klasse: oeffentliche Methoden
+//---------------------------------------------------------------------------
+
+SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
+ long nOffsDgg_,
+ SvStream* pStData_,
+ SdrModel* pSdrModel_,// s. unten: SetModel()
+ long nApplicationScale,
+ ColorData mnDefaultColor_,
+ ULONG nDefaultFontHeight_,
+ SvStream* pStData2_)
+ :DffPropertyReader( *this ),
+ pBLIPInfos( new SvxMSDffBLIPInfos ),
+ pFormModel( NULL ),
+ pShapeInfos( new SvxMSDffShapeInfos ),
+ pShapeOrders( new SvxMSDffShapeOrders ),
+ pStData( pStData_ ),
+ pStData2( pStData2_ ),
+ rStCtrl( rStCtrl_ ),
+ nOffsDgg( nOffsDgg_ ),
+ mpFidcls( NULL ),
+ mnDefaultColor( mnDefaultColor_),
+ nDefaultFontHeight( nDefaultFontHeight_),
+ nBLIPCount( USHRT_MAX ), // mit Error initialisieren, da wir erst pruefen,
+ nShapeCount( USHRT_MAX ), // ob Kontroll-Stream korrekte Daten enthaellt
+ nSvxMSDffSettings( 0 ),
+ nSvxMSDffOLEConvFlags( 0 )
+{
+ SetModel( pSdrModel_, nApplicationScale );
+
+ // FilePos des/der Stream(s) merken
+ ULONG nOldPosCtrl = rStCtrl.Tell();
+ ULONG nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
+
+ // Falls kein Datenstream angegeben, gehen wir davon aus,
+ // dass die BLIPs im Steuerstream stehen.
+ if( !pStData )
+ pStData = &rStCtrl;
+
+ SetDefaultPropSet( rStCtrl, nOffsDgg );
+
+ // Steuer Stream auslesen, im Erfolgsfall nBLIPCount setzen
+ GetCtrlData( nOffsDgg );
+
+ // Text-Box-Story-Ketten-Infos ueberpruefen
+ CheckTxBxStoryChain();
+
+ // alte FilePos des/der Stream(s) restaurieren
+ rStCtrl.Seek( nOldPosCtrl );
+ if( &rStCtrl != pStData )
+ pStData->Seek( nOldPosData );
+}
+
+SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_ )
+ :DffPropertyReader( *this ),
+ pBLIPInfos( new SvxMSDffBLIPInfos ),
+ pFormModel( NULL ),
+ pShapeInfos( new SvxMSDffShapeInfos ),
+ pShapeOrders( new SvxMSDffShapeOrders ),
+ pStData( 0 ),
+ pStData2( 0 ),
+ mpFidcls( NULL ),
+ rStCtrl( rStCtrl_ ),
+ nOffsDgg( 0 ),
+ mnDefaultColor( COL_DEFAULT ),
+ nDefaultFontHeight( 24 ),
+ nBLIPCount( USHRT_MAX ), // mit Error initialisieren, da wir erst pruefen,
+ nShapeCount( USHRT_MAX ), // ob Kontroll-Stream korrekte Daten enthaellt
+ nSvxMSDffSettings( 0 ),
+ nSvxMSDffOLEConvFlags( 0 )
+{
+ SetModel( NULL, 0 );
+}
+
+SvxMSDffManager::~SvxMSDffManager()
+{
+ delete pBLIPInfos;
+ delete pShapeInfos;
+ delete pShapeOrders;
+ delete pFormModel;
+ delete mpFidcls;
+}
+
+void SvxMSDffManager::InitSvxMSDffManager( long nOffsDgg_, SvStream* pStData_, sal_uInt32 nOleConvFlags )
+{
+ nOffsDgg = nOffsDgg_;
+ pStData = pStData_;
+ nSvxMSDffOLEConvFlags = nOleConvFlags;
+
+ // FilePos des/der Stream(s) merken
+ ULONG nOldPosCtrl = rStCtrl.Tell();
+
+ SetDefaultPropSet( rStCtrl, nOffsDgg );
+
+ // insert fidcl cluster table
+ GetFidclData( nOffsDgg );
+
+ // Steuer Stream auslesen, im Erfolgsfall nBLIPCount setzen
+ GetCtrlData( nOffsDgg );
+
+ // Text-Box-Story-Ketten-Infos ueberpruefen
+ CheckTxBxStoryChain();
+
+ // alte FilePos des/der Stream(s) restaurieren
+ rStCtrl.Seek( nOldPosCtrl );
+}
+
+void SvxMSDffManager::SetDgContainer( SvStream& rSt )
+{
+ UINT32 nFilePos = rSt.Tell();
+ DffRecordHeader aDgContHd;
+ rSt >> aDgContHd;
+ // insert this container only if there is also a DgAtom
+ if ( SeekToRec( rSt, DFF_msofbtDg, aDgContHd.GetRecEndFilePos() ) )
+ {
+ DffRecordHeader aRecHd;
+ rSt >> aRecHd;
+ UINT32 nDrawingId = aRecHd.nRecInstance;
+ maDgOffsetTable.Insert( nDrawingId, (void*)nFilePos );
+ rSt.Seek( nFilePos );
+ }
+}
+
+void SvxMSDffManager::GetFidclData( long nOffsDgg )
+{
+ if ( nOffsDgg )
+ {
+ UINT32 nDummy, nMerk = rStCtrl.Tell();
+ rStCtrl.Seek( nOffsDgg );
+
+ DffRecordHeader aRecHd;
+ rStCtrl >> aRecHd;
+
+ DffRecordHeader aDggAtomHd;
+ if ( SeekToRec( rStCtrl, DFF_msofbtDgg, aRecHd.GetRecEndFilePos(), &aDggAtomHd ) )
+ {
+ aDggAtomHd.SeekToContent( rStCtrl );
+ rStCtrl >> mnCurMaxShapeId
+ >> mnIdClusters
+ >> nDummy
+ >> mnDrawingsSaved;
+
+ if ( mnIdClusters-- > 2 )
+ {
+ if ( aDggAtomHd.nRecLen == ( mnIdClusters * sizeof( FIDCL ) + 16 ) )
+ {
+ mpFidcls = new FIDCL[ mnIdClusters ];
+ for ( UINT32 i = 0; i < mnIdClusters; i++ )
+ {
+ rStCtrl >> mpFidcls[ i ].dgid
+ >> mpFidcls[ i ].cspidCur;
+ }
+ }
+ }
+ }
+ rStCtrl.Seek( nMerk );
+ }
+}
+
+void SvxMSDffManager::CheckTxBxStoryChain()
+{
+ SvxMSDffShapeInfos* pOld = pShapeInfos;
+ USHORT nCount = pOld->Count();
+ pShapeInfos = new SvxMSDffShapeInfos( (nCount < 255)
+ ? nCount
+ : 255 );
+ // altes Info-Array ueberarbeiten
+ // (ist sortiert nach nTxBxComp)
+ ULONG nChain = ULONG_MAX;
+ USHORT nObjMark = 0;
+ BOOL bSetReplaceFALSE = FALSE;
+ USHORT nObj;
+ for( nObj = 0; nObj < nCount; ++nObj )
+ {
+ SvxMSDffShapeInfo* pObj = pOld->GetObject( nObj );
+ if( pObj->nTxBxComp )
+ {
+ pObj->bLastBoxInChain = FALSE;
+ // Gruppenwechsel ?
+ if( nChain != (pObj->nTxBxComp & 0xFFFF0000) )
+ {
+ // voriger war letzter seiner Gruppe
+ if( nObj )
+ pOld->GetObject( nObj-1 )->bLastBoxInChain = TRUE;
+ // Merker und Hilfs-Flag zuruecksetzen
+ nObjMark = nObj;
+ nChain = pObj->nTxBxComp & 0xFFFF0000;
+ bSetReplaceFALSE = !pObj->bReplaceByFly;
+ }
+ else
+ if( !pObj->bReplaceByFly )
+ {
+ // Objekt, das NICHT durch Rahmen ersetzt werden darf ?
+ // Hilfs-Flag setzen
+ bSetReplaceFALSE = TRUE;
+ // ggfs Flag in Anfang der Gruppe austragen
+ for( USHORT nObj2 = nObjMark; nObj2 < nObj; ++nObj2 )
+ pOld->GetObject( nObj2 )->bReplaceByFly = FALSE;
+ }
+
+ if( bSetReplaceFALSE )
+ {
+ pObj->bReplaceByFly = FALSE;
+ }
+ }
+ // alle Shape-Info-Objekte in pShapeInfos umkopieren
+ // (aber nach nShapeId sortieren)
+ pObj->bSortByShapeId = TRUE;
+ pShapeInfos->Insert( pObj );
+ }
+ // voriger war letzter seiner Gruppe
+ if( nObj )
+ pOld->GetObject( nObj-1 )->bLastBoxInChain = TRUE;
+ // urspruengliches Array freigeben, ohne Objekte zu zerstoeren
+ pOld->Remove((USHORT)0, nCount);
+ delete pOld;
+}
+
+
+/*****************************************************************************
+
+ Einlesen der Shape-Infos im Ctor:
+ ---------------------------------
+ merken der Shape-Ids und zugehoerigen Blip-Nummern und TextBox-Infos
+ ========= ============ =============
+ und merken des File-Offsets fuer jedes Blip
+ ============
+******************************************************************************/
+void SvxMSDffManager::GetCtrlData( long nOffsDgg_ )
+{
+ // Start Offset unbedingt merken, falls wir nochmal aufsetzen muessen
+ long nOffsDgg = nOffsDgg_;
+
+ // Kontroll Stream positionieren
+ rStCtrl.Seek( nOffsDgg );
+
+ BYTE nVer;
+ USHORT nInst;
+ USHORT nFbt;
+ ULONG nLength;
+ if( !this->ReadCommonRecordHeader( rStCtrl, nVer, nInst, nFbt, nLength ) ) return;
+
+ BOOL bOk;
+ ULONG nPos = nOffsDgg + nHeaderSize;
+
+ // Fall A: erst Drawing Group Container, dann n Mal Drawing Container
+ if( DFF_msofbtDggContainer == nFbt )
+ {
+ GetDrawingGroupContainerData( rStCtrl, nLength );
+
+ nPos += nLength;
+ do
+ {
+ rStCtrl.Seek( nPos );
+
+ bOk = this->ReadCommonRecordHeader( rStCtrl, nVer, nInst, nFbt, nLength )
+ && ( DFF_msofbtDgContainer == nFbt );
+
+ if( !bOk )
+ {
+ nPos++;
+ rStCtrl.Seek( nPos );
+ bOk = this->ReadCommonRecordHeader( rStCtrl, nVer, nInst, nFbt, nLength )
+ && ( DFF_msofbtDgContainer == nFbt );
+ }
+ if( bOk )
+ GetDrawingContainerData( rStCtrl, nLength );
+ nPos += nHeaderSize + nLength;
+ }
+ while( bOk );
+ }
+ else
+ {
+ ;
+ }
+}
+
+
+// ab hier: Drawing Group Container d.h. Dokument - weit gueltige Daten
+// ======================= ========
+//
+void SvxMSDffManager::GetDrawingGroupContainerData( SvStream& rSt, ULONG nLenDgg )
+{
+ BYTE nVer;
+ USHORT nInst;
+ USHORT nFbt;
+ ULONG nLength;
+
+ ULONG nLenBStoreCont = 0, nLenFBSE = 0, nRead = 0;
+
+ // Nach einem BStore Container suchen
+ do
+ {
+ if(!this->ReadCommonRecordHeader( rSt, nVer, nInst, nFbt, nLength)) return;
+ nRead += nHeaderSize + nLength;
+ if( DFF_msofbtBstoreContainer == nFbt )
+ {
+ nLenBStoreCont = nLength; break;
+ }
+ if(!SkipBytes( rSt, nLength)) return;
+ }
+ while( nRead < nLenDgg );
+
+ if( !nLenBStoreCont ) return;
+
+ // Im BStore Container alle Header der Container und Atome auslesen und die
+ // relevanten Daten aller enthaltenen FBSEs in unserem Pointer Array ablegen.
+ // Dabei zaehlen wir die gefundenen FBSEs im Member nBLIPCount mit.
+
+ const ULONG nSkipBLIPLen = 20; // bis zu nBLIPLen zu ueberspringende Bytes
+ const ULONG nSkipBLIPPos = 4; // dahinter bis zu nBLIPPos zu skippen
+
+ ULONG nBLIPLen = 0, nBLIPPos = 0;
+
+ nRead = 0;
+ do
+ {
+ if(!this->ReadCommonRecordHeader( rSt, nVer, nInst, nFbt, nLength)) return;
+ nRead += nHeaderSize + nLength;
+ if( DFF_msofbtBSE == nFbt )
+ {
+ nLenFBSE = nLength;
+ // ist FBSE gross genug fuer unsere Daten
+ BOOL bOk = ( nSkipBLIPLen + 4 + nSkipBLIPPos + 4 <= nLenFBSE );
+
+ if( bOk )
+ {
+ bOk = ( ( SkipBytes( rSt, nSkipBLIPLen) )
+ && ( ReadUINT32(rSt, nBLIPLen ) )
+ && ( SkipBytes( rSt, nSkipBLIPPos) )
+ && ( ReadUINT32(rSt, nBLIPPos ) ) );
+
+ nLength -= nSkipBLIPLen+ 4 + nSkipBLIPPos + 4;
+ if( 0 > nLength )
+ nLength = 0;
+ }
+
+ if( bOk )
+ {
+ // Besonderheit:
+ // Falls nBLIPLen kleiner ist als nLenFBSE UND nBLIPPos Null ist,
+ // nehmen wir an, dass das Bild IM FBSE drin steht!
+ if( (!nBLIPPos) && (nBLIPLen < nLenFBSE) )
+ nBLIPPos = rSt.Tell() + 4;
+
+ // Das hat ja fein geklappt!
+ // Wir merken uns, dass wir einen FBSE mehr im Pointer Array haben.
+ nBLIPPos = Calc_nBLIPPos(nBLIPPos, rSt.Tell());
+
+ if( USHRT_MAX == nBLIPCount )
+ nBLIPCount = 1;
+ else
+ nBLIPCount++;
+
+ // Jetzt die Infos fuer spaetere Zugriffe speichern
+ pBLIPInfos->Insert( new SvxMSDffBLIPInfo( nInst, nBLIPPos, nBLIPLen ),
+ pBLIPInfos->Count() );
+ }
+ }
+ if(!SkipBytes( rSt, nLength)) return;
+ }
+ while( nRead < nLenBStoreCont );
+}
+
+
+// ab hier: Drawing Container d.h. Seiten (Blatt, Dia) - weit gueltige Daten
+// ================= ======
+//
+void SvxMSDffManager::GetDrawingContainerData( SvStream& rSt, ULONG nLenDg )
+{
+ BYTE nVer;USHORT nInst;USHORT nFbt;ULONG nLength;
+
+ ULONG nReadDg = 0;
+
+ // Wir stehen in einem Drawing Container (je einer pro Seite)
+ // und muessen nun
+ // alle enthaltenen Shape Group Container abklappern
+ do
+ {
+ if(!this->ReadCommonRecordHeader( rSt, nVer, nInst, nFbt, nLength)) return;
+ nReadDg += nHeaderSize;
+ // Patriarch gefunden (der oberste Shape Group Container) ?
+ if( DFF_msofbtSpgrContainer == nFbt )
+ {
+ if(!this->GetShapeGroupContainerData( rSt, nLength, TRUE)) return;
+ }
+ else
+ // blanker Shape Container ? (ausserhalb vom Shape Group Container)
+ if( DFF_msofbtSpContainer == nFbt )
+ {
+ if(!this->GetShapeContainerData( rSt, nLength)) return;
+ }
+ else
+ {
+ if(!SkipBytes( rSt, nLength)) return;
+ }
+ nReadDg += nLength;
+ }
+ while( nReadDg < nLenDg );
+}
+
+BOOL SvxMSDffManager::GetShapeGroupContainerData( SvStream& rSt,
+ ULONG nLenShapeGroupCont,
+ BOOL bPatriarch )
+{
+ BYTE nVer;USHORT nInst;USHORT nFbt;ULONG nLength;
+ long nStartShapeGroupCont = rSt.Tell();
+ // Wir stehen in einem Shape Group Container (ggfs. mehrere pro Seite)
+ // und muessen nun
+ // alle enthaltenen Shape Container abklappern
+ BOOL bFirst = !bPatriarch;
+ ULONG nReadSpGrCont = 0;
+ do
+ {
+ if( !this->ReadCommonRecordHeader( rSt, nVer, nInst, nFbt, nLength ) )
+ return FALSE;
+ nReadSpGrCont += nHeaderSize;
+ // Shape Container ?
+ if( DFF_msofbtSpContainer == nFbt )
+ {
+ ULONG nGroupOffs = bFirst ? nStartShapeGroupCont - nHeaderSize : ULONG_MAX;
+ if ( !this->GetShapeContainerData( rSt, nLength, nGroupOffs ) )
+ return FALSE;
+ bFirst = FALSE;
+ }
+ else
+ // eingeschachtelter Shape Group Container ?
+ if( DFF_msofbtSpgrContainer == nFbt )
+ {
+ if ( !this->GetShapeGroupContainerData( rSt, nLength, FALSE ) )
+ return FALSE;
+ }
+ else if( !SkipBytes( rSt, nLength ) )
+ return FALSE;
+ nReadSpGrCont += nLength;
+ }
+ while( nReadSpGrCont < nLenShapeGroupCont );
+ // den Stream wieder korrekt positionieren
+ rSt.Seek( nStartShapeGroupCont + nLenShapeGroupCont );
+ return TRUE;
+}
+
+BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt, ULONG nLenShapeCont, ULONG nPosGroup )
+{
+ BYTE nVer;USHORT nInst;USHORT nFbt;ULONG nLength;
+ long nStartShapeCont = rSt.Tell();
+ // Wir stehen in einem Shape Container (ggfs. mehrere pro Sh. Group)
+ // und muessen nun
+ // die Shape Id und File-Pos (fuer spaetere, erneute Zugriffe)
+ // und den ersten BStore Verweis (falls vorhanden) entnehmen
+ ULONG nLenShapePropTbl = 0;
+ ULONG nReadSpCont = 0;
+
+ // File Offset des Shape-Containers bzw. der Gruppe(!) vermerken
+ //
+ ULONG nStartOffs = (ULONG_MAX > nPosGroup) ?
+ nPosGroup : nStartShapeCont - nHeaderSize;
+ SvxMSDffShapeInfo aInfo( nStartOffs );
+
+ // duerfte das Shape durch einen Rahmen ersetzt werden ?
+ // (vorausgesetzt, es zeigt sich, dass es eine TextBox ist,
+ // und der Text nicht gedreht ist)
+ BOOL bCanBeReplaced = (ULONG_MAX > nPosGroup) ? FALSE : TRUE;
+
+ // wir wissen noch nicht, ob es eine TextBox ist
+ MSO_SPT eShapeType = mso_sptNil;
+ MSO_WrapMode eWrapMode = mso_wrapSquare;
+ BOOL bIsTextBox = FALSE;
+
+ // Shape analysieren
+ //
+ do
+ {
+ if(!this->ReadCommonRecordHeader( rSt, nVer, nInst, nFbt, nLength)) return FALSE;
+ nReadSpCont += nHeaderSize;
+ // FSP ?
+ if( ( DFF_msofbtSp == nFbt ) && ( 4 <= nLength ) )
+ {
+ // Wir haben den FSP gefunden: Shape Typ und Id vermerken!
+ eShapeType = (MSO_SPT)nInst;
+ ReadUINT32(rSt, aInfo.nShapeId);
+ if ( !SkipBytes( rSt, nLength - 4 ) )
+ return FALSE;
+ nReadSpCont += nLength;
+ }
+ else if( DFF_msofbtOPT == nFbt ) // Shape Property Table ?
+ {
+ // Wir haben die Property Table gefunden:
+ // nach der Blip Property suchen!
+ ULONG nPropRead = 0;
+ USHORT nPropId;
+ ULONG nPropVal;
+ nLenShapePropTbl = nLength;
+ UINT32 nPropCount = nInst;
+ long nStartShapePropTbl = rSt.Tell();
+ UINT32 nComplexDataFilePos = nStartShapePropTbl + ( nPropCount * 6 );
+ do
+ {
+ ReadUINT16(rSt, nPropId);
+ ReadUINT32(rSt, nPropVal);
+ nPropRead += 6;
+
+ switch( nPropId )
+ {
+ case DFF_Prop_txflTextFlow :
+ case DFF_Prop_cdirFont :
+ case DFF_Prop_Rotation :
+ if( 0 != nPropVal )
+ bCanBeReplaced = FALSE;
+ break;
+
+ case DFF_Prop_gtextFStrikethrough :
+ if( ( 0x20002000 & nPropVal ) == 0x20002000 )
+ bCanBeReplaced = FALSE;
+ break;
+
+ case DFF_Prop_fc3DLightFace :
+ if( ( 0x00080008 & nPropVal ) == 0x00080008 )
+ bCanBeReplaced = FALSE;
+ break;
+
+ case DFF_Prop_WrapText :
+ eWrapMode = (MSO_WrapMode)nPropVal;
+ break;
+
+ default:
+ {
+ if( 0x4000 == ( nPropId & 0xC000 ) )// Bit gesetzt und gueltig?
+ {
+ // Blip Property gefunden: BStore Idx vermerken!
+ nPropRead = nLenShapePropTbl;
+ }
+ else if( 0x8000 & nPropId )
+ {
+ // komplexe Prop gefunden:
+ // Laenge ist immer 6, nur die Laenge der nach der
+ // eigentlichen Prop-Table anhaengenden Extra-Daten
+ // ist unterschiedlich
+ nPropVal = 6;
+ }
+ }
+ break;
+ }
+
+/*
+//JP 21.04.99: Bug 64510
+// alte Version, die unter OS/2 zu Compilerfehlern fuehrt und damit arge
+// Performance einbussen hat.
+
+ if( 0x4000 == ( nPropId & 0xC000 ) )// Bit gesetzt und gueltig?
+ {
+ // Blip Property gefunden: BStore Idx vermerken!
+ aInfo.nBStoreIdx = nPropVal; // Index im BStore Container
+ break;
+ }
+ else
+ if( ( ( (DFF_Prop_txflTextFlow == nPropId)
+ || (DFF_Prop_Rotation == nPropId)
+ || (DFF_Prop_cdirFont == nPropId) )
+ && (0 != nPropVal) )
+
+ || ( (DFF_Prop_gtextFStrikethrough == nPropId)
+ && ( (0x20002000 & nPropVal) == 0x20002000) ) // also DFF_Prop_gtextFVertical
+ || ( (DFF_Prop_fc3DLightFace == nPropId)
+ && ( (0x00080008 & nPropVal) == 0x00080008) ) // also DFF_Prop_f3D
+ )
+ {
+ bCanBeReplaced = FALSE; // Mist: gedrehter Text oder 3D-Objekt!
+ }
+ else
+ if( DFF_Prop_WrapText == nPropId )
+ {
+ eWrapMode = (MSO_WrapMode)nPropVal;
+ }
+ ////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////
+ // keine weitere Property-Auswertung: folge beim Shape-Import //
+ ////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////
+ else
+ if( 0x8000 & nPropId )
+ {
+ // komplexe Prop gefunden: Laenge lesen und ueberspringen
+ if(!SkipBytes( rSt, nPropVal )) return FALSE;
+ nPropRead += nPropVal;
+ }
+*/
+ }
+ while( nPropRead < nLenShapePropTbl );
+ rSt.Seek( nStartShapePropTbl + nLenShapePropTbl );
+ nReadSpCont += nLenShapePropTbl;
+ }
+ else if( ( DFF_msofbtClientTextbox == nFbt ) && ( 4 == nLength ) ) // Text-Box-Story-Eintrag gefunden
+ {
+ ReadUINT32(rSt, aInfo.nTxBxComp);
+ }
+ else
+ {
+ if ( !SkipBytes( rSt, nLength ) )
+ return FALSE;
+ nReadSpCont += nLength;
+ }
+ }
+ while( nReadSpCont < nLenShapeCont );
+
+ //
+ // Jetzt ggfs. die Infos fuer spaetere Zugriffe auf das Shape speichern
+ //
+ if( aInfo.nShapeId )
+ {
+ // fuer Textboxen ggfs. ersetzen durch Rahmen erlauben
+ if( bCanBeReplaced
+ && aInfo.nTxBxComp
+ && (
+ ( eShapeType == mso_sptTextSimple )
+ || ( eShapeType == mso_sptTextBox )
+ || ( ( ( eShapeType == mso_sptRectangle )
+ || ( eShapeType == mso_sptRoundRectangle )
+ )
+ && ( eWrapMode == mso_wrapSquare )
+ ) ) )
+ {
+ aInfo.bReplaceByFly = TRUE;
+ }
+ pShapeInfos->Insert( new SvxMSDffShapeInfo( aInfo ) );
+ pShapeOrders->Insert( new SvxMSDffShapeOrder( aInfo.nShapeId ),
+ pShapeOrders->Count() );
+ }
+
+ // und den Stream wieder korrekt positionieren
+ rSt.Seek( nStartShapeCont + nLenShapeCont );
+ return TRUE;
+}
+
+
+
+/*****************************************************************************
+
+ Zugriff auf ein Shape zur Laufzeit (ueber die Shape-Id)
+ ----------------------------------
+******************************************************************************/
+BOOL SvxMSDffManager::GetShape(ULONG nId, SdrObject*& rpShape,
+ SvxMSDffImportData& rData)
+{
+ SvxMSDffShapeInfo aTmpRec(0, nId);
+ aTmpRec.bSortByShapeId = TRUE;
+
+ USHORT nFound;
+ if( pShapeInfos->Seek_Entry(&aTmpRec, &nFound) )
+ {
+ SvxMSDffShapeInfo& rInfo = *pShapeInfos->GetObject( nFound );
+
+ // eventuell altes Errorflag loeschen
+ if( rStCtrl.GetError() )
+ rStCtrl.ResetError();
+ // FilePos des/der Stream(s) merken
+ ULONG nOldPosCtrl = rStCtrl.Tell();
+ ULONG nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
+ // das Shape im Steuer Stream anspringen
+ rStCtrl.Seek( rInfo.nFilePos );
+
+ // Falls missglueckt, den Fehlerstatus zuruecksetzen und Pech gehabt!
+ if( rStCtrl.GetError() )
+ rStCtrl.ResetError();
+ else
+ //rpShape = ImportObjAtCurrentStreamPos( rStCtrl, rData );
+ rpShape = ImportObj( rStCtrl, &rData, &rData.aParentRect );
+
+ // alte FilePos des/der Stream(s) restaurieren
+ rStCtrl.Seek( nOldPosCtrl );
+ if( &rStCtrl != pStData )
+ pStData->Seek( nOldPosData );
+ return ( 0 != rpShape );
+ }
+ return FALSE;
+}
+
+
+
+/* Zugriff auf ein BLIP zur Laufzeit (bei bereits bekannter Blip-Nr)
+ ---------------------------------
+******************************************************************************/
+BOOL SvxMSDffManager::GetBLIP(ULONG nIdx_, Graphic& rData) const
+{
+ BOOL bOk = FALSE; // Ergebnisvariable initialisieren
+ if ( pStData )
+ {
+ USHORT nIdx = USHORT( nIdx_ );
+ if( !nIdx || (pBLIPInfos->Count() < nIdx) ) return FALSE;
+
+ // eventuell alte(s) Errorflag(s) loeschen
+ if( rStCtrl.GetError() )
+ rStCtrl.ResetError();
+ if( ( &rStCtrl != pStData )
+ && pStData->GetError() )
+ pStData->ResetError();
+
+ // FilePos des/der Stream(s) merken
+ ULONG nOldPosCtrl = rStCtrl.Tell();
+ ULONG nOldPosData = pStData ? pStData->Tell() : nOldPosCtrl;
+
+ // passende Info-Struct aus unserem Pointer Array nehmen
+ SvxMSDffBLIPInfo& rInfo = *(*pBLIPInfos)[ nIdx-1 ];
+
+ // das BLIP Atom im Daten Stream anspringen
+ pStData->Seek( rInfo.nFilePos );
+ // ggfs. Fehlerstatus zuruecksetzen
+ if( pStData->GetError() )
+ pStData->ResetError();
+ else
+ bOk = GetBLIPDirect( *pStData, rData );
+ if( pStData2 && !bOk )
+ {
+ // Fehler, aber zweite Chance: es gibt noch einen zweiten
+ // Datenstream, in dem die Grafik liegen koennte!
+ if( pStData2->GetError() )
+ pStData2->ResetError();
+ ULONG nOldPosData2 = pStData2->Tell();
+ // das BLIP Atom im zweiten Daten Stream anspringen
+ pStData2->Seek( rInfo.nFilePos );
+ // ggfs. Fehlerstatus zuruecksetzen
+ if( pStData2->GetError() )
+ pStData2->ResetError();
+ else
+ bOk = GetBLIPDirect( *pStData2, rData );
+ // alte FilePos des zweiten Daten-Stream restaurieren
+ pStData2->Seek( nOldPosData2 );
+ }
+ // alte FilePos des/der Stream(s) restaurieren
+ rStCtrl.Seek( nOldPosCtrl );
+ if( &rStCtrl != pStData )
+ pStData->Seek( nOldPosData );
+ }
+ return bOk;
+}
+
+/* Zugriff auf ein BLIP zur Laufzeit (mit korrekt positioniertem Stream)
+ ---------------------------------
+******************************************************************************/
+BOOL SvxMSDffManager::GetBLIPDirect(SvStream& rBLIPStream, Graphic& rData) const
+{
+ ULONG nOldPos = rBLIPStream.Tell();
+
+ int nRes = GRFILTER_OPENERROR; // Fehlervariable initialisieren
+
+ // nachschauen, ob es sich auch wirklich um ein BLIP handelt
+ ULONG nLength;
+ USHORT nInst, nFbt;
+ BYTE nVer;
+ if( ReadCommonRecordHeader( rBLIPStream, nVer, nInst, nFbt, nLength) && ( 0xF018 <= nFbt ) && ( 0xF117 >= nFbt ) )
+ {
+ Size aMtfSize100;
+ BOOL bMtfBLIP = FALSE;
+ BOOL bZCodecCompression = FALSE;
+ // Nun exakt auf den Beginn der eingebetteten Grafik positionieren
+ ULONG nSkip = ( nInst & 0x0001 ) ? 32 : 16;
+
+ switch( nInst & 0xFFFE )
+ {
+ case 0x216 : // Metafile header then compressed WMF
+ case 0x3D4 : // Metafile header then compressed EMF
+ case 0x542 : // Metafile hd. then compressed PICT
+ {
+ SkipBytes( rBLIPStream, nSkip + 20 );
+
+ // read in size of metafile in EMUS
+ rBLIPStream >> aMtfSize100.Width() >> aMtfSize100.Height();
+
+ // scale to 1/100mm
+ aMtfSize100.Width() /= 360, aMtfSize100.Height() /= 360;
+
+ // skip rest of header
+ nSkip = 6;
+ bMtfBLIP = bZCodecCompression = TRUE;
+ }
+ break;
+ case 0x46A : // One byte tag then JPEG (= JFIF) data
+ case 0x6E0 : // One byte tag then PNG data
+ case 0x7A8 :
+ nSkip += 1; // One byte tag then DIB data
+ break;
+ }
+ if( SkipBytes( rBLIPStream, nSkip ) )
+ {
+ SvStream* pGrStream = &rBLIPStream;
+ SvMemoryStream* pOut = 0;
+ if( bZCodecCompression )
+ {
+ pOut = new SvMemoryStream( 0x8000, 0x4000 );
+ if ( ZCodecDecompressed( rBLIPStream, *pOut, TRUE ) )
+ pGrStream = pOut;
+ }
+
+#ifdef DBG_EXTRACTGRAPHICS
+
+ static sal_Int32 nCount;
+
+ String aFileName( String( RTL_CONSTASCII_STRINGPARAM( "dbggfx" ) ) );
+ aFileName.Append( String::CreateFromInt32( nCount++ ) );
+ switch( nInst &~ 1 )
+ {
+ case 0x216 : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".wmf" ) ) ); break;
+ case 0x3d4 : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".emf" ) ) ); break;
+ case 0x542 : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".pct" ) ) ); break;
+ case 0x46a : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".jpg" ) ) ); break;
+ case 0x6e0 : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".png" ) ) ); break;
+ case 0x7a8 : aFileName.Append( String( RTL_CONSTASCII_STRINGPARAM( ".bmp" ) ) ); break;
+ }
+ INetURLObject aURL;
+ aURL.SetSmartURL( Application::GetAppFileName() );
+ aURL.SetName( aFileName );
+ SvFileStream aDbgOut( aURL.PathToFileName(), STREAM_TRUNC | STREAM_WRITE );
+ if ( bZCodecCompression )
+ {
+ pOut->Seek( STREAM_SEEK_TO_END );
+ aDbgOut.Write( pOut->GetData(), pOut->Tell() );
+ pOut->Seek( STREAM_SEEK_TO_BEGIN );
+ }
+ else
+ {
+ sal_Int32 nDbgLen = nLength - nSkip;
+ if ( nDbgLen )
+ {
+ sal_Char* pDat = new sal_Char[ nDbgLen ];
+ pGrStream->Read( pDat, nDbgLen );
+ aDbgOut.Write( pDat, nDbgLen );
+ pGrStream->SeekRel( -nDbgLen );
+ delete pDat;
+ }
+ }
+#endif
+
+ if( ( nInst & 0xFFFE ) == 0x7A8 )
+ { // DIBs direkt holen
+ Bitmap aNew;
+ if( aNew.Read( *pGrStream, FALSE ) )
+ {
+ rData = Graphic( aNew );
+ nRes = GRFILTER_OK;
+ }
+ }
+ else
+ { // und unsere feinen Filter darauf loslassen
+ GraphicFilter* pGF = GetGrfFilter();
+ String aEmptyStr;
+ nRes = pGF->ImportGraphic( rData, aEmptyStr, *pGrStream, GRFILTER_FORMAT_DONTKNOW );
+
+ if( bMtfBLIP && ( GRFILTER_OK == nRes ) && ( rData.GetType() == GRAPHIC_GDIMETAFILE ) )
+ {
+ if ( ( aMtfSize100.Width() >= 1000 ) && ( aMtfSize100.Height() >= 1000 ) )
+ { // #75956#, scaling does not work properly, if the graphic is less than 1cm
+ GDIMetaFile aMtf( rData.GetGDIMetaFile() );
+ const Size aOldSize( aMtf.GetPrefSize() );
+
+ if( aOldSize.Width() && ( aOldSize.Width() != aMtfSize100.Width() ) &&
+ aOldSize.Height() && ( aOldSize.Height() != aMtfSize100.Height() ) )
+ {
+ aMtf.Scale( (double) aMtfSize100.Width() / aOldSize.Width(),
+ (double) aMtfSize100.Height() / aOldSize.Height() );
+ aMtf.SetPrefSize( aMtfSize100 );
+ aMtf.SetPrefMapMode( MAP_100TH_MM );
+ rData = aMtf;
+ }
+ }
+ }
+ }
+ // ggfs. Fehlerstatus zuruecksetzen
+ if ( ERRCODE_IO_PENDING == pGrStream->GetError() )
+ pGrStream->ResetError();
+ delete pOut;
+ }
+ }
+ rBLIPStream.Seek( nOldPos ); // alte FilePos des Streams restaurieren
+
+ return ( GRFILTER_OK == nRes ); // Ergebniss melden
+}
+
+/*static*/
+
+#define ZCODEC_DEC_BUFSIZE 0x4000
+
+BOOL SvxMSDffManager::ZCodecDecompressed( SvStream& rIn, SvStream& rOut, BOOL bLookForEnd )
+{
+ long nOutStartPos = rOut.Tell();
+ long nBytesOut = 0;
+
+ ZCodec aZCodec;
+ aZCodec.BeginCompression();
+
+ if( bLookForEnd )
+ {
+ BYTE* pBuf = new BYTE[ ZCODEC_DEC_BUFSIZE ];
+ long nBytesRead;
+ while( TRUE )
+ {
+ nBytesRead = aZCodec.Read( rIn, pBuf, ZCODEC_DEC_BUFSIZE );
+ if( nBytesRead > 0 )
+ {
+ rOut.Write( pBuf, nBytesRead );
+ nBytesOut += nBytesRead;
+ }
+ else
+ break;
+ }
+ if( nBytesRead < 0 ) nBytesOut = 0; // Error: Ergebnisse ungueltig !!
+ delete pBuf;
+ }
+ else
+ nBytesOut = aZCodec.Decompress( rIn, rOut );
+
+ aZCodec.EndCompression();
+
+ rOut.Seek( nOutStartPos );
+ return (0 < nBytesOut);
+}
+
+
+/* static */
+BOOL SvxMSDffManager::ReadCommonRecordHeader(DffRecordHeader& rRec, SvStream& rIn)
+{
+ rRec.nFilePos = rIn.Tell();
+ return SvxMSDffManager::ReadCommonRecordHeader( rIn,rRec.nRecVer,
+ rRec.nRecInstance,
+ rRec.nRecType,
+ rRec.nRecLen );
+}
+
+
+/* auch static */
+BOOL SvxMSDffManager::ReadCommonRecordHeader( SvStream& rSt,
+ BYTE& rVer,
+ USHORT& rInst,
+ USHORT& rFbt,
+ ULONG& rLength )
+{
+ //----------------------------------------------
+ UINT16 aBits;
+ if( !ReadUINT16( rSt, aBits ) )
+ return FALSE;
+ rVer = aBits & 0x000F;
+ rInst = (aBits & 0xFFF0) >> 4;
+ //----------------------------------------------
+ if( !ReadUINT16( rSt, rFbt ) )
+ return FALSE;
+ //----------------------------------------------
+ if( 0 != rSt.IsEof() )
+ return FALSE;
+ return ReadUINT32( rSt, rLength );
+}
+
+
+
+
+BOOL SvxMSDffManager::ProcessClientAnchor(SvStream& rStData, ULONG nDatLen,
+ char*& rpBuff, UINT32& rBuffLen ) const
+{
+ if( nDatLen )
+ {
+ rpBuff = new char[ nDatLen ];
+ rBuffLen = nDatLen;
+ rStData.Read( rpBuff, nDatLen );
+ }
+ return TRUE;
+}
+
+BOOL SvxMSDffManager::ProcessClientData(SvStream& rStData, ULONG nDatLen,
+ char*& rpBuff, UINT32& rBuffLen ) const
+{
+ if( nDatLen )
+ {
+ rpBuff = new char[ nDatLen ];
+ rBuffLen = nDatLen;
+ rStData.Read( rpBuff, nDatLen );
+ }
+ return TRUE;
+}
+
+
+void SvxMSDffManager::ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd, void* pData, DffObjData& rObj )
+{
+ return; // wird von SJ im Draw ueberladen
+}
+
+
+ULONG SvxMSDffManager::Calc_nBLIPPos( ULONG nOrgVal, ULONG nStreamPos ) const
+{
+ return nOrgVal;
+}
+
+BOOL SvxMSDffManager::GetOLEStorageName( long nOLEId, String& ,
+ SvStorageRef& , SvStorageRef& ) const
+{
+ return FALSE;
+}
+
+BOOL SvxMSDffManager::ShapeHasText( ULONG nShapeId, ULONG nFilePos ) const
+{
+ return TRUE;
+}
+
+SdrObject* SvxMSDffManager::ImportOLE( long nOLEId, const Graphic& rGrf,
+ const Rectangle& rBoundRect ) const
+{
+ SdrObject* pRet = 0;
+ String sStorageName;
+ SvStorageRef xSrcStg, xDstStg;
+ if( GetOLEStorageName( nOLEId, sStorageName, xSrcStg, xDstStg ))
+ pRet = CreateSdrOLEFromStorage( sStorageName, xSrcStg, xDstStg,
+ rGrf, rBoundRect, pStData,
+ nSvxMSDffOLEConvFlags );
+ return pRet;
+}
+
+const GDIMetaFile* SvxMSDffManager::lcl_GetMetaFileFromGrf_Impl( const Graphic& rGrf,
+ GDIMetaFile& rMtf )
+{
+ const GDIMetaFile* pMtf;
+ if( GRAPHIC_BITMAP == rGrf.GetType() )
+ {
+ Point aPt;
+ MapMode aMM( MAP_100TH_MM );
+
+ const Size aSz( OutputDevice::LogicToLogic(
+ rGrf.GetPrefSize(),
+ rGrf.GetPrefMapMode(),
+ aMM ));
+
+ VirtualDevice aVirtDev;
+ aVirtDev.EnableOutput( FALSE );
+ aVirtDev.SetMapMode( aMM );
+
+ rMtf.Record( &aVirtDev );
+ rGrf.Draw( &aVirtDev, aPt, aSz );
+ rMtf.Stop();
+ rMtf.SetPrefMapMode( aMM );
+ rMtf.SetPrefSize( aSz );
+
+ pMtf = &rMtf;
+ }
+ else
+ pMtf = &rGrf.GetGDIMetaFile();
+ return pMtf;
+}
+
+#ifndef SVX_LIGHT
+SvInPlaceObjectRef lcl_CheckForConvertToSOObj( UINT32 nConvertFlags,
+ SvStorage& rSrcStg, SvStorage& rDestStorage )
+{
+ static struct _ObjImpType
+ {
+ UINT32 nFlag;
+ const char* pFactoryNm;
+ // GlobalNameId
+ UINT32 n1;
+ USHORT n2, n3;
+ BYTE b8, b9, b10, b11, b12, b13, b14, b15;
+ } aArr[] = {
+ { OLE_MATHTYPE_2_STARMATH, "smath",
+ 0x0002ce02L, 0x0000, 0x0000,
+ 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 },
+ { OLE_MATHTYPE_2_STARMATH, "smath",
+ 0x00021700L, 0x0000, 0x0000,
+ 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 },
+ { OLE_WINWORD_2_STARWRITER, "swriter",
+ 0x00020906L, 0x0000, 0x0000,
+ 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 },
+ { OLE_EXCEL_2_STARCALC, "scalc",
+ 0x00020820L, 0x0000, 0x0000,
+ 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 },
+ { OLE_POWERPOINT_2_STARIMPRESS, "simpress",
+ 0x64818d10L, 0x4f9b, 0x11cf,
+ 0x86,0xea,0x00,0xaa,0x00,0xb9,0x29,0xe8 },
+ { 0,0 }
+ };
+
+ SvInPlaceObjectRef xIPObj;
+ for( const _ObjImpType* pArr = aArr; pArr->nFlag; ++pArr )
+ if( nConvertFlags & pArr->nFlag )
+ {
+ SvGlobalName aTypeName( pArr->n1, pArr->n2, pArr->n3,
+ pArr->b8, pArr->b9, pArr->b10, pArr->b11,
+ pArr->b12, pArr->b13, pArr->b14, pArr->b15 );
+ if( rSrcStg.GetClassName() == aTypeName )
+ {
+ String sStarName( String::CreateFromAscii( pArr->pFactoryNm ));
+ const SfxObjectFactory* pFact =
+ SfxObjectFactory::GetFactory( sStarName );
+ if( pFact && pFact->GetFilterContainer() )
+ {
+ SfxMedium* pMed = new SfxMedium( &rSrcStg, FALSE );
+ const SfxFilter* pFilter = 0;
+ if( !pFact->GetFilterContainer()->
+ GetFilter4Content( *pMed, &pFilter ) && pFilter )
+ {
+ String aEmptyStr;
+
+ //then the StarFactory can import this storage
+ pMed->SetFilter( pFilter );
+ SvStorageRef xStor = new SvStorage( aEmptyStr);
+
+ SfxObjectShellLock xDoc( pFact->CreateObject(
+ SFX_CREATE_MODE_EMBEDDED ));
+ if( xDoc.Is() )
+ {
+ xIPObj = &xDoc;
+ String aDstStgName( String::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "MSO_OLE_Obj" )));
+
+ SvStorageRef xObjStor( rDestStorage.OpenStorage(
+ aDstStgName,
+ STREAM_READWRITE| STREAM_SHARE_DENYALL ));
+
+ xDoc->DoLoad( pMed );
+ xDoc->DoSaveAs( xObjStor );
+ xDoc->DoSaveCompleted( /*xObjStor*/ );
+ pMed = 0;
+ }
+ }
+ delete pMed;
+ }
+ break;
+ }
+ }
+ return xIPObj;
+}
+#endif
+
+SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
+ const String& rStorageName,
+ SvStorageRef& rSrcStorage,
+ SvStorageRef& rDestStorage,
+ const Graphic& rGrf,
+ const Rectangle& rBoundRect,
+ SvStream* pDataStrm,
+ UINT32 nConvertFlags )
+{
+ SdrOle2Obj* pRet = 0;
+#ifndef SVX_LIGHT
+ if( rSrcStorage.Is() && rDestStorage.Is() && rStorageName.Len() )
+ {
+ // Ist der 01Ole-Stream ueberhaupt vorhanden ?
+ // ( ist er z.B. bei WordArt nicht )
+ // Wenn nicht -> Einbindung als Grafik
+ BOOL bValidStorage = FALSE;
+ String aDstStgName( String::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "MSO_OLE_Obj" )));
+ SvStorageRef xObjStor;
+
+ {
+ SvStorageRef xObjStg = rSrcStorage->OpenStorage( rStorageName,
+ STREAM_READWRITE| STREAM_SHARE_DENYALL );
+ if( xObjStg.Is() )
+ {
+ BYTE aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
+ SvStorageStreamRef xSrcTst = xObjStg->OpenStream(
+ String( RTL_CONSTASCII_STRINGPARAM( "\1Ole" ),
+ RTL_TEXTENCODING_MS_1252 ));
+ bValidStorage = xSrcTst.Is() && sizeof( aTestA ) ==
+ xSrcTst->Read( aTestA, sizeof( aTestA ) );
+
+ if( bValidStorage && nConvertFlags )
+ {
+ SvInPlaceObjectRef xIPObj( ::lcl_CheckForConvertToSOObj(
+ nConvertFlags, *xObjStg, *rDestStorage ));
+ if( xIPObj.Is() )
+ {
+ pRet = new SdrOle2Obj( xIPObj, String(), rBoundRect,
+ /*TRUE*/ FALSE );
+ // we have the Object, don't create another
+ bValidStorage = FALSE;
+ }
+ }
+ }
+ }
+
+ if( bValidStorage )
+ {
+ rSrcStorage->CopyTo( rStorageName, rDestStorage, aDstStgName );
+
+ xObjStor = rDestStorage->OpenStorage( aDstStgName,
+ STREAM_READWRITE| STREAM_SHARE_DENYALL );
+ if( xObjStor.Is() && xObjStor->GetError() )
+ {
+ rDestStorage->SetError( xObjStor->GetError() );
+ xObjStor.Clear();
+ bValidStorage = FALSE;
+ }
+ else if( SVSTREAM_OK != rDestStorage->GetError() || !xObjStor.Is() )
+ bValidStorage = FALSE;
+ else
+ {
+ GDIMetaFile aMtf;
+ SvEmbeddedObject::MakeContentStream( xObjStor,
+ *lcl_GetMetaFileFromGrf_Impl( rGrf, aMtf ) );
+ }
+ }
+ else if( pDataStrm )
+ {
+ UINT32 nLen, nDummy;
+ *pDataStrm >> nLen >> nDummy;
+ if( SVSTREAM_OK != pDataStrm->GetError() ||
+ // Id in BugDoc - exist there other Ids?
+ // The ConvertToOle2 - does not check for consistent
+ 0x30008 != nDummy )
+ bValidStorage = FALSE;
+ else
+ {
+ // or is it an OLE-1 Stream in the DataStream?
+ xObjStor = rDestStorage->OpenStorage( aDstStgName
+ /*, STREAM_READWRITE | STREAM_SHARE_DENYALL*/ );
+
+ GDIMetaFile aMtf;
+ SotStorageRef xRef( &xObjStor );
+ bValidStorage = SvEmbeddedObject::ConvertToOle2(
+ *pDataStrm, nLen,
+ lcl_GetMetaFileFromGrf_Impl( rGrf, aMtf ), xRef );
+ }
+ }
+
+ if( bValidStorage )
+ {
+ SvInPlaceObjectRef xInplaceObj( ((SvFactory*)SvInPlaceObject::
+ ClassFactory())->CreateAndLoad( xObjStor ) );
+ if( xInplaceObj.Is() )
+ {
+ // VisArea am OutplaceObject setzen!!
+ Size aSz( OutputDevice::LogicToLogic( rGrf.GetPrefSize(),
+ rGrf.GetPrefMapMode(), MapMode( xInplaceObj->GetMapUnit() ) ) );
+ // modifiziert wollen wir nicht werden
+ xInplaceObj->EnableSetModified( FALSE );
+ xInplaceObj->SetVisArea( Rectangle( Point(), aSz ));
+ xInplaceObj->EnableSetModified( TRUE );
+
+ XubString aNm;
+ pRet = new SdrOle2Obj( xInplaceObj, aNm,
+ rBoundRect, /*TRUE*/ FALSE );
+ }
+ }
+ }
+#endif
+ return pRet;
+}
+
+SdrObject* SvxMSDffManager::GetAutoForm( MSO_SPT eTyp ) const
+{
+ UINT16 nNewType = 1; // Rectangle als default
+ SdrObject* pRet = NULL;
+ switch ( eTyp )
+ {
+ case mso_sptSmileyFace : nNewType= 17; break;
+ case mso_sptDonut : nNewType= 18; break;
+ case mso_sptNoSmoking : nNewType= 19; break;
+ case mso_sptBlockArc : nNewType= 20; break;
+ case mso_sptHeart : nNewType= 21; break;
+ case mso_sptLightningBolt : nNewType= 22; break;
+ case mso_sptSun : nNewType= 23; break;
+ case mso_sptMoon : nNewType= 24; break;
+ case mso_sptArc : nNewType= 25; break;
+ case mso_sptBracketPair : nNewType= 26; break;
+ case mso_sptBracePair : nNewType= 27; break;
+ case mso_sptPlaque : nNewType= 28; break;
+ case mso_sptLeftBracket : nNewType= 29; break;
+ case mso_sptRightBracket : nNewType= 30; break;
+ case mso_sptLeftBrace : nNewType= 31; break;
+ case mso_sptRightBrace : nNewType= 32; break;
+ case mso_sptUturnArrow : nNewType= 49; break;
+ case mso_sptCurvedLeftArrow : nNewType= 53; break;
+ case mso_sptCurvedRightArrow : nNewType= 52; break;
+ case mso_sptCurvedUpArrow : nNewType= 54; break;
+ case mso_sptCurvedDownArrow : nNewType= 55; break;
+ case mso_sptNotchedRightArrow : nNewType= 57; break;
+ case mso_sptIrregularSeal1 : nNewType= 68; break;
+ case mso_sptIrregularSeal2 : nNewType= 69; break;
+ case mso_sptSeal4 : nNewType= 70; break;
+ case mso_sptStar : nNewType= 71; break;
+ case mso_sptSeal8 : nNewType= 72; break;
+ case mso_sptSeal16 : nNewType= 73; break;
+ case mso_sptSeal24 : nNewType= 74; break;
+ case mso_sptSeal32 : nNewType= 75; break;
+ case mso_sptRibbon2 : nNewType= 76; break;
+ case mso_sptRibbon : nNewType= 77; break;
+ case mso_sptEllipseRibbon2 : nNewType= 78; break;
+ case mso_sptEllipseRibbon : nNewType= 79; break;
+ case mso_sptVerticalScroll : nNewType= 80; break;
+ case mso_sptHorizontalScroll : nNewType= 81; break;
+ case mso_sptWave : nNewType= 89; break;
+ case mso_sptDoubleWave : nNewType= 90; break;
+ case mso_sptWedgeRectCallout : nNewType= 98; break;
+ case mso_sptWedgeRRectCallout : nNewType= 99; break;
+ case mso_sptWedgeEllipseCallout : nNewType=100; break;
+ case mso_sptCloudCallout : nNewType=101; break;
+ case mso_sptFlowChartProcess : nNewType= 33; break;
+ case mso_sptFlowChartAlternateProcess : nNewType= 34; break;
+ case mso_sptFlowChartDecision : nNewType= 35; break;
+ case mso_sptFlowChartInputOutput : nNewType= 36; break;
+ case mso_sptFlowChartPredefinedProcess: nNewType= 37; break;
+ case mso_sptFlowChartInternalStorage : nNewType= 38; break;
+ case mso_sptFlowChartDocument : nNewType= 39; break;
+ case mso_sptFlowChartMultidocument : nNewType= 82; break;
+ case mso_sptFlowChartTerminator : nNewType= 83; break;
+ case mso_sptFlowChartPreparation : nNewType= 84; break;
+ case mso_sptFlowChartManualInput : nNewType= 85; break;
+ case mso_sptFlowChartManualOperation : nNewType= 86; break;
+ case mso_sptFlowChartConnector : nNewType= 87; break;
+ case mso_sptFlowChartOffpageConnector : nNewType= 88; break;
+ case mso_sptFlowChartPunchedCard : nNewType= 91; break;
+ case mso_sptFlowChartPunchedTape : nNewType= 92; break;
+ case mso_sptFlowChartSummingJunction : nNewType= 93; break;
+ case mso_sptFlowChartOr : nNewType= 94; break;
+ case mso_sptFlowChartCollate : nNewType= 95; break;
+ case mso_sptFlowChartSort : nNewType= 96; break;
+ case mso_sptFlowChartExtract : nNewType= 97; break;
+ case mso_sptFlowChartMerge : nNewType=102; break;
+ case mso_sptFlowChartOfflineStorage : nNewType=103; break;
+ case mso_sptFlowChartDelay : nNewType=104; break;
+ case mso_sptFlowChartMagneticTape : nNewType=105; break;
+ case mso_sptFlowChartMagneticDisk : nNewType=106; break;
+ case mso_sptFlowChartMagneticDrum : nNewType=107; break;
+ case mso_sptFlowChartDisplay : nNewType=108; break;
+ }
+ // Model holen falls noch nicht angelegt
+ if( !pFormModel )
+ {
+ if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) )
+ {
+ ((SvxMSDffManager*)this)->pFormModel = new FmFormModel();
+ SfxItemPool& rPool = pFormModel->GetItemPool();
+ rPool.FreezeIdRanges();
+ if ( !GalleryExplorer::GetSdrObj( GALLERY_THEME_POWERPOINT, 0, pFormModel ) && pFormModel ) // Objekte sind nicht da
+ delete ((SvxMSDffManager*)this)->pFormModel, ((SvxMSDffManager*)this)->pFormModel = NULL;
+ }
+ }
+ if( pFormModel && pFormModel->GetPageCount() ) // Objekt aus dem model holen, falls es noch klappt
+ {
+ const SdrObject* pObj = pFormModel->GetPage( 0 )->GetObj( 120 - nNewType );
+ if( pObj )
+ pRet = (SdrObject*)pObj->Clone();
+ }
+ return pRet;
+}
+
diff --git a/svx/source/msfilter/msoleexp.cxx b/svx/source/msfilter/msoleexp.cxx
new file mode 100644
index 0000000000..f4975ea828
--- /dev/null
+++ b/svx/source/msfilter/msoleexp.cxx
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * $RCSfile: msoleexp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SO_CLSIDS_HXX
+#include <so3/clsids.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFX_INTERNO_HXX
+#include <sfx2/interno.hxx>
+#endif
+#ifndef _SFX_OBJFAC_HXX
+#include <sfx2/docfac.hxx>
+#endif
+#ifndef _SFX_DOCFILT_HACK_HXX
+#include <sfx2/docfilt.hxx>
+#endif
+#ifndef _SFXDOCFILE_HXX
+#include <sfx2/docfile.hxx>
+#endif
+#ifndef _SFX_FCONTNR_HXX
+#include <sfx2/fcontnr.hxx>
+#endif
+
+#include "msoleexp.hxx"
+
+void SvxMSExportOLEObjects::ExportOLEObject( SvInPlaceObject& rObj,
+ SvStorage& rDestStg )
+{
+ SfxInPlaceObjectRef xSfxIPObj( &rObj );
+ const SfxFilter* pExpFilter = 0;
+ if( xSfxIPObj.Is() && xSfxIPObj->GetObjectShell() && GetFlags() )
+ {
+ static struct _ObjExpType {
+ UINT32 nFlag;
+ const char* pFilterNm;
+ // GlobalNameId
+ struct _GlobalNameIds {
+ UINT32 n1;
+ USHORT n2, n3;
+ BYTE b8, b9, b10, b11, b12, b13, b14, b15;
+ } aGlNmIds[3];
+ } aArr[] = {
+ { OLE_STARMATH_2_MATHTYPE, "MathType 3.x",
+ {SO3_SM_CLASSID_50, SO3_SM_CLASSID_40, SO3_SM_CLASSID_30 }},
+ { OLE_STARWRITER_2_WINWORD, "MS Word 97",
+ {SO3_SW_CLASSID_50, SO3_SW_CLASSID_40, SO3_SW_CLASSID_30 }},
+ { OLE_STARCALC_2_EXCEL, "MS Excel 97",
+ {SO3_SC_CLASSID_50, SO3_SC_CLASSID_40, SO3_SC_CLASSID_30 }},
+ { OLE_STARIMPRESS_2_POWERPOINT, "MS PowerPoint 97",
+ {SO3_SIMPRESS_CLASSID_50, SO3_SIMPRESS_CLASSID_40,
+ SO3_SIMPRESS_CLASSID_30 }},
+ { 0,0 }
+ };
+
+ BOOL bFnd = FALSE;
+ for( const _ObjExpType* pArr = aArr; !bFnd && pArr->nFlag; ++pArr )
+ if( GetFlags() & pArr->nFlag )
+ {
+ for ( int n = 0; !bFnd && n < 3; ++n )
+ {
+ const _ObjExpType::_GlobalNameIds& rId = pArr->aGlNmIds[ n ];
+ SvGlobalName aGlbNm( rId.n1, rId.n2, rId.n3,
+ rId.b8, rId.b9, rId.b10, rId.b11,
+ rId.b12, rId.b13, rId.b14, rId.b15 );
+ if( *xSfxIPObj->GetSvFactory() == aGlbNm )
+ {
+ const SfxObjectFactory& rFact = xSfxIPObj->
+ GetObjectShell()->GetFactory();
+ if( rFact.GetFilterContainer() )
+ pExpFilter = rFact.GetFilterContainer()->
+ GetFilter4FilterName( String::CreateFromAscii(
+ pArr->pFilterNm ));
+ bFnd = TRUE;
+ }
+ }
+ }
+ }
+
+ if( pExpFilter ) // use this filter for the export
+ {
+ SfxMedium aMed( &rDestStg, FALSE );
+ aMed.SetFilter( pExpFilter );
+ xSfxIPObj->GetObjectShell()->ConvertTo( aMed );
+ }
+ else
+ {
+ rDestStg.SetVersion( SOFFICE_FILEFORMAT_31 );
+ rObj.DoSaveAs( &rDestStg );
+ rObj.DoSaveCompleted();
+ }
+}
+
+
+
diff --git a/svx/source/msfilter/msvbasic.cxx b/svx/source/msfilter/msvbasic.cxx
new file mode 100644
index 0000000000..dc8c74fec8
--- /dev/null
+++ b/svx/source/msfilter/msvbasic.cxx
@@ -0,0 +1,593 @@
+/*************************************************************************
+ *
+ * $RCSfile: msvbasic.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#include <string.h> // memset(), ...
+#ifndef UNX
+#include <io.h> // access()
+#endif
+
+#ifndef _MSVBASIC_HXX
+#include <msvbasic.hxx>
+#endif
+
+/* class VBA_Impl:
+ * The VBA class provides a set of methods to handle Visual Basic For
+ * Applications streams, the constructor is given the root ole2 stream
+ * of the document, Open reads the VBA project file and figures out
+ * the number of VBA streams, and the offset of the data within them.
+ * Decompress decompresses a particular numbered stream, NoStreams returns
+ * this number, and StreamName can give you the streams name. Decompress
+ * will call Output when it has a 4096 byte collection of data to output,
+ * and also with the final remainder of data if there is still some left
+ * at the end of compression. Output is virtual to allow custom handling
+ * of each chunk of decompressed data. So inherit from this to do something
+ * useful with the data.
+ *
+ * cmc
+ * */
+
+BYTE VBA_Impl::ReadPString(SvStorageStreamRef &xVBAProject)
+{
+ UINT16 nIdLen;
+ int i=0;
+ BYTE nType = 0, nOut;
+
+ *xVBAProject >> nIdLen;
+
+ if (nIdLen < 6)
+ {
+ xVBAProject->SeekRel(-2);
+ }
+ else
+ for(i=0; i < nIdLen / 2; i++)
+ {
+ *xVBAProject >> nOut;
+ xVBAProject->SeekRel(1);
+ if (i==2)
+ {
+ nType = nOut;
+ if ((nType != 'G') && (nType != 'C'))
+ nType = 0;
+ if ( nType == 0)
+ {
+ xVBAProject->SeekRel(-8);
+ break;
+ }
+ }
+ }
+
+ return nType;
+}
+
+static BOOL lcl_CheckArray( SvStream &rStrm, const BYTE* pArr, USHORT nLen )
+{
+ BYTE* pMem = new BYTE[ nLen ];
+
+ rStrm.Read( pMem, nLen );
+ BOOL bRet = 0 == memcmp( pMem, pArr, nLen );
+ delete pMem;
+ return bRet;
+}
+
+void VBA_Impl::ConfirmFixedOctect(SvStorageStreamRef &xVBAProject)
+{
+ static const BYTE coTest[8] =
+ {
+ 0x06, 0x02, 0x01, 0x00, 0x08, 0x02, 0x00, 0x00
+ };
+
+ if( !lcl_CheckArray( *xVBAProject, coTest, sizeof( coTest ) ))
+ DBG_WARNING("Found a different octect, please report");
+}
+
+void VBA_Impl::Confirm12Zeros(SvStorageStreamRef &xVBAProject)
+{
+ static const BYTE coTest[12]={0};
+ if( !lcl_CheckArray( *xVBAProject, coTest, sizeof( coTest ) ))
+ DBG_WARNING("Found a Non Zero block, please report");
+}
+
+void VBA_Impl::ConfirmHalfWayMarker(SvStorageStreamRef &xVBAProject)
+{
+ static const BYTE coTest[12]={0,0,0,0,0,0,0,0,0,0,1,0};
+ if( !lcl_CheckArray( *xVBAProject, coTest, sizeof( coTest ) ))
+ DBG_WARNING("Found a different halfway marker, please report");
+}
+
+void VBA_Impl::ConfirmFixedMiddle(SvStorageStreamRef &xVBAProject)
+{
+ static const BYTE coTest[20] =
+ {
+ 0x00, 0x00, 0xe1, 0x2e, 0x45, 0x0d, 0x8f, 0xe0,
+ 0x1a, 0x10, 0x85, 0x2e, 0x02, 0x60, 0x8c, 0x4d,
+ 0x0b, 0xb4, 0x00, 0x00
+ };
+ if( !lcl_CheckArray( *xVBAProject, coTest, sizeof( coTest ) ))
+ {
+ DBG_WARNING("Found a different middle marker, please report");
+ xVBAProject->SeekRel( - sizeof( coTest ));
+ }
+}
+
+void VBA_Impl::ConfirmFixedMiddle2(SvStorageStreamRef &xVBAProject)
+{
+ static const BYTE coTest[20] =
+ {
+ 0x00, 0x00, 0x2e, 0xc9, 0x27, 0x8e, 0x64, 0x12,
+ 0x1c, 0x10, 0x8a, 0x2f, 0x04, 0x02, 0x24, 0x00,
+ 0x9c, 0x02, 0x00, 0x00
+ };
+
+
+ if( !lcl_CheckArray( *xVBAProject, coTest, sizeof( coTest ) ))
+ {
+ DBG_WARNING("Found a different middle2 marker, please report");
+ xVBAProject->SeekRel( - sizeof( coTest ));
+ }
+}
+
+
+void VBA_Impl::Output( int nLen, const BYTE *pData )
+{
+ /*
+ Each StarBasic module is tragically limited to the maximum len of a
+ string and WordBasic is not, so each overlarge module must be split
+ */
+ String sTemp((const sal_Char *)pData, (xub_StrLen)nLen,
+ RTL_TEXTENCODING_MS_1252);
+ int nTmp = sTemp.GetTokenCount('\x0D');
+ int nIndex = aVBAStrings.GetSize()-1;
+ if (aVBAStrings.Get(nIndex)->Len() +
+ nLen + ((nLines+nTmp) * sComment.Len()) >= STRING_MAXLEN)
+ {
+ //DBG_ASSERT(0,"New Module String\n");
+ //we are too large for our boots, break out into another
+ //string
+ nLines=0;
+ nIndex++;
+ aVBAStrings.SetSize(nIndex+1);
+ aVBAStrings.Put(nIndex,new String);
+ }
+ *(aVBAStrings.Get(nIndex)) += sTemp;
+ nLines+=nTmp;
+}
+
+
+int VBA_Impl::ReadVBAProject(const SvStorageRef &rxVBAStorage)
+{
+ SvStorageStreamRef xVBAProject;
+ xVBAProject = rxVBAStorage->OpenStream( String(
+ RTL_CONSTASCII_STRINGPARAM( "_VBA_PROJECT" ),
+ RTL_TEXTENCODING_MS_1252 ),
+ STREAM_STD_READ | STREAM_NOCREATE );
+
+ if( !xVBAProject.Is() || SVSTREAM_OK != xVBAProject->GetError() )
+ {
+ DBG_WARNING("Not able to find vba project, cannot find macros");
+ return(0);
+ }
+ xVBAProject->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+
+ static const BYTE coHeader[30] =
+ {
+ 0xcc, 0x61, 0x5e, 0x00, 0x00, 0x01, 0x00, 0xff,
+ 0x07, 0x04, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00,
+ 0xe4, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00
+ };
+
+ if( !lcl_CheckArray( *xVBAProject, coHeader, sizeof( coHeader ) ))
+ DBG_WARNING("Warning VBA header is different, please report");
+
+ UINT16 nValue, nSValue;
+ *xVBAProject >> nValue >> nSValue;
+
+ //*pOut << "Trigger value 1 is " << nValue << endl;
+ if( nSValue != 0x02 )
+ DBG_WARNING("Warning VBA number is different, please report");
+
+ //*pOut << "Other strings after the middle are..." << endl;
+ //There appears to be almost any number of strings acceptable
+ //most begin with */G , and sometimes with
+ //*/C. Those with G always have a trailer of 12 bytes, those
+ //with C come in pairs, the first with no trailer, and the
+ //second with one of 12 bytes. The following code attemts
+ //to read these strings and ends when it reaches a sequence of
+ //bytes which fails a test to be a valid string. So this
+ //while loop here is the particular piece of code which is
+ //very suspect and likely to be the cause of any crashes and
+ //problems.
+ int nCount=0;
+ BYTE nType;
+ while ((nType = ReadPString(xVBAProject)) != 0)
+ {
+ //*pOut << endl;
+ //*pOut << "testcharacter is " << testc << endl;
+ switch (nType)
+ {
+ case 'C':
+ nCount++;
+ if (nCount == 2)
+ {
+ Confirm12Zeros(xVBAProject);
+ nCount=0;
+ }
+ break;
+ default:
+ // case 'G':
+ Confirm12Zeros(xVBAProject);
+ break;
+ }
+ }
+
+ //appears to be a fixed 20 byte sequence here, and then the strings
+ //continue
+ ConfirmFixedMiddle(xVBAProject);
+
+ nCount=0;
+
+ while ((nType = ReadPString(xVBAProject)) != 0)
+ {
+ //*pOut << endl;
+ //*pOut << "testcharacter is " << testc << endl;
+ switch (nType)
+ {
+ case 'C':
+ nCount++;
+ if (nCount == 2)
+ {
+ Confirm12Zeros(xVBAProject);
+ nCount=0;
+ }
+ break;
+ default:
+// case 'G':
+ Confirm12Zeros(xVBAProject);
+ break;
+ }
+ }
+
+ //there *may* be another different 20byte fixed string
+ ConfirmFixedMiddle2(xVBAProject);
+
+ //*pOut << "testc is " << testc << endl;
+ //*pOut << "position is " << xVBAProject->Tell() << endl;
+
+ UINT16 nModules;
+ *xVBAProject >> nModules;
+
+ //begin section, this section isn't really 100% correct
+ //*pOut << nModules << hex << " vba modules" << endl;
+ xVBAProject->SeekRel(2*nModules);
+ xVBAProject->SeekRel(4);
+ //*pOut << "position is " << xVBAProject->Tell() << endl;
+ ConfirmFixedOctect(xVBAProject);
+
+ UINT16 nJunkSize;
+ *xVBAProject >> nJunkSize;
+ while(nJunkSize != 0xFFFF)
+ {
+ xVBAProject->Read(&nJunkSize,2); // usually 18 02, sometimes 1e 02
+ //but sometimes its a run of numbers until 0xffff, gagh!!!
+ //*pOut << "position is " << xVBAProject->Tell() << "len is "
+ // << nJunkSize << endl;
+ }
+
+ UINT16 nFTest;
+ *xVBAProject >> nFTest;
+ if (nFTest != 0xFFFF)
+ xVBAProject->SeekRel(nFTest);
+ *xVBAProject >> nFTest;
+ if (nFTest != 0xFFFF)
+ xVBAProject->SeekRel(nFTest);
+
+ xVBAProject->SeekRel(100);
+ //*pOut << "position is " << xVBAProject->Tell() << endl;
+ //end section
+
+ *xVBAProject >> nOffsets;
+ pOffsets = new VBAOffset_Impl[ nOffsets ];
+ int i, j;
+ for( i=0; i < nOffsets; i++)
+ {
+ UINT16 nLen;
+ *xVBAProject >> nLen;
+
+ sal_Unicode* pBuf = pOffsets[i].sName.AllocBuffer( nLen / 2 );
+ xVBAProject->Read( (sal_Char*)pBuf, nLen );
+
+#ifdef __BIGENDIAN
+ for( j = 0; j < nLen / 2; ++j, ++pBuf )
+ *pBuf = SWAPLONG( *pBuf );
+#endif // ifdef __BIGENDIAN
+
+ *xVBAProject >> nLen;
+ xVBAProject->SeekRel( nLen );
+
+ //begin section, another problem area
+ *xVBAProject >> nLen;
+ if ( nLen == 0xFFFF)
+ {
+ xVBAProject->SeekRel(2);
+ *xVBAProject >> nLen;
+ xVBAProject->SeekRel( nLen );
+ }
+ else
+ xVBAProject->SeekRel( nLen+2 );
+ //
+ /* I have a theory that maybe you read a 16bit len, and
+ * if it has 0x02 for the second byte then it is a special
+ * token of its own that affects nothing else, otherwise
+ * it is a len of the following data. C. I must test this
+ * theory later.
+ */
+ //end section
+
+ xVBAProject->SeekRel(8);
+ BYTE no_of_octects;
+ *xVBAProject >> no_of_octects;
+ for(j=0;j<no_of_octects;j++)
+ xVBAProject->SeekRel(8);
+ xVBAProject->SeekRel(6);
+
+ *xVBAProject >> pOffsets[i].nOffset;
+ //*pOut << pOffsets[i].pName.GetStr() << " at 0x" << hex << pOffsets[i].nOffset << endl;
+ xVBAProject->SeekRel(2);
+ }
+
+ //*pOut << endl;
+ return nOffsets;
+}
+
+BOOL VBA_Impl::Open( const String &rToplevel, const String &rSublevel )
+{
+ /* beginning test for vba stuff */
+ BOOL bRet = FALSE;
+ SvStorageRef xMacros= xStor->OpenStorage( rToplevel,
+ STREAM_READWRITE | STREAM_NOCREATE |
+ STREAM_SHARE_DENYALL );
+ if( !xMacros.Is() || SVSTREAM_OK != xMacros->GetError() )
+ {
+ DBG_WARNING("No Macros Storage");
+ }
+ else
+ {
+ xVBA = xMacros->OpenStorage( rSublevel,
+ STREAM_READWRITE | STREAM_NOCREATE |
+ STREAM_SHARE_DENYALL );
+ if( !xVBA.Is() || SVSTREAM_OK != xVBA->GetError() )
+ {
+ DBG_WARNING("No Visual Basic in Storage");
+ }
+ else
+ {
+ if (ReadVBAProject(xVBA))
+ bRet = TRUE;
+ }
+ }
+ /* end test for vba stuff */
+ return bRet;
+}
+
+const StringArray &VBA_Impl::Decompress(UINT16 nIndex, int *pOverflow)
+{
+ DBG_ASSERT( nIndex < nOffsets, "Index out of range" );
+ SvStorageStreamRef xVBAStream;
+ aVBAStrings.SetSize(1);
+ aVBAStrings.Put(0,new String);
+
+ xVBAStream = xVBA->OpenStream( pOffsets[nIndex].sName,
+ STREAM_STD_READ | STREAM_NOCREATE );
+ if (pOverflow)
+ *pOverflow=0;
+
+ if( !xVBAStream.Is() || SVSTREAM_OK != xVBAStream->GetError() )
+ {
+ DBG_WARNING("Not able to open vb module ");
+ }
+ else
+ {
+ xVBAStream->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+ DecompressVBA( nIndex, xVBAStream );
+ /*
+ * if len was too big for a single string set that variable ?
+ * if ((len > XX) && (pOverflow))
+ *pOverflow=1;
+ */
+ if (bCommented)
+ {
+ for(int i=0;i<aVBAStrings.GetSize();i++)
+ {
+ String sTempStringa(
+ RTL_CONSTASCII_STRINGPARAM("\x0D\x0A"),
+ RTL_TEXTENCODING_MS_1252);
+ String sTempStringb(
+ RTL_CONSTASCII_STRINGPARAM("\x0D\x0A"),
+ RTL_TEXTENCODING_MS_1252);
+ sTempStringb+=sComment;
+ aVBAStrings.Get(i)->SearchAndReplaceAll(
+ sTempStringa,sTempStringb);
+ aVBAStrings.Get(i)->Insert(sComment,0);
+ }
+ }
+ }
+ return aVBAStrings;
+}
+
+
+int VBA_Impl::DecompressVBA( int nIndex, SvStorageStreamRef &xVBAStream )
+{
+ BYTE nLeadbyte;
+ UINT16 nToken;
+ unsigned int nPos = 0;
+ int nLen, nDistance, nShift, nClean=1;
+
+ //*pOut << "jumping to " << hex << offsets[nIndex].offset << endl;
+ xVBAStream->Seek( pOffsets[ nIndex ].nOffset + 3 );
+
+ while(xVBAStream->Read(&nLeadbyte,1))
+ {
+// *pOut << "reading 8 data unit block beginning with " << nLeadbyte
+// << int(nLeadbyte) << " at pos " << xVBAStream->Tell() << " real pos "
+// << nPos << endl;
+ for(int nPosition=0x01;nPosition < 0x100;nPosition=nPosition<<1)
+ {
+ //we see if the leadbyte has flagged this location as a dataunit
+ //which is actually a token which must be looked up in the history
+ if (nLeadbyte & nPosition)
+ {
+ *xVBAStream >> nToken;
+
+ if (nClean == 0)
+ nClean=1;
+
+ //For some reason the division of the token into the length
+ //field of the data to be inserted, and the distance back into
+ //the history differs depending on how full the history is
+ int nPos2 = nPos%WINDOWLEN;
+ if (nPos2 <= 0x10)
+ nShift = 12;
+ else if (nPos2 <= 0x20)
+ nShift = 11;
+ else if (nPos2 <= 0x40)
+ nShift = 10;
+ else if (nPos2 <= 0x80)
+ nShift = 9;
+ else if (nPos2 <= 0x100)
+ nShift = 8;
+ else if (nPos2 <= 0x200)
+ nShift = 7;
+ else if (nPos2 <= 0x400)
+ nShift = 6;
+ else if (nPos2 <= 0x800)
+ nShift = 5;
+ else
+ nShift = 4;
+
+ int i;
+ nLen=0;
+ for(i=0;i<nShift;i++)
+ nLen |= nToken & (1<<i);
+
+ //*pOut << endl << "match lookup token " << int(nToken) << "len " << int(nLen) << endl;
+
+ nLen += 3;
+ //*pOut << endl << "len is " << nLen << "shift is " << nShift << endl;
+
+ nDistance = nToken >> nShift;
+ //*pOut << "distance token shift is " << nDistance << " " << int(nToken) << " " << nShift << "pos is " << nPos << " " << xVBAStream->Tell() << endl;
+
+ //read the len of data from the history, wrapping around the
+ //WINDOWLEN boundary if necessary
+ //data read from the history is also copied into the recent
+ //part of the history as well.
+ for (i = 0; i < nLen; i++)
+ {
+ unsigned char c;
+ //*pOut << endl << (nPos%WINDOWLEN)-nDistance-1 << " " << nPos << " " << nDistance << endl;
+ c = aHistory[(nPos-nDistance-1)%WINDOWLEN];
+ aHistory[nPos%WINDOWLEN] = c;
+ nPos++;
+ //*pOut << "real pos is " << nPos << endl;
+ //
+ //temp removed
+ //*pOut << c ;
+ }
+ }
+ else
+ {
+ // special boundary case code, not guarantueed to be correct
+ // seems to work though, there is something wrong with the
+ // compression scheme (or maybe a feature) where when
+ // the data ends on a WINDOWLEN boundary and the excess
+ // bytes in the 8 dataunit list are discarded, and not
+ // interpreted as tokens or normal data.
+ if ((nPos != 0) && ((nPos%WINDOWLEN) == 0) && (nClean))
+ {
+ //*pOut << "at boundary position is " << nPosition << " " << xVBAStream->Tell() << " pos is " << nPos << endl;
+ //if (nPosition != 0x01)
+ //*pOut << "must restart by eating remainder single byte data units" << endl;
+ xVBAStream->SeekRel(2);
+ nClean=0;
+ Output(WINDOWLEN,aHistory);
+ break;
+ }
+ //This is the normal case for when the data unit is not a
+ //token to be looked up, but instead some normal data which
+ //can be output, and placed in the history.
+ if (xVBAStream->Read(&aHistory[nPos%WINDOWLEN],1))
+ {
+ nPos++;
+ //temp removed
+ //*pOut << aHistory[nPos++%WINDOWLEN];
+ }
+ if (nClean == 0)
+ nClean=1;
+ //*pOut << "pos is " << nPos << " " << xVBAStream->Tell() << endl;
+ }
+ }
+ }
+ if (nPos%WINDOWLEN)
+ Output(nPos%WINDOWLEN,aHistory);
+ return(nPos);
+}
+
diff --git a/svx/source/msfilter/msvbasic.hxx b/svx/source/msfilter/msvbasic.hxx
new file mode 100644
index 0000000000..b1105f4f92
--- /dev/null
+++ b/svx/source/msfilter/msvbasic.hxx
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * $RCSfile: msvbasic.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _MSVBASIC_HXX
+#define _MSVBASIC_HXX
+
+#ifdef _SOLAR_H
+#include <tools/solar.h>
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _DYNARY_HXX
+#include <tools/dynary.hxx>
+#endif
+
+
+/* class VBA:
+ * The VBA class provides a set of methods to handle Visual Basic For
+ * Applications streams, the constructor is given the root ole2 stream
+ * of the document, Open reads the VBA project file and figures out
+ * the number of VBA streams, and the offset of the data within them.
+ * Decompress decompresses a particular numbered stream, NoStreams returns
+ * this number, and StreamName can give you the streams name. Decompress
+ * will return a string with the decompressed data. The optional extra
+ * argument will be set if not NULL to 1 in the case of a string overflow,
+ * if I can figure out how to do that.
+ *
+ * Otherwise it is possible to inherit from VBA and implement a Output
+ * member which gets called with each 4096 output sized block.
+ *
+ * cmc
+ * */
+
+#define WINDOWLEN 4096
+DECLARE_DYNARRAY(StringArray,String *);
+
+class VBA_Impl
+{
+public:
+ VBA_Impl( SvStorage &rIn, BOOL bCmmntd = TRUE )
+ : xStor(&rIn), pOffsets(0), nOffsets(0),
+ bCommented(bCmmntd),aVBAStrings(0),nLines(0),
+ sComment(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Rem ")))
+ {}
+ ~VBA_Impl()
+ {
+ if (nOffsets)
+ delete [] pOffsets;
+ for(int i=0;i<aVBAStrings.GetSize();i++)
+ delete aVBAStrings.Get(i);
+ }
+ //0 for failure, 1 for success
+ BOOL Open( const String &rToplevel, const String &rSublevel);
+ const StringArray & Decompress(UINT16 nIndex, int *pOverflow=0);
+ UINT16 GetNoStreams() const { return nOffsets; }
+ const String &GetStreamName( UINT16 nIndex ) const
+ {
+ DBG_ASSERT( nIndex < nOffsets, "Index out of range" );
+ return pOffsets[ nIndex ].sName;
+ }
+ virtual void Output(int len,const BYTE *data);
+private:
+ struct VBAOffset_Impl
+ {
+ String sName;
+ UINT32 nOffset;
+ };
+
+ SvStorageRef xVBA;
+ StringArray aVBAStrings;
+ String sComment;
+ SvStorageRef xStor;
+ VBAOffset_Impl *pOffsets;
+ UINT16 nOffsets;
+ BYTE aHistory[ WINDOWLEN ];
+ BOOL bCommented;
+ int nLines;
+
+ //0 for failure, anything else for success
+ int ReadVBAProject(const SvStorageRef &rxVBAStorage);
+ int DecompressVBA(int index, SvStorageStreamRef &rxVBAStream);
+ void Confirm12Zeros(SvStorageStreamRef &xVBAProject);
+ void ConfirmHalfWayMarker(SvStorageStreamRef &xVBAProject);
+ void ConfirmFixedMiddle(SvStorageStreamRef &xVBAProject);
+ void ConfirmFixedMiddle2(SvStorageStreamRef &xVBAProject);
+ void ConfirmFixedOctect(SvStorageStreamRef &xVBAProject);
+ BYTE ReadPString(SvStorageStreamRef &xVBAProject);
+};
+
+
+
+
+#endif
diff --git a/svx/source/msfilter/svxmsbas.cxx b/svx/source/msfilter/svxmsbas.cxx
new file mode 100644
index 0000000000..752f1e43d2
--- /dev/null
+++ b/svx/source/msfilter/svxmsbas.cxx
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxmsbas.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _BASMGR_HXX
+#include <basic/basmgr.hxx>
+#endif
+#ifndef _SB_SBMOD_HXX
+#include <basic/sbmod.hxx>
+#endif
+#ifndef _SVXERR_HXX
+#include <svxerr.hxx>
+#endif
+
+#ifndef _SVXMSBAS_HXX
+#include <svxmsbas.hxx>
+#endif
+#ifndef _MSVBASIC_HXX
+#include <msvbasic.hxx>
+#endif
+
+int SvxImportMSVBasic::Import( const String& rStorageName,
+ const String &rSubStorageName,
+ BOOL bAsComment, BOOL bStripped )
+{
+ int nRet = 0;
+ if( bImport && ImportCode_Impl( rStorageName, rSubStorageName,
+ bAsComment, bStripped ))
+ nRet |= 1;
+
+ if( bCopy && CopyStorage_Impl( rStorageName, rSubStorageName ))
+ nRet |= 2;
+
+ return nRet;
+}
+
+BOOL SvxImportMSVBasic::CopyStorage_Impl( const String& rStorageName,
+ const String& rSubStorageName)
+{
+ BOOL bValidStg = FALSE;
+ {
+ SvStorageRef xVBAStg( xRoot->OpenStorage( rStorageName,
+ STREAM_READWRITE | STREAM_NOCREATE |
+ STREAM_SHARE_DENYALL ));
+ if( xVBAStg.Is() && !xVBAStg->GetError() )
+ {
+ SvStorageRef xVBASubStg( xVBAStg->OpenStorage( rSubStorageName,
+ STREAM_READWRITE | STREAM_NOCREATE |
+ STREAM_SHARE_DENYALL ));
+ if( xVBASubStg.Is() && !xVBASubStg->GetError() )
+ {
+ // then we will copy these storages into the SfxObjectShell-storage
+ bValidStg = TRUE;
+ }
+ }
+ }
+
+ if( bValidStg )
+ {
+ SvStorageRef xDstRoot( rDocSh.GetStorage() );
+ String aDstStgName( GetMSBasicStorageName() );
+ bValidStg = xRoot->CopyTo( rStorageName, xDstRoot, aDstStgName );
+ }
+
+ return bValidStg;
+}
+
+BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName,
+ const String &rSubStorageName,
+ BOOL bAsComment, BOOL bStripped )
+{
+ BOOL bRet = FALSE;
+ VBA_Impl aVBA( *xRoot, bAsComment );
+ if( aVBA.Open(rStorageName,rSubStorageName) )
+ {
+ SFX_APP()->EnterBasicCall();
+//this method is removed in the Unicode-Version
+// rDocSh.GetSbxObject();
+
+ BasicManager *pBasicMan = rDocSh.GetBasicManager();
+ DBG_ASSERT( pBasicMan, "Wo ist der BasicManager?" );
+
+ StarBASIC *pBasic;
+ if( pBasicMan && (0 != (pBasic = pBasicMan->GetStdLib()) ) )
+ {
+ for( UINT16 i=0; i<aVBA.GetNoStreams();i++)
+ {
+ StringArray aDecompressed = aVBA.Decompress(i);
+ ByteString sByteBasic(aVBA.GetStreamName(i),
+ RTL_TEXTENCODING_ASCII_US,
+ (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_UNDERLINE|
+ RTL_UNICODETOTEXT_FLAGS_INVALID_UNDERLINE |
+ RTL_UNICODETOTEXT_FLAGS_PRIVATE_MAPTO0 |
+ RTL_UNICODETOTEXT_FLAGS_NOCOMPOSITE)
+ );
+
+ //const String &sBasicModule = aVBA.GetStreamName( i);
+ const String sBasicModule(sByteBasic,
+ RTL_TEXTENCODING_ASCII_US);
+ for(INT32 j=0;j<aDecompressed.GetSize();j++)
+ {
+ String sModule(sBasicModule);
+ if (j>0)
+ {
+ sModule.AppendAscii("_Part");
+ sModule += String::CreateFromInt32(j+1);
+ }
+
+ if( bStripped )
+ {
+ xub_StrLen nBegin, nEnd;
+ static const sal_Char sAttribute[] = "Attribute";
+
+ while( STRING_NOTFOUND != (nBegin =
+ aDecompressed.Get(j)->SearchAscii(sAttribute)))
+ {
+ nEnd = aDecompressed.Get(j)->Search('\n',nBegin);
+ nBegin = aDecompressed.Get(j)->SearchBackward('\n',nBegin);
+ if( STRING_NOTFOUND == nBegin )
+ nBegin=0;
+ aDecompressed.Get(j)->Erase(nBegin,nEnd-nBegin+1);
+ }
+ }
+
+ if( aDecompressed.Get(j)->Len() )
+ {
+ if (bAsComment)
+ {
+ String sTemp( String::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "Sub " )));
+ String sMunge(sModule);
+ //Streams can have spaces in them, but modulenames
+ //cannot !
+ sMunge.SearchAndReplaceAll(' ','_');
+
+ sTemp += sMunge;
+ sTemp.AppendAscii("\n");
+ aDecompressed.Get(j)->Insert(sTemp,0);
+ aDecompressed.Get(j)->InsertAscii("\nEnd Sub");
+ }
+
+ SbModule *pModule = pBasic->MakeModule( sModule,
+ *aDecompressed.Get(j));
+ if( pModule )
+ {
+ pModule->Compile();
+ bRet = TRUE;
+ }
+ }
+ }
+ }
+ pBasic->SetModified( FALSE );
+ }
+ SFX_APP()->LeaveBasicCall();
+ }
+ return bRet;
+}
+
+ULONG SvxImportMSVBasic::SaveOrDelMSVBAStorage( BOOL bSaveInto,
+ const String& rStorageName )
+{
+ ULONG nRet = ERRCODE_NONE;
+ SvStorageRef xSrcRoot( rDocSh.GetStorage() );
+ String aDstStgName( GetMSBasicStorageName() );
+ SvStorageRef xVBAStg( xSrcRoot->OpenStorage( aDstStgName,
+ STREAM_READWRITE | STREAM_NOCREATE |
+ STREAM_SHARE_DENYALL ));
+ if( xVBAStg.Is() && !xVBAStg->GetError() )
+ {
+ xVBAStg = 0;
+ if( bSaveInto )
+ {
+ BasicManager *pBasicMan = rDocSh.GetBasicManager();
+ if( pBasicMan && pBasicMan->IsBasicModified() )
+ {
+ nRet = ERRCODE_SVX_MODIFIED_VBASIC_STORAGE;
+
+// don't reset the modified flag
+// StarBASIC *pBasic = pBasicMan->GetStdLib();
+// if( pBasic )
+// pBasic->SetModified( FALSE );
+ }
+// JP 02.05.00: Bug 75492 - save always the BasicStorage
+// else
+ xSrcRoot->CopyTo( aDstStgName, xRoot, rStorageName);
+ }
+// we never stored this storage in our own format, so it may not be deleted
+// else
+// rDocSh.SvPersist::Remove( aDstStgName );
+ }
+ return nRet;
+}
+
+ // check if the MS-VBA-Storage exist in the RootStorage of the DocShell.
+ // If it exist, then return the WarningId for loosing the information.
+ULONG SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocSh)
+{
+ SvStorageRef xSrcRoot( rDocSh.GetStorage() );
+ SvStorageRef xVBAStg( xSrcRoot->OpenStorage( GetMSBasicStorageName(),
+ STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYALL ));
+ return ( xVBAStg.Is() && !xVBAStg->GetError() )
+ ? ERRCODE_SVX_VBASIC_STORAGE_EXIST
+ : ERRCODE_NONE;
+}
+
+String SvxImportMSVBasic::GetMSBasicStorageName()
+{
+char __READONLY_DATA sSO_VBAStgName[] = "_MS_VBA_Macros";
+ return String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(sSO_VBAStgName));
+}
+
diff --git a/svx/source/options/makefile.mk b/svx/source/options/makefile.mk
new file mode 100644
index 0000000000..0ecc69f65a
--- /dev/null
+++ b/svx/source/options/makefile.mk
@@ -0,0 +1,158 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+#
+#
+#
+#*************************************************************************
+PRJ=..$/..
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=svxpch
+PROJECTPCHSOURCE=$(PRJ)$/util\svxpch
+
+PRJNAME=svx
+TARGET=options
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+.IF "$(GUI)"=="MAC"
+CFLAGS+=-D DG_DLL
+.ELSE
+CFLAGS+=-DDG_DLL
+.ENDIF
+
+# --- Files --------------------------------------------------------
+
+.IF "$(header)" == ""
+
+IMGLST_SRS=$(SRS)$/options.srs
+BMP_IN=$(PRJ)$/win/res
+
+CXXFILES = \
+ optpath.cxx \
+ optdict.cxx \
+ optitems.cxx \
+ optspell.cxx \
+ optgenrl.cxx \
+ optsave.cxx \
+ adritem.cxx \
+ optlingu.cxx \
+ optmail.cxx \
+ optgrid.cxx \
+ optinet2.cxx \
+ optldap.cxx \
+ ldapdlg.cxx \
+ multipat.cxx \
+ multifil.cxx \
+ optextbr.cxx
+
+SRCFILES = \
+ optgenrl.src \
+ optspell.src \
+ optdict.src \
+ optsave.src \
+ optpath.src \
+ optlingu.src \
+ optmail.src \
+ optgrid.src \
+ optinet2.src \
+ optldap.src \
+ multipat.src \
+ optextbr.src
+
+SLOFILES= \
+ $(SLO)$/optpath.obj \
+ $(SLO)$/optdict.obj \
+ $(SLO)$/optitems.obj \
+ $(SLO)$/optspell.obj \
+ $(SLO)$/optgenrl.obj \
+ $(SLO)$/optsave.obj \
+ $(SLO)$/adritem.obj \
+ $(SLO)$/optlingu.obj \
+ $(SLO)$/optmail.obj \
+ $(SLO)$/optgrid.obj \
+ $(SLO)$/optinet2.obj \
+ $(SLO)$/optldap.obj \
+ $(SLO)$/ldapdlg.obj \
+ $(SLO)$/multipat.obj \
+ $(SLO)$/multifil.obj \
+ $(SLO)$/optextbr.obj
+
+SVXLIGHTOBJFILES= \
+ $(OBJ)$/adritem.obj
+
+.IF "$(GUI)"=="WIN"
+SLOFILES+= \
+ $(SLO)$/optdll.obj
+.ENDIF
+.ENDIF
+
+EXCEPTIONSFILES= \
+ $(SLO)$/optdict.obj \
+ $(SLO)$/optlingu.obj
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/options/multipat.src b/svx/source/options/multipat.src
new file mode 100644
index 0000000000..50ce2b43cb
--- /dev/null
+++ b/svx/source/options/multipat.src
@@ -0,0 +1,315 @@
+/*************************************************************************
+ *
+ * $RCSfile: multipat.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include --------------------------------------------------------------
+#include "multipat.hrc"
+#include "helpid.hrc"
+#include "dialogs.hrc"
+ // pragma ---------------------------------------------------------------
+
+ // RID_SVXDLG_MULTIPATH --------------------------------------------------
+ModalDialog RID_SVXDLG_MULTIPATH
+{
+ HelpId = HID_MULTIPATH ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 256 , 90 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Pfade auswählen : Pfade auswõhlen */
+ /* ### ACHTUNG: Neuer Text in Resource? Pfade auswählen : Pfade auswõhlen */
+ Text = "Pfade auswählen" ;
+ Text [ English ] = "Select paths" ;
+ Text [ english_us ] = "Select Paths" ;
+ Text [ portuguese_brazilian ] = "Pfade auswählen" ;
+ Text [ swedish ] = "Välj sökvägar" ;
+ Text [ danish ] = "Vælg stier" ;
+ Text [ italian ] = "Seleziona percorsi" ;
+ Text [ spanish ] = "Seleccionar rutas" ;
+ Text [ french ] = "Sélection de chemins" ;
+ Text [ dutch ] = "Paden selecteren" ;
+ Text [ portuguese ] = "Seleccionar atalhos" ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ ListBox LB_MULTIPATH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 120 , 64 ) ;
+ AutoHScroll = TRUE ;
+ };
+ PushButton BTN_ADD_MULTIPATH
+ {
+ Pos = MAP_APPFONT ( 138 , 14 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Hi~nzufügen... : Hi~nzuf³gen... */
+ /* ### ACHTUNG: Neuer Text in Resource? Hi~nzufügen... : Hi~nzuf³gen... */
+ Text = "Hi~nzufügen..." ;
+ Text [ English ] = "Add..." ;
+ Text [ portuguese ] = "~Adicionar..." ;
+ Text [ english_us ] = "~Add..." ;
+ Text [ portuguese_brazilian ] = "Hi~nzufügen" ;
+ Text [ swedish ] = "Lägg t~ill..." ;
+ Text [ danish ] = "Tilføj..." ;
+ Text [ italian ] = "~Aggiungi..." ;
+ Text [ spanish ] = "~Añadir..." ;
+ Text [ french ] = "A~jouter..." ;
+ Text [ dutch ] = "Toe~voegen..." ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)...";
+ Text[ russian ] = "Äîáàâèòü...";
+ Text[ polish ] = "Dodaj...";
+ Text[ japanese ] = "’ljÁ(~A)...";
+ Text[ chinese_traditional ] = "¼W¥[(~A)...";
+ Text[ arabic ] = "...ÅÖÇÝÉ";
+ Text[ dutch ] = "Toe~voegen...";
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)...";
+ Text[ greek ] = "ÐñïóèÞêç...";
+ Text[ korean ] = "Ãß°¡(~A)...";
+ Text[ turkish ] = "Ekle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_DEL_MULTIPATH
+ {
+ Pos = MAP_APPFONT ( 138 , 31 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ Text [ English ] = "~Delete" ;
+ Text [ portuguese ] = "E~liminar" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ portuguese_brazilian ] = "~Löschen" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ italian ] = "~Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text[ chinese_simplified ] = "ɾ³ý(~D)";
+ Text[ russian ] = "Óäàëèòü";
+ Text[ polish ] = "Usuñ";
+ Text[ japanese ] = "íœ(~D)";
+ Text[ chinese_traditional ] = "§R°£(~D)";
+ Text[ arabic ] = "ÍÐÝ";
+ Text[ dutch ] = "~Wissen";
+ Text[ chinese_simplified ] = "ɾ³ý(~D)";
+ Text[ greek ] = "ÄéáãñáöÞ";
+ Text[ korean ] = "»èÁ¦(~D)";
+ Text[ turkish ] = "Sil";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_MULTIPATH
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 188 , 81 ) ;
+ Text = "Pfade" ;
+ Text [ English ] = "Paths" ;
+ Text [ english_us ] = "Paths" ;
+ Text [ portuguese_brazilian ] = "Pfade" ;
+ Text [ swedish ] = "Sökvägar" ;
+ Text [ danish ] = "Stier" ;
+ Text [ italian ] = "Percorsi" ;
+ Text [ spanish ] = "Rutas" ;
+ Text [ french ] = "Chemins" ;
+ Text [ dutch ] = "Paden" ;
+ Text [ portuguese ] = "Atalhos" ;
+ Text[ chinese_simplified ] = "·¾¶";
+ Text[ russian ] = "Ïóòè";
+ Text[ polish ] = "Œcie¿ki";
+ Text[ japanese ] = "Êß½";
+ Text[ chinese_traditional ] = "¸ô®|";
+ Text[ arabic ] = "ÇáãÓÇÑÇÊ";
+ Text[ dutch ] = "Paden";
+ Text[ chinese_simplified ] = "·¾¶";
+ Text[ greek ] = "ÄéáäñïìÝò";
+ Text[ korean ] = "°æ·Î";
+ Text[ turkish ] = "Veri yollarý";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_MULTIPATH_OK
+ {
+ Pos = MAP_APPFONT ( 200 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ CancelButton BTN_MULTIPATH_CANCEL
+ {
+ Pos = MAP_APPFONT ( 200 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BTN_MULTIPATH_HELP
+ {
+ Pos = MAP_APPFONT ( 200 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ Text[ chinese_simplified ] = "Ñ¡Ôñ·¾¶";
+ Text[ russian ] = "Âûáðàòü ïóòè";
+ Text[ polish ] = "Wybierz œcie¿ki";
+ Text[ japanese ] = "Êß½‚Ì‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü¸ô®|";
+ Text[ arabic ] = "ÊÍÏíÏ ÇáãÓÇÑÇÊ";
+ Text[ dutch ] = "Paden selecteren";
+ Text[ chinese_simplified ] = "Ñ¡Ôñ·¾¶";
+ Text[ greek ] = "ÅðéëïãÞ äéáäñïìþí";
+ Text[ korean ] = "°æ·Î ¼±ÅÃ";
+ Text[ turkish ] = "Veri yollarýný seç";
+ Text[ language_user1 ] = " ";
+};
+String RID_MULTIPATH_DBL_ERR
+{
+ Text = "Der Pfad %1 ist bereits vorhanden." ;
+ Text [ ENGLISH ] = "The path %1 is already defined." ;
+ Text [ english_us ] = "The path %1 already exists." ;
+ Text [ portuguese_brazilian ] = "Der Pfad %1 ist bereits vorhanden." ;
+ Text [ swedish ] = "Sökvägen %1 finns redan." ;
+ Text [ danish ] = "Stien %1 findes allerede." ;
+ Text [ italian ] = "Il percorso %1 esiste già." ;
+ Text [ spanish ] = "La ruta %1 ya existe." ;
+ Text [ french ] = "Le chemin %1 existe déjà." ;
+ Text [ dutch ] = "Pad %1 bestaat reeds." ;
+ Text [ portuguese ] = "O atalho %1 já existe." ;
+ Text[ chinese_simplified ] = "Õâ¸ö·¾¶ %1 ÒѾ­´æÔÚ¡£";
+ Text[ russian ] = "Ïóòü %1 óæå èìååòñÿ.";
+ Text[ polish ] = "Œcie¿ka %1 ju¿ istnieje.";
+ Text[ japanese ] = "%1‚ÌÊß½‚ÍŠù‚É‚ ‚è‚Ü‚·B";
+ Text[ chinese_traditional ] = "³o­Ó¸ô®| %1 ¤w¸g¦s¦b¡C";
+ Text[ arabic ] = "ÇáãÓÇÑ %1 ãæÌæÏ ãÓÈÞÇð.";
+ Text[ dutch ] = "Pad %1 bestaat reeds.";
+ Text[ chinese_simplified ] = "Õâ¸ö·¾¶ %1 ÒѾ­´æÔÚ¡£";
+ Text[ greek ] = "Ç äéáäñïìÞ %1 õðÜñ÷åé Þäç.";
+ Text[ korean ] = "°æ·Î%1°¡ ÀÌ¹Ì ÀÖ½À´Ï´Ù.";
+ Text[ turkish ] = "Veri yolu %1 mevcut durumda";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_MULTIFILE_DBL_ERR
+{
+ Text = "Die Datei %1 ist bereits vorhanden." ;
+ Text [ ENGLISH ] = "The file %1 is already defined." ;
+ Text [ english_us ] = "The file %1 already exists." ;
+ Text [ portuguese ] = "O ficheiro %1 já existe." ;
+ Text [ portuguese_brazilian ] = "Die Datei %1 ist bereits vorhanden." ;
+ Text [ swedish ] = "Filen %1 existerar redan." ;
+ Text [ danish ] = "Filen %1 findes allerede." ;
+ Text [ italian ] = "Il file %1 esiste già." ;
+ Text [ spanish ] = "El archivo %1 ya existe." ;
+ Text [ french ] = "Le fichier %1existe déjà." ;
+ Text [ dutch ] = "Bestand %1 bestaat reeds" ;
+ Text[ chinese_simplified ] = "Õâ¸öÎļþ %1 ÒѾ­´æÔÚ¡£";
+ Text[ russian ] = "Ôàéë %1 óæå èìååòñÿ.";
+ Text[ polish ] = "Plik %1 ju¿ istnieje.";
+ Text[ japanese ] = "%1‚Ì̧²Ù‚ÍŠù‚É‚ ‚è‚Ü‚·B";
+ Text[ chinese_traditional ] = "³o­ÓÀÉ®× %1 ¤w¸g¦s¦b¡C";
+ Text[ arabic ] = "ÇáãáÝ %1 ãæÌæÏ ãÓÈÞÇð.";
+ Text[ dutch ] = "Bestand %1 bestaat reeds";
+ Text[ chinese_simplified ] = "Õâ¸öÎļþ %1 ÒѾ­´æÔÚ¡£";
+ Text[ greek ] = "Ôï áñ÷åßï %1 õðÜñ÷åé Þäç.";
+ Text[ korean ] = "ÆÄÀÏ%1°¡ ÀÌ¹Ì ÀÖ½À´Ï´Ù.";
+ Text[ turkish ] = "Dosya %1 mevcut durumda.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FILE_TITLE
+{
+ Text = "Dateien auswählen" ;
+ Text [ English ] = "Select files" ;
+ Text [ english_us ] = "Select files" ;
+ Text [ portuguese ] = "Seleccionar ficheiros" ;
+ Text [ portuguese_brazilian ] = "Dateien auswählen" ;
+ Text [ swedish ] = "Välj ut filer" ;
+ Text [ danish ] = "Vælg filer" ;
+ Text [ italian ] = "Seleziona file" ;
+ Text [ spanish ] = "Seleccionar archivos" ;
+ Text [ french ] = "Sélectionner des fichiers" ;
+ Text [ dutch ] = "Bestanden selecteren" ;
+ Text[ chinese_simplified ] = "Ñ¡ÔñÎļþ";
+ Text[ russian ] = "Âûáîð ôàéëîâ";
+ Text[ polish ] = "Wybierz pliki";
+ Text[ japanese ] = "̧²Ù‚Ì‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾ÜÀÉ®×";
+ Text[ arabic ] = "ÇÎÊíÇÑ ÇáãáÝÇÊ";
+ Text[ dutch ] = "Bestanden selecteren";
+ Text[ chinese_simplified ] = "Ñ¡ÔñÎļþ";
+ Text[ greek ] = "ÅðéëïãÞ áñ÷åßùí";
+ Text[ korean ] = "ÆÄÀÏ ¼±ÅÃ";
+ Text[ turkish ] = "Dosyalarý seç";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FILE_GB
+{
+ Text = "Dateien" ;
+ Text [ English ] = "Files" ;
+ Text [ english_us ] = "Files" ;
+ Text [ portuguese ] = "Ficheiros" ;
+ Text [ portuguese_brazilian ] = "Dateien" ;
+ Text [ swedish ] = "Filer" ;
+ Text [ danish ] = "Filer" ;
+ Text [ italian ] = "File" ;
+ Text [ spanish ] = "Archivos" ;
+ Text [ french ] = "Fichiers" ;
+ Text [ dutch ] = "Bestanden" ;
+ Text[ chinese_simplified ] = "Îļþ";
+ Text[ russian ] = "Ôàéëû";
+ Text[ polish ] = "Pliki";
+ Text[ japanese ] = "̧²Ù";
+ Text[ chinese_traditional ] = "ÀÉ®×";
+ Text[ arabic ] = "ÇáãáÝÇÊ";
+ Text[ dutch ] = "Bestanden";
+ Text[ chinese_simplified ] = "Îļþ";
+ Text[ greek ] = "Áñ÷åßá";
+ Text[ korean ] = "ÆÄÀÏ";
+ Text[ turkish ] = "Dosyalar";
+ Text[ language_user1 ] = " ";
+};
+ // ******************************************************************* EOF
diff --git a/svx/source/options/optdict.src b/svx/source/options/optdict.src
new file mode 100644
index 0000000000..dc5e9498e3
--- /dev/null
+++ b/svx/source/options/optdict.src
@@ -0,0 +1,613 @@
+/*************************************************************************
+ *
+ * $RCSfile: optdict.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include <sfx2/sfx.hrc>
+#include "helpid.hrc"
+#include "dialogs.hrc"
+#include "optdict.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SFXDLG_NEWDICT ----------------------------------------------------
+ModalDialog RID_SFXDLG_NEWDICT
+{
+ HelpId = HID_OPTIONS_DICT_NEW ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 213 , 66 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Benutzerwörterbuch anlegen : Benutzerw÷rterbuch anlegen */
+ /* ### ACHTUNG: Neuer Text in Resource? Benutzerwörterbuch anlegen : Benutzerw÷rterbuch anlegen */
+ Text = "Benutzerwörterbuch anlegen" ;
+ Text [ ENGLISH ] = "New dictionary" ;
+ Text [ norwegian ] = "Ny katalog" ;
+ Text [ italian ] = "Nuovo dizionario" ;
+ Text [ portuguese_brazilian ] = "New dictionary" ;
+ Text [ portuguese ] = "Novo dicionário" ;
+ Text [ finnish ] = "New dictionary" ;
+ Text [ danish ] = "Opret brugerordbog" ;
+ Text [ french ] = "Nouveau dictionnaire de l'utilisateur" ;
+ Text [ swedish ] = "Skapa användarordbok" ;
+ Text [ dutch ] = "Nieuw woordenboek" ;
+ Text [ spanish ] = "Crear diccionario de usuario" ;
+ Text [ english_us ] = "New Dictionary" ;
+ Moveable = TRUE ;
+ FixedText FT_DICTNAME
+ {
+ Pos = MAP_APPFONT ( 11 , 15 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "~Name" ;
+ Text [ ENGLISH ] = "~Name" ;
+ Text [ norwegian ] = "~Navn" ;
+ Text [ italian ] = "~Nome" ;
+ Text [ portuguese_brazilian ] = "~Nome" ;
+ 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" ;
+ LeftLabel = TRUE ;
+ 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_DICTNAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 55 , 14 ) ;
+ Size = MAP_APPFONT ( 90 , 12 ) ;
+ MaxTextLength = 32 ;
+ };
+ FixedText FT_DICTLANG
+ {
+ Pos = MAP_APPFONT ( 12 , 30 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "~Sprache" ;
+ Text [ ENGLISH ] = "~Language" ;
+ Text [ norwegian ] = "~Language" ;
+ Text [ italian ] = "~Lingua" ;
+ Text [ portuguese_brazilian ] = "~Idioma" ;
+ Text [ portuguese ] = "~Língua" ;
+ Text [ finnish ] = "K~ieli" ;
+ Text [ danish ] = "Sprog" ;
+ Text [ french ] = "~Langue" ;
+ Text [ swedish ] = "~Språk" ;
+ Text [ dutch ] = "~Taal" ;
+ Text [ spanish ] = "I~dioma" ;
+ Text [ english_us ] = "~Language" ;
+ LeftLabel = TRUE ;
+ Text[ chinese_simplified ] = "ÓïÑÔ(~L)";
+ Text[ russian ] = "ßçûê";
+ Text[ polish ] = "Jêzyk";
+ Text[ japanese ] = "Œ¾Œê(~L)";
+ Text[ chinese_traditional ] = "»y¨¥(~L)";
+ Text[ arabic ] = "ÇááÛÉ";
+ Text[ greek ] = "Ãëþóóá";
+ Text[ korean ] = "¾ð¾î(~L)";
+ Text[ turkish ] = "Dil";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_DICTLANG
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 55 , 30 ) ;
+ Size = MAP_APPFONT ( 90 , 66 ) ;
+ DropDown = TRUE ;
+ };
+ CheckBox BTN_EXCEPT
+ {
+ Pos = MAP_APPFONT ( 12 , 44 ) ;
+ Size = MAP_APPFONT ( 57 , 10 ) ;
+ Text = "~Ausnahme (-)" ;
+ Text [ ENGLISH ] = "~Exception (-)" ;
+ Text [ norwegian ] = "~Unntak (-)" ;
+ Text [ italian ] = "~Eccezione (-)" ;
+ Text [ portuguese_brazilian ] = "~Exceção (-)" ;
+ Text [ portuguese ] = "~Excepção (-)" ;
+ Text [ finnish ] = "Po~ikkeus (-)" ;
+ Text [ danish ] = "Undtagelse (-)" ;
+ Text [ french ] = "~Exception (-)" ;
+ Text [ swedish ] = "~Undantag (-)" ;
+ Text [ dutch ] = "~Uitzondering (-)" ;
+ Text [ spanish ] = "~Excepción (-)" ;
+ Text [ english_us ] = "~Exception (-)" ;
+ Text[ chinese_simplified ] = "ÀýÍâ(-)";
+ Text[ russian ] = "Èñêëþ÷åíèå (-)";
+ Text[ polish ] = "Wyj¹tek (-)";
+ Text[ japanese ] = "—áŠO(-) (~E)";
+ Text[ chinese_traditional ] = "¨Ò¥~(-)";
+ Text[ arabic ] = "ÇÓÊËäÇÁ (-)";
+ Text[ greek ] = "Åî~áßñåóç (-)";
+ Text[ korean ] = "¿¹¿Ü (-)(~E)";
+ Text[ turkish ] = "Ýstisna (-)";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_NEWDICT
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 145 , 57 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Wörterbuch : W÷rterbuch */
+ /* ### ACHTUNG: Neuer Text in Resource? Wörterbuch : W÷rterbuch */
+ Text = "Wörterbuch" ;
+ Text [ ENGLISH ] = "Dictionary" ;
+ Text [ norwegian ] = "Ordliste" ;
+ Text [ italian ] = "Dizionario" ;
+ Text [ portuguese_brazilian ] = "Dicionário" ;
+ Text [ portuguese ] = "Dicionário" ;
+ Text [ finnish ] = "Dictionary" ;
+ Text [ danish ] = "Ordbog" ;
+ Text [ french ] = "Dictionnaire" ;
+ Text [ swedish ] = "Ordbok" ;
+ Text [ dutch ] = "Woordenboek" ;
+ Text [ spanish ] = "Diccionario" ;
+ Text [ english_us ] = "Dictionary" ;
+ Text[ chinese_simplified ] = "´Êµä";
+ Text[ russian ] = "Ñëîâàðü";
+ Text[ polish ] = "S³ownik";
+ Text[ japanese ] = "Ž«‘";
+ Text[ chinese_traditional ] = "µü¨å";
+ Text[ arabic ] = "ÇáÞÇãæÓ";
+ Text[ greek ] = "Ëåîéêü";
+ Text[ korean ] = "ȍ˟";
+ Text[ turkish ] = "Sözlük";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_NEWDICT_OK
+ {
+ Pos = MAP_APPFONT ( 157 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Disable = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_NEWDICT_ESC
+ {
+ Pos = MAP_APPFONT ( 157 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BTN_NEWDICT_HLP
+ {
+ Pos = MAP_APPFONT ( 157 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ Text[ chinese_simplified ] = "½¨Á¢Óû§´Êµä";
+ Text[ russian ] = "Ñîçäàòü ñëîâàðü ïîëüçîâàòåëÿ";
+ Text[ polish ] = "Utwórz w³asny s³ownik";
+ Text[ japanese ] = "Õ°»Þ°Ž«‘‚Ìì¬";
+ Text[ chinese_traditional ] = "¦Û­qµü¨å";
+ Text[ arabic ] = "ÅäÔÇÁ ÞÇãæÓ ÇáãÓÊÎÏã";
+ Text[ greek ] = "Äçìéïõñãßá ëåîéêïý";
+ Text[ korean ] = "»õ »ç¿ëÀÚ»çÀü";
+ Text[ turkish ] = "Kullanýcý sözlüðü oluþtur";
+ Text[ language_user1 ] = " ";
+};
+
+ // RID_SFXDLG_EDITDICT ---------------------------------------------------
+ModalDialog RID_SFXDLG_EDITDICT
+{
+ HelpId = HID_OPTIONS_DICT_EDIT ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT( 270, 161 );
+
+ /* ### ACHTUNG: Neuer Text in Resource? Benutzerwörterbuch bearbeiten : Benutzerw÷rterbuch bearbeiten */
+ /* ### ACHTUNG: Neuer Text in Resource? Benutzerwörterbuch bearbeiten : Benutzerw÷rterbuch bearbeiten */
+ Text = "Benutzerwörterbuch bearbeiten" ;
+ Text [ ENGLISH ] = "Edit dictionary" ;
+ Text [ norwegian ] = "Rediger ordliste" ;
+ Text [ italian ] = "Modifica dizionario" ;
+ Text [ portuguese_brazilian ] = "Edit dictionary" ;
+ Text [ portuguese ] = "Editar dicionário do utilizador" ;
+ Text [ finnish ] = "Edit dictionary" ;
+ Text [ danish ] = "Rediger brugerordbog" ;
+ Text [ french ] = "Édition du dictionnaire de l'utilisateur" ;
+ Text [ swedish ] = "Redigera användarordbok" ;
+ Text [ dutch ] = "Gebruikerswoordenboek bewerken" ;
+ Text [ spanish ] = "Editar diccionario de usuario" ;
+ Text [ english_us ] = "Edit Custom Dictionary" ;
+ Text[ chinese_simplified ] = "±à¼­Óû§´Êµä";
+
+ Moveable = TRUE ;
+ FixedText FT_BOOK
+ {
+ Pos = MAP_APPFONT ( 12 , 10 ) ;
+ Size = MAP_APPFONT ( 86 , 10 ) ;
+ Text = "~Buch" ;
+ Text [ ENGLISH ] = "~Book" ;
+ Text [ english_us ] = "~Book" ;
+ Text [ dutch ] = "~Boek" ;
+ Text [ italian ] = "Libro" ;
+ Text [ spanish ] = "~Libro" ;
+ Text [ french ] = "~Livre" ;
+ Text [ swedish ] = "~Bok" ;
+ Text [ danish ] = "Bog" ;
+ Text [ portuguese ] = "~Livro" ;
+ Text [ portuguese_brazilian ] = "~Buch" ;
+ Text[ chinese_simplified ] = "Êé¼®(~B)";
+ Text[ russian ] = "~Êíèãà";
+ Text[ polish ] = "Ksi¹¿ka";
+ Text[ japanese ] = "ÌÞ¯¸(~B)";
+ Text[ chinese_traditional ] = "®Ñ(~B)";
+ Text[ arabic ] = "ÇáßÊÇÈ";
+ Text[ greek ] = "Âéâëßï";
+ Text[ korean ] = "Ã¥(~B)";
+ Text[ turkish ] = "Kitap";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ALLDICTS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 82 , 9 ) ;
+ Size = MAP_APPFONT ( 121 , 62 ) ;
+ DropDown = TRUE ;
+ };
+ FixedText FT_DICTLANG
+ {
+ Pos = MAP_APPFONT ( 12 , 26 ) ;
+ Size = MAP_APPFONT ( 86 , 10 ) ;
+ Text = "S~prache" ;
+ Text [ English ] = "~Language" ;
+ Text [ english_us ] = "~Language" ;
+ Text [ dutch ] = "T~aal" ;
+ Text [ italian ] = "Lingua" ;
+ Text [ spanish ] = "I~dioma" ;
+ Text [ french ] = "~Langue" ;
+ Text [ swedish ] = "S~pråk" ;
+ Text [ danish ] = "Sprog" ;
+ Text [ portuguese_brazilian ] = "S~prache" ;
+ Text [ portuguese ] = "~Língua" ;
+ Text[ chinese_simplified ] = "ÓïÑÔ(~L)";
+ Text[ russian ] = "ßçûê";
+ Text[ polish ] = "Jêzyk";
+ Text[ japanese ] = "Œ¾Œê(~L)";
+ Text[ chinese_traditional ] = "»y¨¥(~L)";
+ Text[ arabic ] = "ÇááÛÉ";
+ Text[ greek ] = "Ãëþóóá";
+ Text[ korean ] = "¾ð¾î(~L)";
+ Text[ turkish ] = "Dil";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_DICTLANG
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 82 , 25 ) ;
+ Size = MAP_APPFONT ( 121 , 66 ) ;
+ DropDown = TRUE ;
+ };
+
+ GroupBox GB_EDITDICTS
+ {
+ Pos = MAP_APPFONT( 1, 1 );
+ Size = MAP_APPFONT( 268, 138 );
+ Hide=TRUE;
+ };
+
+ FixedText FT_WORD
+ {
+ Pos = MAP_APPFONT ( 13 , 46 ) ;
+ Size = MAP_APPFONT ( 40 , 8 ) ;
+ Text = "~Wort" ;
+ Text [ English ] = "Word" ;
+ Text[ english_us ] = "~Word";
+ Text[ portuguese ] = "~Palavra";
+ Text[ russian ] = "Ñëîâî";
+ Text[ dutch ] = "~Woord";
+ Text[ french ] = "Mot";
+ Text[ spanish ] = "~Palabra";
+ Text[ italian ] = "Parola";
+ Text[ danish ] = "Ord";
+ Text[ swedish ] = "~Ord";
+ Text[ polish ] = "S³owo";
+ Text[ portuguese_brazilian ] = "Word";
+ Text[ japanese ] = "’PŒê(~W)";
+ Text[ chinese_simplified ] = "×Ö(~W)";
+ Text[ chinese_traditional ] = "¦r(~W)";
+ Text[ arabic ] = "ÇáßáãÉ";
+ Text[ greek ] = "ËÝîç";
+ Text[ korean ] = "´Ü¾î(~W)";
+ Text[ turkish ] = "Sözcük";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_WORD
+ {
+ Pos = MAP_APPFONT ( 12 , 56 ) ;
+ Size = MAP_APPFONT ( 71 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_REPLACE
+ {
+ Pos = MAP_APPFONT ( 84 , 46 ) ;
+ Size = MAP_APPFONT ( 60 , 8 ) ;
+ Text = "~Vorschlag" ;
+ Text [ English ] = "Replace ~By:" ;
+ Text[ english_us ] = "Replace ~By:";
+ Text[ portuguese ] = "~Sugestão";
+ Text[ russian ] = "Âàðèàíòû";
+ Text[ dutch ] = "~Voorstel";
+ Text[ french ] = "Suggestion";
+ Text[ spanish ] = "~Sugerencia";
+ Text[ italian ] = "Proposta";
+ Text[ danish ] = "Forslag";
+ Text[ swedish ] = "~Förslag";
+ Text[ polish ] = "Propozycja";
+ Text[ portuguese_brazilian ] = "Replace ~By:";
+ Text[ japanese ] = "’ñˆÄ:(~B)";
+ Text[ chinese_simplified ] = "½¨Òé(~B)";
+ Text[ chinese_traditional ] = "«Øij(~B)";
+ Text[ arabic ] = "ÇáÇÞÊÑÇÍ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "Ðñïôåéíüìåíá:";
+ Text[ korean ] = "Á¦¾È:(~B)";
+ Text[ turkish ] = "Öneri";
+ };
+
+ Edit ED_REPLACE
+ {
+ Pos = MAP_APPFONT ( 83 , 56 ) ;
+ Size = MAP_APPFONT ( 120 , 12 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ };
+
+ PushButton PB_NEW_REPLACE
+ {
+ Pos = MAP_APPFONT ( 209 , 56 ) ;
+ Size = MAP_APPFONT ( 55 , 12 ) ;
+ Text = "~Neu" ;
+ Text [ English ] = "New" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~New" ;
+ Text [ italian ] = "Nuovo" ;
+ Text [ spanish ] = "~Nuevo" ;
+ Text [ french ] = "~Nouveau" ;
+ Text [ dutch ] = "~Nieuw" ;
+ Text [ swedish ] = "~Nytt" ;
+ Text [ danish ] = "Ny" ;
+ Text [ portuguese_brazilian ] = "~Neu" ;
+ Text [ portuguese ] = "~Novo" ;
+ Text[ chinese_simplified ] = "ÐÂ×Ö´Ê(~N)";
+ Text[ russian ] = "Ñîçä~àòü";
+ Text[ polish ] = "Nowy";
+ Text[ japanese ] = "V‹Kì¬(~N)";
+ Text[ chinese_traditional ] = "·s¦rµü(~N)";
+ Text[ arabic ] = "ÌÏíÏ";
+ Text[ greek ] = "Äçìéïõñãßá";
+ Text[ korean ] = "»õ·Î(~N)";
+ Text[ turkish ] = "Yeni";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_DELETE_REPLACE
+ {
+ Pos = MAP_APPFONT ( 209 , 71 ) ;
+ Size = MAP_APPFONT ( 55 , 12 ) ;
+ Text = "~Löschen" ;
+ Text [ English ] = "Delete" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ italian ] = "Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ portuguese_brazilian ] = "~Löschen" ;
+ 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 TLB_REPLACE
+ {
+ //HelpId = HID_OFACTL_AUTOCORR_REPLACE ;
+ Pos = MAP_APPFONT ( 12 , 71 ) ;
+ Size = MAP_APPFONT ( 191 , 58 ) ;
+ Border = TRUE ;
+ TabStop = TRUE ;
+ };
+ String STR_MODIFY
+ {
+ Text = "~Ersetzen" ;
+ Text [ English ] = "~Replace" ;
+ Text [ norwegian ] = "~Erstatte" ;
+ Text [ italian ] = "Sostituisci" ;
+ Text [ portuguese_brazilian ] = "~Substituir" ;
+ Text [ portuguese ] = "~Substituir" ;
+ Text [ finnish ] = "~Korvaa" ;
+ Text [ danish ] = "Erstat" ;
+ Text [ french ] = "~Remplacer" ;
+ Text [ swedish ] = "~Ersätt" ;
+ Text [ dutch ] = "~Vervangen" ;
+ Text [ spanish ] = "~Reemplazar" ;
+ Text [ english_us ] = "~Replace" ;
+ Text[ chinese_simplified ] = "¸üÌæ(~R)";
+ Text[ russian ] = "Çàìåíèòü";
+ Text[ polish ] = "Zamieñ";
+ Text[ japanese ] = "’uŠ·(~R)";
+ Text[ chinese_traditional ] = "´À¥N(~R)";
+ Text[ arabic ] = "ÇÓÊÈÏÇá";
+ Text[ greek ] = "ÁíôéêáôÜóôáóç";
+ Text[ korean ] = "´ëü(~R)";
+ Text[ turkish ] = "Deðiþtir";
+ Text[ language_user1 ] = " ";
+ };
+
+
+
+ HelpButton BTN_EDITHELP
+ {
+ Pos = MAP_APPFONT( 145, 143 );
+ Size = MAP_APPFONT( 55, 14 );
+ };
+
+ CancelButton BTN_EDITCLOSE
+ {
+ Pos = MAP_APPFONT ( 209 , 143 ) ;
+ Size = MAP_APPFONT ( 55 , 14 ) ;
+
+ /* ### ACHTUNG: Neuer Text in Resource? ~Schließen : ~Schlie˜en */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Schließen : ~Schlie˜en */
+ Text = "~Schließen" ;
+ 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 ] = "~Stäng" ;
+ Text [ dutch ] = "~Sluiten" ;
+ Text [ spanish ] = "~Cerrar" ;
+ Text [ english_us ] = "~Close" ;
+ 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 ] = " ";
+ };
+ Text[ russian ] = "Ïðàâêà ñëîâàðÿ ïîëüçîâàòåëÿ";
+ Text[ polish ] = "Edytuj s³ownik u¿ytkownika";
+ Text[ japanese ] = "Õ°»Þ°Ž«‘‚Ì•ÒW";
+ Text[ chinese_traditional ] = "½s¿è¦Û­qµü¨å";
+ Text[ arabic ] = "ÊÍÑíÑ ÞÇãæÓ ÇáãÓÊÎÏã";
+ Text[ greek ] = "Åðåîåñãáóßá ëåîéêïý";
+ Text[ korean ] = "»ç¿ëÀÚ»çÀü ÆíÁý";
+ Text[ turkish ] = "Kullanýcý sözlüðünü düzenle";
+ Text[ language_user1 ] = " ";
+};
+
+ // Strings ---------------------------------------------------------------
+String RID_SVXSTR_OPT_DOUBLE_DICTS
+{
+ Text = "Der angegebene Name ist schon vorhanden.\nBitte geben Sie einen neuen Namen ein." ;
+ Text [ English ] = "The name already exists.\nPlease give a new name." ;
+ Text [ dutch ] = "Deze naam bestaat reeds.\nTyp een nieuwe naam." ;
+ Text [ english_us ] = "The specified name already exists.\nPlease enter a new name." ;
+ Text [ italian ] = "Il nome dato esiste già.\nDigitarne uno nuovo." ;
+ Text [ spanish ] = "Este nombre ya existe.\nPor favor escriba otro nombre." ;
+ Text [ french ] = "Le nom indiqué existe déjà.\nVeuillez saisir un autre nom." ;
+ Text [ swedish ] = "Det angivna namnet finns redan.\nMata in ett nytt namn." ;
+ Text [ danish ] = "Det angivne navn findes allerede.\nIndtast venligst et nyt navn." ;
+ Text [ portuguese ] = "O nome fornecido já existe.\nPor favor introduza outro nome." ;
+ Text [ portuguese_brazilian ] = "Der angegebene Name ist schon vorhanden.\nBitte geben Sie einen neuen Namen ein." ;
+ Text[ chinese_simplified ] = "Õâ¸ö¸ø¶¨µÄÃû³ÆÒѾ­´æÔÚ¡£\nÇëÄúÊäÈëÒ»¸öÐÂÃû³Æ¡£";
+ Text[ russian ] = "Çàäàííîå èìÿ óæå èìååòñÿ.\nÂâåäèòå, ïîæàëóéñòà, íîâîå èìÿ.";
+ Text[ polish ] = "Podana nazwa ju¿ istnieje.\nProszê wpisaæ now¹ nazwê.";
+ Text[ japanese ] = "“ü—Í‚µ‚½–¼‘O‚Í‚·‚Å‚É‚ ‚è‚Ü‚·B\nV‚µ‚¢–¼‘O‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢B";
+ Text[ chinese_traditional ] = "³o­Ó¿é¤Jªº¦WºÙ¤w¸g¦s¦b¡C\n½Ð±z¿é¤J¤@­Ó·s¦WºÙ¡C";
+ Text[ arabic ] = "ÇáÇÓã ÇáÐí ÃÏÎáÊå ãæÌæÏ ãÓÈÞÇð.\nÇáÑÌÇÁ ÅÏÎÇá ÇÓã ÌÏíÏ.";
+ Text[ greek ] = "Ôï üíïìá õðÜñ÷åé Þäç.\nÐáñáêáëþ åðéëÝîôå Ýíá Üëëï üíïìá.";
+ Text[ korean ] = "ÁöÁ¤µÈ À̸§ÀÌ ÀÌ¹Ì ÀÖ½À´Ï´Ù.\n»õ À̸§À» ÀÔ·ÂÇϽʽÿÀ.";
+ Text[ turkish ] = "Girilen ad mevcut durumda.\nLütfen baþka bir ad girin.";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SFXQB_SET_LANGUAGE ------------------------------------------------
+QueryBox RID_SFXQB_SET_LANGUAGE
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie die Sprache des Wörterbuches '%1' ändern? : Möchten Sie die Sprache des Wörterbuches ''%1'' ändern? */
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie die Sprache des Wörterbuches '%1' ändern? : Möchten Sie die Sprache des Wörterbuches ''%1'' ändern? */
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie die Sprache des Wörterbuches '%1' ändern? : M÷chten Sie die Sprache des W÷rterbuches '%1' õndern? */
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie die Sprache des Wörterbuches '%1' ändern? : M÷chten Sie die Sprache des W÷rterbuches '%1' õndern? */
+ Message = "Möchten Sie die Sprache des Wörterbuches '%1' ändern?" ;
+ Message [ English ] = "Do you want to replace the language of the dictionary '%1'?" ;
+ Message [ dutch ] = "Wilt u de taal van het woordenboek '%1' veranderen?" ;
+ Message [ english_us ] = "Do you want to change the '%1' dictionary language?" ;
+ Message [ italian ] = "Cambiare la lingua del dizionario '%1' ?" ;
+ Message [ spanish ] = "¿Desea cambiar el idioma del diccionario '%1' ?" ;
+ Message [ french ] = "Désirez-vous changer la langue du dictionnaire '%1' ?" ;
+ Message [ swedish ] = "Vill Du ändra språket i ordboken '%1'?" ;
+ Message [ danish ] = "Vil du ændre sproget i ordbogen '%1'?" ;
+ Message [ portuguese ] = "Deseja mudar a língua do dicionário '%1'?" ;
+ Message [ portuguese_brazilian ] = "Möchten Sie die Sprache des Wörterbuches '%1' ändern?" ;
+ Message[ chinese_simplified ] = "ÄúÒª¸ü¸Ä´Êµä '%1' µÄÓïÑÔÂð£¿";
+ Message[ russian ] = "Âû õîòèòå èçìåíèòü ÿçûê ñëîàâðÿ '%1'?";
+ Message[ polish ] = "Czy chcesz zmieniæ jêzyk s³ownika '%1'?";
+ Message[ japanese ] = "Ž«‘'%1' ‚ÌŒ¾Œê‚ð•ÏX‚µ‚Ü‚·‚©H";
+ Message[ chinese_traditional ] = "±z­nªí®æµü¨å'%1'ªº»y¨¥¡H";
+ Message[ arabic ] = "åá ÊÑíÏ ÊÛííÑ áÛÉ ÇáÞÇãæÓ '%1'¿";
+ Message[ greek ] = "ÈÝëåôå íá áëëÜîåôå ôçí ãëþóóá ôïõ ëåîéêïý '%1';";
+ Message[ korean ] = "»çÀü'%1'ÀÇ ¾ð¾î¸¦ º¯°æÇϽðڽÀ´Ï±î?";
+ Message[ turkish ] = "'%1' sözlüðünün dilini deðiþtirmek isityor musunuz?";
+ Message[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/options/optgenrl.src b/svx/source/options/optgenrl.src
new file mode 100644
index 0000000000..30cd66aad9
--- /dev/null
+++ b/svx/source/options/optgenrl.src
@@ -0,0 +1,903 @@
+/*************************************************************************
+ *
+ * $RCSfile: optgenrl.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ------------------------------------------------------------------
+
+#include <sfx2/sfx.hrc>
+
+#include "helpid.hrc"
+#include "dialogs.hrc"
+#include "optgenrl.hrc"
+
+// RID_SFXPAGE_GENERAL ------------------------------------------------------
+
+TabPage RID_SFXPAGE_GENERAL
+{
+ HelpId = HID_OPTIONS_GENERAL ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Benutzerdaten" ;
+ Text [ ENGLISH ] = "User data" ;
+ Text [ english_us ] = "User Data" ;
+ Text [ swedish ] = "Användardata" ;
+ Text [ danish ] = "Brugerdata" ;
+ Text [ italian ] = "Dati utente" ;
+ Text [ spanish ] = "Datos del usuario" ;
+ Text [ french ] = "Données d'identité" ;
+ Text [ dutch ] = "Gebruikersgegevens" ;
+ Text [ portuguese_brazilian ] = "Benutzerdaten" ;
+ Text [ portuguese ] = "Dados sobre utilizador" ;
+ Text[ chinese_simplified ] = "Óû§×ÊÁÏ";
+ Text[ russian ] = "Äàííûå ïîëüçîâàòåëÿ";
+ Text[ polish ] = "Dane u¿ytkownika";
+ Text[ japanese ] = "Õ°»Þ°ÃÞ°À";
+ FixedText FT_COMPANY
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 0 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Text = "~Firma" ;
+ Text [ ENGLISH ] = "~Company" ;
+ Text [ norwegian ] = "~Firma" ;
+ Text [ italian ] = "~Ditta" ;
+ Text [ portuguese_brazilian ] = "~Empresa" ;
+ Text [ portuguese ] = "~Empresa" ;
+ Text [ finnish ] = "~Yritys" ;
+ Text [ danish ] = "Firma" ;
+ Text [ french ] = "~Société" ;
+ Text [ swedish ] = "~Företag" ;
+ Text [ dutch ] = "~Firma" ;
+ Text [ spanish ] = "E~mpresa" ;
+ Text [ english_us ] = "~Company" ;
+ Text[ chinese_simplified ] = "¹«Ë¾(~C)";
+ Text[ russian ] = "Îðãàíèçàöèÿ";
+ Text[ polish ] = "Firma";
+ Text[ japanese ] = "‰ïŽÐ–¼(~C)";
+ Text[ chinese_traditional ] = "¤½¥q(~C)";
+ Text[ arabic ] = "ÇáÔÑßÉ";
+ Text[ greek ] = "Å~ôáéñßá";
+ Text[ korean ] = "ȸ»ç(~C)";
+ Text[ turkish ] = "Þirket";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_COMPANY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID , LINE ( 0 ) ) ;
+ Size = MAP_APPFONT ( RIGHT-MID , LINEH ) ;
+ };
+ FixedText FT_NAME
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 1 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Text = "~Vor-/Name/Kürzel" ;
+ Text [ ENGLISH ] = "~First/Last/Id" ;
+ Text [ norwegian ] = "~For/Etter/Id" ;
+ Text [ italian ] = "~Nome/Cognome/Iniziali" ;
+ Text [ portuguese_brazilian ] = "~Primeiro/Último" ;
+ Text [ portuguese ] = "~Nome/Apelido/Iniciais" ;
+ Text [ finnish ] = "~First/Last/Id" ;
+ Text [ danish ] = "For-/Efternavn/Initialer" ;
+ Text [ french ] = "Prénom/~Nom/Initiales" ;
+ Text [ swedish ] = "För-/Efter~namn/Initialer" ;
+ Text [ dutch ] = "~Voor-/Naam/Initialen" ;
+ Text [ spanish ] = "Nom~bre/Apellidos/Iniciales" ;
+ Text [ english_us ] = "First/Last ~name/Initials" ;
+ Text[ chinese_simplified ] = "Ãû×Ö/ÐÕÊÏ/Ëõд(~N)";
+ Text[ russian ] = "Èìÿ/Ôàìèëèÿ/Èíèöèàëû";
+ Text[ polish ] = "I~miê/Nazwisko/Inicja³y";
+ Text[ japanese ] = "–¼/©/²Æ¼¬Ù(~N)";
+ Text[ chinese_traditional ] = "¦W¦r/©m¤ó/ÁY¼g(~N)";
+ Text[ arabic ] = "ÇáÇÓã/ÇÓã ÇáÚÇÆáÉ/ÇáÇÎÊÕÇÑ";
+ Text[ greek ] = "¼íïìá/Åðþíõìï/Áñ÷éêÜ";
+ Text[ korean ] = "À̸§/¼º/À̴ϼÈ(~N)";
+ Text[ turkish ] = "~Ad/Soyad/Baþharfler";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_NAME_RUSS
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 1 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Hide = TRUE;
+ Text = "~Vor-/Vaters-/Name/Kürzel" ;
+ Text [ ENGLISH ] = "~First/Father/Last/Id" ;
+ Text[ russian ] = "ÔÈÎ/Èíèöèàëû";
+ Text[ greek ] = "~Father/First/Last/Id";
+ Text[ dutch ] = "-";
+ Text[ french ] = "~Father/First/Last/Id";
+ Text[ spanish ] = "~Father/First/Last/Id";
+ Text[ italian ] = "-";
+ Text[ danish ] = "~Father/First/Last/Id";
+ Text[ portuguese_brazilian ] = "~Father/First/Last/Id";
+ Text[ japanese ] = "~Father/First/Last/Id";
+ Text[ korean ] = "~Father/First/Last/Id";
+ Text[ chinese_traditional ] = "~Father/First/Last/Id";
+ Text[ turkish ] = "~Baba adý/Ad/Soyad/Baþharfler";
+ };
+ Edit ED_FATHERNAME
+ {
+ Border = TRUE ;
+ Hide = TRUE;
+ Pos = MAP_APPFONT ( MID , LINE ( 1 ) ) ;
+ Size = MAP_APPFONT ( NAMELEN-8 , LINEH ) ;
+ };
+ Edit ED_FIRSTNAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID , LINE ( 1 ) ) ;
+ Size = MAP_APPFONT ( NAMELEN-8 , LINEH ) ;
+ };
+ Edit ED_NAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID+NAMELEN-8+HSPACE , LINE ( 1 ) ) ;
+ Size = MAP_APPFONT ( NAMELEN-8 , LINEH ) ;
+ };
+ Edit ED_SHORTNAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID+2* ( NAMELEN-8+HSPACE ) , LINE ( 1 ) ) ;
+ Size = MAP_APPFONT ( RIGHT- ( MID+2* ( NAMELEN-8+HSPACE ) ) , LINEH ) ;
+ };
+ FixedText FT_STREET
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 2 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Text = "~Straße" ;
+ Text [ ENGLISH ] = "~Street" ;
+ Text [ norwegian ] = "~Gate" ;
+ Text [ italian ] = "Via" ;
+ Text [ portuguese_brazilian ] = "~Rua" ;
+ Text [ portuguese ] = "~Rua" ;
+ Text [ finnish ] = "~Lähiosoite" ;
+ Text [ danish ] = "Gade" ;
+ Text [ french ] = "~Rue" ;
+ Text [ swedish ] = "~Gata" ;
+ Text [ dutch ] = "~Straat" ;
+ Text [ spanish ] = "~Calle" ;
+ Text [ english_us ] = "~Street" ;
+ Text[ chinese_simplified ] = "½ÖµÀ(~S)";
+ Text[ russian ] = "Óëèöà";
+ Text[ polish ] = "Ulica";
+ Text[ japanese ] = "Žs’¬‘º–¼ ”Ô’n(~S)";
+ Text[ chinese_traditional ] = "µó¹D(~S)";
+ Text[ arabic ] = "ÇáÔÇÑÚ";
+ Text[ greek ] = "Ïäüò";
+ Text[ korean ] = "µ¿ À̸§(~S)";
+ Text[ turkish ] = "Cadde";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_STREET_RUSS
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 2 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Hide = TRUE;
+ Text = "~Straße/Wohnungsnummer" ;
+ Text [ ENGLISH ] = "~Street/Apartmentnumber" ;
+ Text[ russian ] = "~Óëèöà, ¹ äîìà/êâàðòèðû";
+ Text[ greek ] = "~Street/Apartmentnumber";
+ Text[ dutch ] = "-";
+ Text[ french ] = "~Street/Apartmentnumber";
+ Text[ spanish ] = "-";
+ Text[ italian ] = "-";
+ Text[ danish ] = "~Street/Apartmentnumber";
+ Text[ swedish ] = "-";
+ Text[ portuguese_brazilian ] = "~Street/Apartmentnumber";
+ Text[ japanese ] = "~Street/Apartmentnumber";
+ Text[ korean ] = "~Street/Apartmentnumber";
+ Text[ chinese_traditional ] = "~Street/Apartmentnumber";
+ Text[ turkish ] = "Cadde/No.";
+ };
+ Edit ED_STREET
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID , LINE ( 2 ) ) ;
+ Size = MAP_APPFONT ( RIGHT-MID , LINEH ) ;
+ };
+ Edit ED_APARTMENTNR
+ {
+ Border = TRUE ;
+ Hide = TRUE;
+ Pos = MAP_APPFONT ( MID , LINE ( 2 ) ) ;
+ Size = MAP_APPFONT ( RIGHT-MID , LINEH ) ;
+ };
+ FixedText FT_CITY
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 3 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Text = "PL~Z/Ort" ;
+ Text [ ENGLISH ] = "~Zip/City" ;
+ Text[ english_us ] = "Zip/City";
+ Text[ portuguese ] = "~CP/Cidade";
+ Text[ russian ] = "Ïî÷ò. èíäåêñ/Ãîðîä";
+ Text[ dutch ] = "~Postcode/Plaats";
+ Text[ french ] = "Code postal/Ville";
+ Text[ spanish ] = "CP/C~iudad";
+ Text[ italian ] = "C.A.P./Località";
+ Text[ danish ] = "Postnr./By";
+ Text[ swedish ] = "Postnr/~Ort";
+ Text[ polish ] = "Kod pocztowy/MiejscowoϾ";
+ Text[ portuguese_brazilian ] = "~Zip/City";
+ Text[ japanese ] = "—X•Ö”Ô†/“s“¹•{Œ§–¼";
+ Text[ chinese_simplified ] = "Óʱà/³ÇÊÐ";
+ Text[ chinese_traditional ] = "¶l»¼°Ï¸¹/«°¥«";
+ Text[ arabic ] = "ÇáÑãÒ ÇáÈÑíÏí/ÇáãÏíäÉ";
+ Text[ greek ] = "Ô.Ê./Ðüëç";
+ Text[ korean ] = "¿ìÆí¹øÈ£/µµ½Ã";
+ Text[ turkish ] = "Posta kodu/þehir";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_PLZ
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID , LINE ( 3 ) ) ;
+ Size = MAP_APPFONT ( 24 , LINEH ) ;
+ };
+ Edit ED_CITY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID + 24 + HSPACE , LINE ( 3 ) ) ;
+ Size = MAP_APPFONT ( RIGHT - ( MID + 24 + HSPACE ) , LINEH ) ;
+ };
+ Edit ED_US_CITY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID , LINE ( 3 ) ) ;
+ Size = MAP_APPFONT ( 90 , LINEH ) ;
+ };
+ Edit ED_US_STATE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID + 90 + HSPACE, LINE ( 3 ) ) ;
+ Size = MAP_APPFONT ( 30 , LINEH ) ;
+ };
+ Edit ED_US_ZIPCODE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID + 90 + HSPACE + 30 + HSPACE, LINE ( 3 ) ) ;
+ Size = MAP_APPFONT ( RIGHT - ( MID + 90 + HSPACE + 30 + HSPACE ) , LINEH ) ;
+ };
+ FixedText FT_COUNTRY
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 4 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Text = "~Land" ;
+ Text [ ENGLISH ] = "~Country" ;
+ Text[ english_us ] = "Country";
+ Text[ portuguese ] = "~País";
+ Text[ russian ] = "Ñòðàíà";
+ Text[ dutch ] = "~Land";
+ Text[ french ] = "Pays";
+ Text[ spanish ] = "~País";
+ Text[ italian ] = "Paese/~C.A.P./Città";
+ Text[ danish ] = "Land";
+ Text[ swedish ] = "~Land";
+ Text[ polish ] = "Pañstwo";
+ Text[ portuguese_brazilian ] = "País/~CEP/Cidade";
+ Text[ japanese ] = "‘–¼";
+ Text[ chinese_simplified ] = "¹ú¼Ò";
+ Text[ chinese_traditional ] = "°ê®a";
+ Text[ arabic ] = "ÇáÈáÏ";
+ Text[ greek ] = "×þñá";
+ Text[ korean ] = "±¹°¡";
+ Text[ turkish ] = "Ülke";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_COUNTRY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID , LINE ( 4 ) ) ;
+ Size = MAP_APPFONT ( RIGHT - MID , LINEH ) ;
+ };
+ FixedText FT_TITLEPOS
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 5 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Text = "~Titel/Position" ;
+ Text [ ENGLISH ] = "~Title/Position" ;
+ Text [ english_us ] = "~Title/Position" ;
+ Text [ italian ] = "~Titolo/Posizione" ;
+ Text [ spanish ] = "Título/p~osición" ;
+ Text [ french ] = "~Titre/Position" ;
+ Text [ dutch ] = "~Titel/Functie" ;
+ Text [ swedish ] = "Titel/~Befattning" ;
+ Text [ danish ] = "Titel/Stilling" ;
+ Text [ portuguese_brazilian ] = "~Titel/Position" ;
+ Text [ portuguese ] = "~Título/Posição" ;
+ Text[ chinese_simplified ] = "Í·ÏÎ/Ö°Îñ(~T)";
+ Text[ russian ] = "Òèòóë/Äîëæíîñòü";
+ Text[ polish ] = "Tytu³/Stanowisko";
+ Text[ japanese ] = "Œ¨‘‚«/–ðE(~T)";
+ Text[ chinese_traditional ] = "ÀY»Î/¾°È(~T)";
+ Text[ arabic ] = "ÇáãÓãì ÇáæÙíÝí/ÇáãÑßÒ";
+ Text[ greek ] = "Ôßôëïò/ÈÝóç";
+ Text[ korean ] = "Á÷ÇÔ/Á÷À§(~T)";
+ Text[ turkish ] = "~Unvan/Pozisyon";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_TITLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID , LINE ( 5 ) ) ;
+ Size = MAP_APPFONT ( NAMELEN-1 , LINEH ) ;
+ };
+ Edit ED_POSITION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID+NAMELEN-1+HSPACE , LINE ( 5 ) ) ;
+ Size = MAP_APPFONT ( RIGHT- ( MID+NAMELEN-1+HSPACE ) , LINEH ) ;
+ };
+ FixedText FT_PHONE
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 6 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT , FLINEH ) ;
+ Text = "T~el. (Priv/Ge.)" ;
+ Text [ ENGLISH ] = "Pho~ne (Priv./Co.)" ;
+ Text [ norwegian ] = "Tele~fon (Priv./Arbeid.)" ;
+ Text [ italian ] = "Te~l. (Priv./Uff.)" ;
+ Text [ portuguese_brazilian ] = "Fo~ne (Priv./Co.)" ;
+ Text [ portuguese ] = "Tel. (~part./emprego)" ;
+ Text [ finnish ] = "~Puhelin (kotiin/Co.)" ;
+ Text [ danish ] = "Tlf. (priv./arb.)" ;
+ Text [ french ] = "Tél. (Domicile/Bureau)" ;
+ Text [ swedish ] = "Tfn.: (~Priv./Arb.)" ;
+ Text [ dutch ] = "Tel. (Priv/~Za)" ;
+ Text [ spanish ] = "~Tel. (Privado/trabajo)" ;
+ Text [ english_us ] = "Tel. (Home/Work)" ;
+ LeftLabel = TRUE ;
+ Text[ chinese_simplified ] = "µç»°";
+ Text[ russian ] = "Òåëåôîí (äîì./ñëóæ.)";
+ Text[ polish ] = "Tel. (pryw./s³u¿b.)";
+ Text[ japanese ] = "Tel.(Ž©‘î/‰ïŽÐ)";
+ Text[ chinese_traditional ] = "¹q¸Ü";
+ Text[ arabic ] = "ÇáåÇÊÝ (ãäÒá/Úãá)";
+ Text[ greek ] = "Ôçë. (Ïéêßá/Åñãáóßá)";
+ Text[ korean ] = "Tel. (Áý/ȸ»ç)";
+ Text[ turkish ] = "Tlf. (Ev/Ýþ)";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_TELPRIVAT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID , LINE ( 6 ) ) ;
+ Size = MAP_APPFONT ( NAMELEN-1 , LINEH ) ;
+ };
+ Edit ED_TELCOMPANY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID+NAMELEN-1+HSPACE , LINE ( 6 ) ) ;
+ Size = MAP_APPFONT ( RIGHT- ( MID+NAMELEN-1+HSPACE ) , LINEH ) ;
+ };
+ FixedText FT_FAXMAIL
+ {
+ Pos = MAP_APPFONT ( LEFT , FLINE ( 7 ) ) ;
+ Size = MAP_APPFONT ( MID-LEFT , FLINEH ) ;
+ LeftLabel = TRUE ;
+ Text = "Fa~x/E-Mail" ;
+ Text [ ENGLISH ] = "Fa~x" ;
+ Text [ norwegian ] = "~Faks" ;
+ Text [ italian ] = "Fa~x/eMail" ;
+ Text [ portuguese_brazilian ] = "Fa~x" ;
+ Text [ portuguese ] = "Fa~x/e-mail" ;
+ Text [ finnish ] = "Fa~x" ;
+ Text [ danish ] = "Fax/E-mail" ;
+ Text [ french ] = "~Fax/e-mail" ;
+ Text [ swedish ] = "Fa~x/e-post" ;
+ Text [ dutch ] = "Fa~x/e-mail" ;
+ Text [ spanish ] = "Fa~x/E-mail" ;
+ Text [ english_us ] = "Fa~x / E-mail" ;
+ Text[ chinese_simplified ] = "´«Õæ/µç×ÓÓʼþ";
+ Text[ russian ] = "Ôàêñ ¹/Àäðåñ ýë. ïî÷òû";
+ Text[ polish ] = "Faks/e-mail";
+ Text[ japanese ] = "Fax/E-mail";
+ Text[ chinese_traditional ] = "¶Ç¯u/¹q¤l¶l¥ó";
+ Text[ arabic ] = "ÝÇßÓ/ÈÑíÏ ÅáßÊÑæäí";
+ Text[ greek ] = "Fax/E-mail";
+ Text[ korean ] = "Æѽº/E-mail(~X)";
+ Text[ turkish ] = "Faks/e-posta";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_FAX
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID , LINE ( 7 ) ) ;
+ Size = MAP_APPFONT ( NAMELEN-1 , LINEH ) ;
+ };
+ Edit ED_EMAIL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( MID+NAMELEN-1+HSPACE , LINE ( 7 ) ) ;
+ Size = MAP_APPFONT ( RIGHT- ( MID+NAMELEN-1+HSPACE ) , LINEH ) ;
+ };
+ GroupBox GB_ADDRESS
+ {
+ Pos = MAP_APPFONT ( 6 , 2 ) ;
+ Size = MAP_APPFONT ( 248 , 129 ) ;
+ Text = " Anschrift " ;
+ Text [ ENGLISH ] = " Address " ;
+ Text [ norwegian ] = " Adresse " ;
+ Text [ italian ] = "Indirizzo " ;
+ Text [ portuguese_brazilian ] = "Endereço " ;
+ Text [ portuguese ] = "Endereço " ;
+ Text [ finnish ] = " Osoite " ;
+ Text [ danish ] = "Adresse " ;
+ Text [ french ] = "Adresse " ;
+ Text [ swedish ] = "Adress " ;
+ Text [ dutch ] = "Adres " ;
+ Text [ spanish ] = "Dirección " ;
+ Text [ english_us ] = "Address " ;
+ Text[ chinese_simplified ] = "µØÖ· ";
+ Text[ russian ] = "Ïî÷òîâûé àäðåñ ";
+ Text[ polish ] = "Adres ";
+ Text[ japanese ] = "ZŠ ";
+ Text[ chinese_traditional ] = "¦a§} ";
+ Text[ arabic ] = "ÇáÚäæÇä ";
+ Text[ greek ] = "Äéåýèõíóç ";
+ Text[ korean ] = "ÁÖ¼Ò ";
+ Text[ turkish ] = "Adres ";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_USEDATA
+ {
+ Pos = MAP_APPFONT ( 6 , 122 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ Hide = TRUE;
+ Text = "~Daten für Dokumenteigenschaften verwenden" ;
+ Text[ English ] = "Using ~data for document properties";
+ Text[ english_us ] = "Use data for document properties";
+ Text[ french ] = "~Utiliser les données pour les propriétés du document";
+ Text [ italian ] = "Usa i dati per le proprietà dei documenti" ;
+ Text [ dutch ] = "~Gegevens voor documenteigenschappen gebruiken" ;
+ Text [ spanish ] = "Usar ~datos para las propiedades del documento" ;
+ Text [ swedish ] = "Använd ~data för dokumentegenskaperna" ;
+ Text [ portuguese ] = "Usar ~dados para as propriedades do documento" ;
+ Text[ portuguese_brazilian ] = "~Daten für Dokumenteigenschaften verwenden";
+ Text[ danish ] = "Brug data for dokumentegenskaber";
+ Text[ chinese_simplified ] = "ʹÓÃÎĵµÊôÐÔµÄÊý¾Ý";
+ Text[ russian ] = "Èñïîëüçîâàòü äàííûå äëÿ ñâîéñòâ äîêóìåíòà";
+ Text[ polish ] = "U¿yj danych dla w³aœciwoœci dokumentów";
+ Text[ japanese ] = "ÄÞ·­ÒÝÄÌßÛÊßè—p‚Ì̧²Ù‚ðŽg—p‚µ‚ĉº‚³‚¢B";
+ Text[ chinese_traditional ] = "¨Ï¥Î¤å¥óÄݩʪº¸ê®Æ";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ÈíÇäÇÊ ÎÕÇÆÕ ÇáãÓÊäÏ";
+ Text[ greek ] = "×ñÞóç äåäïìÝíùí ãéá ôéò éäéüôçôåò ôïõ åããñÜöïõ";
+ Text[ korean ] = "¹®¼­ µî·ÏÁ¤º¸¿ë µ¥ÀÌÅÍ »ç¿ë";
+ Text[ turkish ] = "Verileri belge özellikleri için kullan";
+ Text[ language_user1 ] = " ";
+ };
+
+ // extra Resourcen f"ur die amerikanische Postadresse
+ String STR_US_STATE
+ {
+ Text = "Stadt/Staat/PL~Z";
+ Text [ English ] = "City/State/~Zip" ;
+ Text[ english_us ] = "City/State/Zip";
+ Text[ portuguese ] = "~Cidade/País/CP";
+ Text[ russian ] = "Óëèöà/Îáëàñòü/Ïî÷òîâûé èíäåêñ";
+ Text[ dutch ] = "Plaats/~Straat/Postcode";
+ Text[ french ] = "Ville/Pays/Code postal";
+ Text[ spanish ] = "~Ciudad/País/CP";
+ Text[ italian ] = "Localià/Provincia/C.A.P.";
+ Text[ danish ] = "By/Land/Postnummer";
+ Text[ swedish ] = "~Ort/Land/Postnr";
+ Text[ polish ] = "Ulica/Województwo/Kod pocztowy";
+ Text[ portuguese_brazilian ] = "Staat/PLZ/~L.";
+ Text[ japanese ] = "“s“¹•{Œ§–¼/‘–¼/—X•Ö”Ô†";
+ Text[ chinese_simplified ] = "½ÖµÀ/¹ú¼Ò/Óʱà(~S)";
+ Text[ chinese_traditional ] = "µó¹D/°ê®a/¶l»¼°Ï¸¹(~S)";
+ Text[ arabic ] = "ÇáãÏíäÉ/ÇáÈáÏ/ÇáÑãÒ ÇáÈÑíÏí";
+ Text[ greek ] = "Ðüëç/×þñá/Ô.Ê.";
+ Text[ korean ] = "µµ½Ã/±¹°¡/¿ìÆí¹øÈ£";
+ Text[ turkish ] = "Þehir/Ülke/Posta kodu";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_QUERY_REG
+ {
+ Text = "Bitte beachten Sie, dass Straße, Postleitzahl und Ort für die Berechnung des Registrierungsschlüssels herangezogen werden. Bis zur Registrierung können diese Benutzerdaten nicht mehr geändert werden. Wollen Sie diese Benutzerdaten jetzt noch ändern?" ;
+ Text [ English ] = "Bitte beachten Sie, daß Straße, Postleitzahl und Ort für die Berechnung des Registrierungsschlüssels herangezogen werden. Bis zur Registrierung können diese Benutzerdaten nicht mehr geändert werden. Wollen Sie diese Benutzerdaten jetzt noch ändern?" ;
+ Text[ english_us ] = "Note that street, Zip code and city are used for generating the registration key. Until the registration has been carried out successfully, user data cannot be changed. Do you want to modify personal data now?";
+ Text[ portuguese ] = "Não esqueça que a rua, o código postal e a localidade serão utilizados para calcular o seu código de registo. Não poderá modificar estes dados de utilizador até efectuar o seu registo. Ainda deseja modificar estes dados?";
+ Text[ russian ] = "Ïîæàëóéñòà, ó÷òèòå, ÷òî äàííûå ïî÷òîâîãî àäðåñà áóäò èñïîëüçîâàíû äëÿ ñîçäàíèÿ ðåãèñòðàöèîííîãî êëþ÷à. Èçìåíÿòü ýòè äàííûå äî îñóùåñòâëåíèÿ ðåãèñòðàöèè íåëüçÿ. Âû õîòèå ñåé÷àñ èçìåíèòü äàííûå ïîëüçîâàòåëÿ?";
+ Text[ dutch ] = "Wij wijzen u erop dat straat, postcode en plaats worden gebruikt voor het berekenen van de registratiesleutel. Tot aan de registratie mag u deze gegevens niet meer veranderen. Wilt u ze nu nog veranderen?";
+ Text[ french ] = "Veuillez noter que le code d'enregistrement est généré à partir de vos données d'identité telles que rue, code postal et ville. Vous ne pourrez plus modifier ces données jusqu'à ce que vous vous fassiez enregistrer. Avez-vous une dernière modification à apporter avant de poursuivre ?";
+ Text[ spanish ] = "Tenga en cuenta que la calle, el código postal y la ciudad se tendrán en cuenta para determinar la clave de registro. Estos datos no podrán ser modificados hasta que se registre. ¿Desea modificar aún estos datos de usuario?";
+ Text[ italian ] = "Vi preghiamo di osservare che il codice di registrazione si basa sull'indirizzo (via, C.A.P. e città) specificato. Fino alla registrazione questi dati non potranno essere cambiati. Volete cambiarli adesso?";
+ Text[ danish ] = "Bemærk venligst, at gade, postnummer og by bruges til at beregne registreringsnøglen. Disse brugerdata kan ikke mere ændres indtil registreringen. Vil du endnu ændre dem nu?";
+ Text[ swedish ] = "Observera att gatu- och postadress används för beräkningen av registreringsnyckeln. Fram till registreringen kan Du inte ändra mer på de här användardata. Vill Du ändra de här användardata nu?";
+ Text[ polish ] = "Proszê uwzglêdnij, ¿e nazwa ulicy, kod pocztowy i miejscowoœæ s¹ wymagane do utworzenia klucza rejestracyjnego. Do czasu rejestracji te dane nie mog¹ byæ zmienione. Czy chcesz zmieniæ teraz dane u¿ytkownika?";
+ Text[ portuguese_brazilian ] = "Bitte beachten Sie, daß Straße, Postleitzahl und Ort für die Berechnung des Registrierungsschlüssels herangezogen werden. Bis zur Registrierung können diese Benutzerdaten nicht mehr geändert werden. Wollen Sie diese Benutzerdaten jetzt noch ändern?";
+ Text[ japanese ] = "Žs’¬‘º–¼‚â—X•Ö”Ô†‚âB–¼A“s“¹•{Œ§–¼‚Í“o˜^·°‚ð”­s‚·‚éŽè‚ª‚©‚è‚Æ‚È‚è‚Ü‚·B“o˜^‚ªÏ‚Þ‚Ü‚Å‚ÍÕ°»Þ°ÃÞ°À‚Í•ÏX‚Å‚«‚Ü‚¹‚ñB‚±‚ÌÕ°»Þ°ÃÞ°À‚ð‚Ü‚¾•ÏX‚µ‚Ü‚·‚©H";
+ Text[ chinese_simplified ] = "Çë×¢Ò⣺½ÖµÀ£¬ÓʱàºÍ³ÇÊÐÊÇÓÃÀ´Éú³É×¢²áÃÜÂëµÄÊý¾Ý¡£ÔÚÕýʽע²áÇ°Äú²»ÄÜÔÙ¸ü¸ÄÕâЩÓû§×ÊÁÏ¡£ÄúÏÖÔÚÒª¸ü¸ÄÕâЩÓû§×ÊÁÏÂð£¿";
+ Text[ chinese_traditional ] = "½Ðª`·N±z¿é¤Jªºµó¹D©M«°¥«¬O¥Î¨Ó¥Í¦¨µù¥UÁä½Xªº¸ê®Æ¡C¦b¥¿¦¡µù¥U®É±z¤£¯à­×§ï³o¨Ç¨Ï¥ÎªÌ¸ê®Æ¡C±z²{¦b­n­×§ï³o¨Ç¨Ï¥ÎªÌ¸ê®Æ¡H";
+ Text[ arabic ] = "ÇáÑÌÇÁ ãáÇÍÙÉ Ãä ÇáÈíÇäÇÊ ÇáÎÇÕÉ ÈÇáÔÇÑÚ æÇáÑãÒ ÇáÈÑíÏí æÇáãÏíäÉ ÊÏÎá Öãä ÇáÈíÇäÇÊ ÇááÇÒãÉ áÅäÔÇÁ ãÝÊÇÍ ÇáÊÓÌíá. áÇ íãßäß ÊÛííÑ ÈíÇäÇÊ ÇáãÓÊÎÏã ÍÊì ÅäåÇÁ ÚãáíÉ ÇáÊÓÌíá. åá ÊÑíÏ ÊÛííÑ ÈíÇäÇÊ ÇáãÓÊÎÏã åÐå ÇáÂä¿";
+ Text[ greek ] = "Ðáñáêáëþ ðñïóÝîôå üôé ç ïäüò, ï Ô.Ê. êáé ç ðüëç ÷ñçóéìïðïéïýíôáé ãéá ôïí äçìéïõñãßá ôïõ êëåéäéïý äÞëùóçò. ¸ùò ôçí äÞëùóç äåí èá ìðïñÝóåôå íá áëëÜîåôå áõôÜ ôá äåäïìÝíá. ÈÝëåôå íá áëëÜîåôå êÜðïéï áðü áõôÜ ôá äåäïìÝíá ôïõ ÷ñÞóôç;";
+ Text[ korean ] = "ÁÖ¼Ò³ª ¿ìÆí¹øÈ£ µîÀº µî·Ï Å° ±¸¼º¿¡ ÀÌ¿ëµÈ´Ù´Â »ç½ÇÀ» ¸í½ÉÇϽʽÿÀ. µî·ÏÀÌ ¿Ï·áµÉ ¶§±îÁö´Â ÀÌ »ç¿ëÀÚ µ¥ÀÌÅ͸¦ ´õ ÀÌ»ó ¹Ù²Ü ¼ö ¾ø½À´Ï´Ù. Áö±ÝÀÌ¶óµµ ÀÌ »ç¿ëÀÚ µ¥ÀÌÅ͸¦ º¯°æÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Cadde, posta kodu ve þehir bilgilerinin kayýt kodunun oluþturulmasý için kullanýldýðýný dikkate alýn. Kayýt yapýlana kadar bu kullanýcý verileri deðiþtirilemez. Kullanýcý verilerini þimdi deðiþtirmek istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_traditional ] = "¨Ï¥ÎªÌ¸ê®Æ";
+ Text[ arabic ] = "ÈíÇäÇÊ ÇáãÓÊÎÏã";
+ Text[ greek ] = "ÐñïóùðéêÜ äåäïìÝíá";
+ Text[ korean ] = "»ç¿ëÀÚ µ¥ÀÌÅÍ";
+ Text[ turkish ] = "Kullanýcý verileri";
+ Text[ language_user1 ] = " ";
+};
+
+// RID_SVXQB_CHANGEDATA ---------------------------------------------------
+
+QueryBox RID_SVXQB_CHANGEDATA
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_NO ;
+ Message = "Sie haben die Benutzerdaten geändert.\nBitte bedenken Sie, dass dadurch die Registrierung verfällt.\nSie benötigen einen neuen Registrierungsschlüssel, der innerhalb der nächsten 30 Tage eingegeben werden muss.\nDas Registrierungsformular finden Sie im Menü Hilfe - Registrierung...\nWollen Sie die Benutzerdaten wirklich ändern?";
+ Message [ English ] = "The user data have been changed.\nPlease note that in this way the registration will become invalid.\nTherefore, a new registration key is needed within 30 days.\nYou can find the registration form in the menu Help - Registration...\nDo you really want to change the user data?";
+ Message [ english_us ] = "The User Data have been changed.\nNote that, if you continue, the registration key will become invalid.\nTherefore, a new registration key is needed within 30 days.\nYou can find the registration form in the menu Help - Registration...\nDo you really want to change your User Data?";
+ Message [ french ] = "Vous avez modifié vos données d'identité.\nVeuillez noter que cela va faire expirer votre enregistrement.\nVous devrez vous procurer un nouveau code d'enregistrement et le saisir dans un délai de 30 jours.\nVous trouverez le formulaire d'enregistrement au menu Aide - Enregistrement...\nVoulez-vous vraiment modifier vos données d'identité ?";
+ Message [ italian ] = "Avete modificato i dati utente.\nVi preghiamo di osservare che in questo modo la registrazione scadrà.\nEntro 30 giorni a partire da oggi dovrete inserire un nuovo codice di registrazione. Troverete il formulario di registrazione nel menu ? - Registrazione... \nVolete davvero cambiare i dati utente?" ;
+ Message [ dutch ] = "U heeft de gebruikersgegevens gewijzigd.\nWij maken u erop attent dat de registratie daardoor ongeldig wordt.\nU heeft een nieuwe registratiesleutel nodig, die binnen de volgende 30 dagen moet worden aangegeven.\\Het registratieformulier vindt u in het menu Help - Registratie...\nWilt u de gebruikersgegevens werkelijk veranderen?";
+ Message [ spanish ] = "Usted ha modificado los datos de usuario.\nTenga en cuenta que con ello expirará el registro.\nNecesita una nueva clave de registro que tiene que ser introducida en los próximos 30 días.\nEl formulario de registro lo encuentra en el menú Ayuda - Registro...\n¿Desea realmente modificar los datos de usuario?" ;
+ Message [ swedish ] = "Du har ändrat Dina användardata.\nTänk på att Din nuvarande registrering därmed löper ut.\nDu behöver en ny registreringsnyckel som måste matas in inom de närmaste 30 dagarna.\nRegistreringsformuläret hittar Du under menyn Hjälp - Registrering...\nVill Du verkligen ändra Dina användardata?" ;
+ Message [ portuguese ] = "Modificou os dados de utilizador.\nNão se esqueça de que o seu registo expirará.\nPor esta razão necessitará de um novo código de registo dentro do prazo de 30 dias.\nEncontrará o formulário de registo no menu Ajuda - Registo...\nModificar os dados de utilizador?" ;
+ Message[ portuguese_brazilian ] = "Sie haben die Benutzerdaten geändert.\nBitte bedenken Sie, daß dadurch die Registrierung verfällt.\nSie benötigen einen neuen Registrierungsschlüssel, der innerhalb der nächsten 30 Tage eingegeben werden muß.\nDas Registrierungsformular finden Sie im Menü Hilfe - Registrierung...\nWollen Sie die Benutzerdaten wirklich ändern?";
+ Message[ danish ] = "Du har ændret brugerdataene.\nBemærk venligst, at din registrering derigennem bliver ugyldig.\nDu har brug for en ny registreringsnøgle, som skal indtastes indenfor 30 dage.\nDu finder registreringsformularen i menuen Hjælp - Registrering...\nEr du sikker på, at du vil ændre brugerdataene?";
+ Message[ chinese_simplified ] = "ÄúÒѾ­¸ü¸ÄÁËÓû§×ÊÁÏ¡£\nÕâÑùÄúµÄ×¢²á¾Í»áÎÞЧ¡£\nÄú±ØÐëÔÚ½ñºó30ÌìÖ®ÄÚÊäÈëÒ»¸öеÄ×¢²áÃÜÂë¡£\nÄúÄܹ»Ôڲ˵¥ÃüÁî\"ÇóÖú - ×¢²á...\"´¦ÕÒµ½×¢²á±íµ¥¡£\nÄúÕæÒª¸ü¸ÄÓû§×ÊÁÏ£¿";
+ Message[ russian ] = "Âû èçìåíèëè äàííûå ïîëüçîâàòåëÿ.\nÏîæàëóéñòà, ïîìíèòå, ÷òî èç-çà ýòîãî Âû óòðàòèòå ðåãèñòðàöèþ.\nÂàì ïîíîäîáèòñÿ íîâûé ðåãèñòðàöèîííûé êëþ÷, êîòîðûé íåîáõîäèìî áóäåò ââåñòè â òå÷åíèå 30 äíåé.\nÐåãèñòðàöèîííûé ôîðìóëÿð Âû íàéäåòå â ìåíþ Ïîìîùü - Ðåãèñòðàöèÿ...\nÂû äåéñòâèòåëüíî õîòèòå èçìåíèòü äàííûå ïîëüçîâàòåëÿ?";
+ Message[ polish ] = "Zmieni³eœ dane u¿ytkownika.\nProszê uwzglêdnij, ¿e przez to traci wa¿noœæ rejestracja.\nPotrzebujesz nowego klucza rejestracyjnego, który musi byæ wpisany w ci¹gu nastêpnych 30 dni.\nFormularz rejestracji znajdziesz w menu Pomoc - Rejestracja...\nChcesz na pewno zmieniæ dane u¿ytkownika?";
+ Message[ japanese ] = "Õ°»Þ°ÃÞ°À‚ª•ÏX‚³‚ê‚Ü‚µ‚½B\n‚»‚Ì‚½‚ß“o˜^‚ªŽ¸Œø‚·‚é‚Ì‚Í–Æ‚ê‚Ü‚¹‚ñB\nV‚µ‚¢“o˜^·°‚ª•K—v‚ƂȂ褂»‚ê‚ð30“úˆÈ“à‚ÉÏ‚Ü‚³‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB\n“o˜^—pŽ†‚Í[ÒÆ­°ÍÙÌß/“o˜^...]‚É‚ ‚è‚Ü‚·B\nÕ°»Þ°ÃÞ°À‚ð–{“–‚É•ÏX‚µ‚Ü‚·‚©?";
+ Message[ chinese_traditional ] = "±z¤w¸gÅܧó¨Ï¥ÎªÌ¸ê®Æ¡C\n³o¼Ë±zªºµù¥U´N·|µL®Ä¡C\n±z»Ý­n¤@­Ó·sªº¡M¥B¥²¶·¦b30¤Ñ¤§¤º¿é¤Jªºµù¥U±KÁä½X¡C\n±z¯à°÷¦b¥\\¯àªí»¡©ú¡Aµù¥U¤§¤U§ä¨ìµù¥Uªí®æ¡C\n¯u­n­×§ï¨Ï¥ÎªÌ¸ê®Æ¡H";
+ Message[ arabic ] = "áÞÏ ÞãÊ ÈÊÚÏíá ÈíÇäÇÊ ÇáãÓÊÎÏã.\nÇáÑÌÇÁ ãáÇÍÙÉ Ãä åÐÇ ÇáÊÚÏíá ÓæÝ íÌÚá ÇáÊÓÌíá ÛíÑ ÕÇáÍ.\nÓæÝ ÊÍÊÇÌ Åáì ãÝÊÇÍ ÊÓÌíá ÌÏíÏ¡ íÌÈ ÅÏÎÇáå ÎáÇá ÇáËáÇËíä íæãÇð ÇáÞÇÏãíä.\níãßäß ÇáÍÕæá Úáì ÇÓÊãÇÑÉ ÇáÊÓÌíá Ýí ÞÇÆãÉ \"ãÓÇÚÏÉ\" ÊÍÊ \"ÊÓÌíá\"...\nåá ÊÑíÏ ÈÇáÊÃßíÏ ÊÛííÑ ÈíÇäÇÊ ÇáãÓÊÎÏã¿";
+ Message[ greek ] = "ÁëëÜîáôå ôá äåäïìÝíá ôïõ ÷ñÞóôç.\nÐñïóÝîôå üôé ìå áõôÞ ôçí åíÝñãåéá ðáýåé íá éó÷ýåé ç äÞëùóç.\nÓå áõôÞ ôç ðåñßðôùóç èá ÷ñåéáóôåßôå Ýíá íÝï êëåéäß äÞëùóçò, ôï ïðïßï èá ðñÝðåé íá åéóá÷èåß ìÝóá óôï ÷ñïíéêü äéÜóôçìá ôùí åðïìÝíùí 30 çìåñþí.\nÔç öüñìá äÞëùóçò èá ôç âñåßôå óôï ìåíïý ÂïÞèåéá - ÄÞëùóç...\nÈÝëåôå ðñáãìáôéêÜ íá áëëÜîåôå ôá äåäïìÝíá ôïõ ÷ñÞóôç;";
+ Message[ korean ] = "»ç¿ëÀÚ µ¥ÀÌÅ͸¦ º¯°æÇϼ̽À´Ï´Ù.\n±×·Î ÀÎÇØ µî·ÏÀÌ ¹«È¿È­µÈ´Ù´Â »ç½Ç¿¡ À¯ÀÇÇϽʽÿÀ. \n±×·¯¸é ¾ÕÀ¸·Î 30Àϳ»¿¡ ÀÔ·ÂÇØ¾ß ÇÒ »õ µî·Ï Å°°¡ ÇÊ¿äÇÕ´Ï´Ù.\nµî·Ï ¾ç½ÄÀº µµ¿ò¸»-µî·Ï... ¸Þ´º¿¡¼­ ãÀ» ¼ö ÀÖ½À´Ï´Ù.\nÁ¤¸»·Î »ç¿ëÀÚ µ¥ÀÌÅ͸¦ º¯°æÇϽðڽÀ´Ï±î?";
+ Message[ turkish ] = "Kullanýcý verilerini deðiþtirdiniz.\nBu nedenle kayýt iþlemi de iptal edilecektir.\nEn geç 30 gün içerisinde yeni bir kayýt koduý girmeniz gerekiyor.\nÝlgili kayýt formunu mönüde, \"Yardým - Kayýt...\" altýnda bulabilirsiniz.\nKullanýcý verilerini gerçekten deðiþtirmek istiyor musunuz?";
+ Message[ language_user1 ] = " ";
+};
+
+ // RID_SVXSTR_FIELDUNIT_TABLE --------------------------------------------
+
+StringArray RID_SVXSTR_FIELDUNIT_TABLE
+{
+ ItemList =
+ {
+ < "Millimeter" ; FUNIT_MM ; > ;
+ < "Zentimeter" ; FUNIT_CM ; > ;
+ < "Meter" ; FUNIT_M ; > ;
+ < "Kilometer" ; FUNIT_KM ; > ;
+ < "Zoll" ; FUNIT_INCH ; > ;
+ < "Fuß" ; FUNIT_FOOT ; > ;
+ < "Meilen" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Point" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ English ] =
+ {
+ < "Millimeter" ; FUNIT_MM ; > ;
+ < "Zentimeter" ; FUNIT_CM ; > ;
+ < "Meter" ; FUNIT_M ; > ;
+ < "Kilometer" ; FUNIT_KM ; > ;
+ < "Zoll" ; FUNIT_INCH ; > ;
+ < "Fuß" ; FUNIT_FOOT ; > ;
+ < "Meilen" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Point" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ norwegian ] =
+ {
+ < "Millimeter" ; FUNIT_MM ; > ;
+ < "Zentimeter" ; FUNIT_CM ; > ;
+ < "Meter" ; FUNIT_M ; > ;
+ < "Kilometer" ; FUNIT_KM ; > ;
+ < "Zoll" ; FUNIT_INCH ; > ;
+ < "Fuß" ; FUNIT_FOOT ; > ;
+ < "Meilen" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Point" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ italian ] =
+ {
+ < "Millimetro" ; FUNIT_MM ; > ;
+ < "Centimetro" ; FUNIT_CM ; > ;
+ < "Metro" ; FUNIT_M ; > ;
+ < "Chilometro" ; FUNIT_KM ; > ;
+ < "Pollice" ; FUNIT_INCH ; > ;
+ < "piede" ; FUNIT_FOOT ; > ;
+ < "miglia" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Punti" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ portuguese_brazilian ] =
+ {
+ < "Millimeter" ; FUNIT_MM ; > ;
+ < "Zentimeter" ; FUNIT_CM ; > ;
+ < "Meter" ; FUNIT_M ; > ;
+ < "Kilometer" ; FUNIT_KM ; > ;
+ < "Zoll" ; FUNIT_INCH ; > ;
+ < "Fuß" ; FUNIT_FOOT ; > ;
+ < "Meilen" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Ponto" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ portuguese ] =
+ {
+ < "Milímetro" ; FUNIT_MM ; > ;
+ < "Centímetro" ; FUNIT_CM ; > ;
+ < "Metro" ; FUNIT_M ; > ;
+ < "Quilómetro" ; FUNIT_KM ; > ;
+ < "Polegada" ; FUNIT_INCH ; > ;
+ < "Pé" ; FUNIT_FOOT ; > ;
+ < "Milhas" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Ponto" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ french ] =
+ {
+ < "Millimètre" ; FUNIT_MM ; > ;
+ < "Centimètre" ; FUNIT_CM ; > ;
+ < "Mètre" ; FUNIT_M ; > ;
+ < "Kilomètre" ; FUNIT_KM ; > ;
+ < "Pouce" ; FUNIT_INCH ; > ;
+ < "Pied" ; FUNIT_FOOT ; > ;
+ < "Milles" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Point" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ dutch ] =
+ {
+ < "Millimeter" ; FUNIT_MM ; > ;
+ < "Centimeter" ; FUNIT_CM ; > ;
+ < "Meter" ; FUNIT_M ; > ;
+ < "Kilometer" ; FUNIT_KM ; > ;
+ < "Duim" ; FUNIT_INCH ; > ;
+ < "Voet" ; FUNIT_FOOT ; > ;
+ < "Mijlen" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Punt" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ spanish ] =
+ {
+ < "Milímetro" ; FUNIT_MM ; > ;
+ < "Centímetro" ; FUNIT_CM ; > ;
+ < "Metro" ; FUNIT_M ; > ;
+ < "Kilómetro" ; FUNIT_KM ; > ;
+ < "Pulgadas" ; FUNIT_INCH ; > ;
+ < "Pie" ; FUNIT_FOOT ; > ;
+ < "Millas" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Punto" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ danish ] =
+ {
+ < "Millimeter" ; FUNIT_MM ; > ;
+ < "Centimeter" ; FUNIT_CM ; > ;
+ < "Meter" ; FUNIT_M ; > ;
+ < "Kilometer" ; FUNIT_KM ; > ;
+ < "Tommer" ; FUNIT_INCH ; > ;
+ < "Fod" ; FUNIT_FOOT ; > ;
+ < "Mil" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Punkt" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ swedish ] =
+ {
+ < "Millimeter" ; FUNIT_MM ; > ;
+ < "Centimeter" ; FUNIT_CM ; > ;
+ < "Meter" ; FUNIT_M ; > ;
+ < "Kilometer" ; FUNIT_KM ; > ;
+ < "Tum" ; FUNIT_INCH ; > ;
+ < "Fot" ; FUNIT_FOOT ; > ;
+ < "Mil" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Punkt" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ finnish ] =
+ {
+ < "Millimeter" ; FUNIT_MM ; > ;
+ < "Zentimeter" ; FUNIT_CM ; > ;
+ < "Meter" ; FUNIT_M ; > ;
+ < "Kilometer" ; FUNIT_KM ; > ;
+ < "Zoll" ; FUNIT_INCH ; > ;
+ < "Fuß" ; FUNIT_FOOT ; > ;
+ < "Meilen" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Point" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ english_us ] =
+ {
+ < "Millimeter" ; FUNIT_MM ; > ;
+ < "Centimeter" ; FUNIT_CM ; > ;
+ < "Meter" ; FUNIT_M ; > ;
+ < "Kilometer" ; FUNIT_KM ; > ;
+ < "Inch" ; FUNIT_INCH ; > ;
+ < "Foot" ; FUNIT_FOOT ; > ;
+ < "Miles" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Point" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ chinese_simplified ] =
+ {
+ < "ºÁÃ×" ; FUNIT_MM ; > ;
+ < "ÀåÃ×" ; FUNIT_CM ; > ;
+ < "Ã×" ; FUNIT_M ; > ;
+ < "¹«Àï" ; FUNIT_KM ; > ;
+ < "Ó¢´ç" ; FUNIT_INCH ; > ;
+ < "Ó¢³ß" ; FUNIT_FOOT ; > ;
+ < "Ó¢Àï" ; FUNIT_MILE ; > ;
+ < "Ƥ¿ÉÐÍ×Ö·û" ; FUNIT_PICA ; > ;
+ < "µã" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ russian ] =
+ {
+ < "Ìèëëèìåòðû" ; FUNIT_MM ; > ;
+ < "Ñàíòèìåòðû" ; FUNIT_CM ; > ;
+ < "Ìåòðû" ; FUNIT_M ; > ;
+ < "Êèëîìåòðû" ; FUNIT_KM ; > ;
+ < "Äþéìû" ; FUNIT_INCH ; > ;
+ < "Ôóòû" ; FUNIT_FOOT ; > ;
+ < "Ìèëè" ; FUNIT_MILE ; > ;
+ < "Ïèêè" ; FUNIT_PICA ; > ;
+ < "Ïóíêò" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ polish ] =
+ {
+ < "Milimetr" ; FUNIT_MM ; > ;
+ < "Centymetr" ; FUNIT_CM ; > ;
+ < "Metr" ; FUNIT_M ; > ;
+ < "Kilometr" ; FUNIT_KM ; > ;
+ < "Cal" ; FUNIT_INCH ; > ;
+ < "Stopa" ; FUNIT_FOOT ; > ;
+ < "Mile" ; FUNIT_MILE ; > ;
+ < "Cycero" ; FUNIT_PICA ; > ;
+ < "Point" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ japanese ] =
+ {
+ < "ÐØÒ°ÄÙ" ; FUNIT_MM ; > ;
+ < "¾ÝÁÒ°ÄÙ" ; FUNIT_CM ; > ;
+ < "Ò°ÄÙ" ; FUNIT_M ; > ;
+ < "·ÛÒ°ÄÙ" ; FUNIT_KM ; > ;
+ < "²ÝÁ" ; FUNIT_INCH ; > ;
+ < "̨°Ä" ; FUNIT_FOOT ; > ;
+ < "ϲÙ" ; FUNIT_MILE ; > ;
+ < "Êß²¶" ; FUNIT_PICA ; > ;
+ < "Îß²ÝÄ" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ chinese_traditional ] =
+ {
+ < "²@¦Ì" ; FUNIT_MM ; > ;
+ < "Íù¦Ì" ; FUNIT_CM ; > ;
+ < "¦Ì" ; FUNIT_M ; > ;
+ < "¤½¨½" ; FUNIT_KM ; > ;
+ < "­^¤o" ; FUNIT_INCH ; > ;
+ < "­^¤Ø" ; FUNIT_FOOT ; > ;
+ < "­^¨½" ; FUNIT_MILE ; > ;
+ < "¥Ö¥i«¬¦r¤¸" ; FUNIT_PICA ; > ;
+ < "ÂI" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ arabic ] =
+ {
+ < "ãáíãÊÑ" ; FUNIT_MM ; > ;
+ < "ÓäÊíãÊÑ" ; FUNIT_CM ; > ;
+ < "ãÊÑ" ; FUNIT_M ; > ;
+ < "ßíáæãÊÑ" ; FUNIT_KM ; > ;
+ < "ÈæÕÉ" ; FUNIT_INCH ; > ;
+ < "ÞÏã" ; FUNIT_FOOT ; > ;
+ < "ÃãíÇá" ; FUNIT_MILE ; > ;
+ < "ÈíßÇ" ; FUNIT_PICA ; > ;
+ < "äÞØÉ" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ greek ] =
+ {
+ < "×éëéïóôÜ" ; FUNIT_MM ; > ;
+ < "ÅêáôïóôÜ" ; FUNIT_CM ; > ;
+ < "ÌÝôñá" ; FUNIT_M ; > ;
+ < "×éëéüìåôñï" ; FUNIT_KM ; > ;
+ < "ºíôóåò" ; FUNIT_INCH ; > ;
+ < "Ðüäé" ; FUNIT_FOOT ; > ;
+ < "Ìßëéá" ; FUNIT_MILE ; > ;
+ < "Pica" ; FUNIT_PICA ; > ;
+ < "Óçìåßï" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ korean ] =
+ {
+ < "¹Ð¸®¹ÌÅÍ" ; FUNIT_MM ; > ;
+ < "¼¾Æ¼¹ÌÅÍ" ; FUNIT_CM ; > ;
+ < "¹ÌÅÍ" ; FUNIT_M ; > ;
+ < "ų·Î¹ÌÅÍ" ; FUNIT_KM ; > ;
+ < "ÀÎÄ¡" ; FUNIT_INCH ; > ;
+ < "ÇÇÆ®" ; FUNIT_FOOT ; > ;
+ < "¸¶ÀÏ" ; FUNIT_MILE ; > ;
+ < "ÆÄÀÌÄ¿" ; FUNIT_PICA ; > ;
+ < "Æ÷ÀÎÆ®" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ turkish ] =
+ {
+ < "Milimetre" ; FUNIT_MM ; > ;
+ < "Santimetre" ; FUNIT_CM ; > ;
+ < "Metre" ; FUNIT_M ; > ;
+ < "Kilometre" ; FUNIT_KM ; > ;
+ < "Ýnç" ; FUNIT_INCH ; > ;
+ < "Ft" ; FUNIT_FOOT ; > ;
+ < "Mil" ; FUNIT_MILE ; > ;
+ < "Pika" ; FUNIT_PICA ; > ;
+ < "Nokta" ; FUNIT_POINT ; > ;
+ };
+ ItemList [ language_user1 ] =
+ {
+ < " " ; FUNIT_MM ; > ;
+ < " " ; FUNIT_CM ; > ;
+ < " " ; FUNIT_M ; > ;
+ < " " ; FUNIT_KM ; > ;
+ < " " ; FUNIT_INCH ; > ;
+ < " " ; FUNIT_FOOT ; > ;
+ < " " ; FUNIT_MILE ; > ;
+ < " " ; FUNIT_PICA ; > ;
+ < " " ; FUNIT_POINT ; > ;
+ };
+ };
+
+ // ********************************************************************** EOF
diff --git a/svx/source/options/optgrid.cxx b/svx/source/options/optgrid.cxx
new file mode 100644
index 0000000000..601b545eae
--- /dev/null
+++ b/svx/source/options/optgrid.cxx
@@ -0,0 +1,624 @@
+/*************************************************************************
+ *
+ * $RCSfile: optgrid.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXMODULE_HXX //autogen
+#include <sfx2/module.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_OPTGRID_CXX
+
+#include "svxids.hrc"
+#include "dialmgr.hxx"
+#include "optgrid.hxx"
+#include "dialogs.hrc"
+#include "optgrid.hrc"
+#include "dlgutil.hxx"
+
+/* -----------------18.08.98 17:41-------------------
+ * local functions
+ * --------------------------------------------------*/
+void lcl_GetMinMax(MetricField& rField, long& nFirst, long& nLast, long& nMin, long& nMax)
+{
+ nFirst = rField.Denormalize( rField.GetFirst( FUNIT_TWIP ) );
+ nLast = rField.Denormalize( rField.GetLast( FUNIT_TWIP ) );
+ nMin = rField.Denormalize( rField.GetMin( FUNIT_TWIP ) );
+ nMax = rField.Denormalize( rField.GetMax( FUNIT_TWIP ) );
+}
+
+void lcl_SetMinMax(MetricField& rField, long nFirst, long nLast, long nMin, long nMax)
+{
+ 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 );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Rastereinstellungen Ctor
+ --------------------------------------------------------------------*/
+
+SvxOptionsGrid::SvxOptionsGrid() :
+ nFldDrawX ( 100 ),
+ nFldDivisionX ( 0 ),
+ nFldDrawY ( 100 ),
+ nFldDivisionY ( 0 ),
+ nFldSnapX ( 100 ),
+ nFldSnapY ( 100 ),
+ bUseGridsnap ( 0 ),
+ bSynchronize ( 1 ),
+ bGridVisible ( 0 ),
+ bEqualGrid ( 1 )
+{
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Rastereinstellungen Dtor
+ --------------------------------------------------------------------*/
+
+SvxOptionsGrid::~SvxOptionsGrid()
+{
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Item fuer Rastereinstellungen
+ --------------------------------------------------------------------*/
+
+SvxGridItem::SvxGridItem( const SvxGridItem& rItem ):
+ SfxPoolItem(rItem)
+{
+ bUseGridsnap = rItem.bUseGridsnap ;
+ bSynchronize = rItem.bSynchronize ;
+ bGridVisible = rItem.bGridVisible ;
+ bEqualGrid = rItem.bEqualGrid ;
+ nFldDrawX = rItem.nFldDrawX ;
+ nFldDivisionX= rItem.nFldDivisionX;
+ nFldDrawY = rItem.nFldDrawY ;
+ nFldDivisionY= rItem.nFldDivisionY;
+ nFldSnapX = rItem.nFldSnapX ;
+ nFldSnapY = rItem.nFldSnapY ;
+
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+SfxPoolItem* SvxGridItem::Clone( SfxItemPool* ) const
+{
+ return new SvxGridItem( *this );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+int SvxGridItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+
+ const SvxGridItem& rItem = (const SvxGridItem&) rAttr;
+
+ return ( bUseGridsnap == rItem.bUseGridsnap &&
+ bSynchronize == rItem.bSynchronize &&
+ bGridVisible == rItem.bGridVisible &&
+ bEqualGrid == rItem.bEqualGrid &&
+ nFldDrawX == rItem.nFldDrawX &&
+ nFldDivisionX== rItem.nFldDivisionX&&
+ nFldDrawY == rItem.nFldDrawY &&
+ nFldDivisionY== rItem.nFldDivisionY&&
+ nFldSnapX == rItem.nFldSnapX &&
+ nFldSnapY == rItem.nFldSnapY );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+SfxItemPresentation SvxGridItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit /*eCoreUnit*/,
+ SfxMapUnit /*ePresUnit*/,
+ String& 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 = String::CreateFromAscii("SvxGridItem");
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+/*----------------- OS 23.02.95 -----------------------
+ TabPage Rastereinstellungen
+-------------------------------------------------------*/
+
+SvxGridTabPage::SvxGridTabPage( Window* pParent, const SfxItemSet& rCoreSet) :
+
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_GRID ), rCoreSet ),
+
+ aFtResolution ( this, ResId( FT_RESOLUTION ) ),
+ aFtDrawX ( this, ResId( FT_DRAW_X ) ),
+ aMtrFldDrawX ( this, ResId( MTR_FLD_DRAW_X ) ),
+ aFtDivision ( this, ResId( FT_DIVISION ) ),
+ aMtrFldDivisionX( this, ResId( MTR_FLD_DIVISION_X ) ),
+ aFtDrawY ( this, ResId( FT_DRAW_Y ) ),
+ aMtrFldDrawY ( this, ResId( MTR_FLD_DRAW_Y ) ),
+ aMtrFldDivisionY( this, ResId( MTR_FLD_DIVISION_Y ) ),
+ aGrpDrawGrid ( this, ResId( GRP_DRAWGRID ) ),
+ aCbxUseGridsnap ( this, ResId( CBX_USE_GRIDSNAP ) ),
+ aCbxSynchronize ( this, ResId( CBX_SYNCHRONIZE ) ),
+ aCbxGridVisible ( this, ResId( CBX_GRID_VISIBLE ) ),
+ aGrpOptions ( this, ResId( GRP_OPTIONS ) ),
+ aFtSnapX ( this, ResId( FT_SNAP_X ) ),
+ aMtrFldSnapX ( this, ResId( MTR_FLD_SNAP_X ) ),
+ aFtSnapY ( this, ResId( FT_SNAP_Y ) ),
+ aMtrFldSnapY ( this, ResId( MTR_FLD_SNAP_Y ) ),
+ aCbxEqualGrid ( this, ResId( CBX_EQUAL_GRID ) ),
+ aGrpSnapGrid ( this, ResId( GRP_SNAPGRID ) ),
+
+ bAttrModified( FALSE )
+{
+ HideSnapGrid();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ FreeResource();
+
+ // Metrik einstellen
+ FieldUnit eFUnit;
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_ATTR_METRIC))
+ {
+ eFUnit = (FieldUnit)((const SfxUInt16Item&)rCoreSet.Get(SID_ATTR_METRIC)).GetValue();
+ }
+ else
+ {
+ GET_MODULE_FIELDUNIT( eFUnit );
+ }
+
+ long nFirst, nLast, nMin, nMax;
+
+ lcl_GetMinMax(aMtrFldDrawX, nFirst, nLast, nMin, nMax);
+ SetFieldUnit( aMtrFldDrawX, eFUnit, TRUE );
+ lcl_SetMinMax(aMtrFldDrawX, nFirst, nLast, nMin, nMax);
+
+ lcl_GetMinMax(aMtrFldDrawY, nFirst, nLast, nMin, nMax);
+ SetFieldUnit( aMtrFldDrawY, eFUnit, TRUE );
+ lcl_SetMinMax(aMtrFldDrawY, nFirst, nLast, nMin, nMax);
+
+ lcl_GetMinMax(aMtrFldSnapX, nFirst, nLast, nMin, nMax);
+ SetFieldUnit( aMtrFldSnapX, eFUnit, TRUE );
+ lcl_SetMinMax(aMtrFldSnapX, nFirst, nLast, nMin, nMax);
+
+ lcl_GetMinMax(aMtrFldSnapY, nFirst, nLast, nMin, nMax);
+ SetFieldUnit( aMtrFldSnapY, eFUnit, TRUE );
+ lcl_SetMinMax(aMtrFldSnapY, nFirst, nLast, nMin, nMax);
+
+
+ Link aLink = LINK( this, SvxGridTabPage, ChangeGridsnapHdl_Impl );
+ aCbxUseGridsnap.SetClickHdl( aLink );
+ aCbxSynchronize.SetClickHdl( aLink );
+ aCbxGridVisible.SetClickHdl( aLink );
+ aCbxEqualGrid.SetClickHdl(
+ LINK( this, SvxGridTabPage, ChangeEqualGridHdl_Impl ) );
+ aMtrFldDrawX.SetModifyHdl(
+ LINK( this, SvxGridTabPage, ChangeDrawXHdl_Impl ) );
+ aMtrFldDrawY.SetModifyHdl(
+ LINK( this, SvxGridTabPage, ChangeDrawYHdl_Impl ) );
+ aMtrFldDivisionX.SetModifyHdl(
+ LINK( this, SvxGridTabPage, ChangeDivisionXHdl_Impl ) );
+ aMtrFldDivisionY.SetModifyHdl(
+ LINK( this, SvxGridTabPage, ChangeDivisionYHdl_Impl ) );
+ aMtrFldSnapX.SetModifyHdl(
+ LINK( this, SvxGridTabPage, ChangeSnapXHdl_Impl ) );
+ aMtrFldSnapY.SetModifyHdl(
+ LINK( this, SvxGridTabPage, ChangeSnapYHdl_Impl ) );
+}
+
+//------------------------------------------------------------------------
+
+SfxTabPage* SvxGridTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet )
+{
+ return ( new SvxGridTabPage( pParent, rAttrSet ) );
+}
+
+//------------------------------------------------------------------------
+
+BOOL SvxGridTabPage::FillItemSet( SfxItemSet& rCoreSet )
+{
+ if ( bAttrModified )
+ {
+ SvxGridItem aGridItem( SID_ATTR_GRID_OPTIONS );
+
+ aGridItem.bUseGridsnap = aCbxUseGridsnap.IsChecked();
+ aGridItem.bSynchronize = aCbxSynchronize.IsChecked();
+ aGridItem.bGridVisible = aCbxGridVisible.IsChecked();
+ aGridItem.bEqualGrid = aCbxEqualGrid.IsChecked();
+
+ SfxMapUnit eUnit =
+ rCoreSet.GetPool()->GetMetric( GetWhich( SID_ATTR_GRID_OPTIONS ) );
+ long nX =GetCoreValue( aMtrFldDrawX, eUnit );
+ long nY = GetCoreValue( aMtrFldDrawY, eUnit );
+
+ aGridItem.nFldDrawX = (UINT32) nX;
+ aGridItem.nFldDrawY = (UINT32) nY;
+ aGridItem.nFldDivisionX = aMtrFldDivisionX.GetValue();
+ aGridItem.nFldDivisionY = aMtrFldDivisionY.GetValue();
+
+ aGridItem.nFldSnapX = (UINT32) GetCoreValue( aMtrFldSnapX, eUnit );
+ aGridItem.nFldSnapY = (UINT32) GetCoreValue( aMtrFldSnapY, eUnit );
+
+ rCoreSet.Put( aGridItem );
+ }
+ return bAttrModified;
+}
+
+//------------------------------------------------------------------------
+
+void SvxGridTabPage::Reset( const SfxItemSet& rSet )
+{
+ const SfxPoolItem* pAttr = 0;
+
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , FALSE,
+ (const SfxPoolItem**)&pAttr ))
+ {
+ const SvxGridItem* pGridAttr = (SvxGridItem*)pAttr;
+ aCbxUseGridsnap.Check( pGridAttr->bUseGridsnap == 1 );
+ aCbxSynchronize.Check( pGridAttr->bSynchronize == 1 );
+ aCbxGridVisible.Check( pGridAttr->bGridVisible == 1 );
+ aCbxEqualGrid.Check( pGridAttr->bEqualGrid == 1 );
+
+ SfxMapUnit eUnit =
+ rSet.GetPool()->GetMetric( GetWhich( SID_ATTR_GRID_OPTIONS ) );
+ SetMetricValue( aMtrFldDrawX , pGridAttr->nFldDrawX, eUnit );
+ SetMetricValue( aMtrFldDrawY , pGridAttr->nFldDrawY, eUnit );
+
+// UINT32 nFineX = pGridAttr->nFldDivisionX;
+// UINT32 nFineY = pGridAttr->nFldDivisionY;
+// aMtrFldDivisionX.SetValue( nFineX ? (pGridAttr->nFldDrawX / nFineX - 1) : 0 );
+// aMtrFldDivisionY.SetValue( nFineY ? (pGridAttr->nFldDrawY / nFineY - 1) : 0 );
+ aMtrFldDivisionX.SetValue( pGridAttr->nFldDivisionX );
+ aMtrFldDivisionY.SetValue( pGridAttr->nFldDivisionY );
+ SetMetricValue( aMtrFldSnapX , pGridAttr->nFldSnapX, eUnit );
+ SetMetricValue( aMtrFldSnapY , pGridAttr->nFldSnapY, eUnit );
+ }
+
+ ChangeGridsnapHdl_Impl( &aCbxUseGridsnap );
+ bAttrModified = FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxGridTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+ const SfxPoolItem* pAttr = NULL;
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , FALSE,
+ (const SfxPoolItem**)&pAttr ))
+ {
+ const SvxGridItem* pGridAttr = (SvxGridItem*) pAttr;
+ aCbxUseGridsnap.Check( pGridAttr->bUseGridsnap == 1 );
+
+ ChangeGridsnapHdl_Impl( &aCbxUseGridsnap );
+ }
+
+ // Metrik ggfs. aendern (da TabPage im Dialog liegt,
+ // wo die Metrik eingestellt werden kann
+ //USHORT nWhich = GetWhich( SID_ATTR_METRIC );
+ //if( rSet.GetItemState( GetWhich( SID_ATTR_METRIC ) ) >= SFX_ITEM_AVAILABLE )
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC , FALSE,
+ (const SfxPoolItem**)&pAttr ))
+ {
+ const SfxUInt16Item* pItem = (SfxUInt16Item*) pAttr;
+
+ FieldUnit eFUnit = (FieldUnit)(long)pItem->GetValue();
+
+ if( eFUnit != aMtrFldDrawX.GetUnit() )
+ {
+ // Metriken einstellen
+ long nFirst, nLast, nMin, nMax;
+ long nVal = aMtrFldDrawX.Denormalize( aMtrFldDrawX.GetValue( FUNIT_TWIP ) );
+
+ lcl_GetMinMax(aMtrFldDrawX, nFirst, nLast, nMin, nMax);
+ SetFieldUnit( aMtrFldDrawX, eFUnit, TRUE );
+ lcl_SetMinMax(aMtrFldDrawX, nFirst, nLast, nMin, nMax);
+
+ aMtrFldDrawX.SetValue( aMtrFldDrawX.Normalize( nVal ), FUNIT_TWIP );
+
+ nVal = aMtrFldDrawY.Denormalize( aMtrFldDrawY.GetValue( FUNIT_TWIP ) );
+ lcl_GetMinMax(aMtrFldDrawY, nFirst, nLast, nMin, nMax);
+ SetFieldUnit( aMtrFldDrawY, eFUnit, TRUE );
+ lcl_SetMinMax(aMtrFldDrawY, nFirst, nLast, nMin, nMax);
+ aMtrFldDrawY.SetValue( aMtrFldDrawY.Normalize( nVal ), FUNIT_TWIP );
+
+ nVal = aMtrFldSnapX.Denormalize( aMtrFldSnapX.GetValue( FUNIT_TWIP ) );
+ lcl_GetMinMax(aMtrFldSnapX, nFirst, nLast, nMin, nMax);
+ SetFieldUnit( aMtrFldSnapX, eFUnit, TRUE );
+ lcl_SetMinMax(aMtrFldSnapX, nFirst, nLast, nMin, nMax);
+ aMtrFldSnapX.SetValue( aMtrFldSnapX.Normalize( nVal ), FUNIT_TWIP );
+
+ nVal = aMtrFldSnapY.Denormalize( aMtrFldSnapY.GetValue( FUNIT_TWIP ) );
+ lcl_GetMinMax(aMtrFldSnapY, nFirst, nLast, nMin, nMax);
+ SetFieldUnit( aMtrFldSnapY, eFUnit, TRUE );
+ lcl_SetMinMax(aMtrFldSnapY, nFirst, nLast, nMin, nMax);
+ aMtrFldSnapY.SetValue( aMtrFldSnapY.Normalize( nVal ), FUNIT_TWIP );
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxGridTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( pSet )
+ FillItemSet( *pSet );
+ return( LEAVE_PAGE );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGridTabPage, ChangeDrawXHdl_Impl, void *, EMPTYARG )
+{
+ bAttrModified = TRUE;
+ if( aCbxSynchronize.IsChecked() )
+ {
+ aMtrFldDrawY.SetValue( aMtrFldDrawX.GetValue() );
+ }
+ if( aCbxEqualGrid.IsChecked() )
+ {
+ aMtrFldSnapX.SetValue( aMtrFldDrawX.GetValue() /
+ ( aMtrFldDivisionX.GetValue() + 1 ) );
+ }
+ if( aCbxSynchronize.IsChecked() &&
+ aCbxEqualGrid.IsChecked() )
+ {
+ aMtrFldSnapY.SetValue( aMtrFldDrawX.GetValue() /
+ ( aMtrFldDivisionY.GetValue() + 1 ) );
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGridTabPage, ChangeDrawYHdl_Impl, void *, EMPTYARG )
+{
+ bAttrModified = TRUE;
+ if( aCbxSynchronize.IsChecked() )
+ {
+ aMtrFldDrawX.SetValue( aMtrFldDrawY.GetValue() );
+ }
+ if( aCbxEqualGrid.IsChecked() )
+ {
+ aMtrFldSnapY.SetValue( aMtrFldDrawY.GetValue() /
+ ( aMtrFldDivisionY.GetValue() + 1 ) );
+ }
+ if( aCbxSynchronize.IsChecked() &&
+ aCbxEqualGrid.IsChecked() )
+ {
+ aMtrFldSnapX.SetValue( aMtrFldDrawY.GetValue() /
+ ( aMtrFldDivisionX.GetValue() + 1 ) );
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGridTabPage, ChangeDivisionXHdl_Impl, void *, EMPTYARG )
+{
+ bAttrModified = TRUE;
+ if( aCbxSynchronize.IsChecked() )
+ {
+ aMtrFldDivisionY.SetValue( aMtrFldDivisionX.GetValue() );
+ }
+ if( aCbxEqualGrid.IsChecked() )
+ {
+ aMtrFldSnapX.SetValue( aMtrFldDrawX.GetValue() /
+ ( aMtrFldDivisionX.GetValue() + 1 ) );
+ }
+ if( aCbxSynchronize.IsChecked() &&
+ aCbxEqualGrid.IsChecked() )
+ {
+ aMtrFldSnapY.SetValue( aMtrFldDrawY.GetValue() /
+ ( aMtrFldDivisionY.GetValue() + 1 ) );
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGridTabPage, ChangeDivisionYHdl_Impl, void *, EMPTYARG )
+{
+ bAttrModified = TRUE;
+ if( aCbxSynchronize.IsChecked() )
+ {
+ aMtrFldDivisionX.SetValue( aMtrFldDivisionY.GetValue() );
+ }
+ if( aCbxEqualGrid.IsChecked() )
+ {
+ aMtrFldSnapY.SetValue( aMtrFldDrawY.GetValue() /
+ ( aMtrFldDivisionY.GetValue() + 1 ) );
+ }
+ if( aCbxSynchronize.IsChecked() &&
+ aCbxEqualGrid.IsChecked() )
+ {
+ aMtrFldSnapX.SetValue( aMtrFldDrawX.GetValue() /
+ ( aMtrFldDivisionX.GetValue() + 1 ) );
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGridTabPage, ChangeSnapXHdl_Impl, void *, EMPTYARG )
+{
+ bAttrModified = TRUE;
+ if( aCbxSynchronize.IsChecked() )
+ {
+ aMtrFldSnapY.SetValue( aMtrFldSnapX.GetValue() );
+ }
+ if( aCbxEqualGrid.IsChecked() )
+ aCbxEqualGrid.Check( FALSE );
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGridTabPage, ChangeSnapYHdl_Impl, void *, EMPTYARG )
+{
+ bAttrModified = TRUE;
+ if( aCbxSynchronize.IsChecked() )
+ {
+ aMtrFldSnapX.SetValue( aMtrFldSnapY.GetValue() );
+ }
+ if( aCbxEqualGrid.IsChecked() )
+ aCbxEqualGrid.Check( FALSE );
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGridTabPage, ChangeEqualGridHdl_Impl, void *, EMPTYARG )
+{
+ bAttrModified = TRUE;
+ if( aCbxEqualGrid.IsChecked() )
+ {
+ aFtSnapX.Disable();
+ aMtrFldSnapX.Disable();
+ aFtSnapY.Disable();
+ aMtrFldSnapY.Disable();
+ }
+ else
+ {
+ aFtSnapX.Enable();
+ aMtrFldSnapX.Enable();
+ aFtSnapY.Enable();
+ aMtrFldSnapY.Enable();
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxGridTabPage, ChangeGridsnapHdl_Impl, void *, p )
+{
+ // Als Hack, damit bei den anderen CBXen auch das
+ // ModifiedFlag gesetzt werden kann
+ if( p == &aCbxUseGridsnap )
+ {
+ if( aCbxUseGridsnap.IsChecked() )
+ {
+ aGrpSnapGrid.Enable();
+ aCbxEqualGrid.Enable();
+
+ ChangeEqualGridHdl_Impl( this );
+ }
+ else
+ {
+ aFtSnapX.Disable();
+ aMtrFldSnapX.Disable();
+ aFtSnapY.Disable();
+ aMtrFldSnapY.Disable();
+ aGrpSnapGrid.Disable();
+ aCbxEqualGrid.Disable();
+ }
+ }
+ bAttrModified = TRUE;
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+void SvxGridTabPage::HideSnapGrid()
+{
+ aFtSnapX.Hide();
+ aMtrFldSnapX.Hide();
+ aFtSnapY.Hide();
+ aMtrFldSnapY.Hide();
+ aGrpSnapGrid.Hide();
+ aCbxEqualGrid.Hide();
+ aGrpSnapGrid.Hide();
+
+ Size aSize = aGrpDrawGrid.GetSizePixel();
+ aSize = PixelToLogic( aSize, MAP_APPFONT); // Sollte in MAP_APPFONT sein
+ aSize.Width() = 248;
+ aGrpDrawGrid.SetSizePixel( LogicToPixel(aSize, MAP_APPFONT ));
+}
+
+
diff --git a/svx/source/options/optgrid.hrc b/svx/source/options/optgrid.hrc
new file mode 100644
index 0000000000..953b36da38
--- /dev/null
+++ b/svx/source/options/optgrid.hrc
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: optgrid.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVX_OPTGRID_HRC
+#define _SVX_OPTGRID_HRC
+
+//Grid-Page
+#define MTR_FLD_GRID 1
+#define GRP_DRAWGRID 1
+#define GRP_OPTIONS 3
+#define GRP_SNAPGRID 2
+#define CBX_USE_GRIDSNAP 1
+#define CBX_SYNCHRONIZE 2
+#define CBX_EQUAL_GRID 3
+#define CBX_SNAPGRID 4
+#define CBX_GRID_VISIBLE 6
+#define MTR_FLD_DRAW_Y 1
+#define MTR_FLD_SNAP_X 2
+#define MTR_FLD_SNAP_Y 3
+#define MTR_FLD_DRAW_X 8
+#define MTR_FLD_DIVISION_X 6
+#define MTR_FLD_DIVISION_Y 7
+#define FT_SNAP_X 1
+#define FT_SNAP_Y 2
+#define FT_DRAW_X 5
+#define FT_DRAW_Y 8
+#define FT_RESOLUTION 6
+#define FT_DIVISION 7
+
+// #define CBX_CROSSHAIR 30
+// #define CB_RULER 31
+
+#endif
diff --git a/svx/source/options/optgrid.src b/svx/source/options/optgrid.src
new file mode 100644
index 0000000000..d69a41dedb
--- /dev/null
+++ b/svx/source/options/optgrid.src
@@ -0,0 +1,587 @@
+/*************************************************************************
+ *
+ * $RCSfile: optgrid.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include <sfx2/sfx.hrc>
+#include "helpid.hrc"
+#include "dialogs.hrc"
+#include "optgrid.hrc"
+ // pragma ----------------------------------------------------------------
+
+TabPage RID_SVXPAGE_GRID
+{
+ HelpId = HID_OPTIONS_GRID ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ CheckBox CBX_USE_GRIDSNAP
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 102 , 12 ) ;
+ TabStop = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Fangraster benutzen : ~Rasterfang benutzen */
+ Text = "~Fangraster benutzen" ;
+ Text [ ENGLISH ] = "Snap to ~Grid" ;
+ Text [ NORWEGIAN ] = "Snap to ~Grid" ;
+ Text [ DANISH ] = "Fastgør til gitter" ;
+ Text [ ENGLISH_US ] = "~Snap to grid" ;
+ Text [ SPANISH ] = "~Usar cuadrícula de captura" ;
+ Text [ FINNISH ] = "Kohdista ~ruudukkoon" ;
+ Text [ FRENCH ] = "Utiliser la ~grille de capture" ;
+ Text [ ITALIAN ] = "Applica ~griglia" ;
+ Text [ DUTCH ] = "Va~ngraster gebruiken" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Fixar na ~Grade" ;
+ Text [ SWEDISH ] = "~Fäst mot stödraster" ;
+ Text [ PORTUGUESE ] = "Fixar na ~quadrícula" ;
+ Text[ chinese_simplified ] = "ʹÓÃÍø¸ñ×ø±ê(~S)";
+ Text[ russian ] = "Ïðèâÿçàòü ê ðåøåòêå";
+ Text[ polish ] = "U¿yj siatki zaczepu";
+ Text[ japanese ] = "½Å¯Ìß–Ô–Ú½¸Ø°Ý‚ÌŽg—p(~S)";
+ Text[ chinese_traditional ] = "¨Ï¥Îºô®æ§¤¼Ð(~S)";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ÔÈßÉ ÇáÍÈÓ";
+ Text[ greek ] = "×ñÞóç ðëÝãìáôïò ð~ñïóêüëëçóçò";
+ Text[ korean ] = "¸ÂÃã ´«±Ý »ç¿ë(~S)";
+ Text[ turkish ] = "Kavrama kýlavuz çizgileri kullan";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_SNAP_X
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 199 , 87 ) ;
+ Size = MAP_APPFONT ( 43 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 10 ;
+ First = 10 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 50 ;
+ };
+ MetricField MTR_FLD_SNAP_Y
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 199 , 102 ) ;
+ Size = MAP_APPFONT ( 43 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 10 ;
+ First = 10 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 50 ;
+ };
+ FixedText FT_SNAP_X
+ {
+ Pos = MAP_APPFONT ( 162 , 89 ) ;
+ Size = MAP_APPFONT ( 29 , 10 ) ;
+ Text = "X-A~chse" ;
+ Text [ ENGLISH ] = "X-Ax~is" ;
+ Text [ NORWEGIAN ] = "X-Ax~is" ;
+ Text [ DANISH ] = "X-akse" ;
+ Text [ ENGLISH_US ] = "X ax~is" ;
+ Text [ SPANISH ] = "~Eje X" ;
+ Text [ FINNISH ] = "X-~akseli" ;
+ Text [ FRENCH ] = "~Axe X" ;
+ Text [ ITALIAN ] = "As~se X" ;
+ Text [ DUTCH ] = "X - A~s" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Eix~o X" ;
+ Text [ SWEDISH ] = "X-axe~l" ;
+ Text [ PORTUGUESE ] = "Eix~o X" ;
+ Text[ chinese_simplified ] = "X Öá(~I)";
+ Text[ russian ] = "Îñü X";
+ Text[ polish ] = "Oœ X";
+ Text[ japanese ] = "XŽ²(~I)";
+ Text[ chinese_traditional ] = "X-¶b(~I)";
+ Text[ arabic ] = "ÇáãÍæÑ Ó";
+ Text[ greek ] = "¢îïíáò X";
+ Text[ korean ] = "X Ãà(~I)";
+ Text[ turkish ] = "X ekseni";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_SNAP_Y
+ {
+ Pos = MAP_APPFONT ( 162 , 104 ) ;
+ Size = MAP_APPFONT ( 27 , 10 ) ;
+ Text = "Y-Achs~e" ;
+ Text [ ENGLISH ] = "Y-Axi~s" ;
+ Text [ NORWEGIAN ] = "Y-Axi~s" ;
+ Text [ DANISH ] = "Y-akse" ;
+ Text [ ENGLISH_US ] = "Y ~axis" ;
+ Text [ SPANISH ] = "E~je Y" ;
+ Text [ FINNISH ] = "Y-a~kseli" ;
+ Text [ FRENCH ] = "A~xe Y" ;
+ Text [ ITALIAN ] = "Ass~e Y" ;
+ Text [ DUTCH ] = "Y - ~as" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Eix~o Y" ;
+ Text [ SWEDISH ] = "Y-ax~el" ;
+ Text [ PORTUGUESE ] = "Eix~o Y" ;
+ Text[ chinese_simplified ] = "Y Öá(~A)";
+ Text[ russian ] = "Îñü Y";
+ Text[ polish ] = "Oœ Y";
+ Text[ japanese ] = "YŽ²(~A)";
+ Text[ chinese_traditional ] = "Y-¶b(~A)";
+ Text[ arabic ] = "ÇáãÍæÑ Õ";
+ Text[ greek ] = "¢îïí~áò Õ";
+ Text[ korean ] = "Y Ãà(~A)";
+ Text[ turkish ] = "Y ekseni";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_DIVISION_X
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 99 , 87 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99 ;
+ Last = 99 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " Punkte" ;
+ CustomUnitText [ ENGLISH ] = " Points" ;
+ CustomUnitText [ NORWEGIAN ] = " Punkter" ;
+ CustomUnitText [ DANISH ] = "punkter" ;
+ CustomUnitText [ ENGLISH_US ] = "Points" ;
+ CustomUnitText [ SPANISH ] = "Puntos" ;
+ CustomUnitText [ FINNISH ] = " Pisteet" ;
+ CustomUnitText [ FRENCH ] = "Points" ;
+ CustomUnitText [ ITALIAN ] = "Punti" ;
+ CustomUnitText [ DUTCH ] = "Punten" ;
+ CustomUnitText [ PORTUGUESE_BRAZILIAN ] = "Pontos" ;
+ CustomUnitText [ SWEDISH ] = "punkter" ;
+ CustomUnitText [ PORTUGUESE ] = "Pontos" ;
+ SpinSize = 1 ;
+ CustomUnitText[ chinese_simplified ] = "µã";
+ CustomUnitText[ russian ] = "Ïóíêòû";
+ CustomUnitText[ polish ] = "Punkty";
+ CustomUnitText[ japanese ] = "Îß²ÝÄ";
+ CustomUnitText[ chinese_traditional ] = "ÂI";
+ CustomUnitText[ arabic ] = "äÞØÉ/äÞÇØ";
+ CustomUnitText[ greek ] = "Óçìåßá";
+ CustomUnitText[ korean ] = "Á¡";
+ CustomUnitText[ turkish ] = "Noktalar";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ FixedText FT_RESOLUTION
+ {
+ Pos = MAP_APPFONT ( 48 , 74 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Aufl~ösung : Aufl~÷sung */
+ /* ### ACHTUNG: Neuer Text in Resource? Aufl~ösung : Aufl~÷sung */
+ Text = "Aufl~ösung" ;
+ Text [ ENGLISH ] = "~Resolution" ;
+ Text [ NORWEGIAN ] = "~Resolution" ;
+ Text [ DANISH ] = "Opløsning" ;
+ Text [ ENGLISH_US ] = "Resolution" ;
+ Text [ SPANISH ] = "R~esolución" ;
+ Text [ FINNISH ] = "~Tarkkuus" ;
+ Text [ FRENCH ] = "~Résolution" ;
+ Text [ ITALIAN ] = "~Risoluzione" ;
+ Text [ DUTCH ] = "Resol~utie" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "~ResoluþÒo" ;
+ Text [ SWEDISH ] = "Uppl~ösning" ;
+ Text [ PORTUGUESE ] = "~Resolução" ;
+ Text[ chinese_simplified ] = "·Ö±æÂÊ";
+ Text[ russian ] = "Ðàçðåøåíèå";
+ Text[ polish ] = "RozdzielczoϾ";
+ Text[ japanese ] = "‰ð‘œ“x";
+ Text[ chinese_traditional ] = "¸ÑªR«×";
+ Text[ arabic ] = "ÇáÇÓÊÈÇäÉ";
+ Text[ greek ] = "ÁíÜëõóç";
+ Text[ korean ] = "ÇØ»óµµ";
+ Text[ turkish ] = "Çözünürlük";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_DIVISION
+ {
+ Pos = MAP_APPFONT ( 99 , 74 ) ;
+ Size = MAP_APPFONT ( 48 , 10 ) ;
+ Text = "~Unterteilung" ;
+ Text [ ENGLISH ] = "~Division" ;
+ Text [ NORWEGIAN ] = "~Division" ;
+ Text [ DANISH ] = "Inddeling" ;
+ Text [ ENGLISH_US ] = "~Subdivision" ;
+ Text [ SPANISH ] = "S~ubdivisión" ;
+ Text [ FINNISH ] = "~Jako" ;
+ Text [ FRENCH ] = "~Finesse" ;
+ Text [ ITALIAN ] = "Suddivisione" ;
+ Text [ DUTCH ] = "~Onderverdeling" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "~DivisÒo" ;
+ Text [ SWEDISH ] = "Indelning" ;
+ Text [ PORTUGUESE ] = "~Subdivisão" ;
+ Text[ chinese_simplified ] = "Ïßµã¼ä¸ô(~S)";
+ Text[ russian ] = "Ïîäðàçäåëåíèå";
+ Text[ polish ] = "Podpodzia³";
+ Text[ japanese ] = "“_‚ÌŠÔŠu(~S)";
+ Text[ chinese_traditional ] = "½uÂI¶¡¹j(~S)";
+ Text[ arabic ] = "ÇáÊÞÓíã ÇáÝÑÚí";
+ Text[ greek ] = "~Õðïäéáßñåóç";
+ Text[ korean ] = "¼¼ºÐÈ­(~S)";
+ Text[ turkish ] = "Bölümleme";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_DIVISION_Y
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 99 , 102 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99 ;
+ Last = 99 ;
+ StrictFormat = TRUE ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " Punkte" ;
+ CustomUnitText [ ENGLISH ] = " Points" ;
+ CustomUnitText [ NORWEGIAN ] = " Punkter" ;
+ CustomUnitText [ DANISH ] = "punkter" ;
+ CustomUnitText [ ENGLISH_US ] = "Points" ;
+ CustomUnitText [ SPANISH ] = "Puntos" ;
+ CustomUnitText [ FINNISH ] = " Pisteet" ;
+ CustomUnitText [ FRENCH ] = "Points" ;
+ CustomUnitText [ ITALIAN ] = "Punti" ;
+ CustomUnitText [ DUTCH ] = "Punten" ;
+ CustomUnitText [ PORTUGUESE_BRAZILIAN ] = "Pontos" ;
+ CustomUnitText [ SWEDISH ] = "punkter" ;
+ CustomUnitText [ PORTUGUESE ] = "Pontos" ;
+ SpinSize = 1 ;
+ CustomUnitText[ chinese_simplified ] = "µã";
+ CustomUnitText[ russian ] = "Ïóíêòû";
+ CustomUnitText[ polish ] = "Punkty";
+ CustomUnitText[ japanese ] = "Îß²ÝÄ";
+ CustomUnitText[ chinese_traditional ] = "ÂI";
+ CustomUnitText[ arabic ] = "äÞØÉ/äÞÇØ";
+ CustomUnitText[ greek ] = "Óçìåßá";
+ CustomUnitText[ korean ] = "Á¡";
+ CustomUnitText[ turkish ] = "Noktalar";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ CheckBox CBX_SYNCHRONIZE
+ {
+ Pos = MAP_APPFONT ( 12 , 44 ) ;
+ Size = MAP_APPFONT ( 102 , 12 ) ;
+ TabStop = TRUE ;
+ Text = "Achsen ~synchronisieren" ;
+ Text [ ENGLISH ] = "~Synchronize axis" ;
+ Text [ NORWEGIAN ] = "~Synchronize axis" ;
+ Text [ DANISH ] = "Synkroniser akser" ;
+ Text [ ENGLISH_US ] = "Sy~nchronize axes" ;
+ Text [ SPANISH ] = "~Sincronizar ejes" ;
+ Text [ FINNISH ] = "Tah~dista akseli" ;
+ Text [ FRENCH ] = "~Synchroniser les axes" ;
+ Text [ ITALIAN ] = "~Sincronizza assi" ;
+ Text [ DUTCH ] = "Assen s~ynchroniseren" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "~Sincronizar eixo" ;
+ Text [ SWEDISH ] = "~Synkronisera axlar" ;
+ Text [ PORTUGUESE ] = "~Sincronizar eixos" ;
+ Text[ chinese_simplified ] = "ͬ²½»¯ÖáÊýÖµ(~A)";
+ Text[ russian ] = "Ñèíõðîíèçèðîâàòü îñè";
+ Text[ polish ] = "Synchronizuj osie";
+ Text[ japanese ] = "Ž²‚𓯊ú‚·‚é(~A)";
+ Text[ chinese_traditional ] = "¶b¦P¨B¤Æ(~A)";
+ Text[ arabic ] = "ÊÒÇãä ÇáãÍÇæÑ";
+ Text[ greek ] = "Óõã÷ñïíéóìüò áîüíùí";
+ Text[ korean ] = "Ãà µ¿±âÈ­(~N)";
+ Text[ turkish ] = "Eksenleri eþitle";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CBX_GRID_VISIBLE
+ {
+ Pos = MAP_APPFONT ( 12 , 26 ) ;
+ Size = MAP_APPFONT ( 102 , 12 ) ;
+ TabStop = TRUE ;
+ Text = "Ras~ter sichtbar" ;
+ Text [ ENGLISH ] = "~Visible grid" ;
+ Text [ NORWEGIAN ] = "~Visible grid" ;
+ Text [ DANISH ] = "Synligt gitter" ;
+ Text [ ENGLISH_US ] = "~Visible grid" ;
+ Text [ SPANISH ] = "~Cuadrícula visible" ;
+ Text [ FINNISH ] = "~Visible grid" ;
+ Text [ FRENCH ] = "Grille ~visible" ;
+ Text [ ITALIAN ] = "Griglia ~visibile" ;
+ Text [ DUTCH ] = "~Raster zichtbaar" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "~Visible grid" ;
+ Text [ SWEDISH ] = "Synligt ~raster" ;
+ Text [ PORTUGUESE ] = "~Quadrícula visível" ;
+ Text[ chinese_simplified ] = "ÏÔʾÍø¸ñÏß(~V)";
+ Text[ russian ] = "Ïîêàçàòü ðåøåòêó";
+ Text[ polish ] = "Raster widoczny";
+ Text[ japanese ] = "¸ÞدÄÞ‚ð•\\Ž¦‚·‚é(~V)";
+ Text[ chinese_traditional ] = "Åã¥Üºô®æ½u(~V)";
+ Text[ arabic ] = "ÔÈßÉ ãÑÆíÉ";
+ Text[ greek ] = "ÐëÝãìá (êïõêßäåò) ïñáôü";
+ Text[ korean ] = "´«±ÝÀ» º¸ÀÌ°Ô(~V)";
+ Text[ turkish ] = "Kýlavuz çizgileri göster";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CBX_EQUAL_GRID
+ {
+ Pos = MAP_APPFONT ( 162 , 74 ) ;
+ Size = MAP_APPFONT ( 83 , 12 ) ;
+ Text = "Mit Raster ~abgleichen" ;
+ Text [ ENGLISH ] = "E~qual snapgrid" ;
+ Text [ NORWEGIAN ] = "E~qual snapgrid" ;
+ Text [ DANISH ] = "Tilpas til gitter" ;
+ Text [ ENGLISH_US ] = "Si~ze to grid" ;
+ Text [ SPANISH ] = "Aj~ustar a la cuadrícula" ;
+ Text [ FINNISH ] = "Y~htä suuri kohdistusruudukko" ;
+ Text [ FRENCH ] = "~Synchroniser avec la grille" ;
+ Text [ ITALIAN ] = "Adatta alla griglia" ;
+ Text [ DUTCH ] = "S~ynchroon met raster" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Grade fixa I~gual" ;
+ Text [ SWEDISH ] = "~Anpassa till raster" ;
+ Text [ PORTUGUESE ] = "Ajustar à quadrícula" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ºÍÍø¸ñ×ø±êͬ²½(~T)";
+ Text[ russian ] = "Ïî ðàçìåðó ðåøåòêè";
+ Text[ polish ] = "Ustaw wed³ug rastra";
+ Text[ japanese ] = "¸ÞدÄނɇ‚킹‚é(~T)";
+ Text[ chinese_traditional ] = "©Mºô®æ§¤¼Ð¦P¨B(~T)";
+ Text[ arabic ] = "ãáÇÆãÉ ÇáÍÌã ááÔÈßÉ";
+ Text[ greek ] = "ÐñïóáñìïãÞ óå ðëÝãìá";
+ Text[ korean ] = "Å©±â¸¦ ´«±Ý¿¡ ¸ÂÃã(~Z)";
+ Text[ turkish ] = "Kýlavuz çizgilere göre hizala";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_DRAW_X
+ {
+ Pos = MAP_APPFONT ( 12 , 89 ) ;
+ Size = MAP_APPFONT ( 29 , 10 ) ;
+ Text = "~X-Achse" ;
+ Text [ ENGLISH ] = "~X-Axis" ;
+ Text [ NORWEGIAN ] = "~X-Axis" ;
+ Text [ DANISH ] = "X-akse" ;
+ Text [ ENGLISH_US ] = "~X axis" ;
+ Text [ SPANISH ] = "Eje ~X" ;
+ Text [ FINNISH ] = "~X-akseli" ;
+ Text [ FRENCH ] = "Axe ~X" ;
+ Text [ ITALIAN ] = "Asse ~X" ;
+ Text [ DUTCH ] = "~X-as" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "~Eixo X" ;
+ Text [ SWEDISH ] = "~X-axel" ;
+ Text [ PORTUGUESE ] = "~Eixo X" ;
+ Text[ chinese_simplified ] = "~X Öá";
+ Text[ russian ] = "Îñü X";
+ Text[ polish ] = "Oœ X";
+ Text[ japanese ] = "XŽ²(~X)";
+ Text[ chinese_traditional ] = "~X-¶b";
+ Text[ arabic ] = "ÇáãÍæÑ Ó";
+ Text[ greek ] = "¢îïíáò X";
+ Text[ korean ] = "X Ãà(~X)";
+ Text[ turkish ] = "X ekseni";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_DRAW_Y
+ {
+ Pos = MAP_APPFONT ( 12 , 104 ) ;
+ Size = MAP_APPFONT ( 29 , 10 ) ;
+ Text = "~Y-Achse" ;
+ Text [ ENGLISH ] = "~Y-Axis" ;
+ Text [ NORWEGIAN ] = "~Y-Axis" ;
+ Text [ DANISH ] = "Y-akse" ;
+ Text [ ENGLISH_US ] = "~Y axis" ;
+ Text [ SPANISH ] = "Eje ~Y" ;
+ Text [ FINNISH ] = "~Y-akseli" ;
+ Text [ FRENCH ] = "Axe ~Y" ;
+ Text [ ITALIAN ] = "Asse ~Y" ;
+ Text [ DUTCH ] = "~Y-as" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "~Eixo Y" ;
+ Text [ SWEDISH ] = "~Y-axel" ;
+ Text [ PORTUGUESE ] = "~Eixo Y" ;
+ Text[ chinese_simplified ] = "~Y Öá";
+ Text[ russian ] = "Îñü Y";
+ Text[ polish ] = "Oœ Y";
+ Text[ japanese ] = "YŽ²(~Y)";
+ Text[ chinese_traditional ] = "~Y-¶b";
+ Text[ arabic ] = "ÇáãÍæÑ Õ";
+ Text[ greek ] = "¢îïíáò ~Õ";
+ Text[ korean ] = "Y Ãà(~Y)";
+ Text[ turkish ] = "Y ekseni";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_DRAW_Y
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 , 102 ) ;
+ Size = MAP_APPFONT ( 43 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 10 ;
+ First = 10 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 50 ;
+ };
+ MetricField MTR_FLD_DRAW_X
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 47 , 87 ) ;
+ Size = MAP_APPFONT ( 43 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 10 ;
+ First = 10 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 50 ;
+ };
+ GroupBox GRP_DRAWGRID
+ {
+ Pos = MAP_APPFONT ( 6 , 65 ) ;
+ Size = MAP_APPFONT ( 144 , 64 ) ;
+ Text = "Raster" ;
+ Text [ ENGLISH ] = "Drawgrid" ;
+ Text [ NORWEGIAN ] = "Drawgrid" ;
+ Text [ DANISH ] = "Gitter" ;
+ Text [ ENGLISH_US ] = "Grid" ;
+ Text [ SPANISH ] = "Cuadrícula" ;
+ Text [ FINNISH ] = "Piirtoruudukko" ;
+ Text [ FRENCH ] = "Grille" ;
+ Text [ ITALIAN ] = "Griglia" ;
+ Text [ DUTCH ] = "Raster" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Grade de desenho" ;
+ Text [ SWEDISH ] = "Raster" ;
+ Text [ PORTUGUESE ] = "Grelha" ;
+ Text[ chinese_simplified ] = "Íø¸ñ";
+ Text[ russian ] = "Ðåøåòêà";
+ Text[ polish ] = "Raster";
+ Text[ japanese ] = "¸ÞدÄÞ";
+ Text[ chinese_traditional ] = "ºô®æ";
+ Text[ arabic ] = "ÇáÔÈßÉ";
+ Text[ greek ] = "ÐëÝãìá (êïõêßäåò)";
+ Text[ korean ] = "´«±Ý";
+ Text[ turkish ] = "Kýlavuz çizgiler";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_SNAPGRID
+ {
+ Pos = MAP_APPFONT ( 156 , 65 ) ;
+ Size = MAP_APPFONT ( 98 , 64 ) ;
+ Text = "Fangraster" ;
+ Text [ ENGLISH ] = "Snapgrid" ;
+ Text [ NORWEGIAN ] = "Snapgrid" ;
+ Text [ DANISH ] = "Fanggitter" ;
+ Text [ ENGLISH_US ] = "Snap grid" ;
+ Text [ SPANISH ] = "Cuadrícula fija" ;
+ Text [ FINNISH ] = "Kohdistusruudukko" ;
+ Text [ FRENCH ] = "Grille de capture" ;
+ Text [ ITALIAN ] = "Griglia" ;
+ Text [ DUTCH ] = "Vangraster" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Grade fixa" ;
+ Text [ SWEDISH ] = "Stödraster" ;
+ Text [ PORTUGUESE ] = "Grelha fixa" ;
+ Text[ chinese_simplified ] = "Íø¸ñ×ø±ê";
+ Text[ russian ] = "Ñåòêà ïðèâÿçêè";
+ Text[ polish ] = "Siatka zaczepu";
+ Text[ japanese ] = "½Å¯Ìß–Ô–Ú½¸Ø°Ý";
+ Text[ chinese_traditional ] = "ºô®æ§¤¼Ð";
+ Text[ arabic ] = "ÔÈßÉ ÇáÍÈÓ";
+ Text[ greek ] = "ÐëÝãìá ðñïóêüëëçóçò";
+ Text[ korean ] = "¸ÂÃã ´«±Ý¼±";
+ Text[ turkish ] = "Kavrama kýlavuz çizgileri";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_OPTIONS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 58 ) ;
+ Text = "Optionen" ;
+ Text [ ENGLISH ] = "Options" ;
+ Text [ NORWEGIAN ] = "Options" ;
+ Text [ DANISH ] = "Indstillinger" ;
+ Text [ ENGLISH_US ] = "Options" ;
+ Text [ SPANISH ] = "Opciones" ;
+ Text [ FINNISH ] = "Määritykset" ;
+ Text [ FRENCH ] = "Options" ;
+ Text [ ITALIAN ] = "Opzioni" ;
+ Text [ DUTCH ] = "Opties" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Opþ§es" ;
+ Text [ SWEDISH ] = "Alternativ" ;
+ Text [ PORTUGUESE ] = "Opções" ;
+ Text[ chinese_simplified ] = "Ñ¡Ïî";
+ Text[ russian ] = "Ïàðàìåòðû";
+ Text[ polish ] = "Opcje";
+ Text[ japanese ] = "µÌß¼®Ý";
+ Text[ chinese_traditional ] = "¿ï¶µ";
+ Text[ arabic ] = "ÇáÎíÇÑÇÊ";
+ Text[ greek ] = "ÅðéëïãÝò";
+ Text[ korean ] = "¿É¼Ç";
+ Text[ turkish ] = "Seçenekler";
+ Text[ language_user1 ] = " ";
+ };
+};
diff --git a/svx/source/options/optinet2.src b/svx/source/options/optinet2.src
new file mode 100644
index 0000000000..38e71790b9
--- /dev/null
+++ b/svx/source/options/optinet2.src
@@ -0,0 +1,4677 @@
+/*************************************************************************
+ *
+ * $RCSfile: optinet2.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ------------------------------------------------------------------
+#include <sfx2/sfx.hrc>
+#include "helpid.hrc"
+#include "dialogs.hrc"
+#include "optinet2.hrc"
+ // pragma -------------------------------------------------------------------
+
+/************************************************************************/
+/* */
+/* Proxy server */
+/* */
+/************************************************************************/
+TabPage RID_SVXPAGE_INET_PROXY
+{
+ HelpId = HID_OPTIONS_PROXY ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Proxy" ;
+ Text [ English ] = "Proxy" ;
+ Text [ english_us ] = "Proxy" ;
+ Text [ italian ] = "Proxy" ;
+ Text [ spanish ] = "Proxy" ;
+ Text [ french ] = "Proxy" ;
+ Text [ dutch ] = "Proxy" ;
+ Text [ swedish ] = "Proxy" ;
+ Text [ danish ] = "Proxy" ;
+ Text [ portuguese ] = "Servidor Proxy" ;
+ Text [ portuguese_brazilian ] = "Proxy Server" ;
+ #define GB_TYPES_TOP 3
+ #define GB_TYPES_LEFT 6
+ GroupBox GB_SETTINGS
+ {
+ Pos = MAP_APPFONT ( GB_TYPES_LEFT , GB_TYPES_TOP ) ;
+ Size = MAP_APPFONT ( 251 , 130 ) ;
+ Text = "Einstellungen" ;
+ Text [ English ] = "Settings" ;
+ Text [ english_us ] = "Settings" ;
+ Text [ italian ] = "Impostazioni" ;
+ Text [ spanish ] = "Configuración" ;
+ Text [ french ] = "Paramètres" ;
+ Text [ dutch ] = "Instellingen" ;
+ Text [ swedish ] = "Inställningar" ;
+ Text [ danish ] = "Indstillinger" ;
+ Text [ portuguese_brazilian ] = "Einstellungen" ;
+ Text [ portuguese ] = "Predefinições" ;
+ Text[ chinese_simplified ] = "É趨";
+ Text[ russian ] = "Íàñòðîéêè";
+ Text[ polish ] = "Ustawienia";
+ Text[ japanese ] = "Ý’è";
+ Text[ chinese_traditional ] = "³]©w";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ";
+ Text[ greek ] = "Ñõèìßóåéò";
+ Text[ korean ] = "¼³Á¤";
+ Text[ turkish ] = "Ayarlar";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_PROXYMODE
+ {
+ Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 14 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Pro~xy Server" ;
+ Text [ English ] = "Proxy S~erver" ;
+ Text [ english_us ] = "Proxy S~erver" ;
+ Text [ portuguese_brazilian ] = "Proxy S~erver" ;
+ Text [ swedish ] = "Pro~xyserver" ;
+ Text [ danish ] = "Proxy server" ;
+ Text [ italian ] = "S~erver Proxy" ;
+ Text [ spanish ] = "Servidor Pro~xy" ;
+ Text [ french ] = "Serveur Pro~xy" ;
+ Text [ dutch ] = "Proxy s~erver" ;
+ Text [ portuguese ] = "S~ervidor Proxy" ;
+ Text[ chinese_simplified ] = "´úÀí·þÎñÆ÷(~E)";
+ Text[ russian ] = "Ïðîêñè-ñåðâåð";
+ Text[ polish ] = "Serwer Proxy";
+ Text[ japanese ] = "ÌßÛ·¼ »°ÊÞ°(~E)";
+ Text[ chinese_traditional ] = "¥N²z¦øªA¾¹(~E)";
+ Text[ arabic ] = "ãÒæøÏ Proxy";
+ Text[ greek ] = "ÄéáêïìéóôÞò Proxy";
+ Text[ korean ] = "ÇÁ·Ï½Ã ¼­¹ö(~E)";
+ Text[ turkish ] = "Proxy sunucusu";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_PROXYMODE
+ {
+ Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 13 ) ;
+ Size = MAP_APPFONT ( 49 , 48 ) ;
+ Border = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Keine" ; > ;
+ < "Automatisch" ; > ;
+ < "Manuell" ; > ;
+ };
+ StringList [ English ] =
+ {
+ < "Keine" ; > ;
+ < "Automatisch" ; > ;
+ < "Manuell" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "None" ; > ;
+ < "Automatic" ; > ;
+ < "Manual" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Nessuno" ; > ;
+ < "Automatico" ; > ;
+ < "Manuale" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Ninguna" ; > ;
+ < "Automática" ; > ;
+ < "Manual" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Aucun(e)" ; > ;
+ < "Automatique" ; > ;
+ < "Manuel" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Geen" ; > ;
+ < "Automatisch" ; > ;
+ < "Handmatig" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Keine" ; > ;
+ < "Automatisch" ; > ;
+ < "Manuell" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Ingen" ; > ;
+ < "Automatisk" ; > ;
+ < "Manuell" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Ingen" ; > ;
+ < "Automatisk" ; > ;
+ < "Manuel" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Nenhum" ; > ;
+ < "Automático" ; > ;
+ < "Manual" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ÎÞ" ; > ;
+ < "×Ô¶¯" ; > ;
+ < "ÊÖ¹¤" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Áåç" ; > ;
+ < "Àâòîìàòè÷åñêè" ; > ;
+ < "Âðó÷íóþ" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Brak" ; > ;
+ < "Automatycznie" ; > ;
+ < "Rêcznie" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "‚È‚µ" ; > ;
+ < "Ž©“®" ; > ;
+ < "Žè“®" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "µL" ; > ;
+ < "¦Û°Ê" ; > ;
+ < "¤â¤u" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÈÏæä" ; > ;
+ < "ÊáÞÇÆí" ; > ;
+ < "íÏæí" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÊáíÝíá" ; > ;
+ < "Áõôüìáôá" ; > ;
+ < "×åéñïêßíçôá" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "¾øÀ½" ; > ;
+ < "ÀÚµ¿" ; > ;
+ < "¼öµ¿" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Yok" ; > ;
+ < "Otomatik" ; > ;
+ < "Manüel" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ };
+ };
+ FixedText FT_HTTP_PROXY
+ {
+ Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 40 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Http Proxy" ;
+ Text [ English ] = "Http Pro~xy" ;
+ Text [ english_us ] = "~Http Proxy" ;
+ Text [ italian ] = "Pro~xy Http" ;
+ Text [ spanish ] = "~Http Proxy" ;
+ Text [ french ] = "~Proxy Http" ;
+ Text [ dutch ] = "Http Pro~xy" ;
+ Text [ swedish ] = "~Http proxy" ;
+ Text [ danish ] = "Http proxy" ;
+ Text [ portuguese_brazilian ] = "Http Pro~xy" ;
+ Text [ portuguese ] = "Http Pro~xy" ;
+ Text[ chinese_simplified ] = "~Http ´úÀí";
+ Text[ russian ] = "~Http-ïðîêñè";
+ Text[ polish ] = "Http Proxy";
+ Text[ japanese ] = "Http ÌßÛ·¼(~H)";
+ Text[ chinese_traditional ] = "~Http ¥N²z";
+ Text[ arabic ] = "Http Proxy~";
+ Text[ greek ] = "~Http Proxy";
+ Text[ korean ] = "Http ÇÁ·Ï½Ã(~H)";
+ Text[ turkish ] = "~Http Proxy";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_HTTP_PROXY
+ {
+ Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 39 ) ;
+ Size = MAP_APPFONT ( 123 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_HTTP_PORT
+ {
+ Pos = MAP_APPFONT ( 199 , GB_TYPES_TOP + 40 ) ;
+ Size = MAP_APPFONT ( 20 , 10 ) ;
+ Text = "~Port" ;
+ Text [ English ] = "~Port" ;
+ Text [ english_us ] = "~Port" ;
+ Text [ portuguese_brazilian ] = "~Port" ;
+ Text [ swedish ] = "~Port" ;
+ Text [ danish ] = "Port" ;
+ Text [ italian ] = "~Porta" ;
+ Text [ spanish ] = "~Puerto" ;
+ Text [ french ] = "~Port" ;
+ Text [ dutch ] = "~Poort" ;
+ Text [ portuguese ] = "~Porta" ;
+ Text[ chinese_simplified ] = "¶Ë¿Ú(~P)";
+ Text[ russian ] = "Ïîðò";
+ Text[ polish ] = "Port";
+ Text[ japanese ] = "Îß°Ä(~P)";
+ Text[ chinese_traditional ] = "°ð(~P)";
+ Text[ arabic ] = "ãäÝÐ";
+ Text[ greek ] = "Èýñá";
+ Text[ korean ] = "Æ÷Æ®(~P)";
+ Text[ turkish ] = "~Port";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_HTTP_PORT
+ {
+ Pos = MAP_APPFONT ( 221 , GB_TYPES_TOP + 39 ) ;
+ Size = MAP_APPFONT ( 25 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_FTP_PROXY
+ {
+ Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 55 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Ftp Proxy" ;
+ Text [ English ] = "~Ftp Proxy" ;
+ Text [ english_us ] = "~Ftp Proxy" ;
+ Text [ italian ] = "Proxy ~Ftp" ;
+ Text [ spanish ] = "~Ftp Proxy" ;
+ Text [ french ] = "Proxy ~Ftp" ;
+ Text [ dutch ] = "~Ftp Proxy" ;
+ Text [ swedish ] = "~Ftp proxy" ;
+ Text [ danish ] = "Ftp proxy" ;
+ Text [ portuguese_brazilian ] = "~Ftp Proxy" ;
+ Text [ portuguese ] = "~Ftp Proxy" ;
+ Text[ chinese_simplified ] = "~Ftp ´úÀí";
+ Text[ russian ] = "~Ftp-ïðîêñè";
+ Text[ polish ] = "Ftp Proxy";
+ Text[ japanese ] = "Ftp ÌßÛ·¼(~F)";
+ Text[ chinese_traditional ] = "~Ftp ¥N²z";
+ Text[ arabic ] = "Ftp Proxy~";
+ Text[ greek ] = "~Ftp Proxy";
+ Text[ korean ] = "Ftp ÇÁ·Ï½Ã(~F)";
+ Text[ turkish ] = "~Ftp Proxy";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_FTP_PROXY
+ {
+ Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 54 ) ;
+ Size = MAP_APPFONT ( 123 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_FTP_PORT
+ {
+ Pos = MAP_APPFONT ( 199 , GB_TYPES_TOP + 55 ) ;
+ Size = MAP_APPFONT ( 20 , 10 ) ;
+ Text = "P~ort" ;
+ Text [ English ] = "P~ort" ;
+ Text [ english_us ] = "P~ort" ;
+ Text [ portuguese_brazilian ] = "P~ort" ;
+ Text [ swedish ] = "P~ort" ;
+ Text [ danish ] = "Port" ;
+ Text [ italian ] = "P~orta" ;
+ Text [ spanish ] = "P~uerto" ;
+ Text [ french ] = "P~ort" ;
+ Text [ dutch ] = "P~oort" ;
+ Text [ portuguese ] = "P~ort" ;
+ Text[ chinese_simplified ] = "¶Ë¿Ú(~O)";
+ Text[ russian ] = "Ïîðò";
+ Text[ polish ] = "Port";
+ Text[ japanese ] = "Îß°Ä(~O)";
+ Text[ chinese_traditional ] = "°ð(~O)";
+ Text[ arabic ] = "ãäÝÐ";
+ Text[ greek ] = "Èýñá";
+ Text[ korean ] = "Æ÷Æ®(~O)";
+ Text[ turkish ] = "Port";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_FTP_PORT
+ {
+ Pos = MAP_APPFONT ( 221 , GB_TYPES_TOP + 54 ) ;
+ Size = MAP_APPFONT ( 25 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_SOCKS_PROXY
+ {
+ Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 70 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Socks Proxy" ;
+ Text [ English ] = "~Socks Proxy" ;
+ Text [ english_us ] = "~Socks Proxy" ;
+ Text [ italian ] = "Socks Prox~y" ;
+ Text [ spanish ] = "Socks Prox~y" ;
+ Text [ french ] = "Soc~ks Proxy" ;
+ Text [ dutch ] = "Socks Prox~y" ;
+ Text [ swedish ] = "~Socks proxy" ;
+ Text [ danish ] = "Socks proxy" ;
+ Text [ portuguese_brazilian ] = "Socks Prox~y" ;
+ Text [ portuguese ] = "Socks Prox~y" ;
+ Text[ chinese_simplified ] = "~Socks ´úÀí";
+ Text[ russian ] = "~Socks-ïðîêñè";
+ Text[ polish ] = "Socks Proxy";
+ Text[ japanese ] = "Socks ÌßÛ·¼(~S)";
+ Text[ chinese_traditional ] = "~Socks ¥N²z";
+ Text[ arabic ] = "Socks proxy~";
+ Text[ greek ] = "~Socks Proxy";
+ Text[ korean ] = "Socks ÇÁ·Ï½Ã(~S)";
+ Text[ turkish ] = "Socks Proxy";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_SOCKS_PROXY
+ {
+ Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 69 ) ;
+ Size = MAP_APPFONT ( 123 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_SOCKS_PORT
+ {
+ Pos = MAP_APPFONT ( 199 , GB_TYPES_TOP + 70 ) ;
+ Size = MAP_APPFONT ( 20 , 10 ) ;
+ Text = "Po~rt" ;
+ Text [ English ] = "Po~rt" ;
+ Text [ english_us ] = "Po~rt" ;
+ Text [ portuguese_brazilian ] = "Po~rt" ;
+ Text [ swedish ] = "Po~rt" ;
+ Text [ danish ] = "Port" ;
+ Text [ italian ] = "Po~rta" ;
+ Text [ spanish ] = "Pu~erto" ;
+ Text [ french ] = "Po~rt" ;
+ Text [ dutch ] = "Poo~rt" ;
+ Text [ portuguese ] = "Po~rt" ;
+ Text[ chinese_simplified ] = "¶Ë¿Ú(~R)";
+ Text[ russian ] = "Ïîðò";
+ Text[ polish ] = "Port";
+ Text[ japanese ] = "Îß°Ä(~R)";
+ Text[ chinese_traditional ] = "°ð(~R)";
+ Text[ arabic ] = "ãäÝÐ";
+ Text[ greek ] = "Èýñá";
+ Text[ korean ] = "Æ÷Æ®(~R)";
+ Text[ turkish ] = "Port";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_SOCKS_PORT
+ {
+ Pos = MAP_APPFONT ( 221 , GB_TYPES_TOP + 69 ) ;
+ Size = MAP_APPFONT ( 25 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_SECURITY_PROXY
+ {
+ Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 85 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Se~curity Proxy" ;
+ Text [ English ] = "Se~curity Proxy" ;
+ Text [ dutch ] = "Se~curity Proxy" ;
+ Text [ english_us ] = "Se~curity Proxy" ;
+ Text [ italian ] = "Se~curity Proxy" ;
+ Text [ spanish ] = "Se~curity Proxy" ;
+ Text [ french ] = "Se~curity Proxy" ;
+ Text [ swedish ] = "Se~curity proxy" ;
+ Text [ danish ] = "Security proxy" ;
+ Text [ portuguese_brazilian ] = "Se~curity Proxy" ;
+ Text [ portuguese ] = "Sec~urity Proxy" ;
+ Text[ chinese_simplified ] = "°²È«´úÀí(~C)";
+ Text[ russian ] = "Se~curity-ïðîêñè";
+ Text[ polish ] = "Zabezp. Proxy";
+ Text[ japanese ] = "Security ÌßÛ·¼(~C)";
+ Text[ chinese_traditional ] = "¦w¥þ¥N²z(~C)";
+ Text[ arabic ] = "Se~curity Proxy";
+ Text[ greek ] = "Se~curity Proxy";
+ Text[ korean ] = "º¸¾È ÇÁ·Ï½Ã(~C)";
+ Text[ turkish ] = "Se~curity Proxy";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_SECURITY_PROXY
+ {
+ Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 84 ) ;
+ Size = MAP_APPFONT ( 123 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_SECURITY_PORT
+ {
+ Pos = MAP_APPFONT ( 199 , GB_TYPES_TOP + 85 ) ;
+ Size = MAP_APPFONT ( 20 , 10 ) ;
+ Text = "Por~t" ;
+ Text [ English ] = "Por~t" ;
+ Text [ english_us ] = "Por~t" ;
+ Text [ portuguese_brazilian ] = "Por~t" ;
+ Text [ swedish ] = "Por~t" ;
+ Text [ danish ] = "Port" ;
+ Text [ italian ] = "Por~ta" ;
+ Text [ spanish ] = "Puer~to" ;
+ Text [ french ] = "Por~t" ;
+ Text [ dutch ] = "Poor~t" ;
+ Text [ portuguese ] = "Por~t" ;
+ Text[ chinese_simplified ] = "¶Ë¿Ú(~T)";
+ Text[ russian ] = "Ïîðò";
+ Text[ polish ] = "Port";
+ Text[ japanese ] = "Îß°Ä(~T)";
+ Text[ chinese_traditional ] = "°ð(~T)";
+ Text[ arabic ] = "ãäÝÐ";
+ Text[ greek ] = "Èýñá";
+ Text[ korean ] = "Æ÷Æ®(~T)";
+ Text[ turkish ] = "Port";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_SECURITY_PORT
+ {
+ Pos = MAP_APPFONT ( 221 , GB_TYPES_TOP + 84 ) ;
+ Size = MAP_APPFONT ( 25 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_NOPROXYFOR
+ {
+ Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 111 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Kein Proxy für : ~Kein Proxy f³r */
+ Text = "~Kein Proxy für" ;
+ Text [ English ] = "~No Proxy for" ;
+ Text [ dutch ] = "~Geen Proxy voor:" ;
+ Text [ english_us ] = "~No Proxy for:" ;
+ Text [ italian ] = "~Senza Proxy per" ;
+ Text [ spanish ] = "~Sin Proxy para" ;
+ Text [ french ] = "~Aucun Proxy pour :" ;
+ Text [ swedish ] = "~Ingen proxy för" ;
+ Text [ danish ] = "Ingen proxy for" ;
+ Text [ portuguese_brazilian ] = "Kein Proxy f~ür:" ;
+ Text [ portuguese ] = "N~enhum Proxy para:" ;
+ Text[ chinese_simplified ] = "´úÀí²»ÊÊÓÃÓÚ(~N)";
+ Text[ russian ] = "Áåç ïðîêñè äëÿ ";
+ Text[ polish ] = "Brak Proxy dla";
+ Text[ japanese ] = "ÌßÛ·¼‚È‚µ(~N)";
+ Text[ chinese_traditional ] = "¥N²z¤£Óì¥Î©ó(~N)";
+ Text[ arabic ] = "áÇ íæÌÏ Proxy áÜ:";
+ Text[ greek ] = "~ÊáíÝíá Proxy ãéá";
+ Text[ korean ] = "ÇÁ·Ï½Ã ¾øÀ½:(~N)";
+ Text[ turkish ] = "Proxy yok:";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_NOPROXYFOR
+ {
+ Pos = MAP_APPFONT ( 65 , GB_TYPES_TOP + 110 ) ;
+ Size = MAP_APPFONT ( 123 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText ED_NOPROXYDESC
+ {
+ Pos = MAP_APPFONT ( 194 , GB_TYPES_TOP + 111 ) ;
+ Size = MAP_APPFONT ( 52 , 8 ) ;
+ Text = "Trennzeichen ;" ;
+ Text [ English ] = "Separator ;" ;
+ Text [ english_us ] = "Separator ;" ;
+ Text [ italian ] = "Separatore;" ;
+ Text [ spanish ] = "Separador ;" ;
+ Text [ french ] = "Séparateur ;" ;
+ Text [ dutch ] = "Scheidingsteken ;" ;
+ Text [ swedish ] = "Skiljetecken ;" ;
+ Text [ danish ] = "Separatorer ;" ;
+ Text [ portuguese ] = "Separador ;" ;
+ Text [ portuguese_brazilian ] = "Trennzeichen ;" ;
+ Text[ chinese_simplified ] = "·ÖºÅ;";
+ Text[ russian ] = "Ðàçäåëèòåëü ;";
+ Text[ polish ] = "Separator ;";
+ Text[ japanese ] = "‹æØ‚è‹L†;";
+ Text[ chinese_traditional ] = "¤À¸¹;";
+ Text[ arabic ] = "ÝÇÕá º";
+ Text[ greek ] = "Åíùôéêü ;";
+ Text[ korean ] = "±¸ºÐ ±âÈ£ ;";
+ Text[ turkish ] = "Ayýrma iþareti ;";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "´úÀí";
+ Text[ russian ] = "Ïðîêñè";
+ Text[ polish ] = "Proxy";
+ Text[ japanese ] = "ÌßÛ·¼";
+ Text[ chinese_traditional ] = "¥N²z";
+ Text[ arabic ] = "Proxy";
+ Text[ greek ] = "Proxy";
+ Text[ korean ] = "ÇÁ·Ï½Ã";
+ Text[ turkish ] = "Proxy";
+ Text[ language_user1 ] = " ";
+};
+/************************************************************************/
+/* */
+/* Cache */
+/* */
+/************************************************************************/
+TabPage RID_SVXPAGE_INET_CACHE
+{
+ HelpId = HID_OPTIONS_CACHE ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Cache" ;
+ Text [ English ] = "Cache" ;
+ Text [ english_us ] = "Cache" ;
+ Text [ italian ] = "Cache" ;
+ Text [ spanish ] = "Caché" ;
+ Text [ french ] = "Cache" ;
+ Text [ dutch ] = "Cache" ;
+ Text [ swedish ] = "Cache" ;
+ Text [ danish ] = "Cache" ;
+ Text [ portuguese_brazilian ] = "Cache" ;
+ Text [ portuguese ] = "Cache" ;
+ GroupBox GB_SETTINGS
+ {
+ Pos = MAP_APPFONT ( GB_TYPES_LEFT , GB_TYPES_TOP ) ;
+ Size = MAP_APPFONT ( 248 , 93 ) ;
+ Text = "Einstellungen" ;
+ Text [ English ] = "Settings" ;
+ Text [ dutch ] = "Instellingen" ;
+ Text [ english_us ] = "Settings" ;
+ Text [ italian ] = "Impostazioni" ;
+ Text [ spanish ] = "Configuración" ;
+ Text [ french ] = "Paramètres" ;
+ Text [ swedish ] = "Inställningar" ;
+ Text [ danish ] = "Indstillinger" ;
+ Text [ portuguese_brazilian ] = "Einstellungen" ;
+ Text [ portuguese ] = "Predefinições" ;
+ Text[ chinese_simplified ] = "É趨";
+ Text[ russian ] = "Íàñòðîéêè";
+ Text[ polish ] = "Ustawienia";
+ Text[ japanese ] = "Ý’è";
+ Text[ chinese_traditional ] = "³]©w";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ";
+ Text[ greek ] = "Ñõèìßóåéò";
+ Text[ korean ] = "¼³Á¤";
+ Text[ turkish ] = "Ayarlar";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MEM
+ {
+ Pos = MAP_APPFONT ( 12 , 16 ) ;
+ Size = MAP_APPFONT ( 75 , 10 ) ;
+ Text = "~Speichercache" ;
+ Text [ English ] = "Memory cache" ;
+ Text [ english_us ] = "~Memory cache" ;
+ Text [ italian ] = "Cache ~memoria" ;
+ Text [ spanish ] = "~Caché de memoria" ;
+ Text [ french ] = "Cache en ~mémoire" ;
+ Text [ dutch ] = "~Geheugencache" ;
+ Text [ swedish ] = "~Minnescache" ;
+ Text [ danish ] = "Hukommelsescache" ;
+ Text [ portuguese_brazilian ] = "S~peichercache" ;
+ Text [ portuguese ] = "Cache de ~memória" ;
+ Text[ chinese_simplified ] = "Äڴ滺³åÇø(~M)";
+ Text[ russian ] = "Êýø ïàìÿòè";
+ Text[ polish ] = "Pamiêæ wspomagaj¹ca";
+ Text[ japanese ] = "ÒÓØ·¬¯¼­(~M)";
+ Text[ chinese_traditional ] = "°O¾ÐÅé½w¨R°Ï(~M)";
+ Text[ arabic ] = "æÍÏÉ ÇáÊÎÒíä ÇáãÄÞÊ";
+ Text[ greek ] = "ÊñõöÞ ìíÞìç";
+ Text[ korean ] = "¸Þ¸ð¸® ij½Ã(~M)";
+ Text[ turkish ] = "~Önbellek";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_MEM
+ {
+ Pos = MAP_APPFONT ( 90 , 15 ) ;
+ Size = MAP_APPFONT ( 35 , 12 ) ;
+ Border = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 999 ;
+ StrictFormat = TRUE ;
+ First = 1 ;
+ Last = 25 ;
+ SpinSize = 1 ;
+ };
+ FixedText FT_DOCS
+ {
+ Pos = MAP_APPFONT ( 131 , 16 ) ;
+ Size = MAP_APPFONT ( 64 , 10 ) ;
+ Text = "Dokumente" ;
+ Text [ English ] = "Documents" ;
+ Text [ english_us ] = "Documents" ;
+ Text [ italian ] = "Documenti" ;
+ Text [ spanish ] = "documentos" ;
+ Text [ french ] = "Documents" ;
+ Text [ dutch ] = "Documenten" ;
+ Text [ swedish ] = "dokument" ;
+ Text [ danish ] = "dokumenter" ;
+ Text [ portuguese_brazilian ] = "Dokumente" ;
+ Text [ portuguese ] = "Documentos" ;
+ Text[ chinese_simplified ] = "Îĵµ";
+ Text[ russian ] = "Äîêóìåíòû";
+ Text[ polish ] = "dokumenty/-ów";
+ Text[ japanese ] = "ÄÞ·­ÒÝÄ";
+ Text[ chinese_traditional ] = "¤å¥ó";
+ Text[ arabic ] = "ãÓÊäÏÇÊ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "¸ããñáöá";
+ Text[ korean ] = "¹®¼­";
+ Text[ turkish ] = "Belge";
+ };
+ PushButton PB_DEL_MEM
+ {
+ Pos = MAP_APPFONT ( 198 , 14 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ Text [ English ] = "Clear" ;
+ Text [ dutch ] = "W~issen" ;
+ Text [ english_us ] = "~Clear" ;
+ Text [ italian ] = "C~ancella" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Vider" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ portuguese_brazilian ] = "~Löschen" ;
+ Text [ portuguese ] = "E~liminar" ;
+ Text[ chinese_simplified ] = "ɾ³ý(~C)";
+ Text[ russian ] = "Óäàëèòü";
+ Text[ polish ] = "Usuñ";
+ Text[ japanese ] = "íœ(~C)";
+ Text[ chinese_traditional ] = "§R°£(~C)";
+ Text[ arabic ] = "ãÓÍ";
+ Text[ greek ] = "ÄéáãñáöÞ";
+ Text[ korean ] = "»èÁ¦(~C)";
+ Text[ turkish ] = "Sil";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_DISK
+ {
+ Pos = MAP_APPFONT ( 12 , 33 ) ;
+ Size = MAP_APPFONT ( 75 , 10 ) ;
+ Text = "~Festplattencache" ;
+ Text [ English ] = "Di~sk cache" ;
+ Text [ english_us ] = "~Hard disk cache" ;
+ Text [ italian ] = "Cache di~sco fisso" ;
+ Text [ spanish ] = "C~aché del disco duro" ;
+ Text [ french ] = "Cache sur ~disque" ;
+ Text [ dutch ] = "~Harde schijf-cache" ;
+ Text [ swedish ] = "Hårddi~skcache" ;
+ Text [ danish ] = "Harddiskcache" ;
+ Text [ portuguese_brazilian ] = "Fe~stplattencache" ;
+ Text [ portuguese ] = "Cache do ~disco rígido" ;
+ Text[ chinese_simplified ] = "Ó²ÅÌ»º³åÇø(~H)";
+ Text[ russian ] = "Êýø æåñòêîãî äèñêà";
+ Text[ polish ] = "Pamiêæ podrêczna dysku";
+ Text[ japanese ] = "Ê°ÄÞÃÞ¨½¸·¬¯¼­(~H)";
+ Text[ chinese_traditional ] = "ºÏºÐ½w¨R°Ï(~H)";
+ Text[ arabic ] = "ÇáÐÇßÑÉ ßÇÔ ááÞÑÕ ÇáÕáÈ";
+ Text[ greek ] = "Êñõ~öÞ ìíÞìç óêëçñïý äßóêïõ";
+ Text[ korean ] = "Çϵåµð½ºÅ© ij½Ã(~H)";
+ Text[ turkish ] = "Sabit disk önbelleði";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_DISK
+ {
+ Pos = MAP_APPFONT ( 90 , 32 ) ;
+ Size = MAP_APPFONT ( 35 , 12 ) ;
+ Border = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 500000 ;
+ StrictFormat = TRUE ;
+ First = 100 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_BYTE
+ {
+ Pos = MAP_APPFONT ( 131 , 33 ) ;
+ Size = MAP_APPFONT ( 64 , 10 ) ;
+ Text = "kByte" ;
+ Text [ english ] = "kByte" ;
+ Text [ english_us ] = "kByte" ;
+ Text [ portuguese ] = "kByte" ;
+ Text [ portuguese_brazilian ] = "kByte" ;
+ Text [ swedish ] = "kbyte" ;
+ Text [ danish ] = "kByte" ;
+ Text [ italian ] = "kByte" ;
+ Text [ spanish ] = "kBytes" ;
+ Text [ french ] = "Ko" ;
+ Text [ dutch ] = "kByte" ;
+ Text[ chinese_simplified ] = "ǧ×Ö½Ú";
+ Text[ russian ] = "ÊÁ";
+ Text[ polish ] = "kilobajtów";
+ Text[ japanese ] = "·ÛÊÞ²Ä";
+ Text[ chinese_traditional ] = "¤d¦r²Å";
+ Text[ arabic ] = "ßíáæÈÇíÊ";
+ Text[ greek ] = "kByte";
+ Text[ korean ] = "ų·Î¹ÙÀÌÆ®";
+ Text[ turkish ] = "KB";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_DEL_DISK
+ {
+ Pos = MAP_APPFONT ( 198 , 31 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Lös~chen : L÷s~chen */
+ Text = "Lös~chen" ;
+ Text [ English ] = "Clear" ;
+ Text [ english_us ] = "Cle~ar" ;
+ Text [ italian ] = "~Cancella" ;
+ Text [ spanish ] = "Eli~minar" ;
+ Text [ french ] = "V~ider" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ swedish ] = "R~adera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ portuguese_brazilian ] = "Lös~chen" ;
+ Text [ portuguese ] = "E~liminar" ;
+ Text[ chinese_simplified ] = "ɾ³ý(~A)";
+ Text[ russian ] = "Óäàëèòü";
+ Text[ polish ] = "Wyczy~Ͼ";
+ Text[ japanese ] = "íœ(~A)";
+ Text[ chinese_traditional ] = "§R°£(~A)";
+ Text[ arabic ] = "ãÓÍ";
+ Text[ greek ] = "ÄéáãñáöÞ";
+ Text[ korean ] = "»èÁ¦(~A)";
+ Text[ turkish ] = "Sil";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_REORGANIZE_DISK
+ {
+ Pos = MAP_APPFONT ( 198 , 48 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ HelpId = SID_PURGE ;
+ Text = "Re~organisieren" ;
+ Text [ English ] = "Re~organize" ;
+ Text [ english_us ] = "Re~organize" ;
+ TEXT[ italian ] = "Ri~organizza";
+ TEXT[ portuguese_brazilian ] = "Re~organisieren";
+ TEXT[ portuguese ] = "Re~organizar";
+ TEXT[ danish ] = "Reorganiser";
+ TEXT[ french ] = "Réorganiser";
+ TEXT[ swedish ] = "~Omorganisera";
+ TEXT[ dutch ] = "Re~organiseren";
+ TEXT[ spanish ] = "~Reorganizar";
+ TEXT[ chinese_simplified ] = "ÖØÐÂ×éÖ¯(~O)";
+ TEXT[ russian ] = "Ðåîðãàíèçàöèÿ";
+ TEXT[ polish ] = "Reorganizuj";
+ TEXT[ japanese ] = "Ä\\¬(~O)";
+ TEXT[ chinese_traditional ] = "­«·s²Õ´(~O)";
+ TEXT[ arabic ] = "ÅÚÇÏÉ ÊäÙíã";
+ TEXT[ greek ] = "Áíáäé~ïñãÜíùóç";
+ TEXT[ korean ] = "ÀçÁ¶Á÷(~O)";
+ TEXT[ turkish ] = "Yeniden düzenle";
+ TEXT[ language_user1 ] = " ";
+ };
+ FixedText FT_EXPIRE
+ {
+ Pos = MAP_APPFONT ( 12 , 66 ) ;
+ Size = MAP_APPFONT ( 75 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Verfalls~prüfung : Verfalls~pr³fung */
+ Text = "Verfalls~prüfung" ;
+ Text [ English ] = "Expiration test" ;
+ Text [ dutch ] = "Verval~controle" ;
+ Text [ english_us ] = "~Verify document:" ;
+ Text [ italian ] = "Test di ~scadenza" ;
+ Text [ spanish ] = "~Verificar documento" ;
+ Text [ french ] = "Comparaison réseau" ;
+ Text [ swedish ] = "Validitets~test" ;
+ Text [ danish ] = "Forfaldskontrol" ;
+ Text [ portuguese ] = "Verificar documento:" ;
+ Text [ portuguese_brazilian ] = "Verfallprüfung:" ;
+ Text[ chinese_simplified ] = "Îĵµ¹ýÆÚ¼ì²é(~V)";
+ Text[ russian ] = "Ïðîâåðêà ñðîêà õðàíåíèÿ";
+ Text[ polish ] = "Sprawdzanie wa¿noœci";
+ Text[ japanese ] = "—LŒøŠúŠÔ‚ÌÁª¯¸(~V)";
+ Text[ chinese_traditional ] = "¤å¥ó¹L´ÁÀˬd(~V)";
+ Text[ arabic ] = "ÝÍÕ ÇáÕáÇÍíÉ";
+ Text[ greek ] = "¸ëåã÷ïò ëÞ~îçò:";
+ Text[ korean ] = "¸¸±â ¿©ºÎ È®ÀÎ:(~V)";
+ Text[ turkish ] = "Geçerlik süresi kontrolü";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_EXPIRE
+ {
+ Pos = MAP_APPFONT ( 90 , 65 ) ;
+ Size = MAP_APPFONT ( 105 , 48 ) ;
+ Border = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Immer" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Einmal pro Sitzung" ; CACHE_VERIFY_ONCE ; > ;
+ < "Nie" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ English ] =
+ {
+ < "Immer" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Einmal pro Sitzung" ; CACHE_VERIFY_ONCE ; > ;
+ < "Nie" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Always" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Once per session" ; CACHE_VERIFY_ONCE ; > ;
+ < "Never" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Einmal pro Sitzung" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Immer" ; CACHE_VERIFY_ONCE ; > ;
+ < "Nie" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Alltid" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "En gång per session" ; CACHE_VERIFY_ONCE ; > ;
+ < "Aldrig" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Altid" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Engang per session" ; CACHE_VERIFY_ONCE ; > ;
+ < "Aldrig" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Sempre" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Una volta a sessione" ; CACHE_VERIFY_ONCE ; > ;
+ < "Mai" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Siempre" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Una vez por sesión" ; CACHE_VERIFY_ONCE ; > ;
+ < "Nunca" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Chaque fois" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Une fois par session" ; CACHE_VERIFY_ONCE ; > ;
+ < "Jamais" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Altijd" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Eenmaal per sessie" ; CACHE_VERIFY_ONCE ; > ;
+ < "Nooit" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Sempre" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Uma vez por sessão" ; CACHE_VERIFY_ONCE ; > ;
+ < "Nunca" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "×ÜÊÇ" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "ÿһ´ÎÁ¬½Ó" ; CACHE_VERIFY_ONCE ; > ;
+ < "´Ó²»" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Âñåãäà" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Îäèí ðàç â ñåàíñ" ; CACHE_VERIFY_ONCE ; > ;
+ < "Íèêîãäà" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Zawsze" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Raz na sesjê" ; CACHE_VERIFY_ONCE ; > ;
+ < "Nigdy" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "펞" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "¾¯¼®Ý‚²‚Æ‚É" ; CACHE_VERIFY_ONCE ; > ;
+ < "‚µ‚È‚¢" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "Á`¬O" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "¨C¤@¦¸³s½u" ; CACHE_VERIFY_ONCE ; > ;
+ < "±q¤£" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÏÇÆãÇð" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "ãÑÉ æÇÍÏÉ ßá ÌáÓÉ Úãá" ; CACHE_VERIFY_ONCE ; > ;
+ < "ÈÊÇÊÇð" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; CACHE_VERIFY_ALWAYS ; > ;
+ < " " ; CACHE_VERIFY_ONCE ; > ;
+ < " " ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÐÜíôá" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Ìéá öïñÜ áíÜ åðßóêåøç" ; CACHE_VERIFY_ONCE ; > ;
+ < "ÐïôÝ" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "Ç×»ó" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "1ȸ ÀÛ¾÷´ç Çѹø" ; CACHE_VERIFY_ONCE ; > ;
+ < "Àý´ë ¾øÀ½" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Her zaman" ; CACHE_VERIFY_ALWAYS ; > ;
+ < "Her oturumda bir kez" ; CACHE_VERIFY_ONCE ; > ;
+ < "Hiçbir zaman" ; CACHE_VERIFY_NEVER ; > ;
+ };
+ };
+ CheckBox CB_EXPIRE
+ {
+ Pos = MAP_APPFONT ( 12 , 82 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ Text = "~Dokumente mit abgelaufenem Verfallsdatum im Cache speichern" ;
+ Text [ English ] = "~Store expired documents into the cache" ;
+ Text [ english_us ] = "Save e~xpired documents in cache" ;
+ Text [ portuguese ] = "Guardar ~documentos expirados no cache" ;
+ Text [ portuguese_brazilian ] = "Dokumente mit abgelaufenem Verfallsdatum im Cache speichern" ;
+ Text [ swedish ] = "Spara ~dokument med utgångna förfallodatum i cachen" ;
+ Text [ danish ] = "Gem dokumenter med udløbet forfaldsdato i cache." ;
+ Text [ italian ] = "Salva i documenti con data di scadenza trascorsa nella cache" ;
+ Text [ spanish ] = "Guardar en el caché los ~documentos que ya hayan expirado." ;
+ Text [ french ] = "~Enregistrer dans le cache les documents dont la date d'expiration a été dépassée" ;
+ Text [ dutch ] = "~Documenten met overschreden vervaldatum opslaan in cache" ;
+ Text[ chinese_simplified ] = "½«¹ýÆÚµÄÎĵµ´æÈ뻺³åÇø(~X)";
+ Text[ russian ] = "Ñîõðàíÿòü â êýø äîêóìåíòû ñ èñòåêøèì ñðîêîì õðàíåíèÿ";
+ Text[ polish ] = "Zapisz w pamiêci podrê~cznej dokumenty, które utraci³y datê wa¿noœci";
+ Text[ japanese ] = "ŠúŒÀØ‚ê‚Ì•¶‘‚𷬯¼­‚É•Û‘¶‚·‚é(~X)";
+ Text[ chinese_traditional ] = "¹L´Áªº¤å¥ó«O¯d¦b½w¨R°Ï(~X)";
+ Text[ arabic ] = "ÍÝÙ ÇáãÓÊäÏÇÊ ÇáÊí äÝÐÊ ÕáÇÍíÊåÇ Ýí æÍÏÉ ÇáÊÎÒíä ÇáãÄÞÊ";
+ Text[ greek ] = "ÁðïèÞêåõóç óôçí ìíÞìç Cache ôùí å~ããñÜöùí ðïõ Ý÷ïõí ëÞîåé";
+ Text[ korean ] = "¸¸±âÀÏÀÌ ÀÖ´Â ¹®¼­¸¦ ij½Ã¿¡ ÀúÀå(~X)";
+ Text[ turkish ] = "Süresi dolmuþ belgeleri önbelleðe kaydet";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_NOCACHE
+ {
+ Pos = MAP_APPFONT ( 6 , 100 ) ;
+ Size = MAP_APPFONT ( 248 , 29 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Kein Cache für : Kein Cache f³r */
+ Text = "Kein Cache für" ;
+ Text [ English ] = "~No cache for" ;
+ Text [ dutch ] = "Geen cache voor" ;
+ Text [ english_us ] = "No cache for" ;
+ Text [ italian ] = "Senza cache per" ;
+ Text [ spanish ] = "Ningún caché para" ;
+ Text [ french ] = "Pas de cache pour" ;
+ Text [ swedish ] = "Ingen cache för" ;
+ Text [ danish ] = "Ingen cache for" ;
+ Text [ portuguese_brazilian ] = "Kein Cache für" ;
+ Text [ portuguese ] = "Não existe cache para" ;
+ Text[ chinese_simplified ] = "»º³åÇø²»ÊÊÓÃÓÚ";
+ Text[ russian ] = "Êýø íå èìååòñÿ äëÿ";
+ Text[ polish ] = "Brak pamiêci podrêcznej dla";
+ Text[ japanese ] = "·¬¯¼­‚È‚µ";
+ Text[ chinese_traditional ] = "½w¨R°Ï¤£Óì¥Î©ó";
+ Text[ arabic ] = "áÇ íæÌÏ æÍÏÉ ÊÎÒíä áÜ";
+ Text[ greek ] = "Äåí õðÜñ÷åé êñõöÞ ìíÞìç ãéá";
+ Text[ korean ] = "ij½Ã ¾øÀ½";
+ Text[ turkish ] = "Þunun için önbellek yok:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_NOCACHE
+ {
+ Pos = MAP_APPFONT ( 12 , 112 ) ;
+ Size = MAP_APPFONT ( 33 , 10 ) ;
+ Text = "Se~rver" ;
+ Text [ English ] = "Se~rver" ;
+ Text [ dutch ] = "~Server" ;
+ Text [ english_us ] = "Ser~ver" ;
+ Text [ italian ] = "Server" ;
+ Text [ spanish ] = "~Servidor" ;
+ Text [ french ] = "Ser~veur" ;
+ Text [ swedish ] = "Ser~ver" ;
+ Text [ danish ] = "Server" ;
+ Text [ portuguese_brazilian ] = "Server" ;
+ Text [ portuguese ] = "~Servidor" ;
+ Text[ chinese_simplified ] = "·þÎñÆ÷(~V)";
+ Text[ russian ] = "Ñåðâåð";
+ Text[ polish ] = "Serwer";
+ Text[ japanese ] = "»°ÊÞ°(~V)";
+ Text[ chinese_traditional ] = "¦øªA¾¹(~V)";
+ Text[ arabic ] = "ÇáãÒæøÏ";
+ Text[ greek ] = "ÄéáêïìéóôÞò";
+ Text[ korean ] = "¼­¹ö(~V)";
+ Text[ turkish ] = "Sunucu";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_NOCACHE
+ {
+ Pos = MAP_APPFONT ( 48 , 111 ) ;
+ Size = MAP_APPFONT ( 137 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_NOCACHEDELIM
+ {
+ Pos = MAP_APPFONT ( 188 , 112 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "Trennzeichen ;" ;
+ Text [ English ] = "Separator ;" ;
+ Text [ english_us ] = "Separator ;" ;
+ Text [ italian ] = "Separatore;" ;
+ Text [ spanish ] = "Separador ;" ;
+ Text [ french ] = "Séparateur ;" ;
+ Text [ dutch ] = "Scheidingsteken ;" ;
+ Text [ swedish ] = "Skiljetecken ;" ;
+ Text [ danish ] = "Separatorer ;" ;
+ Text [ portuguese_brazilian ] = "Trennzeichen ;" ;
+ Text [ portuguese ] = "Separador ;" ;
+ Text[ chinese_simplified ] = "·ÖºÅ;";
+ Text[ russian ] = "Ðàçäåëèòåëè ;";
+ Text[ polish ] = "Separator ;";
+ Text[ japanese ] = "‹æØ‚è‹L†;";
+ Text[ chinese_traditional ] = "¤À¸¹;";
+ Text[ arabic ] = "ÝÇÕá º";
+ Text[ greek ] = "Åíùôéêü ;";
+ Text[ korean ] = "±¸ºÐ±âÈ£ ;";
+ Text[ turkish ] = "Ayýrma iþareti ;";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "»º³åÇø";
+ Text[ russian ] = "Êýø";
+ Text[ polish ] = "Pamiêæ podrêczna";
+ Text[ japanese ] = "·¬¯¼­";
+ Text[ chinese_traditional ] = "½w¨R°Ï";
+ Text[ arabic ] = "æÍÏÉ ÊÎÒíä ãÄÞÊ";
+ Text[ greek ] = "ÊñõöÞ ìíÞìç";
+ Text[ korean ] = "ij½Ã";
+ Text[ turkish ] = "Önbellek";
+ Text[ language_user1 ] = " ";
+};
+/************************************************************************/
+/* */
+/* Dateitypen */
+/* */
+/************************************************************************/
+TabPage RID_SVXPAGE_INET_TYPE
+{
+ HelpId = HID_OPTIONS_TYPE ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Dateitypen" ;
+ Text [ English ] = "File types" ;
+ Text [ dutch ] = "Bestandtypen" ;
+ Text [ english_us ] = "File Types" ;
+ Text [ italian ] = "Tipi di file" ;
+ Text [ spanish ] = "Tipos de archivo" ;
+ Text [ french ] = "Types de fichiers" ;
+ Text [ swedish ] = "Filtyper" ;
+ Text [ danish ] = "Filtyper" ;
+ Text [ portuguese ] = "Tipos de ficheiros" ;
+ Text [ portuguese_brazilian ] = "Dateitypen" ;
+ #define GB_TYPES_LEFT 6
+ GroupBox GB_TYPES
+ {
+ Pos = MAP_APPFONT ( GB_TYPES_LEFT , GB_TYPES_TOP ) ;
+ Size = MAP_APPFONT ( 251 , 130 ) ;
+ Text = "Zuordnung Dateitypen" ;
+ Text [ English ] = "File types" ;
+ Text [ dutch ] = "Bestemming bestandstypen" ;
+ Text [ english_us ] = "File types" ;
+ Text [ italian ] = "Correlazione tipi di file" ;
+ Text [ spanish ] = "Asignar tipos de archivo" ;
+ Text [ french ] = "Attribution type de fichiers" ;
+ Text [ swedish ] = "Tilldelning av filtyper" ;
+ Text [ danish ] = "Tildeling af filtyper" ;
+ Text [ portuguese_brazilian ] = "Zuordnung Dateitypen" ;
+ Text [ portuguese ] = "Atribuir tipos de ficheiro" ;
+ Text[ chinese_simplified ] = "ÎļþÀàÐÍ";
+ Text[ russian ] = "Òèïû ôàéëà";
+ Text[ polish ] = "Przypisz typy plików";
+ Text[ japanese ] = "̧²Ù‚ÌŽí—Þ‚ÌŠ„‚è“–‚Ä";
+ Text[ chinese_traditional ] = "ÀÉ®×Ãþ«¬";
+ Text[ arabic ] = "ÃäæÇÚ ÇáãáÝ";
+ Text[ greek ] = "Áíôéóôïß÷éóç ôýðùí áñ÷åßïõ";
+ Text[ korean ] = "ÆÄÀÏ À¯Çü ¹èÁ¤";
+ Text[ turkish ] = "Dosya tipleri";
+ Text[ language_user1 ] = " ";
+ };
+ Control LB_TYPES
+ {
+ HelpId = HID_OPTINET2_CTL_TYPES ;
+ Pos = MAP_APPFONT ( 12 , GB_TYPES_TOP + 9 ) ;
+ Size = MAP_APPFONT ( 239 , 53 ) ;
+ Border = TRUE ;
+ ClipChildren = TRUE ;
+ };
+ #define TYPE_FIXED_Y GB_TYPES_TOP + 67
+ #define EDIT_LEFT 65
+ FixedText FT_TYPE
+ {
+ Pos = MAP_APPFONT ( 12 , TYPE_FIXED_Y + 1 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Mime-~Typ" ;
+ Text [ English ] = "Mime ~type" ;
+ Text [ dutch ] = "Mime-~Type" ;
+ Text [ english_us ] = "~Mime type" ;
+ Text [ italian ] = "Tipo Mime" ;
+ Text [ spanish ] = "~Tipo MIME" ;
+ Text [ french ] = "~Type MIME" ;
+ Text [ swedish ] = "Mime-t~yp" ;
+ Text [ danish ] = "Mime-type" ;
+ Text [ portuguese_brazilian ] = "Mime-~Typ" ;
+ Text [ portuguese ] = "Tipo de mime" ;
+ Text[ chinese_simplified ] = "Mime ÀàÐÍ(~M)";
+ Text[ russian ] = "Òèï Mime";
+ Text[ polish ] = "Typ Mime";
+ Text[ japanese ] = "MIME‚ÌŽí—Þ(~M)";
+ Text[ chinese_traditional ] = "~Mime Ãþ«¬";
+ Text[ arabic ] = "äæÚ Mime";
+ Text[ greek ] = "~Ôýðïò Mime";
+ Text[ korean ] = "Mime Çü(~M)";
+ Text[ turkish ] = "Mime tipi";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_TYPE
+ {
+ Pos = MAP_APPFONT ( EDIT_LEFT , TYPE_FIXED_Y ) ;
+ Size = MAP_APPFONT ( 63 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_CLIP
+ {
+ Pos = MAP_APPFONT ( 12 , TYPE_FIXED_Y + 15 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Clipboard - Id" ;
+ Text [ English ] = "~Clipboard id" ;
+ Text [ dutch ] = "~Clipboard Id" ;
+ Text [ english_us ] = "~Clipboard ID" ;
+ Text [ italian ] = "~Clipboard - Id" ;
+ Text [ spanish ] = "~Portapapeles - Id" ;
+ Text [ french ] = "ID p~resse-papiers" ;
+ Text [ swedish ] = "Ur~klipp-ID" ;
+ Text [ danish ] = "Udklipsholder-ID" ;
+ Text [ portuguese_brazilian ] = "~Clipboard - Id" ;
+ Text [ portuguese ] = "~Clipboard - Id" ;
+ Text[ chinese_simplified ] = "¼ôÌù°å±êʶ(~C)";
+ Text[ russian ] = "ID áóôåðà îáìåíà";
+ Text[ polish ] = "ID scho~wka";
+ Text[ japanese ] = "¸Ø¯ÌßÎÞ°ÄÞ ID(~C)";
+ Text[ chinese_traditional ] = "°Å¶Kï¼ÐÃÑ(~C)";
+ Text[ arabic ] = "ÊÚÑíÝ ÇáÍÇÝÙÉ";
+ Text[ greek ] = "Ôáõôüôçôá ôïõ ~Clipboard";
+ Text[ korean ] = "Ŭ¸³º¸µå ID(~C)";
+ Text[ turkish ] = "Pano tanýtýcýsý";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_CLIP
+ {
+ Pos = MAP_APPFONT ( EDIT_LEFT , TYPE_FIXED_Y + 14 ) ;
+ Size = MAP_APPFONT ( 63 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_EXT
+ {
+ Pos = MAP_APPFONT ( 12 , TYPE_FIXED_Y + 29 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Erweiterung" ;
+ Text [ English ] = "~Extension" ;
+ Text [ english_us ] = "~Extension" ;
+ Text [ italian ] = "~Estensione" ;
+ Text [ spanish ] = "E~xtensión" ;
+ Text [ french ] = "~Extension" ;
+ Text [ dutch ] = "~Vergroting" ;
+ Text [ swedish ] = "~Utökning" ;
+ Text [ danish ] = "Filtypenavn" ;
+ Text [ portuguese_brazilian ] = "~Erweiterung" ;
+ Text [ portuguese ] = "~Extensão" ;
+ Text[ chinese_simplified ] = "À©Õ¹Ãû(~E)";
+ Text[ russian ] = "Ðàñøèðåíèå";
+ Text[ polish ] = "Rozszerzenie";
+ Text[ japanese ] = "Šg’£Žq(~E)";
+ Text[ chinese_traditional ] = "°ÆÀɦW(~E)";
+ Text[ arabic ] = "ÇãÊÏÇÏ ÇáÇÓã";
+ Text[ greek ] = "ÅðÝêôáóç";
+ Text[ korean ] = "È®ÀåÀÚ(~E)";
+ Text[ turkish ] = "Uzantý";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_EXT
+ {
+ Pos = MAP_APPFONT ( EDIT_LEFT , TYPE_FIXED_Y + 28 ) ;
+ Size = MAP_APPFONT ( 63 , 12 ) ;
+ Border = TRUE ;
+ };
+ #define EDIT_RIGHT 173
+ FixedText FT_EXT_ATTR
+ {
+ Pos = MAP_APPFONT ( 129 , TYPE_FIXED_Y + 1 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "Er~w. Attribut" ;
+ Text [ English ] = "E~xt. attribute" ;
+ Text [ english_us ] = "E~xt. attribute" ;
+ Text [ italian ] = "Attributi estesi" ;
+ Text [ spanish ] = "Atributo de ampliación" ;
+ Text [ french ] = "Attribut Ex~t." ;
+ Text [ dutch ] = "~Vergrot. attribuut" ;
+ Text [ swedish ] = "Utökade attribut" ;
+ Text [ danish ] = "Udv. attribut" ;
+ Text [ portuguese_brazilian ] = "Er~w. Attribut" ;
+ Text [ portuguese ] = "Ext. ~atributos" ;
+ Text[ chinese_simplified ] = "À©Õ¹ÊôÐÔ(~X)";
+ Text[ russian ] = "Ðàñø. àòðèáóò";
+ Text[ polish ] = "Rozszerzony atrybut";
+ Text[ japanese ] = "Šg’£‘®«(~X)";
+ Text[ chinese_traditional ] = "ÂX®iÄÝ©Ê(~X)";
+ Text[ arabic ] = "ÓãÉ ÇáÇãÊÏÇÏ";
+ Text[ greek ] = "Åðéðë. éäéüôçôá";
+ Text[ korean ] = "È®Àå ¼Ó¼º(~X)";
+ Text[ turkish ] = "Glþt. öznitelik";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_EXT_ATTR
+ {
+ Pos = MAP_APPFONT ( EDIT_RIGHT , TYPE_FIXED_Y ) ;
+ Size = MAP_APPFONT ( 78 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_OPEN
+ {
+ Pos = MAP_APPFONT ( 129 , TYPE_FIXED_Y + 15 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Öff~nen mit : Íff~nen mit */
+ Text = "Öff~nen mit" ;
+ Text [ English ] = "~Start with" ;
+ Text [ english_us ] = "~Open with" ;
+ Text [ italian ] = "Apri con" ;
+ Text [ spanish ] = "A~brir con" ;
+ Text [ french ] = "~Ouvrir avec" ;
+ Text [ dutch ] = "~Openen met" ;
+ Text [ swedish ] = "Öpp~na med" ;
+ Text [ danish ] = "Åbn med" ;
+ Text [ portuguese_brazilian ] = "Öff~nen mit" ;
+ Text [ portuguese ] = "~Abrir com" ;
+ Text[ chinese_simplified ] = "´ò¿ªÓÃ(~O)";
+ Text[ russian ] = "Îòêðûòü ñ";
+ Text[ polish ] = "Otwórz";
+ Text[ japanese ] = "ŠJ‚­(~O)";
+ Text[ chinese_traditional ] = "¶}±Ò¥Î(~O)";
+ Text[ arabic ] = "ÝÊÍ ãÚ";
+ Text[ greek ] = "¢íïéãìá ìå";
+ Text[ korean ] = "¿­±â(~O)";
+ Text[ turkish ] = "Þununla aç:";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_OPEN
+ {
+ Pos = MAP_APPFONT ( EDIT_RIGHT , TYPE_FIXED_Y + 14 ) ;
+ Size = MAP_APPFONT ( 78 , 48 ) ;
+ Border = TRUE ;
+ DropDown = TRUE ;
+ };
+ FixedText FT_FILTER
+ {
+ Pos = MAP_APPFONT ( 129 , TYPE_FIXED_Y + 29 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Hide = TRUE ;
+ Text = "~Filter" ;
+ Text [ English ] = "~Filter" ;
+ Text [ dutch ] = "~Filter" ;
+ Text [ english_us ] = "~Filter" ;
+ Text [ italian ] = "~Filtro" ;
+ Text [ spanish ] = "~Filtro" ;
+ Text [ french ] = "~Filtre" ;
+ 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 ] = "Filtre";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_FILTER
+ {
+ Pos = MAP_APPFONT ( EDIT_RIGHT , TYPE_FIXED_Y + 28 ) ;
+ Size = MAP_APPFONT ( 78 , 48 ) ;
+ Hide = TRUE ;
+ Border = TRUE ;
+ DropDown = TRUE ;
+ };
+ FixedText FT_APP
+ {
+ Pos = MAP_APPFONT ( 129 , TYPE_FIXED_Y + 29 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Hide = TRUE ;
+ Text = "A~pplikation" ;
+ Text [ English ] = "A~pplication" ;
+ Text [ dutch ] = "A~pplicatie" ;
+ Text [ english_us ] = "A~pplication" ;
+ Text [ italian ] = "A~pplicazione" ;
+ Text [ spanish ] = "A~plicación" ;
+ Text [ french ] = "A~pplication" ;
+ Text [ swedish ] = "Tilläm~pning" ;
+ Text [ danish ] = "Applikation" ;
+ Text [ portuguese ] = "A~plicações" ;
+ Text [ portuguese_brazilian ] = "A~pplikation" ;
+ Text[ chinese_simplified ] = "Ó¦ÓóÌÐò(~P)";
+ Text[ russian ] = "Ïðèëîæåíèå";
+ Text[ polish ] = "Aplikacja";
+ Text[ japanese ] = "±Ìßع°¼®Ý(~P)";
+ Text[ chinese_traditional ] = "À³¥Îµ{§Ç(~P)";
+ Text[ arabic ] = "ÊØÈíÞ";
+ Text[ greek ] = "ÅöáñìïãÞ";
+ Text[ korean ] = "ÀÀ¿ë ÇÁ·Î±×·¥(~P)";
+ Text[ turkish ] = "Uygulama";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_APP
+ {
+ Pos = MAP_APPFONT ( EDIT_RIGHT , TYPE_FIXED_Y + 28 ) ;
+ Size = MAP_APPFONT ( 78 , 12 ) ;
+ Hide = TRUE ;
+ Border = TRUE ;
+ };
+ PushButton PB_ADD_TYPE
+ {
+ Pos = MAP_APPFONT ( 12 , 114 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufügen : H~inzuf³gen */
+ Text = "H~inzufügen" ;
+ Text [ English ] = "A~dd" ;
+ Text [ dutch ] = "Toe~voegen" ;
+ Text [ english_us ] = "~Add" ;
+ Text [ italian ] = "Aggiungi" ;
+ Text [ spanish ] = "~Añadir" ;
+ Text [ french ] = "~Ajouter" ;
+ Text [ swedish ] = "Lägg t~ill" ;
+ Text [ danish ] = "Tilføj" ;
+ Text [ portuguese_brazilian ] = "H~inzufügen" ;
+ Text [ portuguese ] = "A~dicionar" ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)";
+ Text[ russian ] = "Äîáàâèòü";
+ Text[ polish ] = "Dodaj";
+ Text[ japanese ] = "’ljÁ(~A)";
+ Text[ chinese_traditional ] = "¼W¥[(~A)";
+ Text[ arabic ] = "ÅÖÇÝÉ";
+ Text[ greek ] = "ÐñïóèÞêç";
+ Text[ korean ] = "Ãß°¡(~A)";
+ Text[ turkish ] = "Ekle";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_CHG_TYPE
+ {
+ Pos = MAP_APPFONT ( 65 , 114 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Ändern : ~Žndern */
+ Text = "~Ändern" ;
+ Text [ English ] = "Chan~ge" ;
+ Text [ english_us ] = "Modify" ;
+ Text [ italian ] = "Modifica" ;
+ Text [ spanish ] = "~Modificar" ;
+ Text [ french ] = "~Modifier" ;
+ Text [ dutch ] = "Wij~zigen" ;
+ Text [ swedish ] = "~Ändra" ;
+ Text [ danish ] = "Modificer" ;
+ Text [ portuguese_brazilian ] = "~Ändern" ;
+ Text [ portuguese ] = "~Modificar" ;
+ Text[ chinese_simplified ] = "¸üÌæ(~R)";
+ Text[ russian ] = "Èçìåíèòü";
+ Text[ polish ] = "Za~mieñ";
+ Text[ japanese ] = "•ÏX(~R)";
+ Text[ chinese_traditional ] = "´À¥N(~R)";
+ Text[ arabic ] = "ÊÚÏíá";
+ Text[ greek ] = "Ôñïðïðïßçóç";
+ Text[ korean ] = "º¯°æ(~R)";
+ Text[ turkish ] = "Deðiþtir";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_DEL_TYPE
+ {
+ Pos = MAP_APPFONT ( 118 , 114 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ Text [ English ] = "Dele~te" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ italian ] = "Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ portuguese_brazilian ] = "~Löschen" ;
+ 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_SEARCH_APP
+ {
+ Pos = MAP_APPFONT ( 171 , 114 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Au~swählen... : ~Suchen... */
+ Text = "Au~swählen..." ;
+ Text [ English ] = "~Select..." ;
+ Text [ english_us ] = "~Browse..." ;
+ Text [ portuguese_brazilian ] = "~Suchen..." ;
+ Text [ swedish ] = "~Välj ut..." ;
+ Text [ danish ] = "Vælg..." ;
+ Text [ italian ] = "Sfoglia..." ;
+ Text [ spanish ] = "~Seleccionar..." ;
+ Text [ french ] = "Parcourir..." ;
+ Text [ dutch ] = "~Selecteren..." ;
+ Text [ portuguese ] = "~Pesquisar..." ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ(~B)...";
+ Text[ russian ] = "Âûáðàòü...";
+ Text[ polish ] = "Wybierz...";
+ Text[ japanese ] = "‘I‘ð(~B)...";
+ Text[ chinese_traditional ] = "¿ï¾Ü(~B)...";
+ Text[ arabic ] = "ÇÓÊÚÑÇÖ...";
+ Text[ greek ] = "ÅðéëïãÞ...";
+ Text[ korean ] = "¼±ÅÃ(~B)...";
+ Text[ turkish ] = "Seç";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ÎļþÀàÐÍ";
+ Text[ russian ] = "Òèïû ôàéëà";
+ Text[ polish ] = "Typy plików";
+ Text[ japanese ] = "̧²Ù‚ÌŽí—Þ";
+ Text[ chinese_traditional ] = "ÀÉ®×Ãþ«¬";
+ Text[ arabic ] = "ÃäæÇÚ ÇáãáÝ";
+ Text[ greek ] = "Ôýðïé áñ÷åßùí";
+ Text[ korean ] = "ÆÄÀÏ Çü½Ä";
+ Text[ turkish ] = "Dosya tipleri";
+ Text[ language_user1 ] = " ";
+};
+/************************************************************************/
+/* */
+/* Suche */
+/* */
+/************************************************************************/
+TabPage RID_SVXPAGE_INET_SEARCH
+{
+ HelpId = HID_OPTIONS_SEARCH ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Suche" ;
+ Text [ English ] = "Search" ;
+ Text [ english_us ] = "Search" ;
+ Text [ italian ] = "Cerca" ;
+ Text [ spanish ] = "Búsqueda" ;
+ Text [ french ] = "Recherche" ;
+ Text [ dutch ] = "Zoek" ;
+ Text [ swedish ] = "Sökning" ;
+ Text [ danish ] = "Søgning" ;
+ Text [ portuguese ] = "Localizar" ;
+ Text [ portuguese_brazilian ] = "Suche" ;
+ Text[ chinese_simplified ] = "ËÑÑ°";
+ Text[ russian ] = "Ïîèñê";
+ Text[ polish ] = "Szukaj";
+ Text[ japanese ] = "ŒŸõ";
+ Text[ chinese_traditional ] = "´M§ä";
+ Text[ arabic ] = "ÈÍË";
+ Text[ greek ] = "AíáæÞôçóç";
+ Text[ korean ] = "ã±â";
+
+ #define GB_SEARCH_LEFT 6
+ #define GB_SEARCH_TOP 3
+ GroupBox GB_SEARCH
+ {
+ Pos = MAP_APPFONT ( GB_SEARCH_LEFT , GB_SEARCH_TOP ) ;
+ Size = MAP_APPFONT ( 248 , 124 ) ;
+ Text = "Suchen in" ;
+ Text [ English ] = "Search in" ;
+ Text [ dutch ] = "Zoeken in" ;
+ Text [ english_us ] = "Search in" ;
+ Text [ italian ] = "Cerca in" ;
+ Text [ spanish ] = "Buscar en" ;
+ Text [ french ] = "Recherche avec" ;
+ Text [ swedish ] = "Sök i" ;
+ Text [ danish ] = "Søg i" ;
+ Text [ portuguese_brazilian ] = "Suchen in" ;
+ Text [ portuguese ] = "Procurar em" ;
+ Text[ chinese_simplified ] = "ËÑÑ°ÒýÇæ";
+ Text[ russian ] = "Èñêàòü â";
+ Text[ polish ] = "Szukaj w";
+ Text[ japanese ] = "ŒŸõêŠ";
+ Text[ chinese_traditional ] = "·j´M¤ÞÀº";
+ Text[ arabic ] = "ÇáÈÍË Ýí";
+ Text[ greek ] = "ÁíáæÞôçóç óôï";
+ Text[ korean ] = "ãÀ» ¹üÀ§";
+ Text[ turkish ] = "Þurada ara:";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_SEARCH
+ {
+ Pos = MAP_APPFONT ( 12 , GB_SEARCH_TOP + 11 ) ;
+ Size = MAP_APPFONT ( 54 , 70 ) ;
+ Border = TRUE ;
+ };
+ #define LABEL_START_XPOS (GB_SEARCH_LEFT + 6 + 54 + 6)
+ #define LABEL_LEN 33
+ #define EDIT_START_XPOS (LABEL_START_XPOS + LABEL_LEN + 3)
+ FixedText FT_SEARCH_NAME
+ {
+ Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 12 ) ;
+ Size = MAP_APPFONT ( LABEL_LEN , 10 ) ;
+ Text = "~Name" ;
+ Text [ English ] = "~Name" ;
+ Text [ english_us ] = "~Name" ;
+ Text [ portuguese_brazilian ] = "~Name" ;
+ Text [ swedish ] = "~Namn" ;
+ Text [ danish ] = "Navn" ;
+ Text [ italian ] = "~Nome" ;
+ Text [ spanish ] = "~Nombre" ;
+ Text [ french ] = "~Nom" ;
+ Text [ dutch ] = "~Naam" ;
+ Text [ portuguese ] = "~Nome" ;
+ 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_SEARCH_NAME
+ {
+ Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 11 ) ;
+ Size = MAP_APPFONT ( 140 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_SEARCH
+ {
+ Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 26 ) ;
+ Size = MAP_APPFONT ( LABEL_LEN , 10 ) ;
+ Text = "Art" ;
+ Text [ English ] = "Type" ;
+ Text [ english_us ] = "Type" ;
+ Text [ portuguese_brazilian ] = "Art" ;
+ Text [ swedish ] = "Typ" ;
+ Text [ danish ] = "Type" ;
+ Text [ italian ] = "Tipo" ;
+ Text [ spanish ] = "Tipo" ;
+ Text [ french ] = "Type" ;
+ Text [ dutch ] = "Type" ;
+ Text [ portuguese ] = "Tipo" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ";
+ Text[ russian ] = "Òèï";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "À²Ìß";
+ Text[ chinese_traditional ] = "Ãþ«¬";
+ Text[ arabic ] = "ÇáäæÚ";
+ Text[ greek ] = "Ôýðïò";
+ Text[ korean ] = "À¯Çü";
+ Text[ turkish ] = "Tür";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_AND
+ {
+ Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 26 ) ;
+ Size = MAP_APPFONT ( 44 , 10 ) ;
+ Check = TRUE ;
+ Text = "~Und" ;
+ Text [ English ] = "~And" ;
+ Text [ dutch ] = "~En" ;
+ Text [ english_us ] = "A~nd" ;
+ Text [ italian ] = "E" ;
+ Text [ spanish ] = "~Y" ;
+ Text [ french ] = "~Et" ;
+ Text [ swedish ] = "~Och" ;
+ Text [ danish ] = "Og" ;
+ Text [ portuguese_brazilian ] = "~Und" ;
+ Text [ portuguese ] = "~E" ;
+ Text[ chinese_simplified ] = "ºÍ(~N)";
+ Text[ russian ] = "È";
+ Text[ polish ] = "I";
+ Text[ japanese ] = "And(~A)";
+ Text[ chinese_traditional ] = "©M(~A)";
+ Text[ arabic ] = "æ";
+ Text[ greek ] = "Êáé";
+ Text[ korean ] = "±×¸®°í(~N)";
+ Text[ turkish ] = "Ve";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_OR
+ {
+ Pos = MAP_APPFONT ( EDIT_START_XPOS + 44 + 3 , GB_SEARCH_TOP + 26 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Ode~r" ;
+ Text [ English ] = "~Or" ;
+ Text [ dutch ] = "~Of" ;
+ Text [ english_us ] = "~Or" ;
+ Text [ italian ] = "O" ;
+ Text [ spanish ] = "~O" ;
+ Text [ french ] = "~Ou" ;
+ Text [ swedish ] = "~Eller" ;
+ Text [ danish ] = "Eller" ;
+ Text [ portuguese_brazilian ] = "Ode~r" ;
+ Text [ portuguese ] = "~Ou" ;
+ Text[ chinese_simplified ] = "»ò(~O)";
+ Text[ russian ] = "Èëè";
+ Text[ polish ] = "Lu~b";
+ Text[ japanese ] = "Or(~O)";
+ Text[ chinese_traditional ] = "©Î(~O)";
+ Text[ arabic ] = "Ãæ";
+ Text[ greek ] = "Þ";
+ Text[ korean ] = "¶Ç´Â(~O)";
+ Text[ turkish ] = "Veya";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_EXACT
+ {
+ Pos = MAP_APPFONT ( EDIT_START_XPOS + 44 + 3 + 45 + 3 , GB_SEARCH_TOP + 26 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "E~xakt" ;
+ Text [ English ] = "E~xact" ;
+ Text [ dutch ] = "E~xact" ;
+ Text [ english_us ] = "E~xact" ;
+ Text [ italian ] = "Esatto" ;
+ Text [ spanish ] = "E~xacto" ;
+ Text [ french ] = "E~xact" ;
+ Text [ swedish ] = "E~xakt" ;
+ Text [ danish ] = "Eksakt" ;
+ Text [ portuguese_brazilian ] = "E~xakt" ;
+ Text [ portuguese ] = "E~xacto" ;
+ Text[ chinese_simplified ] = "¾«È·(~E)";
+ Text[ russian ] = "Òî÷íî";
+ Text[ polish ] = "Dok³adnie";
+ Text[ japanese ] = "Š®‘S‚É“¯ˆê(~E)";
+ Text[ chinese_traditional ] = "ºë½T(~E)";
+ Text[ arabic ] = "ÈÇáÊãÇã";
+ Text[ greek ] = "Á~êñéâþò";
+ Text[ korean ] = "»ó¼¼È÷(~X)";
+ Text[ turkish ] = "Aynýsý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_URL
+ {
+ Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 40 ) ;
+ Size = MAP_APPFONT ( LABEL_LEN , 10 ) ;
+ Text = "~Präfix" ;
+ Text [ English ] = "~Prefix" ;
+ Text [ dutch ] = "~Prefix" ;
+ Text [ english_us ] = "~Prefix" ;
+ Text [ italian ] = "Prefisso" ;
+ Text [ spanish ] = "~Prefijo" ;
+ Text [ french ] = "~Préfixe" ;
+ Text [ swedish ] = "~Prefix" ;
+ Text [ danish ] = "Præfiks" ;
+ Text [ portuguese_brazilian ] = "~Präfix" ;
+ Text [ portuguese ] = "~Prefixo" ;
+ Text[ chinese_simplified ] = "ǰ׺(~P)";
+ Text[ russian ] = "Ïðåôèêñ";
+ Text[ polish ] = "Przedrostek";
+ Text[ japanese ] = "ÌßŲ́¯¸½(~P)";
+ Text[ chinese_traditional ] = "«eºó(~P)";
+ Text[ arabic ] = "ÇáãÞØÚ ÇáÃæá";
+ Text[ greek ] = "Ðñüèåìá";
+ Text[ korean ] = "Á¢µÎ¾î(~P)";
+ Text[ turkish ] = "Önek";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_URL
+ {
+ Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 39 ) ;
+ Size = MAP_APPFONT ( 140 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_POSTFIX
+ {
+ Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 55 ) ;
+ Size = MAP_APPFONT ( LABEL_LEN , 10 ) ;
+ Text = "Su~ffix" ;
+ Text [ English ] = "Suffi~x" ;
+ Text [ english_us ] = "Suffi~x" ;
+ Text [ portuguese_brazilian ] = "Su~ffix" ;
+ Text [ swedish ] = "Su~ffix" ;
+ Text [ danish ] = "Suffiks" ;
+ Text [ italian ] = "Su~ffisso" ;
+ Text [ spanish ] = "S~ufijo" ;
+ Text [ french ] = "Su~ffixe" ;
+ Text [ dutch ] = "Su~ffix" ;
+ Text [ portuguese ] = "Su~fixo" ;
+ Text[ chinese_simplified ] = "ºó׺(~X)";
+ Text[ russian ] = "Ñóôôèêñ";
+ Text[ polish ] = "Przyrostek";
+ Text[ japanese ] = "»Ì¨¯¸½(~X)";
+ Text[ chinese_traditional ] = "«áºó(~X)";
+ Text[ arabic ] = "ÇáãÞØÚ ÇáÃÎíÑ";
+ Text[ greek ] = "ÊáôÜëç~îç";
+ Text[ korean ] = "Á¢µÎ¾î(~X)";
+ Text[ turkish ] = "Sonek";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_POSTFIX
+ {
+ Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 54 ) ;
+ Size = MAP_APPFONT ( 140 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_SEPARATOR
+ {
+ Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 70 ) ;
+ Size = MAP_APPFONT ( LABEL_LEN , 10 ) ;
+ Text = "~Trenner" ;
+ Text [ English ] = "~Separator" ;
+ Text [ dutch ] = "~Separator" ;
+ Text [ english_us ] = "~Separator" ;
+ Text [ italian ] = "Separatore" ;
+ Text [ spanish ] = "~Separador" ;
+ Text [ french ] = "S~éparateur" ;
+ Text [ swedish ] = "Skilje~tecken" ;
+ Text [ danish ] = "Separator" ;
+ Text [ portuguese_brazilian ] = "~Trenner" ;
+ Text [ portuguese ] = "~Separador" ;
+ Text[ chinese_simplified ] = "·Ö¸ô·û(~S)";
+ Text[ russian ] = "Ðàçäåëèòåëü";
+ Text[ polish ] = "Separator";
+ Text[ japanese ] = "‹æØ‚è‹L†";
+ Text[ chinese_traditional ] = "³s±µ²Å(~S)";
+ Text[ arabic ] = "ÝÇÕá";
+ Text[ greek ] = "Äéá÷ùñéóôéêü";
+ Text[ korean ] = "±¸ºÐ¼±(~S)";
+ Text[ turkish ] = "Ayýrýcý";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_SEPARATOR
+ {
+ Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 69 ) ;
+ Size = MAP_APPFONT ( 42 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedText FT_CASE
+ {
+ Pos = MAP_APPFONT ( EDIT_START_XPOS + 42 + 3, GB_SEARCH_TOP + 70 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Right = TRUE;
+ Text = "~Schreibstil" ;
+ Text [ English ] = "~Case" ;
+ Text [ dutch ] = "S~chrijfstijl" ;
+ Text [ english_us ] = "~Case match" ;
+ Text [ italian ] = "Stile carattere" ;
+ Text [ spanish ] = "Es~tilo" ;
+ Text [ french ] = "Style ~d'écriture" ;
+ Text [ swedish ] = "~Skrivstil" ;
+ Text [ danish ] = "Skrivestil" ;
+ Text [ portuguese ] = "~Estilo de escrita" ;
+ Text [ portuguese_brazilian ] = "~Schreibstil" ;
+ Text[ chinese_simplified ] = "Êéд·½Ê½(~C)";
+ Text[ russian ] = "Ó÷åò ðåãèñòðà";
+ Text[ polish ] = "Styl pis~ma";
+ Text[ japanese ] = "•¶Žš‚Ì‹æ•Ê(~C)";
+ Text[ chinese_traditional ] = "¤j¤p¼g(~C)";
+ Text[ arabic ] = "äãØ ÇáßÊÇÈÉ";
+ Text[ greek ] = "~Óôõë ãñáöÞò";
+ Text[ korean ] = "±Û¾¾Ã¼(~C)";
+ Text[ turkish ] = "~BÜYÜK/küçük harf duyarlý";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox ED_CASE
+ {
+ Pos = MAP_APPFONT ( EDIT_START_XPOS + 42 + 3 + 50 + 3, GB_SEARCH_TOP + 69 ) ;
+ Size = MAP_APPFONT ( 42 , 48 ) ;
+ Border = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Keiner" ; > ;
+ < "Groß" ; > ;
+ < "Klein" ; > ;
+ };
+ StringList [ English ] =
+ {
+ < "Keiner" ; > ;
+ < "Groß" ; > ;
+ < "Klein" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Geen" ; > ;
+ < "Groot" ; > ;
+ < "Klein" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "None" ; > ;
+ < "Upper" ; > ;
+ < "Lower" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Nessuno" ; > ;
+ < "Grande" ; > ;
+ < "Piccolo" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Ninguno" ; > ;
+ < "Mayúsculas" ; > ;
+ < "Minúsculas" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Aucun(e)" ; > ;
+ < "Majuscules" ; > ;
+ < "Minuscules" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Keiner" ; > ;
+ < "Groß" ; > ;
+ < "Klein" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Ingen" ; > ;
+ < "Stor" ; > ;
+ < "Liten" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Ingen" ; > ;
+ < "Stor" ; > ;
+ < "Små" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Nenhum" ; > ;
+ < "Maiúsculas" ; > ;
+ < "Minúsculas" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ÎÞ" ; > ;
+ < "´óд" ; > ;
+ < "Сд" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Áåç" ; > ;
+ < "Ïðîïèñíûå" ; > ;
+ < "Ñòðî÷íûå" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Brak" ; > ;
+ < "Du¿y" ; > ;
+ < "Ma³y" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "‚È‚µ" ; > ;
+ < "‘啶Žš" ; > ;
+ < "¬•¶Žš" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "µL" ; > ;
+ < "¤j¼g" ; > ;
+ < "¤p¼g" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÈÏæä" ; > ;
+ < "ßÈíÑ" ; > ;
+ < "ÕÛíÑ" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÊáíÝíá" ; > ;
+ < "Êåöáëáßá" ; > ;
+ < "ÐåæÜ" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "¾øÀ½" ; > ;
+ < "´ë¹®ÀÚ" ; > ;
+ < "¼Ò¹®ÀÚ" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Yok" ; > ;
+ < "Büyük" ; > ;
+ < "Küçük" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ };
+ };
+ // nicht übersetzen !
+ String STR_CASE_NONE
+ {
+ Text = "None" ;
+ };
+ String STR_CASE_UPPER
+ {
+ Text = "Upper" ;
+ };
+ String STR_CASE_LOWER
+ {
+ Text = "Lower" ;
+ };
+ PushButton PB_NEW
+ {
+ Pos = MAP_APPFONT ( 39 , 108 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "N~eu" ;
+ Text [ English ] = "New" ;
+ Text[ english_us ] = "N~ew";
+ Text[ portuguese ] = "~Novo";
+ Text[ russian ] = "Ñîçäàòü";
+ Text[ greek ] = "Äçìéïõñãßá";
+ Text[ dutch ] = "N~ieuw";
+ Text[ french ] = "~Nouveau";
+ Text[ spanish ] = "Nuevo";
+ Text[ italian ] = "Nuovo";
+ Text[ danish ] = "Ny";
+ Text[ swedish ] = "Nytt";
+ Text[ polish ] = "Nowy";
+ Text[ portuguese_brazilian ] = "New";
+ Text[ japanese ] = "V‹Ki~Ej";
+ Text[ korean ] = "»õ·Î(~E)";
+ Text[ chinese_simplified ] = "н¨";
+ Text[ chinese_traditional ] = "·s«Ø";
+ Text[ arabic ] = "ÌÏíÏ";
+ Text[ turkish ] = "Yeni";
+ };
+ PushButton PB_ADD
+ {
+ Pos = MAP_APPFONT ( 92 , 108 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "H~inzufügen" ;
+ Text [ English ] = "A~dd" ;
+ Text [ dutch ] = "Toe~voegen" ;
+ Text [ english_us ] = "~Add" ;
+ Text [ italian ] = "Aggiungi" ;
+ Text [ spanish ] = "~Añadir" ;
+ Text [ french ] = "~Ajouter" ;
+ Text [ swedish ] = "Lägg t~ill" ;
+ Text [ danish ] = "Tilføj" ;
+ Text [ portuguese_brazilian ] = "H~inzufügen" ;
+ Text [ portuguese ] = "A~dicionar" ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)";
+ Text[ russian ] = "Äîáàâèòü";
+ Text[ polish ] = "Dodaj";
+ Text[ japanese ] = "’ljÁ(~A)";
+ Text[ chinese_traditional ] = "¼W¥[(~A)";
+ Text[ arabic ] = "ÅÖÇÝÉ";
+ Text[ greek ] = "ÐñïóèÞêç";
+ Text[ korean ] = "Ãß°¡(~A)";
+ Text[ turkish ] = "Ekle";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_CHANGE
+ {
+ Pos = MAP_APPFONT ( 145 , 108 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Ändern" ;
+ Text [ English ] = "Chan~ge" ;
+ Text [ english_us ] = "~Modify" ;
+ Text [ italian ] = "Modfica" ;
+ Text [ spanish ] = "~Modificar" ;
+ Text [ french ] = "~Modifier" ;
+ Text [ dutch ] = "Wij~zigen" ;
+ Text [ swedish ] = "~Ändra" ;
+ Text [ danish ] = "Modificer" ;
+ Text [ portuguese_brazilian ] = "~Ändern" ;
+ Text [ portuguese ] = "~Modificar" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä(~M)";
+ Text[ russian ] = "Èçìåíèòü";
+ Text[ polish ] = "Mody~fikuj";
+ Text[ japanese ] = "•ÏX(~M)";
+ Text[ chinese_traditional ] = "Åܧó(~M)";
+ Text[ arabic ] = "ÊÚÏíá";
+ Text[ greek ] = "Ôñïðïðïßçóç";
+ Text[ korean ] = "º¯°æ(~M)";
+ Text[ turkish ] = "Deðiþtir";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_DELETE
+ {
+ Pos = MAP_APPFONT ( 198 , 108 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Löschen" ;
+ Text [ English ] = "Dele~te" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ italian ] = "Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ portuguese_brazilian ] = "~Löschen" ;
+ 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 ] = " ";
+ };
+ String STR_ERROR_NOFILE
+ {
+ Text[language_user1] = "%1 is a variable, which will be replaced.";
+ Text = "Die Konfigurationsdatei \"%1\" konnte nicht geladen werden.";
+ Text[English] = "Could not load the config file \"%1\".";
+ Text[ english_us ] = "The config file \"%1\" could not be loaded.";
+ Text[ portuguese ] = "Foi impossível carregar o ficheiro de configuração \"%1\".";
+ Text[ russian ] = "Çàãðóçèòü êîíôèãóðàöèîííûé ôàéë \"%1\" íå óäàåòñÿ.";
+ Text[ greek ] = "Äåí Þôáí äõíáôüí íá öïñôùèåß ôï áñ÷åßï äéáìüñöùóçò \"%1\".";
+ Text[ dutch ] = "Het configuratiebestand \"%1\" kon niet worden geladen";
+ Text[ french ] = "Impossible de charger le fichier de configuration \"%1\".";
+ Text[ spanish ] = "No se pudo cargar el archivo de configuración \"%1\".";
+ Text[ italian ] = "Non è stato possibile caricare il file di configurazione \"%1\".";
+ Text[ danish ] = "Det var ikke muligt at indlæse konfigurationsfilen \"%1\".";
+ Text[ swedish ] = "Konfigurationsfilen \"%1\" kunde inte laddas.";
+ Text[ polish ] = "Nie mo¿na by³o za³adowaæ pliku konfiguracyjnego \"%1\".";
+ Text[ portuguese_brazilian ] = "Could not load the config file \"%1\".";
+ Text[ japanese ] = "Ý’ȩ̀²Ù\"%1\"‚Í“Ç‚Ýž‚Ý‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ korean ] = "±¸¼ºÆÄÀÏ\"%1\"À» ·ÎµåÇÏÁö ¸øÇß½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÎÞ·¨×°ÔØÅäÖÃÎļþ \"%1\"¡£";
+ Text[ chinese_traditional ] = "µLªk¸Ë¸ü°t¸mÀɮס§%1¡¨¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÊÍãíá ãáÝ ÇáÊßæíä \"%1\".";
+ Text[ turkish ] = "Konfigürasyon dosyasý \"%1\" yüklenemedi.";
+ };
+ String STR_ERROR_NOGROUP
+ {
+ Text[language_user1] = "%1 and %2 are a variables, which will be replaced.";
+ Text = "Der Eintrag \"[%1]\" wurde in der\nKonfigurationsdatei \"%2\" nicht gefunden.";
+ Text[English] = "The Entry \"[%1]\" cound not found in the config file \"%2\".";
+ Text[ english_us ] = "The entry \"[%1]\" cound not be found\nin the configuration file \"%2\".";
+ Text[ portuguese ] = "Foi impossível encontrar a entrada \"[%1]\"\nno ficheiro de configuração \"%2\".";
+ Text[ russian ] = "Çàïèñü \"[%1]\" â êîíôèãóðàöèîííîì\nôàéëå \"%2\" íå íàéäåíà.";
+ Text[ greek ] = "Äåí âñÝèçêå ç åããñáöÞ \"[%1]\" óôï áñ÷åßï äéáìüñöùóçò \"%2\".";
+ Text[ dutch ] = "Het item \"[%1]\" is onvindbaar in het\nconfig bestand \"%2\".";
+ Text[ french ] = "Impossible de retrouver l'entrée \"[%1]\"\ndans le fichier de configuration \"%2\".";
+ Text[ spanish ] = "La entrada \"[%1]\" no se pudo encontrar\nen el archivo de configuración \"%2\".";
+ Text[ italian ] = "Non è stato possibile trovare la voce \"[%1]\"\nnel file di configurazione \"%2\".";
+ Text[ danish ] = "Det var ikke muligt at finde elementet \"[%1]\"\ni konfigurationsfilen \"%2\".";
+ Text[ swedish ] = "Posten \"[%1]\" hittades inte i\nkonfigurationsfilen \"%2\".";
+ Text[ polish ] = "Wpisu \"[%1]\" nie znaleziono w\n pliku konfiguracyjnym \"%2\".";
+ Text[ portuguese_brazilian ] = "The Entry \"[%1]\" cound not found in the config file \"%2\".";
+ Text[ japanese ] = "€–Ú \"[%1]\" ‚ÍÝ’ȩ̀²Ù \"%2\" ‚Ì’†‚ÉŒ©‚‚©‚è‚Ü‚¹‚ñ‚Å‚µ‚½B";
+ Text[ korean ] = "Ç׸ñ\"[%1]\"Àº ±¸¼ºÆÄÀÏ\"%2\"¿¡¼­ ãÀ» ¼ö ¾ø½À´Ï´Ù.";
+ Text[ chinese_simplified ] = "ÔÚÅäÖÃÎļþ \"%2\"ÖÐÎÞ·¨ÕÒµ½ÌõÄ¿ \"[%1]\" ¡£";
+ Text[ chinese_traditional ] = "¦b°t¸mÀÉ®×\"%2\"¤º¨S¦³§ä¨ì±ø¥Ø\"[%1]\" ¡C";
+ Text[ arabic ] = "ÊÚÐÑ ÇáÚËæÑ Úáì ÇáÅÏÎÇá \"[%1] Ýí\nãáÝ ÇáÊßæíä \"%2\".";
+ Text[ turkish ] = "Giriþ \"[%1]\",\n \"%2\" konfigürasyon dosyasýnda bulunamadý.";
+ };
+ Text[ turkish ] = "Ara";
+ Text[ language_user1 ] = " ";
+};
+
+/************************************************************************/
+/* */
+/* Other */
+/* */
+/************************************************************************/
+TabPage RID_SVXPAGE_BROWSER_OTHER
+{
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Sonstiges" ;
+ Text [ English ] = "Other" ;
+ Text [ dutch ] = "Overige" ;
+ Text [ english_us ] = "Other" ;
+ Text [ italian ] = "Altro" ;
+ Text [ spanish ] = "Otros" ;
+ Text [ french ] = "Autres" ;
+ Text [ swedish ] = "Annat" ;
+ Text [ danish ] = "Andet" ;
+ Text [ portuguese ] = "Outros" ;
+ Text [ portuguese_brazilian ] = "Sonstiges" ;
+ Text[ chinese_simplified ] = "ÆäËû";
+ Text[ russian ] = "Ïðî÷åå";
+ Text[ polish ] = "Inne";
+ Text[ japanese ] = "‚»‚Ì‘¼";
+ Text[ chinese_traditional ] = "¨ä¥L";
+ Text[ arabic ] = "ÛíÑ Ðáß";
+ Text[ greek ] = "¢ëëá";
+ Text[ korean ] = "±âŸ";
+
+ #define GB_JAVA_X 6
+ #define GB_JAVA_Y 2
+
+ GroupBox GB_JAVA
+ {
+ Pos = MAP_APPFONT ( GB_JAVA_X , GB_JAVA_Y ) ;
+ Size = MAP_APPFONT ( 171 , 70 ) ;
+ Text = "Java" ;
+ };
+ CheckBox CB_ENABLEJAVA
+ {
+ Pos = MAP_APPFONT ( GB_JAVA_X + 6 , GB_JAVA_Y + 10 ) ;
+ Size = MAP_APPFONT ( 159 , 10 ) ;
+ Text = "~freischalten" ;
+ Text [ English ] = "~Enable" ;
+ Text [ english_us ] = "~Enable" ;
+ Text [ italian ] = "A~bilita" ;
+ Text [ spanish ] = "Vali~dar" ;
+ Text [ french ] = "~Valider" ;
+ Text [ dutch ] = "~Vrijgeven" ;
+ Text [ swedish ] = "~frige" ;
+ Text [ danish ] = "aktiver" ;
+ Text [ portuguese_brazilian ] = "~Java freischalten" ;
+ Text [ portuguese ] = "~Activar" ;
+ Text[ chinese_simplified ] = "¿ª·Å(~E)";
+ Text[ russian ] = "~ðàçáëîêèðîâàòü";
+ Text[ polish ] = "Aktywacja";
+ Text[ japanese ] = "Žg—p‚·‚é(~E)";
+ Text[ chinese_traditional ] = "¶}©ñ(~E)";
+ Text[ arabic ] = "ÇáÊÔÛíá";
+ Text[ greek ] = "åíåñãïðïßçóç";
+ Text[ korean ] = "»ç¿ë °¡´É(~E)";
+ Text[ turkish ] = "Etkinleþtir";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_JAVASECURITY
+ {
+ Pos = MAP_APPFONT ( GB_JAVA_X + 6 , GB_JAVA_Y + 23 ) ;
+ Size = MAP_APPFONT ( 159 , 10 ) ;
+ Text = "S~icherheitsüberprüfungen";
+ Text [ English ] = "Enable ~security checks";
+ Text [ english_us ] = "Enable ~security checks";
+ Text[ italian ] = "Controlli di s~icurezza";
+ Text[ portuguese_brazilian ] = "S~icherheitsüberprüfungen";
+ Text[ portuguese ] = "~Controlos de segurança";
+ Text[ danish ] = "Sikkerhedskontroller";
+ Text[ french ] = "C~ontrôles de sécurité";
+ Text[ swedish ] = "s~äkerhetskontroller";
+ Text[ dutch ] = "V~eiligheidscontroles";
+ Text[ spanish ] = "Co~ntroles de seguridad";
+ Text[ chinese_simplified ] = "°²È«¼ì²é(~S)";
+ Text[ russian ] = "Ïðîâåðêà áåçîïàñíîñòè";
+ Text[ polish ] = "Kontrola zabezpieczeñ";
+ Text[ japanese ] = "¾·­Øè Áª¯¸(~S)";
+ Text[ chinese_traditional ] = "¦w¥þÀˬd(~S)";
+ Text[ arabic ] = "ÝÍæÕ ÃãäíÉ";
+ Text[ greek ] = "¸ëåã÷ï~é áóöáëåßáò";
+ Text[ korean ] = "º¸¾È Á¡°Ë(~S)";
+ Text[ turkish ] = "Güvenlik kontrolleri";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_NETACCESS
+ {
+ Pos = MAP_APPFONT ( GB_JAVA_X + 6 , GB_JAVA_Y + 36 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "~Netzzugriff" ;
+ Text [ English ] = "~Netaccess" ;
+ Text [ english_us ] = "Net ~access" ;
+ Text [ italian ] = "Accesso rete" ;
+ Text [ spanish ] = "Acce~so a la red" ;
+ Text [ french ] = "Accès ~réseau" ;
+ Text [ dutch ] = "~Nettoegang" ;
+ Text [ swedish ] = "~Nätåtkomst" ;
+ Text [ danish ] = "Netadgang" ;
+ Text [ portuguese_brazilian ] = "~Netzzugriff" ;
+ Text [ portuguese ] = "~Acesso à rede" ;
+ Text[ chinese_simplified ] = "·ÃÎÊÍøÂç(~A)";
+ Text[ russian ] = "Äîñòóï ê ñåòè";
+ Text[ polish ] = "Dostêp do sieci";
+ Text[ japanese ] = "ȯÄÜ°¸‚ւ̱¸¾½(~A)";
+ Text[ chinese_traditional ] = "³X°Ýºôµ¸(~A)";
+ Text[ arabic ] = "ÇáæÕæá Åáì ÇáÔÈßÉ";
+ Text[ greek ] = "Ðñüóâáóç óôï äßêôõï";
+ Text[ korean ] = "³×Æ®¿¡ Á¢±Ù(~A)";
+ Text[ turkish ] = "Að eriþimi";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_NETACCESS
+ {
+ Pos = MAP_APPFONT ( GB_JAVA_X + 51 , GB_JAVA_Y + 35 ) ;
+ Size = MAP_APPFONT ( 72 , 48 ) ;
+ Border = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Uneingeschränkt" ; > ;
+ < "Keinen" ; > ;
+ < "Rechner" ; > ;
+ };
+ StringList [ English ] =
+ {
+ < "Uneingeschränkt" ; > ;
+ < "Keinen" ; > ;
+ < "Rechner" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Unrestricted" ; > ;
+ < "None" ; > ;
+ < "Host" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Unrestricted" ; > ;
+ < "None" ; > ;
+ < "Host" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Obegränsad" ; > ;
+ < "Inga" ; > ;
+ < "Host" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Uindskrænket" ; > ;
+ < "Ingen" ; > ;
+ < "Host computer" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Illimitato" ; > ;
+ < "Senza" ; > ;
+ < "Host" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Sin restricción" ; > ;
+ < "Ninguno" ; > ;
+ < "Ordenador" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Illimité" ; > ;
+ < "Aucun(e)" ; > ;
+ < "Ordinateur" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Onbeperkt" ; > ;
+ < "Geen" ; > ;
+ < "Host" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Sem restrições" ; > ;
+ < "Nenhum" ; > ;
+ < "Host" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ûÓÐÏÞÖƵÄ" ; > ;
+ < "ÎÞ" ; > ;
+ < "¼ÆËã»ú" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Íåîãðàíè÷åííûé" ; > ;
+ < "Áåç" ; > ;
+ < "Êîìïüþòåð" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Nieograniczony" ; > ;
+ < "Brak" ; > ;
+ < "Host" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "§ŒÀ‚È‚µ" ; > ;
+ < "‚È‚µ" ; > ;
+ < "νÄ" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¨S¦³­­¨îªº" ; > ;
+ < "µL" ; > ;
+ < "¹q¸£" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÈÏæä ÞíÏ" ; > ;
+ < "ÈÏæä" ; > ;
+ < "ÇáãÖíÝ" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "Áðåñéüñéóôá" ; > ;
+ < "ÊáíÝíá" ; > ;
+ < "ÕðïëïãéóôÞò" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "¹«Á¦ÇÑ" ; > ;
+ < "¾øÀ½" ; > ;
+ < "È£½ºÆ®" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Sýnýrlamasýz" ; > ;
+ < "Hiçbiri" ; > ;
+ < "Ana bilgisayar" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ };
+ };
+ FixedText FT_CLASSPATH
+ {
+ Pos = MAP_APPFONT ( GB_JAVA_X + 6 , GB_JAVA_Y + 52 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;
+ Text = "~ClassPath" ;
+ Text [ English ] = "~ClassPath" ;
+ Text [ english_us ] = "~Class path" ;
+ Text [ italian ] = "~ClassPath" ;
+ Text [ spanish ] = "~Class path" ;
+ Text [ french ] = "~ClassPath" ;
+ Text [ dutch ] = "~ClassPath" ;
+ Text [ swedish ] = "~ClassPath" ;
+ Text [ danish ] = "ClassPath" ;
+ Text [ portuguese_brazilian ] = "~ClassPath" ;
+ Text [ portuguese ] = "~ClassPath" ;
+ Text[ chinese_simplified ] = "~ClassPath";
+ Text[ russian ] = "~Class Path";
+ Text[ polish ] = "ClassPath";
+ Text[ japanese ] = "ClassPath(~C)";
+ Text[ chinese_traditional ] = "~ClassPath";
+ Text[ arabic ] = "Class path~";
+ Text[ greek ] = "~Class path";
+ Text[ korean ] = "Class path(~C)";
+ Text[ turkish ] = "~ClassPath";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_CLASSPATH
+ {
+ Pos = MAP_APPFONT ( GB_JAVA_X + 51 , GB_JAVA_Y + 51 ) ;
+ Size = MAP_APPFONT ( 97 , 12 ) ;
+ Border = TRUE ;
+ };
+ PushButton PB_CLASSPATH
+ {
+ Pos = MAP_APPFONT ( GB_JAVA_X + 151 , GB_JAVA_Y + 50 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ Text = "~...";
+ };
+
+ #define GB_EXECUTE_X 183
+ #define GB_EXECUTE_Y 2
+
+ GroupBox GB_EXECUTE
+ {
+ Pos = MAP_APPFONT ( GB_EXECUTE_X , GB_EXECUTE_Y ) ;
+ Size = MAP_APPFONT ( 71 , 33 ) ;
+ Text = "PlugIns" ;
+ Text [ English ] = "PlugIns" ;
+ Text [ english_us ] = "Plug-Ins" ;
+ Text [ portuguese_brazilian ] = "Ausführen" ;
+ Text [ swedish ] = "Plug-ins" ;
+ Text [ danish ] = "PlugIns" ;
+ Text [ italian ] = "PlugIns" ;
+ Text [ spanish ] = "Plug-ins" ;
+ Text [ french ] = "Plug-Ins" ;
+ Text [ dutch ] = "PlugIns" ;
+ Text [ portuguese ] = "PlugIns" ;
+ Text[ chinese_simplified ] = "Plug-Ins";
+ Text[ russian ] = "Plug-Ins";
+ Text[ polish ] = "Dodatki PlugIns";
+ Text[ japanese ] = "Ìß׸޲Ý";
+ Text[ chinese_traditional ] = "Plug-Ins";
+ Text[ arabic ] = "Plug-Ins";
+ Text[ greek ] = "Plug-Ins";
+ Text[ korean ] = "Ç÷¯±×ÀÎ";
+ Text[ turkish ] = "Plug-In";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_EXECUTE_PLUGINS
+ {
+ Pos = MAP_APPFONT ( GB_EXECUTE_X + 6 , GB_EXECUTE_Y + 13 ) ;
+ Size = MAP_APPFONT ( 59 , 10 ) ;
+ Text = "f~reischalten" ;
+ Text [ English ] = "~enable" ;
+ Text [ english_us ] = "E~nable" ;
+ Text [ portuguese_brazilian ] = "~Plugins" ;
+ Text [ swedish ] = "f~rige" ;
+ Text [ danish ] = "aktiver" ;
+ Text [ italian ] = "Abilita" ;
+ Text [ spanish ] = "Va~lidar" ;
+ Text [ french ] = "~Valider" ;
+ Text [ dutch ] = "V~rijgeven" ;
+ Text [ portuguese ] = "~Activar" ;
+ Text[ chinese_simplified ] = "¿ª·Å(~E)";
+ Text[ russian ] = "ðàçáëîêèðîâàòü";
+ Text[ polish ] = "Aktywacja";
+ Text[ japanese ] = "Žg—p‚·‚é(~E)";
+ Text[ chinese_traditional ] = "¶}©ñ(~E)";
+ Text[ arabic ] = "ÇáÊÔÛíá";
+ Text[ greek ] = "åíåñãïðïßçóç";
+ Text[ korean ] = "»ç¿ë °¡´É(~N)";
+ Text[ turkish ] = "Etkinleþtir";
+ Text[ language_user1 ] = " ";
+ };
+
+ #define GB_EXECUTE_APPLETS_X 183
+ #define GB_EXECUTE_APPLETS_Y 39
+
+ GroupBox GB_EXECUTE_APPLETS
+ {
+ Pos = MAP_APPFONT ( GB_EXECUTE_APPLETS_X , GB_EXECUTE_APPLETS_Y ) ;
+ Size = MAP_APPFONT ( 71 , 33 ) ;
+ Text = "Applets" ;
+ Text [ English ] = "Applets" ;
+ Text [ english_us ] = "Applets" ;
+ Text[ portuguese ] = "Applets";
+ Text[ russian ] = "Àïïëåòû";
+ Text[ dutch ] = "Applets";
+ Text[ french ] = "Applets";
+ Text[ spanish ] = "Applets";
+ Text[ italian ] = "Applets";
+ Text[ danish ] = "Applets";
+ Text[ swedish ] = "Applets";
+ Text[ polish ] = "Aplety";
+ Text[ portuguese_brazilian ] = "Applets";
+ Text[ japanese ] = "±ÌßÚ¯Ä";
+ Text[ chinese_simplified ] = "Applets";
+ Text[ chinese_traditional ] = "Applets";
+ Text[ arabic ] = "ÊØÈíÞÇÊ ÕÛíÑÉ";
+ Text[ greek ] = "Applets";
+ Text[ korean ] = "¾ÖÇø´";
+ Text[ turkish ] = "Applet'ler";
+ Text[ language_user1 ] = " ";
+ };
+
+ CheckBox CB_EXECUTE_APPLETS
+ {
+ Pos = MAP_APPFONT ( GB_EXECUTE_APPLETS_X + 6 , GB_EXECUTE_APPLETS_Y + 13 ) ;
+ Size = MAP_APPFONT ( 59 , 10 ) ;
+ Text = "freisch~alten" ;
+ Text [ English ] = "~enable" ;
+ Text [ english_us ] = "Enab~le" ;
+ Text[ portuguese ] = "~validar";
+ Text[ russian ] = "~Ñíÿòü áëîêèðîâêó";
+ Text[ dutch ] = "~vrijgeven";
+ Text[ french ] = "Valider";
+ Text[ spanish ] = "V~alidar";
+ Text[ italian ] = "Abilita";
+ Text[ danish ] = "aktiver";
+ Text[ swedish ] = "fr~ige";
+ Text[ polish ] = "Akty~wacja";
+ Text[ portuguese_brazilian ] = "~Enable";
+ Text[ japanese ] = "Žg—p‚·‚é";
+ Text[ chinese_simplified ] = "¿ª·Å";
+ Text[ chinese_traditional ] = "¿E¬¡";
+ Text[ arabic ] = "ÇáÊÔÛíá";
+ Text[ greek ] = "åíåñãïðïßçóç";
+ Text[ korean ] = "»ç¿ë °¡´É(~L)";
+ Text[ turkish ] = "Etkinleþtir";
+ Text[ language_user1 ] = " ";
+ };
+
+ #define GB_HOMEPAGE_X 6
+ #define GB_HOMEPAGE_Y 76
+
+ GroupBox GB_HOMEPAGE
+ {
+ Pos = MAP_APPFONT ( GB_HOMEPAGE_X , GB_HOMEPAGE_Y ) ;
+ Size = MAP_APPFONT ( 248 , 26 ) ;
+ Text = "Homepage" ;
+ Text [ English ] = "Homepage" ;
+ Text [ english_us ] = "Homepage" ;
+ Text [ italian ] = "Homepage" ;
+ Text [ spanish ] = "Página principal" ;
+ Text [ french ] = "Page d'accueil" ;
+ Text [ dutch ] = "Homepage" ;
+ Text [ swedish ] = "Hemsida" ;
+ Text [ danish ] = "Hjemmeside" ;
+ Text [ portuguese_brazilian ] = "Homepage" ;
+ Text [ portuguese ] = "Homepage" ;
+ Text[ chinese_simplified ] = "Ö÷Ò³";
+ Text[ russian ] = "Íà÷àëüíàÿ ñòðàíèöà";
+ Text[ polish ] = "Strona macierzysta";
+ Text[ japanese ] = "ΰÑÍß°¼Þ";
+ Text[ chinese_traditional ] = "¥Dºô­¶";
+ Text[ arabic ] = "ÕÝÍÉ ÇáÈÏÁ";
+ Text[ greek ] = "ÊåíôñéêÞ óåëßäá";
+ Text[ korean ] = "ȨÆäÀÌÁö";
+ Text[ turkish ] = "Web sayfasý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_HOMEPAGE
+ {
+ Pos = MAP_APPFONT ( GB_HOMEPAGE_X + 6 , GB_HOMEPAGE_Y + 11 ) ;
+ Size = MAP_APPFONT ( 21 , 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[ arabic ] = "URL~";
+ Text[ greek ] = "URL";
+ Text[ korean ] = "URL(~U)";
+ Text[ turkish ] = "~URL";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_HOMEPAGE
+ {
+ Pos = MAP_APPFONT ( GB_HOMEPAGE_X + 30 , GB_HOMEPAGE_Y + 10 ) ;
+ Size = MAP_APPFONT ( 212 , 12 ) ;
+ Border = TRUE ;
+ };
+
+ #define GB_USERAGENT_X 6
+ #define GB_USERAGENT_Y 104
+
+ GroupBox GB_USERAGENT
+ {
+ Pos = MAP_APPFONT ( GB_USERAGENT_X , GB_USERAGENT_Y ) ;
+ Size = MAP_APPFONT ( 248 , 27 ) ;
+ Text = "Identifizierung des Browsers" ;
+ Text [ English ] = "UserAgent" ;
+ Text [ english_us ] = "Browser identification" ;
+ Text [ italian ] = "Identificazione del Browser" ;
+ Text [ spanish ] = "Identificación del Navegador" ;
+ Text [ french ] = "Identification du Browser" ;
+ Text [ dutch ] = "Identificatie van de Browser" ;
+ Text [ swedish ] = "Identifiering av browsern" ;
+ Text [ danish ] = "Browser-identificering" ;
+ Text [ portuguese_brazilian ] = "Identifizierung des Browsers" ;
+ Text [ portuguese ] = "Identificação do Browser" ;
+ Text[ chinese_simplified ] = "ä¯ÀÀÆ÷µÄ±êʶ";
+ Text[ russian ] = "Èäåíòèôèêàöèÿ áðàóçåðà";
+ Text[ polish ] = "Identyfikacja przegl¹darki";
+ Text[ japanese ] = "ÌÞ׳»Þ‚ÌŠm”F";
+ Text[ chinese_traditional ] = "ÂsÄý¾¹ªº¼ÐÃÑ";
+ Text[ arabic ] = "ÊÚÑíÝ ÇáãÊÕÝÍ";
+ Text[ greek ] = "Áíáãíþñéóç ðñïãñÜììáôïò áíÜãíùóçò éóôïóåëßäùí";
+ Text[ korean ] = "ºê¶ó¿ìÀú È®ÀÎ";
+ Text[ turkish ] = "Web tarayýcýsý tanýtýmý";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_USERAGENT
+ {
+ Pos = MAP_APPFONT ( GB_USERAGENT_X + 6 , GB_USERAGENT_Y + 12 ) ;
+ Size = MAP_APPFONT ( 21 , 10 ) ;
+ Text = "Nam~e" ;
+ Text [ English ] = "Nam~e" ;
+ Text [ english_us ] = "~Name" ;
+ Text [ italian ] = "Nome" ;
+ Text [ spanish ] = "N~ombre" ;
+ Text [ french ] = "~Nom" ;
+ Text [ dutch ] = "~Naam" ;
+ Text [ swedish ] = "~Namn" ;
+ Text [ danish ] = "Navn" ;
+ Text [ portuguese_brazilian ] = "Nam~e" ;
+ Text [ portuguese ] = "~Nome" ;
+ 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_USERAGENT
+ {
+ Pos = MAP_APPFONT ( GB_USERAGENT_X + 30 , GB_USERAGENT_Y + 11 ) ;
+ Size = MAP_APPFONT ( 160 , 12 ) ;
+ Border = TRUE ;
+ };
+ PushButton PB_USERAGENT
+ {
+ Pos = MAP_APPFONT ( GB_USERAGENT_X + 194 , GB_USERAGENT_Y + 10 ) ;
+ Size = MAP_APPFONT ( 48 , 14 ) ;
+ Text = "~Standard" ;
+ Text [ English ] = "~Default" ;
+ Text [ english_us ] = "~Default" ;
+ Text [ portuguese_brazilian ] = "~Standard" ;
+ Text [ swedish ] = "~Standard" ;
+ Text [ danish ] = "Standard" ;
+ Text [ italian ] = "~Standard" ;
+ Text [ spanish ] = "~Predeterminado" ;
+ Text [ french ] = "Par ~défaut" ;
+ Text [ dutch ] = "~Standaard" ;
+ Text [ portuguese ] = "~Padrão" ;
+ Text[ chinese_simplified ] = "±ê×¼(~D)";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ polish ] = "Domyœlnie";
+ Text[ japanese ] = "•W€(~D)";
+ Text[ chinese_traditional ] = "¼Ð·Ç(~D)";
+ Text[ arabic ] = "ÇÝÊÑÇÖí";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "񃧯(~D)";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ turkish ] = "Diðer";
+ Text[ language_user1 ] = " ";
+};
+/************************************************************************/
+/* */
+/* Protokolle */
+/* */
+/************************************************************************/
+TabPage RID_SVXPAGE_INET_OTHER
+{
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Protokolle" ;
+ Text [ English ] = "Protocols" ;
+ Text [ portuguese ] = "Protocolos" ;
+ Text [ english_us ] = "Protocol" ;
+ Text [ portuguese_brazilian ] = "Sonstiges" ;
+ Text [ swedish ] = "Protokoll" ;
+ Text [ danish ] = "Protokoller" ;
+ Text [ italian ] = "Protocolli" ;
+ Text [ spanish ] = "Protocolos" ;
+ Text [ french ] = "Protocoles" ;
+ Text [ dutch ] = "Protocollen" ;
+ Text[ chinese_simplified ] = "ЭÒé";
+ Text[ russian ] = "Ïðîòîêîëû";
+ Text[ polish ] = "Protoko³y";
+ Text[ japanese ] = "ÌßÛĺÙ";
+ Text[ chinese_traditional ] = "¨óij";
+ GroupBox GB_HTTP
+ {
+ Pos = MAP_APPFONT( 6, 3 );
+ Size = MAP_APPFONT( 248, 27 );
+ Text = "HTTP" ;
+ Text [ English ] = "HTTP" ;
+ Text [ english_us ] = "HTTP" ;
+ Text [ portuguese_brazilian ] = "HTTP" ;
+ Text [ swedish ] = "HTTP" ;
+ Text [ danish ] = "HTTP" ;
+ Text [ italian ] = "HTTP" ;
+ Text [ spanish ] = "HTTP" ;
+ Text [ french ] = "HTTP" ;
+ Text [ dutch ] = "HTTP" ;
+ Text [ portuguese ] = "HTTP" ;
+ Text[ chinese_simplified ] = "HTTP";
+ Text[ russian ] = "HTTP";
+ Text[ polish ] = "HTTP";
+ Text[ japanese ] = "HTTP";
+ Text[ chinese_traditional ] = "HTTP";
+ Text[ arabic ] = "HTTP";
+ Text[ greek ] = "HTTP";
+ Text[ korean ] = "HTTP";
+ Text[ turkish ] = "HTTP";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MAXHTTPCONN
+ {
+ Pos = MAP_APPFONT( 12, 14 );
+ Size = MAP_APPFONT( 75, 10 );
+ Text = "~Verbindungsanzahl" ;
+ Text [ English ] = "No of connections" ;
+ Text [ dutch ] = "Aantal ~verbindingen" ;
+ Text [ english_us ] = "~Number of connections" ;
+ Text [ italian ] = "Nu~mero di collegamenti" ;
+ Text [ spanish ] = "Número de ~conexiones" ;
+ Text [ french ] = "~Nombre de connexions" ;
+ Text [ swedish ] = "Antal ~förbindelser" ;
+ Text [ danish ] = "Antal forbindelser" ;
+ Text [ portuguese_brazilian ] = "H~TTP" ;
+ Text [ portuguese ] = "~Número de ligações" ;
+ Text[ chinese_simplified ] = "Á¬½Ó´ÎÊý(~N)";
+ Text[ russian ] = "Êîëè÷åñòâî ïîäêëþ÷åíèé";
+ Text[ polish ] = "Liczba p~o³¹czeñ";
+ Text[ japanese ] = "Ú‘±”(~N)";
+ Text[ chinese_traditional ] = "³s½u¦¸¼Æ(~N)";
+ Text[ arabic ] = "ÚÏÏ ÇáÇÊÕÇáÇÊ";
+ Text[ greek ] = "Áñéèìüò óõíäÝóåùí";
+ Text[ korean ] = "¿¬°á ¼ö(~N)";
+ Text[ turkish ] = "Baðlantý sayýsý";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NF_MAXHTTPCONN
+ {
+ Pos = MAP_APPFONT( 90, 13 );
+ Size = MAP_APPFONT( 27, 12 );
+ Border = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 50 ;
+ StrictFormat = TRUE ;
+ First = 1 ;
+ Last = 25 ;
+ SpinSize = 1 ;
+ };
+ CheckBox CB_EMAIL
+ {
+ Pos = MAP_APPFONT( 123, 14 );
+ Size = MAP_APPFONT( 125, 10 );
+ Text = "~E-Mail Adresse mitschicken" ;
+ Text [ English ] = "~Send along" ;
+ Text [ portuguese ] = "~Incluir endereço electr." ;
+ Text [ english_us ] = "~Include e-mail address" ;
+ Text [ portuguese_brazilian ] = "~mitschicken" ;
+ Text [ swedish ] = "skicka med ~e-postadress" ;
+ Text [ danish ] = "Inkluder e-mail-adresse" ;
+ Text [ italian ] = "Invia anche indirizzo ~eMail" ;
+ Text [ spanish ] = "con dirección ~electrónica" ;
+ Text [ french ] = "~Joindre l'adresse e-mail" ;
+ Text [ dutch ] = "~E-mail adres meesturen" ;
+ Text[ chinese_simplified ] = "ͬʱ¼Ä·¢µç×ÓÓʼþµØÖ·(~I)";
+ Text[ russian ] = "Îòïðàâèòü òàêæå àäðåñ ýë. ïî÷òû";
+ Text[ polish ] = "Wyœlij z adresem e-mail";
+ Text[ japanese ] = "E-mail ±ÄÞÚ½‚ð“Y‚¦‚Ä‘—M(~I)";
+ Text[ chinese_traditional ] = "¥[¤J¹q¤l¶l¥ó¦a§}(~I)";
+ Text[ arabic ] = "ÊÖãíä ÚäæÇä ÇáÈÑíÏ ÇáÅáßÊÑæäí";
+ Text[ greek ] = "ÁðïóôïëÞ ìáæß ìå ôç äéåýèõíóç ~Å-mail";
+ Text[ korean ] = "E-mail ÁÖ¼Òµµ ÇÔ²² º¸³¿(~I)";
+ Text[ turkish ] = "E-posta adresini ekle";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_FTP
+ {
+ Pos = MAP_APPFONT( 6, 34 );
+ Size = MAP_APPFONT( 248, 27 );
+ Text = "FTP" ;
+ Text [ English ] = "FTP" ;
+ Text [ english_us ] = "FTP" ;
+ Text [ portuguese_brazilian ] = "FTP" ;
+ Text [ swedish ] = "FTP" ;
+ Text [ danish ] = "FTP" ;
+ Text [ italian ] = "FTP" ;
+ Text [ spanish ] = "FTP" ;
+ Text [ french ] = "FTP" ;
+ Text [ dutch ] = "FTP" ;
+ Text [ portuguese ] = "FTP" ;
+ Text[ chinese_simplified ] = "FTP";
+ Text[ russian ] = "FTP";
+ Text[ polish ] = "FTP";
+ Text[ japanese ] = "FTP";
+ Text[ chinese_traditional ] = "FTP";
+ Text[ arabic ] = "FTP";
+ Text[ greek ] = "FTP";
+ Text[ korean ] = "FTP";
+ Text[ turkish ] = "FTP";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_MAXFTPCONN
+ {
+ Pos = MAP_APPFONT( 12, 45 );
+ Size = MAP_APPFONT( 75, 10 );
+ Text = "Verbindungsan~zahl" ;
+ Text [ English ] = "No of connections" ;
+ Text [ dutch ] = "Aa~ntal verbindingen" ;
+ Text [ english_us ] = "~Number of connections" ;
+ Text [ italian ] = "~Numero di collegamenti" ;
+ Text [ spanish ] = "Número de c~onexiones" ;
+ Text [ french ] = "Nombre de ~connexions" ;
+ Text [ swedish ] = "A~ntal förbindelser" ;
+ Text [ danish ] = "Antal forbindelser" ;
+ Text [ portuguese_brazilian ] = "~FTP" ;
+ Text [ portuguese ] = "~Número de ligações" ;
+ Text[ chinese_simplified ] = "Á¬½Ó´ÎÊý(~N)";
+ Text[ russian ] = "Êîëè÷åñòâî ïîäêëþ÷åíèé";
+ Text[ polish ] = "Liczba p~o³¹czeñ";
+ Text[ japanese ] = "Ú‘±”(~N)";
+ Text[ chinese_traditional ] = "³s½u¦¸¼Æ(~N)";
+ Text[ arabic ] = "ÚÏÏ ÇáÇÊÕÇáÇÊ";
+ Text[ greek ] = "Áñéèìüò óõíäÝóåùí";
+ Text[ korean ] = "¿¬°á ¼ö(~N)";
+ Text[ turkish ] = "Baðlantý sayýsý";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NF_MAXFTPCONN
+ {
+ Pos = MAP_APPFONT( 90, 44 );
+ Size = MAP_APPFONT( 27, 12 );
+ Border = TRUE ;
+ Right = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 50 ;
+ StrictFormat = TRUE ;
+ First = 1 ;
+ Last = 25 ;
+ SpinSize = 1 ;
+ };
+ GroupBox GB_DNS
+ {
+ Pos = MAP_APPFONT( 6, 65 );
+ Size = MAP_APPFONT( 248, 39 );
+ Text = "DNS Server" ;
+ Text [ English ] = "DNS Server" ;
+ Text [ english_us ] = "DNS server" ;
+ Text [ italian ] = "Server DNS" ;
+ Text [ spanish ] = "Servidor DNS" ;
+ Text [ french ] = "Serveur DNS" ;
+ Text [ dutch ] = "DNS server" ;
+ Text [ swedish ] = "DNS-server" ;
+ Text [ danish ] = "DNS server" ;
+ Text [ portuguese_brazilian ] = "DNS Server" ;
+ Text [ portuguese ] = "Servidor DNS" ;
+ Text[ chinese_simplified ] = "DNS ·þÎñÆ÷";
+ Text[ russian ] = "Ñåðâåð DNS";
+ Text[ polish ] = "Serwer DNS";
+ Text[ japanese ] = "DNS »°ÊÞ°";
+ Text[ chinese_traditional ] = "DNS ¦øªA¾¹";
+ Text[ arabic ] = "ãÒæøÏ DNS";
+ Text[ greek ] = "ÄéáêïìéóôÞò DNS";
+ Text[ korean ] = "DNS ¼­¹ö";
+ Text[ turkish ] = "DNS sunucusu";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_DNS_AUTO
+ {
+ Pos = MAP_APPFONT( 12, 75 );
+ Size = MAP_APPFONT( 236, 10 );
+ Text = "~Automatisch" ;
+ Text [ English ] = "~Auto" ;
+ Text [ english_us ] = "Aut~omatic" ;
+ Text [ italian ] = "~Automatico" ;
+ Text [ spanish ] = "~Automático" ;
+ Text [ french ] = "~Automatique" ;
+ Text [ dutch ] = "~Automatisch" ;
+ Text [ swedish ] = "~Automatisk" ;
+ Text [ danish ] = "Automatisk" ;
+ Text [ portuguese_brazilian ] = "~Auto" ;
+ Text [ portuguese ] = "~Automático" ;
+ Text[ chinese_simplified ] = "×Ô¶¯(~O)";
+ Text[ russian ] = "Àâòîìàòè÷åñêè";
+ Text[ polish ] = "Automatycznie";
+ Text[ japanese ] = "Ž©“®(~O)";
+ Text[ chinese_traditional ] = "¦Û°Ê(~O)";
+ Text[ arabic ] = "ÊáÞÇÆí";
+ Text[ greek ] = "Áõôüìáôá";
+ Text[ korean ] = "ÀÚµ¿(~O)";
+ Text[ turkish ] = "Otomatik";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_DNS_MANUAL
+ {
+ Pos = MAP_APPFONT( 12, 88 );
+ Size = MAP_APPFONT( 75, 10 );
+ Text = "~Manuell" ;
+ Text [ English ] = "~Manual" ;
+ Text [ english_us ] = "~Manual" ;
+ Text [ italian ] = "Manuale" ;
+ Text [ spanish ] = "~Manual" ;
+ Text [ french ] = "~Manuel" ;
+ Text [ dutch ] = "~Handmatig" ;
+ Text [ swedish ] = "~Manuell" ;
+ Text [ danish ] = "Manuel" ;
+ Text [ portuguese_brazilian ] = "~Manuell" ;
+ Text [ portuguese ] = "~Manual" ;
+ Text[ chinese_simplified ] = "ÊÖ¹¤(~M)";
+ Text[ russian ] = "Âðó÷íóþ";
+ Text[ polish ] = "Rêcznie";
+ Text[ japanese ] = "Žè“®(~M)";
+ Text[ chinese_traditional ] = "¤â¤u(~M)";
+ Text[ arabic ] = "íÏæí";
+ Text[ greek ] = "×åéñïêßíçôá";
+ Text[ korean ] = "¼öµ¿(~M)";
+ Text[ turkish ] = "Manüel";
+ Text[ language_user1 ] = " ";
+ };
+ PatternField ED_DNS
+ {
+ Pos = MAP_APPFONT( 90, 87 );
+ Size = MAP_APPFONT( 66, 12 );
+ Border = TRUE ;
+ LiteralMask = " . . . " ;
+ EditMask = "nnnLnnnLnnnLnnn" ;
+ StrictFormat = TRUE ;
+ };
+ GroupBox GB_STD_BROWSER
+ {
+ Pos = MAP_APPFONT( 6, 108 );
+ Size = MAP_APPFONT( 248, 24 );
+ Text = "Standard";
+ Text [English] = "Standard";
+ Text[ english_us ] = "Default";
+ Text[ portuguese ] = "Padrão";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ dutch ] = "Standaard";
+ Text[ french ] = "Par défaut";
+ Text[ spanish ] = "Predeterminado";
+ Text[ italian ] = "Standard";
+ Text[ danish ] = "Standard";
+ Text[ swedish ] = "Standard";
+ Text[ polish ] = "Standard";
+ Text[ portuguese_brazilian ] = "Standard";
+ Text[ japanese ] = "•W€";
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ chinese_traditional ] = "¼Ð­ã";
+ Text[ arabic ] = "ÞíÇÓí";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "񃧯";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_STD_BROWSER
+ {
+ Pos = MAP_APPFONT( 12, 118 );
+ Size = MAP_APPFONT( 236, 10 );
+ Text = "~Beim Programmstart prüfen, ob StarOffice Standardbrowser ist";
+ Text[English] = "~Beim Programmstart prüfen, ob StarOffice Standardbrowser ist";
+ Text[ english_us ] = "Check if StarOffice is the default browser";
+ Text[ portuguese ] = "Ao ~iniciar o programa, verificar se o StarOffice é o browser padrão";
+ Text[ russian ] = "Ïðîâåðêà ïðè çàïóñêå ïðîãðàììû, ÿâëÿåòñÿ ëè StarOffice ñòàíäàðòí. áðàóçåðîì";
+ Text[ dutch ] = "~Controleer bij het starten van het programma of StarOffice als standaardbrowser fungeert";
+ Text[ french ] = "Lors du démarrage du programme, vérifier si StarOffice est le Browser par défaut";
+ Text[ spanish ] = "~Al iniciar el programa, comprobar si StarOffice es el navegador estándar.";
+ Text[ italian ] = "Verifica all'avvio che StarOffice sia il browser predefinito";
+ Text[ danish ] = "Kontroller ved programstart, om StarOffice er standardbrowser";
+ Text[ swedish ] = "Kontrollera vid programstarten om StarOffice är ~standardbrowser";
+ Text[ polish ] = "SprawdŸ przy uruchamianiu programu, czy StarOffice jest standardow¹ przegl¹dark¹";
+ Text[ portuguese_brazilian ] = "A~uf StarOffice als Standardbrowser überprüfen";
+ Text[ japanese ] = "ÌßÛ¸Þ×Ñ‚Ì‹N“®Žž‚É StarOffice ‚ð•W€ÌÞ׳»Þ‚Æ‚·‚é‚©Šm”F";
+ Text[ chinese_simplified ] = "ÔÚÆô¶¯³ÌÐòʱ¼ì²éStarOfficeÊÇ·ñÉ趨³ÉĬÈÏä¯ÀÀÆ÷";
+ Text[ chinese_traditional ] = "¦b±Ò°Ê®ÉÀˬdStarOffice¬O§_³]©w¦¨Àq»{ÂsÄý¾¹";
+ Text[ arabic ] = "ÚäÏ ÈÏÁ ÇáÈÑäÇãÌ¡ ÇáÊÃßÏ ããÇ ÅÐÇ ßÇä StarOffice åæ ÇáãÊÕÝÍ ÇáÇÝÊÑÇÖí";
+ Text[ greek ] = "¸ëå~ã÷ïò óôçí åêêßíçóç ôïõ ðñïãñÜììáôïò áí ôï StarOffice åßíáé ôï ðñïåðéëåãìÝíï ðñüãñ. áíÜãíùóçò éóôïóåëßäùí";
+ Text[ korean ] = "ÇÁ·Î±×·¥ ½ÃÀ۽à StarOffice°¡ ±âº» ºê¶ó¿ìÀúÀÎÁö °Ë»ç";
+ Text[ turkish ] = "Prog. baþlatýldýðýnda, StarOffice'in stand. Web tarayýcýsý olup olmadýðýný kontrol et";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_MSG_255_0
+ {
+ Text = " ist kein gültiger Eintrag für dieses Feld. Bitte geben sie einen Wert zwischen 0 und 255 an." ;
+ Text [ English ] = " is not a valid entry for this field. Please specify a value between 0 and 255." ;
+ Text [ english_us ] = "is not a valid entry for this field. Please specify a value between 0 and 255." ;
+ Text [ portuguese_brazilian ] = "ist kein gültiger Eintrag für dieses Feld. Bitte geben sie einen Wert zwischen 0 und 255 an." ;
+ Text [ swedish ] = "är ingen giltig inmatning för detta fält. Var vänlig och mata in ett värde mellan 0 och 255." ;
+ Text [ danish ] = "er intet gyldigt input til dette felt. Angiv venligst en værdi mellem 0 og 255." ;
+ Text [ italian ] = "non è un valore valido per questo campo. Digitare un valore compreso tra 0 e 255." ;
+ Text [ spanish ] = "no es una entrada válida para este campo. Por favor escriba un valor entre 0 y 255." ;
+ Text [ french ] = "ne répond pas aux critères fixés pour ce champ. Vous devez saisir une valeur comprise entre 0 et 255." ;
+ Text [ dutch ] = "is geen geldig item voor dit veld. Geef een waarde tussen 1 en 255 aan." ;
+ Text [ portuguese ] = "não é uma entrada válida para este campo. Indique um valor entre 0 e 255." ;
+ Text[ chinese_simplified ] = "ÊÇÕâ¸ö×ֶεÄÎÞЧÌõÄ¿£¬ÇëÄúÊäÈëÒ»¸öÔÚ 0 ºÍ 255 Ö®¼äµÄÊýÖµ¡£";
+ Text[ russian ] = "íåïðàâèëüíàÿ çàïèñü äëÿ ýòîãî ïîëÿ. Ââåäèòå. ïîæàëóéñòà, çíà÷åíèå ìåæäó 0 è 255.";
+ Text[ polish ] = "jest nieprawid³owym wpisem dla tego pola. Proszê podaæ wartoœæ miêdzy 0 a 255.";
+ Text[ japanese ] = "‚±‚Į̀°ÙÄÞ‚É–³Œø‚È“ü—Í‚Å‚·B0‚Æ255‚ÌŠÔ‚Ì”’l‚ð“ü—Í‚µ‚ĉº‚³‚¢B";
+ Text[ chinese_traditional ] = "¬O³o­ÓÄæ¦ìªºµL®Ä¶µ¥Ø¡M½Ð±z¦b¿é¤J¤@­Ó¦b0©M255¤§¶¡ªº¼Æ­È¡C";
+ Text[ arabic ] = "åæ ÅÏÎÇá ÛíÑ ÕÇáÍ áåÐÇ ÇáÍÞá. ÇáÑÌÇÁ ÅÏÎÇá ÞíãÉ ÊÊÑÇæÍ Èíä 0 æ 255.";
+ Text[ greek ] = "äåí åßíáé Ýãêõñç åéóáãùãÞ ãéá áõôü ôï ðåäßï. Ðáñáêáëþ åéóÜãåôå ìéá ôéìÞ ìåôáîý 0 êáé 255.";
+ Text[ korean ] = "ÀÌ Çʵ忡 À¯È¿ÇÏÁö ¾ÊÀº Ç׸ñÀÔ´Ï´Ù. 0°ú 255 »çÀÌÀÇ °ªÀ» ÁöÁ¤ÇϽʽÿÀ.";
+ Text[ turkish ] = "bu alan için geçerli bir deðer deðil. 0 ile 255 arasýnda bir deðer girin.";
+ Text[ language_user1 ] = " ";
+ };
+ String ST_MSG_255_1
+ {
+ Text = " ist kein gültiger Eintrag für dieses Feld. Bitte geben sie einen Wert zwischen 1 und 255 an." ;
+ Text [ English ] = " is not a valid entry for this field. Please specify a value between 1 and 255." ;
+ Text [ english_us ] = "is not a valid entry for this field. Please specify a value between 1 and 255." ;
+ Text [ portuguese_brazilian ] = "ist kein gültiger Eintrag für dieses Feld. Bitte geben sie einen Wert zwischen 1 und 255 an." ;
+ Text [ swedish ] = "är ingen giltig inmatning för detta fält. Var vänlig och mata in ett värde mellan 1 och 255." ;
+ Text [ danish ] = "er intet gyldigt input til dette felt. Angiv venligst en værdi mellem 1 og 255." ;
+ Text [ italian ] = "non è un valore valido per questo campo. Digitare un valore compreso tra 0 e 255." ;
+ Text [ spanish ] = "no es una entrada válida para este campo. Por favor escriba un valor entre 1 y 255." ;
+ Text [ french ] = "ne répond pas aux critères fixés pour ce champ. Vous devez saisir une valeur comprise entre 1 et 255." ;
+ Text [ dutch ] = "is geen geldig item voor dit veld. Geef een waarde tussen 1 en 255 aan." ;
+ Text [ portuguese ] = "não é uma entrada válida para este campo. Indique um valor entre 1 e 255." ;
+ Text[ chinese_simplified ] = "ÊÇÕâ¸ö×ֶεÄÎÞЧÌõÄ¿£¬ÇëÄúÊäÈëÒ»¸öÔÚ 1 ºÍ 255 Ö®¼äµÄÊýÖµ¡£";
+ Text[ russian ] = "íåïðàâèëüíàÿ çàïèñü äëÿ ýòîãî ïîëÿ. Ââåäèòå, ïîæàëóéñòà, çíà÷åíèå ìåæäó 1 è 255.";
+ Text[ polish ] = "jest nieprawid³owym wpisem dla tego pola. Proszê wpisaæ wartoœæ miêdzy 1 a 255 .";
+ Text[ japanese ] = "‚±‚Į̀°ÙÄÞ‚É–³Œø‚È“ü—Í‚Å‚·B1‚Æ255‚ÌŠÔ‚Ì”’l‚ð“ü—Í‚µ‚ĉº‚³‚¢B";
+ Text[ chinese_traditional ] = "¬O³o­ÓÄæ¦ìªºµL®Ä¶µ¥Ø¡M½Ð±z¦b¿é¤J¤@­Ó¦b1©M255¤§¶¡ªº¼Æ­È¡C";
+ Text[ arabic ] = "åæ ÅÏÎÇá ÛíÑ ÕÇáÍ áåÐÇ ÇáÍÞá. ÇáÑÌÇÁ ÅÏÎÇá ÞíãÉ ÊÊÑÇæÍ Èíä 1 æ 255.";
+ Text[ greek ] = "äåí åßíáé Ýãêõñç åéóáãùãÞ ãéá áõôü ôï ðåäßï. Ðáñáêáëþ åéóÜãåôå ìéá ôéìÞ ìåôáîý 0 êáé 255.";
+ Text[ korean ] = "ÀÌ Çʵ忡 À¯È¿ÇÏÁö ¾ÊÀº Ç׸ñÀÔ´Ï´Ù. 1°ú 255 »çÀÌÀÇ °ªÀ» ÁöÁ¤ÇϽʽÿÀ.";
+ Text[ turkish ] = "bu alan için geçerli bir deðer deðil. 1 ile 255 arasýnda bir deðer girin";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ arabic ] = "ÈÑæÊæßæáÇÊ";
+ Text[ greek ] = "Ðñùôüêïëëï";
+ Text[ korean ] = "ÇÁ·ÎÅäÄÝ";
+ Text[ turkish ] = "Protokoller";
+ Text[ language_user1 ] = " ";
+};
+
+/************************************************************************/
+/* */
+/* Scripting */
+/* */
+/************************************************************************/
+TabPage RID_SVXPAGE_INET_SCRIPTING
+{
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Scripting" ;
+ Text [ English ] = "Scripting" ;
+ Text [ portuguese ] = "Scripting" ;
+ Text [ english_us ] = "Scripting" ;
+ Text [ portuguese_brazilian ] = "Scripting" ;
+ Text [ swedish ] = "Scripting" ;
+ Text [ danish ] = "Scripting" ;
+ Text [ italian ] = "Scripting" ;
+ Text [ spanish ] = "Scripting" ;
+ Text [ french ] = "Scripting" ;
+ Text [ dutch ] = "Scripting" ;
+ #define GB_SCRIPT_EXEC_X 6
+ #define GB_SCRIPT_EXEC_Y 3
+ GroupBox GB_SCRIPT_EXEC
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPT_EXEC_X , GB_SCRIPT_EXEC_Y ) ;
+ Size = MAP_APPFONT ( 171 , 126 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Star Basic-Scripts ausführen von : Star Basic-Scripts ausf³hren von */
+ Text = "StarBasic-Scripts ausführen von" ;
+ Text [ English ] = "Execute StarBasic Scripts from" ;
+ Text [ english_us ] = "Execute StarOffice Basic Scripts from" ;
+ Text [ portuguese_brazilian ] = "Star Basic-Scripts ausführen von" ;
+ Text [ swedish ] = "Utför StarOffice Basic-skript från" ;
+ Text [ danish ] = "Udfør StarOffice Basic-scripter fra" ;
+ Text [ italian ] = "Esegui script StarOffice Basic da" ;
+ Text [ spanish ] = "Ejecutar Scripts de StarOffice Basic desde" ;
+ Text [ french ] = "Exécuter les scripts StarOffice Basic de" ;
+ Text [ dutch ] = "StarOffice Basic-scripts uitvoeren van" ;
+ Text [ portuguese ] = "Executar scripts StarOffice Basic a partir de" ;
+ Text[ chinese_simplified ] = "Ö´ÐÐ Star Basic ½Å±¾´Ó";
+ Text[ russian ] = "Âûïîëíèòü Star Basic Scripts èç";
+ Text[ polish ] = "Wykonaj skrypty Star Basic z";
+ Text[ japanese ] = "StarOffice Basic ½¸ØÌßÄ‚ÌŽÀsŒó•â";
+ Text[ chinese_traditional ] = "°õ¦æStar Basic©R¥O½Z±q";
+ Text[ arabic ] = "ÊäÝíÐ StarOffice Basic Scripts ãä";
+ Text[ greek ] = "ÅêôÝëåóç äåóìþí åíÝñãåéáò ôïõ StarOffice Basic áðü";
+ Text[ korean ] = "StarOffice Basic ½ºÅ©¸³Æ® ½ÇÇà";
+ Text[ turkish ] = "StarOffice Basic script'leri þuradan yürüt:";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_SCRIPT_EXEC
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPT_EXEC_X + 6 , GB_SCRIPT_EXEC_Y + 10 ) ;
+ Size = MAP_APPFONT ( 159 , 12 ) ;
+ Border = TRUE ;
+ };
+ ListBox LB_SCRIPT_EXEC
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPT_EXEC_X + 8 , GB_SCRIPT_EXEC_Y + 24 ) ;
+ Size = MAP_APPFONT ( 156 , 77 ) ;
+ Border = TRUE ;
+ Sort = TRUE ;
+ };
+ PushButton PB_SCRIPT_INSERT
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPT_EXEC_X + 8 , GB_SCRIPT_EXEC_Y + 106 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? H~inzufügen : H~inzuf³gen */
+ Text = "H~inzufügen" ;
+ Text [ English ] = "A~dd" ;
+ Text [ english_us ] = "~Add" ;
+ Text [ portuguese_brazilian ] = "H~inzufügen" ;
+ Text [ swedish ] = "Lägg t~ill" ;
+ Text [ danish ] = "Tilføj" ;
+ Text [ italian ] = "~Aggiungi" ;
+ Text [ spanish ] = "~Añadir" ;
+ Text [ french ] = "~Ajouter" ;
+ Text [ dutch ] = "Toe~voegen" ;
+ Text [ portuguese ] = "A~dicionar" ;
+ Text[ chinese_simplified ] = "ÐÂÔö(~A)";
+ Text[ russian ] = "Äîáàâèòü";
+ Text[ polish ] = "Dodaj";
+ Text[ japanese ] = "’ljÁ(~A)";
+ Text[ chinese_traditional ] = "¼W¥[(~A)";
+ Text[ arabic ] = "ÅÖÇÝÉ";
+ Text[ greek ] = "ÐñïóèÞêç";
+ Text[ korean ] = "Ãß°¡(~A)";
+ Text[ turkish ] = "Ekle";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_SCRIPT_DELETE
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPT_EXEC_X + 61 , GB_SCRIPT_EXEC_Y + 106 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ Text [ English ] = "~Delete" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ portuguese_brazilian ] = "~Löschen" ;
+ 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_SCRIPT_DEFAULT
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPT_EXEC_X + 114 , GB_SCRIPT_EXEC_Y + 106 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Standard" ;
+ Text [ English ] = "D~efault" ;
+ Text [ english_us ] = "D~efault" ;
+ Text [ portuguese_brazilian ] = "S~tandard" ;
+ Text [ swedish ] = "S~tandard" ;
+ Text [ danish ] = "Standard" ;
+ Text [ italian ] = "S~tandard" ;
+ Text [ spanish ] = "~Predeterminado" ;
+ Text [ french ] = "Par ~défaut" ;
+ Text [ dutch ] = "~Standaard" ;
+ Text [ portuguese ] = "~Padrão" ;
+ Text[ chinese_simplified ] = "±ê×¼(~E)";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ polish ] = "Domyœlnie";
+ Text[ japanese ] = "•W€(~E)";
+ Text[ chinese_traditional ] = "¼Ð·Ç(~E)";
+ Text[ arabic ] = "ÇÝÊÑÇÖí";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "񃧯(~E)";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+ };
+ #define GB_SCRIPTING_X 181
+ #define GB_SCRIPTING_Y 3
+ GroupBox GB_JAVASCRIPT
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPTING_X , GB_SCRIPTING_Y ) ;
+ Size = MAP_APPFONT ( 73 , 25 ) ;
+ Text = "Javascript" ;
+ Text [ English ] = "Javascript" ;
+ Text [ english_us ] = "JavaScript" ;
+ Text [ portuguese_brazilian ] = "Javascript" ;
+ Text [ swedish ] = "Javascript" ;
+ Text [ danish ] = "JavaScript" ;
+ Text [ italian ] = "JavaScript" ;
+ Text [ spanish ] = "JavaScript" ;
+ Text [ french ] = "JavaScript" ;
+ Text [ dutch ] = "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";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_SCRIPTING_JAVASCRIPT
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPTING_X + 3 , GB_SCRIPTING_Y + 10 ) ;
+ Size = MAP_APPFONT ( 67 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~ausführen : ~ausf³hren */
+ Text = "~ausführen" ;
+ Text [ English ] = "e~xecute" ;
+ Text [ portuguese ] = "~executar" ;
+ Text [ english_us ] = "Ena~ble" ;
+ Text [ portuguese_brazilian ] = "~ausführen" ;
+ Text [ swedish ] = "~utför" ;
+ Text [ danish ] = "udfør" ;
+ Text [ italian ] = "~Esegui" ;
+ Text [ spanish ] = "Eje~cutar" ;
+ Text [ french ] = "~Exécuter" ;
+ Text [ dutch ] = "~uitvoeren" ;
+ Text[ chinese_simplified ] = "Ö´ÐÐ(~B)";
+ Text[ russian ] = "âûïîëíèòü";
+ Text[ polish ] = "Wykonaj";
+ Text[ japanese ] = "ŽÀs‚·‚é(~B)";
+ Text[ chinese_traditional ] = "°õ¦æ(~B)";
+ Text[ arabic ] = "ÊäÝíÐ";
+ Text[ greek ] = "~åêôÝëåóç";
+ Text[ korean ] = "½ÇÇà(~B)";
+ Text[ turkish ] = "Yürüt";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_STARBASIC
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPTING_X , GB_SCRIPTING_Y + 28 ) ;
+ Size = MAP_APPFONT ( 73 , 98 ) ;
+ Text = "StarBasic-Script" ;
+ Text [ English ] = "StarBasic Script" ;
+ Text [ english_us ] = "StarOffice Basic Script" ;
+ Text [ portuguese_brazilian ] = "StarOffice Basic-Script" ;
+ Text [ swedish ] = "StarOffice Basic-skript" ;
+ Text [ danish ] = "StarOffice Basic-Script" ;
+ Text [ italian ] = "Script StarOffice Basic" ;
+ Text [ spanish ] = "Script StarOffice Basic" ;
+ Text [ french ] = "Script StarOffice Basic" ;
+ Text [ dutch ] = "StarOffice Basic-Script" ;
+ Text [ portuguese ] = "StarOffice Basic-Script" ;
+ Text[ chinese_simplified ] = "StarOffice Basic ½Å±¾";
+ Text[ russian ] = "StarOffice Basic Script";
+ Text[ polish ] = "Skrypt StarOffice Basic";
+ Text[ japanese ] = "StarOffice Basic ½¸ØÌßÄ";
+ Text[ chinese_traditional ] = "StarOffice Basic©R¥O½Z";
+ Text[ arabic ] = "StarOffice Basic Script";
+ Text[ greek ] = "StarOffice Basic Script";
+ Text[ korean ] = "StarOffice Basic ½ºÅ©¸³Æ®";
+ Text[ turkish ] = "StarOffice Basic Script";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_STARBASIC_ALWAYS
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPTING_X + 3 , GB_SCRIPTING_Y + 38 ) ;
+ Size = MAP_APPFONT ( 69 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? i~mmer ausführen : i~mmer ausf³hren */
+ Text = "i~mmer ausführen" ;
+ Text [ English ] = "execute ~always" ;
+ Text [ english_us ] = "Always e~xecute" ;
+ Text [ portuguese_brazilian ] = "~immer ausführen" ;
+ Text [ swedish ] = "utför ~alltid" ;
+ Text [ danish ] = "udfør altid" ;
+ Text [ italian ] = "Esegui ~sempre" ;
+ Text [ spanish ] = "Ejecutar s~iempre" ;
+ Text [ french ] = "Toujours ~exécuter" ;
+ Text [ dutch ] = "~altijd uitvoeren" ;
+ Text [ portuguese ] = "~executar sempre" ;
+ Text[ chinese_simplified ] = "×ÜÊÇÖ´ÐÐ(~X)";
+ Text[ russian ] = "Âûïîëíÿòü âñåãäà";
+ Text[ polish ] = "Zawsze wykonuj";
+ Text[ japanese ] = "í‚ÉŽÀs(~X)";
+ Text[ chinese_traditional ] = "Á`¬O°õ¦æ(~X)";
+ Text[ arabic ] = "ÇáÊäÝíÐ ÏÇÆãÇð";
+ Text[ greek ] = "ðÜíôá åêôÝëåóç";
+ Text[ korean ] = "Ç×»ó ¼öÇà(~X)";
+ Text[ turkish ] = "Her zaman yürüt";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_STARBASIC_LIST
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPTING_X + 3 , GB_SCRIPTING_Y + 48 ) ;
+ Size = MAP_APPFONT ( 69 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~gemäß Liste : ~gemõ˜ Liste */
+ Text = "~gemäß Liste" ;
+ Text [ English ] = "like ~list" ;
+ Text [ english_us ] = "~From list" ;
+ Text [ portuguese_brazilian ] = "~gemäß Liste" ;
+ Text [ swedish ] = "enli~gt lista" ;
+ Text [ danish ] = "fra listen" ;
+ Text [ italian ] = "Come da ~lista" ;
+ Text [ spanish ] = "Según ~lista" ;
+ Text [ french ] = "~D'après la liste" ;
+ Text [ dutch ] = "~overeenkomstig lijst" ;
+ Text [ portuguese ] = "~conforme lista" ;
+ Text[ chinese_simplified ] = "°´Áбí(~F)";
+ Text[ russian ] = "Ñîãëàñíî ñïèñêà";
+ Text[ polish ] = "Wed³ug listy";
+ Text[ japanese ] = "ؽĂ©‚ç(~F)";
+ Text[ chinese_traditional ] = "«ö·Ó²M³æ(~F)";
+ Text[ arabic ] = "ÍÓÈ ÇáÞÇÆãÉ";
+ Text[ greek ] = "Óýìöùíá ìå ëßóôá";
+ Text[ korean ] = "¸ñ·Ï¿¡ µû¶ó(~F)";
+ Text[ turkish ] = "Listeye göre";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RBT_STARBASIC_NEVER
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPTING_X + 3 , GB_SCRIPTING_Y + 58 ) ;
+ Size = MAP_APPFONT ( 69 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~nie ausführen : ~nie ausf³hren */
+ Text = "~nie ausführen" ;
+ Text [ English ] = "execute ~never" ;
+ Text [ english_us ] = "~Never execute" ;
+ Text [ portuguese_brazilian ] = "~nie ausführen" ;
+ Text [ swedish ] = "utför al~drig" ;
+ Text [ danish ] = "udfør aldrig" ;
+ Text [ italian ] = "Esegui ~mai" ;
+ Text [ spanish ] = "~No ejecutar nunca" ;
+ Text [ french ] = "Ne ~jamais exécuter" ;
+ Text [ dutch ] = "~nooit uitvoeren" ;
+ Text [ portuguese ] = "~não executar nunca" ;
+ Text[ chinese_simplified ] = "²»Ö´ÐÐ(~N)";
+ Text[ russian ] = "Íèêîãäà";
+ Text[ polish ] = "Nigdy nie wykonuj";
+ Text[ japanese ] = "ŽÀs‚µ‚È‚¢(~N)";
+ Text[ chinese_traditional ] = "¤£°õ¦æ(~N)";
+ Text[ arabic ] = "ÚÏã ÇáÊäÝíÐ äåÇÆíÇð";
+ Text[ greek ] = "íá ìçí åêôåëåóôåß ðïôÝ";
+ Text[ korean ] = "Àý´ë ½ÇÇà¾ÊÀ½(~N)";
+ Text[ turkish ] = "Hiç yürütme";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_STARBASIC_DISCRIPTION_ALWAYS
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPTING_X + 3 , GB_SCRIPTING_Y + 70 ) ;
+ Size = MAP_APPFONT ( 64 , 50 ) ;
+ WordBreak = TRUE ;
+ Hide = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? ACHTUNG: StarBasic-Scripte aus dem Internet werden ohne Überprüfung ausgeführt! : ACHTUNG: StarBasic-Scripte aus dem Internet werden ohne šberpr³fung ausgef³hrt! */
+ Text = "ACHTUNG: StarBasic-Scripte aus dem Internet werden ohne Überprüfung ausgeführt!" ;
+ Text [ English ] = "ATTENTION: StarBasic scripts from the Internet will be executet without check!" ;
+ Text [ english_us ] = "NOTE: StarOffice Basic scripts from the Internet will be executed without confirming!" ;
+ Text [ portuguese_brazilian ] = "ACHTUNG: StarOffice Basic-Scripte aus dem Internet werden ohne Überprüfung ausgeführt!" ;
+ Text [ swedish ] = "OBS: StarOffice Basic-skript från Internet utförs utan kontroll!" ;
+ Text [ danish ] = "BEMÆRK: StarOffice Basic-scripter fra Internettet bliver udført uden kontrol!" ;
+ Text [ italian ] = "ATTENZIONE: gli script StarOffice Basic di Internet vengono eseguiti senza un controllo!" ;
+ Text [ spanish ] = "ADVERTENCIA: ¡Los scripts de StarOffice Basic en Internet son ejecutados sin consultar!" ;
+ Text [ french ] = "ATTENTION : Les scripts StarOffice Basic à partir d'Internet seront exécutés sans validation !" ;
+ Text [ dutch ] = "PAS OP: StarOffice Basic scripts uit Internet worden zonder controle uitgevoerd." ;
+ Text [ portuguese ] = "ATENÇÃO: os scripts StarOffice Basic da Internet serão executados sem verificação!" ;
+ Text[ chinese_simplified ] = "×¢Ò⣺¹ú¼Ê»¥ÁªÍø´«µÝµÄ StarOffice Basic ½Å±¾»á²»¾­¹ýÓû§¼ì²é¾Í×Ô¶¯Ö´ÐУ¡";
+ Text[ russian ] = "ÂÍÈÌÀÍÈÅ: Ñêðèïòû StarOffice Basic èç Èíòåðíåòà âûïîëíÿþòñÿ áåç ïðîâåðêè!";
+ Text[ polish ] = "UWAGA: Skrypty StarOffice Basic z sieci Internet bêd¹ wykonywane bez potwierdzenia!";
+ Text[ japanese ] = "’ˆÓ:²ÝÀ°È¯Ä‚©‚ç‚ÌStarOffice Basic‚̽¸ØÌßÄ‚ÍAÁª¯¸‚È‚µ‚ÉŽÀs‚³‚ê‚Ü‚·!";
+ Text[ chinese_traditional ] = "ª`·N¡GInternet¶Ç»¼ªºStarOffice Basic©R¥O½Z¤£¸g¹L¨Ï¥ÎªÌ»{µý´N·|¦Û°Ê°õ¦æ¡I";
+ Text[ arabic ] = "ÊÍÐíÑ: ÓíÊã ÊäÝíÐ StarOffice Basic scripts ãä ÇáÅäÊÑäÊ ÈÏæä ÅÌÑÇÁ ÝÍÕ!";
+ Text[ greek ] = "ÐÑÏÓÏ×Ç: ÄÝóìåò åíåñãåéþí ôïõ StarOffice Basic áðü ôï Internet èá åêôåëïýíôáé äß÷ùò íá åëåã÷èïýí!";
+ Text[ korean ] = "ÁÖÀÇ: ÀÎÅͳݿ¡¼­ÀÇ StarOffice Basic ½ºÅ©¸³Æ®´Â È®ÀξøÀÌ ½ÇÇàµË´Ï´Ù!";
+ Text[ turkish ] = "Dikkat: Ýnternetten alýnan StarOffice Basic script'leri kontrol edilmeden yürütülecek!";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_STARBASIC_DISCRIPTION_LIST
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPTING_X + 3 , GB_SCRIPTING_Y + 70 ) ;
+ Size = MAP_APPFONT ( 64 , 50 ) ;
+ WordBreak = TRUE ;
+ Hide = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? StarBasic-Scripte werden nur aus Verzeichnissen der Liste ausgeführt. : StarBasic-Scripte werden nur aus Verzeichnissen der Liste ausgef³hrt. */
+ Text = "StarBasic-Scripte werden nur aus Verzeichnissen der Liste ausgeführt." ;
+ Text [ English ] = "StarBasic scripts will be executet only from directories from the list." ;
+ Text [ english_us ] = "StarOffice Basic scripts will be executed only from directories in the list." ;
+ Text [ portuguese_brazilian ] = "StarOffice Basic-Scripte werden nur aus Verzeichnissen der Liste ausgeführt." ;
+ Text [ swedish ] = "StarOffice Basic-skript utförs endast från katalogerna i listan." ;
+ Text [ danish ] = "StarOffice Basic-scripter bliver kun udført fra biblioteker i listen." ;
+ Text [ italian ] = "Gli Script di StarOffice Basic vengono eseguiti solo dalle cartelle dell'elenco." ;
+ Text [ spanish ] = "Los scripts StarOffice Basic se ejecutarán solo a partir de los directorios de la lista." ;
+ Text [ french ] = "Seuls les scripts StarOffice Basic contenus dans la liste des répertoires seront exécutés." ;
+ Text [ dutch ] = "StarOffice Basic-scripts worden alleen uitgevoerd vanuit mappen uit de lijst." ;
+ Text [ portuguese ] = "Os scripts StarOffice Basic são apenas executados a partir de directórios da lista." ;
+ Text[ chinese_simplified ] = "Ö»Ö´ÐÐÁбí¼Ç¼\nÖеÄStarOffice Basic½Å±¾¡£";
+ Text[ russian ] = "Ñêðèïòû StarOffice Basic âûïîëíÿþòñÿ òîëüêî èç êàòàëîãîâ ñïèñêà.";
+ Text[ polish ] = "Skrypty StarOffice Basic wykonane bêd¹ tylko z katalogów list.";
+ Text[ japanese ] = "StarOffice Basic ½¸ØÌßÄ‚ÍؽĂɂ ‚éÃÞ¨Ú¸ÄØ‚©‚ç‚Å‚µ‚©ŽÀs‚³‚ê‚Ü‚¹‚ñB@";
+ Text[ chinese_traditional ] = "¥u°õ¦æ²M³æ¤§¤¤ªº\nStarOffice Basic©R¥O½Z¡C";
+ Text[ arabic ] = "ÓíÊã ÊäÝíÐ StarOffice Basic scripts ãä ÇáÏáÇÆá ÇáãæÌæÏÉ Ýí ÇáÞÇÆãÉ ÝÞØ.";
+ Text[ greek ] = "Ç åêôÝëåóç ôùí StarOffice Basic Scripts èá ãßíåôáé ìüíï áðü ôïõò êáôáëüãïõò ðïõ ðåñéÝ÷ïíôáé óôçí ëßóôá.";
+ Text[ korean ] = "StarOffice Basic ½ºÅ©¸³Æ®´Â ¸ñ·ÏÀÇ µð·ºÅ丮¿¡¼­¸¸ ½ÇÇàµË´Ï´Ù.";
+ Text[ turkish ] = "StarOffice Basic script'leri yalnýzca listedeki dizinlerden yürütülecek.";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FI_STARBASIC_DISCRIPTION_NEVER
+ {
+ Pos = MAP_APPFONT ( GB_SCRIPTING_X + 3 , GB_SCRIPTING_Y + 70 ) ;
+ Size = MAP_APPFONT ( 64 , 50 ) ;
+ WordBreak = TRUE ;
+ Hide = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Es werden kein StarBasic-Scripte ausgeführt. : Es werden kein StarBasic-Scripte ausgef³hrt. */
+ Text = "Es werden kein StarBasic-Scripte ausgeführt." ;
+ Text [ English ] = "StarBasic scripts won't be executed." ;
+ Text [ english_us ] = "StarOffice Basic scripts won't be executed." ;
+ Text [ portuguese_brazilian ] = "Es werden kein StarOffice Basic-Scripte ausgeführt." ;
+ Text [ swedish ] = "Inga StarOffice Basic-skript utförs." ;
+ Text [ danish ] = "StarOffice Basic-scripter bliver ikke udført." ;
+ Text [ italian ] = "Gli Script StarOffice Basic non vengono eseguiti." ;
+ Text [ spanish ] = "No se ejecutan ningunos scripts de StarOffice Basic." ;
+ Text [ french ] = "Aucun script StarOffice Basic ne sera exécuté." ;
+ Text [ dutch ] = "Er worden geen StarOffice Basic-scripts uitgevoerd." ;
+ Text [ portuguese ] = "Não serão executados nenhuns scripts StarOffice Basic." ;
+ Text[ chinese_simplified ] = "²»Ê¹Óà StarOffice Basic ½Å±¾¡£";
+ Text[ russian ] = "StarOffice Basic scripts íå âûïîëíÿþòñÿ.";
+ Text[ polish ] = "Skrypty StarOffice Basic nie bêd¹ wykonywane.";
+ Text[ japanese ] = "StarOffice Basic ½¸ØÌßÄ‚ÍŽÀs‚³‚ê‚Ü‚¹‚ñB";
+ Text[ chinese_traditional ] = "¤£¨Ï¥ÎStarOffice Basic©R¥O½Z¡C";
+ Text[ arabic ] = "áä íÊã ÊäÝíÐ StarOffice Basic scripts.";
+ Text[ greek ] = "Äåí èá åêôåëïýíôáé StarOffice Basic Scripts";
+ Text[ korean ] = "StarOffice Basic ½ºÅ©¸³Æ®´Â ½ÇÇàµÇÁö ¾Ê½À´Ï´Ù.";
+ Text[ turkish ] = "StarOffice Basic script'leri yürütülmeyecek.";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "½Å±¾";
+ Text[ russian ] = "Scripting";
+ Text[ polish ] = "Scripting";
+ Text[ japanese ] = "½¸ØÌßÄ";
+ Text[ chinese_traditional ] = "©R¥O½Z";
+ Text[ arabic ] = "Scripting";
+ Text[ greek ] = "Scripting";
+ Text[ korean ] = "½ºÅ©¸³ÆÃ";
+ Text[ turkish ] = "Scripting";
+ Text[ language_user1 ] = " ";
+};
+/************************************************************************/
+/* */
+/* SSLSite Configuration */
+/* */
+/************************************************************************/
+TabPage RID_SVXPAGE_INET_SSLSITE
+{
+ HelpId = HID_OPTIONS_SSLSITE ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Site Zertifikate" ;
+ Text [ English ] = "Site Certificates" ;
+ Text [ dutch ] = "Site certificaten" ;
+ Text [ english_us ] = "Site Certificates" ;
+ Text [ swedish ] = "Webbplatscertifikat" ;
+ Text [ danish ] = "Site beviser" ;
+ Text [ italian ] = "Certificati di sito" ;
+ Text [ spanish ] = "Certificados de sitios" ;
+ Text [ french ] = "Certificats de site" ;
+ Text [ portuguese ] = "Certificados de Site" ;
+ Text [ portuguese_brazilian ] = "Site Zertifikate" ;
+ #define GB_SITE_CERT_X 6
+ #define GB_SITE_CERT_Y 3
+ GroupBox GB_SITECERT
+ {
+ Pos = MAP_APPFONT ( GB_SITE_CERT_X , GB_SITE_CERT_Y ) ;
+ Size = MAP_APPFONT ( 248 , 130 ) ;
+ Text = "Akzeptierte Site Zertifikate" ;
+ Text [ English ] = "Accepted Site Certificates" ;
+ Text [ dutch ] = "Geaccepteerde Site-certificaten" ;
+ Text [ english_us ] = "Accepted site certificates" ;
+ Text [ swedish ] = "Accepterade webbplatscertifikat" ;
+ Text [ danish ] = "Accepter site beviser" ;
+ Text [ italian ] = "Accetta certificati di sito" ;
+ Text [ spanish ] = "Certificado de sitios aceptados" ;
+ Text [ french ] = "Certificats de site acceptés" ;
+ Text [ portuguese ] = "Certificados de sites aceites" ;
+ Text [ portuguese_brazilian ] = "Akzeptierte Site Zertifikate" ;
+ Text[ chinese_simplified ] = "ÒѾ­½ÓÊܵÄÕ¾µãÖ¤Êé";
+ Text[ russian ] = "Ïðèçíàííûå ñåðòèôèêàòû óçëà";
+ Text[ polish ] = "Zaakceptowane certyfikaty Site";
+ Text[ japanese ] = "³”F‚³‚ꂽ»²ÄØ–¾";
+ Text[ chinese_traditional ] = "¤w¸g±µ¨üªº¯¸ÂIÃÒ®Ñ";
+ Text[ arabic ] = "ÔåÇÏÇÊ ÕÝÍÇÊ ãÞÈæáÉ";
+ Text[ greek ] = "Áðïäï÷Þ ðéóôïðïéçôéêþí ôïðïèåóßáò";
+ Text[ korean ] = "ÀÎÁ¤¹ÞÀº »çÀÌÆ® ÀÎÁõ¼­";
+ Text[ turkish ] = "Kabul edilen site sertifikalarý";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_SITECERT
+ {
+ Pos = MAP_APPFONT ( GB_SITE_CERT_X + 6 , GB_SITE_CERT_Y + 12 ) ;
+ Size = MAP_APPFONT ( 130 , 95 ) ;
+ Border = TRUE ;
+ DropDown = FALSE ;
+ };
+ ListBox LB_FILTERCERT
+ {
+ Pos = MAP_APPFONT ( GB_SITE_CERT_X + 6 , GB_SITE_CERT_Y + 110 ) ;
+ Size = MAP_APPFONT ( 130 , 48 ) ;
+ Border = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Alle Zertifikate" ; > ;
+ < "Site Zertifikate" ; > ;
+ /* ### ACHTUNG: Neuer Eintrag in Liste? 3 : Zertifikatbehörde*/
+ < "Zertifikatbehörde" ; > ;
+ };
+ StringList [ English ] =
+ {
+ < "Alle Zertifikate" ; > ;
+ < "Site Zertifikate" ; > ;
+ < "Zertifikatbehörde" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "All Certificates" ; > ;
+ < "Site Certificate" ; > ;
+ < "Certificate Issuer" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Alle Zertifikate" ; > ;
+ < "Site Zertifikate" ; > ;
+ < "Zertifikatbehörde" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Alla certifikat" ; > ;
+ < "Site certifikat" ; > ;
+ < "Certifikatsutfärdare" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Alle beviser" ; > ;
+ < "Site beviser" ; > ;
+ < "Bevisudsteder" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Tutti i certificati" ; > ;
+ < "Certificati di sito" ; > ;
+ < "Ufficio di certificazione" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Todos los certificados" ; > ;
+ < "Certificado de sitio" ; > ;
+ < "Autoridad del certificado" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Tous les certificats" ; > ;
+ < "Certificats de site" ; > ;
+ < "Organisation de certification" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Alle certificaten" ; > ;
+ < "Site certificaten" ; > ;
+ < "Certificatenbeheer" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Todos os certificados" ; > ;
+ < "Certificados de Site" ; > ;
+ < "Autoridade emitente" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ËùÓеÄÖ¤Êé" ; > ;
+ < "Õ¾µãÖ¤Êé" ; > ;
+ < "·¢Ö¤»ú¹Ø" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Âñå ñåðòèôèêàòû" ; > ;
+ < "Ñåðòèôèêàòû óçëà" ; > ;
+ < "Ó÷ðåæäåíèå, âûäàâøåå ñåðòèôèêàò" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Wszystkie certyfikaty" ; > ;
+ < "Certyfikaty Site" ; > ;
+ < "Urz¹d certyfikacji" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "‚·‚ׂĂÌØ–¾" ; > ;
+ < "»²ÄØ–¾" ; > ;
+ < "”FØ‹Ç" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "©Ò¦³ªºÃÒ®Ñ" ; > ;
+ < "¯¸ÂIÃÒ®Ñ" ; > ;
+ < "µoÃÒ¾÷ÌÛ" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ßá ÇáÔåÇÏÇÊ" ; > ;
+ < "ÔåÇÏÇÊ ÕÝÍÉ" ; > ;
+ < "ÌåÉ ÊÍÑíÑ ÇáÔåÇÏÉ" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "¼ëá ôá ðéóôïðïéçôéêÜ" ; > ;
+ < "ÐéóôïðïéçôéêÜ ôïðïèåóßáò" ; > ;
+ < "Åêäüôçò ðéóôïðïéçôéêïý" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "¸ðµç ÀÎÁõ¼­" ; > ;
+ < "»çÀÌÆ® ÀÎÁõ¼­" ; > ;
+ < "ÀÎÁõ¼­ ¹ß±Þó" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Tüm sertifikalar" ; > ;
+ < "Site sertifikalarý" ; > ;
+ < "Sertifika düzenleyen" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ };
+ };
+ PushButton PB_EDIT_CERT
+ {
+ Pos = MAP_APPFONT ( GB_SITE_CERT_X + 192 , GB_SITE_CERT_Y + 90 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Bearbeiten..." ;
+ Text [ English ] = "~Edit..." ;
+ Text [ english_us ] = "~Edit..." ;
+ Text [ swedish ] = "~Redigera..." ;
+ Text [ danish ] = "Rediger..." ;
+ Text [ italian ] = "Modifica..." ;
+ Text [ spanish ] = "~Editar..." ;
+ Text [ french ] = "~Modifier..." ;
+ Text [ dutch ] = "~Bewerken..." ;
+ Text [ portuguese_brazilian ] = "Bearbeiten..." ;
+ Text [ portuguese ] = "~Editar..." ;
+ Text[ chinese_simplified ] = "±à¼­(~E)...";
+ Text[ russian ] = "Ïðàâêà...";
+ Text[ polish ] = "Edytuj...";
+ Text[ japanese ] = "•ÒW(~E)...";
+ Text[ chinese_traditional ] = "½s¿è(~E)...";
+ Text[ arabic ] = "ÊÍÑíÑ...";
+ Text[ greek ] = "~Åðåîåñãáóßá...";
+ Text[ korean ] = "ÆíÁý(~E)...";
+ Text[ turkish ] = "Düzenle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_DELETE_CERT
+ {
+ Pos = MAP_APPFONT ( GB_SITE_CERT_X + 192 , GB_SITE_CERT_Y + 109 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ Text [ English ] = "~Delete" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ italian ] = "E~limina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ portuguese_brazilian ] = "Löschen" ;
+ 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 ] = " ";
+ };
+ Text[ chinese_simplified ] = "Õ¾µãÖ¤Êé";
+ Text[ russian ] = "Ñåðòèôèêàòû óçëà";
+ Text[ polish ] = "Certyfikaty Site ";
+ Text[ japanese ] = "»²ÄØ–¾";
+ Text[ chinese_traditional ] = "¯¸ÂIÃÒ®Ñ";
+ Text[ arabic ] = "ÔåÇÏÇÊ ÕÝÍÉ";
+ Text[ greek ] = "ÐéóôïðïéçôéêÜ ôïðïèåóßáò";
+ Text[ korean ] = "»çÀÌÆ® ÀÎÁõ¼­";
+ Text[ turkish ] = "Site sertifikalarý";
+ Text[ language_user1 ] = " ";
+};
+/************************************************************************/
+/* */
+/* SSLPersonal Configuration */
+/* */
+/************************************************************************/
+TabPage RID_SVXPAGE_INET_SSLPERSONAL
+{
+ HelpId = HID_OPTIONS_SSLPERSONAL ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Persönliche Zertifikate : Pers÷nliche Zertifikate */
+ Text = "Persönliche Zertifikate" ;
+ Text [ English ] = "Personal Certificates" ;
+ Text [ dutch ] = "Persoonlijke certificaten" ;
+ Text [ english_us ] = "Personal Certificates" ;
+ Text [ swedish ] = "Personliga certifikat" ;
+ Text [ danish ] = "Personlige beviser" ;
+ Text [ italian ] = "Certificati personali" ;
+ Text [ spanish ] = "Certificados personales" ;
+ Text [ french ] = "Certificats personnels" ;
+ Text [ portuguese ] = "Certificados pessoais" ;
+ Text [ portuguese_brazilian ] = "Persönliche Zertifikate" ;
+ #define GB_PERS_CERT_X 6
+ #define GB_PERS_CERT_Y 3
+ GroupBox GB_PERSCERT
+ {
+ Pos = MAP_APPFONT ( GB_PERS_CERT_X , GB_PERS_CERT_Y ) ;
+ Size = MAP_APPFONT ( 248 , 130 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Ihre persönlichen Zertifikate : Ihre pers÷nlichen Zertifikate */
+ Text = "Ihre persönlichen Zertifikate" ;
+ Text [ English ] = "Your Personal Certificates" ;
+ Text [ dutch ] = "Uw persoonlijke certificaten" ;
+ Text [ english_us ] = "Your personal certificates" ;
+ Text [ swedish ] = "Dina personliga certifikat" ;
+ Text [ danish ] = "Dine personlige beviser" ;
+ Text [ italian ] = "I propri certificati personali" ;
+ Text [ spanish ] = "Sus certificados personales" ;
+ Text [ french ] = "Vos certificats personnels" ;
+ Text [ portuguese ] = "Os seus certificados pessoais" ;
+ Text [ portuguese_brazilian ] = "Ihre persönlichen Zertifikate" ;
+ Text[ chinese_simplified ] = "ÄúµÄ¸öÈËÖ¤Êé";
+ Text[ russian ] = "Âàøè ëè÷íûå ñåðòèôèêàòû";
+ Text[ polish ] = "Pañskie osobiste certyfikaty";
+ Text[ japanese ] = "‚¨‹q—l‚ÌŒÂlØ–¾";
+ Text[ chinese_traditional ] = "±zªº­Ó¤HÃÒ®Ñ";
+ Text[ arabic ] = "ÔåÇÏÇÊß ÇáÎÇÕÉ";
+ Text[ greek ] = "Ôá ðñïóùðéêÜ óáò ðéóôïðïéçôéêÜ";
+ Text[ korean ] = "°³ÀÎ ÀÎÁõ¼­";
+ Text[ turkish ] = "Özel sertifikalarýnýz";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_PERSCERT
+ {
+ Pos = MAP_APPFONT ( GB_PERS_CERT_X + 6 , GB_PERS_CERT_Y + 12 ) ;
+ Size = MAP_APPFONT ( 130 , 95 ) ;
+ Border = TRUE ;
+ DropDown = FALSE ;
+ };
+ PushButton PB_INFO_PERSCERT
+ {
+ Pos = MAP_APPFONT ( GB_PERS_CERT_X + 192 , GB_PERS_CERT_Y + 90 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Mehr Info..." ;
+ Text [ English ] = "~More Info..." ;
+ Text [ english_us ] = "~More Info..." ;
+ Text [ swedish ] = "~Mer info..." ;
+ Text [ danish ] = "Mere info..." ;
+ Text [ italian ] = "Più info..." ;
+ Text [ spanish ] = "~Más información..." ;
+ Text [ french ] = "Pl~us d'infos..." ;
+ Text [ dutch ] = "~Meer info..." ;
+ Text [ portuguese_brazilian ] = "Mehr Info..." ;
+ Text [ portuguese ] = "Mais informações...." ;
+ Text[ chinese_simplified ] = "ÆäËûÐÅÏ¢(~M)...";
+ Text[ russian ] = "Áîëüøå èíôîðìàöèè...";
+ Text[ polish ] = "Wiêcej informacji...";
+ Text[ japanese ] = "’ljÁî•ñ(~M)...";
+ Text[ chinese_traditional ] = "¨ä¥L¸ê°T(~M)...";
+ Text[ arabic ] = "ãÒíÏ ãä ÇáãÚáæãÇÊ...";
+ Text[ greek ] = "Ðåñéóóüôåñåò ðëçñïöïñßåò...";
+ Text[ korean ] = "ÀÚ¼¼ÇÑ Á¤º¸(~M)...";
+ Text[ turkish ] = "Ek bilgi...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_DELETE_PERSCERT
+ {
+ Pos = MAP_APPFONT ( GB_PERS_CERT_X + 192 , GB_PERS_CERT_Y + 109 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Löschen : ~L÷schen */
+ Text = "~Löschen" ;
+ Text [ English ] = "~Delete" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ italian ] = "Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ portuguese_brazilian ] = "Löschen" ;
+ 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_NEW_PERSCERT
+ {
+ Pos = MAP_APPFONT ( GB_PERS_CERT_X + 6 , GB_PERS_CERT_Y + 110 ) ;
+ Size = MAP_APPFONT ( 130 , 14 ) ;
+ Text = "~Neues Zertifikat beantragen" ;
+ Text [ English ] = "~Obtain new Certificate" ;
+ Text [ english_us ] = "~Obtain New Certificate" ;
+ Text [ swedish ] = "Ansök om ~nytt certifikat" ;
+ Text [ danish ] = "Anmod om nyt bevis" ;
+ Text [ italian ] = "Richiedi nuovo certificato" ;
+ Text [ spanish ] = "Solicitar un ~nuevo certificado" ;
+ Text [ french ] = "~Demander nouveau certificat" ;
+ Text [ dutch ] = "~Nieuw certificaat aanvragen" ;
+ Text [ portuguese_brazilian ] = "Neues Zertifikat beantragen" ;
+ Text [ portuguese ] = "Solicitar novo certificado" ;
+ Text[ chinese_simplified ] = "ÉêÇëеÄÖ¤Êé(~O)";
+ Text[ russian ] = "Ïîäàòü çàÿâëåíèå íà íîâûé ñåðòèôèêàò";
+ Text[ polish ] = "Z³ó¿ wniosek o nowy certyfikat";
+ Text[ japanese ] = "V‚µ‚¢”FØ‚Ì\\¿(~O)";
+ Text[ chinese_traditional ] = "¥Ó½Ð·sÃÒ®Ñ(~O)";
+ Text[ arabic ] = "ÇáÍÕæá Úáì ÔåÇÏÉ ÌÏíÏÉ";
+ Text[ greek ] = "Áßôçóç ãéá ~íÝï ðéóôïðïéçôéêü";
+ Text[ korean ] = "»õ ÀÎÁõ¼­ ½Åû(~O)";
+ Text[ turkish ] = "Yeni sertifika talebi";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "¸öÈËÖ¤Êé";
+ Text[ russian ] = "Ëè÷íûå ñåðòèôèêàòû";
+ Text[ polish ] = "Certyfikaty osobiste";
+ Text[ japanese ] = "ŒÂlØ–¾‘";
+ Text[ chinese_traditional ] = "­Ó¤HÃÒ®Ñ";
+ Text[ arabic ] = "ÔåÇÏÇÊ ÔÎÕíÉ";
+ Text[ greek ] = "ÐñïóùðéêÜ ðéóôïðïéçôéêÜ";
+ Text[ korean ] = "°³ÀÎ ÀÎÁõ¼­";
+ Text[ turkish ] = "Özel sertifikalar";
+ Text[ language_user1 ] = " ";
+};
+/************************************************************************/
+/* */
+/* CookiesTabPage */
+/* */
+/************************************************************************/
+TabPage RID_SVXPAGE_INET_COOKIES
+{
+ HelpId = HID_OPTIONS_COOKIES ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Cookies" ;
+ Text [ english ] = "Cookies" ;
+ Text [ english_us ] = "Cookies" ;
+ Text [ portuguese ] = "Cookies" ;
+ Text [ portuguese_brazilian ] = "Cookies" ;
+ Text [ swedish ] = "Cookies" ;
+ Text [ danish ] = "Cookies" ;
+ Text [ italian ] = "Cookies" ;
+ Text [ spanish ] = "Cookies" ;
+ Text [ french ] = "Cookies" ;
+ Text [ dutch ] = "Cookies" ;
+ Text[ chinese_simplified ] = "Cookies";
+ Text[ russian ] = "Cookies";
+ Text[ polish ] = "Cookies";
+ Text[ japanese ] = "Cookies";
+ String STR_YES
+ {
+ Text = "Ja" ;
+ Text [ english ] = "Yes" ;
+ Text [ english_us ] = "Yes" ;
+ Text [ portuguese_brazilian ] = "Ja" ;
+ Text [ swedish ] = "Ja" ;
+ Text [ danish ] = "Ja" ;
+ Text [ italian ] = "Sì" ;
+ Text [ spanish ] = "Sí" ;
+ Text [ french ] = "Oui" ;
+ Text [ dutch ] = "Ja" ;
+ Text [ portuguese ] = "Sim" ;
+ Text[ chinese_simplified ] = "ÊÇ";
+ Text[ russian ] = "Äà";
+ Text[ polish ] = "Tak";
+ Text[ japanese ] = "‚Í‚¢";
+ Text[ chinese_traditional ] = "¬O";
+ Text[ arabic ] = "äÚã";
+ Text[ greek ] = "Íáé";
+ Text[ korean ] = "¿¹";
+ Text[ turkish ] = "Evet";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_NO
+ {
+ Text = "Nein" ;
+ Text [ english ] = "No" ;
+ Text [ english_us ] = "No" ;
+ Text [ portuguese_brazilian ] = "Nein" ;
+ Text [ swedish ] = "Nej" ;
+ Text [ danish ] = "Nej" ;
+ Text [ italian ] = "No" ;
+ Text [ spanish ] = "No" ;
+ Text [ french ] = "Non" ;
+ Text [ dutch ] = "Nee" ;
+ Text [ portuguese ] = "Não" ;
+ Text[ chinese_simplified ] = "·ñ";
+ Text[ russian ] = "Íåò";
+ Text[ polish ] = "Nie";
+ Text[ japanese ] = "‚¢‚¢‚¦";
+ Text[ chinese_traditional ] = "§_";
+ Text[ arabic ] = "áÇ";
+ Text[ greek ] = "¼÷é";
+ Text[ korean ] = "¾Æ´Ï¿À";
+ Text[ turkish ] = "Hayýr";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_STATUS
+ {
+ Text = "Status" ;
+ Text [ english ] = "Status" ;
+ Text [ english_us ] = "Status" ;
+ Text [ portuguese_brazilian ] = "Status" ;
+ Text [ swedish ] = "Status" ;
+ Text [ danish ] = "Status" ;
+ Text [ italian ] = "Stato" ;
+ Text [ spanish ] = "Estado" ;
+ Text [ french ] = "Statut" ;
+ Text [ dutch ] = "Status" ;
+ Text [ portuguese ] = "Estado" ;
+ Text[ chinese_simplified ] = "״̬";
+ Text[ russian ] = "Ñîñòîÿíèå";
+ Text[ polish ] = "Stan";
+ Text[ japanese ] = "½Ã°À½";
+ Text[ chinese_traditional ] = "ª¬ºA";
+ Text[ arabic ] = "ÇáÍÇáÉ";
+ Text[ greek ] = "ÊáôÜóôáóç";
+ Text[ korean ] = "»óÅÂ";
+ Text[ turkish ] = "Durum";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_DOMAIN
+ {
+ Text = "Domain" ;
+ Text [ english ] = "Domain" ;
+ Text [ english_us ] = "Domain" ;
+ Text [ portuguese_brazilian ] = "Domain" ;
+ Text [ swedish ] = "Domän" ;
+ Text [ danish ] = "Domæne" ;
+ Text [ italian ] = "Dominio" ;
+ Text [ spanish ] = "Dominio" ;
+ Text [ french ] = "Domaine" ;
+ Text [ dutch ] = "Domain" ;
+ Text [ portuguese ] = "Domínio" ;
+ Text[ chinese_simplified ] = "Óò";
+ Text[ russian ] = "Äîìåí";
+ Text[ polish ] = "Domena";
+ Text[ japanese ] = "ÄÞÒ²Ý";
+ Text[ chinese_traditional ] = "°ì";
+ Text[ arabic ] = "ÇáäØÇÞ";
+ Text[ greek ] = "ÔïìÝáò";
+ Text[ korean ] = "µµ¸ÞÀÎ";
+ Text[ turkish ] = "Etki alaný";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_PATH
+ {
+ Text = "Pfad" ;
+ Text [ english ] = "Path" ;
+ Text [ english_us ] = "Path" ;
+ Text [ portuguese_brazilian ] = "Pfad" ;
+ Text [ swedish ] = "Sökväg" ;
+ Text [ danish ] = "Sti" ;
+ Text [ italian ] = "Percoso" ;
+ Text [ spanish ] = "Ruta" ;
+ Text [ french ] = "Chemin" ;
+ Text [ dutch ] = "Pad" ;
+ Text [ portuguese ] = "Atalho" ;
+ Text[ chinese_simplified ] = "·¾¶";
+ Text[ russian ] = "Ïóòü";
+ Text[ polish ] = "Œcie¿ka";
+ Text[ japanese ] = "Êß½";
+ Text[ chinese_traditional ] = "¸ô®|";
+ Text[ arabic ] = "ÇáãÓÇÑ";
+ Text[ greek ] = "ÄéáäñïìÞ";
+ Text[ korean ] = "°æ·Î";
+ Text[ turkish ] = "Veri yolu";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_NAME
+ {
+ Text = "Name" ;
+ Text [ english ] = "Name" ;
+ Text [ english_us ] = "Name" ;
+ Text [ portuguese_brazilian ] = "Name" ;
+ Text [ swedish ] = "Namn" ;
+ Text [ danish ] = "Navn" ;
+ Text [ italian ] = "Nome" ;
+ Text [ spanish ] = "Nombre" ;
+ Text [ french ] = "Nom" ;
+ Text [ dutch ] = "Naam" ;
+ Text [ portuguese ] = "Nome" ;
+ 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 ] = " ";
+ };
+ String STR_EXPIRES
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Gültig bis : G³ltig bis */
+ Text = "Gültig bis" ;
+ Text [ english ] = "Expires" ;
+ Text [ english_us ] = "Expires" ;
+ Text [ portuguese_brazilian ] = "Gültig bis" ;
+ Text [ swedish ] = "Giltig till" ;
+ Text [ danish ] = "Gyldig til" ;
+ Text [ italian ] = "Valido fino al" ;
+ Text [ spanish ] = "Válido hasta el" ;
+ Text [ french ] = "Expire le" ;
+ Text [ dutch ] = "Geldig tot" ;
+ Text [ portuguese ] = "Válido até" ;
+ Text[ chinese_simplified ] = "ÓÐЧÆÚÖÁ";
+ Text[ russian ] = "Äåéñòâèòåëüíî äî";
+ Text[ polish ] = "Wa¿ny do";
+ Text[ japanese ] = "—LŒøŠúŒÀ";
+ Text[ chinese_traditional ] = "¦³®Ä´Á¦Ü";
+ Text[ arabic ] = "ÕÇáÍ ÍÊì";
+ Text[ greek ] = "Éó÷ý Ýùò";
+ Text[ korean ] = "À¯È¿±â°£";
+ Text[ turkish ] = "Geçerlilik sonu";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_CONTENT
+ {
+ Text = "Inhalt" ;
+ Text [ english ] = "Content" ;
+ Text [ english_us ] = "Contents" ;
+ Text [ portuguese_brazilian ] = "Inhalt" ;
+ Text [ swedish ] = "Innehåll" ;
+ Text [ danish ] = "Indhold" ;
+ Text [ italian ] = "Contenuto" ;
+ Text [ spanish ] = "Contenido" ;
+ Text [ french ] = "Contenu" ;
+ Text [ dutch ] = "Inhoud" ;
+ Text [ portuguese ] = "Conteúdo" ;
+ Text[ chinese_simplified ] = "ÄÚÈÝ";
+ Text[ russian ] = "Ñîäåðæèìîå";
+ Text[ polish ] = "ZawartoϾ";
+ Text[ japanese ] = "“à—e";
+ Text[ chinese_traditional ] = "¤º®e";
+ Text[ arabic ] = "ÇáãÍÊæíÇÊ";
+ Text[ greek ] = "Ðåñéå÷üìåíá";
+ Text[ korean ] = "³»¿ë";
+ Text[ turkish ] = "Ýçerik";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_SECURE
+ {
+ Text = "Secure" ;
+ Text [ english ] = "Secure" ;
+ Text [ english_us ] = "Secure" ;
+ Text [ portuguese_brazilian ] = "Secure" ;
+ Text [ swedish ] = "Secure" ;
+ Text [ danish ] = "Secure" ;
+ Text [ italian ] = "Secure" ;
+ Text [ spanish ] = "Seguro" ;
+ Text [ french ] = "En sécurité" ;
+ Text [ dutch ] = "Secure" ;
+ Text [ portuguese ] = "Seguro" ;
+ Text[ chinese_simplified ] = "°²È«";
+ Text[ russian ] = "Áåçîïàñíîñòü";
+ Text[ polish ] = "Zabezpieczenie";
+ Text[ japanese ] = "¾·­Øè";
+ Text[ chinese_traditional ] = "¦w¥þ";
+ Text[ arabic ] = "Âãä";
+ Text[ greek ] = "ÁóöáëÞò";
+ Text[ korean ] = "º¸¾È";
+ Text[ turkish ] = "Güvenlik";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_ENABLE_BTN
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Über~mitteln : šber~mitteln */
+ Text = "Über~mitteln" ;
+ Text [ english ] = "Sen~d" ;
+ Text [ english_us ] = "~Accept" ;
+ Text [ portuguese_brazilian ] = "Über~mitteln" ;
+ Text [ swedish ] = "~Acceptera" ;
+ Text [ danish ] = "Accepter" ;
+ Text [ italian ] = "Tras~metti" ;
+ Text [ spanish ] = "~Aceptar" ;
+ Text [ french ] = "A~ccepter" ;
+ Text [ dutch ] = "~Zenden" ;
+ Text [ portuguese ] = "~Aceitar" ;
+ Text[ chinese_simplified ] = "½ÓÊÜ(~A)";
+ Text[ russian ] = "Ïðèíÿòü";
+ Text[ polish ] = "Zaakceptuj";
+ Text[ japanese ] = "Žó‚¯“ü‚ê‚é(~A)";
+ Text[ chinese_traditional ] = "±µ¦¬(~A)";
+ Text[ arabic ] = "ÞÈæá";
+ Text[ greek ] = "~Äéáâßâáóç";
+ Text[ korean ] = "Àü´Þ(~A)";
+ Text[ turkish ] = "Kabul et";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_DIS_BTN
+ {
+ Text = "I~gnorieren" ;
+ Text [ english ] = "I~gnore" ;
+ Text [ english_us ] = "I~gnore" ;
+ Text [ portuguese_brazilian ] = "I~gnorieren" ;
+ Text [ swedish ] = "I~gnorera" ;
+ Text [ danish ] = "Ignorer" ;
+ Text [ italian ] = "I~gnora" ;
+ Text [ spanish ] = "I~gnorar" ;
+ Text [ french ] = "I~gnorer" ;
+ Text [ dutch ] = "N~egeren" ;
+ Text [ portuguese ] = "I~gnorar" ;
+ Text[ chinese_simplified ] = "ºöÂÔ(~G)";
+ Text[ russian ] = "Ïðîïóñòèòü";
+ Text[ polish ] = "Ignoruj";
+ Text[ japanese ] = "–³Ž‹‚·‚é(~G)";
+ Text[ chinese_traditional ] = "©¿²¤(~G)";
+ Text[ arabic ] = "ÊÌÇåá";
+ Text[ greek ] = "ÐáñÜâëåøç";
+ Text[ korean ] = "¹«½Ã(~G)";
+ Text[ turkish ] = "Yok say";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_DELETE_COOKIE
+ {
+ /* ### ACHTUNG: Neuer Text in Resource? Wollen Sie den Cookie der Domain '%1' wirklich löschen? : Wollen Sie den Cookie der Domain '%1' wirklich l÷schen? */
+ Text = "Wollen Sie den Cookie der Domain '%1' wirklich löschen?" ;
+ Text [ english ] = "Wollen Sie den Cookie der Domain '%1' wirklich löschen?" ;
+ Text [ english_us ] = "Are you sure you want to delete the cookie from domain '%1'?" ;
+ Text [ portuguese_brazilian ] = "Wollen Sie den Cookie der Domain ''%1'' wirklich löschen?" ;
+ Text [ swedish ] = "Vill Du verkligen radera cookien från domänen '%1'?" ;
+ Text [ danish ] = "Er du sikker på, at du vil slette cookien fra domæne '%1'?" ;
+ Text [ italian ] = "Cancellare veramente il cookie del dominio ''%1'' ?" ;
+ Text [ spanish ] = "¿Desea realmente eliminar la Cookie del dominio '%1'?" ;
+ Text [ french ] = "Supprimer le cookie du domaine '%1' ?" ;
+ Text [ dutch ] = "Wilt u de cookie van domain '%1' werkelijk wissen?" ;
+ Text [ portuguese ] = "Deseja realmente eliminar o cookie do domínio ''%1''?" ;
+ Text[ chinese_simplified ] = "ÄúÕæҪɾ³ýÓò '%1' µÄCookie ?";
+ Text[ russian ] = "Âû äåéñòâèòåëüíî õîòèòå óäàëèòü cookie èç äîìåíà '%1'?";
+ Text[ polish ] = "Czy chcesz na pewno usun¹æ pliki typu cookie w domenie '%1'?";
+ Text[ japanese ] = "ÄÞÒ²Ý'%1'‚̸¯·°‚ð–{“–‚É휂µ‚Ü‚·‚©?";
+ Text[ chinese_traditional ] = "±z¯u­n§R°£°ì '%1' ªºCookie?";
+ Text[ arabic ] = "åá ÊÑíÏ ÈÇáÝÚá ÍÐÝ Çáßæßí ãä ÇáäØÇÞ '%1'¿";
+ Text[ greek ] = "ÈÝëåôå óßãïõñá íá ãßíåé äéáãñáöÞ ôïõ cookie ôïõ ôïìÝá '%1';";
+ Text[ korean ] = "µµ¸ÞÀÎ'%1'ÀÇ Cookie¸¦ Á¤¸»·Î »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "'%1' etki alanýna ait Cookie'yi gerçekten silmek istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_QUERYBOX_TITLE
+ {
+ Text = "Löschbestätigung" ;
+ Text [ English ] = "Confirm delete" ;
+ Text [ english_us ] = "Confirm Delete" ;
+ Text [ italian ] = "Conferma eliminazione" ;
+ Text [ spanish ] = "Confirmar eliminación" ;
+ Text [ french ] = "Confirmation de suppression" ;
+ Text [ dutch ] = "Wisopdracht bevestigen" ;
+ Text [ swedish ] = "Bekräfta radering" ;
+ Text [ danish ] = "Bekræfter sletning" ;
+ Text [ portuguese_brazilian ] = "Löschbestätigung" ;
+ Text [ portuguese ] = "Confirmar Eliminar" ;
+ Text[ chinese_simplified ] = "È·ÈÏɾ³ý";
+ Text[ russian ] = "Ïîäòâåðæäåíèå óäàëåíèÿ";
+ Text[ polish ] = "Potwierdzenie usuniêcia";
+ Text[ japanese ] = "휂̊m”F";
+ Text[ chinese_traditional ] = "½T»{§R°£";
+ Text[ arabic ] = "ÊÃßíÏ ÇáÍÐÝ";
+ Text[ greek ] = "Åðéâåâáßùóç äéáãñáöÞò";
+ Text[ korean ] = "»èÁ¦ È®ÀÎ";
+ Text[ turkish ] = "Silmeyi onayla";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_ALLBTN_TEXT
+ {
+ Text = "~Alle" ;
+ Text [ English ] = "~All" ;
+ Text [ english_us ] = "~All" ;
+ Text [ italian ] = "Tutti" ;
+ Text [ spanish ] = "~Todos" ;
+ Text [ french ] = "~Tous" ;
+ Text [ dutch ] = "~Alle" ;
+ Text [ swedish ] = "~Alla" ;
+ Text [ danish ] = "Alle" ;
+ Text [ portuguese ] = "~Tudo" ;
+ Text [ portuguese_brazilian ] = "~Alle" ;
+ Text[ chinese_simplified ] = "È«²¿(~A)";
+ Text[ russian ] = "Âñå";
+ Text[ polish ] = "Wszystkie";
+ Text[ japanese ] = "‚·‚ׂÄ(~A)";
+ Text[ chinese_traditional ] = "¥þ³¡(~A)";
+ Text[ arabic ] = "Çáßá";
+ Text[ greek ] = "¼ëá";
+ Text[ korean ] = "¸ðµÎ(~A)";
+ Text[ turkish ] = "Tümü";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_HANDLING
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 27 ) ;
+ Text = "Allgemeine Handhabung" ;
+ Text [ english ] = "General handling" ;
+ Text [ english_us ] = "General handling" ;
+ Text [ portuguese_brazilian ] = "Allgemeine Handhabung" ;
+ Text [ swedish ] = "Allmänt handhavande" ;
+ Text [ danish ] = "Generel håndtering" ;
+ Text [ italian ] = "Gestione genenerale" ;
+ Text [ spanish ] = "Instrucciones generales" ;
+ Text [ french ] = "Utilisation générale" ;
+ Text [ dutch ] = "Algemene handling" ;
+ Text [ portuguese ] = "Manuseamento geral" ;
+ Text[ chinese_simplified ] = "³£¹æ´¦Àí";
+ Text[ russian ] = "Îáùåå îáñëóæèâàíèå";
+ Text[ polish ] = "Ogólna obs³uga";
+ Text[ japanese ] = "ˆê”Ê‚Ì‘€ì";
+ Text[ chinese_traditional ] = "¤@¯ë³B²z";
+ Text[ arabic ] = "ãÚÇáÌÉ ÚÇãÉ";
+ Text[ greek ] = "Ãåíéêüò ÷åéñéóìüò";
+ Text[ korean ] = "ÀÏ¹Ý Á¶ÀÛ";
+ Text[ turkish ] = "Uygulanacak kurallar";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_SEND
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 77 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Ü~bermitteln : š~bermitteln */
+ Text = "Ü~bermitteln" ;
+ Text [ english ] = "~Send" ;
+ Text [ english_us ] = "~Accept" ;
+ Text [ portuguese_brazilian ] = "Übermitteln" ;
+ Text [ swedish ] = "Ö~verför" ;
+ Text [ danish ] = "Accepter" ;
+ Text [ italian ] = "~Trasmetti" ;
+ Text [ spanish ] = "A~ceptar" ;
+ Text [ french ] = "A~ccepter" ;
+ Text [ dutch ] = "~Zenden" ;
+ Text [ portuguese ] = "~Aceitar" ;
+ Text[ chinese_simplified ] = "½ÓÊÜ(~A)";
+ Text[ russian ] = "Ïðèíÿòü";
+ Text[ polish ] = "Z~aakceptuj";
+ Text[ japanese ] = "Žó‚¯“ü‚ê‚é(~A)";
+ Text[ chinese_traditional ] = "±µ¦¬(~A)";
+ Text[ arabic ] = "ÞÈæá";
+ Text[ greek ] = "Äéá~âßâáóç";
+ Text[ korean ] = "Àü´Þ(~A)";
+ Text[ turkish ] = "Kabul et";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_IGNORE
+ {
+ Pos = MAP_APPFONT ( 92 , 14 ) ;
+ Size = MAP_APPFONT ( 77 , 10 ) ;
+ Text = "~Ignorieren" ;
+ Text [ english ] = "~Ignore" ;
+ Text [ english_us ] = "~Ignore" ;
+ Text [ portuguese_brazilian ] = "Ignorieren" ;
+ Text [ swedish ] = "~Ignorera" ;
+ Text [ danish ] = "Ignorer" ;
+ Text [ italian ] = "~Ignora" ;
+ Text [ spanish ] = "~Ignorar" ;
+ Text [ french ] = "~Ignorer" ;
+ Text [ dutch ] = "~Negeren" ;
+ Text [ portuguese ] = "~Ignorar" ;
+ Text[ chinese_simplified ] = "ºöÂÔ(~I)";
+ Text[ russian ] = "Ïðîïóñòèòü";
+ Text[ polish ] = "Ig~noruj";
+ Text[ japanese ] = "–³Ž‹‚·‚é(~I)";
+ Text[ chinese_traditional ] = "©¿²¤(~I)";
+ Text[ arabic ] = "ÊÌÇåá";
+ Text[ greek ] = "ÐáñÜâëåøç";
+ Text[ korean ] = "¹«½Ã(~I)";
+ Text[ turkish ] = "Yok say";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_INTERACTIV
+ {
+ Pos = MAP_APPFONT ( 172 , 14 ) ;
+ Size = MAP_APPFONT ( 76 , 10 ) ;
+ Text = "I~nteraktiv" ;
+ Text [ english ] = "I~nteractiv" ;
+ Text [ english_us ] = "~Confirm" ;
+ Text [ portuguese_brazilian ] = "Interaktiv" ;
+ Text [ swedish ] = "I~nteraktivt" ;
+ Text [ danish ] = "Interaktiv" ;
+ Text [ italian ] = "Interattivo" ;
+ Text [ spanish ] = "I~nteractivo" ;
+ Text [ french ] = "~Avertir" ;
+ Text [ dutch ] = "~Interactief" ;
+ Text [ portuguese ] = "~Confirmar" ;
+ Text[ chinese_simplified ] = "ÐèҪȷÈÏ(~C)";
+ Text[ russian ] = "Èíòåðàêòèâíûé";
+ Text[ polish ] = "Interaktywny";
+ Text[ japanese ] = "–ˆ‰ñŠm”F‚·‚é(~C)";
+ Text[ chinese_traditional ] = "»Ý­n½T»{(~C)";
+ Text[ arabic ] = "ÊÝÇÚáí";
+ Text[ greek ] = "ÄéáëïãéêÜ";
+ Text[ korean ] = "È®ÀÎ(~C)";
+ Text[ turkish ] = "Etkileþimli";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_LB_WINDOW
+ {
+ Pos = MAP_APPFONT ( 6 , 36 ) ;
+ Size = MAP_APPFONT ( 248 , 79 ) ;
+ Border = TRUE ;
+ };
+ PushButton PB_DELETE_COOKIE
+ {
+ Pos = MAP_APPFONT ( 146 , 119 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Löschen" ;
+ Text [ english ] = "~Delete" ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ portuguese_brazilian ] = "Löschen" ;
+ 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_DIS_ENABLE
+ {
+ Pos = MAP_APPFONT ( 204 , 119 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ Text[ chinese_traditional ] = "Cookies";
+ Text[ arabic ] = "ßæßíÒ";
+ Text[ greek ] = "Cookies";
+ Text[ korean ] = "Cookies";
+ Text[ turkish ] = "Cookies";
+ Text[ language_user1 ] = " ";
+};
+ // ******************************************************************
+/*
+ModalDialog RID_CACHE_EXTRA_DLG
+{
+ HelpId = HID_CACHE_EXTRA_DLG ;
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 268 , 91 ) ;
+ Moveable = TRUE ;
+ Text = "Zusätzliche Cache-Einstellungen" ;
+ Text [ ENGLISH ] = "Additional cache settings" ;
+ Text [ english_us ] = "Additional Cache Settings" ;
+ Text [ portuguese_brazilian ] = "Zusätzliche Cache-Einstellungen" ;
+ Text [ swedish ] = "Ytterligare Cache-inställningar" ;
+ Text [ danish ] = "Zusätzliche Cache-Einstellungen" ;
+ Text [ italian ] = "Impostazioni supplementari cache" ;
+ Text [ spanish ] = "Configuración adicional del caché" ;
+ Text [ french ] = "Options supplémentaires Cache" ;
+ Text [ dutch ] = "Overige cache-instellingen" ;
+ Text [ portuguese ] = "Predefinições adicionais de Cache" ;
+ FixedText FT_DESC
+ {
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 200 , 20 ) ;
+ Text = "Zusätzlich können verschiedene Dokumente im Cache gespeichert werden, um das Browsen zu beschleunigen:" ;
+ Text [ English ] = "In addition, sveral documents can be cached to increase speed:" ;
+ WordBreak = TRUE ;
+ Text [ english_us ] = "In addition, various documents can be saved in the cache to increase speed when browsing the Internet:" ;
+ Text [ portuguese_brazilian ] = "Zusätzlich können folgende Dokumente im Cache gespeichert werden, um das Browsen zu beschleunigen." ;
+ Text [ swedish ] = "Dessutom kan följande dokument sparas i cachen för att öka hastigheten vid bläddrandet på Internet:" ;
+ Text [ danish ] = "Zusätzlich können folgende Dokumente im Cache gespeichert werden, um das Browsen zu beschleunigen." ;
+ Text [ italian ] = "I seguenti documenti possono essere salvati nella cache per accelerare la velocità:" ;
+ Text [ spanish ] = "Los documentos siguientes pueden ser guardados en el caché para acelerar la velocidad:" ;
+ Text [ french ] = "De plus, différents documents peuvent être chargés dans le répertoire Cache afin d'accélérer l'accès Internet :" ;
+ Text [ dutch ] = "Bovendien kunnen verschillende documenten in de cache worden opgeslagen om de snelheid te vergroten:" ;
+ Text [ portuguese ] = "Os documentos seguintes também podem ser armazenados em Cache para acelerar a pesquisa." ;
+ };
+ GroupBox GB_DOC
+ {
+ Pos = MAP_APPFONT ( 6 , 30 ) ;
+ Size = MAP_APPFONT ( 200 , 57 ) ;
+ Text = "Dokumente" ;
+ Text [ English ] = "Documents" ;
+ Text [ english_us ] = "Documents" ;
+ Text [ portuguese_brazilian ] = "Dokumente" ;
+ Text [ swedish ] = "Dokument" ;
+ Text [ danish ] = "Dokumente" ;
+ Text [ italian ] = "Documenti" ;
+ Text [ spanish ] = "Dokumente" ;
+ Text [ french ] = "Documents" ;
+ Text [ dutch ] = "Documenten" ;
+ Text [ portuguese ] = "Dokumente" ;
+ };
+ CheckBox CB_EXPIRE
+ {
+ Pos = MAP_APPFONT ( 12 , 42 ) ;
+ Size = MAP_APPFONT ( 180 , 12 ) ;
+ Text = "Dokumente mit abgelaufenem Verfallsdatum" ;
+ Text [ English ] = "Expired documents" ;
+ Text [ english_us ] = "Expired documents" ;
+ Text [ portuguese_brazilian ] = "Dokumente mit abgelaufenem Verfallsdatum" ;
+ Text [ swedish ] = "Dokument med utgångna förfallodatum" ;
+ Text [ danish ] = "Dokumente mit abgelaufenem Verfallsdatum" ;
+ Text [ italian ] = "Documenti con data di scadenza trascorsa" ;
+ Text [ spanish ] = "Documentos que han caducado" ;
+ Text [ french ] = "Documents expirés" ;
+ Text [ dutch ] = "Documenten met overschreden vervaldatum" ;
+ Text [ portuguese ] = "Documentos expirados" ;
+ };
+ CheckBox CB_JSCRIPT
+ {
+ Pos = MAP_APPFONT ( 12 , 57 ) ;
+ Size = MAP_APPFONT ( 180 , 12 ) ;
+ Text = "Dokumente mit JavaScript (soweit möglich)" ;
+ Text [ English ] = "Documents containing JavaScript (as possible)" ;
+ Text [ english_us ] = "Documents containing JavaScript (if possible)" ;
+ Text [ portuguese_brazilian ] = "Dokumente mit JavaScript (soweit möglich)" ;
+ Text [ swedish ] = "Dokument med JavaScript (om möjligt)" ;
+ Text [ danish ] = "Dokumente mit JavaScript (soweit möglich)" ;
+ Text [ italian ] = "Documenti con script Java (per quanto possibile)" ;
+ Text [ spanish ] = "Documentos con JavaScript (si es posible)" ;
+ Text [ french ] = "Documents contenant des scripts Java (si possible)" ;
+ Text [ dutch ] = "Documenten met JavaScript (voorzover mogelijk)" ;
+ Text [ portuguese ] = "Documentos com JavaScript (se possível)" ;
+ };
+ CheckBox CB_INCOMPLETE
+ {
+ Pos = MAP_APPFONT ( 12 , 72 ) ;
+ Size = MAP_APPFONT ( 180 , 12 ) ;
+ Text = "Unvollständig geladene Dokumente" ;
+ Text [ English ] = "Incompletely loaded documents" ;
+ Text [ english_us ] = "Incompletely loaded documents" ;
+ Text [ portuguese_brazilian ] = "Unvollständig geladene Dokumente" ;
+ Text [ swedish ] = "Ofullständigt laddat dokument" ;
+ Text [ danish ] = "Unvollständig geladene Dokumente" ;
+ Text [ italian ] = "Documenti non caricati completamente" ;
+ Text [ spanish ] = "Documentos cargados incompletos" ;
+ Text [ french ] = "Documents incomplètement chargés" ;
+ Text [ dutch ] = "Onvolledig geladen documenten" ;
+ Text [ portuguese ] = "Documentos carregados de forma incompleta" ;
+ };
+ OKButton PB_OK
+ {
+ Pos = MAP_APPFONT ( 215 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ CancelButton PB_CANCEL
+ {
+ Pos = MAP_APPFONT ( 215 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton PB_HELP
+ {
+ Pos = MAP_APPFONT ( 215 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+};
+*/
+
+ErrorBox RID_SVXERR_OPT_PROXYPORTS
+{
+ BUTTONS = WB_OK ;
+ Message = "Ungültiger Wert!\n\nDer Höchstwert einer Portnummer ist 65535.";
+ Message [ English ] = "Ungültiger Wert!\n\nDer Höchstwert einer Portnummer ist 65535.";
+ Message[ english_us ] = "Invalid value!\n\nThe maximum value for a port number is 65535.";
+ Message[ portuguese ] = "Valor incorrecto!\n\nO valor máximo para um número de porta é 65535.";
+ Message[ russian ] = "Íåïðàâèëüíîå çíà÷åíèå!\n\nÌàêñèìàëüíîå çíà÷åíèå íîìåðà ïîðòà - 65535.";
+ Message[ dutch ] = "Ongeldige waarde!\n\nDe hoogste waarde van een poortnummer is 65535.";
+ Message[ french ] = "Valeur incorrecte !\n\nLa valeur maximale d'un numéro de port est 65535.";
+ Message[ spanish ] = "¡Valor no válido!\n\nEl valor máximo de un número de puerto es 65535.";
+ Message[ italian ] = "Valore non valido!\n\nIl valore massimo di una porta è 65535.";
+ Message[ danish ] = "Ugyldig værdi!\n\nEt portnummers højeste værdi er 65535.";
+ Message[ swedish ] = "Ogiltigt värde!\n\nEtt portnummers högsta värde är 65535.";
+ Message[ polish ] = "Nieprawid³owa wartoœæ!\n\nMaksymalny numer portu wynosi 65535.";
+ Message[ portuguese_brazilian ] = "Ungültiger Wert!\n\nDer Höchstwert einer Portnummer ist 65535.";
+ Message[ japanese ] = "”’l‚ª³‚µ‚­‚ ‚è‚Ü‚¹‚ñ!\n\nÎ߰ĔԆ‚ÌÅ‚’l‚Í65535‚Å‚·B";
+ Message[ chinese_simplified ] = "ÎÞЧµÄÊýÖµ£¡\n\nÒ»¸ö¶Ë¿ÚºÅÂëµÄ×î´óÖµÊÇ 65535 ¡£";
+ Message[ chinese_traditional ] = "µL®Äªº¼Æ­È¡I\n\n¤@­Ó°ð¸¹½Xªº³Ì¤j­È¬O65535 ¡C";
+ Message[ arabic ] = "ÞíãÉ ÛíÑ ÕÇáÍÉ!\n\nÇáÞíãÉ ÇáÞÕæì áÑÞã ãäÝÐ åí 65535.";
+ Message[ greek ] = "Ìç Ýãêõñç ôéìÞ!\n\nÇ ìÝãéóôç ôéìÞ áñéèìïý èýñáò åßíáé 65535.";
+ Message[ korean ] = "°ªÀÌ À¯È¿ÇÏÁö ¾ÊÀ½!\n\nÆ÷Æ® ¹øÈ£ÀÇ ÃÖ´ë°ªÀº 65535ÀÓ.";
+ Message[ turkish ] = "Geçersiz deðer!\n\nPort numarasý için en yüksek deðer 65535.";
+ Message[ language_user1 ] = " ";
+};
+
+// RID_SVXDLG_OPT_JAVASCRIPT_DISABLE -----------------------------------------
+
+ModalDialog RID_SVXDLG_OPT_JAVASCRIPT_DISABLE
+{
+ OutputSize = TRUE;
+ Size = MAP_APPFONT( 150, 81 );
+ Moveable = TRUE;
+ Closeable = TRUE;
+ FixedImage IMG_JSCPT_WARNING
+ {
+ Pos = MAP_APPFONT( 6, 6 );
+ Size = MAP_APPFONT( 30, 30 );
+ };
+ FixedText FT_JSCPT_WARNING
+ {
+ Pos = MAP_APPFONT( 39, 6 );
+ Size = MAP_APPFONT( 195, 36 );
+ WordBreak = TRUE;
+ Text = "Bitte bedenken Sie, dass sie mit Java\nauch Javascript abschalten.\n\nWollen Sie Java trotzdem abschalten?";
+ Text [English] = "Please note that with Java\nyou disable Javascript as well.\n\nDo you want to disable Java anyway?";
+ Text [english_us] = "Please note that with Java\nyou disable Javascript as well.\n\nDo you still want to disable Java?";
+ Text [ italian ] = "Vi preghiamo di osservare che con Java\ndisattivate anche lo Java Script.\n\nVolete disattivarlo lo stesso?";
+ Text [ spanish ] = "Tenga en cuenta que junto con Java\ntambién desactivará Javascript.\n\n¿Desea aún desactivar Java?";
+ Text [ french ] = "Veuillez noter qu'en désactivant Java,\nvous désactiverez également le Javascript.\n\nVoulez-vous vraiment poursuivre ?";
+ Text[ portuguese ] = "Note que ao desactivar Java\nestará também a desactivar Javascript.\n\nMesmo assim desactivar?";
+ Text[ russian ] = "Ïîæàëóéñòà, ó÷òèòå, ÷òî îòêëþ÷àÿ Java\nÂû îòêëþ÷èòå è Javascript.\n\nÎòêëþ÷èòü Java íåñìîòðÿ íà ýòî?";
+ Text[ dutch ] = "Wij wijzen u erop dat u met Java\nook Javascript uitschakelt.\n\nWilt u Java toch uitschakelen?";
+ Text[ danish ] = "Bemærk venligst, at du deaktiverer\nJavaScript sammenmed Java.\n\nVil du deaktivere Java alligevel?";
+ Text[ swedish ] = "Tänk på att Du även stänger av\nJavascript tillsammans med Java.\n\nVill Du trots det stänga av Java?";
+ Text[ polish ] = "Proszê uwzglêdnij, ¿e wy³¹czaj¹c Java \nywy³¹czysz równie¿ Javascript. \n\nCzy chcesz mimo to wy³¹czyæ Java?";
+ Text[ portuguese_brazilian ] = "Please note that with Java\nyou disable Javascript as well.\n\nDo you want to disable Java anyway?";
+ Text[ japanese ] = "Java‚¾‚¯‚Å‚È‚­\nJavaScript‚àì“®‚µ‚È‚­‚Ȃ邱‚Æ‚ðl‚¦‚ĉº‚³‚¢B\n\nJava‚𽲯ÁµÌ‚É‚µ‚Ü‚·‚©?";
+ Text[ chinese_simplified ] = "Çë×¢Ò⣺ÔÚʧ»îJava\nʱ»áͬʱʧ»îJavascript¡£\n\nÄú»¹ÊÇҪʧ»îJava £¿";
+ Text[ chinese_traditional ] = "½Ð±zª`·N¥¢¬¡¤F Java ¤ä´©¡A\n¤]´N·|¥¢¬¡Javascript ¥\\¯à¡C\n\nÁÙ¬O­n¥¢¬¡ Java ¡H";
+ Text[ arabic ] = "ÇáÑÌÇÁ ãáÇÍÙÉ Ãäå ÈÅÛáÇÞß áÌÇÝÇ\nÊÞæã ÈÅÛáÇÞ ÌÇÝÇÓßÑíÈÊ ÃíÖÇð.\n\nåá ÊÑíÏ ÅÛáÇÞ ÌÇÝÇ ÈÇáÑÛã ãä Ðáß¿";
+ Text[ greek ] = "Ðáñáêáëþ ðñïóÝîôå üôé ìå ôçí áðåíåñãïðïßçóç ôïõ Java\nãßíåôáé êáé áðåíåñãïðïßçóç ôïõ Javascript.\n\nÈÝëåôå íá ãßíåé áðåíåñãïðïßçóç ôïõ Java;";
+ Text[ korean ] = "Java¿Í ´õºÒ¾î \nJavaScriptµµ »ç¿ë ºÒ°¡´ÉÇØÁø´Ù´Â »ç½Ç¿¡ À¯ÀÇÇϽʽÿÀ. \n\n±×·¡µµ Java¸¦ »ç¿ë ÇØÁ¦ÇϽðڽÀ´Ï±î?";
+ Text[ turkish ] = "Java ile birlikte Javascript'in de\nkapatýlacaðýný dikkate alýn.\n\nYine de Java'yý kapatmak istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_JSCPT_DISABLE
+ {
+ Pos = MAP_APPFONT( 39, 45 );
+ Size = MAP_APPFONT( 195, 12 );
+ Hide = TRUE;
+ Text = "~Diese Warnung in Zukunft nicht mehr anzeigen";
+ Text [English] = "~Don't show warning again";
+ Text[ english_us ] = "~Don't show warning again";
+ Text [ italian ] = "~Non mostrare più questa avvertenza" ;
+ Text [ spanish ] = "~No mostrar más esta advertencia." ;
+ Text [ french ] = "~Ne plus afficher cet avertissement" ;
+ Text[ portuguese ] = "~Não mostrar mais este aviso";
+ Text[ russian ] = "~Ýòî ïðåäóïðåæäåíèå áîëüøå íå ïîêàçûâàòü";
+ Text[ dutch ] = "~Waarschuwing niet meer weergeven";
+ Text[ danish ] = "Vis denne advarsel ikke igen";
+ Text[ swedish ] = "~Visa inte den här varningen mer";
+ Text[ polish ] = "Nie pokazuj wiêcej tego ostrze¿enia";
+ Text[ portuguese_brazilian ] = "~Don't show warning again";
+ Text[ japanese ] = "¡Œã‚±‚ÌŒx‚Í•\\Ž¦‚µ‚È‚¢(~D)";
+ Text[ chinese_simplified ] = "²»ÔÙÏÔʾÕâ¸ö¾¯¸æ(~D)";
+ Text[ chinese_traditional ] = "¤£­n¦AÅã¥Ü³o­Óĵ§i(~D)";
+ Text[ arabic ] = "ÚÏã ÅÙåÇÑ åÐÇ ÇáÊÍÐíÑ ãÑÉ ÃÎÑì Ýí ÇáãÓÊÞÈá";
+ Text[ greek ] = "Íá ìçí åìöáíéóôåß îáíÜ áõôÞ ç ðñïåéäïðïßçóç";
+ Text[ korean ] = "ÀÌ °æ°í¸¦ ¾ÕÀ¸·Î ´Ù½Ã Ç¥½Ã ¾Ê±â(~D)";
+ Text[ turkish ] = "Bu uyarýyý artýk görüntüleme";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_JSCPT_YES
+ {
+ Pos = MAP_APPFONT( 41, 61 );
+ Size = MAP_APPFONT( 50, 14 );
+ };
+ CancelButton BTN_JSCPT_NO
+ {
+ Pos = MAP_APPFONT( 94, 61 );
+ Size = MAP_APPFONT( 50, 14 );
+ DefButton = TRUE;
+ };
+};
+
+ // ******************************************************************* EOF
diff --git a/svx/source/options/optitems.cxx b/svx/source/options/optitems.cxx
new file mode 100644
index 0000000000..2cc25c7af9
--- /dev/null
+++ b/svx/source/options/optitems.cxx
@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ * $RCSfile: optitems.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+// -----------------------------------------------------------------------
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _TOOLS_RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_
+#include <com/sun/star/linguistic/XSpellChecker1.hpp>
+#endif
+
+#define ITEMID_SPELLCHECK 0
+#define ITEMID_HYPHENREGION 0
+
+#include "optitems.hxx"
+#include "dialmgr.hxx"
+#include "svxitems.hrc"
+
+// STATIC DATA -----------------------------------------------------------
+
+TYPEINIT1(SfxSpellCheckItem, SfxPoolItem);
+TYPEINIT1(SfxHyphenRegionItem, SfxPoolItem);
+
+// class SfxSpellCheckItem -----------------------------------------------
+
+SfxSpellCheckItem::SfxSpellCheckItem
+(
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellChecker1 > &xChecker,
+ sal_uInt16 nWhich
+) :
+
+ SfxPoolItem( nWhich )
+{
+ xSpellCheck = xChecker;
+}
+
+// -----------------------------------------------------------------------
+
+SfxSpellCheckItem::SfxSpellCheckItem( const SfxSpellCheckItem& rItem ) :
+
+ SfxPoolItem( rItem ),
+ xSpellCheck( rItem.GetXSpellChecker() )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SfxSpellCheckItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ String& 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:
+ {
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SfxSpellCheckItem::Clone( SfxItemPool* ) const
+{
+ return new SfxSpellCheckItem( *this );
+}
+
+// -----------------------------------------------------------------------
+
+int SfxSpellCheckItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rItem), "unequal types" );
+ return ( xSpellCheck == ( (const SfxSpellCheckItem& )rItem ).GetXSpellChecker() );
+}
+
+// class SfxHyphenRegionItem -----------------------------------------------
+
+SfxHyphenRegionItem::SfxHyphenRegionItem( const sal_uInt16 nId ) :
+
+ SfxPoolItem( nId )
+{
+ nMinLead = nMinTrail = 0;
+}
+
+// -----------------------------------------------------------------------
+
+SfxHyphenRegionItem::SfxHyphenRegionItem( const SfxHyphenRegionItem& rItem ) :
+
+ SfxPoolItem ( rItem ),
+
+ nMinLead ( rItem.GetMinLead() ),
+ nMinTrail ( rItem.GetMinTrail() )
+{
+}
+
+// -----------------------------------------------------------------------
+
+int SfxHyphenRegionItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return ( ( ( (SfxHyphenRegionItem&)rAttr ).nMinLead == nMinLead ) &&
+ ( ( (SfxHyphenRegionItem&)rAttr ).nMinTrail == nMinTrail ) );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SfxHyphenRegionItem::Clone( SfxItemPool* ) const
+{
+ return new SfxHyphenRegionItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SfxHyphenRegionItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ String& 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 += String::CreateFromInt32( nMinLead );
+ rText += String( ResId( RID_SVXITEMS_HYPHEN_MINLEAD, DIALOG_MGR() ) );
+ rText += ',';
+ rText += String::CreateFromInt32( nMinTrail );
+ rText += String( ResId( RID_SVXITEMS_HYPHEN_MINTRAIL, DIALOG_MGR() ) );
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SfxHyphenRegionItem::Create(SvStream& rStrm, sal_uInt16 ) const
+{
+ sal_uInt8 nMinLead, nMinTrail;
+ rStrm >> nMinLead >> nMinTrail;
+ SfxHyphenRegionItem* pAttr = new SfxHyphenRegionItem( Which() );
+ pAttr->GetMinLead() = nMinLead;
+ pAttr->GetMinTrail() = nMinTrail;
+ return pAttr;
+}
+
+// -----------------------------------------------------------------------
+
+SvStream& SfxHyphenRegionItem::Store( SvStream& rStrm, sal_uInt16 ) const
+{
+ rStrm << (sal_uInt8) GetMinLead()
+ << (sal_uInt8) GetMinTrail();
+ return rStrm;
+}
+
+
diff --git a/svx/source/options/optlingu.cxx b/svx/source/options/optlingu.cxx
new file mode 100644
index 0000000000..f8ff9f2c51
--- /dev/null
+++ b/svx/source/options/optlingu.cxx
@@ -0,0 +1,1156 @@
+/*************************************************************************
+ *
+ * $RCSfile: optlingu.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+// include ---------------------------------------------------------------
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.hxx>
+#endif
+#ifndef _SVX_DLGUTIL_HXX
+#include <dlgutil.hxx>
+#endif
+#ifndef _LINGU_LNGPROPS_HHX_
+#include <lingu/lngprops.hxx>
+#endif
+#ifndef _SFX_SFXUNO_HXX
+#include <sfx2/sfxuno.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_DICTIONARYLISTEVENTFLAGS_HPP_
+#include <com/sun/star/linguistic/DictionaryListEventFlags.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_DICTIONARYLISTEVENT_HPP_
+#include <com/sun/star/linguistic/DictionaryListEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYLISTEVENTLISTENER_HPP_
+#include <com/sun/star/linguistic/XDictionaryListEventListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYLIST_HPP_
+#include <com/sun/star/linguistic/XDictionaryList.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XOTHERLINGU_HPP_
+#include <com/sun/star/linguistic/XOtherLingu.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_
+#include <com/sun/star/frame/XStorable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_COMMANDABORTEDEXCEPTION_HPP_
+#include <com/sun/star/ucb/CommandAbortedException.hpp>
+#endif
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#include <sfx2/viewfrm.hxx>
+
+#define _SVX_OPTLINGU_CXX
+
+#include "optlingu.hrc"
+
+#define ITEMID_SPELLCHECK 0
+#define ITEMID_HYPHENREGION 0
+
+#include "optdict.hxx"
+#include "optitems.hxx"
+#include "optlingu.hxx"
+#include "dialmgr.hxx"
+#include "dialogs.hrc"
+#include "helpid.hrc"
+
+#include <ucbhelper/content.hxx>
+
+using namespace ::ucb;
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::linguistic;
+using namespace ::com::sun::star::beans;
+
+#define C2U(cChar) OUString::createFromAscii(cChar)
+#define SVX_MAX_USERDICTS 20
+// static ----------------------------------------------------------------
+
+static const sal_uInt16 nNameLen = 8;
+
+static sal_uInt16 pRanges[] =
+{
+ SID_ATTR_SPELL,
+ SID_ATTR_SPELL,
+ 0
+};
+
+sal_Bool KillFile_Impl( const String& rURL )
+{
+ sal_Bool bRet = sal_True;
+ try
+ {
+ Content aCnt( rURL, Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ aCnt.executeCommand( OUString::createFromAscii( "delete" ), makeAny( sal_Bool( sal_True ) ) );
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "KillFile: CommandAbortedException" );
+ bRet = sal_False;
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "KillFile: Any other exception" );
+ bRet = sal_False;
+ }
+
+ return bRet;
+}
+
+/*-----------------02.06.97 07:38-------------------
+ Ext. Linguistik auswaehlen
+--------------------------------------------------*/
+
+// class SvxLinguTabPage -------------------------------------------------
+
+SvxLinguTabPage::SvxLinguTabPage( Window* pParent,
+ const SfxItemSet& rSet ):
+
+ SfxTabPage( pParent, ResId( RID_SFXPAGE_LINGU, DIALOG_MGR() ), rSet ),
+
+ aCapsBtn ( this, ResId( BTN_CAPS ) ),
+ aNumsBtn ( this, ResId( BTN_NUMS ) ),
+ aUpLowBtn ( this, ResId( BTN_UPLOW ) ),
+ aSpellSpecialBtn ( this, ResId( BTN_SPELL_SPECIAL ) ),
+ aAllLangBtn ( this, ResId( BTN_ALL_LANG ) ),
+ aAuditBox ( this, ResId( GB_AUDIT ) ),
+ aDictsLB ( this, ResId( LB_DICTS ) ),
+ aDictsTbx ( this, ResId( TB_DICTS ) ),
+ aDictsBox ( this, ResId( GB_DICTS ) ),
+ aAutoCheckBtn ( this, ResId( BTN_AUTO_SPELLING ) ),
+ aMarkOffBtn ( this, ResId( BTN_MARK_OFF ) ),
+ aAutoSpellBox ( this, ResId( GB_AUTO_SPELLING ) ),
+ aGermanSpellBox ( this, ResId( GB_GERMAN_SPELLING ) ),
+ aGermanPreReformBtn ( this, ResId( BTN_GERMAN_PRE_REFORM) ),
+ aPreBreakText ( this, ResId( FT_PREBREAK ) ),
+ aPreBreakEdit ( this, ResId( ED_PREBREAK ) ),
+ aAfterBreakText ( this, ResId( FT_AFTERBREAK ) ),
+ aAfterBreakEdit ( this, ResId( ED_AFTERBREAK ) ),
+ aAutoBtn ( this, ResId( BTN_AUTO ) ),
+ aSpecialBtn ( this, ResId( BTN_SPECIAL ) ),
+ aRulesBox ( this, ResId( GB_RULES ) ),
+ aLanguageText ( this, ResId( FT_LANGUAGE ) ),
+ aLanguageLB ( this, ResId( LB_LANGUAGE ) ),
+ aMaxWarning(ResId(STR_WARNING))
+
+{
+ Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ if (xDicList.is())
+ aDics = xDicList->getDictionaries();
+ aDictsTbx.SetSelectHdl( LINK( this, SvxLinguTabPage, BoxSelectHdl_Impl ) );
+ Size aSiz = aDictsTbx.CalcWindowSizePixel();
+ aDictsTbx.SetSizePixel( aSiz );
+
+ const SfxSpellCheckItem* pItem = 0;
+ SfxItemState eItemState = SFX_ITEM_UNKNOWN;
+
+ eItemState = rSet.GetItemState( GetWhich( SID_ATTR_SPELL ),
+ sal_False, (const SfxPoolItem**)&pItem );
+
+ // handelt es sich um ein Default-Item?
+ if ( eItemState == SFX_ITEM_DEFAULT )
+ pItem = (const SfxSpellCheckItem*)&(rSet.Get( GetWhich( SID_ATTR_SPELL ) ) );
+ else if ( eItemState == SFX_ITEM_DONTCARE )
+ pItem = NULL;
+
+
+ // fill box for DefaultLanguage (?) with possible languages
+ const sal_uInt16 nLangCnt = SvxGetSelectableLanguages().getLength();
+ const util::Language *pLang = SvxGetSelectableLanguages().getConstArray();
+ // start with 1 to skip LANGUAGE_NONE
+ for ( sal_uInt16 i = 1; i < nLangCnt; i++ )
+ {
+ sal_uInt16 nPos = aLanguageLB.InsertEntry( GetLanguageString( pLang[i] ) );
+ aLanguageLB.SetEntryData( nPos, (void*)(sal_uInt32)i );
+ }
+
+ // disable button if IgnoreAllList has no elements
+
+ aAutoCheckBtn.SetClickHdl( LINK( this, SvxLinguTabPage, CheckHdl_Impl ) );
+ aDictsLB.SetCheckButtonHdl( LINK( this, SvxLinguTabPage, CheckDicHdl_Impl));
+ aDictsLB.SetSelectHdl( LINK( this, SvxLinguTabPage, SelectDicHdl_Impl));
+
+ // disable controls that can't be used due to missing services
+ if (!SvxGetLinguPropertySet().is())
+ Enable( sal_False ); // disable everything
+ else if (!xDicList.is())
+ { // disable dictionary and dictionary list controls
+ aDictsLB .Enable( sal_False );
+ aDictsTbx.Enable( sal_False );
+ aDictsBox.Enable( sal_False );
+ }
+
+ FreeResource();
+}
+
+// -----------------------------------------------------------------------
+
+SvxLinguTabPage::~SvxLinguTabPage()
+{
+}
+
+//------------------------------------------------------------------------
+
+sal_uInt16* SvxLinguTabPage::GetRanges()
+{
+ return pRanges;
+}
+
+//------------------------------------------------------------------------
+
+SfxTabPage* SvxLinguTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet )
+{
+ return ( new SvxLinguTabPage( pParent, rAttrSet ) );
+}
+
+//------------------------------------------------------------------------
+Any lcl_Bool2Any(BOOL bVal)
+{
+ Any aRet(&bVal, ::getBooleanCppuType());
+ return aRet;
+}
+sal_Bool lcl_Bool2Any(Any& rVal)
+{
+ return *(sal_Bool*)rVal.getValue();
+}
+sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
+{
+ sal_Bool bModified = sal_True; // !!!!
+
+ if (!SvxGetLinguPropertySet().is())
+ return sal_False;
+
+ //
+ // build list of active dictionaries
+ // (There has to be at least one active positive dictionary
+ // this usually is the "standard" dictionary. It will be created
+ // if it does not already exist.)
+ //
+
+ Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+
+ const Reference< XDictionary > *pDic = aDics.getConstArray();
+ const sal_uInt16 nCount = aDics.getLength();
+ const sal_uInt16 nSize = (sal_uInt16)aDictsLB.GetEntryCount();
+ //
+ sal_Bool bIsAnyPosDicActive = sal_False;
+ for (sal_uInt16 j = 0; j < nCount; j++)
+ {
+ Reference< XDictionary1 > xDic( pDic[j], UNO_QUERY );
+ if (!xDic.is())
+ continue;
+
+ sal_Bool bNegativ = xDic->getDictionaryType() == DictionaryType_NEGATIVE;
+ const String aName( ::GetDicInfoStr( xDic->getName(),
+ xDic->getLanguage(),
+ bNegativ ) );
+
+ sal_Bool bActivate = sal_False;
+ for ( sal_uInt16 i = 0; i < nSize; ++i )
+ {
+ // Dictionary in der awt::Selection -> Aktivieren
+ if ( aDictsLB.IsChecked(i) && aName == aDictsLB.GetText(i) )
+ {
+ // any dictionary is persistent not readonly and may hold
+ // positive entries?
+ Reference< frame::XStorable > xStor( xDic, UNO_QUERY );
+ if (xStor.is() && xStor->hasLocation() && !xStor->isReadonly())
+ bIsAnyPosDicActive =
+ xDic->getDictionaryType() != DictionaryType_NEGATIVE;
+
+ bActivate = sal_True;
+ break;
+ }
+ }
+ if (xDic != SvxGetIgnoreAllList())
+ xDic->setActive( bActivate );
+ }
+
+ // force new spelling and flushing of spell caches
+ //! current implementation is a workaround until the correct
+ //! interface is implemented.
+ //TL:TODO: use XPropertyChangeListener mechanism to do this
+ Reference< XDictionary1 > xDic( SvxGetIgnoreAllList() );
+ if (xDic.is())
+ {
+ OUString aTmp( C2U("v_7xj4") );
+ sal_Bool bOk = xDic->add( aTmp, sal_False, OUString(), LANGUAGE_GERMAN);
+ if (bOk)
+ xDic->remove( aTmp );
+ }
+#ifdef NOT_YET_IMPLEMENTED
+ //!!! functionality needs to be implemented via XPropertySet listeners!
+
+ sal_Bool bSpellAllAgain = sal_False;
+ sal_Bool bSpellWrongAgain = sal_False;
+ if( aNumsBtn.IsChecked() != aNumsBtn.GetSavedValue() )
+ {
+ if( aNumsBtn.IsChecked() )
+ bSpellAllAgain = sal_True;
+ else
+ bSpellWrongAgain = sal_True;
+ }
+ if( aCapsBtn.IsChecked() != aCapsBtn.GetSavedValue() )
+ {
+ if( aCapsBtn.IsChecked() )
+ bSpellAllAgain = sal_True;
+ else
+ bSpellWrongAgain = sal_True;
+ }
+ if( aUpLowBtn.IsChecked() != aUpLowBtn.GetSavedValue() )
+ {
+ if( aUpLowBtn.IsChecked() )
+ bSpellAllAgain = sal_True;
+ else
+ bSpellWrongAgain = sal_True;
+ }
+ if( aAllLangBtn.IsChecked() != aAllLangBtn.GetSavedValue() )
+ {
+ if( aAllLangBtn.IsChecked() )
+ bSpellWrongAgain = sal_True;
+ else
+ bSpellAllAgain = sal_True;
+ }
+ pSpell->SetSpellWrongAgain( bSpellWrongAgain );
+ pSpell->SetSpellAllAgain( bSpellAllAgain );
+#endif //NOT_YET_IMPLEMENTED
+
+ Reference< XPropertySet > xProp( SvxGetLinguPropertySet() );
+ if (xProp.is())
+ {
+ // set spellchecking properties
+ xProp->setPropertyValue( C2U(UPN_IS_SPELL_WITH_DIGITS), lcl_Bool2Any(aNumsBtn.IsChecked()) );
+ xProp->setPropertyValue( C2U(UPN_IS_SPELL_UPPER_CASE), lcl_Bool2Any(aCapsBtn.IsChecked()) );
+ xProp->setPropertyValue( C2U(UPN_IS_SPELL_CAPITALIZATION), lcl_Bool2Any(aUpLowBtn.IsChecked()) );
+ xProp->setPropertyValue( C2U(UPN_IS_SPELL_IN_ALL_LANGUAGES), lcl_Bool2Any(aAllLangBtn.IsChecked()) );
+ xProp->setPropertyValue( C2U(UPN_IS_SPELL_SPECIAL), lcl_Bool2Any(aSpellSpecialBtn.IsChecked()) );
+
+ // set hyphenation properties
+ xProp->setPropertyValue( C2U(UPN_IS_HYPH_AUTO), lcl_Bool2Any(aAutoBtn.IsChecked()) );
+ xProp->setPropertyValue( C2U(UPN_IS_HYPH_SPECIAL), lcl_Bool2Any(aSpecialBtn.IsChecked()) );
+
+ xProp->setPropertyValue( C2U(UPN_IS_GERMAN_PRE_REFORM), lcl_Bool2Any(aGermanPreReformBtn.IsChecked()) );
+ }
+
+ // erstmal immer putten!
+ rCoreSet.Put( SfxBoolItem( SID_SPELL_MODIFIED, bModified ) );
+
+ const String &rPreStr = aPreBreakEdit.GetText(),
+ &rAfterStr = aAfterBreakEdit.GetText();
+
+ const String &rSavedPreStr = aPreBreakEdit.GetSavedValue(),
+ &rSavedAfterStr = aAfterBreakEdit.GetSavedValue();
+
+ if ( rPreStr != rSavedPreStr || rAfterStr != rSavedAfterStr )
+ {
+ SfxHyphenRegionItem aHyp( GetWhich( SID_ATTR_HYPHENREGION ) );
+ aHyp.GetMinLead() =
+ (sal_uInt8)aPreBreakEdit.Denormalize( aPreBreakEdit.GetValue() );
+ aHyp.GetMinTrail() =
+ (sal_uInt8)aAfterBreakEdit.Denormalize( aAfterBreakEdit.GetValue() );
+ rCoreSet.Put( aHyp );
+ }
+
+ // language
+ sal_uInt16 nPos = aLanguageLB.GetSelectEntryPos();
+ sal_uInt16 nLang = (sal_uInt16)(sal_uInt32)aLanguageLB.GetEntryData( nPos );
+
+ if ( nPos != aLanguageLB.GetSavedValue() &&
+ nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ SfxUInt16Item aFmtLang( GetWhich( SID_ATTR_LANGUAGE ),
+ SvxGetSelectableLanguages().getConstArray()[ nLang ] );
+ rCoreSet.Put( aFmtLang );
+ }
+
+
+ // Autom. Rechtschreibung
+ const SfxPoolItem* pOld = GetOldItem( rCoreSet, SID_AUTOSPELL_CHECK );
+
+ if ( !pOld || ( (SfxBoolItem*)pOld )->GetValue() !=
+ aAutoCheckBtn.IsChecked() )
+ {
+ rCoreSet.Put( SfxBoolItem( GetWhich( SID_AUTOSPELL_CHECK ),
+ aAutoCheckBtn.IsChecked() ) );
+ bModified |= sal_True;
+ }
+ pOld = GetItem( rCoreSet, SID_AUTOSPELL_MARKOFF );
+
+ if ( aMarkOffBtn.IsEnabled() &&
+ ( !pOld || ( (SfxBoolItem*)pOld )->GetValue() !=
+ aMarkOffBtn.IsChecked() ) )
+ {
+ rCoreSet.Put( SfxBoolItem( GetWhich( SID_AUTOSPELL_MARKOFF ),
+ aMarkOffBtn.IsChecked() ) );
+ bModified |= sal_True;
+ }
+
+ return bModified;
+}
+
+//------------------------------------------------------------------------
+
+void SvxLinguTabPage::Reset( const SfxItemSet& rSet )
+{
+ UpdateBox_Impl();
+
+ // #44483#
+ // form::component::CheckBox f"ur die Benutzerw"orterb"ucher
+ // anhand der Vorgaben des SpellChecker setzen
+ Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+
+ const sal_uInt16 nCount = aDics.getLength();
+ const Reference< XDictionary > *pDic = aDics.getConstArray();
+ const sal_uInt16 nSize = (sal_uInt16)aDictsLB.GetEntryCount();
+ //
+ for ( sal_uInt16 i = 0; i < nSize; ++i )
+ {
+ for ( sal_uInt16 j = 0; j < nCount; ++j )
+ {
+ Reference< XDictionary1 > xDic( pDic[j], UNO_QUERY );
+ if (!xDic.is())
+ continue;
+
+ sal_Bool bNegativ = xDic->getDictionaryType() == DictionaryType_NEGATIVE;
+ const String aName( ::GetDicInfoStr( xDic->getName(),
+ xDic->getLanguage(),
+ bNegativ ) );
+
+ if ( xDic->isActive() && aName == aDictsLB.GetText(i) )
+ break;
+ }
+ aDictsLB.CheckEntryPos( i, j != nCount );
+ }
+ // #44483#
+
+ Reference< XPropertySet > xProp ( SvxGetLinguPropertySet() );
+ if (xProp.is())
+ {
+ // Optionen aus dem Speller einstellen
+ aCapsBtn .Check( *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_SPELL_UPPER_CASE) ).getValue() );
+ aNumsBtn .Check( *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_SPELL_WITH_DIGITS) ).getValue() );
+ aUpLowBtn .Check( *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_SPELL_CAPITALIZATION) ).getValue() );
+ aAllLangBtn .Check( *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_SPELL_IN_ALL_LANGUAGES) ).getValue() );
+ aSpellSpecialBtn.Check( *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_SPELL_SPECIAL) ).getValue() );
+
+ aAutoBtn.Check( *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_HYPH_AUTO) ).getValue() );
+ aSpecialBtn.Check( *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_HYPH_SPECIAL) ).getValue() );
+
+ aGermanPreReformBtn.Check( *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_GERMAN_PRE_REFORM) ).getValue() );
+ }
+
+ sal_uInt16 nWhich = GetWhich( SID_ATTR_HYPHENREGION );
+
+ if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SfxHyphenRegionItem& rHyp =
+ (const SfxHyphenRegionItem&)rSet.Get( nWhich );
+ aPreBreakEdit.SetValue(
+ aPreBreakEdit.Normalize( rHyp.GetMinLead() ) );
+ aAfterBreakEdit.SetValue(
+ aAfterBreakEdit.Normalize( rHyp.GetMinTrail() ) );
+ }
+
+ // Sprache
+ nWhich = GetWhich( SID_ATTR_LANGUAGE );
+ aLanguageLB.SetNoSelection();
+
+ if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet.Get( nWhich );
+ DBG_ASSERT( (LanguageType)rItem.GetValue() != LANGUAGE_SYSTEM,
+ "LANGUAGE_SYSTEM nicht erlaubt!" );
+
+ if ( (LanguageType)rItem.GetValue() != LANGUAGE_DONTKNOW )
+ {
+ sal_uInt16 nLang = SvxGetLanguagePos( SvxGetSelectableLanguages(),
+ rItem.GetValue() );
+
+ for ( sal_uInt16 i = 0; i < aLanguageLB.GetEntryCount(); ++i )
+ {
+ if ( (sal_uInt16)(sal_uInt32)aLanguageLB.GetEntryData(i) == nLang )
+ {
+ aLanguageLB.SelectEntryPos(i);
+ break;
+ }
+ }
+ }
+ }
+
+ // Autom. Rechtschreibung
+ const SfxPoolItem* pItem = GetItem( rSet, SID_AUTOSPELL_CHECK );
+
+ if ( pItem )
+ aAutoCheckBtn.Check( ( (SfxBoolItem*)pItem )->GetValue() );
+ pItem = GetItem( rSet, SID_AUTOSPELL_MARKOFF );
+
+ if ( pItem )
+ aMarkOffBtn.Check( ( (SfxBoolItem*)pItem )->GetValue() );
+
+ CheckHdl_Impl( 0 );
+
+ aNumsBtn.SaveValue();
+ aCapsBtn.SaveValue();
+ aUpLowBtn.SaveValue();
+ aAllLangBtn.SaveValue();
+ aPreBreakEdit.SaveValue();
+ aAfterBreakEdit.SaveValue();
+ aLanguageLB.SaveValue();
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxLinguTabPage, NewHdl_Impl, Button *, EMPTYARG )
+{
+ SvxNewDictionaryDialog* pDlg = new SvxNewDictionaryDialog( this, xSpell );
+
+ Reference< XDictionary1 > xNewDic;
+
+ if ( pDlg->Execute() == RET_OK )
+ xNewDic = pDlg->GetNewDictionary();
+ delete pDlg;
+
+ if ( xNewDic.is() )
+ {
+ // add new Dictionary to snapshot list
+ sal_uInt16 nNewIdx = aDics.getLength();
+ aDics.realloc( nNewIdx + 1 );
+ aDics.getArray()[ nNewIdx ] = Reference< XDictionary > ( xNewDic, UNO_QUERY );
+ const Reference< XDictionary > *pDic = aDics.getConstArray();
+
+ sal_Bool bNegativ = xNewDic->getDictionaryType() == DictionaryType_NEGATIVE;
+ const String aName( ::GetDicInfoStr( xNewDic->getName(),
+ xNewDic->getLanguage(),
+ bNegativ ) );
+ aDictsLB.InsertEntry( aName, nNewIdx );
+ if ( aDictsLB.GetCheckedEntryCount() < SVX_MAX_USERDICTS )
+ aDictsLB.CheckEntryPos( nNewIdx );
+ aDictsLB.SelectEntryPos( nNewIdx );
+ aDictsLB.MakeVisible( aDictsLB.GetEntry( nNewIdx ) );
+ }
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxLinguTabPage, EditHdl_Impl, Button *, EMPTYARG )
+{
+ String sName;
+ sal_uInt16 nId = aDictsLB.GetSelectEntryPos();
+
+ if ( nId != LISTBOX_ENTRY_NOTFOUND )
+ sName = aDictsLB.GetText( nId );
+
+ SvxEditDictionaryDialog* pDlg =
+ new SvxEditDictionaryDialog( this, sName, xSpell );
+ pDlg->Execute();
+
+ UpdateBox_Impl();
+
+ aDictsLB.MakeVisible(aDictsLB.GetEntry(pDlg->GetSelectedDict()));
+ aDictsLB.SelectEntryPos(pDlg->GetSelectedDict());
+
+ delete pDlg;
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+void lcl_SequenceRemoveElementAt(
+ Sequence<Reference<XDictionary > >& rEntries, int nPos )
+{
+ //TODO: helper for SequenceRemoveElementAt available?
+ if(nPos >= rEntries.getLength())
+ return;
+ Sequence<Reference<XDictionary> > aTmp(rEntries.getLength() - 1);
+ Reference<XDictionary >* pOrig = rEntries.getArray();
+ Reference<XDictionary >* pTemp = aTmp.getArray();
+ int nOffset = 0;
+ for(int i = 0; i < aTmp.getLength(); i++)
+ {
+ if(nPos == i)
+ nOffset++;
+ pTemp[i] = pOrig[i + nOffset];
+ }
+
+ rEntries = aTmp;
+}
+
+IMPL_LINK( SvxLinguTabPage, DeleteHdl_Impl, Button *, EMPTYARG )
+{
+ if ( RET_NO ==
+ QueryBox( this, ResId( RID_SFXQB_DELDICT, DIALOG_MGR() ) ).Execute() )
+ return 0;
+
+ //Eintrag aus der Listbox loeschen und am SpellCheck abmelden
+ sal_uInt16 nId = aDictsLB.GetSelectEntryPos();
+
+ if ( nId != LISTBOX_ENTRY_NOTFOUND )
+ {
+ String aDicName( aDics.getConstArray()[ nId ]->getName() );
+
+ Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ Reference< XDictionary > xDic;
+ if (xDicList.is())
+ {
+ xDic = xDicList->getDictionaryByName( aDicName);
+ }
+
+ if (xDic.is())
+ {
+ if (xDic == SvxGetIgnoreAllList())
+ {
+ xDic->clear();
+ }
+ else
+ {
+ xDicList->removeDictionary( xDic );
+
+ // remove Dictionary from snapshot list
+ lcl_SequenceRemoveElementAt( aDics, nId);
+
+ Reference< frame::XStorable > xStor( xDic, UNO_QUERY );
+ if ( xStor->hasLocation() && !xStor->isReadonly() )
+ {
+ String sURL = xStor->getLocation();
+ INetURLObject aObj(sURL);
+ DBG_ASSERT( aObj.GetProtocol() == INET_PROT_FILE, "non-file URLs cannot be deleted" );
+ if ( aObj.GetProtocol() == INET_PROT_FILE )
+ {
+ KillFile_Impl( aObj.GetMainURL() );
+ }
+
+// CntAnchorRef xAnchor =
+// new CntAnchor( NULL, U2S( xStor->getLocation() ) );
+// xAnchor->Put( SfxBoolItem(WID_DELETE, sal_False) );
+ }
+ }
+ }
+
+
+ if (xDic.is() && xDic != SvxGetIgnoreAllList())
+ aDictsLB.RemoveEntry( nId );
+ }
+
+ if ( aDictsLB.GetEntryCount() > 0 )
+ {
+ sal_uInt16 nNewId = Min( nId, (sal_uInt16)( aDictsLB.GetEntryCount() - 1 ) );
+ aDictsLB.SelectEntryPos( nNewId );
+ }
+ else
+ {
+ aDictsTbx.EnableItem( TID_EDIT, sal_False );
+ aDictsTbx.EnableItem( TID_DELETE, sal_False );
+ }
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxLinguTabPage, EraseHdl_Impl, Button *, EMPTYARG )
+{
+ if ( RET_YES ==
+ QueryBox( this, SVX_RES( RID_SFXQB_DEL_IGNORELIST ) ).Execute() )
+ {
+ if (SvxGetIgnoreAllList().is())
+ SvxGetIgnoreAllList()->clear();
+ }
+ return 1;
+}
+IMPL_LINK_INLINE_END( SvxLinguTabPage, EraseHdl_Impl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxLinguTabPage, CheckHdl_Impl, CheckBox *, EMPTYARG )
+{
+ if ( !aAutoCheckBtn.IsChecked() )
+ aMarkOffBtn.Disable();
+ else
+ aMarkOffBtn.Enable();
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( SvxLinguTabPage, CheckDicHdl_Impl, SvxCheckListBox *, EMPTYARG )
+{
+ sal_uInt16 nMax=0;
+ sal_Bool bFlag=sal_False;
+
+ if(aDictsLB.GetCheckedEntryCount()>SVX_MAX_USERDICTS)
+ {
+ InfoBox aInfoBox(this,aMaxWarning);
+ aInfoBox.Execute();
+
+ SvLBoxEntry* pEntry=aDictsLB.GetCurEntry();
+ SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
+
+ if(pItem!=NULL)
+ {
+ pItem->SetStateHilighted(sal_False);
+
+ }
+
+ aDictsLB.EndSelection();
+ aDictsLB.CheckEntryPos( aDictsLB.GetSelectEntryPos(),sal_False);
+ }
+
+ // let CheckBox for IgnoreAllList always be checked
+ sal_uInt16 nSel = aDictsLB.GetSelectEntryPos();
+ if (nSel != LISTBOX_ENTRY_NOTFOUND
+ && aDictsLB.GetEntryData( nSel ) == (void *) 1)
+ {
+ aDictsLB.CheckEntryPos( nSel, sal_True );
+ }
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( SvxLinguTabPage, SelectDicHdl_Impl, SvxCheckListBox *, pBox )
+{
+ DBG_ASSERT( pBox == &aDictsLB, "svx : unexpected argument" );
+
+ BOOL bEnableDelete = TRUE;
+
+ sal_uInt16 nId = aDictsLB.GetSelectEntryPos();
+ if ( nId != LISTBOX_ENTRY_NOTFOUND )
+ {
+ Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ if (xDicList.is())
+ {
+ String aDicName( aDics.getConstArray()[ nId ]->getName() );
+
+ Reference< frame::XStorable > xStor(
+ xDicList->getDictionaryByName( aDicName ), UNO_QUERY );
+ if (xStor.is() && xStor->isReadonly())
+ bEnableDelete = FALSE;
+ }
+ }
+
+ aDictsTbx.EnableItem( TID_DELETE, bEnableDelete);
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxLinguTabPage, BoxSelectHdl_Impl, ToolBox *, pBox )
+{
+ const sal_uInt16 nEntry = pBox->GetCurItemId();
+
+ if ( TID_NEW == nEntry )
+ NewHdl_Impl( 0 );
+ else if ( TID_EDIT == nEntry )
+ EditHdl_Impl( 0 );
+ else if ( TID_DELETE == nEntry )
+ DeleteHdl_Impl( 0 );
+ return 1;
+}
+// ----------------------------------------------------------------------
+
+void SvxLinguTabPage::UpdateBox_Impl()
+{
+ // gecheckte Eintr"age merken
+ SvUShorts aArr;
+
+ sal_uInt16 i;
+ sal_uInt16 nOldEntryCount = (sal_uInt16)aDictsLB.GetEntryCount();
+ for ( i = 0; i < nOldEntryCount; ++i )
+ if ( aDictsLB.IsChecked(i) )
+ aArr.Insert( i, aArr.Count() );
+
+ const sal_Int32 nCount = aDics.getLength();
+ const Reference< XDictionary > *pDic = aDics.getConstArray();
+ aDictsLB.Clear();
+ for ( i = 0; i < nCount; ++i )
+ {
+ Reference< XDictionary1 > xDic( pDic[i], UNO_QUERY );
+ if (!xDic.is())
+ continue;
+
+ sal_Bool bNegativ = xDic->getDictionaryType() == DictionaryType_NEGATIVE;
+ const String aName( ::GetDicInfoStr( xDic->getName(),
+ xDic->getLanguage(),
+ bNegativ ) );
+ aDictsLB.InsertEntry( aName );
+
+ // Neue Eintr"age evtl. checken
+ if ( nOldEntryCount && i >= nOldEntryCount
+ && xDic->isActive())
+ aDictsLB.CheckEntryPos( (sal_uInt16)aDictsLB.GetEntryCount() - 1 );
+
+ // mark entry for IgnoreAllList as not being allowed to uncheck
+ if (xDic == SvxGetIgnoreAllList())
+ {
+ aDictsLB.SetEntryData( aDictsLB.GetEntryCount() - 1, (void *) 1 );
+ }
+ }
+
+ // gemerkte Eintr"age wieder checken
+ for ( i = 0; i < aArr.Count(); ++i )
+ aDictsLB.CheckEntryPos( aArr[i] );
+
+ if ( aDictsLB.GetEntryCount() )
+ {
+ aDictsTbx.EnableItem( TID_EDIT, sal_True );
+ aDictsTbx.EnableItem( TID_DELETE, sal_True );
+ }
+ else
+ {
+ aDictsTbx.EnableItem( TID_EDIT, sal_False );
+ aDictsTbx.EnableItem( TID_DELETE, sal_False );
+ }
+
+ aDictsLB.SetHighlightRange();
+ aDictsLB.SelectEntryPos( 0 ); //! may implicitly change TID_DELETE
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLinguTabPage::HideGroups( sal_uInt16 nGrp )
+{
+ if ( 0 != ( GROUP_SPELLING & nGrp ) )
+ {
+ aCapsBtn.Hide();
+ aNumsBtn.Hide();
+ aUpLowBtn.Hide();
+ aAllLangBtn.Hide();
+ aAuditBox.Hide();
+ }
+
+ if ( 0 != ( GROUP_HYPHEN & nGrp ) )
+ {
+ aPreBreakText.Hide();
+ aPreBreakEdit.Hide();
+ aAfterBreakText.Hide();
+ aAfterBreakEdit.Hide();
+ aAutoBtn.Hide();
+ aSpecialBtn.Hide();
+ aRulesBox.Hide();
+ }
+
+ if ( 0 != ( GROUP_LANGUAGE & nGrp ) )
+ {
+ aLanguageText.Hide();
+ aLanguageLB.Hide();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLinguTabPage::HideSpellCheckSpecial()
+{
+ aSpellSpecialBtn.Hide();
+}
+
+/* -----------------------------27.01.00 12:14--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void SvxLinguTabPage::EnableAutoSpelling()
+{
+ aAutoCheckBtn.Show();
+ aMarkOffBtn.Show();
+ aAutoSpellBox.Show();
+}
+
+/*-- 27.01.00 12:17:13---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+
+SvxExternalLinguTabPage::SvxExternalLinguTabPage(Window* pParent, const SfxItemSet& rSet) :
+ SfxTabPage(pParent, ResId( RID_SVXPAGE_EXTERNAL_LINGU, DIALOG_MGR() ), rSet),
+ aOptionsPB( this, ResId(PB_OPTIONS)),
+ aLinguGB( this, ResId(GB_LINGU )),
+ aLinguLB( this, ResId(LB_LINGU )),
+ aStdSpellCB(this, ResId(CB_STDSPELL)),
+ aStdThesCB( this, ResId(CB_STDTHES)),
+ aStdHyphCB( this, ResId(CB_STDHYPH)),
+ aSettingsGB(this, ResId(GB_SETTINGS))
+{
+ FreeResource();
+ Reference< lang::XMultiServiceFactory > xMgr = utl::getProcessServiceFactory();
+ Reference< XInterface > xInst = xMgr->createInstance( C2U("com.sun.star.linguistic.OtherLingu") );
+ xOtherLingu = Reference< XOtherLingu > (xInst, UNO_QUERY);
+ if(xOtherLingu.is())
+ {
+ sal_Int16 nLinguCount = xOtherLingu->getCount();
+ for(sal_uInt16 i = 0; i < nLinguCount; i++)
+ {
+ aLinguLB.InsertEntry(xOtherLingu->getIdentifier(i));
+ }
+ aLinguLB.SelectEntryPos(0);
+
+ aLinguLB.SetSelectHdl(LINK(this, SvxExternalLinguTabPage, LBSelectHdl_Impl));
+ aOptionsPB.SetClickHdl(LINK(this, SvxExternalLinguTabPage, OptDlgHdl_Impl));
+
+ xInst = xMgr->createInstance( C2U("com.sun.star.linguistic.LinguProperties") );
+ xLinguProps = Reference< XPropertySet > (xInst, UNO_QUERY);
+ if(xLinguProps.is())
+ {
+ Any aIndex = xLinguProps->getPropertyValue(C2U("OtherLinguIndex"));
+ sal_Int16 nIndex;
+ aIndex >>= nIndex;;
+ if(nIndex >= 0 && nIndex < nLinguCount)
+ {
+ aLinguLB.SelectEntryPos(nIndex + 1);
+
+ Any aStdSpell = xLinguProps->getPropertyValue(C2U("IsStandardSpellChecker"));
+ aStdSpellCB.Check(lcl_Bool2Any(aStdSpell));
+
+ Any aStdThes = xLinguProps->getPropertyValue(C2U("IsStandardThesaurus"));
+ aStdThesCB.Check(lcl_Bool2Any(aStdThes));
+
+ Any aStdHyph = xLinguProps->getPropertyValue(C2U("IsStandardHyphenator"));
+ aStdHyphCB.Check(lcl_Bool2Any(aStdHyph));
+ }
+
+ }
+ LBSelectHdl_Impl(&aLinguLB);
+/*
+ virtual sal_Int16 getCount() throw( RuntimeException );
+ virtual ::rtl::OUString getIdentifier(sal_Int16 nIndex) throw( IllegalArgumentException, RuntimeException );
+ virtual sal_Bool hasOptionDialog(sal_Int16 nIndex) throw( IllegalArgumentException, RuntimeException );
+ virtual sal_Int32 startOptionDialog(sal_Int16 nIndex, sal_Int32 pParent) throw( IllegalArgumentException, RuntimeException );
+ virtual Reference< XHyphenator > getHyphenator(sal_Int16 nIndex) throw( IllegalArgumentException, RuntimeException );
+ virtual Reference< XSpellChecker > getSpellChecker(sal_Int16 nIndex) throw( IllegalArgumentException, RuntimeException );
+ virtual Reference< XThesaurus > getThesaurus(sal_Int16 nIndex) throw( IllegalArgumentException, RuntimeException );
+
+*/
+ }
+ else
+ {
+ aOptionsPB .Enable(sal_False);
+ aLinguGB .Enable(sal_False);
+ aLinguLB .Enable(sal_False);
+ aStdSpellCB .Enable(sal_False);
+ aStdThesCB .Enable(sal_False);
+ aStdHyphCB .Enable(sal_False);
+ aSettingsGB .Enable(sal_False);
+ }
+}
+/*-- 27.01.00 12:17:13---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+SvxExternalLinguTabPage::~SvxExternalLinguTabPage()
+{
+}
+/*-- 27.01.00 12:17:14---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+SfxTabPage* SvxExternalLinguTabPage::Create( Window* pParent, const SfxItemSet& rSet )
+{
+ return new SvxExternalLinguTabPage(pParent, rSet);
+}
+/*-- 27.01.00 12:17:14---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+sal_Bool SvxExternalLinguTabPage::FillItemSet( SfxItemSet& rSet )
+{
+ sal_uInt16 nSelectPos = aLinguLB.GetSelectEntryPos();
+ if( xLinguProps.is() &&
+ nSelectPos != aLinguLB.GetSavedValue() ||
+ (nSelectPos &&
+ ( aStdSpellCB.IsChecked() != aStdSpellCB.GetSavedValue() ||
+ aStdHyphCB.IsChecked() != aStdHyphCB.GetSavedValue() ||
+ aStdThesCB.IsChecked() != aStdThesCB.GetSavedValue())
+ )
+ )
+ {
+ sal_Int16 nTmpIndex = nSelectPos ? nSelectPos - 1: -1;
+
+ Any aOldIndex = xLinguProps->getPropertyValue(C2U("OtherLinguIndex"));
+ sal_Int16 nOldIndex;
+ aOldIndex >>= nOldIndex;
+ if (nOldIndex != nTmpIndex)
+ {
+ // force new spelling and flushing of spell caches
+ //! current implementation is a workaround until the correct
+ //! interface is implemented.
+ //TL:TODO: use XPropertyChangeListener mechanism to do this
+ Reference< XDictionary1 > xDic( SvxGetIgnoreAllList() );
+ if (xDic.is())
+ {
+ OUString aTmp( C2U("v_7xj4") );
+ sal_Bool bOk = xDic->add( aTmp, sal_False, OUString(), LANGUAGE_GERMAN);
+ if (bOk)
+ xDic->remove( aTmp );
+ }
+ }
+
+ if (xOtherLingu.is())
+ xOtherLingu->selectLinguisticByIndex( nTmpIndex );
+
+ Any aIndex;
+ aIndex <<= nTmpIndex;
+ xLinguProps->setPropertyValue(C2U("OtherLinguIndex"), aIndex);
+ if(aStdSpellCB.IsEnabled())
+ {
+ xLinguProps->setPropertyValue(C2U("IsStandardSpellChecker"),
+ lcl_Bool2Any(aStdSpellCB.IsChecked()));
+ }
+
+ if(aStdThesCB.IsEnabled())
+ {
+ xLinguProps->setPropertyValue(C2U("IsStandardThesaurus"),
+ lcl_Bool2Any(aStdThesCB.IsChecked()));
+ }
+
+ if(aStdHyphCB.IsEnabled())
+ {
+ xLinguProps->setPropertyValue(C2U("IsStandardHyphenator"),
+ lcl_Bool2Any(aStdHyphCB.IsChecked()));
+ }
+
+ }
+
+ // The spellchecker may have changed or an external linguistics option
+ // page may have changed relevant options or have added/deleted words from
+ // their dictionaries.
+ // Thus the only safe choice is to trigger spellchecking again.
+ //TL:TODO: should only be called if the external linguistics
+ // option dialog was used or the item-state has changed.
+ if ( SfxViewFrame::Current() && SfxViewFrame::Current()->GetDispatcher() )
+ SfxViewFrame::Current()->GetDispatcher()->Execute( SID_SPELLCHECKER_CHANGED, SFX_CALLMODE_ASYNCHRON );
+
+ return sal_True;
+}
+/*-- 27.01.00 12:17:14---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void SvxExternalLinguTabPage::Reset( const SfxItemSet& rSet )
+{
+ aStdHyphCB.SaveValue();
+ aStdThesCB.SaveValue();
+ aStdSpellCB.SaveValue();
+ aLinguLB.SaveValue();
+}
+/* -----------------------------27.01.00 13:26--------------------------------
+
+ ---------------------------------------------------------------------------*/
+IMPL_LINK(SvxExternalLinguTabPage, LBSelectHdl_Impl, ListBox*, pLB)
+{
+ if(!xOtherLingu.is())
+ return 0;
+
+ sal_uInt16 nSel = pLB->GetSelectEntryPos();
+
+ aOptionsPB.Enable(nSel > 0 && xOtherLingu->hasOptionDialog( nSel - 1));
+ sal_uInt8 nUse = 0;
+ if( nSel > 0 )
+ {
+ --nSel;
+ aStdSpellCB.Enable( xOtherLingu->hasSpellChecker(nSel) );
+ aStdThesCB.Enable( xOtherLingu->hasThesaurus(nSel) );
+ aStdHyphCB.Enable( xOtherLingu->hasHyphenator(nSel) );
+ }
+ else
+ {
+ aStdSpellCB.Enable( sal_False );
+ aStdThesCB.Enable( sal_False );
+ aStdHyphCB.Enable( sal_False );
+ }
+ return 0;
+}
+/* -----------------------------27.01.00 13:26--------------------------------
+
+ ---------------------------------------------------------------------------*/
+IMPL_LINK(SvxExternalLinguTabPage, OptDlgHdl_Impl, PushButton*, pButton)
+{
+ sal_uInt16 nSel = aLinguLB.GetSelectEntryPos();
+ if(nSel && xOtherLingu.is())
+ {
+ if(xOtherLingu->hasOptionDialog( nSel - 1 ))
+ {
+ xOtherLingu->selectLinguisticByIndex( nSel - 1 );
+ xOtherLingu->startOptionDialog( 0 );
+ }
+ }
+ return 0;
+}
+
+
+
diff --git a/svx/source/options/optlingu.hrc b/svx/source/options/optlingu.hrc
new file mode 100644
index 0000000000..0abb1ff338
--- /dev/null
+++ b/svx/source/options/optlingu.hrc
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * $RCSfile: optlingu.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// defines ---------------------------------------------------------------
+
+#define BTN_CAPS 10
+#define BTN_NUMS 11
+#define BTN_UPLOW 12
+#define BTN_SPELL_SPECIAL 13
+#define BTN_ALL_LANG 14
+#define GB_AUDIT 15
+
+#define LB_DICTS 20
+#define BTN_NEW 21
+#define BTN_EDIT 22
+#define BTN_DELETE 23
+#define TB_DICTS 24
+#define GB_DICTS 25
+
+#define BTN_AUTO_SPELLING 30
+#define BTN_MARK_OFF 31
+#define GB_AUTO_SPELLING 32
+#define PB_EXT_LINGU 33
+#define FT_EXT_LINGU 34
+
+#define FT_PREBREAK 40
+#define ED_PREBREAK 41
+#define FT_AFTERBREAK 42
+#define ED_AFTERBREAK 43
+#define BTN_AUTO 44
+#define BTN_SPECIAL 45
+#define GB_RULES 46
+
+#define FT_LANGUAGE 51
+#define LB_LANGUAGE 52
+
+#define TID_NEW 60
+#define TID_EDIT 61
+#define TID_DELETE 62
+#define STR_WARNING 63
+
+#define PB_OK 70
+#define PB_CANCEL 71
+#define PB_HELP 72
+#define GB_LINGU 73
+#define LB_LINGU 74
+#define PB_OPTIONS 75
+#define CB_STDSPELL 76
+#define CB_STDTHES 77
+#define CB_STDHYPH 78
+#define GB_SETTINGS 79
+
+#define GB_GERMAN_SPELLING 80
+#define BTN_GERMAN_PRE_REFORM 81
+
+
+
diff --git a/svx/source/options/optlingu.src b/svx/source/options/optlingu.src
new file mode 100644
index 0000000000..45e557dfb8
--- /dev/null
+++ b/svx/source/options/optlingu.src
@@ -0,0 +1,1418 @@
+/*************************************************************************
+ *
+ * $RCSfile: optlingu.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ------------------------------------------------------------------
+#include <sfx2/sfx.hrc>
+#include "helpid.hrc"
+#include "optlingu.hrc"
+#include "dialogs.hrc"
+ // pragma -------------------------------------------------------------------
+
+ // RID_ITEMLIST_LINGU -------------------------------------------------------
+ImageList RID_ITEMLIST_LINGU
+{
+ ImageBitmap = Bitmap { File = "lingu.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ IdList = { TID_NEW ; TID_EDIT ; TID_DELETE ; };
+ IdCount = { 3 ; };
+};
+ // RID_SFXPAGE_LINGU --------------------------------------------------------
+TabPage RID_SFXPAGE_LINGU
+{
+ HelpId = HID_OPTIONS_LINGU ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Linguistik" ;
+ Text [ ENGLISH ] = "Linguistic" ;
+ Text [ norwegian ] = "Linguistisk" ;
+ Text [ italian ] = "Linguistica" ;
+ Text [ english_us ] = "Language" ;
+ Text [ spanish ] = "Lingüística" ;
+ Text [ french ] = "Linguistique" ;
+ Text [ dutch ] = "Linguïstiek" ;
+ Text [ swedish ] = "Lingvistik" ;
+ Text [ danish ] = "Lingvistik" ;
+ Text [ portuguese_brazilian ] = "Linguistik" ;
+ Text [ portuguese ] = "Linguística" ;
+ CheckBox BTN_CAPS
+ {
+ Pos = MAP_APPFONT ( 12 , 11 ) ;
+ Size = MAP_APPFONT ( 99 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Großgeschriebene Wörter : ~Gro˜geschriebene W÷rter */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Großgeschriebene Wörter : ~Gro˜geschriebene W÷rter */
+ Text = "~Großgeschriebene Wörter" ;
+ Text [ ENGLISH ] = "~Capital words" ;
+ Text [ norwegian ] = "~Ord med store bokstaver" ;
+ Text [ italian ] = "~Parole maiuscole" ;
+ Text [ portuguese_brazilian ] = "~Palavras em maiúsculas" ;
+ Text [ portuguese ] = "~Palavras maiúsculas" ;
+ Text [ english_us ] = "~All caps" ;
+ Text [ spanish ] = "~Palabras en mayúsculas" ;
+ Text [ french ] = "les ~mots écrits en majuscules" ;
+ Text [ dutch ] = "~Woorden met hoofdletters" ;
+ Text [ swedish ] = "Or~d med stora bokstäver" ;
+ Text [ danish ] = "Ord med store bogstaver" ;
+ Text[ chinese_simplified ] = "´óдµÄµ¥´Ê(~P)";
+ Text[ russian ] = "Ñëîâà èç ïðîïèñíûõ áóêâ";
+ Text[ polish ] = "S³owa pisane du¿ymi literami";
+ Text[ japanese ] = "‚·‚ׂđ啶Žš‚Ì’PŒê(~A)";
+ Text[ chinese_traditional ] = "¤j¼g³æ¦r(~P)";
+ Text[ arabic ] = "ÇáßáãÇÊ ÇáãßÊæÈÉ ÈÃÍÑÝ ßÈíÑÉ";
+ Text[ greek ] = "ËÝîåéò ìå êåöáëáßá ãñÜììáôá";
+ Text[ korean ] = "¸ðµÎ ´ë¹®ÀÚ(~A)";
+ Text[ turkish ] = "Büyük harfli sözcükler";
+ };
+ CheckBox BTN_NUMS
+ {
+ Pos = MAP_APPFONT ( 12 , 21 ) ;
+ Size = MAP_APPFONT ( 99 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Wörter mit Ziffern : ~W÷rter mit Ziffern */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Wörter mit Ziffern : ~W÷rter mit Ziffern */
+ Text = "~Wörter mit Ziffern" ;
+ Text [ ENGLISH ] = "~Words with numbers " ;
+ Text [ norwegian ] = "~Ord med tall " ;
+ Text [ italian ] = "Par~ole con numeri" ;
+ Text [ portuguese_brazilian ] = "~Palavras com números" ;
+ Text [ portuguese ] = "~Palavras com números" ;
+ Text [ english_us ] = "~Words with numbers" ;
+ Text [ spanish ] = "Pala~bras con cifras" ;
+ Text [ french ] = "les mots comportant des ~chiffres" ;
+ Text [ dutch ] = "~Woorden met cijfers" ;
+ Text [ swedish ] = "Ord ~med siffror" ;
+ Text [ danish ] = "Ord med tal" ;
+ Text[ chinese_simplified ] = "º¬ÓÐÊý×ֵĴÊ(~W)";
+ Text[ russian ] = "Ñëîâà ñ öèôðàìè";
+ Text[ polish ] = "S³owa z cy~frami";
+ Text[ japanese ] = "”Žš‚ðŠÜ‚Þ’PŒê(~W)";
+ Text[ chinese_traditional ] = "§t¦³¼Æ¦rªºµü(~W)";
+ Text[ arabic ] = "ÇáßáãÇÊ ÇáÊí ÊÍÊæí Úáì ÃÑÞÇã";
+ Text[ greek ] = "ËÝîåéò ìå áñéèìïýò";
+ Text[ korean ] = "¼ö¸¦ Æ÷ÇÔÇÑ ´Ü¾î(~W)";
+ Text[ turkish ] = "Rakamlý sözcükler";
+ };
+ CheckBox BTN_UPLOW
+ {
+ Pos = MAP_APPFONT ( 12 , 31 ) ;
+ Size = MAP_APPFONT ( 99 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? G~roß- und Kleinschreibung : G~ro˜- und Kleinschreibung */
+ /* ### ACHTUNG: Neuer Text in Resource? G~roß- und Kleinschreibung : G~ro˜- und Kleinschreibung */
+ Text = "G~roß- und Kleinschreibung" ;
+ Text [ ENGLISH ] = "~Upper and lower case " ;
+ Text [ norwegian ] = "~Stor og liten skrift " ;
+ Text [ italian ] = "M~aiuscole e minuscole" ;
+ Text [ portuguese_brazilian ] = "~Caixa alta e baixa" ;
+ Text [ portuguese ] = "~Maiúsculas & Minúsculas" ;
+ Text [ english_us ] = "~Case sensitive" ;
+ Text [ spanish ] = "Ma~yúsculas/minúsculas" ;
+ Text [ french ] = "la ~casse" ;
+ Text [ dutch ] = "~Hoofd-/kleine letters belangrijk" ;
+ Text [ swedish ] = "Sto~ra och små bokstäver" ;
+ Text [ danish ] = "Store og små bogstaver" ;
+ Text[ chinese_simplified ] = "×Öĸ´óСд(~C)";
+ Text[ russian ] = "Ó÷èòûâàòü ðåãèñòð";
+ Text[ polish ] = "Ma³e i du¿e litery";
+ Text[ japanese ] = "‘啶Žš/¬•¶Žš‚ð‹æ•Ê(~C)";
+ Text[ chinese_traditional ] = "¦r¥À¤j¤p¼g(~C)";
+ Text[ arabic ] = "ÇáßÊÇÈÉ ÈÃÍÑÝ ßÈíÑÉ Ãæ ÕÛíÑÉ";
+ Text[ greek ] = "ÐåæÜ-Êåöáëáßá";
+ Text[ korean ] = "´ë¹®ÀÚ¿Í ¼Ò¹®ÀÚ(~C)";
+ Text[ turkish ] = "Büyük/küçük yazým";
+ };
+ CheckBox BTN_SPELL_SPECIAL
+ {
+ Pos = MAP_APPFONT ( 12 , 41 ) ;
+ Size = MAP_APPFONT ( 99 , 10 ) ;
+ // ### ACHTUNG: Neuer Text in Resource? So~nderbereiche prüfen : Sonderbereiche prüfen
+ /* ### ACHTUNG: Neuer Text in Resource? So~nderbereiche prüfen : So~nderbereiche pr³fen */
+ /* ### ACHTUNG: Neuer Text in Resource? So~nderbereiche prüfen : So~nderbereiche pr³fen */
+ Text = "So~nderbereiche prüfen" ;
+ Text [ English ] = "P~roof special regions" ;
+ Text [ dutch ] = "Speciale bereiken ~controleren" ;
+ Text [ english_us ] = "Check ~special regions" ;
+ Text [ italian ] = "Controlla aree ~speciali" ;
+ Text [ spanish ] = "Re~visar áreas especiales" ;
+ Text [ french ] = "les z~ones spéciales" ;
+ Text [ swedish ] = "Spe~cialområden" ;
+ Text [ danish ] = "Kontroller særområder" ;
+ Text [ portuguese_brazilian ] = "Verificar regiões especiais" ;
+ Text [ portuguese ] = "Verificar áreas e~speciais" ;
+ Text[ chinese_simplified ] = "¼ì²éÌØÊâµÄÇøÓò(~S)";
+ Text[ russian ] = "Ïðîâåðêà ñïåö. îáëàñòåé";
+ Text[ polish ] = "SprawdŸ obszary specjalne";
+ Text[ japanese ] = "“Á•Ê”͈͂̽ÍßÙÁª¯¸(~S)";
+ Text[ chinese_traditional ] = "Àˬd¯S®íªº°Ï°ì(~S)";
+ Text[ arabic ] = "ÇáãäÇØÞ ÇáÎÇÕÉ";
+ Text[ greek ] = "¸ëåã÷ïò åéäéêþ~í ðåñéï÷þí";
+ Text[ korean ] = "Ưº°¿µ¿ª °Ë»ç(~S)";
+ Text[ turkish ] = "Özel bölümleri denetle";
+ };
+ CheckBox BTN_ALL_LANG
+ {
+ Pos = MAP_APPFONT ( 12 , 51 ) ;
+ Size = MAP_APPFONT ( 99 , 10 ) ;
+ Text = "A~lle Sprachen" ;
+ Text [ English ] = "All languages" ;
+ Text [ english_us ] = "All la~nguages" ;
+ Text [ portuguese_brazilian ] = "A~lle Sprachen" ;
+ Text [ swedish ] = "Alla s~pråk" ;
+ Text [ danish ] = "Alle sprog" ;
+ Text [ italian ] = "~Tutte le lingue" ;
+ Text [ spanish ] = "~Todos los idiomas" ;
+ Text [ french ] = "t~outes les langues" ;
+ Text [ dutch ] = "A~lle talen" ;
+ Text [ portuguese ] = "~Todas as línguas" ;
+ Text[ chinese_simplified ] = "È«²¿ÓïÑÔ(~N)";
+ Text[ russian ] = "Âñå ÿçûêè";
+ Text[ polish ] = "Wszystkie jêzyki";
+ Text[ japanese ] = "‚·‚ׂĂ̌¾Œê(~A)";
+ Text[ chinese_traditional ] = "©Ò¦³ªº»y¨¥(~A)";
+ Text[ arabic ] = "ßá ÇááÛÇÊ";
+ Text[ greek ] = "¼ëåò ôéò ãëþóóåò";
+ Text[ korean ] = "¸ðµç ¾ð¾î(~N)";
+ Text[ turkish ] = "Tüm diller";
+ };
+ GroupBox GB_AUDIT
+ {
+ Pos = MAP_APPFONT ( 6 , 2 ) ;
+ Size = MAP_APPFONT ( 109 , 61 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Prüfen : Pr³fen */
+ /* ### ACHTUNG: Neuer Text in Resource? Prüfen : Pr³fen */
+ Text = "Prüfen" ;
+ Text [ ENGLISH ] = "Check" ;
+ Text [ norwegian ] = "Kontroller" ;
+ Text [ italian ] = "Verifica" ;
+ Text [ portuguese_brazilian ] = "Verificar" ;
+ Text [ portuguese ] = "Verificar" ;
+ Text [ english_us ] = "Check spelling" ;
+ Text [ spanish ] = "Revisar" ;
+ Text [ french ] = "Vérifier" ;
+ Text [ dutch ] = "Controleren" ;
+ Text [ swedish ] = "Kontrollera" ;
+ Text [ danish ] = "Kontroller" ;
+ Text[ chinese_simplified ] = "¼ì²éƴд";
+ Text[ russian ] = "Ïðîâåðÿòü";
+ Text[ polish ] = "SprawdŸ";
+ Text[ japanese ] = "½ÍßÙÁª¯¸";
+ Text[ chinese_traditional ] = "Àˬd«÷¦r";
+ Text[ arabic ] = "ÊØÈíÞ ÇáÊÏÞíÞ ÇáÅãáÇÆí Úáì";
+ Text[ greek ] = "¸ëåã÷ïò";
+ Text[ korean ] = "¸ÂÃã¹ý °Ë»ç";
+ Text[ turkish ] = "Yazým denetimi";
+ };
+ Control LB_DICTS
+ {
+ HelpId = HID_OPTLINGU_CTL_DICTS ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 126 , 11 ) ;
+ Size = MAP_APPFONT ( 105 , 42 ) ;
+ ClipChildren = TRUE ;
+ };
+ ToolBox TB_DICTS
+ {
+ HelpId = HID_OPTLINGU_TOOLBOX ;
+ Align = BOXALIGN_LEFT ;
+ Pos = MAP_APPFONT ( 235 , 11 ) ;
+ ItemImageList = RID_ITEMLIST_LINGU ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ HelpId = HID_OPTIONS_DICT_NEW ;
+ Identifier = TID_NEW ;
+ Text = "Neu" ;
+ Text [ English ] = "New" ;
+ Text [ english_us ] = "New" ;
+ Text [ dutch ] = "Nieuw" ;
+ Text [ italian ] = "Nuovo" ;
+ Text [ spanish ] = "Nuevo" ;
+ Text [ french ] = "Nouveau" ;
+ Text [ swedish ] = "Nytt" ;
+ Text [ danish ] = "Ny" ;
+ Text [ portuguese ] = "Novo" ;
+ Text [ portuguese_brazilian ] = "Novo" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Neues Wörterbuch anlegen. : Neues W÷rterbuch anlegen. */
+ Text[ chinese_simplified ] = "ÐÂÔö";
+ Text[ russian ] = "Ñîçäàòü";
+ Text[ polish ] = "Nowy";
+ Text[ japanese ] = "V‹Kì¬";
+ Text[ chinese_traditional ] = "·s¼W";
+ Text[ arabic ] = "ÌÏíÏ";
+ Text[ greek ] = "Äçìéïõñãßá";
+ Text[ korean ] = "»õ·Î ¸¸µé±â";
+ Text[ turkish ] = "Yeni";
+ };
+ ToolBoxItem
+ {
+ HelpId = HID_OPTIONS_DICT_EDIT ;
+ Identifier = TID_EDIT ;
+ Text = "Bearbeiten" ;
+ Text [ English ] = "Edit" ;
+ Text [ english_us ] = "Edit" ;
+ Text [ dutch ] = "Bewerken" ;
+ Text [ italian ] = "Modifica" ;
+ Text [ spanish ] = "Editar" ;
+ Text [ french ] = "Edition" ;
+ Text [ swedish ] = "Redigera" ;
+ Text [ danish ] = "Rediger" ;
+ Text [ portuguese ] = "Editar" ;
+ Text [ portuguese_brazilian ] = "Bearbeiten" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Wörterbuch bearbeiten. : W÷rterbuch bearbeiten. */
+ Text[ chinese_simplified ] = "±à¼­";
+ Text[ russian ] = "Ïðàâêà";
+ Text[ polish ] = "Edytuj";
+ Text[ japanese ] = "•ÒW";
+ Text[ chinese_traditional ] = "½s¿è";
+ Text[ arabic ] = "ÊÍÑíÑ";
+ Text[ greek ] = "Åðåîåñãáóßá";
+ Text[ korean ] = "ÆíÁý";
+ Text[ turkish ] = "Düzenle";
+ };
+ ToolBoxItem
+ {
+ HelpId = HID_OPTIONS_DICT_DELETE ;
+ Identifier = TID_DELETE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Löschen : L÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Löschen : L÷schen */
+ Text = "Löschen" ;
+ Text [ English ] = "Delete" ;
+ Text [ english_us ] = "Delete" ;
+ Text [ dutch ] = "Wissen" ;
+ Text [ italian ] = "Elimina" ;
+ Text [ spanish ] = "Eliminar" ;
+ Text [ french ] = "Suppression" ;
+ Text [ swedish ] = "Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ portuguese ] = "Eliminar" ;
+ Text [ portuguese_brazilian ] = "Löschen" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Wörterbuch löschen. : W÷rterbuch l÷schen. */
+ Text[ chinese_simplified ] = "ɾ³ý";
+ Text[ russian ] = "Óäàëèòü";
+ Text[ polish ] = "Usuñ";
+ Text[ japanese ] = "íœ";
+ Text[ chinese_traditional ] = "§R°£";
+ Text[ arabic ] = "ÍÐÝ";
+ Text[ greek ] = "ÄéáãñáöÞ";
+ Text[ korean ] = "»èÁ¦";
+ Text[ turkish ] = "Sil";
+ };
+ };
+ };
+ GroupBox GB_DICTS
+ {
+ Pos = MAP_APPFONT ( 121 , 2 ) ;
+ Size = MAP_APPFONT ( 133 , 55 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Benutzerwörterbücher : Benutzerw÷rterb³cher */
+ /* ### ACHTUNG: Neuer Text in Resource? Benutzerwörterbücher : Benutzerw÷rterb³cher */
+ Text = "Benutzerwörterbücher" ;
+ Text [ ENGLISH ] = "Personal Dictionaries" ;
+ Text [ english_us ] = "Custom dictionaries" ;
+ Text [ dutch ] = "Gebruikerswoordenboek" ;
+ Text [ italian ] = "Dizionari utente" ;
+ Text [ spanish ] = "Diccionarios de usuario" ;
+ Text [ french ] = "Dictionnaires de l'utilisateur" ;
+ Text [ swedish ] = "Användarordböcker" ;
+ Text [ danish ] = "Brugerordbøger" ;
+ Text [ portuguese_brazilian ] = "Benutzerwörterbücher" ;
+ Text [ portuguese ] = "Dicionário do utilizador" ;
+ Text[ chinese_simplified ] = "Óû§´Êµä";
+ Text[ russian ] = "Ñëîâàðè ïîëüçîâàòåëÿ";
+ Text[ polish ] = "W³asne s³owniki";
+ Text[ japanese ] = "Õ°»Þ°Ž«‘";
+ Text[ chinese_traditional ] = "¦Û­qµü¨å";
+ Text[ arabic ] = "ÞæÇãíÓ ÇáãÓÊÎÏã";
+ Text[ greek ] = "ËåîéêÜ ÷ñÞóôç";
+ Text[ korean ] = "»ç¿ëÀÚÁ¤ÀÇ »çÀü";
+ Text[ turkish ] = "Kullanýcý sözlükleri";
+ };
+ CheckBox BTN_AUTO_SPELLING
+ {
+ Pos = MAP_APPFONT ( 12 , 74 ) ;
+ Size = MAP_APPFONT ( 99 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Automatische Prüfung : ~Automatische Pr³fung */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Automatische Prüfung : ~Automatische Pr³fung */
+ Text = "~Automatische Prüfung" ;
+ Text [ English ] = "~Online Checking" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "Check spelling as yo~u type" ;
+ Text [ italian ] = "Controllo automatico" ;
+ Text [ spanish ] = "Rev~isión automática" ;
+ Text [ french ] = "~Vérification automatique" ;
+ Text [ dutch ] = "~Automatische controle" ;
+ Text [ swedish ] = "~Automatisk kontroll" ;
+ Text [ danish ] = "Automatisk kontrol" ;
+ Text [ portuguese_brazilian ] = "~Automatische Prüfung" ;
+ Text [ portuguese ] = "~Correcção automática" ;
+ Text[ chinese_simplified ] = "×Ô¶¯¼ì²éƴд(~U)";
+ Text[ russian ] = "Àâòîïðîâåðêà";
+ Text[ polish ] = "Automaty~czne sprawdzanie pisowni";
+ Text[ japanese ] = "Ž©“®½ÍßÙÁª¯¸(~C)";
+ Text[ chinese_traditional ] = "¦Û°ÊÀˬd«÷¦r(~C)";
+ Text[ arabic ] = "ÊÏÞíÞ ÅãáÇÆí ÃËäÇÁ ÇáßÊÇÈÉ";
+ Text[ greek ] = "Áõôüìáôïò Ýëåã÷ïò";
+ Text[ korean ] = "ÀÚµ¿ ¸ÂÃã¹ý °Ë»ç(~U)";
+ Text[ turkish ] = "Otomatik kontrol";
+ };
+ CheckBox BTN_MARK_OFF
+ {
+ Pos = MAP_APPFONT ( 12 , 84 ) ;
+ Size = MAP_APPFONT ( 99 , 10 ) ;
+ Text = "~Kennung ausblenden" ;
+ Text [ English ] = "Fade out the marking" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "Don't mark ~errors" ;
+ Text [ italian ] = "Nascondi sottolineatura errori" ;
+ Text [ spanish ] = "~No marcar errores" ;
+ Text [ french ] = "Masquer le soulignage des ~fautes " ;
+ Text [ dutch ] = "~Fouten niet markeren" ;
+ Text [ swedish ] = "Dölj felmar~kering" ;
+ Text [ danish ] = "Skjul fejlmarkering" ;
+ Text [ portuguese ] = "~Não marcar erros" ;
+ Text [ portuguese_brazilian ] = "~Kennung ausblenden" ;
+ Text[ chinese_simplified ] = "ÒþÈëºìÉ«ÍäÇúÏß(~E)";
+ Text[ russian ] = "Íå ïîìå÷àòü îøèáêè";
+ Text[ polish ] = "Ukryj identyfikator";
+ Text[ japanese ] = "”gü‚ð•\\Ž¦‚µ‚È‚¢(~E)";
+ Text[ chinese_traditional ] = "Áô¤J¬õ¦âÅs¦±½u(~E)";
+ Text[ arabic ] = "ÚÏã ÊÍÏíÏ ÇáÃÎØÇÁ";
+ Text[ greek ] = "×~ùñßò óÞìáíóç óöáëìÜôùí";
+ Text[ korean ] = "¿À·ù ¼û±â±â(~E)";
+ Text[ turkish ] = "Hatalarý iþaretleme";
+ };
+ GroupBox GB_AUTO_SPELLING
+ {
+ Pos = MAP_APPFONT ( 6 , 64 ) ;
+ Size = MAP_APPFONT ( 109 , 32 ) ;
+ Text = "Autom. Rechtschreibung" ;
+ Text [ English ] = "Online Spellchecking" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "AutoSpellcheck" ;
+ Text [ italian ] = "Controllo ortografico automatico" ;
+ Text [ spanish ] = "Ortografía automática" ;
+ Text [ french ] = "Orthographe" ;
+ Text [ dutch ] = "Autom. spellingcontrole" ;
+ Text [ swedish ] = "Automatisk rättstavning" ;
+ Text [ danish ] = "Automatisk stavekontrol" ;
+ Text [ portuguese_brazilian ] = "Autom. Rechtschreibung" ;
+ Text [ portuguese ] = "Verificação automática da ortografia" ;
+ Text[ chinese_simplified ] = "×Ô¶¯¼ì²éƴд";
+ Text[ russian ] = "Àâòîïðîâåðêà îðôîãðàôèè";
+ Text[ polish ] = "Automatyczne sprawdzanie pisowni";
+ Text[ japanese ] = "Ž©“®•¶ÍZ³";
+ Text[ chinese_traditional ] = "¦Û°ÊÀˬd«÷¦r";
+ Text[ arabic ] = "ÊÏÞíÞ ÅãáÇÆí ÊáÞÇÆí";
+ Text[ greek ] = "Áõôüìáôïò Ýëåã÷ïò ïñèïãñáößáò";
+ Text[ korean ] = "ÀÚµ¿ ¸ÂÃã¹ý";
+ Text[ turkish ] = "Otomatik yazým kýlavuzu";
+ Text[ language_user1 ] = "Auf Dt. sollte Rechtschreibprüfung stehen";
+ };
+ CheckBox BTN_GERMAN_PRE_REFORM
+ {
+ Pos = MAP_APPFONT ( 12 , 106 ) ;
+ Size = MAP_APPFONT ( 99 , 10 ) ;
+ Text = "Alte Rechtschrei~bung" ;
+ Text [ English ] = "Pre Reform" ;
+ Text[ english_us ] = "~German spelling - old";
+ Text[ portuguese ] = "Antiga ~ortografia alemã";
+ Text[ russian ] = "Ïðåæíèå ïðàâèëà îðôîãðàôèè";
+ Text[ greek ] = "ÐáëéÜ ïñèïãñá~ößá";
+ Text[ dutch ] = "~Oude spelling";
+ Text[ french ] = "~Ancienne orthographe";
+ Text[ spanish ] = "~Antigua ortografía";
+ Text[ italian ] = "Ortografia tedesca pre-riforma";
+ Text[ danish ] = "Gammel tysk retskrivning";
+ Text[ swedish ] = "Gammal rättstavning";
+ Text[ polish ] = "Stara pisownia";
+ Text[ portuguese_brazilian ] = "Pre Reform";
+ Text[ japanese ] = "‹ŒÄ޲Œ곑–@i~Gj";
+ Text[ korean ] = "ÀÌÀü ¸ÂÃã¹ý(~G)";
+ Text[ chinese_simplified ] = "¾ÉÕý×Ö·¨";
+ Text[ chinese_traditional ] = "ÂÂ¥¿¦rªk(¼w»y)";
+ Text[ arabic ] = "ÊÏÞíÞ ÅãáÇÆí ÃáãÇäí ÞÏíã";
+ Text[ turkish ] = "Eski yazým kurallarý (Almanca)";
+ };
+ GroupBox GB_GERMAN_SPELLING
+ {
+ Pos = MAP_APPFONT ( 6 , 97 ) ;
+ Size = MAP_APPFONT ( 109 , 20 ) ;
+ Text = "Deutsche Rechtschreibung" ;
+ Text [ English ] = "German Spelling" ;
+ Text[ english_us ] = "German spelling";
+ Text[ portuguese ] = "Ortografia alemã";
+ Text[ russian ] = "Îðôîãðàôèÿ íåìåöêîãî ÿçûêà";
+ Text[ greek ] = "ÃåñìáíéêÞ ïñèïãñáößá";
+ Text[ dutch ] = "Duitse spelling";
+ Text[ french ] = "Orthographe allemande";
+ Text[ spanish ] = "~Ortografía alemana";
+ Text[ italian ] = "Controllo ortografico tedesco";
+ Text[ danish ] = "Tysk retskrivning";
+ Text[ swedish ] = "Tysk rättstavning";
+ Text[ polish ] = "Niemiecka pisownia";
+ Text[ portuguese_brazilian ] = "German Spelling";
+ Text[ japanese ] = "Ä޲Œ곑–@";
+ Text[ korean ] = "µ¶ÀÏ¾î ¸ÂÃã¹ý";
+ Text[ chinese_simplified ] = "µÂÓïÕý×Ö·¨";
+ Text[ chinese_traditional ] = "¼w»y¥¿¦rªk";
+ Text[ arabic ] = "ÊÏÞíÞ ÅãáÇÆí ÃáãÇäí";
+ Text[ turkish ] = "Yeni yazým kurallarý (Almanca)";
+ };
+ PushButton PB_EXT_LINGU
+ {
+ Pos = MAP_APPFONT ( 6 , 102 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "E~xtern..." ;
+ Text [ English ] = "E~xternal..." ;
+ Hide = TRUE ;
+ Text [ english_us ] = "E~xternal..." ;
+ Text [ portuguese_brazilian ] = "E~xtern..." ;
+ Text [ swedish ] = "E~xtern..." ;
+ Text [ danish ] = "Ekstern..." ;
+ Text [ italian ] = "E~sterno..." ;
+ Text [ spanish ] = "E~xterno..." ;
+ Text [ french ] = "E~xterne..." ;
+ Text [ dutch ] = "E~xtern..." ;
+ Text [ portuguese ] = "E~xterno..." ;
+ Text[ chinese_simplified ] = "ÍâÀ´(~X)...";
+ Text[ russian ] = "Âíåøíèé...";
+ Text[ polish ] = "Zewnêtrzny...";
+ Text[ japanese ] = "ŠO•”(~X)...";
+ Text[ chinese_traditional ] = "¥~³¡(~X)...";
+ Text[ arabic ] = "ÎÇÑÌí...";
+ Text[ greek ] = "Å~îùôåñéêÜ...";
+ Text[ korean ] = "¿ÜºÎ(~X)...";
+ Text[ turkish ] = "Harici...";
+ };
+ FixedText FT_EXT_LINGU
+ {
+ Pos = MAP_APPFONT ( 65 , 105 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Standard" ;
+ Text [ English ] = "Standard" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "Standard" ;
+ Text [ portuguese_brazilian ] = "Standard" ;
+ Text [ swedish ] = "Standard" ;
+ Text [ danish ] = "Standard" ;
+ Text [ italian ] = "Standard" ;
+ Text [ spanish ] = "Predeterminado" ;
+ Text [ french ] = "Standard" ;
+ Text [ dutch ] = "Standaard" ;
+ Text [ portuguese ] = "Padrão" ;
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ polish ] = "Standard";
+ Text[ japanese ] = "•W€";
+ Text[ chinese_traditional ] = "¼Ð·Ç";
+ Text[ arabic ] = "ÞíÇÓí";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "Ç¥ÁØ";
+ Text[ turkish ] = "Standart";
+ };
+ NumericField ED_PREBREAK
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 125 , 67 ) ;
+ Size = MAP_APPFONT ( 10 , 12 ) ;
+ Left = TRUE ;
+ Minimum = 2 ;
+ Maximum = 9 ;
+ Last = 9 ;
+ SpinSize = 1 ;
+ };
+ FixedText FT_PREBREAK
+ {
+ Pos = MAP_APPFONT ( 138 , 69 ) ;
+ Size = MAP_APPFONT ( 112 , 10 ) ;
+ // ### ACHTUNG: Neuer Text in Resource? Z~eichen vor Umbruch : Z~eichen pro Silbe vor Umbruch
+ Text = "Z~eichen vor Umbruch" ;
+ Text [ ENGLISH ] = "Characters be~fore hyphenation" ;
+ Text [ portuguese_brazilian ] = "Caracteres por sílaba an~tes da hifenização" ;
+ Text [ portuguese ] = "Caracteres an~tes da divisão silábica" ;
+ Text [ english_us ] = "Characters per syllable ~before hyphen" ;
+ Text [ dutch ] = "Tekens ~voor afbreking" ;
+ Text [ italian ] = "Caratteri prima della sillabazione" ;
+ Text [ spanish ] = "~Carácter antes de salto" ;
+ Text [ french ] = "~caractères avant le saut" ;
+ Text [ swedish ] = "t~ecken per stavelse före avstavning" ;
+ Text [ danish ] = "Tegn før skift" ;
+ Text[ chinese_simplified ] = "Á¬×ÖºÅ֮ǰµÄ×ÖĸÊýÄ¿(~B)";
+ Text[ russian ] = "×èñëî çíàêîâ â ñëîãå ïåðåä ïåðåíîñîì";
+ Text[ polish ] = "Znaki przed dzieleniem wyrazów na sylaby";
+ Text[ japanese ] = "•¶Žš(‰üs‘O)(~B)";
+ Text[ chinese_traditional ] = "³s¦r¸¹¤§«eªº¦r¥À¼Æ¥Ø(~B)";
+ Text[ arabic ] = "ÃÍÑÝ ÞÈá ÇáÝÇÕá";
+ Text[ greek ] = "×áñáêôÞñáò ~ðñéí áðü áëëáãÞ";
+ Text[ korean ] = "ÇÏÀÌÇ ¾Õ ¹®ÀÚ(~B)";
+ Text[ turkish ] = "karakter satýr sonunda olmalý (asgari).";
+ };
+ NumericField ED_AFTERBREAK
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 125 , 80 ) ;
+ Size = MAP_APPFONT ( 10 , 12 ) ;
+ Left = TRUE ;
+ Minimum = 2 ;
+ Maximum = 9 ;
+ Last = 9 ;
+ SpinSize = 1 ;
+ };
+ FixedText FT_AFTERBREAK
+ {
+ Pos = MAP_APPFONT ( 138 , 82 ) ;
+ Size = MAP_APPFONT ( 112 , 10 ) ;
+ // ### ACHTUNG: Neuer Text in Resource? Ze~ichen nach Umbruch : Ze~ichen pro Silbe nach Umbruch
+ Text = "Ze~ichen nach Umbruch" ;
+ Text [ ENGLISH ] = "~Characters behind hyphenation" ;
+ Text [ portuguese_brazilian ] = "~Caracteres por sílaba antes da hifenização" ;
+ Text [ portuguese ] = "~Caracteres depois da separação silábica" ;
+ Text [ english_us ] = "Characters per syllable af~ter hyphen" ;
+ Text [ dutch ] = "Tekens ~na afbreking" ;
+ Text [ italian ] = "Caratteri dopo la sillabazione" ;
+ Text [ spanish ] = "Carácter ~después de salto" ;
+ Text [ french ] = "ca~ractères après le saut" ;
+ Text [ swedish ] = "tecken per stavelse efter avstavn~ing" ;
+ Text [ danish ] = "Tegn efter skift" ;
+ Text[ chinese_simplified ] = "Á¬×ÖºÅÖ®ºóµÄ×ÖĸÊýÄ¿(~T)";
+ Text[ russian ] = "×èñëî çíàêîâ â ñëîãå ïîñëå ïåðåíîñà";
+ Text[ polish ] = "Znaki po dzieleniu wyrazów na sylaby";
+ Text[ japanese ] = "•¶Žš(‰üsŒã)(~T)";
+ Text[ chinese_traditional ] = "³s¦r¸¹¤§«áªº¦r¥À¼Æ¥Ø(~T)";
+ Text[ arabic ] = "ÃÍÑÝ ÈÚÏ ÇáÝÇÕá";
+ Text[ greek ] = "×áñáêôÞñáò ~ìåôÜ áðü áëëáãÞ";
+ Text[ korean ] = "ÇÏÀÌÇ ´ÙÀ½ ¹®ÀÚ(~T)";
+ Text[ turkish ] = "karakter satýr baþýnda olmalý (asgari).";
+ };
+ CheckBox BTN_AUTO
+ {
+ Pos = MAP_APPFONT ( 126 , 94 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ Text = "~Trennen ohne Nachfrage" ;
+ Text [ ENGLISH ] = "Hyphenation ~without interaction" ;
+ Text [ portuguese_brazilian ] = "Hifenação ~sem interação" ;
+ Text [ portuguese ] = "~Divisão silábica automática" ;
+ Text [ english_us ] = "Aut~omatic hyphenation" ;
+ Text [ italian ] = "Sillabazione senza conferma" ;
+ Text [ spanish ] = "Separac~ión automática" ;
+ Text [ french ] = "~Coupure automatique" ;
+ Text [ dutch ] = "A~utomatisch afbreken" ;
+ Text [ swedish ] = "Automatisk avs~tavning" ;
+ Text [ danish ] = "Automatisk orddeling" ;
+ Text[ chinese_simplified ] = "×Ô¶¯·Ö¿ª(~A)";
+ Text[ russian ] = "Àâòîìàòè÷åñêàÿ ðàññòàíîâêà ïåðåíîñîâ";
+ Text[ polish ] = "Automatyczny podzia³ wyrazów";
+ Text[ japanese ] = "Šm”F‚È‚µ‚ÌʲÌÈ°¼®Ý(~O)";
+ Text[ chinese_traditional ] = "¦Û°Ê¤À¶}(~A)";
+ Text[ arabic ] = "ÝÕá ÇáãÞÇØÚ ÈÏæä ÇÓÊÝÓÇÑ";
+ Text[ greek ] = "Áõôüìáôïò óõëëáâéóìüò";
+ Text[ korean ] = "ÀÚµ¿À¸·Î ÇÏÀÌÇ ³Ö±â(~O)";
+ Text[ turkish ] = "Otomatik heceleme";
+ };
+ CheckBox BTN_SPECIAL
+ {
+ Pos = MAP_APPFONT ( 126 , 104 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ // ### ACHTUNG: Neuer Text in Resource? S~onderbereiche trennen : S~onderbereiche prüfen
+ Text = "S~onderbereiche trennen" ;
+ Text [ ENGLISH ] = "Hy~phenation special regions" ;
+ Text [ portuguese_brazilian ] = "~Verificar regiões especiais" ;
+ Text [ portuguese ] = "~Divisão silábica nas áreas especiais" ;
+ Text [ english_us ] = "H~yphenate special regions" ;
+ Text [ italian ] = "Sillabazione aree speciali" ;
+ Text [ spanish ] = "~Separar áreas especiales" ;
+ Text [ french ] = "Coupure des ~zones spéciales" ;
+ Text [ dutch ] = "Speciale ~bereiken scheiden" ;
+ Text [ swedish ] = "Avstava special~områden" ;
+ Text [ danish ] = "Del særområder" ;
+ Text[ chinese_simplified ] = "ÊÊÓÃ×¢½Å£¬Ò³Ã¼Ò³½ÅµÈÇøÓò(~H)";
+ Text[ russian ] = "Ðàçäåëèòü ñïåöèàëüíûå îáëàñòè";
+ Text[ polish ] = "Rozdziel obszary specjalne";
+ Text[ japanese ] = "“Á•Ê”͈͂ÌʲÌÈ°¼®Ý(~H)";
+ Text[ chinese_traditional ] = "Óì¥Î©óª`¸}¡A­¶­º­¶§Àµ¥°Ï°ì(~H)";
+ Text[ arabic ] = "ÝÕá ÇáãäÇØÞ ÇáÎÇÕÉ";
+ Text[ greek ] = "Äéá÷ùñéóìüò åéäéêþí ðåñé~ï÷þí";
+ Text[ korean ] = "Ưº°¿µ¿ª¿¡ ÇÏÀÌÇ ³Ö±â(~Y)";
+ Text[ turkish ] = "Özel bölümlerde otomatik heceleme";
+ };
+ GroupBox GB_RULES
+ {
+ Pos = MAP_APPFONT ( 121 , 58 ) ;
+ Size = MAP_APPFONT ( 133 , 59 ) ;
+ Text = "Trennregeln" ;
+ Text [ ENGLISH ] = "Hyphenation rules" ;
+ Text [ portuguese_brazilian ] = "Regras de hifenação" ;
+ Text [ portuguese ] = "Regras da divisão silábica" ;
+ Text [ english_us ] = "Hyphenation rules" ;
+ Text [ italian ] = "Regole di sillabazione" ;
+ Text [ spanish ] = "Reglas de separación silábica" ;
+ Text [ french ] = "Coupure de mots" ;
+ Text [ dutch ] = "Afbrekingsregels" ;
+ Text [ swedish ] = "Avstavningsregler" ;
+ Text [ danish ] = "Orddelingsregler" ;
+ Text[ chinese_simplified ] = "Á¬×ֺŹæÔò";
+ Text[ russian ] = "Ïðàâèëà ïåðåíîñà";
+ Text[ polish ] = "Regu³y podzia³u wyrazów";
+ Text[ japanese ] = "ʲÌÈ°¼®Ý‚ðs‚¤";
+ Text[ chinese_traditional ] = "³s¦r¸¹³W«h";
+ Text[ arabic ] = "ÞæÇÚÏ ÝÕá ÇáãÞÇØÚ";
+ Text[ greek ] = "Êáíüíåò óõëëáâéóìïý";
+ Text[ korean ] = "ÇÏÀÌÇÂ ±ÔÄ¢";
+ Text[ turkish ] = "Heceleme kurallarý";
+ };
+ Text[ russian ] = "Ëèíãâèñòèêà";
+ Text[ greek ] = "Ãëþóóá";
+ Text[ polish ] = "Lingwistyka";
+ Text[ japanese ] = "Œ¾Œê";
+ Text[ korean ] = "¾ð¾î";
+ Text[ chinese_simplified ] = "×Öµä";
+ Text[ chinese_traditional ] = "¦r¨å";
+ Text[ arabic ] = "ÇááÛÉ";
+ Text[ turkish ] = "Dil";
+ FixedText FT_LANGUAGE
+ {
+ Pos = MAP_APPFONT ( 122 , 122 +2 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "~Standardsprache" ;
+ Text [ ENGLISH ] = "~Default language" ;
+ Text [ english_us ] = "~Default language" ;
+ Text [ dutch ] = "~Standaardtaal" ;
+ Text [ italian ] = "Linguaggio standard" ;
+ Text [ spanish ] = "~Idioma estándar" ;
+ Text [ french ] = "~Langue par défaut" ;
+ Text [ swedish ] = "~Standardspråk" ;
+ Text [ danish ] = "Standardsprog" ;
+ Text [ portuguese_brazilian ] = "~Standardsprache" ;
+ Text [ portuguese ] = "~Língua padrão" ;
+ Text[ chinese_simplified ] = "±ê×¼ÓïÑÔ(~D)";
+ Text[ russian ] = "ßçûê ïî óìîë÷àíèþ";
+ Text[ polish ] = "Jêzyk standardowy";
+ Text[ japanese ] = "•W€Œ¾Œê(~D)";
+ Text[ chinese_traditional ] = "¼Ð·Ç»y¨¥(~D)";
+ Text[ arabic ] = "ÇááÛÉ ÇáÇÝÊÑÇÖíÉ";
+ Text[ greek ] = "ÐñïåðéëåãìÝíç ãëþóóá";
+ Text[ korean ] = "±âº» ¾ð¾î(~D)";
+ Text[ turkish ] = "~Standart dil";
+ };
+ ListBox LB_LANGUAGE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 185 , 121 +2 ) ;
+ Size = MAP_APPFONT ( 69 , 66 ) ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ };
+
+ String STR_WARNING
+ {
+ Text = "Sie können nicht mehr als 20 Wörterbücher auswählen." ;
+ Text [ ENGLISH ] = "Sorry, but you could not select more than 20 dictionarys." ;
+ Text[ english_us ] = "You cannot select more than 20 dictionarys.";
+ Text[ portuguese ] = "É impossível seleccionar mais do que 20 dicionários";
+ Text[ russian ] = "Âû ìîæåòå âûáðàòü íå áîëüøå 20 ñëîâàðåé";
+ Text[ dutch ] = "U kunt niet meer dan 20 woordenboeken selecteren.";
+ Text[ french ] = "Impossible de sélectionner plus de 20 dictionnaires.";
+ Text[ spanish ] = "No es posible seleccionar más de 20 diccionarios";
+ Text[ italian ] = "Impossibile selezionare più di 20 dizionari.";
+ Text[ danish ] = "Du kan ikke vælge mere end 20 ordbøger.";
+ Text[ swedish ] = "Du kan tyvärr inte välja ut mer än 20 ordböcker/lexikon.";
+ Text[ polish ] = "Nie mo¿esz wybraæ wiêcej ni¿ 20 s³owników.";
+ Text[ portuguese_brazilian ] = "Sorry, but you could not select more than 20 dictionarys.";
+ Text[ japanese ] = "20ˆÈã‚ÌŽ«‘‚Í‘I‘ð‚Å‚«‚Ü‚¹‚ñB";
+ Text[ chinese_simplified ] = "ºÜ±§Ç¸£¬ÄúµÄÑ¡Ôñ²»µÃ³¬¹ý 20 ¸ö×ֵ䡣";
+ Text[ chinese_traditional ] = "«Ü©êºp¡M±zªº¿ï¾Ü¤£¯à°÷¶W¹L 20 ­Ó¦r¨å¡C";
+ Text[ arabic ] = "áÇ íãßäß ÊÍÏíÏ ÃßËÑ ãä 20 ÞÇãæÓÇð.";
+ Text[ greek ] = "¸÷åôå ôçí äõíáôüôçôá íá åðéëÝîåôå Ýùò êáé 20 ëåîéêÜ.";
+ Text[ korean ] = "»çÀüÀ» 20°³±îÁö¸¸ ¼±ÅÃÇÒ ¼ö ÀÖ½À´Ï´Ù.";
+ Text[ turkish ] = "20'den fazla sözlük seçilemez.";
+ };
+
+ Text[ chinese_simplified ] = "×Öµä";
+ Text[ russian ] = "Ëèíãâèñòèêà";
+ Text[ polish ] = "Lingwistyka";
+ Text[ japanese ] = "Œ¾Œê";
+ Text[ chinese_traditional ] = "¦r¨å";
+ Text[ arabic ] = "ÇááÛÉ";
+ Text[ greek ] = "Ãëþóóá";
+ Text[ korean ] = "¾ð¾î";
+};
+ // RID_SFXQB_DELDICT --------------------------------------------------------
+QueryBox RID_SFXQB_DELDICT
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ // ### ACHTUNG: Neuer Text in Resource? Möchten Sie das Wörterbuch löschen? : Wollen sie das Wörterbuch löschen?
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie das Wörterbuch löschen? : M÷chten Sie das W÷rterbuch l÷schen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie das Wörterbuch löschen? : M÷chten Sie das W÷rterbuch l÷schen? */
+ Message = "Möchten Sie das Wörterbuch löschen?" ;
+ Message [ ENGLISH ] = "Do you want to delete the dictionary?" ;
+ Message [ norwegian ] = "Vil du slette ordlisten?" ;
+ Message [ italian ] = "Eliminare il dizionario?" ;
+ Message [ portuguese_brazilian ] = "Deseja apagar o dicionário?" ;
+ Message [ portuguese ] = "Deseja apagar o dicionário?" ;
+ Message [ english_us ] = "Do you want to delete the dictionary?" ;
+ Message [ finnish ] = "Haluatko poistaa sanaston?" ;
+ Message [ danish ] = "Vil du slette ordbogen?" ;
+ Message [ french ] = "Voulez-vous supprimer le dictionnaire?" ;
+ Message [ swedish ] = "Vill Du radera ordboken?" ;
+ Message [ dutch ] = "Wilt u de woordenlijst wissen?" ;
+ Message [ spanish ] = "¿Desea eliminar el diccionario?" ;
+ Message[ chinese_simplified ] = "ÄúҪɾ³ýÕâ¸ö´ÊµäÂð£¿";
+ Message[ russian ] = "Âû õîòèòå óäàëèòü ýòîò ñëîâàðü?";
+ Message[ polish ] = "Chcesz skasowaæ s³ownik?";
+ Message[ japanese ] = "Ž«‘‚ð휂µ‚Ü‚·‚©?";
+ Message[ chinese_traditional ] = "±z­n§R°£³o­Óµü¨å¡H";
+ Message[ arabic ] = "åá ÊÑíÏ ÍÐÝ ÇáÞÇãæÓ¿";
+ Message[ greek ] = "ÈÝëåôå íá äéáãñáöåß ôï ëåîéêü;";
+ Message[ korean ] = "»çÀüÀ» »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Message[ turkish ] = "Sözlüðü silmek istiyor musunuz?";
+};
+ // RID_SFXQB_DEL_IGNORELIST ----------------------------------------------
+QueryBox RID_SFXQB_DEL_IGNORELIST
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ // ### ACHTUNG: Neuer Text in Resource? Möchten Sie die Ignorieren-Liste löschen? : Wollen sie die Ignorieren-Liste löschen?
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie die Ignorieren-Liste löschen? : M÷chten Sie die Ignorieren-Liste l÷schen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Möchten Sie die Ignorieren-Liste löschen? : M÷chten Sie die Ignorieren-Liste l÷schen? */
+ Message = "Möchten Sie die Ignorieren-Liste löschen?" ;
+ Message [ ENGLISH ] = "Do you want to delete the ignore list?" ;
+ Message [ english_us ] = "Do you want to delete the ignore list?" ;
+ Message [ italian ] = "Eliminare la lista ignora?" ;
+ Message [ spanish ] = "¿Desea eliminar la lista Ignorar?" ;
+ Message [ french ] = "Voulez-vous supprimer la liste des exclusions ?" ;
+ Message [ dutch ] = "Wilt u de lijst Negeren wissen?" ;
+ Message [ swedish ] = "Vill Du radera ignorera-listan?" ;
+ Message [ danish ] = "Vil du slette Ignorer-listen?" ;
+ Message [ portuguese ] = "Deseja eliminar a lista Ignorar?" ;
+ Message [ portuguese_brazilian ] = "Möchten Sie die Ignorieren-Liste löschen?" ;
+ Message[ chinese_simplified ] = "ÄúҪɾ³ýÕâ¸ö¡°ºöÂÔÁе¥¡±Âð£¿";
+ Message[ russian ] = "Âû õîòèòå óäàëèòü ñïèñîê ïðîïóùåííûõ?";
+ Message[ polish ] = "Czy chcesz usun¹æ listê ignoracji?";
+ Message[ japanese ] = "<ؽĂ͖³Ž‹‚·‚é>‚ð휂µ‚Ü‚·‚©?";
+ Message[ chinese_traditional ] = "±z­n§R°£³o­Ó¡§©¿²¤²M³æ¡¨¡H";
+ Message[ arabic ] = "åá ÊÑíÏ ÍÐÝ ÞÇÆãÉ ÇáÊÌÇåá¿";
+ Message[ greek ] = "ÈÝëåôå íá äéáãñáöåß ç ëßóôá ðáñÜâëåøçò;";
+ Message[ korean ] = "¹«½Ã¸ñ·ÏÀ» »èÁ¦ÇϽðڽÀ´Ï±î?";
+ Message[ turkish ] = "\"Yok say\" listesini silmek istiyor musunuz?";
+};
+ // ********************************************************************** EOF
+ // Auswahl der ext. Linguistik
+ModalDialog RID_SVX_OPT_EXT_LINGU
+{
+ HelpId = HID_SVX_OPT_EXT_LINGU ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 263 , 139 ) ;
+ Text = "Externe Linguistik" ;
+ Text [ ENGLISH ] = "External linguistics" ;
+ Moveable = TRUE ;
+ OKButton PB_OK
+ {
+ Pos = MAP_APPFONT ( 207 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Disable = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton PB_CANCEL
+ {
+ Pos = MAP_APPFONT ( 207 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton PB_HELP
+ {
+ Pos = MAP_APPFONT ( 207 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ PushButton PB_OPTIONS
+ {
+ Pos = MAP_APPFONT ( 207 , 60 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Optionen" ;
+ Text [ ENGLISH ] = "~Options" ;
+ Disable = TRUE ;
+ Text [ english_us ] = "~Options" ;
+ Text [ portuguese_brazilian ] = "~Optionen" ;
+ Text [ swedish ] = "~Alternativ" ;
+ Text [ danish ] = "Indstillinger" ;
+ Text [ italian ] = "~Opzioni" ;
+ Text [ spanish ] = "~Opciones" ;
+ Text [ french ] = "~Options" ;
+ Text [ dutch ] = "~Opties" ;
+ Text [ portuguese ] = "~Opções" ;
+ Text[ chinese_simplified ] = "Ñ¡Ïî(~O)";
+ Text[ russian ] = "Ïàðàìåòðû";
+ Text[ polish ] = "Opcje";
+ Text[ japanese ] = "µÌß¼®Ý(~O)";
+ Text[ chinese_traditional ] = "¿ï¶µ(~O)";
+ Text[ arabic ] = "ÎíÇÑÇÊ";
+ Text[ greek ] = "ÅðéëïãÝò";
+ Text[ korean ] = "¿É¼Ç(~O)";
+ Text[ turkish ] = "Seçenekler";
+ };
+ GroupBox GB_LINGU
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 198 , 75 ) ;
+ Text = "Auswahl" ;
+ Text [ ENGLISH ] = "Selection" ;
+ Text [ portuguese ] = "Selecção" ;
+ Text [ english_us ] = "Select" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Udvalg" ;
+ Text [ italian ] = "Seleziona" ;
+ Text [ spanish ] = "Selección" ;
+ Text [ french ] = "Sélection" ;
+ Text [ dutch ] = "Selectie" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûáîð";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÊÍÏíÏ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçim";
+ };
+ ListBox LB_LINGU
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 12 ) ;
+ Size = MAP_APPFONT ( 186 , 60 ) ;
+ StringList =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ ENGLISH ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Predeterminado" ; Default ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Standaard" ; Default ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Padrão" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "±ê×¼" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ñòàíäàðò" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "•W€" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¼Ð·Ç" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÞíÇÓí" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÐñïåðéëïãÞ" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "Ç¥ÁØ" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Standart" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ };
+ CheckBox CB_STDSPELL
+ {
+ Pos = MAP_APPFONT ( 12 , 95 ) ;
+ Size = MAP_APPFONT ( 186 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Rechtschreibprüfung zuerst im Standardmodul : ~Rechtschreibpr³fung zuerst im Standardmodul */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Rechtschreibprüfung zuerst im Standardmodul : ~Rechtschreibpr³fung zuerst im Standardmodul */
+ Text = "~Rechtschreibprüfung zuerst im Standardmodul" ;
+ Text [ ENGLISH ] = "Spell in standard module first" ;
+ Text [ english_us ] = "~Spellcheck standard module first" ;
+ Text [ portuguese_brazilian ] = "~Rechtschreibprüfung zuerst im Standardmodul" ;
+ Text [ swedish ] = "~Rättstavningskontroll först i standardmodul" ;
+ Text [ danish ] = "Stavekontrol først i standardmodulet" ;
+ Text [ italian ] = "Ini~zia controllo ortografico nel modulo standard" ;
+ Text [ spanish ] = "~Corrección ortográfica primero en módulo estándar" ;
+ Text [ french ] = "~Commencer la vérification orthographique dans le module par défaut" ;
+ Text [ dutch ] = "~Spellingcontrole eerst in standaardmodule" ;
+ Text [ portuguese ] = "~Verificação ortográfica primeiro no módulo-padrão" ;
+ Text[ chinese_simplified ] = "Ê×ÏȲÉÓñê×¼µÄÕý×Ö·¨¼ì²éģʽ(~S)";
+ Text[ russian ] = "Ïðîâåðêà ïðàâîïèñàíèÿ ñíà÷àëà â ñòàíäàðòíîì ìîäóëå";
+ Text[ polish ] = "Sprawdzanie pisowni najpierw w module standardowym";
+ Text[ japanese ] = "‚Ü‚¸•W€Ó¼Þ­°Ù‚Å•¶ÍZ³‚ÌÁª¯¸‚ð‚·‚é(~S)";
+ Text[ chinese_traditional ] = "¥ý¨Ï¥Î¼Ð·Ç¼Ò¦¡ªº«÷¦rªk(~S)";
+ Text[ arabic ] = "ÇáÊÏÞíÞ ÇáÃãáÇÆí Ýí ÇáæÍÏÉ ÇáÞíÇÓíÉ ÃæáÇð";
+ Text[ greek ] = "¸ëåã÷ïò ïñèïãñáößáò ðñþôá óôç âáóéêÞ ëåéôïõñãéêÞ ìïíÜäá";
+ Text[ korean ] = "±âº»¸ðµâ¿¡¼­ ¸ÂÃã¹ý°Ë»ç¸¦ Á¦ÀÏ ¸ÕÀú(~S)";
+ Text[ turkish ] = "Önce standart modülde yazým denetimi";
+ };
+ CheckBox CB_STDTHES
+ {
+ Pos = MAP_APPFONT ( 12 , 108 ) ;
+ Size = MAP_APPFONT ( 186 , 10 ) ;
+ Text = "Standard ~Thesaurus verwenden" ;
+ Text [ ENGLISH ] = "Use standard thesaurus" ;
+ Text [ english_us ] = "Use ~standard thesaurus" ;
+ Text [ portuguese_brazilian ] = "Standard ~Thesaurus verwenden" ;
+ Text [ swedish ] = "Använd ~standard-synonymordlista " ;
+ Text [ danish ] = "Brug standard-synonymordbog" ;
+ Text [ italian ] = "Usa il ~dizionario sinonimi standard" ;
+ Text [ spanish ] = "Utilizar diccionario de ~sinónimos estándar" ;
+ Text [ french ] = "Utiliser le ~dict. des synonymes standard" ;
+ Text [ dutch ] = "Standaard ~Thesaurus toepassen" ;
+ Text [ portuguese ] = "Usar dicionário de ~sinónimos padrão" ;
+ Text[ chinese_simplified ] = "²ÉÓñê×¼´Êµä(~S)";
+ Text[ russian ] = "Èñïîëüçîâàòü ñòàíäàðòíûé òåçàóðóñ";
+ Text[ polish ] = "Zastosuj standardowy Tezaurus";
+ Text[ japanese ] = "•W€‚̗ތꎫ“T‚ðŽg—p(~S)";
+ Text[ chinese_traditional ] = "¨Ï¥Î¼Ð·Çµü¨å(~S)";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ÞÇãæÓ ÇáãÑÇÏÝÇÊ ÇáÇÝÊÑÇÖí";
+ Text[ greek ] = "×ñÞóç ðñïåðéëåãìÝíïõ ~èçóáõñïý ëÝîåùí";
+ Text[ korean ] = "±âº» µ¿ÀǾî»çÀü »ç¿ë(~S)";
+ Text[ turkish ] = "Standar eþanlamlýlarý kullan";
+ };
+ CheckBox CB_STDHYPH
+ {
+ Pos = MAP_APPFONT ( 12 , 121 ) ;
+ Size = MAP_APPFONT ( 186 , 10 ) ;
+ Text = "Standard ~Silbentrennung verwenden" ;
+ Text [ ENGLISH ] = "Use standard hyphenation" ;
+ Text [ portuguese ] = "Usar ~divisão silábica padrão" ;
+ Text [ english_us ] = "Use standard h~yphenation" ;
+ Text [ portuguese_brazilian ] = "Standard ~Silbentrennung verwenden" ;
+ Text [ swedish ] = "Använd ~standardavstavning" ;
+ Text [ danish ] = "Brug standard-orddeling" ;
+ Text [ italian ] = "Usa la ~sillabazione standard" ;
+ Text [ spanish ] = "Usar ~separación silábica estándar" ;
+ Text [ french ] = "Utiliser la ~coupure de mots par défaut" ;
+ Text [ dutch ] = "Standaard ~woordafbreking toepassen" ;
+ Text[ chinese_simplified ] = "²ÉÓñê×¼Á¬×Ö¹æÔò(~Y)";
+ Text[ russian ] = "Èñïîëüçîâàòü ñòàíäàðòíûé ïåðåíîñ ñëîâ";
+ Text[ polish ] = "U¿yj standardowego dzielenia wyrazów";
+ Text[ japanese ] = "•W€‚ÌʲÌÈ°¼®Ý‚ðŽg—p(~Y)";
+ Text[ chinese_traditional ] = "¨Ï¥Î¼Ð·Ç³s¦r³W«h(~Y)";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ÇáÝÕá ÇáÞíÇÓí ááãÞÇØÚ";
+ Text[ greek ] = "×ñÞóç ðñïåðéëåãìÝíïõ ~óõëëáâéóìïý";
+ Text[ korean ] = "±âº» ÇÏÀÌÇ »ç¿ë(~Y)";
+ Text[ turkish ] = "Standart hecelemeyi uygula";
+ };
+ GroupBox GB_SETTINGS
+ {
+ Pos = MAP_APPFONT ( 6 , 84 ) ;
+ Size = MAP_APPFONT ( 198 , 50 ) ;
+ Text = "Einstellungen" ;
+ Text [ ENGLISH ] = "Settings" ;
+ Text [ english_us ] = "Settings" ;
+ Text [ portuguese_brazilian ] = "Einstellungen" ;
+ Text [ swedish ] = "Inställningar" ;
+ Text [ danish ] = "Indstillinger" ;
+ Text [ italian ] = "Impostazioni" ;
+ Text [ spanish ] = "Configuración" ;
+ Text [ french ] = "Paramètres" ;
+ Text [ dutch ] = "Instellingen" ;
+ Text [ portuguese ] = "Predefinições" ;
+ Text[ chinese_simplified ] = "É趨";
+ Text[ russian ] = "Íàñòðîéêè";
+ Text[ polish ] = "Ustawienia";
+ Text[ japanese ] = "Ý’è";
+ Text[ chinese_traditional ] = "³]©w";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ";
+ Text[ greek ] = "Ñõèìßóåéò";
+ Text[ korean ] = "¼³Á¤";
+ Text[ turkish ] = "Ayarlar";
+ };
+ Text [ portuguese ] = "Linguística externa" ;
+ Text [ english_us ] = "External Language" ;
+ Text [ portuguese_brazilian ] = "Externe Linguistik" ;
+ Text [ swedish ] = "Extern lingvistik" ;
+ Text [ danish ] = "Ekstern lingvistik" ;
+ Text [ italian ] = "Linguistica esterna" ;
+ Text [ spanish ] = "Linguística externa" ;
+ Text [ french ] = "Linguistique externe" ;
+ Text [ dutch ] = "Externe linguïstiek" ;
+ Text[ chinese_simplified ] = "ÍâÀ´ÓïÑԴʵä";
+ Text[ russian ] = "Âíåøíÿÿ ëèíãâèñòèêà";
+ Text[ polish ] = "Lingwistyka zewnêtrzna";
+ Text[ japanese ] = "ŠO•”Œ¾Œê";
+ Text[ chinese_traditional ] = "¥~¨Óµü¨å";
+ Text[ arabic ] = "ãæÇÏ áÛæíÉ ÎÇÑÌíÉ";
+ Text[ greek ] = "ÅîùôåñéêÞ ãëþóóá";
+ Text[ korean ] = "¿ÜºÎ ¾ð¾î";
+ Text[ turkish ] = "Harici sözlükler";
+};
+
+ // RID_SVXPAGE_EXTERNAL_LINGU --------------------------------------------------------
+TabPage RID_SVXPAGE_EXTERNAL_LINGU
+{
+ HelpId = HID_OPTIONS_EXTERNAL_LINGU ;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Text = "Externe Linguistik" ;
+ Text [ ENGLISH ] = "External linguistic" ;
+ PushButton PB_OPTIONS
+ {
+ Pos = MAP_APPFONT ( 207 , 60 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Optionen" ;
+ Text [ ENGLISH ] = "~Options" ;
+ Disable = TRUE ;
+ Text [ english_us ] = "~Options" ;
+ Text [ portuguese_brazilian ] = "~Optionen" ;
+ Text [ swedish ] = "~Alternativ" ;
+ Text [ danish ] = "Indstillinger" ;
+ Text [ italian ] = "~Opzioni" ;
+ Text [ spanish ] = "~Opciones" ;
+ Text [ french ] = "~Options" ;
+ Text [ dutch ] = "~Opties" ;
+ Text [ portuguese ] = "~Opções" ;
+ Text[ chinese_simplified ] = "Ñ¡Ïî(~O)";
+ Text[ russian ] = "Ïàðàìåòðû";
+ Text[ polish ] = "~Opcje";
+ Text[ japanese ] = "µÌß¼®Ý(~O)";
+ Text[ chinese_traditional ] = "¿ï¶µ(~O)";
+ Text[ arabic ] = "ÎíÇÑÇÊ";
+ Text[ greek ] = "Åðéë~ïãÝò";
+ Text[ korean ] = "¿É¼Ç(~O)";
+ Text[ turkish ] = "Seçenekler";
+ };
+ GroupBox GB_LINGU
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 198 , 75 ) ;
+ Text = "Auswahl" ;
+ Text [ ENGLISH ] = "Selection" ;
+ Text [ portuguese ] = "Selecção" ;
+ Text [ english_us ] = "Select" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Udvalg" ;
+ Text [ italian ] = "Seleziona" ;
+ Text [ spanish ] = "Selección" ;
+ Text [ french ] = "Sélection" ;
+ Text [ dutch ] = "Selectie" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûáîð";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ arabic ] = "ÊÍÏíÏ";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ turkish ] = "Seçim";
+ };
+ ListBox LB_LINGU
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 12 ) ;
+ Size = MAP_APPFONT ( 186 , 60 ) ;
+ StringList =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ ENGLISH ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Default" ; Default ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Predeterminado" ; Default ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Par défaut" ; Default ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Standaard" ; Default ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Padrão" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "±ê×¼" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Ñòàíäàðò" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "•W€" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "¼Ð·Ç" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "ÞíÇÓí" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "ÐñïåðéëïãÞ" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "񃧯" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Standard" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Standart" ; Default ; > ;
+ };
+ };
+ CheckBox CB_STDSPELL
+ {
+ Pos = MAP_APPFONT ( 12 , 95 ) ;
+ Size = MAP_APPFONT ( 186 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Rechtschreibprüfung zuerst im Standardmodul : ~Rechtschreibpr³fung zuerst im Standardmodul */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Rechtschreibprüfung zuerst im Standardmodul : ~Rechtschreibpr³fung zuerst im Standardmodul */
+ Text = "~Rechtschreibprüfung zuerst im Standardmodul" ;
+ Text [ ENGLISH ] = "Spell in standard module first" ;
+ Text [ english_us ] = "~Spellcheck in default module first" ;
+ Text [ portuguese_brazilian ] = "~Rechtschreibprüfung zuerst im Standardmodul" ;
+ Text [ swedish ] = "~Rättstavningskontroll först i standardmodul" ;
+ Text [ danish ] = "Stavekontrol først i standardmodulet" ;
+ Text [ italian ] = "Ini~zia controllo ortografico nel modulo standard" ;
+ Text [ spanish ] = "~Corrección ortográfica primero en módulo estándar" ;
+ Text [ french ] = "~Commencer la vérification orthographique dans le module par défaut" ;
+ Text [ dutch ] = "~Spellingcontrole eerst in standaardmodule" ;
+ Text [ portuguese ] = "~Verificação ortográfica primeiro no módulo-padrão" ;
+ Text[ chinese_simplified ] = "Ê×ÏȲÉÓñê×¼µÄÕý×Ö·¨¼ì²éģʽ(~S)";
+ Text[ russian ] = "Ïðîâåðêà ïðàâîïèñàíèÿ ñíà÷àëà â ñòàíäàðòíîì ìîäóëå";
+ Text[ polish ] = "Sprawdzanie pisowni najpierw w module standardowym";
+ Text[ japanese ] = "ʼn‚É•W€Ó¼Þ­°Ù‚ŽÍßÙÁª¯¸(~S)";
+ Text[ chinese_traditional ] = "¥ý¨Ï¥Î¼Ð·Ç¼Ò¦¡ªº«÷¦rªk(~S)";
+ Text[ arabic ] = "ÇáÊÏÞíÞ ÇáÃãáÇÆí Ýí ÇáæÍÏÉ ÇáÞíÇÓíÉ ÃæáÇð";
+ Text[ greek ] = "¸ëåã÷ïò ïñèïã~ñáößáò ðñþôá óôç âáóéêÞ ëåéôïõñãéêÞ ìïíÜäá";
+ Text[ korean ] = "±âº»¸ðµâ¿¡¼­ ¸ÂÃã¹ý°Ë»ç¸¦ Á¦ÀÏ ¸ÕÀú(~S)";
+ Text[ turkish ] = "Önce standart modülde yazým denetimi";
+ };
+ CheckBox CB_STDTHES
+ {
+ Pos = MAP_APPFONT ( 12 , 108 ) ;
+ Size = MAP_APPFONT ( 186 , 10 ) ;
+ Text = "Standard ~Thesaurus verwenden" ;
+ Text [ ENGLISH ] = "Use standard thesaurus" ;
+ Text [ english_us ] = "U~se default thesaurus" ;
+ Text [ portuguese_brazilian ] = "Standard ~Thesaurus verwenden" ;
+ Text [ swedish ] = "Använd ~standard-synonymordlista" ;
+ Text [ danish ] = "Brug standard-synonymordbog" ;
+ Text [ italian ] = "Usa il ~dizionario sinonimi standard" ;
+ Text [ spanish ] = "Utilizar diccionario de ~sinónimos estándar" ;
+ Text [ french ] = "Utiliser le ~dict. des synonymes standard" ;
+ Text [ dutch ] = "Standaard ~Thesaurus toepassen" ;
+ Text [ portuguese ] = "Usar dicionário de ~sinónimos padrão" ;
+ Text[ chinese_simplified ] = "ʹÓñê×¼´Êµä(~S)";
+ Text[ russian ] = "Èñïîëüçîâàòü ñòàíäàðòíûé òåçàóðóñ";
+ Text[ polish ] = "Zastosuj standardowy Tezaurus";
+ Text[ japanese ] = "•W€—ތꎫ“T‚ÌŽg—p(~S)";
+ Text[ chinese_traditional ] = "¨Ï¥Î¼Ð·Çµü¨å(~S)";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ÞÇãæÓ ÇáãÑÇÏÝÇÊ ÇáÇÝÊÑÇÖí";
+ Text[ greek ] = "×ñÞóç ðñïåðéëåãìÝíïõ ~èçóáõñïý ëÝîåùí";
+ Text[ korean ] = "±âº» µ¿ÀǾî»çÀü »ç¿ë(~S)";
+ Text[ turkish ] = "Standart eþanlamlýlarý kullan";
+ };
+ CheckBox CB_STDHYPH
+ {
+ Pos = MAP_APPFONT ( 12 , 121 ) ;
+ Size = MAP_APPFONT ( 186 , 10 ) ;
+ Text = "Standard ~Silbentrennung verwenden" ;
+ Text [ ENGLISH ] = "Use standard hyphenation" ;
+ Text [ portuguese ] = "Usar ~divisão silábica padrão" ;
+ Text [ english_us ] = "Use default h~yphenation" ;
+ Text [ portuguese_brazilian ] = "Standard ~Silbentrennung verwenden" ;
+ Text [ swedish ] = "Använd standard~avstavning" ;
+ Text [ danish ] = "Brug standard-orddeling" ;
+ Text [ italian ] = "Usa la ~sillabazione standard" ;
+ Text [ spanish ] = "Usar ~separación silábica estándar" ;
+ Text [ french ] = "Utiliser la ~coupure de mots par défaut" ;
+ Text [ dutch ] = "Standaard ~woordafbreking toepassen" ;
+ Text[ chinese_simplified ] = "ʹÓñê×¼Á¬×Ö¹æÔò(~Y)";
+ Text[ russian ] = "Èñïîëüçîâàòü ñòàíäàðòíûé ïåðåíîñ ñëîâ";
+ Text[ polish ] = "U¿yj standardowego dzielenia wyrazów na sylaby";
+ Text[ japanese ] = "•W€Ê²ÌÈ°¼®Ý‚ÌŽg—p(~Y)";
+ Text[ chinese_traditional ] = "¨Ï¥Î¼Ð·Ç³s¦r³W«h(~Y)";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ÇáÝÕá ÇáÞíÇÓí ááãÞÇØÚ";
+ Text[ greek ] = "×ñÞóç ðñïåðéëåãìÝíïõ ~óõëëáâéóìïý";
+ Text[ korean ] = "±âº» ÇÏÀÌÇ »ç¿ë(~Y)";
+ Text[ turkish ] = "Standart hecelemeyi kullan";
+ };
+ GroupBox GB_SETTINGS
+ {
+ Pos = MAP_APPFONT ( 6 , 84 ) ;
+ Size = MAP_APPFONT ( 198 , 50 ) ;
+ Text = "Einstellungen" ;
+ Text [ ENGLISH ] = "Settings" ;
+ Text [ english_us ] = "Settings" ;
+ Text [ portuguese_brazilian ] = "Einstellungen" ;
+ Text [ swedish ] = "Inställningar" ;
+ Text [ danish ] = "Indstillinger" ;
+ Text [ italian ] = "Impostazioni" ;
+ Text [ spanish ] = "Configuración" ;
+ Text [ french ] = "Paramètres" ;
+ Text [ dutch ] = "Instellingen" ;
+ Text [ portuguese ] = "Predefinições" ;
+ Text[ chinese_simplified ] = "É趨";
+ Text[ russian ] = "Íàñòðîéêè";
+ Text[ polish ] = "Ustawienia";
+ Text[ japanese ] = "Ý’è";
+ Text[ chinese_traditional ] = "³]©w";
+ Text[ arabic ] = "ÅÚÏÇÏÇÊ";
+ Text[ greek ] = "Ñõèìßóåéò";
+ Text[ korean ] = "¼³Á¤";
+ Text[ turkish ] = "Ayarlar";
+ };
+ Text[ english_us ] = "External Language";
+ Text[ portuguese ] = "Linguística externa";
+ Text[ russian ] = "Âíåøíÿÿ ëèíãâèñòèêà";
+ Text[ greek ] = "ÅîùôåñéêÞ ãëþóóá";
+ Text[ dutch ] = "Externe linguïstiek";
+ Text[ french ] = "Linguistique externe";
+ Text[ spanish ] = "Lingüística externa";
+ Text[ italian ] = "Linguistica esterna";
+ Text[ danish ] = "Ekstern lingvistik";
+ Text[ swedish ] = "Extern lingvistik";
+ Text[ polish ] = "Zwenêtrzna lingwistyka";
+ Text[ portuguese_brazilian ] = "External linguistic";
+ Text[ japanese ] = "ŠO•”Œ¾Œê";
+ Text[ korean ] = "¿ÜºÎ ¾ð¾î";
+ Text[ chinese_simplified ] = "ÍⲿÓïÑÔ";
+ Text[ chinese_traditional ] = "¥~³¡¦r¨å";
+ Text[ arabic ] = "ãæÇÏ áÛæíÉ ÎÇÑÌíÉ";
+ Text[ turkish ] = "Harici sözlükler";
+};
+ // ******************************************************************* EOF
diff --git a/svx/source/options/optpath.src b/svx/source/options/optpath.src
new file mode 100644
index 0000000000..047ad487ee
--- /dev/null
+++ b/svx/source/options/optpath.src
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * $RCSfile: optpath.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include --------------------------------------------------------------
+#include "optpath.hrc"
+#include "dialogs.hrc"
+#ifndef _SFX_HRC
+#include <sfx2/sfx.hrc>
+#endif
+#include "helpid.hrc"
+
+ // RID_SFXPAGE_PATH -----------------------------------------------------
+TabPage RID_SFXPAGE_PATH
+{
+ HelpId = HID_OPTIONS_PATH ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Pfade" ;
+ Text [ English ] = "Paths" ;
+ Text [ norwegian ] = "Baner" ;
+ Text [ italian ] = "Percorsi" ;
+ Text [ portuguese_brazilian ] = "Caminhos" ;
+ Text [ portuguese ] = "Atalhos" ;
+ Text [ finnish ] = "Polut" ;
+ Text [ danish ] = "Stier" ;
+ Text [ french ] = "Chemins" ;
+ Text [ swedish ] = "Sökvägar" ;
+ Text [ dutch ] = "Paden" ;
+ Text [ spanish ] = "Rutas" ;
+ Text [ english_us ] = "Paths" ;
+ Text[ chinese_simplified ] = "·¾¶";
+ Text[ russian ] = "Ïóòè";
+ Text[ polish ] = "Œcie¿ki";
+ Text[ japanese ] = "Êß½";
+ FixedText FT_TYPE
+ {
+ Hide = TRUE;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Typ" ;
+ Text [ English ] = "Type" ;
+ Text [ norwegian ] = "Type" ;
+ Text [ italian ] = "Tipo" ;
+ Text [ portuguese_brazilian ] = "Tipo" ;
+ Text [ portuguese ] = "Tipo" ;
+ Text [ finnish ] = "Laji" ;
+ Text [ danish ] = "Type" ;
+ Text [ french ] = "Type" ;
+ Text [ swedish ] = "Typ" ;
+ Text [ dutch ] = "Type" ;
+ Text [ spanish ] = "Tipo" ;
+ Text [ english_us ] = "Type" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ";
+ Text[ russian ] = "Òèï";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "Ží—Þ";
+ Text[ chinese_traditional ] = "Ãþ«¬";
+ Text[ arabic ] = "ÇáäæÚ";
+ Text[ greek ] = "Ôýðïò";
+ Text[ korean ] = "À¯Çü";
+ Text[ turkish ] = "Tip";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_PATH
+ {
+ Hide = TRUE;
+ Pos = MAP_APPFONT ( 110 , 14 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Pfad" ;
+ Text [ English ] = "Path" ;
+ Text [ norwegian ] = "Bane" ;
+ Text [ italian ] = "Percorso" ;
+ Text [ portuguese_brazilian ] = "Caminho" ;
+ Text [ portuguese ] = "Atalho" ;
+ Text [ finnish ] = "Polku" ;
+ Text [ danish ] = "Sti" ;
+ Text [ french ] = "Chemin" ;
+ Text [ swedish ] = "Sökväg" ;
+ Text [ dutch ] = "Pad" ;
+ Text [ spanish ] = "Ruta" ;
+ Text [ english_us ] = "Path" ;
+ Text[ chinese_simplified ] = "·¾¶";
+ Text[ russian ] = "Ïóòü";
+ Text[ polish ] = "Œcie¿ka";
+ Text[ japanese ] = "Êß½";
+ Text[ chinese_traditional ] = "¸ô®|";
+ Text[ arabic ] = "ÇáãÓÇÑ";
+ Text[ greek ] = "ÄéáäñïìÞ";
+ Text[ korean ] = "°æ·Î";
+ Text[ turkish ] = "Veri yolu";
+ Text[ language_user1 ] = " ";
+ };
+ Control LB_PATH
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 236 , 89 ) ;
+ Border = TRUE ;
+ TabStop = TRUE;
+ };
+ PushButton BTN_PATH
+ {
+ Pos = MAP_APPFONT ( 183 , 110 ) ;
+ Size = MAP_APPFONT ( 65 , 14 ) ;
+ 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 ] = "~Personnaliser..." ;
+ Text [ swedish ] = "~Redigera..." ;
+ Text [ dutch ] = "Be~werken..." ;
+ Text [ spanish ] = "~Editar..." ;
+ Text [ english_us ] = "~Edit..." ;
+ Text[ chinese_simplified ] = "±à¼­(~E)...";
+ Text[ russian ] = "Ïðàâêà...";
+ Text[ polish ] = "Edytuj...";
+ Text[ japanese ] = "•ÒW(~E)...";
+ Text[ chinese_traditional ] = "½s¿è(~E)...";
+ Text[ arabic ] = "ÊÍÑíÑ...";
+ Text[ greek ] = "~Åðåîåñãáóßá...";
+ Text[ korean ] = "ÆíÁý(~E)...";
+ Text[ turkish ] = "Düzenle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_STANDARD
+ {
+ Pos = MAP_APPFONT ( 115 , 110 ) ;
+ Size = MAP_APPFONT ( 65 , 14 ) ;
+ Text = "~Standard" ;
+ Text [ English ] = "~Standard" ;
+ Text [ english_us ] = "~Default" ;
+ Text [ italian ] = "~Standard" ;
+ Text [ spanish ] = "~Predeterminado" ;
+ Text [ french ] = "Par ~défaut" ;
+ Text [ dutch ] = "~Standaard" ;
+ Text [ swedish ] = "~Standard" ;
+ Text [ danish ] = "Standard" ;
+ Text [ portuguese_brazilian ] = "~Standard" ;
+ Text [ portuguese ] = "~Padrão" ;
+ Text[ chinese_simplified ] = "±ê×¼(~D)";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ polish ] = "Domyœlnie";
+ Text[ japanese ] = "•W€(~D)";
+ Text[ chinese_traditional ] = "¼Ð·Ç(~D)";
+ Text[ arabic ] = "ÇÝÊÑÇÖí";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "񃧯(~D)";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_STD
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 126 ) ;
+ Text = "Standard" ;
+ Text [ English ] = "Standard" ;
+ Text [ norwegian ] = "Standard" ;
+ Text [ italian ] = "Standard" ;
+ Text [ portuguese_brazilian ] = "Padrão" ;
+ Text [ portuguese ] = "Padrão" ;
+ Text [ finnish ] = "Vakio" ;
+ Text [ danish ] = "Standard" ;
+ Text [ french ] = "Liste des chemins" ;
+ Text [ swedish ] = "Standard" ;
+ Text [ dutch ] = "Standaard" ;
+ Text [ spanish ] = "Predeterminado" ;
+ Text [ english_us ] = "Default" ;
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ polish ] = "Domyœlnie";
+ Text[ japanese ] = "•W€";
+ Text[ chinese_traditional ] = "¼Ð·Ç";
+ Text[ arabic ] = "ÇÝÊÑÇÖí";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "񃧯";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_traditional ] = "¸ô®|";
+ Text[ arabic ] = "ÇáãÓÇÑÇÊ";
+ Text[ greek ] = "ÄéáäñïìÝò";
+ Text[ korean ] = "°æ·Î";
+ Text[ turkish ] = "Veri yollarý";
+ Text[ language_user1 ] = " ";
+};
+ErrorBox RID_SVXERR_OPT_DOUBLEPATHS
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Die Verzeichnisse für die Konfiguration und des Nachrichtenspeichers\nmüssen verschieden sein.\nBitte wählen Sie einen neuen Pfad aus." ;
+ Message [ English ] = "The paths of configuration and mail storages have to be different.\nPlease choose a new path." ;
+ Message [ english_us ] = "The configuration and mail directories must be specified as separate directories.\nPlease choose a new path." ;
+ Message [ portuguese_brazilian ] = "Die Verzeichnisse für die Konfiguration und des Nachrichtenspeichers\nmüssen verschieden sein.\nBitte wählen Sie einen neuen Pfad aus." ;
+ Message [ swedish ] = "Katalogerna för konfigurationen och meddelandelagret\nmåste vara olika.\nVälj en ny sökväg." ;
+ Message [ danish ] = "Konfiguratationens og meddelelseslagerets biblioteker må ikke være ens.\nVælg venligst en ny sti." ;
+ Message [ italian ] = "La cartella della configurazione deve essere diversa da quella per il salvataggio \ndei messaggi.\nScegliere un nuovo percorso." ;
+ Message [ spanish ] = "La configuración y los directorios de correo electrónico\ndeben especificarse como directorios separados.\nPor favor elija una nueva ruta." ;
+ Message [ french ] = "Les répertoires pour la configuration et l'enregistrement des messages\ndoivent être différents.\nVeuillez sélectionner un nouveau chemin." ;
+ Message [ dutch ] = "De mappen voor de configuratie en voor het opslaan van berichten\nmogen niet hetzelfde zijn.\nSelecteer een nieuw pad." ;
+ Message [ portuguese ] = "Especifique os directórios de configuração e de correio como directórios separados.\nSeleccione um novo atalho." ;
+ Message[ chinese_simplified ] = "ÅäÖúͱ£´æÓʼþµÄĿ¼²»ÄÜÏàͬ¡£\nÇëÄúÑ¡ÔñÒ»¸öеÄĿ¼¡£";
+ Message[ russian ] = "Êîíôèãóðàöèè è ñîõðàíåíèå ñîîáùåíèé äîëæíû íàõîäèòüñÿ\nâ ðàçíûõ êàòàëîãàõ.\nÂûáåðèòå, ïîæàëóéñòà, íîâûé ïóòü.";
+ Message[ polish ] = "Katalogi dla konfiguracji i dla zapisu wiadomoœci \nmusz¹ byæ ró¿ne.\nProszê wybraæ now¹ œcie¿kê.";
+ Message[ japanese ] = "Ý’è‚ÌÃÞ¨Ú¸ÄØ‚ÆÒ°Ù•Û‘¶‚ÌÃÞ¨Ú¸ÄØ‚Í\n•Ê‚Ì‚à‚Ì‚Å‚È‚¯‚ê‚΂Ȃè‚Ü‚¹‚ñB\nV‚µ‚¢Êß½‚ð‘I‘ð‚µ‚Ä‰º‚³‚¢B";
+ Message[ chinese_traditional ] = "°t¸m©MÀx¦s¶l¥óªº¥Ø¿ý¤£¯à¬Û¦P¡C\n½Ð±z¿ï¾Ü¤@­Ó·sªº¥Ø¿ý¡C";
+ Message[ arabic ] = "íÌÈ Ãä Êßæä ÏáÇÆá ÇáÊßæíä æÇáÈÑíÏ ãÎÊáÝÉ.\nÇáÑÌÇÁ ÇÎÊíÇÑ ãÓÇÑ ÌÏíÏ.";
+ Message[ greek ] = "Ïé êáôÜëïãïé ãéá ôçí äéáìüñöùóç êáé ôçí áðïèÞêåõóç ôùí ìçíõìÜôùí\nðñÝðåé íá åßíáé äéáöïñåôéêïß.\nÐáñáêáëþ åëÝãîôå ìéá íÝá äéáäñïìÞ.";
+ Message[ korean ] = "±¸¼º¿ë µð·ºÅ丮¿Í ¸ÞÀÏÀúÀå µð·ºÅ丮´Â ±¸ºÐµÇ¾î¾ß ÇÕ´Ï´Ù.\n»õ °æ·Î¸¦ ¼±ÅÃÇϽʽÿÀ.";
+ Message[ turkish ] = "Konfigürasyon ve ileti dizinlerinin ayrý dizinler olarak\nbelirlenmesi gerekir.\nLütfen yeni bir veri yolu seçin.";
+ Message[ language_user1 ] = " ";
+};
+ // ******************************************************************* EOF
diff --git a/svx/source/options/optsave.src b/svx/source/options/optsave.src
new file mode 100644
index 0000000000..33a1a0006a
--- /dev/null
+++ b/svx/source/options/optsave.src
@@ -0,0 +1,624 @@
+/*************************************************************************
+ *
+ * $RCSfile: optsave.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+ // include ---------------------------------------------------------------
+#include <sfx2/sfx.hrc>
+#include "helpid.hrc"
+#include "optsave.hrc"
+
+ // SID_SFXPAGE_SAVE ------------------------------------------------------
+#define TEXT_SAVEPAGE \
+ Text = "Speichern" ; \
+ Text [ English ] = "Save options" ; \
+ Text [ english_us ] = "Save" ; \
+ Text [ portuguese_brazilian ] = "Gravar opções" ; \
+ Text [ swedish ] = "Spara" ; \
+ Text [ danish ] = "Gem" ; \
+ Text [ italian ] = "Salva" ; \
+ Text [ spanish ] = "Guardar" ; \
+ Text [ french ] = "Enregistrement" ; \
+ Text [ dutch ] = "Opslaan" ; \
+ Text [ portuguese ] = "Guardar" ; \
+ Text [ finnish ] = "Tallennusasetukset" ; \
+ Text[ chinese_simplified ] = "´æÅÌ"; \
+ Text[ russian ] = "Ñîõðàíèòü"; \
+ Text[ polish ] = "Zapisz"; \
+ Text[ japanese ] = "•Û‘¶‚·‚é"; \
+ Text[ chinese_traditional ] = "Àx¦s"; \
+ Text[ arabic ] = "ÍÝÙ"; \
+ Text[ greek ] = "ÁðïèÞêåõóç"; \
+ Text[ korean ] = "ÀúÀå"; \
+ Text[ turkish ] = "Kaydet";
+
+TabPage RID_SFXPAGE_SAVE
+{
+ HelpId = HID_OPTIONS_SAVE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ TEXT_SAVEPAGE
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ GroupBox GB_SAVE
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 174 , 59 ) ;
+ 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 ] = "Options d'enregistrement" ;
+ 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 ] = "Àx¦s";
+ Text[ arabic ] = "ÍÝÙ";
+ Text[ greek ] = "ÁðïèÞêåõóç";
+ Text[ korean ] = "ÀúÀå";
+ Text[ turkish ] = "Kaydet";
+ };
+ CheckBox BTN_DOCINFO
+ {
+ Pos = MAP_APPFONT ( 12 , 12 ) ;
+ Size = MAP_APPFONT ( 162 , 10 ) ;
+ Text = "E~igenschaften vorher bearbeiten" ;
+ Text [ English ] = "~Edit document info before" ;
+ Text [ norwegian ] = "~Lagre dem dokumentinformasjon" ;
+ Text [ italian ] = "~Modifica prima le proprietà" ;
+ Text [ portuguese_brazilian ] = "~Gravar com Informações sobre o documento" ;
+ Text [ portuguese ] = "~Editar propriedades do documento antes de guardar" ;
+ Text [ finnish ] = "~Tallenna myös asiakirjan tiedot" ;
+ Text [ danish ] = "Rediger egenskaber forinden" ;
+ Text [ french ] = "É~diter les propriétés avant l'enregistrement" ;
+ Text [ swedish ] = "Redigera egenskaper ~innan" ;
+ Text [ dutch ] = "~Eigenschappen eerst bewerken" ;
+ Text [ spanish ] = "Edi~tar propiedades previamente" ;
+ Text [ english_us ] = "~Edit document properties before saving" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "Ïȱ༭ÊôÐÔ(~E)";
+ Text[ russian ] = "Ïðàâêà ñâîéñòâ äîêóìåíòà äî ñîõðàíåíèÿ";
+ Text[ polish ] = "Edytuj wczeœniej w³aœciwoœci";
+ Text[ japanese ] = "•Û‘¶Žž‚ÉÌßÛÊßè‚ÌŠm”F(~E)";
+ Text[ chinese_traditional ] = "¥ý½s¿èÄÝ©Ê(~E)";
+ Text[ arabic ] = "ÊÍÑíÑ ÎÕÇÆÕ ÇáãÓÊäÏ ÞÈá ÇáÍÝÙ";
+ Text[ greek ] = "Åðåîåñã. ~éäéïôÞôùí åããñÜöïõ ðñéí ôçí áðïèÞêåõóç";
+ Text[ korean ] = "¹®¼­ µî·ÏÁ¤º¸ ¹Ì¸® ÆíÁý(~E)";
+ Text[ turkish ] = "Önce özellikleri düzenle";
+ };
+ CheckBox BTN_BACKUP
+ {
+ Pos = MAP_APPFONT ( 12 , 24 ) ;
+ Size = MAP_APPFONT ( 162 , 10 ) ;
+ Text = "~Sicherungskopie immer erstellen" ;
+ Text [ English ] = "~Backup copy always" ;
+ Text [ norwegian ] = "~Alltid sikkerhetskopi" ;
+ Text [ italian ] = "~Crea sempre copia di backup" ;
+ Text [ portuguese_brazilian ] = "~Backup copy always" ;
+ Text [ portuguese ] = "Criar sempre ~cópia de segurança" ;
+ Text [ finnish ] = "~Backup copy always" ;
+ Text [ danish ] = "Opret altid sikkerhedskopi" ;
+ Text [ french ] = "Toujours créer une ~copie de sauvegarde" ;
+ Text [ swedish ] = "Skapa alltid ~säkerhetskopia" ;
+ Text [ dutch ] = "Altijd een ~reservekopie maken" ;
+ Text [ spanish ] = "Cre~ar siempre copia de seguridad" ;
+ Text [ english_us ] = "Al~ways create backup copy" ;
+ Text[ chinese_simplified ] = "×ÜÊǽ¨Á¢°²È«±¸¼þ(~B)";
+ Text[ russian ] = "Ñîçäàâàòü âñåãäà ðåçåðâíóþ êîïèþ";
+ Text[ polish ] = "Zawsze ~utwórz kopiê zapasow¹";
+ Text[ japanese ] = "펞ÊÞ¯¸±¯ÌߺËß°‚Ìì¬(~W)";
+ Text[ chinese_traditional ] = "Á`¬O«Ø¥ß¦w¥þ³Æ¥ó(~B)";
+ Text[ arabic ] = "Úãá äÓÎÉ ÇÍÊíÇØíÉ ÏæãÇð";
+ Text[ greek ] = "ÐÜíôá äçìéïõñãßá áíôéãñÜöïõ á~óöáëåßáò";
+ Text[ korean ] = "Ç×»ó ¹é¾÷ º¹»çÇϱâ(~W)";
+ Text[ turkish ] = "~Her zaman yedekle";
+ };
+ CheckBox BTN_AUTOSAVE
+ {
+ Pos = MAP_APPFONT ( 12 , 37 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Text = "~Automatisch speichern alle" ;
+ Text [ English ] = "~Automatic save every" ;
+ Text [ norwegian ] = "~Automatisk lagring etter " ;
+ Text [ italian ] = "~Salva automaticamente ogni" ;
+ Text [ portuguese_brazilian ] = "~Automatic save every" ;
+ Text [ portuguese ] = "Guardar ~automaticamente cada" ;
+ Text [ finnish ] = "~Automatic save every" ;
+ Text [ danish ] = "Gem automatisk alle" ;
+ Text [ french ] = "~Enregistrer automat. toutes les " ;
+ Text [ swedish ] = "Spara automatiskt var" ;
+ Text [ dutch ] = "~Automatisch opslaan alle" ;
+ Text [ spanish ] = "~Guardar automáticamente cada" ;
+ Text [ english_us ] = "~AutoSave every" ;
+ Text[ chinese_simplified ] = "È«²¿×Ô¶¯´æÅÌ(~A)";
+ Text[ russian ] = "Ñîõðàíÿòü àâòîìàòè÷åñêè êàæäûå";
+ Text[ polish ] = "Zapisz automatycznie wszystkie";
+ Text[ japanese ] = "‚·‚ׂĎ©“®“I‚É•Û‘¶(~A)";
+ Text[ chinese_traditional ] = "¥þ³¡¦Û°ÊÀx¦s(~A)";
+ Text[ arabic ] = "ÇáÍÝÙ ÊáÞÇÆíÇð ßá";
+ Text[ greek ] = "Áõôüìáôç áðïèÞêåõóç üëùí";
+ Text[ korean ] = "¸ðµÎ ÀÚµ¿À¸·Î ÀúÀå(~A)";
+ Text[ turkish ] = "Otomatik kaydetme sýklýðý";
+ };
+ NumericField ED_AUTOSAVE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 115 , 36 ) ;
+ Size = MAP_APPFONT ( 21 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 60 ;
+ StrictFormat = TRUE ;
+ First = 1 ;
+ Last = 60 ;
+ SpinSize = 1 ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_MINUTE
+ {
+ Pos = MAP_APPFONT ( 139 , 37 ) ;
+ Size = MAP_APPFONT ( 35 , 10 ) ;
+ Text = "Minuten" ;
+ Text [ English ] = "minutes" ;
+ Text [ norwegian ] = "...minutter" ;
+ Text [ italian ] = "minuti" ;
+ Text [ portuguese_brazilian ] = "minutos" ;
+ Text [ portuguese ] = "Minutos" ;
+ Text [ finnish ] = "minuutti" ;
+ Text [ danish ] = "minutter" ;
+ Text [ french ] = "minutes" ;
+ Text [ swedish ] = "minut" ;
+ Text [ dutch ] = "Minuten" ;
+ Text [ spanish ] = "Minutos" ;
+ Text [ english_us ] = "Minutes" ;
+ Text[ chinese_simplified ] = "·ÖÖÓ";
+ Text[ russian ] = "Ìèíóò(û)";
+ Text[ polish ] = "Minuty";
+ Text[ japanese ] = "•ª–ˆ‚És‚¤";
+ Text[ chinese_traditional ] = "¤ÀÄÁ";
+ Text[ arabic ] = "ÏÞÇÆÞ";
+ Text[ greek ] = "ËåðôÜ";
+ Text[ korean ] = "ºÐ";
+ Text[ turkish ] = "Dakika";
+ };
+ CheckBox BTN_AUTOSAVEPROMPT
+ {
+ Pos = MAP_APPFONT ( 22 , 50 ) ;
+ Size = MAP_APPFONT ( 152 , 10 ) ;
+ Text = "Mit ~Rückfrage" ;
+ Text [ English ] = "~Prompt to save" ;
+ Text [ norwegian ] = "~Anmodning om å lagre" ;
+ Text [ italian ] = "~Richiedi conferma" ;
+ Text [ portuguese_brazilian ] = "~Aviso para gravar" ;
+ Text [ portuguese ] = "~Pronta para guardar" ;
+ Text [ finnish ] = "Tallennukselle va~hvistus" ;
+ Text [ danish ] = "Spørg først" ;
+ Text [ french ] = "Avec ~confirmation" ;
+ Text [ swedish ] = "Bek~räfta före spara" ;
+ Text [ dutch ] = "~Met bevestiging" ;
+ Text [ spanish ] = "Con c~onsulta" ;
+ Text [ english_us ] = "~Prompt to save" ;
+ Text[ chinese_simplified ] = "ÏÔʾѯÎÊ(~P)";
+ Text[ russian ] = "Ñ çàïðîñîì";
+ Text[ polish ] = "Z zapytanie~m";
+ Text[ japanese ] = "Šm”FÒ¯¾°¼Þ‚Ì•\\Ž¦(~P)";
+ Text[ chinese_traditional ] = "Åã¥Ü¸ß°Ý(~P)";
+ Text[ arabic ] = "ÇáãØÇáÈÉ ÈÇáÍÝÙ";
+ Text[ greek ] = "Ìå åñþ~ôçóç äéåõêñßíçóçò";
+ Text[ korean ] = "ÀúÀåÇÒ ¶§ È®ÀÎ(~P)";
+ Text[ turkish ] = "~Önce sor";
+ };
+ GroupBox GB_SAVEGRAPHICS
+ {
+ Pos = MAP_APPFONT ( 186 , 3 ) ;
+ Size = MAP_APPFONT ( 68 , 59 ) ;
+ Text = "Grafiken speichern" ;
+ Text [ English ] = "Save graphics" ;
+ Text [ portuguese ] = "Guardar imagens" ;
+ Text [ english_us ] = "Save graphics" ;
+ Text [ portuguese_brazilian ] = "Grafiken speichern/sichern" ;
+ Text [ swedish ] = "Spara grafiker" ;
+ Text [ danish ] = "Gem billeder" ;
+ Text [ italian ] = "Salva le immagini" ;
+ Text [ spanish ] = "Guardar imágenes" ;
+ Text [ french ] = "Images" ;
+ Text [ dutch ] = "Afbeeldingen opslaan" ;
+ Text[ chinese_simplified ] = "´æÅÌͼÐÎ";
+ Text[ russian ] = "Ñîõðàíåíèå ãðàôèêè";
+ Text[ polish ] = "Zapisz grafiki";
+ Text[ japanese ] = "¸Þ×̲¯¸‚Ì•Û‘¶";
+ Text[ chinese_traditional ] = "Àx¦s¹Ï§Î";
+ Text[ arabic ] = "ÍÝÙ ÇáÕæÑ";
+ Text[ greek ] = "ÁðïèÞêåõóç ãñáöéêþí";
+ Text[ korean ] = "±×·¡ÇÈ ÀúÀå";
+ Text[ turkish ] = "Grafikleri kaydet";
+ };
+ RadioButton RB_SAVENORMAL
+ {
+ Pos = MAP_APPFONT ( 192 , 14 ) ;
+ Size = MAP_APPFONT ( 56 , 10 ) ;
+ Text = "Nor~mal" ;
+ Text [ English ] = "Nor~mal" ;
+ Text [ portuguese ] = "~Padrão" ;
+ Text [ english_us ] = "~Normal" ;
+ Text [ portuguese_brazilian ] = "~Normal" ;
+ Text [ swedish ] = "Nor~malt" ;
+ Text [ danish ] = "Normalt" ;
+ Text [ italian ] = "~Normale" ;
+ Text [ spanish ] = "~Normal" ;
+ Text [ french ] = "~Normal" ;
+ Text [ dutch ] = "~Normaal" ;
+ Text[ chinese_simplified ] = "ÆÕͨ(~N)";
+ Text[ russian ] = "Îáû÷íîå";
+ Text[ polish ] = "Normalny";
+ Text[ japanese ] = "’Êí(~N)";
+ Text[ chinese_traditional ] = "´¶³q(~N)";
+ Text[ arabic ] = "ÚÇÏí";
+ Text[ greek ] = "ÊáíïíéêÜ";
+ Text[ korean ] = "񃧯(~N)";
+ Text[ turkish ] = "Normal";
+ };
+ RadioButton RB_SAVECOMPRESS
+ {
+ Pos = MAP_APPFONT ( 192 , 27 ) ;
+ Size = MAP_APPFONT ( 56 , 10 ) ;
+ Text = "~Komprimiert" ;
+ Text [ English ] = "~Compressed" ;
+ Text [ portuguese ] = "~Comprimido" ;
+ Text [ english_us ] = "~Compressed" ;
+ Text [ portuguese_brazilian ] = "~Komprimiert" ;
+ Text [ swedish ] = "~Komprimerat" ;
+ Text [ danish ] = "Komprimeret" ;
+ Text [ italian ] = "~Compresso" ;
+ Text [ spanish ] = "Co~mprimido" ;
+ Text [ french ] = "~Comprimé" ;
+ Text [ dutch ] = "~Gecomprimeerd" ;
+ Text[ chinese_simplified ] = "ѹËõ(~C)";
+ Text[ russian ] = "Óæàòîå";
+ Text[ polish ] = "Skompresowany";
+ Text[ japanese ] = "ˆ³k(~C)";
+ Text[ chinese_traditional ] = "À£ÁY(~C)";
+ Text[ arabic ] = "ãÖÛæØ";
+ Text[ greek ] = "ÓõìðéåóìÝíá";
+ Text[ korean ] = "¾ÐÃà(~C)";
+ Text[ turkish ] = "Sýkýþtýrýlmýþ";
+ };
+ RadioButton RB_SAVEORIGINAL
+ {
+ Pos = MAP_APPFONT ( 192 , 40 ) ;
+ Size = MAP_APPFONT ( 56 , 10 ) ;
+ Text = "Im Original~format" ;
+ Text [ English ] = "In ~original format" ;
+ Text [ portuguese ] = "Formato ~original" ;
+ Text [ english_us ] = "O~riginal format" ;
+ Text [ portuguese_brazilian ] = "~Originalformat" ;
+ Text [ swedish ] = "I original~format" ;
+ Text [ danish ] = "I originalformat" ;
+ Text [ italian ] = "Formato originale" ;
+ Text [ spanish ] = "~Formato original" ;
+ Text [ french ] = "~Format d'origine" ;
+ Text [ dutch ] = "~Origineel formaat" ;
+ Text[ chinese_simplified ] = "Ô­¼þ¸ñʽ(~F)";
+ Text[ russian ] = "Â îðèãèíàëå";
+ Text[ polish ] = "W oryg. formacie";
+ Text[ japanese ] = "‚»‚Ì‚Ü‚Ü(~R)";
+ Text[ chinese_traditional ] = "­ì¥ó®æ¦¡(~F)";
+ Text[ arabic ] = "ÊäÓíÞ ÃÕáí";
+ Text[ greek ] = "Áñ÷éêÞ ìïñ~öÞ";
+ Text[ korean ] = "¿ø·¡ ¼­½Ä(~R)";
+ Text[ turkish ] = "Asýl formatýnda";
+ };
+ GroupBox GB_WORKINGSET
+ {
+ Pos = MAP_APPFONT ( 6 , 64 ) ;
+ Size = MAP_APPFONT ( 136 , 45 ) ;
+ Text = "Bearbeitungsansicht wiederherstellen" ;
+ Text [ English ] = "Restore Workingview" ;
+ Text [ english_us ] = "Restore editing view" ;
+ Text [ italian ] = "Ripristina vista modifica" ;
+ Text [ spanish ] = "Restablecer visualización de edición" ;
+ Text [ french ] = "Restauration des affichages" ;
+ Text [ dutch ] = "Bewerkingsbeeld herstellen" ;
+ Text [ swedish ] = "Återställ redigeringsvy" ;
+ Text [ danish ] = "Gedan redigeringsvisning" ;
+ Text [ portuguese_brazilian ] = "Bearbeitungsansicht wiederherstellen" ;
+ Text [ portuguese ] = "Restaurar visualização de edição" ;
+ Text[ chinese_simplified ] = "»Ö¸´±à¼­ÊÓͼ";
+ Text[ russian ] = "Âîññòàíîâèòü ðàáî÷èé âèä";
+ Text[ polish ] = "Przywróæ widok roboczy";
+ Text[ japanese ] = "I—¹Žž‚Ìó‘Ô‚ÅŽŸ‰ñŠJŽn";
+ Text[ chinese_traditional ] = "«ì´_½s¿èÀ˵ø";
+ Text[ arabic ] = "ÇÓÊÚÇÏÉ ØÑíÞÉ ÚÑÖ ÇáÊÍÑíÑ";
+ Text[ greek ] = "ÅðáíáöïñÜ ðñïâïëÞò åðåîåñãáóßáò";
+ Text[ korean ] = "ÆíÁýº¸±â º¹¿ø";
+ Text[ turkish ] = "Düzenleme görünümüne dön";
+ };
+ CheckBox BTN_DOCVIEW
+ {
+ Pos = MAP_APPFONT ( 12 , 73 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ Text = "D~okumentansicht" ;
+ Text [ English ] = "Document~view" ;
+ Text [ dutch ] = "D~ocumentweergave" ;
+ Text [ english_us ] = "Document ~view" ;
+ Text [ italian ] = "Visualizzazione documento" ;
+ Text [ spanish ] = "Visuali~zación del documento" ;
+ Text [ french ] = "~Affichage du document" ;
+ Text [ swedish ] = "D~okumentvy" ;
+ Text [ danish ] = "Dokumentvisning" ;
+ Text [ portuguese_brazilian ] = "D~okumentansicht" ;
+ Text [ portuguese ] = "Ver ~documento" ;
+ Text[ chinese_simplified ] = "ÎĵµÊÓͼ(~V)";
+ Text[ russian ] = "Âèä äîêóìåíòà";
+ Text[ polish ] = "Widok dokumentu";
+ Text[ japanese ] = "ÄÞ·­ÒÝÄÓ°ÄÞ(~V)";
+ Text[ chinese_traditional ] = "¤å¥óÀ˵ø(~V)";
+ Text[ arabic ] = "ØÑíÞÉ ÚÑÖ ÇáãÓÊäÏ";
+ Text[ greek ] = "ÐñïâïëÞ åããñÜöïõ";
+ Text[ korean ] = "¹®¼­ º¸±â(~V)";
+ Text[ turkish ] = "Belge görünümü";
+ };
+ CheckBox BTN_OPENWIN
+ {
+ Pos = MAP_APPFONT ( 12 , 85 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ Text = "~Geöffnete Fenster" ;
+ Text [ English ] = "Open ~Windows" ;
+ Text [ english_us ] = "Open ~windows" ;
+ Text [ italian ] = "Finestre aperte" ;
+ Text [ spanish ] = "~Ventanas abiertas" ;
+ Text [ french ] = "~Fenêtres ouvertes" ;
+ Text [ dutch ] = "Geopende ~vensters" ;
+ Text [ swedish ] = "Öppnade fönster" ;
+ Text [ danish ] = "Åbne vinduer" ;
+ Text [ portuguese_brazilian ] = "Geöffnete ~Fenster" ;
+ Text [ portuguese ] = "~Janelas abertas" ;
+ Text[ chinese_simplified ] = "´ò¿ªµÄÊÓ´°(~W)";
+ Text[ russian ] = "Îòêðûòûå îêíà";
+ Text[ polish ] = "Otwarte okna";
+ Text[ japanese ] = "ŠJ‚¢‚½³¨ÝÄÞ³(~W)";
+ Text[ chinese_traditional ] = "¶}±Òªºµøµ¡(~W)";
+ Text[ arabic ] = "ÇáäæÇÝÐ ÇáãÝÊæÍÉ";
+ Text[ greek ] = "ÐáñÜèõñá áíïé÷ôÜ";
+ Text[ korean ] = "¿­¸° â(~W)";
+ Text[ turkish ] = "Açýk pencereler";
+ };
+ CheckBox BTN_OPENDOC
+ {
+ Pos = MAP_APPFONT ( 12 , 97 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ Text = "Geöffnete ~Dokumente" ;
+ Text [ English ] = "Open ~Documents" ;
+ Text [ dutch ] = "Geopende ~documenten" ;
+ Text [ english_us ] = "Open ~documents" ;
+ Text [ italian ] = "Documenti aperti" ;
+ Text [ spanish ] = "~Documentos abiertos" ;
+ Text [ french ] = "D~ocuments ouverts" ;
+ Text [ swedish ] = "Öppna ~dokument" ;
+ Text [ danish ] = "Åbne dokumenter" ;
+ Text [ portuguese_brazilian ] = "Geöffnete ~Dokumente" ;
+ Text [ portuguese ] = "~Documentos abertos" ;
+ Text[ chinese_simplified ] = "´ò¿ªµÄÎĵµ(~D)";
+ Text[ russian ] = "Îòêðûòûå äîêóìåíòû";
+ Text[ polish ] = "Otw~arte dokumenty";
+ Text[ japanese ] = "ŠJ‚¢‚½ÄÞ·­ÒÝÄ(~D)";
+ Text[ chinese_traditional ] = "¶}±Òªº¤å¥ó(~D)";
+ Text[ arabic ] = "ÇáãÓÊäÏÇÊ ÇáãÝÊæÍÉ";
+ Text[ greek ] = "'Áíïéãìá åããñÜöùí";
+ Text[ korean ] = "¿­¸° ¹®¼­(~D)";
+ Text[ turkish ] = "Açýk belgeler";
+ };
+ GroupBox GB_RELATIVE
+ {
+ Pos = MAP_APPFONT ( 148 , 64 ) ;
+ Size = MAP_APPFONT ( 106 , 45 ) ;
+ Text = "URLs relativ speichern" ;
+ Text [ English ] = "Save URLs relative" ;
+ Text [ english_us ] = "Save URLs relative to" ;
+ Text [ italian ] = "Salvare URL relativamente" ;
+ Text [ spanish ] = "Guardar URLs relativamente" ;
+ Text [ french ] = "Enregistrement relatif des URLs" ;
+ Text [ dutch ] = "URLs relatief opslaan" ;
+ Text [ swedish ] = "Spara URL:er relativt" ;
+ Text [ danish ] = "Gem URLs relativt" ;
+ Text [ portuguese_brazilian ] = "URLs relativ speichern" ;
+ Text [ portuguese ] = "Guardar URLs relativamente" ;
+ Text[ chinese_simplified ] = "Ïà¶Ô´æÅÌ URL";
+ Text[ russian ] = "Ñîõðàíÿòü URL îòíîñèòåëüíî";
+ Text[ polish ] = "Zapisz URL relatywnie";
+ Text[ japanese ] = "URL±ÄÞÚ½‚Ì‘Š‘Εۑ¶";
+ Text[ chinese_traditional ] = "¬Û¹ïÀx¦s URL";
+ Text[ arabic ] = "ÍÝÙ ÇáÜ URLs ÍÝÙÇð äÓÈíÇð Ýí";
+ Text[ greek ] = "Ó÷åôéêÞ áðïèÞêåõóç ôùí URL";
+ Text[ korean ] = "URL »ó´ëÀû ÀúÀå";
+ Text[ turkish ] = "URL göreceli kayýt yeri";
+ };
+ CheckBox BTN_RELATIVE_FSYS
+ {
+ Pos = MAP_APPFONT ( 154 , 73 ) ;
+ Size = MAP_APPFONT ( 94 , 10 ) ;
+ Text = "im Da~teisystem" ;
+ Text [ English ] = "on ~filesystem" ;
+ Text [ english_us ] = "~File system" ;
+ Text [ dutch ] = "~naar bestandsysteem" ;
+ Text [ italian ] = "Al file sys~tem" ;
+ Text [ spanish ] = "En el ~sistema de archivos" ;
+ Text [ french ] = "~Système de fichiers" ;
+ TabStop = TRUE ;
+ Text [ swedish ] = "i filsys~tem" ;
+ Text [ danish ] = "i filsystemet" ;
+ Text [ portuguese_brazilian ] = "im Da~teisystem" ;
+ Text [ portuguese ] = "No sistema de ~ficheiros" ;
+ Text[ chinese_simplified ] = "ÔÚÎļþϵͳÄÚ(~F)";
+ Text[ russian ] = "â ñèñòåìå ôàéëîâ";
+ Text[ polish ] = "W systemie pli~ków";
+ Text[ japanese ] = "̧²Ù ¼½ÃÑ(~F)";
+ Text[ chinese_traditional ] = "¦bÀɮרt²Î¤º(~F)";
+ Text[ arabic ] = "äÙÇã ÇáãáÝ";
+ Text[ greek ] = "óôï óýóôçìá áñ÷åßùí";
+ Text[ korean ] = "ÆÄÀÏ ½Ã½ºÅÛ(~F)";
+ Text[ language_user1 ] = "LS 21.12.99 Vorsicht, nicht viel Platz! - - - -";
+ Text[ turkish ] = "Dosya sistemi";
+ };
+ CheckBox BTN_RELATIVE_INET
+ {
+ Pos = MAP_APPFONT ( 154 , 85 ) ;
+ Size = MAP_APPFONT ( 94 , 10 ) ;
+ Text = "im Int~ernet" ;
+ Text [ English ] = "~Internet" ;
+ Text [ english_us ] = "~Internet" ;
+ Text [ italian ] = "A Internet" ;
+ Text [ spanish ] = "En ~Internet" ;
+ Text [ french ] = "Sur l'~Internet" ;
+ Text [ dutch ] = "in Int~ernet" ;
+ Text [ swedish ] = "på Int~ernet" ;
+ Text [ danish ] = "på Internettet" ;
+ Text [ portuguese_brazilian ] = "im Int~ernet" ;
+ Text [ portuguese ] = "Na Int~ernet" ;
+ Text[ chinese_simplified ] = "ÔÚ¹ú¼Ê»¥ÁªÍøÄÚ(~I)";
+ Text[ russian ] = "â Èíòåðíåòå";
+ Text[ polish ] = "W I~nternecie";
+ Text[ japanese ] = "²ÝÀ°È¯Ä(~I)";
+ Text[ chinese_traditional ] = "~Internet";
+ Text[ arabic ] = "ÇáÅäÊÑäÊ";
+ Text[ greek ] = "óôï Internet";
+ Text[ korean ] = "ÀÎÅͳÝ(~I)";
+ Text[ turkish ] = "Internet";
+ };
+ GroupBox GB_UNDO
+ {
+ Pos = MAP_APPFONT ( 6 , 110 ) ;
+ Size = MAP_APPFONT ( 248 , 21 ) ;
+ Text = "Rückgängig" ;
+ Text [ English ] = "Undo" ;
+ Text [ english_us ] = "Undo " ;
+ Text [ italian ] = "Annulla" ;
+ Text [ spanish ] = "Deshacer " ;
+ Text [ french ] = "Annuler " ;
+ Text [ dutch ] = "Ongedaan" ;
+ Text [ swedish ] = "Ångra" ;
+ Text [ danish ] = "Fortryd" ;
+ Text [ portuguese_brazilian ] = "Rückgängig" ;
+ Text [ portuguese ] = "Desfazer" ;
+ Text[ chinese_simplified ] = "³·ÏûÃüÁî";
+ Text[ russian ] = "Îòìåíèòü";
+ Text[ polish ] = "Cofnij";
+ Text[ japanese ] = "Œ³‚É–ß‚·";
+ Text[ chinese_traditional ] = "ºM®ø©R¥O";
+ Text[ arabic ] = "ÊÑÇÌÚ";
+ Text[ greek ] = "Áíáßñåóç";
+ Text[ korean ] = "½ÇÇà Ãë¼Ò";
+ Text[ turkish ] = "Geri al";
+ };
+ FixedText FT_UNDO
+ {
+ Pos = MAP_APPFONT ( 12 , 118 ) ;
+ Size = MAP_APPFONT ( 70 , 10 ) ;
+ Text = "A~nzahl der Schritte" ;
+ Text [ English ] = "~Count of steps" ;
+ Text[ italian ] = "~Numero operazioni";
+ Text[ portuguese_brazilian ] = "~Count of steps";
+ Text[ portuguese ] = "~Contar etapas";
+ Text[ danish ] = "Antal trin";
+ Text[ french ] = "~Nombre de pas";
+ Text[ swedish ] = "A~ntal steg";
+ Text[ dutch ] = "~Aantal stappen";
+ Text[ spanish ] = "~Cantidad de pasos";
+ Text[ english_us ] = "Number of steps";
+ Text[ chinese_simplified ] = "²½Êý";
+ Text[ russian ] = "Êîëè÷åñòâî øàãîâ";
+ Text[ polish ] = "Liczba kroków";
+ Text[ japanese ] = "½Ã¯Ìß”";
+ Text[ chinese_traditional ] = "¨B¼Æ";
+ Text[ arabic ] = "ÚÏÏ ÇáÎØæÇÊ";
+ Text[ greek ] = "Á~ñéèìüò âçìÜôùí";
+ Text[ korean ] = "´Ü°è ¼ö";
+ Text[ turkish ] = "Ýþlem sayýsý";
+ };
+ NumericField ED_UNDO
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 85 , 117 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ First = 1 ;
+ Maximum = 100 ;
+ Value = 100 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ };
+};
+
+// ********************************************************************** EOF
+
diff --git a/svx/source/options/optspell.src b/svx/source/options/optspell.src
new file mode 100644
index 0000000000..f212f845c7
--- /dev/null
+++ b/svx/source/options/optspell.src
@@ -0,0 +1,287 @@
+/*************************************************************************
+ *
+ * $RCSfile: optspell.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ------------------------------------------------------------------
+#include <sfx2/sfx.hrc>
+#include "helpid.hrc"
+#include "optspell.hrc"
+ // pragma -------------------------------------------------------------------
+
+ // RID_SFXPAGE_SPELL --------------------------------------------------------
+TabPage RID_SFXPAGE_SPELL
+{
+ HelpId = HID_OPTIONS_SPELL ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 221 , 135 ) ;
+ Text = "Rechtschreibung" ;
+ Text [ ENGLISH ] = "Spell checking" ;
+ Text [ norwegian ] = "Stavekontroll" ;
+ Text [ italian ] = "Controllo ortografico" ;
+ Text [ portuguese_brazilian ] = "Verificação de ortográfica" ;
+ Text [ portuguese ] = "Correcção ortográfica" ;
+ Text [ finnish ] = "Korjausluku" ;
+ Text [ danish ] = "Stavekontrol" ;
+ Text [ french ] = "Orthographe" ;
+ Text [ swedish ] = "Rättstavning" ;
+ Text [ dutch ] = "Spellingcontrole" ;
+ Text [ spanish ] = "Ortografía" ;
+ Text [ english_us ] = "Spellcheck" ;
+ PushButton BTN_BOOK
+ {
+ Pos = MAP_APPFONT ( 128 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Bearbeiten..." ;
+ Text [ ENGLISH ] = "~Edit..." ;
+ Text [ norwegian ] = "~Edit..." ;
+ Text [ italian ] = "Modifica..." ;
+ Text [ portuguese_brazilian ] = "~Editar..." ;
+ Text [ portuguese ] = "~Editar..." ;
+ Text [ finnish ] = "~Muokkaa..." ;
+ Text [ danish ] = "Rediger..." ;
+ Text [ french ] = "~Modifier..." ;
+ Text [ swedish ] = "~Redigera..." ;
+ Text [ dutch ] = "Be~werken..." ;
+ Text [ spanish ] = "~Editar..." ;
+ Text [ english_us ] = "~Edit..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "±à¼­(~E)...";
+ Text[ russian ] = "Ïðàâêà...";
+ Text[ polish ] = "Edytuj...";
+ Text[ japanese ] = "•ÒW(~E)...";
+ Text[ chinese_traditional ] = "½s¿è(~E)...";
+ Text[ arabic ] = "ÊÍÑíÑ...";
+ Text[ greek ] = "~Åðåîåñãáóßá...";
+ Text[ korean ] = "ÆíÁý(~E)...";
+ Text[ turkish ] = "Düzenle...";
+ Text[ language_user1 ] = " ";
+ };
+ MultiListBox LB_BOOK
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 103 , 47 ) ;
+ TabStop = TRUE ;
+ AutoHScroll = TRUE ;
+ };
+ GroupBox GB_BOOK
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 115 , 66 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Wörterbücher : W÷rterb³cher */
+ /* ### ACHTUNG: Neuer Text in Resource? Wörterbücher : W÷rterb³cher */
+ Text = "Wörterbücher" ;
+ Text [ ENGLISH ] = "Dictionaries" ;
+ Text [ norwegian ] = "Ordlister" ;
+ Text [ italian ] = "Dizionari" ;
+ Text [ portuguese_brazilian ] = "Dicionários" ;
+ Text [ portuguese ] = "Dicionários" ;
+ Text [ finnish ] = "Sanastot" ;
+ Text [ danish ] = "Ordbøger" ;
+ Text [ french ] = "Dictionnaires" ;
+ Text [ swedish ] = "Ordböcker" ;
+ Text [ dutch ] = "Woordenboeken" ;
+ Text [ spanish ] = "Diccionarios" ;
+ Text [ english_us ] = "Dictionaries" ;
+ Text[ chinese_simplified ] = "×Öµä";
+ Text[ russian ] = "Ñëîâàðè";
+ Text[ polish ] = "S³owniki";
+ Text[ japanese ] = "Ž«‘";
+ Text[ chinese_traditional ] = "¦r¨å";
+ Text[ arabic ] = "ÇáÞæÇãíÓ";
+ Text[ greek ] = "ËåîéêÜ";
+ Text[ korean ] = "ȍ˟";
+ Text[ turkish ] = "Sözlükler";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox BTN_CAPS
+ {
+ Pos = MAP_APPFONT ( 12 , 82 ) ;
+ Size = MAP_APPFONT ( 103 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Großgeschriebene Wörter : ~Gro˜geschriebene W÷rter */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Großgeschriebene Wörter : ~Gro˜geschriebene W÷rter */
+ Text = "~Großgeschriebene Wörter" ;
+ Text [ ENGLISH ] = "~Capital words" ;
+ Text [ norwegian ] = "~Ord med store bokstaver" ;
+ Text [ italian ] = "~Parole maiuscole" ;
+ Text [ portuguese_brazilian ] = "~Palavras em maiúsculas" ;
+ Text [ portuguese ] = "~Palavras maiúsculas" ;
+ Text [ finnish ] = "~Isolla kirjoitetut sanat" ;
+ Text [ danish ] = "Ord med store bogstaver" ;
+ Text [ french ] = "les mots écrits en ~majuscules" ;
+ Text [ swedish ] = "Or~d med stora bokstäver" ;
+ Text [ dutch ] = "~Woorden met hoofdletters" ;
+ Text [ spanish ] = "~Palabras en mayúscula" ;
+ Text [ english_us ] = "~Capital words" ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "´óдµ¥´Ê(~C)";
+ Text[ russian ] = "Ñëîâà èç ïðîïèñíûõ áóêâ";
+ Text[ polish ] = "S³owa napisane du¿ymi literami";
+ Text[ japanese ] = "‚·‚ׂđ啶Žš‚Ì’PŒê(~C)";
+ Text[ chinese_traditional ] = "¤j¼g¦r(~C)";
+ Text[ arabic ] = "ÇáßáãÇÊ ÇáãßÊæÈÉ ÈÃÍÑÝ ßÈíÑÉ";
+ Text[ greek ] = "ËÝîåéò ìå êåöáëáßá ãñÜììáôá";
+ Text[ korean ] = "´ë¹®ÀÚ·Î ¾²ÀÎ ´Ü¾î(~C)";
+ Text[ turkish ] = "Büyük harfli sözcükler";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox BTN_NUMS
+ {
+ Pos = MAP_APPFONT ( 12 , 95 ) ;
+ Size = MAP_APPFONT ( 103 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Wörter mit Ziffern : ~W÷rter mit Ziffern */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Wörter mit Ziffern : ~W÷rter mit Ziffern */
+ Text = "~Wörter mit Ziffern " ;
+ Text [ ENGLISH ] = "~Words with numbers " ;
+ Text [ norwegian ] = "~Ord med tall " ;
+ Text [ italian ] = "Parole con ~numeri " ;
+ Text [ portuguese_brazilian ] = "~Palavras com números " ;
+ Text [ portuguese ] = "~Palavras com números " ;
+ Text [ finnish ] = "~Numeroita sisältävät sanat" ;
+ Text [ danish ] = "Ord med tal " ;
+ Text [ french ] = "les mots comportant des ~chiffres " ;
+ Text [ swedish ] = "Ord med s~iffror " ;
+ Text [ dutch ] = "~Woorden met cijfers " ;
+ Text [ spanish ] = "P~alabras con números " ;
+ Text [ english_us ] = "~Words with numbers " ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "º¬ÓÐÊý×ֵĴÊ(~W)";
+ Text[ russian ] = "Ñëîâà ñ öèôðàìè ";
+ Text[ polish ] = "S³owa z cyframi ";
+ Text[ japanese ] = "”Žš‚ðŠÜ‚Þ’PŒê(~W)";
+ Text[ chinese_traditional ] = "§t¦³¼Æ¦rªºµü(~W)";
+ Text[ arabic ] = "ÇáßáãÇÊ ÇáÊí ÊÍÊæí Úáì ÃÑÞÇã ";
+ Text[ greek ] = "ËÝîåéò ìå áñéèìïýò ";
+ Text[ korean ] = "¼ýÀÚ°¡ ÀÖ´Â ´Ü¾î (~W)";
+ Text[ turkish ] = "Rakamlý sözcükler ";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox BTN_UPLOW
+ {
+ Pos = MAP_APPFONT ( 12 , 108 ) ;
+ Size = MAP_APPFONT ( 103 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Groß- u. ~Kleinschreibung : Gro˜- u. ~Kleinschreibung */
+ /* ### ACHTUNG: Neuer Text in Resource? Groß- u. ~Kleinschreibung : Gro˜- u. ~Kleinschreibung */
+ Text = "Groß- u. ~Kleinschreibung " ;
+ Text [ ENGLISH ] = "~Upper and lower case " ;
+ Text [ norwegian ] = "~Stor og liten skrift " ;
+ Text [ italian ] = "Mai~uscole e minuscole " ;
+ Text [ portuguese_brazilian ] = "~Caixa alta e baixa " ;
+ Text [ portuguese ] = "~Maiúsculas & Minúsculas " ;
+ Text [ finnish ] = "~Isot ja pienet kirjaimet" ;
+ Text [ danish ] = "Store og små bogstaver " ;
+ Text [ french ] = "la ~casse " ;
+ Text [ swedish ] = "Stora och små bo~kstäver " ;
+ Text [ dutch ] = "~Hoofd-/kleine letters belangrijk " ;
+ Text [ spanish ] = "~Mayúsculas y minúsculas " ;
+ Text [ english_us ] = "~Case sensitive " ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "×Öĸ´óСд(~C) ";
+ Text[ russian ] = "Ó÷èòûâàòü ðåãèñòð ";
+ Text[ polish ] = "Ma³e i du¿e litery ";
+ Text[ japanese ] = "‘啶Žš/¬•¶Žš‚ð‹æ•Ê(~C) ";
+ Text[ chinese_traditional ] = "¦r¥À¤j¤p¼g(~C)";
+ Text[ arabic ] = "ÇáßÊÇÈÉ ÈÃÍÑÝ ßÈíÑÉ Ãæ ÕÛíÑÉ ";
+ Text[ greek ] = "ÐåæÜ-Êåöáëáßá ";
+ Text[ korean ] = "´ë¹®ÀÚ¿Í ¼Ò¹®ÀÚ (~C)";
+ Text[ turkish ] = "Büyük/küçük yazým ";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_AUDIT
+ {
+ Pos = MAP_APPFONT ( 6 , 71 ) ;
+ Size = MAP_APPFONT ( 115 , 53 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Prüfen : Pr³fen */
+ /* ### ACHTUNG: Neuer Text in Resource? Prüfen : Pr³fen */
+ Text = "Prüfen" ;
+ Text [ ENGLISH ] = "Check" ;
+ Text [ norwegian ] = "Kontroller" ;
+ Text [ italian ] = "Verifica" ;
+ Text [ portuguese_brazilian ] = "Verificar" ;
+ Text [ portuguese ] = "Verificar" ;
+ Text [ finnish ] = "Tarkistus" ;
+ Text [ danish ] = "Kontroller" ;
+ Text [ french ] = "Vérifier" ;
+ Text [ swedish ] = "Kontrollera" ;
+ Text [ dutch ] = "Controleren" ;
+ Text [ spanish ] = "Revisar" ;
+ Text [ english_us ] = "Check" ;
+ Text[ chinese_simplified ] = "¼ì²é";
+ Text[ russian ] = "Ïðîâåðÿòü";
+ Text[ polish ] = "SprawdŸ";
+ Text[ japanese ] = "½ÍßÙÁª¯¸";
+ Text[ chinese_traditional ] = "Àˬd";
+ Text[ arabic ] = "ÇáÊÏÞíÞ";
+ Text[ greek ] = "¸ëåã÷ïò";
+ Text[ korean ] = "°Ë»ç";
+ Text[ turkish ] = "Denetim";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "Õý×Ö·¨";
+ Text[ russian ] = "Ïðàâîïèñàíèå";
+ Text[ polish ] = "Pisownia";
+ Text[ japanese ] = "•¶ÍZ³";
+ Text[ chinese_traditional ] = "«÷¦r";
+ Text[ arabic ] = "ÊÏÞíÞ ÅãáÇÆí";
+ Text[ greek ] = "Ïñèïãñáößá";
+ Text[ korean ] = "¸ÂÃã¹ý °Ë»ç";
+ Text[ turkish ] = "Yazým kýlavuzu";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/outliner/makefile.mk b/svx/source/outliner/makefile.mk
new file mode 100644
index 0000000000..80c2c544b4
--- /dev/null
+++ b/svx/source/outliner/makefile.mk
@@ -0,0 +1,117 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=svx
+TARGET=outliner
+AUTOSEG=true
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=outl_pch
+PROJECTPCHSOURCE=outl_pch
+
+
+# --- Settings -----------------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Allgemein ----------------------------------------------------------
+
+.IF "$(header)" == ""
+
+CXXFILES= \
+ outlundo.cxx \
+ outliner.cxx \
+ outlin2.cxx \
+ paralist.cxx \
+ outlobj.cxx \
+ outlvw.cxx \
+ outleeng.cxx \
+ outl_pch.cxx
+
+SLOFILES= \
+ $(SLO)$/outlundo.obj \
+ $(SLO)$/outliner.obj \
+ $(SLO)$/outlin2.obj \
+ $(SLO)$/paralist.obj \
+ $(SLO)$/outlvw.obj \
+ $(SLO)$/outleeng.obj \
+ $(SLO)$/outlobj.obj
+
+SVXLIGHTOBJFILES= \
+ $(OBJ)$/outlundo.obj \
+ $(OBJ)$/outliner.obj \
+ $(OBJ)$/outlin2.obj \
+ $(OBJ)$/paralist.obj \
+ $(OBJ)$/outlvw.obj \
+ $(OBJ)$/outleeng.obj \
+ $(OBJ)$/outlobj.obj
+
+.ENDIF
+
+SRCFILES= outliner.src
+
+.INCLUDE : target.mk
diff --git a/svx/source/outliner/outl_pch.cxx b/svx/source/outliner/outl_pch.cxx
new file mode 100644
index 0000000000..f26e7ac162
--- /dev/null
+++ b/svx/source/outliner/outl_pch.cxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * $RCSfile: outl_pch.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <outl_pch.hxx>
+#pragma hdrstop
+
diff --git a/svx/source/outliner/outl_pch.hxx b/svx/source/outliner/outl_pch.hxx
new file mode 100644
index 0000000000..96c5975d65
--- /dev/null
+++ b/svx/source/outliner/outl_pch.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: outl_pch.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define ITEMID_FONTHEIGHT 0
+#define ITEMID_ADJUST 0
+#define ITEMID_LINESPACING 0
+#define ITEMID_LRSPACE 0
+#define ITEMID_BRUSH 0
+#define ITEMID_FIELD 0
+
+#include <svtools/intitem.hxx>
+
+#include <editeng.hxx>
+#include <editview.hxx>
+#include <editdata.hxx>
+#include <eerdll.hxx>
+
+#include <lrspitem.hxx>
+#include <fhgtitem.hxx>
diff --git a/svx/source/outliner/outleeng.cxx b/svx/source/outliner/outleeng.cxx
new file mode 100644
index 0000000000..87903d8a89
--- /dev/null
+++ b/svx/source/outliner/outleeng.cxx
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * $RCSfile: outleeng.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <outl_pch.hxx>
+
+#pragma hdrstop
+
+#define _OUTLINER_CXX
+#include <outliner.hxx>
+#include <outleeng.hxx>
+#include <paralist.hxx>
+#include <outliner.hrc>
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+
+OutlinerEditEng::OutlinerEditEng( Outliner* pEngOwner, SfxItemPool* pPool )
+ : EditEngine( pPool )
+{
+ pOwner = pEngOwner;
+}
+
+OutlinerEditEng::~OutlinerEditEng()
+{
+}
+
+void OutlinerEditEng::PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
+{
+ pOwner->PaintBullet( nPara, rStartPos, rOrigin, nOrientation, pOutDev );
+}
+
+Rectangle OutlinerEditEng::GetBulletArea( USHORT nPara )
+{
+ Rectangle aBulletArea = Rectangle( Point(), Point() );
+ if ( nPara < pOwner->pParaList->GetParagraphCount() )
+ {
+ if ( pOwner->ImplHasBullet( nPara ) )
+ aBulletArea = pOwner->ImpCalcBulletArea( nPara, FALSE );
+ }
+ return aBulletArea;
+}
+
+void OutlinerEditEng::ParagraphInserted( USHORT nNewParagraph )
+{
+ pOwner->ParagraphInserted( nNewParagraph );
+}
+
+void OutlinerEditEng::ParagraphDeleted( USHORT nDeletedParagraph )
+{
+ pOwner->ParagraphDeleted( nDeletedParagraph );
+}
+
+void OutlinerEditEng::StyleSheetChanged( SfxStyleSheet* pStyle )
+{
+ pOwner->StyleSheetChanged( pStyle );
+}
+
+void OutlinerEditEng::ParaAttribsChanged( USHORT nPara )
+{
+ pOwner->ParaAttribsChanged( nPara );
+}
+
+void OutlinerEditEng::ParagraphHeightChanged( USHORT nPara )
+{
+ pOwner->ParagraphHeightChanged( nPara );
+}
+
+BOOL OutlinerEditEng::SpellNextDocument()
+{
+ return pOwner->SpellNextDocument();
+}
+
+XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const
+{
+#ifndef SVX_LIGHT
+ switch( nUndoId )
+ {
+ case OLUNDO_DEPTH:
+ return XubString( EditResId( RID_OUTLUNDO_DEPTH ));
+
+ case OLUNDO_HEIGHT:
+ return XubString( EditResId(RID_OUTLUNDO_HEIGHT ));
+
+ case OLUNDO_EXPAND:
+ return XubString( EditResId( RID_OUTLUNDO_EXPAND ));
+
+ case OLUNDO_COLLAPSE:
+ return XubString( EditResId( RID_OUTLUNDO_COLLAPSE ));
+
+ case OLUNDO_ATTR:
+ return XubString( EditResId( RID_OUTLUNDO_ATTR ));
+
+ case OLUNDO_INSERT:
+ return XubString( EditResId( RID_OUTLUNDO_INSERT ));
+
+ default:
+ return EditEngine::GetUndoComment( nUndoId );
+ }
+#else // SVX_LIGHT
+ XubString aString;
+ return aString;
+#endif
+}
+
+void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, const long* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex )
+{
+ if ( nIndex == 0 )
+ {
+ // Dann das Bullet 'malen', dort wird bStrippingPortions ausgewertet
+ // und Outliner::DrawingText gerufen
+
+ // DrawingText liefert die BaseLine, DrawBullet braucht Top().
+ Point aCorrectedPos( rStartPos );
+ aCorrectedPos.Y() = GetDocPosTopLeft( nPara ).Y();
+ aCorrectedPos.Y() += GetFirstLineOffset( nPara );
+ pOwner->PaintBullet( nPara, aCorrectedPos, Point(), 0, GetRefDevice() );
+ }
+
+ pOwner->DrawingText(rStartPos,rText,pDXArray,rFont,nPara,nIndex );
+}
+
+void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
+{
+ EditEngine::FieldClicked( rField, nPara, nPos ); // Falls URL
+ pOwner->FieldClicked( rField, nPara, nPos );
+}
+
+void OutlinerEditEng::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
+{
+ pOwner->FieldSelected( rField, nPara, nPos );
+}
+
+XubString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+{
+ return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
+}
diff --git a/svx/source/outliner/outleeng.hxx b/svx/source/outliner/outleeng.hxx
new file mode 100644
index 0000000000..acbc3842af
--- /dev/null
+++ b/svx/source/outliner/outleeng.hxx
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * $RCSfile: outleeng.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _OUTLEENG_HXX
+#define _OUTLEENG_HXX
+
+#ifndef _OUTLINER_HXX
+#include <outliner.hxx>
+#endif
+#ifndef _EDITENG_HXX
+#include <editeng.hxx>
+#endif
+
+
+class OutlinerEditEng : public EditEngine
+{
+ Outliner* pOwner;
+
+public:
+ OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool );
+ ~OutlinerEditEng();
+
+ virtual void PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
+
+ virtual void ParagraphInserted( USHORT nNewParagraph );
+ virtual void ParagraphDeleted( USHORT nDeletedParagraph );
+ virtual void DrawingText(const Point& rStartPos, const XubString& rText, const long* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex );
+ virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
+ virtual void ParaAttribsChanged( USHORT nPara );
+ virtual void ParagraphHeightChanged( USHORT nPara );
+ virtual BOOL SpellNextDocument();
+ virtual XubString GetUndoComment( USHORT nUndoId ) const;
+
+ virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos );
+ virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos );
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor );
+
+ virtual Rectangle GetBulletArea( USHORT nPara );
+};
+
+#endif
+
diff --git a/svx/source/outliner/outlin2.cxx b/svx/source/outliner/outlin2.cxx
new file mode 100644
index 0000000000..26f571bbfe
--- /dev/null
+++ b/svx/source/outliner/outlin2.cxx
@@ -0,0 +1,709 @@
+/*************************************************************************
+ *
+ * $RCSfile: outlin2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <outl_pch.hxx>
+
+#pragma hdrstop
+
+#include <tools/list.hxx>
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _SV_MAPMOD_HXX
+#include <vcl/mapmod.hxx>
+#endif
+
+#define _OUTLINER_CXX
+
+#include <outliner.hxx>
+#include <paralist.hxx>
+#include <outlobj.hxx>
+#include <outleeng.hxx>
+#include <outlundo.hxx>
+#include <eeitem.hxx>
+#include <editstat.hxx>
+
+DBG_NAMEEX(Outliner);
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::linguistic;
+
+ // =====================================================================
+// ====================== Einfache Durchreicher =======================
+// ======================================================================
+
+void Outliner::SetUpdateMode( BOOL bUpdate )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetUpdateMode( bUpdate );
+}
+
+
+BOOL Outliner::GetUpdateMode() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetUpdateMode();
+}
+
+const SfxItemSet& Outliner::GetEmptyItemSet() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetEmptyItemSet();
+}
+
+void Outliner::EnableUndo( BOOL bEnable )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->EnableUndo( bEnable );
+}
+
+BOOL Outliner::IsUndoEnabled() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->IsUndoEnabled();
+}
+
+MapMode Outliner::GetRefMapMode() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetRefMapMode();
+}
+
+void Outliner::SetRefMapMode( const MapMode& rMMode )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetRefMapMode( rMMode );
+}
+
+void Outliner::ClearModifyFlag()
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->ClearModifyFlag();
+}
+
+BOOL Outliner::IsModified() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->IsModified();
+}
+
+ULONG Outliner::GetTextHeight() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetTextHeight();
+}
+
+void Outliner::SetStatusEventHdl( const Link& rLink )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetStatusEventHdl( rLink );
+}
+
+Link Outliner::GetStatusEventHdl() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetStatusEventHdl();
+}
+
+void Outliner::SetDefTab( USHORT nTab )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetDefTab( nTab );
+}
+
+USHORT Outliner::GetDefTab() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetDefTab();
+}
+
+BOOL Outliner::IsFlatMode() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->IsFlatMode();
+}
+
+BOOL Outliner::UpdateFields()
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->UpdateFields();
+}
+
+void Outliner::RemoveFields( BOOL bKeepFieldText, TypeId aType )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->RemoveFields( bKeepFieldText, aType );
+}
+
+void Outliner::SetWordDelimiters( const String& rDelimiters )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetWordDelimiters( rDelimiters );
+}
+
+String Outliner::GetWordDelimiters() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetWordDelimiters();
+}
+
+String Outliner::GetWord( USHORT nPara, USHORT nIndex )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetWord( nPara, nIndex );
+}
+
+
+BOOL Outliner::CopyClipboard() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->CopyClipboard();
+}
+
+BOOL Outliner::CopyClipboard( const ESelection& rSelection ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->CopyClipboard( rSelection );
+}
+
+BOOL Outliner::PasteClipboard()
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->PasteClipboard();
+}
+
+BOOL Outliner::CopyDragServer() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->CopyDragServer();
+}
+
+BOOL Outliner::CopyDragServer( const ESelection& rSelection ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->CopyDragServer( rSelection );
+}
+
+BOOL Outliner::PasteDragServer( USHORT nItem )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->PasteDragServer( nItem );
+}
+
+void Outliner::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->Draw( pOutDev, rOutRect );
+}
+
+void Outliner::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->Draw( pOutDev, rOutRect, rStartDocPos );
+}
+
+
+void Outliner::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->Draw( pOutDev, rStartPos, nOrientation );
+}
+
+void Outliner::SetPaperSize( const Size& rSize )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetPaperSize( rSize );
+}
+
+const Size& Outliner::GetPaperSize() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetPaperSize();
+}
+
+void Outliner::SetPolygon( const XPolyPolygon& rPoly )
+{
+ DBG_CHKTHIS( Outliner, 0 );
+ pEditEngine->SetPolygon( rPoly );
+}
+
+void Outliner::SetPolygon( const XPolyPolygon& rPoly, const XPolyPolygon* pXorPoly )
+{
+ DBG_CHKTHIS( Outliner, 0 );
+ pEditEngine->SetPolygon( rPoly, pXorPoly );
+}
+
+void Outliner::ClearPolygon()
+{
+ DBG_CHKTHIS( Outliner, 0 );
+ pEditEngine->ClearPolygon();
+}
+
+const PolyPolygon* Outliner::GetPolygon()
+{
+ DBG_CHKTHIS( Outliner, 0 );
+ return pEditEngine->GetPolygon();
+}
+
+const Size& Outliner::GetMinAutoPaperSize() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetMinAutoPaperSize();
+}
+
+void Outliner::SetMinAutoPaperSize( const Size& rSz )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetMinAutoPaperSize( rSz );
+}
+
+const Size& Outliner::GetMaxAutoPaperSize() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetMaxAutoPaperSize();
+}
+
+void Outliner::SetMaxAutoPaperSize( const Size& rSz )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetMaxAutoPaperSize( rSz );
+}
+
+BOOL Outliner::IsExpanded( Paragraph* pPara ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pParaList->HasVisibleChilds( pPara );
+}
+
+Paragraph* Outliner::GetParent( Paragraph* pParagraph ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ USHORT nRelPos;
+ return pParaList->GetParent( pParagraph, nRelPos );
+}
+
+ULONG Outliner::GetChildCount( Paragraph* pParent ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pParaList->GetChildCount( pParent );
+}
+
+Size Outliner::CalcTextSize()
+{
+ DBG_CHKTHIS(Outliner,0);
+ return Size(pEditEngine->CalcTextWidth(),pEditEngine->GetTextHeight());
+}
+
+Point Outliner::GetDocPos( Paragraph* pPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetDocPosTopLeft( (USHORT)pParaList->GetAbsPos( pPara ) );
+}
+
+void Outliner::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetStyleSheetPool( pSPool );
+}
+
+SfxStyleSheetPool* Outliner::GetStyleSheetPool()
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetStyleSheetPool();
+}
+
+SfxStyleSheet* Outliner::GetStyleSheet( ULONG nPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetStyleSheet( (USHORT)nPara );
+}
+
+BOOL Outliner::IsInSelectionMode() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->IsInSelectionMode();
+}
+
+void Outliner::SetControlWord( ULONG nWord )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetControlWord( nWord );
+}
+
+ULONG Outliner::GetControlWord() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetControlWord();
+}
+
+void Outliner::UndoActionStart( USHORT nId )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->UndoActionStart( nId );
+}
+
+void Outliner::UndoActionEnd( USHORT nId )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->UndoActionEnd( nId );
+}
+
+void Outliner::InsertUndo( EditUndo* pUndo )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->GetUndoManager().AddUndoAction( pUndo, FALSE );
+}
+
+BOOL Outliner::IsInUndo()
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->IsInUndo();
+}
+
+ULONG Outliner::GetLineCount( ULONG nParagraph ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetLineCount( (USHORT)nParagraph );
+}
+
+USHORT Outliner::GetLineLen( ULONG nParagraph, USHORT nLine ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetLineLen( (USHORT)nParagraph, nLine );
+}
+
+ULONG Outliner::GetLineHeight( ULONG nParagraph, ULONG nLine )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetLineHeight( (USHORT)nParagraph, (USHORT)nLine );
+}
+
+void Outliner::QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->QuickRemoveCharAttribs( nPara, nWhich );
+}
+
+EESpellState Outliner::HasSpellErrors( LanguageType eLang )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->HasSpellErrors( eLang );
+}
+
+void Outliner::SetDefaultLanguage( LanguageType eLang )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetDefaultLanguage( eLang );
+}
+
+LanguageType Outliner::GetDefaultLanguage() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetDefaultLanguage();
+}
+
+BOOL Outliner::HasOnlineSpellErrors() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->HasOnlineSpellErrors();
+}
+
+void Outliner::CompleteOnlineSpelling()
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->CompleteOnlineSpelling();
+}
+
+BOOL Outliner::HasText( const SvxSearchItem& rSearchItem )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->HasText( rSearchItem );
+}
+
+void Outliner::SetEditTextObjectPool( SfxItemPool* pPool )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetEditTextObjectPool( pPool );
+}
+
+SfxItemPool* Outliner::GetEditTextObjectPool() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetEditTextObjectPool();
+}
+
+BOOL Outliner::SpellNextDocument()
+{
+ DBG_CHKTHIS(Outliner,0);
+ return FALSE;
+}
+
+
+void Outliner::SetSpeller( Reference< XSpellChecker1 > &xSpeller )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetSpeller( xSpeller );
+}
+Reference< XSpellChecker1 > Outliner::GetSpeller()
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetSpeller();
+}
+
+Reference< XHyphenator > Outliner::GetHyphenator() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetHyphenator();
+}
+
+void Outliner::SetHyphenator( Reference< XHyphenator >& xHyph )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetHyphenator( xHyph );
+}
+
+OutputDevice* Outliner::GetRefDevice() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetRefDevice();
+}
+
+USHORT Outliner::GetFirstLineOffset( ULONG nParagraph )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetFirstLineOffset( (USHORT)nParagraph );
+}
+
+ULONG Outliner::GetTextHeight( ULONG nParagraph ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetTextHeight((USHORT)nParagraph );
+}
+
+Point Outliner::GetDocPosTopLeft( ULONG nParagraph )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetDocPosTopLeft( (USHORT)nParagraph );
+}
+
+BOOL Outliner::IsTextPos( const Point& rDocPos, USHORT nBorder )
+{
+ DBG_CHKTHIS(Outliner,0);
+ BOOL bTextPos = pEditEngine->IsTextPos( rDocPos, nBorder );
+ if ( !bTextPos )
+ {
+ // MT: Dieser Code ist doppelt (OutlinerView::ImpCheckMousePos)
+ // => Mal eine Methode anbieten, jetzt muesste ich dafür aber branchen => spaeter
+ // Bullet?
+ USHORT nPara = pEditEngine->FindParagraph( rDocPos.Y() );
+ if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasBullet( nPara ) )
+ {
+ Rectangle aBulArea = ImpCalcBulletArea( nPara, TRUE );
+ Point aParaXY = pEditEngine->GetDocPosTopLeft( nPara );
+ aBulArea.Top() += aParaXY.Y();
+ aBulArea.Bottom() += aParaXY.Y();
+ if ( aBulArea.IsInside( rDocPos ) )
+ {
+ bTextPos = TRUE;
+ }
+ }
+ }
+
+ return bTextPos;
+}
+
+void Outliner::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->QuickSetAttribs( rSet, rSel );
+}
+
+void Outliner::QuickInsertText( const XubString& rText, const ESelection& rSel )
+{
+ bFirstParaIsEmpty = FALSE;
+ pEditEngine->QuickInsertText( rText, rSel );
+}
+
+void Outliner::QuickDelete( const ESelection& rSel )
+{
+ bFirstParaIsEmpty = FALSE;
+ pEditEngine->QuickDelete( rSel );
+}
+
+void Outliner::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
+{
+ DBG_CHKTHIS(Outliner,0);
+ bFirstParaIsEmpty = FALSE;
+ pEditEngine->QuickInsertField( rFld, rSel );
+}
+
+void Outliner::QuickInsertLineBreak( const ESelection& rSel )
+{
+ DBG_CHKTHIS(Outliner,0);
+ bFirstParaIsEmpty = FALSE;
+ pEditEngine->QuickInsertLineBreak( rSel );
+}
+
+void Outliner::QuickFormatDoc( BOOL bFull )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->QuickFormatDoc( bFull );
+}
+
+void Outliner::SetGlobalCharStretching( USHORT nX, USHORT nY )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetGlobalCharStretching( nX, nY );
+}
+
+void Outliner::GetGlobalCharStretching( USHORT& rX, USHORT& rY )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->GetGlobalCharStretching( rX, rY );
+}
+
+
+void Outliner::DoStretchChars( USHORT nX, USHORT nY )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->DoStretchChars( nX, nY );
+}
+
+void Outliner::EraseVirtualDevice()
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->EraseVirtualDevice();
+}
+
+void Outliner::SetBigTextObjectStart( USHORT nStartAtPortionCount )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetBigTextObjectStart( nStartAtPortionCount );
+}
+
+USHORT Outliner::GetBigTextObjectStart() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetBigTextObjectStart();
+}
+
+BOOL Outliner::ShouldCreateBigTextObject() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->ShouldCreateBigTextObject();
+}
+
+// Hilfsfunktionen fuers Undo
+
+XubString** Outliner::ImpCreateBulletArray()
+{
+ DBG_CHKTHIS(Outliner,0);
+ ULONG nCount = pParaList->GetParagraphCount();
+ XubString** ppBulletTexts = new XubString*[ nCount ];
+ for( ULONG nAbsPos = 0; nAbsPos < nCount; nAbsPos++ )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( nAbsPos );
+ ppBulletTexts[ nAbsPos ] = new XubString( pPara->GetText() );
+ }
+ return ppBulletTexts;
+}
+
+
+void Outliner::ImpSetBulletArray( XubString** ppBullets )
+{
+ DBG_CHKTHIS(Outliner,0);
+ ULONG nCount = pParaList->GetParagraphCount();
+ for( ULONG nAbsPos = 0; nAbsPos < nCount; nAbsPos++ )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( nAbsPos );
+ XubString aStr( *(ppBullets[nAbsPos]) );
+ pPara->SetText( aStr );
+ }
+}
+
+USHORT* Outliner::ImpCreateDepthArray()
+{
+ DBG_CHKTHIS(Outliner,0);
+ ULONG nCount = pParaList->GetParagraphCount();
+ DBG_ASSERT(nCount,"Bad paralist");
+ USHORT* pDepths = new USHORT[ nCount ];
+ USHORT* pCur = pDepths;
+ for( ULONG nAbsPos = 0; nAbsPos < nCount; nAbsPos++, pCur++ )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( nAbsPos );
+ *pCur = pPara->GetDepth();
+ }
+ return pDepths;
+}
+
+
+void Outliner::ImpSetDepthArray( USHORT* pDepths )
+{
+ DBG_CHKTHIS(Outliner,0);
+ ULONG nCount = pParaList->GetParagraphCount();
+ for( ULONG nAbsPos = 0; nAbsPos < nCount; nAbsPos++, pDepths++ )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( nAbsPos );
+ pPara->SetDepth( *pDepths );
+ }
+}
diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx
new file mode 100644
index 0000000000..4577f8eb30
--- /dev/null
+++ b/svx/source/outliner/outliner.cxx
@@ -0,0 +1,1887 @@
+/*************************************************************************
+ *
+ * $RCSfile: outliner.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <outl_pch.hxx>
+
+#pragma hdrstop
+
+#include <math.h>
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+#ifndef _WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+
+#define _OUTLINER_CXX
+#include <outliner.hxx>
+#include <paralist.hxx>
+#include <outlobj.hxx>
+#include <outleeng.hxx>
+#include <outlundo.hxx>
+#include <eeitem.hxx>
+#include <editstat.hxx>
+
+#ifndef _EDITOBJ_HXX //autogen
+#include <editobj.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+
+#ifndef _SV_METRIC_HXX //autogen
+#include <vcl/metric.hxx>
+#endif
+
+#ifndef _SVX_NUMITEM_HXX
+#include <numitem.hxx>
+#endif
+
+#ifndef _SVX_ADJITEM_HXX
+#include <adjitem.hxx>
+#endif
+
+#ifndef _SV_GRAPH_HXX //autogen
+#include <vcl/graph.hxx>
+#endif
+
+#ifndef _SVX_SVXFONT_HXX
+#include <svxfont.hxx>
+#endif
+
+#ifndef _SVX_BRSHITEM_HXX
+#include <brshitem.hxx>
+#endif
+
+#define DEFAULT_SCALE 75
+
+static const USHORT nDefStyles = 3; // Sonderbehandlung fuer die ersten 3 Ebenen
+static const USHORT nDefBulletIndent = 800;
+static const USHORT nDefBulletWidth = 700;
+static const USHORT pDefBulletIndents[nDefStyles]= { 1400, 800, 800 };
+static const USHORT pDefBulletWidths[nDefStyles] = { 1000, 850, 700 };
+
+USHORT lcl_ImplGetDefBulletWidth( USHORT nDepth )
+{
+ return ( nDepth < nDefStyles ) ? pDefBulletWidths[nDepth] : nDefBulletWidth;
+}
+
+USHORT lcl_ImplGetDefBulletIndent( USHORT nDepth )
+{
+ USHORT nI = 0;
+ for ( USHORT n = 0; n <= nDepth; n++ )
+ nI += ( n < nDefStyles ) ? pDefBulletIndents[n] : nDefBulletIndent;
+ return nI;
+}
+
+SvxLRSpaceItem lcl_ImplGetDefLRSpaceItem( USHORT nDepth, MapUnit eMapUnit )
+{
+ SvxLRSpaceItem aLRSpace( EE_PARA_OUTLLRSPACE );
+
+ long nWidth = OutputDevice::LogicToLogic( (long) lcl_ImplGetDefBulletWidth( nDepth ), MAP_100TH_MM, eMapUnit );
+ long nIndent = OutputDevice::LogicToLogic( (long) lcl_ImplGetDefBulletIndent( nDepth ), MAP_100TH_MM, eMapUnit );
+ aLRSpace.SetTxtLeft( (USHORT) nIndent );
+ aLRSpace.SetTxtFirstLineOfst( - (short)nWidth );
+
+ return aLRSpace;
+}
+
+ // ----------------------------------------------------------------------
+// Outliner
+// ----------------------------------------------------------------------
+DBG_NAME(Outliner);
+
+Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, USHORT nDepth)
+{
+ DBG_CHKTHIS(Outliner,0);
+ DBG_ASSERT(pParaList->GetParagraphCount(),"Insert:No Paras");
+
+ Paragraph* pPara;
+
+ if( nDepth < nMinDepth )
+ nDepth = nMinDepth;
+
+ ULONG nParagraphCount = pParaList->GetParagraphCount();
+ if( nAbsPos > nParagraphCount )
+ nAbsPos = nParagraphCount;
+
+ if( bFirstParaIsEmpty )
+ {
+ pPara = pParaList->GetParagraph( 0 );
+ if( pPara->GetDepth() != nDepth )
+ {
+ nDepthChangedHdlPrevDepth = pPara->GetDepth();
+ pPara->SetDepth( nDepth );
+ pHdlParagraph = pPara;
+ DepthChangedHdl();
+ }
+ pPara->nFlags |= PARAFLAG_HOLDDEPTH;
+ SetText( rText, pPara );
+ }
+ else
+ {
+ BOOL bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( FALSE );
+ bBlockInsCallback = TRUE;
+ pPara = new Paragraph( nDepth );
+ pParaList->Insert( pPara, nAbsPos );
+ pEditEngine->InsertParagraph( (USHORT)nAbsPos, String() );
+ DBG_ASSERT(pPara==pParaList->GetParagraph(nAbsPos),"Insert:Failed");
+ ImplInitDepth( (USHORT)nAbsPos, nDepth, FALSE );
+ pHdlParagraph = pPara;
+ ParagraphInsertedHdl();
+ pPara->nFlags |= PARAFLAG_HOLDDEPTH;
+ SetText( rText, pPara );
+ bBlockInsCallback = FALSE;
+ pEditEngine->SetUpdateMode( bUpdate );
+ }
+ bFirstParaIsEmpty = FALSE;
+ DBG_ASSERT(pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(),"SetText failed")
+ return pPara;
+}
+
+
+void Outliner::ParagraphInserted( USHORT nPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ if ( bBlockInsCallback )
+ return;
+
+ if( bPasting || pEditEngine->IsInUndo() )
+ {
+ Paragraph* pPara = new Paragraph( 0xffff );
+ pParaList->Insert( pPara, nPara );
+ if( pEditEngine->IsInUndo() )
+ {
+ pPara->nFlags = PARAFLAG_SETBULLETTEXT;
+ pPara->bVisible = TRUE;
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL );
+ pPara->SetDepth( rLevel.GetValue() );
+ }
+ }
+ else
+ {
+ USHORT nDepth = 0;
+ if ( nPara )
+ nDepth = pParaList->GetParagraph( nPara-1 )->GetDepth();
+
+ Paragraph* pPara = new Paragraph( nDepth );
+ pParaList->Insert( pPara, nPara );
+
+ if( !pEditEngine->IsInUndo() )
+ {
+ ImplCalcBulletText( nPara, TRUE, FALSE );
+ pHdlParagraph = pPara;
+ ParagraphInsertedHdl();
+ }
+ }
+}
+
+void Outliner::ParagraphDeleted( USHORT nPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ if ( bBlockInsCallback || ( nPara == EE_PARA_ALL ) )
+ return;
+
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ USHORT nDepth = pPara->GetDepth();
+
+ if( !pEditEngine->IsInUndo() )
+ {
+ pHdlParagraph = pPara;
+ ParagraphRemovingHdl();
+ }
+
+ pParaList->Remove( nPara );
+ delete pPara;
+
+ if( !pEditEngine->IsInUndo() )
+ {
+ pPara = pParaList->GetParagraph( nPara );
+ if ( pPara && ( pPara->GetDepth() > nDepth ) )
+ {
+ ImplCalcBulletText( nPara, TRUE, FALSE );
+ // naechsten auf gleicher Ebene suchen...
+ while ( pPara && pPara->GetDepth() > nDepth )
+ pPara = pParaList->GetParagraph( ++nPara );
+ }
+
+ if ( pPara && ( pPara->GetDepth() == nDepth ) )
+ ImplCalcBulletText( nPara, TRUE, FALSE );
+ }
+}
+
+void Outliner::Init( USHORT nMode )
+{
+ nOutlinerMode = nMode;
+
+ Clear();
+
+ ULONG nCtrl = pEditEngine->GetControlWord();
+ nCtrl &= ~(EE_CNTRL_OUTLINER|EE_CNTRL_OUTLINER2);
+
+ switch ( ImplGetOutlinerMode() )
+ {
+ case OUTLINERMODE_TEXTOBJECT:
+ {
+ SetMinDepth( 0 );
+ SetMaxDepth( 9 );
+ }
+ break;
+ case OUTLINERMODE_TITLEOBJECT:
+ {
+ SetMinDepth( 0 );
+ SetMaxDepth( 9 );
+ }
+ break;
+ case OUTLINERMODE_OUTLINEOBJECT:
+ {
+ SetMinDepth( 1 );
+ SetMaxDepth( 9 );
+ nCtrl |= EE_CNTRL_OUTLINER2;
+ }
+ break;
+ case OUTLINERMODE_OUTLINEVIEW:
+ {
+ SetMinDepth( 0 );
+ SetMaxDepth( 9 );
+ nCtrl |= EE_CNTRL_OUTLINER;
+ }
+ break;
+ default: DBG_ERROR( "Outliner::Init - Invalid Mode!" );
+ }
+
+ pEditEngine->SetControlWord( nCtrl );
+
+ ImplInitDepth( 0, GetMinDepth(), FALSE );
+}
+
+void Outliner::SetMinDepth( USHORT nDepth, BOOL bCheckParagraphs )
+{
+ if( nMinDepth != nDepth )
+ {
+ nMinDepth = nDepth;
+
+ if( bCheckParagraphs && nMinDepth )
+ {
+ // Prueft nur dass kein Absatz kleiner ist,
+ // es werden keine Ebenen proportional verschoben!
+ USHORT nParagraphs = (USHORT)pParaList->GetParagraphCount();
+ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ if( pPara->GetDepth() < nMinDepth )
+ {
+ SetDepth( pPara, nMinDepth );
+ }
+ }
+ }
+ }
+}
+
+void Outliner::SetMaxDepth( USHORT nDepth, BOOL bCheckParagraphs )
+{
+ if( nMaxDepth != nDepth )
+ {
+ nMaxDepth = nDepth;
+
+ if( bCheckParagraphs )
+ {
+ USHORT nParagraphs = (USHORT)pParaList->GetParagraphCount();
+ for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ if( pPara->GetDepth() > nMaxDepth )
+ {
+ SetDepth( pPara, nMaxDepth );
+ }
+ }
+ }
+ }
+}
+
+USHORT Outliner::GetDepth( USHORT nPara ) const
+{
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ DBG_ASSERT( pPara, "Outliner::GetDepth - Paragraph not found!" );
+ return pPara ? pPara->GetDepth() : 0;
+}
+
+void Outliner::SetDepth( Paragraph* pPara, USHORT nNewDepth )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ if ( nNewDepth < nMinDepth )
+ nNewDepth = nMinDepth;
+ else if ( nNewDepth > nMaxDepth )
+ nNewDepth = nMaxDepth;
+
+ if ( nNewDepth != pPara->GetDepth() )
+ {
+ nDepthChangedHdlPrevDepth = pPara->GetDepth();
+ pHdlParagraph = pPara;
+
+ ImplInitDepth( (USHORT) GetAbsPos( pPara ), nNewDepth, TRUE );
+
+ DepthChangedHdl();
+ }
+}
+
+OutlinerParaObject* Outliner::CreateParaObject( USHORT nStartPara, USHORT nCount ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ if ( ( nStartPara + nCount ) > pParaList->GetParagraphCount() )
+ nCount = pParaList->GetParagraphCount() - nStartPara;
+
+ if( !nCount )
+ return NULL;
+
+ OutlinerParaObject* pPObj = new OutlinerParaObject( nCount );
+ pPObj->pText = pEditEngine->CreateTextObject( nStartPara, nCount );
+ pPObj->SetOutlinerMode( GetMode() );
+ pPObj->bIsEditDoc = ( ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) ? TRUE : FALSE;
+
+ USHORT nLastPara = nStartPara + nCount - 1;
+ for ( USHORT nPara = nStartPara; nPara <= nLastPara; nPara++ )
+ pPObj->pDepthArr[ nPara-nStartPara] = GetDepth( nPara );
+
+ return pPObj;
+}
+
+void Outliner::SetText( const XubString& rText, Paragraph* pPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+ DBG_ASSERT(pPara,"SetText:No Para")
+
+ BOOL bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( FALSE );
+ bBlockInsCallback = TRUE;
+
+ USHORT nPara = (USHORT)pParaList->GetAbsPos( pPara );
+
+ if( !rText.Len() )
+ {
+ pEditEngine->SetText( nPara, rText );
+ ImplInitDepth( nPara, pPara->GetDepth(), FALSE );
+ }
+ else
+ {
+ XubString aText( rText );
+ aText.ConvertLineEnd( LINEEND_LF );
+
+ if( aText.GetChar( aText.Len()-1 ) == '\x0A' )
+ aText.Erase( aText.Len()-1, 1 ); // letzten Umbruch loeschen
+
+ USHORT nCount = aText.GetTokenCount( '\x0A' );
+ USHORT nPos = 0;
+ USHORT nInsPos = nPara+1;
+ while( nCount > nPos )
+ {
+ XubString aStr = aText.GetToken( nPos, '\x0A' );
+
+ USHORT nCurDepth;
+ if( nPos )
+ {
+ pPara = new Paragraph( 0 );
+ nCurDepth = 0;
+ }
+ else
+ nCurDepth = pPara->GetDepth();
+
+ // Im Outliner-Modus die Tabulatoren filtern und die
+ // Einrueckung ueber ein LRSpaceItem einstellen
+ // Im EditEngine-Modus ueber Maltes Tabulatoren einruecken
+ if( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) ||
+ ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ) )
+ {
+ // Tabs raus
+ USHORT nTabs = 0;
+ while ( ( nTabs < aStr.Len() ) && ( aStr.GetChar( nTabs ) == '\t' ) )
+ nTabs++;
+ if ( nTabs )
+ aStr.Erase( 0, nTabs );
+
+ // Tiefe beibehalten ? (siehe Outliner::Insert)
+ if( !(pPara->nFlags & PARAFLAG_HOLDDEPTH) )
+ {
+ nCurDepth = nTabs;
+ if( nCurDepth < nMinDepth )
+ nCurDepth = nMinDepth;
+ pPara->SetDepth( nCurDepth );
+ pPara->nFlags &= (~PARAFLAG_HOLDDEPTH);
+ }
+ }
+ if( nPos ) // nicht mit dem ersten Absatz
+ {
+ pParaList->Insert( pPara, nInsPos );
+ pEditEngine->InsertParagraph( nInsPos, aStr );
+ pHdlParagraph = pPara;
+ ParagraphInsertedHdl();
+ }
+ else
+ {
+ nInsPos--;
+ pEditEngine->SetText( nInsPos, aStr );
+ }
+ ImplInitDepth( nInsPos, nCurDepth, FALSE );
+ nInsPos++;
+ nPos++;
+ }
+ }
+
+ DBG_ASSERT(pParaList->GetParagraphCount()==pEditEngine->GetParagraphCount(),"SetText failed!")
+ bBlockInsCallback = FALSE;
+ bFirstParaIsEmpty = FALSE;
+ pEditEngine->SetUpdateMode( bUpdate );
+}
+
+// pView == 0 -> Tabulatoren nicht beachten
+
+BOOL Outliner::ImpConvertEdtToOut(Paragraph* pPara,ULONG nPara,EditView* pView)
+{
+ DBG_CHKTHIS(Outliner,0);
+ DBG_ASSERT(pPara,"FilterTabs:No Para");
+
+ BOOL bConverted = FALSE;
+ USHORT nTabs = 0;
+ ESelection aDelSel;
+
+ const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (USHORT)nPara );
+ BOOL bAlreadyOutliner = rAttrs.GetItemState( EE_PARA_OUTLLRSPACE ) == SFX_ITEM_ON ? TRUE : FALSE;
+
+ XubString aName;
+ XubString aHeading_US( RTL_CONSTASCII_USTRINGPARAM( "Heading" ) );
+ XubString aHeading_GERM( RTL_CONSTASCII_USTRINGPARAM( "berschrift" ) );
+ XubString aNumber_GERM( RTL_CONSTASCII_USTRINGPARAM( "Numerierung" ) );
+
+ XubString aStr( pEditEngine->GetText( (USHORT)nPara ) );
+ xub_Unicode* pPtr = (xub_Unicode*)aStr.GetBuffer();
+
+ USHORT nHeadingNumberStart = 0;
+ USHORT nNumberingNumberStart = 0;
+ SfxStyleSheet* pStyle= pEditEngine->GetStyleSheet( (USHORT)nPara );
+ if( pStyle )
+ {
+ aName = pStyle->GetName();
+ USHORT nSearch;
+ if ( ( nSearch = aName.Search( aHeading_US ) ) != STRING_NOTFOUND )
+ nHeadingNumberStart = nSearch + aHeading_US.Len();
+ else if ( ( nSearch = aName.Search( aHeading_GERM ) ) != STRING_NOTFOUND )
+ nHeadingNumberStart = nSearch + aHeading_GERM.Len();
+ else if ( ( nSearch = aName.Search( aNumber_GERM ) ) != STRING_NOTFOUND )
+ nNumberingNumberStart = nSearch + aNumber_GERM.Len();
+ }
+
+ if ( nHeadingNumberStart || nNumberingNumberStart )
+ {
+ // PowerPoint-Import ?
+ if( nHeadingNumberStart && ( aStr.Len() >= 2 ) &&
+ ( pPtr[0] != '\t' ) && ( pPtr[1] == '\t' ) )
+ {
+ // Bullet & Tab raus
+ aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, 2 );
+ }
+
+ USHORT nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart;
+ String aLevel = aName.Copy( nPos );
+ aLevel.EraseLeadingChars( ' ' );
+ nTabs = aLevel.ToInt32();
+ if( nTabs )
+ nTabs--; // ebene 0 = "heading 1"
+ bConverted = TRUE;
+ }
+ else
+ {
+ // Fuehrende Tabulatoren filtern
+ while( *pPtr == '\t' )
+ {
+ pPtr++;
+ nTabs++;
+ }
+ // Tabulatoren aus dem Text entfernen
+ if( nTabs )
+ aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, nTabs );
+
+ // LRSpaceItem aufaddieren
+ const SvxLRSpaceItem& rIndent=(const SvxLRSpaceItem&)rAttrs.Get( bAlreadyOutliner ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE );
+ USHORT nIndent = rIndent.GetTxtLeft();
+ if( nIndent )
+ {
+ USHORT nOffs = nIndent / (USHORT)pEditEngine->GetDefTab();
+ if( !nOffs )
+ nOffs = 1; // immer mind. 1 Tab
+ nTabs += nOffs;
+ }
+ }
+
+ if ( aDelSel.HasRange() )
+ {
+ if ( pView )
+ {
+ pView->SetSelection( aDelSel );
+ pView->DeleteSelected();
+ }
+ else
+ pEditEngine->QuickDelete( aDelSel );
+ }
+
+ // MT: OutlLevel wird beim RTF-Import von der EditEngine eingestellt,
+ // weil String-Vergleich vom Vorlagen-Namen unbrauchbar
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL );
+ USHORT nOutlLevel = rLevel.GetValue();
+
+ if ( !nPara )
+ nOutlLevel = nMinDepth;
+ else if( nOutlLevel < nMinDepth )
+ nOutlLevel = nMinDepth;
+ else if( nOutlLevel >= nMaxDepth )
+ nOutlLevel = nMaxDepth-1;
+
+ ImplInitDepth( nPara, nOutlLevel, FALSE );
+
+ return bConverted;
+}
+
+void Outliner::SetText( const OutlinerParaObject& rPObj )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ BOOL bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( FALSE );
+
+ BOOL bUndo = pEditEngine->IsUndoEnabled();
+ EnableUndo( FALSE );
+
+ Init( rPObj.GetOutlinerMode() );
+
+ bBlockInsCallback = TRUE;
+ pEditEngine->SetText( *(rPObj.pText) );
+ bBlockInsCallback = FALSE;
+ bFirstParaIsEmpty = FALSE;
+
+ pParaList->Clear( TRUE );
+ for( USHORT nCurPara = 0; nCurPara < rPObj.nCount; nCurPara++ )
+ {
+ Paragraph* pPara = new Paragraph( rPObj.pDepthArr[ nCurPara ] );
+ pParaList->Insert( pPara, LIST_APPEND );
+ ImplCheckNumBulletItem( nCurPara );
+ }
+
+ ImplCheckParagraphs( 0, (USHORT) (pParaList->GetParagraphCount()-1) );
+
+ EnableUndo( bUndo );
+ pEditEngine->SetUpdateMode( bUpdate );
+
+ DBG_ASSERT( pParaList->GetParagraphCount()==rPObj.Count(),"SetText failed")
+ DBG_ASSERT( pEditEngine->GetParagraphCount()==rPObj.Count(),"SetText failed")
+}
+
+void Outliner::AddText( const OutlinerParaObject& rPObj )
+{
+ DBG_CHKTHIS(Outliner,0);
+ Paragraph* pPara;
+
+ ULONG nCount = rPObj.Count();
+
+ BOOL bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( FALSE );
+
+ bBlockInsCallback = TRUE;
+ ULONG nPara;
+ if( bFirstParaIsEmpty )
+ {
+ pParaList->Clear( TRUE );
+ pEditEngine->SetText( *(rPObj.pText) );
+ nPara = 0;
+ }
+ else
+ {
+ nPara = pParaList->GetParagraphCount();
+ pEditEngine->InsertParagraph( EE_PARA_APPEND, *(rPObj.pText) );
+ }
+ bBlockInsCallback = FALSE;
+ bFirstParaIsEmpty = FALSE;
+
+ for( USHORT n = 0; n < rPObj.nCount; n++ )
+ {
+ pPara = new Paragraph( rPObj.pDepthArr[ n ] );
+ pParaList->Insert( pPara, LIST_APPEND );
+ USHORT nP = nPara+n;
+ DBG_ASSERT(pParaList->GetAbsPos(pPara)==nP,"AddText:Out of sync")
+ ImplInitDepth( nP, pPara->GetDepth(), FALSE );
+ }
+ DBG_ASSERT( pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(), "SetText: OutOfSync" );
+
+ ImplCheckParagraphs( (USHORT)nPara, (USHORT) (pParaList->GetParagraphCount()-1) );
+
+ pEditEngine->SetUpdateMode( bUpdate );
+}
+
+void __EXPORT Outliner::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ if ( aFieldClickedHdl.IsSet() )
+ {
+ EditFieldInfo aFldInfo( this, rField, nPara, nPos );
+ aFldInfo.SetSimpleClick( TRUE );
+ aFieldClickedHdl.Call( &aFldInfo );
+ }
+}
+
+
+void __EXPORT Outliner::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
+{
+ DBG_CHKTHIS(Outliner,0);
+ if ( !aFieldClickedHdl.IsSet() )
+ return;
+
+ EditFieldInfo aFldInfo( this, rField, nPara, nPos );
+ aFldInfo.SetSimpleClick( FALSE );
+ aFieldClickedHdl.Call( &aFldInfo );
+}
+
+
+XubString __EXPORT Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+{
+ DBG_CHKTHIS(Outliner,0);
+ if ( !aCalcFieldValueHdl.IsSet() )
+ return String( ' ' );
+
+ EditFieldInfo aFldInfo( this, rField, nPara, nPos );
+ // Die FldColor ist mit COL_LIGHTGRAY voreingestellt.
+ if ( rpFldColor )
+ aFldInfo.SetFldColor( *rpFldColor );
+
+ aCalcFieldValueHdl.Call( &aFldInfo );
+ if ( aFldInfo.GetTxtColor() )
+ {
+ delete rpTxtColor;
+ rpTxtColor = new Color( *aFldInfo.GetTxtColor() );
+ }
+
+ delete rpFldColor;
+ rpFldColor = aFldInfo.GetFldColor() ? new Color( *aFldInfo.GetFldColor() ) : 0;
+
+ return aFldInfo.GetRepresentation();
+}
+
+void Outliner::SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetStyleSheet( (USHORT)nPara, pStyle );
+
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ pPara->nFlags |= PARAFLAG_SETBULLETTEXT;
+
+ ImplCheckNumBulletItem( (USHORT) nPara );
+}
+
+void Outliner::ImpDeleteBulletArray( XubString** pTexts, ULONG nCount )
+{
+ for( ULONG nAbsPos = 0; nAbsPos < nCount; nAbsPos++ )
+ delete pTexts[ nAbsPos ];
+ delete pTexts;
+}
+
+void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible )
+{
+ DBG_CHKTHIS(Outliner,0);
+ DBG_ASSERT( pPara, "SetVisible: pPara = NULL" );
+
+ pPara->bVisible = bVisible;
+ ULONG nPara = pParaList->GetAbsPos( pPara );
+ pEditEngine->ShowParagraph( (USHORT)nPara, bVisible );
+}
+
+void Outliner::ImplCheckNumBulletItem( USHORT nPara )
+{
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+
+ // Wenn es ein SvxNumBulletItem gibt, ueberschreibt dieses die
+ // Einstellungen von BulletItem und LRSpaceItem.
+ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_NUMBULLET );
+ if ( rNumBullet.GetNumRule()->GetLevelCount() > pPara->GetDepth() )
+ {
+ SvxLRSpaceItem aNewLRSpace( EE_PARA_LRSPACE );
+ CreateLRSpaceItem( rNumBullet, pPara->GetDepth(), aNewLRSpace );
+ if ( pEditEngine->HasParaAttrib( nPara, EE_PARA_LRSPACE ) )
+ {
+ const SvxLRSpaceItem& rOldLRSpace = (const SvxLRSpaceItem&)pEditEngine->GetParaAttrib( nPara, EE_PARA_LRSPACE );
+ aNewLRSpace.SetRight( rOldLRSpace.GetRight() );
+ }
+
+ SfxItemSet aAttrs( pEditEngine->GetParaAttribs( nPara ) );
+ aAttrs.Put( aNewLRSpace);
+ pPara->aBulSize.Width() = -1;
+ pEditEngine->SetParaAttribs( nPara, aAttrs );
+ }
+}
+
+BOOL Outliner::CreateLRSpaceItem( const SvxNumBulletItem& rNumBullet, USHORT nLevel, SvxLRSpaceItem& rLRSpace )
+{
+ const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( nLevel );
+ if ( pFmt )
+ {
+ rLRSpace.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() );
+ rLRSpace.SetTxtLeft( pFmt->GetAbsLSpace() );
+ }
+ return pFmt ? TRUE : FALSE;
+}
+
+void Outliner::ImplSetLevelDependendStyleSheet( USHORT nPara )
+{
+ DBG_ASSERT( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT, "SetLevelDependendStyleSheet: Wrong Mode!" );
+
+ SfxStyleSheet* pCurrentStyle = GetStyleSheet( nPara );
+ if ( pCurrentStyle )
+ {
+ String aNewStyleSheetName( pCurrentStyle->GetName() );
+ aNewStyleSheetName.Erase( aNewStyleSheetName.Len()-1, 1 );
+ aNewStyleSheetName += String::CreateFromInt32( GetDepth( nPara ) );
+ SfxStyleSheet* pNewStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( aNewStyleSheetName, pCurrentStyle->GetFamily() );
+ DBG_ASSERT( pNewStyle, "AutoStyleSheetName - Style not found!" );
+ if ( pNewStyle )
+ SetStyleSheet( nPara, pNewStyle );
+ }
+}
+
+void Outliner::ImplInitDepth( USHORT nPara, USHORT nDepth, BOOL bCreateUndo, BOOL bUndoAction )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ USHORT nOldDepth = pPara->GetDepth();
+ pPara->SetDepth( nDepth );
+
+ // Bei IsInUndo brauchen Attribute und Style nicht eingestellt werden,
+ // dort werden die alten Werte durch die EditEngine restauriert.
+
+ if( !IsInUndo() )
+ {
+ BOOL bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( FALSE );
+
+ BOOL bUndo = bCreateUndo && IsUndoEnabled();
+ if ( bUndo && bUndoAction )
+ UndoActionStart( OLUNDO_DEPTH );
+
+ SfxItemSet aAttrs( pEditEngine->GetParaAttribs( nPara ) );
+ aAttrs.Put( SfxUInt16Item( EE_PARA_OUTLLEVEL, nDepth ) );
+ // MT: OUTLLRSPACE immer default, sollte mal irgendwie eingestellt werden...
+ aAttrs.Put( lcl_ImplGetDefLRSpaceItem( nDepth, GetRefMapMode().GetMapUnit() ) );
+ pEditEngine->SetParaAttribs( nPara, aAttrs );
+ ImplCheckNumBulletItem( nPara );
+ ImplCalcBulletText( nPara, FALSE, FALSE );
+
+ if ( bUndo )
+ {
+ InsertUndo( new OutlinerUndoChangeDepth( this, nPara, nOldDepth, nDepth ) );
+ if ( bUndoAction )
+ UndoActionEnd( OLUNDO_DEPTH );
+ }
+
+ pEditEngine->SetUpdateMode( bUpdate );
+ }
+}
+
+void Outliner::SetParaAttribs( ULONG nPara, const SfxItemSet& rSet )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ if( pPara )
+ {
+ if ( !pEditEngine->IsInUndo() && pEditEngine->IsUndoEnabled() )
+ UndoActionStart( OLUNDO_ATTR );
+
+ BOOL bLRSpaceChanged =
+ ( rSet.GetItemState( EE_PARA_LRSPACE ) == SFX_ITEM_ON ) &&
+ ( !(rSet.Get( EE_PARA_LRSPACE ) == pEditEngine->GetParaAttrib( (USHORT)nPara, EE_PARA_LRSPACE ) ) );
+
+ pEditEngine->SetParaAttribs( (USHORT)nPara, rSet );
+
+ if ( bLRSpaceChanged )
+ {
+ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&)pEditEngine->GetParaAttrib( (USHORT)nPara, EE_PARA_NUMBULLET );
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ if ( rNumBullet.GetNumRule()->GetLevelCount() > pPara->GetDepth() )
+ {
+ SvxNumBulletItem* pNewNumBullet = (SvxNumBulletItem*) rNumBullet.Clone();
+ EditEngine::ImportBulletItem( *pNewNumBullet, pPara->GetDepth(), NULL, (SvxLRSpaceItem*)&rSet.Get( EE_PARA_LRSPACE ) );
+ SfxItemSet aAttribs( rSet );
+ aAttribs.Put( *pNewNumBullet );
+ pEditEngine->SetParaAttribs( (USHORT)nPara, aAttribs );
+ delete pNewNumBullet;
+ }
+ }
+
+ ImplCheckNumBulletItem( (USHORT)nPara );
+ ImplCheckParagraphs( (USHORT)nPara, (USHORT)nPara );
+
+ if ( !pEditEngine->IsInUndo() && pEditEngine->IsUndoEnabled() )
+ UndoActionEnd( OLUNDO_ATTR );
+ }
+}
+
+BOOL Outliner::Expand( Paragraph* pPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ if ( pParaList->HasHiddenChilds( pPara ) )
+ {
+ OLUndoExpand* pUndo;
+ BOOL bUndo = IsUndoEnabled() && !IsInUndo();
+ if( bUndo )
+ {
+ UndoActionStart( OLUNDO_EXPAND );
+ pUndo = new OLUndoExpand( this, OLUNDO_EXPAND );
+ pUndo->pParas = 0;
+ pUndo->nCount = (USHORT)pParaList->GetAbsPos( pPara );
+ }
+ pHdlParagraph = pPara;
+ bIsExpanding = TRUE;
+ pParaList->Expand( pPara );
+ ExpandHdl();
+ InvalidateBullet( pPara, pParaList->GetAbsPos(pPara) );
+ if( bUndo )
+ {
+ InsertUndo( pUndo );
+ UndoActionEnd( OLUNDO_EXPAND );
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+BOOL Outliner::Collapse( Paragraph* pPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+ if ( pParaList->HasVisibleChilds( pPara ) ) // expandiert
+ {
+ OLUndoExpand* pUndo;
+ BOOL bUndo = FALSE;
+ if( !IsInUndo() && IsUndoEnabled() )
+ bUndo = TRUE;
+ if( bUndo )
+ {
+ UndoActionStart( OLUNDO_COLLAPSE );
+ pUndo = new OLUndoExpand( this, OLUNDO_COLLAPSE );
+ pUndo->pParas = 0;
+ pUndo->nCount = (USHORT)pParaList->GetAbsPos( pPara );
+ }
+ pHdlParagraph = pPara;
+ bIsExpanding = FALSE;
+ pParaList->Collapse( pPara );
+ ExpandHdl();
+ InvalidateBullet( pPara, pParaList->GetAbsPos(pPara) );
+ if( bUndo )
+ {
+ InsertUndo( pUndo );
+ UndoActionEnd( OLUNDO_COLLAPSE );
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
+{
+ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_NUMBULLET );
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( pPara->GetDepth() );
+
+ DBG_ASSERT( pFmt && ( pFmt->GetNumType() != SVX_NUM_BITMAP ), "ImpCalcBulletFont: Missing or BitmapBullet!" );
+
+ USHORT nScale = pEditEngine->IsFlatMode() ? DEFAULT_SCALE : pFmt->GetBulletRelSize();
+ ULONG nScaledLineHeight = pEditEngine->GetStandardFont( nPara ).GetSize().Height();
+ nScaledLineHeight *= nScale*10;
+ nScaledLineHeight /= 1000;
+
+ Font aBulletFont( *pFmt->GetBulletFont() );
+ aBulletFont.SetAlign( ALIGN_BOTTOM );
+ aBulletFont.SetSize( Size( 0, nScaledLineHeight ) );
+ if( pEditEngine->IsFlatMode() || ( pEditEngine->GetControlWord() & EE_CNTRL_NOCOLORS ) )
+ {
+ Color aColor( COL_BLACK );
+ aBulletFont.SetColor( aColor );
+ }
+ return aBulletFont;
+}
+
+void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
+ const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ if ( ImplHasBullet( nPara ) )
+ {
+ Rectangle aBulletArea( ImpCalcBulletArea( nPara, TRUE ) );
+ aBulletArea.Move( rStartPos.X(), rStartPos.Y() );
+
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_NUMBULLET );
+ const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( pPara->GetDepth() );
+ if ( pFmt )
+ {
+ if( pFmt->GetNumType() != SVX_NUM_BITMAP )
+ {
+ Font aBulletFont( ImpCalcBulletFont( nPara ) );
+ Font aOldFont = pOutDev->GetFont();
+ pOutDev->SetFont( aBulletFont );
+
+ Point aTextPos( aBulletArea.BottomLeft() );
+
+ if ( !bStrippingPortions )
+ {
+ if ( nOrientation )
+ {
+ // Sowohl TopLeft als auch BottomLeft nicht ganz richtig, da
+ // in EditEngine BaseLine...
+ double nRealOrientation = nOrientation*F_PI1800;
+ double nCos = cos( nRealOrientation );
+ double nSin = sin( nRealOrientation );
+ Point aRotatedPos;
+ // Translation...
+ aTextPos -= rOrigin;
+ // Rotation...
+ aRotatedPos.X()=(long) (nCos*aTextPos.X() + nSin*aTextPos.Y());
+ aRotatedPos.Y()=(long) - (nSin*aTextPos.X() - nCos*aTextPos.Y());
+ aTextPos = aRotatedPos;
+ // Translation...
+ aTextPos += rOrigin;
+ Font aRotatedFont( aBulletFont );
+ aRotatedFont.SetLineOrientation( nOrientation );
+ pOutDev->SetFont( aRotatedFont );
+ }
+
+ pOutDev->DrawText( aTextPos, pPara->GetText() );
+
+ // HACK #47227#
+ // Seitennummer im Gliederungsmodus ausgeben...
+ if ( (pPara->GetDepth() == 0 ) && ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) )
+ {
+ long nPage = nFirstPage-1;
+ for ( USHORT n = 0; n <= nPara; n++ )
+ {
+ Paragraph* p = pParaList->GetParagraph( n );
+ if ( p->GetDepth() == 0 )
+ nPage++;
+ }
+ const SvxFontHeightItem& rFH = (const SvxFontHeightItem&)pEditEngine->GetParaAttrib( nPara, EE_CHAR_FONTHEIGHT );
+ Size aFontSz( 0, rFH.GetHeight() );
+ // aFontSz.Height() *= 2;
+ aFontSz.Height() /= 5;
+ Font aNewFont( System::GetStandardFont( STDFONT_SWISS ) );
+ aNewFont.SetSize( aFontSz );
+ aNewFont.SetAlign( ALIGN_BOTTOM );
+ pOutDev->SetFont( aNewFont );
+ String aPageText = String::CreateFromInt32( nPage );
+ Size aTextSz;
+ aTextSz.Width() = pOutDev->GetTextWidth( aPageText );
+ aTextSz.Height() = pOutDev->GetTextHeight();
+ aTextPos.X() -= aTextSz.Width();
+ aTextPos.X() -= aTextSz.Height() / 8;
+ aTextPos.Y() -= aFontSz.Height() / 2;
+ pOutDev->DrawText( aTextPos, aPageText );
+ }
+ }
+ else
+ {
+ Font aSvxFont( aBulletFont );
+ long* pBuf = new long[ pPara->GetText().Len() ];
+ pOutDev->GetTextArray( pPara->GetText(), pBuf );
+ // aTextPos ist Bottom, jetzt die Baseline liefern:
+ FontMetric aMetric( pOutDev->GetFontMetric() );
+ aTextPos.Y() -= aMetric.GetDescent();
+ DrawingText( aTextPos, pPara->GetText(), pBuf, aSvxFont, nPara, 0xFFFF );
+ delete pBuf;
+ }
+ pOutDev->SetFont( aOldFont );
+ }
+ else
+ {
+ if ( !bStrippingPortions )
+ {
+ pFmt->GetBrush()->GetGraphic()->GetBitmapEx().Draw( pOutDev, aBulletArea.TopLeft(), pPara->aBulSize );
+ }
+ }
+ }
+
+ // Bei zusammengeklappten Absaetzen einen Strich vor den Text malen.
+ if( pParaList->HasChilds(pPara) && !pParaList->HasVisibleChilds(pPara) &&
+ !bStrippingPortions && !nOrientation )
+ {
+ Point aStartPoint( aBulletArea.BottomLeft() );
+ aStartPoint.X() += aBulletArea.GetWidth();
+ Point aEndPoint( aStartPoint );
+ aEndPoint.X() += pOutDev->PixelToLogic( Size( 10, 0 ) ).Width();
+
+ const Color& rOldLineColor = pOutDev->GetLineColor();
+ pOutDev->SetLineColor( Color( COL_BLACK ) );
+ pOutDev->DrawLine( aStartPoint, aEndPoint );
+ pOutDev->SetLineColor( rOldLineColor );
+ }
+ }
+}
+
+void Outliner::InvalidateBullet( Paragraph* pPara, ULONG nPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ long nLineHeight = (long)pEditEngine->GetLineHeight((USHORT)nPara );
+ OutlinerView* pView = aViewList.First();
+ while( pView )
+ {
+ Point aPos( pView->pEditView->GetWindowPosTopLeft((USHORT)nPara ) );
+ Rectangle aRect( pView->GetOutputArea() );
+ aRect.Right() = aPos.X();
+ aRect.Top() = aPos.Y();
+ aRect.Bottom() = aPos.Y();
+ aRect.Bottom() += nLineHeight;
+
+ pView->GetWindow()->Invalidate( aRect );
+ pView = aViewList.Next();
+ }
+}
+
+ULONG Outliner::Read( SvStream& rInput, USHORT eFormat, SvKeyValueIterator* pHTTPHeaderAttrs )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ BOOL bOldUndo = pEditEngine->IsUndoEnabled();
+ EnableUndo( FALSE );
+
+ BOOL bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( FALSE );
+
+ Clear();
+
+ bBlockInsCallback = TRUE;
+ ULONG nRet = pEditEngine->Read( rInput, (EETextFormat)eFormat, pHTTPHeaderAttrs );
+ bBlockInsCallback = FALSE;
+
+ bFirstParaIsEmpty = FALSE;
+
+ USHORT nParas = pEditEngine->GetParagraphCount();
+ pParaList->Clear( TRUE );
+ USHORT n;
+ for ( n = 0; n < nParas; n++ )
+ {
+ Paragraph* pPara = new Paragraph( 0 );
+ pParaList->Insert( pPara, LIST_APPEND );
+
+ if ( eFormat == EE_FORMAT_BIN )
+ {
+ USHORT nDepth = 0;
+ const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( n );
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL );
+ nDepth = rLevel.GetValue();
+ ImplInitDepth( n, nDepth, FALSE );
+ }
+ }
+
+ if ( eFormat != EE_FORMAT_BIN )
+ {
+ ImpFilterIndents( 0, nParas-1 );
+ }
+
+ for ( n = 0; n < nParas; n++ )
+ {
+ // Handler rufen, Outliner war leer. Aber nicht fuer den ersten
+ pHdlParagraph = pParaList->GetParagraph( n );
+ ParagraphInsertedHdl();
+ }
+
+ pEditEngine->SetUpdateMode( bUpdate );
+ EnableUndo( bOldUndo );
+
+ return nRet;
+}
+
+
+void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ BOOL bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( FALSE );
+
+ Paragraph* pLastConverted = NULL;
+ for( ULONG nPara = nFirstPara; nPara <= nLastPara; nPara++ )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ if( ImpConvertEdtToOut( pPara, nPara ) )
+ {
+ pLastConverted = pPara;
+ }
+ else if ( pLastConverted )
+ {
+ // Normale Absaetze unter der Ueberschrift anordnen...
+ pPara->SetDepth( pLastConverted->GetDepth() );
+ }
+
+ ImplInitDepth( (USHORT)nPara, pPara->GetDepth(), FALSE );
+ }
+
+ pEditEngine->SetUpdateMode( bUpdate );
+}
+
+
+SfxUndoManager& Outliner::GetUndoManager()
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetUndoManager();
+}
+
+void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ BOOL bUpdate = pEditEngine->GetUpdateMode();
+ pEditEngine->SetUpdateMode( FALSE );
+
+ const ULONG nStart = nStartPara;
+
+ Paragraph* pPara = pParaList->GetParagraph( nStartPara );
+ Paragraph* pLastConverted = NULL;
+ while( nCount && pPara )
+ {
+ if( ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT )
+ {
+ USHORT nPrevDepth = pPara->GetDepth();
+ if( ImpConvertEdtToOut( pPara, nStartPara ) )
+ pLastConverted = pPara;
+ else if ( pLastConverted )
+ {
+ // Normale Absaetze unter der Ueberschrift anordnen...
+ pPara->SetDepth( pLastConverted->GetDepth() );
+ }
+ // Tiefe des Absatzes hat sich geaendert.
+ if( pPara->GetDepth() != nPrevDepth )
+ {
+ pHdlParagraph = pPara;
+ if( nPrevDepth == 0xffff )
+ {
+ // neuer Absatz -> InsertedHdl rufen
+ ParagraphInsertedHdl();
+ }
+ else
+ {
+ if( nStartPara == nStart )
+ // die Einrueckebene des Startabsatzes bleibt
+ // immer erhalten (leere Absaetze bekommen
+ // die Absatzattribute des eingefuegten Absatzes,
+ // diese sind aber erst nach dem Paste bekannt,
+ // d.h. es muesste dann ggf. der ParagraphIndenting
+ // Handler gerufen werden (also u.U. vor UND nach
+ // dem Paste)
+ pPara->SetDepth( nPrevDepth );
+ else if( (!nStartPara && pPara->GetDepth()) ||
+ (pPara->GetDepth() < nMinDepth) )
+ pPara->SetDepth( nMinDepth );
+
+ if( pPara->GetDepth() != nPrevDepth )
+ {
+ // alter Absatz -> DepthChangedHdl rufen
+ nDepthChangedHdlPrevDepth = nPrevDepth;
+ DepthChangedHdl();
+ }
+ }
+ ImplInitDepth( (USHORT)nStartPara, pPara->GetDepth(), FALSE );
+ }
+ else if( nStartPara == nStart )
+ ImplInitDepth( (USHORT)nStartPara, pPara->GetDepth(), FALSE );
+ }
+ else // EditEngine-Modus
+ {
+ USHORT nDepth = 0;
+ const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (USHORT)nStartPara );
+ if ( rAttrs.GetItemState( EE_PARA_OUTLLEVEL ) == SFX_ITEM_ON )
+ {
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL );
+ nDepth = rLevel.GetValue();
+ }
+ ImplInitDepth( (USHORT)nStartPara, nDepth, FALSE );
+ }
+
+ nCount--;
+ nStartPara++;
+ pPara = pParaList->GetParagraph( nStartPara );
+ }
+
+ pEditEngine->SetUpdateMode( bUpdate );
+
+ DBG_ASSERT(pParaList->GetParagraphCount()==pEditEngine->GetParagraphCount(),"ImpTextPasted failed");
+}
+
+
+
+void Outliner::ImpDropped( OutlinerView* pOutlView )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ // MT 06/00 - Was soll das hier?
+ // Diese Methode muss mal ueberarbeitet werden...
+ EditView* pView = pOutlView->pEditView;
+
+ ULONG nParas = pParaList->GetParagraphCount();
+ for ( ULONG nPara = 0; nPara < nParas; nPara++ )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ USHORT nCurDepth = pPara->GetDepth();
+ if( nCurDepth == 0xffff )
+ {
+ ImpConvertEdtToOut( pPara, nPara, pView );
+ pHdlParagraph = pPara;
+ ParagraphInsertedHdl();
+ ImplInitDepth( (USHORT)nPara, pPara->GetDepth(), FALSE );
+ }
+ else if( pPara->nFlags & PARAFLAG_DROPTARGET )
+ {
+ ImpConvertEdtToOut( pPara, nPara, pView );
+ if( pPara->nDepth != nCurDepth ||
+ (pPara->nFlags & PARAFLAG_DROPTARGET_EMPTY) )
+ {
+ // auf alten Wert zuruecksetzen
+ pPara->SetDepth( nCurDepth );
+
+ // und neu attributieren
+ ImplInitDepth( (USHORT)nPara, pPara->GetDepth(), FALSE );
+ }
+ pPara->nFlags &= (~PARAFLAG_DROPTARGET|PARAFLAG_DROPTARGET_EMPTY);
+ }
+ }
+}
+
+long Outliner::IndentingPagesHdl( OutlinerView* pView )
+{
+ DBG_CHKTHIS(Outliner,0);
+ if( !aIndentingPagesHdl.IsSet() )
+ return 1;
+ return aIndentingPagesHdl.Call( pView );
+}
+
+BOOL Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView )
+{
+ DBG_CHKTHIS(Outliner,0);
+ // Die selektierten Seiten muessen vorher durch ImpCalcSelectedPages
+ // schon eingestellt sein
+
+ // Wenn der erste Absatz auf Ebene 0 liegt darf er auf keinen Fall
+ // eingerueckt werden, evtl folgen aber weitere auf Ebene 0.
+ if ( (ULONG)pHdlParagraph == 0 )
+ {
+ if ( nDepthChangedHdlPrevDepth == 1 ) // ist die einzige Seite
+ return FALSE;
+ else
+ pCurView->ImpCalcSelectedPages( FALSE ); // ohne die erste
+ }
+ return (BOOL)IndentingPagesHdl( pCurView );
+}
+
+
+BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView )
+{
+ DBG_CHKTHIS(Outliner,0);
+ // Die selektierten Seiten muessen vorher durch ImpCalcSelectedPages
+ // schon eingestellt sein
+ return (BOOL)RemovingPagesHdl( pCurView );
+}
+
+Outliner::Outliner( SfxItemPool* pPool, USHORT nMode )
+{
+ DBG_CTOR( Outliner, 0 );
+
+ bStrippingPortions = FALSE;
+ bPasting = FALSE;
+
+ nFirstPage = 1;
+ bBlockInsCallback = FALSE;
+
+ nMinDepth = 0;
+ nMaxDepth = 9;
+
+ pParaList = new ParagraphList;
+ pParaList->SetVisibleStateChangedHdl( LINK( this, Outliner, ParaVisibleStateChangedHdl ) );
+ Paragraph* pPara = new Paragraph( 0 );
+ pParaList->Insert( pPara, LIST_APPEND );
+ bFirstParaIsEmpty = TRUE;
+
+ pEditEngine = new OutlinerEditEng( this, pPool );
+
+ Init( nMode );
+}
+
+Outliner::~Outliner()
+{
+ DBG_DTOR(Outliner,0);
+
+ pParaList->Clear( TRUE );
+ delete pParaList;
+ delete pEditEngine;
+}
+
+ULONG Outliner::InsertView( OutlinerView* pView, ULONG nIndex )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ aViewList.Insert( pView, nIndex );
+ pEditEngine->InsertView( pView->pEditView, (USHORT)nIndex );
+ return aViewList.GetPos( pView );
+}
+
+OutlinerView* Outliner::RemoveView( OutlinerView* pView )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ ULONG nPos = aViewList.GetPos( pView );
+ if ( nPos != LIST_ENTRY_NOTFOUND )
+ {
+ pView->pEditView->HideCursor(); // HACK wg. BugId 10006
+ pEditEngine->RemoveView( pView->pEditView );
+ aViewList.Remove( nPos );
+ }
+ return NULL; // MT: return ueberfluessig
+}
+
+OutlinerView* Outliner::RemoveView( ULONG nIndex )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ EditView* pEditView = pEditEngine->GetView( (USHORT)nIndex );
+ pEditView->HideCursor(); // HACK wg. BugId 10006
+
+ pEditEngine->RemoveView( (USHORT)nIndex );
+ aViewList.Remove( nIndex );
+ return NULL; // MT: return ueberfluessig
+}
+
+
+OutlinerView* Outliner::GetView( ULONG nIndex ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return aViewList.GetObject( nIndex );
+}
+
+ULONG Outliner::GetViewCount() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return aViewList.Count();
+}
+
+void Outliner::ParagraphInsertedHdl()
+{
+ DBG_CHKTHIS(Outliner,0);
+ aParaInsertedHdl.Call( this );
+}
+
+
+void Outliner::ParagraphRemovingHdl()
+{
+ DBG_CHKTHIS(Outliner,0);
+ aParaRemovingHdl.Call( this );
+}
+
+
+void Outliner::DepthChangedHdl()
+{
+ DBG_CHKTHIS(Outliner,0);
+ aDepthChangedHdl.Call( this );
+}
+
+
+ULONG Outliner::GetAbsPos( Paragraph* pPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+ DBG_ASSERT(pPara,"GetAbsPos:No Para")
+ return pParaList->GetAbsPos( pPara );
+}
+
+void Outliner::ParagraphHeightChanged( USHORT )
+{
+ DBG_CHKTHIS(Outliner,0);
+ // MT: Kann wohl weg...
+}
+
+ULONG Outliner::GetParagraphCount() const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pParaList->GetParagraphCount();
+}
+
+Paragraph* Outliner::GetParagraph( ULONG nAbsPos ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pParaList->GetParagraph( nAbsPos );
+}
+
+BOOL Outliner::HasChilds( Paragraph* pParagraph ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pParaList->HasChilds( pParagraph );
+}
+
+BOOL Outliner::ImplHasBullet( USHORT nPara ) const
+{
+ const SfxUInt16Item& rBulletState = (const SfxUInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE );
+ BOOL bBullet = rBulletState.GetValue() ? TRUE : FALSE;
+ if ( !pParaList->GetParagraph( nPara )->GetDepth() && ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) )
+ {
+ // Im Gliederungsmodus immer ein Bullet auf Ebene 0!
+ bBullet = TRUE;
+ }
+ return bBullet;
+}
+
+Size Outliner::ImplGetBulletSize( USHORT nPara )
+{
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+
+ if( pPara->aBulSize.Width() == -1 )
+ {
+ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_NUMBULLET );
+ const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( pPara->GetDepth() );
+ DBG_ASSERT( pFmt, "ImplGetBulletSize - no Bullet!" );
+
+ if( pFmt->GetNumType() != SVX_NUM_BITMAP )
+ {
+ String aBulletText = ImplGetBulletText( nPara );
+ OutputDevice* pRefDev = pEditEngine->GetRefDevice();
+ Font aBulletFont( ImpCalcBulletFont( nPara ) );
+ Font aRefFont( pRefDev->GetFont());
+ pRefDev->SetFont( aBulletFont );
+ pPara->aBulSize.Width() = pRefDev->GetTextWidth( aBulletText );
+ pPara->aBulSize.Height() = pRefDev->GetTextHeight();
+ pRefDev->SetFont( aRefFont );
+ }
+ else
+ {
+ pPara->aBulSize = OutputDevice::LogicToLogic( pFmt->GetGraphicSize(), MAP_100TH_MM, pEditEngine->GetRefDevice()->GetMapMode() );
+ }
+ }
+
+ return pPara->aBulSize;
+}
+
+void Outliner::ImplCheckParagraphs( USHORT nStart, USHORT nEnd )
+{
+ DBG_CHKTHIS( Outliner, 0 );
+
+ // Sicherstellen dass es ein Bullet und ein LR-Space gibt.
+
+ for ( USHORT n = nStart; n <= nEnd; n++ )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( n );
+ BOOL bHasLRSpace = pEditEngine->HasParaAttrib( n, EE_PARA_OUTLLRSPACE );
+ BOOL bHasLevel = pEditEngine->HasParaAttrib( n, EE_PARA_OUTLLEVEL );
+ if ( !bHasLRSpace || !bHasLevel )
+ {
+ SfxItemSet aAttrs( pEditEngine->GetParaAttribs( n ) );
+
+ // MT 05/00: Default-Item muss erstmal richtig sein => Dann koennen diese ganzen komischen Defaults weg!!!
+// const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pEditEngine->GetParaAttrib( n, EE_PARA_NUMBULLET );
+// const SvxNumberFormat* pFmt = NULL;
+// if ( ( rNumBullet.GetNumRule()->GetLevelCount() > pPara->GetDepth() ) &&
+// ( ( pFtm = rNumBullet.GetNumRule()->Get( pPara->GetDepth() ) != NULL ) )
+// {
+// }
+ if ( !bHasLRSpace )
+ {
+ SvxLRSpaceItem aLRSpaceItem = lcl_ImplGetDefLRSpaceItem( pPara->GetDepth(), GetRefMapMode().GetMapUnit() );
+ aAttrs.Put( aLRSpaceItem );
+ }
+ if ( !bHasLevel )
+ {
+ SfxUInt16Item aLevelItem( EE_PARA_OUTLLEVEL, pPara->GetDepth() );
+ aAttrs.Put( aLevelItem );
+ }
+ pEditEngine->SetParaAttribs( n, aAttrs );
+ }
+
+ pPara->Invalidate();
+ ImplCalcBulletText( n, FALSE, FALSE );
+ }
+}
+
+void Outliner::SetRefDevice( OutputDevice* pRefDev )
+{
+ DBG_CHKTHIS(Outliner,0);
+ pEditEngine->SetRefDevice( pRefDev );
+ for ( USHORT n = (USHORT) pParaList->GetParagraphCount(); n; )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( --n );
+ pPara->Invalidate();
+ }
+}
+
+void Outliner::ParaAttribsChanged( USHORT nPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ // Der Outliner hat kein eigenes Undo, wenn Absaetz getrennt/verschmolzen werden.
+ // Beim ParagraphInserted ist das Attribut EE_PARA_OUTLLEVEL
+ // ggf. noch nicht eingestellt, dies wird aber benoetigt um die Tiefe
+ // des Absatzes zu bestimmen.
+
+ if( pEditEngine->IsInUndo() )
+ {
+ if ( pParaList->GetParagraphCount() == pEditEngine->GetParagraphCount() )
+ {
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL );
+ if ( pPara->GetDepth() != rLevel.GetValue() )
+ {
+ USHORT nMin = Min( pPara->GetDepth(), (USHORT)rLevel.GetValue() );
+ pPara->SetDepth( rLevel.GetValue() );
+ ImplCalcBulletText( nPara, TRUE, TRUE );
+ }
+ }
+ }
+}
+
+void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ // Die EditEngine ruft StyleSheetChanged auch fuer abgeleitete Styles.
+ // MT: Hier wurde frueher alle Absaetze durch ein ImpRecalcParaAttribs
+ // gejagt, die die besagte Vorlage haben, warum?
+ // => Eigentlich kann sich nur die Bullet-Repraesentation aendern...
+
+ USHORT nParas = (USHORT)pParaList->GetParagraphCount();
+ for( USHORT nPara = 0; nPara < nParas; nPara++ )
+ {
+ if ( pEditEngine->GetStyleSheet( nPara ) == pStyle )
+ {
+ ImplCheckNumBulletItem( nPara );
+ ImplCalcBulletText( nPara, FALSE, FALSE );
+ }
+ }
+}
+
+Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust )
+{
+ // Bullet-Bereich innerhalb des Absatzes...
+ Rectangle aBulletArea;
+
+ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_NUMBULLET );
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( pPara->GetDepth() );
+
+ if ( pFmt )
+ {
+ Point aTopLeft;
+ Size aBulletSize( ImplGetBulletSize( nPara ) );
+
+ const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_LRSPACE );
+ aTopLeft.X() = rLR.GetTxtLeft() + rLR.GetTxtFirstLineOfst();
+
+
+ long nBulletWidth = Max( (long) -rLR.GetTxtFirstLineOfst(), (long) ((-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance()) );
+ if ( nBulletWidth < aBulletSize.Width() ) // Bullet macht sich Platz
+ nBulletWidth = aBulletSize.Width();
+
+ if ( bAdjust && ( !( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) ) )
+ {
+ // Bei zentriert/rechtsbuendig anpassen
+ const SvxAdjustItem& rItem = (const SvxAdjustItem&)pEditEngine->GetParaAttrib( nPara, EE_PARA_JUST );
+ if ( rItem.GetAdjust() != SVX_ADJUST_LEFT )
+ aTopLeft.X() = pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth;
+ }
+
+ // Vertikal:
+ ParagraphInfos aInfos = pEditEngine->GetParagraphInfos( nPara );
+ if ( aInfos.bValid )
+ {
+ aTopLeft.Y() = aInfos.nFirstLineOffset + aInfos.nFirstLineHeight - aInfos.nFirstLineTextHeight +
+ ( aInfos.nFirstLineTextHeight - aBulletSize.Height() ) / 2;
+ // ggf. lieber auf der Baseline ausgeben...
+ if( pFmt->GetNumType() != SVX_NUM_BITMAP )
+ {
+ Font aBulletFont( ImpCalcBulletFont( nPara ) );
+ if ( aBulletFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL )
+ {
+ OutputDevice* pRefDev = pEditEngine->GetRefDevice();
+ Font aOldFont = pRefDev->GetFont();
+ pRefDev->SetFont( aBulletFont );
+ FontMetric aMetric( pRefDev->GetFontMetric() );
+ // Leading der ersten Zeile...
+ aTopLeft.Y() = aInfos.nFirstLineOffset + aInfos.nFirstLineHeight - aInfos.nFirstLineTextHeight + aInfos.nFirstLineMaxAscent;
+ aTopLeft.Y() -= aMetric.GetAscent();
+ pRefDev->SetFont( aOldFont );
+ }
+ }
+ }
+
+ // Horizontal:
+ if( pFmt->GetNumAdjust() == SVX_ADJUST_RIGHT )
+ {
+ aTopLeft.X() += nBulletWidth - aBulletSize.Width();
+ }
+ else if( pFmt->GetNumAdjust() == SVX_ADJUST_CENTER )
+ {
+ aTopLeft.X() += ( nBulletWidth - aBulletSize.Width() ) / 2;
+ }
+
+ if ( aTopLeft.X() < 0 ) // dann draengeln
+ aTopLeft.X() = 0;
+
+ aBulletArea = Rectangle( aTopLeft, aBulletSize );
+ }
+ return aBulletArea;
+}
+
+void Outliner::ExpandHdl()
+{
+ DBG_CHKTHIS(Outliner,0);
+ aExpandHdl.Call( this );
+}
+
+XubString Outliner::GetText( Paragraph* pParagraph, ULONG nCount ) const
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ XubString aText;
+ USHORT nStartPara = (USHORT) pParaList->GetAbsPos( pParagraph );
+ for ( USHORT n = 0; n < nCount; n++ )
+ {
+ aText += pEditEngine->GetText( nStartPara + n );
+ if ( (n+1) < (USHORT)nCount )
+ aText += '\n';
+ }
+ return aText;
+}
+
+void Outliner::Remove( Paragraph* pPara, ULONG nParaCount )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ ULONG nPos = pParaList->GetAbsPos( pPara );
+ if( !nPos && ( nParaCount >= pParaList->GetParagraphCount() ) )
+ {
+ Clear();
+ }
+ else
+ {
+ for( USHORT n = 0; n < (USHORT)nParaCount; n++ )
+ pEditEngine->RemoveParagraph( (USHORT) nPos );
+ }
+}
+
+void Outliner::StripPortions()
+{
+ DBG_CHKTHIS(Outliner,0);
+ bStrippingPortions = TRUE;
+ pEditEngine->StripPortions();
+ bStrippingPortions = FALSE;
+}
+
+void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, const long* pDXArray,const SvxFont& rFont, USHORT nPara, USHORT nIndex )
+{
+ DBG_CHKTHIS(Outliner,0);
+ DrawPortionInfo aInfo( rStartPos, rText, rFont, nPara, nIndex, pDXArray );
+ aDrawPortionHdl.Call( &aInfo );
+}
+
+long Outliner::RemovingPagesHdl( OutlinerView* pView )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return aRemovingPagesHdl.IsSet() ? aRemovingPagesHdl.Call( pView ) : TRUE;
+}
+
+BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT nFirstPage, USHORT nPages )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ nDepthChangedHdlPrevDepth = nPages;
+ pHdlParagraph = (Paragraph*)nFirstPage;
+ return (BOOL)RemovingPagesHdl( pCurView );
+}
+
+SfxItemSet Outliner::GetParaAttribs( ULONG nPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+ return pEditEngine->GetParaAttribs( (USHORT)nPara );
+}
+
+IMPL_LINK( Outliner, ParaVisibleStateChangedHdl, Paragraph*, pPara )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ ULONG nPara = pParaList->GetAbsPos( pPara );
+ pEditEngine->ShowParagraph( (USHORT)nPara, pPara->IsVisible() );
+
+ return 0;
+}
+
+void Outliner::ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ USHORT nRelPos = 0xFFFF;
+
+ while ( pPara )
+ {
+ XubString aBulletText;
+ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_NUMBULLET );
+ const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( pPara->GetDepth() );
+ if( pFmt && ( pFmt->GetNumType() != SVX_NUM_BITMAP ) )
+ {
+ aBulletText += pFmt->GetPrefix();
+ if( pFmt->GetNumType() != SVX_NUM_CHAR_SPECIAL )
+ {
+ if ( nRelPos == 0xFFFF )
+ pParaList->GetParent( pPara, nRelPos );
+ USHORT nNumber = nRelPos + pFmt->GetStart();
+ aBulletText += pFmt->GetNumStr( nNumber );
+ }
+ else
+ {
+ aBulletText += pFmt->GetBulletChar();
+ }
+ aBulletText += pFmt->GetSuffix();
+ }
+
+ if( aBulletText != pPara->GetText() )
+ pPara->SetText( aBulletText );
+
+ pPara->nFlags &= (~PARAFLAG_SETBULLETTEXT);
+
+ if ( bRecalcLevel )
+ {
+ if ( nRelPos != 0xFFFF )
+ nRelPos++;
+
+ USHORT nDepth = pPara->GetDepth();
+ pPara = pParaList->GetParagraph( ++nPara );
+ if ( !bRecalcChilds )
+ {
+ while ( pPara && ( pPara->GetDepth() > nDepth ) )
+ pPara = pParaList->GetParagraph( ++nPara );
+ }
+
+ if ( pPara && ( pPara->GetDepth() < nDepth ) )
+ pPara = NULL;
+ }
+ else
+ {
+ pPara = NULL;
+ }
+ }
+}
+
+void Outliner::Clear()
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ if( !bFirstParaIsEmpty )
+ {
+ bBlockInsCallback = TRUE;
+ pEditEngine->Clear();
+ bBlockInsCallback = FALSE;
+
+ pParaList->Clear( TRUE );
+ pParaList->Insert( new Paragraph( nMinDepth ), LIST_APPEND );
+ bFirstParaIsEmpty = TRUE;
+ }
+ else
+ {
+ pParaList->GetParagraph( 0 )->SetDepth( nMinDepth );
+ }
+}
+
+void Outliner::SetFlatMode( BOOL bFlat )
+{
+ DBG_CHKTHIS(Outliner,0);
+
+ if( bFlat != pEditEngine->IsFlatMode() )
+ {
+ for ( USHORT nPara = (USHORT)pParaList->GetParagraphCount(); nPara; )
+ pParaList->GetParagraph( --nPara )->aBulSize.Width() = -1;
+
+ pEditEngine->SetFlatMode( bFlat );
+ }
+}
+
+String Outliner::ImplGetBulletText( USHORT nPara )
+{
+ Paragraph* pPara = pParaList->GetParagraph( nPara );
+ // MT: Optimierung mal wieder aktivieren...
+// if( pPara->nFlags & PARAFLAG_SETBULLETTEXT )
+ ImplCalcBulletText( nPara, FALSE, FALSE );
+ return pPara->GetText();
+}
diff --git a/svx/source/outliner/outliner.hrc b/svx/source/outliner/outliner.hrc
new file mode 100644
index 0000000000..744c903379
--- /dev/null
+++ b/svx/source/outliner/outliner.hrc
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * $RCSfile: outliner.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _OUTLINER_HRC
+#define _OUTLINER_HRC
+
+#ifndef _SOLAR_HRC
+#include <svtools/solar.hrc>
+#endif
+
+#ifndef RID_OUTL_START
+#define RID_OUTL_START ( RID_EDIT_END + 100 )
+#endif
+
+#define RID_OUTLUNDO_DEPTH ( RID_OUTL_START + 0 )
+#define RID_OUTLUNDO_HEIGHT ( RID_OUTL_START + 1 )
+#define RID_OUTLUNDO_EXPAND ( RID_OUTL_START + 2 )
+#define RID_OUTLUNDO_COLLAPSE ( RID_OUTL_START + 3 )
+#define RID_OUTLUNDO_ATTR ( RID_OUTL_START + 4 )
+#define RID_OUTLUNDO_INSERT ( RID_OUTL_START + 5 )
+
+#endif // _OUTLINER_HRC
diff --git a/svx/source/outliner/outliner.src b/svx/source/outliner/outliner.src
new file mode 100644
index 0000000000..1faf6b6187
--- /dev/null
+++ b/svx/source/outliner/outliner.src
@@ -0,0 +1,232 @@
+/*************************************************************************
+ *
+ * $RCSfile: outliner.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <outliner.hrc>
+String RID_OUTLUNDO_HEIGHT
+{
+ TEXT = "Verschieben" ;
+ TEXT [ English ] = "Move" ;
+ TEXT [ norwegian ] = "Flytt" ;
+ TEXT [ italian ] = "Sposta" ;
+ TEXT [ portuguese_brazilian ] = "Mover" ;
+ TEXT [ portuguese ] = "Mover" ;
+ TEXT [ finnish ] = "Lisää" ;
+ TEXT [ danish ] = "Flyt" ;
+ TEXT [ french ] = "Déplacer" ;
+ TEXT [ swedish ] = "Flytta" ;
+ TEXT [ dutch ] = "Verplaatsen" ;
+ TEXT [ spanish ] = "Desplazar" ;
+ TEXT [ english_us ] = "Move" ;
+ TEXT[ chinese_simplified ] = "Òƶ¯";
+ TEXT[ russian ] = "Ïåðåìåñòèòü";
+ TEXT[ polish ] = "Przesuñ";
+ TEXT[ japanese ] = "ˆÚ“®";
+ TEXT[ chinese_traditional ] = "²¾°Ê";
+ TEXT[ arabic ] = "ÅÒÇÍÉ";
+ TEXT[ dutch ] = "Verplaatsen";
+ TEXT[ chinese_simplified ] = "Òƶ¯";
+ TEXT[ greek ] = "Ìåôáêßíçóç";
+ TEXT[ korean ] = "À̵¿";
+ TEXT[ turkish ] = "Taþý";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_OUTLUNDO_DEPTH
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Einrücken : Einr³cken */
+ /* ### ACHTUNG: Neuer Text in Resource? Einrücken : Einr³cken */
+ TEXT = "Einrücken" ;
+ TEXT [ English ] = "Indent" ;
+ Text [ english_us ] = "Indent" ;
+ Text [ italian ] = "Rientra" ;
+ Text [ spanish ] = "Sangría" ;
+ Text [ french ] = "Mettre en retrait" ;
+ Text [ dutch ] = "Inspringen" ;
+ Text [ swedish ] = "Dra in" ;
+ Text [ danish ] = "Indryk" ;
+ Text [ portuguese ] = "Avançar" ;
+ Text [ portuguese_brazilian ] = "Einrücken" ;
+ Text[ chinese_simplified ] = "Ëõ½ø";
+ Text[ russian ] = "Îòñóï";
+ Text[ polish ] = "Wysuniêcie";
+ Text[ japanese ] = "²ÝÃÞÝÄ";
+ Text[ chinese_traditional ] = "ÁY±Æ";
+ Text[ arabic ] = "ÅÒÇÍÉ";
+ Text[ dutch ] = "Inspringen";
+ Text[ chinese_simplified ] = "Ëõ½ø";
+ Text[ greek ] = "Åóï÷Þ";
+ Text[ korean ] = "µé¿© ¾²±â";
+ Text[ turkish ] = "Girinti";
+ Text[ language_user1 ] = " ";
+};
+String RID_OUTLUNDO_EXPAND
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Unterabsätze zeigen : Unterabsõtze zeigen */
+ /* ### ACHTUNG: Neuer Text in Resource? Unterabsätze zeigen : Unterabsõtze zeigen */
+ TEXT = "Unterabsätze zeigen" ;
+ TEXT [ English ] = "Expand" ;
+ Text [ english_us ] = "Show subpoints" ;
+ Text [ italian ] = "Mostra i sottoparagrafi" ;
+ Text [ spanish ] = "Mostrar subpárrafos" ;
+ Text [ french ] = "Afficher sous-paragraphes" ;
+ Text [ dutch ] = "Subalinea´s weergeven" ;
+ Text [ swedish ] = "Visa understycken" ;
+ Text [ danish ] = "Vis underafsnit" ;
+ Text [ portuguese ] = "Mostrar subparágrafos" ;
+ Text [ portuguese_brazilian ] = "Unterabsätze zeigen" ;
+ Text[ chinese_simplified ] = "ÏÔʾ·Ö¶ÎÂä";
+ Text[ russian ] = "Ðàçâåðóíòü ïîäàáçàöû";
+ Text[ polish ] = "Poka¿ akapity podrzêdne";
+ Text[ japanese ] = "‰ºˆÊ’i—Ž‚Ì•\\Ž¦";
+ Text[ chinese_traditional ] = "Åã¥Ü¤À¬q¸¨";
+ Text[ arabic ] = "ÅÙåÇÑ ÇáÝÞÑÇÊ ÇáÝÑÚíÉ";
+ Text[ dutch ] = "Subalinea´s weergeven";
+ Text[ chinese_simplified ] = "ÏÔʾ·Ö¶ÎÂä";
+ Text[ greek ] = "ÅìöÜíéóç õðïðáñáãñÜöùí";
+ Text[ korean ] = "ºÎ´Ü¶ô Ç¥½Ã";
+ Text[ turkish ] = "Alt bölümleri göster";
+ Text[ language_user1 ] = " ";
+};
+String RID_OUTLUNDO_COLLAPSE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Unterabsätze verstecken : Unterabsõtze verstecken */
+ /* ### ACHTUNG: Neuer Text in Resource? Unterabsätze verstecken : Unterabsõtze verstecken */
+ TEXT = "Unterabsätze verstecken" ;
+ TEXT [ English ] = "Collapse" ;
+ Text [ english_us ] = "Collapse" ;
+ Text [ italian ] = "Nascondi i sottoparagrafi" ;
+ Text [ spanish ] = "Ocultar subpárrafos" ;
+ Text [ french ] = "Masquer sous-paragraphes" ;
+ Text [ dutch ] = "Subalinea´s verbergen" ;
+ Text [ swedish ] = "Göm understycken" ;
+ Text [ danish ] = "Skjul underafsnit" ;
+ Text [ portuguese ] = "Ocultar subparágrafos" ;
+ Text [ portuguese_brazilian ] = "Unterabsätze verstecken" ;
+ Text[ chinese_simplified ] = "ÒþÈë·Ö¶ÎÂä";
+ Text[ russian ] = "Ñâåðíóòü ïîäàáçàöû";
+ Text[ polish ] = "Zwiñ akapity podrzêdne";
+ Text[ japanese ] = "‰ºˆÊ’i—Ž‚Ì”ñ•\\Ž¦";
+ Text[ chinese_traditional ] = "Áô¤J¤À¬q¸¨";
+ Text[ arabic ] = "ÇÎÊÝÇÁ ÇáÝÞÑÇÊ ÇáÝÑÚíÉ";
+ Text[ dutch ] = "Subalinea´s verbergen";
+ Text[ chinese_simplified ] = "ÒþÈë·Ö¶ÎÂä";
+ Text[ greek ] = "Áðüêñõøç õðïðáñáãñÜöùí";
+ Text[ korean ] = "ºÎ´Ü¶ô ¼û±â±â";
+ Text[ turkish ] = "Alt bölümleri gizle";
+ Text[ language_user1 ] = " ";
+};
+String RID_OUTLUNDO_ATTR
+{
+ TEXT = "Attribute anwenden" ;
+ TEXT [ English ] = "Apply attributes" ;
+ TEXT [ norwegian ] = "Bruk attributter" ;
+ TEXT [ italian ] = "Applica attributi" ;
+ TEXT [ portuguese_brazilian ] = "Aplicar atributos" ;
+ TEXT [ portuguese ] = "Aplicar atributos" ;
+ TEXT [ finnish ] = "Käytä määritteitä" ;
+ TEXT [ danish ] = "Anvend attributter" ;
+ TEXT [ french ] = "Appliquer les attributs" ;
+ TEXT [ swedish ] = "Använd attribut" ;
+ TEXT [ dutch ] = "Attributen toepassen" ;
+ TEXT [ spanish ] = "Aplicar atributos" ;
+ TEXT [ english_us ] = "Apply attributes" ;
+ TEXT[ chinese_simplified ] = "ʹÓÃÊôÐÔ";
+ TEXT[ russian ] = "Ïðèìåíèòü àòðèáóòû";
+ TEXT[ polish ] = "Zastosuj atrybuty";
+ TEXT[ japanese ] = "‘®«‚Ì“K—p";
+ TEXT[ chinese_traditional ] = "¨Ï¥ÎÄÝ©Ê";
+ TEXT[ arabic ] = "ÇÓÊÎÏÇã ÇáÓãÇÊ";
+ TEXT[ dutch ] = "Attributen toepassen";
+ TEXT[ chinese_simplified ] = "ʹÓÃÊôÐÔ";
+ TEXT[ greek ] = "ÅöáñìïãÞ éäéïôÞôùí";
+ TEXT[ korean ] = "¼Ó¼º Àû¿ë";
+ TEXT[ turkish ] = "Öznitelikleri uygula";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_OUTLUNDO_INSERT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */
+ TEXT = "Einfügen" ;
+ TEXT [ English ] = "Insert" ;
+ TEXT [ norwegian ] = "Sett inn" ;
+ TEXT [ italian ] = "Inserisci" ;
+ TEXT [ portuguese_brazilian ] = "Inserir" ;
+ TEXT [ portuguese ] = "Inserir" ;
+ TEXT [ finnish ] = "Lisää" ;
+ TEXT [ danish ] = "Indsæt" ;
+ TEXT [ french ] = "Insérer" ;
+ TEXT [ swedish ] = "Infoga" ;
+ TEXT [ dutch ] = "Invoegen" ;
+ TEXT [ spanish ] = "Insertar" ;
+ TEXT [ english_us ] = "Insert" ;
+ 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 ] = " ";
+};
diff --git a/svx/source/outliner/outlobj.cxx b/svx/source/outliner/outlobj.cxx
new file mode 100644
index 0000000000..5348b9e88e
--- /dev/null
+++ b/svx/source/outliner/outlobj.cxx
@@ -0,0 +1,316 @@
+/*************************************************************************
+ *
+ * $RCSfile: outlobj.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <outl_pch.hxx>
+
+#pragma hdrstop
+
+
+#define _OUTLINER_CXX
+#include <outliner.hxx>
+#include <outlobj.hxx>
+#include <outleeng.hxx>
+
+#ifndef _EDITOBJ_HXX //autogen
+#include <editobj.hxx>
+#endif
+
+
+#ifndef _SV_BITMAP_HXX
+#include <vcl/bitmap.hxx>
+#endif
+
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+
+DBG_NAME(OutlinerParaObject);
+
+OutlinerParaObject::OutlinerParaObject( USHORT nParaCount )
+{
+ DBG_CTOR(OutlinerParaObject,0);
+
+ bIsEditDoc = TRUE;
+ pDepthArr = new USHORT[ nParaCount ];
+ nCount = (ULONG)nParaCount;
+}
+
+OutlinerParaObject::OutlinerParaObject( const OutlinerParaObject& rObj )
+{
+ DBG_CTOR(OutlinerParaObject,0);
+
+ bIsEditDoc = rObj.bIsEditDoc;
+ nCount = rObj.nCount;
+ pDepthArr = new USHORT[ (USHORT)nCount ];
+ memcpy( pDepthArr, rObj.pDepthArr, (size_t)(sizeof(USHORT)*nCount) );
+ pText = rObj.pText->Clone();
+}
+
+OutlinerParaObject::OutlinerParaObject( const EditTextObject& rEditObj )
+{
+ DBG_CTOR(OutlinerParaObject,0);
+
+ bIsEditDoc = TRUE;
+ pText = rEditObj.Clone();
+ nCount = pText->GetParagraphCount();
+ pDepthArr = new USHORT[ nCount ];
+ memset( pDepthArr, 0, nCount*sizeof(USHORT) );
+}
+
+OutlinerParaObject::~OutlinerParaObject()
+{
+ DBG_DTOR(OutlinerParaObject,0);
+
+ delete pText;
+ delete pDepthArr;
+}
+
+void OutlinerParaObject::ClearPortionInfo()
+{
+ DBG_CHKTHIS(OutlinerParaObject,0);
+ pText->ClearPortionInfo();
+}
+
+OutlinerParaObject* OutlinerParaObject::Clone() const
+{
+ DBG_CHKTHIS(OutlinerParaObject,0);
+ OutlinerParaObject* pObj = new OutlinerParaObject(*this);
+ return pObj;
+}
+
+void OutlinerParaObject::ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName )
+{
+ DBG_CHKTHIS(OutlinerParaObject,0);
+ pText->ChangeStyleSheetName( eFamily, rOldName, rNewName );
+}
+
+BOOL OutlinerParaObject::ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily )
+{
+ DBG_CHKTHIS(OutlinerParaObject,0);
+ return pText->ChangeStyleSheets( rOldName, eOldFamily, rNewName, eNewFamily );
+}
+
+void OutlinerParaObject::SetStyleSheets( USHORT nLevel, const XubString rNewName, const SfxStyleFamily& rNewFamily )
+{
+ for ( USHORT n = Count(); n; )
+ {
+ if ( GetDepth( --n ) == nLevel )
+ pText->SetStyleSheet( n, rNewName, rNewFamily );
+ }
+}
+
+void OutlinerParaObject::Store(SvStream& rStream ) const
+{
+ rStream << nCount;
+ rStream << (ULONG) 0x42345678;
+ pText->Store( rStream );
+
+ for( USHORT nPos=0; nPos < nCount; nPos++ )
+ rStream << pDepthArr[ nPos ];
+
+ rStream << bIsEditDoc;
+}
+
+OutlinerParaObject* OutlinerParaObject::Create( SvStream& rStream, SfxItemPool* pTextObjectPool )
+{
+ OutlinerParaObject* pPObj = NULL;
+ USHORT nVersion = 0;
+
+ ULONG nCount;
+ rStream >> nCount;
+
+ ULONG nSyncRef;
+ rStream >> nSyncRef;
+ if( nSyncRef == 0x12345678 )
+ nVersion = 1;
+ else if( nSyncRef == 0x22345678 )
+ nVersion = 2;
+ else if( nSyncRef == 0x32345678 )
+ nVersion = 3;
+ else if ( nSyncRef == 0x42345678 )
+ nVersion = 4;
+
+ if ( nVersion )
+ {
+ pPObj = new OutlinerParaObject( (USHORT)nCount );
+ if( nVersion <= 3 )
+ {
+ EditTextObject* pAllText = 0;
+ USHORT nCurPara = 0;
+ while ( nCount )
+ {
+ EditTextObject* pText = EditTextObject::Create( rStream, NULL );
+ DBG_ASSERT(pText,"CreateEditTextObject failed")
+ ULONG nSync = 0;
+ rStream >> nSync;
+ DBG_ASSERT(nSync==nSyncRef,"Stream out of sync")
+ USHORT nDepth;
+ rStream >> nDepth;
+ Paragraph* pPara = new Paragraph( nDepth );
+ if( nVersion == 1 )
+ {
+ // Bullet ueberlesen
+ USHORT nFlags;
+ rStream >> nFlags;
+
+ if ( nFlags & 0x0001 ) // Bitmap
+ {
+ Bitmap aBmp;
+ rStream >> aBmp;
+ }
+ else
+ {
+ Color aColor;
+ rStream >> aColor;
+ rStream.SeekRel( 16 );
+ String aName;
+ rStream.ReadByteString(aName);
+ rStream.SeekRel( 12 );
+ }
+ long nDummy;
+ rStream >> nDummy;
+ rStream >> nDummy;
+ }
+ pPara->bVisible = TRUE;
+ if( !pAllText )
+ pAllText = pText;
+ else
+ {
+ pAllText->Insert( *pText, 0xffff );
+ delete pText;
+ }
+ pPObj->pDepthArr[ nCurPara ] = pPara->GetDepth();
+ delete pPara;
+ nCount--;
+ nCurPara++;
+ if( nCount )
+ {
+ ULONG nSync = 0;
+ rStream >> nSync;
+ DBG_ASSERT(nSync==nSyncRef,"Stream out of sync")
+ }
+ }
+ if( nVersion == 3 )
+ rStream >> pPObj->bIsEditDoc;
+ pPObj->pText = pAllText;
+ }
+ else // nVersion >= 4
+ {
+ pPObj->pText = EditTextObject::Create( rStream, pTextObjectPool );
+ for( USHORT nCur=0; nCur < nCount; nCur++ )
+ rStream >> pPObj->pDepthArr[ nCur ];
+ rStream >> pPObj->bIsEditDoc;
+
+ if ( pPObj->pText->GetVersion() < 501 )
+ pPObj->pText->AdjustImportedLRSpaceItems( pPObj->bIsEditDoc );
+
+ // MT: Bei der naechsten Version mal eine Recordlaenge einfuehren!
+ }
+ }
+ return pPObj;
+}
+
+USHORT OutlinerParaObject::GetOutlinerMode() const
+{
+ return pText->GetUserType();
+}
+
+void OutlinerParaObject::SetOutlinerMode( USHORT n )
+{
+ pText->SetUserType( n );
+}
+
+void OutlinerParaObject::SetLRSpaceItemFlags( BOOL bOutlineMode )
+{
+ pText->SetLRSpaceItemFlags( bOutlineMode );
+}
+
+BOOL OutlinerParaObject::RemoveCharAttribs( USHORT nWhich )
+{
+ return pText->RemoveCharAttribs( nWhich );
+}
+
+BOOL OutlinerParaObject::RemoveParaAttribs( USHORT nWhich )
+{
+ return pText->RemoveParaAttribs( nWhich );
+}
+
+void OutlinerParaObject::MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart, USHORT nEnd )
+{
+ pText->MergeParaAttribs( rAttribs, nStart, nEnd );
+}
+
+void OutlinerParaObject::PrepareStore( SfxStyleSheetPool* pStyleSheetPool )
+{
+ pText->PrepareStore( pStyleSheetPool );
+}
+
+void OutlinerParaObject::FinishStore()
+{
+ pText->FinishStore();
+}
+
+void OutlinerParaObject::FinishLoad( SfxStyleSheetPool* pStyleSheetPool )
+{
+ pText->FinishLoad( pStyleSheetPool );
+}
+
diff --git a/svx/source/outliner/outlundo.cxx b/svx/source/outliner/outlundo.cxx
new file mode 100644
index 0000000000..421c1db3dd
--- /dev/null
+++ b/svx/source/outliner/outlundo.cxx
@@ -0,0 +1,291 @@
+/*************************************************************************
+ *
+ * $RCSfile: outlundo.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <outl_pch.hxx>
+
+#pragma hdrstop
+
+#define _OUTLINER_CXX
+#include <outliner.hxx>
+#include <outlundo.hxx>
+
+
+OutlinerUndoBase::OutlinerUndoBase( USHORT nId, Outliner* pOutliner )
+ : EditUndo( nId, NULL )
+{
+ DBG_ASSERT( pOutliner, "Undo: Outliner?!" );
+ mpOutliner = pOutliner;
+}
+
+
+OutlinerUndoChangeDepth::OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nPara, USHORT nOldDepth, USHORT nNewDepth )
+ : OutlinerUndoBase( OLUNDO_DEPTH, pOutliner )
+{
+ mnPara = nPara;
+ mnOldDepth = nOldDepth;
+ mnNewDepth = nNewDepth;
+}
+
+void OutlinerUndoChangeDepth::Undo()
+{
+ GetOutliner()->ImplInitDepth( mnPara, mnOldDepth, FALSE );
+}
+
+void OutlinerUndoChangeDepth::Redo()
+{
+ GetOutliner()->ImplInitDepth( mnPara, mnNewDepth, FALSE );
+}
+
+void OutlinerUndoChangeDepth::Repeat()
+{
+ DBG_ERROR( "Repeat not implemented!" );
+}
+
+
+OutlinerUndoCheckPara::OutlinerUndoCheckPara( Outliner* pOutliner, USHORT nPara )
+ : OutlinerUndoBase( OLUNDO_DEPTH, pOutliner )
+{
+ mnPara = nPara;
+}
+
+void OutlinerUndoCheckPara::Undo()
+{
+ Paragraph* pPara = GetOutliner()->GetParagraph( mnPara );
+ pPara->Invalidate();
+ GetOutliner()->ImplCalcBulletText( mnPara, FALSE, FALSE );
+}
+
+void OutlinerUndoCheckPara::Redo()
+{
+ Paragraph* pPara = GetOutliner()->GetParagraph( mnPara );
+ pPara->Invalidate();
+ GetOutliner()->ImplCalcBulletText( mnPara, FALSE, FALSE );
+}
+
+void OutlinerUndoCheckPara::Repeat()
+{
+ DBG_ERROR( "Repeat not implemented!" );
+}
+
+
+OutlinerUndoMoveParagraphs::OutlinerUndoMoveParagraphs( Outliner* pOutliner, USHORT nStartPara, USHORT nEndPara, short nDiff )
+ : OutlinerUndoBase( OLUNDO_MOVEPARAGRAPHS, pOutliner )
+{
+ mnStartPara = nStartPara;
+ mnEndPara = nEndPara;
+ mnDiff = nDiff;
+}
+
+void OutlinerUndoMoveParagraphs::Undo()
+{
+ // ...
+}
+
+void OutlinerUndoMoveParagraphs::Redo()
+{
+ // ...
+}
+
+void OutlinerUndoMoveParagraphs::Repeat()
+{
+ DBG_ERROR( "Repeat not implemented!" );
+}
+
+
+
+
+DBG_NAME(OLUndoHeight);
+
+
+OLUndoHeight::OLUndoHeight( Outliner* pOut, USHORT nId )
+ : EditUndo( nId, 0 )
+{
+ DBG_CTOR(OLUndoHeight,0);
+ DBG_ASSERT(pOut,"Undo:No Outliner");
+ pOutliner = pOut;
+ ppBulletTexts = 0;
+ pDepths = 0;
+ nAbsCount = 0;
+}
+
+
+OLUndoHeight::~OLUndoHeight()
+{
+ DBG_DTOR(OLUndoHeight,0);
+ Outliner::ImpDeleteBulletArray( ppBulletTexts, nAbsCount );
+ delete pDepths;
+}
+
+
+void OLUndoHeight::Restore( BOOL bUndo )
+{
+ DBG_CHKTHIS(OLUndoHeight,0);
+ DBG_ASSERT(pOutliner,"Undo:No Outliner");
+ DBG_ASSERT(pOutliner->pEditEngine,"Outliner already deleted");
+
+ // Bullets restaurieren & Undo->Redo bzw. Redo->Undo vorbereiten
+ XubString** ppNewBulletArray = pOutliner->ImpCreateBulletArray();
+ USHORT* pNewDepths = pOutliner->ImpCreateDepthArray();
+
+ pOutliner->ImpSetBulletArray( ppBulletTexts );
+ Outliner::ImpDeleteBulletArray( ppBulletTexts, nAbsCount );
+ ppBulletTexts = ppNewBulletArray;
+
+ pOutliner->ImpSetDepthArray( pDepths );
+ delete pDepths;
+ pDepths = pNewDepths;
+}
+
+
+
+void OLUndoHeight::Undo()
+{
+ DBG_CHKTHIS(OLUndoHeight,0);
+ Restore( TRUE );
+}
+
+
+void OLUndoHeight::Redo()
+{
+ DBG_CHKTHIS(OLUndoHeight,0);
+ Restore( FALSE );
+}
+
+
+void OLUndoHeight::Repeat()
+{
+ DBG_CHKTHIS(OLUndoHeight,0);
+ DBG_ERROR("Not implemented");
+}
+
+DBG_NAME(OLUndoExpand);
+
+
+OLUndoExpand::OLUndoExpand(Outliner* pOut, USHORT nId )
+ : EditUndo( nId, 0 )
+{
+ DBG_CTOR(OLUndoExpand,0);
+ DBG_ASSERT(pOut,"Undo:No Outliner");
+ pOutliner = pOut;
+ nCount = 0;
+ pParas = 0;
+}
+
+
+OLUndoExpand::~OLUndoExpand()
+{
+ DBG_DTOR(OLUndoExpand,0);
+ delete pParas;
+}
+
+
+void OLUndoExpand::Restore( BOOL bUndo )
+{
+ DBG_CHKTHIS(OLUndoExpand,0);
+ DBG_ASSERT(pOutliner,"Undo:No Outliner");
+ DBG_ASSERT(pOutliner->pEditEngine,"Outliner already deleted");
+ Paragraph* pPara;
+
+ BOOL bExpand = FALSE;
+ USHORT nId = GetId();
+ if((nId == OLUNDO_EXPAND && !bUndo) || (nId == OLUNDO_COLLAPSE && bUndo))
+ bExpand = TRUE;
+ if( !pParas )
+ {
+ pPara = pOutliner->GetParagraph( (ULONG)nCount );
+ if( bExpand )
+ pOutliner->Expand( pPara );
+ else
+ pOutliner->Collapse( pPara );
+ }
+ else
+ {
+ for( USHORT nIdx = 0; nIdx < nCount; nIdx++ )
+ {
+ pPara = pOutliner->GetParagraph( (ULONG)(pParas[nIdx]) );
+ if( bExpand )
+ pOutliner->Expand( pPara );
+ else
+ pOutliner->Collapse( pPara );
+ }
+ }
+}
+
+
+void OLUndoExpand::Undo()
+{
+ DBG_CHKTHIS(OLUndoExpand,0);
+ Restore( TRUE );
+}
+
+
+void OLUndoExpand::Redo()
+{
+ DBG_CHKTHIS(OLUndoExpand,0);
+ Restore( FALSE );
+}
+
+
+void OLUndoExpand::Repeat()
+{
+ DBG_CHKTHIS(OLUndoExpand,0);
+ DBG_ERROR("Not implemented");
+}
diff --git a/svx/source/outliner/outlundo.hxx b/svx/source/outliner/outlundo.hxx
new file mode 100644
index 0000000000..635c6528da
--- /dev/null
+++ b/svx/source/outliner/outlundo.hxx
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * $RCSfile: outlundo.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _OUTLUNDO_HXX
+#define _OUTLUNDO_HXX
+
+#include <outliner.hxx>
+
+#ifndef _EDITDATA_HXX
+#include <editdata.hxx>
+#endif
+
+#ifndef _EDITUND2_HXX
+#include <editund2.hxx>
+#endif
+
+class OutlinerUndoBase : public EditUndo
+{
+private:
+ Outliner* mpOutliner;
+
+public:
+ OutlinerUndoBase( USHORT nId, Outliner* pOutliner );
+
+ Outliner* GetOutliner() const { return mpOutliner; }
+};
+
+class OutlinerUndoChangeDepth : public OutlinerUndoBase
+{
+private:
+ USHORT mnPara;
+ USHORT mnOldDepth;
+ USHORT mnNewDepth;
+
+public:
+ OutlinerUndoChangeDepth( Outliner* pOutliner, USHORT nPara, USHORT nOldDepth, USHORT nNewDepth );
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+class OutlinerUndoMoveParagraphs : public OutlinerUndoBase
+{
+private:
+ USHORT mnStartPara;
+ USHORT mnEndPara;
+ short mnDiff;
+
+public:
+ OutlinerUndoMoveParagraphs( Outliner* pOutliner, USHORT nStartPara, USHORT nEndPara, short nDiff );
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+// Hilfs-Undo: Wenn es fuer eine Aktion keine OutlinerUndoAction gibst, weil
+// die EditEngine das handelt, aber z.B. noch das Bullet neu berechnet werden muss.
+
+class OutlinerUndoCheckPara : public OutlinerUndoBase
+{
+private:
+ USHORT mnPara;
+
+public:
+ OutlinerUndoCheckPara( Outliner* pOutliner, USHORT nPara );
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+};
+
+
+
+// -------------------------------------
+
+
+class OLUndoHeight : public EditUndo
+{
+ void Restore( BOOL bUndo );
+public:
+ OLUndoHeight( Outliner* pOut, USHORT nId = OLUNDO_HEIGHT );
+ ~OLUndoHeight();
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+
+ Outliner* pOutliner;
+ String **ppBulletTexts;
+ USHORT *pDepths;
+ USHORT nAbsCount;
+};
+
+class OLUndoExpand : public EditUndo
+{
+ void Restore( BOOL bUndo );
+public:
+ OLUndoExpand( Outliner* pOut, USHORT nId );
+ ~OLUndoExpand();
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat();
+
+ USHORT* pParas; // 0 == nCount enthaelt Absatznummer
+ Outliner* pOutliner;
+ USHORT nCount;
+};
+
+#endif
diff --git a/svx/source/outliner/outlvw.cxx b/svx/source/outliner/outlvw.cxx
new file mode 100644
index 0000000000..598f090717
--- /dev/null
+++ b/svx/source/outliner/outlvw.cxx
@@ -0,0 +1,1955 @@
+/*************************************************************************
+ *
+ * $RCSfile: outlvw.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <outl_pch.hxx>
+
+#pragma hdrstop
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#define _OUTLINER_CXX
+#include <outliner.hxx>
+#include <outleeng.hxx>
+#include <paralist.hxx>
+#include <outlundo.hxx>
+#include <outlobj.hxx>
+#include <flditem.hxx>
+#include <flditem.hxx>
+#include <eeitem.hxx>
+#include <numitem.hxx>
+
+#ifndef _SV_WINDOW_HXX //autogen
+#include <vcl/window.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _SV_DRAG_HXX //autogen
+#include <vcl/drag.hxx>
+#endif
+
+#ifndef _EDITSTAT_HXX //autogen
+#include <editstat.hxx>
+#endif
+
+
+// Breite der Randzonen innerhalb derer beim D&D gescrollt wird
+#define OL_SCROLL_LRBORDERWIDTHPIX 10
+#define OL_SCROLL_TBBORDERWIDTHPIX 10
+
+// Wert, um den Fensterinhalt beim D&D gescrollt wird
+#define OL_SCROLL_HOROFFSET 20 /* in % von VisibleSize.Width */
+#define OL_SCROLL_VEROFFSET 20 /* in % von VisibleSize.Height */
+
+DBG_NAME(OutlinerView);
+
+
+OutlinerView::OutlinerView( Outliner* pOut, Window* pWin )
+{
+ DBG_CTOR( OutlinerView, 0 );
+
+ pOwner = pOut;
+ ePrevMouseTarget = MouseDontKnow;
+ bBeginDragAtMove = FALSE;
+ bDDCursorVisible = FALSE;
+ bInDragMode = FALSE;
+ nDDScrollLRBorderWidthWin = 0;
+ nDDScrollTBBorderWidthWin = 0;
+ pHorTabArrDoc = 0;
+
+ pEditView = new EditView( pOut->pEditEngine, pWin );
+ pEditView->SetSelectionMode( EE_SELMODE_TXTONLY );
+}
+
+OutlinerView::~OutlinerView()
+{
+ DBG_DTOR(OutlinerView,0);
+ delete pEditView;
+}
+
+void OutlinerView::Paint( const Rectangle& rRect )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+
+ // beim ersten Paint/KeyInput/Drop wird aus einem leeren Outliner ein
+ // Outliner mit genau einem Absatz
+ if( pOwner->bFirstParaIsEmpty )
+ pOwner->Insert( String() );
+
+ pEditView->Paint( rRect );
+}
+
+BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt )
+{
+ DBG_CHKTHIS( OutlinerView, 0 );
+
+ // beim ersten Paint/KeyInput/Drop wird aus einem leeren Outliner ein
+ // Outliner mit genau einem Absatz
+ if( pOwner->bFirstParaIsEmpty )
+ pOwner->Insert( String() );
+
+
+ BOOL bKeyProcessed = FALSE;
+ ESelection aSel( pEditView->GetSelection() );
+ BOOL bSelection = aSel.HasRange();
+ KeyCode aKeyCode = rKEvt.GetKeyCode();
+ KeyFuncType eFunc = aKeyCode.GetFunction();
+ USHORT nCode = aKeyCode.GetCode();
+ BOOL bReadOnly = IsReadOnly();
+
+ if( bSelection && EditEngine::DoesKeyChangeText( rKEvt ) )
+ {
+ if ( ImpCalcSelectedPages( FALSE ) && !pOwner->ImpCanDeleteSelectedPages( this ) )
+ return TRUE;
+ }
+
+ if ( eFunc != KEYFUNC_DONTKNOW )
+ {
+ switch ( eFunc )
+ {
+ case KEYFUNC_CUT:
+ {
+ if ( !bReadOnly )
+ {
+ Cut();
+ bKeyProcessed = TRUE;
+ }
+ }
+ break;
+ case KEYFUNC_COPY:
+ {
+ Copy();
+ bKeyProcessed = TRUE;
+ }
+ break;
+ case KEYFUNC_PASTE:
+ {
+ if ( !bReadOnly )
+ {
+ PasteSpecial();
+ bKeyProcessed = TRUE;
+ }
+ }
+ break;
+ case KEYFUNC_DELETE:
+ {
+ if( !bReadOnly && !bSelection && ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) )
+ {
+ if( aSel.nEndPos == pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) )
+ {
+ Paragraph* pNext = pOwner->pParaList->GetParagraph( aSel.nEndPara+1 );
+ if( pNext && pNext->GetDepth() == 0 )
+ {
+ if( !pOwner->ImpCanDeleteSelectedPages( this, aSel.nEndPara, 1 ) )
+ return FALSE;
+ }
+ }
+ }
+ }
+ break;
+ default: // wird dann evtl. unten bearbeitet.
+ eFunc = KEYFUNC_DONTKNOW;
+ }
+ }
+ if ( eFunc == KEYFUNC_DONTKNOW )
+ {
+ switch ( nCode )
+ {
+ case KEY_TAB:
+ {
+ if ( !bReadOnly && !aKeyCode.IsMod1() && !aKeyCode.IsMod2() )
+ {
+ if ( ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) &&
+ ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TITLEOBJECT ) &&
+ ( bSelection || !aSel.nStartPos ) )
+ {
+ if ( aKeyCode.IsShift() )
+ AdjustDepth( -1 );
+ else
+ AdjustDepth( 1 );
+ bKeyProcessed = TRUE;
+ }
+ else if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) &&
+ !bSelection && !aSel.nEndPos && pOwner->ImplHasBullet( aSel.nEndPara ) )
+ {
+ // Ein-Ausruecken...
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( aSel.nEndPara );
+ USHORT nDepth = pPara->GetDepth();
+ if ( nDepth || !aKeyCode.IsShift() )
+ {
+ if ( aKeyCode.IsShift() )
+ nDepth--;
+ else
+ nDepth++;
+ pOwner->ImplInitDepth( aSel.nEndPara, nDepth, TRUE, TRUE );
+ bKeyProcessed = TRUE;
+ }
+ }
+ }
+ }
+ break;
+ case KEY_BACKSPACE:
+ {
+ if( !bReadOnly && !bSelection && aSel.nEndPara && !aSel.nEndPos )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( aSel.nEndPara );
+ Paragraph* pPrev = pOwner->pParaList->GetParagraph( aSel.nEndPara-1 );
+ if( !pPrev->IsVisible() )
+ return TRUE;
+ if( !pPara->GetDepth() )
+ {
+ if(!pOwner->ImpCanDeleteSelectedPages(this, aSel.nEndPara , 1 ) )
+ return TRUE;
+ }
+ }
+ }
+ break;
+ case KEY_RETURN:
+ {
+ if ( !bReadOnly )
+ {
+ // Sonderbehandlung: Hartes Return am Ende eines Absatzes,
+ // der eingeklappte Unterabsaetze besitzt
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( aSel.nEndPara );
+
+ if( !aKeyCode.IsShift() )
+ {
+ // Nochmal ImpGetCursor ???
+ if( !bSelection &&
+ aSel.nEndPos == pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) )
+ {
+ ULONG nChilds = pOwner->pParaList->GetChildCount(pPara);
+ if( nChilds && !pOwner->pParaList->HasVisibleChilds(pPara))
+ {
+ pOwner->UndoActionStart( OLUNDO_INSERT );
+ ULONG nTemp = aSel.nEndPara;
+ nTemp += nChilds;
+ nTemp++; // einfuegen ueber naechstem Non-Child
+ pOwner->Insert( String(),nTemp,pPara->GetDepth());
+ // Cursor positionieren
+ ESelection aTmpSel((USHORT)nTemp,0,(USHORT)nTemp,0);
+ pEditView->SetSelection( aTmpSel );
+ pEditView->ShowCursor( TRUE, TRUE );
+ pOwner->UndoActionEnd( OLUNDO_INSERT );
+ bKeyProcessed = TRUE;
+ }
+ }
+ }
+ if( !bKeyProcessed && !bSelection &&
+ !aKeyCode.IsShift() && aKeyCode.IsMod1() &&
+ ( aSel.nEndPos == pOwner->pEditEngine->GetTextLen(aSel.nEndPara) ) )
+ {
+ pOwner->UndoActionStart( OLUNDO_INSERT );
+ ULONG nTemp = aSel.nEndPara;
+ nTemp++;
+ pOwner->Insert( String(), nTemp, pPara->GetDepth()+1 );
+
+ // Cursor positionieren
+ ESelection aTmpSel((USHORT)nTemp,0,(USHORT)nTemp,0);
+ pEditView->SetSelection( aTmpSel );
+ pEditView->ShowCursor( TRUE, TRUE );
+ pOwner->UndoActionEnd( OLUNDO_INSERT );
+ bKeyProcessed = TRUE;
+ }
+ }
+ }
+ break;
+ }
+ }
+
+ return bKeyProcessed ? TRUE : pEditView->PostKeyEvent( rKEvt );
+}
+
+
+ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix,MouseTarget& reTarget)
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ ULONG nPara = EE_PARA_NOT_FOUND;
+
+ Point aMousePosWin( rPosPix );
+ aMousePosWin = pEditView->GetWindow()->PixelToLogic( rPosPix );
+
+ if( !pEditView->GetOutputArea().IsInside( aMousePosWin ) )
+ reTarget = MouseOutside;
+ else
+ {
+ reTarget = MouseText;
+
+ // MT 04/00: ImpEditView::GetDocPos => An EditView anbieten!
+ Point aDocPos( aMousePosWin );
+ Rectangle aOutArea = pEditView->GetOutputArea();
+ Rectangle aVisArea = pEditView->GetVisArea();
+ aDocPos.Y() -= aOutArea.Top();
+ aDocPos.X() -= aOutArea.Left();
+ aDocPos.Y() += aVisArea.Top();
+ aDocPos.X() += aVisArea.Left();
+ // MT: Dieser Code ist doppelt (Outliner::IsTextPos() )
+ // => Mal eine Methode anbieten, jetzt muesste ich dafür aber branchen => spaeter
+ // Dann wird wahrscheinlich EditView::GetDocPosTopLeft ueberfluessig
+ // Bullet?
+ nPara = pOwner->pEditEngine->FindParagraph( aDocPos.Y() );
+ if ( ( nPara != EE_PARA_NOT_FOUND ) && pOwner->ImplHasBullet( nPara ) )
+ {
+ Rectangle aBulArea = pOwner->ImpCalcBulletArea( nPara, TRUE );
+ Point aParaXY = pOwner->pEditEngine->GetDocPosTopLeft( nPara );
+ aBulArea.Top() += aParaXY.Y();
+ aBulArea.Bottom() += aParaXY.Y();
+ if ( aBulArea.IsInside( aDocPos ) )
+ {
+ reTarget = MouseBullet;
+ }
+ }
+ }
+ return nPara;
+}
+
+
+Pointer OutlinerView::ImpGetMousePointer( MouseTarget eTarget )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ // Mapping MouseTarget -> PointerStyle
+ static const PointerStyle pStyles[] =
+ {
+ POINTER_TEXT, // MouseText
+ POINTER_MOVE, // MouseBullet
+ POINTER_ARROW, // MouseNodeButton
+ POINTER_ARROW // MouseOutside
+ };
+ return Pointer( pStyles[eTarget] );
+}
+
+
+void OutlinerView::ImpSetMousePointer( MouseTarget eTarget )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ if( eTarget == MouseOutside )
+ ePrevMouseTarget = MouseOutside;
+ else if ( eTarget != ePrevMouseTarget )
+ {
+ ePrevMouseTarget = eTarget;
+ pEditView->GetWindow()->SetPointer( ImpGetMousePointer( eTarget ) );
+ }
+}
+
+
+BOOL __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ if( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode())
+ return pEditView->MouseMove( rMEvt );
+
+ if ( bBeginDragAtMove )
+ return TRUE;
+ else
+ {
+ MouseTarget eTarget;
+ ImpCheckMousePos( rMEvt.GetPosPixel(), eTarget );
+ ImpSetMousePointer( eTarget );
+ if ( eTarget != MouseOutside )
+ return pEditView->MouseMove( rMEvt );
+ }
+ return FALSE;
+}
+
+
+BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() )
+ return pEditView->MouseButtonDown( rMEvt );
+
+ MouseTarget eTarget;
+ ULONG nPara = ImpCheckMousePos( rMEvt.GetPosPixel(), eTarget );
+ if ( eTarget == MouseOutside )
+ return FALSE;
+ if ( nPara == EE_PARA_NOT_FOUND )
+ return TRUE;
+ ImpSetMousePointer( eTarget );
+ if ( eTarget == MouseBullet )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ BOOL bHasChilds = (pPara && pOwner->pParaList->HasChilds(pPara));
+ if( rMEvt.GetClicks() == 1 )
+ {
+ ULONG nEndPara = nPara;
+ if ( bHasChilds && pOwner->pParaList->HasVisibleChilds(pPara) )
+ nEndPara += pOwner->pParaList->GetChildCount( pPara );
+ // umgekehrt rum selektieren, damit EditEngine nicht scrollt
+ ESelection aSel((USHORT)nEndPara, 0xffff,(USHORT)nPara, 0 );
+ pEditView->SetSelection( aSel );
+ }
+ else if( rMEvt.GetClicks() == 2 && bHasChilds )
+ ImpToggleExpand( pPara );
+
+ bBeginDragAtMove = TRUE;
+ aDDStartPosPix = rMEvt.GetPosPixel();
+ aDDStartPosRef=pEditView->GetWindow()->PixelToLogic( aDDStartPosPix,pOwner->GetRefMapMode());
+ return TRUE;
+ }
+ return pEditView->MouseButtonDown( rMEvt );
+}
+
+
+BOOL __EXPORT OutlinerView::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() )
+ return pEditView->MouseButtonUp( rMEvt );
+
+ MouseTarget eTarget;
+ bBeginDragAtMove = FALSE;
+ ImpCheckMousePos( rMEvt.GetPosPixel(), eTarget );
+ if ( eTarget == MouseOutside )
+ return FALSE;
+ ImpSetMousePointer( eTarget );
+ return pEditView->MouseButtonUp( rMEvt );
+}
+
+
+void OutlinerView::ImpDrag( const MouseEvent& rMEvt )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ PointerStyle ePtrStyle;
+
+ bBeginDragAtMove = FALSE;
+ bInDragMode = TRUE;
+ ParagraphList* pPList = pOwner->pParaList;
+ Window* pWindow = pEditView->GetWindow();
+
+ Point aCurPosRef= pWindow->PixelToLogic(aDDStartPosPix,pOwner->GetRefMapMode());
+ nDDCurPara = pEditView->GetParagraph( aDDStartPosPix );
+ nDDStartPara = nDDCurPara;
+
+ Paragraph* pPara = pPList->GetParagraph( nDDStartPara );
+ DBG_ASSERT(pPara,"Drag:No StartPara")
+ nDDStartParaVisChildCount = 0;
+ if ( pPList->HasVisibleChilds( pPara ) )
+ nDDStartParaVisChildCount += pPList->GetChildCount( pPara );
+
+ nDDStartDepth = pPList->GetParagraph(nDDCurPara)->GetDepth();
+
+ // Scroll-Borders in Win-Koordinaten umrechnen
+ Point aTempPtWin = Point(OL_SCROLL_LRBORDERWIDTHPIX, OL_SCROLL_TBBORDERWIDTHPIX);
+ aTempPtWin = pWindow->PixelToLogic( aTempPtWin );
+ nDDScrollLRBorderWidthWin = aTempPtWin.X();
+ nDDScrollTBBorderWidthWin = aTempPtWin.Y();
+
+ Point aDocPos = ImpGetDocPos( rMEvt.GetPosPixel() );
+
+ // Feststellen, ob Einruecktiefe oder Hoehe geaendert werden soll
+ Point aPosPix( rMEvt.GetPosPixel() );
+ long nDX = aPosPix.X() - aDDStartPosPix.X();
+ if ( nDX < 0 )
+ nDX *= -1;
+ long nDY = aPosPix.Y() - aDDStartPosPix.Y();
+ if ( nDY < 0 )
+ nDY *= -1;
+
+ // MT 07/00: Old implementation was never OK!
+ // Change like in PPT: Only with one Paragraph valid
+ // => possible positions see SvxNumBulletItem
+// if ( nDX > nDY )
+// {
+// bDDChangingDepth = TRUE;
+// ImpSetHorTabArr();
+// nDDCurDepth = ImpGetDepthArrIdx( aDocPos.X() );
+// ePtrStyle = POINTER_ESIZE;
+// }
+// else
+ {
+ bDDChangingDepth = FALSE;
+ ePtrStyle = POINTER_SSIZE;
+ }
+
+ aDDStartPosRef = aCurPosRef;
+ pEditView->HideCursor();
+ ImpShowDDCursor();
+ Region aReg; // fuer MAC
+ Pointer aPtr( ePtrStyle );
+ DragServer::Clear();
+ // !!!HACK selektierten Text in DragServer stellen, solange
+ // Malte noch kein "PutInDragServer" o.ae. zur Verfuegung stellt
+ DragServer::CopyString(pEditView->GetSelected());
+ USHORT nDragOptions = DRAG_ALL;
+ if ( IsReadOnly() )
+ nDragOptions &= ~DRAG_MOVEABLE;
+ pWindow->ExecuteDrag( aPtr, aPtr, nDragOptions, &aReg );
+ ImpHideDDCursor();
+ pEditView->ShowCursor( TRUE );
+ delete pHorTabArrDoc;
+ pHorTabArrDoc = 0;
+ bInDragMode = FALSE;
+}
+
+void OutlinerView::ImpHideDDCursor()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ if ( bDDCursorVisible )
+ {
+ bDDCursorVisible = FALSE;
+ ImpPaintDDCursor();
+ }
+}
+
+void OutlinerView::ImpShowDDCursor()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ if ( !bDDCursorVisible )
+ {
+ bDDCursorVisible = TRUE;
+ ImpPaintDDCursor();
+ }
+}
+
+void OutlinerView::ImpPaintDDCursor()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+
+ Window* pWindow = pEditView->GetWindow();
+ RasterOp eOldOp = pWindow->GetRasterOp();
+ pWindow->SetRasterOp( ROP_INVERT );
+
+ const Color& rOldLineColor = pWindow->GetLineColor();
+ pWindow->SetLineColor( Color( COL_BLACK ) );
+
+ Point aStartPointWin, aEndPointWin;
+ Rectangle aOutputArWin = pEditView->GetOutputArea();
+ Rectangle aVisAreaRef = pEditView->GetVisArea();
+
+ if( bDDChangingDepth )
+ {
+ aStartPointWin.X() = pHorTabArrDoc[ nDDCurDepth ];
+ aStartPointWin.X() += aOutputArWin.Left();
+ aStartPointWin.Y() = aOutputArWin.Top();
+ aEndPointWin.X() = aStartPointWin.X();
+ aEndPointWin.Y() = aOutputArWin.Bottom();
+ }
+ else
+ {
+ ULONG nPara = nDDCurPara;
+ if ( nDDCurPara == LIST_APPEND )
+ {
+ Paragraph* pTemp = pOwner->pParaList->LastVisible();
+ nPara = pOwner->pParaList->GetAbsPos( pTemp );
+ }
+ aStartPointWin = pEditView->GetWindowPosTopLeft((USHORT) nPara );
+ if ( nDDCurPara == LIST_APPEND )
+ {
+ long nHeight = pOwner->pEditEngine->GetTextHeight((USHORT)nPara );
+ aStartPointWin.Y() += nHeight;
+ }
+ aStartPointWin.X() = aOutputArWin.Left();
+ aEndPointWin.Y() = aStartPointWin.Y();
+ aEndPointWin.X() = aOutputArWin.Right();
+ }
+
+ pWindow->DrawLine( aStartPointWin, aEndPointWin );
+ pWindow->SetLineColor( rOldLineColor );
+ pWindow->SetRasterOp( eOldOp );
+}
+
+// Berechnet, ueber welchem Absatz eingefuegt werden muss
+
+ULONG OutlinerView::ImpGetInsertionPara( const Point& rPosPixel )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ ULONG nCurPara = pEditView->GetParagraph( rPosPixel );
+ ParagraphList* pParaList = pOwner->pParaList;
+
+ if ( nCurPara == EE_PARA_NOT_FOUND )
+ nCurPara = LIST_APPEND;
+ else
+ {
+ Point aPosWin = pEditView->GetWindow()->PixelToLogic( rPosPixel );
+ Point aParaPosWin = pEditView->GetWindowPosTopLeft((USHORT)nCurPara);
+ long nHeightRef = pOwner->pEditEngine->GetTextHeight((USHORT)nCurPara);
+ long nParaYOffs = aPosWin.Y() - aParaPosWin.Y();
+
+ if ( nParaYOffs > nHeightRef / 2 )
+ {
+ Paragraph* p = pParaList->GetParagraph( nCurPara );
+ p = pParaList->NextVisible( p );
+ nCurPara = p ? pParaList->GetAbsPos( p ) : LIST_APPEND;
+ }
+ }
+ return nCurPara;
+}
+
+
+void OutlinerView::ImpToggleExpand( Paragraph* pPara )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+
+ USHORT nPara = (USHORT) pOwner->pParaList->GetAbsPos( pPara );
+ pEditView->SetSelection( ESelection( nPara, 0, nPara, 0 ) );
+ ImplExpandOrCollaps( nPara, nPara, !pOwner->pParaList->HasVisibleChilds( pPara ) );
+ pEditView->ShowCursor();
+}
+
+
+void OutlinerView::SetOutliner( Outliner* pOutliner )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pOwner = pOutliner;
+ pEditView->SetEditEngine( pOutliner->pEditEngine );
+}
+
+
+ULONG OutlinerView::Select( Paragraph* pParagraph, BOOL bSelect,
+ BOOL bWithChilds )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+
+ ULONG nPara = pOwner->pParaList->GetAbsPos( pParagraph );
+ USHORT nEnd = 0;
+ if ( bSelect )
+ nEnd = 0xffff;
+
+ ULONG nChildCount = 0;
+ if ( bWithChilds )
+ nChildCount = pOwner->pParaList->GetChildCount( pParagraph );
+
+ ESelection aSel( (USHORT)nPara, 0,(USHORT)(nPara+nChildCount), nEnd );
+ pEditView->SetSelection( aSel );
+ return nChildCount+1;
+}
+
+
+void OutlinerView::SetAttribs( const SfxItemSet& rAttrs )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+
+ BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode( FALSE );
+
+ if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() )
+ pOwner->UndoActionStart( OLUNDO_ATTR );
+
+ ParaRange aSel = ImpGetSelectedParagraphs( FALSE );
+
+ if ( rAttrs.GetItemState( EE_PARA_LRSPACE) == SFX_ITEM_ON )
+ {
+ // Erstmal ohne LRSpace einstellen, damit Konvertierung ins
+ // NumBulletItem nur dann, wenn geaendert.
+ SfxItemSet aSet( rAttrs );
+ aSet.ClearItem( EE_PARA_LRSPACE );
+ pEditView->SetAttribs( aSet );
+
+ // Jetzt ggf. LRSpace in NumBulletItem mergen...
+ EditEngine* pEditEng = pOwner->pEditEngine;
+ const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&) rAttrs.Get( EE_PARA_LRSPACE );
+ for ( USHORT n = aSel.nStartPara; n <= aSel.nEndPara; n++ )
+ {
+ SfxItemSet aAttribs = pEditEng->GetParaAttribs( n );
+ if ( !( rLR == pEditEng->GetParaAttrib( (USHORT)n, EE_PARA_LRSPACE ) ) )
+ {
+ const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&)pEditEng->GetParaAttrib( (USHORT)n, EE_PARA_NUMBULLET );
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( n );
+ if ( rNumBullet.GetNumRule()->GetLevelCount() > pPara->GetDepth() )
+ {
+ SvxNumBulletItem* pNewNumBullet = (SvxNumBulletItem*) rNumBullet.Clone();
+ EditEngine::ImportBulletItem( *pNewNumBullet, pPara->GetDepth(), NULL, &rLR );
+ aAttribs.Put( *pNewNumBullet );
+ delete pNewNumBullet;
+ }
+ }
+ aAttribs.Put( rLR );
+ pEditEng->SetParaAttribs( (USHORT)n, aAttribs );
+ }
+ }
+ else
+ {
+ pEditView->SetAttribs( rAttrs );
+ }
+
+ // Bullet-Texte aktualisieren
+ for( USHORT nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ {
+ pOwner->ImplCheckNumBulletItem( nPara );
+ pOwner->ImplCalcBulletText( nPara, FALSE, FALSE );
+
+ if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() )
+ pOwner->InsertUndo( new OutlinerUndoCheckPara( pOwner, nPara ) );
+ }
+
+ if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() )
+ pOwner->UndoActionEnd( OLUNDO_ATTR );
+
+ pEditView->SetEditEngineUpdateMode( bUpdate );
+}
+
+ParaRange OutlinerView::ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds )
+{
+ DBG_CHKTHIS( OutlinerView, 0 );
+
+ ESelection aSel = pEditView->GetSelection();
+ ParaRange aParas( aSel.nStartPara, aSel.nEndPara );
+ aParas.Adjust();
+
+ // unsichtbare Childs des letzten Parents in Selektion mit aufnehmen
+ if ( bIncludeHiddenChilds )
+ {
+ Paragraph* pLast = pOwner->pParaList->GetParagraph( aParas.nEndPara );
+ if ( pOwner->pParaList->HasHiddenChilds( pLast ) )
+ aParas.nEndPara += (USHORT) pOwner->pParaList->GetChildCount( pLast );
+ }
+ return aParas;
+}
+
+// MT: Name sollte mal geaendert werden!
+void OutlinerView::AdjustDepth( short nDX )
+{
+ Indent( nDX );
+}
+
+void OutlinerView::Indent( short nDiff )
+{
+ DBG_CHKTHIS( OutlinerView, 0 );
+
+ if( !nDiff || ( ( nDiff > 0 ) && ImpCalcSelectedPages( TRUE ) && !pOwner->ImpCanIndentSelectedPages( this ) ) )
+ return;
+
+ BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode( FALSE );
+
+ BOOL bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled();
+
+ if( bUndo )
+ pOwner->UndoActionStart( OLUNDO_DEPTH );
+
+ USHORT nMinDepth = 0xFFFF; // Optimierung: Nicht unnoetig viele Absatze neu berechnen
+
+ ParaRange aSel = ImpGetSelectedParagraphs( TRUE );
+ for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ if ( !nPara && !pPara->GetDepth() )
+ {
+ // Seite 0 nicht einruecken.
+ // Absatz muss neu gepaintet werden (wg. doppeltem Highlight beim Painten der Selektion )
+ pOwner->pEditEngine->QuickMarkInvalid( ESelection( 0, 0, 0, 0 ) );
+ continue;
+ }
+
+ USHORT nOldDepth = pPara->GetDepth();
+ USHORT nNewDepth = nOldDepth + nDiff;
+ if ( ( nDiff < 0 ) && ( nOldDepth < (-nDiff) ) )
+ nNewDepth = 0;
+
+ if ( nNewDepth < pOwner->nMinDepth )
+ nNewDepth = pOwner->nMinDepth;
+ if ( nNewDepth > pOwner->nMaxDepth )
+ nNewDepth = pOwner->nMaxDepth;
+
+ if( nOldDepth < nMinDepth )
+ nMinDepth = nOldDepth;
+ if( nNewDepth < nMinDepth )
+ nMinDepth = nNewDepth;
+
+ if( nOldDepth != nNewDepth )
+ {
+ if ( ( nPara == aSel.nStartPara ) && aSel.nStartPara )
+ {
+ // Sonderfall: Der Vorgaenger eines eingerueckten Absatzes ist
+ // unsichtbar und steht jetzt auf der gleichen Ebene wie der
+ // sichtbare Absatz. In diesem Fall wird der naechste sichtbare
+ // Absatz gesucht und aufgeplustert.
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( aSel.nStartPara );
+ DBG_ASSERT(pPara->IsVisible(),"Selected Paragraph invisible ?!")
+
+ Paragraph* pPrev= pOwner->pParaList->GetParagraph( aSel.nStartPara-1 );
+
+ if( !pPrev->IsVisible() && ( pPrev->GetDepth() == nNewDepth ) )
+ {
+ // Vorgaenger ist eingeklappt und steht auf gleicher Ebene
+ // => naechsten sichtbaren Absatz suchen und expandieren
+ USHORT nDummy;
+ pPrev = pOwner->pParaList->GetParent( pPrev, nDummy );
+ while( !pPrev->IsVisible() )
+ pPrev = pOwner->pParaList->GetParent( pPrev, nDummy );
+
+ pOwner->Expand( pPrev );
+ pOwner->InvalidateBullet( pPrev, pOwner->pParaList->GetAbsPos( pPrev ) );
+ }
+ }
+
+ pOwner->ImplInitDepth( nPara, nNewDepth, TRUE, FALSE );
+ pOwner->ImplCalcBulletText( nPara, FALSE, FALSE );
+
+ if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+ pOwner->ImplSetLevelDependendStyleSheet( nPara );
+
+ // App benachrichtigen
+ pOwner->nDepthChangedHdlPrevDepth = (USHORT)nOldDepth;
+ pOwner->pHdlParagraph = pPara;
+ pOwner->DepthChangedHdl();
+ }
+ }
+
+ // MT 19.08.99: War mal fuer Optimierung (outliner.cxx#1.193),
+ // hat aber zu zuviel Wartungsaufwand / doppelten Funktionen gefuehrt
+ // und zu wenig gebracht:
+ // pOwner->ImpSetBulletTextsFrom( aSel.nStartPara+1, nMinDepth );
+ // Wird jetzt direkt in Schleife mit ImplCalcBulletText() erledigt.
+ // Jetzt fehlen nur noch die folgenden Ansaetze, die davon betroffen sind.
+ USHORT nParas = (USHORT)pOwner->pParaList->GetParagraphCount();
+ for ( USHORT n = aSel.nEndPara+1; n < nParas; n++ )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( n );
+ if ( pPara->GetDepth() < nMinDepth )
+ break;
+ pOwner->ImplCalcBulletText( n, FALSE, FALSE );
+ }
+
+ if ( bUpdate )
+ {
+ pEditView->SetEditEngineUpdateMode( TRUE );
+ pEditView->ShowCursor();
+ }
+
+ if( bUndo )
+ pOwner->UndoActionEnd( OLUNDO_DEPTH );
+}
+
+/* Soll Ersatz fuer AdjustHeight werden
+void OutlinerView::MoveParagraph( USHORT nPara, short nDiff, BOOL bWithChilds )
+{
+ if ( !nDiff || ( ( nDiff < 0 ) && ( (-nDiff) > nPara ) ) )
+ return;
+
+ BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode( FALSE );
+
+ BOOL bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled();
+ if ( bUndo )
+ {
+ pOwner->UndoActionStart( OLUNDO_MOVEPARAGRAPHS );
+ OutlinerUndoMoveParagraphs* pUndo = new OutlinerUndoMoveParagraphs( nPara, nEndPara, nDiff );
+ }
+
+ pOwner->GetBeginMovingHdl().Call( pOwner );
+
+}
+*/
+
+BOOL OutlinerView::AdjustHeight( long nDY )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ if ( !nDY )
+ return TRUE;
+
+ BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode( FALSE );
+
+ OLUndoHeight* pUndo = NULL;
+ if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() )
+ {
+ pOwner->UndoActionStart( OLUNDO_HEIGHT );
+ pUndo = new OLUndoHeight( pOwner );
+ pUndo->nAbsCount = (USHORT)(pOwner->pParaList->GetParagraphCount());
+ pUndo->ppBulletTexts = pOwner->ImpCreateBulletArray();
+ pUndo->pDepths = pOwner->ImpCreateDepthArray();
+ pOwner->InsertUndo( pUndo );
+ }
+
+ pOwner->GetBeginMovingHdl().Call( pOwner );
+
+ ParaRange aSel = ImpGetSelectedParagraphs( TRUE );
+
+ if ( nDY > 0 )
+ {
+ Paragraph* pLastPara = pOwner->pParaList->GetParagraph( aSel.nEndPara );
+ Paragraph* pInsertionPara = pLastPara;
+ nDY++; // Para finden, _vor_ dem wir einfuegen muessen
+ long nDYTemp = nDY;
+ while( nDYTemp && pInsertionPara )
+ {
+ pInsertionPara = pOwner->pParaList->NextVisible( pInsertionPara );
+ nDYTemp--;
+ }
+ ULONG nInsertionPos = LIST_APPEND;
+ if ( pInsertionPara )
+ nInsertionPos = pOwner->pParaList->GetAbsPos( pInsertionPara );
+ if ( aSel.nStartPara != nInsertionPos )
+ {
+ pOwner->pParaList->MoveParagraphs( aSel.nStartPara, nInsertionPos, aSel.Len() );
+ pEditView->MoveParagraphs( Range( aSel.nStartPara, aSel.nEndPara ), (USHORT)nInsertionPos );
+ // pOwner->ImpSetBulletTextsFrom( nChangesStart, 0 );
+ USHORT nChangesStart = Min( (USHORT)aSel.nStartPara, (USHORT)nInsertionPos );
+ USHORT nParas = (USHORT)pOwner->pParaList->GetParagraphCount();
+ for ( USHORT n = nChangesStart; n < nParas; n++ )
+ pOwner->ImplCalcBulletText( n, FALSE, FALSE );
+ }
+ }
+ else
+ {
+ Paragraph* pInsertionPara = pOwner->pParaList->GetParagraph( aSel.nStartPara );
+ long nDYTemp = -1 * nDY;
+ while( nDYTemp && pInsertionPara )
+ {
+ pInsertionPara = pOwner->pParaList->PrevVisible( pInsertionPara );
+ nDYTemp--;
+ }
+ ULONG nInsertionPos = 0;
+ if ( pInsertionPara )
+ nInsertionPos = pOwner->pParaList->GetAbsPos( pInsertionPara );
+ if ( aSel.nStartPara != nInsertionPos )
+ {
+ pOwner->pParaList->MoveParagraphs( aSel.nStartPara, nInsertionPos, aSel.Len() );
+ pEditView->MoveParagraphs( Range( aSel.nStartPara, aSel.nEndPara ), (USHORT)nInsertionPos);
+ // pOwner->ImpSetBulletTextsFrom( nChangesStart, 0 );
+ USHORT nChangesStart = Min( (USHORT)aSel.nStartPara, (USHORT)nInsertionPos );
+ USHORT nParas = (USHORT)pOwner->pParaList->GetParagraphCount();
+ for ( USHORT n = nChangesStart; n < nParas; n++ )
+ pOwner->ImplCalcBulletText( n, FALSE, FALSE );
+ }
+
+ // ersten Absatz immer auf Ebene 0 stellen
+ Paragraph* pStartPara = pOwner->pParaList->GetParagraph( 0 );
+ if( pStartPara->GetDepth() != pOwner->GetMinDepth() )
+ pOwner->SetDepth( pStartPara, pOwner->GetMinDepth() );
+ }
+
+ pEditView->SetEditEngineUpdateMode( bUpdate );
+ pEditView->ShowCursor();
+
+ pOwner->aEndMovingHdl.Call( pOwner );
+
+ if ( pUndo )
+ pOwner->UndoActionEnd( OLUNDO_HEIGHT );
+
+ return TRUE;
+}
+
+void OutlinerView::AdjustDepth( Paragraph* pPara, short nDX, BOOL bWithChilds)
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ ULONG nStartPara = pOwner->pParaList->GetAbsPos( pPara );
+ ULONG nEndPara = nStartPara;
+ if ( bWithChilds )
+ nEndPara += pOwner->pParaList->GetChildCount( pPara );
+ ESelection aSel((USHORT)nStartPara, 0,(USHORT)nEndPara, 0xffff );
+ pEditView->SetSelection( aSel );
+ AdjustDepth( nDX );
+}
+
+
+void OutlinerView::AdjustHeight( Paragraph* pPara, long nDY, BOOL bWithChilds )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ ULONG nStartPara = pOwner->pParaList->GetAbsPos( pPara );
+ ULONG nEndPara = nStartPara;
+ if ( bWithChilds )
+ nEndPara += pOwner->pParaList->GetChildCount( pPara );
+ ESelection aSel( (USHORT)nStartPara, 0, (USHORT)nEndPara, 0xffff );
+ pEditView->SetSelection( aSel );
+ AdjustHeight( nDY );
+}
+
+
+Rectangle OutlinerView::GetVisArea() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetVisArea();
+}
+
+
+Point OutlinerView::ImpGetDocPos( const Point& rPosPixel )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ Rectangle aOutArWin = GetOutputArea();
+ // Position in der OutputArea berechnen
+ Point aCurPosDoc( rPosPixel );
+ aCurPosDoc = pEditView->GetWindow()->PixelToLogic( aCurPosDoc );
+ aCurPosDoc -= aOutArWin.TopLeft();
+ aCurPosDoc += pEditView->GetVisArea().TopLeft();
+ return aCurPosDoc;
+}
+
+
+BOOL __EXPORT OutlinerView::QueryDrop( DropEvent& rDEvt )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ BOOL bRetVal = TRUE;
+
+ if ( IsReadOnly() )
+ return FALSE;
+
+ if ( !bInDragMode )
+ return pEditView->QueryDrop( rDEvt );
+
+ if( rDEvt.IsLeaveWindow() )
+ {
+ ImpHideDDCursor();
+ return FALSE;
+ }
+
+ Point aCurPosDoc = ImpGetDocPos( rDEvt.GetPosPixel() );
+
+ ImpDragScroll( rDEvt.GetPosPixel() );
+
+ if ( bDDChangingDepth )
+ {
+ // NIY
+ }
+ else
+ {
+ ULONG nNewPara = ImpGetInsertionPara( rDEvt.GetPosPixel() );
+ ULONG nMaxPara = nDDStartPara+nDDStartParaVisChildCount+1;
+ Range aRange( nDDStartPara, nMaxPara );
+ if ( aRange.IsInside( nNewPara ) ||
+ (nMaxPara==pOwner->pParaList->GetParagraphCount() &&
+ nNewPara == LIST_APPEND ))
+ bRetVal = FALSE;
+ if ( !bDDCursorVisible || nNewPara != nDDCurPara )
+ {
+ ImpHideDDCursor();
+ nDDCurPara = nNewPara;
+ ImpShowDDCursor();
+ }
+ }
+ return bRetVal;
+}
+
+
+BOOL __EXPORT OutlinerView::Drop( const DropEvent& rDEvt )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+
+ // beim ersten Paint/KeyInput/Drop wird aus einem leeren Outliner ein
+ // Outliner mit genau einem Absatz
+ if( pOwner->bFirstParaIsEmpty )
+ pOwner->Insert( String() );
+
+ if ( !bInDragMode )
+ {
+ // if( !ImpIsRemovingPages() )
+ if ( ImpCalcSelectedPages( FALSE ) && !pOwner->ImpCanDeleteSelectedPages( this ) )
+ return FALSE;
+ // UpdateMode auf False ist im Drop ist verboten
+ pOwner->pEditEngine->SetUpdateMode( FALSE );
+ pOwner->bPasting = TRUE;
+ ESelection aSel = pEditView->GetDropPos();
+ Paragraph* pPara = pOwner->pParaList->GetParagraph(aSel.nStartPara);
+ DBG_ASSERT(pPara,"DropTarget not found");
+ USHORT nOldFlags = pPara->nFlags;
+ pPara->nFlags |= PARAFLAG_DROPTARGET;
+ // leere Absaetze nach dem Drop voll attributieren, da die
+ // EditEngine in diesem Fall die Para-Attribs der Drop-Source
+ // uebernimmt
+ if( pOwner->pEditEngine->GetTextLen( aSel.nStartPara ) == 0 )
+ pPara->nFlags |= PARAFLAG_DROPTARGET_EMPTY;
+ BOOL bDone = pEditView->Drop( rDEvt );
+ pOwner->bPasting = FALSE;
+ if ( !bDone )
+ {
+ pPara->nFlags = nOldFlags;
+ pOwner->pEditEngine->SetUpdateMode( TRUE );
+ return FALSE;
+ }
+ pOwner->ImpDropped( this );
+ pOwner->pEditEngine->SetUpdateMode( TRUE );
+ return TRUE;
+ }
+ ImpHideDDCursor();
+
+ long nStart, nEnd, nDiff;
+
+ if ( bDDChangingDepth )
+ {
+ nEnd = (long)nDDCurDepth;
+ nStart = (long)nDDStartDepth;
+ nDiff = nEnd - nStart;
+ AdjustDepth( (short)nDiff );
+ }
+ else
+ {
+ Paragraph* pTemp = pOwner->pParaList->GetParagraph( nDDStartPara );
+ nStart = (long)(pOwner->pParaList->GetVisPos( pTemp ));
+ if ( nDDCurPara != LIST_APPEND )
+ {
+ pTemp = pOwner->pParaList->GetParagraph( nDDCurPara );
+ nEnd = (long)(pOwner->pParaList->GetVisPos( pTemp ));
+ }
+ else
+ {
+ nEnd = (long)(pOwner->pParaList->GetParagraphCount());
+ nEnd++;
+ }
+ if ( nEnd > nStart )
+ {
+ // Berechnen, um wieviel sichtbare Absaetze der
+ // _Block_ nach unten verschoben werden muss
+ nStart += (long)nDDStartParaVisChildCount;
+ nDiff = nEnd - nStart;
+ nDiff--;
+ }
+ else
+ nDiff = nEnd - nStart;
+
+ AdjustHeight( nDiff );
+ }
+ return TRUE;
+}
+
+
+// MT 05/00: Wofuer dies ImpXXXScroll, sollte das nicht die EditEngine machen???
+
+void OutlinerView::ImpDragScroll( const Point& rPosPix )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ Point aPosWin = pEditView->GetWindow()->PixelToLogic( rPosPix );
+ Rectangle aOutputArWin = pEditView->GetOutputArea();
+ if ( aPosWin.X() <= aOutputArWin.Left() + nDDScrollLRBorderWidthWin)
+ ImpScrollLeft();
+ else if( aPosWin.X() >= aOutputArWin.Right()- nDDScrollLRBorderWidthWin)
+ ImpScrollRight();
+ else if( aPosWin.Y() <= aOutputArWin.Top() + nDDScrollTBBorderWidthWin)
+ ImpScrollUp();
+ else if(aPosWin.Y() >= aOutputArWin.Bottom() - nDDScrollTBBorderWidthWin)
+ ImpScrollDown();
+}
+
+
+void OutlinerView::ImpScrollLeft()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ Rectangle aVisArea( pEditView->GetVisArea() );
+ long nMaxScrollOffs = aVisArea.Left();
+ if ( !nMaxScrollOffs )
+ return;
+ long nScrollOffsRef = (aVisArea.GetWidth() * OL_SCROLL_HOROFFSET) / 100;
+ if ( !nScrollOffsRef )
+ nScrollOffsRef = 1;
+ if ( nScrollOffsRef > nMaxScrollOffs )
+ nScrollOffsRef = nMaxScrollOffs;
+
+ ImpHideDDCursor();
+ Scroll( -nScrollOffsRef, 0 );
+
+ EditStatus aScrollStat;
+ aScrollStat.GetStatusWord() = EE_STAT_HSCROLL;
+ pOwner->pEditEngine->GetStatusEventHdl().Call( &aScrollStat );
+}
+
+
+void OutlinerView::ImpScrollRight()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ Rectangle aVisArea( pEditView->GetVisArea() );
+ long nMaxScrollOffs = pOwner->pEditEngine->GetPaperSize().Width() -
+ aVisArea.Right();
+ if ( !nMaxScrollOffs )
+ return;
+ long nScrollOffsRef = (aVisArea.GetWidth() * OL_SCROLL_HOROFFSET) / 100;
+ if ( !nScrollOffsRef )
+ nScrollOffsRef = 1;
+ if ( nScrollOffsRef > nMaxScrollOffs )
+ nScrollOffsRef = nMaxScrollOffs;
+
+ ImpHideDDCursor();
+ Scroll( nScrollOffsRef, 0 );
+
+ EditStatus aScrollStat;
+ aScrollStat.GetStatusWord() = EE_STAT_HSCROLL;
+ pOwner->pEditEngine->GetStatusEventHdl().Call( &aScrollStat );
+}
+
+
+void OutlinerView::ImpScrollDown()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ Rectangle aVisArea( pEditView->GetVisArea() );
+ Size aDocSize( 0, (long)pOwner->pEditEngine->GetTextHeight() );
+
+ long nMaxScrollOffs = aDocSize.Height();
+ nMaxScrollOffs -= aVisArea.Top();
+ nMaxScrollOffs -= aVisArea.GetHeight();
+ if ( !nMaxScrollOffs )
+ return;
+
+ long nScrollOffsRef = (aVisArea.GetHeight() * OL_SCROLL_VEROFFSET) / 100;
+
+ if ( nScrollOffsRef > nMaxScrollOffs )
+ nScrollOffsRef = nMaxScrollOffs;
+ if ( !nScrollOffsRef )
+ nScrollOffsRef = 1;
+
+ ImpHideDDCursor();
+ Scroll( 0, -nScrollOffsRef );
+
+ EditStatus aScrollStat;
+ aScrollStat.GetStatusWord() = EE_STAT_VSCROLL;
+ pOwner->pEditEngine->GetStatusEventHdl().Call( &aScrollStat );
+}
+
+
+void OutlinerView::ImpScrollUp()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ Rectangle aVisArea( pEditView->GetVisArea() );
+ long nMaxScrollOffs = aVisArea.Top();
+ if ( !nMaxScrollOffs )
+ return;
+ long nScrollOffsRef = (aVisArea.GetHeight() * OL_SCROLL_VEROFFSET) / 100;
+
+
+ if ( nScrollOffsRef > nMaxScrollOffs )
+ nScrollOffsRef = nMaxScrollOffs;
+ if ( !nScrollOffsRef )
+ nScrollOffsRef = 1;
+
+ ImpHideDDCursor();
+ Scroll( 0, nScrollOffsRef );
+
+ EditStatus aScrollStat;
+ aScrollStat.GetStatusWord() = EE_STAT_VSCROLL;
+ pOwner->pEditEngine->GetStatusEventHdl().Call( &aScrollStat );
+}
+
+
+void OutlinerView::Expand()
+{
+ DBG_CHKTHIS( OutlinerView, 0 );
+ ParaRange aParas = ImpGetSelectedParagraphs( FALSE );
+ ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, TRUE );
+}
+
+
+void OutlinerView::Collapse()
+{
+ DBG_CHKTHIS( OutlinerView, 0 );
+ ParaRange aParas = ImpGetSelectedParagraphs( FALSE );
+ ImplExpandOrCollaps( aParas.nStartPara, aParas.nEndPara, FALSE );
+}
+
+
+void OutlinerView::ExpandAll()
+{
+ DBG_CHKTHIS( OutlinerView, 0 );
+ ImplExpandOrCollaps( 0, (USHORT)(pOwner->pParaList->GetParagraphCount()-1), TRUE );
+}
+
+
+void OutlinerView::CollapseAll()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ ImplExpandOrCollaps( 0, (USHORT)(pOwner->pParaList->GetParagraphCount()-1), FALSE );
+}
+
+void OutlinerView::ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand )
+{
+ DBG_CHKTHIS( OutlinerView, 0 );
+
+ BOOL bUpdate = pOwner->GetUpdateMode();
+ pOwner->SetUpdateMode( FALSE );
+
+ BOOL bUndo = !pOwner->IsInUndo() && pOwner->IsUndoEnabled();
+ if( bUndo )
+ pOwner->UndoActionStart( bExpand ? OLUNDO_EXPAND : OLUNDO_COLLAPSE );
+
+ for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ BOOL bDone = bExpand ? pOwner->Expand( pPara ) : pOwner->Collapse( pPara );
+ if( bDone )
+ {
+ // Der Strich unter dem Absatz muss verschwinden...
+ pOwner->pEditEngine->QuickMarkToBeRepainted( nPara );
+ }
+ }
+
+ if( bUndo )
+ pOwner->UndoActionEnd( bExpand ? OLUNDO_EXPAND : OLUNDO_COLLAPSE );
+
+ if ( bUpdate )
+ {
+ pOwner->SetUpdateMode( TRUE );
+ pEditView->ShowCursor();
+ }
+}
+
+
+void OutlinerView::Expand( Paragraph* pPara)
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pOwner->Expand( pPara );
+}
+
+
+void OutlinerView::Collapse( Paragraph* pPara)
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pOwner->Collapse( pPara );
+}
+
+void OutlinerView::InsertText( const OutlinerParaObject& rParaObj )
+{
+ // MT: Wie Paste, nur EditView::Insert, statt EditView::Paste.
+ // Eigentlich nicht ganz richtig, das evtl. Einrueckungen
+ // korrigiert werden muessen, aber das kommt spaeter durch ein
+ // allgemeingueltiges Import.
+ // Dann wird im Inserted gleich ermittelt, was fr eine Einrueckebene
+ // Moegliche Struktur:
+ // pImportInfo mit DestPara, DestPos, nFormat, pParaObj...
+ // Evtl. Problematisch:
+ // EditEngine, RTF => Absplittung des Bereichs, spaeter
+ // zusammenfuehrung
+
+ DBG_CHKTHIS(OutlinerView,0);
+
+ if ( ImpCalcSelectedPages( FALSE ) && !pOwner->ImpCanDeleteSelectedPages( this ) )
+ return;
+
+ pOwner->UndoActionStart( OLUNDO_INSERT );
+
+ pOwner->pEditEngine->SetUpdateMode( FALSE );
+ ULONG nStart, nParaCount;
+ nParaCount = pOwner->pEditEngine->GetParagraphCount();
+ USHORT nSize = ImpInitPaste( nStart );
+ pEditView->InsertText( rParaObj.GetTextObject() );
+ ImpPasted( nStart, nParaCount, nSize);
+ pEditView->SetEditEngineUpdateMode( TRUE );
+
+ pOwner->UndoActionEnd( OLUNDO_INSERT );
+
+ pEditView->ShowCursor( TRUE, TRUE );
+}
+
+
+
+void OutlinerView::Cut()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ if ( !ImpCalcSelectedPages( FALSE ) || pOwner->ImpCanDeleteSelectedPages( this ) )
+ pEditView->Cut();
+}
+
+void OutlinerView::Paste()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ PasteSpecial(); // HACK(SD ruft nicht PasteSpecial auf)
+}
+
+void OutlinerView::PasteSpecial()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ if ( !ImpCalcSelectedPages( FALSE ) || pOwner->ImpCanDeleteSelectedPages( this ) )
+ {
+ pOwner->UndoActionStart( OLUNDO_INSERT );
+
+ pOwner->pEditEngine->SetUpdateMode( FALSE );
+ ULONG nStart, nParaCount;
+ nParaCount = pOwner->pEditEngine->GetParagraphCount();
+ USHORT nSize = ImpInitPaste( nStart );
+ pEditView->PasteSpecial();
+ ImpPasted( nStart, nParaCount, nSize);
+ pEditView->SetEditEngineUpdateMode( TRUE );
+
+ pOwner->UndoActionEnd( OLUNDO_INSERT );
+
+ pEditView->ShowCursor( TRUE, TRUE );
+ }
+}
+
+List* OutlinerView::CreateSelectionList()
+{
+ DBG_CHKTHIS( OutlinerView, 0 );
+
+ ParaRange aParas = ImpGetSelectedParagraphs( TRUE );
+ List* pSelList = new List;
+ for ( USHORT nPara = aParas.nStartPara; nPara <= aParas.nEndPara; nPara++ )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ pSelList->Insert( pPara, LIST_APPEND );
+ }
+ return pSelList;
+}
+
+/*
+XubString OutlinerView::GetStyleSheet()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ SfxStyleFamily aFamily;
+ XubString aName;
+ pEditView->GetStyleSheet( aName, aFamily );
+ return aName;
+}
+*/
+
+SfxStyleSheet* OutlinerView::GetStyleSheet() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetStyleSheet();
+}
+
+void OutlinerView::SetStyleSheet( SfxStyleSheet* pStyle )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SetStyleSheet( pStyle );
+
+ ParaRange aSel = ImpGetSelectedParagraphs( TRUE );
+ for( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ {
+ pOwner->ImplCheckNumBulletItem( nPara );
+ pOwner->ImplCalcBulletText( nPara, FALSE, FALSE );
+ }
+}
+
+Pointer OutlinerView::GetPointer( const Point& rPosPixel )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ MouseTarget eTarget;
+ ImpCheckMousePos( rPosPixel, eTarget );
+ Pointer aPointer = ImpGetMousePointer( eTarget );
+ Point aPos = rPosPixel;
+ aPos = pEditView->GetWindow()->PixelToLogic( aPos );
+ const SvxFieldItem* pField = pEditView->GetField( aPos );
+ if ( pField && pField->GetField() && pField->GetField()->ISA( SvxURLField ) )
+ aPointer = Pointer( POINTER_REFHAND );
+ return aPointer;
+}
+
+
+USHORT OutlinerView::ImpInitPaste( ULONG& rStart )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pOwner->bPasting = TRUE;
+ ESelection aSelection( pEditView->GetSelection() );
+ aSelection.Adjust();
+ rStart = aSelection.nStartPara;
+ USHORT nSize = aSelection.nEndPara - aSelection.nStartPara + 1;
+ return nSize;
+}
+
+
+void OutlinerView::ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize)
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pOwner->bPasting = FALSE;
+ ULONG nCurParaCount = (ULONG)pOwner->pEditEngine->GetParagraphCount();
+ if( nCurParaCount < nPrevParaCount )
+ nSize -= (USHORT)( nPrevParaCount - nCurParaCount );
+ else
+ nSize += (USHORT)( nCurParaCount - nPrevParaCount );
+ pOwner->ImpTextPasted( nStart, nSize );
+}
+
+
+void OutlinerView::Command( const CommandEvent& rCEvt )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+
+ if( ( rCEvt.GetCommand() == COMMAND_STARTDRAG ) && bBeginDragAtMove )
+ {
+ // ImpDrag braucht Abstand von MouseButtonDown-Position
+ Point aPos( pEditView->GetWindow()->GetPointerPosPixel() );
+ aPos = pEditView->GetWindow()->ScreenToOutputPixel( aPos );
+ MouseEvent aEvt( aPos );
+ ImpDrag( aEvt );
+ }
+ else
+ pEditView->Command( rCEvt );
+}
+
+
+void OutlinerView::SelectRange( ULONG nFirst, USHORT nCount )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ ULONG nLast = nFirst+nCount;
+ nCount = (USHORT)pOwner->pParaList->GetParagraphCount();
+ if( nLast <= nCount )
+ nLast = nCount - 1;
+ ESelection aSel( (USHORT)nFirst, 0, (USHORT)nLast, 0xffff );
+ pEditView->SetSelection( aSel );
+}
+
+
+USHORT OutlinerView::ImpCalcSelectedPages( BOOL bIncludeFirstSelected )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+
+ ESelection aSel( pEditView->GetSelection() );
+ aSel.Adjust();
+
+ USHORT nPages = 0;
+ USHORT nFirstPage = 0xFFFF;
+ USHORT nStartPara = aSel.nStartPara;
+ if ( !bIncludeFirstSelected )
+ nStartPara++; // alle nach StartPara kommenden Absaetze werden geloescht
+ for ( USHORT nPara = nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ DBG_ASSERT(pPara, "ImpCalcSelectedPages: ungueltige Selection? ");
+ if( pPara->GetDepth() == 0 )
+ {
+ nPages++;
+ if( nFirstPage == 0xFFFF )
+ nFirstPage = nPara;
+ }
+ }
+
+ if( nPages )
+ {
+ pOwner->nDepthChangedHdlPrevDepth = nPages;
+ pOwner->pHdlParagraph = (Paragraph*)nFirstPage;
+ }
+
+ return nPages;
+}
+
+
+void OutlinerView::ShowBullets( BOOL bShow, BOOL bAffectLevel0 )
+{
+ pOwner->UndoActionStart( OLUNDO_ATTR );
+
+ ESelection aSel( pEditView->GetSelection() );
+ aSel.Adjust();
+
+ BOOL bUpdate = pOwner->pEditEngine->GetUpdateMode();
+ pOwner->pEditEngine->SetUpdateMode( FALSE );
+
+ for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ DBG_ASSERT(pPara, "ShowBullets: ungueltige Selection? ");
+ if( pPara && ( bAffectLevel0 || pPara->GetDepth() ) )
+ {
+ SfxItemSet aAttribs( pOwner->pEditEngine->GetParaAttribs( nPara ) );
+ BOOL bVis = ((const SfxUInt16Item&)aAttribs.Get( EE_PARA_BULLETSTATE )).
+ GetValue() ? TRUE : FALSE;
+ if ( bVis != bShow )
+ {
+ aAttribs.Put( SfxUInt16Item( EE_PARA_BULLETSTATE, bShow ? 1 : 0 ) );
+ pOwner->pEditEngine->SetParaAttribs( nPara, aAttribs );
+ }
+ }
+ }
+ pOwner->pEditEngine->SetUpdateMode( bUpdate );
+
+ pOwner->UndoActionEnd( OLUNDO_ATTR );
+}
+
+void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ BOOL bUpdate = pOwner->GetUpdateMode();
+ pOwner->SetUpdateMode( FALSE );
+ pOwner->UndoActionStart( OLUNDO_ATTR );
+ pEditView->RemoveAttribs( bRemoveParaAttribs, nWhich );
+ if ( bRemoveParaAttribs )
+ {
+ // Ueber alle Absaetze, und Einrueckung und Level einstellen
+ ESelection aSel = pEditView->GetSelection();
+ aSel.Adjust();
+ for ( USHORT nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+ {
+ Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+ pPara->Invalidate();
+
+ SfxItemSet aAttrs( pOwner->pEditEngine->GetParaAttribs( nPara ) );
+ aAttrs.Put( SfxUInt16Item( EE_PARA_OUTLLEVEL, pPara->GetDepth() ) );
+ pOwner->pEditEngine->SetParaAttribs( nPara, aAttrs );
+
+ pOwner->ImplCheckNumBulletItem( (USHORT)nPara );
+ pOwner->ImplCalcBulletText( (USHORT)nPara, FALSE, FALSE );
+ }
+ }
+ pOwner->UndoActionEnd( OLUNDO_ATTR );
+ pOwner->SetUpdateMode( bUpdate );
+}
+
+
+
+ // =====================================================================
+// ====================== Einfache Durchreicher =======================
+// ======================================================================
+
+
+void OutlinerView::InsertText( const XubString& rNew, BOOL bSelect )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ if( pOwner->bFirstParaIsEmpty )
+ pOwner->Insert( String() );
+ pEditView->InsertText( rNew, bSelect );
+}
+
+void OutlinerView::SetVisArea( const Rectangle& rRec )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SetVisArea( rRec );
+}
+
+
+void OutlinerView::SetSelection( const ESelection& rSel )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SetSelection( rSel );
+}
+
+void OutlinerView::SetReadOnly( BOOL bReadOnly )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SetReadOnly( bReadOnly );
+}
+
+BOOL OutlinerView::IsReadOnly() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->IsReadOnly();
+}
+
+BOOL OutlinerView::HasSelection() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->HasSelection();
+}
+
+
+void OutlinerView::ShowCursor( BOOL bGotoCursor )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->ShowCursor( bGotoCursor );
+}
+
+
+void OutlinerView::HideCursor()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->HideCursor();
+}
+
+
+void OutlinerView::SetWindow( Window* pWin )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SetWindow( pWin );
+}
+
+
+Window* OutlinerView::GetWindow() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetWindow();
+}
+
+
+void OutlinerView::SetOutputArea( const Rectangle& rRect )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SetOutputArea( rRect );
+}
+
+
+Rectangle OutlinerView::GetOutputArea() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetOutputArea();
+}
+
+
+XubString OutlinerView::GetSelected() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetSelected();
+}
+
+
+void OutlinerView::RemoveCharAttribs( ULONG nPara, USHORT nWhich)
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->RemoveCharAttribs( (USHORT)nPara, nWhich);
+}
+
+
+void OutlinerView::CompleteAutoCorrect()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->CompleteAutoCorrect();
+}
+
+
+EESpellState OutlinerView::StartSpeller( LanguageType eLang, BOOL bMultiDoc )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->StartSpeller( eLang, bMultiDoc );
+}
+
+
+EESpellState OutlinerView::StartThesaurus( LanguageType eLang )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->StartThesaurus( eLang );
+}
+
+
+USHORT OutlinerView::StartSearchAndReplace( const SvxSearchItem& rSearchItem )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->StartSearchAndReplace( rSearchItem );
+}
+
+
+ESelection OutlinerView::GetSelection()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetSelection();
+}
+
+
+void OutlinerView::Scroll( long nHorzScroll, long nVertScroll )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->Scroll( nHorzScroll, nVertScroll );
+}
+
+
+void OutlinerView::SetControlWord( ULONG nWord )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SetControlWord( nWord );
+}
+
+
+ULONG OutlinerView::GetControlWord() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetControlWord();
+}
+
+
+void OutlinerView::SetAnchorMode( EVAnchorMode eMode )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SetAnchorMode( eMode );
+}
+
+
+EVAnchorMode OutlinerView::GetAnchorMode() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetAnchorMode();
+}
+
+
+void OutlinerView::Undo()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->Undo();
+}
+
+
+void OutlinerView::Redo()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->Redo();
+}
+
+
+void OutlinerView::EnablePaste( BOOL bEnable )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->EnablePaste( bEnable );
+}
+
+
+void OutlinerView::Copy()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->Copy();
+}
+
+
+void OutlinerView::InsertField( const SvxFieldItem& rFld )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->InsertField( rFld );
+}
+
+
+const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetFieldUnderMousePointer();
+}
+
+
+const SvxFieldItem* OutlinerView::GetFieldUnderMousePointer( USHORT& nPara, USHORT& nPos ) const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetFieldUnderMousePointer( nPara, nPos );
+}
+
+
+const SvxFieldItem* OutlinerView::GetFieldAtSelection() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetFieldAtSelection();
+}
+
+void OutlinerView::SetInvalidateMore( USHORT nPixel )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SetInvalidateMore( nPixel );
+}
+
+
+USHORT OutlinerView::GetInvalidateMore() const
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetInvalidateMore();
+}
+
+
+BOOL OutlinerView::IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->IsCursorAtWrongSpelledWord( bMarkIfWrong );
+}
+
+
+BOOL OutlinerView::IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->IsWrongSpelledWordAtPos( rPosPixel, bMarkIfWrong );
+}
+
+
+void OutlinerView::SpellIgnoreWord()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SpellIgnoreWord();
+}
+
+
+void OutlinerView::ExecuteSpellPopup( const Point& rPosPixel, Link* pStartDlg )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->ExecuteSpellPopup( rPosPixel, pStartDlg );
+}
+
+ULONG OutlinerView::Read( SvStream& rInput, EETextFormat eFormat, BOOL bSelect, SvKeyValueIterator* pHTTPHeaderAttrs )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ USHORT nOldParaCount = pEditView->GetEditEngine()->GetParagraphCount();
+ ESelection aOldSel = pEditView->GetSelection();
+ aOldSel.Adjust();
+
+ ULONG nRet = pEditView->Read( rInput, eFormat, bSelect, pHTTPHeaderAttrs );
+
+ // MT 08/00: Hier sollte eigentlich das gleiche wie in PasteSpecial passieren!
+ // Mal anpassen, wenn dieses ImplInitPaste und ImpPasted-Geraffel ueberarbeitet ist.
+
+ long nParaDiff = pEditView->GetEditEngine()->GetParagraphCount() - nOldParaCount;
+ USHORT nChangesStart = aOldSel.nStartPara;
+ USHORT nChangesEnd = nChangesStart + nParaDiff + (aOldSel.nEndPara-aOldSel.nStartPara);
+
+ for ( USHORT n = nChangesStart; n <= nChangesEnd; n++ )
+ {
+ if ( eFormat == EE_FORMAT_BIN )
+ {
+ USHORT nDepth = 0;
+ const SfxItemSet& rAttrs = pOwner->GetParaAttribs( n );
+ const SfxUInt16Item& rLevel = (const SfxUInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL );
+ nDepth = rLevel.GetValue();
+ pOwner->ImplInitDepth( n, nDepth, FALSE );
+ }
+
+ if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+ pOwner->ImplSetLevelDependendStyleSheet( n );
+ }
+
+ if ( eFormat != EE_FORMAT_BIN )
+ {
+ pOwner->ImpFilterIndents( nChangesStart, nChangesEnd );
+ }
+
+ return nRet;
+}
+
+ULONG OutlinerView::Write( SvStream& rOutput, EETextFormat eFormat )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->Write( rOutput, eFormat );
+}
+
+void OutlinerView::SetBackgroundColor( const Color& rColor )
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ pEditView->SetBackgroundColor( rColor );
+}
+
+
+Color OutlinerView::GetBackgroundColor()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetBackgroundColor();
+}
+
+SfxItemSet OutlinerView::GetAttribs()
+{
+ DBG_CHKTHIS(OutlinerView,0);
+ return pEditView->GetAttribs();
+}
diff --git a/svx/source/outliner/paralist.cxx b/svx/source/outliner/paralist.cxx
new file mode 100644
index 0000000000..907c2a7846
--- /dev/null
+++ b/svx/source/outliner/paralist.cxx
@@ -0,0 +1,258 @@
+/*************************************************************************
+ *
+ * $RCSfile: paralist.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include <paralist.hxx>
+#include <outliner.hxx> // nur wegen Paragraph, muss geaendert werden!
+
+DBG_NAME(Paragraph);
+
+Paragraph::Paragraph( USHORT nDDepth )
+ : aBulSize( -1, -1)
+{
+ DBG_CTOR( Paragraph, 0 );
+
+ nDepth = nDDepth;
+ nFlags = 0;
+ bVisible = TRUE;
+}
+
+Paragraph::Paragraph( const Paragraph& rPara )
+ : aBulSize( rPara.aBulSize ), aBulText( rPara.aBulText )
+{
+ DBG_CTOR( Paragraph, 0 );
+
+ nDepth = rPara.nDepth;
+ nFlags = rPara.nFlags;
+ bVisible = rPara.bVisible;
+}
+
+Paragraph::~Paragraph()
+{
+ DBG_DTOR( Paragraph, 0 );
+}
+
+void ParagraphList::Clear( BOOL bDestroyParagraphs )
+{
+ if ( bDestroyParagraphs )
+ {
+ for ( ULONG n = GetParagraphCount(); n; )
+ {
+ Paragraph* pPara = GetParagraph( --n );
+ delete pPara;
+ }
+ }
+ List::Clear();
+}
+
+void ParagraphList::MoveParagraphs( ULONG nStart, ULONG nDest, ULONG nCount )
+{
+ if ( ( nDest < nStart ) || ( nDest >= ( nStart + nCount ) ) )
+ {
+ ULONG n;
+ ParagraphList aParas;
+ for ( n = 0; n < nCount; n++ )
+ {
+ Paragraph* pPara = GetParagraph( nStart );
+ aParas.Insert( pPara, LIST_APPEND );
+ Remove( nStart );
+ }
+
+ if ( nDest > nStart )
+ nDest -= nCount;
+
+ for ( n = 0; n < nCount; n++ )
+ {
+ Paragraph* pPara = aParas.GetParagraph( n );
+ Insert( pPara, nDest++ );
+ }
+ }
+ else
+ DBG_ERROR( "MoveParagraphs: Invalid Parameters" );
+}
+
+Paragraph* ParagraphList::NextVisible( Paragraph* pPara ) const
+{
+ ULONG n = GetAbsPos( pPara );
+
+ Paragraph* p = GetParagraph( ++n );
+ while ( p && !p->IsVisible() )
+ p = GetParagraph( ++n );
+
+ return p;
+}
+
+Paragraph* ParagraphList::PrevVisible( Paragraph* pPara ) const
+{
+ ULONG n = GetAbsPos( pPara );
+
+ Paragraph* p = n ? GetParagraph( --n ) : NULL;
+ while ( p && !p->IsVisible() )
+ p = n ? GetParagraph( --n ) : NULL;
+
+ return p;
+}
+
+Paragraph* ParagraphList::LastVisible() const
+{
+ ULONG n = GetParagraphCount();
+
+ Paragraph* p = n ? GetParagraph( --n ) : NULL;
+ while ( p && !p->IsVisible() )
+ p = n ? GetParagraph( --n ) : NULL;
+
+ return p;
+}
+
+BOOL ParagraphList::HasChilds( Paragraph* pParagraph ) const
+{
+ ULONG n = GetAbsPos( pParagraph );
+ Paragraph* pNext = GetParagraph( ++n );
+ return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) ) ? TRUE : FALSE;
+}
+
+BOOL ParagraphList::HasHiddenChilds( Paragraph* pParagraph ) const
+{
+ ULONG n = GetAbsPos( pParagraph );
+ Paragraph* pNext = GetParagraph( ++n );
+ return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && !pNext->IsVisible() ) ? TRUE : FALSE;
+}
+
+BOOL ParagraphList::HasVisibleChilds( Paragraph* pParagraph ) const
+{
+ ULONG n = GetAbsPos( pParagraph );
+ Paragraph* pNext = GetParagraph( ++n );
+ return ( pNext && ( pNext->GetDepth() > pParagraph->GetDepth() ) && pNext->IsVisible() ) ? TRUE : FALSE;
+}
+
+ULONG ParagraphList::GetChildCount( Paragraph* pParent ) const
+{
+ ULONG nChildCount = 0;
+ ULONG n = GetAbsPos( pParent );
+ Paragraph* pPara = GetParagraph( ++n );
+ while ( pPara && ( pPara->GetDepth() > pParent->GetDepth() ) )
+ {
+ nChildCount++;
+ pPara = GetParagraph( ++n );
+ }
+ return nChildCount;
+}
+
+Paragraph* ParagraphList::GetParent( Paragraph* pParagraph, USHORT& rRelPos ) const
+{
+ rRelPos = 0;
+ ULONG n = GetAbsPos( pParagraph );
+ Paragraph* pPrev = GetParagraph( --n );
+ while ( pPrev && ( pPrev->GetDepth() >= pParagraph->GetDepth() ) )
+ {
+ if ( pPrev->GetDepth() == pParagraph->GetDepth() )
+ rRelPos++;
+ pPrev = GetParagraph( --n );
+ }
+
+ return pPrev;
+}
+
+void ParagraphList::Expand( Paragraph* pParent )
+{
+ ULONG nChildCount = GetChildCount( pParent );
+ ULONG nPos = GetAbsPos( pParent );
+
+ for ( ULONG n = 1; n <= nChildCount; n++ )
+ {
+ Paragraph* pPara = GetParagraph( nPos+n );
+ if ( !( pPara->IsVisible() ) )
+ {
+ pPara->bVisible = TRUE;
+ aVisibleStateChangedHdl.Call( pPara );
+ }
+ }
+}
+
+void ParagraphList::Collapse( Paragraph* pParent )
+{
+ ULONG nChildCount = GetChildCount( pParent );
+ ULONG nPos = GetAbsPos( pParent );
+
+ for ( ULONG n = 1; n <= nChildCount; n++ )
+ {
+ Paragraph* pPara = GetParagraph( nPos+n );
+ if ( pPara->IsVisible() )
+ {
+ pPara->bVisible = FALSE;
+ aVisibleStateChangedHdl.Call( pPara );
+ }
+ }
+}
+
+ULONG ParagraphList::GetVisPos( Paragraph* pPara )
+{
+ ULONG nVisPos = 0;
+ ULONG nPos = GetAbsPos( pPara );
+ for ( ULONG n = 0; n < nPos; n++ )
+ {
+ Paragraph* pPara = GetParagraph( n );
+ if ( pPara->IsVisible() )
+ nVisPos++;
+ }
+ return nVisPos;
+}
diff --git a/svx/source/outliner/paralist.hxx b/svx/source/outliner/paralist.hxx
new file mode 100644
index 0000000000..9dc3ebbdca
--- /dev/null
+++ b/svx/source/outliner/paralist.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * $RCSfile: paralist.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _PARALIST_HXX
+#define _PARALIST_HXX
+
+class Paragraph;
+
+#ifndef _LIST_HXX
+#include <tools/list.hxx>
+#endif
+
+#ifndef _LINK_HXX
+#include <tools/link.hxx>
+#endif
+
+class ParagraphList : private List
+{
+private:
+ Link aVisibleStateChangedHdl;
+
+public:
+ void Clear( BOOL bDestroyParagraphs );
+
+ ULONG GetParagraphCount() const { return List::Count(); }
+ Paragraph* GetParagraph( ULONG nPos ) const { return (Paragraph*)List::GetObject( nPos ); }
+
+ ULONG GetAbsPos( Paragraph* pParent ) const { return List::GetPos( pParent ); }
+ ULONG GetVisPos( Paragraph* pParagraph );
+
+ void Insert( Paragraph* pPara, ULONG nAbsPos = LIST_APPEND ) { List::Insert( pPara, nAbsPos ); }
+ void Remove( ULONG nPara ) { List::Remove( nPara ); }
+ void MoveParagraphs( ULONG nStart, ULONG nDest, ULONG nCount );
+
+ Paragraph* NextVisible( Paragraph* ) const;
+ Paragraph* PrevVisible( Paragraph* ) const;
+ Paragraph* LastVisible() const;
+
+ Paragraph* GetParent( Paragraph* pParagraph, USHORT& rRelPos ) const;
+ BOOL HasChilds( Paragraph* pParagraph ) const;
+ BOOL HasHiddenChilds( Paragraph* pParagraph ) const;
+ BOOL HasVisibleChilds( Paragraph* pParagraph ) const;
+ ULONG GetChildCount( Paragraph* pParagraph ) const;
+
+ void Expand( Paragraph* pParent );
+ void Collapse( Paragraph* pParent );
+
+ void SetVisibleStateChangedHdl( const Link& rLink ) { aVisibleStateChangedHdl = rLink; }
+ Link GetVisibleStateChangedHdl() const { return aVisibleStateChangedHdl; }
+};
+
+#endif
diff --git a/svx/source/stbctrls/insctrl.cxx b/svx/source/stbctrls/insctrl.cxx
new file mode 100644
index 0000000000..fea5824270
--- /dev/null
+++ b/svx/source/stbctrls/insctrl.cxx
@@ -0,0 +1,166 @@
+/*************************************************************************
+ *
+ * $RCSfile: insctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _STATUS_HXX //autogen
+#include <vcl/status.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_INSCTRL_CXX
+
+#include "dialogs.hrc"
+
+#include "insctrl.hxx"
+#include "dialmgr.hxx"
+
+#define PAINT_OFFSET 5
+
+SFX_IMPL_STATUSBAR_CONTROL(SvxInsertStatusBarControl, SfxBoolItem);
+
+// class SvxInsertStatusBarControl ---------------------------------------
+
+SvxInsertStatusBarControl::SvxInsertStatusBarControl( USHORT nId,
+ StatusBar& rStb,
+ SfxBindings& rBind ) :
+
+ SfxStatusBarControl( nId, rStb, rBind ),
+
+ bInsert( TRUE )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxInsertStatusBarControl::~SvxInsertStatusBarControl()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxInsertStatusBarControl::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ if ( SFX_ITEM_AVAILABLE != eState )
+ GetStatusBar().SetItemText( GetId(), String() );
+ else
+ {
+ DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" );
+ SfxBoolItem* pItem = (SfxBoolItem*)pState;
+ bInsert = pItem->GetValue();
+ DrawItemText_Impl();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxInsertStatusBarControl::Click()
+{
+ if ( !GetStatusBar().GetItemText( GetId() ).Len() )
+ return;
+ bInsert = !bInsert;
+ SfxBoolItem aIns( GetId(), bInsert );
+ GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_RECORD, &aIns, 0L );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxInsertStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
+{
+ DrawItemText_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxInsertStatusBarControl::DrawItemText_Impl()
+{
+ USHORT nId = RID_SVXSTR_OVERWRITE_TEXT;
+
+ if ( bInsert )
+ nId = RID_SVXSTR_INSERT_TEXT;
+ GetStatusBar().SetItemText( GetId(), SVX_RESSTR( nId ) );
+}
+
+ULONG SvxInsertStatusBarControl::GetDefItemWidth(const StatusBar& rStb)
+{
+ long nWidth1 = rStb.GetTextWidth(SVX_RESSTR(RID_SVXSTR_OVERWRITE_TEXT));
+ long nWidth2 = rStb.GetTextWidth(SVX_RESSTR(RID_SVXSTR_INSERT_TEXT));
+
+ if(nWidth1<nWidth2)
+ nWidth1=nWidth2;
+
+ return nWidth1+PAINT_OFFSET;
+}
+
+
diff --git a/svx/source/stbctrls/makefile.mk b/svx/source/stbctrls/makefile.mk
new file mode 100644
index 0000000000..173519668a
--- /dev/null
+++ b/svx/source/stbctrls/makefile.mk
@@ -0,0 +1,122 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+#
+#
+#
+#*************************************************************************
+PRJ=..$/..
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=svxpch
+PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
+
+PRJNAME=svx
+TARGET=stbctrls
+AUTOSEG=true
+
+# --- 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 --------------------------------------------------------
+
+.IF "$(header)" == ""
+
+CXXFILES = \
+ insctrl.cxx \
+ zoomctrl.cxx \
+ pszctrl.cxx \
+ selctrl.cxx \
+ modctrl.cxx \
+ $(PROJECTPCHSOURCE).cxx
+
+SRCFILES = \
+ stbctrls.src
+
+SLOFILES= \
+ $(SLO)$/insctrl.obj \
+ $(SLO)$/zoomctrl.obj \
+ $(SLO)$/pszctrl.obj \
+ $(SLO)$/selctrl.obj \
+ $(SLO)$/modctrl.obj
+
+.ENDIF
+
+HXX1TARGET=stbctrls
+HXX1EXT= hxx
+HXX1EXCL= -E:*include*
+HXX1DEPN=\
+ $(INC)$/insctrl.hxx \
+ $(INC)$/zoomctrl.hxx \
+ $(INC)$/pszctrl.hxx \
+ $(INC)$/selctrl.hxx \
+ $(INC)$/modctrl.hxx
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx
new file mode 100644
index 0000000000..69afca0037
--- /dev/null
+++ b/svx/source/stbctrls/modctrl.cxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * $RCSfile: modctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _STATUS_HXX //autogen
+#include <vcl/status.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_MODCTRL_CXX
+
+#include "dialogs.hrc"
+
+#include "modctrl.hxx"
+#include "dialmgr.hxx"
+
+SFX_IMPL_STATUSBAR_CONTROL(SvxModifyControl, SfxBoolItem);
+
+// class SvxModifyControl ------------------------------------------------
+
+SvxModifyControl::SvxModifyControl( USHORT nId,
+ StatusBar& rStb, SfxBindings& rBind ) :
+
+ SfxStatusBarControl( nId, rStb, rBind ),
+
+ bState( TRUE )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxModifyControl::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ if ( SFX_ITEM_AVAILABLE != eState )
+ GetStatusBar().SetItemText( GetId(), String() );
+ else
+ {
+ DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" );
+ SfxBoolItem* pItem = (SfxBoolItem*)pState;
+ bState = pItem->GetValue();
+ DrawItemText_Impl();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxModifyControl::Paint( const UserDrawEvent& rUsrEvt )
+{
+ DrawItemText_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxModifyControl::DrawItemText_Impl()
+{
+ String sMode;
+
+ if ( bState )
+ sMode = '*';
+ GetStatusBar().SetItemText( GetId(), sMode );
+}
+
+ULONG SvxModifyControl::GetDefItemWidth(const StatusBar& rStb)
+{
+ return rStb.GetTextWidth(String::CreateFromAscii("XX"));
+}
+
+
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
new file mode 100644
index 0000000000..2ac33846da
--- /dev/null
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -0,0 +1,486 @@
+/*************************************************************************
+ *
+ * $RCSfile: pszctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <limits.h>
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#ifndef _STATUS_HXX //autogen
+#include <vcl/status.hxx>
+#endif
+#ifndef _MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+#ifndef _SV_IMAGE_HXX
+#include <vcl/image.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXPTITEM_HXX //autogen
+#include <svtools/ptitem.hxx>
+#endif
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.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
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_PSZCTRL_CXX
+
+#include "pszctrl.hxx"
+
+#define PAINT_OFFSET 5
+
+#define ITEMID_SIZE SID_ATTR_SIZE
+#include "sizeitem.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+#include "stbctrls.h"
+
+#include "dialogs.hrc"
+
+// -----------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Funktion, mit der ein metrischer Wert in textueller Darstellung
+ umgewandelt wird.
+
+ nVal ist hier der metrische Wert in der Einheit eUnit.
+
+ [Querverweise]
+
+ <SvxPosSizeStatusBarControl::Paint(const UserDrawEvent&)>
+*/
+
+String GetMetricStr_Impl( long nVal, SfxMapUnit eUnit )
+{
+ // Applikations-Metrik besorgen und setzen
+ FieldUnit eOutUnit = SFX_APP()->GetOptions().GetMetric();
+ GET_MODULE_FIELDUNIT( eOutUnit );
+ FieldUnit eInUnit = FUNIT_TWIP;
+
+ if ( SFX_MAPUNIT_100TH_MM == eUnit )
+ eInUnit = FUNIT_100TH_MM;
+
+ String sMetric;
+ char cSep = GetpApp()->GetAppInternational().GetNumDecimalSep();
+ long nConvVal = MetricField::ConvertValue( nVal * 100, 0L, 0,
+ eInUnit, eOutUnit );
+
+ if ( nConvVal < 0 && ( nConvVal / 100 == 0 ) )
+ sMetric += '-';
+ sMetric += String::CreateFromInt32( nConvVal / 100 );
+
+ if( FUNIT_NONE != eOutUnit )
+ {
+ sMetric += cSep;
+ long nFract = nConvVal % 100;
+
+ if ( nFract < 0 )
+ nFract *= -1;
+ if ( nFract < 10 )
+ sMetric += '0';
+ sMetric += String::CreateFromInt32( nFract );
+ }
+
+ return sMetric;
+}
+
+// -----------------------------------------------------------------------
+
+SFX_IMPL_STATUSBAR_CONTROL(SvxPosSizeStatusBarControl, SvxSizeItem);
+
+// class FunctionPopup_Impl ----------------------------------------------
+
+class FunctionPopup_Impl : public PopupMenu
+{
+public:
+ FunctionPopup_Impl( USHORT nCheck );
+
+ USHORT GetSelected() const { return nSelected; }
+
+private:
+ USHORT nSelected;
+
+ virtual void Select();
+};
+
+// -----------------------------------------------------------------------
+
+FunctionPopup_Impl::FunctionPopup_Impl( USHORT nCheck ) :
+ PopupMenu( ResId( RID_SVXMNU_PSZ_FUNC, DIALOG_MGR() ) ),
+ nSelected( 0 )
+{
+ if (nCheck)
+ CheckItem( nCheck );
+}
+
+// -----------------------------------------------------------------------
+
+void FunctionPopup_Impl::Select()
+{
+ nSelected = GetCurItemId();
+}
+
+// struct SvxPosSizeStatusBarControl_Impl --------------------------------
+
+struct SvxPosSizeStatusBarControl_Impl
+
+/* [Beschreibung]
+
+ Diese Implementations-Struktur der Klasse SvxPosSizeStatusBarControl
+ dient der Entkopplung von "Anderungen vom exportierten Interface sowie
+ der Verringerung von extern sichtbaren Symbolen.
+
+ Eine Instanz exisitiert pro SvxPosSizeStatusBarControl-Instanz
+ f"ur deren Laufzeit.
+*/
+
+{
+ Point aPos; // g"ultig, wenn eine Position angezeigt wird
+ Size aSize; // g"ultig, wenn eine Gr"o/se angezeigt wird
+ String aStr; // g"ultig, wenn ein Text angezeigt wird
+ BOOL bTime; // Zeit und Datum anzeigen? (nichts anzeigen (#65302#))
+ BOOL bSize; // Gr"o/se anzeigen?
+ BOOL bTable; // Tabellenindex anzeigen?
+ BOOL bHasMenu; // StarCalc Popup-Menue anzeigen?
+ USHORT nFunction; // selektierte StarCalc Funktion
+ Image aPosImage; // Image f"ur die Positionsanzeige
+ Image aSizeImage; // Image f"ur die Gr"o/senanzeige
+};
+
+// class SvxPosSizeStatusBarControl ------------------------------------------
+
+/* [Beschreibung]
+
+ Ctor():
+ Anlegen einer Impl-Klassen-Instanz, Default die Zeitanzeige enablen,
+ Images fu"r die Position und Gro"sse laden.
+*/
+
+SvxPosSizeStatusBarControl::SvxPosSizeStatusBarControl( USHORT nId,
+ StatusBar& rStb,
+ SfxBindings& rBind ) :
+ SfxStatusBarControl( nId, rStb, rBind ),
+
+ aPosForwarder( SID_ATTR_POSITION, *this ),
+ aTableForwarder( SID_TABLE_CELL, *this ),
+ aFuncForwarder( SID_PSZ_FUNCTION, *this ),
+ pImp( new SvxPosSizeStatusBarControl_Impl )
+
+{
+ pImp->bTime = TRUE;
+ pImp->bSize = FALSE;
+ pImp->bTable = FALSE;
+ pImp->bHasMenu = FALSE;
+ pImp->nFunction = 0;
+ pImp->aPosImage = Image( ResId( RID_SVXBMP_POSITION, DIALOG_MGR() ) );
+ pImp->aSizeImage = Image( ResId( RID_SVXBMP_SIZE, DIALOG_MGR() ) );
+}
+
+// -----------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Dtor():
+ Pointer auf die Impl-Klasse lo"schen, damit der Timer gestoppt wird.
+*/
+
+SvxPosSizeStatusBarControl::~SvxPosSizeStatusBarControl()
+{
+ delete pImp;
+}
+
+// -----------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ SID_PSZ_FUNCTION aktiviert das Popup-Menue fuer Calc, ansonsten:
+
+ Statusbenachrichtigung;
+ Je nach Item-Typ wird eine bestimmte Anzeige enabled, die anderen disabled.
+
+ NULL/Void SfxPointItem SvxSizeItem SfxStringItem
+ ------------------------------------------------------------------------
+ Zeit TRUE FALSE FALSE FALSE
+ Position FALSE FALSE
+ Gro"sse FALSE TRUE FALSE
+ Text FALSE FALSE TRUE
+
+ Ein anderes Item bewirkt einen Assert, die Zeitanzeige wird enabled.
+*/
+
+void SvxPosSizeStatusBarControl::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ // da Kombi-Controller, immer die aktuelle Id als HelpId setzen
+ // gecachten HelpText vorher l"oschen
+ GetStatusBar().SetHelpText( GetId(), String() );
+ GetStatusBar().SetHelpId( GetId(), nSID );
+
+ if ( nSID == SID_PSZ_FUNCTION )
+ {
+ if ( eState == SFX_ITEM_AVAILABLE )
+ {
+ pImp->bHasMenu = TRUE;
+ if ( pState && pState->ISA(SfxUInt16Item) )
+ pImp->nFunction = ((const SfxUInt16Item*)pState)->GetValue();
+ }
+ else
+ pImp->bHasMenu = FALSE;
+ }
+ else if ( SFX_ITEM_AVAILABLE != eState )
+ {
+ // Datum und Zeit anzeigen
+ pImp->bTime = TRUE;
+ pImp->bSize = FALSE;
+ pImp->bTable = FALSE;
+ }
+ else if ( pState->ISA( SfxPointItem ) )
+ {
+ // Position anzeigen
+ pImp->aPos = ( (SfxPointItem*)pState )->GetValue();
+ pImp->bTime = FALSE;
+ pImp->bTable = FALSE;
+ }
+ else if ( pState->ISA( SvxSizeItem ) )
+ {
+ // Groesse anzeigen
+ pImp->aSize = ( (SvxSizeItem*)pState )->GetSize();
+ pImp->bSize = TRUE;
+ pImp->bTime = FALSE;
+ pImp->bTable = FALSE;
+ }
+ else if ( pState->ISA( SfxStringItem ) )
+ {
+ // String anzeigen (Tabellen-Zelle oder anderes)
+ pImp->aStr = ( (SfxStringItem*)pState )->GetValue();
+ pImp->bTable = TRUE;
+ pImp->bTime = FALSE;
+ pImp->bSize = FALSE;
+ }
+ else
+ {
+ DBG_ERRORFILE( "invalid item type" );
+ // trotzdem Datum und Zeit anzeigen
+ pImp->bTime = TRUE;
+ pImp->bSize = FALSE;
+ pImp->bTable = FALSE;
+ }
+
+ if ( GetStatusBar().AreItemsVisible() )
+ GetStatusBar().SetItemData( GetId(), 0 );
+
+ // nur Strings auch als Text an der StatusBar setzen, damit Tip-Hilfe
+ // funktioniert, wenn der Text zu lang ist.
+ String aText;
+ if ( pImp->bTable )
+ aText = pImp->aStr;
+ GetStatusBar().SetItemText( GetId(), aText );
+}
+
+// -----------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Popup-Menue ausfuehren, wenn per Status enabled
+*/
+
+void SvxPosSizeStatusBarControl::Command( const CommandEvent& rCEvt )
+{
+ if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU && pImp->bHasMenu )
+ {
+ USHORT nSelect = pImp->nFunction;
+ if (!nSelect)
+ nSelect = PSZ_FUNC_NONE;
+ FunctionPopup_Impl aMenu( nSelect );
+ if ( aMenu.Execute( &GetStatusBar(),
+ GetStatusBar().OutputToScreenPixel( rCEvt.GetMousePosPixel() ) ) )
+ {
+ nSelect = aMenu.GetSelected();
+ if (nSelect)
+ {
+ if (nSelect == PSZ_FUNC_NONE)
+ nSelect = 0;
+
+ SfxUInt16Item aItem( SID_PSZ_FUNCTION, nSelect );
+ GetBindings().GetDispatcher()->Execute( SID_PSZ_FUNCTION, SFX_CALLMODE_RECORD, &aItem, 0L );
+ }
+ }
+ }
+ else
+ SfxStatusBarControl::Command( rCEvt );
+}
+
+// -----------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Je nach enableden Anzeigentyp, wird der Wert angezeigt. Vorher wird
+ das Rectangle u"bermalt (gelo"scht).
+*/
+
+void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
+{
+ OutputDevice* pDev = rUsrEvt.GetDevice();
+ DBG_ASSERT( pDev, "no OutputDevice on UserDrawEvent" );
+ const Rectangle& rRect = rUsrEvt.GetRect();
+ StatusBar& rBar = GetStatusBar();
+ Point aItemPos = rBar.GetItemTextPos( GetId() );
+ Color aOldLineColor = pDev->GetLineColor();
+ Color aOldFillColor = pDev->GetFillColor();
+ pDev->SetLineColor();
+ pDev->SetFillColor( pDev->GetBackground().GetColor() );
+
+ if ( pImp->bTime )
+ {
+ // PB: Datum und Uhrzeit nicht mehr ausgeben (#65302#)
+ pDev->DrawRect( rRect );
+ }
+ else if ( !pImp->bTable )
+ {
+ // Position fuer Size-Anzeige berechnen
+ long nSizePosX =
+ rRect.Left() + rRect.GetWidth() / 2 + PAINT_OFFSET;
+ // Metric besorgen
+ SfxMapUnit eUnit = SFX_MAPUNIT_TWIP;
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+ if ( pSh )
+ eUnit = pSh->GetPool().GetMetric( SID_ATTR_SIZE );
+
+ // Position zeichnen
+ Point aPnt = rRect.TopLeft();
+ aPnt.Y() = aItemPos.Y();
+ aPnt.X() += PAINT_OFFSET;
+ pDev->DrawImage( aPnt, pImp->aPosImage );
+ aPnt.X() += pImp->aPosImage.GetSizePixel().Width();
+ aPnt.X() += PAINT_OFFSET;
+ String aStr = GetMetricStr_Impl( pImp->aPos.X(), eUnit );
+ aStr.AppendAscii(" / ");
+ aStr += GetMetricStr_Impl( pImp->aPos.Y(), eUnit );
+ pDev->DrawRect(
+ Rectangle( aPnt, Point( nSizePosX, rRect.Bottom() ) ) );
+ pDev->DrawText( aPnt, aStr );
+
+ // falls verf"ugbar, Gr"osse zeichnen
+ aPnt.X() = nSizePosX;
+
+ if ( pImp->bSize )
+ {
+ pDev->DrawImage( aPnt, pImp->aSizeImage );
+ aPnt.X() += pImp->aSizeImage.GetSizePixel().Width();
+ Point aDrwPnt = aPnt;
+ aPnt.X() += PAINT_OFFSET;
+ aStr = GetMetricStr_Impl( pImp->aSize.Width(), eUnit );
+ aStr.AppendAscii(" x ");
+ aStr += GetMetricStr_Impl( pImp->aSize.Height(), eUnit );
+ pDev->DrawRect( Rectangle( aDrwPnt, rRect.BottomRight() ) );
+ pDev->DrawText( aPnt, aStr );
+ }
+ else
+ pDev->DrawRect( Rectangle( aPnt, rRect.BottomRight() ) );
+ }
+ else if ( pImp->bTable )
+ {
+ pDev->DrawRect( rRect );
+ pDev->DrawText( Point(
+ rRect.Left() + rRect.GetWidth() / 2 - pDev->GetTextWidth( pImp->aStr ) / 2,
+ aItemPos.Y() ), pImp->aStr );
+ }
+
+ pDev->SetLineColor( aOldLineColor );
+ pDev->SetFillColor( aOldFillColor );
+}
+
+// -----------------------------------------------------------------------
+
+ULONG SvxPosSizeStatusBarControl::GetDefItemWidth(const StatusBar& rStb)
+{
+ Image aTmpPosImage( ResId( RID_SVXBMP_POSITION, DIALOG_MGR() ) );
+ Image aTmpSizeImage( ResId( RID_SVXBMP_SIZE, DIALOG_MGR() ) );
+
+ ULONG nWidth=PAINT_OFFSET+aTmpPosImage.GetSizePixel().Width();
+ nWidth+=PAINT_OFFSET+aTmpSizeImage.GetSizePixel().Width();
+ nWidth+=2*(PAINT_OFFSET+rStb.GetTextWidth(String::CreateFromAscii("XXXX,XX / XXXX,XX")));
+
+ return nWidth;
+}
+
+
diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx
new file mode 100644
index 0000000000..551bb10c25
--- /dev/null
+++ b/svx/source/stbctrls/selctrl.cxx
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * $RCSfile: selctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _STATUS_HXX //autogen
+#include <vcl/status.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_SELCTRL_CXX
+
+#include "selctrl.hxx"
+#include "dialmgr.hxx"
+
+#include "dialogs.hrc"
+
+#define PAINT_OFFSET 5
+
+SFX_IMPL_STATUSBAR_CONTROL(SvxSelectionModeControl, SfxUInt16Item);
+
+// class SvxSelectionModeControl -----------------------------------------
+
+SvxSelectionModeControl::SvxSelectionModeControl( USHORT nId,
+ StatusBar& rStb,
+ SfxBindings& rBind ) :
+ SfxStatusBarControl( nId, rStb, rBind ),
+
+ nState( 0 )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSelectionModeControl::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ if ( SFX_ITEM_AVAILABLE != eState )
+ GetStatusBar().SetItemText( GetId(), String() );
+ else
+ {
+ DBG_ASSERT( pState->ISA( SfxUInt16Item ), "invalid item type" );
+ SfxUInt16Item* pItem = (SfxUInt16Item*)pState;
+ nState = pItem->GetValue();
+ DrawItemText_Impl();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSelectionModeControl::Click()
+{
+ if ( !GetStatusBar().GetItemText( GetId() ).Len() )
+ return;
+ nState++;
+ if ( nState > 2 )
+ nState = 0;
+ SfxUInt16Item aState( GetId(), nState );
+ GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_RECORD, &aState, 0L );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSelectionModeControl::Paint( const UserDrawEvent& rUsrEvt )
+{
+ DrawItemText_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxSelectionModeControl::DrawItemText_Impl()
+{
+ String sTxt;
+ USHORT nId = 0;
+
+ switch ( nState )
+ {
+ case 0:
+ nId = RID_SVXSTR_SELMODE_STD;
+ break;
+ case 1:
+ nId = RID_SVXSTR_SELMODE_ER;
+ break;
+ case 2:
+ nId = RID_SVXSTR_SELMODE_ERG;
+ break;
+ default: DBG_ERROR( "invalid selection mode!" );
+ }
+
+ if ( nId )
+ sTxt = SVX_RESSTR( nId );
+ GetStatusBar().SetItemText( GetId(), sTxt );
+}
+
+ULONG SvxSelectionModeControl::GetDefItemWidth(const StatusBar& rStb)
+{
+ long nWidth1 = rStb.GetTextWidth(SVX_RESSTR(RID_SVXSTR_SELMODE_STD));
+ long nWidth2 = rStb.GetTextWidth(SVX_RESSTR(RID_SVXSTR_SELMODE_ER));
+ long nWidth3 = rStb.GetTextWidth(SVX_RESSTR(RID_SVXSTR_SELMODE_ERG));
+
+ if(nWidth1<nWidth2)
+ nWidth1=nWidth2;
+
+ if(nWidth1<nWidth3)
+ nWidth1=nWidth3;
+
+ return nWidth1+PAINT_OFFSET;
+}
+
+
diff --git a/svx/source/stbctrls/stbctrls.h b/svx/source/stbctrls/stbctrls.h
new file mode 100644
index 0000000000..e574e39ca2
--- /dev/null
+++ b/svx/source/stbctrls/stbctrls.h
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * $RCSfile: stbctrls.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVX_STBCTRLS_H
+#define _SVX_STBCTRLS_H
+
+// defines ------------------------------------------------------------------
+
+#define ZOOM_200 1
+#define ZOOM_150 2
+#define ZOOM_100 3
+#define ZOOM_75 4
+#define ZOOM_50 5
+
+#define ZOOM_OPTIMAL 6
+#define ZOOM_PAGE_WIDTH 7
+#define ZOOM_WHOLE_PAGE 8
+
+// IDs wie SUBTOTAL_FUNC im Calc
+
+#define PSZ_FUNC_AVG 1
+#define PSZ_FUNC_COUNT2 3
+#define PSZ_FUNC_COUNT 2
+#define PSZ_FUNC_MAX 4
+#define PSZ_FUNC_MIN 5
+#define PSZ_FUNC_SUM 9
+#define PSZ_FUNC_NONE 16
+
+
+#endif
+
diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src
new file mode 100644
index 0000000000..ae2a438e49
--- /dev/null
+++ b/svx/source/stbctrls/stbctrls.src
@@ -0,0 +1,565 @@
+/*************************************************************************
+ *
+ * $RCSfile: stbctrls.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "dialogs.hrc"
+#include "helpid.hrc"
+#include "stbctrls.h"
+ // pragma ----------------------------------------------------------------
+
+ // Strings ---------------------------------------------------------------
+String RID_SVXSTR_INSERT_TEXT
+{
+ // 'Einf"ugen' bzw. 'Insert' abgek"urzt auf h"ochstens 5 Zeichen
+ Text = "EINFG" ;
+ Text [ English ] = "INSRT" ;
+ Text [ norwegian ] = "SETT INN INSRT" ;
+ Text [ italian ] = "INS" ;
+ Text [ portuguese_brazilian ] = "INSERIR" ;
+ Text [ portuguese ] = "INSER" ;
+ Text [ finnish ] = "LIS" ;
+ Text [ danish ] = "IND" ;
+ Text [ french ] = "INS" ;
+ Text [ swedish ] = "INFGA" ;
+ Text [ dutch ] = "INSRT" ;
+ Text [ spanish ] = "INSERT" ;
+ Text [ english_us ] = "INSRT" ;
+ Text[ chinese_simplified ] = "²åÈë";
+ Text[ russian ] = "ÂÑÒÀÂÊ";
+ Text[ polish ] = "WSTAW";
+ Text[ japanese ] = "‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤J";
+ Text[ arabic ] = "ÅÏÑÇÌ";
+ Text[ dutch ] = "INSRT";
+ Text[ chinese_simplified ] = "²åÈë";
+ Text[ greek ] = "ÅÉÓÁÃÙÃÇ";
+ Text[ korean ] = "»ðÀÔ";
+ Text[ turkish ] = "EKLE";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_OVERWRITE_TEXT
+{
+ // '"Uberschreiben' bzw. 'Overwrite' abgek"urzt auf h"ochstens 5 Zeichen
+ Text = "ÜBER" ;
+ Text [ English ] = "OVER" ;
+ Text [ norwegian ] = "OVER" ;
+ Text [ italian ] = "SSC" ;
+ Text [ portuguese_brazilian ] = "SOBRE" ;
+ Text [ portuguese ] = "SUB" ;
+ Text [ finnish ] = "KORV" ;
+ Text [ danish ] = "OVR" ;
+ Text [ french ] = "RFP" ;
+ Text [ swedish ] = "ÖVER" ;
+ Text [ dutch ] = "OVER" ;
+ Text [ spanish ] = "SOBRE" ;
+ Text [ english_us ] = "OVER" ;
+ Text[ chinese_simplified ] = "¸²Ð´";
+ Text[ russian ] = "ÇÀÌÅÍÀ";
+ Text[ polish ] = "NAD";
+ Text[ japanese ] = "ã‘‚«";
+ Text[ chinese_traditional ] = "Âмg";
+ Text[ arabic ] = "ÝæÞ";
+ Text[ dutch ] = "OVER";
+ Text[ chinese_simplified ] = "¸²Ð´";
+ Text[ greek ] = "ÁÍÔÉÊÁÔ";
+ Text[ korean ] = "ÃÊ°ú";
+ Text[ turkish ] = "ÜZR";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_SELMODE_STD
+{
+ // 'Standard' abgek"urzt auf h"ochstens 3 Zeichen
+ TEXT = "STD" ;
+ TEXT [ English ] = "STD" ;
+ Text [ portuguese ] = "PAD" ;
+ Text [ english_us ] = "STD" ;
+ Text [ portuguese_brazilian ] = "STD" ;
+ Text [ swedish ] = "STD" ;
+ Text [ danish ] = "STD" ;
+ Text [ italian ] = "STD" ;
+ Text [ spanish ] = "STD" ;
+ Text [ french ] = "STD" ;
+ Text [ dutch ] = "STD" ;
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ russian ] = "ÑÒÀÍ";
+ Text[ polish ] = "STD";
+ Text[ japanese ] = "•W€";
+ Text[ chinese_traditional ] = "¼Ð·Ç";
+ Text[ arabic ] = "ÞíÇÓí";
+ Text[ dutch ] = "STD";
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ greek ] = "ÐÑÏÅÐ";
+ Text[ korean ] = "Ç¥ÁØ";
+ Text[ turkish ] = "STD";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_SELMODE_ER
+{
+ // 'Erweitert' bzw. 'Extended' abgek"urzt auf h"ochstens 3 Zeichen
+ TEXT = "ER" ;
+ TEXT [ English ] = "EXT" ;
+ TEXT [ norwegian ] = "GÅ UT EXT" ;
+ TEXT [ italian ] = "EXT" ;
+ TEXT [ portuguese_brazilian ] = "EXT" ;
+ TEXT [ portuguese ] = "EXT" ;
+ TEXT [ finnish ] = "LAAJ" ;
+ TEXT [ danish ] = "UDV" ;
+ TEXT [ french ] = "EXT" ;
+ TEXT [ swedish ] = "UTV" ;
+ TEXT [ dutch ] = "EXT" ;
+ TEXT [ spanish ] = "EXT" ;
+ TEXT [ english_us ] = "EXT" ;
+ TEXT[ chinese_simplified ] = "À©Õ¹";
+ TEXT[ russian ] = "ÐÀÑØ";
+ TEXT[ polish ] = "ROZ";
+ TEXT[ japanese ] = "Šg’£";
+ TEXT[ chinese_traditional ] = "ÂX®i";
+ TEXT[ arabic ] = "ÊæÓíÚ";
+ TEXT[ dutch ] = "EXT";
+ TEXT[ chinese_simplified ] = "À©Õ¹";
+ TEXT[ greek ] = "ÅÐÅÊÔ";
+ TEXT[ korean ] = "È®Àå";
+ TEXT[ turkish ] = "UZN";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_SVXSTR_SELMODE_ERG
+{
+ // 'Erg"anzend' bzw. 'Added' abgek"urzt auf h"ochstens 3 Zeichen
+ TEXT = "ERG" ;
+ TEXT [ English ] = "ADD" ;
+ TEXT [ norwegian ] = "LEGG TIL" ;
+ TEXT [ italian ] = "RIS" ;
+ TEXT [ portuguese_brazilian ] = "ACR" ;
+ TEXT [ portuguese ] = "ADI" ;
+ TEXT [ finnish ] = "LIS" ;
+ TEXT [ danish ] = "TLF" ;
+ TEXT [ french ] = "AJT" ;
+ TEXT [ swedish ] = "TLF" ;
+ TEXT [ dutch ] = "ADD" ;
+ TEXT [ spanish ] = "AGR" ;
+ TEXT [ english_us ] = "ADD" ;
+ TEXT[ chinese_simplified ] = "²¹³ä";
+ TEXT[ russian ] = "ÄÎÁÀÂ";
+ TEXT[ polish ] = "DODAJ";
+ TEXT[ japanese ] = "Š®¬";
+ TEXT[ chinese_traditional ] = "¸É¥R";
+ TEXT[ arabic ] = "ÊßãáÉ";
+ TEXT[ dutch ] = "ADD";
+ TEXT[ chinese_simplified ] = "²¹³ä";
+ TEXT[ greek ] = "ÐÑÏÓÈ";
+ TEXT[ korean ] = "º¸Ãæ";
+ TEXT[ turkish ] = "TAML";
+ TEXT[ language_user1 ] = " ";
+};
+ // PopupMenu -------------------------------------------------------------
+Menu RID_SVXMNU_ZOOM
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = ZOOM_200 ;
+ HelpId = HID_MNU_ZOOM_200 ;
+ Text = "200%" ;
+ };
+ MenuItem
+ {
+ Identifier = ZOOM_150 ;
+ HelpId = HID_MNU_ZOOM_150 ;
+ Text = "150%" ;
+ };
+ MenuItem
+ {
+ Identifier = ZOOM_100 ;
+ HelpId = HID_MNU_ZOOM_100 ;
+ Text = "100%" ;
+ };
+ MenuItem
+ {
+ Identifier = ZOOM_75 ;
+ HelpId = HID_MNU_ZOOM_75 ;
+ Text = "75%" ;
+ };
+ MenuItem
+ {
+ Identifier = ZOOM_50 ;
+ HelpId = HID_MNU_ZOOM_50 ;
+ Text = "50%" ;
+ };
+ MenuItem
+ {
+ Identifier = ZOOM_OPTIMAL ;
+ HelpId = HID_MNU_ZOOM_OPTIMAL ;
+ Text = "Optimal" ;
+ Text [ English ] = "Optimal" ;
+ text [ english_us ] = "Optimal" ;
+ Text [ portuguese ] = "Optimizado" ;
+ Text [ portuguese_brazilian ] = "Optimal" ;
+ Text [ swedish ] = "Optimal" ;
+ Text [ danish ] = "Optimal" ;
+ Text [ italian ] = "Ottimale" ;
+ Text [ spanish ] = "Óptimo" ;
+ Text [ french ] = "Optimal" ;
+ Text [ dutch ] = "Optimaal" ;
+ Text[ chinese_simplified ] = "×î¼Ñ";
+ Text[ russian ] = "Îïòèìàëüíî";
+ Text[ polish ] = "Optymalny";
+ Text[ japanese ] = "Å“K";
+ Text[ chinese_traditional ] = "³Ì¨Î";
+ Text[ arabic ] = "ÇáÃãËá";
+ Text[ dutch ] = "Optimaal";
+ Text[ chinese_simplified ] = "×î¼Ñ";
+ Text[ greek ] = "ÂÝëôéóôá";
+ Text[ korean ] = "ÃÖÀû";
+ Text[ turkish ] = "Optimum";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ZOOM_PAGE_WIDTH ;
+ HelpId = HID_MNU_ZOOM_PAGE_WIDTH ;
+ Text = "Seitenbreite" ;
+ Text [ ENGLISH ] = "Page width" ;
+ Text [ norwegian ] = "Sidebredde" ;
+ Text [ italian ] = "Larghezza pagina" ;
+ Text [ portuguese_brazilian ] = "Largura de página" ;
+ Text [ portuguese ] = "Larg. de página" ;
+ Text [ finnish ] = "Sivun leveys" ;
+ Text [ danish ] = "Sidebredde" ;
+ Text [ french ] = "Largeur de page" ;
+ Text [ swedish ] = "Sidbredd" ;
+ Text [ dutch ] = "Paginabreedte" ;
+ Text [ spanish ] = "Ancho de página" ;
+ Text [ english_us ] = "Page Width" ;
+ Text[ chinese_simplified ] = "Ò³¿í";
+ Text[ russian ] = "Ïî øèðèíå ñòðàíèöû";
+ Text[ polish ] = "SzerokoϾ strony";
+ Text[ japanese ] = "Íß°¼Þ•";
+ Text[ chinese_traditional ] = "­¶¼e";
+ Text[ arabic ] = "ÚÑÖ ÇáÕÝÍÉ";
+ Text[ dutch ] = "Paginabreedte";
+ Text[ chinese_simplified ] = "Ò³¿í";
+ Text[ greek ] = "ÐëÜôïò óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö ³Êºñ";
+ Text[ turkish ] = "Sayfa geniþliði";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ZOOM_WHOLE_PAGE ;
+ HelpId = HID_MNU_ZOOM_WHOLE_PAGE ;
+ Text = "Ganze Seite" ;
+ Text [ ENGLISH ] = "Whole page" ;
+ Text [ norwegian ] = "Hele siden" ;
+ Text [ italian ] = "Pagina intera" ;
+ Text [ portuguese_brazilian ] = "Página inteira" ;
+ Text [ portuguese ] = "Página inteira" ;
+ Text [ finnish ] = "Koko sivu" ;
+ Text [ danish ] = "Hele siden" ;
+ Text [ french ] = "Page entière" ;
+ Text [ swedish ] = "Hela sidan" ;
+ Text [ dutch ] = "Hele pagina" ;
+ Text [ spanish ] = "Toda la página" ;
+ Text [ english_us ] = "Entire Page" ;
+ Text[ chinese_simplified ] = "ÕûÒ³";
+ Text[ russian ] = "Íà âñþ ñòðàíèöó";
+ Text[ polish ] = "Ca³a strona";
+ Text[ japanese ] = "Íß°¼Þ‘S‘Ì";
+ Text[ chinese_traditional ] = "¾ã­¶";
+ Text[ arabic ] = "ÕÝÍÉ ßÇãáÉ";
+ Text[ dutch ] = "Hele pagina";
+ Text[ chinese_simplified ] = "ÕûÒ³";
+ Text[ greek ] = "Ïëüêëçñç óåëßäá";
+ Text[ korean ] = "ÆäÀÌÁö Àüü";
+ Text[ turkish ] = "Tüm sayfa";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
+ // Funktionsauswahl auf dem SvxPosSizeStatusBarControl fuer Calc
+Menu RID_SVXMNU_PSZ_FUNC
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = PSZ_FUNC_AVG ;
+ HelpId = HID_MNU_FUNC_AVG ;
+ Text = "Mittelwert" ;
+ Text [ ENGLISH ] = "Average" ;
+ Text [ english_us ] = "Average" ;
+ Text [ italian ] = "Valore medio" ;
+ Text [ spanish ] = "Promedio" ;
+ Text [ french ] = "Moyenne" ;
+ Text [ dutch ] = "Gemiddelde" ;
+ Text [ swedish ] = "Medelvärde" ;
+ Text [ danish ] = "Middel" ;
+ Text [ portuguese_brazilian ] = "Mittelwert" ;
+ Text [ portuguese ] = "Valor médio" ;
+ Text[ chinese_simplified ] = "ƽ¾ùÖµ";
+ Text[ russian ] = "Ñðåäíåå çíà÷åíèå";
+ Text[ polish ] = "Œrednia wartoœæ";
+ Text[ japanese ] = "•½‹Ï’l";
+ Text[ chinese_traditional ] = "¥­§¡­È";
+ Text[ arabic ] = "ÇáãÚÏá";
+ Text[ dutch ] = "Gemiddelde";
+ Text[ chinese_simplified ] = "ƽ¾ùÖµ";
+ Text[ greek ] = "ÌÝóç ôéìÞ";
+ Text[ korean ] = "Áß°£°ª";
+ Text[ turkish ] = "Ortalama";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = PSZ_FUNC_COUNT2 ;
+ HelpId = HID_MNU_FUNC_COUNT2 ;
+ Text = "Anzahl2" ;
+ Text [ ENGLISH ] = "Count2" ;
+ Text [ dutch ] = "Aantal2" ;
+ Text [ english_us ] = "CountA" ;
+ Text [ italian ] = "Numero2" ;
+ Text [ spanish ] = "Cantidad2" ;
+ Text [ french ] = "Nombre2" ;
+ Text [ swedish ] = "Antal2" ;
+ Text [ danish ] = "Tælv" ;
+ Text [ portuguese ] = "Contar" ;
+ Text [ portuguese_brazilian ] = "Anzahl2" ;
+ Text[ chinese_simplified ] = "ÊýÄ¿2";
+ Text[ russian ] = "Êîëè÷åñòâî2";
+ Text[ polish ] = "Liczba2";
+ Text[ japanese ] = "”2";
+ Text[ chinese_traditional ] = "¼Æ¥Ø2";
+ Text[ arabic ] = "ÚÏÏ2";
+ Text[ dutch ] = "Aantal2";
+ Text[ chinese_simplified ] = "ÊýÄ¿2";
+ Text[ greek ] = "ÐëÞèïò2";
+ Text[ korean ] = "¼ö2";
+ Text[ turkish ] = "Sayý2";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = PSZ_FUNC_COUNT ;
+ HelpId = HID_MNU_FUNC_COUNT ;
+ Text = "Anzahl" ;
+ Text [ ENGLISH ] = "Count" ;
+ Text [ dutch ] = "Aantal" ;
+ Text [ english_us ] = "Count" ;
+ Text [ italian ] = "Numero" ;
+ Text [ spanish ] = "Cantidad" ;
+ Text [ french ] = "Nombre" ;
+ Text [ swedish ] = "Antal" ;
+ Text [ danish ] = "Tæl" ;
+ Text [ portuguese ] = "Quantidade" ;
+ Text [ portuguese_brazilian ] = "Anzahl" ;
+ Text[ chinese_simplified ] = "ÊýÄ¿";
+ Text[ russian ] = "Êîëè÷åñòâî";
+ Text[ polish ] = "Liczba";
+ Text[ japanese ] = "”";
+ Text[ chinese_traditional ] = "¼Æ¥Ø";
+ Text[ arabic ] = "ÚÏÏ";
+ Text[ dutch ] = "Aantal";
+ Text[ chinese_simplified ] = "ÊýÄ¿";
+ Text[ greek ] = "ÐëÞèïò";
+ Text[ korean ] = "¼ö";
+ Text[ turkish ] = "Sayý";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = PSZ_FUNC_MAX ;
+ HelpId = HID_MNU_FUNC_MAX ;
+ Text = "Maximum" ;
+ Text [ ENGLISH ] = "Maximum" ;
+ Text [ dutch ] = "Maximum" ;
+ Text [ english_us ] = "Maximum" ;
+ Text [ italian ] = "Massimo" ;
+ Text [ spanish ] = "Máximo" ;
+ Text [ french ] = "Maximum" ;
+ Text [ swedish ] = "Maximum" ;
+ Text [ danish ] = "Maksimum" ;
+ Text [ portuguese ] = "Máximo" ;
+ Text [ portuguese_brazilian ] = "Maximum" ;
+ Text[ chinese_simplified ] = "×î´ó";
+ Text[ russian ] = "Ìàêñèìóì";
+ Text[ polish ] = "Maksimum";
+ Text[ japanese ] = "Å‘å’l";
+ Text[ chinese_traditional ] = "³Ì¤j";
+ Text[ arabic ] = "ÇáÍÏ ÇáÃÞÕì";
+ Text[ dutch ] = "Maximum";
+ Text[ chinese_simplified ] = "×î´ó";
+ Text[ greek ] = "ÌÝãéóôï";
+ Text[ korean ] = "ÃÖ´ë";
+ Text[ turkish ] = "Azami";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = PSZ_FUNC_MIN ;
+ HelpId = HID_MNU_FUNC_MIN ;
+ Text = "Minimum" ;
+ Text [ ENGLISH ] = "Minimum" ;
+ Text [ dutch ] = "Minimum" ;
+ Text [ english_us ] = "Minimum" ;
+ Text [ italian ] = "Minimo" ;
+ Text [ spanish ] = "Mínimo" ;
+ Text [ french ] = "Minimum" ;
+ Text [ swedish ] = "Minimum" ;
+ Text [ danish ] = "Minimum" ;
+ Text [ portuguese ] = "Mínimo" ;
+ Text [ portuguese_brazilian ] = "Minimum" ;
+ Text[ chinese_simplified ] = "×îС";
+ Text[ russian ] = "Ìèíèìóì";
+ Text[ polish ] = "Minimum";
+ Text[ japanese ] = "Ŭ";
+ Text[ chinese_traditional ] = "³Ì¤p";
+ Text[ arabic ] = "ÇáÍÏ ÇáÃÏäì";
+ Text[ dutch ] = "Minimum";
+ Text[ chinese_simplified ] = "×îС";
+ Text[ greek ] = "ÅëÜ÷éóôï";
+ Text[ korean ] = "ÃÖ¼Ò";
+ Text[ turkish ] = "Asgari";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = PSZ_FUNC_SUM ;
+ HelpId = HID_MNU_FUNC_SUM ;
+ Text = "Summe" ;
+ Text [ ENGLISH ] = "Sum" ;
+ Text [ dutch ] = "Som" ;
+ Text [ english_us ] = "Sum" ;
+ Text [ italian ] = "Somma" ;
+ Text [ spanish ] = "Suma" ;
+ Text [ french ] = "Somme" ;
+ Text [ swedish ] = "Summa" ;
+ Text [ danish ] = "Sum" ;
+ Text [ portuguese ] = "Soma" ;
+ Text [ portuguese_brazilian ] = "Summe" ;
+ Text[ chinese_simplified ] = "×ܼÆ";
+ Text[ russian ] = "Ñóììà";
+ Text[ polish ] = "Suma";
+ Text[ japanese ] = "‡Œv";
+ Text[ chinese_traditional ] = "¤p­p";
+ Text[ arabic ] = "ÇáãÌãæÚ";
+ Text[ dutch ] = "Som";
+ Text[ chinese_simplified ] = "×ܼÆ";
+ Text[ greek ] = "¢èñïéóìá";
+ Text[ korean ] = "ÇÕ°è";
+ Text[ turkish ] = "Toplam";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = PSZ_FUNC_NONE ;
+ HelpId = HID_MNU_FUNC_NONE ;
+ Text = "Keine" ;
+ Text [ ENGLISH ] = "None" ;
+ Text [ dutch ] = "Geen" ;
+ Text [ english_us ] = "None" ;
+ Text [ italian ] = "Senza" ;
+ Text [ spanish ] = "Ninguno" ;
+ Text [ french ] = "Aucun(e)" ;
+ Text [ swedish ] = "Inga" ;
+ Text [ danish ] = "Ingen" ;
+ Text [ portuguese ] = "Nenhuma" ;
+ Text [ portuguese_brazilian ] = "Keine" ;
+ Text[ chinese_simplified ] = "ÎÞ";
+ Text[ russian ] = "Áåç";
+ Text[ polish ] = "Brak";
+ Text[ japanese ] = "‚È‚µ";
+ Text[ chinese_traditional ] = "µL";
+ Text[ arabic ] = "ÈÏæä";
+ Text[ dutch ] = "Geen";
+ Text[ chinese_simplified ] = "ÎÞ";
+ Text[ greek ] = "ÊáíÝíá";
+ Text[ korean ] = "¾øÀ½";
+ Text[ turkish ] = "Yok";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
+ // Images ----------------------------------------------------------------
+Image RID_SVXBMP_POSITION
+{
+ ImageBitmap = Bitmap
+ {
+ File = "sc10223.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+};
+Image RID_SVXBMP_SIZE
+{
+ ImageBitmap = Bitmap
+ {
+ File = "sc10224.bmp" ;
+ };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+};
diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx
new file mode 100644
index 0000000000..17731b13c1
--- /dev/null
+++ b/svx/source/stbctrls/zoomctrl.cxx
@@ -0,0 +1,257 @@
+/*************************************************************************
+ *
+ * $RCSfile: zoomctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#ifndef _STATUS_HXX //autogen
+#include <vcl/status.hxx>
+#endif
+#ifndef _MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#pragma hdrstop
+
+#include "dialogs.hrc"
+
+#include "zoomctrl.hxx"
+#include "zoom.hxx"
+#include "zoomitem.hxx"
+#include "stbctrls.h"
+#include "dialmgr.hxx"
+
+SFX_IMPL_STATUSBAR_CONTROL(SvxZoomStatusBarControl,SvxZoomItem);
+
+// class ZoomPopup_Impl --------------------------------------------------
+
+class ZoomPopup_Impl : public PopupMenu
+{
+public:
+ ZoomPopup_Impl( USHORT nZ, USHORT nValueSet );
+
+ USHORT GetZoom() const { return nZoom; }
+ USHORT GetCurId() const { return nCurId; }
+
+private:
+ USHORT nZoom;
+ USHORT nCurId;
+
+ virtual void Select();
+};
+
+// -----------------------------------------------------------------------
+
+ZoomPopup_Impl::ZoomPopup_Impl( USHORT nZ, USHORT nValueSet )
+
+: PopupMenu( ResId( RID_SVXMNU_ZOOM, DIALOG_MGR() ) ),
+
+ nZoom( nZ )
+{
+ static USHORT aTable[] =
+ {
+ SVX_ZOOM_ENABLE_50, ZOOM_50,
+ SVX_ZOOM_ENABLE_100, ZOOM_100,
+ SVX_ZOOM_ENABLE_150, ZOOM_150,
+ SVX_ZOOM_ENABLE_200, ZOOM_200,
+ SVX_ZOOM_ENABLE_OPTIMAL, ZOOM_OPTIMAL,
+ SVX_ZOOM_ENABLE_WHOLEPAGE, ZOOM_WHOLE_PAGE,
+ SVX_ZOOM_ENABLE_PAGEWIDTH, ZOOM_PAGE_WIDTH
+ };
+
+ for ( USHORT nPos = 0; nPos < sizeof(aTable) / sizeof(USHORT); nPos += 2 )
+ if ( ( aTable[nPos] != ( aTable[nPos] & nValueSet ) ) )
+ EnableItem( aTable[nPos+1], FALSE );
+}
+
+// -----------------------------------------------------------------------
+
+void ZoomPopup_Impl::Select()
+{
+ nCurId = GetCurItemId();
+
+ switch ( nCurId )
+ {
+ case ZOOM_200: nZoom = 200; break;
+ case ZOOM_150: nZoom = 150; break;
+ case ZOOM_100: nZoom = 100; break;
+ case ZOOM_75: nZoom = 75; break;
+ case ZOOM_50: nZoom = 50; break;
+
+ case ZOOM_OPTIMAL:
+ case ZOOM_PAGE_WIDTH:
+ case ZOOM_WHOLE_PAGE: nZoom = 0; break;
+
+ }
+}
+
+// class SvxZoomStatusBarControl ------------------------------------------
+
+SvxZoomStatusBarControl::SvxZoomStatusBarControl( USHORT nId,
+ StatusBar& rStb,
+ SfxBindings& rBind ) :
+
+ SfxStatusBarControl( nId, rStb, rBind ),
+
+ nZoom( 100 ),
+
+ nValueSet( SVX_ZOOM_ENABLE_ALL )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxZoomStatusBarControl::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ if( SFX_ITEM_AVAILABLE != eState )
+ {
+ GetStatusBar().SetItemText( GetId(), String() );
+ nValueSet = 0;
+ }
+ else if ( pState->ISA( SfxUInt16Item) )
+ {
+ const SfxUInt16Item* pItem = (const SfxUInt16Item*)pState;
+ nZoom = pItem->GetValue();
+ String aStr( String::CreateFromInt32(nZoom) );
+ aStr += '%';
+ GetStatusBar().SetItemText( GetId(), aStr );
+
+ if ( pState->ISA(SvxZoomItem) )
+ {
+ nValueSet = ((const SvxZoomItem*)pState)->GetValueSet();
+ SvxZoomType eType = ((const SvxZoomItem*)pState)->GetType();
+
+/*!!!
+ switch ( eType )
+ {
+ case SVX_ZOOM_OPTIMAL:
+ GetStatusBar().SetItemText( GetId(), "Opt." );
+ break;
+ case SVX_ZOOM_WHOLEPAGE:
+ GetStatusBar().SetItemText( GetId(), "Page" );
+ break;
+ case SVX_ZOOM_PAGEWIDTH:
+ GetStatusBar().SetItemText( GetId(), "Width" );
+ break;
+ }
+*/
+ }
+ else
+ {
+ DBG_WARNING( "use SfxZoomItem for SID_ATTR_ZOOM" );
+ nValueSet = SVX_ZOOM_ENABLE_ALL;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxZoomStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
+{
+ String aStr( String::CreateFromInt32( nZoom ));
+ aStr += '%';
+ GetStatusBar().SetItemText( GetId(), aStr );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxZoomStatusBarControl::Command( const CommandEvent& rCEvt )
+{
+ if ( COMMAND_CONTEXTMENU & rCEvt.GetCommand() && 0 != nValueSet )
+ {
+ CaptureMouse();
+ ZoomPopup_Impl aPop( nZoom, nValueSet );
+ StatusBar& rStatusbar = GetStatusBar();
+
+ if ( aPop.Execute( &rStatusbar, rStatusbar.OutputToScreenPixel( rCEvt.GetMousePosPixel() ) ) &&
+ ( nZoom != aPop.GetZoom() || !nZoom ) )
+ {
+ nZoom = aPop.GetZoom();
+ SvxZoomItem aZoom( SVX_ZOOM_PERCENT, nZoom, GetId() );
+
+ USHORT nId = aPop.GetCurId();
+
+ if ( ZOOM_OPTIMAL == nId )
+ aZoom.SetType( SVX_ZOOM_OPTIMAL );
+ else if ( ZOOM_PAGE_WIDTH == nId )
+ aZoom.SetType( SVX_ZOOM_PAGEWIDTH );
+ else if ( ZOOM_WHOLE_PAGE == nId )
+ aZoom.SetType( SVX_ZOOM_WHOLEPAGE );
+
+ GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_RECORD, &aZoom, 0L );
+ }
+ ReleaseMouse();
+ }
+ else
+ SfxStatusBarControl::Command( rCEvt );
+}
+
+ULONG SvxZoomStatusBarControl::GetDefItemWidth(const StatusBar& rStb)
+{
+ long nWidth1 = rStb.GetTextWidth(String::CreateFromAscii("XXXXX%"));
+ return nWidth1;
+}
+
+
diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx
new file mode 100644
index 0000000000..61b4c7940b
--- /dev/null
+++ b/svx/source/svdraw/gradtrns.cxx
@@ -0,0 +1,471 @@
+/*************************************************************************
+ *
+ * $RCSfile: gradtrns.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "gradtrns.hxx"
+#include "svdobj.hxx"
+
+#ifndef _B3D_B3DCOLOR_HXX
+#include <goodies/b3dcolor.hxx>
+#endif
+
+#ifndef _B2D_MATRIX3D_HXX
+#include <goodies/matrix3d.hxx>
+#endif
+
+void GradTransformer::CreateRotatedBoundRect(double fDegree)
+{
+ // create back-rotated BoundRect to get the vector length
+ Vector2D aMid(aCenter);
+ Matrix3D aTrans;
+ Rectangle aNewRect;
+
+ aTrans.Translate(-aMid);
+ aTrans.Rotate(fDegree);
+ aTrans.Translate(aMid);
+
+ Vector2D aNew(aBoundRect.TopLeft());
+ aNew *= aTrans;
+ Point aNewTrans((INT32)(aNew.X() + 0.5), (INT32)(aNew.Y() + 0.5));
+ aNewRect.Union(Rectangle(aNewTrans, aNewTrans));
+
+ aNew = Vector2D(aBoundRect.TopRight());
+ aNew *= aTrans;
+ aNewTrans = Point((INT32)(aNew.X() + 0.5), (INT32)(aNew.Y() + 0.5));
+ aNewRect.Union(Rectangle(aNewTrans, aNewTrans));
+
+ aNew = Vector2D(aBoundRect.BottomLeft());
+ aNew *= aTrans;
+ aNewTrans = Point((INT32)(aNew.X() + 0.5), (INT32)(aNew.Y() + 0.5));
+ aNewRect.Union(Rectangle(aNewTrans, aNewTrans));
+
+ aNew = Vector2D(aBoundRect.BottomRight());
+ aNew *= aTrans;
+ aNewTrans = Point((INT32)(aNew.X() + 0.5), (INT32)(aNew.Y() + 0.5));
+ aNewRect.Union(Rectangle(aNewTrans, aNewTrans));
+
+ aBoundRect = aNewRect;
+ aCenter = aBoundRect.Center();
+}
+
+//
+// gradient to vector representation
+//
+
+void GradTransformer::GradToVec(GradTransGradient& rG, GradTransVector& rV, const SdrObject* pObj)
+{
+ // calc colors and set them
+ rV.aCol1 = rG.aGradient.GetStartColor();
+ rV.aCol2 = rG.aGradient.GetEndColor();
+
+ if(rG.aGradient.GetStartIntens() != 100)
+ {
+ double fFact = (double)rG.aGradient.GetStartIntens() / 100.0;
+ rV.aCol1 = (B3dColor)rV.aCol1 * fFact;
+ }
+
+ if(rG.aGradient.GetEndIntens() != 100)
+ {
+ double fFact = (double)rG.aGradient.GetEndIntens() / 100.0;
+ rV.aCol2 = (B3dColor)rV.aCol2 * fFact;
+ }
+
+ // now calc the positions for the color handles
+ aBoundRect = pObj->GetBoundRect();
+ aCenter = aBoundRect.Center();
+ fObjectAngle = 0.0;
+ fGradientAngle = 0.0;
+
+ // gradient rotates with the object (!!!)
+ if(pObj->GetRotateAngle())
+ fObjectAngle = (double)(pObj->GetRotateAngle() / 100) * F_PI180;
+
+ // get gradient angle
+ if(rG.aGradient.GetAngle())
+ fGradientAngle = (double)rG.aGradient.GetAngle() * (F_PI180 / 10.0);
+
+ // correct object and gradient rotation for object boundrect
+ if(fGradientAngle || fObjectAngle)
+ CreateRotatedBoundRect(fGradientAngle + fObjectAngle);
+
+ // build the in-between vector (top-down)
+ bInnerOuterChanged = FALSE;
+ bDoCorrectOffset = FALSE;
+
+ switch(rG.aGradient.GetGradientStyle())
+ {
+ case XGRAD_LINEAR :
+ {
+ // vector from top to bottom
+ aStartPos = Vector2D(aCenter.X(), aBoundRect.Top());
+ aEndPos = Vector2D(aCenter.X(), aBoundRect.Bottom());
+ aCenterPos = Vector2D(aCenter);
+ break;
+ }
+ case XGRAD_AXIAL :
+ {
+ // mirrored in center; set starpos, endpos from center to bottom
+ aStartPos = Vector2D(aCenter);
+ aEndPos = Vector2D(aCenter.X(), aBoundRect.Bottom());
+ aCenterPos = Vector2D(aCenter);
+
+ // here the border correction is vice-versa to the others
+ bInnerOuterChanged = TRUE;
+
+ break;
+ }
+ case XGRAD_RADIAL :
+ {
+ // from bottom to center
+ aStartPos = Vector2D(aCenter.X(), aBoundRect.Bottom());
+ aEndPos = Vector2D(aCenter);
+ aCenterPos = Vector2D(aCenter);
+ bDoCorrectOffset = TRUE;
+ break;
+ }
+ case XGRAD_ELLIPTICAL :
+ case XGRAD_SQUARE :
+ case XGRAD_RECT :
+ {
+ // from bottom to center
+ aStartPos = Vector2D(aCenter.X(), aBoundRect.Bottom());
+ aEndPos = Vector2D(aCenter);
+ aCenterPos = Vector2D(aCenter);
+ bDoCorrectOffset = TRUE;
+ break;
+ }
+ }
+
+ // take in account border settings, this moves the start point
+ if(rG.aGradient.GetBorder())
+ {
+ Vector2D aFullVec;
+
+ if(bInnerOuterChanged)
+ aFullVec = aEndPos - aStartPos;
+ else
+ aFullVec = aStartPos - aEndPos;
+
+ double fLen = (aFullVec.GetLength() * (100.0 - (double)rG.aGradient.GetBorder())) / 100.0;
+ aFullVec.Normalize();
+ aFullVec *= fLen;
+
+ if(bInnerOuterChanged)
+ aEndPos = aStartPos + aFullVec;
+ else
+ aStartPos = aEndPos + aFullVec;
+ }
+
+ // take offset in account
+ if(bDoCorrectOffset)
+ {
+ if(rG.aGradient.GetXOffset() != 50 || rG.aGradient.GetYOffset() != 50)
+ {
+ // get scaling factors (with and without gradient rotation),
+ // center is the same
+ Rectangle aObjectBoundRect = pObj->GetBoundRect();
+ Vector2D aScale;
+ aScale.X() = ((double)aBoundRect.GetWidth() + 1.0) / ((double)aObjectBoundRect.GetWidth() + 1.0);
+ aScale.Y() = ((double)aBoundRect.GetHeight() + 1.0) / ((double)aObjectBoundRect.GetHeight() + 1.0);
+
+ // calc transformation from gradient system to object system
+ Matrix3D aTrans;
+ Vector2D aObjectCenter = Vector2D(aBoundRect.Center());
+ aTrans.Translate(-aObjectCenter);
+ aTrans.Scale(aScale);
+ aTrans.Rotate(-fObjectAngle);
+ aTrans.Translate(aObjectCenter);
+
+ // define coordinate system on top of ObjectBoundRect
+ Vector2D aAxisCenter(aObjectBoundRect.TopLeft());
+ Vector2D aXAxis(aObjectBoundRect.TopRight());
+ Vector2D aYAxis(aObjectBoundRect.BottomLeft());
+
+ // transform all to object system
+ aAxisCenter *= aTrans;
+ aXAxis *= aTrans;
+ aYAxis *= aTrans;
+ aXAxis -= aAxisCenter;
+ aYAxis -= aAxisCenter;
+
+ Vector2D aCorrectionVector(0,0);
+
+ if(rG.aGradient.GetXOffset() != 50)
+ aCorrectionVector += aXAxis * (((double)rG.aGradient.GetXOffset() - 50.0) / 100.0);
+
+ if(rG.aGradient.GetYOffset() != 50)
+ aCorrectionVector += aYAxis * (((double)rG.aGradient.GetYOffset() - 50.0) / 100.0);
+
+ aStartPos += aCorrectionVector;
+ aEndPos += aCorrectionVector;
+ aCenterPos += aCorrectionVector;
+ }
+ }
+
+ // rotate around fObjectAngle, go to rotated object coordinates
+ if(fObjectAngle || fGradientAngle)
+ {
+ Matrix3D aTrans;
+
+ aTrans.Translate(-aCenterPos);
+ aTrans.Rotate(-(fObjectAngle + fGradientAngle));
+ aTrans.Translate(aCenterPos);
+
+ aStartPos *= aTrans;
+ aEndPos *= aTrans;
+ }
+
+ // set values for vector positions now
+ rV.aPos1 = Point((INT32)(aStartPos.X() + 0.5), (INT32)(aStartPos.Y() + 0.5));
+ rV.aPos2 = Point((INT32)(aEndPos.X() + 0.5), (INT32)(aEndPos.Y() + 0.5));
+}
+
+//
+// vector to gradient representation
+//
+
+void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, GradTransGradient& rGOld, const SdrObject* pObj, BOOL bMoveSingle, BOOL bMoveFirst)
+{
+ // copy old item to new item to have a valid base
+ rG = rGOld;
+
+ // on this base, create aVOld to have the previous values
+ // use full vector here (but rescue OldBorder)
+ GradTransVector aVOld;
+ UINT16 nOldBorder = rGOld.aGradient.GetBorder();
+ rGOld.aGradient.SetBorder(0);
+ GradToVec(rGOld, aVOld, pObj);
+ rGOld.aGradient.SetBorder(nOldBorder);
+
+ // color changes?
+ if(rV.aCol1 != rGOld.aGradient.GetStartColor())
+ {
+ rG.aGradient.SetStartColor(rV.aCol1);
+ rG.aGradient.SetStartIntens(100);
+ }
+
+ if(rV.aCol2 != rGOld.aGradient.GetEndColor())
+ {
+ rG.aGradient.SetEndColor(rV.aCol2);
+ rG.aGradient.SetEndIntens(100);
+ }
+
+ // back-rotate around aCenterPos with fGradientAngle and fObjectAngle
+ // to have the same conditions as above
+ aStartPos = Vector2D(rV.aPos1);
+ aEndPos = Vector2D(rV.aPos2);
+
+ // which points were moved? What needs to be done?
+ BOOL bRotAngleCheck(FALSE);
+ BOOL bCenterMoveCheck(FALSE);
+ BOOL bBorderMoveCheck(FALSE);
+ BOOL bRotAngleInvert(FALSE);
+
+ switch(rGOld.aGradient.GetGradientStyle())
+ {
+ case XGRAD_LINEAR :
+ {
+ bRotAngleCheck = bMoveSingle && !bMoveFirst;
+ bBorderMoveCheck = bMoveSingle && bMoveFirst;
+ break;
+ }
+ case XGRAD_AXIAL :
+ {
+ bRotAngleCheck = bMoveSingle && !bMoveFirst;
+ bBorderMoveCheck = bMoveSingle && !bMoveFirst;
+ break;
+ }
+ case XGRAD_RADIAL :
+ {
+ bBorderMoveCheck = bMoveSingle && bMoveFirst;
+ bCenterMoveCheck = (bMoveSingle && !bMoveFirst) || !bMoveSingle;
+ break;
+ }
+ case XGRAD_ELLIPTICAL :
+ case XGRAD_SQUARE :
+ case XGRAD_RECT :
+ {
+ bRotAngleCheck = bMoveSingle && bMoveFirst;
+ bBorderMoveCheck = bMoveSingle && bMoveFirst;
+ bCenterMoveCheck = (bMoveSingle && !bMoveFirst) || !bMoveSingle;
+ bRotAngleInvert = TRUE;
+ break;
+ }
+ }
+
+ // check for rotation angle change
+ if(bRotAngleCheck)
+ {
+ Vector2D aNewFullVec(aEndPos - aStartPos);
+
+ if(bRotAngleInvert)
+ aNewFullVec = -aNewFullVec;
+
+ double fNewFullAngle = atan2(aNewFullVec.Y(), aNewFullVec.X());
+ fNewFullAngle /= F_PI180;
+ fNewFullAngle *= -10.0;
+ fNewFullAngle += 900.0;
+
+ // correct object rotation
+ INT32 nObjRotateAngle = pObj->GetRotateAngle();
+ if(nObjRotateAngle)
+ fNewFullAngle -= (double)(nObjRotateAngle / 10);
+
+ while(fNewFullAngle < 0.0)
+ fNewFullAngle += 3600.0;
+
+ while(fNewFullAngle >= 3600.0)
+ fNewFullAngle -= 3600.0;
+
+ INT32 nNewAngle = (INT32)(fNewFullAngle + 0.5);
+
+ if(nNewAngle != rGOld.aGradient.GetAngle())
+ rG.aGradient.SetAngle(nNewAngle);
+ }
+
+ // check for border, move of the outer pixel
+ if(bBorderMoveCheck)
+ {
+ Vector2D aNewFullVec(aEndPos - aStartPos);
+ Vector2D aOldFullVec(Vector2D(aVOld.aPos2) - Vector2D(aVOld.aPos1));
+ double fNewFullLen = aNewFullVec.GetLength();
+ double fOldFullLen = aOldFullVec.GetLength();
+
+ double fNewBorder = (fNewFullLen * 100.0) / fOldFullLen;
+ INT32 nNewBorder = 100 - (INT32)(fNewBorder + 0.5);
+
+ if(nNewBorder < 0)
+ nNewBorder = 0;
+
+ if(nNewBorder > 100)
+ nNewBorder = 100;
+
+ if(nNewBorder != rG.aGradient.GetBorder())
+ {
+ rG.aGradient.SetBorder((UINT16)nNewBorder);
+ }
+ }
+
+ // move center if allowed, move of the inner pixel
+ if(bCenterMoveCheck)
+ {
+ // get scaling factors (with and without gradient rotation),
+ // center is the same
+ Rectangle aObjectBoundRect = pObj->GetBoundRect();
+ Vector2D aScale;
+ aScale.X() = ((double)aBoundRect.GetWidth() + 1.0) / ((double)aObjectBoundRect.GetWidth() + 1.0);
+ aScale.Y() = ((double)aBoundRect.GetHeight() + 1.0) / ((double)aObjectBoundRect.GetHeight() + 1.0);
+
+ // calc transformation from this system to gradient system
+ Matrix3D aTrans;
+ Vector2D aObjectCenter = Vector2D(aBoundRect.Center());
+ aTrans.Translate(-aObjectCenter);
+ aTrans.Scale(aScale);
+ aTrans.Rotate(-fObjectAngle);
+ aTrans.Translate(aObjectCenter);
+
+ // define coordinate system on top of ObjectBoundRect
+ Vector2D aAxisCenter(aObjectBoundRect.TopLeft());
+ Vector2D aXAxis(aObjectBoundRect.TopRight());
+ Vector2D aYAxis(aObjectBoundRect.BottomLeft());
+
+ // transform all to gradient system
+ aAxisCenter *= aTrans;
+ aXAxis *= aTrans;
+ aYAxis *= aTrans;
+ aXAxis -= aAxisCenter;
+ aYAxis -= aAxisCenter;
+
+ // build the normalized coordinate system
+ double fXAxisLen = aXAxis.GetLength();
+ double fYAxisLen = aYAxis.GetLength();
+ aXAxis.Normalize();
+ aYAxis.Normalize();
+
+ // calc part of new position in coordinate system
+ Vector2D aNewPos(aEndPos - aAxisCenter);
+ double fNewXAxisPart = aXAxis.Scalar(aNewPos);
+ double fNewYAxisPart = aYAxis.Scalar(aNewPos);
+ fNewXAxisPart = (fNewXAxisPart * 100.0) / fXAxisLen;
+ fNewYAxisPart = (fNewYAxisPart * 100.0) / fYAxisLen;
+ INT32 nNewX = (INT32)(fNewXAxisPart + 0.5);
+ INT32 nNewY = (INT32)(fNewYAxisPart + 0.5);
+
+ if(nNewX < 0)
+ nNewX = 0;
+
+ if(nNewX > 100)
+ nNewX = 100;
+
+ if(nNewY < 0)
+ nNewY = 0;
+
+ if(nNewY > 100)
+ nNewY = 100;
+
+ if(rGOld.aGradient.GetXOffset() != (UINT16)nNewX
+ || rGOld.aGradient.GetYOffset() != (UINT16)nNewY)
+ {
+ rG.aGradient.SetXOffset((UINT16)nNewX);
+ rG.aGradient.SetYOffset((UINT16)nNewY);
+ }
+ }
+}
+
diff --git a/svx/source/svdraw/gradtrns.hxx b/svx/source/svdraw/gradtrns.hxx
new file mode 100644
index 0000000000..9fcefeddb0
--- /dev/null
+++ b/svx/source/svdraw/gradtrns.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * $RCSfile: gradtrns.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _GRADTRANS_HXX
+#define _GRADTRANS_HXX
+
+#include "xgrad.hxx"
+
+#ifndef _SV_GEN_HXX
+#include <tools/gen.hxx>
+#endif
+
+#ifndef _SV_VECTOR2D_HXX
+#include <vcl/vector2d.hxx>
+#endif
+
+class SdrObject;
+
+class GradTransVector
+{
+public:
+ Point aPos1;
+ Point aPos2;
+ Color aCol1;
+ Color aCol2;
+};
+
+class GradTransGradient
+{
+public:
+ XGradient aGradient;
+};
+
+class GradTransformer
+{
+ // private members to hold necessary data
+ Rectangle aBoundRect;
+ Point aCenter;
+ double fGradientAngle;
+ double fObjectAngle;
+ Vector2D aStartPos;
+ Vector2D aEndPos;
+ Vector2D aCenterPos;
+ unsigned bInnerOuterChanged : 1;
+ unsigned bDoCorrectOffset : 1;
+ unsigned bDoCorrectRotation : 1;
+
+ // private helping functions
+ void CreateRotatedBoundRect(double fRotVec);
+
+public:
+ GradTransformer() {}
+
+ void GradToVec(GradTransGradient& rG, GradTransVector& rV, const SdrObject* pObj);
+ void VecToGrad(GradTransVector& rV, GradTransGradient& rG, GradTransGradient& rGOld, const SdrObject* pObj, BOOL bMoveSingle, BOOL bMoveFirst);
+};
+
+#endif _GRADTRANS_HXX
+
diff --git a/svx/source/svdraw/makefile.mk b/svx/source/svdraw/makefile.mk
new file mode 100644
index 0000000000..79947f2080
--- /dev/null
+++ b/svx/source/svdraw/makefile.mk
@@ -0,0 +1,223 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=SVX
+TARGET=svdraw
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES=\
+ $(SLO)$/dialdll.obj \
+ $(SLO)$/gradtrns.obj \
+ $(SLO)$/svdattr.obj \
+ $(SLO)$/svdcrtmt.obj \
+ $(SLO)$/svdcrtv.obj \
+ $(SLO)$/svddrag.obj \
+ $(SLO)$/svddrgmt.obj \
+ $(SLO)$/svddrgv.obj \
+ $(SLO)$/svdedtv.obj \
+ $(SLO)$/svdedtv1.obj \
+ $(SLO)$/svdedtv2.obj \
+ $(SLO)$/svdedxv.obj \
+ $(SLO)$/svdetc.obj \
+ $(SLO)$/svdfmtf.obj \
+ $(SLO)$/svdfppt.obj \
+ $(SLO)$/svdglev.obj \
+ $(SLO)$/svdglue.obj \
+ $(SLO)$/svdhdl.obj \
+ $(SLO)$/svdhlpln.obj \
+ $(SLO)$/svdibrow.obj \
+ $(SLO)$/svdio.obj \
+ $(SLO)$/svditer.obj \
+ $(SLO)$/svdlayer.obj \
+ $(SLO)$/svdmark.obj \
+ $(SLO)$/svdmodel.obj \
+ $(SLO)$/svdmrkv.obj \
+ $(SLO)$/svdmrkv1.obj \
+ $(SLO)$/svdoattr.obj \
+ $(SLO)$/svdobj.obj \
+ $(SLO)$/svdocapt.obj \
+ $(SLO)$/svdocirc.obj \
+ $(SLO)$/svdoedge.obj \
+ $(SLO)$/svdograf.obj \
+ $(SLO)$/svdogrp.obj \
+ $(SLO)$/svdomeas.obj \
+ $(SLO)$/svdoole2.obj \
+ $(SLO)$/svdopage.obj \
+ $(SLO)$/svdopath.obj \
+ $(SLO)$/svdorect.obj \
+ $(SLO)$/svdotext.obj \
+ $(SLO)$/svdotxat.obj \
+ $(SLO)$/svdotxdr.obj \
+ $(SLO)$/svdotxed.obj \
+ $(SLO)$/svdotxfl.obj \
+ $(SLO)$/svdotxln.obj \
+ $(SLO)$/svdotxtr.obj \
+ $(SLO)$/svdouno.obj \
+ $(SLO)$/svdoutl.obj \
+ $(SLO)$/svdovirt.obj \
+ $(SLO)$/svdpage.obj \
+ $(SLO)$/svdpagv.obj \
+ $(SLO)$/svdpntv.obj \
+ $(SLO)$/svdpoev.obj \
+ $(SLO)$/svdscrol.obj \
+ $(SLO)$/svdsnpv.obj \
+ $(SLO)$/svdsuro.obj \
+ $(SLO)$/svdtouch.obj \
+ $(SLO)$/svdtrans.obj \
+ $(SLO)$/svdtxhdl.obj \
+ $(SLO)$/svdundo.obj \
+ $(SLO)$/svdview.obj \
+ $(SLO)$/svdviter.obj \
+ $(SLO)$/svdvmark.obj \
+ $(SLO)$/svdxcgv.obj
+
+SVXLIGHTOBJFILES=\
+ $(OBJ)$/dialdll.obj \
+ $(OBJ)$/gradtrns.obj \
+ $(OBJ)$/svdattr.obj \
+ $(OBJ)$/svdcrtmt.obj \
+ $(OBJ)$/svdcrtv.obj \
+ $(OBJ)$/svddrag.obj \
+ $(OBJ)$/svddrgmt.obj \
+ $(OBJ)$/svddrgv.obj \
+ $(OBJ)$/svdedtv.obj \
+ $(OBJ)$/svdedtv1.obj \
+ $(OBJ)$/svdedtv2.obj \
+ $(OBJ)$/svdedxv.obj \
+ $(OBJ)$/svdetc.obj \
+ $(OBJ)$/svdfmtf.obj \
+ $(OBJ)$/svdfppt.obj \
+ $(OBJ)$/svdglev.obj \
+ $(OBJ)$/svdglue.obj \
+ $(OBJ)$/svdhdl.obj \
+ $(OBJ)$/svdhlpln.obj \
+ $(OBJ)$/svdibrow.obj \
+ $(OBJ)$/svdio.obj \
+ $(OBJ)$/svditer.obj \
+ $(OBJ)$/svdlayer.obj \
+ $(OBJ)$/svdmark.obj \
+ $(OBJ)$/svdmodel.obj \
+ $(OBJ)$/svdmrkv.obj \
+ $(OBJ)$/svdmrkv1.obj \
+ $(OBJ)$/svdoattr.obj \
+ $(OBJ)$/svdobj.obj \
+ $(OBJ)$/svdocapt.obj \
+ $(OBJ)$/svdocirc.obj \
+ $(OBJ)$/svdoedge.obj \
+ $(OBJ)$/svdograf.obj \
+ $(OBJ)$/svdogrp.obj \
+ $(OBJ)$/svdomeas.obj \
+ $(OBJ)$/svdoole2.obj \
+ $(OBJ)$/svdopage.obj \
+ $(OBJ)$/svdopath.obj \
+ $(OBJ)$/svdorect.obj \
+ $(OBJ)$/svdotext.obj \
+ $(OBJ)$/svdotxat.obj \
+ $(OBJ)$/svdotxdr.obj \
+ $(OBJ)$/svdotxed.obj \
+ $(OBJ)$/svdotxfl.obj \
+ $(OBJ)$/svdotxln.obj \
+ $(OBJ)$/svdotxtr.obj \
+ $(OBJ)$/svdouno.obj \
+ $(OBJ)$/svdoutl.obj \
+ $(OBJ)$/svdovirt.obj \
+ $(OBJ)$/svdpage.obj \
+ $(OBJ)$/svdpagv.obj \
+ $(OBJ)$/svdpntv.obj \
+ $(OBJ)$/svdpoev.obj \
+ $(OBJ)$/svdscrol.obj \
+ $(OBJ)$/svdsnpv.obj \
+ $(OBJ)$/svdsuro.obj \
+ $(OBJ)$/svdtouch.obj \
+ $(OBJ)$/svdtrans.obj \
+ $(OBJ)$/svdtxhdl.obj \
+ $(OBJ)$/svdundo.obj \
+ $(OBJ)$/svdview.obj \
+ $(OBJ)$/svdviter.obj \
+ $(OBJ)$/svdvmark.obj \
+ $(OBJ)$/svdxcgv.obj
+
+EXCEPTIONSFILES= \
+ $(OBJ)$/sxl_svdogrp.obj \
+ $(OBJ)$/sxl_svdotxln.obj \
+ $(SLO)$/svdhdl.obj \
+ $(SLO)$/svdmrkv.obj \
+ $(SLO)$/svdogrp.obj \
+ $(SLO)$/svdotxln.obj \
+ $(SLO)$/svdouno.obj \
+ $(SLO)$/svdpagv.obj
+
+SRS1NAME=svdstr
+SRC1FILES= \
+ svdstr.src
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
new file mode 100644
index 0000000000..43f3bc72c9
--- /dev/null
+++ b/svx/source/svdraw/svdattr.cxx
@@ -0,0 +1,2854 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdattr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _COM_SUN_STAR_DRAWING_TEXTFITTOSIZETYPE_HPP_
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_TEXTADJUST_HPP_
+#include <com/sun/star/drawing/TextAdjust.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_TEXTANIMATIONKIND_HPP_
+#include <com/sun/star/drawing/TextAnimationKind.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_TEXTANIMATIONDIRECTION_HPP_
+#include <com/sun/star/drawing/TextAnimationDirection.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_CONNECTORTYPE_HPP_
+#include <com/sun/star/drawing/ConnectorType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_MEASUREKIND_HPP_
+#include <com/sun/star/drawing/MeasureKind.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_MEASURETEXTHORZPOS_HPP_
+#include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_MEASURETEXTVERTPOS_HPP_
+#include <com/sun/star/drawing/MeasureTextVertPos.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_CIRCLEKIND_HPP_
+#include <com/sun/star/drawing/CircleKind.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
+#include <com/sun/star/uno/Sequence.hxx>
+#endif
+
+#ifndef _APP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+
+#include "svdattr.hxx"
+#include "svdattrx.hxx"
+#include "svdpool.hxx"
+
+#ifndef _SOLAR_HRC
+#include <svtools/solar.hrc>
+#endif
+
+#include "svxids.hrc"
+#include "xtable.hxx" // fuer RGB_Color()
+#include "svditext.hxx"
+#include "svdmodel.hxx" // fuer DEGREE_CHAR
+#include "svdtrans.hxx"
+#include "svdglob.hxx" // Stringcache
+#include "svdstr.hrc"
+#include "adjitem.hxx"
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+
+#include <xtxasit.hxx>
+#include <xfillit0.hxx>
+#include <xflclit.hxx>
+#include <xlineit0.hxx>
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+SdrItemPool::SdrItemPool(USHORT nAttrStart, USHORT nAttrEnd, FASTBOOL bLoadRefCounts):
+ XOutdevItemPool(nAttrStart,nAttrEnd,bLoadRefCounts)
+{
+ Ctor(NULL,nAttrStart,nAttrEnd);
+}
+
+SdrItemPool::SdrItemPool(SfxItemPool* pMaster, USHORT nAttrStart, USHORT nAttrEnd, FASTBOOL bLoadRefCounts):
+ XOutdevItemPool(pMaster,nAttrStart,nAttrEnd,bLoadRefCounts)
+{
+ Ctor(pMaster,nAttrStart,nAttrEnd);
+}
+
+void SdrItemPool::Ctor(SfxItemPool* pMaster, USHORT nAttrStart, USHORT nAttrEnd)
+{
+#ifdef SDRDEFITEMCACHE
+ pDefLineAttr=NULL;
+#endif SDRDEFITEMCACHE
+
+ if (pMaster==NULL) {
+ pMaster=this;
+ }
+
+ Color aNullCol(RGB_Color(COL_BLACK));
+ XubString aEmptyStr;
+
+ USHORT i;
+ for (i=SDRATTR_NOTPERSIST_FIRST; i<=SDRATTR_NOTPERSIST_LAST; i++) {
+ pItemInfos[i-SDRATTR_START]._nFlags=0;
+ }
+ // Schatten
+ ppPoolDefaults[SDRATTR_SHADOW -SDRATTR_START]=new SdrShadowItem;
+ ppPoolDefaults[SDRATTR_SHADOWCOLOR -SDRATTR_START]=new SdrShadowColorItem(aEmptyStr,aNullCol);
+ ppPoolDefaults[SDRATTR_SHADOWXDIST -SDRATTR_START]=new SdrShadowXDistItem;
+ ppPoolDefaults[SDRATTR_SHADOWYDIST -SDRATTR_START]=new SdrShadowYDistItem;
+ ppPoolDefaults[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]=new SdrShadowTransparenceItem;
+ ppPoolDefaults[SDRATTR_SHADOW3D -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D );
+ ppPoolDefaults[SDRATTR_SHADOWPERSP -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP );
+ for (i=SDRATTR_SHADOWRESERVE1; i<=SDRATTR_SHADOWRESERVE5; i++) {
+ ppPoolDefaults[i-SDRATTR_START]=new SfxVoidItem(i);
+ }
+
+ ppPoolDefaults[SDRATTRSET_SHADOW-SDRATTR_START]=new SdrShadowSetItem(pMaster);
+
+ // SID_ATTR_FILL_SHADOW = SID_SVX_START+299 = SID_LIB_START+299 = 10299
+ pItemInfos[SDRATTR_SHADOW-SDRATTR_START]._nSID=SID_ATTR_FILL_SHADOW;
+
+ // Legendenobjekt
+ ppPoolDefaults[SDRATTR_CAPTIONTYPE -SDRATTR_START]=new SdrCaptionTypeItem ;
+ ppPoolDefaults[SDRATTR_CAPTIONFIXEDANGLE-SDRATTR_START]=new SdrCaptionFixedAngleItem;
+ ppPoolDefaults[SDRATTR_CAPTIONANGLE -SDRATTR_START]=new SdrCaptionAngleItem ;
+ ppPoolDefaults[SDRATTR_CAPTIONGAP -SDRATTR_START]=new SdrCaptionGapItem ;
+ ppPoolDefaults[SDRATTR_CAPTIONESCDIR -SDRATTR_START]=new SdrCaptionEscDirItem ;
+ ppPoolDefaults[SDRATTR_CAPTIONESCISREL -SDRATTR_START]=new SdrCaptionEscIsRelItem ;
+ ppPoolDefaults[SDRATTR_CAPTIONESCREL -SDRATTR_START]=new SdrCaptionEscRelItem ;
+ ppPoolDefaults[SDRATTR_CAPTIONESCABS -SDRATTR_START]=new SdrCaptionEscAbsItem ;
+ ppPoolDefaults[SDRATTR_CAPTIONLINELEN -SDRATTR_START]=new SdrCaptionLineLenItem ;
+ ppPoolDefaults[SDRATTR_CAPTIONFITLINELEN-SDRATTR_START]=new SdrCaptionFitLineLenItem;
+ for (i=SDRATTR_CAPTIONRESERVE1; i<=SDRATTR_CAPTIONRESERVE5; i++) {
+ ppPoolDefaults[i-SDRATTR_START]=new SfxVoidItem(i);
+ }
+ ppPoolDefaults[SDRATTRSET_CAPTION-SDRATTR_START]=new SdrCaptionSetItem(pMaster);
+
+ // Outliner-Attribute
+ ppPoolDefaults[SDRATTRSET_OUTLINER-SDRATTR_START]=new SdrOutlinerSetItem(pMaster);
+
+ // Misc-Attribute
+ ppPoolDefaults[SDRATTR_ECKENRADIUS -SDRATTR_START]=new SdrEckenradiusItem;
+ ppPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT -SDRATTR_START]=new SdrTextMinFrameHeightItem;
+ ppPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrTextAutoGrowHeightItem;
+ ppPoolDefaults[SDRATTR_TEXT_FITTOSIZE -SDRATTR_START]=new SdrTextFitToSizeTypeItem;
+ ppPoolDefaults[SDRATTR_TEXT_LEFTDIST -SDRATTR_START]=new SdrTextLeftDistItem;
+ ppPoolDefaults[SDRATTR_TEXT_RIGHTDIST -SDRATTR_START]=new SdrTextRightDistItem;
+ ppPoolDefaults[SDRATTR_TEXT_UPPERDIST -SDRATTR_START]=new SdrTextUpperDistItem;
+ ppPoolDefaults[SDRATTR_TEXT_LOWERDIST -SDRATTR_START]=new SdrTextLowerDistItem;
+ ppPoolDefaults[SDRATTR_TEXT_VERTADJUST -SDRATTR_START]=new SdrTextVertAdjustItem;
+ ppPoolDefaults[SDRATTR_TEXT_MAXFRAMEHEIGHT -SDRATTR_START]=new SdrTextMaxFrameHeightItem;
+ ppPoolDefaults[SDRATTR_TEXT_MINFRAMEWIDTH -SDRATTR_START]=new SdrTextMinFrameWidthItem;
+ ppPoolDefaults[SDRATTR_TEXT_MAXFRAMEWIDTH -SDRATTR_START]=new SdrTextMaxFrameWidthItem;
+ ppPoolDefaults[SDRATTR_TEXT_AUTOGROWWIDTH -SDRATTR_START]=new SdrTextAutoGrowWidthItem;
+ ppPoolDefaults[SDRATTR_TEXT_HORZADJUST -SDRATTR_START]=new SdrTextHorzAdjustItem;
+ ppPoolDefaults[SDRATTR_TEXT_ANIKIND -SDRATTR_START]=new SdrTextAniKindItem;
+ ppPoolDefaults[SDRATTR_TEXT_ANIDIRECTION -SDRATTR_START]=new SdrTextAniDirectionItem;
+ ppPoolDefaults[SDRATTR_TEXT_ANISTARTINSIDE -SDRATTR_START]=new SdrTextAniStartInsideItem;
+ ppPoolDefaults[SDRATTR_TEXT_ANISTOPINSIDE -SDRATTR_START]=new SdrTextAniStopInsideItem;
+ ppPoolDefaults[SDRATTR_TEXT_ANICOUNT -SDRATTR_START]=new SdrTextAniCountItem;
+ ppPoolDefaults[SDRATTR_TEXT_ANIDELAY -SDRATTR_START]=new SdrTextAniDelayItem;
+ ppPoolDefaults[SDRATTR_TEXT_ANIAMOUNT -SDRATTR_START]=new SdrTextAniAmountItem;
+ ppPoolDefaults[SDRATTR_TEXT_CONTOURFRAME -SDRATTR_START]=new SdrTextContourFrameItem;
+ ppPoolDefaults[SDRATTR_AUTOSHAPE_ADJUSTMENT -SDRATTR_START]=new SdrAutoShapeAdjustmentItem;
+ for (i=SDRATTR_RESERVE14; i<=SDRATTR_RESERVE19; i++) {
+ ppPoolDefaults[i-SDRATTR_START]=new SfxVoidItem(i);
+ }
+ ppPoolDefaults[SDRATTRSET_MISC-SDRATTR_START]=new SdrMiscSetItem(pMaster);
+
+ pItemInfos[SDRATTR_TEXT_FITTOSIZE-SDRATTR_START]._nSID=SID_ATTR_TEXT_FITTOSIZE;
+
+ // Objektverbinder
+ ppPoolDefaults[SDRATTR_EDGEKIND -SDRATTR_START]=new SdrEdgeKindItem;
+ long nDefEdgeDist=500; // Erstmal hart defaulted fuer Draw (100TH_MM). hier muss noch der MapMode beruecksichtigt werden.
+ ppPoolDefaults[SDRATTR_EDGENODE1HORZDIST-SDRATTR_START]=new SdrEdgeNode1HorzDistItem(nDefEdgeDist);
+ ppPoolDefaults[SDRATTR_EDGENODE1VERTDIST-SDRATTR_START]=new SdrEdgeNode1VertDistItem(nDefEdgeDist);
+ ppPoolDefaults[SDRATTR_EDGENODE2HORZDIST-SDRATTR_START]=new SdrEdgeNode2HorzDistItem(nDefEdgeDist);
+ ppPoolDefaults[SDRATTR_EDGENODE2VERTDIST-SDRATTR_START]=new SdrEdgeNode2VertDistItem(nDefEdgeDist);
+ ppPoolDefaults[SDRATTR_EDGENODE1GLUEDIST-SDRATTR_START]=new SdrEdgeNode1GlueDistItem;
+ ppPoolDefaults[SDRATTR_EDGENODE2GLUEDIST-SDRATTR_START]=new SdrEdgeNode2GlueDistItem;
+ ppPoolDefaults[SDRATTR_EDGELINEDELTAANZ -SDRATTR_START]=new SdrEdgeLineDeltaAnzItem;
+ ppPoolDefaults[SDRATTR_EDGELINE1DELTA -SDRATTR_START]=new SdrEdgeLine1DeltaItem;
+ ppPoolDefaults[SDRATTR_EDGELINE2DELTA -SDRATTR_START]=new SdrEdgeLine2DeltaItem;
+ ppPoolDefaults[SDRATTR_EDGELINE3DELTA -SDRATTR_START]=new SdrEdgeLine3DeltaItem;
+ for (i=SDRATTR_EDGERESERVE02; i<=SDRATTR_EDGERESERVE09; i++) {
+ ppPoolDefaults[i-SDRATTR_START]=new SfxVoidItem(i);
+ }
+ ppPoolDefaults[SDRATTRSET_EDGE-SDRATTR_START]=new SdrEdgeSetItem(pMaster);
+
+ // Bemassungsobjekt
+ ppPoolDefaults[SDRATTR_MEASUREKIND -SDRATTR_START]=new SdrMeasureKindItem;
+ ppPoolDefaults[SDRATTR_MEASURETEXTHPOS -SDRATTR_START]=new SdrMeasureTextHPosItem;
+ ppPoolDefaults[SDRATTR_MEASURETEXTVPOS -SDRATTR_START]=new SdrMeasureTextVPosItem;
+ ppPoolDefaults[SDRATTR_MEASURELINEDIST -SDRATTR_START]=new SdrMeasureLineDistItem(800);
+ ppPoolDefaults[SDRATTR_MEASUREHELPLINEOVERHANG -SDRATTR_START]=new SdrMeasureHelplineOverhangItem(200);
+ ppPoolDefaults[SDRATTR_MEASUREHELPLINEDIST -SDRATTR_START]=new SdrMeasureHelplineDistItem(100);
+ ppPoolDefaults[SDRATTR_MEASUREHELPLINE1LEN -SDRATTR_START]=new SdrMeasureHelpline1LenItem;
+ ppPoolDefaults[SDRATTR_MEASUREHELPLINE2LEN -SDRATTR_START]=new SdrMeasureHelpline2LenItem;
+ ppPoolDefaults[SDRATTR_MEASUREBELOWREFEDGE -SDRATTR_START]=new SdrMeasureBelowRefEdgeItem;
+ ppPoolDefaults[SDRATTR_MEASURETEXTROTA90 -SDRATTR_START]=new SdrMeasureTextRota90Item;
+ ppPoolDefaults[SDRATTR_MEASURETEXTUPSIDEDOWN -SDRATTR_START]=new SdrMeasureTextUpsideDownItem;
+ ppPoolDefaults[SDRATTR_MEASUREOVERHANG -SDRATTR_START]=new SdrMeasureOverhangItem(600);
+ ppPoolDefaults[SDRATTR_MEASUREUNIT -SDRATTR_START]=new SdrMeasureUnitItem;
+ ppPoolDefaults[SDRATTR_MEASURESCALE -SDRATTR_START]=new SdrMeasureScaleItem;
+ ppPoolDefaults[SDRATTR_MEASURESHOWUNIT -SDRATTR_START]=new SdrMeasureShowUnitItem;
+ ppPoolDefaults[SDRATTR_MEASUREFORMATSTRING -SDRATTR_START]=new SdrMeasureFormatStringItem();
+ ppPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLE -SDRATTR_START]=new SdrMeasureTextAutoAngleItem();
+ ppPoolDefaults[SDRATTR_MEASURETEXTAUTOANGLEVIEW-SDRATTR_START]=new SdrMeasureTextAutoAngleViewItem();
+ ppPoolDefaults[SDRATTR_MEASURETEXTISFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextIsFixedAngleItem();
+ ppPoolDefaults[SDRATTR_MEASURETEXTFIXEDANGLE -SDRATTR_START]=new SdrMeasureTextFixedAngleItem();
+ for (i=SDRATTR_MEASURERESERVE04; i<=SDRATTR_MEASURERESERVE07; i++) {
+ ppPoolDefaults[i-SDRATTR_START]=new SfxVoidItem(i);
+ }
+ ppPoolDefaults[SDRATTRSET_MEASURE-SDRATTR_START]=new SdrMeasureSetItem(pMaster);
+
+ // Kreis
+ ppPoolDefaults[SDRATTR_CIRCKIND -SDRATTR_START]=new SdrCircKindItem;
+ ppPoolDefaults[SDRATTR_CIRCSTARTANGLE-SDRATTR_START]=new SdrCircStartAngleItem;
+ ppPoolDefaults[SDRATTR_CIRCENDANGLE -SDRATTR_START]=new SdrCircEndAngleItem;
+ for (i=SDRATTR_CIRCRESERVE0; i<=SDRATTR_CIRCRESERVE3; i++) {
+ ppPoolDefaults[i-SDRATTR_START]=new SfxVoidItem(i);
+ }
+ ppPoolDefaults[SDRATTRSET_CIRC-SDRATTR_START]=new SdrCircSetItem(pMaster);
+
+ // Nichtpersistente-Items
+ ppPoolDefaults[SDRATTR_OBJMOVEPROTECT -SDRATTR_START]=new SdrObjMoveProtectItem;
+ ppPoolDefaults[SDRATTR_OBJSIZEPROTECT -SDRATTR_START]=new SdrObjSizeProtectItem;
+ ppPoolDefaults[SDRATTR_OBJPRINTABLE -SDRATTR_START]=new SdrObjPrintableItem;
+ ppPoolDefaults[SDRATTR_LAYERID -SDRATTR_START]=new SdrLayerIdItem;
+ ppPoolDefaults[SDRATTR_LAYERNAME -SDRATTR_START]=new SdrLayerNameItem;
+ ppPoolDefaults[SDRATTR_OBJECTNAME -SDRATTR_START]=new SdrObjectNameItem;
+ ppPoolDefaults[SDRATTR_ALLPOSITIONX -SDRATTR_START]=new SdrAllPositionXItem;
+ ppPoolDefaults[SDRATTR_ALLPOSITIONY -SDRATTR_START]=new SdrAllPositionYItem;
+ ppPoolDefaults[SDRATTR_ALLSIZEWIDTH -SDRATTR_START]=new SdrAllSizeWidthItem;
+ ppPoolDefaults[SDRATTR_ALLSIZEHEIGHT -SDRATTR_START]=new SdrAllSizeHeightItem;
+ ppPoolDefaults[SDRATTR_ONEPOSITIONX -SDRATTR_START]=new SdrOnePositionXItem;
+ ppPoolDefaults[SDRATTR_ONEPOSITIONY -SDRATTR_START]=new SdrOnePositionYItem;
+ ppPoolDefaults[SDRATTR_ONESIZEWIDTH -SDRATTR_START]=new SdrOneSizeWidthItem;
+ ppPoolDefaults[SDRATTR_ONESIZEHEIGHT -SDRATTR_START]=new SdrOneSizeHeightItem;
+ ppPoolDefaults[SDRATTR_LOGICSIZEWIDTH -SDRATTR_START]=new SdrLogicSizeWidthItem;
+ ppPoolDefaults[SDRATTR_LOGICSIZEHEIGHT-SDRATTR_START]=new SdrLogicSizeHeightItem;
+ ppPoolDefaults[SDRATTR_ROTATEANGLE -SDRATTR_START]=new SdrRotateAngleItem;
+ ppPoolDefaults[SDRATTR_SHEARANGLE -SDRATTR_START]=new SdrShearAngleItem;
+ ppPoolDefaults[SDRATTR_MOVEX -SDRATTR_START]=new SdrMoveXItem;
+ ppPoolDefaults[SDRATTR_MOVEY -SDRATTR_START]=new SdrMoveYItem;
+ ppPoolDefaults[SDRATTR_RESIZEXONE -SDRATTR_START]=new SdrResizeXOneItem;
+ ppPoolDefaults[SDRATTR_RESIZEYONE -SDRATTR_START]=new SdrResizeYOneItem;
+ ppPoolDefaults[SDRATTR_ROTATEONE -SDRATTR_START]=new SdrRotateOneItem;
+ ppPoolDefaults[SDRATTR_HORZSHEARONE -SDRATTR_START]=new SdrHorzShearOneItem;
+ ppPoolDefaults[SDRATTR_VERTSHEARONE -SDRATTR_START]=new SdrVertShearOneItem;
+ ppPoolDefaults[SDRATTR_RESIZEXALL -SDRATTR_START]=new SdrResizeXAllItem;
+ ppPoolDefaults[SDRATTR_RESIZEYALL -SDRATTR_START]=new SdrResizeYAllItem;
+ ppPoolDefaults[SDRATTR_ROTATEALL -SDRATTR_START]=new SdrRotateAllItem;
+ ppPoolDefaults[SDRATTR_HORZSHEARALL -SDRATTR_START]=new SdrHorzShearAllItem;
+ ppPoolDefaults[SDRATTR_VERTSHEARALL -SDRATTR_START]=new SdrVertShearAllItem;
+ ppPoolDefaults[SDRATTR_TRANSFORMREF1X -SDRATTR_START]=new SdrTransformRef1XItem;
+ ppPoolDefaults[SDRATTR_TRANSFORMREF1Y -SDRATTR_START]=new SdrTransformRef1YItem;
+ ppPoolDefaults[SDRATTR_TRANSFORMREF2X -SDRATTR_START]=new SdrTransformRef2XItem;
+ ppPoolDefaults[SDRATTR_TRANSFORMREF2Y -SDRATTR_START]=new SdrTransformRef2YItem;
+ for (i=SDRATTR_NOTPERSISTRESERVE1; i<=SDRATTR_NOTPERSISTRESERVE15; i++) {
+ ppPoolDefaults[i-SDRATTR_START]=new SfxVoidItem(i);
+ }
+
+ // Grafik
+ ppPoolDefaults[ SDRATTR_GRAFRED - SDRATTR_START] = new SdrGrafRedItem;
+ ppPoolDefaults[ SDRATTR_GRAFGREEN - SDRATTR_START] = new SdrGrafGreenItem;
+ ppPoolDefaults[ SDRATTR_GRAFBLUE - SDRATTR_START] = new SdrGrafBlueItem;
+ ppPoolDefaults[ SDRATTR_GRAFLUMINANCE - SDRATTR_START] = new SdrGrafLuminanceItem;
+ ppPoolDefaults[ SDRATTR_GRAFCONTRAST - SDRATTR_START] = new SdrGrafContrastItem;
+ ppPoolDefaults[ SDRATTR_GRAFGAMMA - SDRATTR_START] = new SdrGrafGamma100Item;
+ ppPoolDefaults[ SDRATTR_GRAFTRANSPARENCE - SDRATTR_START] = new SdrGrafTransparenceItem;
+ ppPoolDefaults[ SDRATTR_GRAFINVERT - SDRATTR_START] = new SdrGrafInvertItem;
+ ppPoolDefaults[ SDRATTR_GRAFMODE - SDRATTR_START] = new SdrGrafModeItem;
+ for( i = SDRATTR_GRAFRESERVE2; i <= SDRATTR_GRAFRESERVE6; i++ )
+ ppPoolDefaults[ i - SDRATTR_START ] = new SfxVoidItem( i );
+ ppPoolDefaults[ SDRATTRSET_GRAF - SDRATTR_START ] = new SdrGrafSetItem( pMaster );
+
+ ////////////////////////////////
+#ifdef DBG_UTIL
+ UINT16 nAnz(SDRATTR_END-SDRATTR_START + 1);
+
+ for(UINT16 nNum = 0; nNum < nAnz; nNum++)
+ {
+ const SfxPoolItem* pItem = ppPoolDefaults[nNum];
+
+ if(!pItem)
+ {
+ ByteString aStr("PoolDefaultItem not set: ");
+
+ aStr += "Num=";
+ aStr += nNum;
+ aStr += "Which=";
+ aStr += nNum + 1000;
+
+ DBG_ERROR(aStr.GetBuffer());
+ }
+ else if(pItem->Which() != nNum + 1000)
+ {
+ ByteString aStr("PoolDefaultItem has wrong WhichId: ");
+
+ aStr += "Num=";
+ aStr += ByteString::CreateFromInt32( nNum );
+ aStr += " Which=";
+ aStr += ByteString::CreateFromInt32( pItem->Which() );
+
+ DBG_ERROR(aStr.GetBuffer());
+ }
+ }
+#endif
+
+ if (nAttrStart==SDRATTR_START && nAttrEnd==SDRATTR_END) {
+ SetDefaults(ppPoolDefaults);
+ SetItemInfos(pItemInfos);
+ }
+}
+
+void SdrItemPool::ImpMakeDefItems()
+{
+#ifdef SDRDEFITEMCACHE
+ if (pDefLineAttr==NULL) {
+ XLineAttrSetItem aLineSetItem(this);
+ pDefLineAttr=(XLineAttrSetItem*)&Put(aLineSetItem);
+ aLineSetItem.GetItemSet().Put(XLineStyleItem(XLINE_NONE));
+ pDefTextFrameLineAttr=(XLineAttrSetItem*)&Put(aLineSetItem);
+
+ XFillAttrSetItem aFillSetItem(this);
+ pDefFillAttr=(XFillAttrSetItem*)&Put(aFillSetItem);
+ aFillSetItem.GetItemSet().Put(XFillColorItem(String(),Color(COL_WHITE))); // Falls einer auf Solid umschaltet
+ aFillSetItem.GetItemSet().Put(XFillStyleItem(XFILL_NONE));
+ pDefTextFrameFillAttr=(XFillAttrSetItem*)&Put(aFillSetItem);
+
+ XTextAttrSetItem aTextSetItem(this);
+ pDefTextAttr=(XTextAttrSetItem*)&Put(aTextSetItem);
+ pDefTextFrameTextAttr=pDefTextAttr;
+
+ SdrShadowSetItem aShadSetItem(this);
+ pDefShadAttr=(SdrShadowSetItem*)&Put(aShadSetItem);
+ pDefTextFrameShadAttr=pDefShadAttr;
+
+ SdrOutlinerSetItem aOutlSetItem(this);
+ pDefTextFrameOutlAttr=(SdrOutlinerSetItem*)&Put(aOutlSetItem);
+ aOutlSetItem.GetItemSet().Put(SvxAdjustItem(SVX_ADJUST_CENTER));
+ pDefOutlAttr=(SdrOutlinerSetItem*)&Put(aOutlSetItem);
+
+ SdrMiscSetItem aMiscSetItem(this);
+ pDefTextFrameMiscAttr=(SdrMiscSetItem*)&Put(aMiscSetItem);
+ aMiscSetItem.GetItemSet().Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_CENTER));
+ aMiscSetItem.GetItemSet().Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_CENTER));
+ pDefMiscAttr=(SdrMiscSetItem*)&Put(aMiscSetItem);
+ }
+#endif SDRDEFITEMCACHE
+}
+
+/*************************************************************************
+|*
+|* copy ctor, sorgt dafuer, dass die static defaults gecloned werden
+|* (Parameter 2 = TRUE)
+|*
+\************************************************************************/
+
+SdrItemPool::SdrItemPool(const SdrItemPool& rPool):
+ XOutdevItemPool(rPool)
+{
+}
+
+/*************************************************************************
+|*
+|* Clone()
+|*
+\************************************************************************/
+
+SfxItemPool* __EXPORT SdrItemPool::Clone() const
+{
+ return new SdrItemPool(*this);
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+SdrItemPool::~SdrItemPool()
+{
+ Delete(); // erstmal den 'dtor' des SfxItemPools rufen
+ // und nun meine eigenen statischen Defaults abraeumen
+ if (ppPoolDefaults!=NULL) {
+ unsigned nBeg=SDRATTR_SHADOW-SDRATTR_START;
+ unsigned nEnd=SDRATTR_END-SDRATTR_START;
+ for (unsigned i=nBeg; i<=nEnd; i++) {
+ SetRef(*ppPoolDefaults[i],0);
+ delete ppPoolDefaults[i];
+ ppPoolDefaults[i]=NULL;
+ }
+ }
+ // Vor dem zerstoeren die Pools ggf. voneinander trennen
+ SetSecondaryPool(NULL);
+}
+
+SfxItemPresentation __EXPORT SdrItemPool::GetPresentation(
+ const SfxPoolItem& rItem, SfxItemPresentation ePresentation,
+ SfxMapUnit ePresentationMetric, XubString& rText,
+ const International * pInternational) const
+{
+ if (!IsInvalidItem(&rItem)) {
+ USHORT nWhich=rItem.Which();
+ if (nWhich>=SDRATTR_SHADOW_FIRST && nWhich<=SDRATTR_END) {
+ rItem.GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS,
+ GetMetric(nWhich),ePresentationMetric,rText,
+ pInternational);
+ String aStr;
+
+ TakeItemName(nWhich, aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+
+ return ePresentation;
+ }
+ }
+ return XOutdevItemPool::GetPresentation(rItem,ePresentation,ePresentationMetric,rText,pInternational);
+}
+
+FASTBOOL SdrItemPool::TakeItemName(USHORT nWhich, String& rItemName)
+{
+ ResMgr* pResMgr = ImpGetResMgr();
+ USHORT nResId = SIP_UNKNOWN_ATTR;
+
+ switch (nWhich)
+ {
+ case XATTR_LINESTYLE : nResId = SIP_XA_LINESTYLE;break;
+ case XATTR_LINEDASH : nResId = SIP_XA_LINEDASH;break;
+ case XATTR_LINEWIDTH : nResId = SIP_XA_LINEWIDTH;break;
+ case XATTR_LINECOLOR : nResId = SIP_XA_LINECOLOR;break;
+ case XATTR_LINESTART : nResId = SIP_XA_LINESTART;break;
+ case XATTR_LINEEND : nResId = SIP_XA_LINEEND;break;
+ case XATTR_LINESTARTWIDTH : nResId = SIP_XA_LINESTARTWIDTH;break;
+ case XATTR_LINEENDWIDTH : nResId = SIP_XA_LINEENDWIDTH;break;
+ case XATTR_LINESTARTCENTER : nResId = SIP_XA_LINESTARTCENTER;break;
+ case XATTR_LINEENDCENTER : nResId = SIP_XA_LINEENDCENTER;break;
+ case XATTR_LINETRANSPARENCE : nResId = SIP_XA_LINETRANSPARENCE;break;
+ case XATTR_LINEJOINT : nResId = SIP_XA_LINEJOINT;break;
+ case XATTR_LINERESERVED2 : nResId = SIP_XA_LINERESERVED2;break;
+ case XATTR_LINERESERVED3 : nResId = SIP_XA_LINERESERVED3;break;
+ case XATTR_LINERESERVED4 : nResId = SIP_XA_LINERESERVED4;break;
+ case XATTR_LINERESERVED5 : nResId = SIP_XA_LINERESERVED5;break;
+ case XATTR_LINERESERVED_LAST: nResId = SIP_XA_LINERESERVED_LAST;break;
+ case XATTRSET_LINE : nResId = SIP_XATTRSET_LINE;break;
+
+ case XATTR_FILLSTYLE : nResId = SIP_XA_FILLSTYLE;break;
+ case XATTR_FILLCOLOR : nResId = SIP_XA_FILLCOLOR;break;
+ case XATTR_FILLGRADIENT : nResId = SIP_XA_FILLGRADIENT;break;
+ case XATTR_FILLHATCH : nResId = SIP_XA_FILLHATCH;break;
+ case XATTR_FILLBITMAP : nResId = SIP_XA_FILLBITMAP;break;
+ case XATTR_FILLTRANSPARENCE : nResId = SIP_XA_FILLTRANSPARENCE;break;
+ case XATTR_GRADIENTSTEPCOUNT : nResId = SIP_XA_GRADIENTSTEPCOUNT;break;
+ case XATTR_FILLBMP_TILE : nResId = SIP_XA_FILLBMP_TILE;break;
+ case XATTR_FILLBMP_POS : nResId = SIP_XA_FILLBMP_POS;break;
+ case XATTR_FILLBMP_SIZEX : nResId = SIP_XA_FILLBMP_SIZEX;break;
+ case XATTR_FILLBMP_SIZEY : nResId = SIP_XA_FILLBMP_SIZEY;break;
+ case XATTR_FILLFLOATTRANSPARENCE: nResId = SIP_XA_FILLFLOATTRANSPARENCE;break;
+ case XATTR_FILLRESERVED2 : nResId = SIP_XA_FILLRESERVED2;break;
+ case XATTR_FILLBMP_SIZELOG : nResId = SIP_XA_FILLBMP_SIZELOG;break;
+ case XATTR_FILLBMP_TILEOFFSETX : nResId = SIP_XA_FILLBMP_TILEOFFSETX;break;
+ case XATTR_FILLBMP_TILEOFFSETY : nResId = SIP_XA_FILLBMP_TILEOFFSETY;break;
+ case XATTR_FILLBMP_STRETCH : nResId = SIP_XA_FILLBMP_STRETCH;break;
+ case XATTR_FILLRESERVED3 : nResId = SIP_XA_FILLRESERVED3;break;
+ case XATTR_FILLRESERVED4 : nResId = SIP_XA_FILLRESERVED4;break;
+ case XATTR_FILLRESERVED5 : nResId = SIP_XA_FILLRESERVED5;break;
+ case XATTR_FILLRESERVED6 : nResId = SIP_XA_FILLRESERVED6;break;
+ case XATTR_FILLRESERVED7 : nResId = SIP_XA_FILLRESERVED7;break;
+ case XATTR_FILLRESERVED8 : nResId = SIP_XA_FILLRESERVED8;break;
+ case XATTR_FILLBMP_POSOFFSETX : nResId = SIP_XA_FILLBMP_POSOFFSETX;break;
+ case XATTR_FILLBMP_POSOFFSETY : nResId = SIP_XA_FILLBMP_POSOFFSETY;break;
+ case XATTR_FILLBACKGROUND : nResId = SIP_XA_FILLBACKGROUND;break;
+ case XATTR_FILLRESERVED10 : nResId = SIP_XA_FILLRESERVED10;break;
+ case XATTR_FILLRESERVED11 : nResId = SIP_XA_FILLRESERVED11;break;
+ case XATTR_FILLRESERVED_LAST : nResId = SIP_XA_FILLRESERVED_LAST;break;
+
+ case XATTRSET_FILL : nResId = SIP_XATTRSET_FILL;break;
+
+ case XATTR_FORMTXTSTYLE : nResId = SIP_XA_FORMTXTSTYLE;break;
+ case XATTR_FORMTXTADJUST : nResId = SIP_XA_FORMTXTADJUST;break;
+ case XATTR_FORMTXTDISTANCE : nResId = SIP_XA_FORMTXTDISTANCE;break;
+ case XATTR_FORMTXTSTART : nResId = SIP_XA_FORMTXTSTART;break;
+ case XATTR_FORMTXTMIRROR : nResId = SIP_XA_FORMTXTMIRROR;break;
+ case XATTR_FORMTXTOUTLINE : nResId = SIP_XA_FORMTXTOUTLINE;break;
+ case XATTR_FORMTXTSHADOW : nResId = SIP_XA_FORMTXTSHADOW;break;
+ case XATTR_FORMTXTSHDWCOLOR : nResId = SIP_XA_FORMTXTSHDWCOLOR;break;
+ case XATTR_FORMTXTSHDWXVAL : nResId = SIP_XA_FORMTXTSHDWXVAL;break;
+ case XATTR_FORMTXTSHDWYVAL : nResId = SIP_XA_FORMTXTSHDWYVAL;break;
+ case XATTR_FORMTXTSTDFORM : nResId = SIP_XA_FORMTXTSTDFORM;break;
+ case XATTR_FORMTXTHIDEFORM : nResId = SIP_XA_FORMTXTHIDEFORM;break;
+ case XATTR_FORMTXTSHDWTRANSP: nResId = SIP_XA_FORMTXTSHDWTRANSP;break;
+ case XATTR_FTRESERVED2 : nResId = SIP_XA_FTRESERVED2;break;
+ case XATTR_FTRESERVED3 : nResId = SIP_XA_FTRESERVED3;break;
+ case XATTR_FTRESERVED4 : nResId = SIP_XA_FTRESERVED4;break;
+ case XATTR_FTRESERVED5 : nResId = SIP_XA_FTRESERVED5;break;
+ case XATTR_FTRESERVED_LAST : nResId = SIP_XA_FTRESERVED_LAST;break;
+ case XATTRSET_TEXT : nResId = SIP_XATTRSET_TEXT;break;
+
+ case SDRATTR_SHADOW : nResId = SIP_SA_SHADOW;break;
+ case SDRATTR_SHADOWCOLOR : nResId = SIP_SA_SHADOWCOLOR;break;
+ case SDRATTR_SHADOWXDIST : nResId = SIP_SA_SHADOWXDIST;break;
+ case SDRATTR_SHADOWYDIST : nResId = SIP_SA_SHADOWYDIST;break;
+ case SDRATTR_SHADOWTRANSPARENCE: nResId = SIP_SA_SHADOWTRANSPARENCE;break;
+ case SDRATTR_SHADOW3D : nResId = SIP_SA_SHADOW3D;break;
+ case SDRATTR_SHADOWPERSP : nResId = SIP_SA_SHADOWPERSP;break;
+ case SDRATTR_SHADOWRESERVE1 : nResId = SIP_SA_SHADOWRESERVE1;break;
+ case SDRATTR_SHADOWRESERVE2 : nResId = SIP_SA_SHADOWRESERVE2;break;
+ case SDRATTR_SHADOWRESERVE3 : nResId = SIP_SA_SHADOWRESERVE3;break;
+ case SDRATTR_SHADOWRESERVE4 : nResId = SIP_SA_SHADOWRESERVE4;break;
+ case SDRATTR_SHADOWRESERVE5 : nResId = SIP_SA_SHADOWRESERVE5;break;
+ case SDRATTRSET_SHADOW : nResId = SIP_SDRATTRSET_SHADOW;break;
+
+ case SDRATTR_CAPTIONTYPE : nResId = SIP_SA_CAPTIONTYPE;break;
+ case SDRATTR_CAPTIONFIXEDANGLE: nResId = SIP_SA_CAPTIONFIXEDANGLE;break;
+ case SDRATTR_CAPTIONANGLE : nResId = SIP_SA_CAPTIONANGLE;break;
+ case SDRATTR_CAPTIONGAP : nResId = SIP_SA_CAPTIONGAP;break;
+ case SDRATTR_CAPTIONESCDIR : nResId = SIP_SA_CAPTIONESCDIR;break;
+ case SDRATTR_CAPTIONESCISREL : nResId = SIP_SA_CAPTIONESCISREL;break;
+ case SDRATTR_CAPTIONESCREL : nResId = SIP_SA_CAPTIONESCREL;break;
+ case SDRATTR_CAPTIONESCABS : nResId = SIP_SA_CAPTIONESCABS;break;
+ case SDRATTR_CAPTIONLINELEN : nResId = SIP_SA_CAPTIONLINELEN;break;
+ case SDRATTR_CAPTIONFITLINELEN: nResId = SIP_SA_CAPTIONFITLINELEN;break;
+ case SDRATTR_CAPTIONRESERVE1 : nResId = SIP_SA_CAPTIONRESERVE1;break;
+ case SDRATTR_CAPTIONRESERVE2 : nResId = SIP_SA_CAPTIONRESERVE2;break;
+ case SDRATTR_CAPTIONRESERVE3 : nResId = SIP_SA_CAPTIONRESERVE3;break;
+ case SDRATTR_CAPTIONRESERVE4 : nResId = SIP_SA_CAPTIONRESERVE4;break;
+ case SDRATTR_CAPTIONRESERVE5 : nResId = SIP_SA_CAPTIONRESERVE5;break;
+ case SDRATTRSET_CAPTION : nResId = SIP_SDRATTRSET_CAPTION;break;
+
+ case SDRATTRSET_OUTLINER: nResId = SIP_SDRATTRSET_OUTLINER;break;
+
+ case SDRATTR_ECKENRADIUS : nResId = SIP_SA_ECKENRADIUS;break;
+ case SDRATTR_TEXT_MINFRAMEHEIGHT : nResId = SIP_SA_TEXT_MINFRAMEHEIGHT;break;
+ case SDRATTR_TEXT_AUTOGROWHEIGHT : nResId = SIP_SA_TEXT_AUTOGROWHEIGHT;break;
+ case SDRATTR_TEXT_FITTOSIZE : nResId = SIP_SA_TEXT_FITTOSIZE;break;
+ case SDRATTR_TEXT_LEFTDIST : nResId = SIP_SA_TEXT_LEFTDIST;break;
+ case SDRATTR_TEXT_RIGHTDIST : nResId = SIP_SA_TEXT_RIGHTDIST;break;
+ case SDRATTR_TEXT_UPPERDIST : nResId = SIP_SA_TEXT_UPPERDIST;break;
+ case SDRATTR_TEXT_LOWERDIST : nResId = SIP_SA_TEXT_LOWERDIST;break;
+ case SDRATTR_TEXT_VERTADJUST : nResId = SIP_SA_TEXT_VERTADJUST;break;
+ case SDRATTR_TEXT_MAXFRAMEHEIGHT : nResId = SIP_SA_TEXT_MAXFRAMEHEIGHT;break;
+ case SDRATTR_TEXT_MINFRAMEWIDTH : nResId = SIP_SA_TEXT_MINFRAMEWIDTH;break;
+ case SDRATTR_TEXT_MAXFRAMEWIDTH : nResId = SIP_SA_TEXT_MAXFRAMEWIDTH;break;
+ case SDRATTR_TEXT_AUTOGROWWIDTH : nResId = SIP_SA_TEXT_AUTOGROWWIDTH;break;
+ case SDRATTR_TEXT_HORZADJUST : nResId = SIP_SA_TEXT_HORZADJUST;break;
+ case SDRATTR_TEXT_ANIKIND : nResId = SIP_SA_TEXT_ANIKIND;break;
+ case SDRATTR_TEXT_ANIDIRECTION : nResId = SIP_SA_TEXT_ANIDIRECTION;break;
+ case SDRATTR_TEXT_ANISTARTINSIDE : nResId = SIP_SA_TEXT_ANISTARTINSIDE;break;
+ case SDRATTR_TEXT_ANISTOPINSIDE : nResId = SIP_SA_TEXT_ANISTOPINSIDE;break;
+ case SDRATTR_TEXT_ANICOUNT : nResId = SIP_SA_TEXT_ANICOUNT;break;
+ case SDRATTR_TEXT_ANIDELAY : nResId = SIP_SA_TEXT_ANIDELAY;break;
+ case SDRATTR_TEXT_ANIAMOUNT : nResId = SIP_SA_TEXT_ANIAMOUNT;break;
+ case SDRATTR_TEXT_CONTOURFRAME : nResId = SIP_SA_TEXT_CONTOURFRAME;break;
+ case SDRATTR_AUTOSHAPE_ADJUSTMENT : nResId = SIP_SA_AUTOSHAPE_ADJUSTMENT;break;
+ case SDRATTR_RESERVE14 : nResId = SIP_SA_RESERVE14;break;
+ case SDRATTR_RESERVE15 : nResId = SIP_SA_RESERVE15;break;
+ case SDRATTR_RESERVE16 : nResId = SIP_SA_RESERVE16;break;
+ case SDRATTR_RESERVE17 : nResId = SIP_SA_RESERVE17;break;
+ case SDRATTR_RESERVE18 : nResId = SIP_SA_RESERVE18;break;
+ case SDRATTR_RESERVE19 : nResId = SIP_SA_RESERVE19;break;
+ case SDRATTRSET_MISC : nResId = SIP_SDRATTRSET_MISC;break;
+
+ case SDRATTR_EDGEKIND : nResId = SIP_SA_EDGEKIND;break;
+ case SDRATTR_EDGENODE1HORZDIST : nResId = SIP_SA_EDGENODE1HORZDIST;break;
+ case SDRATTR_EDGENODE1VERTDIST : nResId = SIP_SA_EDGENODE1VERTDIST;break;
+ case SDRATTR_EDGENODE2HORZDIST : nResId = SIP_SA_EDGENODE2HORZDIST;break;
+ case SDRATTR_EDGENODE2VERTDIST : nResId = SIP_SA_EDGENODE2VERTDIST;break;
+ case SDRATTR_EDGENODE1GLUEDIST : nResId = SIP_SA_EDGENODE1GLUEDIST;break;
+ case SDRATTR_EDGENODE2GLUEDIST : nResId = SIP_SA_EDGENODE2GLUEDIST;break;
+ case SDRATTR_EDGELINEDELTAANZ : nResId = SIP_SA_EDGELINEDELTAANZ;break;
+ case SDRATTR_EDGELINE1DELTA : nResId = SIP_SA_EDGELINE1DELTA;break;
+ case SDRATTR_EDGELINE2DELTA : nResId = SIP_SA_EDGELINE2DELTA;break;
+ case SDRATTR_EDGELINE3DELTA : nResId = SIP_SA_EDGELINE3DELTA;break;
+ case SDRATTR_EDGERESERVE02 : nResId = SIP_SA_EDGERESERVE02;break;
+ case SDRATTR_EDGERESERVE03 : nResId = SIP_SA_EDGERESERVE03;break;
+ case SDRATTR_EDGERESERVE04 : nResId = SIP_SA_EDGERESERVE04;break;
+ case SDRATTR_EDGERESERVE05 : nResId = SIP_SA_EDGERESERVE05;break;
+ case SDRATTR_EDGERESERVE06 : nResId = SIP_SA_EDGERESERVE06;break;
+ case SDRATTR_EDGERESERVE07 : nResId = SIP_SA_EDGERESERVE07;break;
+ case SDRATTR_EDGERESERVE08 : nResId = SIP_SA_EDGERESERVE08;break;
+ case SDRATTR_EDGERESERVE09 : nResId = SIP_SA_EDGERESERVE09;break;
+ case SDRATTRSET_EDGE : nResId = SIP_SDRATTRSET_EDGE;break;
+
+ case SDRATTR_MEASUREKIND : nResId = SIP_SA_MEASUREKIND;break;
+ case SDRATTR_MEASURETEXTHPOS : nResId = SIP_SA_MEASURETEXTHPOS;break;
+ case SDRATTR_MEASURETEXTVPOS : nResId = SIP_SA_MEASURETEXTVPOS;break;
+ case SDRATTR_MEASURELINEDIST : nResId = SIP_SA_MEASURELINEDIST;break;
+ case SDRATTR_MEASUREHELPLINEOVERHANG : nResId = SIP_SA_MEASUREHELPLINEOVERHANG;break;
+ case SDRATTR_MEASUREHELPLINEDIST : nResId = SIP_SA_MEASUREHELPLINEDIST;break;
+ case SDRATTR_MEASUREHELPLINE1LEN : nResId = SIP_SA_MEASUREHELPLINE1LEN;break;
+ case SDRATTR_MEASUREHELPLINE2LEN : nResId = SIP_SA_MEASUREHELPLINE2LEN;break;
+ case SDRATTR_MEASUREBELOWREFEDGE : nResId = SIP_SA_MEASUREBELOWREFEDGE;break;
+ case SDRATTR_MEASURETEXTROTA90 : nResId = SIP_SA_MEASURETEXTROTA90;break;
+ case SDRATTR_MEASURETEXTUPSIDEDOWN : nResId = SIP_SA_MEASURETEXTUPSIDEDOWN;break;
+ case SDRATTR_MEASUREOVERHANG : nResId = SIP_SA_MEASUREOVERHANG;break;
+ case SDRATTR_MEASUREUNIT : nResId = SIP_SA_MEASUREUNIT;break;
+ case SDRATTR_MEASURESCALE : nResId = SIP_SA_MEASURESCALE;break;
+ case SDRATTR_MEASURESHOWUNIT : nResId = SIP_SA_MEASURESHOWUNIT;break;
+ case SDRATTR_MEASUREFORMATSTRING : nResId = SIP_SA_MEASUREFORMATSTRING;break;
+ case SDRATTR_MEASURETEXTAUTOANGLE : nResId = SIP_SA_MEASURETEXTAUTOANGLE;break;
+ case SDRATTR_MEASURETEXTAUTOANGLEVIEW: nResId = SIP_SA_MEASURETEXTAUTOANGLEVIEW;break;
+ case SDRATTR_MEASURETEXTISFIXEDANGLE : nResId = SIP_SA_MEASURETEXTISFIXEDANGLE;break;
+ case SDRATTR_MEASURETEXTFIXEDANGLE : nResId = SIP_SA_MEASURETEXTFIXEDANGLE;break;
+ case SDRATTR_MEASURERESERVE04 : nResId = SIP_SA_MEASURERESERVE04;break;
+ case SDRATTR_MEASURERESERVE05 : nResId = SIP_SA_MEASURERESERVE05;break;
+ case SDRATTR_MEASURERESERVE06 : nResId = SIP_SA_MEASURERESERVE06;break;
+ case SDRATTR_MEASURERESERVE07 : nResId = SIP_SA_MEASURERESERVE07;break;
+ case SDRATTRSET_MEASURE : nResId = SIP_SDRATTRSET_MEASURE;break;
+
+ case SDRATTR_CIRCKIND : nResId = SIP_SA_CIRCKIND;break;
+ case SDRATTR_CIRCSTARTANGLE: nResId = SIP_SA_CIRCSTARTANGLE;break;
+ case SDRATTR_CIRCENDANGLE : nResId = SIP_SA_CIRCENDANGLE;break;
+ case SDRATTR_CIRCRESERVE0 : nResId = SIP_SA_CIRCRESERVE0;break;
+ case SDRATTR_CIRCRESERVE1 : nResId = SIP_SA_CIRCRESERVE1;break;
+ case SDRATTR_CIRCRESERVE2 : nResId = SIP_SA_CIRCRESERVE2;break;
+ case SDRATTR_CIRCRESERVE3 : nResId = SIP_SA_CIRCRESERVE3;break;
+ case SDRATTRSET_CIRC : nResId = SIP_SDRATTRSET_CIRC;break;
+
+ case SDRATTR_OBJMOVEPROTECT : nResId = SIP_SA_OBJMOVEPROTECT;break;
+ case SDRATTR_OBJSIZEPROTECT : nResId = SIP_SA_OBJSIZEPROTECT;break;
+ case SDRATTR_OBJPRINTABLE : nResId = SIP_SA_OBJPRINTABLE;break;
+ case SDRATTR_LAYERID : nResId = SIP_SA_LAYERID;break;
+ case SDRATTR_LAYERNAME : nResId = SIP_SA_LAYERNAME;break;
+ case SDRATTR_OBJECTNAME : nResId = SIP_SA_OBJECTNAME;break;
+ case SDRATTR_ALLPOSITIONX : nResId = SIP_SA_ALLPOSITIONX;break;
+ case SDRATTR_ALLPOSITIONY : nResId = SIP_SA_ALLPOSITIONY;break;
+ case SDRATTR_ALLSIZEWIDTH : nResId = SIP_SA_ALLSIZEWIDTH;break;
+ case SDRATTR_ALLSIZEHEIGHT : nResId = SIP_SA_ALLSIZEHEIGHT;break;
+ case SDRATTR_ONEPOSITIONX : nResId = SIP_SA_ONEPOSITIONX;break;
+ case SDRATTR_ONEPOSITIONY : nResId = SIP_SA_ONEPOSITIONY;break;
+ case SDRATTR_ONESIZEWIDTH : nResId = SIP_SA_ONESIZEWIDTH;break;
+ case SDRATTR_ONESIZEHEIGHT : nResId = SIP_SA_ONESIZEHEIGHT;break;
+ case SDRATTR_LOGICSIZEWIDTH : nResId = SIP_SA_LOGICSIZEWIDTH;break;
+ case SDRATTR_LOGICSIZEHEIGHT: nResId = SIP_SA_LOGICSIZEHEIGHT;break;
+ case SDRATTR_ROTATEANGLE : nResId = SIP_SA_ROTATEANGLE;break;
+ case SDRATTR_SHEARANGLE : nResId = SIP_SA_SHEARANGLE;break;
+ case SDRATTR_MOVEX : nResId = SIP_SA_MOVEX;break;
+ case SDRATTR_MOVEY : nResId = SIP_SA_MOVEY;break;
+ case SDRATTR_RESIZEXONE : nResId = SIP_SA_RESIZEXONE;break;
+ case SDRATTR_RESIZEYONE : nResId = SIP_SA_RESIZEYONE;break;
+ case SDRATTR_ROTATEONE : nResId = SIP_SA_ROTATEONE;break;
+ case SDRATTR_HORZSHEARONE : nResId = SIP_SA_HORZSHEARONE;break;
+ case SDRATTR_VERTSHEARONE : nResId = SIP_SA_VERTSHEARONE;break;
+ case SDRATTR_RESIZEXALL : nResId = SIP_SA_RESIZEXALL;break;
+ case SDRATTR_RESIZEYALL : nResId = SIP_SA_RESIZEYALL;break;
+ case SDRATTR_ROTATEALL : nResId = SIP_SA_ROTATEALL;break;
+ case SDRATTR_HORZSHEARALL : nResId = SIP_SA_HORZSHEARALL;break;
+ case SDRATTR_VERTSHEARALL : nResId = SIP_SA_VERTSHEARALL;break;
+ case SDRATTR_TRANSFORMREF1X : nResId = SIP_SA_TRANSFORMREF1X;break;
+ case SDRATTR_TRANSFORMREF1Y : nResId = SIP_SA_TRANSFORMREF1Y;break;
+ case SDRATTR_TRANSFORMREF2X : nResId = SIP_SA_TRANSFORMREF2X;break;
+ case SDRATTR_TRANSFORMREF2Y : nResId = SIP_SA_TRANSFORMREF2Y;break;
+
+ case SDRATTR_GRAFRED : nResId = SIP_SA_GRAFRED;break;
+ case SDRATTR_GRAFGREEN : nResId = SIP_SA_GRAFGREEN;break;
+ case SDRATTR_GRAFBLUE : nResId = SIP_SA_GRAFBLUE;break;
+ case SDRATTR_GRAFLUMINANCE : nResId = SIP_SA_GRAFLUMINANCE;break;
+ case SDRATTR_GRAFCONTRAST : nResId = SIP_SA_GRAFCONTRAST;break;
+ case SDRATTR_GRAFGAMMA : nResId = SIP_SA_GRAFGAMMA;break;
+ case SDRATTR_GRAFTRANSPARENCE : nResId = SIP_SA_GRAFTRANSPARENCE;break;
+ case SDRATTR_GRAFINVERT : nResId = SIP_SA_GRAFINVERT;break;
+ case SDRATTR_GRAFMODE : nResId = SIP_SA_GRAFMODE;break;
+ case SDRATTR_GRAFRESERVE2 : nResId = SIP_SA_GRAFRESERVE2;break;
+ case SDRATTR_GRAFRESERVE3 : nResId = SIP_SA_GRAFRESERVE3;break;
+ case SDRATTR_GRAFRESERVE4 : nResId = SIP_SA_GRAFRESERVE4;break;
+ case SDRATTR_GRAFRESERVE5 : nResId = SIP_SA_GRAFRESERVE5;break;
+ case SDRATTR_GRAFRESERVE6 : nResId = SIP_SA_GRAFRESERVE6;break;
+ case SDRATTRSET_GRAF : nResId = SIP_SDRATTRSET_GRAF;break;
+
+ case EE_PARA_HYPHENATE : nResId = SIP_EE_PARA_HYPHENATE;break;
+ case EE_PARA_BULLETSTATE: nResId = SIP_EE_PARA_BULLETSTATE;break;
+ case EE_PARA_OUTLLRSPACE: nResId = SIP_EE_PARA_OUTLLRSPACE;break;
+ case EE_PARA_OUTLLEVEL : nResId = SIP_EE_PARA_OUTLLEVEL;break;
+ case EE_PARA_BULLET : nResId = SIP_EE_PARA_BULLET;break;
+ case EE_PARA_LRSPACE : nResId = SIP_EE_PARA_LRSPACE;break;
+ case EE_PARA_ULSPACE : nResId = SIP_EE_PARA_ULSPACE;break;
+ case EE_PARA_SBL : nResId = SIP_EE_PARA_SBL;break;
+ case EE_PARA_JUST : nResId = SIP_EE_PARA_JUST;break;
+ case EE_PARA_TABS : nResId = SIP_EE_PARA_TABS;break;
+
+ case EE_CHAR_COLOR : nResId = SIP_EE_CHAR_COLOR;break;
+ case EE_CHAR_FONTINFO : nResId = SIP_EE_CHAR_FONTINFO;break;
+ case EE_CHAR_FONTHEIGHT : nResId = SIP_EE_CHAR_FONTHEIGHT;break;
+ case EE_CHAR_FONTWIDTH : nResId = SIP_EE_CHAR_FONTWIDTH;break;
+ case EE_CHAR_WEIGHT : nResId = SIP_EE_CHAR_WEIGHT;break;
+ case EE_CHAR_UNDERLINE : nResId = SIP_EE_CHAR_UNDERLINE;break;
+ case EE_CHAR_STRIKEOUT : nResId = SIP_EE_CHAR_STRIKEOUT;break;
+ case EE_CHAR_ITALIC : nResId = SIP_EE_CHAR_ITALIC;break;
+ case EE_CHAR_OUTLINE : nResId = SIP_EE_CHAR_OUTLINE;break;
+ case EE_CHAR_SHADOW : nResId = SIP_EE_CHAR_SHADOW;break;
+ case EE_CHAR_ESCAPEMENT : nResId = SIP_EE_CHAR_ESCAPEMENT;break;
+ case EE_CHAR_PAIRKERNING: nResId = SIP_EE_CHAR_PAIRKERNING;break;
+ case EE_CHAR_KERNING : nResId = SIP_EE_CHAR_KERNING;break;
+ case EE_CHAR_WLM : nResId = SIP_EE_CHAR_WLM;break;
+ case EE_FEATURE_TAB : nResId = SIP_EE_FEATURE_TAB;break;
+ case EE_FEATURE_LINEBR : nResId = SIP_EE_FEATURE_LINEBR;break;
+ case EE_FEATURE_NOTCONV : nResId = SIP_EE_FEATURE_NOTCONV;break;
+ case EE_FEATURE_FIELD : nResId = SIP_EE_FEATURE_FIELD;break;
+ } // switch
+
+ rItemName = String( ResId( nResId, pResMgr ) );
+
+ return (BOOL)rItemName.Len();
+}
+
+BOOL SdrItemPool::TakeWhichName(USHORT nWhich, ByteString& rWhichName)
+{
+ ByteString aStr;
+
+#ifdef DBG_UTIL
+ switch(nWhich)
+ {
+ case XATTR_LINESTYLE : aStr="XATTR_LINESTYLE "; break;
+ case XATTR_LINEDASH : aStr="XATTR_LINEDASH "; break;
+ case XATTR_LINEWIDTH : aStr="XATTR_LINEWIDTH "; break;
+ case XATTR_LINECOLOR : aStr="XATTR_LINECOLOR "; break;
+ case XATTR_LINESTART : aStr="XATTR_LINESTART "; break;
+ case XATTR_LINEEND : aStr="XATTR_LINEEND "; break;
+ case XATTR_LINESTARTWIDTH : aStr="XATTR_LINESTARTWIDTH "; break;
+ case XATTR_LINEENDWIDTH : aStr="XATTR_LINEENDWIDTH "; break;
+ case XATTR_LINESTARTCENTER : aStr="XATTR_LINESTARTCENTER "; break;
+ case XATTR_LINEENDCENTER : aStr="XATTR_LINEENDCENTER "; break;
+ case XATTR_LINETRANSPARENCE : aStr="XATTR_LINETRANSPARENCE "; break;
+ case XATTR_LINEJOINT : aStr="XATTR_LINEJOINT "; break;
+ case XATTR_LINERESERVED2 : aStr="XATTR_LINERESERVED2 "; break;
+ case XATTR_LINERESERVED3 : aStr="XATTR_LINERESERVED3 "; break;
+ case XATTR_LINERESERVED4 : aStr="XATTR_LINERESERVED4 "; break;
+ case XATTR_LINERESERVED5 : aStr="XATTR_LINERESERVED5 "; break;
+ case XATTR_LINERESERVED_LAST : aStr="XATTR_LINERESERVED_LAST "; break;
+ case XATTRSET_LINE : aStr="XATTRSET_LINE "; break;
+
+ case XATTR_FILLSTYLE : aStr="XATTR_FILLSTYLE "; break;
+ case XATTR_FILLCOLOR : aStr="XATTR_FILLCOLOR "; break;
+ case XATTR_FILLGRADIENT : aStr="XATTR_FILLGRADIENT "; break;
+ case XATTR_FILLHATCH : aStr="XATTR_FILLHATCH "; break;
+ case XATTR_FILLBITMAP : aStr="XATTR_FILLBITMAP "; break;
+ case XATTR_FILLTRANSPARENCE : aStr="XATTR_FILLTRANSPARENCE "; break;
+ case XATTR_GRADIENTSTEPCOUNT : aStr="XATTR_GRADIENTSTEPCOUNT "; break;
+
+ case XATTR_FILLBMP_TILE : aStr="XATTR_FILLBMP_TILE "; break;
+ case XATTR_FILLBMP_POS : aStr="XATTR_FILLBMP_POS "; break;
+ case XATTR_FILLBMP_SIZEX : aStr="XATTR_FILLBMP_SIZEX "; break;
+ case XATTR_FILLBMP_SIZEY : aStr="XATTR_FILLBMP_SIZEY "; break;
+ case XATTR_FILLFLOATTRANSPARENCE : aStr="XATTR_FILLFLOATTRANSPARENCE "; break;
+ case XATTR_FILLRESERVED2 : aStr="XATTR_FILLRESERVED2 "; break;
+ case XATTR_FILLBMP_SIZELOG : aStr="XATTR_FILLBMP_SIZELOG "; break;
+ case XATTR_FILLBMP_TILEOFFSETX : aStr="XATTR_FILLBMP_TILEOFFSETX "; break;
+ case XATTR_FILLBMP_TILEOFFSETY : aStr="XATTR_FILLBMP_TILEOFFSETY "; break;
+
+ case XATTR_FILLBMP_STRETCH : aStr="XATTR_FILLBMP_STRETCH "; break;
+ case XATTR_FILLRESERVED3 : aStr="XATTR_FILLRESERVED3 "; break;
+ case XATTR_FILLRESERVED4 : aStr="XATTR_FILLRESERVED4 "; break;
+ case XATTR_FILLRESERVED5 : aStr="XATTR_FILLRESERVED5 "; break;
+ case XATTR_FILLRESERVED6 : aStr="XATTR_FILLRESERVED6 "; break;
+ case XATTR_FILLRESERVED7 : aStr="XATTR_FILLRESERVED7 "; break;
+ case XATTR_FILLRESERVED8 : aStr="XATTR_FILLRESERVED8 "; break;
+ case XATTR_FILLBMP_POSOFFSETX : aStr="XATTR_FILLBMP_POSOFFSETX "; break;
+ case XATTR_FILLBMP_POSOFFSETY : aStr="XATTR_FILLBMP_POSOFFSETY "; break;
+ case XATTR_FILLBACKGROUND : aStr="XATTR_FILLBACKGROUND "; break;
+ case XATTR_FILLRESERVED10 : aStr="XATTR_FILLRESERVED10 "; break;
+ case XATTR_FILLRESERVED11 : aStr="XATTR_FILLRESERVED11 "; break;
+ case XATTR_FILLRESERVED_LAST : aStr="XATTR_FILLRESERVED_LAST "; break;
+
+ case XATTRSET_FILL : aStr="XATTRSET_FILL "; break;
+
+ case XATTR_FORMTXTSTYLE : aStr="XATTR_FORMTXTSTYLE "; break;
+ case XATTR_FORMTXTADJUST : aStr="XATTR_FORMTXTADJUST "; break;
+ case XATTR_FORMTXTDISTANCE : aStr="XATTR_FORMTXTDISTANCE "; break;
+ case XATTR_FORMTXTSTART : aStr="XATTR_FORMTXTSTART "; break;
+ case XATTR_FORMTXTMIRROR : aStr="XATTR_FORMTXTMIRROR "; break;
+ case XATTR_FORMTXTOUTLINE : aStr="XATTR_FORMTXTOUTLINE "; break;
+ case XATTR_FORMTXTSHADOW : aStr="XATTR_FORMTXTSHADOW "; break;
+ case XATTR_FORMTXTSHDWCOLOR : aStr="XATTR_FORMTXTSHDWCOLOR "; break;
+ case XATTR_FORMTXTSHDWXVAL : aStr="XATTR_FORMTXTSHDWXVAL "; break;
+ case XATTR_FORMTXTSHDWYVAL : aStr="XATTR_FORMTXTSHDWYVAL "; break;
+ case XATTR_FORMTXTSTDFORM : aStr="XATTR_FORMTXTSTDFORM "; break;
+ case XATTR_FORMTXTHIDEFORM : aStr="XATTR_FORMTXTHIDEFORM "; break;
+ case XATTR_FORMTXTSHDWTRANSP : aStr="XATTR_FORMTXTSHDWTRANSP "; break;
+ case XATTR_FTRESERVED2 : aStr="XATTR_FTRESERVED2 "; break;
+ case XATTR_FTRESERVED3 : aStr="XATTR_FTRESERVED3 "; break;
+ case XATTR_FTRESERVED4 : aStr="XATTR_FTRESERVED4 "; break;
+ case XATTR_FTRESERVED5 : aStr="XATTR_FTRESERVED5 "; break;
+ case XATTR_FTRESERVED_LAST : aStr="XATTR_FTRESERVED_LAST "; break;
+ case XATTRSET_TEXT : aStr="XATTRSET_TEXT "; break;
+
+ case SDRATTR_SHADOW : aStr="SDRATTR_SHADOW "; break;
+ case SDRATTR_SHADOWCOLOR : aStr="SDRATTR_SHADOWCOLOR "; break;
+ case SDRATTR_SHADOWXDIST : aStr="SDRATTR_SHADOWXDIST "; break;
+ case SDRATTR_SHADOWYDIST : aStr="SDRATTR_SHADOWYDIST "; break;
+ case SDRATTR_SHADOWTRANSPARENCE : aStr="SDRATTR_SHADOWTRANSPARENCE "; break;
+ case SDRATTR_SHADOW3D : aStr="SDRATTR_SHADOW3D "; break;
+ case SDRATTR_SHADOWPERSP : aStr="SDRATTR_SHADOWPERSP "; break;
+ case SDRATTR_SHADOWRESERVE1 : aStr="SDRATTR_SHADOWRESERVE1 "; break;
+ case SDRATTR_SHADOWRESERVE2 : aStr="SDRATTR_SHADOWRESERVE2 "; break;
+ case SDRATTR_SHADOWRESERVE3 : aStr="SDRATTR_SHADOWRESERVE3 "; break;
+ case SDRATTR_SHADOWRESERVE4 : aStr="SDRATTR_SHADOWRESERVE4 "; break;
+ case SDRATTR_SHADOWRESERVE5 : aStr="SDRATTR_SHADOWRESERVE5 "; break;
+ case SDRATTRSET_SHADOW : aStr="SDRATTRSET_SHADOW "; break;
+
+ case SDRATTR_CAPTIONTYPE : aStr="SDRATTR_CAPTIONTYPE "; break;
+ case SDRATTR_CAPTIONFIXEDANGLE : aStr="SDRATTR_CAPTIONFIXEDANGLE "; break;
+ case SDRATTR_CAPTIONANGLE : aStr="SDRATTR_CAPTIONANGLE "; break;
+ case SDRATTR_CAPTIONGAP : aStr="SDRATTR_CAPTIONGAP "; break;
+ case SDRATTR_CAPTIONESCDIR : aStr="SDRATTR_CAPTIONESCDIR "; break;
+ case SDRATTR_CAPTIONESCISREL : aStr="SDRATTR_CAPTIONESCISREL "; break;
+ case SDRATTR_CAPTIONESCREL : aStr="SDRATTR_CAPTIONESCREL "; break;
+ case SDRATTR_CAPTIONESCABS : aStr="SDRATTR_CAPTIONESCABS "; break;
+ case SDRATTR_CAPTIONLINELEN : aStr="SDRATTR_CAPTIONLINELEN "; break;
+ case SDRATTR_CAPTIONFITLINELEN : aStr="SDRATTR_CAPTIONFITLINELEN "; break;
+ case SDRATTR_CAPTIONRESERVE1 : aStr="SDRATTR_CAPTIONRESERVE1 "; break;
+ case SDRATTR_CAPTIONRESERVE2 : aStr="SDRATTR_CAPTIONRESERVE2 "; break;
+ case SDRATTR_CAPTIONRESERVE3 : aStr="SDRATTR_CAPTIONRESERVE3 "; break;
+ case SDRATTR_CAPTIONRESERVE4 : aStr="SDRATTR_CAPTIONRESERVE4 "; break;
+ case SDRATTR_CAPTIONRESERVE5 : aStr="SDRATTR_CAPTIONRESERVE5 "; break;
+ case SDRATTRSET_CAPTION : aStr="SDRATTRSET_CAPTION "; break;
+
+ case SDRATTRSET_OUTLINER : aStr="SDRATTRSET_OUTLINER "; break;
+
+ case SDRATTR_ECKENRADIUS : aStr="SDRATTR_ECKENRADIUS "; break;
+ case SDRATTR_TEXT_MINFRAMEHEIGHT : aStr="SDRATTR_TEXT_MINFRAMEHEIGHT "; break;
+ case SDRATTR_TEXT_AUTOGROWHEIGHT : aStr="SDRATTR_TEXT_AUTOGROWHEIGHT "; break;
+ case SDRATTR_TEXT_FITTOSIZE : aStr="SDRATTR_TEXT_FITTOSIZE "; break;
+ case SDRATTR_TEXT_LEFTDIST : aStr="SDRATTR_TEXT_LEFTDIST "; break;
+ case SDRATTR_TEXT_RIGHTDIST : aStr="SDRATTR_TEXT_RIGHTDIST "; break;
+ case SDRATTR_TEXT_UPPERDIST : aStr="SDRATTR_TEXT_UPPERDIST "; break;
+ case SDRATTR_TEXT_LOWERDIST : aStr="SDRATTR_TEXT_LOWERDIST "; break;
+ case SDRATTR_TEXT_VERTADJUST : aStr="SDRATTR_TEXT_VERTADJUST "; break;
+ case SDRATTR_TEXT_MAXFRAMEHEIGHT : aStr="SDRATTR_TEXT_MAXFRAMEHEIGHT "; break;
+ case SDRATTR_TEXT_MINFRAMEWIDTH : aStr="SDRATTR_TEXT_MINFRAMEWIDTH "; break;
+ case SDRATTR_TEXT_MAXFRAMEWIDTH : aStr="SDRATTR_TEXT_MAXFRAMEWIDTH "; break;
+ case SDRATTR_TEXT_AUTOGROWWIDTH : aStr="SDRATTR_TEXT_AUTOGROWWIDTH "; break;
+ case SDRATTR_TEXT_HORZADJUST : aStr="SDRATTR_TEXT_HORZADJUST "; break;
+ case SDRATTR_TEXT_ANIKIND : aStr="SDRATTR_TEXT_ANIKIND "; break;
+ case SDRATTR_TEXT_ANIDIRECTION : aStr="SDRATTR_TEXT_ANIDIRECTION "; break;
+ case SDRATTR_TEXT_ANISTARTINSIDE : aStr="SDRATTR_TEXT_ANISTARTINSIDE "; break;
+ case SDRATTR_TEXT_ANISTOPINSIDE : aStr="SDRATTR_TEXT_ANISTOPINSIDE "; break;
+ case SDRATTR_TEXT_ANICOUNT : aStr="SDRATTR_TEXT_ANICOUNT "; break;
+ case SDRATTR_TEXT_ANIDELAY : aStr="SDRATTR_TEXT_ANIDELAY "; break;
+ case SDRATTR_TEXT_ANIAMOUNT : aStr="SDRATTR_TEXT_ANIAMOUNT "; break;
+ case SDRATTR_TEXT_CONTOURFRAME : aStr="SDRATTR_TEXT_CONTOURFRAME "; break;
+ case SDRATTR_AUTOSHAPE_ADJUSTMENT : aStr="SDRATTR_AUTOSHAPE_ADJUSTMENT "; break;
+ case SDRATTR_RESERVE14 : aStr="SDRATTR_RESERVE14 "; break;
+ case SDRATTR_RESERVE15 : aStr="SDRATTR_RESERVE15 "; break;
+ case SDRATTR_RESERVE16 : aStr="SDRATTR_RESERVE16 "; break;
+ case SDRATTR_RESERVE17 : aStr="SDRATTR_RESERVE17 "; break;
+ case SDRATTR_RESERVE18 : aStr="SDRATTR_RESERVE18 "; break;
+ case SDRATTR_RESERVE19 : aStr="SDRATTR_RESERVE19 "; break;
+ case SDRATTRSET_MISC : aStr="SDRATTRSET_MISC "; break;
+
+ case SDRATTR_EDGEKIND : aStr="SDRATTR_EDGEKIND "; break;
+ case SDRATTR_EDGENODE1HORZDIST : aStr="SDRATTR_EDGENODE1HORZDIST "; break;
+ case SDRATTR_EDGENODE1VERTDIST : aStr="SDRATTR_EDGENODE1VERTDIST "; break;
+ case SDRATTR_EDGENODE2HORZDIST : aStr="SDRATTR_EDGENODE2HORZDIST "; break;
+ case SDRATTR_EDGENODE2VERTDIST : aStr="SDRATTR_EDGENODE2VERTDIST "; break;
+ case SDRATTR_EDGENODE1GLUEDIST : aStr="SDRATTR_EDGENODE1GLUEDIST "; break;
+ case SDRATTR_EDGENODE2GLUEDIST : aStr="SDRATTR_EDGENODE2GLUEDIST "; break;
+ case SDRATTR_EDGELINEDELTAANZ : aStr="SDRATTR_EDGELINEDELTAANZ "; break;
+ case SDRATTR_EDGELINE1DELTA : aStr="SDRATTR_EDGELINE1DELTA "; break;
+ case SDRATTR_EDGELINE2DELTA : aStr="SDRATTR_EDGELINE2DELTA "; break;
+ case SDRATTR_EDGELINE3DELTA : aStr="SDRATTR_EDGELINE3DELTA "; break;
+ case SDRATTR_EDGERESERVE02 : aStr="SDRATTR_EDGERESERVE02 "; break;
+ case SDRATTR_EDGERESERVE03 : aStr="SDRATTR_EDGERESERVE03 "; break;
+ case SDRATTR_EDGERESERVE04 : aStr="SDRATTR_EDGERESERVE04 "; break;
+ case SDRATTR_EDGERESERVE05 : aStr="SDRATTR_EDGERESERVE05 "; break;
+ case SDRATTR_EDGERESERVE06 : aStr="SDRATTR_EDGERESERVE06 "; break;
+ case SDRATTR_EDGERESERVE07 : aStr="SDRATTR_EDGERESERVE07 "; break;
+ case SDRATTR_EDGERESERVE08 : aStr="SDRATTR_EDGERESERVE08 "; break;
+ case SDRATTR_EDGERESERVE09 : aStr="SDRATTR_EDGERESERVE09 "; break;
+ case SDRATTRSET_EDGE : aStr="SDRATTRSET_EDGE "; break;
+
+ case SDRATTR_MEASUREKIND : aStr="SDRATTR_MEASUREKIND "; break;
+ case SDRATTR_MEASURETEXTHPOS : aStr="SDRATTR_MEASURETEXTHPOS "; break;
+ case SDRATTR_MEASURETEXTVPOS : aStr="SDRATTR_MEASURETEXTVPOS "; break;
+ case SDRATTR_MEASURELINEDIST : aStr="SDRATTR_MEASURELINEDIST "; break;
+ case SDRATTR_MEASUREHELPLINEOVERHANG : aStr="SDRATTR_MEASUREHELPLINEOVERHANG "; break;
+ case SDRATTR_MEASUREHELPLINEDIST : aStr="SDRATTR_MEASUREHELPLINEDIST "; break;
+ case SDRATTR_MEASUREHELPLINE1LEN : aStr="SDRATTR_MEASUREHELPLINE1LEN "; break;
+ case SDRATTR_MEASUREHELPLINE2LEN : aStr="SDRATTR_MEASUREHELPLINE2LEN "; break;
+ case SDRATTR_MEASUREBELOWREFEDGE : aStr="SDRATTR_MEASUREBELOWREFEDGE "; break;
+ case SDRATTR_MEASURETEXTROTA90 : aStr="SDRATTR_MEASURETEXTROTA90 "; break;
+ case SDRATTR_MEASURETEXTUPSIDEDOWN : aStr="SDRATTR_MEASURETEXTUPSIDEDOWN "; break;
+ case SDRATTR_MEASUREOVERHANG : aStr="SDRATTR_MEASUREOVERHANG "; break;
+ case SDRATTR_MEASUREUNIT : aStr="SDRATTR_MEASUREUNIT "; break;
+ case SDRATTR_MEASURESCALE : aStr="SDRATTR_MEASURESCALE "; break;
+ case SDRATTR_MEASURESHOWUNIT : aStr="SDRATTR_MEASURESHOWUNIT "; break;
+ case SDRATTR_MEASUREFORMATSTRING : aStr="SDRATTR_MEASUREFORMATSTRING "; break;
+ case SDRATTR_MEASURETEXTAUTOANGLE : aStr="SDRATTR_MEASURETEXTAUTOANGLE "; break;
+ case SDRATTR_MEASURETEXTAUTOANGLEVIEW: aStr="SDRATTR_MEASURETEXTAUTOANGLEVIEW"; break;
+ case SDRATTR_MEASURETEXTISFIXEDANGLE : aStr="SDRATTR_MEASURETEXTISFIXEDANGLE "; break;
+ case SDRATTR_MEASURETEXTFIXEDANGLE : aStr="SDRATTR_MEASURETEXTFIXEDANGLE "; break;
+ case SDRATTR_MEASURERESERVE04 : aStr="SDRATTR_MEASURERESERVE04 "; break;
+ case SDRATTR_MEASURERESERVE05 : aStr="SDRATTR_MEASURERESERVE05 "; break;
+ case SDRATTR_MEASURERESERVE06 : aStr="SDRATTR_MEASURERESERVE06 "; break;
+ case SDRATTR_MEASURERESERVE07 : aStr="SDRATTR_MEASURERESERVE07 "; break;
+ case SDRATTRSET_MEASURE : aStr="SDRATTRSET_MEASURE "; break;
+
+ case SDRATTR_CIRCKIND : aStr="SDRATTR_CIRCKIND "; break;
+ case SDRATTR_CIRCSTARTANGLE : aStr="SDRATTR_CIRCSTARTANGLE "; break;
+ case SDRATTR_CIRCENDANGLE : aStr="SDRATTR_CIRCENDANGLE "; break;
+ case SDRATTR_CIRCRESERVE0 : aStr="SDRATTR_CIRCRESERVE0 "; break;
+ case SDRATTR_CIRCRESERVE1 : aStr="SDRATTR_CIRCRESERVE1 "; break;
+ case SDRATTR_CIRCRESERVE2 : aStr="SDRATTR_CIRCRESERVE2 "; break;
+ case SDRATTR_CIRCRESERVE3 : aStr="SDRATTR_CIRCRESERVE3 "; break;
+ case SDRATTRSET_CIRC : aStr="SDRATTRSET_CIRC "; break;
+
+ case SDRATTR_OBJMOVEPROTECT : aStr="SDRATTR_OBJMOVEPROTECT "; break;
+ case SDRATTR_OBJSIZEPROTECT : aStr="SDRATTR_OBJSIZEPROTECT "; break;
+ case SDRATTR_OBJPRINTABLE : aStr="SDRATTR_OBJPRINTABLE "; break;
+ case SDRATTR_LAYERID : aStr="SDRATTR_LAYERID "; break;
+ case SDRATTR_LAYERNAME : aStr="SDRATTR_LAYERNAME "; break;
+ case SDRATTR_OBJECTNAME : aStr="SDRATTR_OBJECTNAME "; break;
+ case SDRATTR_ALLPOSITIONX : aStr="SDRATTR_ALLPOSITIONX "; break;
+ case SDRATTR_ALLPOSITIONY : aStr="SDRATTR_ALLPOSITIONY "; break;
+ case SDRATTR_ALLSIZEWIDTH : aStr="SDRATTR_ALLSIZEWIDTH "; break;
+ case SDRATTR_ALLSIZEHEIGHT : aStr="SDRATTR_ALLSIZEHEIGHT "; break;
+ case SDRATTR_ONEPOSITIONX : aStr="SDRATTR_ONEPOSITIONX "; break;
+ case SDRATTR_ONEPOSITIONY : aStr="SDRATTR_ONEPOSITIONY "; break;
+ case SDRATTR_ONESIZEWIDTH : aStr="SDRATTR_ONESIZEWIDTH "; break;
+ case SDRATTR_ONESIZEHEIGHT : aStr="SDRATTR_ONESIZEHEIGHT "; break;
+ case SDRATTR_LOGICSIZEWIDTH : aStr="SDRATTR_LOGICSIZEWIDTH "; break;
+ case SDRATTR_LOGICSIZEHEIGHT : aStr="SDRATTR_LOGICSIZEHEIGHT "; break;
+ case SDRATTR_ROTATEANGLE : aStr="SDRATTR_ROTATEANGLE "; break;
+ case SDRATTR_SHEARANGLE : aStr="SDRATTR_SHEARANGLE "; break;
+ case SDRATTR_MOVEX : aStr="SDRATTR_MOVEX "; break;
+ case SDRATTR_MOVEY : aStr="SDRATTR_MOVEY "; break;
+ case SDRATTR_RESIZEXONE : aStr="SDRATTR_RESIZEXONE "; break;
+ case SDRATTR_RESIZEYONE : aStr="SDRATTR_RESIZEYONE "; break;
+ case SDRATTR_ROTATEONE : aStr="SDRATTR_ROTATEONE "; break;
+ case SDRATTR_HORZSHEARONE : aStr="SDRATTR_HORZSHEARONE "; break;
+ case SDRATTR_VERTSHEARONE : aStr="SDRATTR_VERTSHEARONE "; break;
+ case SDRATTR_RESIZEXALL : aStr="SDRATTR_RESIZEXALL "; break;
+ case SDRATTR_RESIZEYALL : aStr="SDRATTR_RESIZEYALL "; break;
+ case SDRATTR_ROTATEALL : aStr="SDRATTR_ROTATEALL "; break;
+ case SDRATTR_HORZSHEARALL : aStr="SDRATTR_HORZSHEARALL "; break;
+ case SDRATTR_VERTSHEARALL : aStr="SDRATTR_VERTSHEARALL "; break;
+ case SDRATTR_TRANSFORMREF1X : aStr="SDRATTR_TRANSFORMREF1X "; break;
+ case SDRATTR_TRANSFORMREF1Y : aStr="SDRATTR_TRANSFORMREF1Y "; break;
+ case SDRATTR_TRANSFORMREF2X : aStr="SDRATTR_TRANSFORMREF2X "; break;
+ case SDRATTR_TRANSFORMREF2Y : aStr="SDRATTR_TRANSFORMREF2Y "; break;
+
+ case SDRATTR_GRAFRED : aStr="SDRATTR_GRAFRED "; break;
+ case SDRATTR_GRAFGREEN : aStr="SDRATTR_GRAFGREEN "; break;
+ case SDRATTR_GRAFBLUE : aStr="SDRATTR_GRAFBLUE "; break;
+ case SDRATTR_GRAFLUMINANCE : aStr="SDRATTR_GRAFLUMINANCE "; break;
+ case SDRATTR_GRAFCONTRAST : aStr="SDRATTR_GRAFCONTRAST "; break;
+ case SDRATTR_GRAFGAMMA : aStr="SDRATTR_GRAFGAMMA "; break;
+ case SDRATTR_GRAFTRANSPARENCE : aStr="SDRATTR_GRAFTRANSPARENCE "; break;
+ case SDRATTR_GRAFINVERT : aStr="SDRATTR_GRAFINVERT "; break;
+ case SDRATTR_GRAFMODE : aStr="SDRATTR_GRAFMODE "; break;
+ case SDRATTR_GRAFRESERVE2 : aStr="SDRATTR_GRAFRESERVE2 "; break;
+ case SDRATTR_GRAFRESERVE3 : aStr="SDRATTR_GRAFRESERVE3 "; break;
+ case SDRATTR_GRAFRESERVE4 : aStr="SDRATTR_GRAFRESERVE4 "; break;
+ case SDRATTR_GRAFRESERVE5 : aStr="SDRATTR_GRAFRESERVE5 "; break;
+ case SDRATTR_GRAFRESERVE6 : aStr="SDRATTR_GRAFRESERVE6 "; break;
+ case SDRATTRSET_GRAF : aStr="SDRATTRSET_GRAF "; break;
+
+ case EE_PARA_HYPHENATE : aStr="EE_PARA_HYPHENATE "; break;
+ case EE_PARA_BULLETSTATE : aStr="EE_PARA_BULLETSTATE "; break;
+ case EE_PARA_OUTLLRSPACE : aStr="EE_PARA_OUTLLRSPACE "; break;
+ case EE_PARA_OUTLLEVEL : aStr="EE_PARA_OUTLLEVEL "; break;
+ case EE_PARA_BULLET : aStr="EE_PARA_BULLET "; break;
+ case EE_PARA_LRSPACE : aStr="EE_PARA_LRSPACE "; break;
+ case EE_PARA_ULSPACE : aStr="EE_PARA_ULSPACE "; break;
+ case EE_PARA_SBL : aStr="EE_PARA_SBL "; break;
+ case EE_PARA_JUST : aStr="EE_PARA_JUST "; break;
+ case EE_PARA_TABS : aStr="EE_PARA_TABS "; break;
+
+ case EE_CHAR_COLOR : aStr="EE_CHAR_COLOR "; break;
+ case EE_CHAR_FONTINFO : aStr="EE_CHAR_FONTINFO "; break;
+ case EE_CHAR_FONTHEIGHT : aStr="EE_CHAR_FONTHEIGHT "; break;
+ case EE_CHAR_FONTWIDTH : aStr="EE_CHAR_FONTWIDTH "; break;
+ case EE_CHAR_WEIGHT : aStr="EE_CHAR_WEIGHT "; break;
+ case EE_CHAR_UNDERLINE : aStr="EE_CHAR_UNDERLINE "; break;
+ case EE_CHAR_STRIKEOUT : aStr="EE_CHAR_STRIKEOUT "; break;
+ case EE_CHAR_ITALIC : aStr="EE_CHAR_ITALIC "; break;
+ case EE_CHAR_OUTLINE : aStr="EE_CHAR_OUTLINE "; break;
+ case EE_CHAR_SHADOW : aStr="EE_CHAR_SHADOW "; break;
+ case EE_CHAR_ESCAPEMENT : aStr="EE_CHAR_ESCAPEMENT "; break;
+ case EE_CHAR_PAIRKERNING : aStr="EE_CHAR_PAIRKERNING "; break;
+ case EE_CHAR_KERNING : aStr="EE_CHAR_KERNING "; break;
+ case EE_CHAR_WLM : aStr="EE_CHAR_WLM "; break;
+ case EE_FEATURE_TAB : aStr="EE_FEATURE_TAB "; break;
+ case EE_FEATURE_LINEBR : aStr="EE_FEATURE_LINEBR "; break;
+ case EE_FEATURE_NOTCONV : aStr="EE_FEATURE_NOTCONV "; break;
+ case EE_FEATURE_FIELD : aStr="EE_FEATURE_FIELD "; break;
+ } // switch
+
+ aStr.EraseTrailingChars();
+#endif // if DBG_UTIL
+
+ rWhichName = aStr;
+ return (BOOL)aStr.Len();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// FractionItem
+////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1_AUTOFACTORY(SdrFractionItem,SfxPoolItem);
+
+SdrFractionItem::SdrFractionItem(USHORT nId, SvStream& rIn):
+ SfxPoolItem(nId)
+{
+ INT32 nMul,nDiv;
+ rIn>>nMul;
+ rIn>>nDiv;
+ nValue=Fraction(nMul,nDiv);
+}
+
+int __EXPORT SdrFractionItem::operator==(const SfxPoolItem& rCmp) const
+{
+ return SfxPoolItem::operator==(rCmp) &&
+ ((SdrFractionItem&)rCmp).GetValue()==nValue;
+}
+
+SfxItemPresentation __EXPORT SdrFractionItem::GetPresentation(
+ SfxItemPresentation ePresentation, SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresentationMetric, XubString &rText, const International *) const
+{
+ if(nValue.IsValid())
+ {
+ INT32 nDiv = nValue.GetDenominator();
+ rText = UniString::CreateFromInt32(nValue.GetNumerator());
+
+ if(nDiv != 1)
+ {
+ rText += sal_Unicode('/');
+ rText += UniString::CreateFromInt32(nDiv);
+ }
+ }
+ else
+ {
+ rText = UniString();
+ rText += sal_Unicode('?');
+ }
+
+ if(ePresentation == SFX_ITEM_PRESENTATION_COMPLETE)
+ {
+ XubString aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+
+ return ePresentation;
+}
+
+SfxPoolItem* __EXPORT SdrFractionItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SdrFractionItem(Which(),rIn);
+}
+
+SvStream& __EXPORT SdrFractionItem::Store(SvStream& rOut, USHORT nItemVers) const
+{
+ rOut<<INT32(nValue.GetNumerator());
+ rOut<<INT32(nValue.GetDenominator());
+ return rOut;
+}
+
+SfxPoolItem* __EXPORT SdrFractionItem::Clone(SfxItemPool *pPool) const
+{
+ return new SdrFractionItem(Which(),GetValue());
+}
+
+#ifdef SDR_ISPOOLABLE
+int __EXPORT SdrFractionItem::IsPoolable() const
+{
+ USHORT nId=Which();
+ return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
+}
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// ScaleItem
+////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1_AUTOFACTORY(SdrScaleItem,SdrFractionItem);
+
+SfxItemPresentation __EXPORT SdrScaleItem::GetPresentation(
+ SfxItemPresentation ePresentation, SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresentationMetric, XubString &rText, const International *) const
+{
+ if(GetValue().IsValid())
+ {
+ INT32 nDiv = GetValue().GetDenominator();
+
+ rText = UniString::CreateFromInt32(GetValue().GetNumerator());
+ rText += sal_Unicode(':');
+ rText += UniString::CreateFromInt32(nDiv);
+ }
+ else
+ {
+ rText = UniString();
+ rText += sal_Unicode('?');
+ }
+
+ if(ePresentation == SFX_ITEM_PRESENTATION_COMPLETE)
+ {
+ XubString aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+
+ return ePresentation;
+}
+
+SfxPoolItem* __EXPORT SdrScaleItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SdrScaleItem(Which(),rIn);
+}
+
+SfxPoolItem* __EXPORT SdrScaleItem::Clone(SfxItemPool *pPool) const
+{
+ return new SdrScaleItem(Which(),GetValue());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// OnOffItem
+////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1_AUTOFACTORY(SdrOnOffItem,SfxBoolItem);
+
+SfxPoolItem* __EXPORT SdrOnOffItem::Clone(SfxItemPool* pPool) const
+{
+ return new SdrOnOffItem(Which(),GetValue());
+}
+
+SfxPoolItem* __EXPORT SdrOnOffItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SdrOnOffItem(Which(),rIn);
+}
+
+XubString __EXPORT SdrOnOffItem::GetValueTextByVal(BOOL bVal) const
+{
+ if (bVal) return ImpGetResStr(STR_ItemValON);
+ else return ImpGetResStr(STR_ItemValOFF);
+}
+
+SfxItemPresentation __EXPORT SdrOnOffItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByVal(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+#ifdef SDR_ISPOOLABLE
+int __EXPORT SdrOnOffItem::IsPoolable() const
+{
+ USHORT nId=Which();
+ return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
+}
+#endif
+
+TYPEINIT1_AUTOFACTORY(SdrYesNoItem,SfxBoolItem);
+
+SfxPoolItem* __EXPORT SdrYesNoItem::Clone(SfxItemPool* pPool) const
+{
+ return new SdrYesNoItem(Which(),GetValue());
+}
+
+SfxPoolItem* __EXPORT SdrYesNoItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SdrYesNoItem(Which(),rIn);
+}
+
+XubString __EXPORT SdrYesNoItem::GetValueTextByVal(BOOL bVal) const
+{
+ if (bVal) return ImpGetResStr(STR_ItemValYES);
+ else return ImpGetResStr(STR_ItemValNO);
+}
+
+SfxItemPresentation __EXPORT SdrYesNoItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByVal(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+#ifdef SDR_ISPOOLABLE
+int __EXPORT SdrYesNoItem::IsPoolable() const
+{
+ USHORT nId=Which();
+ return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
+}
+#endif
+
+//------------------------------------------------------------
+// class SdrPercentItem
+//------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SdrPercentItem,SfxUInt16Item);
+
+SfxPoolItem* __EXPORT SdrPercentItem::Clone(SfxItemPool* pPool) const
+{
+ return new SdrPercentItem(Which(),GetValue());
+}
+
+SfxPoolItem* __EXPORT SdrPercentItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SdrPercentItem(Which(),rIn);
+}
+
+SfxItemPresentation __EXPORT SdrPercentItem::GetPresentation(
+ SfxItemPresentation ePres, SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText = UniString::CreateFromInt32(GetValue());
+ rText += sal_Unicode('%');
+
+ if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
+ {
+ XubString aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+
+ return ePres;
+}
+
+#ifdef SDR_ISPOOLABLE
+int __EXPORT SdrPercentItem::IsPoolable() const
+{
+ USHORT nId=Which();
+ return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
+}
+#endif
+
+//------------------------------------------------------------
+// class SdrAngleItem
+//------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SdrAngleItem,SfxInt32Item);
+
+SfxPoolItem* __EXPORT SdrAngleItem::Clone(SfxItemPool* pPool) const
+{
+ return new SdrAngleItem(Which(),GetValue());
+}
+
+SfxPoolItem* __EXPORT SdrAngleItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SdrAngleItem(Which(),rIn);
+}
+
+SfxItemPresentation __EXPORT SdrAngleItem::GetPresentation(
+ SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+ XubString& rText, const International * pInternational) const
+{
+ INT32 nValue(GetValue());
+ BOOL bNeg(nValue < 0);
+
+ if(bNeg)
+ nValue = -nValue;
+
+ rText = UniString::CreateFromInt32(nValue);
+
+ if(nValue)
+ {
+ sal_Unicode aUnicodeNull('0');
+ xub_StrLen nAnz(2);
+
+ if(!pInternational)
+ pInternational = &GetpApp()->GetAppInternational();
+
+ if(pInternational->IsNumLeadingZero())
+ nAnz++;
+
+ while(rText.Len() < nAnz)
+ rText.Insert(aUnicodeNull, 0);
+
+ xub_StrLen nLen = rText.Len();
+ BOOL bNull1(rText.GetChar(nLen-1) == aUnicodeNull);
+ BOOL bNull2(bNull1 && rText.GetChar(nLen-2) == aUnicodeNull);
+
+ if(bNull2)
+ {
+ // keine Nachkommastellen
+ rText.Erase(nLen-2);
+ }
+ else
+ {
+ sal_Unicode cDec = pInternational->GetNumDecimalSep();
+ rText.Insert(cDec, nLen-2);
+
+ if(bNull1)
+ rText.Erase(nLen);
+ }
+
+ if(bNeg)
+ rText.Insert(sal_Unicode('-'), 0);
+ }
+
+ rText += sal_Unicode(DEGREE_CHAR);
+
+ if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
+ {
+ XubString aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+
+ return ePres;
+}
+
+#ifdef SDR_ISPOOLABLE
+int __EXPORT SdrAngleItem::IsPoolable() const
+{
+ USHORT nId=Which();
+ return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
+}
+#endif
+
+//------------------------------------------------------------
+// class SdrMetricItem
+//------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SdrMetricItem,SfxInt32Item);
+
+SfxPoolItem* __EXPORT SdrMetricItem::Clone(SfxItemPool* pPool) const
+{
+ return new SdrMetricItem(Which(),GetValue());
+}
+
+SfxPoolItem* __EXPORT SdrMetricItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new SdrMetricItem(Which(),rIn);
+}
+
+FASTBOOL __EXPORT SdrMetricItem::HasMetrics() const
+{
+ return TRUE;
+}
+
+FASTBOOL __EXPORT SdrMetricItem::ScaleMetrics(long nMul, long nDiv)
+{
+ if (GetValue()!=0) {
+ BigInt aVal(GetValue());
+ aVal*=nMul;
+ aVal+=nDiv/2; // fuer korrektes Runden
+ aVal/=nDiv;
+ SetValue(long(aVal));
+ }
+ return TRUE;
+}
+
+SfxItemPresentation __EXPORT SdrMetricItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ long nValue=GetValue();
+ SdrFormatter aFmt((MapUnit)eCoreMetric,(MapUnit)ePresMetric);
+ aFmt.TakeStr(nValue,rText);
+ String aStr;
+ aFmt.TakeUnitStr((MapUnit)ePresMetric,aStr);
+ rText+=aStr;
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+#ifdef SDR_ISPOOLABLE
+int __EXPORT SdrMetricItem::IsPoolable() const
+{
+ USHORT nId=Which();
+ return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST;
+}
+#endif
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// ShadowSetItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1(SdrShadowSetItem,SfxSetItem);
+
+SdrShadowSetItem::SdrShadowSetItem(SfxItemSet* pItemSet):
+ SfxSetItem(SDRATTRSET_SHADOW,pItemSet)
+{
+}
+
+SdrShadowSetItem::SdrShadowSetItem(SfxItemPool* pItemPool):
+ SfxSetItem(SDRATTRSET_SHADOW,new SfxItemSet(*pItemPool,SDRATTR_SHADOW_FIRST,SDRATTR_SHADOW_LAST))
+{
+}
+
+SfxPoolItem* __EXPORT SdrShadowSetItem::Clone(SfxItemPool* pToPool) const
+{
+ return new SdrShadowSetItem(*this,pToPool);
+}
+
+SfxPoolItem* __EXPORT SdrShadowSetItem::Create(SvStream& rStream, USHORT nVersion) const
+{
+ SfxItemSet *pSet=new SfxItemSet(*GetItemSet().GetPool(),SDRATTR_SHADOW_FIRST,SDRATTR_SHADOW_LAST);
+ pSet->Load(rStream);
+ return new SdrShadowSetItem(pSet);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Items des Legendenobjekts
+////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1_AUTOFACTORY(SdrCaptionTypeItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrCaptionTypeItem::Clone(SfxItemPool* pPool) const { return new SdrCaptionTypeItem(*this); }
+
+SfxPoolItem* __EXPORT SdrCaptionTypeItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrCaptionTypeItem(rIn); }
+
+USHORT __EXPORT SdrCaptionTypeItem::GetValueCount() const { return 4; }
+
+XubString __EXPORT SdrCaptionTypeItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValCAPTIONTYPE1+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrCaptionTypeItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+TYPEINIT1_AUTOFACTORY(SdrCaptionEscDirItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrCaptionEscDirItem::Clone(SfxItemPool* pPool) const { return new SdrCaptionEscDirItem(*this); }
+
+SfxPoolItem* __EXPORT SdrCaptionEscDirItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrCaptionEscDirItem(rIn); }
+
+USHORT __EXPORT SdrCaptionEscDirItem::GetValueCount() const { return 3; }
+
+XubString __EXPORT SdrCaptionEscDirItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValCAPTIONESCHORI+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrCaptionEscDirItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// CaptionSetItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1(SdrCaptionSetItem,SfxSetItem);
+
+SfxPoolItem* __EXPORT SdrCaptionSetItem::Clone(SfxItemPool* pToPool) const
+{
+ return new SdrCaptionSetItem(*this,pToPool);
+}
+
+SfxPoolItem* __EXPORT SdrCaptionSetItem::Create(SvStream& rStream, USHORT nVersion) const
+{
+ SfxItemSet *pSet=new SfxItemSet(*GetItemSet().GetPool(),SDRATTR_CAPTION_FIRST,SDRATTR_CAPTION_LAST);
+ pSet->Load(rStream);
+ return new SdrCaptionSetItem(pSet);
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// OutlinerSetItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1(SdrOutlinerSetItem,SfxSetItem);
+
+SdrOutlinerSetItem::SdrOutlinerSetItem(SfxItemPool* pItemPool):
+ SfxSetItem(SDRATTRSET_OUTLINER,new SfxItemSet(*pItemPool,EE_ITEMS_START,EE_ITEMS_END))
+{
+}
+
+SfxPoolItem* __EXPORT SdrOutlinerSetItem::Clone(SfxItemPool* pToPool) const
+{
+ return new SdrOutlinerSetItem(*this,pToPool);
+}
+
+SfxPoolItem* __EXPORT SdrOutlinerSetItem::Create(SvStream& rStream, USHORT nVersion) const
+{
+ SfxItemSet *pSet=new SfxItemSet(*GetItemSet().GetPool(),EE_ITEMS_START,EE_ITEMS_END);
+ pSet->Load(rStream);
+ return new SdrOutlinerSetItem(pSet);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// MiscItems
+////////////////////////////////////////////////////////////////////////////////
+
+// FitToSize
+TYPEINIT1_AUTOFACTORY(SdrTextFitToSizeTypeItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Clone(SfxItemPool* pPool) const { return new SdrTextFitToSizeTypeItem(*this); }
+
+SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrTextFitToSizeTypeItem(rIn); }
+
+USHORT __EXPORT SdrTextFitToSizeTypeItem::GetValueCount() const { return 4; }
+
+XubString __EXPORT SdrTextFitToSizeTypeItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValFITTOSIZENONE+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+int __EXPORT SdrTextFitToSizeTypeItem::HasBoolValue() const { return TRUE; }
+
+BOOL __EXPORT SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SDRTEXTFIT_NONE; }
+
+void __EXPORT SdrTextFitToSizeTypeItem::SetBoolValue(BOOL bVal) { SetValue(bVal ? SDRTEXTFIT_PROPORTIONAL : SDRTEXTFIT_NONE); }
+
+sal_Bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ drawing::TextFitToSizeType eFS = (drawing::TextFitToSizeType)GetValue();
+ rVal <<= eFS;
+
+ return sal_True;
+}
+
+sal_Bool SdrTextFitToSizeTypeItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::TextFitToSizeType eFS;
+ if(!(rVal >>= eFS))
+ return sal_False;
+
+ SetValue( (SdrFitToSizeType)eFS );
+
+ return sal_True;
+}
+
+TYPEINIT1_AUTOFACTORY(SdrTextVertAdjustItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Clone(SfxItemPool* pPool) const { return new SdrTextVertAdjustItem(*this); }
+
+SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrTextVertAdjustItem(rIn); }
+
+USHORT __EXPORT SdrTextVertAdjustItem::GetValueCount() const { return 5; }
+
+XubString __EXPORT SdrTextVertAdjustItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValTEXTVADJTOP+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrTextVertAdjustItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+sal_Bool SdrTextVertAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::TextAdjust)GetValue();
+ return sal_True;
+}
+
+sal_Bool SdrTextVertAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::TextAdjust eAdj;
+ if(!(rVal >>= eAdj))
+ return sal_False;
+
+ SetValue( (SdrTextVertAdjust)eAdj );
+
+ return sal_True;
+}
+
+TYPEINIT1_AUTOFACTORY(SdrTextHorzAdjustItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrTextHorzAdjustItem::Clone(SfxItemPool* pPool) const { return new SdrTextHorzAdjustItem(*this); }
+
+SfxPoolItem* __EXPORT SdrTextHorzAdjustItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrTextHorzAdjustItem(rIn); }
+
+USHORT __EXPORT SdrTextHorzAdjustItem::GetValueCount() const { return 5; }
+
+XubString __EXPORT SdrTextHorzAdjustItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValTEXTHADJLEFT+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrTextHorzAdjustItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+sal_Bool SdrTextHorzAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::TextAdjust)GetValue();
+ return sal_True;
+}
+
+sal_Bool SdrTextHorzAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::TextAdjust eAdj;
+ if(!(rVal >>= eAdj))
+ return sal_False;
+
+ SetValue( (SdrTextHorzAdjust)eAdj );
+
+ return sal_True;
+}
+
+TYPEINIT1_AUTOFACTORY(SdrTextAniKindItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrTextAniKindItem::Clone(SfxItemPool* pPool) const { return new SdrTextAniKindItem(*this); }
+
+SfxPoolItem* __EXPORT SdrTextAniKindItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrTextAniKindItem(rIn); }
+
+USHORT __EXPORT SdrTextAniKindItem::GetValueCount() const { return 5; }
+
+XubString __EXPORT SdrTextAniKindItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValTEXTANI_NONE+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrTextAniKindItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+sal_Bool SdrTextAniKindItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::TextAnimationKind)GetValue();
+ return sal_True;
+}
+
+sal_Bool SdrTextAniKindItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::TextAnimationKind eKind;
+ if(!(rVal >>= eKind))
+ return sal_False;
+
+ SetValue( (SdrTextAniKind)eKind );
+
+ return sal_True;
+}
+
+TYPEINIT1_AUTOFACTORY(SdrTextAniDirectionItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrTextAniDirectionItem::Clone(SfxItemPool* pPool) const { return new SdrTextAniDirectionItem(*this); }
+
+SfxPoolItem* __EXPORT SdrTextAniDirectionItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrTextAniDirectionItem(rIn); }
+
+USHORT __EXPORT SdrTextAniDirectionItem::GetValueCount() const { return 4; }
+
+XubString __EXPORT SdrTextAniDirectionItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValTEXTANI_LEFT+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrTextAniDirectionItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+sal_Bool SdrTextAniDirectionItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::TextAnimationDirection)GetValue();
+ return sal_True;
+}
+
+sal_Bool SdrTextAniDirectionItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::TextAnimationDirection eDir;
+ if(!(rVal >>= eDir))
+ return sal_False;
+
+ SetValue( (SdrTextAniDirection)eDir );
+
+ return sal_True;
+}
+
+TYPEINIT1_AUTOFACTORY(SdrTextAniDelayItem,SfxUInt16Item);
+
+SfxPoolItem* __EXPORT SdrTextAniDelayItem::Clone(SfxItemPool* pPool) const { return new SdrTextAniDelayItem(*this); }
+
+SfxPoolItem* __EXPORT SdrTextAniDelayItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrTextAniDelayItem(rIn); }
+
+SfxItemPresentation __EXPORT SdrTextAniDelayItem::GetPresentation(
+ SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+ XubString& rText, const International *) const
+{
+ rText = UniString::CreateFromInt32(GetValue());
+ rText += sal_Unicode('m');
+ rText += sal_Unicode('s');
+
+ if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
+ {
+ XubString aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+
+ return ePres;
+}
+
+TYPEINIT1_AUTOFACTORY(SdrTextAniAmountItem,SfxInt16Item);
+
+SfxPoolItem* __EXPORT SdrTextAniAmountItem::Clone(SfxItemPool* pPool) const { return new SdrTextAniAmountItem(*this); }
+
+SfxPoolItem* __EXPORT SdrTextAniAmountItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrTextAniAmountItem(rIn); }
+
+FASTBOOL __EXPORT SdrTextAniAmountItem::HasMetrics() const
+{
+ return GetValue()>0;
+}
+
+FASTBOOL __EXPORT SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv)
+{
+ if (GetValue()>0) {
+ BigInt aVal(GetValue());
+ aVal*=nMul;
+ aVal+=nDiv/2; // fuer korrektes Runden
+ aVal/=nDiv;
+ SetValue(short(aVal));
+ return TRUE;
+ } else return FALSE;
+}
+
+SfxItemPresentation __EXPORT SdrTextAniAmountItem::GetPresentation(
+ SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+ XubString& rText, const International *) const
+{
+ INT32 nValue(GetValue());
+
+ if(!nValue)
+ nValue = -1L;
+
+ if(nValue < 0)
+ {
+ sal_Char aText[] = "pixel";
+
+ rText = UniString::CreateFromInt32(-nValue);
+ rText += UniString(aText, sizeof(aText-1));
+ }
+ else
+ {
+ SdrFormatter aFmt((MapUnit)eCoreMetric, (MapUnit)ePresMetric);
+ XubString aStr;
+
+ aFmt.TakeStr(nValue, rText);
+ aFmt.TakeUnitStr((MapUnit)ePresMetric, aStr);
+ rText += aStr;
+ }
+
+ if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
+ {
+ XubString aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+
+ return ePres;
+}
+
+TYPEINIT1_AUTOFACTORY( SdrAutoShapeAdjustmentItem, SfxPoolItem );
+
+SdrAutoShapeAdjustmentItem::SdrAutoShapeAdjustmentItem() : SfxPoolItem( SDRATTR_AUTOSHAPE_ADJUSTMENT )
+{
+}
+
+SdrAutoShapeAdjustmentItem::SdrAutoShapeAdjustmentItem( SvStream& rIn, sal_uInt16 nVersion ):
+ SfxPoolItem( SDRATTR_AUTOSHAPE_ADJUSTMENT )
+{
+ if ( nVersion )
+ {
+ SdrAutoShapeAdjustmentValue aVal;
+ sal_uInt32 i, nCount;
+ rIn >> nCount;
+ for ( i = 0; i < nCount; i++ )
+ {
+ rIn >> aVal.nValue;
+ SetValue( i, aVal );
+ }
+ }
+}
+
+SdrAutoShapeAdjustmentItem::~SdrAutoShapeAdjustmentItem()
+{
+ void* pPtr;
+ for ( pPtr = aAdjustmentValueList.First(); pPtr; pPtr = aAdjustmentValueList.Next() )
+ delete (SdrAutoShapeAdjustmentValue*)pPtr;
+}
+
+int __EXPORT SdrAutoShapeAdjustmentItem::operator==( const SfxPoolItem& rCmp ) const
+{
+ int bRet = SfxPoolItem::operator==( rCmp );
+ if ( bRet )
+ {
+ bRet = ((SdrAutoShapeAdjustmentItem&)rCmp).GetCount() == GetCount();
+ if ( bRet )
+ {
+ sal_uInt32 i;
+ for ( i = 0; i < GetCount(); i++ )
+ {
+ if ( ((SdrAutoShapeAdjustmentItem&)rCmp).GetValue( i ).nValue != GetValue( i ).nValue )
+ {
+ bRet = 0;
+ break;
+ }
+ }
+ }
+ }
+ return bRet;
+}
+
+SfxItemPresentation __EXPORT SdrAutoShapeAdjustmentItem::GetPresentation(
+ SfxItemPresentation ePresentation, SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresentationMetric, XubString &rText, const International *) const
+{
+ sal_uInt32 i, nCount = GetCount();
+ rText.Append( UniString::CreateFromInt32( nCount ) );
+ for ( i = 0; i < nCount; i++ )
+ {
+ rText += sal_Unicode( ' ' );
+ rText.Append( UniString::CreateFromInt32( GetValue( i ).nValue ) );
+ }
+ if ( ePresentation == SFX_ITEM_PRESENTATION_COMPLETE )
+ {
+ XubString aStr;
+
+ SdrItemPool::TakeItemName( Which(), aStr );
+ aStr += sal_Unicode( ' ' );
+ rText.Insert( aStr, 0 );
+ }
+ return ePresentation;
+}
+
+SfxPoolItem* __EXPORT SdrAutoShapeAdjustmentItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const
+{
+ return new SdrAutoShapeAdjustmentItem( rIn, nItemVersion );
+}
+
+SvStream& __EXPORT SdrAutoShapeAdjustmentItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
+{
+ if ( nItemVersion )
+ {
+ sal_uInt32 i, nCount = GetCount();
+ rOut << nCount;
+ for ( i = 0; i < nCount; i++ )
+ rOut << GetValue( i ).nValue;
+ }
+ return rOut;
+}
+
+SfxPoolItem* __EXPORT SdrAutoShapeAdjustmentItem::Clone( SfxItemPool *pPool ) const
+{
+ sal_uInt32 i;
+ SdrAutoShapeAdjustmentItem* pItem = new SdrAutoShapeAdjustmentItem;
+ for ( i = 0; i < GetCount(); i++ )
+ {
+ const SdrAutoShapeAdjustmentValue& rVal = GetValue( i );
+ pItem->SetValue( i, rVal );
+ }
+ return pItem;
+}
+
+#ifdef SDR_ISPOOLABLE
+int __EXPORT SdrAutoShapeAdjustmentItem::IsPoolable() const
+{
+ USHORT nId=Which();
+ return nId < SDRATTR_NOTPERSIST_FIRST || nId > SDRATTR_NOTPERSIST_LAST;
+}
+#endif
+
+const SdrAutoShapeAdjustmentValue& SdrAutoShapeAdjustmentItem::GetValue( sal_uInt32 nIndex ) const
+{
+#ifdef DBG_UTIL
+ if ( aAdjustmentValueList.Count() <= nIndex )
+ DBG_ERROR( "SdrAutoShapeAdjustemntItem::GetValue - nIndex out of range (SJ)" );
+#endif
+ return *(SdrAutoShapeAdjustmentValue*)aAdjustmentValueList.GetObject( nIndex );
+}
+
+void SdrAutoShapeAdjustmentItem::SetValue( sal_uInt32 nIndex, const SdrAutoShapeAdjustmentValue& rVal )
+{
+ sal_uInt32 i;
+ for ( i = GetCount(); i <= nIndex; i++ )
+ {
+ SdrAutoShapeAdjustmentValue* pItem = new SdrAutoShapeAdjustmentValue;
+ aAdjustmentValueList.Insert( pItem, LIST_APPEND );
+ }
+ SdrAutoShapeAdjustmentValue& rValue = *(SdrAutoShapeAdjustmentValue*)aAdjustmentValueList.GetObject( nIndex );
+ rValue.nValue = rVal.nValue;
+}
+
+sal_uInt16 SdrAutoShapeAdjustmentItem::GetVersion( sal_uInt16 nFileFormatVersion ) const
+{
+ return 1;
+}
+
+sal_Bool SdrAutoShapeAdjustmentItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ sal_uInt32 i, nCount = GetCount();
+ uno::Sequence< sal_uInt32 > aSequence( nCount );
+ if ( nCount )
+ {
+ sal_uInt32* pPtr = aSequence.getArray();
+ for ( i = 0; i < nCount; i++ )
+ *pPtr++ = GetValue( i ).nValue;
+ }
+ rVal <<= aSequence;
+ return sal_True;
+}
+
+sal_Bool SdrAutoShapeAdjustmentItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ uno::Sequence< sal_uInt32 > aSequence;
+ if( !( rVal >>= aSequence ) )
+ return sal_False;
+
+ void* pPtr;
+ for ( pPtr = aAdjustmentValueList.First(); pPtr; pPtr = aAdjustmentValueList.Next() )
+ delete (SdrAutoShapeAdjustmentValue*)pPtr;
+
+ sal_uInt32 i, nCount = aSequence.getLength();
+ if ( nCount )
+ {
+ const sal_uInt32* pPtr = aSequence.getConstArray();
+ for ( i = 0; i < nCount; i++ )
+ {
+ SdrAutoShapeAdjustmentValue* pItem = new SdrAutoShapeAdjustmentValue;
+ pItem->nValue = *pPtr++;
+ aAdjustmentValueList.Insert( pItem, LIST_APPEND );
+ }
+ }
+ return sal_True;
+}
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrMiscSetItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1(SdrMiscSetItem,SfxSetItem);
+
+SfxPoolItem* __EXPORT SdrMiscSetItem::Clone(SfxItemPool* pToPool) const
+{
+ return new SdrMiscSetItem(*this,pToPool);
+}
+
+SfxPoolItem* __EXPORT SdrMiscSetItem::Create(SvStream& rStream, USHORT nVersion) const
+{
+ SfxItemSet *pSet=new SfxItemSet(*GetItemSet().GetPool(),SDRATTR_MISC_FIRST,SDRATTR_MISC_LAST);
+ pSet->Load(rStream);
+ return new SdrMiscSetItem(pSet);
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Edge
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+// EdgeKind
+TYPEINIT1_AUTOFACTORY(SdrEdgeKindItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrEdgeKindItem::Clone(SfxItemPool* pPool) const { return new SdrEdgeKindItem(*this); }
+
+SfxPoolItem* __EXPORT SdrEdgeKindItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrEdgeKindItem(rIn); }
+
+USHORT __EXPORT SdrEdgeKindItem::GetValueCount() const { return 4; }
+
+XubString __EXPORT SdrEdgeKindItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValEDGE_ORTHOLINES+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+sal_Bool SdrEdgeKindItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ drawing::ConnectorType eCT = drawing::ConnectorType_STANDARD;
+
+ switch( GetValue() )
+ {
+ case SDREDGE_ORTHOLINES : eCT = drawing::ConnectorType_STANDARD; break;
+ case SDREDGE_THREELINES : eCT = drawing::ConnectorType_LINES; break;
+ case SDREDGE_ONELINE : eCT = drawing::ConnectorType_LINE; break;
+ case SDREDGE_BEZIER : eCT = drawing::ConnectorType_CURVE; break;
+ case SDREDGE_ARC : eCT = drawing::ConnectorType_CURVE; break;
+ default:
+ DBG_ERROR( "SdrEdgeKindItem::QueryValue : unknown enum" );
+ }
+
+ rVal <<= eCT;
+
+ return sal_True;
+}
+
+sal_Bool SdrEdgeKindItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::ConnectorType eCT;
+ if(!(rVal >>= eCT))
+ return sal_False;
+
+ SdrEdgeKind eEK = SDREDGE_ORTHOLINES;
+ switch( eCT )
+ {
+ case drawing::ConnectorType_STANDARD : eEK = SDREDGE_ORTHOLINES; break;
+ case drawing::ConnectorType_CURVE : eEK = SDREDGE_BEZIER; break;
+ case drawing::ConnectorType_LINE : eEK = SDREDGE_ONELINE; break;
+ case drawing::ConnectorType_LINES : eEK = SDREDGE_THREELINES; break;
+ default:
+ DBG_ERROR( "SdrEdgeKindItem::PuValue : unknown enum" );
+ }
+ SetValue( eEK );
+
+ return sal_True;
+}
+
+sal_Bool SdrEdgeNode1HorzDistItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+sal_Bool SdrEdgeNode1HorzDistItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ SetValue( nValue );
+ return sal_True;
+}
+
+BOOL SdrEdgeNode1VertDistItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+BOOL SdrEdgeNode1VertDistItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ SetValue( nValue );
+ return sal_True;
+}
+
+BOOL SdrEdgeNode2HorzDistItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+BOOL SdrEdgeNode2HorzDistItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ SetValue( nValue );
+ return sal_True;
+}
+
+BOOL SdrEdgeNode2VertDistItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+BOOL SdrEdgeNode2VertDistItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ SetValue( nValue );
+ return sal_True;
+}
+
+BOOL SdrEdgeLine1DeltaItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+BOOL SdrEdgeLine1DeltaItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ SetValue( nValue );
+ return sal_True;
+}
+
+BOOL SdrEdgeLine2DeltaItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+BOOL SdrEdgeLine2DeltaItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ SetValue( nValue );
+ return sal_True;
+}
+
+BOOL SdrEdgeLine3DeltaItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+BOOL SdrEdgeLine3DeltaItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ SetValue( nValue );
+ return sal_True;
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrEdgeSetItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1(SdrEdgeSetItem,SfxSetItem);
+
+SfxPoolItem* __EXPORT SdrEdgeSetItem::Clone(SfxItemPool* pToPool) const
+{
+ return new SdrEdgeSetItem(*this,pToPool);
+}
+
+SfxPoolItem* __EXPORT SdrEdgeSetItem::Create(SvStream& rStream, USHORT nVersion) const
+{
+ SfxItemSet *pSet=new SfxItemSet(*GetItemSet().GetPool(),SDRATTR_EDGE_FIRST,SDRATTR_EDGE_LAST);
+ pSet->Load(rStream);
+ return new SdrEdgeSetItem(pSet);
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Measure
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+// MeasureKind
+TYPEINIT1_AUTOFACTORY(SdrMeasureKindItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrMeasureKindItem::Clone(SfxItemPool* pPool) const { return new SdrMeasureKindItem(*this); }
+
+SfxPoolItem* __EXPORT SdrMeasureKindItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrMeasureKindItem(rIn); }
+
+USHORT __EXPORT SdrMeasureKindItem::GetValueCount() const { return 2; }
+
+XubString __EXPORT SdrMeasureKindItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValMEASURE_STD+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrMeasureKindItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+sal_Bool SdrMeasureKindItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::MeasureKind)GetValue();
+ return sal_True;
+}
+
+sal_Bool SdrMeasureKindItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::MeasureKind eKind;
+ if(!(rVal >>= eKind))
+ return sal_False;
+
+ SetValue( (SdrMeasureKind)eKind );
+ return sal_True;
+}
+
+TYPEINIT1_AUTOFACTORY(SdrMeasureTextHPosItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrMeasureTextHPosItem::Clone(SfxItemPool* pPool) const { return new SdrMeasureTextHPosItem(*this); }
+
+SfxPoolItem* __EXPORT SdrMeasureTextHPosItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrMeasureTextHPosItem(rIn); }
+
+USHORT __EXPORT SdrMeasureTextHPosItem::GetValueCount() const { return 4; }
+
+XubString __EXPORT SdrMeasureTextHPosItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValMEASURE_TEXTHAUTO+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrMeasureTextHPosItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+sal_Bool SdrMeasureTextHPosItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::MeasureTextHorzPos)GetValue();
+ return sal_True;
+}
+
+sal_Bool SdrMeasureTextHPosItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::MeasureTextHorzPos ePos;
+ if(!(rVal >>= ePos))
+ return sal_False;
+
+ SetValue( (SdrMeasureTextHPos)ePos );
+ return sal_True;
+}
+
+TYPEINIT1_AUTOFACTORY(SdrMeasureTextVPosItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrMeasureTextVPosItem::Clone(SfxItemPool* pPool) const { return new SdrMeasureTextVPosItem(*this); }
+
+SfxPoolItem* __EXPORT SdrMeasureTextVPosItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrMeasureTextVPosItem(rIn); }
+
+USHORT __EXPORT SdrMeasureTextVPosItem::GetValueCount() const { return 5; }
+
+XubString __EXPORT SdrMeasureTextVPosItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValMEASURE_TEXTVAUTO+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrMeasureTextVPosItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+sal_Bool SdrMeasureTextVPosItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::MeasureTextVertPos)GetValue();
+ return sal_True;
+}
+
+sal_Bool SdrMeasureTextVPosItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::MeasureTextVertPos ePos;
+ if(!(rVal >>= ePos))
+ return sal_False;
+
+ SetValue( (SdrMeasureTextHPos)ePos );
+ return sal_True;
+}
+
+TYPEINIT1_AUTOFACTORY(SdrMeasureUnitItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrMeasureUnitItem::Clone(SfxItemPool* pPool) const { return new SdrMeasureUnitItem(*this); }
+
+SfxPoolItem* __EXPORT SdrMeasureUnitItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrMeasureUnitItem(rIn); }
+
+USHORT __EXPORT SdrMeasureUnitItem::GetValueCount() const { return 14; }
+
+XubString __EXPORT SdrMeasureUnitItem::GetValueTextByPos(USHORT nPos) const
+{
+ XubString aRetval;
+
+ if((FieldUnit)nPos == FUNIT_NONE)
+ {
+ sal_Char aText[] = "default";
+ aRetval += UniString(aText, sizeof(aText-1));
+ }
+ else
+ {
+ SdrFormatter::TakeUnitStr((FieldUnit)nPos, aRetval);
+ }
+
+ return aRetval;
+}
+
+SfxItemPresentation __EXPORT SdrMeasureUnitItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+sal_Bool SdrMeasureUnitItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+sal_Bool SdrMeasureUnitItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nMeasure;
+ if(!(rVal >>= nMeasure))
+ return sal_False;
+
+ SetValue( (FieldUnit)nMeasure );
+ return sal_True;
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrMeasureSetItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1(SdrMeasureSetItem,SfxSetItem);
+
+SfxPoolItem* __EXPORT SdrMeasureSetItem::Clone(SfxItemPool* pToPool) const
+{
+ return new SdrMeasureSetItem(*this,pToPool);
+}
+
+SfxPoolItem* __EXPORT SdrMeasureSetItem::Create(SvStream& rStream, USHORT nVersion) const
+{
+ SfxItemSet *pSet=new SfxItemSet(*GetItemSet().GetPool(),SDRATTR_MEASURE_FIRST,SDRATTR_MEASURE_LAST);
+ pSet->Load(rStream);
+ return new SdrMeasureSetItem(pSet);
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Circ
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+// CircKind
+TYPEINIT1_AUTOFACTORY(SdrCircKindItem,SfxEnumItem);
+
+SfxPoolItem* __EXPORT SdrCircKindItem::Clone(SfxItemPool* pPool) const { return new SdrCircKindItem(*this); }
+
+SfxPoolItem* __EXPORT SdrCircKindItem::Create(SvStream& rIn, USHORT nVer) const { return new SdrCircKindItem(rIn); }
+
+USHORT __EXPORT SdrCircKindItem::GetValueCount() const { return 4; }
+
+XubString __EXPORT SdrCircKindItem::GetValueTextByPos(USHORT nPos) const
+{
+ return ImpGetResStr(STR_ItemValCIRC_FULL+nPos);
+}
+
+SfxItemPresentation __EXPORT SdrCircKindItem::GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const International *) const
+{
+ rText=GetValueTextByPos(GetValue());
+ if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ String aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+ return ePres;
+}
+
+sal_Bool SdrCircKindItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (drawing::CircleKind)GetValue();
+ return sal_True;
+}
+
+sal_Bool SdrCircKindItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ drawing::CircleKind eKind;
+ if(!(rVal >>= eKind))
+ return sal_False;
+
+ SetValue( (SdrCircKind)eKind );
+ return sal_True;
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrCircSetItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1(SdrCircSetItem,SfxSetItem);
+
+SfxPoolItem* __EXPORT SdrCircSetItem::Clone(SfxItemPool* pToPool) const
+{
+ return new SdrCircSetItem(*this,pToPool);
+}
+
+SfxPoolItem* __EXPORT SdrCircSetItem::Create(SvStream& rStream, USHORT nVersion) const
+{
+ SfxItemSet *pSet=new SfxItemSet(*GetItemSet().GetPool(),SDRATTR_CIRC_FIRST,SDRATTR_CIRC_LAST);
+ pSet->Load(rStream);
+ return new SdrCircSetItem(pSet);
+}
+
+//------------------------------------------------------------
+// class SdrSignedPercentItem
+//------------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY( SdrSignedPercentItem, SfxInt16Item );
+
+
+SfxPoolItem* __EXPORT SdrSignedPercentItem::Clone(SfxItemPool* pPool) const
+{
+ return new SdrSignedPercentItem( Which(), GetValue() );
+}
+
+SfxPoolItem* __EXPORT SdrSignedPercentItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new SdrSignedPercentItem( Which(), rIn );
+}
+
+SfxItemPresentation __EXPORT SdrSignedPercentItem::GetPresentation(
+ SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+ XubString& rText, const International *) const
+{
+ rText = UniString::CreateFromInt32(GetValue());
+ rText += sal_Unicode('%');
+
+ if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
+ {
+ XubString aStr;
+
+ SdrItemPool::TakeItemName(Which(), aStr);
+ aStr += sal_Unicode(' ');
+ rText.Insert(aStr, 0);
+ }
+
+ return ePres;
+}
+
+#ifdef SDR_ISPOOLABLE
+
+int __EXPORT SdrSignedPercentItem::IsPoolable() const
+{
+ USHORT nId=Which();
+ return nId < SDRATTR_NOTPERSIST_FIRST || nId > SDRATTR_NOTPERSIST_LAST;
+}
+#endif
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafSetItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafSetItem,SfxSetItem );
+
+SfxPoolItem* __EXPORT SdrGrafSetItem::Clone( SfxItemPool* pToPool ) const
+{
+ return new SdrGrafSetItem( *this, pToPool );
+}
+
+SfxPoolItem* __EXPORT SdrGrafSetItem::Create( SvStream& rStream, USHORT nVersion ) const
+{
+ SfxItemSet* pSet = new SfxItemSet( *GetItemSet().GetPool(), SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST );
+ pSet->Load( rStream );
+ return new SdrGrafSetItem( pSet );
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafRedItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafRedItem, SdrSignedPercentItem );
+
+SfxPoolItem* __EXPORT SdrGrafRedItem::Clone( SfxItemPool* pPool ) const
+{
+ return new SdrGrafRedItem( *this );
+}
+
+SfxPoolItem* __EXPORT SdrGrafRedItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new SdrGrafRedItem( rIn );
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafGreenItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafGreenItem, SdrSignedPercentItem );
+
+SfxPoolItem* __EXPORT SdrGrafGreenItem::Clone( SfxItemPool* pPool ) const
+{
+ return new SdrGrafGreenItem( *this );
+}
+
+SfxPoolItem* __EXPORT SdrGrafGreenItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new SdrGrafGreenItem( rIn );
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafBlueItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafBlueItem, SdrSignedPercentItem );
+
+SfxPoolItem* __EXPORT SdrGrafBlueItem::Clone( SfxItemPool* pPool ) const
+{
+ return new SdrGrafBlueItem( *this );
+}
+
+SfxPoolItem* __EXPORT SdrGrafBlueItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new SdrGrafBlueItem( rIn );
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafLuminanceItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafLuminanceItem, SdrSignedPercentItem );
+
+SfxPoolItem* __EXPORT SdrGrafLuminanceItem::Clone( SfxItemPool* pPool ) const
+{
+ return new SdrGrafLuminanceItem( *this );
+}
+
+SfxPoolItem* __EXPORT SdrGrafLuminanceItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new SdrGrafLuminanceItem( rIn );
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafContrastItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafContrastItem, SdrSignedPercentItem );
+
+SfxPoolItem* __EXPORT SdrGrafContrastItem::Clone( SfxItemPool* pPool ) const
+{
+ return new SdrGrafContrastItem( *this );
+}
+
+SfxPoolItem* __EXPORT SdrGrafContrastItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new SdrGrafContrastItem( rIn );
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafGamma100Item
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafGamma100Item, SfxUInt32Item );
+
+SfxPoolItem* __EXPORT SdrGrafGamma100Item::Clone( SfxItemPool* pPool ) const
+{
+ return new SdrGrafGamma100Item( *this );
+}
+
+SfxPoolItem* __EXPORT SdrGrafGamma100Item::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new SdrGrafGamma100Item( rIn );
+}
+
+sal_Bool SdrGrafGamma100Item::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= ((double)GetValue()) / 100.0;
+ return sal_True;
+}
+
+sal_Bool SdrGrafGamma100Item::PutValue( const uno::Any& rVal, BYTE nMemberId )
+{
+ double nGamma;
+ if(!(rVal >>= nGamma))
+ return sal_False;
+
+ SetValue( (UINT32)(nGamma * 100.0 ) );
+ return sal_True;
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafInvertItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafInvertItem, SdrOnOffItem );
+
+SfxPoolItem* __EXPORT SdrGrafInvertItem::Clone( SfxItemPool* pPool ) const
+{
+ return new SdrGrafInvertItem( *this );
+}
+
+SfxPoolItem* __EXPORT SdrGrafInvertItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new SdrGrafInvertItem( rIn );
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafTransparenceItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafTransparenceItem, SdrPercentItem );
+
+SfxPoolItem* __EXPORT SdrGrafTransparenceItem::Clone( SfxItemPool* pPool ) const
+{
+ return new SdrGrafTransparenceItem( *this );
+}
+
+SfxPoolItem* __EXPORT SdrGrafTransparenceItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new SdrGrafTransparenceItem( rIn );
+}
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SdrGrafModeItem
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1( SdrGrafModeItem, SfxEnumItem );
+
+SfxPoolItem* __EXPORT SdrGrafModeItem::Clone(SfxItemPool* pPool) const
+{
+ return new SdrGrafModeItem( *this );
+}
+
+SfxPoolItem* __EXPORT SdrGrafModeItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new SdrGrafModeItem( rIn );
+}
+
+USHORT __EXPORT SdrGrafModeItem::GetValueCount() const
+{
+ return 4;
+}
+
+XubString __EXPORT SdrGrafModeItem::GetValueTextByPos(UINT16 nPos) const
+{
+ XubString aStr;
+
+ switch(nPos)
+ {
+ case 1:
+ {
+ sal_Char aTextGreys[] = "Greys";
+ aStr += UniString(aTextGreys, sizeof(aTextGreys-1));
+ break;
+ }
+ case 2:
+ {
+ sal_Char aTextBlackWhite[] = "Black/White";
+ aStr += UniString(aTextBlackWhite, sizeof(aTextBlackWhite-1));
+ break;
+ }
+ case 3:
+ {
+ sal_Char aTextWatermark[] = "Watermark";
+ aStr += UniString(aTextWatermark, sizeof(aTextWatermark-1));
+ break;
+ }
+ default:
+ {
+ sal_Char aTextStandard[] = "Standard";
+ aStr += UniString(aTextStandard, sizeof(aTextStandard-1));
+ break;
+ }
+ }
+
+ return aStr;
+}
+
+SfxItemPresentation __EXPORT SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+ XubString& rText, const International *) const
+{
+ rText = GetValueTextByPos( GetValue() );
+
+ if( ePres == SFX_ITEM_PRESENTATION_COMPLETE )
+ {
+ String aStr;
+
+ SdrItemPool::TakeItemName( Which(), aStr );
+ aStr += sal_Unicode(' ');
+ rText.Insert( aStr, 0 );
+ }
+
+ return ePres;
+}
+
diff --git a/svx/source/svdraw/svdcrtmt.hxx b/svx/source/svdraw/svdcrtmt.hxx
new file mode 100644
index 0000000000..1283920bfe
--- /dev/null
+++ b/svx/source/svdraw/svdcrtmt.hxx
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdcrtmt.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVDCRTMT_HXX
+#define _SVDCRTMT_HXX
+
+#ifndef _SVDHDL_HXX
+#include "svdhdl.hxx"
+#endif
+
+#ifndef _SVDCRTV_HXX
+#include "svdcrtv.hxx"
+#endif
+
+#ifndef _SVDDRGM1_HXX
+#include "svddrgm1.hxx"
+#endif
+
+//************************************************************
+// ImpSdrCreateLibObjMove
+//************************************************************
+
+class ImpSdrCreateLibObjMove : public SdrDragMove
+{
+ Point aObjCenter;
+ Rectangle aObjRect;
+
+private:
+ SdrCreateView& View() const { return *((SdrCreateView*)&rView); }
+ SdrPageView& CreatePV() const { return *View().pCreatePV; }
+ SdrObject& CreateObj() const { return *View().pAktCreate; }
+
+public:
+ TYPEINFO();
+ ImpSdrCreateLibObjMove(SdrDragView& rNewView): SdrDragMove(rNewView) {}
+
+ virtual void Draw() const;
+ virtual void Show();
+ virtual void Hide();
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void MovAllPoints();
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+};
+
+//************************************************************
+// ImpSdrCreateLibObjResize
+//************************************************************
+
+class ImpSdrCreateLibObjResize : public SdrDragResize
+{
+ Rectangle aObjRect;
+ FASTBOOL bForceOrtho;
+private:
+ SdrCreateView& View() const { return *((SdrCreateView*)&rView); }
+ SdrPageView& CreatePV() const { return *View().pCreatePV; }
+ SdrObject& CreateObj() const { return *View().pAktCreate; }
+
+public:
+ TYPEINFO();
+ ImpSdrCreateLibObjResize(SdrDragView& rNewView): SdrDragResize(rNewView) {}
+
+ virtual void Draw() const;
+ virtual void Show();
+ virtual void Hide();
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void MovAllPoints();
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDCRTMT_HXX
+
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
new file mode 100644
index 0000000000..f1c69c104f
--- /dev/null
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -0,0 +1,1016 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdcrtv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdcrtv.hxx"
+#include "xattr.hxx"
+#include "svdio.hxx"
+#include "svdxout.hxx"
+#include "svdundo.hxx"
+#include "svdocapt.hxx" // Spezialbehandlung: Nach dem Create transparente Fuellung
+#include "svdcrtmt.hxx"
+#include "svdvmark.hxx"
+#include "svdoedge.hxx"
+#include "svdpagv.hxx"
+#include "svdpage.hxx"
+#include "svdetc.hxx"
+
+#define XOR_CREATE_PEN PEN_SOLID
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpSdrConnectMarker: public SdrViewUserMarker
+{
+ const SdrObject* pAktObj;
+ const SdrPageView* pAktPV;
+
+ virtual void Draw(OutputDevice* pOut, FASTBOOL bHiding, FASTBOOL bNoSaveDC);
+
+public:
+ ImpSdrConnectMarker(SdrCreateView* pView): SdrViewUserMarker(pView),pAktObj(NULL),pAktPV(NULL) {}
+ ~ImpSdrConnectMarker() {}
+ void SetTargetObject(const SdrObject* pObj);
+}; // svdvmark
+
+void ImpSdrConnectMarker::Draw(OutputDevice* pOut, FASTBOOL bHiding, FASTBOOL bNoSaveDC)
+{
+ SdrViewUserMarker::Draw(pOut,bHiding,bNoSaveDC);
+
+ const SdrCreateView* pView=(SdrCreateView*)GetView();
+ const SdrObject* pObj=pAktObj;
+ const SdrPageView* pPV=pAktPV;
+
+ if (pObj!=NULL && pView!=NULL && pOut!=NULL)
+ {
+ RasterOp eRop0=pOut->GetRasterOp();
+ BOOL bMap0=pOut->IsMapModeEnabled();
+ pOut->SetRasterOp(ROP_INVERT);
+
+ Color aOldLineColor, aOldFillColor;
+
+ if (!bNoSaveDC)
+ {
+ aOldLineColor = pOut->GetLineColor();
+ aOldFillColor = pOut->GetFillColor();
+ }
+ Point aPvOfs; if (pPV!=NULL) aPvOfs=pPV->GetOffset();
+ if (pView->IsAutoVertexConnectors())
+ {
+ for (USHORT i=0; i<4; i++) {
+ SdrGluePoint aGluePoint(pObj->GetVertexGluePoint(i));
+ aGluePoint.Draw(*pOut,pObj);
+ }
+ }
+ if (pView->IsAutoCornerConnectors())
+ {
+ for (USHORT i=0; i<4; i++)
+ {
+ SdrGluePoint aGluePoint(pObj->GetVertexGluePoint(i));
+ aGluePoint.Draw(*pOut,pObj);
+ }
+ }
+ if (!bNoSaveDC)
+ {
+ pOut->SetLineColor( aOldLineColor );
+ if ( aOldFillColor != pOut->GetFillColor() )
+ pOut->SetFillColor( aOldFillColor );
+ }
+ pOut->SetRasterOp(eRop0);
+ pOut->EnableMapMode(bMap0);
+ }
+}
+
+void ImpSdrConnectMarker::SetTargetObject(const SdrObject* pObj)
+{
+ if (pAktObj!=pObj) {
+ BOOL bVisible=IsVisible();
+ if (bVisible) Hide();
+ pAktObj=pObj;
+ if (bVisible) Show();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@ @@@@ @@@@@@ @@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@ @@@@@ @@@@ @@@@@@ @@ @@@@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@ @@ @@ @@@@@ @@ @@ @@ @@@@@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrCreateView::ImpClearVars()
+{
+ nAktInvent=SdrInventor;
+ nAktIdent=OBJ_NONE;
+ pCurrentLibObj=NULL;
+ bCurrentLibObjMoveNoResize=FALSE;
+ bCurrentLibObjSetDefAttr=FALSE;
+ bCurrentLibObjSetDefLayer=FALSE;
+ pLibObjDragMeth=NULL;
+ pAktCreate=NULL;
+ pCreatePV=NULL;
+ bAutoTextEdit=FALSE;
+ b1stPointAsCenter=FALSE;
+ aAktCreatePointer=Pointer(POINTER_CROSS);
+ bUseIncompatiblePathCreateInterface=FALSE;
+ bAutoClosePolys=TRUE;
+ nAutoCloseDistPix=5;
+ nFreeHandMinDistPix=10;
+
+ pConnectMarker=new ImpSdrConnectMarker(this);
+ pConnectMarker->SetLineWidth(2);
+ pConnectMarker->SetAnimateDelay(500);
+ pConnectMarker->SetAnimateCount(3);
+ pConnectMarker->SetAnimateSpeed(100);
+ pConnectMarker->SetAnimateToggle(TRUE);
+}
+
+void SdrCreateView::ImpMakeCreateAttr()
+{
+}
+
+SdrCreateView::SdrCreateView(SdrModel* pModel1, OutputDevice* pOut):
+ SdrDragView(pModel1,pOut)
+{
+ ImpClearVars();
+ ImpMakeCreateAttr();
+}
+
+SdrCreateView::SdrCreateView(SdrModel* pModel1, ExtOutputDevice* pXOut):
+ SdrDragView(pModel1,pXOut)
+{
+ ImpClearVars();
+ ImpMakeCreateAttr();
+}
+
+SdrCreateView::~SdrCreateView()
+{
+ delete pConnectMarker;
+ delete pCurrentLibObj;
+ delete pAktCreate;
+}
+
+void SdrCreateView::ImpDelCreateAttr()
+{
+}
+
+BOOL SdrCreateView::IsAction() const
+{
+ return SdrDragView::IsAction() || pAktCreate!=NULL;
+}
+
+void SdrCreateView::MovAction(const Point& rPnt)
+{
+ SdrDragView::MovAction(rPnt);
+ if (pAktCreate!=NULL) {
+ MovCreateObj(rPnt);
+ }
+}
+
+void SdrCreateView::EndAction()
+{
+ if (pAktCreate!=NULL) EndCreateObj(SDRCREATE_FORCEEND);
+ SdrDragView::EndAction();
+}
+
+void SdrCreateView::BckAction()
+{
+ if (pAktCreate!=NULL) BckCreateObj();
+ SdrDragView::BckAction();
+}
+
+void SdrCreateView::BrkAction()
+{
+ SdrDragView::BrkAction();
+ BrkCreateObj();
+}
+
+void SdrCreateView::TakeActionRect(Rectangle& rRect) const
+{
+ if (pAktCreate!=NULL) {
+ rRect=aDragStat.GetActionRect();
+ if (rRect.IsEmpty()) {
+ rRect=Rectangle(aDragStat.GetPrev(),aDragStat.GetNow());
+ }
+ } else {
+ SdrDragView::TakeActionRect(rRect);
+ }
+}
+
+void SdrCreateView::ToggleShownXor(OutputDevice* pOut, const Region* pRegion) const
+{
+ SdrDragView::ToggleShownXor(pOut,pRegion);
+ if (pAktCreate!=NULL && aDragStat.IsShown()) {
+ DrawCreateObj(pOut,TRUE);
+ }
+}
+
+BOOL SdrCreateView::CheckEdgeMode()
+{
+ UINT32 nInv=nAktInvent;
+ UINT16 nIdn=nAktIdent;
+ if (pAktCreate!=NULL) {
+ nInv=pAktCreate->GetObjInventor();
+ nIdn=pAktCreate->GetObjIdentifier();
+ // wird vom EdgeObj gemanaged
+ if (nAktInvent==SdrInventor && nAktIdent==OBJ_EDGE) return FALSE;
+ }
+ if (!IsCreateMode() || nAktInvent!=SdrInventor || nAktIdent!=OBJ_EDGE || pCurrentLibObj!=NULL) {
+ if (pConnectMarker->IsVisible()) pConnectMarker->Hide();
+ pConnectMarker->SetTargetObject(NULL);
+ return FALSE;
+ } else {
+ // TRUE heisst: MouseMove soll Connect checken
+ return !IsAction();
+ }
+}
+
+void SdrCreateView::SetConnectMarker(const SdrObjConnection& rCon, const SdrPageView& rPV)
+{
+ if (rCon.pObj!=NULL) {
+ Rectangle aNewRect;
+ USHORT nNewDist=0;
+ if (rCon.bBestConn || rCon.bBestVertex) {
+ aNewRect=rCon.pObj->GetBoundRect();
+ nNewDist=2;
+ } else {
+ nNewDist=aHdl.GetHdlSize()+2;
+ SdrGluePoint aGP;
+ rCon.TakeGluePoint(aGP,TRUE);
+ Point aPt(aGP.GetPos());
+ aNewRect=Rectangle(aPt,aPt);
+ }
+ Point aPvOfs(rPV.GetOffset());
+ aNewRect.Move(aPvOfs.X(),aPvOfs.Y());
+ if (!pConnectMarker->IsVisible() ||
+ pConnectMarker->GetRectangle()==NULL ||
+ *pConnectMarker->GetRectangle()!=aNewRect ||
+ pConnectMarker->GetPixelDistance()!=nNewDist)
+ {
+ pConnectMarker->Hide();
+ pConnectMarker->SetRectangle(aNewRect);
+ pConnectMarker->SetPixelDistance(nNewDist);
+ pConnectMarker->SetAnimate(TRUE);
+ pConnectMarker->SetTargetObject(rCon.pObj);
+ pConnectMarker->Show();
+ }
+ } else {
+ HideConnectMarker();
+ }
+}
+
+void SdrCreateView::HideConnectMarker()
+{
+ pConnectMarker->Hide();
+ pConnectMarker->SetTargetObject(NULL);
+ pConnectMarker->SetAnimate(FALSE);
+}
+
+BOOL SdrCreateView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
+{
+ if (CheckEdgeMode() && pWin!=NULL) {
+ Point aPos(pWin->PixelToLogic(rMEvt.GetPosPixel()));
+ SdrPageView* pPV=GetPageView(aPos);
+ if (pPV!=NULL) {
+ // Defaultete Hit-Toleranz bei IsMarkedHit() mal aendern !!!!
+ BOOL bMarkHit=HitHandle(aPos,*pWin)!=NULL || IsMarkedObjHit(aPos);
+ SdrObjConnection aCon;
+ Point aPvOfs(pPV->GetOffset());
+ aPos-=aPvOfs;
+ if (!bMarkHit) SdrEdgeObj::ImpFindConnector(aPos,*pPV,aCon,NULL,pWin);
+ SetConnectMarker(aCon,*pPV);
+ }
+ }
+ return SdrDragView::MouseMove(rMEvt,pWin);
+}
+
+BOOL SdrCreateView::IsTextTool() const
+{
+ return eEditMode==SDREDITMODE_CREATE && pCurrentLibObj==NULL && nAktInvent==SdrInventor && (nAktIdent==OBJ_TEXT || nAktIdent==OBJ_TEXTEXT || nAktIdent==OBJ_TITLETEXT || nAktIdent==OBJ_OUTLINETEXT);
+}
+
+BOOL SdrCreateView::IsEdgeTool() const
+{
+ return eEditMode==SDREDITMODE_CREATE && pCurrentLibObj==NULL && nAktInvent==SdrInventor && (nAktIdent==OBJ_EDGE);
+}
+
+BOOL SdrCreateView::IsMeasureTool() const
+{
+ return eEditMode==SDREDITMODE_CREATE && pCurrentLibObj==NULL && nAktInvent==SdrInventor && (nAktIdent==OBJ_MEASURE);
+}
+
+void SdrCreateView::SetCurrentObj(UINT16 nIdent, UINT32 nInvent)
+{
+ if (pCurrentLibObj!=NULL) {
+ delete pCurrentLibObj;
+ pCurrentLibObj=NULL;
+ }
+ if (nAktInvent!=nInvent || nAktIdent!=nIdent) {
+ nAktInvent=nInvent;
+ nAktIdent=nIdent;
+ SdrObject* pObj=SdrObjFactory::MakeNewObject(nInvent,nIdent,NULL,NULL);
+ if (pObj!=NULL) {
+ // Auf pers. Wunsch von Marco:
+ // Mauszeiger bei Textwerkzeug immer I-Beam. Fadenkreuz
+ // mit kleinem I-Beam erst bai MouseButtonDown
+ if (IsTextTool()) aAktCreatePointer=POINTER_TEXT;
+ else aAktCreatePointer=pObj->GetCreatePointer();
+ delete pObj;
+ } else {
+ aAktCreatePointer=Pointer(POINTER_CROSS);
+ }
+ }
+ CheckEdgeMode();
+ ImpSetGlueVisible3(IsEdgeTool());
+}
+
+void SdrCreateView::SetCurrentLibObj(SdrObject* pObj, BOOL bMoveNoResize, BOOL bSetDefAttr, BOOL bSetDefLayer)
+{
+ if (pCurrentLibObj!=NULL && pObj!=pCurrentLibObj) delete pCurrentLibObj;
+ pCurrentLibObj=pObj;
+ bCurrentLibObjMoveNoResize=bMoveNoResize;
+ bCurrentLibObjSetDefAttr=bSetDefAttr;
+ bCurrentLibObjSetDefLayer=bSetDefLayer;
+ if (pCurrentLibObj!=NULL) {
+ pCurrentLibObj->SetModel(pMod);
+ }
+ aAktCreatePointer=Pointer(POINTER_CROSS);
+ nAktInvent=SdrInventor;
+ nAktIdent=OBJ_NONE;
+ pConnectMarker->Hide();
+ ImpSetGlueVisible3(FALSE);
+}
+
+BOOL SdrCreateView::ImpBegCreateObj(UINT32 nInvent, UINT16 nIdent, const Point& rPnt, OutputDevice* pOut,
+ short nMinMov, SdrPageView* pPV, const Rectangle& rLogRect)
+{
+ BOOL bRet=FALSE;
+ SetSolidDraggingNow(IsSolidDragging());
+ SetSolidDraggingCheck(FALSE);
+ UnmarkAllObj();
+ BrkAction();
+ pConnectMarker->Hide();
+ DBG_ASSERT(pLibObjDragMeth==NULL,"SdrCreateView::ImpBegCreateObj(): pLibObjDragMeth!=NULL");
+ pLibObjDragMeth=NULL;
+ if (pPV!=NULL) pCreatePV=pPV;
+ else pCreatePV=GetPageView(rPnt);
+ if (pCreatePV!=NULL) { // ansonsten keine Seite angemeldet!
+ String aLay(aAktLayer);
+
+ if(nInvent == SdrInventor && nIdent == OBJ_MEASURE && aMeasureLayer.Len())
+ {
+ aLay = aMeasureLayer;
+ }
+
+ SdrLayerID nLayer=pCreatePV->GetPage()->GetLayerAdmin().GetLayerID(aLay,TRUE);
+ if (nLayer==SDRLAYER_NOTFOUND) nLayer=0;
+ if (!pCreatePV->GetLockedLayers().IsSet(nLayer) && pCreatePV->GetVisibleLayers().IsSet(nLayer)) {
+ pAktCreate=SdrObjFactory::MakeNewObject(nInvent,nIdent,pCreatePV->GetPage(),pMod);
+ Point aPnt(rPnt-pCreatePV->GetOffset());
+ if (nAktInvent!=SdrInventor || (nAktIdent!=USHORT(OBJ_EDGE) &&
+ nAktIdent!=USHORT(OBJ_FREELINE) &&
+ nAktIdent!=USHORT(OBJ_FREEFILL) )) { // Kein Fang fuer Edge und Freihand!
+ aPnt=GetSnapPos(aPnt,pCreatePV);
+ }
+ if (pAktCreate!=NULL) {
+ BOOL bStartEdit=FALSE; // nach Ende von Create automatisch TextEdit starten
+ if (pDefaultStyleSheet!=NULL) pAktCreate->NbcSetStyleSheet(pDefaultStyleSheet,FALSE);
+ pAktCreate->NbcSetAttributes(aDefaultAttr,FALSE);
+ if (HAS_BASE(SdrCaptionObj,pAktCreate)) {
+ SfxItemSet aSet(pMod->GetItemPool());
+ aSet.Put(XFillColorItem(String(),Color(COL_WHITE))); // Falls einer auf Solid umschaltet
+ aSet.Put(XFillStyleItem(XFILL_NONE));
+ pAktCreate->NbcSetAttributes(aSet,FALSE);
+ bStartEdit=TRUE;
+ }
+ if (nInvent==SdrInventor && (nIdent==OBJ_TEXT || nIdent==OBJ_TEXTEXT ||
+ nIdent==OBJ_TITLETEXT || nIdent==OBJ_OUTLINETEXT)) {
+ // Fuer alle Textrahmen default keinen Hintergrund und keine Umrandung
+ SfxItemSet aSet(pMod->GetItemPool());
+ aSet.Put(XFillColorItem(String(),Color(COL_WHITE))); // Falls einer auf Solid umschaltet
+ aSet.Put(XFillStyleItem(XFILL_NONE));
+ aSet.Put(XLineColorItem(String(),Color(COL_BLACK))); // Falls einer auf Solid umschaltet
+ aSet.Put(XLineStyleItem(XLINE_NONE));
+ pAktCreate->NbcSetAttributes(aSet,FALSE);
+ bStartEdit=TRUE;
+ }
+ if (!rLogRect.IsEmpty()) pAktCreate->NbcSetLogicRect(rLogRect);
+ aDragStat.Reset(aPnt);
+ aDragStat.SetView((SdrView*)this);
+ aDragStat.SetPageView(pCreatePV);
+ aDragStat.SetMinMove(ImpGetMinMovLogic(nMinMov,pOut));
+ pDragWin=pOut;
+ if (pAktCreate->BegCreate(aDragStat)) {
+ ShowCreateObj(pOut,TRUE);
+ bRet=TRUE;
+ } else {
+ delete pAktCreate;
+ pAktCreate=NULL;
+ pCreatePV=NULL;
+ }
+ }
+ }
+ }
+ return bRet;
+}
+
+BOOL SdrCreateView::BegCreateObj(const Point& rPnt, OutputDevice* pOut, short nMinMov, SdrPageView* pPV)
+{
+ if ( !pCurrentLibObj )
+ return ImpBegCreateObj(nAktInvent,nAktIdent,rPnt,pOut,nMinMov,pPV,Rectangle());
+ else
+ return BegCreateLibObj(rPnt,pCurrentLibObj->Clone(),bCurrentLibObjMoveNoResize,
+ bCurrentLibObjSetDefAttr,bCurrentLibObjSetDefLayer,pOut,nMinMov,pPV);
+}
+
+BOOL SdrCreateView::BegCreateCaptionObj(const Point& rPnt, const Size& rObjSiz,
+ OutputDevice* pOut, short nMinMov, SdrPageView* pPV)
+{
+ return ImpBegCreateObj(SdrInventor,OBJ_CAPTION,rPnt,pOut,nMinMov,pPV,
+ Rectangle(rPnt,Size(rObjSiz.Width()+1,rObjSiz.Height()+1)));
+}
+
+BOOL SdrCreateView::BegCreateLibObj(const Point& rPnt, SdrObject* pObj, BOOL bMoveNoResize,
+ BOOL bSetDefAttr, BOOL bSetDefLayer,
+ OutputDevice* pOut, short nMinMov, SdrPageView* pPV)
+{
+ SetSolidDraggingNow(FALSE); // noch kein SolidDragging bei LibObjs
+ BOOL bRet=FALSE;
+ UnmarkAllObj();
+ BrkAction();
+ pConnectMarker->Hide();
+ DBG_ASSERT(pLibObjDragMeth==NULL,"SdrCreateView::BegCreateLibObj(): pLibObjDragMeth!=NULL");
+ pLibObjDragMeth=NULL;
+ if (pPV!=NULL) pCreatePV=pPV;
+ else pCreatePV=GetPageView(rPnt);
+ if (pObj!=NULL && pCreatePV!=NULL) {
+ bRet=TRUE;
+ pObj->SetModel(pMod);
+ if (bSetDefAttr) {
+ if (pDefaultStyleSheet!=NULL) pObj->NbcSetStyleSheet(pDefaultStyleSheet,FALSE);
+ pObj->NbcSetAttributes(aDefaultAttr,FALSE);
+ }
+ if (bSetDefLayer) {
+ SdrLayerID nLayer=pCreatePV->GetPage()->GetLayerAdmin().GetLayerID(aAktLayer,TRUE);
+ if (nLayer==SDRLAYER_NOTFOUND) nLayer=0;
+ if (pCreatePV->GetLockedLayers().IsSet(nLayer) || !pCreatePV->GetVisibleLayers().IsSet(nLayer)) {
+ bRet=FALSE; // Layer gesperrt oder nicht sichtbar!
+ }
+ }
+ if (bRet) {
+ pAktCreate=pObj;
+ Point aPnt(rPnt-pCreatePV->GetOffset());
+ aPnt=GetSnapPos(aPnt,pCreatePV);
+ aDragStat.Reset(aPnt);
+ aDragStat.SetView((SdrView*)this);
+ aDragStat.SetPageView(pCreatePV);
+ aDragStat.SetMinMove(ImpGetMinMovLogic(nMinMov,pOut));
+ pDragWin=pOut;
+ if (bMoveNoResize) {
+ pLibObjDragMeth=new ImpSdrCreateLibObjMove(*this);
+ } else {
+ pLibObjDragMeth=new ImpSdrCreateLibObjResize(*this);
+ }
+ bRet=pLibObjDragMeth->Beg();
+ }
+ }
+ if (!bRet) {
+ if (pObj!=NULL) delete pObj;
+ if (pLibObjDragMeth!=NULL) { delete pLibObjDragMeth; pLibObjDragMeth=NULL; }
+ pAktCreate=NULL;
+ pCreatePV=NULL;
+ }
+ return bRet;
+}
+
+void SdrCreateView::MovCreateObj(const Point& rPnt)
+{
+ if (pAktCreate!=NULL) {
+ if (IsSolidDraggingNow() && !IsSolidDraggingCheck()) {
+ // Z.B. fuer Fill+Linelose Textrahmen bei SolidDragging
+ SetSolidDraggingCheck(TRUE);
+ SfxItemSet aSet(pMod->GetItemPool());
+ pAktCreate->TakeAttributes(aSet,FALSE,FALSE);
+ XFillStyle eFill=((XFillStyleItem&)(aSet.Get(XATTR_FILLSTYLE))).GetValue();
+ XLineStyle eLine=((XLineStyleItem&)(aSet.Get(XATTR_LINESTYLE))).GetValue();
+ if (eLine==XLINE_NONE && eFill==XFILL_NONE) {
+ SetSolidDraggingNow(FALSE);
+ }
+ }
+ Point aPnt(rPnt-pCreatePV->GetOffset());
+ if (!aDragStat.IsNoSnap()) {
+ aPnt=GetSnapPos(aPnt,pCreatePV);
+ }
+ if (IsOrtho()) {
+ if (aDragStat.IsOrtho8Possible()) OrthoDistance8(aDragStat.GetPrev(),aPnt,IsBigOrtho());
+ else if (aDragStat.IsOrtho4Possible()) OrthoDistance4(aDragStat.GetPrev(),aPnt,IsBigOrtho());
+ }
+ ImpLimitToWorkArea(aPnt,pCreatePV);
+ if (aPnt==aDragStat.GetNow()) return;
+ if (pLibObjDragMeth==NULL) {
+ BOOL bMerk=aDragStat.IsMinMoved();
+ if (aDragStat.CheckMinMoved(aPnt)) {
+ Rectangle aBound;
+ if (IsSolidDraggingNow()) aBound=pAktCreate->GetBoundRect();
+ XPolyPolygon aXPP1;
+ if (!bMerk) aDragStat.NextPoint();
+ aDragStat.NextMove(aPnt);
+ pAktCreate->MovCreate(aDragStat);
+ pAktCreate->TakeCreatePoly(aDragStat,aXPP1);
+ XPolyPolygon aXPP2(aXPP1); // kopieren, weil wird in DrawCreateDiff geaendert
+ if (!IsSolidDraggingNow()) {
+ DrawCreateObjDiff(pCreatePV->DragPoly(),aXPP1);
+ }
+ pCreatePV->DragPoly()=aXPP2;
+ if (IsSolidDraggingNow()) {
+ aBound.Union(pAktCreate->GetBoundRect());
+ SdrObjList* pOL=pCreatePV->GetObjList();
+ SdrInsertReason aReason(SDRREASON_VIEWCALL);
+ pOL->NbcInsertObject(pAktCreate,CONTAINER_APPEND,&aReason);
+ Point aPvOfs(pCreatePV->GetOffset());
+ USHORT nAnz=pDragWin==NULL ? GetWinCount() : 1;
+ for (USHORT i=0; i<nAnz; i++) {
+ USHORT nWinNum=SDRVIEWWIN_NOTFOUND;
+ OutputDevice* pOut=pDragWin;
+ if (pOut==NULL) {
+ nWinNum=i;
+ pOut=GetWin(nWinNum);
+ } else {
+ nWinNum=aWinList.Find(pOut);
+ }
+ VirtualDevice aVDev(*pOut);
+ Size a2Pix(pOut->PixelToLogic(Size(2,2)));
+ MapMode aMap(pOut->GetMapMode());
+ aVDev.SetMapMode(aMap);
+ #ifdef MAC
+ Color aMixedColor( RGB_COLORDATA( 223, 223, 223 ) );
+ #else
+ Color aMixedColor( RGB_COLORDATA( 234, 234, 234 ) );
+ #endif
+ aVDev.SetBackground( Wallpaper( aMixedColor ) );
+ aVDev.SetOutputSize(pOut->GetOutputSize());
+ Rectangle aDirtyArea(aBound);
+ aDirtyArea.Move(aPvOfs.X(),aPvOfs.Y());
+ InitRedraw(&aVDev,aDirtyArea);
+ if (nWinNum!=SDRVIEWWIN_NOTFOUND) {
+ if (IsShownXorVisibleWinNum(nWinNum)) {
+ ToggleShownXor(&aVDev,NULL);
+ }
+ }
+ Point aCopyOfs(aDirtyArea.TopLeft());
+ aCopyOfs.X()-=a2Pix.Width();
+ aCopyOfs.Y()-=a2Pix.Height();
+ Size aCopySize(aBound.Right()-aBound.Left(),aBound.Bottom()-aBound.Top());
+ aCopySize.Width()+=2*a2Pix.Width();
+ aCopySize.Height()+=2*a2Pix.Height();
+ pOut->DrawOutDev(aCopyOfs,aCopySize,aCopyOfs,aCopySize,aVDev);
+ }
+ pOL->NbcRemoveObject(pOL->GetObjCount()-1);
+ // Die Page brauchen die Objekte
+ // hier mal bitte eine Optimierung vornehmen
+ pAktCreate->SetPage(pCreatePV->GetPage());
+ }
+ }
+ } else {
+ pLibObjDragMeth->Mov(aPnt);
+ }
+ }
+}
+
+BOOL SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
+{
+ BOOL bRet=FALSE;
+ SdrObject* pObjMerk=pAktCreate;
+ SdrPageView* pPVMerk=pCreatePV;
+ if (pAktCreate!=NULL) {
+ if (pLibObjDragMeth==NULL) {
+ ULONG nAnz=aDragStat.GetPointAnz();
+ if (nAnz<=1 && eCmd==SDRCREATE_FORCEEND) {
+ BrkCreateObj(); // Objekte mit nur einem Punkt gibt's nicht (zumindest noch nicht)
+ return FALSE; // FALSE=Event nicht ausgewertet
+ }
+ BOOL bPntsEq=nAnz>1;
+ ULONG i=1;
+ Point aP0=aDragStat.GetPoint(0);
+ while (bPntsEq && i<nAnz) { bPntsEq=aP0==aDragStat.GetPoint(i); i++; }
+ if (pAktCreate->EndCreate(aDragStat,eCmd)) {
+ if (!IsSolidDraggingNow()) HideCreateObj(pDragWin,TRUE);
+ if (!bPntsEq) { // sonst Brk, weil alle Punkte gleich sind.
+ SdrObject* pObj=pAktCreate;
+ pAktCreate=NULL;
+ SdrLayerAdmin& rAd=pCreatePV->GetPage()->GetLayerAdmin();
+ SdrLayerID nLayer=rAd.GetLayerID(aAktLayer,TRUE);
+ if (nLayer==SDRLAYER_NOTFOUND) nLayer=0;
+ pObj->SetLayer(nLayer);
+ InsertObject(pObj,*pCreatePV,IsSolidDraggingNow() ? SDRINSERT_NOBROADCAST : 0);
+ pCreatePV=NULL;
+ bRet=TRUE; // TRUE=Event ausgewertet
+ } else {
+ BrkCreateObj();
+ }
+ } else { // Mehr Punkte
+ if (eCmd==SDRCREATE_FORCEEND || // nix da, Ende erzwungen
+ nAnz==0 || // keine Punkte da (kann eigentlich nicht vorkommen)
+ (nAnz<=1 && !aDragStat.IsMinMoved())) { // MinMove nicht erfuellt
+ BrkCreateObj();
+ } else {
+ XPolyPolygon aXPP1;
+ pAktCreate->TakeCreatePoly(aDragStat,aXPP1);
+ XPolyPolygon aXPP2(aXPP1); // kopieren, weil wird in DrawCreateDiff geaendert
+ if (!IsSolidDraggingNow()) DrawCreateObjDiff(pCreatePV->DragPoly(),aXPP1);
+ pCreatePV->DragPoly()=aXPP2;
+ aDragStat.ResetMinMoved(); // NextPoint gibt's bei MovCreateObj()
+ bRet=TRUE;
+ }
+ }
+ if (bRet && pObjMerk!=NULL && IsTextEditAfterCreate()) {
+ SdrTextObj* pText=PTR_CAST(SdrTextObj,pObjMerk);
+ if (pText!=NULL && pText->IsTextFrame()) {
+ BegTextEdit(pText,pPVMerk,(Window*)NULL,TRUE,(SdrOutliner*)NULL,(OutlinerView*)NULL);
+ }
+ }
+ } else {
+ if (pLibObjDragMeth->End(FALSE)) {
+ pAktCreate=NULL;
+ pCreatePV=NULL;
+ SdrLayerAdmin& rAd=pPVMerk->GetPage()->GetLayerAdmin();
+ SdrLayerID nLayer=rAd.GetLayerID(aAktLayer,TRUE);
+ if (nLayer==SDRLAYER_NOTFOUND) nLayer=0;
+ pObjMerk->SetLayer(nLayer);
+ InsertObject(pObjMerk,*pPVMerk);
+ bRet=TRUE;
+ } else {
+ delete pAktCreate;
+ bRet=FALSE;
+ }
+ delete pLibObjDragMeth;
+ pLibObjDragMeth=NULL;
+ pAktCreate=NULL;
+ pCreatePV=NULL;
+ }
+ if (pAktCreate==NULL) {
+ SetSolidDraggingNow(FALSE);
+ SetSolidDraggingCheck(FALSE);
+ }
+ }
+ return bRet;
+}
+
+void SdrCreateView::BckCreateObj()
+{
+ if (pAktCreate!=NULL) {
+ if (aDragStat.GetPointAnz()<=2 || pLibObjDragMeth!=NULL) {
+ BrkCreateObj();
+ } else {
+ HideCreateObj(pDragWin,TRUE);
+ aDragStat.PrevPoint();
+ if (pAktCreate->BckCreate(aDragStat)) {
+ ShowCreateObj(pDragWin,TRUE);
+ } else {
+ BrkCreateObj();
+ }
+ }
+ }
+}
+
+void SdrCreateView::BrkCreateObj()
+{
+ if (pAktCreate!=NULL) {
+ if (pLibObjDragMeth==NULL) {
+ if (!IsSolidDraggingNow()) {
+ HideCreateObj(pDragWin,TRUE);
+ } else {
+ Rectangle aBound(pAktCreate->GetBoundRect());
+ Point aPvOfs(pCreatePV->GetOffset());
+ aBound.Move(aPvOfs.X(),aPvOfs.Y());
+ InvalidateAllWin(aBound);
+ }
+ pAktCreate->BrkCreate(aDragStat);
+ } else {
+ pLibObjDragMeth->Brk();
+ delete pLibObjDragMeth;
+ pLibObjDragMeth=NULL;
+ }
+ delete pAktCreate;
+ pAktCreate=NULL;
+ pCreatePV=NULL;
+ SetSolidDraggingNow(FALSE);
+ SetSolidDraggingCheck(FALSE);
+ }
+}
+
+void SdrCreateView::DrawCreateObjDiff(XPolyPolygon& rXPP0, XPolyPolygon& rXPP1)
+{
+ if (IsSolidDraggingNow()) return;
+ USHORT nPolyAnz0=rXPP0.Count();
+ USHORT nPolyAnz1=rXPP1.Count();
+ USHORT nMinPolyAnz=Min(nPolyAnz0,nPolyAnz1);
+ USHORT nPolyNum;
+ for (nPolyNum=nMinPolyAnz; nPolyNum>0;) { // unveraenderte Polygone entfernen
+ nPolyNum--;
+ if (rXPP0[nPolyNum]==rXPP1[nPolyNum]) {
+ rXPP0.Remove(nPolyNum);
+ rXPP1.Remove(nPolyNum);
+ }
+ }
+ nPolyAnz0=rXPP0.Count();
+ nPolyAnz1=rXPP1.Count();
+ nMinPolyAnz=Min(nPolyAnz0,nPolyAnz1);
+ BOOL bNeedDot=FALSE;
+ for (nPolyNum=nMinPolyAnz; nPolyNum>0;) { // unveraenderte Polygonteile entfernen
+ nPolyNum--;
+ const XPolygon& rXP0=rXPP0[nPolyNum];
+ const XPolygon& rXP1=rXPP1[nPolyNum];
+ USHORT nPntAnz0=rXP0.GetPointCount();
+ USHORT nPntAnz1=rXP1.GetPointCount();
+ USHORT nMinPntAnz=Min(nPntAnz0,nPntAnz1);
+ USHORT nEquCnt0=0;
+ USHORT nEquCnt1=0;
+ for (USHORT nPntNum=0; nPntNum<nMinPntAnz; nPntNum++) {
+ if (rXP0[nPntNum]==rXP1[nPntNum]) {
+ nEquCnt0=nEquCnt1;
+ BOOL bCtrl0=(nPntNum<nMinPntAnz) && rXP0.IsControl(nPntNum+1);
+ BOOL bCtrl1=(nPntNum<nMinPntAnz) && rXP1.IsControl(nPntNum+1);
+ if (bCtrl0==bCtrl1) {
+ nEquCnt1=nPntNum+1;
+ if (bCtrl0) {
+ nPntNum++;
+ if (rXP0[nPntNum]==rXP1[nPntNum]) {
+ nPntNum++;
+ if (rXP0[nPntNum]==rXP1[nPntNum]) {
+ nEquCnt1=nPntNum+1;
+ } else nPntNum=nMinPntAnz; // sowas wie break.
+ } else nPntNum=nMinPntAnz; // sowas wie break.
+ }
+ } else nPntNum=nMinPntAnz; // sowas wie break.
+ } else nPntNum=nMinPntAnz; // sowas wie break.
+ }
+ if (nEquCnt0!=0) {
+ rXPP0[nPolyNum].Remove(0,nEquCnt0);
+ rXPP1[nPolyNum].Remove(0,nEquCnt0);
+#ifndef MAC // anderes Polygonpainting beim Mac
+ if (nPolyNum==nMinPolyAnz-1 &&
+ (rXPP0[nPolyNum].GetPointCount()<=1 ||
+ rXPP1[nPolyNum].GetPointCount()<=1)) bNeedDot=TRUE;
+#endif
+ }
+ }
+ aDragStat.SetShown(TRUE);
+ USHORT nOutNum=0;
+ do {
+ Window* pO= (Window*)pDragWin;
+ if (pO==NULL) {
+ pO=(Window*)GetWin(nOutNum);
+ nOutNum++;
+ }
+ if (pO!=NULL) {
+ ImpSdrHdcMerk aHDCMerk(*pO,SDRHDC_SAVEALL,bRestoreColors);
+ RasterOp eRop0=pO->GetRasterOp();
+ pO->SetRasterOp(ROP_INVERT);
+ pXOut->SetOutDev(pO);
+
+ Color aBlackColor( COL_BLACK );
+ Color aTranspColor( COL_TRANSPARENT );
+ pXOut->OverrideLineColor( aBlackColor );
+ pXOut->OverrideFillColor( aTranspColor );
+ pXOut->SetOffset(pCreatePV->GetOffset());
+ USHORT nAnz=rXPP0.Count();
+ USHORT i;
+ for (i=0; i<nAnz; i++) {
+ pXOut->DrawXPolyLine(rXPP0[i]);
+ }
+ nAnz=rXPP1.Count();
+ for (i=0; i<nAnz; i++) {
+ pXOut->DrawXPolyLine(rXPP1[i]);
+ if (bNeedDot && nPolyNum==nMinPolyAnz-1) {
+ Point aPt(rXPP1[i][0]);
+ //pO->InvertRect(Rectangle(aPt,aPt));
+ pO->Invert( Rectangle( aPt, aPt ) );
+ }
+ }
+ pXOut->SetOffset(Point(0,0));
+ pO->SetRasterOp(eRop0);
+ if (bRestoreColors) aHDCMerk.Restore(*pO);
+ }
+ } while (pDragWin==NULL && nOutNum<GetWinCount());
+}
+
+void SdrCreateView::DrawCreateObj(OutputDevice* pOut, BOOL bFull) const
+{
+ if (IsSolidDraggingNow()) return;
+ if (IsCreateObj()) {
+ USHORT i=0;
+ do {
+ OutputDevice* pO=pOut;
+ if (pO==NULL) {
+ pO=GetWin(i);
+ i++;
+ }
+ if (pO!=NULL) {
+ ImpSdrHdcMerk aHDCMerk(*pO,SDRHDC_SAVEALL,bRestoreColors);
+ RasterOp eRop0=pO->GetRasterOp();
+ pO->SetRasterOp(ROP_INVERT);
+ pXOut->SetOutDev(pO);
+ Color aBlackColor( COL_BLACK );
+ Color aTranspColor( COL_TRANSPARENT );
+ pXOut->OverrideLineColor( aBlackColor );
+ pXOut->OverrideFillColor( aTranspColor );
+ pXOut->SetOffset(pCreatePV->GetOffset());
+ XPolyPolygon aXPP(pCreatePV->DragPoly());
+ USHORT nAnz=aXPP.Count();
+ for (USHORT i=0; i<nAnz; i++) {
+ pXOut->DrawXPolyLine(aXPP[i]);
+ }
+ pXOut->SetOffset(Point(0,0));
+ pO->SetRasterOp(eRop0);
+ if (bRestoreColors) aHDCMerk.Restore(*pO);
+ }
+ } while (pOut==NULL && i<GetWinCount());
+ }
+}
+
+void SdrCreateView::ShowCreateObj(OutputDevice* pOut, BOOL bFull)
+{
+ if (IsCreateObj() && !aDragStat.IsShown()) {
+ XPolyPolygon aXPP;
+ if (pLibObjDragMeth==NULL) {
+ pAktCreate->TakeCreatePoly(aDragStat,pCreatePV->DragPoly());
+ }
+ DrawCreateObj(pOut,bFull);
+ aDragStat.SetShown(TRUE);
+ }
+}
+
+void SdrCreateView::HideCreateObj(OutputDevice* pOut, BOOL bFull)
+{
+ if (IsCreateObj() && aDragStat.IsShown()) {
+ DrawCreateObj(pOut,bFull);
+ aDragStat.SetShown(FALSE);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/* new interface src537 */
+BOOL SdrCreateView::GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr) const
+{
+ if(pAktCreate)
+ {
+ pAktCreate->TakeAttributes(rTargetSet, FALSE, bOnlyHardAttr);
+ return TRUE;
+ }
+ else
+ {
+ return SdrDragView::GetAttributes(rTargetSet, bOnlyHardAttr);
+ }
+}
+
+BOOL SdrCreateView::SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll)
+{
+ if (pAktCreate!=NULL) {
+ pAktCreate->SetAttributes(rSet,bReplaceAll);
+ return TRUE;
+ } else {
+ return SdrDragView::SetAttributes(rSet,bReplaceAll);
+ }
+}
+
+SfxStyleSheet* SdrCreateView::GetStyleSheet(BOOL& rOk) const
+{
+ if (pAktCreate!=NULL) {
+ rOk=TRUE;
+ return pAktCreate->GetStyleSheet();
+ } else {
+ return SdrDragView::GetStyleSheet(rOk);
+ }
+}
+
+BOOL SdrCreateView::SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
+{
+ if (pAktCreate!=NULL) {
+ pAktCreate->SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
+ return TRUE;
+ } else {
+ return SdrDragView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrCreateView::WriteRecords(SvStream& rOut) const
+{
+ SdrDragView::WriteRecords(rOut);
+ {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWCROBJECT);
+ rOut<<nAktInvent;
+ rOut<<nAktIdent;
+ } {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWCRFLAGS);
+ rOut<<BOOL(b1stPointAsCenter);
+ } {
+ // in der CreateView (statt ObjEditView) weil sonst inkompatibel.
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWTEXTEDIT);
+ rOut<<BOOL(bQuickTextEditMode);
+ } {
+ // in der CreateView (statt ObjEditView) weil sonst inkompatibel.
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWMACRO);
+ rOut<<BOOL(bMacroMode);
+ }
+}
+
+BOOL SdrCreateView::ReadRecord(const SdrIOHeader& rViewHead,
+ const SdrNamedSubRecord& rSubHead,
+ SvStream& rIn)
+{
+ BOOL bRet=FALSE;
+ if (rSubHead.GetInventor()==SdrInventor) {
+ bRet=TRUE;
+ switch (rSubHead.GetIdentifier()) {
+ case SDRIORECNAME_VIEWCROBJECT: {
+ UINT32 nInvent;
+ UINT16 nIdent;
+ rIn>>nInvent;
+ rIn>>nIdent;
+ SetCurrentObj(nIdent,nInvent);
+ } break;
+ case SDRIORECNAME_VIEWCRFLAGS: {
+ BOOL bTmp; rIn>>bTmp; b1stPointAsCenter=bTmp;
+ } break;
+ case SDRIORECNAME_VIEWTEXTEDIT: {
+ // in der CreateView (statt ObjEditView) weil sonst inkompatibel.
+ BOOL bTmp; rIn>>bTmp; bQuickTextEditMode=bTmp;
+ } break;
+ case SDRIORECNAME_VIEWMACRO: {
+ // in der CreateView (statt ObjEditView) weil sonst inkompatibel.
+ BOOL bTmp; rIn>>bTmp; bMacroMode=bTmp;
+ } break;
+ default: bRet=FALSE;
+ }
+ }
+ if (!bRet) bRet=SdrDragView::ReadRecord(rViewHead,rSubHead,rIn);
+ return bRet;
+}
+
diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx
new file mode 100644
index 0000000000..fb3ed3048e
--- /dev/null
+++ b/svx/source/svdraw/svddrag.cxx
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * $RCSfile: svddrag.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "svdview.hxx"
+
+#ifndef _SVDDRAG_HXX //autogen
+#include "svddrag.hxx"
+#endif
+
+void SdrDragStat::Clear(FASTBOOL bLeaveOne)
+{
+ void* pP=aPnts.First();
+ while (pP!=NULL) {
+ delete (Point*)pP;
+ pP=aPnts.Next();
+ }
+ if (pUser!=NULL) delete pUser;
+ pUser=NULL;
+ aPnts.Clear();
+ if (bLeaveOne) {
+ aPnts.Insert(new Point,CONTAINER_APPEND);
+ }
+}
+
+void SdrDragStat::Reset()
+{
+ pView=NULL;
+ pPageView=NULL;
+ bShown=FALSE;
+ nMinMov=1;
+ bMinMoved=FALSE;
+ bHorFixed=FALSE;
+ bVerFixed=FALSE;
+ bWantNoSnap=FALSE;
+ pHdl=NULL;
+ bOrtho4=FALSE;
+ bOrtho8=FALSE;
+ pDragMethod=NULL;
+ bEndDragChangesAttributes=FALSE;
+ bEndDragChangesGeoAndAttributes=FALSE;
+ bMouseIsUp=FALSE;
+ Clear(TRUE);
+ aActionRect=Rectangle();
+}
+
+void SdrDragStat::Reset(const Point& rPnt)
+{
+ Reset();
+ Start()=rPnt;
+ aPos0=rPnt;
+ aRealPos0=rPnt;
+ RealNow()=rPnt;
+}
+
+void SdrDragStat::NextMove(const Point& rPnt)
+{
+ aRealPos0=GetRealNow();
+ aPos0=GetNow();
+ RealNow()=rPnt;
+ Point aBla=KorregPos(GetRealNow(),GetPrev());
+ Now()=aBla;
+}
+
+void SdrDragStat::NextPoint(FASTBOOL bSaveReal)
+{
+ Point aPnt(GetNow());
+ if (bSaveReal) aPnt=aRealNow;
+ aPnts.Insert(new Point(KorregPos(GetRealNow(),aPnt)),CONTAINER_APPEND);
+ Prev()=aPnt;
+}
+
+void SdrDragStat::PrevPoint()
+{
+ if (aPnts.Count()>=2) { // einer muss immer da bleiben
+ Point* pPnt=(Point*)(aPnts.GetObject(aPnts.Count()-2));
+ aPnts.Remove(aPnts.Count()-2);
+ delete pPnt;
+ Now()=KorregPos(GetRealNow(),GetPrev());
+ }
+}
+
+Point SdrDragStat::KorregPos(const Point& rNow, const Point& rPrev) const
+{
+ Point aRet(rNow);
+ return aRet;
+}
+
+FASTBOOL SdrDragStat::CheckMinMoved(const Point& rPnt)
+{
+ if (!bMinMoved) {
+ long dx=rPnt.X()-GetPrev().X(); if (dx<0) dx=-dx;
+ long dy=rPnt.Y()-GetPrev().Y(); if (dy<0) dy=-dy;
+ if (dx>=long(nMinMov) || dy>=long(nMinMov))
+ bMinMoved=TRUE;
+ }
+ return bMinMoved;
+}
+
+Fraction SdrDragStat::GetXFact() const
+{
+ long nMul=GetNow().X()-aRef1.X();
+ long nDiv=GetPrev().X()-aRef1.X();
+ if (nDiv==0) nDiv=1;
+ if (bHorFixed) { nMul=1; nDiv=1; }
+ return Fraction(nMul,nDiv);
+}
+
+Fraction SdrDragStat::GetYFact() const
+{
+ long nMul=GetNow().Y()-aRef1.Y();
+ long nDiv=GetPrev().Y()-aRef1.Y();
+ if (nDiv==0) nDiv=1;
+ if (bVerFixed) { nMul=1; nDiv=1; }
+ return Fraction(nMul,nDiv);
+}
+
+void SdrDragStat::TakeCreateRect(Rectangle& rRect) const
+{
+ rRect=Rectangle(GetStart(),GetNow());
+ if (GetPointAnz()>=2) {
+ Point aBtmRgt(GetPoint(1));
+ rRect.Right()=aBtmRgt.X();
+ rRect.Bottom()=aBtmRgt.Y();
+ }
+ if (pView!=NULL && pView->IsCreate1stPointAsCenter()) {
+ rRect.Top()+=rRect.Top()-rRect.Bottom();
+ rRect.Left()+=rRect.Left()-rRect.Right();
+ }
+}
+
diff --git a/svx/source/svdraw/svddrgm1.hxx b/svx/source/svdraw/svddrgm1.hxx
new file mode 100644
index 0000000000..df707a3cc0
--- /dev/null
+++ b/svx/source/svdraw/svddrgm1.hxx
@@ -0,0 +1,373 @@
+/*************************************************************************
+ *
+ * $RCSfile: svddrgm1.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVDDRGM1_HXX
+#define _SVDDRGM1_HXX
+
+#ifndef _XPOLY_HXX
+#include "xpoly.hxx"
+#endif
+
+#ifndef _SVDHDL_HXX
+#include "svdhdl.hxx"
+#endif
+
+#ifndef _SVDDRGV_HXX
+#include "svddrgv.hxx"
+#endif
+
+#ifndef _SVDDRGMT_HXX
+#include "svddrgmt.hxx"
+#endif
+
+//************************************************************
+// Vorausdeklarationen
+//************************************************************
+
+class SdrDragView;
+class SdrDragStat;
+
+//************************************************************
+// SdrDragMovHdl
+//************************************************************
+
+class SdrDragMovHdl : public SdrDragMethod
+{
+ FASTBOOL bMirrObjShown;
+
+public:
+ TYPEINFO();
+ SdrDragMovHdl(SdrDragView& rNewView): SdrDragMethod(rNewView), bMirrObjShown(FALSE) {}
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+ virtual void Brk();
+ virtual Pointer GetPointer() const;
+ virtual void Show();
+ virtual void Hide();
+};
+
+//************************************************************
+// SdrDragObjOwn
+//************************************************************
+
+class SdrDragObjOwn : public SdrDragMethod
+{
+public:
+ TYPEINFO();
+ SdrDragObjOwn(SdrDragView& rNewView): SdrDragMethod(rNewView) {}
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+ virtual Pointer GetPointer() const;
+ virtual void DrawXor(ExtOutputDevice& rXOut, FASTBOOL bFull) const;
+};
+
+//************************************************************
+// SdrDragMove
+//************************************************************
+
+class SdrDragMove : public SdrDragMethod
+{
+ long nBestXSnap;
+ long nBestYSnap;
+ FASTBOOL bXSnapped;
+ FASTBOOL bYSnapped;
+
+private:
+ void ImpCheckSnap(const Point& rPt);
+
+public:
+ TYPEINFO();
+ SdrDragMove(SdrDragView& rNewView): SdrDragMethod(rNewView) {}
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void MovAllPoints();
+ virtual void MovPoint(Point& rPnt, const Point& rPvOfs);
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+ virtual FASTBOOL IsMoveOnly() const;
+ virtual Pointer GetPointer() const;
+};
+
+//************************************************************
+// SdrDragResize
+//************************************************************
+
+class SdrDragResize : public SdrDragMethod
+{
+protected:
+ Fraction aXFact;
+ Fraction aYFact;
+
+public:
+ TYPEINFO();
+ SdrDragResize(SdrDragView& rNewView): SdrDragMethod(rNewView), aXFact(1,1), aYFact(1,1) {}
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void MovPoint(Point& rPnt, const Point& rPvOfs);
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+ virtual Pointer GetPointer() const;
+};
+
+//************************************************************
+// SdrDragRotate
+//************************************************************
+
+class SdrDragRotate : public SdrDragMethod
+{
+protected:
+ double nSin;
+ double nCos;
+ long nWink0;
+ long nWink;
+ FASTBOOL bRight;
+
+public:
+ TYPEINFO();
+ SdrDragRotate(SdrDragView& rNewView): SdrDragMethod(rNewView),nWink0(0),nWink(0),nSin(0.0),nCos(1.0),bRight(FALSE) {}
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void MovPoint(Point& rPnt, const Point& rPvOfs);
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+ virtual Pointer GetPointer() const;
+};
+
+//************************************************************
+// SdrDragShear
+//************************************************************
+
+class SdrDragShear : public SdrDragMethod
+{
+ Fraction aFact;
+ long nWink0;
+ long nWink;
+ double nTan;
+ FASTBOOL bVertical; // Vertikales verzerren
+ FASTBOOL bResize; // Shear mit Resize
+ FASTBOOL bUpSideDown; // Beim Shear/Slant gespiegelt
+ FASTBOOL bSlant;
+
+public:
+ TYPEINFO();
+ SdrDragShear(SdrDragView& rNewView,FASTBOOL bSlant1): SdrDragMethod(rNewView),
+ bSlant(bSlant1),aFact(1,1),
+ nWink0(0),nWink(0),nTan(0.0),
+ bVertical(FALSE),bResize(FALSE),bUpSideDown(FALSE) { }
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void MovPoint(Point& rPnt, const Point& rPvOfs);
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+ virtual Pointer GetPointer() const;
+};
+
+//************************************************************
+// SdrDragMirror
+//************************************************************
+
+class SdrDragMirror : public SdrDragMethod
+{
+ Point aDif;
+ long nWink;
+ FASTBOOL bMirrored;
+ FASTBOOL bSide0;
+
+private:
+ FASTBOOL ImpCheckSide(const Point& rPnt) const;
+
+public:
+ TYPEINFO();
+ SdrDragMirror(SdrDragView& rNewView): SdrDragMethod(rNewView),nWink(0),bMirrored(FALSE),bSide0(FALSE) { }
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void MovPoint(Point& rPnt, const Point& rPvOfs);
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+ virtual Pointer GetPointer() const;
+};
+
+//************************************************************
+// SdrDragGradient
+//************************************************************
+
+class SdrDragGradient : public SdrDragMethod
+{
+ // Handles to work on
+ SdrHdlGradient* pIAOHandle;
+
+ // is this for gradient (or for transparence) ?
+ unsigned bIsGradient : 1;
+
+public:
+ TYPEINFO();
+ SdrDragGradient(SdrDragView& rNewView, BOOL bGrad = TRUE);
+
+ BOOL IsGradient() const { return bIsGradient; }
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+ virtual Pointer GetPointer() const;
+ virtual void Brk();
+};
+
+//************************************************************
+// SdrDragCrook
+//************************************************************
+
+class SdrDragCrook : public SdrDragMethod
+{
+ Rectangle aMarkRect;
+ Point aMarkCenter;
+ Point aCenter;
+ Point aStart;
+ Fraction aFact;
+ Point aRad;
+ FASTBOOL bContortionAllowed;
+ FASTBOOL bNoContortionAllowed;
+ FASTBOOL bContortion;
+ FASTBOOL bResizeAllowed;
+ FASTBOOL bResize;
+ FASTBOOL bRotateAllowed;
+ FASTBOOL bRotate;
+ FASTBOOL bVertical;
+ FASTBOOL bValid;
+ FASTBOOL bLft;
+ FASTBOOL bRgt;
+ FASTBOOL bUpr;
+ FASTBOOL bLwr;
+ FASTBOOL bAtCenter;
+ long nWink;
+ long nMarkSize;
+ SdrCrookMode eMode;
+
+public:
+ TYPEINFO();
+ SdrDragCrook(SdrDragView& rNewView): SdrDragMethod(rNewView),aFact(1,1),
+ bContortionAllowed(FALSE),bNoContortionAllowed(FALSE),bContortion(FALSE),
+ bResizeAllowed(FALSE),bResize(FALSE),bRotateAllowed(FALSE),bRotate(FALSE),
+ bVertical(FALSE),bValid(FALSE),bLft(FALSE),bRgt(FALSE),bUpr(FALSE),bLwr(FALSE),bAtCenter(FALSE),
+ nWink(0),nMarkSize(0),eMode(SDRCROOK_ROTATE) {}
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void MovAllPoints();
+ void MovPoint(Point& rPnt, const Point& rPvOfs, Point* pC1, Point* pC2);
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+ virtual Pointer GetPointer() const;
+ virtual void DrawXor(ExtOutputDevice& rXOut, FASTBOOL bFull) const;
+};
+
+//************************************************************
+// SdrDragDistort
+//************************************************************
+
+class SdrDragDistort : public SdrDragMethod
+{
+ Rectangle aMarkRect;
+ XPolygon aDistortedRect;
+ USHORT nPolyPt;
+ FASTBOOL bContortionAllowed;
+ FASTBOOL bNoContortionAllowed;
+ FASTBOOL bContortion;
+
+public:
+ TYPEINFO();
+ SdrDragDistort(SdrDragView& rNewView): SdrDragMethod(rNewView),nPolyPt(0),
+ bContortionAllowed(FALSE),bNoContortionAllowed(FALSE),bContortion(FALSE) {}
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void MovAllPoints();
+ virtual void Mov(const Point& rPnt);
+ virtual FASTBOOL End(FASTBOOL bCopy);
+ virtual Pointer GetPointer() const;
+ virtual void DrawXor(ExtOutputDevice& rXOut, FASTBOOL bFull) const;
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDDRGM1_HXX
+
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
new file mode 100644
index 0000000000..6091ebd0c4
--- /dev/null
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -0,0 +1,1985 @@
+/*************************************************************************
+ *
+ * $RCSfile: svddrgmt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svddrgm1.hxx"
+#include <math.h>
+
+#ifndef _MATH_H
+#define _MATH_H
+#endif
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+#include "xattr.hxx"
+#include "xpoly.hxx"
+#include "svdxout.hxx"
+#include "svdetc.hxx"
+#include "svdtrans.hxx"
+#include "svdundo.hxx"
+#include "svdmark.hxx"
+#include "svdocapt.hxx"
+#include "svdpagv.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+#include "svddrgv.hxx"
+#include "svdundo.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT0(SdrDragMethod);
+
+void SdrDragMethod::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, USHORT nVal) const
+{
+ USHORT nOpt=0;
+ if (IsDraggingPoints()) {
+ nOpt=IMPSDR_POINTSDESCRIPTION;
+ } else if (IsDraggingGluePoints()) {
+ nOpt=IMPSDR_GLUEPOINTSDESCRIPTION;
+ }
+ rView.ImpTakeDescriptionStr(nStrCacheID,rStr,nVal,nOpt);
+}
+
+SdrObject* SdrDragMethod::GetDragObj() const
+{
+ SdrObject* pObj=NULL;
+ if (rView.pDragHdl!=NULL) pObj=rView.pDragHdl->GetObj();
+ if (pObj==NULL) pObj=rView.pMarkedObj;
+ return pObj;
+}
+
+SdrPageView* SdrDragMethod::GetDragPV() const
+{
+ SdrPageView* pPV=NULL;
+ if (rView.pDragHdl!=NULL) pPV=rView.pDragHdl->GetPageView();
+ if (pPV==NULL) pPV=rView.pMarkedPV;
+ return pPV;
+}
+
+void SdrDragMethod::Draw() const
+{
+ rView.DrawDragObj(rView.pDragWin,TRUE);
+}
+
+void SdrDragMethod::Show()
+{
+ rView.ShowDragObj(rView.pDragWin);
+}
+
+void SdrDragMethod::Hide()
+{
+ rView.HideDragObj(rView.pDragWin);
+}
+
+void SdrDragMethod::MovAllPoints()
+{
+ USHORT nPvAnz=rView.GetPageViewCount();
+ for (USHORT nv=0; nv<nPvAnz; nv++) {
+ SdrPageView* pPV=rView.GetPageViewPvNum(nv);
+ if (pPV->HasMarkedObj()) {
+ pPV->DragPoly()=pPV->DragPoly0();
+ USHORT i,j;
+ USHORT nPolyAnz=pPV->DragPoly().Count();
+ for (j=0; j<nPolyAnz; j++) {
+ XPolygon& aPol=pPV->DragPoly()[j];
+ Point aOfs(pPV->GetOffset());
+ USHORT nPtAnz=aPol.GetPointCount();
+ for (i=0; i<nPtAnz; i++) {
+ MovPoint(aPol[i],aOfs);
+ }
+ }
+ }
+ }
+}
+
+void SdrDragMethod::MovPoint(Point& rPnt, const Point& rPvOfs)
+{
+}
+
+void SdrDragMethod::Brk()
+{
+ Hide();
+}
+
+FASTBOOL SdrDragMethod::IsMoveOnly() const
+{
+ return FALSE;
+}
+
+void SdrDragMethod::DrawXor(ExtOutputDevice& rXOut, FASTBOOL bFull) const
+{
+ FASTBOOL bGlue=IsDraggingGluePoints();
+ FASTBOOL bPoints=IsDraggingPoints() || bGlue;
+ OutputDevice* pOut=rXOut.GetOutDev();
+ long x=0,y=0;
+ if (bPoints) {
+ long nSiz=bGlue ? 3 : rView.aHdl.GetHdlSize();
+ Size aSiz(pOut->PixelToLogic(Size(nSiz,nSiz)));
+ x=aSiz.Width();
+ y=aSiz.Height();
+ pOut->SetLineColor( Color( COL_BLACK ) );
+ }
+ USHORT nPvAnz=rView.GetPageViewCount();
+ for (USHORT nv=0; nv<nPvAnz; nv++)
+ {
+ SdrPageView* pPV=rView.GetPageViewPvNum(nv);
+ if (pPV->HasMarkedObj())
+ {
+ rXOut.SetOffset(pPV->GetOffset());
+ const XPolyPolygon& rXPP=pPV->DragPoly();
+ USHORT nPolyAnz=rXPP.Count();
+ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++)
+ {
+ const XPolygon& rXP=rXPP[nPolyNum];
+ USHORT nPtAnz=rXP.GetPointCount();
+ if (bPoints)
+ {
+ for (USHORT nPtNum=0; nPtNum<nPtAnz; nPtNum++)
+ {
+ Point aPt(rXP[nPtNum]);
+ long x1=aPt.X()-x;
+ long x2=aPt.X()+x;
+ long y1=aPt.Y()-y;
+ long y2=aPt.Y()+y;
+ if (bGlue)
+ { // ein Kreuzlein an jedem Punkt
+ pOut->DrawLine(Point(x1,y1),Point(x2,y2));
+ pOut->DrawLine(Point(x1,y2),Point(x2,y1));
+ }
+ else
+ { // oder ein Kaestlein
+ pOut->DrawLine(Point(x1,y1),Point(x2,y1));
+ pOut->DrawLine(Point(x1,y2),Point(x2,y2));
+ pOut->DrawLine(Point(x1,y1),Point(x1,y2));
+ pOut->DrawLine(Point(x2,y1),Point(x2,y2));
+ }
+ }
+ }
+ else
+ {
+ if (rXOut.GetOutDev()->GetOutDevType() == OUTDEV_WINDOW)
+ {
+ Rectangle aRect;
+ Window* pWin = (Window*) rXOut.GetOutDev();
+
+ if ((nPtAnz == 5 || nPtAnz == 6) &&
+ rXP.GetFlags(1) != XPOLY_CONTROL)
+ {
+ /**************************************************
+ * Ist es ein Rechteck? (keine Bezier-Kurve)
+ **************************************************/
+ if (nPtAnz == 6 &&
+ rXP[0].Y() == rXP[1].Y() &&
+ rXP[1].X() == rXP[2].X() &&
+ rXP[2].Y() == rXP[3].Y() &&
+ rXP[3].X() == rXP[4].X() &&
+ rXP[4].Y() == rXP[5].Y() &&
+ rXP[5] == rXP[0])
+ {
+ // Spezielles Dragging-Rechteck (Drehsinn rechts)
+ aRect = Rectangle(rXP[2], rXP[4]);
+ }
+ else if (nPtAnz == 5 &&
+ rXP[0].Y() == rXP[1].Y() &&
+ rXP[1].X() == rXP[2].X() &&
+ rXP[2].Y() == rXP[3].Y() &&
+ rXP[3].X() == rXP[4].X() &&
+ rXP[4] == rXP[0])
+ {
+ // Rechteck (Drehsinn links)
+ aRect = rXP.GetBoundRect(pWin);
+ }
+ else if (nPtAnz == 5 &&
+ rXP[0].X() == rXP[1].X() &&
+ rXP[1].Y() == rXP[2].Y() &&
+ rXP[2].X() == rXP[3].X() &&
+ rXP[3].Y() == rXP[4].Y() &&
+ rXP[4] == rXP[0])
+ {
+ // Rechteck (Drehsinn rechts)
+ aRect = rXP.GetBoundRect(pWin);
+ }
+ }
+
+ if (!aRect.IsEmpty())
+ {
+ pWin->InvertTracking(aRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW);
+ }
+ else
+ {
+ const Polygon aPoly( XOutCreatePolygon(rXP, pWin) );
+ pWin->InvertTracking(aPoly, SHOWTRACK_WINDOW);
+ }
+ }
+ else
+ {
+ rXOut.DrawXPolyLine(rXP);
+ }
+ }
+ }
+ }
+ }
+ rView.ImpDrawEdgeXor(rXOut,bFull);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrDragMovHdl,SdrDragMethod);
+
+void SdrDragMovHdl::TakeComment(XubString& rStr) const
+{
+ rStr=ImpGetResStr(STR_DragMethMovHdl);
+ if (rView.IsDragWithCopy()) rStr+=ImpGetResStr(STR_EditWithCopy);
+}
+
+FASTBOOL SdrDragMovHdl::Beg()
+{
+ DragStat().Ref1()=GetDragHdl()->GetPos();
+ DragStat().SetShown(!DragStat().IsShown());
+ SdrHdlKind eKind=GetDragHdl()->GetKind();
+ SdrHdl* pH1=GetHdlList().GetHdl(HDL_REF1);
+ SdrHdl* pH2=GetHdlList().GetHdl(HDL_REF2);
+ if (eKind==HDL_MIRX) {
+ if (pH1==NULL || pH2==NULL) {
+ DBG_ERROR("SdrDragMovHdl::Beg(): Verschieben der Spiegelachse: Referenzhandles nicht gefunden");
+ return FALSE;
+ }
+ DragStat().SetActionRect(Rectangle(pH1->GetPos(),pH2->GetPos()));
+ } else {
+ Point aPt(GetDragHdl()->GetPos());
+ DragStat().SetActionRect(Rectangle(aPt,aPt));
+ }
+ return TRUE;
+}
+
+void SdrDragMovHdl::Mov(const Point& rNoSnapPnt)
+{
+ Point aPnt(rNoSnapPnt);
+ if (DragStat().CheckMinMoved(rNoSnapPnt)) {
+ if (GetDragHdl()->GetKind()==HDL_MIRX) {
+ SdrHdl* pH1=GetHdlList().GetHdl(HDL_REF1);
+ SdrHdl* pH2=GetHdlList().GetHdl(HDL_REF2);
+ if (pH1==NULL || pH2==NULL) return;
+ if (!DragStat().IsNoSnap()) {
+ long nBestXSnap=0;
+ long nBestYSnap=0;
+ BOOL bXSnapped=FALSE;
+ BOOL bYSnapped=FALSE;
+ Point aDif(aPnt-DragStat().GetStart());
+ rView.CheckSnap(Ref1()+aDif,NULL,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
+ rView.CheckSnap(Ref2()+aDif,NULL,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
+ aPnt.X()+=nBestXSnap;
+ aPnt.Y()+=nBestYSnap;
+ }
+ if (aPnt!=DragStat().GetNow()) {
+ Hide();
+ DragStat().NextMove(aPnt);
+ Point aDif(DragStat().GetNow()-DragStat().GetStart());
+ pH1->SetPos(Ref1()+aDif);
+ pH2->SetPos(Ref2()+aDif);
+
+ SdrHdl* pHM = GetHdlList().GetHdl(HDL_MIRX);
+ if(pHM)
+ pHM->Touch();
+
+ Show();
+ DragStat().SetActionRect(Rectangle(pH1->GetPos(),pH2->GetPos()));
+ }
+ } else {
+ if (!DragStat().IsNoSnap()) SnapPos(aPnt);
+ long nSA=0;
+ if (rView.IsAngleSnapEnabled()) nSA=rView.GetSnapAngle();
+ if (rView.IsMirrorAllowed(TRUE,TRUE)) { // eingeschraenkt
+ if (!rView.IsMirrorAllowed(FALSE,FALSE)) nSA=4500;
+ if (!rView.IsMirrorAllowed(TRUE,FALSE)) nSA=9000;
+ }
+ if (rView.IsOrtho() && nSA!=9000) nSA=4500;
+ if (nSA!=0) { // Winkelfang
+ SdrHdlKind eRef=HDL_REF1;
+ if (GetDragHdl()->GetKind()==HDL_REF1) eRef=HDL_REF2;
+ SdrHdl* pH=GetHdlList().GetHdl(eRef);
+ if (pH!=NULL) {
+ Point aRef(pH->GetPos());
+ long nWink=NormAngle360(GetAngle(aPnt-aRef));
+ long nNeuWink=nWink;
+ nNeuWink+=nSA/2;
+ nNeuWink/=nSA;
+ nNeuWink*=nSA;
+ nNeuWink=NormAngle360(nNeuWink);
+ double a=(nNeuWink-nWink)*nPi180;
+ double nSin=sin(a);
+ double nCos=cos(a);
+ RotatePoint(aPnt,aRef,nSin,nCos);
+ // Bei bestimmten Werten Rundungsfehler ausschliessen:
+ if (nSA==9000) {
+ if (nNeuWink==0 || nNeuWink==18000) aPnt.Y()=aRef.Y();
+ if (nNeuWink==9000 || nNeuWink==27000) aPnt.X()=aRef.X();
+ }
+ if (nSA==4500) OrthoDistance8(aRef,aPnt,TRUE);
+ }
+ }
+ if (aPnt!=DragStat().GetNow()) {
+ Hide();
+ DragStat().NextMove(aPnt);
+ GetDragHdl()->SetPos(DragStat().GetNow());
+ SdrHdl* pHM = GetHdlList().GetHdl(HDL_MIRX);
+ if(pHM)
+ pHM->Touch();
+ Show();
+ DragStat().SetActionRect(Rectangle(aPnt,aPnt));
+ }
+ }
+ }
+}
+
+FASTBOOL SdrDragMovHdl::End(FASTBOOL bCopy)
+{
+ switch (GetDragHdl()->GetKind()) {
+ case HDL_REF1: Ref1()=DragStat().GetNow(); break;
+ case HDL_REF2: Ref2()=DragStat().GetNow(); break;
+ case HDL_MIRX: {
+ Ref1()+=DragStat().GetNow()-DragStat().GetStart();
+ Ref2()+=DragStat().GetNow()-DragStat().GetStart();
+ } break;
+ }
+ return TRUE;
+}
+
+void SdrDragMovHdl::Brk()
+{
+ Hide();
+ GetDragHdl()->SetPos(DragStat().GetRef1());
+ SdrHdl* pHM = GetHdlList().GetHdl(HDL_MIRX);
+ if(pHM)
+ pHM->Touch();
+ Draw();
+}
+
+void SdrDragMovHdl::Show()
+{
+ SdrHdl* pDragHdl=GetDragHdl();
+ SdrHdlKind eDragHdl=pDragHdl->GetKind();
+ FASTBOOL bMirX=eDragHdl==HDL_MIRX;
+ FASTBOOL bShown=DragStat().IsShown();
+ if (rView.IsSolidMarkHdl()) {
+ if (!bShown) {
+ const SdrHdlList& rHL=GetHdlList();
+ SdrHdlKind eHdl1=eDragHdl;
+ SdrHdlKind eHdl2=eDragHdl;
+ if (bMirX) { eHdl1=HDL_REF1; eHdl2=HDL_REF2; }
+ SdrHdl* pHdl1=rHL.GetHdl(eHdl1);
+ SdrHdl* pHdl2=rHL.GetHdl(eHdl2);
+ ULONG nHdlNum1=rHL.GetHdlNum(pHdl1);
+ ULONG nHdlNum2=rHL.GetHdlNum(pHdl2);
+ if (nHdlNum1==CONTAINER_ENTRY_NOTFOUND || pHdl1==NULL) {
+ DBG_ERROR("SdrDragMovHdl::Show(): Handle nicht in der HandleList gefunden!");
+ return;
+ }
+ if (bMirX && (nHdlNum2==CONTAINER_ENTRY_NOTFOUND || pHdl2==NULL)) {
+ DBG_ERROR("SdrDragMovHdl::Show(): Handle nicht in der HandleList gefunden!");
+ return;
+ }
+ }
+ }
+ SdrDragMethod::Show();
+}
+
+void SdrDragMovHdl::Hide()
+{
+ SdrHdl* pDragHdl=GetDragHdl();
+ SdrHdlKind eDragHdl=pDragHdl->GetKind();
+ FASTBOOL bMirX=eDragHdl==HDL_MIRX;
+ FASTBOOL bShown=DragStat().IsShown();
+ SdrDragMethod::Hide();
+ if (rView.IsSolidMarkHdl()) {
+ if (bShown) {
+ const SdrHdlList& rHL=GetHdlList();
+ SdrHdlKind eHdl1=eDragHdl;
+ SdrHdlKind eHdl2=eDragHdl;
+ if (bMirX) { eHdl1=HDL_REF1; eHdl2=HDL_REF2; }
+ SdrHdl* pHdl1=rHL.GetHdl(eHdl1);
+ SdrHdl* pHdl2=rHL.GetHdl(eHdl2);
+ ULONG nHdlNum1=rHL.GetHdlNum(pHdl1);
+ ULONG nHdlNum2=rHL.GetHdlNum(pHdl2);
+ if (nHdlNum1==CONTAINER_ENTRY_NOTFOUND || pHdl1==NULL) {
+ DBG_ERROR("SdrDragMovHdl::Hide(): Handle nicht in der HandleList gefunden!");
+ return;
+ }
+ if (bMirX && (nHdlNum2==CONTAINER_ENTRY_NOTFOUND || pHdl2==NULL)) {
+ DBG_ERROR("SdrDragMovHdl::Hide(): Handle nicht in der HandleList gefunden!");
+ return;
+ }
+ }
+ }
+}
+
+Pointer SdrDragMovHdl::GetPointer() const
+{
+ const SdrHdl* pHdl=GetDragHdl();
+ if (pHdl!=NULL) {
+ return pHdl->GetPointer();
+ }
+ return Pointer(POINTER_REFHAND);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrDragObjOwn,SdrDragMethod);
+
+void SdrDragObjOwn::TakeComment(XubString& rStr) const
+{
+ const SdrObject* pObj=GetDragObj();
+ if (pObj!=NULL) {
+ rStr=pObj->GetDragComment(DragStat(),FALSE,FALSE);
+ // Kein Copy bei ObjOwn
+ }
+}
+
+FASTBOOL SdrDragObjOwn::Beg()
+{
+ SdrObject* pObj=GetDragObj();
+ return pObj!=NULL ? pObj->BegDrag(DragStat()) : FALSE;
+}
+
+void SdrDragObjOwn::Mov(const Point& rNoSnapPnt)
+{
+ Point aPnt(rNoSnapPnt);
+ SdrPageView* pPV=GetDragPV();
+ if (pPV!=NULL) {
+ if (!DragStat().IsNoSnap()) SnapPos(aPnt);
+ FASTBOOL bOrtho=rView.IsOrtho();
+ if (rView.IsOrtho()) {
+ if (DragStat().IsOrtho8Possible()) OrthoDistance8(DragStat().GetStart(),aPnt,rView.IsBigOrtho());
+ else if (DragStat().IsOrtho4Possible()) OrthoDistance4(DragStat().GetStart(),aPnt,rView.IsBigOrtho());
+ }
+ const SdrHdl* pHdl=DragStat().GetHdl();
+ if (pHdl!=NULL) {
+ aPnt-=pPV->GetOffset();
+ }
+ SdrObject* pObj=GetDragObj();
+ if (pObj!=NULL && DragStat().CheckMinMoved(/*aPnt*/rNoSnapPnt)) {
+ if (aPnt!=DragStat().GetNow()) {
+ Hide();
+ DragStat().NextMove(aPnt);
+ pObj->MovDrag(DragStat());
+ pObj->TakeDragPoly(DragStat(),pPV->DragPoly());
+ Show();
+ }
+ }
+ }
+}
+
+FASTBOOL SdrDragObjOwn::End(FASTBOOL bCopy)
+{
+ Hide();
+ SdrUndoAction* pUndo=NULL;
+ SdrUndoAction* pUndo2=NULL;
+ FASTBOOL bRet=FALSE;
+ SdrObject* pObj=GetDragObj();
+ if (pObj!=NULL) {
+ if (!rView.IsInsObjPoint()) {
+ if (DragStat().IsEndDragChangesAttributes()) {
+ pUndo=new SdrUndoAttrObj(*pObj);
+ if (DragStat().IsEndDragChangesGeoAndAttributes()) {
+ pUndo2=new SdrUndoGeoObj(*pObj);
+ }
+ } else {
+ pUndo=new SdrUndoGeoObj(*pObj);
+ }
+ }
+ bRet=pObj->EndDrag(DragStat());
+ if (bRet) {
+ if (pUndo!=NULL) {
+ if (pUndo2!=NULL) {
+ rView.BegUndo();
+ }
+ rView.AddUndo(pUndo);
+ if (pUndo2!=NULL) {
+ rView.AddUndo(pUndo2);
+ rView.EndUndo();
+ }
+ }
+ } else {
+ delete pUndo;
+ }
+ }
+ return bRet;
+}
+
+void SdrDragObjOwn::DrawXor(ExtOutputDevice& rXOut, FASTBOOL bFull) const
+{
+ SdrPageView* pPV=GetDragPV();
+ if (pPV!=NULL) {
+ rXOut.SetOffset(pPV->GetOffset());
+ const XPolyPolygon& rXPP=pPV->DragPoly();
+ OutputDevice* pOut = rXOut.GetOutDev();
+ USHORT nAnz=rXPP.Count();
+ for (USHORT i=0; i<nAnz; i++) {
+ if (pOut->GetOutDevType() == OUTDEV_WINDOW)
+ {
+ const Polygon aPolygon( XOutCreatePolygon(rXPP[i], pOut) );
+ ((Window*) pOut)->InvertTracking(aPolygon, SHOWTRACK_WINDOW);
+ }
+ else
+ {
+ rXOut.DrawXPolyLine(rXPP[i]);
+ }
+ }
+ }
+}
+
+Pointer SdrDragObjOwn::GetPointer() const
+{
+ const SdrHdl* pHdl=GetDragHdl();
+ if (pHdl!=NULL) {
+ return pHdl->GetPointer();
+ }
+ return Pointer(POINTER_MOVE);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrDragMove,SdrDragMethod);
+
+void SdrDragMove::TakeComment(XubString& rStr) const
+{
+ XubString aStr;
+
+ ImpTakeDescriptionStr(STR_DragMethMove, rStr);
+ rStr.AppendAscii(" (x=");
+ rView.GetModel()->TakeMetricStr(DragStat().GetDX(), aStr);
+ rStr += aStr;
+ rStr.AppendAscii(" y=");
+ rView.GetModel()->TakeMetricStr(DragStat().GetDY(), aStr);
+ rStr += aStr;
+ rStr += sal_Unicode(')');
+
+ if(rView.IsDragWithCopy())
+ {
+ if(!rView.IsInsObjPoint() && !rView.IsInsGluePoint())
+ {
+ rStr += ImpGetResStr(STR_EditWithCopy);
+ }
+ }
+}
+
+FASTBOOL SdrDragMove::Beg()
+{
+ SetDragPolys();
+ SetStripes(TRUE);
+ DragStat().SetActionRect(GetMarkedRect());
+ Show();
+ return TRUE;
+}
+
+void SdrDragMove::MovAllPoints()
+{
+ USHORT nPvAnz=rView.GetPageViewCount();
+ for (USHORT nv=0; nv<nPvAnz; nv++) {
+ SdrPageView* pPV=rView.GetPageViewPvNum(nv);
+ if (pPV->HasMarkedObj()) {
+ pPV->DragPoly()=pPV->DragPoly0();
+ pPV->DragPoly().Move(DragStat().GetDX(),DragStat().GetDY());
+ }
+ }
+}
+
+void SdrDragMove::MovPoint(Point& rPnt, const Point& rPvOfs)
+{
+ rPnt.X()+=DragStat().GetDX();
+ rPnt.Y()+=DragStat().GetDY();
+}
+
+void SdrDragMove::ImpCheckSnap(const Point& rPt)
+{
+ Point aPt(rPt);
+ USHORT nRet=SnapPos(aPt);
+ aPt-=rPt;
+ if ((nRet & SDRSNAP_XSNAPPED) !=0) {
+ if (bXSnapped) {
+ if (Abs(aPt.X())<Abs(nBestXSnap)) {
+ nBestXSnap=aPt.X();
+ }
+ } else {
+ nBestXSnap=aPt.X();
+ bXSnapped=TRUE;
+ }
+ }
+ if ((nRet & SDRSNAP_YSNAPPED) !=0) {
+ if (bYSnapped) {
+ if (Abs(aPt.Y())<Abs(nBestYSnap)) {
+ nBestYSnap=aPt.Y();
+ }
+ } else {
+ nBestYSnap=aPt.Y();
+ bYSnapped=TRUE;
+ }
+ }
+}
+
+void SdrDragMove::Mov(const Point& rNoSnapPnt_)
+{
+ nBestXSnap=0;
+ nBestYSnap=0;
+ bXSnapped=FALSE;
+ bYSnapped=FALSE;
+ Point aNoSnapPnt(rNoSnapPnt_);
+ const SdrHdl* pHdl=DragStat().GetHdl();
+ if (pHdl!=NULL && pHdl->GetPageView()!=NULL) {
+ aNoSnapPnt-=pHdl->GetPageView()->GetOffset();
+ }
+ const Rectangle& aSR=GetMarkedRect();
+ long nMovedx=aNoSnapPnt.X()-DragStat().GetStart().X();
+ long nMovedy=aNoSnapPnt.Y()-DragStat().GetStart().Y();
+ Point aLO(aSR.TopLeft()); aLO.X()+=nMovedx; aLO.Y()+=nMovedy;
+ Point aRU(aSR.BottomRight()); aRU.X()+=nMovedx; aRU.Y()+=nMovedy;
+ Point aLU(aLO.X(),aRU.Y());
+ Point aRO(aRU.X(),aLO.Y());
+ ImpCheckSnap(aLO);
+ if (!rView.IsMoveSnapOnlyTopLeft()) {
+ ImpCheckSnap(aRO);
+ ImpCheckSnap(aLU);
+ ImpCheckSnap(aRU);
+ }
+ Point aPnt(aNoSnapPnt.X()+nBestXSnap,aNoSnapPnt.Y()+nBestYSnap);
+ FASTBOOL bOrtho=rView.IsOrtho();
+ if (bOrtho) OrthoDistance8(DragStat().GetStart(),aPnt,rView.IsBigOrtho());
+ if (DragStat().CheckMinMoved(aNoSnapPnt)) {
+ Point aPt1(aPnt);
+ Rectangle aLR(rView.GetWorkArea());
+ FASTBOOL bWorkArea=!aLR.IsEmpty();
+ FASTBOOL bDragLimit=IsDragLimit();
+ if (bDragLimit || bWorkArea) {
+ Rectangle aSR(GetMarkedRect());
+ Point aD(aPt1-DragStat().GetStart());
+ if (bDragLimit) {
+ Rectangle aR2(GetDragLimitRect());
+ if (bWorkArea) aLR.Intersection(aR2);
+ else aLR=aR2;
+ }
+ if (aSR.Left()>aLR.Left() || aSR.Right()<aLR.Right()) { // ist ueberhaupt Platz zum verschieben?
+ aSR.Move(aD.X(),0);
+ if (aSR.Left()<aLR.Left()) {
+ aPt1.X()-=aSR.Left()-aLR.Left();
+ } else if (aSR.Right()>aLR.Right()) {
+ aPt1.X()-=aSR.Right()-aLR.Right();
+ }
+ } else aPt1.X()=DragStat().GetStart().X(); // kein Platz zum verschieben
+ if (aSR.Top()>aLR.Top() || aSR.Bottom()<aLR.Bottom()) { // ist ueberhaupt Platz zum verschieben?
+ aSR.Move(0,aD.Y());
+ if (aSR.Top()<aLR.Top()) {
+ aPt1.Y()-=aSR.Top()-aLR.Top();
+ } else if (aSR.Bottom()>aLR.Bottom()) {
+ aPt1.Y()-=aSR.Bottom()-aLR.Bottom();
+ }
+ } else aPt1.Y()=DragStat().GetStart().Y(); // kein Platz zum verschieben
+ }
+ if (rView.IsDraggingGluePoints()) { // Klebepunkte aufs BoundRect des Obj limitieren
+ aPt1-=DragStat().GetStart();
+ const SdrMarkList& rML=GetMarkList();
+ ULONG nMarkAnz=rML.GetMarkCount();
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+ const SdrMark* pM=rML.GetMark(nMarkNum);
+ const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
+ ULONG nPtAnz=pPts==NULL ? 0 : pPts->GetCount();
+ if (nPtAnz!=0) {
+ const SdrObject* pObj=pM->GetObj();
+ const SdrPageView* pPV=pM->GetPageView();
+ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+ Rectangle aBound(pObj->GetBoundRect());
+ for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ USHORT nId=pPts->GetObject(nPtNum);
+ USHORT nGlueNum=pGPL->FindGluePoint(nId);
+ if (nGlueNum!=SDRGLUEPOINT_NOTFOUND) {
+ Point aPt((*pGPL)[nGlueNum].GetAbsolutePos(*pObj));
+ aPt+=aPt1; // soviel soll verschoben werden
+ if (aPt.X()<aBound.Left() ) aPt1.X()-=aPt.X()-aBound.Left() ;
+ if (aPt.X()>aBound.Right() ) aPt1.X()-=aPt.X()-aBound.Right() ;
+ if (aPt.Y()<aBound.Top() ) aPt1.Y()-=aPt.Y()-aBound.Top() ;
+ if (aPt.Y()>aBound.Bottom()) aPt1.Y()-=aPt.Y()-aBound.Bottom();
+ }
+ }
+ }
+ }
+ aPt1+=DragStat().GetStart();
+ }
+ if (bOrtho) OrthoDistance8(DragStat().GetStart(),aPt1,FALSE);
+ if (aPt1!=DragStat().GetNow()) {
+ Hide();
+ DragStat().NextMove(aPt1);
+ MovAllPoints();
+ Rectangle aAction(GetMarkedRect());
+ aAction.Move(DragStat().GetDX(),DragStat().GetDY());
+ DragStat().SetActionRect(aAction);
+ Show();
+ }
+ }
+}
+
+FASTBOOL SdrDragMove::End(FASTBOOL bCopy)
+{
+ Hide();
+ if (rView.IsInsObjPoint() || rView.IsInsGluePoint()) bCopy=FALSE;
+ if (IsDraggingPoints()) {
+ rView.MoveMarkedPoints(Size(DragStat().GetDX(),DragStat().GetDY()),bCopy);
+ } else if (IsDraggingGluePoints()) {
+ rView.MoveMarkedGluePoints(Size(DragStat().GetDX(),DragStat().GetDY()),bCopy);
+ } else {
+ rView.MoveMarkedObj(Size(DragStat().GetDX(),DragStat().GetDY()),bCopy);
+ }
+ return TRUE;
+}
+
+FASTBOOL SdrDragMove::IsMoveOnly() const
+{
+ return TRUE;
+}
+
+Pointer SdrDragMove::GetPointer() const
+{
+ if (IsDraggingPoints() || IsDraggingGluePoints()) {
+ return Pointer(POINTER_MOVEPOINT);
+ } else {
+ return Pointer(POINTER_MOVE);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrDragResize,SdrDragMethod);
+
+void SdrDragResize::TakeComment(XubString& rStr) const
+{
+ ImpTakeDescriptionStr(STR_DragMethResize, rStr);
+ BOOL bEqual(aXFact == aYFact);
+ Fraction aFact1(1,1);
+ Point aStart(DragStat().GetStart());
+ Point aRef(DragStat().GetRef1());
+ INT32 nXDiv(aStart.X() - aRef.X());
+
+ if(!nXDiv)
+ nXDiv = 1;
+
+ INT32 nYDiv(aStart.Y() - aRef.Y());
+
+ if(!nYDiv)
+ nYDiv = 1;
+
+ BOOL bX(aXFact != aFact1 && Abs(nXDiv) > 1);
+ BOOL bY(aYFact != aFact1 && Abs(nYDiv) > 1);
+
+ if(bX || bY)
+ {
+ XubString aStr;
+
+ rStr.AppendAscii(" (");
+
+ if(bX)
+ {
+ if(!bEqual)
+ rStr.AppendAscii("x=");
+
+ rView.GetModel()->TakePercentStr(aXFact, aStr);
+ rStr += aStr;
+ }
+
+ if(bY && !bEqual)
+ {
+ if(bX)
+ rStr += sal_Unicode(' ');
+
+ rStr.AppendAscii("y=");
+ rView.GetModel()->TakePercentStr(aYFact, aStr);
+ rStr += aStr;
+ }
+
+ rStr += sal_Unicode(')');
+ }
+
+ if(rView.IsDragWithCopy())
+ rStr += ImpGetResStr(STR_EditWithCopy);
+}
+
+FASTBOOL SdrDragResize::Beg()
+{
+ SdrHdlKind eRefHdl=HDL_MOVE;
+ SdrHdl* pRefHdl=NULL;
+ switch (GetDragHdlKind()) {
+ case HDL_UPLFT: eRefHdl=HDL_LWRGT; break;
+ case HDL_UPPER: eRefHdl=HDL_LOWER; DragStat().SetHorFixed(TRUE); break;
+ case HDL_UPRGT: eRefHdl=HDL_LWLFT; break;
+ case HDL_LEFT : eRefHdl=HDL_RIGHT; DragStat().SetVerFixed(TRUE); break;
+ case HDL_RIGHT: eRefHdl=HDL_LEFT ; DragStat().SetVerFixed(TRUE); break;
+ case HDL_LWLFT: eRefHdl=HDL_UPRGT; break;
+ case HDL_LOWER: eRefHdl=HDL_UPPER; DragStat().SetHorFixed(TRUE); break;
+ case HDL_LWRGT: eRefHdl=HDL_UPLFT; break;
+ }
+ if (eRefHdl!=HDL_MOVE) pRefHdl=GetHdlList().GetHdl(eRefHdl);
+ if (pRefHdl!=NULL && !rView.IsResizeAtCenter()) {
+ DragStat().Ref1()=pRefHdl->GetPos();
+ } else {
+ SdrHdl* pRef1=GetHdlList().GetHdl(HDL_UPLFT);
+ SdrHdl* pRef2=GetHdlList().GetHdl(HDL_LWRGT);
+ if (pRef1!=NULL && pRef2!=NULL) {
+ DragStat().Ref1()=Rectangle(pRef1->GetPos(),pRef2->GetPos()).Center();
+ } else {
+ DragStat().Ref1()=GetMarkedRect().Center();
+ }
+ }
+ SetDragPolys();
+ Show();
+ return TRUE;
+}
+
+void SdrDragResize::MovPoint(Point& rPnt, const Point& rPvOfs)
+{
+ Point aRef(DragStat().Ref1()-rPvOfs);
+ ResizePoint(rPnt,aRef,aXFact,aYFact);
+}
+
+void SdrDragResize::Mov(const Point& rNoSnapPnt)
+{
+ Point aPnt(GetSnapPos(rNoSnapPnt));
+ Point aStart(DragStat().GetStart());
+ Point aRef(DragStat().GetRef1());
+ Fraction aMaxFact(0x7FFFFFFF,1);
+ Rectangle aLR(rView.GetWorkArea());
+ FASTBOOL bWorkArea=!aLR.IsEmpty();
+ FASTBOOL bDragLimit=IsDragLimit();
+ if (bDragLimit || bWorkArea) {
+ Rectangle aSR(GetMarkedRect());
+ if (bDragLimit) {
+ Rectangle aR2(GetDragLimitRect());
+ if (bWorkArea) aLR.Intersection(aR2);
+ else aLR=aR2;
+ }
+ if (aPnt.X()<aLR.Left()) aPnt.X()=aLR.Left();
+ else if (aPnt.X()>aLR.Right()) aPnt.X()=aLR.Right();
+ if (aPnt.Y()<aLR.Top()) aPnt.Y()=aLR.Top();
+ else if (aPnt.Y()>aLR.Bottom()) aPnt.Y()=aLR.Bottom();
+ if (aRef.X()>aSR.Left()) {
+ Fraction aMax(aRef.X()-aLR.Left(),aRef.X()-aSR.Left());
+ if (aMax<aMaxFact) aMaxFact=aMax;
+ }
+ if (aRef.X()<aSR.Right()) {
+ Fraction aMax(aLR.Right()-aRef.X(),aSR.Right()-aRef.X());
+ if (aMax<aMaxFact) aMaxFact=aMax;
+ }
+ if (aRef.Y()>aSR.Top()) {
+ Fraction aMax(aRef.Y()-aLR.Top(),aRef.Y()-aSR.Top());
+ if (aMax<aMaxFact) aMaxFact=aMax;
+ }
+ if (aRef.Y()<aSR.Bottom()) {
+ Fraction aMax(aLR.Bottom()-aRef.Y(),aSR.Bottom()-aRef.Y());
+ if (aMax<aMaxFact) aMaxFact=aMax;
+ }
+ }
+ long nXDiv=aStart.X()-aRef.X(); if (nXDiv==0) nXDiv=1;
+ long nYDiv=aStart.Y()-aRef.Y(); if (nYDiv==0) nYDiv=1;
+ long nXMul=aPnt.X()-aRef.X();
+ long nYMul=aPnt.Y()-aRef.Y();
+ if (nXDiv<0) { nXDiv=-nXDiv; nXMul=-nXMul; }
+ if (nYDiv<0) { nYDiv=-nYDiv; nYMul=-nYMul; }
+ FASTBOOL bXNeg=nXMul<0; if (bXNeg) nXMul=-nXMul;
+ FASTBOOL bYNeg=nYMul<0; if (bYNeg) nYMul=-nYMul;
+ FASTBOOL bOrtho=rView.IsOrtho() || !rView.IsResizeAllowed(FALSE);
+ if (!DragStat().IsHorFixed() && !DragStat().IsVerFixed()) {
+ if (Abs(nXDiv)<=1 || Abs(nYDiv)<=1) bOrtho=FALSE;
+ if (bOrtho) {
+ if ((Fraction(nXMul,nXDiv)>Fraction(nYMul,nYDiv)) !=rView.IsBigOrtho()) {
+ nXMul=nYMul;
+ nXDiv=nYDiv;
+ } else {
+ nYMul=nXMul;
+ nYDiv=nXDiv;
+ }
+ }
+ } else {
+ if (bOrtho) {
+ if (DragStat().IsHorFixed()) { bXNeg=FALSE; nXMul=nYMul; nXDiv=nYDiv; }
+ if (DragStat().IsVerFixed()) { bYNeg=FALSE; nYMul=nXMul; nYDiv=nXDiv; }
+ } else {
+ if (DragStat().IsHorFixed()) { bXNeg=FALSE; nXMul=1; nXDiv=1; }
+ if (DragStat().IsVerFixed()) { bYNeg=FALSE; nYMul=1; nYDiv=1; }
+ }
+ }
+ Fraction aNeuXFact(nXMul,nXDiv);
+ Fraction aNeuYFact(nYMul,nYDiv);
+ if (bOrtho) {
+ if (aNeuXFact>aMaxFact) {
+ aNeuXFact=aMaxFact;
+ aNeuYFact=aMaxFact;
+ }
+ if (aNeuYFact>aMaxFact) {
+ aNeuXFact=aMaxFact;
+ aNeuYFact=aMaxFact;
+ }
+ }
+ if (bXNeg) aNeuXFact=Fraction(-aNeuXFact.GetNumerator(),aNeuXFact.GetDenominator());
+ if (bYNeg) aNeuYFact=Fraction(-aNeuYFact.GetNumerator(),aNeuYFact.GetDenominator());
+ if (DragStat().CheckMinMoved(aPnt)) {
+ if ((!DragStat().IsHorFixed() && aPnt.X()!=DragStat().GetNow().X()) ||
+ (!DragStat().IsVerFixed() && aPnt.Y()!=DragStat().GetNow().Y())) {
+ Hide();
+ DragStat().NextMove(aPnt);
+ aXFact=aNeuXFact;
+ aYFact=aNeuYFact;
+ MovAllPoints();
+ Show();
+ }
+ }
+}
+
+FASTBOOL SdrDragResize::End(FASTBOOL bCopy)
+{
+ Hide();
+ if (IsDraggingPoints()) {
+ rView.ResizeMarkedPoints(DragStat().Ref1(),aXFact,aYFact,bCopy);
+ } else if (IsDraggingGluePoints()) {
+ rView.ResizeMarkedGluePoints(DragStat().Ref1(),aXFact,aYFact,bCopy);
+ } else {
+ rView.ResizeMarkedObj(DragStat().Ref1(),aXFact,aYFact,bCopy);
+ }
+ return TRUE;
+}
+
+Pointer SdrDragResize::GetPointer() const
+{
+ const SdrHdl* pHdl=GetDragHdl();
+ if (pHdl!=NULL) {
+ return pHdl->GetPointer();
+ }
+ return Pointer(POINTER_MOVE);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrDragRotate,SdrDragMethod);
+
+void SdrDragRotate::TakeComment(XubString& rStr) const
+{
+ ImpTakeDescriptionStr(STR_DragMethRotate, rStr);
+ rStr.AppendAscii(" (");
+ XubString aStr;
+ INT32 nTmpWink(NormAngle360(nWink));
+
+ if(bRight && nWink)
+ {
+ nTmpWink -= 36000;
+ }
+
+ rView.GetModel()->TakeWinkStr(nTmpWink, aStr);
+ rStr += aStr;
+ rStr += sal_Unicode(')');
+
+ if(rView.IsDragWithCopy())
+ rStr += ImpGetResStr(STR_EditWithCopy);
+}
+
+FASTBOOL SdrDragRotate::Beg()
+{
+ SdrHdl* pH=GetHdlList().GetHdl(HDL_REF1);
+ if (pH!=NULL) {
+ SetDragPolys();
+ Show();
+ DragStat().Ref1()=pH->GetPos();
+ nWink0=GetAngle(DragStat().GetStart()-DragStat().GetRef1());
+ return TRUE;
+ } else {
+ DBG_ERROR("SdrDragRotate::Beg(): Kein Referenzpunkt-Handle gefunden");
+ return FALSE;
+ }
+}
+
+void SdrDragRotate::MovPoint(Point& rPnt, const Point& rPvOfs)
+{
+ RotatePoint(rPnt,DragStat().GetRef1()-rPvOfs,nSin,nCos);
+}
+
+void SdrDragRotate::Mov(const Point& rPnt_)
+{
+ Point aPnt(rPnt_);
+ const SdrHdl* pHdl=DragStat().GetHdl();
+ if (pHdl!=NULL && pHdl->GetPageView()!=NULL) {
+ aPnt-=pHdl->GetPageView()->GetOffset();
+ }
+ if (DragStat().CheckMinMoved(aPnt)) {
+ long nNeuWink=NormAngle360(GetAngle(aPnt-DragStat().GetRef1())-nWink0);
+ long nSA=0;
+ if (rView.IsAngleSnapEnabled()) nSA=rView.GetSnapAngle();
+ if (!rView.IsRotateAllowed(FALSE)) nSA=9000;
+ if (nSA!=0) { // Winkelfang
+ nNeuWink+=nSA/2;
+ nNeuWink/=nSA;
+ nNeuWink*=nSA;
+ }
+ nNeuWink=NormAngle180(nNeuWink);
+ if (nWink!=nNeuWink) {
+ USHORT nSekt0=GetAngleSector(nWink);
+ USHORT nSekt1=GetAngleSector(nNeuWink);
+ if (nSekt0==0 && nSekt1==3) bRight=TRUE;
+ if (nSekt0==3 && nSekt1==0) bRight=FALSE;
+ nWink=nNeuWink;
+ double a=nWink*nPi180;
+ double nSin1=sin(a); // schonmal berechnen, damit mgl. wenig Zeit
+ double nCos1=cos(a); // zwischen Hide() und Show() vergeht
+ Hide();
+ nSin=nSin1;
+ nCos=nCos1;
+ DragStat().NextMove(aPnt);
+ MovAllPoints();
+ Show();
+ }
+ }
+}
+
+FASTBOOL SdrDragRotate::End(FASTBOOL bCopy)
+{
+ Hide();
+ if (nWink!=0) {
+ if (IsDraggingPoints()) {
+ rView.RotateMarkedPoints(DragStat().GetRef1(),nWink,bCopy);
+ } else if (IsDraggingGluePoints()) {
+ rView.RotateMarkedGluePoints(DragStat().GetRef1(),nWink,bCopy);
+ } else {
+ rView.RotateMarkedObj(DragStat().GetRef1(),nWink,bCopy);
+ }
+ }
+ return TRUE;
+}
+
+Pointer SdrDragRotate::GetPointer() const
+{
+ return Pointer(POINTER_ROTATE);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrDragShear,SdrDragMethod);
+
+void SdrDragShear::TakeComment(XubString& rStr) const
+{
+ ImpTakeDescriptionStr(STR_DragMethShear, rStr);
+ rStr.AppendAscii(" (");
+
+ INT32 nTmpWink(nWink);
+
+ if(bUpSideDown)
+ nTmpWink += 18000;
+
+ nTmpWink = NormAngle180(nTmpWink);
+
+ XubString aStr;
+
+ rView.GetModel()->TakeWinkStr(nTmpWink, aStr);
+ rStr += aStr;
+ rStr += sal_Unicode(')');
+
+ if(rView.IsDragWithCopy())
+ rStr += ImpGetResStr(STR_EditWithCopy);
+}
+
+FASTBOOL SdrDragShear::Beg()
+{
+ SdrHdlKind eRefHdl=HDL_MOVE;
+ SdrHdl* pRefHdl=NULL;
+ switch (GetDragHdlKind()) {
+ case HDL_UPPER: eRefHdl=HDL_LOWER; break;
+ case HDL_LOWER: eRefHdl=HDL_UPPER; break;
+ case HDL_LEFT : eRefHdl=HDL_RIGHT; bVertical=TRUE; break;
+ case HDL_RIGHT: eRefHdl=HDL_LEFT ; bVertical=TRUE; break;
+ }
+ if (eRefHdl!=HDL_MOVE) pRefHdl=GetHdlList().GetHdl(eRefHdl);
+ if (pRefHdl!=NULL) {
+ DragStat().Ref1()=pRefHdl->GetPos();
+ nWink0=GetAngle(DragStat().GetStart()-DragStat().GetRef1());
+ } else {
+ DBG_ERROR("SdrDragShear::Beg(): Kein Referenzpunkt-Handle fuer Shear gefunden");
+ return FALSE;
+ }
+ SetDragPolys();
+ Show();
+ return TRUE;
+}
+
+void SdrDragShear::MovPoint(Point& rPnt, const Point& rPvOfs)
+{
+ Point aRef(DragStat().GetRef1()-rPvOfs);
+ if (bResize) {
+ if (bVertical) {
+ ResizePoint(rPnt,aRef,aFact,Fraction(1,1));
+ } else {
+ ResizePoint(rPnt,aRef,Fraction(1,1),aFact);
+ }
+ }
+ ShearPoint(rPnt,aRef,nTan,bVertical);
+}
+
+void SdrDragShear::Mov(const Point& rPnt)
+{
+ if (DragStat().CheckMinMoved(rPnt)) {
+ bResize=!rView.IsOrtho();
+ long nSA=0;
+ if (rView.IsAngleSnapEnabled()) nSA=rView.GetSnapAngle();
+ Point aP0(DragStat().GetStart());
+ Point aPnt(rPnt);
+ Fraction aNeuFact(1,1);
+ // Wenn kein Winkelfang, dann ggf. Rasterfang (ausser bei Slant)
+ if (nSA==0 && !bSlant) aPnt=GetSnapPos(aPnt);
+ if (!bSlant && !bResize) { // Shear ohne Resize
+ if (bVertical) aPnt.X()=aP0.X(); else aPnt.Y()=aP0.Y();
+ }
+ Point aRef(DragStat().GetRef1());
+ Point aDif(aPnt-aRef);
+
+ long nNeuWink=0;
+ if (bSlant) {
+ nNeuWink=NormAngle180(-(GetAngle(aDif)-nWink0));
+ if (bVertical) nNeuWink=NormAngle180(-nNeuWink);
+ } else {
+ if (bVertical) nNeuWink=NormAngle180(GetAngle(aDif));
+ else nNeuWink=NormAngle180(-(GetAngle(aDif)-9000));
+ if (nNeuWink<-9000 || nNeuWink>9000) nNeuWink=NormAngle180(nNeuWink+18000);
+ if (bResize) {
+ Point aPt2(aPnt);
+ if (nSA!=0) aPt2=GetSnapPos(aPnt); // den also in jedem Falle fangen
+ if (bVertical) {
+ aNeuFact=Fraction(aPt2.X()-aRef.X(),aP0.X()-aRef.X());
+ } else {
+ aNeuFact=Fraction(aPt2.Y()-aRef.Y(),aP0.Y()-aRef.Y());
+ }
+ }
+ }
+ FASTBOOL bNeg=nNeuWink<0;
+ if (bNeg) nNeuWink=-nNeuWink;
+ if (nSA!=0) { // Winkelfang
+ nNeuWink+=nSA/2;
+ nNeuWink/=nSA;
+ nNeuWink*=nSA;
+ }
+ nNeuWink=NormAngle360(nNeuWink);
+ bUpSideDown=nNeuWink>9000 && nNeuWink<27000;
+ if (bSlant) { // Resize fuer Slant berechnen
+ // Mit Winkelfang jedoch ohne 89deg Begrenzung
+ long nTmpWink=nNeuWink;
+ if (bUpSideDown) nNeuWink-=18000;
+ if (bNeg) nTmpWink=-nTmpWink;
+ bResize=TRUE;
+ double nCos=cos(nTmpWink*nPi180);
+ aNeuFact=nCos;
+ Kuerzen(aFact,10); // 3 Dezimalstellen sollten reichen
+ }
+ if (nNeuWink>8900) nNeuWink=8900;
+ if (bNeg) nNeuWink=-nNeuWink;
+ if (nWink!=nNeuWink || aFact!=aNeuFact) {
+ nWink=nNeuWink;
+ aFact=aNeuFact;
+ double a=nWink*nPi180;
+ double nTan1=0.0;
+ nTan1=tan(a); // schonmal berechnen, damit mgl. wenig Zeit zwischen Hide() und Show() vergeht
+ Hide();
+ nTan=nTan1;
+ DragStat().NextMove(rPnt);
+ MovAllPoints();
+ Show();
+ }
+ }
+}
+
+FASTBOOL SdrDragShear::End(FASTBOOL bCopy)
+{
+ Hide();
+ if (bResize && aFact==Fraction(1,1)) bResize=FALSE;
+ if (nWink!=0 || bResize) {
+ if (nWink!=0 && bResize) {
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditShear,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ rView.BegUndo(aStr);
+ }
+ if (bResize) {
+ if (bVertical) {
+ rView.ResizeMarkedObj(DragStat().GetRef1(),aFact,Fraction(1,1),bCopy);
+ } else {
+ rView.ResizeMarkedObj(DragStat().GetRef1(),Fraction(1,1),aFact,bCopy);
+ }
+ bCopy=FALSE;
+ }
+ if (nWink!=0) {
+ rView.ShearMarkedObj(DragStat().GetRef1(),nWink,bVertical,bCopy);
+ }
+ if (nWink!=0 && bResize) rView.EndUndo();
+ return TRUE;
+ }
+ return FALSE;
+}
+
+Pointer SdrDragShear::GetPointer() const
+{
+ if (bVertical) return Pointer(POINTER_VSHEAR);
+ else return Pointer(POINTER_HSHEAR);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrDragMirror,SdrDragMethod);
+
+FASTBOOL SdrDragMirror::ImpCheckSide(const Point& rPnt) const
+{
+ long nWink1=GetAngle(rPnt-DragStat().GetRef1());
+ nWink1-=nWink;
+ nWink1=NormAngle360(nWink1);
+ return nWink1<18000;
+}
+
+void SdrDragMirror::TakeComment(XubString& rStr) const
+{
+ if (aDif.X()==0) ImpTakeDescriptionStr(STR_DragMethMirrorHori,rStr);
+ else if (aDif.Y()==0) ImpTakeDescriptionStr(STR_DragMethMirrorVert,rStr);
+ else if (Abs(aDif.X())==Abs(aDif.Y())) ImpTakeDescriptionStr(STR_DragMethMirrorDiag,rStr);
+ else ImpTakeDescriptionStr(STR_DragMethMirrorFree,rStr);
+ if (rView.IsDragWithCopy()) rStr+=ImpGetResStr(STR_EditWithCopy);
+}
+
+FASTBOOL SdrDragMirror::Beg()
+{
+ SdrHdl* pH1=GetHdlList().GetHdl(HDL_REF1);
+ SdrHdl* pH2=GetHdlList().GetHdl(HDL_REF2);
+ if (pH1!=NULL && pH2!=NULL) {
+ DragStat().Ref1()=pH1->GetPos();
+ DragStat().Ref2()=pH2->GetPos();
+ Ref1()=pH1->GetPos();
+ Ref2()=pH2->GetPos();
+ aDif=pH2->GetPos()-pH1->GetPos();
+ FASTBOOL b90=(aDif.X()==0) || aDif.Y()==0;
+ FASTBOOL b45=b90 || (Abs(aDif.X())==Abs(aDif.Y()));
+ nWink=NormAngle360(GetAngle(aDif));
+ if (!rView.IsMirrorAllowed(FALSE,FALSE) && !b45) return FALSE; // freier Achsenwinkel nicht erlaubt
+ if (!rView.IsMirrorAllowed(TRUE,FALSE) && !b90) return FALSE; // 45deg auch nicht erlaubt
+ bSide0=ImpCheckSide(DragStat().GetStart());
+ SetDragPolys();
+ Show();
+ return TRUE;
+ } else {
+ DBG_ERROR("SdrDragMirror::Beg(): Spiegelachse nicht gefunden");
+ return FALSE;
+ }
+}
+
+void SdrDragMirror::MovPoint(Point& rPnt, const Point& rPvOfs)
+{
+ if (bMirrored) {
+ Point aRef1(DragStat().GetRef1()-rPvOfs);
+ Point aRef2(DragStat().GetRef2()-rPvOfs);
+ MirrorPoint(rPnt,aRef1,aRef2);
+ }
+}
+
+void SdrDragMirror::Mov(const Point& rPnt)
+{
+ if (DragStat().CheckMinMoved(rPnt)) {
+ FASTBOOL bNeuSide=ImpCheckSide(rPnt);
+ FASTBOOL bNeuMirr=bSide0!=bNeuSide;
+ if (bMirrored!=bNeuMirr) {
+ Hide();
+ bMirrored=bNeuMirr;
+ DragStat().NextMove(rPnt);
+ MovAllPoints();
+ Show();
+ }
+ }
+}
+
+FASTBOOL SdrDragMirror::End(FASTBOOL bCopy)
+{
+ Hide();
+ if (bMirrored) {
+ rView.MirrorMarkedObj(DragStat().GetRef1(),DragStat().GetRef2(),bCopy);
+ }
+ return TRUE;
+}
+
+Pointer SdrDragMirror::GetPointer() const
+{
+ return Pointer(POINTER_MIRROR);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrDragGradient, SdrDragMethod);
+
+SdrDragGradient::SdrDragGradient(SdrDragView& rNewView, BOOL bGrad)
+: SdrDragMethod(rNewView),
+ pIAOHandle(NULL),
+ bIsGradient(bGrad)
+{
+}
+
+void SdrDragGradient::TakeComment(XubString& rStr) const
+{
+ if(IsGradient())
+ ImpTakeDescriptionStr(STR_DragMethGradient, rStr);
+ else
+ ImpTakeDescriptionStr(STR_DragMethTransparence, rStr);
+}
+
+FASTBOOL SdrDragGradient::Beg()
+{
+ FASTBOOL bRetval(FALSE);
+
+ pIAOHandle = (SdrHdlGradient*)GetHdlList().GetHdl(IsGradient() ? HDL_GRAD : HDL_TRNS);
+ if(pIAOHandle)
+ {
+ // save old values
+ DragStat().Ref1() = pIAOHandle->GetPos();
+ DragStat().Ref2() = pIAOHandle->Get2ndPos();
+
+ // what was hit?
+ BOOL bHit(FALSE);
+ SdrHdlColor* pColHdl = pIAOHandle->GetColorHdl1();
+
+ // init handling flags
+ pIAOHandle->SetMoveSingleHandle(FALSE);
+ pIAOHandle->SetMoveFirstHandle(FALSE);
+
+ // test first color handle
+ if(pColHdl)
+ {
+ const B2dIAOGroup& rIAOGroup = pColHdl->GetIAOGroup();
+ if(rIAOGroup.GetIAOCount())
+ {
+ Point aPixelPos(rIAOGroup.GetIAObject(0)->GetManager()->GetWindow()->LogicToPixel(DragStat().GetStart()));
+ if(rIAOGroup.IsHit(aPixelPos))
+ {
+ bHit = TRUE;
+ pIAOHandle->SetMoveSingleHandle(TRUE);
+ pIAOHandle->SetMoveFirstHandle(TRUE);
+ }
+ }
+ }
+
+ // test second color handle
+ pColHdl = pIAOHandle->GetColorHdl2();
+ if(!bHit && pColHdl)
+ {
+ const B2dIAOGroup& rIAOGroup = pColHdl->GetIAOGroup();
+ if(rIAOGroup.GetIAOCount())
+ {
+ Point aPixelPos(rIAOGroup.GetIAObject(0)->GetManager()->GetWindow()->LogicToPixel(DragStat().GetStart()));
+ if(rIAOGroup.IsHit(aPixelPos))
+ {
+ bHit = TRUE;
+ pIAOHandle->SetMoveSingleHandle(TRUE);
+ }
+ }
+ }
+
+ // test gradient handle itself
+ if(!bHit)
+ {
+ const B2dIAOGroup& rIAOGroup = pIAOHandle->GetIAOGroup();
+ if(rIAOGroup.GetIAOCount())
+ {
+ Point aPixelPos(rIAOGroup.GetIAObject(0)->GetManager()->GetWindow()->LogicToPixel(DragStat().GetStart()));
+ if(rIAOGroup.IsHit(aPixelPos))
+ {
+ bHit = TRUE;
+ }
+ }
+ }
+
+ // everything up and running :o}
+ bRetval = bHit;
+ }
+ else
+ DBG_ERROR("SdrDragGradient::Beg(): IAOGradient nicht gefunden");
+
+ return bRetval;
+}
+
+void SdrDragGradient::Mov(const Point& rPnt)
+{
+ if(pIAOHandle && DragStat().CheckMinMoved(rPnt))
+ {
+ DragStat().NextMove(rPnt);
+
+ // Do the Move here!!! DragStat().GetStart()
+ Point aMoveDiff = rPnt - DragStat().GetStart();
+
+ if(pIAOHandle->IsMoveSingleHandle())
+ {
+ if(pIAOHandle->IsMoveFirstHandle())
+ {
+ pIAOHandle->SetPos(DragStat().Ref1() + aMoveDiff);
+ if(pIAOHandle->GetColorHdl1())
+ pIAOHandle->GetColorHdl1()->SetPos(DragStat().Ref1() + aMoveDiff);
+ }
+ else
+ {
+ pIAOHandle->Set2ndPos(DragStat().Ref2() + aMoveDiff);
+ if(pIAOHandle->GetColorHdl2())
+ pIAOHandle->GetColorHdl2()->SetPos(DragStat().Ref2() + aMoveDiff);
+ }
+ }
+ else
+ {
+ pIAOHandle->SetPos(DragStat().Ref1() + aMoveDiff);
+ pIAOHandle->Set2ndPos(DragStat().Ref2() + aMoveDiff);
+ if(pIAOHandle->GetColorHdl1())
+ pIAOHandle->GetColorHdl1()->SetPos(DragStat().Ref1() + aMoveDiff);
+ if(pIAOHandle->GetColorHdl2())
+ pIAOHandle->GetColorHdl2()->SetPos(DragStat().Ref2() + aMoveDiff);
+ }
+
+ // new state
+ pIAOHandle->FromIAOToItem(rView.GetMarkList().GetMark(0)->GetObj(), FALSE, FALSE);
+ }
+}
+
+FASTBOOL SdrDragGradient::End(FASTBOOL bCopy)
+{
+ // here the result is clear, do something with the values
+ Ref1() = pIAOHandle->GetPos();
+ Ref2() = pIAOHandle->Get2ndPos();
+
+ // new state
+ pIAOHandle->FromIAOToItem(rView.GetMarkList().GetMark(0)->GetObj(), TRUE, TRUE);
+
+ return TRUE;
+}
+
+void SdrDragGradient::Brk()
+{
+ // restore old values
+ pIAOHandle->SetPos(DragStat().Ref1());
+ pIAOHandle->Set2ndPos(DragStat().Ref2());
+ if(pIAOHandle->GetColorHdl1())
+ pIAOHandle->GetColorHdl1()->SetPos(DragStat().Ref1());
+ if(pIAOHandle->GetColorHdl2())
+ pIAOHandle->GetColorHdl2()->SetPos(DragStat().Ref2());
+
+ // new state
+ pIAOHandle->FromIAOToItem(rView.GetMarkList().GetMark(0)->GetObj(), TRUE, FALSE);
+}
+
+Pointer SdrDragGradient::GetPointer() const
+{
+ return Pointer(POINTER_REFHAND);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrDragCrook,SdrDragMethod);
+
+void SdrDragCrook::TakeComment(XubString& rStr) const
+{
+ ImpTakeDescriptionStr(!bContortion ? STR_DragMethCrook : STR_DragMethCrookContortion, rStr);
+
+ if(bValid)
+ {
+ rStr.AppendAscii(" (");
+
+ XubString aStr;
+ INT32 nVal(nWink);
+
+ if(bAtCenter)
+ nVal *= 2;
+
+ nVal = Abs(nVal);
+ rView.GetModel()->TakeWinkStr(nVal, aStr);
+ rStr += aStr;
+ rStr += sal_Unicode(')');
+ }
+
+ if(rView.IsDragWithCopy())
+ rStr += ImpGetResStr(STR_EditWithCopy);
+}
+
+FASTBOOL SdrDragCrook::Beg()
+{
+ bContortionAllowed=rView.IsCrookAllowed(FALSE);
+ bNoContortionAllowed=rView.IsCrookAllowed(TRUE);
+ bResizeAllowed=rView.IsResizeAllowed(FALSE);
+ bRotateAllowed=rView.IsRotateAllowed(FALSE);
+ if (bContortionAllowed || bNoContortionAllowed) {
+ bVertical=(GetDragHdlKind()==HDL_LOWER || GetDragHdlKind()==HDL_UPPER);
+ aMarkRect=GetMarkedRect();
+ aMarkCenter=aMarkRect.Center();
+ nMarkSize=bVertical ? (aMarkRect.GetHeight()-1) : (aMarkRect.GetWidth()-1);
+ aCenter=aMarkCenter;
+ aStart=DragStat().GetStart();
+ SetDragPolysSeparated();
+ Show();
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+void SdrDragCrook::MovAllPoints()
+{
+ USHORT nPvAnz=rView.GetPageViewCount();
+ for (USHORT nv=0; nv<nPvAnz; nv++) {
+ SdrPageView* pPV=rView.GetPageViewPvNum(nv);
+ pPV->DragPoly()=pPV->DragPoly0();
+ if (pPV->HasMarkedObj()) {
+ Point aPvOfs(pPV->GetOffset());
+ USHORT nPolyAnz=pPV->DragPoly().Count();
+ if (!bContortion && !rView.IsNoDragXorPolys()) {
+ USHORT n1st=0,nLast=0;
+ Point aC(aCenter);
+ aC-=aPvOfs;
+ while (n1st<nPolyAnz) {
+ nLast=n1st;
+ while (nLast<nPolyAnz && pPV->DragPoly()[nLast].GetPointCount()!=0) nLast++;
+ Rectangle aBound(pPV->DragPoly()[n1st].GetBoundRect());
+ USHORT i;
+ for (i=n1st+1; i<nLast; i++) {
+ aBound.Union(pPV->DragPoly()[n1st].GetBoundRect());
+ }
+ Point aCtr0(aBound.Center());
+ Point aCtr1(aCtr0);
+ if (bResize) {
+ Fraction aFact1(1,1);
+ if (bVertical) {
+ ResizePoint(aCtr1,aC,aFact1,aFact);
+ } else {
+ ResizePoint(aCtr1,aC,aFact,aFact1);
+ }
+ }
+ FASTBOOL bRotOk=FALSE;
+ double nSin,nCos;
+ if (aRad.X()!=0 && aRad.Y()!=0) {
+ bRotOk=bRotate;
+ switch (eMode) {
+ case SDRCROOK_ROTATE : CrookRotateXPoint (aCtr1,NULL,NULL,aC,aRad,nSin,nCos,bVertical); break;
+ case SDRCROOK_SLANT : CrookSlantXPoint (aCtr1,NULL,NULL,aC,aRad,nSin,nCos,bVertical); break;
+ case SDRCROOK_STRETCH: CrookStretchXPoint(aCtr1,NULL,NULL,aC,aRad,nSin,nCos,bVertical,aMarkRect); break;
+ } // switch
+ }
+ aCtr1-=aCtr0;
+ for (i=n1st; i<nLast; i++) {
+ if (bRotOk) {
+ RotateXPoly(pPV->DragPoly()[i],aCtr0,nSin,nCos);
+ }
+ pPV->DragPoly()[i].Move(aCtr1.X(),aCtr1.Y());
+ }
+ n1st=nLast+1;
+ }
+ } else {
+ USHORT i,j;
+ for (j=0; j<nPolyAnz; j++) {
+ XPolygon& aPol=pPV->DragPoly()[j];
+ USHORT nPtAnz=aPol.GetPointCount();
+ i=0;
+ while (i<nPtAnz) {
+ Point* pPnt=&aPol[i];
+ Point* pC1=NULL;
+ Point* pC2=NULL;
+ if (i+1<nPtAnz && aPol.IsControl(i)) { // Kontrollpunkt links
+ pC1=pPnt;
+ i++;
+ pPnt=&aPol[i];
+ }
+ i++;
+ if (i<nPtAnz && aPol.IsControl(i)) { // Kontrollpunkt rechts
+ pC2=&aPol[i];
+ i++;
+ }
+ MovPoint(*pPnt,aPvOfs,pC1,pC2);
+ }
+ }
+ }
+ }
+ }
+}
+
+void SdrDragCrook::MovPoint(Point& rPnt, const Point& rPvOfs, Point* pC1, Point* pC2)
+{
+ FASTBOOL bSlant=eMode==SDRCROOK_SLANT;
+ FASTBOOL bStretch=eMode==SDRCROOK_STRETCH;
+ FASTBOOL bVert=bVertical;
+ FASTBOOL bC1=pC1!=NULL;
+ FASTBOOL bC2=pC2!=NULL;
+ Point aC(aCenter);
+ aC-=rPvOfs;
+ if (bResize) {
+ Fraction aFact1(1,1);
+ if (bVert) {
+ ResizePoint(rPnt,aC,aFact1,aFact);
+ if (bC1) ResizePoint(*pC1,aC,aFact1,aFact);
+ if (bC2) ResizePoint(*pC2,aC,aFact1,aFact);
+ } else {
+ ResizePoint(rPnt,aC,aFact,aFact1);
+ if (bC1) ResizePoint(*pC1,aC,aFact,aFact1);
+ if (bC2) ResizePoint(*pC2,aC,aFact,aFact1);
+ }
+ }
+ if (aRad.X()!=0 && aRad.Y()!=0) {
+ double nSin,nCos;
+ switch (eMode) {
+ case SDRCROOK_ROTATE : CrookRotateXPoint (rPnt,pC1,pC2,aC,aRad,nSin,nCos,bVert); break;
+ case SDRCROOK_SLANT : CrookSlantXPoint (rPnt,pC1,pC2,aC,aRad,nSin,nCos,bVert); break;
+ case SDRCROOK_STRETCH: CrookStretchXPoint(rPnt,pC1,pC2,aC,aRad,nSin,nCos,bVert,aMarkRect); break;
+ } // switch
+ }
+}
+
+void SdrDragCrook::Mov(const Point& rPnt)
+{
+ if (DragStat().CheckMinMoved(rPnt)) {
+ Point aPnt(rPnt);
+ FASTBOOL bNeuMoveOnly=rView.IsMoveOnlyDragging();
+ bAtCenter=FALSE;
+ SdrCrookMode eNeuMode=rView.GetCrookMode();
+ FASTBOOL bNeuContortion=!bNeuMoveOnly && ((bContortionAllowed && !rView.IsCrookNoContortion()) || !bNoContortionAllowed);
+ bResize=!rView.IsOrtho() && bResizeAllowed && !bNeuMoveOnly;
+ FASTBOOL bNeuRotate=bRotateAllowed && !bNeuContortion && !bNeuMoveOnly && eNeuMode==SDRCROOK_ROTATE;
+ long nSA=0;
+ if (nSA==0) aPnt=GetSnapPos(aPnt);
+ Point aNeuCenter(aMarkCenter.X(),aStart.Y());
+ if (bVertical) { aNeuCenter.X()=aStart.X(); aNeuCenter.Y()=aMarkCenter.Y(); }
+ if (!rView.IsCrookAtCenter()) {
+ switch (GetDragHdlKind()) {
+ case HDL_UPLFT: aNeuCenter.X()=aMarkRect.Right(); bLft=TRUE; break;
+ case HDL_UPPER: aNeuCenter.Y()=aMarkRect.Bottom(); bUpr=TRUE; break;
+ case HDL_UPRGT: aNeuCenter.X()=aMarkRect.Left(); bRgt=TRUE; break;
+ case HDL_LEFT : aNeuCenter.X()=aMarkRect.Right(); bLft=TRUE; break;
+ case HDL_RIGHT: aNeuCenter.X()=aMarkRect.Left(); bRgt=TRUE; break;
+ case HDL_LWLFT: aNeuCenter.X()=aMarkRect.Right(); bLft=TRUE; break;
+ case HDL_LOWER: aNeuCenter.Y()=aMarkRect.Top(); bLwr=TRUE; break;
+ case HDL_LWRGT: aNeuCenter.X()=aMarkRect.Left(); bRgt=TRUE; break;
+ default: bAtCenter=TRUE;
+ }
+ } else bAtCenter=TRUE;
+ Fraction aNeuFact(1,1);
+ long dx1=aPnt.X()-aNeuCenter.X();
+ long dy1=aPnt.Y()-aNeuCenter.Y();
+ bValid=bVertical ? dx1!=0 : dy1!=0;
+ if (bValid) {
+ if (bVertical) bValid=Abs(dx1)*100>Abs(dy1);
+ else bValid=Abs(dy1)*100>Abs(dx1);
+ }
+ long nNeuRad=0;
+ nWink=0;
+ if (bValid) {
+ double a=0; // Steigung des Radius
+ long nPntWink=0;
+ if (bVertical) {
+ a=((double)dy1)/((double)dx1); // Steigung des Radius
+ nNeuRad=((long)(dy1*a)+dx1) /2;
+ aNeuCenter.X()+=nNeuRad;
+ nPntWink=GetAngle(aPnt-aNeuCenter);
+ } else {
+ a=((double)dx1)/((double)dy1); // Steigung des Radius
+ nNeuRad=((long)(dx1*a)+dy1) /2;
+ aNeuCenter.Y()+=nNeuRad;
+ nPntWink=GetAngle(aPnt-aNeuCenter)-9000;
+ }
+ if (!bAtCenter) {
+ if (nNeuRad<0) {
+ if (bRgt) nPntWink+=18000;
+ if (bLft) nPntWink=18000-nPntWink;
+ if (bLwr) nPntWink=-nPntWink;
+ } else {
+ if (bRgt) nPntWink=-nPntWink;
+ if (bUpr) nPntWink=18000-nPntWink;
+ if (bLwr) nPntWink+=18000;
+ }
+ nPntWink=NormAngle360(nPntWink);
+ } else {
+ if (nNeuRad<0) nPntWink+=18000;
+ if (bVertical) nPntWink=18000-nPntWink;
+ nPntWink=NormAngle180(nPntWink);
+ nPntWink=Abs(nPntWink);
+ }
+ double nUmfang=2*Abs(nNeuRad)*nPi;
+ if (bResize) {
+ if (nSA!=0) { // Winkelfang
+ long nWink0=nPntWink;
+ nPntWink+=nSA/2;
+ nPntWink/=nSA;
+ nPntWink*=nSA;
+ BigInt a(nNeuRad);
+ a*=BigInt(nWink);
+ a/=BigInt(nWink0);
+ nNeuRad=long(a);
+ if (bVertical) aNeuCenter.X()=aStart.X()+nNeuRad;
+ else aNeuCenter.Y()=aStart.Y()+nNeuRad;
+ }
+ long nMul=(long)(nUmfang*NormAngle360(nPntWink)/36000);
+ if (bAtCenter) nMul*=2;
+ aNeuFact=Fraction(nMul,nMarkSize);
+ nWink=nPntWink;
+ } else {
+ nWink=(long)((nMarkSize*360/nUmfang)*100)/2;
+ if (nWink==0) bValid=FALSE;
+ if (bValid && nSA!=0) { // Winkelfang
+ long nWink0=nWink;
+ nWink+=nSA/2;
+ nWink/=nSA;
+ nWink*=nSA;
+ BigInt a(nNeuRad);
+ a*=BigInt(nWink);
+ a/=BigInt(nWink0);
+ nNeuRad=long(a);
+ if (bVertical) aNeuCenter.X()=aStart.X()+nNeuRad;
+ else aNeuCenter.Y()=aStart.Y()+nNeuRad;
+ }
+ }
+ }
+ if (nWink==0 || nNeuRad==0) bValid=FALSE;
+ if (!bValid) nNeuRad=0;
+ if (!bValid && bResize) {
+ long nMul=bVertical ? dy1 : dx1;
+ if (bLft || bUpr) nMul=-nMul;
+ long nDiv=nMarkSize;
+ if (bAtCenter) { nMul*=2; nMul=Abs(nMul); }
+ aNeuFact=Fraction(nMul,nDiv);
+ }
+ if (aNeuCenter!=aCenter || bNeuContortion!=bContortion || aNeuFact!=aFact ||
+ bNeuMoveOnly!=bMoveOnly || bNeuRotate!=bRotate || eNeuMode!=eMode)
+ {
+ Hide();
+ bMoveOnly=bNeuMoveOnly;
+ bRotate=bNeuRotate;
+ eMode=eNeuMode;
+ bContortion=bNeuContortion;
+ aCenter=aNeuCenter;
+ aFact=aNeuFact;
+ aRad=Point(nNeuRad,nNeuRad);
+ bResize=aFact!=Fraction(1,1) && aFact.GetDenominator()!=0 && aFact.IsValid();
+ DragStat().NextMove(aPnt);
+ MovAllPoints();
+ Show();
+ }
+ }
+}
+
+FASTBOOL SdrDragCrook::End(FASTBOOL bCopy)
+{
+ Hide();
+ if (bResize && aFact==Fraction(1,1)) bResize=FALSE;
+ FASTBOOL bDoCrook=aCenter!=aMarkCenter && aRad.X()!=0 && aRad.Y()!=0;
+ if (bDoCrook || bResize) {
+ if (bResize) {
+ XubString aStr;
+ ImpTakeDescriptionStr(!bContortion?STR_EditCrook:STR_EditCrookContortion,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ rView.BegUndo(aStr);
+ }
+ if (bResize) {
+ Fraction aFact1(1,1);
+ if (bContortion) {
+ if (bVertical) rView.ResizeMarkedObj(aCenter,aFact1,aFact,bCopy);
+ else rView.ResizeMarkedObj(aCenter,aFact,aFact1,bCopy);
+ } else {
+ if (bCopy) rView.CopyMarkedObj();
+ ULONG nMarkAnz=rView.GetMarkList().GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=rView.GetMarkList().GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ Point aCtr0(pO->GetSnapRect().Center());
+ Point aCtr1(aCtr0);
+ if (bVertical) ResizePoint(aCtr1,aCenter-pM->GetPageView()->GetOffset(),aFact1,aFact);
+ else ResizePoint(aCtr1,aCenter-pM->GetPageView()->GetOffset(),aFact,aFact1);
+ Size aSiz(aCtr1.X()-aCtr0.X(),aCtr1.Y()-aCtr0.Y());
+ AddUndo(new SdrUndoMoveObj(*pO,aSiz));
+ pO->Move(aSiz);
+ }
+ }
+ bCopy=FALSE;
+ }
+ if (bDoCrook) {
+ rView.CrookMarkedObj(aCenter,aRad,eMode,bVertical,!bContortion,bCopy);
+ rView.SetLastCrookCenter(aCenter);
+ }
+ if (bResize) rView.EndUndo();
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void SdrDragCrook::DrawXor(ExtOutputDevice& rXOut, FASTBOOL bFull) const
+{
+ SdrDragMethod::DrawXor(rXOut,bFull);
+ if (FALSE) {
+ Rectangle aRect(aCenter.X()-aRad.X(),aCenter.Y()-aRad.Y(),aCenter.X()+aRad.X(),aCenter.Y()+aRad.Y());
+
+ Color aLineColorMerk( rXOut.GetOutDev()->GetLineColor() );
+ Color aBlackColor( COL_BLACK );
+ rXOut.GetOutDev()->SetLineColor( aBlackColor );
+ rXOut.GetOutDev()->DrawEllipse(aRect);
+ rXOut.GetOutDev()->SetLineColor( aLineColorMerk );
+ }
+}
+
+Pointer SdrDragCrook::GetPointer() const
+{
+ return Pointer(POINTER_CROOK);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrDragDistort,SdrDragMethod);
+
+void SdrDragDistort::TakeComment(XubString& rStr) const
+{
+ ImpTakeDescriptionStr(STR_DragMethDistort, rStr);
+
+ XubString aStr;
+
+ rStr.AppendAscii(" (x=");
+ rView.GetModel()->TakeMetricStr(DragStat().GetDX(), aStr);
+ rStr += aStr;
+ rStr.AppendAscii(" y=");
+ rView.GetModel()->TakeMetricStr(DragStat().GetDY(), aStr);
+ rStr += aStr;
+ rStr += sal_Unicode(')');
+
+ if(rView.IsDragWithCopy())
+ rStr += ImpGetResStr(STR_EditWithCopy);
+}
+
+FASTBOOL SdrDragDistort::Beg()
+{
+ bContortionAllowed=rView.IsDistortAllowed(FALSE);
+ bNoContortionAllowed=rView.IsDistortAllowed(TRUE);
+ if (bContortionAllowed || bNoContortionAllowed) {
+ SdrHdlKind eKind=GetDragHdlKind();
+ nPolyPt=0xFFFF;
+ if (eKind==HDL_UPLFT) nPolyPt=0;
+ if (eKind==HDL_UPRGT) nPolyPt=1;
+ if (eKind==HDL_LWRGT) nPolyPt=2;
+ if (eKind==HDL_LWLFT) nPolyPt=3;
+ if (nPolyPt>3) return FALSE;
+ aMarkRect=GetMarkedRect();
+ aDistortedRect=XPolygon(aMarkRect);
+ SetDragPolys();
+ Show();
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+void SdrDragDistort::MovAllPoints()
+{
+ if (bContortion) {
+ USHORT nPvAnz=rView.GetPageViewCount();
+ for (USHORT nv=0; nv<nPvAnz; nv++) {
+ SdrPageView* pPV=rView.GetPageViewPvNum(nv);
+ if (pPV->HasMarkedObj()) {
+ Point aOfs(pPV->GetOffset());
+ pPV->DragPoly()=pPV->DragPoly0();
+ if (aOfs.X()==0 && aOfs.Y()==0) {
+ pPV->DragPoly().Distort(aMarkRect,aDistortedRect);
+ } else {
+ Rectangle aR(aMarkRect);
+ XPolygon aXP(aDistortedRect);
+ aR.Move(-aOfs.X(),-aOfs.Y());
+ aXP.Move(-aOfs.X(),-aOfs.Y());
+ pPV->DragPoly().Distort(aR,aXP);
+ }
+ }
+ }
+ }
+}
+
+void SdrDragDistort::Mov(const Point& rPnt)
+{
+ if (DragStat().CheckMinMoved(rPnt)) {
+ Point aPnt(GetSnapPos(rPnt));
+ if (rView.IsOrtho()) OrthoDistance8(DragStat().GetStart(),aPnt,rView.IsBigOrtho());
+ FASTBOOL bNeuContortion=(bContortionAllowed && !rView.IsCrookNoContortion()) || !bNoContortionAllowed;
+ if (bNeuContortion!=bContortion || aDistortedRect[nPolyPt]!=aPnt) {
+ Hide();
+ aDistortedRect[nPolyPt]=aPnt;
+ bContortion=bNeuContortion;
+ DragStat().NextMove(aPnt);
+ MovAllPoints();
+ Show();
+ }
+ }
+}
+
+FASTBOOL SdrDragDistort::End(FASTBOOL bCopy)
+{
+ Hide();
+ FASTBOOL bDoDistort=DragStat().GetDX()!=0 || DragStat().GetDY()!=0;
+ if (bDoDistort) {
+ rView.DistortMarkedObj(aMarkRect,aDistortedRect,!bContortion,bCopy);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void SdrDragDistort::DrawXor(ExtOutputDevice& rXOut, FASTBOOL bFull) const
+{
+ SdrDragMethod::DrawXor(rXOut,bFull);
+}
+
+Pointer SdrDragDistort::GetPointer() const
+{
+ return Pointer(POINTER_REFHAND);
+}
+
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
new file mode 100644
index 0000000000..ee766a1274
--- /dev/null
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -0,0 +1,1151 @@
+/*************************************************************************
+ *
+ * $RCSfile: svddrgv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svddrgv.hxx"
+#include "xattr.hxx"
+#include "xpoly.hxx"
+#include "svdxout.hxx"
+#include "svdetc.hxx"
+#include "svdtrans.hxx"
+#include "svdundo.hxx"
+#include "svdocapt.hxx"
+#include "svdio.hxx"
+#include "svdpagv.hxx"
+#include "svdopath.hxx" // wg. Sonderbehandlung in SetDragPolys()
+#include "svdoedge.hxx" // wg. Sonderbehandlung in IsInsGluePossible()
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+#include "svddrgm1.hxx"
+#include "obj3d.hxx"
+
+#define XOR_DRAG_PEN PEN_DOT
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@@ @@@@ @@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@ @@ @@@@@ @@@@@@ @@ @@@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@@ @@ @@ @@ @@ @@@@@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrDragView::ImpClearVars()
+{
+ bFramDrag=FALSE;
+ eDragMode=SDRDRAG_MOVE;
+ bDragLimit=FALSE;
+ bMarkedHitMovesAlways=FALSE;
+ eDragHdl=HDL_MOVE;
+ pDragHdl=NULL;
+ bDragHdl=FALSE;
+ bDragSpecial=FALSE;
+ pDragBla=NULL;
+ bDragStripes=FALSE;
+ bNoDragHdl=TRUE;
+ bMirrRefDragObj=TRUE;
+ bSolidDragging=FALSE;
+ bSolidDrgNow=FALSE;
+ bSolidDrgChk=FALSE;
+ bDragWithCopy=FALSE;
+ pInsPointUndo=NULL;
+ bInsAfter=FALSE;
+ bInsGluePoint=FALSE;
+ bInsObjPointMode=FALSE;
+ bInsGluePointMode=FALSE;
+ nDragXorPolyLimit=100;
+ nDragXorPointLimit=500;
+ bNoDragXorPolys=FALSE;
+ bAutoVertexCon=TRUE;
+ bAutoCornerCon=FALSE;
+ bRubberEdgeDragging=TRUE;
+ nRubberEdgeDraggingLimit=100;
+ bDetailedEdgeDragging=TRUE;
+ nDetailedEdgeDraggingLimit=10;
+ bResizeAtCenter=FALSE;
+ bCrookAtCenter=FALSE;
+ bMouseHideWhileDraggingPoints=FALSE;
+}
+
+void SdrDragView::ImpMakeDragAttr()
+{
+ ImpDelDragAttr();
+}
+
+SdrDragView::SdrDragView(SdrModel* pModel1, OutputDevice* pOut):
+ SdrExchangeView(pModel1,pOut)
+{
+ ImpClearVars();
+ ImpMakeDragAttr();
+}
+
+SdrDragView::SdrDragView(SdrModel* pModel1, ExtOutputDevice* pXOut):
+ SdrExchangeView(pModel1,pXOut)
+{
+ ImpClearVars();
+ ImpMakeDragAttr();
+}
+
+SdrDragView::~SdrDragView()
+{
+ ImpDelDragAttr();
+}
+
+void SdrDragView::ImpDelDragAttr()
+{
+}
+
+BOOL SdrDragView::IsAction() const
+{
+ return SdrExchangeView::IsAction() || pDragBla!=NULL;
+}
+
+void SdrDragView::MovAction(const Point& rPnt)
+{
+ SdrExchangeView::MovAction(rPnt);
+ if (pDragBla!=NULL) {
+ MovDragObj(rPnt);
+ RefreshAllIAOManagers();
+ }
+}
+
+void SdrDragView::EndAction()
+{
+ if (pDragBla!=NULL)
+ {
+ EndDragObj(FALSE);
+ RefreshAllIAOManagers();
+ }
+ SdrExchangeView::EndAction();
+}
+
+void SdrDragView::BckAction()
+{
+ SdrExchangeView::BckAction();
+ BrkDragObj();
+ RefreshAllIAOManagers();
+}
+
+void SdrDragView::BrkAction()
+{
+ SdrExchangeView::BrkAction();
+ BrkDragObj();
+ RefreshAllIAOManagers();
+}
+
+void SdrDragView::TakeActionRect(Rectangle& rRect) const
+{
+ if (pDragBla!=NULL) {
+ rRect=aDragStat.GetActionRect();
+ if (rRect.IsEmpty()) {
+ BOOL b1st=TRUE;
+ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (pPV->HasMarkedObj()) {
+ Rectangle aR(pPV->DragPoly().GetBoundRect(GetWin(0)));
+ aR+=pPV->GetOffset();
+ if (b1st) {
+ b1st=FALSE;
+ rRect=aR;
+ } else {
+ rRect.Union(aR);
+ }
+ }
+ }
+ }
+ if (rRect.IsEmpty()) {
+ rRect=Rectangle(aDragStat.GetNow(),aDragStat.GetNow());
+ }
+ } else {
+ SdrExchangeView::TakeActionRect(rRect);
+ }
+}
+
+void SdrDragView::ToggleShownXor(OutputDevice* pOut, const Region* pRegion) const
+{
+ SdrExchangeView::ToggleShownXor(pOut,pRegion);
+ if (pDragBla!=NULL && aDragStat.IsShown() &&
+ !IS_TYPE(SdrDragMovHdl,pDragBla)) { // das ist ein Hack !!!!!!!!!!
+ DrawDragObj(pOut,TRUE);
+ }
+}
+
+void SdrDragView::SetDragPolys(BOOL bReset, BOOL bSeparate)
+{
+ USHORT nPvAnz=GetPageViewCount();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ if (!bReset && (IsDraggingPoints() || IsDraggingGluePoints())) {
+ BOOL bGlue=IsDraggingGluePoints();
+ for (USHORT nv=0; nv<nPvAnz; nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ pPV->DragPoly0().Clear();
+ if (pPV->HasMarkedObj()) {
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ if (pM->GetPageView()==pPV) {
+ const SdrUShortCont* pPts=bGlue ? pM->GetMarkedGluePoints() : pM->GetMarkedPoints();
+ if (pPts!=NULL && pPts->GetCount()!=0) {
+ const SdrObject* pObj=pM->GetObj();
+ const SdrPathObj* pPath=bGlue ? NULL : PTR_CAST(SdrPathObj,pObj);
+ const XPolyPolygon* pPathXPP=pPath!=NULL ? &pPath->GetPathPoly() : NULL;
+ const SdrGluePointList* pGPL=bGlue ? pObj->GetGluePointList() : NULL;
+ ULONG nPtAnz=pPts->GetCount();
+ XPolygon aXP((USHORT)nPtAnz);
+ for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ USHORT nObjPt=pPts->GetObject(nPtNum);
+ if (bGlue) {
+ if (pGPL!=NULL) {
+ USHORT nGlueNum=pGPL->FindGluePoint(nObjPt);
+ if (nGlueNum!=SDRGLUEPOINT_NOTFOUND) {
+ aXP[(USHORT)nPtNum]=(*pGPL)[nGlueNum].GetAbsolutePos(*pObj);
+ }
+ }
+ } else {
+ if (pPath!=NULL && pPathXPP!=NULL) {
+ USHORT nPolyNum,nPointNum;
+ if (pPath->TakePolyIdxForHdlNum(nObjPt,nPolyNum,nPointNum)) {
+ aXP[(USHORT)nPtNum]=(*pPathXPP)[nPolyNum][nPointNum];
+ }
+ }
+ }
+ }
+ pPV->DragPoly0().Insert(aXP);
+ }
+ }
+ }
+ }
+ pPV->DragPoly()=pPV->DragPoly0();
+ }
+ return;
+ }
+ Rectangle aRect;
+ XPolygon aEmptyPoly(0); // Lerres XPoly fuer Separate
+ ULONG nMaxObj=nDragXorPolyLimit;
+ ULONG nMaxPnt=nDragXorPointLimit;
+ BOOL bNoPoly = IsNoDragXorPolys() || aMark.GetMarkCount()>nMaxObj;
+ BOOL bBrk=FALSE;
+ ULONG nPolyCnt=0; // Max nDragXorPolyLimit Polys
+ ULONG nPntCnt=0; // Max 5*nDragXorPolyLimit Punkte
+ if (!bNoPoly && !bReset) {
+ for (USHORT nv=0; nv<nPvAnz && !bBrk; nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (pPV->HasMarkedObj()) {
+ pPV->DragPoly0().Clear();
+ BOOL b1st=TRUE;
+ XPolyPolygon aDazuXPP;
+ for (ULONG nm=0; nm<nMarkAnz && !bBrk; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ if (pM->GetPageView()==pPV) {
+ pM->GetObj()->TakeXorPoly(aDazuXPP,FALSE);
+ USHORT nDazuPolyAnz=aDazuXPP.Count();
+ nPolyCnt+=nDazuPolyAnz;
+ for (USHORT i=0; i<nDazuPolyAnz; i++) nPntCnt+=aDazuXPP[i].GetPointCount();
+ if (nPolyCnt>nMaxObj || nPntCnt>nMaxPnt) {
+ bBrk=TRUE;
+ bNoPoly=TRUE;
+ }
+ if (!bBrk) {
+ for (USHORT i=0; i<nDazuPolyAnz; i++) {
+ // 2-Punkt-Polygone zu einfachen Linien machen,
+ // damit nicht Xor+Xor=Nix
+ const XPolygon& rP=aDazuXPP[i];
+ if (rP.GetPointCount()==3 && rP[0]==rP[2]) {
+ aDazuXPP[i].Remove(2,1);
+ }
+ }
+ if (b1st) {
+ pPV->DragPoly0()=aDazuXPP;
+ b1st=FALSE;
+ } else {
+ if (bSeparate) {
+ // erstmal ein leeres Polygon als Trennung zwischen den Objekten
+ pPV->DragPoly0().Insert(aEmptyPoly);
+ }
+ pPV->DragPoly0().Insert(aDazuXPP);
+ }
+ }
+ }
+ }
+ pPV->DragPoly()=pPV->DragPoly0();
+ }
+ }
+ }
+
+ if (bNoPoly || bReset) {
+ for (USHORT nv=0; nv<nPvAnz; nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (!bReset) {
+ if (pPV->HasMarkedObj()) {
+ Rectangle aR(pPV->MarkSnap());
+ if (TRUE) {
+ BOOL bMorePoints=TRUE;
+ // Faktor fuer Kontrollpunkte der Bezierkurven:
+ // 8/3 * (sin(45g) - 0.5) * 2/Pi
+ double a=0.3515953911 /2; // /2, weil halbe Strecke
+ if (bMorePoints) a/=2;
+ long dx=(long)(aR.GetWidth()*a);
+ long dy=(long)(aR.GetHeight()*a);
+ XPolygon aXP(25);
+ aXP[ 0]=aR.TopLeft();
+ aXP[ 1]=aR.TopLeft(); aXP[ 1].X()+=dx; aXP.SetFlags( 1,XPOLY_CONTROL);
+ aXP[ 2]=aR.TopCenter(); aXP[ 2].X()-=dx; aXP.SetFlags( 2,XPOLY_CONTROL);
+ aXP[ 3]=aR.TopCenter();
+ aXP[ 4]=aR.TopCenter(); aXP[ 4].X()+=dx; aXP.SetFlags( 4,XPOLY_CONTROL);
+ aXP[ 5]=aR.TopRight(); aXP[ 5].X()-=dx; aXP.SetFlags( 5,XPOLY_CONTROL);
+ aXP[ 6]=aR.TopRight();
+ aXP[ 7]=aR.TopRight(); aXP[ 7].Y()+=dy; aXP.SetFlags( 7,XPOLY_CONTROL);
+ aXP[ 8]=aR.RightCenter(); aXP[ 8].Y()-=dy; aXP.SetFlags( 8,XPOLY_CONTROL);
+ aXP[ 9]=aR.RightCenter();
+ aXP[10]=aR.RightCenter(); aXP[10].Y()+=dy; aXP.SetFlags(10,XPOLY_CONTROL);
+ aXP[11]=aR.BottomRight(); aXP[11].Y()-=dy; aXP.SetFlags(11,XPOLY_CONTROL);
+ aXP[12]=aR.BottomRight();
+ aXP[13]=aR.BottomRight(); aXP[13].X()-=dx; aXP.SetFlags(13,XPOLY_CONTROL);
+ aXP[14]=aR.BottomCenter(); aXP[14].X()+=dx; aXP.SetFlags(14,XPOLY_CONTROL);
+ aXP[15]=aR.BottomCenter();
+ aXP[16]=aR.BottomCenter(); aXP[16].X()-=dx; aXP.SetFlags(16,XPOLY_CONTROL);
+ aXP[17]=aR.BottomLeft(); aXP[17].X()+=dx; aXP.SetFlags(17,XPOLY_CONTROL);
+ aXP[18]=aR.BottomLeft();
+ aXP[19]=aR.BottomLeft(); aXP[19].Y()-=dy; aXP.SetFlags(19,XPOLY_CONTROL);
+ aXP[20]=aR.LeftCenter(); aXP[20].Y()+=dy; aXP.SetFlags(20,XPOLY_CONTROL);
+ aXP[21]=aR.LeftCenter();
+ aXP[22]=aR.LeftCenter(); aXP[22].Y()-=dy; aXP.SetFlags(22,XPOLY_CONTROL);
+ aXP[23]=aR.TopLeft(); aXP[23].Y()+=dy; aXP.SetFlags(23,XPOLY_CONTROL);
+ aXP[24]=aR.TopLeft();
+ if (bMorePoints) {
+ dx=-dx; dy=-dy;
+ for (USHORT i=aXP.GetPointCount(); i>1;) {
+ i--;
+ Point aPnt(aXP[i]);
+ aPnt+=aXP[i-3];
+ aPnt.X()/=2;
+ aPnt.Y()/=2;
+ USHORT nc1=USHORT(i-1);
+ USHORT nc2=USHORT(i+1);
+ BOOL bHor=aXP[i].Y()==aXP[i-3].Y();
+ aXP.Insert(nc1,aPnt,XPOLY_CONTROL); if (bHor) aXP[nc1].X()-=dx; else aXP[nc1].Y()-=dy;
+ aXP.Insert(i ,aPnt,XPOLY_NORMAL);
+ aXP.Insert(nc2,aPnt,XPOLY_CONTROL); if (bHor) aXP[nc2].X()+=dx; else aXP[nc2].Y()+=dy;
+ if (i==15) { dx=-dx; dy=-dy; }
+ i-=2;
+ }
+ }
+ pPV->DragPoly0()=XPolyPolygon(aXP);
+ } else {
+ XPolygon aXP(aR);
+ pPV->DragPoly0()=XPolyPolygon(aXP);
+ }
+ pPV->DragPoly()=pPV->DragPoly0();
+ }
+ } else {
+ pPV->DragPoly().Clear();
+ }
+ }
+ }
+}
+
+BOOL SdrDragView::TakeDragObjAnchorPos(Point& rPos) const
+{
+ Rectangle aR;
+ TakeActionRect(aR);
+ rPos=aR.TopLeft();
+ if (aMark.GetMarkCount()==1 && IsDragObj() && // nur bei Einzelselektion
+ !IsDraggingPoints() && !IsDraggingGluePoints() && // nicht beim Punkteschieben
+ !pDragBla->ISA(SdrDragMovHdl)) // nicht beim Handlesschieben
+ {
+ SdrObject* pObj=aMark.GetMark(0)->GetObj();
+ if (pObj->ISA(SdrCaptionObj)) {
+ Point aPt(((SdrCaptionObj*)pObj)->GetTailPos());
+ BOOL bTail=eDragHdl==HDL_POLY; // Schwanz wird gedraggt (nicht so ganz feine Abfrage hier)
+ BOOL bMove=pDragBla->ISA(SdrDragMove); // Move des gesamten Obj
+ BOOL bOwn=pDragBla->ISA(SdrDragObjOwn); // Objektspeziefisch
+ if (!bTail) { // bei bTail liefert TakeActionRect schon das richtige
+ if (bOwn) { // bOwn kann sein MoveTextFrame, ResizeTextFrame aber eben nicht mehr DragTail
+ rPos=aPt;
+ } else {
+ // hier nun dragging des gesamten Objekts (Move, Resize, ...)
+ pDragBla->MovPoint(aPt,aMark.GetMark(0)->GetPageView()->GetOffset());
+ }
+ }
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrDragView::TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const
+{
+ return FALSE;
+}
+
+BOOL SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl, short nMinMov, SdrDragMethod* pForcedMeth)
+{
+ BrkAction();
+ BOOL bRet=FALSE;
+ {
+ SetDragWithCopy(FALSE);
+ ForceEdgesOfMarkedNodes();
+ aAni.Reset();
+ pDragBla=NULL;
+ bDragSpecial=FALSE;
+ bDragLimit=FALSE;
+ SdrDragMode eTmpMode=eDragMode;
+ if (eTmpMode==SDRDRAG_MOVE && pHdl!=NULL && pHdl->GetKind()!=HDL_MOVE) {
+ eTmpMode=SDRDRAG_RESIZE;
+ }
+ bDragLimit=TakeDragLimit(eTmpMode,aDragLimit);
+ bFramDrag=ImpIsFrameHandles();
+ if (!bFramDrag &&
+ (pMarkedObj==NULL || !pMarkedObj->HasSpecialDrag()) &&
+ (pHdl==NULL || pHdl->GetObj()==NULL)) {
+ bFramDrag=TRUE;
+ }
+
+ Point aPnt(rPnt);
+ if(pHdl == NULL
+ || pHdl->GetKind() == HDL_MIRX
+ || pHdl->GetKind() == HDL_TRNS
+ || pHdl->GetKind() == HDL_GRAD)
+ {
+ aDragStat.Reset(aPnt);
+ }
+ else
+ {
+ aDragStat.Reset(pHdl->GetPos());
+ }
+
+ aDragStat.SetView((SdrView*)this);
+ aDragStat.SetPageView(pMarkedPV); // <<-- hier muss die DragPV rein!!!
+ aDragStat.SetMinMove(ImpGetMinMovLogic(nMinMov,pOut));
+ aDragStat.SetHdl(pHdl);
+ aDragStat.NextPoint();
+ pDragWin=pOut;
+ pDragHdl=pHdl;
+ eDragHdl= pHdl==NULL ? HDL_MOVE : pHdl->GetKind();
+ bDragHdl=eDragHdl==HDL_REF1 || eDragHdl==HDL_REF2 || eDragHdl==HDL_MIRX;
+ BOOL bNotDraggable = (eDragHdl == HDL_ANCHOR);
+
+ if(bDragHdl)
+ {
+ pDragBla = new SdrDragMovHdl(*this);
+ }
+ else if(!bNotDraggable)
+ {
+ switch (eDragMode) {
+ case SDRDRAG_ROTATE: case SDRDRAG_SHEAR: case SDRDRAG_DISTORT: {
+ switch (eDragHdl) {
+ case HDL_LEFT: case HDL_RIGHT:
+ case HDL_UPPER: case HDL_LOWER: {
+ // Sind 3D-Objekte selektiert?
+ BOOL b3DObjSelected = FALSE;
+ for(UINT32 a=0;!b3DObjSelected && a<aMark.GetMarkCount();a++)
+ {
+ SdrObject* pObj = aMark.GetMark(a)->GetObj();
+ if(pObj && pObj->ISA(E3dObject))
+ b3DObjSelected = TRUE;
+ }
+ // Falls ja, Shear auch bei !IsShearAllowed zulassen,
+ // da es sich bei 3D-Objekten um eingeschraenkte
+ // Rotationen handelt
+ if (!b3DObjSelected && !IsShearAllowed())
+ return FALSE;
+ pDragBla=new SdrDragShear(*this,eDragMode==SDRDRAG_ROTATE);
+ } break;
+ case HDL_UPLFT: case HDL_UPRGT:
+ case HDL_LWLFT: case HDL_LWRGT: {
+ if (eDragMode==SDRDRAG_SHEAR || eDragMode==SDRDRAG_DISTORT) {
+ if (!IsDistortAllowed(TRUE) && !IsDistortAllowed(FALSE)) return FALSE;
+ pDragBla=new SdrDragDistort(*this);
+ } else {
+ if (!IsRotateAllowed(TRUE)) return FALSE;
+ pDragBla=new SdrDragRotate(*this);
+ }
+ } break;
+ default: {
+ if (IsMarkedHitMovesAlways() && eDragHdl==HDL_MOVE) { // HDL_MOVE ist auch wenn Obj direkt getroffen
+ if (!IsMoveAllowed()) return FALSE;
+ pDragBla=new SdrDragMove(*this);
+ } else {
+ if (!IsRotateAllowed(TRUE)) return FALSE;
+ pDragBla=new SdrDragRotate(*this);
+ }
+ }
+ }
+ } break;
+ case SDRDRAG_MIRROR: {
+ if (eDragHdl==HDL_MOVE && IsMarkedHitMovesAlways()) {
+ if (!IsMoveAllowed()) return FALSE;
+ pDragBla=new SdrDragMove(*this);
+ } else {
+ if (!IsMirrorAllowed(TRUE,TRUE)) return FALSE;
+ pDragBla=new SdrDragMirror(*this);
+ }
+ } break;
+
+ case SDRDRAG_TRANSPARENCE:
+ {
+ if(eDragHdl == HDL_MOVE && IsMarkedHitMovesAlways())
+ {
+ if(!IsMoveAllowed())
+ return FALSE;
+ pDragBla = new SdrDragMove(*this);
+ }
+ else
+ {
+ if(!IsTransparenceAllowed())
+ return FALSE;
+
+ pDragBla = new SdrDragGradient(*this, FALSE);
+ }
+ break;
+ }
+ case SDRDRAG_GRADIENT:
+ {
+ if(eDragHdl == HDL_MOVE && IsMarkedHitMovesAlways())
+ {
+ if(!IsMoveAllowed())
+ return FALSE;
+ pDragBla = new SdrDragMove(*this);
+ }
+ else
+ {
+ if(!IsGradientAllowed())
+ return FALSE;
+
+ pDragBla = new SdrDragGradient(*this);
+ }
+ break;
+ }
+
+ case SDRDRAG_CROOK : {
+ if (eDragHdl==HDL_MOVE && IsMarkedHitMovesAlways()) {
+ if (!IsMoveAllowed()) return FALSE;
+ pDragBla=new SdrDragMove(*this);
+ } else {
+ if (!IsCrookAllowed(TRUE) && !IsCrookAllowed(FALSE)) return FALSE;
+ pDragBla=new SdrDragCrook(*this);
+ }
+ } break;
+
+ default: { // SDRDRAG_MOVE
+ if (eDragHdl==HDL_GLUE) {
+ pDragBla=new SdrDragMove(*this);
+ } else {
+ if (bFramDrag==TRUE) {
+ if (eDragHdl==HDL_MOVE) {
+ if (!IsMoveAllowed()) return FALSE;
+ pDragBla=new SdrDragMove(*this);
+ } else {
+ if (!IsResizeAllowed(TRUE)) return FALSE;
+ pDragBla=new SdrDragResize(*this);
+ }
+ } else {
+ if (eDragHdl==HDL_MOVE && !IsMoveAllowed()) return FALSE;
+ {
+ bDragSpecial=TRUE;
+ pDragBla=new SdrDragObjOwn(*this);
+ }
+ }
+ }
+ }
+ }
+ }
+ if (pForcedMeth!=NULL) {
+ delete pDragBla;
+ pDragBla=pForcedMeth;
+ }
+ aDragStat.SetDragMethod(pDragBla);
+ if (pDragBla!=NULL) {
+ bRet=pDragBla->Beg();
+ if (!bRet) {
+ if (pHdl==NULL && IS_TYPE(SdrDragObjOwn,pDragBla)) {
+ // Aha, Obj kann nicht Move SpecialDrag, also MoveFrameDrag versuchen
+ delete pDragBla;
+ pDragBla=NULL;
+ bDragSpecial=FALSE;
+ if (!IsMoveAllowed()) return FALSE;
+ bFramDrag=TRUE;
+ pDragBla=new SdrDragMove(*this);
+ aDragStat.SetDragMethod(pDragBla);
+ bRet=pDragBla->Beg();
+ }
+ }
+ if (!bRet) {
+ delete pDragBla;
+ pDragBla=NULL;
+ aDragStat.SetDragMethod(pDragBla);
+ }
+ }
+ }
+
+ // refresh IAOs
+//--/ RefreshAllIAOManagers();
+
+ return bRet;
+}
+
+BOOL SdrDragView::IsInsObjPointPossible() const
+{
+ return pMarkedObj!=NULL && pMarkedObj->IsPolyObj();
+}
+
+BOOL SdrDragView::BegInsObjPoint(BOOL bIdxZwang, USHORT nIdx, const Point& rPnt, BOOL bNewObj, OutputDevice* pOut, short nMinMov)
+{
+ BOOL bRet=FALSE;
+ nMinMov=0;
+ if (pMarkedObj!=NULL && pMarkedObj->IsPolyObj()) {
+ BrkAction();
+ pInsPointUndo=new SdrUndoGeoObj(*pMarkedObj);
+ XubString aStr(ImpGetResStr(STR_DragInsertPoint));
+ XubString aName; pMarkedObj->TakeObjNameSingul(aName);
+
+ xub_StrLen nPos(aStr.SearchAscii("%O"));
+
+ if(nPos != STRING_NOTFOUND)
+ {
+ aStr.Erase(nPos, 2);
+ aStr.Insert(aName, nPos);
+ }
+
+ aInsPointUndoStr=aStr;
+ Point aPt(rPnt-pMarkedPV->GetOffset());
+ if (bNewObj) aPt=GetSnapPos(aPt,pMarkedPV);
+ BOOL bClosed0=pMarkedObj->IsClosedObj();
+ if (bIdxZwang) {
+ nInsPointNum=pMarkedObj->NbcInsPoint(nIdx,aPt,IsInsertAfter(),bNewObj,TRUE);
+ } else {
+ FASTBOOL bTmpInsAfter = IsInsertAfter();
+ nInsPointNum=pMarkedObj->NbcInsPoint(aPt,bNewObj,TRUE,bTmpInsAfter);
+ }
+ if (bClosed0!=pMarkedObj->IsClosedObj()) { // Obj wurde implizit geschlossen
+ pMarkedObj->SendRepaintBroadcast();
+ }
+ if (nInsPointNum!=0xFFFF) {
+ BOOL bVis=IsMarkHdlShown();
+ if (bVis) HideMarkHdl(NULL);
+ bInsPolyPoint=TRUE;
+ UnmarkAllPoints();
+ AdjustMarkHdl();
+ if (bVis) ShowMarkHdl(NULL);
+ bRet=BegDragObj(rPnt,pOut,aHdl.GetHdl(nInsPointNum),0);
+ if (bRet) {
+ if (nMinMov==0) { // ggf. nicht auf MouseMove warten
+ aDragStat.SetMinMoved();
+ MovDragObj(rPnt);
+ }
+ }
+ } else {
+ delete pInsPointUndo;
+ pInsPointUndo=NULL;
+ }
+ }
+
+ // refresh IAOs
+//--/ RefreshAllIAOManagers();
+
+ return bRet;
+}
+
+BOOL SdrDragView::EndInsObjPoint(SdrCreateCmd eCmd)
+{
+ if (IsInsObjPoint()) {
+ USHORT nNextPnt=nInsPointNum;
+ Point aPnt(aDragStat.GetNow());
+ USHORT nMinMov=aDragStat.GetMinMove();
+ BOOL bOk=EndDragObj(FALSE);
+ if (bOk==TRUE && eCmd!=SDRCREATE_FORCEEND) {
+ // Ret=True bedeutet: Action ist vorbei.
+ bOk=!(BegInsObjPoint(TRUE,nNextPnt,aPnt,eCmd==SDRCREATE_NEXTOBJECT,pDragWin,nMinMov));
+ }
+
+ // refresh IAOs
+//--/ RefreshAllIAOManagers();
+
+ return bOk;
+ } else return FALSE;
+}
+
+BOOL SdrDragView::IsInsGluePointPossible() const
+{
+ BOOL bRet=FALSE;
+ if (IsInsGluePointMode() && HasMarkedObj()) {
+ if (aMark.GetMarkCount()==1) {
+ // FALSE liefern, wenn 1 Objekt und dieses ein Verbinder ist.
+ const SdrObject* pObj=aMark.GetMark(0)->GetObj();
+ if (!HAS_BASE(SdrEdgeObj,pObj)) {
+ bRet=TRUE;
+ }
+ } else {
+ bRet=TRUE;
+ }
+ }
+ return bRet;
+}
+
+BOOL SdrDragView::BegInsGluePoint(const Point& rPnt)
+{
+ BOOL bRet=FALSE;
+ SdrObject* pObj;
+ SdrPageView* pPV;
+ ULONG nMarkNum;
+ if (PickMarkedObj(rPnt,pObj,pPV,&nMarkNum,SDRSEARCH_PASS2BOUND)) {
+ BrkAction();
+ UnmarkAllGluePoints();
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ pInsPointUndo=new SdrUndoGeoObj(*pObj);
+ XubString aStr(ImpGetResStr(STR_DragInsertGluePoint));
+ XubString aName; pObj->TakeObjNameSingul(aName);
+
+ aStr.SearchAndReplaceAscii("%O", aName);
+
+ aInsPointUndoStr=aStr;
+ SdrGluePointList* pGPL=pObj->ForceGluePointList();
+ if (pGPL!=NULL) {
+ USHORT nGlueIdx=pGPL->Insert(SdrGluePoint());
+ SdrGluePoint& rGP=(*pGPL)[nGlueIdx];
+ USHORT nGlueId=rGP.GetId();
+ rGP.SetAbsolutePos(rPnt-pPV->GetOffset(),*pObj);
+
+ SdrHdl* pHdl=NULL;
+ if (MarkGluePoint(pObj,nGlueId,pPV)) {
+ pHdl=GetGluePointHdl(pObj,nGlueId);
+ }
+ if (pHdl!=NULL && pHdl->GetKind()==HDL_GLUE && pHdl->GetObj()==pObj && pHdl->GetObjHdlNum()==nGlueId) {
+ SetInsertGluePoint(TRUE);
+ bRet=BegDragObj(rPnt,NULL,pHdl,0);
+ if (bRet) {
+ aDragStat.SetMinMoved();
+ MovDragObj(rPnt);
+ } else {
+ SetInsertGluePoint(FALSE);
+ delete pInsPointUndo;
+ pInsPointUndo=NULL;
+ }
+ } else {
+ DBG_ERROR("BegInsGluePoint(): GluePoint-Handle nicht gefunden");
+ }
+ } else {
+ // Keine Klebepunkte moeglich bei diesem Objekt (z.B. Edge)
+ SetInsertGluePoint(FALSE);
+ delete pInsPointUndo;
+ pInsPointUndo=NULL;
+ }
+ }
+
+ // refresh IAOs
+//--/ RefreshAllIAOManagers();
+
+ return bRet;
+}
+
+void SdrDragView::MovDragObj(const Point& rPnt)
+{
+ if (pDragBla!=NULL) {
+ Point aPnt(rPnt);
+ ImpLimitToWorkArea(aPnt);
+ pDragBla->Mov(aPnt);
+ if (IsDragHdlHide() && aDragStat.IsMinMoved() && !bDragHdl && IsMarkHdlShown()) {
+ BOOL bLeaveRefs=IS_TYPE(SdrDragMirror,pDragBla) || IS_TYPE(SdrDragRotate,pDragBla);
+ BOOL bFlag=IsSolidMarkHdl() && aDragStat.IsShown();
+ if (bFlag) HideDragObj(pDragWin);
+ HideMarkHdl(pDragWin,bLeaveRefs);
+ if (bFlag) ShowDragObj(pDragWin);
+ }
+
+ // refresh IAOs
+//--/ RefreshAllIAOManagers();
+
+ }
+}
+
+BOOL SdrDragView::EndDragObj(BOOL bCopy)
+{
+ BOOL bRet=FALSE;
+ if (pDragBla!=NULL && aDragStat.IsMinMoved() && aDragStat.GetNow()!=aDragStat.GetPrev()) {
+ ULONG nHdlAnzMerk=0;
+ if (bEliminatePolyPoints) { // IBM Special
+ nHdlAnzMerk=GetMarkablePointCount();
+ }
+ if (IsInsertGluePoint()) {
+ BegUndo(aInsPointUndoStr);
+ AddUndo(pInsPointUndo);
+ }
+ bRet=pDragBla->End(bCopy);
+ if (IsInsertGluePoint()) EndUndo();
+ delete pDragBla;
+ if (bEliminatePolyPoints) { // IBM Special
+ if (nHdlAnzMerk!=GetMarkablePointCount()) {
+ UnmarkAllPoints();
+ }
+ }
+ pDragBla=NULL;
+ if (bInsPolyPoint) {
+ BOOL bVis=IsMarkHdlShown();
+ if (bVis) HideMarkHdl(NULL);
+ SetMarkHandles();
+ bInsPolyPoint=FALSE;
+ if (bVis) ShowMarkHdl(NULL);
+ BegUndo(aInsPointUndoStr);
+ AddUndo(pInsPointUndo);
+ EndUndo();
+ }
+ if (!bSomeObjChgdFlag) { // Aha, Obj hat nicht gebroadcastet (z.B. Writer FlyFrames)
+ if (IsDragHdlHide() && !bDragHdl &&
+ !IS_TYPE(SdrDragMirror,pDragBla) && !IS_TYPE(SdrDragRotate,pDragBla))
+ {
+ AdjustMarkHdl();
+ ShowMarkHdl(pDragWin);
+ }
+ }
+ eDragHdl=HDL_MOVE;
+ pDragHdl=NULL;
+ SetDragPolys(TRUE);
+//--/ RefreshAllIAOManagers();
+ } else {
+ BrkDragObj();
+ }
+ bInsPolyPoint=FALSE;
+ SetInsertGluePoint(FALSE);
+
+ // refresh IAOs
+//--/ RefreshAllIAOManagers();
+
+ return bRet;
+}
+
+void SdrDragView::BrkDragObj()
+{
+ if (pDragBla!=NULL) {
+ pDragBla->Brk();
+ delete pDragBla;
+ pDragBla=NULL;
+ if (bInsPolyPoint) {
+ BOOL bVis=IsMarkHdlShown();
+ if (bVis) HideMarkHdl(NULL);
+ pInsPointUndo->Undo(); // Den eingefuegten Punkt wieder raus
+ delete pInsPointUndo;
+ pInsPointUndo=NULL;
+ SetMarkHandles();
+ bInsPolyPoint=FALSE;
+ if (bVis) ShowMarkHdl(NULL);
+ }
+ if (IsInsertGluePoint()) {
+ pInsPointUndo->Undo(); // Den eingefuegten Klebepunkt wieder raus
+ delete pInsPointUndo;
+ pInsPointUndo=NULL;
+ SetInsertGluePoint(FALSE);
+ }
+ if (IsDragHdlHide() && !bDragHdl &&
+ !IS_TYPE(SdrDragMirror,pDragBla) && !IS_TYPE(SdrDragRotate,pDragBla))
+ {
+ ShowMarkHdl(pDragWin);
+ }
+ eDragHdl=HDL_MOVE;
+ pDragHdl=NULL;
+ SetDragPolys(TRUE);
+
+ // refresh IAOs
+//--/ RefreshAllIAOManagers();
+
+ }
+}
+
+void SdrDragView::DrawDragObj(OutputDevice* pOut, BOOL bFull) const
+{
+ if (pDragBla!=NULL) {
+ USHORT i=0;
+ do {
+ OutputDevice* pO=pOut;
+ if (pO==NULL) {
+ pO=GetWin(i);
+ i++;
+ }
+ if (pO!=NULL) {
+ ImpSdrHdcMerk aHDCMerk(*pO,SDRHDC_SAVEPENANDBRUSH,bRestoreColors);
+ RasterOp eRop0=pO->GetRasterOp();
+ pO->SetRasterOp(ROP_INVERT);
+ pXOut->SetOutDev(pO);
+ Color aBlackColor( COL_BLACK );
+ Color aTranspColor( COL_TRANSPARENT );
+ pXOut->OverrideLineColor( aBlackColor );
+ pXOut->OverrideFillColor( aTranspColor );
+ pDragBla->DrawXor(*pXOut,bFull);
+ pXOut->SetOffset(Point(0,0));
+ pO->SetRasterOp(eRop0);
+ aHDCMerk.Restore(*pO);
+ }
+ } while (pOut==NULL && i<GetWinCount());
+ if (aAni.IsStripes() && IsDragStripes()) {
+ Rectangle aR;
+ TakeActionRect(aR);
+ aAni.SetP1(aR.TopLeft());
+ aAni.SetP2(aR.BottomRight());
+ aAni.Invert(pOut);
+ }
+ }
+}
+
+BOOL SdrDragView::IsMoveOnlyDragObj(BOOL bAskRTTI) const
+{
+ BOOL bRet=FALSE;
+ if (pDragBla!=NULL && !IsDraggingPoints() && !IsDraggingGluePoints()) {
+ if (bAskRTTI) {
+ bRet=IS_TYPE(SdrDragMove,pDragBla);
+ } else {
+ bRet=pDragBla->IsMoveOnly();
+ }
+ }
+ return bRet;
+}
+
+void SdrDragView::ImpDrawEdgeXor(ExtOutputDevice& rXOut, BOOL bFull) const
+{
+ ULONG nEdgeAnz=aEdgesOfMarkedNodes.GetMarkCount();
+ BOOL bNo=(!IsRubberEdgeDragging() && !IsDetailedEdgeDragging()) || nEdgeAnz==0 ||
+ IsDraggingPoints() || IsDraggingGluePoints();
+ if (!pDragBla->IsMoveOnly() &&
+ !(IS_TYPE(SdrDragMove,pDragBla) || IS_TYPE(SdrDragResize,pDragBla) ||
+ IS_TYPE(SdrDragRotate,pDragBla) || IS_TYPE(SdrDragMirror,pDragBla))) bNo=TRUE;
+ if (!bNo) {
+ BOOL bDetail=IsDetailedEdgeDragging() && pDragBla->IsMoveOnly() &&
+ nEdgeAnz<=nDetailedEdgeDraggingLimit;
+ if (!bDetail && !(IsRubberEdgeDragging() ||
+ nEdgeAnz>nRubberEdgeDraggingLimit)) bNo=TRUE;
+ if (!bNo) {
+ for (USHORT i=0; i<nEdgeAnz; i++) {
+ SdrMark* pEM=aEdgesOfMarkedNodes.GetMark(i);
+ SdrObject* pEdge=pEM->GetObj();
+ SdrPageView* pEPV=pEM->GetPageView();
+ pXOut->SetOffset(pEPV->GetOffset());
+ pEdge->NspToggleEdgeXor(aDragStat,rXOut,pEM->IsCon1(),pEM->IsCon2(),bDetail);
+ }
+ }
+ }
+}
+
+void SdrDragView::ShowDragObj(OutputDevice* pOut)
+{
+ if (pDragBla!=NULL && !aDragStat.IsShown()) {
+ DrawDragObj(pOut,FALSE);
+ aDragStat.SetShown(TRUE);
+ if (aAni.IsStripes() && IsDragStripes()) {
+ aAni.Start();
+ }
+ }
+}
+
+void SdrDragView::HideDragObj(OutputDevice* pOut)
+{
+ if (pDragBla!=NULL && aDragStat.IsShown()) {
+ if (aAni.IsStripes() && IsDragStripes()) aAni.Stop();
+ DrawDragObj(pOut,FALSE);
+ aDragStat.SetShown(FALSE);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrDragView::SetNoDragXorPolys(BOOL bOn)
+{
+ if (IsNoDragXorPolys()!=bOn) {
+ BOOL bDragging=pDragBla!=NULL;
+ BOOL bShown=bDragging && aDragStat.IsShown();
+ if (bShown) HideDragObj(pDragWin);
+ bNoDragXorPolys=bOn;
+ if (bDragging) {
+ SetDragPolys(FALSE,IS_TYPE(SdrDragCrook,pDragBla));
+ pDragBla->MovAllPoints(); // die gedraggten Polys neu berechnen
+ }
+ if (bShown) ShowDragObj(pDragWin);
+ }
+}
+
+void SdrDragView::SetDragStripes(BOOL bOn)
+{
+ if (pDragBla!=NULL && aDragStat.IsShown()) {
+ HideDragObj(pDragWin);
+ bDragStripes=bOn;
+ ShowDragObj(pDragWin);
+ } else {
+ bDragStripes=bOn;
+ }
+}
+
+void SdrDragView::SetDragHdlHide(BOOL bOn)
+{
+ bNoDragHdl=bOn;
+ if (pDragBla!=NULL && !bDragHdl && !IS_TYPE(SdrDragMirror,pDragBla) && !IS_TYPE(SdrDragRotate,pDragBla))
+ {
+ if (bOn) HideMarkHdl(pDragWin);
+ else ShowMarkHdl(pDragWin);
+ }
+}
+
+BOOL SdrDragView::IsOrthoDesired() const
+{
+ if (pDragBla!=NULL && (IS_TYPE(SdrDragObjOwn,pDragBla) || IS_TYPE(SdrDragResize,pDragBla))) {
+ return bOrthoDesiredOnMarked;
+ }
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrDragView::SetRubberEdgeDragging(BOOL bOn)
+{
+ if (bOn!=IsRubberEdgeDragging()) {
+ ULONG nAnz=aEdgesOfMarkedNodes.GetMarkCount();
+ BOOL bShowHide=nAnz!=0 && IsDragObj() &&
+ (nRubberEdgeDraggingLimit>=nAnz);
+ if (bShowHide) HideDragObj(NULL);
+ bRubberEdgeDragging=bOn;
+ if (bShowHide) ShowDragObj(NULL);
+ }
+}
+
+void SdrDragView::SetRubberEdgeDraggingLimit(USHORT nEdgeObjAnz)
+{
+ if (nEdgeObjAnz!=nRubberEdgeDraggingLimit) {
+ ULONG nAnz=aEdgesOfMarkedNodes.GetMarkCount();
+ BOOL bShowHide=IsRubberEdgeDragging() && nAnz!=0 && IsDragObj() &&
+ (nEdgeObjAnz>=nAnz)!=(nRubberEdgeDraggingLimit>=nAnz);
+ if (bShowHide) HideDragObj(NULL);
+ nRubberEdgeDraggingLimit=nEdgeObjAnz;
+ if (bShowHide) ShowDragObj(NULL);
+ }
+}
+
+void SdrDragView::SetDetailedEdgeDragging(BOOL bOn)
+{
+ if (bOn!=IsDetailedEdgeDragging()) {
+ ULONG nAnz=aEdgesOfMarkedNodes.GetMarkCount();
+ BOOL bShowHide=nAnz!=0 && IsDragObj() &&
+ (nDetailedEdgeDraggingLimit>=nAnz);
+ if (bShowHide) HideDragObj(NULL);
+ bDetailedEdgeDragging=bOn;
+ if (bShowHide) ShowDragObj(NULL);
+ }
+}
+
+void SdrDragView::SetDetailedEdgeDraggingLimit(USHORT nEdgeObjAnz)
+{
+ if (nEdgeObjAnz!=nDetailedEdgeDraggingLimit) {
+ ULONG nAnz=aEdgesOfMarkedNodes.GetMarkCount();
+ BOOL bShowHide=IsDetailedEdgeDragging() && nAnz!=0 && IsDragObj() &&
+ (nEdgeObjAnz>=nAnz)!=(nDetailedEdgeDraggingLimit>=nAnz);
+ if (bShowHide) HideDragObj(NULL);
+ nDetailedEdgeDraggingLimit=nEdgeObjAnz;
+ if (bShowHide) ShowDragObj(NULL);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrDragView::WriteRecords(SvStream& rOut) const
+{
+ SdrExchangeView::WriteRecords(rOut);
+ {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWDRAGSTRIPES);
+ rOut<<(BOOL)bDragStripes;
+ } {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWDRAGHIDEHDL);
+ rOut<<(BOOL)bNoDragHdl;
+ } {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWOBJHITMOVES);
+ rOut<<(BOOL)bMarkedHitMovesAlways;
+ } {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWMIRRDRAGOBJ);
+ rOut<<(BOOL)bMirrRefDragObj;
+ }
+}
+
+BOOL SdrDragView::ReadRecord(const SdrIOHeader& rViewHead,
+ const SdrNamedSubRecord& rSubHead,
+ SvStream& rIn)
+{
+ BOOL bRet=FALSE;
+ if (rSubHead.GetInventor()==SdrInventor) {
+ bRet=TRUE;
+ switch (rSubHead.GetIdentifier()) {
+ case SDRIORECNAME_VIEWDRAGSTRIPES: {
+ BOOL bZwi; rIn >> bZwi; bDragStripes = bZwi;
+ } break;
+ case SDRIORECNAME_VIEWDRAGHIDEHDL: {
+ BOOL bZwi; rIn >> bZwi; bNoDragHdl = bZwi;
+ } break;
+ case SDRIORECNAME_VIEWOBJHITMOVES: {
+ BOOL bZwi; rIn >> bZwi; bMarkedHitMovesAlways = bZwi;
+ } break;
+ case SDRIORECNAME_VIEWMIRRDRAGOBJ: {
+ BOOL bZwi; rIn >> bZwi; bMirrRefDragObj = bZwi;
+ } break;
+ default: bRet=FALSE;
+ }
+ }
+ if (!bRet) bRet=SdrExchangeView::ReadRecord(rViewHead,rSubHead,rIn);
+ return bRet;
+}
+
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
new file mode 100644
index 0000000000..022a6b499a
--- /dev/null
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -0,0 +1,860 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdedtv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <vcl/metaact.hxx>
+#include "svdedtv.hxx"
+#include "svdxout.hxx"
+#include "svdundo.hxx"
+#include "svdograf.hxx" // fuer Possibilities
+#include "svdopath.hxx"
+#include "svdoole2.hxx"
+#include "svdopage.hxx"
+#include "svdoedge.hxx"
+#include "svdlayer.hxx"
+#include "svdpagv.hxx"
+#include "svdpage.hxx"
+#include "svdpoev.hxx" // fuer die PolyPossiblities
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::ImpResetPossibilityFlags()
+{
+ bReadOnly =FALSE;
+
+ bGroupPossible =FALSE;
+ bUnGroupPossible =FALSE;
+ bGrpEnterPossible =FALSE;
+ bDeletePossible =FALSE;
+ bToTopPossible =FALSE;
+ bToBtmPossible =FALSE;
+ bReverseOrderPossible =FALSE;
+
+ bImportMtfPossible =FALSE;
+ bCombinePossible =FALSE;
+ bDismantlePossible =FALSE;
+ bCombineNoPolyPolyPossible =FALSE;
+ bDismantleMakeLinesPossible=FALSE;
+ bOrthoDesiredOnMarked =FALSE;
+
+ bMoreThanOneNotMovable =FALSE;
+ bOneOrMoreMovable =FALSE;
+ bMoreThanOneNoMovRot =FALSE;
+ bContortionPossible =FALSE;
+ bAllPolys =FALSE;
+ bOneOrMorePolys =FALSE;
+ bMoveAllowed =FALSE;
+ bResizeFreeAllowed =FALSE;
+ bResizePropAllowed =FALSE;
+ bRotateFreeAllowed =FALSE;
+ bRotate90Allowed =FALSE;
+ bMirrorFreeAllowed =FALSE;
+ bMirror45Allowed =FALSE;
+ bMirror90Allowed =FALSE;
+ bTransparenceAllowed = FALSE;
+ bGradientAllowed = FALSE;
+ bShearAllowed =FALSE;
+ bCanConvToPath =FALSE;
+ bCanConvToPoly =FALSE;
+ bCanConvToContour = FALSE;
+ bCanConvToPathLineToArea=FALSE;
+ bCanConvToPolyLineToArea=FALSE;
+ bMoveProtect =FALSE;
+ bResizeProtect =FALSE;
+}
+
+void SdrEditView::ImpClearVars()
+{
+ ImpResetPossibilityFlags();
+ bPossibilitiesDirty=TRUE; // << war von Purify angemeckert
+ bCombineError=FALSE;
+ bBundleVirtObj=FALSE;
+}
+
+SdrEditView::SdrEditView(SdrModel* pModel1, OutputDevice* pOut):
+ SdrMarkView(pModel1,pOut)
+{
+ ImpClearVars();
+}
+
+SdrEditView::SdrEditView(SdrModel* pModel1, ExtOutputDevice* pXOut):
+ SdrMarkView(pModel1,pXOut)
+{
+ ImpClearVars();
+}
+
+SdrEditView::~SdrEditView()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrLayer* SdrEditView::InsertNewLayer(const XubString& rName, USHORT nPos)
+{
+ SdrLayerAdmin& rLA=pMod->GetLayerAdmin();
+ USHORT nMax=rLA.GetLayerCount();
+ if (nPos>nMax) nPos=nMax;
+ SdrLayer* pNewLayer=rLA.NewLayer(rName,nPos);
+ AddUndo(new SdrUndoNewLayer(nPos,rLA,*pMod));
+ pMod->SetChanged();
+ return pNewLayer;
+}
+
+BOOL SdrEditView::ImpDelLayerCheck(SdrObjList* pOL, SdrLayerID nDelID) const
+{
+ BOOL bDelAll=TRUE;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG nObjNum=nObjAnz; nObjNum>0 && bDelAll;) {
+ nObjNum--;
+ SdrObject* pObj=pOL->GetObj(nObjNum);
+ SdrObjList* pSubOL=pObj->GetSubList();
+ if (pSubOL!=NULL) { // Gruppenobjekt
+ if (!ImpDelLayerCheck(pSubOL,nDelID)) bDelAll=FALSE; // Rekursion
+ } else {
+ if (pObj->GetLayer()!=nDelID) bDelAll=FALSE;
+ }
+ }
+ return bDelAll;
+}
+
+void SdrEditView::ImpDelLayerDelObjs(SdrObjList* pOL, SdrLayerID nDelID)
+{
+ ULONG nObjAnz=pOL->GetObjCount();
+ pOL->GetObj(0)->GetOrdNum(); // Sicherstellen, dass die OrdNums stimmen
+ for (ULONG nObjNum=nObjAnz; nObjNum>0;) {
+ nObjNum--;
+ SdrObject* pObj=pOL->GetObj(nObjNum);
+ SdrObjList* pSubOL=pObj->GetSubList();
+ if (pSubOL!=NULL) { // Gruppenobjekt
+ if (ImpDelLayerCheck(pSubOL,nDelID)) {
+ AddUndo(new SdrUndoDelObj(*pObj,TRUE));
+ pOL->RemoveObject(nObjNum);
+ } else {
+ ImpDelLayerDelObjs(pSubOL,nDelID);
+ }
+ } else {
+ if (pObj->GetLayer()==nDelID) {
+ AddUndo(new SdrUndoDelObj(*pObj,TRUE));
+ pOL->RemoveObject(nObjNum);
+ }
+ }
+ }
+}
+
+void SdrEditView::DeleteLayer(const XubString& rName)
+{
+ SdrLayerAdmin& rLA=pMod->GetLayerAdmin();
+ SdrLayer* pLayer=rLA.GetLayer(rName,TRUE);
+ USHORT nLayerNum=rLA.GetLayerPos(pLayer);
+ if (nLayerNum!=SDRLAYER_NOTFOUND) {
+ SdrLayerID nDelID=pLayer->GetID();
+ BegUndo(ImpGetResStr(STR_UndoDelLayer));
+ BOOL bMaPg=TRUE;
+ for (USHORT nPageKind=0; nPageKind<2; nPageKind++) { // MasterPages und Zeichenseiten
+ USHORT nPgAnz=bMaPg ? pMod->GetMasterPageCount() : pMod->GetPageCount();
+ for (USHORT nPgNum=0; nPgNum<nPgAnz; nPgNum++) { // ueber alle Seiten
+ SdrPage* pPage=bMaPg ? pMod->GetMasterPage(nPgNum) : pMod->GetPage(nPgNum);
+ ULONG nObjAnz=pPage->GetObjCount();
+ if (nObjAnz!=0) pPage->GetObj(0)->GetOrdNum(); // Sicherstellen, dass die OrdNums stimmen
+ for (ULONG nObjNum=nObjAnz; nObjNum>0;) {
+ nObjNum--;
+ SdrObject* pObj=pPage->GetObj(nObjNum);
+ SdrObjList* pSubOL=pObj->GetSubList();
+ if (pSubOL!=NULL) { // Gruppenobjekt
+ if (ImpDelLayerCheck(pSubOL,nDelID)) {
+ AddUndo(new SdrUndoDelObj(*pObj,TRUE));
+ pPage->RemoveObject(nObjNum);
+ } else {
+ ImpDelLayerDelObjs(pSubOL,nDelID);
+ }
+ } else {
+ if (pObj->GetLayer()==nDelID) {
+ AddUndo(new SdrUndoDelObj(*pObj,TRUE));
+ pPage->RemoveObject(nObjNum);
+ }
+ }
+ }
+ }
+ bMaPg=FALSE;
+ }
+ AddUndo(new SdrUndoDelLayer(nLayerNum,rLA,*pMod));
+ rLA.RemoveLayer(nLayerNum);
+ EndUndo();
+ pMod->SetChanged();
+ }
+}
+
+void SdrEditView::MoveLayer(const XubString& rName, USHORT nNewPos)
+{
+ SdrLayerAdmin& rLA=pMod->GetLayerAdmin();
+ SdrLayer* pLayer=rLA.GetLayer(rName,TRUE);
+ USHORT nLayerNum=rLA.GetLayerPos(pLayer);
+ if (nLayerNum!=SDRLAYER_NOTFOUND) {
+ AddUndo(new SdrUndoMoveLayer(nLayerNum,rLA,*pMod,nNewPos));
+ rLA.MoveLayer(nLayerNum,nNewPos);
+ pMod->SetChanged();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::EndUndo()
+{
+ pMod->EndUndo();
+ if (pMod->GetUndoBracketLevel()==0) {
+ ImpBroadcastEdgesOfMarkedNodes();
+ }
+}
+
+void SdrEditView::ImpBroadcastEdgesOfMarkedNodes()
+{
+ ForceEdgesOfMarkedNodes();
+ ULONG nMarkedEdgeAnz=aMarkedEdges.GetMarkCount();
+ USHORT i;
+ for (i=0; i<nMarkedEdgeAnz; i++) {
+ SdrMark* pEM=aMarkedEdges.GetMark(i);
+ SdrObject* pEdgeTmp=pEM->GetObj();
+ SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pEdgeTmp);
+ if (pEdge!=NULL && TRUE) {
+ SdrObject* pObj1=pEdge->GetConnectedNode(FALSE);
+ SdrObject* pObj2=pEdge->GetConnectedNode(TRUE);
+ if (pObj1!=NULL && !IsObjMarked(pObj1) && !pEdge->CheckNodeConnection(FALSE)) pEdge->DisconnectFromNode(FALSE);
+ if (pObj2!=NULL && !IsObjMarked(pObj2) && !pEdge->CheckNodeConnection(TRUE)) pEdge->DisconnectFromNode(TRUE);
+ }
+ }
+ nMarkedEdgeAnz=aMarkedEdgesOfMarkedNodes.GetMarkCount();
+ for (i=0; i<nMarkedEdgeAnz; i++) {
+ SdrMark* pEM=aMarkedEdgesOfMarkedNodes.GetMark(i);
+ SdrObject* pEdgeTmp=pEM->GetObj();
+ SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pEdgeTmp);
+ if (pEdge!=NULL) {
+ pEdge->SetEdgeTrackDirty();
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// #### ### #### #### # #### # # # ##### # ##### ####
+// # # # # # # # # # # # # # # # #
+// #### # # ### ### # #### # # # # # #### ###
+// # # # # # # # # # # # # # # #
+// # ### #### #### # #### # #### # # # ##### ####
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::MarkListHasChanged()
+{
+ SdrMarkView::MarkListHasChanged();
+ bPossibilitiesDirty=TRUE;
+}
+
+void SdrEditView::ModelHasChanged()
+{
+ SdrMarkView::ModelHasChanged();
+ bPossibilitiesDirty=TRUE;
+}
+
+BOOL SdrEditView::IsResizeAllowed(BOOL bProp) const
+{
+ ForcePossibilities();
+ if (bResizeProtect) return FALSE;
+ if (bProp) return bResizePropAllowed;
+ return bResizeFreeAllowed;
+}
+
+BOOL SdrEditView::IsRotateAllowed(BOOL b90Deg) const
+{
+ ForcePossibilities();
+ if (bMoveProtect) return FALSE;
+ if (b90Deg) return bRotate90Allowed;
+ return bRotateFreeAllowed;
+}
+
+BOOL SdrEditView::IsMirrorAllowed(BOOL b45Deg, BOOL b90Deg) const
+{
+ ForcePossibilities();
+ if (bMoveProtect) return FALSE;
+ if (b90Deg) return bMirror90Allowed;
+ if (b45Deg) return bMirror45Allowed;
+ return bMirrorFreeAllowed && !bMoveProtect;
+}
+
+BOOL SdrEditView::IsTransparenceAllowed() const
+{
+ ForcePossibilities();
+ return bTransparenceAllowed;
+}
+
+BOOL SdrEditView::IsGradientAllowed() const
+{
+ ForcePossibilities();
+ return bGradientAllowed;
+}
+
+BOOL SdrEditView::IsShearAllowed() const
+{
+ ForcePossibilities();
+ if (bResizeProtect) return FALSE;
+ return bShearAllowed;
+}
+
+BOOL SdrEditView::IsCrookAllowed(BOOL bNoContortion) const
+{
+ // CrookMode fehlt hier (weil kein Rotate bei Shear ...)
+ ForcePossibilities();
+ if (bNoContortion) {
+ if (!bRotateFreeAllowed) return FALSE; // Crook is nich
+ return !bMoveProtect && bMoveAllowed;
+ } else {
+ return !bResizeProtect && bContortionPossible;
+ }
+}
+
+BOOL SdrEditView::IsDistortAllowed(BOOL bNoContortion) const
+{
+ ForcePossibilities();
+ if (bNoContortion) {
+ return FALSE;
+ } else {
+ return !bResizeProtect && bContortionPossible;
+ }
+}
+
+BOOL SdrEditView::IsCombinePossible(BOOL bNoPolyPoly) const
+{
+ ForcePossibilities();
+ if (bNoPolyPoly) return bCombineNoPolyPolyPossible;
+ else return bCombinePossible;
+}
+
+BOOL SdrEditView::IsDismantlePossible(BOOL bMakeLines) const
+{
+ ForcePossibilities();
+ if (bMakeLines) return bDismantleMakeLinesPossible;
+ else return bDismantlePossible;
+}
+
+void SdrEditView::CheckPossibilities()
+{
+ if (bSomeObjChgdFlag) bPossibilitiesDirty=TRUE;
+
+ if(bSomeObjChgdFlag)
+ {
+ // This call IS necessary to correct the MarkList, in which
+ // no longer to the model belonging objects still can reside.
+ // These ones nned to be removed.
+ CheckMarked();
+ }
+
+ if (bPossibilitiesDirty) {
+ ImpResetPossibilityFlags();
+ aMark.ForceSort();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ if (nMarkAnz!=0) {
+ bReverseOrderPossible=nMarkAnz>=2;
+
+ ULONG nMovableCount=0;
+ bGroupPossible=nMarkAnz>=2;
+ bCombinePossible=nMarkAnz>=2;
+ if (nMarkAnz==1) {
+ // bCombinePossible gruendlicher checken
+ // fehlt noch ...
+ const SdrObject* pObj=aMark.GetMark(0)->GetObj();
+ const SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
+ BOOL bGroup=pObj->GetSubList()!=NULL;
+ BOOL bHasText=pObj->GetOutlinerParaObject()!=NULL;
+ if (bGroup || bHasText) {
+ bCombinePossible=TRUE;
+ } else {
+ // folgendes Statemant macht IMHO keinen Sinn (Bugfix am 27-11-1995 Combine und Fontwork):
+ //bCombinePossible=pPath->GetPathPoly().Count()>1;
+ }
+ }
+ bCombineNoPolyPolyPossible=bCombinePossible;
+ bDeletePossible=TRUE;
+ // Zu den Transformationen erstmal ja sagen
+ bMoveAllowed =TRUE;
+ bResizeFreeAllowed=TRUE;
+ bResizePropAllowed=TRUE;
+ bRotateFreeAllowed=TRUE;
+ bRotate90Allowed =TRUE;
+ bMirrorFreeAllowed=TRUE;
+ bMirror45Allowed =TRUE;
+ bMirror90Allowed =TRUE;
+ bShearAllowed =TRUE;
+ bContortionPossible=TRUE;
+ bCanConvToContour = TRUE;
+
+ // these ones are only allowed when single object is selected
+ bTransparenceAllowed = (nMarkAnz == 1);
+ bGradientAllowed = (nMarkAnz == 1);
+ if(bGradientAllowed)
+ {
+ // gradient depends on fillstyle
+ const SdrMark* pM = aMark.GetMark(0);
+ const SdrObject* pObj = pM->GetObj();
+ SfxItemSet aSet(GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLSTYLE, 0, 0);
+
+ pObj->TakeAttributes(aSet, FALSE, TRUE);
+
+ XFillStyle eFillStyle = ((XFillStyleItem&)(aSet.Get(XATTR_FILLSTYLE))).GetValue();
+
+ if(eFillStyle != XFILL_GRADIENT)
+ {
+ bGradientAllowed = FALSE;
+ }
+ }
+
+ BOOL bNoMovRotFound=FALSE;
+ const SdrPageView* pPV0=NULL;
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ const SdrMark* pM=aMark.GetMark(nm);
+ const SdrObject* pObj=pM->GetObj();
+ const SdrPageView* pPV=pM->GetPageView();
+ if (pPV!=pPV0) {
+ if (pPV->IsReadOnly()) bReadOnly=TRUE;
+ pPV0=pPV;
+ }
+ SdrObjTransformInfoRec aInfo;
+ pObj->TakeObjInfo(aInfo);
+ BOOL bMovPrt=pObj->IsMoveProtect();
+ BOOL bSizPrt=pObj->IsResizeProtect();
+ if (!bMovPrt && aInfo.bMoveAllowed) nMovableCount++; // Menge der MovableObjs zaehlen
+ if (bMovPrt) bMoveProtect=TRUE;
+ if (bSizPrt) bResizeProtect=TRUE;
+
+ // not allowed when not allowed at one object
+ if(!aInfo.bTransparenceAllowed)
+ bTransparenceAllowed = FALSE;
+
+ // Wenn einer was nicht kann, duerfen's alle nicht
+ if (!aInfo.bMoveAllowed ) bMoveAllowed =FALSE;
+ if (!aInfo.bResizeFreeAllowed) bResizeFreeAllowed=FALSE;
+ if (!aInfo.bResizePropAllowed) bResizePropAllowed=FALSE;
+ if (!aInfo.bRotateFreeAllowed) bRotateFreeAllowed=FALSE;
+ if (!aInfo.bRotate90Allowed ) bRotate90Allowed =FALSE;
+ if (!aInfo.bMirrorFreeAllowed) bMirrorFreeAllowed=FALSE;
+ if (!aInfo.bMirror45Allowed ) bMirror45Allowed =FALSE;
+ if (!aInfo.bMirror90Allowed ) bMirror90Allowed =FALSE;
+ if (!aInfo.bShearAllowed ) bShearAllowed =FALSE;
+ if (aInfo.bNoContortion ) bContortionPossible=FALSE;
+ // Fuer Crook mit Contortion: Alle Objekte muessen
+ // Movable und Rotatable sein, ausser maximal 1
+ if (!bMoreThanOneNoMovRot) {
+ if (!aInfo.bMoveAllowed || !aInfo.bResizeFreeAllowed) {
+ bMoreThanOneNoMovRot=bNoMovRotFound;
+ bNoMovRotFound=TRUE;
+ }
+ }
+
+ // when one member cannot be converted, no conversion is possible
+ if(!aInfo.bCanConvToContour)
+ bCanConvToContour = FALSE;
+
+ // Ungroup
+ if (!bUnGroupPossible) bUnGroupPossible=pObj->GetSubList()!=NULL;
+ // ConvertToCurve: Wenn mind. einer konvertiert werden kann ist das ok.
+ if (aInfo.bCanConvToPath ) bCanConvToPath =TRUE;
+ if (aInfo.bCanConvToPoly ) bCanConvToPoly =TRUE;
+ if (aInfo.bCanConvToPathLineToArea) bCanConvToPathLineToArea=TRUE;
+ if (aInfo.bCanConvToPolyLineToArea) bCanConvToPolyLineToArea=TRUE;
+ // Combine/Dismantle
+ if (bCombinePossible) {
+ bCombinePossible=ImpCanConvertForCombine(pObj);
+ bCombineNoPolyPolyPossible=bCombinePossible;
+ }
+ if (!bDismantlePossible) bDismantlePossible=ImpCanDismantle(pObj,FALSE);
+ if (!bDismantleMakeLinesPossible) bDismantleMakeLinesPossible=ImpCanDismantle(pObj,TRUE);
+ // OrthoDesiredOnMarked checken
+ if (!bOrthoDesiredOnMarked && !aInfo.bNoOrthoDesired) bOrthoDesiredOnMarked=TRUE;
+ // ImportMtf checken
+
+ if (!bImportMtfPossible) {
+ BOOL bGraf=HAS_BASE(SdrGrafObj,pObj);
+ BOOL bOle2=HAS_BASE(SdrOle2Obj,pObj);
+
+ if( bGraf && ((SdrGrafObj*)pObj)->HasGDIMetaFile() && !((SdrGrafObj*)pObj)->IsEPS() )
+ bImportMtfPossible = TRUE;
+
+ if (bOle2)
+ bImportMtfPossible=((SdrOle2Obj*)pObj)->HasGDIMetaFile();
+ }
+ }
+ bMoreThanOneNotMovable=nMovableCount<nMarkAnz-1;
+ bOneOrMoreMovable=nMovableCount!=0;
+ bGrpEnterPossible=bUnGroupPossible;
+ }
+ ImpCheckToTopBtmPossible();
+ ((SdrPolyEditView*)this)->ImpCheckPolyPossibilities();
+ bPossibilitiesDirty=FALSE;
+
+ if (bReadOnly) {
+ BOOL bMerker1=bGrpEnterPossible;
+ ImpResetPossibilityFlags();
+ bReadOnly=TRUE;
+ bGrpEnterPossible=bMerker1;
+ }
+ if (bMoveAllowed) {
+ // Verschieben von angeklebten Verbindern unterbinden
+ // Derzeit nur fuer Einfachselektion implementiert.
+ if (nMarkAnz==1) {
+ SdrObject* pObj=aMark.GetMark(0)->GetObj();
+ SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pObj);
+ if (pEdge!=NULL) {
+ SdrObject* pNode1=pEdge->GetConnectedNode(TRUE);
+ SdrObject* pNode2=pEdge->GetConnectedNode(FALSE);
+ if (pNode1!=NULL || pNode2!=NULL) bMoveAllowed=FALSE;
+ }
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::ForceMarkedObjToAnotherPage()
+{
+ BOOL bFlg=FALSE;
+ for (ULONG nm=0; nm<aMark.GetMarkCount(); nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ Rectangle aObjRect(pObj->GetBoundRect());
+ aObjRect+=pM->GetPageView()->GetOffset(); // auf View-Koordinaten
+ Rectangle aPgRect(pM->GetPageView()->GetPageRect());
+ if (!aObjRect.IsOver(aPgRect)) {
+ BOOL bFnd=FALSE;
+ SdrPageView* pPV;
+ for (USHORT nv=GetPageViewCount(); nv>0 && !bFnd;) {
+ nv--;
+ pPV=GetPageViewPvNum(nv);
+ bFnd=aObjRect.IsOver(pPV->GetPageRect());
+ }
+ if (bFnd) {
+ pM->GetPageView()->GetObjList()->RemoveObject(pObj->GetOrdNum());
+ Point aDelta(pM->GetPageView()->GetOffset()-pPV->GetOffset());
+ pObj->Move(Size(aDelta.X(),aDelta.Y()));
+ SdrInsertReason aReason(SDRREASON_VIEWCALL);
+ pPV->GetObjList()->InsertObject(pObj,CONTAINER_APPEND,&aReason);
+ pM->SetPageView(pPV);
+ InvalidateAllWin(aObjRect);
+ bFlg=TRUE;
+ }
+ }
+ }
+ if (bFlg) {
+ MarkListHasChanged();
+ }
+}
+
+void SdrEditView::DeleteMarked(SdrMarkList& rMark)
+{
+ if (rMark.GetMarkCount()!=0) {
+ rMark.ForceSort();
+ BegUndo();
+ ULONG nMarkAnz=rMark.GetMarkCount();
+ ULONG nm;
+ for (nm=nMarkAnz; nm>0;) {
+ nm--;
+ SdrMark* pM=rMark.GetMark(nm);
+ AddUndo(new SdrUndoDelObj(*pM->GetObj()));
+ }
+ // Sicherstellen, dass die OrderNums stimmen:
+ rMark.GetMark(0)->GetObj()->GetOrdNum();
+ for (nm=nMarkAnz; nm>0;) {
+ nm--;
+ SdrMark* pM=rMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrPageView* pPV =pM->GetPageView();
+ SdrObjList* pOL =pObj->GetObjList(); //#52680#
+ UINT32 nOrdNum=pObj->GetOrdNumDirect();
+ SdrObject* pChkObj=pOL->RemoveObject(nOrdNum);
+ DBG_ASSERT(pChkObj==pObj,"DeleteMarked(MarkList): pChkObj!=pObj beim RemoveObject()");
+ }
+ EndUndo();
+ }
+}
+
+void SdrEditView::DeleteMarkedObj()
+{
+ if (aMark.GetMarkCount()!=0) {
+ nSpecialCnt=0;
+ BrkAction();
+ HideMarkHdl(NULL);
+ BegUndo(ImpGetResStr(STR_EditDelete),aMark.GetMarkDescription(),SDRREPFUNC_OBJ_DELETE);
+ DeleteMarked(aMark);
+ aMark.Clear();
+ aHdl.Clear();
+ EndUndo();
+ MarkListHasChanged();
+ }
+}
+
+void SdrEditView::CopyMarkedObj()
+{
+ aMark.ForceSort();
+ ForceEdgesOfMarkedNodes();
+
+ SdrMarkList aSourceObjectsForCopy(aMark);
+ // Folgende Schleife Anstatt MarkList::Merge(), damit
+ // ich jeweils mein Flag an die MarkEntries setzen kann.
+ ULONG nEdgeAnz=aEdgesOfMarkedNodes.GetMarkCount();
+ for (ULONG nEdgeNum=0; nEdgeNum<nEdgeAnz; nEdgeNum++) {
+ SdrMark aM(*aEdgesOfMarkedNodes.GetMark(nEdgeNum));
+ aM.SetUser(1);
+ aSourceObjectsForCopy.InsertEntry(aM);
+ }
+ aSourceObjectsForCopy.ForceSort();
+
+ SdrMarkList aCopiedObjects;
+ aMark.Clear();
+ ULONG nCloneErrCnt=0;
+ ULONG nMarkAnz=aSourceObjectsForCopy.GetMarkCount();
+ ULONG nm;
+ for (nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aSourceObjectsForCopy.GetMark(nm);
+ SdrObject* pO=pM->GetObj()->Clone();
+ if (pO!=NULL) {
+ SdrInsertReason aReason(SDRREASON_VIEWCALL);
+ pM->GetPageView()->GetObjList()->InsertObject(pO,CONTAINER_APPEND,&aReason);
+ AddUndo(new SdrUndoCopyObj(*pO));
+ SdrMark aME(*pM);
+ aME.SetObj(pO);
+ aCopiedObjects.InsertEntry(aME);
+ if (pM->GetUser()==0) { // Sonst war's nur eine mitzukierende Edge
+ aMark.InsertEntry(aME);
+ }
+ } else {
+ nCloneErrCnt++;
+ }
+ }
+ // und nun zu den Konnektoren
+ // Die Objekte der MarkList aCopiedObjects werden auf die MarkList
+ // aSourceObjectsForCopy abgebildet und so die Objektverbindungen
+ // hergestellt.
+ // Aehnliche Implementation an folgenden Stellen:
+ // void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
+ // SdrModel* SdrExchangeView::GetMarkedObjModel() const
+ // BOOL SdrExchangeView::Paste(const SdrModel& rMod,...)
+ // void SdrEditView::CopyMarkedObj()
+ if (nCloneErrCnt==0) {
+ for (nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aSourceObjectsForCopy.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ SdrEdgeObj* pSrcEdge=PTR_CAST(SdrEdgeObj,pO);
+ if (pSrcEdge!=NULL) {
+ SdrObject* pSrcNode1=pSrcEdge->GetConnectedNode(TRUE);
+ SdrObject* pSrcNode2=pSrcEdge->GetConnectedNode(FALSE);
+ if (pSrcNode1!=NULL && pSrcNode1->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode1=NULL; // Listenuebergreifend
+ if (pSrcNode2!=NULL && pSrcNode2->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode2=NULL; // ist (noch) nicht
+ if (pSrcNode1!=NULL || pSrcNode2!=NULL) {
+ SdrMark* pEdgeMark=aCopiedObjects.GetMark(nm);
+ BOOL bMitkopiert=pEdgeMark->GetUser()!=0;
+ SdrObject* pDstEdgeTmp=pEdgeMark->GetObj();
+ SdrEdgeObj* pDstEdge=PTR_CAST(SdrEdgeObj,pDstEdgeTmp);
+ if (pDstEdge!=NULL) {
+ if (pSrcNode1!=NULL) {
+ ULONG nDstNode1=aSourceObjectsForCopy.FindObject(pSrcNode1);
+ SdrObject* pDstNode1=NULL;
+ if (nDstNode1!=CONTAINER_ENTRY_NOTFOUND) {
+ pDstNode1=aCopiedObjects.GetMark(nDstNode1)->GetObj();
+ } else if (bMitkopiert) {
+ pDstNode1=pSrcNode1; // an den SourceNode Connekten wenn Edge mitkopiert
+ }
+ if (pDstNode1!=NULL) { // Node war sonst wohl nicht markiert
+ pDstEdge->ConnectToNode(TRUE,pDstNode1);
+ }
+ }
+ if (pSrcNode2!=NULL) {
+ ULONG nDstNode2=aSourceObjectsForCopy.FindObject(pSrcNode2);
+ SdrObject* pDstNode2=NULL;
+ if (nDstNode2!=CONTAINER_ENTRY_NOTFOUND) {
+ pDstNode2=aCopiedObjects.GetMark(nDstNode2)->GetObj();
+ } else if (bMitkopiert) {
+ pDstNode2=pSrcNode2; // an den SourceNode Connekten wenn Edge mitkopiert
+ }
+ if (pDstNode2!=NULL) { // Node war sonst wohl nicht markiert
+ pDstEdge->ConnectToNode(FALSE,pDstNode2);
+ }
+ }
+ } else {
+ DBG_ERROR("SdrEditView::CopyMarkedObj(): pDstEdge==NULL!");
+ }
+ }
+ }
+ }
+ } else {
+#ifdef DBG_UTIL
+ ByteString aStr("SdrEditView::CopyMarkedObj(): Fehler beim Clonen ");
+
+ if(nCloneErrCnt == 1)
+ {
+ aStr += "eines Zeichenobjekts.";
+ }
+ else
+ {
+ aStr += "von ";
+ aStr += nCloneErrCnt;
+ aStr += " Zeichenobjekten.";
+ }
+
+ aStr += " Objektverbindungen werden nicht mitkopiert.";
+ DBG_ERROR(aStr.GetBuffer());
+#endif
+ }
+ MarkListHasChanged();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrEditView::InsertObject(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions)
+{
+ if ((nOptions & SDRINSERT_SETDEFLAYER)!=0) {
+ SdrLayerID nLayer=rPV.GetPage()->GetLayerAdmin().GetLayerID(aAktLayer,TRUE);
+ if (nLayer==SDRLAYER_NOTFOUND) nLayer=0;
+ if (rPV.GetLockedLayers().IsSet(nLayer) || !rPV.GetVisibleLayers().IsSet(nLayer)) {
+ delete pObj; // Layer gesperrt oder nicht sichtbar
+ return FALSE;
+ }
+ pObj->NbcSetLayer(nLayer);
+ }
+ if ((nOptions & SDRINSERT_SETDEFATTR)!=0) {
+ if (pDefaultStyleSheet!=NULL) pObj->NbcSetStyleSheet(pDefaultStyleSheet,FALSE);
+ pObj->NbcSetAttributes(aDefaultAttr,FALSE);
+ }
+ if (!pObj->IsInserted()) {
+ SdrInsertReason aReason(SDRREASON_VIEWCALL);
+ if ((nOptions & SDRINSERT_NOBROADCAST)!=0) {
+ rPV.GetObjList()->NbcInsertObject(pObj,CONTAINER_APPEND,&aReason);
+ } else {
+ rPV.GetObjList()->InsertObject(pObj,CONTAINER_APPEND,&aReason);
+ }
+ }
+ AddUndo(new SdrUndoNewObj(*pObj));
+ if ((nOptions & SDRINSERT_DONTMARK)==0) {
+ if ((nOptions & SDRINSERT_ADDMARK)==0) UnmarkAllObj();
+ MarkObj(pObj,&rPV);
+ }
+ return TRUE;
+}
+
+void SdrEditView::ReplaceObject(SdrObject* pOldObj, SdrPageView& rPV, SdrObject* pNewObj, BOOL bMark)
+{
+ SdrObjList* pOL=pOldObj->GetObjList();
+ AddUndo(new SdrUndoReplaceObj(*pOldObj,*pNewObj));
+ pOL->ReplaceObject(pNewObj,pOldObj->GetOrdNum());
+ if (bMark) MarkObj(pNewObj,&rPV);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef WIN
+void SdrEditView::BegUndo() // Undo-Klammerung auf
+{
+ pMod->BegUndo();
+}
+
+void SdrEditView::BegUndo(const String& rComment) // Undo-Klammerung auf
+{
+ pMod->BegUndo(rComment);
+}
+
+void SdrEditView::BegUndo(const String& rComment, const String& rObjDescr,
+ SdrRepeatFunc eFunc) // Undo-Klammerung auf
+{
+ pMod->BegUndo(rComment,rObjDescr,eFunc);
+}
+
+void SdrEditView::BegUndo(SdrUndoGroup* pUndoGrp) // Undo-Klammerung auf
+{
+ pMod->BegUndo(pUndoGrp);
+}
+
+void SdrEditView::AddUndo(SdrUndoAction* pUndo) // Action hinzufuegen
+{
+ pMod->AddUndo(pUndo);
+}
+ // nur nach dem 1. BegUndo oder vor dem letzten EndUndo:
+void SdrEditView::SetUndoComment(const String& rComment)
+{
+ pMod->SetUndoComment(rComment);
+}
+
+void SdrEditView::SetUndoComment(const String& rComment,
+ const String& rObjDescr)
+{
+ pMod->SetUndoComment(rComment,rObjDescr);
+}
+#endif
+
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
new file mode 100644
index 0000000000..c8388001d3
--- /dev/null
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -0,0 +1,1287 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdedtv1.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdedtv.hxx"
+#include <math.h>
+
+#ifndef _MATH_H
+#define _MATH_H
+#endif
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+#ifndef _SFXITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SVX_RECTENUM_HXX //autogen
+#include <rectenum.hxx>
+#endif
+
+#include "svxids.hrc" // fuer SID_ATTR_TRANSFORM_...
+#include "svdattr.hxx" // fuer Get/SetGeoAttr
+#include "svditext.hxx"
+#include "svditer.hxx"
+#include "svdtrans.hxx"
+#include "svdundo.hxx"
+#include "svdpage.hxx"
+#include "svdpagv.hxx"
+#include "svdlayer.hxx" // fuer MergeNotPersistAttr
+#include "svdattrx.hxx" // fuer MergeNotPersistAttr
+#include "svdetc.hxx" // fuer SearchOutlinerItems
+#include "svdopath.hxx" // fuer Crook
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+
+#ifndef _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+
+#ifndef _AEITEM_HXX //autogen
+#include <svtools/aeitem.hxx>
+#endif
+
+#ifndef _SFX_WHITER_HXX
+#include <svtools/whiter.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::SetMarkedObjRect(const Rectangle& rRect, BOOL bCopy)
+{
+ DBG_ASSERT(!rRect.IsEmpty(),"SetMarkedObjRect() mit leerem Rect mach keinen Sinn");
+ if (rRect.IsEmpty()) return;
+ ULONG nAnz=aMark.GetMarkCount();
+ if (nAnz==0) return;
+ Rectangle aR0(GetMarkedObjRect());
+ DBG_ASSERT(!aR0.IsEmpty(),"SetMarkedObjRect(): GetMarkedObjRect() ist leer");
+ if (aR0.IsEmpty()) return;
+ long x0=aR0.Left();
+ long y0=aR0.Top();
+ long w0=aR0.Right()-x0;
+ long h0=aR0.Bottom()-y0;
+ long x1=rRect.Left();
+ long y1=rRect.Top();
+ long w1=rRect.Right()-x1;
+ long h1=rRect.Bottom()-y1;
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditPosSize,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ if (bCopy) CopyMarkedObj();
+ for (ULONG nm=0; nm<nAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ AddUndo(new SdrUndoGeoObj(*pO));
+ Rectangle aR1(pO->GetSnapRect());
+ if (!aR1.IsEmpty()) {
+ if (aR1==aR0) aR1=rRect;
+ else { // aR1 von aR0 nach rRect transformieren
+ aR1.Move(-x0,-y0);
+ BigInt l(aR1.Left());
+ BigInt r(aR1.Right());
+ BigInt t(aR1.Top());
+ BigInt b(aR1.Bottom());
+ if (w0!=0) {
+ l*=w1; l/=w0;
+ r*=w1; r/=w0;
+ } else {
+ l=0; r=w1;
+ }
+ if (h0!=0) {
+ t*=h1; t/=h0;
+ b*=h1; b/=h0;
+ } else {
+ t=0; b=h1;
+ }
+ aR1.Left ()=long(l);
+ aR1.Right ()=long(r);
+ aR1.Top ()=long(t);
+ aR1.Bottom()=long(b);
+ aR1.Move(x1,y1);
+ }
+ pO->SetSnapRect(aR1);
+ } else {
+ DBG_ERROR("SetMarkedObjRect(): pObj->GetSnapRect() liefert leeres Rect");
+ }
+ }
+ EndUndo();
+}
+
+void SdrEditView::MoveMarkedObj(const Size& rSiz, BOOL bCopy)
+{
+ XubString aStr(ImpGetResStr(STR_EditMove));
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ // benoetigt eigene UndoGroup wegen Parameter
+ BegUndo(aStr,aMark.GetMarkDescription(),SDRREPFUNC_OBJ_MOVE);
+ if (bCopy) CopyMarkedObj();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ AddUndo(new SdrUndoMoveObj(*pO,rSiz));
+ pO->Move(rSiz);
+ }
+ EndUndo();
+}
+
+void SdrEditView::ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, BOOL bCopy)
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditResize,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ if (bCopy) CopyMarkedObj();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ AddUndo(new SdrUndoGeoObj(*pO));
+ Point aRef(rRef-pM->GetPageView()->GetOffset());
+ pO->Resize(aRef,xFact,yFact);
+ }
+ EndUndo();
+}
+
+long SdrEditView::GetMarkedObjRotate() const
+{
+ BOOL b1st=TRUE;
+ BOOL bOk=TRUE;
+ long nWink=0;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz && bOk; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ long nWink2=pO->GetRotateAngle();
+ if (b1st) nWink=nWink2;
+ else if (nWink2!=nWink) bOk=FALSE;
+ b1st=FALSE;
+ }
+ if (!bOk) nWink=0;
+ return nWink;
+}
+
+void SdrEditView::RotateMarkedObj(const Point& rRef, long nWink, BOOL bCopy)
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditRotate,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ if (bCopy) CopyMarkedObj();
+ double nSin=sin(nWink*nPi180);
+ double nCos=cos(nWink*nPi180);
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ AddUndo(new SdrUndoGeoObj(*pO));
+ Point aRef(rRef-pM->GetPageView()->GetOffset());
+ pO->Rotate(aRef,nWink,nSin,nCos);
+ }
+ EndUndo();
+}
+
+void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, BOOL bCopy)
+{
+ XubString aStr;
+ Point aDif(rRef2-rRef1);
+ if (aDif.X()==0) ImpTakeDescriptionStr(STR_EditMirrorHori,aStr);
+ else if (aDif.Y()==0) ImpTakeDescriptionStr(STR_EditMirrorVert,aStr);
+ else if (Abs(aDif.X())==Abs(aDif.Y())) ImpTakeDescriptionStr(STR_EditMirrorDiag,aStr);
+ else ImpTakeDescriptionStr(STR_EditMirrorFree,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ if (bCopy) CopyMarkedObj();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ AddUndo(new SdrUndoGeoObj(*pO));
+ Point aRef1(rRef1-pM->GetPageView()->GetOffset());
+ Point aRef2(rRef2-pM->GetPageView()->GetOffset());
+ pO->Mirror(aRef1,aRef2);
+ }
+ EndUndo();
+}
+
+void SdrEditView::MirrorMarkedObjHorizontal(BOOL bCopy)
+{
+ Point aCenter(GetMarkedObjRect().Center());
+ Point aPt2(aCenter);
+ aPt2.Y()++;
+ MirrorMarkedObj(aCenter,aPt2,bCopy);
+}
+
+void SdrEditView::MirrorMarkedObjVertical(BOOL bCopy)
+{
+ Point aCenter(GetMarkedObjRect().Center());
+ Point aPt2(aCenter);
+ aPt2.X()++;
+ MirrorMarkedObj(aCenter,aPt2,bCopy);
+}
+
+long SdrEditView::GetMarkedObjShear() const
+{
+ BOOL b1st=TRUE;
+ BOOL bOk=TRUE;
+ long nWink=0;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz && bOk; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ long nWink2=pO->GetShearAngle();
+ if (b1st) nWink=nWink2;
+ else if (nWink2!=nWink) bOk=FALSE;
+ b1st=FALSE;
+ }
+ if (nWink>SDRMAXSHEAR) nWink=SDRMAXSHEAR;
+ if (nWink<-SDRMAXSHEAR) nWink=-SDRMAXSHEAR;
+ if (!bOk) nWink=0;
+ return nWink;
+}
+
+void SdrEditView::ShearMarkedObj(const Point& rRef, long nWink, BOOL bVShear, BOOL bCopy)
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditShear,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ if (bCopy) CopyMarkedObj();
+ double nTan=tan(nWink*nPi180);
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ AddUndo(new SdrUndoGeoObj(*pO));
+ Point aRef(rRef);
+ Point aOfs(pM->GetPageView()->GetOffset());
+ aRef-=aOfs;
+ pO->Shear(aRef,nWink,nTan,bVShear);
+ }
+ EndUndo();
+}
+
+void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRad,
+ SdrCrookMode eMode, BOOL bVertical, BOOL bNoContortion, BOOL bRotate, const Rectangle& rMarkRect)
+{
+ SdrPathObj* pPath=PTR_CAST(SdrPathObj,pO);
+ BOOL bDone = FALSE;
+
+ if(pPath!=NULL && !bNoContortion)
+ {
+ XPolyPolygon aXPP(pPath->GetPathPoly());
+ switch (eMode) {
+ case SDRCROOK_ROTATE : CrookRotatePoly (aXPP,rRef,rRad,bVertical); break;
+ case SDRCROOK_SLANT : CrookSlantPoly (aXPP,rRef,rRad,bVertical); break;
+ case SDRCROOK_STRETCH: CrookStretchPoly(aXPP,rRef,rRad,bVertical,rMarkRect); break;
+ } // switch
+ pPath->SetPathPoly(aXPP);
+ bDone = TRUE;
+ }
+
+ if(!bDone && !pPath && pO->IsPolyObj() && pO->GetPointCount() != 0)
+ {
+ // FuerPolyObj's, aber NICHT fuer SdrPathObj's, z.B. fuer's Bemassungsobjekt
+ USHORT nPtAnz=pO->GetPointCount();
+ XPolygon aXP(nPtAnz);
+ USHORT nPtNum;
+ for (nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ Point aPt(pO->GetPoint(nPtNum));
+ aXP[nPtNum]=aPt;
+ }
+ switch (eMode) {
+ case SDRCROOK_ROTATE : CrookRotatePoly (aXP,rRef,rRad,bVertical); break;
+ case SDRCROOK_SLANT : CrookSlantPoly (aXP,rRef,rRad,bVertical); break;
+ case SDRCROOK_STRETCH: CrookStretchPoly(aXP,rRef,rRad,bVertical,rMarkRect); break;
+ } // switch
+ for (nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ // hier koennte man vieleicht auch mal das Broadcasting optimieren
+ // ist aber z.Zt. bei den 2 Punkten des Bemassungsobjekts noch nicht so tragisch
+ pO->SetPoint(aXP[nPtNum],nPtNum);
+ }
+ bDone = TRUE;
+ }
+
+ if(!bDone)
+ {
+ // Fuer alle anderen oder wenn bNoContortion
+ Point aCtr0(pO->GetSnapRect().Center());
+ Point aCtr1(aCtr0);
+ BOOL bRotOk=FALSE;
+ double nSin,nCos;
+ double nWink=0;
+ if (rRad.X()!=0 && rRad.Y()!=0) {
+ bRotOk=bRotate;
+ switch (eMode) {
+ case SDRCROOK_ROTATE : nWink=CrookRotateXPoint (aCtr1,NULL,NULL,rRef,rRad,nSin,nCos,bVertical); bRotOk=bRotate; break;
+ case SDRCROOK_SLANT : nWink=CrookSlantXPoint (aCtr1,NULL,NULL,rRef,rRad,nSin,nCos,bVertical); break;
+ case SDRCROOK_STRETCH: nWink=CrookStretchXPoint(aCtr1,NULL,NULL,rRef,rRad,nSin,nCos,bVertical,rMarkRect); break;
+ } // switch
+ }
+ aCtr1-=aCtr0;
+ if (bRotOk) pO->Rotate(aCtr0,Round(nWink/nPi180),nSin,nCos);
+ pO->Move(Size(aCtr1.X(),aCtr1.Y()));
+ }
+}
+
+void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookMode eMode,
+ BOOL bVertical, BOOL bNoContortion, BOOL bCopy)
+{
+ Rectangle aMarkRect(GetMarkedObjRect());
+ XubString aStr;
+ BOOL bRotate=bNoContortion && eMode==SDRCROOK_ROTATE && IsRotateAllowed(FALSE);
+ ImpTakeDescriptionStr(bNoContortion?STR_EditCrook:STR_EditCrookContortion,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ if (bCopy) CopyMarkedObj();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ AddUndo(new SdrUndoGeoObj(*pO));
+ Point aRef(rRef);
+ Point aOfs(pM->GetPageView()->GetOffset());
+ aRef-=aOfs;
+ const SdrObjList* pOL=pO->GetSubList();
+ if (bNoContortion || pOL==NULL) {
+ ImpCrookObj(pO,aRef,rRad,eMode,bVertical,bNoContortion,bRotate,aMarkRect);
+ } else {
+ SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
+ while (aIter.IsMore()) {
+ SdrObject* pO1=aIter.Next();
+ ImpCrookObj(pO1,aRef,rRad,eMode,bVertical,bNoContortion,bRotate,aMarkRect);
+ }
+ }
+ }
+ EndUndo();
+}
+
+void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPolygon& rDistortedRect, BOOL bNoContortion)
+{
+ SdrPathObj* pPath=PTR_CAST(SdrPathObj,pO);
+ if (!bNoContortion && pPath!=NULL) {
+ XPolyPolygon aXPP(pPath->GetPathPoly());
+ aXPP.Distort(rRef,rDistortedRect);
+ pPath->SetPathPoly(aXPP);
+ } else if (pO->IsPolyObj()) {
+ // z.B. fuer's Bemassungsobjekt
+ USHORT nPtAnz=pO->GetPointCount();
+ XPolygon aXP(nPtAnz);
+ USHORT nPtNum;
+ for (nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ Point aPt(pO->GetPoint(nPtNum));
+ aXP[nPtNum]=aPt;
+ }
+ aXP.Distort(rRef,rDistortedRect);
+ for (nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ // hier koennte man vieleicht auch mal das Broadcasting optimieren
+ // ist aber z.Zt. bei den 2 Punkten des Bemassungsobjekts noch nicht so tragisch
+ pO->SetPoint(aXP[nPtNum],nPtNum);
+ }
+ }
+}
+
+void SdrEditView::DistortMarkedObj(const Rectangle& rRef, const XPolygon& rDistortedRect, BOOL bNoContortion, BOOL bCopy)
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditDistort,aStr);
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr);
+ if (bCopy) CopyMarkedObj();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ AddUndo(new SdrUndoGeoObj(*pO));
+ Rectangle aRefRect(rRef);
+ XPolygon aRefPoly(rDistortedRect);
+ Point aOfs(pM->GetPageView()->GetOffset());
+ if (aOfs.X()!=0 || aOfs.Y()!=0) {
+ aRefRect.Move(-aOfs.X(),-aOfs.Y());
+ aRefPoly.Move(-aOfs.X(),-aOfs.Y());
+ }
+ const SdrObjList* pOL=pO->GetSubList();
+ if (bNoContortion || pOL==NULL) {
+ ImpDistortObj(pO,aRefRect,aRefPoly,bNoContortion);
+ } else {
+ SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
+ while (aIter.IsMore()) {
+ SdrObject* pO1=aIter.Next();
+ ImpDistortObj(pO1,aRefRect,aRefPoly,bNoContortion);
+ }
+ }
+ }
+ EndUndo();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll)
+{
+ // bReplaceAll hat hier keinerlei Wirkung
+ Rectangle aAllSnapRect(GetMarkedObjRect());
+ const SfxPoolItem *pPoolItem=NULL;
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrTransformRef1XItem*)pPoolItem)->GetValue();
+ SetRef1(Point(n,GetRef1().Y()));
+ }
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrTransformRef1YItem*)pPoolItem)->GetValue();
+ SetRef1(Point(GetRef1().X(),n));
+ }
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrTransformRef2XItem*)pPoolItem)->GetValue();
+ SetRef2(Point(n,GetRef2().Y()));
+ }
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrTransformRef2YItem*)pPoolItem)->GetValue();
+ SetRef2(Point(GetRef2().X(),n));
+ }
+ long nAllPosX=0; BOOL bAllPosX=FALSE;
+ long nAllPosY=0; BOOL bAllPosY=FALSE;
+ long nAllWdt=0; BOOL bAllWdt=FALSE;
+ long nAllHgt=0; BOOL bAllHgt=FALSE;
+ BOOL bDoIt=FALSE;
+ if (rAttr.GetItemState(SDRATTR_ALLPOSITIONX,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ nAllPosX=((const SdrAllPositionXItem*)pPoolItem)->GetValue();
+ bAllPosX=TRUE; bDoIt=TRUE;
+ }
+ if (rAttr.GetItemState(SDRATTR_ALLPOSITIONY,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ nAllPosY=((const SdrAllPositionYItem*)pPoolItem)->GetValue();
+ bAllPosY=TRUE; bDoIt=TRUE;
+ }
+ if (rAttr.GetItemState(SDRATTR_ALLSIZEWIDTH,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ nAllWdt=((const SdrAllSizeWidthItem*)pPoolItem)->GetValue();
+ bAllWdt=TRUE; bDoIt=TRUE;
+ }
+ if (rAttr.GetItemState(SDRATTR_ALLSIZEHEIGHT,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ nAllHgt=((const SdrAllSizeHeightItem*)pPoolItem)->GetValue();
+ bAllHgt=TRUE; bDoIt=TRUE;
+ }
+ if (bDoIt) {
+ Rectangle aRect(aAllSnapRect); // !!! fuer PolyPt's und GluePt's aber bitte noch aendern !!!
+ if (bAllPosX) aRect.Move(nAllPosX-aRect.Left(),0);
+ if (bAllPosY) aRect.Move(0,nAllPosY-aRect.Top());
+ if (bAllWdt) aRect.Right()=aAllSnapRect.Left()+nAllWdt;
+ if (bAllHgt) aRect.Bottom()=aAllSnapRect.Top()+nAllHgt;
+ SetMarkedObjRect(aRect);
+ }
+ if (rAttr.GetItemState(SDRATTR_RESIZEXALL,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ Fraction aXFact=((const SdrResizeXAllItem*)pPoolItem)->GetValue();
+ ResizeMarkedObj(aAllSnapRect.TopLeft(),aXFact,Fraction(1,1));
+ }
+ if (rAttr.GetItemState(SDRATTR_RESIZEYALL,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ Fraction aYFact=((const SdrResizeYAllItem*)pPoolItem)->GetValue();
+ ResizeMarkedObj(aAllSnapRect.TopLeft(),Fraction(1,1),aYFact);
+ }
+ if (rAttr.GetItemState(SDRATTR_ROTATEALL,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long nAngle=((const SdrRotateAllItem*)pPoolItem)->GetValue();
+ RotateMarkedObj(aAllSnapRect.Center(),nAngle);
+ }
+ if (rAttr.GetItemState(SDRATTR_HORZSHEARALL,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long nAngle=((const SdrHorzShearAllItem*)pPoolItem)->GetValue();
+ ShearMarkedObj(aAllSnapRect.Center(),nAngle,FALSE);
+ }
+ if (rAttr.GetItemState(SDRATTR_VERTSHEARALL,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long nAngle=((const SdrVertShearAllItem*)pPoolItem)->GetValue();
+ ShearMarkedObj(aAllSnapRect.Center(),nAngle,TRUE);
+ }
+ // Todo: WhichRange nach Notwendigkeit ueberpruefen.
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ const SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ const SdrPageView* pPV=pM->GetPageView();
+ AddUndo(new SdrUndoGeoObj(*pObj));
+ pObj->ApplyNotPersistAttr(rAttr);
+ }
+}
+
+void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL bOnlyHardAttr) const
+{
+ // bOnlyHardAttr hat hier keinerlei Wirkung
+ // Hier muss ausserdem noch der Nullpunkt und
+ // die PvPos berueksichtigt werden.
+ Rectangle aAllSnapRect(GetMarkedObjRect()); // !!! fuer PolyPt's und GluePt's aber bitte noch aendern !!!
+ long nAllSnapPosX=aAllSnapRect.Left();
+ long nAllSnapPosY=aAllSnapRect.Top();
+ long nAllSnapWdt=aAllSnapRect.GetWidth()-1;
+ long nAllSnapHgt=aAllSnapRect.GetHeight()-1;
+ // koennte mal zu CheckPossibilities mit rein
+ BOOL bMovProtect=FALSE,bMovProtectDC=FALSE;
+ BOOL bSizProtect=FALSE,bSizProtectDC=FALSE;
+ BOOL bPrintable =TRUE ,bPrintableDC=FALSE;
+ SdrLayerID nLayerId=0; BOOL bLayerDC=FALSE;
+ XubString aObjName; BOOL bObjNameDC=FALSE,bObjNameSet=FALSE;
+ long nSnapPosX=0; BOOL bSnapPosXDC=FALSE;
+ long nSnapPosY=0; BOOL bSnapPosYDC=FALSE;
+ long nSnapWdt=0; BOOL bSnapWdtDC=FALSE;
+ long nSnapHgt=0; BOOL bSnapHgtDC=FALSE;
+ long nLogicWdt=0; BOOL bLogicWdtDC=FALSE,bLogicWdtDiff=FALSE;
+ long nLogicHgt=0; BOOL bLogicHgtDC=FALSE,bLogicHgtDiff=FALSE;
+ long nRotAngle=0; BOOL bRotAngleDC=FALSE;
+ long nShrAngle=0; BOOL bShrAngleDC=FALSE;
+ Rectangle aSnapRect;
+ Rectangle aLogicRect;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ const SdrMark* pM=aMark.GetMark(nm);
+ const SdrObject* pObj=pM->GetObj();
+ if (nm==0) {
+ nLayerId=pObj->GetLayer();
+ bMovProtect=pObj->IsMoveProtect();
+ bSizProtect=pObj->IsResizeProtect();
+ bPrintable =pObj->IsPrintable();
+ Rectangle aSnapRect(pObj->GetSnapRect());
+ Rectangle aLogicRect(pObj->GetLogicRect());
+ nSnapPosX=aSnapRect.Left();
+ nSnapPosY=aSnapRect.Top();
+ nSnapWdt=aSnapRect.GetWidth()-1;
+ nSnapHgt=aSnapRect.GetHeight()-1;
+ nLogicWdt=aLogicRect.GetWidth()-1;
+ nLogicHgt=aLogicRect.GetHeight()-1;
+ bLogicWdtDiff=nLogicWdt!=nSnapWdt;
+ bLogicHgtDiff=nLogicHgt!=nSnapHgt;
+ nRotAngle=pObj->GetRotateAngle();
+ nShrAngle=pObj->GetShearAngle();
+ } else {
+ if (!bLayerDC && nLayerId !=pObj->GetLayer()) bLayerDC=TRUE;
+ if (!bMovProtectDC && bMovProtect!=pObj->IsMoveProtect()) bMovProtectDC=TRUE;
+ if (!bSizProtectDC && bSizProtect!=pObj->IsResizeProtect()) bSizProtectDC=TRUE;
+ if (!bPrintableDC && bPrintable !=pObj->IsPrintable()) bPrintableDC=TRUE;
+ if (!bRotAngleDC && nRotAngle !=pObj->GetRotateAngle()) bRotAngleDC=TRUE;
+ if (!bShrAngleDC && nShrAngle !=pObj->GetShearAngle()) bShrAngleDC=TRUE;
+ if (!bSnapWdtDC || !bSnapHgtDC || !bSnapPosXDC || !bSnapPosYDC || !bLogicWdtDiff || !bLogicHgtDiff) {
+ aSnapRect=pObj->GetSnapRect();
+ if (nSnapPosX!=aSnapRect.Left()) bSnapPosXDC=TRUE;
+ if (nSnapPosY!=aSnapRect.Top()) bSnapPosYDC=TRUE;
+ if (nSnapWdt!=aSnapRect.GetWidth()-1) bSnapWdtDC=TRUE;
+ if (nSnapHgt!=aSnapRect.GetHeight()-1) bSnapHgtDC=TRUE;
+ }
+ if (!bLogicWdtDC || !bLogicHgtDC || !bLogicWdtDiff || !bLogicHgtDiff) {
+ aLogicRect=pObj->GetLogicRect();
+ if (nLogicWdt!=aLogicRect.GetWidth()-1) bLogicWdtDC=TRUE;
+ if (nLogicHgt!=aLogicRect.GetHeight()-1) bLogicHgtDC=TRUE;
+ if (!bLogicWdtDiff && aSnapRect.GetWidth()!=aLogicRect.GetWidth()) bLogicWdtDiff=TRUE;
+ if (!bLogicHgtDiff && aSnapRect.GetHeight()!=aLogicRect.GetHeight()) bLogicHgtDiff=TRUE;
+ }
+ }
+ if (!bObjNameDC && pObj->HasSetName()) {
+ if (!bObjNameSet) {
+ aObjName=pObj->GetName();
+ } else {
+ if (aObjName!=pObj->GetName()) bObjNameDC=TRUE;
+ }
+ }
+ }
+
+ if (bSnapPosXDC || nAllSnapPosX!=nSnapPosX) rAttr.Put(SdrAllPositionXItem(nAllSnapPosX));
+ if (bSnapPosYDC || nAllSnapPosY!=nSnapPosY) rAttr.Put(SdrAllPositionYItem(nAllSnapPosY));
+ if (bSnapWdtDC || nAllSnapWdt !=nSnapWdt ) rAttr.Put(SdrAllSizeWidthItem(nAllSnapWdt));
+ if (bSnapHgtDC || nAllSnapHgt !=nSnapHgt ) rAttr.Put(SdrAllSizeHeightItem(nAllSnapHgt));
+
+ // Items fuer reine Transformationen
+ rAttr.Put(SdrMoveXItem());
+ rAttr.Put(SdrMoveYItem());
+ rAttr.Put(SdrResizeXOneItem());
+ rAttr.Put(SdrResizeYOneItem());
+ rAttr.Put(SdrRotateOneItem());
+ rAttr.Put(SdrHorzShearOneItem());
+ rAttr.Put(SdrVertShearOneItem());
+ if (nMarkAnz>1) {
+ rAttr.Put(SdrResizeXAllItem());
+ rAttr.Put(SdrResizeYAllItem());
+ rAttr.Put(SdrRotateAllItem());
+ rAttr.Put(SdrHorzShearAllItem());
+ rAttr.Put(SdrVertShearAllItem());
+ }
+
+ if(eDragMode == SDRDRAG_ROTATE || eDragMode == SDRDRAG_MIRROR)
+ {
+ rAttr.Put(SdrTransformRef1XItem(GetRef1().X()));
+ rAttr.Put(SdrTransformRef1YItem(GetRef1().Y()));
+ }
+
+ if(eDragMode == SDRDRAG_MIRROR)
+ {
+ rAttr.Put(SdrTransformRef2XItem(GetRef2().X()));
+ rAttr.Put(SdrTransformRef2YItem(GetRef2().Y()));
+ }
+}
+
+SfxItemSet SdrEditView::GetAttrFromMarked(BOOL bOnlyHardAttr) const
+{
+ SfxItemSet aSet(pMod->GetItemPool());
+ MergeAttrFromMarked(aSet,bOnlyHardAttr);
+ return aSet;
+}
+
+void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, BOOL bOnlyHardAttr) const
+{
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ pM->GetObj()->TakeAttributes(rAttr,TRUE,bOnlyHardAttr);
+ }
+}
+
+void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, BOOL bReplaceAll)
+{
+ if (HasMarkedObj()) {
+#ifdef DBG_UTIL
+ {
+ BOOL bHasEEFeatureItems=FALSE;
+ SfxItemIter aIter(rAttr);
+ const SfxPoolItem* pItem=aIter.FirstItem();
+ while (!bHasEEFeatureItems && pItem!=NULL) {
+ if (!IsInvalidItem(pItem)) {
+ USHORT nW=pItem->Which();
+ if (nW>=EE_FEATURE_START && nW<=EE_FEATURE_END) bHasEEFeatureItems=TRUE;
+ }
+ pItem=aIter.NextItem();
+ }
+ if(bHasEEFeatureItems)
+ {
+ String aMessage;
+ aMessage.AppendAscii("SdrEditView::SetAttrToMarked(): Das setzen von EE_FEATURE-Items an der SdrView macht keinen Sinn! Es fuehrt nur zu Overhead und nicht mehr lesbaren Dokumenten.");
+ InfoBox(NULL, aMessage).Execute();
+ }
+ }
+#endif
+ // Joe, 2.7.98: Damit Undo nach Format.Standard auch die Textattribute korrekt restauriert
+ BOOL bHasEEItems=SearchOutlinerItems(rAttr,bReplaceAll);
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditSetAttributes,aStr);
+
+ // AW 030100: save additional geom info when para or char attributes
+ // are changed and the geom form of the text object might be changed
+ BOOL bPossibleGeomChange(FALSE);
+ SfxWhichIter aIter(rAttr);
+ UINT16 nWhich = aIter.FirstWhich();
+ while(!bPossibleGeomChange && nWhich)
+ {
+ SfxItemState eState = rAttr.GetItemState(nWhich);
+ if(eState == SFX_ITEM_SET)
+ {
+ if(nWhich >= SDRATTR_TEXT_MINFRAMEHEIGHT && nWhich <= SDRATTR_TEXT_CONTOURFRAME)
+ bPossibleGeomChange = TRUE;
+ }
+ nWhich = aIter.NextWhich();
+ }
+
+ BegUndo(aStr);
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+
+ // new geometry undo
+ if(bPossibleGeomChange)
+ {
+ // save position and size of obect, too
+ AddUndo(new SdrUndoGeoObj(*pM->GetObj()));
+ }
+
+ // add attribute undo
+ AddUndo(new SdrUndoAttrObj(*pM->GetObj(),FALSE,bHasEEItems || bPossibleGeomChange));
+
+ pM->GetObj()->SetAttributes(rAttr,bReplaceAll);
+ }
+ // besser vorher checken, was gemacht werden soll:
+ // pObj->SetAttr() oder SetNotPersistAttr()
+ // !!! fehlende Implementation !!!
+ SetNotPersistAttrToMarked(rAttr,bReplaceAll);
+ EndUndo();
+ }
+}
+
+SfxStyleSheet* SdrEditView::GetStyleSheetFromMarked() const
+{
+ SfxStyleSheet* pRet=NULL;
+ BOOL b1st=TRUE;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SfxStyleSheet* pSS=pM->GetObj()->GetStyleSheet();
+ if (b1st) pRet=pSS;
+ else if (pRet!=pSS) return NULL; // verschiedene StyleSheets
+ b1st=FALSE;
+ }
+ return pRet;
+}
+
+void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
+{
+ if (HasMarkedObj()) {
+ XubString aStr;
+ if (pStyleSheet!=NULL) ImpTakeDescriptionStr(STR_EditSetStylesheet,aStr);
+ else ImpTakeDescriptionStr(STR_EditDelStylesheet,aStr);
+ BegUndo(aStr);
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ AddUndo(new SdrUndoGeoObj(*pM->GetObj()));
+ AddUndo(new SdrUndoAttrObj(*pM->GetObj(),TRUE,TRUE));
+ pM->GetObj()->SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
+ }
+ EndUndo();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/* new interface src537 */
+BOOL SdrEditView::GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr) const
+{
+ if(aMark.GetMarkCount())
+ {
+ rTargetSet.Put(GetAttrFromMarked(bOnlyHardAttr), FALSE);
+ return TRUE;
+ }
+ else
+ {
+ return SdrMarkView::GetAttributes(rTargetSet, bOnlyHardAttr);
+ }
+}
+
+BOOL SdrEditView::SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll)
+{
+ if (aMark.GetMarkCount()!=0) {
+ SetAttrToMarked(rSet,bReplaceAll);
+ return TRUE;
+ } else {
+ return SdrMarkView::SetAttributes(rSet,bReplaceAll);
+ }
+}
+
+SfxStyleSheet* SdrEditView::GetStyleSheet(BOOL& rOk) const
+{
+ if (aMark.GetMarkCount()!=0) {
+ rOk=TRUE;
+ return GetStyleSheetFromMarked();
+ } else {
+ return SdrMarkView::GetStyleSheet(rOk);
+ }
+}
+
+BOOL SdrEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
+{
+ if (aMark.GetMarkCount()!=0) {
+ SetStyleSheetToMarked(pStyleSheet,bDontRemoveHardAttr);
+ return TRUE;
+ } else {
+ return SdrMarkView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
+{
+ SfxItemSet aRetSet(pMod->GetItemPool(), // SID_ATTR_TRANSFORM_... aus s:svxids.hrc
+ SID_ATTR_TRANSFORM_POS_X,SID_ATTR_TRANSFORM_ANGLE,
+ SID_ATTR_TRANSFORM_PROTECT_POS,SID_ATTR_TRANSFORM_AUTOHEIGHT,
+ SDRATTR_ECKENRADIUS,SDRATTR_ECKENRADIUS,
+ 0);
+ if (HasMarkedObj()) {
+ SfxItemSet aMarkAttr(GetAttrFromMarked(FALSE)); // wg. AutoGrowHeight und Eckenradius
+ Rectangle aRect(GetMarkedObjRect());
+ if (GetPageViewCount()==1) { // hier mal etwas verbessern !!!
+ GetPageViewPvNum(0)->LogicToPagePos(aRect);
+ }
+
+ // Position
+ aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_POS_X,aRect.Left()));
+ aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_POS_Y,aRect.Top()));
+
+ // Groesse
+ long nResizeRefX=aRect.Left();
+ long nResizeRefY=aRect.Top();
+ if (eDragMode==SDRDRAG_ROTATE) { // Drehachse auch als Referenz fuer Resize
+ nResizeRefX=aRef1.X();
+ nResizeRefY=aRef1.Y();
+ }
+ aRetSet.Put(SfxUInt32Item(SID_ATTR_TRANSFORM_WIDTH,aRect.Right()-aRect.Left()));
+ aRetSet.Put(SfxUInt32Item(SID_ATTR_TRANSFORM_HEIGHT,aRect.Bottom()-aRect.Top()));
+ aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_RESIZE_REF_X,nResizeRefX));
+ aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_RESIZE_REF_Y,nResizeRefY));
+
+ Point aRotateAxe(aRef1);
+ if (GetPageViewCount()==1) { // hier mal etwas verbessern !!!
+ GetPageViewPvNum(0)->LogicToPagePos(aRotateAxe);
+ }
+
+ // Drehung
+ long nRotateRefX=aRect.Center().X();
+ long nRotateRefY=aRect.Center().Y();
+ if (eDragMode==SDRDRAG_ROTATE) {
+ nRotateRefX=aRotateAxe.X();
+ nRotateRefY=aRotateAxe.Y();
+ }
+ aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_ANGLE,GetMarkedObjRotate()));
+ aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_ROT_X,nRotateRefX));
+ aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_ROT_Y,nRotateRefY));
+
+ // Shear
+ long nShearRefX=aRect.Left();
+ long nShearRefY=aRect.Bottom();
+ if (eDragMode==SDRDRAG_ROTATE) { // Drehachse auch als Referenz fuer Shear
+ nShearRefX=aRotateAxe.X();
+ nShearRefY=aRotateAxe.Y();
+ }
+ aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR,GetMarkedObjShear()));
+ aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_X,nShearRefX));
+ aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_Y,nShearRefY));
+
+ // Pruefen der einzelnen Objekte, ob Objekte geschuetzt sind
+ const SdrMarkList& rMarkList=GetMarkList();
+ ULONG nMarkCount=rMarkList.GetMarkCount();
+ SdrObject* pObj=rMarkList.GetMark(0)->GetObj();
+ BOOL bPosProt=pObj->IsMoveProtect();
+ BOOL bSizProt=pObj->IsResizeProtect();
+ BOOL bPosProtDontCare=FALSE;
+ BOOL bSizProtDontCare=FALSE;
+ for (ULONG i=1; i<nMarkCount && (!bPosProtDontCare || !bSizProtDontCare); i++) {
+ pObj=rMarkList.GetMark(i)->GetObj();
+ if (bPosProt!=pObj->IsMoveProtect()) bPosProtDontCare=TRUE;
+ if (bSizProt!=pObj->IsResizeProtect()) bSizProtDontCare=TRUE;
+ }
+
+ // InvalidateItem setzt das Item auf DONT_CARE
+ if (bPosProtDontCare) {
+ aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_PROTECT_POS);
+ } else {
+ aRetSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_PROTECT_POS,bPosProt));
+ }
+ if (bSizProtDontCare) {
+ aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_PROTECT_SIZE);
+ } else {
+ aRetSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_PROTECT_SIZE,bSizProt));
+ }
+
+ SfxItemState eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWWIDTH);
+ BOOL bAutoGrow=((SdrTextAutoGrowWidthItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
+ if (eState==SFX_ITEM_DONTCARE) {
+ aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOWIDTH);
+ } else if (eState==SFX_ITEM_SET) {
+ aRetSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_AUTOWIDTH,bAutoGrow));
+ }
+
+ eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWHEIGHT);
+ bAutoGrow=((SdrTextAutoGrowHeightItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
+ if (eState==SFX_ITEM_DONTCARE) {
+ aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOHEIGHT);
+ } else if (eState==SFX_ITEM_SET) {
+ aRetSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_AUTOHEIGHT,bAutoGrow));
+ }
+
+ eState=aMarkAttr.GetItemState(SDRATTR_ECKENRADIUS);
+ long nRadius=((SdrEckenradiusItem&)(aMarkAttr.Get(SDRATTR_ECKENRADIUS))).GetValue();
+ if (eState==SFX_ITEM_DONTCARE) {
+ aRetSet.InvalidateItem(SDRATTR_ECKENRADIUS);
+ } else if (eState==SFX_ITEM_SET) {
+ aRetSet.Put(SdrEckenradiusItem(nRadius));
+ }
+
+ }
+ return aRetSet;
+}
+
+Point ImpGetPoint(Rectangle aRect, RECT_POINT eRP)
+{
+ switch(eRP) {
+ case RP_LT: return aRect.TopLeft();
+ case RP_MT: return aRect.TopCenter();
+ case RP_RT: return aRect.TopRight();
+ case RP_LM: return aRect.LeftCenter();
+ case RP_MM: return aRect.Center();
+ case RP_RM: return aRect.RightCenter();
+ case RP_LB: return aRect.BottomLeft();
+ case RP_MB: return aRect.BottomCenter();
+ case RP_RB: return aRect.BottomRight();
+ }
+ return Point(); // Sollte nicht vorkommen !
+}
+
+void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
+{
+ Rectangle aRect(GetMarkedObjRect());
+ if (GetPageViewCount()==1) {
+ GetPageViewPvNum(0)->LogicToPagePos(aRect);
+ }
+ long nOldRotateAngle=GetMarkedObjRotate();
+ long nOldShearAngle=GetMarkedObjShear();
+ const SdrMarkList& rMarkList=GetMarkList();
+ ULONG nMarkCount=rMarkList.GetMarkCount();
+ SdrObject* pObj=NULL;
+
+ RECT_POINT eSizePoint=RP_MM;
+ long nPosDX=0;
+ long nPosDY=0;
+ long nSizX=0;
+ long nSizY=0;
+ long nRotateAngle=0;
+ long nRotateX=0;
+ long nRotateY=0;
+ long nNewShearAngle=0;
+ long nShearAngle=0;
+ long nShearX=0;
+ long nShearY=0;
+ BOOL bShearVert=FALSE;
+
+ BOOL bChgPos=FALSE;
+ BOOL bChgSiz=FALSE;
+ BOOL bChgHgt=FALSE;
+ BOOL bRotate=FALSE;
+ BOOL bShear =FALSE;
+
+ BOOL bSetAttr=FALSE;
+ SfxItemSet aSetAttr(pMod->GetItemPool());
+
+ const SfxPoolItem* pPoolItem=NULL;
+
+ // Position
+ if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_X,TRUE,&pPoolItem)) {
+ nPosDX=((const SfxInt32Item*)pPoolItem)->GetValue()-aRect.Left();
+ bChgPos=TRUE;
+ }
+ if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_POS_Y,TRUE,&pPoolItem)){
+ nPosDY=((const SfxInt32Item*)pPoolItem)->GetValue()-aRect.Top();
+ bChgPos=TRUE;
+ }
+ // Groesse
+ if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_WIDTH,TRUE,&pPoolItem)) {
+ nSizX=((const SfxUInt32Item*)pPoolItem)->GetValue();
+ bChgSiz=TRUE;
+ }
+ if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,TRUE,&pPoolItem)) {
+ nSizY=((const SfxUInt32Item*)pPoolItem)->GetValue();
+ bChgSiz=TRUE;
+ bChgHgt=TRUE;
+ }
+ if (bChgSiz) {
+ eSizePoint=(RECT_POINT)((const SfxAllEnumItem&)rAttr.Get(SID_ATTR_TRANSFORM_SIZE_POINT)).GetValue();
+ }
+
+ // Rotation
+ if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_ANGLE,TRUE,&pPoolItem)) {
+ nRotateAngle=((const SfxInt32Item*)pPoolItem)->GetValue()-nOldRotateAngle;
+ bRotate=nRotateAngle!=0;
+ if (bRotate) {
+ nRotateX=((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_ROT_X)).GetValue();
+ nRotateY=((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_ROT_Y)).GetValue();
+ }
+ }
+
+ // Shear
+ if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,TRUE,&pPoolItem)) {
+ nNewShearAngle=((const SfxInt32Item*)pPoolItem)->GetValue();
+ if (nNewShearAngle>SDRMAXSHEAR) nNewShearAngle=SDRMAXSHEAR;
+ if (nNewShearAngle<-SDRMAXSHEAR) nNewShearAngle=-SDRMAXSHEAR;
+ if (nNewShearAngle!=nOldShearAngle) {
+ bShearVert=((const SfxBoolItem&)rAttr.Get(SID_ATTR_TRANSFORM_SHEAR_VERTICAL)).GetValue();
+ if (bShearVert) {
+ nShearAngle=nNewShearAngle;
+ } else {
+ if (nNewShearAngle!=0 && nOldShearAngle!=0) {
+ // Bugfix #25714#.
+ double nOld=tan((double)nOldShearAngle*nPi180);
+ double nNew=tan((double)nNewShearAngle*nPi180);
+ nNew-=nOld;
+ nNew=atan(nNew)/nPi180;
+ nShearAngle=Round(nNew);
+ } else {
+ nShearAngle=nNewShearAngle-nOldShearAngle;
+ }
+ }
+ bShear=nShearAngle!=0;
+ if (bShear) {
+ nShearX=((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_SHEAR_X)).GetValue();
+ nShearY=((const SfxInt32Item&)rAttr.Get(SID_ATTR_TRANSFORM_SHEAR_Y)).GetValue();
+ }
+ }
+ }
+
+ // AutoGrow
+ if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOWIDTH,TRUE,&pPoolItem)) {
+ BOOL bAutoGrow=((const SfxBoolItem*)pPoolItem)->GetValue();
+ aSetAttr.Put(SdrTextAutoGrowWidthItem(bAutoGrow));
+ bSetAttr=TRUE;
+ }
+
+ if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOHEIGHT,TRUE,&pPoolItem)) {
+ BOOL bAutoGrow=((const SfxBoolItem*)pPoolItem)->GetValue();
+ aSetAttr.Put(SdrTextAutoGrowHeightItem(bAutoGrow));
+ bSetAttr=TRUE;
+ }
+
+ // Eckenradius
+ if (SFX_ITEM_SET==rAttr.GetItemState(SDRATTR_ECKENRADIUS,TRUE,&pPoolItem)) {
+ long nRadius=((SdrEckenradiusItem*)pPoolItem)->GetValue();
+ aSetAttr.Put(SdrEckenradiusItem(nRadius));
+ bSetAttr=TRUE;
+ }
+
+ ForcePossibilities();
+
+ BegUndo(ImpGetResStr(STR_EditTransform),aMark.GetMarkDescription());
+
+ if (bSetAttr) {
+ SetAttrToMarked(aSetAttr,FALSE);
+ }
+
+ // Groesse und Hoehe aendern
+ if (bChgSiz && (bResizeFreeAllowed || bResizePropAllowed)) {
+ Fraction aWdt(nSizX,aRect.Right()-aRect.Left());
+ Fraction aHgt(nSizY,aRect.Bottom()-aRect.Top());
+ Point aRef(ImpGetPoint(aRect,eSizePoint));
+ if (GetPageViewCount()==1) {
+ GetPageViewPvNum(0)->PagePosToLogic(aRef);
+ }
+ ResizeMarkedObj(aRef,aWdt,aHgt);
+ }
+
+ // Rotieren
+ if (bRotate && (bRotateFreeAllowed || bRotate90Allowed)) {
+ Point aRef(nRotateX,nRotateY);
+ if (GetPageViewCount()==1) {
+ GetPageViewPvNum(0)->PagePosToLogic(aRef);
+ }
+ RotateMarkedObj(aRef,nRotateAngle);
+ }
+
+ // Shear
+ if (bShear && bShearAllowed) {
+ Point aRef(nShearX,nShearY);
+ if (GetPageViewCount()==1) {
+ GetPageViewPvNum(0)->PagePosToLogic(aRef);
+ }
+ ShearMarkedObj(aRef,nShearAngle,bShearVert);
+ long nTempAngle=GetMarkedObjShear();
+ if (nTempAngle!=0 && nTempAngle!=nNewShearAngle && !bShearVert) {
+ // noch eine 2. Iteration zur Kompensation der Rundungsfehler
+ double nOld=tan((double)nTempAngle*nPi180);
+ double nNew=tan((double)nNewShearAngle*nPi180);
+ nNew-=nOld;
+ nNew=atan(nNew)/nPi180;
+ nTempAngle=Round(nNew);
+ if (nTempAngle!=0) {
+ ShearMarkedObj(aRef,nTempAngle,bShearVert);
+ }
+ }
+ }
+
+ // Position aendern
+ if (bChgPos && bMoveAllowed) {
+ MoveMarkedObj(Size(nPosDX,nPosDY));
+ }
+
+ // Position geschuetzt
+ if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_POS,TRUE,&pPoolItem)) {
+ BOOL bProtPos=((const SfxBoolItem*)pPoolItem)->GetValue();
+ for (ULONG i=0; i<nMarkCount; i++) {
+ pObj=rMarkList.GetMark(i)->GetObj();
+ pObj->SetMoveProtect(bProtPos);
+ }
+ // BugFix 13897: hier muesste besser ein Broadcast her!
+ // Ausserdem fehlt Undo
+ // oder -> bProtPos/Size als Item (Interface)
+ bMoveProtect=bProtPos;
+ }
+
+ // Groesse geschuetzt
+ if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_SIZE,TRUE,&pPoolItem)) {
+ BOOL bProtSize=((const SfxBoolItem*)pPoolItem)->GetValue();
+ for (ULONG i=0; i<nMarkCount; i++) {
+ pObj=rMarkList.GetMark(i)->GetObj();
+ pObj->SetResizeProtect(bProtSize);
+ }
+ // BugFix 13897: hier muesste besser ein Broadcast her!
+ // Ausserdem fehlt Undo
+ // oder -> bProtPos/Size als Item (Interface)
+ bResizeProtect=bProtSize;
+ }
+ EndUndo();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrEditView::IsAlignPossible() const
+{ // Mindestens 2 markierte Objekte, davon mind. 1 beweglich
+ ForcePossibilities();
+ ULONG nAnz=aMark.GetMarkCount();
+ if (nAnz==0) return FALSE; // Nix markiert!
+ if (nAnz==1) return bMoveAllowed; // einzelnes Obj an der Seite ausrichten
+ return bOneOrMoreMovable; // ansonsten ist MarkCount>=2
+}
+
+void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, BOOL bBoundRects)
+{
+ if (eHor==SDRHALIGN_NONE && eVert==SDRVALIGN_NONE) return;
+ aMark.ForceSort();
+ if (aMark.GetMarkCount()<1) return;
+ XubString aStr(aMark.GetMarkDescription());
+ if (eHor==SDRHALIGN_NONE) {
+ switch (eVert) {
+ case SDRVALIGN_TOP : ImpTakeDescriptionStr(STR_EditAlignVTop ,aStr); break;
+ case SDRVALIGN_BOTTOM: ImpTakeDescriptionStr(STR_EditAlignVBottom,aStr); break;
+ case SDRVALIGN_CENTER: ImpTakeDescriptionStr(STR_EditAlignVCenter,aStr); break;
+ }
+ } else if (eVert==SDRVALIGN_NONE) {
+ switch (eHor) {
+ case SDRHALIGN_LEFT : ImpTakeDescriptionStr(STR_EditAlignHLeft ,aStr); break;
+ case SDRHALIGN_RIGHT : ImpTakeDescriptionStr(STR_EditAlignHRight ,aStr); break;
+ case SDRHALIGN_CENTER: ImpTakeDescriptionStr(STR_EditAlignHCenter,aStr); break;
+ }
+ } else if (eHor==SDRHALIGN_CENTER && eVert==SDRVALIGN_CENTER) {
+ ImpTakeDescriptionStr(STR_EditAlignCenter,aStr);
+ } else {
+ ImpTakeDescriptionStr(STR_EditAlign,aStr);
+ }
+ BegUndo(aStr);
+ Rectangle aBound;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ ULONG nm;
+ BOOL bHasFixed=FALSE;
+ for (nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrObjTransformInfoRec aInfo;
+ pObj->TakeObjInfo(aInfo);
+ if (!aInfo.bMoveAllowed || pObj->IsMoveProtect()) {
+ Point aOfs(pM->GetPageView()->GetOffset());
+ Rectangle aObjRect(bBoundRects?pObj->GetBoundRect():pObj->GetSnapRect());
+ aObjRect.Move(aOfs.X(),aOfs.Y());
+ aBound.Union(aObjRect);
+ bHasFixed=TRUE;
+ }
+ }
+ if (!bHasFixed) {
+ if (nMarkAnz==1) { // einzelnes Obj an der Seite ausrichten
+ const SdrObject* pObj=aMark.GetMark(0L)->GetObj();
+ const SdrPage* pPage=pObj->GetPage();
+ const SdrPageGridFrameList* pGFL=pPage->GetGridFrameList(aMark.GetMark(0L)->GetPageView(),&(pObj->GetSnapRect()));
+ const SdrPageGridFrame* pFrame=NULL;
+ if (pGFL!=NULL && pGFL->GetCount()!=0) { // Writer
+ pFrame=&((*pGFL)[0]);
+ }
+ if (pFrame!=NULL) { // Writer
+ aBound=pFrame->GetUserArea();
+ } else {
+ aBound=Rectangle(pPage->GetLftBorder(),pPage->GetUppBorder(),
+ pPage->GetWdt()-pPage->GetRgtBorder(),
+ pPage->GetHgt()-pPage->GetLwrBorder());
+ }
+ } else {
+ if (bBoundRects) aBound=GetMarkedObjBoundRect();
+ else aBound=GetMarkedObjRect();
+ }
+ }
+ Point aCenter(aBound.Center());
+ for (nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrObjTransformInfoRec aInfo;
+ pObj->TakeObjInfo(aInfo);
+ if (aInfo.bMoveAllowed && !pObj->IsMoveProtect()) {
+ SdrPageView* pPV=pM->GetPageView();
+ Point aOfs(pPV->GetOffset());
+ long nXMov=0;
+ long nYMov=0;
+ Rectangle aObjRect(bBoundRects?pObj->GetBoundRect():pObj->GetSnapRect());
+ switch (eVert) {
+ case SDRVALIGN_TOP : nYMov=aBound.Top() -aObjRect.Top() -aOfs.Y(); break;
+ case SDRVALIGN_BOTTOM: nYMov=aBound.Bottom()-aObjRect.Bottom() -aOfs.Y(); break;
+ case SDRVALIGN_CENTER: nYMov=aCenter.Y() -aObjRect.Center().Y()-aOfs.Y(); break;
+ }
+ switch (eHor) {
+ case SDRHALIGN_LEFT : nXMov=aBound.Left() -aObjRect.Left() -aOfs.X(); break;
+ case SDRHALIGN_RIGHT : nXMov=aBound.Right() -aObjRect.Right() -aOfs.X(); break;
+ case SDRHALIGN_CENTER: nXMov=aCenter.X() -aObjRect.Center().X()-aOfs.X(); break;
+ }
+ if (nXMov!=0 || nYMov!=0) {
+ AddUndo(new SdrUndoMoveObj(*pObj,Size(nXMov,nYMov)));
+ pObj->Move(Size(nXMov,nYMov));
+ }
+ }
+ }
+ EndUndo();
+}
+
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
new file mode 100644
index 0000000000..df6fc67716
--- /dev/null
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -0,0 +1,1721 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdedtv2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdedtv.hxx"
+#include "outliner.hxx"
+#include "svdundo.hxx"
+#include "svdogrp.hxx" // fuer's Gruppieren
+#include "svdovirt.hxx" // fuer VirtualObject-Bundling (Writer)
+#include "svdopath.hxx" // fuer CombineObjects
+#include "svdpage.hxx"
+#include "svdpagv.hxx"
+#include "svditer.hxx"
+#include "svdograf.hxx" // fuer Possibilities
+#include "svdoole2.hxx" // und Mtf-Import
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+#include "svdfmtf.hxx"
+#include "svdetc.hxx"
+
+#ifndef _BASEDLGS_HXX
+#include <sfx2/basedlgs.hxx>
+#endif
+
+#include "dstribut.hxx"
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _OUTLOBJ_HXX //autogen
+#include <outlobj.hxx>
+#endif
+
+#ifndef _EEITEM_HXX
+#include "eeitem.hxx"
+#endif
+
+#ifndef _POLY3D_HXX
+#include "poly3d.hxx"
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::ImpBundleVirtObjOfMarkList()
+{
+ // ... fehlende Implementation
+}
+
+SdrObject* SdrEditView::GetMaxToTopObj(SdrObject* pObj) const
+{
+ return NULL;
+}
+
+SdrObject* SdrEditView::GetMaxToBtmObj(SdrObject* pObj) const
+{
+ return NULL;
+}
+
+void SdrEditView::ObjOrderChanged(SdrObject* pObj, ULONG nOldPos, ULONG nNewPos)
+{
+}
+
+void SdrEditView::MovMarkedToTop()
+{
+ ULONG nAnz=aMark.GetMarkCount();
+ if (nAnz!=0) {
+ BegUndo(ImpGetResStr(STR_EditMovToTop),aMark.GetMarkDescription(),SDRREPFUNC_OBJ_MOVTOTOP);
+ aMark.ForceSort();
+ ULONG nm;
+ for (nm=0; nm<nAnz; nm++) { // Ordnums muessen alle stimmen!
+ aMark.GetMark(nm)->GetObj()->GetOrdNum();
+ }
+ BOOL bNeedBundle=FALSE;
+ BOOL bChg=FALSE;
+ SdrObjList* pOL0=NULL;
+ ULONG nNewPos=0;
+ for (nm=nAnz; nm>0;) {
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrObjList* pOL=pObj->GetObjList();
+ if (pOL!=pOL0) {
+ nNewPos=ULONG(pOL->GetObjCount()-1);
+ pOL0=pOL;
+ }
+ ULONG nNowPos=pObj->GetOrdNumDirect();
+ const Rectangle& rBR=pObj->GetBoundRect();
+ ULONG nCmpPos=nNowPos+1;
+ SdrObject* pMaxObj=GetMaxToTopObj(pObj);
+ if (pMaxObj!=NULL) {
+ ULONG nMaxPos=pMaxObj->GetOrdNum();
+ if (nMaxPos!=0) nMaxPos--;
+ if (nNewPos>nMaxPos) nNewPos=nMaxPos; // diesen nicht ueberholen.
+ if (nNewPos<nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ }
+ BOOL bEnd=FALSE;
+ while (nCmpPos<nNewPos && !bEnd) {
+ SdrObject* pCmpObj=pOL->GetObj(nCmpPos);
+ if (pCmpObj==NULL) {
+ DBG_ERROR("MovMarkedToTop(): Vergleichsobjekt nicht gefunden");
+ bEnd=TRUE;
+ } else if (pCmpObj==pMaxObj) {
+ nNewPos=nCmpPos;
+ nNewPos--;
+ bEnd=TRUE;
+ } else if (rBR.IsOver(pCmpObj->GetBoundRect())) {
+ nNewPos=nCmpPos;
+ bEnd=TRUE;
+ } else nCmpPos++;
+ }
+ if (nNowPos!=nNewPos) {
+ if (bBundleVirtObj) {
+ SdrVirtObj* pV0=PTR_CAST(SdrVirtObj,pObj);
+ if (pV0!=NULL) bNeedBundle=TRUE;
+ do { // nicht zwischen virtuelle Objekte draengeln
+ SdrObject* pV1Tmp=pOL->GetObj(nNewPos);
+ SdrObject* pV2Tmp=pOL->GetObj(nNewPos+1);
+ SdrVirtObj* pV1=PTR_CAST(SdrVirtObj,pV1Tmp);
+ SdrVirtObj* pV2=PTR_CAST(SdrVirtObj,pV2Tmp);
+ // Zwischen VirtObj mit gleichem Master wie ich darf ich schon
+ if (pV0!=NULL && pV1!=NULL && &pV0->GetReferencedObj()==&pV1->GetReferencedObj()) break;
+ // Zwischen andere nicht
+ if (pV1==NULL || pV2==NULL || &pV1->GetReferencedObj()!=&pV2->GetReferencedObj()) break;
+ nNewPos++;
+ } while (TRUE);
+ }
+ bChg=TRUE;
+ pOL->SetObjectOrdNum(nNowPos,nNewPos);
+ AddUndo(new SdrUndoObjOrdNum(*pObj,nNowPos,nNewPos));
+ ObjOrderChanged(pObj,nNowPos,nNewPos);
+ }
+ nNewPos--;
+ }
+ if (bNeedBundle) ImpBundleVirtObjOfMarkList();
+ EndUndo();
+ if (bChg) MarkListHasChanged();
+ }
+}
+
+void SdrEditView::MovMarkedToBtm()
+{
+ ULONG nAnz=aMark.GetMarkCount();
+ if (nAnz!=0) {
+ BegUndo(ImpGetResStr(STR_EditMovToBtm),aMark.GetMarkDescription(),SDRREPFUNC_OBJ_MOVTOBTM);
+ aMark.ForceSort();
+ ULONG nm;
+ for (nm=0; nm<nAnz; nm++) { // Ordnums muessen alle stimmen!
+ aMark.GetMark(nm)->GetObj()->GetOrdNum();
+ }
+ BOOL bNeedBundle=FALSE;
+ BOOL bChg=FALSE;
+ SdrObjList* pOL0=NULL;
+ ULONG nNewPos=0;
+ for (nm=0; nm<nAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrObjList* pOL=pObj->GetObjList();
+ if (pOL!=pOL0) {
+ nNewPos=0;
+ pOL0=pOL;
+ }
+ ULONG nNowPos=pObj->GetOrdNumDirect();
+ const Rectangle& rBR=pObj->GetBoundRect();
+ ULONG nCmpPos=nNowPos; if (nCmpPos>0) nCmpPos--;
+ SdrObject* pMaxObj=GetMaxToBtmObj(pObj);
+ if (pMaxObj!=NULL) {
+ ULONG nMinPos=pMaxObj->GetOrdNum()+1;
+ if (nNewPos<nMinPos) nNewPos=nMinPos; // diesen nicht ueberholen.
+ if (nNewPos>nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ }
+ BOOL bEnd=FALSE;
+ // nNewPos ist an dieser Stelle noch die maximale Position,
+ // an der das Obj hinruecken darf, ohne seinen Vorgaenger
+ // (Mehrfachselektion) zu ueberholen.
+ while (nCmpPos>nNewPos && !bEnd) {
+ SdrObject* pCmpObj=pOL->GetObj(nCmpPos);
+ if (pCmpObj==NULL) {
+ DBG_ERROR("MovMarkedToBtm(): Vergleichsobjekt nicht gefunden");
+ bEnd=TRUE;
+ } else if (pCmpObj==pMaxObj) {
+ nNewPos=nCmpPos;
+ nNewPos++;
+ bEnd=TRUE;
+ } else if (rBR.IsOver(pCmpObj->GetBoundRect())) {
+ nNewPos=nCmpPos;
+ bEnd=TRUE;
+ } else nCmpPos--;
+ }
+ if (nNowPos!=nNewPos) {
+ if (bBundleVirtObj) {
+ SdrVirtObj* pV0=PTR_CAST(SdrVirtObj,pObj);
+ if (pV0!=NULL) bNeedBundle=TRUE;
+ do { // nicht zwischen virtuelle Objekte draengeln
+ if (nNewPos==0) break;
+ SdrObject* pV1Tmp=pOL->GetObj(nNewPos);
+ SdrObject* pV2Tmp=pOL->GetObj(ULONG(nNewPos-1));
+ SdrVirtObj* pV1=PTR_CAST(SdrVirtObj,pV1Tmp);
+ SdrVirtObj* pV2=PTR_CAST(SdrVirtObj,pV2Tmp);
+ // Zwischen VirtObj mit gleichem Master wie ich darf ich schon
+ if (pV0!=NULL && pV1!=NULL && &pV0->GetReferencedObj()==&pV1->GetReferencedObj()) break;
+ // Zwischen andere nicht
+ if (pV1==NULL || pV2==NULL || &pV1->GetReferencedObj()!=&pV2->GetReferencedObj()) break;
+ nNewPos--;
+ } while (TRUE);
+ }
+ bChg=TRUE;
+ pOL->SetObjectOrdNum(nNowPos,nNewPos);
+ AddUndo(new SdrUndoObjOrdNum(*pObj,nNowPos,nNewPos));
+ ObjOrderChanged(pObj,nNowPos,nNewPos);
+ }
+ nNewPos++;
+ }
+ if (bNeedBundle) ImpBundleVirtObjOfMarkList();
+ EndUndo();
+ if (bChg) MarkListHasChanged();
+ }
+}
+
+void SdrEditView::PutMarkedToTop()
+{
+ PutMarkedInFrontOfObj(NULL);
+}
+
+void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
+{
+ ULONG nAnz=aMark.GetMarkCount();
+ if (nAnz!=0) {
+ BegUndo(ImpGetResStr(STR_EditPutToTop),aMark.GetMarkDescription(),SDRREPFUNC_OBJ_PUTTOTOP);
+ aMark.ForceSort();
+ if (pRefObj!=NULL) {
+ // Damit "Vor das Objekt" auch funktioniert wenn die
+ // markierten Objekte bereits vor dem Objekt stehen
+ ULONG nRefMark=aMark.FindObject(pRefObj);
+ SdrMark aRefMark;
+ if (nRefMark!=CONTAINER_ENTRY_NOTFOUND) {
+ aRefMark=*aMark.GetMark(nRefMark);
+ aMark.DeleteMark(nRefMark);
+ }
+ PutMarkedToBtm();
+ if (nRefMark!=CONTAINER_ENTRY_NOTFOUND) {
+ aMark.InsertEntry(aRefMark);
+ aMark.ForceSort();
+ }
+ }
+ ULONG nm;
+ for (nm=0; nm<nAnz; nm++) { // Ordnums muessen alle stimmen!
+ aMark.GetMark(nm)->GetObj()->GetOrdNum();
+ }
+ BOOL bNeedBundle=FALSE;
+ BOOL bChg=FALSE;
+ SdrObjList* pOL0=NULL;
+ ULONG nNewPos=0;
+ for (nm=nAnz; nm>0;) {
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ if (pObj!=pRefObj) {
+ SdrObjList* pOL=pObj->GetObjList();
+ if (pOL!=pOL0) {
+ nNewPos=ULONG(pOL->GetObjCount()-1);
+ pOL0=pOL;
+ }
+ ULONG nNowPos=pObj->GetOrdNumDirect();
+ SdrObject* pMaxObj=GetMaxToTopObj(pObj);
+ if (pMaxObj!=NULL) {
+ ULONG nMaxOrd=pMaxObj->GetOrdNum(); // geht leider nicht anders
+ if (nMaxOrd>0) nMaxOrd--;
+ if (nNewPos>nMaxOrd) nNewPos=nMaxOrd; // nicht ueberholen.
+ if (nNewPos<nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ }
+ if (pRefObj!=NULL) {
+ if (pRefObj->GetObjList()==pObj->GetObjList()) {
+ ULONG nMaxOrd=pRefObj->GetOrdNum(); // geht leider nicht anders
+ if (nNewPos>nMaxOrd) nNewPos=nMaxOrd; // nicht ueberholen.
+ if (nNewPos<nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ } else {
+ nNewPos=nNowPos; // andere PageView, also nicht veraendern
+ }
+ }
+ if (nNowPos!=nNewPos) {
+ if (bBundleVirtObj && HAS_BASE(SdrVirtObj,pObj)) bNeedBundle=TRUE;
+ bChg=TRUE;
+ pOL->SetObjectOrdNum(nNowPos,nNewPos);
+ AddUndo(new SdrUndoObjOrdNum(*pObj,nNowPos,nNewPos));
+ ObjOrderChanged(pObj,nNowPos,nNewPos);
+ }
+ nNewPos--;
+ } // if (pObj!=pRefObj)
+ } // for-Schleife ueber alle Markierten Objekte
+ if (bNeedBundle) ImpBundleVirtObjOfMarkList();
+ EndUndo();
+ if (bChg) MarkListHasChanged();
+ }
+}
+
+void SdrEditView::PutMarkedToBtm()
+{
+ PutMarkedBehindObj(NULL);
+}
+
+void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
+{
+ ULONG nAnz=aMark.GetMarkCount();
+ if (nAnz!=0) {
+ BegUndo(ImpGetResStr(STR_EditPutToBtm),aMark.GetMarkDescription(),SDRREPFUNC_OBJ_PUTTOBTM);
+ aMark.ForceSort();
+ if (pRefObj!=NULL) {
+ // Damit "Hinter das Objekt" auch funktioniert wenn die
+ // markierten Objekte bereits hinter dem Objekt stehen
+ ULONG nRefMark=aMark.FindObject(pRefObj);
+ SdrMark aRefMark;
+ if (nRefMark!=CONTAINER_ENTRY_NOTFOUND) {
+ aRefMark=*aMark.GetMark(nRefMark);
+ aMark.DeleteMark(nRefMark);
+ }
+ PutMarkedToTop();
+ if (nRefMark!=CONTAINER_ENTRY_NOTFOUND) {
+ aMark.InsertEntry(aRefMark);
+ aMark.ForceSort();
+ }
+ }
+ ULONG nm;
+ for (nm=0; nm<nAnz; nm++) { // Ordnums muessen alle stimmen!
+ aMark.GetMark(nm)->GetObj()->GetOrdNum();
+ }
+ BOOL bNeedBundle=FALSE;
+ BOOL bChg=FALSE;
+ SdrObjList* pOL0=NULL;
+ ULONG nNewPos=0;
+ for (nm=0; nm<nAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ if (pObj!=pRefObj) {
+ SdrObjList* pOL=pObj->GetObjList();
+ if (pOL!=pOL0) {
+ nNewPos=0;
+ pOL0=pOL;
+ }
+ ULONG nNowPos=pObj->GetOrdNumDirect();
+ SdrObject* pMinObj=GetMaxToBtmObj(pObj);
+ if (pMinObj!=NULL) {
+ ULONG nMinOrd=pMinObj->GetOrdNum()+1; // geht leider nicht anders
+ if (nNewPos<nMinOrd) nNewPos=nMinOrd; // nicht ueberholen.
+ if (nNewPos>nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ }
+ if (pRefObj!=NULL) {
+ if (pRefObj->GetObjList()==pObj->GetObjList()) {
+ ULONG nMinOrd=pRefObj->GetOrdNum(); // geht leider nicht anders
+ if (nNewPos<nMinOrd) nNewPos=nMinOrd; // nicht ueberholen.
+ if (nNewPos>nNowPos) nNewPos=nNowPos; // aber dabei auch nicht in die falsche Richtung schieben
+ } else {
+ nNewPos=nNowPos; // andere PageView, also nicht veraendern
+ }
+ }
+ if (nNowPos!=nNewPos) {
+ if (bBundleVirtObj && !bNeedBundle && HAS_BASE(SdrVirtObj,pObj)) bNeedBundle=TRUE;
+ bChg=TRUE;
+ pOL->SetObjectOrdNum(nNowPos,nNewPos);
+ AddUndo(new SdrUndoObjOrdNum(*pObj,nNowPos,nNewPos));
+ ObjOrderChanged(pObj,nNowPos,nNewPos);
+ }
+ nNewPos++;
+ } // if (pObj!=pRefObj)
+ } // for-Schleife ueber alle markierten Objekte
+ if (bNeedBundle) ImpBundleVirtObjOfMarkList();
+ EndUndo();
+ if (bChg) MarkListHasChanged();
+ }
+}
+
+void SdrEditView::ReverseOrderOfMarked()
+{
+ aMark.ForceSort();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ if (nMarkAnz>0) {
+ BOOL bNeedBundle=FALSE;
+ BOOL bChg=FALSE;
+ BegUndo(ImpGetResStr(STR_EditRevOrder),aMark.GetMarkDescription(),SDRREPFUNC_OBJ_REVORDER);
+ ULONG a=0;
+ do {
+ // Markierung ueber mehrere PageViews berueksichtigen
+ ULONG b=a+1;
+ while (b<nMarkAnz && aMark.GetMark(b)->GetPageView()==aMark.GetMark(a)->GetPageView()) b++;
+ b--;
+ SdrObjList* pOL=aMark.GetMark(a)->GetPageView()->GetObjList();
+ ULONG c=b;
+ if (a<c) { // Sicherstellen, dass die OrdNums nicht Dirty sind
+ aMark.GetMark(a)->GetObj()->GetOrdNum();
+ }
+ while (a<c) {
+ SdrObject* pObj1=aMark.GetMark(a)->GetObj();
+ SdrObject* pObj2=aMark.GetMark(c)->GetObj();
+ ULONG nOrd1=pObj1->GetOrdNumDirect();
+ ULONG nOrd2=pObj2->GetOrdNumDirect();
+ AddUndo(new SdrUndoObjOrdNum(*pObj1,nOrd1,nOrd2));
+ AddUndo(new SdrUndoObjOrdNum(*pObj2,nOrd2-1,nOrd1));
+ pOL->SetObjectOrdNum(nOrd1,nOrd2);
+ // Obj 2 ist um eine Position nach vorn gerutscht, deshalb nun nOrd2-1
+ pOL->SetObjectOrdNum(nOrd2-1,nOrd1);
+ // Verwendung von Replace statt SetOrdNum wg. Performance (Neuberechnung der Ordnums)
+ a++; c--;
+ bChg=TRUE;
+ if (bBundleVirtObj && !bNeedBundle &&
+ (HAS_BASE(SdrVirtObj,pObj1) || HAS_BASE(SdrVirtObj,pObj2))) bNeedBundle=TRUE;
+ }
+ a=b+1;
+ } while (a<nMarkAnz);
+ if (bNeedBundle) ImpBundleVirtObjOfMarkList();
+ EndUndo();
+ if (bChg) MarkListHasChanged();
+ }
+}
+
+void SdrEditView::ImpCheckToTopBtmPossible()
+{
+ ULONG nAnz=aMark.GetMarkCount();
+ if (nAnz==0) return;
+ if (nAnz==1) { // Sonderbehandlung fuer Einzelmarkierung
+ SdrObject* pObj=aMark.GetMark(0)->GetObj();
+ SdrObjList* pOL=pObj->GetObjList();
+ ULONG nMax=pOL->GetObjCount();
+ ULONG nMin=0;
+ ULONG nObjNum=pObj->GetOrdNum();
+ SdrObject* pRestrict=GetMaxToTopObj(pObj);
+ if (pRestrict!=NULL) {
+ ULONG nRestrict=pRestrict->GetOrdNum();
+ if (nRestrict<nMax) nMax=nRestrict;
+ }
+ pRestrict=GetMaxToBtmObj(pObj);
+ if (pRestrict!=NULL) {
+ ULONG nRestrict=pRestrict->GetOrdNum();
+ if (nRestrict>nMin) nMin=nRestrict;
+ }
+ bToTopPossible=nObjNum<ULONG(nMax-1);
+ bToBtmPossible=nObjNum>nMin;
+ } else { // Mehrfachselektion
+ ULONG nm=0;
+ SdrObjList* pOL0=NULL;
+ long nPos0=-1;
+ while (!bToBtmPossible && nm<nAnz) { // 'nach hinten' checken
+ SdrObject* pObj=aMark.GetMark(nm)->GetObj();
+ SdrObjList* pOL=pObj->GetObjList();
+ if (pOL!=pOL0) {
+ nPos0=-1;
+ pOL0=pOL;
+ }
+ ULONG nPos=pObj->GetOrdNum();
+ bToBtmPossible=nPos>ULONG(nPos0+1);
+ nPos0=long(nPos);
+ nm++;
+ }
+ nm=nAnz;
+ pOL0=NULL;
+ nPos0=0x7FFFFFFF;
+ while (!bToTopPossible && nm>0) { // 'nach vorn' checken
+ nm--;
+ SdrObject* pObj=aMark.GetMark(nm)->GetObj();
+ SdrObjList* pOL=pObj->GetObjList();
+ if (pOL!=pOL0) {
+ nPos0=pOL->GetObjCount();
+ pOL0=pOL;
+ }
+ ULONG nPos=pObj->GetOrdNum();
+ bToTopPossible=nPos+1<ULONG(nPos0);
+ nPos0=nPos;
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@ @@ @@ @@@@@ @@ @@ @@ @@@@@
+// @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@@ @@ @@
+// @@ @@ @@ @@@@@@@ @@ @@ @@ @@@@@@ @@
+// @@ @@ @@ @@@@@@@ @@@@@ @@ @@@@@@ @@@@
+// @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@@@ @@ @@ @@@@@ @@ @@ @@ @@@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest) const
+{
+ if (pSource!=NULL) {
+ SdrObjList* pOL=pSource->GetSubList();
+ if (pOL!=NULL && !pSource->Is3DObj()) { // erstes Nichtgruppenobjekt aus der Gruppe holen
+ SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
+ pSource=aIter.Next();
+ }
+ }
+ if (pSource!=NULL && pDest!=NULL) {
+ SfxItemSet aSet(pMod->GetItemPool(),
+ SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,
+ SDRATTR_NOTPERSIST_LAST+1, SDRATTR_END,
+ EE_ITEMS_START,EE_ITEMS_END,
+ 0,0); // #52757#, #52762#
+ pSource->TakeAttributes(aSet,FALSE,FALSE);
+ pDest->NbcSetAttributes(aSet,TRUE);
+ pDest->NbcSetLayer(pSource->GetLayer());
+ pDest->NbcSetStyleSheet(pSource->GetStyleSheet(),TRUE);
+ }
+}
+
+BOOL SdrEditView::ImpCanConvertForCombine1(const SdrObject* pObj) const
+{
+ // #69711 : new condition IsLine() to be able to combine simple Lines
+ BOOL bIsLine = FALSE;
+ const SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
+ if (pPath!=NULL)
+ bIsLine = pPath->IsLine();
+
+ SdrObjTransformInfoRec aInfo;
+ pObj->TakeObjInfo(aInfo);
+ return ( aInfo.bCanConvToPath || aInfo.bCanConvToPoly || bIsLine );
+}
+
+BOOL SdrEditView::ImpCanConvertForCombine(const SdrObject* pObj) const
+{
+ SdrObjList* pOL=pObj->GetSubList();
+ if (pOL!=NULL && !pObj->Is3DObj()) {
+ SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
+ while (aIter.IsMore()) {
+ SdrObject* pObj1=aIter.Next();
+ // Es muessen alle Member einer Gruppe konvertierbar sein
+ if (!ImpCanConvertForCombine1(pObj1)) return FALSE;
+ }
+ } else {
+ if (!ImpCanConvertForCombine1(pObj)) return FALSE;
+ }
+ return TRUE;
+}
+
+XPolyPolygon SdrEditView::ImpGetXPolyPoly1(const SdrObject* pObj, BOOL bCombine) const
+{
+ XPolyPolygon aRet;
+ SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
+ if (bCombine && pPath!=NULL && pObj->GetOutlinerParaObject()==NULL) {
+ aRet=pPath->GetPathPoly();
+ } else {
+ SdrObject* pConvObj=pObj->ConvertToPolyObj(bCombine, FALSE);
+ if (pConvObj!=NULL) {
+ SdrObjList* pOL=pConvObj->GetSubList();
+ if (pOL!=NULL) {
+ SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
+ while (aIter.IsMore() && !bCombineError) {
+ SdrObject* pObj1=aIter.Next();
+ pPath=PTR_CAST(SdrPathObj,pObj1);
+ if (pPath!=NULL) {
+ if ((ULONG)aRet.Count()+(ULONG)pPath->GetPathPoly().Count()<=0xFFFF) {
+ aRet.Insert(pPath->GetPathPoly());
+ } else {
+ ((SdrEditView*)this)->bCombineError=TRUE;
+ }
+ }
+ }
+ } else {
+ pPath=PTR_CAST(SdrPathObj,pConvObj);
+ if (pPath!=NULL) {
+ aRet=pPath->GetPathPoly();
+ }
+ }
+ delete pConvObj;
+ }
+ }
+ return aRet;
+}
+
+XPolyPolygon SdrEditView::ImpGetXPolyPoly(const SdrObject* pObj, BOOL bCombine) const
+{
+ XPolyPolygon aRet;
+ SdrObjList* pOL=pObj->GetSubList();
+ if (pOL!=NULL && !pObj->Is3DObj()) {
+ SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
+ while (aIter.IsMore() && !bCombineError) {
+ SdrObject* pObj1=aIter.Next();
+ XPolyPolygon aXPP(ImpGetXPolyPoly1(pObj1, bCombine));
+ if ((ULONG)aRet.Count()+(ULONG)aXPP.Count()<=0xFFFF) {
+ aRet.Insert(aXPP);
+ } else {
+ ((SdrEditView*)this)->bCombineError=TRUE;
+ }
+ }
+ } else {
+ aRet=ImpGetXPolyPoly1(pObj, bCombine);
+ }
+ return aRet;
+}
+
+void SdrEditView::ImpCombineToSinglePoly(XPolyPolygon& rXPP, long nJoinTol) const
+{
+ USHORT nPolyCount=rXPP.Count();
+ if (nPolyCount>=2) {
+ XPolygon aXP(rXPP[0]);
+ if (aXP.GetPointCount()!=0) {
+ aXP.SetFlags(0,XPOLY_NORMAL);
+ aXP.SetFlags(USHORT(aXP.GetPointCount()-1),XPOLY_NORMAL);
+ }
+ for (USHORT i=1; i<nPolyCount && !bCombineError; i++) {
+ USHORT nDstPointCount=aXP.GetPointCount();
+ const XPolygon rSrcPoly=rXPP[i];
+ USHORT nSrcPointCount=rSrcPoly.GetPointCount();
+ if ((ULONG)nSrcPointCount+(ULONG)nDstPointCount>XPOLY_MAXPOINTS) {
+ ((SdrEditView*)this)->bCombineError=TRUE;
+ } else {
+ if (nDstPointCount==0 || nSrcPointCount==0) {
+ aXP.Insert(nDstPointCount,rSrcPoly);
+ } else {
+ Point aDstPt0(aXP[0]);
+ Point aDstPt1(aXP[USHORT(nDstPointCount-1)]);
+ Point aSrcPt0(rSrcPoly[0]);
+ Point aSrcPt1(rSrcPoly[USHORT(nSrcPointCount-1)]);
+ long n00=Abs(aSrcPt0.X()-aDstPt0.X())+Abs(aSrcPt0.Y()-aDstPt0.Y());
+ long n10=Abs(aSrcPt1.X()-aDstPt0.X())+Abs(aSrcPt1.Y()-aDstPt0.Y());
+ long n01=Abs(aSrcPt0.X()-aDstPt1.X())+Abs(aSrcPt0.Y()-aDstPt1.Y());
+ long n11=Abs(aSrcPt1.X()-aDstPt1.X())+Abs(aSrcPt1.Y()-aDstPt1.Y());
+ BOOL bAppend=(n01<=n00 && n01<=n10) || (n11<=n00 && n11<=n10);
+ BOOL bRevers=bAppend ? n11<n01 : n00<n10;
+ USHORT nDstPos=bAppend ? nDstPointCount : 0;
+ BOOL b1st=TRUE;
+ if (bRevers) {
+ for (USHORT nSrcPos=nSrcPointCount; nSrcPos>0;) {
+ nSrcPos--;
+ BOOL bNoIns=FALSE;
+ if (b1st) bNoIns=(bAppend ? n11 : n00) <=nJoinTol;
+ if (!bNoIns) {
+ aXP.Insert(nDstPos,rSrcPoly[nSrcPos],rSrcPoly.GetFlags(nSrcPos));
+ if (bAppend) nDstPos++;
+ }
+ b1st=FALSE;
+ }
+ } else {
+ for (USHORT nSrcPos=0; nSrcPos<nSrcPointCount; nSrcPos++) {
+ BOOL bNoIns=FALSE;
+ if (b1st) bNoIns=(bAppend ? n01 : n10) <=nJoinTol;
+ if (!bNoIns) {
+ aXP.Insert(nDstPos,rSrcPoly[nSrcPos],rSrcPoly.GetFlags(nSrcPos));
+ if (bAppend) nDstPos++;
+ }
+ b1st=FALSE;
+ }
+ }
+ }
+ if (aXP.GetPointCount()!=0) {
+ aXP.SetFlags(0,XPOLY_NORMAL);
+ aXP.SetFlags(USHORT(aXP.GetPointCount()-1),XPOLY_NORMAL);
+ }
+ }
+ }
+ if (!bCombineError) {
+ rXPP.Clear();
+ rXPP.Insert(aXP,0);
+ }
+ }
+}
+
+// for distribution dialog function
+struct ImpDistributeEntry
+{
+ SdrObject* mpObj;
+ INT32 mnPos;
+ INT32 mnLength;
+};
+
+DECLARE_LIST(ImpDistributeEntryList, ImpDistributeEntry*);
+
+void SdrEditView::DistributeMarkedObjects()
+{
+#ifndef SVX_LIGHT
+
+ UINT32 nMark(aMark.GetMarkCount());
+
+ if(nMark > 2)
+ {
+ SfxItemSet aNewAttr(pMod->GetItemPool());
+ SvxDistributeDialog* pDlg = new SvxDistributeDialog(NULL, aNewAttr);
+ UINT16 nResult = pDlg->Execute();
+
+ if(nResult == RET_OK)
+ {
+ SvxDistributeHorizontal eHor = pDlg->GetDistributeHor();
+ SvxDistributeVertical eVer = pDlg->GetDistributeVer();
+ ImpDistributeEntryList aEntryList;
+ UINT32 a, nInsPos, nFullLength;
+
+ BegUndo();
+
+ if(eHor != SvxDistributeHorizontalNone)
+ {
+ // build sorted entry list
+ nFullLength = 0L;
+
+ for(a=0;a<nMark;a++)
+ {
+ SdrMark* pMark = aMark.GetMark(a);
+ ImpDistributeEntry* pNew = new ImpDistributeEntry;
+
+ pNew->mpObj = pMark->GetObj();
+ nInsPos = 0;
+
+ switch(eHor)
+ {
+ case SvxDistributeHorizontalLeft:
+ {
+ pNew->mnPos = pNew->mpObj->GetSnapRect().Left();
+ break;
+ }
+ case SvxDistributeHorizontalCenter:
+ {
+ pNew->mnPos = (pNew->mpObj->GetSnapRect().Right() + pNew->mpObj->GetSnapRect().Left()) / 2;
+ break;
+ }
+ case SvxDistributeHorizontalDistance:
+ {
+ pNew->mnLength = pNew->mpObj->GetSnapRect().GetWidth() + 1;
+ nFullLength += pNew->mnLength;
+ pNew->mnPos = (pNew->mpObj->GetSnapRect().Right() + pNew->mpObj->GetSnapRect().Left()) / 2;
+ break;
+ }
+ case SvxDistributeHorizontalRight:
+ {
+ pNew->mnPos = pNew->mpObj->GetSnapRect().Right();
+ break;
+ }
+ }
+
+ while(nInsPos < aEntryList.Count() && aEntryList.GetObject(nInsPos)->mnPos < pNew->mnPos)
+ nInsPos++;
+
+ aEntryList.Insert(pNew, nInsPos);
+ }
+
+ if(eHor == SvxDistributeHorizontalDistance)
+ {
+ // calc room in-between
+ INT32 nWidth = GetAllMarkedBoundRect().GetWidth() + 1;
+ double fStepWidth = ((double)nWidth - (double)nFullLength) / (double)(aEntryList.Count() - 1);
+ double fStepStart = (double)aEntryList.GetObject(0)->mnPos;
+ fStepStart += fStepWidth + (double)((aEntryList.GetObject(0)->mnLength + aEntryList.GetObject(1)->mnLength) / 2);
+
+ // move entries 1..n-1
+ for(a=1;a<aEntryList.Count()-1;a++)
+ {
+ ImpDistributeEntry* pCurr = aEntryList.GetObject(a);
+ ImpDistributeEntry* pNext = aEntryList.GetObject(a+1);
+ INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos;
+ AddUndo(new SdrUndoGeoObj(*pCurr->mpObj));
+ pCurr->mpObj->Move(Size(nDelta, 0));
+ fStepStart += fStepWidth + (double)((pCurr->mnLength + pNext->mnLength) / 2);
+ }
+ }
+ else
+ {
+ // calc distances
+ INT32 nWidth = aEntryList.GetObject(aEntryList.Count() - 1)->mnPos - aEntryList.GetObject(0)->mnPos;
+ double fStepWidth = (double)nWidth / (double)(aEntryList.Count() - 1);
+ double fStepStart = (double)aEntryList.GetObject(0)->mnPos;
+ fStepStart += fStepWidth;
+
+ // move entries 1..n-1
+ for(a=1;a<aEntryList.Count()-1;a++)
+ {
+ ImpDistributeEntry* pCurr = aEntryList.GetObject(a);
+ INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos;
+ AddUndo(new SdrUndoGeoObj(*pCurr->mpObj));
+ pCurr->mpObj->Move(Size(nDelta, 0));
+ fStepStart += fStepWidth;
+ }
+ }
+
+ // clear list
+ while(aEntryList.Count())
+ delete aEntryList.Remove((UINT32)0L);
+ }
+
+ if(eVer != SvxDistributeVerticalNone)
+ {
+ // build sorted entry list
+ nFullLength = 0L;
+
+ for(a=0;a<nMark;a++)
+ {
+ SdrMark* pMark = aMark.GetMark(a);
+ ImpDistributeEntry* pNew = new ImpDistributeEntry;
+
+ pNew->mpObj = pMark->GetObj();
+ nInsPos = 0;
+
+ switch(eVer)
+ {
+ case SvxDistributeVerticalTop:
+ {
+ pNew->mnPos = pNew->mpObj->GetSnapRect().Top();
+ break;
+ }
+ case SvxDistributeVerticalCenter:
+ {
+ pNew->mnPos = (pNew->mpObj->GetSnapRect().Bottom() + pNew->mpObj->GetSnapRect().Top()) / 2;
+ break;
+ }
+ case SvxDistributeVerticalDistance:
+ {
+ pNew->mnLength = pNew->mpObj->GetSnapRect().GetHeight() + 1;
+ nFullLength += pNew->mnLength;
+ pNew->mnPos = (pNew->mpObj->GetSnapRect().Bottom() + pNew->mpObj->GetSnapRect().Top()) / 2;
+ break;
+ }
+ case SvxDistributeVerticalBottom:
+ {
+ pNew->mnPos = pNew->mpObj->GetSnapRect().Bottom();
+ break;
+ }
+ }
+
+ while(nInsPos < aEntryList.Count() && aEntryList.GetObject(nInsPos)->mnPos < pNew->mnPos)
+ nInsPos++;
+
+ aEntryList.Insert(pNew, nInsPos);
+ }
+
+ if(eVer == SvxDistributeVerticalDistance)
+ {
+ // calc room in-between
+ INT32 nHeight = GetAllMarkedBoundRect().GetHeight() + 1;
+ double fStepWidth = ((double)nHeight - (double)nFullLength) / (double)(aEntryList.Count() - 1);
+ double fStepStart = (double)aEntryList.GetObject(0)->mnPos;
+ fStepStart += fStepWidth + (double)((aEntryList.GetObject(0)->mnLength + aEntryList.GetObject(1)->mnLength) / 2);
+
+ // move entries 1..n-1
+ for(a=1;a<aEntryList.Count()-1;a++)
+ {
+ ImpDistributeEntry* pCurr = aEntryList.GetObject(a);
+ ImpDistributeEntry* pNext = aEntryList.GetObject(a+1);
+ INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos;
+ AddUndo(new SdrUndoGeoObj(*pCurr->mpObj));
+ pCurr->mpObj->Move(Size(0, nDelta));
+ fStepStart += fStepWidth + (double)((pCurr->mnLength + pNext->mnLength) / 2);
+ }
+ }
+ else
+ {
+ // calc distances
+ INT32 nHeight = aEntryList.GetObject(aEntryList.Count() - 1)->mnPos - aEntryList.GetObject(0)->mnPos;
+ double fStepWidth = (double)nHeight / (double)(aEntryList.Count() - 1);
+ double fStepStart = (double)aEntryList.GetObject(0)->mnPos;
+ fStepStart += fStepWidth;
+
+ // move entries 1..n-1
+ for(a=1;a<aEntryList.Count()-1;a++)
+ {
+ ImpDistributeEntry* pCurr = aEntryList.GetObject(a);
+ INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos;
+ AddUndo(new SdrUndoGeoObj(*pCurr->mpObj));
+ pCurr->mpObj->Move(Size(0, nDelta));
+ fStepStart += fStepWidth;
+ }
+ }
+
+ // clear list
+ while(aEntryList.Count())
+ delete aEntryList.Remove((UINT32)0L);
+ }
+
+ // UNDO-Comment and end of UNDO
+ SetUndoComment(ImpGetResStr(STR_DistributeMarkedObjects));
+ EndUndo();
+ }
+
+ delete(pDlg);
+ }
+#endif
+}
+
+void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
+{
+ SdrMarkList aRemove;
+ aMark.ForceSort();
+ BegUndo();
+
+ UINT32 nInsPos=0xFFFFFFFF;
+ UINT32 nAnz=aMark.GetMarkCount();
+ const SdrObject* pAttrObj = NULL;
+ PolyPolygon3D aMergePolyPolygonA;
+ PolyPolygon3D aMergePolyPolygonB;
+ SdrObjList* pInsOL = NULL;
+ SdrPageView* pInsPV = NULL;
+ BOOL bFirstObjectComplete(FALSE);
+
+ // make sure selected objects are contour objects
+ ConvertMarkedToPolyObj(TRUE);
+
+ for(UINT32 a=0;a<aMark.GetMarkCount();a++)
+ {
+ SdrMark* pM = aMark.GetMark(a);
+ SdrObject* pObj = pM->GetObj();
+
+ if(ImpCanConvertForCombine(pObj))
+ {
+ if(!pAttrObj)
+ pAttrObj = pObj;
+
+ nInsPos = pObj->GetOrdNum() + 1;
+ pInsPV = pM->GetPageView();
+ pInsOL = pObj->GetObjList();
+
+ // get the polygons; do NOT use ImpGetXPolyPoly here - it does fetch all
+ // the polygons, but they are all put in one single XPolyPolygon so that
+ // no SetDirections() on single objects can be made. This would lead to
+ // wrong results.
+ SdrObjList* pObjectList = pObj->GetSubList();
+ Vector3D aCommonNormal(0.0, 0.0, 1.0);
+
+ if(pObjectList)
+ {
+ SdrObjListIter aIter(*pObjectList, IM_DEEPWITHGROUPS);
+
+ while(aIter.IsMore())
+ {
+ SdrObject* pCandidate = aIter.Next();
+ SdrPathObj* pPathObj = PTR_CAST(SdrPathObj, pCandidate);
+ if(pPathObj)
+ {
+ PolyPolygon3D aTmpPoly3D(pPathObj->GetPathPoly());
+ aTmpPoly3D.SetDirections(aCommonNormal);
+
+ if(!bFirstObjectComplete)
+ aMergePolyPolygonA.Insert(aTmpPoly3D);
+ else
+ aMergePolyPolygonB.Insert(aTmpPoly3D);
+ }
+ }
+ }
+ else
+ {
+ SdrPathObj* pPathObj = PTR_CAST(SdrPathObj, pObj);
+ if(pPathObj)
+ {
+ PolyPolygon3D aTmpPoly3D(pPathObj->GetPathPoly());
+ aTmpPoly3D.SetDirections(aCommonNormal);
+
+ if(!bFirstObjectComplete)
+ aMergePolyPolygonA.Insert(aTmpPoly3D);
+ else
+ aMergePolyPolygonB.Insert(aTmpPoly3D);
+ }
+ }
+
+ // was there something added to the first poly?
+ if(!bFirstObjectComplete && aMergePolyPolygonA.Count())
+ bFirstObjectComplete = TRUE;
+
+ // move object to temporary delete list
+ aRemove.InsertEntry(SdrMark(pObj, pM->GetPageView()));
+ }
+ }
+
+ switch(eMode)
+ {
+ case SDR_MERGE_MERGE:
+ {
+ // simple merge all contained parts (OR)
+ aMergePolyPolygonA.Insert(aMergePolyPolygonB);
+ aMergePolyPolygonA.Merge(FALSE);
+
+ break;
+ }
+ case SDR_MERGE_SUBSTRACT:
+ {
+ // take selected poly 2..n (is in Polygon B), merge them, flipdirections
+ // and merge with poly 1
+ aMergePolyPolygonA.Merge(FALSE);
+ aMergePolyPolygonB.Merge(FALSE);
+ aMergePolyPolygonB.FlipDirections();
+ aMergePolyPolygonA.Insert(aMergePolyPolygonB);
+ aMergePolyPolygonA.Merge(FALSE);
+
+ break;
+ }
+ case SDR_MERGE_INTERSECT:
+ {
+ // cut poly 1 against polys 2..n (AND)
+ aMergePolyPolygonA.Merge(FALSE);
+ aMergePolyPolygonB.Merge(FALSE);
+ aMergePolyPolygonA.Insert(aMergePolyPolygonB);
+ aMergePolyPolygonA.Merge(FALSE, TRUE);
+
+ break;
+ }
+ }
+
+ XPolyPolygon aXPP = aMergePolyPolygonA.GetXPolyPolygon();
+ SdrPathObj* pPath = new SdrPathObj(OBJ_PATHFILL, aXPP);
+ ImpCopyAttributes(pAttrObj, pPath);
+ SdrInsertReason aReason(SDRREASON_VIEWCALL, pAttrObj);
+ pInsOL->InsertObject(pPath, nInsPos, &aReason);
+ AddUndo(new SdrUndoNewObj(*pPath));
+ MarkObj(pPath, pInsPV, FALSE, TRUE);
+
+ aRemove.ForceSort();
+ switch(eMode)
+ {
+ case SDR_MERGE_MERGE:
+ {
+ SetUndoComment(
+ ImpGetResStr(STR_EditMergeMergePoly),
+ aRemove.GetMarkDescription());
+ break;
+ }
+ case SDR_MERGE_SUBSTRACT:
+ {
+ SetUndoComment(
+ ImpGetResStr(STR_EditMergeSubstractPoly),
+ aRemove.GetMarkDescription());
+ break;
+ }
+ case SDR_MERGE_INTERSECT:
+ {
+ SetUndoComment(
+ ImpGetResStr(STR_EditMergeIntersectPoly),
+ aRemove.GetMarkDescription());
+ break;
+ }
+ }
+ DeleteMarked(aRemove);
+
+ EndUndo();
+}
+
+BOOL SdrEditView::CombineMarkedObjects(BOOL bNoPolyPoly)
+{
+ bCombineError = FALSE;
+ XPolyPolygon aXPP;
+ SdrObjList* pAktOL = NULL;
+ // Temporaere Marklist
+ SdrMarkList aRemoveMerker;
+
+ aMark.ForceSort();
+ // Der Comment wird spaeter zusammengebaut
+ BegUndo(String(), String(),
+ bNoPolyPoly ? SDRREPFUNC_OBJ_COMBINE_ONEPOLY : SDRREPFUNC_OBJ_COMBINE_POLYPOLY);
+
+ ULONG nInsPos=0xFFFFFFFF;
+ SdrObjList* pInsOL=NULL;
+ SdrPageView* pInsPV=NULL;
+ ULONG nAktPointCount=0; // Gesamtpunkteanzahl aller Teilpolygone des PolyPolygons
+ ULONG nm;
+ ULONG nAnz=aMark.GetMarkCount();
+ const SdrObject* pAttrObj=NULL;
+ for (nm=nAnz; nm>0 && !bCombineError;) {
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrObjList* pThisOL=pObj->GetObjList();
+ if (pAktOL!=pThisOL) {
+ pAktOL=pThisOL;
+ }
+ if (ImpCanConvertForCombine(pObj)) {
+ pAttrObj=pObj; // Obj merken fuer Attribute kopieren
+ XPolyPolygon aTmpXPP(ImpGetXPolyPoly(pObj, TRUE));
+ ULONG nAktPolyCount=aXPP.Count();
+ ULONG nTmpPolyCount=aTmpXPP.Count();
+ ULONG nTmpPointCount=0;
+ for (ULONG nTmpPolyNum=0; nTmpPolyNum<nTmpPolyCount; nTmpPolyNum++) {
+ nTmpPointCount+=aTmpXPP[(USHORT)nTmpPolyNum].GetPointCount();
+ }
+ if (nAktPolyCount+nTmpPolyCount<=0xFFFF && nAktPointCount+nTmpPointCount<=XPOLY_MAXPOINTS) {
+ aXPP.Insert(aTmpXPP,0);
+ nAktPointCount+=nTmpPointCount;
+ } else {
+ bCombineError=TRUE;
+ }
+ if (pInsOL==NULL) {
+ nInsPos=pObj->GetOrdNum()+1;
+ pInsPV=pM->GetPageView();
+ pInsOL=pObj->GetObjList();
+ }
+ aRemoveMerker.InsertEntry(SdrMark(pObj,pM->GetPageView()));
+ }
+ }
+ long nJoinTol=10;
+ if (bNoPolyPoly && !bCombineError) ImpCombineToSinglePoly(aXPP,nJoinTol);
+ USHORT nPolyCount=aXPP.Count();
+ if (nPolyCount!=0 && !bCombineError) {
+ SdrObjKind eKind=OBJ_PATHFILL;
+ if (nPolyCount>1) {
+ // Polygone ggf. schliessen (Polylines,...)
+ for (USHORT i=0; i<nPolyCount; i++) {
+ const XPolygon& rXP=aXPP.GetObject(i);
+ USHORT nPointCount=rXP.GetPointCount();
+ USHORT nMaxPoint=USHORT(nPointCount-1);
+ if (nPointCount>0 && rXP[0]!=rXP[nMaxPoint]) { // nicht geschlossen?
+ // XPolygon um einen Punkt erweitern (zum schliessen)
+ aXPP[i][nPointCount]=aXPP[i][0];
+ }
+ }
+ } else { // auf Polyline Checken
+ const XPolygon& rXP=aXPP.GetObject(0);
+ USHORT nPointCount=rXP.GetPointCount();
+ USHORT nMaxPoint=USHORT(nPointCount-1);
+ if (nPointCount<=2) eKind=OBJ_PATHLINE;
+ else {
+ const Point& rPt0=rXP[0];
+ const Point& rPt1=rXP[nMaxPoint];
+ if (rPt0!=rPt1) { // nicht geschlossen?
+ long nDist=Abs(rPt0.X()-rPt1.X())+Abs(rPt0.Y()-rPt1.Y());
+ if (nDist<=nJoinTol) {
+ long x=(rPt0.X()+rPt1.X()+1)/2;
+ long y=(rPt0.Y()+rPt1.Y()+1)/2;
+ Point aMitte(x,y);
+ aXPP[0][0]=aMitte;
+ aXPP[0][nMaxPoint]=aMitte;
+ } else {
+ eKind=OBJ_PATHLINE;
+ }
+ }
+ }
+ }
+
+ SdrPathObj* pPath=new SdrPathObj(eKind,aXPP);
+ // Attribute des untersten Objekts
+ ImpCopyAttributes(pAttrObj,pPath);
+ SdrInsertReason aReason(SDRREASON_VIEWCALL,pAttrObj);
+ pInsOL->InsertObject(pPath,nInsPos,&aReason);
+ AddUndo(new SdrUndoNewObj(*pPath)); // Insert durch New ersetzt - Joe, 31-08-1995
+ MarkObj(pPath,pInsPV,FALSE,TRUE);
+ }
+ if (!bCombineError) {
+ // UndoComment aus den tatsaechlich verwendeten Objekten zusammenbauen
+ aRemoveMerker.ForceSort(); // wichtig fuer Remove (s.u.)
+ SetUndoComment(ImpGetResStr(bNoPolyPoly?STR_EditCombine_OnePoly:STR_EditCombine_PolyPoly),aRemoveMerker.GetMarkDescription());
+ // die tatsaechlich verwendeten Objekten aus der Liste entfernen
+ DeleteMarked(aRemoveMerker);
+ }
+ EndUndo();
+ return !bCombineError;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@ @@@@ @@ @@ @@@@ @@ @@ @@@@@@ @@ @@@@@
+// @@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@@@@@@ @@ @@ @@@@@@ @@ @@ @@
+// @@ @@ @@ @@@@ @@@@@@@ @@@@@@ @@@@@@ @@ @@ @@@@
+// @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrEditView::ImpCanDismantle(const XPolyPolygon& rXPP, BOOL bMakeLines) const
+{
+ BOOL bCan=FALSE;
+ USHORT nPolyAnz=rXPP.Count();
+ // Dismantle macht erst Sinn ab 2 Polygone im PolyPolygon
+ if (nPolyAnz>=2) bCan=TRUE;
+ else if (bMakeLines && nPolyAnz==1) { // oder ab 2 Linien bzw. 2 Segmenten im Polygon
+ const XPolygon& rXP=rXPP[0];
+ USHORT nPointAnz=rXP.GetPointCount();
+ if (nPointAnz>4) bCan=TRUE;
+ else if (nPointAnz>2) { // sonst ist es nur eine Linie
+ if (!rXP.IsControl(1)) bCan=TRUE; // sonst ist es nun ein Beziersegment
+ }
+ }
+ return bCan;
+}
+
+BOOL SdrEditView::ImpCanDismantle(const SdrObject* pObj, BOOL bMakeLines) const
+{
+ BOOL bOtherObjs=FALSE; // TRUE=andere Objekte ausser PathObj's vorhanden
+ BOOL bMin1PolyPoly=FALSE; // TRUE=mind. 1 PolyPolygon mit mehr als ein Polygon vorhanden
+ SdrObjList* pOL=pObj->GetSubList();
+ if (pOL!=NULL) {
+ // Aha, Gruppenobjekt. Also alle Member ansehen.
+ // Alle muessen PathObjs sein !
+ SdrObjListIter aIter(*pOL,IM_DEEPNOGROUPS);
+ while (aIter.IsMore() && !bOtherObjs) {
+ const SdrObject* pObj1=aIter.Next();
+ const SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj1);
+ if (pPath!=NULL) {
+ if (ImpCanDismantle(pPath->GetPathPoly(),bMakeLines)) bMin1PolyPoly=TRUE;
+ SdrObjTransformInfoRec aInfo;
+ pObj1->TakeObjInfo(aInfo);
+ if (!aInfo.bCanConvToPath) bOtherObjs=TRUE; // Passiert z.B. im Falle Fontwork (Joe, 28-11-95)
+ } else {
+ bOtherObjs=TRUE;
+ }
+ }
+ } else {
+ const SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
+ if (pPath!=NULL) {
+ if (ImpCanDismantle(pPath->GetPathPoly(),bMakeLines)) bMin1PolyPoly=TRUE;
+ SdrObjTransformInfoRec aInfo;
+ pObj->TakeObjInfo(aInfo);
+ // #69711 : new condition IsLine() to be able to break simple Lines
+ if (!(aInfo.bCanConvToPath || aInfo.bCanConvToPoly) && !pPath->IsLine() ) bOtherObjs=TRUE; // Passiert z.B. im Falle Fontwork (Joe, 28-11-95)
+ } else {
+ bOtherObjs=TRUE;
+ }
+ }
+ return bMin1PolyPoly && !bOtherObjs;
+}
+
+void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, ULONG& rPos, SdrPageView* pPV, BOOL bMakeLines)
+{
+ const SdrPathObj* pSrcPath=PTR_CAST(SdrPathObj,pObj);
+ if (pSrcPath!=NULL) {
+ SdrObject* pLast=NULL; // // fuer die Zuweisung des OutlinerParaObject
+ const XPolyPolygon& rXPP=pSrcPath->GetPathPoly();
+ USHORT nPolyAnz=rXPP.Count();
+ for (USHORT i=0; i<nPolyAnz; i++) {
+ const XPolygon& rAktXP=rXPP.GetObject(i);
+ const XPolygon* pXP=&rAktXP;
+ XPolygon aTmpPoly;
+ USHORT nPointAnz=rAktXP.GetPointCount();
+ if (nPointAnz<2) bMakeLines=FALSE;
+ for (USHORT nPoint=0; nPoint<nPointAnz; nPoint++) {
+ SdrObjKind eKind=OBJ_PATHFILL;
+ if (bMakeLines) {
+ eKind=OBJ_PLIN;
+ pXP=&aTmpPoly;
+ aTmpPoly.SetSize(2);
+ aTmpPoly[0]=rAktXP[nPoint];
+ aTmpPoly.SetFlags(0,XPOLY_NORMAL);
+ aTmpPoly[1]=rAktXP[nPoint+1];
+ aTmpPoly.SetFlags(1,rAktXP.GetFlags(nPoint+1));
+ if (aTmpPoly.IsControl(1) && nPoint+3<nPointAnz) { // Aha, Beziersegment
+ aTmpPoly[2]=rAktXP[nPoint+2];
+ aTmpPoly.SetFlags(2,rAktXP.GetFlags(nPoint+2));
+ aTmpPoly[3]=rAktXP[nPoint+3];
+ aTmpPoly.SetFlags(3,rAktXP.GetFlags(nPoint+3));
+ nPoint+=2;
+ eKind=OBJ_PATHLINE;
+ }
+ aTmpPoly.SetFlags(USHORT(aTmpPoly.GetPointCount()-1),XPOLY_NORMAL);
+ if (nPoint>=USHORT(nPointAnz-2)) nPoint=nPointAnz;
+ } else {
+ nPoint=nPointAnz;
+ eKind=SdrObjKind(pSrcPath->GetObjIdentifier());
+ }
+ SdrPathObj* pPath=new SdrPathObj(eKind,XPolyPolygon(*pXP));
+ ImpCopyAttributes(pSrcPath,pPath);
+ pLast=pPath;
+ SdrInsertReason aReason(SDRREASON_VIEWCALL,pSrcPath);
+ rOL.InsertObject(pPath,rPos,&aReason);
+ AddUndo(new SdrUndoNewObj(*pPath,TRUE)); // Insert durch New ersetzt - Joe, 31-08-1995
+ MarkObj(pPath,pPV,FALSE,TRUE);
+ rPos++;
+ }
+ }
+ if (pLast!=NULL && pSrcPath->GetOutlinerParaObject()!=NULL)
+ pLast->SetOutlinerParaObject(pSrcPath->GetOutlinerParaObject()->Clone());
+ }
+}
+
+void SdrEditView::DismantleMarkedObjects(BOOL bMakeLines)
+{
+ UINT32 nCnt(0);
+ // Temporaere Marklist
+ SdrMarkList aRemoveMerker;
+
+ aMark.ForceSort();
+ // Der Comment wird spaeter zusammengebaut
+ BegUndo(String(), String(),
+ bMakeLines ? SDRREPFUNC_OBJ_DISMANTLE_LINES : SDRREPFUNC_OBJ_DISMANTLE_POLYS);
+
+ ULONG nm;
+ ULONG nAnz=aMark.GetMarkCount();
+ SdrObjList* pOL0=NULL;
+ for (nm=nAnz; nm>0;) {
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrPageView* pPV=pM->GetPageView();
+ SdrObjList* pOL=pObj->GetObjList();
+ if (pOL!=pOL0) { pOL0=pOL; pObj->GetOrdNum(); } // sicherstellen, dass OrdNums stimmen!
+ if (ImpCanDismantle(pObj,bMakeLines)) {
+ aRemoveMerker.InsertEntry(SdrMark(pObj,pM->GetPageView()));
+ ULONG nPos0=pObj->GetOrdNumDirect();
+ ULONG nPos=nPos0+1;
+ SdrObjList* pSubList=pObj->GetSubList();
+ if (pSubList!=NULL && !pObj->Is3DObj()) {
+ SdrObjListIter aIter(*pSubList,IM_DEEPNOGROUPS);
+ while (aIter.IsMore()) {
+ const SdrObject* pObj1=aIter.Next();
+ ImpDismantleOneObject(pObj1,*pOL,nPos,pPV,bMakeLines);
+ }
+ } else {
+ ImpDismantleOneObject(pObj,*pOL,nPos,pPV,bMakeLines);
+ }
+ AddUndo(new SdrUndoDelObj(*pObj,TRUE));
+ pOL->RemoveObject(nPos0);
+ }
+ }
+ // UndoComment aus den tatsaechlich verwendeten Objekten zusammenbauen
+ SetUndoComment(ImpGetResStr(bMakeLines?STR_EditDismantle_Lines:STR_EditDismantle_Polys),aRemoveMerker.GetMarkDescription());
+ // die tatsaechlich verwendeten Objekten aus der Liste entfernen
+ EndUndo();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// #### #### ### # # ####
+// # # # # # # # # #
+// # ## #### # # # # ####
+// # # # # # # # # #
+// #### # # ### ### #
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::GroupMarked(const SdrObject* pUserGrp)
+{
+ if (HasMarkedObj()) {
+ BegUndo(ImpGetResStr(STR_EditGroup),aMark.GetMarkDescription(),SDRREPFUNC_OBJ_GROUP);
+ aMark.ForceSort();
+ ULONG nAnz=aMark.GetMarkCount();
+ for (ULONG nm=nAnz; nm>0;) { // UndoActions fuer alle betroffenen Objekte anlegen
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ AddUndo(new SdrUndoRemoveObj(*pM->GetObj()));
+ }
+
+ SdrMarkList aNewMark;
+ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ SdrObjList* pAktLst=pPV->GetObjList();
+ SdrObjList* pSrcLst=pAktLst;
+ SdrObjList* pSrcLst0=pSrcLst;
+ SdrPage* pPage=pPV->GetPage();
+ // sicherstellen, dass die OrdNums stimmen
+ if (pSrcLst->IsObjOrdNumsDirty()) pSrcLst->RecalcObjOrdNums();
+ SdrObject* pGrp=NULL;
+ SdrObject* pRefObj=NULL; // Referenz fuer InsertReason (-> rumankern im Writer)
+ SdrObject* pRefObj1=NULL; // Referenz fuer InsertReason (-> rumankern im Writer)
+ SdrObjList* pDstLst=NULL;
+ // Falls alle markierten Objekte aus Fremden Obj-Listen
+ // kommen, kommt das Gruppenobjekt an das Ende der Liste.
+ ULONG nInsPos=pSrcLst->GetObjCount();
+ BOOL bNeedInsPos=TRUE;
+ for (ULONG nm=aMark.GetMarkCount(); nm>0;) {
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ if (pM->GetPageView()==pPV) {
+ if (pGrp==NULL) {
+ if (pUserGrp!=NULL) pGrp=pUserGrp->Clone();
+ if (pGrp==NULL) pGrp=new SdrObjGroup;
+ pDstLst=pGrp->GetSubList();
+ DBG_ASSERT(pDstLst!=NULL,"Angebliches Gruppenobjekt liefert keine Objektliste");
+ }
+ SdrObject* pObj=pM->GetObj();
+ pSrcLst=pObj->GetObjList();
+ if (pSrcLst!=pSrcLst0) {
+ if (pSrcLst->IsObjOrdNumsDirty()) pSrcLst->RecalcObjOrdNums();
+ }
+ BOOL bForeignList=pSrcLst!=pAktLst;
+ BOOL bGrouped=pSrcLst!=pPage;
+ if (!bForeignList && bNeedInsPos) {
+ nInsPos=pObj->GetOrdNum(); // ua, damit sind alle ObjOrdNum der Page gesetzt
+ nInsPos++;
+ bNeedInsPos=FALSE;
+ }
+ pSrcLst->RemoveObject(pObj->GetOrdNumDirect());
+ if (!bForeignList) nInsPos--; // InsertPos korregieren
+ SdrInsertReason aReason(SDRREASON_VIEWCALL);
+ pDstLst->InsertObject(pObj,0,&aReason);
+ aMark.DeleteMarkNum(nm);
+ if (pRefObj1==NULL) pRefObj1=pObj; // Das oberste sichtbare Objekt
+ if (!bGrouped) {
+ if (pRefObj==NULL) pRefObj=pObj; // Das oberste sichtbare nicht gruppierte Objekt
+ }
+ pSrcLst0=pSrcLst;
+ }
+ }
+ if (pRefObj==NULL) pRefObj=pRefObj1;
+ if (pGrp!=NULL) {
+ aNewMark.InsertEntry(SdrMark(pGrp,pPV));
+ ULONG nAnz=pDstLst->GetObjCount();
+ SdrInsertReason aReason(SDRREASON_VIEWCALL,pRefObj);
+ pAktLst->InsertObject(pGrp,nInsPos,&aReason);
+ AddUndo(new SdrUndoNewObj(*pGrp,TRUE)); // Kein Recalc!
+ for (ULONG no=0; no<nAnz; no++) {
+ AddUndo(new SdrUndoInsertObj(*pDstLst->GetObj(no)));
+ }
+ }
+ }
+ aMark.Merge(aNewMark);
+ MarkListHasChanged();
+ EndUndo();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// # # # # #### #### ### # # ####
+// # # ## # # # # # # # # # #
+// # # # # # # ## #### # # # # ####
+// # # # ## # # # # # # # # #
+// ### # # #### # # ### ### #
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::UnGroupMarked()
+{
+ SdrMarkList aNewMark;
+
+ BegUndo(String(), String(), SDRREPFUNC_OBJ_UNGROUP);
+ ULONG nCount=0;
+ XubString aName1;
+ XubString aName;
+ BOOL bNameOk=FALSE;
+ for (ULONG nm=aMark.GetMarkCount(); nm>0;) {
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pGrp=pM->GetObj();
+ SdrObjList* pSrcLst=pGrp->GetSubList();
+ if (pSrcLst!=NULL) {
+ nCount++;
+ if (nCount==1) {
+ pGrp->TakeObjNameSingul(aName); // Bezeichnung der Gruppe holen
+ pGrp->TakeObjNamePlural(aName1); // Bezeichnung der Gruppe holen
+ bNameOk=TRUE;
+ } else {
+ if (nCount==2) aName=aName1; // Pluralname setzen
+ if (bNameOk) {
+ XubString aStr;
+ pGrp->TakeObjNamePlural(aStr); // Bezeichnung der Gruppe holen
+
+ if(!aStr.Equals(aName))
+ bNameOk = FALSE;
+ }
+ }
+ ULONG nDstCnt=pGrp->GetOrdNum();
+ SdrObjList* pDstLst=pM->GetPageView()->GetObjList();
+
+ // FIRST move contained objects to parent of group, so that
+ // the contained objects are NOT migrated to the UNDO-ItemPool
+ // when AddUndo(new SdrUndoDelObj(*pGrp)) is called.
+ ULONG nAnz=pSrcLst->GetObjCount();
+ ULONG no;
+ for (no=nAnz; no>0;) {
+ no--;
+ SdrObject* pObj=pSrcLst->GetObj(no);
+ AddUndo(new SdrUndoRemoveObj(*pObj));
+ }
+ for (no=0; no<nAnz; no++) {
+ SdrObject* pObj=pSrcLst->RemoveObject(0);
+ SdrInsertReason aReason(SDRREASON_VIEWCALL,pGrp);
+ pDstLst->InsertObject(pObj,nDstCnt,&aReason);
+ AddUndo(new SdrUndoInsertObj(*pObj,TRUE)); // Kein RecalcOrdNum
+ nDstCnt++;
+ // Kein SortCheck beim einfuegen in die MarkList, denn das
+ // wuerde wg. pObj->GetOrdNum() jedesmal ein RecalcOrdNums()
+ // provozieren:
+ aNewMark.InsertEntry(SdrMark(pObj,pM->GetPageView()),FALSE);
+ }
+
+ // Now it is safe to add the delete-UNDO which trigers the
+ // MigrateItemPool now only for itself, not for the subobjects.
+ // nDstCnt is right, because previous inserts move group
+ // object deeper and increase nDstCnt.
+ AddUndo(new SdrUndoDelObj(*pGrp));
+ pDstLst->RemoveObject(nDstCnt);
+
+ aMark.DeleteMarkNum(nm);
+ }
+ }
+ if (nCount!=0) {
+ if (!bNameOk) aName=ImpGetResStr(STR_ObjNamePluralGRUP); // Oberbegriff Gruppenobjekte verwenden, wenn verschiedene Objekte.
+ SetUndoComment(ImpGetResStr(STR_EditUngroup),aName);
+ }
+ EndUndo();
+ if (nCount!=0) {
+ aMark.Merge(aNewMark,TRUE); // Durch das obige Einsortieren ist aNewMark genau verkehrtherum
+ MarkListHasChanged();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// ### ### # # # # ##### #### ##### ##### ### #### ### # # #
+// # # # # ## # # # # # # # # # # # # # # # # #
+// # # # # # # # # #### #### # # # # #### # # # #
+// # # # # # ## # # # # # # # # # # # # # #
+// ### ### # # # ##### # # # # ### # ### #### #
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrObject* SdrEditView::ImpConvertOneObj(SdrObject* pObj, BOOL bPath, BOOL bLineToArea)
+{
+ SdrObject* pNewObj = pObj->ConvertToPolyObj(bPath, bLineToArea);
+ if (pNewObj!=NULL) {
+ SdrObjList* pOL=pObj->GetObjList();
+ DBG_ASSERT(pOL!=NULL,"ConvertTo: Obj liefert keine ObjList");
+ if (pOL!=NULL) {
+ AddUndo(new SdrUndoReplaceObj(*pObj,*pNewObj));
+ pOL->ReplaceObject(pNewObj,pObj->GetOrdNum());
+ }
+ }
+ return pNewObj;
+}
+
+void SdrEditView::ImpConvertTo(BOOL bPath, BOOL bLineToArea)
+{
+ BOOL bMrkChg=FALSE;
+ BOOL bModChg=FALSE;
+ if (HasMarkedObj()) {
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ USHORT nDscrID=0;
+ if(bLineToArea)
+ {
+ if(nMarkAnz == 1)
+ nDscrID = STR_EditConvToContour;
+ else
+ nDscrID = STR_EditConvToContours;
+
+ BegUndo(ImpGetResStr(nDscrID), aMark.GetMarkDescription());
+ }
+ else
+ {
+ if (bPath) {
+ if (nMarkAnz==1) nDscrID=STR_EditConvToCurve;
+ else nDscrID=STR_EditConvToCurves;
+ BegUndo(ImpGetResStr(nDscrID),aMark.GetMarkDescription(),SDRREPFUNC_OBJ_CONVERTTOPATH);
+ } else {
+ if (nMarkAnz==1) nDscrID=STR_EditConvToPoly;
+ else nDscrID=STR_EditConvToPolys;
+ BegUndo(ImpGetResStr(nDscrID),aMark.GetMarkDescription(),SDRREPFUNC_OBJ_CONVERTTOPOLY);
+ }
+ }
+ for (ULONG nm=nMarkAnz; nm>0;) {
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrPageView* pPV=pM->GetPageView();
+ if (pObj->IsGroupObject() && !pObj->Is3DObj()) {
+ SdrObject* pGrp=pObj;
+ SdrObjListIter aIter(*pGrp,IM_DEEPNOGROUPS);
+ while (aIter.IsMore()) {
+ pObj=aIter.Next();
+ if (ImpConvertOneObj(pObj,bPath,bLineToArea)) bModChg=TRUE;
+ }
+ } else {
+ SdrObject* pNewObj=ImpConvertOneObj(pObj,bPath,bLineToArea);
+ if (pNewObj!=NULL) {
+ bModChg=TRUE;
+ bMrkChg=TRUE;
+ aMark.ReplaceMark(SdrMark(pNewObj,pPV),nm);
+ }
+ }
+ }
+ EndUndo();
+ if (bMrkChg) AdjustMarkHdl();
+ if (bMrkChg) MarkListHasChanged();
+ }
+}
+
+void SdrEditView::ConvertMarkedToPathObj(BOOL bLineToArea)
+{
+ ImpConvertTo(TRUE, bLineToArea);
+}
+
+void SdrEditView::ConvertMarkedToPolyObj(BOOL bLineToArea)
+{
+ ImpConvertTo(FALSE, bLineToArea);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// # # ##### ##### ### ##### # # ##### # # # #### ### #### #####
+// ## ## # # # # # # # # # ## ## # # # # # # #
+// # # # #### # ##### ### # # #### ### # # # # #### # # #### #
+// # # # # # # # # # # # # # # # # # # #
+// # # ##### # # # # # #### ##### # # # # ### # # #
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
+{
+ BegUndo(String(), String(), SDRREPFUNC_OBJ_IMPORTMTF);
+ aMark.ForceSort();
+ SdrMarkList aForTheDescription;
+ SdrMarkList aNewMarked;
+ ULONG nAnz=aMark.GetMarkCount();
+
+ for (ULONG nm=nAnz; nm>0;)
+ { // Undo Objekte fuer alle neuen Objekte erzeugen
+ // zwischen den Metafiles auf Abbruch testen
+ if( pProgrInfo != NULL )
+ {
+ pProgrInfo->SetNextObject();
+ if(!pProgrInfo->ReportActions(0))
+ break;
+ }
+
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrPageView* pPV=pM->GetPageView();
+ SdrObjList* pOL=pObj->GetObjList();
+ ULONG nInsPos=pObj->GetOrdNum()+1;
+ SdrGrafObj* pGraf=PTR_CAST(SdrGrafObj,pObj);
+ SdrOle2Obj* pOle2=PTR_CAST(SdrOle2Obj,pObj);
+ ULONG nInsAnz=0;
+ if (pGraf!=NULL && pGraf->HasGDIMetaFile())
+ {
+ ImpSdrGDIMetaFileImport aFilter(*pMod);
+ aFilter.SetScaleRect(pGraf->GetSnapRect());
+ aFilter.SetLayer(pObj->GetLayer());
+ nInsAnz=aFilter.DoImport(pGraf->GetTransformedGraphic().GetGDIMetaFile(),*pOL,nInsPos,pProgrInfo);
+ }
+ if (pOle2!=NULL && pOle2->HasGDIMetaFile())
+ {
+ const GDIMetaFile* pMtf=pOle2->GetGDIMetaFile();
+ ImpSdrGDIMetaFileImport aFilter(*pMod);
+ aFilter.SetScaleRect(pOle2->GetLogicRect());
+ aFilter.SetLayer(pObj->GetLayer());
+ nInsAnz=aFilter.DoImport(*pMtf,*pOL,nInsPos,pProgrInfo);
+ }
+ if (nInsAnz!=0) {
+ ULONG nObj=nInsPos;
+ for (ULONG i=0; i<nInsAnz; i++) {
+ AddUndo(new SdrUndoNewObj(*pOL->GetObj(nObj)));
+
+ // Neue MarkList pflegen
+ SdrMark aNewMark(pOL->GetObj(nObj), pPV);
+ aNewMarked.InsertEntry(aNewMark);
+
+ nObj++;
+ }
+ aForTheDescription.InsertEntry(*pM);
+ AddUndo(new SdrUndoDelObj(*pObj));
+
+ // Objekt aus selektion loesen und loeschen
+ aMark.DeleteMark(aMark.FindObject(pObj));
+ pOL->RemoveObject(nInsPos-1);
+ }
+ }
+
+ // MarkObj... fehlt... jetzt nicht mehr (AW)
+ if(aNewMarked.GetMarkCount())
+ {
+ // Neue Selektion bilden
+ for(INT32 a=0;a<aNewMarked.GetMarkCount();a++)
+ aMark.InsertEntry(*aNewMarked.GetMark(a));
+ aMark.ForceSort();
+ }
+
+ SetUndoComment(ImpGetResStr(STR_EditImportMtf),aForTheDescription.GetMarkDescription());
+ EndUndo();
+}
+
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
new file mode 100644
index 0000000000..10f7e23f70
--- /dev/null
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -0,0 +1,1592 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdedxv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdedxv.hxx"
+#include <svtools/solar.hrc>
+
+#ifndef _STRING_H
+#include <tools/string.h>
+#endif
+
+#ifndef _SFXITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _EDITSTAT_HXX //autogen
+#include <editstat.hxx>
+#endif
+
+#ifndef _SV_CONFIG_HXX //autogen
+#include <vcl/config.hxx>
+#endif
+
+#ifndef _SV_CURSOR_HXX //autogen
+#include <vcl/cursor.hxx>
+#endif
+
+#include "svditext.hxx"
+#include "svdoutl.hxx"
+#include "svdxout.hxx"
+#include "svdotext.hxx"
+#include "svdundo.hxx"
+#include "svditer.hxx"
+#include "svdpagv.hxx"
+#include "svdpage.hxx"
+#include "svdetc.hxx" // fuer GetDraftFillColor
+#include "svdibrow.hxx"
+#include "svdoutl.hxx"
+#include "svddrgv.hxx" // fuer SetSolidDragging()
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+
+#ifndef _OUTLINER_HXX //autogen
+#include "outliner.hxx"
+#endif
+
+#ifndef _SVX_ADJITEM_HXX //autogen
+#include "adjitem.hxx"
+#endif
+
+#define SPOTCOUNT 5
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrObjEditView::ImpClearVars()
+{
+ bQuickTextEditMode=TRUE;
+ bMacroMode=TRUE;
+ pTextEditObj=NULL;
+ pTextEditOutliner=NULL;
+ pTextEditOutlinerView=NULL;
+ pTextEditPV=NULL;
+ pTextEditWin=NULL;
+ pTextEditCursorMerker=NULL;
+ pEditPara=NULL;
+ bTextEditNewObj=FALSE;
+ bMacroDown=FALSE;
+ pMacroObj=NULL;
+ pMacroPV=NULL;
+ pMacroWin=NULL;
+ nMacroTol=0;
+ bTextEditDontDelete=FALSE;
+ bTextEditOnlyOneView=FALSE;
+}
+
+SdrObjEditView::SdrObjEditView(SdrModel* pModel1, OutputDevice* pOut):
+ SdrGlueEditView(pModel1,pOut)
+{
+ ImpClearVars();
+}
+
+SdrObjEditView::SdrObjEditView(SdrModel* pModel1, ExtOutputDevice* pXOut):
+ SdrGlueEditView(pModel1,pXOut)
+{
+ ImpClearVars();
+}
+
+SdrObjEditView::~SdrObjEditView()
+{
+ pTextEditWin = NULL; // Damit es in EndTextEdit kein ShowCursor gibt
+ if (IsTextEdit()) EndTextEdit();
+ if (pTextEditOutliner!=NULL) {
+ delete pTextEditOutliner;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrObjEditView::IsAction() const
+{
+ return IsMacroObj() || SdrGlueEditView::IsAction();
+}
+
+void SdrObjEditView::MovAction(const Point& rPnt)
+{
+ if (IsMacroObj()) MovMacroObj(rPnt);
+ SdrGlueEditView::MovAction(rPnt);
+}
+
+void SdrObjEditView::EndAction()
+{
+ if (IsMacroObj()) EndMacroObj();
+ SdrGlueEditView::EndAction();
+}
+
+void SdrObjEditView::BckAction()
+{
+ BrkMacroObj();
+ SdrGlueEditView::BckAction();
+}
+
+void SdrObjEditView::BrkAction()
+{
+ BrkMacroObj();
+ SdrGlueEditView::BrkAction();
+}
+
+void SdrObjEditView::TakeActionRect(Rectangle& rRect) const
+{
+ if (IsMacroObj()) {
+ rRect=pMacroObj->GetBoundRect()+pMacroPV->GetOffset();
+ } else {
+ SdrGlueEditView::TakeActionRect(rRect);
+ }
+}
+
+void __EXPORT SdrObjEditView::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ SdrGlueEditView::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+ // Printerwechsel waerend des Editierens
+ SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+ if (pSdrHint!=NULL && pTextEditOutliner!=NULL) {
+ SdrHintKind eKind=pSdrHint->GetKind();
+ if (eKind==HINT_REFDEVICECHG) {
+ pTextEditOutliner->SetRefDevice(pMod->GetRefDevice());
+ }
+ if (eKind==HINT_DEFAULTTABCHG) {
+ pTextEditOutliner->SetDefTab(pMod->GetDefaultTabulator());
+ }
+ if (eKind==HINT_DEFFONTHGTCHG) {
+ // ...
+ }
+ if (eKind==HINT_MODELSAVED) { // #43095#
+ pTextEditOutliner->ClearModifyFlag();
+ }
+ }
+}
+
+void SdrObjEditView::ModelHasChanged()
+{
+ SdrGlueEditView::ModelHasChanged();
+ if (IsTextEdit() && !pTextEditObj->IsInserted()) EndTextEdit(); // Objekt geloescht
+ // TextEditObj geaendert?
+ if (IsTextEdit()) {
+ SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pTextEditObj);
+ if (pTextObj!=NULL) {
+ ULONG nOutlViewAnz=pTextEditOutliner->GetViewCount();
+ BOOL bAreaChg=FALSE;
+ BOOL bAnchorChg=FALSE;
+ BOOL bColorChg=FALSE;
+ BOOL bContourFrame=pTextObj->IsContourTextFrame();
+ EVAnchorMode eNewAnchor;
+ Rectangle aOldArea(aMinTextEditArea);
+ aOldArea.Union(aTextEditArea);
+ Color aNewColor;
+ { // Area Checken
+ Size aPaperMin1;
+ Size aPaperMax1;
+ Rectangle aEditArea1;
+ Rectangle aMinArea1;
+ pTextObj->TakeTextEditArea(&aPaperMin1,&aPaperMax1,&aEditArea1,&aMinArea1);
+ Point aPvOfs(pTextEditPV->GetOffset());
+ aEditArea1.Move(aPvOfs.X(),aPvOfs.Y());
+ aMinArea1.Move(aPvOfs.X(),aPvOfs.Y());
+ Rectangle aNewArea(aMinArea1);
+ aNewArea.Union(aEditArea1);
+ if (aNewArea!=aOldArea || aEditArea1!=aTextEditArea || aMinArea1!=aMinTextEditArea ||
+ pTextEditOutliner->GetMinAutoPaperSize()!=aPaperMin1 || pTextEditOutliner->GetMaxAutoPaperSize()!=aPaperMax1) {
+ aTextEditArea=aEditArea1;
+ aMinTextEditArea=aMinArea1;
+ pTextEditOutliner->SetUpdateMode(FALSE);
+ pTextEditOutliner->SetMinAutoPaperSize(aPaperMin1);
+ pTextEditOutliner->SetMaxAutoPaperSize(aPaperMax1);
+ pTextEditOutliner->SetPaperSize(Size(0,0)); // Damit der Outliner neu formatiert
+ if (!bContourFrame) {
+ pTextEditOutliner->ClearPolygon();
+ ULONG nStat=pTextEditOutliner->GetControlWord();
+ nStat|=EE_CNTRL_AUTOPAGESIZE;
+ pTextEditOutliner->SetControlWord(nStat);
+ } else {
+ ULONG nStat=pTextEditOutliner->GetControlWord();
+ nStat&=~EE_CNTRL_AUTOPAGESIZE;
+ pTextEditOutliner->SetControlWord(nStat);
+ Rectangle aAnchorRect;
+ pTextObj->TakeTextAnchorRect(aAnchorRect);
+ pTextObj->ImpSetContourPolygon(*pTextEditOutliner,aAnchorRect, TRUE);
+ }
+ for (ULONG nOV=0; nOV<nOutlViewAnz; nOV++) {
+ OutlinerView* pOLV=pTextEditOutliner->GetView(nOV);
+ ULONG nStat0=pOLV->GetControlWord();
+ ULONG nStat=nStat0;
+ // AutoViewSize nur wenn nicht KontourFrame.
+ if (!bContourFrame) nStat|=EV_CNTRL_AUTOSIZE;
+ else nStat&=~EV_CNTRL_AUTOSIZE;
+ if (nStat!=nStat0) pOLV->SetControlWord(nStat);
+ }
+ pTextEditOutliner->SetUpdateMode(TRUE);
+ bAreaChg=TRUE;
+ }
+ }
+ if (pTextEditOutlinerView!=NULL) { // Fuellfarbe und Anker checken
+ EVAnchorMode eOldAnchor=pTextEditOutlinerView->GetAnchorMode();
+ eNewAnchor=(EVAnchorMode)pTextObj->GetOutlinerViewAnchorMode();
+ bAnchorChg=eOldAnchor!=eNewAnchor;
+ Color aOldColor(pTextEditOutlinerView->GetBackgroundColor());
+ aNewColor=ImpGetTextEditBackgroundColor();
+ bColorChg=aOldColor!=aNewColor;
+ }
+ if (bAreaChg || bAnchorChg || bColorChg)
+ {
+ for (ULONG nOV=0; nOV<nOutlViewAnz; nOV++)
+ {
+ OutlinerView* pOLV=pTextEditOutliner->GetView(nOV);
+ { // Alten OutlinerView-Bereich invalidieren
+ Window* pWin=pOLV->GetWindow();
+ Rectangle aTmpRect(aOldArea);
+ USHORT nPixSiz=pOLV->GetInvalidateMore()+1;
+ Size aMore(pWin->PixelToLogic(Size(nPixSiz,nPixSiz)));
+ aTmpRect.Left()-=aMore.Width();
+ aTmpRect.Right()+=aMore.Width();
+ aTmpRect.Top()-=aMore.Height();
+ aTmpRect.Bottom()+=aMore.Height();
+ InvalidateOneWin(*pWin,aTmpRect);
+ }
+ if (bAnchorChg)
+ pOLV->SetAnchorMode(eNewAnchor);
+ if (bColorChg)
+ pOLV->SetBackgroundColor( aNewColor );
+
+ pOLV->SetOutputArea(aTextEditArea); // weil sonst scheinbar nicht richtig umgeankert wird
+ ImpPaintOutlinerView(*pOLV);
+ }
+ pTextEditOutlinerView->ShowCursor();
+ }
+ }
+ ImpMakeTextCursorAreaVisible();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@@ @@@@@ @@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@@@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle* pRect, BOOL bDrawButPaint) const
+{
+ const SdrObject* pTextObjTmp=GetTextEditObject();
+ const SdrTextObj* pText=PTR_CAST(SdrTextObj,pTextObjTmp);
+ BOOL bTextFrame=pText!=NULL && pText->IsTextFrame();
+ BOOL bFitToSize=(pTextEditOutliner->GetControlWord() & EE_CNTRL_STRETCHING) !=0;
+ BOOL bContourFrame=pText!=NULL && pText->IsContourTextFrame();
+ Window* pWin=rOutlView.GetWindow();
+ Rectangle aBlankRect(rOutlView.GetOutputArea());
+ aBlankRect.Union(aMinTextEditArea);
+ Rectangle aPixRect(pWin->LogicToPixel(aBlankRect));
+ if (pRect!=NULL) aBlankRect.Intersection(*pRect);
+ BOOL bModifyMerk=pTextEditOutliner->IsModified(); // #43095#
+ if (bDrawButPaint) {
+ pTextEditOutliner->Draw(pWin,rOutlView.GetOutputArea());
+ } else {
+ rOutlView.GetOutliner()->SetUpdateMode(TRUE); // Bugfix #22596#
+ rOutlView.Paint(aBlankRect);
+ }
+ if (!bModifyMerk) pTextEditOutliner->ClearModifyFlag(); // #43095#
+ if (bTextFrame && !bFitToSize) {
+ aPixRect.Left()--;
+ aPixRect.Top()--;
+ aPixRect.Right()++;
+ aPixRect.Bottom()++;
+ USHORT nPixSiz=rOutlView.GetInvalidateMore()-1;
+ { // xPixRect Begrenzen, wegen Treiberproblem bei zu weit hinausragenden Pixelkoordinaten
+ Size aMaxXY=pWin->GetOutputSizePixel();
+ long a=2*nPixSiz;
+ long nMaxX=aMaxXY.Width()+a;
+ long nMaxY=aMaxXY.Height()+a;
+ if (aPixRect.Left ()<-a) aPixRect.Left()=-a;
+ if (aPixRect.Top ()<-a) aPixRect.Top ()=-a;
+ if (aPixRect.Right ()>nMaxX) aPixRect.Right ()=nMaxX;
+ if (aPixRect.Bottom()>nMaxY) aPixRect.Bottom()=nMaxY;
+ }
+ Rectangle aOuterPix(aPixRect);
+ aOuterPix.Left()-=nPixSiz;
+ aOuterPix.Top()-=nPixSiz;
+ aOuterPix.Right()+=nPixSiz;
+ aOuterPix.Bottom()+=nPixSiz;
+
+ BOOL bXor=(bDrawButPaint && IsShownXorVisible(pWin));
+ if (bXor) ((SdrPaintView*)this)->HideShownXor(pWin);
+ BOOL bMerk=pWin->IsMapModeEnabled();
+ pWin->EnableMapMode(FALSE);
+
+ Color aGrayColor( COL_GRAY );
+ pWin->SetFillColor( aGrayColor );
+ pWin->SetLineColor();
+ pWin->DrawRect(Rectangle(aOuterPix.Left(),aOuterPix.Top() ,aPixRect.Left() ,aOuterPix.Bottom()));
+ pWin->DrawRect(Rectangle(aOuterPix.Left(),aOuterPix.Top() ,aOuterPix.Right(),aPixRect.Top() ));
+ pWin->DrawRect(Rectangle(aOuterPix.Left(),aPixRect.Bottom(),aOuterPix.Right(),aOuterPix.Bottom()));
+ pWin->DrawRect(Rectangle(aPixRect.Right(),aOuterPix.Top() ,aOuterPix.Right(),aOuterPix.Bottom()));
+ pWin->EnableMapMode(bMerk);
+ if (bXor) ((SdrPaintView*)this)->ShowShownXor(pWin);
+ }
+ rOutlView.ShowCursor();
+}
+
+Color SdrObjEditView::ImpGetTextEditBackgroundColor() const
+{
+ Color aBackground(COL_WHITE);
+ BOOL bFound=FALSE;
+ SdrTextObj* pText=PTR_CAST(SdrTextObj,pTextEditObj);
+ if (pText!=NULL && pText->IsClosedObj())
+ {
+ SfxItemSet aSet(pMod->GetItemPool());
+ pText->TakeAttributes(aSet,FALSE,FALSE);
+ bFound=GetDraftFillColor(aSet,aBackground);
+ }
+ if (!bFound && pTextEditPV!=NULL && pTextEditObj!=NULL)
+ {
+ // Ok, dann eben die Page durchsuchen!
+ Point aPvOfs(pTextEditPV->GetOffset());
+ const SdrPage* pPg=pTextEditPV->GetPage();
+
+ Point aSpotPos[SPOTCOUNT];
+ Color aSpotColor[SPOTCOUNT];
+ Rectangle aSnapRect( pTextEditObj->GetSnapRect() );
+ ULONG nHeight( aSnapRect.GetSize().Height() );
+ ULONG nWidth( aSnapRect.GetSize().Width() );
+ ULONG nWidth14 = nWidth / 4;
+ ULONG nHeight14 = nHeight / 4;
+ ULONG nWidth34 = ( 3 * nWidth ) / 4;
+ ULONG nHeight34 = ( 3 * nHeight ) / 4;
+
+ const SetOfByte& rVisiLayers = pTextEditPV->GetVisibleLayers();
+
+ USHORT i;
+ for ( i = 0; i < SPOTCOUNT; i++ )
+ {
+ // Es wird anhand von fuenf Spots die Farbe untersucht
+ switch ( i )
+ {
+ case 0 :
+ {
+ // Center-Spot
+ aSpotPos[i] = aSnapRect.Center();
+ aSpotPos[i] += aPvOfs;
+ }
+ break;
+
+ case 1 :
+ {
+ // TopLeft-Spot
+ aSpotPos[i] = aSnapRect.TopLeft();
+ aSpotPos[i].X() += nWidth14;
+ aSpotPos[i].Y() += nHeight14;
+ aSpotPos[i] += aPvOfs;
+ }
+ break;
+
+ case 2 :
+ {
+ // TopRight-Spot
+ aSpotPos[i] = aSnapRect.TopLeft();
+ aSpotPos[i].X() += nWidth34;
+ aSpotPos[i].Y() += nHeight14;
+ aSpotPos[i] += aPvOfs;
+ }
+ break;
+
+ case 3 :
+ {
+ // BottomLeft-Spot
+ aSpotPos[i] = aSnapRect.TopLeft();
+ aSpotPos[i].X() += nWidth14;
+ aSpotPos[i].Y() += nHeight34;
+ aSpotPos[i] += aPvOfs;
+ }
+ break;
+
+ case 4 :
+ {
+ // BottomRight-Spot
+ aSpotPos[i] = aSnapRect.TopLeft();
+ aSpotPos[i].X() += nWidth34;
+ aSpotPos[i].Y() += nHeight34;
+ aSpotPos[i] += aPvOfs;
+ }
+ break;
+
+ }
+
+ aSpotColor[i] = Color( COL_WHITE );
+ pPg->GetFillColor(aSpotPos[i], rVisiLayers, bLayerSortedRedraw, aSpotColor[i]);
+ }
+
+ USHORT aMatch[SPOTCOUNT];
+
+ for ( i = 0; i < SPOTCOUNT; i++ )
+ {
+ // Wurden gleiche Spot-Farben gefuden?
+ aMatch[i] = 0;
+
+ for ( USHORT j = 0; j < SPOTCOUNT; j++ )
+ {
+ if( j != i )
+ {
+ if( aSpotColor[i] == aSpotColor[j] )
+ {
+ aMatch[i]++;
+ }
+ }
+ }
+ }
+
+ // Das hoechste Gewicht hat der Spot in der Mitte
+ aBackground = aSpotColor[0];
+
+ for ( USHORT nMatchCount = SPOTCOUNT - 1; nMatchCount > 1; nMatchCount-- )
+ {
+ // Welche Spot-Farbe wurde am haeufigsten gefunden?
+ for ( USHORT i = 0; i < SPOTCOUNT; i++ )
+ {
+ if( aMatch[i] == nMatchCount )
+ {
+ aBackground = aSpotColor[i];
+ nMatchCount = 1; // Abbruch auch der aeusseren for-Schleife
+ break;
+ }
+ }
+ }
+ }
+
+ return aBackground;
+}
+
+OutlinerView* SdrObjEditView::ImpMakeOutlinerView(Window* pWin, BOOL bNoPaint, OutlinerView* pGivenView) const
+{
+ // Hintergrund
+ Color aBackground(ImpGetTextEditBackgroundColor());
+ SdrTextObj* pText=PTR_CAST(SdrTextObj,pTextEditObj);
+ BOOL bTextFrame=pText!=NULL && pText->IsTextFrame();
+ BOOL bContourFrame=pText!=NULL && pText->IsContourTextFrame();
+ // OutlinerView erzeugen
+ OutlinerView* pOutlView=pGivenView;
+ pTextEditOutliner->SetUpdateMode(FALSE);
+ if (pOutlView==NULL) pOutlView=new OutlinerView(pTextEditOutliner,pWin);
+ else pOutlView->SetWindow(pWin);
+ // Scrollen verbieten
+ ULONG nStat=pOutlView->GetControlWord();
+ nStat&=~EV_CNTRL_AUTOSCROLL;
+ // AutoViewSize nur wenn nicht KontourFrame.
+ if (!bContourFrame) nStat|=EV_CNTRL_AUTOSIZE;
+ if (bTextFrame) {
+ USHORT nPixSiz=aHdl.GetHdlSize()*2+1;
+ nStat|=EV_CNTRL_INVONEMORE;
+ pOutlView->SetInvalidateMore(nPixSiz);
+ }
+ pOutlView->SetControlWord(nStat);
+ pOutlView->SetBackgroundColor( aBackground );
+ if (pText!=NULL) {
+ pOutlView->SetAnchorMode((EVAnchorMode)(pText->GetOutlinerViewAnchorMode()));
+ }
+ pOutlView->SetOutputArea(aTextEditArea);
+ pTextEditOutliner->SetUpdateMode(TRUE);
+ ImpPaintOutlinerView(*pOutlView,NULL,TRUE);
+ return pOutlView;
+}
+
+BOOL SdrObjEditView::IsTextEditFrame() const
+{
+ SdrTextObj* pText=PTR_CAST(SdrTextObj,pTextEditObj);
+ return pText!=NULL && pText->IsTextFrame();
+}
+
+IMPL_LINK(SdrObjEditView,ImpOutlinerStatusEventHdl,EditStatus*,pEditStat)
+{
+ if (pTextEditOutliner==NULL || pTextEditObj==NULL) return 0;
+ ULONG nStat=pEditStat->GetStatusWord();
+ BOOL bGrowX=(nStat & EE_STAT_TEXTWIDTHCHANGED) !=0;
+ BOOL bGrowY=(nStat & EE_STAT_TEXTHEIGHTCHANGED) !=0;
+ SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pTextEditObj);
+ BOOL bTextFrame=pTextObj!=NULL && pTextObj->IsTextFrame();
+ if (!bTextFrame || (!bGrowX && !bGrowY)) return 0;
+ BOOL bAutoGrowHgt=bTextFrame && pTextObj->IsAutoGrowHeight();
+ BOOL bAutoGrowWdt=bTextFrame && pTextObj->IsAutoGrowWidth();
+
+ if ((bGrowX && bAutoGrowWdt) || (bGrowY && bAutoGrowHgt)) {
+ if (pTextObj->AdjustTextFrameWidthAndHeight()) {
+ }
+ }
+ return 0;
+}
+
+IMPL_LINK(SdrObjEditView,ImpOutlinerCalcFieldValueHdl,EditFieldInfo*,pFI)
+{
+ BOOL bOk=FALSE;
+ String& rStr=pFI->GetRepresentation();
+ rStr.Erase();
+ SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pTextEditObj);
+ if (pTextObj!=NULL) {
+ Color* pTxtCol=NULL;
+ Color* pFldCol=NULL;
+ bOk=pTextObj->CalcFieldValue(pFI->GetField(),pFI->GetPara(),pFI->GetPos(),TRUE,pTxtCol,pFldCol,rStr);
+ if (bOk) {
+ if (pTxtCol!=NULL) {
+ pFI->SetTxtColor(*pTxtCol);
+ delete pTxtCol;
+ }
+ if (pFldCol!=NULL) {
+ pFI->SetFldColor(*pFldCol);
+ delete pFldCol;
+ } else {
+ pFI->SetFldColor(Color(COL_LIGHTGRAY)); // kann spaeter (357) raus
+ }
+ }
+ }
+ Outliner& rDrawOutl=pMod->GetDrawOutliner(pTextObj);
+ Link aDrawOutlLink=rDrawOutl.GetCalcFieldValueHdl();
+ if (!bOk && aDrawOutlLink.IsSet()) {
+ aDrawOutlLink.Call(pFI);
+ bOk = (BOOL)rStr.Len();
+ }
+ if (!bOk && aOldCalcFieldValueLink.IsSet()) {
+ return aOldCalcFieldValueLink.Call(pFI);
+ }
+ return 0;
+}
+
+BOOL SdrObjEditView::BegTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
+ SdrOutliner* pGivenOutliner, OutlinerView* pGivenOutlinerView,
+ BOOL bDontDeleteOutliner, BOOL bOnlyOneView)
+{
+ return BegTextEdit(pObj,pPV,pWin,FALSE,pGivenOutliner,pGivenOutlinerView,bDontDeleteOutliner,bOnlyOneView);
+}
+
+BOOL SdrObjEditView::BegTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, BOOL bIsNewObj,
+ SdrOutliner* pGivenOutliner, OutlinerView* pGivenOutlinerView,
+ BOOL bDontDeleteOutliner, BOOL bOnlyOneView)
+{
+ EndTextEdit();
+ if (!HAS_BASE(SdrTextObj,pObj)) return FALSE; // z.Zt. nur mit meinen Textobjekten
+ bTextEditDontDelete=bDontDeleteOutliner && pGivenOutliner!=NULL;
+ bTextEditOnlyOneView=bOnlyOneView;
+ bTextEditNewObj=bIsNewObj;
+ USHORT nWinAnz=GetWinCount();
+ USHORT i;
+ BOOL bBrk=FALSE;
+ // Abbruch, wenn kein Objekt angegeben.
+ if (pObj==NULL) bBrk=TRUE;
+ if (!bBrk && pWin==NULL) {
+ for (i=0; i<nWinAnz && pWin==NULL; i++) {
+ OutputDevice* pOut=GetWin(i);
+ if (pOut->GetOutDevType()==OUTDEV_WINDOW) pWin=(Window*)pOut;
+ }
+ // Abbruch, wenn kein Window da.
+ if (pWin==NULL) bBrk=TRUE;
+ }
+ if (!bBrk && pPV==NULL) {
+ SdrPage* pPage=pObj->GetPage();
+ pPV=GetPageView(pPage);
+ // Abbruch, wenn keine PageView zu dem Objekt vorhanden.
+ if (pPV==NULL) bBrk=TRUE;
+ }
+ if (pObj!=NULL && pPV!=NULL) {
+ // Kein TextEdit an Objekten im gesperrten Layer
+ if (pPV->GetLockedLayers().IsSet(pObj->GetLayer())) {
+ bBrk=TRUE;
+ }
+ }
+
+ if (pTextEditOutliner!=NULL) {
+ DBG_ERROR("SdrObjEditView::BegTextEdit() da stand noch ein alter Outliner rum");
+ delete pTextEditOutliner;
+ pTextEditOutliner=NULL;
+ }
+
+ if (!bBrk) {
+ pTextEditWin=pWin;
+ pTextEditPV=pPV;
+ pTextEditObj=pObj;
+ pTextEditOutliner=pGivenOutliner;
+ if (pTextEditOutliner==NULL)
+ pTextEditOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, pTextEditObj->GetModel() );
+
+ BOOL bEmpty=pTextEditObj->GetOutlinerParaObject()==NULL;
+
+ aOldCalcFieldValueLink=pTextEditOutliner->GetCalcFieldValueHdl();
+ // Der FieldHdl muss von BegTextEdit gesetzt sein, da dor ein UpdateFields gerufen wird.
+ pTextEditOutliner->SetCalcFieldValueHdl(LINK(this,SdrObjEditView,ImpOutlinerCalcFieldValueHdl));
+ if (pTextEditObj->BegTextEdit(*pTextEditOutliner)) {
+ // alten Cursor merken
+ if (pTextEditOutliner->GetViewCount()!=0) {
+ OutlinerView* pTmpOLV=pTextEditOutliner->RemoveView(ULONG(0));
+ if (pTmpOLV!=NULL && pTmpOLV!=pGivenOutlinerView) delete pTmpOLV;
+ }
+ // EditArea ueberTakeTextEditArea bestimmen
+ // Das koennte eigentlich entfallen, da TakeTextRect() die Berechnung der aTextEditArea vornimmt
+ // Die aMinTextEditArea muss jedoch wohl auch erfolgen (darum bleibt es voerst drinnen)
+ ((SdrTextObj*)pTextEditObj)->TakeTextEditArea(NULL,NULL,&aTextEditArea,&aMinTextEditArea);
+
+ Rectangle aTextRect;
+ Rectangle aAnchorRect;
+ ((SdrTextObj*)pTextEditObj)->TakeTextRect(*pTextEditOutliner, aTextRect, TRUE, &aAnchorRect, FALSE);
+
+ if ( !((SdrTextObj*)pTextEditObj)->IsContourTextFrame() )
+ {
+ // FitToSize erstmal nicht mit ContourFrame
+ SdrFitToSizeType eFit = ((SdrTextObj*)pTextEditObj)->GetFitToSize();
+ if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES)
+ aTextRect = aAnchorRect;
+ }
+
+ aTextEditArea = aTextRect;
+
+ Point aPvOfs(pTextEditPV->GetOffset());
+ aTextEditArea.Move(aPvOfs.X(),aPvOfs.Y());
+ aMinTextEditArea.Move(aPvOfs.X(),aPvOfs.Y());
+ pTextEditCursorMerker=pWin->GetCursor();
+
+ aHdl.SetMoveOutside(TRUE);
+ RefreshAllIAOManagers();
+
+ pTextEditOutlinerView=ImpMakeOutlinerView(pWin,!bEmpty,pGivenOutlinerView);
+ pTextEditOutliner->InsertView(pTextEditOutlinerView,0);
+
+ aHdl.SetMoveOutside(FALSE);
+ aHdl.SetMoveOutside(TRUE);
+ RefreshAllIAOManagers();
+
+ // alle Wins als OutlinerView beim Outliner anmelden
+ if (!bOnlyOneView) {
+ for (i=0; i<nWinAnz; i++) {
+ OutputDevice* pOut=GetWin(i);
+ if (pOut!=pWin && pOut->GetOutDevType()==OUTDEV_WINDOW) {
+ OutlinerView* pOutlView=ImpMakeOutlinerView((Window*)pOut,!bEmpty,NULL);
+ pTextEditOutliner->InsertView(pOutlView,i);
+ }
+ }
+ }
+ pWin->GrabFocus(); // Damit der Cursor hier auch blinkt
+ pTextEditOutlinerView->ShowCursor();
+ pTextEditOutliner->SetStatusEventHdl(LINK(this,SdrObjEditView,ImpOutlinerStatusEventHdl));
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ pTextEditOutliner->ClearModifyFlag();
+ return TRUE; // Gut gelaufen, TextEdit laeuft nun
+ } else {
+ bBrk=TRUE;
+ pTextEditOutliner->SetCalcFieldValueHdl(aOldCalcFieldValueLink);
+ }
+ }
+ // wenn hier angekommen, dann ist irgendwas schief gelaufen
+ if (!bDontDeleteOutliner) {
+ if (pGivenOutliner!=NULL) { delete pGivenOutliner; pTextEditOutliner=NULL; }
+ if (pGivenOutlinerView!=NULL) delete pGivenOutlinerView;
+ }
+ if (pTextEditOutliner!=NULL) delete pTextEditOutliner;
+ pTextEditOutliner=NULL;
+ pTextEditOutlinerView=NULL;
+ pTextEditObj=NULL;
+ pTextEditPV=NULL;
+ pTextEditWin=NULL;
+ if (bMarkHdlWhenTextEdit) {
+ HideMarkHdl(NULL);
+ }
+ aHdl.SetMoveOutside(FALSE);
+ RefreshAllIAOManagers();
+ ShowMarkHdl(NULL);
+ return FALSE;
+}
+
+SdrEndTextEditKind SdrObjEditView::EndTextEdit(BOOL bDontDeleteReally)
+{
+ SdrEndTextEditKind eRet=SDRENDTEXTEDIT_UNCHANGED;
+ SdrObject* pTEObj =pTextEditObj;
+ SdrPageView* pTEPV =pTextEditPV;
+ Window* pTEWin =pTextEditWin;
+ SdrOutliner* pTEOutliner =pTextEditOutliner;
+ OutlinerView* pTEOutlinerView=pTextEditOutlinerView;
+ Cursor* pTECursorMerker=pTextEditCursorMerker;
+
+ pTextEditObj=NULL;
+ pTextEditPV=NULL;
+ pTextEditWin=NULL;
+ pTextEditOutliner=NULL;
+ pTextEditOutlinerView=NULL;
+ pTextEditCursorMerker=NULL;
+ aTextEditArea=Rectangle();
+
+ if (pTEOutliner!=NULL) {
+ BOOL bModified=pTEOutliner->IsModified();
+ if (pTEOutlinerView!=NULL) {
+ pTEOutlinerView->CompleteAutoCorrect(); // #43095#
+ pTEOutlinerView->HideCursor();
+ }
+ if (pTEObj!=NULL) {
+ pTEOutliner->CompleteOnlineSpelling();
+ Point aPvOfs(pTEPV->GetOffset());
+ SdrUndoObjSetText* pTxtUndo=bModified ? new SdrUndoObjSetText(*pTEObj) : NULL;
+ // Den alten CalcFieldValue-Handler wieder setzen
+ // Muss vor Obj::EndTextEdit() geschehen, da dort ein UpdateFields() gemacht wird.
+ pTEOutliner->SetCalcFieldValueHdl(aOldCalcFieldValueLink);
+
+ pTEObj->EndTextEdit(*pTEOutliner);
+
+ if ( pTEObj->GetRotateAngle() != 0 )
+ pTEObj->SendRepaintBroadcast(); // Sonst wird nicht alles restauriert
+
+ if (pTxtUndo!=NULL) {
+ pTxtUndo->AfterSetText();
+ if (!pTxtUndo->IsDifferent()) { delete pTxtUndo; pTxtUndo=NULL; }
+ }
+ // Loeschung des gesamten TextObj checken
+ SdrUndoDelObj* pDelUndo=NULL;
+ BOOL bDelObj=FALSE;
+ SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pTEObj);
+ if (pTextObj!=NULL && bTextEditNewObj) {
+ bDelObj=pTextObj->IsTextFrame() &&
+ pTextObj->GetOutlinerParaObject()==NULL &&
+ !pTextObj->IsEmptyPresObj() &&
+ !pTextObj->HasFill() &&
+ !pTextObj->HasLine();
+ if (pTEObj->IsInserted() && bDelObj && pTextObj->GetObjInventor()==SdrInventor && !bDontDeleteReally) {
+ SdrObjKind eIdent=(SdrObjKind)pTextObj->GetObjIdentifier();
+ if (eIdent==OBJ_TEXT || eIdent==OBJ_TEXTEXT) {
+ pDelUndo=new SdrUndoDelObj(*pTEObj);
+ }
+ }
+ }
+ XubString aObjName;
+ pTEObj->TakeObjNameSingul(aObjName);
+ BegUndo(ImpGetResStr(STR_UndoObjSetText),aObjName);
+ if (pTxtUndo!=NULL) { AddUndo(pTxtUndo); eRet=SDRENDTEXTEDIT_CHANGED; }
+ if (pDelUndo!=NULL) {
+ AddUndo(pDelUndo);
+ eRet=SDRENDTEXTEDIT_DELETED;
+ DBG_ASSERT(pTEObj->GetObjList()!=NULL,"SdrObjEditView::EndTextEdit(): Fatal: Editiertes Objekt hat keine ObjList!");
+ if (pTEObj->GetObjList()!=NULL) {
+ pTEObj->GetObjList()->RemoveObject(pTEObj->GetOrdNum());
+ CheckMarked(); // und gleich die Maekierung entfernen...
+ }
+ } else if (bDelObj) { // Fuer den Writer: Loeschen muss die App nachholen.
+ eRet=SDRENDTEXTEDIT_SHOULDBEDELETED;
+ }
+ EndUndo(); // EndUndo hinter Remove, falls der UndoStack gleich weggehaun' wird
+ }
+ // alle OutlinerViews loeschen
+ for (ULONG i=pTEOutliner->GetViewCount(); i>0;) {
+ i--;
+ OutlinerView* pOLV=pTEOutliner->GetView(i);
+ USHORT nMorePix=pOLV->GetInvalidateMore();
+ Window* pWin=pOLV->GetWindow();
+ Rectangle aRect(pOLV->GetOutputArea());
+ pTEOutliner->RemoveView(i);
+ if (!bTextEditDontDelete || i!=0) {
+ // die nullte gehoert mir u.U. nicht.
+ delete pOLV;
+ }
+ aRect.Union(aTextEditArea);
+ aRect.Union(aMinTextEditArea);
+ aRect=pWin->LogicToPixel(aRect);
+ aRect.Left()-=nMorePix;
+ aRect.Top()-=nMorePix;
+ aRect.Right()+=nMorePix;
+ aRect.Bottom()+=nMorePix;
+ aRect=pWin->PixelToLogic(aRect);
+ InvalidateOneWin(*pWin,aRect);
+ }
+ // und auch den Outliner selbst
+ if (!bTextEditDontDelete) delete pTEOutliner;
+ else pTEOutliner->Clear();
+ if (pTEWin!=NULL) {
+ pTEWin->SetCursor(pTECursorMerker);
+ }
+ if (bMarkHdlWhenTextEdit) {
+ HideMarkHdl(NULL);
+ }
+ aHdl.SetMoveOutside(FALSE);
+ RefreshAllIAOManagers();
+ if (eRet==SDRENDTEXTEDIT_UNCHANGED) {
+ ShowMarkHdl(NULL); // Handles kommen ansonsten via Broadcast
+ } else aMark.SetNameDirty();
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ }
+ return eRet;
+}
+
+OutlinerView* SdrObjEditView::ImpFindOutlinerView(Window* pWin) const
+{
+ if (pWin==NULL) return NULL;
+ if (pTextEditOutliner==NULL) return NULL;
+ OutlinerView* pNewView=NULL;
+ ULONG nWinAnz=pTextEditOutliner->GetViewCount();
+ for (ULONG i=0; i<nWinAnz && pNewView==NULL; i++) {
+ OutlinerView* pView=pTextEditOutliner->GetView(i);
+ if (pView->GetWindow()==pWin) pNewView=pView;
+ }
+ return pNewView;
+}
+
+void SdrObjEditView::SetTextEditWin(Window* pWin)
+{
+ if (pTextEditObj!=NULL && pWin!=NULL && pWin!=pTextEditWin) {
+ OutlinerView* pNewView=ImpFindOutlinerView(pWin);
+ if (pNewView!=NULL && pNewView!=pTextEditOutlinerView) {
+ if (pTextEditOutlinerView!=NULL) {
+ pTextEditOutlinerView->HideCursor();
+ }
+ pTextEditOutlinerView=pNewView;
+ pTextEditWin=pWin;
+ pWin->GrabFocus(); // Damit der Cursor hier auch blinkt
+ pNewView->ShowCursor();
+ ImpMakeTextCursorAreaVisible();
+ }
+ }
+}
+
+BOOL SdrObjEditView::IsTextEditHit(const Point& rHit, short nTol) const
+{
+ BOOL bOk=FALSE;
+ if (pTextEditObj!=NULL) {
+ nTol=ImpGetHitTolLogic(nTol,NULL);
+ // nur drittel Toleranz hier, damit die Handles
+ // noch vernuenftig getroffen werden koennen
+ nTol=nTol/3;
+ nTol=0; // Joe am 6.3.1997: Keine Hittoleranz mehr hier
+ if (!bOk) {
+ Rectangle aEditArea;
+ OutlinerView* pOLV=pTextEditOutliner->GetView(0);
+ if (pOLV!=NULL) {
+ aEditArea.Union(pOLV->GetOutputArea());
+ }
+ aEditArea.Left()-=nTol;
+ aEditArea.Top()-=nTol;
+ aEditArea.Right()+=nTol;
+ aEditArea.Bottom()+=nTol;
+ bOk=aEditArea.IsInside(rHit);
+ if (bOk) { // Nun noch checken, ob auch wirklich Buchstaben getroffen wurden
+ Point aPnt(rHit); aPnt-=aEditArea.TopLeft();
+ long nHitTol = 2000;
+ OutputDevice* pRef = pTextEditOutliner->GetRefDevice();
+ if( pRef )
+ nHitTol = pRef->LogicToLogic( nHitTol, MAP_100TH_MM, pRef->GetMapMode().GetMapUnit() );
+
+ bOk = pTextEditOutliner->IsTextPos( aPnt, nHitTol );
+ }
+ }
+ }
+ return bOk;
+}
+
+BOOL SdrObjEditView::IsTextEditFrameHit(const Point& rHit) const
+{
+ BOOL bOk=FALSE;
+ if (pTextEditObj!=NULL) {
+ SdrTextObj* pText=PTR_CAST(SdrTextObj,pTextEditObj);
+ OutlinerView* pOLV=pTextEditOutliner->GetView(0);
+ if( pOLV )
+ {
+ Window* pWin=pOLV->GetWindow();
+ if (pText!=NULL && pText->IsTextFrame() && pOLV!=NULL && pWin!=NULL) {
+ USHORT nPixSiz=pOLV->GetInvalidateMore();
+ Rectangle aEditArea(aMinTextEditArea);
+ aEditArea.Union(pOLV->GetOutputArea());
+ if (!aEditArea.IsInside(rHit)) {
+ Size aSiz(pWin->PixelToLogic(Size(nPixSiz,nPixSiz)));
+ aEditArea.Left()-=aSiz.Width();
+ aEditArea.Top()-=aSiz.Height();
+ aEditArea.Right()+=aSiz.Width();
+ aEditArea.Bottom()+=aSiz.Height();
+ bOk=aEditArea.IsInside(rHit);
+ }
+ }
+ }
+ }
+ return bOk;
+}
+
+void SdrObjEditView::AddTextEditOfs(MouseEvent& rMEvt) const
+{
+ if (pTextEditObj!=NULL) {
+ Point aPvOfs(pTextEditPV->GetOffset());
+ Point aObjOfs(pTextEditObj->GetLogicRect().TopLeft());
+ (Point&)(rMEvt.GetPosPixel())+=aPvOfs+aObjOfs;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrObjEditView::KeyInput(const KeyEvent& rKEvt, Window* pWin)
+{
+ if(pTextEditOutlinerView)
+ {
+ if(rKEvt.GetKeyCode().GetCode() == KEY_RETURN && pTextEditOutliner->GetParagraphCount() == 1)
+ {
+ ByteString aLine(
+ pTextEditOutliner->GetText(pTextEditOutliner->GetParagraph( 0 ), 1),
+ gsl_getSystemTextEncoding());
+ aLine = aLine.ToUpperAscii();
+
+ if(aLine == "HELLO JOE, PLEASE SHOW THE ITEMBROWSER")
+ ShowItemBrowser();
+ }
+ if (pTextEditOutlinerView->PostKeyEvent(rKEvt))
+ {
+ if( pMod && !pMod->IsChanged() )
+ {
+ if( pTextEditOutliner && pTextEditOutliner->IsModified() )
+ pMod->SetChanged( TRUE );
+ }
+
+ if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ ImpMakeTextCursorAreaVisible();
+ return TRUE;
+ }
+ }
+ return SdrGlueEditView::KeyInput(rKEvt,pWin);
+}
+
+BOOL SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, Window* pWin)
+{
+ if (pTextEditOutlinerView!=NULL) {
+ BOOL bPostIt=pTextEditOutliner->IsInSelectionMode();
+ if (!bPostIt) {
+ Point aPt(rMEvt.GetPosPixel());
+ if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
+ else if (pTextEditWin!=NULL) aPt=pTextEditWin->PixelToLogic(aPt);
+ bPostIt=IsTextEditHit(aPt,nHitTolLog);
+ }
+ if (bPostIt) {
+ Point aPixPos(rMEvt.GetPosPixel());
+ Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
+ if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
+ if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
+ if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
+ if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
+ MouseEvent aMEvt(aPixPos,rMEvt.GetClicks(),rMEvt.GetMode(),
+ rMEvt.GetButtons(),rMEvt.GetModifier());
+ if (pTextEditOutlinerView->MouseButtonDown(aMEvt)) {
+ if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ ImpMakeTextCursorAreaVisible();
+ return TRUE;
+ }
+ }
+ }
+ return SdrGlueEditView::MouseButtonDown(rMEvt,pWin);
+}
+
+BOOL SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, Window* pWin)
+{
+ if (pTextEditOutlinerView!=NULL) {
+ BOOL bPostIt=pTextEditOutliner->IsInSelectionMode();
+ if (!bPostIt) {
+ Point aPt(rMEvt.GetPosPixel());
+ if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
+ else if (pTextEditWin!=NULL) aPt=pTextEditWin->PixelToLogic(aPt);
+ bPostIt=IsTextEditHit(aPt,nHitTolLog);
+ }
+ if (bPostIt) {
+ Point aPixPos(rMEvt.GetPosPixel());
+ Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
+ if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
+ if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
+ if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
+ if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
+ MouseEvent aMEvt(aPixPos,rMEvt.GetClicks(),rMEvt.GetMode(),
+ rMEvt.GetButtons(),rMEvt.GetModifier());
+ if (pTextEditOutlinerView->MouseButtonUp(aMEvt)) {
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ ImpMakeTextCursorAreaVisible();
+ return TRUE;
+ }
+ }
+ }
+ return SdrGlueEditView::MouseButtonUp(rMEvt,pWin);
+}
+
+BOOL SdrObjEditView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
+{
+ if (pTextEditOutlinerView!=NULL) {
+ BOOL bSelMode=pTextEditOutliner->IsInSelectionMode();
+ BOOL bPostIt=bSelMode;
+ if (!bPostIt) {
+ Point aPt(rMEvt.GetPosPixel());
+ if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
+ else if (pTextEditWin!=NULL) aPt=pTextEditWin->PixelToLogic(aPt);
+ bPostIt=IsTextEditHit(aPt,nHitTolLog);
+ }
+ if (bPostIt) {
+ Point aPixPos(rMEvt.GetPosPixel());
+ Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
+ if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
+ if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
+ if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
+ if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
+ MouseEvent aMEvt(aPixPos,rMEvt.GetClicks(),rMEvt.GetMode(),
+ rMEvt.GetButtons(),rMEvt.GetModifier());
+ if (pTextEditOutlinerView->MouseMove(aMEvt) && bSelMode) {
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ ImpMakeTextCursorAreaVisible();
+ return TRUE;
+ }
+ }
+ }
+ return SdrGlueEditView::MouseMove(rMEvt,pWin);
+}
+
+BOOL SdrObjEditView::Command(const CommandEvent& rCEvt, Window* pWin)
+{
+ // solange bis die OutlinerView einen BOOL zurueckliefert
+ // bekommt sie nur COMMAND_STARTDRAG
+ if (pTextEditOutlinerView!=NULL)
+ {
+ if (rCEvt.GetCommand()==COMMAND_STARTDRAG) {
+ BOOL bPostIt=pTextEditOutliner->IsInSelectionMode() || !rCEvt.IsMouseEvent();
+ if (!bPostIt && rCEvt.IsMouseEvent()) {
+ Point aPt(rCEvt.GetMousePosPixel());
+ if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
+ else if (pTextEditWin!=NULL) aPt=pTextEditWin->PixelToLogic(aPt);
+ bPostIt=IsTextEditHit(aPt,nHitTolLog);
+ }
+ if (bPostIt) {
+ Point aPixPos(rCEvt.GetMousePosPixel());
+ if (rCEvt.IsMouseEvent()) {
+ Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
+ if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
+ if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
+ if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
+ if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
+ }
+ CommandEvent aCEvt(aPixPos,rCEvt.GetCommand(),rCEvt.IsMouseEvent());
+ // Command ist an der OutlinerView leider void
+ pTextEditOutlinerView->Command(aCEvt);
+ if (pWin!=NULL && pWin!=pTextEditWin) SetTextEditWin(pWin);
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ ImpMakeTextCursorAreaVisible();
+ return TRUE;
+ }
+ }
+ else // if (rCEvt.GetCommand() == COMMAND_VOICE )
+ {
+ pTextEditOutlinerView->Command(rCEvt);
+ return TRUE;
+ }
+ }
+ return SdrGlueEditView::Command(rCEvt,pWin);
+}
+
+BOOL SdrObjEditView::Cut(ULONG nFormat)
+{
+ if (pTextEditOutliner!=NULL) {
+ pTextEditOutlinerView->Cut();
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ ImpMakeTextCursorAreaVisible();
+ return TRUE;
+ } else {
+ return SdrGlueEditView::Cut(nFormat);
+ }
+}
+
+BOOL SdrObjEditView::Yank(ULONG nFormat)
+{
+ if (pTextEditOutliner!=NULL) {
+ pTextEditOutlinerView->Copy();
+ return TRUE;
+ } else {
+ return SdrGlueEditView::Yank(nFormat);
+ }
+}
+
+BOOL SdrObjEditView::Paste(Window* pWin, ULONG nFormat)
+{
+ if (pTextEditOutliner!=NULL) {
+ if (pWin!=NULL) {
+ OutlinerView* pNewView=ImpFindOutlinerView(pWin);
+ if (pNewView!=NULL) {
+ pNewView->Paste();
+ }
+ } else {
+ pTextEditOutlinerView->Paste();
+ }
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ ImpMakeTextCursorAreaVisible();
+ return TRUE;
+ } else {
+ return SdrGlueEditView::Paste(pWin,nFormat);
+ }
+}
+
+BOOL SdrObjEditView::QueryDrop(DropEvent& rDEvt, Window* pWin, ULONG nFormat, USHORT nItemNum)
+{
+ Point aPt(rDEvt.GetPosPixel());
+ if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
+ else if (pTextEditWin!=NULL) aPt=pTextEditWin->PixelToLogic(aPt);
+ if (IsTextEditHit(aPt,nHitTolLog)) {
+ OutlinerView* pNewView=ImpFindOutlinerView(pWin);
+ if (pNewView!=NULL) {
+ pNewView->QueryDrop(rDEvt);
+ } else {
+ if (pTextEditOutlinerView!=NULL) pTextEditOutlinerView->QueryDrop(rDEvt);
+ }
+ return TRUE;
+ }
+ return SdrGlueEditView::QueryDrop(rDEvt,pWin,nFormat,nItemNum);
+}
+
+BOOL SdrObjEditView::Drop(const DropEvent& rDEvt, Window* pWin, ULONG nFormat, USHORT nItemNum)
+{
+ Point aPt(rDEvt.GetPosPixel());
+ if (pWin!=NULL) aPt=pWin->PixelToLogic(aPt);
+ else if (pTextEditWin!=NULL) aPt=pTextEditWin->PixelToLogic(aPt);
+ if (IsTextEditHit(aPt,nHitTolLog)) {
+ OutlinerView* pNewView=ImpFindOutlinerView(pWin);
+ if (pNewView!=NULL) {
+ pNewView->Drop(rDEvt);
+ } else {
+ if (pTextEditOutlinerView!=NULL) pTextEditOutlinerView->Drop(rDEvt);
+ }
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ ImpMakeTextCursorAreaVisible();
+ return TRUE;
+ }
+ return SdrGlueEditView::Drop(rDEvt,pWin,nFormat,nItemNum);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrObjEditView::ImpIsTextEditAllSelected() const
+{
+ BOOL bRet=FALSE;
+ if (pTextEditOutliner!=NULL && pTextEditOutlinerView!=NULL) {
+ BOOL bEmpty=FALSE;
+ ULONG nParaAnz=pTextEditOutliner->GetParagraphCount();
+ Paragraph* p1stPara=pTextEditOutliner->GetParagraph( 0 );
+ Paragraph* pLastPara=pTextEditOutliner->GetParagraph( nParaAnz > 1 ? nParaAnz - 1 : 0 );
+ if (p1stPara==NULL) nParaAnz=0;
+ if (nParaAnz==1) { // bei nur einem Para nachsehen ob da ueberhaupt was drin steht
+ XubString aStr(pTextEditOutliner->GetText(p1stPara));
+
+ // Aha, steht nix drin!
+ if(!aStr.Len())
+ nParaAnz = 0;
+ }
+ bEmpty=nParaAnz==0;
+ if (!bEmpty) {
+ ESelection aESel(pTextEditOutlinerView->GetSelection());
+ if (aESel.nStartPara==0 && aESel.nStartPos==0 && aESel.nEndPara==USHORT(nParaAnz-1)) {
+ XubString aStr(pTextEditOutliner->GetText(pLastPara));
+
+ if(aStr.Len() == aESel.nEndPos)
+ bRet = TRUE;
+ }
+ // und nun auch noch fuer den Fall, das rueckwaerts selektiert wurde
+ if (!bRet && aESel.nEndPara==0 && aESel.nEndPos==0 && aESel.nStartPara==USHORT(nParaAnz-1)) {
+ XubString aStr(pTextEditOutliner->GetText(pLastPara));
+
+ if(aStr.Len() == aESel.nStartPos)
+ bRet = TRUE;
+ }
+ } else {
+ bRet=TRUE;
+ }
+ }
+ return bRet;
+}
+
+void SdrObjEditView::ImpMakeTextCursorAreaVisible()
+{
+ if (pTextEditOutlinerView!=NULL && pTextEditWin!=NULL) {
+ Cursor* pCsr=pTextEditWin->GetCursor();
+ if (pCsr!=NULL) {
+ Size aSiz(pCsr->GetSize());
+ if (aSiz.Width()!=0 && aSiz.Height()!=0) { // #38450#
+ MakeVisible(Rectangle(pCsr->GetPos(),aSiz),*pTextEditWin);
+ }
+ }
+ }
+}
+
+/* new interface src537 */
+BOOL SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr) const
+{
+ if(IsTextEdit())
+ {
+ DBG_ASSERT(pTextEditOutlinerView!=NULL,"SdrObjEditView::GetAttributes(): pTextEditOutlinerView=NULL");
+ DBG_ASSERT(pTextEditOutliner!=NULL,"SdrObjEditView::GetAttributes(): pTextEditOutliner=NULL");
+ pTextEditObj->TakeAttributes(rTargetSet, TRUE, bOnlyHardAttr);
+
+ if(pTextEditOutlinerView)
+ {
+ // FALSE= InvalidItems nicht al Default, sondern als "Loecher" betrachten
+ rTargetSet.Put(pTextEditOutlinerView->GetAttribs(), FALSE);
+ }
+
+ if(aMark.GetMarkCount()==1 && aMark.GetMark(0)->GetObj()==pTextEditObj)
+ {
+ MergeNotPersistAttrFromMarked(rTargetSet, bOnlyHardAttr);
+ }
+
+ return TRUE;
+ }
+ else
+ {
+ return SdrGlueEditView::GetAttributes(rTargetSet, bOnlyHardAttr);
+ }
+}
+
+BOOL SdrObjEditView::SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll)
+{
+ BOOL bRet=FALSE;
+ BOOL bTextEdit=pTextEditOutlinerView!=NULL;
+ BOOL bAllTextSelected=ImpIsTextEditAllSelected();
+ SfxItemSet* pModifiedSet=NULL;
+ const SfxItemSet* pSet=&rSet;
+ const SvxAdjustItem* pParaJust=NULL;
+ if (!bTextEdit) {
+ // Kein TextEdit aktiv -> alle Items ans Zeichenobjekt
+ bRet=SdrGlueEditView::SetAttributes(*pSet,bReplaceAll);
+ } else {
+#ifdef DBG_UTIL
+ {
+ BOOL bHasEEFeatureItems=FALSE;
+ SfxItemIter aIter(rSet);
+ const SfxPoolItem* pItem=aIter.FirstItem();
+ while (!bHasEEFeatureItems && pItem!=NULL) {
+ if (!IsInvalidItem(pItem)) {
+ USHORT nW=pItem->Which();
+ if (nW>=EE_FEATURE_START && nW<=EE_FEATURE_END) bHasEEFeatureItems=TRUE;
+ }
+ pItem=aIter.NextItem();
+ }
+
+ if(bHasEEFeatureItems)
+ {
+ String aMessage;
+ aMessage.AppendAscii("SdrObjEditView::SetAttributes(): Das setzen von EE_FEATURE-Items an der SdrView macht keinen Sinn! Es fuehrt nur zu Overhead und nicht mehr lesbaren Dokumenten.");
+ InfoBox(NULL, aMessage).Execute();
+ }
+ }
+#endif
+ BOOL bOnlyEEItems;
+ BOOL bNoEEItems=!SearchOutlinerItems(*pSet,bReplaceAll,&bOnlyEEItems);
+ // alles selektiert? -> Attrs auch an den Rahmen
+ // und falls keine EEItems, dann Attrs nur an den Rahmen
+ if (bAllTextSelected || bNoEEItems) {
+ String aStr;
+ ImpTakeDescriptionStr(STR_EditSetAttributes,aStr);
+ BegUndo(aStr);
+ AddUndo(new SdrUndoGeoObj(*pTextEditObj));
+ AddUndo(new SdrUndoAttrObj(*pTextEditObj,FALSE,!bNoEEItems));
+ EndUndo();
+ pTextEditObj->SetAttributes(*pSet,bReplaceAll);
+ FlushComeBackTimer(); // Damit ModeHasChanged sofort kommt
+ bRet=TRUE;
+ } else if (!bOnlyEEItems) { // sonst Set ggf. splitten
+ // Es wird nun ein ItemSet aSet gemacht, in den die EE_Items von
+ // *pSet nicht enhalten ist (ansonsten ist es eine Kopie).
+ USHORT* pNewWhichTable=RemoveWhichRange(pSet->GetRanges(),EE_ITEMS_START,EE_ITEMS_END);
+ SfxItemSet aSet(pMod->GetItemPool(),pNewWhichTable);
+ delete pNewWhichTable;
+ SfxWhichIter aIter(aSet);
+ USHORT nWhich=aIter.FirstWhich();
+ while (nWhich!=0) {
+ const SfxPoolItem* pItem;
+ SfxItemState eState=pSet->GetItemState(nWhich,FALSE,&pItem);
+ if (eState==SFX_ITEM_SET) aSet.Put(*pItem);
+ nWhich=aIter.NextWhich();
+ }
+ String aStr;
+ ImpTakeDescriptionStr(STR_EditSetAttributes,aStr);
+ BegUndo(aStr);
+ AddUndo(new SdrUndoGeoObj(*pTextEditObj));
+ AddUndo(new SdrUndoAttrObj(*pTextEditObj,FALSE,FALSE));
+ EndUndo();
+ pTextEditObj->SetAttributes(aSet,bReplaceAll);
+ if (aMark.GetMarkCount()==1 && aMark.GetMark(0)->GetObj()==pTextEditObj) {
+ SetNotPersistAttrToMarked(aSet,bReplaceAll);
+ }
+ FlushComeBackTimer();
+ bRet=TRUE;
+ }
+ if (!bNoEEItems) {
+ // und nun die Attribute auch noch an die EditEngine
+ if (bReplaceAll) {
+ // Am Outliner kann man leider nur alle Attribute platthauen
+ pTextEditOutlinerView->RemoveAttribs( TRUE );
+ }
+ pTextEditOutlinerView->SetAttribs(rSet);
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ ImpMakeTextCursorAreaVisible();
+ }
+ bRet=TRUE;
+ }
+ if (pModifiedSet!=NULL) delete pModifiedSet;
+ return bRet;
+}
+
+SfxStyleSheet* SdrObjEditView::GetStyleSheet(BOOL& rOk) const
+{
+ if ( pTextEditOutlinerView )
+ {
+ rOk=TRUE;
+ SfxStyleSheet* pSheet = pTextEditOutlinerView->GetStyleSheet();
+ return pSheet;
+ }
+ else
+ {
+ return SdrGlueEditView::GetStyleSheet(rOk);
+ }
+}
+
+BOOL SdrObjEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
+{
+ if (pTextEditOutlinerView!=NULL) {
+ BOOL bAllSelected=ImpIsTextEditAllSelected();
+ if (bAllSelected) {
+ String aStr;
+ if (pStyleSheet!=NULL) ImpTakeDescriptionStr(STR_EditSetStylesheet,aStr);
+ else ImpTakeDescriptionStr(STR_EditDelStylesheet,aStr);
+ BegUndo(aStr);
+ AddUndo(new SdrUndoGeoObj(*pTextEditObj));
+ AddUndo(new SdrUndoAttrObj(*pTextEditObj,TRUE,TRUE));
+ EndUndo();
+ pTextEditObj->SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
+ }
+ if (pStyleSheet!=NULL) {
+ // Der Outliner entfernt bei der Zuweisung eines StyleSheets immer
+ // dir entsprechenden harten Attribute. Jedoch nur vom Absatz,
+ // keine Zeichenattribute. Und genau so soll das scheinbar auch
+ // sein, auch wenn es nicht ganz meinem Interface entspricht.
+ // (Joe M. 27-11-1995)
+ pTextEditOutlinerView->SetStyleSheet(pStyleSheet);
+ }
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ ImpMakeTextCursorAreaVisible();
+ return TRUE;
+ } else {
+ return SdrGlueEditView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrObjEditView::AddWin(OutputDevice* pWin1)
+{
+ SdrGlueEditView::AddWin(pWin1);
+ if (pTextEditObj!=NULL && !bTextEditOnlyOneView && pWin1->GetOutDevType()==OUTDEV_WINDOW) {
+ OutlinerView* pOutlView=ImpMakeOutlinerView((Window*)pWin1,FALSE,NULL);
+ pTextEditOutliner->InsertView(pOutlView);
+ }
+}
+
+void SdrObjEditView::DelWin(OutputDevice* pWin1)
+{
+ SdrGlueEditView::DelWin(pWin1);
+ if (pTextEditObj!=NULL && !bTextEditOnlyOneView && pWin1->GetOutDevType()==OUTDEV_WINDOW) {
+ for (ULONG i=pTextEditOutliner->GetViewCount(); i>0;) {
+ i--;
+ OutlinerView* pOLV=pTextEditOutliner->GetView(i);
+ if (pOLV && pOLV->GetWindow()==(Window*)pWin1) {
+ delete pTextEditOutliner->RemoveView(i);
+ }
+ }
+ }
+}
+
+BOOL SdrObjEditView::IsTextEditInSelectionMode() const
+{
+ return pTextEditOutliner!=NULL && pTextEditOutliner->IsInSelectionMode();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@@@ @@@@ @@@@@ @@@@ @@ @@ @@@@ @@@@@ @@@@@
+// @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@ @@
+// @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@
+// @@@@@@@ @@@@@@ @@ @@@@@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@@@
+// @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@@@ @@ @@ @@@@ @@ @@ @@@@ @@@@@ @@@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrObjEditView::BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, Window* pWin)
+{
+ BOOL bRet=FALSE;
+ BrkMacroObj();
+ if (pObj!=NULL && pPV!=NULL && pWin!=NULL && pObj->HasMacro()) {
+ nTol=ImpGetHitTolLogic(nTol,NULL);
+ pMacroObj=pObj;
+ pMacroPV=pPV;
+ pMacroWin=pWin;
+ bMacroDown=FALSE;
+ nMacroTol=USHORT(nTol);
+ aMacroDownPos=rPnt;
+ aMacroDownPos-=pMacroPV->GetOffset();
+ MovMacroObj(rPnt);
+ }
+ return bRet;
+}
+
+void SdrObjEditView::ImpMacroUp(const Point& rUpPos)
+{
+ if (pMacroObj!=NULL && bMacroDown) {
+ pXOut->SetOutDev(pMacroWin);
+ BOOL bOn=IsShownXorVisible(pMacroWin);
+ if (bOn) HideShownXor(pMacroWin);
+ Point aOfs(pMacroPV->GetOffset());
+ pXOut->SetOffset(aOfs);
+ SdrObjMacroHitRec aHitRec;
+ aHitRec.aPos=rUpPos;
+ aHitRec.aDownPos=aMacroDownPos;
+ aHitRec.nTol=nMacroTol;
+ aHitRec.pVisiLayer=&pMacroPV->GetVisibleLayers();
+ aHitRec.pPageView=pMacroPV;
+ aHitRec.pOut=pMacroWin;
+ pMacroObj->PaintMacro(*pXOut,Rectangle(),aHitRec);
+ pXOut->SetOffset(Point(0,0));
+ if (bOn) ShowShownXor(pMacroWin);
+ bMacroDown=FALSE;
+ }
+}
+
+void SdrObjEditView::ImpMacroDown(const Point& rDownPos)
+{
+ if (pMacroObj!=NULL && !bMacroDown) {
+ pXOut->SetOutDev(pMacroWin);
+ BOOL bOn=IsShownXorVisible(pMacroWin);
+ if (bOn) HideShownXor(pMacroWin);
+ Point aOfs(pMacroPV->GetOffset());
+ pXOut->SetOffset(aOfs);
+ SdrObjMacroHitRec aHitRec;
+ aHitRec.aPos=rDownPos;
+ aHitRec.aDownPos=aMacroDownPos;
+ aHitRec.nTol=nMacroTol;
+ aHitRec.pVisiLayer=&pMacroPV->GetVisibleLayers();
+ aHitRec.pPageView=pMacroPV;
+ aHitRec.bDown=TRUE;
+ aHitRec.pOut=pMacroWin;
+ pMacroObj->PaintMacro(*pXOut,Rectangle(),aHitRec);
+ pXOut->SetOffset(Point(0,0));
+ if (bOn) ShowShownXor(pMacroWin);
+ bMacroDown=TRUE;
+ }
+}
+
+void SdrObjEditView::MovMacroObj(const Point& rPnt)
+{
+ if (pMacroObj!=NULL) {
+ Point aPnt(rPnt-pMacroPV->GetOffset());
+ SdrObjMacroHitRec aHitRec;
+ aHitRec.aPos=aPnt;
+ aHitRec.aDownPos=aMacroDownPos;
+ aHitRec.nTol=nMacroTol;
+ aHitRec.pVisiLayer=&pMacroPV->GetVisibleLayers();
+ aHitRec.pPageView=pMacroPV;
+ aHitRec.bDown=bMacroDown;
+ aHitRec.pOut=pMacroWin;
+ BOOL bDown=pMacroObj->IsMacroHit(aHitRec);
+ if (bDown) ImpMacroDown(aPnt);
+ else ImpMacroUp(aPnt);
+ }
+}
+
+void SdrObjEditView::BrkMacroObj()
+{
+ if (pMacroObj!=NULL) {
+ ImpMacroUp(aMacroDownPos);
+ pMacroObj=NULL;
+ pMacroPV=NULL;
+ pMacroWin=NULL;
+ }
+}
+
+BOOL SdrObjEditView::EndMacroObj()
+{
+ if (pMacroObj!=NULL && bMacroDown) {
+ ImpMacroUp(aMacroDownPos);
+ SdrObjMacroHitRec aHitRec;
+ aHitRec.aPos=aMacroDownPos;
+ aHitRec.aDownPos=aMacroDownPos;
+ aHitRec.nTol=nMacroTol;
+ aHitRec.pVisiLayer=&pMacroPV->GetVisibleLayers();
+ aHitRec.pPageView=pMacroPV;
+ aHitRec.bDown=TRUE;
+ aHitRec.pOut=pMacroWin;
+ BOOL bRet=pMacroObj->DoMacro(aHitRec);
+ pMacroObj=NULL;
+ pMacroPV=NULL;
+ pMacroWin=NULL;
+ return bRet;
+ } else {
+ BrkMacroObj();
+ return FALSE;
+ }
+}
+
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
new file mode 100644
index 0000000000..59bca06aa9
--- /dev/null
+++ b/svx/source/svdraw/svdetc.cxx
@@ -0,0 +1,946 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdetc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdetc.hxx"
+#include "svditext.hxx"
+#include "svdmodel.hxx"
+#include "svdtrans.hxx"
+#include "svdglob.hxx"
+#include "svdstr.hrc"
+#include "svdviter.hxx"
+#include "svdview.hxx"
+#include "svdoutl.hxx"
+
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+
+#ifndef _SV_BMPACC_HXX //autogen
+#include <vcl/bmpacc.hxx>
+#endif
+
+#ifndef _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _SV_CONFIG_HXX //autogen
+#include <vcl/config.hxx>
+#endif
+
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include "fontitem.hxx"
+#endif
+
+#ifndef _SVX_COLRITEM_HXX //autogen
+#include "colritem.hxx"
+#endif
+
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include "fhgtitem.hxx"
+#endif
+
+#ifndef _SVX__XGRADIENT_HXX //autogen
+#include "xgrad.hxx"
+#endif
+
+#ifndef SVX_XFILLIT0_HXX //autogen
+#include "xfillit0.hxx"
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX //autogen
+#include "xflclit.hxx"
+#endif
+
+#ifndef _SVX_XFLHTIT_HXX //autogen
+#include "xflhtit.hxx"
+#endif
+
+#ifndef _SVX_XBTMPIT_HXX //autogen
+#include "xbtmpit.hxx"
+#endif
+
+#ifndef _SVX_XFLGRIT_HXX //autogen
+#include "xflgrit.hxx"
+#endif
+
+#ifndef _SVDOOLE2_HXX //autogen
+#include "svdoole2.hxx"
+#endif
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+
+
+void ContainerSorter::DoSort(ULONG a, ULONG b) const
+{
+ ULONG nAnz=rCont.Count();
+ if (b>nAnz) b=nAnz;
+ if (b>0) b--;
+ if (a<b) ImpSubSort(a,b);
+}
+
+void ContainerSorter::Is1stLessThan2nd(const void* pElem1, const void* pElem2) const
+{
+}
+
+void ContainerSorter::ImpSubSort(long nL, long nR) const
+{
+ long i,j;
+ const void* pX;
+ void* pI;
+ void* pJ;
+ i=nL;
+ j=nR;
+ pX=rCont.GetObject((nL+nR)/2);
+ do {
+ pI=rCont.Seek(i);
+ while (pI!=pX && Compare(pI,pX)<0) { i++; pI=rCont.Next(); }
+ pJ=rCont.Seek(j);
+ while (pJ!=pX && Compare(pX,pJ)<0) { j--; pJ=rCont.Prev(); }
+ if (i<=j) {
+ rCont.Replace(pJ,i);
+ rCont.Replace(pI,j);
+ i++;
+ j--;
+ }
+ } while (i<=j);
+ if (nL<j) ImpSubSort(nL,j);
+ if (i<nR) ImpSubSort(i,nR);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpUShortContainerSorter: public ContainerSorter {
+public:
+ ImpUShortContainerSorter(Container& rNewCont): ContainerSorter(rNewCont) {}
+ virtual int Compare(const void* pElem1, const void* pElem2) const;
+};
+
+int ImpUShortContainerSorter::Compare(const void* pElem1, const void* pElem2) const
+{
+ USHORT n1=USHORT(ULONG(pElem1));
+ USHORT n2=USHORT(ULONG(pElem2));
+ return n1<n2 ? -1 : n1>n2 ? 1 : 0;
+}
+
+void UShortCont::Sort()
+{
+ ImpUShortContainerSorter aSorter(aArr);
+ aSorter.DoSort();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpClipMerk {
+ Region aClip;
+ FASTBOOL bClip;
+public:
+ ImpClipMerk(const OutputDevice& rOut): aClip(rOut.GetClipRegion()),bClip(rOut.IsClipRegion()) {}
+ void Restore(OutputDevice& rOut)
+ {
+ // Kein Clipping in die Metafileaufzeichnung
+ GDIMetaFile* pMtf=rOut.GetConnectMetaFile();
+ if (pMtf!=NULL && (!pMtf->IsRecord() || pMtf->IsPause())) pMtf=NULL;
+ if (pMtf!=NULL) pMtf->Pause(TRUE);
+ if (bClip) rOut.SetClipRegion(aClip);
+ else rOut.SetClipRegion();
+ if (pMtf!=NULL) pMtf->Pause(FALSE);
+ }
+};
+
+class ImpColorMerk {
+ Color aLineColor;
+ Color aFillColor;
+ Color aBckgrdColor;
+ Font aFont;
+public:
+ ImpColorMerk(const OutputDevice& rOut):
+ aLineColor( rOut.GetLineColor() ),
+ aFillColor( rOut.GetFillColor() ),
+ aBckgrdColor( rOut.GetBackground().GetColor() ),
+ aFont (rOut.GetFont()) {}
+
+ ImpColorMerk(const OutputDevice& rOut, USHORT nMode)
+ {
+ if ( (nMode & SDRHDC_SAVEPEN) == SDRHDC_SAVEPEN )
+ aLineColor = rOut.GetLineColor();
+
+ if ( (nMode & SDRHDC_SAVEBRUSH) == SDRHDC_SAVEBRUSH)
+ {
+ aFillColor = rOut.GetFillColor();
+ aBckgrdColor = rOut.GetBackground().GetColor();
+ }
+
+ if ( (nMode & SDRHDC_SAVEFONT) == SDRHDC_SAVEFONT)
+ aFont=rOut.GetFont();
+ }
+
+ void Restore(OutputDevice& rOut, USHORT nMode=SDRHDC_SAVEPENANDBRUSHANDFONT)
+ {
+ if ( (nMode & SDRHDC_SAVEPEN) == SDRHDC_SAVEPEN)
+ rOut.SetLineColor( aLineColor );
+
+ if ( (nMode & SDRHDC_SAVEBRUSH) == SDRHDC_SAVEBRUSH)
+ {
+ rOut.SetFillColor( aFillColor );
+ rOut.SetBackground( Wallpaper( aBckgrdColor ) );
+ }
+ if ((nMode & SDRHDC_SAVEFONT) ==SDRHDC_SAVEFONT)
+ {
+ if (!rOut.GetFont().IsSameInstance(aFont))
+ {
+ rOut.SetFont(aFont);
+ }
+ }
+ }
+
+ const Color& GetLineColor() const { return aLineColor; }
+};
+
+ImpSdrHdcMerk::ImpSdrHdcMerk(const OutputDevice& rOut, USHORT nNewMode, FASTBOOL bAutoMerk):
+ pFarbMerk(NULL),
+ pClipMerk(NULL),
+ pLineColorMerk(NULL),
+ nMode(nNewMode)
+{
+ if (bAutoMerk) Save(rOut);
+}
+
+ImpSdrHdcMerk::~ImpSdrHdcMerk()
+{
+ if (pFarbMerk!=NULL) delete pFarbMerk;
+ if (pClipMerk!=NULL) delete pClipMerk;
+ if (pLineColorMerk !=NULL) delete pLineColorMerk;
+}
+
+void ImpSdrHdcMerk::Save(const OutputDevice& rOut)
+{
+ if (pFarbMerk!=NULL)
+ {
+ delete pFarbMerk;
+ pFarbMerk=NULL;
+ }
+ if (pClipMerk!=NULL)
+ {
+ delete pClipMerk;
+ pClipMerk=NULL;
+ }
+ if (pLineColorMerk !=NULL)
+ {
+ delete pLineColorMerk ;
+ pLineColorMerk =NULL;
+ }
+ if ((nMode & SDRHDC_SAVECLIPPING) ==SDRHDC_SAVECLIPPING)
+ pClipMerk=new ImpClipMerk(rOut);
+
+ USHORT nCol=nMode & SDRHDC_SAVEPENANDBRUSHANDFONT;
+
+ if (nCol==SDRHDC_SAVEPEN)
+ pLineColorMerk=new Color( rOut.GetLineColor() );
+ else if (nCol==SDRHDC_SAVEPENANDBRUSHANDFONT)
+ pFarbMerk=new ImpColorMerk(rOut);
+ else if (nCol!=0)
+ pFarbMerk=new ImpColorMerk(rOut,nCol);
+}
+
+void ImpSdrHdcMerk::Restore(OutputDevice& rOut, USHORT nMask) const
+{
+ nMask&=nMode; // nur restaurieren, was auch gesichert wurde
+
+ if ((nMask & SDRHDC_SAVECLIPPING) ==SDRHDC_SAVECLIPPING && pClipMerk!=NULL)
+ pClipMerk->Restore(rOut);
+
+ USHORT nCol=nMask & SDRHDC_SAVEPENANDBRUSHANDFONT;
+
+ if (nCol==SDRHDC_SAVEPEN)
+ {
+ if (pLineColorMerk!=NULL)
+ rOut.SetLineColor(*pLineColorMerk);
+ else if (pFarbMerk!=NULL)
+ rOut.SetLineColor( pFarbMerk->GetLineColor() );
+ } else if (nCol!=0 && pFarbMerk!=NULL)
+ pFarbMerk->Restore(rOut,nCol);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrLinkList::Clear()
+{
+ unsigned nAnz=GetLinkCount();
+ for (unsigned i=0; i<nAnz; i++) {
+ delete (Link*)aList.GetObject(i);
+ }
+ aList.Clear();
+}
+
+unsigned SdrLinkList::FindEntry(const Link& rLink) const
+{
+ unsigned nAnz=GetLinkCount();
+ for (unsigned i=0; i<nAnz; i++) {
+ if (GetLink(i)==rLink) return i;
+ }
+ return 0xFFFF;
+}
+
+void SdrLinkList::InsertLink(const Link& rLink, unsigned nPos)
+{
+ unsigned nFnd=FindEntry(rLink);
+ if (nFnd==0xFFFF) {
+ if (rLink.IsSet()) {
+ aList.Insert(new Link(rLink),nPos);
+ } else {
+ DBG_ERROR("SdrLinkList::InsertLink(): Versuch, einen nicht gesetzten Link einzufuegen");
+ }
+ } else {
+ DBG_ERROR("SdrLinkList::InsertLink(): Link schon vorhanden");
+ }
+}
+
+void SdrLinkList::RemoveLink(const Link& rLink)
+{
+ unsigned nFnd=FindEntry(rLink);
+ if (nFnd!=0xFFFF) {
+ Link* pLink=(Link*)aList.Remove(nFnd);
+ delete pLink;
+ } else {
+ DBG_ERROR("SdrLinkList::RemoveLink(): Link nicht gefunden");
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
+{
+ XFillStyle eFill=((XFillStyleItem&)rSet.Get(XATTR_FILLSTYLE)).GetValue();
+ switch (eFill) {
+ case XFILL_SOLID: rCol=((XFillColorItem&)rSet.Get(XATTR_FILLCOLOR)).GetValue(); return TRUE;
+ case XFILL_HATCH: {
+ Color aCol1(((XFillHatchItem&)rSet.Get(XATTR_FILLHATCH)).GetValue().GetColor());
+ Color aCol2(COL_WHITE);
+
+ // What the hell is this old color mixing try from JOE? It's bloody WRONG
+ // USHORT nRt=(USHORT)(((ULONG)aCol1.GetRed ()+(ULONG)aCol2.GetRed ())/2);
+ // USHORT nGn=(USHORT)(((ULONG)aCol1.GetGreen()+(ULONG)aCol2.GetGreen())/2);
+ // USHORT nBl=(USHORT)(((ULONG)aCol1.GetBlue ()+(ULONG)aCol2.GetBlue ())/2);
+
+ UINT8 nRt = (UINT8)(((aCol1.GetRed() + 1)>>1) + (aCol2.GetRed()>>1));
+ UINT8 nGn = (UINT8)(((aCol1.GetGreen() + 1)>>1) + (aCol2.GetGreen()>>1));
+ UINT8 nBl = (UINT8)(((aCol1.GetBlue() + 1)>>1) + (aCol2.GetBlue()>>1));
+
+ rCol=Color(nRt,nGn,nBl);
+ return TRUE;
+ }
+ case XFILL_GRADIENT: {
+ const XGradient& rGrad=((XFillGradientItem&)rSet.Get(XATTR_FILLGRADIENT)).GetValue();
+ Color aCol1(rGrad.GetStartColor());
+ Color aCol2(rGrad.GetEndColor());
+
+ // Same here, look above.
+ UINT8 nRt = (UINT8)(((aCol1.GetRed() + 1)>>1) + (aCol2.GetRed()>>1));
+ UINT8 nGn = (UINT8)(((aCol1.GetGreen() + 1)>>1) + (aCol2.GetGreen()>>1));
+ UINT8 nBl = (UINT8)(((aCol1.GetBlue() + 1)>>1) + (aCol2.GetBlue()>>1));
+
+ rCol=Color(nRt,nGn,nBl);
+ return TRUE;
+ }
+ case XFILL_BITMAP: {
+ const Bitmap& rBmp=((XFillBitmapItem&)rSet.Get(XATTR_FILLBITMAP)).GetValue().GetBitmap();
+
+ Size aSiz(rBmp.GetSizePixel());
+ if (aSiz.Width()>0 && aSiz.Height()>0) {
+ if (aSiz.Width ()>8) aSiz.Width ()=8;
+ if (aSiz.Height()>8) aSiz.Height()=8;
+
+ ULONG nRt=0,nGn=0,nBl=0;
+
+ // in VCL koennen wir die Pixel von der Bitmap holen;
+ // alles wird gut... (KA 21.09.97)
+ Bitmap aBmp( rBmp );
+ BitmapReadAccess* pAcc = aBmp.AcquireReadAccess();
+
+ if( pAcc )
+ {
+ const long nWidth = aSiz.Width();
+ const long nHeight = aSiz.Height();
+
+ if( pAcc->HasPalette() )
+ {
+ for( long nY = 0L; nY < nHeight; nY++ )
+ {
+ for( long nX = 0L; nX < nWidth; nX++ )
+ {
+ const BitmapColor& rCol = pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) );
+ nRt+=rCol.GetRed(); nGn+=rCol.GetGreen(); nBl+=rCol.GetBlue();
+
+ }
+ }
+ }
+ else
+ {
+ for( long nY = 0L; nY < nHeight; nY++ )
+ {
+ for( long nX = 0L; nX < nWidth; nX++ )
+ {
+ const BitmapColor aCol( pAcc->GetPixel( nY, nX ) );
+ nRt+=aCol.GetRed(); nGn+=aCol.GetGreen(); nBl+=aCol.GetBlue();
+
+ }
+ }
+ }
+
+ aBmp.ReleaseAccess( pAcc );
+ }
+
+ unsigned nAnz=unsigned(aSiz.Width()*aSiz.Height());
+
+ // same problem here (see above), also no cropping, but good enough for
+ // now (was good enough since Jul 1998)
+ nRt/=nAnz;
+ nGn/=nAnz;
+ nBl/=nAnz;
+
+ rCol=Color(UINT8(nRt),UINT8(nGn),UINT8(nBl));
+ return TRUE;
+ }
+ }
+ } // switch
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrEngineDefaults::SdrEngineDefaults():
+ aFontName(System::GetStandardFont(STDFONT_ROMAN).GetName()),
+ eFontFamily(FAMILY_ROMAN),
+ aFontColor(COL_BLACK),
+ nFontHeight(847), // 847/100mm = ca. 24 Point
+ eMapUnit(MAP_100TH_MM),
+ aMapFraction(1,1)
+{
+}
+
+SdrEngineDefaults& SdrEngineDefaults::GetDefaults()
+{
+ SdrGlobalData& rGlobalData=GetSdrGlobalData();
+ if (rGlobalData.pDefaults==NULL) {
+ rGlobalData.pDefaults=new SdrEngineDefaults;
+ }
+ return *rGlobalData.pDefaults;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEngineDefaults::LanguageHasChanged()
+{
+ SdrGlobalData& rGlobalData=GetSdrGlobalData();
+ if (rGlobalData.pResMgr!=NULL) {
+ delete rGlobalData.pResMgr;
+ rGlobalData.pResMgr=NULL;
+ }
+ if (rGlobalData.pStrCache!=NULL) {
+ delete [] rGlobalData.pStrCache;
+ rGlobalData.pStrCache=NULL;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrOutliner* SdrMakeOutliner( USHORT nOutlinerMode, SdrModel* pModel )
+{
+ SdrEngineDefaults& rDefaults = SdrEngineDefaults::GetDefaults();
+
+/*
+ MapUnit eUn( (pMod==NULL) ? rDefaults.eMapUnit : pMod->GetScaleUnit());
+ Fraction aFr( *((pMod==NULL) ? &rDefaults.aMapFraction : &pMod->GetScaleFraction()));
+
+ if ( pMod->GetRefDevice() )
+ pOutl->SetRefDevice( pMod->GetRefDevice() );
+ else
+ {
+ MapMode aMapMode(eUn,Point(0,0),aFr,aFr);
+ pOutl->SetRefMapMode( aMapMode );
+ }
+
+ SfxItemSet aSet(pOutl->GetEmptyItemSet());
+ aSet.Put(SvxFontItem(rDefaults.eFontFamily, rDefaults.aFontName, String(), PITCH_DONTKNOW, gsl_getSystemTextEncoding() ) );
+ aSet.Put(SvxColorItem(rDefaults.aFontColor));
+ ULONG nHgt=rDefaults.nFontHeight;
+ FASTBOOL bDifUn=(eUn!=rDefaults.eMapUnit); // different MapUnits
+ FASTBOOL bDifFr=(aFr!=rDefaults.aMapFraction); // different MapFractions
+ if (bDifUn || bDifFr) { // Wenn pMod!=NULL und pMod->Map!=rDef.Map
+ long nTmpLong=long(nHgt); // caasting im Ctor bringt unter MSVC sehr merkwuerdige Fehlermeldungen
+ BigInt aHgt1(nTmpLong); // umrechnen von DefMap in ModMap
+ FrPair aUnitMul(GetMapFactor(rDefaults.eMapUnit,eUn));
+
+ if (bDifUn) aHgt1*=aUnitMul.Y().GetNumerator();
+ if (bDifFr) aHgt1*=aFr.GetNumerator();
+ if (bDifFr) aHgt1*=rDefaults.aMapFraction.GetDenominator();
+ if (bDifUn) aHgt1/=aUnitMul.Y().GetDenominator();
+ if (bDifFr) aHgt1/=aFr.GetDenominator();
+ if (bDifFr) aHgt1/=rDefaults.aMapFraction.GetNumerator();
+
+ nHgt=ULONG(long(aHgt1));
+ }
+ aSet.Put(SvxFontHeightItem(nHgt));
+ pOutl->SetDefaults(aSet);
+*/
+
+ SdrOutliner* pOutl=new SdrOutliner( &pModel->GetItemPool(), nOutlinerMode );
+ pOutl->SetStyleSheetPool( (SfxStyleSheetPool*) pModel->GetStyleSheetPool() );
+ pOutl->SetDefTab( pModel->GetDefaultTabulator() );
+
+ return pOutl;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+SdrLinkList& ImpGetUserMakeObjHdl()
+{
+ SdrGlobalData& rGlobalData=GetSdrGlobalData();
+ return rGlobalData.aUserMakeObjHdl;
+}
+
+SdrLinkList& ImpGetUserMakeObjUserDataHdl()
+{
+ SdrGlobalData& rGlobalData=GetSdrGlobalData();
+ return rGlobalData.aUserMakeObjUserDataHdl;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ResMgr* ImpGetResMgr()
+{
+ SdrGlobalData& rGlobalData = GetSdrGlobalData();
+
+ if(!rGlobalData.pResMgr)
+ {
+#ifndef SVX_LIGHT
+ ByteString aName("svx");
+#else
+ ByteString aName("svl");
+#endif
+ INT32 nSolarUpd(SOLARUPD);
+ aName += ByteString::CreateFromInt32( nSolarUpd );
+ rGlobalData.pResMgr =
+ ResMgr::CreateResMgr( aName.GetBuffer(), GetpApp()->GetAppInternational().GetLanguage() );
+ }
+
+ return rGlobalData.pResMgr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+const XubString& ImpGetResStr(USHORT nResID)
+{
+ SdrGlobalData& rGlobalData=GetSdrGlobalData();
+ if (rGlobalData.pStrCache==NULL) {
+ USHORT nAnz=SDR_StringCacheEnd-SDR_StringCacheBegin+1;
+ rGlobalData.pStrCache=new XubString[nAnz];
+ XubString* pStr=rGlobalData.pStrCache;
+ ResMgr* pResMgr=ImpGetResMgr();
+ for (USHORT i=0; i<nAnz; i++) {
+ USHORT nResNum=SDR_StringCacheBegin+i;
+ {
+ pStr[i]=XubString(ResId(nResNum,pResMgr));
+ }
+ }
+ }
+ if (nResID>=SDR_StringCacheBegin && nResID<=SDR_StringCacheEnd) {
+ return rGlobalData.pStrCache[nResID-SDR_StringCacheBegin];
+ } else {
+#ifdef DBG_UTIL
+ DBG_ERROR("ImpGetResStr(): ResourceID outside of cache range!");
+#endif
+ return String();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SearchOutlinerItems(const SfxItemSet& rSet, BOOL bInklDefaults, BOOL* pbOnlyEE)
+{
+ BOOL bHas=FALSE;
+ BOOL bOnly=TRUE;
+ BOOL bLookOnly=pbOnlyEE!=NULL;
+ SfxWhichIter aIter(rSet);
+ USHORT nWhich=aIter.FirstWhich();
+ while (((bLookOnly && bOnly) || !bHas) && nWhich!=0) {
+ // bei bInklDefaults ist der gesamte Which-Range
+ // ausschlaggebend, ansonsten nur die gesetzten Items
+ // Disabled und DontCare wird als Loch im Which-Range betrachtet
+ SfxItemState eState=rSet.GetItemState(nWhich);
+ if ((eState==SFX_ITEM_DEFAULT && bInklDefaults) || eState==SFX_ITEM_SET) {
+ if (nWhich<EE_ITEMS_START || nWhich>EE_ITEMS_END) bOnly=FALSE;
+ else bHas=TRUE;
+ }
+ nWhich=aIter.NextWhich();
+ }
+ if (!bHas) bOnly=FALSE;
+ if (pbOnlyEE!=NULL) *pbOnlyEE=bOnly;
+ return bHas;
+}
+
+USHORT* RemoveWhichRange(const USHORT* pOldWhichTable, USHORT nRangeBeg, USHORT nRangeEnd)
+{
+ // insgesamt sind 6 Faelle moeglich (je Range):
+ // [Beg..End] zu entfernender Range
+ // [b..e] [b..e] [b..e] Fall 1,3,2: egal, ganz weg, egal + Ranges
+ // [b........e] [b........e] Fall 4,5 : Bereich verkleinern | in
+ // [b......................e] Fall 6 : Splitting + pOldWhichTable
+ USHORT nAnz=0;
+ while (pOldWhichTable[nAnz]!=0) nAnz++;
+ nAnz++; // nAnz muesste nun in jedem Fall eine ungerade Zahl sein (0 am Ende des Arrays)
+ DBG_ASSERT((nAnz&1)==1,"Joe: RemoveWhichRange: WhichTable hat keine ungerade Anzahl von Eintraegen");
+ USHORT nAlloc=nAnz;
+ // benoetigte Groesse des neuen Arrays ermitteln
+ USHORT nNum=nAnz-1;
+ while (nNum!=0) {
+ nNum-=2;
+ USHORT nBeg=pOldWhichTable[nNum];
+ USHORT nEnd=pOldWhichTable[nNum+1];
+ if (nEnd<nRangeBeg) /*nCase=1*/ ;
+ else if (nBeg>nRangeEnd) /* nCase=2 */ ;
+ else if (nBeg>=nRangeBeg && nEnd<=nRangeEnd) /* nCase=3 */ nAlloc-=2;
+ else if (nEnd<=nRangeEnd) /* nCase=4 */;
+ else if (nBeg>=nRangeBeg) /* nCase=5*/ ;
+ else /* nCase=6 */ nAlloc+=2;
+ }
+
+ USHORT* pNewWhichTable=new USHORT[nAlloc];
+ memcpy(pNewWhichTable,pOldWhichTable,nAlloc*sizeof(USHORT));
+ pNewWhichTable[nAlloc-1]=0; // im Falle 3 fehlt die 0 am Ende
+ // nun die unerwuenschten Ranges entfernen
+ nNum=nAlloc-1;
+ while (nNum!=0) {
+ nNum-=2;
+ USHORT nBeg=pNewWhichTable[nNum];
+ USHORT nEnd=pNewWhichTable[nNum+1];
+ unsigned nCase=0;
+ if (nEnd<nRangeBeg) nCase=1;
+ else if (nBeg>nRangeEnd) nCase=2;
+ else if (nBeg>=nRangeBeg && nEnd<=nRangeEnd) nCase=3;
+ else if (nEnd<=nRangeEnd) nCase=4;
+ else if (nBeg>=nRangeBeg) nCase=5;
+ else nCase=6;
+ switch (nCase) {
+ case 3: {
+ unsigned nTailBytes=(nAnz-(nNum+2))*sizeof(USHORT);
+ memcpy(&pNewWhichTable[nNum],&pNewWhichTable[nNum+2],nTailBytes);
+ nAnz-=2; // Merken: Array hat sich verkleinert
+ } break;
+ case 4: pNewWhichTable[nNum+1]=nRangeBeg-1; break;
+ case 5: pNewWhichTable[nNum]=nRangeEnd+1; break;
+ case 6: {
+ unsigned nTailBytes=(nAnz-(nNum+2))*sizeof(USHORT);
+ memcpy(&pNewWhichTable[nNum+4],&pNewWhichTable[nNum+2],nTailBytes);
+ nAnz+=2; // Merken: Array hat sich vergroessert
+ pNewWhichTable[nNum+2]=nRangeEnd+1;
+ pNewWhichTable[nNum+3]=pNewWhichTable[nNum+1];
+ pNewWhichTable[nNum+1]=nRangeBeg-1;
+ } break;
+ } // switch
+ }
+ return pNewWhichTable;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SvdProgressInfo::SvdProgressInfo( Link *_pLink )
+{
+ DBG_ASSERT(_pLink!=NULL,"SvdProgressInfo(): Kein Link angegeben!!");
+
+ pLink = _pLink;
+ nSumActionCount = 0;
+ nSumCurAction = 0;
+
+ nObjCount = 0;
+ nCurObj = 0;
+
+ nActionCount = 0;
+ nCurAction = 0;
+
+ nInsertCount = 0;
+ nCurInsert = 0;
+}
+
+void SvdProgressInfo::Init( ULONG _nSumActionCount, ULONG _nObjCount )
+{
+ nSumActionCount = _nSumActionCount;
+ nObjCount = _nObjCount;
+}
+
+BOOL SvdProgressInfo::ReportActions( ULONG nAnzActions )
+{
+ nSumCurAction += nAnzActions;
+ nCurAction += nAnzActions;
+ if(nCurAction > nActionCount)
+ nCurAction = nActionCount;
+
+ return pLink->Call(NULL) == 1L;
+}
+
+BOOL SvdProgressInfo::ReportInserts( ULONG nAnzInserts )
+{
+ nSumCurAction += nAnzInserts;
+ nCurInsert += nAnzInserts;
+
+ return pLink->Call(NULL) == 1L;
+}
+
+BOOL SvdProgressInfo::ReportRescales( ULONG nAnzRescales )
+{
+ nSumCurAction += nAnzRescales;
+ return pLink->Call(NULL) == 1L;
+}
+
+void SvdProgressInfo::SetActionCount( ULONG _nActionCount )
+{
+ nActionCount = _nActionCount;
+}
+
+void SvdProgressInfo::SetInsertCount( ULONG _nInsertCount )
+{
+ nInsertCount = _nInsertCount;
+}
+
+BOOL SvdProgressInfo::SetNextObject()
+{
+ nActionCount = 0;
+ nCurAction = 0;
+
+ nInsertCount = 0;
+ nCurInsert = 0;
+
+ nCurObj++;
+ return ReportActions(0);
+}
+
+void SvdProgressInfo::ReportError()
+{
+ pLink->Call((void *)1L);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/******************************************************************************
+* Globale Daten der DrawingEngine
+******************************************************************************/
+SdrGlobalData::SdrGlobalData() :
+ pOutliner(NULL),
+ pDefaults(NULL),
+ pResMgr(NULL),
+ pStrCache(NULL),
+ nExchangeFormat(0)
+{
+}
+
+SdrGlobalData::~SdrGlobalData()
+{
+ delete pOutliner;
+ delete pDefaults;
+ delete pResMgr;
+ delete [] pStrCache;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+OLEObjCache::OLEObjCache()
+: Container( 0 )
+{
+ SfxIniManager* pIniMgr = SfxIniManager::Get();
+ nSize = 20;
+
+ if(pIniMgr)
+ {
+ sal_Char aTextOLECacheNum[] = "MaxOLEObjectsInDrawingEngineMemory";
+ String aKeyName = UniString(aTextOLECacheNum, sizeof(aTextOLECacheNum-1));
+ String aGroupName(pIniMgr->GetGroupName(SFX_GROUP_WORKINGSET_IMPL));
+
+ if(!pIniMgr->ReadKey(aGroupName, aKeyName).Len())
+ {
+ pIniMgr->WriteKey(aGroupName, aKeyName, UniString::CreateFromInt32(nSize));
+ }
+ else
+ {
+ String aIniManagerString = pIniMgr->Get(SFX_GROUP_WORKINGSET_IMPL, aKeyName);
+ nSize = aIniManagerString.ToInt32();
+
+ if(nSize < 5)
+ nSize = 5;
+ }
+ }
+
+ pTimer = new AutoTimer();
+ Link aLink = LINK(this, OLEObjCache, UnloadCheckHdl);
+
+ pTimer->SetTimeoutHdl(aLink);
+ pTimer->SetTimeout(20000);
+ pTimer->Start();
+
+ aLink.Call(pTimer);
+}
+
+OLEObjCache::~OLEObjCache()
+{
+ pTimer->Stop();
+ delete pTimer;
+ // Kein Unload notwendig, da zu diesem Zeitpunkt
+ // die Objekte nicht mehr vorhanden sind
+}
+
+void OLEObjCache::SetSize(ULONG nNewSize)
+{
+ nSize = nNewSize;
+}
+
+void OLEObjCache::InsertObj(SdrOle2Obj* pObj)
+{
+ if (nSize <= Count())
+ {
+ // Eintraege reduzieren
+ ULONG nIndex = Count() - 1;
+
+ for (ULONG i = nIndex; i + 1 >= nSize; i--)
+ {
+ // Pruefen, ob Objekte entfernt werden koennen
+ SdrOle2Obj* pCacheObj = (SdrOle2Obj*) GetObject(i);
+
+ if ( pCacheObj != pObj && UnloadObj(pCacheObj) )
+ {
+ Remove(i);
+ }
+ }
+ }
+
+ // Objekt ggf. entfernen und an erster Position einfuegen
+ Remove(pObj);
+ Insert(pObj, (ULONG) 0L);
+}
+
+void OLEObjCache::RemoveObj(SdrOle2Obj* pObj)
+{
+ UnloadObj( (SdrOle2Obj*) Remove(pObj) );
+}
+
+BOOL OLEObjCache::UnloadObj(SdrOle2Obj* pObj)
+{
+ BOOL bUnloaded = FALSE;
+
+ if (pObj)
+ {
+ BOOL bVisible = FALSE;
+ SdrViewIter aIter(pObj);
+ SdrView* pView = aIter.FirstView();
+
+ while (!bVisible && pView!=NULL)
+ {
+ bVisible = !pView->IsGrafDraft();
+
+ if (!bVisible)
+ pView = aIter.NextView();
+ }
+
+ if (!bVisible)
+ bUnloaded = pObj->Unload();
+ }
+
+ return bUnloaded;
+}
+
+IMPL_LINK(OLEObjCache, UnloadCheckHdl, AutoTimer*, pTim)
+{
+ if (nSize <= Count())
+ {
+ // Eintraege reduzieren
+ ULONG nIndex = Count() - 1;
+
+ for (ULONG i = nIndex; i + 1 >= nSize; i--)
+ {
+ // Pruefen, ob Objekte entfernt werden koennen
+ SdrOle2Obj* pCacheObj = (SdrOle2Obj*) GetObject(i);
+
+ if ( UnloadObj(pCacheObj) )
+ Remove(i);
+ }
+ }
+
+ return 0;
+}
+
+
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
new file mode 100644
index 0000000000..8f3f8025c4
--- /dev/null
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -0,0 +1,918 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdfmtf.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdfmtf.hxx"
+#include "editdata.hxx"
+#include <math.h>
+#include "xpoly.hxx"
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _EEITEMID_HXX //autogen
+#include <eeitemid.hxx>
+#endif
+
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include <fhgtitem.hxx>
+#endif
+
+#ifndef _SVX_WGHTITEM_HXX //autogen
+#include <wghtitem.hxx>
+#endif
+
+#ifndef _SVX_POSTITEM_HXX //autogen
+#include <postitem.hxx>
+#endif
+
+#ifndef _SVX_UDLNITEM_HXX //autogen
+#include <udlnitem.hxx>
+#endif
+
+#ifndef _SVX_CRSDITEM_HXX //autogen
+#include <crsditem.hxx>
+#endif
+
+#ifndef _SVX_SHDDITEM_HXX //autogen
+#include <shdditem.hxx>
+#endif
+
+#ifndef _SVX_XLNCLIT_HXX //autogen
+#include <xlnclit.hxx>
+#endif
+
+#ifndef _SVX_XLNWTIT_HXX //autogen
+#include <xlnwtit.hxx>
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX //autogen
+#include <xflclit.hxx>
+#endif
+
+#ifndef _SVX_XGRAD_HXX //autogen
+#include <xgrad.hxx>
+#endif
+
+#ifndef _SVX_XFLGRIT_HXX //autogen
+#include <xflgrit.hxx>
+#endif
+
+#ifndef _SVX_FWDTITEM_HXX //autogen
+#include <fwdtitem.hxx>
+#endif
+
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include <fontitem.hxx>
+#endif
+
+#ifndef _SVX_AKRNITEM_HXX //autogen
+#include <akrnitem.hxx>
+#endif
+
+#ifndef _SVX_WRLMITEM_HXX //autogen
+#include <wrlmitem.hxx>
+#endif
+
+#ifndef _SVX_ITEM_HXX //autogen
+#include <cntritem.hxx>
+#endif
+
+#ifndef _SVX_COLRITEM_HXX //autogen
+#include <colritem.hxx>
+#endif
+
+#ifndef _SV_METRIC_HXX //autogen
+#include <vcl/metric.hxx>
+#endif
+
+#include "xflhtit.hxx"
+#include "svdattr.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdobj.hxx"
+#include "svditext.hxx"
+#include "svdotext.hxx"
+#include "svdorect.hxx"
+#include "svdocirc.hxx"
+#include "svdograf.hxx"
+#include "svdopath.hxx"
+#include "svdetc.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(SdrModel& rModel):
+ nMapScalingOfs(0),
+ pLineAttr(NULL),pFillAttr(NULL),pTextAttr(NULL),pPage(NULL),pModel(NULL),nLayer(0),
+ bPenDirty(TRUE),bBrsDirty(TRUE),bFntDirty(TRUE),
+ bLastObjWasPolyWithoutLine(FALSE),bNoLine(FALSE),bNoFill(FALSE),bLastObjWasLine(FALSE)
+{
+ aVD.EnableOutput(FALSE);
+ pLineAttr=new SfxItemSet(rModel.GetItemPool(),XATTR_LINE_FIRST,XATTR_LINE_LAST);
+ pFillAttr=new SfxItemSet(rModel.GetItemPool(),XATTR_FILL_FIRST,XATTR_FILL_LAST);
+ pTextAttr=new SfxItemSet(rModel.GetItemPool(),EE_ITEMS_START,EE_ITEMS_END);
+ pModel=&rModel;
+}
+
+ImpSdrGDIMetaFileImport::~ImpSdrGDIMetaFileImport()
+{
+ delete pLineAttr;
+ delete pFillAttr;
+ delete pTextAttr;
+}
+
+ULONG ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
+ SdrObjList& rOL,
+ ULONG nInsPos,
+ SvdProgressInfo *pProgrInfo)
+{
+ pPage=rOL.GetPage();
+ GDIMetaFile* pTmpMtf=NULL;
+ GDIMetaFile* pMtf = (GDIMetaFile*) &rMtf;
+ ULONG nActionAnz=pMtf->GetActionCount();
+
+ BOOL bError = FALSE;
+ if(65000 < nActionAnz)
+ {
+ nActionAnz = 65000;
+ bError = TRUE;
+ }
+
+ if(pProgrInfo)
+ pProgrInfo->SetActionCount(nActionAnz);
+
+ ULONG nActionsToReport = 0;
+
+ for( MetaAction* pAct = pMtf->FirstAction(); pAct; pAct = pMtf->NextAction() )
+ {
+ switch (pAct->GetType())
+ {
+ case META_PIXEL_ACTION : DoAction((MetaPixelAction &)*pAct); break;
+ case META_POINT_ACTION : DoAction((MetaPointAction &)*pAct); break;
+ case META_LINE_ACTION : DoAction((MetaLineAction &)*pAct); break;
+ case META_RECT_ACTION : DoAction((MetaRectAction &)*pAct); break;
+ case META_ROUNDRECT_ACTION : DoAction((MetaRoundRectAction &)*pAct); break;
+ case META_ELLIPSE_ACTION : DoAction((MetaEllipseAction &)*pAct); break;
+ case META_ARC_ACTION : DoAction((MetaArcAction &)*pAct); break;
+ case META_PIE_ACTION : DoAction((MetaPieAction &)*pAct); break;
+ case META_CHORD_ACTION : DoAction((MetaChordAction &)*pAct); break;
+ case META_POLYLINE_ACTION : DoAction((MetaPolyLineAction &)*pAct); break;
+ case META_POLYGON_ACTION : DoAction((MetaPolygonAction &)*pAct); break;
+ case META_POLYPOLYGON_ACTION : DoAction((MetaPolyPolygonAction &)*pAct); break;
+ case META_TEXT_ACTION : DoAction((MetaTextAction &)*pAct); break;
+ case META_TEXTARRAY_ACTION : DoAction((MetaTextArrayAction &)*pAct); break;
+ case META_STRETCHTEXT_ACTION : DoAction((MetaStretchTextAction &)*pAct); break;
+ case META_BMP_ACTION : DoAction((MetaBmpAction &)*pAct); break;
+ case META_BMPSCALE_ACTION : DoAction((MetaBmpScaleAction &)*pAct); break;
+ case META_BMPEX_ACTION : DoAction((MetaBmpExAction &)*pAct); break;
+ case META_BMPEXSCALE_ACTION : DoAction((MetaBmpExScaleAction &)*pAct); break;
+ case META_LINECOLOR_ACTION : DoAction((MetaLineColorAction &)*pAct); break;
+ case META_FILLCOLOR_ACTION : DoAction((MetaFillColorAction &)*pAct); break;
+ case META_TEXTCOLOR_ACTION : DoAction((MetaTextColorAction &)*pAct); break;
+ case META_TEXTFILLCOLOR_ACTION : DoAction((MetaTextFillColorAction &)*pAct); break;
+ case META_FONT_ACTION : DoAction((MetaFontAction &)*pAct); break;
+ case META_MAPMODE_ACTION : DoAction((MetaMapModeAction &)*pAct); break;
+ case META_CLIPREGION_ACTION : DoAction((MetaClipRegionAction &)*pAct); break;
+ case META_MOVECLIPREGION_ACTION : DoAction((MetaMoveClipRegionAction &)*pAct); break;
+ case META_ISECTRECTCLIPREGION_ACTION: DoAction((MetaISectRectClipRegionAction&)*pAct); break;
+ case META_ISECTREGIONCLIPREGION_ACTION: DoAction((MetaISectRegionClipRegionAction&)*pAct); break;
+ case META_RASTEROP_ACTION : DoAction((MetaRasterOpAction &)*pAct); break;
+ case META_PUSH_ACTION : DoAction((MetaPushAction &)*pAct); break;
+ case META_POP_ACTION : DoAction((MetaPopAction &)*pAct); break;
+ case META_HATCH_ACTION : DoAction((MetaHatchAction &)*pAct); break;
+ case META_COMMENT_ACTION : DoAction((MetaCommentAction &)*pAct, pMtf); break;
+
+ }
+
+ if(pProgrInfo != NULL)
+ {
+ nActionsToReport++;
+ if(nActionsToReport >= 16) // Alle 16 Action updaten
+ {
+ if(!pProgrInfo->ReportActions(nActionsToReport))
+ break;
+ nActionsToReport = 0;
+ }
+ }
+ }
+
+ if(pProgrInfo != NULL)
+ {
+ pProgrInfo->ReportActions(nActionsToReport);
+ nActionsToReport = 0;
+ }
+
+ // MapMode-Scaling vornehmen
+ MapScaling();
+ // Objekte in vorgegebenes Rechteck hineinskalieren
+ ULONG nAnz=aTmpList.GetObjCount();
+
+ // Beim berechnen der Fortschrittsanzeige wird GetActionCount()*3 benutzt.
+ // Da in aTmpList allerdings weniger eintraege als GetActionCount()
+ // existieren koennen, muessen hier die zuviel vermuteten Actionen wieder
+ // hinzugefuegt werden.
+ nActionsToReport = (pMtf->GetActionCount() - nAnz)*2;
+
+ if (!aScaleRect.IsEmpty()) {
+ Point aOfs=aScaleRect.TopLeft();
+ Size aMtfSize(pMtf->GetPrefSize());
+ Fraction aScaleX(1,1);
+ Fraction aScaleY(1,1);
+ if (aMtfSize.Width()!=0) aScaleX=Fraction(aScaleRect.GetWidth()-1,aMtfSize.Width());
+ if (aMtfSize.Height()!=0) aScaleY=Fraction(aScaleRect.GetHeight()-1,aMtfSize.Height());
+ FASTBOOL bMov=aOfs.X()!=0 || aOfs.Y()!=0;
+ FASTBOOL bSiz=aScaleX.GetNumerator()!=1 || aScaleX.GetDenominator()!=1 || aScaleY.GetNumerator()!=1 || aScaleY.GetDenominator()!=1;
+
+ if (bMov || bSiz) {
+ for (ULONG i=0; i<nAnz; i++)
+ {
+ SdrObject* pObj=aTmpList.GetObj(i);
+ if (bSiz)
+ {
+ pObj->NbcResize(Point(),aScaleX,aScaleY);
+ }
+ if (bMov)
+ {
+ pObj->NbcMove(Size(aOfs.X(),aOfs.Y()));
+ }
+
+ if(pProgrInfo != NULL)
+ {
+ nActionsToReport++;
+ if(nActionsToReport >= 32) // Alle 32 Action updaten
+ {
+ pProgrInfo->ReportRescales(nActionsToReport);
+ nActionsToReport = 0;
+ }
+ }
+ }
+ }
+ }
+
+ // Alle noch nicht gemeldeten Rescales melden
+ if(pProgrInfo)
+ {
+ pProgrInfo->ReportRescales(nActionsToReport);
+ pProgrInfo->SetInsertCount(nAnz);
+ }
+ nActionsToReport = 0;
+
+ // alle in aTmpList zwischengespeicherten Objekte nun in rOL ab der Position nInsPos einfuegen
+ if (nInsPos>rOL.GetObjCount()) nInsPos=rOL.GetObjCount();
+ SdrInsertReason aReason(SDRREASON_VIEWCALL);
+ for (ULONG i=0; i<nAnz; i++)
+ {
+ SdrObject* pObj=aTmpList.GetObj(i);
+ rOL.NbcInsertObject(pObj,nInsPos,&aReason);
+ nInsPos++;
+
+ if(pProgrInfo != NULL)
+ {
+ nActionsToReport++;
+ if(nActionsToReport >= 32) // Alle 32 Action updaten
+ {
+ pProgrInfo->ReportInserts(nActionsToReport);
+ nActionsToReport = 0;
+ }
+ }
+ }
+ if (pTmpMtf!=NULL) delete pTmpMtf;
+
+ // ein letztesmal alle verbliebennen Inserts reporten
+ if(pProgrInfo != NULL)
+ {
+ pProgrInfo->ReportInserts(nActionsToReport);
+ if(bError)
+ pProgrInfo->ReportError();
+ }
+
+ return aTmpList.GetObjCount();
+}
+
+void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, FASTBOOL bForceTextAttr)
+{
+ bNoLine=FALSE; bNoFill=FALSE;
+ FASTBOOL bLine=TRUE && !bForceTextAttr;
+ FASTBOOL bFill=pObj==NULL || pObj->IsClosedObj() && !bForceTextAttr;
+ FASTBOOL bText=bForceTextAttr || (pObj!=NULL && pObj->GetOutlinerParaObject()!=NULL);
+
+ if (bLine && bPenDirty)
+ {
+ if( aVD.IsLineColor() )
+ {
+ pLineAttr->Put(XLineStyleItem(XLINE_SOLID));
+ pLineAttr->Put(XLineColorItem(String(), aVD.GetLineColor()));
+ }
+ else
+ pLineAttr->Put(XLineStyleItem(XLINE_NONE));
+
+ bPenDirty=FALSE;
+ }
+ else
+ bNoLine=TRUE;
+
+ if (bFill && bBrsDirty)
+ {
+ if( aVD.IsFillColor() )
+ {
+ pFillAttr->Put(XFillStyleItem(XFILL_SOLID));
+ pFillAttr->Put(XFillColorItem(String(), aVD.GetFillColor()));
+ }
+ else
+ pFillAttr->Put(XFillStyleItem(XFILL_NONE));
+
+ bBrsDirty=FALSE;
+ }
+ else
+ bNoFill=TRUE;
+
+ if (bText && bFntDirty)
+ {
+ Font aFnt(aVD.GetFont());
+ pTextAttr->Put(SvxFontItem(aFnt.GetFamily(),aFnt.GetName(),aFnt.GetStyleName(),aFnt.GetPitch(),aFnt.GetCharSet()));
+ pTextAttr->Put(SvxPostureItem(aFnt.GetItalic()));
+ pTextAttr->Put(SvxWeightItem(aFnt.GetWeight()));
+ pTextAttr->Put(SvxFontHeightItem((ULONG)aFnt.GetSize().Height()));
+ pTextAttr->Put(SvxFontWidthItem((USHORT)aFnt.GetSize().Width()));
+ pTextAttr->Put(SvxUnderlineItem(aFnt.GetUnderline()));
+ pTextAttr->Put(SvxCrossedOutItem(aFnt.GetStrikeout()));
+ pTextAttr->Put(SvxShadowedItem(aFnt.IsShadow()));
+ pTextAttr->Put(SvxAutoKernItem(aFnt.IsKerning()));
+ pTextAttr->Put(SvxWordLineModeItem(aFnt.IsWordLineMode()));
+ pTextAttr->Put(SvxContourItem(aFnt.IsOutline()));
+ pTextAttr->Put(SvxColorItem(aFnt.GetColor()));
+ //... svxfont textitem svditext
+ bFntDirty=FALSE;
+ }
+ if (pObj!=NULL)
+ {
+ pObj->SetLayer(nLayer);
+ if (bLine) pObj->NbcSetAttributes(*pLineAttr,FALSE);
+ if (bFill) pObj->NbcSetAttributes(*pFillAttr,FALSE);
+ if (bText) pObj->NbcSetAttributes(*pTextAttr,FALSE);
+ }
+}
+
+void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj)
+{
+ aTmpList.InsertObject(pObj);
+ if (HAS_BASE(SdrPathObj,pObj)) {
+ FASTBOOL bClosed=pObj->IsClosedObj();
+ bLastObjWasPolyWithoutLine=bNoLine && bClosed;
+ bLastObjWasLine=!bClosed;
+ } else {
+ bLastObjWasPolyWithoutLine=FALSE;
+ bLastObjWasLine=FALSE;
+ }
+}
+
+/**************************************************************************************************/
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaPixelAction& rAct)
+{
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaPointAction& rAct)
+{
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaLineAction& rAct)
+{
+ XPolygon aXP(2);
+ aXP[0]=rAct.GetStartPoint();
+ aXP[1]=rAct.GetEndPoint();
+ if (!bLastObjWasLine || !CheckLastLineMerge(aXP)) {
+ SdrPathObj* pPath=new SdrPathObj(OBJ_LINE,XPolyPolygon(aXP));
+ SetAttributes(pPath);
+ InsertObj(pPath);
+ }
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaRectAction& rAct)
+{
+ SdrRectObj* pRect=new SdrRectObj(rAct.GetRect());
+ SetAttributes(pRect);
+ InsertObj(pRect);
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaRoundRectAction& rAct)
+{
+ SdrRectObj* pRect=new SdrRectObj(rAct.GetRect());
+ SetAttributes(pRect);
+ long nRad=(rAct.GetHorzRound()+rAct.GetVertRound())/2;
+ if (nRad!=0) {
+ SfxItemSet aSet(*pLineAttr->GetPool(),SDRATTR_ECKENRADIUS,SDRATTR_ECKENRADIUS);
+ aSet.Put(SdrEckenradiusItem(nRad));
+ pRect->NbcSetAttributes(aSet,FALSE);
+ }
+ InsertObj(pRect);
+}
+
+/**************************************************************************************************/
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaEllipseAction& rAct)
+{
+ SdrCircObj* pCirc=new SdrCircObj(OBJ_CIRC,rAct.GetRect());
+ SetAttributes(pCirc);
+ InsertObj(pCirc);
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaArcAction& rAct)
+{
+ Point aCenter(rAct.GetRect().Center());
+ long nStart=GetAngle(rAct.GetStartPoint()-aCenter);
+ long nEnd=GetAngle(rAct.GetEndPoint()-aCenter);
+ SdrCircObj* pCirc=new SdrCircObj(OBJ_CARC,rAct.GetRect(),nStart,nEnd);
+ SetAttributes(pCirc);
+ InsertObj(pCirc);
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaPieAction& rAct)
+{
+ Point aCenter(rAct.GetRect().Center());
+ long nStart=GetAngle(rAct.GetStartPoint()-aCenter);
+ long nEnd=GetAngle(rAct.GetEndPoint()-aCenter);
+ SdrCircObj* pCirc=new SdrCircObj(OBJ_SECT,rAct.GetRect(),nStart,nEnd);
+ SetAttributes(pCirc);
+ InsertObj(pCirc);
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaChordAction& rAct)
+{
+ Point aCenter(rAct.GetRect().Center());
+ long nStart=GetAngle(rAct.GetStartPoint()-aCenter);
+ long nEnd=GetAngle(rAct.GetEndPoint()-aCenter);
+ SdrCircObj* pCirc=new SdrCircObj(OBJ_CCUT,rAct.GetRect(),nStart,nEnd);
+ SetAttributes(pCirc);
+ InsertObj(pCirc);
+}
+
+/**************************************************************************************************/
+
+FASTBOOL ImpSdrGDIMetaFileImport::CheckLastLineMerge(const XPolygon& rSrcPoly)
+{
+ if (bLastObjWasLine && !bPenDirty && rSrcPoly.GetPointCount()!=0) {
+ SdrObject* pTmpObj=aTmpList.GetObj(aTmpList.GetObjCount()-1);
+ SdrPathObj* pLastPoly=PTR_CAST(SdrPathObj,pTmpObj);
+ if (pLastPoly!=NULL) {
+ if (pLastPoly->GetPathPoly().Count()==1) {
+ FASTBOOL bOk=FALSE;
+ XPolygon aDstPoly(pLastPoly->GetPathPoly()[0]);
+ USHORT nMaxDstPnt=aDstPoly.GetPointCount();
+ if (nMaxDstPnt!=0) {
+ nMaxDstPnt--;
+ USHORT nMaxSrcPnt=USHORT(rSrcPoly.GetPointCount()-1);
+ if (aDstPoly[nMaxDstPnt]==rSrcPoly[0]) {
+ aDstPoly.Remove(nMaxDstPnt,1); // der ist sonst doppelt
+ aDstPoly.Insert(nMaxDstPnt,rSrcPoly);
+ bOk=TRUE;
+ } else if (aDstPoly[0]==rSrcPoly[nMaxSrcPnt]) {
+ aDstPoly.Remove(0,1); // der ist sonst doppelt
+ aDstPoly.Insert(0,rSrcPoly);
+ bOk=TRUE;
+ } else if (aDstPoly[0]==rSrcPoly[0]) {
+ for (USHORT i=1; i<=nMaxSrcPnt; i++) {
+ aDstPoly.Insert(0,rSrcPoly[i],rSrcPoly.GetFlags(i));
+ }
+ bOk=TRUE;
+ } else if (aDstPoly[nMaxDstPnt]==rSrcPoly[nMaxSrcPnt]) {
+ for (USHORT i=0; i<nMaxSrcPnt; i++) {
+ aDstPoly.Insert(nMaxDstPnt+1,rSrcPoly[i],rSrcPoly.GetFlags(i));
+ }
+ bOk=TRUE;
+ }
+ }
+ if (bOk) {
+ pLastPoly->NbcSetPathPoly(XPolyPolygon(aDstPoly));
+ }
+ return bOk;
+ }
+ }
+ }
+ return FALSE;
+}
+
+FASTBOOL ImpSdrGDIMetaFileImport::CheckLastPolyLineAndFillMerge(const XPolyPolygon& rPoly)
+{
+ if (bLastObjWasPolyWithoutLine) {
+ SdrObject* pTmpObj=aTmpList.GetObj(aTmpList.GetObjCount()-1);
+ SdrPathObj* pLastPoly=PTR_CAST(SdrPathObj,pTmpObj);
+ if (pLastPoly!=NULL) {
+ if (pLastPoly->GetPathPoly()==rPoly) {
+ SetAttributes(NULL);
+ if (!bNoLine && bNoFill) {
+ pLastPoly->NbcSetAttributes(*pLineAttr,FALSE);
+ return TRUE;
+ }
+ }
+ }
+ }
+ return FALSE;
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaPolyLineAction& rAct)
+{
+ XPolygon aXP(rAct.GetPolygon());
+ if (!bLastObjWasLine || !CheckLastLineMerge(aXP)) {
+ if (!bLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(XPolyPolygon(aXP))) {
+ SdrPathObj* pPath=new SdrPathObj(OBJ_PLIN,XPolyPolygon(aXP));
+ SetAttributes(pPath);
+ InsertObj(pPath);
+ }
+ }
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaPolygonAction& rAct)
+{
+ XPolygon aXP(rAct.GetPolygon());
+ if (aXP.GetPointCount()!=0) {
+ Point aPt(aXP[0]);
+ USHORT nPntAnz=aXP.GetPointCount();
+ if (aPt==aXP[nPntAnz-1]) { // Polygon ggf. schliessen
+ aXP.Insert(nPntAnz,aPt,XPOLY_NORMAL);
+ }
+ if (!bLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(XPolyPolygon(aXP))) {
+ SdrPathObj* pPath=new SdrPathObj(OBJ_POLY,XPolyPolygon(aXP));
+ SetAttributes(pPath);
+ InsertObj(pPath);
+ }
+ }
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaPolyPolygonAction& rAct)
+{
+ XPolyPolygon aXPP(rAct.GetPolyPolygon());
+ USHORT nPolyAnz=aXPP.Count();
+ for (USHORT nPolyNum=nPolyAnz; nPolyNum>0;) {
+ nPolyNum--;
+ USHORT nPntAnz=aXPP[nPolyNum].GetPointCount();
+ if (nPntAnz>0) {
+ Point aPt(aXPP[nPolyNum][0]);
+ if (aPt==aXPP[nPolyNum][nPntAnz-1]) { // Polygon ggf. schliessen
+ aXPP[nPolyNum].Insert(nPntAnz,aPt,XPOLY_NORMAL);
+ }
+ } else {
+ aXPP.Remove(nPolyNum); // leere Polys entfernen
+ }
+ }
+ if (aXPP.Count()!=0) {
+ if (!bLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(XPolyPolygon(aXPP))) {
+ SdrPathObj* pPath=new SdrPathObj(OBJ_POLY,aXPP);
+ SetAttributes(pPath);
+ InsertObj(pPath);
+ }
+ }
+}
+
+/**************************************************************************************************/
+
+void ImpSdrGDIMetaFileImport::ImportText(const Point& rPos, const XubString& rStr)
+{
+ // calc text box size, add 5% to make it fit safely
+ Size aSize((aVD.GetTextWidth(rStr) * 105L) / 100L, aVD.GetTextHeight());
+ FontMetric aFontMetric(aVD.GetFontMetric());
+ Font aFnt(aVD.GetFont());
+ FontAlign eAlg(aFnt.GetAlign());
+
+ // calc rectangle for new object, rPos is on Baseline
+ Rectangle aTextRect(rPos + Point(0, -aFontMetric.GetAscent()), aSize);
+
+ // correct aTextRect when eAlg != ALIGN_BASELINE
+ if(ALIGN_BASELINE != eAlg)
+ {
+ const OutputDevice* pOut = NULL;
+
+ if(pModel)
+ pOut = pModel->GetRefDevice();
+
+ if(!pOut)
+ {
+ pOut = Application::GetDefaultDevice();
+ }
+
+ if(pOut)
+ {
+ FontMetric aMetr(pOut->GetFontMetric(aFnt));
+ static BOOL bDoItAtAll = TRUE;
+
+ if(eAlg == ALIGN_TOP)
+ {
+ if(bDoItAtAll)
+ aTextRect.Move(0, -(INT32)aMetr.GetDescent());
+ }
+
+ if(eAlg == ALIGN_BOTTOM)
+ {
+ if(bDoItAtAll)
+ aTextRect.Move(0, (INT32)aMetr.GetAscent());
+ }
+ }
+ }
+
+ SdrRectObj* pText=new SdrRectObj(OBJ_TEXT,aTextRect);
+ pText->SetModel(pModel);
+ pText->SetLayer(nLayer);
+ pText->NbcSetText(rStr);
+ SetAttributes(pText, TRUE);
+
+ if (!aFnt.IsTransparent()) {
+ SfxItemSet aAttr(*pFillAttr->GetPool(),XATTR_FILL_FIRST,XATTR_FILL_LAST);
+ pFillAttr->Put(XFillStyleItem(XFILL_SOLID));
+ pFillAttr->Put(XFillColorItem(String(), aFnt.GetFillColor()));
+ pText->NbcSetAttributes(aAttr,FALSE);
+ }
+ ULONG nWink=aFnt.GetOrientation();
+ if (nWink!=0) {
+ nWink*=10;
+ double a=nWink*nPi180;
+ double nSin=sin(a);
+ double nCos=cos(a);
+ pText->NbcRotate(rPos,nWink,nSin,nCos);
+ }
+ InsertObj(pText);
+ // Das fehlt noch:
+ // FontAlign GetAlign() const { return pImpFont->eAlign; }
+ // short GetCharOrientation() const { return pImpFont->nCharOrientation; }
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaTextAction& rAct)
+{
+ XubString aStr(rAct.GetText());
+ aStr.Erase(0,rAct.GetIndex());
+ aStr.Erase(rAct.GetLen());
+ ImportText(rAct.GetPoint(),aStr);
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaTextArrayAction& rAct)
+{
+ XubString aStr(rAct.GetText());
+ aStr.Erase(0,rAct.GetIndex());
+ aStr.Erase(rAct.GetLen());
+ ImportText(rAct.GetPoint(),aStr);
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaStretchTextAction& rAct)
+{
+ XubString aStr(rAct.GetText());
+ aStr.Erase(0,rAct.GetIndex());
+ aStr.Erase(rAct.GetLen());
+ ImportText(rAct.GetPoint(),aStr);
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaBmpAction& rAct)
+{
+ Rectangle aRect(rAct.GetPoint(),rAct.GetBitmap().GetSizePixel());
+ aRect.Right()++; aRect.Bottom()++;
+ SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect);
+ InsertObj(pGraf);
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction& rAct)
+{
+ Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
+ aRect.Right()++; aRect.Bottom()++;
+ SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect);
+ InsertObj(pGraf);
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction& rAct)
+{
+ Rectangle aRect(rAct.GetPoint(),rAct.GetBitmapEx().GetSizePixel());
+ aRect.Right()++; aRect.Bottom()++;
+ SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect );
+ InsertObj(pGraf);
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScaleAction& rAct)
+{
+ Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
+ aRect.Right()++; aRect.Bottom()++;
+ SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect );
+ InsertObj(pGraf);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void ImpSdrGDIMetaFileImport::DoAction( MetaHatchAction& rAct )
+{
+ XPolyPolygon aXPP(rAct.GetPolyPolygon());
+ USHORT nPolyAnz=aXPP.Count();
+ for (USHORT nPolyNum=nPolyAnz; nPolyNum>0;)
+ {
+ nPolyNum--;
+ USHORT nPntAnz=aXPP[nPolyNum].GetPointCount();
+ if (nPntAnz>0)
+ {
+ Point aPt(aXPP[nPolyNum][0]);
+ if (aPt==aXPP[nPolyNum][nPntAnz-1])
+ { // Polygon ggf. schliessen
+ aXPP[nPolyNum].Insert(nPntAnz,aPt,XPOLY_NORMAL);
+ }
+ }
+ else
+ {
+ aXPP.Remove(nPolyNum); // leere Polys entfernen
+ }
+ }
+ if( aXPP.Count()!=0 )
+ {
+ if (!bLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(XPolyPolygon(aXPP)))
+ {
+ const Hatch& rHatch = rAct.GetHatch();
+ SdrPathObj* pPath=new SdrPathObj(OBJ_POLY,aXPP);
+ SfxItemSet aHatchAttr( pModel->GetItemPool(),
+ XATTR_FILLSTYLE, XATTR_FILLSTYLE,
+ XATTR_FILLHATCH, XATTR_FILLHATCH, 0 );
+ XHatchStyle eStyle;
+
+ switch( rHatch.GetStyle() )
+ {
+ case( HATCH_TRIPLE ): eStyle = XHATCH_TRIPLE; break;
+ case( HATCH_DOUBLE ): eStyle = XHATCH_DOUBLE; break;
+ default: eStyle = XHATCH_SINGLE; break;
+ }
+
+ SetAttributes( pPath );
+ aHatchAttr.Put( XFillStyleItem( XFILL_HATCH ) );
+ aHatchAttr.Put( XFillHatchItem( String(), XHatch( rHatch.GetColor(), eStyle,
+ rHatch.GetDistance(), rHatch.GetAngle() ) ) );
+ pPath->NbcSetAttributes(aHatchAttr,FALSE);
+ InsertObj(pPath);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaLineColorAction& rAct)
+{
+ Color aOldLineColor( aVD.GetLineColor() );
+
+ rAct.Execute(&aVD);
+
+ if( aOldLineColor != aVD.GetLineColor() )
+ bPenDirty = TRUE;
+}
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaMapModeAction& rAct)
+{
+ MapScaling();
+ rAct.Execute(&aVD);
+ bLastObjWasPolyWithoutLine=FALSE;
+ bLastObjWasLine=FALSE;
+}
+
+void ImpSdrGDIMetaFileImport::MapScaling()
+{
+ ULONG nAnz=aTmpList.GetObjCount();
+ const MapMode& rMap=aVD.GetMapMode();
+ Point aMapOrg(rMap.GetOrigin());
+ Fraction aMapScaleX(rMap.GetScaleX());
+ Fraction aMapScaleY(rMap.GetScaleX());
+ FASTBOOL bMov=aMapOrg.X()!=0 || aMapOrg.Y()!=0;
+ FASTBOOL bSiz=aMapScaleX.GetNumerator()!=1 || aMapScaleX.GetDenominator()!=1 || aMapScaleY.GetNumerator()!=1 || aMapScaleY.GetDenominator()!=1;
+ if (bMov || bSiz) {
+ for (ULONG i=nMapScalingOfs; i<nAnz; i++) {
+ SdrObject* pObj=aTmpList.GetObj(i);
+ if (bMov) {
+ pObj->NbcMove(Size(aMapOrg.X(),aMapOrg.Y()));
+ }
+ }
+ }
+ nMapScalingOfs=nAnz;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pMtf )
+{
+ ByteString aSkipComment;
+
+ if( rAct.GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_BEGIN" ) == COMPARE_EQUAL )
+ {
+ MetaGradientExAction* pAct = (MetaGradientExAction*) pMtf->NextAction();
+
+ if( pAct && pAct->GetType() == META_GRADIENTEX_ACTION )
+ {
+ XPolyPolygon aXPP(pAct->GetPolyPolygon());
+ USHORT nPolyAnz=aXPP.Count();
+
+ for( USHORT nPolyNum= nPolyAnz; nPolyNum > 0; )
+ {
+ nPolyNum--;
+ USHORT nPntAnz=aXPP[nPolyNum].GetPointCount();
+ if (nPntAnz>0)
+ {
+ Point aPt(aXPP[nPolyNum][0]);
+ if (aPt==aXPP[nPolyNum][nPntAnz-1])
+ aXPP[nPolyNum].Insert(nPntAnz,aPt,XPOLY_NORMAL);
+ }
+ else
+ aXPP.Remove(nPolyNum);
+ }
+
+ if( aXPP.Count()!=0 )
+ {
+ if (!bLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(XPolyPolygon(aXPP)))
+ {
+ const Gradient& rGrad = pAct->GetGradient();
+ SdrPathObj* pPath=new SdrPathObj(OBJ_POLY,aXPP);
+ SfxItemSet aGradAttr( pModel->GetItemPool(),
+ XATTR_FILLSTYLE, XATTR_FILLSTYLE,
+ XATTR_FILLGRADIENT, XATTR_FILLGRADIENT, 0 );
+ XGradient aXGradient;
+
+ aXGradient.SetGradientStyle((XGradientStyle)rGrad.GetStyle());
+ aXGradient.SetStartColor(rGrad.GetStartColor());
+ aXGradient.SetEndColor(rGrad.GetEndColor());
+ aXGradient.SetAngle((USHORT)rGrad.GetAngle());
+ aXGradient.SetBorder(rGrad.GetBorder());
+ aXGradient.SetXOffset(rGrad.GetOfsX());
+ aXGradient.SetYOffset(rGrad.GetOfsY());
+ aXGradient.SetStartIntens(rGrad.GetStartIntensity());
+ aXGradient.SetEndIntens(rGrad.GetEndIntensity());
+ aXGradient.SetSteps(rGrad.GetSteps());
+
+ SetAttributes( pPath );
+ aGradAttr.Put( XFillStyleItem( XFILL_GRADIENT ) );
+ aGradAttr.Put( XFillGradientItem( String(), aXGradient ) );
+ pPath->NbcSetAttributes(aGradAttr,FALSE);
+ InsertObj(pPath);
+ }
+ }
+
+ aSkipComment = "XGRAD_SEQ_END";
+ }
+ }
+
+ if(aSkipComment.Len())
+ {
+ MetaAction* pSkipAct = pMtf->NextAction();
+
+ while( pSkipAct
+ && ((pSkipAct->GetType() != META_COMMENT_ACTION )
+ || (((MetaCommentAction*)pSkipAct)->GetComment().CompareIgnoreCaseToAscii(aSkipComment.GetBuffer()) != COMPARE_EQUAL)))
+ {
+ pSkipAct = pMtf->NextAction();
+ }
+ }
+}
+
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
new file mode 100644
index 0000000000..1078e1f0cf
--- /dev/null
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -0,0 +1,202 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdfmtf.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVDFMTF_HXX
+#define _SVDFMTF_HXX
+
+#ifdef VCL
+#ifndef _SV_METAACT_HXX //autogen
+#include <vcl/metaact.hxx>
+#endif
+#else // VCL
+#ifndef _SVMTFACT_HXX
+#include <svmtfact.hxx>
+#endif
+#endif // VCL
+
+#ifndef _SV_VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _SVDOBJ_HXX
+#include "svdobj.hxx"
+#endif
+
+//************************************************************
+// Vorausdeklarationen
+//************************************************************
+
+class SfxItemSet;
+class SdrObjList;
+class SdrModel;
+class SdrPage;
+class SdrObject;
+class SvdProgressInfo;
+
+//************************************************************
+// Hilfsklasse SdrObjRefList
+//************************************************************
+
+class SdrObjRefList
+{
+ Container aList;
+public:
+
+ SdrObjRefList()
+ : aList(1024,64,64)
+ {}
+
+ void Clear() { aList.Clear(); }
+ ULONG GetObjCount() const { return aList.Count(); }
+ SdrObject* GetObj(ULONG nNum) const { return (SdrObject*)aList.GetObject(nNum); }
+ SdrObject* operator[](ULONG nNum) const { return (SdrObject*)aList.GetObject(nNum); }
+ void InsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND) { aList.Insert(pObj,nPos); }
+ void RemoveObject(ULONG nPos) { aList.Remove(nPos); }
+};
+
+//************************************************************
+// Hilfsklasse ImpSdrGDIMetaFileImport
+//************************************************************
+
+class ImpSdrGDIMetaFileImport
+{
+protected:
+ SdrObjRefList aTmpList;
+ VirtualDevice aVD;
+ Rectangle aScaleRect;
+ ULONG nMapScalingOfs; // ab hier nocht nicht mit MapScaling bearbeitet
+ SfxItemSet* pLineAttr;
+ SfxItemSet* pFillAttr;
+ SfxItemSet* pTextAttr;
+ SdrPage* pPage;
+ SdrModel* pModel;
+ SdrLayerID nLayer;
+ FASTBOOL bPenDirty;
+ FASTBOOL bBrsDirty;
+ FASTBOOL bFntDirty;
+
+ // fuer Optimierung von (PenNULL,Brush,DrawPoly),(Pen,BrushNULL,DrawPoly) -> aus 2 mach ein
+ FASTBOOL bLastObjWasPolyWithoutLine;
+ FASTBOOL bNoLine;
+ FASTBOOL bNoFill;
+
+ // fuer Optimierung mehrerer Linien zu einer Polyline
+ FASTBOOL bLastObjWasLine;
+
+protected:
+ void DoAction(MetaPixelAction & rAct);
+ void DoAction(MetaPointAction & rAct);
+ void DoAction(MetaLineAction & rAct);
+ void DoAction(MetaRectAction & rAct);
+ void DoAction(MetaRoundRectAction & rAct);
+ void DoAction(MetaEllipseAction & rAct);
+ void DoAction(MetaArcAction & rAct);
+ void DoAction(MetaPieAction & rAct);
+ void DoAction(MetaChordAction & rAct);
+ void DoAction(MetaPolyLineAction & rAct);
+ void DoAction(MetaPolygonAction & rAct);
+ void DoAction(MetaPolyPolygonAction & rAct);
+ void DoAction(MetaTextAction & rAct);
+ void DoAction(MetaTextArrayAction & rAct);
+ void DoAction(MetaStretchTextAction & rAct);
+ void DoAction(MetaBmpAction & rAct);
+ void DoAction(MetaBmpScaleAction & rAct);
+ void DoAction(MetaBmpExAction & rAct);
+ void DoAction(MetaBmpExScaleAction & rAct);
+ void DoAction(MetaHatchAction & rAct);
+ void DoAction(MetaLineColorAction & rAct);
+ void DoAction(MetaMapModeAction & rAct);
+ void DoAction(MetaFillColorAction & rAct) { rAct.Execute(&aVD); bBrsDirty=TRUE; }
+ void DoAction(MetaTextColorAction & rAct) { rAct.Execute(&aVD); bBrsDirty=TRUE; }
+ void DoAction(MetaTextFillColorAction & rAct) { rAct.Execute(&aVD); bBrsDirty=TRUE; }
+ void DoAction(MetaFontAction & rAct) { rAct.Execute(&aVD); bFntDirty=TRUE; }
+ void DoAction(MetaClipRegionAction & rAct) { rAct.Execute(&aVD); }
+ void DoAction(MetaRasterOpAction & rAct) { rAct.Execute(&aVD); }
+ void DoAction(MetaPushAction & rAct) { rAct.Execute(&aVD); }
+ void DoAction(MetaPopAction & rAct) { rAct.Execute(&aVD); bPenDirty=TRUE; bBrsDirty=TRUE; bFntDirty=TRUE; }
+ void DoAction(MetaMoveClipRegionAction & rAct) { rAct.Execute(&aVD); }
+ void DoAction(MetaISectRectClipRegionAction& rAct) { rAct.Execute(&aVD); }
+ void DoAction(MetaISectRegionClipRegionAction& rAct) { rAct.Execute(&aVD); }
+ void DoAction(MetaCommentAction& rAct, GDIMetaFile* pMtf);
+
+ void ImportText(const Point& rPos, const XubString& rStr);
+ void SetAttributes(SdrObject* pObj, FASTBOOL bForceTextAttr=FALSE);
+ void InsertObj(SdrObject* pObj);
+ void MapScaling();
+
+ // Optimierung:
+ FASTBOOL CheckLastLineMerge(const XPolygon& rSrcPoly);
+ FASTBOOL CheckLastPolyLineAndFillMerge(const XPolyPolygon& rPoly);
+
+public:
+ ImpSdrGDIMetaFileImport(SdrModel& rModel);
+ ~ImpSdrGDIMetaFileImport();
+ ULONG DoImport(const GDIMetaFile& rMtf, SdrObjList& rDestList, ULONG nInsPos=CONTAINER_APPEND, SvdProgressInfo *pProgrInfo = NULL);
+ void SetLayer(SdrLayerID nLay) { nLayer=nLay; }
+ SdrLayerID GetLayer() const { return nLayer; }
+ void SetScaleRect(const Rectangle& rRect) { aScaleRect=rRect; }
+ const Rectangle& GetScaleRect() const { return aScaleRect; }
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDFMTF_HXX
+
diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx
new file mode 100644
index 0000000000..6763995d0a
--- /dev/null
+++ b/svx/source/svdraw/svdfppt.cxx
@@ -0,0 +1,6288 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdfppt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef SVX_LIGHT
+
+#include <math.h>
+
+#ifndef _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SOT_STORINFO_HXX
+#include <sot/storinfo.hxx>
+#endif
+
+#include "svdfppt.hxx"
+#include "xpoly.hxx"
+#include "svdtrans.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdobj.hxx"
+#include "svdogrp.hxx"
+#include "svdorect.hxx"
+#include "svdopage.hxx"
+#include "svdograf.hxx"
+#include "svdopath.hxx"
+#include "svdocirc.hxx"
+#include "svdocapt.hxx"
+#include "svdattr.hxx"
+#include "xattr.hxx"
+#include "svditext.hxx"
+#include "svdetc.hxx"
+#include <bulitem.hxx>
+#include "polysc3d.hxx"
+#include "extrud3d.hxx"
+
+#ifndef _EEITEMID_HXX
+#include "eeitemid.hxx"
+#endif
+
+#ifndef _SVX_TSPTITEM_HXX
+#include "tstpitem.hxx"
+#endif
+
+#if defined(JOEENV) && defined(JOEDEBUG)
+#include "impinccv.h" // etwas Testkram
+#endif
+
+
+#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+#ifndef _SVX_ADJITEM_HXX //autogen
+#include <adjitem.hxx>
+#endif
+#ifndef _SVX_ESCPITEM_HXX //autogen
+#include <escpitem.hxx>
+#endif
+#ifndef _SVX_COLRITEM_HXX //autogen
+#include <colritem.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <svstor.hxx>
+#endif
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include <fhgtitem.hxx>
+#endif
+#ifndef _SVX_WGHTITEM_HXX //autogen
+#include <wghtitem.hxx>
+#endif
+#ifndef _SVX_POSTITEM_HXX //autogen
+#include <postitem.hxx>
+#endif
+#ifndef _SVX_UDLNITEM_HXX //autogen
+#include <udlnitem.hxx>
+#endif
+#ifndef _SVX_CRSDITEM_HXX //autogen
+#include <crsditem.hxx>
+#endif
+#ifndef _SVX_SHDDITEM_HXX //autogen
+#include <shdditem.hxx>
+#endif
+#ifndef _SVX_FONTITEM_HXX
+#include <fontitem.hxx>
+#endif
+
+#ifndef _SVDOUTL_HXX
+#include <svdoutl.hxx>
+#endif
+#ifndef _EDITENG_HXX
+#include <editeng.hxx>
+#endif
+#ifndef _EEITEMID_HXX
+#include <eeitemid.hxx>
+#endif
+#ifndef _SVX_LSPCITEM_HXX //autogen
+#include <lspcitem.hxx>
+#endif
+#ifndef _SVX_ULSPITEM_HXX //autogen
+#include <ulspitem.hxx>
+#endif
+#ifndef _SVX_LRSPITEM_HXX
+#include <lrspitem.hxx>
+#endif
+#ifndef _SV_METRIC_HXX //autogen
+#include <vcl/metric.hxx>
+#endif
+
+#ifndef _SVDITER_HXX
+#include <svditer.hxx>
+#endif
+
+#ifndef _SVDOEDGE_HXX
+#include <svdoedge.hxx>
+#endif
+
+#ifndef _SXEKITM_HXX
+#include <sxekitm.hxx>
+#endif
+
+#ifndef _SVX_FLDITEM_HXX
+#include <flditem.hxx>
+#endif
+
+#ifndef _SYCHCONV_HXX
+#include <svtools/sychconv.hxx>
+#endif
+
+#ifndef _TEXTCONV_HXX
+#include <textconv.hxx>
+#endif
+
+#ifndef _ZCODEC_HXX
+#include <tools/zcodec.hxx>
+#endif
+
+#ifndef _SVXMSBAS_HXX
+#include <svxmsbas.hxx>
+#endif
+
+#ifndef _SFX_OBJSH_HXX
+#include <sfx2/objsh.hxx>
+#endif
+
+#ifndef _SVX_BRSHITEM_HXX
+#include <brshitem.hxx>
+#endif
+
+#ifndef _SVDOOLE2_HXX
+#include <svdoole2.hxx>
+#endif
+
+#ifndef SVX_LIGHT
+#ifndef _EMBOBJ_HXX
+#include <so3/embobj.hxx>
+#endif
+#ifndef _IPOBJ_HXX
+#include <so3/ipobj.hxx>
+#endif
+#endif
+#include <vcl/virdev.hxx>
+#pragma hdrstop
+
+SvInPlaceObjectRef lcl_CheckForConvertToSOObj( UINT32 nConvertFlags,
+ SvStorage& rSrcStg, SvStorage& rDestStorage );
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+// PPT ColorScheme Slots
+#define PPT_COLSCHEME (0x08000000)
+#define PPT_COLSCHEME_HINTERGRUND (0x08000000)
+#define PPT_COLSCHEME_TEXT_UND_ZEILEN (0x08000001)
+#define PPT_COLSCHEME_SCHATTEN (0x08000002)
+#define PPT_COLSCHEME_TITELTEXT (0x08000003)
+#define PPT_COLSCHEME_FUELLBEREICHE (0x08000004)
+#define PPT_COLSCHEME_AKZENT (0x08000005)
+#define PPT_COLSCHEME_A_UND_HYPERLINK (0x08000006)
+#define PPT_COLSCHEME_A_H_GESICHERT (0x08000007)
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void PptSlidePersistAtom::Clear()
+{
+ nReserved = nPsrReference = nFlags = nNumberTexts = nSlideId = 0;
+}
+
+SvStream& operator>>( SvStream& rIn, PptSlidePersistAtom& rAtom )
+{
+ DffRecordHeader aHd;
+ rIn >> aHd
+ >> rAtom.nPsrReference
+ >> rAtom.nFlags
+ >> rAtom.nNumberTexts
+ >> rAtom.nSlideId;
+// >> rAtom.nReserved;
+ aHd.SeekToEndOfRecord( rIn );
+ return rIn;
+}
+
+SV_IMPL_PTRARR(_PptSlidePersistList,PptSlidePersistEntry*);
+
+USHORT PptSlidePersistList::FindPage(UINT32 nId) const
+{
+ for ( USHORT i=0; i < Count(); i++ )
+ {
+ if (operator[](i)->GetSlideId()==nId) return i;
+ }
+ return PPTSLIDEPERSIST_ENTRY_NOTFOUND;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SvStream& operator>>( SvStream& rIn, PptInteractiveInfoAtom& rAtom )
+{
+ rIn >> rAtom.nSoundRef
+ >> rAtom.nExHyperlinkId
+ >> rAtom.nAction
+ >> rAtom.nOleVerb
+ >> rAtom.nJump
+ >> rAtom.nFlags
+ >> rAtom.nHyperlinkType
+ >> rAtom.nUnknown1
+ >> rAtom.nUnknown2
+ >> rAtom.nUnknown3;
+ return rIn;
+}
+
+SvStream& operator>>( SvStream& rIn, PptExOleObjAtom& rAtom )
+{
+ rIn >> rAtom.nDummy0
+ >> rAtom.nDummy1
+ >> rAtom.nId
+ >> rAtom.nDummy2
+ >> rAtom.nPersistPtr
+ >> rAtom.nDummy4;
+ return rIn;
+}
+
+Size PptDocumentAtom::GetPageSize(const Size& rSiz) const
+{
+ return rSiz;
+/*
+ Size aRet;
+ switch ( eSlidesPageFormat )
+ {
+ // Wenn man in Powerpoint als Seitenformat "Bildschirmgroesse"
+ // einstellt, dann zeigt dieser Dialog zwar 24x18cm an, die
+ // angezeigte Seite ist aber anders. Das sieht man, wenn man
+ // ein Rechteck seitenfuellend aufzieht und sich dessen Groesse
+ // ansieht. Die importierten Abmessungen sind auf jeden Fall
+ // die, die auch im Ppt-File stehen. Ich denke, das es sich
+ // hier eher um ein Bug in PowerPoint handelt, das im
+ // Seitenformat-Dialog bei "Bildschirmgroesse" falsche Masse
+ // angezeigt werden (vielleicht ja auch bildschirmabhaengig?).
+// case PPTPF_SCREEN : aRet.Width()=4082; aRet.Height()=5443; break;
+ case PPTPF_USLETTER: aRet.Width()=4896; aRet.Height()=6336; break;
+ case PPTPF_A4 : aRet.Width()=4762; aRet.Height()=6735; break;
+// case PPTPF_35MMDIA : aRet.Width()=4082; aRet.Height()=6123; break;
+// case PPTPF_OVERHEAD: aRet.Width()=4082; aRet.Height()=5443; break;
+ }
+ if ( aRet.Width() )
+ {
+ if ( rSiz.Width() > rSiz.Height() )
+ { // Querformat
+ long nMerk = aRet.Width();
+ aRet.Width() = aRet.Height();
+ aRet.Height() = nMerk;
+ }
+ }
+ else // CustomFormat oder Unbekannt oder Screen,Dia,Overhead
+ aRet = rSiz;
+ return aRet;
+*/
+}
+
+SvStream& operator>>(SvStream& rIn, PptDocumentAtom& rAtom)
+{
+// Tatsaechliches Format:
+// 00 aSlidePageSizeXY 8
+// 08 aNotesPageSizeXY 8
+// 16 aZoomRatio (OLE) 8
+// 24 nNotesMasterPersist 4
+// 28 nHandoutMasterPersist 4
+// 32 n1stPageNumber 2
+// 34 ePageFormat 2
+// 36 bEmbeddedTrueType 1
+// 37 bOmitTitlePlace 1
+// 38 bRightToLeft 1
+// 39 bShowComments 1
+
+ DffRecordHeader aHd;
+ INT32 nSlideX,nSlideY, nNoticeX, nNoticeY, nDummy;
+ UINT16 nSlidePageFormat;
+ INT8 nEmbeddedTrueType, nTitlePlaceHoldersOmitted, nRightToLeft, nShowComments;
+
+ rIn >> aHd
+ >> nSlideX >> nSlideY
+ >> nNoticeX >> nNoticeY
+ >> nDummy >> nDummy // ZoomRation ueberspringen
+ >> rAtom.nNotesMasterPersist
+ >> rAtom.nHandoutMasterPersist
+ >> rAtom.n1stPageNumber
+ >> nSlidePageFormat
+ >> nEmbeddedTrueType
+ >> nTitlePlaceHoldersOmitted
+ >> nRightToLeft
+ >> nShowComments;
+ rAtom.aSlidesPageSize.Width() = nSlideX;
+ rAtom.aSlidesPageSize.Height() = nSlideY;
+ rAtom.aNotesPageSize.Width() = nNoticeX;
+ rAtom.aNotesPageSize.Height() = nNoticeY;
+ rAtom.eSlidesPageFormat = (PptPageFormat)nSlidePageFormat;
+ rAtom.bEmbeddedTrueType = nEmbeddedTrueType;
+ rAtom.bTitlePlaceholdersOmitted = nTitlePlaceHoldersOmitted;
+ rAtom.bRightToLeft = nRightToLeft;
+ rAtom.bShowComments = nShowComments;
+ aHd.SeekToEndOfRecord( rIn );
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void PptSlideLayoutAtom::Clear()
+{
+ eLayout = 0;
+ for ( USHORT i = 0; i < 8; i++ )
+ {
+ aPlaceholderId[ i ] = 0;
+ aPlacementId[ i ] = 0;
+ }
+}
+
+SvStream& operator>>( SvStream& rIn, PptSlideLayoutAtom& rAtom )
+{
+ rIn >> rAtom.eLayout;
+ rIn.Read( rAtom.aPlaceholderId, 8 );
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SvStream& operator>>( SvStream& rIn, PptSlideAtom& rAtom )
+{
+ DffRecordHeader aHd;
+ rIn >> aHd
+ >> rAtom.aLayout
+ >> rAtom.nMasterId
+ >> rAtom.nNotesId
+ >> rAtom.nFlags;
+ aHd.SeekToEndOfRecord( rIn );
+ return rIn;
+}
+
+void PptSlideAtom::Clear()
+{
+ nMasterId = nNotesId = 0;
+ nFlags = 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SvStream& operator>>( SvStream& rIn, PptNotesAtom& rAtom )
+{
+ DffRecordHeader aHd;
+ rIn >> aHd
+ >> rAtom.nSlideId
+ >> rAtom.nFlags;
+ aHd.SeekToEndOfRecord( rIn );
+ return rIn;
+}
+
+void PptNotesAtom::Clear()
+{
+ nSlideId = 0;
+ nFlags = 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+Color PptColorSchemeAtom::GetColor( USHORT nNum ) const
+{
+ Color aRetval;
+ if ( nNum < 8 )
+ {
+ nNum <<= 2;
+ aRetval.SetRed( aData[ nNum++ ] );
+ aRetval.SetGreen( aData[ nNum++ ] );
+ aRetval.SetBlue( aData[ nNum++ ] );
+ }
+ return aRetval;
+}
+
+SvStream& operator>>( SvStream& rIn, PptColorSchemeAtom& rAtom )
+{
+ DffRecordHeader aHd;
+ rIn >> aHd;
+ rIn.Read( rAtom.aData, 32 );
+ aHd.SeekToEndOfRecord( rIn );
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SvStream& operator>>( SvStream& rIn, PptConnectorRule& rRule )
+{
+ rIn >> rRule.nRuleId
+ >> rRule.nShapeA
+ >> rRule.nShapeB
+ >> rRule.nShapeC
+ >> rRule.ncptiA
+ >> rRule.ncptiB;
+
+ return rIn;
+}
+
+PptSolverContainer::PptSolverContainer()
+{
+}
+
+PptSolverContainer::~PptSolverContainer()
+{
+ for ( PptConnectorRule* pPtr = (PptConnectorRule*)aCList.First();
+ pPtr; pPtr = (PptConnectorRule*)aCList.Next() )
+ delete pPtr;
+}
+
+SvStream& operator>>( SvStream& rIn, PptSolverContainer& rContainer )
+{
+ DffRecordHeader aHd;
+ rIn >> aHd;
+ if ( aHd.nRecType == DFF_msofbtSolverContainer )
+ {
+ DffRecordHeader aCRule;
+ while ( ( rIn.GetError() == 0 ) && ( rIn.Tell() < aHd.GetRecEndFilePos() ) )
+ {
+ rIn >> aCRule;
+ if ( aCRule.nRecType == DFF_msofbtConnectorRule )
+ {
+ PptConnectorRule* pRule = new PptConnectorRule;
+ rIn >> *pRule;
+ rContainer.aCList.Insert( pRule, LIST_APPEND );
+ }
+ aCRule.SeekToEndOfRecord( rIn );
+ }
+ }
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SvStream& operator>>( SvStream& rIn, PptFontEntityAtom& rAtom )
+{
+ DffRecordHeader aHd;
+ rIn >> aHd;
+ sal_Unicode nTemp, cData[ 32 ];
+ rIn.Read( cData, 64 );
+ rIn >> rAtom.nUnknown;
+ sal_uInt32 i;
+ for ( i = 0; i < 32; i++ )
+ {
+ nTemp = cData[ i ];
+ if ( !nTemp )
+ break;
+#ifdef __BIGENDIAN
+ cData[ i ] = ( nTemp >> 8 ) | ( nTemp << 8 );
+#endif
+ }
+ rAtom.aName = String( cData, i );
+ OutputDevice* pDev = (OutputDevice*)Application::GetDefaultDevice();
+ rAtom.bAvailable = pDev->IsFontAvailable( rAtom.aName );
+
+ aHd.SeekToEndOfRecord( rIn );
+ return rIn;
+}
+
+SV_DECL_PTRARR_DEL( PptFontEntityAtomList, PptFontEntityAtom*, 16, 16 );
+SV_IMPL_PTRARR( PptFontEntityAtomList, PptFontEntityAtom* );
+
+class PptFontCollection: public PptFontEntityAtomList {
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SvStream& operator>>( SvStream& rIn, PptUserEditAtom& rAtom )
+{
+ DffRecordHeader aHd;
+ rIn >> aHd
+ >> rAtom.nLastSlideID
+ >> rAtom.nVersion
+ >> rAtom.nOffsetLastEdit
+ >> rAtom.nOffsetPersistDirectory
+ >> rAtom.nDocumentRef
+ >> rAtom.nMaxPersistWritten
+ >> rAtom.eLastViewType;
+ aHd.SeekToEndOfRecord(rIn);
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void PptOEPlaceholderAtom::Clear()
+{
+ nPlacementId = 0;
+ nPlaceholderSize = nPlaceholderId = 0;
+}
+
+SvStream& operator>>( SvStream& rIn, PptOEPlaceholderAtom& rAtom )
+{
+ rIn >> rAtom.nPlacementId
+ >> rAtom.nPlaceholderId
+ >> rAtom.nPlaceholderSize;
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+PptSlidePersistEntry::~PptSlidePersistEntry()
+{
+ delete pPresentationObjects;
+ delete pSolverContainer;
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrEscherImport::SdrEscherImport( SvStream& rDocStream_ ) :
+ SvxMSDffManager ( rDocStream_ ),
+ pFonts ( NULL ),
+ nStreamLen ( 0 ),
+ nTextStylesIndex ( 0xffff ),
+ bWingdingsChecked ( FALSE ),
+ bWingdingsAvailable ( FALSE ),
+ bMonotypeSortsChecked ( FALSE ),
+ bMonotypeSortsAvailable ( FALSE ),
+ bTimesNewRomanChecked ( FALSE ),
+ bTimesNewRomanAvailable ( FALSE ),
+ eCharSetSystem ( gsl_getSystemTextEncoding() )
+{
+ nIStarBats = nIWingdings = 0;
+ pExtParaProv = NULL;
+}
+
+SdrEscherImport::~SdrEscherImport()
+{
+ void* pPtr;
+ for ( pPtr = aHFMasterList.First(); pPtr; pPtr = aHFMasterList.Next() )
+ delete (HeaderFooterMaster*)pPtr;
+ for ( pPtr = aOleObjectList.First(); pPtr; pPtr = aOleObjectList.Next() )
+ delete (PPTOleEntry*)pPtr;
+ delete pFonts;
+ delete pExtParaProv;
+}
+
+ULONG SdrEscherImport::CountRecords( USHORT nRecId, ULONG nMaxFilePos ) const
+{
+ ULONG nRet=0;
+ ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer spaetere Restauration
+ DffRecordHeader aHd;
+ do
+ {
+ rStCtrl >> aHd;
+ if ( aHd.nRecType == nRecId )
+ nRet++;
+ aHd.SeekToEndOfRecord( rStCtrl );
+ }
+ while ( rStCtrl.GetError() == 0 && rStCtrl.Tell () < nMaxFilePos );
+ rStCtrl.Seek ( nFPosMerk ); // FilePos restaurieren
+ return nRet;
+}
+
+ULONG SdrEscherImport::CountRecords2( USHORT nRecId1, USHORT nRecId2, ULONG nMaxFilePos ) const
+{
+ ULONG nRet = 0;
+ ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer spaetere Restauration
+ DffRecordHeader aHd;
+ do
+ {
+ rStCtrl >> aHd;
+ if ( aHd.nRecType == nRecId1 || aHd.nRecType == nRecId2 )
+ nRet++;
+ aHd.SeekToEndOfRecord( rStCtrl );
+ }
+ while ( rStCtrl.GetError() == 0 && rStCtrl.Tell() < nMaxFilePos );
+ rStCtrl.Seek( nFPosMerk ); // FilePos restaurieren
+ return nRet;
+}
+
+const PptSlideLayoutAtom* SdrEscherImport::GetSlideLayoutAtom() const
+{
+ return NULL;
+}
+
+sal_Bool SdrEscherImport::ReadString( String& rStr ) const
+{
+ sal_Bool bRet = FALSE;
+ DffRecordHeader aStrHd;
+ rStCtrl >> aStrHd;
+ if (aStrHd.nRecType == PPT_PST_TextBytesAtom
+ || aStrHd.nRecType == PPT_PST_TextCharsAtom
+ || aStrHd.nRecType == PPT_PST_CString)
+ {
+ sal_Bool bUniCode =
+ (aStrHd.nRecType == PPT_PST_TextCharsAtom
+ || aStrHd.nRecType == PPT_PST_CString);
+ bRet=TRUE;
+ ULONG nBytes = aStrHd.nRecLen;
+ MSDFFReadZString( rStCtrl, rStr, nBytes, bUniCode );
+ aStrHd.SeekToEndOfRecord( rStCtrl );
+ }
+ else
+ aStrHd.SeekToBegOfRecord( rStCtrl );
+ return bRet;
+}
+
+FASTBOOL SdrEscherImport::GetColorFromPalette(USHORT nNum, Color& rColor) const
+{
+ return FALSE;
+}
+
+BOOL SdrEscherImport::SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const
+{
+ return FALSE;
+}
+
+
+FASTBOOL SdrEscherImport::GetFont(ULONG nNum, String& rFontName) const
+{
+ return FALSE;
+}
+
+PptFontEntityAtom* SdrEscherImport::GetFontEnityAtom( UINT32 nNum ) const
+{
+ PptFontEntityAtom* pRetValue = NULL;
+ if ( pFonts && ( nNum < pFonts->Count() ) )
+ pRetValue = (*pFonts)[ (USHORT)nNum ];
+ return pRetValue;
+}
+
+CharSet SdrEscherImport::GetCharSet( UINT32 nNum ) const
+{
+ CharSet eRetValue( eCharSetSystem );
+ if ( pFonts && ( nNum < pFonts->Count() ) )
+ eRetValue = (*pFonts)[ (USHORT)nNum ]->eCharSet;
+ return eRetValue;
+}
+
+BOOL SdrEscherImport::IsFontAvailable( UINT32 nNum ) const
+{
+ BOOL bRetValue = FALSE;
+ if ( pFonts && ( nNum < pFonts->Count() ) )
+ bRetValue = (*pFonts)[ (USHORT)nNum ]->bAvailable;
+ return bRetValue;
+}
+
+SdrObject* SdrEscherImport::ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPage* pPage ) const
+{
+ return pObj;
+}
+
+void SdrEscherImport::ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd, void* pData, DffObjData& rObj )
+{
+ INT16 ls, os, rs, us;
+ rSt >> os >> ls >> rs >> us; // etwas seltsame Koordinatenreihenfolge ...
+ long l = ls, o = os, r = rs, u = us;
+ Scale( l );
+ Scale( o );
+ Scale( r );
+ Scale( u );
+ rObj.aChildAnchor = Rectangle( l, o, r, u );
+ rObj.bChildAnchor = TRUE;
+ return;
+};
+
+void SdrEscherImport::RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraphic )
+{
+ if ( rGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+ {
+ sal_uInt16 nX, nGlobalColorsCount, nFillColorsCount;
+
+ rSt >> nX
+ >> nGlobalColorsCount
+ >> nFillColorsCount
+ >> nX
+ >> nX
+ >> nX;
+
+ if ( ( nGlobalColorsCount <= 64 ) && ( nFillColorsCount <= 64 ) )
+ {
+ if ( ( ( nGlobalColorsCount + nFillColorsCount ) * 44 + 12 ) == nRecLen )
+ {
+ sal_uInt32 OriginalGlobalColors[ 64 ];
+ sal_uInt32 NewGlobalColors[ 64 ];
+ sal_uInt32 OriginalFillColors[ 64 ];
+ sal_uInt32 NewFillColors[ 64 ];
+
+ sal_uInt32 i, j, nGlobalColorsChanged, nFillColorsChanged;
+ nGlobalColorsChanged = nFillColorsChanged = 0;
+
+ sal_uInt32* pCurrentOriginal = OriginalGlobalColors;
+ sal_uInt32* pCurrentNew = NewGlobalColors;
+ sal_uInt32* pCount = &nGlobalColorsChanged;
+ i = nGlobalColorsCount;
+
+ for ( j = 0; j < 2; j++ )
+ {
+ for ( ; i > 0; i-- )
+ {
+ sal_uInt32 nIndex, nPos = rSt.Tell();
+ sal_uInt8 nDummy, nRed, nGreen, nBlue;
+ sal_uInt16 nChanged;
+ rSt >> nChanged;
+ if ( nChanged & 1 )
+ {
+ sal_uInt32 nColor = 0;
+ rSt >> nDummy
+ >> nRed
+ >> nDummy
+ >> nGreen
+ >> nDummy
+ >> nBlue
+ >> nIndex;
+
+ if ( nIndex < 8 )
+ {
+ Color aColor = MSO_CLR_ToColor( nIndex << 24 );
+ nRed = aColor.GetRed();
+ nGreen = aColor.GetGreen();
+ nBlue = aColor.GetBlue();
+ }
+ nColor = nRed | ( nGreen << 8 ) | ( nBlue << 16 );
+ *pCurrentNew++ = nColor;
+ rSt >> nDummy
+ >> nRed
+ >> nDummy
+ >> nGreen
+ >> nDummy
+ >> nBlue;
+ nColor = nRed | ( nGreen << 8 ) | ( nBlue << 16 );
+ *pCurrentOriginal++ = nColor;
+ (*pCount)++;
+ }
+ rSt.Seek( nPos + 44 );
+ }
+ pCurrentOriginal = OriginalFillColors;
+ pCurrentNew = NewFillColors;
+ pCount = &nFillColorsChanged;
+ i = nFillColorsCount;
+ }
+ if ( nGlobalColorsChanged || nFillColorsChanged )
+ {
+ Color* pSearchColors = new Color[ nGlobalColorsChanged ];
+ Color* pReplaceColors = new Color[ nGlobalColorsChanged ];
+
+ for ( j = 0; j < nGlobalColorsChanged; j++ )
+ {
+ sal_uInt32 nSearch = OriginalGlobalColors[ j ];
+ sal_uInt32 nReplace = NewGlobalColors[ j ];
+
+ pSearchColors[ j ].SetRed( (BYTE)nSearch );
+ pSearchColors[ j ].SetGreen( (BYTE)( nSearch >> 8 ) );
+ pSearchColors[ j ].SetBlue( (BYTE)( nSearch >> 16 ) );
+
+ pReplaceColors[ j ].SetRed( (BYTE)nReplace );
+ pReplaceColors[ j ].SetGreen( (BYTE)( nReplace >> 8 ) );
+ pReplaceColors[ j ].SetBlue( (BYTE)( nReplace >> 16 ) );
+ }
+ GDIMetaFile aGdiMetaFile( rGraphic.GetGDIMetaFile() );
+ aGdiMetaFile.ReplaceColors( pSearchColors, pReplaceColors,
+ nGlobalColorsChanged, NULL );
+ rGraphic = aGdiMetaFile;
+
+ delete[] pSearchColors;
+ delete[] pReplaceColors;
+ }
+ }
+ }
+ }
+}
+
+SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, Rectangle& rTextRect, SdrObject* pRet )
+{
+ ProcessData& rData = *((ProcessData*)pData);
+ PptSlidePersistEntry& rPersistEntry = rData.rPersistEntry;
+
+ PptOEPlaceholderAtom aPlaceholderAtom;
+ INT16 nHeaderFooterInstance = -1;
+
+ if ( maShapeRecords.SeekToContent( rSt, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
+ {
+ DffRecordHeader aPlaceHd;
+ while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < maShapeRecords.Current()->GetRecEndFilePos() ) )
+ {
+ rSt >> aPlaceHd;
+ switch ( aPlaceHd.nRecType )
+ {
+ case PPT_PST_OEPlaceholderAtom :
+ {
+ rSt >> aPlaceholderAtom;
+ if ( nHeaderFooterInstance == -1 )
+ {
+ switch ( aPlaceholderAtom.nPlaceholderId )
+ {
+ case PPT_PLACEHOLDER_MASTERSLIDENUMBER : nHeaderFooterInstance++;
+ case PPT_PLACEHOLDER_MASTERFOOTER : nHeaderFooterInstance++;
+ case PPT_PLACEHOLDER_MASTERHEADER : nHeaderFooterInstance++;
+ case PPT_PLACEHOLDER_MASTERDATE : nHeaderFooterInstance++; break;
+ }
+ if ( ! ( nHeaderFooterInstance & 0xfffc ) ) // is this a valid instance ( 0->3 )
+ {
+ if ( ( rPersistEntry.aSlideAtom.aLayout.eLayout != PPT_LAYOUT_TITLEMASTERSLIDE )
+ || ( aDocAtom.bTitlePlaceholdersOmitted == FALSE ) )
+ {
+ if ( !rPersistEntry.pHeaderFooterEntry ) // generate masterheaderfooter first
+ {
+ HeaderFooterMaster* pHFM = new HeaderFooterMaster;
+ if ( pHFM )
+ {
+ ((SdrEscherImport*)this )->aHFMasterList.Insert( (void*)pHFM, LIST_APPEND );
+ HeaderFooterEntry* pHFE = new HeaderFooterEntry( *pHFM, rData.pPage );
+ rPersistEntry.pHeaderFooterEntry = pHFE;
+ pHFM->aHeaderFooterEntryList.Insert( pHFE, LIST_APPEND );
+ DffRecordHeader* pHd;
+ for ( pHd = ((SdrEscherImport*)this )->aDocRecManager.GetRecordHeader( PPT_PST_HeadersFooters, SEEK_FROM_BEGINNING );
+ pHd; pHd = ((SdrEscherImport*)this )->aDocRecManager.GetRecordHeader( PPT_PST_HeadersFooters, SEEK_FROM_CURRENT ) )
+ {
+ if ( rPersistEntry.bNotesMaster )
+ {
+ if ( pHd->nRecInstance == 4 )
+ break;
+ }
+ else if ( rPersistEntry.bHandoutMaster )
+ continue;
+ else if ( pHd->nRecInstance == 3 ) // normal master page
+ break;
+ }
+ if ( pHd )
+ ((SdrEscherImport*)this )->ImportHeaderFooterContainer( *pHd, *pHFE );
+ }
+ }
+ if ( rPersistEntry.pHeaderFooterEntry )
+ {
+ HeaderFooterMaster& rHFM = rPersistEntry.pHeaderFooterEntry->rMaster;
+ if ( !rHFM.pOfs[ nHeaderFooterInstance ] )
+ rHFM.pOfs[ nHeaderFooterInstance ] = rObjData.rSpHd.GetRecBegFilePos();
+ }
+ }
+ else
+ {
+ delete pRet;
+ return NULL;
+ }
+ }
+ }
+ }
+ break;
+
+ case PPT_PST_RecolorInfoAtom :
+ {
+ if ( pRet && ( pRet->ISA( SdrGrafObj ) && ((SdrGrafObj*)pRet)->HasGDIMetaFile() ) )
+ {
+ Graphic aGraphic( ((SdrGrafObj*)pRet)->GetGraphic() );
+ RecolorGraphic( rSt, aPlaceHd.nRecLen, aGraphic );
+ ((SdrGrafObj*)pRet)->SetGraphic( aGraphic );
+ }
+ }
+ break;
+ }
+ aPlaceHd.SeekToEndOfRecord( rSt );
+ }
+ }
+ if ( ( aPlaceholderAtom.nPlaceholderId == PPT_PLACEHOLDER_NOTESSLIDEIMAGE ) && ( rPersistEntry.bNotesMaster == FALSE ) )
+ { // bPageObj
+ USHORT nPageNum = pSdrModel->GetPageCount();
+ if ( nPageNum > 0 )
+ nPageNum--;
+ delete pRet;
+ pRet = new SdrPageObj( rObjData.rBoundRect, nPageNum );
+ }
+ else
+ {
+ PPTTextObj aTextObj( rSt, (SdrPowerPointImport&)*this, rPersistEntry, &rObjData );
+ if ( ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() ) )
+ {
+ if ( pRet )
+ {
+ BOOL bDeleteSource = FALSE;
+ if ( ( ( GetPropertyValue( DFF_Prop_fNoFillHitTest ) & 0x10 )
+ + ( GetPropertyValue( DFF_Prop_fNoLineDrawDash ) & 8 ) ) == 0 )
+ {
+ bDeleteSource = ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) // fit shape to text
+ && ( rObjData.eShapeType == mso_sptRectangle );
+ }
+ if ( aTextObj.GetOEPlaceHolderAtom() ) // we are not allowed to get
+ bDeleteSource = TRUE; // grouped placeholder objects
+ if ( bDeleteSource && ( pRet->ISA( SdrGrafObj ) == FALSE )
+ && ( pRet->ISA( SdrObjGroup ) == FALSE )
+ && ( pRet->ISA( SdrOle2Obj ) == FALSE ) )
+ delete pRet, pRet = NULL;
+ }
+
+
+ SdrObject* pTObj = NULL;
+ SdrObjKind eTextKind = OBJ_TEXT;
+ if ( ( aPlaceholderAtom.nPlaceholderId == PPT_PLACEHOLDER_NOTESSLIDEIMAGE )
+ || ( aPlaceholderAtom.nPlaceholderId == PPT_PLACEHOLDER_MASTERNOTESSLIDEIMAGE ) )
+ {
+ aTextObj.SetInstance( 2 );
+ eTextKind = OBJ_TITLETEXT;
+ }
+
+ UINT32 nInstanceInSheet = aTextObj.GetInstance();
+ if ( ( rPersistEntry.ePageKind == PPT_MASTERPAGE ) )
+ {
+ if ( !rPersistEntry.pPresentationObjects )
+ {
+ rPersistEntry.pPresentationObjects = new UINT32[ PPT_STYLESHEETENTRYS ];
+ memset( rPersistEntry.pPresentationObjects, 0, PPT_STYLESHEETENTRYS * 4 );
+ }
+ if ( !rPersistEntry.pPresentationObjects[ nInstanceInSheet ] )
+ rPersistEntry.pPresentationObjects[ nInstanceInSheet ] = rObjData.nOldFilePos;
+ }
+ switch ( nInstanceInSheet )
+ {
+ case TSS_TYPE_PAGETITLE :
+ case TSS_TYPE_TITLE :
+ {
+ if ( GetSlideLayoutAtom()->eLayout == PPT_LAYOUT_TITLEMASTERSLIDE )
+ nInstanceInSheet = TSS_TYPE_TITLE;
+ else
+ nInstanceInSheet = TSS_TYPE_PAGETITLE;
+ }
+ break;
+ case TSS_TYPE_BODY :
+// case TSS_TYPE_SUBTITLE :
+ case TSS_TYPE_HALFBODY :
+ case TSS_TYPE_QUARTERBODY :
+ nInstanceInSheet = TSS_TYPE_BODY;
+ break;
+ }
+ aTextObj.SetMappedInstance( nInstanceInSheet );
+
+ // Abstaende an den Raendern der Textbox lesen
+ INT32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 92076 );
+ INT32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 92076 );
+ INT32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 46038 );
+ INT32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 46038 );
+ ScaleEmu( nTextLeft );
+ ScaleEmu( nTextRight );
+ ScaleEmu( nTextTop );
+ ScaleEmu( nTextBottom );
+
+ switch ( aTextObj.GetInstance() )
+ {
+ case TSS_TYPE_PAGETITLE :
+ case TSS_TYPE_TITLE : eTextKind = OBJ_TITLETEXT; break;
+ case TSS_TYPE_SUBTITLE : eTextKind = OBJ_TEXT; break;
+ case TSS_TYPE_BODY :
+ case TSS_TYPE_HALFBODY :
+ case TSS_TYPE_QUARTERBODY : eTextKind = OBJ_OUTLINETEXT; break;
+ }
+ INT32 nTextRotationAngle = ( rObjData.nSpFlags & SP_FFLIPV ) ? 18000 : 0; // #72116# vertical flip
+ if ( IsProperty( DFF_Prop_txflTextFlow ) )
+ {
+ MSO_TextFlow eTextFlow = (MSO_TextFlow)( GetPropertyValue( DFF_Prop_txflTextFlow ) & 0xFFFF );
+ switch( eTextFlow )
+ {
+ case mso_txflBtoT : // Bottom to Top non-@, unten -> oben
+ nTextRotationAngle += 9000;
+ break;
+ case mso_txflTtoBA : /* #68110# */ // Top to Bottom @-font, oben -> unten
+ case mso_txflTtoBN : // Top to Bottom non-@, oben -> unten
+ case mso_txflVertN : // Vertical, non-@, oben -> unten
+ nTextRotationAngle += 27000;
+ break;
+// case mso_txflHorzN : // Horizontal non-@, normal
+// case mso_txflHorzA : // Horizontal @-font, normal
+ }
+ if ( nTextRotationAngle )
+ {
+ Point nCenter( rTextRect.Center() );
+ long nDX = rTextRect.Right() - rTextRect.Left();
+ long nDY = rTextRect.Bottom() - rTextRect.Top();
+ rTextRect.Left() = nCenter.X() - nDY/2;
+ rTextRect.Top() = nCenter.Y() - nDX/2;
+ rTextRect.Right() = rTextRect.Left() + nDY;
+ rTextRect.Bottom() = rTextRect.Top() + nDX;
+ }
+ }
+ nTextRotationAngle -= GetPropertyValue( DFF_Prop_cdirFont, mso_cdir0 ) * 9000;
+
+ pTObj = new SdrRectObj( eTextKind, rTextRect );
+
+ if ( nTextRotationAngle )
+ {
+ double a = nTextRotationAngle * nPi180;
+ pTObj->NbcRotate( rTextRect.Center(), nTextRotationAngle, sin( a ), cos( a ) );
+ }
+
+ SfxItemSet aSet( pSdrModel->GetItemPool() );
+
+ if ( !pRet )
+ ((SdrEscherImport*)this)->ApplyAttributes( rSt, aSet, pTObj );
+
+ UINT32 nMod = ( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone ) ? 1 : 0;
+ nMod += ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) ? 2 : 0;
+ switch ( nMod )
+ {
+ case 0 : // - this appends just only one obj
+ case 2 : // - we have to get a single textobj
+ {
+ aSet.Put( SdrTextAutoGrowWidthItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ }
+ break;
+
+ case 1 :
+ case 3 : // - we have to get a single textobj
+ {
+ aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ }
+ break;
+ }
+
+
+/*
+ switch ( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) )
+ {
+ case mso_wrapNone :
+ {
+ if ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) // be sure this is FitShapeToText
+ aSet.Put( SdrTextAutoGrowWidthItem( TRUE ) );
+ }
+ break;
+
+ case mso_wrapByPoints :
+ aSet.Put( SdrTextContourFrameItem( TRUE ) );
+ break;
+ }
+*/
+ // Abstaende an den Raendern der Textbox setzen
+ aSet.Put( SdrTextLeftDistItem( nTextLeft ) );
+ aSet.Put( SdrTextRightDistItem( nTextRight ) );
+ aSet.Put( SdrTextUpperDistItem( nTextTop ) );
+ aSet.Put( SdrTextLowerDistItem( nTextBottom ) );
+
+ // Textverankerung lesen
+ MSO_Anchor eTextAnchor = (MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop );
+
+ SdrTextVertAdjust eTVA = SDRTEXTVERTADJUST_CENTER;
+ switch( eTextAnchor )
+ {
+ case mso_anchorTop:
+ case mso_anchorTopCentered:
+ eTVA = SDRTEXTVERTADJUST_TOP;
+ break;
+
+ case mso_anchorMiddle :
+ case mso_anchorMiddleCentered:
+ eTVA = SDRTEXTVERTADJUST_CENTER;
+ break;
+
+ case mso_anchorBottom:
+ case mso_anchorBottomCentered:
+ eTVA = SDRTEXTVERTADJUST_BOTTOM;
+ break;
+/*
+ case mso_anchorTopBaseline:
+ case mso_anchorBottomBaseline:
+ case mso_anchorTopCenteredBaseline:
+ case mso_anchorBottomCenteredBaseline:
+ break;
+*/
+ }
+ SdrTextHorzAdjust eTHA = SDRTEXTHORZADJUST_CENTER;
+ switch( eTextAnchor )
+ {
+ case mso_anchorTop :
+ case mso_anchorMiddle :
+ case mso_anchorBottom :
+ {
+ eTHA = SDRTEXTHORZADJUST_BLOCK;
+ PPTParagraphObj* pPara = aTextObj.First();
+ if ( pPara )
+ {
+ UINT32 nParaAdjust = 0;
+ pPara->GetAttrib( PPT_ParaAttr_Adjust, nParaAdjust, aTextObj.GetInstance() );
+ switch ( nParaAdjust )
+ {
+ case 0 : eTHA = SDRTEXTHORZADJUST_LEFT; break;
+ case 2 : eTHA = SDRTEXTHORZADJUST_RIGHT; break;
+ }
+ }
+ }
+ break;
+ }
+ aSet.Put( SdrTextVertAdjustItem( eTVA ) );
+ aSet.Put( SdrTextHorzAdjustItem( eTHA ) );
+
+
+ INT32 nMinFrameHeight = rTextRect.GetHeight() - ( nTextTop + nTextBottom );
+ if ( nMinFrameHeight < 0 )
+ nMinFrameHeight = 0;
+
+ aSet.Put( SdrTextMinFrameHeightItem( nMinFrameHeight ) );
+ pTObj->SetModel( pSdrModel );
+ pTObj->NbcSetAttributes( aSet, FALSE );
+ pTObj = ReadObjText( &aTextObj, pTObj, rData.pPage );
+ if ( pTObj )
+ { // rotate text with shape ?
+ if ( mnFix16Angle )
+ {
+ INT32 nAngle = ( rObjData.nSpFlags & SP_FFLIPV ) ? -mnFix16Angle : mnFix16Angle; // #72116# vertical flip -> rotate by using the other way
+ if ( rObjData.nSpFlags & SP_FFLIPH )
+ nAngle = 180 - nAngle;
+ double a = nAngle * nPi180;
+ pTObj->NbcRotate( rObjData.rBoundRect.Center(), nAngle, sin( a ), cos( a ) );
+ }
+ if ( pRet )
+ {
+ SdrObject* pGroup = new SdrObjGroup;
+ pGroup->GetSubList()->NbcInsertObject( pRet );
+ pGroup->GetSubList()->NbcInsertObject( pTObj );
+ pRet = pGroup;
+ }
+ else
+ pRet = pTObj;
+ }
+ }
+ }
+ if ( pRet )
+ {
+ if ( rObjData.nSpFlags & SP_FBACKGROUND )
+ {
+ pRet->NbcSetSnapRect( Rectangle( Point(), ((SdrPage*)rData.pPage)->GetSize() ) ); // Groesse setzen
+ }
+ if ( ( nHeaderFooterInstance != -1 ) && rPersistEntry.pHeaderFooterEntry ) // headerfooter ?
+ {
+ HeaderFooterEntry& rHFE = *rPersistEntry.pHeaderFooterEntry;
+ if ( rHFE.bMaster && ( !rHFE.pSdrObject[ nHeaderFooterInstance ] ) ) // master ?
+ {
+ rHFE.pInstanceOrder[ rHFE.nInstanceCount++ ] = nHeaderFooterInstance;
+ rHFE.pSdrObject[ nHeaderFooterInstance ] = pRet;
+ rHFE.pPageIndex[ nHeaderFooterInstance ] = ((SdrPage*)rData.pPage)->GetObjCount();
+ pRet = NULL;
+ }
+ }
+ if ( rPersistEntry.pSolverContainer )
+ {
+ for ( PptConnectorRule* pPtr = (PptConnectorRule*)rPersistEntry.pSolverContainer->aCList.First();
+ pPtr; pPtr = (PptConnectorRule*)rPersistEntry.pSolverContainer->aCList.Next() )
+ {
+ if ( rObjData.nShapeId == pPtr->nShapeA )
+ pPtr->pAObj = pRet;
+ else if ( rObjData.nShapeId == pPtr->nShapeB )
+ pPtr->pBObj = pRet;
+ else if ( rObjData.nShapeId == pPtr->nShapeC )
+ pPtr->pCObj = pRet;
+ }
+ }
+ if ( rPersistEntry.ePageKind == PPT_MASTERPAGE )
+ { // maybe the escher clusterlist is not correct, but we have to got the right page by using the
+ // spMaster property, so we are patching the table
+ if ( rPersistEntry.nDrawingDgId != 0xffffffff )
+ {
+ UINT32 nSec = ( rObjData.nShapeId >> 10 ) - 1;
+ if ( nSec < mnIdClusters )
+ mpFidcls[ nSec ].dgid = rPersistEntry.nDrawingDgId; // insert the correct drawing id;
+ }
+ }
+ if ( GetPropertyValue( DFF_Prop_fNoFillHitTest ) & 0x10 )
+ {
+ if ( (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid ) == mso_fillBackground )
+ {
+ if ( !rData.pBackgroundColoredObjects )
+ rData.pBackgroundColoredObjects = new List;
+ rData.pBackgroundColoredObjects->Insert( pRet, LIST_APPEND );
+ }
+ }
+ }
+ return pRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrEscherImport::CheckWingdings() const
+{
+ OutputDevice* pDev = (OutputDevice*)Application::GetDefaultDevice();
+ ((SdrEscherImport*)this)->bWingdingsAvailable = pDev->IsFontAvailable( String( RTL_CONSTASCII_USTRINGPARAM( "WINGDINGS" ) ) );
+ ((SdrEscherImport*)this)->bWingdingsChecked = TRUE;
+}
+
+void SdrEscherImport::CheckMonotypeSorts() const
+{
+ OutputDevice* pDev = (OutputDevice*)Application::GetDefaultDevice();
+ ((SdrEscherImport*)this)->bMonotypeSortsAvailable = pDev->IsFontAvailable( String( RTL_CONSTASCII_USTRINGPARAM( "MONOTYPE SORTS" ) ) );
+ ((SdrEscherImport*)this)->bMonotypeSortsChecked = TRUE;
+}
+
+void SdrEscherImport::CheckTimesNewRoman() const
+{
+ OutputDevice* pDev = (OutputDevice*)Application::GetDefaultDevice();
+ ((SdrEscherImport*)this)->bTimesNewRomanAvailable = pDev->IsFontAvailable( String( RTL_CONSTASCII_USTRINGPARAM( "TIMES NEW ROMAN" ) ) );
+ ((SdrEscherImport*)this)->bTimesNewRomanChecked = TRUE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrPowerPointImport::SdrPowerPointImport( SvStream& rDocStream ) :
+ bOk ( rStCtrl.GetErrorCode() == SVSTREAM_OK ),
+ SdrEscherImport ( rDocStream ),
+ pPPTStyleSheet ( NULL ),
+ pPersistPtr ( NULL ),
+ nPersistPtrAnz ( 0 ),
+ pMasterPages ( NULL ),
+ pSlidePages ( NULL ),
+ pNotePages ( NULL ),
+ nAktPageNum ( 0 ),
+ nDocStreamPos ( 0 ),
+ nPageColorsNum ( 0xFFFF ),
+ ePageColorsKind ( PPT_MASTERPAGE ),
+ nNotesMasterNum ( 0 ),
+ nHandoutMasterNum ( 0 ),
+ eAktPageKind ( PPT_MASTERPAGE )
+{
+ DffRecordHeader* pHd;
+ if ( bOk )
+ {
+ rStCtrl.Seek( STREAM_SEEK_TO_END );
+ nStreamLen = rStCtrl.Tell();
+ rStCtrl.Seek( 0 );
+ aPptRecManager.Consume( rStCtrl, FALSE, nStreamLen );
+
+ // UserEditAtom lesen
+ // Erstmal immer das letzte, falls mehrere vorhanden sind.
+ for ( pHd = aPptRecManager.Last(); pHd; pHd = aPptRecManager.Prev() )
+ {
+ if ( pHd->nRecType == PPT_PST_UserEditAtom )
+ {
+ pHd->SeekToBegOfRecord( rStCtrl );
+ rStCtrl >> aUserEditAtom;
+ break;
+ }
+ }
+ if ( !pHd )
+ bOk = FALSE;
+ }
+ if ( rStCtrl.GetError() != 0 )
+ bOk = FALSE;
+ if ( bOk )
+ { // PersistPtrs lesen (alle)
+ nPersistPtrAnz = aUserEditAtom.nMaxPersistWritten + 1; // 1 mehr, damit ich immer direkt indizieren kann
+ pPersistPtr = new UINT32[ nPersistPtrAnz ]; // (die fangen naemlich eigentlich bei 1 an)
+ memset( pPersistPtr, 0x00, nPersistPtrAnz * 4 );
+
+ for ( pHd = aPptRecManager.GetRecordHeader( PPT_PST_PersistPtrIncrementalBlock, SEEK_FROM_BEGINNING );
+ pHd; pHd = aPptRecManager.GetRecordHeader( PPT_PST_PersistPtrIncrementalBlock, SEEK_FROM_CURRENT ) )
+ {
+ ULONG nPibLen = pHd->GetRecEndFilePos();
+ pHd->SeekToContent( rStCtrl );
+ while ( bOk && ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < nPibLen ) )
+ {
+ UINT32 nOfs, nAnz;
+ rStCtrl >> nOfs;
+ nAnz = nOfs;
+ nOfs &= 0x000FFFFF;
+ nAnz >>= 20;
+ while ( bOk && ( rStCtrl.GetError() == 0 ) && ( nAnz > 0 ) && ( nOfs < nPersistPtrAnz ) )
+ {
+ rStCtrl >> pPersistPtr[ nOfs ];
+ if ( pPersistPtr[ nOfs ] > nStreamLen )
+ {
+ bOk = FALSE;
+ DBG_ERROR("SdrPowerPointImport::Ctor(): Ungueltiger Eintrag im Persist-Directory!");
+ }
+ nOfs++;
+ nAnz--;
+ }
+ if ( bOk && nAnz > 0 )
+ {
+ DBG_ERROR("SdrPowerPointImport::Ctor(): Nicht alle Persist-Directory Entraege gelesen!");
+ bOk = FALSE;
+ }
+ }
+ }
+ }
+ if ( rStCtrl.GetError() != 0 )
+ bOk = FALSE;
+ if ( bOk )
+ { // Document PersistEntry checken
+ nDocStreamPos = aUserEditAtom.nDocumentRef;
+ if ( nDocStreamPos > nPersistPtrAnz )
+ {
+ DBG_ERROR("SdrPowerPointImport::Ctor(): aUserEditAtom.nDocumentRef ungueltig!");
+ bOk = FALSE;
+ }
+ }
+ if ( bOk )
+ { // Document FilePos checken
+ nDocStreamPos = pPersistPtr[ nDocStreamPos ];
+ if ( nDocStreamPos >= nStreamLen )
+ {
+ DBG_ERROR("SdrPowerPointImport::Ctor(): nDocStreamPos >= nStreamLen!");
+ bOk = FALSE;
+ }
+ }
+ if ( bOk )
+ {
+ rStCtrl.Seek( nDocStreamPos );
+ aDocRecManager.Consume( rStCtrl );
+
+ DffRecordHeader aDocHd;
+ rStCtrl >> aDocHd;
+ // DocumentAtom lesen
+ DffRecordHeader aDocAtomHd;
+ rStCtrl >> aDocAtomHd;
+ if ( aDocHd.nRecType == PPT_PST_Document && aDocAtomHd.nRecType == PPT_PST_DocumentAtom )
+ {
+ aDocAtomHd.SeekToBegOfRecord( rStCtrl );
+ rStCtrl >> aDocAtom;
+ }
+ else
+ bOk = FALSE;
+
+ if ( bOk )
+ { // SlidePersists Lesen
+ pMasterPages=new PptSlidePersistList;
+ pSlidePages =new PptSlidePersistList;
+ pNotePages =new PptSlidePersistList;
+ USHORT nPageListNum = 0;
+ DffRecordHeader* pSlideListWithTextHd = aDocRecManager.GetRecordHeader( PPT_PST_SlideListWithText );
+ while ( pSlideListWithTextHd && ( nPageListNum < 3 ) )
+ {
+ pSlideListWithTextHd->SeekToContent( rStCtrl );
+ PptSlidePersistList* pPageList = GetPageList( PptPageKind( nPageListNum ) );
+ while ( SeekToRec( rStCtrl, PPT_PST_SlidePersistAtom, pSlideListWithTextHd->GetRecEndFilePos() ) )
+ {
+ PptSlidePersistEntry* pE = new PptSlidePersistEntry;
+ rStCtrl >> pE->aPersistAtom;
+ pE->ePageKind = PptPageKind( nPageListNum );
+ pPageList->C40_INSERT( PptSlidePersistEntry, pE, pPageList->Count() );
+ }
+ pSlideListWithTextHd = aDocRecManager.GetRecordHeader( PPT_PST_SlideListWithText, SEEK_FROM_CURRENT );
+ nPageListNum++;
+ }
+ if ( aDocAtom.nNotesMasterPersist != 0 )
+ {
+ PptSlidePersistEntry* pE = new PptSlidePersistEntry;
+ pE->bNotesMaster = TRUE;
+ pE->aPersistAtom.nPsrReference = aDocAtom.nNotesMasterPersist;
+ nNotesMasterNum = pMasterPages->Count() == 0 ? 0 : 1;
+ pMasterPages->C40_INSERT( PptSlidePersistEntry, pE, nNotesMasterNum );
+ }
+ if ( aDocAtom.nHandoutMasterPersist != 0 )
+ {
+ PptSlidePersistEntry* pE = new PptSlidePersistEntry;
+ pE->bHandoutMaster = TRUE;
+ pE->aPersistAtom.nPsrReference = aDocAtom.nHandoutMasterPersist;
+ nHandoutMasterNum = 0;
+ pMasterPages->C40_INSERT( PptSlidePersistEntry, pE, nHandoutMasterNum );
+ if ( aDocAtom.nNotesMasterPersist )
+ nNotesMasterNum++;
+ }
+ // Zu jeder Page noch das SlideAtom bzw. NotesAtom lesen, soweit vorhanden
+ nPageListNum = 0;
+ for ( nPageListNum = 0; nPageListNum < 3; nPageListNum++ )
+ {
+ PptSlidePersistList* pPageList = GetPageList( PptPageKind( nPageListNum ) );
+ for ( USHORT nPageNum = 0; nPageNum < pPageList->Count(); nPageNum++ )
+ {
+ PptSlidePersistEntry* pE = (*pPageList)[ nPageNum ];
+ ULONG nPersist = pE->aPersistAtom.nPsrReference;
+ if ( nPersist > 0 && nPersist < nPersistPtrAnz )
+ {
+ ULONG nFPos = pPersistPtr[ nPersist ];
+ if ( nFPos < nStreamLen )
+ {
+ if ( nFPos )
+ {
+ rStCtrl.Seek( nFPos );
+ DffRecordHeader aSlideHd;
+ rStCtrl >> aSlideHd;
+ if ( SeekToRec( rStCtrl, PPT_PST_SlideAtom, aSlideHd.GetRecEndFilePos() ) )
+ rStCtrl >> pE->aSlideAtom;
+ else if ( SeekToRec( rStCtrl, PPT_PST_NotesAtom, aSlideHd.GetRecEndFilePos() ) )
+ rStCtrl >> pE->aNotesAtom;
+ aSlideHd.SeekToContent( rStCtrl );
+
+ DffRecordHeader aPPTDrawingHd;
+ if ( SeekToRec( rStCtrl, PPT_PST_PPDrawing, aSlideHd.GetRecEndFilePos(), &aPPTDrawingHd ) )
+ {
+ DffRecordHeader aPPTDgContainer;
+ if ( SeekToRec( rStCtrl, DFF_msofbtDgContainer, aPPTDrawingHd.GetRecEndFilePos(), &aPPTDgContainer ) )
+ {
+ if ( SeekToRec( rStCtrl, DFF_msofbtDg, aPPTDrawingHd.GetRecEndFilePos() ) )
+ {
+ DffRecordHeader aDgRecordHeader;
+ rStCtrl >> aDgRecordHeader;
+ pE->nDrawingDgId = aDgRecordHeader.nRecInstance;
+ aDgRecordHeader.SeekToEndOfRecord( rStCtrl );
+ }
+ if ( SeekToRec( rStCtrl, DFF_msofbtSolverContainer, aPPTDgContainer.GetRecEndFilePos() ) )
+ {
+ pE->pSolverContainer = new PptSolverContainer;
+ rStCtrl >> *( pE->pSolverContainer );
+ }
+ aPPTDgContainer.SeekToBegOfRecord( rStCtrl );
+ SetDgContainer( rStCtrl ); // set this, so that the escherimport is knowing of our drawings
+ }
+ }
+ if ( SeekToRec( rStCtrl, PPT_PST_ColorSchemeAtom, aSlideHd.GetRecEndFilePos() ) )
+ rStCtrl >> pE->aColorScheme;
+ else
+ DBG_ERROR( "SdrPowerPointImport::Ctor(): could not get SlideColorScheme! (SJ)" );
+ }
+
+ }
+ else
+ {
+ DBG_ERROR("SdrPowerPointImport::Ctor(): Persist-Eintrag fehlerhaft! (SJ)");
+ bOk = FALSE;
+ }
+ }
+ else
+ {
+ DBG_ERROR("SdrPowerPointImport::Ctor(): SlidePersist fehlerhaft! (SJ)");
+ bOk = FALSE;
+ }
+ }
+ }
+ if ( bOk )
+ {
+ if ( !pFonts )
+ ReadFontCollection();
+ pPPTStyleSheet = new PPTStyleSheet( rStCtrl, *this );
+ }
+ }
+ }
+ if ( rStCtrl.GetError() != 0 )
+ bOk = FALSE;
+ rStCtrl.Seek( 0 );
+}
+
+SdrPowerPointImport::~SdrPowerPointImport()
+{
+ delete pPPTStyleSheet;
+ for ( void* pPtr = aHyperList.First(); pPtr; pPtr = aHyperList.Next() )
+ delete (SdHyperlinkEntry*)pPtr;
+ delete pMasterPages;
+ delete pSlidePages;
+ delete pNotePages;
+ delete pPersistPtr;
+}
+
+SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId, const Graphic& rGraf, const Rectangle& rBoundRect ) const
+{
+ SdrObject* pRet = NULL;
+
+ UINT32 nOldPos = rStCtrl.Tell();
+
+ Graphic aGraphic( rGraf );
+
+ if ( ((SdrPowerPointImport*)this)->maShapeRecords.SeekToContent( rStCtrl, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
+ {
+ DffRecordHeader aPlaceHd;
+ while ( ( rStCtrl.GetError() == 0 )
+ && ( rStCtrl.Tell() < ((SdrPowerPointImport*)this)->maShapeRecords.Current()->GetRecEndFilePos() ) )
+ {
+ rStCtrl >> aPlaceHd;
+ if ( aPlaceHd.nRecType == PPT_PST_RecolorInfoAtom )
+ {
+ ((SdrPowerPointImport*)this)->RecolorGraphic( rStCtrl, aPlaceHd.nRecLen, aGraphic );
+ break;
+ }
+ else
+ aPlaceHd.SeekToEndOfRecord( rStCtrl );
+ }
+ }
+
+#ifndef SVX_LIGHT
+
+ PPTOleEntry* pOe;
+ for ( pOe = (PPTOleEntry*)((SdrPowerPointImport*)this)->aOleObjectList.First(); pOe;
+ pOe = (PPTOleEntry*)((SdrPowerPointImport*)this)->aOleObjectList.Next() )
+ {
+ if ( pOe->nId != nOLEId )
+ continue;
+
+ rStCtrl.Seek( pOe->nRecHdOfs );
+
+ DffRecordHeader aHd;
+ rStCtrl >> aHd;
+
+ UINT32 nLen = aHd.nRecLen - 4;
+ if ( (INT32)nLen > 0 )
+ {
+ char* pBuf = new char[ nLen ];
+ rStCtrl.SeekRel( 4 );
+ rStCtrl.Read( pBuf, nLen );
+ SvMemoryStream* pDest = new SvMemoryStream;
+ ZCodec aZCodec( 0x8000, 0x8000 );
+ aZCodec.BeginCompression();
+ SvMemoryStream aSource( pBuf, nLen, STREAM_READ );
+ aZCodec.Decompress( aSource, *pDest );
+ delete pBuf;
+
+ if ( !aZCodec.EndCompression() )
+ delete pDest;
+ else
+ {
+ SvStorageRef xObjStor( new SvStorage( pDest, TRUE ) );
+ if ( xObjStor.Is() )
+ {
+ SvStorageStreamRef xSrcTst = xObjStor->OpenStream( String( RTL_CONSTASCII_USTRINGPARAM( "\1Ole" ) ) );
+ if ( xSrcTst.Is() )
+ {
+ BYTE aTestA[ 10 ];
+ BOOL bGetItAsOle = ( sizeof( aTestA ) == xSrcTst->Read( aTestA, sizeof( aTestA ) ) );
+ if ( !bGetItAsOle )
+ { // maybe there is a contentsstream in here
+ xSrcTst = xObjStor->OpenStream( String( RTL_CONSTASCII_USTRINGPARAM( "Contents" ) ), STREAM_READWRITE | STREAM_NOCREATE );
+ bGetItAsOle = ( xSrcTst.Is() && sizeof( aTestA ) == xSrcTst->Read( aTestA, sizeof( aTestA ) ) );
+ }
+ if ( bGetItAsOle )
+ {
+ if ( nSvxMSDffOLEConvFlags )
+ {
+ SvStorageRef xDestStorage( pOe->pShell->GetStorage() );
+ SvInPlaceObjectRef xIPObj( ::lcl_CheckForConvertToSOObj(
+ nSvxMSDffOLEConvFlags, *xObjStor, *xDestStorage ));
+ if( xIPObj.Is() )
+ {
+ pRet = new SdrOle2Obj( xIPObj, String(), rBoundRect,
+ /*TRUE*/ FALSE );
+ // we have the Object, don't create another
+ bGetItAsOle = FALSE;
+ }
+ }
+ if ( bGetItAsOle )
+ {
+ GDIMetaFile aMtf;
+ SvEmbeddedObject::MakeContentStream( xObjStor,
+ *lcl_GetMetaFileFromGrf_Impl( aGraphic, aMtf ) );
+
+ SvInPlaceObjectRef xInplaceObj( ((SvFactory*)SvInPlaceObject::
+ ClassFactory())->CreateAndLoad( xObjStor ) );
+ if( xInplaceObj.Is() )
+ {
+
+ // VisArea am OutplaceObject setzen!!
+ Size aSize( OutputDevice::LogicToLogic( aGraphic.GetPrefSize(),
+ aGraphic.GetPrefMapMode(), MapMode( xInplaceObj->GetMapUnit() ) ) );
+ // modifiziert wollen wir nicht werden
+
+ xInplaceObj->EnableSetModified( FALSE );
+ xInplaceObj->SetVisArea( Rectangle( Point(), aSize ) );
+ xInplaceObj->EnableSetModified( TRUE );
+
+ String aNm( pOe->pShell->InsertObject( xInplaceObj, String() )->GetObjName() );
+ pRet = new SdrOle2Obj( xInplaceObj, aNm, rBoundRect, FALSE );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+#endif
+
+ rStCtrl.Seek( nOldPos );
+
+ return pRet;
+}
+
+SvMemoryStream* SdrPowerPointImport::ImportExOleObjStg( UINT32 nPersistPtr, UINT32& nOleId ) const
+{
+ SvMemoryStream* pRet = NULL;
+ if ( nPersistPtr && ( nPersistPtr < nPersistPtrAnz ) )
+ {
+ UINT32 nOldPos, nOfs = pPersistPtr[ nPersistPtr ];
+ nOldPos = rStCtrl.Tell();
+ rStCtrl.Seek( nOfs );
+ DffRecordHeader aHd;
+ rStCtrl >> aHd;
+ if ( aHd.nRecType == DFF_PST_ExOleObjStg )
+ {
+ UINT32 nLen = aHd.nRecLen - 4;
+ if ( (INT32)nLen > 0 )
+ {
+ rStCtrl >> nOleId;
+ pRet = new SvMemoryStream;
+ ZCodec aZCodec( 0x8000, 0x8000 );
+ aZCodec.BeginCompression();
+ aZCodec.Decompress( rStCtrl, *pRet );
+ if ( !aZCodec.EndCompression() )
+ delete pRet, pRet = NULL;
+ }
+ }
+ rStCtrl.Seek( nOldPos );
+ }
+ return pRet;
+}
+
+void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOptions )
+{
+#ifndef SVX_LIGHT
+ if ( pShell )
+ {
+ DffRecordHeader* pHd;
+
+ UINT32 nOldPos = rStCtrl.Tell();
+ if ( nFilterOptions & 1 )
+ {
+ pHd = aDocRecManager.GetRecordHeader( PPT_PST_List, SEEK_FROM_BEGINNING );
+ if ( pHd )
+ {
+ // we try to locate the basic atom
+ pHd->SeekToContent( rStCtrl );
+ if ( SeekToRec( rStCtrl, PPT_PST_VBAInfo, pHd->GetRecEndFilePos(), pHd ) )
+ {
+ if ( SeekToRec( rStCtrl, PPT_PST_VBAInfoAtom, pHd->GetRecEndFilePos(), pHd ) )
+ {
+ UINT32 nPersistPtr, nIDoNotKnow1, nIDoNotKnow2;
+ rStCtrl >> nPersistPtr
+ >> nIDoNotKnow1
+ >> nIDoNotKnow2;
+
+ UINT32 nOleId;
+ SvMemoryStream* pBas = ImportExOleObjStg( nPersistPtr, nOleId );
+ if ( pBas )
+ {
+ SvStorageRef xSource( new SvStorage( pBas, TRUE ) );
+ SvStorageRef xDest( new SvStorage( new SvMemoryStream(), TRUE ) );
+ if ( xSource.Is() && xDest.Is() )
+ {
+ // is this a visual basic storage ?
+ SvStorageRef xSubStorage = xSource->OpenStorage( String( RTL_CONSTASCII_USTRINGPARAM( "VBA" ) ),
+ STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYALL );
+ if( xSubStorage.Is() && ( SVSTREAM_OK == xSubStorage->GetError() ) )
+ {
+ SvStorageRef xMacros = xDest->OpenStorage( String( RTL_CONSTASCII_USTRINGPARAM( "MACROS" ) ) );
+ if ( xMacros.Is() )
+ {
+ SvStorageInfoList aList;
+ xSource->FillInfoList( &aList );
+ UINT32 i;
+
+ BOOL bCopied = TRUE;
+ for ( i = 0; i < aList.Count(); i++ ) // copy all entrys
+ {
+ const SvStorageInfo& rInfo = aList[ i ];
+ if ( !xSource->CopyTo( rInfo.GetName(), xMacros, rInfo.GetName() ) )
+ bCopied = FALSE;
+ }
+ if ( i && bCopied )
+ {
+ SvxImportMSVBasic aMSVBas( *pShell, *xDest, TRUE, FALSE );
+ int nSuccess = aMSVBas.Import( String( RTL_CONSTASCII_USTRINGPARAM( "MACROS" ) ),
+ String( RTL_CONSTASCII_USTRINGPARAM( "VBA" ) ), TRUE, FALSE );
+
+ SvStorageRef xDoc( pShell->GetStorage() );
+ if ( xDoc.Is() && ( xDoc->GetError() == SVSTREAM_OK ) )
+ {
+ SvStorageRef xVBA = xDoc->OpenStorage( String( RTL_CONSTASCII_USTRINGPARAM( "_MS_VBA_Macros" ) ) );
+ if ( xVBA.Is() && ( xVBA->GetError() == SVSTREAM_OK ) )
+ {
+ SvStorageRef xSubVBA = xVBA->OpenStorage( String( RTL_CONSTASCII_USTRINGPARAM( "_MS_VBA_Overhead" ) ) );
+ if ( xSubVBA.Is() && ( xSubVBA->GetError() == SVSTREAM_OK ) )
+ {
+ SvStorageStreamRef xOriginal = xSubVBA->OpenStream( String( RTL_CONSTASCII_USTRINGPARAM( "_MS_VBA_Overhead2" ) ) );
+ if ( xOriginal.Is() && ( xOriginal->GetError() == SVSTREAM_OK ) )
+ {
+ if ( nPersistPtr && ( nPersistPtr < nPersistPtrAnz ) )
+ {
+ rStCtrl.Seek( pPersistPtr[ nPersistPtr ] );
+ rStCtrl >> *pHd;
+
+ *xOriginal << nIDoNotKnow1
+ << nIDoNotKnow2;
+
+ UINT32 nSource, nToCopy, nBufSize;
+ nSource = rStCtrl.Tell();
+ nToCopy = pHd->nRecLen;
+ BYTE* pBuf = new BYTE[ 0x40000 ]; // 256KB Buffer
+ if ( pBuf )
+ {
+ while ( nToCopy )
+ {
+ nBufSize = ( nToCopy >= 0x40000 ) ? 0x40000 : nToCopy;
+ rStCtrl.Read( pBuf, nBufSize );
+ xOriginal->Write( pBuf, nBufSize );
+ nToCopy -= nBufSize;
+ }
+ delete pBuf;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ pHd = aDocRecManager.GetRecordHeader( PPT_PST_ExObjList, SEEK_FROM_BEGINNING );
+ if ( pHd )
+ {
+ DffRecordManager* pExObjListManager = NULL;
+ DffRecordHeader* pExEmbed = NULL;
+
+ pHd->SeekToBegOfRecord( rStCtrl );
+ pExObjListManager = new DffRecordManager( rStCtrl );
+ UINT32 i, nRecType;
+
+ for ( i = 0; i < 2; i++ )
+ {
+ switch ( i )
+ {
+ case 0 : nRecType = PPT_PST_ExEmbed; break;
+ case 1 : nRecType = PPT_PST_ExControl; break;
+ }
+ for ( pExEmbed = pExObjListManager->GetRecordHeader( nRecType, SEEK_FROM_BEGINNING );
+ pExEmbed; pExEmbed = pExObjListManager->GetRecordHeader( nRecType, SEEK_FROM_CURRENT ) )
+ {
+ pExEmbed->SeekToContent( rStCtrl );
+
+ DffRecordHeader aExOleAtHd;
+ if ( SeekToRec( rStCtrl, PPT_PST_ExOleObjAtom, pExEmbed->GetRecEndFilePos(), &aExOleAtHd ) )
+ {
+ PptExOleObjAtom aAt;
+ rStCtrl >> aAt;
+
+ if ( aAt.nPersistPtr && ( aAt.nPersistPtr < nPersistPtrAnz ) )
+ {
+ UINT32 nId;
+ rStCtrl.Seek( pPersistPtr[ aAt.nPersistPtr ] );
+ DffRecordHeader aHd;
+ rStCtrl >> aHd;
+ if ( aHd.nRecType == DFF_PST_ExOleObjStg )
+ {
+ rStCtrl >> nId;
+ aOleObjectList.Insert( new PPTOleEntry( aAt.nId, aHd.nFilePos, pShell ) );
+ }
+ }
+ }
+ }
+ }
+ delete pExObjListManager;
+ }
+ rStCtrl.Seek( nOldPos );
+ }
+#endif
+}
+
+void SdrPowerPointImport::SetStarDraw()
+{
+ // StarDraw's Masterpagestruktur erzwingen:
+ // HandoutMaster,
+ // SlideMaster,NotesMaster,
+ // SlideMaster,NotesMaster,...
+ // Also auch immer eine ungerade Anzahl von Masterpages
+ if ( !HasHandoutMasterPage() )
+ {
+ PptSlidePersistEntry* pE = new PptSlidePersistEntry;
+ pE->bStarDrawFiller = TRUE;
+ pE->bHandoutMaster = TRUE;
+ pMasterPages->C40_INSERT( PptSlidePersistEntry, pE, 0 );
+ }
+ USHORT nAnz = pMasterPages->Count();
+ if ( HasNotesMasterPage() )
+ nAnz--;
+ if ( nAnz == 1 )
+ { // fuer den unwarscheinichen Fall, das das Ppt-Dok keine MasterPage besitzt
+ PptSlidePersistEntry* pE = new PptSlidePersistEntry;
+ pE->bStarDrawFiller = TRUE;
+ pMasterPages->C40_INSERT( PptSlidePersistEntry, pE, 1 );
+ }
+ if ( !HasNotesMasterPage() )
+ {
+ PptSlidePersistEntry* pE = new PptSlidePersistEntry;
+ pE->bStarDrawFiller = TRUE;
+ pE->bNotesMaster = TRUE;
+ pMasterPages->C40_INSERT( PptSlidePersistEntry, pE, 2 );
+ }
+ nAnz = pMasterPages->Count();
+ if ( nAnz > 3 )
+ { // Weitere Masterpages (z.B. TitleMaster) vorhanden?
+ USHORT nPos = 4;
+ while ( nPos <= nAnz )
+ {
+ PptSlidePersistEntry* pE = new PptSlidePersistEntry;
+ pE->bStarDrawFiller = TRUE;
+ pE->bNotesMaster = TRUE;
+ pMasterPages->C40_INSERT( PptSlidePersistEntry, pE, nPos );
+ nAnz++;
+ nPos += 2;
+ }
+ }
+ nHandoutMasterNum = 0;
+ nNotesMasterNum = 2;
+}
+
+sal_Bool SdrPowerPointImport::ReadFontCollection()
+{
+ sal_Bool bRet = FALSE;
+ DffRecordHeader* pEnvHd = aDocRecManager.GetRecordHeader( PPT_PST_Environment );
+ if ( pEnvHd )
+ {
+ ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer spaetere Restauration
+ pEnvHd->SeekToContent( rStCtrl );
+ DffRecordHeader aListHd;
+ if ( SeekToRec( rStCtrl, PPT_PST_FontCollection, pEnvHd->GetRecEndFilePos(), &aListHd ) )
+ {
+ UINT32 nCount = 0;
+ while ( SeekToRec( rStCtrl, PPT_PST_FontEntityAtom, aListHd.GetRecEndFilePos() ) )
+ {
+ bRet = TRUE;
+ if ( !pFonts )
+ pFonts = new PptFontCollection;
+ PptFontEntityAtom* pFont = new PptFontEntityAtom;
+ rStCtrl >> *pFont;
+ CharSet eCharSet( RTL_TEXTENCODING_SYMBOL );
+ UINT32 nFontId = PPT_UNIQUE_FONT_ID_UNDEFINED;
+
+ if ( pFont->aName.CompareIgnoreCaseToAscii( "Wingdings" )== COMPARE_EQUAL )
+ {
+ nFontId = PPT_UNIQUE_FONT_ID_WINGDINGS;
+ nIWingdings = nCount | 0x80000000;
+ }
+ else if ( pFont->aName.CompareIgnoreCaseToAscii( "Wingdings 2" )== COMPARE_EQUAL )
+ nFontId = PPT_UNIQUE_FONT_ID_WINGDINGS2;
+ else if ( pFont->aName.CompareIgnoreCaseToAscii( "Wingdings 3" )== COMPARE_EQUAL )
+ nFontId = PPT_UNIQUE_FONT_ID_WINGDINGS3;
+ else if ( pFont->aName.CompareIgnoreCaseToAscii( "Monotype Sorts" )== COMPARE_EQUAL )
+ nFontId = PPT_UNIQUE_FONT_ID_MONOTYPE_SORTS;
+ else if ( pFont->aName.CompareIgnoreCaseToAscii( "Monotype Sorts 2" )== COMPARE_EQUAL )
+ nFontId = PPT_UNIQUE_FONT_ID_MONOTYPE_SORTS2;
+ else if ( pFont->aName.CompareIgnoreCaseToAscii( "Webdings" )== COMPARE_EQUAL )
+ nFontId = PPT_UNIQUE_FONT_ID_WEBDINGS;
+ else if ( pFont->aName.CompareIgnoreCaseToAscii( "StarBats" )== COMPARE_EQUAL )
+ {
+ nFontId = PPT_UNIQUE_FONT_ID_STARBATS;
+ nIStarBats = nCount | 0x80000000;
+ }
+ else if ( pFont->aName.CompareIgnoreCaseToAscii( "StarMath" )== COMPARE_EQUAL )
+ nFontId = PPT_UNIQUE_FONT_ID_STARMATH;
+ else if ( pFont->aName.CompareIgnoreCaseToAscii( "ZapfDingbats" ) == COMPARE_EQUAL )
+ nFontId = PPT_UNIQUE_FONT_ID_ZAPFDINGBATS;
+ else
+ eCharSet = eCharSetSystem;
+
+ pFont->nUniqueFontId = nFontId;
+ pFont->eCharSet = eCharSet;
+ pFonts->C40_INSERT( PptFontEntityAtom, pFont, nCount++ );
+ }
+ if ( ! ( nIStarBats & 0x80000000 ) )
+ {
+ PptFontEntityAtom* pFont = new PptFontEntityAtom;
+ pFont->aName = String( RTL_CONSTASCII_USTRINGPARAM( "StarBats" ) );
+ pFont->eCharSet = RTL_TEXTENCODING_SYMBOL;
+ pFont->bAvailable = TRUE;
+ pFont->nUniqueFontId = PPT_UNIQUE_FONT_ID_STARBATS;
+ nIStarBats = nCount | 0x80000000;
+ pFonts->C40_INSERT( PptFontEntityAtom, pFont, nCount++ );
+ }
+ }
+ rStCtrl.Seek( nFPosMerk ); // FilePos restaurieren
+ }
+ return bRet;
+}
+
+PptSlidePersistList* SdrPowerPointImport::GetPageList(PptPageKind ePageKind) const
+{
+ if ( ePageKind == PPT_MASTERPAGE )
+ return pMasterPages;
+ if ( ePageKind == PPT_SLIDEPAGE )
+ return pSlidePages;
+ if ( ePageKind == PPT_NOTEPAGE )
+ return pNotePages;
+ return NULL;
+}
+
+SdrOutliner* SdrPowerPointImport::GetDrawOutliner( SdrTextObj* pSdrText ) const
+{
+ if ( !pSdrText )
+ return NULL;
+ else
+ return &pSdrText->ImpGetDrawOutliner();
+}
+
+
+SdrObject* SdrPowerPointImport::ReadObjText( PPTTextObj* pTextObj, SdrObject* pSdrObj, SdPage* pPage ) const
+{
+ SdrTextObj* pText = PTR_CAST( SdrTextObj, pSdrObj );
+ if ( pText )
+ {
+ if ( !ApplyTextObj( pTextObj, pText, pPage, NULL ) )
+ pSdrObj = NULL;
+ }
+ return pSdrObj;
+}
+
+
+SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pSdrText, SdPage* pPage, SfxStyleSheet* pSheet ) const
+{
+ SdrTextObj* pText = pSdrText;
+ if ( pTextObj->Count() )
+ {
+ UINT32 nInstanceInSheet = pTextObj->GetMappedInstance() ;
+ SdrOutliner& rOutliner = pText->ImpGetDrawOutliner();
+ rOutliner.SetMinDepth( 0 );
+ if ( ( pText->GetObjInventor() == SdrInventor ) && ( pText->GetObjIdentifier() == OBJ_TITLETEXT ) ) // Outliner-Style fuer Titel-Textobjekt?!? (->von DL)
+ rOutliner.Init( OUTLINERMODE_TITLEOBJECT ); // Outliner reset
+
+ BOOL bOldUpdateMode = rOutliner.GetUpdateMode();
+ rOutliner.SetUpdateMode( FALSE );
+ if ( pSheet )
+ {
+ if ( rOutliner.GetStyleSheet( 0 ) != pSheet )
+ rOutliner.SetStyleSheet( 0, pSheet );
+ }
+
+ const PPTParagraphObj* pPreviousParagraph = NULL;
+ for ( PPTParagraphObj* pPara = pTextObj->First(); pPara; pPara = pTextObj->Next() )
+ {
+ UINT32 nTextSize = pPara->GetTextSize();
+ if ( ! ( nTextSize & 0xffff0000 ) )
+ {
+ PPTPortionObj* pPortion;
+ sal_Unicode* pParaText = new sal_Unicode[ nTextSize ];
+ UINT32 nCurrentIndex = 0;
+ for ( pPortion = pPara->First(); pPortion; pPortion = pPara->Next() )
+ {
+ if ( pPortion->mpFieldItem )
+ pParaText[ nCurrentIndex++ ] = ' ';
+ else
+ {
+ memcpy( pParaText + nCurrentIndex, pPortion->maString.GetBuffer(), pPortion->Count() << 1 );
+ nCurrentIndex += pPortion->Count();
+ }
+ }
+ UINT16 nParaIndex = (UINT16)pTextObj->GetCurrentIndex();
+ rOutliner.Insert( String( pParaText, (UINT16)nCurrentIndex ), nParaIndex, pPara->GetLevel() );
+ rOutliner.SetParaAttribs( nParaIndex, rOutliner.GetEmptyItemSet() );
+ ESelection aSelection( nParaIndex, 0, nParaIndex, 0 );
+ for ( pPortion = pPara->First(); pPortion; pPortion = pPara->Next() )
+ {
+ SfxItemSet aPortionAttribs( rOutliner.GetEmptyItemSet() );
+ SvxFieldItem* pFieldItem = pPortion->GetTextField();
+ if ( pFieldItem )
+ {
+ rOutliner.QuickInsertField( *pFieldItem, ESelection( nParaIndex, aSelection.nEndPos, nParaIndex, aSelection.nEndPos + 1 ) );
+ aSelection.nEndPos++;
+ delete pFieldItem;
+ }
+ else
+ {
+ const sal_Unicode *pF, *pPtr = pPortion->maString.GetBuffer();
+ const sal_Unicode *pMax = pPtr + pPortion->maString.Len();
+ INT32 nLen;
+ for ( pF = pPtr; pPtr < pMax; pPtr++ )
+ {
+ if ( *pPtr == 0xb )
+ {
+ nLen = pPtr - pF;
+ if ( nLen )
+ aSelection.nEndPos += nLen;
+ pF = pPtr + 1;
+ rOutliner.QuickInsertLineBreak( ESelection( nParaIndex, aSelection.nEndPos, nParaIndex, aSelection.nEndPos + 1 ) );
+ aSelection.nEndPos++;
+ }
+ }
+ nLen = pPtr - pF;
+ if ( nLen )
+ aSelection.nEndPos += nLen;
+ }
+ pPortion->ApplyTo( aPortionAttribs, (SdrPowerPointImport&)*this, nInstanceInSheet );
+ rOutliner.QuickSetAttribs( aPortionAttribs, aSelection );
+ aSelection.nStartPos = aSelection.nEndPos;
+ }
+ SfxItemSet aParagraphAttribs( rOutliner.GetEmptyItemSet() );
+ pPara->ApplyTo( aParagraphAttribs, (SdrPowerPointImport&)*this, nInstanceInSheet, pPreviousParagraph );
+ pPreviousParagraph = pPara;
+ if ( !aSelection.nStartPos ) // in PPT empty paragraphs never gets a bullet
+ aParagraphAttribs.Put( SfxUInt16Item( EE_PARA_BULLETSTATE, FALSE ) );
+ aSelection.nStartPos = 0;
+ rOutliner.QuickSetAttribs( aParagraphAttribs, aSelection );
+ delete pParaText;
+ }
+ }
+ OutlinerParaObject* pNewText = rOutliner.CreateParaObject();
+ rOutliner.Clear();
+ rOutliner.SetMinDepth( 0 );
+ rOutliner.SetUpdateMode( bOldUpdateMode );
+ pText->SetOutlinerParaObject( pNewText );
+ }
+ return pText;
+}
+
+sal_Bool SdrPowerPointImport::SeekToDocument( DffRecordHeader* pRecHd ) const
+{
+ sal_Bool bRet;
+ ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer ggf. spaetere Restauration
+ rStCtrl.Seek( nDocStreamPos );
+ DffRecordHeader aDocHd;
+ rStCtrl >> aDocHd;
+ bRet = aDocHd.nRecType == PPT_PST_Document;
+ if ( bRet )
+ {
+ if ( pRecHd )
+ *pRecHd = aDocHd;
+ else
+ aDocHd.SeekToBegOfRecord( rStCtrl );
+ }
+ if ( !bRet )
+ rStCtrl.Seek( nFPosMerk ); // FilePos restaurieren
+ return bRet;
+}
+
+UINT32 SdrPowerPointImport::GetAktPageId()
+{
+ PptSlidePersistList* pList = GetPageList( eAktPageKind );
+ if ( pList && nAktPageNum < pList->Count() )
+ return (*pList)[ (USHORT)nAktPageNum ]->aPersistAtom.nSlideId;
+ return 0;
+}
+
+sal_Bool SdrPowerPointImport::SeekToAktPage( DffRecordHeader* pRecHd ) const
+{
+ sal_Bool bRet = FALSE;
+ PptSlidePersistList* pList = GetPageList( eAktPageKind );
+ if ( pList && ( nAktPageNum < pList->Count() ) )
+ {
+ ULONG nPersist = (*pList)[ (USHORT)nAktPageNum ]->aPersistAtom.nPsrReference;
+ if ( nPersist > 0 && nPersist < nPersistPtrAnz )
+ {
+ ULONG nFPos = 0;
+ nFPos = pPersistPtr[ nPersist ];
+ if ( nFPos < nStreamLen )
+ {
+ rStCtrl.Seek( nFPos );
+ if ( pRecHd )
+ rStCtrl >> *pRecHd;
+ bRet = TRUE;
+ }
+ }
+ }
+ return bRet;
+}
+
+sal_Bool SdrPowerPointImport::SeekToObj( UINT32 nObjNum, DffRecordHeader* pObjRecHd, DffRecordHeader* pContRecHd ) const
+{
+ sal_Bool bRet = FALSE;
+ ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer ggf. spaetere Restauration
+ DffRecordHeader aPageHd;
+ if ( SeekToAktPage( &aPageHd ) )
+ {
+ // und nun die Page nach Objekten abklappern
+ ULONG nPageRecEnd = aPageHd.GetRecEndFilePos();
+ DffRecordHeader aPPDrawHd;
+ if ( SeekToRec( rStCtrl, PPT_PST_PPDrawing, nPageRecEnd, &aPPDrawHd ) )
+ {
+ ULONG nPPDrawEnd = aPPDrawHd.GetRecEndFilePos();
+ DffRecordHeader aEscherF002Hd;
+ if ( SeekToRec( rStCtrl, DFF_msofbtDgContainer, nPPDrawEnd, &aEscherF002Hd ) )
+ {
+ ULONG nEscherF002End = aEscherF002Hd.GetRecEndFilePos();
+ DffRecordHeader aEscherObjListHd;
+ if ( SeekToRec( rStCtrl, DFF_msofbtSpgrContainer, nEscherF002End, &aEscherObjListHd ) )
+ {
+ if ( pContRecHd )
+ *pContRecHd = aEscherObjListHd;
+ ULONG nEscherObjListEnd = aEscherObjListHd.GetRecEndFilePos();
+ // und nun die F004er lesen, das erste aber weglassen.
+ bRet = SeekToRec2( DFF_msofbtSpContainer, DFF_msofbtSpgrContainer, nEscherObjListEnd, pObjRecHd, nObjNum + 1 );
+ }
+ }
+ }
+ }
+ if ( !bRet )
+ rStCtrl.Seek( nFPosMerk ); // FilePos restaurieren
+ return bRet;
+}
+
+USHORT SdrPowerPointImport::GetPageCount( PptPageKind ePageKind ) const
+{
+ PptSlidePersistList* pList = GetPageList( ePageKind );
+ if ( pList )
+ return pList->Count();
+ return 0;
+}
+
+void SdrPowerPointImport::SetPageNum( USHORT nPageNum, PptPageKind eKind )
+{
+ eAktPageKind = eKind;
+ nAktPageNum = nPageNum;
+}
+
+Size SdrPowerPointImport::GetPageSize() const
+{
+ Size aRet( IsNoteOrHandout( nAktPageNum, eAktPageKind ) ? aDocAtom.GetNotesPageSize() : aDocAtom.GetSlidesPageSize() );
+ Scale( aRet );
+ // PPT arbeitet nur mit Einheiten zu 576DPI. Um Ungenauigkeiten zu
+ // vermeiden runde ich die letzte Nachkommastelle metrisch weg.
+ if ( nMapMul > 2 * nMapDiv )
+ {
+ MapUnit eMap = pSdrModel->GetScaleUnit();
+ sal_Bool bInch = IsInch( eMap );
+ long nInchMul = 1, nInchDiv = 1;
+ if ( bInch )
+ { // Size temporaer (zum runden) in nach metric konvertieren
+ Fraction aFact(GetMapFactor(eMap,MAP_100TH_MM).X());
+ nInchMul = aFact.GetNumerator();
+ nInchDiv = aFact.GetDenominator();
+ aRet.Width() = BigMulDiv( aRet.Width(), nInchMul, nInchDiv );
+ aRet.Height() = BigMulDiv( aRet.Height(), nInchMul, nInchDiv );
+ }
+ aRet.Width() += 5; aRet.Width() /= 10; aRet.Width()*=10;
+ aRet.Height() += 5; aRet.Height() /= 10; aRet.Height()*=10;
+ if ( bInch )
+ {
+ aRet.Width() = BigMulDiv( aRet.Width(), nInchDiv, nInchMul );
+ aRet.Height() = BigMulDiv( aRet.Height(), nInchDiv, nInchMul );
+ }
+ }
+ return aRet;
+}
+
+FASTBOOL SdrPowerPointImport::GetColorFromPalette( USHORT nNum, Color& rColor ) const
+{
+ if ( nPageColorsNum != nAktPageNum || ePageColorsKind != eAktPageKind )
+ {
+ UINT16 nSlideFlags = 0;
+ PptSlidePersistList* pPageList = GetPageList( eAktPageKind );
+ if ( pPageList && ( nAktPageNum < pPageList->Count() ) )
+ {
+ PptSlidePersistEntry* pE = (*pPageList)[ nAktPageNum ];
+ if ( pE )
+ nSlideFlags = pE->aSlideAtom.nFlags;
+ if ( ! ( nSlideFlags & 2 ) )
+ ((SdrPowerPointImport*)this)->aPageColors = pE->aColorScheme;
+ }
+ if ( nSlideFlags & 2 )
+ {
+ if ( HasMasterPage( nAktPageNum, eAktPageKind ) )
+ {
+ UINT16 nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind );
+ PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE );
+ if ( pPageList && ( nMasterNum < pPageList->Count() ) )
+ {
+ PptSlidePersistEntry* pE = (*pPageList)[ nMasterNum ];
+ if ( pE )
+ ((SdrPowerPointImport*)this)->aPageColors = pE->aColorScheme;
+ }
+ }
+ }
+ // momentanes Farbschema eintragen
+ ((SdrPowerPointImport*)this)->nPageColorsNum = nAktPageNum;
+ ((SdrPowerPointImport*)this)->ePageColorsKind = eAktPageKind;
+ }
+ rColor = aPageColors.GetColor( nNum );
+ return TRUE;
+}
+
+BOOL SdrPowerPointImport::SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const
+{
+ BOOL bRet = SvxMSDffManager::SeekToShape( rSt, pClientData, nId );
+ if ( !bRet )
+ {
+ ProcessData& rData = *( (ProcessData*)pClientData );
+ PptSlidePersistEntry& rPersistEntry = rData.rPersistEntry;
+ if ( rPersistEntry.ePageKind == PPT_SLIDEPAGE )
+ {
+ if ( HasMasterPage( nAktPageNum, eAktPageKind ) )
+ {
+ USHORT nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind );
+ PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE );
+ if ( pPageList && ( nMasterNum < pPageList->Count() ) )
+ {
+ PptSlidePersistEntry* pPersist = (*pPageList)[ nMasterNum ]; // get the masterpage's persistentry
+ if ( pPersist && pPersist->pPresentationObjects )
+ {
+ UINT32 nCurrent;
+ DffRecordList* pCList = maShapeRecords.pCList; // we got a backup of the current position
+ if ( pCList )
+ nCurrent = pCList->nCurrent;
+ if ( ((SdrEscherImport*)this )->maShapeRecords.SeekToContent( rSt, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
+ {
+ UINT32 nStreamPos = rSt.Tell();
+ PPTTextObj aTextObj( rSt, (SdrPowerPointImport&)*this, rPersistEntry, NULL );
+ if ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() )
+ {
+ UINT32 nShapePos = 0;
+ switch ( aTextObj.GetInstance() )
+ {
+ case TSS_TYPE_TITLE :
+ nShapePos = pPersist->pPresentationObjects[ TSS_TYPE_PAGETITLE ];
+ break;
+ case TSS_TYPE_PAGETITLE :
+ nShapePos = pPersist->pPresentationObjects[ TSS_TYPE_PAGETITLE ];
+ break;
+ case TSS_TYPE_SUBTITLE :
+ case TSS_TYPE_HALFBODY :
+ case TSS_TYPE_QUARTERBODY :
+ case TSS_TYPE_BODY :
+ nShapePos = pPersist->pPresentationObjects[ TSS_TYPE_BODY ];
+ break;
+// case TSS_TYPE_NOTES :
+// case TSS_TYPE_UNUSED :
+// case TSS_TYPE_TEXT_IN_SHAPE :
+ }
+ if ( nShapePos )
+ {
+ rSt.Seek( nShapePos );
+ bRet = TRUE;
+ }
+ }
+ if ( !bRet )
+ rSt.Seek( nStreamPos );
+ }
+ if ( pCList ) // restoring
+ pCList->nCurrent = nCurrent;
+ ((SdrEscherImport*)this )->maShapeRecords.pCList = pCList;
+ }
+ }
+ }
+ }
+ }
+ return bRet;
+}
+
+FASTBOOL SdrPowerPointImport::GetFont( ULONG nNum, String& rFontName ) const
+{
+ if ( ForceFontCollection() && nNum < pFonts->Count() )
+ {
+ rFontName = (*pFonts)[ (USHORT)nNum ]->GetFontName();
+ return TRUE;
+ }
+ return FALSE;
+}
+
+SdrPage* SdrPowerPointImport::MakeBlancPage( sal_Bool bMaster ) const
+{
+ SdrPage* pRet = pSdrModel->AllocPage( bMaster );
+ pRet->SetSize( GetPageSize() );
+
+/*
+ SJ (21.08.00) : since bug #77576# i decided not to set a border size.
+
+ Size aPageSize( aDocAtom.GetSlidesPageSize() ); // PageSize in 576DPI-Units
+ long nHMarg = aPageSize.Width() - aDocAtom.aSlidesPageSize.Width();
+ long nVMarg = aPageSize.Height() - aDocAtom.aSlidesPageSize.Height();
+ if ( nHMarg > 0 )
+ {
+ Scale( nHMarg );
+ pRet->SetLftBorder( nHMarg / 2 );
+ pRet->SetRgtBorder( nHMarg - nHMarg / 2 );
+ }
+ if ( nVMarg > 0 )
+ {
+ Scale( nVMarg );
+ pRet->SetUppBorder( nVMarg / 2 );
+ pRet->SetLwrBorder( nVMarg - nVMarg / 2 );
+ }
+*/
+ return pRet;
+}
+
+SdrPage* SdrPowerPointImport::ImportPage() // be sure not to import masterpages with this method
+{
+ UINT32 nMerk = rStCtrl.Tell();
+ SdrPage* pRet = NULL;
+ HeaderFooterEntry* pHFEM = NULL;
+ pRet = MakeBlancPage( FALSE );
+ PptSlidePersistList* pList = GetPageList( eAktPageKind );
+ if ( ( !pList ) || ( pList->Count() <= nAktPageNum ) )
+ return pRet;
+ PptSlidePersistEntry& rSlidePersist = *(*pList)[ nAktPageNum ];
+ if ( rSlidePersist.bStarDrawFiller )
+ return pRet;
+ if ( HasMasterPage( nAktPageNum, eAktPageKind ) )
+ {
+ USHORT nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind );
+ pRet->InsertMasterPage( nMasterNum );
+ PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE );
+ if ( pPageList && ( nMasterNum < pPageList->Count() ) )
+ pHFEM = (*pPageList)[ nMasterNum ]->pHeaderFooterEntry; // get the masterpage's HeaderFooterEntry
+ }
+ DffRecordHeader aPageHd;
+ if ( SeekToAktPage( &aPageHd ) )
+ {
+ HeaderFooterEntry* pHFE = NULL;
+ if ( pHFEM )
+ {
+ pHFE = new HeaderFooterEntry( *pHFEM, (SdPage*)pRet );
+ rSlidePersist.pHeaderFooterEntry = pHFE;
+ if ( ( rSlidePersist.aSlideAtom.aLayout.eLayout == PPT_LAYOUT_TITLESLIDE )
+ && ( aDocAtom.bTitlePlaceholdersOmitted == TRUE ) )
+ {
+ pHFE->rMaster.nDirtyInstance = 0xf;
+ pHFE->nAtom = 0;
+ }
+ }
+
+ ProcessData aProcessData( rSlidePersist, (SdPage*)pRet );
+
+ while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aPageHd.GetRecEndFilePos() ) )
+ {
+ DffRecordHeader aHd;
+ rStCtrl >> aHd;
+ switch ( aHd.nRecType )
+ {
+ case PPT_PST_HeadersFooters :
+ {
+ if ( pHFE )
+ {
+ ImportHeaderFooterContainer( aHd, *pHFE );
+ for ( UINT32 i = 0; i < 4; i++ )
+ {
+ UINT32 nPosition = pHFE->rMaster.NeedToImportInstance( i, *pHFE );
+ if ( nPosition )
+ {
+ rStCtrl.Seek( nPosition );
+ SdrObject* pObj = ImportObj( rStCtrl, (void*)&aProcessData, NULL );
+ if ( pObj )
+ { // cause of this object is already dirty, we can inserted it directly
+ pHFE->nAtom &= ~pHFE->GetMaskForInstance( i );
+ pRet->NbcInsertObject( pObj );
+ }
+ }
+ }
+ }
+ }
+ break;
+
+ case PPT_PST_PPDrawing :
+ {
+ DffRecordHeader aPPDrawHd;
+ if ( SeekToRec( rStCtrl, DFF_msofbtDgContainer, aHd.GetRecEndFilePos(), &aPPDrawHd ) )
+ {
+ while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aPPDrawHd.GetRecEndFilePos() ) )
+ {
+ DffRecordHeader aEscherObjListHd;
+ rStCtrl >> aEscherObjListHd;
+ switch ( aEscherObjListHd.nRecType )
+ {
+ case DFF_msofbtSpgrContainer :
+ {
+ DffRecordHeader aShapeHd;
+ if ( SeekToRec( rStCtrl, DFF_msofbtSpContainer, aEscherObjListHd.GetRecEndFilePos(), &aShapeHd ) )
+ {
+ aShapeHd.SeekToEndOfRecord( rStCtrl );
+ while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aEscherObjListHd.GetRecEndFilePos() ) )
+ {
+ rStCtrl >> aShapeHd;
+ if ( ( aShapeHd.nRecType == DFF_msofbtSpContainer ) || ( aShapeHd.nRecType == DFF_msofbtSpgrContainer ) )
+ {
+ aShapeHd.SeekToBegOfRecord( rStCtrl );
+ aProcessData.nGroupingFlags = 0;
+ SdrObject* pObj = ImportObj( rStCtrl, (void*)&aProcessData, NULL );
+ if ( pObj )
+ {
+ // maybe this is an animated textobj
+ if ( aProcessData.nGroupingFlags && pObj->ISA( SdrObjGroup ) )
+ {
+ SdrObjList* pObjectList = ((SdrObjGroup*)pObj)->GetSubList();
+ if ( pObjectList )
+ {
+ if ( pObjectList->GetObjCount() == 2 )
+ {
+ pRet->NbcInsertObject( pObjectList->NbcRemoveObject( 0 ) );
+ SdrObject* pTemp = pObjectList->NbcRemoveObject( 0 );
+ delete pObj;
+ pObj = pTemp;
+ }
+ }
+ }
+ pRet->NbcInsertObject( pObj );
+ }
+ }
+ aShapeHd.SeekToEndOfRecord( rStCtrl );
+ }
+ }
+ }
+ break;
+
+ case DFF_msofbtSpContainer :
+ {
+ if ( ! ( rSlidePersist.aSlideAtom.nFlags & 4 ) ) // follow master background ?
+ {
+ DffRecordHeader aShapeHd;
+ rStCtrl >> aShapeHd;
+ if ( aShapeHd.nRecType == DFF_msofbtSp )
+ {
+ UINT32 nSpFlags;
+ rStCtrl >> nSpFlags >> nSpFlags;
+ if ( nSpFlags & SP_FBACKGROUND )
+ {
+ aEscherObjListHd.SeekToBegOfRecord( rStCtrl );
+ SdrObject* pBackGroundObj = ImportObj( rStCtrl, (void*)&aProcessData, NULL );
+ if ( pBackGroundObj )
+ {
+ if ( rSlidePersist.ePageKind == PPT_SLIDEPAGE )
+ {
+ List* pList = aProcessData.pBackgroundColoredObjects;
+ if ( pList )
+ {
+ void* pPtr;
+ const SfxPoolItem* pPoolItem = NULL;
+ SfxItemSet aSourceAttr( pSdrModel->GetItemPool() );
+ pBackGroundObj->TakeAttributes( aSourceAttr, FALSE, TRUE );
+ SfxItemState eState = aSourceAttr.GetItemState( XATTR_FILLCOLOR, FALSE, &pPoolItem );
+ if ( pPoolItem )
+ {
+ for ( pPtr = pList->First(); pPtr; pPtr = pList->Next() )
+ {
+ SfxItemSet aTempAttr( pSdrModel->GetItemPool() );
+ ((SdrObject*)pPtr)->TakeAttributes( aTempAttr, FALSE, TRUE );
+ aTempAttr.Put( *pPoolItem );
+ ((SdrObject*)pPtr)->NbcSetAttributes( aTempAttr, FALSE );
+ }
+ }
+ }
+ }
+ }
+ pRet->SetBackgroundObj( pBackGroundObj );
+ }
+ }
+ }
+ }
+ break;
+ }
+ aEscherObjListHd.SeekToEndOfRecord( rStCtrl );
+ }
+ }
+ }
+ break;
+ }
+ aHd.SeekToEndOfRecord( rStCtrl );
+ }
+ if ( rSlidePersist.pSolverContainer )
+ {
+ for ( PptConnectorRule* pPtr = (PptConnectorRule*)rSlidePersist.pSolverContainer->aCList.First();
+ pPtr; pPtr = (PptConnectorRule*)rSlidePersist.pSolverContainer->aCList.Next() )
+ {
+ if ( pPtr->pCObj )
+ {
+ for ( int nN = 0; nN < 2; nN++ )
+ {
+ SdrObject* pO;
+ UINT32 nC;
+ BOOL bTail;
+ if ( !nN )
+ {
+ bTail = TRUE;
+ pO = pPtr->pAObj;
+ nC = pPtr->ncptiA;
+ }
+ else
+ {
+ bTail = FALSE;
+ pO = pPtr->pBObj;
+ nC = pPtr->ncptiB;
+ }
+ if ( pO )
+ {
+ ((SdrEdgeObj*)pPtr->pCObj)->ConnectToNode( bTail, pO );
+ SdrObjConnection& rC = ((SdrEdgeObj*)pPtr->pCObj)->GetConnection( bTail );
+ SdrGluePoint aGP;
+ const UINT32 nInventor = pO->GetObjInventor();
+ if( nInventor == SdrInventor )
+ {
+ UINT32 nObjId = pO->GetObjIdentifier();
+ switch( nObjId )
+ {
+ case OBJ_GRUP :
+ case OBJ_GRAF :
+ case OBJ_RECT :
+ case OBJ_TEXT :
+ case OBJ_PAGE :
+ case OBJ_TEXTEXT :
+ case OBJ_wegFITTEXT :
+ case OBJ_wegFITALLTEXT :
+ case OBJ_TITLETEXT :
+ case OBJ_OUTLINETEXT :
+ {
+ UINT16 nAlign = 0;
+ switch( nC )
+ {
+ case 0 :
+ {
+ rC.SetConnectorId( 0 );
+ nAlign |= SDRVERTALIGN_TOP;
+ }
+ break;
+ case 1 :
+ {
+ rC.SetConnectorId( 3 );
+ nAlign |= SDRHORZALIGN_RIGHT;
+ }
+ break;
+ case 2 :
+ {
+ rC.SetConnectorId( 2 );
+ nAlign |= SDRVERTALIGN_BOTTOM;
+ }
+ break;
+ case 3 :
+ {
+ rC.SetConnectorId( 1 );
+ nAlign |= SDRHORZALIGN_LEFT;
+ }
+ break;
+/*
+#define SDRHORZALIGN_CENTER 0x0000
+#define SDRHORZALIGN_LEFT 0x0001
+#define SDRHORZALIGN_RIGHT 0x0002
+#define SDRHORZALIGN_DONTCARE 0x0010
+#define SDRVERTALIGN_CENTER 0x0000
+#define SDRVERTALIGN_TOP 0x0100
+#define SDRVERTALIGN_BOTTOM 0x0200
+#define SDRVERTALIGN_DONTCARE 0x1000
+*/
+ }
+ aGP = SdrGluePoint( Point(), TRUE, nAlign );
+ }
+ break;
+
+ case OBJ_CIRC :
+ {
+
+ }
+ break;
+
+ case OBJ_POLY :
+ case OBJ_PLIN :
+ case OBJ_LINE :
+ case OBJ_PATHLINE :
+ case OBJ_PATHFILL :
+ case OBJ_FREELINE :
+ case OBJ_FREEFILL :
+ case OBJ_SPLNLINE :
+ case OBJ_SPLNFILL :
+ case OBJ_PATHPOLY :
+ case OBJ_PATHPLIN :
+ {
+
+ }
+ break;
+/*
+ case OBJ_NONE :
+ case OBJ_SECT :
+ case OBJ_CARC :
+ case OBJ_CCUT :
+ case OBJ_OLE2 :
+ case OBJ_EDGE :
+ case OBJ_CAPTION :
+ case OBJ_MEASURE :
+ case OBJ_DUMMY :
+ case OBJ_FRAME :
+ case OBJ_UNO :
+ case OBJ_MAXI :
+*/
+ }
+ }
+/*
+ SdrGluePointList* pList = pO->ForceGluePointList();
+ if ( pList )
+ {
+ SdrGluePoint& rGlue = (*pList)[ pList->Insert( aGP ) ];
+ rC.nConId = rGlue.GetId();
+ rC.TakeGluePoint( rGlue, FALSE );
+ }
+*/
+ rC.SetBestConnection( FALSE );
+ rC.SetBestVertex( FALSE );
+ rC.SetAutoVertex( TRUE );
+ }
+ }
+ }
+ }
+ }
+ }
+ rStCtrl.Seek( nMerk );
+ return pRet;
+}
+
+const PptSlideLayoutAtom* SdrPowerPointImport::GetSlideLayoutAtom() const
+{
+ PptSlidePersistList* pPageList = GetPageList( eAktPageKind );
+ if ( pPageList && nAktPageNum < pPageList->Count() )
+ {
+ PptSlidePersistEntry* pE = (*pPageList)[ nAktPageNum ];
+ if ( pE )
+ return &pE->aSlideAtom.aLayout;
+ }
+ return NULL;
+}
+
+sal_Bool SdrPowerPointImport::IsNoteOrHandout( USHORT nPageNum, PptPageKind ePageKind ) const
+{
+ sal_Bool bNote = eAktPageKind == PPT_NOTEPAGE;
+ if ( eAktPageKind == PPT_MASTERPAGE )
+ bNote = nPageNum == 0 || nPageNum == 2;
+ return bNote;
+}
+
+UINT32 SdrPowerPointImport::GetMasterPageId( USHORT nPageNum, PptPageKind ePageKind ) const
+{
+ PptSlidePersistList* pPageList = GetPageList( ePageKind );
+ if ( pPageList && nPageNum < pPageList->Count() )
+ return (*pPageList)[ nPageNum ]->aSlideAtom.nMasterId;
+ return 0;
+}
+
+UINT32 SdrPowerPointImport::GetNotesPageId( USHORT nPageNum, PptPageKind ePageKind ) const
+{
+ PptSlidePersistList* pPageList=GetPageList( ePageKind );
+ if ( pPageList && nPageNum < pPageList->Count() )
+ return (*pPageList)[ nPageNum ]->aSlideAtom.nNotesId;
+ return 0;
+}
+
+sal_Bool SdrPowerPointImport::HasMasterPage( USHORT nPageNum, PptPageKind ePageKind ) const
+{
+ if ( ePageKind == PPT_NOTEPAGE)
+ return HasNotesMasterPage();
+ if ( ePageKind == PPT_MASTERPAGE)
+ return FALSE;
+ return GetMasterPageId( nPageNum, ePageKind ) != 0;
+}
+
+USHORT SdrPowerPointImport::GetMasterPageIndex( USHORT nPageNum, PptPageKind ePageKind ) const
+{
+ USHORT nIdx = 0;
+ if ( ePageKind == PPT_NOTEPAGE )
+ return GetNotesMasterPageIndex();
+ if ( ePageKind == PPT_MASTERPAGE )
+ return nIdx;
+ UINT32 nId = GetMasterPageId( nPageNum, ePageKind );
+ if ( nId && pMasterPages )
+ {
+ nIdx = pMasterPages->FindPage( nId );
+ if ( nIdx == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
+ nIdx = 0;
+ }
+ return nIdx;
+}
+
+sal_Bool SdrPowerPointImport::HasNotesPage( USHORT nPageNum, PptPageKind ePageKind ) const
+{
+ if ( ePageKind == PPT_SLIDEPAGE)
+ return GetNotesPageId( nPageNum, ePageKind ) != 0;
+ return FALSE;
+}
+
+USHORT SdrPowerPointImport::GetNotesPageIndex( USHORT nPageNum, PptPageKind ePageKind ) const
+{
+ USHORT nIdx = 0;
+ if ( ePageKind == PPT_SLIDEPAGE )
+ {
+ UINT32 nId = GetNotesPageId( nPageNum, ePageKind );
+ if ( nId && pNotePages )
+ {
+ nIdx = pNotePages->FindPage( nId );
+ if ( nIdx == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
+ nIdx = 0;
+ }
+ }
+ return nIdx;
+}
+
+SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage, sal_Bool bForce )
+{
+ SdrObject* pRet = NULL;
+ sal_Bool bCreateObj = bForce;
+ SfxItemSet* pSet = NULL;
+ ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer spaetere Restauration
+ DffRecordHeader aPageHd;
+ if ( SeekToAktPage( &aPageHd ) )
+ { // und nun die Hintergrundattribute der Page suchen
+ ULONG nPageRecEnd = aPageHd.GetRecEndFilePos();
+ DffRecordHeader aPPDrawHd;
+ if ( SeekToRec( rStCtrl, PPT_PST_PPDrawing, nPageRecEnd, &aPPDrawHd ) )
+ {
+ ULONG nPPDrawEnd = aPPDrawHd.GetRecEndFilePos();
+ DffRecordHeader aEscherF002Hd;
+ if ( SeekToRec( rStCtrl, DFF_msofbtDgContainer, nPPDrawEnd, &aEscherF002Hd ) )
+ {
+ ULONG nEscherF002End = aEscherF002Hd.GetRecEndFilePos();
+ DffRecordHeader aEscherObjectHd;
+ if ( SeekToRec( rStCtrl, DFF_msofbtSpContainer, nEscherF002End, &aEscherObjectHd ) )
+ {
+ ULONG nEscherObjectEnd = aEscherObjectHd.GetRecEndFilePos();
+ //DffRecordHeader aEscherPropertiesHd;
+ if ( SeekToRec( rStCtrl, DFF_msofbtOPT,nEscherF002End ) )
+ {
+ DffPropertyReader aProps( *this );
+ rStCtrl >> (DffPropertyReader&)aProps;
+ aProps.mnFix16Angle = Fix16ToAngle( aProps.GetPropertyValue( DFF_Prop_Rotation, 0 ) );
+ UINT32 nColor = aProps.GetPropertyValue( DFF_Prop_fillColor, 0xffffff );
+ pSet = new SfxItemSet( pSdrModel->GetItemPool() );
+ aProps.ApplyAttributes( rStCtrl, *pSet );
+ Color aColor( MSO_CLR_ToColor( nColor ) );
+ pSet->Put( XFillColorItem( String(), aColor ) );
+ }
+ }
+ }
+ }
+ }
+ rStCtrl.Seek( nFPosMerk ); // FilePos restaurieren
+ if ( bCreateObj )
+ {
+ if ( !pSet )
+ {
+ pSet = new SfxItemSet( pSdrModel->GetItemPool() );
+ pSet->Put( XFillStyleItem( XFILL_NONE ) );
+ }
+ pSet->Put( XLineStyleItem( XLINE_NONE ) );
+ Rectangle aRect( rPage.GetLftBorder(), rPage.GetUppBorder(), rPage.GetWdt()-rPage.GetRgtBorder(), rPage.GetHgt()-rPage.GetLwrBorder() );
+ pRet = new SdrRectObj( aRect );
+ pRet->SetModel( pSdrModel );
+ pRet->NbcSetAttributes( *pSet, FALSE );
+ pRet->SetMarkProtect( TRUE );
+ pRet->SetMoveProtect( TRUE );
+ pRet->SetResizeProtect( TRUE );
+ }
+ delete pSet;
+ return pRet;
+}
+
+ULONG SdrPowerPointImport::GetObjCount() const
+{
+ ULONG nAnz=0;
+ ULONG nFPosMerk = rStCtrl.Tell(); // FilePos merken fuer spaetere Restauration
+ DffRecordHeader aObjContHd;
+ if ( SeekToObj( 0, NULL, &aObjContHd ) )
+ {
+ ULONG nRecEnd = aObjContHd.GetRecEndFilePos();
+ nAnz = CountRecords2( DFF_msofbtSpContainer, DFF_msofbtSpgrContainer, nRecEnd );
+ }
+ rStCtrl.Seek( nFPosMerk ); // FilePos restaurieren
+ return nAnz;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+HeaderFooterEntry::HeaderFooterEntry( HeaderFooterMaster& rM, SdPage* pPage ) :
+ rMaster ( rM ),
+ pSdPage ( pPage ),
+ nAtom ( 0 ),
+ nInstanceCount ( 0 ),
+ bMaster ( TRUE )
+{
+ for ( UINT32 i = 0; i < 4; i++ )
+ {
+ pSdrObject[ i ] = NULL;
+ }
+}
+
+HeaderFooterEntry::HeaderFooterEntry( HeaderFooterEntry& rE, SdPage* pPage ) :
+ rMaster ( rE.rMaster ),
+ pSdPage ( pPage ),
+ nAtom ( rE.nAtom ),
+ nInstanceCount ( rE.nInstanceCount ),
+ bMaster ( FALSE )
+{
+ for ( UINT32 i = 0; i < 4; i++ )
+ {
+ if ( i < nInstanceCount )
+ pInstanceOrder[ i ] = rE.pInstanceOrder[ i ];
+ pPlaceholder[ i ] = rE.pPlaceholder[ i ];
+ pSdrObject[ i ] = NULL;
+ }
+ rMaster.aHeaderFooterEntryList.Insert( (void*)this, LIST_APPEND );
+}
+
+HeaderFooterEntry::~HeaderFooterEntry()
+{
+ for ( UINT32 i = 0; i < 4; delete pSdrObject[ i++ ] );
+}
+
+UINT32 HeaderFooterEntry::GetMaskForInstance( UINT32 nInstance )
+{
+ UINT32 nRet = 0;
+ switch ( nInstance )
+ {
+ case 0 : nRet = 0x07ffff; break;
+ case 1 : nRet = 0x100000; break;
+ case 2 : nRet = 0x200000; break;
+ case 3 : nRet = 0x080000; break;
+ }
+ return nRet;
+}
+
+UINT32 HeaderFooterEntry::IsToDisplay( UINT32 nInstance )
+{
+ UINT32 nMask = 0;
+ switch ( nInstance )
+ {
+ case 0 : nMask = 0x010000; break;
+ case 1 : nMask = 0x100000; break;
+ case 2 : nMask = 0x200000; break;
+ case 3 : nMask = 0x080000; break;
+ }
+ return ( nAtom & nMask );
+}
+
+HeaderFooterMaster::HeaderFooterMaster() :
+ nDirtyInstance ( 0 )
+{
+ for ( UINT32 i = 0; i < 4; i++ )
+ {
+ pOfs[ i ] = 0;
+ }
+}
+
+HeaderFooterMaster::~HeaderFooterMaster()
+{
+ for ( void* pPtr = aHeaderFooterEntryList.First(); pPtr; pPtr = aHeaderFooterEntryList.Next() )
+ delete (HeaderFooterEntry*)pPtr;
+}
+
+UINT32 HeaderFooterMaster::NeedToImportInstance( UINT32 nInstance, HeaderFooterEntry& rE )
+{
+ UINT32 nRet = 0;
+ UINT32 nCount = aHeaderFooterEntryList.Count();
+ if ( nCount > 1 )
+ {
+ HeaderFooterEntry& rEM = *( (HeaderFooterEntry*)aHeaderFooterEntryList.First() );
+ BOOL bPlaceholderChanged = rEM.pPlaceholder[ nInstance ] != rE.pPlaceholder[ nInstance ];
+ UINT32 nMask = rE.GetMaskForInstance( nInstance );
+ UINT32 nInstMask = 1 << nInstance;
+ if ( ( rEM.nAtom & nMask ) != ( rE.nAtom & nMask ) )
+ nDirtyInstance |= nInstMask;
+ if ( bPlaceholderChanged )
+ nDirtyInstance |= nInstMask;
+ if ( nDirtyInstance & nInstMask )
+ {
+ if ( rE.IsToDisplay( nInstance ) )
+ nRet = pOfs[ nInstance ];
+ }
+ }
+ return nRet;
+}
+
+void SdrEscherImport::ImportHeaderFooterContainer( DffRecordHeader& rHd, HeaderFooterEntry& rE )
+{
+ rHd.SeekToContent( rStCtrl );
+ while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < rHd.GetRecEndFilePos() ) )
+ {
+ DffRecordHeader aHd;
+ rStCtrl >> aHd;
+ switch ( aHd.nRecType )
+ {
+ case PPT_PST_HeadersFootersAtom :
+ rStCtrl >> rE.nAtom;
+ break;
+
+ case PPT_PST_CString :
+ {
+ if ( aHd.nRecInstance < 4 )
+ MSDFFReadZString( rStCtrl, rE.pPlaceholder[ aHd.nRecInstance ], aHd.nRecLen, TRUE );
+ }
+ break;
+ }
+ aHd.SeekToEndOfRecord( rStCtrl );
+ }
+}
+
+static sal_Unicode PPTExportMapper( sal_Unicode nUni, BOOL& bNeedsStarBats )
+{
+ bNeedsStarBats = FALSE;
+
+ sal_Unicode cLo, cReplace;
+ cLo = cReplace = 0;
+ switch ( nUni )
+ {
+ case 132 : cLo = 175; break;
+ case 147 : cLo = 174; break;
+ // Currency
+ case 0x00A2: cReplace = 224; break;
+ case 0x00A4: cReplace = 225; break;
+ case 0x00A5: cReplace = 226; break;
+ case 0x20A1: cReplace = 228; break;
+ case 0x20A2: cReplace = 229; break;
+ case 0x20A3: cReplace = 230; break;
+ case 0x20A4: cReplace = 231; break;
+ case 0x20A7: cReplace = 227; break;
+ case 0x20A8: cReplace = 234; break;
+ case 0x20A9: cReplace = 232; break;
+ case 0x20AB: cReplace = 233; break;
+ case 0x20AC: cReplace = 128; break;
+ // Punctuation and other
+ case 0x201A: cReplace = 130; break; // SINGLE LOW-9 QUOTATION MARK
+ case 0x0192: cReplace = 131; break; // LATIN SMALL LETTER F WITH HOOK
+ case 0x201E: // DOUBLE LOW-9 QUOTATION MARK
+ case 0x301F: // LOW DOUBLE PRIME QUOTATION MARK
+ cReplace = 132; break;
+ case 0x2026: cReplace = 133; break; // HORIZONTAL ELLIPSES
+ case 0x2020: cReplace = 134; break; // DAGGER
+ case 0x2021: cReplace = 135; break; // DOUBLE DAGGER
+ case 0x02C6: cReplace = 136; break; // MODIFIER LETTER CIRCUMFLEX ACCENT
+ case 0x2030: cReplace = 137; break; // PER MILLE SIGN
+ case 0x0160: cReplace = 138; break; // LATIN CAPITAL LETTER S WITH CARON
+ case 0x2039: cReplace = 139; break; // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ case 0x0152: cReplace = 140; break; // LATIN CAPITAL LIGATURE OE
+ case 0x017D: cReplace = 142; break; // LATIN CAPITAL LETTER Z WITH CARON
+ case 0x2018: // LEFT SINGLE QUOTATION MARK
+ case 0x02BB: // MODIFIER LETTER TURNED COMMA
+ cReplace = 145; break;
+ case 0x2019: // RIGHT SINGLE QUOTATION MARK
+ case 0x02BC: // MODIFIER LETTER APOSTROPHE
+ cReplace = 146; break;
+ case 0x201C: // LEFT DOUBLE QUOTATION MARK
+ case 0x301D: // REVERSED DOUBLE PRIME QUOTATION MARK
+ cReplace = 147; break;
+ case 0x201D: // RIGHT DOUBLE QUOTATION MARK
+ case 0x301E: // REVERSED DOUBLE PRIME QUOTATION MARK
+ cReplace = 148; break;
+ case 0x2022: cReplace = 149; break; // BULLET
+ case 0x2013: cReplace = 150; break; // EN DASH
+ case 0x2014: cReplace = 151; break; // EM DASH
+ case 0x02DC: cReplace = 152; break; // SMALL TILDE
+ case 0x2122: cReplace = 153; break; // TRADE MARK SIGN
+ case 0x0161: cReplace = 154; break; // LATIN SMALL LETTER S WITH CARON
+ case 0x203A: cReplace = 155; break; // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ case 0x0153: cReplace = 156; break; // LATIN SMALL LIGATURE OE
+ case 0x017E: cReplace = 158; break; // LATIN SMALL LETTER Z WITH CARON
+ case 0x0178: cReplace = 159; break; // LATIN CAPITAL LETTER Y WITH DIAERESIS
+ case 0x00B6: cReplace = 222; break; // PILCROW SIGN / PARAGRAPH SIGN
+ }
+ if ( cReplace )
+ {
+ bNeedsStarBats = TRUE;
+ return cReplace;
+ }
+ else
+ return cLo;
+}
+
+
+sal_Unicode SdrPowerPointImport::PPTSubstitute( UINT16 nFont, sal_Unicode nChar,
+ UINT32& nMappedFontId, Font& rFont, char nDefault ) const
+{
+ static String aStarBats( String( RTL_CONSTASCII_USTRINGPARAM( "StarBats" ) ) );
+ BOOL bNeedsStarBats = FALSE;
+
+ sal_Unicode c = 0;
+ nMappedFontId = nFont;
+
+ PptFontEntityAtom* pAtom = GetFontEnityAtom( nFont );
+ if ( pAtom )
+ {
+ CharSet eCharSet( pAtom->eCharSet );
+
+ UINT32 nSourceFontId( pAtom->nUniqueFontId );
+
+ rFont.SetCharSet( eCharSet );
+ rFont.SetName( pAtom->aName );
+ rFont.SetFamily( FAMILY_DONTKNOW );
+ rFont.SetPitch( PITCH_DONTKNOW );
+
+ if ( eCharSet != RTL_TEXTENCODING_SYMBOL )
+ {
+#ifndef WNT
+ c = PPTExportMapper( nChar, bNeedsStarBats );
+ if ( !c )
+#endif
+ c = nChar; // String::ConvertFromUnicode( nChar, eCharSet );
+ }
+ else
+ {
+ if ( !pAtom->bAvailable ) // the original font is not available
+ {
+ if ( nSourceFontId == PPT_UNIQUE_FONT_ID_MONOTYPE_SORTS )
+ { // this is a special mapping for monotype sorts
+ UniString aString( (sal_Unicode)nChar );
+ if ( SymCharConverter::Convert( rFont, aString ) )
+ c = aString.GetChar( 0 );
+ bNeedsStarBats = TRUE;
+ }
+ else
+ {
+ rFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Wingdings" ) ) );
+ if ( IsWingdingsAvailable() ) // mapping all fonts not available to wingdings
+ {
+ c = nChar;
+/*
+ if ( nChar & 0xff00 )
+ c = String::ConvertFromUnicode( nChar, eCharSet );
+ else
+ c = (UINT8)nChar;
+*/
+ if ( nIWingdings & 0x80000000 )
+ nMappedFontId = nIWingdings &~0x80000000;
+ }
+ else // on the other way if wingdings is not available we
+ { // have to map to starbats
+ UniString aString( (sal_Unicode)nChar );
+ if ( SymCharConverter::Convert( rFont, aString ) )
+ c = aString.GetChar( 0 );
+ bNeedsStarBats = TRUE;
+ }
+ }
+ }
+ else
+ {
+ c = nChar;
+/*
+ if ( nChar & 0xff00 )
+ c = String::ConvertFromUnicode( nChar, eCharSet );
+ else
+ c = (UINT8)nChar;
+*/
+ }
+ }
+ if ( bNeedsStarBats )
+ {
+ if ( nIStarBats & 0x80000000 )
+ {
+ rFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
+ rFont.SetName( aStarBats );
+ nMappedFontId = nIStarBats &~0x80000000;
+ }
+ else
+ c = 0;
+ }
+ }
+ if ( !c )
+ c = nDefault ? nDefault : (UINT8)nChar;
+ return c;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+PPTBuGraEntry::PPTBuGraEntry( Graphic& rGraphic, UINT32 nInst ) :
+ aBuGra ( rGraphic ),
+ nInstance ( nInst ) {};
+
+PPTExtParaLevel::PPTExtParaLevel() :
+ nBuFlags ( 0 ),
+ nBuStart ( 0 ),
+ nBuInstance ( 0xffff ),
+ nNumberingType ( 0x30001 ),
+ bSet ( FALSE )
+{}
+
+SvStream& operator>>( SvStream& rIn, PPTExtParaLevel& rLevel )
+{
+ rLevel.bSet = TRUE;
+ rIn >> rLevel.nBuFlags;
+ if ( rLevel.nBuFlags & 0x00800000 )
+ rIn >> rLevel.nBuInstance;
+ if ( rLevel.nBuFlags & 0x01000000 )
+ rIn >> rLevel.nNumberingType;
+ if ( rLevel.nBuFlags & 0x02000000 )
+ rIn >> rLevel.nBuStart;
+#ifdef DBG_UTIL
+ UINT32 nTemp;
+ rIn >> nTemp;
+ if ( nTemp )
+ DBG_ERROR( ">>PPTExtParaLevel - undefined value (SJ)" );
+#else
+ rIn.SeekRel( 4 );
+#endif
+ return rIn;
+}
+
+BOOL PPTExtParaProv::GetGraphic( UINT32 nInstance, Graphic& rGraph )
+{
+ BOOL bRetValue = FALSE;
+ PPTBuGraEntry* pPtr;
+ if ( nInstance < aBuGraList.Count() )
+ {
+ pPtr = (PPTBuGraEntry*)aBuGraList.GetObject( nInstance );
+ if ( pPtr->nInstance == nInstance )
+ bRetValue = TRUE;
+ }
+ if ( !bRetValue )
+ {
+ for ( pPtr = (PPTBuGraEntry*)aBuGraList.First(); pPtr; pPtr = (PPTBuGraEntry*)aBuGraList.Next() )
+ {
+ if ( pPtr->nInstance == nInstance )
+ {
+ bRetValue = TRUE;
+ break;
+ }
+ }
+ }
+ if ( bRetValue )
+ {
+ rGraph = pPtr->aBuGra;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+BOOL PPTExtParaProv::SeekToContentOfBinaryData( SvStream& rSt, const DffRecordHeader& rProgTagBinaryDataHd,
+ DffRecordHeader& rContentHd )
+{
+ BOOL bRetValue = FALSE;
+ UINT32 nOldPos = rSt.Tell();
+
+ rProgTagBinaryDataHd.SeekToContent( rSt );
+
+ rSt >> rContentHd;
+ if ( ( rContentHd.nRecType == PPT_PST_CString ) && ( rContentHd.nRecLen == 14 ) )
+ {
+ sal_uInt16 nIdx, b = ( (USHORT)rContentHd.nRecLen ) / 2;
+ sal_Unicode* pWStr = new sal_Unicode[ b ];
+ for ( nIdx = 0; nIdx < b; ++nIdx, rSt >> pWStr[ nIdx ] );
+ String aString( pWStr, b );
+ if ( aString == String( RTL_CONSTASCII_USTRINGPARAM( "___PPT9" ) ) )
+ {
+ rContentHd.SeekToEndOfRecord( rSt );
+ rSt >> rContentHd;
+ if ( rContentHd.nRecType == PPT_PST_BinaryTagData )
+ bRetValue = TRUE;
+ }
+ }
+ if ( !bRetValue )
+ rSt.Seek( nOldPos );
+ return bRetValue;
+}
+
+BOOL PPTExtParaProv::SeekToContent( SvStream& rSt, const DffRecordHeader& rProgTagBinaryDataHd, DffRecordHeader& rContentHd )
+{
+ return SeekToContentOfBinaryData( rSt, rProgTagBinaryDataHd, rContentHd );
+}
+
+PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const DffRecordHeader* pHd ) :
+ bStyles ( FALSE ),
+ bGraphics ( FALSE )
+{
+ UINT32 nOldPos = rSt.Tell();
+
+ // here we have to get the graphical bullets...
+
+ DffRecordHeader aHd;
+ DffRecordHeader aContentDataHd;
+ DffRecordHeader aProgTagHd;
+ DffRecordHeader aProgTagBinaryDataHd;
+
+ const DffRecordHeader* pListHd = rMan.aDocRecManager.GetRecordHeader( PPT_PST_List, SEEK_FROM_BEGINNING );
+ while( pListHd )
+ {
+ pListHd->SeekToContent( rSt );
+ if ( !rMan.SeekToRec( rSt, PPT_PST_ProgTags, pListHd->GetRecEndFilePos(), &aProgTagHd ) )
+ break;
+ if ( !rMan.SeekToRec( rSt, PPT_PST_ProgBinaryTag, aProgTagHd.GetRecEndFilePos(), &aProgTagBinaryDataHd ) )
+ break;
+ if ( !SeekToContentOfBinaryData( rSt, aProgTagBinaryDataHd, aContentDataHd ) )
+ break;
+ while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < aContentDataHd.GetRecEndFilePos() ) )
+ {
+ rSt >> aHd;
+ switch ( aHd.nRecType )
+ {
+ case PPT_PST_ExtendedBuGraContainer :
+ {
+ while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < aHd.GetRecEndFilePos() ) )
+ {
+ UINT16 nType;
+ DffRecordHeader aBuGraAtomHd;
+ rSt >> aBuGraAtomHd;
+ if ( aBuGraAtomHd.nRecType == PPT_PST_ExtendedBuGraAtom )
+ {
+ rSt >> nType;
+ Graphic aGraphic;
+ if ( rMan.GetBLIPDirect( rSt, aGraphic ) )
+ {
+ UINT32 nInstance = aBuGraAtomHd.nRecInstance;
+ PPTBuGraEntry* pBuGra = new PPTBuGraEntry( aGraphic, nInstance );
+ UINT32 n = 0;
+ UINT32 nBuGraCount = aBuGraList.Count();
+ if ( nBuGraCount )
+ {
+ if ( ( (PPTBuGraEntry*)aBuGraList.GetObject( nBuGraCount - 1 ) )->nInstance < nInstance )
+ n = nBuGraCount;
+ else
+ { // maybe the instances are not sorted, we sort it
+ for ( n = 0; n < nBuGraCount; n++ )
+ { // sorting fields ( hi >> lo )
+ if ( ( (PPTBuGraEntry*)aBuGraList.GetObject( n ) )->nInstance < nInstance )
+ break;
+ }
+ }
+ }
+ aBuGraList.Insert( pBuGra, (UINT32)n );
+ }
+#ifdef DBG_UTIL
+ else DBG_ERROR( "PPTExParaProv::PPTExParaProv - bullet graphic is not valid (SJ)" );
+#endif
+ }
+#ifdef DBG_UTIL
+ else DBG_ERROR( "PPTExParaProv::PPTExParaProv - unknown atom interpreting the PPT_PST_ExtendedBuGraContainer (SJ)" );
+#endif
+ aBuGraAtomHd.SeekToEndOfRecord( rSt );
+ }
+ if ( aBuGraList.Count() )
+ bGraphics = TRUE;
+ }
+ break;
+
+ case PPT_PST_ExtendedPresRuleContainer :
+ aExtendedPresRules.Consume( rSt, FALSE, aHd.GetRecEndFilePos() );
+ break;
+#ifdef DBG_UTIL
+ default :
+ DBG_ERROR( "PPTExParaProv::PPTExParaProv - unknown atom reading ppt2000 num rules (SJ)" );
+ case PPT_PST_MasterText : // first seen in: ms-tt02.ppt
+ case PPT_PST_SrKinsoku :
+ case PPT_PST_NewlyAddedAtomByPPT2000 :
+ break;
+#endif
+ }
+ aHd.SeekToEndOfRecord( rSt );
+ }
+ break;
+ }
+
+ while( pHd )
+ { // get the extended paragraph styles on mainmaster ( graphical bullets, num ruling ... )
+ pHd->SeekToContent( rSt );
+ if ( !rMan.SeekToRec( rSt, PPT_PST_ProgTags, pHd->GetRecEndFilePos(), &aProgTagHd ) )
+ break;
+ if ( !rMan.SeekToRec( rSt, PPT_PST_ProgBinaryTag, aProgTagHd.GetRecEndFilePos(), &aProgTagBinaryDataHd ) )
+ break;
+ if ( !SeekToContentOfBinaryData( rSt, aProgTagBinaryDataHd, aContentDataHd ) )
+ break;
+ while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < aContentDataHd.GetRecEndFilePos() ) )
+ {
+ rSt >> aHd;
+ if ( aHd.nRecType == PPT_PST_ExtendedParagraphMasterAtom )
+ {
+ if ( aHd.nRecInstance < PPT_STYLESHEETENTRYS )
+ {
+ UINT16 nDepth, i = 0;
+ rSt >> nDepth;
+ if ( i <= 5 )
+ {
+
+ while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < aHd.GetRecEndFilePos() ) && ( i < nDepth ) )
+ {
+ bStyles = TRUE;
+ rSt >> aExtParaSheet[ aHd.nRecInstance ].aExtParaLevel[ i++ ];
+ }
+#ifdef DBG_UTIL
+ if ( rSt.Tell() != aHd.GetRecEndFilePos() )
+ DBG_ERROR( "PPTExParaProv::PPTExParaProv - error reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" );
+#endif
+ }
+#ifdef DBG_UTIL
+ else DBG_ERROR( "PPTExParaProv::PPTExParaProv - depth is greater than 5 (SJ)" );
+#endif
+
+ }
+#ifdef DBG_UTIL
+ else DBG_ERROR( "PPTExParaProv::PPTExParaProv - instance out of range (SJ)" );
+#endif
+ }
+#ifdef DBG_UTIL
+ else DBG_ERROR( "PPTExParaProv::PPTExParaProv - unknown atom, assuming PPT_PST_ExtendedParagraphMasterAtom (SJ)" );
+#endif
+ aHd.SeekToEndOfRecord( rSt );
+ }
+ break;
+ }
+ rSt.Seek( nOldPos );
+}
+
+PPTExtParaProv::~PPTExtParaProv()
+{
+ void* pPtr;
+ for ( pPtr = aBuGraList.First(); pPtr; pPtr = aBuGraList.Next() )
+ delete (PPTBuGraEntry*)pPtr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rManager,
+ SvxNumberFormat& rNumberFormat, UINT32 nLevel, UINT32 nInstance, UINT32 nInstanceInSheet,
+ UINT32 nFontHeight, PPTParagraphObj* pPara )
+{
+ BOOL bHardAttribute = ( nInstanceInSheet == 0xffffffff );
+
+ UINT32 nBuFlags = 0;
+ UINT16 nBuStart = 0;
+ UINT32 nNumberingType = 0x30001;
+ UINT16 nBuInstance = 0xffff;
+
+ if ( pPara )
+ {
+ nBuFlags = pPara->pParaSet->nBuFlags;
+ if ( nBuFlags )
+ {
+ if ( nBuFlags & 0x00800000 )
+ nBuInstance = pPara->pParaSet->nBuInstance;
+ if ( nBuFlags & 0x01000000 )
+ nNumberingType = pPara->pParaSet->nNumberingType;
+ if ( nBuFlags & 0x02000000 )
+ nBuStart = pPara->pParaSet->nBuStart;
+ bHardAttribute = TRUE;
+ }
+ }
+ if ( ( nBuFlags & 0x03800000 ) != 0x03800000 ) // merge style sheet
+ { // we have to read the master attributes
+ if ( rManager.pExtParaProv && ( nLevel < 5 ) )
+ {
+ PPTExtParaProv& rS = *rManager.pExtParaProv;
+ if ( rS.bStyles )
+ {
+ PPTExtParaLevel& rLev = rS.aExtParaSheet[ nInstance ].aExtParaLevel[ nLevel ];
+ if ( rLev.bSet )
+ {
+ UINT32 nMaBuFlags = rLev.nBuFlags;
+
+ if ( (!( nBuFlags & 0x00800000)) && ( nMaBuFlags & 0x00800000 ) )
+ nBuInstance = rLev.nBuInstance;
+ if ( (!( nBuFlags & 0x01000000)) && ( nMaBuFlags & 0x01000000 ) )
+ nNumberingType = rLev.nNumberingType;
+ if ( (!( nBuFlags & 0x02000000)) && ( nMaBuFlags & 0x02000000 ) )
+ nBuStart = rLev.nBuStart;
+ nBuFlags |= nMaBuFlags;
+ }
+ }
+ }
+ }
+ if ( nBuInstance != 0xffff ) // set graphical bullet
+ {
+ Graphic aGraphic;
+ if ( rManager.pExtParaProv->GetGraphic( nBuInstance, aGraphic ) )
+ {
+ SvxBrushItem aBrush( aGraphic, GPOS_NONE );
+ rNumberFormat.SetGraphicBrush( &aBrush );
+ UINT32 nHeight = ( (double)nFontHeight * 7.0 // 10.0
+ / ( 72.0 / 2.54 ) ) * nBulletHeight;
+ Size aPrefSize( aGraphic.GetPrefSize() );
+ UINT32 nWidth = ( nHeight * aPrefSize.Width() ) / aPrefSize.Height();
+ rNumberFormat.SetGraphicSize( Size( nWidth, nHeight ) );
+ rNumberFormat.SetNumType ( SVX_NUM_BITMAP );
+ }
+ }
+ else if ( nBuStart && ( nBuFlags & 0x03000000 ) )
+ {
+ if ( nNumberingType & 1 )
+ {
+ switch( nNumberingType >> 16 )
+ {
+ default :
+ case 0 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_CHARS_LOWER_LETTER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) );
+ }
+ break;
+ case 1 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_CHARS_UPPER_LETTER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) );
+ }
+ break;
+ case 2 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_ARABIC );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
+ }
+ break;
+ case 3 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_ARABIC );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) );
+ }
+ break;
+ case 4 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_ROMAN_LOWER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
+ rNumberFormat.SetPrefix( String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ) );
+ }
+ break;
+ case 5 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_ROMAN_LOWER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
+ }
+ break;
+ case 6 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_ROMAN_LOWER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) );
+ }
+ break;
+ case 7 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_ROMAN_UPPER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( "." ) ) );
+ }
+ break;
+ case 8 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_CHARS_LOWER_LETTER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
+ rNumberFormat.SetPrefix( String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ) );
+ }
+ break;
+ case 9 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_CHARS_LOWER_LETTER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
+ }
+ break;
+ case 10 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_CHARS_UPPER_LETTER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
+ rNumberFormat.SetPrefix( String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ) );
+ }
+ break;
+ case 11 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_CHARS_UPPER_LETTER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
+ }
+ break;
+ case 12 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_ARABIC );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
+ rNumberFormat.SetPrefix( String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ) );
+ }
+ break;
+ case 13 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_ARABIC );
+ }
+ break;
+ case 14 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_ROMAN_UPPER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
+ rNumberFormat.SetPrefix( String( RTL_CONSTASCII_USTRINGPARAM( "(" ) ) );
+ }
+ break;
+ case 15 :
+ {
+ rNumberFormat.SetNumType( SVX_NUM_ROMAN_UPPER );
+ rNumberFormat.SetSuffix( String( RTL_CONSTASCII_USTRINGPARAM( ")" ) ) );
+ }
+ break;
+ }
+ }
+// if ( nBuFlags & 0x02000000 )
+// rNumberFormat.SetStart( nBuStart );
+ }
+ return bHardAttribute;
+}
+
+void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, UINT32 nLevel, const PPTParaLevel& rParaLevel, const PPTCharLevel& rCharLevel, UINT32 nInstance )
+{
+ nIsBullet = rParaLevel.mbIsBullet ? 1 : 0;
+ nBulletChar = rParaLevel.mnBulletChar;
+ nBulletFont = rParaLevel.mnBulletFont;
+ nBulletHeight = rParaLevel.mnBulletHeight;
+ nBulletColor = rParaLevel.mnBulletColor;
+ nTextOfs = rParaLevel.mnTextOfs;
+ nBulletOfs = rParaLevel.mnBulletOfs;
+ ImplGetExtNumberFormat( rManager, rNumberFormat, nLevel, nInstance, 0xffffffff, rCharLevel.mnFontHeight, NULL );
+ ImplGetNumberFormat( rManager, rNumberFormat, nLevel );
+
+ switch ( rNumberFormat.GetNumType() )
+ {
+ case SVX_NUM_CHARS_UPPER_LETTER :
+ case SVX_NUM_CHARS_LOWER_LETTER :
+ case SVX_NUM_ROMAN_UPPER :
+ case SVX_NUM_ROMAN_LOWER :
+ case SVX_NUM_ARABIC :
+ case SVX_NUM_CHARS_UPPER_LETTER_N :
+ case SVX_NUM_CHARS_LOWER_LETTER_N :
+ {
+ UINT32 nFont = rCharLevel.mnFont;
+ String aFontName;
+ if ( rManager.GetFont( nFont, aFontName ) )
+ {
+ CharSet eCharSet = rManager.eCharSetSystem;
+ PptFontCollection& rFontCollection = *rManager.pFonts;
+ if ( nFont < rFontCollection.Count() )
+ {
+ CharSet eFontCharSet = rFontCollection[ (USHORT)nFont ]->eCharSet;
+ if ( eFontCharSet != gsl_getSystemTextEncoding() )
+ eCharSet = eFontCharSet;
+ }
+ Font aFont;
+ aFont.SetCharSet( eCharSet );
+ aFont.SetName( aFontName );
+ aFont.SetFamily( FAMILY_DONTKNOW );
+ aFont.SetPitch( PITCH_DONTKNOW );
+ rNumberFormat.SetBulletFont( &aFont );
+ }
+ }
+ break;
+ }
+}
+
+BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, PPTParagraphObj* pParaObj, UINT32 nInstanceInSheet )
+{
+ UINT32 nHardCount = 0;
+ nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet, nInstanceInSheet );
+ nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletChar, nBulletChar, nInstanceInSheet );
+ nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletFont, nBulletFont, nInstanceInSheet );
+ nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletHeight, nBulletHeight, nInstanceInSheet );
+ nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletColor, nBulletColor, nInstanceInSheet );
+ nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_TextOfs, nTextOfs, nInstanceInSheet );
+ nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletOfs, nBulletOfs, nInstanceInSheet );
+
+ UINT32 nFontHeight = 24;
+ PPTPortionObj* pPtr = pParaObj->First();
+ if ( pPtr )
+ pPtr->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nInstanceInSheet );
+ nHardCount += ImplGetExtNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth,
+ pParaObj->mnInstance, nInstanceInSheet, nFontHeight, pParaObj );
+
+ if ( nHardCount )
+ ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth );
+
+ if ( nHardCount )
+ {
+ switch ( rNumberFormat.GetNumType() )
+ {
+ case SVX_NUM_CHARS_UPPER_LETTER :
+ case SVX_NUM_CHARS_LOWER_LETTER :
+ case SVX_NUM_ROMAN_UPPER :
+ case SVX_NUM_ROMAN_LOWER :
+ case SVX_NUM_ARABIC :
+ case SVX_NUM_CHARS_UPPER_LETTER_N :
+ case SVX_NUM_CHARS_LOWER_LETTER_N :
+ {
+ if ( pPtr )
+ {
+ UINT32 nFont;
+ String aFontName;
+ pPtr->GetAttrib( PPT_CharAttr_Font, nFont, nInstanceInSheet );
+ if ( rManager.GetFont( nFont, aFontName ) )
+ {
+ CharSet eCharSet = rManager.eCharSetSystem;
+ PptFontCollection& rFontCollection = *rManager.pFonts;
+ if ( nFont < rFontCollection.Count() )
+ {
+ CharSet eFontCharSet = rFontCollection[ (USHORT)nFont ]->eCharSet;
+ if ( eFontCharSet != gsl_getSystemTextEncoding() )
+ eCharSet = eFontCharSet;
+ }
+ Font aFont;
+ aFont.SetCharSet( eCharSet );
+ aFont.SetName( aFontName );
+ aFont.SetFamily( FAMILY_DONTKNOW );
+ aFont.SetPitch( PITCH_DONTKNOW );
+ rNumberFormat.SetBulletFont( &aFont );
+ }
+ }
+ }
+ break;
+ }
+ }
+ return ( nHardCount ) ? TRUE : FALSE;
+}
+
+void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, UINT32 nLevel )
+{
+ if ( nIsBullet )
+ {
+ if ( rNumberFormat.GetNumType() == SVX_NUM_NUMBER_NONE ) // be sure that there are no extended paragraph settings
+ rNumberFormat.SetNumType( SVX_NUM_CHAR_SPECIAL );
+ }
+ Color aCol( rManager.MSO_CLR_ToColor( nBulletColor ) );
+
+ UINT32 nMappedFontId;
+ Font aFont;
+
+ aFont.SetColor( aCol );
+ unsigned char c = rManager.PPTSubstitute( nBulletFont, nBulletChar, nMappedFontId, aFont, ( nLevel & 1 ) ? 150 : 149 );
+
+ rNumberFormat.SetBulletFont( &aFont );
+ rNumberFormat.SetBulletChar( (char)c );
+ rNumberFormat.SetBulletRelSize( (UINT16)nBulletHeight );
+ rNumberFormat.SetBulletColor( aCol );
+ UINT16 nAbsLSpace = (UINT16)( ( (UINT32)nTextOfs * 2540 ) / 576 );
+ UINT16 nFirstLineOffset = nAbsLSpace - (UINT16)( ( (UINT32)nBulletOfs * 2540 ) / 576 );
+ rNumberFormat.SetAbsLSpace( nAbsLSpace );
+ rNumberFormat.SetFirstLineOffset( -nFirstLineOffset );
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+PPTCharSheet::PPTCharSheet( UINT32 nInstance )
+{
+ UINT32 nColor = PPT_COLSCHEME_TEXT_UND_ZEILEN;
+ UINT16 nFontHeight;
+ switch ( nInstance )
+ {
+ case TSS_TYPE_PAGETITLE :
+ case TSS_TYPE_TITLE :
+ {
+ nColor = PPT_COLSCHEME_TITELTEXT;
+ nFontHeight = 44;
+ }
+ break;
+ case TSS_TYPE_BODY :
+ case TSS_TYPE_SUBTITLE :
+ case TSS_TYPE_HALFBODY :
+ case TSS_TYPE_QUARTERBODY :
+ nFontHeight = 32;
+ break;
+ case TSS_TYPE_NOTES :
+ nFontHeight = 12;
+ break;
+ case TSS_TYPE_UNUSED :
+ case TSS_TYPE_TEXT_IN_SHAPE :
+ nFontHeight = 24;
+ break;
+ }
+ for ( UINT32 nDepth = 0; nDepth < 5; nDepth++ )
+ {
+ maCharLevel[ nDepth ].mnFlags = 0;
+ maCharLevel[ nDepth ].mnFont = 0;
+ maCharLevel[ nDepth ].mnFontHeight = nFontHeight;
+ maCharLevel[ nDepth ].mnFontColor = nColor;
+ maCharLevel[ nDepth ].mnFontColorInStyleSheet = Color( (BYTE)nColor, (BYTE)( nColor >> 8 ), (BYTE)( nColor >> 16 ) );
+ maCharLevel[ nDepth ].mnEscapement = 0;
+ }
+}
+
+PPTCharSheet::PPTCharSheet( const PPTCharSheet& rAttr )
+{
+ *this = rAttr;
+}
+
+void PPTCharSheet::Read( SvStream& rIn, BOOL bMasterStyle, UINT32 nLevel, BOOL bFirst, BOOL bSimpleText )
+{
+ // Zeichenattribute
+ UINT32 nCMask;
+ rIn >> nCMask;
+
+ if ( nCMask & 0x0000FFFF )
+ {
+ UINT16 nBitAttr;
+ maCharLevel[ nLevel ].mnFlags &= ~( (UINT16)nCMask );
+ rIn >> nBitAttr; // Bit-Attribute (Fett, Unterstrichen, ...)
+ maCharLevel[ nLevel ].mnFlags |= nBitAttr;
+ }
+ nCMask >>= 16;
+
+ // Die Sortierung der Char-Attribs ist etwas durcheinander...
+ static USHORT __READONLY_DATA aCharAttrTable[16] =
+ {
+ 16, 21, 22, 23, 17, 18, 19, 20,
+ 24, 25, 26, 27, 28, 29, 30, 31
+ };
+
+ for ( UINT16 i = 16; i < 32; i++ )
+ {
+ UINT16 j = i;
+
+ // Reihenfolge ist bei einfachen Textobjekten normal...
+ if ( !bSimpleText )
+ j = aCharAttrTable[ i - 16 ];
+
+ if ( nCMask & ( 1 << ( j - 16 ) ) )
+ {
+ UINT16 nVal;
+ switch ( j )
+ {
+ case PPT_CharAttr_FontColor :
+ rIn >> maCharLevel[ nLevel ].mnFontColor;
+ if( ! (maCharLevel[ nLevel ].mnFontColor && 0xff000000 ) )
+ maCharLevel[ nLevel ].mnFontColor = PPT_COLSCHEME_HINTERGRUND;
+ break;
+
+ case PPT_CharAttr_Font :
+ rIn >> maCharLevel[ nLevel ].mnFont;
+ break;
+
+ case PPT_CharAttr_FontHeight :
+ rIn >> maCharLevel[ nLevel ].mnFontHeight;
+ break;
+
+ case PPT_CharAttr_Escapement :
+ rIn >> maCharLevel[ nLevel ].mnEscapement;
+ break;
+
+ default :
+ rIn >> nVal;
+ }
+ }
+ }
+}
+
+PPTParaSheet::PPTParaSheet( UINT32 nInstance )
+{
+ BOOL bHasBullet = FALSE;
+ UINT32 nBulletColor = 0x8000000;
+ UINT16 nUpperDist = 0;
+
+ switch ( nInstance )
+ {
+ case TSS_TYPE_PAGETITLE :
+ case TSS_TYPE_TITLE :
+ nBulletColor = PPT_COLSCHEME_TITELTEXT;
+ break;
+ case TSS_TYPE_BODY :
+ case TSS_TYPE_SUBTITLE :
+ case TSS_TYPE_HALFBODY :
+ case TSS_TYPE_QUARTERBODY :
+ {
+ bHasBullet = TRUE;
+ nUpperDist = 0x14;
+ }
+ break;
+ case TSS_TYPE_NOTES :
+ nUpperDist = 0x1e;
+ break;
+/*
+ default :
+ case TSS_TYPE_UNUSED :
+ case TSS_TYPE_TEXT_IN_SHAPE :
+ break;
+*/
+ }
+ for ( UINT32 i = 0; i < 5; i++ )
+ {
+ maParaLevel[ i ].mbIsBullet = bHasBullet;
+ maParaLevel[ i ].mnBulletChar = 0x2022;
+ maParaLevel[ i ].mnBulletFont = 0;
+ maParaLevel[ i ].mnBulletHeight = 100;
+ maParaLevel[ i ].mnBulletColor = nBulletColor;
+ maParaLevel[ i ].mnAdjust = 0;
+ maParaLevel[ i ].mnLineFeed = 100;
+ maParaLevel[ i ].mnLowerDist = 0;
+ maParaLevel[ i ].mnUpperDist = nUpperDist;
+ maParaLevel[ i ].mnTextOfs = 0;
+ maParaLevel[ i ].mnBulletOfs = 0;
+ maParaLevel[ i ].mnDefaultTab = 0x240;
+ }
+}
+
+PPTParaSheet::PPTParaSheet( const PPTParaSheet& rSheet )
+{
+ *this = rSheet;
+}
+
+void PPTParaSheet::Read( SvStream& rIn, BOOL bMasterStyle, UINT32 nLevel, BOOL bFirst, BOOL bSimpleText )
+{
+ // Absatzattribute
+ UINT16 nVal16;
+ UINT32 nVal32, nPMask;
+ rIn >> nPMask;
+
+ if ( nPMask & 0xF )
+ {
+ UINT16 nBulFlg;
+ rIn >> nBulFlg; // Bullet-HardAttr-Flags
+
+ if ( nPMask & 1 )
+ maParaLevel[ nLevel ].mbIsBullet = ( nBulFlg & 1 ) != 0;
+ }
+
+ if ( nPMask & 0x0080 )
+ rIn >> maParaLevel[ nLevel ].mnBulletChar;
+ if ( nPMask & 0x0010 )
+ {
+ rIn >> nVal16;
+// if ( nPMask & 2 ) // hard Attribute ? #73712#
+ maParaLevel[ nLevel ].mnBulletFont = nVal16;
+ }
+ if ( nPMask & 0x0040 )
+ {
+ rIn >> nVal16;
+// if ( nPMask & 8 ) // hard Attribute ? #73712#
+ maParaLevel[ nLevel ].mnBulletHeight = nVal16;
+ }
+ if ( nPMask & 0x0020 )
+ {
+ rIn >> nVal32;
+// if ( nPMask & 4 ) // hard Attribute ? #73712#
+ {
+ if ( ! ( nVal32 & 0xff000000 ) )
+ nVal32 = PPT_COLSCHEME_HINTERGRUND;
+ maParaLevel[ nLevel ].mnBulletColor = nVal32;
+ }
+ }
+ if ( bFirst )
+ {
+
+ if ( nPMask & 0xF00 )
+ { // AbsJust!
+ rIn >> nVal16;
+ maParaLevel[ nLevel ].mnAdjust = nVal16 & 3;
+ }
+ if ( nPMask & 0x1000 )
+ rIn >> maParaLevel[ nLevel ].mnLineFeed;
+ if ( nPMask & 0x2000 )
+ rIn >> maParaLevel[ nLevel ].mnUpperDist;
+ if ( nPMask & 0x4000 )
+ rIn >> maParaLevel[ nLevel ].mnLowerDist;
+ if ( nPMask & 0x8000 )
+ rIn >> maParaLevel[ nLevel ].mnTextOfs;
+ if ( nPMask & 0x10000 )
+ rIn >> maParaLevel[ nLevel ].mnBulletOfs;
+ if ( nPMask & 0x20000 )
+ rIn >> maParaLevel[ nLevel ].mnDefaultTab;
+
+ if ( bSimpleText )
+ {
+ if ( nPMask & 0x40000 )
+ rIn >> nVal16;
+ }
+ else
+ {
+ if ( nPMask & 0x200000 )
+ {
+ rIn >> nVal16; // if set, read the next 4 bytes too
+ if ( nVal16 )
+ rIn >> nVal32;
+ }
+ if ( nPMask & 0x40000 )
+ rIn >> nVal16;
+ if ( nPMask & 0x80000 )
+ rIn >> nVal16;
+ if ( nPMask & 0x100000 )
+ rIn >> nVal16;
+
+ nPMask >>= 22;
+ while( nPMask & 1 )
+ {
+ rIn >> nVal16;
+ nPMask >>= 1;
+ }
+ }
+ }
+ else
+ {
+ if ( nPMask & 0x800 )
+ {
+ rIn >> nVal16;
+ maParaLevel[ nLevel ].mnAdjust = nVal16 & 3;
+ }
+ if ( nPMask & 0x1000 )
+ rIn >> maParaLevel[ nLevel ].mnLineFeed;
+ if ( nPMask & 0x2000 )
+ rIn >> maParaLevel[ nLevel ].mnUpperDist;
+ if ( nPMask & 0x4000 )
+ rIn >> maParaLevel[ nLevel ].mnLowerDist;
+ if ( nPMask & 0x8000 )
+ {
+ DBG_ERROR( "PPTParaSheet::Read - unknown attribute, send me this document (SJ)" );
+ rIn >> nVal16;
+ }
+ if ( nPMask & 0x100 )
+ rIn >> maParaLevel[ nLevel ].mnTextOfs;
+ if ( nPMask & 0x200 )
+ {
+ // DBG_ERROR( "PPTParaSheet::Read - unknown attribute, send me this document (SJ)" );
+ rIn >> nVal16;
+ }
+ if ( nPMask & 0x400 )
+ rIn >> maParaLevel[ nLevel ].mnBulletOfs;
+ if ( nPMask & 0x10000 )
+ {
+ // DBG_ERROR( "PPTParaSheet::Read - unknown attribute, send me this document (SJ)" );
+ rIn >> nVal16;
+ }
+ if ( nPMask & 0x20000 )
+ {
+ DBG_ERROR( "PPTParaSheet::Read - unknown attribute, send me this document (SJ)" );
+ rIn >> nVal16;
+ }
+ nPMask >>= 18;
+ // wenn normaler Text obere Flags ignorieren
+ if ( bSimpleText )
+ nPMask &= 1;
+ for ( UINT16 i = 18; nPMask; i++, nPMask >>= 1 )
+ {
+ if ( nPMask & 1 )
+ {
+ DBG_ERROR( "PPTParaSheet::Read - unknown attribute, send me this document (SJ)" );
+ rIn >> nVal16;
+ }
+ }
+ }
+}
+
+PPTStyleSheet::PPTStyleSheet( SvStream& rIn, SdrPowerPointImport& rManager )
+{
+ UINT32 i;
+ UINT32 nOldFilePos = rIn.Tell();
+ const DffRecordHeader *pH, *pHd = NULL;
+
+ // Richtigen MainMaster finden
+ for ( pH = rManager.aPptRecManager.GetRecordHeader( PPT_PST_MainMaster, SEEK_FROM_BEGINNING );
+ pH; pH = rManager.aPptRecManager.GetRecordHeader( PPT_PST_MainMaster, SEEK_FROM_CURRENT ) )
+ {
+ pHd = pH;
+ }
+ rManager.pExtParaProv = new PPTExtParaProv( rManager, rIn, pHd );
+
+ // default stylesheets
+ BOOL bFoundTxMasterStyleAtom04 = FALSE;
+ mpCharSheet[ TSS_TYPE_PAGETITLE ] = new PPTCharSheet( TSS_TYPE_PAGETITLE );
+ mpCharSheet[ TSS_TYPE_BODY ] = new PPTCharSheet( TSS_TYPE_BODY );
+ mpCharSheet[ TSS_TYPE_NOTES ] = new PPTCharSheet( TSS_TYPE_NOTES );
+ mpCharSheet[ TSS_TYPE_UNUSED ] = new PPTCharSheet( TSS_TYPE_UNUSED ); // this entry is not used by ppt
+ mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ] = new PPTCharSheet( TSS_TYPE_TEXT_IN_SHAPE );
+ mpParaSheet[ TSS_TYPE_PAGETITLE ] = new PPTParaSheet( TSS_TYPE_PAGETITLE );
+ mpParaSheet[ TSS_TYPE_BODY ] = new PPTParaSheet( TSS_TYPE_BODY );
+ mpParaSheet[ TSS_TYPE_NOTES ] = new PPTParaSheet( TSS_TYPE_NOTES );
+ mpParaSheet[ TSS_TYPE_UNUSED ] = new PPTParaSheet( TSS_TYPE_UNUSED );
+ mpParaSheet[ TSS_TYPE_TEXT_IN_SHAPE ] = new PPTParaSheet( TSS_TYPE_TEXT_IN_SHAPE );
+ mpCharSheet[ TSS_TYPE_QUARTERBODY ] = mpCharSheet[ TSS_TYPE_HALFBODY ] = mpCharSheet[ TSS_TYPE_TITLE ] = mpCharSheet[ TSS_TYPE_SUBTITLE ] = NULL;
+ mpParaSheet[ TSS_TYPE_QUARTERBODY ] = mpParaSheet[ TSS_TYPE_HALFBODY ] = mpParaSheet[ TSS_TYPE_TITLE ] = mpParaSheet[ TSS_TYPE_SUBTITLE ] = NULL;
+
+ if ( pHd )
+ {
+ pHd->SeekToContent( rIn );
+ DffRecordHeader aTxMasterStyleHd;
+ while ( rIn.Tell() < pHd->GetRecEndFilePos() )
+ {
+ rIn >> aTxMasterStyleHd;
+ if ( aTxMasterStyleHd.nRecType == PPT_PST_TxMasterStyleAtom )
+ break;
+ else
+ aTxMasterStyleHd.SeekToEndOfRecord( rIn );
+ }
+ while ( ( aTxMasterStyleHd.nRecType == PPT_PST_TxMasterStyleAtom ) && ( rIn.Tell() < pHd->GetRecEndFilePos() ) )
+ {
+ UINT32 nInstance = aTxMasterStyleHd.nRecInstance;
+ if ( nInstance < PPT_STYLESHEETENTRYS )
+ {
+ if ( nInstance > 4 )
+ {
+ delete mpCharSheet[ nInstance ]; // be sure to delete the old one if this instance comes twice
+ delete mpParaSheet[ nInstance ];
+
+ switch ( nInstance )
+ {
+ case TSS_TYPE_SUBTITLE :
+ {
+ mpCharSheet[ TSS_TYPE_SUBTITLE ] = new PPTCharSheet( *( mpCharSheet[ TSS_TYPE_BODY ] ) );
+ mpParaSheet[ TSS_TYPE_SUBTITLE ] = new PPTParaSheet( *( mpParaSheet[ TSS_TYPE_BODY ] ) );
+ }
+ break;
+ case TSS_TYPE_TITLE :
+ {
+ mpCharSheet[ TSS_TYPE_TITLE ] = new PPTCharSheet( *( mpCharSheet[ TSS_TYPE_PAGETITLE ] ) );
+ mpParaSheet[ TSS_TYPE_TITLE ] = new PPTParaSheet( *( mpParaSheet[ TSS_TYPE_PAGETITLE ] ) );
+ }
+ break;
+ case TSS_TYPE_HALFBODY :
+ {
+ mpCharSheet[ TSS_TYPE_HALFBODY ] = new PPTCharSheet( *( mpCharSheet[ TSS_TYPE_BODY ] ) );
+ mpParaSheet[ TSS_TYPE_HALFBODY ] = new PPTParaSheet( *( mpParaSheet[ TSS_TYPE_BODY ] ) );
+ }
+ break;
+
+ case TSS_TYPE_QUARTERBODY :
+ {
+ mpCharSheet[ TSS_TYPE_QUARTERBODY ] = new PPTCharSheet( *( mpCharSheet[ TSS_TYPE_BODY ] ) );
+ mpParaSheet[ TSS_TYPE_QUARTERBODY ] = new PPTParaSheet( *( mpParaSheet[ TSS_TYPE_BODY ] ) );
+ }
+ break;
+ }
+ }
+ else if ( nInstance == 4 )
+ bFoundTxMasterStyleAtom04 = TRUE;
+ UINT16 nLevelAnz;
+ rIn >> nLevelAnz;
+ if ( nLevelAnz > 5 )
+ {
+ DBG_ERROR( "PPTStyleSheet::Ppt-TextStylesheet hat mehr als 5 Ebenen! (SJ)" );
+ nLevelAnz = 5;
+ }
+ USHORT nLev = 0;
+ BOOL bFirst = TRUE;
+ BOOL bSimpleText = FALSE;
+
+ while ( rIn.GetError() == 0 && rIn.Tell() < aTxMasterStyleHd.GetRecEndFilePos() && nLev < nLevelAnz )
+ {
+ if ( nLev && ( nInstance < 5 ) )
+ {
+ mpParaSheet[ nInstance ]->maParaLevel[ nLev ] = mpParaSheet[ nInstance ]->maParaLevel[ nLev - 1 ];
+ mpCharSheet[ nInstance ]->maCharLevel[ nLev ] = mpCharSheet[ nInstance ]->maCharLevel[ nLev - 1 ];
+ }
+ // Ausnahme: Vorlage 5, 6 (MasterTitle Titel und SubTitel)
+ if ( nInstance >= TSS_TYPE_SUBTITLE )
+ {
+ // NICHT bFirst
+ bFirst = FALSE;
+ bSimpleText = TRUE;
+
+ // einen wegwerfen (evtl. Einruecktiefe? Oder Level?)
+ UINT16 nShit;
+ rIn >> nShit;
+ }
+ mpParaSheet[ nInstance ]->Read( rIn, TRUE, nLev, bFirst, bSimpleText );
+ mpCharSheet[ nInstance ]->Read( rIn, TRUE, nLev, bFirst, bSimpleText );
+ bFirst = FALSE;
+ nLev++;
+ }
+#ifdef DBG_UTIL
+ if ( rIn.GetError() == 0 )
+ {
+ ByteString aMsg;
+ if ( rIn.Tell() > aTxMasterStyleHd.GetRecEndFilePos() )
+ {
+ aMsg += "\n ";
+ aMsg += rIn.Tell() - aTxMasterStyleHd.GetRecEndFilePos();
+ aMsg += " Bytes zuviel gelesen";
+ }
+ if ( rIn.Tell() < aTxMasterStyleHd.GetRecEndFilePos() )
+ {
+ aMsg += "\n ";
+ aMsg += aTxMasterStyleHd.GetRecEndFilePos() - rIn.Tell();
+ aMsg += " Bytes zuwenig gelesen";
+ }
+ if ( aMsg.Len() != 0 )
+ {
+ aMsg.Insert( "]:", 0 );
+ aMsg.Insert( "PptStyleSheet::operator>>[", 0 );
+ DBG_ERROR(aMsg.GetBuffer());
+ }
+ }
+ if ( rIn.Tell() != aTxMasterStyleHd.GetRecEndFilePos() )
+ DBG_ASSERT(0, "SJ: Falsche Anzahl von Bytes gelesen beim Import der PPT-Formatvorlagen");
+#endif
+ }
+ aTxMasterStyleHd.SeekToEndOfRecord( rIn );
+ rIn >> aTxMasterStyleHd;
+ }
+ }
+ if ( !mpCharSheet[ TSS_TYPE_SUBTITLE ] )
+ {
+ mpCharSheet[ TSS_TYPE_SUBTITLE ] = new PPTCharSheet( *( mpCharSheet[ TSS_TYPE_BODY ] ) );
+ mpParaSheet[ TSS_TYPE_SUBTITLE ] = new PPTParaSheet( *( mpParaSheet[ TSS_TYPE_BODY ] ) );
+ }
+ if ( !mpCharSheet[ TSS_TYPE_TITLE ] )
+ {
+ mpCharSheet[ TSS_TYPE_TITLE ] = new PPTCharSheet( *( mpCharSheet[ TSS_TYPE_PAGETITLE ] ) );
+ mpParaSheet[ TSS_TYPE_TITLE ] = new PPTParaSheet( *( mpParaSheet[ TSS_TYPE_PAGETITLE ] ) );
+ }
+ if ( !mpCharSheet[ TSS_TYPE_HALFBODY ] )
+ {
+ mpCharSheet[ TSS_TYPE_HALFBODY ] = new PPTCharSheet( *( mpCharSheet[ TSS_TYPE_BODY ] ) );
+ mpParaSheet[ TSS_TYPE_HALFBODY ] = new PPTParaSheet( *( mpParaSheet[ TSS_TYPE_BODY ] ) );
+ }
+ if ( !mpCharSheet[ TSS_TYPE_QUARTERBODY ] )
+ {
+ mpCharSheet[ TSS_TYPE_QUARTERBODY ] = new PPTCharSheet( *( mpCharSheet[ TSS_TYPE_BODY ] ) );
+ mpParaSheet[ TSS_TYPE_QUARTERBODY ] = new PPTParaSheet( *( mpParaSheet[ TSS_TYPE_BODY ] ) );
+ }
+ if ( !bFoundTxMasterStyleAtom04 )
+ { // try to locate the txMasterStyleAtom in the Environment
+ DffRecordHeader* pEnvHeader = rManager.aDocRecManager.GetRecordHeader( PPT_PST_Environment );
+ if ( pEnvHeader )
+ {
+ pEnvHeader->SeekToContent( rIn );
+ DffRecordHeader aTxMasterStyleHd;
+ while ( rIn.Tell() < pEnvHeader->GetRecEndFilePos() )
+ {
+ rIn >> aTxMasterStyleHd;
+ if ( aTxMasterStyleHd.nRecType == PPT_PST_TxMasterStyleAtom )
+ {
+ UINT16 nLevelAnz;
+ rIn >> nLevelAnz;
+
+ USHORT nLev = 0;
+ BOOL bFirst = TRUE;
+ while ( rIn.GetError() == 0 && rIn.Tell() < aTxMasterStyleHd.GetRecEndFilePos() && nLev < nLevelAnz )
+ {
+ if ( nLev )
+ {
+ mpParaSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->maParaLevel[ nLev ] = mpParaSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->maParaLevel[ nLev - 1 ];
+ mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->maCharLevel[ nLev ] = mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->maCharLevel[ nLev - 1 ];
+ }
+ mpParaSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->Read( rIn, TRUE, nLev, bFirst, FALSE );
+ mpCharSheet[ TSS_TYPE_TEXT_IN_SHAPE ]->Read( rIn, TRUE, nLev, bFirst, FALSE );
+ bFirst = FALSE;
+ nLev++;
+ }
+ break;
+ }
+ else
+ aTxMasterStyleHd.SeekToEndOfRecord( rIn );
+ }
+ }
+ }
+ rIn.Seek( nOldFilePos );
+
+ // will will create the default numbulletitem for each instance
+ for ( i = 0; i < PPT_STYLESHEETENTRYS; i++ )
+ {
+ UINT16 nLevels, nDepth = 0;
+ SvxNumRuleType eNumRuleType;
+
+ switch ( i )
+ {
+ case TSS_TYPE_PAGETITLE :
+ case TSS_TYPE_TITLE :
+ nLevels = 1;
+ eNumRuleType = SVX_RULETYPE_NUMBERING;
+ break;
+ case TSS_TYPE_SUBTITLE :
+ nLevels = 9;
+ eNumRuleType = SVX_RULETYPE_NUMBERING;
+ break;
+ case TSS_TYPE_BODY :
+ case TSS_TYPE_HALFBODY :
+ case TSS_TYPE_QUARTERBODY :
+ nDepth = 1;
+ nLevels = 9;
+ eNumRuleType = SVX_RULETYPE_PRESENTATION_NUMBERING;
+ break;
+ default :
+ case TSS_TYPE_NOTES :
+ case TSS_TYPE_UNUSED :
+ case TSS_TYPE_TEXT_IN_SHAPE :
+ nLevels = 10;
+ eNumRuleType = SVX_RULETYPE_NUMBERING;
+ break;
+ }
+ SvxNumRule aRule( NUM_BULLET_REL_SIZE | NUM_BULLET_COLOR |
+ NUM_CHAR_TEXT_DISTANCE | NUM_SYMBOL_ALIGNMENT,
+ nLevels, FALSE, eNumRuleType );
+ if ( eNumRuleType == SVX_RULETYPE_PRESENTATION_NUMBERING )
+ nLevels++;
+ for ( UINT16 nCount = 0; nDepth < nLevels; nCount++ )
+ {
+ const PPTParaLevel& rParaLevel = mpParaSheet[ i ]->maParaLevel[ nCount ];
+ const PPTCharLevel& rCharLevel = mpCharSheet[ i ]->maCharLevel[ nCount ];
+ SvxNumberFormat aNumberFormat( SVX_NUM_NUMBER_NONE );
+ GetNumberFormat( rManager, aNumberFormat, nCount, rParaLevel, rCharLevel, i );
+ aRule.SetLevel( nDepth++, aNumberFormat );
+ if ( nCount >= 4 )
+ {
+ for ( ;nDepth < nLevels; nDepth++ )
+ aRule.SetLevel( nDepth, aNumberFormat );
+ if ( eNumRuleType == SVX_RULETYPE_PRESENTATION_NUMBERING )
+ aRule.SetLevel( 0, aNumberFormat );
+ }
+ }
+ mpNumBulletItem[ i ] = new SvxNumBulletItem( aRule, EE_PARA_NUMBULLET );
+ }
+}
+
+PPTStyleSheet::~PPTStyleSheet()
+{
+ for ( UINT32 i = 0; i < PPT_STYLESHEETENTRYS; i++ )
+ {
+ delete mpCharSheet[ i ];
+ delete mpParaSheet[ i ];
+ delete mpNumBulletItem[ i ];
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+PPTParaPropSet::PPTParaPropSet() :
+ pParaSet( new ImplPPTParaPropSet )
+{
+}
+
+PPTParaPropSet::PPTParaPropSet( PPTParaPropSet& rParaPropSet )
+{
+ pParaSet = rParaPropSet.pParaSet;
+ pParaSet->mnRefCount++;
+}
+
+PPTParaPropSet::~PPTParaPropSet()
+{
+ if ( ! ( --pParaSet->mnRefCount ) )
+ delete pParaSet;
+}
+
+PPTParaPropSet& PPTParaPropSet::operator=( PPTParaPropSet& rParaPropSet )
+{
+ if ( this != &rParaPropSet )
+ {
+ if ( ! ( --pParaSet->mnRefCount ) )
+ delete pParaSet;
+ pParaSet = rParaPropSet.pParaSet;
+ pParaSet->mnRefCount++;
+ }
+ return *this;
+}
+
+PPTCharPropSet::PPTCharPropSet() :
+ pCharSet ( new ImplPPTCharPropSet ),
+ mpFieldItem ( NULL )
+{
+}
+
+PPTCharPropSet::PPTCharPropSet( PPTCharPropSet& rCharPropSet )
+{
+ pCharSet = rCharPropSet.pCharSet;
+ pCharSet->mnRefCount++;
+
+ mnOriginalTextPos = rCharPropSet.mnOriginalTextPos;
+ maString = rCharPropSet.maString;
+ mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : NULL;
+}
+
+PPTCharPropSet::~PPTCharPropSet()
+{
+ if ( ! ( --pCharSet->mnRefCount ) )
+ delete pCharSet;
+ delete mpFieldItem;
+}
+
+PPTCharPropSet& PPTCharPropSet::operator=( PPTCharPropSet& rCharPropSet )
+{
+ if ( this != &rCharPropSet )
+ {
+ if ( ! ( --pCharSet->mnRefCount ) )
+ delete pCharSet;
+ pCharSet = rCharPropSet.pCharSet;
+ pCharSet->mnRefCount++;
+ mnOriginalTextPos = rCharPropSet.mnOriginalTextPos;
+ maString = rCharPropSet.maString;
+ mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : NULL;
+ }
+ return *this;
+}
+
+void PPTCharPropSet::ImplMakeUnique()
+{
+ if ( pCharSet->mnRefCount > 1 )
+ {
+ ImplPPTCharPropSet& rOld = *pCharSet;
+ rOld.mnRefCount--;
+ pCharSet = new ImplPPTCharPropSet( rOld );
+ pCharSet->mnRefCount = 1;
+ }
+}
+
+void PPTCharPropSet::SetFont( UINT16 nFont )
+{
+ UINT32 nMask = 1 << PPT_CharAttr_Font;
+ UINT32 bDoNotMake = pCharSet->mnAttrSet & nMask;
+
+ if ( bDoNotMake )
+ bDoNotMake = nFont == pCharSet->mnFont;
+
+ if ( !bDoNotMake )
+ {
+ ImplMakeUnique();
+ pCharSet->mnFont = nFont;
+ pCharSet->mnAttrSet |= nMask;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+PPTRuler::PPTRuler() :
+ nRefCount ( 1 ),
+ nFlags ( 0 ),
+ nTabCount ( 0 ),
+ pTab ( NULL )
+{
+}
+
+PPTRuler::~PPTRuler()
+{
+ delete pTab;
+};
+
+
+PPTTextRulerInterpreter::PPTTextRulerInterpreter() :
+ mpImplRuler ( new PPTRuler() )
+{
+}
+
+PPTTextRulerInterpreter::PPTTextRulerInterpreter( PPTTextRulerInterpreter& rRuler )
+{
+ mpImplRuler = rRuler.mpImplRuler;
+ mpImplRuler->nRefCount++;
+}
+
+PPTTextRulerInterpreter::PPTTextRulerInterpreter( UINT32 nFileOfs, SdrPowerPointImport& rMan, DffRecordHeader& rHeader, SvStream& rIn ) :
+ mpImplRuler ( new PPTRuler() )
+{
+ if ( nFileOfs != 0xffffffff )
+ {
+ UINT32 nOldPos = rIn.Tell();
+ DffRecordHeader rHd;
+ if ( nFileOfs )
+ {
+ rIn.Seek( nFileOfs );
+ rIn >> rHd;
+ }
+ else
+ {
+ rHeader.SeekToContent( rIn );
+ if ( rMan.SeekToRec( rIn, PPT_PST_TextRulerAtom, rHeader.GetRecEndFilePos(), &rHd ) )
+ nFileOfs++;
+ }
+ if ( nFileOfs )
+ {
+ INT16 nTCount, nDummy;
+ INT32 i;
+ rIn >> mpImplRuler->nFlags;
+ if ( mpImplRuler->nFlags & 1 )
+ rIn >> mpImplRuler->nDefaultTab;
+ if ( mpImplRuler->nFlags & 4 )
+ {
+ rIn >> nTCount;
+ if ( nTCount )
+ {
+ mpImplRuler->nTabCount = (UINT16)nTCount;
+ mpImplRuler->pTab = new UINT16[ mpImplRuler->nTabCount ];
+ for ( i = 0; i < nTCount; i++ )
+ {
+ rIn >> mpImplRuler->pTab[ i ]
+ >> nDummy;
+ }
+ }
+ }
+ for ( i = 0; i < 5; i++ )
+ {
+ if ( mpImplRuler->nFlags & ( 8 << i ) )
+ rIn >> mpImplRuler->nTextOfs[ i ];
+ if ( mpImplRuler->nFlags & ( 256 << i ) )
+ rIn >> mpImplRuler->nBulletOfs[ i ];
+ }
+ }
+ rIn.Seek( nOldPos );
+ }
+}
+
+BOOL PPTTextRulerInterpreter::GetDefaultTab( UINT32 nLevel, UINT16& nValue ) const
+{
+ if ( ! ( mpImplRuler->nFlags & 1 ) )
+ return FALSE;
+ nValue = mpImplRuler->nDefaultTab;
+ return TRUE;
+}
+
+BOOL PPTTextRulerInterpreter::GetTextOfs( UINT32 nLevel, UINT16& nValue ) const
+{
+ if ( ! ( ( nLevel < 5 ) && ( mpImplRuler->nFlags & ( 8 << nLevel ) ) ) )
+ return FALSE;
+ nValue = mpImplRuler->nTextOfs[ nLevel ];
+ return TRUE;
+}
+
+BOOL PPTTextRulerInterpreter::GetBulletOfs( UINT32 nLevel, UINT16& nValue ) const
+{
+ if ( ! ( ( nLevel < 5 ) && ( mpImplRuler->nFlags & ( 256 << nLevel ) ) ) )
+ return FALSE;
+ nValue = mpImplRuler->nBulletOfs[ nLevel ];
+ return TRUE;
+}
+
+PPTTextRulerInterpreter& PPTTextRulerInterpreter::operator=( PPTTextRulerInterpreter& rRuler )
+{
+ if ( this != &rRuler )
+ {
+ if ( ! ( --mpImplRuler->nRefCount ) )
+ delete mpImplRuler;
+ mpImplRuler = rRuler.mpImplRuler;
+ mpImplRuler->nRefCount++;
+ }
+ return *this;
+}
+
+PPTTextRulerInterpreter::~PPTTextRulerInterpreter()
+{
+ if ( ! ( --mpImplRuler->nRefCount ) )
+ delete mpImplRuler;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
+ PPTTextRulerInterpreter& rRuler, const DffRecordHeader& rExtParaHd ) :
+ pCharPropsATable ( NULL )
+{
+ UINT32 nMerk = rIn.Tell();
+
+ UINT32 nExtParaPos = ( rExtParaHd.nRecType == PPT_PST_ExtendedParagraphAtom ) ? rExtParaHd.nFilePos + 8 : 0;
+ String aString;
+ DffRecordHeader aTextHd;
+ rIn >> aTextHd;
+ UINT32 nMaxLen = aTextHd.nRecLen;
+ if ( nMaxLen > 0xFFFF )
+ nMaxLen = 0xFFFF;
+
+
+ if( aTextHd.nRecType == PPT_PST_TextCharsAtom )
+ {
+ sal_Int32 i;
+ sal_Unicode nChar,*pBuf = new sal_Unicode[ ( nMaxLen >> 1 ) + 1 ];
+ rIn.Read( pBuf, nMaxLen );
+ nMaxLen >>= 1;
+ pBuf[ nMaxLen ] = 0;
+ sal_Unicode* pPtr = pBuf;
+#ifdef __BIGENDIAN
+ sal_Unicode nTemp;
+ for ( i = 0; i < nMaxLen; i++ )
+ {
+ nTemp = *pPtr;
+ *pPtr++ = ( nTemp << 8 ) | ( nTemp >> 8 );
+ }
+ pPtr = pBuf;
+#endif
+
+ for ( i = 0; i < nMaxLen; pPtr++, i++ )
+ {
+ nChar = *pPtr;
+ if ( !nChar )
+ break;
+ if ( ( nChar & 0xff00 ) == 0xf000 ) // in this special case we got a symbol
+ aSpecMarkerList.Insert( (void*)( i | PPT_SPEC_SYMBOL ), LIST_APPEND );
+ else
+ {
+ if ( nChar == 0xd )
+ aSpecMarkerList.Insert( (void*)( i | PPT_SPEC_NEWLINE ), LIST_APPEND );
+#ifndef WNT
+ else if ( nChar >= 128 )
+ {
+ BOOL bNeedsStarBats;
+ sal_Unicode cReplace = PPTExportMapper( nChar, bNeedsStarBats );
+ if ( bNeedsStarBats )
+ aSpecMarkerList.Insert( (void*)( i | PPT_SPEC_USE_STARBATS | ( cReplace << 24 ) ), LIST_APPEND );
+ else if ( cReplace )
+ *pPtr = cReplace;
+ }
+#endif
+ }
+ }
+ if ( i )
+ aString = String( pBuf, i );
+// aString.EraseTrailingChars( 0 );
+ delete[] pBuf;
+
+/*
+ BYTE cLo, cHi, *pBuf = new BYTE[ nMaxLen + 1 ];
+ pBuf[ nMaxLen ] = 0;
+ rIn.Read( pBuf, nMaxLen );
+ const BYTE* pPtr = pBuf;
+
+ aString.AllocStrBuf( (UINT16)( nMaxLen >> 1 ) );
+ for ( UINT32 i = 0; i < nMaxLen >> 1; i ++ )
+ {
+ cLo = *pPtr++;
+ cHi = *pPtr++;
+ if ( cHi == 0xf0 ) // in this special case we got a symbol
+ aSpecMarkerList.Insert( (void*)( i | PPT_SPEC_SYMBOL ), LIST_APPEND );
+ else
+ {
+ UINT16 nUni = ( (UINT16)cHi << 8 ) | cLo;
+ if ( nUni == 0xd )
+ aSpecMarkerList.Insert( (void*)( i | PPT_SPEC_NEWLINE ), LIST_APPEND );
+ else if ( nUni >= 128 )
+ {
+#ifndef WNT
+ BOOL bNeedsStarBats;
+ unsigned char cReplace = PPTExportMapper( nUni, bNeedsStarBats );
+ if ( bNeedsStarBats )
+ aSpecMarkerList.Insert( (void*)( i | PPT_SPEC_USE_STARBATS | ( cReplace << 24 ) ), LIST_APPEND );
+ else
+ cLo = cReplace;
+ if ( !cLo )
+#endif
+ cLo = String::ConvertFromUnicode( nUni, rMan.eCharSetSystem );
+ if( !cLo )
+ cLo = ' ';
+ }
+ }
+ aString[ (UINT16)i ] = (char)cLo;
+ }
+ aString.EraseTrailingChars( 0 );
+ delete[] pBuf;
+*/
+ }
+ else
+ {
+ sal_Char cLo, *pBuf = new sal_Char[ nMaxLen + 1 ];
+ pBuf[ nMaxLen ] = 0;
+ rIn.Read( pBuf, nMaxLen );
+ const sal_Char* pPtr = pBuf;
+ while ( ( cLo = *pPtr ) )
+ {
+ if ( cLo == 0xd )
+ aSpecMarkerList.Insert( (void*)( pPtr - pBuf | PPT_SPEC_NEWLINE ), LIST_APPEND );
+ pPtr++;
+ }
+ xub_StrLen nLen = pPtr - pBuf;
+ if ( nLen )
+ aString = String( pBuf, nLen, RTL_TEXTENCODING_MS_1252 );
+ delete[] pBuf;
+ }
+ if ( aString.Len() )
+ {
+ UINT32 nParaCount, nMask;
+ UINT32 nCharCount, nCharAnzRead = 0;
+ INT32 nCharsToRead;
+ UINT16 i, j, nDummy16;
+ BOOL bTextPropAtom = FALSE;
+
+ UINT16 nStringLen = aString.Len();
+
+ DffRecordHeader aTextHd;
+
+ rTextHeader.SeekToContent( rIn );
+ if ( rMan.SeekToRec( rIn, PPT_PST_StyleTextPropAtom, rTextHeader.GetRecEndFilePos(), &aTextHd ) )
+ bTextPropAtom = TRUE;
+ while ( nCharAnzRead <= nStringLen )
+ {
+ PPTParaPropSet aParaPropSet;
+
+ ImplPPTParaPropSet& aSet = *aParaPropSet.pParaSet;
+
+ if ( bTextPropAtom )
+ {
+ rIn >> nCharCount
+ >> aParaPropSet.pParaSet->mnDepth; // Einruecktiefe
+
+ nCharCount--;
+
+ rIn >> nMask;
+ aSet.mnAttrSet = nMask & 0x1fdf1;
+ UINT16 nBulFlg = 0;
+ if ( nMask & 0xF )
+ {
+ rIn >> nBulFlg; // Bullet-HardAttr-Flags
+ aSet.mpArry[ PPT_ParaAttr_BulletOn ] = ( nBulFlg & 1 ) ? 1 : 0;
+ }
+ if ( nMask & 0x0080 )
+ rIn >> aSet.mpArry[ PPT_ParaAttr_BulletChar ];
+ if ( nMask & 0x0010 )
+ rIn >> aSet.mpArry[ PPT_ParaAttr_BulletFont ];
+ if ( nMask & 0x0040 )
+ {
+ rIn >> aSet.mpArry[ PPT_ParaAttr_BulletHeight ];
+ if ( ! ( ( nMask & ( 1 << PPT_ParaAttr_BuHardHeight ) )
+ && ( nBulFlg && ( 1 << PPT_ParaAttr_BuHardHeight ) ) ) )
+ aSet.mnAttrSet ^= 0x40;
+ }
+ if ( nMask & 0x0020 )
+ {
+ UINT32 nVal;
+ rIn >> nVal;
+ if ( ( nMask & ( 1 << PPT_ParaAttr_BuHardColor ) ) && ( nBulFlg && ( 1 << PPT_ParaAttr_BuHardColor ) ) )
+ {
+ if ( ! ( nVal & 0xff000000 ) )
+ nVal |= PPT_COLSCHEME_HINTERGRUND;
+ aSet.mnBulletColor = nVal;
+ }
+ else
+ aSet.mnAttrSet ^= 0x20;
+ }
+ nMask >>= 8;
+ if ( nMask & 0x0F )
+ {
+ if ( nMask & 8 )
+ { // AbsJust!
+ rIn >> nDummy16;
+ aSet.mpArry[ PPT_ParaAttr_Adjust ] = nDummy16 & 3;
+ }
+ if ( nMask & 4 )
+ rIn >> nDummy16;
+ if ( nMask & 2 )
+ rIn >> nDummy16;
+ if ( nMask & 1 )
+ rIn >> nDummy16;
+ }
+ nMask >>= 4;
+ if ( nMask & 1 )
+ rIn >> aSet.mpArry[ PPT_ParaAttr_LineFeed ];
+ if ( nMask & 2 )
+ rIn >> aSet.mpArry[ PPT_ParaAttr_UpperDist ];
+ if ( nMask & 4 )
+ rIn >> aSet.mpArry[ PPT_ParaAttr_LowerDist ];
+ if ( nMask & 8 )
+ rIn >> nDummy16;
+ if ( nMask & 16 )
+ rIn >> nDummy16;
+ nMask >>= 5;
+ nMask &= 0x3;
+ UINT32 nBitCount = 0;
+ for ( UINT16 i = 17; nMask; i++, nMask >>= 1 )
+ {
+ if ( nMask & 1 )
+ nBitCount++;
+ }
+ if ( nBitCount )
+ rIn.SeekRel( nBitCount << 1 );
+ if ( nExtParaPos ) // if set, get the new ppt2000 numrules
+ {
+ if ( nExtParaPos < rExtParaHd.GetRecEndFilePos() )
+ {
+ UINT32 nOldPos = rIn.Tell();
+ rIn.Seek( nExtParaPos );
+ rIn >> aSet.nBuFlags;
+ if ( aSet.nBuFlags & 0x800000 )
+ rIn >> aSet.nBuInstance;
+ if ( aSet.nBuFlags & 0x01000000 )
+ rIn >> aSet.nNumberingType;
+ if ( aSet.nBuFlags & 0x02000000 )
+ rIn >> aSet.nBuStart;
+ nExtParaPos = rIn.Tell() + 8;
+ rIn.Seek( nOldPos );
+ }
+ }
+ }
+ else
+ {
+ nCharCount = nStringLen;
+ if ( nExtParaPos ) // if set, get the new ppt2000 numrules
+ {
+ if ( nExtParaPos < rExtParaHd.GetRecEndFilePos() )
+ {
+ UINT32 nOldPos = rIn.Tell();
+ rIn.Seek( nExtParaPos );
+ rIn >> aSet.nBuFlags;
+ if ( aSet.nBuFlags & 0x800000 )
+ rIn >> aSet.nBuInstance;
+ if ( aSet.nBuFlags & 0x01000000 )
+ rIn >> aSet.nNumberingType;
+ if ( aSet.nBuFlags & 0x02000000 )
+ rIn >> aSet.nBuStart;
+ nExtParaPos = rIn.Tell() + 8;
+ rIn.Seek( nOldPos );
+ }
+ }
+ }
+
+ if ( rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) )
+ aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs;
+ if ( rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) )
+ aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs;
+ if ( rRuler.GetDefaultTab( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) )
+ aSet.mnAttrSet |= 1 << PPT_ParaAttr_DefaultTab;
+
+ if ( nStringLen - ( nCharAnzRead + nCharCount ) < 0 )
+ {
+ bTextPropAtom = FALSE;
+ DBG_ERROR( "SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the paragraph attributes" );
+ }
+ nParaCount = 1;
+ if ( nCharCount )
+ {
+ sal_Int32 nCount;
+ const sal_Unicode* pDat = aString.GetBuffer() + nCharAnzRead;
+ for ( nCount = 0; nCount < nCharCount; nCount++ )
+ {
+ if ( pDat[ nCount ] == 0xd )
+ nParaCount++;
+ }
+/*
+ const char *pDat = aString.GetStr() + nCharAnzRead;
+ const char *pF = pDat;
+ do
+ {
+ pF = (const char*)memchr( (const void*)pF, 0xd, ( pDat + nCharCount ) - pF );
+ if ( !pF++ )
+ break;
+ nParaCount++;
+ }
+ while ( pF );
+*/
+ }
+ while ( nParaCount-- )
+ aParaPropList.Insert( new PPTParaPropSet( aParaPropSet ), LIST_APPEND );
+
+ nCharAnzRead += nCharCount + 1;
+ }
+ UINT32 bEmptyParaPossible = TRUE;
+ pCharPropsATable = new UINT32[ aParaPropList.Count() ];
+ memset( pCharPropsATable, 0, sizeof( UINT32 ) * aParaPropList.Count() );
+ UINT32 nCurrentPara = nCharAnzRead = 0;
+
+ UINT32 nCurrentSpecMarker = (UINT32)aSpecMarkerList.First();
+ while ( nCharAnzRead < nStringLen )
+ {
+ PPTCharPropSet aCharPropSet;
+ if ( bTextPropAtom )
+ {
+ rIn >> nDummy16;
+ nCharCount = nDummy16;
+ rIn >> nDummy16;
+ nCharsToRead = nStringLen - ( nCharAnzRead + nCharCount );
+ if ( nCharsToRead < 0 )
+ {
+ nCharCount = nStringLen - nCharAnzRead;
+ if ( nCharsToRead < -1 )
+ {
+ bTextPropAtom = FALSE;
+ DBG_ERROR( "SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the character attributes" );
+ }
+ }
+ ImplPPTCharPropSet& aSet = *aCharPropSet.pCharSet;
+ // Zeichenattribute
+ rIn >> nMask;
+
+ if ( (UINT16)nMask )
+ {
+ aSet.mnAttrSet |= (UINT16)nMask;
+ rIn >> aSet.mnFlags;
+ }
+
+ // Die Sortierung der Char-Attribs ist etwas durcheinander...
+ static USHORT __READONLY_DATA aCharAttrTable[16] =
+ {
+ 16, 21, 22, 23, 17, 18, 19, 20,
+ 24, 25, 26, 27, 28, 29, 30, 31
+ };
+ for ( i = 0; i < 16; i++ )
+ {
+ // Reihenfolge ist bei einfachen Textobjekten normal...
+ j = aCharAttrTable[ i ];
+ if ( nMask & ( 1 << j ) )
+ {
+ switch ( j )
+ {
+ case PPT_CharAttr_Symbol :
+ {
+ rIn >> aSet.mnSymbolFont;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_Symbol;
+ }
+ break;
+ case PPT_CharAttr_Font :
+ {
+ rIn >> aSet.mnFont;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_Font;
+ }
+ break;
+ case PPT_CharAttr_FontHeight :
+ {
+ rIn >> aSet.mnFontHeight;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_FontHeight;
+ }
+ break;
+ case PPT_CharAttr_FontColor :
+ {
+ UINT32 nVal;
+ rIn >> nVal;
+ if ( !( nVal & 0xff000000 ) )
+ nVal = PPT_COLSCHEME_HINTERGRUND;
+ aSet.mnColor = nVal;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_FontColor;
+ }
+ break;
+ case PPT_CharAttr_Escapement :
+ {
+ rIn >> aSet.mnEscapement;
+ aSet.mnAttrSet |= 1 << PPT_CharAttr_Escapement;
+ }
+ break;
+ default :
+ rIn >> nDummy16;
+ }
+ }
+ }
+ }
+ else
+ nCharCount = nStringLen;
+
+ UINT32 nLen;
+ while( nCharCount )
+ {
+ aCharPropSet.mnOriginalTextPos = nCharAnzRead;
+ if ( nCurrentSpecMarker && ( ( nCurrentSpecMarker & 0xffff ) < ( nCharAnzRead + nCharCount ) ) )
+ {
+ if ( nCurrentSpecMarker & PPT_SPEC_NEWLINE )
+ {
+ nLen = ( nCurrentSpecMarker & 0xffff ) - nCharAnzRead;
+ if ( nLen )
+ aCharPropSet.maString = String( aString, (UINT16)nCharAnzRead, (UINT16)nLen );
+ else if ( bEmptyParaPossible )
+ aCharPropSet.maString = String();
+ if ( nLen || bEmptyParaPossible )
+ {
+ aCharPropList.Insert( new PPTCharPropSet( aCharPropSet ), LIST_APPEND );
+ pCharPropsATable[ nCurrentPara ]++;
+ }
+ nCurrentPara++;
+ nLen++;
+ nCharAnzRead += nLen;
+ nCharCount -= nLen;
+ bEmptyParaPossible = TRUE;
+ }
+ else if ( nCurrentSpecMarker & PPT_SPEC_SYMBOL )
+ {
+ if ( ( nCurrentSpecMarker & 0xffff ) != nCharAnzRead )
+ {
+ pCharPropsATable[ nCurrentPara ]++;
+ nLen = ( nCurrentSpecMarker & 0xffff ) - nCharAnzRead;
+ aCharPropSet.maString = String( aString, (UINT16)nCharAnzRead, (UINT16)nLen );
+ aCharPropList.Insert( new PPTCharPropSet( aCharPropSet ), LIST_APPEND );
+ nCharCount -= nLen;
+ nCharAnzRead += nLen;
+ }
+ pCharPropsATable[ nCurrentPara ]++;
+ PPTCharPropSet* pCPropSet = new PPTCharPropSet( aCharPropSet );
+
+ Font aFont;
+ UINT32 nMappedFontId;
+
+ pCPropSet->maString = rMan.PPTSubstitute( aCharPropSet.pCharSet->mnSymbolFont,
+ aString.GetChar( nCharAnzRead ), nMappedFontId, aFont, 0 );
+
+ pCPropSet->SetFont( nMappedFontId );
+ aCharPropList.Insert( pCPropSet, LIST_APPEND );
+ nCharCount--;
+ nCharAnzRead++;
+ bEmptyParaPossible = FALSE;
+ }
+#ifndef WNT
+ else if ( nCurrentSpecMarker & PPT_SPEC_USE_STARBATS )
+ {
+ if ( ( nCurrentSpecMarker & 0xffff ) != nCharAnzRead )
+ {
+ pCharPropsATable[ nCurrentPara ]++;
+ nLen = ( nCurrentSpecMarker & 0xffff ) - nCharAnzRead;
+ aCharPropSet.maString = String( aString, (UINT16)nCharAnzRead, (UINT16)nLen );
+ aCharPropList.Insert( new PPTCharPropSet( aCharPropSet ), LIST_APPEND );
+ nCharCount -= nLen;
+ nCharAnzRead += nLen;
+ }
+ pCharPropsATable[ nCurrentPara ]++;
+ PPTCharPropSet* pCPropSet = new PPTCharPropSet( aCharPropSet );
+ pCPropSet->SetFont( rMan.pFonts->Count() - 1 );
+ pCPropSet->maString = (char)( nCurrentSpecMarker >> 24 ); //aString[ (UINT16)nCharAnzRead ];
+ aCharPropList.Insert( pCPropSet, LIST_APPEND );
+ nCharCount--;
+ nCharAnzRead++;
+ bEmptyParaPossible = FALSE;
+ }
+#endif
+ nCurrentSpecMarker = (UINT32)aSpecMarkerList.Next();
+ }
+ else
+ {
+ aCharPropSet.maString = String( aString, (UINT16)nCharAnzRead, (UINT16)nCharCount );
+ aCharPropList.Insert( new PPTCharPropSet( aCharPropSet ), LIST_APPEND );
+ pCharPropsATable[ nCurrentPara ]++;
+ nCharAnzRead += nCharCount;
+ bEmptyParaPossible = FALSE;
+ break;
+ }
+ }
+ }
+ if ( ( nCurrentPara == aParaPropList.Count() - 1 ) && ( !pCharPropsATable[ nCurrentPara ] ) )
+ {
+ pCharPropsATable[ nCurrentPara ]++;
+ PPTCharPropSet* pCharPropSet = new PPTCharPropSet( *(PPTCharPropSet*)aCharPropList.GetObject( aCharPropList.Count() - 1 ) );
+ pCharPropSet->maString = String();
+ pCharPropSet->mnOriginalTextPos = nStringLen - 1;
+ aCharPropList.Insert( pCharPropSet, LIST_APPEND );
+ }
+ }
+ rIn.Seek( nMerk );
+}
+
+PPTStyleTextPropReader::~PPTStyleTextPropReader()
+{
+ void* pTmp;
+ for ( pTmp = aParaPropList.First(); pTmp; pTmp = aParaPropList.Next() )
+ delete (PPTParaPropSet*)pTmp;
+ for ( pTmp = aCharPropList.First(); pTmp; pTmp = aCharPropList.Next() )
+ delete (PPTCharPropSet*)pTmp;
+ delete pCharPropsATable;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+struct FieldEntry
+{
+ UINT32 nFieldType;
+ UINT32 nFieldStartPos;
+ UINT32 nFieldEndPos;
+ String aFieldUrl;
+
+ FieldEntry( UINT32 nType, UINT32 nStart, UINT32 nEnd )
+ {
+ nFieldType = nType;
+ nFieldStartPos = nStart;
+ nFieldEndPos = nEnd;
+ }
+ FieldEntry( FieldEntry& rFieldEntry )
+ {
+ nFieldType = rFieldEntry.nFieldType;
+ nFieldStartPos = rFieldEntry.nFieldStartPos;
+ nFieldEndPos = rFieldEntry.nFieldEndPos;
+ aFieldUrl = rFieldEntry.aFieldUrl;
+ }
+};
+
+
+PPTPortionObj::PPTPortionObj( PPTStyleSheet& rStyleSheet, UINT32 nInstance, UINT32 nDepth ) :
+ mrStyleSheet ( rStyleSheet ),
+ mnInstance ( nInstance ),
+ mnDepth ( ( nDepth > 4 ) ? 4 : nDepth )
+{
+}
+
+PPTPortionObj::PPTPortionObj( PPTCharPropSet& rCharPropSet, const PPTStyleSheet& rStyleSheet, UINT32 nInstance, UINT32 nDepth ) :
+ PPTCharPropSet ( rCharPropSet ),
+ mrStyleSheet ( rStyleSheet ),
+ mnInstance ( nInstance ),
+ mnDepth ( nDepth )
+{
+}
+
+PPTPortionObj::PPTPortionObj( PPTPortionObj& rPortionObj ) :
+ PPTCharPropSet ( rPortionObj ),
+ mrStyleSheet ( rPortionObj.mrStyleSheet ),
+ mnInstance ( rPortionObj.mnInstance ),
+ mnDepth ( rPortionObj.mnDepth )
+{
+}
+
+PPTPortionObj::~PPTPortionObj()
+{
+}
+
+BOOL PPTPortionObj::HasTabulator()
+{
+ BOOL bRetValue = FALSE;
+ sal_Int32 nCount;
+ const sal_Unicode* pPtr = maString.GetBuffer();
+ for ( nCount = 0; nCount < maString.Len(); nCount++ )
+ {
+ if ( pPtr[ nCount ] == 0x9 )
+ {
+ bRetValue = TRUE;
+ break;
+ }
+
+ }
+ return bRetValue;
+}
+
+BOOL PPTPortionObj::GetAttrib( UINT32 nAttr, UINT32& nRetValue, UINT32 nInstanceInSheet )
+{
+ UINT32 nMask = 1 << nAttr;
+ nRetValue = 0;
+
+ UINT32 bIsHardAttribute = ( ( pCharSet->mnAttrSet & nMask ) != 0 ) ? 1 : 0;
+
+ if ( bIsHardAttribute )
+ {
+ switch ( nAttr )
+ {
+ case PPT_CharAttr_Bold :
+ case PPT_CharAttr_Italic :
+ case PPT_CharAttr_Underline :
+ case PPT_CharAttr_Shadow :
+ case PPT_CharAttr_Strikeout :
+ case PPT_CharAttr_Embossed :
+ nRetValue = ( pCharSet->mnFlags & nMask ) ? 1 : 0;
+ break;
+ case PPT_CharAttr_Font :
+ nRetValue = pCharSet->mnFont;
+ break;
+ case PPT_CharAttr_FontHeight :
+ nRetValue = pCharSet->mnFontHeight;
+ break;
+ case PPT_CharAttr_FontColor :
+ nRetValue = pCharSet->mnColor;
+ break;
+ case PPT_CharAttr_Escapement :
+ nRetValue = pCharSet->mnEscapement;
+ break;
+ default :
+ DBG_ERROR( "SJ:PPTPortionObj::GetAttrib ( hard attribute does not exist )" );
+ }
+ }
+ else
+ {
+ const PPTCharLevel& rCharLevel = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ];
+ PPTCharLevel* pCharLevel = NULL;
+ if ( nInstanceInSheet == 0xffffffff )
+ bIsHardAttribute = 1;
+ else if ( nInstanceInSheet != mnInstance )
+ pCharLevel = &mrStyleSheet.mpCharSheet[ nInstanceInSheet ]->maCharLevel[ mnDepth ];
+ switch( nAttr )
+ {
+ case PPT_CharAttr_Bold :
+ case PPT_CharAttr_Italic :
+ case PPT_CharAttr_Underline :
+ case PPT_CharAttr_Shadow :
+ case PPT_CharAttr_Strikeout :
+ case PPT_CharAttr_Embossed :
+ {
+ nRetValue = ( rCharLevel.mnFlags & nMask ) ? 1 : 0;
+ if ( pCharLevel )
+ {
+ UINT32 nTmp = ( pCharLevel->mnFlags & nMask ) ? 1 : 0;
+ if ( nRetValue != nTmp )
+ bIsHardAttribute = 1;
+ }
+ }
+ break;
+ case PPT_CharAttr_Font :
+ {
+ nRetValue = rCharLevel.mnFont;
+ if ( pCharLevel && ( nRetValue != pCharLevel->mnFont ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_CharAttr_FontHeight :
+ {
+ nRetValue = rCharLevel.mnFontHeight;
+ if ( pCharLevel && ( nRetValue != pCharLevel->mnFontHeight ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_CharAttr_FontColor :
+ {
+ nRetValue = rCharLevel.mnFontColor;
+ if ( pCharLevel && ( nRetValue != pCharLevel->mnFontColor ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_CharAttr_Escapement :
+ {
+ nRetValue = rCharLevel.mnEscapement;
+ if ( pCharLevel && ( nRetValue != pCharLevel->mnEscapement ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ default :
+ DBG_ERROR( "SJ:PPTPortionObj::GetAttrib ( attribute does not exist )" );
+ }
+ }
+ return (BOOL)bIsHardAttribute;
+}
+
+void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, UINT32 nInstanceInSheet )
+{
+ UINT32 nVal;
+
+ if ( GetAttrib( PPT_CharAttr_Bold, nVal, nInstanceInSheet ) )
+ rSet.Put( SvxWeightItem( nVal != 0 ? WEIGHT_BOLD : WEIGHT_NORMAL ) );
+
+ if ( GetAttrib( PPT_CharAttr_Italic, nVal, nInstanceInSheet ) )
+ rSet.Put( SvxPostureItem( nVal != 0 ? ITALIC_NORMAL : ITALIC_NONE ) );
+
+ if ( GetAttrib( PPT_CharAttr_Underline, nVal, nInstanceInSheet ) )
+ rSet.Put( SvxUnderlineItem( nVal != 0 ? UNDERLINE_SINGLE : UNDERLINE_NONE ) );
+
+ if ( GetAttrib( PPT_CharAttr_Shadow, nVal, nInstanceInSheet ) )
+ rSet.Put( SvxShadowedItem( nVal != 0 ) );
+
+ if ( GetAttrib( PPT_CharAttr_Strikeout, nVal, nInstanceInSheet ) )
+ rSet.Put( SvxCrossedOutItem( nVal != 0 ? STRIKEOUT_SINGLE : STRIKEOUT_NONE ) );
+
+// GetAttrib( PPT_CharAttr_Embossed, nVal, nInstanceInSheet ); // Embossed koennen wir nicht
+// rSet.Put( SvxShadowedItem( nVal != 0 ) );
+
+ if ( GetAttrib( PPT_CharAttr_Font, nVal, nInstanceInSheet ) )
+ {
+ String aFontName;
+ if ( rManager.GetFont( nVal, aFontName ) )
+ {
+ CharSet eCharSet = rManager.eCharSetSystem;
+ PptFontCollection& rFontCollection = *rManager.pFonts;
+ if ( nVal < rFontCollection.Count() )
+ {
+ CharSet eFontCharSet = rFontCollection[ (USHORT)nVal ]->eCharSet;
+ if ( eFontCharSet != gsl_getSystemTextEncoding() )
+ eCharSet = eFontCharSet;
+ }
+ rSet.Put( SvxFontItem( FAMILY_DONTKNOW, aFontName, String(), PITCH_DONTKNOW, eCharSet ) );
+ }
+ }
+
+ if ( GetAttrib( PPT_CharAttr_FontHeight, nVal, nInstanceInSheet ) ) // Schriftgrad in Point
+ rSet.Put( SvxFontHeightItem( rManager.ScalePoint( nVal ) ) );
+
+ if ( GetAttrib( PPT_CharAttr_FontColor, nVal, nInstanceInSheet ) ) // Textfarbe (4Byte-Arg)
+ {
+ Color aCol( rManager.MSO_CLR_ToColor( nVal ) );
+ rSet.Put( SvxColorItem( aCol ) );
+ if ( nInstanceInSheet == 0xffffffff )
+ mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet = aCol;
+ }
+ else if ( nVal & 0x0f000000 ) // this is not a hard attribute, but maybe the page has a different colerscheme,
+ { // so that in this case we must use a hard color attribute
+ Color aCol( rManager.MSO_CLR_ToColor( nVal ) );
+ Color& aColorInSheet = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet;
+ if ( aColorInSheet != aCol )
+ rSet.Put( SvxColorItem( aCol ) );
+ }
+
+ if ( GetAttrib( PPT_CharAttr_Escapement, nVal, nInstanceInSheet ) ) // Hoch/Tiefstellung in %
+ {
+ SvxEscapementItem aItem;
+ aItem.GetEsc() = (short)nVal;
+ rSet.Put( aItem );
+ }
+}
+
+SvxFieldItem* PPTPortionObj::GetTextField()
+{
+ if ( mpFieldItem )
+ return new SvxFieldItem( *mpFieldItem );
+ return NULL;
+}
+
+// -----------------------------------------------------------------------
+
+PPTParagraphObj::PPTParagraphObj( const PPTStyleSheet& rStyleSheet, UINT32 nInstance, UINT16 nDepth ) :
+ mrStyleSheet ( rStyleSheet ),
+ mnInstance ( nInstance ),
+ mnPortionCount ( 0 ),
+ mpPortionList ( NULL ),
+ mbTab ( TRUE ) // style sheets always have to get the right tabulator setting
+{
+ if ( nDepth > 4 )
+ nDepth = 4;
+ pParaSet->mnDepth = nDepth;
+}
+
+PPTParagraphObj::PPTParagraphObj( PPTStyleTextPropReader& rPropReader, const PPTStyleSheet& rStyleSheet,
+ UINT32 nInstance, PPTTextRulerInterpreter& rRuler ) :
+ PPTParaPropSet ( *( (PPTParaPropSet*)rPropReader.aParaPropList.GetCurObject() ) ),
+ PPTTextRulerInterpreter ( rRuler ),
+ mrStyleSheet ( rStyleSheet ),
+ mnInstance ( nInstance ),
+ mbTab ( FALSE ),
+ mnCurrentObject ( 0 ),
+ mnPortionCount ( rPropReader.pCharPropsATable[ rPropReader.aParaPropList.GetCurPos() ] ),
+ mpPortionList ( NULL )
+{
+ if ( mnPortionCount )
+ {
+ mpPortionList = new PPTPortionObj*[ mnPortionCount ];
+ for ( UINT32 i = 0; i < mnPortionCount; i++ )
+ {
+ PPTCharPropSet* pCharPropSet = (PPTCharPropSet*)rPropReader.aCharPropList.GetCurObject();
+ if ( pCharPropSet )
+ {
+ mpPortionList[ i ] = new PPTPortionObj( *pCharPropSet, rStyleSheet, nInstance, pParaSet->mnDepth );
+ if ( !mbTab )
+ mbTab = mpPortionList[ i ]->HasTabulator();
+ }
+ else
+ {
+ DBG_ERROR( "SJ:PPTParagraphObj::It seems that there are missing some textportions" );
+ mpPortionList[ i ] = NULL;
+ }
+ rPropReader.aCharPropList.Next();
+ }
+ }
+}
+
+PPTParagraphObj::~PPTParagraphObj()
+{
+ ImplClear();
+}
+
+void PPTParagraphObj::AppendPortion( PPTPortionObj& rPPTPortion )
+{
+ UINT32 i;
+ PPTPortionObj** mpOldPortionList = mpPortionList;
+ mpPortionList = new PPTPortionObj*[ ++mnPortionCount ];
+ for ( i = 0; i < mnPortionCount - 1; i++ )
+ mpPortionList[ i ] = mpOldPortionList[ i ];
+ delete mpOldPortionList;
+ mpPortionList[ mnPortionCount - 1 ] = new PPTPortionObj( rPPTPortion );
+ if ( !mbTab )
+ mbTab = mpPortionList[ mnPortionCount - 1 ]->HasTabulator();
+}
+
+BOOL PPTParagraphObj::GetAttrib( UINT32 nAttr, UINT32& nRetValue, UINT32 nInstanceInSheet )
+{
+ UINT32 nMask = 1 << nAttr;
+ nRetValue = 0;
+
+ if ( nAttr > 17 )
+ {
+ DBG_ERROR( "SJ:PPTParagraphObj::GetAttrib - attribute does not exist" );
+ return FALSE;
+ }
+
+ UINT32 bIsHardAttribute = ( ( pParaSet->mnAttrSet & nMask ) != 0 ) ? 1 : 0;
+
+ if ( bIsHardAttribute )
+ {
+ if ( nAttr == PPT_ParaAttr_BulletColor )
+ {
+ nRetValue = pParaSet->mnBulletColor;
+ if ( nRetValue == 0x8000000 )
+ {
+ nRetValue = PPT_COLSCHEME_TEXT_UND_ZEILEN;
+ if ( ( nInstanceInSheet != 0xffffffff ) && mnPortionCount )
+ {
+ PPTPortionObj* pPortion = mpPortionList[ 0 ];
+ if ( pPortion )
+ {
+ if ( pPortion->pCharSet->mnAttrSet & PPT_CharAttr_FontColor )
+ nRetValue = pPortion->pCharSet->mnColor;
+ else
+ nRetValue = mrStyleSheet.mpCharSheet[ nInstanceInSheet ]->maCharLevel[ pParaSet->mnDepth ].mnFontColor;
+ }
+ }
+ }
+ }
+ else if ( nAttr == PPT_ParaAttr_BulletHeight )
+ {
+ nRetValue = pParaSet->mpArry[ PPT_ParaAttr_BulletHeight ];
+ if ( mpPortionList )
+ {
+ PPTPortionObj* pPortion = mpPortionList[ 0 ];
+ if ( pPortion )
+ {
+ if ( pPortion->pCharSet->mnAttrSet & ( 1 << PPT_CharAttr_FontHeight ) )
+ {
+ nRetValue *= pPortion->pCharSet->mnFontHeight;
+ nRetValue /= mrStyleSheet.mpCharSheet[ nInstanceInSheet ]->maCharLevel[ pParaSet->mnDepth ].mnFontHeight;
+ }
+ }
+ }
+ }
+ else
+ nRetValue = pParaSet->mpArry[ nAttr ];
+ }
+ else
+ {
+ const PPTParaLevel& rParaLevel = mrStyleSheet.mpParaSheet[ mnInstance ]->maParaLevel[ pParaSet->mnDepth ];
+
+ PPTParaLevel* pParaLevel = NULL;
+ if ( nInstanceInSheet == 0xffffffff )
+ bIsHardAttribute = 1;
+ else if ( nInstanceInSheet != mnInstance )
+ pParaLevel = &mrStyleSheet.mpParaSheet[ nInstanceInSheet ]->maParaLevel[ pParaSet->mnDepth ];
+ switch ( nAttr )
+ {
+ case PPT_ParaAttr_BulletOn :
+ {
+ nRetValue = ( rParaLevel.mbIsBullet ) ? 1 : 0;
+ if ( pParaLevel )
+ {
+ UINT32 nTmp = ( pParaLevel->mbIsBullet ) ? 1 : 0;
+ if ( nRetValue != nTmp )
+ bIsHardAttribute = 1;
+ }
+ }
+ break;
+ case PPT_ParaAttr_BuHardFont :
+ case PPT_ParaAttr_BuHardColor :
+ case PPT_ParaAttr_BuHardHeight :
+ DBG_ERROR( "SJ:PPTParagraphObj::GetAttrib - this attribute does not make sense" );
+ break;
+ case PPT_ParaAttr_BulletChar :
+ {
+ nRetValue = rParaLevel.mnBulletChar;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnBulletChar ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_ParaAttr_BulletFont :
+ {
+ nRetValue = rParaLevel.mnBulletFont;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnBulletFont ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_ParaAttr_BulletHeight :
+ {
+ nRetValue = rParaLevel.mnBulletHeight;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnBulletHeight ) )
+ bIsHardAttribute = 1;
+ if ( mpPortionList )
+ {
+ PPTPortionObj* pPortion = mpPortionList[ 0 ];
+ if ( pPortion )
+ {
+ if ( pPortion->pCharSet->mnAttrSet & ( 1 << PPT_CharAttr_FontHeight ) )
+ {
+ nRetValue *= pPortion->pCharSet->mnFontHeight;
+ nRetValue /= mrStyleSheet.mpCharSheet[ nInstanceInSheet ]->maCharLevel[ pParaSet->mnDepth ].mnFontHeight;
+ bIsHardAttribute = 1;
+ }
+ }
+ }
+ }
+ break;
+ case PPT_ParaAttr_BulletColor :
+ {
+ nRetValue = rParaLevel.mnBulletColor;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnBulletColor ) )
+ bIsHardAttribute = 1;
+ if ( nRetValue == 0x8000000 )
+ {
+ if ( mnPortionCount )
+ {
+ PPTPortionObj* pPortion = mpPortionList[ 0 ];
+ if ( pPortion )
+ bIsHardAttribute = pPortion->GetAttrib( PPT_CharAttr_FontColor, nRetValue, nInstanceInSheet );
+ }
+ else
+ {
+ nRetValue = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ pParaSet->mnDepth ].mnFontColor;
+ bIsHardAttribute = 1;
+ }
+ }
+ }
+ break;
+ case PPT_ParaAttr_Adjust :
+ {
+ nRetValue = rParaLevel.mnAdjust;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnAdjust ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_ParaAttr_LineFeed :
+ {
+ nRetValue = rParaLevel.mnLineFeed;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnLineFeed ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_ParaAttr_UpperDist :
+ {
+ nRetValue = rParaLevel.mnUpperDist;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnUpperDist ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_ParaAttr_LowerDist :
+ {
+ nRetValue = rParaLevel.mnLowerDist;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnLowerDist ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_ParaAttr_TextOfs :
+ {
+ nRetValue = rParaLevel.mnTextOfs;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnTextOfs ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_ParaAttr_BulletOfs :
+ {
+ nRetValue = rParaLevel.mnBulletOfs;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnBulletOfs ) )
+ bIsHardAttribute = 1;
+ }
+ break;
+ case PPT_ParaAttr_DefaultTab :
+ {
+ nRetValue = rParaLevel.mnDefaultTab;
+ if ( pParaLevel && ( nRetValue != pParaLevel->mnBulletOfs ) )
+ bIsHardAttribute = 1;
+ }
+ }
+ }
+ return (BOOL)bIsHardAttribute;
+}
+
+void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, UINT32 nInstanceInSheet, const PPTParagraphObj* pPrev )
+{
+ INT16 nVal2;
+ UINT32 nVal, nUpperDist, nLowerDist;
+ UINT32 nInstance = mnInstance;
+
+ if ( ( nInstanceInSheet != 0xffffffff ) || ( GetLevel() <= 1 ) )
+ {
+ SvxNumBulletItem* pNumBulletItem = mrStyleSheet.mpNumBulletItem[ nInstance ];
+ if ( pNumBulletItem )
+ {
+ SvxNumberFormat aNumberFormat( SVX_NUM_NUMBER_NONE );
+ if ( GetNumberFormat( rManager, aNumberFormat, this, nInstanceInSheet ) )
+ {
+ SvxNumBulletItem aNewNumBulletItem( *pNumBulletItem );
+ SvxNumRule* pRule = aNewNumBulletItem.GetNumRule();
+ if ( pRule )
+ {
+ pRule->SetLevel( GetLevel(), aNumberFormat );
+ if ( nInstanceInSheet == 0xffffffff )
+ {
+ sal_uInt16 i, n;
+ for ( i = 1; i < pRule->GetLevelCount(); i++ )
+ {
+ n = ( i > 4 ) ? 4 : i;
+
+ sal_uInt32 nInst = nInstance;
+ switch( nInst )
+ {
+ case TSS_TYPE_BODY :
+ case TSS_TYPE_HALFBODY :
+ case TSS_TYPE_QUARTERBODY :
+ {
+ if ( !n )
+ nInst = 0;
+ else
+ n -= 1;
+ }
+ break;
+ }
+ SvxNumberFormat aNumberFormat( pRule->GetLevel( i ) );
+ const PPTParaLevel& rParaLevel = mrStyleSheet.mpParaSheet[ nInst ]->maParaLevel[ n ];
+ const PPTCharLevel& rCharLevel = mrStyleSheet.mpCharSheet[ nInst ]->maCharLevel[ n ];
+ UINT32 nColor = ( rParaLevel.mnBulletColor == 0x8000000 )
+ ? rCharLevel.mnFontColor
+ : rParaLevel.mnBulletColor;
+ aNumberFormat.SetBulletColor( rManager.MSO_CLR_ToColor( nColor ) );
+ pRule->SetLevel( i, aNumberFormat );
+ }
+ }
+ rSet.Put( aNewNumBulletItem );
+ }
+ }
+ }
+ }
+ UINT32 nIsBullet;
+ GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet, nInstanceInSheet );
+ rSet.Put( SfxUInt16Item( EE_PARA_BULLETSTATE, nIsBullet == 0 ? 0 : 1 ) );
+
+ if ( GetAttrib( PPT_ParaAttr_TextOfs, nVal, nInstanceInSheet ) )
+ {
+ SvxLRSpaceItem aLRSpaceItem( ITEMID_LRSPACE );
+ aLRSpaceItem.SetLeft( (UINT16)(((UINT32) nVal * 2540 ) / ( 72 * 8 ) ) );
+ rSet.Put( aLRSpaceItem );
+ }
+
+ if ( GetAttrib( PPT_ParaAttr_Adjust, nVal, nInstanceInSheet ) )
+ {
+ if ( nVal <= 3 )
+ { // Absatzausrichtung
+ static SvxAdjust __READONLY_DATA aAdj[ 4 ] = { SVX_ADJUST_LEFT, SVX_ADJUST_CENTER, SVX_ADJUST_RIGHT, SVX_ADJUST_BLOCK };
+ rSet.Put( SvxAdjustItem( aAdj[ nVal ] ) );
+ }
+ }
+
+ // LineSpacing
+ PPTPortionObj* pPortion = First();
+ BOOL bIsHardAttribute = GetAttrib( PPT_ParaAttr_LineFeed, nVal, nInstanceInSheet );
+ nVal2 = (INT16)nVal;
+ if ( ( pPrev == NULL ) && bIsHardAttribute && pPortion && ( nVal2 > 100 ) )
+ { // first paragraph: each linespacing will be converted to 'at least' to take the spacing above the line
+ UINT32 nFontHeight;
+ pPortion->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nInstanceInSheet );
+ nVal2 = -(INT16)( ( nFontHeight * nVal * 8 ) / 100 );
+ bIsHardAttribute = TRUE;
+ }
+ if ( bIsHardAttribute )
+ {
+ if ( pPortion && ( nVal2 > 200 ) )
+ {
+ UINT32 nFontHeight;
+ pPortion->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nInstanceInSheet );
+ nVal2 = - ( ( nFontHeight * nVal * 8 ) / 100 );
+ }
+ SvxLineSpacingItem aItem( 200, EE_PARA_SBL );
+ if ( nVal2 <= 0 )
+ aItem.SetLineHeight( (UINT16)( rManager.ScalePoint( -nVal2 ) / 8 ) );
+ else
+ {
+ aItem.SetPropLineSpace( (BYTE)nVal2 );
+ aItem.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+ }
+ rSet.Put( aItem );
+ }
+
+ // Paragraph Spacing
+ UINT32 nFontHeight = 0;
+ bIsHardAttribute = ( (UINT32)GetAttrib( PPT_ParaAttr_UpperDist, nUpperDist, nInstanceInSheet ) +
+ (UINT32)GetAttrib( PPT_ParaAttr_LowerDist, nLowerDist, nInstanceInSheet ) ) != 0;
+ if ( ( nUpperDist > 0 ) || ( nLowerDist > 0 ) )
+ {
+ if ( mnPortionCount )
+ {
+ mpPortionList[ mnPortionCount - 1 ]->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nInstanceInSheet );
+ if ( ((INT16)nUpperDist) > 0 )
+ nUpperDist = - ( ( nFontHeight * nUpperDist * 96 ) / 1000 );
+ if ( ((INT16)nLowerDist) > 0 )
+ nLowerDist = - ( ( nFontHeight * nLowerDist * 96 ) / 1000 );
+ }
+ bIsHardAttribute = TRUE;
+ }
+ if ( bIsHardAttribute )
+ {
+ SvxULSpaceItem aULSpaceItem( ITEMID_ULSPACE );
+ nVal2 = (INT16)nUpperDist;
+ if ( nVal2 <= 0 )
+ aULSpaceItem.SetUpper( (UINT16)(((UINT32) - nVal2 * 2540 ) / ( 72 * 8 ) ) );
+ else
+ {
+ aULSpaceItem.SetUpperValue( 0 );
+ aULSpaceItem.SetPropUpper( (UINT16)nUpperDist == 100 ? 101 : (UINT16)nUpperDist );
+ }
+ nVal2 = (INT16)nLowerDist;
+ if ( nVal2 <= 0 )
+ aULSpaceItem.SetLower( (UINT16)(((UINT32) - nVal2 * 2540 ) / ( 72 * 8 ) ) );
+ else
+ {
+ aULSpaceItem.SetLowerValue( 0 );
+ aULSpaceItem.SetPropLower( (UINT16)nLowerDist == 100 ? 101 : (UINT16)nLowerDist );
+ }
+ rSet.Put( aULSpaceItem );
+ }
+
+ if ( mbTab ) // makes it sense to apply tabsettings
+ {
+ UINT32 i, nDefaultTab, nTab, nTextOfs = 0;
+ UINT32 nLatestManTab = 0;
+ GetAttrib( PPT_ParaAttr_TextOfs, nTextOfs, nInstanceInSheet );
+ GetAttrib( PPT_ParaAttr_BulletOfs, nTab, nInstanceInSheet );
+ GetAttrib( PPT_ParaAttr_BulletOn, i, nInstanceInSheet );
+ GetAttrib( PPT_ParaAttr_DefaultTab, nDefaultTab, nInstanceInSheet );
+ SvxTabStopItem aTabItem( 0, 0 );
+ if ( GetTabCount() )
+ {
+ for ( i = 0; i < GetTabCount(); i++ )
+ {
+ nTab = GetTabByIndex( (UINT16)i );
+ if ( nTab > nTextOfs )
+ aTabItem.Insert( SvxTabStop( (UINT16)( ( ( nTab - nTextOfs ) * 2540 ) / 576 ) ) );
+ }
+ nLatestManTab = nTab;
+ }
+ if ( nDefaultTab )
+ {
+ nTab = ( nTextOfs > nLatestManTab ) ? nTextOfs : nLatestManTab;
+ nTab /= nDefaultTab;
+ nTab = nDefaultTab * ( 1 + nTab );
+ for ( i = 0; ( i < 20 ) && ( nTab < 0x1b00 ); i++ )
+ {
+ aTabItem.Insert( SvxTabStop( (UINT16)( ( ( nTab - nTextOfs ) * 2540 ) / 576 ) ) );
+ nTab += nDefaultTab;
+ }
+ }
+ if ( nIsBullet == 0 )
+ {
+ nTab = GetAttrib( PPT_ParaAttr_BulletOfs, nTab, nInstanceInSheet );
+ if ( nTab )
+ aTabItem.Insert( nTab );
+ }
+ rSet.Put( aTabItem );
+ }
+}
+
+UINT16 PPTParagraphObj::GetLevel()
+{
+ UINT16 nRetValue = pParaSet->mnDepth;
+ switch ( mnInstance )
+ {
+ case TSS_TYPE_BODY :
+ case TSS_TYPE_HALFBODY :
+ case TSS_TYPE_QUARTERBODY :
+ nRetValue++;
+ }
+ return nRetValue;
+}
+
+UINT32 PPTParagraphObj::GetTextSize()
+{
+ UINT32 nCount, nRetValue = 0;
+ for ( UINT32 i = 0; i < mnPortionCount; i++ )
+ {
+ PPTPortionObj* pPortionObj = mpPortionList[ i ];
+ nCount = pPortionObj->Count();
+ if ( ( !nCount ) && pPortionObj->mpFieldItem )
+ nCount++;
+ nRetValue += nCount;
+ }
+ return nRetValue;
+}
+
+PPTPortionObj* PPTParagraphObj::First()
+{
+ mnCurrentObject = 0;
+ if ( !mnPortionCount )
+ return NULL;
+ return mpPortionList[ 0 ];
+}
+
+PPTPortionObj* PPTParagraphObj::Next()
+{
+ UINT32 i = mnCurrentObject + 1;
+ if ( i >= mnPortionCount )
+ return NULL;
+ mnCurrentObject++;
+ return mpPortionList[ i ];
+}
+
+void PPTParagraphObj::ImplClear()
+{
+ for ( void* pPtr = First(); pPtr; pPtr = Next() )
+ delete (PPTPortionObj*)pPtr;
+ delete mpPortionList;
+}
+
+PPTFieldEntry::~PPTFieldEntry()
+{
+ delete pField1;
+ delete pField2;
+ delete pString;
+};
+
+void PPTFieldEntry::SetDateTime( UINT32 nVal )
+{
+ SvxDateFormat eDateFormat( SVXDATEFORMAT_APPDEFAULT );
+ SvxTimeFormat eTimeFormat( SVXTIMEFORMAT_APPDEFAULT );
+ // ID auswerten
+ switch( nVal )
+ {
+ case 0:
+ case 6:
+ eDateFormat = SVXDATEFORMAT_A;
+ break;
+ case 1:
+ eDateFormat = SVXDATEFORMAT_F;
+ break;
+ case 2:
+ case 3:
+ eDateFormat = SVXDATEFORMAT_D;
+ break;
+ case 4:
+ case 5:
+ eDateFormat = SVXDATEFORMAT_C;
+ break;
+ case 7:
+ eDateFormat = SVXDATEFORMAT_A;
+ case 9:
+ eTimeFormat = SVXTIMEFORMAT_24_HM;
+ break;
+ case 8:
+ eDateFormat = SVXDATEFORMAT_A;
+ case 11:
+ eTimeFormat = SVXTIMEFORMAT_12_HM;
+ break;
+ case 10:
+ eTimeFormat = SVXTIMEFORMAT_24_HMS;
+ break;
+ case 12:
+ eTimeFormat = SVXTIMEFORMAT_12_HMS;
+ break;
+ }
+ if ( eDateFormat != SVXDATEFORMAT_APPDEFAULT )
+ pField1 = new SvxFieldItem( SvxDateField( Date(), SVXDATETYPE_VAR, eDateFormat ) );
+ if ( eTimeFormat != SVXTIMEFORMAT_APPDEFAULT )
+ {
+ SvxFieldItem* pFieldItem = new SvxFieldItem( SvxExtTimeField( Time(), SVXTIMETYPE_VAR, eTimeFormat ) );
+ if ( pField1 )
+ pField2 = pFieldItem;
+ else
+ pField1 = pFieldItem;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport, PptSlidePersistEntry& rPersistEntry, DffObjData* pObjData ) :
+ mpImplTextObj ( new ImplPPTTextObj )
+{
+ mpImplTextObj->mnRefCount = 1;
+ mpImplTextObj->mnShapeId = 0;
+ mpImplTextObj->mnShapeMaster = 0;
+ mpImplTextObj->mpPlaceHolderAtom = NULL;
+ mpImplTextObj->mnMappedInstance = mpImplTextObj->mnInstance = 4;
+ mpImplTextObj->mnCurrentObject = 0;
+ mpImplTextObj->mnParagraphCount = 0;
+ mpImplTextObj->mpParagraphList = NULL;
+ mpImplTextObj->meShapeType = ( pObjData && pObjData->bShapeType ) ? pObjData->eShapeType : mso_sptMin;
+
+ DffRecordHeader aExtParaHd;
+ aExtParaHd.nRecType = 0; // set empty
+
+ UINT32 bStatus = TRUE;
+
+ DffRecordHeader aShapeContainerHd;
+ rIn >> aShapeContainerHd;
+
+ if ( ( pObjData == NULL ) || ( pObjData->bShapeType ) )
+ {
+ if ( pObjData )
+ {
+ mpImplTextObj->mnShapeId = pObjData->nShapeId;
+ if ( pObjData->nSpFlags & SP_FHAVEMASTER )
+ mpImplTextObj->mnShapeMaster = rSdrPowerPointImport.GetPropertyValue( DFF_Prop_hspMaster, 0 );
+ }
+ ////////////////
+ // ClientData //
+ ////////////////
+ if ( rSdrPowerPointImport.maShapeRecords.SeekToContent( rIn, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
+ {
+ UINT32 nOldPos = rIn.Tell();
+ DffRecordHeader& aClientDataContainerHd = *rSdrPowerPointImport.maShapeRecords.Current();
+ DffRecordHeader aPlaceHolderAtomHd;
+ if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_OEPlaceholderAtom, aClientDataContainerHd.GetRecEndFilePos(), &aPlaceHolderAtomHd ) )
+ {
+ mpImplTextObj->mpPlaceHolderAtom = new PptOEPlaceholderAtom;
+ rIn >> *( mpImplTextObj->mpPlaceHolderAtom );
+ }
+ rIn.Seek( nOldPos );
+ DffRecordHeader aProgTagHd;
+ if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_ProgTags, aClientDataContainerHd.GetRecEndFilePos(), &aProgTagHd )
+ && rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_ProgBinaryTag, aProgTagHd.GetRecEndFilePos(), &aProgTagHd )
+ && rSdrPowerPointImport.pExtParaProv->SeekToContent( rIn, aProgTagHd, aProgTagHd ) )
+ {
+ rIn >> aExtParaHd;
+ }
+ }
+
+ ///////////////////
+ // ClientTextBox //
+ ///////////////////
+ if ( rSdrPowerPointImport.maShapeRecords.SeekToContent( rIn, DFF_msofbtClientTextbox, SEEK_FROM_CURRENT_AND_RESTART ) )
+ {
+ DffRecordHeader aClientTextBoxHd( *rSdrPowerPointImport.maShapeRecords.Current() );
+ UINT32 nTextRulerAtomOfs = 0; // case of zero -> this atom may be found in aClientDataContainerHd;
+ // case of -1 -> ther is no atom of this kind
+ // else -> this is the fileofs where we can get it
+
+ //////////////////////////////////////
+ // checkout if this is a referenced //
+ // textobj, if so the we will patch //
+ // the ClientTextBoxHd for a //
+ // equivalent one //
+ //////////////////////////////////////
+ DffRecordHeader aTextHd;
+ if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_OutlineTextRefAtom, aClientTextBoxHd.GetRecEndFilePos(), &aTextHd ) )
+ {
+ UINT32 nRefNum;
+ rIn >> nRefNum;
+
+ if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_TextRulerAtom, aClientTextBoxHd.GetRecEndFilePos() ) )
+ nTextRulerAtomOfs = rIn.Tell();
+ else
+ nTextRulerAtomOfs = 0xffffffff;
+
+ UINT32 nInstance = 0;
+ switch( rSdrPowerPointImport.eAktPageKind )
+ {
+ case PPT_NOTEPAGE :
+ nInstance++;
+ case PPT_MASTERPAGE :
+ nInstance++;
+ case PPT_SLIDEPAGE :
+ break;
+ default :
+ bStatus = FALSE;
+ }
+ if ( bStatus )
+ {
+ DffRecordManager& rDocRecMan = rSdrPowerPointImport.aDocRecManager;
+ DffRecordHeader* pHd;
+ for ( pHd = rDocRecMan.First(); pHd; pHd = rDocRecMan.Next() )
+ {
+ if ( ( pHd->nRecType == PPT_PST_SlideListWithText ) && ( pHd->nRecInstance == nInstance ) )
+ break;
+ }
+ if ( !pHd )
+ bStatus = FALSE;
+
+ UINT32 nSlideId = rSdrPowerPointImport.GetAktPageId();
+ if ( !nSlideId )
+ bStatus = FALSE;
+ else
+ {
+ if ( !aExtParaHd.nRecType )
+ {
+ UINT32 nOldPos = rIn.Tell();
+ // try to locate the referenced ExtendedParaHd
+ DffRecordHeader* pHd = rSdrPowerPointImport.pExtParaProv->
+ aExtendedPresRules.GetRecordHeader( PPT_PST_ExtendedParagraphHeaderAtom,
+ SEEK_FROM_CURRENT_AND_RESTART );
+ DffRecordHeader aPresRuleHd;
+ DffRecordHeader* pFirst = pHd;
+
+ UINT32 nTmpSlideId, nTmpRef;
+ while ( pHd )
+ {
+ pHd->SeekToContent( rIn );
+ rIn >> nTmpSlideId
+ >> nTmpRef; // this seems to be the instance
+
+ if ( ( nTmpSlideId == nSlideId ) && ( pHd->nRecInstance == nRefNum ) )
+ {
+ pHd->SeekToEndOfRecord( rIn );
+ rIn >> aPresRuleHd;
+ if ( aPresRuleHd.nRecType == PPT_PST_ExtendedParagraphAtom )
+ {
+ aExtParaHd = aPresRuleHd;
+ break;
+ }
+ }
+ pHd = rSdrPowerPointImport.pExtParaProv->
+ aExtendedPresRules.GetRecordHeader( PPT_PST_ExtendedParagraphHeaderAtom,
+ SEEK_FROM_CURRENT_AND_RESTART );
+ if ( pHd == pFirst )
+ break;
+ }
+ rIn.Seek( nOldPos );
+ }
+ // now pHd points to the right SlideListWithText Container
+ PptSlidePersistAtom aSlidePersistAtom;
+ pHd->SeekToContent( rIn );
+ while ( rIn.Tell() < pHd->GetRecEndFilePos() )
+ {
+ rIn >> aClientTextBoxHd;
+ if ( aClientTextBoxHd.nRecType == PPT_PST_SlidePersistAtom )
+ {
+ aClientTextBoxHd.SeekToBegOfRecord( rIn );
+ rIn >> aSlidePersistAtom;
+ if ( aSlidePersistAtom.nSlideId == nSlideId )
+ break;
+ }
+ aClientTextBoxHd.SeekToEndOfRecord( rIn );
+ }
+ if ( rIn.Tell() >= pHd->GetRecEndFilePos() )
+ bStatus = FALSE;
+ else
+ { // now we got the right page and are searching for the right
+ // TextHeaderAtom
+ while ( rIn.Tell() < pHd->GetRecEndFilePos() )
+ {
+ rIn >> aClientTextBoxHd;
+ if ( aClientTextBoxHd.nRecType == PPT_PST_TextHeaderAtom )
+ {
+ if ( aClientTextBoxHd.nRecInstance == nRefNum )
+ {
+ aClientTextBoxHd.SeekToEndOfRecord( rIn );
+ break;
+ }
+ }
+ aClientTextBoxHd.SeekToEndOfRecord( rIn );
+ }
+ if ( rIn.Tell() > pHd->GetRecEndFilePos() )
+ bStatus = FALSE;
+ else
+ { // patching the RecordHeader
+ aClientTextBoxHd.nFilePos -= nHeaderSize;
+ aClientTextBoxHd.nRecLen += nHeaderSize;
+ aClientTextBoxHd.nRecType = DFF_msofbtClientTextbox;
+ aClientTextBoxHd.nRecVer = DFF_PSFLAG_CONTAINER;
+
+ // we have to calculate the correct record len
+ DffRecordHeader aTmpHd;
+ while ( rIn.Tell() < pHd->GetRecEndFilePos() )
+ {
+ rIn >> aTmpHd;
+ if ( ( aTmpHd.nRecType == PPT_PST_SlidePersistAtom ) || ( aTmpHd.nRecType == PPT_PST_TextHeaderAtom ) )
+ break;
+ aTmpHd.SeekToEndOfRecord( rIn );
+ aClientTextBoxHd.nRecLen += aTmpHd.nRecLen + nHeaderSize;
+ }
+ aClientTextBoxHd.SeekToContent( rIn );
+ }
+ }
+ }
+ }
+ }
+
+ if ( bStatus )
+ {
+ if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_TextHeaderAtom, aClientTextBoxHd.GetRecEndFilePos(), &aTextHd ) )
+ {
+ // TextHeaderAtom is always the first Atom
+ UINT16 nInstance;
+ rIn >> nInstance; // this number tells us the TxMasterStyleAtom Instance
+ if ( nInstance > 8 )
+ nInstance = 4;
+ aTextHd.SeekToEndOfRecord( rIn );
+ mpImplTextObj->mnInstance = nInstance;
+
+ UINT32 nFilePos = rIn.Tell();
+ if ( rSdrPowerPointImport.SeekToRec2( PPT_PST_TextBytesAtom, PPT_PST_TextCharsAtom, aClientTextBoxHd.GetRecEndFilePos() ) )
+ {
+ PPTTextRulerInterpreter aTextRulerInterpreter( nTextRulerAtomOfs, rSdrPowerPointImport,
+ aClientTextBoxHd, rIn );
+ PPTStyleTextPropReader aStyleTextPropReader( rIn, rSdrPowerPointImport, aClientTextBoxHd,
+ aTextRulerInterpreter, aExtParaHd );
+ UINT32 nParagraphs = mpImplTextObj->mnParagraphCount = aStyleTextPropReader.aParaPropList.Count();
+ if ( nParagraphs )
+ {
+ //
+ // now will search for possible textextensions such as date/time fields
+ // or ParaTabStops and append them on this textobj
+ //
+ rIn.Seek( nFilePos );
+ List* pFieldList = NULL;
+ while ( rIn.Tell() < aClientTextBoxHd.GetRecEndFilePos() )
+ {
+ rIn >> aTextHd;
+ UINT16 nVal = 0;
+ PPTFieldEntry* pEntry = NULL;
+ switch ( aTextHd.nRecType )
+ {
+ case PPT_PST_DateTimeMCAtom :
+ {
+ pEntry = new PPTFieldEntry;
+ rIn >> pEntry->nPos
+ >> nVal
+ >> nVal;
+ pEntry->SetDateTime( nVal & 0xff );
+ }
+ break;
+
+ case PPT_PST_FooterMCAtom :
+ nVal++;
+ case PPT_PST_HeaderMCAtom :
+ nVal++;
+ case PPT_PST_GenericDateMCAtom :
+ {
+ if ( rPersistEntry.pHeaderFooterEntry )
+ {
+ pEntry = new PPTFieldEntry;
+ rIn >> pEntry->nPos;
+ if ( !nVal && ( rPersistEntry.pHeaderFooterEntry->nAtom & 0x20000 ) ) // auto date time
+ pEntry->SetDateTime( rPersistEntry.pHeaderFooterEntry->nAtom & 0xff );
+ else
+ pEntry->pString = new String( rPersistEntry.pHeaderFooterEntry->pPlaceholder[ nVal ] );
+ }
+ }
+ break;
+
+ case PPT_PST_SlideNumberMCAtom :
+ case PPT_PST_RTFDateTimeMCAtom :
+ {
+ pEntry = new PPTFieldEntry;
+ if ( aTextHd.nRecLen >= 4 )
+ {
+ rIn >> pEntry->nPos
+ >> nVal;
+
+ // ID auswerten
+ SvxFieldItem* pFieldItem = NULL;
+ switch( aTextHd.nRecType )
+ {
+ case PPT_PST_SlideNumberMCAtom:
+ pEntry->pField1 = new SvxFieldItem( SvxPageField() );
+ break;
+ case PPT_PST_RTFDateTimeMCAtom:
+ pEntry->pField1 = new SvxFieldItem( SvxDateField( Date(), SVXDATETYPE_FIX ) );
+ break;
+ }
+ }
+ }
+ break;
+
+ case PPT_PST_InteractiveInfo :
+ {
+ DffRecordHeader aHdInteractiveInfoAtom;
+ if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_InteractiveInfoAtom, aTextHd.GetRecEndFilePos(), &aHdInteractiveInfoAtom ) )
+ {
+ PptInteractiveInfoAtom aInteractiveInfoAtom;
+ rIn >> aInteractiveInfoAtom;
+ for ( SdHyperlinkEntry* pHyperlink = (SdHyperlinkEntry*)rSdrPowerPointImport.aHyperList.First();
+ pHyperlink; pHyperlink = (SdHyperlinkEntry*)rSdrPowerPointImport.aHyperList.Next() )
+ {
+ if ( pHyperlink->nIndex == aInteractiveInfoAtom.nExHyperlinkId )
+ {
+ aTextHd.SeekToEndOfRecord( rIn );
+ rIn >> aTextHd;
+ if ( aTextHd.nRecType != PPT_PST_TxInteractiveInfoAtom )
+ {
+ aTextHd.SeekToBegOfRecord( rIn );
+ continue;
+ }
+ else
+ {
+ UINT32 nStartPos, nEndPos;
+ rIn >> nStartPos
+ >> nEndPos;
+ if ( nEndPos )
+ {
+ pEntry = new PPTFieldEntry;
+ pEntry->nPos = (UINT16)nStartPos;
+ pEntry->nTextRangeEnd = (UINT16)nEndPos;
+ pEntry->pField1 = new SvxFieldItem( SvxURLField( pHyperlink->aTarget, String(), SVXURLFORMAT_REPR ) );
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ break;
+ }
+ aTextHd.SeekToEndOfRecord( rIn );
+ if ( pEntry )
+ {
+ if ( !pFieldList )
+ pFieldList = new List;
+ UINT32 n;
+ for ( n = 0; n < pFieldList->Count(); n++ )
+ { // sorting fields ( hi >> lo )
+ if ( ( (PPTFieldEntry*)pFieldList->GetObject( n ) )->nPos < pEntry->nPos )
+ break;
+ }
+ pFieldList->Insert( pEntry, (UINT32)n );
+ }
+ }
+ if ( pFieldList )
+ {
+ PPTFieldEntry* pFE = (PPTFieldEntry*)pFieldList->First();
+ List& aCharPropList = aStyleTextPropReader.aCharPropList;
+ UINT32 n = aCharPropList.Count();
+
+ for ( UINT32 i = nParagraphs; pFE && n && i-- ; )
+ {
+ for ( UINT32 m = aStyleTextPropReader.pCharPropsATable[ i ]; pFE && n && m-- ; )
+ {
+ PPTCharPropSet* pSet = (PPTCharPropSet*)aCharPropList.GetObject( --n );
+ String aString( pSet->maString );
+ UINT32 nCount = aString.Len();
+ if ( nCount )
+ {
+ UINT32 nPos = pSet->mnOriginalTextPos + nCount;
+ while ( pFE && nCount-- )
+ {
+ nPos--;
+ while ( pFE && ( pFE->nPos > nPos ) )
+ pFE = (PPTFieldEntry*)pFieldList->Next();
+ if ( !pFE )
+ break;
+ if ( pFE->nPos == nPos )
+ {
+ INT32 nCharPropAdd = 0;
+ if ( aString.GetChar( nCount ) == 0x2a )
+ {
+ UINT32 nBehind = aString.Len() - ( nCount + 1 );
+ pSet->maString = String();
+ if ( nBehind )
+ {
+ nCharPropAdd++;
+ PPTCharPropSet* pNewCPS = new PPTCharPropSet( *pSet );
+ pNewCPS->maString = String( aString, (UINT16)nCount + 1, (UINT16)nBehind );
+ aCharPropList.Insert( pNewCPS, n + 1 );
+ }
+ if ( pFE->pField2 )
+ {
+ nCharPropAdd += 2;
+ PPTCharPropSet* pNewCPS = new PPTCharPropSet( *pSet );
+ pNewCPS->mpFieldItem = pFE->pField2, pFE->pField2 = NULL;
+ aCharPropList.Insert( pNewCPS, n + 1 );
+
+ pNewCPS = new PPTCharPropSet( *pSet );
+ pNewCPS->maString = String( String( RTL_CONSTASCII_USTRINGPARAM( " " ) ) );
+ aCharPropList.Insert( pNewCPS, n + 1 );
+ }
+ if ( nCount )
+ {
+ nCharPropAdd++;
+ PPTCharPropSet* pNewCPS = new PPTCharPropSet( *pSet );
+ pNewCPS->maString = String( aString, (UINT16)0, (UINT16)nCount );
+ aCharPropList.Insert( pNewCPS, n++ );
+ }
+ if ( pFE->pField1 )
+ {
+ pSet->mpFieldItem = pFE->pField1, pFE->pField1 = NULL;
+ }
+ else if ( pFE->pString )
+ {
+ String aString( *pFE->pString );
+ if ( aString.Len() )
+ pSet->maString = aString;
+ else
+ {
+ nCharPropAdd--;
+ delete (PPTCharPropSet*)aCharPropList.Remove( n );
+ }
+ }
+ aStyleTextPropReader.pCharPropsATable[ i ] += nCharPropAdd;
+ }
+ else
+ {
+ if ( pFE->nTextRangeEnd ) // text range hyperlink
+ {
+ UINT32 nHyperLen = pFE->nTextRangeEnd - nPos;
+ if ( pFieldList->GetCurPos() )
+ {
+ PPTFieldEntry* pF = (PPTFieldEntry*)pFieldList->GetObject( pFieldList->GetCurPos() - 1 );
+ UINT32 nTmp = pF->nPos - pFE->nPos;
+ if ( nTmp < nHyperLen )
+ nHyperLen = nTmp;
+ }
+ if ( nHyperLen )
+ {
+ PPTCharPropSet* pBefCPS = NULL;
+ if ( nCount )
+ {
+ pBefCPS = new PPTCharPropSet( *pSet );
+ pSet->maString = String( pSet->maString, (UINT16)nCount, (UINT16)( pSet->maString.Len() - nCount ) );
+ }
+ if ( pSet->maString.Len() > nHyperLen )
+ {
+ nCharPropAdd++;
+ PPTCharPropSet* pNewCPS = new PPTCharPropSet( *pSet );
+ pNewCPS->maString = String( pSet->maString, (UINT16)nHyperLen, (UINT16)( pSet->maString.Len() - nHyperLen ) );
+ aCharPropList.Insert( pNewCPS, n + 1 );
+ pSet->maString = String( pSet->maString, 0, (UINT16)nHyperLen );
+ }
+ pSet->mpFieldItem = pFE->pField1, pFE->pField1 = NULL;
+ while ( pSet->maString.Len() < nHyperLen )
+ {
+ if ( ( n + 1 ) >= aCharPropList.Count() )
+ break;
+ PPTCharPropSet* pNext = (PPTCharPropSet*)aCharPropList.GetObject( n + 1 );
+ if ( !pNext->maString.Len() )
+ break;
+ if ( pNext->maString.Len() <= nHyperLen - pSet->maString.Len() )
+ {
+ pSet->maString += pNext->maString;
+ nCharPropAdd--;
+ delete (PPTCharPropSet*)aCharPropList.Remove( n + 1 );
+ }
+ else
+ {
+ UINT32 nLeft = nHyperLen - pSet->maString.Len();
+ pSet->maString += String( pNext->maString, 0, (UINT16)nLeft );
+ pNext->maString = String( pNext->maString, (UINT16)nLeft, (UINT16)( pNext->maString.Len() - nLeft ) );
+ }
+ }
+ ((SvxURLField*)(pSet->mpFieldItem)->GetField())->SetRepresentation( pSet->maString );
+ pSet->maString = String();
+ if ( pBefCPS )
+ {
+ nCharPropAdd++;
+ pBefCPS->maString = String( aString, (UINT16)0, (UINT16)nCount );
+ aCharPropList.Insert( pBefCPS, n++ );
+ }
+ aStyleTextPropReader.pCharPropsATable[ i ] += nCharPropAdd;
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+ for ( void* pPtr = pFieldList->First(); pPtr; pPtr = pFieldList->Next() )
+ delete (PPTFieldEntry*)pPtr;
+ delete pFieldList;
+ }
+ mpImplTextObj->mpParagraphList = new PPTParagraphObj*[ nParagraphs ];
+ aStyleTextPropReader.aCharPropList.First();
+ UINT32 nCount = 0;
+ for ( void* pPtr = aStyleTextPropReader.aParaPropList.First();
+ pPtr;
+ pPtr = aStyleTextPropReader.aParaPropList.Next() )
+ {
+ mpImplTextObj->mpParagraphList[ nCount++ ] = new PPTParagraphObj( aStyleTextPropReader, *rSdrPowerPointImport.pPPTStyleSheet, nInstance, aTextRulerInterpreter );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+PPTTextObj::PPTTextObj( PPTTextObj& rTextObj )
+{
+ mpImplTextObj = rTextObj.mpImplTextObj;
+ mpImplTextObj->mnRefCount++;
+}
+
+PPTTextObj::~PPTTextObj()
+{
+ ImplClear();
+}
+
+PPTParagraphObj* PPTTextObj::First()
+{
+ mpImplTextObj->mnCurrentObject = 0;
+ if ( !mpImplTextObj->mnParagraphCount )
+ return NULL;
+ return mpImplTextObj->mpParagraphList[ 0 ];
+}
+
+PPTParagraphObj* PPTTextObj::Next()
+{
+ UINT32 i = mpImplTextObj->mnCurrentObject + 1;
+ if ( i >= mpImplTextObj->mnParagraphCount )
+ return NULL;
+ mpImplTextObj->mnCurrentObject++;
+ return mpImplTextObj->mpParagraphList[ i ];
+}
+
+void PPTTextObj::ImplClear()
+{
+ if ( ! ( --mpImplTextObj->mnRefCount ) )
+ {
+ for ( PPTParagraphObj* pPtr = First(); pPtr; pPtr = Next() )
+ delete pPtr;
+ delete mpImplTextObj->mpParagraphList;
+ delete mpImplTextObj->mpPlaceHolderAtom;
+ delete mpImplTextObj;
+ }
+}
+
+PPTTextObj& PPTTextObj::operator=( PPTTextObj& rTextObj )
+{
+ if ( this != &rTextObj )
+ {
+ ImplClear();
+ mpImplTextObj = rTextObj.mpImplTextObj;
+ mpImplTextObj->mnRefCount++;
+ }
+ return *this;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif // SVX_LIGHT
+
+
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
new file mode 100644
index 0000000000..86828d9659
--- /dev/null
+++ b/svx/source/svdraw/svdglev.cxx
@@ -0,0 +1,423 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdglev.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdglev.hxx"
+#include <math.h>
+
+#include "svdundo.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+#include "svdpagv.hxx"
+#include "svdglue.hxx"
+#include "svdtrans.hxx"
+#include "svdobj.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrGlueEditView::ImpClearVars()
+{
+}
+
+SdrGlueEditView::SdrGlueEditView(SdrModel* pModel1, OutputDevice* pOut):
+ SdrPolyEditView(pModel1,pOut)
+{
+ ImpClearVars();
+}
+
+SdrGlueEditView::SdrGlueEditView(SdrModel* pModel1, ExtOutputDevice* pXOut):
+ SdrPolyEditView(pModel1,pXOut)
+{
+ ImpClearVars();
+}
+
+SdrGlueEditView::~SdrGlueEditView()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrGlueEditView::ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, BOOL bConst, const void* p1, const void* p2, const void* p3, const void* p4, const void* p5)
+{
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
+ ULONG nPtAnz=pPts==NULL ? 0 : pPts->GetCount();
+ if (nPtAnz!=0) {
+ SdrGluePointList* pGPL=NULL;
+ if (bConst) {
+ const SdrGluePointList* pConstGPL=pObj->GetGluePointList();
+ pGPL=(SdrGluePointList*)pConstGPL;
+ } else {
+ pGPL=pObj->ForceGluePointList();
+ }
+ if (pGPL!=NULL) {
+ if (!bConst) AddUndo(new SdrUndoGeoObj(*pObj));
+ for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ USHORT nPtId=pPts->GetObject(nPtNum);
+ USHORT nGlueIdx=pGPL->FindGluePoint(nPtId);
+ if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND) {
+ SdrGluePoint& rGP=(*pGPL)[nGlueIdx];
+ (*pDoFunc)(rGP,pObj,p1,p2,p3,p4,p5);
+ }
+ }
+ if (!bConst) pObj->SendRepaintBroadcast();
+ }
+ }
+ }
+ if (!bConst && nMarkAnz!=0) pMod->SetChanged();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+static void ImpGetEscDir(SdrGluePoint& rGP, const SdrObject* pObj, const void* pbFirst, const void* pnThisEsc, const void* pnRet, const void*, const void*)
+{
+ USHORT& nRet=*(USHORT*)pnRet;
+ BOOL& bFirst=*(BOOL*)pbFirst;
+ if (nRet!=FUZZY) {
+ USHORT nEsc=rGP.GetEscDir();
+ BOOL bOn=(nEsc & *(USHORT*)pnThisEsc)!=0;
+ if (bFirst) { nRet=bOn; bFirst=FALSE; }
+ else if (nRet!=bOn) nRet=FUZZY;
+ }
+}
+
+TRISTATE SdrGlueEditView::IsMarkedGluePointsEscDir(USHORT nThisEsc) const
+{
+ ForceUndirtyMrkPnt();
+ BOOL bFirst=TRUE;
+ USHORT nRet=FALSE;
+ ((SdrGlueEditView*)this)->ImpDoMarkedGluePoints(ImpGetEscDir,TRUE,&bFirst,&nThisEsc,&nRet);
+ return (TRISTATE)nRet;
+}
+
+static void ImpSetEscDir(SdrGluePoint& rGP, const SdrObject* pObj, const void* pnThisEsc, const void* pbOn, const void*, const void*, const void*)
+{
+ USHORT nEsc=rGP.GetEscDir();
+ if (*(BOOL*)pbOn) nEsc|=*(USHORT*)pnThisEsc;
+ else nEsc&=~*(USHORT*)pnThisEsc;
+ rGP.SetEscDir(nEsc);
+}
+
+void SdrGlueEditView::SetMarkedGluePointsEscDir(USHORT nThisEsc, BOOL bOn)
+{
+ ForceUndirtyMrkPnt();
+ BegUndo(ImpGetResStr(STR_EditSetGlueEscDir),aMark.GetGluePointMarkDescription());
+ ImpDoMarkedGluePoints(ImpSetEscDir,FALSE,&nThisEsc,&bOn);
+ EndUndo();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+static void ImpGetPercent(SdrGluePoint& rGP, const SdrObject* pObj, const void* pbFirst, const void* pnRet, const void*, const void*, const void*)
+{
+ USHORT& nRet=*(USHORT*)pnRet;
+ BOOL& bFirst=*(BOOL*)pbFirst;
+ if (nRet!=FUZZY) {
+ BOOL bOn=rGP.IsPercent();
+ if (bFirst) { nRet=bOn; bFirst=FALSE; }
+ else if (nRet!=bOn) nRet=FUZZY;
+ }
+}
+
+TRISTATE SdrGlueEditView::IsMarkedGluePointsPercent() const
+{
+ ForceUndirtyMrkPnt();
+ BOOL bFirst=TRUE;
+ USHORT nRet=TRUE;
+ ((SdrGlueEditView*)this)->ImpDoMarkedGluePoints(ImpGetPercent,TRUE,&bFirst,&nRet);
+ return (TRISTATE)nRet;
+}
+
+static void ImpSetPercent(SdrGluePoint& rGP, const SdrObject* pObj, const void* pbOn, const void*, const void*, const void*, const void*)
+{
+ Point aPos(rGP.GetAbsolutePos(*pObj));
+ rGP.SetPercent(*(BOOL*)pbOn);
+ rGP.SetAbsolutePos(aPos,*pObj);
+}
+
+void SdrGlueEditView::SetMarkedGluePointsPercent(BOOL bOn)
+{
+ ForceUndirtyMrkPnt();
+ BegUndo(ImpGetResStr(STR_EditSetGluePercent),aMark.GetGluePointMarkDescription());
+ ImpDoMarkedGluePoints(ImpSetPercent,FALSE,&bOn);
+ EndUndo();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+static void ImpGetAlign(SdrGluePoint& rGP, const SdrObject* pObj, const void* pbFirst, const void* pbDontCare, const void* pbVert, const void* pnRet, const void*)
+{
+ USHORT& nRet=*(USHORT*)pnRet;
+ BOOL& bFirst=*(BOOL*)pbFirst;
+ BOOL& bDontCare=*(BOOL*)pbDontCare;
+ BOOL bVert=*(BOOL*)pbVert;
+ if (!bDontCare) {
+ USHORT nAlg=0;
+ if (bVert) {
+ nAlg=rGP.GetVertAlign();
+ } else {
+ nAlg=rGP.GetHorzAlign();
+ }
+ if (bFirst) { nRet=nAlg; bFirst=FALSE; }
+ else if (nRet!=nAlg) {
+ if (bVert) {
+ nRet=SDRVERTALIGN_DONTCARE;
+ } else {
+ nRet=SDRHORZALIGN_DONTCARE;
+ }
+ bDontCare=TRUE;
+ }
+ }
+}
+
+USHORT SdrGlueEditView::GetMarkedGluePointsAlign(BOOL bVert) const
+{
+ ForceUndirtyMrkPnt();
+ BOOL bFirst=TRUE;
+ BOOL bDontCare=FALSE;
+ USHORT nRet=0;
+ ((SdrGlueEditView*)this)->ImpDoMarkedGluePoints(ImpGetAlign,TRUE,&bFirst,&bDontCare,&bVert,&nRet);
+ return nRet;
+}
+
+static void ImpSetAlign(SdrGluePoint& rGP, const SdrObject* pObj, const void* pbVert, const void* pnAlign, const void*, const void*, const void*)
+{
+ Point aPos(rGP.GetAbsolutePos(*pObj));
+ if (*(BOOL*)pbVert) { // bVert?
+ rGP.SetVertAlign(*(USHORT*)pnAlign);
+ } else {
+ rGP.SetHorzAlign(*(USHORT*)pnAlign);
+ }
+ rGP.SetAbsolutePos(aPos,*pObj);
+}
+
+void SdrGlueEditView::SetMarkedGluePointsAlign(BOOL bVert, USHORT nAlign)
+{
+ ForceUndirtyMrkPnt();
+ BegUndo(ImpGetResStr(STR_EditSetGlueAlign),aMark.GetGluePointMarkDescription());
+ ImpDoMarkedGluePoints(ImpSetAlign,FALSE,&bVert,&nAlign);
+ EndUndo();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrGlueEditView::IsDeleteMarkedGluePointsPossible() const
+{
+ return HasMarkedGluePoints();
+}
+
+void SdrGlueEditView::DeleteMarkedGluePoints()
+{
+ BrkAction();
+ ForceUndirtyMrkPnt();
+ BegUndo(ImpGetResStr(STR_EditDelete),aMark.GetGluePointMarkDescription(),SDRREPFUNC_OBJ_DELETE);
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
+ ULONG nPtAnz=pPts==NULL ? 0 : pPts->GetCount();
+ if (nPtAnz!=0) {
+ SdrGluePointList* pGPL=pObj->ForceGluePointList();
+ if (pGPL!=NULL) {
+ AddUndo(new SdrUndoGeoObj(*pObj));
+ for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ USHORT nPtId=pPts->GetObject(nPtNum);
+ USHORT nGlueIdx=pGPL->FindGluePoint(nPtId);
+ if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND) {
+ pGPL->Delete(nGlueIdx);
+ }
+ }
+ pObj->SendRepaintBroadcast();
+ }
+ }
+ }
+ EndUndo();
+ UnmarkAllGluePoints();
+ if (nMarkAnz!=0) pMod->SetChanged();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrGlueEditView::ImpCopyMarkedGluePoints()
+{
+ BegUndo();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrUShortCont* pPts=pM->GetMarkedGluePoints();
+ SdrGluePointList* pGPL=pObj->ForceGluePointList();
+ ULONG nPtAnz=pPts==NULL ? 0 : pPts->GetCount();
+ if (nPtAnz!=0 && pGPL!=NULL) {
+ AddUndo(new SdrUndoGeoObj(*pObj));
+ for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ USHORT nPtId=pPts->GetObject(nPtNum);
+ USHORT nGlueIdx=pGPL->FindGluePoint(nPtId);
+ if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND) {
+ SdrGluePoint aNewGP((*pGPL)[nGlueIdx]); // GluePoint klonen
+ USHORT nNewIdx=pGPL->Insert(aNewGP); // und einfuegen
+ USHORT nNewId=(*pGPL)[nNewIdx].GetId(); // Id des neuen GluePoints ermitteln
+ pPts->Replace(nNewId,nPtNum); // und diesen markieren (anstelle des alten)
+ }
+ }
+ }
+ }
+ EndUndo();
+ if (nMarkAnz!=0) pMod->SetChanged();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrGlueEditView::ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const void* p1, const void* p2, const void* p3, const void* p4, const void* p5)
+{
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
+ Point aPvOfs(pM->GetPageView()->GetOffset());
+ ULONG nPtAnz=pPts==NULL ? 0 : pPts->GetCount();
+ if (nPtAnz!=0) {
+ SdrGluePointList* pGPL=pObj->ForceGluePointList();
+ if (pGPL!=NULL) {
+ AddUndo(new SdrUndoGeoObj(*pObj));
+ for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ USHORT nPtId=pPts->GetObject(nPtNum);
+ USHORT nGlueIdx=pGPL->FindGluePoint(nPtId);
+ if (nGlueIdx!=SDRGLUEPOINT_NOTFOUND) {
+ SdrGluePoint& rGP=(*pGPL)[nGlueIdx];
+ Point aPos(rGP.GetAbsolutePos(*pObj));
+ aPos+=aPvOfs;
+ (*pTrFunc)(aPos,p1,p2,p3,p4,p5);
+ aPos-=aPvOfs;
+ rGP.SetAbsolutePos(aPos,*pObj);
+ }
+ }
+ pObj->SendRepaintBroadcast();
+ }
+ }
+ }
+ if (nMarkAnz!=0) pMod->SetChanged();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+static void ImpMove(Point& rPt, const void* p1, const void* p2, const void* p3, const void* p4, const void* p5)
+{
+ rPt.X()+=((const Size*)p1)->Width();
+ rPt.Y()+=((const Size*)p1)->Height();
+}
+
+void SdrGlueEditView::MoveMarkedGluePoints(const Size& rSiz, BOOL bCopy)
+{
+ ForceUndirtyMrkPnt();
+ XubString aStr(ImpGetResStr(STR_EditMove));
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr,aMark.GetGluePointMarkDescription(),SDRREPFUNC_OBJ_MOVE);
+ if (bCopy) ImpCopyMarkedGluePoints();
+ ImpTransformMarkedGluePoints(ImpMove,&rSiz);
+ EndUndo();
+ AdjustMarkHdl();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+static void ImpResize(Point& rPt, const void* p1, const void* p2, const void* p3, const void* p4, const void* p5)
+{
+ ResizePoint(rPt,*(const Point*)p1,*(const Fraction*)p2,*(const Fraction*)p3);
+}
+
+void SdrGlueEditView::ResizeMarkedGluePoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, BOOL bCopy)
+{
+ ForceUndirtyMrkPnt();
+ XubString aStr(ImpGetResStr(STR_EditResize));
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr,aMark.GetGluePointMarkDescription(),SDRREPFUNC_OBJ_RESIZE);
+ if (bCopy) ImpCopyMarkedGluePoints();
+ ImpTransformMarkedGluePoints(ImpResize,&rRef,&xFact,&yFact);
+ EndUndo();
+ AdjustMarkHdl();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+static void ImpRotate(Point& rPt, const void* p1, const void* p2, const void* p3, const void* p4, const void* p5)
+{
+ RotatePoint(rPt,*(const Point*)p1,*(const double*)p3,*(const double*)p4);
+}
+
+void SdrGlueEditView::RotateMarkedGluePoints(const Point& rRef, long nWink, BOOL bCopy)
+{
+ ForceUndirtyMrkPnt();
+ XubString aStr(ImpGetResStr(STR_EditRotate));
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr,aMark.GetGluePointMarkDescription(),SDRREPFUNC_OBJ_ROTATE);
+ if (bCopy) ImpCopyMarkedGluePoints();
+ double nSin=sin(nWink*nPi180);
+ double nCos=cos(nWink*nPi180);
+ ImpTransformMarkedGluePoints(ImpRotate,&rRef,&nWink,&nSin,&nCos);
+ EndUndo();
+ AdjustMarkHdl();
+}
+
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
new file mode 100644
index 0000000000..2ad97c3139
--- /dev/null
+++ b/svx/source/svdraw/svdglue.cxx
@@ -0,0 +1,600 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdglue.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+
+#include "svdglue.hxx"
+#include "svdobj.hxx"
+#include "svdio.hxx"
+#include "svdtrans.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrGluePoint::SetReallyAbsolute(FASTBOOL bOn, const SdrObject& rObj)
+{
+ if (bReallyAbsolute!=bOn) {
+ if (bOn) {
+ aPos=GetAbsolutePos(rObj);
+ bReallyAbsolute=bOn;
+ } else {
+ bReallyAbsolute=bOn;
+ Point aPt(aPos);
+ SetAbsolutePos(aPt,rObj);
+ }
+ } else {
+ DBG_ASSERT(bOn,"SdrGluePoint::SetReallyAbsolute(FALSE) mehrfach gerufen");
+ DBG_ASSERT(!bOn,"SdrGluePoint::SetReallyAbsolute(TRUE) mehrfach gerufen");
+ }
+}
+
+Point SdrGluePoint::GetAbsolutePos(const SdrObject& rObj) const
+{
+ if (bReallyAbsolute) return aPos;
+ Rectangle aSnap(rObj.GetSnapRect());
+ Rectangle aBound(rObj.GetSnapRect());
+ Point aPt(aPos);
+
+ Point aOfs(aSnap.Center());
+ switch (GetHorzAlign()) {
+ case SDRHORZALIGN_LEFT : aOfs.X()=aSnap.Left(); break;
+ case SDRHORZALIGN_RIGHT : aOfs.X()=aSnap.Right(); break;
+ }
+ switch (GetVertAlign()) {
+ case SDRVERTALIGN_TOP : aOfs.Y()=aSnap.Top(); break;
+ case SDRVERTALIGN_BOTTOM: aOfs.Y()=aSnap.Bottom(); break;
+ }
+ if (!bNoPercent) {
+ long nXMul=aSnap.Right()-aSnap.Left();
+ long nYMul=aSnap.Bottom()-aSnap.Top();
+ long nXDiv=10000;
+ long nYDiv=10000;
+ if (nXMul!=nXDiv) {
+ aPt.X()*=nXMul;
+ aPt.X()/=nXDiv;
+ }
+ if (nYMul!=nYDiv) {
+ aPt.Y()*=nYMul;
+ aPt.Y()/=nYDiv;
+ }
+ }
+ aPt+=aOfs;
+ // Und nun auf's BoundRect des Objekts begrenzen
+ if (aPt.X()<aBound.Left ()) aPt.X()=aBound.Left ();
+ if (aPt.X()>aBound.Right ()) aPt.X()=aBound.Right ();
+ if (aPt.Y()<aBound.Top ()) aPt.Y()=aBound.Top ();
+ if (aPt.Y()>aBound.Bottom()) aPt.Y()=aBound.Bottom();
+ return aPt;
+}
+
+void SdrGluePoint::SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj)
+{
+ if (bReallyAbsolute) {
+ aPos=rNewPos;
+ return;
+ }
+ Rectangle aSnap(rObj.GetSnapRect());
+ Point aPt(rNewPos);
+
+ Point aOfs(aSnap.Center());
+ switch (GetHorzAlign()) {
+ case SDRHORZALIGN_LEFT : aOfs.X()=aSnap.Left(); break;
+ case SDRHORZALIGN_RIGHT : aOfs.X()=aSnap.Right(); break;
+ }
+ switch (GetVertAlign()) {
+ case SDRVERTALIGN_TOP : aOfs.Y()=aSnap.Top(); break;
+ case SDRVERTALIGN_BOTTOM: aOfs.Y()=aSnap.Bottom(); break;
+ }
+ aPt-=aOfs;
+ if (!bNoPercent) {
+ long nXMul=aSnap.Right()-aSnap.Left();
+ long nYMul=aSnap.Bottom()-aSnap.Top();
+ if (nXMul==0) nXMul=1;
+ if (nYMul==0) nYMul=1;
+ long nXDiv=10000;
+ long nYDiv=10000;
+ if (nXMul!=nXDiv) {
+ aPt.X()*=nXDiv;
+ aPt.X()/=nXMul;
+ }
+ if (nYMul!=nYDiv) {
+ aPt.Y()*=nYDiv;
+ aPt.Y()/=nYMul;
+ }
+ }
+ aPos=aPt;
+}
+
+long SdrGluePoint::GetAlignAngle() const
+{
+ switch (nAlign) {
+ case SDRHORZALIGN_CENTER|SDRVERTALIGN_CENTER: return 0; // Invalid!
+ case SDRHORZALIGN_RIGHT |SDRVERTALIGN_CENTER: return 0;
+ case SDRHORZALIGN_RIGHT |SDRVERTALIGN_TOP : return 4500;
+ case SDRHORZALIGN_CENTER|SDRVERTALIGN_TOP : return 9000;
+ case SDRHORZALIGN_LEFT |SDRVERTALIGN_TOP : return 13500;
+ case SDRHORZALIGN_LEFT |SDRVERTALIGN_CENTER: return 18000;
+ case SDRHORZALIGN_LEFT |SDRVERTALIGN_BOTTOM: return 22500;
+ case SDRHORZALIGN_CENTER|SDRVERTALIGN_BOTTOM: return 27000;
+ case SDRHORZALIGN_RIGHT |SDRVERTALIGN_BOTTOM: return 31500;
+ } // switch
+ return 0;
+}
+
+void SdrGluePoint::SetAlignAngle(long nWink)
+{
+ nWink=NormAngle360(nWink);
+ if (nWink>=33750 || nWink<2250) nAlign=SDRHORZALIGN_RIGHT |SDRVERTALIGN_CENTER;
+ else if (nWink< 6750) nAlign=SDRHORZALIGN_RIGHT |SDRVERTALIGN_TOP ;
+ else if (nWink<11250) nAlign=SDRHORZALIGN_CENTER|SDRVERTALIGN_TOP ;
+ else if (nWink<15750) nAlign=SDRHORZALIGN_LEFT |SDRVERTALIGN_TOP ;
+ else if (nWink<20250) nAlign=SDRHORZALIGN_LEFT |SDRVERTALIGN_CENTER;
+ else if (nWink<24750) nAlign=SDRHORZALIGN_LEFT |SDRVERTALIGN_BOTTOM;
+ else if (nWink<29250) nAlign=SDRHORZALIGN_CENTER|SDRVERTALIGN_BOTTOM;
+ else if (nWink<33750) nAlign=SDRHORZALIGN_RIGHT |SDRVERTALIGN_BOTTOM;
+}
+
+long SdrGluePoint::EscDirToAngle(USHORT nEsc) const
+{
+ switch (nEsc) {
+ case SDRESC_RIGHT : return 0;
+ case SDRESC_TOP : return 9000;
+ case SDRESC_LEFT : return 18000;
+ case SDRESC_BOTTOM: return 27000;
+ } // switch
+ return 0;
+}
+
+USHORT SdrGluePoint::EscAngleToDir(long nWink) const
+{
+ nWink=NormAngle360(nWink);
+ if (nWink>=31500 || nWink<4500) return SDRESC_RIGHT;
+ if (nWink<13500) return SDRESC_TOP;
+ if (nWink<22500) return SDRESC_LEFT;
+ if (nWink<31500) return SDRESC_BOTTOM;
+ return 0;
+}
+
+void SdrGluePoint::Rotate(const Point& rRef, long nWink, double sn, double cs, const SdrObject* pObj)
+{
+ Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ RotatePoint(aPt,rRef,sn,cs);
+ // Bezugskante drehen
+ if(nAlign != (SDRHORZALIGN_CENTER|SDRVERTALIGN_CENTER))
+ {
+ SetAlignAngle(GetAlignAngle()+nWink);
+ }
+ // Austrittsrichtungen drehen
+ USHORT nEscDir0=nEscDir;
+ USHORT nEscDir1=0;
+ if ((nEscDir0&SDRESC_LEFT )!=0) nEscDir1|=EscAngleToDir(EscDirToAngle(SDRESC_LEFT )+nWink);
+ if ((nEscDir0&SDRESC_TOP )!=0) nEscDir1|=EscAngleToDir(EscDirToAngle(SDRESC_TOP )+nWink);
+ if ((nEscDir0&SDRESC_RIGHT )!=0) nEscDir1|=EscAngleToDir(EscDirToAngle(SDRESC_RIGHT )+nWink);
+ if ((nEscDir0&SDRESC_BOTTOM)!=0) nEscDir1|=EscAngleToDir(EscDirToAngle(SDRESC_BOTTOM)+nWink);
+ nEscDir=nEscDir1;
+ if (pObj!=NULL) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
+}
+
+void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, const SdrObject* pObj)
+{
+ Point aPt(rRef2); aPt-=rRef1;
+ long nWink=GetAngle(aPt);
+ Mirror(rRef1,rRef2,nWink,pObj);
+}
+
+void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, long nWink, const SdrObject* pObj)
+{
+ Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ MirrorPoint(aPt,rRef1,rRef2);
+ // Bezugskante spiegeln
+ if(nAlign != (SDRHORZALIGN_CENTER|SDRVERTALIGN_CENTER))
+ {
+ long nAW=GetAlignAngle();
+ nAW+=2*(nWink-nAW);
+ SetAlignAngle(nAW);
+ }
+ // Austrittsrichtungen spiegeln
+ USHORT nEscDir0=nEscDir;
+ USHORT nEscDir1=0;
+ if ((nEscDir0&SDRESC_LEFT)!=0) {
+ long nEW=EscDirToAngle(SDRESC_LEFT);
+ nEW+=2*(nWink-nEW);
+ nEscDir1|=EscAngleToDir(nEW);
+ }
+ if ((nEscDir0&SDRESC_TOP)!=0) {
+ long nEW=EscDirToAngle(SDRESC_TOP);
+ nEW+=2*(nWink-nEW);
+ nEscDir1|=EscAngleToDir(nEW);
+ }
+ if ((nEscDir0&SDRESC_RIGHT)!=0) {
+ long nEW=EscDirToAngle(SDRESC_RIGHT);
+ nEW+=2*(nWink-nEW);
+ nEscDir1|=EscAngleToDir(nEW);
+ }
+ if ((nEscDir0&SDRESC_BOTTOM)!=0) {
+ long nEW=EscDirToAngle(SDRESC_BOTTOM);
+ nEW+=2*(nWink-nEW);
+ nEscDir1|=EscAngleToDir(nEW);
+ }
+ nEscDir=nEscDir1;
+ if (pObj!=NULL) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
+}
+
+void SdrGluePoint::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear, const SdrObject* pObj)
+{
+ Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ ShearPoint(aPt,rRef,tn,bVShear);
+ if (pObj!=NULL) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
+}
+
+void SdrGluePoint::Draw(OutputDevice& rOut, const SdrObject* pObj) const
+{
+ Color aBackPenColor(COL_WHITE);
+ Color aForePenColor(COL_LIGHTBLUE);
+
+ FASTBOOL bMapMerk=rOut.IsMapModeEnabled();
+ Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ aPt=rOut.LogicToPixel(aPt);
+ rOut.EnableMapMode(FALSE);
+ long x=aPt.X(),y=aPt.Y(); // Groesse erstmal fest auf 7 Pixel
+
+ rOut.SetLineColor( aBackPenColor );
+ rOut.DrawLine(Point(x-2,y-3),Point(x+3,y+2));
+ rOut.DrawLine(Point(x-3,y-2),Point(x+2,y+3));
+ rOut.DrawLine(Point(x-3,y+2),Point(x+2,y-3));
+ rOut.DrawLine(Point(x-2,y+3),Point(x+3,y-2));
+
+ if (bNoPercent)
+ {
+ switch (GetHorzAlign())
+ {
+ case SDRHORZALIGN_LEFT : rOut.DrawLine(Point(x-3,y-1),Point(x-3,y+1)); break;
+ case SDRHORZALIGN_RIGHT : rOut.DrawLine(Point(x+3,y-1),Point(x+3,y+1)); break;
+ }
+
+ switch (GetVertAlign())
+ {
+ case SDRVERTALIGN_TOP : rOut.DrawLine(Point(x-1,y-3),Point(x+1,y-3)); break;
+ case SDRVERTALIGN_BOTTOM: rOut.DrawLine(Point(x-1,y+3),Point(x+1,y+3)); break;
+ }
+ }
+
+ rOut.SetLineColor( aForePenColor );
+ rOut.DrawLine(Point(x-2,y-2),Point(x+2,y+2));
+ rOut.DrawLine(Point(x-2,y+2),Point(x+2,y-2));
+ rOut.EnableMapMode(bMapMerk);
+}
+
+void SdrGluePoint::Invalidate(Window& rWin, const SdrObject* pObj) const
+{
+ FASTBOOL bMapMerk=rWin.IsMapModeEnabled();
+ Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ aPt=rWin.LogicToPixel(aPt);
+ rWin.EnableMapMode(FALSE);
+ long x=aPt.X(),y=aPt.Y(); // Groesse erstmal fest auf 7 Pixel
+ rWin.Invalidate(Rectangle(Point(x-3,y-3),Point(x+3,y+3)));
+ rWin.EnableMapMode(bMapMerk);
+}
+
+FASTBOOL SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const
+{
+ Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos());
+ Size aSiz=rOut.PixelToLogic(Size(3,3));
+ Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(),aPt.X()+aSiz.Width(),aPt.Y()+aSiz.Height());
+ return aRect.IsInside(rPnt);
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrGluePoint& rGP)
+{
+ if (rOut.GetError()!=0) return rOut;
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrGluePoint");
+#endif
+ rOut<<rGP.aPos;
+ rOut<<rGP.nEscDir;
+ rOut<<rGP.nId;
+ rOut<<rGP.nAlign;
+ BOOL bTmp=rGP.bNoPercent; // ueber bTmp, weil sonst (beim casting) im Falle
+ rOut<<bTmp; // TRUE nicht 01 sondern FF geschrieben wird.
+ return rOut;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrGluePoint& rGP)
+{
+ if (rIn.GetError()!=0) return rIn;
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrGluePoint");
+#endif
+ BOOL bTmpBool;
+ rIn>>rGP.aPos;
+ rIn>>rGP.nEscDir;
+ rIn>>rGP.nId;
+ rIn>>rGP.nAlign;
+ rIn>>bTmpBool; rGP.bNoPercent=(bTmpBool!=0);
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrGluePointList::Clear()
+{
+ USHORT nAnz=GetCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ delete GetObject(i);
+ }
+ aList.Clear();
+}
+
+void SdrGluePointList::operator=(const SdrGluePointList& rSrcList)
+{
+ if (GetCount()!=0) Clear();
+ USHORT nAnz=rSrcList.GetCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ Insert(rSrcList[i]);
+ }
+}
+
+// Die Id's der Klebepunkte in der Liste sind stets streng monoton steigend!
+// Ggf. wird dem neuen Klebepunkt eine neue Id zugewiesen (wenn diese bereits
+// vergeben ist). Die Id 0 ist reserviert.
+USHORT SdrGluePointList::Insert(const SdrGluePoint& rGP)
+{
+ SdrGluePoint* pGP=new SdrGluePoint(rGP);
+ USHORT nId=pGP->GetId();
+ USHORT nAnz=GetCount();
+ USHORT nInsPos=nAnz;
+ USHORT nLastId=nAnz!=0 ? GetObject(nAnz-1)->GetId() : 0;
+ DBG_ASSERT(nLastId>=nAnz,"SdrGluePointList::Insert(): nLastId<nAnz");
+ FASTBOOL bHole=nLastId>nAnz;
+ if (nId<=nLastId) {
+ if (!bHole || nId==0) {
+ nId=nLastId+1;
+ } else {
+ FASTBOOL bBrk=FALSE;
+ for (USHORT nNum=0; nNum<nAnz && !bBrk; nNum++) {
+ const SdrGluePoint* pGP=GetObject(nNum);
+ USHORT nTmpId=pGP->GetId();
+ if (nTmpId==nId) {
+ nId=nLastId+1; // bereits vorhanden
+ bBrk=TRUE;
+ }
+ if (nTmpId>nId) {
+ nInsPos=nNum; // Hier einfuegen (einsortieren)
+ bBrk=TRUE;
+ }
+ }
+ }
+ pGP->SetId(nId);
+ }
+ aList.Insert(pGP,nInsPos);
+ return nInsPos;
+}
+
+void SdrGluePointList::DrawAll(OutputDevice& rOut, const SdrObject* pObj) const
+{
+ USHORT nAnz=GetCount();
+ if (nAnz!=0)
+ {
+ Color aBackPenColor(COL_WHITE);
+ Color aForePenColor(COL_LIGHTBLUE);
+
+ FASTBOOL bMapMerk=rOut.IsMapModeEnabled();
+ rOut.SetLineColor( aBackPenColor );
+ USHORT nNum;
+
+ for (nNum=0; nNum<nAnz; nNum++)
+ {
+ const SdrGluePoint* pGP=GetObject(nNum);
+ Point aPt(pObj!=NULL ? pGP->GetAbsolutePos(*pObj) : pGP->GetPos());
+ aPt=rOut.LogicToPixel(aPt);
+ rOut.EnableMapMode(FALSE);
+ long x=aPt.X(),y=aPt.Y(); // Groesse erstmal fest auf 7 Pixel
+ rOut.DrawLine(Point(x-2,y-3),Point(x+3,y+2));
+ rOut.DrawLine(Point(x-3,y-2),Point(x+2,y+3));
+ rOut.DrawLine(Point(x-3,y+2),Point(x+2,y-3));
+ rOut.DrawLine(Point(x-2,y+3),Point(x+3,y-2));
+
+ if (!pGP->IsPercent())
+ {
+ switch (pGP->GetHorzAlign())
+ {
+ case SDRHORZALIGN_LEFT : rOut.DrawLine(Point(x-3,y-1),Point(x-3,y+1)); break;
+ case SDRHORZALIGN_RIGHT : rOut.DrawLine(Point(x+3,y-1),Point(x+3,y+1)); break;
+ }
+ switch (pGP->GetVertAlign())
+ {
+ case SDRVERTALIGN_TOP : rOut.DrawLine(Point(x-1,y-3),Point(x+1,y-3)); break;
+ case SDRVERTALIGN_BOTTOM: rOut.DrawLine(Point(x-1,y+3),Point(x+1,y+3)); break;
+ }
+ }
+ rOut.EnableMapMode(bMapMerk);
+ }
+
+ rOut.SetLineColor( aForePenColor );
+
+ for (nNum=0; nNum<nAnz; nNum++)
+ {
+ const SdrGluePoint* pGP=GetObject(nNum);
+ Point aPt(pObj!=NULL ? pGP->GetAbsolutePos(*pObj) : pGP->GetPos());
+ aPt=rOut.LogicToPixel(aPt);
+ rOut.EnableMapMode(FALSE);
+ long x=aPt.X(),y=aPt.Y(); // Groesse erstmal fest auf 7 Pixel
+ rOut.DrawLine(Point(x-2,y-2),Point(x+2,y+2));
+ rOut.DrawLine(Point(x-2,y+2),Point(x+2,y-2));
+ rOut.EnableMapMode(bMapMerk);
+ }
+ }
+}
+
+void SdrGluePointList::Invalidate(Window& rWin, const SdrObject* pObj) const
+{
+ USHORT nAnz=GetCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ GetObject(nNum)->Invalidate(rWin,pObj);
+ }
+}
+
+USHORT SdrGluePointList::FindGluePoint(USHORT nId) const
+{
+ // Hier noch einen optimaleren Suchalgorithmus implementieren.
+ // Die Liste sollte stets sortiert sein!!!!
+ USHORT nAnz=GetCount();
+ USHORT nRet=SDRGLUEPOINT_NOTFOUND;
+ for (USHORT nNum=0; nNum<nAnz && nRet==SDRGLUEPOINT_NOTFOUND; nNum++) {
+ const SdrGluePoint* pGP=GetObject(nNum);
+ if (pGP->GetId()==nId) nRet=nNum;
+ }
+ return nRet;
+}
+
+USHORT SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj, FASTBOOL bBack, FASTBOOL bNext, USHORT nId0) const
+{
+ USHORT nAnz=GetCount();
+ USHORT nRet=SDRGLUEPOINT_NOTFOUND;
+ USHORT nNum=bBack ? 0 : nAnz;
+ while ((bBack ? nNum<nAnz : nNum>0) && nRet==SDRGLUEPOINT_NOTFOUND) {
+ if (!bBack) nNum--;
+ const SdrGluePoint* pGP=GetObject(nNum);
+ if (bNext) {
+ if (pGP->GetId()==nId0) bNext=FALSE;
+ } else {
+ if (pGP->IsHit(rPnt,rOut,pObj)) nRet=nNum;
+ }
+ if (bBack) nNum++;
+ }
+ return nRet;
+}
+
+void SdrGluePointList::SetReallyAbsolute(FASTBOOL bOn, const SdrObject& rObj)
+{
+ USHORT nAnz=GetCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ GetObject(nNum)->SetReallyAbsolute(bOn,rObj);
+ }
+}
+
+void SdrGluePointList::Rotate(const Point& rRef, long nWink, double sn, double cs, const SdrObject* pObj)
+{
+ USHORT nAnz=GetCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ GetObject(nNum)->Rotate(rRef,nWink,sn,cs,pObj);
+ }
+}
+
+void SdrGluePointList::Mirror(const Point& rRef1, const Point& rRef2, const SdrObject* pObj)
+{
+ Point aPt(rRef2); aPt-=rRef1;
+ long nWink=GetAngle(aPt);
+ Mirror(rRef1,rRef2,nWink,pObj);
+}
+
+void SdrGluePointList::Mirror(const Point& rRef1, const Point& rRef2, long nWink, const SdrObject* pObj)
+{
+ USHORT nAnz=GetCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ GetObject(nNum)->Mirror(rRef1,rRef2,nWink,pObj);
+ }
+}
+
+void SdrGluePointList::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear, const SdrObject* pObj)
+{
+ USHORT nAnz=GetCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ GetObject(nNum)->Shear(rRef,nWink,tn,bVShear,pObj);
+ }
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrGluePointList& rGPL)
+{
+ if (rOut.GetError()!=0) return rOut;
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrGluePointList");
+#endif
+ UINT16 nAnz=rGPL.GetCount();
+ rOut<<(UINT16)nAnz;
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ rOut<<rGPL[nNum];
+ }
+ return rOut;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrGluePointList& rGPL)
+{
+ if (rIn.GetError()!=0) return rIn;
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrGluePointList");
+#endif
+ rGPL.Clear();
+ UINT16 nAnz=0;
+ rIn>>nAnz;
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ SdrGluePoint aGP;
+ rIn>>aGP;
+ rGPL.Insert(aGP);
+ }
+ return rIn;
+}
+
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
new file mode 100644
index 0000000000..04a8cdd0d7
--- /dev/null
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -0,0 +1,1416 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdhdl.hxx"
+#include "svdtouch.hxx"
+#include "svdpagv.hxx"
+#include "svdetc.hxx"
+#include "svdmrkv.hxx"
+
+#ifndef _WINDOW_HXX //autogen
+#include <vcl/window.hxx>
+#endif
+
+#ifndef _VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _POLY_HXX //autogen
+#include <vcl/poly.hxx>
+#endif
+
+#ifndef _SV_BMPACC_HXX
+#include <vcl/bmpacc.hxx>
+#endif
+
+#ifndef _B2D_MTRI_HXX
+#include <goodies/b2dmtri.hxx>
+#endif
+
+#ifndef _B3D_B3DCOLOR_HXX
+#include <goodies/b3dcolor.hxx>
+#endif
+
+#include "sxekitm.hxx"
+#include "sxesitm.hxx"
+#include "svdstr.hrc"
+#include "svdglob.hxx"
+
+#include "svdmodel.hxx"
+#include "gradtrns.hxx"
+#include "xflgrit.hxx"
+#include "svdundo.hxx"
+#include "dialmgr.hxx"
+#include "xflftrit.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class SdrHdlBitmapSet
+{
+ BitmapEx aRect_7x7[5];
+ BitmapEx aRect_9x9[5];
+ BitmapEx aRect_11x11[5];
+ BitmapEx aCirc_7x7[5];
+ BitmapEx aCirc_9x9[5];
+ BitmapEx aCirc_11x11[5];
+ BitmapEx aElli_7x9[5];
+ BitmapEx aElli_9x11[5];
+ BitmapEx aElli_9x7[5];
+ BitmapEx aElli_11x9[5];
+ BitmapEx aRectPlus_7x7[5];
+ BitmapEx aRectPlus_9x9[5];
+ BitmapEx aRectPlus_11x11[5];
+ BitmapEx aCrosshair;
+ BitmapEx aGlue;
+ BitmapEx aAnchor;
+
+ void FillBitmapsFromResource(UINT16 nResId);
+
+public:
+ SdrHdlBitmapSet(UINT16 nResId);
+ ~SdrHdlBitmapSet();
+
+ BitmapEx& GetBitmapEx(BitmapMarkerKind eKindOfMarker, UINT16 nInd=0);
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrHdlBitmapSet::SdrHdlBitmapSet(UINT16 nResId)
+{
+ FillBitmapsFromResource(nResId);
+}
+
+SdrHdlBitmapSet::~SdrHdlBitmapSet()
+{
+}
+
+void SdrHdlBitmapSet::FillBitmapsFromResource(UINT16 nResId)
+{
+ Color aColWhite(COL_WHITE);
+ OutputDevice* pOut = Application::GetDefaultDevice();
+ Bitmap aBitmap(ResId(nResId, ImpGetResMgr()));
+ BitmapEx aMarkersBitmap(aBitmap, aColWhite);
+
+ for(UINT16 a=0;a<5;a++)
+ {
+ UINT16 nYPos = a * 11;
+
+ aRect_7x7[a] = aMarkersBitmap; aRect_7x7[a].Crop(Rectangle(Point(0, nYPos), Size(7, 7)));
+ aRect_7x7[a] = BitmapEx( aRect_7x7[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aRect_7x7[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aRect_9x9[a] = aMarkersBitmap; aRect_9x9[a].Crop(Rectangle(Point(7, nYPos), Size(9, 9)));
+ aRect_9x9[a] = BitmapEx( aRect_9x9[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aRect_9x9[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aRect_11x11[a] = aMarkersBitmap; aRect_11x11[a].Crop(Rectangle(Point(16, nYPos), Size(11, 11)));
+ aRect_11x11[a] = BitmapEx( aRect_11x11[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aRect_11x11[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aCirc_7x7[a] = aMarkersBitmap; aCirc_7x7[a].Crop(Rectangle(Point(27, nYPos), Size(7, 7)));
+ aCirc_7x7[a] = BitmapEx( aCirc_7x7[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aCirc_7x7[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aCirc_9x9[a] = aMarkersBitmap; aCirc_9x9[a].Crop(Rectangle(Point(34, nYPos), Size(9, 9)));
+ aCirc_9x9[a] = BitmapEx( aCirc_9x9[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aCirc_9x9[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aCirc_11x11[a] = aMarkersBitmap; aCirc_11x11[a].Crop(Rectangle(Point(43, nYPos), Size(11, 11)));
+ aCirc_11x11[a] = BitmapEx( aCirc_11x11[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aCirc_11x11[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aElli_7x9[a] = aMarkersBitmap; aElli_7x9[a].Crop(Rectangle(Point(54, nYPos), Size(7, 9)));
+ aElli_7x9[a] = BitmapEx( aElli_7x9[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aElli_7x9[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aElli_9x11[a] = aMarkersBitmap; aElli_9x11[a].Crop(Rectangle(Point(61, nYPos), Size(9, 11)));
+ aElli_9x11[a] = BitmapEx( aElli_9x11[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aElli_9x11[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aElli_9x7[a] = aMarkersBitmap; aElli_9x7[a].Crop(Rectangle(Point(70, nYPos), Size(9, 7)));
+ aElli_9x7[a] = BitmapEx( aElli_9x7[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aElli_9x7[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aElli_11x9[a] = aMarkersBitmap; aElli_11x9[a].Crop(Rectangle(Point(79, nYPos), Size(11, 9)));
+ aElli_11x9[a] = BitmapEx( aElli_11x9[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aElli_11x9[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aRectPlus_7x7[a] = aMarkersBitmap; aRectPlus_7x7[a].Crop(Rectangle(Point(90, nYPos), Size(7, 7)));
+ aRectPlus_7x7[a] = BitmapEx( aRectPlus_7x7[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aRectPlus_7x7[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aRectPlus_9x9[a] = aMarkersBitmap; aRectPlus_9x9[a].Crop(Rectangle(Point(97, nYPos), Size(9, 9)));
+ aRectPlus_9x9[a] = BitmapEx( aRectPlus_9x9[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aRectPlus_9x9[a].GetMask().CreateDisplayBitmap( pOut ) );
+
+ aRectPlus_11x11[a] = aMarkersBitmap; aRectPlus_11x11[a].Crop(Rectangle(Point(106, nYPos), Size(11, 11)));
+ aRectPlus_11x11[a] = BitmapEx( aRectPlus_11x11[a].GetBitmap().CreateDisplayBitmap( pOut ),
+ aRectPlus_11x11[a].GetMask().CreateDisplayBitmap( pOut ) );
+ }
+
+ aCrosshair = aMarkersBitmap; aCrosshair.Crop(Rectangle(Point(0, 55), Size(15, 15)));
+ aCrosshair = BitmapEx( aCrosshair.GetBitmap().CreateDisplayBitmap( pOut ),
+ aCrosshair.GetMask().CreateDisplayBitmap( pOut ) );
+
+ aGlue = aMarkersBitmap; aGlue.Crop(Rectangle(Point(15, 61), Size(9, 9)));
+ aGlue = BitmapEx( aGlue.GetBitmap().CreateDisplayBitmap( pOut ),
+ aGlue.GetMask().CreateDisplayBitmap( pOut ) );
+
+ aAnchor = aMarkersBitmap; aAnchor.Crop(Rectangle(Point(24, 55), Size(24, 23)));
+ aAnchor = BitmapEx( aAnchor.GetBitmap().CreateDisplayBitmap( pOut ),
+ aAnchor.GetMask().CreateDisplayBitmap( pOut ) );
+}
+
+BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, UINT16 nInd)
+{
+ switch(eKindOfMarker)
+ {
+ case Rect_7x7: return aRect_7x7[nInd]; break;
+ case Rect_9x9: return aRect_9x9[nInd]; break;
+ case Rect_11x11: return aRect_11x11[nInd]; break;
+ case Circ_7x7: return aCirc_7x7[nInd]; break;
+ case Circ_9x9: return aCirc_9x9[nInd]; break;
+ case Circ_11x11: return aCirc_11x11[nInd]; break;
+ case Elli_7x9: return aElli_7x9[nInd]; break;
+ case Elli_9x11: return aElli_9x11[nInd]; break;
+ case Elli_9x7: return aElli_9x7[nInd]; break;
+ case Elli_11x9: return aElli_11x9[nInd]; break;
+ case RectPlus_7x7: return aRectPlus_7x7[nInd]; break;
+ case RectPlus_9x9: return aRectPlus_9x9[nInd]; break;
+ case RectPlus_11x11: return aRectPlus_11x11[nInd]; break;
+ case Crosshair: return aCrosshair; break;
+ case Glue: return aGlue; break;
+ case Anchor: return aAnchor; break;
+ default: DBG_ERROR( "unknown kind of marker" ); return aRect_7x7[nInd]; break;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrHdlBitmapSet* SdrHdl::pSimpleSet = NULL;
+SdrHdlBitmapSet* SdrHdl::pModernSet = NULL;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrHdl::SdrHdl():
+ pObj(NULL),
+ pPV(NULL),
+ pHdlList(NULL),
+ nDrehWink(0),
+ eKind(HDL_MOVE),
+ bSelect(FALSE),
+ b1PixMore(FALSE),
+ nObjHdlNum(0),
+ nPolyNum(0),
+ nPPntNum(0),
+ bPlusHdl(FALSE),
+ nSourceHdlNum(0)
+{
+ if(!pSimpleSet)
+ pSimpleSet = new SdrHdlBitmapSet(SIP_SA_MARKERS);
+ DBG_ASSERT(pSimpleSet, "Could not construct SdrHdlBitmapSet()!");
+
+ if(!pModernSet)
+ pModernSet = new SdrHdlBitmapSet(SIP_SA_FINE_MARKERS);
+ DBG_ASSERT(pModernSet, "Could not construct SdrHdlBitmapSet()!");
+}
+
+SdrHdl::SdrHdl(const Point& rPnt, SdrHdlKind eNewKind):
+ aPos(rPnt),
+ pObj(NULL),
+ pPV(NULL),
+ pHdlList(NULL),
+ nDrehWink(0),
+ eKind(eNewKind),
+ bSelect(FALSE),
+ b1PixMore(FALSE),
+ nObjHdlNum(0),
+ nPolyNum(0),
+ nPPntNum(0),
+ bPlusHdl(FALSE),
+ nSourceHdlNum(0)
+{
+ if(!pSimpleSet)
+ pSimpleSet = new SdrHdlBitmapSet(SIP_SA_MARKERS);
+ DBG_ASSERT(pSimpleSet, "Could not construct SdrHdlBitmapSet()!");
+
+ if(!pModernSet)
+ pModernSet = new SdrHdlBitmapSet(SIP_SA_FINE_MARKERS);
+ DBG_ASSERT(pModernSet, "Could not construct SdrHdlBitmapSet()!");
+}
+
+SdrHdl::~SdrHdl()
+{
+ GetRidOfIAObject();
+}
+
+void SdrHdl::Set1PixMore(BOOL bJa)
+{
+ if(b1PixMore != bJa)
+ {
+ b1PixMore = bJa;
+
+ // create new display
+ Touch();
+ }
+}
+
+void SdrHdl::SetDrehWink(long n)
+{
+ if(nDrehWink != n)
+ {
+ nDrehWink = n;
+
+ // create new display
+ Touch();
+ }
+}
+
+void SdrHdl::SetPos(const Point& rPnt)
+{
+ if(aPos != rPnt)
+ {
+ // remember new position
+ aPos = rPnt;
+
+ // create new display
+ Touch();
+ }
+}
+
+void SdrHdl::SetSelected(BOOL bJa)
+{
+ if(bSelect != bJa)
+ {
+ // remember new value
+ bSelect = bJa;
+
+ // create new display
+ Touch();
+ }
+}
+
+void SdrHdl::SetHdlList(SdrHdlList* pList)
+{
+ if(pHdlList != pList)
+ {
+ // rememver list
+ pHdlList = pList;
+
+ // now its possible to create graphic representation
+ Touch();
+ }
+}
+
+void SdrHdl::SetObj(SdrObject* pNewObj)
+{
+ if(pObj != pNewObj)
+ {
+ // remember new object
+ pObj = pNewObj;
+
+ // graphic representation may have changed
+ Touch();
+ }
+}
+
+void SdrHdl::Touch()
+{
+ // force update of graphic representation
+ CreateB2dIAObject();
+}
+
+void SdrHdl::GetRidOfIAObject()
+{
+ aIAOGroup.Delete();
+}
+
+void SdrHdl::CreateB2dIAObject()
+{
+ // first throw away old one
+ GetRidOfIAObject();
+
+ if(pHdlList && pHdlList->GetView() && !pHdlList->GetView()->IsMarkHdlHidden())
+ {
+ BitmapColorIndex eColIndex = LightGreen;
+ BitmapMarkerKind eKindOfMarker = Rect_7x7;
+
+ BOOL bRot = pHdlList->IsRotateShear();
+ if(pObj)
+ eColIndex = (bSelect) ? Cyan : LightCyan;
+ if(bRot)
+ {
+ // Drehhandles in Rot
+ if(pObj && bSelect)
+ eColIndex = Red;
+ else
+ eColIndex = LightRed;
+ }
+
+ switch(eKind)
+ {
+ case HDL_MOVE:
+ {
+ eKindOfMarker = (b1PixMore) ? Rect_9x9 : Rect_7x7;
+ break;
+ }
+ case HDL_UPLFT:
+ case HDL_UPRGT:
+ case HDL_LWLFT:
+ case HDL_LWRGT:
+ {
+ // corner handles
+ if(bRot)
+ {
+ eKindOfMarker = Circ_7x7;
+ }
+ else
+ {
+ eKindOfMarker = Rect_7x7;
+ }
+ break;
+ }
+ case HDL_UPPER:
+ case HDL_LOWER:
+ {
+ // Upper/Lower handles
+ if(bRot)
+ {
+ eKindOfMarker = Elli_9x7;
+ }
+ else
+ {
+ eKindOfMarker = Rect_7x7;
+ }
+ break;
+ }
+ case HDL_LEFT:
+ case HDL_RIGHT:
+ {
+ // Left/Right handles
+ if(bRot)
+ {
+ eKindOfMarker = Elli_7x9;
+ }
+ else
+ {
+ eKindOfMarker = Rect_7x7;
+ }
+ break;
+ }
+ case HDL_POLY:
+ {
+ if(bRot)
+ {
+ eKindOfMarker = (b1PixMore) ? Circ_9x9 : Circ_7x7;
+ }
+ else
+ {
+ eKindOfMarker = (b1PixMore) ? Rect_9x9 : Rect_7x7;
+ }
+ break;
+ }
+ case HDL_BWGT: // weight at poly
+ {
+ eKindOfMarker = Circ_7x7;
+ break;
+ }
+ case HDL_CIRC:
+ {
+ eKindOfMarker = Rect_9x9;
+ break;
+ }
+ case HDL_REF1:
+ case HDL_REF2:
+ {
+ eKindOfMarker = Crosshair;
+ break;
+ }
+ case HDL_GLUE:
+ {
+ eKindOfMarker = Glue;
+ break;
+ }
+ case HDL_ANCHOR:
+ {
+ eKindOfMarker = Anchor;
+ break;
+ }
+ case HDL_USER:
+ {
+ break;
+ }
+ }
+
+ for(UINT16 a=0;a<pHdlList->GetView()->GetWinCount();a++)
+ {
+ SdrViewWinRec& rRec = pHdlList->GetView()->GetWinRec(a);
+ Point aMoveOutsideOffset(0, 0);
+
+ // add offset if necessary
+ if(rRec.pWin && pHdlList->IsMoveOutside())
+ {
+ Size aOffset = rRec.pWin->PixelToLogic(Size(4, 4));
+
+ if(eKind == HDL_UPLFT || eKind == HDL_UPPER || eKind == HDL_UPRGT)
+ aMoveOutsideOffset.Y() -= aOffset.Width();
+ if(eKind == HDL_LWLFT || eKind == HDL_LOWER || eKind == HDL_LWRGT)
+ aMoveOutsideOffset.Y() += aOffset.Height();
+ if(eKind == HDL_UPLFT || eKind == HDL_LEFT || eKind == HDL_LWLFT)
+ aMoveOutsideOffset.X() -= aOffset.Width();
+ if(eKind == HDL_UPRGT || eKind == HDL_RIGHT || eKind == HDL_LWRGT)
+ aMoveOutsideOffset.X() += aOffset.Height();
+ }
+
+ // Manager may be zero when printing or drawing to VDevs
+ if(rRec.pIAOManager)
+ {
+ B2dIAObject* pNew = CreateMarkerObject(
+ rRec.pIAOManager,
+ aPos + aMoveOutsideOffset,
+ eColIndex,
+ eKindOfMarker);
+
+ if(pNew)
+ {
+ // set as B2DIAObject
+ aIAOGroup.InsertIAO(pNew);
+ }
+ }
+ }
+ }
+}
+
+B2dIAObject* SdrHdl::CreateMarkerObject(B2dIAOManager* pMan, Point aPos, BitmapColorIndex eColIndex, BitmapMarkerKind eKindOfMarker)
+{
+ // support bigger sizes
+ if(pHdlList->GetHdlSize() > 3)
+ {
+ switch(eKindOfMarker)
+ {
+ case Rect_7x7: eKindOfMarker = Rect_9x9; break;
+ case Rect_9x9: eKindOfMarker = Rect_11x11; break;
+ case Circ_7x7: eKindOfMarker = Circ_9x9; break;
+ case Circ_9x9: eKindOfMarker = Circ_11x11; break;
+ case Elli_7x9: eKindOfMarker = Elli_9x11; break;
+ case Elli_9x7: eKindOfMarker = Elli_11x9; break;
+ case RectPlus_7x7: eKindOfMarker = RectPlus_9x9; break;
+ case RectPlus_9x9: eKindOfMarker = RectPlus_11x11; break;
+ }
+ }
+
+ BitmapEx& rBmpEx = pHdlList->IsFineHdl()
+ ? pModernSet->GetBitmapEx(eKindOfMarker, (UINT16)eColIndex)
+ : pSimpleSet->GetBitmapEx(eKindOfMarker, (UINT16)eColIndex);
+
+ if(eKindOfMarker != Anchor)
+ return new B2dIAOBitmapExReference(pMan, aPos, &rBmpEx,
+ (UINT16)(rBmpEx.GetSizePixel().Width() - 1) >> 1,
+ (UINT16)(rBmpEx.GetSizePixel().Height() - 1) >> 1);
+ else
+ return new B2dIAOBitmapExReference(pMan, aPos, &rBmpEx);
+}
+
+BOOL SdrHdl::IsHit(const Point& rPnt, const OutputDevice& rOut) const
+{
+ if(aIAOGroup.GetIAOCount())
+ {
+ Point aPixelPos(rOut.LogicToPixel(rPnt));
+ return aIAOGroup.IsHit(aPixelPos);
+ }
+ else
+ return FALSE;
+}
+
+Pointer SdrHdl::GetPointer() const
+{
+ PointerStyle ePtr=POINTER_MOVE;
+ BOOL bSize=eKind>=HDL_UPLFT && eKind<=HDL_LWRGT;
+ // Fuer Resize von gedrehten Rechtecken die Mauszeiger etwas mitdrehen
+ if (bSize && nDrehWink!=0) {
+ long nHdlWink=0;
+ switch (eKind) {
+ case HDL_UPLFT: nHdlWink=13500; break;
+ case HDL_UPPER: nHdlWink=9000; break;
+ case HDL_UPRGT: nHdlWink=4500; break;
+ case HDL_LEFT : nHdlWink=0; break;
+ case HDL_RIGHT: nHdlWink=0; break;
+ case HDL_LWLFT: nHdlWink=4500; break;
+ case HDL_LOWER: nHdlWink=9000; break;
+ case HDL_LWRGT: nHdlWink=13500; break;
+ }
+ nHdlWink+=nDrehWink+2249; // und etwas drauf (zum runden)
+ while (nHdlWink<0) nHdlWink+=18000;
+ while (nHdlWink>=18000) nHdlWink-=18000;
+ nHdlWink/=4500;
+ switch ((BYTE)nHdlWink) {
+ case 0: ePtr=POINTER_ESIZE; break;
+ case 1: ePtr=POINTER_NESIZE; break;
+ case 2: ePtr=POINTER_SSIZE; break;
+ case 3: ePtr=POINTER_SESIZE; break;
+ } // switch
+ }
+ if (ePtr==POINTER_MOVE) {
+ BOOL bRot=pHdlList!=NULL && pHdlList->IsRotateShear();
+ BOOL bDis=pHdlList!=NULL && pHdlList->IsDistortShear();
+ if (bSize && pHdlList!=NULL && (bRot || bDis)) {
+ switch (eKind) {
+ case HDL_UPLFT: case HDL_UPRGT:
+ case HDL_LWLFT: case HDL_LWRGT: ePtr=bRot ? POINTER_ROTATE : POINTER_REFHAND; break;
+ case HDL_LEFT : case HDL_RIGHT: ePtr=POINTER_VSHEAR; break;
+ case HDL_UPPER: case HDL_LOWER: ePtr=POINTER_HSHEAR; break;
+ }
+ } else {
+ switch (eKind) {
+ case HDL_UPLFT: ePtr=POINTER_SESIZE; break;
+ case HDL_UPPER: ePtr=POINTER_SSIZE; break;
+ case HDL_UPRGT: ePtr=POINTER_NESIZE; break;
+ case HDL_LEFT : ePtr=POINTER_ESIZE; break;
+ case HDL_RIGHT: ePtr=POINTER_ESIZE; break;
+ case HDL_LWLFT: ePtr=POINTER_NESIZE; break;
+ case HDL_LOWER: ePtr=POINTER_SSIZE; break;
+ case HDL_LWRGT: ePtr=POINTER_SESIZE; break;
+ case HDL_POLY : ePtr=POINTER_MOVEPOINT; break;
+ case HDL_CIRC : ePtr=POINTER_HAND; break;
+ case HDL_REF1 : ePtr=POINTER_REFHAND; break;
+ case HDL_REF2 : ePtr=POINTER_REFHAND; break;
+ case HDL_BWGT : ePtr=POINTER_MOVEBEZIERWEIGHT; break;
+ case HDL_GLUE : ePtr=POINTER_MOVEPOINT; break;
+ }
+ }
+ }
+ return Pointer(ePtr);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// class SdrHdlColor
+
+SdrHdlColor::SdrHdlColor(const Point& rRef, Color aCol, const Size& rSize, BOOL bLum)
+: SdrHdl(rRef, HDL_COLR),
+ aMarkerSize(rSize),
+ bUseLuminance(bLum)
+{
+ if(IsUseLuminance())
+ aCol = GetLuminance(aCol);
+
+ // remember color
+ aMarkerColor = aCol;
+}
+
+SdrHdlColor::~SdrHdlColor()
+{
+}
+
+void SdrHdlColor::CreateB2dIAObject()
+{
+ // first throw away old one
+ GetRidOfIAObject();
+
+ if(pHdlList && pHdlList->GetView() && !pHdlList->GetView()->IsMarkHdlHidden())
+ {
+ for(UINT16 a=0;a<pHdlList->GetView()->GetWinCount();a++)
+ {
+ SdrViewWinRec& rRec = pHdlList->GetView()->GetWinRec(a);
+
+ // Manager may be zero when printing or drawing to VDevs
+ if(rRec.pIAOManager)
+ {
+ Bitmap aBmpCol(CreateColorDropper(aMarkerColor));
+ B2dIAObject* pNew = new B2dIAOBitmapObj(rRec.pIAOManager, aPos, aBmpCol,
+ (UINT16)(aBmpCol.GetSizePixel().Width() - 1) >> 1,
+ (UINT16)(aBmpCol.GetSizePixel().Height() - 1) >> 1);
+ DBG_ASSERT(pNew, "Got NO new IAO!");
+ aIAOGroup.InsertIAO(pNew);
+ }
+ }
+ }
+}
+
+Bitmap SdrHdlColor::CreateColorDropper(Color aCol)
+{
+ // get the Bitmap
+ Bitmap aRetval(aMarkerSize, 24);
+ aRetval.Erase(aCol);
+
+ // get write access
+ BitmapWriteAccess* pWrite = aRetval.AcquireWriteAccess();
+ DBG_ASSERT(pWrite, "Got NO write access to a new Bitmap !!!");
+
+ if(pWrite)
+ {
+ // draw outer border
+ INT32 nWidth = aMarkerSize.Width();
+ INT32 nHeight = aMarkerSize.Height();
+
+ pWrite->SetLineColor(Color(COL_LIGHTGRAY));
+ pWrite->DrawLine(Point(0, 0), Point(0, nHeight - 1));
+ pWrite->DrawLine(Point(1, 0), Point(nWidth - 1, 0));
+ pWrite->SetLineColor(Color(COL_GRAY));
+ pWrite->DrawLine(Point(1, nHeight - 1), Point(nWidth - 1, nHeight - 1));
+ pWrite->DrawLine(Point(nWidth - 1, 1), Point(nWidth - 1, nHeight - 2));
+
+ // draw lighter UpperLeft
+ B3dColor aMixCol(aCol);
+ B3dColor aFactor(0x40, 0x40, 0x40);
+ aMixCol += aFactor;
+ pWrite->SetLineColor((Color)aMixCol);
+ pWrite->DrawLine(Point(1, 1), Point(1, nHeight - 2));
+ pWrite->DrawLine(Point(2, 1), Point(nWidth - 2, 1));
+
+ // draw darker LowerRight
+ aMixCol = aCol;
+ aMixCol -= aFactor;
+ pWrite->SetLineColor((Color)aMixCol);
+ pWrite->DrawLine(Point(2, nHeight - 2), Point(nWidth - 2, nHeight - 2));
+ pWrite->DrawLine(Point(nWidth - 2, 2), Point(nWidth - 2, nHeight - 3));
+
+ // get rid of write access
+ delete pWrite;
+ }
+
+ return aRetval;
+}
+
+Color SdrHdlColor::GetLuminance(const Color& rCol)
+{
+ UINT8 aLum = rCol.GetLuminance();
+ Color aRetval(aLum, aLum, aLum);
+ return aRetval;
+}
+
+void SdrHdlColor::CallColorChangeLink()
+{
+ aColorChangeHdl.Call(this);
+}
+
+void SdrHdlColor::SetColor(Color aNew, BOOL bCallLink)
+{
+ if(IsUseLuminance())
+ aNew = GetLuminance(aNew);
+
+ if(aMarkerColor != aNew)
+ {
+ // remember new color
+ aMarkerColor = aNew;
+
+ // create new display
+ Touch();
+
+ // tell about change
+ if(bCallLink)
+ CallColorChangeLink();
+ }
+}
+
+void SdrHdlColor::SetSize(const Size& rNew)
+{
+ if(rNew != aMarkerSize)
+ {
+ // remember new size
+ aMarkerSize = rNew;
+
+ // create new display
+ Touch();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// class SdrHdlGradient
+
+SdrHdlGradient::SdrHdlGradient(const Point& rRef1, const Point& rRef2, BOOL bGrad)
+: SdrHdl(rRef1, bGrad ? HDL_GRAD : HDL_TRNS),
+ a2ndPos(rRef2),
+ bGradient(bGrad),
+ pColHdl1(NULL),
+ pColHdl2(NULL)
+{
+}
+
+SdrHdlGradient::~SdrHdlGradient()
+{
+}
+
+void SdrHdlGradient::Set2ndPos(const Point& rPnt)
+{
+ if(a2ndPos != rPnt)
+ {
+ // remember new position
+ a2ndPos = rPnt;
+
+ // create new display
+ Touch();
+ }
+}
+
+void SdrHdlGradient::CreateB2dIAObject()
+{
+ // first throw away old one
+ GetRidOfIAObject();
+
+ if(pHdlList && pHdlList->GetView() && !pHdlList->GetView()->IsMarkHdlHidden())
+ {
+ for(UINT16 a=0;a<pHdlList->GetView()->GetWinCount();a++)
+ {
+ SdrViewWinRec& rRec = pHdlList->GetView()->GetWinRec(a);
+
+ // Manager may be zero when printing or drawing to VDevs
+ if(rRec.pIAOManager)
+ {
+ // striped line in between
+ Vector2D aVec(a2ndPos.X() - aPos.X(), a2ndPos.Y() - aPos.Y());
+ double fVecLen = aVec.GetLength();
+ double fLongPercentArrow = (1.0 - 0.05) * fVecLen;
+ double fHalfArrowWidth = (0.05 * 0.5) * fVecLen;
+ aVec.Normalize();
+ Vector2D aPerpend(-aVec.Y(), aVec.X());
+ INT32 nMidX = (INT32)(aPos.X() + aVec.X() * fLongPercentArrow);
+ INT32 nMidY = (INT32)(aPos.Y() + aVec.Y() * fLongPercentArrow);
+ Point aMidPoint(nMidX, nMidY);
+ B2dIAObject* pNew = new B2dIAOLineStriped(rRec.pIAOManager, aPos, aMidPoint, 4);
+ DBG_ASSERT(pNew, "Got NO new IAO!");
+ pNew->SetBaseColor(IsGradient() ? Color(COL_BLACK) : Color(COL_BLUE));
+ aIAOGroup.InsertIAO(pNew);
+
+ // arrowhead
+ Point aLeft(aMidPoint.X() + (INT32)(aPerpend.X() * fHalfArrowWidth),
+ aMidPoint.Y() + (INT32)(aPerpend.Y() * fHalfArrowWidth));
+ Point aRight(aMidPoint.X() - (INT32)(aPerpend.X() * fHalfArrowWidth),
+ aMidPoint.Y() - (INT32)(aPerpend.Y() * fHalfArrowWidth));
+ pNew = new B2dIAOBitmapTriangle(rRec.pIAOManager, aLeft, a2ndPos, aRight, IsGradient() ? Color(COL_BLACK) : Color(COL_BLUE));
+ DBG_ASSERT(pNew, "Got NO new IAO!");
+ aIAOGroup.InsertIAO(pNew);
+ }
+ }
+ }
+}
+
+IMPL_LINK(SdrHdlGradient, ColorChangeHdl, SdrHdl*, pHdl)
+{
+ if(GetObj())
+ FromIAOToItem(GetObj(), TRUE, TRUE);
+ return NULL;
+}
+
+void SdrHdlGradient::FromIAOToItem(SdrObject* pObj, BOOL bSetItemOnObject, BOOL bUndo)
+{
+ // from IAO positions and colors to gradient
+ SfxItemSet aSet(pObj->GetModel()->GetItemPool());
+ pObj->TakeAttributes(aSet, FALSE, FALSE);
+
+ GradTransformer aGradTransformer;
+ GradTransGradient aOldGradTransGradient;
+ GradTransGradient aGradTransGradient;
+ GradTransVector aGradTransVector;
+
+ String aString;
+
+ aGradTransVector.aPos1 = GetPos();
+ aGradTransVector.aPos2 = Get2ndPos();
+ if(pColHdl1)
+ aGradTransVector.aCol1 = pColHdl1->GetColor();
+ if(pColHdl2)
+ aGradTransVector.aCol2 = pColHdl2->GetColor();
+
+ if(IsGradient())
+ aOldGradTransGradient.aGradient = ((XFillGradientItem&)aSet.Get(XATTR_FILLGRADIENT)).GetValue();
+ else
+ aOldGradTransGradient.aGradient = ((XFillFloatTransparenceItem&)aSet.Get(XATTR_FILLFLOATTRANSPARENCE)).GetValue();
+
+ // transform vector data to gradient
+ aGradTransformer.VecToGrad(aGradTransVector, aGradTransGradient, aOldGradTransGradient, pObj, bMoveSingleHandle, bMoveFirstHandle);
+
+ if(bSetItemOnObject)
+ {
+ SdrModel* pModel = pObj->GetModel();
+ SfxItemSet aNewSet(pModel->GetItemPool());
+
+ if(IsGradient())
+ {
+ aString = String();
+ XFillGradientItem aNewGradItem(aString, aGradTransGradient.aGradient);
+ aNewSet.Put(aNewGradItem);
+ }
+ else
+ {
+ aString = String();
+ XFillFloatTransparenceItem aNewTransItem(aString, aGradTransGradient.aGradient);
+ aNewSet.Put(aNewTransItem);
+ }
+
+ if(bUndo)
+ {
+ pModel->BegUndo(SVX_RESSTR(IsGradient() ? SIP_XA_FILLGRADIENT : SIP_XA_FILLTRANSPARENCE));
+ pModel->AddUndo(new SdrUndoAttrObj(*pObj));
+ pModel->EndUndo();
+ }
+
+ pObj->SetAttributes(aNewSet, FALSE);
+ }
+
+ // back transformation, set values on pIAOHandle
+ aGradTransformer.GradToVec(aGradTransGradient, aGradTransVector, pObj);
+
+ SetPos(aGradTransVector.aPos1);
+ Set2ndPos(aGradTransVector.aPos2);
+ if(pColHdl1)
+ {
+ pColHdl1->SetPos(aGradTransVector.aPos1);
+ pColHdl1->SetColor(aGradTransVector.aCol1);
+ }
+ if(pColHdl2)
+ {
+ pColHdl2->SetPos(aGradTransVector.aPos2);
+ pColHdl2->SetColor(aGradTransVector.aCol2);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrHdlLine::~SdrHdlLine() {}
+
+void SdrHdlLine::CreateB2dIAObject()
+{
+ // first throw away old one
+ GetRidOfIAObject();
+
+ if(pHdlList && pHdlList->GetView() && !pHdlList->GetView()->IsMarkHdlHidden() && pHdl1 && pHdl2)
+ {
+ for(UINT16 a=0;a<pHdlList->GetView()->GetWinCount();a++)
+ {
+ SdrViewWinRec& rRec = pHdlList->GetView()->GetWinRec(a);
+
+ // Manager may be zero when printing or drawing to VDevs
+ if(rRec.pIAOManager)
+ {
+ B2dIAObject* pNew = new B2dIAOLine(
+ rRec.pIAOManager,
+ pHdl1->GetPos(),
+ pHdl2->GetPos());
+
+ if(pNew)
+ {
+ // color(?)
+ pNew->SetBaseColor(Color(COL_LIGHTRED));
+
+ // set as B2DIAObject
+ aIAOGroup.InsertIAO(pNew);
+ }
+ }
+ }
+ }
+}
+
+BOOL SdrHdlLine::IsHit(const Point& rPnt, const OutputDevice& rOut) const
+{
+ if(aIAOGroup.GetIAOCount())
+ {
+ Point aPixelPos(rOut.LogicToPixel(rPnt));
+ return aIAOGroup.IsHit(aPixelPos, 2);
+ }
+ else
+ return FALSE;
+}
+
+Pointer SdrHdlLine::GetPointer() const
+{
+ return Pointer(POINTER_REFHAND);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrHdlBezWgt::~SdrHdlBezWgt() {}
+
+void SdrHdlBezWgt::CreateB2dIAObject()
+{
+ // call parent
+ SdrHdl::CreateB2dIAObject();
+
+ // create lines
+ if(pHdlList && pHdlList->GetView() && !pHdlList->GetView()->IsMarkHdlHidden())
+ {
+ for(UINT16 a=0;a<pHdlList->GetView()->GetWinCount();a++)
+ {
+ SdrViewWinRec& rRec = pHdlList->GetView()->GetWinRec(a);
+
+ // Manager may be zero when printing or drawing to VDevs
+ if(rRec.pIAOManager)
+ {
+ B2dIAObject* pNew = new B2dIAOLine(
+ rRec.pIAOManager,
+ pHdl1->GetPos(),
+ aPos);
+
+ if(pNew)
+ {
+ // line part is not hittable
+ pNew->SetHittable(FALSE);
+
+ // color(?)
+ pNew->SetBaseColor(Color(COL_LIGHTBLUE));
+
+ // set as B2DIAObject
+ aIAOGroup.InsertIAO(pNew);
+ }
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+E3dVolumeMarker::E3dVolumeMarker(const XPolyPolygon& rXPP)
+{
+ aWireframePoly = rXPP;
+}
+
+void E3dVolumeMarker::CreateB2dIAObject()
+{
+ // create lines
+ if(pHdlList && pHdlList->GetView() && !pHdlList->GetView()->IsMarkHdlHidden())
+ {
+ for(UINT16 a=0;a<pHdlList->GetView()->GetWinCount();a++)
+ {
+ SdrViewWinRec& rRec = pHdlList->GetView()->GetWinRec(a);
+
+ // Manager may be zero when printing or drawing to VDevs
+ if(rRec.pIAOManager)
+ {
+ UINT16 nCnt = aWireframePoly.Count();
+ for(UINT16 i = 0; i < nCnt; i++)
+ {
+ B2dIAObject* pNew = new B2dIAOLine(
+ rRec.pIAOManager,
+ aWireframePoly[i][0],
+ aWireframePoly[i][1]);
+
+ if(pNew)
+ {
+ // color(?)
+ pNew->SetBaseColor(Color(COL_BLACK));
+
+ // set as B2DIAObject
+ aIAOGroup.InsertIAO(pNew);
+ }
+ }
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ImpEdgeHdl::~ImpEdgeHdl()
+{
+}
+
+void ImpEdgeHdl::CreateB2dIAObject()
+{
+ if(nObjHdlNum <= 1 && pObj)
+ {
+ // first throw away old one
+ GetRidOfIAObject();
+
+ BitmapColorIndex eColIndex = LightCyan;
+ BitmapMarkerKind eKindOfMarker = Rect_7x7;
+
+ if(pHdlList && pHdlList->GetView() && !pHdlList->GetView()->IsMarkHdlHidden())
+ {
+ const SdrEdgeObj* pEdge = (SdrEdgeObj*)pObj;
+
+ if(pEdge->GetConnectedNode(nObjHdlNum == 0) != NULL)
+ eColIndex = LightRed;
+
+ if(nPPntNum < 2)
+ {
+ // Handle with plus sign inside
+ eKindOfMarker = Circ_7x7;
+ }
+
+ for(UINT16 a=0;a<pHdlList->GetView()->GetWinCount();a++)
+ {
+ SdrViewWinRec& rRec = pHdlList->GetView()->GetWinRec(a);
+
+ // Manager may be zero when printing or drawing to VDevs
+ if(rRec.pIAOManager)
+ {
+ B2dIAObject* pNew = CreateMarkerObject(
+ rRec.pIAOManager,
+ aPos,
+ eColIndex,
+ eKindOfMarker);
+
+ if(pNew)
+ {
+ // set as B2DIAObject
+ aIAOGroup.InsertIAO(pNew);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ // call parent
+ SdrHdl::CreateB2dIAObject();
+ }
+}
+
+void ImpEdgeHdl::SetLineCode(SdrEdgeLineCode eCode)
+{
+ if(eLineCode != eCode)
+ {
+ // remember new value
+ eLineCode = eCode;
+
+ // create new display
+ CreateB2dIAObject();
+ }
+}
+
+Pointer ImpEdgeHdl::GetPointer() const
+{
+ SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pObj);
+ if (pEdge==NULL) return SdrHdl::GetPointer();
+ if (nObjHdlNum<=1) return Pointer(POINTER_MOVEPOINT); //Pointer(POINTER_DRAW_CONNECT);
+ if (IsHorzDrag()) return Pointer(POINTER_ESIZE);
+ else return Pointer(POINTER_SSIZE);
+}
+
+BOOL ImpEdgeHdl::IsHorzDrag() const
+{
+ SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pObj);
+ if (pEdge==NULL) return FALSE;
+ if (nObjHdlNum<=1) return FALSE;
+ SdrEdgeKind eKind=SDREDGE_ORTHOLINES;
+ if (pEdge->pEdgeAttr!=NULL) eKind=((SdrEdgeKindItem&)(pEdge->pEdgeAttr->GetItemSet().Get(SDRATTR_EDGEKIND))).GetValue();
+ const SdrEdgeInfoRec& rInfo=pEdge->aEdgeInfo;
+ if (eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) {
+ return !rInfo.ImpIsHorzLine(eLineCode,*pEdge->pEdgeTrack);
+ } else if (eKind==SDREDGE_THREELINES) {
+ long nWink=nObjHdlNum==2 ? rInfo.nAngle1 : rInfo.nAngle2;
+ if (nWink==0 || nWink==18000) return TRUE;
+ else return FALSE;
+ }
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ImpMeasureHdl::~ImpMeasureHdl()
+{
+}
+
+void ImpMeasureHdl::CreateB2dIAObject()
+{
+ // first throw away old one
+ GetRidOfIAObject();
+
+ if(pHdlList && pHdlList->GetView() && !pHdlList->GetView()->IsMarkHdlHidden())
+ {
+ BitmapColorIndex eColIndex = LightCyan;
+ BitmapMarkerKind eKindOfMarker = Rect_9x9;
+
+ if(nObjHdlNum > 1)
+ {
+ eKindOfMarker = Rect_7x7;
+ }
+
+ if(bSelect)
+ {
+ eColIndex = Cyan;
+ }
+
+ for(UINT16 a=0;a<pHdlList->GetView()->GetWinCount();a++)
+ {
+ SdrViewWinRec& rRec = pHdlList->GetView()->GetWinRec(a);
+
+ // Manager may be zero when printing or drawing to VDevs
+ if(rRec.pIAOManager)
+ {
+ B2dIAObject* pNew = CreateMarkerObject(
+ rRec.pIAOManager,
+ aPos,
+ eColIndex,
+ eKindOfMarker);
+
+ if(pNew)
+ {
+ // set as B2DIAObject
+ aIAOGroup.InsertIAO(pNew);
+ }
+ }
+ }
+ }
+}
+
+Pointer ImpMeasureHdl::GetPointer() const
+{
+ switch (nObjHdlNum) {
+ case 0: case 1: return Pointer(POINTER_HAND);
+ case 2: case 3: return Pointer(POINTER_MOVEPOINT);
+ case 4: case 5: return SdrHdl::GetPointer(); // wird dann entsprechend gedreht
+ } // switch
+ return Pointer(POINTER_NOTALLOWED);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpSdrHdlListSorter: public ContainerSorter {
+public:
+ ImpSdrHdlListSorter(Container& rNewCont): ContainerSorter(rNewCont) {}
+ virtual int Compare(const void* pElem1, const void* pElem2) const;
+};
+
+int ImpSdrHdlListSorter::Compare(const void* pElem1, const void* pElem2) const
+{
+ SdrHdlKind eKind1=((SdrHdl*)pElem1)->GetKind();
+ SdrHdlKind eKind2=((SdrHdl*)pElem2)->GetKind();
+ // Level 1: Erst normale Handles, dann Glue, dann User, dann Plushandles, dann Retpunkt-Handles
+ unsigned n1=1;
+ unsigned n2=1;
+ if (eKind1!=eKind2) {
+ if (eKind1==HDL_REF1 || eKind1==HDL_REF2 || eKind1==HDL_MIRX) n1=5;
+ else if (eKind1==HDL_GLUE) n1=2;
+ else if (eKind1==HDL_USER) n1=3;
+ if (eKind2==HDL_REF1 || eKind2==HDL_REF2 || eKind2==HDL_MIRX) n2=5;
+ else if (eKind2==HDL_GLUE) n2=2;
+ else if (eKind2==HDL_USER) n2=3;
+ }
+ if (((SdrHdl*)pElem1)->IsPlusHdl()) n1=4;
+ if (((SdrHdl*)pElem2)->IsPlusHdl()) n2=4;
+ if (n1==n2) {
+ // Level 2: PageView (Pointer)
+ SdrPageView* pPV1=((SdrHdl*)pElem1)->GetPageView();
+ SdrPageView* pPV2=((SdrHdl*)pElem2)->GetPageView();
+ if (pPV1==pPV2) {
+ // Level 3: Position (x+y)
+ SdrObject* pObj1=((SdrHdl*)pElem1)->GetObj();
+ SdrObject* pObj2=((SdrHdl*)pElem2)->GetObj();
+ if (pObj1==pObj2) {
+ USHORT nNum1=((SdrHdl*)pElem1)->GetObjHdlNum();
+ USHORT nNum2=((SdrHdl*)pElem2)->GetObjHdlNum();
+ if (nNum1==nNum2) { // #48763#
+ if (eKind1==eKind2) (long)pElem1<(long)pElem2 ? -1 : 1; // Notloesung, um immer die gleiche Sortierung zu haben
+ return (USHORT)eKind1<(USHORT)eKind2 ? -1 : 1;
+ } else return nNum1<nNum2 ? -1 : 1;
+ } else {
+ return (long)pObj1<(long)pObj2 ? -1 : 1;
+ }
+ } else {
+ return (long)pPV1<(long)pPV2 ? -1 : 1;
+ }
+ } else {
+ return n1<n2 ? -1 : 1;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrHdlList::SdrHdlList(SdrMarkView* pV)
+: aList(1024,32,32),
+ pView(pV)
+{
+ nHdlSize = 3;
+ bRotateShear = FALSE;
+ bMoveOutside = FALSE;
+ bDistortShear = FALSE;
+ bFineHandles = FALSE;
+}
+
+SdrHdlList::~SdrHdlList()
+{
+ Clear();
+}
+
+void SdrHdlList::SetHdlSize(USHORT nSiz)
+{
+ if(nHdlSize != nSiz)
+ {
+ // remember new value
+ nHdlSize = nSiz;
+
+ // propagate change to IAOs
+ for(UINT32 i=0; i<GetHdlCount(); i++)
+ {
+ SdrHdl* pHdl = GetHdl(i);
+ pHdl->Touch();
+ }
+ }
+}
+
+void SdrHdlList::SetMoveOutside(BOOL bOn)
+{
+ if(bMoveOutside != bOn)
+ {
+ // remember new value
+ bMoveOutside = bOn;
+
+ // propagate change to IAOs
+ for(UINT32 i=0; i<GetHdlCount(); i++)
+ {
+ SdrHdl* pHdl = GetHdl(i);
+ pHdl->Touch();
+ }
+ }
+}
+
+void SdrHdlList::SetRotateShear(BOOL bOn)
+{
+ bRotateShear = bOn;
+}
+
+void SdrHdlList::SetDistortShear(BOOL bOn)
+{
+ bDistortShear = bOn;
+}
+
+void SdrHdlList::SetFineHdl(BOOL bOn)
+{
+ if(bFineHandles != bOn)
+ {
+ // remember new state
+ bFineHandles = bOn;
+
+ // propagate change to IAOs
+ for(UINT32 i=0; i<GetHdlCount(); i++)
+ {
+ SdrHdl* pHdl = GetHdl(i);
+ pHdl->Touch();
+ }
+ }
+}
+
+SdrHdl* SdrHdlList::RemoveHdl(ULONG nNum)
+{
+ SdrHdl* pRetval = (SdrHdl*)aList.Remove(nNum);
+ return pRetval;
+}
+
+void SdrHdlList::Clear()
+{
+ for (ULONG i=0; i<GetHdlCount(); i++)
+ {
+ SdrHdl* pHdl=GetHdl(i);
+ delete pHdl;
+ }
+ aList.Clear();
+
+ // immediately remove from display
+ if(pView)
+ pView->RefreshAllIAOManagers();
+
+ bRotateShear=FALSE;
+ bDistortShear=FALSE;
+}
+
+void SdrHdlList::Sort()
+{
+ ImpSdrHdlListSorter aSort(aList);
+ aSort.DoSort();
+}
+
+ULONG SdrHdlList::GetHdlNum(const SdrHdl* pHdl) const
+{
+ if (pHdl==NULL) return CONTAINER_ENTRY_NOTFOUND;
+ ULONG nPos=aList.GetPos(pHdl);
+ return nPos;
+}
+
+void SdrHdlList::AddHdl(SdrHdl* pHdl, BOOL bAtBegin)
+{
+ if (pHdl!=NULL) {
+ if (bAtBegin) {
+ aList.Insert(pHdl,ULONG(0));
+ } else {
+ aList.Insert(pHdl,CONTAINER_APPEND);
+ }
+ pHdl->SetHdlList(this);
+ }
+}
+
+SdrHdl* SdrHdlList::HitTest(const Point& rPnt, const OutputDevice& rOut, BOOL bBack, BOOL bNext, SdrHdl* pHdl0) const
+{
+ SdrHdl* pRet=NULL;
+ ULONG nAnz=GetHdlCount();
+ ULONG nNum=bBack ? 0 : nAnz;
+ while ((bBack ? nNum<nAnz : nNum>0) && pRet==NULL) {
+ if (!bBack) nNum--;
+ SdrHdl* pHdl=GetHdl(nNum);
+ if (bNext) {
+ if (pHdl==pHdl0) bNext=FALSE;
+ } else {
+ if (pHdl->IsHit(rPnt,rOut)) pRet=pHdl;
+ }
+ if (bBack) nNum++;
+ }
+ return pRet;
+}
+
+SdrHdl* SdrHdlList::GetHdl(SdrHdlKind eKind1) const
+{
+ SdrHdl* pRet=NULL;
+ for (ULONG i=0; i<GetHdlCount() && pRet==NULL; i++) {
+ SdrHdl* pHdl=GetHdl(i);
+ if (pHdl->GetKind()==eKind1) pRet=pHdl;
+ }
+ return pRet;
+}
+
diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx
new file mode 100644
index 0000000000..5bb4c6ec25
--- /dev/null
+++ b/svx/source/svdraw/svdhlpln.cxx
@@ -0,0 +1,302 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdhlpln.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdhlpln.hxx"
+#include "svdio.hxx"
+
+#ifndef _GDIOBJ_HXX //autogen
+#include <vcl/gdiobj.hxx>
+#endif
+
+#ifndef _COLOR_HXX //autogen
+#include <vcl/color.hxx>
+#endif
+
+#ifndef _OUTDEV_HXX //autogen
+#include <vcl/outdev.hxx>
+#endif
+
+#ifndef _SV_WINDOW_HXX //autogen
+#include <vcl/window.hxx>
+#endif
+
+#ifndef _SV_POLY_HXX //autogen
+#include <vcl/poly.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+Pointer SdrHelpLine::GetPointer() const
+{
+ switch (eKind) {
+ case SDRHELPLINE_VERTICAL : return Pointer(POINTER_ESIZE); break;
+ case SDRHELPLINE_HORIZONTAL: return Pointer(POINTER_SSIZE); break;
+ default : return Pointer(POINTER_MOVE); break;
+ } // switch
+}
+
+void SdrHelpLine::Draw(OutputDevice& rOut, const Point& rOfs) const
+{
+ Point aPnt(rOut.LogicToPixel(aPos+rOfs));
+ long x=aPnt.X();
+ long y=aPnt.Y();
+ long nMin=0;
+ long nMax=2048;
+ FASTBOOL bMap0=rOut.IsMapModeEnabled();
+ rOut.EnableMapMode(FALSE);
+ switch (eKind) {
+ case SDRHELPLINE_VERTICAL :
+ {
+ if (rOut.GetOutDevType() == OUTDEV_WINDOW)
+ {
+ Point aLine[2];
+ aLine[0].X() = x; aLine[0].Y() = nMin;
+ aLine[1].X() = x; aLine[1].Y() = nMax;
+ ((Window&) rOut).InvertTracking(Polygon(2, aLine), SHOWTRACK_WINDOW);
+ }
+ else
+ {
+ rOut.DrawLine(Point(x,nMin),Point(x,nMax));
+ }
+ }
+ break;
+
+ case SDRHELPLINE_HORIZONTAL:
+ {
+ if (rOut.GetOutDevType() == OUTDEV_WINDOW)
+ {
+ Point aLine[2];
+ aLine[0].X() = nMin; aLine[0].Y() = y;
+ aLine[1].X() = nMax; aLine[1].Y() = y;
+ ((Window&) rOut).InvertTracking(Polygon(2, aLine), SHOWTRACK_WINDOW);
+ }
+ else
+ {
+ rOut.DrawLine(Point(nMin,y),Point(nMax,y));
+ }
+ }
+ break;
+
+ case SDRHELPLINE_POINT :
+ {
+ int r=SDRHELPLINE_POINT_PIXELSIZE;
+
+ if (rOut.GetOutDevType() == OUTDEV_WINDOW)
+ {
+ Point aHLine[2];
+ aHLine[0].X() = x-r; aHLine[0].Y() = y;
+ aHLine[1].X() = x+r; aHLine[1].Y() = y;
+ ((Window&) rOut).InvertTracking(Polygon(2, aHLine), SHOWTRACK_WINDOW);
+
+ Point aVLine[2];
+ aVLine[0].X() = x; aVLine[0].Y() = y-r;
+ aVLine[1].X() = x; aVLine[1].Y() = y+r;
+ ((Window&) rOut).InvertTracking(Polygon(2, aVLine), SHOWTRACK_WINDOW);
+ }
+ else
+ {
+ rOut.DrawLine(Point(x-r,y),Point(x+r,y));
+ rOut.DrawLine(Point(x,y-r),Point(x,y+r));
+ }
+ }
+ break;
+
+ } // switch
+ rOut.EnableMapMode(bMap0);
+}
+
+FASTBOOL SdrHelpLine::IsHit(const Point& rPnt, USHORT nTolLog, const OutputDevice& rOut) const
+{
+ Size a1Pix(rOut.PixelToLogic(Size(1,1)));
+ FASTBOOL bXHit=rPnt.X()>=aPos.X()-nTolLog && rPnt.X()<=aPos.X()+nTolLog+a1Pix.Width();
+ FASTBOOL bYHit=rPnt.Y()>=aPos.Y()-nTolLog && rPnt.Y()<=aPos.Y()+nTolLog+a1Pix.Height();
+ switch (eKind) {
+ case SDRHELPLINE_VERTICAL : return bXHit; break;
+ case SDRHELPLINE_HORIZONTAL: return bYHit; break;
+ case SDRHELPLINE_POINT: {
+ if (bXHit || bYHit) {
+ Size aRad(rOut.PixelToLogic(Size(SDRHELPLINE_POINT_PIXELSIZE,SDRHELPLINE_POINT_PIXELSIZE)));
+ return rPnt.X()>=aPos.X()-aRad.Width() && rPnt.X()<=aPos.X()+aRad.Width()+a1Pix.Width() &&
+ rPnt.Y()>=aPos.Y()-aRad.Height() && rPnt.Y()<=aPos.Y()+aRad.Height()+a1Pix.Height();
+ }
+ } break;
+ } // switch
+ return FALSE;
+}
+
+Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const
+{
+ Rectangle aRet(aPos,aPos);
+ Point aOfs(rOut.GetMapMode().GetOrigin());
+ Size aSiz(rOut.GetOutputSize());
+ switch (eKind) {
+ case SDRHELPLINE_VERTICAL : aRet.Top()=-aOfs.Y(); aRet.Bottom()=-aOfs.Y()+aSiz.Height(); break;
+ case SDRHELPLINE_HORIZONTAL: aRet.Left()=-aOfs.X(); aRet.Right()=-aOfs.X()+aSiz.Width(); break;
+ case SDRHELPLINE_POINT : {
+ Size aRad(rOut.PixelToLogic(Size(SDRHELPLINE_POINT_PIXELSIZE,SDRHELPLINE_POINT_PIXELSIZE)));
+ aRet.Left() -=aRad.Width();
+ aRet.Right() +=aRad.Width();
+ aRet.Top() -=aRad.Height();
+ aRet.Bottom()+=aRad.Height();
+ } break;
+ } // switch
+ return aRet;
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrHelpLine& rHL)
+{
+ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOHlpLID);
+ rOut<<UINT16(rHL.eKind);
+ rOut<<rHL.aPos;
+ return rOut;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrHelpLine& rHL)
+{
+ SdrIOHeader aHead(rIn,STREAM_READ);
+ UINT16 nDum;
+ rIn>>nDum;
+ rHL.eKind=(SdrHelpLineKind)nDum;
+ rIn>>rHL.aPos;
+ return rIn;
+}
+
+void SdrHelpLineList::Clear()
+{
+ USHORT nAnz=GetCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ delete GetObject(i);
+ }
+ aList.Clear();
+}
+
+void SdrHelpLineList::operator=(const SdrHelpLineList& rSrcList)
+{
+ Clear();
+ USHORT nAnz=rSrcList.GetCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ Insert(rSrcList[i]);
+ }
+}
+
+FASTBOOL SdrHelpLineList::operator==(const SdrHelpLineList& rSrcList) const
+{
+ FASTBOOL bEqual=FALSE;
+ USHORT nAnz=GetCount();
+ if (nAnz==rSrcList.GetCount()) {
+ bEqual=TRUE;
+ for (USHORT i=0; i<nAnz && bEqual; i++) {
+ if (*GetObject(i)!=*rSrcList.GetObject(i)) {
+ bEqual=FALSE;
+ }
+ }
+ }
+ return bEqual;
+}
+
+void SdrHelpLineList::DrawAll(OutputDevice& rOut, const Point& rOfs) const
+{
+ Color aOldLineColor( rOut.GetLineColor() );
+
+ rOut.SetLineColor( Color( COL_GREEN ) );
+
+ USHORT nAnz=GetCount();
+ for (USHORT i=0; i<nAnz; i++)
+ GetObject(i)->Draw(rOut,rOfs);
+
+ rOut.SetLineColor( aOldLineColor );
+}
+
+USHORT SdrHelpLineList::HitTest(const Point& rPnt, USHORT nTolLog, const OutputDevice& rOut) const
+{
+ USHORT nAnz=GetCount();
+ for (USHORT i=nAnz; i>0;) {
+ i--;
+ if (GetObject(i)->IsHit(rPnt,nTolLog,rOut)) return i;
+ }
+ return SDRHELPLINE_NOTFOUND;
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrHelpLineList& rHLL)
+{
+ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOHLstID);
+ USHORT nAnz=rHLL.GetCount();
+ rOut<<nAnz;
+ for (USHORT i=0; i<nAnz; i++) {
+ rOut<<rHLL[i];
+ }
+ return rOut;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrHelpLineList& rHLL)
+{
+ SdrIOHeader aHead(rIn,STREAM_READ);
+ rHLL.Clear();
+ USHORT nAnz;
+ rIn>>nAnz;
+ for (USHORT i=0; i<nAnz; i++) {
+ SdrHelpLine* pHL=new SdrHelpLine;
+ rIn>>*pHL;
+ rHLL.aList.Insert(pHL,CONTAINER_APPEND);
+ }
+ return rIn;
+}
+
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
new file mode 100644
index 0000000000..a16906a6b6
--- /dev/null
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -0,0 +1,1358 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdibrow.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+
+#include "svdibrow.hxx"
+
+#ifndef _STDLIB_H
+#include <stdlib.h>
+#define _STDLIB_H
+#endif
+
+#include "svditext.hxx"
+#include "flditem.hxx"
+#include "editdata.hxx"
+#include "svdpool.hxx"
+#include "svdattr.hxx"
+#include "svdattrx.hxx"
+#include "svdview.hxx"
+
+#ifndef _XENUM_HXX //autogen
+#include "xenum.hxx"
+#endif
+
+#ifndef _SVX_XLINEIT0_HXX //autogen
+#include "xlineit0.hxx"
+#endif
+
+#ifndef _SVX_XLNSTWIT_HXX //autogen
+#include "xlnstwit.hxx"
+#endif
+
+#ifndef _SVX_XLNEDWIT_HXX //autogen
+#include "xlnedwit.hxx"
+#endif
+
+#ifndef SVX_XFILLIT0_HXX //autogen
+#include "xfillit0.hxx"
+#endif
+
+#ifndef _SVX_XFLBMTIT_HXX //autogen
+#include "xflbmtit.hxx"
+#endif
+
+#ifndef _SVX_TEXTIT0_HXX //autogen
+#include "xtextit0.hxx"
+#endif
+
+#ifndef _SVX_XFLBSTIT_HXX //autogen
+#include "xflbstit.hxx"
+#endif
+
+#ifndef _SVX_XFLBTOXY_HXX //autogen
+#include "xflbtoxy.hxx"
+#endif
+
+#ifndef _SVX_XFTSHIT_HXX //autogen
+#include "xftshit.hxx"
+#endif
+
+#ifndef _SVX_COLRITEM_HXX //autogen
+#include "colritem.hxx"
+#endif
+
+#ifndef _EEITEMID_HXX
+#include <eeitemid.hxx>
+#endif
+
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include "fontitem.hxx"
+#endif
+
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include "fhgtitem.hxx"
+#endif
+
+#ifndef _SVX_FWDTITEM_HXX //autogen
+#include "fwdtitem.hxx"
+#endif
+
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+
+#ifndef _SFXFLAGITEM_HXX //autogen
+#include <svtools/flagitem.hxx>
+#endif
+
+#ifndef _SFXPTITEM_HXX //autogen
+#include <svtools/ptitem.hxx>
+#endif
+
+#ifndef _SFXRECTITEM_HXX //autogen
+#include <svtools/rectitem.hxx>
+#endif
+
+#ifndef _SFXRNGITEM_HXX
+#include <svtools/rngitem.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#define ITEMBROWSER_WHICHCOL_ID 1
+#define ITEMBROWSER_STATECOL_ID 2
+#define ITEMBROWSER_TYPECOL_ID 3
+#define ITEMBROWSER_NAMECOL_ID 4
+#define ITEMBROWSER_VALUECOL_ID 5
+
+enum ItemType {
+ ITEM_DONTKNOW, ITEM_BYTE, ITEM_INT16, ITEM_UINT16, ITEM_INT32, ITEM_UINT32,
+ ITEM_ENUM, ITEM_BOOL, ITEM_FLAG, ITEM_STRING, ITEM_POINT, ITEM_RECT, ITEM_RANGE, ITEM_LRANGE,
+ ITEM_FRACTION,
+ ITEM_XCOLOR,
+ ITEM_COLOR,
+ ITEM_FONT, ITEM_FONTHEIGHT, ITEM_FONTWIDTH, ITEM_FIELD
+};
+
+class ImpItemListRow
+{
+public:
+ XubString aName;
+ XubString aValue;
+ SfxItemState eState;
+ UINT16 nWhichId;
+
+ TypeId pType;
+ ItemType eItemType;
+
+ INT32 nVal;
+ INT32 nMin;
+ INT32 nMax;
+
+ BOOL bComment;
+ BOOL bIsNum;
+ BOOL bCanNum;
+
+public:
+ ImpItemListRow()
+ : eState(SFX_ITEM_UNKNOWN),
+ pType(NULL),
+ eItemType(ITEM_DONTKNOW),
+ nWhichId(0),
+ bComment(FALSE),
+ bIsNum(FALSE),
+ bCanNum(FALSE),
+ nVal(0),
+ nMin(0),
+ nMax(0)
+ {}
+
+ XubString GetItemTypeStr() const;
+ BOOL operator==(const ImpItemListRow& rEntry) const;
+ BOOL operator!=(const ImpItemListRow& rEntry) const { return !operator==(rEntry); }
+};
+
+XubString ImpItemListRow::GetItemTypeStr() const
+{
+ XubString aStr;
+
+ switch(eItemType)
+ {
+ case ITEM_BYTE : aStr.AppendAscii("Byte"); break;
+ case ITEM_INT16 : aStr.AppendAscii("Int16"); break;
+ case ITEM_UINT16 : aStr.AppendAscii("UInt16"); break;
+ case ITEM_INT32 : aStr.AppendAscii("Int32"); break;
+ case ITEM_UINT32 : aStr.AppendAscii("UInt32"); break;
+ case ITEM_ENUM : aStr.AppendAscii("Enum"); break;
+ case ITEM_BOOL : aStr.AppendAscii("Bool"); break;
+ case ITEM_FLAG : aStr.AppendAscii("Flag"); break;
+ case ITEM_STRING : aStr.AppendAscii("String"); break;
+ case ITEM_POINT : aStr.AppendAscii("Point"); break;
+ case ITEM_RECT : aStr.AppendAscii("Rectangle");break;
+ case ITEM_RANGE : aStr.AppendAscii("Range"); break;
+ case ITEM_LRANGE : aStr.AppendAscii("LRange"); break;
+ case ITEM_FRACTION : aStr.AppendAscii("Fraction"); break;
+ case ITEM_XCOLOR : aStr.AppendAscii("XColor"); break;
+ case ITEM_COLOR : aStr.AppendAscii("Color"); break;
+ case ITEM_FONT : aStr.AppendAscii("Font"); break;
+ case ITEM_FONTHEIGHT:aStr.AppendAscii("FontHeight");break;
+ case ITEM_FONTWIDTH :aStr.AppendAscii("FontWidth"); break;
+ case ITEM_FIELD :aStr.AppendAscii("Field"); break;
+ }
+
+ return aStr;
+}
+
+BOOL ImpItemListRow::operator==(const ImpItemListRow& rEntry) const
+{
+ return (aName.Equals(rEntry.aName)
+ && aValue.Equals(rEntry.aValue)
+ && eState==rEntry.eState
+ && nWhichId==rEntry.nWhichId
+ && bComment==rEntry.bComment
+ && bIsNum==rEntry.bIsNum
+ && bCanNum==rEntry.bCanNum
+ && pType==rEntry.pType
+ && eItemType==rEntry.eItemType
+ && nVal==rEntry.nVal
+ && nMin==rEntry.nMin
+ && nMax==rEntry.nMax);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpItemEdit: public Edit
+{
+ _SdrItemBrowserControl* pBrowse;
+
+public:
+ ImpItemEdit(Window* pParent, _SdrItemBrowserControl* pBrowse_, WinBits nBits=0)
+ : Edit(pParent, nBits),
+ pBrowse(pBrowse_)
+ {}
+
+ virtual ~ImpItemEdit();
+ virtual void KeyInput(const KeyEvent& rEvt);
+};
+
+__EXPORT ImpItemEdit::~ImpItemEdit()
+{
+}
+
+void __EXPORT ImpItemEdit::KeyInput(const KeyEvent& rKEvt)
+{
+ _SdrItemBrowserControl* pBrowseMerk = pBrowse;
+
+ UINT16 nKeyCode(rKEvt.GetKeyCode().GetCode() + rKEvt.GetKeyCode().GetModifier());
+
+ if(nKeyCode == KEY_RETURN)
+ {
+ pBrowseMerk->EndChangeEntry();
+ pBrowseMerk->GrabFocus();
+ }
+ else if(nKeyCode == KEY_ESCAPE)
+ {
+ pBrowseMerk->BrkChangeEntry();
+ pBrowseMerk->GrabFocus();
+ }
+ else if(nKeyCode == KEY_UP || nKeyCode == KEY_DOWN)
+ {
+ pBrowseMerk->EndChangeEntry();
+ pBrowseMerk->GrabFocus();
+ pBrowseMerk->KeyInput(rKEvt);
+ }
+ else
+ Edit::KeyInput(rKEvt);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#define MYBROWSEMODE (BROWSER_THUMBDRAGGING|BROWSER_KEEPHIGHLIGHT|BROWSER_NO_HSCROLL|BROWSER_HIDECURSOR)
+
+_SdrItemBrowserControl::_SdrItemBrowserControl(Window* pParent, WinBits nBits):
+ BrowseBox(pParent,nBits,MYBROWSEMODE),
+ aList(1024,16,16)
+{
+ ImpCtor();
+}
+
+__EXPORT _SdrItemBrowserControl::~_SdrItemBrowserControl()
+{
+ if(pEditControl)
+ delete pEditControl;
+
+ if(pAktChangeEntry)
+ delete pAktChangeEntry;
+
+ Clear();
+}
+
+void _SdrItemBrowserControl::ImpCtor()
+{
+ pEditControl = NULL;
+ pAktChangeEntry = NULL;
+ nLastWhichOfs = 0;
+ nLastWhich = 0;
+ nLastWhichOben = 0; // not implemented yet
+ nLastWhichUnten = 0; // not implemented yet
+ bWhichesButNames = FALSE;
+ bDontHideIneffectiveItems = FALSE;
+ bDontSortItems = FALSE;
+ bShowWhichIds = FALSE;
+ bShowRealValues = FALSE;
+ bShowWhichIds = TRUE; // not implemented yet
+ bShowRealValues = TRUE; // not implemented yet
+
+ rtl_TextEncoding aTextEncoding = gsl_getSystemTextEncoding();
+
+ InsertDataColumn(
+ ITEMBROWSER_WHICHCOL_ID,
+ String("Which", aTextEncoding),
+ GetTextWidth(String(" Which ", aTextEncoding)) + 2);
+ InsertDataColumn(
+ ITEMBROWSER_STATECOL_ID,
+ String("State", aTextEncoding),
+ Max(GetTextWidth(String(" State ", aTextEncoding)) + 2 ,
+ GetTextWidth(String("DontCare", aTextEncoding)) + 2));
+ InsertDataColumn(
+ ITEMBROWSER_TYPECOL_ID ,
+ String("Type", aTextEncoding),
+ GetTextWidth(String(" Type_ ", aTextEncoding)) + 2);
+ InsertDataColumn(
+ ITEMBROWSER_NAMECOL_ID ,
+ String("Name", aTextEncoding),
+ 150);
+ InsertDataColumn(
+ ITEMBROWSER_VALUECOL_ID,
+ String("Value", aTextEncoding),
+ GetTextWidth(String("12345678901234567890", aTextEncoding)));
+ SetDataRowHeight(
+ GetTextHeight());
+
+ long nWdt=GetColumnWidth(ITEMBROWSER_WHICHCOL_ID)+
+ GetColumnWidth(ITEMBROWSER_STATECOL_ID)+
+ GetColumnWidth(ITEMBROWSER_TYPECOL_ID )+
+ GetColumnWidth(ITEMBROWSER_NAMECOL_ID )+
+ GetColumnWidth(ITEMBROWSER_VALUECOL_ID);
+
+ long nHgt=GetTitleHeight()+16*GetDataRowHeight();
+
+ SetOutputSizePixel(Size(nWdt,nHgt));
+}
+
+void _SdrItemBrowserControl::Clear()
+{
+ ULONG nAnz=aList.Count();
+ for (ULONG nNum=0; nNum<nAnz; nNum++) {
+ delete ImpGetEntry(nNum);
+ }
+ aList.Clear();
+ BrowseBox::Clear();
+}
+
+long __EXPORT _SdrItemBrowserControl::GetRowCount() const
+{
+ return aList.Count();
+}
+
+BOOL __EXPORT _SdrItemBrowserControl::SeekRow(long nRow)
+{
+ nAktPaintRow=nRow;
+ return TRUE;
+}
+
+void __EXPORT _SdrItemBrowserControl::PaintField(OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId) const
+{
+ if (nAktPaintRow<0 || (ULONG)nAktPaintRow>=aList.Count()) {
+ return;
+ }
+ Rectangle aR(rRect);
+ aR.Bottom()++;
+ ImpItemListRow* pEntry=ImpGetEntry(nAktPaintRow);
+ if (pEntry->bComment)
+ {
+ if (nColumnId==ITEMBROWSER_NAMECOL_ID)
+ {
+ rDev.SetLineColor();
+ rDev.SetFillColor( Color( COL_LIGHTGRAY ) );
+ aR.Left()=0;
+ aR.Right()=rDev.GetOutputSize().Width();
+ rDev.DrawRect(aR);
+ rDev.DrawText(rRect.TopLeft(),pEntry->aName);
+ }
+ } else {
+ rtl_TextEncoding aTextEncoding = gsl_getSystemTextEncoding();
+
+ XubString aStr("???", aTextEncoding);
+ switch (nColumnId) {
+ case ITEMBROWSER_WHICHCOL_ID:
+ aStr = UniString::CreateFromInt32(pEntry->nWhichId); break;
+ case ITEMBROWSER_STATECOL_ID: {
+ switch (pEntry->eState) {
+ case SFX_ITEM_UNKNOWN : aStr=String("Uknown", aTextEncoding); break;
+ case SFX_ITEM_DISABLED: aStr=String("Disabled", aTextEncoding); break;
+ case SFX_ITEM_DONTCARE: aStr=String("DontCare", aTextEncoding); break;
+ case SFX_ITEM_SET : aStr=String("Set", aTextEncoding); break;
+ case SFX_ITEM_DEFAULT : aStr=String("Default", aTextEncoding); break;
+ } // switch
+ } break;
+ case ITEMBROWSER_TYPECOL_ID: aStr = pEntry->GetItemTypeStr(); break;
+ case ITEMBROWSER_NAMECOL_ID: aStr = pEntry->aName; break;
+ case ITEMBROWSER_VALUECOL_ID: aStr = pEntry->aValue; break;
+ } // switch
+ rDev.SetClipRegion(aR);
+ rDev.DrawText(aR.TopLeft(),aStr);
+ rDev.SetClipRegion();
+ }
+}
+
+ULONG _SdrItemBrowserControl::GetCurrentPos() const
+{
+ ULONG nRet=CONTAINER_ENTRY_NOTFOUND;
+ if (GetSelectRowCount()==1) {
+ long nPos=((BrowseBox*)this)->FirstSelectedRow();
+ if (nPos>=0 && (ULONG)nPos<aList.Count()) {
+ nRet=(ULONG)nPos;
+ }
+ }
+ return nRet;
+}
+
+USHORT _SdrItemBrowserControl::GetCurrentWhich() const
+{
+ USHORT nRet=0;
+ ULONG nPos=GetCurrentPos();
+ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
+ nRet=ImpGetEntry(nPos)->nWhichId;
+ }
+ return nRet;
+}
+
+void __EXPORT _SdrItemBrowserControl::DoubleClick(const BrowserMouseEvent&)
+{
+ ULONG nPos=GetCurrentPos();
+ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
+ BegChangeEntry(nPos);
+ }
+}
+
+void __EXPORT _SdrItemBrowserControl::KeyInput(const KeyEvent& rKEvt)
+{
+ USHORT nKeyCode=rKEvt.GetKeyCode().GetCode()+rKEvt.GetKeyCode().GetModifier();
+ FASTBOOL bAusgewertet=FALSE;
+ ULONG nPos=GetCurrentPos();
+ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
+ if (nKeyCode==KEY_RETURN) {
+ if (BegChangeEntry(nPos)) bAusgewertet=TRUE;
+ } else if (nKeyCode==KEY_ESCAPE) {
+ // ...
+ } else if (rKEvt.GetKeyCode().GetModifier()==KEY_SHIFT+KEY_MOD1+KEY_MOD2) { // Strg
+ if (nKeyCode==KEY_SHIFT+KEY_MOD1+KEY_MOD2+KEY_W) {
+ bWhichesButNames=!bWhichesButNames;
+ SetDirty();
+ }
+ if (nKeyCode==KEY_SHIFT+KEY_MOD1+KEY_MOD2+KEY_I) {
+ bDontHideIneffectiveItems=!bDontHideIneffectiveItems;
+ SetDirty();
+ }
+ if (nKeyCode==KEY_SHIFT+KEY_MOD1+KEY_MOD2+KEY_S) {
+ bDontSortItems=!bDontSortItems;
+ SetDirty();
+ }
+ }
+/* else if (XubString::IsPrintable(rKEvt.GetCharCode())) {
+ if (BegChangeEntry(nPos)) {
+ bAusgewertet=TRUE;
+ // folgende 3 Statements, weil
+ // pEditControl->KeyInput(rKEvt) nicht geht
+ pEditControl->SetText(rKEvt.GetCharCode());
+ pEditControl->SetModifyFlag();
+ pEditControl->SetSelection(1);
+ }
+ } */
+ }
+ if (!bAusgewertet) BrowseBox::KeyInput(rKEvt);
+}
+
+void _SdrItemBrowserControl::SetDirty()
+{
+ aSetDirtyHdl.Call(this);
+}
+
+void __EXPORT _SdrItemBrowserControl::Select()
+{
+ EndChangeEntry();
+ BrowseBox::Select();
+ ImpSaveWhich();
+}
+
+void _SdrItemBrowserControl::ImpSaveWhich()
+{
+ USHORT nWh=GetCurrentWhich();
+ if (nWh!=0) {
+ long nPos=GetCurrentPos();
+ long nTop=GetTopRow();
+ long nBtm=GetTopRow()+GetVisibleRows()+1;
+ nLastWhich=nWh;
+ nLastWhichOfs=nPos-nTop;
+ if (nTop<0) nTop=0;
+ if (nBtm>=(long)aList.Count()) nBtm=aList.Count()-1;
+ nLastWhichOben=ImpGetEntry(nTop)->nWhichId;
+ nLastWhichUnten=ImpGetEntry(nBtm)->nWhichId;
+ }
+}
+
+void _SdrItemBrowserControl::ImpRestoreWhich()
+{
+ if (nLastWhich!=0) {
+ FASTBOOL bFnd=FALSE;
+ USHORT nBestMinWh=0,nBestMaxWh=0xFFFF; // not implemented yet
+ ULONG nBestMinPos=0,nBestMaxPos=0xFFFFFFFF; // not implemented yet
+ ULONG nAnz=aList.Count();
+ ULONG nNum;
+ for (nNum=0; nNum<nAnz && !bFnd; nNum++) {
+ ImpItemListRow* pEntry=ImpGetEntry(nNum);
+ if (!pEntry->bComment) {
+ USHORT nWh=pEntry->nWhichId;
+ if (nWh==nLastWhich) bFnd=TRUE;
+ else if (nWh<nLastWhich && nWh>nBestMinWh) nBestMinPos=nNum;
+ else if (nWh>nLastWhich && nWh<nBestMaxWh) nBestMaxPos=nNum;
+ }
+ }
+ if (bFnd) {
+ long nPos=nNum-1;
+ long nWhichOfs=nPos-GetTopRow();
+ if (nWhichOfs!=nLastWhichOfs) {
+ ScrollRows(nWhichOfs-nLastWhichOfs);
+ }
+ GoToRow(nPos);
+ }
+ }
+}
+
+FASTBOOL _SdrItemBrowserControl::BegChangeEntry(ULONG nPos)
+{
+ BrkChangeEntry();
+ FASTBOOL bRet=FALSE;
+ ImpItemListRow* pEntry=ImpGetEntry(nPos);
+ if (pEntry!=NULL && !pEntry->bComment) {
+ SetMode(MYBROWSEMODE & ~BROWSER_KEEPHIGHLIGHT);
+ pEditControl=new ImpItemEdit(&GetDataWindow(),this,0/*|WB_BORDER|WB_SVLOOK*/);
+ Rectangle aRect(GetFieldRectPixel(nPos,ITEMBROWSER_VALUECOL_ID,FALSE));
+ aRect.Left()+=2; // Kleiner Offset fuer's Edit, damit's pixelgenau stimmt
+ aRect.Right()--;
+ pEditControl->SetPosSizePixel(aRect.TopLeft(),aRect.GetSize());
+ pEditControl->SetText(pEntry->aValue);
+ pEditControl->SetBackground( Wallpaper(Color(COL_LIGHTGRAY)));
+ Font aFont(pEditControl->GetFont());
+ aFont.SetFillColor(Color(COL_LIGHTGRAY));
+ pEditControl->SetFont(aFont);
+ pEditControl->Show();
+ pEditControl->GrabFocus();
+ pEditControl->SetSelection(Selection(SELECTION_MIN,SELECTION_MAX));
+ Window* pParent=GetParent();
+ aWNamMerk=pParent->GetText();
+ XubString aNeuNam(aWNamMerk);
+ aNeuNam += sal_Unicode(' ');
+ aNeuNam += pEntry->GetItemTypeStr();
+ if (pEntry->bCanNum) {
+ aNeuNam.AppendAscii(": ");
+ aNeuNam += UniString::CreateFromInt32(pEntry->nMin);
+ aNeuNam.AppendAscii("..");
+ aNeuNam += UniString::CreateFromInt32(pEntry->nMax);
+ }
+ aNeuNam.AppendAscii(" - Type 'del' to reset to default.");
+ pParent->SetText(aNeuNam);
+ pAktChangeEntry=new ImpItemListRow(*pEntry);
+ bRet=TRUE;
+ }
+ return bRet;
+}
+
+FASTBOOL _SdrItemBrowserControl::EndChangeEntry()
+{
+ FASTBOOL bRet=FALSE;
+ if (pEditControl!=NULL) {
+ aEntryChangedHdl.Call(this);
+ delete pEditControl;
+ pEditControl=NULL;
+ delete pAktChangeEntry;
+ pAktChangeEntry=NULL;
+ Window* pParent=GetParent();
+ pParent->SetText(aWNamMerk);
+ SetMode(MYBROWSEMODE);
+ bRet=TRUE;
+ }
+ return bRet;
+}
+
+void _SdrItemBrowserControl::BrkChangeEntry()
+{
+ if (pEditControl!=NULL) {
+ delete pEditControl;
+ pEditControl=NULL;
+ delete pAktChangeEntry;
+ pAktChangeEntry=NULL;
+ Window* pParent=GetParent();
+ pParent->SetText(aWNamMerk);
+ SetMode(MYBROWSEMODE);
+ }
+}
+
+void _SdrItemBrowserControl::ImpSetEntry(const ImpItemListRow& rEntry, ULONG nEntryNum)
+{
+ ImpItemListRow* pAktEntry=ImpGetEntry(nEntryNum);
+ if (pAktEntry==NULL) {
+ aList.Insert(new ImpItemListRow(rEntry),CONTAINER_APPEND);
+ RowInserted(nEntryNum);
+ } else if (*pAktEntry!=rEntry) {
+ FASTBOOL bStateDiff=rEntry.eState!=pAktEntry->eState;
+ FASTBOOL bValueDiff=!rEntry.aValue.Equals(pAktEntry->aValue);
+ FASTBOOL bAllDiff=TRUE;
+ if (bStateDiff || bValueDiff) {
+ // Checken, ob nur State und/oder Value geaendert
+ ImpItemListRow aTest(rEntry);
+ aTest.eState=pAktEntry->eState;
+ aTest.aValue=pAktEntry->aValue;
+ if (aTest==*pAktEntry) bAllDiff=FALSE;
+ }
+ *pAktEntry=rEntry;
+ if (bAllDiff) {
+ RowModified(nEntryNum);
+ } else {
+ if (bStateDiff) RowModified(nEntryNum,ITEMBROWSER_STATECOL_ID);
+ if (bValueDiff) RowModified(nEntryNum,ITEMBROWSER_VALUECOL_ID);
+ }
+ }
+}
+
+FASTBOOL ImpGetItem(const SfxItemSet& rSet, USHORT nWhich, const SfxPoolItem*& rpItem)
+{
+ SfxItemState eState=rSet.GetItemState(nWhich,TRUE,&rpItem);
+ if (eState==SFX_ITEM_DEFAULT) {
+ rpItem=&rSet.Get(nWhich);
+ }
+ return (eState==SFX_ITEM_DEFAULT || eState==SFX_ITEM_SET) && rpItem!=NULL;
+}
+
+FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rIndent)
+{
+ rIndent=0;
+ if (pSet==NULL) return FALSE;
+ const SfxPoolItem* pItem=NULL;
+ FASTBOOL bRet=FALSE;
+ switch (nWhich) {
+ case XATTR_LINEDASH :
+ case XATTR_LINEWIDTH :
+ case XATTR_LINECOLOR :
+ case XATTR_LINESTART :
+ case XATTR_LINEEND :
+ case XATTR_LINESTARTWIDTH :
+ case XATTR_LINEENDWIDTH :
+ case XATTR_LINESTARTCENTER :
+ case XATTR_LINEENDCENTER :
+ case XATTR_LINETRANSPARENCE : {
+ rIndent=1;
+ if (ImpGetItem(*pSet,XATTR_LINESTYLE,pItem)) {
+ XLineStyle eLineStyle=((const XLineStyleItem*)pItem)->GetValue();
+ if (eLineStyle==XLINE_NONE) return TRUE;
+ if (eLineStyle!=XLINE_DASH && nWhich==XATTR_LINEDASH) return TRUE;
+ }
+ if (nWhich==XATTR_LINESTART || nWhich==XATTR_LINESTARTCENTER) {
+ rIndent=2;
+ if (ImpGetItem(*pSet,XATTR_LINESTARTWIDTH,pItem)) {
+ INT32 nWdt=((const XLineStartWidthItem*)pItem)->GetValue();
+ if (nWdt==0) return TRUE;
+ }
+ }
+ if (nWhich==XATTR_LINEEND || nWhich==XATTR_LINEENDCENTER) {
+ rIndent=2;
+ if (ImpGetItem(*pSet,XATTR_LINEENDWIDTH,pItem)) {
+ INT32 nWdt=((const XLineEndWidthItem*)pItem)->GetValue();
+ if (nWdt==0) return TRUE;
+ }
+ }
+ } break;
+ case XATTR_FILLCOLOR : /*nur bei Style=Color*/
+ case XATTR_FILLGRADIENT : /*nur bei Style=Gradient*/
+ case XATTR_FILLHATCH : /*nur bei Style=Hatch*/
+ case XATTR_FILLTRANSPARENCE : /*nur bei Style=Color*/
+ case XATTR_GRADIENTSTEPCOUNT : /*nur bei Style=Gradient*/
+ case XATTR_FILLBACKGROUND : /*nur bei Style=Hatch*/
+ {
+ rIndent=1;
+ if (ImpGetItem(*pSet,XATTR_FILLSTYLE,pItem)) {
+ XFillStyle eFillStyle=((const XFillStyleItem*)pItem)->GetValue();
+ if (eFillStyle==XFILL_NONE) return TRUE;
+ // Transparenz z.Zt. nur fuer SolidFill
+ if (eFillStyle!=XFILL_SOLID && (nWhich==XATTR_FILLCOLOR || nWhich==XATTR_FILLTRANSPARENCE)) return TRUE;
+ if (eFillStyle!=XFILL_GRADIENT && (nWhich==XATTR_FILLGRADIENT || nWhich==XATTR_GRADIENTSTEPCOUNT)) return TRUE;
+ if (eFillStyle!=XFILL_HATCH && (nWhich==XATTR_FILLHATCH || nWhich==XATTR_FILLBACKGROUND)) return TRUE;
+ }
+ } break;
+ case XATTR_FILLBITMAP :
+ case XATTR_FILLBMP_TILE :
+ case XATTR_FILLBMP_POS : /* z.Zt. nur wenn TILE=TRUE */
+ case XATTR_FILLBMP_SIZEX : /* nur wenn nicht Stretch */
+ case XATTR_FILLBMP_SIZEY : /* nur wenn nicht Stretch */
+ case XATTR_FILLBMP_SIZELOG : /* nur wenn SIZELOG=FALSE zum ruecksetzen auf TRUE (alt) -> doch noch in Gebrauch */
+ case XATTR_FILLBMP_TILEOFFSETX : /* nur wenn TILE=TRUE */
+ case XATTR_FILLBMP_TILEOFFSETY : /* nur wenn TILE=TRUE */
+ case XATTR_FILLBMP_STRETCH : /* nur wenn TILE=FALSE */
+ case XATTR_FILLBMP_POSOFFSETX : /* nur wenn TILE=TRUE*/
+ case XATTR_FILLBMP_POSOFFSETY : { /* nur wenn TILE=TRUE*/
+ rIndent=1;
+ if (ImpGetItem(*pSet,XATTR_FILLSTYLE,pItem)) {
+ XFillStyle eFillStyle=((const XFillStyleItem*)pItem)->GetValue();
+ if (eFillStyle!=XFILL_BITMAP) return TRUE;
+ }
+ if (nWhich==XATTR_FILLBITMAP || nWhich==XATTR_FILLBMP_TILE) {
+ return FALSE; // immer anwaehlbar
+ }
+ FASTBOOL bTileTRUE=FALSE;
+ FASTBOOL bTileFALSE=FALSE;
+ FASTBOOL bStretchTRUE=FALSE;
+ FASTBOOL bStretchFALSE=FALSE;
+ if (ImpGetItem(*pSet,XATTR_FILLBMP_TILE,pItem)) {
+ bTileTRUE=((const XFillBmpTileItem*)pItem)->GetValue();
+ bTileFALSE=!bTileTRUE;
+ }
+ if (ImpGetItem(*pSet,XATTR_FILLBMP_STRETCH,pItem)) {
+ bStretchTRUE=((const XFillBmpStretchItem*)pItem)->GetValue();
+ bStretchFALSE=!bStretchTRUE;
+ }
+ // Stretch nicht anwaehlbar, wenn Tile=TRUE
+ if (nWhich==XATTR_FILLBMP_STRETCH) return bTileTRUE;
+ // und uebrig bleiben 7+1 Item (Unterattribute)
+ rIndent=2;
+ // Pos (enum) nicht anwaehlbar, wenn Tile=FALSE
+ if (nWhich==XATTR_FILLBMP_POS) return bTileFALSE;
+ // SizeXY nicht anwaehlbar bei Stretch=TRUE
+ if (nWhich==XATTR_FILLBMP_SIZEX || nWhich==XATTR_FILLBMP_SIZEY) {
+ return bTileFALSE && bStretchTRUE;
+ }
+ // 2 Items speziell fuer Tile
+ if (nWhich==XATTR_FILLBMP_POSOFFSETX || nWhich==XATTR_FILLBMP_POSOFFSETY) {
+ return bTileFALSE;
+ }
+ // Noch 2 Items speziell fuer Tile die sich jedoch gegenseitig ausschliessen
+ if (nWhich==XATTR_FILLBMP_TILEOFFSETX || nWhich==XATTR_FILLBMP_TILEOFFSETY) {
+ if (bTileFALSE) return TRUE;
+ USHORT nX=0,nY=0;
+ FASTBOOL bX=FALSE,bY=FALSE;
+ if (ImpGetItem(*pSet,XATTR_FILLBMP_TILEOFFSETX,pItem)) {
+ nX=((const XFillBmpTileOffsetXItem*)pItem)->GetValue();
+ bX=TRUE;
+ }
+ if (ImpGetItem(*pSet,XATTR_FILLBMP_TILEOFFSETY,pItem)) {
+ nY=((const XFillBmpTileOffsetYItem*)pItem)->GetValue();
+ bY=TRUE;
+ }
+ if (nWhich==XATTR_FILLBMP_TILEOFFSETX) {
+ if (nX!=0 || !bX) return FALSE;
+ if (nY!=0) return TRUE;
+ } else {
+ if (nY!=0 || !bY) return FALSE;
+ if (nX!=0) return TRUE;
+ }
+ }
+ // SizeLog nicht anwaehlbar bei Stretch=TRUE
+ // und sonst auch nur wenn es auf SizeLog=FALSE gesetzt ist.
+ // -> wohl doch noch in Gebrauch
+ // (TRUE ist der statische PoolDefault)
+ if (nWhich==XATTR_FILLBMP_SIZELOG) {
+ if (bTileFALSE && bStretchTRUE) return TRUE;
+ }
+ } break;
+
+ case XATTR_FORMTXTADJUST :
+ case XATTR_FORMTXTDISTANCE :
+ case XATTR_FORMTXTSTART :
+ case XATTR_FORMTXTMIRROR :
+ case XATTR_FORMTXTOUTLINE :
+ case XATTR_FORMTXTSHADOW :
+ case XATTR_FORMTXTSHDWCOLOR :
+ case XATTR_FORMTXTSHDWXVAL :
+ case XATTR_FORMTXTSHDWYVAL :
+ case XATTR_FORMTXTSTDFORM :
+ case XATTR_FORMTXTHIDEFORM :
+ case XATTR_FORMTXTSHDWTRANSP: {
+ rIndent=1;
+ if (ImpGetItem(*pSet,XATTR_FORMTXTSTYLE,pItem)) {
+ XFormTextStyle eStyle=((const XFormTextStyleItem*)pItem)->GetValue();
+ if (eStyle==XFT_NONE) return TRUE;
+ }
+ if ((nWhich>=XATTR_FORMTXTSHDWCOLOR && nWhich<=XATTR_FORMTXTSHDWYVAL) || nWhich>=XATTR_FORMTXTSHDWTRANSP) {
+ rIndent=2;
+ if (ImpGetItem(*pSet,XATTR_FORMTXTSHADOW,pItem)) {
+ XFormTextShadow eShadow=((const XFormTextShadowItem*)pItem)->GetValue();
+ if (eShadow==XFTSHADOW_NONE) return TRUE;
+ }
+ }
+ } break;
+
+ case SDRATTR_SHADOWCOLOR :
+ case SDRATTR_SHADOWXDIST :
+ case SDRATTR_SHADOWYDIST :
+ case SDRATTR_SHADOWTRANSPARENCE:
+ case SDRATTR_SHADOW3D :
+ case SDRATTR_SHADOWPERSP : {
+ rIndent=1;
+ if (ImpGetItem(*pSet,SDRATTR_SHADOW,pItem)) {
+ FASTBOOL bShadow=((const SdrShadowItem*)pItem)->GetValue();
+ if (!bShadow) return TRUE;
+ }
+ } break;
+
+ case SDRATTR_CAPTIONANGLE: {
+ rIndent=1;
+ if (ImpGetItem(*pSet,SDRATTR_CAPTIONFIXEDANGLE,pItem)) {
+ FASTBOOL bFixed=((const SdrCaptionFixedAngleItem*)pItem)->GetValue();
+ if (!bFixed) return TRUE;
+ }
+ } break;
+ case SDRATTR_CAPTIONESCREL:
+ case SDRATTR_CAPTIONESCABS: {
+ rIndent=1;
+ if (ImpGetItem(*pSet,SDRATTR_CAPTIONESCISREL,pItem)) {
+ FASTBOOL bRel=((const SdrCaptionEscIsRelItem*)pItem)->GetValue();
+ if (bRel && nWhich==SDRATTR_CAPTIONESCABS) return TRUE;
+ if (!bRel && nWhich==SDRATTR_CAPTIONESCREL) return TRUE;
+ }
+ } break;
+ case SDRATTR_CAPTIONLINELEN: {
+ rIndent=1;
+ if (ImpGetItem(*pSet,SDRATTR_CAPTIONFITLINELEN,pItem)) {
+ FASTBOOL bFit=((const SdrCaptionFitLineLenItem*)pItem)->GetValue();
+ if (bFit) return TRUE;
+ }
+ } break;
+
+ case SDRATTR_TEXT_MINFRAMEHEIGHT:
+ case SDRATTR_TEXT_MAXFRAMEHEIGHT: {
+ rIndent=1;
+ if (ImpGetItem(*pSet,SDRATTR_TEXT_AUTOGROWHEIGHT,pItem)) {
+ FASTBOOL bAutoGrow=((const SdrTextAutoGrowHeightItem*)pItem)->GetValue();
+ if (!bAutoGrow) return TRUE;
+ }
+ } break;
+ case SDRATTR_TEXT_MINFRAMEWIDTH:
+ case SDRATTR_TEXT_MAXFRAMEWIDTH: {
+ rIndent=1;
+ if (ImpGetItem(*pSet,SDRATTR_TEXT_AUTOGROWWIDTH,pItem)) {
+ FASTBOOL bAutoGrow=((const SdrTextAutoGrowWidthItem*)pItem)->GetValue();
+ if (!bAutoGrow) return TRUE;
+ }
+ } break;
+ case SDRATTR_TEXT_VERTADJUST:
+ case SDRATTR_TEXT_HORZADJUST: {
+ if (ImpGetItem(*pSet,SDRATTR_TEXT_FITTOSIZE,pItem)) {
+ SdrFitToSizeType eFit=((const SdrTextFitToSizeTypeItem*)pItem)->GetValue();
+ if (eFit!=SDRTEXTFIT_NONE) return TRUE;
+ }
+ } break;
+
+ case SDRATTR_TEXT_ANIDIRECTION :
+ case SDRATTR_TEXT_ANISTARTINSIDE:
+ case SDRATTR_TEXT_ANISTOPINSIDE :
+ case SDRATTR_TEXT_ANICOUNT :
+ case SDRATTR_TEXT_ANIDELAY :
+ case SDRATTR_TEXT_ANIAMOUNT : {
+ rIndent=1;
+ if (ImpGetItem(*pSet,SDRATTR_TEXT_ANIKIND,pItem)) {
+ SdrTextAniKind eAniKind=((const SdrTextAniKindItem*)pItem)->GetValue();
+ if (eAniKind==SDRTEXTANI_NONE) return TRUE;
+ if (eAniKind==SDRTEXTANI_BLINK && (nWhich==SDRATTR_TEXT_ANIDIRECTION || nWhich==SDRATTR_TEXT_ANIAMOUNT)) return TRUE;
+ if (eAniKind==SDRTEXTANI_SLIDE && (nWhich==SDRATTR_TEXT_ANISTARTINSIDE || nWhich==SDRATTR_TEXT_ANISTOPINSIDE)) return TRUE;
+ }
+ } break;
+
+ case SDRATTR_EDGELINEDELTAANZ: return TRUE;
+ case SDRATTR_EDGELINE1DELTA:
+ case SDRATTR_EDGELINE2DELTA:
+ case SDRATTR_EDGELINE3DELTA: {
+ if (ImpGetItem(*pSet,SDRATTR_EDGEKIND,pItem)) {
+ SdrEdgeKind eKind=((const SdrEdgeKindItem*)pItem)->GetValue();
+ if (eKind==SDREDGE_THREELINES) {
+ if (nWhich>SDRATTR_EDGELINE2DELTA) return TRUE;
+ else return FALSE;
+ }
+ if (eKind!=SDREDGE_ORTHOLINES && eKind!=SDREDGE_BEZIER) return TRUE;
+ }
+ if (ImpGetItem(*pSet,SDRATTR_EDGELINEDELTAANZ,pItem)) {
+ UINT16 nAnz=((const SdrEdgeLineDeltaAnzItem*)pItem)->GetValue();
+ if (nAnz==0) return TRUE;
+ if (nAnz==1 && nWhich>SDRATTR_EDGELINE1DELTA) return TRUE;
+ if (nAnz==2 && nWhich>SDRATTR_EDGELINE2DELTA) return TRUE;
+ if (nAnz==3 && nWhich>SDRATTR_EDGELINE3DELTA) return TRUE;
+ }
+ } break;
+
+ case SDRATTR_CIRCSTARTANGLE:
+ case SDRATTR_CIRCENDANGLE : {
+ rIndent=1;
+ if (ImpGetItem(*pSet,SDRATTR_CIRCKIND,pItem)) {
+ SdrCircKind eKind=((const SdrCircKindItem*)pItem)->GetValue();
+ if (eKind==SDRCIRC_FULL) return TRUE;
+ }
+ } break;
+ } // switch
+ return bRet;
+}
+
+USHORT ImpSortWhich(USHORT nWhich)
+{
+ switch (nWhich) {
+ // Line
+ case XATTR_LINESTART : nWhich=XATTR_LINETRANSPARENCE ; break;
+ case XATTR_LINEEND : nWhich=XATTR_LINESTARTWIDTH ; break;
+ case XATTR_LINESTARTWIDTH : nWhich=XATTR_LINESTART ; break;
+ case XATTR_LINEENDWIDTH : nWhich=XATTR_LINESTARTCENTER ; break;
+ case XATTR_LINESTARTCENTER : nWhich=XATTR_LINEENDWIDTH ; break;
+ case XATTR_LINEENDCENTER : nWhich=XATTR_LINEEND ; break;
+ case XATTR_LINETRANSPARENCE : nWhich=XATTR_LINEENDCENTER ; break;
+
+ // Fill
+ case XATTR_FILLBMP_POS : nWhich=XATTR_FILLBMP_STRETCH ; break;
+ case XATTR_FILLBMP_SIZEX : nWhich=XATTR_FILLBMP_POS ; break;
+ case XATTR_FILLBMP_SIZEY : nWhich=XATTR_FILLBMP_SIZEX ; break;
+ case XATTR_FILLBMP_SIZELOG : nWhich=XATTR_FILLBMP_SIZEY ; break;
+ case XATTR_FILLBMP_TILEOFFSETX : nWhich=XATTR_FILLBMP_SIZELOG ; break;
+ case XATTR_FILLBMP_TILEOFFSETY : nWhich=XATTR_FILLBMP_TILEOFFSETX ; break;
+ case XATTR_FILLBMP_STRETCH : nWhich=XATTR_FILLBMP_TILEOFFSETY ; break;
+
+ // Fontwork
+ case XATTR_FORMTXTSHADOW : nWhich=XATTR_FORMTXTSTDFORM ; break;
+ case XATTR_FORMTXTSHDWCOLOR : nWhich=XATTR_FORMTXTHIDEFORM ; break;
+ case XATTR_FORMTXTSHDWXVAL : nWhich=XATTR_FORMTXTSHADOW ; break;
+ case XATTR_FORMTXTSHDWYVAL : nWhich=XATTR_FORMTXTSHDWCOLOR ; break;
+ case XATTR_FORMTXTSTDFORM : nWhich=XATTR_FORMTXTSHDWXVAL ; break;
+ case XATTR_FORMTXTHIDEFORM : nWhich=XATTR_FORMTXTSHDWYVAL ; break;
+
+ // Misc
+ case SDRATTR_TEXT_MINFRAMEHEIGHT: nWhich=SDRATTR_TEXT_FITTOSIZE ; break;
+ case SDRATTR_TEXT_AUTOGROWHEIGHT: nWhich=SDRATTR_TEXT_LEFTDIST ; break;
+ case SDRATTR_TEXT_FITTOSIZE : nWhich=SDRATTR_TEXT_RIGHTDIST ; break;
+ case SDRATTR_TEXT_LEFTDIST : nWhich=SDRATTR_TEXT_UPPERDIST ; break;
+ case SDRATTR_TEXT_RIGHTDIST : nWhich=SDRATTR_TEXT_LOWERDIST ; break;
+ case SDRATTR_TEXT_UPPERDIST : nWhich=SDRATTR_TEXT_AUTOGROWWIDTH ; break;
+ case SDRATTR_TEXT_LOWERDIST : nWhich=SDRATTR_TEXT_MINFRAMEWIDTH ; break;
+ case SDRATTR_TEXT_VERTADJUST : nWhich=SDRATTR_TEXT_MAXFRAMEWIDTH ; break;
+ case SDRATTR_TEXT_MAXFRAMEHEIGHT: nWhich=SDRATTR_TEXT_AUTOGROWHEIGHT; break;
+ case SDRATTR_TEXT_MINFRAMEWIDTH : nWhich=SDRATTR_TEXT_MINFRAMEHEIGHT; break;
+ case SDRATTR_TEXT_MAXFRAMEWIDTH : nWhich=SDRATTR_TEXT_MAXFRAMEHEIGHT; break;
+ case SDRATTR_TEXT_AUTOGROWWIDTH : nWhich=SDRATTR_TEXT_HORZADJUST ; break;
+ case SDRATTR_TEXT_HORZADJUST : nWhich=SDRATTR_TEXT_VERTADJUST ; break;
+ } // switch
+ return nWhich;
+}
+
+#define INSERTCOMMENT(nStartId,nEndId,aStr) \
+ { if (nWhich0<nStartId && nWhich>=nStartId && nWhich<=nEndId) aCommentStr=aStr; }
+
+void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemSet* p2ndSet)
+{
+ SetMode(MYBROWSEMODE & ~BROWSER_KEEPHIGHLIGHT);
+ if (pSet!=NULL) {
+ rtl_TextEncoding aTextEncoding = gsl_getSystemTextEncoding();
+ USHORT nEntryNum=0;
+ SfxWhichIter aIter(*pSet);
+ const SfxItemPool* pPool=pSet->GetPool();
+ USHORT nWhich0=0;
+ USHORT nWhich=aIter.FirstWhich();
+ while (nWhich!=0) {
+ // Nun erstmal etwas umsortieren
+ // Geht nur, solange keine InvalidItems, d.h. keine Luecken
+ // an dieser Stelle im Set sind
+ if (!bDontSortItems) nWhich=ImpSortWhich(nWhich);
+ SfxItemState eState=pSet->GetItemState(nWhich);
+ if (p2ndSet!=NULL) {
+ SfxItemState e2ndState=p2ndSet->GetItemState(nWhich);
+ if (eState==SFX_ITEM_DEFAULT) eState=SFX_ITEM_DISABLED;
+ else if (e2ndState==SFX_ITEM_DEFAULT) eState=SFX_ITEM_DEFAULT;
+ }
+ if (eState!=SFX_ITEM_DISABLED) {
+ const SfxPoolItem& rItem=pSet->Get(nWhich);
+ USHORT nIndent=0;
+ if (!HAS_BASE(SfxVoidItem,&rItem) && !HAS_BASE(SfxSetItem,&rItem) && (!IsItemIneffective(nWhich,pSet,nIndent) || bDontHideIneffectiveItems)) {
+ XubString aCommentStr;
+
+ INSERTCOMMENT(XATTR_LINE_FIRST,XATTR_LINE_LAST,String("L I N I E", aTextEncoding));
+ INSERTCOMMENT(XATTR_FILL_FIRST,XATTR_FILL_LAST,String("F L Ä C H E", aTextEncoding));
+ INSERTCOMMENT(XATTR_TEXT_FIRST,XATTR_TEXT_LAST,String("F O N T W O R K", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_SHADOW_FIRST,SDRATTR_SHADOW_LAST,String("S C H A T T E N", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_CAPTION_FIRST,SDRATTR_CAPTION_LAST,String("L E G E N D E", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_MISC_FIRST,SDRATTR_MISC_LAST,String("V E R S C H I E D E N E S", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_EDGE_FIRST,SDRATTR_EDGE_LAST,String("V E R B I N D E R", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_MEASURE_FIRST,SDRATTR_MEASURE_LAST,String("B E M A S S U N G", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_CIRC_FIRST,SDRATTR_CIRC_LAST,String("K R E I S", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_NOTPERSIST_FIRST,SDRATTR_NOTPERSIST_LAST,String("N O T P E R S I S T", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_MOVEX,SDRATTR_VERTSHEARONE,String("Transformationen auf alle Objekte einzeln", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_RESIZEXALL,SDRATTR_VERTSHEARALL,String("Transformationen auf alle Objekte gemeinsam", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_TRANSFORMREF1X,SDRATTR_TRANSFORMREF2Y,String("View-Referenzpunkte", aTextEncoding));
+ INSERTCOMMENT(SDRATTR_GRAF_FIRST,SDRATTR_GRAF_LAST,String("G R A F I K", aTextEncoding));
+ INSERTCOMMENT(EE_ITEMS_START,EE_ITEMS_END,String("E D I T E N G I N E", aTextEncoding));
+ INSERTCOMMENT(EE_ITEMS_END+1,EE_ITEMS_END+1,String("... by Joe Merten, JME Engineering Berlin ...", aTextEncoding));
+
+ if(aCommentStr.Len())
+ {
+ ImpItemListRow aEntry;
+ aEntry.bComment=TRUE;
+ aEntry.aName=aCommentStr;
+ ImpSetEntry(aEntry,nEntryNum);
+ nEntryNum++;
+ }
+ nWhich0=nWhich;
+ ImpItemListRow aEntry;
+ SdrItemPool::TakeItemName(nWhich, aEntry.aName);
+ nIndent*=2;
+
+ while(nIndent > 0)
+ {
+ aEntry.aName.Insert(sal_Unicode(' '), 0);
+ nIndent--;
+ }
+
+ aEntry.eState=eState;
+ aEntry.nWhichId=nWhich;
+ if (!IsInvalidItem(&rItem)) {
+ aEntry.pType=rItem.Type();
+ aEntry.nMax=0x7FFFFFFF;
+ aEntry.nMin=-aEntry.nMax;
+ aEntry.nVal=-4711;
+ if (HAS_BASE(SfxByteItem ,&rItem)) aEntry.eItemType=ITEM_BYTE;
+ else if (HAS_BASE(SfxInt16Item ,&rItem)) aEntry.eItemType=ITEM_INT16;
+ else if (HAS_BASE(SfxUInt16Item ,&rItem)) aEntry.eItemType=ITEM_UINT16;
+ else if (HAS_BASE(SfxInt32Item ,&rItem)) aEntry.eItemType=ITEM_INT32;
+ else if (HAS_BASE(SfxUInt32Item ,&rItem)) aEntry.eItemType=ITEM_UINT32;
+ else if (HAS_BASE(SfxEnumItemInterface,&rItem)) aEntry.eItemType=ITEM_ENUM;
+ else if (HAS_BASE(SfxBoolItem ,&rItem)) aEntry.eItemType=ITEM_BOOL;
+ else if (HAS_BASE(SfxFlagItem ,&rItem)) aEntry.eItemType=ITEM_FLAG;
+ else if (HAS_BASE(XColorItem ,&rItem)) aEntry.eItemType=ITEM_XCOLOR;
+ else if (HAS_BASE(SfxStringItem ,&rItem)) aEntry.eItemType=ITEM_STRING;
+ else if (HAS_BASE(SfxPointItem ,&rItem)) aEntry.eItemType=ITEM_POINT;
+ else if (HAS_BASE(SfxRectangleItem,&rItem)) aEntry.eItemType=ITEM_RECT;
+ else if (HAS_BASE(SfxRangeItem ,&rItem)) aEntry.eItemType=ITEM_RANGE;
+ else if (HAS_BASE(SdrFractionItem ,&rItem)) aEntry.eItemType=ITEM_FRACTION;
+ else if (HAS_BASE(SvxColorItem ,&rItem)) aEntry.eItemType=ITEM_COLOR;
+ else if (HAS_BASE(SvxFontItem ,&rItem)) aEntry.eItemType=ITEM_FONT;
+ else if (HAS_BASE(SvxFontHeightItem,&rItem))aEntry.eItemType=ITEM_FONTHEIGHT;
+ else if (HAS_BASE(SvxFontWidthItem,&rItem)) aEntry.eItemType=ITEM_FONTWIDTH;
+ else if (HAS_BASE(SvxFieldItem ,&rItem)) aEntry.eItemType=ITEM_FIELD;
+ switch (aEntry.eItemType) {
+ case ITEM_BYTE : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxByteItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=255; break;
+ case ITEM_INT16 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxInt16Item &)rItem).GetValue(); aEntry.nMin=-32767; aEntry.nMax=32767; break;
+ case ITEM_UINT16 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxUInt16Item&)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=65535; break;
+ case ITEM_INT32 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxInt32Item &)rItem).GetValue(); break;
+ case ITEM_UINT32 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxUInt32Item&)rItem).GetValue(); aEntry.nMin=0; /*aEntry.nMax=0xFF...*/;break;
+ case ITEM_ENUM : aEntry.bCanNum=TRUE; aEntry.nVal=((SfxEnumItemInterface&)rItem).GetEnumValue(); aEntry.nMin=0; aEntry.nMax=((SfxEnumItemInterface&)rItem).GetValueCount()-1; break;
+ case ITEM_BOOL : aEntry.bCanNum=TRUE; aEntry.nVal=((SfxBoolItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=1; break;
+ case ITEM_FLAG : aEntry.bCanNum=TRUE; aEntry.nVal=((SfxFlagItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=0xFFFF; break;
+ case ITEM_FONTHEIGHT: aEntry.bCanNum=TRUE; aEntry.nVal=((SvxFontHeightItem&)rItem).GetHeight(); aEntry.nMin=0; break;
+ case ITEM_FONTWIDTH : aEntry.bCanNum=TRUE; aEntry.nVal=((SvxFontWidthItem&)rItem).GetProp(); aEntry.nMin=0; aEntry.nMax=0xFFFF;break;
+ } // switch
+ if (aEntry.bIsNum) aEntry.bCanNum=TRUE;
+ FASTBOOL bGetPres=TRUE;
+ if (bGetPres) {
+ rItem.GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS,
+ pPool->GetMetric(nWhich),
+ SFX_MAPUNIT_MM,aEntry.aValue);
+ if (aEntry.bCanNum) {
+ aEntry.aValue.InsertAscii(": ",0);
+ aEntry.aValue.Insert(UniString::CreateFromInt32(aEntry.nVal),0);
+ }
+ } else {
+ if (aEntry.eItemType==ITEM_BOOL) aEntry.aValue.AppendAscii(aEntry.nVal!=0 ? "True" : "False");
+ else if (aEntry.bCanNum) aEntry.aValue = UniString::CreateFromInt32(aEntry.nVal);
+ else if (aEntry.eItemType==ITEM_STRING) aEntry.aValue=((SfxStringItem&)rItem).GetValue();
+ else if (aEntry.eItemType==ITEM_ENUM && nWhich!=EE_CHAR_WEIGHT) aEntry.aValue=((SfxEnumItemInterface&)rItem).GetValueTextByPos((BOOL)aEntry.nVal);
+ else aEntry.aValue = String("GPF", aTextEncoding);
+ }
+ } else {
+ aEntry.aValue = String("InvalidItem", aTextEncoding);
+ }
+ ImpSetEntry(aEntry,nEntryNum);
+ nEntryNum++;
+ }
+ }
+ nWhich=aIter.NextWhich();
+ } // while
+
+ if (aList.Count()>nEntryNum) { // evtl. noch zuviele Eintraege
+ ULONG nTooMuch=aList.Count()-nEntryNum;
+ for (ULONG nNum=0; nNum<nTooMuch; nNum++) {
+ delete ImpGetEntry(nEntryNum);
+ aList.Remove(nEntryNum);
+ }
+ RowRemoved(nEntryNum,nTooMuch);
+ }
+ } else {
+ Clear(); // wenn pSet==NULL
+ }
+ ImpRestoreWhich();
+ SetMode(MYBROWSEMODE);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+_SdrItemBrowserWindow::_SdrItemBrowserWindow(Window* pParent, WinBits nBits):
+ FloatingWindow(pParent,nBits),
+ aBrowse(this)
+{
+ SetOutputSizePixel(aBrowse.GetSizePixel());
+ SetText(String("Joe's ItemBrowser", gsl_getSystemTextEncoding()));
+ aBrowse.Show();
+}
+
+__EXPORT _SdrItemBrowserWindow::~_SdrItemBrowserWindow()
+{
+}
+
+void __EXPORT _SdrItemBrowserWindow::Resize()
+{
+ aBrowse.SetSizePixel(GetOutputSizePixel());
+}
+
+void __EXPORT _SdrItemBrowserWindow::GetFocus()
+{
+ aBrowse.GrabFocus();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrItemBrowser::SdrItemBrowser(SdrView& rView):
+ _SdrItemBrowserWindow(ImpGetViewWin(rView)),
+ pView(&rView),
+ bDirty(FALSE)
+{
+ aIdleTimer.SetTimeoutHdl(LINK(this,SdrItemBrowser,IdleHdl));
+ GetBrowserControl().SetEntryChangedHdl(LINK(this,SdrItemBrowser,ChangedHdl));
+ GetBrowserControl().SetSetDirtyHdl(LINK(this,SdrItemBrowser,SetDirtyHdl));
+ SetDirty();
+}
+
+Window* SdrItemBrowser::ImpGetViewWin(SdrView& rView)
+{
+ USHORT nAnz=rView.GetWinCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ OutputDevice* pOut=rView.GetWin(nNum);
+ if (pOut->GetOutDevType()==OUTDEV_WINDOW) {
+ return (Window*)pOut;
+ }
+ }
+ return 0L;
+}
+
+void SdrItemBrowser::ForceParent()
+{
+ Window* pWin=ImpGetViewWin(*pView);
+ if (pWin!=NULL) SetParent(pWin);
+}
+
+void SdrItemBrowser::SetDirty()
+{
+ if (!bDirty) {
+ bDirty=TRUE;
+ aIdleTimer.SetTimeout(1);
+ aIdleTimer.Start();
+ }
+}
+
+void SdrItemBrowser::Undirty()
+{
+ aIdleTimer.Stop();
+ bDirty = FALSE;
+
+// SfxItemSet aSet(pView->GetAttributes());
+ SfxItemSet aSet(pView->GetModel()->GetItemPool());
+ pView->GetAttributes(aSet);
+
+ if(pView->HasMarkedObj())
+ {
+ // SfxItemSet a2ndSet(pView->GetAttributes(TRUE));
+ SfxItemSet a2ndSet(pView->GetModel()->GetItemPool());
+ pView->GetAttributes(a2ndSet, TRUE);
+
+ SetAttributes(&aSet,&a2ndSet);
+ }
+ else
+ {
+ SetAttributes(&aSet);
+ }
+}
+
+IMPL_LINK(SdrItemBrowser,IdleHdl,Timer*,aTimer)
+{
+ Undirty();
+ return 0;
+}
+
+IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse)
+{
+ const ImpItemListRow* pEntry=pBrowse->GetAktChangeEntry();
+ if (pEntry!=NULL)
+ {
+// SfxItemSet aSet(pView->GetAttributes());
+ SfxItemSet aSet(pView->GetModel()->GetItemPool());
+ pView->GetAttributes(aSet);
+
+ SfxItemSet aNewSet(*aSet.GetPool(),pEntry->nWhichId,pEntry->nWhichId);
+ XubString aNewText(pBrowse->GetNewEntryValue());
+ BOOL bDel( aNewText.EqualsAscii("del")
+ || aNewText.EqualsAscii("Del")
+ || aNewText.EqualsAscii("DEL")
+ || aNewText.EqualsAscii("default")
+ || aNewText.EqualsAscii("Default")
+ || aNewText.EqualsAscii("DEFAULT"));
+
+ if (!bDel) {
+ SfxPoolItem* pNewItem=aSet.Get(pEntry->nWhichId).Clone();
+ long nLongVal=0;
+ nLongVal = aNewText.ToInt32();
+ if (pEntry->bCanNum) {
+ if (nLongVal>pEntry->nMax) nLongVal=pEntry->nMax;
+ if (nLongVal<pEntry->nMin) nLongVal=pEntry->nMin;
+ }
+ FASTBOOL bPair=FALSE;
+ FASTBOOL bPairX=TRUE;
+ FASTBOOL bPairY=FALSE;
+ USHORT nSepLen=1;
+ long nLongX = aNewText.ToInt32();
+ long nLongY=0;
+ xub_StrLen nPos = aNewText.Search(sal_Unicode('/'));
+ if (nPos==STRING_NOTFOUND) nPos=aNewText.Search(sal_Unicode(':'));
+ if (nPos==STRING_NOTFOUND) nPos=aNewText.Search(sal_Unicode(' '));
+ if (nPos==STRING_NOTFOUND) { nPos=aNewText.SearchAscii(".."); if (nPos!=STRING_NOTFOUND) nSepLen=2; }
+ if (nPos!=STRING_NOTFOUND) {
+ bPair=TRUE;
+ bPairX=nPos>0;
+ XubString s(aNewText);
+ s.Erase(0,nPos+nSepLen);
+ bPairY = (BOOL)aNewText.Len();
+ nLongY = s.ToInt32();
+ }
+ switch (pEntry->eItemType) {
+ case ITEM_BYTE : ((SfxByteItem *)pNewItem)->SetValue((BYTE )nLongVal); break;
+ case ITEM_INT16 : ((SfxInt16Item *)pNewItem)->SetValue((INT16 )nLongVal); break;
+ case ITEM_UINT16: ((SfxUInt16Item*)pNewItem)->SetValue((UINT16)nLongVal); break;
+ case ITEM_INT32: {
+ if(HAS_BASE(SdrAngleItem, pNewItem))
+ {
+ aNewText.SearchAndReplace(sal_Unicode(','), sal_Unicode('.'));
+ double nVal = aNewText.ToFloat();
+ nLongVal = (long)(nVal * 100 + 0.5);
+ }
+ ((SfxInt32Item *)pNewItem)->SetValue((INT32)nLongVal);
+ } break;
+ case ITEM_UINT32: ((SfxUInt32Item*)pNewItem)->SetValue(aNewText.ToInt32()); break;
+ case ITEM_ENUM : ((SfxEnumItemInterface*)pNewItem)->SetEnumValue((USHORT)nLongVal); break;
+ case ITEM_BOOL: {
+ aNewText.ToUpperAscii();
+ if (aNewText.EqualsAscii("TRUE")) nLongVal=1;
+ if (aNewText.EqualsAscii("JA")) nLongVal=1;
+ if (aNewText.EqualsAscii("AN")) nLongVal=1;
+ if (aNewText.EqualsAscii("EIN")) nLongVal=1;
+ if (aNewText.EqualsAscii("ON")) nLongVal=1;
+ if (aNewText.EqualsAscii("YES")) nLongVal=1;
+ ((SfxBoolItem*)pNewItem)->SetValue((BOOL)nLongVal);
+ } break;
+ case ITEM_FLAG : ((SfxFlagItem *)pNewItem)->SetValue((USHORT)nLongVal); break;
+ case ITEM_STRING: ((SfxStringItem*)pNewItem)->SetValue(aNewText); break;
+ case ITEM_POINT : ((SfxPointItem*)pNewItem)->SetValue(Point(nLongX,nLongY)); break;
+ case ITEM_RECT : break;
+ case ITEM_RANGE : {
+ ((SfxRangeItem*)pNewItem)->From()=(USHORT)nLongX;
+ ((SfxRangeItem*)pNewItem)->From()=(USHORT)nLongY;
+ } break;
+ case ITEM_LRANGE : {
+ } break;
+ case ITEM_FRACTION: {
+ if (!bPairX) nLongX=1;
+ if (!bPairY) nLongY=1;
+ ((SdrFractionItem*)pNewItem)->SetValue(Fraction(nLongX,nLongY));
+ } break;
+ case ITEM_XCOLOR: break;
+ case ITEM_COLOR: break;
+ case ITEM_FONT: {
+ ((SvxFontItem*)pNewItem)->GetFamily()=FAMILY_DONTKNOW;
+ ((SvxFontItem*)pNewItem)->GetFamilyName()=aNewText;
+ ((SvxFontItem*)pNewItem)->GetStyleName().Erase();
+ } break;
+ case ITEM_FONTHEIGHT: {
+ ULONG nHgt=0;
+ USHORT nProp=100;
+ if (aNewText.Search(sal_Unicode('%'))!=STRING_NOTFOUND) {
+ nProp=(USHORT)nLongVal;
+ } else {
+ nHgt=nLongVal;
+ }
+ ((SvxFontHeightItem*)pNewItem)->SetHeight(nHgt,nProp);
+ } break;
+ case ITEM_FONTWIDTH: {
+ USHORT nWdt=0;
+ USHORT nProp=100;
+ if (aNewText.Search(sal_Unicode('%'))!=STRING_NOTFOUND) {
+ nProp=(USHORT)nLongVal;
+ } else {
+ nWdt=(USHORT)nLongVal;
+ }
+ ((SvxFontWidthItem*)pNewItem)->SetWidth(nWdt,nProp);
+ } break;
+ case ITEM_FIELD: break;
+ } // switch
+ aNewSet.Put(*pNewItem);
+ delete pNewItem;
+ }
+ pView->SetAttributes(aNewSet,bDel);
+ }
+ return 0;
+}
+
+IMPL_LINK(SdrItemBrowser,SetDirtyHdl,_SdrItemBrowserControl*,pBrowse)
+{
+ SetDirty();
+ return 0;
+}
+
+
diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx
new file mode 100644
index 0000000000..8d46c6dd4f
--- /dev/null
+++ b/svx/source/svdraw/svditer.cxx
@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * $RCSfile: svditer.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svditer.hxx"
+#include "svdobj.hxx"
+#include "svdogrp.hxx"
+#include "svdpage.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@@@@@ @@@@@ @@@@@ @@@@ @@@@@@ @@@@ @@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@ @@@@@ @@@@@@ @@ @@ @@ @@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrObjListIter::SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode, FASTBOOL bRevSearch)
+{
+ pMainList=&rObjList;
+ bReverse=bRevSearch;
+ switch (eMode) {
+ case IM_FLAT : bRecurse=FALSE; bSkipGrp=FALSE; break;
+ case IM_DEEPWITHGROUPS: bRecurse=TRUE; bSkipGrp=FALSE; break;
+ case IM_DEEPNOGROUPS : bRecurse=TRUE; bSkipGrp=TRUE; break;
+ }
+ Reset();
+}
+
+SdrObjListIter::SdrObjListIter(const SdrObject& rGroup, SdrIterMode eMode, FASTBOOL bRevSearch)
+{
+ pMainList=rGroup.GetSubList();
+ bReverse=bRevSearch;
+ switch (eMode) {
+ case IM_FLAT : bRecurse=FALSE; bSkipGrp=FALSE; break;
+ case IM_DEEPWITHGROUPS: bRecurse=TRUE; bSkipGrp=FALSE; break;
+ case IM_DEEPNOGROUPS : bRecurse=TRUE; bSkipGrp=TRUE; break;
+ }
+ Reset();
+}
+
+void SdrObjListIter::Reset()
+{
+ pAktList=pMainList;
+ pAktGroup=NULL;
+ nAktNum=0;
+ nObjAnz=pMainList->aList.Count();
+ if (bReverse && nObjAnz!=0) {
+ nAktNum=nObjAnz-1;
+ }
+ pNextObj=pAktList->GetObj(nAktNum);
+ if (bReverse && bRecurse && pNextObj!=NULL) { // rekursive Ruekwaertssuche
+ // hier wird nun das tiefste Objekt der letzten Gruppe gesucht,
+ // falls das letzte Objekt der Hauptgruppe ein Gruppenobjekt ist.
+ FASTBOOL bWeiter=TRUE;
+ while (bWeiter) {
+ SdrObjList* pOL=pNextObj->GetSubList();
+ if (pOL!=NULL) {
+ ULONG nTmpObjCnt=pOL->GetObjCount();
+ if (nTmpObjCnt!=0) {
+ pAktList=pOL;
+ pAktGroup=pNextObj;
+ nObjAnz=nTmpObjCnt;
+ nAktNum=nObjAnz-1;
+ pNextObj=pAktList->GetObj(nAktNum);
+ } else bWeiter=FALSE;
+ } else bWeiter=FALSE;
+ }
+ }
+ if (bSkipGrp) {
+ while (pNextObj!=NULL && pNextObj->IsGroupObject()) {
+ Next();
+ }
+ }
+}
+
+SdrObject* SdrObjListIter::Next()
+{
+ const SdrObject* r=pNextObj;
+ do {
+ if (pNextObj!=NULL) {
+ if (!bReverse) {
+ SdrObjList* pSub=pNextObj->GetSubList();
+ if (bRecurse && pSub!=NULL && pSub->GetObjCount()!=0) { // Abstieg in eine Subliste
+ pAktGroup=/*(SdrObjGroup*)*/pNextObj;
+ ((SdrObject*)pAktGroup)->SetOrdNum(nAktNum);
+ pAktList=pAktGroup->GetSubList();
+ nAktNum=0;
+ pNextObj=(SdrObject*)pAktList->aList.GetObject(nAktNum);
+ } else {
+ nAktNum++;
+ pNextObj=pAktList->GetObj(nAktNum);
+ while (pNextObj==NULL && pAktGroup!=NULL) { // Ende Subliste
+ nAktNum=pAktGroup->nOrdNum; //GetOrdNum();
+ pAktGroup=pAktGroup->GetUpGroup();
+ if (pAktGroup==NULL) pAktList=pMainList; // dann wird das wohl die Page sein
+ if (pAktGroup!=NULL) {
+ pAktList=pAktGroup->GetSubList();
+ if (pAktList==pMainList) pAktGroup=NULL; // nicht an der MainList nach oben vorbeischliddern
+ }
+ nAktNum++;
+ pNextObj=(SdrObject*)pAktList->aList.GetObject(nAktNum);
+ }
+ }
+ } else {
+ if (nAktNum>0) {
+ nAktNum--;
+ pNextObj=(SdrObject*)pAktList->aList.GetObject(nAktNum);
+ SdrObjList* pSub=pNextObj->GetSubList();
+ if (bRecurse && pSub!=NULL && pSub->GetObjCount()!=0) { // rueckwaerts auf eine Gruppe gestossen
+ // hier wird nun das tiefste Objekt der letzten Gruppe gesucht.
+ FASTBOOL bWeiter=TRUE;
+ while (bWeiter) {
+ SdrObjList* pOL=pNextObj->GetSubList();
+ if (pOL!=NULL) {
+ ULONG nTmpObjCnt=pOL->GetObjCount();
+ if (nTmpObjCnt!=0) {
+ pAktList=pOL;
+ pAktGroup=pNextObj;
+ nObjAnz=nTmpObjCnt;
+ nAktNum=nObjAnz-1;
+ pNextObj=pAktList->GetObj(nAktNum);
+ } else bWeiter=FALSE;
+ } else bWeiter=FALSE;
+ }
+ }
+ } else {
+ if (bRecurse && pAktList!=pMainList && pAktGroup!=NULL) { // Ende der SubListe
+ // fortfahren mit dem
+ pNextObj=pAktGroup;
+ nAktNum=pAktGroup->GetOrdNum();
+ pAktGroup=pAktGroup->GetUpGroup();
+ if (pAktGroup!=NULL) {
+ pAktList=pAktGroup->GetSubList();
+ } else {
+ pAktList=pMainList;
+ }
+ if (pAktList==pMainList) pAktGroup=NULL; // nicht an der MainList nach oben vorbeischliddern
+ } else { // ansonsten Listenende
+ pNextObj=NULL;
+ }
+ }
+ }
+ }
+ } while (bSkipGrp && pNextObj!=NULL && pNextObj->IsGroupObject());
+ return (SdrObject*)r;
+}
+
diff --git a/svx/source/svdraw/svditext.hxx b/svx/source/svdraw/svditext.hxx
new file mode 100644
index 0000000000..2fb5218475
--- /dev/null
+++ b/svx/source/svdraw/svditext.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * $RCSfile: svditext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVDITEXT_HXX
+#define _SVDITEXT_HXX
+
+// SvxItem-Mapping. Wird benoetigt um die SvxItem-Header erfolgreich zu includen
+
+#ifndef _EDITDATA_HXX
+#include <editdata.hxx>
+#endif
+
+// textitem.hxx editdata.hxx
+#define ITEMID_COLOR EE_CHAR_COLOR
+#define ITEMID_FONT EE_CHAR_FONTINFO
+#define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT
+#define ITEMID_FONTWIDTH EE_CHAR_FONTWIDTH
+#define ITEMID_WEIGHT EE_CHAR_WEIGHT
+#define ITEMID_UNDERLINE EE_CHAR_UNDERLINE
+#define ITEMID_CROSSEDOUT EE_CHAR_STRIKEOUT
+#define ITEMID_POSTURE EE_CHAR_ITALIC
+#define ITEMID_CONTOUR EE_CHAR_OUTLINE
+#define ITEMID_SHADOWED EE_CHAR_SHADOW
+#define ITEMID_ESCAPEMENT EE_CHAR_ESCAPEMENT
+#define ITEMID_AUTOKERN EE_CHAR_PAIRKERNING
+#define ITEMID_WORDLINEMODE EE_CHAR_WLM
+
+// paraitem.hxx editdata.hxx
+#define ITEMID_ADJUST EE_PARA_JUST
+#define ITEMID_FIELD EE_FEATURE_FIELD
+
+#endif // _SVDITEXT_HXX
+
diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx
new file mode 100644
index 0000000000..f2449a6aae
--- /dev/null
+++ b/svx/source/svdraw/svdlayer.cxx
@@ -0,0 +1,577 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdlayer.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdlayer.hxx"
+#include "svdio.hxx"
+#include "svdmodel.hxx" // fuer Broadcasting
+#include "svdglob.hxx" // StringCache
+#include "svdstr.hrc" // Namen aus der Resource
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// SetOfByte
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SetOfByte::IsEmpty() const
+{
+ for (USHORT i=0; i<32; i++) {
+ if (aData[i]!=0) return FALSE;
+ }
+ return TRUE;
+}
+
+FASTBOOL SetOfByte::IsFull() const
+{
+ for (USHORT i=0; i<32; i++) {
+ if (aData[i]!=0xFF) return FALSE;
+ }
+ return TRUE;
+}
+
+USHORT SetOfByte::GetSetCount() const
+{
+ USHORT i;
+ USHORT nRet=0;
+ for (i=0; i<32; i++) {
+ BYTE a=aData[i];
+ if (a!=0) {
+ if (a & 0x80) nRet++;
+ if (a & 0x40) nRet++;
+ if (a & 0x20) nRet++;
+ if (a & 0x10) nRet++;
+ if (a & 0x08) nRet++;
+ if (a & 0x04) nRet++;
+ if (a & 0x02) nRet++;
+ if (a & 0x01) nRet++;
+ }
+ }
+ return nRet;
+}
+
+BYTE SetOfByte::GetSetBit(USHORT nNum) const
+{
+ nNum++;
+ USHORT i=0,j=0;
+ USHORT nRet=0;
+ while (j<nNum && i<256) {
+ if (IsSet(BYTE(i))) j++;
+ i++;
+ }
+ if (j==nNum) nRet=i-1;
+ return BYTE(nRet);
+}
+
+USHORT SetOfByte::GetClearCount() const
+{
+ return USHORT(256-GetSetCount());
+}
+
+BYTE SetOfByte::GetClearBit(USHORT nNum) const
+{
+ nNum++;
+ USHORT i=0,j=0;
+ USHORT nRet=0;
+ while (j<nNum && i<256) {
+ if (!IsSet(BYTE(i))) j++;
+ i++;
+ }
+ if (j==nNum) nRet=i-1;
+ return BYTE(nRet);
+}
+
+void SetOfByte::operator&=(const SetOfByte& r2ndSet)
+{
+ for (unsigned i=0; i<32; i++) {
+ aData[i]&=r2ndSet.aData[i];
+ }
+}
+
+void SetOfByte::operator|=(const SetOfByte& r2ndSet)
+{
+ for (unsigned i=0; i<32; i++) {
+ aData[i]|=r2ndSet.aData[i];
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// SdrLayer
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrLayer::SetStandardLayer(FASTBOOL bStd)
+{
+ nType=(UINT16)bStd;
+ if (bStd) {
+ aName=ImpGetResStr(STR_StandardLayerName);
+ }
+ if (pModel!=NULL) {
+ SdrHint aHint(HINT_LAYERCHG);
+ pModel->Broadcast(aHint);
+ pModel->SetChanged();
+ }
+}
+
+void SdrLayer::SetName(const XubString& rNewName)
+{
+ if(!rNewName.Equals(aName))
+ {
+ aName = rNewName;
+ nType = 0; // Userdefined
+
+ if(pModel)
+ {
+ SdrHint aHint(HINT_LAYERCHG);
+
+ pModel->Broadcast(aHint);
+ pModel->SetChanged();
+ }
+ }
+}
+
+FASTBOOL SdrLayer::operator==(const SdrLayer& rCmpLayer) const
+{
+ return (nID == rCmpLayer.nID
+ && nType == rCmpLayer.nType
+ && aName.Equals(rCmpLayer.aName));
+}
+
+SvStream& operator>>(SvStream& rIn, SdrLayer& rLayer)
+{
+ if(rIn.GetError())
+ return rIn;
+
+ SdrIOHeader aHead(rIn, STREAM_READ);
+
+ rIn >> rLayer.nID;
+
+ // UNICODE: rIn >> rLayer.aName;
+ rIn.ReadByteString(rLayer.aName);
+
+ if(aHead.GetVersion() >= 1)
+ {
+ // Das Standardlayerflag kam direkt nach der Betalieferung dazu
+ rIn >> rLayer.nType;
+
+ if(rLayer.nType == 1)
+ {
+ rLayer.aName = ImpGetResStr(STR_StandardLayerName);
+ }
+ }
+
+ if(aHead.GetVersion() <= 12)
+ {
+ // nType war lange Zeit nicht initiallisiert!
+ if(rLayer.nType > 1)
+ rLayer.nType = 0;
+ }
+
+ return rIn;
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrLayer& rLayer)
+{
+ SdrIOHeader aHead(rOut, STREAM_WRITE, SdrIOLayrID);
+
+ rOut << rLayer.nID;
+
+ // UNICODE: rOut << rLayer.aName;
+ rOut.WriteByteString(rLayer.aName);
+
+ rOut << rLayer.nType;
+
+ return rOut;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// SdrLayerSet
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrLayerSet::operator==(const SdrLayerSet& rCmpLayerSet) const
+{
+ return(aName.Equals(rCmpLayerSet.aName)
+ && aMember == rCmpLayerSet.aMember
+ && aExclude == rCmpLayerSet.aExclude);
+}
+
+void SdrLayerSet::Broadcast() const
+{
+ if (pModel!=NULL) {
+ SdrHint aHint(HINT_LAYERSETCHG);
+ pModel->Broadcast(aHint);
+ pModel->SetChanged();
+ }
+}
+
+SvStream& operator>>(SvStream& rIn, SdrLayerSet& rSet)
+{
+ if(rIn.GetError())
+ return rIn;
+
+ SdrIOHeader aHead(rIn, STREAM_READ);
+
+ rIn >> rSet.aMember;
+ rIn >> rSet.aExclude;
+
+ // UNICODE: rIn >> rSet.aName;
+ rIn.ReadByteString(rSet.aName);
+
+ return rIn;
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrLayerSet& rSet)
+{
+ SdrIOHeader aHead(rOut, STREAM_WRITE, SdrIOLSetID);
+
+ rOut << rSet.aMember;
+ rOut << rSet.aExclude;
+
+ // UNICODE: rOut << rSet.aName;
+ rOut.WriteByteString(rSet.aName);
+
+ return rOut;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// SdrLayerAdmin
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrLayerAdmin::SdrLayerAdmin(SdrLayerAdmin* pNewParent):
+ aLayer(1024,16,16),
+ aLSets(1024,16,16),
+ pModel(NULL)
+{
+ sal_Char aTextControls[] = "Controls";
+ aControlLayerName = String(aTextControls, sizeof(aTextControls-1));
+ pParent=pNewParent;
+}
+
+SdrLayerAdmin::SdrLayerAdmin(const SdrLayerAdmin& rSrcLayerAdmin):
+ aLayer(1024,16,16),
+ aLSets(1024,16,16),
+ pParent(NULL),
+ pModel(NULL)
+{
+ sal_Char aTextControls[] = "Controls";
+ aControlLayerName = String(aTextControls, sizeof(aTextControls-1));
+ *this = rSrcLayerAdmin;
+}
+
+SdrLayerAdmin::~SdrLayerAdmin()
+{
+ ClearLayer();
+ ClearLayerSets();
+}
+
+void SdrLayerAdmin::ClearLayer()
+{
+ SdrLayer* pL;
+ pL=(SdrLayer*)aLayer.First();
+ while (pL!=NULL) {
+ delete pL;
+ pL=(SdrLayer*)aLayer.Next();
+ }
+ aLayer.Clear();
+}
+
+void SdrLayerAdmin::ClearLayerSets()
+{
+ SdrLayerSet* pL;
+ pL=(SdrLayerSet*)aLSets.First();
+ while (pL!=NULL) {
+ delete pL;
+ pL=(SdrLayerSet*)aLSets.Next();
+ }
+ aLSets.Clear();
+}
+
+const SdrLayerAdmin& SdrLayerAdmin::operator=(const SdrLayerAdmin& rSrcLayerAdmin)
+{
+ ClearLayer();
+ ClearLayerSets();
+ pParent=rSrcLayerAdmin.pParent;
+ USHORT i;
+ USHORT nAnz=rSrcLayerAdmin.GetLayerCount();
+ for (i=0; i<nAnz; i++) {
+ aLayer.Insert(new SdrLayer(*rSrcLayerAdmin.GetLayer(i)),CONTAINER_APPEND);
+ }
+ nAnz=rSrcLayerAdmin.GetLayerSetCount();
+ for (i=0; i<nAnz; i++) {
+ aLSets.Insert(new SdrLayerSet(*rSrcLayerAdmin.GetLayerSet(i)),CONTAINER_APPEND);
+ }
+ return *this;
+}
+
+FASTBOOL SdrLayerAdmin::operator==(const SdrLayerAdmin& rCmpLayerAdmin) const
+{
+ if (pParent!=rCmpLayerAdmin.pParent ||
+ aLayer.Count()!=rCmpLayerAdmin.aLayer.Count() ||
+ aLSets.Count()!=rCmpLayerAdmin.aLSets.Count()) return FALSE;
+ FASTBOOL bOk=TRUE;
+ USHORT nAnz=GetLayerCount();
+ USHORT i=0;
+ while (bOk && i<nAnz) {
+ bOk=*GetLayer(i)==*rCmpLayerAdmin.GetLayer(i);
+ i++;
+ }
+ nAnz=GetLayerSetCount();
+ i=0;
+ while (bOk && i<nAnz) {
+ bOk=*GetLayerSet(i)==*rCmpLayerAdmin.GetLayerSet(i);
+ i++;
+ }
+ return bOk;
+}
+
+void SdrLayerAdmin::SetModel(SdrModel* pNewModel)
+{
+ if (pNewModel!=pModel) {
+ pModel=pNewModel;
+ USHORT nAnz=GetLayerCount();
+ USHORT i;
+ for (i=0; i<nAnz; i++) {
+ GetLayer(i)->SetModel(pNewModel);
+ }
+ nAnz=GetLayerSetCount();
+ for (i=0; i<nAnz; i++) {
+ GetLayerSet(i)->SetModel(pNewModel);
+ }
+ }
+}
+
+void SdrLayerAdmin::Broadcast(FASTBOOL bLayerSet) const
+{
+ if (pModel!=NULL) {
+ SdrHint aHint(bLayerSet ? HINT_LAYERSETORDERCHG : HINT_LAYERORDERCHG);
+ pModel->Broadcast(aHint);
+ pModel->SetChanged();
+ }
+}
+
+SdrLayer* SdrLayerAdmin::RemoveLayer(USHORT nPos)
+{
+ SdrLayer* pRetLayer=(SdrLayer*)(aLayer.Remove(nPos));
+ Broadcast(FALSE);
+ return pRetLayer;
+}
+
+SdrLayer* SdrLayerAdmin::NewLayer(const XubString& rName, USHORT nPos)
+{
+ SdrLayerID nID=GetUniqueLayerID();
+ SdrLayer* pLay=new SdrLayer(nID,rName);
+ pLay->SetModel(pModel);
+ aLayer.Insert(pLay,nPos);
+ Broadcast(FALSE);
+ return pLay;
+}
+
+SdrLayer* SdrLayerAdmin::NewStandardLayer(USHORT nPos)
+{
+ SdrLayerID nID=GetUniqueLayerID();
+ SdrLayer* pLay=new SdrLayer(nID,String());
+ pLay->SetStandardLayer();
+ pLay->SetModel(pModel);
+ aLayer.Insert(pLay,nPos);
+ Broadcast(FALSE);
+ return pLay;
+}
+
+SdrLayer* SdrLayerAdmin::MoveLayer(USHORT nPos, USHORT nNewPos)
+{
+ SdrLayer* pLayer=(SdrLayer*)(aLayer.Remove(nPos));
+ if (pLayer!=NULL) {
+ aLayer.Insert(pLayer,nNewPos);
+ }
+ Broadcast(FALSE);
+ return pLayer;
+}
+
+void SdrLayerAdmin::MoveLayer(SdrLayer* pLayer, USHORT nNewPos)
+{
+ ULONG nPos=aLayer.GetPos(pLayer);
+ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
+ aLayer.Remove(nPos);
+ aLayer.Insert(pLayer,nNewPos);
+ Broadcast(FALSE);
+ }
+}
+
+USHORT SdrLayerAdmin::GetLayerPos(SdrLayer* pLayer) const
+{
+ ULONG nRet=SDRLAYER_NOTFOUND;
+ if (pLayer!=NULL) {
+ nRet=aLayer.GetPos(pLayer);
+ if (nRet==CONTAINER_ENTRY_NOTFOUND) {
+ nRet=SDRLAYER_NOTFOUND;
+ }
+ }
+ return USHORT(nRet);
+}
+
+const SdrLayer* SdrLayerAdmin::GetLayer(const XubString& rName, FASTBOOL bInherited) const
+{
+ UINT16 i(0);
+ const SdrLayer* pLay = NULL;
+
+ while(i < GetLayerCount() && !pLay)
+ {
+ if(rName.Equals(GetLayer(i)->GetName()))
+ pLay = GetLayer(i);
+ else
+ i++;
+ }
+
+ if(!pLay && pParent)
+ {
+ pLay = pParent->GetLayer(rName, TRUE);
+ }
+
+ return pLay;
+}
+
+SdrLayerID SdrLayerAdmin::GetLayerID(const XubString& rName, FASTBOOL bInherited) const
+{
+ SdrLayerID nRet=SDRLAYER_NOTFOUND;
+ const SdrLayer* pLay=GetLayer(rName,bInherited);
+ if (pLay!=NULL) nRet=pLay->GetID();
+ return nRet;
+}
+
+const SdrLayer* SdrLayerAdmin::GetLayerPerID(USHORT nID) const
+{
+ USHORT i=0;
+ const SdrLayer* pLay=NULL;
+ while (i<GetLayerCount() && pLay==NULL) {
+ if (nID==GetLayer(i)->GetID()) pLay=GetLayer(i);
+ else i++;
+ }
+ return pLay;
+}
+
+// Globale LayerID's beginnen mit 0 aufsteigend.
+// Lokale LayerID's beginnen mit 254 absteigend.
+// 255 ist reserviert fuer SDRLAYER_NOTFOUND
+
+SdrLayerID SdrLayerAdmin::GetUniqueLayerID() const
+{
+ SetOfByte aSet;
+ FASTBOOL bDown=pParent==NULL;
+ USHORT j;
+ for (j=0; j<GetLayerCount(); j++) {
+ aSet.Set(GetLayer(j)->GetID());
+ }
+ short i;
+ if (!bDown) {
+ i=254;
+ while (i>0 && aSet.IsSet(BYTE(i))) i++;
+ if (i<0) i=254;
+ } else {
+ i=0;
+ while (i<=254 && aSet.IsSet(BYTE(i))) i++;
+ if (i>254) i=0;
+ }
+ return SdrLayerID(i);
+}
+
+SdrLayerSet* SdrLayerAdmin::NewLayerSet(const XubString& rName, USHORT nPos)
+{
+ SdrLayerSet* pSet=new SdrLayerSet(/**this,*/rName);
+ pSet->SetModel(pModel);
+ aLSets.Insert(pSet,nPos);
+ Broadcast(TRUE);
+ return pSet;
+}
+
+SdrLayerSet* SdrLayerAdmin::RemoveLayerSet(SdrLayerSet* pSet)
+{
+ SdrLayerSet* pRetSet=(SdrLayerSet*)aLSets.Remove(pSet);
+ Broadcast(TRUE);
+ return pRetSet;
+}
+
+void SdrLayerAdmin::MoveLayerSet(SdrLayerSet* pSet, USHORT nNewPos)
+{
+ ULONG nPos=aLSets.GetPos(pSet);
+ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
+ aLSets.Remove(nPos);
+ aLSets.Insert(pSet,nNewPos);
+ Broadcast(TRUE);
+ }
+}
+
+const SdrLayerSet* SdrLayerAdmin::GetLayerSet(const XubString& rName, FASTBOOL bInherited) const
+{
+ UINT16 i(0);
+ const SdrLayerSet* pSet = NULL;
+
+ while(i <= GetLayerSetCount() && !pSet)
+ {
+ if(rName.Equals(GetLayerSet(i)->GetName()))
+ pSet = GetLayerSet(i);
+ else
+ i++;
+ }
+
+ if(!pSet && pParent)
+ {
+ pSet = pParent->GetLayerSet(rName, TRUE);
+ }
+
+ return pSet;
+}
+
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
new file mode 100644
index 0000000000..28a78d0e6c
--- /dev/null
+++ b/svx/source/svdraw/svdmark.cxx
@@ -0,0 +1,648 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdmark.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdmark.hxx"
+#include "svdetc.hxx"
+#include "svdobj.hxx"
+#include "svdpage.hxx"
+#include "svditer.hxx"
+#include "svdpagv.hxx"
+#include "svdopath.hxx" // zur Abschaltung
+#include "svdogrp.hxx" // des Cache bei
+#include "svdorect.hxx" // GetMarkDescription
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpSdrUShortContSorter: public ContainerSorter
+{
+public:
+ ImpSdrUShortContSorter(Container& rNewCont): ContainerSorter(rNewCont) {}
+ virtual int Compare(const void* pElem1, const void* pElem2) const;
+};
+
+int ImpSdrUShortContSorter::Compare(const void* pElem1, const void* pElem2) const
+{
+ USHORT n1=USHORT(ULONG(pElem1));
+ USHORT n2=USHORT(ULONG(pElem2));
+ return n1<n2 ? -1 : n1>n2 ? 1 : 0;
+}
+
+void SdrUShortCont::Sort()
+{
+ ImpSdrUShortContSorter aSort(aArr);
+ aSort.DoSort();
+ bSorted=TRUE;
+ if (bDelDups) {
+ ULONG nNum=GetCount();
+ if (nNum>1) {
+ nNum--;
+ USHORT nVal0=GetObject(nNum);
+ while (nNum>0) {
+ nNum--;
+ USHORT nVal1=GetObject(nNum);
+ if (nVal1==nVal0) {
+ Remove(nNum);
+ }
+ nVal0=nVal1;
+ }
+ }
+ }
+}
+
+void SdrUShortCont::CheckSort(ULONG nPos)
+{
+ ULONG nAnz=aArr.Count();
+ if (nPos>nAnz) nPos=nAnz;
+ USHORT nAktVal=GetObject(nPos);
+ if (nPos>0) {
+ USHORT nPrevVal=GetObject(nPos-1);
+ if (bDelDups) {
+ if (nPrevVal>=nAktVal) bSorted=FALSE;
+ } else {
+ if (nPrevVal>nAktVal) bSorted=FALSE;
+ }
+ }
+ if (nPos<nAnz-1) {
+ USHORT nNextVal=GetObject(nPos+1);
+ if (bDelDups) {
+ if (nNextVal<=nAktVal) bSorted=FALSE;
+ } else {
+ if (nNextVal<nAktVal) bSorted=FALSE;
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrMark& SdrMark::operator=(const SdrMark& rMark)
+{
+ pObj=rMark.pObj;
+ pPageView=rMark.pPageView;
+ bCon1=rMark.bCon1;
+ bCon2=rMark.bCon2;
+ nUser=rMark.nUser;
+ if (rMark.pPoints==NULL) {
+ if (pPoints!=NULL) {
+ delete pPoints;
+ pPoints=NULL;
+ }
+ } else {
+ if (pPoints==NULL) {
+ pPoints=new SdrUShortCont(*rMark.pPoints);
+ } else {
+ *pPoints=*rMark.pPoints;
+ }
+ }
+ if (rMark.pLines==NULL) {
+ if (pLines!=NULL) {
+ delete pLines;
+ pLines=NULL;
+ }
+ } else {
+ if (pLines==NULL) {
+ pLines=new SdrUShortCont(*rMark.pLines);
+ } else {
+ *pLines=*rMark.pLines;
+ }
+ }
+ if (rMark.pGluePoints==NULL) {
+ if (pGluePoints!=NULL) {
+ delete pGluePoints;
+ pGluePoints=NULL;
+ }
+ } else {
+ if (pGluePoints==NULL) {
+ pGluePoints=new SdrUShortCont(*rMark.pGluePoints);
+ } else {
+ *pGluePoints=*rMark.pGluePoints;
+ }
+ }
+ return *this;
+}
+
+FASTBOOL SdrMark::operator==(const SdrMark& rMark) const
+{
+ FASTBOOL bRet=pObj==rMark.pObj && pPageView==rMark.pPageView && bCon1==rMark.bCon1 && bCon2==rMark.bCon2 && nUser==rMark.nUser;
+ if ((pPoints!=NULL) != (rMark.pPoints!=NULL)) bRet=FALSE;
+ if ((pLines !=NULL) != (rMark.pLines !=NULL)) bRet=FALSE;
+ if ((pGluePoints!=NULL) != (rMark.pGluePoints!=NULL)) bRet=FALSE;
+ if (bRet && pPoints!=NULL && *pPoints!=*rMark.pPoints) bRet=FALSE;
+ if (bRet && pLines !=NULL && *pLines !=*rMark.pLines ) bRet=FALSE;
+ if (bRet && pGluePoints!=NULL && *pGluePoints!=*rMark.pGluePoints) bRet=FALSE;
+ return bRet;
+}
+
+SdrPage* SdrMark::GetPage() const
+{
+ return (pObj!=NULL ? pObj->GetPage() : NULL);
+}
+
+SdrObjList* SdrMark::GetObjList() const
+{
+ return (pObj!=NULL ? pObj->GetObjList() : NULL);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpSdrMarkListSorter: public ContainerSorter
+{
+public:
+ ImpSdrMarkListSorter(Container& rNewCont): ContainerSorter(rNewCont) {}
+ virtual int Compare(const void* pElem1, const void* pElem2) const;
+};
+
+int ImpSdrMarkListSorter::Compare(const void* pElem1, const void* pElem2) const
+{
+ const SdrObject* pObj1=((SdrMark*)pElem1)->GetObj();
+ const SdrObject* pObj2=((SdrMark*)pElem2)->GetObj();
+ const SdrObjList* pOL1=pObj1!=NULL ? pObj1->GetObjList() : NULL;
+ const SdrObjList* pOL2=pObj2!=NULL ? pObj2->GetObjList() : NULL;
+ if (pOL1==pOL2) {
+ ULONG nObjOrd1=pObj1!=NULL ? pObj1->GetOrdNum() : 0;
+ ULONG nObjOrd2=pObj2!=NULL ? pObj2->GetOrdNum() : 0;
+ return nObjOrd1<nObjOrd2 ? -1 : 1;
+ } else {
+ return (long)pOL1<(long)pOL2 ? -1 : 1;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMarkList::ForceSort()
+{
+ if (!bSorted) {
+ bSorted=TRUE;
+ ULONG nAnz=aList.Count();
+ if (nAnz>1) {
+ ImpSdrMarkListSorter aSort(aList);
+ aSort.DoSort();
+ // und nun doppelte rauswerfen
+ if (aList.Count()>1) {
+ SdrMark* pAkt=(SdrMark*)aList.Last();
+ SdrMark* pCmp=(SdrMark*)aList.Prev();
+ while (pCmp!=NULL) {
+ if (pAkt->GetObj()==pCmp->GetObj()) {
+ // Con1/Con2 Merging
+ if (pCmp->IsCon1()) pAkt->SetCon1(TRUE);
+ if (pCmp->IsCon2()) pAkt->SetCon2(TRUE);
+ // pCmp loeschen.
+ aList.Remove();
+ delete pCmp;
+ // Aktueller Entry im Container ist nun pAkt!
+ } else {
+ pAkt=pCmp;
+ }
+ pCmp=(SdrMark*)aList.Prev();
+ }
+ }
+ }
+ }
+}
+
+void SdrMarkList::Clear()
+{
+ for (ULONG i=0; i<GetMarkCount(); i++) {
+ SdrMark* pMark=GetMark(i);
+ delete pMark;
+ }
+ aList.Clear();
+ SetNameDirty();
+}
+
+void SdrMarkList::operator=(const SdrMarkList& rLst)
+{
+ Clear();
+ for (ULONG i=0; i<rLst.GetMarkCount(); i++) {
+ SdrMark* pMark=rLst.GetMark(i);
+ SdrMark* pNeuMark=new SdrMark(*pMark);
+ aList.Insert(pNeuMark,CONTAINER_APPEND);
+ }
+ aMarkName=rLst.aMarkName;
+ bNameOk=rLst.bNameOk;
+ aPointName=rLst.aPointName;
+ bPointNameOk=rLst.bPointNameOk;
+ aGluePointName=rLst.aGluePointName;
+ bGluePointNameOk=rLst.bGluePointNameOk;
+ bSorted=rLst.bSorted;
+}
+
+ULONG SdrMarkList::FindObject(const SdrObject* pObj)
+{
+ ForceSort();
+ if (pObj==NULL || aList.Count()==0) return CONTAINER_ENTRY_NOTFOUND;
+ const SdrObjList* pOL=pObj->GetObjList();
+ ULONG nObjOrd=pObj->GetOrdNum();
+ ULONG nL=0;
+ ULONG nR=aList.Count();
+ if (GetMark(nL)->GetObj()==pObj) return nL;
+ while (nL+1<nR) { // Der Gesuchte befindet sich zwischen, nicht auf den Grenzen!
+ ULONG nMid=(nL+nR)/2;
+ const SdrObject* pMidObj=GetMark(nMid)->GetObj();
+ if (pMidObj==pObj) return nMid; // Hurra, gefunden!
+ const SdrObjList* pMidOL=pMidObj!=NULL ? pMidObj->GetObjList() : NULL;
+ ULONG nMidObjOrd=pMidObj!=NULL ? pMidObj->GetOrdNum() : 0;
+ if (pMidOL==pOL) {
+ if (nMidObjOrd<nObjOrd) nL=nMid;
+ else if (nMidObjOrd>nObjOrd) nR=nMid;
+ else {
+ DBG_ASSERT(FALSE,"SdrMarkList::FindObject(): Anderes Objekt mit gleicher OrdNum gefunden!");
+ return CONTAINER_ENTRY_NOTFOUND;
+ }
+ } else if ((long)pMidOL<(long)pOL) nL=nMid;
+ else nR=nMid;
+ }
+ return CONTAINER_ENTRY_NOTFOUND;
+}
+
+void SdrMarkList::InsertEntry(const SdrMark& rMark, FASTBOOL bChkSort)
+{
+ SetNameDirty();
+ ULONG nAnz=aList.Count();
+ if (!bChkSort || !bSorted || nAnz==0) {
+ if (!bChkSort) bSorted=FALSE;
+ aList.Insert(new SdrMark(rMark),CONTAINER_APPEND);
+ } else {
+ SdrMark* pLast=GetMark(ULONG(nAnz-1));
+ const SdrObject* pLastObj=pLast->GetObj();
+ const SdrObject* pNeuObj=rMark.GetObj();
+ if (pLastObj==pNeuObj) { // Aha, den gibt's schon
+ // Con1/Con2 Merging
+ if (rMark.IsCon1()) pLast->SetCon1(TRUE);
+ if (rMark.IsCon2()) pLast->SetCon2(TRUE);
+ } else {
+ SdrMark* pKopie=new SdrMark(rMark);
+ aList.Insert(pKopie,CONTAINER_APPEND);
+ // und nun checken, ob die Sortierung noch ok ist
+ const SdrObjList* pLastOL=pLastObj!=NULL ? pLastObj->GetObjList() : NULL;
+ const SdrObjList* pNeuOL =pNeuObj !=NULL ? pNeuObj ->GetObjList() : NULL;
+ if (pLastOL==pNeuOL) {
+ ULONG nLastNum=pLastObj!=NULL ? pLastObj->GetOrdNum() : 0;
+ ULONG nNeuNum =pNeuObj !=NULL ? pNeuObj ->GetOrdNum() : 0;
+ if (nNeuNum<nLastNum) {
+ bSorted=FALSE; // irgendwann muss mal sortiert werden
+ }
+ } else {
+ if ((long)pNeuOL<(long)pLastOL) {
+ bSorted=FALSE; // irgendwann muss mal sortiert werden
+ }
+ }
+ }
+ }
+ return;
+}
+
+void SdrMarkList::DeleteMark(ULONG nNum)
+{
+ //ForceSort();
+ SdrMark* pMark=GetMark(nNum);
+ DBG_ASSERT(pMark!=NULL,"DeleteMark: MarkEntry nicht gefunden");
+ if (pMark!=NULL) {
+ aList.Remove(nNum);
+ delete pMark;
+ SetNameDirty();
+ }
+}
+
+void SdrMarkList::ReplaceMark(const SdrMark& rNewMark, ULONG nNum)
+{
+ SdrMark* pMark=GetMark(nNum);
+ DBG_ASSERT(pMark!=NULL,"ReplaceMark: MarkEntry nicht gefunden");
+ if (pMark!=NULL) {
+ delete pMark;
+ SetNameDirty();
+ SdrMark* pKopie=new SdrMark(rNewMark);
+ aList.Replace(pKopie,nNum);
+ bSorted=FALSE;
+ // Checken, ob bSorted wirklich gesetzt werden muss
+ }
+}
+
+void SdrMarkList::Merge(const SdrMarkList& rSrcList, FASTBOOL bReverse)
+{
+ // Merging ohne ein Sort bei rSrcList zu erzwingen
+ if (rSrcList.bSorted) bReverse=FALSE;
+ ULONG nAnz=rSrcList.aList.Count();
+ if (!bReverse) {
+ for (ULONG i=0; i<nAnz; i++) {
+ SdrMark* pM=(SdrMark*)(rSrcList.aList.GetObject(i));
+ InsertEntry(*pM);
+ }
+ } else {
+ for (ULONG i=nAnz; i>0;) {
+ i--;
+ SdrMark* pM=(SdrMark*)(rSrcList.aList.GetObject(i));
+ InsertEntry(*pM);
+ }
+ }
+}
+
+FASTBOOL SdrMarkList::DeletePageView(const SdrPageView& rPV)
+{
+ FASTBOOL bChgd=FALSE;
+ for (ULONG i=GetMarkCount(); i>0;) {
+ i--;
+ SdrMark* pMark=GetMark(i);
+ if (pMark->GetPageView()==&rPV) {
+ aList.Remove(i);
+ delete pMark;
+ SetNameDirty();
+ bChgd=TRUE;
+ }
+ }
+ return bChgd;
+}
+
+FASTBOOL SdrMarkList::InsertPageView(const SdrPageView& rPV)
+{
+ FASTBOOL bChgd=FALSE;
+ DeletePageView(rPV); // erstmal alle raus, dann die ganze Seite hinten dran
+ SdrObject* pObj;
+ const SdrObjList* pOL=rPV.GetObjList();
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG nO=0; nO<nObjAnz; nO++) {
+ pObj=pOL->GetObj(nO);
+ FASTBOOL bDoIt=rPV.IsObjMarkable(pObj);
+ if (bDoIt) {
+ SdrMark* pM=new SdrMark(pObj,(SdrPageView*)&rPV);
+ aList.Insert(pM,CONTAINER_APPEND);
+ SetNameDirty();
+ bChgd=TRUE;
+ }
+ }
+ return bChgd;
+}
+
+const XubString& SdrMarkList::GetMarkDescription() const
+{
+ UINT32 nAnz(GetMarkCount());
+
+ if(bNameOk && nAnz==1)
+ {
+ // Bei Einfachselektion nur Textrahmen cachen
+ SdrObject* pObj = GetMark(0)->GetObj();
+ SdrTextObj* pTextObj = PTR_CAST(SdrTextObj,pObj);
+
+ if(!pTextObj || !pTextObj->IsTextFrame())
+ {
+ ((SdrMarkList*)(this))->bNameOk = FALSE;
+ }
+ }
+
+ if(!bNameOk)
+ {
+ SdrMark* pMark = GetMark(0);
+ XubString aNam;
+
+ if(!nAnz)
+ {
+ ((SdrMarkList*)(this))->aMarkName = ImpGetResStr(STR_ObjNameNoObj);
+ }
+ else if(nAnz == 1)
+ {
+ pMark->GetObj()->TakeObjNameSingul(aNam);
+ }
+ else
+ {
+ pMark->GetObj()->TakeObjNamePlural(aNam);
+ XubString aStr1;
+ BOOL bEq(TRUE);
+
+ for(UINT32 i = 1; i < GetMarkCount() && bEq; i++)
+ {
+ SdrMark* pMark = GetMark(i);
+ pMark->GetObj()->TakeObjNamePlural(aStr1);
+ bEq = aNam.Equals(aStr1);
+ }
+
+ if(!bEq)
+ aNam = ImpGetResStr(STR_ObjNamePlural);
+
+ aNam.Insert(sal_Unicode(' '), 0);
+ aNam.Insert(UniString::CreateFromInt32(nAnz), 0);
+ }
+
+ ((SdrMarkList*)(this))->aMarkName = aNam;
+ ((SdrMarkList*)(this))->bNameOk = TRUE;
+ }
+
+ return aMarkName;
+}
+
+const XubString& SdrMarkList::GetPointMarkDescription(FASTBOOL bGlue) const
+{
+ FASTBOOL& rNameOk = (FASTBOOL&)(bGlue ? bGluePointNameOk : bPointNameOk);
+ XubString& rName = (XubString&)(bGlue ? aGluePointName : aPointName);
+ UINT32 nMarkAnz(GetMarkCount());
+ UINT32 nMarkPtAnz(0);
+ UINT32 nMarkPtObjAnz(0);
+ UINT32 n1stMarkNum(0xFFFFFFFF);
+
+ for(UINT32 nMarkNum = 0; nMarkNum < nMarkAnz; nMarkNum++)
+ {
+ const SdrMark* pMark = GetMark(nMarkNum);
+ const SdrUShortCont* pPts = bGlue ? pMark->GetMarkedGluePoints() : pMark->GetMarkedPoints();
+ UINT32 nAnz(pPts ? pPts->GetCount() : 0);
+
+ if(nAnz)
+ {
+ if(n1stMarkNum == 0xFFFFFFFF)
+ n1stMarkNum = nMarkNum;
+
+ nMarkPtAnz += nAnz;
+ nMarkPtObjAnz++;
+ }
+
+ if(nMarkPtObjAnz > 1 && rNameOk)
+ // vorzeitige Entscheidung
+ return rName;
+ }
+
+ if(rNameOk && nMarkPtObjAnz == 1)
+ {
+ // Bei Einfachselektion nur Textrahmen cachen
+ SdrObject* pObj = GetMark(0)->GetObj();
+ SdrTextObj* pTextObj = PTR_CAST(SdrTextObj,pObj);
+
+ if(!pTextObj || !pTextObj->IsTextFrame())
+ {
+ rNameOk = FALSE;
+ }
+ }
+
+ if(!nMarkPtObjAnz)
+ {
+ rName.Erase();
+ rNameOk = TRUE;
+ }
+ else if(!rNameOk)
+ {
+ const SdrMark* pMark = GetMark(n1stMarkNum);
+ XubString aNam;
+
+ if(nMarkPtObjAnz == 1)
+ {
+ pMark->GetObj()->TakeObjNameSingul(aNam);
+ }
+ else
+ {
+ pMark->GetObj()->TakeObjNamePlural(aNam);
+ XubString aStr1;
+ BOOL bEq(TRUE);
+
+ for(UINT32 i = n1stMarkNum + 1; i < GetMarkCount() && bEq; i++)
+ {
+ const SdrMark* pMark = GetMark(i);
+ const SdrUShortCont* pPts = bGlue ? pMark->GetMarkedGluePoints() : pMark->GetMarkedPoints();
+
+ if(pPts && pPts->GetCount())
+ {
+ pMark->GetObj()->TakeObjNamePlural(aStr1);
+ bEq = aNam.Equals(aStr1);
+ }
+ }
+
+ if(!bEq)
+ aNam = ImpGetResStr(STR_ObjNamePlural);
+
+ aNam.Insert(sal_Unicode(' '), 0);
+ aNam.Insert(UniString::CreateFromInt32(nMarkPtObjAnz), 0);
+ }
+
+ XubString aStr1;
+
+ if(nMarkPtAnz == 1)
+ {
+ aStr1 = (ImpGetResStr(bGlue ? STR_ViewMarkedGluePoint : STR_ViewMarkedPoint));
+ }
+ else
+ {
+ aStr1 = (ImpGetResStr(bGlue ? STR_ViewMarkedGluePoints : STR_ViewMarkedPoints));
+ aStr1.SearchAndReplaceAscii("%N", UniString::CreateFromInt32(nMarkPtAnz));
+ }
+
+ aStr1.SearchAndReplaceAscii("%O", aNam);
+ rName = aStr1;
+ rNameOk = TRUE;
+ }
+
+ return rName;
+}
+
+USHORT SdrMarkList::GetPageViewAnz() const
+{
+ USHORT nAnz=0;
+ SdrPageView* pPV=NULL;
+ for (ULONG i=0; i<GetMarkCount(); i++) {
+ SdrMark* pMark=GetMark(i);
+ if (pMark->GetPageView()!=pPV) {
+ pPV=pMark->GetPageView();
+ nAnz++;
+ }
+ }
+ return nAnz;
+}
+
+SdrPageView* SdrMarkList::GetPageView(USHORT nNum) const
+{
+ return NULL;
+}
+
+FASTBOOL SdrMarkList::TakeBoundRect(SdrPageView* pPV, Rectangle& rRect) const
+{
+ FASTBOOL bFnd=FALSE;
+ Rectangle aR;
+
+ for (ULONG i=0; i<GetMarkCount(); i++) {
+ SdrMark* pMark=GetMark(i);
+ if (pPV==NULL || pMark->GetPageView()==pPV) {
+ aR=pMark->GetObj()->GetBoundRect();
+ if (bFnd) {
+ rRect.Union(aR);
+ } else {
+ rRect=aR;
+ bFnd=TRUE;
+ }
+ }
+ }
+ return bFnd;
+}
+
+FASTBOOL SdrMarkList::TakeSnapRect(SdrPageView* pPV, Rectangle& rRect) const
+{
+ FASTBOOL bFnd=FALSE;
+
+ for (ULONG i=0; i<GetMarkCount(); i++) {
+ SdrMark* pMark=GetMark(i);
+ if (pPV==NULL || pMark->GetPageView()==pPV) {
+ Rectangle aR(pMark->GetObj()->GetSnapRect());
+ if (bFnd) {
+ rRect.Union(aR);
+ } else {
+ rRect=aR;
+ bFnd=TRUE;
+ }
+ }
+ }
+ return bFnd;
+}
+
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
new file mode 100644
index 0000000000..51a9f46cfa
--- /dev/null
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -0,0 +1,2395 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdmodel.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#include "svdmodel.hxx"
+#ifndef _STRING_H
+#include <tools/string.hxx>
+#endif
+
+#include "svditext.hxx"
+#include "editeng.hxx" // Fuer EditEngine::CreatePool()
+
+#include "xtable.hxx"
+#include "xoutx.hxx"
+
+#include "svdtrans.hxx"
+#include "svdio.hxx"
+#include "svdpage.hxx"
+#include "svdlayer.hxx"
+#include "svdundo.hxx"
+#include "svdpool.hxx"
+#include "svdobj.hxx"
+#include "svdotext.hxx" // fuer ReformatAllTextObjects und CalcFieldValue
+#include "svdetc.hxx"
+#include "svdoutl.hxx"
+#include "svdglob.hxx" // Stringcache
+#include "svdstr.hrc" // Objektname
+
+#include <eeitemid.hxx>
+
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include "fontitem.hxx"
+#endif
+
+#ifndef _SVX_COLRITEM_HXX //autogen
+#include "colritem.hxx"
+#endif
+
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include "fhgtitem.hxx"
+#endif
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+#ifndef _SVX_NUMITEM_HXX //autogen
+#include <numitem.hxx>
+#endif
+
+#ifndef _SVX_BULITEM_HXX //autogen
+#include <bulitem.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrModelInfo::SdrModelInfo(FASTBOOL bInit):
+ aCreationDate(Date(0),Time(0)),
+ aLastWriteDate(Date(0),Time(0)),
+ aLastReadDate(Date(0),Time(0)),
+ aLastPrintDate(Date(0),Time(0)),
+ eCreationCharSet(RTL_TEXTENCODING_DONTKNOW),
+ /* old SV-stuff, there is no possibility to determine this informations in another way
+ eCreationGUI(GUI_DONTKNOW),
+ eCreationCPU(CPU_DONTKNOW),
+ eCreationSys(SYSTEM_DONTKNOW),
+ */
+ eLastWriteCharSet(RTL_TEXTENCODING_DONTKNOW),
+ /* old SV-stuff, there is no possibility to determine this informations in another way
+ eLastWriteGUI(GUI_DONTKNOW),
+ eLastWriteCPU(CPU_DONTKNOW),
+ eLastWriteSys(SYSTEM_DONTKNOW),
+ */
+ eLastReadCharSet(RTL_TEXTENCODING_DONTKNOW)
+ /* old SV-stuff, there is no possibility to determine this informations in another way
+ eLastReadGUI(GUI_DONTKNOW),
+ eLastReadCPU(CPU_DONTKNOW),
+ eLastReadSys(SYSTEM_DONTKNOW)
+ */
+{
+ if (bInit)
+ {
+ aCreationDate = DateTime();
+ eCreationCharSet = gsl_getSystemTextEncoding();
+ /* old SV-stuff, there is no possibility to determine this informations in another way
+ eCreationGUI=System::GetGUIType();
+ eCreationSys=System::GetSystemType();
+ */
+ }
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrModelInfo& rModInfo)
+{
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrModelInfo");
+#endif
+ rOut<<UINT32(rModInfo.aCreationDate.GetDate());
+ rOut<<UINT32(rModInfo.aCreationDate.GetTime());
+ rOut<<UINT8( GetStoreCharSet( rModInfo.eCreationCharSet ) );
+
+ /* Since we removed old SV-stuff there is no way to determine system-speciefic informations, yet.
+ We just have to write anythink in the file for compatibility:
+ eCreationGUI eLastWriteGUI eLastReadGUI
+ eCreationCPU eLastWriteCPU eLastReadCPU
+ eCreationSys eLastWriteSys eLastReadSys
+
+
+ */
+ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eCreationGUI);
+ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eCreationCPU);
+ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eCreationSys);
+
+ rOut<<UINT32(rModInfo.aLastWriteDate.GetDate());
+ rOut<<UINT32(rModInfo.aLastWriteDate.GetTime());
+ rOut<<UINT8( GetStoreCharSet( rModInfo.eLastWriteCharSet ) );
+
+ // see comment above
+ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastWriteGUI);
+ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastWriteCPU);
+ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastWriteSys);
+
+ rOut<<UINT32(rModInfo.aLastReadDate.GetDate());
+ rOut<<UINT32(rModInfo.aLastReadDate.GetTime());
+ rOut<<UINT8( GetStoreCharSet( rModInfo.eLastReadCharSet ) );
+
+ // see comment above
+ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastReadGUI);
+ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastReadCPU);
+ rOut<<UINT8(0); // rOut<<UINT8(rModInfo.eLastReadSys);
+
+ rOut<<UINT32(rModInfo.aLastPrintDate.GetDate());
+ rOut<<UINT32(rModInfo.aLastPrintDate.GetTime());
+ return rOut;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrModelInfo& rModInfo)
+{
+ if (rIn.GetError()!=0) return rIn;
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrModelInfo");
+#endif
+ UINT8 n8;
+ UINT32 n32;
+ rIn>>n32; rModInfo.aCreationDate.SetDate(n32);
+ rIn>>n32; rModInfo.aCreationDate.SetTime(n32);
+ rIn>>n8; rModInfo.eCreationCharSet=rtl_TextEncoding(n8);
+
+ /* Since we removed old SV-stuff there is no way to determine system-speciefic informations, yet.
+ We just have to write anythink in the file for compatibility:
+ eCreationGUI eLastWriteGUI eLastReadGUI
+ eCreationCPU eLastWriteCPU eLastReadCPU
+ eCreationSys eLastWriteSys eLastReadSys
+
+
+ */
+ rIn>>n8; // rModInfo.eCreationGUI=GUIType(n8);
+ rIn>>n8; // rModInfo.eCreationCPU=CPUType(n8);
+ rIn>>n8; // rModInfo.eCreationSys=SystemType(n8);
+ rIn>>n32; rModInfo.aLastWriteDate.SetDate(n32);
+ rIn>>n32; rModInfo.aLastWriteDate.SetTime(n32);
+ rIn>>n8; rModInfo.eLastWriteCharSet=rtl_TextEncoding(n8);
+
+ // see comment above
+ rIn>>n8; // rModInfo.eLastWriteGUI=GUIType(n8);
+ rIn>>n8; // rModInfo.eLastWriteCPU=CPUType(n8);
+ rIn>>n8; // rModInfo.eLastWriteSys=SystemType(n8);
+
+ rIn>>n32; rModInfo.aLastReadDate.SetDate(n32);
+ rIn>>n32; rModInfo.aLastReadDate.SetTime(n32);
+ rIn>>n8; rModInfo.eLastReadCharSet=rtl_TextEncoding(n8);
+
+ // see comment above
+ rIn>>n8; // rModInfo.eLastReadGUI=GUIType(n8);
+ rIn>>n8; // rModInfo.eLastReadCPU=CPUType(n8);
+ rIn>>n8; // rModInfo.eLastReadSys=SystemType(n8);
+
+ rIn>>n32; rModInfo.aLastPrintDate.SetDate(n32);
+ rIn>>n32; rModInfo.aLastPrintDate.SetTime(n32);
+
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+DBG_NAME(SdrModel);
+TYPEINIT1(SdrModel,SfxBroadcaster);
+
+void SdrModel::ImpCtor(SfxItemPool* pPool, SvPersist* pPers,
+ FASTBOOL bUseExtColorTable, FASTBOOL bLoadRefCounts)
+{
+ aObjUnit=SdrEngineDefaults::GetMapFraction();
+ eObjUnit=SdrEngineDefaults::GetMapUnit();
+ eUIUnit=FUNIT_MM;
+ aUIScale=Fraction(1,1);
+ nUIUnitKomma=0;
+ bUIOnlyKomma=FALSE;
+ pLayerAdmin=NULL;
+ pItemPool=pPool;
+ pUndoItemPool=NULL;
+ bMyPool=FALSE;
+ pPersist=pPers;
+ pDrawOutliner=NULL;
+ pHitTestOutliner=NULL;
+ nDefTextHgt=SdrEngineDefaults::GetFontHeight();
+ pRefOutDev=NULL;
+ nProgressAkt=0;
+ nProgressMax=0;
+ nProgressOfs=0;
+ pStyleSheetPool=NULL;
+ pDefaultStyleSheet=NULL;
+ pLinkManager=NULL;
+ pLoadedModel=NULL;
+ pUndoStack=NULL;
+ pRedoStack=NULL;
+ pAktPaintPV=NULL;
+ nMaxUndoCount=16;
+ pAktUndoGroup=NULL;
+ nUndoLevel=0;
+ nProgressPercent=0;
+ nLoadVersion=0;
+ bExtColorTable=FALSE;
+ bChanged=FALSE;
+ bInfoChanged=FALSE;
+ bPagNumsDirty=FALSE;
+ bMPgNumsDirty=FALSE;
+ bPageNotValid=FALSE;
+ bSavePortable=FALSE;
+ bSaveCompressed=FALSE;
+ bSaveNative=FALSE;
+ bSwapGraphics=FALSE;
+ nSwapGraphicsMode=SDR_SWAPGRAPHICSMODE_DEFAULT;
+ bSaveOLEPreview=FALSE;
+ bPasteResize=FALSE;
+ bNoBitmapCaching=FALSE;
+ bLoading=FALSE;
+ bStreamingSdrModel=FALSE;
+ bReadOnly=FALSE;
+ nStreamCompressMode=COMPRESSMODE_NONE;
+ nStreamNumberFormat=NUMBERFORMAT_INT_BIGENDIAN;
+ nDefaultTabulator=0;
+ pColorTable=NULL;
+ pDashList=NULL;
+ pLineEndList=NULL;
+ pHatchList=NULL;
+ pGradientList=NULL;
+ pBitmapList=NULL;
+ bTransparentTextFrames=FALSE;
+ bStarDrawPreviewMode = FALSE;
+ nStarDrawPreviewMasterPageNum = SDRPAGE_NOTFOUND;
+ pModelStorage = NULL;
+
+#ifdef __LITTLEENDIAN
+ nStreamNumberFormat=NUMBERFORMAT_INT_LITTLEENDIAN;
+#endif
+ bExtColorTable=bUseExtColorTable;
+
+ if (pPool==NULL) {
+ pItemPool=new SdrItemPool(SDRATTR_START, SDRATTR_END, bLoadRefCounts);
+ // Der Outliner hat keinen eigenen Pool, deshalb den der EditEngine
+ SfxItemPool* pOutlPool=EditEngine::CreatePool( bLoadRefCounts );
+ // OutlinerPool als SecondaryPool des SdrPool
+ pItemPool->SetSecondaryPool(pOutlPool);
+ // Merken, dass ich mir die beiden Pools selbst gemacht habe
+ bMyPool=TRUE;
+ }
+ pItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit);
+ SetTextDefaults();
+
+ // Undo-ItemPool anlegen
+ if(!pUndoItemPool)
+ {
+ // Pool fuer UNDO-Objekte anlegen
+ pUndoItemPool = new SdrItemPool(SDRATTR_START, SDRATTR_END);
+ SfxItemPool* pUndoOutlPool = EditEngine::CreatePool();
+ pUndoItemPool->SetSecondaryPool(pUndoOutlPool);
+ pUndoItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit);
+ pUndoItemPool->FreezeIdRanges();
+ }
+
+#ifdef DBG_UTIL
+ UINT16 nCnt(0);
+ BOOL bXOutFnd(FALSE);
+ BOOL bEEngFnd(FALSE);
+ SfxItemPool* pTmpPool = pItemPool;
+
+ while(pTmpPool)
+ {
+ if(pTmpPool->GetFirstWhich() <= SDRATTR_START && pTmpPool->GetLastWhich() >= SDRATTR_END)
+ bXOutFnd = TRUE;
+
+ if(pTmpPool->GetName().EqualsAscii("EditEngineItemPool"))
+ bEEngFnd = TRUE;
+
+ nCnt++;
+ pTmpPool = pTmpPool->GetSecondaryPool();
+ }
+
+ if(!bXOutFnd || !bEEngFnd)
+ {
+ ByteString aMsg("SdrModel::ImpCtor(): ");
+ aMsg += nCnt;
+ aMsg += " ItemPool(s) in der Pool-Verkettung gefunden,\njedoch";
+
+ if(!bXOutFnd)
+ aMsg += " kein SdrItemPool";
+
+ if(!bXOutFnd && !bEEngFnd)
+ aMsg += " und";
+
+ if(!bEEngFnd)
+ aMsg += " kein EditEngine";
+
+ aMsg += '.';
+
+ DBG_ERROR(aMsg.GetBuffer());
+ }
+#endif
+
+ pLayerAdmin=new SdrLayerAdmin;
+ pLayerAdmin->SetModel(this);
+ ImpSetUIUnit();
+
+ // den DrawOutliner OnDemand erzeugen geht noch nicht, weil ich den Pool
+ // sonst nicht kriege (erst ab 302!)
+ pDrawOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this );
+ ImpSetOutlinerDefaults(pDrawOutliner, TRUE);
+
+ pHitTestOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this );
+ ImpSetOutlinerDefaults(pHitTestOutliner, TRUE);
+
+ ImpCreateTables();
+}
+
+SdrModel::SdrModel(SfxItemPool* pPool, SvPersist* pPers, INT32 bLoadRefCounts):
+ aInfo(TRUE),
+ aPages(1024,32,32),
+ aMaPag(1024,32,32)
+{
+ DBG_CTOR(SdrModel,NULL);
+ ImpCtor(pPool,pPers,FALSE, (FASTBOOL)bLoadRefCounts);
+}
+
+SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, SvPersist* pPers, INT32 bLoadRefCounts):
+ aInfo(TRUE),
+ aPages(1024,32,32),
+ aMaPag(1024,32,32),
+ aTablePath(rPath)
+{
+ DBG_CTOR(SdrModel,NULL);
+ ImpCtor(pPool,pPers,FALSE, (FASTBOOL)bLoadRefCounts);
+}
+
+SdrModel::SdrModel(SfxItemPool* pPool, SvPersist* pPers, FASTBOOL bUseExtColorTable, INT32 bLoadRefCounts):
+ aInfo(TRUE),
+ aPages(1024,32,32),
+ aMaPag(1024,32,32)
+{
+ DBG_CTOR(SdrModel,NULL);
+ ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts);
+}
+
+SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, SvPersist* pPers, FASTBOOL bUseExtColorTable, INT32 bLoadRefCounts):
+ aInfo(TRUE),
+ aPages(1024,32,32),
+ aMaPag(1024,32,32),
+ aTablePath(rPath)
+{
+ DBG_CTOR(SdrModel,NULL);
+ ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts);
+}
+
+SdrModel::SdrModel(const SdrModel& rSrcModel):
+ aPages(1024,32,32),
+ aMaPag(1024,32,32)
+{
+ // noch nicht implementiert
+ DBG_ERROR("SdrModel::CopyCtor() ist noch nicht implementiert");
+}
+
+SdrModel::~SdrModel()
+{
+ DBG_DTOR(SdrModel,NULL);
+ Broadcast(SdrHint(HINT_MODELCLEARED));
+
+ ClearUndoBuffer();
+#ifdef DBG_UTIL
+ if(pAktUndoGroup)
+ {
+ ByteString aStr("Im Dtor des SdrModel steht noch ein offenes Undo rum: \"");
+
+ aStr += ByteString(pAktUndoGroup->GetComment(), gsl_getSystemTextEncoding());
+ aStr += '\"';
+
+ DBG_ERROR(aStr.GetBuffer());
+ }
+#endif
+ if (pAktUndoGroup!=NULL) delete pAktUndoGroup;
+ Clear();
+ delete pLayerAdmin;
+
+ // Den DrawOutliner erst nach dem ItemPool loeschen, da
+ // der ItemPool Items des DrawOutliners referenziert !!! (<- das war mal)
+ // Wg. Problem bei Malte Reihenfolge wieder umgestellt.
+ // Loeschen des Outliners vor dem loeschen des ItemPools
+ delete pHitTestOutliner;
+ delete pDrawOutliner;
+
+ // StyleSheetPool loeschen, abgeleitete Klassen sollten dies nicht tun,
+ // da die DrawingEngine moeglicherweise im Destruktor noch auf den
+ // StyleSheetPool zugreifen muss (SB)
+ delete pStyleSheetPool;
+
+ if (bMyPool) { // Pools loeschen, falls es meine sind
+ SfxItemPool* pOutlPool=pItemPool->GetSecondaryPool();
+ delete pItemPool;
+ // Der OutlinerPool muss nach dem ItemPool plattgemacht werden, da der
+ // ItemPool SetItems enthaelt die ihrerseits Items des OutlinerPools
+ // referenzieren (Joe)
+ delete pOutlPool;
+ }
+
+ // UndoItemPool wegwerfen
+ if(pUndoItemPool)
+ {
+ SfxItemPool* pUndoOutlPool = pUndoItemPool->GetSecondaryPool();
+ delete pUndoItemPool;
+ delete pUndoOutlPool;
+ }
+
+ delete pLoadedModel;
+
+#ifndef SVX_LIGHT
+ // Tabellen, Listen und Paletten loeschen
+ if (!bExtColorTable) delete pColorTable;
+ delete pDashList;
+ delete pLineEndList;
+ delete pHatchList;
+ delete pGradientList;
+ delete pBitmapList;
+#endif
+}
+
+// noch nicht implementiert:
+void SdrModel::operator=(const SdrModel& rSrcModel)
+{
+ DBG_ERROR("SdrModel::operator=() ist noch nicht implementiert");
+}
+
+FASTBOOL SdrModel::operator==(const SdrModel& rCmpModel) const
+{
+ DBG_ERROR("SdrModel::operator==() ist noch nicht implementiert");
+ return FALSE;
+}
+
+void SdrModel::SetSwapGraphics( FASTBOOL bSwap )
+{
+ bSwapGraphics = bSwap;
+}
+
+FASTBOOL SdrModel::IsReadOnly() const
+{
+ return bReadOnly;
+}
+
+void SdrModel::SetReadOnly(FASTBOOL bYes)
+{
+ bReadOnly=bYes;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrModel::DoProgress(ULONG nVal)
+{
+ if (aIOProgressLink.IsSet()) {
+ if (nVal==0) { // Anfang
+ USHORT nVal=0;
+ aIOProgressLink.Call(&nVal);
+ nProgressPercent=0;
+ nProgressAkt=0;
+ } else if (nVal==0xFFFFFFFF) { // Ende
+ USHORT nVal=100;
+ aIOProgressLink.Call(&nVal);
+ nProgressPercent=100;
+ nProgressAkt=nProgressMax;
+ } else if (nVal!=nProgressAkt && nProgressMax!=0) { // dazwischen
+ USHORT nPercent;
+ if (nVal>nProgressOfs) nVal-=nProgressOfs; else nVal=0;
+ if (nVal>nProgressMax) nVal=nProgressMax;
+ if (nVal<=0x00FFFFFF) nPercent=USHORT(nVal*100/nProgressMax);
+ else {
+ ULONG nBla=nProgressMax/100; // Weil sonst Ueberlauf!
+ nPercent=USHORT(nVal/=nBla);
+ }
+ if (nPercent==0) nPercent=1;
+ if (nPercent>99) nPercent=99;
+ if (nPercent>nProgressPercent) {
+ aIOProgressLink.Call(&nPercent);
+ nProgressPercent=nPercent;
+ }
+ if (nVal>nProgressAkt) {
+ nProgressAkt=nVal;
+ }
+ }
+ }
+}
+
+void SdrModel::SetMaxUndoActionCount(ULONG nAnz)
+{
+ if (nAnz<1) nAnz=1;
+ nMaxUndoCount=nAnz;
+ if (pUndoStack!=NULL) {
+ while (pUndoStack->Count()>nMaxUndoCount) {
+ delete (SfxUndoAction*) pUndoStack->Remove(pUndoStack->Count());
+ }
+ }
+}
+
+void SdrModel::ClearUndoBuffer()
+{
+ if (pUndoStack!=NULL) {
+ while (pUndoStack->Count()!=0) {
+ delete (SfxUndoAction*) pUndoStack->Remove(pUndoStack->Count()-1);
+ }
+ delete pUndoStack;
+ pUndoStack=NULL;
+ }
+ if (pRedoStack!=NULL) {
+ while (pRedoStack->Count()!=0) {
+ delete (SfxUndoAction*) pRedoStack->Remove(pRedoStack->Count()-1);
+ }
+ delete pRedoStack;
+ pRedoStack=NULL;
+ }
+}
+
+FASTBOOL SdrModel::Undo()
+{
+ FASTBOOL bRet=FALSE;
+ SfxUndoAction* pDo=(SfxUndoAction*)GetUndoAction(0);
+ if (pDo!=NULL) {
+ pDo->Undo();
+ if (pRedoStack==NULL) pRedoStack=new Container(1024,16,16);
+ pRedoStack->Insert(pUndoStack->Remove((ULONG)0),(ULONG)0);
+ }
+ return bRet;
+}
+
+FASTBOOL SdrModel::Redo()
+{
+ FASTBOOL bRet=FALSE;
+ SfxUndoAction* pDo=(SfxUndoAction*)GetRedoAction(0);
+ if (pDo!=NULL) {
+ pDo->Redo();
+ if (pUndoStack==NULL) pUndoStack=new Container(1024,16,16);
+ pUndoStack->Insert(pRedoStack->Remove((ULONG)0),(ULONG)0);
+ }
+ return bRet;
+}
+
+FASTBOOL SdrModel::Repeat(SfxRepeatTarget& rView)
+{
+ FASTBOOL bRet=FALSE;
+ SfxUndoAction* pDo=(SfxUndoAction*)GetUndoAction(0);
+ if (pDo!=NULL) {
+ if (pDo->CanRepeat(rView)) {
+ pDo->Repeat(rView);
+ bRet=TRUE;
+ }
+ }
+ return bRet;
+}
+
+void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo)
+{
+ if (aUndoLink.IsSet()) {
+ aUndoLink.Call(pUndo);
+ } else {
+ if (pUndoStack==NULL) pUndoStack=new Container(1024,16,16);
+ pUndoStack->Insert(pUndo,(ULONG)0);
+ while (pUndoStack->Count()>nMaxUndoCount) {
+ delete (SfxUndoAction*) pUndoStack->Remove(pUndoStack->Count()-1);
+ }
+ if (pRedoStack!=NULL) pRedoStack->Clear();
+ }
+}
+
+void SdrModel::BegUndo()
+{
+ if (pAktUndoGroup==NULL) {
+ pAktUndoGroup=new SdrUndoGroup(*this);
+ nUndoLevel=1;
+ } else {
+ nUndoLevel++;
+ }
+}
+
+void SdrModel::BegUndo(const XubString& rComment)
+{
+ BegUndo();
+ if (nUndoLevel==1) {
+ pAktUndoGroup->SetComment(rComment);
+ }
+}
+
+void SdrModel::BegUndo(const XubString& rComment, const XubString& rObjDescr, SdrRepeatFunc eFunc)
+{
+ BegUndo();
+ if (nUndoLevel==1) {
+ pAktUndoGroup->SetComment(rComment);
+ pAktUndoGroup->SetObjDescription(rObjDescr);
+ pAktUndoGroup->SetRepeatFunction(eFunc);
+ }
+}
+
+void SdrModel::BegUndo(SdrUndoGroup* pUndoGrp)
+{
+ if (pAktUndoGroup==NULL) {
+ pAktUndoGroup=pUndoGrp;
+ nUndoLevel=1;
+ } else {
+ delete pUndoGrp;
+ nUndoLevel++;
+ }
+}
+
+void SdrModel::EndUndo()
+{
+ DBG_ASSERT(nUndoLevel!=0,"SdrModel::EndUndo(): UndoLevel ist bereits auf 0!");
+ if (pAktUndoGroup!=NULL) {
+ nUndoLevel--;
+ if (nUndoLevel==0) {
+ if (pAktUndoGroup->GetActionCount()!=0) {
+ SdrUndoAction* pUndo=pAktUndoGroup;
+ pAktUndoGroup=NULL;
+ ImpPostUndoAction(pUndo);
+ } else { // war nix drin
+ delete pAktUndoGroup;
+ pAktUndoGroup=NULL;
+ }
+ }
+ }
+}
+
+void SdrModel::SetUndoComment(const XubString& rComment)
+{
+ DBG_ASSERT(nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel ist auf 0!");
+ if (nUndoLevel==1) {
+ pAktUndoGroup->SetComment(rComment);
+ }
+}
+
+void SdrModel::SetUndoComment(const XubString& rComment, const XubString& rObjDescr)
+{
+ DBG_ASSERT(nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel ist auf 0!");
+ if (nUndoLevel==1) {
+ pAktUndoGroup->SetComment(rComment);
+ pAktUndoGroup->SetObjDescription(rObjDescr);
+ }
+}
+
+void SdrModel::AddUndo(SdrUndoAction* pUndo)
+{
+ if (pAktUndoGroup!=NULL) {
+ pAktUndoGroup->AddAction(pUndo);
+ } else {
+ ImpPostUndoAction(pUndo);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrModel::ImpCreateTables()
+{
+#ifndef SVX_LIGHT
+ // der Writer hat seinen eigenen ColorTable
+ if (!bExtColorTable) pColorTable=new XColorTable(aTablePath,(XOutdevItemPool*)pItemPool);
+ pDashList =new XDashList (aTablePath,(XOutdevItemPool*)pItemPool);
+ pLineEndList =new XLineEndList (aTablePath,(XOutdevItemPool*)pItemPool);
+ pHatchList =new XHatchList (aTablePath,(XOutdevItemPool*)pItemPool);
+ pGradientList=new XGradientList(aTablePath,(XOutdevItemPool*)pItemPool);
+ pBitmapList =new XBitmapList (aTablePath,(XOutdevItemPool*)pItemPool);
+#endif
+}
+
+void SdrModel::Clear()
+{
+ USHORT i;
+ // alle Zeichenseiten loeschen
+ USHORT nAnz=GetPageCount();
+ for (i=0; i<nAnz; i++) {
+ delete GetPage(i);
+ }
+ aPages.Clear();
+
+ // alle Masterpages loeschen
+ nAnz=GetMasterPageCount();
+ for (i=0; i<nAnz; i++) {
+ delete GetMasterPage(i);
+ }
+ aMaPag.Clear();
+
+ pLayerAdmin->ClearLayer();
+ pLayerAdmin->ClearLayerSets();
+ //SetChanged();
+}
+
+SdrModel* SdrModel::AllocModel() const
+{
+ SdrModel* pModel=new SdrModel;
+ pModel->SetScaleUnit(eObjUnit,aObjUnit);
+ return pModel;
+}
+
+SdrPage* SdrModel::AllocPage(FASTBOOL bMasterPage)
+{
+ return new SdrPage(*this,bMasterPage);
+}
+
+const SdrModel* SdrModel::LoadModel(const String& rFileName)
+{
+ if(pLoadedModel && aLoadedModelFN.Equals(rFileName))
+ {
+ return pLoadedModel;
+ }
+ else
+ {
+ delete pLoadedModel;
+ pLoadedModel = NULL;
+ aLoadedModelFN = String();
+ SdrModel* pModel = new SdrModel;
+ SvFileStream aIn(rFileName, STREAM_READ);
+
+ pModel->GetItemPool().Load(aIn);
+ aIn >> *pModel;
+
+ if(aIn.GetError())
+ {
+ delete pModel;
+ pModel = NULL;
+ }
+ else
+ {
+ pLoadedModel = pModel;
+ aLoadedModelFN = rFileName;
+ }
+
+ return pModel;
+ }
+}
+
+void SdrModel::DisposeLoadedModels()
+{
+ delete pLoadedModel;
+ pLoadedModel = NULL;
+ aLoadedModelFN = String();
+}
+
+void SdrModel::SetTextDefaults() const
+{
+ pItemPool->SetPoolDefaultItem( SvxFontItem(SdrEngineDefaults::GetFontFamily(),
+ SdrEngineDefaults::GetFontName(), String(),
+ PITCH_DONTKNOW, gsl_getSystemTextEncoding()));
+ pItemPool->SetPoolDefaultItem( SvxColorItem(SdrEngineDefaults::GetFontColor()) );
+ pItemPool->SetPoolDefaultItem( SvxFontHeightItem(nDefTextHgt) );
+}
+
+SdrOutliner& SdrModel::GetDrawOutliner(const SdrTextObj* pObj) const
+{
+ pDrawOutliner->SetTextObj(pObj);
+ return *pDrawOutliner;
+}
+
+const SdrTextObj* SdrModel::GetFormattingTextObj() const
+{
+ if (pDrawOutliner!=NULL) {
+ return pDrawOutliner->GetTextObj();
+ }
+ return NULL;
+}
+
+void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, BOOL bInit )
+{
+ /**************************************************************************
+ * Initialisierung der Outliner fuer Textausgabe und HitTest
+ **************************************************************************/
+ if( bInit )
+ {
+ pOutliner->EraseVirtualDevice();
+ pOutliner->SetUpdateMode(FALSE);
+ pOutliner->SetDefTab(nDefaultTabulator);
+ }
+
+ pOutliner->SetRefDevice(GetRefDevice());
+ if ( !GetRefDevice() )
+ {
+ MapMode aMapMode(eObjUnit, Point(0,0), aObjUnit, aObjUnit);
+ pOutliner->SetRefMapMode(aMapMode);
+ }
+}
+
+void SdrModel::SetRefDevice(OutputDevice* pDev)
+{
+ pRefOutDev=pDev;
+ ImpSetOutlinerDefaults( pDrawOutliner );
+ ImpSetOutlinerDefaults( pHitTestOutliner );
+ RefDeviceChanged();
+}
+
+void SdrModel::ImpReformatAllTextObjects()
+{
+ USHORT nAnz=GetMasterPageCount();
+ USHORT nNum;
+ for (nNum=0; nNum<nAnz; nNum++) {
+ GetMasterPage(nNum)->ReformatAllTextObjects();
+ }
+ nAnz=GetPageCount();
+ for (nNum=0; nNum<nAnz; nNum++) {
+ GetPage(nNum)->ReformatAllTextObjects();
+ }
+}
+
+SvStream* SdrModel::GetDocumentStream(FASTBOOL& rbDeleteAfterUse) const
+{
+ return NULL;
+}
+
+// Die Vorlagenattribute der Zeichenobjekte in harte Attribute verwandeln.
+void SdrModel::BurnInStyleSheetAttributes()
+{
+ USHORT nAnz=GetMasterPageCount();
+ USHORT nNum;
+ for (nNum=0; nNum<nAnz; nNum++) {
+ GetMasterPage(nNum)->BurnInStyleSheetAttributes();
+ }
+ nAnz=GetPageCount();
+ for (nNum=0; nNum<nAnz; nNum++) {
+ GetPage(nNum)->BurnInStyleSheetAttributes();
+ }
+}
+
+void SdrModel::RemoveNotPersistentObjects(FASTBOOL bNoBroadcast)
+{
+ USHORT nAnz=GetMasterPageCount();
+ USHORT nNum;
+ for (nNum=0; nNum<nAnz; nNum++) {
+ GetMasterPage(nNum)->RemoveNotPersistentObjects(bNoBroadcast);
+ }
+ nAnz=GetPageCount();
+ for (nNum=0; nNum<nAnz; nNum++) {
+ GetPage(nNum)->RemoveNotPersistentObjects(bNoBroadcast);
+ }
+}
+
+void SdrModel::RefDeviceChanged()
+{
+ Broadcast(SdrHint(HINT_REFDEVICECHG));
+ ImpReformatAllTextObjects();
+}
+
+void SdrModel::SetDefaultFontHeight(ULONG nVal)
+{
+ if (nVal!=nDefTextHgt) {
+ nDefTextHgt=nVal;
+ Broadcast(SdrHint(HINT_DEFFONTHGTCHG));
+ ImpReformatAllTextObjects();
+ }
+}
+
+void SdrModel::SetDefaultTabulator(USHORT nVal)
+{
+ if (nDefaultTabulator!=nVal) {
+ nDefaultTabulator=nVal;
+ Outliner& rOutliner=GetDrawOutliner();
+ rOutliner.SetDefTab(nVal);
+ Broadcast(SdrHint(HINT_DEFAULTTABCHG));
+ ImpReformatAllTextObjects();
+ }
+}
+
+void SdrModel::ImpSetUIUnit()
+{
+ if (aUIScale.GetNumerator()==0 || aUIScale.GetDenominator()==0) aUIScale=Fraction(1,1);
+ FASTBOOL bMapInch=IsInch(eObjUnit);
+ FASTBOOL bMapMetr=IsMetric(eObjUnit);
+ FASTBOOL bUIInch=IsInch(eUIUnit);
+ FASTBOOL bUIMetr=IsMetric(eUIUnit);
+ nUIUnitKomma=0;
+ long nMul=1;
+ long nDiv=1;
+
+ // Zunaechst normalisieren auf m bzw. "
+ switch (eObjUnit) {
+ case MAP_100TH_MM : nUIUnitKomma+=5; break;
+ case MAP_10TH_MM : nUIUnitKomma+=4; break;
+ case MAP_MM : nUIUnitKomma+=3; break;
+ case MAP_CM : nUIUnitKomma+=2; break;
+ case MAP_1000TH_INCH: nUIUnitKomma+=3; break;
+ case MAP_100TH_INCH : nUIUnitKomma+=2; break;
+ case MAP_10TH_INCH : nUIUnitKomma+=1; break;
+ case MAP_INCH : nUIUnitKomma+=0; break;
+ case MAP_POINT : nDiv=72; break; // 1Pt = 1/72"
+ case MAP_TWIP : nDiv=144; nUIUnitKomma++; break; // 1Twip = 1/1440"
+ case MAP_PIXEL : break;
+ case MAP_SYSFONT : break;
+ case MAP_APPFONT : break;
+ case MAP_RELATIVE : break;
+ } // switch
+
+ // 1 mile = 8 furlong = 63.360" = 1.609.344,0mm
+ // 1 furlong = 10 chains = 7.920" = 201.168,0mm
+ // 1 chain = 4 poles = 792" = 20.116,8mm
+ // 1 pole = 5 1/2 yd = 198" = 5.029,2mm
+ // 1 yd = 3 ft = 36" = 914,4mm
+ // 1 ft = 12 " = 1" = 304,8mm
+ switch (eUIUnit) {
+ case FUNIT_NONE : break;
+ // Metrisch
+ case FUNIT_100TH_MM: nUIUnitKomma-=5; break;
+ case FUNIT_MM : nUIUnitKomma-=3; break;
+ case FUNIT_CM : nUIUnitKomma-=2; break;
+ case FUNIT_M : nUIUnitKomma+=0; break;
+ case FUNIT_KM : nUIUnitKomma+=3; break;
+ // Inch
+ case FUNIT_TWIP : nMul=144; nUIUnitKomma--; break; // 1Twip = 1/1440"
+ case FUNIT_POINT : nMul=72; break; // 1Pt = 1/72"
+ case FUNIT_PICA : nMul=6; break; // 1Pica = 1/6" ?
+ case FUNIT_INCH : break; // 1" = 1"
+ case FUNIT_FOOT : nDiv*=12; break; // 1Ft = 12"
+ case FUNIT_MILE : nDiv*=6336; nUIUnitKomma++; break; // 1mile = 63360"
+ // sonstiges
+ case FUNIT_CUSTOM : break;
+ case FUNIT_PERCENT: nUIUnitKomma+=2; break;
+ } // switch
+
+ if (bMapInch && bUIMetr) {
+ nUIUnitKomma+=4;
+ nMul*=254;
+ }
+ if (bMapMetr && bUIInch) {
+ nUIUnitKomma-=4;
+ nDiv*=254;
+ }
+
+ // Temporaere Fraction zum Kuerzen
+ Fraction aTempFract(nMul,nDiv);
+ nMul=aTempFract.GetNumerator();
+ nDiv=aTempFract.GetDenominator();
+ // Nun mit dem eingestellten Masstab verknuepfen
+ BigInt nBigMul(nMul);
+ BigInt nBigDiv(nDiv);
+ BigInt nBig1000(1000);
+ nBigMul*=aUIScale.GetDenominator();
+ nBigDiv*=aUIScale.GetNumerator();
+ while (nBigMul>nBig1000) {
+ nUIUnitKomma--;
+ nBigMul/=10;
+ }
+ while (nBigDiv>nBig1000) {
+ nUIUnitKomma++;
+ nBigDiv/=10;
+ }
+ nMul=long(nBigMul);
+ nDiv=long(nBigDiv);
+ switch ((short)nMul) {
+ case 10: nMul=1; nUIUnitKomma--; break;
+ case 100: nMul=1; nUIUnitKomma-=2; break;
+ case 1000: nMul=1; nUIUnitKomma-=3; break;
+ } // switch
+ switch ((short)nDiv) {
+ case 10: nDiv=1; nUIUnitKomma++; break;
+ case 100: nDiv=1; nUIUnitKomma+=2; break;
+ case 1000: nDiv=1; nUIUnitKomma+=3; break;
+ } // switch
+ aUIUnitFact=Fraction(nMul,nDiv);
+ bUIOnlyKomma=nMul==nDiv;
+ TakeUnitStr(eUIUnit,aUIUnitStr);
+}
+
+void SdrModel::SetScaleUnit(MapUnit eMap, const Fraction& rFrac)
+{
+ if (eObjUnit!=eMap || aObjUnit!=rFrac) {
+ eObjUnit=eMap;
+ aObjUnit=rFrac;
+ pItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit);
+ pUndoItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit);
+ ImpSetUIUnit();
+ ImpSetOutlinerDefaults( pDrawOutliner );
+ ImpSetOutlinerDefaults( pHitTestOutliner );
+ ImpReformatAllTextObjects(); // #40424#
+ }
+}
+
+void SdrModel::SetScaleUnit(MapUnit eMap)
+{
+ if (eObjUnit!=eMap) {
+ eObjUnit=eMap;
+ pItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit);
+ pUndoItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit);
+ ImpSetUIUnit();
+ ImpSetOutlinerDefaults( pDrawOutliner );
+ ImpSetOutlinerDefaults( pHitTestOutliner );
+ ImpReformatAllTextObjects(); // #40424#
+ }
+}
+
+void SdrModel::SetScaleFraction(const Fraction& rFrac)
+{
+ if (aObjUnit!=rFrac) {
+ aObjUnit=rFrac;
+ ImpSetUIUnit();
+ ImpSetOutlinerDefaults( pDrawOutliner );
+ ImpSetOutlinerDefaults( pHitTestOutliner );
+ ImpReformatAllTextObjects(); // #40424#
+ }
+}
+
+void SdrModel::SetUIUnit(FieldUnit eUnit)
+{
+ if (eUIUnit!=eUnit) {
+ eUIUnit=eUnit;
+ ImpSetUIUnit();
+ ImpReformatAllTextObjects(); // #40424#
+ }
+}
+
+void SdrModel::SetUIScale(const Fraction& rScale)
+{
+ if (aUIScale!=rScale) {
+ aUIScale=rScale;
+ ImpSetUIUnit();
+ ImpReformatAllTextObjects(); // #40424#
+ }
+}
+
+void SdrModel::SetUIUnit(FieldUnit eUnit, const Fraction& rScale)
+{
+ if (eUIUnit!=eUnit || aUIScale!=rScale) {
+ eUIUnit=eUnit;
+ aUIScale=rScale;
+ ImpSetUIUnit();
+ ImpReformatAllTextObjects(); // #40424#
+ }
+}
+
+void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr) const
+{
+ switch(eUnit)
+ {
+ default:
+ case FUNIT_NONE :
+ case FUNIT_CUSTOM :
+ {
+ rStr = String();
+ break;
+ }
+ case FUNIT_100TH_MM:
+ {
+ sal_Char aText[] = "/100mm";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_MM :
+ {
+ sal_Char aText[] = "mm";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_CM :
+ {
+ sal_Char aText[] = "cm";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_M :
+ {
+ rStr = String();
+ rStr += sal_Unicode('m');
+ break;
+ }
+ case FUNIT_KM :
+ {
+ sal_Char aText[] = "km";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_TWIP :
+ {
+ sal_Char aText[] = "twip";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_POINT :
+ {
+ sal_Char aText[] = "pt";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_PICA :
+ {
+ sal_Char aText[] = "pica";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_INCH :
+ {
+ rStr = String();
+ rStr += sal_Unicode('"');
+ break;
+ }
+ case FUNIT_FOOT :
+ {
+ sal_Char aText[] = "ft";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_MILE :
+ {
+ sal_Char aText[] = "mile(s)";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_PERCENT:
+ {
+ rStr = String();
+ rStr += sal_Unicode('%');
+ break;
+ }
+ }
+}
+
+void SdrModel::TakeMetricStr(long nVal, XubString& rStr, FASTBOOL bNoUnitChars) const
+{
+ if(!bUIOnlyKomma)
+ nVal = (nVal * aUIUnitFact.GetNumerator()) / aUIUnitFact.GetDenominator();
+
+ BOOL bNeg(nVal < 0);
+
+ if(bNeg)
+ nVal = -nVal;
+
+ International aInter(Application::GetAppInternational());
+ sal_Int32 nKomma(nUIUnitKomma);
+ sal_Int32 nNumDigits(aInter.GetNumDigits());
+
+ while(nKomma > nNumDigits)
+ {
+ // das bedeutet teilen und runden
+ sal_Int32 nDiff(nKomma - nNumDigits);
+
+ switch(nDiff)
+ {
+ case 1: nVal = (nVal+5)/10; nKomma--; break;
+ case 2: nVal = (nVal+50)/100; nKomma-=2; break;
+ case 3: nVal = (nVal+500)/1000; nKomma-=3; break;
+ case 4: nVal = (nVal+5000)/10000; nKomma-=4; break;
+ case 5: nVal = (nVal+50000)/100000; nKomma-=5; break;
+ case 6: nVal = (nVal+500000)/1000000; nKomma-=6; break;
+ case 7: nVal = (nVal+5000000)/10000000; nKomma-=7; break;
+ default:nVal = (nVal+50000000)/100000000; nKomma-=8; break;
+ }
+ }
+
+ rStr = UniString::CreateFromInt32(nVal);
+
+ if(nKomma < 0)
+ {
+ // Negatives Komma bedeutet: Nullen dran
+ sal_Int32 nAnz(-nKomma);
+
+ for(sal_Int32 i=0; i<nAnz; i++)
+ rStr += sal_Unicode('0');
+
+ nKomma = 0;
+ }
+
+ if(nKomma > 0 && rStr.Len() < nKomma)
+ {
+ // Fuer Komma evtl. vorne Nullen dran
+ sal_Int32 nAnz(nKomma - rStr.Len());
+
+ if(nAnz >= 0 && aInter.IsNumLeadingZero())
+ nAnz++;
+
+ for(sal_Int32 i=0; i<nAnz; i++)
+ rStr.Insert(sal_Unicode('0'), 0);
+ }
+
+ // KommaChar einfuegen
+ sal_Int32 nVorKomma(rStr.Len() - nKomma);
+
+ if(nKomma > 0)
+ {
+ sal_Unicode cDec(aInter.GetNumDecimalSep());
+
+ rStr.Insert(cDec, nVorKomma);
+ }
+
+ if(!aInter.IsNumTrailingZeros())
+ {
+ while(rStr.Len() && rStr.GetChar(rStr.Len() - 1) == sal_Unicode('0'))
+ rStr.Erase(rStr.Len() - 1);
+
+ sal_Unicode cDec(aInter.GetNumDecimalSep());
+
+ if(rStr.Len() && rStr.GetChar(rStr.Len() - 1) == cDec)
+ rStr.Erase(rStr.Len() - 1);
+ }
+
+ // ggf. Trennpunkte bei jedem Tausender einfuegen
+ if(nVorKomma > 3 && aInter.IsNumThousandSep())
+ {
+ sal_Unicode cDot(aInter.GetNumThousandSep());
+ sal_Int32 i(nVorKomma - 3);
+
+ while(i > 0) // #78311#
+ {
+ rStr.Insert(cDot, (xub_StrLen)i);
+ i -= 3;
+ }
+ }
+
+ if(!rStr.Len())
+ {
+ rStr = String();
+ rStr += sal_Unicode('0');
+ }
+
+ if(bNeg)
+ {
+ rStr.Insert(sal_Unicode('-'), 0);
+ }
+
+ if(!bNoUnitChars)
+ rStr += aUIUnitStr;
+}
+
+void SdrModel::TakeWinkStr(long nWink, XubString& rStr, FASTBOOL bNoDegChar) const
+{
+ BOOL bNeg(nWink < 0);
+
+ if(bNeg)
+ nWink = -nWink;
+
+ rStr = UniString::CreateFromInt32(nWink);
+
+ International aInter(Application::GetAppInternational());
+ xub_StrLen nAnz(2);
+
+ if(aInter.IsNumLeadingZero())
+ nAnz++;
+
+ while(rStr.Len() < nAnz)
+ rStr.Insert(sal_Unicode('0'), 0);
+
+ sal_Unicode cDec(aInter.GetNumDecimalSep());
+
+ rStr.Insert(cDec, rStr.Len() - 2);
+
+ if(bNeg)
+ rStr.Insert(sal_Unicode('-'), 0);
+
+ if(!bNoDegChar)
+ rStr += DEGREE_CHAR;
+}
+
+void SdrModel::TakePercentStr(const Fraction& rVal, XubString& rStr, FASTBOOL bNoPercentChar) const
+{
+ INT32 nMul(rVal.GetNumerator());
+ INT32 nDiv(rVal.GetDenominator());
+ BOOL bNeg(nMul < 0);
+
+ if(nDiv < 0)
+ bNeg = !bNeg;
+
+ if(nMul < 0)
+ nMul = -nMul;
+
+ if(nDiv < 0)
+ nDiv = -nDiv;
+
+ nMul *= 100;
+ nMul += nDiv/2;
+ nMul /= nDiv;
+
+ rStr = UniString::CreateFromInt32(nMul);
+
+ if(bNeg)
+ rStr.Insert(sal_Unicode('-'), 0);
+
+ if(!bNoPercentChar)
+ rStr += sal_Unicode('%');
+}
+
+void SdrModel::SetChanged(FASTBOOL bFlg)
+{
+ bChanged=bFlg;
+}
+
+void SdrModel::RecalcPageNums(FASTBOOL bMaster)
+{
+ Container& rPL=*(bMaster ? &aMaPag : &aPages);
+ USHORT nAnz=USHORT(rPL.Count());
+ USHORT i;
+ for (i=0; i<nAnz; i++) {
+ SdrPage* pPg=(SdrPage*)(rPL.GetObject(i));
+ pPg->SetPageNum(i);
+ }
+ if (bMaster) bMPgNumsDirty=FALSE;
+ else bPagNumsDirty=FALSE;
+}
+
+void SdrModel::InsertPage(SdrPage* pPage, USHORT nPos)
+{
+ USHORT nAnz=GetPageCount();
+ if (nPos>nAnz) nPos=nAnz;
+ aPages.Insert(pPage,nPos);
+ pPage->SetInserted(TRUE);
+ pPage->SetPageNum(nPos);
+ pPage->SetModel(this);
+ if (nPos<nAnz) bPagNumsDirty=TRUE;
+ SetChanged();
+ SdrHint aHint(HINT_PAGEORDERCHG);
+ aHint.SetPage(pPage);
+ Broadcast(aHint);
+}
+
+void SdrModel::DeletePage(USHORT nPgNum)
+{
+ SdrPage* pPg=RemovePage(nPgNum);
+ delete pPg;
+}
+
+SdrPage* SdrModel::RemovePage(USHORT nPgNum)
+{
+ SdrPage* pPg=(SdrPage*)aPages.Remove(nPgNum);
+ if (pPg!=NULL) {
+ pPg->SetInserted(FALSE);
+ }
+ bPagNumsDirty=TRUE;
+ SetChanged();
+ SdrHint aHint(HINT_PAGEORDERCHG);
+ aHint.SetPage(pPg);
+ Broadcast(aHint);
+ return pPg;
+}
+
+void SdrModel::MovePage(USHORT nPgNum, USHORT nNewPos)
+{
+ SdrPage* pPg=(SdrPage*)aPages.Remove(nPgNum);
+ if (pPg!=NULL) {
+ pPg->SetInserted(FALSE);
+ InsertPage(pPg,nNewPos);
+ }
+}
+
+void SdrModel::InsertMasterPage(SdrPage* pPage, USHORT nPos)
+{
+ USHORT nAnz=GetMasterPageCount();
+ if (nPos>nAnz) nPos=nAnz;
+ aMaPag.Insert(pPage,nPos);
+ pPage->SetInserted(TRUE);
+ pPage->SetPageNum(nPos);
+ pPage->SetModel(this);
+ if (nPos<nAnz) {
+ bMPgNumsDirty=TRUE;
+ // Anpassen der MasterPageDescriptoren
+ USHORT nPageAnz=GetPageCount();
+ for (USHORT np=0; np<nPageAnz; np++) {
+ GetPage(np)->ImpMasterPageInserted(nPos);
+ }
+ }
+ SetChanged();
+ SdrHint aHint(HINT_PAGEORDERCHG);
+ aHint.SetPage(pPage);
+ Broadcast(aHint);
+}
+
+void SdrModel::DeleteMasterPage(USHORT nPgNum)
+{
+ SdrPage* pPg=RemoveMasterPage(nPgNum);
+ if (pPg!=NULL) delete pPg;
+}
+
+SdrPage* SdrModel::RemoveMasterPage(USHORT nPgNum)
+{
+ SdrPage* pRetPg=(SdrPage*)aMaPag.Remove(nPgNum);
+ // Nun die Verweise der normalen Zeichenseiten auf die entfernte MasterPage loeschen
+ // und Verweise auf dahinterliegende Masterpages anpassen.
+ USHORT nPageAnz=GetPageCount();
+ for (USHORT np=0; np<nPageAnz; np++) {
+ GetPage(np)->ImpMasterPageRemoved(nPgNum);
+ }
+ if (pRetPg!=NULL) {
+ pRetPg->SetInserted(FALSE);
+ }
+ bMPgNumsDirty=TRUE;
+ SetChanged();
+ SdrHint aHint(HINT_PAGEORDERCHG);
+ aHint.SetPage(pRetPg);
+ Broadcast(aHint);
+ return pRetPg;
+}
+
+void SdrModel::MoveMasterPage(USHORT nPgNum, USHORT nNewPos)
+{
+ SdrPage* pPg=(SdrPage*)aMaPag.Remove(nPgNum);
+ if (pPg!=NULL) {
+ pPg->SetInserted(FALSE);
+ aMaPag.Insert(pPg,nNewPos);
+ // Anpassen der MasterPageDescriptoren
+ USHORT nPageAnz=GetPageCount();
+ for (USHORT np=0; np<nPageAnz; np++) {
+ GetPage(np)->ImpMasterPageMoved(nPgNum,nNewPos);
+ }
+ }
+ bMPgNumsDirty=TRUE;
+ SetChanged();
+ SdrHint aHint(HINT_PAGEORDERCHG);
+ aHint.SetPage(pPg);
+ Broadcast(aHint);
+}
+
+void SdrModel::WriteData(SvStream& rOut) const
+{
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrModel");
+#endif
+
+ // damit ich meine eigenen SubRecords erkenne (ab V11)
+ rOut.Write(SdrIOJoeMagic, 4);
+
+ {
+ // Focus fuer aModelMiscCompat
+ // ab V11 eingepackt
+ SdrDownCompat aModelMiscCompat(rOut, STREAM_WRITE);
+
+#ifdef DBG_UTIL
+ aModelMiscCompat.SetID("SdrModel(Miscellaneous)");
+#endif
+
+ // ModelInfo muss hier ganz am Anfang stehen!
+ ((SdrModel*)this)->aInfo.aLastWriteDate = DateTime();
+ rtl_TextEncoding eOutCharSet = rOut.GetStreamCharSet();
+ if(eOutCharSet == ((rtl_TextEncoding)9) /* == RTL_TEXTENCODING_SYSTEM */ )
+ eOutCharSet = gsl_getSystemTextEncoding();
+ ((SdrModel*)this)->aInfo.eLastWriteCharSet = GetStoreCharSet(eOutCharSet);
+
+ // UNICODE: set the target charset on the stream to access it as parameter
+ // in all streaming operations for UniString->ByteString conversions
+ rOut.SetStreamCharSet(aInfo.eLastWriteCharSet);
+
+ /* old SV-stuff, there is no possibility to determine this informations in another way
+ ((SdrModel*)this)->aInfo.eLastWriteGUI=System::GetGUIType();
+ ((SdrModel*)this)->aInfo.eLastWriteCPU=System::GetCPUType();
+ ((SdrModel*)this)->aInfo.eLastWriteSys=System::GetSystemType();
+ */
+
+ if(aReadDate.IsValid())
+ {
+ ((SdrModel*)this)->aInfo.aLastReadDate = aReadDate;
+ ((SdrModel*)this)->aInfo.eLastReadCharSet = GetStoreCharSet(gsl_getSystemTextEncoding());
+
+ /* old SV-stuff, there is no possibility to determine this informations in another way
+ ((SdrModel*)this)->aInfo.eLastReadGUI=System::GetGUIType();
+ ((SdrModel*)this)->aInfo.eLastReadCPU=System::GetCPUType();
+ ((SdrModel*)this)->aInfo.eLastReadSys=System::GetSystemType();
+ */
+ }
+ rOut << aInfo; // DateiInfo rausschreiben (ab V11)
+
+ { // ein Bereich fuer Statistik reservieren (V11) (kommt spaeter vielleicht mal dazu)
+ SdrDownCompat aModelStatisticCompat(rOut, STREAM_WRITE);
+
+#ifdef DBG_UTIL
+ aModelStatisticCompat.SetID("SdrModel(Statistic)");
+#endif
+ }
+
+ {
+ // ab V11
+ SdrDownCompat aModelFormatCompat(rOut, STREAM_WRITE);
+
+#ifdef DBG_UTIL
+ aModelFormatCompat.SetID("SdrModel(Format)");
+#endif
+
+ // ab V11
+ rOut << nStreamCompressMode;
+
+ // ab V11
+ rOut << UINT16(rOut.GetNumberFormatInt());
+
+ rOut.SetCompressMode(nStreamCompressMode);
+ // CompressMode erst an dieser Stelle setzen, damit konform zu ReadData()
+ }
+
+ rOut << INT32(aObjUnit.GetNumerator());
+ rOut << INT32(aObjUnit.GetDenominator());
+ rOut << UINT16(eObjUnit);
+ // Komprimiert ?
+ rOut << UINT16(0);
+ // Nur eine DummyPage, jedoch mit relevanten Objekten?
+ rOut << UINT8(bPageNotValid);
+ // Reserve DummyByte
+ rOut << UINT8(0);
+
+ // Tabellen-, Listen- und Palettennamen schreiben
+ // rOut<<INT16(::GetSystemCharSet()); seit V11 hier kein CharSet mehr
+ XubString aEmptyStr;
+
+ if(bExtColorTable)
+ {
+ // der Writer hat seinen eigenen ColorTable
+ // UNICODE: rOut << aEmptyStr;
+ rOut.WriteByteString(aEmptyStr);
+ }
+ else
+ {
+ if(pColorTable && !pColorTable->GetName().Equals(pszStandard))
+ {
+ // UNICODE: rOut << pColorTable->GetName();
+ rOut.WriteByteString(pColorTable->GetName());
+ }
+ else
+ {
+ // UNICODE: rOut << aEmptyStr;
+ rOut.WriteByteString(aEmptyStr);
+ }
+ }
+
+ if(pDashList && !pDashList->GetName().Equals(pszStandard))
+ {
+ // UNICODE: rOut<<pDashList->GetName();
+ rOut.WriteByteString(pDashList->GetName());
+ }
+ else
+ {
+ // UNICODE: rOut << aEmptyStr;
+ rOut.WriteByteString(aEmptyStr);
+ }
+
+ if(pLineEndList && !pLineEndList->GetName().Equals(pszStandard))
+ {
+ // UNICODE: rOut<<pLineEndList->GetName();
+ rOut.WriteByteString(pLineEndList->GetName());
+ }
+ else
+ {
+ // UNICODE: rOut << aEmptyStr;
+ rOut.WriteByteString(aEmptyStr);
+ }
+
+ if(pHatchList && !pHatchList->GetName().Equals(pszStandard))
+ {
+ // UNICODE: rOut<<pHatchList->GetName();
+ rOut.WriteByteString(pHatchList->GetName());
+ }
+ else
+ {
+ // UNICODE: rOut << aEmptyStr;
+ rOut.WriteByteString(aEmptyStr);
+ }
+
+ if(pGradientList && !pGradientList->GetName().Equals(pszStandard))
+ {
+ // UNICODE: rOut<<pGradientList->GetName();
+ rOut.WriteByteString(pGradientList->GetName());
+ }
+ else
+ {
+ // UNICODE: rOut << aEmptyStr;
+ rOut.WriteByteString(aEmptyStr);
+ }
+
+ if(pBitmapList && !pBitmapList->GetName().Equals(pszStandard))
+ {
+ // UNICODE: rOut<<pBitmapList->GetName();
+ rOut.WriteByteString(pBitmapList->GetName());
+ }
+ else
+ {
+ // UNICODE: rOut << aEmptyStr;
+ rOut.WriteByteString(aEmptyStr);
+ }
+
+ // ab 09-02-1996
+ rOut << INT32(aUIScale.GetNumerator());
+ rOut << INT32(aUIScale.GetDenominator());
+ rOut << UINT16(eUIUnit);
+
+ // ab 09-04-1997 fuer #37710#
+ rOut << INT32(nDefTextHgt);
+ rOut << INT32(nDefaultTabulator);
+
+ // StarDraw-Preview: Nummer der MasterPage der ersten Standard-Seite
+ if(GetPageCount() >= 3 && GetPage(1)->GetMasterPageCount())
+ {
+ ((SdrModel*)this)->nStarDrawPreviewMasterPageNum =
+ GetPage(1)->GetMasterPageNum(0);
+ }
+ rOut << nStarDrawPreviewMasterPageNum;
+ }
+
+ UINT16 i;
+
+ for(i=0; i < GetLayerAdmin().GetLayerCount(); i++)
+ {
+ rOut << *GetLayerAdmin().GetLayer(i);
+ }
+
+ for(i=0; i < GetLayerAdmin().GetLayerSetCount(); i++)
+ {
+ rOut << *GetLayerAdmin().GetLayerSet(i);
+ }
+
+ for(i=0; i < GetMasterPageCount(); i++)
+ {
+ const SdrPage* pPg = GetMasterPage(i);
+ rOut << *pPg;
+ }
+
+ for(i=0; i < GetPageCount(); i++)
+ {
+ const SdrPage* pPg = GetPage(i);
+ rOut << *pPg;
+ }
+
+ // Endemarke
+ SdrIOHeader(rOut, STREAM_WRITE, SdrIOEndeID);
+}
+
+void SdrModel::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
+{
+ if(rIn.GetError())
+ return;
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrModel");
+#endif
+
+ if(rHead.GetVersion() >= 11)
+ {
+ // damit ich meine eigenen SubRecords erkenne (ab V11)
+ char cMagic[4];
+ if(rIn.Read(cMagic, 4) != 4 || memcmp(cMagic, SdrIOJoeMagic, 4))
+ {
+ rIn.SetError(SVSTREAM_FILEFORMAT_ERROR);
+ return;
+ }
+ }
+
+ DoProgress(rIn.Tell());
+
+ {
+ // Focus fuer aModelMiscCompat
+ SdrDownCompat* pModelMiscCompat = NULL;
+
+ if(rHead.GetVersion() >= 11)
+ {
+ // MiscellaneousData ab V11 eingepackt
+ // MiscellaneousData ist alles von Recordbeginn bis
+ // zum Anfang der Pages, Layer, ...
+ pModelMiscCompat = new SdrDownCompat(rIn, STREAM_READ);
+
+#ifdef DBG_UTIL
+ pModelMiscCompat->SetID("SdrModel(Miscellaneous)");
+#endif
+ }
+
+ if(rHead.GetVersion() >= 11)
+ {
+ // ModelInfo ab V11
+ // DateiInfo lesen
+ rIn >> aInfo;
+
+ // StreamCharSet setzen, damit Strings beim
+ // Lesen automatisch konvertiert werden
+ rIn.SetStreamCharSet(aInfo.eLastWriteCharSet);
+ }
+
+ if(rHead.GetVersion() >= 11)
+ {
+ // reserviert fuer Statistik
+ SdrDownCompat aModelStatisticCompat(rIn, STREAM_READ);
+
+#ifdef DBG_UTIL
+ aModelStatisticCompat.SetID("SdrModel(Statistik)");
+#endif
+ }
+
+ if(rHead.GetVersion() >= 11)
+ {
+ // Info ueber Dateiformat
+ SdrDownCompat aModelFormatCompat(rIn,STREAM_READ);
+
+#ifdef DBG_UTIL
+ aModelFormatCompat.SetID("SdrModel(Format)");
+#endif
+
+ if(aModelFormatCompat.GetBytesLeft() >= 4)
+ {
+ rIn >> nStreamCompressMode;
+ rIn >> nStreamNumberFormat;
+ rIn.SetCompressMode(nStreamCompressMode);
+ }
+ }
+
+ INT32 nNum,nDen;
+ UINT16 nTmp;
+ UINT8 nTmp8;
+
+ rIn >> nNum;
+ rIn >> nDen;
+
+ aObjUnit = Fraction(nNum,nDen);
+
+ rIn >> nTmp;
+
+ eObjUnit = MapUnit(nTmp);
+
+ // Komprimiert ?
+ rIn >> nTmp;
+
+ //rIn.nJoeDummy=(nTmp==1);
+ rIn >> nTmp8;
+
+ bPageNotValid = (nTmp == 1);
+
+ rIn >> nTmp8; // Reserve DummyByte
+
+ BOOL bExtFiles(rHead.GetVersion() >= 1);
+
+ if(bExtFiles)
+ {
+ // Tabellen-, Listen- und Palettennamen lesen
+ XubString aName;
+
+ if(rHead.GetVersion() < 11)
+ {
+ // vor V11 gab's noch keine ModelInfo, deshalb CharSet von hier
+ // und rein zufaellig gab's genau bis inkl. zur V10
+ // an dieser Stelle einen CharSet
+ INT16 nCharSet;
+
+ rIn >> nCharSet;
+
+ // StreamCharSet setzen, damit Strings beim
+ // Lesen automatisch konvertiert werden
+ rIn.SetStreamCharSet(rtl_TextEncoding(nCharSet));
+ }
+
+ // Tabellen- und Listennamen lesen (Tabellen/Listen existieren schon) // SOH!!!
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ if(!bExtColorTable)
+ {
+ // der Writer hat seinen eigenen ColorTable
+ if(!aName.Len())
+ aName = pszStandard;
+
+ if(pColorTable)
+ pColorTable->SetName(aName);
+ }
+
+ rIn.ReadByteString(aName);
+ if(!aName.Len())
+ aName = pszStandard;
+ if(pDashList)
+ pDashList->SetName(aName);
+
+ rIn.ReadByteString(aName);
+ if(!aName.Len())
+ aName = pszStandard;
+ if(pLineEndList)
+ pLineEndList->SetName(aName);
+
+ rIn.ReadByteString(aName);
+ if(!aName.Len())
+ aName = pszStandard;
+ if(pHatchList)
+ pHatchList->SetName(aName);
+
+ rIn.ReadByteString(aName);
+ if(!aName.Len())
+ aName = pszStandard;
+ if(pGradientList)
+ pGradientList->SetName(aName);
+
+ rIn.ReadByteString(aName);
+ if(!aName.Len())
+ aName = pszStandard;
+ if(pBitmapList)
+ pBitmapList->SetName(aName);
+
+ // Wenn gewuenscht kann hier SetDirty() an den Tabellen gesetzt werden, ist m.M. nach aber ueberfluessig ! SOH.
+ }
+ else
+ {
+ // Ansonsten altes Format: Listen und Tables sind embedded
+
+#ifdef DBG_UTIL
+ ByteString aMsg("Das Format dieser Datei ist noch von April '95 (Version ");
+ aMsg += rHead.GetVersion();
+ aMsg += "). Mit dieser Programmversion kann das nicht mehr gelesen werden";
+
+ DBG_ERROR(aMsg.GetBuffer());
+#endif
+
+ // Version zu alt
+ rIn.SetError(SVSTREAM_WRONGVERSION);
+
+ return;
+ }
+
+ // UIUnit wird ab V12 gestreamt
+ if(rHead.GetVersion() >= 12 && pModelMiscCompat->GetBytesLeft() > 0)
+ {
+ rIn >> nNum;
+ rIn >> nDen;
+
+ aUIScale = Fraction(nNum, nDen);
+
+ rIn >> nTmp;
+
+ eUIUnit = FieldUnit(nTmp);
+ }
+
+ // ab 09-04-1997 fuer #37710#: Text in Dafaultgroesse vom Writer ins Draw und umgekehrt
+ if(rHead.GetVersion() >= 13 && pModelMiscCompat->GetBytesLeft() > 0)
+ {
+ rIn >> nNum;
+ nDefTextHgt = nNum;
+
+ rIn >> nNum;
+ nDefaultTabulator = (UINT16)nNum;
+
+ Outliner& rOutliner = GetDrawOutliner();
+ rOutliner.SetDefTab(nDefaultTabulator);
+ }
+
+ if(rHead.GetVersion() >= 14 && pModelMiscCompat->GetBytesLeft() > 0)
+ {
+ // StarDraw-Preview: Nummer der MasterPage der ersten Standard-Seite
+ rIn >> nStarDrawPreviewMasterPageNum;
+ }
+
+ if(pModelMiscCompat)
+ {
+ delete pModelMiscCompat;
+ }
+ }
+
+ DoProgress(rIn.Tell());
+ //SdrIOHeader aHead;
+
+ // Seiten, Layer und LayerSets einlesen
+ BOOL bEnde(FALSE);
+ UINT16 nMasterPageNum(0);
+ BOOL bAllPagesLoaded(TRUE);
+
+ while(!rIn.GetError() && !rIn.IsEof() && !bEnde)
+ {
+ SdrIOHeaderLookAhead aHead(rIn);
+ //ULONG nPos0=rIn.Tell();
+ //rIn>>aHead;
+
+ if(!aHead.IsMagic())
+ {
+ // Format-Fehler
+ rIn.SetError(SVSTREAM_FILEFORMAT_ERROR);
+ return;
+ }
+ else
+ {
+ if(!aHead.IsEnde())
+ {
+ //rIn.Seek(nPos0); // Die Headers wollen alle selbst lesen
+ if(aHead.IsID(SdrIOPageID))
+ {
+ if(!bStarDrawPreviewMode || GetPageCount() < 3)
+ {
+ // Page lesen
+ SdrPage* pPg = AllocPage(FALSE);
+
+ rIn >> *pPg;
+ InsertPage(pPg);
+ }
+ else
+ {
+ bAllPagesLoaded = FALSE;
+ aHead.SkipRecord();
+ }
+ }
+ else if(aHead.IsID(SdrIOMaPgID))
+ {
+ if(!bStarDrawPreviewMode
+ || nStarDrawPreviewMasterPageNum == SDRPAGE_NOTFOUND
+ || nMasterPageNum == 0
+ || nMasterPageNum <= nStarDrawPreviewMasterPageNum
+ || nMasterPageNum <= nStarDrawPreviewMasterPageNum + 1)
+ {
+ // Im StarDrawPreviewMode Standard und Notizseite lesen!
+ // MasterPage lesen
+ SdrPage* pPg = AllocPage(TRUE);
+
+ rIn >> *pPg;
+ InsertMasterPage(pPg);
+ }
+ else
+ {
+ bAllPagesLoaded = FALSE;
+ aHead.SkipRecord();
+ }
+
+ nMasterPageNum++;
+ }
+ else if(aHead.IsID(SdrIOLayrID))
+ {
+ //SdrLayer* pLay=GetLayer().NewLayer("");
+ // Layerdefinition lesen
+ SdrLayer* pLay = new SdrLayer;
+
+ rIn >> *pLay;
+ GetLayerAdmin().InsertLayer(pLay);
+ }
+ else if(aHead.IsID(SdrIOLSetID))
+ {
+ //SdrLayerSet* pSet=GetLayer().NewLayerSet("");
+ SdrLayerSet* pSet = new SdrLayerSet; // Layersetdefinition lesen
+
+ rIn >> *pSet;
+ GetLayerAdmin().InsertLayerSet(pSet);
+ }
+ else
+ {
+ // aha, das wil keiner. Also ueberlesen.
+ aHead.SkipRecord();
+ //rIn.Seek(nPos0+aHead.nBlkSize);
+ }
+ }
+ else
+ {
+ bEnde = TRUE;
+
+ // Endemarke weglesen
+ aHead.SkipRecord();
+ }
+ }
+ DoProgress(rIn.Tell());
+ }
+
+ if(bStarDrawPreviewMode && bAllPagesLoaded)
+ {
+ // Obwohl StarDrawPreviewMode wurden doch alle Seiten geladen,
+ // um dieses kenntlich zu machen, wird das Flag zurueckgesetzt
+ bStarDrawPreviewMode = FALSE;
+ }
+}
+
+void SdrModel::AfterRead()
+{
+ // alle MasterPages und alle Pages durchlaufen
+ UINT16 nAnz(GetMasterPageCount());
+ UINT16 i;
+
+ for(i=0; i < nAnz; i++)
+ {
+ GetMasterPage(i)->AfterRead();
+ }
+
+ nAnz = GetPageCount();
+
+ for(i=0; i < nAnz; i++)
+ {
+ GetPage(i)->AfterRead();
+ }
+}
+
+ULONG SdrModel::ImpCountAllSteamComponents() const
+{
+ UINT32 nCnt(0);
+ UINT16 nAnz(GetMasterPageCount());
+ UINT16 nNum;
+
+ for(nNum = 0; nNum < nAnz; nNum++)
+ {
+ nCnt += GetMasterPage(nNum)->CountAllObjects();
+ }
+
+ nAnz = GetPageCount();
+
+ for(nNum = 0; nNum < nAnz; nNum++)
+ {
+ nCnt += GetPage(nNum)->CountAllObjects();
+ }
+
+ return nCnt;
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrModel& rMod)
+{
+ ((SdrModel*)&rMod)->nProgressOfs=0;
+ ((SdrModel*)&rMod)->nProgressMax=rMod.ImpCountAllSteamComponents(); // Hier passenden Wert einsetzen
+ ((SdrModel*)&rMod)->DoProgress(0);
+ ULONG nPos0=rOut.Tell();
+ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOModlID);
+ USHORT nCompressMerk=rOut.GetCompressMode(); // Der CompressMode wird von SdrModel::ReadData() gesetzt
+ rMod.WriteData(rOut);
+ rOut.SetCompressMode(nCompressMerk); // CompressMode wieder restaurieren
+ ((SdrModel*)&rMod)->DoProgress(0xFFFFFFFF);
+ ((SdrModel*)&rMod)->Broadcast(SdrHint(HINT_MODELSAVED)); // #43095#
+ return rOut;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrModel& rMod)
+{
+ if (rIn.GetError()!=0) return rIn;
+ rMod.aReadDate=DateTime(); // Zeitpunkt des Lesens merken
+ rMod.nProgressOfs=rIn.Tell();
+ rMod.nProgressMax=0xFFFFFFFF; // Vorlaeufiger Wert
+ rMod.DoProgress(0);
+ rMod.Clear();
+ SdrIOHeader aHead(rIn,STREAM_READ);
+ rMod.nLoadVersion=aHead.GetVersion();
+ if (!aHead.IsMagic()) {
+ rIn.SetError(SVSTREAM_FILEFORMAT_ERROR); // Format-Fehler
+ return rIn;
+ }
+ if (aHead.GetMajorVersion()>nAktSdrFileMajorVersion) {
+ rIn.SetError(SVSTREAM_WRONGVERSION); // Datei zu neu / Programm zu alt
+ return rIn;
+ }
+ rMod.nProgressMax=aHead.GetBlockSize();
+ rMod.DoProgress(rIn.Tell());
+ rMod.bLoading=TRUE;
+ rtl_TextEncoding eStreamCharSetMerker=rIn.GetStreamCharSet(); // Der StreamCharSet wird von SdrModel::ReadData() gesetzt
+ USHORT nCompressMerk=rIn.GetCompressMode(); // Der CompressMode wird von SdrModel::ReadData() gesetzt
+ rMod.ReadData(aHead,rIn);
+ rIn.SetCompressMode(nCompressMerk); // CompressMode wieder restaurieren
+ rIn.SetStreamCharSet(eStreamCharSetMerker); // StreamCharSet wieder restaurieren
+ rMod.bLoading=FALSE;
+ rMod.DoProgress(rIn.Tell());
+ rMod.AfterRead();
+ rMod.DisposeLoadedModels();
+
+ rMod.ImpSetUIUnit(); // weil ggf. neues Scaling eingelesen
+ rMod.DoProgress(0xFFFFFFFF);
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrModel::WriteModelInfo(SvStream& rOut) const
+{
+ FASTBOOL bRet=FALSE;
+ if (rOut.GetError()!=0) return bRet;
+ SdrIOHeaderLookAhead aLookAhead(rOut);
+ ULONG nCompat;
+ rOut>>nCompat;
+ char cMagic[4];
+ FASTBOOL bJoeMagicOk=(rOut.Read(cMagic,4)==4) && memcmp(cMagic,SdrIOJoeMagic,4)==0;
+ if (aLookAhead.GetVersion()>=11 && aLookAhead.IsMagic() &&
+ bJoeMagicOk && aLookAhead.IsID(SdrIOModlID) && rOut.GetError()==0)
+ {
+ rOut<<aInfo;
+ bRet=rOut.GetError()==0;
+ }
+ return bRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrModel::CheckConsistence() const
+{
+ FASTBOOL bRet=TRUE;
+#ifdef DBG_UTIL
+ DBG_CHKTHIS(SdrModel,NULL);
+#endif
+ return bRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+// #48289#
+void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum,
+ USHORT nDestPos,
+ FASTBOOL bUndo, FASTBOOL bMoveNoCopy)
+{
+ if (bUndo) {
+ BegUndo(ImpGetResStr(STR_UndoMergeModel));
+ }
+ USHORT nPageAnz=GetPageCount();
+ USHORT nMaxPage=nPageAnz; if (nMaxPage!=0) nMaxPage--;
+ if (nFirstPageNum>nMaxPage) nFirstPageNum=nMaxPage;
+ if (nLastPageNum>nMaxPage) nLastPageNum =nMaxPage;
+ FASTBOOL bReverse=nLastPageNum<nFirstPageNum;
+ if (nDestPos>nPageAnz) nDestPos=nPageAnz;
+
+ // Zunaechst die Zeiger der betroffenen Seiten in einem Array sichern
+ USHORT nPageNum=nFirstPageNum;
+ USHORT nCopyAnz=((!bReverse)?(nLastPageNum-nFirstPageNum):(nFirstPageNum-nLastPageNum))+1;
+ SdrPage** pPagePtrs=new SdrPage*[nCopyAnz];
+ USHORT nCopyNum;
+ for (nCopyNum=0; nCopyNum<nCopyAnz; nCopyNum++) {
+ pPagePtrs[nCopyNum]=GetPage(nPageNum);
+ if (bReverse) nPageNum--;
+ else nPageNum++;
+ }
+
+ // Jetzt die Seiten kopieren
+ USHORT nDestNum=nDestPos;
+ for (nCopyNum=0; nCopyNum<nCopyAnz; nCopyNum++) {
+ SdrPage* pPg=pPagePtrs[nCopyNum];
+ USHORT nPageNum=pPg->GetPageNum();
+ if (!bMoveNoCopy) {
+ const SdrPage* pPg1=GetPage(nPageNum);
+ pPg=pPg1->Clone();
+ InsertPage(pPg,nDestNum);
+ if (bUndo) AddUndo(new SdrUndoCopyPage(*pPg));
+ nDestNum++;
+ } else {
+ // Move ist nicht getestet!
+ if (nDestNum>nPageNum) nDestNum--;
+ if (bUndo) AddUndo(new SdrUndoSetPageNum(*GetPage(nPageNum),nPageNum,nDestNum));
+ pPg=RemovePage(nPageNum);
+ InsertPage(pPg,nDestNum);
+ nDestNum++;
+ }
+
+ if (bReverse) nPageNum--;
+ else nPageNum++;
+ }
+
+ delete[] pPagePtrs;
+ if (bUndo) EndUndo();
+}
+
+void SdrModel::Merge(SdrModel& rSourceModel,
+ USHORT nFirstPageNum, USHORT nLastPageNum,
+ USHORT nDestPos,
+ FASTBOOL bMergeMasterPages, FASTBOOL bAllMasterPages,
+ FASTBOOL bUndo, FASTBOOL bTreadSourceAsConst)
+{
+ if (&rSourceModel==this) { // #48289#
+ CopyPages(nFirstPageNum,nLastPageNum,nDestPos,bUndo,!bTreadSourceAsConst);
+ return;
+ }
+ if (bUndo) {
+ BegUndo(ImpGetResStr(STR_UndoMergeModel));
+ }
+ USHORT nSrcPageAnz=rSourceModel.GetPageCount();
+ USHORT nSrcMasterPageAnz=rSourceModel.GetMasterPageCount();
+ USHORT nDstMasterPageAnz=GetMasterPageCount();
+ FASTBOOL bInsPages=(nFirstPageNum<nSrcPageAnz || nLastPageNum<nSrcPageAnz);
+ USHORT nMaxSrcPage=nSrcPageAnz; if (nMaxSrcPage!=0) nMaxSrcPage--;
+ if (nFirstPageNum>nMaxSrcPage) nFirstPageNum=nMaxSrcPage;
+ if (nLastPageNum>nMaxSrcPage) nLastPageNum =nMaxSrcPage;
+ FASTBOOL bReverse=nLastPageNum<nFirstPageNum;
+
+ USHORT* pMasterMap=NULL;
+ FASTBOOL* pMasterNeed=NULL;
+ USHORT nMasterNeed=0;
+ if (bMergeMasterPages && nSrcMasterPageAnz!=0) {
+ // Feststellen, welche MasterPages aus rSrcModel benoetigt werden
+ pMasterMap=new USHORT[nSrcMasterPageAnz];
+ pMasterNeed=new FASTBOOL[nSrcMasterPageAnz];
+ memset(pMasterMap,0xFF,nSrcMasterPageAnz*sizeof(USHORT));
+ if (bAllMasterPages) {
+ memset(pMasterNeed,TRUE,nSrcMasterPageAnz*sizeof(FASTBOOL));
+ } else {
+ memset(pMasterNeed,FALSE,nSrcMasterPageAnz*sizeof(FASTBOOL));
+ USHORT nAnf= bReverse ? nLastPageNum : nFirstPageNum;
+ USHORT nEnd= bReverse ? nFirstPageNum : nLastPageNum;
+ for (USHORT i=nAnf; i<=nEnd; i++) {
+ const SdrPage* pPg=rSourceModel.GetPage(i);
+ USHORT nMasterDescrAnz=pPg->GetMasterPageCount();
+ for (USHORT j=0; j<nMasterDescrAnz; j++) {
+ const SdrMasterPageDescriptor& rMaster=pPg->GetMasterPageDescriptor(j);
+ USHORT nMPgNum=rMaster.GetPageNum();
+ if (nMPgNum<nSrcMasterPageAnz) {
+ pMasterNeed[nMPgNum]=TRUE;
+ }
+ }
+ }
+ }
+ // Nun das Mapping der MasterPages bestimmen
+ USHORT nAktMaPagNum=nDstMasterPageAnz;
+ for (USHORT i=0; i<nSrcMasterPageAnz; i++) {
+ if (pMasterNeed[i]) {
+ pMasterMap[i]=nAktMaPagNum;
+ nAktMaPagNum++;
+ nMasterNeed++;
+ }
+ }
+ }
+
+ // rueberholen der Zeichenseiten
+ if (bInsPages) {
+ USHORT nSourcePos=nFirstPageNum;
+ USHORT nMergeCount=USHORT(Abs((long)((long)nFirstPageNum-nLastPageNum))+1);
+ if (nDestPos>GetPageCount()) nDestPos=GetPageCount();
+ while (nMergeCount>0) {
+ SdrPage* pPg=NULL;
+ if (bTreadSourceAsConst) {
+ const SdrPage* pPg1=rSourceModel.GetPage(nSourcePos);
+ pPg=pPg1->Clone();
+ } else {
+ pPg=rSourceModel.RemovePage(nSourcePos);
+ }
+ if (pPg!=NULL) {
+ InsertPage(pPg,nDestPos);
+ if (bUndo) AddUndo(new SdrUndoNewPage(*pPg));
+ // und nun zu den MasterPageDescriptoren
+ USHORT nMasterDescrAnz=pPg->GetMasterPageCount();
+ for (USHORT nMaster=nMasterDescrAnz; nMaster>0;) {
+ nMaster--;
+ const SdrMasterPageDescriptor& rConstMaster=pPg->GetMasterPageDescriptor(nMaster);
+ USHORT nMaPgNum=rConstMaster.GetPageNum();
+ if (bMergeMasterPages) {
+ USHORT nNeuNum=0xFFFF;
+ if (pMasterMap!=NULL) nNeuNum=pMasterMap[nMaPgNum];
+ if (nNeuNum!=0xFFFF) {
+ if (bUndo) AddUndo(new SdrUndoPageChangeMasterPage(*pPg,nNeuNum));
+ SdrMasterPageDescriptor& rMaster=pPg->GetMasterPageDescriptor(nMaster);
+ rMaster.SetPageNum(nNeuNum);
+ }
+ DBG_ASSERT(nNeuNum!=0xFFFF,"SdrModel::Merge(): Irgendwas ist krumm beim Mappen der MasterPages");
+ } else {
+ if (nMaPgNum>=nDstMasterPageAnz) {
+ // Aha, die ist ausserbalb des urspruenglichen Bereichs der Masterpages des DstModel
+ pPg->RemoveMasterPage(nMaster);
+ }
+ }
+ }
+ } else {
+ DBG_ERROR("SdrModel::Merge(): Zeichenseite im SourceModel nicht gefunden");
+ }
+ nDestPos++;
+ if (bReverse) nSourcePos--;
+ else if (bTreadSourceAsConst) nSourcePos++;
+ nMergeCount--;
+ }
+ }
+
+ // rueberholen der Masterpages
+ if (pMasterMap!=NULL && pMasterNeed!=NULL && nMasterNeed!=0) {
+ for (USHORT i=nSrcMasterPageAnz; i>0;) {
+ i--;
+ if (pMasterNeed[i]) {
+ SdrPage* pPg=NULL;
+ if (bTreadSourceAsConst) {
+ const SdrPage* pPg1=rSourceModel.GetMasterPage(i);
+ pPg=pPg1->Clone();
+ } else {
+ pPg=rSourceModel.RemoveMasterPage(i);
+ }
+ if (pPg!=NULL) {
+ // und alle ans einstige Ende des DstModel reinschieben.
+ // nicht InsertMasterPage() verwenden da die Sache
+ // inkonsistent ist bis alle drin sind
+ aMaPag.Insert(pPg,nDstMasterPageAnz);
+ pPg->SetInserted(TRUE);
+ pPg->SetModel(this);
+ bMPgNumsDirty=TRUE;
+ if (bUndo) AddUndo(new SdrUndoNewPage(*pPg));
+ } else {
+ DBG_ERROR("SdrModel::Merge(): MasterPage im SourceModel nicht gefunden");
+ }
+ }
+ }
+ }
+
+ delete [] pMasterMap;
+ delete [] pMasterNeed;
+
+ bMPgNumsDirty=TRUE;
+ bPagNumsDirty=TRUE;
+
+ SetChanged();
+ // Fehlt: Mergen und Mapping der Layer
+ // an den Objekten sowie an den MasterPageDescriptoren
+ if (bUndo) EndUndo();
+}
+
+void SdrModel::SetStarDrawPreviewMode(BOOL bPreview)
+{
+ if (!bPreview && bStarDrawPreviewMode && GetPageCount())
+ {
+ // Das Zuruecksetzen ist nicht erlaubt, da das Model ev. nicht vollstaendig geladen wurde
+ DBG_ASSERT(FALSE,"SdrModel::SetStarDrawPreviewMode(): Zuruecksetzen nicht erlaubt, da Model ev. nicht vollstaendig");
+ }
+ else
+ {
+ bStarDrawPreviewMode = bPreview;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrHint,SfxHint);
+
+SdrHint::SdrHint(const SdrPage& rNewPage)
+{
+ aRect=Rectangle(0,0,rNewPage.GetWdt(),rNewPage.GetHgt());
+ pPage=&rNewPage;
+ pObj=NULL;
+ pObjList=&rNewPage;
+ bNeedRepaint=TRUE;
+ eHint=HINT_PAGECHG;
+}
+
+SdrHint::SdrHint(const SdrObject& rNewObj)
+{
+ aRect=rNewObj.GetBoundRect();
+ pPage=rNewObj.GetPage();
+ pObj=&rNewObj;
+ pObjList=rNewObj.GetObjList();
+ bNeedRepaint=TRUE;
+ eHint=HINT_OBJCHG;
+}
+
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
new file mode 100644
index 0000000000..6005d5026c
--- /dev/null
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -0,0 +1,2153 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdmrkv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdmrkv.hxx"
+#include "svdetc.hxx"
+#include "svdoedge.hxx"
+#include "svdglob.hxx"
+#include "svditext.hxx"
+#include "svdview.hxx"
+#include "svdpagv.hxx"
+#include "svdpage.hxx"
+#include "svddrgm1.hxx"
+#include "svdio.hxx"
+#include "svdibrow.hxx"
+#include "svdoole2.hxx"
+#include "xgrad.hxx"
+#include "xflgrit.hxx"
+
+#include "gradtrns.hxx"
+#include "xflftrit.hxx"
+
+#include "dialmgr.hxx"
+#include "svdstr.hrc"
+#include "svdundo.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@@@ @@@@@ @@ @@ @@ @@ @@ @@@@@ @@ @@
+// @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@@@@ @@@@@@ @@@@@ @@@@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMarkView::ImpClearVars()
+{
+ eDragMode=SDRDRAG_MOVE;
+ bHdlShown=FALSE;
+ bRefHdlShownOnly=FALSE;
+ eEditMode=SDREDITMODE_EDIT;
+ eEditMode0=SDREDITMODE_EDIT;
+ bDesignMode=FALSE;
+ bMarking=FALSE;
+ bMarkingPoints=FALSE;
+ bMarkingGluePoints=FALSE;
+ bUnmarking=FALSE;
+ pMarkedObj=NULL;
+ pMarkedPV=NULL;
+ bForceFrameHandles=FALSE;
+ bPlusHdlAlways=FALSE;
+ nFrameHandlesLimit=50;
+ nSpecialCnt=0;
+ bInsPolyPoint=FALSE;
+ nInsPointNum=0;
+ bEdgesOfMarkedNodesDirty=FALSE;
+ bMarkedObjRectDirty=FALSE;
+ bMarkedPointsRectsDirty=FALSE;
+ bHdlHidden=FALSE;
+ bMrkPntDirty=FALSE;
+ bMarkHdlWhenTextEdit=FALSE;
+// bSolidHdlBackgroundInvalid=FALSE;
+ bMarkableObjCountDirty=FALSE; // noch nicht implementiert
+ nMarkableObjCount=0; // noch nicht implementiert
+}
+
+SdrMarkView::SdrMarkView(SdrModel* pModel1, OutputDevice* pOut):
+ SdrSnapView(pModel1,pOut),
+ aHdl(this)
+{
+ ImpClearVars();
+ StartListening(*pModel1);
+}
+
+SdrMarkView::SdrMarkView(SdrModel* pModel1, ExtOutputDevice* pXOut):
+ SdrSnapView(pModel1,pXOut),
+ aHdl(this)
+{
+ ImpClearVars();
+ StartListening(*pModel1);
+}
+
+void __EXPORT SdrMarkView::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+ if (pSdrHint!=NULL) {
+ SdrHintKind eKind=pSdrHint->GetKind();
+ if (eKind==HINT_OBJLISTCLEARED) {
+ USHORT nAnz=GetPageViewCount();
+ BOOL bMLChgd=FALSE;
+ for (USHORT nv=0; nv<nAnz; nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (pPV->GetObjList()==pSdrHint->GetObjList()) {
+ aMark.DeletePageView(*pPV);
+ bMLChgd=TRUE;
+ }
+ }
+ if (bMLChgd) MarkListHasChanged();
+ }
+ if (eKind==HINT_OBJCHG || eKind==HINT_OBJINSERTED || eKind==HINT_OBJREMOVED) {
+ if (bHdlShown) HideMarkHdl(NULL);
+ bMarkedObjRectDirty=TRUE;
+ bMarkedPointsRectsDirty=TRUE;
+ }
+ }
+ SdrSnapView::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+}
+
+void SdrMarkView::ModelHasChanged()
+{
+ SdrPaintView::ModelHasChanged();
+ aMark.SetNameDirty();
+ bMarkedObjRectDirty=TRUE;
+ bMarkedPointsRectsDirty=TRUE;
+ // Es sind beispielsweise Obj markiert und aMark ist Sorted.
+ // In einer anderen View 2 wird die ObjOrder veraendert
+ // (z.B. MovToTop()). Dann ist Neusortieren der MarkList erforderlich.
+ aMark.SetUnsorted();
+ aMark.ForceSort();
+ bMrkPntDirty=TRUE;
+ UndirtyMrkPnt();
+ SdrView* pV=(SdrView*)this;
+ if (pV!=NULL && !pV->IsDragObj() && !pV->IsInsObjPoint()) { // an dieser Stelle habe ich ein ziemliches Problem !!!
+ AdjustMarkHdl();
+// if (!IsSolidMarkHdl()) {
+// if (!bHdlShown) {
+// // Ein wenig unsauber ...
+// if ((bMarkHdlWhenTextEdit || !pV->IsTextEdit()) && // evtl. keine Handles bei TextEdit
+// !(pV->IsDragHdlHide() && pV->IsDragObj() && // Ggf. keine Handles beim Draggen
+// aDragStat.IsMinMoved() && !IS_TYPE(SdrDragMovHdl,pV->GetDragMethod()))) {
+// ShowMarkHdl(NULL);
+// }
+// }
+// }
+ }
+}
+
+void SdrMarkView::AfterInitRedraw(USHORT nWinNum)
+{
+// if (IsShownXorVisibleWinNum(nWinNum)) { // Durch Invalidate zerstoerte Handles wiederherstellen
+// OutputDevice* pOut=GetWin(nWinNum);
+// if (pOut!=NULL && pOut->GetOutDevType()==OUTDEV_WINDOW) {
+// if (bHdlShown && IsSolidMarkHdl()) {
+// if( aWinList[nWinNum].pVDev == NULL )
+// aWinList[nWinNum].pVDev = new VirtualDevice;
+//
+// aHdl.SaveBackground(*pOut,*aWinList[nWinNum].pVDev);
+// }
+// }
+// }
+}
+
+void SdrMarkView::ImpAfterPaint()
+{
+// if (IsSolidMarkHdl()) {
+ SdrView* pV=(SdrView*)this;
+ if (pV!=NULL && !pV->IsDragObj() && !pV->IsInsObjPoint()) { // an dieser Stelle habe ich ein ziemliches Problem !!!
+ if (!bHdlShown ) {
+ // Ein wenig unsauber ...
+ if ((bMarkHdlWhenTextEdit || !pV->IsTextEdit()) && // evtl. keine Handles bei TextEdit
+ !(pV->IsDragHdlHide() && pV->IsDragObj() && // Ggf. keine Handles beim Draggen
+ aDragStat.IsMinMoved() && !IS_TYPE(SdrDragMovHdl,pV->GetDragMethod()))) {
+ ShowMarkHdl(NULL);
+ }
+ }
+ }
+// }
+// // refresh with Paint-functionality
+// RefreshAllIAOManagers();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrMarkView::IsAction() const
+{
+ return SdrSnapView::IsAction() || bMarking || bMarkingPoints || bMarkingGluePoints;
+}
+
+void SdrMarkView::MovAction(const Point& rPnt)
+{
+ SdrSnapView::MovAction(rPnt);
+ if (bMarking) {
+ MovMarkObj(rPnt);
+ }
+ if (bMarkingPoints) {
+ MovMarkPoints(rPnt);
+ }
+ if (bMarkingGluePoints) {
+ MovMarkGluePoints(rPnt);
+ }
+}
+
+void SdrMarkView::EndAction()
+{
+ if (bMarking) EndMarkObj();
+ if (bMarkingPoints) EndMarkPoints();
+ if (bMarkingGluePoints) EndMarkGluePoints();
+ SdrSnapView::EndAction();
+}
+
+void SdrMarkView::BckAction()
+{
+ SdrSnapView::BckAction();
+ BrkMarkObj();
+ BrkMarkPoints();
+ BrkMarkGluePoints();
+}
+
+void SdrMarkView::BrkAction()
+{
+ SdrSnapView::BrkAction();
+ BrkMarkObj();
+ BrkMarkPoints();
+ BrkMarkGluePoints();
+}
+
+void SdrMarkView::TakeActionRect(Rectangle& rRect) const
+{
+ if (bMarking || bMarkingPoints || bMarkingGluePoints) {
+ rRect=Rectangle(aDragStat.GetStart(),aDragStat.GetNow());
+ } else {
+ SdrSnapView::TakeActionRect(rRect);
+ }
+}
+
+void SdrMarkView::ToggleShownXor(OutputDevice* pOut, const Region* pRegion) const
+{
+ SdrSnapView::ToggleShownXor(pOut,pRegion);
+ if ((bMarking || bMarkingPoints || bMarkingGluePoints) && aDragStat.IsShown()) {
+ DrawMarkObjOrPoints(pOut);
+ }
+// if (bHdlShown) {
+// DrawMarkHdl(pOut,FALSE);
+// } else if (bRefHdlShownOnly) {
+// DrawMarkHdl(pOut,BOOL(2)); HACK(nur die Ref-Hdls painten)
+// }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMarkView::ClearPageViews()
+{
+ UnmarkAllObj();
+ SdrSnapView::ClearPageViews();
+}
+
+void SdrMarkView::HidePage(SdrPageView* pPV)
+{
+ if(pPV)
+ {
+ // break all creation actions when hiding page (#75081#)
+ BrkAction();
+
+ BOOL bVis(IsMarkHdlShown());
+
+ if(bVis)
+ HideMarkHdl(NULL);
+
+ // Alle Markierungen dieser Seite verwerfen
+ BOOL bMrkChg(aMark.DeletePageView(*pPV));
+ SdrSnapView::HidePage(pPV);
+
+ if(bMrkChg)
+ {
+ MarkListHasChanged();
+ AdjustMarkHdl();
+ }
+
+ if(bVis)
+ ShowMarkHdl(NULL);
+ }
+}
+
+void SdrMarkView::SetPagePos(SdrPageView* pPV, const Point& rOffs)
+{
+ if (pPV!=NULL && rOffs!=pPV->GetOffset()) {
+ BOOL bVis=IsMarkHdlShown();
+ if (bVis) HideMarkHdl(NULL);
+ SdrSnapView::SetPagePos(pPV,rOffs);
+ bMarkedObjRectDirty=TRUE;
+ bMarkedPointsRectsDirty=TRUE;
+ AdjustMarkHdl();
+ if (bVis) ShowMarkHdl(NULL);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrMarkView::BegMarkObj(const Point& rPnt, OutputDevice* pOut)
+{
+ return BegMarkObj(rPnt,(BOOL)FALSE);
+}
+
+BOOL SdrMarkView::BegMarkObj(const Point& rPnt, BOOL bUnmark)
+{
+ BrkAction();
+ Point aPt(rPnt);
+ aDragStat.Reset(aPt);
+ aDragStat.NextPoint();
+ aDragStat.SetMinMove(nMinMovLog);
+ aAni.Reset();
+ pDragWin=NULL;
+ bMarking=TRUE;
+ bUnmarking=bUnmark;
+ nSpecialCnt=0;
+ return TRUE;
+}
+
+void SdrMarkView::MovMarkObj(const Point& rPnt)
+{
+ if (bMarking && aDragStat.CheckMinMoved(rPnt)) {
+ Point aPt(rPnt);
+ HideMarkObjOrPoints(pDragWin);
+ aDragStat.NextMove(aPt);
+ ShowMarkObjOrPoints(pDragWin);
+ long dx=aDragStat.GetNow().X()-aDragStat.GetStart().X();
+ long dy=aDragStat.GetNow().Y()-aDragStat.GetStart().Y();
+ OutputDevice* pOut=pDragWin;
+ if (pOut==NULL) pOut=GetWin(0);
+ if (pOut!=NULL) {
+ Size aSiz(pOut->LogicToPixel(Size(dx,dy)));
+ dx=aSiz.Width();
+ dy=aSiz.Height();
+ }
+ if (nSpecialCnt==0 && dx>=20 && dy>=20) nSpecialCnt++;
+ if (nSpecialCnt>0 && nSpecialCnt!=0xFFFF) {
+ BOOL bOdd=(nSpecialCnt & 1) ==1;
+ if (bOdd && dx>=20 && dy<=2) nSpecialCnt++;
+ if (!bOdd && dy>=20 && dx<=2) nSpecialCnt++;
+ }
+ if (nSpecialCnt>=3) nSpecialCnt=0xFFFF;
+ }
+}
+
+BOOL SdrMarkView::EndMarkObj()
+{
+ if (!aDragStat.IsMinMoved()) BrkMarkObj();
+ if (bMarking) {
+ HideMarkObjOrPoints(pDragWin);
+ bMarking=FALSE;
+ Rectangle aRect(aDragStat.GetStart(),aDragStat.GetNow());
+ aRect.Justify();
+ MarkObj(aRect,bUnmarking);
+ bUnmarking=FALSE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void SdrMarkView::BrkMarkObj()
+{
+ if (bMarking) {
+ HideMarkObjOrPoints(pDragWin);
+ bMarking=FALSE;
+ bUnmarking=FALSE;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrMarkView::BegMarkPoints(const Point& rPnt, OutputDevice* pOut)
+{
+ return BegMarkPoints(rPnt,(BOOL)FALSE);
+}
+
+BOOL SdrMarkView::BegMarkPoints(const Point& rPnt, BOOL bUnmark)
+{
+ if (HasMarkablePoints()) {
+ BrkAction();
+ Point aPt(rPnt);
+ aDragStat.Reset(aPt);
+ aDragStat.NextPoint();
+ aDragStat.SetMinMove(nMinMovLog);
+ aAni.Reset();
+ pDragWin=NULL;
+ bMarkingPoints=TRUE;
+ bUnmarking=bUnmark;
+ return TRUE;
+ } else return FALSE;
+}
+
+void SdrMarkView::MovMarkPoints(const Point& rPnt)
+{
+ if (bMarkingPoints && aDragStat.CheckMinMoved(rPnt)) {
+ HideMarkObjOrPoints(pDragWin);
+ aDragStat.NextMove(rPnt);
+ ShowMarkObjOrPoints(pDragWin);
+ }
+}
+
+BOOL SdrMarkView::EndMarkPoints()
+{
+ if (!HasMarkablePoints() || // Falls waerend des markierens ein Unmark oder so kam
+ !aDragStat.IsMinMoved())
+ {
+ BrkMarkPoints();
+ }
+ if (bMarkingPoints) {
+ HideMarkObjOrPoints(pDragWin);
+ bMarkingPoints=FALSE;
+ Rectangle aRect(aDragStat.GetStart(),aDragStat.GetNow());
+ aRect.Justify();
+ MarkPoints(aRect,bUnmarking);
+ bUnmarking=FALSE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void SdrMarkView::BrkMarkPoints()
+{
+ if (bMarkingPoints) {
+ HideMarkObjOrPoints(pDragWin);
+ bMarkingPoints=FALSE;
+ bUnmarking=FALSE;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrMarkView::BegMarkGluePoints(const Point& rPnt, OutputDevice* pOut)
+{
+ return BegMarkGluePoints(rPnt,(BOOL)FALSE);
+}
+
+BOOL SdrMarkView::BegMarkGluePoints(const Point& rPnt, BOOL bUnmark)
+{
+ if (HasMarkableGluePoints()) {
+ BrkAction();
+ Point aPt(rPnt);
+ aDragStat.Reset(aPt);
+ aDragStat.NextPoint();
+ aDragStat.SetMinMove(nMinMovLog);
+ aAni.Reset();
+ pDragWin=NULL;
+ bMarkingGluePoints=TRUE;
+ bUnmarking=bUnmark;
+ return TRUE;
+ } else return FALSE;
+}
+
+void SdrMarkView::MovMarkGluePoints(const Point& rPnt)
+{
+ if (bMarkingGluePoints && aDragStat.CheckMinMoved(rPnt)) {
+ HideMarkObjOrPoints(pDragWin);
+ aDragStat.NextMove(rPnt);
+ ShowMarkObjOrPoints(pDragWin);
+ }
+}
+
+BOOL SdrMarkView::EndMarkGluePoints()
+{
+ if (!HasMarkableGluePoints() || // Falls waerend des markierens ein Unmark oder so kam
+ !aDragStat.IsMinMoved())
+ {
+ BrkMarkGluePoints();
+ }
+ if (bMarkingGluePoints) {
+ HideMarkObjOrPoints(pDragWin);
+ bMarkingGluePoints=FALSE;
+ Rectangle aRect(aDragStat.GetStart(),aDragStat.GetNow());
+ aRect.Justify();
+ MarkGluePoints(&aRect,bUnmarking);
+ bUnmarking=FALSE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void SdrMarkView::BrkMarkGluePoints()
+{
+ if (bMarkingGluePoints) {
+ HideMarkObjOrPoints(pDragWin);
+ bMarkingGluePoints=FALSE;
+ bUnmarking=FALSE;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMarkView::DrawMarkObjOrPoints(OutputDevice* pOut) const
+{
+ if (bMarking || bMarkingPoints || bMarkingGluePoints) {
+ Point aPt1(aDragStat.GetStart());
+ Point aPt2(aDragStat.GetNow());
+ aAni.SetP1(aPt1);
+ aAni.SetP2(aPt2);
+ aAni.Invert(pOut);
+ }
+}
+
+void SdrMarkView::ShowMarkObjOrPoints(OutputDevice* pOut)
+{
+ if ((bMarking || bMarkingPoints || bMarkingGluePoints) && !aDragStat.IsShown()) {
+ DrawMarkObjOrPoints(pOut);
+ aDragStat.SetShown(TRUE);
+ aAni.Start();
+ }
+}
+
+void SdrMarkView::HideMarkObjOrPoints(OutputDevice* pOut)
+{
+ if ((bMarking || bMarkingPoints || bMarkingGluePoints) && aDragStat.IsShown()) {
+ aAni.Stop();
+ DrawMarkObjOrPoints(pOut);
+ aDragStat.SetShown(FALSE);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrMarkView::HasMarkableObj() const
+{
+ ULONG nCount=0;
+ ULONG nObjCnt=0;
+ USHORT nPvCnt=GetPageViewCount();
+ for (USHORT nPvNum=0; nPvNum<nPvCnt && nCount==0; nPvNum++) {
+ SdrPageView* pPV=GetPageViewPvNum(nPvNum);
+ SdrObjList* pOL=pPV->GetObjList();
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG nObjNum=0; nObjNum<nObjAnz && nCount==0; nObjNum++) {
+ SdrObject* pObj=pOL->GetObj(nObjNum);
+ if (IsObjMarkable(pObj,pPV)) {
+ nCount++;
+ }
+ }
+ }
+ return nCount!=0;
+}
+
+ULONG SdrMarkView::GetMarkableObjCount() const
+{
+ ULONG nCount=0;
+ ULONG nObjCnt=0;
+ USHORT nPvCnt=GetPageViewCount();
+ for (USHORT nPvNum=0; nPvNum<nPvCnt; nPvNum++) {
+ SdrPageView* pPV=GetPageViewPvNum(nPvNum);
+ SdrObjList* pOL=pPV->GetObjList();
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
+ SdrObject* pObj=pOL->GetObj(nObjNum);
+ if (IsObjMarkable(pObj,pPV)) {
+ nCount++;
+ }
+ }
+ }
+ return nCount;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//void SdrMarkView::DrawMarkHdl(OutputDevice* pOut, BOOL bNoRefHdl) const
+//{
+// if (bHdlHidden) return;
+//// if (IsSolidMarkHdl())
+// bNoRefHdl=FALSE; // geht leider erstmal nicht anders
+// BOOL bOnlyRefs=USHORT(bNoRefHdl)==2; HACK(nur die Ref-Hdls painten)
+// USHORT nWinAnz=GetWinCount();
+// USHORT nWinNum=0;
+// do {
+// OutputDevice* pO=pOut;
+// if (pO==NULL) {
+// pO=GetWin(nWinNum);
+// nWinNum++;
+// }
+// if (pO!=NULL) {
+// if (!bInsPolyPoint && !bNoRefHdl && !bOnlyRefs) {
+// aHdl.DrawAll(*pO);
+// } else {
+// ULONG nHdlAnz=aHdl.GetHdlCount();
+// for (ULONG nHdlNum=0; nHdlNum<nHdlAnz; nHdlNum++) {
+// SdrHdl* pHdl=aHdl.GetHdl(nHdlNum);
+// SdrHdlKind eKind=pHdl->GetKind();
+// USHORT nPtNum=pHdl->GetObjHdlNum();
+// const SdrObject* pObj=pHdl->GetObj();
+// if ((!bInsPolyPoint || nPtNum!=nInsPointNum || pObj==NULL || pObj!=pMarkedObj) &&
+// (!bNoRefHdl || (eKind!=HDL_REF1 && eKind!=HDL_REF2 && eKind!=HDL_MIRX))!=bOnlyRefs) {
+// pHdl->Draw(*pO);
+// }
+// }
+// }
+// }
+// } while (pOut==NULL && nWinNum<nWinAnz);
+//}
+
+void SdrMarkView::ImpShowMarkHdl(OutputDevice* pOut, const Region* pRegion, BOOL bNoRefHdl)
+{
+// if (IsSolidMarkHdl())
+ bNoRefHdl=FALSE; // geht leider erstmal nicht anders
+ if (!bHdlShown) {
+// if (aHdl.IsSolidHdl()) {
+// USHORT nAnz=pOut==NULL ? aWinList.GetCount() : 1;
+// for (USHORT i=0; i<nAnz; i++) {
+// USHORT nWinNum=pOut==NULL ? i : aWinList.Find(pOut);
+// if (nWinNum!=SDRVIEWWIN_NOTFOUND) {
+// if (aWinList[nWinNum].pVDev==NULL) {
+// aWinList[nWinNum].pVDev=new VirtualDevice;
+// }
+// aHdl.SaveBackground(*aWinList[nWinNum].pWin,*aWinList[nWinNum].pVDev,pRegion);
+// bSolidHdlBackgroundInvalid=FALSE;
+// }
+// }
+// }
+// DrawMarkHdl(pOut,bRefHdlShownOnly);
+ bRefHdlShownOnly=FALSE;
+ bHdlShown=TRUE;
+
+ // refresh IAOs
+// RefreshAllIAOManagers();
+ }
+}
+
+void SdrMarkView::ShowMarkHdl(OutputDevice* pOut, BOOL bNoRefHdl)
+{
+// if (IsSolidMarkHdl())
+ bNoRefHdl=FALSE; // geht leider erstmal nicht anders
+ ImpShowMarkHdl(pOut,NULL,bNoRefHdl);
+
+ // refresh IAOs
+ RefreshAllIAOManagers();
+}
+
+
+void SdrMarkView::HideMarkHdl(OutputDevice* pOut, BOOL bNoRefHdl)
+{
+// if (IsSolidMarkHdl())
+ bNoRefHdl=FALSE; // geht leider erstmal nicht anders
+ if (bHdlShown) {
+ if (!bHdlHidden) { // #37331#
+ // Optimierung geht nicht, weil diverse Handles trotz SolidHdl doch noch XOR gapainted werden
+// DrawMarkHdl(pOut,bNoRefHdl);
+// if (aHdl.IsSolidHdl()) {
+// BOOL bInvalidate=IsMarkHdlBackgroundInvalid();
+// USHORT nAnz=pOut==NULL ? aWinList.GetCount() : 1;
+// for (USHORT i=0; i<nAnz; i++) {
+// USHORT nWinNum=pOut==NULL ? i : aWinList.Find(pOut);
+// if (nWinNum!=SDRVIEWWIN_NOTFOUND) {
+// SdrViewWinRec& rWRec=GetWinRec(nWinNum);
+// if (rWRec.pVDev!=NULL) {
+// OutputDevice* pOut=rWRec.pWin;
+// if (bInvalidate) { // fuer den Writer in einigen Faellen Invalidieren
+// if (pOut->GetOutDevType()==OUTDEV_WINDOW) {
+// aHdl.Invalidate(*(Window*)pOut);
+// }
+// } else {
+// if (bNoRefHdl) {
+// ULONG nHdlAnz=aHdl.GetHdlCount();
+// for (ULONG nHdlNum=0; nHdlNum<nHdlAnz; nHdlNum++) {
+// SdrHdl* pHdl=aHdl.GetHdl(nHdlNum);
+// SdrHdlKind eKind=pHdl->GetKind();
+// USHORT nPtNum=pHdl->GetObjHdlNum();
+// if (eKind!=HDL_REF1 && eKind!=HDL_REF2 && eKind!=HDL_MIRX) {
+// aHdl.RestoreBackground(*pOut,*rWRec.pVDev,(USHORT)nHdlNum);
+// }
+// }
+// } else {
+// aHdl.RestoreBackground(*pOut,*rWRec.pVDev);
+// }
+// }
+// }
+// }
+// }
+// }
+ }
+ bRefHdlShownOnly=bNoRefHdl;
+ bHdlShown=FALSE;
+ }
+// bSolidHdlBackgroundInvalid=FALSE;
+
+ // refresh IAOs
+// RefreshAllIAOManagers();
+}
+
+void SdrMarkView::SetMarkHdlHidden(BOOL bOn)
+{
+ if(bOn != bHdlHidden)
+ {
+ // one hide in which the old flag value is still set
+ HideMarkHdl(NULL);
+
+ // remember new value
+ bHdlHidden = bOn;
+
+ // create all IAOHandles new (depends on IsMarkHdlHidden())
+ AdjustMarkHdl(TRUE);
+
+ // show new state
+ RefreshAllIAOManagers();
+
+// BOOL bHdlShownMerk=bHdlShown;
+// bHdlHidden=FALSE;
+// if (bOn) { // Modus anschalten, also Handles ggf aus.
+// if (bHdlShown) HideMarkHdl(NULL);
+// } else { // Ansonsten Modus ausschalten, also Handles ggf. einblenden
+// if (bHdlShown) { bHdlShown=FALSE; ShowMarkHdl(NULL); }
+// }
+// bHdlShown=bHdlShownMerk;
+// bHdlHidden=bOn;
+ }
+}
+
+BOOL SdrMarkView::ImpIsFrameHandles() const
+{
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ BOOL bFrmHdl=nMarkAnz>nFrameHandlesLimit || bForceFrameHandles;
+ BOOL bStdDrag=eDragMode==SDRDRAG_MOVE;
+ if (nMarkAnz==1 && bStdDrag && bFrmHdl) {
+ const SdrObject* pObj=aMark.GetMark(0)->GetObj();
+ if (pObj->GetObjInventor()==SdrInventor) {
+ UINT16 nIdent=pObj->GetObjIdentifier();
+ if (nIdent==OBJ_LINE || nIdent==OBJ_EDGE || nIdent==OBJ_CAPTION || nIdent==OBJ_MEASURE) {
+ bFrmHdl=FALSE;
+ }
+ }
+ }
+ if (!bStdDrag && !bFrmHdl) {
+ // Grundsaetzlich erstmal alle anderen Dragmodi nur mit FrameHandles
+ bFrmHdl=TRUE;
+ if (eDragMode==SDRDRAG_ROTATE) {
+ // bei Rotate ObjOwn-Drag, wenn mind. 1 PolyObj
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz && bFrmHdl; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrObject* pObj=pM->GetObj();
+ bFrmHdl=!pObj->IsPolyObj();
+ }
+ }
+ }
+ if (!bFrmHdl) {
+ // FrameHandles, wenn wenigstens 1 Obj kein SpecialDrag kann
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz && !bFrmHdl; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrObject* pObj=pM->GetObj();
+ bFrmHdl=!pObj->HasSpecialDrag();
+ }
+ }
+ return bFrmHdl;
+}
+
+void SdrMarkView::SetMarkHandles()
+{
+ aHdl.Clear();
+ aHdl.SetRotateShear(eDragMode==SDRDRAG_ROTATE);
+ aHdl.SetDistortShear(eDragMode==SDRDRAG_SHEAR);
+ pMarkedObj=NULL;
+ pMarkedPV=NULL;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ BOOL bStdDrag=eDragMode==SDRDRAG_MOVE;
+ if (nMarkAnz==1) {
+ pMarkedObj=aMark.GetMark(0)->GetObj();
+ }
+ BOOL bFrmHdl=ImpIsFrameHandles();
+ if (nMarkAnz>0) {
+ pMarkedPV=aMark.GetMark(0)->GetPageView();
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz && (pMarkedPV!=NULL || !bFrmHdl); nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ if (pMarkedPV!=pM->GetPageView()) {
+ pMarkedPV=NULL;
+ }
+ }
+ }
+ if (bFrmHdl) {
+ Rectangle aRect(GetMarkedObjRect());
+ if (!aRect.IsEmpty()) { // sonst nix gefunden
+ BOOL bWdt0=aRect.Left()==aRect.Right();
+ BOOL bHgt0=aRect.Top()==aRect.Bottom();
+ if (bWdt0 && bHgt0) {
+ aHdl.AddHdl(new SdrHdl(aRect.TopLeft(),HDL_UPLFT));
+ } else if (!bStdDrag && (bWdt0 || bHgt0)) {
+ aHdl.AddHdl(new SdrHdl(aRect.TopLeft() ,HDL_UPLFT));
+ aHdl.AddHdl(new SdrHdl(aRect.BottomRight(),HDL_LWRGT));
+ } else {
+ if (!bWdt0 && !bHgt0) aHdl.AddHdl(new SdrHdl(aRect.TopLeft() ,HDL_UPLFT));
+ if ( !bHgt0) aHdl.AddHdl(new SdrHdl(aRect.TopCenter() ,HDL_UPPER));
+ if (!bWdt0 && !bHgt0) aHdl.AddHdl(new SdrHdl(aRect.TopRight() ,HDL_UPRGT));
+ if (!bWdt0 ) aHdl.AddHdl(new SdrHdl(aRect.LeftCenter() ,HDL_LEFT ));
+ if (!bWdt0 ) aHdl.AddHdl(new SdrHdl(aRect.RightCenter() ,HDL_RIGHT));
+ if (!bWdt0 && !bHgt0) aHdl.AddHdl(new SdrHdl(aRect.BottomLeft() ,HDL_LWLFT));
+ if ( !bHgt0) aHdl.AddHdl(new SdrHdl(aRect.BottomCenter(),HDL_LOWER));
+ if (!bWdt0 && !bHgt0) aHdl.AddHdl(new SdrHdl(aRect.BottomRight() ,HDL_LWRGT));
+ }
+ }
+ } else {
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrObject* pObj=pM->GetObj();
+ SdrPageView* pPV=pM->GetPageView();
+ ULONG nSiz0=aHdl.GetHdlCount();
+ pObj->AddToHdlList(aHdl);
+ ULONG nSiz1=aHdl.GetHdlCount();
+ BOOL bPoly=pObj->IsPolyObj();
+ const SdrUShortCont* pMrkPnts=pM->GetMarkedPoints();
+ for (ULONG i=nSiz0; i<nSiz1; i++) {
+ SdrHdl* pHdl=aHdl.GetHdl(i);
+ pHdl->SetObj(pObj);
+ pHdl->SetPageView(pPV);
+ pHdl->SetObjHdlNum(USHORT(i-nSiz0));
+ if (bPoly) {
+ BOOL bSelected=pMrkPnts!=NULL && pMrkPnts->Exist(USHORT(i-nSiz0));
+ pHdl->SetSelected(bSelected);
+ BOOL bPlus=bPlusHdlAlways;
+ if (bPlusHdlAlways || bSelected) {
+ USHORT nPlusAnz=pObj->GetPlusHdlCount(*pHdl);
+ for (USHORT nPlusNum=0; nPlusNum<nPlusAnz; nPlusNum++) {
+ SdrHdl* pPlusHdl=pObj->GetPlusHdl(*pHdl,nPlusNum);
+ if (pPlusHdl!=NULL) {
+ pPlusHdl->SetObj(pObj);
+ pPlusHdl->SetPageView(pPV);
+ pPlusHdl->SetPlusHdl(TRUE);
+ aHdl.AddHdl(pPlusHdl);
+ }
+ }
+ }
+ }
+ }
+ } // for nMarkNum
+ } // if bFrmHdl else
+ // GluePoint-Handles
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrObject* pObj=pM->GetObj();
+ SdrPageView* pPV=pM->GetPageView();
+ const SdrUShortCont* pMrkGlue=pM->GetMarkedGluePoints();
+ if (pMrkGlue!=NULL) {
+ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+ if (pGPL!=NULL) {
+ USHORT nGlueAnz=pGPL->GetCount();
+ USHORT nAnz=(USHORT)pMrkGlue->GetCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ USHORT nId=pMrkGlue->GetObject(nNum);
+ USHORT nNum=pGPL->FindGluePoint(nId);
+ if (nNum!=SDRGLUEPOINT_NOTFOUND) {
+ const SdrGluePoint& rGP=(*pGPL)[nNum];
+ Point aPos(rGP.GetAbsolutePos(*pObj));
+ SdrHdl* pGlueHdl=new SdrHdl(aPos,HDL_GLUE);
+ pGlueHdl->SetObj(pObj);
+ pGlueHdl->SetPageView(pPV);
+ pGlueHdl->SetObjHdlNum(nId);
+ aHdl.AddHdl(pGlueHdl);
+ }
+ }
+ }
+ }
+ }
+
+ // Drehpunkt/Spiegelachse
+ AddDragModeHdl(eDragMode);
+
+ // add custom handles (used by other apps, e.g. AnchorPos)
+ AddCustomHdl();
+
+ // sort handles
+ aHdl.Sort();
+}
+
+void SdrMarkView::AddCustomHdl()
+{
+ // add custom handles (used by other apps, e.g. AnchorPos)
+}
+
+void SdrMarkView::SetDragMode(SdrDragMode eMode)
+{
+ SdrDragMode eMode0=eDragMode;
+ eDragMode=eMode;
+ if (eDragMode==SDRDRAG_RESIZE) eDragMode=SDRDRAG_MOVE;
+ if (eDragMode!=eMode0) {
+ BOOL bVis=IsMarkHdlShown();
+ if (bVis) HideMarkHdl(NULL);
+ ForceRefToMarked();
+ SetMarkHandles();
+ if (bVis) ShowMarkHdl(NULL);
+ {
+ if (HasMarkedObj()) MarkListHasChanged();
+ }
+ }
+}
+
+void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
+{
+ switch(eMode)
+ {
+ case SDRDRAG_ROTATE:
+ {
+ // add rotation center
+ SdrHdl* pHdl = new SdrHdl(aRef1, HDL_REF1);
+
+ aHdl.AddHdl(pHdl);
+
+ break;
+ }
+ case SDRDRAG_MIRROR:
+ {
+ // add mirror axis
+ SdrHdl* pHdl3 = new SdrHdl(aRef2, HDL_REF2);
+ SdrHdl* pHdl2 = new SdrHdl(aRef1, HDL_REF1);
+ SdrHdl* pHdl1 = new SdrHdlLine(*pHdl2, *pHdl3, HDL_MIRX);
+
+ pHdl1->SetObjHdlNum(1); // fuer Sortierung
+ pHdl2->SetObjHdlNum(2); // fuer Sortierung
+ pHdl3->SetObjHdlNum(3); // fuer Sortierung
+
+ aHdl.AddHdl(pHdl1); // Linie als erstes, damit als letztes im HitTest
+ aHdl.AddHdl(pHdl2);
+ aHdl.AddHdl(pHdl3);
+
+ break;
+ }
+ case SDRDRAG_TRANSPARENCE:
+ {
+ // add interactive transparence handle
+ UINT32 nMarkAnz = aMark.GetMarkCount();
+ if(nMarkAnz == 1)
+ {
+ SdrObject* pObj = aMark.GetMark(0)->GetObj();
+ SdrModel* pModel = GetModel();
+ SfxItemSet aSet(pModel->GetItemPool(), XATTR_FILLFLOATTRANSPARENCE, XATTR_FILLFLOATTRANSPARENCE, 0, 0);
+ pObj->TakeAttributes(aSet, TRUE, FALSE);
+ const SfxPoolItem* pPoolItem;
+ SfxItemState eState = aSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, FALSE, &pPoolItem);
+
+ if(SFX_ITEM_SET == eState)
+ {
+ // activate if not yet done
+ if(!((XFillFloatTransparenceItem*)pPoolItem)->IsEnabled())
+ {
+ XFillFloatTransparenceItem aNewItem(*((XFillFloatTransparenceItem*)pPoolItem));
+ XGradient aGrad = aNewItem.GetValue();
+
+ aNewItem.SetEnabled(TRUE);
+ aGrad.SetStartIntens(100);
+ aGrad.SetEndIntens(100);
+ aNewItem.SetValue(aGrad);
+ aSet.Put(aNewItem);
+
+ // add undo to allow user to take back this step
+ pModel->BegUndo(SVX_RESSTR(SIP_XA_FILLTRANSPARENCE));
+ pModel->AddUndo(new SdrUndoAttrObj(*pObj));
+ pModel->EndUndo();
+
+ pObj->SetAttributes(aSet, FALSE);
+ }
+
+ // set values and transform to vector set
+ GradTransformer aGradTransformer;
+ GradTransVector aGradTransVector;
+ GradTransGradient aGradTransGradient;
+
+ aGradTransGradient.aGradient = ((XFillFloatTransparenceItem&)aSet.Get(XATTR_FILLFLOATTRANSPARENCE)).GetValue();
+ aGradTransformer.GradToVec(aGradTransGradient, aGradTransVector, pObj);
+
+ // build handles
+ SdrHdlColor* pColHdl1 = new SdrHdlColor(aGradTransVector.aPos1, aGradTransVector.aCol1, SDR_HANDLE_COLOR_SIZE_NORMAL, TRUE);
+ SdrHdlColor* pColHdl2 = new SdrHdlColor(aGradTransVector.aPos2, aGradTransVector.aCol2, SDR_HANDLE_COLOR_SIZE_NORMAL, TRUE);
+ SdrHdlGradient* pGradHdl = new SdrHdlGradient(aGradTransVector.aPos1, aGradTransVector.aPos2, FALSE);
+ DBG_ASSERT(pColHdl1 && pColHdl2 && pGradHdl, "Got not all necessary handles!!");
+
+ // link them
+ pGradHdl->SetColorHandles(pColHdl1, pColHdl2);
+ pGradHdl->SetObj(pObj);
+ pColHdl1->SetColorChangeHdl(LINK(pGradHdl, SdrHdlGradient, ColorChangeHdl));
+ pColHdl2->SetColorChangeHdl(LINK(pGradHdl, SdrHdlGradient, ColorChangeHdl));
+
+ // insert them
+ aHdl.AddHdl(pColHdl1);
+ aHdl.AddHdl(pColHdl2);
+ aHdl.AddHdl(pGradHdl);
+ }
+ }
+ break;
+ }
+ case SDRDRAG_GRADIENT:
+ {
+ // add interactive gradient handle
+ UINT32 nMarkAnz = aMark.GetMarkCount();
+ if(nMarkAnz == 1)
+ {
+ SdrObject* pObj = aMark.GetMark(0)->GetObj();
+ SfxItemSet aSet(GetModel()->GetItemPool());
+ pObj->TakeAttributes(aSet, FALSE, FALSE);
+ XFillStyle eFillStyle = ((XFillStyleItem&)(aSet.Get(XATTR_FILLSTYLE))).GetValue();
+
+ if(eFillStyle == XFILL_GRADIENT)
+ {
+ // set values and transform to vector set
+ GradTransformer aGradTransformer;
+ GradTransVector aGradTransVector;
+ GradTransGradient aGradTransGradient;
+ Size aHdlSize(15, 15);
+
+ aGradTransGradient.aGradient = ((XFillGradientItem&)aSet.Get(XATTR_FILLGRADIENT)).GetValue();
+ aGradTransformer.GradToVec(aGradTransGradient, aGradTransVector, pObj);
+
+ // build handles
+ SdrHdlColor* pColHdl1 = new SdrHdlColor(aGradTransVector.aPos1, aGradTransVector.aCol1, aHdlSize, FALSE);
+ SdrHdlColor* pColHdl2 = new SdrHdlColor(aGradTransVector.aPos2, aGradTransVector.aCol2, aHdlSize, FALSE);
+ SdrHdlGradient* pGradHdl = new SdrHdlGradient(aGradTransVector.aPos1, aGradTransVector.aPos2, TRUE);
+ DBG_ASSERT(pColHdl1 && pColHdl2 && pGradHdl, "Got not all necessary handles!!");
+
+ // link them
+ pGradHdl->SetColorHandles(pColHdl1, pColHdl2);
+ pGradHdl->SetObj(pObj);
+ pColHdl1->SetColorChangeHdl(LINK(pGradHdl, SdrHdlGradient, ColorChangeHdl));
+ pColHdl2->SetColorChangeHdl(LINK(pGradHdl, SdrHdlGradient, ColorChangeHdl));
+
+ // insert them
+ aHdl.AddHdl(pColHdl1);
+ aHdl.AddHdl(pColHdl2);
+ aHdl.AddHdl(pGradHdl);
+ }
+ }
+ break;
+ }
+ }
+}
+
+void SdrMarkView::ForceRefToMarked()
+{
+ switch(eDragMode)
+ {
+ case SDRDRAG_ROTATE:
+ {
+ Rectangle aR(GetMarkedObjRect());
+ aRef1 = aR.Center();
+
+ break;
+ }
+
+ case SDRDRAG_MIRROR:
+ {
+ // Erstmal die laenge der Spiegelachsenlinie berechnen
+ long nOutMin=0;
+ long nOutMax=0;
+ long nMinLen=0;
+ long nObjDst=0;
+ long nOutHgt=0;
+ OutputDevice* pOut=GetWin(0);
+ if (pOut!=NULL) {
+ // Mindestlaenge 50 Pixel
+ nMinLen=pOut->PixelToLogic(Size(0,50)).Height();
+ // 20 Pixel fuer RefPt-Abstand vom Obj
+ nObjDst=pOut->PixelToLogic(Size(0,20)).Height();
+ // MinY/MaxY
+ // Abstand zum Rand = Mindestlaenge = 10 Pixel
+ long nDst=pOut->PixelToLogic(Size(0,10)).Height();
+ nOutMin=-pOut->GetMapMode().GetOrigin().Y();
+ nOutMax=pOut->GetOutputSize().Height()-1+nOutMin;
+ nOutMin+=nDst;
+ nOutMax-=nDst;
+ // Absolute Mindestlaenge jedoch 10 Pixel
+ if (nOutMax-nOutMin<nDst) {
+ nOutMin+=nOutMax+1;
+ nOutMin/=2;
+ nOutMin-=(nDst+1)/2;
+ nOutMax=nOutMin+nDst;
+ }
+ nOutHgt=nOutMax-nOutMin;
+ // Sonst Mindestlaenge = 1/4 OutHgt
+ long nTemp=nOutHgt/4;
+ if (nTemp>nMinLen) nMinLen=nTemp;
+ }
+
+ Rectangle aR(GetMarkedObjBoundRect());
+ Point aCenter(aR.Center());
+ long nMarkHgt=aR.GetHeight()-1;
+ long nHgt=nMarkHgt+nObjDst*2; // 20 Pixel obej und unten ueberstehend
+ if (nHgt<nMinLen) nHgt=nMinLen; // Mindestlaenge 50 Pixel bzw. 1/4 OutHgt
+
+ long nY1=aCenter.Y()-(nHgt+1)/2;
+ long nY2=nY1+nHgt;
+
+ if (pOut!=NULL && nMinLen>nOutHgt) nMinLen=nOutHgt; // evtl. noch etwas verkuerzen
+
+ if (pOut!=NULL) { // nun vollstaendig in den sichtbaren Bereich schieben
+ if (nY1<nOutMin) {
+ nY1=nOutMin;
+ if (nY2<nY1+nMinLen) nY2=nY1+nMinLen;
+ }
+ if (nY2>nOutMax) {
+ nY2=nOutMax;
+ if (nY1>nY2-nMinLen) nY1=nY2-nMinLen;
+ }
+ }
+
+ aRef1.X()=aCenter.X();
+ aRef1.Y()=nY1;
+ aRef2.X()=aCenter.X();
+ aRef2.Y()=nY2;
+
+ break;
+ }
+
+ case SDRDRAG_TRANSPARENCE:
+ case SDRDRAG_GRADIENT:
+ {
+ Rectangle aRect(GetMarkedObjBoundRect());
+ aRef1 = aRect.TopLeft();
+ aRef2 = aRect.BottomRight();
+ break;
+ }
+ }
+}
+
+void SdrMarkView::SetRef1(const Point& rPt)
+{
+ if(eDragMode == SDRDRAG_ROTATE || eDragMode == SDRDRAG_MIRROR)
+ {
+ aRef1 = rPt;
+ SdrHdl* pH = aHdl.GetHdl(HDL_REF1);
+ if(pH)
+ pH->SetPos(rPt);
+ ShowMarkHdl(NULL);
+ }
+}
+
+void SdrMarkView::SetRef2(const Point& rPt)
+{
+ if(eDragMode == SDRDRAG_MIRROR)
+ {
+ aRef2 = rPt;
+ SdrHdl* pH = aHdl.GetHdl(HDL_REF2);
+ if(pH)
+ pH->SetPos(rPt);
+ ShowMarkHdl(NULL);
+ }
+}
+
+void SdrMarkView::CheckMarked()
+{
+ for (ULONG nm=aMark.GetMarkCount(); nm>0;) {
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ SdrPageView* pPV=pM->GetPageView();
+ SdrLayerID nLay=pObj->GetLayer();
+ BOOL bRaus=!pObj->IsInserted(); // Obj geloescht?
+ if (!pObj->Is3DObj()) {
+ bRaus=bRaus || pObj->GetPage()!=pPV->GetPage(); // Obj ploetzlich in anderer Page oder Group
+ }
+ bRaus=bRaus || pPV->GetLockedLayers().IsSet(nLay) || // Layer gesperrt?
+ !pPV->GetVisibleLayers().IsSet(nLay); // Layer nicht sichtbar?
+ if (!bRaus) {
+ // Joe am 9.3.1997: Gruppierte Objekten koennen nun auch
+ // markiert werden. Nach EnterGroup muessen aber die Objekte
+ // der hoeheren Ebene deselektiert werden.
+ const SdrObjList* pOOL=pObj->GetObjList();
+ const SdrObjList* pVOL=pPV->GetObjList();
+ while (pOOL!=NULL && pOOL!=pVOL) {
+ pOOL=pOOL->GetUpList();
+ }
+ bRaus=pOOL!=pVOL;
+ }
+
+ if (bRaus) {
+ aMark.DeleteMarkNum(nm);
+ } else {
+ if (!IsGluePointEditMode()) { // Markierte GluePoints nur im GlueEditMode
+ SdrUShortCont* pPts=pM->GetMarkedGluePoints();
+ if (pPts!=NULL && pPts->GetCount()!=0) {
+ pPts->Clear();
+ }
+ }
+ }
+ }
+
+ // #67670# When this leads to a change, MarkListHasChanged()
+ // had been called before. Calling MarkListHasChanged() again
+ // could lead to problems in sfx, see BUG description.
+ // if(bChg)
+ // MarkListHasChanged();
+}
+
+// for SW and their rearranged painting; this method forces the
+// actual IAO-Handles to throw away saved contents
+void SdrMarkView::ForceInvalidateMarkHandles()
+{
+ // at the moment, do this using SetMarkHandles()
+ SetMarkHandles();
+}
+
+void SdrMarkView::SetMarkRects()
+{
+ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ pPV->SetHasMarkedObj(aMark.TakeSnapRect(pPV,pPV->MarkSnap()));
+ aMark.TakeBoundRect(pPV,pPV->MarkBound());
+ }
+}
+
+void SdrMarkView::SetFrameHandles(BOOL bOn)
+{
+ if (bOn!=bForceFrameHandles) {
+ BOOL bOld=ImpIsFrameHandles();
+ bForceFrameHandles=bOn;
+ BOOL bNew=ImpIsFrameHandles();
+ if (bNew!=bOld) {
+ AdjustMarkHdl(TRUE);
+ MarkListHasChanged();
+ }
+ }
+}
+
+void SdrMarkView::SetEditMode(SdrViewEditMode eMode)
+{
+ if (eMode!=eEditMode) {
+ BOOL bGlue0=eEditMode==SDREDITMODE_GLUEPOINTEDIT;
+ BOOL bEdge0=((SdrCreateView*)this)->IsEdgeTool();
+ eEditMode0=eEditMode;
+ eEditMode=eMode;
+ BOOL bGlue1=eEditMode==SDREDITMODE_GLUEPOINTEDIT;
+ BOOL bEdge1=((SdrCreateView*)this)->IsEdgeTool();
+ // etwas Aufwand um Flackern zu verhindern beim Umschalten
+ // zwischen GlueEdit und EdgeTool
+ if (bGlue1 && !bGlue0) ImpSetGlueVisible2(bGlue1);
+ if (bEdge1!=bEdge0) ImpSetGlueVisible3(bEdge1);
+ if (!bGlue1 && bGlue0) ImpSetGlueVisible2(bGlue1);
+ if (bGlue0 && !bGlue1) UnmarkAllGluePoints();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrMarkView::IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const
+{
+ if (pObj)
+ {
+ if (pObj->IsMarkProtect() ||
+ (!bDesignMode && pObj->IsUnoObj()))
+ {
+ // Objekt nicht selektierbar oder
+ // SdrUnoObj nicht im DesignMode
+ return FALSE;
+ }
+ }
+ return pPV!=NULL ? pPV->IsObjMarkable(pObj) : TRUE;
+}
+
+BOOL SdrMarkView::IsMarkedObjHit(const Point& rPnt, short nTol) const
+{
+ BOOL bRet=FALSE;
+ nTol=ImpGetHitTolLogic(nTol,NULL);
+ Point aPt(rPnt);
+ for (ULONG nm=0; nm<aMark.GetMarkCount() && !bRet; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ bRet=ImpIsObjHit(aPt,USHORT(nTol),pM->GetObj(),pM->GetPageView(),0);
+ }
+ return bRet;
+}
+
+SdrHdl* SdrMarkView::PickHandle(const Point& rPnt, const OutputDevice& rOut, ULONG nOptions, SdrHdl* pHdl0) const
+{
+ if (&rOut==NULL) return FALSE;
+ if (bSomeObjChgdFlag) { // ggf. Handles neu berechnen lassen!
+ FlushComeBackTimer();
+ }
+ BOOL bBack=(nOptions & SDRSEARCH_BACKWARD) !=0;
+ BOOL bNext=(nOptions & SDRSEARCH_NEXT) !=0;
+ Point aPt(rPnt);
+ return aHdl.HitTest(aPt,rOut,bBack,bNext,pHdl0);
+}
+
+BOOL SdrMarkView::MarkObj(const Point& rPnt, short nTol, BOOL bToggle, BOOL bDeep)
+{
+ SdrObject* pObj;
+ SdrPageView* pPV;
+ nTol=ImpGetHitTolLogic(nTol,NULL);
+ ULONG nOptions=SDRSEARCH_PICKMARKABLE;
+ if (bDeep) nOptions=nOptions|SDRSEARCH_DEEP;
+ BOOL bRet=PickObj(rPnt,(USHORT)nTol,pObj,pPV,nOptions);
+ if (bRet) {
+ BOOL bUnmark=bToggle && IsObjMarked(pObj);
+ MarkObj(pObj,pPV,bUnmark);
+ }
+ return bRet;
+}
+
+BOOL SdrMarkView::MarkNextObj(BOOL bPrev)
+{
+ USHORT nPvAnz=GetPageViewCount();
+ if (nPvAnz==0) return FALSE;
+ USHORT nMaxPV=USHORT(nPvAnz-1);
+ aMark.ForceSort();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ ULONG nChgMarkNum=0xFFFFFFFF; // Nummer des zu ersetzenden MarkEntries
+ USHORT nSearchPvNum=bPrev ? 0 : nMaxPV;
+ ULONG nSearchObjNum=bPrev ? 0 : 0xFFFFFFFF;
+ if (nMarkAnz!=0) {
+ nChgMarkNum=bPrev ? 0 : ULONG(nMarkAnz-1);
+ SdrMark* pM=aMark.GetMark(nChgMarkNum);
+ nSearchObjNum=pM->GetObj()->GetOrdNum();
+ nSearchPvNum=GetPageViewNum(pM->GetPageView());
+ }
+ SdrObject* pMarkObj=NULL;
+ SdrPageView* pMarkPV=NULL;
+ while (pMarkObj==NULL) {
+ SdrPageView* pSearchPV=GetPageViewPvNum(nSearchPvNum);
+ SdrObjList* pSearchObjList=pSearchPV->GetObjList();
+ ULONG nObjAnz=pSearchObjList->GetObjCount();
+ if (nObjAnz!=0) {
+ if (nSearchObjNum>nObjAnz) nSearchObjNum=nObjAnz;
+ while (pMarkObj==NULL && ((!bPrev && nSearchObjNum>0) || (bPrev && nSearchObjNum<nObjAnz))) {
+ if (!bPrev) nSearchObjNum--;
+ SdrObject* pSearchObj=pSearchObjList->GetObj(nSearchObjNum);
+ if (IsObjMarkable(pSearchObj,pSearchPV)) {
+ if (aMark.FindObject(pSearchObj)==CONTAINER_ENTRY_NOTFOUND) {
+ pMarkObj=pSearchObj;
+ pMarkPV=pSearchPV;
+ }
+ }
+ if (bPrev) nSearchObjNum++;
+ }
+ }
+ if (pMarkObj==NULL) {
+ if (bPrev) {
+ if (nSearchPvNum>=nMaxPV) return FALSE;
+ nSearchPvNum++;
+ nSearchObjNum=0;
+ } else {
+ if (nSearchPvNum==0) return FALSE;
+ nSearchPvNum--;
+ nSearchObjNum=0xFFFFFFFF;
+ }
+ }
+ }
+ if (nChgMarkNum!=0xFFFFFFFF) aMark.DeleteMark(nChgMarkNum);
+ MarkObj(pMarkObj,pMarkPV); // ruft auch MarkListHasChanged(), AdjustMarkHdl()
+ return TRUE;
+}
+
+BOOL SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, BOOL bPrev)
+{
+ aMark.ForceSort();
+ nTol=ImpGetHitTolLogic(nTol,NULL);
+ Point aPt(rPnt);
+ SdrMark* pTopMarkHit=NULL;
+ SdrMark* pBtmMarkHit=NULL;
+ ULONG nTopMarkHit=0;
+ ULONG nBtmMarkHit=0;
+ // oberstes der markierten Objekte suchen, das von rPnt getroffen wird
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ ULONG nm=0;
+ for (nm=nMarkAnz; nm>0 && pTopMarkHit==NULL;) {
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ if (ImpIsObjHit(aPt,USHORT(nTol),pM->GetObj(),pM->GetPageView(),0)) {
+ pTopMarkHit=pM;
+ nTopMarkHit=nm;
+ }
+ }
+ // Nichts gefunden, dann ganz normal ein Obj markieren.
+ if (pTopMarkHit==NULL) return MarkObj(rPnt,USHORT(nTol),FALSE);
+
+ SdrObject* pTopObjHit=pTopMarkHit->GetObj();
+ SdrObjList* pObjList=pTopObjHit->GetObjList();
+ SdrPageView* pPV=pTopMarkHit->GetPageView();
+ // unterstes der markierten Objekte suchen, das von rPnt getroffen wird
+ // und auf der gleichen PageView liegt wie pTopMarkHit
+ for (nm=0; nm<nMarkAnz && pBtmMarkHit==NULL; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrPageView* pPV2=pM->GetPageView();
+ if (pPV2==pPV && ImpIsObjHit(aPt,USHORT(nTol),pM->GetObj(),pPV2,0)) {
+ pBtmMarkHit=pM;
+ nBtmMarkHit=nm;
+ }
+ }
+ if (pBtmMarkHit==NULL) { pBtmMarkHit=pTopMarkHit; nBtmMarkHit=nTopMarkHit; }
+ SdrObject* pBtmObjHit=pBtmMarkHit->GetObj();
+
+ ULONG nObjAnz=pObjList->GetObjCount();
+ ULONG nSearchBeg=bPrev ? pBtmObjHit->GetOrdNum()+1 : pTopObjHit->GetOrdNum();
+ ULONG no=nSearchBeg;
+ SdrObject* pFndObj=NULL;
+ SdrObject* pAktObj=NULL;
+ while (pFndObj==NULL && ((!bPrev && no>0) || (bPrev && no<nObjAnz))) {
+ if (!bPrev) no--;
+ SdrObject* pObj=pObjList->GetObj(no);
+ if (ImpIsObjHit(aPt,USHORT(nTol),pObj,pPV,SDRSEARCH_TESTMARKABLE)) {
+ if (aMark.FindObject(pObj)==CONTAINER_ENTRY_NOTFOUND) {
+ pFndObj=pObj;
+ } else {
+ // hier wg. Performance ggf. noch no auf Top bzw. auf Btm stellen
+ }
+ }
+ if (bPrev) no++;
+ }
+ if (pFndObj!=NULL) {
+ aMark.DeleteMark(bPrev?nBtmMarkHit:nTopMarkHit);
+ aMark.InsertEntry(SdrMark(pFndObj,pPV));
+ MarkListHasChanged();
+ AdjustMarkHdl(TRUE);
+ }
+ return pFndObj!=NULL;
+}
+
+BOOL SdrMarkView::MarkObj(const Rectangle& rRect, BOOL bUnmark)
+{
+ BOOL bFnd=FALSE;
+ Rectangle aR(rRect);
+ SdrObject* pObj;
+ SdrObjList* pObjList;
+ BrkAction();
+ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ pObjList=pPV->GetObjList();
+ Rectangle aFrm1(aR);
+ aFrm1-=pPV->GetOffset(); // Selektionsrahmen auf die PageView transformieren
+ ULONG nObjAnz=pObjList->GetObjCount();
+ for (ULONG nO=0; nO<nObjAnz; nO++) {
+ pObj=pObjList->GetObj(nO);
+ Rectangle aRect(pObj->GetBoundRect());
+ if (aFrm1.IsInside(aRect)) {
+ if (!bUnmark) {
+ if (IsObjMarkable(pObj,pPV)) {
+ aMark.InsertEntry(SdrMark(pObj,pPV));
+ bFnd=TRUE;
+ }
+ } else {
+ ULONG nPos=aMark.FindObject(pObj);
+ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
+ aMark.DeleteMark(nPos);
+ bFnd=TRUE;
+ }
+ }
+ }
+ }
+ }
+ if (bFnd) {
+ aMark.ForceSort();
+ MarkListHasChanged();
+ AdjustMarkHdl(TRUE);
+ ShowMarkHdl(NULL);
+ }
+ return bFnd;
+}
+
+void SdrMarkView::MarkObj(SdrObject* pObj, SdrPageView* pPV, BOOL bUnmark, BOOL bImpNoSetMarkHdl)
+{
+ if (pObj!=NULL && pPV!=NULL && IsObjMarkable(pObj, pPV)) {
+ BrkAction();
+ if (!bUnmark) {
+ aMark.InsertEntry(SdrMark(pObj,pPV));
+ } else {
+ ULONG nPos=aMark.FindObject(pObj);
+ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
+ aMark.DeleteMark(nPos);
+ }
+ }
+ if (!bImpNoSetMarkHdl) {
+ MarkListHasChanged();
+ AdjustMarkHdl(TRUE);
+// if (!IsSolidMarkHdl() || !bSomeObjChgdFlag) {
+ if (!bSomeObjChgdFlag) {
+ // ShowMarkHdl kommt sonst mit dem AfterPaintTimer
+ ShowMarkHdl(NULL);
+ }
+ }
+ }
+}
+
+BOOL SdrMarkView::IsObjMarked(SdrObject* pObj) const
+{
+ // nicht so ganz die feine Art: Da FindObject() nicht const ist
+ // muss ich mich hier auf non-const casten.
+ ULONG nPos=((SdrMarkView*)this)->aMark.FindObject(pObj);
+ return nPos!=CONTAINER_ENTRY_NOTFOUND;
+}
+
+USHORT SdrMarkView::GetMarkHdlSizePixel() const
+{
+ return aHdl.GetHdlSize()*2+1;
+}
+
+void SdrMarkView::SetSolidMarkHdl(BOOL bOn)
+{
+ if (bOn!=aHdl.IsFineHdl()) {
+ BOOL bMerk=IsMarkHdlShown();
+ if (bMerk) HideMarkHdl(NULL);
+ aHdl.SetFineHdl(bOn);
+ if (bMerk) ShowMarkHdl(NULL);
+ }
+}
+
+void SdrMarkView::SetMarkHdlSizePixel(USHORT nSiz)
+{
+ if (nSiz<3) nSiz=3;
+ nSiz/=2;
+ if (nSiz!=aHdl.GetHdlSize()) {
+ BOOL bMerk=IsMarkHdlShown();
+ if (bMerk) HideMarkHdl(NULL);
+ aHdl.SetHdlSize(nSiz);
+ if (bMerk) ShowMarkHdl(NULL);
+ }
+}
+
+#define SDRSEARCH_IMPISMASTER 0x80000000 /* MasterPage wird gerade durchsucht */
+SdrObject* SdrMarkView::ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const
+{
+ if ((nOptions & SDRSEARCH_IMPISMASTER) !=0 && pObj->IsNotVisibleAsMaster()) {
+ return NULL;
+ }
+ BOOL bCheckIfMarkable=(nOptions & SDRSEARCH_TESTMARKABLE)!=0;
+ BOOL bBack=(nOptions & SDRSEARCH_BACKWARD)!=0;
+ BOOL bDeep=(nOptions & SDRSEARCH_DEEP)!=0;
+ BOOL bOLE=pObj->ISA(SdrOle2Obj);
+ SdrObject* pRet=NULL;
+ Point aPnt1(rPnt-pPV->GetOffset()); // rPnt auf PageView transformieren
+ Rectangle aRect(pObj->GetBoundRect());
+ USHORT nTol2=nTol;
+ // Doppelte Tolezanz fuer ein an dieser View im TextEdit befindliches Objekt
+ if (bOLE || pObj==((SdrObjEditView*)this)->GetTextEditObject()) nTol2*=2;
+ aRect.Left ()-=nTol2; // Einmal Toleranz drauf fuer alle Objekte
+ aRect.Top ()-=nTol2;
+ aRect.Right ()+=nTol2;
+ aRect.Bottom()+=nTol2;
+ if (aRect.IsInside(aPnt1)) {
+ if ((!bCheckIfMarkable || IsObjMarkable(pObj,pPV))) {
+ SdrObjList* pOL=pObj->GetSubList();
+ if (pOL!=NULL && pOL->GetObjCount()!=0) {
+ SdrObject* pTmpObj;
+ pRet=ImpCheckObjHit(rPnt,nTol,pOL,pPV,nOptions,pMVisLay,pTmpObj);
+ } else {
+ SdrLayerID nLay=pObj->GetLayer();
+ if (pPV->GetVisibleLayers().IsSet(nLay) &&
+ (pMVisLay==NULL || pMVisLay->IsSet(nLay)))
+ {
+ pRet=pObj->CheckHit(aPnt1,nTol2,&pPV->GetVisibleLayers());
+ }
+ }
+ }
+ }
+ if (!bDeep && pRet!=NULL) pRet=pObj;
+ return pRet;
+}
+
+SdrObject* SdrMarkView::ImpCheckObjHit(const Point& rPnt, USHORT nTol, SdrObjList* pOL, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const
+{
+ BOOL bBack=(nOptions & SDRSEARCH_BACKWARD)!=0;
+ SdrObject* pRet=NULL;
+ rpRootObj=NULL;
+ if (pOL!=NULL) {
+ ULONG nObjAnz=pOL->GetObjCount();
+ ULONG nObjNum=bBack ? 0 : nObjAnz;
+ while (pRet==NULL && (bBack ? nObjNum<nObjAnz : nObjNum>0)) {
+ if (!bBack) nObjNum--;
+ SdrObject* pObj=pOL->GetObj(nObjNum);
+ pRet=ImpCheckObjHit(rPnt,nTol,pObj,pPV,nOptions,pMVisLay);
+ if (pRet!=NULL) rpRootObj=pObj;
+ if (bBack) nObjNum++;
+ }
+ }
+ return pRet;
+}
+
+BOOL SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions) const
+{
+ return PickObj(rPnt,nTol,rpObj,rpPV,nOptions,NULL,NULL,NULL);
+}
+
+BOOL SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions, SdrObject** ppRootObj, ULONG* pnMarkNum, USHORT* pnPassNum) const
+{ // Fehlt noch Pass2,Pass3
+ ((SdrMarkView*)this)->aMark.ForceSort();
+ if (ppRootObj!=NULL) *ppRootObj=NULL;
+ if (pnMarkNum!=NULL) *pnMarkNum=CONTAINER_ENTRY_NOTFOUND;
+ if (pnPassNum!=NULL) *pnPassNum=0;
+ rpObj=NULL;
+ rpPV=NULL;
+ BOOL bWholePage=(nOptions & SDRSEARCH_WHOLEPAGE) !=0;
+ BOOL bMarked=(nOptions & SDRSEARCH_MARKED) !=0;
+ BOOL bMasters=!bMarked && (nOptions & SDRSEARCH_ALSOONMASTER) !=0;
+ BOOL bBack=(nOptions & SDRSEARCH_BACKWARD) !=0;
+ BOOL bNext=(nOptions & SDRSEARCH_NEXT) !=0; // n.i.
+ BOOL bBoundCheckOn2ndPass=(nOptions & SDRSEARCH_PASS2BOUND) !=0; // n.i.
+ BOOL bCheckNearestOn3rdPass=(nOptions & SDRSEARCH_PASS3NEAREST) !=0; // n.i.
+ if (nTol<0) nTol=ImpGetHitTolLogic(nTol,NULL);
+ Point aPt(rPnt);
+ SdrObject* pObj=NULL;
+ SdrObject* pHitObj=NULL;
+ SdrPageView* pPV=NULL;
+ if (!bBack && ((SdrObjEditView*)this)->IsTextEditFrameHit(rPnt)) {
+ pObj=((SdrObjEditView*)this)->GetTextEditObject();
+ pHitObj=pObj;
+ pPV=((SdrObjEditView*)this)->GetTextEditPageView();
+ }
+ if (bMarked) {
+ ULONG nMrkAnz=aMark.GetMarkCount();
+ ULONG nMrkNum=bBack ? 0 : nMrkAnz;
+ while (pHitObj==NULL && (bBack ? nMrkNum<nMrkAnz : nMrkNum>0)) {
+ if (!bBack) nMrkNum--;
+ SdrMark* pM=aMark.GetMark(nMrkNum);
+ pObj=pM->GetObj();
+ pPV=pM->GetPageView();
+ pHitObj=ImpCheckObjHit(aPt,nTol,pObj,pPV,nOptions,NULL);
+ if (bBack) nMrkNum++;
+ }
+ } else {
+ USHORT nPvAnz=GetPageViewCount();
+ USHORT nPvNum=bBack ? 0 : nPvAnz;
+ while (pHitObj==NULL && (bBack ? nPvNum<nPvAnz : nPvNum>0)) {
+ if (!bBack) nPvNum--;
+ pPV=GetPageViewPvNum(nPvNum);
+ SdrPage* pPage=pPV->GetPage();
+ USHORT nPgAnz=1; if (bMasters) nPgAnz+=pPage->GetMasterPageCount();
+ BOOL bExtraPassForWholePage=bWholePage && pPage!=pPV->GetObjList();
+ if (bExtraPassForWholePage) nPgAnz++; // Suche erst in AktObjList, dann auf der gesamten Page
+ USHORT nPgNum=bBack ? 0 : nPgAnz;
+ while (pHitObj==NULL && (bBack ? nPgNum<nPgAnz : nPgNum>0)) {
+ ULONG nTmpOptions=nOptions;
+ if (!bBack) nPgNum--;
+ const SetOfByte* pMVisLay=NULL;
+ SdrObjList* pObjList=NULL;
+ if (pnPassNum!=NULL) *pnPassNum&=~(SDRSEARCHPASS_MASTERPAGE|SDRSEARCHPASS_INACTIVELIST);
+ if (nPgNum>=nPgAnz-1 || (bExtraPassForWholePage && nPgNum>=nPgAnz-2)) {
+ pObjList=pPV->GetObjList();
+ if (bExtraPassForWholePage && nPgNum==nPgAnz-2) {
+ pObjList=pPage;
+ if (pnPassNum!=NULL) *pnPassNum|=SDRSEARCHPASS_INACTIVELIST;
+ }
+ } else { // sonst MasterPage
+ const SdrMasterPageDescriptor& rMPD=pPage->GetMasterPageDescriptor(nPgNum);
+ USHORT nNum=rMPD.GetPageNum();
+ pMVisLay=&rMPD.GetVisibleLayers();
+ if (nNum<pMod->GetMasterPageCount()) { // sonst ungueltiger MasterPageDescriptor
+ pObjList=pMod->GetMasterPage(nNum);
+ }
+ if (pnPassNum!=NULL) *pnPassNum|=SDRSEARCHPASS_MASTERPAGE;
+ nTmpOptions=nTmpOptions | SDRSEARCH_IMPISMASTER;
+ }
+ pHitObj=ImpCheckObjHit(aPt,nTol,pObjList,pPV,nTmpOptions,pMVisLay,pObj);
+ if (bBack) nPgNum++;
+ }
+ if (bBack) nPvNum++;
+ }
+
+ }
+ if (pHitObj!=NULL) {
+ if (ppRootObj!=NULL) *ppRootObj=pObj;
+ if ((nOptions & SDRSEARCH_DEEP) !=0) pObj=pHitObj;
+ if ((nOptions & SDRSEARCH_TESTTEXTEDIT) !=0) {
+ if (!pObj->HasTextEdit() || pPV->GetLockedLayers().IsSet(pObj->GetLayer())) {
+ pObj=NULL;
+ }
+ }
+ if (pObj!=NULL && (nOptions & SDRSEARCH_TESTMACRO) !=0) {
+ Point aP(aPt); aP-=pPV->GetOffset();
+ SdrObjMacroHitRec aHitRec;
+ aHitRec.aPos=aPt;
+ aHitRec.aDownPos=aPt;
+ aHitRec.nTol=nTol;
+ aHitRec.pVisiLayer=&pPV->GetVisibleLayers();
+ aHitRec.pPageView=pPV;
+ if (!pObj->HasMacro() || !pObj->IsMacroHit(aHitRec)) pObj=NULL;
+ }
+ if (pObj!=NULL && (nOptions & SDRSEARCH_WITHTEXT) !=0 && pObj->GetOutlinerParaObject()==NULL) pObj=NULL;
+ if (pObj!=NULL && (nOptions & SDRSEARCH_TESTTEXTAREA) !=0) {
+ Point aP(aPt); aP-=pPV->GetOffset();
+ if (!pObj->IsTextEditHit(aPt,0/*nTol*/,NULL)) pObj=NULL;
+ }
+ if (pObj!=NULL) {
+ rpObj=pObj;
+ rpPV=pPV;
+ if (pnPassNum!=NULL) *pnPassNum|=SDRSEARCHPASS_DIRECT;
+ }
+ }
+ return rpObj!=NULL;
+}
+
+BOOL SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG* pnMarkNum, ULONG nOptions) const
+{
+ ((SdrMarkView*)this)->aMark.ForceSort();
+ BOOL bBoundCheckOn2ndPass=(nOptions & SDRSEARCH_PASS2BOUND) !=0;
+ BOOL bCheckNearestOn3rdPass=(nOptions & SDRSEARCH_PASS3NEAREST) !=0;
+ rpObj=NULL;
+ rpPV=NULL;
+ if (pnMarkNum!=NULL) *pnMarkNum=CONTAINER_ENTRY_NOTFOUND;
+ Point aPt(rPnt);
+ USHORT nTol=(USHORT)nHitTolLog;
+ BOOL bFnd=FALSE;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ ULONG nMarkNum;
+ for (nMarkNum=nMarkAnz; nMarkNum>0 && !bFnd;) {
+ nMarkNum--;
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrPageView* pPV=pM->GetPageView();
+ SdrObject* pObj=pM->GetObj();
+ bFnd=ImpIsObjHit(aPt,nTol,pObj,pPV,SDRSEARCH_TESTMARKABLE);
+ if (bFnd) {
+ rpObj=pObj;
+ rpPV=pPV;
+ if (pnMarkNum!=NULL) *pnMarkNum=nMarkNum;
+ }
+ }
+ if ((bBoundCheckOn2ndPass || bCheckNearestOn3rdPass) && !bFnd) {
+ SdrObject* pBestObj=NULL;
+ SdrPageView* pBestPV=NULL;
+ ULONG nBestMarkNum=0;
+ ULONG nBestDist=0xFFFFFFFF;
+ for (nMarkNum=nMarkAnz; nMarkNum>0 && !bFnd;) {
+ nMarkNum--;
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrPageView* pPV=pM->GetPageView();
+ SdrObject* pObj=pM->GetObj();
+ Point aPt1(aPt);
+ aPt1-=pPV->GetOffset();
+ Rectangle aRect(pObj->GetBoundRect());
+ aRect.Left ()-=nTol;
+ aRect.Top ()-=nTol;
+ aRect.Right ()+=nTol;
+ aRect.Bottom()+=nTol;
+ if (aRect.IsInside(aPt1)) {
+ bFnd=TRUE;
+ rpObj=pObj;
+ rpPV=pPV;
+ if (pnMarkNum!=NULL) *pnMarkNum=nMarkNum;
+ } else if (bCheckNearestOn3rdPass) {
+ ULONG nDist=0;
+ if (aPt1.X()<aRect.Left()) nDist+=aRect.Left()-aPt1.X();
+ if (aPt1.X()>aRect.Right()) nDist+=aPt1.X()-aRect.Right();
+ if (aPt1.Y()<aRect.Top()) nDist+=aRect.Top()-aPt1.Y();
+ if (aPt1.Y()>aRect.Bottom()) nDist+=aPt1.Y()-aRect.Bottom();
+ if (nDist<nBestDist) {
+ pBestObj=pObj;
+ pBestPV=pPV;
+ nBestMarkNum=nMarkNum;
+ }
+ }
+ }
+ if (bCheckNearestOn3rdPass && !bFnd) {
+ rpObj=pBestObj;
+ rpPV=pBestPV;
+ if (pnMarkNum!=NULL) *pnMarkNum=nBestMarkNum;
+ bFnd=pBestObj!=NULL;
+ }
+ }
+ return bFnd;
+}
+
+SdrHitKind SdrMarkView::PickSomething(const Point& rPnt, short nTol) const
+{
+ nTol=ImpGetHitTolLogic(nTol,NULL);
+ SdrHitKind eRet=SDRHIT_NONE;
+ Point aPt(rPnt);
+ SdrObject* pObj=NULL;
+ SdrPageView* pPV=NULL;
+ if (eRet==SDRHIT_NONE && PickObj(rPnt,USHORT(nTol),pObj,pPV,SDRSEARCH_PICKMARKABLE)) {
+ Rectangle aRct1(aPt-Point(nTol,nTol),aPt+Point(nTol,nTol)); // HitRect fuer Toleranz
+ Rectangle aBR(pObj->GetBoundRect());
+ if (aRct1.IsInside(aBR.TopLeft())) eRet=SDRHIT_BOUNDTL;
+ else if (aRct1.IsInside(aBR.TopCenter())) eRet=SDRHIT_BOUNDTC;
+ else if (aRct1.IsInside(aBR.TopRight())) eRet=SDRHIT_BOUNDTR;
+ else if (aRct1.IsInside(aBR.LeftCenter())) eRet=SDRHIT_BOUNDCL;
+ else if (aRct1.IsInside(aBR.RightCenter())) eRet=SDRHIT_BOUNDCR;
+ else if (aRct1.IsInside(aBR.BottomLeft())) eRet=SDRHIT_BOUNDBL;
+ else if (aRct1.IsInside(aBR.BottomCenter())) eRet=SDRHIT_BOUNDBC;
+ else if (aRct1.IsInside(aBR.BottomRight())) eRet=SDRHIT_BOUNDBR;
+ else eRet=SDRHIT_OBJECT;
+ }
+ return eRet;
+}
+
+void SdrMarkView::UnmarkAllObj(SdrPageView* pPV)
+{
+ if (aMark.GetMarkCount()!=0) {
+ BrkAction();
+ BOOL bVis=bHdlShown;
+ if (bVis) HideMarkHdl(NULL);
+ if (pPV!=NULL) {
+ aMark.DeletePageView(*pPV);
+ } else {
+ aMark.Clear();
+ }
+ pMarkedObj=NULL;
+ pMarkedPV=NULL;
+ MarkListHasChanged();
+ AdjustMarkHdl(TRUE);
+ if (bVis) ShowMarkHdl(NULL); // ggf. fuer die RefPoints
+ }
+}
+
+void SdrMarkView::MarkAllObj(SdrPageView* pPV)
+{
+ BOOL bMarkChg=FALSE;
+ BrkAction();
+ HideMarkHdl(NULL);
+ if (pPV!=NULL) {
+ bMarkChg=aMark.InsertPageView(*pPV);
+ } else {
+ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (aMark.InsertPageView(*pPV)) bMarkChg=TRUE;
+ }
+ }
+ if (bMarkChg) MarkListHasChanged();
+ if (aMark.GetMarkCount()!=0) {
+ AdjustMarkHdl(TRUE);
+ ShowMarkHdl(NULL);
+ } else {
+ }
+}
+
+void SdrMarkView::AdjustMarkHdl(BOOL bRestraintPaint)
+{
+ BOOL bVis=bHdlShown;
+ if (bVis) HideMarkHdl(NULL);
+ CheckMarked();
+ SetMarkRects();
+ SetMarkHandles();
+ if(bRestraintPaint && bVis)
+ {
+ ShowMarkHdl(NULL);
+
+ // refresh IAOs
+//--/ RefreshAllIAOManagers();
+ }
+}
+
+Rectangle SdrMarkView::GetMarkedObjBoundRect() const
+{
+ Rectangle aRect;
+ for (ULONG nm=0; nm<aMark.GetMarkCount(); nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ Rectangle aR1(pO->GetBoundRect());
+ aR1+=pM->GetPageView()->GetOffset();
+ if (aRect.IsEmpty()) aRect=aR1;
+ else aRect.Union(aR1);
+ }
+ return aRect;
+}
+
+const Rectangle& SdrMarkView::GetMarkedObjRect() const
+{
+ if (bMarkedObjRectDirty) {
+ ((SdrMarkView*)this)->bMarkedObjRectDirty=FALSE;
+ Rectangle aRect;
+ for (ULONG nm=0; nm<aMark.GetMarkCount(); nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ Rectangle aR1(pO->GetSnapRect());
+ aR1+=pM->GetPageView()->GetOffset();
+ if (aRect.IsEmpty()) aRect=aR1;
+ else aRect.Union(aR1);
+ }
+ ((SdrMarkView*)this)->aMarkedObjRect=aRect;
+ }
+ return aMarkedObjRect;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMarkView::ImpTakeDescriptionStr(const SdrMarkList& rML, USHORT nStrCacheID, XubString& rStr, USHORT nVal, USHORT nOpt) const
+{
+ rStr = ImpGetResStr(nStrCacheID);
+ xub_StrLen nPos = rStr.SearchAscii("%O");
+
+ if(nPos != STRING_NOTFOUND)
+ {
+ rStr.Erase(nPos, 2);
+
+ if(nOpt == IMPSDR_POINTSDESCRIPTION)
+ {
+ rStr.Insert(rML.GetPointMarkDescription(), nPos);
+ }
+ else if(nOpt == IMPSDR_GLUEPOINTSDESCRIPTION)
+ {
+ rStr.Insert(rML.GetGluePointMarkDescription(), nPos);
+ }
+ else
+ {
+ rStr.Insert(rML.GetMarkDescription(), nPos);
+ }
+ }
+
+ nPos = rStr.SearchAscii("%N");
+
+ if(nPos != STRING_NOTFOUND)
+ {
+ rStr.Erase(nPos, 2);
+ rStr.Insert(UniString::CreateFromInt32(nVal), nPos);
+ }
+}
+
+void SdrMarkView::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, USHORT nVal, USHORT nOpt) const
+{
+ ImpTakeDescriptionStr(aMark,nStrCacheID,rStr,nVal,nOpt);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrMarkView::EnterMarkedGroup()
+{
+ BOOL bRet=FALSE;
+ // Es wird nur die erste gefundene Gruppe (also nur in einer PageView) geentert
+ // Weil PageView::EnterGroup ein AdjustMarkHdl ruft.
+ // Das muss ich per Flag mal unterbinden vvvvvvvv
+ for (USHORT nv=0; nv<GetPageViewCount() && !bRet; nv++) {
+ BOOL bEnter=FALSE;
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ for (ULONG nm=aMark.GetMarkCount(); nm>0 && !bEnter;) {
+ nm--;
+ SdrMark* pM=aMark.GetMark(nm);
+ if (pM->GetPageView()==pPV) {
+ SdrObject* pObj=pM->GetObj();
+ if (pObj->IsGroupObject()) {
+ if (pPV->EnterGroup(pObj)) {
+ bRet=TRUE;
+ bEnter=TRUE;
+ }
+ }
+ }
+ }
+ }
+ return bRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMarkView::ForceEdgesOfMarkedNodes()
+{
+ if (bEdgesOfMarkedNodesDirty) {
+ aEdgesOfMarkedNodes.Clear();
+ aMarkedEdgesOfMarkedNodes.Clear();
+ aMarkedEdges.Clear();
+ bEdgesOfMarkedNodesDirty=FALSE;
+ aMark.ForceSort();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrObject* pNode=aMark.GetMark(nm)->GetObj();
+ const SfxBroadcaster* pBC=pNode->GetBroadcaster();
+ if (pNode->IsNode()) {
+ if (pBC!=NULL) {
+ USHORT nLstAnz=pBC->GetListenerCount();
+ for (USHORT nl=0; nl<nLstAnz; nl++) {
+ SfxListener* pLst=pBC->GetListener(nl);
+ SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pLst);
+ if (pEdge!=NULL && pEdge->IsInserted() && pEdge->GetPage()==pNode->GetPage()) {
+ SdrMark aM(pEdge,aMark.GetMark(nm)->GetPageView());
+ if (pEdge->GetConnectedNode(TRUE)==pNode) aM.SetCon1(TRUE);
+ if (pEdge->GetConnectedNode(FALSE)==pNode) aM.SetCon2(TRUE);
+ if (!IsObjMarked(pEdge)) { // nachsehen, ob er selbst markiert ist
+ aEdgesOfMarkedNodes.InsertEntry(aM);
+ } else {
+ aMarkedEdgesOfMarkedNodes.InsertEntry(aM);
+ }
+ }
+ }
+ }
+ }
+ if (pNode->IsEdge()) {
+ aMarkedEdges.InsertEntry(*aMark.GetMark(nm)); // alle markierten Edges merken
+ }
+ }
+ aEdgesOfMarkedNodes.ForceSort();
+ aMarkedEdgesOfMarkedNodes.ForceSort();
+ aMarkedEdges.ForceSort();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMarkView::MarkListHasChanged()
+{
+ aMark.SetNameDirty();
+ bEdgesOfMarkedNodesDirty=TRUE;
+ aEdgesOfMarkedNodes.Clear();
+ aMarkedEdgesOfMarkedNodes.Clear();
+ aMarkedEdges.Clear();
+ bMarkedObjRectDirty=TRUE;
+ bMarkedPointsRectsDirty=TRUE;
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ BOOL bOneEdgeMarked=FALSE;
+ if (aMark.GetMarkCount()==1) {
+ const SdrObject* pObj=aMark.GetMark(0)->GetObj();
+ if (pObj->GetObjInventor()==SdrInventor) {
+ UINT16 nIdent=pObj->GetObjIdentifier();
+ bOneEdgeMarked=nIdent==OBJ_EDGE;
+ }
+ }
+ ImpSetGlueVisible4(bOneEdgeMarked);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMarkView::WriteRecords(SvStream& rOut) const
+{
+ SdrSnapView::WriteRecords(rOut);
+ {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWDRAGMODE);
+ rOut<<BOOL(eEditMode==SDREDITMODE_EDIT); // wg. Kompatibilitaet
+ rOut<<USHORT(eDragMode);
+ rOut<<aRef1;
+ rOut<<aRef2;
+ rOut<<BOOL(bForceFrameHandles);
+ rOut<<BOOL(bPlusHdlAlways);
+ rOut<<BOOL(eEditMode==SDREDITMODE_GLUEPOINTEDIT); // wg. Kompatibilitaet
+ rOut<<USHORT(eEditMode);
+ rOut<<BOOL(bMarkHdlWhenTextEdit);
+ } {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWCROOKCENTER);
+ rOut<<aLastCrookCenter;
+ }
+}
+
+BOOL SdrMarkView::ReadRecord(const SdrIOHeader& rViewHead,
+ const SdrNamedSubRecord& rSubHead,
+ SvStream& rIn)
+{
+ BOOL bRet=FALSE;
+ if (rSubHead.GetInventor()==SdrInventor) {
+ bRet=TRUE;
+ switch (rSubHead.GetIdentifier()) {
+ case SDRIORECNAME_VIEWDRAGMODE: {
+ eEditMode=SDREDITMODE_EDIT;
+ BOOL bTmpBool;
+ USHORT nTmpUShort;
+ rIn>>bTmpBool; if (!bTmpBool) eEditMode=SDREDITMODE_CREATE; // wg. Kompatibilitaet
+ USHORT nDragMode;
+ rIn>>nDragMode;
+ eDragMode=SdrDragMode(nDragMode);
+ rIn>>aRef1;
+ rIn>>aRef2;
+ rIn>>bTmpBool; bForceFrameHandles=bTmpBool;
+ rIn>>bTmpBool; bPlusHdlAlways=bTmpBool;
+ if (rSubHead.GetBytesLeft()!=0) {
+ rIn>>bTmpBool;
+ if (bTmpBool) eEditMode=SDREDITMODE_GLUEPOINTEDIT; // wg. Kompatibilitaet
+ }
+ if (rSubHead.GetBytesLeft()!=0) {
+ rIn>>nTmpUShort;
+ eEditMode=(SdrViewEditMode)nTmpUShort;
+ }
+ bGlueVisible2=eEditMode==SDREDITMODE_GLUEPOINTEDIT;
+ if (rSubHead.GetBytesLeft()!=0) {
+ rIn>>bTmpBool;
+ bMarkHdlWhenTextEdit=bTmpBool;
+ }
+ } break;
+ case SDRIORECNAME_VIEWCROOKCENTER: {
+ rIn>>aLastCrookCenter;
+ } break;
+ default: bRet=FALSE;
+ }
+ }
+ if (!bRet) bRet=SdrSnapView::ReadRecord(rViewHead,rSubHead,rIn);
+ return bRet;
+}
+
+void SdrMarkView::SetDesignMode(BOOL bOn)
+{
+ if (bDesignMode != bOn)
+ {
+ bDesignMode = bOn;
+ // Setzen des Modes fuer alle Controls
+ USHORT nAnz = GetPageViewCount();
+ for (USHORT nv = 0; nv<nAnz; nv++)
+ {
+ SdrPageView* pPV = GetPageViewPvNum(nv);
+ const SdrPageViewWinList& rWinList = pPV->GetWinList();
+ for (ULONG i = 0; i < rWinList.GetCount(); i++)
+ {
+ const SdrPageViewWinRec& rWR = rWinList[i];
+ const SdrUnoControlList& rControlList = rWR.GetControlList();
+
+ for(UINT32 j = 0; j < rControlList.GetCount(); j++)
+ {
+ rControlList[j].GetControl()->setDesignMode(bOn);
+ }
+ }
+ }
+ }
+}
+
+// MarkHandles Objektaenderung:
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// - Bei Notify mit HINT_OBJCHG (oder so) werden die Handles erstmal versteckt
+// (wenn nicht schon wegen Dragging versteckt).
+// - XorHdl: Bei ModelHasChanged() werden sie dann wieder angezeigt.
+// - PaintEvents kommen nun durch.
+// - Die XorHandles werden z.T. wieder uebermalt.
+// - Xor: Nach dem Painten werden die Handles im (vom PaintHandler gerufenen)
+// InitRedraw per ToggleShownXor bei gesetzter ClipRegion nochmal gemalt
+// und damit ist alles in Butter.
+// - ToggleShownXor macht bei SolidHdl nix weil bHdlShown=FALSE
+// - Der AfterPaintTimer wird gestartet.
+// - SolidHdl: Im AfterPaintHandler wird ShowMarkHdl gerufen.
+// Da die Handles zu diesem Zeitpunkt nicht angezeigt sind wird:
+// - SaveBackground durchgefuehrt.
+// - DrawMarkHdl gerufen und bHdlShown gesetzt.
+//
+// MarkHandles bei sonstigem Invalidate:
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// In diesem Fall bekomme ich kein Notify und beim Aufruf des
+// PaintHandlers->InitRedraw() sind auch die SolidHandles sichtbar.
+
diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
new file mode 100644
index 0000000000..d01d0aa5d3
--- /dev/null
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -0,0 +1,716 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdmrkv1.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdmrkv.hxx"
+#include "svdetc.hxx"
+#include "svdoedge.hxx"
+#include "svdglob.hxx"
+#include "svdpagv.hxx"
+#include "svdpage.hxx"
+#include "svddrgm1.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@ @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@@@ @@@@@ @@ @@ @@ @@@@@ @@@@@ @@ @@ @@ @@ @@@@
+// @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@
+// @@ @@ @@ @@ @@@@@@ @@ @@ @@ @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@
+// @@@@@ @@ @@ @@@@@@ @@@@ @@ @@@@@@@ @@@@@@ @@@@@ @@@@ @@ @@@@ @@@@@ @@ @@ @@@@@@ @@ @@@
+// @@ @@ @@ @@ @@@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@ @@ @@@@ @@ @@ @@@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrMarkView::HasMarkablePoints() const
+{
+ ForceUndirtyMrkPnt();
+ BOOL bRet=FALSE;
+ if (!ImpIsFrameHandles()) {
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ if (nMarkAnz<=nFrameHandlesLimit) {
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz && !bRet; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrObject* pObj=pM->GetObj();
+ bRet=pObj->IsPolyObj();
+ }
+ }
+ }
+ return bRet;
+}
+
+ULONG SdrMarkView::GetMarkablePointCount() const
+{
+ ForceUndirtyMrkPnt();
+ ULONG nAnz=0;
+ if (!ImpIsFrameHandles()) {
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ if (nMarkAnz<=nFrameHandlesLimit) {
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrObject* pObj=pM->GetObj();
+ if (pObj->IsPolyObj()) {
+ nAnz+=pObj->GetPointCount();
+ }
+ }
+ }
+ }
+ return nAnz;
+}
+
+BOOL SdrMarkView::HasMarkedPoints() const
+{
+ ForceUndirtyMrkPnt();
+ BOOL bRet=FALSE;
+ if (!ImpIsFrameHandles()) {
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ if (nMarkAnz<=nFrameHandlesLimit) {
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz && !bRet; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrUShortCont* pPts=pM->GetMarkedPoints();
+ bRet=pPts!=NULL && pPts->GetCount()!=0;
+ }
+ }
+ }
+ return bRet;
+}
+
+ULONG SdrMarkView::GetMarkedPointCount() const
+{
+ ForceUndirtyMrkPnt();
+ ULONG nAnz=0;
+ if (!ImpIsFrameHandles()) {
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ if (nMarkAnz<=nFrameHandlesLimit) {
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrUShortCont* pPts=pM->GetMarkedPoints();
+ if (pPts!=NULL) nAnz+=pPts->GetCount();
+ }
+ }
+ }
+ return nAnz;
+}
+
+BOOL SdrMarkView::IsPointMarkable(const SdrHdl& rHdl) const
+{
+ return !ImpIsFrameHandles() && &rHdl!=NULL && !rHdl.IsPlusHdl() && rHdl.GetKind()!=HDL_GLUE && rHdl.GetObj()!=NULL && rHdl.GetObj()->IsPolyObj();
+}
+
+BOOL SdrMarkView::ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, BOOL bUnmark)
+{
+ if (pHdl==NULL || pHdl->IsPlusHdl() || pHdl->GetKind()==HDL_GLUE) return FALSE;
+ if (pHdl->IsSelected() != bUnmark) return FALSE;
+ SdrObject* pObj=pHdl->GetObj();
+ if (pObj==NULL || !pObj->IsPolyObj()) return FALSE;
+ if (pMark==NULL) {
+ ULONG nMarkNum=aMark.FindObject(pObj);
+ if (nMarkNum==CONTAINER_ENTRY_NOTFOUND) return FALSE;
+ pMark=aMark.GetMark(nMarkNum);
+ }
+ USHORT nHdlNum=pHdl->GetObjHdlNum();
+ SdrUShortCont* pPts=pMark->ForceMarkedPoints();
+ if (!bUnmark) {
+ pPts->Insert(nHdlNum);
+ } else {
+ ULONG nBla=pPts->GetPos(nHdlNum);
+ if (nBla!=CONTAINER_ENTRY_NOTFOUND) {
+ pPts->Remove(nBla);
+ } else return FALSE; // Fehlerfall!
+ }
+ BOOL bVis=IsMarkHdlShown();
+ USHORT nWinAnz=GetWinCount();
+// if (bVis) for (nw=0; nw<nWinAnz; nw++) pHdl->Draw(*GetWin(nw));
+ pHdl->SetSelected(!bUnmark);
+// if (bVis) for (nw=0; nw<nWinAnz; nw++) pHdl->Draw(*GetWin(nw));
+ if (!bPlusHdlAlways) {
+ BOOL bSolid=IsSolidMarkHdl();
+ if (!bUnmark) {
+ USHORT nAnz=pObj->GetPlusHdlCount(*pHdl);
+ if (nAnz!=0 && bSolid && bVis) HideMarkHdl(NULL);
+ for (USHORT i=0; i<nAnz; i++) {
+ SdrHdl* pPlusHdl=pObj->GetPlusHdl(*pHdl,i);
+ if (pPlusHdl!=NULL) {
+ pPlusHdl->SetObj(pObj);
+ pPlusHdl->SetPageView(pMark->GetPageView());
+ pPlusHdl->SetPlusHdl(TRUE);
+ aHdl.AddHdl(pPlusHdl);
+// if (bVis && !bSolid) for (nw=0; nw<nWinAnz; nw++) pPlusHdl->Draw(*GetWin(nw));
+ }
+ }
+ if (nAnz!=0 && bSolid && bVis) ShowMarkHdl(NULL);
+ } else {
+ ULONG nAnz=aHdl.GetHdlCount();
+ for (ULONG i=nAnz; i>0;) {
+ i--;
+ SdrHdl* pPlusHdl=aHdl.GetHdl(i);
+ BOOL bFlag=FALSE;
+ if (pPlusHdl->IsPlusHdl() && pPlusHdl->GetSourceHdlNum()==nHdlNum) {
+ if (bVis) {
+ if (bSolid) {
+ bFlag=TRUE;
+ HideMarkHdl(NULL); // SolidMarkHdl und Bezier ist noch nicht fertig!
+ }
+// else {
+// for (nw=0; nw<nWinAnz; nw++) pPlusHdl->Draw(*GetWin(nw));
+// }
+ }
+ aHdl.RemoveHdl(i);
+ delete pPlusHdl;
+ }
+ if (bFlag) ShowMarkHdl(NULL);
+ }
+ }
+ }
+
+ // refresh IAOs
+// RefreshAllIAOManagers();
+
+ return TRUE;
+}
+
+BOOL SdrMarkView::MarkPoint(SdrHdl& rHdl, BOOL bUnmark)
+{
+ if (&rHdl==NULL) return FALSE;
+ ForceUndirtyMrkPnt();
+ BOOL bRet=FALSE;
+ const SdrObject* pObj=rHdl.GetObj();
+ if (IsPointMarkable(rHdl) && rHdl.IsSelected()==bUnmark) {
+ ULONG nMarkNum=aMark.FindObject(pObj);
+ if (nMarkNum!=CONTAINER_ENTRY_NOTFOUND) {
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrUShortCont* pPts=pM->ForceMarkedPoints();
+ pPts->ForceSort();
+ if (ImpMarkPoint(&rHdl,pM,bUnmark)) {
+ pPts->ForceSort();
+ MarkListHasChanged();
+ bRet=TRUE;
+ }
+ }
+ }
+
+ // refresh IAOs
+//--/ RefreshAllIAOManagers();
+
+ return bRet;
+}
+
+BOOL SdrMarkView::MarkPoints(const Rectangle* pRect, BOOL bUnmark)
+{
+ ForceUndirtyMrkPnt();
+ BOOL bChgd=FALSE;
+ aMark.ForceSort();
+ const SdrObject* pObj0=NULL;
+ const SdrPageView* pPV0=NULL;
+ SdrMark* pM=NULL;
+ aHdl.Sort();
+ BOOL bHideHdl=IsMarkHdlShown() && IsSolidMarkHdl() && !bPlusHdlAlways;
+ ULONG nHdlAnz=aHdl.GetHdlCount();
+ for (ULONG nHdlNum=nHdlAnz; nHdlNum>0;) {
+ nHdlNum--;
+ SdrHdl* pHdl=aHdl.GetHdl(nHdlNum);
+ if (IsPointMarkable(*pHdl) && pHdl->IsSelected()==bUnmark) {
+ const SdrObject* pObj=pHdl->GetObj();
+ const SdrPageView* pPV=pHdl->GetPageView();
+ if (pObj!=pObj0 || pPV!=pPV0 || pM==NULL) { // Dieser Abschnitt dient zur Optimierung,
+ if (pM!=NULL) {
+ SdrUShortCont* pPts=pM->GetMarkedPoints();
+ if (pPts!=NULL) pPts->ForceSort();
+ }
+ ULONG nMarkNum=aMark.FindObject(pObj); // damit ImpMarkPoint() nicht staendig das
+ if (nMarkNum!=CONTAINER_ENTRY_NOTFOUND) { // Objekt in der MarkList suchen muss.
+ pM=aMark.GetMark(nMarkNum);
+ pObj0=pObj;
+ pPV0=pPV;
+ SdrUShortCont* pPts=pM->ForceMarkedPoints();
+ pPts->ForceSort();
+ } else {
+#ifdef DBG_UTIL
+ if (pObj->IsInserted()) {
+ DBG_ERROR("SdrMarkView::MarkPoints(const Rectangle* pRect): Markiertes Objekt nicht gefunden");
+ }
+#endif
+ pM=NULL;
+ }
+ }
+ Point aPos(pHdl->GetPos());
+ aPos+=pPV->GetOffset();
+ if (pM!=NULL && (pRect==NULL || pRect->IsInside(aPos))) {
+ if (bHideHdl && IsMarkHdlShown() && pHdl->GetObj()!=NULL) {
+ USHORT nAnz=pHdl->GetObj()->GetPlusHdlCount(*pHdl);
+ if (nAnz!=0) HideMarkHdl(NULL); // #36987#
+ }
+ if (ImpMarkPoint(pHdl,pM,bUnmark)) bChgd=TRUE;
+ }
+ }
+ }
+ if (pM!=NULL) { // Den zuletzt geaenderten MarkEntry ggf. noch aufraeumen
+ SdrUShortCont* pPts=pM->GetMarkedPoints();
+ if (pPts!=NULL) pPts->ForceSort();
+ }
+ if (bHideHdl) ShowMarkHdl(NULL); // #36987#
+ if (bChgd) {
+ MarkListHasChanged();
+ }
+
+ // refresh IAOs
+//--/ RefreshAllIAOManagers();
+
+ return bChgd;
+}
+
+BOOL SdrMarkView::MarkNextPoint(BOOL bPrev)
+{
+ ForceUndirtyMrkPnt();
+ BOOL bChgd=FALSE;
+ aMark.ForceSort();
+ // ...
+ if (bChgd) {
+ MarkListHasChanged();
+ }
+ return bChgd;
+}
+
+BOOL SdrMarkView::MarkNextPoint(const Point& rPnt, BOOL bPrev)
+{
+ ForceUndirtyMrkPnt();
+ BOOL bChgd=FALSE;
+ aMark.ForceSort();
+ // ...
+ if (bChgd) {
+ MarkListHasChanged();
+ }
+ return bChgd;
+}
+
+const Rectangle& SdrMarkView::GetMarkedPointsRect() const
+{
+ ForceUndirtyMrkPnt();
+ if (bMarkedPointsRectsDirty) ImpSetPointsRects();
+ return aMarkedPointsRect;
+}
+
+void SdrMarkView::SetPlusHandlesAlwaysVisible(BOOL bOn)
+{ // HandlePaint optimieren !!!!!!!
+ ForceUndirtyMrkPnt();
+ if (bOn!=bPlusHdlAlways) {
+ BOOL bVis=IsMarkHdlShown();
+ if (bVis) HideMarkHdl(NULL);
+ bPlusHdlAlways=bOn;
+ SetMarkHandles();
+ if (bVis) ShowMarkHdl(NULL);
+ MarkListHasChanged();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// ImpSetPointsRects() ist fuer PolyPoints und GluePoints!
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMarkView::ImpSetPointsRects() const
+{
+ Rectangle aPnts;
+ Rectangle aGlue;
+ ULONG nHdlAnz=aHdl.GetHdlCount();
+ for (ULONG nHdlNum=0; nHdlNum<nHdlAnz; nHdlNum++) {
+ const SdrHdl* pHdl=aHdl.GetHdl(nHdlNum);
+ SdrHdlKind eKind=pHdl->GetKind();
+ if ((eKind==HDL_POLY && pHdl->IsSelected()) || eKind==HDL_GLUE) {
+ Point aPt(pHdl->GetPos());
+ const SdrPageView* pPV=pHdl->GetPageView();
+ if (pPV!=NULL) aPt+=pPV->GetOffset();
+ Rectangle& rR=eKind==HDL_GLUE ? aGlue : aPnts;
+ if (rR.IsEmpty()) {
+ rR=Rectangle(aPt,aPt);
+ } else {
+ if (aPt.X()<rR.Left ()) rR.Left ()=aPt.X();
+ if (aPt.X()>rR.Right ()) rR.Right ()=aPt.X();
+ if (aPt.Y()<rR.Top ()) rR.Top ()=aPt.Y();
+ if (aPt.Y()>rR.Bottom()) rR.Bottom()=aPt.Y();
+ }
+ }
+ }
+ ((SdrMarkView*)this)->aMarkedPointsRect=aPnts;
+ ((SdrMarkView*)this)->aMarkedGluePointsRect=aGlue;
+ ((SdrMarkView*)this)->bMarkedPointsRectsDirty=FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// UndirtyMrkPnt() ist fuer PolyPoints und GluePoints!
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMarkView::UndirtyMrkPnt() const
+{
+ BOOL bChg=FALSE;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrObject* pObj=pM->GetObj();
+ // PolyPoints
+ SdrUShortCont* pPts=pM->GetMarkedPoints();
+ if (pPts!=NULL) {
+ if (pObj->IsPolyObj()) {
+ // Ungueltig markierte Punkte entfernen, also alle
+ // Eintraege die groesser sind als die Punktanzahl des Objekts
+ USHORT nMax=pObj->GetPointCount();
+ USHORT nPtNum=0xFFFF;
+ pPts->ForceSort();
+ for (ULONG nIndex=pPts->GetCount(); nIndex>0 && nPtNum>=nMax;) {
+ nIndex--;
+ nPtNum=pPts->GetObject(nIndex);
+ if (nPtNum>=nMax) {
+ pPts->Remove(nIndex);
+ bChg=TRUE;
+ }
+ }
+ } else {
+ DBG_ERROR("SdrMarkView::UndirtyMrkPnt(): Markierte Punkte an einem Objekt, dass kein PolyObj ist!");
+ if (pPts!=NULL && pPts->GetCount()!=0) {
+ pPts->Clear();
+ bChg=TRUE;
+ }
+ }
+ }
+ // GluePoints
+ pPts=pM->GetMarkedGluePoints();
+ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+ if (pPts!=NULL) {
+ if (pGPL!=NULL) {
+ // Ungueltig markierte Klebepunkte entfernen, also alle
+ // Eintraege (Id's) die nicht in der GluePointList des
+ // Objekts enthalten sind
+ pPts->ForceSort();
+ for (ULONG nIndex=pPts->GetCount(); nIndex>0;) {
+ nIndex--;
+ USHORT nId=pPts->GetObject(nIndex);
+ if (pGPL->FindGluePoint(nId)==SDRGLUEPOINT_NOTFOUND) {
+ pPts->Remove(nIndex);
+ bChg=TRUE;
+ }
+ }
+ } else {
+ if (pPts!=NULL && pPts->GetCount()!=0) {
+ pPts->Clear(); // Objekt hat keine Klebepunkte (mehr)
+ bChg=TRUE;
+ }
+ }
+ }
+ }
+ if (bChg) ((SdrMarkView*)this)->bMarkedPointsRectsDirty=TRUE;
+ ((SdrMarkView*)this)->bMrkPntDirty=FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrMarkView::HasMarkableGluePoints() const
+{
+ BOOL bRet=FALSE;
+ if (IsGluePointEditMode()) {
+ ForceUndirtyMrkPnt();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz && !bRet; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrObject* pObj=pM->GetObj();
+ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+ bRet=pGPL!=NULL && pGPL->GetCount()!=0;
+ }
+ }
+ return bRet;
+}
+
+ULONG SdrMarkView::GetMarkableGluePointCount() const
+{
+ ULONG nAnz=0;
+ if (IsGluePointEditMode()) {
+ ForceUndirtyMrkPnt();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrObject* pObj=pM->GetObj();
+ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+ if (pGPL!=NULL) {
+ nAnz+=pGPL->GetCount();
+ }
+ }
+ }
+ return nAnz;
+}
+
+BOOL SdrMarkView::HasMarkedGluePoints() const
+{
+ ForceUndirtyMrkPnt();
+ BOOL bRet=FALSE;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz && !bRet; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
+ bRet=pPts!=NULL && pPts->GetCount()!=0;
+ }
+ return bRet;
+}
+
+ULONG SdrMarkView::GetMarkedGluePointCount() const
+{
+ ForceUndirtyMrkPnt();
+ ULONG nAnz=0;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
+ if (pPts!=NULL) nAnz+=pPts->GetCount();
+ }
+ return nAnz;
+}
+
+BOOL SdrMarkView::MarkGluePoints(const Rectangle* pRect, BOOL bUnmark)
+{
+ if (!IsGluePointEditMode() && !bUnmark) return FALSE;
+ ForceUndirtyMrkPnt();
+ BOOL bChgd=FALSE;
+ aMark.ForceSort();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ const SdrObject* pObj=pM->GetObj();
+ const SdrPageView* pPV=pM->GetPageView();
+ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+ SdrUShortCont* pPts=pM->GetMarkedGluePoints();
+ if (bUnmark && pRect==NULL) { // UnmarkAll
+ if (pPts!=NULL && pPts->GetCount()!=0) {
+ pPts->Clear();
+ bChgd=TRUE;
+ }
+ } else {
+ if (pGPL!=NULL && (pPts!=NULL || !bUnmark)) {
+ USHORT nGPAnz=pGPL->GetCount();
+ for (USHORT nGPNum=0; nGPNum<nGPAnz; nGPNum++) {
+ const SdrGluePoint& rGP=(*pGPL)[nGPNum];
+ Point aPos(rGP.GetAbsolutePos(*pObj));
+ aPos+=pPV->GetOffset();
+ if (pRect==NULL || pRect->IsInside(aPos)) {
+ if (pPts==NULL) pPts=pM->ForceMarkedGluePoints();
+ else pPts->ForceSort();
+ ULONG nPos=pPts->GetPos(rGP.GetId());
+ if (!bUnmark && nPos==CONTAINER_ENTRY_NOTFOUND) {
+ bChgd=TRUE;
+ pPts->Insert(rGP.GetId());
+ }
+ if (bUnmark && nPos!=CONTAINER_ENTRY_NOTFOUND) {
+ bChgd=TRUE;
+ pPts->Remove(nPos);
+ }
+ }
+ }
+ }
+ }
+ }
+ if (bChgd) {
+ AdjustMarkHdl();
+ MarkListHasChanged();
+ }
+ return bChgd;
+}
+
+BOOL SdrMarkView::PickGluePoint(const Point& rPnt, SdrObject*& rpObj, USHORT& rnId, SdrPageView*& rpPV, ULONG nOptions) const
+{
+ SdrObject* pObj0=rpObj;
+ SdrPageView* pPV0=rpPV;
+ USHORT nId0=rnId;
+ rpObj=NULL; rpPV=NULL; rnId=0;
+ if (!IsGluePointEditMode()) return FALSE;
+ BOOL bBack=(nOptions & SDRSEARCH_BACKWARD) !=0;
+ BOOL bNext=(nOptions & SDRSEARCH_NEXT) !=0;
+ const OutputDevice* pOut=(const OutputDevice*)pActualOutDev;
+ if (pOut==NULL) const OutputDevice* pOut=GetWin(0);
+ if (pOut==NULL) return FALSE;
+ ((SdrMarkView*)this)->aMark.ForceSort();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ ULONG nMarkNum=bBack ? 0 : nMarkAnz;
+ if (bNext) {
+ nMarkNum=((SdrMarkView*)this)->aMark.FindObject(pObj0);
+ if (nMarkNum==CONTAINER_ENTRY_NOTFOUND) return FALSE;
+ if (!bBack) nMarkNum++;
+ }
+ while (bBack ? nMarkNum<nMarkAnz : nMarkNum>0) {
+ if (!bBack) nMarkNum--;
+ const SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrObject* pObj=pM->GetObj();
+ SdrPageView* pPV=pM->GetPageView();
+ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+ if (pGPL!=NULL) {
+ Point aPnt(rPnt);
+ aPnt-=pPV->GetOffset();
+ USHORT nNum=pGPL->HitTest(aPnt,*pOut,pObj,bBack,bNext,nId0);
+ if (nNum!=SDRGLUEPOINT_NOTFOUND) {
+ rpObj=pObj;
+ rnId=(*pGPL)[nNum].GetId();
+ rpPV=pPV;
+ return TRUE;
+ }
+ }
+ bNext=FALSE; // HitNextGluePoint nur beim ersten Obj
+ if (bBack) nMarkNum++;
+ }
+ return FALSE;
+}
+
+BOOL SdrMarkView::MarkGluePoint(const SdrObject* pObj, USHORT nId, const SdrPageView* pPV, BOOL bUnmark)
+{
+ if (!IsGluePointEditMode()) return FALSE;
+ ForceUndirtyMrkPnt();
+ BOOL bChgd=FALSE;
+ if (pObj!=NULL) {
+ ULONG nMarkPos=aMark.FindObject(pObj);
+ if (nMarkPos!=CONTAINER_ENTRY_NOTFOUND) {
+ SdrMark* pM=aMark.GetMark(nMarkPos);
+ SdrUShortCont* pPts=bUnmark ? pM->GetMarkedGluePoints() : pM->ForceMarkedGluePoints();
+ if (pPts!=NULL) {
+ ULONG nPointPos=pPts->GetPos(nId);
+ if (!bUnmark && nPointPos==CONTAINER_ENTRY_NOTFOUND) {
+ bChgd=TRUE;
+ pPts->Insert(nId);
+ }
+ if (bUnmark && nPointPos!=CONTAINER_ENTRY_NOTFOUND) {
+ bChgd=TRUE;
+ pPts->Remove(nPointPos);
+ }
+ }
+ } else {
+ // Objekt implizit markieren ...
+ // ... fehlende Implementation
+ }
+ }
+ if (bChgd) {
+ AdjustMarkHdl();
+ MarkListHasChanged();
+ }
+ return bChgd;
+}
+
+BOOL SdrMarkView::IsGluePointMarked(const SdrObject* pObj, USHORT nId) const
+{
+ ForceUndirtyMrkPnt();
+ BOOL bRet=FALSE;
+ ULONG nPos=((SdrMarkView*)this)->aMark.FindObject(pObj); // casting auf NonConst
+ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
+ const SdrMark* pM=aMark.GetMark(nPos);
+ const SdrUShortCont* pPts=pM->GetMarkedGluePoints();
+ if (pPts!=NULL) {
+ bRet=pPts->Exist(nId);
+ }
+ }
+ return bRet;
+}
+
+BOOL SdrMarkView::UnmarkGluePoint(const SdrHdl& rHdl)
+{
+ if (&rHdl!=NULL && rHdl.GetKind()==HDL_GLUE && rHdl.GetObj()!=NULL) {
+ return MarkGluePoint(rHdl.GetObj(),rHdl.GetObjHdlNum(),rHdl.GetPageView(),TRUE);
+ } else return FALSE;
+}
+
+SdrHdl* SdrMarkView::GetGluePointHdl(const SdrObject* pObj, USHORT nId) const
+{
+ ForceUndirtyMrkPnt();
+ ULONG nHdlAnz=aHdl.GetHdlCount();
+ for (ULONG nHdlNum=0; nHdlNum<nHdlAnz; nHdlNum++) {
+ SdrHdl* pHdl=aHdl.GetHdl(nHdlNum);
+ if (pHdl->GetObj()==pObj &&
+ pHdl->GetKind()==HDL_GLUE &&
+ pHdl->GetObjHdlNum()==nId ) return pHdl;
+ }
+ return NULL;
+}
+
+BOOL SdrMarkView::MarkNextGluePoint(BOOL bPrev)
+{
+ ForceUndirtyMrkPnt();
+ BOOL bChgd=FALSE;
+ aMark.ForceSort();
+ // ...
+ if (bChgd) {
+ MarkListHasChanged();
+ }
+ return bChgd;
+}
+
+BOOL SdrMarkView::MarkNextGluePoint(const Point& rPnt, BOOL bPrev)
+{
+ ForceUndirtyMrkPnt();
+ BOOL bChgd=FALSE;
+ aMark.ForceSort();
+ // ...
+ if (bChgd) {
+ MarkListHasChanged();
+ }
+ return bChgd;
+}
+
+const Rectangle& SdrMarkView::GetMarkedGluePointsRect() const
+{
+ ForceUndirtyMrkPnt();
+ if (bMarkedPointsRectsDirty) ImpSetPointsRects();
+ return aMarkedGluePointsRect;
+}
+
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
new file mode 100644
index 0000000000..51633ffc04
--- /dev/null
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -0,0 +1,1327 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdoattr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdoattr.hxx"
+#include "xpool.hxx"
+#include "svditext.hxx"
+#include "svdtouch.hxx"
+#include "svdio.hxx"
+#include "svdmodel.hxx"
+#include "svdxout.hxx"
+#include "svdpage.hxx"
+#include "svdattr.hxx"
+#include "svdattrx.hxx" // NotPersistItems
+#include "svdpool.hxx"
+#include "svdotext.hxx"
+#include "svdocapt.hxx"
+#include "svdograf.hxx" // fuer GetAttributes: Keine Linie, keine Flaeche
+#include "svdoole2.hxx" // fuer GetAttributes: Keine Linie, keine Flaeche
+#include "svdorect.hxx" // fuer GetAttributes: Eckenradius
+#include "svdocirc.hxx" // fuer GetAttributes: Eckenradius
+#include "svdomeas.hxx" // fuer GetAttributes: Kein Fontwork, kein ContourFrame
+
+#ifndef _SFXSMPLHINT_HXX //autogen
+#include <svtools/smplhint.hxx>
+#endif
+
+#ifndef _SFXITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
+
+#ifndef _XENUM_HXX //autogen
+#include "xenum.hxx"
+#endif
+
+#ifndef _SVX_XLINEIT0_HXX //autogen
+#include "xlineit0.hxx"
+#endif
+
+#ifndef _SVX_XLNSTWIT_HXX //autogen
+#include "xlnstwit.hxx"
+#endif
+
+#ifndef _SVX_XLNEDWIT_HXX //autogen
+#include "xlnedwit.hxx"
+#endif
+
+#ifndef SVX_XFILLIT0_HXX //autogen
+#include "xfillit0.hxx"
+#endif
+
+#ifndef _SVX_XFLBMTIT_HXX //autogen
+#include "xflbmtit.hxx"
+#endif
+
+#ifndef _SVX_TEXTIT0_HXX //autogen
+#include "xtextit0.hxx"
+#endif
+
+#ifndef _SVX_XFLBSTIT_HXX //autogen
+#include "xflbstit.hxx"
+#endif
+
+#ifndef _SVX_XFLBTOXY_HXX //autogen
+#include "xflbtoxy.hxx"
+#endif
+
+#ifndef _SVX_XFTSHIT_HXX //autogen
+#include "xftshit.hxx"
+#endif
+
+#ifndef _EEITEMID_HXX
+#include <eeitemid.hxx>
+#endif
+
+#ifndef _SVX_COLRITEM_HXX //autogen
+#include "colritem.hxx"
+#endif
+
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include "fontitem.hxx"
+#endif
+
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include "fhgtitem.hxx"
+#endif
+
+#ifndef _SVX_FWDTITEM_HXX //autogen
+#include "fwdtitem.hxx"
+#endif
+
+#ifndef _SVX_XLNSTCIT_HXX //autogen
+#include <xlnstcit.hxx>
+#endif
+
+#ifndef _SVX_XLNWTIT_HXX //autogen
+#include <xlnwtit.hxx>
+#endif
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+
+#ifndef _SVX_XLNCLIT_HXX //autogen
+#include <xlnclit.hxx>
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX //autogen
+#include <xflclit.hxx>
+#endif
+
+#ifndef _SVX_XLNTRIT_HXX //autogen
+#include <xlntrit.hxx>
+#endif
+
+#ifndef _SVX_XFLTRIT_HXX //autogen
+#include <xfltrit.hxx>
+#endif
+
+#ifndef _SVX_XFLHTIT_HXX //autogen
+#include <xflhtit.hxx>
+#endif
+
+#ifndef _SVX_XLNEDIT_HXX //autogen
+#include <xlnedit.hxx>
+#endif
+
+#ifndef _SVX_XLNEDCIT_HXX //autogen
+#include <xlnedcit.hxx>
+#endif
+
+#ifndef _SVX_XLNSTIT_HXX //autogen
+#include <xlnstit.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrAttrObj,SdrObject);
+
+SdrAttrObj::SdrAttrObj():
+ pLineAttr(NULL),
+ pFillAttr(NULL),
+ pTextAttr(NULL),
+ pShadAttr(NULL),
+ pOutlAttr(NULL),
+ pMiscAttr(NULL),
+ pStyleSheet(NULL)
+{
+}
+
+SdrAttrObj::~SdrAttrObj()
+{
+ pLineAttr=(XLineAttrSetItem*) ImpSetNewAttr(pLineAttr,NULL,FALSE);
+ pFillAttr=(XFillAttrSetItem*) ImpSetNewAttr(pFillAttr,NULL,FALSE);
+ pTextAttr=(XTextAttrSetItem*) ImpSetNewAttr(pTextAttr,NULL,FALSE);
+ pShadAttr=(SdrShadowSetItem*) ImpSetNewAttr(pShadAttr,NULL,FALSE);
+ pOutlAttr=(SdrOutlinerSetItem*)ImpSetNewAttr(pOutlAttr,NULL,FALSE);
+ pMiscAttr=(SdrMiscSetItem*) ImpSetNewAttr(pMiscAttr,NULL,FALSE);
+}
+
+const Rectangle& SdrAttrObj::GetSnapRect() const
+{
+ if (bSnapRectDirty) {
+ ((SdrAttrObj*)this)->RecalcSnapRect();
+ ((SdrAttrObj*)this)->bSnapRectDirty=FALSE;
+ }
+ return aSnapRect;
+}
+
+void SdrAttrObj::operator=(const SdrObject& rObj)
+{
+ SdrObject::operator=(rObj);
+ SdrObject* pObj=(SdrObject*)&rObj;
+ SdrAttrObj* pAO=PTR_CAST(SdrAttrObj,pObj);
+ if (pAO!=NULL) {
+ pLineAttr=(const XLineAttrSetItem*) ImpSetNewAttr(pLineAttr,pAO->pLineAttr);
+ pFillAttr=(const XFillAttrSetItem*) ImpSetNewAttr(pFillAttr,pAO->pFillAttr);
+ pTextAttr=(const XTextAttrSetItem*) ImpSetNewAttr(pTextAttr,pAO->pTextAttr);
+ pShadAttr=(const SdrShadowSetItem*) ImpSetNewAttr(pShadAttr,pAO->pShadAttr);
+ pOutlAttr=(const SdrOutlinerSetItem*)ImpSetNewAttr(pOutlAttr,pAO->pOutlAttr);
+ pMiscAttr=(const SdrMiscSetItem*) ImpSetNewAttr(pMiscAttr,pAO->pMiscAttr);
+ RemoveStyleSheet();
+ AddStyleSheet(pAO->pStyleSheet,TRUE);
+ }
+}
+
+void SdrAttrObj::WriteData(SvStream& rOut) const
+{
+ SdrObject::WriteData(rOut);
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrAttrObj");
+#endif
+
+ SfxItemPool* pPool = GetItemPool();
+ if (pPool!=NULL) {
+ pPool->StoreSurrogate(rOut,pLineAttr);
+ pPool->StoreSurrogate(rOut,pFillAttr);
+ pPool->StoreSurrogate(rOut,pTextAttr);
+ pPool->StoreSurrogate(rOut,pShadAttr);
+ pPool->StoreSurrogate(rOut,pOutlAttr);
+ pPool->StoreSurrogate(rOut,pMiscAttr);
+ } else {
+ rOut<<UINT16(SFX_ITEMS_NULL);
+ rOut<<UINT16(SFX_ITEMS_NULL);
+ rOut<<UINT16(SFX_ITEMS_NULL);
+ rOut<<UINT16(SFX_ITEMS_NULL);
+ rOut<<UINT16(SFX_ITEMS_NULL);
+ rOut<<UINT16(SFX_ITEMS_NULL);
+ }
+
+ // StyleSheet-Pointer als Name, Familie abspeichern
+ // wenn kein StyleSheet vorhanden: leeren String speichern
+ if(pStyleSheet)
+ {
+ // UNICODE: rOut << pStyleSheet->GetName();
+ rOut.WriteByteString(pStyleSheet->GetName());
+
+ rOut << (UINT16)(int)(pStyleSheet->GetFamily());
+ }
+ else
+ {
+ // UNICODE: rOut << String();
+ rOut.WriteByteString(String());
+ }
+ // ab Version 1 wird der CharacterSet gespeichert
+ // rOut << (INT16) ::GetSystemCharSet(); // und ab V11 nicht mehr
+}
+
+void SdrAttrObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ SdrObject::ReadData(rHead,rIn);
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrAttrObj");
+#endif
+ SfxItemPool* pPool=GetItemPool();
+
+ if (pPool!=NULL) {
+ USHORT nWhichRef;
+ if (rHead.GetVersion()<11) { UINT16 nWhichDum; rIn>>nWhichDum; } // ab V11 keine WhichId mehr
+ pLineAttr=(const XLineAttrSetItem*)ImpSetNewAttr(pLineAttr,NULL); // ggf altes rauswerfen
+ nWhichRef=XATTRSET_LINE;
+ pLineAttr=(const XLineAttrSetItem*)pPool->LoadSurrogate(rIn,nWhichRef,0);
+
+ if (rHead.GetVersion()<11) { UINT16 nWhichDum; rIn>>nWhichDum; } // ab V11 keine WhichId mehr
+ pFillAttr=(const XFillAttrSetItem*)ImpSetNewAttr(pFillAttr,NULL); // ggf altes rauswerfen
+ nWhichRef=XATTRSET_FILL;
+ pFillAttr=(const XFillAttrSetItem*)pPool->LoadSurrogate(rIn,nWhichRef,0);
+
+ if (rHead.GetVersion()<11) { UINT16 nWhichDum; rIn>>nWhichDum; } // ab V11 keine WhichId mehr
+ pTextAttr=(const XTextAttrSetItem*)ImpSetNewAttr(pTextAttr,NULL); // ggf altes rauswerfen
+ nWhichRef=XATTRSET_TEXT;
+ pTextAttr=(const XTextAttrSetItem*)pPool->LoadSurrogate(rIn,nWhichRef,0);
+
+ if (rHead.GetVersion()<11) { UINT16 nWhichDum; rIn>>nWhichDum; } // ab V11 keine WhichId mehr
+ pShadAttr=(const SdrShadowSetItem*)ImpSetNewAttr(pShadAttr,NULL); // ggf altes rauswerfen
+ nWhichRef=SDRATTRSET_SHADOW;
+ pShadAttr=(const SdrShadowSetItem*)pPool->LoadSurrogate(rIn,nWhichRef,0);
+
+ if (rHead.GetVersion()>=5) {
+ if (rHead.GetVersion()<11) { UINT16 nWhichDum; rIn>>nWhichDum; } // ab V11 keine WhichId mehr
+ pOutlAttr=(const SdrOutlinerSetItem*)ImpSetNewAttr(pOutlAttr,NULL); // ggf altes rauswerfen
+ nWhichRef=SDRATTRSET_OUTLINER;
+ pOutlAttr=(const SdrOutlinerSetItem*)pPool->LoadSurrogate(rIn,nWhichRef,0);
+ }
+
+ if (rHead.GetVersion()>=6) {
+ if (rHead.GetVersion()<11) { UINT16 nWhichDum; rIn>>nWhichDum; } // ab V11 keine WhichId mehr
+ pMiscAttr=(const SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,NULL); // ggf altes rauswerfen
+ nWhichRef=SDRATTRSET_MISC;
+ pMiscAttr=(const SdrMiscSetItem*)pPool->LoadSurrogate(rIn,nWhichRef,0);
+ }
+ } else {
+ // an den Surrogaten und ggf. auch Whiches vorbeiseeken
+ USHORT nAnz=4; // ganz zu anfang waren es 4 SetItems
+ if (rHead.GetVersion()>=5) nAnz++;
+ if (rHead.GetVersion()>=6) nAnz++;
+ nAnz*=sizeof(UINT16);
+ if (rHead.GetVersion()<11) nAnz*=2; // ab V11 keine WhichId mehr
+ rIn.SeekRel(nAnz);
+ }
+
+ // TextToContour: altes Format(Flag) in neues Format(Item) wandeln
+ if (rHead.GetVersion()<=4 && pPool!=NULL) {
+ SfxItemSet aSet(*pPool);
+ aSet.Put(XFormTextStyleItem(XFT_NONE));
+ NbcSetAttributes(aSet,FALSE);
+ }
+
+ // Fuer die StyleSheetgeschichte gehoert eigentlich auch noch eine
+ // Versionsabfrage hierher.
+ // Name und Familie des StyleSheet einlesen, in Pointer auf StyleSheet
+ // umwandeln lassen (SB)
+ XubString aStyleSheetName;
+ SfxStyleFamily eFamily;
+ UINT16 nRead;
+
+ // UNICODE: rIn>>aStyleSheetName;
+ rIn.ReadByteString(aStyleSheetName);
+
+ if(aStyleSheetName.Len())
+ {
+ rIn >> nRead;
+ eFamily = (SfxStyleFamily)(int)nRead;
+
+ // ab Version 1 wird der CharacterSet gelesen, ab V11 nicht mehr
+ if(rHead.GetVersion() > 0 && rHead.GetVersion() < 11)
+ {
+ INT16 nCharSet;
+ rIn >> nCharSet;
+ //aStyleSheetName.Convert((CharSet)nCharSet);
+ // nicht mehr noetig, da ab Vers 11 der CharSet bereits am
+ // Stream gesetzt wird.
+ }
+
+ DBG_ASSERT( pModel!=NULL, "SdrAttrObj::ReadData(): pModel=NULL, StyleSheet kann nicht gesetzt werden!");
+ if (pModel!=NULL) {
+ SfxStyleSheetBasePool* pPool=pModel->GetStyleSheetPool();
+#ifdef DBG_UTIL
+ if( pPool == NULL )
+ DBG_WARNING("SdrAttrObj::ReadData(): kein StyleSheetPool");
+#endif
+ if (pPool!=NULL) {
+ SfxStyleSheet* pTmpStyleSheet=(SfxStyleSheet*)pPool->Find(aStyleSheetName,eFamily);
+#ifdef DBG_UTIL
+ if(pTmpStyleSheet == NULL)
+ DBG_WARNING("SdrAttrObj::ReadData(): StyleSheet nicht gefunden");
+#endif
+ if (pTmpStyleSheet!=NULL) {
+ StartListening(*pPool);
+ StartListening(*pTmpStyleSheet);
+ SfxItemSet* pParent=&pTmpStyleSheet->GetItemSet();
+ if (pLineAttr!=NULL) ((SfxItemSet*)&pLineAttr->GetItemSet())->SetParent(pParent);
+ if (pFillAttr!=NULL) ((SfxItemSet*)&pFillAttr->GetItemSet())->SetParent(pParent);
+ if (pTextAttr!=NULL) ((SfxItemSet*)&pTextAttr->GetItemSet())->SetParent(pParent);
+ if (pShadAttr!=NULL) ((SfxItemSet*)&pShadAttr->GetItemSet())->SetParent(pParent);
+ if (pOutlAttr!=NULL) ((SfxItemSet*)&pOutlAttr->GetItemSet())->SetParent(pParent);
+ if (pMiscAttr!=NULL) ((SfxItemSet*)&pMiscAttr->GetItemSet())->SetParent(pParent);
+ // ausnahmsweise die harte Attributierung nicht loeschen
+ //AddStyleSheet(pTmpStyleSheet,TRUE);
+ pStyleSheet=pTmpStyleSheet;
+ }
+ }
+ }
+ }
+}
+
+SfxItemPool* SdrAttrObj::ImpGetItemPool(const SfxPoolItem* pAlternateItem1, const SfxPoolItem* pAlternateItem2) const
+{
+ SfxItemPool* pPool= (pModel==NULL) ? NULL : &pModel->GetItemPool();
+ if (pPool==NULL) {
+ SfxSetItem* pSI;
+ if (pAlternateItem1!=NULL) {
+ pSI=PTR_CAST(SfxSetItem,pAlternateItem1);
+ if (pSI!=NULL) pPool=(SfxItemPool*)pSI->GetItemSet().GetPool();
+ }
+ if (pPool==NULL && pAlternateItem2!=NULL) {
+ pSI=PTR_CAST(SfxSetItem,pAlternateItem2);
+ if (pSI!=NULL) pPool=(SfxItemPool*)pSI->GetItemSet().GetPool();
+ }
+ }
+ return pPool;
+}
+
+SfxItemPool* SdrAttrObj::ImpGetItemPool() const
+{
+ SfxItemPool* pPool= (pModel==NULL) ? NULL : &pModel->GetItemPool();
+ if (pPool==NULL) {
+ USHORT nAnz=GetSetItemCount();
+ for (USHORT i=0; i<nAnz && pPool==NULL; i++) {
+ const SfxSetItem* pSI=GetSetItem(i);
+ if (pSI!=NULL) pPool=pSI->GetItemSet().GetPool();
+ }
+ }
+ return pPool;
+}
+
+const SfxPoolItem* SdrAttrObj::ImpSetNewAttr(const SfxPoolItem* pAkt, const SfxPoolItem* pNew, FASTBOOL bChg)
+{
+ SfxItemPool* pPool=ImpGetItemPool(pAkt,pNew);
+ if (pPool!=NULL) {
+ if (pAkt!=NULL) pPool->Remove(*pAkt);
+ if (pNew!=NULL) pNew=&pPool->Put(*pNew);
+ }
+ return pNew;
+}
+
+static void ImpScaleItemSet(SfxItemSet& rSet, const Fraction& rScale)
+{
+ long nMul=rScale.GetNumerator();
+ long nDiv=rScale.GetDenominator();
+ if (!rScale.IsValid() || nDiv==0) return;
+ SfxWhichIter aIter(rSet);
+ USHORT nWhich=aIter.FirstWhich();
+ while (nWhich!=0) {
+ const SfxPoolItem *pItem=NULL;
+ if (rSet.GetItemState(nWhich,FALSE,&pItem)==SFX_ITEM_SET) {
+ if (pItem->HasMetrics()) {
+ SfxPoolItem* pNewItem=pItem->Clone();
+ pNewItem->ScaleMetrics(nMul,nDiv);
+ rSet.Put(*pNewItem);
+ }
+ } // if (rSet.GetItemState(...)==SFX_ITEM_SET)
+ nWhich=aIter.NextWhich();
+ }
+}
+
+void SdrAttrObj::SetModel(SdrModel* pNewModel)
+{
+ SdrModel* pOldModel=pModel;
+ SdrObject::SetModel(pNewModel);
+ if (pOldModel!=pNewModel && pNewModel!=NULL && !pNewModel->IsLoading()) {
+ // fuer ein frisch eingefuegtes Obj die Defaultattribute setzen
+ if (pOldModel==NULL) ForceDefaultAttr(&pModel->GetItemPool());
+ // fuer ein bereits "lebendes" Model die Attribute von einem Pool in den anderen schieben
+ if (pOldModel!=NULL) {
+ // Checken, ob sich die ScaleUnit geaendert hat.
+ // Denn dann muessen naemlich alle MetrikItems umgerechnet werden.
+ MapUnit aOldUnit(pOldModel->GetScaleUnit());
+ MapUnit aNewUnit(pNewModel->GetScaleUnit());
+ FASTBOOL bScaleUnitChanged=aNewUnit!=aOldUnit;
+ Fraction aMetricFactor;
+ if (bScaleUnitChanged) aMetricFactor=GetMapFactor(aOldUnit,aNewUnit).X();
+ // Und nun alle Items auf die das Obj verweisst aus
+ // dem alten Pools raus und in den neuen rein.
+ SdrItemPool& rOldPool=(SdrItemPool&)pOldModel->GetItemPool();
+ SdrItemPool& rNewPool=(SdrItemPool&)pModel->GetItemPool();
+
+ DBG_ASSERT(&rOldPool!=NULL,"SdrAttrObj::SetModel(): Kein ItemPool am alten Model");
+ DBG_ASSERT(&rNewPool!=NULL,"SdrAttrObj::SetModel(): Kein ItemPool am neuen Model");
+
+ USHORT nItemSetAnz=GetSetItemCount();
+ for (USHORT i=0; i<nItemSetAnz; i++) {
+ const SfxSetItem* pSI=GetSetItem(i);
+ if (pSI!=NULL) {
+ const SfxSetItem* pNewAttr=NULL;
+ if (!bScaleUnitChanged) {
+ pNewAttr=&(const SfxSetItem&)rNewPool.Put(*pSI);
+ } else { // ggf. alle MetrikItems Skalieren
+ SfxSetItem* pNewSetItem=(SfxSetItem*)pSI->Clone(&rNewPool);
+ ImpScaleItemSet(pNewSetItem->GetItemSet(),aMetricFactor);
+ pNewAttr=&(const SfxSetItem&)rNewPool.Put(*pNewSetItem);
+ }
+ rOldPool.Remove(*pSI);
+ SetSetItem(i,pNewAttr);
+ }
+ }
+
+ // ***** StyleSheets Anfang *****
+ // ggfs. StyleSheet und dessen Parents kopieren
+ // Follows werden nicht beruecksichtigt (ganz wie im Writer)
+ if (pStyleSheet!=NULL) {
+ SfxStyleSheetBase* pSheet =pStyleSheet;
+ SfxStyleSheetBasePool* pOldPool=pOldModel->GetStyleSheetPool();
+ SfxStyleSheetBasePool* pNewPool=pModel->GetStyleSheetPool();
+ DBG_ASSERT(pOldPool!=NULL,"SdrAttrObj::SetModel(): Objekt hat StyleSheet aber keinen StyleSheetPool am SdrModel");
+ if (pOldPool!=NULL) {
+ if (pNewPool!=NULL) {
+ // Liste der zu kopierenden Vorlagen
+ List aList;
+ SfxStyleSheetBase* pAnchor=NULL;
+ if (pOldPool!=NULL && pNewPool!=NULL) {
+ while (pSheet!=NULL) {
+ pAnchor=pNewPool->Find(pSheet->GetName(),pSheet->GetFamily());
+ if (pAnchor==NULL) {
+ aList.Insert(pSheet,LIST_APPEND);
+ pSheet=pOldPool->Find(pSheet->GetParent(),pSheet->GetFamily());
+ } else {
+ pSheet=NULL; // die gesuchte Vorlage gibt's schon
+ }
+ }
+ }
+
+ // kopieren und Parents der Kopien setzen
+ pSheet=(SfxStyleSheetBase*)aList.First();
+ SfxStyleSheetBase* pNewSheet=NULL;
+ SfxStyleSheetBase* pLastSheet=NULL;
+ SfxStyleSheetBase* pForThisObject=NULL;
+ if (pNewPool!=NULL) {
+ while (pSheet!=NULL) {
+ pNewSheet = &pNewPool->Make(pSheet->GetName(),
+ pSheet->GetFamily(),
+ pSheet->GetMask());
+ pNewSheet->GetItemSet().Put(pSheet->GetItemSet(),FALSE); // FALSE= InvalidItems nicht als Default, sondern als "Loecher" betrachten
+ if (bScaleUnitChanged) { // ggf. alle MetrikItems Skalieren
+ ImpScaleItemSet(pNewSheet->GetItemSet(),aMetricFactor);
+ }
+ if (pLastSheet!=NULL) {
+ pLastSheet->SetParent(pNewSheet->GetName());
+ }
+
+ if (pForThisObject==NULL)
+ pForThisObject=pNewSheet; // den kriegt das Objekt
+
+ pLastSheet=pNewSheet;
+ pSheet=(SfxStyleSheetBase*)aList.Next();
+ }
+ }
+
+ // Veknuepfung mit der im Zielpool gefundenen Vorlage
+ if (pAnchor!=NULL && pLastSheet!=NULL)
+ pLastSheet->SetParent(pAnchor->GetName());
+
+ // falls die Liste leer war (alle Vorlagen schon im Zielpool
+ // vorhanden) ist pForThisObject noch nicht gesetzt
+ if (pForThisObject==NULL && pAnchor!=NULL)
+ pForThisObject=pAnchor;
+
+ // am alten StyleSheet ab- und am neuen anmelden
+ RemoveStyleSheet();
+ AddStyleSheet((SfxStyleSheet*)pForThisObject,TRUE);
+ } else { // if (pNewPool!=NULL)
+ // Aha, im neuen Model gibt's also kein StyleSheetPool
+ // also setzte ich "einfach" alle Attribute des alten StyleSheets hart
+ List aList;
+ const SfxItemSet* pItemSet=&pStyleSheet->GetItemSet();
+ while (pItemSet!=NULL) {
+ aList.Insert((void*)pItemSet,CONTAINER_APPEND);
+ pItemSet=pItemSet->GetParent();
+ }
+ SfxItemSet aSet(pNewModel->GetItemPool());
+ pItemSet=(SfxItemSet*)aList.Last();
+ while (pItemSet!=NULL) {
+ aSet.Put(*pItemSet);
+ pItemSet=(SfxItemSet*)aList.Prev();
+ }
+ // Attribute, die schon vorher hart gesetzt
+ // waren muessen aber erhalten bleiben:
+ for (USHORT i=0; i<nItemSetAnz; i++) {
+ const SfxSetItem* pSI=GetSetItem(i);
+ if (pSI!=NULL) {
+ const SfxItemSet& rIS=pSI->GetItemSet();
+ SfxWhichIter aIter(rIS);
+ USHORT nWhich=aIter.FirstWhich();
+ while (nWhich!=0) {
+ if (rIS.GetItemState(nWhich,FALSE)==SFX_ITEM_SET) {
+ aSet.ClearItem(nWhich);
+ }
+ nWhich=aIter.NextWhich();
+ }
+ }
+ }
+ if (bScaleUnitChanged) { // ggf. alle MetrikItems Skalieren
+ ImpScaleItemSet(aSet,aMetricFactor);
+ }
+ SetAttributes(aSet,FALSE);
+ RemoveStyleSheet();
+ } // if (pNewPool!=NULL)
+ } // if (pOldPool!=NULL)
+ } // if (pStyleSheet!=NULL)
+ // ***** StyleSheets Ende *****
+ }
+ // Jedes Objekt bekommt initial den DefaultStyleSheet
+ // des Model, falls noch kein StyleSheet gesetzt.
+ // Der DefaultStyleSheet wird jedoch nur gesetzt, wenn das Objekt auch
+ // Attribute hat (Entscheidung anhand pLineAttr!=NULL). 3D-Objekte
+ // haben naemlich z.T. keine eigenen Attribute. (Joe M. 04-12-1996)
+ if (pLineAttr!=NULL && pStyleSheet==NULL && pModel!=NULL && !pModel->IsLoading()) {
+ SfxStyleSheet* pDefSS=pModel->GetDefaultStyleSheet();
+ if (pDefSS!=NULL) {
+ // Dabei jedoch nicht die harte Attributierung loeschen!
+ AddStyleSheet(pDefSS,TRUE);
+ }
+ }
+ } // if (pOldModel!=pNewModel && pNewModel!=NULL && !pNewModel->IsLoading())
+}
+
+void SdrAttrObj::ForceDefaultAttr(SfxItemPool* pPool)
+{
+ if (pPool!=NULL && pLineAttr==NULL) {
+ SdrTextObj* pText=PTR_CAST(SdrTextObj,this);
+ SdrCaptionObj* pCapt=PTR_CAST(SdrCaptionObj,this);
+ FASTBOOL bTextFrame=pText!=NULL && pText->IsTextFrame();
+ FASTBOOL bCaption=pCapt!=NULL;
+
+#ifdef SDRDEFITEMCACHE
+ // SdrItemPool in der Verkettung suchen (wg. Writer)
+ SdrItemPool* pSdrPool=NULL;
+ SfxItemPool* pTmpPool=pPool;
+ while (pTmpPool!=NULL && pSdrPool==NULL) {
+ // Etwas komplizierte Abfrage und auch Hack, weil am
+ // Pool kein RTTI vorhanden ist! Joe, 02-09-1997
+ if (pTmpPool->GetFirstWhich()<=SDRATTR_START && pTmpPool->GetLastWhich()>=SDRATTR_END) {
+ if (pTmpPool->GetName().EqualsAscii("XOutdevItemPool"))
+ pSdrPool=(SdrItemPool*)pTmpPool;
+ }
+ pTmpPool=pTmpPool->GetSecondaryPool();
+ }
+ DBG_ASSERT(pSdrPool!=NULL,"SdrAttrObj::ForceDefaultAttr(): Kein SdrItemPool gefunden!");
+ if (pSdrPool->pDefLineAttr==NULL) pSdrPool->ImpMakeDefItems();
+ if (bTextFrame) {
+ pLineAttr=bCaption ? pSdrPool->pDefLineAttr : pSdrPool->pDefTextFrameLineAttr;
+ pFillAttr=pSdrPool->pDefTextFrameFillAttr;
+ pTextAttr=pSdrPool->pDefTextFrameTextAttr;
+ pShadAttr=pSdrPool->pDefTextFrameShadAttr;
+ pOutlAttr=pSdrPool->pDefTextFrameOutlAttr;
+ pMiscAttr=pSdrPool->pDefTextFrameMiscAttr;
+ } else {
+ pLineAttr=pSdrPool->pDefLineAttr;
+ pFillAttr=pSdrPool->pDefFillAttr;
+ pTextAttr=pSdrPool->pDefTextAttr;
+ pShadAttr=pSdrPool->pDefShadAttr;
+ pOutlAttr=pSdrPool->pDefOutlAttr;
+ pMiscAttr=pSdrPool->pDefMiscAttr;
+ }
+ pLineAttr->AddRef();
+ pFillAttr->AddRef();
+ pTextAttr->AddRef();
+ pShadAttr->AddRef();
+ pOutlAttr->AddRef();
+ pMiscAttr->AddRef();
+#else // SDRDEFITEMCACHE
+ if (pLineAttr==NULL) {
+ XLineAttrSetItem aSetItem(pPool);
+ if (bTextFrame && !bCaption) {
+ aSetItem.GetItemSet().Put(XLineStyleItem(XLINE_NONE));
+ }
+ pLineAttr=(XLineAttrSetItem*)ImpSetNewAttr(pLineAttr,&aSetItem,FALSE);
+ }
+ if (pFillAttr==NULL) {
+ XFillAttrSetItem aSetItem(pPool);
+ if (bTextFrame) {
+ aSetItem.GetItemSet().Put(XFillColorItem(String(),Color(COL_WHITE))); // Falls einer auf Solid umschaltet
+ aSetItem.GetItemSet().Put(XFillStyleItem(XFILL_NONE));
+ }
+ pFillAttr=(XFillAttrSetItem*)ImpSetNewAttr(pFillAttr,&aSetItem,FALSE);
+ }
+ if (pTextAttr==NULL) {
+ XTextAttrSetItem aSetItem(pPool);
+ pTextAttr=(XTextAttrSetItem*)ImpSetNewAttr(pTextAttr,&aSetItem,FALSE);
+ }
+ if (pShadAttr==NULL) {
+ SdrShadowSetItem aSetItem(pPool);
+ pShadAttr=(SdrShadowSetItem*)ImpSetNewAttr(pShadAttr,&aSetItem,FALSE);
+ }
+ if (pOutlAttr==NULL) {
+ SdrOutlinerSetItem aSetItem(pPool);
+ if (!bTextFrame) {
+ aSetItem.GetItemSet().Put(SvxAdjustItem(SVX_ADJUST_CENTER));
+ }
+ pOutlAttr=(SdrOutlinerSetItem*)ImpSetNewAttr(pOutlAttr,&aSetItem,FALSE);
+ }
+ if (pMiscAttr==NULL) {
+ SdrMiscSetItem aSetItem(pPool);
+ if (!bTextFrame) {
+ aSetItem.GetItemSet().Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_CENTER));
+ aSetItem.GetItemSet().Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_CENTER));
+ }
+ pMiscAttr=(SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,&aSetItem,FALSE);
+ }
+#endif // SDRDEFITEMCACHE
+ }
+}
+
+void SdrAttrObj::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+ USHORT nAnz=GetSetItemCount();
+ FASTBOOL bHasText=GetOutlinerParaObject()!=NULL;
+ SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,this);
+ FASTBOOL bIsContourFrame=pTextObj!=NULL && pTextObj->IsContourTextFrame();
+ SdrMeasureObj* pMeasObj=PTR_CAST(SdrMeasureObj,this);
+ if (!bHasText && pTextObj!=NULL && pTextObj->IsTextEditActive()) bHasText=TRUE;
+ FASTBOOL bTextFrame=pTextObj!=NULL && pTextObj->IsTextFrame();
+ FASTBOOL bCanFontwork=bHasText && pTextObj!=NULL && !bTextFrame && pMeasObj==NULL;
+ FASTBOOL bCanContourFrame=bHasText && pTextObj!=NULL && !bTextFrame;
+ FASTBOOL bGrafObj=HAS_BASE(SdrGrafObj,this) || HAS_BASE(SdrOle2Obj,this);
+ FASTBOOL bHasEckRad=!bGrafObj && !bIsUnoObj && HAS_BASE(SdrRectObj,this) && !HAS_BASE(SdrCircObj,this);
+ FASTBOOL bHasFill=bClosedObj;
+ FASTBOOL bHasLEnd=!bClosedObj || HAS_BASE(SdrCaptionObj,this);
+ for (USHORT i=0; i<nAnz; i++) {
+ const SfxSetItem* pSI=GetSetItem(i);
+ FASTBOOL bOk=pSI!=NULL;
+ if (pSI==pFillAttr && !bHasFill) bOk=FALSE;
+ if (pSI==pTextAttr && !bCanFontwork) bOk=FALSE;
+ if (pSI==pOutlAttr && !bHasText) bOk=FALSE;
+ if (bGrafObj && (pSI==pFillAttr || pSI==pLineAttr)) bOk=FALSE; // fuer Grafik und OLE
+ if (pSI!=NULL && !bMerge && bOnlyHardAttr) bOk=TRUE; // z.B. im Falle Undo
+ if (bOk) {
+ const SfxItemSet& rIS=pSI->GetItemSet();
+ SfxWhichIter aIter(rIS);
+ USHORT nWhich=aIter.FirstWhich();
+ while (nWhich!=0) {
+ if ((bHasLEnd || nWhich<XATTR_LINESTART || nWhich>XATTR_LINEENDCENTER) &&
+ (bHasEckRad || nWhich!=SDRATTR_ECKENRADIUS) &&
+ (bHasText || nWhich<SDRATTR_TEXT_MINFRAMEHEIGHT || nWhich>SDRATTR_TEXT_CONTOURFRAME) &&
+ (bTextFrame || (nWhich!=SDRATTR_TEXT_AUTOGROWHEIGHT && nWhich!=SDRATTR_TEXT_MINFRAMEHEIGHT && nWhich!=SDRATTR_TEXT_MAXFRAMEHEIGHT &&
+ nWhich!=SDRATTR_TEXT_AUTOGROWWIDTH && nWhich!=SDRATTR_TEXT_MINFRAMEWIDTH && nWhich!=SDRATTR_TEXT_MAXFRAMEWIDTH)) &&
+ (bCanContourFrame || nWhich!=SDRATTR_TEXT_CONTOURFRAME) &&
+ (!bIsContourFrame || nWhich<SDRATTR_TEXT_MINFRAMEHEIGHT || nWhich>SDRATTR_TEXT_HORZADJUST) &&
+ (nWhich<EE_FEATURE_START || nWhich>EE_FEATURE_END) )
+ {
+ if (!bOnlyHardAttr || rIS.GetItemState(nWhich,FALSE)==SFX_ITEM_SET) {
+ const SfxPoolItem& rItem=rIS.Get(nWhich);
+ if (bMerge) rAttr.MergeValue(rItem,TRUE);
+ else rAttr.Put(rItem);
+ }
+ }
+ nWhich=aIter.NextWhich();
+ }
+ }
+ }
+ if (!bMerge && pLineAttr!=NULL) {
+ rAttr.SetParent(pLineAttr->GetItemSet().GetParent());
+ }
+}
+
+void SdrAttrObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ SfxItemPool* pPool=GetItemPool();
+ if (pPool==NULL) pPool=(SfxItemPool*)rAttr.GetPool();
+ ForceDefaultAttr(pPool);
+ USHORT nAnz=GetSetItemCount();
+
+ if (bReplaceAll) {
+ SfxWhichIter aWhIter(rAttr);
+ for (USHORT i=0; i<nAnz; i++) {
+ const SfxSetItem* pOldSI=GetSetItem(i);
+ if (pOldSI!=NULL) {
+ const SfxItemSet& rOldIS=pOldSI->GetItemSet();
+ const USHORT* pRanges=rOldIS.GetRanges();
+ FASTBOOL bOneRange=pRanges[2]==0;
+ USHORT nAnf=pRanges[0];
+ USHORT nEnd=pRanges[1];
+ SfxSetItem* pNewSI=NULL; //MakeNewSetItem(i,TRUE);
+ SfxItemSet* pDstSet=NULL; //pNewSI->GetItemSet();
+ // funkt nicht:
+ // pNewSI->GetItemSet().Set(rAttr);
+ // deshalb manuell #36313#
+ pNewSI=MakeNewSetItem(i,TRUE);
+ pDstSet=&pNewSI->GetItemSet();
+ USHORT nWhich=aWhIter.FirstWhich();
+ while (nWhich!=0) {
+ const SfxPoolItem* pItem=NULL;
+ SfxItemState eState=rAttr.GetItemState(nWhich,TRUE,&pItem);
+ if (eState==SFX_ITEM_DEFAULT) {
+ pDstSet->ClearItem(nWhich);
+ } else if (eState==SFX_ITEM_SET) {
+ if (nWhich<EE_FEATURE_START || nWhich>EE_FEATURE_END) {
+ pDstSet->Put(*pItem);
+ }
+ }
+ nWhich=aWhIter.NextWhich();
+ }
+ if (pNewSI!=NULL) {
+ SetSetItem(i,(SfxSetItem*)ImpSetNewAttr(pOldSI,pNewSI));
+ delete pNewSI;
+ }
+ }
+ }
+ } else {
+ SfxItemIter aItIter(rAttr);
+ for (USHORT i=0; i<nAnz; i++) {
+ const SfxSetItem* pOldSI=GetSetItem(i);
+ if (pOldSI!=NULL) {
+ const SfxItemSet& rOldIS=pOldSI->GetItemSet();
+ const USHORT* pRanges=rOldIS.GetRanges();
+ FASTBOOL bOneRange=pRanges[2]==0;
+ USHORT nAnf=pRanges[0];
+ USHORT nEnd=pRanges[1];
+ SfxSetItem* pNewSI=NULL; //MakeNewSetItem(i,TRUE);
+ SfxItemSet* pDstSet=NULL; //pNewSI->GetItemSet();
+ // funkt nicht:
+ //pNewSI->GetItemSet().Put(rAttr,FALSE); // FALSE= InvalidItems nicht als Default, sondern als "Loecher" betrachten
+ // deshalb manuell. (Bug 21223)
+ const SfxPoolItem* pItem=aItIter.FirstItem();
+ BOOL bFillAttrChangeHint(FALSE);
+
+ while (pItem!=NULL) {
+ if (!IsInvalidItem(pItem)) {
+ USHORT nWhich=pItem->Which();
+ if ((nWhich<EE_FEATURE_START || nWhich>EE_FEATURE_END) &&
+ (!bOneRange || (nWhich>=nAnf && nWhich<=nEnd))) {
+ if (pNewSI==NULL) {
+ pNewSI=MakeNewSetItem(i,TRUE);
+ pDstSet=&pNewSI->GetItemSet();
+ }
+
+ // Hinweis auf Veraenderung FillStyle
+ if(i==1 && nWhich == XATTR_FILLSTYLE)
+ bFillAttrChangeHint = TRUE;
+
+ pDstSet->Put(*pItem);
+ }
+ }
+ pItem=aItIter.NextItem();
+ }
+
+ if (pNewSI!=NULL)
+ {
+ if(bFillAttrChangeHint)
+ {
+ // FillStyle hat sich eventuell geaendert
+ XFillStyle eFillStyle = ((XFillStyleItem&)(rAttr.Get(XATTR_FILLSTYLE))).GetValue();
+
+ // Alle vom momentanen Stil nicht benutzten Items
+ // rauswerfen. Dies gilt NICHT fuer die Fuellfarbe
+ // (XFILL_SOLID). Diese wird als immer vorhandene
+ // Grundfarbe des Objektes angesehen (wird von 3D
+ // bereits so verwendet)
+
+ if(eFillStyle != XFILL_GRADIENT)
+ pDstSet->ClearItem(XATTR_FILLGRADIENT);
+
+ if(eFillStyle != XFILL_HATCH)
+ pDstSet->ClearItem(XATTR_FILLHATCH);
+
+ if(eFillStyle != XFILL_BITMAP)
+ pDstSet->ClearItem(XATTR_FILLBITMAP);
+ }
+
+ SetSetItem(i,(SfxSetItem*)ImpSetNewAttr(pOldSI,pNewSI));
+ delete pNewSI;
+ }
+ }
+ }
+ }
+ bBoundRectDirty=TRUE;
+ SetRectsDirty(TRUE);
+}
+
+void SdrAttrObj::SetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetAttributes(rAttr,bReplaceAll);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_CHGATTR,aBoundRect0);
+}
+
+void __EXPORT SdrAttrObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ SfxSimpleHint *pSimple = PTR_CAST(SfxSimpleHint,&rHint);
+ FASTBOOL bDataChg = pSimple != NULL && pSimple->GetId() == SFX_HINT_DATACHANGED;
+
+ SfxStyleSheetHint *pStyleHint = PTR_CAST(SfxStyleSheetHint, &rHint);
+ FASTBOOL bDying = pStyleHint != NULL && pStyleHint->GetHint() == SFX_STYLESHEET_INDESTRUCTION;
+
+ if (bDataChg || bDying) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SfxStyleSheet* pNewStSh=NULL;
+ FASTBOOL bBoundRectDirty0=bBoundRectDirty;
+ if (bDying) {
+ // wenn es einen Parent gibt, wird jetzt der genommen
+ if (HAS_BASE(SfxStyleSheet,pStyleSheet) && pModel!=NULL) { // Sonst ist pStyleSheet schon zu weit weggestorben
+ pNewStSh=(SfxStyleSheet*)pModel->GetStyleSheetPool()->Find(pStyleSheet->GetParent(),pStyleSheet->GetFamily());
+ }
+ // wenn es keinen Parent gibt, nehmen wir die Standardvorlage
+ if (pNewStSh==NULL && pModel!=NULL) {
+ pNewStSh=pModel->GetDefaultStyleSheet();
+ }
+ // alten StyleSheet vor SendRepaintBroadcast entfernen #42276#
+ RemoveStyleSheet(); // setzt bBoundRectDirty=TRUE
+ }
+ if (!bBoundRectDirty0) {
+ bBoundRectDirty=FALSE; // fuer Broadcast mit dem alten Rect
+ if(pPage && pPage->IsInserted())
+ SendRepaintBroadcast(); // Erstmal mit dem alten Rect
+ bBoundRectDirty=TRUE;
+ SetRectsDirty(TRUE); // Durch Vorlagenloeschung evtl. andere Linienbreite
+ }
+ if (pNewStSh && !bDying)
+ AddStyleSheet(pNewStSh,TRUE);
+
+ if(pPage && pPage->IsInserted())
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_CHGATTR,aBoundRect0);
+ }
+}
+
+SfxStyleSheet* SdrAttrObj::GetStyleSheet() const
+{
+ return pStyleSheet;
+}
+
+void SdrAttrObj::RemoveStyleSheet()
+{
+ // Typ checken, weil bei dying sich der Typ abbaut (bis zum Broadcaster runter)
+ if (pStyleSheet!=NULL && HAS_BASE(SfxStyleSheet,pStyleSheet))
+ {
+ EndListening(*pStyleSheet);
+ EndListening(pStyleSheet->GetPool());
+
+ // das ItemSet der Vorlage ist jetzt nicht mehr Parent der
+ // eigenen ItemSets
+ USHORT nAnz=GetSetItemCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ SfxSetItem* pNewSI=MakeNewSetItem(i,TRUE);
+ if (pNewSI!=NULL) {
+ pNewSI->GetItemSet().SetParent(NULL);
+ const SfxSetItem* pOldSI=GetSetItem(i);
+ // Alle Items aus der Vorlage von pOldSI nach pNewSI putten,
+ // also hart Attributieren.
+ // ... fehlende Implementation
+
+ const SfxSetItem* pNewSI2=(const SfxSetItem*)ImpSetNewAttr(pOldSI,pNewSI);
+ SetSetItem(i,pNewSI2);
+ delete pNewSI;
+ }
+ }
+ bBoundRectDirty=TRUE;
+ SetRectsDirty(TRUE);
+ }
+ pStyleSheet=NULL;
+}
+
+USHORT SdrAttrObj::GetSetItemCount() const
+{
+ return 6;
+}
+
+const SfxSetItem* SdrAttrObj::GetSetItem(USHORT nNum) const
+{
+ switch (nNum)
+ {
+ case 0 : return pLineAttr;
+ case 1 : return pFillAttr;
+ case 2 : return pTextAttr;
+ case 3 : return pShadAttr;
+ case 4 : return pOutlAttr;
+ case 5 : return pMiscAttr;
+ }
+ return NULL; // damit der Compiler nicht meckert
+}
+
+void SdrAttrObj::SetSetItem(USHORT nNum, const SfxSetItem* pAttr)
+{
+ switch (nNum)
+ {
+ case 0 : pLineAttr = (const XLineAttrSetItem*) pAttr; break;
+ case 1 : pFillAttr = (const XFillAttrSetItem*) pAttr; break;
+ case 2 : pTextAttr = (const XTextAttrSetItem*) pAttr; break;
+ case 3 : pShadAttr = (const SdrShadowSetItem*) pAttr; break;
+ case 4 : pOutlAttr = (const SdrOutlinerSetItem*)pAttr; break;
+ case 5 : pMiscAttr = (const SdrMiscSetItem*) pAttr; break;
+ }
+}
+
+SfxSetItem* SdrAttrObj::MakeNewSetItem(USHORT nNum, FASTBOOL bClone) const
+{
+ if (bClone)
+ {
+ switch (nNum)
+ {
+ case 0 : return new XLineAttrSetItem(*pLineAttr);
+ case 1 : return new XFillAttrSetItem(*pFillAttr);
+ case 2 : return new XTextAttrSetItem(*pTextAttr);
+ case 3 : return new SdrShadowSetItem(*pShadAttr);
+ case 4 : return new SdrOutlinerSetItem(*pOutlAttr);
+ case 5 : return new SdrMiscSetItem(*pMiscAttr);
+ }
+ }
+ else
+ {
+ switch (nNum)
+ {
+ case 0 : return new XLineAttrSetItem(GetItemPool());
+ case 1 : return new XFillAttrSetItem(GetItemPool());
+ case 2 : return new XTextAttrSetItem(GetItemPool());
+ case 3 : return new SdrShadowSetItem(GetItemPool());
+ case 4 : return new SdrOutlinerSetItem(GetItemPool());
+ case 5 : return new SdrMiscSetItem(GetItemPool());
+ }
+ }
+ return NULL; // damit der Compiler nicht meckert
+}
+
+void SdrAttrObj::AddStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ pStyleSheet=pNewStyleSheet;
+ if (pStyleSheet!=NULL)
+ {
+ // als Listener anmelden
+ StartListening(pStyleSheet->GetPool());
+ StartListening(*pStyleSheet);
+
+ // harte Attributierung dort loeschen, wo was in der Vorlage steht?
+ const SfxItemSet& rStyle=pNewStyleSheet->GetItemSet();
+ // pWhichRangesInStyle enthaelt Zahlenpaare der Which-Ranges.
+ // am Ende steht eine 0.
+ const USHORT* pWhichRangesInStyle=rStyle.GetRanges();
+ USHORT nAnz=GetSetItemCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ const SfxSetItem* pOldSI=GetSetItem(i);
+ SfxSetItem* pNewSI=MakeNewSetItem(i,pOldSI!=NULL);
+ pNewSI->GetItemSet().SetParent(NULL);
+ SfxItemSet& rIS=pNewSI->GetItemSet();
+
+ USHORT nIndex =0;
+ USHORT nCurrent=pWhichRangesInStyle[nIndex];
+ USHORT nEnd =pWhichRangesInStyle[nIndex+1];
+
+ while (nCurrent!=0) {
+ if (!bDontRemoveHardAttr && rStyle.GetItemState(nCurrent)==SFX_ITEM_SET) {
+ rIS.ClearItem(nCurrent);
+ }
+
+ nCurrent++;
+ if (nCurrent>nEnd) {
+ nIndex+=2;
+ nCurrent=pWhichRangesInStyle[nIndex];
+ if (nCurrent!=0) { // Ende der Ranges? nein
+ nEnd=pWhichRangesInStyle[nIndex+1];
+ }
+ }
+ }
+ // ItemSet des StyleSheets als Parent der ItemSets der SetItems setzen
+ rIS.SetParent(&(pNewStyleSheet->GetItemSet()));
+ // die Zeiger auf die SetItems neu setzen
+ SetSetItem(i,(const SfxSetItem*)ImpSetNewAttr(pOldSI,pNewSI));
+ delete pNewSI;
+ }
+ }
+}
+
+void SdrAttrObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ RemoveStyleSheet();
+ AddStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+ bBoundRectDirty=TRUE;
+ SetRectsDirty(TRUE);
+}
+
+void SdrAttrObj::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_CHGATTR,aBoundRect0);
+}
+
+INT32 SdrAttrObj::ImpGetLineWdt() const
+{
+ if (pLineAttr!=NULL) {
+ const SfxItemSet& rSet=pLineAttr->GetItemSet();
+ XLineStyle eLine=((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue();
+ if (eLine==XLINE_NONE) return 0; // Garkeine Linie da.
+ INT32 nWdt=((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+ return nWdt;
+ }
+ return 0; // Defaultannahme ist: Haarlinie
+}
+
+INT32 SdrAttrObj::ImpGetLineEndAdd() const
+{
+ if(pLineAttr)
+ {
+ const SfxItemSet& rSet = pLineAttr->GetItemSet();
+ BOOL bStartSet(TRUE);
+ BOOL bEndSet(TRUE);
+
+ if(rSet.GetItemState( XATTR_LINESTART ) != SFX_ITEM_DONTCARE)
+ {
+ String aStr(((const XLineStartItem&)rSet.Get(XATTR_LINESTART)).GetName());
+ if(!aStr.Len())
+ bStartSet = FALSE;
+ }
+
+ if(rSet.GetItemState( XATTR_LINEEND ) != SFX_ITEM_DONTCARE)
+ {
+ String aStr(((const XLineEndItem&)rSet.Get(XATTR_LINEEND)).GetName());
+ if(!aStr.Len())
+ bEndSet = FALSE;
+ }
+
+ BOOL bLineEndSet = bStartSet || bEndSet;
+
+ XLineStyle eLine=((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue();
+ if (eLine==XLINE_NONE) return 0; // Garkeine Linie da.
+ INT32 nLineWdt=((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue(); // Strichstaerke
+
+ long nSttWdt=((const XLineStartWidthItem&)(rSet.Get(XATTR_LINESTARTWIDTH))).GetValue();
+ if (nSttWdt<0) nSttWdt=-nLineWdt*nSttWdt/100; // <0 = relativ
+
+ if(!bLineEndSet)
+ nSttWdt = 0;
+
+ FASTBOOL bSttCenter=((const XLineStartCenterItem&)(rSet.Get(XATTR_LINESTARTCENTER))).GetValue();
+ long nSttHgt=0;
+ if (bSttCenter) { // Linienende steht um die Haelfe ueber
+ XPolygon aSttPoly(((const XLineStartItem&)(rSet.Get(XATTR_LINESTART))).GetValue());
+ nSttHgt=XOutputDevice::InitLineStartEnd(aSttPoly,nSttWdt,bSttCenter);
+ // InitLineStartEnd liefert bei bCenter=TRUE die halbe Hoehe
+ }
+ nSttWdt++;
+ nSttWdt/=2;
+ // Lieber etwas mehr, dafuer keine Wurzel ziehen
+ long nSttAdd=Max(nSttWdt,nSttHgt);
+ nSttAdd*=3;
+ nSttAdd/=2;
+
+ long nEndWdt=((const XLineEndWidthItem&)(rSet.Get(XATTR_LINEENDWIDTH))).GetValue();
+ if (nEndWdt<0) nEndWdt=-nLineWdt*nEndWdt/100; // <0 = relativ
+
+ if(!bLineEndSet)
+ nEndWdt = 0;
+
+ FASTBOOL bEndCenter=((const XLineEndCenterItem&)(rSet.Get(XATTR_LINEENDCENTER))).GetValue();
+ long nEndHgt=0;
+ if (bEndCenter) { // Linienende steht um die Haelfe ueber
+ XPolygon aEndPoly(((const XLineEndItem&)(rSet.Get(XATTR_LINEEND))).GetValue());
+ nEndHgt=XOutputDevice::InitLineStartEnd(aEndPoly,nEndWdt,bEndCenter);
+ // InitLineStartEnd liefert bei bCenter=TRUE die halbe Hoehe
+ }
+ nEndWdt++;
+ nEndWdt/=2;
+ // Lieber etwas mehr, dafuer keine Wurzel ziehen
+ long nEndAdd=Max(nEndWdt,nEndHgt);
+ nEndAdd*=3;
+ nEndAdd/=2;
+
+ return Max(nSttAdd,nEndAdd);
+ }
+ return 0; // Defaultannahme ist: Keine Linienenden
+}
+
+FASTBOOL SdrAttrObj::ImpLineEndHitTest(const Point& rEndPt, double nSin, double nCos, FASTBOOL bStart, const Point& rHit, USHORT nTol) const
+{
+ if (pLineAttr!=NULL) {
+ const SfxItemSet& rSet=pLineAttr->GetItemSet();
+ long nWdt=0;
+ FASTBOOL bCenter=FALSE;
+ //long nHgt=0;
+ XPolygon aXPoly;
+ if (bStart) {
+ nWdt=((const XLineStartWidthItem&)(rSet.Get(XATTR_LINESTARTWIDTH))).GetValue();
+ bCenter=((const XLineStartCenterItem&)(rSet.Get(XATTR_LINESTARTCENTER))).GetValue();
+ aXPoly=((const XLineStartItem&)(rSet.Get(XATTR_LINESTART))).GetValue();
+ } else {
+ nWdt=((const XLineEndWidthItem&)(rSet.Get(XATTR_LINEENDWIDTH))).GetValue();
+ bCenter=((const XLineEndCenterItem&)(rSet.Get(XATTR_LINEENDCENTER))).GetValue();
+ aXPoly=((const XLineEndItem&)(rSet.Get(XATTR_LINEEND))).GetValue();
+ }
+ if (nWdt<0) {
+ INT32 nLineWdt=((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue(); // Strichstaerke
+ nWdt=-nLineWdt*nWdt/100; // <0 = relativ
+ }
+ // InitLineStartEnd liefert bei bCenter=TRUE die halbe Hoehe
+ /*nHgt=*/XOutputDevice::InitLineStartEnd(aXPoly,nWdt,bCenter);
+ RotateXPoly(aXPoly,Point(),nSin,nCos);
+ Point aHit(rHit);
+ aHit-=rEndPt;
+ Rectangle aHitRect(aHit.X()-nTol,aHit.Y()-nTol,aHit.X()+nTol,aHit.Y()+nTol);
+ FASTBOOL bHit=IsRectTouchesPoly(XOutCreatePolygon(aXPoly,NULL),aHitRect);
+ return bHit;
+ }
+ return FALSE;
+}
+
+FASTBOOL SdrAttrObj::ImpGetShadowDist(INT32& nXDist, INT32& nYDist) const
+{
+ nXDist=0;
+ nYDist=0;
+ if (pShadAttr!=NULL) {
+ FASTBOOL bShadOn=((SdrShadowItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOW))).GetValue();
+ if (bShadOn) {
+ nXDist=((SdrShadowXDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWXDIST))).GetValue();
+ nYDist=((SdrShadowYDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWYDIST))).GetValue();
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+void SdrAttrObj::ImpAddShadowToBoundRect()
+{
+ INT32 nXDist;
+ INT32 nYDist;
+ if (ImpGetShadowDist(nXDist,nYDist)) {
+ if (nXDist>0) aOutRect.Right()+=nXDist;
+ else aOutRect.Left()+=nXDist;
+ if (nYDist>0) aOutRect.Bottom()+=nYDist;
+ else aOutRect.Top()+=nYDist;
+ }
+}
+
+FASTBOOL SdrAttrObj::ImpSetShadowAttributes(ExtOutputDevice& rXOut, FASTBOOL bNoFill) const
+{
+ if (pShadAttr!=NULL) {
+ FASTBOOL bShadOn=((SdrShadowItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOW))).GetValue();
+ if (bShadOn) {
+// LineAttr for shadow no longer necessary, lines and line shadows are drawn in Paint()
+// routines individually (grep for CreateLinePoly())
+//
+// if (pLineAttr!=NULL) {
+// XLineAttrSetItem aL(*pLineAttr);
+// aL.GetItemSet().Put(XLineColorItem(String(),aShadCol));
+// aL.GetItemSet().Put(XLineTransparenceItem(nTransp));
+// rXOut.SetLineAttr(aL);
+// }
+ if (!bNoFill && pFillAttr!=NULL) {
+ const SdrShadowColorItem& rShadColItem=((SdrShadowColorItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWCOLOR)));
+ Color aShadCol(rShadColItem.GetValue());
+ USHORT nTransp=((SdrShadowTransparenceItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue();
+ XFillStyle eStyle=((XFillStyleItem&)(pFillAttr->GetItemSet().Get(XATTR_FILLSTYLE))).GetValue();
+ XFillAttrSetItem aF(*pFillAttr);
+ if (eStyle==XFILL_HATCH) { // #41666#
+ XHatch aHatch=((XFillHatchItem&)(pFillAttr->GetItemSet().Get(XATTR_FILLHATCH))).GetValue();
+ aHatch.SetColor(aShadCol);
+ aF.GetItemSet().Put(XFillHatchItem(String(),aHatch));
+ } else {
+ if (eStyle!=XFILL_NONE && eStyle!=XFILL_SOLID) {
+ // also fuer Gradient und Bitmap
+ aF.GetItemSet().Put(XFillStyleItem(XFILL_SOLID));
+ }
+ aF.GetItemSet().Put(XFillColorItem(String(),aShadCol));
+ aF.GetItemSet().Put(XFillTransparenceItem(nTransp));
+ }
+ rXOut.SetFillAttr(aF);
+ }
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+void SdrAttrObj::BurnInStyleSheetAttributes()
+{
+ SfxItemPool* pPool=ImpGetItemPool();
+ if (pPool!=NULL) {
+ SfxItemSet aSet(*pPool,
+ SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,
+ SDRATTR_NOTPERSIST_LAST+1, SDRATTR_END,
+ EE_ITEMS_START,EE_ITEMS_END,
+ 0,0);
+ TakeAttributes(aSet,FALSE,FALSE);
+ NbcSetAttributes(aSet,FALSE);
+ }
+}
+
+void SdrAttrObj::CopyAttributes(SdrObject* pDestObj) const
+{
+ // ...
+}
+
+// ItemPool fuer dieses Objekt wechseln
+void SdrAttrObj::MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool)
+{
+ // call parent
+ SdrObject::MigrateItemPool(pSrcPool, pDestPool);
+
+ // eigene Reaktion
+ if(pDestPool && pSrcPool)
+ {
+ UINT16 nItemSetAnz = GetSetItemCount();
+ for(UINT16 i=0;i<nItemSetAnz;i++)
+ {
+ const SfxSetItem* pSI = GetSetItem(i);
+ if(pSI != NULL)
+ {
+ const SfxSetItem* pNewAttr = &(const SfxSetItem&)pDestPool->Put(*pSI);
+ pSrcPool->Remove(*pSI);
+ SetSetItem(i, pNewAttr);
+ }
+ }
+ }
+}
+
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
new file mode 100644
index 0000000000..f2601d52b8
--- /dev/null
+++ b/svx/source/svdraw/svdobj.cxx
@@ -0,0 +1,4125 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdobj.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <math.h>
+#include <vcl/metaact.hxx> // fuer TakeContour
+#include <vcl/cvtsvm.hxx>
+#include <tools/bigint.hxx>
+#include "svdobj.hxx"
+#include "xpoly.hxx"
+#include "svdxout.hxx"
+#include "svdetc.hxx"
+#include "svdtrans.hxx"
+#include "svdio.hxx"
+#include "svdhdl.hxx"
+#include "svddrag.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdovirt.hxx" // Fuer Add/Del Ref
+#include "svdpagv.hxx" // fuer PaintGluePoints
+#include "svdview.hxx" // fuer Dragging (Ortho abfragen)
+#include "svdscrol.hxx"
+#include "svdglob.hxx" // StringCache
+#include "svdstr.hrc" // Objektname
+#include "svdogrp.hxx" // Factory
+#include "svdopath.hxx" // Factory
+#include "svdoedge.hxx" // Factory
+#include "svdorect.hxx" // Factory
+#include "svdocirc.hxx" // Factory
+#include "svdotext.hxx" // Factory
+#include "svdomeas.hxx" // Factory
+#include "svdograf.hxx" // Factory
+#include "svdoole2.hxx" // Factory
+#include "svdocapt.hxx" // Factory
+#include "svdopage.hxx" // Factory
+#include "svdouno.hxx" // Factory
+#include "svdattrx.hxx" // NotPersistItems
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include "xlnwtit.hxx"
+#include "xlnstwit.hxx"
+#include "xlnedwit.hxx"
+#include "xlnstit.hxx"
+#include "xlnedit.hxx"
+#include "xlnstcit.hxx"
+#include "xlnedcit.hxx"
+#include "xlndsit.hxx"
+#include "xlnclit.hxx"
+#include "xflclit.hxx"
+#include "svditer.hxx"
+#include "xlntrit.hxx"
+#include "xfltrit.hxx"
+#include "xlinjoit.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT0(SdrObjUserCall);
+
+SdrObjUserCall::~SdrObjUserCall()
+{
+}
+
+void SdrObjUserCall::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect)
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT0(SdrObjUserData);
+
+void SdrObjUserData::operator=(const SdrObjUserData& rData) // nicht implementiert
+{
+}
+
+FASTBOOL SdrObjUserData::operator==(const SdrObjUserData& rData) const // nicht implementiert
+{
+ return FALSE;
+}
+
+FASTBOOL SdrObjUserData::operator!=(const SdrObjUserData& rData) const // nicht implementiert
+{
+ return FALSE;
+}
+
+SdrObjUserData::~SdrObjUserData()
+{
+}
+
+void SdrObjUserData::WriteData(SvStream& rOut)
+{
+ rOut<<nInventor;
+ rOut<<nIdentifier;
+ rOut<<nVersion;
+}
+
+void SdrObjUserData::ReadData(SvStream& rIn)
+{
+ //Inventor und Identifier wurden bereits von Aufrufer gelesen,
+ //sonst haette er mich ja nicht erzeugen koennen (kein SeekBack!).
+ rIn>>nVersion; // Miniatur-Versionsverwaltung.
+}
+
+void SdrObjUserData::AfterRead()
+{
+}
+
+FASTBOOL SdrObjUserData::HasMacro(const SdrObject* pObj) const
+{
+ return FALSE;
+}
+
+SdrObject* SdrObjUserData::CheckMacroHit(const SdrObjMacroHitRec& rRec, const SdrObject* pObj) const
+{
+ if (pObj==NULL) return NULL;
+ return pObj->CheckHit(rRec.aPos,rRec.nTol,rRec.pVisiLayer);
+}
+
+Pointer SdrObjUserData::GetMacroPointer(const SdrObjMacroHitRec& rRec, const SdrObject* pObj) const
+{
+ return Pointer(POINTER_REFHAND);
+}
+
+void SdrObjUserData::PaintMacro(ExtOutputDevice& rXOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec, const SdrObject* pObj) const
+{
+ if (pObj==NULL) return;
+ Color aBlackColor( COL_BLACK );
+ Color aTranspColor( COL_TRANSPARENT );
+ rXOut.OverrideLineColor( aBlackColor );
+ rXOut.OverrideFillColor( aTranspColor );
+ RasterOp eRop0=rXOut.GetRasterOp();
+ rXOut.SetRasterOp(ROP_INVERT);
+ XPolyPolygon aXPP;
+ pObj->TakeXorPoly(aXPP,TRUE);
+ USHORT nAnz=aXPP.Count();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ rXOut.DrawXPolyLine(aXPP[nNum]);
+ }
+ rXOut.SetRasterOp(eRop0);
+}
+
+FASTBOOL SdrObjUserData::DoMacro(const SdrObjMacroHitRec& rRec, SdrObject* pObj)
+{
+ return FALSE;
+}
+
+XubString SdrObjUserData::GetMacroPopupComment(const SdrObjMacroHitRec& rRec, const SdrObject* pObj) const
+{
+ return String();
+}
+
+void SdrObjUserDataList::Clear()
+{
+ USHORT nAnz=GetUserDataCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ delete GetUserData(i);
+ }
+ aList.Clear();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+DBG_NAME(SdrObjGeoData);
+
+SdrObjGeoData::SdrObjGeoData():
+ pGPL(NULL),
+ bMovProt(FALSE),
+ bSizProt(FALSE),
+ bNoPrint(FALSE),
+ bClosedObj(FALSE),
+ nLayerId(0)
+{
+ DBG_CTOR(SdrObjGeoData,NULL);
+}
+
+SdrObjGeoData::~SdrObjGeoData()
+{
+ DBG_DTOR(SdrObjGeoData,NULL);
+ delete pGPL;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT0(SdrObjPlusData);
+
+SdrObjPlusData::SdrObjPlusData():
+ pBroadcast(NULL),
+ pUserDataList(NULL),
+ pGluePoints(NULL),
+ pAnimator(NULL),
+ pAutoTimer(NULL)
+{
+}
+
+SdrObjPlusData::~SdrObjPlusData()
+{
+ if (pBroadcast !=NULL) delete pBroadcast;
+ if (pUserDataList!=NULL) delete pUserDataList;
+ if (pGluePoints !=NULL) delete pGluePoints;
+ if (pAnimator !=NULL) delete pAnimator;
+ if (pAutoTimer !=NULL) delete pAutoTimer;
+}
+
+SdrObjPlusData* SdrObjPlusData::Clone(SdrObject* pObj1) const
+{
+ SdrObjPlusData* pNeuPlusData=new SdrObjPlusData;
+ if (pUserDataList!=NULL) {
+ USHORT nAnz=pUserDataList->GetUserDataCount();
+ if (nAnz!=0) {
+ pNeuPlusData->pUserDataList=new SdrObjUserDataList;
+ for (USHORT i=0; i<nAnz; i++) {
+ SdrObjUserData* pNeuUserData=pUserDataList->GetUserData(i)->Clone(pObj1);
+ if (pNeuUserData!=NULL) {
+ pNeuPlusData->pUserDataList->InsertUserData(pNeuUserData);
+ } else {
+ DBG_ERROR("SdrObjPlusData::Clone(): UserData.Clone() liefert NULL");
+ }
+ }
+ }
+ }
+ if (pGluePoints!=NULL) pNeuPlusData->pGluePoints=new SdrGluePointList(*pGluePoints);
+ // MtfAnimator wird auch nicht mitkopiert
+ pNeuPlusData->aObjName=aObjName;
+ if (pAutoTimer!=NULL) {
+ pNeuPlusData->pAutoTimer=new AutoTimer;
+ // Handler, etc. nicht mitkopieren!
+ }
+ return pNeuPlusData;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+static double SMALLEST_DASH_WIDTH(26.95);
+
+LineStyleParameterPack::LineStyleParameterPack(const SfxItemSet& rSet, BOOL bForceHair, OutputDevice& rOut)
+: mrOut(rOut),
+ rStartPolygon(((const XLineStartItem&)(rSet.Get(XATTR_LINESTART))).GetValue()),
+ rEndPolygon(((const XLineEndItem&)(rSet.Get(XATTR_LINEEND))).GetValue()),
+ bForceNoArrowsLeft(FALSE),
+ bForceNoArrowsRight(FALSE)
+{
+ nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+ if(bForceHair)
+ nLineWidth = 0L;
+ eLineStyle = (XLineStyle)((const XLineStyleItem&)rSet.Get(XATTR_LINESTYLE)).GetValue();
+
+ nStartWidth = ((const XLineStartWidthItem&)(rSet.Get(XATTR_LINESTARTWIDTH))).GetValue();
+ if(nStartWidth < 0)
+ nStartWidth = -nLineWidth * nStartWidth / 100;
+
+ nEndWidth = ((const XLineEndWidthItem&)(rSet.Get(XATTR_LINEENDWIDTH))).GetValue();
+ if(nEndWidth < 0)
+ nEndWidth = -nLineWidth * nEndWidth / 100;
+
+ bStartCentered = ((const XLineStartCenterItem&)(rSet.Get(XATTR_LINESTARTCENTER))).GetValue();
+ bEndCentered = ((const XLineEndCenterItem&)(rSet.Get(XATTR_LINEENDCENTER))).GetValue();
+
+ fDegreeStepWidth = 10.0;
+ eLineJoint = ((const XLineJointItem&)(rSet.Get(XATTR_LINEJOINT))).GetValue();
+
+ aDash = ((const XLineDashItem&)(rSet.Get(XATTR_LINEDASH))).GetValue();
+
+ // fill local dash info
+ nNumDotDashArray = (GetDots() + GetDashes()) * 2;
+ pDotDashArray = new double[nNumDotDashArray];
+ UINT16 a;
+ UINT16 nIns = 0;
+ double fDashDotDistance = (double)GetDashDistance();
+ double fSingleDashLen = (double)GetDashLen();
+ double fSingleDotLen = (double)GetDotLen();
+ double fLineWidth = (double)GetLineWidth();
+
+ if(GetDashStyle() == XDASH_RECTRELATIVE || GetDashStyle() == XDASH_ROUNDRELATIVE)
+ {
+ if(GetLineWidth())
+ {
+ double fFactor = fLineWidth / 100.0;
+
+ if(GetDashes())
+ {
+ if(GetDashLen())
+ {
+ // is a dash
+ fSingleDashLen *= fFactor;
+ }
+ else
+ {
+ // is a dot
+ fSingleDashLen = fLineWidth;
+ }
+ }
+
+ if(GetDots())
+ {
+ if(GetDotLen())
+ {
+ // is a dash
+ fSingleDotLen *= fFactor;
+ }
+ else
+ {
+ // is a dot
+ fSingleDotLen = fLineWidth;
+ }
+ }
+
+ if(GetDashes() || GetDots())
+ {
+ if(GetDashDistance())
+ fDashDotDistance *= fFactor;
+ else
+ fDashDotDistance = fLineWidth;
+ }
+ }
+ else
+ {
+ if(GetDashes())
+ {
+ if(GetDashLen())
+ {
+ // is a dash
+ fSingleDashLen = (SMALLEST_DASH_WIDTH * fSingleDashLen) / 100.0;
+ }
+ else
+ {
+ // is a dot
+ fSingleDashLen = SMALLEST_DASH_WIDTH;
+ }
+ }
+
+ if(GetDots())
+ {
+ if(GetDotLen())
+ {
+ // is a dash
+ fSingleDotLen = (SMALLEST_DASH_WIDTH * fSingleDotLen) / 100.0;
+ }
+ else
+ {
+ // is a dot
+ fSingleDotLen = SMALLEST_DASH_WIDTH;
+ }
+ }
+
+ if(GetDashes() || GetDots())
+ {
+ if(GetDashDistance())
+ {
+ // dash as distance
+ fDashDotDistance = (SMALLEST_DASH_WIDTH * fDashDotDistance) / 100.0;
+ }
+ else
+ {
+ // dot as distance
+ fDashDotDistance = SMALLEST_DASH_WIDTH;
+ }
+ }
+ }
+ }
+ else
+ {
+ // smallest dot size compare value
+ double fDotCompVal(GetLineWidth() ? fLineWidth : SMALLEST_DASH_WIDTH);
+
+ // absolute values
+ if(GetDashes())
+ {
+ if(GetDashLen())
+ {
+ // is a dash
+ if(fSingleDashLen < SMALLEST_DASH_WIDTH)
+ fSingleDashLen = SMALLEST_DASH_WIDTH;
+ }
+ else
+ {
+ // is a dot
+ if(fSingleDashLen < fDotCompVal)
+ fSingleDashLen = fDotCompVal;
+ }
+ }
+
+ if(GetDots())
+ {
+ if(GetDotLen())
+ {
+ // is a dash
+ if(fSingleDotLen < SMALLEST_DASH_WIDTH)
+ fSingleDotLen = SMALLEST_DASH_WIDTH;
+ }
+ else
+ {
+ // is a dot
+ if(fSingleDotLen < fDotCompVal)
+ fSingleDotLen = fDotCompVal;
+ }
+ }
+
+ if(GetDashes() || GetDots())
+ {
+ if(GetDashDistance())
+ {
+ // dash as distance
+ if(fDashDotDistance < SMALLEST_DASH_WIDTH)
+ fDashDotDistance = SMALLEST_DASH_WIDTH;
+ }
+ else
+ {
+ // dot as distance
+ if(fDashDotDistance < fDotCompVal)
+ fDashDotDistance = fDotCompVal;
+ }
+ }
+ }
+
+ fFullDashDotLen = 0.0;
+
+ for(a=0;a<GetDots();a++)
+ {
+ pDotDashArray[nIns++] = fSingleDotLen;
+ fFullDashDotLen += fSingleDotLen;
+ pDotDashArray[nIns++] = fDashDotDistance;
+ fFullDashDotLen += fDashDotDistance;
+ }
+
+ for(a=0;a<GetDashes();a++)
+ {
+ pDotDashArray[nIns++] = fSingleDashLen;
+ fFullDashDotLen += fSingleDashLen;
+ pDotDashArray[nIns++] = fDashDotDistance;
+ fFullDashDotLen += fDashDotDistance;
+ }
+}
+
+LineStyleParameterPack::~LineStyleParameterPack()
+{
+ if(pDotDashArray)
+ delete pDotDashArray;
+}
+
+UINT16 LineStyleParameterPack::GetFirstDashDotIndex(double fPos, double& rfDist) const
+{
+ double fIndPos = fPos - (fFullDashDotLen * (double)((UINT32)(fPos / fFullDashDotLen)));
+ UINT16 nPos = 0;
+
+ while(fIndPos && fIndPos - pDotDashArray[nPos] > -SMALL_DVALUE)
+ {
+ fIndPos -= pDotDashArray[nPos];
+ nPos = (nPos + 1 == nNumDotDashArray) ? 0 : nPos + 1;
+ }
+
+ rfDist = pDotDashArray[nPos] - fIndPos;
+ nPos = (nPos + 1 == nNumDotDashArray) ? 0 : nPos + 1;
+
+ return nPos;
+}
+
+UINT16 LineStyleParameterPack::GetNextDashDotIndex(UINT16 nPos, double& rfDist) const
+{
+ rfDist = pDotDashArray[nPos];
+ nPos = (nPos + 1 == nNumDotDashArray) ? 0 : nPos + 1;
+ return nPos;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+double LineGeometryCreator::ImpSimpleFindCutPoint(
+ const Vector3D& rEdge1Start, const Vector3D& rEdge1Delta,
+ const Vector3D& rEdge2Start, const Vector3D& rEdge2Delta)
+{
+ double fZwi = (rEdge1Delta.X() * rEdge2Delta.Y()) - (rEdge1Delta.Y() * rEdge2Delta.X());
+ double fRetval = 0.0;
+
+ if(fabs(fZwi) > SMALL_DVALUE)
+ {
+ fRetval = (rEdge2Delta.Y() * (rEdge2Start.X() - rEdge1Start.X())
+ + rEdge2Delta.X() * (rEdge1Start.Y() - rEdge2Start.Y())) / fZwi;
+ }
+ return fRetval;
+}
+
+void LineGeometryCreator::ImpCreateLineSegment(const Vector3D* pPrev, const Vector3D* pLeft, const Vector3D* pRight, const Vector3D* pNext)
+{
+ if(mrLineAttr.GetLineWidth())
+ {
+ double fHalfLineWidth((double)mrLineAttr.GetLineWidth() / 2.0);
+ Vector3D aEdge = *pRight - *pLeft;
+ Vector3D aPerpend = aEdge.GetPerpendicular2D();
+ XLineJoint eJoint = mrLineAttr.GetLineJoint();
+
+ // joints need eventually not be done
+ if((eJoint == XLINEJOINT_MIDDLE || eJoint == XLINEJOINT_MITER) && (!pPrev && !pNext))
+ eJoint = XLINEJOINT_NONE;
+
+ switch(eJoint)
+ {
+ case XLINEJOINT_NONE: // no rounding
+ {
+ Polygon3D aNewPoly(4);
+
+ aPerpend *= fHalfLineWidth;
+ aNewPoly[0] = *pLeft + aPerpend;
+ aNewPoly[1] = *pRight + aPerpend;
+ aNewPoly[2] = *pRight - aPerpend;
+ aNewPoly[3] = *pLeft - aPerpend;
+
+ aNewPoly.SetClosed(TRUE);
+ mrPolyPoly3D.Insert(aNewPoly);
+
+ break;
+ }
+ case XLINEJOINT_MIDDLE: // calc middle value between joints
+ {
+ Polygon3D aNewPoly(4);
+ Vector3D aPerpendLeft(aPerpend);
+ Vector3D aPerpendRight(aPerpend);
+
+ if(pPrev)
+ {
+ aPerpendLeft = *pLeft - *pPrev;
+ aPerpendLeft = aPerpendLeft.GetPerpendicular2D();
+ }
+
+ if(pNext)
+ {
+ aPerpendRight = *pNext - *pRight;
+ aPerpendRight = aPerpendRight.GetPerpendicular2D();
+ }
+
+ aPerpendLeft = (aPerpend + aPerpendLeft) * (fHalfLineWidth / 2.0);
+ aPerpendRight = (aPerpend + aPerpendRight) * (fHalfLineWidth / 2.0);
+
+ aNewPoly[0] = *pLeft + aPerpendLeft;
+ aNewPoly[1] = *pRight + aPerpendRight;
+ aNewPoly[2] = *pRight - aPerpendRight;
+ aNewPoly[3] = *pLeft - aPerpendLeft;
+
+ aNewPoly.SetClosed(TRUE);
+ mrPolyPoly3D.Insert(aNewPoly);
+
+ break;
+ }
+ case XLINEJOINT_BEVEL: // join edges with line
+ default: // #73428# case XLINEJOINT_ROUND: // create arc
+ {
+ Vector3D aPerpendRight(aPerpend);
+ BOOL bCreateSimplePart(TRUE);
+
+ if(pNext)
+ {
+ aPerpendRight = *pNext - *pRight;
+ aPerpendRight = aPerpendRight.GetPerpendicular2D();
+ double fAngle = atan2(aPerpend.Y(), aPerpend.X());
+ double fRightAngle = atan2(aPerpendRight.Y(), aPerpendRight.X());
+ double fAngleDiff = fAngle - fRightAngle;
+ double fDegreeStepWidth = mrLineAttr.GetDegreeStepWidth() * F_PI180;
+
+ // go to range [0.0..2*F_PI[
+ while(fAngleDiff < 0.0)
+ fAngleDiff += (F_PI * 2.0);
+ while(fAngleDiff >= (F_PI * 2.0))
+ fAngleDiff -= (F_PI * 2.0);
+
+ if((fAngleDiff > fDegreeStepWidth) && (fAngleDiff < ((F_PI * 2.0) - fDegreeStepWidth)))
+ {
+ bCreateSimplePart = FALSE;
+ aPerpend *= fHalfLineWidth;
+ aPerpendRight *= fHalfLineWidth;
+
+ if(eJoint == XLINEJOINT_BEVEL)
+ {
+ UINT16 nPolyPoints(pPrev ? 7 : 6);
+ Polygon3D aNewPoly(nPolyPoints);
+
+ aNewPoly[0] = *pLeft + aPerpend;
+ aNewPoly[1] = *pRight + aPerpend;
+ aNewPoly[4] = *pRight - aPerpend;
+ aNewPoly[5] = *pLeft - aPerpend;
+
+ if(pPrev)
+ aNewPoly[6] = *pLeft;
+
+ if(fAngleDiff > F_PI)
+ {
+ // lower side
+ aNewPoly[2] = *pRight;
+ aNewPoly[3] = *pRight - aPerpendRight;
+ }
+ else
+ {
+ // upper side
+ aNewPoly[2] = *pRight + aPerpendRight;
+ aNewPoly[3] = *pRight;
+ }
+
+ aNewPoly.SetClosed(TRUE);
+ mrPolyPoly3D.Insert(aNewPoly);
+ }
+ else
+ {
+ BOOL bUseLowerSide(fAngleDiff > F_PI);
+ UINT16 nSegments;
+
+ if(bUseLowerSide)
+ {
+ fAngleDiff = (F_PI * 2.0) - fAngleDiff;
+ nSegments = (UINT16)(fAngleDiff / fDegreeStepWidth);
+ }
+ else
+ {
+ nSegments = (UINT16)(fAngleDiff / fDegreeStepWidth);
+ }
+
+ UINT16 nPolyPoints(pPrev ? 7 : 6);
+ Polygon3D aNewPoly(nPolyPoints + nSegments);
+
+ aNewPoly[0] = *pLeft + aPerpend;
+ aNewPoly[1] = *pRight + aPerpend;
+ aNewPoly[4 + nSegments] = *pRight - aPerpend;
+ aNewPoly[5 + nSegments] = *pLeft - aPerpend;
+
+ if(pPrev)
+ aNewPoly[6 + nSegments] = *pLeft;
+
+ fAngleDiff /= (double)(nSegments + 1);
+
+ if(bUseLowerSide)
+ {
+ // lower side
+ aNewPoly[2] = *pRight;
+ aNewPoly[3] = *pRight - aPerpendRight;
+
+ for(UINT16 a=0;a<nSegments;a++)
+ {
+ double fDegree = fRightAngle - (double)a * fAngleDiff;
+ Vector3D aNewPos(
+ pRight->X() - (cos(fDegree) * fHalfLineWidth),
+ pRight->Y() - (sin(fDegree) * fHalfLineWidth));
+ aNewPoly[4 + a] = aNewPos;
+ }
+ }
+ else
+ {
+ // upper side
+ aNewPoly[2 + nSegments] = *pRight + aPerpendRight;
+ aNewPoly[3 + nSegments] = *pRight;
+
+ for(UINT16 a=0;a<nSegments;a++)
+ {
+ double fDegree = fAngle - (double)a * fAngleDiff;
+ Vector3D aNewPos(
+ pRight->X() + (cos(fDegree) * fHalfLineWidth),
+ pRight->Y() + (sin(fDegree) * fHalfLineWidth));
+ aNewPoly[2 + a] = aNewPos;
+ }
+ }
+
+ aNewPoly.SetClosed(TRUE);
+ mrPolyPoly3D.Insert(aNewPoly);
+ }
+ }
+ }
+
+ if(bCreateSimplePart)
+ {
+ // angle smaller DegreeStepWidth, create simple segment
+ UINT16 nNumPnt(4);
+
+ if(pPrev)
+ nNumPnt++;
+
+ if(pNext)
+ nNumPnt++;
+
+ Polygon3D aNewPoly(nNumPnt);
+
+ aPerpend *= fHalfLineWidth;
+ aPerpendRight *= fHalfLineWidth;
+ nNumPnt = 0;
+
+ if(pPrev)
+ aNewPoly[nNumPnt++] = *pLeft;
+
+ aNewPoly[nNumPnt++] = *pLeft + aPerpend;
+ aNewPoly[nNumPnt++] = *pRight + aPerpendRight;
+
+ if(pNext)
+ aNewPoly[nNumPnt++] = *pRight;
+
+ aNewPoly[nNumPnt++] = *pRight - aPerpendRight;
+ aNewPoly[nNumPnt++] = *pLeft - aPerpend;
+
+ aNewPoly.SetClosed(TRUE);
+ mrPolyPoly3D.Insert(aNewPoly);
+ }
+
+ break;
+ }
+ case XLINEJOINT_MITER: // extend till cut
+ {
+ Polygon3D aNewPoly(4);
+ aPerpend *= fHalfLineWidth;
+ BOOL bLeftSolved(FALSE);
+ BOOL bRightSolved(FALSE);
+
+ if(pPrev)
+ {
+ Vector3D aLeftVec(*pLeft - *pPrev);
+ Vector3D aPerpendLeft = aLeftVec.GetPerpendicular2D();
+ aPerpendLeft *= fHalfLineWidth;
+ double fUpperCut = ImpSimpleFindCutPoint(*pPrev + aPerpendLeft, aLeftVec, *pRight + aPerpend, -aEdge);
+
+ if(fUpperCut != 0.0 && fUpperCut < mrLineAttr.GetLinejointMiterUpperBound())
+ {
+ double fLowerCut = ImpSimpleFindCutPoint(*pPrev - aPerpendLeft, aLeftVec, *pRight - aPerpend, -aEdge);
+
+ if(fLowerCut < mrLineAttr.GetLinejointMiterUpperBound())
+ {
+ Vector3D aParam1 = *pPrev + aPerpendLeft;
+ Vector3D aParam2 = *pLeft + aPerpendLeft;
+ aNewPoly[0].CalcInBetween(aParam1, aParam2, fUpperCut);
+ aParam1 = *pPrev - aPerpendLeft;
+ aParam2 = *pLeft - aPerpendLeft;
+ aNewPoly[3].CalcInBetween(aParam1, aParam2, fLowerCut);
+ bLeftSolved = TRUE;
+ }
+ }
+ }
+ if(!bLeftSolved)
+ {
+ aNewPoly[0] = *pLeft + aPerpend;
+ aNewPoly[3] = *pLeft - aPerpend;
+ }
+
+ if(pNext)
+ {
+ Vector3D aRightVec(*pRight - *pNext);
+ Vector3D aPerpendRight = -aRightVec;
+ aPerpendRight = aPerpendRight.GetPerpendicular2D();
+ aPerpendRight *= fHalfLineWidth;
+ double fUpperCut = ImpSimpleFindCutPoint(*pNext + aPerpendRight, aRightVec, *pRight + aPerpend, aEdge);
+
+ if(fUpperCut != 0.0 && fUpperCut < mrLineAttr.GetLinejointMiterUpperBound())
+ {
+ double fLowerCut = ImpSimpleFindCutPoint(*pNext - aPerpendRight, aRightVec, *pRight - aPerpend, aEdge);
+
+ if(fLowerCut < mrLineAttr.GetLinejointMiterUpperBound())
+ {
+ Vector3D aParam1 = *pNext + aPerpendRight;
+ Vector3D aParam2 = *pRight + aPerpendRight;
+ aNewPoly[1].CalcInBetween(aParam1, aParam2, fUpperCut);
+ aParam1 = *pNext - aPerpendRight;
+ aParam2 = *pRight - aPerpendRight;
+ aNewPoly[2].CalcInBetween(aParam1, aParam2, fLowerCut);
+ bRightSolved = TRUE;
+ }
+ }
+ }
+ if(!bRightSolved)
+ {
+ aNewPoly[1] = *pRight + aPerpend;
+ aNewPoly[2] = *pRight - aPerpend;
+ }
+
+ aNewPoly.SetClosed(TRUE);
+ mrPolyPoly3D.Insert(aNewPoly);
+
+ break;
+ }
+ }
+ }
+ else
+ {
+ Polygon3D aNewPoly(2);
+
+ aNewPoly[0] = *pLeft;
+ aNewPoly[1] = *pRight;
+
+ aNewPoly.SetClosed(FALSE);
+ mrPolyLine3D.Insert(aNewPoly);
+ }
+}
+
+void LineGeometryCreator::ImpCreateSegmentsForLine(const Vector3D* pPrev, const Vector3D* pLeft, const Vector3D* pRight, const Vector3D* pNext, double fPolyPos)
+{
+ Vector3D aEdge(*pRight - *pLeft);
+ double fLen = aEdge.GetLength();
+ double fPos = 0.0;
+ double fDist;
+ BOOL bFirst(TRUE);
+ BOOL bLast(FALSE);
+ UINT16 nInd = mrLineAttr.GetFirstDashDotIndex(fPolyPos, fDist);
+
+ do {
+ // nInd right edge, fDist to it
+ if((nInd % 2) && fDist > SMALL_DVALUE)
+ {
+ // left is fpos, get right
+ double fRight = fPos + fDist;
+
+ if(fRight > fLen)
+ {
+ fRight = fLen;
+ bLast = TRUE;
+ }
+
+ // create segment from fPos to fRight
+ Vector3D aLeft(*pLeft);
+ Vector3D aRight(*pRight);
+
+ if(!bFirst)
+ aLeft.CalcInBetween(*pLeft, *pRight, fPos / fLen);
+ if(!bLast)
+ aRight.CalcInBetween(*pLeft, *pRight, fRight / fLen);
+
+ ImpCreateLineSegment(bFirst ? pPrev : 0L, &aLeft, &aRight, bLast ? pNext : 0L);
+ }
+
+ bFirst = FALSE;
+ fPos += fDist;
+ nInd = mrLineAttr.GetNextDashDotIndex(nInd, fDist);
+ } while(fPos < fLen);
+}
+
+double LineGeometryCreator::ImpCreateLineStartEnd(Polygon3D& rArrowPoly, const Polygon3D& rSourcePoly, BOOL bFront, double fWantedWidth, BOOL bCentered)
+{
+ double fRetval(0.0);
+ double fOffset(0.0);
+ Volume3D aPolySize(rArrowPoly.GetPolySize());
+ double fScaleValue(fWantedWidth / aPolySize.GetWidth());
+ Matrix4D aTrans;
+ Vector3D aCenter;
+
+ if(bCentered)
+ {
+ aCenter = Vector3D(
+ (aPolySize.MinVec().X() + aPolySize.MaxVec().X()) / 2.0,
+ (aPolySize.MinVec().Y() + aPolySize.MaxVec().Y()) / 2.0, 0.0);
+ }
+ else
+ {
+ aCenter = Vector3D(rArrowPoly.GetMiddle());
+ }
+
+ aTrans.Translate(-aCenter);
+ aTrans.Scale(fScaleValue, fScaleValue, fScaleValue);
+
+ if(bCentered)
+ {
+ Vector3D aLowerCenter(aCenter.X(), aPolySize.MinVec().Y(), 0.0);
+
+ aLowerCenter *= aTrans;
+ aCenter *= aTrans;
+ fOffset = (aCenter - aLowerCenter).GetLength();
+ fRetval = fOffset / 2.0;
+ }
+ else
+ {
+ Vector3D aLowerCenter(aCenter.X(), aPolySize.MinVec().Y(), 0.0);
+ Vector3D aUpperCenter(aCenter.X(), aPolySize.MaxVec().Y(), 0.0);
+
+ aUpperCenter *= aTrans;
+ aLowerCenter *= aTrans;
+ fOffset = (aUpperCenter - aLowerCenter).GetLength();
+ fRetval = fOffset * 0.8;
+ }
+
+ Vector3D aHead = (bFront) ? rSourcePoly[0] : rSourcePoly[rSourcePoly.GetPointCount() - 1];
+ Vector3D aTail = (bFront) ? rSourcePoly[1] : rSourcePoly[rSourcePoly.GetPointCount() - 2];
+
+ if(fOffset != 0.0)
+ {
+ if(!bFront)
+ fOffset = rSourcePoly.GetLength() - fOffset;
+ aTail = rSourcePoly.GetPosition(fOffset);
+ }
+
+ Vector3D aDirection = aHead - aTail;
+ aDirection.Normalize();
+ double fRotation = atan2(aDirection.Y(), aDirection.X()) - (90.0 * F_PI180);
+
+ aTrans.RotateZ(fRotation);
+ aTrans.Translate(aHead);
+
+ if(!bCentered)
+ {
+ Vector3D aUpperCenter(aCenter.X(), aPolySize.MaxVec().Y(), 0.0);
+
+ aUpperCenter *= aTrans;
+ aCenter *= aTrans;
+ aTrans.Translate(aCenter - aUpperCenter);
+ }
+
+ rArrowPoly.Transform(aTrans);
+ rArrowPoly.SetClosed(TRUE);
+
+ return fRetval;
+}
+
+void LineGeometryCreator::ImpCreateLineGeometry(const Polygon3D& rSourcePoly)
+{
+ UINT16 nPntCnt = rSourcePoly.GetPointCount();
+
+ if(nPntCnt > 1)
+ {
+ BOOL bClosed = rSourcePoly.IsClosed();
+ UINT16 nCount = nPntCnt;
+ Polygon3D aPoly = rSourcePoly;
+
+ if(!bClosed)
+ {
+ nCount = nPntCnt-1;
+ double fPolyLength = rSourcePoly.GetLength();
+ double fStart = 0.0;
+ double fEnd = fPolyLength;
+
+ if(mrLineAttr.IsStartActive())
+ {
+ // create line start polygon and move line end
+ Polygon3D aArrowPoly(XOutCreatePolygon(mrLineAttr.GetStartPolygon(), &mrLineAttr.GetOutDev()));
+ fStart = ImpCreateLineStartEnd(
+ aArrowPoly, rSourcePoly, TRUE,
+ (double)mrLineAttr.GetStartWidth(), mrLineAttr.IsStartCentered());
+ mrPolyPoly3D.Insert(aArrowPoly);
+ }
+
+ if(mrLineAttr.IsEndActive())
+ {
+ // create line end polygon and move line end
+ Polygon3D aArrowPoly(XOutCreatePolygon(mrLineAttr.GetEndPolygon(), &mrLineAttr.GetOutDev()));
+ fEnd = fPolyLength - ImpCreateLineStartEnd(
+ aArrowPoly, rSourcePoly, FALSE,
+ (double)mrLineAttr.GetEndWidth(), mrLineAttr.IsEndCentered());
+ mrPolyPoly3D.Insert(aArrowPoly);
+ }
+
+ if(fStart != 0.0 || fEnd != fPolyLength)
+ {
+ // build new poly, consume something from old poly
+ aPoly = Polygon3D(nCount);
+ UINT16 nInsPos(0);
+ double fPolyPos = 0.0;
+
+ for(UINT16 a=0;a<nCount;a++)
+ {
+ Vector3D aEdge = rSourcePoly[a+1] - rSourcePoly[a];
+ double fLength = aEdge.GetLength();
+
+ if(fStart != 0.0)
+ {
+ if(fStart - fLength > -SMALL_DVALUE)
+ {
+ fStart -= fLength;
+ }
+ else
+ {
+ Vector3D aNewPos;
+ aNewPos.CalcInBetween(rSourcePoly[a], rSourcePoly[a+1], fStart / fLength);
+ aPoly[nInsPos++] = aNewPos;
+ fStart = 0.0;
+ }
+ }
+ else
+ {
+ aPoly[nInsPos++] = rSourcePoly[a];
+ }
+
+ if((fPolyPos + fLength) - fEnd > -SMALL_DVALUE)
+ {
+ Vector3D aNewPos;
+ aNewPos.CalcInBetween(rSourcePoly[a], rSourcePoly[a+1], (fEnd - fPolyPos) / fLength);
+ aPoly[nInsPos++] = aNewPos;
+ a = nCount;
+ }
+
+ // next PolyPos
+ fPolyPos += fLength;
+ }
+
+ nCount = aPoly.GetPointCount() - 1;
+ }
+ }
+
+ if(nCount)
+ {
+ if(!mrLineAttr.GetLineWidth() && mrLineAttr.GetLineStyle() == XLINE_SOLID)
+ {
+ // LineWidth zero, solid line -> add directly to linePoly
+ mrPolyLine3D.Insert(aPoly);
+ }
+ else
+ {
+ const Vector3D* pPrev = NULL;
+ const Vector3D* pLeft = NULL;
+ const Vector3D* pRight = NULL;
+ const Vector3D* pNext = NULL;
+ double fPolyPos = 0.0;
+
+ for(UINT16 a=0;a<nCount;a++)
+ {
+ BOOL bStart(!a);
+ BOOL bEnd(a+1 == nCount);
+
+ // get left, right positions
+ pLeft = &aPoly[a];
+
+ // get length
+ if(bClosed)
+ {
+ pRight = &aPoly[(a+1) % nCount];
+ pPrev = &aPoly[(a+nCount-1) % nCount];
+ pNext = &aPoly[(a+2) % nCount];
+ }
+ else
+ {
+ pRight = &aPoly[a+1];
+
+ if(bStart)
+ {
+ pPrev = NULL;
+ }
+ else
+ {
+ pPrev = &aPoly[a-1];
+ }
+
+ if(bEnd)
+ {
+ pNext = NULL;
+ }
+ else
+ {
+ pNext = &aPoly[a+2];
+ }
+ }
+
+ // positions are in pPrev, pLeft, pRight and pNext.
+ if(mrLineAttr.GetLineStyle() == XLINE_DASH)
+ ImpCreateSegmentsForLine(pPrev, pLeft, pRight, pNext, fPolyPos);
+ else
+ ImpCreateLineSegment(pPrev, pLeft, pRight, pNext);
+
+ // increment PolyPos
+ Vector3D aEdge = *pRight - *pLeft;
+ fPolyPos += aEdge.GetLength();
+ }
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@@@@ @@@@ @@@@@ @@@@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+DBG_NAME(SdrObject);
+TYPEINIT1(SdrObject,SfxListener);
+
+SdrObject::SdrObject():
+ pObjList(NULL),
+ pPage(NULL),
+ pModel(NULL),
+ pUserCall(NULL),
+ pPlusData(NULL),
+ nOrdNum(0),
+ nLayerId(0)
+{
+ DBG_CTOR(SdrObject,NULL);
+ bVirtObj =FALSE;
+ bBoundRectDirty =TRUE;
+ bSnapRectDirty =TRUE;
+ bNetLock =FALSE;
+ bInserted =FALSE;
+ bGrouped =FALSE;
+ bMovProt =FALSE;
+ bSizProt =FALSE;
+ bNoPrint =FALSE;
+ bEmptyPresObj =FALSE;
+ bNotPersistent =FALSE;
+ bNeedColorRestore=FALSE;
+ bNotVisibleAsMaster=FALSE;
+ bClosedObj =FALSE;
+ bWriterFlyFrame =FALSE;
+ bNotMasterCachable=FALSE;
+ bIsEdge=FALSE;
+ bIs3DObj=FALSE;
+ bMarkProt=FALSE;
+ bIsUnoObj=FALSE;
+}
+
+SdrObject::~SdrObject()
+{
+ DBG_DTOR(SdrObject,NULL);
+ SendUserCall(SDRUSERCALL_DELETE,GetBoundRect());
+ if (pPlusData!=NULL) delete pPlusData;
+}
+
+SdrObjPlusData* SdrObject::NewPlusData() const
+{
+ return new SdrObjPlusData;
+}
+
+void SdrObject::SetRectsDirty(FASTBOOL bNotMyself)
+{
+ if (!bNotMyself) {
+ bBoundRectDirty=TRUE;
+ bSnapRectDirty=TRUE;
+ }
+ if (pObjList!=NULL) {
+ pObjList->SetRectsDirty();
+ }
+}
+
+void SdrObject::SetModel(SdrModel* pNewModel)
+{
+ if (pNewModel!=NULL && pPage!=NULL) {
+ if (pPage->GetModel()!=pNewModel) {
+ pPage=NULL;
+ }
+ }
+ pModel=pNewModel;
+}
+
+void SdrObject::SetObjList(SdrObjList* pNewObjList)
+{
+ pObjList=pNewObjList;
+}
+
+void SdrObject::SetPage(SdrPage* pNewPage)
+{
+ pPage=pNewPage;
+ if (pPage!=NULL) {
+ SdrModel* pMod=pPage->GetModel();
+ if (pMod!=pModel && pMod!=NULL) {
+ SetModel(pMod);
+ }
+ }
+}
+
+SdrItemPool* SdrObject::GetItemPool() const
+{
+ return pModel==NULL ? NULL : (SdrItemPool*)(&pModel->GetItemPool());
+}
+
+UINT32 SdrObject::GetObjInventor() const
+{
+ return SdrInventor;
+}
+
+UINT16 SdrObject::GetObjIdentifier() const
+{
+ return UINT16(OBJ_NONE);
+}
+
+void SdrObject::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ rInfo.bRotateFreeAllowed=FALSE;
+ rInfo.bMirrorFreeAllowed=FALSE;
+ rInfo.bTransparenceAllowed = FALSE;
+ rInfo.bGradientAllowed = FALSE;
+ rInfo.bShearAllowed =FALSE;
+ rInfo.bCanConvToPath =FALSE;
+ rInfo.bCanConvToPoly =FALSE;
+ rInfo.bCanConvToContour = FALSE;
+ rInfo.bCanConvToPathLineToArea=FALSE;
+ rInfo.bCanConvToPolyLineToArea=FALSE;
+}
+
+SdrLayerID SdrObject::GetLayer() const
+{
+ return SdrLayerID(nLayerId);
+}
+
+void SdrObject::GetLayer(SetOfByte& rSet) const
+{
+ rSet.Set((BYTE)nLayerId);
+ SdrObjList* pOL=GetSubList();
+ if (pOL!=NULL) {
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
+ pOL->GetObj(nObjNum)->GetLayer(rSet);
+ }
+ }
+}
+
+void SdrObject::NbcSetLayer(SdrLayerID nLayer)
+{
+ nLayerId=nLayer;
+}
+
+void SdrObject::SetLayer(SdrLayerID nLayer)
+{
+ NbcSetLayer(nLayer);
+ SetChanged();
+ SendRepaintBroadcast();
+}
+
+void SdrObject::AddListener(SfxListener& rListener)
+{
+ ImpForcePlusData();
+ if (pPlusData->pBroadcast==NULL) pPlusData->pBroadcast=new SfxBroadcaster;
+ rListener.StartListening(*pPlusData->pBroadcast);
+}
+
+void SdrObject::RemoveListener(SfxListener& rListener)
+{
+ if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) {
+ rListener.EndListening(*pPlusData->pBroadcast);
+ if (!pPlusData->pBroadcast->HasListeners()) {
+ delete pPlusData->pBroadcast;
+ pPlusData->pBroadcast=NULL;
+ }
+ }
+}
+
+void SdrObject::AddReference(SdrVirtObj& rVrtObj)
+{
+ AddListener(rVrtObj);
+}
+
+void SdrObject::DelReference(SdrVirtObj& rVrtObj)
+{
+ RemoveListener(rVrtObj);
+}
+
+ImpSdrMtfAnimator* SdrObject::ImpForceMtfAnimator()
+{
+ ImpForcePlusData();
+ if (pPlusData->pAnimator==NULL) pPlusData->pAnimator=new ImpSdrMtfAnimator;
+ return pPlusData->pAnimator;
+}
+
+AutoTimer* SdrObject::ForceAutoTimer()
+{
+ ImpForcePlusData();
+ if (pPlusData->pAutoTimer==NULL) pPlusData->pAutoTimer=new AutoTimer;
+ return pPlusData->pAutoTimer;
+}
+
+FASTBOOL SdrObject::HasRefPoint() const
+{
+ return FALSE;
+}
+
+Point SdrObject::GetRefPoint() const
+{
+ return GetBoundRect().Center();
+}
+
+void SdrObject::SetRefPoint(const Point& /*rPnt*/)
+{
+}
+
+SdrObjList* SdrObject::GetSubList() const
+{
+ return NULL;
+}
+
+SdrObject* SdrObject::GetUpGroup() const
+{
+ return pObjList!=NULL ? pObjList->GetOwnerObj() : NULL;
+}
+
+FASTBOOL SdrObject::HasSetName() const
+{
+ return TRUE;
+}
+
+void SdrObject::SetName(const XubString& rStr)
+{
+ if(rStr.Len())
+ {
+ ImpForcePlusData();
+ pPlusData->aObjName = rStr;
+ }
+ else
+ {
+ if(pPlusData)
+ {
+ pPlusData->aObjName = rStr;
+ }
+ }
+}
+
+XubString SdrObject::GetName() const
+{
+ SdrObjPlusData* pPlus=pPlusData;
+ if (pPlus!=NULL) {
+ return pPlus->aObjName;
+ }
+ return String();
+}
+
+UINT32 SdrObject::GetOrdNum() const
+{
+ if (pObjList!=NULL) {
+ if (pObjList->IsObjOrdNumsDirty()) {
+ pObjList->RecalcObjOrdNums();
+ }
+ } else ((SdrObject*)this)->nOrdNum=0;
+ return nOrdNum;
+}
+
+const Rectangle& SdrObject::GetBoundRect() const
+{
+ if (bBoundRectDirty) {
+ ((SdrObject*)this)->RecalcBoundRect();
+ ((SdrObject*)this)->bBoundRectDirty=FALSE;
+ }
+ return aOutRect;
+}
+
+void SdrObject::RecalcBoundRect()
+{
+}
+
+void SdrObject::SendRepaintBroadcast(FASTBOOL bNoPaintNeeded) const
+{
+ DBG_CHKTHIS(SdrObject,NULL);
+ FASTBOOL bBrd=pPlusData!=NULL && pPlusData->pBroadcast!=NULL;
+ FASTBOOL bPnt=bInserted && pModel!=NULL;
+ if (bPnt || bBrd) {
+ SdrHint aHint(*this);
+ aHint.SetNeedRepaint(!bNoPaintNeeded);
+ if (bBrd) pPlusData->pBroadcast->Broadcast(aHint);
+ if (bPnt) pModel->Broadcast(aHint);
+ RestartAnimation(NULL); // alle Animationen wegen Obj-Aenderung neustarten
+ }
+}
+
+void SdrObject::SetChanged()
+{
+ if (bInserted && pModel!=NULL) pModel->SetChanged();
+}
+
+FASTBOOL SdrObject::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& /*rInfoRec*/) const
+{
+ Color aRedColor( COL_RED );
+ Color aYellowColor( COL_YELLOW );
+ rXOut.OverrideLineColor( aRedColor );
+ rXOut.OverrideFillColor( aYellowColor );
+ rXOut.DrawRect(GetBoundRect());
+
+ return TRUE;
+}
+
+void SdrObject::CreateLinePoly(PolyPolygon3D& rPolyPolygon, PolyPolygon3D& rPolyLine, OutputDevice& rOut, BOOL bForceHair) const
+{
+ // get XOR Poly as base
+ XPolyPolygon aTmpPolyPolygon;
+ TakeXorPoly(aTmpPolyPolygon, TRUE);
+
+ // get LineStyleParameterPack
+ SfxItemSet aSet((SfxItemPool&)(*GetItemPool()));
+ TakeAttributes(aSet, FALSE, TRUE);
+ LineStyleParameterPack aLineAttr(aSet, bForceHair, rOut);
+ LineGeometryCreator aLineCreator(aLineAttr, rPolyPolygon, rPolyLine);
+
+ // compute single lines
+ for(UINT16 a=0;a<aTmpPolyPolygon.Count();a++)
+ {
+ // expand splines into polygons and convert to double
+ Polygon3D aPoly3D(XOutCreatePolygon(aTmpPolyPolygon[a], &rOut));
+ aPoly3D.RemoveDoublePoints();
+
+ // convert line to single Polygons; make sure the part
+ // polygons are all clockwise oriented
+ aLineCreator.AddPolygon3D(aPoly3D);
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+//#define TEST_SKELETON
+#ifdef TEST_SKELETON
+
+static OutputDevice* pImpTestOut = 0L;
+
+class ImpSkeleton;
+
+class ImpSkeletonNode
+{
+ const ImpSkeleton& mrParent;
+ ImpSkeletonNode* mpNext;
+ ImpSkeletonNode* mpPrev;
+ ImpSkeletonNode* mpUp;
+ ImpSkeletonNode* mpDown;
+
+ Vector3D maPosition;
+ Vector3D maDirection;
+ double mfDistance;
+ BOOL mbDirection;
+
+public:
+ ImpSkeletonNode(const ImpSkeleton& rPrnt, const Vector3D& rPos, const Vector3D& rDir, BOOL bDir);
+ ~ImpSkeletonNode();
+
+ ImpSkeletonNode* GetNext() const { return mpNext; }
+ void SetNext(ImpSkeletonNode* pNew) { mpNext = pNew; }
+
+ ImpSkeletonNode* GetPrev() const { return mpPrev; }
+ void SetPrev(ImpSkeletonNode* pNew) { mpPrev = pNew; }
+
+ ImpSkeletonNode* GetUp() const { return mpUp; }
+ void SetUp(ImpSkeletonNode* pNew) { mpUp = pNew; }
+
+ ImpSkeletonNode* GetDown() const { return mpDown; }
+ void SetDown(ImpSkeletonNode* pNew) { mpDown = pNew; }
+
+ const Vector3D& GetPosition() const { return maPosition; }
+ const Vector3D& GetDirection() const { return maDirection; }
+ BOOL GetOrientation() const { return mbDirection; }
+
+ double GetDistance() const { return mfDistance; }
+ void SetDistance(double fNew) { mfDistance = fNew; }
+
+ void Paint(Color aCol);
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+DECLARE_LIST(ImpSkeletonNodeList, ImpSkeletonNode*);
+
+///////////////////////////////////////////////////////////////////////////////
+
+class ImpSkeleton
+{
+ ImpSkeletonNodeList maList;
+ ImpSkeletonNode* mpList;
+
+public:
+ ImpSkeleton(const Polygon3D& rPoly);
+ ~ImpSkeleton();
+
+ BOOL ImpSimpleFindCutPoint(
+ const Vector3D& rEdge1Start, const Vector3D& rEdge1Delta,
+ const Vector3D& rEdge2Start, const Vector3D& rEdge2Delta,
+ double& rCutA, double& rCutB) const;
+
+ void PaintTree(ImpSkeletonNode* pNode, Color aCol);
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+ImpSkeletonNode::ImpSkeletonNode(const ImpSkeleton& rPrnt, const Vector3D& rPos, const Vector3D& rDir, BOOL bDir)
+: mrParent(rPrnt),
+ mpNext(this),
+ mpPrev(this),
+ mpUp(0L),
+ mpDown(0L),
+ maPosition(rPos),
+ maDirection(rDir),
+ mfDistance(0.0),
+ mbDirection(bDir)
+{
+}
+
+ImpSkeletonNode::~ImpSkeletonNode()
+{
+}
+
+void ImpSkeletonNode::Paint(Color aCol)
+{
+ if(pImpTestOut)
+ {
+ Vector3D aP1 = GetPosition();
+ Vector3D aP2 = aP1 + (GetDirection() * 5000.0);
+ Vector3D aP3 = aP1 - (GetDirection() * 1000.0);
+
+ Point aPn1((INT32)aP1.X(), (INT32)-aP1.Y());
+ Point aPn2((INT32)aP2.X(), (INT32)-aP2.Y());
+ Point aPn3((INT32)aP3.X(), (INT32)-aP3.Y());
+
+ pImpTestOut->SetLineColor(Color(aCol));
+ pImpTestOut->DrawLine(aPn1, aPn2);
+ pImpTestOut->SetLineColor(Color(COL_BLACK));
+ pImpTestOut->DrawLine(aPn1, aPn3);
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+ImpSkeleton::ImpSkeleton(const Polygon3D& rPoly)
+: mpList(0L)
+{
+ UINT16 nCnt(rPoly.GetPointCount());
+
+ // build base list
+ for(UINT16 a=0;a<nCnt;a++)
+ {
+ Vector3D aPrevDir = rPoly[(a + nCnt - 1) % nCnt] - rPoly[a];
+ Vector3D aNextDir = rPoly[(a + 1) % nCnt] - rPoly[a];
+
+ aPrevDir.Normalize();
+ aNextDir.Normalize();
+
+ Vector3D aMidDir = aPrevDir + aNextDir;
+
+ aMidDir.Normalize();
+
+ BOOL bDirection((aPrevDir.Y() * aNextDir.X() - aPrevDir.X() * aNextDir.Y()) > -SMALL_DVALUE);
+ ImpSkeletonNode* pNewNode = new ImpSkeletonNode(*this, rPoly[a], aMidDir, bDirection);
+ maList.Insert(pNewNode);
+
+ if(mpList)
+ {
+ pNewNode->SetNext(mpList->GetNext());
+ mpList->SetNext(pNewNode);
+ pNewNode->GetNext()->SetPrev(pNewNode);
+ pNewNode->SetPrev(mpList);
+ }
+
+ mpList = pNewNode;
+
+ pNewNode->Paint(COL_YELLOW);
+ }
+
+ // iterate
+ while(nCnt > 1)
+ {
+ // make step
+ double fLowestDist(DBL_MAX);
+ double fLowestCut;
+ ImpSkeletonNode* pCand = NULL;
+ ImpSkeletonNode* pCurr = mpList;
+
+ do {
+ ImpSkeletonNode* pNext = pCurr->GetNext();
+ double fCutA, fCutB;
+
+ pCurr->Paint(COL_RED);
+ pNext->Paint(COL_LIGHTRED);
+
+ if(ImpSimpleFindCutPoint(pCurr->GetPosition(), pCurr->GetDirection(),
+ pNext->GetPosition(), pNext->GetDirection(), fCutA, fCutB))
+ {
+ if((!pCurr->GetOrientation() && fCutA > 0.0) || (pCurr->GetOrientation() && fCutA < 0.0))
+ {
+ Vector3D aCutPos;
+ Vector3D aMidPos = (pCurr->GetPosition() + pNext->GetPosition()) / 2.0;
+
+ aCutPos.CalcInBetween(
+ pCurr->GetPosition(),
+ pCurr->GetPosition() + pCurr->GetDirection(), fCutA);
+
+ aCutPos -= aMidPos;
+
+ double fComp = aCutPos.GetLength() + pCurr->GetDistance() + pNext->GetDistance();
+
+ if(fComp < fLowestDist)
+ {
+ fLowestDist = fComp;
+ fLowestCut = fCutA;
+ pCand = pCurr;
+ }
+ }
+ }
+
+ pCurr->Paint(COL_YELLOW);
+ pNext->Paint(COL_YELLOW);
+
+ pCurr = pNext;
+ } while(pCurr != mpList);
+
+ if(pCand)
+ {
+ // create cut entry and re-arrange tree
+ Vector3D aCutPos;
+ aCutPos.CalcInBetween(pCand->GetPosition(), pCand->GetPosition() + pCand->GetDirection(), fLowestCut);
+
+ ImpSkeletonNode* pLeft = pCand;
+ ImpSkeletonNode* pRight = pCand->GetNext();
+
+ pLeft->Paint(COL_RED);
+ pRight->Paint(COL_LIGHTRED);
+
+ Vector3D aPrevDir = pLeft->GetPrev()->GetPosition() - pLeft->GetPosition();
+ Vector3D aNextDir = pRight->GetNext()->GetPosition() - pRight->GetPosition();
+
+ aPrevDir.Normalize();
+ aNextDir.Normalize();
+
+ Vector3D aMidDir = aPrevDir + aNextDir;
+
+ aMidDir.Normalize();
+
+ BOOL bDirection((aPrevDir.Y() * aNextDir.X() - aPrevDir.X() * aNextDir.Y()) > -SMALL_DVALUE);
+ ImpSkeletonNode* pNewNode = new ImpSkeletonNode(*this, aCutPos, aMidDir, bDirection);
+ maList.Insert(pNewNode);
+
+ // set distance
+ Vector3D aMidPoint = (pLeft->GetPosition() + pRight->GetPosition()) / 2.0;
+ pNewNode->SetDistance(aMidPoint.GetLength());
+
+ // add new node to old chain
+ pNewNode->SetPrev(pLeft->GetPrev());
+ pLeft->GetPrev()->SetNext(pNewNode);
+ pNewNode->SetNext(pRight->GetNext());
+ pRight->GetNext()->SetPrev(pNewNode);
+
+ // Set Up-Down chaining
+ pNewNode->SetDown(pLeft);
+ pLeft->SetUp(pNewNode);
+ pRight->SetUp(pNewNode);
+
+ // close lower chain
+ pLeft->SetPrev(pRight);
+ pRight->SetNext(pLeft);
+
+ nCnt--;
+ mpList = pNewNode;
+
+ pLeft->Paint(COL_BLUE);
+ pRight->Paint(COL_LIGHTBLUE);
+
+ pNewNode->Paint(COL_LIGHTGREEN);
+ }
+ else
+ {
+ // last lines are all parallel, group together
+ pCurr = mpList;
+ Vector3D aMidPos;
+ UINT16 nNumber(0);
+
+ do {
+ aMidPos += pCurr->GetPosition();
+ nNumber++;
+ pCurr = pCurr->GetNext();
+ } while(pCurr != mpList);
+
+ aMidPos /= (double)nNumber;
+
+ ImpSkeletonNode* pNewNode = new ImpSkeletonNode(*this, aMidPos, Vector3D(), FALSE);
+ maList.Insert(pNewNode);
+
+ // Set Up-Down chaining
+ pNewNode->SetDown(mpList);
+ pCurr = mpList;
+
+ do {
+ pCurr->SetUp(pNewNode);
+ pCurr->Paint(COL_BLUE);
+ pCurr = pCurr->GetNext();
+ } while(pCurr != mpList);
+
+ mpList = pNewNode;
+
+ nCnt = 1;
+ }
+ }
+
+ // show found centers
+ PaintTree(mpList, COL_LIGHTRED);
+}
+
+ImpSkeleton::~ImpSkeleton()
+{
+ while(maList.Count())
+ delete maList.Remove((UINT32)0L);
+}
+
+BOOL ImpSkeleton::ImpSimpleFindCutPoint(
+ const Vector3D& rEdge1Start, const Vector3D& rEdge1Delta,
+ const Vector3D& rEdge2Start, const Vector3D& rEdge2Delta,
+ double& rCutA, double& rCutB) const
+{
+ double fZwi = (rEdge1Delta.X() * rEdge2Delta.Y()) - (rEdge1Delta.Y() * rEdge2Delta.X());
+ rCutA = 0.0;
+
+ if(fabs(fZwi) > SMALL_DVALUE)
+ {
+ rCutA = (rEdge2Delta.Y() * (rEdge2Start.X() - rEdge1Start.X()) + rEdge2Delta.X() * (rEdge1Start.Y() - rEdge2Start.Y())) / fZwi;
+
+ if(fabs(rEdge2Delta.X()) > fabs(rEdge2Delta.Y()))
+ rCutB = (rEdge1Start.X() + rCutA * rEdge1Delta.X() - rEdge2Start.X()) / rEdge2Delta.X();
+ else
+ rCutB = (rEdge1Start.Y() + rCutA * rEdge1Delta.Y() - rEdge2Start.Y()) / rEdge2Delta.Y();
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+void ImpSkeleton::PaintTree(ImpSkeletonNode* pNode, Color aCol)
+{
+ if(pImpTestOut)
+ {
+ Vector3D aP1 = pNode->GetPosition();
+ Point aPn1((INT32)aP1.X(), (INT32)-aP1.Y());
+ ImpSkeletonNode* pDown = pNode->GetDown();
+
+ if(pDown)
+ {
+ do {
+ Vector3D aP2 = pDown->GetPosition();
+ Point aPn2((INT32)aP2.X(), (INT32)-aP2.Y());
+
+ pImpTestOut->SetLineColor(Color(aCol));
+ pImpTestOut->DrawLine(aPn1, aPn2);
+
+ PaintTree(pDown, aCol);
+
+ pDown = pDown->GetNext();
+ } while(pDown != pNode->GetDown());
+ }
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+void PolyPolygon3D_BuildSkeletonsAndGrow(const PolyPolygon3D& rPolyPoly)
+{
+ for(UINT16 a=0;a<rPolyPoly.Count();a++)
+ {
+ const Polygon3D& rPoly = rPolyPoly[a];
+ ImpSkeleton aSkeleton(rPoly);
+ }
+}
+
+#endif
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+ImpLineGeometry* SdrObject::ImpPrepareLineGeometry(ExtOutputDevice& rXOut, const SfxItemSet& rSet) const
+{
+ XLineStyle eXLS = (XLineStyle)((const XLineStyleItem&)rSet.Get(XATTR_LINESTYLE)).GetValue();
+ if(eXLS != XLINE_NONE)
+ {
+ PolyPolygon3D aPolyPoly3D;
+ PolyPolygon3D aLinePoly3D;
+
+ // need to force single point line?
+ INT32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
+ Size aSize(nLineWidth, nLineWidth);
+ aSize = rXOut.GetOutDev()->LogicToPixel(aSize);
+ BOOL bForceOnePixel(aSize.Width() <= 1 || aSize.Height() <= 1);
+ BOOL bForceTwoPixel(!bForceOnePixel && (aSize.Width() <= 2 || aSize.Height() <= 2));
+
+ // no force to two pixel when connected to MetaFile, so that not
+ // four lines instead of one is recorded (e.g.)
+ if(bForceTwoPixel && rXOut.GetOutDev()->GetConnectMetaFile())
+ bForceTwoPixel = FALSE;
+
+ // create line geometry
+ CreateLinePoly(aPolyPoly3D, aLinePoly3D, *rXOut.GetOutDev(), bForceOnePixel || bForceTwoPixel);
+
+ if(aPolyPoly3D.Count() || aLinePoly3D.Count())
+ return new ImpLineGeometry(aPolyPoly3D, aLinePoly3D, bForceOnePixel, bForceTwoPixel);
+ }
+
+ return 0L;
+}
+
+void SdrObject::ImpDrawShadowLineGeometry(
+ ExtOutputDevice& rXOut, const SfxItemSet& rSet, ImpLineGeometry& rLineGeometry) const
+{
+ sal_uInt32 nXDist = ((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
+ sal_uInt32 nYDist = ((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
+ const SdrShadowColorItem& rShadColItem = ((SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR)));
+ Color aColor(rShadColItem.GetValue());
+ sal_uInt16 nTrans = ((SdrShadowTransparenceItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue();
+
+ if(nXDist || nYDist)
+ {
+ // transformation necessary
+ PolyPolygon3D aRememberPolyPoly = rLineGeometry.GetPolyPoly3D();
+ PolyPolygon3D aRememberLinePoly = rLineGeometry.GetLinePoly3D();
+ Matrix4D aTrans;
+
+ aTrans.Translate((double)nXDist, (double)-nYDist, 0.0);
+ rLineGeometry.GetPolyPoly3D().Transform(aTrans);
+ rLineGeometry.GetLinePoly3D().Transform(aTrans);
+
+ // draw the line geometry
+ ImpDrawLineGeometry(rXOut, aColor, nTrans, rLineGeometry);
+
+ // reset line geometry to old values
+ rLineGeometry.GetPolyPoly3D() = aRememberPolyPoly;
+ rLineGeometry.GetLinePoly3D() = aRememberLinePoly;
+ }
+ else
+ {
+ // draw shadow line geometry
+ ImpDrawLineGeometry(rXOut, aColor, nTrans, rLineGeometry);
+ }
+}
+
+void SdrObject::ImpDrawColorLineGeometry(
+ ExtOutputDevice& rXOut, const SfxItemSet& rSet, ImpLineGeometry& rLineGeometry) const
+{
+ Color aColor = ((XLineColorItem&)rSet.Get(XATTR_LINECOLOR)).GetValue();
+ sal_uInt16 nTrans = ((const XLineTransparenceItem&)(rSet.Get(XATTR_LINETRANSPARENCE))).GetValue();
+
+ // draw the line geometry
+ ImpDrawLineGeometry(rXOut, aColor, nTrans, rLineGeometry);
+}
+
+void SdrObject::ImpDrawLineGeometry(
+ ExtOutputDevice& rXOut,
+ Color& rColor,
+ sal_uInt16 nTransparence,
+ ImpLineGeometry& rLineGeometry) const
+{
+ // #72796# black/white option active?
+ UINT32 nOldDrawMode(rXOut.GetOutDev()->GetDrawMode());
+ BOOL bDrawModePatched(FALSE);
+
+ // #72796# if yes, force to DRAWMODE_BLACKFILL for these are LINES to be drawn
+ // as polygons
+ if((nOldDrawMode & DRAWMODE_WHITEFILL) && (nOldDrawMode && DRAWMODE_BLACKLINE))
+ {
+ rXOut.GetOutDev()->SetDrawMode(nOldDrawMode|DRAWMODE_BLACKFILL);
+ bDrawModePatched = TRUE;
+ }
+
+ if(nTransparence)
+ {
+ if(nTransparence != 100)
+ {
+ // to be shown line has transparence, output via MetaFile
+ UINT8 nScaledTrans((UINT8)((nTransparence * 255)/100));
+ Color aTransColor(nScaledTrans, nScaledTrans, nScaledTrans);
+ Gradient aGradient(GRADIENT_LINEAR, aTransColor, aTransColor);
+ GDIMetaFile aMetaFile;
+ VirtualDevice aVDev;
+ Volume3D aVolume;
+ MapMode aMap(rXOut.GetOutDev()->GetMapMode());
+
+ // StepCount to someting small
+ aGradient.SetSteps(3);
+
+ // get bounds of geometry
+ if(rLineGeometry.GetPolyPoly3D().Count())
+ aVolume.Union(rLineGeometry.GetPolyPoly3D().GetPolySize());
+ if(rLineGeometry.GetLinePoly3D().Count())
+ aVolume.Union(rLineGeometry.GetLinePoly3D().GetPolySize());
+
+ // get pixel size in logic coor for 1,2 pixel cases
+ Size aSizeSinglePixel(1, 1);
+
+ if(rLineGeometry.DoForceOnePixel() || rLineGeometry.DoForceTwoPixel())
+ aSizeSinglePixel = rXOut.GetOutDev()->PixelToLogic(aSizeSinglePixel);
+
+ // create BoundRectangle
+ Rectangle aBound(
+ (INT32)aVolume.MinVec().X(),
+ (INT32)-aVolume.MaxVec().Y(),
+ (INT32)aVolume.MaxVec().X(),
+ (INT32)-aVolume.MinVec().Y());
+
+ if(rLineGeometry.DoForceOnePixel() || rLineGeometry.DoForceTwoPixel())
+ {
+ // enlarge aBound
+ if(rLineGeometry.DoForceTwoPixel())
+ {
+ aBound.Right() += 2 * (aSizeSinglePixel.Width() - 1);
+ aBound.Bottom() += 2 * (aSizeSinglePixel.Height() - 1);
+ }
+ else
+ {
+ aBound.Right() += (aSizeSinglePixel.Width() - 1);
+ aBound.Bottom() += (aSizeSinglePixel.Height() - 1);
+ }
+ }
+
+ // prepare VDev and MetaFile
+ aVDev.EnableOutput(FALSE);
+ aVDev.SetMapMode(rXOut.GetOutDev()->GetMapMode());
+ aMetaFile.Record(&aVDev);
+ aVDev.SetLineColor(rColor);
+ aVDev.SetFillColor(rColor);
+ aVDev.SetFont(rXOut.GetOutDev()->GetFont());
+ aVDev.SetDrawMode(rXOut.GetOutDev()->GetDrawMode());
+ aVDev.SetRefPoint(rXOut.GetOutDev()->GetRefPoint());
+
+ // create output
+ if(rLineGeometry.GetPolyPoly3D().Count())
+ {
+ PolyPolygon aPolyPoly = rLineGeometry.GetPolyPoly3D().GetPolyPolygon();
+
+ for(UINT16 a=0;a<aPolyPoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolygonAction(aPolyPoly[a]));
+ }
+
+ if(rLineGeometry.GetLinePoly3D().Count())
+ {
+ PolyPolygon aLinePoly = rLineGeometry.GetLinePoly3D().GetPolyPolygon();
+
+ if(rLineGeometry.DoForceTwoPixel())
+ {
+ UINT16 a;
+
+ for(a=0;a<aLinePoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolyLineAction(aLinePoly[a]));
+
+ aLinePoly.Move(aSizeSinglePixel.Width() - 1, 0);
+
+ for(a=0;a<aLinePoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolyLineAction(aLinePoly[a]));
+
+ aLinePoly.Move(0, aSizeSinglePixel.Height() - 1);
+
+ for(a=0;a<aLinePoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolyLineAction(aLinePoly[a]));
+
+ aLinePoly.Move(-aSizeSinglePixel.Width() - 1, 0);
+
+ for(a=0;a<aLinePoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolyLineAction(aLinePoly[a]));
+ }
+ else
+ {
+ for(UINT16 a=0;a<aLinePoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolyLineAction(aLinePoly[a]));
+ }
+ }
+
+ // draw metafile
+ aMetaFile.Stop();
+ aMetaFile.WindStart();
+ aMap.SetOrigin(aBound.TopLeft());
+ aMetaFile.SetPrefMapMode(aMap);
+ aMetaFile.SetPrefSize(aBound.GetSize());
+ rXOut.GetOutDev()->DrawTransparent(aMetaFile, aBound.TopLeft(), aBound.GetSize(), aGradient);
+ }
+ }
+ else
+ {
+ // no transparence, simple output
+ if(rLineGeometry.GetPolyPoly3D().Count())
+ {
+ PolyPolygon aPolyPoly = rLineGeometry.GetPolyPoly3D().GetPolyPolygon();
+
+ rXOut.GetOutDev()->SetLineColor();
+ rXOut.GetOutDev()->SetFillColor(rColor);
+
+ for(UINT16 a=0;a<aPolyPoly.Count();a++)
+ rXOut.GetOutDev()->DrawPolygon(aPolyPoly[a]);
+ }
+
+ if(rLineGeometry.GetLinePoly3D().Count())
+ {
+ PolyPolygon aLinePoly = rLineGeometry.GetLinePoly3D().GetPolyPolygon();
+
+ rXOut.GetOutDev()->SetLineColor(rColor);
+ rXOut.GetOutDev()->SetFillColor();
+
+ if(rLineGeometry.DoForceTwoPixel())
+ {
+ PolyPolygon aPolyPolyPixel = rXOut.GetOutDev()->LogicToPixel(aLinePoly);
+ BOOL bWasEnabled = rXOut.GetOutDev()->IsMapModeEnabled();
+ rXOut.GetOutDev()->EnableMapMode(FALSE);
+ UINT16 a;
+
+ for(a=0;a<aLinePoly.Count();a++)
+ rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
+
+ aPolyPolyPixel.Move(1,0);
+
+ for(a=0;a<aLinePoly.Count();a++)
+ rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
+
+ aPolyPolyPixel.Move(0,1);
+
+ for(a=0;a<aLinePoly.Count();a++)
+ rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
+
+ aPolyPolyPixel.Move(-1,0);
+
+ for(a=0;a<aLinePoly.Count();a++)
+ rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
+
+ rXOut.GetOutDev()->EnableMapMode(bWasEnabled);
+ }
+ else
+ {
+ for(UINT16 a=0;a<aLinePoly.Count();a++)
+ rXOut.GetOutDev()->DrawPolyLine(aLinePoly[a]);
+ }
+ }
+ }
+
+ // #72796# restore DrawMode
+ if(bDrawModePatched)
+ rXOut.GetOutDev()->SetDrawMode(nOldDrawMode);
+}
+
+BOOL SdrObject::LineGeometryUsageIsNecessary() const
+{
+ SfxItemSet aSet((SfxItemPool&)(*GetItemPool()));
+ TakeAttributes(aSet, FALSE, TRUE);
+ XLineStyle eXLS = (XLineStyle)((const XLineStyleItem&)aSet.Get(XATTR_LINESTYLE)).GetValue();
+ return (eXLS != XLINE_NONE);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrObject::PaintGluePoints(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ // Nur Klebepunkte der aktuellen ObjList Painten
+ if (rInfoRec.pPV==NULL || rInfoRec.pPV->GetObjList()==pObjList) {
+ const SdrGluePointList* pGPL=GetGluePointList();
+ if (pGPL!=NULL) {
+ OutputDevice* pOut=rXOut.GetOutDev();
+ pGPL->DrawAll(*pOut,this);
+ }
+ }
+ return TRUE;
+}
+
+SdrObject* SdrObject::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+ Rectangle aO(GetBoundRect());
+ aO.Left()-=nTol; aO.Top()-=nTol; aO.Right()+=nTol; aO.Bottom()+=nTol;
+ FASTBOOL bRet=aO.IsInside(rPnt);
+ return bRet ? (SdrObject*)this : NULL;
+}
+
+SdrObject* SdrObject::Clone() const
+{
+ SdrObject* pObj=SdrObjFactory::MakeNewObject(GetObjInventor(),GetObjIdentifier(),NULL);
+ if (pObj!=NULL) {
+ pObj->pModel=pModel;
+ pObj->pPage=pPage;
+ *pObj=*this;
+ }
+ return pObj;
+}
+
+SdrObject* SdrObject::Clone(SdrPage* pNewPage, SdrModel* pNewModel) const
+{
+ SdrObject* pObj=SdrObjFactory::MakeNewObject(GetObjInventor(),GetObjIdentifier(),NULL);
+ if (pObj!=NULL) {
+ pObj->pModel=pNewModel;
+ pObj->pPage=pNewPage;
+ *pObj=*this;
+ }
+ return pObj;
+}
+
+void SdrObject::operator=(const SdrObject& rObj)
+{
+ pModel =rObj.pModel;
+ aOutRect=rObj.GetBoundRect();
+ nLayerId=rObj.GetLayer();
+ aAnchor =rObj.aAnchor;
+ bVirtObj=rObj.bVirtObj;
+ bSizProt=rObj.bSizProt;
+ bMovProt=rObj.bMovProt;
+ bNoPrint=rObj.bNoPrint;
+ //EmptyPresObj wird nicht kopiert: nun doch! (25-07-1995, Joe)
+ bEmptyPresObj =rObj.bEmptyPresObj;
+ //NotVisibleAsMaster wird nicht kopiert: nun doch! (25-07-1995, Joe)
+ bNotVisibleAsMaster=rObj.bNotVisibleAsMaster;
+
+ bBoundRectDirty=rObj.bBoundRectDirty;
+ bSnapRectDirty=TRUE; //rObj.bSnapRectDirty;
+ bNotMasterCachable=rObj.bNotMasterCachable;
+ if (pPlusData!=NULL) { delete pPlusData; pPlusData=NULL; }
+ if (rObj.pPlusData!=NULL) {
+ pPlusData=rObj.pPlusData->Clone(this);
+ }
+ if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) {
+ delete pPlusData->pBroadcast; // der Broadcaster wird nicht mitkopiert
+ pPlusData->pBroadcast=NULL;
+ }
+}
+
+void SdrObject::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulNONE);
+}
+
+void SdrObject::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralNONE);
+}
+
+void SdrObject::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, USHORT nVal) const
+{
+ rStr = ImpGetResStr(nStrCacheID);
+
+ sal_Char aSearchText1[] = "%O";
+ sal_Char aSearchText2[] = "%N";
+ xub_StrLen nPos = rStr.SearchAscii(aSearchText1);
+
+ if(nPos != STRING_NOTFOUND)
+ {
+ rStr.Erase(nPos, 2);
+
+ XubString aObjName;
+
+ TakeObjNameSingul(aObjName);
+ rStr.Insert(aObjName, nPos);
+ }
+
+ nPos = rStr.SearchAscii(aSearchText2);
+
+ if(nPos != STRING_NOTFOUND)
+ {
+ rStr.Erase(nPos, 2);
+ rStr.Insert(UniString::CreateFromInt32(nVal), nPos);
+ }
+}
+
+XubString SdrObject::GetWinkStr(long nWink, FASTBOOL bNoDegChar) const
+{
+ XubString aStr;
+ if (pModel!=NULL) {
+ pModel->TakeWinkStr(nWink,aStr,bNoDegChar);
+ }
+ return aStr;
+}
+
+XubString SdrObject::GetMetrStr(long nVal, MapUnit eWantMap, FASTBOOL bNoUnitChars) const
+{
+ XubString aStr;
+ if (pModel!=NULL) {
+ pModel->TakeMetricStr(nVal,aStr,bNoUnitChars);
+ }
+ return aStr;
+}
+
+void SdrObject::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL /*bDetail*/) const
+{
+ rPoly=XPolyPolygon(XPolygon(GetBoundRect()));
+}
+
+void SdrObject::TakeContour( XPolyPolygon& rPoly ) const
+{
+ VirtualDevice aBlackHole;
+ GDIMetaFile aMtf;
+ SdrPaintInfoRec aPaintInfo;
+ XPolygon aXPoly;
+
+ aBlackHole.EnableOutput( FALSE );
+ aBlackHole.SetDrawMode( DRAWMODE_NOFILL );
+
+ ExtOutputDevice aXOut( &aBlackHole );
+ SdrObject* pClone = Clone();
+ SfxItemSet aSet( (SfxItemPool&)( *GetItemPool() ),
+ XATTR_LINESTYLE, XATTR_LINESTYLE,
+ XATTR_LINECOLOR, XATTR_LINECOLOR,
+ XATTR_FILLSTYLE, XATTR_FILLSTYLE, 0 );
+
+ pClone->TakeAttributes( aSet, TRUE, FALSE );
+
+ aSet.Put( XLineStyleItem( XLINE_SOLID ) );
+ aSet.Put( XLineColorItem(String(), Color( COL_BLACK ) ) );
+ aSet.Put( XFillStyleItem( XFILL_NONE ) );
+ pClone->NbcSetAttributes( aSet, FALSE );
+
+ aMtf.Record( &aBlackHole );
+ aPaintInfo.nPaintMode = SDRPAINTMODE_DRAFTTEXT | SDRPAINTMODE_DRAFTGRAF;
+ pClone->Paint( aXOut, aPaintInfo );
+ delete pClone;
+ aMtf.Stop();
+ aMtf.WindStart();
+ rPoly.Clear();
+
+ for( ULONG nActionNum = 0, nActionAnz = aMtf.GetActionCount(); nActionNum < nActionAnz; nActionNum++ )
+ {
+ const MetaAction& rAct = *aMtf.GetAction( nActionNum );
+ BOOL bXPoly = FALSE;
+
+ switch( rAct.GetType() )
+ {
+ case META_RECT_ACTION:
+ {
+ const Rectangle& rRect = ( (const MetaRectAction&) rAct ).GetRect();
+
+ if( rRect.GetWidth() && rRect.GetHeight() )
+ {
+ aXPoly = rRect;
+ bXPoly = TRUE;
+ }
+ }
+ break;
+
+ case META_ELLIPSE_ACTION:
+ {
+ const Rectangle& rRect = ( (const MetaEllipseAction&) rAct ).GetRect();
+
+ if( rRect.GetWidth() && rRect.GetHeight() )
+ {
+ aXPoly = XPolygon( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1 );
+ bXPoly = TRUE;
+ }
+ }
+ break;
+
+ case META_POLYGON_ACTION:
+ {
+ const Polygon& rPoly = ( (const MetaPolygonAction&) rAct ).GetPolygon();
+
+ if( rPoly.GetSize() > 2 )
+ {
+ aXPoly = rPoly;
+ bXPoly = TRUE;
+ }
+ }
+ break;
+
+ case META_POLYPOLYGON_ACTION:
+ {
+ const PolyPolygon& rPolyPoly = ( (const MetaPolyPolygonAction&) rAct ).GetPolyPolygon();
+
+ if( rPolyPoly.Count() && ( rPolyPoly[ 0 ].GetSize() > 2 ) )
+ rPoly.Insert( rPolyPoly );
+ }
+ break;
+
+ case META_POLYLINE_ACTION:
+ {
+ const Polygon& rPoly = ( (const MetaPolyLineAction&) rAct ).GetPolygon();
+
+ if( rPoly.GetSize() > 1 )
+ {
+ aXPoly = rPoly;
+ bXPoly = TRUE;
+ }
+ }
+ break;
+
+ case META_LINE_ACTION:
+ {
+ aXPoly = XPolygon( 2 );
+ aXPoly[ 0 ] = ( (const MetaLineAction&) rAct ).GetStartPoint();
+ aXPoly[ 1 ] = ( (const MetaLineAction&) rAct ).GetEndPoint();
+ bXPoly = TRUE;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if( bXPoly )
+ rPoly.Insert( aXPoly );
+ }
+
+ // if we only have the outline of the object, we have _no_ contouir
+ if( rPoly.Count() == 1 )
+ rPoly.Clear();
+}
+
+void SdrObject::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+// Handles
+
+USHORT SdrObject::GetHdlCount() const
+{
+ return 8;
+}
+
+SdrHdl* SdrObject::GetHdl(USHORT nHdlNum) const
+{
+ SdrHdl* pH=NULL;
+ const Rectangle& rR=GetSnapRect();
+ switch (nHdlNum) {
+ case 0: pH=new SdrHdl(rR.TopLeft(), HDL_UPLFT); break; // Oben links
+ case 1: pH=new SdrHdl(rR.TopCenter(), HDL_UPPER); break; // Oben
+ case 2: pH=new SdrHdl(rR.TopRight(), HDL_UPRGT); break; // Oben rechts
+ case 3: pH=new SdrHdl(rR.LeftCenter(), HDL_LEFT ); break; // Links
+ case 4: pH=new SdrHdl(rR.RightCenter(), HDL_RIGHT); break; // Rechts
+ case 5: pH=new SdrHdl(rR.BottomLeft(), HDL_LWLFT); break; // Unten links
+ case 6: pH=new SdrHdl(rR.BottomCenter(),HDL_LOWER); break; // Unten
+ case 7: pH=new SdrHdl(rR.BottomRight(), HDL_LWRGT); break; // Unten rechts
+ }
+ return pH;
+}
+
+USHORT SdrObject::GetPlusHdlCount(const SdrHdl& rHdl) const
+{
+ return 0;
+}
+
+SdrHdl* SdrObject::GetPlusHdl(const SdrHdl& rHdl, USHORT nPlNum) const
+{
+ return NULL;
+}
+
+void SdrObject::AddToHdlList(SdrHdlList& rHdlList) const
+{
+ USHORT nAnz=GetHdlCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ SdrHdl* pHdl=GetHdl(i);
+ if (pHdl!=NULL) {
+ rHdlList.AddHdl(pHdl);
+ }
+ }
+}
+
+// Drag
+
+Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const
+{
+ Rectangle aTmpRect(GetSnapRect());
+ Rectangle aRect(aTmpRect);
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind();
+ FASTBOOL bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT);
+ FASTBOOL bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho();
+ FASTBOOL bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho();
+ Point aPos(rDrag.GetNow());
+ FASTBOOL bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT);
+ FASTBOOL bRgt=(eHdl==HDL_UPRGT || eHdl==HDL_RIGHT || eHdl==HDL_LWRGT);
+ FASTBOOL bTop=(eHdl==HDL_UPRGT || eHdl==HDL_UPPER || eHdl==HDL_UPLFT);
+ FASTBOOL bBtm=(eHdl==HDL_LWRGT || eHdl==HDL_LOWER || eHdl==HDL_LWLFT);
+ if (bLft) aTmpRect.Left() =aPos.X();
+ if (bRgt) aTmpRect.Right() =aPos.X();
+ if (bTop) aTmpRect.Top() =aPos.Y();
+ if (bBtm) aTmpRect.Bottom()=aPos.Y();
+ if (bOrtho) { // Ortho
+ long nWdt0=aRect.Right() -aRect.Left();
+ long nHgt0=aRect.Bottom()-aRect.Top();
+ long nXMul=aTmpRect.Right() -aTmpRect.Left();
+ long nYMul=aTmpRect.Bottom()-aTmpRect.Top();
+ long nXDiv=nWdt0;
+ long nYDiv=nHgt0;
+ FASTBOOL bXNeg=(nXMul<0)!=(nXDiv<0);
+ FASTBOOL bYNeg=(nYMul<0)!=(nYDiv<0);
+ nXMul=Abs(nXMul);
+ nYMul=Abs(nYMul);
+ nXDiv=Abs(nXDiv);
+ nYDiv=Abs(nYDiv);
+ Fraction aXFact(nXMul,nXDiv); // Fractions zum kuerzen
+ Fraction aYFact(nYMul,nYDiv); // und zum vergleichen
+ nXMul=aXFact.GetNumerator();
+ nYMul=aYFact.GetNumerator();
+ nXDiv=aXFact.GetDenominator();
+ nYDiv=aYFact.GetDenominator();
+ if (bEcke) { // Eckpunkthandles
+ FASTBOOL bUseX=(aXFact<aYFact) != bBigOrtho;
+ if (bUseX) {
+ long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
+ if (bYNeg) nNeed=-nNeed;
+ if (bTop) aTmpRect.Top()=aTmpRect.Bottom()-nNeed;
+ if (bBtm) aTmpRect.Bottom()=aTmpRect.Top()+nNeed;
+ } else {
+ long nNeed=long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
+ if (bXNeg) nNeed=-nNeed;
+ if (bLft) aTmpRect.Left()=aTmpRect.Right()-nNeed;
+ if (bRgt) aTmpRect.Right()=aTmpRect.Left()+nNeed;
+ }
+ } else { // Scheitelpunkthandles
+ if ((bLft || bRgt) && nXDiv!=0) {
+ long nHgt0=aRect.Bottom()-aRect.Top();
+ long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
+ aTmpRect.Top()-=(nNeed-nHgt0)/2;
+ aTmpRect.Bottom()=aTmpRect.Top()+nNeed;
+ }
+ if ((bTop || bBtm) && nYDiv!=0) {
+ long nWdt0=aRect.Right()-aRect.Left();
+ long nNeed=long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
+ aTmpRect.Left()-=(nNeed-nWdt0)/2;
+ aTmpRect.Right()=aTmpRect.Left()+nNeed;
+ }
+ }
+ }
+ aTmpRect.Justify();
+ return aTmpRect;
+}
+
+FASTBOOL SdrObject::HasSpecialDrag() const
+{
+ return FALSE; // noch nicht ganz fertig ...
+}
+
+FASTBOOL SdrObject::BegDrag(SdrDragStat& rDrag) const
+{
+ if (bSizProt) return FALSE; // Groesse geschuetzt
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind();
+ if (eHdl==HDL_UPLFT || eHdl==HDL_UPPER || eHdl==HDL_UPRGT ||
+ eHdl==HDL_LEFT || eHdl==HDL_RIGHT ||
+ eHdl==HDL_LWLFT || eHdl==HDL_LOWER || eHdl==HDL_LWRGT) return TRUE;
+ return FALSE;
+}
+
+FASTBOOL SdrObject::MovDrag(SdrDragStat& rDrag) const
+{
+ return TRUE;
+}
+
+FASTBOOL SdrObject::EndDrag(SdrDragStat& rDrag)
+{
+ Rectangle aNewRect(ImpDragCalcRect(rDrag));
+ if (aNewRect!=GetSnapRect()) {
+ SetSnapRect(aNewRect);
+ }
+ return TRUE;
+}
+
+void SdrObject::BrkDrag(SdrDragStat& rDrag) const
+{
+}
+
+XubString SdrObject::GetDragComment(const SdrDragStat& rDrag, FASTBOOL bDragUndoComment, FASTBOOL bCreateComment) const
+{
+ return String();
+}
+
+void SdrObject::TakeDragPoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rXPP.Clear();
+ Rectangle aTmpRect(ImpDragCalcRect(rDrag));
+ rXPP.Insert(XPolygon(aTmpRect));
+}
+
+// Create
+FASTBOOL SdrObject::BegCreate(SdrDragStat& rStat)
+{
+ rStat.SetOrtho4Possible();
+ return TRUE;
+}
+
+FASTBOOL SdrObject::MovCreate(SdrDragStat& rStat)
+{
+ rStat.TakeCreateRect(aOutRect);
+ rStat.SetActionRect(aOutRect);
+ aOutRect.Justify();
+ bBoundRectDirty=TRUE;
+ bSnapRectDirty=TRUE;
+ return TRUE;
+}
+
+FASTBOOL SdrObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+{
+ rStat.TakeCreateRect(aOutRect);
+ aOutRect.Justify();
+ SetRectsDirty();
+ return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
+}
+
+void SdrObject::BrkCreate(SdrDragStat& rStat)
+{
+}
+
+FASTBOOL SdrObject::BckCreate(SdrDragStat& rStat)
+{
+ return FALSE;
+}
+
+void SdrObject::TakeCreatePoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ Rectangle aRect1;
+ rDrag.TakeCreateRect(aRect1);
+ aRect1.Justify();
+ rXPP=XPolyPolygon(XPolygon(aRect1));
+}
+
+Pointer SdrObject::GetCreatePointer() const
+{
+ return Pointer(POINTER_CROSS);
+}
+
+// Transformationen
+void SdrObject::NbcMove(const Size& rSiz)
+{
+ MoveRect(aOutRect,rSiz);
+ SetRectsDirty();
+}
+
+void SdrObject::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0);
+ FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0);
+ if (bXMirr || bYMirr) {
+ Point aRef1(GetSnapRect().Center());
+ if (bXMirr) {
+ Point aRef2(aRef1);
+ aRef2.Y()++;
+ NbcMirrorGluePoints(aRef1,aRef2);
+ }
+ if (bYMirr) {
+ Point aRef2(aRef1);
+ aRef2.X()++;
+ NbcMirrorGluePoints(aRef1,aRef2);
+ }
+ }
+ ResizeRect(aOutRect,rRef,xFact,yFact);
+ SetRectsDirty();
+}
+
+void SdrObject::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ SetGlueReallyAbsolute(TRUE);
+ aOutRect.Move(-rRef.X(),-rRef.Y());
+ Rectangle R(aOutRect);
+ if (sn==1.0 && cs==0.0) { // 90ø
+ aOutRect.Left() =-R.Bottom();
+ aOutRect.Right() =-R.Top();
+ aOutRect.Top() =R.Left();
+ aOutRect.Bottom()=R.Right();
+ } else if (sn==0.0 && cs==-1.0) { // 180ø
+ aOutRect.Left() =-R.Right();
+ aOutRect.Right() =-R.Left();
+ aOutRect.Top() =-R.Bottom();
+ aOutRect.Bottom()=-R.Top();
+ } else if (sn==-1.0 && cs==0.0) { // 270ø
+ aOutRect.Left() =R.Top();
+ aOutRect.Right() =R.Bottom();
+ aOutRect.Top() =-R.Right();
+ aOutRect.Bottom()=-R.Left();
+ }
+ aOutRect.Move(rRef.X(),rRef.Y());
+ aOutRect.Justify(); // Sicherheitshalber
+ SetRectsDirty();
+ NbcRotateGluePoints(rRef,nWink,sn,cs);
+ SetGlueReallyAbsolute(FALSE);
+}
+
+void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2)
+{
+ SetGlueReallyAbsolute(TRUE);
+ aOutRect.Move(-rRef1.X(),-rRef1.Y());
+ Rectangle R(aOutRect);
+ long dx=rRef2.X()-rRef1.X();
+ long dy=rRef2.Y()-rRef1.Y();
+ if (dx==0) { // Vertikale Achse
+ aOutRect.Left() =-R.Right();
+ aOutRect.Right()=-R.Left();
+ } else if (dy==0) { // Horizontale Achse
+ aOutRect.Top() =-R.Bottom();
+ aOutRect.Bottom()=-R.Top();
+ } else if (dx==dy) { /* 45 Grad Achse \ */
+ aOutRect.Left() =R.Top();
+ aOutRect.Right() =R.Bottom();
+ aOutRect.Top() =R.Left();
+ aOutRect.Bottom()=R.Right();
+ } else if (dx==-dy) { // 45 Grad Achse /
+ aOutRect.Left() =-R.Bottom();
+ aOutRect.Right() =-R.Top();
+ aOutRect.Top() =-R.Right();
+ aOutRect.Bottom()=-R.Left();
+ }
+ aOutRect.Move(rRef1.X(),rRef1.Y());
+ aOutRect.Justify(); // Sicherheitshalber
+ SetRectsDirty();
+ NbcMirrorGluePoints(rRef1,rRef2);
+ SetGlueReallyAbsolute(FALSE);
+}
+
+void SdrObject::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ SetGlueReallyAbsolute(TRUE);
+ NbcShearGluePoints(rRef,nWink,tn,bVShear);
+ SetGlueReallyAbsolute(FALSE);
+}
+
+void SdrObject::Move(const Size& rSiz)
+{
+ if (rSiz.Width()!=0 || rSiz.Height()!=0) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcMove(rSiz);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+ }
+}
+
+void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcResize(rRef,xFact,yFact);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrObject::Rotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ if (nWink!=0) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcRotate(rRef,nWink,sn,cs);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrObject::Mirror(const Point& rRef1, const Point& rRef2)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcMirror(rRef1,rRef2);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+void SdrObject::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ if (nWink!=0) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcShear(rRef,nWink,tn,bVShear);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrObject::NbcSetRelativePos(const Point& rPnt)
+{
+ Point aRelPos0(GetSnapRect().TopLeft()-aAnchor);
+ Size aSiz(rPnt.X()-aRelPos0.X(),rPnt.Y()-aRelPos0.Y());
+ NbcMove(aSiz); // Der ruft auch das SetRectsDirty()
+}
+
+void SdrObject::SetRelativePos(const Point& rPnt)
+{
+ if (rPnt!=GetRelativePos()) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetRelativePos(rPnt);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+ }
+}
+
+Point SdrObject::GetRelativePos() const
+{
+ return GetSnapRect().TopLeft()-aAnchor;
+}
+
+void SdrObject::NbcSetAnchorPos(const Point& rPnt)
+{
+ Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
+ aAnchor=rPnt;
+ NbcMove(aSiz); // Der ruft auch das SetRectsDirty()
+}
+
+void SdrObject::SetAnchorPos(const Point& rPnt)
+{
+ if (rPnt!=aAnchor) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetAnchorPos(rPnt);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+ }
+}
+
+const Point& SdrObject::GetAnchorPos() const
+{
+ return aAnchor;
+}
+
+void SdrObject::RecalcSnapRect()
+{
+}
+
+const Rectangle& SdrObject::GetSnapRect() const
+{
+ return aOutRect;
+}
+
+void SdrObject::NbcSetSnapRect(const Rectangle& rRect)
+{
+ aOutRect=rRect;
+}
+
+const Rectangle& SdrObject::GetLogicRect() const
+{
+ return GetSnapRect();
+}
+
+void SdrObject::NbcSetLogicRect(const Rectangle& rRect)
+{
+ NbcSetSnapRect(rRect);
+}
+
+void SdrObject::SetSnapRect(const Rectangle& rRect)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetSnapRect(rRect);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+void SdrObject::SetLogicRect(const Rectangle& rRect)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetLogicRect(rRect);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+long SdrObject::GetRotateAngle() const
+{
+ return 0;
+}
+
+long SdrObject::GetShearAngle(FASTBOOL bVertical) const
+{
+ return 0;
+}
+
+USHORT SdrObject::GetSnapPointCount() const
+{
+ return GetPointCount();
+}
+
+Point SdrObject::GetSnapPoint(USHORT i) const
+{
+ return GetPoint(i);
+}
+
+FASTBOOL SdrObject::IsPolyObj() const
+{
+ return FALSE;
+}
+
+USHORT SdrObject::GetPointCount() const
+{
+ return 0;
+}
+
+const Point& SdrObject::GetPoint(USHORT i) const
+{
+ return *((Point*)NULL);
+}
+
+void SdrObject::SetPoint(const Point& rPnt, USHORT i)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetPoint(rPnt,i);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+void SdrObject::NbcSetPoint(const Point& rPnt, USHORT i)
+{
+}
+
+USHORT SdrObject::InsPoint(const Point& rPos, FASTBOOL bNewObj, FASTBOOL& rInsNextAfter)
+{
+ USHORT nRet=0xFFFF;
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ nRet=NbcInsPoint(rPos,bNewObj,FALSE,rInsNextAfter);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ return nRet;
+}
+
+USHORT SdrObject::NbcInsPoint(const Point& rPos, FASTBOOL bNewObj, FASTBOOL bHideHim, FASTBOOL& rInsNextAfter)
+{
+ return 0xFFFF;
+}
+
+USHORT SdrObject::InsPoint(USHORT i, const Point& rPos, FASTBOOL bInsAfter, FASTBOOL bNewObj)
+{
+ USHORT nRet=0xFFFF;
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ nRet=NbcInsPoint(i,rPos,bInsAfter,bNewObj,FALSE);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ return nRet;
+}
+
+USHORT SdrObject::NbcInsPoint(USHORT i, const Point& rPos, FASTBOOL bInsAfter, FASTBOOL bNewObj, FASTBOOL bHideHim)
+{
+ return 0xFFFF;
+}
+
+FASTBOOL SdrObject::DelPoint(USHORT i)
+{
+ FASTBOOL bRet=TRUE;
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ bRet=NbcDelPoint(i);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ return bRet;
+}
+
+FASTBOOL SdrObject::NbcDelPoint(USHORT i)
+{
+ return TRUE;
+}
+
+SdrObject* SdrObject::RipPoint(USHORT i, USHORT& rNewPt0Index)
+{
+ SdrObject* pRet=NULL;
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ pRet=NbcRipPoint(i,rNewPt0Index);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ return pRet;
+}
+
+SdrObject* SdrObject::NbcRipPoint(USHORT i, USHORT& rNewPt0Index)
+{
+ return NULL;
+}
+
+void SdrObject::Shut()
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcShut();
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+void SdrObject::NbcShut()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrObject::HasTextEdit() const
+{
+ return FALSE;
+}
+
+SdrObject* SdrObject::CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ return CheckHit(rPnt,nTol,pVisiLayer);
+}
+
+FASTBOOL SdrObject::BegTextEdit(SdrOutliner& rOutl)
+{
+ return FALSE;
+}
+
+void SdrObject::EndTextEdit(SdrOutliner& rOutl)
+{
+}
+
+void SdrObject::SetOutlinerParaObject(OutlinerParaObject* pTextObject)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetOutlinerParaObject(pTextObject);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (GetBoundRect()!=aBoundRect0) {
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrObject::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject)
+{
+}
+
+OutlinerParaObject* SdrObject::GetOutlinerParaObject() const
+{
+ return NULL;
+}
+
+void SdrObject::NbcReformatText()
+{
+}
+
+void SdrObject::ReformatText()
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcReformatText();
+ SetChanged();
+ SendRepaintBroadcast();
+ if (GetBoundRect()!=aBoundRect0) {
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrObject::BurnInStyleSheetAttributes()
+{
+}
+
+void SdrObject::RestartAnimation(SdrPageView* pPageView) const
+{
+}
+
+#define Imp2ndKennung (0x434F4D43)
+SdrObjUserData* SdrObject::ImpGetMacroUserData() const
+{
+ SdrObjUserData* pData=NULL;
+ USHORT nAnz=GetUserDataCount();
+ for (USHORT nNum=nAnz; nNum>0 && pData==NULL;) {
+ nNum--;
+ pData=GetUserData(nNum);
+ if (!pData->HasMacro(this)) pData=NULL;
+ }
+ return pData;
+}
+
+FASTBOOL SdrObject::HasMacro() const
+{
+ SdrObjUserData* pData=ImpGetMacroUserData();
+ return pData!=NULL ? pData->HasMacro(this) : FALSE;
+}
+
+SdrObject* SdrObject::CheckMacroHit(const SdrObjMacroHitRec& rRec) const
+{
+ SdrObjUserData* pData=ImpGetMacroUserData();
+ if (pData!=NULL) {
+ return pData->CheckMacroHit(rRec,this);
+ }
+ return CheckHit(rRec.aPos,rRec.nTol,rRec.pVisiLayer);
+}
+
+Pointer SdrObject::GetMacroPointer(const SdrObjMacroHitRec& rRec) const
+{
+ SdrObjUserData* pData=ImpGetMacroUserData();
+ if (pData!=NULL) {
+ return pData->GetMacroPointer(rRec,this);
+ }
+ return Pointer(POINTER_REFHAND);
+}
+
+void SdrObject::PaintMacro(ExtOutputDevice& rXOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
+{
+ SdrObjUserData* pData=ImpGetMacroUserData();
+ if (pData!=NULL) {
+ pData->PaintMacro(rXOut,rDirtyRect,rRec,this);
+ } else {
+ Color aBlackColor( COL_BLACK );
+ Color aTranspColor( COL_TRANSPARENT );
+ rXOut.OverrideLineColor( aBlackColor );
+ rXOut.OverrideFillColor( aTranspColor );
+ RasterOp eRop0=rXOut.GetRasterOp();
+ rXOut.SetRasterOp(ROP_INVERT);
+ XPolyPolygon aXPP;
+ TakeXorPoly(aXPP,TRUE);
+ USHORT nAnz=aXPP.Count();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ rXOut.DrawXPolyLine(aXPP[nNum]);
+ }
+ rXOut.SetRasterOp(eRop0);
+ }
+}
+
+FASTBOOL SdrObject::DoMacro(const SdrObjMacroHitRec& rRec)
+{
+ SdrObjUserData* pData=ImpGetMacroUserData();
+ if (pData!=NULL) {
+ return pData->DoMacro(rRec,this);
+ }
+ return FALSE;
+}
+
+XubString SdrObject::GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const
+{
+ SdrObjUserData* pData=ImpGetMacroUserData();
+ if (pData!=NULL) {
+ return pData->GetMacroPopupComment(rRec,this);
+ }
+ return String();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrObjGeoData* SdrObject::NewGeoData() const
+{
+ return new SdrObjGeoData;
+}
+
+void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ rGeo.aBoundRect =GetBoundRect();
+ rGeo.aAnchor =aAnchor ;
+ rGeo.bMovProt =bMovProt ;
+ rGeo.bSizProt =bSizProt ;
+ rGeo.bNoPrint =bNoPrint ;
+ rGeo.bClosedObj =bClosedObj ;
+ rGeo.nLayerId =nLayerId ;
+
+ // Benutzerdefinierte Klebepunkte
+ if (pPlusData!=NULL && pPlusData->pGluePoints!=NULL) {
+ if (rGeo.pGPL!=NULL) {
+ *rGeo.pGPL=*pPlusData->pGluePoints;
+ } else {
+ rGeo.pGPL=new SdrGluePointList(*pPlusData->pGluePoints);
+ }
+ } else {
+ if (rGeo.pGPL!=NULL) {
+ delete rGeo.pGPL;
+ rGeo.pGPL=NULL;
+ }
+ }
+}
+
+void SdrObject::RestGeoData(const SdrObjGeoData& rGeo)
+{
+ SetRectsDirty();
+ aOutRect =rGeo.aBoundRect ;
+ aAnchor =rGeo.aAnchor ;
+ bMovProt =rGeo.bMovProt ;
+ bSizProt =rGeo.bSizProt ;
+ bNoPrint =rGeo.bNoPrint ;
+ bClosedObj =rGeo.bClosedObj ;
+ nLayerId =rGeo.nLayerId ;
+
+ // Benutzerdefinierte Klebepunkte
+ if (rGeo.pGPL!=NULL) {
+ ImpForcePlusData();
+ if (pPlusData->pGluePoints!=NULL) {
+ *pPlusData->pGluePoints=*rGeo.pGPL;
+ } else {
+ pPlusData->pGluePoints=new SdrGluePointList(*rGeo.pGPL);
+ }
+ } else {
+ if (pPlusData!=NULL && pPlusData->pGluePoints!=NULL) {
+ delete pPlusData->pGluePoints;
+ pPlusData->pGluePoints=NULL;
+ }
+ }
+}
+
+SdrObjGeoData* SdrObject::GetGeoData() const
+{
+ SdrObjGeoData* pGeo=NewGeoData();
+ SaveGeoData(*pGeo);
+ return pGeo;
+}
+
+void SdrObject::SetGeoData(const SdrObjGeoData& rGeo)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ RestGeoData(rGeo);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrObject::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+}
+
+void SdrObject::SetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+}
+
+void SdrObject::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+}
+
+void SdrObject::ApplyNotPersistAttr(const SfxItemSet& rAttr)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcApplyNotPersistAttr(rAttr);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
+{
+ const Rectangle& rSnap=GetSnapRect();
+ const Rectangle& rLogic=GetLogicRect();
+ Point aRef1(rSnap.Center());
+ Point aRef2(aRef1); aRef2.Y()++;
+ const SfxPoolItem *pPoolItem=NULL;
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ aRef1.X()=((const SdrTransformRef1XItem*)pPoolItem)->GetValue();
+ }
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ aRef1.Y()=((const SdrTransformRef1YItem*)pPoolItem)->GetValue();
+ }
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ aRef2.X()=((const SdrTransformRef2XItem*)pPoolItem)->GetValue();
+ }
+ if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ aRef2.Y()=((const SdrTransformRef2YItem*)pPoolItem)->GetValue();
+ }
+
+ Rectangle aNewSnap(rSnap);
+ if (rAttr.GetItemState(SDRATTR_MOVEX,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrMoveXItem*)pPoolItem)->GetValue();
+ aNewSnap.Move(n,0);
+ }
+ if (rAttr.GetItemState(SDRATTR_MOVEY,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrMoveYItem*)pPoolItem)->GetValue();
+ aNewSnap.Move(0,n);
+ }
+ if (rAttr.GetItemState(SDRATTR_ONEPOSITIONX,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrOnePositionXItem*)pPoolItem)->GetValue();
+ aNewSnap.Move(n-aNewSnap.Left(),0);
+ }
+ if (rAttr.GetItemState(SDRATTR_ONEPOSITIONY,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrOnePositionYItem*)pPoolItem)->GetValue();
+ aNewSnap.Move(0,n-aNewSnap.Top());
+ }
+ if (rAttr.GetItemState(SDRATTR_ONESIZEWIDTH,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrOneSizeWidthItem*)pPoolItem)->GetValue();
+ aNewSnap.Right()=aNewSnap.Left()+n;
+ }
+ if (rAttr.GetItemState(SDRATTR_ONESIZEHEIGHT,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrOneSizeHeightItem*)pPoolItem)->GetValue();
+ aNewSnap.Bottom()=aNewSnap.Top()+n;
+ }
+ if (aNewSnap!=rSnap) {
+ if (aNewSnap.GetSize()==rSnap.GetSize()) {
+ NbcMove(Size(aNewSnap.Left()-rSnap.Left(),aNewSnap.Top()-rSnap.Top()));
+ } else {
+ NbcSetSnapRect(aNewSnap);
+ }
+ }
+
+ if (rAttr.GetItemState(SDRATTR_SHEARANGLE,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrShearAngleItem*)pPoolItem)->GetValue();
+ n-=GetShearAngle();
+ if (n!=0) {
+ double nTan=tan(n*nPi180);
+ NbcShear(aRef1,n,nTan,FALSE);
+ }
+ }
+ if (rAttr.GetItemState(SDRATTR_ROTATEANGLE,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrRotateAngleItem*)pPoolItem)->GetValue();
+ n-=GetRotateAngle();
+ if (n!=0) {
+ double nSin=sin(n*nPi180);
+ double nCos=cos(n*nPi180);
+ NbcRotate(aRef1,n,nSin,nCos);
+ }
+ }
+ if (rAttr.GetItemState(SDRATTR_ROTATEONE,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrRotateOneItem*)pPoolItem)->GetValue();
+ double nSin=sin(n*nPi180);
+ double nCos=cos(n*nPi180);
+ NbcRotate(aRef1,n,nSin,nCos);
+ }
+ if (rAttr.GetItemState(SDRATTR_HORZSHEARONE,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrHorzShearOneItem*)pPoolItem)->GetValue();
+ double nTan=tan(n*nPi180);
+ NbcShear(aRef1,n,nTan,FALSE);
+ }
+ if (rAttr.GetItemState(SDRATTR_VERTSHEARONE,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrVertShearOneItem*)pPoolItem)->GetValue();
+ double nTan=tan(n*nPi180);
+ NbcShear(aRef1,n,nTan,TRUE);
+ }
+
+ if (rAttr.GetItemState(SDRATTR_OBJMOVEPROTECT,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ FASTBOOL b=((const SdrObjMoveProtectItem*)pPoolItem)->GetValue();
+ SetMoveProtect(b);
+ }
+ if (rAttr.GetItemState(SDRATTR_OBJSIZEPROTECT,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ FASTBOOL b=((const SdrObjSizeProtectItem*)pPoolItem)->GetValue();
+ SetResizeProtect(b);
+ }
+ if (rAttr.GetItemState(SDRATTR_OBJPRINTABLE,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ FASTBOOL b=((const SdrObjPrintableItem*)pPoolItem)->GetValue();
+ SetPrintable(b);
+ }
+
+ SdrLayerID nLayer=SDRLAYER_NOTFOUND;
+ if (rAttr.GetItemState(SDRATTR_LAYERID,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ nLayer=((const SdrLayerIdItem*)pPoolItem)->GetValue();
+ }
+ if (rAttr.GetItemState(SDRATTR_LAYERNAME,TRUE,&pPoolItem)==SFX_ITEM_SET && pModel!=NULL) {
+ XubString aLayerName=((const SdrLayerNameItem*)pPoolItem)->GetValue();
+ const SdrLayerAdmin* pLayAd=pPage!=NULL ? &pPage->GetLayerAdmin() : pModel!=NULL ? &pModel->GetLayerAdmin() : NULL;
+ if (pLayAd!=NULL) {
+ const SdrLayer* pLayer=pLayAd->GetLayer(aLayerName, TRUE);
+ if (pLayer!=NULL) {
+ nLayer=pLayer->GetID();
+ }
+ }
+
+ }
+ if (nLayer!=SDRLAYER_NOTFOUND) {
+ NbcSetLayer(nLayer);
+ }
+
+ if (rAttr.GetItemState(SDRATTR_OBJECTNAME,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ XubString aName=((const SdrObjectNameItem*)pPoolItem)->GetValue();
+ SetName(aName);
+ }
+ Rectangle aNewLogic(rLogic);
+ if (rAttr.GetItemState(SDRATTR_LOGICSIZEWIDTH,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrLogicSizeWidthItem*)pPoolItem)->GetValue();
+ aNewLogic.Right()=aNewLogic.Left()+n;
+ }
+ if (rAttr.GetItemState(SDRATTR_LOGICSIZEHEIGHT,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ long n=((const SdrLogicSizeHeightItem*)pPoolItem)->GetValue();
+ aNewLogic.Bottom()=aNewLogic.Top()+n;
+ }
+ if (aNewLogic!=rLogic) {
+ NbcSetLogicRect(aNewLogic);
+ }
+ Fraction aResizeX(1,1);
+ Fraction aResizeY(1,1);
+ if (rAttr.GetItemState(SDRATTR_RESIZEXONE,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ aResizeX*=((const SdrResizeXOneItem*)pPoolItem)->GetValue();
+ }
+ if (rAttr.GetItemState(SDRATTR_RESIZEYONE,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ aResizeY*=((const SdrResizeYOneItem*)pPoolItem)->GetValue();
+ }
+ if (aResizeX!=Fraction(1,1) || aResizeY!=Fraction(1,1)) {
+ NbcResize(aRef1,aResizeX,aResizeY);
+ }
+}
+
+void lcl_SetItem(SfxItemSet& rAttr, FASTBOOL bMerge, const SfxPoolItem& rItem)
+{
+ if (bMerge) rAttr.MergeValue(rItem,TRUE);
+ else rAttr.Put(rItem);
+}
+
+void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, FASTBOOL bMerge) const
+{
+ const Rectangle& rSnap=GetSnapRect();
+ const Rectangle& rLogic=GetLogicRect();
+ lcl_SetItem(rAttr,bMerge,SdrObjMoveProtectItem(IsMoveProtect()));
+ lcl_SetItem(rAttr,bMerge,SdrObjSizeProtectItem(IsResizeProtect()));
+ lcl_SetItem(rAttr,bMerge,SdrObjPrintableItem(IsPrintable()));
+ lcl_SetItem(rAttr,bMerge,SdrRotateAngleItem(GetRotateAngle()));
+ lcl_SetItem(rAttr,bMerge,SdrShearAngleItem(GetShearAngle()));
+ lcl_SetItem(rAttr,bMerge,SdrOneSizeWidthItem(rSnap.GetWidth()-1));
+ lcl_SetItem(rAttr,bMerge,SdrOneSizeHeightItem(rSnap.GetHeight()-1));
+ lcl_SetItem(rAttr,bMerge,SdrOnePositionXItem(rSnap.Left()));
+ lcl_SetItem(rAttr,bMerge,SdrOnePositionYItem(rSnap.Top()));
+ if (rLogic.GetWidth()!=rSnap.GetWidth()) {
+ lcl_SetItem(rAttr,bMerge,SdrLogicSizeWidthItem(rLogic.GetWidth()-1));
+ }
+ if (rLogic.GetHeight()!=rSnap.GetHeight()) {
+ lcl_SetItem(rAttr,bMerge,SdrLogicSizeHeightItem(rLogic.GetHeight()-1));
+ }
+ if (HasSetName()) {
+ XubString aName(GetName());
+
+ if(aName.Len())
+ {
+ lcl_SetItem(rAttr, bMerge, SdrObjectNameItem(aName));
+ }
+ }
+
+ lcl_SetItem(rAttr,bMerge,SdrLayerIdItem(nLayerId));
+ const SdrLayerAdmin* pLayAd=pPage!=NULL ? &pPage->GetLayerAdmin() : pModel!=NULL ? &pModel->GetLayerAdmin() : NULL;
+ if (pLayAd!=NULL) {
+ const SdrLayer* pLayer=pLayAd->GetLayerPerID(nLayerId);
+ if (pLayer!=NULL) {
+ lcl_SetItem(rAttr,bMerge,SdrLayerNameItem(pLayer->GetName()));
+ }
+ }
+ Point aRef1(rSnap.Center());
+ Point aRef2(aRef1); aRef2.Y()++;
+ lcl_SetItem(rAttr,bMerge,SdrTransformRef1XItem(aRef1.X()));
+ lcl_SetItem(rAttr,bMerge,SdrTransformRef1YItem(aRef1.Y()));
+ lcl_SetItem(rAttr,bMerge,SdrTransformRef2XItem(aRef2.X()));
+ lcl_SetItem(rAttr,bMerge,SdrTransformRef2YItem(aRef2.Y()));
+}
+
+SfxStyleSheet* SdrObject::GetStyleSheet() const
+{
+ // Das hier ist ein Hack:
+ return NULL;
+}
+
+void SdrObject::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+}
+
+void SdrObject::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+}
+
+// Das Broadcasting beim Setzen der Attribute wird vom AttrObj gemanagt
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrObject::IsNode() const
+{
+ return TRUE;
+}
+
+SdrGluePoint SdrObject::GetVertexGluePoint(USHORT nPosNum) const
+{
+ Rectangle aR(GetBoundRect());
+ Point aPt;
+ switch (nPosNum) {
+ case 0 : aPt=aR.TopCenter(); break;
+ case 1 : aPt=aR.RightCenter(); break;
+ case 2 : aPt=aR.BottomCenter(); break;
+ case 3 : aPt=aR.LeftCenter(); break;
+ }
+ aPt-=GetSnapRect().Center();
+ SdrGluePoint aGP(aPt);
+ aGP.SetPercent(FALSE);
+ return aGP;
+}
+
+SdrGluePoint SdrObject::GetCornerGluePoint(USHORT nPosNum) const
+{
+ Rectangle aR(GetBoundRect());
+ Point aPt;
+ switch (nPosNum) {
+ case 0 : aPt=aR.TopLeft(); break;
+ case 1 : aPt=aR.TopRight(); break;
+ case 2 : aPt=aR.BottomRight(); break;
+ case 3 : aPt=aR.BottomLeft(); break;
+ }
+ aPt-=GetSnapRect().Center();
+ SdrGluePoint aGP(aPt);
+ aGP.SetPercent(FALSE);
+ return aGP;
+}
+
+const SdrGluePointList* SdrObject::GetGluePointList() const
+{
+ if (pPlusData!=NULL) return pPlusData->pGluePoints;
+ return NULL;
+}
+
+SdrGluePointList* SdrObject::GetGluePointList()
+{
+ if (pPlusData!=NULL) return pPlusData->pGluePoints;
+ return NULL;
+}
+
+SdrGluePointList* SdrObject::ForceGluePointList()
+{
+ ImpForcePlusData();
+ if (pPlusData->pGluePoints==NULL) {
+ pPlusData->pGluePoints=new SdrGluePointList;
+ }
+ return pPlusData->pGluePoints;
+}
+
+void SdrObject::SetGlueReallyAbsolute(FASTBOOL bOn)
+{
+ // erst Const-Aufruf um zu sehen, ob
+ // ueberhaupt Klebepunkte da sind
+ // const-Aufruf erzwingen!
+ if (GetGluePointList()!=NULL) {
+ SdrGluePointList* pGPL=ForceGluePointList();
+ pGPL->SetReallyAbsolute(bOn,*this);
+ }
+}
+
+void SdrObject::NbcRotateGluePoints(const Point& rRef, long nWink, double sn, double cs)
+{
+ // erst Const-Aufruf um zu sehen, ob
+ // ueberhaupt Klebepunkte da sind
+ // const-Aufruf erzwingen!
+ if (GetGluePointList()!=NULL) {
+ SdrGluePointList* pGPL=ForceGluePointList();
+ pGPL->Rotate(rRef,nWink,sn,cs,this);
+ }
+}
+
+void SdrObject::NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2)
+{
+ // erst Const-Aufruf um zu sehen, ob
+ // ueberhaupt Klebepunkte da sind
+ // const-Aufruf erzwingen!
+ if (GetGluePointList()!=NULL) {
+ SdrGluePointList* pGPL=ForceGluePointList();
+ pGPL->Mirror(rRef1,rRef2,this);
+ }
+}
+
+void SdrObject::NbcShearGluePoints(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ // erst Const-Aufruf um zu sehen, ob
+ // ueberhaupt Klebepunkte da sind
+ // const-Aufruf erzwingen!
+ if (GetGluePointList()!=NULL) {
+ SdrGluePointList* pGPL=ForceGluePointList();
+ pGPL->Shear(rRef,nWink,tn,bVShear,this);
+ }
+}
+
+FASTBOOL SdrObject::IsEdge() const
+{
+ return FALSE;
+}
+
+void SdrObject::ToggleEdgeXor(const SdrDragStat& rDrag, ExtOutputDevice& rXOut, FASTBOOL bTail1, FASTBOOL bTail2, FASTBOOL bDetail) const
+{
+ Color aBlackColor( COL_BLACK );
+ Color aTranspColor( COL_TRANSPARENT );
+ rXOut.OverrideLineColor( aBlackColor );
+ rXOut.OverrideFillColor( aTranspColor );
+ RasterOp eRop0=rXOut.GetRasterOp();
+ rXOut.SetRasterOp(ROP_INVERT);
+ NspToggleEdgeXor(rDrag,rXOut,bTail1,bTail2,bDetail);
+ rXOut.SetRasterOp(eRop0);
+}
+
+void SdrObject::NspToggleEdgeXor(const SdrDragStat& rDrag, ExtOutputDevice& rXOut, FASTBOOL bTail1, FASTBOOL bTail2, FASTBOOL bDetail) const
+{
+}
+
+void SdrObject::ConnectToNode(FASTBOOL bTail1, SdrObject* pObj)
+{
+}
+
+void SdrObject::DisconnectFromNode(FASTBOOL bTail1)
+{
+}
+
+SdrObject* SdrObject::GetConnectedNode(FASTBOOL bTail1) const
+{
+ return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDash) const
+{
+ BOOL bNoChange(TRUE);
+
+ if(pRet->LineGeometryUsageIsNecessary())
+ {
+ // Polygon aus Bezierkurve interpolieren
+ VirtualDevice aVDev;
+ MapMode aMap = aVDev.GetMapMode();
+ aMap.SetMapUnit(pModel->GetScaleUnit());
+ aMap.SetScaleX(pModel->GetScaleFraction());
+ aMap.SetScaleY(pModel->GetScaleFraction());
+ aVDev.SetMapMode(aMap);
+
+ PolyPolygon3D aPolyPoly3D;
+ PolyPolygon3D aLinePoly3D;
+ pRet->CreateLinePoly(aPolyPoly3D, aLinePoly3D, aVDev, FALSE);
+
+ // || aLinePoly3D.Count() removed; the conversion is ONLY
+ // useful when new closed filled polygons are created
+ if(aPolyPoly3D.Count() || (bForceLineDash && aLinePoly3D.Count()))
+ {
+ SfxItemSet aSet((SfxItemPool&)(*GetItemPool()));
+ pRet->TakeAttributes(aSet, TRUE, FALSE);
+ XFillStyle eOldFillStyle = ((const XFillStyleItem&)(aSet.Get(XATTR_FILLSTYLE))).GetValue();
+ SdrPathObj* aLinePolygonPart = NULL;
+ SdrPathObj* aLineLinePart = NULL;
+ BOOL bBuildGroup(FALSE);
+
+ aPolyPoly3D.Merge(TRUE);
+
+ if(aPolyPoly3D.Count())
+ {
+ aLinePolygonPart = new SdrPathObj(OBJ_PATHFILL, aPolyPoly3D.GetXPolyPolygon());
+ aLinePolygonPart->SetModel(pRet->GetModel());
+
+ aSet.Put(XLineWidthItem(0L));
+ Color aColorLine = ((const XLineColorItem&)(aSet.Get(XATTR_LINECOLOR))).GetValue();
+ UINT16 nTransLine = ((const XLineTransparenceItem&)(aSet.Get(XATTR_LINETRANSPARENCE))).GetValue();
+ aSet.Put(XFillColorItem(XubString(), aColorLine));
+ aSet.Put(XFillStyleItem(XFILL_SOLID));
+ aSet.Put(XLineStyleItem(XLINE_NONE));
+ aSet.Put(XFillTransparenceItem(nTransLine));
+ aLinePolygonPart->NbcSetAttributes(aSet, FALSE);
+ }
+
+ if(aLinePoly3D.Count())
+ {
+ aLineLinePart = new SdrPathObj(OBJ_PATHFILL, aLinePoly3D.GetXPolyPolygon());
+ aLineLinePart->SetModel(pRet->GetModel());
+
+ aSet.Put(XLineWidthItem(0L));
+ aSet.Put(XFillStyleItem(XFILL_NONE));
+ aSet.Put(XLineStyleItem(XLINE_SOLID));
+ aLineLinePart->NbcSetAttributes(aSet, FALSE);
+
+ if(aLinePolygonPart)
+ bBuildGroup = TRUE;
+ }
+
+ if(!bBuildGroup)
+ {
+ SdrPathObj* pPath = PTR_CAST(SdrPathObj, pRet);
+ if(pPath && pPath->IsClosed())
+ {
+ if(eOldFillStyle != XFILL_NONE)
+ bBuildGroup = TRUE;
+ }
+ }
+
+ if(bBuildGroup)
+ {
+ SdrObject* pGroup = new SdrObjGroup;
+ pGroup->SetModel(pRet->GetModel());
+
+ aSet.ClearItem();
+ pRet->TakeAttributes(aSet, TRUE, FALSE);
+ aSet.Put(XLineStyleItem(XLINE_NONE));
+ aSet.Put(XLineWidthItem(0L));
+
+ SdrObject* pClone = pRet->Clone();
+ pClone->SetModel(pRet->GetModel());
+ pClone->NbcSetAttributes(aSet, FALSE);
+
+ pGroup->GetSubList()->NbcInsertObject( pClone );
+
+ if(aLinePolygonPart)
+ pGroup->GetSubList()->NbcInsertObject(aLinePolygonPart);
+
+ if(aLineLinePart)
+ pGroup->GetSubList()->NbcInsertObject(aLineLinePart);
+
+ pRet = pGroup;
+ }
+ else
+ {
+ if(aLinePolygonPart)
+ pRet = aLinePolygonPart;
+ else if(aLineLinePart)
+ pRet = aLineLinePart;
+ }
+
+ bNoChange = FALSE;
+ }
+ }
+
+ if(bNoChange)
+ {
+ SdrObject* pClone = pRet->Clone();
+ pClone->SetModel(pRet->GetModel());
+ pRet = pClone;
+ }
+
+ return pRet;
+}
+
+// convert this path object to contour object, even when it is a group
+SdrObject* SdrObject::ConvertToContourObj(SdrObject* pRet, BOOL bForceLineDash) const
+{
+ if(pRet->ISA(SdrObjGroup))
+ {
+ SdrObjList* pObjList = pRet->GetSubList();
+ SdrObject* pGroup = new SdrObjGroup;
+ pGroup->SetModel(pRet->GetModel());
+
+ for(UINT32 a=0;a<pObjList->GetObjCount();a++)
+ {
+ SdrObject* pIterObj = pObjList->GetObj(a);
+ pGroup->GetSubList()->NbcInsertObject(ConvertToContourObj(pIterObj, bForceLineDash));
+ }
+
+ pRet = pGroup;
+ }
+ else
+ {
+ pRet = ImpConvertToContourObj(pRet, bForceLineDash);
+ }
+
+ return pRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrObject* SdrObject::ConvertToPolyObj(BOOL bBezier, BOOL bLineToArea) const
+{
+ SdrObject* pRet = DoConvertToPolyObj(bBezier);
+
+ if(pRet && bLineToArea)
+ {
+ SdrObject* pNewRet = ConvertToContourObj(pRet);
+ delete pRet;
+ pRet = pNewRet;
+ }
+
+ return pRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrObject* SdrObject::DoConvertToPolyObj(BOOL bBezier) const
+{
+ return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Streams
+
+void SdrObject::AfterRead()
+{
+ USHORT nAnz=GetUserDataCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ GetUserData(i)->AfterRead();
+ }
+}
+
+void SdrObject::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrObject");
+#endif
+ rIn>>aOutRect;
+ rIn>>nLayerId;
+ rIn>>aAnchor;
+ BOOL bTemp;
+ rIn>>bTemp; bMovProt=bTemp;
+ rIn>>bTemp; bSizProt=bTemp;
+ rIn>>bTemp; bNoPrint=bTemp;
+ rIn>>bTemp; bMarkProt=bTemp; // war ganz frueher mal bTextToContour
+ rIn>>bTemp; bEmptyPresObj=bTemp;
+ if (rHead.GetVersion()>=4) {
+ rIn>>bTemp; bNotVisibleAsMaster=bTemp;
+ }
+ if (rHead.GetVersion()>=11) { // ab V11 sind Connectors in DownCompat gefasst (mit Flag davor)
+ rIn>>bTemp;
+ if (bTemp) {
+ SdrDownCompat aGluePointsCompat(rIn,STREAM_READ);
+#ifdef DBG_UTIL
+ aGluePointsCompat.SetID("SdrObject(Klebepunkte)");
+#endif
+ if (aGluePointsCompat.GetBytesLeft()!=0) {
+ ImpForcePlusData();
+ if (pPlusData->pGluePoints==NULL) pPlusData->pGluePoints=new SdrGluePointList;
+ rIn>>*pPlusData->pGluePoints;
+ }
+ }
+ } else {
+ Polygon aTmpPoly;
+ rIn>>aTmpPoly; // aConnectors; ehemals Konnektoren
+ }
+
+ if (pPlusData!=NULL && pPlusData->pUserDataList!=NULL) {
+ delete pPlusData->pUserDataList;
+ pPlusData->pUserDataList=NULL;
+ }
+ FASTBOOL bReadUserDataList=FALSE;
+ SdrDownCompat* pUserDataListCompat=NULL;
+ if (rHead.GetVersion()>=11) { // ab V11 ist die UserDataList in DownCompat gefasst (mit Flag davor)
+ rIn>>bTemp;
+ bReadUserDataList=bTemp;
+ if (bTemp) {
+ pUserDataListCompat=new SdrDownCompat(rIn,STREAM_READ); // Record fuer UserDataList oeffnen
+#ifdef DBG_UTIL
+ pUserDataListCompat->SetID("SdrObject(UserDataList)");
+#endif
+ }
+ } else {
+ bReadUserDataList=TRUE;
+ }
+ if (bReadUserDataList) {
+ USHORT nUserDataAnz;
+ rIn>>nUserDataAnz;
+ if (nUserDataAnz!=0) {
+ ImpForcePlusData();
+ pPlusData->pUserDataList=new SdrObjUserDataList;
+ for (USHORT i=0; i<nUserDataAnz; i++) {
+ SdrDownCompat* pUserDataCompat=NULL;
+ if (rHead.GetVersion()>=11) { // ab V11 sind UserData in DownCompat gefasst
+ //SdrDownCompat aUserDataCompat(rIn,STREAM_READ); // Record fuer UserData oeffnen (seit V11)
+ pUserDataCompat=new SdrDownCompat(rIn,STREAM_READ); // Record fuer UserData oeffnen (seit V11)
+#ifdef DBG_UTIL
+ pUserDataCompat->SetID("SdrObject(UserData)");
+#endif
+ }
+ UINT32 nInvent;
+ UINT16 nIdent;
+ rIn>>nInvent;
+ rIn>>nIdent;
+ SdrObjUserData* pData=SdrObjFactory::MakeNewObjUserData(nInvent,nIdent,this);
+ if (pData!=NULL)
+ {
+ pData->ReadData(rIn);
+ pPlusData->pUserDataList->InsertUserData(pData);
+ } else {
+ // Wenn UserDataFactory nicht gesetzt ist, kann auch keiner
+ // etwas mit diesen Daten anfangen; durch Compat werden sie
+ // eh ueberlesen, daher ist diese Assertion überflüssig (KA)
+ // DBG_ERROR("SdrObject::ReadData(): ObjFactory kann UserData nicht erzeugen");
+ }
+ if (pUserDataCompat!=NULL) { // Aha, UserData war eingepackt. Record nun schliessen
+ delete pUserDataCompat;
+ pUserDataCompat=NULL;
+ }
+ }
+ }
+ if (pUserDataListCompat!=NULL) { // Aha, UserDataList war eingepackt. Record nun schliessen
+ delete pUserDataListCompat;
+ pUserDataListCompat=NULL;
+ }
+ }
+}
+
+void SdrObject::WriteData(SvStream& rOut) const
+{
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrObject");
+#endif
+ rOut<<GetBoundRect();
+ rOut<<nLayerId;
+ rOut<<aAnchor;
+ BOOL bTemp;
+ bTemp=bMovProt; rOut<<bTemp;
+ bTemp=bSizProt; rOut<<bTemp;
+ bTemp=bNoPrint; rOut<<bTemp;
+ bTemp=bMarkProt; rOut<<bTemp;
+ bTemp=bEmptyPresObj; rOut<<bTemp;
+ bTemp=bNotVisibleAsMaster; rOut<<bTemp;
+
+ // Konnektoren
+ bTemp=pPlusData!=NULL && pPlusData->pGluePoints!=NULL && pPlusData->pGluePoints->GetCount()!=0;
+ rOut<<bTemp; // Flag fuer GluePointList vorhanden
+ if (bTemp) {
+ SdrDownCompat aConnectorsCompat(rOut,STREAM_WRITE); // ab V11 Konnektoren einpacken
+#ifdef DBG_UTIL
+ aConnectorsCompat.SetID("SdrObject(Klebepunkte)");
+#endif
+ rOut<<*pPlusData->pGluePoints;
+ }
+
+ // UserData
+ USHORT nUserDataAnz=GetUserDataCount();
+ bTemp=nUserDataAnz!=0;
+ rOut<<bTemp;
+ if (bTemp) {
+ SdrDownCompat aUserDataListCompat(rOut,STREAM_WRITE); // Record fuer UserDataList oeffnen (seit V11)
+#ifdef DBG_UTIL
+ aUserDataListCompat.SetID("SdrObject(UserDataList)");
+#endif
+ rOut<<nUserDataAnz;
+ for (USHORT i=0; i<nUserDataAnz; i++) {
+ SdrDownCompat aUserDataCompat(rOut,STREAM_WRITE); // Record fuer UserData oeffnen (seit V11)
+#ifdef DBG_UTIL
+ aUserDataCompat.SetID("SdrObject(UserData)");
+#endif
+ pPlusData->pUserDataList->GetUserData(i)->WriteData(rOut);
+ }
+ }
+
+}
+
+SvStream& operator>>(SvStream& rIn, SdrObject& rObj)
+{
+ DBG_ASSERT(!rObj.IsNotPersistent(),"operator>>(SdrObject): Ein nicht persistentes Zeichenobjekts wird gestreamt");
+ SdrObjIOHeader aHead(rIn,STREAM_READ,&rObj);
+ rObj.ReadData(aHead,rIn);
+ return rIn;
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrObject& rObj)
+{
+ DBG_ASSERT(!rObj.IsNotPersistent(),"operator<<(SdrObject): Ein nicht persistentes Zeichenobjekts wird gestreamt");
+ SdrObjIOHeader aHead(rOut,STREAM_WRITE,&rObj);
+ rObj.WriteData(rOut);
+ return rOut;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrObject::SetInserted(FASTBOOL bIns)
+{
+ if (bIns!=bInserted) {
+ bInserted=bIns;
+ Rectangle aBoundRect0(GetBoundRect());
+ if (bIns) SendUserCall(SDRUSERCALL_INSERTED,aBoundRect0);
+ else SendUserCall(SDRUSERCALL_REMOVED,aBoundRect0);
+
+ if (pPlusData!=NULL && pPlusData->pBroadcast!=NULL) { // #42522#
+ SdrHint aHint(*this);
+ aHint.SetKind(bIns?HINT_OBJINSERTED:HINT_OBJREMOVED);
+ pPlusData->pBroadcast->Broadcast(aHint);
+ }
+ }
+}
+
+void SdrObject::SetMoveProtect(FASTBOOL bProt)
+{
+ bMovProt=bProt;
+ SetChanged();
+ if (bInserted && pModel!=NULL) {
+ SdrHint aHint(*this);
+ aHint.SetNeedRepaint(FALSE);
+ pModel->Broadcast(aHint);
+ }
+}
+
+void SdrObject::SetResizeProtect(FASTBOOL bProt)
+{
+ bSizProt=bProt;
+ SetChanged();
+ if (bInserted && pModel!=NULL) {
+ SdrHint aHint(*this);
+ aHint.SetNeedRepaint(FALSE);
+ pModel->Broadcast(aHint);
+ }
+}
+
+void SdrObject::SetPrintable(FASTBOOL bPrn)
+{
+ bNoPrint=!bPrn;
+ SetChanged();
+ if (bInserted && pModel!=NULL) {
+ SdrHint aHint(*this);
+ aHint.SetNeedRepaint(FALSE);
+ pModel->Broadcast(aHint);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+USHORT SdrObject::GetUserDataCount() const
+{
+ if (pPlusData==NULL || pPlusData->pUserDataList==NULL) return 0;
+ return pPlusData->pUserDataList->GetUserDataCount();
+}
+
+SdrObjUserData* SdrObject::GetUserData(USHORT nNum) const
+{
+ if (pPlusData==NULL || pPlusData->pUserDataList==NULL) return NULL;
+ return pPlusData->pUserDataList->GetUserData(nNum);
+}
+
+void SdrObject::InsertUserData(SdrObjUserData* pData, USHORT nPos)
+{
+ if (pData!=NULL) {
+ ImpForcePlusData();
+ if (pPlusData->pUserDataList==NULL) pPlusData->pUserDataList=new SdrObjUserDataList;
+ pPlusData->pUserDataList->InsertUserData(pData,nPos);
+ } else {
+ DBG_ERROR("SdrObject::InsertUserData(): pData ist NULL-Pointer");
+ }
+}
+
+void SdrObject::DeleteUserData(USHORT nNum)
+{
+ USHORT nAnz=GetUserDataCount();
+ if (nNum<nAnz) {
+ pPlusData->pUserDataList->DeleteUserData(nNum);
+ if (nAnz==1) {
+ delete pPlusData->pUserDataList;
+ pPlusData->pUserDataList=NULL;
+ }
+ } else {
+ DBG_ERROR("SdrObject::DeleteUserData(): ungueltiger Index");
+ }
+}
+
+void SdrObject::SendUserCall(SdrUserCallType eUserCall, const Rectangle& rBoundRect)
+{
+ SdrObjGroup* pGroup = NULL;
+
+ if( pObjList && pObjList->GetListKind() == SDROBJLIST_GROUPOBJ )
+ pGroup = (SdrObjGroup*) pObjList->GetOwnerObj();
+
+ if ( pUserCall )
+ {
+ // UserCall ausfuehren
+ pUserCall->Changed( *this, eUserCall, rBoundRect );
+ }
+
+ while( pGroup )
+ {
+ // Gruppe benachrichtigen
+ if( pGroup->GetUserCall() )
+ {
+ SdrUserCallType eChildUserType = SDRUSERCALL_CHILD_CHGATTR;
+
+ switch( eUserCall )
+ {
+ case SDRUSERCALL_MOVEONLY:
+ eChildUserType = SDRUSERCALL_CHILD_MOVEONLY;
+ break;
+
+ case SDRUSERCALL_RESIZE:
+ eChildUserType = SDRUSERCALL_CHILD_RESIZE;
+ break;
+
+ case SDRUSERCALL_CHGATTR:
+ eChildUserType = SDRUSERCALL_CHILD_CHGATTR;
+ break;
+
+ case SDRUSERCALL_DELETE:
+ eChildUserType = SDRUSERCALL_CHILD_DELETE;
+ break;
+
+ case SDRUSERCALL_COPY:
+ eChildUserType = SDRUSERCALL_CHILD_COPY;
+ break;
+
+ case SDRUSERCALL_INSERTED:
+ eChildUserType = SDRUSERCALL_CHILD_INSERTED;
+ break;
+
+ case SDRUSERCALL_REMOVED:
+ eChildUserType = SDRUSERCALL_CHILD_REMOVED;
+ break;
+ }
+
+ pGroup->GetUserCall()->Changed( *this, eChildUserType, rBoundRect );
+ }
+
+ if( pGroup->GetObjList() &&
+ pGroup->GetObjList()->GetListKind() == SDROBJLIST_GROUPOBJ &&
+ pGroup != (SdrObjGroup*) pObjList->GetOwnerObj() )
+ pGroup = (SdrObjGroup*) pObjList->GetOwnerObj();
+ else
+ pGroup = NULL;
+ }
+}
+
+// ItemPool fuer dieses Objekt wechseln
+void SdrObject::MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool)
+{
+ // Hier passiert erst was in SdrAttrObj und in SdrObjGroup
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@ @@@@@@ @@@@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@@@ @@@@@@ @@ @@ @@ @@ @@@@@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@@@@ @@@@ @@ @@ @@ @@@@ @@ @@@@ @@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrObject* SdrObjFactory::MakeNewObject(UINT32 nInvent, UINT16 nIdent, SdrPage* pPage, SdrModel* pModel)
+{
+ if(pModel == NULL && pPage != NULL)
+ pModel = pPage->GetModel();
+ SdrObject* pObj = NULL;
+
+ if(nInvent == SdrInventor)
+ {
+ switch (nIdent)
+ {
+ case USHORT(OBJ_NONE ): pObj=new SdrObject; break;
+ case USHORT(OBJ_GRUP ): pObj=new SdrObjGroup; break;
+ case USHORT(OBJ_LINE ): pObj=new SdrPathObj(OBJ_LINE ); break;
+ case USHORT(OBJ_POLY ): pObj=new SdrPathObj(OBJ_POLY ); break;
+ case USHORT(OBJ_PLIN ): pObj=new SdrPathObj(OBJ_PLIN ); break;
+ case USHORT(OBJ_PATHLINE ): pObj=new SdrPathObj(OBJ_PATHLINE ); break;
+ case USHORT(OBJ_PATHFILL ): pObj=new SdrPathObj(OBJ_PATHFILL ); break;
+ case USHORT(OBJ_FREELINE ): pObj=new SdrPathObj(OBJ_FREELINE ); break;
+ case USHORT(OBJ_FREEFILL ): pObj=new SdrPathObj(OBJ_FREEFILL ); break;
+ case USHORT(OBJ_PATHPOLY ): pObj=new SdrPathObj(OBJ_POLY ); break;
+ case USHORT(OBJ_PATHPLIN ): pObj=new SdrPathObj(OBJ_PLIN ); break;
+ case USHORT(OBJ_EDGE ): pObj=new SdrEdgeObj; break;
+ case USHORT(OBJ_RECT ): pObj=new SdrRectObj; break;
+ case USHORT(OBJ_CIRC ): pObj=new SdrCircObj(OBJ_CIRC ); break;
+ case USHORT(OBJ_SECT ): pObj=new SdrCircObj(OBJ_SECT ); break;
+ case USHORT(OBJ_CARC ): pObj=new SdrCircObj(OBJ_CARC ); break;
+ case USHORT(OBJ_CCUT ): pObj=new SdrCircObj(OBJ_CCUT ); break;
+ case USHORT(OBJ_TEXT ): pObj=new SdrRectObj(OBJ_TEXT ); break;
+ case USHORT(OBJ_TEXTEXT ): pObj=new SdrRectObj(OBJ_TEXTEXT ); break;
+ case USHORT(OBJ_TITLETEXT ): pObj=new SdrRectObj(OBJ_TITLETEXT ); break;
+ case USHORT(OBJ_OUTLINETEXT): pObj=new SdrRectObj(OBJ_OUTLINETEXT); break;
+ case USHORT(OBJ_MEASURE ): pObj=new SdrMeasureObj; break;
+ case USHORT(OBJ_GRAF ): pObj=new SdrGrafObj; break;
+ case USHORT(OBJ_OLE2 ): pObj=new SdrOle2Obj; break;
+ case USHORT(OBJ_FRAME ): pObj=new SdrOle2Obj(TRUE); break;
+ case USHORT(OBJ_CAPTION ): pObj=new SdrCaptionObj; break;
+ case USHORT(OBJ_PAGE ): pObj=new SdrPageObj; break;
+ case USHORT(OBJ_UNO ): pObj=new SdrUnoObj(String()); break;
+ }
+ }
+
+ if(pObj == NULL)
+ {
+ SdrObjFactory* pFact=new SdrObjFactory(nInvent,nIdent,pPage,pModel);
+ SdrLinkList& rLL=ImpGetUserMakeObjHdl();
+ unsigned nAnz=rLL.GetLinkCount();
+ unsigned i=0;
+ while (i<nAnz && pObj==NULL) {
+ rLL.GetLink(i).Call((void*)pFact);
+ pObj=pFact->pNewObj;
+ i++;
+ }
+ delete pFact;
+ }
+
+ if(pObj == NULL)
+ {
+ // Na wenn's denn keiner will ...
+ }
+
+ if(pObj != NULL)
+ {
+ if(pPage != NULL)
+ pObj->SetPage(pPage);
+ else if(pModel != NULL)
+ pObj->SetModel(pModel);
+ }
+
+ return pObj;
+}
+
+SdrObjUserData* SdrObjFactory::MakeNewObjUserData(UINT32 nInvent, UINT16 nIdent, SdrObject* pObj1)
+{
+ SdrObjUserData* pData=NULL;
+ if (nInvent==SdrInventor) {
+ switch (nIdent) {
+ case USHORT(SDRUSERDATA_OBJGROUPLINK): pData=new ImpSdrObjGroupLinkUserData(pObj1); break;
+ case USHORT(SDRUSERDATA_OBJTEXTLINK) : pData=new ImpSdrObjTextLinkUserData((SdrTextObj*)pObj1); break;
+ }
+ }
+ if (pData==NULL) {
+ SdrObjFactory aFact(nInvent,nIdent,pObj1);
+ SdrLinkList& rLL=ImpGetUserMakeObjUserDataHdl();
+ unsigned nAnz=rLL.GetLinkCount();
+ unsigned i=0;
+ while (i<nAnz && pData==NULL) {
+ rLL.GetLink(i).Call((void*)&aFact);
+ pData=aFact.pNewData;
+ i++;
+ }
+ }
+ return pData;
+}
+
+void SdrObjFactory::InsertMakeObjectHdl(const Link& rLink)
+{
+ SdrLinkList& rLL=ImpGetUserMakeObjHdl();
+ rLL.InsertLink(rLink);
+}
+
+void SdrObjFactory::RemoveMakeObjectHdl(const Link& rLink)
+{
+ SdrLinkList& rLL=ImpGetUserMakeObjHdl();
+ rLL.RemoveLink(rLink);
+}
+
+void SdrObjFactory::InsertMakeUserDataHdl(const Link& rLink)
+{
+ SdrLinkList& rLL=ImpGetUserMakeObjUserDataHdl();
+ rLL.InsertLink(rLink);
+}
+
+void SdrObjFactory::RemoveMakeUserDataHdl(const Link& rLink)
+{
+ SdrLinkList& rLL=ImpGetUserMakeObjUserDataHdl();
+ rLL.RemoveLink(rLink);
+}
+
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
new file mode 100644
index 0000000000..1a7bbdec81
--- /dev/null
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -0,0 +1,973 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdocapt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+#ifndef _SVX_XLNWTIT_HXX //autogen
+#include <xlnwtit.hxx>
+#endif
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#include "svdocapt.hxx"
+#include "xpool.hxx"
+#include "xpoly.hxx"
+#include "svdattrx.hxx"
+#include "svdpool.hxx"
+#include "svdxout.hxx"
+#include "svdetc.hxx"
+#include "svdtrans.hxx"
+#include "svdtouch.hxx"
+#include "svdio.hxx"
+#include "svdhdl.hxx"
+#include "svddrag.hxx"
+#include "svdmodel.hxx"
+#include "svdview.hxx" // fuer RectSnap
+#include "svdpagv.hxx" // fuer GetOffset bei BegDrag()
+#include "svdglob.hxx" // StringCache
+#include "svdstr.hrc" // Objektname
+#include "svdogrp.hxx"
+#include "svdpage.hxx"
+
+#ifndef _SVX_XFLHTIT_HXX
+#include <svx/xflhtit.hxx>
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX
+#include <svx/xflclit.hxx>
+#endif
+
+#ifndef _SVX_XFLTRIT_HXX
+#include <svx/xfltrit.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+enum EscDir {LKS,RTS,OBN,UNT};
+
+class ImpCaptParams
+{
+public:
+ SdrCaptionType eType;
+ long nAngle;
+ long nGap;
+ long nEscRel;
+ long nEscAbs;
+ long nLineLen;
+ SdrCaptionEscDir eEscDir;
+ FASTBOOL bFitLineLen;
+ FASTBOOL bEscRel;
+ FASTBOOL bFixedAngle;
+
+public:
+ ImpCaptParams()
+ {
+ eType =SDRCAPT_TYPE3;
+ bFixedAngle=FALSE;
+ nAngle =4500;
+ nGap =0;
+ eEscDir =SDRCAPT_ESCHORIZONTAL;
+ bEscRel =TRUE;
+ nEscRel =5000;
+ nEscAbs =0;
+ nLineLen =0;
+ bFitLineLen=TRUE;
+ }
+ void CalcEscPos(const Point& rTail, const Rectangle& rRect, Point& rPt, EscDir& rDir) const;
+};
+
+void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Point& rPt, EscDir& rDir) const
+{
+ Point aTl(rTailPt); // lokal kopieren wg. Performance
+ long nX,nY;
+ if (bEscRel) {
+ nX=rRect.Right()-rRect.Left();
+ nX=BigMulDiv(nX,nEscRel,10000);
+ nY=rRect.Bottom()-rRect.Top();
+ nY=BigMulDiv(nY,nEscRel,10000);
+ } else {
+ nX=nEscAbs;
+ nY=nEscAbs;
+ }
+ nX+=rRect.Left();
+ nY+=rRect.Top();
+ Point aBestPt;
+ EscDir eBestDir=LKS;
+ FASTBOOL bTryH=eEscDir==SDRCAPT_ESCBESTFIT;
+ if (!bTryH) {
+ if (eType!=SDRCAPT_TYPE1) {
+ bTryH=eEscDir==SDRCAPT_ESCHORIZONTAL;
+ } else {
+ bTryH=eEscDir==SDRCAPT_ESCVERTICAL;
+ }
+ }
+ FASTBOOL bTryV=eEscDir==SDRCAPT_ESCBESTFIT;
+ if (!bTryV) {
+ if (eType!=SDRCAPT_TYPE1) {
+ bTryV=eEscDir==SDRCAPT_ESCVERTICAL;
+ } else {
+ bTryV=eEscDir==SDRCAPT_ESCHORIZONTAL;
+ }
+ }
+
+ if (bTryH) {
+ Point aLft(rRect.Left()-nGap,nY);
+ Point aRgt(rRect.Right()+nGap,nY);
+ FASTBOOL bLft=(aTl.X()-aLft.X()<aRgt.X()-aTl.X());
+ if (bLft) {
+ eBestDir=LKS;
+ aBestPt=aLft;
+ } else {
+ eBestDir=RTS;
+ aBestPt=aRgt;
+ }
+ }
+ if (bTryV) {
+ Point aTop(nX,rRect.Top()-nGap);
+ Point aBtm(nX,rRect.Bottom()+nGap);
+ FASTBOOL bTop=(aTl.Y()-aTop.Y()<aBtm.Y()-aTl.Y());
+ Point aBest2;
+ EscDir eBest2;
+ if (bTop) {
+ eBest2=OBN;
+ aBest2=aTop;
+ } else {
+ eBest2=UNT;
+ aBest2=aBtm;
+ }
+ FASTBOOL bTakeIt=eEscDir!=SDRCAPT_ESCBESTFIT;
+ if (!bTakeIt) {
+ BigInt aHorX(aBestPt.X()-aTl.X()); aHorX*=aHorX;
+ BigInt aHorY(aBestPt.Y()-aTl.Y()); aHorY*=aHorY;
+ BigInt aVerX(aBest2.X()-aTl.X()); aVerX*=aVerX;
+ BigInt aVerY(aBest2.Y()-aTl.Y()); aVerY*=aVerY;
+ if (eType!=SDRCAPT_TYPE1) {
+ bTakeIt=aVerX+aVerY<aHorX+aHorY;
+ } else {
+ bTakeIt=aVerX+aVerY>=aHorX+aHorY;
+ }
+ }
+ if (bTakeIt) {
+ aBestPt=aBest2;
+ eBestDir=eBest2;
+ }
+ }
+ rPt=aBestPt;
+ rDir=eBestDir;
+}
+
+TYPEINIT1(SdrCaptionObj,SdrRectObj);
+
+SdrCaptionObj::SdrCaptionObj():
+ SdrRectObj(OBJ_TEXT),
+ aTailPoly(3), // Default Groesse: 3 Punkte = 2 Linien
+ mbSpecialTextBoxShadow(FALSE)
+{
+ pCaptAttr=NULL;
+}
+
+SdrCaptionObj::SdrCaptionObj(const Rectangle& rRect):
+ SdrRectObj(OBJ_TEXT,rRect),
+ aTailPoly(3), // Default Groesse: 3 Punkte = 2 Linien
+ mbSpecialTextBoxShadow(FALSE)
+{
+ pCaptAttr=NULL;
+}
+
+SdrCaptionObj::SdrCaptionObj(const Rectangle& rRect, const Point& rTail):
+ SdrRectObj(OBJ_TEXT,rRect),
+ aTailPoly(3), // Default Groesse: 3 Punkte = 2 Linien
+ mbSpecialTextBoxShadow(FALSE)
+{
+ aTailPoly[0]=rTail;
+ pCaptAttr=NULL;
+}
+
+SdrCaptionObj::~SdrCaptionObj()
+{
+ // Attr entfernen (oder macht das SdrAttrObj noch nicht automatisch)
+ pCaptAttr=(SdrCaptionSetItem*)ImpSetNewAttr(pCaptAttr,NULL,FALSE);
+}
+
+FASTBOOL SdrCaptionObj::Paint(ExtOutputDevice& rOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ // special shadow paint for calc
+ if(mbSpecialTextBoxShadow)
+ {
+ sal_uInt32 nXDist = ((SdrShadowXDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWXDIST))).GetValue();
+ sal_uInt32 nYDist = ((SdrShadowYDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWYDIST))).GetValue();
+ const SdrShadowColorItem& rShadColItem = ((SdrShadowColorItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWCOLOR)));
+ Color aShadCol(rShadColItem.GetValue());
+ sal_uInt16 nTransp = ((SdrShadowTransparenceItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue();
+ XFillStyle eStyle = ((XFillStyleItem&)(pFillAttr->GetItemSet().Get(XATTR_FILLSTYLE))).GetValue();
+ XFillAttrSetItem aF(*pFillAttr);
+
+ if(eStyle == XFILL_HATCH) // #41666#
+ {
+ XHatch aHatch = ((XFillHatchItem&)(pFillAttr->GetItemSet().Get(XATTR_FILLHATCH))).GetValue();
+ aHatch.SetColor(aShadCol);
+ aF.GetItemSet().Put(XFillHatchItem(String(),aHatch));
+ }
+ else
+ {
+ if(eStyle != XFILL_NONE && eStyle != XFILL_SOLID)
+ {
+ // also fuer Gradient und Bitmap
+ aF.GetItemSet().Put(XFillStyleItem(XFILL_SOLID));
+ }
+
+ aF.GetItemSet().Put(XFillColorItem(String(),aShadCol));
+ aF.GetItemSet().Put(XFillTransparenceItem(nTransp));
+ }
+ rOut.SetFillAttr(aF);
+
+ sal_Int32 nEckRad(GetEckenradius());
+ if(PaintNeedsXPoly(nEckRad))
+ {
+ XPolygon aX(GetXPoly());
+ aX.Move(nXDist,nYDist);
+ rOut.DrawXPolygon(aX);
+ }
+ else
+ {
+ Rectangle aR(aRect);
+ aR.Move(nXDist,nYDist);
+ rOut.DrawRect(aR,USHORT(2*nEckRad),USHORT(2*nEckRad));
+ }
+ }
+
+ // call parent for normal paint
+ return SdrRectObj::Paint(rOut, rInfoRec);
+}
+
+void SdrCaptionObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ rInfo.bRotateFreeAllowed=FALSE;
+ rInfo.bRotate90Allowed =FALSE;
+ rInfo.bMirrorFreeAllowed=FALSE;
+ rInfo.bMirror45Allowed =FALSE;
+ rInfo.bMirror90Allowed =FALSE;
+ rInfo.bTransparenceAllowed = FALSE;
+ rInfo.bGradientAllowed = FALSE;
+ rInfo.bShearAllowed =FALSE;
+ rInfo.bCanConvToPath =TRUE;
+ rInfo.bCanConvToPoly =TRUE;
+ rInfo.bCanConvToPathLineToArea=FALSE;
+ rInfo.bCanConvToPolyLineToArea=FALSE;
+ rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
+}
+
+UINT16 SdrCaptionObj::GetObjIdentifier() const
+{
+ return UINT16(OBJ_CAPTION);
+}
+
+void SdrCaptionObj::RecalcBoundRect()
+{
+ aOutRect=GetSnapRect();
+ long nLineWdt=ImpGetLineWdt();
+ nLineWdt++; nLineWdt/=2;
+ long nLEndWdt=ImpGetLineEndAdd();
+ if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt;
+ if (nLineWdt!=0) {
+ aOutRect.Left ()-=nLineWdt;
+ aOutRect.Top ()-=nLineWdt;
+ aOutRect.Right ()+=nLineWdt;
+ aOutRect.Bottom()+=nLineWdt;
+ }
+ ImpAddShadowToBoundRect();
+ ImpAddTextToBoundRect();
+}
+
+SdrObject* SdrCaptionObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+ FASTBOOL bHit=SdrRectObj::CheckHit(rPnt,nTol,pVisiLayer)!=NULL;
+ if (!bHit) {
+ INT32 nMyTol=nTol;
+ INT32 nWdt=0;
+ if (pLineAttr!=NULL) {
+ nWdt=((XLineWidthItem&)(pLineAttr->GetItemSet().Get(XATTR_LINEWIDTH))).GetValue();
+ nWdt++;
+ nWdt/=2;
+ }
+ if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Linie keine Toleranz noetig
+ Rectangle aR(rPnt,rPnt);
+ aR.Left() -=nMyTol;
+ aR.Right() +=nMyTol;
+ aR.Top() -=nMyTol;
+ aR.Bottom()+=nMyTol;
+ bHit=IsRectTouchesLine(aTailPoly,aR);
+ }
+ return bHit ? (SdrObject*)this : NULL;
+}
+
+void SdrCaptionObj::operator=(const SdrObject& rObj)
+{
+ SdrRectObj::operator=(rObj);
+ aTailPoly=((SdrCaptionObj&)rObj).aTailPoly;
+ pCaptAttr=(SdrCaptionSetItem*)ImpSetNewAttr(pCaptAttr,((SdrCaptionObj&)rObj).pCaptAttr);
+}
+
+void SdrCaptionObj::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulCAPTION);
+}
+
+void SdrCaptionObj::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralCAPTION);
+}
+
+void SdrCaptionObj::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL bDetail) const
+{
+ SdrRectObj::TakeXorPoly(rPoly,bDetail);
+ rPoly.Insert(XPolygon(aTailPoly));
+}
+
+void SdrCaptionObj::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+USHORT SdrCaptionObj::GetHdlCount() const
+{
+ USHORT nAnz1=SdrRectObj::GetHdlCount();
+ USHORT nAnz2=aTailPoly.GetSize();
+ // Derzeit ist nur das Draggen des Schwanzendes implementiert
+ return nAnz1+1;
+}
+
+SdrHdl* SdrCaptionObj::GetHdl(USHORT nHdlNum) const
+{
+ USHORT nRectHdlAnz=SdrRectObj::GetHdlCount();
+ if (nHdlNum<nRectHdlAnz) {
+ return SdrRectObj::GetHdl(nHdlNum);
+ } else {
+ USHORT nPntNum=nHdlNum;
+ nPntNum-=nRectHdlAnz;
+ if (nPntNum<aTailPoly.GetSize()) {
+ SdrHdl* pHdl=new SdrHdl(aTailPoly.GetPoint(nPntNum),HDL_POLY);
+ pHdl->SetPolyNum(1);
+ pHdl->SetPointNum(nPntNum);
+ return pHdl;
+ } else return NULL;
+ }
+}
+
+FASTBOOL SdrCaptionObj::HasSpecialDrag() const
+{
+ return TRUE;
+}
+
+FASTBOOL SdrCaptionObj::BegDrag(SdrDragStat& rDrag) const
+{
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ if (pHdl!=NULL && pHdl->GetPolyNum()==0) {
+ return SdrRectObj::BegDrag(rDrag);
+ } else {
+ rDrag.SetOrtho8Possible(TRUE);
+ if (pHdl==NULL) {
+ if (bMovProt) return FALSE; // Position geschuetzt
+ rDrag.SetNoSnap(TRUE); // Snap mache ich in diesem Fall selbst (RectSnap)
+ rDrag.SetActionRect(aRect);
+ Point aHit(rDrag.GetStart());
+ if (rDrag.GetPageView()!=NULL) { // Hitposition bei versetzter PageView korregieren
+ aHit-=rDrag.GetPageView()->GetOffset();
+ }
+ if (SdrRectObj::CheckHit(aHit,0,NULL)!=NULL) return TRUE;
+ else return FALSE;
+ } else {
+ return (pHdl->GetPolyNum()==1) && (pHdl->GetPointNum()==0);
+ }
+ }
+}
+
+FASTBOOL SdrCaptionObj::MovDrag(SdrDragStat& rDrag) const
+{
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ if (pHdl!=NULL && pHdl->GetPolyNum()==0) {
+ return SdrRectObj::MovDrag(rDrag);
+ } else {
+ SdrView* pView=rDrag.GetView();
+ SdrPageView* pPV=rDrag.GetPageView();
+ Rectangle aR(aRect);
+ aR.Move(rDrag.GetDX(),rDrag.GetDY());
+ if (pView!=NULL && pPV!=NULL && pView->IsSnapEnabled()) { // RectSnap
+ long nDX=0,nDY=0;
+ pView->SnapRect(aR,pPV,nDX,nDY);
+ rDrag.Now().X()+=nDX;
+ rDrag.Now().Y()+=nDY;
+ aR.Move(nDX,nDY);
+ }
+ rDrag.SetActionRect(aR);
+ return TRUE;
+ }
+}
+
+FASTBOOL SdrCaptionObj::EndDrag(SdrDragStat& rDrag)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ if (pHdl!=NULL && pHdl->GetPolyNum()==0) {
+ FASTBOOL bRet=SdrRectObj::EndDrag(rDrag);
+ ImpRecalcTail();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ return bRet;
+ } else {
+ SendRepaintBroadcast();
+ Point aDelt(rDrag.GetNow()-rDrag.GetStart());
+ if (pHdl==NULL) { // Rect verschoben
+ aRect.Move(aDelt.X(),aDelt.Y());
+ } else { // Schwanz verschoben
+ aTailPoly[0]+=aDelt;
+ }
+ ImpRecalcTail();
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ return TRUE;
+ }
+}
+
+void SdrCaptionObj::BrkDrag(SdrDragStat& rDrag) const
+{
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ if (pHdl!=NULL && pHdl->GetPolyNum()==0) {
+ SdrRectObj::BrkDrag(rDrag);
+ } else {
+ }
+}
+
+XubString SdrCaptionObj::GetDragComment(const SdrDragStat& rDrag, FASTBOOL bUndoDragComment, FASTBOOL bCreateComment) const
+{
+ if (bCreateComment) return String();
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ if (pHdl!=NULL && pHdl->GetPolyNum()==0) {
+ return SdrRectObj::GetDragComment(rDrag,bUndoDragComment,FALSE);
+ } else {
+ XubString aStr;
+ if (pHdl==NULL) {
+ ImpTakeDescriptionStr(STR_DragCaptFram,aStr);
+ } else {
+ ImpTakeDescriptionStr(STR_DragCaptTail,aStr);
+ }
+ return aStr;
+ }
+}
+
+void SdrCaptionObj::TakeDragPoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rXPP.Clear();
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ FASTBOOL bRad=rDrag.GetHdl()!=NULL && rDrag.GetHdl()->GetKind()==HDL_CIRC;
+ FASTBOOL bRectSiz=(pHdl!=NULL && pHdl->GetPolyNum()==0);
+ if (bRad) {
+ SdrRectObj::TakeDragPoly(rDrag,rXPP);
+ } else {
+ Point aDelt(rDrag.GetNow()-rDrag.GetStart());
+ Polygon aTmpPoly(aTailPoly);
+ Rectangle aTmpRect;
+ if (bRectSiz) aTmpRect=ImpDragCalcRect(rDrag);
+ else aTmpRect=aRect;
+ ImpCaptParams aPara;
+ ImpGetCaptParams(aPara);
+ if (!bRectSiz) {
+ if (pHdl==NULL) { // Rect verschieben
+ aTmpRect.Move(aDelt.X(),aDelt.Y());
+ } else { // Schwanz verschieben
+ aTmpPoly[0]+=aDelt;
+ }
+ }
+ ImpCalcTail(aPara,aTmpPoly,aTmpRect);
+ rXPP.Insert(ImpCalcXPoly(aTmpRect,GetEckenradius()));
+ rXPP.Insert(XPolygon(aTmpPoly));
+ }
+}
+
+void SdrCaptionObj::ImpGetCaptParams(ImpCaptParams& rPara) const
+{
+ if (pCaptAttr!=NULL) {
+ const SfxItemSet& rSet=pCaptAttr->GetItemSet();
+ rPara.eType =((SdrCaptionTypeItem&) (rSet.Get(SDRATTR_CAPTIONTYPE ))).GetValue();
+ rPara.bFixedAngle=((SdrCaptionFixedAngleItem&)(rSet.Get(SDRATTR_CAPTIONANGLE ))).GetValue();
+ rPara.nAngle =((SdrCaptionAngleItem&) (rSet.Get(SDRATTR_CAPTIONFIXEDANGLE))).GetValue();
+ rPara.nGap =((SdrCaptionGapItem&) (rSet.Get(SDRATTR_CAPTIONGAP ))).GetValue();
+ rPara.eEscDir =((SdrCaptionEscDirItem&) (rSet.Get(SDRATTR_CAPTIONESCDIR ))).GetValue();
+ rPara.bEscRel =((SdrCaptionEscIsRelItem&) (rSet.Get(SDRATTR_CAPTIONESCISREL ))).GetValue();
+ rPara.nEscRel =((SdrCaptionEscRelItem&) (rSet.Get(SDRATTR_CAPTIONESCREL ))).GetValue();
+ rPara.nEscAbs =((SdrCaptionEscAbsItem&) (rSet.Get(SDRATTR_CAPTIONESCABS ))).GetValue();
+ rPara.nLineLen =((SdrCaptionLineLenItem&) (rSet.Get(SDRATTR_CAPTIONLINELEN ))).GetValue();
+ rPara.bFitLineLen=((SdrCaptionFitLineLenItem&)(rSet.Get(SDRATTR_CAPTIONFITLINELEN))).GetValue();
+ }
+}
+
+void SdrCaptionObj::ImpRecalcTail()
+{
+ ImpCaptParams aPara;
+ ImpGetCaptParams(aPara);
+ ImpCalcTail(aPara,aTailPoly,aRect);
+ SetRectsDirty();
+ SetXPolyDirty();
+}
+
+void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+{ // Gap/EscDir/EscPos
+ Polygon aPol(2);
+ Point aTl(rPoly[0]);
+ aPol[0]=aTl;
+ aPol[1]=aTl;
+ EscDir eEscDir;
+ Point aEscPos;
+ rPara.CalcEscPos(aTl,rRect,aEscPos,eEscDir);
+ if (eEscDir==LKS || eEscDir==RTS) {
+ long dx=aTl.X()-aEscPos.X();
+ rRect.Move(dx,0);
+ aPol[1].Y()=aEscPos.Y();
+ } else {
+ long dy=aTl.Y()-aEscPos.Y();
+ rRect.Move(0,dy);
+ aPol[1].X()=aEscPos.X();
+ }
+ rPoly=aPol;
+}
+
+void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+{ // Gap/EscDir/EscPos/Angle
+ Polygon aPol(2);
+ Point aTl(rPoly[0]);
+ aPol[0]=aTl;
+
+ EscDir eEscDir;
+ Point aEscPos;
+ rPara.CalcEscPos(aTl,rRect,aEscPos,eEscDir);
+ aPol[1]=aEscPos;
+
+ if (!rPara.bFixedAngle) {
+ // fehlende Implementation
+ }
+ rPoly=aPol;
+}
+
+void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+{ // Gap/EscDir/EscPos/Angle/LineLen
+ Polygon aPol(3);
+ Point aTl(rPoly[0]);
+ aPol[0]=aTl;
+
+ EscDir eEscDir;
+ Point aEscPos;
+ rPara.CalcEscPos(aTl,rRect,aEscPos,eEscDir);
+ aPol[1]=aEscPos;
+ aPol[2]=aEscPos;
+
+ if (eEscDir==LKS || eEscDir==RTS) {
+ if (rPara.bFitLineLen) {
+ aPol[1].X()=(aTl.X()+aEscPos.X())/2;
+ } else {
+ if (eEscDir==LKS) aPol[1].X()-=rPara.nLineLen;
+ else aPol[1].X()+=rPara.nLineLen;
+ }
+ } else {
+ if (rPara.bFitLineLen) {
+ aPol[1].Y()=(aTl.Y()+aEscPos.Y())/2;
+ } else {
+ if (eEscDir==OBN) aPol[1].Y()-=rPara.nLineLen;
+ else aPol[1].Y()+=rPara.nLineLen;
+ }
+ }
+ if (!rPara.bFixedAngle) {
+ // fehlende Implementation
+ }
+ rPoly=aPol;
+}
+
+void SdrCaptionObj::ImpCalcTail4(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+{
+ ImpCalcTail3(rPara,rPoly,rRect);
+}
+
+void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+{
+ switch (rPara.eType) {
+ case SDRCAPT_TYPE1: ImpCalcTail1(rPara,rPoly,rRect); break;
+ case SDRCAPT_TYPE2: ImpCalcTail2(rPara,rPoly,rRect); break;
+ case SDRCAPT_TYPE3: ImpCalcTail3(rPara,rPoly,rRect); break;
+ case SDRCAPT_TYPE4: ImpCalcTail4(rPara,rPoly,rRect); break;
+ }
+}
+
+FASTBOOL SdrCaptionObj::BegCreate(SdrDragStat& rStat)
+{
+ if (aRect.IsEmpty()) return FALSE; // Create z.Zt. nur mit vorgegebenen Rect
+
+ ImpCaptParams aPara;
+ ImpGetCaptParams(aPara);
+ aRect.SetPos(rStat.GetNow());
+ aTailPoly[0]=rStat.GetStart();
+ ImpCalcTail(aPara,aTailPoly,aRect);
+ rStat.SetActionRect(aRect);
+ return TRUE;
+}
+
+FASTBOOL SdrCaptionObj::MovCreate(SdrDragStat& rStat)
+{
+ ImpCaptParams aPara;
+ ImpGetCaptParams(aPara);
+ aRect.SetPos(rStat.GetNow());
+ ImpCalcTail(aPara,aTailPoly,aRect);
+ rStat.SetActionRect(aRect);
+ bBoundRectDirty=TRUE;
+ bSnapRectDirty=TRUE;
+ return TRUE;
+}
+
+FASTBOOL SdrCaptionObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+{
+ ImpCaptParams aPara;
+ ImpGetCaptParams(aPara);
+ aRect.SetPos(rStat.GetNow());
+ ImpCalcTail(aPara,aTailPoly,aRect);
+ SetRectsDirty();
+ return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
+}
+
+FASTBOOL SdrCaptionObj::BckCreate(SdrDragStat& rStat)
+{
+ return FALSE;
+}
+
+void SdrCaptionObj::BrkCreate(SdrDragStat& rStat)
+{
+}
+
+void SdrCaptionObj::TakeCreatePoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rXPP.Clear();
+ rXPP.Insert(XPolygon(aRect));
+ rXPP.Insert(XPolygon(aTailPoly));
+}
+
+Pointer SdrCaptionObj::GetCreatePointer() const
+{
+ return Pointer(POINTER_DRAW_CAPTION);
+}
+
+void SdrCaptionObj::NbcMove(const Size& rSiz)
+{
+ SdrRectObj::NbcMove(rSiz);
+ MovePoly(aTailPoly,rSiz);
+}
+
+void SdrCaptionObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ SdrRectObj::NbcResize(rRef,xFact,yFact);
+ ResizePoly(aTailPoly,rRef,xFact,yFact);
+ ImpRecalcTail();
+}
+
+void SdrCaptionObj::NbcSetRelativePos(const Point& rPnt)
+{
+ Point aRelPos0(aTailPoly.GetPoint(0)-aAnchor);
+ Size aSiz(rPnt.X()-aRelPos0.X(),rPnt.Y()-aRelPos0.Y());
+ NbcMove(aSiz); // Der ruft auch das SetRectsDirty()
+}
+
+Point SdrCaptionObj::GetRelativePos() const
+{
+ return aTailPoly.GetPoint(0)-aAnchor;
+}
+
+void SdrCaptionObj::NbcSetAnchorPos(const Point& rPnt)
+{
+ SdrRectObj::NbcSetAnchorPos(rPnt);
+ // !!!!! fehlende Impl.
+}
+
+const Point& SdrCaptionObj::GetAnchorPos() const
+{
+ // !!!!! fehlende Impl.
+ return SdrRectObj::GetAnchorPos();
+}
+
+void SdrCaptionObj::RecalcSnapRect()
+{
+ SdrRectObj::RecalcSnapRect();
+ aSnapRect.Union(aTailPoly.GetBoundRect());
+ // !!!!! fehlende Impl.
+}
+
+const Rectangle& SdrCaptionObj::GetSnapRect() const
+{
+ return SdrRectObj::GetSnapRect();
+}
+
+void SdrCaptionObj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ // !!!!! fehlende Impl.
+}
+
+const Rectangle& SdrCaptionObj::GetLogicRect() const
+{
+ return aRect;
+}
+
+void SdrCaptionObj::NbcSetLogicRect(const Rectangle& rRect)
+{
+ SdrRectObj::NbcSetLogicRect(rRect);
+ ImpRecalcTail();
+}
+
+const Point& SdrCaptionObj::GetTailPos() const
+{
+ return aTailPoly[0];
+}
+
+void SdrCaptionObj::SetTailPos(const Point& rPos)
+{
+ if (aTailPoly.GetSize()==0 || aTailPoly[0]!=rPos) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetTailPos(rPos);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrCaptionObj::NbcSetTailPos(const Point& rPos)
+{
+ aTailPoly[0]=rPos;
+ ImpRecalcTail();
+}
+
+USHORT SdrCaptionObj::GetSnapPointCount() const
+{
+ // !!!!! fehlende Impl.
+ return 0;
+}
+
+Point SdrCaptionObj::GetSnapPoint(USHORT i) const
+{
+ // !!!!! fehlende Impl.
+ return Point(0,0);
+}
+
+void SdrCaptionObj::SetModel(SdrModel* pNewModel)
+{
+ SdrRectObj::SetModel(pNewModel);
+ ImpRecalcTail();
+}
+
+void SdrCaptionObj::ForceDefaultAttr(SfxItemPool* pPool)
+{
+ FASTBOOL bLineMerk=pLineAttr==NULL;
+ SdrRectObj::ForceDefaultAttr(pPool);
+ if (pPool!=NULL) {
+ if (pCaptAttr==NULL) {
+ SdrCaptionSetItem aSetItem(pPool);
+ pCaptAttr=(SdrCaptionSetItem*)ImpSetNewAttr(pCaptAttr,&aSetItem,FALSE);
+ }
+ if (bLineMerk && pLineAttr!=NULL) {
+ XLineAttrSetItem aSetItem(*pLineAttr);
+ aSetItem.GetItemSet().Put(XLineStyleItem(XLINE_SOLID));
+ pLineAttr=(XLineAttrSetItem*)ImpSetNewAttr(pLineAttr,&aSetItem,FALSE);
+ }
+ }
+}
+
+void SdrCaptionObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ SdrRectObj::NbcSetAttributes(rAttr,bReplaceAll);
+ ImpRecalcTail();
+}
+
+void SdrCaptionObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ SdrRectObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+ ImpRecalcTail();
+}
+
+void SdrCaptionObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ SdrRectObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+ ImpRecalcTail();
+}
+
+USHORT SdrCaptionObj::GetSetItemCount() const
+{
+ return 1+SdrRectObj::GetSetItemCount();
+}
+
+const SfxSetItem* SdrCaptionObj::GetSetItem(USHORT nNum) const
+{
+ if (nNum==0) return pCaptAttr;
+ nNum--;
+ return SdrRectObj::GetSetItem(nNum);
+}
+
+void SdrCaptionObj::SetSetItem(USHORT nNum, const SfxSetItem* pAttr)
+{
+ if (nNum==0) pCaptAttr=(const SdrCaptionSetItem*)pAttr;
+ else {
+ nNum--;
+ SdrRectObj::SetSetItem(nNum,pAttr);
+ }
+}
+
+SfxSetItem* SdrCaptionObj::MakeNewSetItem(USHORT nNum, FASTBOOL bClone) const
+{
+ if (nNum==0) {
+ if (bClone) return new SdrCaptionSetItem(*pCaptAttr);
+ else return new SdrCaptionSetItem(GetItemPool());
+ } else {
+ nNum--;
+ return SdrRectObj::MakeNewSetItem(nNum,bClone);
+ }
+}
+
+SdrObjGeoData* SdrCaptionObj::NewGeoData() const
+{
+ return new SdrCaptObjGeoData;
+}
+
+void SdrCaptionObj::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ SdrRectObj::SaveGeoData(rGeo);
+ SdrCaptObjGeoData& rCGeo=(SdrCaptObjGeoData&)rGeo;
+ rCGeo.aTailPoly=aTailPoly;
+}
+
+void SdrCaptionObj::RestGeoData(const SdrObjGeoData& rGeo)
+{
+ SdrRectObj::RestGeoData(rGeo);
+ SdrCaptObjGeoData& rCGeo=(SdrCaptObjGeoData&)rGeo;
+ aTailPoly=rCGeo.aTailPoly;
+}
+
+SdrObject* SdrCaptionObj::DoConvertToPolyObj(BOOL bBezier) const
+{ // #42334# - Convert implementiert
+ SdrObject* pRect=SdrRectObj::DoConvertToPolyObj(bBezier);
+ SdrObject* pTail=ImpConvertMakeObj(XPolyPolygon(XPolygon(aTailPoly)),FALSE,bBezier);
+ SdrObject* pRet=(pTail!=NULL) ? pTail : pRect;
+ if (pTail!=NULL && pRect!=NULL) {
+ FASTBOOL bInsRect=TRUE;
+ FASTBOOL bInsTail=TRUE;
+ SdrObjList* pOL=pTail->GetSubList();
+ if (pOL!=NULL) { pRet=pRect; bInsTail=FALSE; }
+ if (pOL==NULL) pOL=pRect->GetSubList();
+ if (pOL!=NULL) { pRet=pRect; bInsRect=FALSE; }
+ if (pOL==NULL) {
+ SdrObjGroup* pGrp=new SdrObjGroup;
+ pOL=pGrp->GetSubList();
+ pRet=pGrp;
+ }
+ if (bInsRect) pOL->NbcInsertObject(pRect);
+ if (bInsTail) pOL->NbcInsertObject(pTail,0);
+ }
+ return pRet;
+}
+
+void SdrCaptionObj::WriteData(SvStream& rOut) const
+{
+ SdrRectObj::WriteData(rOut);
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrCaptionObj");
+#endif
+ rOut<<aTailPoly;
+ SfxItemPool* pPool=GetItemPool();
+ if (pPool!=NULL) {
+ pPool->StoreSurrogate(rOut,pCaptAttr);
+ } else {
+ rOut<<UINT16(SFX_ITEMS_NULL);
+ }
+}
+
+void SdrCaptionObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ SdrRectObj::ReadData(rHead,rIn);
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrCaptionObj");
+#endif
+ rIn>>aTailPoly;
+
+ if (rHead.GetVersion()<11) { UINT16 nWhichDum; rIn>>nWhichDum; } // ab V11 keine WhichId mehr
+ SfxItemPool* pPool=GetItemPool();
+ if (pPool!=NULL) {
+ pCaptAttr=(const SdrCaptionSetItem*)ImpSetNewAttr(pCaptAttr,NULL); // ggf altes rauswerfen
+ USHORT nWhichRef=SDRATTRSET_CAPTION;
+ pCaptAttr=(const SdrCaptionSetItem*)pPool->LoadSurrogate(rIn,nWhichRef,0);
+ if (pStyleSheet!=NULL && pCaptAttr!=NULL) {
+ ((SfxItemSet*)&pCaptAttr->GetItemSet())->SetParent(&pStyleSheet->GetItemSet());
+ }
+ } else {
+ UINT16 nSuroDum;
+ rIn>>nSuroDum;
+ }
+}
+
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
new file mode 100644
index 0000000000..e0d88e0be5
--- /dev/null
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -0,0 +1,1482 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdocirc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+#ifndef _SVX_XLNWTIT_HXX //autogen
+#include <xlnwtit.hxx>
+#endif
+
+#ifndef _SVX_XLNEDWIT_HXX //autogen
+#include <xlnedwit.hxx>
+#endif
+
+#ifndef _SVX_XLNSTWIT_HXX //autogen
+#include <xlnstwit.hxx>
+#endif
+
+#ifndef _SVX_XLNSTIT_HXX //autogen
+#include <xlnstit.hxx>
+#endif
+
+#ifndef _SVX_XLNEDIT_HXX //autogen
+#include <xlnedit.hxx>
+#endif
+
+#include "svdocirc.hxx"
+#include <math.h>
+#include "xpool.hxx"
+#include "svdtouch.hxx"
+#include "svdxout.hxx"
+#include "svdattr.hxx"
+#include "svdpool.hxx"
+#include "svdattrx.hxx"
+#include "svdtrans.hxx"
+#include "svdio.hxx"
+#include "svdetc.hxx"
+#include "svddrag.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdopath.hxx" // fuer die Objektkonvertierung
+#include "svdview.hxx" // Zum Draggen (Ortho)
+#include "svdglob.hxx" // StringCache
+#include "svdstr.hrc" // Objektname
+
+void SetWinkPnt(const Rectangle& rR, long nWink, Point& rPnt)
+{
+ Point aCenter(rR.Center());
+ long nWdt=rR.Right()-rR.Left();
+ long nHgt=rR.Bottom()-rR.Top();
+ long nMaxRad=((nWdt>nHgt ? nWdt : nHgt)+1) /2;
+ double a;
+ a=nWink*nPi180;
+ rPnt=Point(Round(cos(a)*nMaxRad),-Round(sin(a)*nMaxRad));
+ if (nWdt==0) rPnt.X()=0;
+ if (nHgt==0) rPnt.Y()=0;
+ if (nWdt!=nHgt) {
+ if (nWdt>nHgt) {
+ if (nWdt!=0) {
+ // eventuelle Ueberlaeufe bei sehr grossen Objekten abfangen (Bug 23384)
+ if (Abs(nHgt)>32767 || Abs(rPnt.Y())>32767) {
+ rPnt.Y()=BigMulDiv(rPnt.Y(),nHgt,nWdt);
+ } else {
+ rPnt.Y()=rPnt.Y()*nHgt/nWdt;
+ }
+ }
+ } else {
+ if (nHgt!=0) {
+ // eventuelle Ueberlaeufe bei sehr grossen Objekten abfangen (Bug 23384)
+ if (Abs(nWdt)>32767 || Abs(rPnt.X())>32767) {
+ rPnt.X()=BigMulDiv(rPnt.X(),nWdt,nHgt);
+ } else {
+ rPnt.X()=rPnt.X()*nWdt/nHgt;
+ }
+ }
+ }
+ }
+ rPnt+=aCenter;
+}
+
+TYPEINIT1(SdrCircObj,SdrRectObj);
+
+SdrCircObj::SdrCircObj(SdrObjKind eNewKind)
+{
+ nStartWink=0;
+ nEndWink=36000;
+ eKind=eNewKind;
+ bClosedObj=eNewKind!=OBJ_CARC;
+ pCircAttr=NULL;
+}
+
+SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect):
+ SdrRectObj(rRect)
+{
+ nStartWink=0;
+ nEndWink=36000;
+ eKind=eNewKind;
+ bClosedObj=eNewKind!=OBJ_CARC;
+ pCircAttr=NULL;
+}
+
+SdrCircObj::SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect, long nNewStartWink, long nNewEndWink):
+ SdrRectObj(rRect)
+{
+ long nWinkDif=nNewEndWink-nNewStartWink;
+ nStartWink=NormAngle360(nNewStartWink);
+ nEndWink=NormAngle360(nNewEndWink);
+ if (nWinkDif==36000) nEndWink+=nWinkDif; // Vollkreis
+ eKind=eNewKind;
+ bClosedObj=eNewKind!=OBJ_CARC;
+ pCircAttr=NULL;
+}
+
+SdrCircObj::~SdrCircObj()
+{
+ // Attr entfernen (oder macht das SdrAttrObj noch nicht automatisch)
+ pCircAttr=(SdrCircSetItem*)ImpSetNewAttr(pCircAttr,NULL,FALSE);
+}
+
+void SdrCircObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ FASTBOOL bCanConv=!HasText() || ImpCanConvTextToCurve();
+ rInfo.bCanConvToPath=bCanConv;
+ rInfo.bCanConvToPoly=bCanConv;
+ rInfo.bCanConvToContour = !IsFontwork() && (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
+}
+
+UINT16 SdrCircObj::GetObjIdentifier() const
+{
+ return UINT16(eKind);
+}
+
+FASTBOOL SdrCircObj::PaintNeedsXPoly() const
+{
+ // XPoly ist notwendig fuer alle gedrehten Ellipsenobjekte,
+ // fuer alle Kreis- und Ellipsenabschnitte
+ // und wenn nicht WIN dann (erstmal) auch fuer Kreis-/Ellipsenausschnitte
+ // und Kreis-/Ellipsenboegen (wg. Genauigkeit)
+ FASTBOOL bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || eKind==OBJ_CCUT;
+#ifndef WIN
+ // Wenn nicht Win, dann fuer alle ausser Vollkreis (erstmal!!!)
+ if (eKind!=OBJ_CIRC) bNeed=TRUE;
+#endif
+ if (!bNeed && pLineAttr!=NULL) {
+ const SfxItemSet& rSet=pLineAttr->GetItemSet();
+ // XPoly ist notwendig fuer alles was nicht LineSolid oder LineNone ist
+ XLineStyle eLine=((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue();
+ bNeed= eLine!=XLINE_NONE && eLine!=XLINE_SOLID;
+ // XPoly ist notwendig fuer dicke Linien
+ if (!bNeed && eLine!=XLINE_NONE) {
+ bNeed=((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue()!=0;
+ }
+ // XPoly ist notwendig fuer Kreisboegen mit Linienenden
+ if (!bNeed && eKind==OBJ_CARC) {
+ // Linienanfang ist da, wenn StartPolygon und StartWidth!=0
+ bNeed=((XLineStartItem&)(rSet.Get(XATTR_LINESTART))).GetValue().GetPointCount()!=0 &&
+ ((XLineStartWidthItem&)(rSet.Get(XATTR_LINESTARTWIDTH))).GetValue()!=0;
+ if (!bNeed) {
+ // Linienende ist da, wenn EndPolygon und EndWidth!=0
+ bNeed=((XLineEndItem&)(rSet.Get(XATTR_LINEEND))).GetValue().GetPointCount()!=0 &&
+ ((XLineEndWidthItem&)(rSet.Get(XATTR_LINEENDWIDTH))).GetValue()!=0;
+ }
+ }
+ }
+ // XPoly ist notwendig, wenn Fill !=None und !=Solid
+ if (!bNeed && pFillAttr!=NULL && eKind!=OBJ_CARC) {
+ XFillStyle eFill=((XFillStyleItem&)(pFillAttr->GetItemSet().Get(XATTR_FILLSTYLE))).GetValue();
+ bNeed= eFill!=XFILL_NONE && eFill!=XFILL_SOLID;
+ }
+ if (!bNeed && eKind!=OBJ_CIRC && nStartWink==nEndWink) bNeed=TRUE; // Weil sonst Vollkreis gemalt wird
+ return bNeed;
+}
+
+XPolygon SdrCircObj::ImpCalcXPoly(const Rectangle& rRect1, long nStart, long nEnd, FASTBOOL bContour) const
+{
+ bContour=TRUE; // am 14.1.97 wg. Umstellung TakeContour ueber Mtf und Paint. Joe.
+ long rx=rRect1.GetWidth()/2; // Da GetWidth()/GetHeight() jeweils 1
+ long ry=rRect1.GetHeight()/2; // draufaddieren wird korrekt gerundet.
+ long a=0,e=3600;
+ if (eKind!=OBJ_CIRC) {
+ a=nStart/10;
+ e=nEnd/10;
+ if (bContour) {
+ // Drehrichtung umkehren, damit Richtungssinn genauso wie Rechteck
+ rx=-rx;
+ a=1800-a; if (a<0) a+=3600;
+ e=1800-e; if (e<0) e+=3600;
+ long nTmp=a;
+ a=e;
+ e=nTmp;
+ }
+ } else {
+ if (bContour) {
+ long nTmp=rx;
+ rx=ry;
+ ry=nTmp;
+ // und auch noch die Drehrichtung aendern
+ ry=-ry;
+ }
+ }
+ ((SdrCircObj*)this)->bXPolyIsLine=eKind==OBJ_CARC;
+ FASTBOOL bClose=eKind==OBJ_CIRC /*|| eKind==OBJ_SECT*/;
+ XPolygon aXPoly(rRect1.Center(),rx,ry,USHORT(a),USHORT(e),bClose);
+ if (eKind!=OBJ_CIRC && nStart==nEnd) {
+ if (eKind==OBJ_SECT) {
+ Point aMerk(aXPoly[0]);
+ aXPoly=XPolygon(2);
+ aXPoly[0]=rRect1.Center();
+ aXPoly[1]=aMerk;
+ } else {
+ aXPoly=XPolygon();
+ }
+ }
+ if (eKind==OBJ_SECT) { // Der Sektor soll Start/Ende im Zentrum haben
+ // Polygon um einen Punkt rotieren (Punkte im Array verschieben)
+ unsigned nPointAnz=aXPoly.GetPointCount();
+ aXPoly.Insert(0,rRect1.Center(),XPOLY_NORMAL);
+ aXPoly[aXPoly.GetPointCount()]=rRect1.Center();
+ }
+ // Der Kreis soll Anfang und Ende im unteren Scheitelpunkt haben!
+ if (bContour && eKind==OBJ_CIRC) RotateXPoly(aXPoly,rRect1.Center(),-1.0,0.0);
+ // Die Winkelangaben beziehen sich immer auf die linke obere Ecke von !aRect!
+ if (aGeo.nShearWink!=0) ShearXPoly(aXPoly,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotateXPoly(aXPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ return aXPoly;
+}
+
+void SdrCircObj::RecalcXPoly()
+{
+ pXPoly=new XPolygon(ImpCalcXPoly(aRect,nStartWink,nEndWink));
+}
+
+void SdrCircObj::RecalcBoundRect()
+{
+ SetWinkPnt(aRect,nStartWink,aPnt1);
+ SetWinkPnt(aRect,nEndWink,aPnt2);
+ bBoundRectDirty=FALSE;
+ aOutRect=GetSnapRect();
+ long nLineWdt=ImpGetLineWdt();
+ nLineWdt++; nLineWdt/=2;
+ if (nLineWdt!=0) {
+ long nWink=nEndWink-nStartWink;
+ if (nWink<0) nWink+=36000;
+ if (eKind==OBJ_SECT && nWink<18000) nLineWdt*=2; // doppelt, wegen evtl. spitzen Ecken
+ if (eKind==OBJ_CCUT && nWink<18000) nLineWdt*=2; // doppelt, wegen evtl. spitzen Ecken
+ }
+ if (eKind==OBJ_CARC) { // ggf. Linienenden beruecksichtigen
+ long nLEndWdt=ImpGetLineEndAdd();
+ if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt;
+ }
+ if (nLineWdt!=0) {
+ aOutRect.Left ()-=nLineWdt;
+ aOutRect.Top ()-=nLineWdt;
+ aOutRect.Right ()+=nLineWdt;
+ aOutRect.Bottom()+=nLineWdt;
+ }
+ ImpAddShadowToBoundRect();
+ ImpAddTextToBoundRect();
+}
+
+FASTBOOL SdrCircObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ // Hidden objects on masterpages, draw nothing
+ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+ return TRUE;
+
+ FASTBOOL bHideContour=IsHideContour();
+
+ // prepare ItemSet of this object
+ SfxItemSet aSet((SfxItemPool&)(*GetItemPool()));
+ TakeAttributes(aSet, FALSE, TRUE);
+
+ // perepare ItemSet to avoid old XOut line drawing
+ XLineAttrSetItem aXLSet((SfxItemPool*)GetItemPool());
+ aXLSet.GetItemSet().Put(XLineStyleItem(XLINE_NONE));
+
+ // prepare line geometry
+ ImpLineGeometry* pLineGeometry = ImpPrepareLineGeometry(rXOut, aSet);
+
+ // Shadows
+ if (!bHideContour && ImpSetShadowAttributes(rXOut,eKind==OBJ_CARC)) {
+ UINT32 nXDist=((SdrShadowXDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWXDIST))).GetValue();
+ UINT32 nYDist=((SdrShadowYDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWYDIST))).GetValue();
+
+ // avoid shadow line drawing in XOut
+ rXOut.SetLineAttr(aXLSet);
+
+ if (PaintNeedsXPoly()) {
+ XPolygon aX(GetXPoly()); // In dieser Reihenfolge, damit bXPolyIsLine gueltig ist.
+ aX.Move(nXDist,nYDist);
+ if (bXPolyIsLine) {
+ rXOut.DrawXPolyLine(aX);
+ } else {
+ rXOut.DrawXPolygon(aX);
+ }
+ } else {
+ Rectangle aR(aRect);
+ aR.Move(nXDist,nYDist);
+ if (eKind==OBJ_CIRC) {
+ rXOut.DrawEllipse(aR);
+ } else {
+ GetBoundRect(); // fuer aPnt1,aPnt2
+ Point aTmpPt1(aPnt1);
+ Point aTmpPt2(aPnt2);
+ aTmpPt1.X()+=nXDist;
+ aTmpPt1.Y()+=nYDist;
+ aTmpPt2.X()+=nXDist;
+ aTmpPt2.Y()+=nYDist;
+ switch (eKind) {
+ case OBJ_SECT: rXOut.DrawPie(aR,aTmpPt1,aTmpPt2); break;
+ case OBJ_CARC: rXOut.DrawArc(aR,aTmpPt1,aTmpPt2); break;
+ case OBJ_CCUT: DBG_ERROR("SdrCircObj::Paint(): ein Kreisabschnitt muss immer mit XPoly gepaintet werden"); break;
+ }
+ }
+ }
+
+ // new shadow line drawing
+ if(pLineGeometry)
+ {
+ // draw the line geometry
+ ImpDrawShadowLineGeometry(rXOut, aSet, *pLineGeometry);
+ }
+ }
+
+ // Before here the LineAttr were set: if(pLineAttr) rXOut.SetLineAttr(*pLineAttr);
+ rXOut.SetLineAttr(aXLSet);
+
+ if(pFillAttr)
+ rXOut.SetFillAttr(*pFillAttr);
+
+ if (!bHideContour) {
+ if (PaintNeedsXPoly()) {
+ const XPolygon& rXP=GetXPoly(); // In dieser Reihenfolge, damit bXPolyIsLine gueltig ist.
+ if (bXPolyIsLine) {
+ rXOut.DrawXPolyLine(rXP);
+ } else {
+ rXOut.DrawXPolygon(rXP);
+ }
+ } else {
+ if (eKind==OBJ_CIRC) {
+ rXOut.DrawEllipse(aRect);
+ } else {
+ GetBoundRect(); // fuer aPnt1,aPnt2
+ switch (eKind) {
+ case OBJ_SECT: rXOut.DrawPie(aRect,aPnt1,aPnt2); break;
+ case OBJ_CARC: rXOut.DrawArc(aRect,aPnt1,aPnt2); break;
+ case OBJ_CCUT: DBG_ERROR("SdrCircObj::Paint(): ein Kreisabschnitt muss immer mit XPoly gepaintet werden"); break;
+ }
+ }
+ }
+ }
+
+ // Own line drawing
+ if(!bHideContour && pLineGeometry)
+ {
+ // draw the line geometry
+ ImpDrawColorLineGeometry(rXOut, aSet, *pLineGeometry);
+ }
+
+ FASTBOOL bOk=TRUE;
+ if (HasText()) {
+ bOk=SdrTextObj::Paint(rXOut,rInfoRec);
+ }
+ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {
+ bOk=PaintGluePoints(rXOut,rInfoRec);
+ }
+
+ // throw away line geometry
+ if(pLineGeometry)
+ delete pLineGeometry;
+
+ return bOk;
+}
+
+SdrObject* SdrCircObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+ Point aPt(rPnt);
+ Point aZero;
+ aPt.X()-=aRect.Left();
+ aPt.Y()-=aRect.Top();
+
+ INT32 nMyTol=nTol;
+ FASTBOOL bFilled=eKind!=OBJ_CARC && (bTextFrame || HasFill());
+
+ INT32 nWdt=ImpGetLineWdt()/2; // Halbe Strichstaerke
+ long nBoundWdt=aRect.GetWidth()-1;
+ long nBoundHgt=aRect.GetHeight()-1;
+ if (eKind==OBJ_SECT) {
+ long nTmpWink=NormAngle360(nEndWink-nStartWink);
+ if (nTmpWink<9000) {
+ nBoundWdt=0;
+ nBoundHgt=0;
+ } else if (nTmpWink<27000) {
+ nBoundWdt/=2;
+ nBoundHgt/=2;
+ }
+ }
+ if (bFilled && nBoundWdt>short(nTol) && nBoundHgt>short(nTol) && Abs(aGeo.nShearWink)<=4500) nMyTol=0; // Keine Toleranz noetig hier
+ if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Umrandung keine Toleranz noetig
+
+ // Den uebergebenen Punkt auf den gedrehten, geshearten Kreis transformieren
+ // Unrotate:
+ if (aGeo.nDrehWink!=0) RotatePoint(aPt,aZero,-aGeo.nSin,aGeo.nCos); // -sin fuer Umkehrung
+ // Unshear:
+ if (aGeo.nShearWink!=0) ShearPoint(aPt,aZero,-aGeo.nTan); // -tan fuer Umkehrung
+
+ long nXRad=aRect.GetWidth()/2; if (nXRad<1) nXRad=1;
+ long nYRad=aRect.GetHeight()/2; if (nYRad<1) nYRad=1;
+
+ // Die wirklichen Radien fuer spaeter merken
+ long nXRadReal=nXRad;
+ long nYRadReal=nYRad;
+ aPt.X()-=nXRad;
+ aPt.Y()-=nYRad;
+ Point aPtNoStretch(aPt);
+
+ if (nXRad>nYRad) {
+ aPt.Y()=BigMulDiv(aPt.Y(),nXRad,nYRad);
+ // Da die Strichstaerke bei Ellipsen ueberall gleich ist:
+ if (Abs(aPt.X())<Abs(aPt.Y())) {
+ nMyTol=BigMulDiv(nMyTol,nXRad,nYRad);
+ }
+ nYRad=nXRad;
+ }
+ if (nYRad>nXRad) {
+ aPt.X()=BigMulDiv(aPt.X(),nYRad,nXRad);
+ // Da die Strichstaerke bei Ellipsen ueberall gleich ist:
+ if (Abs(aPt.Y())<Abs(aPt.X())) {
+ nMyTol=BigMulDiv(nMyTol,nYRad,nXRad);
+ }
+ nXRad=nYRad;
+ }
+
+ // Die BigInts haben bei *= leider ein Vorzeichenproblem (a*=a;)
+ // (SV250A), deshalb hier soviele Instanzen. (JOE)
+ long nAussen=nXRad+nMyTol;
+ BigInt nBigTmpA(nAussen);
+ BigInt nAusRadQ(nBigTmpA*nBigTmpA);
+ long nInnen=nXRad-nMyTol; if (nInnen<=0) nInnen=0;
+ BigInt nBigTmpI(nInnen);
+ // wird sonst nicht benoetigt, ggf. BugMul sparen:
+ BigInt nInnRadQ((!bFilled && nInnen!=0) ? nBigTmpI*nBigTmpI : nBigTmpI);
+
+ // Radius von aPt berechnen
+ BigInt nBigTmpX(aPt.X());
+ BigInt nBigTmpY(aPt.Y());
+ BigInt nPntRadQ(nBigTmpX*nBigTmpX+nBigTmpY*nBigTmpY);
+
+ FASTBOOL bRet=FALSE;
+ if (nPntRadQ<=nAusRadQ) { // sonst ausserhalb
+ if (nInnen==0) bRet=TRUE;
+ else if (eKind==OBJ_CIRC) { // Vollkreis
+ if (bFilled) bRet=TRUE;
+ else if (nPntRadQ>=nInnRadQ) bRet=TRUE;
+ } else { // Teilkreise
+ long nWink=NormAngle360(GetAngle(aPt));
+ long a=nStartWink;
+ long e=nEndWink;
+ if (e<a) e+=36000;
+ if (nWink<a) nWink+=36000;
+ if (nWink>=a && nWink<=e) {
+ if (bFilled) bRet=TRUE;
+ else if (nPntRadQ>=nInnRadQ) bRet=TRUE;
+ }
+ if (!bRet) {
+ Rectangle aR(aPtNoStretch.X()-nMyTol,aPtNoStretch.Y()-nMyTol,
+ aPtNoStretch.X()+nMyTol,aPtNoStretch.Y()+nMyTol);
+ Point aP1(aPnt1);
+ aP1.X()-=aRect.Left()+nXRadReal;
+ aP1.Y()-=aRect.Top()+nYRadReal;
+ Point aP2(aPnt2);
+ aP2.X()-=aRect.Left()+nXRadReal;
+ aP2.Y()-=aRect.Top()+nYRadReal;
+ if (eKind==OBJ_SECT) { // Kreissektor: nur noch die beiden Strecken testen
+ bRet=IsRectTouchesLine(aZero,aP1,aR) || IsRectTouchesLine(aZero,aP2,aR);
+ }
+ if (eKind==OBJ_CCUT) { // Kreisabschnitt noch die Sehne und die MaeuseEcke (Dreieck) testen
+ if (IsRectTouchesLine(aP1,aP2,aR)) bRet=TRUE; // die Sehne
+ else if (bFilled) { // und nun die Maeusescke
+ Polygon aPoly(XOutCreatePolygon(GetXPoly(),NULL));
+ bRet=IsPointInsidePoly(aPoly,rPnt);
+ }
+ }
+ }
+ }
+ }
+ if (!bRet && HasText()) bRet=SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer)!=NULL;
+ return bRet ? (SdrObject*)this : NULL;
+}
+
+void SdrCircObj::TakeObjNameSingul(XubString& rName) const
+{
+ USHORT nID=STR_ObjNameSingulCIRC;
+ if (aRect.GetWidth()==aRect.GetHeight() && aGeo.nShearWink==0) {
+ switch (eKind) {
+ case OBJ_CIRC: nID=STR_ObjNameSingulCIRC; break;
+ case OBJ_SECT: nID=STR_ObjNameSingulSECT; break;
+ case OBJ_CARC: nID=STR_ObjNameSingulCARC; break;
+ case OBJ_CCUT: nID=STR_ObjNameSingulCCUT; break;
+ }
+ } else {
+ switch (eKind) {
+ case OBJ_CIRC: nID=STR_ObjNameSingulCIRCE; break;
+ case OBJ_SECT: nID=STR_ObjNameSingulSECTE; break;
+ case OBJ_CARC: nID=STR_ObjNameSingulCARCE; break;
+ case OBJ_CCUT: nID=STR_ObjNameSingulCCUTE; break;
+ }
+ }
+ rName=ImpGetResStr(nID);
+}
+
+void SdrCircObj::TakeObjNamePlural(XubString& rName) const
+{
+ USHORT nID=STR_ObjNamePluralCIRC;
+ if (aRect.GetWidth()==aRect.GetHeight() && aGeo.nShearWink==0) {
+ switch (eKind) {
+ case OBJ_CIRC: nID=STR_ObjNamePluralCIRC; break;
+ case OBJ_SECT: nID=STR_ObjNamePluralSECT; break;
+ case OBJ_CARC: nID=STR_ObjNamePluralCARC; break;
+ case OBJ_CCUT: nID=STR_ObjNamePluralCCUT; break;
+ }
+ } else {
+ switch (eKind) {
+ case OBJ_CIRC: nID=STR_ObjNamePluralCIRCE; break;
+ case OBJ_SECT: nID=STR_ObjNamePluralSECTE; break;
+ case OBJ_CARC: nID=STR_ObjNamePluralCARCE; break;
+ case OBJ_CCUT: nID=STR_ObjNamePluralCCUTE; break;
+ }
+ }
+ rName=ImpGetResStr(nID);
+}
+
+void SdrCircObj::operator=(const SdrObject& rObj)
+{
+ SdrRectObj::operator=(rObj);
+ nStartWink=((SdrCircObj&)rObj).nStartWink;
+ nEndWink =((SdrCircObj&)rObj).nEndWink;
+ aPnt1 =((SdrCircObj&)rObj).aPnt1;
+ aPnt2 =((SdrCircObj&)rObj).aPnt2;
+ pCircAttr=(SdrCircSetItem*)ImpSetNewAttr(pCircAttr,((SdrCircObj&)rObj).pCircAttr);
+}
+
+void SdrCircObj::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL bDetail) const
+{
+ XPolygon aP(ImpCalcXPoly(aRect,nStartWink,nEndWink));
+ if (!bXPolyIsLine) { // Polygon schliessen
+ USHORT n=aP.GetPointCount();
+ Point aPnt(aP[0]);
+ aP[n]=aPnt;
+ }
+ rPoly=XPolyPolygon(aP);
+}
+
+void SdrCircObj::TakeContour(XPolyPolygon& rPoly) const
+{
+ // am 14.1.97 wg. Umstellung TakeContour ueber Mtf und Paint. Joe.
+ SdrRectObj::TakeContour(rPoly);
+}
+
+void SdrCircObj::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+class ImpCircUser
+{
+public:
+ Rectangle aR;
+ Point aCenter;
+ Point aRadius;
+ Point aP1;
+ Point aP2;
+ long nMaxRad;
+ long nHgt;
+ long nWdt;
+ long nStart;
+ long nEnd;
+ FASTBOOL bRight; // noch nicht implementiert
+
+public:
+ ImpCircUser()
+ : nMaxRad(0),
+ nHgt(0),
+ nWdt(0),
+ nStart(0),
+ nEnd(0),
+ bRight(FALSE)
+ {}
+ void SetCreateParams(SdrDragStat& rStat);
+};
+
+USHORT SdrCircObj::GetHdlCount() const
+{
+ if (eKind!=OBJ_CIRC) {
+ return 10;
+ } else {
+ return 8;
+ }
+}
+
+SdrHdl* SdrCircObj::GetHdl(USHORT nHdlNum) const
+{
+ if (eKind==OBJ_CIRC) nHdlNum+=2; // Keine Winkelhandles fuer den Vollkreis
+ SdrHdl* pH=NULL;
+ Point aPnt;
+ SdrHdlKind eKind=HDL_MOVE;
+ USHORT nPNum=0;
+ switch (nHdlNum) {
+ case 0: aPnt=aPnt1; eKind=HDL_CIRC; nPNum=1; break; // StartWink
+ case 1: aPnt=aPnt2; eKind=HDL_CIRC; nPNum=2; break; // EndWink
+ case 2: aPnt=aRect.TopLeft(); eKind=HDL_UPLFT; break; // Oben links
+ case 3: aPnt=aRect.TopCenter(); eKind=HDL_UPPER; break; // Oben
+ case 4: aPnt=aRect.TopRight(); eKind=HDL_UPRGT; break; // Oben rechts
+ case 5: aPnt=aRect.LeftCenter(); eKind=HDL_LEFT ; break; // Links
+ case 6: aPnt=aRect.RightCenter(); eKind=HDL_RIGHT; break; // Rechts
+ case 7: aPnt=aRect.BottomLeft(); eKind=HDL_LWLFT; break; // Unten links
+ case 8: aPnt=aRect.BottomCenter(); eKind=HDL_LOWER; break; // Unten
+ case 9: aPnt=aRect.BottomRight(); eKind=HDL_LWRGT; break; // Unten rechts
+ }
+ if (aGeo.nShearWink!=0) ShearPoint(aPnt,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoint(aPnt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ if (eKind!=HDL_MOVE) {
+ pH=new SdrHdl(aPnt,eKind);
+ pH->SetPointNum(nPNum);
+ pH->SetObj((SdrObject*)this);
+ pH->SetDrehWink(aGeo.nDrehWink);
+ }
+ return pH;
+}
+
+FASTBOOL SdrCircObj::HasSpecialDrag() const
+{
+ return TRUE;
+}
+
+FASTBOOL SdrCircObj::BegDrag(SdrDragStat& rDrag) const
+{
+ FASTBOOL bWink=rDrag.GetHdl()!=NULL && rDrag.GetHdl()->GetKind()==HDL_CIRC;
+ FASTBOOL bOk=bWink;
+ if (bWink) {
+ long* pWink=new long;
+ *pWink=0;
+ rDrag.SetUser(pWink);
+ if (rDrag.GetHdl()->GetPointNum()==1 || rDrag.GetHdl()->GetPointNum()==2) {
+ rDrag.SetNoSnap(TRUE);
+ }
+ } else {
+ bOk=SdrTextObj::BegDrag(rDrag);
+ }
+ return bOk;
+}
+
+FASTBOOL SdrCircObj::MovDrag(SdrDragStat& rDrag) const
+{
+ FASTBOOL bWink=rDrag.GetHdl()!=NULL && rDrag.GetHdl()->GetKind()==HDL_CIRC;
+ if (bWink) {
+ Point aPt(rDrag.GetNow());
+ // Unrotate:
+ if (aGeo.nDrehWink!=0) RotatePoint(aPt,aRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin fuer Umkehrung
+ // Unshear:
+ if (aGeo.nShearWink!=0) ShearPoint(aPt,aRect.TopLeft(),-aGeo.nTan); // -tan fuer Umkehrung
+ aPt-=aRect.Center();
+ long nWdt=aRect.Right()-aRect.Left();
+ long nHgt=aRect.Bottom()-aRect.Top();
+ if (nWdt>=nHgt) {
+ aPt.Y()=BigMulDiv(aPt.Y(),nWdt,nHgt);
+ } else {
+ aPt.X()=BigMulDiv(aPt.X(),nHgt,nWdt);
+ }
+ long nWink=NormAngle360(GetAngle(aPt));
+ if (rDrag.GetView()!=NULL && rDrag.GetView()->IsAngleSnapEnabled()) {
+ long nSA=rDrag.GetView()->GetSnapAngle();
+ if (nSA!=0) { // Winkelfang
+ nWink+=nSA/2;
+ nWink/=nSA;
+ nWink*=nSA;
+ nWink=NormAngle360(nWink);
+ }
+ }
+ long* pWink=(long*)(rDrag.GetUser());
+ if (*pWink!=nWink) {
+ *pWink=nWink;
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+ } else {
+ return SdrTextObj::MovDrag(rDrag);
+ }
+}
+
+FASTBOOL SdrCircObj::EndDrag(SdrDragStat& rDrag)
+{
+ FASTBOOL bWink=rDrag.GetHdl()!=NULL && rDrag.GetHdl()->GetKind()==HDL_CIRC;
+ if (bWink) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ long nWink=*((long*)(rDrag.GetUser()));
+ if (rDrag.GetHdl()->GetPointNum()==1) nStartWink=nWink;
+ if (rDrag.GetHdl()->GetPointNum()==2) nEndWink=nWink;
+ SetRectsDirty();
+ SetXPolyDirty();
+ ImpSetCircInfoToAttr();
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ return TRUE;
+ } else {
+ return SdrTextObj::EndDrag(rDrag);
+ }
+}
+
+void SdrCircObj::BrkDrag(SdrDragStat& rDrag) const
+{
+ SdrTextObj::BrkDrag(rDrag);
+}
+
+XubString SdrCircObj::GetDragComment(const SdrDragStat& rDrag, FASTBOOL bUndoDragComment, FASTBOOL bCreateComment) const
+{
+ if(bCreateComment)
+ {
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_ViewCreateObj, aStr);
+ UINT32 nPntAnz(rDrag.GetPointAnz());
+
+ if(eKind != OBJ_CIRC && nPntAnz > 2)
+ {
+ ImpCircUser* pU = (ImpCircUser*)rDrag.GetUser();
+ INT32 nWink;
+
+ aStr.AppendAscii(" (");
+
+ if(nPntAnz == 3)
+ nWink = pU->nStart;
+ else
+ nWink = pU->nEnd;
+
+ aStr += GetWinkStr(nWink,FALSE);
+ aStr += sal_Unicode(')');
+ }
+ return aStr;
+ }
+
+ BOOL bWink(rDrag.GetHdl() && rDrag.GetHdl()->GetKind() == HDL_CIRC);
+
+ if(bWink)
+ {
+ XubString aStr;
+ INT32 nWink(*((long*)(rDrag.GetUser())));
+
+ ImpTakeDescriptionStr(STR_DragCircAngle, aStr);
+ aStr.AppendAscii(" (");
+ aStr += GetWinkStr(nWink,FALSE);
+ aStr += sal_Unicode(')');
+
+ return aStr;
+ }
+ else
+ {
+ return SdrTextObj::GetDragComment(rDrag, bUndoDragComment, FALSE);
+ }
+}
+
+void SdrCircObj::TakeDragPoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rXPP.Clear();
+ FASTBOOL bWink=rDrag.GetHdl()!=NULL && rDrag.GetHdl()->GetKind()==HDL_CIRC;
+ long a=nStartWink;
+ long e=nEndWink;
+ if (bWink) {
+ long nWink=*((long*)(rDrag.GetUser()));
+ if (rDrag.GetHdl()->GetPointNum()==1) a=nWink;
+ else e=nWink;
+ }
+ Rectangle aTmpRect(bWink ? aRect : ImpDragCalcRect(rDrag));
+ XPolygon aXP(ImpCalcXPoly(aTmpRect,a,e));
+ if (!bXPolyIsLine) { // Polygon schliessen
+ USHORT n=aXP.GetPointCount();
+ Point aPnt(aXP[0]);
+ aXP[n]=aPnt;
+ }
+ rXPP.Insert(aXP);
+}
+
+void ImpCircUser::SetCreateParams(SdrDragStat& rStat)
+{
+ rStat.TakeCreateRect(aR);
+ aR.Justify();
+ aCenter=aR.Center();
+ nWdt=aR.Right()-aR.Left();
+ nHgt=aR.Bottom()-aR.Top();
+ nMaxRad=((nWdt>nHgt ? nWdt : nHgt)+1) /2;
+ nStart=0;
+ nEnd=36000;
+ if (rStat.GetPointAnz()>2) {
+ Point aP(rStat.GetPoint(2)-aCenter);
+ if (nWdt==0) aP.X()=0;
+ if (nHgt==0) aP.Y()=0;
+ if (nWdt>=nHgt) {
+ if (nHgt!=0) aP.Y()=aP.Y()*nWdt/nHgt;
+ } else {
+ if (nWdt!=0) aP.X()=aP.X()*nHgt/nWdt;
+ }
+ nStart=NormAngle360(GetAngle(aP));
+ if (rStat.GetView()!=NULL && rStat.GetView()->IsAngleSnapEnabled()) {
+ long nSA=rStat.GetView()->GetSnapAngle();
+ if (nSA!=0) { // Winkelfang
+ nStart+=nSA/2;
+ nStart/=nSA;
+ nStart*=nSA;
+ nStart=NormAngle360(nStart);
+ }
+ }
+ SetWinkPnt(aR,nStart,aP1);
+ nEnd=nStart;
+ aP2=aP1;
+ } else aP1=aCenter;
+ if (rStat.GetPointAnz()>3) {
+ Point aP(rStat.GetPoint(3)-aCenter);
+ if (nWdt>=nHgt) {
+ aP.Y()=BigMulDiv(aP.Y(),nWdt,nHgt);
+ } else {
+ aP.X()=BigMulDiv(aP.X(),nHgt,nWdt);
+ }
+ nEnd=NormAngle360(GetAngle(aP));
+ if (rStat.GetView()!=NULL && rStat.GetView()->IsAngleSnapEnabled()) {
+ long nSA=rStat.GetView()->GetSnapAngle();
+ if (nSA!=0) { // Winkelfang
+ nEnd+=nSA/2;
+ nEnd/=nSA;
+ nEnd*=nSA;
+ nEnd=NormAngle360(nEnd);
+ }
+ }
+ SetWinkPnt(aR,nEnd,aP2);
+ } else aP2=aCenter;
+}
+
+void SdrCircObj::ImpSetCreateParams(SdrDragStat& rStat) const
+{
+ ImpCircUser* pU=(ImpCircUser*)rStat.GetUser();
+ if (pU==NULL) {
+ pU=new ImpCircUser;
+ rStat.SetUser(pU);
+ }
+ pU->SetCreateParams(rStat);
+}
+
+FASTBOOL SdrCircObj::BegCreate(SdrDragStat& rStat)
+{
+ rStat.SetOrtho4Possible();
+ ImpSetCreateParams(rStat);
+ return TRUE;
+}
+
+FASTBOOL SdrCircObj::MovCreate(SdrDragStat& rStat)
+{
+ ImpSetCreateParams(rStat);
+ ImpCircUser* pU=(ImpCircUser*)rStat.GetUser();
+ rStat.SetActionRect(pU->aR);
+ aRect=pU->aR; // fuer ObjName
+ ImpJustifyRect(aRect);
+ nStartWink=pU->nStart;
+ nEndWink=pU->nEnd;
+ bBoundRectDirty=TRUE;
+ bSnapRectDirty=TRUE;
+ SetXPolyDirty();
+ return TRUE;
+}
+
+FASTBOOL SdrCircObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+{
+ ImpSetCreateParams(rStat);
+ ImpCircUser* pU=(ImpCircUser*)rStat.GetUser();
+ FASTBOOL bRet=FALSE;
+ if (eCmd==SDRCREATE_FORCEEND && rStat.GetPointAnz()<4) eKind=OBJ_CIRC;
+ if (eKind==OBJ_CIRC) {
+ bRet=rStat.GetPointAnz()>=2;
+ if (bRet) {
+ aRect=pU->aR;
+ ImpJustifyRect(aRect);
+ }
+ } else {
+ rStat.SetNoSnap(rStat.GetPointAnz()>=2);
+ rStat.SetOrtho4Possible(rStat.GetPointAnz()<2);
+ bRet=rStat.GetPointAnz()>=4;
+ if (bRet) {
+ aRect=pU->aR;
+ ImpJustifyRect(aRect);
+ nStartWink=pU->nStart;
+ nEndWink=pU->nEnd;
+ }
+ }
+ bClosedObj=eKind!=OBJ_CARC;
+ SetRectsDirty();
+ SetXPolyDirty();
+ ImpSetCircInfoToAttr();
+ if (bRet) {
+ delete pU;
+ rStat.SetUser(NULL);
+ }
+ return bRet;
+}
+
+void SdrCircObj::BrkCreate(SdrDragStat& rStat)
+{
+ ImpCircUser* pU=(ImpCircUser*)rStat.GetUser();
+ delete pU;
+ rStat.SetUser(NULL);
+}
+
+FASTBOOL SdrCircObj::BckCreate(SdrDragStat& rStat)
+{
+ rStat.SetNoSnap(rStat.GetPointAnz()>=3);
+ rStat.SetOrtho4Possible(rStat.GetPointAnz()<3);
+ return eKind!=OBJ_CIRC;
+}
+
+void SdrCircObj::TakeCreatePoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rXPP.Clear();
+ ImpCircUser* pU=(ImpCircUser*)rDrag.GetUser();
+ if (eKind==OBJ_CIRC || rDrag.GetPointAnz()<4) {
+ rXPP.Insert(XPolygon(pU->aCenter,pU->aR.GetWidth()/2,pU->aR.GetHeight()/2));
+ if (rDrag.GetPointAnz()==3) {
+ XPolygon aXP(2);
+ aXP[0]=pU->aCenter;
+ aXP[1]=pU->aP1;
+ rXPP.Insert(aXP);
+ }
+ } else {
+ XPolygon aXP(ImpCalcXPoly(pU->aR,pU->nStart,pU->nEnd));
+ if (!bXPolyIsLine) { // Polygon schliessen
+ USHORT n=aXP.GetPointCount();
+ Point aPnt(aXP[0]);
+ aXP[n]=aPnt;
+ }
+ rXPP.Insert(aXP);
+ }
+}
+
+Pointer SdrCircObj::GetCreatePointer() const
+{
+ switch (eKind) {
+ case OBJ_CIRC: return Pointer(POINTER_DRAW_ELLIPSE);
+ case OBJ_SECT: return Pointer(POINTER_DRAW_PIE);
+ case OBJ_CARC: return Pointer(POINTER_DRAW_ARC);
+ case OBJ_CCUT: return Pointer(POINTER_DRAW_CIRCLECUT);
+ } // switch
+ return Pointer(POINTER_CROSS);
+}
+
+void SdrCircObj::NbcMove(const Size& aSiz)
+{
+ MoveRect(aRect,aSiz);
+ MoveRect(aOutRect,aSiz);
+ MoveRect(aSnapRect,aSiz);
+ MovePoint(aPnt1,aSiz);
+ MovePoint(aPnt2,aSiz);
+ SetXPolyDirty();
+ SetRectsDirty(TRUE);
+}
+
+void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ long nWink0=aGeo.nDrehWink;
+ FASTBOOL bNoShearRota=(aGeo.nDrehWink==0 && aGeo.nShearWink==0);
+ SdrTextObj::NbcResize(rRef,xFact,yFact);
+ bNoShearRota|=(aGeo.nDrehWink==0 && aGeo.nShearWink==0);
+ if (eKind!=OBJ_CIRC) {
+ FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0);
+ FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0);
+ if (bXMirr || bYMirr) {
+ // bei bXMirr!=bYMirr muessten eigentlich noch die beiden
+ // Linienende vertauscht werden. Das ist jedoch mal wieder
+ // schlecht (wg. zwangslaeufiger harter Formatierung).
+ // Alternativ koennte ein bMirrored-Flag eingefuehrt werden
+ // (Vielleicht ja mal grundsaetzlich, auch fuer gepiegelten Text, ...).
+ long nS0=nStartWink;
+ long nE0=nEndWink;
+ if (bNoShearRota) {
+ // Das RectObj spiegelt bei VMirror bereits durch durch 180deg Drehung.
+ if (! (bXMirr && bYMirr)) {
+ long nTmp=nS0;
+ nS0=18000-nE0;
+ nE0=18000-nTmp;
+ }
+ } else { // Spiegeln fuer verzerrte Ellipsen
+ if (bXMirr!=bYMirr) {
+ nS0+=nWink0;
+ nE0+=nWink0;
+ if (bXMirr) {
+ long nTmp=nS0;
+ nS0=18000-nE0;
+ nE0=18000-nTmp;
+ }
+ if (bYMirr) {
+ long nTmp=nS0;
+ nS0=-nE0;
+ nE0=-nTmp;
+ }
+ nS0-=aGeo.nDrehWink;
+ nE0-=aGeo.nDrehWink;
+ }
+ }
+ long nWinkDif=nE0-nS0;
+ nStartWink=NormAngle360(nS0);
+ nEndWink =NormAngle360(nE0);
+ if (nWinkDif==36000) nEndWink+=nWinkDif; // Vollkreis
+ }
+ }
+ SetXPolyDirty();
+ ImpSetCircInfoToAttr();
+}
+
+void SdrCircObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ SdrTextObj::NbcShear(rRef,nWink,tn,bVShear);
+ SetXPolyDirty();
+ ImpSetCircInfoToAttr();
+}
+
+void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2)
+{
+ long nWink0=aGeo.nDrehWink;
+ FASTBOOL bFreeMirr=eKind!=OBJ_CIRC;
+ Point aTmpPt1;
+ Point aTmpPt2;
+ if (bFreeMirr) { // bei freier Spiegelachse einige Vorbereitungen Treffen
+ Point aCenter(aRect.Center());
+ long nWdt=aRect.GetWidth()-1;
+ long nHgt=aRect.GetHeight()-1;
+ long nMaxRad=((nWdt>nHgt ? nWdt : nHgt)+1) /2;
+ double a;
+ // Startpunkt
+ a=nStartWink*nPi180;
+ aTmpPt1=Point(Round(cos(a)*nMaxRad),-Round(sin(a)*nMaxRad));
+ if (nWdt==0) aTmpPt1.X()=0;
+ if (nHgt==0) aTmpPt1.Y()=0;
+ aTmpPt1+=aCenter;
+ // Endpunkt
+ a=nEndWink*nPi180;
+ aTmpPt2=Point(Round(cos(a)*nMaxRad),-Round(sin(a)*nMaxRad));
+ if (nWdt==0) aTmpPt2.X()=0;
+ if (nHgt==0) aTmpPt2.Y()=0;
+ aTmpPt2+=aCenter;
+ if (aGeo.nDrehWink!=0) {
+ RotatePoint(aTmpPt1,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ RotatePoint(aTmpPt2,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ }
+ if (aGeo.nShearWink!=0) {
+ ShearPoint(aTmpPt1,aRect.TopLeft(),aGeo.nTan);
+ ShearPoint(aTmpPt2,aRect.TopLeft(),aGeo.nTan);
+ }
+ }
+ SdrTextObj::NbcMirror(rRef1,rRef2);
+ if (eKind!=OBJ_CIRC) { // Anpassung von Start- und Endwinkel
+ MirrorPoint(aTmpPt1,rRef1,rRef2);
+ MirrorPoint(aTmpPt2,rRef1,rRef2);
+ // Unrotate:
+ if (aGeo.nDrehWink!=0) {
+ RotatePoint(aTmpPt1,aRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin fuer Umkehrung
+ RotatePoint(aTmpPt2,aRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin fuer Umkehrung
+ }
+ // Unshear:
+ if (aGeo.nShearWink!=0) {
+ ShearPoint(aTmpPt1,aRect.TopLeft(),-aGeo.nTan); // -tan fuer Umkehrung
+ ShearPoint(aTmpPt2,aRect.TopLeft(),-aGeo.nTan); // -tan fuer Umkehrung
+ }
+ Point aCenter(aRect.Center());
+ aTmpPt1-=aCenter;
+ aTmpPt2-=aCenter;
+ // Weil gespiegelt sind die Winkel nun auch noch vertauscht
+ nStartWink=GetAngle(aTmpPt2);
+ nEndWink =GetAngle(aTmpPt1);
+ long nWinkDif=nEndWink-nStartWink;
+ nStartWink=NormAngle360(nStartWink);
+ nEndWink =NormAngle360(nEndWink);
+ if (nWinkDif==36000) nEndWink+=nWinkDif; // Vollkreis
+ }
+ SetXPolyDirty();
+ ImpSetCircInfoToAttr();
+}
+
+SdrObjGeoData* SdrCircObj::NewGeoData() const
+{
+ return new SdrCircObjGeoData;
+}
+
+void SdrCircObj::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ SdrRectObj::SaveGeoData(rGeo);
+ SdrCircObjGeoData& rCGeo=(SdrCircObjGeoData&)rGeo;
+ rCGeo.nStartWink=nStartWink;
+ rCGeo.nEndWink =nEndWink;
+}
+
+void SdrCircObj::RestGeoData(const SdrObjGeoData& rGeo)
+{
+ SdrRectObj::RestGeoData(rGeo);
+ SdrCircObjGeoData& rCGeo=(SdrCircObjGeoData&)rGeo;
+ nStartWink=rCGeo.nStartWink;
+ nEndWink =rCGeo.nEndWink;
+ SetXPolyDirty();
+ ImpSetCircInfoToAttr();
+}
+
+void Union(Rectangle& rR, const Point& rP)
+{
+ if (rP.X()<rR.Left ()) rR.Left ()=rP.X();
+ if (rP.X()>rR.Right ()) rR.Right ()=rP.X();
+ if (rP.Y()<rR.Top ()) rR.Top ()=rP.Y();
+ if (rP.Y()>rR.Bottom()) rR.Bottom()=rP.Y();
+}
+
+void SdrCircObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+{
+ rRect=aRect;
+ if (eKind!=OBJ_CIRC) {
+ SetWinkPnt(rRect,nStartWink,((SdrCircObj*)(this))->aPnt1);
+ SetWinkPnt(rRect,nEndWink ,((SdrCircObj*)(this))->aPnt2);
+ long a=nStartWink;
+ long e=nEndWink;
+ rRect.Left ()=aRect.Right();
+ rRect.Right ()=aRect.Left();
+ rRect.Top ()=aRect.Bottom();
+ rRect.Bottom()=aRect.Top();
+ Union(rRect,aPnt1);
+ Union(rRect,aPnt2);
+ if ((a<=18000 && e>=18000) || (a>e && (a<=18000 || e>=18000))) {
+ Union(rRect,aRect.LeftCenter());
+ }
+ if ((a<=27000 && e>=27000) || (a>e && (a<=27000 || e>=27000))) {
+ Union(rRect,aRect.BottomCenter());
+ }
+ if (a>e) {
+ Union(rRect,aRect.RightCenter());
+ }
+ if ((a<=9000 && e>=9000) || (a>e && (a<=9000 || e>=9000))) {
+ Union(rRect,aRect.TopCenter());
+ }
+ if (eKind==OBJ_SECT) {
+ Union(rRect,aRect.Center());
+ }
+ if (aGeo.nDrehWink!=0) {
+ Point aDst(rRect.TopLeft());
+ aDst-=aRect.TopLeft();
+ Point aDst0(aDst);
+ RotatePoint(aDst,Point(),aGeo.nSin,aGeo.nCos);
+ aDst-=aDst0;
+ rRect.Move(aDst.X(),aDst.Y());
+ }
+ }
+ if (aGeo.nShearWink!=0) {
+ long nDst=Round((rRect.Bottom()-rRect.Top())*aGeo.nTan);
+ if (aGeo.nShearWink>0) {
+ Point aRef(rRect.TopLeft());
+ rRect.Left()-=nDst;
+ Point aTmpPt(rRect.TopLeft());
+ RotatePoint(aTmpPt,aRef,aGeo.nSin,aGeo.nCos);
+ aTmpPt-=rRect.TopLeft();
+ rRect.Move(aTmpPt.X(),aTmpPt.Y());
+ } else {
+ rRect.Right()-=nDst;
+ }
+ }
+}
+
+void SdrCircObj::RecalcSnapRect()
+{
+ if (PaintNeedsXPoly()) {
+ aSnapRect=GetXPoly().GetBoundRect();
+ } else {
+ TakeUnrotatedSnapRect(aSnapRect);
+ }
+}
+
+void SdrCircObj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || eKind!=OBJ_CIRC) {
+ Rectangle aSR0(GetSnapRect());
+ long nWdt0=aSR0.Right()-aSR0.Left();
+ long nHgt0=aSR0.Bottom()-aSR0.Top();
+ long nWdt1=rRect.Right()-rRect.Left();
+ long nHgt1=rRect.Bottom()-rRect.Top();
+ NbcResize(aSnapRect.TopLeft(),Fraction(nWdt1,nWdt0),Fraction(nHgt1,nHgt0));
+ NbcMove(Size(rRect.Left()-aSR0.Left(),rRect.Top()-aSR0.Top()));
+ } else {
+ aRect=rRect;
+ ImpJustifyRect(aRect);
+ }
+ SetRectsDirty();
+ SetXPolyDirty();
+ ImpSetCircInfoToAttr();
+}
+
+USHORT SdrCircObj::GetSnapPointCount() const
+{
+ if (eKind==OBJ_CIRC) {
+ return 1;
+ } else {
+ return 3;
+ }
+}
+
+Point SdrCircObj::GetSnapPoint(USHORT i) const
+{
+ switch (i) {
+ case 1 : return aPnt1;
+ case 2 : return aPnt2;
+ default: return aRect.Center();
+ }
+}
+
+void __EXPORT SdrCircObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ SetXPolyDirty();
+ SdrRectObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+ ImpSetAttrToCircInfo();
+}
+
+void SdrCircObj::ForceDefaultAttr(SfxItemPool* pPool)
+{
+ SdrRectObj::ForceDefaultAttr(pPool);
+ if (pPool!=NULL) {
+ if (pCircAttr==NULL) {
+ SdrCircKind eKindA=SDRCIRC_FULL;
+ if (eKind==OBJ_SECT) eKindA=SDRCIRC_SECT;
+ else if (eKind==OBJ_CARC) eKindA=SDRCIRC_ARC;
+ else if (eKind==OBJ_CCUT) eKindA=SDRCIRC_CUT;
+ SdrCircSetItem aSetItem(pPool);
+ SfxItemSet& rSet=aSetItem.GetItemSet();
+ if (eKindA!=SDRCIRC_FULL) {
+ rSet.Put(SdrCircKindItem(eKindA));
+ if (nStartWink!=0) rSet.Put(SdrCircStartAngleItem(nStartWink));
+ if (nEndWink!=36000) rSet.Put(SdrCircEndAngleItem(nEndWink));
+ }
+ pCircAttr=(SdrCircSetItem*)ImpSetNewAttr(pCircAttr,&aSetItem,FALSE);
+ }
+ }
+}
+
+USHORT SdrCircObj::GetSetItemCount() const
+{
+ return 1+SdrRectObj::GetSetItemCount();
+}
+
+const SfxSetItem* SdrCircObj::GetSetItem(USHORT nNum) const
+{
+ if (nNum==0) return pCircAttr;
+ nNum--;
+ return SdrRectObj::GetSetItem(nNum);
+}
+
+void SdrCircObj::SetSetItem(USHORT nNum, const SfxSetItem* pAttr)
+{
+ if (nNum==0) {
+ pCircAttr=(const SdrCircSetItem*)pAttr;
+ } else {
+ nNum--;
+ SdrRectObj::SetSetItem(nNum,pAttr);
+ }
+}
+
+SfxSetItem* SdrCircObj::MakeNewSetItem(USHORT nNum, FASTBOOL bClone) const
+{
+ if (nNum==0) {
+ if (bClone && pCircAttr!=NULL) return new SdrCircSetItem(*pCircAttr);
+ else return new SdrCircSetItem(GetItemPool());
+ } else {
+ nNum--;
+ return SdrRectObj::MakeNewSetItem(nNum,bClone);
+ }
+}
+
+void SdrCircObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ SetXPolyDirty();
+ SdrRectObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+ ImpSetAttrToCircInfo();
+}
+
+void SdrCircObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ SetXPolyDirty();
+ SdrRectObj::NbcSetAttributes(rAttr,bReplaceAll);
+ ImpSetAttrToCircInfo();
+}
+
+void SdrCircObj::ImpSetAttrToCircInfo()
+{
+ if (pCircAttr!=NULL) {
+ const SfxItemSet& rSet=pCircAttr->GetItemSet();
+ SdrCircKind eNewKindA=((SdrCircKindItem&)rSet.Get(SDRATTR_CIRCKIND)).GetValue();
+ SdrObjKind eNewKind=eKind;
+ if (eNewKindA==SDRCIRC_FULL) eNewKind=OBJ_CIRC;
+ else if (eNewKindA==SDRCIRC_SECT) eNewKind=OBJ_SECT;
+ else if (eNewKindA==SDRCIRC_ARC) eNewKind=OBJ_CARC;
+ else if (eNewKindA==SDRCIRC_CUT) eNewKind=OBJ_CCUT;
+ long nNewStart=((SdrCircStartAngleItem&)rSet.Get(SDRATTR_CIRCSTARTANGLE)).GetValue();
+ long nNewEnd=((SdrCircEndAngleItem&)rSet.Get(SDRATTR_CIRCENDANGLE)).GetValue();
+ FASTBOOL bKindChg=eKind!=eNewKind;
+ FASTBOOL bWinkChg=nNewStart!=nStartWink || nNewEnd!=nEndWink;
+ if (bKindChg || bWinkChg) {
+ eKind=eNewKind;
+ nStartWink=nNewStart;
+ nEndWink=nNewEnd;
+ if (bKindChg || (eKind!=OBJ_CIRC && bWinkChg)) {
+ SetXPolyDirty();
+ SetRectsDirty();
+ }
+ }
+ }
+}
+
+void SdrCircObj::ImpSetCircInfoToAttr()
+{
+ if (pCircAttr!=NULL) {
+ const SfxItemSet& rOldSet=pCircAttr->GetItemSet();
+ SdrCircKind eNewKindA=SDRCIRC_FULL;
+ if (eKind==OBJ_SECT) eNewKindA=SDRCIRC_SECT;
+ else if (eKind==OBJ_CARC) eNewKindA=SDRCIRC_ARC;
+ else if (eKind==OBJ_CCUT) eNewKindA=SDRCIRC_CUT;
+ SdrCircKind eOldKindA=((SdrCircKindItem&)rOldSet.Get(SDRATTR_CIRCKIND)).GetValue();
+ long nOldStartWink=((SdrCircStartAngleItem&)rOldSet.Get(SDRATTR_CIRCSTARTANGLE)).GetValue();
+ long nOldEndWink=((SdrCircEndAngleItem&)rOldSet.Get(SDRATTR_CIRCENDANGLE)).GetValue();
+ if (eNewKindA!=eOldKindA || nStartWink!=nOldStartWink || nEndWink!=nOldEndWink) {
+ SdrCircSetItem aSI(*pCircAttr);
+ SfxItemSet& rNewSet=aSI.GetItemSet();
+ if (eNewKindA!=eOldKindA) rNewSet.Put(SdrCircKindItem(eNewKindA));
+ if (nStartWink!=nOldStartWink) rNewSet.Put(SdrCircStartAngleItem(nStartWink));
+ if (nEndWink!=nOldEndWink) rNewSet.Put(SdrCircEndAngleItem(nEndWink));
+ pCircAttr=(SdrCircSetItem*)ImpSetNewAttr(pCircAttr,&aSI);
+ }
+ }
+}
+
+SdrObject* SdrCircObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ XPolygon aXP(ImpCalcXPoly(aRect,nStartWink,nEndWink));
+ SdrObjKind ePathKind=OBJ_PATHFILL;
+ FASTBOOL bFill=TRUE;
+ if (eKind==OBJ_CARC) bFill=FALSE;
+ SdrObject* pRet=ImpConvertMakeObj(XPolyPolygon(aXP),bFill,bBezier);
+ pRet=ImpConvertAddText(pRet,bBezier);
+ return pRet;
+}
+
+void SdrCircObj::WriteData(SvStream& rOut) const
+{
+ SdrRectObj::WriteData(rOut);
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrCircObj");
+#endif
+ if (eKind!=OBJ_CIRC) {
+ rOut<<nStartWink;
+ rOut<<nEndWink;
+ }
+ SfxItemPool* pPool=GetItemPool();
+ if (pPool!=NULL) {
+ pPool->StoreSurrogate(rOut,pCircAttr);
+ } else {
+ rOut<<UINT16(SFX_ITEMS_NULL);
+ }
+}
+
+void SdrCircObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ SdrRectObj::ReadData(rHead,rIn);
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrCircObj");
+#endif
+ if (eKind!=OBJ_CIRC) {
+ rIn>>nStartWink;
+ rIn>>nEndWink;
+ }
+ if (aCompat.GetBytesLeft()>0) {
+ SfxItemPool* pPool=GetItemPool();
+ if (pPool!=NULL) {
+ pCircAttr=(const SdrCircSetItem*)ImpSetNewAttr(pCircAttr,NULL); // ggf altes rauswerfen
+ USHORT nWhichRef=SDRATTRSET_CIRC;
+ pCircAttr=(const SdrCircSetItem*)pPool->LoadSurrogate(rIn,nWhichRef,0);
+ if (pStyleSheet!=NULL && pCircAttr!=NULL) {
+ ((SfxItemSet*)&pCircAttr->GetItemSet())->SetParent(&pStyleSheet->GetItemSet());
+ }
+ } else {
+ UINT16 nSuroDum;
+ rIn>>nSuroDum;
+ }
+ } else {
+ // create pCircAttr for old Objects to let ImpSetCircInfoToAttr() do it's work
+ SdrCircKind eKindA(SDRCIRC_FULL);
+
+ if(eKind == OBJ_SECT)
+ eKindA = SDRCIRC_SECT;
+ else if(eKind == OBJ_CARC)
+ eKindA=SDRCIRC_ARC;
+ else if(eKind == OBJ_CCUT)
+ eKindA=SDRCIRC_CUT;
+
+ SfxItemPool* pPool = GetItemPool();
+ SdrCircSetItem aSetItem(pPool);
+ SfxItemSet& rSet = aSetItem.GetItemSet();
+
+ if(eKindA != SDRCIRC_FULL)
+ {
+ rSet.Put(SdrCircKindItem(eKindA));
+ if(nStartWink != 0)
+ rSet.Put(SdrCircStartAngleItem(nStartWink));
+ if(nEndWink != 36000)
+ rSet.Put(SdrCircEndAngleItem(nEndWink));
+ }
+ pCircAttr = (SdrCircSetItem*)ImpSetNewAttr(pCircAttr, &aSetItem, FALSE);
+ }
+}
+
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
new file mode 100644
index 0000000000..45cffab61b
--- /dev/null
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -0,0 +1,2525 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdoedge.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdoedge.hxx"
+#include "xpool.hxx"
+#include "xpoly.hxx"
+#include "svdattrx.hxx"
+#include "svdpool.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdpagv.hxx"
+#include "svdview.hxx"
+#include "svdxout.hxx"
+#include "svddrag.hxx"
+#include "svddrgv.hxx"
+#include "svddrgm1.hxx"
+#include "svdhdl.hxx"
+#include "svdtouch.hxx"
+#include "svdtrans.hxx"
+#include "svdetc.hxx"
+#include "svdio.hxx"
+#include "svdsuro.hxx"
+#include "svdglob.hxx" // StringCache
+#include "svdstr.hrc" // Objektname
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _SFXSMPLHINT_HXX //autogen
+#include <svtools/smplhint.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrObjConnection::~SdrObjConnection()
+{
+ if (pSuro!=NULL) delete pSuro;
+}
+
+void SdrObjConnection::ResetVars()
+{
+ pSuro=NULL;
+ pObj=NULL;
+ nConId=0;
+ nXDist=0;
+ nYDist=0;
+ bBestConn=TRUE;
+ bBestVertex=TRUE;
+ bXDistOvr=FALSE;
+ bYDistOvr=FALSE;
+ bAutoVertex=FALSE;
+ bAutoCorner=FALSE;
+}
+
+FASTBOOL SdrObjConnection::TakeGluePoint(SdrGluePoint& rGP, FASTBOOL bSetAbsPos) const
+{
+ FASTBOOL bRet=FALSE;
+ if (pObj!=NULL) { // Ein Obj muss schon angedockt sein!
+ if (bAutoVertex) {
+ rGP=pObj->GetVertexGluePoint(nConId);
+ bRet=TRUE;
+ } else if (bAutoCorner) {
+ rGP=pObj->GetCornerGluePoint(nConId);
+ bRet=TRUE;
+ } else {
+ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+ if (pGPL!=NULL) {
+ USHORT nNum=pGPL->FindGluePoint(nConId);
+ if (nNum!=SDRGLUEPOINT_NOTFOUND) {
+ rGP=(*pGPL)[nNum];
+ bRet=TRUE;
+ }
+ }
+ }
+ }
+ if (bRet && bSetAbsPos) {
+ Point aPt(rGP.GetAbsolutePos(*pObj));
+ aPt+=aObjOfs;
+ rGP.SetPos(aPt);
+ }
+ return bRet;
+}
+
+void SdrObjConnection::Write(SvStream& rOut, const SdrObject* pEdgeObj) const
+{
+ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOConnID); // ab V11 eingepackt
+ SdrObjSurrogate aSuro(pObj,pEdgeObj);
+ rOut<<aSuro;
+ rOut<<nConId;
+ rOut<<nXDist;
+ rOut<<nYDist;
+ BOOL bTmp;
+ bTmp=bBestConn; rOut<<bTmp;
+ bTmp=bBestVertex; rOut<<bTmp;
+ bTmp=bXDistOvr; rOut<<bTmp;
+ bTmp=bYDistOvr; rOut<<bTmp;
+ bTmp=bAutoVertex; rOut<<bTmp;
+ bTmp=bAutoCorner; rOut<<bTmp;
+ UINT32 nReserve=0;
+ rOut<<nReserve;
+ rOut<<nReserve;
+}
+
+void SdrObjConnection::Read(SvStream& rIn, const SdrObject* pEdgeObj)
+{
+ if (rIn.GetError()!=0) return;
+ SdrIOHeader aHead(rIn,STREAM_READ,SdrIOConnID); // ab V11 eingepackt
+ pSuro=new SdrObjSurrogate(*pEdgeObj,rIn);
+ BOOL bBit;
+ rIn>>nConId;
+ rIn>>nXDist;
+ rIn>>nYDist;
+ rIn>>bBit; bBestConn =bBit;
+ rIn>>bBit; bBestVertex=bBit;
+ rIn>>bBit; bXDistOvr =bBit;
+ rIn>>bBit; bYDistOvr =bBit;
+ rIn>>bBit; bAutoVertex=bBit;
+ rIn>>bBit; bAutoCorner=bBit;
+ UINT32 nReserve;
+ rIn>>nReserve;
+ rIn>>nReserve;
+}
+
+void SdrObjConnection::ReadTilV10(SvStream& rIn, const SdrObject* pEdgeObj)
+{
+ if (rIn.GetError()!=0) return;
+ pSuro=new SdrObjSurrogate(*pEdgeObj,rIn);
+ BOOL bBit;
+ rIn>>nConId;
+ rIn>>nXDist;
+ rIn>>nYDist;
+ rIn>>bBit; bBestConn =bBit;
+ rIn>>bBit; bBestVertex=bBit;
+ rIn>>bBit; bXDistOvr =bBit;
+ rIn>>bBit; bYDistOvr =bBit;
+ rIn>>bBit; bAutoVertex=bBit;
+ rIn>>bBit; bAutoCorner=bBit;
+ UINT32 nReserve;
+ rIn>>nReserve;
+ rIn>>nReserve;
+}
+
+void SdrObjConnection::AfterRead(const SdrObject* pEdgeObj)
+{
+ if (pSuro!=NULL) {
+ pObj=pSuro->GetObject();
+ delete pSuro;
+ pSuro=NULL;
+ }
+}
+
+Point& SdrEdgeInfoRec::ImpGetLineVersatzPoint(SdrEdgeLineCode eLineCode)
+{
+ switch (eLineCode) {
+ case OBJ1LINE2 : return aObj1Line2;
+ case OBJ1LINE3 : return aObj1Line3;
+ case OBJ2LINE2 : return aObj2Line2;
+ case OBJ2LINE3 : return aObj2Line3;
+ case MIDDLELINE: return aMiddleLine;
+ } // switch
+ return aMiddleLine;
+}
+
+USHORT SdrEdgeInfoRec::ImpGetPolyIdx(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const
+{
+ switch (eLineCode) {
+ case OBJ1LINE2 : return 1;
+ case OBJ1LINE3 : return 2;
+ case OBJ2LINE2 : return rXP.GetPointCount()-3;
+ case OBJ2LINE3 : return rXP.GetPointCount()-4;
+ case MIDDLELINE: return nMiddleLine;
+ } // switch
+ return 0;
+}
+
+FASTBOOL SdrEdgeInfoRec::ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const
+{
+ USHORT nIdx=ImpGetPolyIdx(eLineCode,rXP);
+ FASTBOOL bHorz=nAngle1==0 || nAngle1==18000;
+ if (eLineCode==OBJ2LINE2 || eLineCode==OBJ2LINE3) {
+ nIdx=rXP.GetPointCount()-nIdx; // #36314#
+ bHorz=nAngle2==0 || nAngle2==18000; // #52000#
+ }
+ if ((nIdx & 1)==1) bHorz=!bHorz;
+ return bHorz;
+}
+
+void SdrEdgeInfoRec::ImpSetLineVersatz(SdrEdgeLineCode eLineCode, const XPolygon& rXP, long nVal)
+{
+ Point& rPt=ImpGetLineVersatzPoint(eLineCode);
+ if (ImpIsHorzLine(eLineCode,rXP)) rPt.Y()=nVal;
+ else rPt.X()=nVal;
+}
+
+long SdrEdgeInfoRec::ImpGetLineVersatz(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const
+{
+ const Point& rPt=ImpGetLineVersatzPoint(eLineCode);
+ if (ImpIsHorzLine(eLineCode,rXP)) return rPt.Y();
+ else return rPt.X();
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrEdgeInfoRec& rEI)
+{
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrEdgeInfoRec");
+#endif
+ rOut<<rEI.aObj1Line2;
+ rOut<<rEI.aObj1Line3;
+ rOut<<rEI.aObj2Line2;
+ rOut<<rEI.aObj2Line3;
+ rOut<<rEI.aMiddleLine;
+ rOut<<rEI.nAngle1;
+ rOut<<rEI.nAngle2;
+ rOut<<rEI.nObj1Lines;
+ rOut<<rEI.nObj2Lines;
+ rOut<<rEI.nMiddleLine;
+ rOut<<rEI.cOrthoForm;
+ return rOut;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrEdgeInfoRec& rEI)
+{
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrEdgeInfoRec");
+#endif
+ rIn>>rEI.aObj1Line2;
+ rIn>>rEI.aObj1Line3;
+ rIn>>rEI.aObj2Line2;
+ rIn>>rEI.aObj2Line3;
+ rIn>>rEI.aMiddleLine;
+ rIn>>rEI.nAngle1;
+ rIn>>rEI.nAngle2;
+ rIn>>rEI.nObj1Lines;
+ rIn>>rEI.nObj2Lines;
+ rIn>>rEI.nMiddleLine;
+ rIn>>rEI.cOrthoForm;
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#define GETEDGEKIND (pEdgeAttr==NULL ? SDREDGE_ORTHOLINES : \
+ ((SdrEdgeKindItem&)(pEdgeAttr->GetItemSet().Get(SDRATTR_EDGEKIND))).GetValue())
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrEdgeObj,SdrTextObj);
+
+SdrEdgeObj::SdrEdgeObj():
+ SdrTextObj()
+{
+ bClosedObj=FALSE;
+ bIsEdge=TRUE;
+ bEdgeTrackDirty=FALSE;
+ bTmpDirtyOnAfterRead=FALSE;
+ nNotifyingCount=0;
+ pEdgeTrack=new XPolygon;
+ pEdgeAttr=NULL;
+}
+
+SdrEdgeObj::~SdrEdgeObj()
+{
+ DisconnectFromNode(TRUE);
+ DisconnectFromNode(FALSE);
+ delete pEdgeTrack;
+ pEdgeAttr=(SdrEdgeSetItem*)ImpSetNewAttr(pEdgeAttr,NULL,FALSE);
+}
+
+void SdrEdgeObj::ForceDefaultAttr(SfxItemPool* pPool)
+{
+ SdrTextObj::ForceDefaultAttr(pPool);
+ if (pPool!=NULL) {
+ if (pEdgeAttr==NULL) {
+ SdrEdgeSetItem aSetItem(pPool);
+ pEdgeAttr=(SdrEdgeSetItem*)ImpSetNewAttr(pEdgeAttr,&aSetItem,FALSE);
+ }
+ }
+}
+
+USHORT SdrEdgeObj::GetSetItemCount() const
+{
+ return 1+SdrTextObj::GetSetItemCount();
+}
+
+const SfxSetItem* SdrEdgeObj::GetSetItem(USHORT nNum) const
+{
+ if (nNum==0) return pEdgeAttr;
+ nNum--;
+ return SdrTextObj::GetSetItem(nNum);
+}
+
+void SdrEdgeObj::SetSetItem(USHORT nNum, const SfxSetItem* pAttr)
+{
+ if (nNum==0) {
+ pEdgeAttr=(const SdrEdgeSetItem*)pAttr;
+ bEdgeTrackDirty=TRUE;
+ } else {
+ nNum--;
+ SdrTextObj::SetSetItem(nNum,pAttr);
+ }
+}
+
+SfxSetItem* SdrEdgeObj::MakeNewSetItem(USHORT nNum, FASTBOOL bClone) const
+{
+ if (nNum==0) {
+ if (bClone && pEdgeAttr!=NULL) return new SdrEdgeSetItem(*pEdgeAttr);
+ else return new SdrEdgeSetItem(GetItemPool());
+ } else {
+ nNum--;
+ return SdrTextObj::MakeNewSetItem(nNum,bClone);
+ }
+}
+
+void SdrEdgeObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ SdrTextObj::NbcSetAttributes(rAttr,bReplaceAll);
+ ImpSetAttrToEdgeInfo(); // Werte vom Pool nach aEdgeInfo kopieren
+}
+
+void SdrEdgeObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ SdrTextObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+ ImpSetAttrToEdgeInfo(); // Werte vom Pool nach aEdgeInfo kopieren
+}
+
+void SdrEdgeObj::ImpSetAttrToEdgeInfo()
+{
+ if (pEdgeAttr!=NULL) {
+ SdrEdgeKind eKind=GETEDGEKIND;
+ const SfxItemSet& rSet=pEdgeAttr->GetItemSet();
+ long nVal1=((SdrEdgeLine1DeltaItem&)rSet.Get(SDRATTR_EDGELINE1DELTA)).GetValue();
+ long nVal2=((SdrEdgeLine2DeltaItem&)rSet.Get(SDRATTR_EDGELINE2DELTA)).GetValue();
+ long nVal3=((SdrEdgeLine3DeltaItem&)rSet.Get(SDRATTR_EDGELINE3DELTA)).GetValue();
+ if (eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) {
+ long nVals[3]={nVal1,nVal2,nVal3};
+ USHORT n=0;
+ if (aEdgeInfo.nObj1Lines>=2 && n<3) {
+ aEdgeInfo.ImpSetLineVersatz(OBJ1LINE2,*pEdgeTrack,nVals[n]);
+ n++;
+ }
+ if (aEdgeInfo.nObj1Lines>=3 && n<3) {
+ aEdgeInfo.ImpSetLineVersatz(OBJ1LINE3,*pEdgeTrack,nVals[n]);
+ n++;
+ }
+ if (aEdgeInfo.nMiddleLine!=0xFFFF && n<3) {
+ aEdgeInfo.ImpSetLineVersatz(MIDDLELINE,*pEdgeTrack,nVals[n]);
+ n++;
+ }
+ if (aEdgeInfo.nObj2Lines>=3 && n<3) {
+ aEdgeInfo.ImpSetLineVersatz(OBJ2LINE3,*pEdgeTrack,nVals[n]);
+ n++;
+ }
+ if (aEdgeInfo.nObj2Lines>=2 && n<3) {
+ aEdgeInfo.ImpSetLineVersatz(OBJ2LINE2,*pEdgeTrack,nVals[n]);
+ n++;
+ }
+ bEdgeTrackDirty=TRUE;
+ } else if (eKind==SDREDGE_THREELINES) {
+ FASTBOOL bHor1=aEdgeInfo.nAngle1==0 || aEdgeInfo.nAngle1==18000;
+ FASTBOOL bHor2=aEdgeInfo.nAngle2==0 || aEdgeInfo.nAngle2==18000;
+ if (bHor1) {
+ aEdgeInfo.aObj1Line2.X()=nVal1;
+ } else {
+ aEdgeInfo.aObj1Line2.Y()=nVal1;
+ }
+ if (bHor2) {
+ aEdgeInfo.aObj2Line2.X()=nVal2;
+ } else {
+ aEdgeInfo.aObj2Line2.Y()=nVal2;
+ }
+ }
+ }
+}
+
+void SdrEdgeObj::ImpSetEdgeInfoToAttr()
+{
+ if (pEdgeAttr!=NULL) {
+ SdrEdgeKind eKind=GETEDGEKIND;
+ const SfxItemSet& rSet=pEdgeAttr->GetItemSet();
+ long nValAnz=((SdrEdgeLineDeltaAnzItem&)rSet.Get(SDRATTR_EDGELINEDELTAANZ)).GetValue();
+ long nVal1=((SdrEdgeLine1DeltaItem&)rSet.Get(SDRATTR_EDGELINE1DELTA)).GetValue();
+ long nVal2=((SdrEdgeLine2DeltaItem&)rSet.Get(SDRATTR_EDGELINE2DELTA)).GetValue();
+ long nVal3=((SdrEdgeLine3DeltaItem&)rSet.Get(SDRATTR_EDGELINE3DELTA)).GetValue();
+ long nVals[3]={nVal1,nVal2,nVal3};
+ USHORT n=0;
+ if (eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) {
+ if (aEdgeInfo.nObj1Lines>=2 && n<3) {
+ nVals[n]=aEdgeInfo.ImpGetLineVersatz(OBJ1LINE2,*pEdgeTrack);
+ n++;
+ }
+ if (aEdgeInfo.nObj1Lines>=3 && n<3) {
+ nVals[n]=aEdgeInfo.ImpGetLineVersatz(OBJ1LINE3,*pEdgeTrack);
+ n++;
+ }
+ if (aEdgeInfo.nMiddleLine!=0xFFFF && n<3) {
+ nVals[n]=aEdgeInfo.ImpGetLineVersatz(MIDDLELINE,*pEdgeTrack);
+ n++;
+ }
+ if (aEdgeInfo.nObj2Lines>=3 && n<3) {
+ nVals[n]=aEdgeInfo.ImpGetLineVersatz(OBJ2LINE3,*pEdgeTrack);
+ n++;
+ }
+ if (aEdgeInfo.nObj2Lines>=2 && n<3) {
+ nVals[n]=aEdgeInfo.ImpGetLineVersatz(OBJ2LINE2,*pEdgeTrack);
+ n++;
+ }
+ } else if (eKind==SDREDGE_THREELINES) {
+ FASTBOOL bHor1=aEdgeInfo.nAngle1==0 || aEdgeInfo.nAngle1==18000;
+ FASTBOOL bHor2=aEdgeInfo.nAngle2==0 || aEdgeInfo.nAngle2==18000;
+ n=2;
+ nVals[0]=bHor1 ? aEdgeInfo.aObj1Line2.X() : aEdgeInfo.aObj1Line2.Y();
+ nVals[1]=bHor2 ? aEdgeInfo.aObj2Line2.X() : aEdgeInfo.aObj2Line2.Y();
+ }
+ if (n!=nValAnz || nVals[0]!=nVal1 || nVals[1]!=nVal2 || nVals[2]!=nVal3) {
+ SdrEdgeSetItem aSI(*pEdgeAttr);
+ SfxItemSet& rNewSet=aSI.GetItemSet();
+ if (n!=nValAnz) rNewSet.Put(SdrEdgeLineDeltaAnzItem(n));
+ if (nVals[0]!=nVal1) rNewSet.Put(SdrEdgeLine1DeltaItem(nVals[0]));
+ if (nVals[1]!=nVal2) rNewSet.Put(SdrEdgeLine2DeltaItem(nVals[1]));
+ if (nVals[2]!=nVal3) rNewSet.Put(SdrEdgeLine3DeltaItem(nVals[2]));
+ if (n<3) rNewSet.ClearItem(SDRATTR_EDGELINE3DELTA);
+ if (n<2) rNewSet.ClearItem(SDRATTR_EDGELINE2DELTA);
+ if (n<1) rNewSet.ClearItem(SDRATTR_EDGELINE1DELTA);
+ pEdgeAttr=(SdrEdgeSetItem*)ImpSetNewAttr(pEdgeAttr,&aSI);
+ }
+ }
+}
+
+void SdrEdgeObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ rInfo.bRotateFreeAllowed=FALSE;
+ rInfo.bRotate90Allowed =FALSE;
+ rInfo.bMirrorFreeAllowed=FALSE;
+ rInfo.bMirror45Allowed =FALSE;
+ rInfo.bMirror90Allowed =FALSE;
+ rInfo.bTransparenceAllowed = FALSE;
+ rInfo.bGradientAllowed = FALSE;
+ rInfo.bShearAllowed =FALSE;
+ FASTBOOL bCanConv=!HasText() || ImpCanConvTextToCurve();
+ rInfo.bCanConvToPath=bCanConv;
+ rInfo.bCanConvToPoly=bCanConv;
+ rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
+}
+
+UINT16 SdrEdgeObj::GetObjIdentifier() const
+{
+ return UINT16(OBJ_EDGE);
+}
+
+const Rectangle& SdrEdgeObj::GetBoundRect() const
+{
+ if (bEdgeTrackDirty) {
+ ((SdrEdgeObj*)this)->ImpRecalcEdgeTrack();
+ }
+ return SdrTextObj::GetBoundRect();
+}
+
+const Rectangle& SdrEdgeObj::GetSnapRect() const
+{
+ if (bEdgeTrackDirty) {
+ ((SdrEdgeObj*)this)->ImpRecalcEdgeTrack();
+ }
+ return SdrTextObj::GetSnapRect();
+}
+
+void SdrEdgeObj::RecalcSnapRect()
+{
+ aSnapRect=pEdgeTrack->GetBoundRect();
+}
+
+void SdrEdgeObj::RecalcBoundRect()
+{
+ aOutRect=GetSnapRect();
+ long nLineWdt=ImpGetLineWdt();
+ // Linienenden beruecksichtigen
+ long nLEndWdt=ImpGetLineEndAdd();
+ if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt;
+ if (nLineWdt!=0) {
+ aOutRect.Left ()-=nLineWdt;
+ aOutRect.Top ()-=nLineWdt;
+ aOutRect.Right ()+=nLineWdt;
+ aOutRect.Bottom()+=nLineWdt;
+ }
+ ImpAddShadowToBoundRect();
+ ImpAddTextToBoundRect();
+}
+
+void SdrEdgeObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+{
+ rRect=GetSnapRect();
+}
+
+FASTBOOL SdrEdgeObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ // Hidden objects on masterpages, draw nothing
+ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+ return TRUE;
+
+ FASTBOOL bHideContour=IsHideContour();
+
+ // prepare ItemSet of this object
+ SfxItemSet aSet((SfxItemPool&)(*GetItemPool()));
+ TakeAttributes(aSet, FALSE, TRUE);
+
+ // perepare ItemSet to avoid old XOut line drawing
+ XLineAttrSetItem aXLSet((SfxItemPool*)GetItemPool());
+ aXLSet.GetItemSet().Put(XLineStyleItem(XLINE_NONE));
+
+ // prepare line geometry
+ ImpLineGeometry* pLineGeometry = ImpPrepareLineGeometry(rXOut, aSet);
+
+ // Shadows
+ if (!bHideContour && ImpSetShadowAttributes(rXOut,TRUE)) {
+ UINT32 nXDist=((SdrShadowXDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWXDIST))).GetValue();
+ UINT32 nYDist=((SdrShadowYDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWYDIST))).GetValue();
+ XPolygon aXP(*pEdgeTrack);
+ aXP.Move(nXDist,nYDist);
+
+ // avoid shadow line drawing in XOut
+ rXOut.SetLineAttr(aXLSet);
+
+ rXOut.DrawXPolyLine(aXP);
+
+ // new shadow line drawing
+ if(pLineGeometry)
+ {
+ // draw the line geometry
+ ImpDrawShadowLineGeometry(rXOut, aSet, *pLineGeometry);
+ }
+ }
+
+ // Before here the LineAttr were set: if(pLineAttr) rXOut.SetLineAttr(*pLineAttr);
+ rXOut.SetLineAttr(aXLSet);
+
+ if(bHideContour && pFillAttr)
+ rXOut.SetFillAttr(*pFillAttr);
+
+ if (!bHideContour) {
+ FASTBOOL bDraw=TRUE;
+ if (bDraw) rXOut.DrawXPolyLine(*pEdgeTrack);
+ }
+
+ // Own line drawing
+ if(!bHideContour && pLineGeometry)
+ {
+ // draw the line geometry
+ ImpDrawColorLineGeometry(rXOut, aSet, *pLineGeometry);
+ }
+
+ FASTBOOL bOk=TRUE;
+ if (HasText()) {
+ bOk=SdrTextObj::Paint(rXOut,rInfoRec);
+ }
+ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {
+ bOk=PaintGluePoints(rXOut,rInfoRec);
+ }
+
+ // throw away line geometry
+ if(pLineGeometry)
+ delete pLineGeometry;
+
+ return bOk;
+}
+
+SdrObject* SdrEdgeObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+ INT32 nMyTol=nTol;
+
+ INT32 nWdt=ImpGetLineWdt()/2; // Halbe Strichstaerke
+ if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Linie keine Toleranz noetig
+ Rectangle aR(rPnt,rPnt);
+ aR.Left() -=nMyTol;
+ aR.Right() +=nMyTol;
+ aR.Top() -=nMyTol;
+ aR.Bottom()+=nMyTol;
+
+ FASTBOOL bHit=FALSE;
+
+ Polygon aPoly=XOutCreatePolygon(*pEdgeTrack,NULL);
+ bHit=IsRectTouchesLine(aPoly,aR);
+ if (!bHit && HasText()) bHit=SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer)!=NULL;
+ return bHit ? (SdrObject*)this : NULL;
+}
+
+FASTBOOL SdrEdgeObj::IsNode() const
+{
+ return TRUE;
+}
+
+SdrGluePoint SdrEdgeObj::GetVertexGluePoint(USHORT nNum) const
+{
+ Point aPt;
+ USHORT nPntAnz=pEdgeTrack->GetPointCount();
+ if (nPntAnz>0) {
+ Point aOfs(GetSnapRect().Center());
+ if (nNum==2 && GetConnectedNode(TRUE)==NULL) aPt=(*pEdgeTrack)[0];
+ else if (nNum==3 && GetConnectedNode(FALSE)==NULL) aPt=(*pEdgeTrack)[nPntAnz-1];
+ else {
+ if ((nPntAnz & 1) ==1) {
+ aPt=(*pEdgeTrack)[nPntAnz/2];
+ } else {
+ Point aPt1((*pEdgeTrack)[nPntAnz/2-1]);
+ Point aPt2((*pEdgeTrack)[nPntAnz/2]);
+ aPt1+=aPt2;
+ aPt1.X()/=2;
+ aPt1.Y()/=2;
+ aPt=aPt1;
+ }
+ }
+ aPt-=aOfs;
+ }
+ SdrGluePoint aGP(aPt);
+ aGP.SetPercent(FALSE);
+ return aGP;
+}
+
+SdrGluePoint SdrEdgeObj::GetCornerGluePoint(USHORT nNum) const
+{
+ return GetVertexGluePoint(nNum);
+}
+
+const SdrGluePointList* SdrEdgeObj::GetGluePointList() const
+{
+ return NULL; // Keine benutzerdefinierten Klebepunkte fuer Verbinder #31671#
+}
+
+SdrGluePointList* SdrEdgeObj::ForceGluePointList()
+{
+ return NULL; // Keine benutzerdefinierten Klebepunkte fuer Verbinder #31671#
+}
+
+FASTBOOL SdrEdgeObj::IsEdge() const
+{
+ return TRUE;
+}
+
+void SdrEdgeObj::ConnectToNode(FASTBOOL bTail1, SdrObject* pObj)
+{
+ SdrObjConnection& rCon=GetConnection(bTail1);
+ DisconnectFromNode(bTail1);
+ if (pObj!=NULL) {
+ pObj->AddListener(*this);
+ rCon.pObj=pObj;
+ bEdgeTrackDirty=TRUE;
+ }
+}
+
+void SdrEdgeObj::DisconnectFromNode(FASTBOOL bTail1)
+{
+ SdrObjConnection& rCon=GetConnection(bTail1);
+ if (rCon.pObj!=NULL) {
+ rCon.pObj->RemoveListener(*this);
+ rCon.pObj=NULL;
+ }
+}
+
+SdrObject* SdrEdgeObj::GetConnectedNode(FASTBOOL bTail1) const
+{
+ SdrObject* pObj=GetConnection(bTail1).pObj;
+ if (pObj!=NULL && (pObj->GetPage()!=pPage || !pObj->IsInserted())) pObj=NULL;
+ return pObj;
+}
+
+FASTBOOL SdrEdgeObj::CheckNodeConnection(FASTBOOL bTail1) const
+{
+ FASTBOOL bRet=FALSE;
+ const SdrObjConnection& rCon=GetConnection(bTail1);
+ USHORT nPtAnz=pEdgeTrack->GetPointCount();
+ if (rCon.pObj!=NULL && rCon.pObj->GetPage()==pPage && nPtAnz!=0) {
+ const SdrGluePointList* pGPL=rCon.pObj->GetGluePointList();
+ USHORT nConAnz=pGPL==NULL ? 0 : pGPL->GetCount();
+ USHORT nGesAnz=nConAnz+8;
+ Point aTail(bTail1 ? (*pEdgeTrack)[0] : (*pEdgeTrack)[USHORT(nPtAnz-1)]);
+ for (USHORT i=0; i<nGesAnz && !bRet; i++) {
+ if (i<nConAnz) { // UserDefined
+ bRet=aTail==(*pGPL)[i].GetAbsolutePos(*rCon.pObj);
+ } else if (i<nConAnz+4) { // Vertex
+ SdrGluePoint aPt(rCon.pObj->GetVertexGluePoint(i-nConAnz));
+ bRet=aTail==aPt.GetAbsolutePos(*rCon.pObj);
+ } else { // Corner
+ SdrGluePoint aPt(rCon.pObj->GetCornerGluePoint(i-nConAnz-4));
+ bRet=aTail==aPt.GetAbsolutePos(*rCon.pObj);
+ }
+ }
+ }
+ return bRet;
+}
+
+void SdrEdgeObj::ImpSetTailPoint(FASTBOOL bTail1, const Point& rPt)
+{
+ USHORT nPtAnz=pEdgeTrack->GetPointCount();
+ if (nPtAnz==0) {
+ (*pEdgeTrack)[0]=rPt;
+ (*pEdgeTrack)[1]=rPt;
+ } else if (nPtAnz==1) {
+ if (!bTail1) (*pEdgeTrack)[1]=rPt;
+ else { (*pEdgeTrack)[1]=(*pEdgeTrack)[0]; (*pEdgeTrack)[0]=rPt; }
+ } else {
+ if (!bTail1) (*pEdgeTrack)[USHORT(nPtAnz-1)]=rPt;
+ else (*pEdgeTrack)[0]=rPt;
+ }
+ ImpRecalcEdgeTrack();
+ SetRectsDirty();
+}
+
+void SdrEdgeObj::ImpUndirtyEdgeTrack()
+{
+ if (bEdgeTrackDirty) {
+ ImpRecalcEdgeTrack();
+ }
+}
+
+void SdrEdgeObj::ImpRecalcEdgeTrack()
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=aOutRect; // war vorher =GetBoundRect() #36431#
+ SetRectsDirty();
+ if (!bEdgeTrackDirty) SendRepaintBroadcast();
+ *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo);
+ ImpSetEdgeInfoToAttr(); // Die Werte aus aEdgeInfo in den Pool kopieren
+ bEdgeTrackDirty=FALSE;
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+USHORT SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) const
+{
+ if (pObj==NULL) return SDRESC_ALL;
+ Rectangle aR(pObj->GetSnapRect());
+ long dxl=rPt.X()-aR.Left();
+ long dyo=rPt.Y()-aR.Top();
+ long dxr=aR.Right()-rPt.X();
+ long dyu=aR.Bottom()-rPt.Y();
+ FASTBOOL bxMitt=Abs(dxl-dxr)<2;
+ FASTBOOL byMitt=Abs(dyo-dyu)<2;
+ long dx=Min(dxl,dxr);
+ long dy=Min(dyo,dyu);
+ FASTBOOL bDiag=Abs(dx-dy)<2;
+ if (bxMitt && byMitt) return SDRESC_ALL; // In der Mitte
+ if (bDiag) { // diagonal
+ USHORT nRet=0;
+ if (byMitt) nRet|=SDRESC_VERT;
+ if (bxMitt) nRet|=SDRESC_HORZ;
+ if (dxl<dxr) { // Links
+ if (dyo<dyu) nRet|=SDRESC_LEFT | SDRESC_TOP;
+ else nRet|=SDRESC_LEFT | SDRESC_BOTTOM;
+ } else { // Rechts
+ if (dyo<dyu) nRet|=SDRESC_RIGHT | SDRESC_TOP;
+ else nRet|=SDRESC_RIGHT | SDRESC_BOTTOM;
+ }
+ return nRet;
+ }
+ if (dx<dy) { // waagerecht
+ if (bxMitt) return SDRESC_HORZ;
+ if (dxl<dxr) return SDRESC_LEFT;
+ else return SDRESC_RIGHT;
+ } else { // senkrecht
+ if (byMitt) return SDRESC_VERT;
+ if (dyo<dyu) return SDRESC_TOP;
+ else return SDRESC_BOTTOM;
+ }
+}
+
+FASTBOOL SdrEdgeObj::ImpStripPolyPoints(XPolygon& rXP) const
+{
+ // fehlende Implementation !!!
+ return FALSE;
+}
+
+XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const Rectangle& rRect, const Point& rMeeting) const
+{
+ XPolygon aXP;
+ aXP.Insert(XPOLY_APPEND,rStPt,XPOLY_NORMAL);
+ FASTBOOL bRts=nEscAngle==0;
+ FASTBOOL bObn=nEscAngle==9000;
+ FASTBOOL bLks=nEscAngle==18000;
+ FASTBOOL bUnt=nEscAngle==27000;
+ FASTBOOL bHor=bLks || bRts;
+ FASTBOOL bVer=bObn || bUnt;
+
+ Point aP1(rStPt); // erstmal den Pflichtabstand
+ if (bLks) aP1.X()=rRect.Left();
+ if (bRts) aP1.X()=rRect.Right();
+ if (bObn) aP1.Y()=rRect.Top();
+ if (bUnt) aP1.Y()=rRect.Bottom();
+
+ FASTBOOL bFinish=FALSE;
+ if (!bFinish) {
+ Point aP2(aP1); // Und nun den Pflichtabstand ggf. bis auf Meetinghoehe erweitern
+ if (bLks && rMeeting.X()<=aP2.X()) aP2.X()=rMeeting.X();
+ if (bRts && rMeeting.X()>=aP2.X()) aP2.X()=rMeeting.X();
+ if (bObn && rMeeting.Y()<=aP2.Y()) aP2.Y()=rMeeting.Y();
+ if (bUnt && rMeeting.Y()>=aP2.Y()) aP2.Y()=rMeeting.Y();
+ aXP.Insert(XPOLY_APPEND,aP2,XPOLY_NORMAL);
+
+ Point aP3(aP2);
+ if ((bLks && rMeeting.X()>aP2.X()) || (bRts && rMeeting.X()<aP2.X())) { // Aussenrum
+ if (rMeeting.Y()<aP2.Y()) {
+ aP3.Y()=rRect.Top();
+ if (rMeeting.Y()<aP3.Y()) aP3.Y()=rMeeting.Y();
+ } else {
+ aP3.Y()=rRect.Bottom();
+ if (rMeeting.Y()>aP3.Y()) aP3.Y()=rMeeting.Y();
+ }
+ aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL);
+ if (aP3.Y()!=rMeeting.Y()) {
+ aP3.X()=rMeeting.X();
+ aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL);
+ }
+ }
+ if ((bObn && rMeeting.Y()>aP2.Y()) || (bUnt && rMeeting.Y()<aP2.Y())) { // Aussenrum
+ if (rMeeting.X()<aP2.X()) {
+ aP3.X()=rRect.Left();
+ if (rMeeting.X()<aP3.X()) aP3.X()=rMeeting.X();
+ } else {
+ aP3.X()=rRect.Right();
+ if (rMeeting.X()>aP3.X()) aP3.X()=rMeeting.X();
+ }
+ aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL);
+ if (aP3.X()!=rMeeting.X()) {
+ aP3.Y()=rMeeting.Y();
+ aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL);
+ }
+ }
+ }
+#ifdef DBG_UTIL
+ if (aXP.GetPointCount()>4) {
+ DBG_ERROR("SdrEdgeObj::ImpCalcObjToCenter(): Polygon hat mehr als 4 Punkte!");
+ }
+#endif
+ return aXP;
+}
+
+XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& rCon1, SdrObjConnection& rCon2, SdrEdgeInfoRec* pInfo) const
+{
+ Point aPt1,aPt2;
+ SdrGluePoint aGP1,aGP2;
+ USHORT nEsc1=SDRESC_ALL,nEsc2=SDRESC_ALL;
+ Rectangle aBoundRect1;
+ Rectangle aBoundRect2;
+ Rectangle aBewareRect1;
+ Rectangle aBewareRect2;
+ // Erstmal die alten Endpunkte wiederholen
+ if (rTrack0.GetPointCount()!=0) {
+ aPt1=rTrack0[0];
+ USHORT nSiz=rTrack0.GetPointCount();
+ nSiz--;
+ aPt2=rTrack0[nSiz];
+ } else {
+ if (!aOutRect.IsEmpty()) {
+ aPt1=aOutRect.TopLeft();
+ aPt2=aOutRect.BottomRight();
+ }
+ }
+ FASTBOOL bCon1=rCon1.pObj!=NULL && rCon1.pObj->GetPage()==pPage && rCon1.pObj->IsInserted();
+ FASTBOOL bCon2=rCon2.pObj!=NULL && rCon2.pObj->GetPage()==pPage && rCon2.pObj->IsInserted();
+ if (bCon1) {
+ if (rCon1.pObj==(SdrObject*)this) { // sicherheitshalber Abfragen #44515#
+ aBoundRect1=aOutRect;
+ } else {
+ aBoundRect1=rCon1.pObj->GetBoundRect();
+ }
+ aBoundRect1.Move(rCon1.aObjOfs.X(),rCon1.aObjOfs.Y());
+ aBewareRect1=aBoundRect1;
+ if (pEdgeAttr!=NULL) {
+ const SfxItemSet& rSet=pEdgeAttr->GetItemSet();
+ long nH=((SdrEdgeNode1HorzDistItem&)rSet.Get(SDRATTR_EDGENODE1HORZDIST)).GetValue();
+ long nV=((SdrEdgeNode1VertDistItem&)rSet.Get(SDRATTR_EDGENODE1VERTDIST)).GetValue();
+ aBewareRect1.Left()-=nH;
+ aBewareRect1.Right()+=nH;
+ aBewareRect1.Top()-=nV;
+ aBewareRect1.Bottom()+=nV;
+ } else {
+ aBewareRect1.Left()-=500; aBewareRect1.Right()+=500;
+ aBewareRect1.Top()-=500; aBewareRect1.Bottom()+=500;
+ }
+ } else {
+ aBoundRect1=Rectangle(aPt1,aPt1);
+ aBoundRect1.Move(rCon1.aObjOfs.X(),rCon1.aObjOfs.Y());
+ aBewareRect1=aBoundRect1;
+ }
+ if (bCon2) {
+ if (rCon2.pObj==(SdrObject*)this) { // sicherheitshalber Abfragen #44515#
+ aBoundRect2=aOutRect;
+ } else {
+ aBoundRect2=rCon2.pObj->GetBoundRect();
+ }
+ aBoundRect2.Move(rCon2.aObjOfs.X(),rCon2.aObjOfs.Y());
+ aBewareRect2=aBoundRect2;
+ if (pEdgeAttr!=NULL) {
+ const SfxItemSet& rSet=pEdgeAttr->GetItemSet();
+ long nH=((SdrEdgeNode2HorzDistItem&)rSet.Get(SDRATTR_EDGENODE2HORZDIST)).GetValue();
+ long nV=((SdrEdgeNode2VertDistItem&)rSet.Get(SDRATTR_EDGENODE2VERTDIST)).GetValue();
+ aBewareRect2.Left()-=nH;
+ aBewareRect2.Right()+=nH;
+ aBewareRect2.Top()-=nV;
+ aBewareRect2.Bottom()+=nV;
+ } else {
+ aBewareRect2.Left()-=500; aBewareRect2.Right()+=500;
+ aBewareRect2.Top()-=500; aBewareRect2.Bottom()+=500;
+ }
+ } else {
+ aBoundRect2=Rectangle(aPt2,aPt2);
+ aBoundRect2.Move(rCon2.aObjOfs.X(),rCon2.aObjOfs.Y());
+ aBewareRect2=aBoundRect2;
+ }
+ XPolygon aBestXP;
+ ULONG nBestQual=0xFFFFFFFF;
+ SdrEdgeInfoRec aBestInfo;
+ FASTBOOL bAuto1=bCon1 && rCon1.bBestVertex;
+ FASTBOOL bAuto2=bCon2 && rCon2.bBestVertex;
+ if (bAuto1) rCon1.bAutoVertex=TRUE;
+ if (bAuto2) rCon2.bAutoVertex=TRUE;
+ USHORT nBestAuto1=0;
+ USHORT nBestAuto2=0;
+ USHORT nAnz1=bAuto1 ? 4 : 1;
+ USHORT nAnz2=bAuto2 ? 4 : 1;
+ for (USHORT nNum1=0; nNum1<nAnz1; nNum1++) {
+ if (bAuto1) rCon1.nConId=nNum1;
+ if (bCon1 && rCon1.TakeGluePoint(aGP1,TRUE)) {
+ aPt1=aGP1.GetPos();
+ nEsc1=aGP1.GetEscDir();
+ if (nEsc1==SDRESC_SMART) nEsc1=ImpCalcEscAngle(rCon1.pObj,aPt1-rCon1.aObjOfs);
+ }
+ for (USHORT nNum2=0; nNum2<nAnz2; nNum2++) {
+ if (bAuto2) rCon2.nConId=nNum2;
+ if (bCon2 && rCon2.TakeGluePoint(aGP2,TRUE)) {
+ aPt2=aGP2.GetPos();
+ nEsc2=aGP2.GetEscDir();
+ if (nEsc2==SDRESC_SMART) nEsc2=ImpCalcEscAngle(rCon2.pObj,aPt2-rCon2.aObjOfs);
+ }
+ for (long nA1=0; nA1<36000; nA1+=9000) {
+ USHORT nE1=nA1==0 ? SDRESC_RIGHT : nA1==9000 ? SDRESC_TOP : nA1==18000 ? SDRESC_LEFT : nA1==27000 ? SDRESC_BOTTOM : 0;
+ for (long nA2=0; nA2<36000; nA2+=9000) {
+ USHORT nE2=nA2==0 ? SDRESC_RIGHT : nA2==9000 ? SDRESC_TOP : nA2==18000 ? SDRESC_LEFT : nA2==27000 ? SDRESC_BOTTOM : 0;
+ if ((nEsc1&nE1)!=0 && (nEsc2&nE2)!=0) {
+ ULONG nQual=0;
+ SdrEdgeInfoRec aInfo;
+ if (pInfo!=NULL) aInfo=*pInfo;
+ XPolygon aXP(ImpCalcEdgeTrack(aPt1,nA1,aBoundRect1,aBewareRect1,aPt2,nA2,aBoundRect2,aBewareRect2,&nQual,&aInfo));
+ if (nQual<nBestQual) {
+ aBestXP=aXP;
+ nBestQual=nQual;
+ aBestInfo=aInfo;
+ nBestAuto1=nNum1;
+ nBestAuto2=nNum2;
+ }
+ }
+ }
+ }
+ }
+ }
+ if (bAuto1) rCon1.nConId=nBestAuto1;
+ if (bAuto2) rCon2.nConId=nBestAuto2;
+ if (pInfo!=NULL) *pInfo=aBestInfo;
+ return aBestXP;
+}
+
+XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rectangle& rBoundRect1, const Rectangle& rBewareRect1,
+ const Point& rPt2, long nAngle2, const Rectangle& rBoundRect2, const Rectangle& rBewareRect2,
+ ULONG* pnQuality, SdrEdgeInfoRec* pInfo) const
+{
+ SdrEdgeKind eKind=GETEDGEKIND;
+ FASTBOOL bRts1=nAngle1==0;
+ FASTBOOL bObn1=nAngle1==9000;
+ FASTBOOL bLks1=nAngle1==18000;
+ FASTBOOL bUnt1=nAngle1==27000;
+ FASTBOOL bHor1=bLks1 || bRts1;
+ FASTBOOL bVer1=bObn1 || bUnt1;
+ FASTBOOL bRts2=nAngle2==0;
+ FASTBOOL bObn2=nAngle2==9000;
+ FASTBOOL bLks2=nAngle2==18000;
+ FASTBOOL bUnt2=nAngle2==27000;
+ FASTBOOL bHor2=bLks2 || bRts2;
+ FASTBOOL bVer2=bObn2 || bUnt2;
+ FASTBOOL bInfo=pInfo!=NULL;
+ if (bInfo) {
+ pInfo->cOrthoForm=0;
+ pInfo->nAngle1=nAngle1;
+ pInfo->nAngle2=nAngle2;
+ pInfo->nObj1Lines=1;
+ pInfo->nObj2Lines=1;
+ pInfo->nMiddleLine=0xFFFF;
+ }
+ Point aPt1(rPt1);
+ Point aPt2(rPt2);
+ Rectangle aBoundRect1 (rBoundRect1 );
+ Rectangle aBoundRect2 (rBoundRect2 );
+ Rectangle aBewareRect1(rBewareRect1);
+ Rectangle aBewareRect2(rBewareRect2);
+ Point aMeeting((aPt1.X()+aPt2.X()+1)/2,(aPt1.Y()+aPt2.Y()+1)/2);
+ FASTBOOL bMeetingXMid=TRUE;
+ FASTBOOL bMeetingYMid=TRUE;
+ if (eKind==SDREDGE_ONELINE) {
+ XPolygon aXP(2);
+ aXP[0]=rPt1;
+ aXP[1]=rPt2;
+ if (pnQuality!=NULL) {
+ *pnQuality=Abs(rPt1.X()-rPt2.X())+Abs(rPt1.Y()-rPt2.Y());
+ }
+ return aXP;
+ } else if (eKind==SDREDGE_THREELINES) {
+ XPolygon aXP(4);
+ aXP[0]=rPt1;
+ aXP[1]=rPt1;
+ aXP[2]=rPt2;
+ aXP[3]=rPt2;
+ if (bRts1) aXP[1].X()=aBewareRect1.Right(); //+=500;
+ if (bObn1) aXP[1].Y()=aBewareRect1.Top(); //-=500;
+ if (bLks1) aXP[1].X()=aBewareRect1.Left(); //-=500;
+ if (bUnt1) aXP[1].Y()=aBewareRect1.Bottom(); //+=500;
+ if (bRts2) aXP[2].X()=aBewareRect2.Right(); //+=500;
+ if (bObn2) aXP[2].Y()=aBewareRect2.Top(); //-=500;
+ if (bLks2) aXP[2].X()=aBewareRect2.Left(); //-=500;
+ if (bUnt2) aXP[2].Y()=aBewareRect2.Bottom(); //+=500;
+ if (pnQuality!=NULL) {
+ long nQ=Abs(aXP[1].X()-aXP[0].X())+Abs(aXP[1].Y()-aXP[0].Y());
+ nQ+=Abs(aXP[2].X()-aXP[1].X())+Abs(aXP[2].Y()-aXP[1].Y());
+ nQ+=Abs(aXP[3].X()-aXP[2].X())+Abs(aXP[3].Y()-aXP[2].Y());
+ *pnQuality=nQ;
+ }
+ USHORT n1=1;
+ USHORT n2=1;
+ if (bInfo) {
+ pInfo->nObj1Lines=2;
+ pInfo->nObj2Lines=2;
+ if (bHor1) {
+ aXP[1].X()+=pInfo->aObj1Line2.X();
+ } else {
+ aXP[1].Y()+=pInfo->aObj1Line2.Y();
+ }
+ if (bHor2) {
+ aXP[2].X()+=pInfo->aObj2Line2.X();
+ } else {
+ aXP[2].Y()+=pInfo->aObj2Line2.Y();
+ }
+ }
+ return aXP;
+ }
+ USHORT nIntersections=0;
+ FASTBOOL bForceMeeting=FALSE; // Muss die Linie durch den MeetingPoint laufen?
+ {
+ Point aC1(aBewareRect1.Center());
+ Point aC2(aBewareRect2.Center());
+ if (aBewareRect1.Left()<=aBewareRect2.Right() && aBewareRect1.Right()>=aBewareRect2.Left()) {
+ // Ueberschneidung auf der X-Achse
+ long n1=Max(aBewareRect1.Left(),aBewareRect2.Left());
+ long n2=Min(aBewareRect1.Right(),aBewareRect2.Right());
+ aMeeting.X()=(n1+n2+1)/2;
+ } else {
+ // Ansonsten den Mittelpunkt des Freiraums
+ if (aC1.X()<aC2.X()) {
+ aMeeting.X()=(aBewareRect1.Right()+aBewareRect2.Left()+1)/2;
+ } else {
+ aMeeting.X()=(aBewareRect1.Left()+aBewareRect2.Right()+1)/2;
+ }
+ }
+ if (aBewareRect1.Top()<=aBewareRect2.Bottom() && aBewareRect1.Bottom()>=aBewareRect2.Top()) {
+ // Ueberschneidung auf der Y-Achse
+ long n1=Max(aBewareRect1.Top(),aBewareRect2.Top());
+ long n2=Min(aBewareRect1.Bottom(),aBewareRect2.Bottom());
+ aMeeting.Y()=(n1+n2+1)/2;
+ } else {
+ // Ansonsten den Mittelpunkt des Freiraums
+ if (aC1.Y()<aC2.Y()) {
+ aMeeting.Y()=(aBewareRect1.Bottom()+aBewareRect2.Top()+1)/2;
+ } else {
+ aMeeting.Y()=(aBewareRect1.Top()+aBewareRect2.Bottom()+1)/2;
+ }
+ }
+ // Im Prinzip gibt es 3 zu unterscheidene Faelle:
+ // 1. Beide in die selbe Richtung
+ // 2. Beide in genau entgegengesetzte Richtungen
+ // 3. Einer waagerecht und der andere senkrecht
+ long nXMin=Min(aBewareRect1.Left(),aBewareRect2.Left());
+ long nXMax=Max(aBewareRect1.Right(),aBewareRect2.Right());
+ long nYMin=Min(aBewareRect1.Top(),aBewareRect2.Top());
+ long nYMax=Max(aBewareRect1.Bottom(),aBewareRect2.Bottom());
+ FASTBOOL bBoundOverlap=aBoundRect1.Right()>aBoundRect2.Left() && aBoundRect1.Left()<aBoundRect2.Right() &&
+ aBoundRect1.Bottom()>aBoundRect2.Top() && aBoundRect1.Top()<aBoundRect2.Bottom();
+ FASTBOOL bBewareOverlap=aBewareRect1.Right()>aBewareRect2.Left() && aBewareRect1.Left()<aBewareRect2.Right() &&
+ aBewareRect1.Bottom()>aBewareRect2.Top() && aBewareRect1.Top()<aBewareRect2.Bottom();
+ unsigned nMainCase=3;
+ if (nAngle1==nAngle2) nMainCase=1;
+ else if ((bHor1 && bHor2) || (bVer1 && bVer2)) nMainCase=2;
+ if (nMainCase==1) { // Fall 1: Beide in eine Richtung moeglich.
+ if (bVer1) aMeeting.X()=(aPt1.X()+aPt2.X()+1)/2; // ist hier besser, als der
+ if (bHor1) aMeeting.Y()=(aPt1.Y()+aPt2.Y()+1)/2; // Mittelpunkt des Freiraums
+ // bX1Ok bedeutet, dass die Vertikale, die aus Obj1 austritt, keinen Konflikt mit Obj2 bildet, ...
+ FASTBOOL bX1Ok=aPt1.X()<=aBewareRect2.Left() || aPt1.X()>=aBewareRect2.Right();
+ FASTBOOL bX2Ok=aPt2.X()<=aBewareRect1.Left() || aPt2.X()>=aBewareRect1.Right();
+ FASTBOOL bY1Ok=aPt1.Y()<=aBewareRect2.Top() || aPt1.Y()>=aBewareRect2.Bottom();
+ FASTBOOL bY2Ok=aPt2.Y()<=aBewareRect1.Top() || aPt2.Y()>=aBewareRect1.Bottom();
+ if (bLks1 && (bY1Ok || aBewareRect1.Left()<aBewareRect2.Right()) && (bY2Ok || aBewareRect2.Left()<aBewareRect1.Right())) {
+ aMeeting.X()=nXMin;
+ bMeetingXMid=FALSE;
+ }
+ if (bRts1 && (bY1Ok || aBewareRect1.Right()>aBewareRect2.Left()) && (bY2Ok || aBewareRect2.Right()>aBewareRect1.Left())) {
+ aMeeting.X()=nXMax;
+ bMeetingXMid=FALSE;
+ }
+ if (bObn1 && (bX1Ok || aBewareRect1.Top()<aBewareRect2.Bottom()) && (bX2Ok || aBewareRect2.Top()<aBewareRect1.Bottom())) {
+ aMeeting.Y()=nYMin;
+ bMeetingYMid=FALSE;
+ }
+ if (bUnt1 && (bX1Ok || aBewareRect1.Bottom()>aBewareRect2.Top()) && (bX2Ok || aBewareRect2.Bottom()>aBewareRect1.Top())) {
+ aMeeting.Y()=nYMax;
+ bMeetingYMid=FALSE;
+ }
+ } else if (nMainCase==2) {
+ // Fall 2:
+ bForceMeeting=TRUE;
+ if (bHor1) { // beide waagerecht
+ // 9 Moeglichkeiten: ù ù ù
+ // 2.1 Gegenueber, Ueberschneidung à ´ ù
+ // nur auf der Y-Achse ù ù ù
+ // 2.2, 2.3 Gegenueber, vertikal versetzt. Ã ù ù ù ù ù
+ // Ueberschneidung weder auf der ù ´ ù ù ´ ù
+ // X- noch auf der Y-Achse ù ù ù Ã ù ù
+ // 2.4, 2.5 Untereinander, ù Ã ù ù ù ù
+ // Ueberschneidung ù ´ ù ù ´ ù
+ // nur auf X-Achse ù ù ù ù Ã ù
+ // 2.6, 2.7 Gegeneinander, vertikal versetzt. ù ù Ã ù ù ù
+ // Ueberschneidung weder auf der ù ´ ù ù ´ ù
+ // X- noch auf der Y-Achse. ù ù ù ù ù Ã
+ // 2.8 Gegeneinander. ù ù ù
+ // Ueberschneidung nur ù ´ Ã
+ // auf der Y-Achse. ù ù ù
+ // 2.9 Die BewareRects der Objekte ueberschneiden
+ // sich auf X- und Y-Achse.
+ // Die Faelle gelten entsprechend umgesetzt auch fuer
+ // senkrechte Linienaustritte.
+ // Die Faelle 2.1-2.7 werden mir dem Default-Meeting ausreichend
+ // gut behandelt. Spezielle MeetingPoints werden hier also nur
+ // fuer 2.8 und 2.9 bestimmt.
+
+ // Normalisierung. aR1 soll der nach rechts und
+ // aR2 der nach links austretende sein.
+ Rectangle aBewR1(bRts1 ? aBewareRect1 : aBewareRect2);
+ Rectangle aBewR2(bRts1 ? aBewareRect2 : aBewareRect1);
+ Rectangle aBndR1(bRts1 ? aBoundRect1 : aBoundRect2);
+ Rectangle aBndR2(bRts1 ? aBoundRect2 : aBoundRect1);
+ if (aBewR1.Bottom()>aBewR2.Top() && aBewR1.Top()<aBewR2.Bottom()) {
+ // Ueberschneidung auf der Y-Achse. Faelle 2.1, 2.8, 2.9
+ if (aBewR1.Right()>aBewR2.Left()) {
+ // Faelle 2.8, 2.9
+ // Fall 2.8 ist immer Aussenrumlauf (bDirect=FALSE).
+ // Fall 2.9 kann auch Direktverbindung sein (bei geringer
+ // Ueberschneidung der BewareRects ohne Ueberschneidung der
+ // Boundrects wenn die Linienaustritte sonst das BewareRect
+ // des jeweils anderen Objekts verletzen wuerden.
+ FASTBOOL bCase29Direct=FALSE;
+ FASTBOOL bCase29=aBewR1.Right()>aBewR2.Left();
+ if (aBndR1.Right()<=aBndR2.Left()) { // Fall 2.9 und keine Boundrectueberschneidung
+ if ((aPt1.Y()>aBewareRect2.Top() && aPt1.Y()<aBewareRect2.Bottom()) ||
+ (aPt2.Y()>aBewareRect1.Top() && aPt2.Y()<aBewareRect1.Bottom())) {
+ bCase29Direct=TRUE;
+ }
+ }
+ if (!bCase29Direct) {
+ FASTBOOL bObenLang=Abs(nYMin-aMeeting.Y())<=Abs(nYMax-aMeeting.Y());
+ if (bObenLang) {
+ aMeeting.Y()=nYMin;
+ } else {
+ aMeeting.Y()=nYMax;
+ }
+ bMeetingYMid=FALSE;
+ if (bCase29) {
+ // und nun noch dafuer sorgen, dass das
+ // umzingelte Obj nicht durchquert wird
+ if (aBewR1.Center().Y()<aBewR2.Center().Y() != bObenLang) {
+ aMeeting.X()=aBewR2.Right();
+ } else {
+ aMeeting.X()=aBewR1.Left();
+ }
+ bMeetingXMid=FALSE;
+ }
+ } else {
+ // Direkte Verbindung (3-Linien Z-Verbindung), da
+ // Verletzung der BewareRects unvermeidlich ist.
+ // Via Dreisatz werden die BewareRects nun verkleinert.
+ long nWant1=aBewR1.Right()-aBndR1.Right(); // Abstand bei Obj1
+ long nWant2=aBndR2.Left()-aBewR2.Left(); // Abstand bei Obj2
+ long nSpace=aBndR2.Left()-aBndR1.Right(); // verfuegbarer Platz
+ long nGet1=BigMulDiv(nWant1,nSpace,nWant1+nWant2);
+ long nGet2=nSpace-nGet1;
+ if (bRts1) { // Normalisierung zurueckwandeln
+ aBewareRect1.Right()+=nGet1-nWant1;
+ aBewareRect2.Left()-=nGet2-nWant2;
+ } else {
+ aBewareRect2.Right()+=nGet1-nWant1;
+ aBewareRect1.Left()-=nGet2-nWant2;
+ }
+ nIntersections++; // Qualitaet herabsetzen
+ }
+ }
+ }
+ } else if (bVer1) { // beide senkrecht
+ Rectangle aBewR1(bUnt1 ? aBewareRect1 : aBewareRect2);
+ Rectangle aBewR2(bUnt1 ? aBewareRect2 : aBewareRect1);
+ Rectangle aBndR1(bUnt1 ? aBoundRect1 : aBoundRect2);
+ Rectangle aBndR2(bUnt1 ? aBoundRect2 : aBoundRect1);
+ if (aBewR1.Right()>aBewR2.Left() && aBewR1.Left()<aBewR2.Right()) {
+ // Ueberschneidung auf der Y-Achse. Faelle 2.1, 2.8, 2.9
+ if (aBewR1.Bottom()>aBewR2.Top()) {
+ // Faelle 2.8, 2.9
+ // Fall 2.8 ist immer Aussenrumlauf (bDirect=FALSE).
+ // Fall 2.9 kann auch Direktverbindung sein (bei geringer
+ // Ueberschneidung der BewareRects ohne Ueberschneidung der
+ // Boundrects wenn die Linienaustritte sonst das BewareRect
+ // des jeweils anderen Objekts verletzen wuerden.
+ FASTBOOL bCase29Direct=FALSE;
+ FASTBOOL bCase29=aBewR1.Bottom()>aBewR2.Top();
+ if (aBndR1.Bottom()<=aBndR2.Top()) { // Fall 2.9 und keine Boundrectueberschneidung
+ if ((aPt1.X()>aBewareRect2.Left() && aPt1.X()<aBewareRect2.Right()) ||
+ (aPt2.X()>aBewareRect1.Left() && aPt2.X()<aBewareRect1.Right())) {
+ bCase29Direct=TRUE;
+ }
+ }
+ if (!bCase29Direct) {
+ FASTBOOL bLinksLang=Abs(nXMin-aMeeting.X())<=Abs(nXMax-aMeeting.X());
+ if (bLinksLang) {
+ aMeeting.X()=nXMin;
+ } else {
+ aMeeting.X()=nXMax;
+ }
+ bMeetingXMid=FALSE;
+ if (bCase29) {
+ // und nun noch dafuer sorgen, dass das
+ // umzingelte Obj nicht durchquert wird
+ if (aBewR1.Center().X()<aBewR2.Center().X() != bLinksLang) {
+ aMeeting.Y()=aBewR2.Bottom();
+ } else {
+ aMeeting.Y()=aBewR1.Top();
+ }
+ bMeetingYMid=FALSE;
+ }
+ } else {
+ // Direkte Verbindung (3-Linien Z-Verbindung), da
+ // Verletzung der BewareRects unvermeidlich ist.
+ // Via Dreisatz werden die BewareRects nun verkleinert.
+ long nWant1=aBewR1.Bottom()-aBndR1.Bottom(); // Abstand bei Obj1
+ long nWant2=aBndR2.Top()-aBewR2.Top(); // Abstand bei Obj2
+ long nSpace=aBndR2.Top()-aBndR1.Bottom(); // verfuegbarer Platz
+ long nGet1=BigMulDiv(nWant1,nSpace,nWant1+nWant2);
+ long nGet2=nSpace-nGet1;
+ if (bUnt1) { // Normalisierung zurueckwandeln
+ aBewareRect1.Bottom()+=nGet1-nWant1;
+ aBewareRect2.Top()-=nGet2-nWant2;
+ } else {
+ aBewareRect2.Bottom()+=nGet1-nWant1;
+ aBewareRect1.Top()-=nGet2-nWant2;
+ }
+ nIntersections++; // Qualitaet herabsetzen
+ }
+ }
+ }
+ }
+ } else if (nMainCase==3) { // Fall 3: Einer waagerecht und der andere senkrecht. Sehr viele Fallunterscheidungen
+ // Kleine Legende: ù ú ù ú ù -> Ohne Ueberschneidung, maximal Beruehrung.
+ // ú ú ú ú ú -> Ueberschneidung
+ // ù ú Ã ú ù -> Selbe Hoehe
+ // ú ú ú ú ú -> Ueberschneidung
+ // ù ú ù ú ù -> Ohne Ueberschneidung, maximal Beruehrung.
+ // Linienaustritte links ´, rechts Ã, oben Á und unten Â.
+ // Insgesamt sind 96 Konstellationen moeglich, wobei einige nicht einmal
+ // eindeutig einem Fall und damit einer Behandlungsmethode zugeordnet werden
+ // koennen.
+ // 3.1: Hierzu moegen alle Konstellationen zaehlen, die durch den
+ // Default-MeetingPoint zufriedenstellend abgedeckt sind (20+12).
+ // Â Â Â ú Á Á ú Â Â Â Diese 12 ù ú ù Â ù ù ú ù ú ù ù Â ù ú ù ù ú ù ú ù
+ // ú ú ú ú Á Á ú ú ú ú Konstel. ú ú ú ú ú ú ú ú ú Â ú ú ú ú ú Â ú ú ú ú
+ // ù ú Ã ú ù ù ú ´ ú ù jedoch ù ú Ã ú Á ù ú Ã ú Â Á ú ´ ú ù Â ú ´ ú ù
+ // ú ú ú ú Â Â ú ú ú ú nur zum ú ú ú ú Á ú ú ú ú ú Á ú ú ú ú ú ú ú ú ú
+ // Á Á Á ú Â Â ú Á Á Á Teil: ù ú ù Á ù ù ú ù ú ù ù Á ù ú ù ù ú ù ú ù
+ // Letztere 16 Faelle scheiden aus, sobald sich die Objekte offen
+ // gegenueberstehen (siehe Fall 3.2).
+ // 3.2: Die Objekte stehen sich offen gegenueber und somit ist eine
+ // Verbindung mit lediglich 2 Linien moeglich (4+20).
+ // Dieser Fall hat 1. Prioritaet.
+ // ù ú ù ú Â Â ú ù ú ù Diese 20 ù ú ù Â ù ù Â ù ú ù ù ú ù ú ù ù ú ù ú ù
+ // ú ú ú ú ú ú ú ú ú ú Konstel. ú ú ú Â Â Â Â ú ú ú ú ú ú ú ú ú ú ú ú ú
+ // ù ú Ã ú ù ù ú ´ ú ù jedoch ù ú Ã Á Á Á Á ´ ú ù ù ú Ã Â Â Â Â ´ ú ù
+ // ú ú ú ú ú ú ú ú ú ú nur zum ú ú ú Á Á Á Á ú ú ú ú ú ú ú ú ú ú ú ú ú
+ // ù ú ù ú Á Á ú ù ú ù Teil: ù ú ù Á ù ù Á ù ú ù ù ú ù ú ù ù ú ù ú ù
+ // 3.3: Die Linienaustritte zeigen vom anderen Objekt weg bzw. hinter
+ // dessen Ruecken vorbei (52+4).
+ // Á Á Á Á ù ù Á Á Á Á ù ú ú ú ù ù ú ù ú ù Diese 4 ù ú ù ú ù ù ú ù ú ù
+ // Á Á Á Á ú ú Á Á Á Á Â Â Â ú ú ú ú Â Â Â Konstel. ú ú ú Â ú ú Â ú ú ú
+ // Á Á Ã ú ù ù ú ´ Á Á Â Â Ã ú ù ù ú ´ Â Â jedoch ù ú Ã ú ù ù ú ´ ú ù
+ // Á Á Á ú ú ú ú Á Á Á Â Â Â Â ú ú Â Â Â Â nur zum ú ú ú Á ú ú Á ú ú ú
+ // ù ú ù ú ù ù ú ù ú ù Â Â Â Â ù ù Â Â Â Â Teil: ù ú ù ú ù ù ú ù ú ù
+
+ // Fall 3.2
+ Rectangle aTmpR1(aBewareRect1);
+ Rectangle aTmpR2(aBewareRect2);
+ if (bBewareOverlap) {
+ // Ueberschneidung der BewareRects: BoundRects fuer Check auf Fall 3.2 verwenden.
+ aTmpR1=aBoundRect1;
+ aTmpR2=aBoundRect2;
+ }
+ if ((((bRts1 && aTmpR1.Right ()<=aPt2.X()) || (bLks1 && aTmpR1.Left()>=aPt2.X())) &&
+ ((bUnt2 && aTmpR2.Bottom()<=aPt1.Y()) || (bObn2 && aTmpR2.Top ()>=aPt1.Y()))) ||
+ (((bRts2 && aTmpR2.Right ()<=aPt1.X()) || (bLks2 && aTmpR2.Left()>=aPt1.X())) &&
+ ((bUnt1 && aTmpR1.Bottom()<=aPt2.Y()) || (bObn1 && aTmpR1.Top ()>=aPt2.Y())))) {
+ // Fall 3.2 trifft zu: Verbindung mit lediglich 2 Linien
+ bForceMeeting=TRUE;
+ bMeetingXMid=FALSE;
+ bMeetingYMid=FALSE;
+ if (bHor1) {
+ aMeeting.X()=aPt2.X();
+ aMeeting.Y()=aPt1.Y();
+ } else {
+ aMeeting.X()=aPt1.X();
+ aMeeting.Y()=aPt2.Y();
+ }
+ // Falls Ueberschneidung der BewareRects:
+ aBewareRect1=aTmpR1;
+ aBewareRect2=aTmpR2;
+ } else if ((((bRts1 && aBewareRect1.Right ()>aBewareRect2.Left ()) ||
+ (bLks1 && aBewareRect1.Left ()<aBewareRect2.Right ())) &&
+ ((bUnt2 && aBewareRect2.Bottom()>aBewareRect1.Top ()) ||
+ (bObn2 && aBewareRect2.Top ()<aBewareRect1.Bottom()))) ||
+ (((bRts2 && aBewareRect2.Right ()>aBewareRect1.Left ()) ||
+ (bLks2 && aBewareRect2.Left ()<aBewareRect1.Right ())) &&
+ ((bUnt1 && aBewareRect1.Bottom()>aBewareRect2.Top ()) ||
+ (bObn1 && aBewareRect1.Top ()<aBewareRect2.Bottom())))) {
+ // Fall 3.3
+ bForceMeeting=TRUE;
+ if (bRts1 || bRts2) { aMeeting.X()=nXMax; bMeetingXMid=FALSE; }
+ if (bLks1 || bLks2) { aMeeting.X()=nXMin; bMeetingXMid=FALSE; }
+ if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; bMeetingYMid=FALSE; }
+ if (bObn1 || bObn2) { aMeeting.Y()=nYMin; bMeetingYMid=FALSE; }
+ }
+ }
+ }
+
+ XPolygon aXP1(ImpCalcObjToCenter(aPt1,nAngle1,aBewareRect1,aMeeting));
+ XPolygon aXP2(ImpCalcObjToCenter(aPt2,nAngle2,aBewareRect2,aMeeting));
+ USHORT nXP1Anz=aXP1.GetPointCount();
+ USHORT nXP2Anz=aXP2.GetPointCount();
+ if (bInfo) {
+ pInfo->nObj1Lines=nXP1Anz; if (nXP1Anz>1) pInfo->nObj1Lines--;
+ pInfo->nObj2Lines=nXP2Anz; if (nXP2Anz>1) pInfo->nObj2Lines--;
+ }
+ Point aEP1(aXP1[nXP1Anz-1]);
+ Point aEP2(aXP2[nXP2Anz-1]);
+ FASTBOOL bInsMeetingPoint=aEP1.X()!=aEP2.X() && aEP1.Y()!=aEP2.Y();
+ FASTBOOL bHorzE1=aEP1.Y()==aXP1[nXP1Anz-2].Y(); // letzte Linie von XP1 horizontal?
+ FASTBOOL bHorzE2=aEP2.Y()==aXP2[nXP2Anz-2].Y(); // letzte Linie von XP2 horizontal?
+ if (aEP1==aEP2 && (bHorzE1 && bHorzE2 && aEP1.Y()==aEP2.Y()) || (!bHorzE1 && !bHorzE2 && aEP1.X()==aEP2.X())) {
+ // Sonderbehandlung fuer 'I'-Verbinder
+ nXP1Anz--; aXP1.Remove(nXP1Anz,1);
+ nXP2Anz--; aXP2.Remove(nXP2Anz,1);
+ bMeetingXMid=FALSE;
+ bMeetingYMid=FALSE;
+ }
+ if (bInsMeetingPoint) {
+ aXP1.Insert(XPOLY_APPEND,aMeeting,XPOLY_NORMAL);
+ if (bInfo) {
+ // Durch einfuegen des MeetingPoints kommen 2 weitere Linie hinzu.
+ // Evtl. wird eine von diesen die Mittellinie.
+ if (pInfo->nObj1Lines==pInfo->nObj2Lines) {
+ pInfo->nObj1Lines++;
+ pInfo->nObj2Lines++;
+ } else {
+ if (pInfo->nObj1Lines>pInfo->nObj2Lines) {
+ pInfo->nObj2Lines++;
+ pInfo->nMiddleLine=nXP1Anz-1;
+ } else {
+ pInfo->nObj1Lines++;
+ pInfo->nMiddleLine=nXP1Anz;
+ }
+ }
+ }
+ } else if (bInfo && aEP1!=aEP2 && nXP1Anz+nXP2Anz>=4) {
+ // Durch Verbinden der beiden Enden kommt eine weitere Linie hinzu.
+ // Dies wird die Mittellinie.
+ pInfo->nMiddleLine=nXP1Anz-1;
+ }
+ USHORT nNum=aXP2.GetPointCount();
+ if (aXP1[nXP1Anz-1]==aXP2[nXP2Anz-1] && nXP1Anz>1 && nXP2Anz>1) nNum--;
+ while (nNum>0) {
+ nNum--;
+ aXP1.Insert(XPOLY_APPEND,aXP2[nNum],XPOLY_NORMAL);
+ }
+ USHORT nPntAnz=aXP1.GetPointCount();
+ char cForm=0;
+ if (bInfo || pnQuality!=NULL) {
+ cForm='?';
+ if (nPntAnz==2) cForm='I';
+ else if (nPntAnz==3) cForm='L';
+ else if (nPntAnz==4) { // Z oder U
+ if (nAngle1==nAngle2) cForm='U';
+ else cForm='Z';
+ } else if (nPntAnz==4) { // Ú-¿ Ú-¿
+ // ... -Ù -Ù
+ } else if (nPntAnz==6) { // S oder C oder ...
+ if (nAngle1!=nAngle2) {
+ // Fuer Typ S hat Linie2 dieselbe Richtung wie Linie4.
+ // Bei Typ C sind die beiden genau entgegengesetzt.
+ Point aP1(aXP1[1]);
+ Point aP2(aXP1[2]);
+ Point aP3(aXP1[3]);
+ Point aP4(aXP1[4]);
+ if (aP1.Y()==aP2.Y()) { // beide Linien Horz
+ if (aP1.X()<aP2.X()==aP3.X()<aP4.X()) cForm='S';
+ else cForm='C';
+ } else { // sonst beide Linien Vert
+ if (aP1.Y()<aP2.Y()==aP3.Y()<aP4.Y()) cForm='S';
+ else cForm='C';
+ }
+ } else cForm='4'; // sonst der 3. Fall mit 5 Linien
+ } else cForm='?'; //
+ // Weitere Formen:
+ if (bInfo) {
+#ifdef DBG_UTIL
+ ByteString aMsg;
+#endif
+ pInfo->cOrthoForm=cForm;
+ if (cForm=='I' || cForm=='L' || cForm=='Z' || cForm=='U') {
+#ifdef DBG_UTIL
+ if (pInfo->nObj1Lines!=1) { aMsg+="\n- nObj1Lines korregiert von "; aMsg+=pInfo->nObj1Lines; aMsg+=" auf 1"; }
+ if (pInfo->nObj2Lines!=1) { aMsg+="\n- nObj2Lines korregiert von "; aMsg+=pInfo->nObj1Lines; aMsg+=" auf 1"; }
+#endif
+ pInfo->nObj1Lines=1;
+ pInfo->nObj2Lines=1;
+ if (cForm=='Z' || cForm=='U') {
+#ifdef DBG_UTIL
+ if (pInfo->nMiddleLine!=1) { aMsg+="\n- nMiddleLine korregiert von "; aMsg+=pInfo->nMiddleLine; aMsg+=" auf 1"; }
+#endif
+ pInfo->nMiddleLine=1;
+ } else {
+#ifdef DBG_UTIL
+ if (pInfo->nMiddleLine!=0xFFFF) { aMsg+="\n- nMiddleLine korregiert von "; aMsg+=pInfo->nMiddleLine; aMsg+=" auf 0xFFFF"; }
+#endif
+ pInfo->nMiddleLine=0xFFFF;
+ }
+ } else if (cForm=='S' || cForm=='C') {
+#ifdef DBG_UTIL
+ if (pInfo->nObj1Lines !=2) { aMsg+="\n- nObj1Lines korregiert von "; aMsg+=pInfo->nObj1Lines; aMsg+=" auf 2"; }
+ if (pInfo->nObj2Lines !=2) { aMsg+="\n- nObj2Lines korregiert von "; aMsg+=pInfo->nObj1Lines; aMsg+=" auf 2"; }
+ if (pInfo->nMiddleLine!=2) { aMsg+="\n- nMiddleLine korregiert von "; aMsg+=pInfo->nMiddleLine; aMsg+=" auf 2"; }
+#endif
+ pInfo->nObj1Lines=2;
+ pInfo->nObj2Lines=2;
+ pInfo->nMiddleLine=2;
+ }
+#ifdef DBG_UTIL
+ if(aMsg.Len())
+ {
+ ByteString aMsg1("SdrEdgeObj::ImpCalcEdgeTrack(): Nachtraegliche Korrektur der Infodaten. cForm=");
+ aMsg1 += cForm;
+ aMsg1 += aMsg;
+ DBG_ERROR(aMsg1.GetBuffer());
+ }
+#endif
+ }
+ }
+ if (pnQuality!=NULL) {
+ ULONG nQual=0;
+ ULONG nQual0=nQual; // Ueberlaeufe vorbeugen
+ FASTBOOL bOverflow=FALSE;
+ Point aPt0(aXP1[0]);
+ for (USHORT nPntNum=1; nPntNum<nPntAnz; nPntNum++) {
+ Point aPt1(aXP1[nPntNum]);
+ nQual+=Abs(aPt1.X()-aPt0.X())+Abs(aPt1.Y()-aPt0.Y());
+ if (nQual<nQual0) bOverflow=TRUE;
+ nQual0=nQual;
+ aPt0=aPt1;
+ }
+
+ USHORT nTmp=nPntAnz;
+ if (cForm=='Z') {
+ nTmp=2; // Z-Form hat gute Qualitaet (nTmp=2 statt 4)
+ ULONG n1=Abs(aXP1[1].X()-aXP1[0].X())+Abs(aXP1[1].Y()-aXP1[0].Y());
+ ULONG n2=Abs(aXP1[2].X()-aXP1[1].X())+Abs(aXP1[2].Y()-aXP1[1].Y());
+ ULONG n3=Abs(aXP1[3].X()-aXP1[2].X())+Abs(aXP1[3].Y()-aXP1[2].Y());
+ // fuer moeglichst gleichlange Linien sorgen
+ ULONG nBesser=0;
+ n1+=n3;
+ n3=n2/4;
+ if (n1>=n2) nBesser=6;
+ else if (n1>=3*n3) nBesser=4;
+ else if (n1>=2*n3) nBesser=2;
+ if (aXP1[0].Y()!=aXP1[1].Y()) nBesser++; // Senkrechte Startlinie kriegt auch noch einen Pluspunkt (fuer H/V-Prio)
+ if (nQual>nBesser) nQual-=nBesser; else nQual=0;
+ }
+ if (nTmp>=3) {
+ nQual0=nQual;
+ nQual+=(ULONG)nTmp*0x01000000;
+ if (nQual<nQual0 || nTmp>15) bOverflow=TRUE;
+ }
+ if (nPntAnz>=2) { // Austrittswinkel nochmal pruefen
+ Point aP1(aXP1[1]); aP1-=aXP1[0];
+ Point aP2(aXP1[nPntAnz-2]); aP2-=aXP1[nPntAnz-1];
+ long nAng1=0; if (aP1.X()<0) nAng1=18000; if (aP1.Y()>0) nAng1=27000;
+ if (aP1.Y()<0) nAng1=9000; if (aP1.X()!=0 && aP1.Y()!=0) nAng1=1; // Schraeg!?!
+ long nAng2=0; if (aP2.X()<0) nAng2=18000; if (aP2.Y()>0) nAng2=27000;
+ if (aP2.Y()<0) nAng2=9000; if (aP2.X()!=0 && aP2.Y()!=0) nAng2=1; // Schraeg!?!
+ if (nAng1!=nAngle1) nIntersections++;
+ if (nAng2!=nAngle2) nIntersections++;
+ }
+
+ // Fuer den Qualitaetscheck wieder die Original-Rects verwenden und
+ // gleichzeitig checken, ob eins fuer die Edge-Berechnung verkleinert
+ // wurde (z.B. Fall 2.9)
+ aBewareRect1=rBewareRect1;
+ aBewareRect2=rBewareRect2;
+
+ for (USHORT i=0; i<nPntAnz; i++) {
+ Point aPt1(aXP1[i]);
+ FASTBOOL b1=aPt1.X()>aBewareRect1.Left() && aPt1.X()<aBewareRect1.Right() &&
+ aPt1.Y()>aBewareRect1.Top() && aPt1.Y()<aBewareRect1.Bottom();
+ FASTBOOL b2=aPt1.X()>aBewareRect2.Left() && aPt1.X()<aBewareRect2.Right() &&
+ aPt1.Y()>aBewareRect2.Top() && aPt1.Y()<aBewareRect2.Bottom();
+ USHORT nInt0=nIntersections;
+ if (i==0 || i==nPntAnz-1) {
+ if (b1 && b2) nIntersections++;
+ } else {
+ if (b1) nIntersections++;
+ if (b2) nIntersections++;
+ }
+ // und nun noch auf Ueberschneidungen checken
+ if (i>0 && nInt0==nIntersections) {
+ if (aPt0.Y()==aPt1.Y()) { // Horizontale Linie
+ if (aPt0.Y()>aBewareRect1.Top() && aPt0.Y()<aBewareRect1.Bottom() &&
+ ((aPt0.X()<=aBewareRect1.Left() && aPt1.X()>=aBewareRect1.Right()) ||
+ (aPt1.X()<=aBewareRect1.Left() && aPt0.X()>=aBewareRect1.Right()))) nIntersections++;
+ if (aPt0.Y()>aBewareRect2.Top() && aPt0.Y()<aBewareRect2.Bottom() &&
+ ((aPt0.X()<=aBewareRect2.Left() && aPt1.X()>=aBewareRect2.Right()) ||
+ (aPt1.X()<=aBewareRect2.Left() && aPt0.X()>=aBewareRect2.Right()))) nIntersections++;
+ } else { // Vertikale Linie
+ if (aPt0.X()>aBewareRect1.Left() && aPt0.X()<aBewareRect1.Right() &&
+ ((aPt0.Y()<=aBewareRect1.Top() && aPt1.Y()>=aBewareRect1.Bottom()) ||
+ (aPt1.Y()<=aBewareRect1.Top() && aPt0.Y()>=aBewareRect1.Bottom()))) nIntersections++;
+ if (aPt0.X()>aBewareRect2.Left() && aPt0.X()<aBewareRect2.Right() &&
+ ((aPt0.Y()<=aBewareRect2.Top() && aPt1.Y()>=aBewareRect2.Bottom()) ||
+ (aPt1.Y()<=aBewareRect2.Top() && aPt0.Y()>=aBewareRect2.Bottom()))) nIntersections++;
+ }
+ }
+ aPt0=aPt1;
+ }
+ if (nPntAnz<=1) nIntersections++;
+ nQual0=nQual;
+ nQual+=(ULONG)nIntersections*0x10000000;
+ if (nQual<nQual0 || nIntersections>15) bOverflow=TRUE;
+
+ if (bOverflow || nQual==0xFFFFFFFF) nQual=0xFFFFFFFE;
+ *pnQuality=nQual;
+ }
+ if (bInfo) { // nun die Linienversaetze auf aXP1 anwenden
+ if (pInfo->nMiddleLine!=0xFFFF) {
+ USHORT nIdx=pInfo->ImpGetPolyIdx(MIDDLELINE,aXP1);
+ if (pInfo->ImpIsHorzLine(MIDDLELINE,aXP1)) {
+ aXP1[nIdx].Y()+=pInfo->aMiddleLine.Y();
+ aXP1[nIdx+1].Y()+=pInfo->aMiddleLine.Y();
+ } else {
+ aXP1[nIdx].X()+=pInfo->aMiddleLine.X();
+ aXP1[nIdx+1].X()+=pInfo->aMiddleLine.X();
+ }
+ }
+ if (pInfo->nObj1Lines>=2) {
+ USHORT nIdx=pInfo->ImpGetPolyIdx(OBJ1LINE2,aXP1);
+ if (pInfo->ImpIsHorzLine(OBJ1LINE2,aXP1)) {
+ aXP1[nIdx].Y()+=pInfo->aObj1Line2.Y();
+ aXP1[nIdx+1].Y()+=pInfo->aObj1Line2.Y();
+ } else {
+ aXP1[nIdx].X()+=pInfo->aObj1Line2.X();
+ aXP1[nIdx+1].X()+=pInfo->aObj1Line2.X();
+ }
+ }
+ if (pInfo->nObj1Lines>=3) {
+ USHORT nIdx=pInfo->ImpGetPolyIdx(OBJ1LINE3,aXP1);
+ if (pInfo->ImpIsHorzLine(OBJ1LINE3,aXP1)) {
+ aXP1[nIdx].Y()+=pInfo->aObj1Line3.Y();
+ aXP1[nIdx+1].Y()+=pInfo->aObj1Line3.Y();
+ } else {
+ aXP1[nIdx].X()+=pInfo->aObj1Line3.X();
+ aXP1[nIdx+1].X()+=pInfo->aObj1Line3.X();
+ }
+ }
+ if (pInfo->nObj2Lines>=2) {
+ USHORT nIdx=pInfo->ImpGetPolyIdx(OBJ2LINE2,aXP1);
+ if (pInfo->ImpIsHorzLine(OBJ2LINE2,aXP1)) {
+ aXP1[nIdx].Y()+=pInfo->aObj2Line2.Y();
+ aXP1[nIdx+1].Y()+=pInfo->aObj2Line2.Y();
+ } else {
+ aXP1[nIdx].X()+=pInfo->aObj2Line2.X();
+ aXP1[nIdx+1].X()+=pInfo->aObj2Line2.X();
+ }
+ }
+ if (pInfo->nObj2Lines>=3) {
+ USHORT nIdx=pInfo->ImpGetPolyIdx(OBJ2LINE3,aXP1);
+ if (pInfo->ImpIsHorzLine(OBJ2LINE3,aXP1)) {
+ aXP1[nIdx].Y()+=pInfo->aObj2Line3.Y();
+ aXP1[nIdx+1].Y()+=pInfo->aObj2Line3.Y();
+ } else {
+ aXP1[nIdx].X()+=pInfo->aObj2Line3.X();
+ aXP1[nIdx+1].X()+=pInfo->aObj2Line3.X();
+ }
+ }
+ }
+ // Nun mache ich ggf. aus dem Verbinder eine Bezierkurve
+ if (eKind==SDREDGE_BEZIER && nPntAnz>2) {
+ Point* pPt1=&aXP1[0];
+ Point* pPt2=&aXP1[1];
+ Point* pPt3=&aXP1[nPntAnz-2];
+ Point* pPt4=&aXP1[nPntAnz-1];
+ long dx1=pPt2->X()-pPt1->X();
+ long dy1=pPt2->Y()-pPt1->Y();
+ long dx2=pPt3->X()-pPt4->X();
+ long dy2=pPt3->Y()-pPt4->Y();
+ if (cForm=='L') { // nPntAnz==3
+ aXP1.SetFlags(1,XPOLY_CONTROL);
+ Point aPt3(*pPt2);
+ aXP1.Insert(2,aPt3,XPOLY_CONTROL);
+ nPntAnz=aXP1.GetPointCount();
+ pPt1=&aXP1[0];
+ pPt2=&aXP1[1];
+ pPt3=&aXP1[nPntAnz-2];
+ pPt4=&aXP1[nPntAnz-1];
+ pPt2->X()-=dx1/3;
+ pPt2->Y()-=dy1/3;
+ pPt3->X()-=dx2/3;
+ pPt3->Y()-=dy2/3;
+ } else if (nPntAnz>=4 && nPntAnz<=6) { // Z oder U oder ...
+ // fuer Alle Anderen werden die Endpunkte der Ausgangslinien
+ // erstmal zu Kontrollpunkten. Bei nPntAnz>4 ist also noch
+ // Nacharbeit erforderlich!
+ aXP1.SetFlags(1,XPOLY_CONTROL);
+ aXP1.SetFlags(nPntAnz-2,XPOLY_CONTROL);
+ // Distanz x1.5
+ pPt2->X()+=dx1/2;
+ pPt2->Y()+=dy1/2;
+ pPt3->X()+=dx2/2;
+ pPt3->Y()+=dy2/2;
+ if (nPntAnz==5) {
+ // Vor und hinter dem Mittelpunkt jeweils
+ // noch einen Kontrollpunkt einfuegen
+ Point aCenter(aXP1[2]);
+ long dx1=aCenter.X()-aXP1[1].X();
+ long dy1=aCenter.Y()-aXP1[1].Y();
+ long dx2=aCenter.X()-aXP1[3].X();
+ long dy2=aCenter.Y()-aXP1[3].Y();
+ aXP1.Insert(2,aCenter,XPOLY_CONTROL);
+ aXP1.SetFlags(3,XPOLY_SYMMTR);
+ aXP1.Insert(4,aCenter,XPOLY_CONTROL);
+ aXP1[2].X()-=dx1/2;
+ aXP1[2].Y()-=dy1/2;
+ aXP1[3].X()-=(dx1+dx2)/4;
+ aXP1[3].Y()-=(dy1+dy2)/4;
+ aXP1[4].X()-=dx2/2;
+ aXP1[4].Y()-=dy2/2;
+ }
+ if (nPntAnz==6) {
+ Point aPt1(aXP1[2]);
+ Point aPt2(aXP1[3]);
+ aXP1.Insert(2,aPt1,XPOLY_CONTROL);
+ aXP1.Insert(5,aPt2,XPOLY_CONTROL);
+ long dx=aPt1.X()-aPt2.X();
+ long dy=aPt1.Y()-aPt2.Y();
+ aXP1[3].X()-=dx/2;
+ aXP1[3].Y()-=dy/2;
+ aXP1.SetFlags(3,XPOLY_SYMMTR);
+ //aXP1[4].X()+=dx/2;
+ //aXP1[4].Y()+=dy/2;
+ aXP1.Remove(4,1); // weil identisch mit aXP1[3]
+ }
+ }
+ }
+ return aXP1;
+}
+
+/*
+Nach einer einfachen Rechnung koennte es max. 64 unterschiedliche Verlaeufe mit
+5 Linien, 32 mit 4 Linien, 16 mit 3, 8 mit 2 Linien und 4 mit 1 Linie geben=124.
+Normalisiert auf 1. Austrittswinkel nach rechts bleiben dann noch 31.
+Dann noch eine vertikale Spiegelung wegnormalisiert bleiben noch 16
+characteristische Verlaufszuege mit 1-5 Linien:
+Mit 1 Linie (Typ 'I'): --
+Mit 2 Linien (Typ 'L'): -Ù
+Mit 3 Linien (Typ 'U'): -¿ (Typ 'Z'): Ú-
+ -Ù -Ù
+Mit 4 Linien: 1 ist nicht plausibel, 3 ist=2 (90deg Drehung). Verbleibt 2,4
+ Ú-Ù Ú¿ À¿ Ú¿ Ú¿ Ú-¿
+ -Ù -Ù -Ù -Ù -Ù -Ù
+Mit 5 Linien: nicht plausibel sind 1,2,4,5. 7 ist identisch mit 3 (Richtungsumkehr)
+ Bleibt also 3,6 und 8. '4' 'S' 'C'
+ ¿ Ú -¿ Ú- Ú-¿ Ú-
+ Ú-Ù Ú-Ù Ú-¿ Ú-¿ À¿ À¿ -Ù ³ Ú-¿ Ú-¿ À¿ Ú-¿
+ -Ù -Ù -Ù Ù -Ù À- -Ù -Ù --Ù À Ù -Ù Ù -Ù À Ù
+Insgesamt sind also 9 Grundtypen zu unterscheiden die den 400 Konstellationen
+aus Objektposition und Austrittswinkeln zuzuordnen sind.
+4 der 9 Grundtypen haben eine 'Mittellinie'. Die Anzahl der zu Objektabstaende
+je Objekt variiert von 0-3:
+ Mi O1 O2 Anmerkung
+'I': n 0 0
+'L': n 0 0
+'U': n 0-1 0-1
+'Z': j 0 0
+4.1: j 0 1 = U+1 bzw. 1+U
+4.2: n 0-2 0-2 = Z+1
+'4': j 0 2 = Z+2
+'S': j 1 1 = 1+Z+1
+'C': n 0-3 0-3 = 1+U+1
+*/
+
+void __EXPORT SdrEdgeObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId&, const SfxHint& rHint, const TypeId&)
+{
+ SfxSimpleHint* pSimple=PTR_CAST(SfxSimpleHint,&rHint);
+ ULONG nId=pSimple==0 ? 0 : pSimple->GetId();
+ FASTBOOL bDataChg=nId==SFX_HINT_DATACHANGED;
+ FASTBOOL bDying=nId==SFX_HINT_DYING;
+ FASTBOOL bObj1=aCon1.pObj!=NULL && aCon1.pObj->GetBroadcaster()==&rBC;
+ FASTBOOL bObj2=aCon2.pObj!=NULL && aCon2.pObj->GetBroadcaster()==&rBC;
+ if (bDying && (bObj1 || bObj2)) {
+ // #35605# Dying vorher abfangen, damit AttrObj nicht
+ // wg. vermeintlicher Vorlagenaenderung rumbroadcastet
+ if (bObj1) aCon1.pObj=NULL;
+ if (bObj2) aCon2.pObj=NULL;
+ return; // Und mehr braucht hier nicht getan werden.
+ }
+ SdrTextObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+ if (nNotifyingCount==0) { // Hier nun auch ein VerriegelungsFlag
+ ((SdrEdgeObj*)this)->nNotifyingCount++;
+ SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+ if (bDataChg) { // StyleSheet geaendert
+ ImpSetAttrToEdgeInfo(); // Werte bei Vorlagenaenderung vom Pool nach aEdgeInfo kopieren
+ }
+ if (bDataChg ||
+ (bObj1 && aCon1.pObj->GetPage()==pPage) ||
+ (bObj2 && aCon2.pObj->GetPage()==pPage) ||
+ (pSdrHint && pSdrHint->GetKind()==HINT_OBJREMOVED))
+ {
+ // Broadcasting nur, wenn auf der selben Page
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ if (!bEdgeTrackDirty) SendRepaintBroadcast();
+ bEdgeTrackDirty=TRUE;
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+ ((SdrEdgeObj*)this)->nNotifyingCount--;
+ }
+}
+
+void SdrEdgeObj::operator=(const SdrObject& rObj)
+{
+ SdrTextObj::operator=(rObj);
+ *pEdgeTrack =*((SdrEdgeObj&)rObj).pEdgeTrack;
+ bEdgeTrackDirty=((SdrEdgeObj&)rObj).bEdgeTrackDirty;
+ aCon1 =((SdrEdgeObj&)rObj).aCon1;
+ aCon2 =((SdrEdgeObj&)rObj).aCon2;
+ aCon1.pObj=NULL;
+ aCon2.pObj=NULL;
+ pEdgeAttr=(SdrEdgeSetItem*)ImpSetNewAttr(pEdgeAttr,((SdrEdgeObj&)rObj).pEdgeAttr);
+ aEdgeInfo=((SdrEdgeObj&)rObj).aEdgeInfo;
+}
+
+void SdrEdgeObj::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulEDGE);
+}
+
+void SdrEdgeObj::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralEDGE);
+}
+
+void SdrEdgeObj::TakeXorPoly(XPolyPolygon& rXPolyPoly, FASTBOOL bDetail) const
+{
+ if (bEdgeTrackDirty) ((SdrEdgeObj*)this)->ImpRecalcEdgeTrack();
+ rXPolyPoly=XPolyPolygon(*pEdgeTrack);
+}
+
+void SdrEdgeObj::TakeContour(XPolyPolygon& rPoly) const
+{
+ // am 14.1.97 wg. Umstellung TakeContour ueber Mtf und Paint. Joe.
+ SdrTextObj::TakeContour(rPoly);
+}
+
+void SdrEdgeObj::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+USHORT SdrEdgeObj::GetHdlCount() const
+{
+ SdrEdgeKind eKind=GETEDGEKIND;
+ USHORT nHdlAnz=0;
+ USHORT nPntAnz=pEdgeTrack->GetPointCount();
+ if (nPntAnz!=0) {
+ nHdlAnz=2;
+ if ((eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) && nPntAnz>=4) {
+ USHORT nO1=aEdgeInfo.nObj1Lines>0 ? aEdgeInfo.nObj1Lines-1 : 0;
+ USHORT nO2=aEdgeInfo.nObj2Lines>0 ? aEdgeInfo.nObj2Lines-1 : 0;
+ USHORT nM=aEdgeInfo.nMiddleLine!=0xFFFF ? 1 : 0;
+ nHdlAnz+=nO1+nO2+nM;
+ } else if (eKind==SDREDGE_THREELINES && nPntAnz==4) {
+ if (GetConnectedNode(TRUE)!=NULL) nHdlAnz++;
+ if (GetConnectedNode(FALSE)!=NULL) nHdlAnz++;
+ }
+ }
+ return nHdlAnz;
+}
+
+SdrHdl* SdrEdgeObj::GetHdl(USHORT nHdlNum) const
+{
+ SdrHdl* pHdl=NULL;
+ USHORT nPntAnz=pEdgeTrack->GetPointCount();
+ if (nPntAnz!=0) {
+ if (nHdlNum==0) {
+ pHdl=new ImpEdgeHdl((*pEdgeTrack)[0],HDL_POLY);
+ if (aCon1.pObj!=NULL && aCon1.bBestVertex) pHdl->Set1PixMore(TRUE);
+ } else if (nHdlNum==1) {
+ pHdl=new ImpEdgeHdl((*pEdgeTrack)[USHORT(nPntAnz-1)],HDL_POLY);
+ if (aCon2.pObj!=NULL && aCon2.bBestVertex) pHdl->Set1PixMore(TRUE);
+ } else {
+ SdrEdgeKind eKind=GETEDGEKIND;
+ if (eKind==SDREDGE_ORTHOLINES || eKind==SDREDGE_BEZIER) {
+ USHORT nO1=aEdgeInfo.nObj1Lines>0 ? aEdgeInfo.nObj1Lines-1 : 0;
+ USHORT nO2=aEdgeInfo.nObj2Lines>0 ? aEdgeInfo.nObj2Lines-1 : 0;
+ USHORT nM=aEdgeInfo.nMiddleLine!=0xFFFF ? 1 : 0;
+ USHORT nNum=nHdlNum-2;
+ short nPt=0;
+ pHdl=new ImpEdgeHdl(Point(),HDL_POLY);
+ if (nNum<nO1) {
+ nPt=nNum+1;
+ if (nNum==0) ((ImpEdgeHdl*)pHdl)->SetLineCode(OBJ1LINE2);
+ if (nNum==1) ((ImpEdgeHdl*)pHdl)->SetLineCode(OBJ1LINE3);
+ } else {
+ nNum-=nO1;
+ if (nNum<nO2) {
+ nPt=nPntAnz-3-nNum;
+ if (nNum==0) ((ImpEdgeHdl*)pHdl)->SetLineCode(OBJ2LINE2);
+ if (nNum==1) ((ImpEdgeHdl*)pHdl)->SetLineCode(OBJ2LINE3);
+ } else {
+ nNum-=nO2;
+ if (nNum<nM) {
+ nPt=aEdgeInfo.nMiddleLine;
+ ((ImpEdgeHdl*)pHdl)->SetLineCode(MIDDLELINE);
+ }
+ }
+ }
+ if (nPt>0) {
+ Point aPos((*pEdgeTrack)[nPt]);
+ aPos+=(*pEdgeTrack)[nPt+1];
+ aPos.X()/=2;
+ aPos.Y()/=2;
+ pHdl->SetPos(aPos);
+ } else {
+ delete pHdl;
+ pHdl=NULL;
+ }
+ } else if (eKind==SDREDGE_THREELINES) {
+ USHORT nNum=nHdlNum;
+ if (GetConnectedNode(TRUE)==NULL) nNum++;
+ Point aPos((*pEdgeTrack)[nNum-1]);
+ pHdl=new ImpEdgeHdl(aPos,HDL_POLY);
+ if (nNum==2) ((ImpEdgeHdl*)pHdl)->SetLineCode(OBJ1LINE2);
+ if (nNum==3) ((ImpEdgeHdl*)pHdl)->SetLineCode(OBJ2LINE2);
+ }
+ }
+ if (pHdl!=NULL) {
+ pHdl->SetPointNum(nHdlNum);
+ }
+ }
+ return pHdl;
+}
+
+FASTBOOL SdrEdgeObj::HasSpecialDrag() const
+{
+ return TRUE;
+}
+
+class ImpEdgeUser
+{
+public:
+ XPolygon aXP;
+ SdrObjConnection aCon1;
+ SdrObjConnection aCon2;
+ SdrObjConnection* pDragCon;
+ SdrEdgeInfoRec aInfo;
+};
+
+FASTBOOL SdrEdgeObj::BegDrag(SdrDragStat& rDragStat) const
+{
+ if (rDragStat.GetHdl()==NULL) return FALSE;
+ rDragStat.SetEndDragChangesAttributes(TRUE);
+ rDragStat.pUser=new ImpEdgeUser;
+ ImpEdgeUser* pEdgeUser=(ImpEdgeUser*)rDragStat.pUser;
+ pEdgeUser->aXP=(*pEdgeTrack);
+ pEdgeUser->aInfo=aEdgeInfo;
+ pEdgeUser->aCon1=aCon1;
+ pEdgeUser->aCon2=aCon2;
+ pEdgeUser->pDragCon=NULL;
+ if (rDragStat.GetHdl()->GetPointNum()<2) {
+ rDragStat.SetEndDragChangesGeoAndAttributes(TRUE);
+ if (rDragStat.GetHdl()->GetPointNum()==0) pEdgeUser->pDragCon=&pEdgeUser->aCon1;
+ if (rDragStat.GetHdl()->GetPointNum()==1) pEdgeUser->pDragCon=&pEdgeUser->aCon2;
+ rDragStat.SetNoSnap(TRUE);
+ }
+ return TRUE;
+}
+
+FASTBOOL SdrEdgeObj::MovDrag(SdrDragStat& rDragStat) const
+{
+ Point aPt(rDragStat.GetNow());
+ ImpEdgeUser* pEdgeUser=(ImpEdgeUser*)rDragStat.pUser;
+ const SdrHdl* pHdl=rDragStat.GetHdl();
+ const ImpEdgeHdl* pEdgeHdl=(ImpEdgeHdl*)pHdl;
+ pEdgeUser->aXP=(*pEdgeTrack);
+ pEdgeUser->aInfo=aEdgeInfo;
+ if (pHdl->GetPointNum()<2) {
+ pEdgeUser->pDragCon->pObj=NULL;
+ if (rDragStat.GetPageView()!=NULL) {
+ ImpFindConnector(aPt,*rDragStat.GetPageView(),*pEdgeUser->pDragCon,this);
+ if (rDragStat.GetView()!=NULL) {
+ rDragStat.GetView()->SetConnectMarker(*pEdgeUser->pDragCon,*rDragStat.GetPageView());
+ }
+ }
+ if (pHdl->GetPointNum()==0) pEdgeUser->aXP[0]=aPt;
+ else pEdgeUser->aXP[USHORT(pEdgeUser->aXP.GetPointCount()-1)]=aPt;
+ pEdgeUser->aInfo.aObj1Line2=Point();
+ pEdgeUser->aInfo.aObj1Line3=Point();
+ pEdgeUser->aInfo.aObj2Line2=Point();
+ pEdgeUser->aInfo.aObj2Line3=Point();
+ pEdgeUser->aInfo.aMiddleLine=Point();
+ } else { // Sonst Dragging eines Linienversatzes
+ SdrEdgeLineCode eLineCode=pEdgeHdl->GetLineCode();
+ Point aDist(rDragStat.GetNow()); aDist-=rDragStat.GetStart();
+ long nDist=pEdgeHdl->IsHorzDrag() ? aDist.X() : aDist.Y();
+ nDist+=pEdgeUser->aInfo.ImpGetLineVersatz(eLineCode,pEdgeUser->aXP);
+ pEdgeUser->aInfo.ImpSetLineVersatz(eLineCode,pEdgeUser->aXP,nDist);
+ }
+ pEdgeUser->aXP=ImpCalcEdgeTrack(pEdgeUser->aXP,pEdgeUser->aCon1,pEdgeUser->aCon2,&pEdgeUser->aInfo);
+ return TRUE;
+}
+
+FASTBOOL SdrEdgeObj::EndDrag(SdrDragStat& rDragStat)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ ImpEdgeUser* pEdgeUser=(ImpEdgeUser*)rDragStat.pUser;
+ if (rDragStat.GetHdl()->GetPointNum()<2) {
+ (*pEdgeTrack)=pEdgeUser->aXP;
+ aEdgeInfo=pEdgeUser->aInfo;
+ if (rDragStat.GetHdl()->GetPointNum()==0) {
+ ConnectToNode(TRUE,pEdgeUser->aCon1.pObj);
+ aCon1=pEdgeUser->aCon1;
+ } else {
+ ConnectToNode(FALSE,pEdgeUser->aCon2.pObj);
+ aCon2=pEdgeUser->aCon2;
+ }
+ } else { // Sonst Dragging eines Linienversatzes
+ (*pEdgeTrack)=pEdgeUser->aXP;
+ aEdgeInfo=pEdgeUser->aInfo;
+ }
+ ImpSetEdgeInfoToAttr();
+ delete (ImpEdgeUser*)rDragStat.pUser;
+ rDragStat.pUser=NULL;
+ SetChanged();
+ SetRectsDirty();
+ SendRepaintBroadcast();
+ if (rDragStat.GetView()!=NULL) {
+ rDragStat.GetView()->HideConnectMarker();
+ }
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ return TRUE;
+}
+
+void SdrEdgeObj::BrkDrag(SdrDragStat& rDragStat) const
+{
+ delete (ImpEdgeUser*)rDragStat.pUser;
+ rDragStat.pUser=NULL;
+ if (rDragStat.GetView()!=NULL) {
+ rDragStat.GetView()->HideConnectMarker();
+ }
+}
+
+XubString SdrEdgeObj::GetDragComment(const SdrDragStat& rDragStat, FASTBOOL bUndoDragComment, FASTBOOL bCreateComment) const
+{
+ XubString aStr;
+ if (!bCreateComment) ImpTakeDescriptionStr(STR_DragEdgeTail,aStr);
+ return aStr;
+}
+
+void SdrEdgeObj::TakeDragPoly(const SdrDragStat& rDragStat, XPolyPolygon& rXPP) const
+{
+ ImpEdgeUser* pEdgeUser=(ImpEdgeUser*)rDragStat.pUser;
+ rXPP.Clear();
+ rXPP.Insert(pEdgeUser->aXP);
+}
+
+void SdrEdgeObj::NspToggleEdgeXor(const SdrDragStat& rDragStat, ExtOutputDevice& rXOut, FASTBOOL bTail1, FASTBOOL bTail2, FASTBOOL bDetail) const
+{
+ SdrDragMethod* pDM=rDragStat.GetDragMethod();
+ if (pDM!=NULL) {
+ if (IS_TYPE(SdrDragObjOwn,pDM) || IS_TYPE(SdrDragMovHdl,pDM)) return;
+ if (!pDM->IsMoveOnly()) bDetail=FALSE;
+ if (bDetail) {
+ SdrObjConnection aMyCon1(aCon1);
+ SdrObjConnection aMyCon2(aCon2);
+ if (bTail1) pDM->MovPoint(aMyCon1.aObjOfs,Point(0,0));
+ if (bTail2) pDM->MovPoint(aMyCon2.aObjOfs,Point(0,0));
+ SdrEdgeInfoRec aInfo(aEdgeInfo);
+ XPolygon aXP(ImpCalcEdgeTrack(*pEdgeTrack,aMyCon1,aMyCon2,&aInfo));
+
+ OutputDevice* pOut = rXOut.GetOutDev();
+
+ if (pOut->GetOutDevType() == OUTDEV_WINDOW)
+ {
+ const Polygon aPolygon( XOutCreatePolygon(aXP, pOut) );
+ ((Window*) pOut)->InvertTracking(aPolygon, SHOWTRACK_WINDOW);
+ }
+ else
+ {
+ rXOut.DrawXPolyLine(aXP);
+ }
+ } else {
+ const XPolygon& rXP=*pEdgeTrack;
+ Point aPt1(rXP[0]);
+ Point aPt2(rXP[USHORT(rXP.GetPointCount()-1)]);
+ if (aCon1.pObj!=NULL && (aCon1.bBestConn || aCon1.bBestVertex)) aPt1=aCon1.pObj->GetSnapRect().Center();
+ if (aCon2.pObj!=NULL && (aCon2.bBestConn || aCon2.bBestVertex)) aPt2=aCon2.pObj->GetSnapRect().Center();
+ if (bTail1) pDM->MovPoint(aPt1,Point(0,0));
+ if (bTail2) pDM->MovPoint(aPt2,Point(0,0));
+ rXOut.GetOutDev()->DrawLine(aPt1,aPt2);
+ }
+ }
+}
+
+FASTBOOL SdrEdgeObj::BegCreate(SdrDragStat& rDragStat)
+{
+ rDragStat.SetNoSnap(TRUE);
+ pEdgeTrack->SetPointCount(2);
+ (*pEdgeTrack)[0]=rDragStat.GetStart();
+ (*pEdgeTrack)[1]=rDragStat.GetNow();
+ if (rDragStat.GetPageView()!=NULL) {
+ ImpFindConnector(rDragStat.GetStart(),*rDragStat.GetPageView(),aCon1,this);
+ ConnectToNode(TRUE,aCon1.pObj);
+ }
+ *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo);
+ return TRUE;
+}
+
+FASTBOOL SdrEdgeObj::MovCreate(SdrDragStat& rDragStat)
+{
+ USHORT nMax=pEdgeTrack->GetPointCount();
+ (*pEdgeTrack)[nMax-1]=rDragStat.GetNow();
+ if (rDragStat.GetPageView()!=NULL) {
+ ImpFindConnector(rDragStat.GetNow(),*rDragStat.GetPageView(),aCon2,this);
+ rDragStat.GetView()->SetConnectMarker(aCon2,*rDragStat.GetPageView());
+ }
+ bBoundRectDirty=TRUE;
+ bSnapRectDirty=TRUE;
+ ConnectToNode(FALSE,aCon2.pObj);
+ *pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,&aEdgeInfo);
+ bEdgeTrackDirty=FALSE;
+ return TRUE;
+}
+
+FASTBOOL SdrEdgeObj::EndCreate(SdrDragStat& rDragStat, SdrCreateCmd eCmd)
+{
+ FASTBOOL bOk=(eCmd==SDRCREATE_FORCEEND || rDragStat.GetPointAnz()>=2);
+ if (bOk) {
+ ConnectToNode(TRUE,aCon1.pObj);
+ ConnectToNode(FALSE,aCon2.pObj);
+ if (rDragStat.GetView()!=NULL) {
+ rDragStat.GetView()->HideConnectMarker();
+ }
+ ImpSetEdgeInfoToAttr(); // Die Werte aus aEdgeInfo in den Pool kopieren
+ }
+ SetRectsDirty();
+ return bOk;
+}
+
+FASTBOOL SdrEdgeObj::BckCreate(SdrDragStat& rDragStat)
+{
+ if (rDragStat.GetView()!=NULL) {
+ rDragStat.GetView()->HideConnectMarker();
+ }
+ return FALSE;
+}
+
+void SdrEdgeObj::BrkCreate(SdrDragStat& rDragStat)
+{
+ if (rDragStat.GetView()!=NULL) {
+ rDragStat.GetView()->HideConnectMarker();
+ }
+}
+
+void SdrEdgeObj::TakeCreatePoly(const SdrDragStat& rStatDrag, XPolyPolygon& rXPP) const
+{
+ rXPP.Clear();
+ rXPP.Insert(*pEdgeTrack);
+}
+
+Pointer SdrEdgeObj::GetCreatePointer() const
+{
+ return Pointer(POINTER_DRAW_CONNECT);
+}
+
+FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut)
+{
+ rCon.ResetVars();
+ if (pOut==NULL) pOut=rPV.GetView().GetWin(0);
+ if (pOut==NULL) return FALSE;
+ SdrObjList* pOL=rPV.GetObjList();
+ const SetOfByte& rVisLayer=rPV.GetVisibleLayers();
+ // Sensitiver Bereich der Konnektoren ist doppelt so gross wie die Handles:
+ USHORT nMarkHdSiz=rPV.GetView().GetMarkHdlSizePixel();
+ Size aHalfConSiz(nMarkHdSiz,nMarkHdSiz);
+ aHalfConSiz=pOut->PixelToLogic(aHalfConSiz);
+ Size aHalfCenterSiz(2*aHalfConSiz.Width(),2*aHalfConSiz.Height());
+ Rectangle aMouseRect(rPt,rPt);
+ aMouseRect.Left() -=aHalfConSiz.Width();
+ aMouseRect.Top() -=aHalfConSiz.Height();
+ aMouseRect.Right() +=aHalfConSiz.Width();
+ aMouseRect.Bottom()+=aHalfConSiz.Height();
+ USHORT nBoundHitTol=(USHORT)aHalfConSiz.Width()/2; if (nBoundHitTol==0) nBoundHitTol=1;
+ ULONG no=pOL->GetObjCount();
+ FASTBOOL bFnd=FALSE;
+ SdrObjConnection aTestCon;
+ SdrObjConnection aBestCon;
+ FASTBOOL bTestBoundHit=FALSE;
+ FASTBOOL bBestBoundHit=FALSE;
+
+ while (no>0 && !bFnd) {
+ // Problem: Gruppenobjekt mit verschiedenen Layern liefert LayerID 0 !!!!
+ no--;
+ SdrObject* pObj=pOL->GetObj(no);
+ if (rVisLayer.IsSet(pObj->GetLayer()) && // nur sichtbare Objekte
+ (pThis==NULL || pObj!=(SdrObject*)pThis) && // nicht an mich selbst connecten
+ pObj->IsNode())
+ {
+ Rectangle aObjBound(pObj->GetBoundRect());
+ if (aObjBound.IsOver(aMouseRect)) {
+ aTestCon.ResetVars();
+ bTestBoundHit=FALSE;
+ FASTBOOL bEdge=HAS_BASE(SdrEdgeObj,pObj); // kein BestCon fuer Edge
+ // Die Userdefined Konnektoren haben absolute Prioritaet.
+ // Danach kommt Vertex, Corner und Mitte(Best) gleich priorisiert.
+ // Zum Schluss kommt noch ein HitTest aufs Obj.
+ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+ USHORT nConAnz=pGPL==NULL ? 0 : pGPL->GetCount();
+ USHORT nGesAnz=nConAnz+9;
+ FASTBOOL bUserFnd=FALSE;
+ ULONG nBestDist=0xFFFFFFFF;
+ for (USHORT i=0; i<nGesAnz; i++) {
+ FASTBOOL bUser=i<nConAnz;
+ FASTBOOL bVertex=i>=nConAnz+0 && i<nConAnz+4;
+ FASTBOOL bCorner=i>=nConAnz+4 && i<nConAnz+8;
+ FASTBOOL bCenter=i==nConAnz+8;
+ FASTBOOL bOk=FALSE;
+ Point aConPos;
+ USHORT nConNum=i;
+ if (bUser) {
+ const SdrGluePoint& rGP=(*pGPL)[nConNum];
+ aConPos=rGP.GetAbsolutePos(*pObj);
+ nConNum=rGP.GetId();
+ bOk=TRUE;
+ } else if (bVertex && !bUserFnd) {
+ nConNum-=nConAnz;
+ if (rPV.GetView().IsAutoVertexConnectors()) {
+ SdrGluePoint aPt(pObj->GetVertexGluePoint(nConNum));
+ aConPos=aPt.GetAbsolutePos(*pObj);
+ bOk=TRUE;
+ } else i+=3;
+ } else if (bCorner && !bUserFnd) {
+ nConNum-=nConAnz+4;
+ if (rPV.GetView().IsAutoCornerConnectors()) {
+ SdrGluePoint aPt(pObj->GetCornerGluePoint(nConNum));
+ aConPos=aPt.GetAbsolutePos(*pObj);
+ bOk=TRUE;
+ } else i+=3;
+ } else if (bCenter && !bUserFnd && !bEdge) { // Edges nicht!
+ nConNum=0;
+ aConPos=aObjBound.Center();
+ bOk=TRUE;
+ }
+ if (bOk && aMouseRect.IsInside(aConPos)) {
+ if (bUser) bUserFnd=TRUE;
+ bFnd=TRUE;
+ ULONG nDist=(ULONG)Abs(aConPos.X()-rPt.X())+(ULONG)Abs(aConPos.Y()-rPt.Y());
+ if (nDist<nBestDist) {
+ nBestDist=nDist;
+ aTestCon.pObj=pObj;
+ aTestCon.nConId=nConNum;
+ aTestCon.bAutoCorner=bCorner;
+ aTestCon.bAutoVertex=bVertex;
+ aTestCon.bBestConn=FALSE; // bCenter;
+ aTestCon.bBestVertex=bCenter;
+ }
+ }
+ }
+ // Falls kein Konnektor getroffen wird nochmal
+ // HitTest versucht fuer BestConnector (=bCenter)
+ if (!bFnd && !bEdge && pObj->IsHit(rPt,nBoundHitTol,&rVisLayer)) {
+ bFnd=TRUE;
+ aTestCon.pObj=pObj;
+ aTestCon.bBestConn=TRUE;
+ }
+ if (bFnd) {
+ Rectangle aMouseRect2(rPt,rPt);
+ aMouseRect.Left() -=nBoundHitTol;
+ aMouseRect.Top() -=nBoundHitTol;
+ aMouseRect.Right() +=nBoundHitTol;
+ aMouseRect.Bottom()+=nBoundHitTol;
+ bTestBoundHit=aObjBound.IsOver(aMouseRect2);
+ }
+
+ }
+ }
+ }
+ rCon=aTestCon;
+ return bFnd;
+}
+
+void SdrEdgeObj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ Rectangle aOld(GetSnapRect());
+ long nMulX = rRect.Right() - rRect.Left();
+ long nDivX = aOld.Right() - aOld.Left();
+ long nMulY = rRect.Bottom() - rRect.Top();
+ long nDivY = aOld.Bottom() - aOld.Top();
+ if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
+ if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
+ Fraction aX(nMulX, nDivX);
+ Fraction aY(nMulY, nDivY);
+ NbcResize(aOld.TopLeft(), aX, aY);
+ NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
+}
+
+void SdrEdgeObj::NbcMove(const Size& rSiz)
+{
+ SdrTextObj::NbcMove(rSiz);
+ MoveXPoly(*pEdgeTrack,rSiz);
+}
+
+void SdrEdgeObj::NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact)
+{
+ SdrTextObj::NbcResize(rRefPnt,aXFact,aXFact);
+ ResizeXPoly(*pEdgeTrack,rRefPnt,aXFact,aYFact);
+
+ // #75735#
+ aEdgeInfo.aObj1Line2 = Point();
+ aEdgeInfo.aObj1Line3 = Point();
+ aEdgeInfo.aObj2Line2 = Point();
+ aEdgeInfo.aObj2Line3 = Point();
+ aEdgeInfo.aMiddleLine = Point();
+}
+
+SdrObject* SdrEdgeObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ SdrObject* pRet=ImpConvertMakeObj(XPolyPolygon(*pEdgeTrack),FALSE,bBezier);
+ pRet=ImpConvertAddText(pRet,bBezier);
+ return pRet;
+}
+
+USHORT SdrEdgeObj::GetSnapPointCount() const
+{
+ return 2;
+}
+
+Point SdrEdgeObj::GetSnapPoint(USHORT i) const
+{
+ ((SdrEdgeObj*)this)->ImpUndirtyEdgeTrack();
+ USHORT nAnz=pEdgeTrack->GetPointCount();
+ if (i==0) return (*pEdgeTrack)[0];
+ else return (*pEdgeTrack)[nAnz-1];
+}
+
+FASTBOOL SdrEdgeObj::IsPolyObj() const
+{
+ return FALSE;
+}
+
+USHORT SdrEdgeObj::GetPointCount() const
+{
+ return 0;
+}
+
+const Point& SdrEdgeObj::GetPoint(USHORT i) const
+{
+ ((SdrEdgeObj*)this)->ImpUndirtyEdgeTrack();
+ USHORT nAnz=pEdgeTrack->GetPointCount();
+ if (i==0) return (*pEdgeTrack)[0];
+ else return (*pEdgeTrack)[nAnz-1];
+}
+
+void SdrEdgeObj::NbcSetPoint(const Point& rPnt, USHORT i)
+{
+ // ToDo: Umconnekten fehlt noch
+ ImpUndirtyEdgeTrack();
+ USHORT nAnz=pEdgeTrack->GetPointCount();
+ if (i==0) (*pEdgeTrack)[0]=rPnt;
+ if (i==1) (*pEdgeTrack)[nAnz-1]=rPnt;
+ SetEdgeTrackDirty();
+ SetRectsDirty();
+}
+
+SdrEdgeObjGeoData::SdrEdgeObjGeoData()
+{
+ pEdgeTrack=new XPolygon;
+}
+
+SdrEdgeObjGeoData::~SdrEdgeObjGeoData()
+{
+ delete pEdgeTrack;
+}
+
+SdrObjGeoData* SdrEdgeObj::NewGeoData() const
+{
+ return new SdrEdgeObjGeoData;
+}
+
+void SdrEdgeObj::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ SdrTextObj::SaveGeoData(rGeo);
+ SdrEdgeObjGeoData& rEGeo=(SdrEdgeObjGeoData&)rGeo;
+ rEGeo.aCon1 =aCon1;
+ rEGeo.aCon2 =aCon2;
+ *rEGeo.pEdgeTrack =*pEdgeTrack;
+ rEGeo.bEdgeTrackDirty=bEdgeTrackDirty;
+ rEGeo.aEdgeInfo =aEdgeInfo;
+}
+
+void SdrEdgeObj::RestGeoData(const SdrObjGeoData& rGeo)
+{
+ SdrTextObj::RestGeoData(rGeo);
+ SdrEdgeObjGeoData& rEGeo=(SdrEdgeObjGeoData&)rGeo;
+ if (aCon1.pObj!=rEGeo.aCon1.pObj) {
+ if (aCon1.pObj!=NULL) aCon1.pObj->RemoveListener(*this);
+ aCon1=rEGeo.aCon1;
+ if (aCon1.pObj!=NULL) aCon1.pObj->AddListener(*this);
+ }
+ if (aCon2.pObj!=rEGeo.aCon2.pObj) {
+ if (aCon2.pObj!=NULL) aCon2.pObj->RemoveListener(*this);
+ aCon2=rEGeo.aCon2;
+ if (aCon2.pObj!=NULL) aCon2.pObj->AddListener(*this);
+ }
+ *pEdgeTrack =*rEGeo.pEdgeTrack;
+ bEdgeTrackDirty=rEGeo.bEdgeTrackDirty;
+ aEdgeInfo =rEGeo.aEdgeInfo;
+}
+
+void SdrEdgeObj::WriteData(SvStream& rOut) const
+{
+ SdrTextObj::WriteData(rOut);
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrEdgeObj");
+#endif
+ {
+ SdrDownCompat aTrackCompat(rOut,STREAM_WRITE); // ab V11 eingepackt
+#ifdef DBG_UTIL
+ aTrackCompat.SetID("SdrEdgeObj(EdgeTrack)");
+#endif
+ rOut<<*pEdgeTrack;
+ }
+ aCon1.Write(rOut,this); // Die Connections haben
+ aCon2.Write(rOut,this); // ihren eigenen Header
+ SfxItemPool* pPool=GetItemPool();
+ if (pPool!=NULL) {
+ pPool->StoreSurrogate(rOut,pEdgeAttr);
+ } else {
+ rOut<<UINT16(SFX_ITEMS_NULL);
+ }
+ rOut<<aEdgeInfo;
+}
+
+void SdrEdgeObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ SdrTextObj::ReadData(rHead,rIn);
+ if (rHead.GetVersion()<2) { // frueher war EdgeObj von PathObj abgeleitet
+ DBG_ERROR("SdrEdgeObj::ReadData(): Dateiversion<2 wird nicht mehr unterstuetzt");
+ rIn.SetError(SVSTREAM_WRONGVERSION); // Format-Fehler, File zu alt
+ return;
+ }
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrEdgeObj");
+#endif
+ if (rHead.GetVersion()>=11) { // ab V11 ist alles eingepackt
+ {
+ SdrDownCompat aTrackCompat(rIn,STREAM_READ); // ab V11 eingepackt
+#ifdef DBG_UTIL
+ aTrackCompat.SetID("SdrEdgeObj(EdgeTrack)");
+#endif
+ rIn>>*pEdgeTrack;
+ }
+ aCon1.Read(rIn,this); // Die Connections haben
+ aCon2.Read(rIn,this); // ihren eigenen Header.
+ } else {
+ rIn>>*pEdgeTrack;
+ if (rHead.GetBytesLeft()>0) { // Aha, da ist noch mehr (Verbindungsdaten)
+ aCon1.ReadTilV10(rIn,this); // Import der
+ aCon2.ReadTilV10(rIn,this); // Connections
+ }
+ }
+ if (aCompat.GetBytesLeft()>0) { // ab 10-08-1996 (noch Vers 12) Items fuer Verbinder
+ SfxItemPool* pPool=GetItemPool();
+ if (pPool!=NULL) {
+ pEdgeAttr=(const SdrEdgeSetItem*)ImpSetNewAttr(pEdgeAttr,NULL); // ggf altes rauswerfen
+ USHORT nWhichRef=SDRATTRSET_EDGE;
+ pEdgeAttr=(const SdrEdgeSetItem*)pPool->LoadSurrogate(rIn,nWhichRef,0);
+ if (pStyleSheet!=NULL && pEdgeAttr!=NULL) {
+ ((SfxItemSet*)&pEdgeAttr->GetItemSet())->SetParent(&pStyleSheet->GetItemSet());
+ }
+ } else {
+ UINT16 nSuroDum;
+ rIn>>nSuroDum;
+ }
+ }
+ if (aCompat.GetBytesLeft()>0) { // ab 14-01-1997 (noch Vers 12) EdgeInfoRec
+ rIn>>aEdgeInfo;
+ } else {
+ bTmpDirtyOnAfterRead=TRUE;
+ }
+ if (rHead.GetVersion()>nAktSdrFileVersion) {
+ bTmpDirtyOnAfterRead=TRUE;
+ }
+}
+
+void SdrEdgeObj::AfterRead()
+{
+ SdrTextObj::AfterRead();
+ aCon1.AfterRead(this);
+ aCon2.AfterRead(this);
+ if (aCon1.pObj!=NULL) aCon1.pObj->AddListener(*this);
+ if (aCon2.pObj!=NULL) aCon2.pObj->AddListener(*this);
+ if (bTmpDirtyOnAfterRead) {
+ // fuer Import von Objekten ohne EdgeInfoRec
+ bTmpDirtyOnAfterRead=FALSE;
+ bEdgeTrackDirty=TRUE;
+ }
+}
+
+Point SdrEdgeObj::GetTailPoint( BOOL bTail ) const
+{
+ if( pEdgeTrack && pEdgeTrack->GetPointCount()!=0)
+ {
+ const XPolygon& rTrack0 = *pEdgeTrack;
+ if(bTail)
+ {
+ return rTrack0[0];
+ }
+ else
+ {
+ const USHORT nSiz = rTrack0.GetPointCount() - 1;
+ return rTrack0[nSiz];
+ }
+ }
+ else
+ {
+ if(bTail)
+ return aOutRect.TopLeft();
+ else
+ return aOutRect.BottomRight();
+ }
+
+}
+
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
new file mode 100644
index 0000000000..19169743d4
--- /dev/null
+++ b/svx/source/svdraw/svdograf.cxx
@@ -0,0 +1,2167 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdograf.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _ANIMATION
+
+#ifndef _SFXINIMGR_HXX //autogen wg. SfxIniManager
+#include <svtools/iniman.hxx>
+#endif
+#ifndef SVX_LIGHT
+#include <so3/lnkbase.hxx>
+#endif
+
+#include <math.h>
+#include <vcl/salbtype.hxx>
+#include <sot/formats.hxx>
+#include <tools/urlobj.hxx>
+#include <svtools/style.hxx>
+#include <svtools/filter.hxx>
+#include <svtools/urihelper.hxx>
+#include <goodies/grfmgr.hxx>
+#include "linkmgr.hxx"
+#include "svdxout.hxx"
+#include "svdio.hxx"
+#include "svdetc.hxx"
+#include "svdglob.hxx"
+#include "svdstr.hrc"
+#include "svdpool.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdmrkv.hxx"
+#include "svdpagv.hxx"
+#include "svdviter.hxx"
+#include "svdview.hxx"
+#include "impgrf.hxx"
+#include "svdograf.hxx"
+#include "svdogrp.hxx"
+#include "xbitmap.hxx"
+#include "xbtmpit.hxx"
+#include "xflbmtit.hxx"
+#include "svdundo.hxx"
+#include "svdfmtf.hxx"
+
+#ifndef SVX_LIGHT
+
+// ------------------
+// - SdrGraphicLink -
+// ------------------
+
+class SdrGraphicLink : public SvBaseLink
+{
+ SdrGrafObj* pGrafObj;
+
+public:
+ SdrGraphicLink(SdrGrafObj* pObj);
+ virtual ~SdrGraphicLink();
+ virtual void Closed();
+ virtual void DataChanged(SvData& rData);
+ BOOL Connect() { return 0 != SvBaseLink::GetRealObject(); }
+};
+
+// -----------------------------------------------------------------------------
+
+SdrGraphicLink::SdrGraphicLink(SdrGrafObj* pObj):
+ SvBaseLink(LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB),
+ pGrafObj(pObj)
+{
+ SetSynchron(FALSE);
+}
+
+// -----------------------------------------------------------------------------
+
+SdrGraphicLink::~SdrGraphicLink()
+{
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGraphicLink::DataChanged(SvData& rData)
+{
+#ifndef SVX_LIGHT
+ SdrModel* pModel = pGrafObj==NULL ? NULL : pGrafObj->GetModel();
+ SvxLinkManager* pLinkManager= pModel ==NULL ? NULL : pModel->GetLinkManager();
+
+ if (pLinkManager!=NULL)
+ {
+ const ULONG nFormat = rData.GetFormat();
+ GraphicType eOldGraphicType = pGrafObj->GetGraphicType(); // kein Hereinswappen
+ BOOL bIsChanged = pModel->IsChanged();
+ pLinkManager->GetDisplayNames(*this,NULL,&pGrafObj->aFileName,NULL,&pGrafObj->aFilterName);
+
+ if (nFormat == SOT_FORMATSTR_ID_SVXB)
+ {
+ Graphic* pGraphic = NULL;
+
+ if (rData.GetData((SvDataCopyStream**) &pGraphic, Graphic::StaticType(), TRANSFER_REFERENCE))
+ {
+ pGrafObj->SetGraphic( *pGraphic );
+
+ if (eOldGraphicType != GRAPHIC_NONE)
+ pGrafObj->SetChanged();
+ else
+ pModel->SetChanged(bIsChanged);
+ }
+ }
+ else if (rData.GetFormat() != SvxLinkManager::RegisterStatusInfoId())
+ {
+ switch( nFormat)
+ {
+ case FORMAT_GDIMETAFILE:
+ {
+ GDIMetaFile* pMetaFile=NULL;
+ if (rData.GetData(&pMetaFile,TRANSFER_REFERENCE))
+ {
+ pGrafObj->SetGraphic(*pMetaFile);
+
+ if (eOldGraphicType != GRAPHIC_NONE)
+ pGrafObj->SetChanged();
+ else
+ pModel->SetChanged(bIsChanged);
+ }
+ }
+ break;
+
+ case FORMAT_BITMAP:
+ {
+ Bitmap* pBmp=NULL;
+ if (rData.GetData(&pBmp,TRANSFER_REFERENCE))
+ {
+ pGrafObj->SetGraphic(*pBmp);
+
+ if (eOldGraphicType != GRAPHIC_NONE)
+ pGrafObj->SetChanged();
+ else
+ pModel->SetChanged(bIsChanged);
+ }
+ }
+ break;
+
+ default:
+ pGrafObj->SendRepaintBroadcast();
+ break;
+ }
+ }
+ }
+#endif
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGraphicLink::Closed()
+{
+ // Die Verbindung wird aufgehoben; pLink des Objekts auf NULL setzen, da die Link-Instanz ja gerade destruiert wird.
+ pGrafObj->ForceSwapIn();
+ pGrafObj->pGraphicLink=NULL;
+ pGrafObj->ReleaseGraphicLink();
+ SvBaseLink::Closed();
+}
+
+#else
+
+GraphicFilter* SVX_LIGHT_pGrapicFilter = NULL;
+
+GraphicFilter* SVX_LIGHT_GetGrfFilter_Impl()
+{
+ if( !SVX_LIGHT_pGrapicFilter )
+ {
+ SVX_LIGHT_pGrapicFilter = new GraphicFilter;
+
+ INetURLObject aFilterURL;
+
+ aFilterURL.SetSmartProtocol( INET_PROT_FILE );
+ aFilterURL.SetSmartURL( GetpApp()->GetAppFileName() );
+ aFilterURL.removeSegment();
+ aFilterURL.removeFinalSlash();
+
+ INetURLObject aConfigURL( aFilterURL );
+
+ aFilterURL.Append( "filter" );
+#ifndef UNX
+ aConfigURL.Append( "sop.ini" );
+#else
+ aConfigURL.Append( "soprc" );
+#endif
+
+ SVX_LIGHT_pGrapicFilter->SetFilterPath( aFilterURL.PathToFileName() );
+ SVX_LIGHT_pGrapicFilter->SetConfigPath( aConfigURL.PathToFileName() );
+ }
+
+ const Link aLink;
+ SVX_LIGHT_pGrapicFilter->SetStartFilterHdl( aLink );
+ SVX_LIGHT_pGrapicFilter->SetEndFilterHdl( aLink );
+ SVX_LIGHT_pGrapicFilter->SetUpdatePercentHdl( aLink );
+ return SVX_LIGHT_pGrapicFilter;
+}
+
+
+#endif // SVX_LIGHT
+
+// --------------
+// - SdrGrafObj -
+// --------------
+
+TYPEINIT1(SdrGrafObj,SdrRectObj);
+
+// -----------------------------------------------------------------------------
+
+SdrGrafObj::SdrGrafObj():
+ bMirrored ( FALSE ),
+ pGraphicLink ( NULL )
+{
+ pGraphic = new GraphicObject;
+ pGraphic->SetAnimationNotifyHdl( LINK( this, SdrGrafObj, ImpAnimationHdl ) );
+ pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), Application::IsRemoteServer() ? 60000 : 20000 );
+ nGrafStreamPos=0;
+ bSwappedOut = bNotLoaded = FALSE;
+ bNoShear=TRUE;
+
+#ifdef GRAFATTR
+ pGrafAttr = NULL;
+ bCopyToPoolOnAfterRead = FALSE;
+#endif // GRAFATTR
+}
+
+// -----------------------------------------------------------------------------
+
+SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect):
+ SdrRectObj ( rRect ),
+ bMirrored ( FALSE ),
+ pGraphicLink ( NULL )
+{
+ pGraphic = new GraphicObject( rGrf );
+ pGraphic->SetAnimationNotifyHdl( LINK( this, SdrGrafObj, ImpAnimationHdl ) );
+ pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), Application::IsRemoteServer() ? 60000 : 20000 );
+ nGrafStreamPos = 0;
+ bSwappedOut = bNotLoaded = FALSE;
+ bNoShear = TRUE;
+
+#ifdef GRAFATTR
+ pGrafAttr = NULL;
+ bCopyToPoolOnAfterRead = FALSE;
+#endif // GRAFATTR
+}
+
+// -----------------------------------------------------------------------------
+
+SdrGrafObj::SdrGrafObj( const Graphic& rGrf ):
+ bMirrored ( FALSE ),
+ pGraphicLink ( NULL )
+{
+ pGraphic = new GraphicObject( rGrf );
+ pGraphic->SetAnimationNotifyHdl( LINK( this, SdrGrafObj, ImpAnimationHdl ) );
+ pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), Application::IsRemoteServer() ? 60000 : 20000 );
+ nGrafStreamPos = 0;
+ bSwappedOut = bNotLoaded = FALSE;
+ bNoShear = TRUE;
+
+#ifdef GRAFATTR
+ pGrafAttr = NULL;
+ bCopyToPoolOnAfterRead = FALSE;
+#endif // GRAFATTR
+}
+
+// -----------------------------------------------------------------------------
+
+SdrGrafObj::~SdrGrafObj()
+{
+ delete pGraphic;
+ ImpLinkAbmeldung();
+
+#ifdef GRAFATTR
+ pGrafAttr = (SdrGrafSetItem*) ImpSetNewAttr( pGrafAttr, NULL, FALSE );
+#endif // GRAFATTR
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SetGraphicObject( const GraphicObject& rGrfObj )
+{
+ *pGraphic = rGrfObj;
+ pGraphic->SetAnimationNotifyHdl( LINK( this, SdrGrafObj, ImpAnimationHdl ) );
+ pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), Application::IsRemoteServer() ? 60000 : 20000 );
+ nGrafStreamPos = 0;
+ bSwappedOut = bNotLoaded = FALSE;
+ SetChanged();
+ SendRepaintBroadcast();
+}
+
+// -----------------------------------------------------------------------------
+
+const GraphicObject& SdrGrafObj::GetGraphicObject() const
+{
+ return *pGraphic;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SetGraphic( const Graphic& rGrf )
+{
+ pGraphic->SetGraphic( rGrf );
+ nGrafStreamPos = 0;
+ bSwappedOut = bNotLoaded = FALSE;
+ SetChanged();
+ SendRepaintBroadcast();
+}
+
+// -----------------------------------------------------------------------------
+
+const Graphic& SdrGrafObj::GetGraphic() const
+{
+ return pGraphic->GetGraphic();
+}
+
+// -----------------------------------------------------------------------------
+
+Graphic SdrGrafObj::GetTransformedGraphic( ULONG nTransformFlags ) const
+{
+ Graphic aTransGraphic;
+ GraphicType eType = GetGraphicType();
+
+ if( SDRGRAFOBJ_TRANSFORMATTR_NONE == nTransformFlags )
+ aTransGraphic = GetGraphic();
+ else if( eType != GRAPHIC_NONE )
+ {
+ ( (SdrGrafObj*) this )->ImpSetAttrToGrafInfo();
+
+ GraphicAttr aActAttr( aGrafInfo );
+
+ if( nTransformFlags & SDRGRAFOBJ_TRANSFORMATTR_MIRROR )
+ {
+ USHORT nMirrorCase = ( aGeo.nDrehWink == 18000 ) ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 );
+ FASTBOOL bHMirr = nMirrorCase == 2 || nMirrorCase == 4;
+ FASTBOOL bVMirr = nMirrorCase == 3 || nMirrorCase == 4;
+
+ aActAttr.SetMirrorFlags( ( bHMirr ? BMP_MIRROR_HORZ : 0 ) | ( bVMirr ? BMP_MIRROR_VERT : 0 ) );
+ }
+
+ if( ( nTransformFlags & SDRGRAFOBJ_TRANSFORMATTR_ROTATE ) &&
+ ( aGeo.nDrehWink && aGeo.nDrehWink != 18000 ) && ( GRAPHIC_BITMAP == eType ) && !IsAnimated() )
+ {
+ aActAttr.SetRotation( aGeo.nDrehWink / 10, GetLogicRect().GetSize() );
+ }
+
+ aTransGraphic = pGraphic->GetTransformedGraphic( &aActAttr );
+ }
+
+ return aTransGraphic;
+}
+
+// -----------------------------------------------------------------------------
+
+GraphicType SdrGrafObj::GetGraphicType() const
+{
+ return pGraphic->GetType();
+}
+
+// -----------------------------------------------------------------------------
+
+FASTBOOL SdrGrafObj::IsAnimated() const
+{
+ return pGraphic->IsAnimated();
+}
+
+// -----------------------------------------------------------------------------
+
+FASTBOOL SdrGrafObj::IsTransparent() const
+{
+ return pGraphic->IsTransparent();
+}
+
+// -----------------------------------------------------------------------------
+
+FASTBOOL SdrGrafObj::IsEPS() const
+{
+ return pGraphic->IsEPS();
+}
+
+// -----------------------------------------------------------------------------
+
+const MapMode& SdrGrafObj::GetGrafPrefMapMode() const
+{
+ return pGraphic->GetPrefMapMode();
+}
+
+// -----------------------------------------------------------------------------
+
+const Size& SdrGrafObj::GetGrafPrefSize() const
+{
+ return pGraphic->GetPrefSize();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SetFileName(const String& rFileName)
+{
+ aFileName = rFileName;
+ SetChanged();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SetFilterName(const String& rFilterName)
+{
+ aFilterName = rFilterName;
+ SetChanged();
+}
+
+// -----------------------------------------------------------------------------
+
+FASTBOOL SdrGrafObj::HasSetName() const
+{
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SetName(const XubString& rStr)
+{
+ aName = rStr;
+ SetChanged();
+}
+
+// -----------------------------------------------------------------------------
+
+XubString SdrGrafObj::GetName() const
+{
+ return aName;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ForceSwapIn() const
+{
+ pGraphic->FireSwapInRequest();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ForceSwapOut() const
+{
+ pGraphic->FireSwapOutRequest();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ImpLinkAnmeldung()
+{
+#ifndef SVX_LIGHT
+
+ SvxLinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL;
+
+ if( pLinkManager != NULL && pGraphicLink == NULL )
+ {
+ // Nicht 2x Anmelden
+ if(aFileName.Len())
+ {
+ pGraphicLink = new SdrGraphicLink( this );
+ pLinkManager->InsertFileLink( *pGraphicLink, OBJECT_CLIENT_GRF, aFileName,
+ (aFilterName.Len() ? &aFilterName : NULL) , NULL );
+ pGraphicLink->Connect();
+
+ FASTBOOL bDelayedLoad = pModel != NULL && pModel->IsSwapGraphics();
+
+#ifndef SVX_LIGHT
+ if( !bDelayedLoad )
+ {
+ BOOL bIsChanged = pModel->IsChanged();
+ pGraphicLink->Update();
+ pModel->SetChanged( bIsChanged );
+ }
+#endif
+ }
+ }
+
+#endif // SVX_LIGHT
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ImpLinkAbmeldung()
+{
+#ifndef SVX_LIGHT
+
+ SvxLinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL;
+
+ if( pLinkManager != NULL && pGraphicLink!=NULL)
+ {
+ // Bei Remove wird *pGraphicLink implizit deleted
+ pLinkManager->Remove( *pGraphicLink );
+ pGraphicLink=NULL;
+ }
+
+#endif // SVX_LIGHT
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SetGraphicLink( const String& rFileName, const String& rFilterName )
+{
+ ImpLinkAbmeldung();
+ aFileName = rFileName;
+ aFilterName = rFilterName;
+ ImpLinkAnmeldung();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ReleaseGraphicLink()
+{
+ ImpLinkAbmeldung();
+ aFileName = String();
+ aFilterName = String();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ FASTBOOL bBmp = pGraphic->GetType() == GRAPHIC_BITMAP;
+ FASTBOOL bTrans = pGraphic->IsTransparent();
+ FASTBOOL bAnim = pGraphic->IsAnimated();
+ FASTBOOL bNoPresBmp = bBmp && !bEmptyPresObj;
+
+ rInfo.bResizeFreeAllowed = aGeo.nDrehWink % 9000 == 0 ||
+ aGeo.nDrehWink % 18000 == 0 ||
+ aGeo.nDrehWink % 27000 == 0;
+
+ rInfo.bResizePropAllowed = TRUE;
+ rInfo.bRotateFreeAllowed = bNoPresBmp && !bAnim;
+ rInfo.bRotate90Allowed = bNoPresBmp && !bAnim;
+ rInfo.bMirrorFreeAllowed = bNoPresBmp && !bAnim;
+ rInfo.bMirror45Allowed = bNoPresBmp && !bAnim;
+ rInfo.bMirror90Allowed = !bEmptyPresObj;
+ rInfo.bTransparenceAllowed = FALSE;
+ rInfo.bGradientAllowed = FALSE;
+ rInfo.bShearAllowed = FALSE;
+ rInfo.bCanConvToPath = FALSE;
+ rInfo.bCanConvToPathLineToArea = FALSE;
+ rInfo.bCanConvToPolyLineToArea = FALSE;
+ rInfo.bCanConvToPoly = !IsEPS();
+ rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
+}
+
+// -----------------------------------------------------------------------------
+
+UINT16 SdrGrafObj::GetObjIdentifier() const
+{
+ return UINT16( OBJ_GRAF );
+}
+
+// -----------------------------------------------------------------------------
+
+// Liefert FALSE, wenn die Pres-Bitmap zu gross ist
+FASTBOOL SdrGrafObj::ImpPaintEmptyPres( OutputDevice* pOutDev ) const
+{
+ Size aSizePix( pOutDev->LogicToPixel( pGraphic->GetPrefSize(), pGraphic->GetPrefMapMode() ) );
+ Size aSize( pOutDev->PixelToLogic( aSizePix ) );
+ Point aPos( aRect.Center() );
+ FASTBOOL bRet;
+
+ aPos.X() -= aSize.Width() >> 1;
+ aPos.Y() -= aSize.Height() >> 1;
+
+ if( aPos.X() > aRect.Left() && aPos.Y() > aRect.Top())
+ {
+ const Graphic& rGraphic = pGraphic->GetGraphic();
+ FASTBOOL bCache=pModel!=NULL && pModel->IsBitmapCaching();
+ FASTBOOL bBmp = pGraphic->GetType() == GRAPHIC_BITMAP;
+
+ if( bBmp )
+ {
+ const Size aSz( pOutDev->PixelToLogic( rGraphic.GetBitmap().GetSizePixel() ) );
+ pGraphic->Draw( pOutDev, aPos, aSz, NULL );
+ }
+ else
+ {
+ const ULONG nOldDrawMode = pOutDev->GetDrawMode();
+
+ if( ( nOldDrawMode & DRAWMODE_GRAYBITMAP ) != 0 )
+ {
+ // Falls Modus GRAYBITMAP, wollen wir auch Mtf's als Graustufen darstellen
+ ULONG nNewDrawMode = nOldDrawMode;
+ nNewDrawMode &= ~( DRAWMODE_BLACKLINE | DRAWMODE_BLACKFILL | DRAWMODE_WHITEFILL | DRAWMODE_NOFILL );
+ pOutDev->SetDrawMode( nNewDrawMode |= DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL );
+ }
+
+ rGraphic.Draw( pOutDev, aPos );
+ pOutDev->SetDrawMode( nOldDrawMode );
+ }
+
+ pOutDev->SetFillColor();
+ bRet = TRUE;
+ }
+ else
+ bRet = FALSE;
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ImpPaintReplacement(OutputDevice* pOutDev, const XubString& rText, const Bitmap* pBmp, FASTBOOL bFill) const
+{
+ if( bFill )
+ {
+ pOutDev->SetLineColor();
+ pOutDev->SetFillColor( COL_LIGHTGRAY );
+ }
+
+ Rectangle aRect1(pOutDev->LogicToPixel(aRect));
+ Rectangle aTextRect(aRect1);
+ Rectangle aRect2(aRect1);
+ aRect2.Left()++; aRect2.Top()++; aRect2.Right()--; aRect2.Bottom()--;
+ Point aTopLeft(aRect1.TopLeft());
+ Point aBmpPos(aTopLeft);
+
+ if( pBmp != NULL )
+ {
+ Size aBmpSize(pBmp->GetSizePixel());
+ long nRectWdt=aTextRect.Right()-aTextRect.Left();
+ long nRectHgt=aTextRect.Bottom()-aTextRect.Top();
+ long nBmpWdt=aBmpSize.Width();
+ long nBmpHgt=aBmpSize.Height();
+ BOOL bText(rText.Len());
+
+ long nMinWdt = nBmpWdt;
+ long nMinHgt = nBmpHgt;
+
+ if( bText )
+ {
+ nMinWdt=2 + nBmpWdt * 2 + 3;
+ nMinHgt=2 + nBmpHgt * 2 + 3;
+ }
+
+ if( nRectWdt < nMinWdt || nRectHgt < nMinHgt )
+ pBmp=NULL;
+ else
+ {
+ aTextRect.Left() += nBmpWdt;
+
+ if( bText )
+ aTextRect.Left()+=2+3;
+ }
+
+ aBmpPos.X() += 2;
+ aBmpPos.Y() += 2;
+
+ if( aGeo.nDrehWink!=0 )
+ {
+ Point aRef(aBmpPos);
+ aRef.X()-=aBmpSize.Width()/2+2;
+ aRef.Y()-=aBmpSize.Height()/2+2;
+ double nSin=sin(aGeo.nDrehWink*nPi180);
+ double nCos=cos(aGeo.nDrehWink*nPi180);
+ RotatePoint(aBmpPos,aRef,nSin,nCos);
+ }
+ }
+
+ const BOOL bOldMap = pOutDev->IsMapModeEnabled();
+ pOutDev->EnableMapMode( FALSE );
+
+ if( aGeo.nDrehWink == 0 && aGeo.nShearWink == 0 )
+ {
+ if (bFill)
+ pOutDev->DrawRect(aRect);
+
+ if (pBmp!=NULL)
+ pOutDev->DrawBitmap(aBmpPos,*pBmp);
+
+ const StyleSettings& rStyleSettings = pOutDev->GetSettings().GetStyleSettings();
+
+ pOutDev->SetFillColor();
+ pOutDev->SetLineColor( rStyleSettings.GetShadowColor() );
+ pOutDev->DrawLine(aRect1.TopLeft(),aRect1.TopRight()); pOutDev->DrawLine(aRect1.TopLeft(),aRect1.BottomLeft());
+
+
+ pOutDev->SetLineColor( rStyleSettings.GetLightColor() );
+ pOutDev->DrawLine(aRect1.TopRight(),aRect1.BottomRight()); pOutDev->DrawLine(aRect1.BottomLeft(),aRect1.BottomRight());
+
+ pOutDev->SetLineColor( rStyleSettings.GetLightColor() );
+ pOutDev->DrawLine(aRect2.TopLeft(),aRect2.TopRight()); pOutDev->DrawLine(aRect2.TopLeft(),aRect2.BottomLeft());
+
+ pOutDev->SetLineColor( rStyleSettings.GetShadowColor() );
+ pOutDev->DrawLine(aRect2.TopRight(),aRect2.BottomRight()); pOutDev->DrawLine(aRect2.BottomLeft(),aRect2.BottomRight());
+ }
+ else
+ {
+ Polygon aPoly1(Rect2Poly(aRect1,aGeo));
+ Polygon aPoly2(5);
+ aPoly2[0]=aRect2.TopLeft();
+ aPoly2[1]=aRect2.TopRight();
+ aPoly2[2]=aRect2.BottomRight();
+ aPoly2[3]=aRect2.BottomLeft();
+ aPoly2[4]=aRect2.TopLeft();
+
+ if (aGeo.nShearWink != 0)
+ ShearPoly(aPoly2,aTopLeft,aGeo.nTan);
+
+ if( aGeo.nDrehWink != 0 )
+ RotatePoly(aPoly2,aTopLeft,aGeo.nSin,aGeo.nCos);
+
+ if( bFill )
+ pOutDev->DrawPolygon(aPoly1);
+
+ if( pBmp != NULL )
+ pOutDev->DrawBitmap( aBmpPos, *pBmp );
+
+ pOutDev->SetFillColor();
+
+ long nHWink=NormAngle360(aGeo.nDrehWink);
+ long nVWink=NormAngle360(aGeo.nDrehWink-aGeo.nShearWink);
+ FASTBOOL bHorzChg=nHWink>13500 && nHWink<=31500;
+ FASTBOOL bVertChg=nVWink>4500 && nVWink<=22500;
+
+ const StyleSettings& rStyleSettings = pOutDev->GetSettings().GetStyleSettings();
+ Color a3DLightColor( rStyleSettings.GetLightColor() );
+ Color a3DShadowColor( rStyleSettings.GetShadowColor() );
+
+ pOutDev->SetLineColor( bHorzChg ? a3DShadowColor : a3DLightColor);
+ pOutDev->DrawLine(aPoly2[0],aPoly2[1]);
+
+ pOutDev->SetLineColor( bHorzChg ? a3DLightColor : a3DShadowColor);
+ pOutDev->DrawLine(aPoly2[2],aPoly2[3]);
+
+ pOutDev->SetLineColor( bVertChg ? a3DLightColor : a3DShadowColor);
+ pOutDev->DrawLine(aPoly2[1],aPoly2[2]);
+
+ pOutDev->SetLineColor( bVertChg ? a3DShadowColor : a3DLightColor);
+ pOutDev->DrawLine(aPoly2[3],aPoly2[4]);
+
+ pOutDev->SetLineColor( bHorzChg ? a3DLightColor : a3DShadowColor);
+ pOutDev->DrawLine(aPoly1[0],aPoly1[1]);
+
+ pOutDev->SetLineColor( bHorzChg ? a3DShadowColor : a3DLightColor);
+ pOutDev->DrawLine(aPoly1[2],aPoly1[3]);
+
+ pOutDev->SetLineColor( bVertChg ? a3DShadowColor : a3DLightColor);
+ pOutDev->DrawLine(aPoly1[1],aPoly1[2]);
+
+ pOutDev->SetLineColor( bVertChg ? a3DLightColor : a3DShadowColor);
+ pOutDev->DrawLine(aPoly1[3],aPoly1[4]);
+ }
+ XubString aNam(rText);
+
+ if(aNam.Len())
+ {
+ Size aOutSize(aTextRect.GetSize()); aOutSize.Width()-=6; aOutSize.Height()-=6;
+
+ if (aOutSize.Width()>=4 || aOutSize.Height()>=4)
+ {
+ Point aOutPos(aTextRect.TopLeft()); aOutPos.X()+=3; aOutPos.Y()+=3;
+ long nMaxOutY=aOutPos.Y()+aOutSize.Height();
+ Font aFontMerk(pOutDev->GetFont());
+ Font aFont(System::GetStandardFont(STDFONT_SWISS));
+ aFont.SetColor(COL_LIGHTRED);
+ aFont.SetTransparent(TRUE);
+ aFont.SetLineOrientation(USHORT(NormAngle360(aGeo.nDrehWink)/10));
+
+ if (IsLinkedGraphic())
+ aFont.SetUnderline(UNDERLINE_SINGLE);
+ Size aFontSize(Size(0,aGeo.nDrehWink % 9000==0 ? 12 : 14));
+
+ if (aFontSize.Height()>aOutSize.Height())
+ aFontSize.Height()=aOutSize.Height();
+ aFont.SetSize(aFontSize);
+ pOutDev->SetFont(aFont);
+ String aOutStr(aNam);
+
+ while(aOutStr.Len() && aOutPos.Y() <= nMaxOutY)
+ {
+ String aStr1(aOutStr);
+ INT32 nTextWidth = pOutDev->GetTextWidth(aStr1);
+ INT32 nTextHeight = pOutDev->GetTextHeight();
+
+ while(aStr1.Len() && nTextWidth > aOutSize.Width())
+ {
+ aStr1.Erase(aStr1.Len() - 1);
+ nTextWidth = pOutDev->GetTextWidth(aStr1);
+ nTextHeight = pOutDev->GetTextHeight();
+ }
+ Point aPos(aOutPos);
+ aOutPos.Y() += nTextHeight;
+
+ if (aOutPos.Y()<=nMaxOutY)
+ {
+ if (aGeo.nShearWink!=0) ShearPoint(aPos,aTopLeft,aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoint(aPos,aTopLeft,aGeo.nSin,aGeo.nCos);
+ pOutDev->DrawText(aPos,aStr1);
+ aOutStr.Erase(0, aStr1.Len());
+ }
+ }
+ pOutDev->SetFont(aFontMerk);
+ }
+ }
+ pOutDev->EnableMapMode( bOldMap );
+}
+
+// -----------------------------------------------------------------------------
+
+FASTBOOL SdrGrafObj::Paint( ExtOutputDevice& rOut, const SdrPaintInfoRec& rInfoRec ) const
+{
+ // Hidden objects on masterpages, draw nothing
+ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+ return TRUE;
+
+ // Do not print empty PresObj's
+ if(OUTDEV_PRINTER == rOut.GetOutDev()->GetOutDevType() && bEmptyPresObj)
+ return TRUE;
+
+ FASTBOOL bDraft=(rInfoRec.nPaintMode & SDRPAINTMODE_DRAFTGRAF) !=0;
+ FASTBOOL bLoading=FALSE;
+ OutputDevice* pOutDev=rOut.GetOutDev();
+ OutDevType eOutDevType=pOutDev!=NULL ? pOutDev->GetOutDevType() : OUTDEV_DONTKNOW;
+ FASTBOOL bJustFillCache=pOutDev==NULL;
+ FASTBOOL bPrn=!bJustFillCache && eOutDevType==OUTDEV_PRINTER;
+ GDIMetaFile* pRecMetaFile=!bJustFillCache ? pOutDev->GetConnectMetaFile() : NULL;
+ FASTBOOL bMtfRecording=pRecMetaFile!=NULL && pRecMetaFile->IsRecord() && !pRecMetaFile->IsPause();
+ const SdrView* pView=rInfoRec.pPV!=NULL ? &rInfoRec.pPV->GetView() : NULL;
+
+ if( !bDraft && bSwappedOut )
+ {
+ if( !bPrn && !bMtfRecording && eOutDevType == OUTDEV_WINDOW && pView && pView->IsSwapAsynchron() )
+ {
+ ( (SdrView*) pView )->ImpAddAsyncObj( this, pOutDev );
+ bLoading=TRUE;
+ }
+ else
+ ForceSwapIn();
+ }
+#ifndef SVX_LIGHT
+ else if( !bSwappedOut && pGraphicLink && ( pGraphic->GetType() == GRAPHIC_NONE ) )
+ {
+ BOOL bIsChanged = pModel->IsChanged();
+ pGraphicLink->Update();
+ pModel->SetChanged( bIsChanged );
+ }
+#endif
+
+ GraphicType eType = pGraphic->GetType();
+
+ if( eType == GRAPHIC_NONE || eType == GRAPHIC_DEFAULT || bSwappedOut )
+ bDraft=TRUE;
+
+ long nDrehWink = aGeo.nDrehWink;
+ long nShearWink = aGeo.nShearWink;
+ USHORT nMirrorCase = 0;
+ FASTBOOL bCache = pModel != NULL && pModel->IsBitmapCaching();
+ FASTBOOL bBmp = eType == GRAPHIC_BITMAP;
+ FASTBOOL bRotate = nDrehWink!=0 && nDrehWink!=18000;
+ FASTBOOL bShear = nShearWink!=0;
+ FASTBOOL bMirror = bMirrored;
+ FASTBOOL bHMirr;
+ FASTBOOL bVMirr;
+ FASTBOOL bRota90 = nDrehWink==9000 || nDrehWink==18000 || nDrehWink==27000;
+ FASTBOOL bRota180 = nDrehWink==18000;
+
+ // 4 Faelle:
+ // 4 | 3 H&V gespiegelt | nur Vertikal
+ // ---+--- ---------------+-----------------
+ // 2 | 1 nur Horizontal | nicht gespiegelt
+ nMirrorCase=bRota180 ? (bMirror ? 3 : 4) : (bMirror ? 2 : 1);
+ bHMirr= nMirrorCase==2 || nMirrorCase==4;
+ bVMirr= nMirrorCase==3 || nMirrorCase==4;
+
+ if( !bEmptyPresObj && !bDraft )
+ {
+#ifdef GRAFATTR
+ GraphicAttr aAttr( aGrafInfo );
+#else // GRAFATTR
+ GraphicAttr aAttr;
+#endif // GRAFATTR
+
+ aAttr.SetMirrorFlags( ( bHMirr ? BMP_MIRROR_HORZ : 0 ) | ( bVMirr ? BMP_MIRROR_VERT : 0 ) );
+
+ if( bBmp )
+ {
+ Rectangle aDrawRect( ImpGetOutputRect( pOutDev ) );
+ Point aTopLeft( aDrawRect.TopLeft() );
+ Size aDrawSize( aDrawRect.GetSize() );
+
+ if( pGraphic->IsAnimated() )
+ {
+ SdrAnimationMode eAnimMode = SDR_ANIMATION_ANIMATE;
+ FASTBOOL bEnable = TRUE;
+
+ if( rInfoRec.pPV != NULL )
+ {
+ eAnimMode= ((SdrPaintView&) rInfoRec.pPV->GetView()).GetAnimationMode();
+ bEnable = eAnimMode != SDR_ANIMATION_DISABLE;
+ }
+
+ if( bEnable )
+ {
+ if( eAnimMode == SDR_ANIMATION_ANIMATE )
+ pGraphic->StartAnimation( pOutDev, aTopLeft, aDrawSize, 0, &aAttr );
+ else if( eAnimMode == SDR_ANIMATION_DONT_ANIMATE )
+ pGraphic->Draw( pOutDev, aTopLeft, aDrawSize, &aAttr );
+ }
+ }
+ else
+ {
+ if( bRotate && !bRota180 )
+ aAttr.SetRotation( nDrehWink / 10, GetLogicRect().GetSize() );
+
+ pGraphic->Draw( pOutDev, aTopLeft, aDrawSize, &aAttr );
+ }
+ }
+ else
+ {
+ // MetaFiles
+ Point aOutPos( aRect.TopLeft() );
+ const Size aOutSiz( aRect.GetSize() );
+ const ULONG nOldDrawMode = pOutDev->GetDrawMode();
+
+ if( bRota180 )
+ {
+ aOutPos.X() -= ( aRect.GetWidth() - 1L );
+ aOutPos.Y() -= ( aRect.GetHeight() - 1L );
+ }
+
+ // Falls Modus GRAYBITMAP, wollen wir auch Mtf's als Graustufen darstellen
+ if( nOldDrawMode & DRAWMODE_GRAYBITMAP )
+ {
+ ULONG nNewDrawMode = nOldDrawMode;
+ nNewDrawMode &= ~( DRAWMODE_BLACKLINE | DRAWMODE_BLACKFILL | DRAWMODE_WHITEFILL | DRAWMODE_NOFILL );
+ pOutDev->SetDrawMode( nNewDrawMode |= DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL );
+ }
+
+ pGraphic->Draw( pOutDev, aOutPos, aOutSiz, &aAttr );
+ pOutDev->SetDrawMode( nOldDrawMode );
+ }
+ }
+
+ // auch GRAPHIC_NONE oder SwappedOut( AsyncSwap )
+ if( ( bEmptyPresObj || bDraft ) &&
+ ( !bDraft || ( ( rInfoRec.nPaintMode & SDRPAINTMODE_HIDEDRAFTGRAF ) == 0 ) ) &&
+ !bJustFillCache )
+ {
+ XubString aText;
+ Bitmap* pBmp = NULL;
+ FASTBOOL bFill = FALSE;
+
+ if( bEmptyPresObj )
+ bFill = !ImpPaintEmptyPres( pOutDev );
+
+ // und nun noch einen grauen Rahmen drum herum, Text rein, ...
+ if( !bEmptyPresObj )
+ {
+ aText = aFileName;
+
+ if(!aText.Len())
+ {
+ aText = aName;
+
+ if( bLoading )
+ {
+ aText.AppendAscii(" ...");
+ //FASTBOOL bNoName=aText.Len()==0;
+ //if (!bNoName) aText.Insert(' ',0);
+ //else aText.Insert("...",0);
+ //aText.Insert("Loading",0);
+ }
+ }
+
+#ifndef SVX_LIGHT
+ pBmp = new Bitmap( ResId ( BMAP_GrafikEi, ImpGetResMgr() ) );
+#endif
+ }
+
+ ImpPaintReplacement( pOutDev, aText, pBmp, bFill );
+ delete pBmp;
+ }
+
+ if( bPrn )
+ ForceSwapOut();
+
+ return( HasText() ? SdrTextObj::Paint( rOut, rInfoRec ) : TRUE );
+}
+
+// -----------------------------------------------------------------------------
+
+SdrObject* SdrGrafObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ return ImpCheckHit( rPnt, nTol, pVisiLayer, TRUE );
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::TakeObjNameSingul(XubString& rName) const
+{
+ GraphicType eType = pGraphic->GetType();
+
+ if( !IsLinkedGraphic() )
+ {
+ switch( eType )
+ {
+ case GRAPHIC_BITMAP : rName=ImpGetResStr(STR_ObjNameSingulGRAFBMP); break;
+ case GRAPHIC_GDIMETAFILE: rName=ImpGetResStr(STR_ObjNameSingulGRAFMTF); break;
+ case GRAPHIC_NONE : rName=ImpGetResStr(STR_ObjNameSingulGRAFNONE); break;
+ default : rName=ImpGetResStr(STR_ObjNameSingulGRAF); break;
+ }
+ }
+ else
+ {
+ switch( eType )
+ {
+ case GRAPHIC_BITMAP : rName=ImpGetResStr(STR_ObjNameSingulGRAFBMP); break;
+ case GRAPHIC_GDIMETAFILE: rName=ImpGetResStr(STR_ObjNameSingulGRAFMTF); break;
+ case GRAPHIC_NONE : rName=ImpGetResStr(STR_ObjNameSingulGRAFNONE); break;
+ default : rName=ImpGetResStr(STR_ObjNameSingulGRAF); break;
+ }
+ }
+
+ if(aName.Len())
+ {
+ rName.AppendAscii(" '");
+ rName += aName;
+ rName += sal_Unicode('\'');
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::TakeObjNamePlural( XubString& rName ) const
+{
+ const GraphicType eType = pGraphic->GetType();
+
+ if( IsLinkedGraphic() )
+ {
+ switch( eType )
+ {
+ case GRAPHIC_BITMAP : rName=ImpGetResStr(STR_ObjNamePluralGRAFBMP); break;
+ case GRAPHIC_GDIMETAFILE: rName=ImpGetResStr(STR_ObjNamePluralGRAFMTF); break;
+ case GRAPHIC_NONE : rName=ImpGetResStr(STR_ObjNamePluralGRAFNONE); break;
+ default : rName=ImpGetResStr(STR_ObjNamePluralGRAF); break;
+ }
+ }
+ else
+ {
+ switch( eType )
+ {
+ case GRAPHIC_BITMAP : rName=ImpGetResStr(STR_ObjNamePluralGRAFBMP); break;
+ case GRAPHIC_GDIMETAFILE: rName=ImpGetResStr(STR_ObjNamePluralGRAFMTF); break;
+ case GRAPHIC_NONE : rName=ImpGetResStr(STR_ObjNamePluralGRAFNONE); break;
+ default : rName=ImpGetResStr(STR_ObjNamePluralGRAF); break;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::operator=( const SdrObject& rObj )
+{
+ SdrRectObj::operator=( rObj );
+
+ const SdrGrafObj& rGraf = (SdrGrafObj&) rObj;
+
+ pGraphic->SetGraphic( rGraf.GetGraphic() );
+ aCropRect = rGraf.aCropRect;
+ aFileName = rGraf.aFileName;
+ aFilterName = rGraf.aFilterName;
+ aName = rGraf.aName;
+ bMirrored = rGraf.bMirrored;
+
+ if( rGraf.pGraphicLink != NULL)
+ SetGraphicLink( aFileName, aFilterName );
+
+#ifdef GRAFATTR
+ if( ( pGrafAttr = (SdrGrafSetItem*) ImpSetNewAttr( pGrafAttr, ( (SdrGrafObj&) rObj ).pGrafAttr ) ) != NULL )
+ ImpSetAttrToGrafInfo();
+#endif // GRAFATTR
+}
+
+// -----------------------------------------------------------------------------
+
+FASTBOOL SdrGrafObj::HasSpecialDrag() const
+{
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------------
+
+USHORT SdrGrafObj::GetHdlCount() const
+{
+ return 8;
+}
+
+// -----------------------------------------------------------------------------
+
+SdrHdl* SdrGrafObj::GetHdl(USHORT nHdlNum) const
+{
+ return SdrRectObj::GetHdl( nHdlNum + 1 );
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ SdrRectObj::NbcResize( rRef, xFact, yFact );
+
+ FASTBOOL bMirrX = xFact.GetNumerator() < 0;
+ FASTBOOL bMirrY = yFact.GetNumerator() < 0;
+
+ if( bMirrX != bMirrY )
+ bMirrored = !bMirrored;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ SdrRectObj::NbcRotate(rRef,nWink,sn,cs);
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::NbcMirror(const Point& rRef1, const Point& rRef2)
+{
+ SdrRectObj::NbcMirror(rRef1,rRef2);
+ bMirrored = !bMirrored;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ SdrRectObj::NbcRotate( rRef, nWink, tn, bVShear );
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ SdrRectObj::NbcSetSnapRect(rRect);
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::NbcSetLogicRect( const Rectangle& rRect)
+{
+ FASTBOOL bChg=rRect.GetSize()!=aRect.GetSize();
+ SdrRectObj::NbcSetLogicRect(rRect);
+}
+
+// -----------------------------------------------------------------------------
+
+SdrObjGeoData* SdrGrafObj::NewGeoData() const
+{
+ return new SdrGrafObjGeoData;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ SdrRectObj::SaveGeoData(rGeo);
+ SdrGrafObjGeoData& rGGeo=(SdrGrafObjGeoData&)rGeo;
+ rGGeo.bMirrored=bMirrored;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo)
+{
+ long nDrehMerk = aGeo.nDrehWink;
+ long nShearMerk = aGeo.nShearWink;
+ FASTBOOL bMirrMerk = bMirrored;
+ Size aSizMerk( aRect.GetSize() );
+
+ SdrRectObj::RestGeoData(rGeo);
+ SdrGrafObjGeoData& rGGeo=(SdrGrafObjGeoData&)rGeo;
+ bMirrored=rGGeo.bMirrored;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SetPage( SdrPage* pNewPage )
+{
+ FASTBOOL bRemove = pNewPage == NULL && pPage != NULL;
+ FASTBOOL bInsert = pNewPage != NULL && pPage == NULL;
+
+ if( bRemove )
+ {
+ // hier kein SwapIn noetig, weil wenn nicht geladen, dann auch nicht animiert.
+ if( pGraphic->IsAnimated())
+ pGraphic->StopAnimation();
+
+ if( pGraphicLink != NULL )
+ ImpLinkAbmeldung();
+ }
+
+ SdrRectObj::SetPage( pNewPage );
+
+ if(aFileName.Len() && bInsert)
+ ImpLinkAnmeldung();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SetModel( SdrModel* pNewModel )
+{
+ FASTBOOL bChg = pNewModel != pModel;
+
+ if( bChg )
+ {
+ if( nGrafStreamPos !=0 )
+ {
+ ForceSwapIn();
+ nGrafStreamPos = 0;
+ }
+
+ if( pGraphicLink != NULL )
+ ImpLinkAbmeldung();
+ }
+
+ // Model umsetzen
+ SdrRectObj::SetModel(pNewModel);
+
+ if( bChg && aFileName.Len() )
+ ImpLinkAnmeldung();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::StartAnimation( OutputDevice* pOutDev, const Point& rPoint, const Size& rSize, long nExtraData )
+{
+ GraphicAttr aAttr( aGrafInfo );
+ USHORT nMirrorCase = ( aGeo.nDrehWink == 18000 ) ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 );
+ FASTBOOL bHMirr = nMirrorCase == 2 || nMirrorCase == 4;
+ FASTBOOL bVMirr = nMirrorCase == 3 || nMirrorCase == 4;
+
+ aAttr.SetMirrorFlags( ( bHMirr ? BMP_MIRROR_HORZ : 0 ) | ( bVMirr ? BMP_MIRROR_VERT : 0 ) );
+ pGraphic->StartAnimation( pOutDev, rPoint, rSize, nExtraData, &aAttr );
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::StopAnimation(OutputDevice* pOutDev, long nExtraData)
+{
+ pGraphic->StopAnimation( pOutDev, nExtraData );
+}
+
+// -----------------------------------------------------------------------------
+
+FASTBOOL SdrGrafObj::HasGDIMetaFile() const
+{
+ return( pGraphic->GetType() == GRAPHIC_GDIMETAFILE );
+}
+
+// -----------------------------------------------------------------------------
+
+const GDIMetaFile* SdrGrafObj::GetGDIMetaFile() const
+{
+ DBG_ERROR( "Invalid return value! Don't use it! (KA)" );
+ return &GetGraphic().GetGDIMetaFile();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::WriteData(SvStream& rOut) const
+{
+ ForceSwapIn();
+ SdrRectObj::WriteData( rOut );
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat( rOut, STREAM_WRITE );
+
+#ifdef DBG_UTIL
+ aCompat.SetID( "SdrGrafObj" );
+#endif
+
+ GraphicType eType( pGraphic->GetType() );
+ BOOL bHasGraphic( !aFileName.Len() && eType != GRAPHIC_NONE );
+
+ // dieses Flag wird ab V11 rausgeschrieben
+ rOut << bHasGraphic;
+
+ if(bHasGraphic)
+ {
+ // Graphik ist nicht gelinkt: ggf. komprimiert speichern:
+ // seit V11 eingapackt
+ SdrDownCompat aGrafCompat(rOut, STREAM_WRITE);
+ BOOL bZCompr(pModel && pModel->IsSaveCompressed() && eType == GRAPHIC_BITMAP);
+ BOOL bNCompr(pModel && pModel->IsSaveNative());
+ const UINT16 nOldComprMode(rOut.GetCompressMode());
+ UINT16 nNewComprMode(nOldComprMode);
+
+#ifdef DBG_UTIL
+ aGrafCompat.SetID( "SdrGrafObj(Graphic)" );
+#endif
+
+ if(pModel->IsSwapGraphics() && (pModel->GetSwapGraphicsMode() & SDR_SWAPGRAPHICSMODE_DOC))
+ ((SdrGrafObj*)this)->nGrafStreamPos = rOut.Tell();
+
+ if(bZCompr)
+ nNewComprMode |= COMPRESSMODE_ZBITMAP;
+
+ if(bNCompr)
+ nNewComprMode |= COMPRESSMODE_NATIVE;
+
+ rOut.SetCompressMode( nNewComprMode );
+ rOut << pGraphic->GetGraphic();
+ rOut.SetCompressMode( nOldComprMode );
+ }
+
+ rOut << aCropRect;
+ rOut << BOOL(bMirrored);
+
+ rOut.WriteByteString(aName);
+
+ String aRelFileName;
+
+ if( aFileName.Len() )
+ {
+ aRelFileName = INetURLObject::AbsToRel( aFileName,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS );
+ }
+
+ rOut.WriteByteString( aRelFileName );
+
+ // UNICODE: rOut << aFilterName;
+ rOut.WriteByteString(aFilterName);
+
+ // ab V11
+ rOut << (BOOL)aFileName.Len();
+
+#ifdef GRAFATTR
+ SfxItemPool* pPool = GetItemPool();
+
+ if(pPool)
+ pPool->StoreSurrogate(rOut, pGrafAttr);
+ else
+ rOut << UINT16( SFX_ITEMS_NULL );
+#endif // GRAFATTR
+
+ ForceSwapOut();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ReadDataTilV10( const SdrObjIOHeader& rHead, SvStream& rIn )
+{
+ Graphic aGraphic;
+
+ // Import von allem mit Version <= 10
+ rIn >> aGraphic;
+
+ ULONG nError = rIn.GetError();
+
+ // Ist die Graphik defekt, oder wurde nur eine leere Graphik eingelesen? (was bei gelinkten Graphiken der Fall ist)
+ if( nError != 0)
+ rIn.ResetError();
+
+ if( rHead.GetVersion() >= 6)
+ rIn >> aCropRect;
+
+ if(rHead.GetVersion() >= 8)
+ {
+ // UNICODE: rIn>>aFileName;
+ rIn.ReadByteString(aFileName);
+ }
+
+ if(rHead.GetVersion() >= 9)
+ {
+ // UNICODE: rIn >> aFilterName;
+ rIn.ReadByteString(aFileName);
+ }
+ else
+ {
+ aFilterName = String();
+ aFilterName.AppendAscii("BMP - MS Windows");
+ }
+
+ if(aFileName.Len())
+ {
+#ifndef SVX_LIGHT
+ GraphicFilter* pFilter = GetGrfFilter();
+ USHORT nFilter = pFilter->GetImportFormatNumber( aFilterName );
+ SvFileStream aIStm( aFileName, STREAM_READ | STREAM_SHARE_DENYNONE );
+ USHORT nError = pFilter->ImportGraphic( aGraphic, aFileName, aIStm, nFilter );
+
+ SetGraphicLink( aFileName, aFilterName );
+#else
+ DBG_ERROR("SdrGrafObj::ReadDataTilV10(): SVX_LIGHT kann keine Graphic-Links");
+#endif
+ }
+ else if( nError != 0 )
+ rIn.SetError(nError);
+
+
+ if( !rIn.GetError() )
+ pGraphic->SetGraphic( aGraphic );
+}
+
+// -----------------------------------------------------------------------------
+
+#ifdef WNT
+#pragma optimize ("",off)
+#endif
+
+void SdrGrafObj::ReadData( const SdrObjIOHeader& rHead, SvStream& rIn )
+{
+ if( rIn.GetError() )
+ return;
+
+ SdrRectObj::ReadData( rHead, rIn );
+
+ nGrafStreamPos = 0;
+ bSwappedOut = bNotLoaded = FALSE;
+
+ SdrDownCompat aCompat( rIn, STREAM_READ );
+ FASTBOOL bDelayedLoad = ( pModel != NULL ) && pModel->IsSwapGraphics();
+
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrGrafObj");
+#endif
+
+ if( rHead.GetVersion() < 11 )
+ ReadDataTilV10( rHead, rIn );
+ else
+ {
+ String aFileNameRel;
+ BOOL bHasGraphic;
+ BOOL bTmp;
+ BOOL bGraphicLink;
+
+ rIn >> bHasGraphic;
+
+ if( bHasGraphic )
+ {
+ SdrDownCompat aGrafCompat( rIn,STREAM_READ );
+
+#ifdef DBG_UTIL
+ aGrafCompat.SetID("SdrGrafObj(Graphic)");
+#endif
+
+ nGrafStreamPos = rIn.Tell();
+
+ if( !bDelayedLoad )
+ {
+ Graphic aGraphic;
+ rIn >> aGraphic;
+ pGraphic->SetGraphic( aGraphic );
+ }
+ else
+ bNotLoaded = bSwappedOut = TRUE;
+
+ // Ist die Grafik defekt, oder wurde nur eine leere Graphik eingelesen?
+ // Daran soll mein Read jedoch nicht scheitern.
+ if( rIn.GetError() != 0 )
+ rIn.ResetError();
+ }
+
+ rIn >> aCropRect;
+ rIn >> bTmp; bMirrored = bTmp;
+
+ rIn.ReadByteString(aName);
+ rIn.ReadByteString(aFileNameRel);
+
+ if( aFileNameRel.Len() )
+ {
+ aFileName = ::URIHelper::SmartRelToAbs( aFileNameRel, FALSE,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS );
+ }
+ else
+ aFileName.Erase();
+
+ // UNICODE: rIn >> aFilterName;
+ rIn.ReadByteString(aFilterName);
+
+ rIn >> bGraphicLink; // auch dieses Flag ist neu in V11
+
+#ifdef GRAFATTR
+
+ if( aCompat.GetBytesLeft() > 0 )
+ {
+ SfxItemPool* pPool = GetItemPool();
+
+ if( pPool )
+ {
+ USHORT nWhich = SDRATTRSET_GRAF;
+
+ pGrafAttr = (const SdrGrafSetItem*) ImpSetNewAttr( pGrafAttr, NULL );
+ pGrafAttr = (const SdrGrafSetItem*) pPool->LoadSurrogate( rIn, nWhich, 0 );
+
+ if( pGrafAttr )
+ {
+ if( pStyleSheet )
+ ( (SfxItemSet*) &pGrafAttr->GetItemSet() )->SetParent( &pStyleSheet->GetItemSet() );
+
+ ImpSetAttrToGrafInfo();
+ }
+ }
+ else
+ {
+ UINT16 nSuroDummy;
+ rIn >> nSuroDummy;
+ }
+ }
+ else
+ bCopyToPoolOnAfterRead = TRUE;
+
+#endif // GRAFATTR
+
+ if( bGraphicLink && aFileName.Len() && aFilterName.Len() )
+ {
+#ifndef SVX_LIGHT
+ SetGraphicLink( aFileName, aFilterName );
+
+ if( pGraphicLink && !bDelayedLoad )
+ {
+ BOOL bIsChanged = pModel->IsChanged();
+ pGraphicLink->Update();
+ pModel->SetChanged( bIsChanged );
+ }
+ else
+ bNotLoaded = bSwappedOut = TRUE;
+#else
+ Graphic aGraphic;
+ GraphicFilter* pFilter = SVX_LIGHT_GetGrfFilter_Impl();
+ USHORT nFilter = pFilter->GetImportFormatNumber( aFilterName );
+ SvFileStream aIStm( aFileName, STREAM_READ | STREAM_SHARE_DENYNONE );
+ USHORT nError = pFilter->ImportGraphic( aGraphic, aFileName, aIStm, nFilter );
+
+ pGraphic->SetGraphic( aGraphic );
+ bGraphicLink = FALSE;
+ aFileName = aFilterName = String();
+
+// DBG_ERROR("SdrGrafObj::ReadData(): SVX_LIGHT kann keine Graphic-Links");
+
+#endif
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+#ifdef WNT
+#pragma optimize ("",on)
+#endif
+
+// -----------------------------------------------------------------------------
+
+Rectangle SdrGrafObj::ImpGetOutputRect( const OutputDevice* pOutDev ) const
+{
+ const Rectangle aSnapRect( GetSnapRect() );
+
+ return aSnapRect;
+}
+
+// -----------------------------------------------------------------------------
+
+Rectangle SdrGrafObj::GetAnimationRect(const OutputDevice* pOutDev) const
+{
+ return ImpGetOutputRect( pOutDev );
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SetAnimationSupervisor( OutputDevice* pDisplayDev, BOOL bObjSupervises )
+{
+ ForceSwapIn();
+ List* pAInfoList = pGraphic->GetAnimationInfoList();
+
+ if ( pAInfoList )
+ {
+ for( AInfo* pAInfo = (AInfo*) pAInfoList->First(); pAInfo; pAInfo = (AInfo*) pAInfoList->Next() )
+ {
+ if( pAInfo->pOutDev == pDisplayDev )
+ {
+ pAInfo->nExtraData = ( bObjSupervises ? 1L : (long) this );
+
+ if ( !bObjSupervises )
+ pAInfo->bPause = FALSE;
+ }
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ResetAnimationLoopCount()
+{
+ if( pGraphic->IsAnimated() )
+ {
+ ForceSwapIn();
+ pGraphic->ResetAnimationLoopCount();
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::RestartAnimation(SdrPageView* pPageView) const
+{
+ // ToDo: hier noch entsprechend implementieren wie im TextObj
+ SdrRectObj::RestartAnimation( pPageView );
+}
+
+// -----------------------------------------------------------------------------
+
+SdrObject* SdrGrafObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ SdrObject* pRetval = NULL;
+
+ switch( GetGraphicType() )
+ {
+ case GRAPHIC_GDIMETAFILE:
+ {
+ // NUR die aus dem MetaFile erzeugbaren Objekte in eine Gruppe packen und zurueckliefern
+ SdrObjGroup* pGrp = new SdrObjGroup();
+ ImpSdrGDIMetaFileImport aFilter(*GetModel());
+ Point aOutPos( aRect.TopLeft() );
+ const Size aOutSiz( aRect.GetSize() );
+
+ aFilter.SetScaleRect(GetSnapRect());
+ aFilter.SetLayer(GetLayer());
+
+ UINT32 nInsAnz = aFilter.DoImport(GetTransformedGraphic().GetGDIMetaFile(), *pGrp->GetSubList(), 0);
+ if(nInsAnz)
+ {
+ pRetval = pGrp;
+ pGrp->NbcSetLayer(GetLayer());
+ pGrp->SetModel(GetModel());
+ pRetval = ImpConvertAddText(pRetval, bBezier);
+ }
+ else
+ delete pGrp;
+ break;
+ }
+ case GRAPHIC_BITMAP:
+ {
+ // Grundobjekt kreieren und Fuellung ergaenzen
+ pRetval = SdrRectObj::DoConvertToPolyObj(bBezier);
+
+ // Bitmap als Attribut retten
+ if(pRetval)
+ {
+ SfxItemSet aSet(GetModel()->GetItemPool());
+ TakeAttributes(aSet, FALSE, TRUE);
+
+ // Bitmap als Fuellung holen
+ aSet.Put(XFillStyleItem(XFILL_BITMAP));
+ Bitmap aBitmap( GetTransformedGraphic().GetBitmap() );
+ XOBitmap aXBmp(aBitmap, XBITMAP_STRETCH);
+ aSet.Put(XFillBitmapItem(String(), aXBmp));
+ aSet.Put(XFillBmpTileItem(FALSE));
+ pRetval->NbcSetAttributes(aSet, FALSE);
+ }
+ break;
+ }
+ case GRAPHIC_NONE:
+ case GRAPHIC_DEFAULT:
+ {
+ pRetval = SdrRectObj::DoConvertToPolyObj(bBezier);
+ break;
+ }
+ }
+
+ return pRetval;
+}
+
+// -----------------------------------------------------------------------------
+
+#ifdef GRAFATTR
+
+void SdrGrafObj::AfterRead()
+{
+ SdrRectObj::AfterRead();
+
+ if( bCopyToPoolOnAfterRead )
+ {
+ ImpSetGrafInfoToAttr();
+ bCopyToPoolOnAfterRead = FALSE;
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType )
+{
+ SetXPolyDirty();
+ SdrRectObj::SFX_NOTIFY( rBC, rBCType, rHint, rHintType );
+ ImpSetAttrToGrafInfo();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ForceDefaultAttr( SfxItemPool* pPool )
+{
+ SdrRectObj::ForceDefaultAttr( pPool );
+
+ if( pPool )
+ {
+ if( !pGrafAttr )
+ {
+ SdrGrafSetItem aSetItem( pPool );
+ SfxItemSet& rSet = aSetItem.GetItemSet();
+
+ rSet.Put( SdrGrafLuminanceItem( 0 ) );
+ rSet.Put( SdrGrafContrastItem( 0 ) );
+ rSet.Put( SdrGrafRedItem( 0 ) );
+ rSet.Put( SdrGrafGreenItem( 0 ) );
+ rSet.Put( SdrGrafBlueItem( 0 ) );
+ rSet.Put( SdrGrafGamma100Item( 100 ) );
+ rSet.Put( SdrGrafTransparenceItem( 0 ) );
+ rSet.Put( SdrGrafInvertItem( FALSE ) );
+ rSet.Put( SdrGrafModeItem( GRAPHICDRAWMODE_STANDARD ) );
+
+ pGrafAttr = (SdrGrafSetItem*) ImpSetNewAttr( pGrafAttr, &aSetItem, FALSE );
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+USHORT SdrGrafObj::GetSetItemCount() const
+{
+ return( 1 + SdrRectObj::GetSetItemCount() );
+}
+
+// -----------------------------------------------------------------------------
+
+const SfxSetItem* SdrGrafObj::GetSetItem( USHORT nNum ) const
+{
+ return( !nNum ? pGrafAttr : SdrRectObj::GetSetItem( --nNum ) );
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::SetSetItem( USHORT nNum, const SfxSetItem* pAttr )
+{
+ if( !nNum )
+ pGrafAttr = (const SdrGrafSetItem*) pAttr;
+ else
+ SdrRectObj::SetSetItem( --nNum, pAttr );
+}
+
+// -----------------------------------------------------------------------------
+
+SfxSetItem* SdrGrafObj::MakeNewSetItem( USHORT nNum, FASTBOOL bClone ) const
+{
+ SfxSetItem* pRet;
+
+ if( !nNum )
+ {
+ if( bClone && pGrafAttr )
+ pRet = new SdrGrafSetItem( *pGrafAttr );
+ else
+ pRet = new SdrGrafSetItem( GetItemPool() );
+ }
+ else
+ pRet = SdrRectObj::MakeNewSetItem( --nNum, bClone );
+
+ return pRet;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::NbcSetStyleSheet( SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr )
+{
+ SetXPolyDirty();
+ SdrRectObj::NbcSetStyleSheet( pNewStyleSheet, bDontRemoveHardAttr );
+ ImpSetAttrToGrafInfo();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::NbcSetAttributes( const SfxItemSet& rAttr, FASTBOOL bReplaceAll )
+{
+ SetXPolyDirty();
+ SdrRectObj::NbcSetAttributes( rAttr, bReplaceAll );
+ ImpSetAttrToGrafInfo();
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ImpSetAttrToGrafInfo()
+{
+ if( pGrafAttr )
+ {
+ const SfxItemSet& rSet = pGrafAttr->GetItemSet();
+ const USHORT nTrans = ( (SdrGrafTransparenceItem&) rSet.Get( SDRATTR_GRAFTRANSPARENCE ) ).GetValue();
+
+ aGrafInfo.SetLuminance( ( (SdrGrafLuminanceItem&) rSet.Get( SDRATTR_GRAFLUMINANCE ) ).GetValue() );
+ aGrafInfo.SetContrast( ( (SdrGrafContrastItem&) rSet.Get( SDRATTR_GRAFCONTRAST ) ).GetValue() );
+ aGrafInfo.SetChannelR( ( (SdrGrafRedItem&) rSet.Get( SDRATTR_GRAFRED ) ).GetValue() );
+ aGrafInfo.SetChannelG( ( (SdrGrafGreenItem&) rSet.Get( SDRATTR_GRAFGREEN ) ).GetValue() );
+ aGrafInfo.SetChannelB( ( (SdrGrafBlueItem&) rSet.Get( SDRATTR_GRAFBLUE ) ).GetValue() );
+ aGrafInfo.SetGamma( ( (SdrGrafGamma100Item&) rSet.Get( SDRATTR_GRAFGAMMA ) ).GetValue() * 0.01 );
+ aGrafInfo.SetTransparency( (BYTE) FRound( Min( nTrans, (USHORT) 100 ) * 2.55 ) );
+ aGrafInfo.SetInvert( ( (SdrGrafInvertItem&) rSet.Get( SDRATTR_GRAFINVERT ) ).GetValue() );
+ aGrafInfo.SetDrawMode( ( (SdrGrafModeItem&) rSet.Get( SDRATTR_GRAFMODE ) ).GetValue() );
+
+ SetXPolyDirty();
+ SetRectsDirty();
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::ImpSetGrafInfoToAttr()
+{
+ if( pGrafAttr )
+ {
+ SdrGrafSetItem aSetItem( *pGrafAttr );
+ SfxItemSet& rSet = aSetItem.GetItemSet();
+
+ rSet.Put( SdrGrafLuminanceItem( aGrafInfo.GetLuminance() ) );
+ rSet.Put( SdrGrafContrastItem( aGrafInfo.GetContrast() ) );
+ rSet.Put( SdrGrafRedItem( aGrafInfo.GetChannelR() ) );
+ rSet.Put( SdrGrafGreenItem( aGrafInfo.GetChannelG() ) );
+ rSet.Put( SdrGrafBlueItem( aGrafInfo.GetChannelB() ) );
+ rSet.Put( SdrGrafGamma100Item( FRound( aGrafInfo.GetGamma() * 100.0 ) ) );
+ rSet.Put( SdrGrafTransparenceItem( (USHORT) FRound( aGrafInfo.GetTransparency() / 2.55 ) ) );
+ rSet.Put( SdrGrafInvertItem( aGrafInfo.IsInvert() ) );
+ rSet.Put( SdrGrafModeItem( aGrafInfo.GetDrawMode() ) );
+ pGrafAttr = (SdrGrafSetItem*) ImpSetNewAttr( pGrafAttr, &aSetItem );
+ }
+}
+
+#endif // GRAFATTR
+
+// -----------------------------------------------------------------------------
+
+void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, BOOL bShrinkOnly )
+{
+ Size aSize;
+ Size aMaxSize( rMaxRect.GetSize() );
+ if ( pGraphic->GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ aSize = Application::GetDefaultDevice()->PixelToLogic( pGraphic->GetPrefSize(), MAP_100TH_MM );
+ else
+ aSize = OutputDevice::LogicToLogic( pGraphic->GetPrefSize(),
+ pGraphic->GetPrefMapMode(),
+ MapMode( MAP_100TH_MM ) );
+
+ if( aSize.Height() != 0 && aSize.Width() != 0 )
+ {
+ Point aPos( rMaxRect.TopLeft() );
+
+ // Falls Grafik zu gross, wird die Grafik
+ // in die Seite eingepasst
+ if ( (!bShrinkOnly ||
+ ( aSize.Height() > aMaxSize.Height() ) ||
+ ( aSize.Width() > aMaxSize.Width() ) )&&
+ aSize.Height() && aMaxSize.Height() )
+ {
+ float fGrfWH = (float)aSize.Width() /
+ (float)aSize.Height();
+ float fWinWH = (float)aMaxSize.Width() /
+ (float)aMaxSize.Height();
+
+ // Grafik an Pagesize anpassen (skaliert)
+ if ( fGrfWH < fWinWH )
+ {
+ aSize.Width() = (long)(aMaxSize.Height() * fGrfWH);
+ aSize.Height()= aMaxSize.Height();
+ }
+ else if ( fGrfWH > 0.F )
+ {
+ aSize.Width() = aMaxSize.Width();
+ aSize.Height()= (long)(aMaxSize.Width() / fGrfWH);
+ }
+
+ aPos = rMaxRect.Center();
+ }
+
+ if( bShrinkOnly )
+ aPos = aRect.TopLeft();
+
+ aPos.X() -= aSize.Width() / 2;
+ aPos.Y() -= aSize.Height() / 2;
+ SetLogicRect( Rectangle( aPos, aSize ) );
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
+{
+ SvStream* pRet = GRFMGR_AUTOSWAPSTREAM_NONE;
+
+ if( pO->IsInSwapOut() )
+ {
+ if( pModel != NULL && pModel->IsSwapGraphics() && pGraphic->GetSizeBytes() > 20480 )
+ {
+ SdrViewIter aIter( this );
+ SdrView* pView = aIter.FirstView();
+ BOOL bVisible = FALSE;
+
+ while( !bVisible && pView )
+ {
+ bVisible = !pView->IsGrafDraft();
+
+ if( !bVisible )
+ pView = aIter.NextView();
+ }
+
+ if( !bVisible )
+ {
+ const ULONG nSwapMode = pModel->GetSwapGraphicsMode();
+
+ if( ( nGrafStreamPos || pGraphicLink ) && ( nSwapMode & SDR_SWAPGRAPHICSMODE_PURGE ) )
+ {
+ pRet = NULL;
+ bSwappedOut = bNotLoaded = TRUE;
+ }
+ else if( nSwapMode & SDR_SWAPGRAPHICSMODE_TEMP )
+ {
+ pRet = GRFMGR_AUTOSWAPSTREAM_TEMP;
+ nGrafStreamPos = 0;
+ bSwappedOut = TRUE;
+ bNotLoaded = FALSE;
+ }
+ }
+ }
+ }
+ else if( pO->IsInSwapIn() )
+ {
+ if( bSwappedOut )
+ {
+ if( bNotLoaded )
+ {
+ // kann aus dem original Doc-Stream nachgeladen werden...
+ if( pModel != NULL )
+ {
+ if( nGrafStreamPos )
+ {
+ FASTBOOL bDeleteStream = FALSE;
+ SvStream* pStream = pModel->GetDocumentStream( bDeleteStream );
+
+ if( pStream != NULL )
+ {
+ Graphic aGraphic;
+
+ pStream->Seek( nGrafStreamPos );
+ *pStream >> aGraphic;
+ pGraphic->SetGraphic( aGraphic );
+
+ if( bDeleteStream )
+ delete pStream;
+
+ pRet = GRFMGR_AUTOSWAPSTREAM_LOADED;
+ bNotLoaded = bSwappedOut = FALSE;
+ }
+ }
+#ifndef SVX_LIGHT
+ else if( pGraphicLink )
+ {
+ BOOL bIsChanged = pModel->IsChanged();
+ pGraphicLink->Update();
+ pModel->SetChanged( bIsChanged );
+ bNotLoaded = bSwappedOut = FALSE;
+ }
+#endif
+ }
+ }
+ else
+ {
+ pRet = GRFMGR_AUTOSWAPSTREAM_TEMP;
+ bNotLoaded = bSwappedOut = FALSE;
+ }
+ }
+ }
+
+ return (long)(void*) pRet;
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( SdrGrafObj, ImpAnimationHdl, Animation*, pAnimation )
+{
+ // Wenn wir nicht mehr da sind, stoppen wir natuerlich alles und kehren gleich zurueck
+ if( !bInserted )
+ {
+ pAnimation->Stop();
+ return 0L;
+ }
+
+ List* pAInfoList = pAnimation->GetAInfoList();
+ AInfo* pAInfo = (AInfo*) pAInfoList->First();
+ BOOL bExtern = FALSE;
+
+ // Alle Extra-Data auf 0 setzen, wenn keine andere ExtraData
+ // ausser der eigenen (1) gesetzt;
+ // groesser als 1 bedeutet, daß die Animation von aussen gestartet
+ // wurde, z.B. von der DiaShow.
+ while( pAInfo != NULL )
+ {
+ if( pAInfo->nExtraData == 1L )
+ pAInfo->nExtraData = 0;
+ else if( pAInfo->nExtraData > 1L )
+ bExtern = TRUE;
+
+ pAInfo = (AInfo*) pAInfoList->Next();
+ }
+
+ if( pModel!=NULL && pPage!=NULL && bInserted && pAInfoList->Count() )
+ {
+ USHORT nPageNum=pPage->GetPageNum();
+ FASTBOOL bMaster=pPage->IsMasterPage() && !bNotVisibleAsMaster;
+ USHORT nLsAnz=pModel->GetListenerCount();
+
+ for( USHORT nLsNum=0; nLsNum<nLsAnz; nLsNum++ )
+ {
+ SfxListener* pLs=pModel->GetListener(nLsNum);
+ SdrMarkView* pView=PTR_CAST(SdrMarkView,pLs);
+
+ if( pView && ( pView->IsAnimationEnabled() || bExtern ) )
+ {
+ FASTBOOL bMrk=pView->IsObjMarked(this);
+ USHORT nPvAnz=pView->GetPageViewCount();
+
+ for (USHORT nPvNum=0; nPvNum<nPvAnz; nPvNum++)
+ {
+ SdrPageView* pPV=pView->GetPageViewPvNum(nPvNum);
+ SdrPage* pPg=pPV->GetPage();
+
+ if (pPV->GetVisibleLayers().IsSet(nLayerID))
+ {
+ FASTBOOL bJa=pPg==pPage;
+
+ if (!bJa && bMaster && !pPg->IsMasterPage())
+ {
+ USHORT nMasterAnz=pPg->GetMasterPageCount();
+
+ for (USHORT nMasterNum=0; nMasterNum<nMasterAnz && !bJa; nMasterNum++)
+ {
+ const SdrMasterPageDescriptor& rMPD=pPg->GetMasterPageDescriptor(nMasterNum);
+ bJa=nPageNum==rMPD.GetPageNum() && rMPD.GetVisibleLayers().IsSet(nLayerID);
+ }
+ }
+ if (bJa)
+ {
+ USHORT nOutAnz=pView->GetWinCount();
+
+ for (USHORT nOutNum=0; nOutNum<nOutAnz; nOutNum++)
+ {
+ OutputDevice* pOut=pView->GetWin(nOutNum);
+
+ if( pOut->GetOutDevType()==OUTDEV_WINDOW )
+ {
+ Rectangle aDrawRect( ImpGetOutputRect( pOut ) );
+ const Point aOffset( pPV->GetOffset() );
+ FASTBOOL bFound = FALSE;
+
+ aDrawRect.Move( aOffset.X(), aOffset.Y() );
+
+ // Flag am gefundenen Objekt setzen
+ pAInfo=(AInfo*)pAInfoList->First();
+ while( pAInfo!=NULL && !bFound )
+ {
+ if (pAInfo->aStartOrg==aDrawRect.TopLeft() &&
+ pAInfo->aStartSize==aDrawRect.GetSize() &&
+ pAInfo->pOutDev==pOut )
+ {
+ if( pAInfo->nExtraData==0 )
+ pAInfo->nExtraData=1L;
+
+ pAInfo->bPause = bMrk;
+ bFound = TRUE;
+ }
+
+ pAInfo=(AInfo*)pAInfoList->Next();
+ }
+
+ // Falls kein Record gefunden, wird ein neuer erzeugt
+ // Das passiert z.B., wenn das Obj auf einer MasterPage liegt
+ // und diese mittels MasterPagePaintCache angezeigt wurde.
+ if (!bFound)
+ {
+ pAInfo = new AInfo;
+
+ // erst einmal soviel wie moeglich bekanntes setzen
+ *pAInfo = *(AInfo*) pAInfoList->GetObject( 0L );
+ pAInfo->aStartOrg=aDrawRect.TopLeft();
+ pAInfo->aStartSize=aDrawRect.GetSize();
+ pAInfo->pOutDev=pOut;
+ pAInfo->nExtraData=1;
+ pAInfo->bPause=bMrk;
+ pAInfoList->Insert(pAInfo);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Alle Objekte mit nicht gesetztem Flag loeschen
+ pAInfo = (AInfo*) pAInfoList->First();
+
+ while( pAInfo != NULL )
+ {
+ if( pAInfo->nExtraData == 0 )
+ {
+ delete (AInfo*)pAInfoList->Remove(pAInfo);
+ pAInfo=(AInfo*)pAInfoList->GetCurObject();
+ }
+ else
+ pAInfo=(AInfo*)pAInfoList->Next();
+ }
+
+ return 0;
+}
+
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
new file mode 100644
index 0000000000..a981d5a6c6
--- /dev/null
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -0,0 +1,1549 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdogrp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVXLINKMGR_HXX //autogen
+#include <linkmgr.hxx>
+#endif
+
+#ifndef _UCBHELPER_CONTENT_HXX_
+#include <ucbhelper/content.hxx>
+#endif
+#ifndef _UCBHELPER_CONTENTBROKER_HXX_
+#include <ucbhelper/contentbroker.hxx>
+#endif
+#ifndef _UNOTOOLS_DATETIME_HXX_
+#include <unotools/datetime.hxx>
+#endif
+
+#include "svdogrp.hxx"
+
+#ifndef SVX_LIGHT
+#ifndef _LNKBASE_HXX //autogen
+#include <so3/lnkbase.hxx>
+#endif
+#endif
+
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+
+#include <svtools/urihelper.hxx>
+
+#include "xpool.hxx"
+#include "xpoly.hxx"
+
+#include "svdxout.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svditer.hxx"
+#include "svdobj.hxx"
+#include "svdtrans.hxx"
+#include "svdio.hxx"
+#include "svdetc.hxx"
+#include "svdattrx.hxx" // NotPersistItems
+#include "svdoedge.hxx" // #32383# Die Verbinder nach Move nochmal anbroadcasten
+#include "svdglob.hxx" // StringCache
+#include "svdstr.hrc" // Objektname
+
+#ifndef _PERSIST_HXX //autogen
+#include <so3/persist.hxx>
+#endif
+
+#ifndef SVX_LIGHT
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@ @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@@ @@@@@ @@ @@ @@ @@ @@@@@ @@ @@ @@@@@@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@
+// @@@@ @@@@@ @@@@ @@@@@ @@ @@ @@@@ @@@@ @@ @@@@@ @@ @@ @@ @@ @@
+//
+// ImpSdrObjGroupLink zur Verbindung von SdrObjGroup und LinkManager
+//
+// Einem solchen Link merke ich mir als SdrObjUserData am Objekt. Im Gegensatz
+// zum Grafik-Link werden die ObjektDaten jedoch kopiert (fuer Paint, etc.).
+// Die Information ob das Objekt ein Link ist besteht genau darin, dass dem
+// Objekt ein entsprechender UserData-Record angehaengt ist oder nicht.
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpSdrObjGroupLink: public SvBaseLink {
+ SdrObject* pSdrObj;
+public:
+ ImpSdrObjGroupLink(SdrObject* pObj1): SvBaseLink(LINKUPDATE_ONCALL,FORMAT_FILE),pSdrObj(pObj1) {}
+ virtual ~ImpSdrObjGroupLink();
+ virtual void Closed();
+ virtual void DataChanged(SvData& rData);
+ FASTBOOL Connect() { return 0 != SvBaseLink::GetRealObject(); }
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+ImpSdrObjGroupLink::~ImpSdrObjGroupLink()
+{
+}
+
+// Closed() wird gerufen, wenn die Verknüpfung geloesst wird.
+
+void ImpSdrObjGroupLink::Closed()
+{
+ if (pSdrObj!=NULL) {
+ // pLink des Objekts auf NULL setzen, da die Link-Instanz ja gerade destruiert wird.
+ ImpSdrObjGroupLinkUserData* pData=((SdrObjGroup*)pSdrObj)->GetLinkUserData();
+ if (pData!=NULL) pData->pLink=NULL;
+ ((SdrObjGroup*)pSdrObj)->ReleaseGroupLink();
+ }
+ SvBaseLink::Closed();
+}
+
+
+void ImpSdrObjGroupLink::DataChanged(SvData& rData)
+{
+ FASTBOOL bForceReload=FALSE;
+ SdrModel* pModel = pSdrObj ==NULL ? NULL : pSdrObj->GetModel();
+ SvxLinkManager* pLinkManager= pModel==NULL ? NULL : pModel->GetLinkManager();
+ if (pLinkManager!=NULL) {
+ ImpSdrObjGroupLinkUserData* pData=((SdrObjGroup*)pSdrObj)->GetLinkUserData();
+ if (pData!=NULL) {
+ String aFile;
+ String aName;
+ pLinkManager->GetDisplayNames(*this,NULL,&aFile,&aName,NULL);
+
+ if(!pData->aFileName.Equals(aFile) || !pData->aObjName.Equals(aName))
+ {
+ pData->aFileName=aFile;
+ pData->aObjName=aName;
+ pSdrObj->SetChanged();
+ bForceReload=TRUE;
+ }
+ }
+ }
+ if (pSdrObj!=NULL) {
+ ((SdrObjGroup*)pSdrObj)->ReloadLinkedGroup(bForceReload);
+ }
+}
+
+#endif // SVX_LIGHT
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@ @@@@@@ @@@@
+// @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@@ @@@@ @@ @@ @@@@ @@@@@ @@@@@ @@ @@ @@@@@@ @@ @@@@@@
+// @@ @@ @@ @@@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@ @@ @@ @@ @@ @@ @@@@ @@@@@ @@@@@@ @@ @@ @@@@@ @@ @@ @@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(ImpSdrObjGroupLinkUserData,SdrObjUserData);
+
+
+ImpSdrObjGroupLinkUserData::ImpSdrObjGroupLinkUserData(SdrObject* pObj1):
+ SdrObjUserData(SdrInventor,SDRUSERDATA_OBJGROUPLINK,0),
+ pObj(pObj1),
+ nDrehWink0(0),
+ nShearWink0(0),
+ pLink(NULL),
+ nObjNum(0),
+ nPageNum(0),
+ bMasterPage(FALSE),
+ bOrigPos(FALSE),
+ bOrigSize(FALSE),
+ bOrigRotate(FALSE),
+ bOrigShear(FALSE)
+{
+}
+
+
+ImpSdrObjGroupLinkUserData::~ImpSdrObjGroupLinkUserData()
+{
+#ifndef SVX_LIGHT
+ delete pLink;
+#endif
+}
+
+
+SdrObjUserData* ImpSdrObjGroupLinkUserData::Clone(SdrObject* pObj1) const
+{
+ ImpSdrObjGroupLinkUserData* pData=new ImpSdrObjGroupLinkUserData(pObj1);
+ pData->aFileName =aFileName;
+ pData->aObjName =aObjName;
+ pData->aFileDate0 =aFileDate0;
+ pData->aSnapRect0 =aSnapRect0;
+ pData->nDrehWink0 =nDrehWink0;
+ pData->nShearWink0=nShearWink0;
+ pData->nObjNum =nObjNum;
+ pData->nPageNum =nPageNum;
+ pData->bMasterPage=bMasterPage;
+ pData->bOrigPos =bOrigPos;
+ pData->bOrigSize =bOrigSize;
+ pData->bOrigRotate=bOrigRotate;
+ pData->bOrigShear =bOrigShear;
+ pData->pLink=NULL;
+ //pObj1->ImpLinkAnmeldung();
+ return pData;
+}
+
+
+void ImpSdrObjGroupLinkUserData::WriteData(SvStream& rOut)
+{
+ SdrObjUserData::WriteData(rOut);
+
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+
+#ifdef DBG_UTIL
+ aCompat.SetID("ImpSdrObjGroupLinkUserData");
+#endif
+
+ String aRelFileName;
+
+ if( aFileName.Len() )
+ {
+ aRelFileName = INetURLObject::AbsToRel( aFileName,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS );
+ }
+
+ rOut.WriteByteString( aRelFileName );
+
+ // UNICODE: rOut << aObjName;
+ rOut.WriteByteString(aObjName);
+
+ rOut << UINT32(aFileDate0.GetDate());
+ rOut << UINT32(aFileDate0.GetTime());
+ rOut << aSnapRect0;
+ rOut << nDrehWink0;
+ rOut << nShearWink0;
+ rOut << BOOL(bMasterPage);
+ rOut << nPageNum;
+ rOut << nObjNum;
+ rOut << BOOL(bOrigPos);
+ rOut << BOOL(bOrigSize);
+ rOut << BOOL(bOrigRotate);
+ rOut << BOOL(bOrigShear);
+}
+
+void ImpSdrObjGroupLinkUserData::ReadData(SvStream& rIn)
+{
+ SdrObjUserData::ReadData(rIn);
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+
+#ifdef DBG_UTIL
+ aCompat.SetID("ImpSdrObjGroupLinkUserData");
+#endif
+
+ BOOL bTmp;
+ UINT32 nTmp32;
+ String aFileNameRel;
+
+ rIn.ReadByteString(aFileNameRel);
+
+ if( aFileNameRel.Len() )
+ {
+ aFileName = ::URIHelper::SmartRelToAbs( aFileNameRel, FALSE,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS );
+ }
+ else
+ aFileName.Erase();
+
+ // UNICODE: rIn >> aObjName;
+ rIn.ReadByteString(aObjName);
+
+ rIn >> nTmp32; aFileDate0.SetDate(nTmp32);
+ rIn >> nTmp32; aFileDate0.SetTime(nTmp32);
+ rIn >> aSnapRect0;
+ rIn >> nDrehWink0;
+ rIn >> nShearWink0;
+ rIn >> bTmp; bMasterPage=bTmp;
+ rIn >> nPageNum;
+ rIn >> nObjNum;
+ rIn >> bTmp; bOrigPos =bTmp;
+ rIn >> bTmp; bOrigSize =bTmp;
+ rIn >> bTmp; bOrigRotate=bTmp;
+ rIn >> bTmp; bOrigShear =bTmp;
+}
+
+
+void ImpSdrObjGroupLinkUserData::AfterRead()
+{
+ if (pObj!=NULL) {
+ ((SdrObjGroup*)pObj)->ImpLinkAnmeldung();
+ // lt. Anweisung von MB kein automatisches Reload mehr
+ //((SdrObjGroup*)pObj)->ReloadLinkedGroup();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@@ @@@@ @@@@@ @@@@ @@ @@ @@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@@ @@@@@ @@ @@ @@ @@ @@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@@@@ @@@@ @@@@@ @@ @@ @@@@ @@@@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrObjGroup,SdrObject);
+
+
+SdrObjGroup::SdrObjGroup()
+{
+ pSub=new SdrObjList(NULL,NULL);
+ pSub->SetOwnerObj(this);
+ pSub->SetListKind(SDROBJLIST_GROUPOBJ);
+ bRefPoint=FALSE;
+ nDrehWink=0;
+ nShearWink=0;
+ bClosedObj=FALSE;
+}
+
+
+SdrObjGroup::~SdrObjGroup()
+{
+ ReleaseGroupLink();
+ delete pSub;
+}
+
+
+void SdrObjGroup::SetGroupLink(const String& rFileName, const String& rObjName)
+{
+ ImpSdrObjGroupLinkUserData* pData=GetLinkUserData();
+ if (pData!=NULL) {
+ nDrehWink-=pData->nDrehWink0;
+ nShearWink-=pData->nShearWink0;
+ ReleaseGroupLink();
+ }
+ aName=rObjName;
+ pData=new ImpSdrObjGroupLinkUserData(this);
+ pData->aFileName=rFileName;
+ pData->aObjName=rObjName;
+ InsertUserData(pData);
+ ImpLinkAnmeldung();
+}
+
+
+void SdrObjGroup::ReleaseGroupLink()
+{
+ ImpLinkAbmeldung();
+ USHORT nAnz=GetUserDataCount();
+ for (USHORT nNum=nAnz; nNum>0;) {
+ nNum--;
+ SdrObjUserData* pData=GetUserData(nNum);
+ if (pData->GetInventor()==SdrInventor && pData->GetId()==SDRUSERDATA_OBJGROUPLINK) {
+ DeleteUserData(nNum);
+ }
+ }
+}
+
+
+ImpSdrObjGroupLinkUserData* SdrObjGroup::GetLinkUserData() const
+{
+ ImpSdrObjGroupLinkUserData* pData=NULL;
+ USHORT nAnz=GetUserDataCount();
+ for (USHORT nNum=nAnz; nNum>0 && pData==NULL;) {
+ nNum--;
+ pData=(ImpSdrObjGroupLinkUserData*)GetUserData(nNum);
+ if (pData->GetInventor()!=SdrInventor || pData->GetId()!=SDRUSERDATA_OBJGROUPLINK) {
+ pData=NULL;
+ }
+ }
+ return pData;
+}
+
+
+FASTBOOL SdrObjGroup::ReloadLinkedGroup(FASTBOOL bForceLoad)
+{
+ ImpSdrObjGroupLinkUserData* pData=GetLinkUserData();
+ FASTBOOL bRet=TRUE;
+
+ if( pData )
+ {
+ ::ucb::ContentBroker* pBroker = ::ucb::ContentBroker::get();
+ DateTime aFileDT;
+ BOOL bExists = FALSE, bLoad = FALSE;
+
+ if( pBroker )
+ {
+ bExists = TRUE;
+
+ try
+ {
+ INetURLObject aURL; aURL.SetSmartURL( pData->aFileName );
+ ::ucb::Content aCnt( aURL.GetMainURL(), ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() );
+ ::com::sun::star::uno::Any aAny( aCnt.getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ) ) );
+ ::com::sun::star::util::DateTime aDateTime;
+
+ aAny >>= aDateTime;
+ ::utl::typeConvert( aDateTime, aFileDT );
+ }
+ catch( ... )
+ {
+ bExists = FALSE;
+ }
+ }
+
+ if( bExists )
+ {
+ if( bForceLoad )
+ bLoad = TRUE;
+ else
+ bLoad = ( aFileDT > pData->aFileDate0 );
+
+ pData->aFileDate0 = aFileDT;
+ }
+ else
+ bLoad = ( pModel!=NULL && pModel->LoadModel(pData->aFileName)!=NULL );
+
+ if( bLoad )
+ {
+ Rectangle aMyRect(GetSnapRect());
+ bRet=LoadGroup(pData->aFileName,pData->aObjName,&pData->nPageNum,&pData->bMasterPage,&pData->nObjNum);
+ Rectangle aOrgRect(GetSnapRect());
+ if (bRet && !aMyRect.IsEmpty() && !aOrgRect.IsEmpty())
+ { // und nun noch zurechttransformieren
+ if (aMyRect!=aOrgRect)
+ {
+ // erstmal karo-einfach
+ NbcSetSnapRect(aMyRect);
+ }
+ }
+ pData->aSnapRect0=aOrgRect; // letzte bekannte Groesse des Originalobjekts merken
+ }
+ }
+ return bRet;
+}
+
+
+FASTBOOL SdrObjGroup::LoadGroup(const String& rFileName, const String& rObjName, USHORT* pnPgNum, FASTBOOL* pbMasterPg, ULONG* pnObjNum)
+{
+ FASTBOOL bRet=FALSE;
+
+ if(pModel && rFileName.Len() && rObjName.Len())
+ {
+ const SdrModel* pTempModel=pModel->LoadModel(rFileName);
+ if (pTempModel!=NULL) {
+ SdrObjGroup* pRef=NULL;
+ for (FASTBOOL bMPg=FALSE; bMPg!=TRUE && pRef==NULL;) {
+ USHORT nPgAnz=bMPg ? pTempModel->GetMasterPageCount() : pTempModel->GetPageCount();
+ for (USHORT nPgNum=0; nPgNum<nPgAnz && pRef==NULL; nPgNum++) {
+ const SdrPage* pPg=bMPg ? pTempModel->GetMasterPage(nPgNum) : pTempModel->GetPage(nPgNum);
+ ULONG nObjAnz=pPg->GetObjCount();
+ for (USHORT nObjNum=0; nObjNum<nObjAnz && pRef==NULL; nObjNum++) {
+ SdrObject* pObj=pPg->GetObj(nObjNum);
+ SdrObjGroup* pGrp=PTR_CAST(SdrObjGroup,pObj);
+
+ if(pGrp && pGrp->GetName().Equals(rObjName))
+ {
+ pRef = pGrp;
+
+ if(pnPgNum)
+ *pnPgNum = nPgNum;
+
+ if(pbMasterPg)
+ *pbMasterPg = bMPg;
+
+ if(pnObjNum)
+ *pnObjNum = nObjNum;
+
+ bRet = TRUE;
+ }
+ }
+ }
+ bMPg=TRUE; // soz. von FALSE auf TRUE inkrementieren (fuer die obige for-Schleife)
+ }
+ if (pRef!=NULL) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ // zunaechst diverse Daten des Obj kopieren
+ nLayerId=pRef->GetLayer(); // hier noch ueberarbeiten !!!
+ aAnchor =pRef->aAnchor;
+ bVirtObj=pRef->bVirtObj;
+ bSizProt=pRef->bSizProt;
+ bMovProt=pRef->bMovProt;
+ bNoPrint=pRef->bNoPrint;
+ bEmptyPresObj=pRef->bEmptyPresObj;
+ bNotVisibleAsMaster=pRef->bNotVisibleAsMaster;
+ // und nun die Objekte rueberhohlen
+ pSub->Clear();
+ pSub->CopyObjects(*pRef->GetSubList());
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+ //delete pTempModel;
+ }
+ if (!pModel->IsLoading()) pModel->DisposeLoadedModels();
+ }
+ return bRet;
+}
+
+
+void SdrObjGroup::ImpLinkAnmeldung()
+{
+#ifndef SVX_LIGHT
+ ImpSdrObjGroupLinkUserData* pData=GetLinkUserData();
+ SvxLinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
+ if ( pLinkManager &&
+ pData!=NULL &&
+ pData->pLink == NULL &&
+ pModel->GetPersist() )
+ {
+ // Nicht 2x Anmelden
+ INetURLObject aURLObj( ::URIHelper::SmartRelToAbs( pModel->GetPersist()->GetFileName(), FALSE,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS ) );
+ INetURLObject aLinkURLObj( ::URIHelper::SmartRelToAbs( pData->aFileName, FALSE,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS ) );
+
+ if(!aURLObj.PathToFileName().Equals(aLinkURLObj.PathToFileName()))
+ {
+ // Keine gelinkten Objekte im eigenen Model
+ pData->pLink = new ImpSdrObjGroupLink(this);
+ pLinkManager->InsertFileLink(*pData->pLink,OBJECT_CLIENT_FILE,
+ pData->aFileName,NULL,&pData->aObjName);
+ pData->pLink->Connect();
+ }
+ }
+#endif // SVX_LIGHT
+}
+
+
+void SdrObjGroup::ImpLinkAbmeldung()
+{
+#ifndef SVX_LIGHT
+ ImpSdrObjGroupLinkUserData* pData=GetLinkUserData();
+ SvxLinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
+ if (pLinkManager!=NULL && pData!=NULL && pData->pLink!=NULL) { // Nicht 2x Abmelden
+ // Bei Remove wird *pLink implizit deleted
+ pLinkManager->Remove(*pData->pLink);
+ pData->pLink=NULL;
+ }
+#endif // SVX_LIGHT
+}
+
+
+void SdrObjGroup::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+// rInfo.bCanConvToPath =FALSE;
+// rInfo.bCanConvToPoly =FALSE;
+// rInfo.bCanConvToPathLineToArea=FALSE;
+// rInfo.bCanConvToPolyLineToArea=FALSE;
+ rInfo.bNoContortion=FALSE;
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ SdrObjTransformInfoRec aInfo;
+ pObj->TakeObjInfo(aInfo);
+ if (!aInfo.bMoveAllowed ) rInfo.bMoveAllowed =FALSE;
+ if (!aInfo.bResizeFreeAllowed ) rInfo.bResizeFreeAllowed =FALSE;
+ if (!aInfo.bResizePropAllowed ) rInfo.bResizePropAllowed =FALSE;
+ if (!aInfo.bRotateFreeAllowed ) rInfo.bRotateFreeAllowed =FALSE;
+ if (!aInfo.bRotate90Allowed ) rInfo.bRotate90Allowed =FALSE;
+ if (!aInfo.bMirrorFreeAllowed ) rInfo.bMirrorFreeAllowed =FALSE;
+ if (!aInfo.bMirror45Allowed ) rInfo.bMirror45Allowed =FALSE;
+ if (!aInfo.bMirror90Allowed ) rInfo.bMirror90Allowed =FALSE;
+ if (!aInfo.bShearAllowed ) rInfo.bShearAllowed =FALSE;
+ if (!aInfo.bNoOrthoDesired ) rInfo.bNoOrthoDesired =FALSE;
+ if (aInfo.bNoContortion ) rInfo.bNoContortion =TRUE;
+ if (!aInfo.bCanConvToPath ) rInfo.bCanConvToPath =FALSE;
+
+ if(!aInfo.bCanConvToContour)
+ rInfo.bCanConvToContour = FALSE;
+
+ if (!aInfo.bCanConvToPoly ) rInfo.bCanConvToPoly =FALSE;
+ if (!aInfo.bCanConvToPathLineToArea) rInfo.bCanConvToPathLineToArea=FALSE;
+ if (!aInfo.bCanConvToPolyLineToArea) rInfo.bCanConvToPolyLineToArea=FALSE;
+ }
+ if (nObjAnz==0) {
+ rInfo.bRotateFreeAllowed=FALSE;
+ rInfo.bRotate90Allowed =FALSE;
+ rInfo.bMirrorFreeAllowed=FALSE;
+ rInfo.bMirror45Allowed =FALSE;
+ rInfo.bMirror90Allowed =FALSE;
+ rInfo.bTransparenceAllowed = FALSE;
+ rInfo.bGradientAllowed = FALSE;
+ rInfo.bShearAllowed =FALSE;
+ rInfo.bNoContortion =TRUE;
+ }
+ if(nObjAnz != 1)
+ {
+ // only allowed if single object selected
+ rInfo.bTransparenceAllowed = FALSE;
+ rInfo.bGradientAllowed = FALSE;
+ }
+ if (pPlusData!=NULL && nObjAnz!=0) {
+ ImpSdrObjGroupLinkUserData* pData=GetLinkUserData();
+ if (pData!=NULL) {
+ if (pData->bOrigPos ) rInfo.bMoveAllowed =FALSE;
+ if (pData->bOrigSize ) { rInfo.bResizeFreeAllowed=FALSE; rInfo.bResizePropAllowed=FALSE; }
+ if (pData->bOrigRotate) rInfo.bMoveAllowed =FALSE;
+ if (pData->bOrigShear ) rInfo.bMoveAllowed =FALSE;
+ // erstmal alles abschalten
+ //rInfo.bResizeFreeAllowed=FALSE;
+ //rInfo.bResizePropAllowed=FALSE;
+ rInfo.bRotateFreeAllowed=FALSE;
+ rInfo.bRotate90Allowed =FALSE;
+ rInfo.bMirrorFreeAllowed=FALSE;
+ rInfo.bMirror45Allowed=FALSE;
+ rInfo.bMirror90Allowed=FALSE;
+ rInfo.bShearAllowed=FALSE;
+ rInfo.bNoContortion=TRUE;
+ // default: Proportionen beibehalten
+ rInfo.bNoOrthoDesired=FALSE;
+ }
+ }
+}
+
+
+UINT16 SdrObjGroup::GetObjIdentifier() const
+{
+ return UINT16(OBJ_GRUP);
+}
+
+
+SdrLayerID SdrObjGroup::GetLayer() const
+{
+ FASTBOOL b1st=TRUE;
+ SdrLayerID nLay=SdrLayerID(nLayerId);
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ SdrLayerID nLay1=pOL->GetObj(i)->GetLayer();
+ if (b1st) { nLay=nLay1; b1st=FALSE; }
+ else if (nLay1!=nLay) return 0;
+ }
+ return nLay;
+}
+
+
+void SdrObjGroup::NbcSetLayer(SdrLayerID nLayer)
+{
+ SdrObject::NbcSetLayer(nLayer);
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ pOL->GetObj(i)->NbcSetLayer(nLayer);
+ }
+}
+
+
+void SdrObjGroup::SetObjList(SdrObjList* pNewObjList)
+{
+ SdrObject::SetObjList(pNewObjList);
+ pSub->SetUpList(pNewObjList);
+ /*if (pNewObjList!=NULL) {
+ pUp=pNewObjList->GetOwnerObj();
+ } else {
+ pUp=NULL;
+ }*/
+}
+
+
+void SdrObjGroup::SetPage(SdrPage* pNewPage)
+{
+ FASTBOOL bLinked=IsLinkedGroup();
+ FASTBOOL bRemove=pNewPage==NULL && pPage!=NULL;
+ FASTBOOL bInsert=pNewPage!=NULL && pPage==NULL;
+
+ if (bLinked && bRemove) {
+ ImpLinkAbmeldung();
+ }
+
+ SdrObject::SetPage(pNewPage);
+ pSub->SetPage(pNewPage);
+
+ if (bLinked && bInsert) {
+ ImpLinkAnmeldung();
+ }
+}
+
+
+void SdrObjGroup::SetModel(SdrModel* pNewModel)
+{
+ FASTBOOL bLinked=IsLinkedGroup();
+ FASTBOOL bChg=pNewModel!=pModel;
+ if (bLinked && bChg) {
+ ImpLinkAbmeldung();
+ }
+
+ SdrObject::SetModel(pNewModel);
+ pSub->SetModel(pNewModel);
+
+ if (bLinked && bChg) {
+ ImpLinkAnmeldung();
+ }
+}
+
+
+FASTBOOL SdrObjGroup::HasRefPoint() const
+{
+ return bRefPoint;
+}
+
+
+Point SdrObjGroup::GetRefPoint() const
+{
+ return aRefPoint;
+}
+
+
+void SdrObjGroup::SetRefPoint(const Point& rPnt)
+{
+ bRefPoint=TRUE;
+ aRefPoint=rPnt;
+}
+
+
+SdrObjList* SdrObjGroup::GetSubList() const
+{
+ return pSub;
+}
+
+FASTBOOL SdrObjGroup::HasSetName() const
+{
+ return TRUE;
+}
+
+
+void SdrObjGroup::SetName(const XubString& rStr)
+{
+ aName=rStr; SetChanged();
+}
+
+
+XubString SdrObjGroup::GetName() const
+{
+ return aName;
+}
+
+
+const Rectangle& SdrObjGroup::GetBoundRect() const
+{
+ if (pSub->GetObjCount()!=0) {
+ // hier auch das aOutRect=AllObjSnapRect setzen, da GetSnapRect zu selten gerufen wird.
+ ((SdrObjGroup*)this)->aOutRect=pSub->GetAllObjSnapRect();
+ return pSub->GetAllObjBoundRect();
+ } else {
+ return aOutRect;
+ }
+}
+
+
+const Rectangle& SdrObjGroup::GetSnapRect() const
+{
+ if (pSub->GetObjCount()!=0) {
+ ((SdrObjGroup*)this)->aOutRect=pSub->GetAllObjSnapRect();
+ }
+ return aOutRect;
+}
+
+
+FASTBOOL SdrObjGroup::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ FASTBOOL bOk=TRUE;
+ if (pSub->GetObjCount()!=0) {
+ bOk=pSub->Paint(rXOut,rInfoRec);
+ } else { // ansonsten ist es eine leere Gruppe
+ if (!rInfoRec.bPrinter && rInfoRec.aPaintLayer.IsSet(nLayerId)) {
+ OutputDevice* pOutDev=rXOut.GetOutDev();
+ pOutDev->SetFillInBrush(Brush(BRUSH_NULL));
+ pOutDev->SetPen(Color(COL_LIGHTGRAY));
+ pOutDev->DrawRect(aOutRect);
+ }
+ }
+ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {
+ bOk=PaintGluePoints(rXOut,rInfoRec);
+ }
+ return bOk;
+}
+
+
+SdrObject* SdrObjGroup::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ if (pSub->GetObjCount()!=0) {
+ return pSub->CheckHit(rPnt,nTol,pVisiLayer);
+ } else { // ansonsten ist es eine leere Gruppe
+ if (pVisiLayer==NULL || pVisiLayer->IsSet(nLayerId)) {
+ Rectangle aAussen(aOutRect);
+ aAussen.Top() -=nTol;
+ aAussen.Left() -=nTol;
+ aAussen.Bottom()+=nTol;
+ aAussen.Right() +=nTol;
+ nTol++;
+ Rectangle aInnen(aOutRect);
+ aInnen.Top() +=nTol;
+ aInnen.Left() +=nTol;
+ aInnen.Bottom()-=nTol;
+ aInnen.Right() -=nTol;
+ if (aAussen.IsInside(rPnt) && !aInnen.IsInside(rPnt)) {
+ return (SdrObject*)this;
+ }
+ }
+ }
+ return NULL;
+}
+
+/*SdrObject* SdrObjGroup::Clone() const
+{
+ SdrObjGroup* pObj=new SdrObjGroup();
+ if (pObj!=NULL) {
+ *pObj=*this;
+ }
+ return pObj;
+}*/
+
+
+void SdrObjGroup::operator=(const SdrObject& rObj)
+{
+ if (rObj.IsGroupObject()) {
+ SdrObject::operator=(rObj);
+ pSub->CopyObjects(*rObj.GetSubList());
+ nDrehWink =((SdrObjGroup&)rObj).nDrehWink;
+ nShearWink =((SdrObjGroup&)rObj).nShearWink;
+ aName =((SdrObjGroup&)rObj).aName;
+ aRefPoint =((SdrObjGroup&)rObj).aRefPoint;
+ bRefPoint =((SdrObjGroup&)rObj).bRefPoint;
+ bReserve =((SdrObjGroup&)rObj).bReserve;
+ }
+}
+
+
+void SdrObjGroup::TakeObjNameSingul(XubString& rName) const
+{
+ if(IsLinkedGroup())
+ {
+ rName = ImpGetResStr(STR_ObjNameSingulGRUPLNK);
+ }
+ else if(!pSub->GetObjCount())
+ {
+ rName = ImpGetResStr(STR_ObjNameSingulGRUPEMPTY);
+ }
+ else
+ {
+ rName = ImpGetResStr(STR_ObjNameSingulGRUP);
+ }
+
+ if(aName.Len())
+ {
+ rName += sal_Unicode(' ');
+ rName += sal_Unicode('\'');
+ rName += aName;
+ rName += sal_Unicode('\'');
+ }
+}
+
+
+void SdrObjGroup::TakeObjNamePlural(XubString& rName) const
+{
+ if (IsLinkedGroup()) {
+ rName=ImpGetResStr(STR_ObjNamePluralGRUPLNK);
+ } else if (pSub->GetObjCount()==0) {
+ rName=ImpGetResStr(STR_ObjNamePluralGRUPEMPTY);
+ } else {
+ rName=ImpGetResStr(STR_ObjNamePluralGRUP);
+ }
+}
+
+
+void SdrObjGroup::RecalcSnapRect()
+{
+ // nicht erforderlich, da die Rects von der SubList verwendet werden.
+}
+
+
+void MergePoly(XPolyPolygon& rDst, const XPolyPolygon& rSrc)
+{
+ USHORT nAnz=rSrc.Count();
+ USHORT i;
+ for (i=0; i<nAnz; i++) {
+ rDst.Insert(rSrc.GetObject(i));
+ }
+}
+
+
+void SdrObjGroup::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL bDetail) const
+{
+ rPoly.Clear();
+ ULONG nAnz=pSub->GetObjCount();
+ ULONG i=0;
+ while (i<nAnz) {
+ SdrObject* pObj=pSub->GetObj(i);
+ XPolyPolygon aPP;
+ pObj->TakeXorPoly(aPP,bDetail);
+ MergePoly(rPoly,aPP);
+ i++;
+ }
+ if (rPoly.Count()==0) {
+ rPoly.Insert(XPolygon(aOutRect));
+ }
+}
+
+void SdrObjGroup::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+
+FASTBOOL SdrObjGroup::BegDrag(SdrDragStat& rDrag) const
+{
+ return FALSE;
+}
+
+
+FASTBOOL SdrObjGroup::BegCreate(SdrDragStat& rStat)
+{
+ return FALSE;
+}
+
+
+long SdrObjGroup::GetRotateAngle() const
+{
+ return nDrehWink;
+}
+
+
+long SdrObjGroup::GetShearAngle(FASTBOOL bVertical) const
+{
+ return nShearWink;
+}
+
+
+void SdrObjGroup::NbcSetSnapRect(const Rectangle& rRect)
+{
+ Rectangle aOld(GetSnapRect());
+ long nMulX=rRect.Right()-rRect.Left();
+ long nDivX=aOld.Right()-aOld.Left();
+ long nMulY=rRect.Bottom()-rRect.Top();
+ long nDivY=aOld.Bottom()-aOld.Top();
+ if (nDivX==0) { nMulX=1; nDivX=1; }
+ if (nDivY==0) { nMulY=1; nDivY=1; }
+ if (nMulX!=nDivX || nMulY!=nDivY) {
+ Fraction aX(nMulX,nDivX);
+ Fraction aY(nMulY,nDivY);
+ NbcResize(aOld.TopLeft(),aX,aY);
+ }
+ if (rRect.Left()!=aOld.Left() || rRect.Top()!=aOld.Top()) {
+ NbcMove(Size(rRect.Left()-aOld.Left(),rRect.Top()-aOld.Top()));
+ }
+}
+
+
+void SdrObjGroup::NbcSetLogicRect(const Rectangle& rRect)
+{
+ NbcSetSnapRect(rRect);
+}
+
+
+void SdrObjGroup::NbcMove(const Size& rSiz)
+{
+ MovePoint(aRefPoint,rSiz);
+ if (pSub->GetObjCount()!=0) {
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ pObj->NbcMove(rSiz);
+ }
+ } else {
+ MoveRect(aOutRect,rSiz);
+ SetRectsDirty();
+ }
+}
+
+
+void SdrObjGroup::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0);
+ FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0);
+ if (bXMirr || bYMirr) {
+ Point aRef1(GetSnapRect().Center());
+ if (bXMirr) {
+ Point aRef2(aRef1);
+ aRef2.Y()++;
+ NbcMirrorGluePoints(aRef1,aRef2);
+ }
+ if (bYMirr) {
+ Point aRef2(aRef1);
+ aRef2.X()++;
+ NbcMirrorGluePoints(aRef1,aRef2);
+ }
+ }
+ ResizePoint(aRefPoint,rRef,xFact,yFact);
+ if (pSub->GetObjCount()!=0) {
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ pObj->NbcResize(rRef,xFact,yFact);
+ }
+ } else {
+ ResizeRect(aOutRect,rRef,xFact,yFact);
+ SetRectsDirty();
+ }
+}
+
+
+void SdrObjGroup::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ SetGlueReallyAbsolute(TRUE);
+ nDrehWink=NormAngle360(nDrehWink+nWink);
+ RotatePoint(aRefPoint,rRef,sn,cs);
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ pObj->NbcRotate(rRef,nWink,sn,cs);
+ }
+ NbcRotateGluePoints(rRef,nWink,sn,cs);
+ SetGlueReallyAbsolute(FALSE);
+}
+
+
+void SdrObjGroup::NbcMirror(const Point& rRef1, const Point& rRef2)
+{
+ SetGlueReallyAbsolute(TRUE);
+ MirrorPoint(aRefPoint,rRef1,rRef2); // fehlende Implementation in SvdEtc !!!
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ pObj->NbcMirror(rRef1,rRef2);
+ }
+ NbcMirrorGluePoints(rRef1,rRef2);
+ SetGlueReallyAbsolute(FALSE);
+}
+
+
+void SdrObjGroup::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ SetGlueReallyAbsolute(TRUE);
+ nShearWink+=nWink;
+ ShearPoint(aRefPoint,rRef,tn);
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ pObj->NbcShear(rRef,nWink,tn,bVShear);
+ }
+ NbcShearGluePoints(rRef,nWink,tn,bVShear);
+ SetGlueReallyAbsolute(FALSE);
+}
+
+
+void SdrObjGroup::NbcSetAnchorPos(const Point& rPnt)
+{
+ aAnchor=rPnt;
+ Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
+ MovePoint(aRefPoint,aSiz);
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ pObj->NbcSetAnchorPos(rPnt);
+ }
+}
+
+
+void SdrObjGroup::SetSnapRect(const Rectangle& rRect)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ Rectangle aOld(GetSnapRect());
+ long nMulX=rRect.Right()-rRect.Left();
+ long nDivX=aOld.Right()-aOld.Left();
+ long nMulY=rRect.Bottom()-rRect.Top();
+ long nDivY=aOld.Bottom()-aOld.Top();
+ if (nDivX==0) { nMulX=1; nDivX=1; }
+ if (nDivY==0) { nMulY=1; nDivY=1; }
+ if (nMulX!=nDivX || nMulY!=nDivY) {
+ Fraction aX(nMulX,nDivX);
+ Fraction aY(nMulY,nDivY);
+ Resize(aOld.TopLeft(),aX,aY);
+ }
+ if (rRect.Left()!=aOld.Left() || rRect.Top()!=aOld.Top()) {
+ Move(Size(rRect.Left()-aOld.Left(),rRect.Top()-aOld.Top()));
+ }
+ SendRepaintBroadcast(TRUE);
+ SetChanged();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+
+void SdrObjGroup::SetLogicRect(const Rectangle& rRect)
+{
+ SetSnapRect(rRect);
+}
+
+
+void SdrObjGroup::Move(const Size& rSiz)
+{
+ if (rSiz.Width()!=0 || rSiz.Height()!=0) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ MovePoint(aRefPoint,rSiz);
+ if (pSub->GetObjCount()!=0) {
+ // #32383# Erst die Verbinder verschieben, dann den Rest
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ ULONG i;
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (pObj->IsEdgeObj()) pObj->Move(rSiz);
+ }
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (!pObj->IsEdgeObj()) pObj->Move(rSiz);
+ }
+ SendRepaintBroadcast(TRUE);
+ } else {
+ SendRepaintBroadcast();
+ MoveRect(aOutRect,rSiz);
+ SetRectsDirty();
+ SendRepaintBroadcast();
+ }
+ SetChanged();
+ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+ }
+}
+
+
+void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
+ FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0);
+ FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0);
+ if (bXMirr || bYMirr) {
+ Point aRef1(GetSnapRect().Center());
+ if (bXMirr) {
+ Point aRef2(aRef1);
+ aRef2.Y()++;
+ NbcMirrorGluePoints(aRef1,aRef2);
+ }
+ if (bYMirr) {
+ Point aRef2(aRef1);
+ aRef2.X()++;
+ NbcMirrorGluePoints(aRef1,aRef2);
+ }
+ }
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ ResizePoint(aRefPoint,rRef,xFact,yFact);
+ if (pSub->GetObjCount()!=0) {
+ // #32383# Erst die Verbinder verschieben, dann den Rest
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ ULONG i;
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (pObj->IsEdgeObj()) pObj->Resize(rRef,xFact,yFact);
+ }
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (!pObj->IsEdgeObj()) pObj->Resize(rRef,xFact,yFact);
+ }
+ SendRepaintBroadcast(TRUE);
+ } else {
+ SendRepaintBroadcast();
+ ResizeRect(aOutRect,rRef,xFact,yFact);
+ SetRectsDirty();
+ SendRepaintBroadcast();
+ }
+ SetChanged();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+
+void SdrObjGroup::Rotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ if (nWink!=0) {
+ SetGlueReallyAbsolute(TRUE);
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ nDrehWink=NormAngle360(nDrehWink+nWink);
+ RotatePoint(aRefPoint,rRef,sn,cs);
+ // #32383# Erst die Verbinder verschieben, dann den Rest
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ ULONG i;
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (pObj->IsEdgeObj()) pObj->Rotate(rRef,nWink,sn,cs);
+ }
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (!pObj->IsEdgeObj()) pObj->Rotate(rRef,nWink,sn,cs);
+ }
+ NbcRotateGluePoints(rRef,nWink,sn,cs);
+ SetGlueReallyAbsolute(FALSE);
+ SendRepaintBroadcast(TRUE);
+ SetChanged();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+
+void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2)
+{
+ SetGlueReallyAbsolute(TRUE);
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ MirrorPoint(aRefPoint,rRef1,rRef2); // fehlende Implementation in SvdEtc !!!
+ // #32383# Erst die Verbinder verschieben, dann den Rest
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ ULONG i;
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (pObj->IsEdgeObj()) pObj->Mirror(rRef1,rRef2);
+ }
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (!pObj->IsEdgeObj()) pObj->Mirror(rRef1,rRef2);
+ }
+ NbcMirrorGluePoints(rRef1,rRef2);
+ SetGlueReallyAbsolute(FALSE);
+ SendRepaintBroadcast(TRUE);
+ SetChanged();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+
+void SdrObjGroup::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ if (nWink!=0) {
+ SetGlueReallyAbsolute(TRUE);
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ nShearWink+=nWink;
+ ShearPoint(aRefPoint,rRef,tn);
+ // #32383# Erst die Verbinder verschieben, dann den Rest
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ ULONG i;
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (pObj->IsEdgeObj()) pObj->Shear(rRef,nWink,tn,bVShear);
+ }
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (!pObj->IsEdgeObj()) pObj->Shear(rRef,nWink,tn,bVShear);
+ }
+ NbcShearGluePoints(rRef,nWink,tn,bVShear);
+ SetGlueReallyAbsolute(FALSE);
+ SendRepaintBroadcast(TRUE);
+ SetChanged();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+
+void SdrObjGroup::SetAnchorPos(const Point& rPnt)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ FASTBOOL bChg=aAnchor!=rPnt;
+ aAnchor=rPnt;
+ Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y());
+ MovePoint(aRefPoint,aSiz);
+ // #32383# Erst die Verbinder verschieben, dann den Rest
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ ULONG i;
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (pObj->IsEdgeObj()) pObj->SetAnchorPos(rPnt);
+ }
+ for (i=0; i<nObjAnz; i++) {
+ SdrObject* pObj=pOL->GetObj(i);
+ if (!pObj->IsEdgeObj()) pObj->SetAnchorPos(rPnt);
+ }
+ if (bChg) {
+ SendRepaintBroadcast(TRUE);
+ SetChanged();
+ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+ }
+}
+
+
+
+void SdrObjGroup::NbcSetRelativePos(const Point& rPnt)
+{
+ Point aRelPos0(GetSnapRect().TopLeft()-aAnchor);
+ Size aSiz(rPnt.X()-aRelPos0.X(),rPnt.Y()-aRelPos0.Y());
+ NbcMove(aSiz); // Der ruft auch das SetRectsDirty()
+}
+
+
+void SdrObjGroup::SetRelativePos(const Point& rPnt)
+{
+ Point aRelPos0(GetSnapRect().TopLeft()-aAnchor);
+ Size aSiz(rPnt.X()-aRelPos0.X(),rPnt.Y()-aRelPos0.Y());
+ if (aSiz.Width()!=0 || aSiz.Height()!=0) Move(aSiz); // Der ruft auch das SetRectsDirty() und Broadcast, ...
+}
+
+
+void SdrObjGroup::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ const SfxItemSet* pAttr=&rAttr;
+ //
+ //SfxItemSet aSet(rAttr);
+ //pAttr=&aSet;
+ //for (USHORT nWhich=SDRATTR_NOTPERSIST_FIRST; nWhich<=SDRATTR_NOTPERSIST_LAST; nWhich++) {
+ // aSet.InvalidateItem(nWhich);
+ //}
+
+ if (!IsLinkedGroup()) {
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ pOL->GetObj(i)->NbcSetAttributes(*pAttr,bReplaceAll);
+ }
+ }
+
+ // NbcApplyNotPersistAttr(rAttr);
+}
+
+
+void SdrObjGroup::SetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ if (!IsLinkedGroup()) {
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ pOL->GetObj(i)->SetAttributes(rAttr,bReplaceAll);
+ }
+ }
+}
+
+
+void SdrObjGroup::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ pOL->GetObj(i)->TakeAttributes(rAttr,TRUE,bOnlyHardAttr);
+ }
+
+ //if (bMerge) {
+ // NotPersist-Items erstmal mit Put, damit die Werte der Sub-Objekte ueberschrieben werden
+ // Todo: Muss mit den urspruenglichen Werten Gemerged werden!
+ //}
+ // TakeNotPersistAttr(rAttr,FALSE);
+}
+
+
+SfxStyleSheet* SdrObjGroup::GetStyleSheet() const
+{
+ // Hier mit 'nem Iterator. Es koennte sonst passieren dass ein
+ // verschachteltes Gruppenobjekt wegen DontCare NULL liefert.
+ // Das koennte ich dann nicht unterscheiden von NotSet.
+ SfxStyleSheet* pRet=NULL;
+ FASTBOOL b1st=TRUE;
+ SdrObjListIter aIter(*this,IM_DEEPNOGROUPS);
+ while (aIter.IsMore()) {
+ SdrObject* pObj=aIter.Next();
+ if (b1st) {
+ b1st=FALSE;
+ pRet=pObj->GetStyleSheet(); // Der Erste
+ } else {
+ if (pObj->GetStyleSheet()!=pRet) return NULL; // Unterschiedlich!
+ }
+ }
+ // Wenn hier angekommen, sind alle gleich.
+ return pRet;
+}
+
+
+void SdrObjGroup::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ if (!IsLinkedGroup()) {
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ pOL->GetObj(i)->NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+ }
+ }
+}
+
+
+void SdrObjGroup::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ if (!IsLinkedGroup()) {
+ SdrObjList* pOL=pSub;
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG i=0; i<nObjAnz; i++) {
+ pOL->GetObj(i)->SetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+ }
+ }
+}
+
+
+void SdrObjGroup::NbcReformatText()
+{
+ pSub->NbcReformatAllTextObjects();
+}
+
+
+void SdrObjGroup::ReformatText()
+{
+ pSub->ReformatAllTextObjects();
+}
+
+
+void SdrObjGroup::BurnInStyleSheetAttributes()
+{
+ pSub->BurnInStyleSheetAttributes();
+}
+
+
+void SdrObjGroup::RestartAnimation(SdrPageView* pPageView) const
+{
+ pSub->RestartAllAnimations(pPageView);
+}
+
+
+SdrObject* SdrObjGroup::DoConvertToPolyObj(BOOL bBezier) const
+{
+ SdrObject* pGroup = new SdrObjGroup;
+ pGroup->SetModel(GetModel());
+
+ for(UINT32 a=0;a<pSub->GetObjCount();a++)
+ {
+ SdrObject* pIterObj = pSub->GetObj(a);
+ pGroup->GetSubList()->NbcInsertObject(pIterObj->DoConvertToPolyObj(bBezier));
+ }
+
+ return pGroup;
+}
+
+
+void SdrObjGroup::WriteData(SvStream& rOut) const
+{
+ SdrObject::WriteData(rOut);
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrObjGroup");
+#endif
+
+ // UNICODE: rOut << aName;
+ rOut.WriteByteString(aName);
+
+ UINT8 nTemp = bRefPoint; rOut << nTemp;
+ rOut << aRefPoint;
+ pSub->Save(rOut);
+ rOut << INT32(nDrehWink);
+ rOut << INT32(nShearWink);
+}
+
+
+void SdrObjGroup::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if(rIn.GetError())
+ return;
+
+ SdrObject::ReadData(rHead, rIn);
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrObjGroup");
+#endif
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ UINT8 nTemp; rIn >> nTemp; bRefPoint = nTemp;
+ rIn >> aRefPoint;
+ pSub->Load(rIn, *pPage);
+
+ if(rHead.GetVersion() >= 2)
+ {
+ INT32 n32;
+
+ rIn >> n32; nDrehWink = n32;
+ rIn >> n32; nShearWink = n32;
+ }
+}
+
+
+void SdrObjGroup::AfterRead()
+{
+ SdrObject::AfterRead();
+ pSub->AfterRead();
+}
+
+// ItemPool fuer dieses Objekt wechseln
+void SdrObjGroup::MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool)
+{
+ // call parent
+ SdrObject::MigrateItemPool(pSrcPool, pDestPool);
+
+ // own reaction
+ SdrObjList* pOL = pSub;
+ UINT32 nObjAnz = pOL->GetObjCount();
+ for(UINT32 a=0;a<nObjAnz;a++)
+ {
+ pOL->GetObj(a)->MigrateItemPool(pSrcPool, pDestPool);
+ }
+}
+
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
new file mode 100644
index 0000000000..7866980689
--- /dev/null
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -0,0 +1,1789 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdomeas.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdomeas.hxx"
+#include <math.h>
+#include "svditext.hxx" // enthaelt u.a. define ITEMID_FIELD fuer include flditem
+#include "xpoly.hxx"
+#include "xoutx.hxx"
+#include "svdtrans.hxx"
+#include "svdtouch.hxx"
+#include "svdhdl.hxx"
+#include "svdoutl.hxx"
+#include "svddrag.hxx"
+#include "svdpool.hxx"
+#include "svdattrx.hxx"
+#include "svdmodel.hxx"
+#include "svdio.hxx"
+#include "svdview.hxx"
+#include "svdglob.hxx" // StringCache
+#include "svdstr.hrc" // Objektname
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _SFXSMPLHINT_HXX //autogen
+#include <svtools/smplhint.hxx>
+#endif
+
+#ifndef _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+
+#ifndef _SVX_XLNSTIT_HXX //autogen
+#include "xlnstit.hxx"
+#endif
+
+#ifndef _SVX_XLNSTWIT_HXX //autogen
+#include "xlnstwit.hxx"
+#endif
+
+#ifndef _SVX_XLNEDIT_HXX //autogen
+#include "xlnedit.hxx"
+#endif
+
+#ifndef _SVX_XLNWTIT_HXX //autogen
+#include "xlnwtit.hxx"
+#endif
+
+#ifndef _SVX_XLNEDWIT_HXX //autogen
+#include "xlnedwit.hxx"
+#endif
+
+#ifndef _SVX_XLNSTCIT_HXX //autogen
+#include "xlnstcit.hxx"
+#endif
+
+#ifndef _SVX_XLNEDCIT_HXX //autogen
+#include "xlnedcit.hxx"
+#endif
+
+#ifndef _OUTLOBJ_HXX //autogen
+#include <outlobj.hxx>
+#endif
+
+#ifndef _OUTLINER_HXX //autogen
+#include "outliner.hxx"
+#endif
+
+#ifndef _EDITOBJ_HXX //autogen
+#include <editobj.hxx>
+#endif
+
+#include "svdfield.hxx"
+#include "flditem.hxx"
+
+#include "svdogrp.hxx"
+#include "svdopath.hxx"
+#include "svdpage.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrMeasureObjGeoData::SdrMeasureObjGeoData() {}
+SdrMeasureObjGeoData::~SdrMeasureObjGeoData() {}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SV_IMPL_PERSIST1(SdrMeasureField,SvxFieldData);
+
+__EXPORT SdrMeasureField::~SdrMeasureField()
+{
+}
+
+SvxFieldData* __EXPORT SdrMeasureField::Clone() const
+{
+ return new SdrMeasureField(*this);
+}
+
+int __EXPORT SdrMeasureField::operator==(const SvxFieldData& rSrc) const
+{
+ return eMeasureFieldKind==((SdrMeasureField&)rSrc).GetMeasureFieldKind();
+}
+
+void __EXPORT SdrMeasureField::Load(SvPersistStream& rIn)
+{
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrMeasureField");
+#endif
+ UINT16 nFieldKind;
+ rIn>>nFieldKind;
+ eMeasureFieldKind=(SdrMeasureFieldKind)nFieldKind;
+}
+
+void __EXPORT SdrMeasureField::Save(SvPersistStream& rOut)
+{
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrMeasureField");
+#endif
+ rOut<<(UINT16)eMeasureFieldKind;
+}
+
+void SdrMeasureField::TakeRepresentation(const SdrMeasureObj& rObj, XubString& rStr) const
+{
+ rStr.Erase();
+ Fraction aMeasureScale(1, 1);
+ BOOL bTextRota90(FALSE);
+ BOOL bShowUnit(FALSE);
+ FieldUnit eMeasureUnit(FUNIT_NONE);
+ FieldUnit eModUIUnit(FUNIT_NONE);
+
+ if(rObj.pMeasureAttr)
+ {
+ const SfxItemSet& rSet = rObj.pMeasureAttr->GetItemSet();
+
+ bTextRota90 = ((SdrMeasureTextRota90Item&)rSet.Get(SDRATTR_MEASURETEXTROTA90)).GetValue();
+ eMeasureUnit = ((SdrMeasureUnitItem&)rSet.Get(SDRATTR_MEASUREUNIT)).GetValue();
+ aMeasureScale = ((SdrMeasureScaleItem&)rSet.Get(SDRATTR_MEASURESCALE)).GetValue();
+ bShowUnit = ((SdrMeasureShowUnitItem&)rSet.Get(SDRATTR_MEASURESHOWUNIT)).GetValue();
+ }
+
+ SdrModel* pModel = rObj.pModel;
+
+ switch(eMeasureFieldKind)
+ {
+ case SDRMEASUREFIELD_VALUE:
+ {
+ if(pModel)
+ {
+ eModUIUnit = pModel->GetUIUnit();
+
+ if(eMeasureUnit == FUNIT_NONE)
+ eMeasureUnit = eModUIUnit;
+
+ INT32 nLen(GetLen(rObj.aPt2 - rObj.aPt1));
+ Fraction aFact(1,1);
+
+ if(eMeasureUnit != eModUIUnit)
+ {
+ // Zur Umrechnung der Einheiten
+ aFact *= GetMapFactor(eModUIUnit, eMeasureUnit).X();
+ }
+
+ if(aMeasureScale.GetNumerator() != aMeasureScale.GetDenominator())
+ {
+ aFact *= aMeasureScale;
+ }
+
+ if(aFact.GetNumerator() != aFact.GetDenominator())
+ {
+ // Scaling ueber BigInt, um Ueberlaeufe zu vermeiden
+ nLen = BigMulDiv(nLen, aFact.GetNumerator(), aFact.GetDenominator());
+ }
+
+ pModel->TakeMetricStr(nLen, rStr, TRUE);
+
+ if(!aFact.IsValid())
+ {
+ rStr = String();
+ rStr += sal_Unicode('?');
+ }
+
+ International aInter(GetpApp()->GetAppInternational());
+ sal_Unicode cDec(aInter.GetNumDecimalSep());
+
+ if(rStr.Search(cDec) != STRING_NOTFOUND)
+ {
+ xub_StrLen nLen(rStr.Len() - 1);
+
+ while(rStr.GetChar(nLen) == sal_Unicode('0'))
+ {
+ rStr.Erase(nLen);
+ nLen--;
+ }
+
+ if(rStr.GetChar(nLen) == cDec)
+ {
+ rStr.Erase(nLen);
+ nLen--;
+ }
+
+ if(!rStr.Len())
+ rStr += sal_Unicode('0');
+ }
+ }
+ else
+ {
+ // falls kein Model da ... (z.B. Preview im Dialog)
+ rStr = String();
+ rStr.AppendAscii("4711");
+ }
+
+ break;
+ }
+ case SDRMEASUREFIELD_UNIT:
+ {
+ if(bShowUnit)
+ {
+ if(rObj.pModel)
+ {
+ eModUIUnit = pModel->GetUIUnit();
+
+ if(eMeasureUnit == FUNIT_NONE)
+ eMeasureUnit = eModUIUnit;
+
+ if(bShowUnit)
+ pModel->TakeUnitStr(eMeasureUnit, rStr);
+ }
+ }
+
+ break;
+ }
+ case SDRMEASUREFIELD_ROTA90BLANCS:
+ {
+ if(bTextRota90)
+ {
+ rStr = String();
+ rStr += sal_Unicode(' ');
+ }
+
+ break;
+ }
+ }
+}
+
+TYPEINIT1(SdrMeasureObj,SdrTextObj);
+
+void SdrMeasureObj::ForceDefaultAttr(SfxItemPool* pPool)
+{
+ BOOL bLineMerk(!pLineAttr);
+ BOOL bOutlMerk(!pOutlAttr);
+ BOOL bMiscMerk(!pMiscAttr);
+
+ SdrTextObj::ForceDefaultAttr(pPool);
+
+ if(pPool)
+ {
+ if(!pMeasureAttr)
+ {
+ SdrMeasureSetItem aSetItem(pPool);
+
+ //#71958# by default, the show units Bool-Item is set as hard
+ // attribute to TRUE to aviod confusion when copying SdrMeasureObj's
+ // from one application to another
+ aSetItem.GetItemSet().Put(SdrMeasureShowUnitItem(TRUE));
+
+ pMeasureAttr = (SdrMeasureSetItem*)ImpSetNewAttr(pMeasureAttr, &aSetItem, FALSE);
+ }
+
+ if(bLineMerk && pLineAttr)
+ {
+ XLineAttrSetItem aSetItem(*pLineAttr);
+
+ aSetItem.GetItemSet().Put(XLineStyleItem(XLINE_SOLID));
+
+ XPolygon aXP(4); // []
+ aXP[0] = Point(100,0); // 0,4__[]__2,4
+ aXP[1] = Point(200,400); // \ /
+ aXP[2] = Point(0,400); // \ /
+ aXP[3] = Point(100,0); // \/1,0
+
+ aSetItem.GetItemSet().Put(XLineStartItem(String(), aXP));
+ aSetItem.GetItemSet().Put(XLineStartWidthItem(200));
+ aSetItem.GetItemSet().Put(XLineEndItem(String(), aXP));
+ aSetItem.GetItemSet().Put(XLineEndWidthItem(200));
+ aSetItem.GetItemSet().Put(XLineStyleItem(XLINE_SOLID));
+
+ pLineAttr=(XLineAttrSetItem*)ImpSetNewAttr(pLineAttr, &aSetItem, FALSE);
+ }
+ }
+}
+
+USHORT SdrMeasureObj::GetSetItemCount() const
+{
+ return 1+SdrTextObj::GetSetItemCount();
+}
+
+const SfxSetItem* SdrMeasureObj::GetSetItem(USHORT nNum) const
+{
+ if (nNum==0) return pMeasureAttr;
+ nNum--;
+ return SdrTextObj::GetSetItem(nNum);
+}
+
+void SdrMeasureObj::SetSetItem(USHORT nNum, const SfxSetItem* pAttr)
+{
+ if (nNum==0) pMeasureAttr=(const SdrMeasureSetItem*)pAttr;
+ else {
+ nNum--;
+ SdrTextObj::SetSetItem(nNum,pAttr);
+ }
+}
+
+SfxSetItem* SdrMeasureObj::MakeNewSetItem(USHORT nNum, FASTBOOL bClone) const
+{
+ if (nNum==0) {
+ if (bClone) return new SdrMeasureSetItem(*pMeasureAttr);
+ else return new SdrMeasureSetItem(GetItemPool());
+ } else {
+ nNum--;
+ return SdrTextObj::MakeNewSetItem(nNum,bClone);
+ }
+}
+
+SdrMeasureObj::SdrMeasureObj():
+ pMeasureAttr(NULL),
+ bTextDirty(FALSE)
+{
+}
+
+SdrMeasureObj::SdrMeasureObj(const Point& rPt1, const Point& rPt2):
+ aPt1(rPt1),
+ aPt2(rPt2),
+ pMeasureAttr(NULL),
+ bTextDirty(FALSE)
+{
+}
+
+SdrMeasureObj::~SdrMeasureObj()
+{
+ // Attr entfernen (macht das SdrAttrObj noch nicht automatisch)
+ pMeasureAttr=(SdrMeasureSetItem*)ImpSetNewAttr(pMeasureAttr,NULL,FALSE);
+}
+
+void SdrMeasureObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ rInfo.bSelectAllowed =TRUE;
+ rInfo.bMoveAllowed =TRUE;
+ rInfo.bResizeFreeAllowed=TRUE;
+ rInfo.bResizePropAllowed=TRUE;
+ rInfo.bRotateFreeAllowed=TRUE;
+ rInfo.bRotate90Allowed =TRUE;
+ rInfo.bMirrorFreeAllowed=TRUE;
+ rInfo.bMirror45Allowed =TRUE;
+ rInfo.bMirror90Allowed =TRUE;
+ rInfo.bTransparenceAllowed = FALSE;
+ rInfo.bGradientAllowed = FALSE;
+ rInfo.bShearAllowed =TRUE;
+ rInfo.bNoOrthoDesired =TRUE;
+ rInfo.bNoContortion =FALSE;
+ rInfo.bCanConvToPath =FALSE;
+ rInfo.bCanConvToPoly =TRUE;
+ rInfo.bCanConvToPathLineToArea=FALSE;
+ rInfo.bCanConvToPolyLineToArea=FALSE;
+ rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
+}
+
+UINT16 SdrMeasureObj::GetObjIdentifier() const
+{
+ return (UINT16)OBJ_MEASURE;
+}
+
+struct ImpMeasureRec
+{
+ Point aPt1;
+ Point aPt2;
+ SdrMeasureKind eKind;
+ SdrMeasureTextHPos eWantTextHPos;
+ SdrMeasureTextVPos eWantTextVPos;
+ long nLineDist;
+ long nHelplineOverhang;
+ long nHelplineDist;
+ long nHelpline1Len;
+ long nHelpline2Len;
+ FASTBOOL bBelowRefEdge;
+ FASTBOOL bTextRota90;
+ FASTBOOL bTextUpsideDown;
+ long nMeasureOverhang;
+ FieldUnit eMeasureUnit;
+ Fraction aMeasureScale;
+ FASTBOOL bShowUnit;
+ String aFormatString;
+ FASTBOOL bTextAutoAngle;
+ long nTextAutoAngleView;
+ FASTBOOL bTextIsFixedAngle;
+ long nTextFixedAngle;
+};
+
+struct ImpLineRec
+{
+ Point aP1;
+ Point aP2;
+};
+
+struct ImpMeasurePoly
+{
+ ImpLineRec aMainline1; // die mit dem 1. Pfeil
+ ImpLineRec aMainline2; // die mit dem 2. Pfeil
+ ImpLineRec aMainline3; // die dazwischen
+ ImpLineRec aHelpline1;
+ ImpLineRec aHelpline2;
+ Rectangle aTextRect;
+ Size aTextSize;
+ long nLineLen;
+ long nLineWink;
+ long nTextWink;
+ long nHlpWink;
+ double nLineSin;
+ double nLineCos;
+ double nHlpSin;
+ double nHlpCos;
+ USHORT nMainlineAnz;
+ SdrMeasureTextHPos eUsedTextHPos;
+ SdrMeasureTextVPos eUsedTextVPos;
+ long nLineWdt2; // Halbe Strichstaerke
+ long nArrow1Len; // Laenge des 1. Pfeils. Bei Center nur die Haelfte
+ long nArrow2Len; // Laenge des 2. Pfeils. Bei Center nur die Haelfte
+ long nArrow1Wdt; // Breite des 1. Pfeils
+ long nArrow2Wdt; // Breite des 2. Pfeils
+ long nShortLineLen; // Linienlaenge, wenn PfeileAussen
+ FASTBOOL bArrow1Center; // Pfeil 1 zentriert?
+ FASTBOOL bArrow2Center; // Pfeil 2 zentriert?
+ FASTBOOL bAutoUpsideDown; // UpsideDown durch Automatik
+ FASTBOOL bPfeileAussen;
+ FASTBOOL bBreakedLine;
+};
+
+void SdrMeasureObj::ImpTakeAttr(ImpMeasureRec& rRec) const
+{
+ rRec.aPt1=aPt1;
+ rRec.aPt2=aPt2;
+ if (pMeasureAttr!=NULL) {
+ const SfxItemSet& rSet=pMeasureAttr->GetItemSet();
+ rRec.eKind =((SdrMeasureKindItem& )rSet.Get(SDRATTR_MEASUREKIND )).GetValue();
+ rRec.eWantTextHPos =((SdrMeasureTextHPosItem& )rSet.Get(SDRATTR_MEASURETEXTHPOS )).GetValue();
+ rRec.eWantTextVPos =((SdrMeasureTextVPosItem& )rSet.Get(SDRATTR_MEASURETEXTVPOS )).GetValue();
+ rRec.nLineDist =((SdrMeasureLineDistItem& )rSet.Get(SDRATTR_MEASURELINEDIST )).GetValue();
+ rRec.nHelplineOverhang=((SdrMeasureHelplineOverhangItem&)rSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG)).GetValue();
+ rRec.nHelplineDist =((SdrMeasureHelplineDistItem& )rSet.Get(SDRATTR_MEASUREHELPLINEDIST )).GetValue();
+ rRec.nHelpline1Len =((SdrMeasureHelpline1LenItem& )rSet.Get(SDRATTR_MEASUREHELPLINE1LEN )).GetValue();
+ rRec.nHelpline2Len =((SdrMeasureHelpline2LenItem& )rSet.Get(SDRATTR_MEASUREHELPLINE2LEN )).GetValue();
+ rRec.bBelowRefEdge =((SdrMeasureBelowRefEdgeItem& )rSet.Get(SDRATTR_MEASUREBELOWREFEDGE )).GetValue();
+ rRec.bTextRota90 =((SdrMeasureTextRota90Item& )rSet.Get(SDRATTR_MEASURETEXTROTA90 )).GetValue();
+ rRec.bTextUpsideDown =((SdrMeasureTextUpsideDownItem& )rSet.Get(SDRATTR_MEASURETEXTUPSIDEDOWN )).GetValue();
+ rRec.nMeasureOverhang =((SdrMeasureOverhangItem& )rSet.Get(SDRATTR_MEASUREOVERHANG )).GetValue();
+ rRec.eMeasureUnit =((SdrMeasureUnitItem& )rSet.Get(SDRATTR_MEASUREUNIT )).GetValue();
+ rRec.aMeasureScale =((SdrMeasureScaleItem& )rSet.Get(SDRATTR_MEASURESCALE )).GetValue();
+ rRec.bShowUnit =((SdrMeasureShowUnitItem& )rSet.Get(SDRATTR_MEASURESHOWUNIT )).GetValue();
+ rRec.aFormatString =((SdrMeasureFormatStringItem& )rSet.Get(SDRATTR_MEASUREFORMATSTRING )).GetValue();
+ rRec.bTextAutoAngle =((SdrMeasureTextAutoAngleItem& )rSet.Get(SDRATTR_MEASURETEXTAUTOANGLE )).GetValue();
+ rRec.nTextAutoAngleView=((SdrMeasureTextAutoAngleViewItem&)rSet.Get(SDRATTR_MEASURETEXTAUTOANGLEVIEW)).GetValue();
+ rRec.bTextIsFixedAngle =((SdrMeasureTextIsFixedAngleItem& )rSet.Get(SDRATTR_MEASURETEXTISFIXEDANGLE )).GetValue();
+ rRec.nTextFixedAngle =((SdrMeasureTextFixedAngleItem& )rSet.Get(SDRATTR_MEASURETEXTFIXEDANGLE )).GetValue();
+ } else {
+ rRec.eKind=SDRMEASURE_STD;
+ rRec.eWantTextHPos=SDRMEASURE_TEXTHAUTO;
+ rRec.eWantTextVPos=SDRMEASURE_TEXTVAUTO;
+ rRec.nLineDist=800;
+ rRec.nHelplineOverhang=200;
+ rRec.nHelplineDist=100;
+ rRec.nHelpline1Len=0;
+ rRec.nHelpline2Len=0;
+ rRec.bBelowRefEdge=FALSE;
+ rRec.bTextRota90=FALSE;
+ rRec.bTextUpsideDown=FALSE;
+ rRec.nMeasureOverhang=600;
+ rRec.eMeasureUnit=FUNIT_NONE;
+ rRec.aMeasureScale=Fraction(1,1);
+ rRec.bShowUnit=FALSE;
+ rRec.aFormatString.Erase();
+ rRec.bTextAutoAngle=TRUE;
+ rRec.nTextAutoAngleView=31500;
+ rRec.bTextIsFixedAngle=FALSE;
+ rRec.nTextFixedAngle=0;
+ }
+}
+
+void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& rPol) const
+{
+ Point aP1(rRec.aPt1);
+ Point aP2(rRec.aPt2);
+ Point aDelt(aP2); aDelt-=aP1;
+
+ rPol.aTextSize=GetTextSize();
+ rPol.nLineLen=GetLen(aDelt);
+
+ rPol.nLineWdt2=0;
+ long nArrow1Len=0; FASTBOOL bArrow1Center=FALSE;
+ long nArrow2Len=0; FASTBOOL bArrow2Center=FALSE;
+ long nArrow1Wdt=0;
+ long nArrow2Wdt=0;
+ rPol.nArrow1Wdt=0;
+ rPol.nArrow2Wdt=0;
+ long nArrowNeed=0;
+ long nShortLen=0;
+ FASTBOOL bPfeileAussen=FALSE;
+ if (pLineAttr!=NULL) {
+ const SfxItemSet& rSet=pLineAttr->GetItemSet();
+ INT32 nLineWdt=((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue(); // Strichstaerke
+ rPol.nLineWdt2=(nLineWdt+1)/2;
+
+ nArrow1Wdt=((const XLineStartWidthItem&)(rSet.Get(XATTR_LINESTARTWIDTH))).GetValue();
+ if (nArrow1Wdt<0) nArrow1Wdt=-nLineWdt*nArrow1Wdt/100; // <0 = relativ
+ nArrow2Wdt=((const XLineEndWidthItem&)(rSet.Get(XATTR_LINEENDWIDTH))).GetValue();
+ if (nArrow2Wdt<0) nArrow2Wdt=-nLineWdt*nArrow2Wdt/100; // <0 = relativ
+
+ XPolygon aPol1(((const XLineStartItem&)(rSet.Get(XATTR_LINESTART))).GetValue());
+ XPolygon aPol2(((const XLineEndItem&)(rSet.Get(XATTR_LINEEND))).GetValue());
+ bArrow1Center=((const XLineStartCenterItem&)(rSet.Get(XATTR_LINESTARTCENTER))).GetValue();
+ bArrow2Center=((const XLineEndCenterItem&)(rSet.Get(XATTR_LINEENDCENTER))).GetValue();
+ nArrow1Len=XOutputDevice::InitLineStartEnd(aPol1,nArrow1Wdt,bArrow1Center)-1;
+ nArrow2Len=XOutputDevice::InitLineStartEnd(aPol2,nArrow2Wdt,bArrow2Center)-1;
+ // nArrowLen ist bei bCenter bereits halbiert
+ // Bei 2 Pfeilen a 4mm ist unter 10mm Schluss.
+ nArrowNeed=nArrow1Len+nArrow2Len+(nArrow1Wdt+nArrow2Wdt)/2;
+ if (rPol.nLineLen<nArrowNeed) bPfeileAussen=TRUE;
+ nShortLen=(nArrow1Len+nArrow1Wdt + nArrow2Len+nArrow2Wdt) /2;
+ }
+
+ rPol.eUsedTextHPos=rRec.eWantTextHPos;
+ rPol.eUsedTextVPos=rRec.eWantTextVPos;
+ if (rPol.eUsedTextVPos==SDRMEASURE_TEXTVAUTO) rPol.eUsedTextVPos=SDRMEASURE_ABOVE;
+ FASTBOOL bBrkLine=rPol.eUsedTextVPos==SDRMEASURETEXT_BREAKEDLINE;
+ if (rPol.eUsedTextVPos==SDRMEASURETEXT_VERTICALCENTERED) {
+ if (pOutlinerParaObject!=NULL && pOutlinerParaObject->GetTextObject().GetParagraphCount()==1) {
+ bBrkLine=TRUE; // Unterbrochene Linie, wenn nur 1 Absatz.
+ }
+ }
+ rPol.bBreakedLine=bBrkLine;
+ if (rPol.eUsedTextHPos==SDRMEASURE_TEXTHAUTO) { // bei zu breitem Text diesen eventuell nach aussen schieben
+ FASTBOOL bOutside=FALSE;
+ long nNeedSiz=!rRec.bTextRota90 ? rPol.aTextSize.Width() : rPol.aTextSize.Height();
+ if (nNeedSiz>rPol.nLineLen) bOutside=TRUE; // Text passt nicht in die Mitte
+ if (bBrkLine) {
+ if (nNeedSiz+nArrowNeed>rPol.nLineLen) bPfeileAussen=TRUE; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen
+ } else {
+ long nSmallNeed=nArrow1Len+nArrow2Len+(nArrow1Wdt+nArrow2Wdt)/2/4;
+ if (nNeedSiz+nSmallNeed>rPol.nLineLen) bPfeileAussen=TRUE; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen
+ }
+ rPol.eUsedTextHPos=bOutside ? SDRMEASURE_TEXTLEFTOUTSIDE : SDRMEASURE_TEXTINSIDE;
+ }
+ if (rPol.eUsedTextHPos!=SDRMEASURE_TEXTINSIDE) bPfeileAussen=TRUE;
+ rPol.nArrow1Wdt=nArrow1Wdt;
+ rPol.nArrow2Wdt=nArrow2Wdt;
+ rPol.nShortLineLen=nShortLen;
+ rPol.bPfeileAussen=bPfeileAussen;
+ rPol.nArrow1Len=nArrow1Len;
+ rPol.bArrow1Center=bArrow1Center;
+ rPol.nArrow2Len=nArrow2Len;
+ rPol.bArrow2Center=bArrow2Center;
+
+ rPol.nLineWink=GetAngle(aDelt);
+ double a=rPol.nLineWink*nPi180;
+ double nLineSin=sin(a);
+ double nLineCos=cos(a);
+ rPol.nLineSin=nLineSin;
+ rPol.nLineCos=nLineCos;
+
+ rPol.nTextWink=rPol.nLineWink;
+ if (rRec.bTextRota90) rPol.nTextWink+=9000;
+
+ rPol.bAutoUpsideDown=FALSE;
+ if (rRec.bTextAutoAngle) {
+ long nTmpWink=NormAngle360(rPol.nTextWink-rRec.nTextAutoAngleView);
+ if (nTmpWink>=18000) {
+ rPol.nTextWink+=18000;
+ rPol.bAutoUpsideDown=TRUE;
+ }
+ }
+
+ if (rRec.bTextUpsideDown) rPol.nTextWink+=18000;
+ rPol.nTextWink=NormAngle360(rPol.nTextWink);
+ rPol.nHlpWink=rPol.nLineWink+9000;
+ if (rRec.bBelowRefEdge) rPol.nHlpWink+=18000;
+ rPol.nHlpWink=NormAngle360(rPol.nHlpWink);
+ double nHlpSin=nLineCos;
+ double nHlpCos=-nLineSin;
+ if (rRec.bBelowRefEdge) {
+ nHlpSin=-nHlpSin;
+ nHlpCos=-nHlpCos;
+ }
+ rPol.nHlpSin=nHlpSin;
+ rPol.nHlpCos=nHlpCos;
+
+ long nLineDist=rRec.nLineDist;
+ long nOverhang=rRec.nHelplineOverhang;
+ long nHelplineDist=rRec.nHelplineDist;
+
+ long dx= Round(nLineDist*nHlpCos);
+ long dy=-Round(nLineDist*nHlpSin);
+ long dxh1a= Round((nHelplineDist-rRec.nHelpline1Len)*nHlpCos);
+ long dyh1a=-Round((nHelplineDist-rRec.nHelpline1Len)*nHlpSin);
+ long dxh1b= Round((nHelplineDist-rRec.nHelpline2Len)*nHlpCos);
+ long dyh1b=-Round((nHelplineDist-rRec.nHelpline2Len)*nHlpSin);
+ long dxh2= Round((nLineDist+nOverhang)*nHlpCos);
+ long dyh2=-Round((nLineDist+nOverhang)*nHlpSin);
+
+ // Masshilfslinie 1
+ rPol.aHelpline1.aP1=Point(aP1.X()+dxh1a,aP1.Y()+dyh1a);
+ rPol.aHelpline1.aP2=Point(aP1.X()+dxh2,aP1.Y()+dyh2);
+
+ // Masshilfslinie 2
+ rPol.aHelpline2.aP1=Point(aP2.X()+dxh1b,aP2.Y()+dyh1b);
+ rPol.aHelpline2.aP2=Point(aP2.X()+dxh2,aP2.Y()+dyh2);
+
+ // Masslinie(n)
+ Point aMainlinePt1(aP1.X()+dx,aP1.Y()+dy);
+ Point aMainlinePt2(aP2.X()+dx,aP2.Y()+dy);
+ if (!bPfeileAussen) {
+ rPol.aMainline1.aP1=aMainlinePt1;
+ rPol.aMainline1.aP2=aMainlinePt2;
+ rPol.aMainline2=rPol.aMainline1;
+ rPol.aMainline3=rPol.aMainline1;
+ rPol.nMainlineAnz=1;
+ if (bBrkLine) {
+ long nNeedSiz=!rRec.bTextRota90 ? rPol.aTextSize.Width() : rPol.aTextSize.Height();
+ long nHalfLen=(rPol.nLineLen-nNeedSiz-nArrow1Wdt/4-nArrow2Wdt/4) /2;
+ rPol.nMainlineAnz=2;
+ rPol.aMainline1.aP2=aMainlinePt1;
+ rPol.aMainline1.aP2.X()+=nHalfLen;
+ RotatePoint(rPol.aMainline1.aP2,rPol.aMainline1.aP1,nLineSin,nLineCos);
+ rPol.aMainline2.aP1=aMainlinePt2;
+ rPol.aMainline2.aP1.X()-=nHalfLen;
+ RotatePoint(rPol.aMainline2.aP1,rPol.aMainline2.aP2,nLineSin,nLineCos);
+ }
+ } else {
+ long nLen1=nShortLen; // Pfeilbreite als Linienlaenge ausserhalb des Pfeils
+ long nLen2=nShortLen;
+ long nTextWdt=rRec.bTextRota90 ? rPol.aTextSize.Height() : rPol.aTextSize.Width();
+ if (!bBrkLine) {
+ if (rPol.eUsedTextHPos==SDRMEASURE_TEXTLEFTOUTSIDE) nLen1=nArrow1Len+nTextWdt;
+ if (rPol.eUsedTextHPos==SDRMEASURE_TEXTRIGHTOUTSIDE) nLen2=nArrow2Len+nTextWdt;
+ }
+ rPol.aMainline1.aP1=aMainlinePt1;
+ rPol.aMainline1.aP2=aMainlinePt1; rPol.aMainline1.aP2.X()-=nLen1; RotatePoint(rPol.aMainline1.aP2,aMainlinePt1,nLineSin,nLineCos);
+ rPol.aMainline2.aP1=aMainlinePt2; rPol.aMainline2.aP1.X()+=nLen2; RotatePoint(rPol.aMainline2.aP1,aMainlinePt2,nLineSin,nLineCos);
+ rPol.aMainline2.aP2=aMainlinePt2;
+ rPol.aMainline3.aP1=aMainlinePt1;
+ rPol.aMainline3.aP2=aMainlinePt2;
+ rPol.nMainlineAnz=3;
+ if (bBrkLine && rPol.eUsedTextHPos==SDRMEASURE_TEXTINSIDE) rPol.nMainlineAnz=2;
+ }
+}
+
+void SdrMeasureObj::ImpCalcXPoly(const ImpMeasurePoly& rPol, XPolyPolygon& rXPP) const
+{
+ rXPP.Clear();
+ XPolygon aXP(2);
+ aXP[0]=rPol.aMainline1.aP1;
+ aXP[1]=rPol.aMainline1.aP2;
+ rXPP.Insert(aXP);
+ if (rPol.nMainlineAnz>1) {
+ aXP[0]=rPol.aMainline2.aP1;
+ aXP[1]=rPol.aMainline2.aP2;
+ rXPP.Insert(aXP);
+ }
+ if (rPol.nMainlineAnz>2) {
+ aXP[0]=rPol.aMainline3.aP1;
+ aXP[1]=rPol.aMainline3.aP2;
+ rXPP.Insert(aXP);
+ }
+ aXP[0]=rPol.aHelpline1.aP1;
+ aXP[1]=rPol.aHelpline1.aP2;
+ rXPP.Insert(aXP);
+ aXP[0]=rPol.aHelpline2.aP1;
+ aXP[1]=rPol.aHelpline2.aP2;
+ rXPP.Insert(aXP);
+}
+
+FASTBOOL SdrMeasureObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ // Hidden objects on masterpages, draw nothing
+ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+ return TRUE;
+
+ // prepare ItemSet of this object
+ SfxItemSet aSet((SfxItemPool&)(*GetItemPool()));
+ TakeAttributes(aSet, FALSE, TRUE);
+
+ // perepare ItemSet to avoid old XOut line drawing
+ XLineAttrSetItem aXLSet((SfxItemPool*)GetItemPool());
+ aXLSet.GetItemSet().Put(XLineStyleItem(XLINE_NONE));
+
+ // prepare line geometry
+ ImpLineGeometry* pLineGeometry = ImpPrepareLineGeometry(rXOut, aSet);
+
+ // Shadows
+ BOOL bShadOn = ((SdrShadowItem&)(aSet.Get(SDRATTR_SHADOW))).GetValue();
+ if(bShadOn && pLineGeometry)
+ {
+ // draw the line geometry
+ ImpDrawShadowLineGeometry(rXOut, aSet, *pLineGeometry);
+ }
+
+ // Before here the LineAttr were set: if(pLineAttr) rXOut.SetLineAttr(*pLineAttr);
+ rXOut.SetLineAttr(aXLSet);
+
+ // !!! aGeo muss noch fuer Textausgabe gesetzt werden !!!
+ // aRect ebenso
+ ImpMeasureRec aRec;
+ ImpMeasurePoly aMPol;
+ ImpTakeAttr(aRec);
+ ImpCalcGeometrics(aRec,aMPol);
+ FASTBOOL bMerk1=rXOut.IsLineStart();
+ FASTBOOL bMerk2=rXOut.IsLineEnd();
+ if (aMPol.nMainlineAnz>1) {
+ // Je 1 Linienende temporaer abschalten
+ rXOut.OverrideLineEnd(FALSE);
+ rXOut.DrawLine(aMPol.aMainline1.aP1,aMPol.aMainline1.aP2);
+ rXOut.OverrideLineEnd(bMerk2);
+ rXOut.OverrideLineStart(FALSE);
+ rXOut.DrawLine(aMPol.aMainline2.aP1,aMPol.aMainline2.aP2);
+ rXOut.OverrideLineStart(bMerk1);
+ } else {
+ rXOut.DrawLine(aMPol.aMainline1.aP1,aMPol.aMainline1.aP2);
+ }
+ rXOut.OverrideLineStart(FALSE);
+ rXOut.OverrideLineEnd(FALSE);
+ if (aMPol.nMainlineAnz>2) {
+ rXOut.DrawLine(aMPol.aMainline3.aP1,aMPol.aMainline3.aP2);
+ }
+ rXOut.DrawLine(aMPol.aHelpline1.aP1,aMPol.aHelpline1.aP2);
+ rXOut.DrawLine(aMPol.aHelpline2.aP1,aMPol.aHelpline2.aP2);
+
+ // Own line drawing
+ if(pLineGeometry)
+ {
+ // draw the line geometry
+ ImpDrawColorLineGeometry(rXOut, aSet, *pLineGeometry);
+ }
+
+ FASTBOOL bOk=TRUE;
+ if (bTextDirty) UndirtyText();
+ bOk=SdrTextObj::Paint(rXOut,rInfoRec);
+ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {
+ bOk=PaintGluePoints(rXOut,rInfoRec);
+ }
+
+ // throw away line geometry
+ if(pLineGeometry)
+ delete pLineGeometry;
+
+ return bOk;
+}
+
+FASTBOOL SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos,
+ FASTBOOL bEdit,
+ Color*& rpTxtColor, Color*& rpFldColor, XubString& rRet) const
+{
+ const SvxFieldData* pField=rField.GetField();
+ SdrMeasureField* pMeasureField=PTR_CAST(SdrMeasureField,pField);
+ if (pMeasureField!=NULL) {
+ pMeasureField->TakeRepresentation(*this,rRet);
+ if (rpFldColor!=NULL) {
+ if (!bEdit)
+ {
+ delete rpFldColor;
+ rpFldColor=NULL;
+ }
+ }
+ return TRUE;
+ } else {
+ return SdrTextObj::CalcFieldValue(rField,nPara,nPos,bEdit,rpTxtColor,rpFldColor,rRet);
+ }
+}
+
+void SdrMeasureObj::UndirtyText() const
+{
+ if (bTextDirty) {
+ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+ if (pOutlinerParaObject==NULL) {
+ rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_ROTA90BLANCS)),ESelection(0,0));
+ rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_VALUE)),ESelection(0,1));
+ rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_UNIT)),ESelection(0,2));
+ rOutliner.QuickInsertField(SvxFieldItem(SdrMeasureField(SDRMEASUREFIELD_ROTA90BLANCS)),ESelection(0,3));
+ if (pStyleSheet!=NULL) rOutliner.SetStyleSheet( 0, pStyleSheet );
+ if (pOutlAttr!=NULL) rOutliner.SetParaAttribs(0,pOutlAttr->GetItemSet());
+ // casting auf nonconst
+ ((SdrMeasureObj*)this)->pOutlinerParaObject=rOutliner.CreateParaObject();
+ } else {
+ rOutliner.SetText(*pOutlinerParaObject);
+ }
+ rOutliner.SetUpdateMode(TRUE);
+ rOutliner.UpdateFields();
+ Size aSiz(rOutliner.CalcTextSize());
+ rOutliner.Clear();
+ // 3x casting auf nonconst
+ ((SdrMeasureObj*)this)->aTextSize=aSiz;
+ ((SdrMeasureObj*)this)->bTextSizeDirty=FALSE;
+ ((SdrMeasureObj*)this)->bTextDirty=FALSE;
+ }
+}
+
+void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+{
+ if (bTextDirty) UndirtyText();
+ ImpMeasureRec aRec;
+ ImpMeasurePoly aMPol;
+ ImpTakeAttr(aRec);
+ ImpCalcGeometrics(aRec,aMPol);
+
+ // TextSize ermitteln inkl. Textrahmenabstaende
+ Size aTextSize(aMPol.aTextSize);
+ if (aTextSize.Width()<1) aTextSize.Width()=1;
+ if (aTextSize.Height()<1) aTextSize.Height()=1;
+ aTextSize.Width()+=GetTextLeftDistance()+GetTextRightDistance();
+ aTextSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance();
+
+ Point aPt1(aMPol.aMainline1.aP1);
+ long nLen=aMPol.nLineLen;
+ long nLWdt=aMPol.nLineWdt2;
+ long nArr1Len=aMPol.nArrow1Len;
+ long nArr2Len=aMPol.nArrow2Len;
+ if (aMPol.bBreakedLine) {
+ // Bei Unterbrochener Linie und Outside muss der Text nicht neben den
+ // Pfeil sondern neben die Linie an dem Pfeil plaziert werden
+ nArr1Len=aMPol.nShortLineLen+aMPol.nArrow1Wdt/4;
+ nArr2Len=aMPol.nShortLineLen+aMPol.nArrow2Wdt/4;
+ }
+
+ Point aTextPos;
+ FASTBOOL bRota90=aRec.bTextRota90;
+ FASTBOOL bUpsideDown=aRec.bTextUpsideDown!=aMPol.bAutoUpsideDown;
+ FASTBOOL bBelowRefEdge=aRec.bBelowRefEdge;
+ SdrMeasureTextHPos eMH=aMPol.eUsedTextHPos;
+ SdrMeasureTextVPos eMV=aMPol.eUsedTextVPos;
+ if (!bRota90) {
+ switch (eMH) {
+ case SDRMEASURE_TEXTLEFTOUTSIDE: aTextPos.X()=aPt1.X()-aTextSize.Width()-nArr1Len-nLWdt; break;
+ case SDRMEASURE_TEXTRIGHTOUTSIDE: aTextPos.X()=aPt1.X()+nLen+nArr2Len+nLWdt; break;
+ default: aTextPos.X()=aPt1.X(); aTextSize.Width()=nLen;
+ }
+ switch (eMV) {
+ case SDRMEASURETEXT_VERTICALCENTERED:
+ case SDRMEASURETEXT_BREAKEDLINE: aTextPos.Y()=aPt1.Y()-aTextSize.Height()/2; break;
+ case SDRMEASURE_BELOW: {
+ if (!bUpsideDown) aTextPos.Y()=aPt1.Y()+nLWdt;
+ else aTextPos.Y()=aPt1.Y()-aTextSize.Height()-nLWdt;
+ } break;
+ default: {
+ if (!bUpsideDown) aTextPos.Y()=aPt1.Y()-aTextSize.Height()-nLWdt;
+ else aTextPos.Y()=aPt1.Y()+nLWdt;
+ }
+ }
+ if (bUpsideDown) {
+ aTextPos.X()+=aTextSize.Width();
+ aTextPos.Y()+=aTextSize.Height();
+ }
+ } else { // also wenn bTextRota90==TRUE
+ switch (eMH) {
+ case SDRMEASURE_TEXTLEFTOUTSIDE: aTextPos.X()=aPt1.X()-aTextSize.Height()-nArr1Len; break;
+ case SDRMEASURE_TEXTRIGHTOUTSIDE: aTextPos.X()=aPt1.X()+nLen+nArr2Len; break;
+ default: aTextPos.X()=aPt1.X(); aTextSize.Height()=nLen;
+ }
+ switch (eMV) {
+ case SDRMEASURETEXT_VERTICALCENTERED:
+ case SDRMEASURETEXT_BREAKEDLINE: aTextPos.Y()=aPt1.Y()+aTextSize.Width()/2; break;
+ case SDRMEASURE_BELOW: {
+ if (!bBelowRefEdge) aTextPos.Y()=aPt1.Y()+aTextSize.Width()+nLWdt;
+ else aTextPos.Y()=aPt1.Y()-nLWdt;
+ } break;
+ default: {
+ if (!bBelowRefEdge) aTextPos.Y()=aPt1.Y()-nLWdt;
+ else aTextPos.Y()=aPt1.Y()+aTextSize.Width()+nLWdt;
+ }
+ }
+ if (bUpsideDown) {
+ aTextPos.X()+=aTextSize.Height();
+ aTextPos.Y()-=aTextSize.Width();
+ }
+ }
+ if (aMPol.nTextWink!=aGeo.nDrehWink) {
+ ((SdrMeasureObj*)this)->aGeo.nDrehWink=aMPol.nTextWink;
+ ((SdrMeasureObj*)this)->aGeo.RecalcSinCos();
+ }
+ RotatePoint(aTextPos,aPt1,aMPol.nLineSin,aMPol.nLineCos);
+ aTextSize.Width()++; aTextSize.Height()++; // wg. des komischen Verhaltens beim Rect-Ctor
+ rRect=Rectangle(aTextPos,aTextSize);
+ rRect.Justify();
+ ((SdrMeasureObj*)this)->aRect=rRect;
+
+ if (aMPol.nTextWink!=aGeo.nDrehWink) {
+ ((SdrMeasureObj*)this)->aGeo.nDrehWink=aMPol.nTextWink;
+ ((SdrMeasureObj*)this)->aGeo.RecalcSinCos();
+ }
+}
+
+SdrObject* SdrMeasureObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ FASTBOOL bHit=FALSE;
+ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+ INT32 nMyTol=nTol;
+ INT32 nWdt=ImpGetLineWdt()/2; // Halbe Strichstaerke
+ if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Linie keine Toleranz noetig
+ Rectangle aR(rPnt,rPnt);
+ aR.Left() -=nMyTol;
+ aR.Right() +=nMyTol;
+ aR.Top() -=nMyTol;
+ aR.Bottom()+=nMyTol;
+
+ if (bTextDirty) UndirtyText();
+ ImpMeasureRec aRec;
+ ImpMeasurePoly aMPol;
+ ImpTakeAttr(aRec);
+ ImpCalcGeometrics(aRec,aMPol);
+ bHit=IsRectTouchesLine(aMPol.aMainline1.aP1,aMPol.aMainline1.aP2,aR) ||
+ IsRectTouchesLine(aMPol.aMainline2.aP1,aMPol.aMainline2.aP2,aR) ||
+ IsRectTouchesLine(aMPol.aHelpline1.aP1,aMPol.aHelpline1.aP2,aR) ||
+ IsRectTouchesLine(aMPol.aHelpline2.aP1,aMPol.aHelpline2.aP2,aR);
+ // und nun noch ggf. den Textbereich checken
+ bHit=bHit || SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer)!=NULL;
+ return bHit ? (SdrObject*)this : NULL;
+}
+
+void SdrMeasureObj::operator=(const SdrObject& rObj)
+{
+ SdrTextObj::operator=(rObj);
+ aPt1=((SdrMeasureObj&)rObj).aPt1;
+ aPt2=((SdrMeasureObj&)rObj).aPt2;
+ pMeasureAttr=(SdrMeasureSetItem*)ImpSetNewAttr(pMeasureAttr,((SdrMeasureObj&)rObj).pMeasureAttr);
+ bTextDirty=((SdrMeasureObj&)rObj).bTextDirty;
+}
+
+void SdrMeasureObj::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulMEASURE);
+}
+
+void SdrMeasureObj::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralMEASURE);
+}
+
+void SdrMeasureObj::TakeXorPoly(XPolyPolygon& rXPP, FASTBOOL bDetail) const
+{
+ ImpMeasureRec aRec;
+ ImpMeasurePoly aMPol;
+ ImpTakeAttr(aRec);
+ ImpCalcGeometrics(aRec,aMPol);
+ ImpCalcXPoly(aMPol,rXPP);
+}
+
+void SdrMeasureObj::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+USHORT SdrMeasureObj::GetHdlCount() const
+{
+ return 6;
+}
+
+SdrHdl* SdrMeasureObj::GetHdl(USHORT nHdlNum) const
+{
+ ImpMeasureRec aRec;
+ ImpMeasurePoly aMPol;
+ ImpTakeAttr(aRec);
+ aRec.nHelplineDist=0;
+ ImpCalcGeometrics(aRec,aMPol);
+ Point aPt;
+ SdrHdlKind eHdl=HDL_POLY;
+ switch (nHdlNum) {
+ case 0: aPt=aMPol.aHelpline1.aP1; break;
+ case 1: aPt=aMPol.aHelpline2.aP1; break;
+ case 2: aPt=aPt1; break;
+ case 3: aPt=aPt2; break;
+ case 4: aPt=aMPol.aHelpline1.aP2; break;
+ case 5: aPt=aMPol.aHelpline2.aP2; break;
+ } // switch
+ SdrHdl* pHdl=new ImpMeasureHdl(aPt,HDL_USER);
+ pHdl->SetObjHdlNum(nHdlNum);
+ pHdl->SetDrehWink(aMPol.nLineWink);
+ return pHdl;
+}
+
+void SdrMeasureObj::AddToHdlList(SdrHdlList& rHdlList) const
+{
+ SdrTextObj::AddToHdlList(rHdlList);
+}
+
+FASTBOOL SdrMeasureObj::HasSpecialDrag() const
+{
+ return TRUE;
+}
+
+FASTBOOL SdrMeasureObj::BegDrag(SdrDragStat& rDrag) const
+{
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ if (pHdl!=NULL) {
+ USHORT nHdlNum=pHdl->GetObjHdlNum();
+ if (nHdlNum!=2 && nHdlNum!=3) {
+ rDrag.SetEndDragChangesAttributes(TRUE);
+ }
+ ImpMeasureRec* pMR=new ImpMeasureRec; // #48544#
+ ImpTakeAttr(*pMR);
+ rDrag.SetUser(pMR);
+ }
+ return pHdl!=NULL;
+}
+
+FASTBOOL SdrMeasureObj::MovDrag(SdrDragStat& rDrag) const
+{
+ ImpMeasureRec* pMR=(ImpMeasureRec*)rDrag.GetUser();
+ if (pMR!=NULL) { // #48544#
+ ImpTakeAttr(*pMR);
+ ImpEvalDrag(*pMR,rDrag);
+ }
+ return TRUE;
+}
+
+FASTBOOL SdrMeasureObj::EndDrag(SdrDragStat& rDrag)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ ImpMeasureRec* pMR=(ImpMeasureRec*)rDrag.GetUser(); // #48544#
+ ImpMeasureRec aRec0;
+ ImpTakeAttr(aRec0);
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ USHORT nHdlNum=pHdl->GetObjHdlNum();
+ switch (nHdlNum) {
+ case 2: aPt1=pMR->aPt1; SetTextDirty(); break;
+ case 3: aPt2=pMR->aPt2; SetTextDirty(); break;
+ default: {
+ SdrMeasureSetItem aSI(*pMeasureAttr);
+ switch (nHdlNum) {
+ case 0: case 1: {
+ if (pMR->nHelpline1Len!=aRec0.nHelpline1Len) {
+ aSI.GetItemSet().Put(SdrMeasureHelpline1LenItem(pMR->nHelpline1Len));
+ }
+ if (pMR->nHelpline2Len!=aRec0.nHelpline2Len) {
+ aSI.GetItemSet().Put(SdrMeasureHelpline2LenItem(pMR->nHelpline2Len));
+ }
+ } break;
+ case 4: case 5: {
+ if (pMR->nLineDist!=aRec0.nLineDist) {
+ aSI.GetItemSet().Put(SdrMeasureLineDistItem(pMR->nLineDist));
+ }
+ if (pMR->bBelowRefEdge!=aRec0.bBelowRefEdge) {
+ aSI.GetItemSet().Put(SdrMeasureBelowRefEdgeItem(pMR->bBelowRefEdge));
+ }
+ }
+ }
+ pMeasureAttr=(SdrMeasureSetItem*)ImpSetNewAttr(pMeasureAttr,&aSI);
+ }
+ } // switch
+ SetRectsDirty();
+ SendRepaintBroadcast();
+ if (pMR!=NULL) {
+ delete pMR; // #48544#
+ rDrag.SetUser(NULL);
+ }
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ return TRUE;
+}
+
+void SdrMeasureObj::BrkDrag(SdrDragStat& rDrag) const
+{
+ ImpMeasureRec* pMR=(ImpMeasureRec*)rDrag.GetUser();
+ if (pMR!=NULL) {
+ delete pMR; // #48544#
+ rDrag.SetUser(NULL);
+ }
+}
+
+XubString SdrMeasureObj::GetDragComment(const SdrDragStat& rDrag, FASTBOOL bUndoDragComment, FASTBOOL bCreateComment) const
+{
+ XubString aStr;
+ return aStr;
+}
+
+void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) const
+{
+ long nLineWink=GetAngle(rRec.aPt2-rRec.aPt1);
+ double a=nLineWink*nPi180;
+ double nSin=sin(a);
+ double nCos=cos(a);
+
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ USHORT nHdlNum=pHdl->GetObjHdlNum();
+ FASTBOOL bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho();
+ FASTBOOL bBigOrtho=bOrtho && rDrag.GetView()->IsBigOrtho();
+ FASTBOOL bBelow=rRec.bBelowRefEdge;
+ Point aPt(rDrag.GetNow());
+
+ switch (nHdlNum) {
+ case 0: {
+ RotatePoint(aPt,aPt1,nSin,-nCos);
+ rRec.nHelpline1Len=aPt1.Y()-aPt.Y();
+ if (bBelow) rRec.nHelpline1Len=-rRec.nHelpline1Len;
+ if (bOrtho) rRec.nHelpline2Len=rRec.nHelpline1Len;
+ } break;
+ case 1: {
+ RotatePoint(aPt,aPt2,nSin,-nCos);
+ rRec.nHelpline2Len=aPt2.Y()-aPt.Y();
+ if (bBelow) rRec.nHelpline2Len=-rRec.nHelpline2Len;
+ if (bOrtho) rRec.nHelpline1Len=rRec.nHelpline2Len;
+ } break;
+ case 2: case 3: {
+ FASTBOOL bAnf=nHdlNum==2;
+ Point& rMov=bAnf ? rRec.aPt1 : rRec.aPt2;
+ Point aMov(rMov);
+ Point aFix(bAnf ? rRec.aPt2 : rRec.aPt1);
+ if (bOrtho) {
+ long ndx0=aMov.X()-aFix.X();
+ long ndy0=aMov.Y()-aFix.Y();
+ FASTBOOL bHLin=ndy0==0;
+ FASTBOOL bVLin=ndx0==0;
+ if (!bHLin || !bVLin) { // sonst ist aPt1==aPt2
+ long ndx=aPt.X()-aFix.X();
+ long ndy=aPt.Y()-aFix.Y();
+ double nXFact=0; if (!bVLin) nXFact=(double)ndx/(double)ndx0;
+ double nYFact=0; if (!bHLin) nYFact=(double)ndy/(double)ndy0;
+ FASTBOOL bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho);
+ FASTBOOL bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho);
+ if (bHor) ndy=long(ndy0*nXFact);
+ if (bVer) ndx=long(ndx0*nYFact);
+ aPt=aFix;
+ aPt.X()+=ndx;
+ aPt.Y()+=ndy;
+ } // else Ortho8
+ }
+ rMov=aPt;
+ } break;
+ case 4: case 5: {
+ long nVal0=rRec.nLineDist;
+ RotatePoint(aPt,(nHdlNum==4 ? aPt1 : aPt2),nSin,-nCos);
+ rRec.nLineDist=aPt.Y()- (nHdlNum==4 ? aPt1.Y() : aPt2.Y());
+ if (bBelow) rRec.nLineDist=-rRec.nLineDist;
+ if (rRec.nLineDist<0) {
+ rRec.nLineDist=-rRec.nLineDist;
+ rRec.bBelowRefEdge=!bBelow;
+ }
+ rRec.nLineDist-=rRec.nHelplineOverhang;
+ if (bOrtho) rRec.nLineDist=nVal0;
+ } break;
+ } // switch
+}
+
+void SdrMeasureObj::TakeDragPoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ ImpMeasureRec* pMR=(ImpMeasureRec*)rDrag.GetUser(); // #48544#
+ if (pMR!=NULL) {
+ ImpMeasurePoly aMPol;
+ ImpCalcGeometrics(*pMR,aMPol);
+ ImpCalcXPoly(aMPol,rXPP);
+ }
+}
+
+FASTBOOL SdrMeasureObj::BegCreate(SdrDragStat& rStat)
+{
+ rStat.SetOrtho8Possible();
+ aPt1=rStat.GetStart();
+ aPt2=rStat.GetNow();
+ SetTextDirty();
+ return TRUE;
+}
+
+FASTBOOL SdrMeasureObj::MovCreate(SdrDragStat& rStat)
+{
+ SdrView* pView=rStat.GetView();
+ aPt1=rStat.GetStart();
+ aPt2=rStat.GetNow();
+ if (pView!=NULL && pView->IsCreate1stPointAsCenter()) {
+ aPt1+=aPt1;
+ aPt1-=rStat.Now();
+ }
+ SetTextDirty();
+ bBoundRectDirty=TRUE;
+ bSnapRectDirty=TRUE;
+ return TRUE;
+}
+
+FASTBOOL SdrMeasureObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+{
+ SetTextDirty();
+ SetRectsDirty();
+ return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
+}
+
+FASTBOOL SdrMeasureObj::BckCreate(SdrDragStat& rStat)
+{
+ return FALSE;
+}
+
+void SdrMeasureObj::BrkCreate(SdrDragStat& rStat)
+{
+}
+
+void SdrMeasureObj::TakeCreatePoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ ImpMeasureRec aRec;
+ ImpMeasurePoly aMPol;
+ ImpTakeAttr(aRec);
+ ImpCalcGeometrics(aRec,aMPol);
+ ImpCalcXPoly(aMPol,rXPP);
+}
+
+Pointer SdrMeasureObj::GetCreatePointer() const
+{
+ return Pointer(POINTER_CROSS);
+}
+
+void SdrMeasureObj::NbcMove(const Size& rSiz)
+{
+ SdrTextObj::NbcMove(rSiz);
+ MovePoint(aPt1,rSiz);
+ MovePoint(aPt2,rSiz);
+}
+
+void SdrMeasureObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ SdrTextObj::NbcResize(rRef,xFact,yFact);
+ ResizePoint(aPt1,rRef,xFact,yFact);
+ ResizePoint(aPt2,rRef,xFact,yFact);
+ SetTextDirty();
+}
+
+void SdrMeasureObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ SdrTextObj::NbcRotate(rRef,nWink,sn,cs);
+ long nLen0=GetLen(aPt2-aPt1);
+ RotatePoint(aPt1,rRef,sn,cs);
+ RotatePoint(aPt2,rRef,sn,cs);
+ long nLen1=GetLen(aPt2-aPt1);
+ if (nLen1!=nLen0) { // Aha, Rundungsfehler
+ long dx=aPt2.X()-aPt1.X();
+ long dy=aPt2.Y()-aPt1.Y();
+ dx=BigMulDiv(dx,nLen0,nLen1);
+ dy=BigMulDiv(dy,nLen0,nLen1);
+ if (rRef==aPt2) {
+ aPt1.X()=aPt2.X()-dx;
+ aPt1.Y()=aPt2.Y()-dy;
+ } else {
+ aPt2.X()=aPt1.X()+dx;
+ aPt2.Y()=aPt1.Y()+dy;
+ }
+ }
+ SetRectsDirty();
+}
+
+void SdrMeasureObj::NbcMirror(const Point& rRef1, const Point& rRef2)
+{
+ SdrTextObj::NbcMirror(rRef1,rRef2);
+ MirrorPoint(aPt1,rRef1,rRef2);
+ MirrorPoint(aPt2,rRef1,rRef2);
+ SetRectsDirty();
+}
+
+void SdrMeasureObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ SdrTextObj::NbcShear(rRef,nWink,tn,bVShear);
+ ShearPoint(aPt1,rRef,tn,bVShear);
+ ShearPoint(aPt2,rRef,tn,bVShear);
+ SetRectsDirty();
+ SetTextDirty();
+}
+
+const Rectangle& SdrMeasureObj::GetLogicRect() const
+{
+ return SdrTextObj::GetLogicRect();
+}
+
+void SdrMeasureObj::NbcSetLogicRect(const Rectangle& rRect)
+{
+ SdrTextObj::NbcSetLogicRect(rRect);
+}
+
+long SdrMeasureObj::GetRotateAngle() const
+{
+ return GetAngle(aPt2-aPt1);
+}
+
+void SdrMeasureObj::RecalcBoundRect()
+{
+ if (bTextDirty) UndirtyText();
+ ImpMeasureRec aRec;
+ ImpMeasurePoly aMPol;
+ ImpTakeAttr(aRec);
+ ImpCalcGeometrics(aRec,aMPol);
+ XPolyPolygon aXPP;
+ ImpCalcXPoly(aMPol,aXPP);
+ aOutRect=aXPP.GetBoundRect();
+
+ // Strichstaerke und Linienenden drauftun
+ long nLineWdt=ImpGetLineWdt();
+ long nLEndWdt=ImpGetLineEndAdd();
+ if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt;
+ if (nLineWdt!=0) {
+ aOutRect.Left ()-=nLineWdt;
+ aOutRect.Top ()-=nLineWdt;
+ aOutRect.Right ()+=nLineWdt;
+ aOutRect.Bottom()+=nLineWdt;
+ }
+
+// AW 10082000 taken out, seems not to be necessary...
+// Rectangle aTempRect;
+// TakeUnrotatedSnapRect(aTempRect); // Damit aRect gesetzt ist
+ ImpAddShadowToBoundRect();
+ ImpAddTextToBoundRect();
+}
+
+void SdrMeasureObj::RecalcSnapRect()
+{
+ // !!!!! nur zu Testzwecken !!!!!
+ aSnapRect=Rectangle(aPt1,aPt2);
+ aSnapRect.Justify();
+}
+
+USHORT SdrMeasureObj::GetSnapPointCount() const
+{
+ return 2;
+}
+
+Point SdrMeasureObj::GetSnapPoint(USHORT i) const
+{
+ if (i==0) return aPt1;
+ else return aPt2;
+}
+
+FASTBOOL SdrMeasureObj::IsPolyObj() const
+{
+ return TRUE;
+}
+
+USHORT SdrMeasureObj::GetPointCount() const
+{
+ return 2;
+}
+
+const Point& SdrMeasureObj::GetPoint(USHORT i) const
+{
+ return i==0 ? aPt1 : aPt2;
+}
+
+void SdrMeasureObj::NbcSetPoint(const Point& rPnt, USHORT i)
+{
+ if (i==0) aPt1=rPnt;
+ if (i==1) aPt2=rPnt;
+ SetRectsDirty();
+ SetTextDirty();
+}
+
+SdrObjGeoData* SdrMeasureObj::NewGeoData() const
+{
+ return new SdrMeasureObjGeoData;
+}
+
+void SdrMeasureObj::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ SdrTextObj::SaveGeoData(rGeo);
+ SdrMeasureObjGeoData& rMGeo=(SdrMeasureObjGeoData&)rGeo;
+ rMGeo.aPt1=aPt1;
+ rMGeo.aPt2=aPt2;
+}
+
+void SdrMeasureObj::RestGeoData(const SdrObjGeoData& rGeo)
+{
+ SdrTextObj::RestGeoData(rGeo);
+ SdrMeasureObjGeoData& rMGeo=(SdrMeasureObjGeoData&)rGeo;
+ aPt1=rMGeo.aPt1;
+ aPt2=rMGeo.aPt2;
+ SetTextDirty();
+}
+
+void SdrMeasureObj::CreateLinePoly(PolyPolygon3D& rPolyPolygon, PolyPolygon3D& rPolyLine, OutputDevice& rOut, BOOL bForceHair) const
+{
+ // get XOR Poly as base
+ XPolyPolygon aTmpPolyPolygon;
+ TakeXorPoly(aTmpPolyPolygon, TRUE);
+
+ // get LineStyleParameterPack
+ SfxItemSet aSet((SfxItemPool&)(*GetItemPool()));
+ TakeAttributes(aSet, FALSE, TRUE);
+ LineStyleParameterPack aLineAttr(aSet, bForceHair, rOut);
+ LineGeometryCreator aLineCreator(aLineAttr, rPolyPolygon, rPolyLine);
+ UINT16 nCount(aTmpPolyPolygon.Count());
+ Polygon3D aPoly3D;
+ UINT16 nLoopStart(0);
+
+ if(nCount == 3)
+ {
+ // three lines, first one is the middle one
+ aPoly3D = Polygon3D(aTmpPolyPolygon[0]);
+ aLineCreator.AddPolygon3D(aPoly3D);
+
+ aLineAttr.ForceNoArrowsLeft(TRUE);
+ aLineAttr.ForceNoArrowsRight(TRUE);
+ nLoopStart = 1;
+ }
+ else if(nCount == 4)
+ {
+ // four lines, middle line with gap, so there are two lines used
+ // which have one arrow each
+ aLineAttr.ForceNoArrowsRight(TRUE);
+
+ aPoly3D = Polygon3D(aTmpPolyPolygon[0]);
+ aLineCreator.AddPolygon3D(aPoly3D);
+
+ aLineAttr.ForceNoArrowsRight(FALSE);
+ aLineAttr.ForceNoArrowsLeft(TRUE);
+
+ aPoly3D = Polygon3D(aTmpPolyPolygon[1]);
+ aLineCreator.AddPolygon3D(aPoly3D);
+
+ aLineAttr.ForceNoArrowsRight(TRUE);
+ nLoopStart = 2;
+ }
+ else if(nCount == 5)
+ {
+ // five lines, first two are the outer ones
+ aLineAttr.ForceNoArrowsRight(TRUE);
+
+ aPoly3D = Polygon3D(aTmpPolyPolygon[0]);
+ aLineCreator.AddPolygon3D(aPoly3D);
+
+ aLineAttr.ForceNoArrowsRight(FALSE);
+ aLineAttr.ForceNoArrowsLeft(TRUE);
+
+ aPoly3D = Polygon3D(aTmpPolyPolygon[1]);
+ aLineCreator.AddPolygon3D(aPoly3D);
+
+ aLineAttr.ForceNoArrowsRight(TRUE);
+ nLoopStart = 2;
+ }
+
+ for(;nLoopStart<nCount;nLoopStart++)
+ {
+ aPoly3D = Polygon3D(aTmpPolyPolygon[nLoopStart]);
+ aLineCreator.AddPolygon3D(aPoly3D);
+ }
+}
+
+SdrObject* SdrMeasureObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ // get XOR Poly as base
+ XPolyPolygon aTmpPolyPolygon;
+ TakeXorPoly(aTmpPolyPolygon, TRUE);
+
+ // get local ItemSet
+ SfxItemSet aSet((SfxItemPool&)(*GetItemPool()));
+ TakeAttributes(aSet, TRUE, FALSE);
+
+ // prepare group
+ SdrObjGroup* pGroup = new SdrObjGroup;
+ pGroup->SetModel(GetModel());
+
+ // prepare parameters
+ XPolyPolygon aNewPoly;
+ SdrPathObj* pPath;
+ UINT16 nCount(aTmpPolyPolygon.Count());
+ UINT16 nLoopStart(0);
+
+ if(nCount == 3)
+ {
+ // three lines, first one is the middle one
+ aNewPoly.Clear();
+ aNewPoly.Insert(aTmpPolyPolygon[0]);
+ pPath = new SdrPathObj(OBJ_PATHLINE, aNewPoly);
+ pPath->SetModel(GetModel());
+ pPath->NbcSetAttributes(aSet, FALSE);
+ pGroup->GetSubList()->NbcInsertObject(pPath);
+
+ aSet.Put(XLineStartWidthItem(0L));
+ aSet.Put(XLineEndWidthItem(0L));
+ nLoopStart = 1;
+ }
+ else if(nCount == 4)
+ {
+ // four lines, middle line with gap, so there are two lines used
+ // which have one arrow each
+ INT32 nStartWidth = ((const XLineStartWidthItem&)(aSet.Get(XATTR_LINESTARTWIDTH))).GetValue();
+ INT32 nEndWidth = ((const XLineEndWidthItem&)(aSet.Get(XATTR_LINEENDWIDTH))).GetValue();
+
+ aSet.Put(XLineEndWidthItem(0L));
+
+ aNewPoly.Clear();
+ aNewPoly.Insert(aTmpPolyPolygon[0]);
+ pPath = new SdrPathObj(OBJ_PATHLINE, aNewPoly);
+ pPath->SetModel(GetModel());
+ pPath->NbcSetAttributes(aSet, FALSE);
+ pGroup->GetSubList()->NbcInsertObject(pPath);
+
+ aSet.Put(XLineEndWidthItem(nEndWidth));
+ aSet.Put(XLineStartWidthItem(0L));
+
+ aNewPoly.Clear();
+ aNewPoly.Insert(aTmpPolyPolygon[1]);
+ pPath = new SdrPathObj(OBJ_PATHLINE, aNewPoly);
+ pPath->SetModel(GetModel());
+ pPath->NbcSetAttributes(aSet, FALSE);
+ pGroup->GetSubList()->NbcInsertObject(pPath);
+
+ aSet.Put(XLineEndWidthItem(0L));
+ nLoopStart = 2;
+ }
+ else if(nCount == 5)
+ {
+ // five lines, first two are the outer ones
+ INT32 nStartWidth = ((const XLineStartWidthItem&)(aSet.Get(XATTR_LINESTARTWIDTH))).GetValue();
+ INT32 nEndWidth = ((const XLineEndWidthItem&)(aSet.Get(XATTR_LINEENDWIDTH))).GetValue();
+
+ aSet.Put(XLineEndWidthItem(0L));
+
+ aNewPoly.Clear();
+ aNewPoly.Insert(aTmpPolyPolygon[0]);
+ pPath = new SdrPathObj(OBJ_PATHLINE, aNewPoly);
+ pPath->SetModel(GetModel());
+ pPath->NbcSetAttributes(aSet, FALSE);
+ pGroup->GetSubList()->NbcInsertObject(pPath);
+
+ aSet.Put(XLineEndWidthItem(nEndWidth));
+ aSet.Put(XLineStartWidthItem(0L));
+
+ aNewPoly.Clear();
+ aNewPoly.Insert(aTmpPolyPolygon[1]);
+ pPath = new SdrPathObj(OBJ_PATHLINE, aNewPoly);
+ pPath->SetModel(GetModel());
+ pPath->NbcSetAttributes(aSet, FALSE);
+ pGroup->GetSubList()->NbcInsertObject(pPath);
+
+ aSet.Put(XLineEndWidthItem(0L));
+ nLoopStart = 2;
+ }
+
+ for(;nLoopStart<nCount;nLoopStart++)
+ {
+ aNewPoly.Clear();
+ aNewPoly.Insert(aTmpPolyPolygon[nLoopStart]);
+ pPath = new SdrPathObj(OBJ_PATHLINE, aNewPoly);
+ pPath->SetModel(GetModel());
+ pPath->NbcSetAttributes(aSet, FALSE);
+ pGroup->GetSubList()->NbcInsertObject(pPath);
+ }
+
+ return ImpConvertAddText(pGroup, bBezier);
+}
+
+FASTBOOL SdrMeasureObj::BegTextEdit(SdrOutliner& rOutl)
+{
+ UndirtyText();
+ return SdrTextObj::BegTextEdit(rOutl);
+}
+
+void SdrMeasureObj::EndTextEdit(SdrOutliner& rOutl)
+{
+ SdrTextObj::EndTextEdit(rOutl);
+}
+
+const Size& SdrMeasureObj::GetTextSize() const
+{
+ if (bTextDirty) UndirtyText();
+ return SdrTextObj::GetTextSize();
+}
+
+OutlinerParaObject* SdrMeasureObj::GetOutlinerParaObject() const
+{
+ if (bTextDirty) UndirtyText();
+ return pOutlinerParaObject;
+}
+
+void SdrMeasureObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject)
+{
+ SdrTextObj::NbcSetOutlinerParaObject(pTextObject);
+ if (pOutlinerParaObject==NULL) SetTextDirty(); // Text neu berechnen!
+}
+
+void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText,
+ Rectangle* pAnchorRect, BOOL bLineWidth ) const
+{
+ if (bTextDirty) UndirtyText();
+ SdrTextObj::TakeTextRect( rOutliner, rTextRect, bNoEditText, pAnchorRect, bLineWidth );
+}
+
+void SdrMeasureObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const
+{
+ if (bTextDirty) UndirtyText();
+ SdrTextObj::TakeTextAnchorRect(rAnchorRect);
+}
+
+void SdrMeasureObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const
+{
+ if (bTextDirty) UndirtyText();
+ SdrTextObj::TakeTextEditArea(pPaperMin,pPaperMax,pViewInit,pViewMin);
+}
+
+SdrObject* SdrMeasureObj::CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ if (bTextDirty) UndirtyText();
+ return SdrTextObj::CheckTextEditHit(rPnt,nTol,pVisiLayer);
+}
+
+USHORT SdrMeasureObj::GetOutlinerViewAnchorMode() const
+{
+ if (bTextDirty) UndirtyText();
+ ImpMeasureRec aRec;
+ ImpMeasurePoly aMPol;
+ ImpTakeAttr(aRec);
+ ImpCalcGeometrics(aRec,aMPol);
+
+ SdrTextHorzAdjust eTH=GetTextHorizontalAdjust();
+ SdrTextVertAdjust eTV=GetTextVerticalAdjust();
+ SdrMeasureTextHPos eMH=aMPol.eUsedTextHPos;
+ SdrMeasureTextVPos eMV=aMPol.eUsedTextVPos;
+ FASTBOOL bTextRota90=aRec.bTextRota90;
+ FASTBOOL bTextUpsideDown=aRec.bTextUpsideDown;
+ FASTBOOL bBelowRefEdge=aRec.bBelowRefEdge;
+
+ // bTextUpsideDown muss hier noch ausgewertet werden!!!!
+ if (!bTextRota90) {
+ if (eMH==SDRMEASURE_TEXTLEFTOUTSIDE) eTH=SDRTEXTHORZADJUST_RIGHT;
+ if (eMH==SDRMEASURE_TEXTRIGHTOUTSIDE) eTH=SDRTEXTHORZADJUST_LEFT;
+ // bei eMH==SDRMEASURE_TEXTINSIDE kann horizontal geankert werden.
+ if (eMV==SDRMEASURE_ABOVE) eTV=SDRTEXTVERTADJUST_BOTTOM;
+ if (eMV==SDRMEASURE_BELOW) eTV=SDRTEXTVERTADJUST_TOP;
+ if (eMV==SDRMEASURETEXT_BREAKEDLINE || eMV==SDRMEASURETEXT_VERTICALCENTERED) eTV=SDRTEXTVERTADJUST_CENTER;
+ } else {
+ if (eMH==SDRMEASURE_TEXTLEFTOUTSIDE) eTV=SDRTEXTVERTADJUST_BOTTOM;
+ if (eMH==SDRMEASURE_TEXTRIGHTOUTSIDE) eTV=SDRTEXTVERTADJUST_TOP;
+ // bei eMH==SDRMEASURE_TEXTINSIDE kann vertikal geankert werden.
+ if (!bBelowRefEdge) {
+ if (eMV==SDRMEASURE_ABOVE) eTH=SDRTEXTHORZADJUST_LEFT;
+ if (eMV==SDRMEASURE_BELOW) eTH=SDRTEXTHORZADJUST_RIGHT;
+ } else {
+ if (eMV==SDRMEASURE_ABOVE) eTH=SDRTEXTHORZADJUST_RIGHT;
+ if (eMV==SDRMEASURE_BELOW) eTH=SDRTEXTHORZADJUST_LEFT;
+ }
+ if (eMV==SDRMEASURETEXT_BREAKEDLINE || eMV==SDRMEASURETEXT_VERTICALCENTERED) eTH=SDRTEXTHORZADJUST_CENTER;
+ }
+
+ EVAnchorMode eRet=ANCHOR_BOTTOM_HCENTER;
+ if (eTH==SDRTEXTHORZADJUST_LEFT) {
+ if (eTV==SDRTEXTVERTADJUST_TOP) eRet=ANCHOR_TOP_LEFT;
+ else if (eTV==SDRTEXTVERTADJUST_BOTTOM) eRet=ANCHOR_BOTTOM_LEFT;
+ else eRet=ANCHOR_VCENTER_LEFT;
+ } else if (eTH==SDRTEXTHORZADJUST_RIGHT) {
+ if (eTV==SDRTEXTVERTADJUST_TOP) eRet=ANCHOR_TOP_RIGHT;
+ else if (eTV==SDRTEXTVERTADJUST_BOTTOM) eRet=ANCHOR_BOTTOM_RIGHT;
+ else eRet=ANCHOR_VCENTER_RIGHT;
+ } else {
+ if (eTV==SDRTEXTVERTADJUST_TOP) eRet=ANCHOR_TOP_HCENTER;
+ else if (eTV==SDRTEXTVERTADJUST_BOTTOM) eRet=ANCHOR_BOTTOM_HCENTER;
+ else eRet=ANCHOR_VCENTER_HCENTER;
+ }
+ return (USHORT)eRet;
+}
+
+void __EXPORT SdrMeasureObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ if (HAS_BASE(SfxStyleSheet,&rBC)) {
+ SfxSimpleHint* pSimple=PTR_CAST(SfxSimpleHint,&rHint);
+ ULONG nId=pSimple==NULL ? 0 : pSimple->GetId();
+
+ if(nId == SFX_HINT_DATACHANGED)
+ {
+ // Alten Bereich invalidieren
+ SendRepaintBroadcast();
+
+ // Text hart aufVeraenderung setzen
+ SetTextDirty();
+ }
+ }
+ SdrTextObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+}
+
+void SdrMeasureObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ SetTextDirty();
+ SdrTextObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+}
+
+void SdrMeasureObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ SetTextDirty();
+ SdrTextObj::NbcSetAttributes(rAttr,bReplaceAll);
+}
+
+void SdrMeasureObj::WriteData(SvStream& rOut) const
+{
+ UndirtyText();
+ SdrTextObj::WriteData(rOut);
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrMeasureObj");
+#endif
+ rOut<<aPt1;
+ rOut<<aPt2;
+ rOut<<BOOL(FALSE); // bTextOverwritten wg. Kompatibilitaet. Gibt's nicht mehr.
+ SfxItemPool* pPool=GetItemPool();
+ if (pPool!=NULL) {
+ pPool->StoreSurrogate(rOut,pMeasureAttr);
+ } else {
+ rOut<<UINT16(SFX_ITEMS_NULL);
+ }
+}
+
+void SdrMeasureObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ SdrTextObj::ReadData(rHead,rIn);
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrMeasureObj");
+#endif
+ rIn>>aPt1;
+ rIn>>aPt2;
+ BOOL bTextOverwrittenTmp;
+ rIn>>bTextOverwrittenTmp;
+ SfxItemPool* pPool=GetItemPool();
+ if (pPool!=NULL) {
+ pMeasureAttr=(const SdrMeasureSetItem*)ImpSetNewAttr(pMeasureAttr,NULL); // ggf altes rauswerfen
+ USHORT nWhichRef=SDRATTRSET_MEASURE;
+ pMeasureAttr=(const SdrMeasureSetItem*)pPool->LoadSurrogate(rIn,nWhichRef,0);
+ if (pStyleSheet!=NULL && pMeasureAttr!=NULL) {
+ ((SfxItemSet*)&pMeasureAttr->GetItemSet())->SetParent(&pStyleSheet->GetItemSet());
+ }
+ } else {
+ UINT16 nSuroDum;
+ rIn>>nSuroDum;
+ }
+}
+
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
new file mode 100644
index 0000000000..ebb8e114ec
--- /dev/null
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -0,0 +1,1366 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdoole2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _COM_SUN_STAR_UTIL_XMODIFYBROADCASTER_HPP_
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#endif
+
+#include <unotools/processfactory.hxx>
+
+#ifdef SVX_LIGHT
+#define SV_DECL_SDROLELINK_DEFINED
+#define SdrOleLinkRef SdrOleLink*
+#else
+#ifndef _IPOBJ_HXX //autogen
+#include <so3/ipobj.hxx>
+#endif
+#ifndef _SFX_INTERNO_HXX
+#include <sfx2/interno.hxx>
+#endif
+#endif
+
+#ifndef _SVDPAGV_HXX
+#include <svdpagv.hxx>
+#endif
+
+#ifndef _GLOBNAME_HXX
+#include <tools/globname.hxx>
+#endif
+
+#ifndef SVX_LIGHT
+#ifndef _LNKBASE_HXX //autogen
+#include <so3/lnkbase.hxx>
+#endif
+
+#ifndef _IPCLIENT_HXX //autogen
+#include <so3/ipclient.hxx>
+#endif
+#ifndef _SV_JOBSET_HXX
+#include <vcl/jobset.hxx>
+#endif
+#ifndef _SO_CLSIDS_HXX
+#include <so3/clsids.hxx>
+#endif
+#endif
+
+#ifndef _IPENV_HXX //autogen
+#include <so3/ipenv.hxx>
+#endif
+
+#ifndef _PSEUDO_HXX
+#include <so3/pseudo.hxx>
+#endif
+#ifndef _SVXLINKMGR_HXX //autogen
+#include <linkmgr.hxx>
+#endif
+
+#include "svdoole2.hxx"
+#include <svtools/solar.hrc>
+#include "svdxout.hxx"
+#ifndef SVTOOLS_URIHELPER_HXX
+#include <svtools/urihelper.hxx>
+#endif
+
+#ifndef SVX_LIGHT
+#include "svdpagv.hxx"
+#endif
+
+#include "svdmodel.hxx"
+#include "svdio.hxx"
+#include "svdglob.hxx" // Stringcache
+#include "svdstr.hrc" // Objektname
+#include "svdetc.hxx"
+#include "svdview.hxx"
+#include "unomlstr.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef SVX_LIGHT
+
+#ifndef _SOT_STORAGE_HXX
+#include <sot/storage.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+
+// warning: these things are copied from so3/source/inplace/plugin.cxx
+SvGlobalName aPlgInName( 0x4caa7761, 0x6b8b, 0x11cf, 0x89,0xca,0x0,0x80,0x29,0xe4,0xb0,0xb1 );
+#define PLUGIN_VERS 2
+
+#else
+#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
+#define SO2_DECL_SVINPLACEOBJECT_DEFINED
+SO2_DECL_REF(SvInPlaceObject)
+#endif
+#endif // SVX_LIGHT
+
+#ifndef SVX_LIGHT
+/*************************************************************************
+|*
+|* SdrOleLink zur Verbindung von SdrOle2Obj und LinkManager
+|*
+\************************************************************************/
+
+class SdrOleLink : public SvBaseLink
+{
+private:
+ SdrOle2Obj* pOle2Obj;
+
+public:
+ SdrOleLink(SdrOle2Obj* pObj, SvPseudoObject* pPseudoObj);
+ virtual ~SdrOleLink();
+
+ virtual void Closed();
+ virtual void DataChanged( SvData& ) {}
+ FASTBOOL Connect() { return 0 != SvBaseLink::GetRealObject(); }
+ SvLinkName* GetCacheName() const { return SvBaseLink::GetCacheName(); }
+};
+
+#ifndef SV_DECL_SDROLELINK_DEFINED
+#define SV_DECL_SDROLELINK_DEFINED
+SV_DECL_REF(SdrOleLink)
+#endif
+
+SV_IMPL_REF (SdrOleLink)
+
+#endif // SVX_LIGHT
+
+#ifndef SVX_LIGHT
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+
+SdrOleLink::SdrOleLink(SdrOle2Obj* pObj, SvPseudoObject* pPseudoObj):
+ SvBaseLink(String(),OBJECT_CLIENT_OLE_CACHE,pPseudoObj),
+ pOle2Obj(pObj)
+{
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SdrOleLink::~SdrOleLink()
+{
+}
+
+/*************************************************************************
+|*
+|* Link an oder abmelden
+|*
+\************************************************************************/
+
+void SdrOleLink::Closed()
+{
+ // Die Verbindung wird aufgehoben
+ SdrModel* pModel = pOle2Obj->GetModel();
+ SvxLinkManager* pLinkManager = pModel->GetLinkManager();
+
+ if (pLinkManager!=NULL)
+ pLinkManager->Remove(*this);
+ // Basisklasse erst zum Schluss rufen, weil Closed()
+ // die Instanz zerstoert! (Wer programmiert denn sowas?!?)
+ // JP 28.02.96: Der Witz ist, das man sich eine LinkReferenz und nicht
+ // den direkten Pointer haelt!!!!!
+ SvBaseLink::Closed();
+}
+#endif // SVX_LIGHT
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrOle2Obj,SdrRectObj);
+
+SdrOle2Obj::SdrOle2Obj(FASTBOOL bFrame_)
+{
+ Init();
+
+ xOleLinkRef = NULL;
+ ppObjRef=new SvInPlaceObjectRef;
+ bFrame=bFrame_;
+ bTestIfLinked=TRUE;
+}
+
+SdrOle2Obj::SdrOle2Obj(const SvInPlaceObjectRef& rNewObjRef, FASTBOOL bFrame_)
+{
+ Init();
+#ifndef SVX_LIGHT
+ xOleLinkRef.Clear();
+ ppObjRef=new SvInPlaceObjectRef(rNewObjRef);
+#endif // !SVX_LIGHT
+
+ bFrame=bFrame_;
+ bTestIfLinked=TRUE;
+
+ SvInPlaceObjectRef& rIPRef = *ppObjRef;
+
+#ifndef SVX_LIGHT
+ if (rIPRef.Is() &&
+ (rIPRef->GetMiscStatus() & SVOBJ_MISCSTATUS_NOTRESIZEABLE) )
+ {
+ SetResizeProtect(TRUE);
+ }
+
+#endif // !SVX_LIGHT
+}
+
+SdrOle2Obj::SdrOle2Obj(const SvInPlaceObjectRef& rNewObjRef, const XubString& rNewObjName, FASTBOOL bFrame_)
+{
+ Init();
+
+#ifndef SVX_LIGHT
+ xOleLinkRef.Clear();
+ ppObjRef=new SvInPlaceObjectRef(rNewObjRef);
+#endif
+
+ aName=rNewObjName;
+ bFrame=bFrame_;
+ bTestIfLinked=TRUE;
+
+ SvInPlaceObjectRef& rIPRef = *ppObjRef;
+
+#ifndef SVX_LIGHT
+ if (rIPRef.Is() &&
+ (rIPRef->GetMiscStatus() & SVOBJ_MISCSTATUS_NOTRESIZEABLE) )
+ {
+ SetResizeProtect(TRUE);
+ }
+#endif // !SVX_LIGHT
+}
+
+SdrOle2Obj::SdrOle2Obj(const SvInPlaceObjectRef& rNewObjRef, const XubString& rNewObjName, const Rectangle& rNewRect, FASTBOOL bFrame_):
+ SdrRectObj(rNewRect)
+{
+ Init();
+
+#ifndef SVX_LIGHT
+ xOleLinkRef.Clear();
+ ppObjRef=new SvInPlaceObjectRef(rNewObjRef);
+#endif
+
+ aName=rNewObjName;
+ bFrame=bFrame_;
+ bTestIfLinked=TRUE;
+
+ SvInPlaceObjectRef& rIPRef = *ppObjRef;
+
+#ifndef SVX_LIGHT
+ if (rIPRef.Is() &&
+ (rIPRef->GetMiscStatus() & SVOBJ_MISCSTATUS_NOTRESIZEABLE) )
+ {
+ SetResizeProtect(TRUE);
+ }
+#endif
+}
+
+void SdrOle2Obj::Init()
+{
+ pModifyListener = NULL;
+ pGraphic=NULL;
+ pMetaFile=NULL;
+}
+
+SdrOle2Obj::~SdrOle2Obj()
+{
+#ifndef SVX_LIGHT
+ // Aus Cache entfernen
+ GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
+#endif // !SVX_LIGHT
+
+ ImpAbmeldung();
+
+#ifndef SVX_LIGHT
+ if (pModel!=NULL) {
+ SvPersist* pPers=pModel->GetPersist();
+ if (pPers!=NULL && ppObjRef->Is()) {
+ pPers->Remove(*ppObjRef);
+ }
+ }
+#endif
+
+ delete ppObjRef;
+
+ if(pGraphic!=NULL)
+ delete pGraphic;
+
+ if(pMetaFile!=NULL)
+ delete pMetaFile;
+
+#ifndef SVX_LIGHT
+ if(pModifyListener)
+ {
+ pModifyListener->invalidate();
+ pModifyListener->release();
+ pModifyListener = NULL;
+ }
+#endif
+}
+
+void SdrOle2Obj::SetGraphic(const Graphic* pGrf)
+{
+ if ( pGraphic )
+ {
+ delete pGraphic;
+ pGraphic = NULL;
+ }
+
+ if (pGrf!=NULL)
+ pGraphic = new Graphic(*pGrf);
+
+ if ( ppObjRef->Is() && pGrf )
+ SendRepaintBroadcast();
+
+ SetChanged();
+}
+
+FASTBOOL SdrOle2Obj::IsEmpty() const
+{
+ return !ppObjRef->Is();
+}
+
+void SdrOle2Obj::ImpAnmeldung()
+{
+#ifndef SVX_LIGHT
+ if(pModel && aName.Len())
+ {
+ SvPersist* pPers=pModel->GetPersist();
+ if (pPers!=NULL && ppObjRef->Is())
+ {
+ SvInfoObjectRef xIObj;
+ SvInfoObject* pInfo = pPers->Find(aName);
+
+ if (!pInfo)
+ {
+ xIObj = pInfo = new SvEmbeddedInfoObject(*ppObjRef,aName);
+ }
+
+ SetOleLink((SvEmbeddedInfoObject*) pInfo);
+
+ if ( !pPers->HasObject(aName) )
+ {
+ pPers->Move(pInfo, aName);
+ }
+ else
+ {
+ pInfo->SetDeleted(FALSE);
+ }
+ }
+
+ // In Cache einfuegen
+ GetSdrGlobalData().GetOLEObjCache().InsertObj(this);
+ }
+
+ if ( ppObjRef->Is() && (*ppObjRef)->GetMiscStatus() & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE )
+ {
+ if (pModel && pModel->GetRefDevice() &&
+ pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
+ {
+ // Kein RefDevice oder RefDevice kein Printer
+ BOOL bModified = (*ppObjRef)->IsModified();
+ Printer* pPrinter = (Printer*) pModel->GetRefDevice();
+ (*ppObjRef)->OnDocumentPrinterChanged( pPrinter );
+ (*ppObjRef)->SetModified( bModified );
+ }
+ }
+
+ if( !IsEmpty() )
+ {
+ // register modify listener
+ if( pModifyListener == NULL )
+ {
+ ((SdrOle2Obj*)this)->pModifyListener = new SvxUnoShapeModifyListener( (SdrOle2Obj*)this );
+ pModifyListener->acquire();
+ }
+
+ uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
+ if( xBC.is() && pModifyListener )
+ {
+ uno::Reference< util::XModifyListener > xListener( pModifyListener );
+ xBC->addModifyListener( xListener );
+ }
+ }
+
+#endif // SVX_LIGHT
+}
+
+void SdrOle2Obj::ImpAbmeldung()
+{
+#ifndef SVX_LIGHT
+ if( !IsEmpty() )
+ {
+ uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
+ if( xBC.is() && pModifyListener )
+ {
+ uno::Reference< util::XModifyListener > xListener( pModifyListener );
+ xBC->removeModifyListener( xListener );
+ }
+ }
+
+ if (pModel!=NULL)
+ {
+ // Aus Cache entfernen
+ GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
+
+ if (xOleLinkRef.Is())
+ {
+ xOleLinkRef->Closed();
+ // Closed() deleted die Instanz bereits! (Wer programmiert denn sowas?!?)
+ // JP 28.02.96: Der Witz ist, das man sich eine LinkReferenz
+ // und nicht den direkten Pointer haelt!!!!!
+ xOleLinkRef.Clear();
+ }
+
+ if ( ppObjRef->Is() )
+ {
+ (*ppObjRef)->DoClose();
+
+ SvPersist* pPers=pModel->GetPersist();
+
+ if (pPers)
+ {
+ SvInfoObject* pInfo = pPers->Find(aName);
+
+ if (pInfo)
+ {
+ pInfo->SetDeleted(TRUE);
+ }
+ }
+ }
+ }
+#endif // SVX_LIGHT
+}
+
+void SdrOle2Obj::SetModel(SdrModel* pNewModel)
+{
+ FASTBOOL bChg=pNewModel!=pModel;
+
+ if (bChg) ImpAbmeldung(); // mit dem alten Namen
+
+#ifndef SVX_LIGHT
+ if (pModel && pNewModel)
+ {
+ SvPersist* pDestPers = pNewModel->GetPersist();
+ SvPersist* pSrcPers = pModel->GetPersist();
+
+ if (pDestPers && pSrcPers)
+ {
+ if ( pDestPers != pSrcPers )
+ {
+ // Persists unterschiedlich (unterschiedliche Dokumente)
+ // oder gleiches Dokument
+
+ SvInfoObject* pInfo = pSrcPers->Find(aName);
+
+ if (pInfo)
+ {
+ USHORT i = 1;
+
+ // loop because of storage bug 46033
+ for( USHORT n = 0; n < 100; n++ )
+ {
+ aName=ImpGetResStr(bFrame ? STR_ObjFrameNamePrefix : STR_ObjOLE2NamePrefix);
+ aName += sal_Unicode(' ');
+ String aStr(aName);
+ aStr+=i;
+ while( pDestPers->Find( aStr ) )
+ {
+ i++;
+ aStr = aName;
+ aStr += String::CreateFromInt32(i);
+ }
+ aName = aStr;
+ const SvInPlaceObjectRef& aXRef = &pSrcPers->GetObject( aName );
+ if( pDestPers->Copy(aName, aName, pInfo, pSrcPers) )
+ break;
+
+ i++;
+ }
+
+ (*ppObjRef)=&(pDestPers->GetObject(aName));
+ }
+ }
+ }
+ }
+#endif
+
+ SdrRectObj::SetModel(pNewModel);
+ if (bChg) ImpAnmeldung();
+}
+
+void SdrOle2Obj::SetPage(SdrPage* pNewPage)
+{
+ FASTBOOL bRemove=pNewPage==NULL && pPage!=NULL;
+ FASTBOOL bInsert=pNewPage!=NULL && pPage==NULL;
+
+ if (bRemove) ImpAbmeldung();
+
+ SdrRectObj::SetPage(pNewPage);
+
+ if (bInsert) ImpAnmeldung();
+}
+
+void SdrOle2Obj::SetObjRef(const SvInPlaceObjectRef& rNewObjRef)
+{
+ ImpAbmeldung();
+ *ppObjRef=rNewObjRef;
+
+ SvInPlaceObjectRef& rIPRef = *ppObjRef;
+
+#ifndef SVX_LIGHT
+ if (rIPRef.Is() &&
+ (rIPRef->GetMiscStatus() & SVOBJ_MISCSTATUS_NOTRESIZEABLE) )
+ {
+ SetResizeProtect(TRUE);
+ }
+#endif // !SVX_LIGHT
+
+ ImpAnmeldung();
+ SetChanged();
+ SendRepaintBroadcast();
+}
+
+FASTBOOL SdrOle2Obj::HasSetName() const
+{
+ return TRUE;
+}
+
+void SdrOle2Obj::SetName(const XubString& rStr)
+{
+ ImpAbmeldung();
+ aName=rStr;
+ ImpAnmeldung();
+ SetChanged();
+}
+
+XubString SdrOle2Obj::GetName() const
+{
+ return aName;
+}
+
+void SdrOle2Obj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ rInfo.bRotateFreeAllowed=FALSE;
+ rInfo.bRotate90Allowed =FALSE;
+ rInfo.bMirrorFreeAllowed=FALSE;
+ rInfo.bMirror45Allowed =FALSE;
+ rInfo.bMirror90Allowed =FALSE;
+ rInfo.bTransparenceAllowed = FALSE;
+ rInfo.bGradientAllowed = FALSE;
+ rInfo.bShearAllowed =FALSE;
+ rInfo.bNoOrthoDesired =FALSE;
+ rInfo.bCanConvToPath =FALSE;
+ rInfo.bCanConvToPoly =FALSE;
+ rInfo.bCanConvToPathLineToArea=FALSE;
+ rInfo.bCanConvToPolyLineToArea=FALSE;
+ rInfo.bCanConvToContour = FALSE;
+}
+
+UINT16 SdrOle2Obj::GetObjIdentifier() const
+{
+ return bFrame ? UINT16(OBJ_FRAME) : UINT16(OBJ_OLE2);
+}
+
+FASTBOOL SdrOle2Obj::Paint(ExtOutputDevice& rOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ FASTBOOL bOk=TRUE;
+
+ if( !pGraphic )
+ GetObjRef(); // try to load inplace object
+
+ if (ppObjRef->Is())
+ {
+#ifndef SVX_LIGHT
+ if( !bSizProt && (*ppObjRef)->GetMiscStatus() & SVOBJ_MISCSTATUS_NOTRESIZEABLE )
+ ( (SdrOle2Obj*) this)->bSizProt = TRUE;
+
+ const SvEditObjectProtocol& rProt=(*ppObjRef)->GetProtocol();
+
+ OutputDevice* pOut=rOut.GetOutDev();
+
+ if (!rProt.IsInPlaceActive() || (*ppObjRef)->GetIPClient()->GetEnv()->GetEditWin()!=pOut)
+ {
+ if ((rInfoRec.nPaintMode & SDRPAINTMODE_DRAFTGRAF) ==0)
+ {
+ if (((*ppObjRef)->GetMiscStatus() & SVOBJ_MISCSTATUS_ACTIVATEWHENVISIBLE))
+ {
+ // PlugIn-Objekt connecten
+ if (rInfoRec.pPV!=NULL)
+ {
+ SdrOle2Obj* pOle2Obj = (SdrOle2Obj*) this;
+ SdrView* pSdrView = (SdrView*) &rInfoRec.pPV->GetView();
+ pSdrView->DoConnect(pOle2Obj);
+ }
+ }
+ pOut->Push( PUSH_CLIPREGION );
+ pOut->IntersectClipRegion( aRect );
+ (*ppObjRef)->DoDraw(pOut,aRect.TopLeft(),aRect.GetSize(),JobSetup());
+ pOut->Pop();
+ }
+ else
+ { // sonst SDRPAINTMODE_DRAFTGRAF
+ Polygon aPoly(Rect2Poly(aRect,aGeo));
+ pOut->SetLineColor(Color(COL_BLACK));
+ pOut->DrawPolyLine(aPoly);
+ pOut->DrawLine(aPoly[0],aPoly[2]);
+ pOut->DrawLine(aPoly[1],aPoly[3]);
+ }
+ }
+#else
+ if (rInfoRec.pPV!=NULL)
+ {
+ SdrView* pSdrView = (SdrView*) &rInfoRec.pPV->GetView();
+ pSdrView->DoConnect((SdrOle2Obj*) this);
+ }
+#endif // SVX_LIGHT
+
+ }
+ else if ( pGraphic )
+ {
+ OutputDevice* pOutDev=rOut.GetOutDev();
+ if( IsEmptyPresObj() )
+ {
+ Size aSizePix(pOutDev->LogicToPixel(pGraphic->GetPrefSize(),pGraphic->GetPrefMapMode()));
+ Size aSize(pOutDev->PixelToLogic(aSizePix));
+ Point aPos(aRect.Center());
+ aPos.X()-=aSize.Width() /2;
+ aPos.Y()-=aSize.Height()/2;
+ if (aPos.X() >= aRect.Left() && aPos.Y() >= aRect.Top())
+ pGraphic->Draw(pOutDev,aPos);
+
+ pOutDev->SetFillColor();
+ pOutDev->SetLineColor( Color( COL_GRAY ) );
+ pOutDev->DrawRect(aRect);
+ }
+ else
+ pGraphic->Draw( pOutDev, aRect.TopLeft() );
+ }
+
+ if (HasText())
+ {
+ bOk=SdrTextObj::Paint(rOut,rInfoRec);
+ }
+ return bOk;
+}
+
+SdrObject* SdrOle2Obj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ return ImpCheckHit(rPnt,nTol,pVisiLayer,TRUE,TRUE);
+}
+
+void SdrOle2Obj::TakeObjNameSingul(XubString& rName) const
+{
+ rName = ImpGetResStr(bFrame ? STR_ObjNameSingulFrame : STR_ObjNameSingulOLE2);
+
+ if(aName.Len())
+ {
+ rName.AppendAscii(" '");
+ rName += aName;
+ rName += sal_Unicode('\'');
+ }
+}
+
+void SdrOle2Obj::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(bFrame ? STR_ObjNamePluralFrame : STR_ObjNamePluralOLE2);
+}
+
+void SdrOle2Obj::operator=(const SdrObject& rObj)
+{
+ FASTBOOL bModelOk=pModel!=NULL;
+ if (bModelOk) ImpAbmeldung();
+ SdrRectObj::operator=(rObj);
+ aName =((SdrOle2Obj&)rObj).aName;
+ aProgName=((SdrOle2Obj&)rObj).aProgName;
+ bFrame =((SdrOle2Obj&)rObj).bFrame;
+
+ if(((SdrOle2Obj&)rObj).pGraphic)
+ {
+ if(pGraphic)
+ delete pGraphic;
+ pGraphic = new Graphic(*((SdrOle2Obj&)rObj).pGraphic);
+ }
+
+ if (bModelOk) {
+#ifndef SVX_LIGHT
+ SvPersist* pDestPers=pModel->GetPersist();
+ SdrModel* pSrcModel=((SdrOle2Obj&)rObj).GetModel();
+ SvPersist* pSrcPers=pSrcModel!=NULL ? pSrcModel->GetPersist() : NULL;
+ if (pDestPers!=NULL && pSrcPers!=NULL && pModel==pSrcModel) {
+ // Kopie innerhalb eines Models
+ // Eindeutigen Namen finden
+ SvInfoObject* pInfo=pSrcPers->Find(aName);
+ if (pInfo!=NULL)
+ {
+ USHORT i=1;
+
+ // loop because of storage bug 46033
+ for( USHORT n = 0; n < 100; n++ )
+ {
+ aName=ImpGetResStr(bFrame ? STR_ObjFrameNamePrefix : STR_ObjOLE2NamePrefix);
+ aName += sal_Unicode(' ');
+ String aStr(aName);
+ aStr+=i;
+ while(pDestPers->Find(aStr)) {
+ i++;
+ aStr=aName;
+ aStr += String::CreateFromInt32(i);
+ }
+ aName=aStr;
+ const SvInPlaceObjectRef& aXRef = &pSrcPers->GetObject( aName );
+ if( pDestPers->Copy(aName,aName,pInfo,pSrcPers) )
+ break;
+
+ i++;
+ }
+
+ (*ppObjRef)=&(pDestPers->GetObject(aName));
+ }
+ }
+#endif
+ ImpAnmeldung();
+ }
+}
+
+FASTBOOL SdrOle2Obj::HasSpecialDrag() const
+{
+ return FALSE;
+}
+
+void SdrOle2Obj::ImpSetVisAreaSize()
+{
+#ifndef SVX_LIGHT
+ SvInPlaceObjectRef& rIPRef=*ppObjRef;
+
+ if (rIPRef.Is())
+ {
+ if (rIPRef->GetMiscStatus() & SVOBJ_MISCSTATUS_SERVERRESIZE)
+ {
+ // Server resized selbst (StarChart)
+ // Neue VisArea setzen
+ Rectangle aVisArea = OutputDevice::LogicToLogic( aRect,
+ pModel->GetScaleUnit(), rIPRef->GetMapUnit() );
+ rIPRef->SetVisArea(aVisArea);
+
+ // Wurde die VisArea akzeptiert?
+ Rectangle aAcceptedVisArea(rIPRef->GetVisArea());
+
+ if (aVisArea.GetSize() != aAcceptedVisArea.GetSize())
+ {
+ // VisArea wurde nicht akzeptiert -> korrigieren
+ aRect.SetSize(OutputDevice::LogicToLogic( aAcceptedVisArea.GetSize(),
+ rIPRef->GetMapUnit(), pModel->GetScaleUnit()));
+ }
+ }
+ else
+ {
+ /**********************************************************************
+ * Nun wird nicht mehr die VisArea gesetzt, sondern es erfolgt eine
+ * Skalierung
+ **********************************************************************/
+ SvEmbeddedClient* pClient = (*ppObjRef)->GetClient();
+
+ if (pClient)
+ {
+ SvClientData* pData = pClient->GetClientData();
+ Size aObjAreaSize = rIPRef->GetVisArea().GetSize();
+ aObjAreaSize = OutputDevice::LogicToLogic( aObjAreaSize,
+ rIPRef->GetMapUnit(),
+ pModel->GetScaleUnit() );
+
+ Size aSize = aRect.GetSize();
+ Fraction aScaleWidth (aSize.Width(), aObjAreaSize.Width() );
+ Fraction aScaleHeight(aSize.Height(), aObjAreaSize.Height() );
+ // Nun auf 10 Binaerstellen kuerzen
+ Kuerzen(aScaleHeight, 10);
+ Kuerzen(aScaleWidth, 10);
+
+ pData->SetSizeScale(aScaleWidth, aScaleHeight);
+
+ Rectangle aScaleRect(aRect.TopLeft(), aObjAreaSize);
+ pData->SetObjArea(aScaleRect);
+ }
+ }
+ }
+#endif // SVX_LIGHT
+}
+
+void SdrOle2Obj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ SdrRectObj::NbcResize(rRef,xFact,yFact);
+ if (aGeo.nShearWink!=0 || aGeo.nDrehWink!=0) { // kleine Korrekturen
+ if (aGeo.nDrehWink>=9000 && aGeo.nDrehWink<27000) {
+ aRect.Move(aRect.Left()-aRect.Right(),aRect.Top()-aRect.Bottom());
+ }
+ aGeo.nDrehWink=0;
+ aGeo.nShearWink=0;
+ aGeo.nSin=0.0;
+ aGeo.nCos=1.0;
+ aGeo.nTan=0.0;
+ SetRectsDirty();
+ }
+ ImpSetVisAreaSize();
+}
+
+void SdrOle2Obj::SetGeoData(const SdrObjGeoData& rGeo)
+{
+ SdrRectObj::SetGeoData(rGeo);
+ ImpSetVisAreaSize();
+}
+
+void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ SdrRectObj::NbcSetSnapRect(rRect);
+ ImpSetVisAreaSize();
+}
+
+void SdrOle2Obj::NbcSetLogicRect(const Rectangle& rRect)
+{
+ SdrRectObj::NbcSetLogicRect(rRect);
+ ImpSetVisAreaSize();
+}
+
+FASTBOOL SdrOle2Obj::HasGDIMetaFile() const
+{
+ GetObjRef(); // try to load inplace object
+ SvInPlaceObjectRef& rIPRef=*ppObjRef;
+ BOOL bOK = FALSE;
+ if ( rIPRef.Is() )
+ bOK = TRUE;
+
+ return bOK;
+}
+
+const GDIMetaFile* SdrOle2Obj::GetGDIMetaFile() const
+{
+#ifndef SVX_LIGHT
+ if ( pMetaFile )
+ {
+ delete ((SdrOle2Obj*)this)->pMetaFile;
+ ((SdrOle2Obj*)this)->pMetaFile = NULL;
+ }
+
+ GetObjRef(); // try to load inplace object
+ SvInPlaceObjectRef& rIPRef=*ppObjRef;
+
+ if (rIPRef.Is())
+ {
+ GDIMetaFile* pMtf=NULL;
+ SvData aSvData(FORMAT_GDIMETAFILE);
+ if (rIPRef->GetData(&aSvData))
+ {
+ if (aSvData.GetData(&pMtf,TRANSFER_REFERENCE))
+ {
+ // kopieren, weil *pMtf mit ~SvData zerstoert wird!
+ ((SdrOle2Obj*)this)->pMetaFile = new GDIMetaFile(*pMtf);
+ }
+ }
+ }
+#endif // SVX_LIGHT
+ return pMetaFile;
+}
+
+void SdrOle2Obj::WriteData(SvStream& rOut) const
+{
+ SdrRectObj::WriteData(rOut);
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrOle2Obj");
+#endif
+
+ // UNICODE: rOut<<aName;
+ rOut.WriteByteString(aName);
+
+ // UNICODE: rOut<<aProgName;
+ rOut.WriteByteString(aProgName);
+
+ GetObjRef();
+ BOOL bObjRefValid=ppObjRef->Is();
+ rOut<<bObjRefValid;
+ BOOL bPreview = FALSE;
+ if( !IsEmptyPresObj() && pModel && pModel->IsSaveOLEPreview() )
+ bPreview = TRUE;
+
+ if( bPreview )
+ {
+ // set preview graphic (not for empty presentation objects)
+ GetGDIMetaFile();
+ if( pMetaFile )
+ {
+ Graphic* pGraph = new Graphic( *pMetaFile );
+ ( (SdrOle2Obj*) this )->SetGraphic( pGraph );
+ }
+ }
+
+ BOOL bHasGraphic=pGraphic!=NULL;
+ rOut<<bHasGraphic;
+ if (bHasGraphic)
+ {
+ SdrDownCompat aGrafCompat(rOut,STREAM_WRITE); // ab V11 eingepackt
+#ifdef DBG_UTIL
+ aGrafCompat.SetID("SdrOle2Obj(Graphic)");
+#endif
+ rOut<<*pGraphic;
+ }
+
+ if( bPreview )
+ ( (SdrOle2Obj*) this )->SetGraphic( NULL ); // remove preview graphic
+}
+
+void SdrOle2Obj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ rIn.SetError( 0 );
+
+ if (rIn.GetError()!=0) return;
+ SdrRectObj::ReadData(rHead,rIn);
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrOle2Obj");
+#endif
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ // UNICODE: rIn >> aProgName;
+ rIn.ReadByteString(aProgName);
+
+ BOOL bObjRefValid;
+ rIn>>bObjRefValid;
+
+ BOOL bHasGraphic;
+ rIn>>bHasGraphic;
+ if (bHasGraphic) {
+ if (pGraphic==NULL) pGraphic=new Graphic;
+ if (rHead.GetVersion()>=11)
+ { // ab V11 eingepackt
+ SdrDownCompat aGrafCompat(rIn,STREAM_READ);
+#ifdef DBG_UTIL
+ aGrafCompat.SetID("SdrOle2Obj(Graphic)");
+#endif
+ rIn>>*pGraphic;
+ }
+ else
+ rIn>>*pGraphic;
+ }
+}
+
+void SdrOle2Obj::SetOleLink(SvEmbeddedInfoObject* pInfoObj)
+{
+#ifndef SVX_LIGHT
+ if (xOleLinkRef.Is())
+ {
+ // Erst Verbindung aufheben
+ xOleLinkRef->Closed();
+ // Closed() deleted die Instanz bereits! (Wer programmiert denn sowas?!?)
+ // JP 28.02.96: Der Witz ist, das man sich eine LinkReferenz
+ // und nicht den direkten Pointer haelt!!!!!
+ xOleLinkRef.Clear();
+ }
+
+ if (pModel!=NULL && pInfoObj && ppObjRef->Is()) {
+ if (pInfoObj->IsLink()) {
+ // Verbindung herstellen
+ xOleLinkRef = new SdrOleLink(this,&(*ppObjRef));
+ SvxLinkManager* pLinkManager=pModel->GetLinkManager();
+
+ if (pLinkManager!=NULL) {
+ pLinkManager->InsertSoLink(*xOleLinkRef);
+ }
+ }
+ }
+
+ bTestIfLinked = FALSE;
+#endif // SVX_LIGHT
+}
+
+void SdrOle2Obj::NbcMove(const Size& rSize)
+{
+ SdrRectObj::NbcMove(rSize);
+ ImpSetVisAreaSize();
+}
+
+BOOL SdrOle2Obj::Unload()
+{
+ BOOL bUnloaded = FALSE;
+
+ if( ppObjRef && ppObjRef->Is() )
+ {
+ //Nicht notwendig im Doc DTor (MM)
+ ULONG nRefCount = (*ppObjRef)->GetRefCount();
+ // prevent Unload if there are external references
+ if( nRefCount > 2 )
+ return FALSE;
+ DBG_ASSERT( nRefCount == 2, "Wrong RefCount for unload" );
+ }
+
+#ifndef SVX_LIGHT
+
+ if (pModel && ppObjRef && ppObjRef->Is() &&
+ SVOBJ_MISCSTATUS_ALWAYSACTIVATE != (*ppObjRef)->GetMiscStatus() &&
+ 1 < (*ppObjRef)->GetRefCount() &&
+ !(*ppObjRef)->IsModified() &&
+ !(*ppObjRef)->GetProtocol().IsInPlaceActive() )
+ {
+ SvPersist* pPersist = pModel->GetPersist();
+
+ if (pPersist)
+ {
+ SvPersist* pO = *ppObjRef;
+ if( pO->IsModified() )
+ {
+ pO->DoSave();
+ pO->DoSaveCompleted();
+ }
+ ppObjRef->Clear();
+ if (pPersist->Unload(pO))
+ bUnloaded = TRUE;
+ else
+ *ppObjRef = pO;
+ }
+ }
+
+#else
+ *ppObjRef = NULL;
+#endif // !SVX_LIGHT
+
+ return bUnloaded;
+}
+
+const SvInPlaceObjectRef& SdrOle2Obj::GetObjRef() const
+{
+#ifndef SVX_LIGHT
+ if ( !ppObjRef->Is() && pModel && pModel->GetPersist() && !pModel->GetPersist()->IsHandsOff() )
+ {
+ // Objekt laden
+ (*ppObjRef) = &( pModel->GetPersist()->GetObject( aName ) );
+
+ if ( ppObjRef->Is() )
+ {
+ if( !IsEmptyPresObj() )
+ {
+ // #75637# remember modified status of model
+ BOOL bWasChanged(pModel ? pModel->IsChanged() : FALSE);
+
+ // perhaps preview not valid anymore
+ // #75637# This line changes the modified state of the model
+ ( (SdrOle2Obj*) this )->SetGraphic( NULL );
+
+ // #75637# if status was not set before, force it back
+ // to not set, so that SetGraphic(0L) above does not
+ // set the modified state of the model.
+ if(!bWasChanged && pModel && pModel->IsChanged())
+ pModel->SetChanged(FALSE);
+ }
+
+ if( bTestIfLinked )
+ {
+ // Ist das Objekt ev. gelinkt? (nur einmal pruefen)
+ SvInfoObjectRef xIObj;
+ SvEmbeddedInfoObject* pInfo;
+ xIObj=pInfo=new SvEmbeddedInfoObject( *ppObjRef, aName );
+ ( (SdrOle2Obj*) this )->SetOleLink( pInfo );
+ }
+
+ if ( (*ppObjRef)->GetMiscStatus() & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE )
+ {
+ if (pModel && pModel->GetRefDevice() &&
+ pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
+ {
+ // Kein RefDevice oder RefDevice kein Printer
+ BOOL bModified = (*ppObjRef)->IsModified();
+ Printer* pPrinter = (Printer*) pModel->GetRefDevice();
+ (*ppObjRef)->OnDocumentPrinterChanged( pPrinter );
+ (*ppObjRef)->SetModified( bModified );
+ }
+ }
+
+ // register modify listener on initial load
+ if( pModifyListener == NULL )
+ {
+ ((SdrOle2Obj*)this)->pModifyListener = new SvxUnoShapeModifyListener( (SdrOle2Obj*)this );
+ pModifyListener->acquire();
+
+ uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
+ if( xBC.is() && pModifyListener )
+ {
+ uno::Reference< util::XModifyListener > xListener( pModifyListener );
+ xBC->addModifyListener( xListener );
+ }
+ }
+ }
+ }
+
+ if (ppObjRef->Is())
+ {
+ // In Cache einfuegen
+ GetSdrGlobalData().GetOLEObjCache().InsertObj((SdrOle2Obj*) this);
+ }
+
+#else
+
+ if( !ppObjRef->Is() )
+ {
+ SotStorage* pStor = pModel->GetModelStorage();
+ SotStorageRef xSt;
+ if( pStor)
+ {
+ xSt = pStor->OpenSotStorage( aName );
+
+ if( xSt.Is() )
+ {
+ *ppObjRef = SvInPlaceObject::Load( xSt );
+ if( *ppObjRef && ppObjRef->Is() )
+ (*ppObjRef)->SetSizeAndPos( GetLogicRect() );
+ }
+ }
+ }
+
+#endif // !SVX_LIGHT
+ return *ppObjRef;
+}
+
+uno::Reference< frame::XModel > SdrOle2Obj::getXModel() const
+{
+ uno::Reference< frame::XModel > xModel;
+
+#ifndef SVX_LIGHT
+ if( pModel )
+ {
+ SvInPlaceObjectRef xSvIPO( GetObjRef() );
+ SfxInPlaceObjectRef xIPO( xSvIPO );
+ if( xIPO.Is() )
+ {
+ SfxObjectShell* pShell = xIPO->GetObjectShell();
+
+ if( pShell )
+ xModel = pShell->GetModel();
+ }
+ }
+#endif
+
+ return xModel;
+}
+
+#ifdef SVX_LIGHT
+
+#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_AWT_XTOOLKIT_HPP_
+#include <com/sun/star/awt/XToolkit.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XWINDOWPEER_HPP_
+#include <com/sun/star/awt/XWindowPeer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_XPLUGINMANAGER_HPP_
+#include <com/sun/star/plugin/XPluginManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_PLUGINMODE_HPP_
+#include <com/sun/star/plugin/PluginMode.hpp>
+#endif
+
+// here comes a dummy implementation for the SvInPlaceObject that is used
+// to display plugins inside the StarOffice Player
+
+SvInPlaceObject::SvInPlaceObject()
+: pURL( NULL ),
+ nPlugInMode( 0 )
+{
+}
+
+SvInPlaceObject::~SvInPlaceObject()
+{
+}
+
+// this method is called from the views DoConnect method
+// Only the view knows the parent window for the plugin
+void SvInPlaceObject::CreatePlugin( uno::Reference< awt::XToolkit > xToolkit,
+ uno::Reference< awt::XWindowPeer > xPeer )
+{
+ if( xPlugin.is() )
+ return;
+
+ if( pURL )
+ {
+ ULONG nCount = aCmdList.Count();
+ uno::Sequence< OUString > aCmds( nCount ), aArgs( nCount );
+ OUString *pCmds = aCmds.getArray(), *pArgs = aArgs.getArray();
+ for( ULONG i = 0; i < nCount; i++ )
+ {
+ SvCommand & rCmd = aCmdList.GetObject( i );
+ pCmds[i] = rCmd.GetCommand();
+ pArgs[i] = rCmd.GetArgument();
+ }
+
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::utl::getProcessServiceFactory() );
+ if( xFactory.is() )
+ {
+ uno::Reference< plugin::XPluginManager > xPMgr( xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.plugin.PluginManager")), uno::UNO_QUERY );
+
+ INT16 nMode = nPlugInMode == PLUGIN_EMBEDED ? plugin::PluginMode::EMBED : plugin::PluginMode::FULL;
+
+ if (xPMgr.is() )
+ xPlugin = xPMgr->createPluginFromURL( xPMgr->createPluginContext(), nMode, aCmds, aArgs, xToolkit, xPeer, pURL->GetMainURL() );
+ }
+ }
+}
+
+void SvInPlaceObject::SetSizeAndPos( const Rectangle& rRect )
+{
+ uno::Reference< awt::XWindow > xWindow( xPlugin, uno::UNO_QUERY );
+
+ if( xWindow.is() )
+ {
+ xWindow->setPosSize(rRect.getX(),rRect.getY(),rRect.getWidth(),rRect.getHeight(),awt::PosSize::POSSIZE);
+ xWindow->setVisible(TRUE);
+ }
+}
+
+SvInPlaceObject* SvInPlaceObject::Load( SotStorageRef xSt )
+{
+ SvInPlaceObject* pIPO = new SvInPlaceObject();
+
+ String aFileName("plugin", gsl_getSystemTextEncoding());
+ SotStorageStreamRef xStm = xSt->OpenSotStream( aFileName, STREAM_STD_READ );
+ xStm->SetVersion( xStm->GetVersion() );
+ xStm->SetBufferSize( 8192 );
+
+ BYTE nVer = 0;
+ *xStm >> nVer;
+ if( nVer == 1 || nVer == PLUGIN_VERS )
+ {
+ *xStm >> pIPO->nPlugInMode;
+ // Background gibt es nicht mehr
+ if( pIPO->nPlugInMode == (USHORT)PLUGIN_BACKGROUND )
+ pIPO->nPlugInMode = (USHORT)PLUGIN_EMBEDED;
+
+ *xStm >> pIPO->aCmdList;
+ DBG_ASSERT( !pIPO->pURL, "pURL exists in load" )
+ BYTE bURLExist;
+ *xStm >> bURLExist;
+ if( bURLExist )
+ {
+ if( nVer == 1 )
+ {
+ // pIPO->pURL = new INetURLObject;
+ // UNICODE: *xStm >> *pIPO->pURL;
+ // old operator >> removed some versions ago, reconstructiong from older version
+ ByteString aURL;
+
+ xStm->ReadByteString( aURL );
+ pIPO->pURL = new INetURLObject( aURL );
+
+ // Ignore, not necessary
+ BOOL bStrict;
+ *xStm >> bStrict;
+ }
+ else
+ {
+ String aURL;
+ // UNICODE: *xStm >> aURL;
+ xStm->ReadByteString(aURL);
+ pIPO->pURL = new INetURLObject( ::URIHelper::SmartRelToAbs( aURL, FALSE,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS ) );
+ }
+ }
+ // UNICODE: *xStm >> pIPO->aMimeType;
+ xStm->ReadByteString(pIPO->aMimeType);
+ }
+ else
+ xStm->SetError( ERRCODE_IO_WRONGVERSION );
+
+ if( xStm->GetError() != 0 )
+ {
+ delete pIPO;
+ pIPO = NULL;
+ }
+
+ return pIPO;
+}
+
+// destroys the plugin for this inplace dummy
+void SvInPlaceObject::DoDisconnect()
+{
+ if( xPlugin.is() )
+ {
+ uno::Reference< lang::XComponent > xComp( xPlugin, uno::UNO_QUERY );
+ if( xComp.is() )
+ xComp->dispose();
+ xPlugin = NULL;
+ }
+}
+
+#endif
+
diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx
new file mode 100644
index 0000000000..6556e2d9ad
--- /dev/null
+++ b/svx/source/svdraw/svdopage.cxx
@@ -0,0 +1,482 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdopage.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdopage.hxx"
+#include "svdglob.hxx" // Stringcache
+#include "svdstr.hrc" // Objektname
+#include "svdtrans.hxx"
+#include "svdetc.hxx"
+#include "svdio.hxx"
+#include "svdxout.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdpagv.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrPageObj,SdrObject);
+
+
+SdrPageObj::SdrPageObj(USHORT nNewPageNum):
+ nPageNum(nNewPageNum),
+ bPainting(FALSE),
+ bNotifying(FALSE)
+{
+}
+
+
+SdrPageObj::SdrPageObj(const Rectangle& rRect, USHORT nNewPageNum):
+ nPageNum(nNewPageNum),
+ bPainting(FALSE),
+ bNotifying(FALSE)
+{
+ aOutRect=rRect;
+}
+
+
+void __EXPORT SdrPageObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId&, const SfxHint& rHint, const TypeId&)
+{
+ SdrHint* pSdrHint = PTR_CAST(SdrHint, &rHint);
+
+ if(pSdrHint)
+ {
+ SdrHintKind eHint = pSdrHint->GetKind();
+
+ if(eHint == HINT_PAGEORDERCHG)
+ {
+ SendRepaintBroadcast();
+ }
+ else
+ {
+ const SdrPage* pChangedPage = pSdrHint->GetPage();
+
+ if(pSdrHint->GetObject() != this
+ && pModel
+ && bInserted
+ && pChangedPage
+ && pChangedPage != pPage)
+ {
+ const SdrPage* pShownPage = pModel->GetPage(nPageNum);
+
+ if(pShownPage)
+ {
+ if(pShownPage == pChangedPage)
+ {
+ if(eHint == HINT_OBJCHG || eHint == HINT_OBJLISTCLEARED)
+ {
+ // do nothing, else loop with HINT_OBJCHG cause
+ // it can not be decided if hint comes from 21 lines
+ // above (SendRepaintBroadcast())or normally from
+ // object. Doing nothing leads to not updating
+ // object moves on a 2nd opened view showing the page
+ // as handout or notice page. (AW 06052000)
+ //
+ // one solution would be to invalidate without using
+ // SendRepaintBroadcast(), so I made some tries, but it
+ // did'nt work:
+ //
+ //SdrHint aHint(*this);
+ //aHint.SetNeedRepaint(TRUE);
+ //aHint.SetKind(HINT_PAGECHG);
+ //pModel->Broadcast(aHint);
+ //SdrPageView* pPV;
+ //if(pModel && (pPV = pModel->GetPaintingPageView()))
+ //{
+ // pPV->InvalidateAllWin(pSdrHint->GetRect(), TRUE);
+ //}
+ // GetPageView(pChangedPage);
+ // SdrPageView::InvalidateAllWin(pSdrHint->GetRect(), TRUE);
+ }
+ else
+ {
+ // send normal
+ SendRepaintBroadcast();
+ }
+ }
+ else if(pChangedPage->IsMasterPage())
+ {
+ UINT16 nMaPgAnz = pShownPage->GetMasterPageCount();
+ BOOL bDone(FALSE);
+
+ for(UINT16 i=0; i<nMaPgAnz && !bDone; i++)
+ {
+ const SdrPage* pMaster = pShownPage->GetMasterPage(i);
+
+ if(pMaster == pChangedPage)
+ {
+ SendRepaintBroadcast();
+ bDone = TRUE;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+void SdrPageObj::SetModel(SdrModel* pNewModel)
+{
+ SdrModel* pOldMod=pModel;
+ SdrObject::SetModel(pNewModel);
+ if (pModel!=pOldMod) {
+ if (pOldMod!=NULL) EndListening(*pOldMod);
+ if (pModel!=NULL) StartListening(*pModel);
+ }
+}
+
+
+UINT16 SdrPageObj::GetObjIdentifier() const
+{
+ return UINT16(OBJ_PAGE);
+}
+
+
+void SdrPageObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ rInfo.bRotateFreeAllowed=FALSE;
+ rInfo.bRotate90Allowed =FALSE;
+ rInfo.bMirrorFreeAllowed=FALSE;
+ rInfo.bMirror45Allowed =FALSE;
+ rInfo.bMirror90Allowed =FALSE;
+ rInfo.bTransparenceAllowed = FALSE;
+ rInfo.bGradientAllowed = FALSE;
+ rInfo.bShearAllowed =FALSE;
+ rInfo.bNoOrthoDesired =FALSE;
+ rInfo.bCanConvToPath =FALSE;
+ rInfo.bCanConvToPoly =FALSE;
+ rInfo.bCanConvToPathLineToArea=FALSE;
+ rInfo.bCanConvToPolyLineToArea=FALSE;
+}
+
+#define NORELMAPMODE
+
+
+FASTBOOL SdrPageObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ // Hidden objects on masterpages, draw nothing
+ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+ return TRUE;
+
+ SdrPageView* pPV = NULL;
+ if( pModel && ( pPV = pModel->GetPaintingPageView() ) )
+ {
+ pPV->SetPaintingPageObj( (SdrPageObj*) this );
+ }
+
+ FASTBOOL bOk=TRUE;
+ SdrPage* pMainPage= pModel==NULL ? NULL : pModel->GetPage(nPageNum);
+ FASTBOOL bWindow =rXOut.GetOutDev()->GetOutDevType()==OUTDEV_WINDOW;
+ FASTBOOL bPrinter =rXOut.GetOutDev()->GetOutDevType()==OUTDEV_PRINTER;
+ FASTBOOL bPageValid =pMainPage!=NULL;
+ FASTBOOL bPaintArea =bPainting && bPageValid; // Grau fuellen, wenn Rekursion
+ FASTBOOL bPaintFrame=bPaintArea || bWindow || bPageValid; // Nur auf dem Drucker bei ungueltiter PageNum kein Rahmen Zeichnen
+ FASTBOOL bPaintObjs =!bPainting && bPageValid;
+
+ if(bPaintArea)
+ {
+ OutputDevice& rOut=*rXOut.GetOutDev();
+ rOut.SetFillColor( Color( COL_LIGHTGRAY ) );
+ rOut.SetLineColor( Color(COL_GRAY ) );
+ rOut.DrawRect(aOutRect);
+ }
+
+ if(bPaintObjs)
+ {
+ // Casten auf nonconst. Flag setzen um Rekursion zu erkennen, wenn
+ // naemlich das PageObj auf der Seite sitzt, die es anzeigen soll
+ // oder auf einer MasterPage dieser Seite, ...
+ ((SdrPageObj*)this)->bPainting=TRUE;
+ if (pModel!=NULL) {
+ SdrPage* pMainPage=pModel->GetPage(nPageNum);
+ if (pMainPage!=NULL) {
+ // Checken, ob das setzen eines Clippings erforderlich ist
+ Rectangle aPageRect(0,0,pMainPage->GetWdt(),pMainPage->GetHgt());
+ FASTBOOL bClipIt=!aPageRect.IsInside(pMainPage->GetAllObjBoundRect());
+ if (!bClipIt) { // MasterPages auch checken
+ USHORT nMaPgAnz=pMainPage->GetMasterPageCount();
+ for (USHORT i=0; i<nMaPgAnz && !bClipIt; i++) {
+ SdrPage* pPg=pMainPage->GetMasterPage(i);
+ bClipIt=!aPageRect.IsInside(pPg->GetAllObjBoundRect());
+ }
+ }
+ FASTBOOL bClip0=FALSE;
+ Region aClip0;
+ if (bClipIt) {
+ // Hier koennte ich mal noch einbauen, dass eine eventuelle
+ // Metafileaufzeichnung pausiert wird, damit keine
+ // SetClipRegion-Actions erzeugt werden.
+ bClip0=rXOut.GetOutDev()->IsClipRegion();
+ aClip0=rXOut.GetOutDev()->GetClipRegion();
+ }
+#ifndef NORELMAPMODE
+ Point aZero;
+ Fraction aFact1(1,1);
+ Point aOfs(aOutRect.TopLeft());
+ rXOut.GetOutDev()->SetMapMode(MapMode(MAP_RELATIVE,aOfs,aFact1,aFact1));
+ long nXMul=aOutRect.GetWidth()-1;
+ long nYMul=aOutRect.GetHeight()-1;
+ long nXDiv=pMainPage->GetWdt();
+ long nYDiv=pMainPage->GetHgt();
+ Fraction aXScl(nXMul,nXDiv);
+ Fraction aYScl(nYMul,nYDiv);
+ // nun auf 10 Binaerstellen kuerzen (ca. 3 Dezimalstellen). Joe, 01-12-1995, BugId 21483
+ Kuerzen(aXScl,10); // auf 7 Binaerstellen Kuerzen = ca. 2 Dezimalstellen
+ Kuerzen(aYScl,10); // auf 7 Binaerstellen Kuerzen = ca. 2 Dezimalstellen
+ nXMul=aXScl.GetNumerator();
+ nXDiv=aXScl.GetDenominator();
+ nYMul=aYScl.GetNumerator();
+ nYDiv=aYScl.GetDenominator();
+ rXOut.GetOutDev()->SetMapMode(MapMode(MAP_RELATIVE,aZero,aXScl,aYScl));
+#else
+ MapMode aMapMerk(rXOut.GetOutDev()->GetMapMode());
+ MapMode aMapNeu(aMapMerk);
+ Point aOrg(aMapNeu.GetOrigin());
+ Fraction aSclx(aMapNeu.GetScaleX());
+ Fraction aScly(aMapNeu.GetScaleY());
+ Point aOfs(aOutRect.TopLeft());
+ aOrg+=aOfs;
+ ResizePoint(aOrg,Point(),Fraction(pMainPage->GetWdt(),aOutRect.GetWidth()),
+ Fraction(pMainPage->GetHgt(),aOutRect.GetHeight()));
+ aSclx*=Fraction(aOutRect.GetWidth(),pMainPage->GetWdt());
+ aScly*=Fraction(aOutRect.GetHeight(),pMainPage->GetHgt());
+ // nun auf 10 Binaerstellen kuerzen (ca. 3 Dezimalstellen). Joe, 01-12-1995, BugId 21483
+ Kuerzen(aSclx,10); // auf 7 Binaerstellen Kuerzen = ca. 2 Dezimalstellen
+ Kuerzen(aScly,10); // auf 7 Binaerstellen Kuerzen = ca. 2 Dezimalstellen
+ aMapNeu.SetOrigin(aOrg);
+ aMapNeu.SetScaleX(aSclx);
+ aMapNeu.SetScaleY(aScly);
+ rXOut.GetOutDev()->SetMapMode(aMapNeu);
+#endif
+ if (bClipIt) {
+ // Hier koennte ich mal noch einbauen, dass eine eventuelle
+ // Metafileaufzeichnung pausiert wird, damit keine
+ // SetClipRegion-Actions erzeugt werden.
+ rXOut.GetOutDev()->IntersectClipRegion(aPageRect);
+ }
+ SdrPaintInfoRec aInfoRec(rInfoRec);
+ aInfoRec.aCheckRect=Rectangle(); // alles Malen!
+ USHORT nMaPgAnz=pMainPage->GetMasterPageCount();
+ USHORT i=0;
+ do {
+ aInfoRec.nPaintMode=rInfoRec.nPaintMode & ~SDRPAINTMODE_MASTERPAGE;
+ aInfoRec.nPaintMode&=~SDRPAINTMODE_GLUEPOINTS;
+ aInfoRec.nPaintMode|=SDRPAINTMODE_ANILIKEPRN;
+ SdrPage* pPg;
+ const SetOfByte* pMLayers=NULL;
+ if (i<nMaPgAnz) {
+ pPg=pMainPage->GetMasterPage(i);
+ pMLayers=&pMainPage->GetMasterPageVisibleLayers(i);
+ aInfoRec.nPaintMode|=SDRPAINTMODE_MASTERPAGE;
+ }
+ else
+ pPg=pMainPage;
+
+ i++;
+ if (pPg!=NULL)
+ { // ansonsten evtl. ungueltige Masterpage
+ ULONG nObjAnz=pPg->GetObjCount();
+ for ( ULONG i=0; i<nObjAnz; i++ )
+ {
+ if( i == 0 && pPg->IsMasterPage() && pMainPage->GetBackgroundObj() )
+ {
+ SdrObject* pBackgroundObj = pMainPage->GetBackgroundObj();
+ if( pBackgroundObj->GetLogicRect() != aPageRect )
+ {
+ pBackgroundObj->SetLogicRect( aPageRect );
+ pBackgroundObj->RecalcBoundRect();
+ }
+ pBackgroundObj->Paint( rXOut, aInfoRec );
+ }
+ else
+ {
+ SdrObject* pObj=pPg->GetObj(i);
+ const Rectangle& rBoundRect=pObj->GetBoundRect();
+ if (rInfoRec.aPaintLayer.IsSet(pObj->GetLayer()) && // Layer des Obj nicht sichtbar
+ (pMLayers==NULL || pMLayers->IsSet(pObj->GetLayer()))) // MasterPageLayer visible
+ {
+ pObj->Paint(rXOut,aInfoRec);
+ }
+ }
+ }
+ }
+ } while (i<=nMaPgAnz);
+#ifndef NORELMAPMODE
+ rXOut.GetOutDev()->SetMapMode(MapMode(MAP_RELATIVE,aZero,Fraction(nXDiv,nXMul),Fraction(nYDiv,nYMul)));
+ aOfs.X()=-aOfs.X();
+ aOfs.Y()=-aOfs.Y();
+ rXOut.GetOutDev()->SetMapMode(MapMode(MAP_RELATIVE,aOfs,aFact1,aFact1));
+#else
+ rXOut.GetOutDev()->SetMapMode(aMapMerk);
+#endif
+ if (bClipIt) {
+ if (bClip0) rXOut.GetOutDev()->SetClipRegion(aClip0);
+ else rXOut.GetOutDev()->SetClipRegion();
+ }
+ }
+ }
+ // IsInPainting-Flag zuruecksetzen
+ ((SdrPageObj*)this)->bPainting=FALSE;
+ }
+
+ if(bPaintFrame)
+ {
+ OutputDevice& rOut=*rXOut.GetOutDev();
+ rOut.SetFillColor();
+ rOut.SetLineColor( Color( COL_GRAY ) );
+ rOut.DrawRect(aOutRect);
+ }
+
+ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {
+ bOk=PaintGluePoints(rXOut,rInfoRec);
+ }
+
+ if( pPV )
+ pPV->SetPaintingPageObj( NULL );
+
+ return bOk;
+}
+
+
+void SdrPageObj::operator=(const SdrObject& rObj)
+{
+ SdrObject::operator=(rObj);
+ nPageNum=((const SdrPageObj&)rObj).nPageNum;
+}
+
+
+void SdrPageObj::TakeObjNameSingul(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNameSingulPAGE);
+}
+
+
+void SdrPageObj::TakeObjNamePlural(XubString& rName) const
+{
+ rName=ImpGetResStr(STR_ObjNamePluralPAGE);
+}
+
+
+const Rectangle& SdrPageObj::GetBoundRect() const
+{
+ return SdrObject::GetBoundRect();
+}
+
+
+const Rectangle& SdrPageObj::GetSnapRect() const
+{
+ return SdrObject::GetSnapRect();
+}
+
+
+const Rectangle& SdrPageObj::GetLogicRect() const
+{
+ return SdrObject::GetLogicRect();
+}
+
+
+void SdrPageObj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ SdrObject::NbcSetSnapRect(rRect);
+}
+
+
+void SdrPageObj::NbcSetLogicRect(const Rectangle& rRect)
+{
+ SdrObject::NbcSetLogicRect(rRect);
+}
+
+
+void SdrPageObj::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL bDetail) const
+{
+ SdrObject::TakeXorPoly(rPoly,bDetail);
+}
+
+void SdrPageObj::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+
+void SdrPageObj::WriteData(SvStream& rOut) const
+{
+ SdrObject::WriteData(rOut);
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrPageObj");
+#endif
+ rOut<<nPageNum;
+}
+
+void SdrPageObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ SdrObject::ReadData(rHead,rIn);
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrPageObj");
+#endif
+ rIn>>nPageNum;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
new file mode 100644
index 0000000000..6aef77abb3
--- /dev/null
+++ b/svx/source/svdraw/svdopath.cxx
@@ -0,0 +1,2999 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdopath.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <tools/bigint.hxx>
+#include "svdopath.hxx"
+#include <math.h>
+#include "xpool.hxx"
+#include "xpoly.hxx"
+#include "xoutx.hxx"
+#include "svdxout.hxx"
+#include "svdattr.hxx"
+#include "svdtouch.hxx"
+#include "svdtrans.hxx"
+#include "svdio.hxx"
+#include "svdetc.hxx"
+#include "svddrag.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdhdl.hxx"
+//#include "svdosmrt.hxx"
+#include "svdview.hxx" // fuer MovCreate bei Freihandlinien
+#include "svdglob.hxx" // Stringcache
+#include "svdstr.hrc" // Objektname
+
+#ifdef _MSC_VER
+#pragma optimize ("",off)
+#endif
+
+#include "xlnwtit.hxx"
+#include "xlnclit.hxx"
+#include "xflclit.hxx"
+#include "svdogrp.hxx"
+
+#ifndef _SVX_XLNTRIT_HXX
+#include "xlntrit.hxx"
+#endif
+
+/*************************************************************************/
+
+#define SVDOPATH_INITSIZE 20
+#define SVDOPATH_RESIZE 20
+
+/*************************************************************************/
+
+SdrPathObjGeoData::SdrPathObjGeoData()
+{
+}
+
+SdrPathObjGeoData::~SdrPathObjGeoData()
+{
+}
+
+TYPEINIT1(SdrPathObj,SdrTextObj);
+
+SdrPathObj::SdrPathObj(SdrObjKind eNewKind)
+{
+ eKind=eNewKind;
+ bClosedObj=IsClosed();
+ bCreating=FALSE;
+}
+
+SdrPathObj::SdrPathObj(SdrObjKind eNewKind, const XPolyPolygon& rPathPoly):
+ aPathPolygon(rPathPoly)
+{
+ eKind=eNewKind;
+ bClosedObj=IsClosed();
+ bCreating=FALSE;
+ ImpForceKind();
+}
+
+SdrPathObj::SdrPathObj(const Point& rPt1, const Point& rPt2)
+{
+ eKind=OBJ_LINE;
+ XPolygon aXP(2);
+ aXP[0]=rPt1;
+ aXP[1]=rPt2;
+ aPathPolygon.Insert(aXP);
+ bClosedObj=FALSE;
+ bCreating=FALSE;
+ ImpForceLineWink();
+}
+
+SdrPathObj::~SdrPathObj()
+{
+}
+
+FASTBOOL SdrPathObj::FindPolyPnt(USHORT nAbsPnt, USHORT& rPolyNum,
+ USHORT& rPointNum, FASTBOOL bAllPoints) const
+{
+ USHORT nPolyCnt=aPathPolygon.Count();
+ USHORT nPoly=0;
+ FASTBOOL bClosed=IsClosed();
+ nAbsPnt+=1;
+
+ while (nPoly<nPolyCnt) {
+ const XPolygon& rXPoly = aPathPolygon[nPoly];
+ USHORT nPnt=0;
+ USHORT nCnt=0;
+ USHORT nPntCnt=rXPoly.GetPointCount();
+ // geschlossen? Dann Endpunkt=Startpunkt
+ if (bClosed && nPntCnt>1) nPntCnt--;
+
+ while (nPnt<nPntCnt) {
+ if (bAllPoints || rXPoly.GetFlags(nPnt)!=XPOLY_CONTROL) nCnt++;
+ if (nCnt==nAbsPnt) {
+ rPolyNum=nPoly;
+ rPointNum=nPnt;
+ return TRUE;
+ }
+ nPnt++;
+ }
+ nAbsPnt-=nCnt;
+ nPoly++;
+ }
+ return FALSE;
+}
+
+void SdrPathObj::ImpForceLineWink()
+{
+ if (aPathPolygon.Count()==1 && aPathPolygon[0].GetPointCount()==2 && eKind==OBJ_LINE) {
+ Point aDelt(aPathPolygon[0][1]);
+ aDelt-=aPathPolygon[0][0];
+ aGeo.nDrehWink=GetAngle(aDelt);
+ aGeo.nShearWink=0;
+ aGeo.RecalcSinCos();
+ aGeo.RecalcTan();
+ }
+}
+
+void SdrPathObj::ImpForceKind()
+{
+ if (eKind==OBJ_PATHPLIN) eKind=OBJ_PLIN;
+ if (eKind==OBJ_PATHPOLY) eKind=OBJ_POLY;
+
+ USHORT nPolyAnz=aPathPolygon.Count();
+ USHORT nPoly1PointAnz=nPolyAnz==0 ? 0 : aPathPolygon[0].GetPointCount();
+ FASTBOOL bHasCtrl=FALSE;
+ FASTBOOL bHasLine=FALSE; // gemischt wird jedoch z.Zt. nicht in eKind festgehalten
+ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz && (!bHasCtrl || !bHasLine); nPolyNum++) {
+ const XPolygon& rPoly=aPathPolygon[nPolyNum];
+ USHORT nPointAnz=rPoly.GetPointCount();
+ for (USHORT nPointNum=0; nPointNum<nPointAnz && (!bHasCtrl || !bHasLine); nPointNum++) {
+ if (rPoly.IsControl(nPointNum)) bHasCtrl=TRUE;
+ if (nPointNum+1<nPointAnz && !rPoly.IsControl(nPointNum) && !rPoly.IsControl(nPointNum+1)) bHasLine=TRUE;
+ }
+ }
+ if (!bHasCtrl) {
+ switch (eKind) {
+ case OBJ_PATHLINE: eKind=OBJ_PLIN; break;
+ case OBJ_FREELINE: eKind=OBJ_PLIN; break;
+ case OBJ_PATHFILL: eKind=OBJ_POLY; break;
+ case OBJ_FREEFILL: eKind=OBJ_POLY; break;
+ }
+ } else {
+ switch (eKind) {
+ case OBJ_LINE: eKind=OBJ_PATHLINE; break;
+ case OBJ_PLIN: eKind=OBJ_PATHLINE; break;
+ case OBJ_POLY: eKind=OBJ_PATHFILL; break;
+ }
+ }
+
+ if (eKind==OBJ_LINE && (nPolyAnz!=1 || nPoly1PointAnz!=2)) eKind=OBJ_PLIN;
+ if (eKind==OBJ_PLIN && (nPolyAnz==1 && nPoly1PointAnz==2)) eKind=OBJ_LINE;
+
+ bClosedObj=IsClosed();
+ if (eKind==OBJ_LINE) ImpForceLineWink();
+}
+
+void SdrPathObj::ImpSetClosed(FASTBOOL bClose)
+{
+ if (bClose) {
+ switch (eKind) {
+ case OBJ_LINE : eKind=OBJ_POLY; break;
+ case OBJ_PLIN : eKind=OBJ_POLY; break;
+ case OBJ_PATHLINE: eKind=OBJ_PATHFILL; break;
+ case OBJ_FREELINE: eKind=OBJ_FREEFILL; break;
+ case OBJ_SPLNLINE: eKind=OBJ_SPLNFILL; break;
+ }
+ // Nun das Poly noch schliessen
+ USHORT nPolyAnz=aPathPolygon.Count();
+ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) {
+ XPolygon& rXP=aPathPolygon[nPolyNum];
+ USHORT nPntMax=rXP.GetPointCount();
+ if (nPntMax!=0) {
+ nPntMax--;
+ if (rXP[0]!=rXP[nPntMax]) {
+ rXP[nPntMax+1]=Point(rXP[0]);
+ }
+ }
+ }
+ bClosedObj=TRUE;
+ } else {
+ switch (eKind) {
+ case OBJ_POLY : eKind=OBJ_PLIN; break;
+ case OBJ_PATHFILL: eKind=OBJ_PATHLINE; break;
+ case OBJ_FREEFILL: eKind=OBJ_FREELINE; break;
+ case OBJ_SPLNFILL: eKind=OBJ_SPLNLINE; break;
+ }
+ bClosedObj=FALSE;
+ }
+ ImpForceKind();
+}
+
+void SdrPathObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ rInfo.bNoContortion=FALSE;
+
+ FASTBOOL bCanConv = !HasText() || ImpCanConvTextToCurve();
+ FASTBOOL bIsPath = IsBezier() || IsSpline();
+
+ rInfo.bCanConvToPath = bCanConv && !bIsPath;
+ rInfo.bCanConvToPoly = bCanConv && bIsPath;
+ rInfo.bCanConvToContour = !IsFontwork() && (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
+}
+
+UINT16 SdrPathObj::GetObjIdentifier() const
+{
+ return USHORT(eKind);
+}
+
+void SdrPathObj::RecalcBoundRect()
+{
+ aOutRect=GetSnapRect();
+ long nLineWdt=ImpGetLineWdt();
+ if (!IsClosed()) { // ggf. Linienenden beruecksichtigen
+ long nLEndWdt=ImpGetLineEndAdd();
+ if (nLEndWdt>nLineWdt) nLineWdt=nLEndWdt;
+ }
+ if (nLineWdt!=0) {
+ aOutRect.Left ()-=nLineWdt;
+ aOutRect.Top ()-=nLineWdt;
+ aOutRect.Right ()+=nLineWdt;
+ aOutRect.Bottom()+=nLineWdt;
+ }
+ ImpAddShadowToBoundRect();
+ ImpAddTextToBoundRect();
+}
+
+FASTBOOL SdrPathObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ // Hidden objects on masterpages, draw nothing
+ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+ return TRUE;
+
+ FASTBOOL bHideContour=IsHideContour();
+
+ // prepare ItemSet of this object
+ SfxItemSet aSet((SfxItemPool&)(*GetItemPool()));
+ TakeAttributes(aSet, FALSE, TRUE);
+
+ // perepare ItemSet to avoid old XOut line drawing
+ XLineAttrSetItem aXLSet((SfxItemPool*)GetItemPool());
+ aXLSet.GetItemSet().Put(XLineStyleItem(XLINE_NONE));
+
+ // prepare line geometry
+ ImpLineGeometry* pLineGeometry = ImpPrepareLineGeometry(rXOut, aSet);
+
+ // Shadows
+ if (!bHideContour && ImpSetShadowAttributes(rXOut,!IsClosed()))
+ {
+ UINT32 nXDist=((SdrShadowXDistItem&)(aSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
+ UINT32 nYDist=((SdrShadowYDistItem&)(aSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
+ XPolyPolygon aTmpXPoly(aPathPolygon);
+ aTmpXPoly.Move(nXDist,nYDist);
+
+ // avoid shadow line drawing in XOut
+ rXOut.SetLineAttr(aXLSet);
+
+ if (!IsClosed()) {
+ USHORT nPolyAnz=aTmpXPoly.Count();
+ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) {
+ rXOut.DrawXPolyLine(aTmpXPoly.GetObject(nPolyNum));
+ }
+ } else {
+ rXOut.DrawXPolyPolygon(aTmpXPoly);
+ }
+
+ // new shadow line drawing
+ if(pLineGeometry)
+ {
+ // draw the line geometry
+ ImpDrawShadowLineGeometry(rXOut, aSet, *pLineGeometry);
+ }
+ }
+
+ // Before here the LineAttr were set: if(pLineAttr) rXOut.SetLineAttr(*pLineAttr);
+ // avoid line drawing in XOut
+ rXOut.SetLineAttr(aXLSet);
+
+ if(pFillAttr && (IsClosed() || bHideContour))
+ rXOut.SetFillAttr(*pFillAttr);
+
+ if (!bHideContour) {
+ if (!IsClosed()) {
+ USHORT nPolyAnz=aPathPolygon.Count();
+ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) {
+ rXOut.DrawXPolyLine(aPathPolygon.GetObject(nPolyNum));
+ }
+ } else {
+ rXOut.DrawXPolyPolygon(aPathPolygon);
+ }
+ }
+
+ // Own line drawing
+ if(!bHideContour && pLineGeometry)
+ {
+ // draw the line geometry
+ ImpDrawColorLineGeometry(rXOut, aSet, *pLineGeometry);
+ }
+
+ FASTBOOL bOk=TRUE;
+ if (HasText()) {
+ bOk=SdrTextObj::Paint(rXOut,rInfoRec);
+ }
+ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {
+ bOk=PaintGluePoints(rXOut,rInfoRec);
+ }
+
+ // throw away line geometry
+ if(pLineGeometry)
+ delete pLineGeometry;
+
+ return bOk;
+}
+
+SdrObject* SdrPathObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+ INT32 nMyTol=nTol;
+ FASTBOOL bFilled=IsClosed() && (bTextFrame || HasFill());
+
+ INT32 nWdt=ImpGetLineWdt()/2; // Halbe Strichstaerke
+ if (nWdt>nMyTol) nMyTol=nWdt; // Bei dicker Linie keine Toleranz noetig
+ Rectangle aR(rPnt,rPnt);
+ aR.Left() -=nMyTol;
+ aR.Right() +=nMyTol;
+ aR.Top() -=nMyTol;
+ aR.Bottom()+=nMyTol;
+
+ FASTBOOL bHit=FALSE;
+ unsigned nPolyAnz=aPathPolygon.Count();
+ if (bFilled) {
+ PolyPolygon aPP;
+ for (unsigned nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) {
+ aPP.Insert(XOutCreatePolygon(aPathPolygon[nPolyNum],NULL));
+ }
+ bHit=IsRectTouchesPoly(aPP,aR);
+ } else {
+ for (unsigned nPolyNum=0; nPolyNum<nPolyAnz && !bHit; nPolyNum++) {
+ Polygon aPoly(XOutCreatePolygon(aPathPolygon[nPolyNum],NULL));
+ bHit=IsRectTouchesLine(aPoly,aR);
+ }
+ }
+ if (!bHit && !IsTextFrame() && HasText()) {
+ bHit=SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer)!=NULL;
+ }
+ return bHit ? (SdrObject*)this : NULL;
+}
+
+void SdrPathObj::operator=(const SdrObject& rObj)
+{
+ SdrTextObj::operator=(rObj);
+ SdrPathObj& rPath=(SdrPathObj&)rObj;
+ aPathPolygon=rPath.aPathPolygon;
+}
+
+void SdrPathObj::TakeObjNameSingul(XubString& rName) const
+{
+ if (eKind==OBJ_LINE) {
+ USHORT nId=STR_ObjNameSingulLINE;
+ if (aPathPolygon.Count()==1 && aPathPolygon[0].GetPointCount()==2) {
+ Point aP1(aPathPolygon[0][0]);
+ Point aP2(aPathPolygon[0][1]);
+ if (aP1!=aP2) {
+ if (aP1.Y()==aP2.Y()) {
+ nId=STR_ObjNameSingulLINE_Hori;
+ } else if (aP1.X()==aP2.X()) {
+ nId=STR_ObjNameSingulLINE_Vert;
+ } else {
+ long dx=aP1.X()-aP2.X(); dx=Abs(dx);
+ long dy=aP1.Y()-aP2.Y(); dy=Abs(dy);
+ if (dx==dy) {
+ nId=STR_ObjNameSingulLINE_Diag;
+ }
+ }
+ }
+ }
+ rName=ImpGetResStr(nId);
+ } else if (eKind==OBJ_PLIN || eKind==OBJ_POLY) {
+ FASTBOOL bClosed=eKind==OBJ_POLY;
+ USHORT nId=0;
+ if (bCreating) { // z.Zt. Create
+ if (bClosed) {
+ nId=STR_ObjNameSingulPOLY;
+ } else {
+ nId=STR_ObjNameSingulPLIN;
+ }
+ rName=ImpGetResStr(nId);
+ } else { // sonst Punkteanzahl bestimmen
+ ULONG nPntAnz=0;
+ USHORT nPolyAnz=aPathPolygon.Count();
+ for (USHORT nPoly=0; nPoly<nPolyAnz; nPoly++) {
+ USHORT n=aPathPolygon[nPoly].GetPointCount();
+ if (n>1 && bClosed) n--;
+ nPntAnz+=n;
+ }
+ if (bClosed) {
+ nId=STR_ObjNameSingulPOLY_PntAnz;
+ } else {
+ nId=STR_ObjNameSingulPLIN_PntAnz;
+ }
+
+ rName = ImpGetResStr(nId);
+ UINT16 nPos = rName.SearchAscii("%N");
+
+ if(nPos != STRING_NOTFOUND)
+ {
+ rName.Erase(nPos, 2);
+ rName.Insert(UniString::CreateFromInt32(nPntAnz), nPos);
+ }
+ }
+ } else {
+ switch (eKind) {
+ case OBJ_PATHLINE: rName=ImpGetResStr(STR_ObjNameSingulPATHLINE); break;
+ case OBJ_FREELINE: rName=ImpGetResStr(STR_ObjNameSingulFREELINE); break;
+ case OBJ_SPLNLINE: rName=ImpGetResStr(STR_ObjNameSingulNATSPLN); break;
+ case OBJ_PATHFILL: rName=ImpGetResStr(STR_ObjNameSingulPATHFILL); break;
+ case OBJ_FREEFILL: rName=ImpGetResStr(STR_ObjNameSingulFREEFILL); break;
+ case OBJ_SPLNFILL: rName=ImpGetResStr(STR_ObjNameSingulPERSPLN); break;
+ }
+ }
+}
+
+void SdrPathObj::TakeObjNamePlural(XubString& rName) const
+{
+ switch (eKind) {
+ case OBJ_LINE : rName=ImpGetResStr(STR_ObjNamePluralLINE ); break;
+ case OBJ_PLIN : rName=ImpGetResStr(STR_ObjNamePluralPLIN ); break;
+ case OBJ_POLY : rName=ImpGetResStr(STR_ObjNamePluralPOLY ); break;
+ case OBJ_PATHLINE: rName=ImpGetResStr(STR_ObjNamePluralPATHLINE); break;
+ case OBJ_FREELINE: rName=ImpGetResStr(STR_ObjNamePluralFREELINE); break;
+ case OBJ_SPLNLINE: rName=ImpGetResStr(STR_ObjNamePluralNATSPLN); break;
+ case OBJ_PATHFILL: rName=ImpGetResStr(STR_ObjNamePluralPATHFILL); break;
+ case OBJ_FREEFILL: rName=ImpGetResStr(STR_ObjNamePluralFREEFILL); break;
+ case OBJ_SPLNFILL: rName=ImpGetResStr(STR_ObjNamePluralPERSPLN); break;
+ }
+}
+
+void SdrPathObj::TakeXorPoly(XPolyPolygon& rXPolyPoly, FASTBOOL bDetail) const
+{
+ rXPolyPoly=aPathPolygon;
+}
+
+void SdrPathObj::TakeContour(XPolyPolygon& rPoly) const
+{
+ // am 14.1.97 wg. Umstellung TakeContour ueber Mtf und Paint. Joe.
+ SdrTextObj::TakeContour(rPoly);
+}
+
+void SdrPathObj::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+USHORT SdrPathObj::GetHdlCount() const
+{
+ USHORT i,j;
+ USHORT nCnt=0;
+ USHORT nPolyCnt=aPathPolygon.Count();
+ FASTBOOL bClosed=IsClosed();
+
+ for (i=0; i<nPolyCnt; i++) {
+ const XPolygon& rXPoly=aPathPolygon[i];
+ USHORT nPntCnt=rXPoly.GetPointCount();
+ // Polygon geschlossen? Dann Endpunkt = Startpunkt
+ if (bClosed && nPntCnt>1) nPntCnt--;
+
+ for (j=0; j<nPntCnt; j++)
+ if (rXPoly.GetFlags(j)!=XPOLY_CONTROL) nCnt++;
+ }
+ return nCnt;
+}
+
+SdrHdl* SdrPathObj::GetHdl(USHORT nHdlNum) const
+{
+ SdrHdl* pHdl=NULL;
+ USHORT nPoly,nPnt;
+
+ if (FindPolyPnt(nHdlNum,nPoly,nPnt,FALSE)) {
+ pHdl=new SdrHdl(aPathPolygon[nPoly][nPnt],HDL_POLY);
+ pHdl->SetPolyNum(nPoly);
+ pHdl->SetPointNum(nPnt);
+ pHdl->SetSourceHdlNum(nHdlNum);
+ pHdl->Set1PixMore(nPnt==0);
+ }
+ return pHdl;
+}
+
+void SdrPathObj::AddToHdlList(SdrHdlList& rHdlList) const
+{
+ USHORT nCnt=GetHdlCount();
+ USHORT nPolyCnt=aPathPolygon.Count();
+ FASTBOOL bClosed=IsClosed();
+ USHORT nIdx=0;
+
+ for (USHORT i=0; i<nPolyCnt; i++) {
+ const XPolygon& rXPoly=aPathPolygon.GetObject(i);
+ USHORT nPntCnt=rXPoly.GetPointCount();
+ if (bClosed && nPntCnt>1) nPntCnt--;
+
+ for (USHORT j=0; j<nPntCnt; j++) {
+ if (rXPoly.GetFlags(j)!=XPOLY_CONTROL) {
+ const Point& rPnt=rXPoly[j];
+ SdrHdl* pHdl=new SdrHdl(rPnt,HDL_POLY);
+ pHdl->SetPolyNum(i);
+ pHdl->SetPointNum(j);
+ pHdl->Set1PixMore(j==0);
+ pHdl->SetSourceHdlNum(nIdx);
+ nIdx++;
+ rHdlList.AddHdl(pHdl);
+ }
+ }
+ }
+}
+
+USHORT SdrPathObj::GetPlusHdlCount(const SdrHdl& rHdl) const
+{
+ USHORT nCnt=0;
+ USHORT nPnt=rHdl.GetPointNum();
+ USHORT nPolyNum=rHdl.GetPolyNum();
+ if (nPolyNum<aPathPolygon.Count()) {
+ const XPolygon& rXPoly=aPathPolygon[nPolyNum];
+ USHORT nPntMax=rXPoly.GetPointCount();
+ if (nPntMax>0) {
+ nPntMax--;
+ if (nPnt<=nPntMax) {
+ if (rXPoly.GetFlags(nPnt)!=XPOLY_CONTROL) {
+ if (nPnt==0 && IsClosed()) nPnt=nPntMax;
+ if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==XPOLY_CONTROL) nCnt++;
+ if (nPnt==nPntMax && IsClosed()) nPnt=0;
+ if (nPnt<nPntMax && rXPoly.GetFlags(nPnt+1)==XPOLY_CONTROL) nCnt++;
+ }
+ }
+ }
+ }
+ return nCnt;
+}
+
+SdrHdl* SdrPathObj::GetPlusHdl(const SdrHdl& rHdl, USHORT nPlusNum) const
+{
+ SdrHdl* pHdl=NULL;
+ USHORT nPnt=rHdl.GetPointNum();
+ USHORT nPolyNum=rHdl.GetPolyNum();
+ if (nPolyNum<aPathPolygon.Count()) {
+ const XPolygon& rXPoly=aPathPolygon[nPolyNum];
+ USHORT nPntMax=rXPoly.GetPointCount();
+ if (nPntMax>0) {
+ nPntMax--;
+ if (nPnt<=nPntMax) {
+ pHdl=new SdrHdlBezWgt(&rHdl);
+ pHdl->SetPolyNum(rHdl.GetPolyNum());
+
+ if (nPnt==0 && IsClosed()) nPnt=nPntMax;
+ if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==XPOLY_CONTROL && nPlusNum==0) {
+ pHdl->SetPos(rXPoly[nPnt-1]);
+ pHdl->SetPointNum(nPnt-1);
+ } else {
+ if (nPnt==nPntMax && IsClosed()) nPnt=0;
+ if (nPnt<rXPoly.GetPointCount()-1 && rXPoly.GetFlags(nPnt+1)==XPOLY_CONTROL) {
+ pHdl->SetPos(rXPoly[nPnt+1]);
+ pHdl->SetPointNum(nPnt+1);
+ }
+ }
+
+ pHdl->SetSourceHdlNum(rHdl.GetSourceHdlNum());
+ pHdl->SetPlusHdl(TRUE);
+ }
+ }
+ }
+ return pHdl;
+}
+
+FASTBOOL SdrPathObj::HasSpecialDrag() const
+{
+ return TRUE;
+}
+
+inline USHORT GetPrevPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed)
+{
+ if (nPnt>0) {
+ nPnt--;
+ } else {
+ nPnt=nPntMax;
+ if (bClosed) nPnt--;
+ }
+ return nPnt;
+}
+
+inline USHORT GetNextPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed)
+{
+ nPnt++;
+ if (nPnt>nPntMax || (bClosed && nPnt>=nPntMax)) nPnt=0;
+ return nPnt;
+}
+
+class ImpSdrPathDragData
+{
+public:
+ XPolygon aXP; // Ausschnitt aud dem Originalpolygon
+ FASTBOOL bValid; // FALSE = zu wenig Punkte
+ FASTBOOL bClosed; // geschlossenes Objekt?
+ USHORT nPoly; // Nummer des Polygons im PolyPolygon
+ USHORT nPnt; // Punktnummer innerhalb des obigen Polygons
+ USHORT nPntAnz; // Punktanzahl des Polygons
+ USHORT nPntMax; // Maximaler Index
+ FASTBOOL bBegPnt; // Gedraggter Punkt ist der Anfangspunkt einer Polyline
+ FASTBOOL bEndPnt; // Gedraggter Punkt ist der Endpunkt einer Polyline
+ USHORT nPrevPnt; // Index des vorherigen Punkts
+ USHORT nNextPnt; // Index des naechsten Punkts
+ FASTBOOL bPrevIsBegPnt; // Vorheriger Punkt ist Anfangspunkt einer Polyline
+ FASTBOOL bNextIsEndPnt; // Folgepunkt ist Endpunkt einer Polyline
+ USHORT nPrevPrevPnt; // Index des vorvorherigen Punkts
+ USHORT nNextNextPnt; // Index des uebernaechsten Punkts
+ FASTBOOL bControl; // Punkt ist ein Kontrollpunkt
+ FASTBOOL bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt
+ FASTBOOL bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt
+ FASTBOOL bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt
+ FASTBOOL bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt
+ USHORT nPrevPrevPnt0;
+ USHORT nPrevPnt0;
+ USHORT nPnt0;
+ USHORT nNextPnt0;
+ USHORT nNextNextPnt0;
+ FASTBOOL bEliminate; // Punkt loeschen? (wird von MovDrag gesetzt)
+
+public:
+ ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl);
+ void ResetPoly(const SdrPathObj& rPO);
+};
+
+ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl):
+ aXP(5)
+{
+ bValid=FALSE;
+ bClosed=rPO.IsClosed(); // geschlossenes Objekt?
+ nPoly=rHdl.GetPolyNum(); // Nummer des Polygons im PolyPolygon
+ nPnt=rHdl.GetPointNum(); // Punktnummer innerhalb des obigen Polygons
+ const XPolygon& rXP=rPO.aPathPolygon[nPoly]; // Referenz auf das Polygon
+ nPntAnz=rXP.GetPointCount(); // Punktanzahl des Polygons
+ if (nPntAnz==0 || (bClosed && nPntAnz==1)) return; // min. 1Pt bei Line, min. 2 bei Polygon
+ nPntMax=nPntAnz-1; // Maximaler Index
+ bBegPnt=!bClosed && nPnt==0; // Gedraggter Punkt ist der Anfangspunkt einer Polyline
+ bEndPnt=!bClosed && nPnt==nPntMax; // Gedraggter Punkt ist der Endpunkt einer Polyline
+ if (bClosed && nPntAnz<=3) { // Falls Polygon auch nur eine Linie ist
+ bBegPnt=(nPntAnz<3) || nPnt==0;
+ bEndPnt=(nPntAnz<3) || nPnt==nPntMax-1;
+ }
+ nPrevPnt=nPnt; // Index des vorherigen Punkts
+ nNextPnt=nPnt; // Index des naechsten Punkts
+ if (!bBegPnt) nPrevPnt=GetPrevPnt(nPnt,nPntMax,bClosed);
+ if (!bEndPnt) nNextPnt=GetNextPnt(nPnt,nPntMax,bClosed);
+ bPrevIsBegPnt=bBegPnt || (!bClosed && nPrevPnt==0);
+ bNextIsEndPnt=bEndPnt || (!bClosed && nNextPnt==nPntMax);
+ nPrevPrevPnt=nPnt; // Index des vorvorherigen Punkts
+ nNextNextPnt=nPnt; // Index des uebernaechsten Punkts
+ if (!bPrevIsBegPnt) nPrevPrevPnt=GetPrevPnt(nPrevPnt,nPntMax,bClosed);
+ if (!bNextIsEndPnt) nNextNextPnt=GetNextPnt(nNextPnt,nPntMax,bClosed);
+ bControl=rHdl.IsPlusHdl(); // Punkt ist ein Kontrollpunkt
+ bIsPrevControl=FALSE; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt
+ bIsNextControl=FALSE; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt
+ bPrevIsControl=FALSE; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt
+ bNextIsControl=FALSE; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt
+ if (bControl) {
+ bIsPrevControl=rXP.IsControl(nPrevPnt);
+ bIsNextControl=!bIsPrevControl;
+ } else {
+ bPrevIsControl=!bBegPnt && !bPrevIsBegPnt && rXP.GetFlags(nPrevPnt)==XPOLY_CONTROL;
+ bNextIsControl=!bEndPnt && !bNextIsEndPnt && rXP.GetFlags(nNextPnt)==XPOLY_CONTROL;
+ }
+ nPrevPrevPnt0=nPrevPrevPnt;
+ nPrevPnt0 =nPrevPnt;
+ nPnt0 =nPnt;
+ nNextPnt0 =nNextPnt;
+ nNextNextPnt0=nNextNextPnt;
+ nPrevPrevPnt=0;
+ nPrevPnt=1;
+ nPnt=2;
+ nNextPnt=3;
+ nNextNextPnt=4;
+ bEliminate=FALSE;
+ ResetPoly(rPO);
+ bValid=TRUE;
+}
+
+void ImpSdrPathDragData::ResetPoly(const SdrPathObj& rPO)
+{
+ const XPolygon& rXP=rPO.aPathPolygon[nPoly]; // Referenz auf das Polygon
+ aXP[0]=rXP[nPrevPrevPnt0]; aXP.SetFlags(0,rXP.GetFlags(nPrevPrevPnt0));
+ aXP[1]=rXP[nPrevPnt0]; aXP.SetFlags(1,rXP.GetFlags(nPrevPnt0));
+ aXP[2]=rXP[nPnt0]; aXP.SetFlags(2,rXP.GetFlags(nPnt0));
+ aXP[3]=rXP[nNextPnt0]; aXP.SetFlags(3,rXP.GetFlags(nNextPnt0));
+ aXP[4]=rXP[nNextNextPnt0]; aXP.SetFlags(4,rXP.GetFlags(nNextNextPnt0));
+}
+
+class ImpPathCreateUser
+{
+public:
+ Point aBezControl0;
+ Point aBezStart;
+ Point aBezCtrl1;
+ Point aBezCtrl2;
+ Point aBezEnd;
+ Point aCircStart;
+ Point aCircEnd;
+ Point aCircCenter;
+ Point aLineStart;
+ Point aLineEnd;
+ Point aRectP1;
+ Point aRectP2;
+ Point aRectP3;
+ long nCircRadius;
+ long nCircStWink;
+ long nCircRelWink;
+ FASTBOOL bBezier;
+ FASTBOOL bBezHasCtrl0;
+ FASTBOOL bCurve;
+ FASTBOOL bCircle;
+ FASTBOOL bAngleSnap;
+ FASTBOOL bLine;
+ FASTBOOL bLine90;
+ FASTBOOL bRect;
+ FASTBOOL bMixedCreate;
+ USHORT nBezierStartPoint;
+ SdrObjKind eStartKind;
+ SdrObjKind eAktKind;
+
+public:
+ ImpPathCreateUser(): nCircRadius(0),nCircStWink(0),nCircRelWink(0),
+ bBezier(FALSE),bBezHasCtrl0(FALSE),bCurve(FALSE),bCircle(FALSE),bAngleSnap(FALSE),bLine(FALSE),bLine90(FALSE),bRect(FALSE),
+ bMixedCreate(FALSE),nBezierStartPoint(0),eStartKind(OBJ_NONE),eAktKind(OBJ_NONE) { }
+
+ void ResetFormFlags() { bBezier=FALSE; bCurve=FALSE; bCircle=FALSE; bLine=FALSE; bRect=FALSE; }
+ FASTBOOL IsFormFlag() const { return bBezier || bCurve || bCircle || bLine || bRect; }
+ XPolygon GetFormPoly() const;
+ FASTBOOL CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, FASTBOOL bMouseDown, SdrView* pView);
+ XPolygon GetBezierPoly() const;
+ FASTBOOL CalcCurve(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { return FALSE; }
+ XPolygon GetCurvePoly() const { return XPolygon(); }
+ FASTBOOL CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView);
+ XPolygon GetCirclePoly() const;
+ FASTBOOL CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView);
+ Point CalcLine(const Point& rCsr, long nDirX, long nDirY, SdrView* pView) const;
+ XPolygon GetLinePoly() const;
+ FASTBOOL CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView);
+ XPolygon GetRectPoly() const;
+};
+
+XPolygon ImpPathCreateUser::GetFormPoly() const
+{
+ if (bBezier) return GetBezierPoly();
+ if (bCurve) return GetCurvePoly();
+ if (bCircle) return GetCirclePoly();
+ if (bLine) return GetLinePoly();
+ if (bRect) return GetRectPoly();
+ return XPolygon();
+}
+
+FASTBOOL ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, FASTBOOL bMouseDown, SdrView* pView)
+{
+ FASTBOOL bRet=TRUE;
+ aBezStart=rP1;
+ aBezCtrl1=rP1+rDir;
+ aBezCtrl2=rP2;
+ if (!bMouseDown) aBezEnd=rP2;
+ bBezier=bRet;
+ return bRet;
+}
+
+XPolygon ImpPathCreateUser::GetBezierPoly() const
+{
+ XPolygon aXP(4);
+ aXP[0]=aBezStart; aXP.SetFlags(0,XPOLY_SMOOTH);
+ aXP[1]=aBezCtrl1; aXP.SetFlags(1,XPOLY_CONTROL);
+ aXP[2]=aBezCtrl2; aXP.SetFlags(2,XPOLY_CONTROL);
+ aXP[3]=aBezEnd;
+ return aXP;
+}
+
+FASTBOOL ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView)
+{
+ long nTangAngle=GetAngle(rDir);
+ aCircStart=rP1;
+ aCircEnd=rP2;
+ aCircCenter=rP1;
+ long dx=rP2.X()-rP1.X();
+ long dy=rP2.Y()-rP1.Y();
+ long dAngle=GetAngle(Point(dx,dy))-nTangAngle;
+ dAngle=NormAngle360(dAngle);
+ long nTmpAngle=NormAngle360(9000-dAngle);
+ FASTBOOL bRet=nTmpAngle!=9000 && nTmpAngle!=27000;
+ long nRad=0;
+ if (bRet) {
+ double cs=cos(nTmpAngle*nPi180);
+ double nR=(double)GetLen(Point(dx,dy))/cs/2;
+ nRad=Abs(Round(nR));
+ }
+ if (dAngle<18000) {
+ nCircStWink=NormAngle360(nTangAngle-9000);
+ nCircRelWink=NormAngle360(2*dAngle);
+ aCircCenter.X()+=Round(nRad*cos((nTangAngle+9000)*nPi180));
+ aCircCenter.Y()-=Round(nRad*sin((nTangAngle+9000)*nPi180));
+ } else {
+ nCircStWink=NormAngle360(nTangAngle+9000);
+ nCircRelWink=-NormAngle360(36000-2*dAngle);
+ aCircCenter.X()+=Round(nRad*cos((nTangAngle-9000)*nPi180));
+ aCircCenter.Y()-=Round(nRad*sin((nTangAngle-9000)*nPi180));
+ }
+ bAngleSnap=pView!=NULL && pView->IsAngleSnapEnabled();
+ if (bAngleSnap) {
+ long nSA=pView->GetSnapAngle();
+ if (nSA!=0) { // Winkelfang
+ FASTBOOL bNeg=nCircRelWink<0;
+ if (bNeg) nCircRelWink=-nCircRelWink;
+ nCircRelWink+=nSA/2;
+ nCircRelWink/=nSA;
+ nCircRelWink*=nSA;
+ nCircRelWink=NormAngle360(nCircRelWink);
+ if (bNeg) nCircRelWink=-nCircRelWink;
+ }
+ }
+ nCircRadius=nRad;
+ if (nRad==0 || Abs(nCircRelWink)<5) bRet=FALSE;
+ bCircle=bRet;
+ return bRet;
+}
+
+XPolygon ImpPathCreateUser::GetCirclePoly() const
+{
+ if (nCircRelWink>=0) {
+ XPolygon aXP(aCircCenter,nCircRadius,nCircRadius,
+ USHORT((nCircStWink+5)/10),USHORT((nCircStWink+nCircRelWink+5)/10),FALSE);
+ aXP[0]=aCircStart; aXP.SetFlags(0,XPOLY_SMOOTH);
+ if (!bAngleSnap) aXP[aXP.GetPointCount()-1]=aCircEnd;
+ return aXP;
+ } else {
+ XPolygon aXP(aCircCenter,nCircRadius,nCircRadius,
+ USHORT(NormAngle360(nCircStWink+nCircRelWink+5)/10),USHORT((nCircStWink+5)/10),FALSE);
+ USHORT nAnz=aXP.GetPointCount();
+ for (USHORT nNum=nAnz/2; nNum>0;) {
+ nNum--; // XPoly Punktreihenfolge umkehren
+ USHORT n2=nAnz-nNum-1;
+ Point aPt(aXP[nNum]);
+ aXP[nNum]=aXP[n2];
+ aXP[n2]=aPt;
+ }
+ aXP[0]=aCircStart; aXP.SetFlags(0,XPOLY_SMOOTH);
+ if (!bAngleSnap) aXP[aXP.GetPointCount()-1]=aCircEnd;
+ return aXP;
+ }
+}
+
+Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, SdrView* pView) const
+{
+ long x=aCsr.X(),x1=x,x2=x;
+ long y=aCsr.Y(),y1=y,y2=y;
+ FASTBOOL bHLin=nDirY==0;
+ FASTBOOL bVLin=nDirX==0;
+ if (bHLin) y=0;
+ else if (bVLin) x=0;
+ else {
+ x1=BigMulDiv(y,nDirX,nDirY);
+ y2=BigMulDiv(x,nDirY,nDirX);
+ long l1=Abs(x1)+Abs(y1);
+ long l2=Abs(x2)+Abs(y2);
+ if (l1<=l2 !=(pView!=NULL && pView->IsBigOrtho())) {
+ x=x1; y=y1;
+ } else {
+ x=x2; y=y2;
+ }
+ }
+ return Point(x,y);
+}
+
+FASTBOOL ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView)
+{
+ aLineStart=rP1;
+ aLineEnd=rP2;
+ bLine90=FALSE;
+ if (rP1==rP2 || (rDir.X()==0 && rDir.Y()==0)) { bLine=FALSE; return FALSE; }
+ Point aTmpPt(rP2-rP1);
+ long nDirX=rDir.X();
+ long nDirY=rDir.Y();
+ Point aP1(CalcLine(aTmpPt, nDirX, nDirY,pView)); aP1-=aTmpPt; long nQ1=Abs(aP1.X())+Abs(aP1.Y());
+ Point aP2(CalcLine(aTmpPt, nDirY,-nDirX,pView)); aP2-=aTmpPt; long nQ2=Abs(aP2.X())+Abs(aP2.Y());
+ if (pView!=NULL && pView->IsOrtho()) nQ1=0; // Ortho schaltet rechtwinklig aus
+ bLine90=nQ1>2*nQ2;
+ if (!bLine90) { // glatter Uebergang
+ aLineEnd+=aP1;
+ } else { // rechtwinkliger Uebergang
+ aLineEnd+=aP2;
+ }
+ bLine=TRUE;
+ return TRUE;
+}
+
+XPolygon ImpPathCreateUser::GetLinePoly() const
+{
+ XPolygon aXP(2);
+ aXP[0]=aLineStart; if (!bLine90) aXP.SetFlags(0,XPOLY_SMOOTH);
+ aXP[1]=aLineEnd;
+ return aXP;
+}
+
+FASTBOOL ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView)
+{
+ aRectP1=rP1;
+ aRectP2=rP1;
+ aRectP3=rP2;
+ if (rP1==rP2 || (rDir.X()==0 && rDir.Y()==0)) { bRect=FALSE; return FALSE; }
+ Point aTmpPt(rP2-rP1);
+ long nDirX=rDir.X();
+ long nDirY=rDir.Y();
+ long x=aTmpPt.X();
+ long y=aTmpPt.Y();
+ FASTBOOL bHLin=nDirY==0;
+ FASTBOOL bVLin=nDirX==0;
+ if (bHLin) y=0;
+ else if (bVLin) x=0;
+ else {
+ y=BigMulDiv(x,nDirY,nDirX);
+ long nHypLen=aTmpPt.Y()-y;
+ long nTangAngle=-GetAngle(rDir);
+ // sin=g/h, g=h*sin
+ double a=nTangAngle*nPi180;
+ double sn=sin(a);
+ double cs=cos(a);
+ double nGKathLen=nHypLen*sn;
+ y+=Round(nGKathLen*sn);
+ x+=Round(nGKathLen*cs);
+ }
+ aRectP2.X()+=x;
+ aRectP2.Y()+=y;
+ if (pView!=NULL && pView->IsOrtho()) {
+ long dx1=aRectP2.X()-aRectP1.X(); long dx1a=Abs(dx1);
+ long dy1=aRectP2.Y()-aRectP1.Y(); long dy1a=Abs(dy1);
+ long dx2=aRectP3.X()-aRectP2.X(); long dx2a=Abs(dx2);
+ long dy2=aRectP3.Y()-aRectP2.Y(); long dy2a=Abs(dy2);
+ FASTBOOL b1MoreThan2=dx1a+dy1a>dx2a+dy2a;
+ if (b1MoreThan2 != pView->IsBigOrtho()) {
+ long xtemp=dy2a-dx1a; if (dx1<0) xtemp=-xtemp;
+ long ytemp=dx2a-dy1a; if (dy1<0) ytemp=-ytemp;
+ aRectP2.X()+=xtemp;
+ aRectP2.Y()+=ytemp;
+ aRectP3.X()+=xtemp;
+ aRectP3.Y()+=ytemp;
+ } else {
+ long xtemp=dy1a-dx2a; if (dx2<0) xtemp=-xtemp;
+ long ytemp=dx1a-dy2a; if (dy2<0) ytemp=-ytemp;
+ aRectP3.X()+=xtemp;
+ aRectP3.Y()+=ytemp;
+ }
+ }
+ bRect=TRUE;
+ return TRUE;
+}
+
+XPolygon ImpPathCreateUser::GetRectPoly() const
+{
+ XPolygon aXP(3);
+ aXP[0]=aRectP1; aXP.SetFlags(0,XPOLY_SMOOTH);
+ aXP[1]=aRectP2;
+ if (aRectP3!=aRectP2) aXP[2]=aRectP3;
+ return aXP;
+}
+
+FASTBOOL SdrPathObj::BegDrag(SdrDragStat& rDrag) const
+{
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ if (pHdl==NULL) return FALSE;
+ ImpSdrPathDragData* pID=new ImpSdrPathDragData(*this,*pHdl);
+ if (!pID->bValid) {
+ DBG_ERROR("SdrPathObj::BegDrag(): ImpSdrPathDragData ist ungueltig");
+ delete pID;
+ return FALSE;
+ }
+ rDrag.SetUser(pID);
+ return TRUE;
+}
+
+FASTBOOL SdrPathObj::MovDrag(SdrDragStat& rDrag) const
+{
+ ImpSdrPathDragData* pID=(ImpSdrPathDragData*)rDrag.GetUser();
+ if (pID==NULL || !pID->bValid) {
+ DBG_ERROR("SdrPathObj::MovDrag(): ImpSdrPathDragData ist ungueltig");
+ return FALSE;
+ }
+ pID->ResetPoly(*this);
+
+ // Div. Daten lokal Kopieren fuer weniger Code und schnelleren Zugriff
+ FASTBOOL bClosed =pID->bClosed ; // geschlossenes Objekt?
+ USHORT nPnt =pID->nPnt ; // Punktnummer innerhalb des obigen Polygons
+ FASTBOOL bBegPnt =pID->bBegPnt ; // Gedraggter Punkt ist der Anfangspunkt einer Polyline
+ FASTBOOL bEndPnt =pID->bEndPnt ; // Gedraggter Punkt ist der Endpunkt einer Polyline
+ USHORT nPrevPnt =pID->nPrevPnt ; // Index des vorherigen Punkts
+ USHORT nNextPnt =pID->nNextPnt ; // Index des naechsten Punkts
+ FASTBOOL bPrevIsBegPnt =pID->bPrevIsBegPnt ; // Vorheriger Punkt ist Anfangspunkt einer Polyline
+ FASTBOOL bNextIsEndPnt =pID->bNextIsEndPnt ; // Folgepunkt ist Endpunkt einer Polyline
+ USHORT nPrevPrevPnt =pID->nPrevPrevPnt ; // Index des vorvorherigen Punkts
+ USHORT nNextNextPnt =pID->nNextNextPnt ; // Index des uebernaechsten Punkts
+ FASTBOOL bControl =pID->bControl ; // Punkt ist ein Kontrollpunkt
+ FASTBOOL bIsPrevControl=pID->bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt
+ FASTBOOL bIsNextControl=pID->bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt
+ FASTBOOL bPrevIsControl=pID->bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt
+ FASTBOOL bNextIsControl=pID->bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt
+
+ // Ortho bei Linien/Polygonen = Winkel beibehalten
+ if (!bControl && rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho()) {
+ FASTBOOL bBigOrtho=rDrag.GetView()->IsBigOrtho();
+ Point aPos(rDrag.GetNow()); // die aktuelle Position
+ Point aPnt(pID->aXP[nPnt]); // der gedraggte Punkt
+ USHORT nPnt1=0xFFFF,nPnt2=0xFFFF; // seine Nachbarpunkte
+ Point aNeuPos1,aNeuPos2; // die neuen Alternativen fuer aPos
+ FASTBOOL bPnt1=FALSE,bPnt2=FALSE; // die neuen Alternativen gueltig?
+ if (!bClosed && pID->nPntAnz>=2) { // Mind. 2 Pt bei Linien
+ if (!bBegPnt) nPnt1=nPrevPnt;
+ if (!bEndPnt) nPnt2=nNextPnt;
+ }
+ if (bClosed && pID->nPntAnz>=3) { // Mind. 3 Pt bei Polygon
+ nPnt1=nPrevPnt;
+ nPnt2=nNextPnt;
+ }
+ if (nPnt1!=0xFFFF && !bPrevIsControl) {
+ Point aPnt1=pID->aXP[nPnt1];
+ long ndx0=aPnt.X()-aPnt1.X();
+ long ndy0=aPnt.Y()-aPnt1.Y();
+ FASTBOOL bHLin=ndy0==0;
+ FASTBOOL bVLin=ndx0==0;
+ if (!bHLin || !bVLin) {
+ long ndx=aPos.X()-aPnt1.X();
+ long ndy=aPos.Y()-aPnt1.Y();
+ bPnt1=TRUE;
+ double nXFact=0; if (!bVLin) nXFact=(double)ndx/(double)ndx0;
+ double nYFact=0; if (!bHLin) nYFact=(double)ndy/(double)ndy0;
+ FASTBOOL bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho);
+ FASTBOOL bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho);
+ if (bHor) ndy=long(ndy0*nXFact);
+ if (bVer) ndx=long(ndx0*nYFact);
+ aNeuPos1=aPnt1;
+ aNeuPos1.X()+=ndx;
+ aNeuPos1.Y()+=ndy;
+ }
+ }
+ if (nPnt2!=0xFFFF && !bNextIsControl) {
+ Point aPnt2=pID->aXP[nPnt2];
+ long ndx0=aPnt.X()-aPnt2.X();
+ long ndy0=aPnt.Y()-aPnt2.Y();
+ FASTBOOL bHLin=ndy0==0;
+ FASTBOOL bVLin=ndx0==0;
+ if (!bHLin || !bVLin) {
+ long ndx=aPos.X()-aPnt2.X();
+ long ndy=aPos.Y()-aPnt2.Y();
+ bPnt2=TRUE;
+ double nXFact=0; if (!bVLin) nXFact=(double)ndx/(double)ndx0;
+ double nYFact=0; if (!bHLin) nYFact=(double)ndy/(double)ndy0;
+ FASTBOOL bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho);
+ FASTBOOL bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho);
+ if (bHor) ndy=long(ndy0*nXFact);
+ if (bVer) ndx=long(ndx0*nYFact);
+ aNeuPos2=aPnt2;
+ aNeuPos2.X()+=ndx;
+ aNeuPos2.Y()+=ndy;
+ }
+ }
+ if (bPnt1 && bPnt2) { // beide Alternativen vorhanden (Konkurenz)
+ BigInt nX1(aNeuPos1.X()-aPos.X()); nX1*=nX1;
+ BigInt nY1(aNeuPos1.Y()-aPos.Y()); nY1*=nY1;
+ BigInt nX2(aNeuPos2.X()-aPos.X()); nX2*=nX2;
+ BigInt nY2(aNeuPos2.Y()-aPos.Y()); nY2*=nY2;
+ nX1+=nY1; // Korrekturabstand zum Quadrat
+ nX2+=nY2; // Korrekturabstand zum Quadrat
+ // Die Alternative mit dem geringeren Korrekturbedarf gewinnt
+ if (nX1<nX2) bPnt2=FALSE; else bPnt1=FALSE;
+ }
+ if (bPnt1) rDrag.Now()=aNeuPos1;
+ if (bPnt2) rDrag.Now()=aNeuPos2;
+ }
+ rDrag.SetActionRect(Rectangle(rDrag.GetNow(),rDrag.GetNow()));
+
+ // IBM Special: Punkte eliminieren, wenn die beiden angrenzenden
+ // Linien eh' fast 180 deg sind.
+ if (!bControl && rDrag.GetView()!=NULL && rDrag.GetView()->IsEliminatePolyPoints() &&
+ !bBegPnt && !bEndPnt && !bPrevIsControl && !bNextIsControl)
+ {
+ Point aPt(pID->aXP[nNextPnt]);
+ aPt-=rDrag.GetNow();
+ long nWink1=GetAngle(aPt);
+ aPt=rDrag.GetNow();
+ aPt-=pID->aXP[nPrevPnt];
+ long nWink2=GetAngle(aPt);
+ long nDiff=nWink1-nWink2;
+ nDiff=Abs(nDiff);
+ pID->bEliminate=nDiff<=rDrag.GetView()->GetEliminatePolyPointLimitAngle();
+ if (pID->bEliminate) { // Position anpassen, damit Smooth an den Enden stimmt
+ aPt=pID->aXP[nNextPnt];
+ aPt+=pID->aXP[nPrevPnt];
+ aPt/=2;
+ rDrag.Now()=aPt;
+ }
+ }
+
+ // Um diese Entfernung wurde insgesamt gedraggd
+ Point aDiff(rDrag.GetNow()); aDiff-=pID->aXP[nPnt];
+
+ // Insgesamt sind 8 Faelle moeglich:
+ // X 1. Weder rechts noch links Ctrl.
+ // o--X--o 2. Rechts und links Ctrl, gedraggd wird St.
+ // o--X 3. Nur links Ctrl, gedraggd wird St.
+ // X--o 4. Nur rechts Ctrl, gedraggd wird St.
+ // x--O--o 5. Rechts und links Ctrl, gedraggd wird links.
+ // x--O 6. Nur links Ctrl, gedraggd wird links.
+ // o--O--x 7. Rechts und links Ctrl, gedraggd wird rechts.
+ // O--x 8. Nur rechts Ctrl, gedraggd wird rechts.
+ // Zusaetzlich ist zu beachten, dass das Veraendern einer Linie (keine Kurve)
+ // eine evtl. Kurve am anderen Ende der Linie bewirkt, falls dort Smooth
+ // gesetzt ist (Kontrollpunktausrichtung an Gerade).
+
+ pID->aXP[nPnt]+=aDiff; // <<<<<<<<<<
+
+ // Nun symmetrische PlusHandles etc. checken
+ if (bControl) { // Faelle 5,6,7,8
+ USHORT nSt=nPnt; // der zugehoerige Stuetzpunkt
+ USHORT nFix=nPnt; // der gegenueberliegende Kontrollpunkt
+ if (bIsNextControl) { // Wenn der naechste ein Kontrollpunkt ist, muss der vorh. der Stuetzpunkt sein
+ nSt=nPrevPnt;
+ nFix=nPrevPrevPnt;
+ } else {
+ nSt=nNextPnt;
+ nFix=nNextNextPnt;
+ }
+ if (pID->aXP.IsSmooth(nSt)) {
+ pID->aXP.CalcSmoothJoin(nSt,nPnt,nFix); // <<<<<<<<<<
+ }
+ }
+
+ if (!bControl) { // Faelle 1,2,3,4 wobei bei 1 nix passiert und bei 3+4 unten noch mehr folgt
+ // die beiden Kontrollpunkte mit verschieben
+ if (bPrevIsControl) pID->aXP[nPrevPnt]+=aDiff; // <<<<<<<<<<
+ if (bNextIsControl) pID->aXP[nNextPnt]+=aDiff; // <<<<<<<<<<
+ // Kontrollpunkt ggf. an Gerade ausrichten
+ if (pID->aXP.IsSmooth(nPnt)) {
+ if (bPrevIsControl && !bNextIsControl && !bEndPnt) { // Fall 3
+ pID->aXP.CalcSmoothJoin(nPnt,nNextPnt,nPrevPnt); // <<<<<<<<<<
+ }
+ if (bNextIsControl && !bPrevIsControl && !bBegPnt) { // Fall 4
+ pID->aXP.CalcSmoothJoin(nPnt,nPrevPnt,nNextPnt); // <<<<<<<<<<
+ }
+ }
+ // Und nun noch die anderen Enden der Strecken ueberpruefen (nPnt+-1).
+ // Ist dort eine Kurve (IsControl(nPnt+-2)) mit SmoothJoin (nPnt+-1),
+ // so muss der entsprechende Kontrollpunkt (nPnt+-2) angepasst werden.
+ if (!bBegPnt && !bPrevIsControl && !bPrevIsBegPnt && pID->aXP.IsSmooth(nPrevPnt)) {
+ if (pID->aXP.IsControl(nPrevPrevPnt)) {
+ pID->aXP.CalcSmoothJoin(nPrevPnt,nPnt,nPrevPrevPnt); // <<<<<<<<<<
+ }
+ }
+ if (!bEndPnt && !bNextIsControl && !bNextIsEndPnt && pID->aXP.IsSmooth(nNextPnt)) {
+ if (pID->aXP.IsControl(nNextNextPnt)) {
+ pID->aXP.CalcSmoothJoin(nNextPnt,nPnt,nNextNextPnt); // <<<<<<<<<<
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+FASTBOOL SdrPathObj::EndDrag(SdrDragStat& rDrag)
+{
+ Point aLinePt1;
+ Point aLinePt2;
+ FASTBOOL bLineGlueMirror=eKind==OBJ_LINE;
+ if (bLineGlueMirror) { // #40549#
+ XPolygon& rXP=aPathPolygon[0];
+ aLinePt1=rXP[0];
+ aLinePt2=rXP[1];
+ }
+ ImpSdrPathDragData* pID=(ImpSdrPathDragData*)rDrag.GetUser();
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ if (pID==NULL || !pID->bValid) {
+ DBG_ERROR("SdrPathObj::EndDrag(): ImpSdrPathDragData ist ungueltig");
+ return FALSE;
+ }
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ // Referenz auf das Polygon
+ XPolygon& rXP=aPathPolygon[pHdl->GetPolyNum()];
+
+ // Die 5 Punkte die sich evtl. geaendert haben
+ if (!pID->bPrevIsBegPnt) rXP[pID->nPrevPrevPnt0]=pID->aXP[pID->nPrevPrevPnt];
+ if (!pID->bNextIsEndPnt) rXP[pID->nNextNextPnt0]=pID->aXP[pID->nNextNextPnt];
+ if (!pID->bBegPnt) rXP[pID->nPrevPnt0] =pID->aXP[pID->nPrevPnt];
+ if (!pID->bEndPnt) rXP[pID->nNextPnt0] =pID->aXP[pID->nNextPnt];
+ rXP[pID->nPnt0] =pID->aXP[pID->nPnt];
+
+ // Letzter Punkt muss beim Geschlossenen immer gleich dem Ersten sein
+ if (pID->bClosed) rXP[rXP.GetPointCount()-1]=rXP[0];
+ if (pID->bEliminate) {
+ NbcDelPoint(rDrag.GetHdl()->GetSourceHdlNum());
+ }
+ ImpForceKind(); // Wg. impliziter Punktloeschung evtl. von PolyLine nach Line
+ // Winkel anpassen fuer Text an einfacher Linie
+ SetRectsDirty();
+ if (bLineGlueMirror) { // #40549#
+ XPolygon& rXP=aPathPolygon[0];
+ Point aLinePt1_(rXP[0]);
+ Point aLinePt2_(rXP[1]);
+ FASTBOOL bXMirr=(aLinePt1_.X()>aLinePt2_.X())!=(aLinePt1.X()>aLinePt2.X());
+ FASTBOOL bYMirr=(aLinePt1_.Y()>aLinePt2_.Y())!=(aLinePt1.Y()>aLinePt2.Y());
+ if (bXMirr || bYMirr) {
+ Point aRef1(GetSnapRect().Center());
+ if (bXMirr) {
+ Point aRef2(aRef1);
+ aRef2.Y()++;
+ NbcMirrorGluePoints(aRef1,aRef2);
+ }
+ if (bYMirr) {
+ Point aRef2(aRef1);
+ aRef2.X()++;
+ NbcMirrorGluePoints(aRef1,aRef2);
+ }
+ }
+ }
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ delete pID;
+ rDrag.SetUser(NULL);
+ return TRUE;
+}
+
+void SdrPathObj::BrkDrag(SdrDragStat& rDrag) const
+{
+ ImpSdrPathDragData* pID=(ImpSdrPathDragData*)rDrag.GetUser();
+ if (pID!=NULL) {
+ delete pID;
+ rDrag.SetUser(NULL);
+ }
+}
+
+XubString SdrPathObj::GetDragComment(const SdrDragStat& rDrag, FASTBOOL bUndoDragComment, FASTBOOL bCreateComment) const
+{
+ ImpSdrPathDragData* pID = (ImpSdrPathDragData*)rDrag.GetUser();
+
+ if(!pID || !pID->bValid)
+ return String();
+
+ // Hier auch mal pID verwenden !!!
+ XubString aStr;
+
+ if(!bCreateComment)
+ {
+ const SdrHdl* pHdl = rDrag.GetHdl();
+
+ if(bUndoDragComment || !pModel || !pHdl)
+ {
+ ImpTakeDescriptionStr(STR_DragPathObj, aStr);
+ }
+ else
+ {
+ if(pID->bEliminate)
+ {
+ // Punkt von ...
+ ImpTakeDescriptionStr(STR_ViewMarkedPoint, aStr);
+
+ // %O loeschen
+ XubString aStr2(ImpGetResStr(STR_EditDelete));
+
+ // UNICODE: Punkt von ... loeschen
+ aStr2.SearchAndReplaceAscii("%O", aStr);
+
+ return aStr2;
+ }
+
+ // dx=0.00 dy=0.00 // Beide Seiten Bezier
+ // dx=0.00 dy=0.00 l=0.00 0.00ø // Anfang oder Ende oder eine Seite Bezier bzw. Hebel
+ // dx=0.00 dy=0.00 l=0.00 0.00ø / l=0.00 0.00ø // Mittendrin
+ XubString aMetr;
+ Point aBeg(rDrag.GetStart());
+ Point aNow(rDrag.GetNow());
+
+ aStr = String();
+ aStr.AppendAscii("dx=");
+ pModel->TakeMetricStr(aNow.X() - aBeg.X(), aMetr, TRUE);
+ aStr += aMetr;
+
+ aStr.AppendAscii(" dy=");
+ pModel->TakeMetricStr(aNow.Y() - aBeg.Y(), aMetr, TRUE);
+ aStr += aMetr;
+
+ UINT16 nPntNum(pHdl->GetPointNum());
+ const XPolygon& rXPoly = aPathPolygon[rDrag.GetHdl()->GetPolyNum()];
+ UINT16 nPntAnz(rXPoly.GetPointCount());
+ BOOL bClose(IsClosed());
+
+ if(bClose)
+ nPntAnz--;
+
+ if(pHdl->IsPlusHdl())
+ {
+ // Hebel
+ UINT16 nRef(nPntNum);
+
+ if(rXPoly.IsControl(nPntNum + 1))
+ nRef--;
+ else
+ nRef++;
+
+ aNow -= rXPoly[nRef];
+
+ INT32 nLen(GetLen(aNow));
+ aStr.AppendAscii(" l=");
+ pModel->TakeMetricStr(nLen, aMetr, TRUE);
+ aStr += aMetr;
+
+ INT32 nWink(GetAngle(aNow));
+ aStr += sal_Unicode(' ');
+ pModel->TakeWinkStr(nWink, aMetr);
+ aStr += aMetr;
+ }
+ else if(nPntAnz > 1)
+ {
+ UINT16 nPntMax(nPntAnz - 1);
+ Point aPt1,aPt2;
+ BOOL bClose(IsClosed());
+ BOOL bPt1(nPntNum > 0);
+ BOOL bPt2(nPntNum < nPntMax);
+
+ if(bClose && nPntAnz > 2)
+ {
+ bPt1 = TRUE;
+ bPt2 = TRUE;
+ }
+
+ UINT16 nPt1,nPt2;
+
+ if(nPntNum > 0)
+ nPt1 = nPntNum - 1;
+ else
+ nPt1 = nPntMax;
+
+ if(nPntNum < nPntMax)
+ nPt2 = nPntNum + 1;
+ else
+ nPt2 = 0;
+
+ if(bPt1 && rXPoly.IsControl(nPt1))
+ bPt1 = FALSE; // Keine Anzeige
+
+ if(bPt2 && rXPoly.IsControl(nPt2))
+ bPt2 = FALSE; // von Bezierdaten
+
+ if(bPt1)
+ {
+ Point aPt(aNow);
+ aPt -= rXPoly[nPt1];
+
+ INT32 nLen(GetLen(aPt));
+ aStr.AppendAscii(" l=");
+ pModel->TakeMetricStr(nLen, aMetr, TRUE);
+ aStr += aMetr;
+
+ INT32 nWink(GetAngle(aPt));
+ aStr += sal_Unicode(' ');
+ pModel->TakeWinkStr(nWink, aMetr);
+ aStr += aMetr;
+ }
+
+ if(bPt2)
+ {
+ if(bPt1)
+ aStr.AppendAscii(" / ");
+ else
+ aStr.AppendAscii(" ");
+
+ Point aPt(aNow);
+ aPt -= rXPoly[nPt2];
+
+ INT32 nLen(GetLen(aPt));
+ aStr.AppendAscii("l=");
+ pModel->TakeMetricStr(nLen, aMetr, TRUE);
+ aStr += aMetr;
+
+ INT32 nWink(GetAngle(aPt));
+ aStr += sal_Unicode(' ');
+ pModel->TakeWinkStr(nWink, aMetr);
+ aStr += aMetr;
+ }
+ }
+ }
+ }
+ else if(pModel)
+ {
+ // Ansonsten CreateComment
+ ImpPathCreateUser* pU = (ImpPathCreateUser*)rDrag.GetUser();
+ SdrObjKind eKindMerk = eKind;
+
+ // fuer Description bei Mixed das Aktuelle...
+ ((SdrPathObj*)this)->eKind = pU->eAktKind;
+ ImpTakeDescriptionStr(STR_ViewCreateObj, aStr);
+ ((SdrPathObj*)this)->eKind = eKindMerk;
+
+ Point aPrev(rDrag.GetPrev());
+ Point aNow(rDrag.GetNow());
+
+ if(pU->bLine)
+ aNow = pU->aLineEnd;
+
+ aNow -= aPrev;
+ aStr.AppendAscii(" (");
+
+ XubString aMetr;
+
+ if(pU->bCircle)
+ {
+ pModel->TakeWinkStr(Abs(pU->nCircRelWink), aMetr);
+ aStr += aMetr;
+ aStr.AppendAscii(" r=");
+ pModel->TakeMetricStr(pU->nCircRadius, aMetr, TRUE);
+ aStr += aMetr;
+ }
+
+ aStr.AppendAscii("dx=");
+ pModel->TakeMetricStr(aNow.X(), aMetr, TRUE);
+ aStr += aMetr;
+
+ aStr.AppendAscii(" dy=");
+ pModel->TakeMetricStr(aNow.Y(), aMetr, TRUE);
+ aStr += aMetr;
+
+ if(!IsFreeHand())
+ {
+ INT32 nLen(GetLen(aNow));
+ aStr.AppendAscii(" l=");
+ pModel->TakeMetricStr(nLen, aMetr, TRUE);
+ aStr += aMetr;
+
+ INT32 nWink(GetAngle(aNow));
+ aStr += sal_Unicode(' ');
+ pModel->TakeWinkStr(nWink, aMetr);
+ aStr += aMetr;
+ }
+
+ aStr += sal_Unicode(')');
+ }
+ return aStr;
+}
+
+void lcl_CopyBezier(const XPolygon& rSrc, USHORT nSPos, XPolygon& rDst, USHORT nDPos)
+{
+ rDst[nDPos++] = rSrc[nSPos++];
+ rDst.SetFlags(nDPos, XPOLY_CONTROL);
+ rDst[nDPos++] = rSrc[nSPos++];
+ rDst.SetFlags(nDPos, XPOLY_CONTROL);
+ rDst[nDPos++] = rSrc[nSPos++];
+ rDst[nDPos] = rSrc[nSPos];
+}
+
+void SdrPathObj::TakeDragPoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rXPP.Clear();
+ ImpSdrPathDragData* pID=(ImpSdrPathDragData*)rDrag.GetUser();
+ const XPolygon& rXP=aPathPolygon[rDrag.GetHdl()->GetPolyNum()];
+ if (rXP.GetPointCount()<=2 /*|| rXPoly.GetFlags(1)==XPOLY_CONTROL && rXPoly.GetPointCount()<=4*/) {
+ XPolygon aXPoly(rXP);
+ aXPoly[rDrag.GetHdl()->GetPointNum()]=rDrag.GetNow();
+ rXPP.Insert(aXPoly);
+ return;
+ }
+ // Div. Daten lokal Kopieren fuer weniger Code und schnelleren Zugriff
+ FASTBOOL bClosed =pID->bClosed ; // geschlossenes Objekt?
+ USHORT nPntAnz =pID->nPntAnz ; // Punktanzahl
+ USHORT nPnt =pID->nPnt ; // Punktnummer innerhalb des Polygons
+ FASTBOOL bBegPnt =pID->bBegPnt ; // Gedraggter Punkt ist der Anfangspunkt einer Polyline
+ FASTBOOL bEndPnt =pID->bEndPnt ; // Gedraggter Punkt ist der Endpunkt einer Polyline
+ USHORT nPrevPnt =pID->nPrevPnt ; // Index des vorherigen Punkts
+ USHORT nNextPnt =pID->nNextPnt ; // Index des naechsten Punkts
+ FASTBOOL bPrevIsBegPnt =pID->bPrevIsBegPnt ; // Vorheriger Punkt ist Anfangspunkt einer Polyline
+ FASTBOOL bNextIsEndPnt =pID->bNextIsEndPnt ; // Folgepunkt ist Endpunkt einer Polyline
+ USHORT nPrevPrevPnt =pID->nPrevPrevPnt ; // Index des vorvorherigen Punkts
+ USHORT nNextNextPnt =pID->nNextNextPnt ; // Index des uebernaechsten Punkts
+ FASTBOOL bControl =pID->bControl ; // Punkt ist ein Kontrollpunkt
+ FASTBOOL bIsPrevControl=pID->bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt
+ FASTBOOL bIsNextControl=pID->bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt
+ FASTBOOL bPrevIsControl=pID->bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt
+ FASTBOOL bNextIsControl=pID->bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt
+ XPolygon aXPoly(pID->aXP);
+ XPolygon aLine1(2);
+ XPolygon aLine2(2);
+ XPolygon aLine3(2);
+ XPolygon aLine4(2);
+ if (bControl) {
+ aLine1[1]=pID->aXP[nPnt];
+ if (bIsNextControl) { // bin ich Kontrollpunkt hinter der Stuetzstelle?
+ aLine1[0]=pID->aXP[nPrevPnt];
+ aLine2[0]=pID->aXP[nNextNextPnt];
+ aLine2[1]=pID->aXP[nNextPnt];
+ if (pID->aXP.IsSmooth(nPrevPnt) && !bPrevIsBegPnt && pID->aXP.IsControl(nPrevPrevPnt)) {
+ aXPoly.Insert(0,rXP[pID->nPrevPrevPnt0-1],XPOLY_CONTROL);
+ aXPoly.Insert(0,rXP[pID->nPrevPrevPnt0-2],XPOLY_NORMAL);
+ // Hebellienien fuer das gegenueberliegende Kurvensegment
+ aLine3[0]=pID->aXP[nPrevPnt];
+ aLine3[1]=pID->aXP[nPrevPrevPnt];
+ aLine4[0]=rXP[pID->nPrevPrevPnt0-2];
+ aLine4[1]=rXP[pID->nPrevPrevPnt0-1];
+ } else {
+ aXPoly.Remove(0,1);
+ }
+ } else { // ansonsten bin ich Kontrollpunkt vor der Stuetzstelle
+ aLine1[0]=pID->aXP[nNextPnt];
+ aLine2[0]=pID->aXP[nPrevPrevPnt];
+ aLine2[1]=pID->aXP[nPrevPnt];
+ if (pID->aXP.IsSmooth(nNextPnt) && !bNextIsEndPnt && pID->aXP.IsControl(nNextNextPnt)) {
+ aXPoly.Insert(XPOLY_APPEND,rXP[pID->nNextNextPnt0+1],XPOLY_CONTROL);
+ aXPoly.Insert(XPOLY_APPEND,rXP[pID->nNextNextPnt0+2],XPOLY_NORMAL);
+ // Hebellinien fuer das gegenueberliegende Kurvensegment
+ aLine3[0]=pID->aXP[nNextPnt];
+ aLine3[1]=pID->aXP[nNextNextPnt];
+ aLine4[0]=rXP[pID->nNextNextPnt0+2];
+ aLine4[1]=rXP[pID->nNextNextPnt0+1];
+ } else {
+ aXPoly.Remove(aXPoly.GetPointCount()-1,1);
+ }
+ }
+ } else { // ansonsten kein Kontrollpunkt
+ if (pID->bEliminate) {
+ aXPoly.Remove(2,1);
+ }
+ if (bPrevIsControl) aXPoly.Insert(0,rXP[pID->nPrevPrevPnt0-1],XPOLY_NORMAL);
+ else if (!bBegPnt && !bPrevIsBegPnt && pID->aXP.IsControl(nPrevPrevPnt)) {
+ aXPoly.Insert(0,rXP[pID->nPrevPrevPnt0-1],XPOLY_CONTROL);
+ aXPoly.Insert(0,rXP[pID->nPrevPrevPnt0-2],XPOLY_NORMAL);
+ } else {
+ aXPoly.Remove(0,1);
+ if (bBegPnt) aXPoly.Remove(0,1);
+ }
+ if (bNextIsControl) aXPoly.Insert(XPOLY_APPEND,rXP[pID->nNextNextPnt0+1],XPOLY_NORMAL);
+ else if (!bEndPnt && !bNextIsEndPnt && pID->aXP.IsControl(nNextNextPnt)) {
+ aXPoly.Insert(XPOLY_APPEND,rXP[pID->nNextNextPnt0+1],XPOLY_CONTROL);
+ aXPoly.Insert(XPOLY_APPEND,rXP[pID->nNextNextPnt0+2],XPOLY_NORMAL);
+ } else {
+ aXPoly.Remove(aXPoly.GetPointCount()-1,1);
+ if (bEndPnt) aXPoly.Remove(aXPoly.GetPointCount()-1,1);
+ }
+ if (bClosed) { // "Birnenproblem": 2 Linien, 1 Kurve, alles Smooth, Punkt zw. beiden Linien wird gedraggt
+ if (aXPoly.GetPointCount()>nPntAnz && aXPoly.IsControl(1)) {
+ USHORT a=aXPoly.GetPointCount();
+ aXPoly[a-2]=aXPoly[2]; aXPoly.SetFlags(a-2,aXPoly.GetFlags(2));
+ aXPoly[a-1]=aXPoly[3]; aXPoly.SetFlags(a-1,aXPoly.GetFlags(3));
+ aXPoly.Remove(0,3);
+ }
+ }
+ }
+ rXPP.Insert(aXPoly);
+ if (aLine1.GetPointCount()>1) rXPP.Insert(aLine1);
+ if (aLine2.GetPointCount()>1) rXPP.Insert(aLine2);
+ if (aLine3.GetPointCount()>1) rXPP.Insert(aLine3);
+ if (aLine4.GetPointCount()>1) rXPP.Insert(aLine4);
+}
+
+FASTBOOL SdrPathObj::BegCreate(SdrDragStat& rStat)
+{
+ FASTBOOL bFreeHand=IsFreeHand();
+ rStat.SetNoSnap(bFreeHand);
+ rStat.SetOrtho8Possible();
+ aPathPolygon.Clear();
+ bCreating=TRUE;
+ FASTBOOL bMakeStartPoint=TRUE;
+ SdrView* pView=rStat.GetView();
+ if (pView!=NULL && pView->IsUseIncompatiblePathCreateInterface() &&
+ (eKind==OBJ_POLY || eKind==OBJ_PLIN || eKind==OBJ_PATHLINE || eKind==OBJ_PATHFILL)) {
+ bMakeStartPoint=FALSE;
+ }
+ aPathPolygon.Insert(XPolygon());
+ aPathPolygon[0][0]=rStat.GetStart();
+ if (bMakeStartPoint) {
+ aPathPolygon[0][1]=rStat.GetNow();
+ }
+ ImpPathCreateUser* pU=new ImpPathCreateUser;
+ pU->eStartKind=eKind;
+ pU->eAktKind=eKind;
+ rStat.SetUser(pU);
+ return TRUE;
+}
+
+FASTBOOL SdrPathObj::MovCreate(SdrDragStat& rStat)
+{
+ ImpPathCreateUser* pU=(ImpPathCreateUser*)rStat.GetUser();
+ SdrView* pView=rStat.GetView();
+ XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1];
+ if (pView!=NULL && pView->IsCreateMode()) {
+ // ggf. auf anderes CreateTool umschalten
+ UINT16 nIdent;
+ UINT32 nInvent;
+ pView->TakeCurrentObj(nIdent,nInvent);
+ if (nInvent==SdrInventor && pU->eAktKind!=(SdrObjKind)nIdent) {
+ SdrObjKind eNewKind=(SdrObjKind)nIdent;
+ switch (eNewKind) {
+ case OBJ_CARC: case OBJ_CIRC: case OBJ_CCUT: case OBJ_SECT: eNewKind=OBJ_CARC;
+ case OBJ_RECT:
+ case OBJ_LINE: case OBJ_PLIN: case OBJ_POLY:
+ case OBJ_PATHLINE: case OBJ_PATHFILL:
+ case OBJ_FREELINE: case OBJ_FREEFILL:
+ case OBJ_SPLNLINE: case OBJ_SPLNFILL: {
+ pU->eAktKind=eNewKind;
+ pU->bMixedCreate=TRUE;
+ pU->nBezierStartPoint=rXPoly.GetPointCount();
+ if (pU->nBezierStartPoint>0) pU->nBezierStartPoint--;
+ } break;
+ } // switch
+ }
+ }
+ USHORT nActPoint=rXPoly.GetPointCount();
+ if (aPathPolygon.Count()>1 && rStat.IsMouseDown() && nActPoint<2) {
+ rXPoly[0]=rStat.GetPos0();
+ rXPoly[1]=rStat.GetNow();
+ nActPoint=2;
+ }
+ if (nActPoint==0) {
+ rXPoly[0]=rStat.GetPos0();
+ } else nActPoint--;
+ FASTBOOL bFreeHand=IsFreeHand(pU->eAktKind);
+ rStat.SetNoSnap(bFreeHand /*|| (pU->bMixed && pU->eAktKind==OBJ_LINE)*/);
+ rStat.SetOrtho8Possible(pU->eAktKind!=OBJ_CARC && pU->eAktKind!=OBJ_RECT && (!pU->bMixedCreate || pU->eAktKind!=OBJ_LINE));
+ Point aActMerk(rXPoly[nActPoint]);
+ rXPoly[nActPoint]=rStat.Now();
+ if (!pU->bMixedCreate && pU->eStartKind==OBJ_LINE && rXPoly.GetPointCount()>=1) {
+ Point aPt(rStat.Start());
+ if (pView!=NULL && pView->IsCreate1stPointAsCenter()) {
+ aPt+=aPt;
+ aPt-=rStat.Now();
+ }
+ rXPoly[0]=aPt;
+ }
+ OutputDevice* pOut=pView==NULL ? NULL : pView->GetWin(0);
+ if (bFreeHand) {
+ if (pU->nBezierStartPoint>nActPoint) pU->nBezierStartPoint=nActPoint;
+ if (rStat.IsMouseDown() && nActPoint>0) {
+ // keine aufeinanderfolgenden Punkte an zu Nahe gelegenen Positionen zulassen
+ long nMinDist=1;
+ if (pView!=NULL) nMinDist=pView->GetFreeHandMinDistPix();
+ if (pOut!=NULL) nMinDist=pOut->PixelToLogic(Size(nMinDist,0)).Width();
+ if (nMinDist<1) nMinDist=1;
+
+ Point aPt0(rXPoly[nActPoint-1]);
+ Point aPt1(rStat.Now());
+ long dx=aPt0.X()-aPt1.X(); if (dx<0) dx=-dx;
+ long dy=aPt0.Y()-aPt1.Y(); if (dy<0) dy=-dy;
+ if (dx<nMinDist && dy<nMinDist) return FALSE;
+
+ // folgendes ist aus EndCreate kopiert (nur kleine Modifikationen)
+ // und sollte dann mal in eine Methode zusammengefasst werden:
+
+ if (nActPoint-pU->nBezierStartPoint>=3 && ((nActPoint-pU->nBezierStartPoint)%3)==0) {
+ rXPoly.PointsToBezier(nActPoint-3);
+ rXPoly.SetFlags(nActPoint-1,XPOLY_CONTROL);
+ rXPoly.SetFlags(nActPoint-2,XPOLY_CONTROL);
+
+ if (nActPoint>=6 && rXPoly.IsControl(nActPoint-4)) {
+ rXPoly.CalcTangent(nActPoint-3,nActPoint-4,nActPoint-2);
+ rXPoly.SetFlags(nActPoint-3,XPOLY_SMOOTH);
+ }
+ }
+ rXPoly[nActPoint+1]=rStat.Now();
+ rStat.NextPoint();
+ } else {
+ pU->nBezierStartPoint=nActPoint;
+ }
+ }
+
+ pU->ResetFormFlags();
+ if (IsBezier(pU->eAktKind)) {
+ if (nActPoint>=2) {
+ pU->CalcBezier(rXPoly[nActPoint-1],rXPoly[nActPoint],rXPoly[nActPoint-1]-rXPoly[nActPoint-2],rStat.IsMouseDown(),pView);
+ } else if (pU->bBezHasCtrl0) {
+ pU->CalcBezier(rXPoly[nActPoint-1],rXPoly[nActPoint],pU->aBezControl0-rXPoly[nActPoint-1],rStat.IsMouseDown(),pView);
+ }
+ }
+ if (pU->eAktKind==OBJ_CARC && nActPoint>=2) {
+ pU->CalcCircle(rXPoly[nActPoint-1],rXPoly[nActPoint],rXPoly[nActPoint-1]-rXPoly[nActPoint-2],pView);
+ }
+ if (pU->eAktKind==OBJ_LINE && nActPoint>=2) {
+ pU->CalcLine(rXPoly[nActPoint-1],rXPoly[nActPoint],rXPoly[nActPoint-1]-rXPoly[nActPoint-2],pView);
+ }
+ if (pU->eAktKind==OBJ_RECT && nActPoint>=2) {
+ pU->CalcRect(rXPoly[nActPoint-1],rXPoly[nActPoint],rXPoly[nActPoint-1]-rXPoly[nActPoint-2],pView);
+ }
+
+ bBoundRectDirty=TRUE;
+ bSnapRectDirty=TRUE;
+ ImpForceKind();
+ if (pU->eStartKind!=OBJ_LINE) { aGeo.nDrehWink=0; aGeo.RecalcSinCos(); }
+ //ImpForceLineWink();
+ return TRUE;
+}
+
+FASTBOOL SdrPathObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+{
+ ImpPathCreateUser* pU=(ImpPathCreateUser*)rStat.GetUser();
+ FASTBOOL bRet=FALSE;
+ SdrView* pView=rStat.GetView();
+ FASTBOOL bIncomp=pView!=NULL && pView->IsUseIncompatiblePathCreateInterface();
+ XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1];
+ USHORT nActPoint=rXPoly.GetPointCount()-1;
+ Point aAktMerk(rXPoly[nActPoint]);
+ rXPoly[nActPoint]=rStat.Now();
+ if (!pU->bMixedCreate && pU->eStartKind==OBJ_LINE) {
+ if (rStat.GetPointAnz()>=2) eCmd=SDRCREATE_FORCEEND;
+ bRet=eCmd==SDRCREATE_FORCEEND;
+ if (bRet) {
+ bCreating=FALSE;
+ delete pU;
+ rStat.SetUser(NULL);
+ }
+ ImpForceKind();
+ return bRet;
+ }
+
+ OutputDevice* pOut=pView==NULL ? NULL : pView->GetWin(0);
+ long nCloseDist=0;
+ FASTBOOL bCloseOnEnd=FALSE;
+ if (pView!=NULL && pOut!=NULL && pView->IsAutoClosePolys() && !bIncomp) {
+ nCloseDist=pView->GetAutoCloseDistPix();
+ nCloseDist=pOut->PixelToLogic(Size(nCloseDist,0)).Width();
+ if (nCloseDist<1) nCloseDist=1;
+ Point aPt0(rStat.GetStart());
+ Point aPt1(rStat.GetNow());
+ long dx=aPt0.X()-aPt1.X(); if (dx<0) dx=-dx;
+ long dy=aPt0.Y()-aPt1.Y(); if (dy<0) dy=-dy;
+ bCloseOnEnd=dx<=nCloseDist && dy<=nCloseDist;
+ }
+
+ if (!pU->bMixedCreate && IsFreeHand(pU->eStartKind)) {
+ if (rStat.GetPointAnz()>=2) eCmd=SDRCREATE_FORCEEND;
+ if (eCmd==SDRCREATE_FORCEEND && (bCloseOnEnd || IsClosed())) {
+ ImpSetClosed(TRUE);
+ }
+ bRet=eCmd==SDRCREATE_FORCEEND;
+ if (bRet) {
+ bCreating=FALSE;
+ delete pU;
+ rStat.SetUser(NULL);
+ }
+ ImpForceKind();
+ aGeo.nDrehWink=0; aGeo.RecalcSinCos();
+ return bRet;
+ }
+ if (eCmd==SDRCREATE_NEXTPOINT || eCmd==SDRCREATE_NEXTOBJECT) {
+ // keine aufeinanderfolgenden Punkte an identischer Position zulassen
+ if (nActPoint==0 || rStat.Now()!=rXPoly[nActPoint-1]) {
+ if (bIncomp) {
+ if (pU->nBezierStartPoint>nActPoint) pU->nBezierStartPoint=nActPoint;
+ if (IsBezier(pU->eAktKind) && nActPoint-pU->nBezierStartPoint>=3 && ((nActPoint-pU->nBezierStartPoint)%3)==0) {
+ rXPoly.PointsToBezier(nActPoint-3);
+ rXPoly.SetFlags(nActPoint-1,XPOLY_CONTROL);
+ rXPoly.SetFlags(nActPoint-2,XPOLY_CONTROL);
+
+ if (nActPoint>=6 && rXPoly.IsControl(nActPoint-4)) {
+ rXPoly.CalcTangent(nActPoint-3,nActPoint-4,nActPoint-2);
+ rXPoly.SetFlags(nActPoint-3,XPOLY_SMOOTH);
+ }
+ }
+ } else {
+ if (nActPoint==1 && IsBezier(pU->eAktKind) && !pU->bBezHasCtrl0) {
+ pU->aBezControl0=rStat.GetNow();;
+ pU->bBezHasCtrl0=TRUE;
+ nActPoint--;
+ }
+ if (pU->IsFormFlag()) {
+ USHORT nPtAnz0=rXPoly.GetPointCount();
+ rXPoly.Remove(nActPoint-1,2); // die letzten beiden Punkte entfernen und durch die Form ersetzen
+ rXPoly.Insert(XPOLY_APPEND,pU->GetFormPoly());
+ USHORT nPtAnz1=rXPoly.GetPointCount();
+ for (USHORT i=nPtAnz0+1; i<nPtAnz1-1; i++) { // Damit BckAction richtig funktioniert
+ if (!rXPoly.IsControl(i)) rStat.NextPoint();
+ }
+ nActPoint=rXPoly.GetPointCount()-1;
+ }
+ }
+ nActPoint++;
+ rXPoly[nActPoint]=rStat.GetNow();
+ }
+ if (eCmd==SDRCREATE_NEXTOBJECT) {
+ if (rXPoly.GetPointCount()>=2) {
+ pU->bBezHasCtrl0=FALSE;
+ // nur einzelnes Polygon kann offen sein, deshalb schliessen
+ rXPoly[nActPoint]=rXPoly[0];
+ ImpSetClosed(TRUE);
+ XPolygon aXP;
+ aXP[0]=rStat.GetNow();
+ aPathPolygon.Insert(aXP);
+ }
+ }
+ }
+
+ USHORT nPolyAnz=aPathPolygon.Count();
+ if (nPolyAnz!=0) {
+ // den letzten Punkt ggf. wieder loeschen
+ if (eCmd==SDRCREATE_FORCEEND) {
+ XPolygon& rXP=aPathPolygon[nPolyAnz-1];
+ USHORT nPtAnz=rXP.GetPointCount();
+ if (nPtAnz>=2) {
+ if (!rXP.IsControl(nPtAnz-2)) {
+ if (rXP[nPtAnz-1]==rXP[nPtAnz-2]) {
+ rXP.Remove(nPtAnz-1,1);
+ }
+ } else {
+ if (rXP[nPtAnz-3]==rXP[nPtAnz-2]) {
+ rXP.Remove(nPtAnz-3,3);
+ }
+ }
+ }
+ }
+ for (USHORT nPolyNum=nPolyAnz; nPolyNum>0;) {
+ nPolyNum--;
+ XPolygon& rXP=aPathPolygon[nPolyNum];
+ USHORT nPtAnz=rXP.GetPointCount();
+ // Polygone mit zu wenig Punkten werden geloescht
+ if (nPolyNum<nPolyAnz-1 || eCmd==SDRCREATE_FORCEEND) {
+ if (nPtAnz<2) aPathPolygon.Remove(nPolyNum);
+ }
+ }
+ }
+ pU->ResetFormFlags();
+ bRet=eCmd==SDRCREATE_FORCEEND;
+ if (bRet) {
+ bCreating=FALSE;
+ delete pU;
+ rStat.SetUser(NULL);
+ aRect=aPathPolygon.GetBoundRect(); // fuer SdrTextObj
+ if (bCloseOnEnd || IsClosed()) ImpSetClosed(TRUE);
+ ImpForceKind();
+ SetRectsDirty();
+ }
+ return bRet;
+}
+
+FASTBOOL SdrPathObj::BckCreate(SdrDragStat& rStat)
+{
+ ImpPathCreateUser* pU=(ImpPathCreateUser*)rStat.GetUser();
+ if (aPathPolygon.Count()>0) {
+ XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1];
+ USHORT nActPoint=rXPoly.GetPointCount();
+ if (nActPoint>0) {
+ nActPoint--;
+ // Das letzte Stueck einer Bezierkurve wird erstmal zu 'ner Linie
+ rXPoly.Remove(nActPoint,1);
+ if (nActPoint>=3 && rXPoly.IsControl(nActPoint-1)) {
+ // Beziersegment am Ende sollte zwar nicht vorkommen, aber falls doch ...
+ rXPoly.Remove(nActPoint-1,1);
+ if (rXPoly.IsControl(nActPoint-2)) rXPoly.Remove(nActPoint-2,1);
+ }
+ }
+ nActPoint=rXPoly.GetPointCount();
+ if (nActPoint>=4) { // Kein Beziersegment am Ende
+ nActPoint--;
+ if (rXPoly.IsControl(nActPoint-1)) {
+ rXPoly.Remove(nActPoint-1,1);
+ if (rXPoly.IsControl(nActPoint-2)) rXPoly.Remove(nActPoint-2,1);
+ }
+ }
+ if (rXPoly.GetPointCount()<2) {
+ aPathPolygon.Remove(aPathPolygon.Count()-1);
+ }
+ if (aPathPolygon.Count()>0) {
+ XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1];
+ USHORT nActPoint=rXPoly.GetPointCount();
+ if (nActPoint>0) {
+ nActPoint--;
+ rXPoly[nActPoint]=rStat.Now();
+ }
+ }
+ }
+ pU->ResetFormFlags();
+ return aPathPolygon.Count()!=0;
+}
+
+void SdrPathObj::BrkCreate(SdrDragStat& rStat)
+{
+ ImpPathCreateUser* pU=(ImpPathCreateUser*)rStat.GetUser();
+ aPathPolygon.Clear();
+ bCreating=FALSE;
+ delete pU;
+ rStat.SetUser(NULL);
+}
+
+void SdrPathObj::TakeCreatePoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rXPP=aPathPolygon;
+ SdrView* pView=rDrag.GetView();
+ if (pView!=NULL && pView->IsUseIncompatiblePathCreateInterface()) return;
+
+ ImpPathCreateUser* pU=(ImpPathCreateUser*)rDrag.GetUser();
+ XPolygon& rXP=rXPP[rXPP.Count()-1];
+ USHORT nPtAnz=rXP.GetPointCount();
+ if (pU->IsFormFlag()) { // Letztes Polylinesegment entfernen und durch Form ersetzen
+ rXP.Remove(nPtAnz-2,2);
+ nPtAnz=rXP.GetPointCount();
+ rXP.Insert(nPtAnz,pU->GetFormPoly());
+ }
+ if (pU->bBezier && rDrag.IsMouseDown()) { // Dragging des Hebels
+ // Den Hebel etwas gestrichelt darstellen:
+ // erst -- -- -- -- -- -- -- und das letzte 1/4 frei
+ // -> 1/25 Raster
+ XPolygon aXP(2);
+ Point aP1(pU->aBezCtrl2);
+ Point aP2(pU->aBezEnd);
+ long dx=aP2.X()-aP1.X();
+ long dy=aP2.Y()-aP1.Y();
+ for (long i=0; i<7; i++) {
+ aXP[0].X()=aP1.X()+(i*3)*dx/25;
+ aXP[0].Y()=aP1.Y()+(i*3)*dy/25;
+ aXP[1].X()=aP1.X()+(2+i*3)*dx/25;
+ aXP[1].Y()=aP1.Y()+(2+i*3)*dy/25;
+ rXPP.Insert(aXP);
+ }
+ }
+}
+
+Pointer SdrPathObj::GetCreatePointer() const
+{
+ switch (eKind) {
+ case OBJ_LINE : return Pointer(POINTER_DRAW_LINE);
+ case OBJ_POLY : return Pointer(POINTER_DRAW_POLYGON);
+ case OBJ_PLIN : return Pointer(POINTER_DRAW_POLYGON);
+ case OBJ_PATHLINE: return Pointer(POINTER_DRAW_BEZIER);
+ case OBJ_PATHFILL: return Pointer(POINTER_DRAW_BEZIER);
+ case OBJ_FREELINE: return Pointer(POINTER_DRAW_FREEHAND);
+ case OBJ_FREEFILL: return Pointer(POINTER_DRAW_FREEHAND);
+ case OBJ_SPLNLINE: return Pointer(POINTER_DRAW_FREEHAND);
+ case OBJ_SPLNFILL: return Pointer(POINTER_DRAW_FREEHAND);
+ case OBJ_PATHPOLY: return Pointer(POINTER_DRAW_POLYGON);
+ case OBJ_PATHPLIN: return Pointer(POINTER_DRAW_POLYGON);
+ } // switch
+ return Pointer(POINTER_CROSS);
+}
+
+void SdrPathObj::NbcMove(const Size& rSiz)
+{
+ SdrTextObj::NbcMove(rSiz);
+ MoveXPoly(aPathPolygon,rSiz);
+}
+
+void SdrPathObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ SdrTextObj::NbcResize(rRef,xFact,yFact);
+ ResizeXPoly(aPathPolygon,rRef,xFact,yFact);
+}
+
+void SdrPathObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ SdrTextObj::NbcRotate(rRef,nWink,sn,cs);
+ RotateXPoly(aPathPolygon,rRef,sn,cs);
+}
+
+void SdrPathObj::NbcShear(const Point& rRefPnt, long nAngle, double fTan, FASTBOOL bVShear)
+{
+ SdrTextObj::NbcShear(rRefPnt,nAngle,fTan,bVShear);
+ ShearXPoly(aPathPolygon,rRefPnt,fTan,bVShear);
+}
+
+void SdrPathObj::NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2)
+{
+ SdrTextObj::NbcMirror(rRefPnt1,rRefPnt2);
+ MirrorXPoly(aPathPolygon,rRefPnt1,rRefPnt2);
+}
+
+void SdrPathObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+{
+ if (aGeo.nDrehWink==0) {
+ rRect=GetSnapRect();
+ } else {
+ XPolyPolygon aXPP(aPathPolygon);
+ RotateXPoly(aXPP,Point(),-aGeo.nSin,aGeo.nCos);
+ rRect=aXPP.GetBoundRect();
+ Point aTmp(rRect.TopLeft());
+ RotatePoint(aTmp,Point(),aGeo.nSin,aGeo.nCos);
+ aTmp-=rRect.TopLeft();
+ rRect.Move(aTmp.X(),aTmp.Y());
+ }
+}
+
+void SdrPathObj::RecalcSnapRect()
+{
+ aSnapRect=aPathPolygon.GetBoundRect();
+}
+
+void SdrPathObj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ Rectangle aOld(GetSnapRect());
+ long nMulX = rRect.Right() - rRect.Left();
+ long nDivX = aOld.Right() - aOld.Left();
+ long nMulY = rRect.Bottom() - rRect.Top();
+ long nDivY = aOld.Bottom() - aOld.Top();
+ if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
+ if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
+ Fraction aX(nMulX,nDivX);
+ Fraction aY(nMulY,nDivY);
+ NbcResize(aOld.TopLeft(), aX, aY);
+ NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
+}
+
+USHORT SdrPathObj::GetSnapPointCount() const
+{
+ return GetHdlCount();
+}
+
+Point SdrPathObj::GetSnapPoint(USHORT nSnapPnt) const
+{
+ USHORT nPoly,nPnt;
+ if (!FindPolyPnt(nSnapPnt,nPoly,nPnt,FALSE)) {
+ DBG_ASSERT(FALSE,"SdrPathObj::GetSnapPoint: Punkt nSnapPnt nicht vorhanden!");
+ }
+ return Point( aPathPolygon[nPoly][nPnt] );
+}
+
+FASTBOOL SdrPathObj::IsPolyObj() const
+{
+ return TRUE;
+}
+
+USHORT SdrPathObj::GetPointCount() const
+{
+ USHORT nPolyCnt = aPathPolygon.Count();
+ USHORT nPntCnt = 0;
+
+ for (USHORT i = 0; i < nPolyCnt; i++)
+ nPntCnt += aPathPolygon[i].GetPointCount();
+
+ return nPntCnt;
+}
+
+const Point& SdrPathObj::GetPoint(USHORT nHdlNum) const
+{
+ USHORT nPoly,nPnt;
+ FindPolyPnt(nHdlNum,nPoly,nPnt,FALSE);
+ return aPathPolygon[nPoly][nPnt];
+}
+
+void SdrPathObj::NbcSetPoint(const Point& rPnt, USHORT nHdlNum)
+{
+ USHORT nPoly,nPnt;
+
+ if (FindPolyPnt(nHdlNum,nPoly,nPnt,FALSE)) {
+ XPolygon& rXP=aPathPolygon[nPoly];
+ rXP[nPnt]=rPnt;
+ if (IsClosed() && nPnt==0) rXP[rXP.GetPointCount()-1]=rXP[0];
+ if (eKind==OBJ_LINE) ImpForceLineWink();
+ SetRectsDirty();
+ }
+}
+
+/*************************************************************************/
+// Abstand des Punktes Pt zur Strecke AB. Hat der Punkt Pt keine Senkrechte
+// zur Strecke AB, so ist der Abstand zum naechstliegenden Punkt verwendet;
+// dazu wird nocheinmal der einfache Abstand parallel zu AB draufaddiert
+// (als Winkelersatz) (=> groesserer Abstand=unguenstigerer Winkel).
+
+BigInt GetLineQDist(Point aPt, Point aA, Point aB)
+{
+ aPt-=aA; // Nullpunkt zum Linienanfang verschieben
+ aB-=aA;
+ aA=Point(0,0);
+ // Nun auf eine waagerechte Strecke transformieren
+ // Ergebnis: aA Ã-------´ aB
+ long nWink=GetAngle(aB);
+ double nSin=sin(nWink*nPi180);
+ double nCos=cos(nWink*nPi180);
+ RotatePoint(aPt,aA,-nSin,nCos);
+ RotatePoint(aB,aA,-nSin,nCos);
+ //
+ if (aPt.X()>=aA.X() && aPt.X()<=aB.X()) { // Hat Pt eine Senkrechte auf AB?
+ BigInt nRet=aPt.Y();
+ return nRet*nRet;
+ }
+ if (aPt.X()<aA.X()) { // Pt liegt links der Strecke
+ BigInt nDX=aA.X()-aPt.X();
+ BigInt nDY=aA.Y()-aPt.Y();
+ return nDX*nDX+nDY*nDY+nDX; // Den horizontalen Abstand nochmal als Winkelersatz dazu
+ }
+ // Pt liegt rechts der Strecke
+ BigInt nDX=aPt.X()-aB.X();
+ BigInt nDY=aPt.Y()-aB.Y();
+ return nDX*nDX+nDY*nDY+nDX; // Den horizontalen Abstand nochmal als Winkelersatz dazu
+}
+
+BigInt GetQDist(const Point& rP1, const Point& rP2)
+{
+ BigInt nDX(rP2.X()-rP1.X());
+ BigInt nDY(rP2.Y()-rP1.Y());
+ return nDX*nDX+nDY*nDY;
+}
+
+USHORT SdrPathObj::NbcInsPoint(const Point& rPos, FASTBOOL bNewObj, FASTBOOL bHideHim,
+ FASTBOOL& rInsNextAfter)
+{
+ USHORT nNewHdl;
+
+ if (bNewObj) {
+ rInsNextAfter=TRUE;
+ nNewHdl=NbcInsPoint(0,rPos,FALSE,bNewObj,bHideHim);
+ } else {
+ VirtualDevice aVDev;
+ Polygon aPoly, aStart(2), aEnd(2);
+ Point aBestPnt[2];
+ BigInt nBestDst(0x7FFFFFFF);
+ USHORT nBestPoly = 0;
+ USHORT nBestPnt = 0xFFFF;
+ USHORT nPolyCnt = aPathPolygon.Count();
+ USHORT nPoly;
+ USHORT nPnt;
+ USHORT nPntMax;
+ FASTBOOL bAppend = FALSE;
+ FASTBOOL bTestEnd = FALSE;
+
+ MapMode aMap = aVDev.GetMapMode();
+ aMap.SetMapUnit(pModel->GetScaleUnit());
+ aMap.SetScaleX(pModel->GetScaleFraction());
+ aMap.SetScaleY(pModel->GetScaleFraction());
+ aVDev.SetMapMode(aMap);
+
+ for (nPoly = 0; nPoly < nPolyCnt; nPoly++)
+ {
+ XPolygon aXPolyPart(4);
+ XPolygon& rXPoly = aPathPolygon[nPoly];
+ nPnt=0;
+
+ nPntMax=rXPoly.GetPointCount();
+ if (nPntMax>0) {
+ nPntMax--;
+
+ while (nPnt<nPntMax) {
+ USHORT nNextPartPos;
+
+ if (rXPoly.IsControl(nPnt+1)) {
+ lcl_CopyBezier(rXPoly,nPnt,aXPolyPart,0);
+ aPoly=XOutCreatePolygon(aXPolyPart,&aVDev);
+ nNextPartPos=3;
+ } else {
+ aPoly = Polygon(2);
+ aPoly[0] = rXPoly[nPnt];
+ aPoly[1] = rXPoly[nPnt+1];
+ nNextPartPos = 1;
+ }
+ USHORT nPartMax=aPoly.GetSize()-1;
+
+ for (USHORT i=0; i<nPartMax; i++) {
+ BigInt nDist(GetLineQDist(rPos, aPoly[i], aPoly[i+1]));
+
+ if (nDist<nBestDst) {
+ nBestDst =nDist;
+ nBestPoly=nPoly;
+ nBestPnt =nPnt;
+ aBestPnt[0]=rXPoly[nPnt];
+ aBestPnt[1]=rXPoly[nPnt+1];
+ if (nPnt+nNextPartPos>=nPntMax)
+ bTestEnd=TRUE;
+ }
+ }
+ // Start und Endlinien sichern fuer nachfolgenden Test
+ if (nPnt==0) {
+ aStart[0]=aPoly[0];
+ aStart[1]=aPoly[1];
+ }
+ nPnt+=nNextPartPos;
+
+ if (nPnt>=nPartMax) {
+ aEnd[1]=aPoly[nPartMax-1];
+ aEnd[0]=aPoly[nPartMax];
+ }
+ }
+ }
+ }
+ // und nun noch fuer Linienanfang und -ende
+ if ( !IsClosed() )
+ {
+ if ( nBestPnt == 0 )
+ {
+ aStart[1] = aStart[1] - aStart[0];
+ aStart[0] = rPos - aStart[0];
+ // Skalarprodukt fuer Winkelbestimmung
+ long nDotProd = aStart[0].X() * aStart[1].X() +
+ aStart[0].Y() * aStart[1].Y();
+ // Cosinus des Winkels <= 0? neue Linie am Anfang
+ if ( nDotProd <= 0 )
+ {
+ nBestPnt = 0;
+ bAppend = TRUE;
+ }
+ }
+ if ( bTestEnd )
+ {
+ aEnd[1] = aEnd[1] - aEnd[0];
+ aEnd[0] = rPos - aEnd[0];
+ // Skalarprodukt fuer Winkelbestimmung
+ long nDotProd = aEnd[0].X() * aEnd[1].X() +
+ aEnd[0].Y() * aEnd[1].Y();
+ // Cosinus des Winkels <= 0? neue Linie am Ende
+ if (nDotProd<=0 && (!bAppend || GetQDist(rPos,aEnd[1])<GetQDist(rPos,aStart[0]))) {
+ nBestPnt=nPntMax;
+ bAppend=TRUE;
+ }
+ }
+ }
+ USHORT nIdx = 0;
+ nPnt = 1;
+
+ // Handle-Nummer aus Punktindex berechnen
+ for (nPoly = 0; nPoly <= nBestPoly; nPoly++)
+ {
+ /*const*/ XPolygon& rXPoly = aPathPolygon[nPoly];
+ long nMax = rXPoly.GetPointCount() - 1;
+
+ if ( nPoly == nBestPoly ) nMax = nBestPnt;
+ else if ( IsClosed() ) nMax -= 1;
+
+ while ( (long) nPnt <= nMax )
+ if ( ! rXPoly.IsControl(nPnt++) )
+ nIdx += 1;
+ nPnt = 0;
+ }
+ // berechnen, wo die naechsten Punkte eingefuegt werden sollen
+ if (bAppend) {
+ rInsNextAfter=(nBestPnt==nPntMax);
+ } else {
+ rInsNextAfter=GetQDist(rPos,aBestPnt[0]) < GetQDist(rPos,aBestPnt[1]);
+ }
+ nNewHdl=NbcInsPoint(nIdx,rPos,(!bAppend || nBestPnt==nPntMax),bNewObj,bHideHim);
+ }
+ ImpForceKind();
+ return nNewHdl;
+}
+
+USHORT SdrPathObj::NbcInsPoint(USHORT nHdl, const Point& rPos, FASTBOOL bInsAfter,
+ FASTBOOL bNewObj, FASTBOOL bHideHim)
+{
+ USHORT nHdlCnt=GetHdlCount();
+ USHORT nNewHdl;
+ Point aPnt(rPos);
+
+ if (bNewObj) {
+ XPolygon aNewPoly(SVDOPATH_INITSIZE,SVDOPATH_RESIZE);
+ aNewPoly[0]=aPnt;
+ aNewPoly[1]=aPnt;
+ aNewPoly[2]=aPnt;
+ aPathPolygon.Insert(aNewPoly);
+ if (!IsClosed() && aPathPolygon.Count()>1) {
+ ImpSetClosed(TRUE);
+ }
+ SetRectsDirty();
+ nNewHdl=nHdlCnt;
+ } else {
+ if (nHdl>nHdlCnt) {
+ nHdl=nHdlCnt;
+ }
+
+ USHORT nPoly, nPnt;
+ if (!FindPolyPnt(nHdl,nPoly,nPnt,FALSE)) {
+ DBG_ASSERT(FALSE,"SdrPathObj::NbcInsPoint() ungueltiger Index.");
+ return 0xFFFF;
+ }
+ // Einfuegen des Punktes in das Polygon...
+ XPolygon& rXPoly=aPathPolygon[nPoly];
+ if (bHideHim && rXPoly.GetPointCount()!=0) {
+ aPnt=rXPoly[nPnt];
+ }
+ USHORT nPntCnt=rXPoly.GetPointCount();
+ nNewHdl=nHdl;
+ // ggf. dahinter einfuegen
+ if (bInsAfter) {
+ nPnt++;
+ if (nPnt<nPntCnt && rXPoly.IsControl(nPnt))
+ nPnt+=2;
+ nNewHdl++;
+ }
+ if (nPnt>0 && rXPoly.IsControl(nPnt-1)) {
+ Point aDiff;
+ USHORT nInsPos=nPnt-1;
+
+ aDiff=(rXPoly[nPnt]-rPos) /3;
+ rXPoly.Insert(nInsPos,rPos+aDiff,XPOLY_CONTROL);
+ rXPoly.Insert(nInsPos,rPos,XPOLY_SMOOTH);
+ aDiff=(rXPoly[nPnt-3]-rPos) /3;
+ rXPoly.Insert(nInsPos,rPos+aDiff,XPOLY_CONTROL);
+
+ rXPoly.CalcTangent(nInsPos+1,nInsPos,nInsPos+2);
+ } else {
+ rXPoly.Insert(nPnt,aPnt,XPOLY_NORMAL);
+ }
+ }
+ ImpForceKind();
+ return nNewHdl;
+}
+
+FASTBOOL SdrPathObj::NbcDelPoint(USHORT nHdlNum)
+{
+ USHORT nPoly,nPnt;
+
+ if (FindPolyPnt(nHdlNum,nPoly,nPnt,FALSE)) {
+ XPolygon& rXPoly=aPathPolygon[nPoly];
+ FASTBOOL bClosed=IsClosed();
+
+ if (rXPoly.GetPointCount()>1) {
+ USHORT nPntMax=USHORT(rXPoly.GetPointCount()-1);
+ FASTBOOL bFrst=nPnt==0;
+ FASTBOOL bLast=nPnt==nPntMax;
+ FASTBOOL bPrevIsBez=!bFrst && rXPoly.IsControl(USHORT(nPnt-1));
+ FASTBOOL bNextIsBez=!bLast && rXPoly.IsControl(nPnt+1);
+ if (bClosed && bFrst) bPrevIsBez=rXPoly.IsControl(USHORT(nPntMax-1));
+ if (bClosed && bLast) bNextIsBez=rXPoly.IsControl(1);
+ USHORT nDelOfs=nPnt;
+ USHORT nDelAnz=0;
+
+ if (bPrevIsBez && bNextIsBez) { // Bezierpunkt mittendrin
+ if (bFrst || bLast) { // Bezierflaeche 1. Punkt
+ nDelAnz=3;
+ rXPoly[nPntMax-1]=rXPoly[2];
+ } else { // Bezierflaeche oder -linie mittendrin
+ nDelOfs--;
+ nDelAnz=3;
+ }
+ } else if (!bPrevIsBez && !bNextIsBez) { // Polygonpunkt oder Polylinepunkt (inkl. Anfangs-/Endpunkt)
+ nDelAnz=1;
+ } else if (!bClosed && bFrst && bNextIsBez) {
+ nDelAnz=3; // Bezierpunkt am Anfang der Bezierlinie
+ } else if (bClosed && bLast && bPrevIsBez) {
+ nDelOfs-=2; // Bezierpunkt am Ende der Bezierlinie
+ nDelAnz=3;
+ } else if (bPrevIsBez && !bNextIsBez) {
+ if (bFrst) {
+ nDelAnz=1; // Uebergang Kurve nach Linie
+ rXPoly.Remove(USHORT(nPntMax-2),2);
+ } else {
+ nDelAnz=3; // Uebergang Kurve nach Linie
+ nDelOfs-=2;
+ }
+ } else if (!bPrevIsBez && bNextIsBez) {
+ nDelAnz=3; // Uebergang Kurve nach Linie
+#ifdef DBG_UTIL
+ } else {
+ ByteString aStr("SdrPathObj::NbcDelPoint(USHORT(");
+ aStr += nHdlNum;
+ aStr += ")): Unerlaubt im else-Zweig";
+ DBG_ERROR(aStr.GetBuffer());
+#endif
+ }
+ if (nDelAnz!=0) rXPoly.Remove(nDelOfs,nDelAnz);
+ if (bClosed) { // letzten Punkt auf den Ersten setzen
+ USHORT nPntMax=rXPoly.GetPointCount();
+ if (nPntMax>0) {
+ nPntMax--;
+ rXPoly[nPntMax]=rXPoly[0];
+ rXPoly.SetFlags(nPntMax,rXPoly.GetFlags(0));
+ }
+ }
+ }
+ if ((bClosed && rXPoly.GetPointCount()<3) || rXPoly.GetPointCount()<2) {
+ aPathPolygon.Remove(nPoly);
+ }
+ SetRectsDirty();
+ }
+ ImpForceKind();
+ return (aPathPolygon.Count()>0);
+}
+
+SdrObject* SdrPathObj::NbcRipPoint(USHORT nHdlNum, USHORT& rNewPt0Index)
+{
+ SdrPathObj* pNewObj=NULL;
+ USHORT nPoly,nPnt;
+
+ if (FindPolyPnt(nHdlNum,nPoly,nPnt,FALSE)) {
+ if (nPoly>0) return NULL;
+
+ const XPolygon& rXPoly=aPathPolygon.GetObject(nPoly);
+ USHORT nPntAnz=rXPoly.GetPointCount();
+ if (nPntAnz<=1) return NULL;
+ USHORT nPntMax=USHORT(nPntAnz-1);
+
+ if (IsClosed() && nPntAnz>=1) {
+ XPolygon aNeuP(rXPoly);
+ USHORT nSrcCnt=nPnt;
+ USHORT nIdxCnt=0;
+ for (USHORT i=0; i<nPntMax; i++) {
+ if (nSrcCnt==0) rNewPt0Index=nIdxCnt; // Mitteilung an den Aufrufer: PtArray ist verschoben
+ aNeuP[i]=rXPoly[nSrcCnt];
+ aNeuP.SetFlags(i,rXPoly.GetFlags(nSrcCnt));
+ nSrcCnt++;
+ if (nSrcCnt>=nPntMax) nSrcCnt=0;
+ if (!rXPoly.IsControl(i)) nIdxCnt++;
+ }
+ aNeuP[nPntMax]=aNeuP[0];
+ aNeuP.SetFlags(nPntMax,aNeuP.GetFlags(0));
+ aPathPolygon.Replace(aNeuP,nPoly);
+ ImpSetClosed(FALSE);
+ } else if (nPntMax>=2 && nPnt>0 && nPnt<nPntMax) {
+ // Aus offener PolyLine zwei PolyLines erzeugen
+ pNewObj=(SdrPathObj*)Clone();
+ aPathPolygon[0].Remove(nPnt+1,nPntMax-nPnt);
+ SetRectsDirty();
+ (pNewObj->aPathPolygon)[0].Remove(0,nPnt);
+ pNewObj->SetRectsDirty();
+ }
+ }
+ ImpForceKind();
+ return pNewObj;
+}
+
+void SdrPathObj::NbcShut()
+{
+}
+
+SdrObject* SdrPathObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ SdrObject* pRet = ImpConvertMakeObj(aPathPolygon, IsClosed(), bBezier);
+ SdrPathObj* pPath = PTR_CAST(SdrPathObj, pRet);
+ if(pPath)
+ pPath->ConvertAllSegments(bBezier ? SDRPATH_CURVE : SDRPATH_LINE);
+ pRet = ImpConvertAddText(pRet, bBezier);
+ return pRet;
+}
+
+SdrObjGeoData* SdrPathObj::NewGeoData() const
+{
+ return new SdrPathObjGeoData;
+}
+
+void SdrPathObj::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ SdrTextObj::SaveGeoData(rGeo);
+ SdrPathObjGeoData& rPGeo = (SdrPathObjGeoData&) rGeo;
+ rPGeo.aPathPolygon=aPathPolygon;
+ rPGeo.eKind=eKind;
+}
+
+void SdrPathObj::RestGeoData(const SdrObjGeoData& rGeo)
+{
+ SdrTextObj::RestGeoData(rGeo);
+ SdrPathObjGeoData& rPGeo=(SdrPathObjGeoData&)rGeo;
+ aPathPolygon=rPGeo.aPathPolygon;
+ eKind=rPGeo.eKind;
+ ImpForceKind(); // damit u.a. bClosed gesetzt wird
+}
+
+void SdrPathObj::WriteData(SvStream& rOut) const
+{
+ SdrTextObj::WriteData(rOut);
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrPathObj");
+#endif
+ {
+ SdrDownCompat aPathCompat(rOut,STREAM_WRITE); // ab V11 eingepackt
+#ifdef DBG_UTIL
+ aPathCompat.SetID("SdrPathObj(PathPolygon)");
+#endif
+ rOut<<aPathPolygon;
+ }
+}
+
+void SdrPathObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ SdrTextObj::ReadData(rHead,rIn);
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrPathObj");
+#endif
+ aPathPolygon.Clear();
+ if (rHead.GetVersion()<=6 && (rHead.nIdentifier==OBJ_LINE || rHead.nIdentifier==OBJ_POLY || rHead.nIdentifier==OBJ_PLIN)) {
+ // SdrPolyObj importieren
+ switch (eKind) {
+ case OBJ_LINE: {
+ Polygon aP(2);
+ rIn>>aP[0];
+ rIn>>aP[1];
+ aPathPolygon=XPolyPolygon(PolyPolygon(aP));
+ } break;
+ case OBJ_PLIN: {
+ Polygon aP;
+ rIn>>aP;
+ aPathPolygon=XPolyPolygon(PolyPolygon(aP));
+ } break;
+ default: {
+ PolyPolygon aPoly;
+ rIn>>aPoly;
+ aPathPolygon=XPolyPolygon(aPoly);
+ // und nun die Polygone ggf. durch einfuegen eines weiteren Punktes schliessen
+ USHORT nPolyAnz=aPathPolygon.Count();
+ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) {
+ const XPolygon& rPoly=aPathPolygon[nPolyNum];
+ USHORT nPointAnz=rPoly.GetPointCount();
+ aPathPolygon[nPolyNum].GetPointCount();
+ if (nPointAnz>=2 && rPoly[0]!=rPoly[USHORT(nPointAnz-1)]) {
+ Point aPt(rPoly[0]);
+ aPathPolygon[nPolyNum][nPointAnz]=aPt;
+ }
+ }
+ }
+ }
+ } else {
+ if (rHead.GetVersion()>=11) { // ab V11 ist das eingepackt
+ SdrDownCompat aPathCompat(rIn,STREAM_READ);
+#ifdef DBG_UTIL
+ aPathCompat.SetID("SdrPathObj(PathPolygon)");
+#endif
+ rIn>>aPathPolygon;
+ } else {
+ rIn>>aPathPolygon;
+ }
+ }
+ ImpForceKind(); // ggf. den richtigen Identifier herstellen.
+}
+
+void SdrPathObj::NbcSetPathPoly(const XPolyPolygon& rPathPoly)
+{
+ aPathPolygon=rPathPoly;
+ ImpForceKind();
+ if (IsClosed()) {
+ USHORT nPolyAnz=aPathPolygon.Count();
+ for (USHORT nPolyNum=nPolyAnz; nPolyNum>0;) {
+ nPolyNum--;
+ const XPolygon& rConstXP=aPathPolygon[nPolyNum];
+ USHORT nPointAnz=rConstXP.GetPointCount();
+ if (nPointAnz!=0) {
+ Point aStartPt(rConstXP[0]);
+ if (rConstXP[nPointAnz-1]!=aStartPt) {
+ // Polygon schliessen (wird dabei um einen Punkt erweitert)
+ aPathPolygon[nPolyNum][nPointAnz]=aStartPt;
+ }
+ } else {
+ aPathPolygon.Remove(nPolyNum); // leere Polygone raus
+ }
+
+ }
+ }
+ SetRectsDirty();
+}
+
+void SdrPathObj::SetPathPoly(const XPolyPolygon& rPathPoly)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetPathPoly(rPathPoly);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+void SdrPathObj::ToggleClosed(long nOpenDistance)
+{
+ Rectangle aBoundRect0;
+
+ if(pUserCall != NULL)
+ aBoundRect0 = GetBoundRect();
+
+ FASTBOOL bClosed = IsClosed();
+ FASTBOOL bBCFlag = FALSE;
+
+ USHORT nPolyAnz = aPathPolygon.Count();
+ for(USHORT nPolyNum = 0; nPolyNum < nPolyAnz; nPolyNum++)
+ {
+ XPolygon& rXPoly = aPathPolygon[nPolyNum];
+ USHORT nPntAnz = rXPoly.GetPointCount();
+
+ if(nPntAnz >= 3)
+ {
+ USHORT nPntMax = nPntAnz-1;
+ if(!bBCFlag)
+ {
+ SendRepaintBroadcast();
+ bBCFlag = TRUE;
+ }
+ if(bClosed)
+ {
+ // Oeffnen
+ double fDist = rXPoly.CalcDistance(nPntMax, nPntMax-1);
+
+ if(fDist == 0)
+ fDist = 1;
+
+ double fRatio = (double)nOpenDistance / fDist;
+ Point aDiff = rXPoly[nPntMax-1] - rXPoly[nPntMax];
+ aDiff.X() = (long) (fRatio * aDiff.X());
+ aDiff.Y() = (long) (fRatio * aDiff.Y());
+ rXPoly[nPntMax] += aDiff;
+ }
+ else
+ {
+ // Schliessen
+ INT32 nDist0 = (INT32)(rXPoly.CalcDistance(nPntMax, 0) + 0.5);
+
+ if(nDist0 > nOpenDistance)
+ {
+ // Punkt hinzufuegen zum schliessen
+ nPntMax += 1;
+ }
+
+ rXPoly[nPntMax] = rXPoly[0];
+ ImpSetClosed(TRUE);
+ rXPoly.SetFlags(nPntMax, rXPoly.GetFlags(0));
+ if (rXPoly.IsSmooth(0))
+ rXPoly.CalcSmoothJoin(0, 1, nPntMax-1);
+ }
+ }
+ }
+ if(bBCFlag)
+ {
+ ImpSetClosed(!bClosed); // neuen ObjKind setzen
+ ImpForceKind(); // wg. Line->Poly->PolyLine statt Line->Poly->Line
+ SetRectsDirty();
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE, aBoundRect0);
+ }
+}
+
+XPolyFlags SdrPathObj::GetSmoothFlag(const SdrHdl* pHdl) const
+{
+ XPolyFlags eRet=XPOLY_NORMAL;
+ if (pHdl!=NULL) {
+ USHORT nPnt=pHdl->GetPointNum();
+ const XPolygon& rXPoly=aPathPolygon[pHdl->GetPolyNum()];
+ eRet=rXPoly.GetFlags(nPnt);
+ }
+ return eRet;
+}
+
+void SdrPathObj::ImpSetSmoothFlag(USHORT nPolyNum, USHORT nPointNum, XPolyFlags eFlag)
+{
+ if (eFlag==XPOLY_NORMAL || eFlag==XPOLY_SMOOTH || eFlag==XPOLY_SYMMTR) {
+ FASTBOOL bClosed=IsClosed();
+ USHORT nPnt=nPointNum;
+ XPolygon& rXPoly=aPathPolygon[nPolyNum];
+ USHORT nPntMax=rXPoly.GetPointCount();
+ if (nPntMax==0) return;
+ nPntMax--;
+ rXPoly.SetFlags(nPnt,eFlag);
+ if (bClosed && nPnt==0) rXPoly.SetFlags(nPntMax,eFlag);
+
+ if (eFlag!=XPOLY_NORMAL) {
+ USHORT nPrev=nPnt;
+ USHORT nNext=nPnt+1;
+
+ if (nPrev==0 && bClosed) nPrev=nPntMax;
+ if (nNext>nPntMax && bClosed) nNext=1;
+
+ if (nPrev>0 && nNext<=nPntMax) {
+ nPrev--;
+ FASTBOOL bPrevIsBez=rXPoly.IsControl(nPrev);
+ FASTBOOL bNextIsBez=rXPoly.IsControl(nNext);
+
+ if (bPrevIsBez || bNextIsBez) {
+ if (bPrevIsBez && bNextIsBez) {
+ rXPoly.CalcTangent(nPnt,nPrev,nNext);
+ } else {
+ rXPoly.CalcSmoothJoin(nPnt,nPrev,nNext);
+ }
+ if (bClosed) {
+ if (nPnt==0) rXPoly.SetFlags(nPntMax,eFlag);
+ else if (nPnt==nPntMax) rXPoly.SetFlags(0,eFlag);
+ }
+ }
+ }
+ }
+ }
+}
+
+void SdrPathObj::NbcSetSmoothFlag(const SdrHdl* pHdl, XPolyFlags eFlag)
+{
+ if (pHdl!=NULL) {
+ ImpSetSmoothFlag(pHdl->GetPolyNum(),pHdl->GetPointNum(),eFlag);
+ ImpForceKind();
+ SetRectsDirty();
+ }
+}
+
+void SdrPathObj::SetSmoothFlag(const SdrHdl* pHdl, XPolyFlags eFlag)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetSmoothFlag(pHdl,eFlag);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+SdrPathType SdrPathObj::CanConvertSegment(const SdrHdl* pHdl) const
+{
+ SdrPathType ePathType=SDRPATH_NONE;
+ if (pHdl!=NULL) {
+ const XPolygon& rXPoly=aPathPolygon[pHdl->GetPolyNum()];
+ USHORT nPnt=pHdl->GetPointNum();
+ USHORT nPntMax=rXPoly.GetPointCount();
+ if (nPntMax>0) {
+ nPntMax--;
+ if (nPnt<nPntMax) {
+ if (rXPoly.IsControl(nPnt+1)) {
+ ePathType=SDRPATH_LINE;
+ } else {
+ ePathType=SDRPATH_CURVE;
+ }
+ }
+ }
+ }
+ return ePathType;
+}
+
+SdrPathType SdrPathObj::GetSegmentType(const SdrHdl* pHdl) const
+{
+ SdrPathType ePathType=SDRPATH_NONE;
+ if (pHdl!=NULL) {
+ const XPolygon& rXPoly=aPathPolygon[pHdl->GetPolyNum()];
+ USHORT nPnt=pHdl->GetPointNum();
+ USHORT nPntMax=rXPoly.GetPointCount();
+ if (nPntMax>0) {
+ nPntMax--;
+ if (nPnt<nPntMax) {
+ if (rXPoly.IsControl(nPnt+1)) {
+ ePathType=SDRPATH_CURVE;
+ } else {
+ ePathType=SDRPATH_LINE;
+ }
+ }
+ }
+ }
+ return ePathType;
+}
+
+void SdrPathObj::ConvertSegment(const SdrHdl* pHdl)
+{
+ if (pHdl==NULL) return;
+ XPolygon& rXPoly = aPathPolygon[pHdl->GetPolyNum()];
+ USHORT nP1=pHdl->GetPointNum();
+ USHORT nPntMax=rXPoly.GetPointCount();
+ if (nPntMax==0) return;
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ nPntMax--;
+ if (nP1<nPntMax) {
+ USHORT nP2=nP1+1;
+
+ SendRepaintBroadcast();
+
+ if (rXPoly.IsControl(nP2)) {
+ rXPoly.Remove(nP2, 2);
+ nPntMax -= 2;
+ } else {
+ Point aDiff = (rXPoly[nP2] - rXPoly[nP1]) / 3;
+ rXPoly.Insert(nP2, rXPoly[nP1] + aDiff, XPOLY_CONTROL);
+ aDiff *= 2;
+ rXPoly.Insert(nP2+1, rXPoly[nP1] + aDiff, XPOLY_CONTROL);
+ nP2 = nP1 + 3;
+ nPntMax += 2;
+ }
+
+ if (rXPoly.IsSmooth(nP1)) {
+ USHORT nPrev = nP1;
+ if (nP1>0) nPrev--;
+ else if (IsClosed()) nPrev=nPntMax-1;
+ if (nPrev!=nP1 && (rXPoly.IsControl(nPrev) || rXPoly.IsControl(nP1+1))) {
+ if (rXPoly.IsControl(nPrev) && rXPoly.IsControl(nP1+1)) {
+ rXPoly.CalcTangent(nP1,nPrev,nP1+1);
+ } else {
+ rXPoly.CalcSmoothJoin(nP1,nPrev,nP1+1);
+ }
+ }
+ }
+ if (rXPoly.IsSmooth(nP2)) {
+ USHORT nNext=nP2;
+ if (nP2<nPntMax) nNext++;
+ else if (IsClosed()) nNext=1;
+ if (nNext!=nP2 && (rXPoly.IsControl(nP2-1) || rXPoly.IsControl(nNext))) {
+ if (rXPoly.IsControl(nP2-1) && rXPoly.IsControl(nNext)) {
+ rXPoly.CalcTangent(nP2,nP2-1,nNext);
+ } else {
+ rXPoly.CalcSmoothJoin(nP2,nP2-1,nNext);
+ }
+ }
+ }
+ ImpForceKind();
+ SetRectsDirty();
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrPathObj::ImpConvertSegment(USHORT nPolyNum, USHORT nPointNum, SdrPathType ePathType, FASTBOOL bIgnoreSmooth)
+{
+ XPolygon& rXPoly=aPathPolygon[nPolyNum];
+ USHORT nP1=nPointNum;
+ USHORT nPntMax=rXPoly.GetPointCount();
+ if (nPntMax==0) return;
+ nPntMax--;
+ if (nP1<nPntMax) {
+ USHORT nP2=nP1+1;
+ FASTBOOL bIsCurve=rXPoly.IsControl(nP2);
+ if (ePathType!=SDRPATH_NONE) {
+ if ((bIsCurve && ePathType==SDRPATH_CURVE) ||
+ (!bIsCurve && ePathType==SDRPATH_LINE)) return; // Wandlung nicht erforderlich
+ }
+ if (bIsCurve) {
+ rXPoly.Remove(nP2,2);
+ nPntMax-=2;
+ } else {
+ Point aDiff=(rXPoly[nP2]-rXPoly[nP1])/3;
+ rXPoly.Insert(nP2,rXPoly[nP1]+aDiff,XPOLY_CONTROL);
+ aDiff*=2;
+ rXPoly.Insert(nP2+1,rXPoly[nP1]+aDiff,XPOLY_CONTROL);
+ nP2=nP1+3;
+ nPntMax+=2;
+ }
+ if (!bIgnoreSmooth) {
+ if (rXPoly.IsSmooth(nP1)) {
+ USHORT nPrev=nP1;
+ if (nP1>0) nPrev--;
+ else if (IsClosed()) nPrev=nPntMax-1;
+ if (nPrev!=nP1 && (rXPoly.IsControl(nPrev) || rXPoly.IsControl(nP1+1))) {
+ if (rXPoly.IsControl(nPrev) && rXPoly.IsControl(nP1+1)) {
+ rXPoly.CalcTangent(nP1, nPrev, nP1+1);
+ } else {
+ rXPoly.CalcSmoothJoin(nP1,nPrev,nP1+1);
+ }
+ }
+ }
+ if (rXPoly.IsSmooth(nP2)) {
+ USHORT nNext=nP2;
+ if (nP2<nPntMax) nNext++;
+ else if (IsClosed()) nNext=1;
+ if (nNext!=nP2 && (rXPoly.IsControl(nP2-1) || rXPoly.IsControl(nNext))) {
+ if (rXPoly.IsControl(nP2-1) && rXPoly.IsControl(nNext)) {
+ rXPoly.CalcTangent(nP2,nP2-1,nNext);
+ } else {
+ rXPoly.CalcSmoothJoin(nP2,nP2-1,nNext);
+ }
+ }
+ }
+ }
+ }
+}
+
+void SdrPathObj::NbcConvertSegment(const SdrHdl* pHdl, SdrPathType ePathType, FASTBOOL bIgnoreSmooth)
+{
+ if (pHdl!=NULL) {
+ ImpConvertSegment(pHdl->GetPolyNum(),pHdl->GetPointNum(),ePathType,bIgnoreSmooth);
+ ImpForceKind(); // ebenso impl. an der SdrPolyEditView
+ SetRectsDirty();
+ }
+}
+
+void SdrPathObj::ConvertSegment(const SdrHdl* pHdl, SdrPathType ePathType, FASTBOOL bIgnoreSmooth)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcConvertSegment(pHdl,ePathType,bIgnoreSmooth);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+void SdrPathObj::ConvertAllSegments(SdrPathType ePathType)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ FASTBOOL bBroadcastFlg=FALSE;
+ FASTBOOL bClosed=IsClosed();
+ // von hinten anfangen, da evtl. Punkte geloescht oder eingefuegt werden
+ USHORT nPoly=aPathPolygon.Count();
+ while (nPoly>0) {
+ nPoly--;
+ XPolygon& rXPoly=aPathPolygon[nPoly];
+ USHORT nPnt=rXPoly.GetPointCount()-1;
+ FASTBOOL bSmoothFlg=FALSE;
+
+ while (nPnt>0) {
+ if (rXPoly.IsControl(nPnt-1)) {
+ if (nPnt<3) {
+ nPnt=0; // enddeckt durch #35912#. Nun Sicherheitsabfrage
+ DBG_ERROR("SdrPathObj::ConvertAllSegments(): Ungueltige Kontrollpunktanordnung endeckt!");
+ } else {
+ nPnt-=3;
+ }
+ if (ePathType==SDRPATH_LINE || ePathType==SDRPATH_NONE) {
+ if (!bBroadcastFlg) { SendRepaintBroadcast(); bBroadcastFlg=TRUE; }
+ bSmoothFlg=TRUE;
+ ImpConvertSegment(nPoly,nPnt,ePathType,TRUE);
+ }
+ } else {
+ nPnt--;
+ if (ePathType==SDRPATH_CURVE || ePathType==SDRPATH_NONE) {
+ if (!bBroadcastFlg) { SendRepaintBroadcast(); bBroadcastFlg=TRUE; }
+ bSmoothFlg=TRUE;
+ ImpConvertSegment(nPoly,nPnt,ePathType,TRUE);
+ }
+ }
+ }
+ if (bSmoothFlg) { // und nun die Kontrollpunkte nach Smoothbedingung korregieren
+ nPnt=rXPoly.GetPointCount();
+ FASTBOOL bLast=TRUE;
+ FASTBOOL bLastIsCurve=FALSE;
+ while (nPnt>0) {
+ FASTBOOL bCurve=rXPoly.IsControl(nPnt-1);
+ if (bCurve) {
+ if (nPnt<3) {
+ nPnt=0; // enddeckt durch #35912#. Nun Sicherheitsabfrage
+ DBG_ERROR("SdrPathObj::ConvertAllSegments(): Ungueltige Kontrollpunktanordnung endeckt!");
+ } else {
+ nPnt-=3;
+ }
+ } else nPnt--;
+ if (bLast) {
+ bLast=FALSE; // den Letzten Punkt ignorieren, denn da hat Smooth eh keinen Einfluss
+ bLastIsCurve=bCurve;
+ } else {
+ if (rXPoly.IsSmooth(nPnt) &&
+ (bCurve || // dahinter eine Kurve
+ (nPnt>0 && rXPoly.IsControl(nPnt-1)) || // oder davor eine Kurve
+ (bClosed && nPnt==0 && bLastIsCurve)))
+ {
+ XPolyFlags eSmooth=rXPoly.GetFlags(nPnt);
+ rXPoly.SetFlags(nPnt,XPOLY_NORMAL); // damit ImpSetSmoothFlag() was tut
+ ImpSetSmoothFlag(nPoly,nPnt,eSmooth);
+ }
+ }
+ }
+ }
+ }
+ if (bBroadcastFlg) {
+ ImpForceKind();
+ SetRectsDirty();
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
new file mode 100644
index 0000000000..7a040ee15a
--- /dev/null
+++ b/svx/source/svdraw/svdorect.cxx
@@ -0,0 +1,877 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdorect.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdorect.hxx"
+#include <math.h>
+#include <stdlib.h>
+#include "xpool.hxx"
+#include "xpoly.hxx"
+#include "svdxout.hxx"
+#include "svdattr.hxx"
+#include "svdpool.hxx"
+#include "svdtouch.hxx"
+#include "svdtrans.hxx"
+#include "svdio.hxx"
+#include "svdetc.hxx"
+#include "svddrag.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdocapt.hxx" // fuer Import von SdrFileVersion 2
+#include "svdpagv.hxx" // fuer
+#include "svdview.hxx" // das
+#include "svdundo.hxx" // Macro-Beispiel
+#include "svdopath.hxx"
+#include "svdglob.hxx" // Stringcache
+#include "svdstr.hrc" // Objektname
+
+#ifndef _SVX_XFLCLIT_HXX //autogen
+#include <xflclit.hxx>
+#endif
+
+#ifndef _SVX_XLNCLIT_HXX //autogen
+#include <xlnclit.hxx>
+#endif
+
+#ifndef _SVX_XLNWTIT_HXX //autogen
+#include <xlnwtit.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrRectObj,SdrTextObj);
+
+SdrRectObj::SdrRectObj():
+ pXPoly(NULL),
+ bXPolyIsLine(FALSE)
+{
+ bClosedObj=TRUE;
+}
+
+SdrRectObj::SdrRectObj(const Rectangle& rRect):
+ SdrTextObj(rRect),
+ pXPoly(NULL),
+ bXPolyIsLine(FALSE)
+{
+ bClosedObj=TRUE;
+}
+
+SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind):
+ SdrTextObj(eNewTextKind),
+ pXPoly(NULL),
+ bXPolyIsLine(FALSE)
+{
+ DBG_ASSERT(eTextKind==OBJ_TEXT || eTextKind==OBJ_TEXTEXT ||
+ eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT,
+ "SdrRectObj::SdrRectObj(SdrObjKind) ist nur fuer Textrahmen gedacht");
+ bClosedObj=TRUE;
+}
+
+SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect):
+ SdrTextObj(eNewTextKind,rRect),
+ pXPoly(NULL),
+ bXPolyIsLine(FALSE)
+{
+ DBG_ASSERT(eTextKind==OBJ_TEXT || eTextKind==OBJ_TEXTEXT ||
+ eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT,
+ "SdrRectObj::SdrRectObj(SdrObjKind,...) ist nur fuer Textrahmen gedacht");
+ bClosedObj=TRUE;
+}
+
+SdrRectObj::SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect, SvStream& rInput, USHORT eFormat):
+ SdrTextObj(eNewTextKind,rNewRect,rInput,eFormat),
+ pXPoly(NULL),
+ bXPolyIsLine(FALSE)
+{
+ DBG_ASSERT(eTextKind==OBJ_TEXT || eTextKind==OBJ_TEXTEXT ||
+ eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT,
+ "SdrRectObj::SdrRectObj(SdrObjKind,...) ist nur fuer Textrahmen gedacht");
+ bClosedObj=TRUE;
+}
+
+SdrRectObj::~SdrRectObj()
+{
+ if (pXPoly!=NULL) delete pXPoly;
+}
+
+void SdrRectObj::SetXPolyDirty()
+{
+ if (pXPoly!=NULL) {
+ delete pXPoly;
+ pXPoly=NULL;
+ }
+}
+
+FASTBOOL SdrRectObj::PaintNeedsXPoly(long nEckRad) const
+{
+ FASTBOOL bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || nEckRad!=0;
+ return bNeed;
+}
+
+XPolygon SdrRectObj::ImpCalcXPoly(const Rectangle& rRect1, long nRad1, FASTBOOL bContour) const
+{
+ bContour=TRUE; // am 14.1.97 wg. Umstellung TakeContour ueber Mtf und Paint. Joe.
+ XPolygon aXPoly(rRect1,nRad1,nRad1);
+ if (bContour) {
+ unsigned nPointAnz=aXPoly.GetPointCount();
+ XPolygon aNeuPoly(nPointAnz+1);
+ unsigned nShift=nPointAnz-2;
+ if (nRad1!=0) nShift=nPointAnz-5;
+ unsigned j=nShift;
+ for (unsigned i=1; i<nPointAnz; i++) {
+ aNeuPoly[i]=aXPoly[j];
+ aNeuPoly.SetFlags(i,aXPoly.GetFlags(j));
+ j++;
+ if (j>=nPointAnz) j=1;
+ }
+ aNeuPoly[0]=rRect1.BottomCenter();
+ aNeuPoly[nPointAnz]=aNeuPoly[0];
+ aXPoly=aNeuPoly;
+ }
+ // Die Winkelangaben beziehen sich immer auf die linke obere Ecke von !aRect!
+ if (aGeo.nShearWink!=0) ShearXPoly(aXPoly,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotateXPoly(aXPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ return aXPoly;
+}
+
+void SdrRectObj::RecalcXPoly()
+{
+ pXPoly=new XPolygon(ImpCalcXPoly(aRect,GetEckenradius()));
+}
+
+const XPolygon& SdrRectObj::GetXPoly() const
+{
+ if (pXPoly==NULL) ((SdrRectObj*)this)->RecalcXPoly();
+ return *pXPoly;
+}
+
+void SdrRectObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ FASTBOOL bNoTextFrame=!IsTextFrame();
+ rInfo.bResizeFreeAllowed=bNoTextFrame || aGeo.nDrehWink%9000==0;
+ rInfo.bResizePropAllowed=TRUE;
+ rInfo.bRotateFreeAllowed=TRUE;
+ rInfo.bRotate90Allowed =TRUE;
+ rInfo.bMirrorFreeAllowed=bNoTextFrame;
+ rInfo.bMirror45Allowed =bNoTextFrame;
+ rInfo.bMirror90Allowed =bNoTextFrame;
+
+ // allow transparence
+ rInfo.bTransparenceAllowed = TRUE;
+
+ // gradient depends on fillstyle
+ XFillStyle eFillStyle = ((XFillStyleItem&)(GetSetItem(1)->GetItemSet().Get(XATTR_FILLSTYLE))).GetValue();
+ rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT);
+
+ rInfo.bShearAllowed =bNoTextFrame;
+ FASTBOOL bCanConv=!HasText() || ImpCanConvTextToCurve();
+ if (bCanConv && !bNoTextFrame && !HasText()) {
+ bCanConv=HasFill() || HasLine();
+ }
+ rInfo.bCanConvToPath =bCanConv;
+ rInfo.bCanConvToPoly =bCanConv;
+ rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
+}
+
+UINT16 SdrRectObj::GetObjIdentifier() const
+{
+ if (IsTextFrame()) return UINT16(eTextKind);
+ else return UINT16(OBJ_RECT);
+}
+
+void SdrRectObj::RecalcBoundRect()
+{
+ aOutRect=GetSnapRect();
+ long nLineWdt=ImpGetLineWdt();
+ nLineWdt++; nLineWdt/=2;
+ if (nLineWdt!=0) {
+ long a=nLineWdt;
+ if ((aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) && GetEckenradius()==0) {
+ a*=2; // doppelt, wegen evtl. spitzen Ecken
+ }
+ aOutRect.Left ()-=a;
+ aOutRect.Top ()-=a;
+ aOutRect.Right ()+=a;
+ aOutRect.Bottom()+=a;
+ }
+ ImpAddShadowToBoundRect();
+ ImpAddTextToBoundRect();
+}
+
+void SdrRectObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+{
+ rRect=aRect;
+ if (aGeo.nShearWink!=0) {
+ long nDst=Round((aRect.Bottom()-aRect.Top())*aGeo.nTan);
+ if (aGeo.nShearWink>0) {
+ Point aRef(rRect.TopLeft());
+ rRect.Left()-=nDst;
+ Point aTmpPt(rRect.TopLeft());
+ RotatePoint(aTmpPt,aRef,aGeo.nSin,aGeo.nCos);
+ aTmpPt-=rRect.TopLeft();
+ rRect.Move(aTmpPt.X(),aTmpPt.Y());
+ } else {
+ rRect.Right()-=nDst;
+ }
+ }
+}
+
+FASTBOOL SdrRectObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ // Hidden objects on masterpages, draw nothing
+ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+ return TRUE;
+
+ // Im Graustufenmodus soll die Hintergrundseite NICHT angezeigt werden
+ ULONG nMode = rXOut.GetOutDev()->GetDrawMode();
+ FASTBOOL bGrayscale =
+ nMode == (DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL |
+ DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT);
+ if( bGrayscale && pPage && pPage->IsMasterPage() )
+ {
+ Size aPageSize = pPage->GetSize();
+ long aRectWidth = aRect.GetSize().Width() - 1;
+ long aRectHeight = aRect.GetSize().Height() - 1;
+
+ // Objekt so gross wie Seite ? -> Hintergrund
+ if( aRectWidth == aPageSize.Width() &&
+ aRectHeight == aPageSize.Height() )
+ {
+ return TRUE;
+ }
+ // oder so gross wie Seite abzueglich der Raender
+ if( aRectWidth == aPageSize.Width() -
+ pPage->GetLftBorder() - pPage->GetRgtBorder() &&
+ aRectHeight == aPageSize.Height() -
+ pPage->GetUppBorder() - pPage->GetLwrBorder() )
+ {
+ return TRUE;
+ }
+
+ }
+
+ if (bTextFrame && aGeo.nShearWink!=0) {
+ DBG_WARNING("Shearwinkel vom TextFrame innerhalb von SdrRectObj::Paint() auf 0 gesetzt");
+ ((SdrRectObj*)this)->ImpCheckShear();
+ ((SdrRectObj*)this)->SetRectsDirty();
+ }
+ FASTBOOL bOk=TRUE;
+ FASTBOOL bHideContour=IsHideContour();
+ long nEckRad=GetEckenradius();
+
+ // prepare ItemSet of this object
+ SfxItemSet aSet((SfxItemPool&)(*GetItemPool()));
+ TakeAttributes(aSet, FALSE, TRUE);
+
+ // perepare ItemSet to avoid old XOut line drawing
+ XLineAttrSetItem aXLSet((SfxItemPool*)GetItemPool());
+ aXLSet.GetItemSet().Put(XLineStyleItem(XLINE_NONE));
+
+ // prepare line geometry
+ ImpLineGeometry* pLineGeometry = ImpPrepareLineGeometry(rXOut, aSet);
+
+ // Shadows
+ if (!bHideContour && ImpSetShadowAttributes(rXOut,FALSE)) {
+ UINT32 nXDist=((SdrShadowXDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWXDIST))).GetValue();
+ UINT32 nYDist=((SdrShadowYDistItem&)(pShadAttr->GetItemSet().Get(SDRATTR_SHADOWYDIST))).GetValue();
+
+ // avoid shadow line drawing in XOut
+ rXOut.SetLineAttr(aXLSet);
+
+ if (PaintNeedsXPoly(nEckRad)) {
+ XPolygon aX(GetXPoly());
+ aX.Move(nXDist,nYDist);
+ rXOut.DrawXPolygon(aX);
+ } else {
+ Rectangle aR(aRect);
+ aR.Move(nXDist,nYDist);
+ rXOut.DrawRect(aR,USHORT(2*nEckRad),USHORT(2*nEckRad));
+ }
+
+ // new shadow line drawing
+ if(pLineGeometry)
+ {
+ // draw the line geometry
+ ImpDrawShadowLineGeometry(rXOut, aSet, *pLineGeometry);
+ }
+ }
+
+ if(pFillAttr!=NULL || !IsTextFrame())
+ {
+ // Before here the LineAttr were set: if(pLineAttr) rXOut.SetLineAttr(*pLineAttr);
+ rXOut.SetLineAttr(aXLSet);
+
+ if(pFillAttr)
+ rXOut.SetFillAttr(*pFillAttr);
+
+ if (!bHideContour) {
+ if (PaintNeedsXPoly(nEckRad)) {
+ rXOut.DrawXPolygon(GetXPoly());
+ } else {
+ DBG_ASSERT(nEckRad==0,"SdrRectObj::Paint(): XOut.DrawRect() unterstuetz kein Eckenradius!");
+ rXOut.DrawRect(aRect/*,USHORT(2*nEckRad),USHORT(2*nEckRad)*/);
+ }
+ }
+ }
+ DBG_ASSERT(aRect.GetWidth()>1 && aRect.GetHeight()>1,"SdrRectObj::Paint(): Rect hat Nullgroesse (oder negativ)!");
+
+ // Own line drawing
+ if(!bHideContour && pLineGeometry)
+ {
+ // draw the line geometry
+ ImpDrawColorLineGeometry(rXOut, aSet, *pLineGeometry);
+ }
+
+ if (HasText()) {
+ bOk=SdrTextObj::Paint(rXOut,rInfoRec);
+ }
+ if (bOk && (rInfoRec.nPaintMode & SDRPAINTMODE_GLUEPOINTS) !=0) {
+ bOk=PaintGluePoints(rXOut,rInfoRec);
+ }
+
+ // throw away line geometry
+ if(pLineGeometry)
+ delete pLineGeometry;
+
+ return bOk;
+}
+
+SdrObject* SdrRectObj::ImpCheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer, FASTBOOL bForceFilled, FASTBOOL bForceTol) const
+{
+ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+ INT32 nMyTol=nTol;
+ FASTBOOL bFilled=bForceFilled || HasFill();
+ FASTBOOL bPickThrough=pModel!=NULL && pModel->IsPickThroughTransparentTextFrames();
+ if (bTextFrame && !bPickThrough) bFilled=TRUE;
+ FASTBOOL bLine=HasLine();
+
+ INT32 nWdt=bLine ? ImpGetLineWdt()/2 :0; // Halbe Strichstaerke
+ long nBoundWdt=aRect.GetWidth()-1;
+ long nBoundHgt=aRect.GetHeight()-1;
+ if (bFilled && nBoundWdt>short(nTol) && nBoundHgt>short(nTol) && Abs(aGeo.nShearWink)<=4500) {
+ if (!bForceTol && !bTextFrame ) nMyTol=0; // Keine Toleranz noetig hier
+ }
+ if (nWdt>nMyTol && (!bTextFrame || pEdtOutl==NULL)) nMyTol=nWdt; // Bei dicker Umrandung keine Toleranz noetig, ausser wenn bei TextEdit
+ Rectangle aR(aRect);
+ if (nMyTol!=0 && bFilled) {
+ aR.Left ()-=nMyTol;
+ aR.Top ()-=nMyTol;
+ aR.Right ()+=nMyTol;
+ aR.Bottom()+=nMyTol;
+ }
+
+ if (bFilled || bLine || bTextFrame) { // Bei TextFrame so tun, alsob Linie da
+ unsigned nCnt=0;
+ INT32 nXShad=0,nYShad=0;
+ long nEckRad=/*bTextFrame ? 0 :*/ GetEckenradius();
+ do { // 1 Durchlauf, bei Schatten 2 Durchlaeufe.
+ if (nCnt!=0) aR.Move(nXShad,nYShad);
+ if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || nEckRad!=0 || !bFilled) {
+ Polygon aPol(aR);
+ if (nEckRad!=0) {
+ INT32 nRad=nEckRad;
+ if (bFilled) nRad+=nMyTol; // um korrekt zu sein ...
+ XPolygon aXPoly(ImpCalcXPoly(aR,nRad));
+ aPol=XOutCreatePolygon(aXPoly,NULL);
+ } else {
+ if (aGeo.nShearWink!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoly(aPol,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ }
+ if (bFilled) {
+ if (IsPointInsidePoly(aPol,rPnt)) return (SdrObject*)this;
+ } else {
+ Rectangle aTouchRect(rPnt.X()-nMyTol,rPnt.Y()-nMyTol,rPnt.X()+nMyTol,rPnt.Y()+nMyTol);
+ if (IsRectTouchesLine(aPol,aTouchRect)) return (SdrObject*)this;
+ }
+ } else {
+ if (aR.IsInside(rPnt)) return (SdrObject*)this;
+ }
+ } while (nCnt++==0 && ImpGetShadowDist(nXShad,nYShad));
+ }
+ FASTBOOL bCheckText=TRUE;
+ if (bCheckText && HasText() && (!bTextFrame || bPickThrough)) {
+ return SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer);
+ }
+ return NULL;
+}
+
+SdrObject* SdrRectObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ return ImpCheckHit(rPnt,nTol,pVisiLayer,FALSE/*,bTextFrame*/);
+}
+
+void SdrRectObj::TakeObjNameSingul(XubString& rName) const
+{
+ if (IsTextFrame()) SdrTextObj::TakeObjNameSingul(rName);
+ else {
+ USHORT nResId=STR_ObjNameSingulRECT;
+ if (aGeo.nShearWink!=0) {
+ nResId+=4; // Parallelogramm oder Raute
+ // Raute ist nicht, weil Shear die vertikalen Kanten verlaengert!
+ // Wenn Zeit ist, werde ich das mal berechnen.
+ } else {
+ if (aRect.GetWidth()==aRect.GetHeight()) nResId+=2; // Quadrat
+ }
+ if (GetEckenradius()!=0) nResId+=8; // abgerundet
+ rName=ImpGetResStr(nResId);
+ }
+}
+
+void SdrRectObj::TakeObjNamePlural(XubString& rName) const
+{
+ if (IsTextFrame()) SdrTextObj::TakeObjNamePlural(rName);
+ else {
+ USHORT nResId=STR_ObjNamePluralRECT;
+ if (aGeo.nShearWink!=0) {
+ nResId+=4; // Parallelogramm oder Raute
+ } else {
+ if (aRect.GetWidth()==aRect.GetHeight()) nResId+=2; // Quadrat
+ }
+ if (GetEckenradius()!=0) nResId+=8; // abgerundet
+ rName=ImpGetResStr(nResId);
+ }
+}
+
+void SdrRectObj::operator=(const SdrObject& rObj)
+{
+ SdrTextObj::operator=(rObj);
+}
+
+void SdrRectObj::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL bDetail) const
+{
+ rPoly=XPolyPolygon(ImpCalcXPoly(aRect,GetEckenradius()));
+}
+
+void SdrRectObj::TakeContour(XPolyPolygon& rPoly) const
+{
+ SdrTextObj::TakeContour(rPoly);
+}
+
+void SdrRectObj::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+void SdrRectObj::RecalcSnapRect()
+{
+ long nEckRad=GetEckenradius();
+ if ((aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) && nEckRad!=0) {
+ aSnapRect=GetXPoly().GetBoundRect();
+ } else {
+ SdrTextObj::RecalcSnapRect();
+ }
+}
+
+void SdrRectObj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ SdrTextObj::NbcSetSnapRect(rRect);
+ SetXPolyDirty();
+}
+
+void SdrRectObj::NbcSetLogicRect(const Rectangle& rRect)
+{
+ SdrTextObj::NbcSetLogicRect(rRect);
+ SetXPolyDirty();
+}
+
+USHORT SdrRectObj::GetHdlCount() const
+{
+ return 9;
+}
+
+SdrHdl* SdrRectObj::GetHdl(USHORT nHdlNum) const
+{
+ SdrHdl* pH=NULL;
+ Point aPnt;
+ SdrHdlKind eKind=HDL_MOVE;
+ switch (nHdlNum) {
+ case 0: {
+ long a=GetEckenradius();
+ long b=Max(aRect.GetWidth(),aRect.GetHeight())/2; // Wird aufgerundet, da GetWidth() eins draufaddiert
+ if (a>b) a=b;
+ if (a<0) a=0;
+ aPnt=aRect.TopLeft();
+ aPnt.X()+=a;
+ eKind=HDL_CIRC;
+ } break; // Eckenradius
+ case 1: aPnt=aRect.TopLeft(); eKind=HDL_UPLFT; break; // Oben links
+ case 2: aPnt=aRect.TopCenter(); eKind=HDL_UPPER; break; // Oben
+ case 3: aPnt=aRect.TopRight(); eKind=HDL_UPRGT; break; // Oben rechts
+ case 4: aPnt=aRect.LeftCenter(); eKind=HDL_LEFT ; break; // Links
+ case 5: aPnt=aRect.RightCenter(); eKind=HDL_RIGHT; break; // Rechts
+ case 6: aPnt=aRect.BottomLeft(); eKind=HDL_LWLFT; break; // Unten links
+ case 7: aPnt=aRect.BottomCenter(); eKind=HDL_LOWER; break; // Unten
+ case 8: aPnt=aRect.BottomRight(); eKind=HDL_LWRGT; break; // Unten rechts
+ }
+ if (aGeo.nShearWink!=0) ShearPoint(aPnt,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoint(aPnt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ if (eKind!=HDL_MOVE) {
+ pH=new SdrHdl(aPnt,eKind);
+ pH->SetObj((SdrObject*)this);
+ pH->SetDrehWink(aGeo.nDrehWink);
+ }
+ return pH;
+}
+
+FASTBOOL SdrRectObj::HasSpecialDrag() const
+{
+ return TRUE;
+}
+
+FASTBOOL SdrRectObj::BegDrag(SdrDragStat& rDrag) const
+{
+ FASTBOOL bRad=rDrag.GetHdl()!=NULL && rDrag.GetHdl()->GetKind()==HDL_CIRC;
+ if (bRad) {
+ rDrag.SetEndDragChangesAttributes(TRUE);
+ return TRUE;
+ } else {
+ return SdrTextObj::BegDrag(rDrag);
+ }
+}
+
+FASTBOOL SdrRectObj::MovDrag(SdrDragStat& rDrag) const
+{
+ FASTBOOL bRad=rDrag.GetHdl()!=NULL && rDrag.GetHdl()->GetKind()==HDL_CIRC;
+ if (bRad) {
+ return TRUE;
+ } else {
+ return SdrTextObj::MovDrag(rDrag);
+ }
+}
+
+FASTBOOL SdrRectObj::EndDrag(SdrDragStat& rDrag)
+{
+ FASTBOOL bRad=rDrag.GetHdl()!=NULL && rDrag.GetHdl()->GetKind()==HDL_CIRC;
+ if (bRad) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ Point aPt(rDrag.GetNow());
+ if (aGeo.nDrehWink!=0) RotatePoint(aPt,aRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin fuer Umkehrung
+ // Shear nicht noetig, da Pt auf einer Linie mit dem RefPt (LiOb Ecke des Rect)
+ long nRad=aPt.X()-aRect.Left();
+ if (nRad<0) nRad=0;
+ long nAltRad=GetEckenradius();
+ if (nRad!=nAltRad) NbcSetEckenradius(nRad);
+ SetChanged();
+ SetRectsDirty();
+ SetXPolyDirty();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ return TRUE;
+ } else {
+ return SdrTextObj::EndDrag(rDrag);
+ }
+}
+
+void SdrRectObj::BrkDrag(SdrDragStat& rDrag) const
+{
+ FASTBOOL bRad=rDrag.GetHdl()!=NULL && rDrag.GetHdl()->GetKind()==HDL_CIRC;
+ if (bRad) {
+ } else {
+ SdrTextObj::BrkDrag(rDrag);
+ }
+}
+
+XubString SdrRectObj::GetDragComment(const SdrDragStat& rDrag, FASTBOOL bUndoDragComment, FASTBOOL bCreateComment) const
+{
+ if(bCreateComment)
+ return String();
+
+ BOOL bRad(rDrag.GetHdl() && rDrag.GetHdl()->GetKind() == HDL_CIRC);
+
+ if(bRad)
+ {
+ Point aPt(rDrag.GetNow());
+
+ // -sin fuer Umkehrung
+ if(aGeo.nDrehWink)
+ RotatePoint(aPt, aRect.TopLeft(), -aGeo.nSin, aGeo.nCos);
+
+ INT32 nRad(aPt.X() - aRect.Left());
+
+ if(nRad < 0)
+ nRad = 0;
+
+ XubString aStr;
+
+ ImpTakeDescriptionStr(STR_DragRectEckRad, aStr);
+ aStr.AppendAscii(" (");
+ aStr += GetMetrStr(nRad);
+ aStr += sal_Unicode(')');
+
+ return aStr;
+ }
+ else
+ {
+ return SdrTextObj::GetDragComment(rDrag, bUndoDragComment, FALSE);
+ }
+}
+
+void SdrRectObj::TakeDragPoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rXPP.Clear();
+ FASTBOOL bRad=rDrag.GetHdl()!=NULL && rDrag.GetHdl()->GetKind()==HDL_CIRC;
+ FASTBOOL bRectSiz=!bRad;
+ if (bRad) {
+ Point aPt(rDrag.GetNow());
+ if (aGeo.nDrehWink!=0) RotatePoint(aPt,aRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin fuer Umkehrung
+ // Shear nicht noetig, da Pt auf einer Linie mit dem RefPt (LiOb Ecke des Rect)
+ long nRad=aPt.X()-aRect.Left();
+ if (nRad<0) nRad=0;
+ rXPP.Insert(ImpCalcXPoly(aRect,nRad));
+ } else {
+ rXPP.Insert(ImpCalcXPoly(ImpDragCalcRect(rDrag),GetEckenradius()));
+ }
+}
+
+void SdrRectObj::TakeCreatePoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ Rectangle aRect1;
+ rDrag.TakeCreateRect(aRect1);
+ aRect1.Justify();
+ rXPP=XPolyPolygon(ImpCalcXPoly(aRect1,GetEckenradius()));
+}
+
+Pointer SdrRectObj::GetCreatePointer() const
+{
+ if (IsTextFrame()) return Pointer(POINTER_DRAW_TEXT);
+ return Pointer(POINTER_DRAW_RECT);
+}
+
+void SdrRectObj::NbcMove(const Size& rSiz)
+{
+ SdrTextObj::NbcMove(rSiz);
+ SetXPolyDirty();
+}
+
+void SdrRectObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ SdrTextObj::NbcResize(rRef,xFact,yFact);
+ SetXPolyDirty();
+}
+
+void SdrRectObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ SdrTextObj::NbcRotate(rRef,nWink,sn,cs);
+ SetXPolyDirty();
+}
+
+void SdrRectObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ SdrTextObj::NbcShear(rRef,nWink,tn,bVShear);
+ SetXPolyDirty();
+}
+
+void SdrRectObj::NbcMirror(const Point& rRef1, const Point& rRef2)
+{
+ SdrTextObj::NbcMirror(rRef1,rRef2);
+ SetXPolyDirty();
+}
+
+FASTBOOL SdrRectObj::DoMacro(const SdrObjMacroHitRec& rRec)
+{
+ return SdrTextObj::DoMacro(rRec);
+}
+
+XubString SdrRectObj::GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const
+{
+ return SdrTextObj::GetMacroPopupComment(rRec);
+}
+
+SdrGluePoint SdrRectObj::GetVertexGluePoint(USHORT nPosNum) const
+{
+ INT32 nWdt=0;
+ if (pLineAttr!=NULL) {
+ nWdt=((XLineWidthItem&)(pLineAttr->GetItemSet().Get(XATTR_LINEWIDTH))).GetValue();
+ nWdt++;
+ nWdt/=2;
+ }
+ Point aPt;
+ switch (nPosNum) {
+ case 0: aPt=aRect.TopCenter(); aPt.Y()-=nWdt; break;
+ case 1: aPt=aRect.RightCenter(); aPt.X()+=nWdt; break;
+ case 2: aPt=aRect.BottomCenter(); aPt.Y()+=nWdt; break;
+ case 3: aPt=aRect.LeftCenter(); aPt.X()-=nWdt; break;
+ }
+ if (aGeo.nShearWink!=0) ShearPoint(aPt,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoint(aPt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ aPt-=GetSnapRect().Center();
+ SdrGluePoint aGP(aPt);
+ aGP.SetPercent(FALSE);
+ return aGP;
+}
+
+SdrGluePoint SdrRectObj::GetCornerGluePoint(USHORT nPosNum) const
+{
+ INT32 nWdt=0;
+ if (pLineAttr!=NULL) {
+ nWdt=((XLineWidthItem&)(pLineAttr->GetItemSet().Get(XATTR_LINEWIDTH))).GetValue();
+ nWdt++;
+ nWdt/=2;
+ }
+ Point aPt;
+ switch (nPosNum) {
+ case 0: aPt=aRect.TopLeft(); aPt.X()-=nWdt; aPt.Y()-=nWdt; break;
+ case 1: aPt=aRect.TopRight(); aPt.X()+=nWdt; aPt.Y()-=nWdt; break;
+ case 2: aPt=aRect.BottomRight(); aPt.X()+=nWdt; aPt.Y()+=nWdt; break;
+ case 3: aPt=aRect.BottomLeft(); aPt.X()-=nWdt; aPt.Y()+=nWdt; break;
+ }
+ if (aGeo.nShearWink!=0) ShearPoint(aPt,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoint(aPt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ aPt-=GetSnapRect().Center();
+ SdrGluePoint aGP(aPt);
+ aGP.SetPercent(FALSE);
+ return aGP;
+}
+
+SdrObject* SdrRectObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ XPolygon aXP(ImpCalcXPoly(aRect,GetEckenradius()));
+ { // #40608# Nur Uebergangsweise bis zum neuen TakeContour()
+ aXP.Remove(0,1);
+ aXP[aXP.GetPointCount()-1]=aXP[0];
+ }
+ SdrObject* pRet=NULL;
+ if (!IsTextFrame() || HasFill() || HasLine()) {
+ pRet=ImpConvertMakeObj(XPolyPolygon(aXP),TRUE,bBezier);
+ }
+ pRet=ImpConvertAddText(pRet,bBezier);
+ return pRet;
+}
+
+void SdrRectObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ SdrTextObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+ SetXPolyDirty(); // wg. Eckenradius
+}
+
+void SdrRectObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ SdrTextObj::NbcSetAttributes(rAttr,bReplaceAll);
+ SetXPolyDirty(); // wg. Eckenradius
+}
+
+void SdrRectObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ SdrTextObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+ SetXPolyDirty(); // wg. Eckenradius
+}
+
+SdrObjGeoData* SdrRectObj::NewGeoData() const
+{ // etwas umstaendlicher, damit's vielleicht unter Chicago durchgeht
+ SdrObjGeoData* pGeo=new SdrRectObjGeoData;
+ return pGeo;
+}
+
+void SdrRectObj::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ SdrTextObj::SaveGeoData(rGeo);
+ SdrRectObjGeoData& rRGeo=(SdrRectObjGeoData&)rGeo;
+ rRGeo.nEckRad=GetEckenradius();
+}
+
+void SdrRectObj::RestGeoData(const SdrObjGeoData& rGeo)
+{ // RectsDirty wird von SdrObject gerufen
+ SdrTextObj::RestGeoData(rGeo);
+ SdrRectObjGeoData& rRGeo=(SdrRectObjGeoData&)rGeo;
+ long nAltRad=GetEckenradius();
+ if (rRGeo.nEckRad!=nAltRad) NbcSetEckenradius(rRGeo.nEckRad);
+ SetXPolyDirty();
+}
+
+void SdrRectObj::WriteData(SvStream& rOut) const
+{
+ SdrTextObj::WriteData(rOut);
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrRectObj");
+#endif
+}
+
+void SdrRectObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ SdrTextObj::ReadData(rHead,rIn);
+ if (IsTextFrame() && rHead.GetVersion()<3 && !HAS_BASE(SdrCaptionObj,this)) {
+ // Bis einschl. Version 2 wurden Textrahmen mit SdrTextObj dargestellt, ausser CaptionObj
+ SfxItemPool* pPool=GetItemPool();
+ if (pPool!=NULL) {
+ // Umrandung und Hintergrund des importierten Textrahmens ausschalten
+ SfxItemSet aSet(*pPool);
+ aSet.Put(XFillColorItem(String(),Color(COL_WHITE))); // Falls einer auf Solid umschaltet
+ aSet.Put(XFillStyleItem(XFILL_NONE));
+ aSet.Put(XLineColorItem(String(),Color(COL_BLACK))); // Falls einer auf Solid umschaltet
+ aSet.Put(XLineStyleItem(XLINE_NONE));
+ NbcSetAttributes(aSet,FALSE);
+ }
+ } else {
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrRectObj");
+#endif
+ if (rHead.GetVersion()<=5) {
+ long nEckRad;
+ rIn>>nEckRad;
+ long nAltRad=GetEckenradius();
+ if (nEckRad!=nAltRad) NbcSetEckenradius(nEckRad);
+ }
+ }
+ SetXPolyDirty();
+}
+
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
new file mode 100644
index 0000000000..7ae7df4bd6
--- /dev/null
+++ b/svx/source/svdraw/svdotext.cxx
@@ -0,0 +1,2055 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdotext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdotext.hxx"
+#include "svditext.hxx"
+#include "svdpagv.hxx" // fuer Abfrage im Paint, ob das
+#include "svdview.hxx" // Objekt gerade editiert wird
+#include "svdpage.hxx" // und fuer AnimationHandler (Laufschrift)
+#include "svdxout.hxx"
+#include "svdtouch.hxx"
+#include "svdio.hxx"
+#include "svdetc.hxx"
+#include "svdoutl.hxx"
+#include "svdscrol.hxx" // fuer Laufschrift
+#include "svdmodel.hxx" // OutlinerDefaults
+#include "svdglob.hxx" // Stringcache
+#include "svdstr.hrc" // Objektname
+#include "svdtxhdl.hxx" // DrawTextToPath
+
+#ifndef _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+
+#ifndef _EDITSTAT_HXX //autogen
+#include <editstat.hxx>
+#endif
+
+#ifndef _OUTLOBJ_HXX //autogen
+#include <outlobj.hxx>
+#endif
+
+#ifndef _EDITOBJ_HXX //autogen
+#include <editobj.hxx>
+#endif
+
+#ifndef _OUTLINER_HXX //autogen
+#include "outliner.hxx"
+#endif
+
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include "fhgtitem.hxx"
+#endif
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SVX_ADJITEM_HXX //autogen
+#include "adjitem.hxx"
+#endif
+#include "flditem.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrTextObj,SdrAttrObj);
+
+SdrTextObj::SdrTextObj():
+ eTextKind(OBJ_TEXT),
+ pOutlinerParaObject(NULL),
+ pEdtOutl(NULL),
+ pFormTextBoundRect(NULL)
+{
+ bTextSizeDirty=FALSE;
+ bPortionInfoChecked=FALSE;
+ bTextFrame=FALSE;
+ bNoShear=FALSE;
+ bNoRotate=FALSE;
+ bNoMirror=FALSE;
+ bDisableAutoWidthOnDragging=FALSE;
+}
+
+SdrTextObj::SdrTextObj(const Rectangle& rNewRect):
+ aRect(rNewRect),
+ eTextKind(OBJ_TEXT),
+ pOutlinerParaObject(NULL),
+ pEdtOutl(NULL),
+ pFormTextBoundRect(NULL)
+{
+ bTextSizeDirty=FALSE;
+ bPortionInfoChecked=FALSE;
+ bTextFrame=FALSE;
+ bNoShear=FALSE;
+ bNoRotate=FALSE;
+ bNoMirror=FALSE;
+ bDisableAutoWidthOnDragging=FALSE;
+ ImpJustifyRect(aRect);
+}
+
+SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind):
+ eTextKind(eNewTextKind),
+ pOutlinerParaObject(NULL),
+ pEdtOutl(NULL),
+ pFormTextBoundRect(NULL)
+{
+ bTextSizeDirty=FALSE;
+ bTextFrame=TRUE;
+ bNoShear=TRUE;
+ bNoRotate=FALSE;
+ bNoMirror=TRUE;
+ bPortionInfoChecked=FALSE;
+ bDisableAutoWidthOnDragging=FALSE;
+}
+
+SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect):
+ aRect(rNewRect),
+ eTextKind(eNewTextKind),
+ pOutlinerParaObject(NULL),
+ pEdtOutl(NULL),
+ pFormTextBoundRect(NULL)
+{
+ bTextSizeDirty=FALSE;
+ bTextFrame=TRUE;
+ bNoShear=TRUE;
+ bNoRotate=FALSE;
+ bNoMirror=TRUE;
+ bPortionInfoChecked=FALSE;
+ bDisableAutoWidthOnDragging=FALSE;
+ ImpJustifyRect(aRect);
+}
+
+SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect, SvStream& rInput, USHORT eFormat):
+ aRect(rNewRect),
+ eTextKind(eNewTextKind),
+ pOutlinerParaObject(NULL),
+ pEdtOutl(NULL),
+ pFormTextBoundRect(NULL)
+{
+ bTextSizeDirty=FALSE;
+ bTextFrame=TRUE;
+ bNoShear=TRUE;
+ bNoRotate=FALSE;
+ bNoMirror=TRUE;
+ bPortionInfoChecked=FALSE;
+ bDisableAutoWidthOnDragging=FALSE;
+ ImpJustifyRect(aRect);
+
+ NbcSetText(rInput,eFormat);
+}
+
+SdrTextObj::~SdrTextObj()
+{
+ if( pModel )
+ {
+ SdrOutliner& rOutl = pModel->GetHitTestOutliner();
+ if( rOutl.GetTextObj() == this )
+ rOutl.SetTextObj( NULL );
+ }
+
+ if (pOutlinerParaObject!=NULL) {
+ delete pOutlinerParaObject;
+ }
+ if (pFormTextBoundRect!=NULL) {
+ delete pFormTextBoundRect;
+ }
+ ImpLinkAbmeldung();
+}
+
+void SdrTextObj::FitFrameToTextSize()
+{
+ DBG_ASSERT(pModel!=NULL,"SdrTextObj::FitFrameToTextSize(): pModel=NULL!")
+ ImpJustifyRect(aRect);
+ if (pOutlinerParaObject!=NULL && pModel!=NULL) {
+ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+ rOutliner.SetPaperSize(Size(aRect.Right()-aRect.Left(),aRect.Bottom()-aRect.Top()));
+ rOutliner.SetUpdateMode(TRUE);
+ rOutliner.SetText(*pOutlinerParaObject);
+ Rectangle aTextRect;
+ Size aNewSize(rOutliner.CalcTextSize());
+ rOutliner.Clear();
+ aNewSize.Width()++; // wegen evtl. Rundungsfehler
+ aNewSize.Width()+=GetTextLeftDistance()+GetTextRightDistance();
+ aNewSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance();
+ Rectangle aNewRect(aRect);
+ aNewRect.SetSize(aNewSize);
+ ImpJustifyRect(aNewRect);
+ if (aNewRect!=aRect) {
+ SetLogicRect(aNewRect);
+ }
+ }
+}
+
+void SdrTextObj::NbcSetText(const XubString& rStr)
+{
+ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+ OutputDevice* pRef1=rOutliner.GetRefDevice();
+ rOutliner.SetUpdateMode(TRUE);
+ rOutliner.SetText(rStr,rOutliner.GetParagraph( 0 ));
+ OutlinerParaObject* pNewText=rOutliner.CreateParaObject();
+ Size aSiz(rOutliner.CalcTextSize());
+ OutputDevice* pRef2=rOutliner.GetRefDevice();
+ rOutliner.Clear();
+ NbcSetOutlinerParaObject(pNewText);
+ aTextSize=aSiz;
+ bTextSizeDirty=FALSE;
+}
+
+void SdrTextObj::SetText(const XubString& rStr)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetText(rStr);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (GetBoundRect()!=aBoundRect0) {
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrTextObj::NbcSetText(SvStream& rInput, USHORT eFormat)
+{
+ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+ rOutliner.Read(rInput,eFormat);
+ OutlinerParaObject* pNewText=rOutliner.CreateParaObject();
+ rOutliner.SetUpdateMode(TRUE);
+ Size aSiz(rOutliner.CalcTextSize());
+ rOutliner.Clear();
+ NbcSetOutlinerParaObject(pNewText);
+ aTextSize=aSiz;
+ bTextSizeDirty=FALSE;
+}
+
+void SdrTextObj::SetText(SvStream& rInput, USHORT eFormat)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcSetText(rInput,eFormat);
+ SetChanged();
+ SendRepaintBroadcast();
+ if (GetBoundRect()!=aBoundRect0) {
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+const Size& SdrTextObj::GetTextSize() const
+{
+ if (bTextSizeDirty) {
+ Size aSiz;
+ if (pOutlinerParaObject!=NULL) {
+ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+ rOutliner.SetText(*pOutlinerParaObject);
+ rOutliner.SetUpdateMode(TRUE);
+ aSiz=rOutliner.CalcTextSize();
+ rOutliner.Clear();
+ }
+ // 2x casting auf nonconst
+ ((SdrTextObj*)this)->aTextSize=aSiz;
+ ((SdrTextObj*)this)->bTextSizeDirty=FALSE;
+ }
+ return aTextSize;
+}
+
+FASTBOOL SdrTextObj::IsAutoGrowHeight() const
+{
+ if (!bTextFrame) return FALSE; // AutoGrow nur bei TextFrames
+ if (pMiscAttr!=NULL) {
+ const SfxItemSet& rSet=pMiscAttr->GetItemSet();
+ FASTBOOL bRet=((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
+ if (bRet) {
+ SdrTextAniKind eAniKind=((SdrTextAniKindItem&)(rSet.Get(SDRATTR_TEXT_ANIKIND))).GetValue();
+ if (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE) {
+ SdrTextAniDirection eDirection=((SdrTextAniDirectionItem&)(rSet.Get(SDRATTR_TEXT_ANIDIRECTION))).GetValue();
+ if (eDirection==SDRTEXTANI_UP || eDirection==SDRTEXTANI_DOWN) {
+ bRet=FALSE;
+ }
+ }
+ }
+ return bRet;
+ }
+ return TRUE; // default ist TRUE
+}
+
+FASTBOOL SdrTextObj::IsAutoGrowWidth() const
+{
+ if (!bTextFrame) return FALSE; // AutoGrow nur bei TextFrames
+ if (pMiscAttr!=NULL) {
+ const SfxItemSet& rSet=pMiscAttr->GetItemSet();
+ FASTBOOL bRet=((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
+ if (bRet) {
+ SdrTextAniKind eAniKind=((SdrTextAniKindItem&)(rSet.Get(SDRATTR_TEXT_ANIKIND))).GetValue();
+ if (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE) {
+ SdrTextAniDirection eDirection=((SdrTextAniDirectionItem&)(rSet.Get(SDRATTR_TEXT_ANIDIRECTION))).GetValue();
+ if (eDirection==SDRTEXTANI_LEFT || eDirection==SDRTEXTANI_RIGHT) {
+ bRet=FALSE;
+ }
+ }
+ }
+ return bRet;
+ }
+ return FALSE; // default ist FALSE
+}
+
+SdrTextHorzAdjust SdrTextObj::GetTextHorizontalAdjust() const
+{
+ if (IsContourTextFrame()) return SDRTEXTHORZADJUST_BLOCK;
+ if (pMiscAttr!=NULL) {
+ const SfxItemSet& rSet=pMiscAttr->GetItemSet();
+ SdrTextHorzAdjust eRet=((SdrTextHorzAdjustItem&)(rSet.Get(SDRATTR_TEXT_HORZADJUST))).GetValue();
+ if (eRet==SDRTEXTHORZADJUST_BLOCK) {
+ SdrTextAniKind eAniKind=((SdrTextAniKindItem&)(rSet.Get(SDRATTR_TEXT_ANIKIND))).GetValue();
+ if (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE) {
+ SdrTextAniDirection eDirection=((SdrTextAniDirectionItem&)(rSet.Get(SDRATTR_TEXT_ANIDIRECTION))).GetValue();
+ if (eDirection==SDRTEXTANI_LEFT || eDirection==SDRTEXTANI_RIGHT) {
+ eRet=SDRTEXTHORZADJUST_LEFT;
+ }
+ }
+ }
+ return eRet;
+ }
+ return bTextFrame ? SDRTEXTHORZADJUST_BLOCK : SDRTEXTHORZADJUST_CENTER;
+} // defaults: BLOCK fuer Textrahmen, CENTER fuer beschriftete Grafikobjekte
+
+SdrTextVertAdjust SdrTextObj::GetTextVerticalAdjust() const
+{
+ if (IsContourTextFrame()) return SDRTEXTVERTADJUST_TOP;
+ if (pMiscAttr!=NULL) {
+ const SfxItemSet& rSet=pMiscAttr->GetItemSet();
+ SdrTextVertAdjust eRet=((SdrTextVertAdjustItem&)(rSet.Get(SDRATTR_TEXT_VERTADJUST))).GetValue();
+ return eRet;
+ }
+ return bTextFrame ? SDRTEXTVERTADJUST_TOP : SDRTEXTVERTADJUST_CENTER;
+} // defaults: TOP fuer Textrahmen, CENTER fuer beschriftete Grafikobjekte
+
+void SdrTextObj::ImpJustifyRect(Rectangle& rRect) const
+{
+ if (!rRect.IsEmpty()) {
+ rRect.Justify();
+ if (rRect.Left()==rRect.Right()) rRect.Right()++;
+ if (rRect.Top()==rRect.Bottom()) rRect.Bottom()++;
+ }
+}
+
+void SdrTextObj::ImpCheckShear()
+{
+ if (bNoShear && aGeo.nShearWink!=0) {
+ aGeo.nShearWink=0;
+ aGeo.nTan=0;
+ }
+}
+
+void SdrTextObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ FASTBOOL bNoTextFrame=!IsTextFrame();
+ rInfo.bResizeFreeAllowed=bNoTextFrame || aGeo.nDrehWink%9000==0;
+ rInfo.bResizePropAllowed=TRUE;
+ rInfo.bRotateFreeAllowed=TRUE;
+ rInfo.bRotate90Allowed =TRUE;
+ rInfo.bMirrorFreeAllowed=bNoTextFrame;
+ rInfo.bMirror45Allowed =bNoTextFrame;
+ rInfo.bMirror90Allowed =bNoTextFrame;
+
+ // allow transparence
+ rInfo.bTransparenceAllowed = TRUE;
+
+ // gradient depends on fillstyle
+ XFillStyle eFillStyle = ((XFillStyleItem&)(GetSetItem(1)->GetItemSet().Get(XATTR_FILLSTYLE))).GetValue();
+ rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT);
+ rInfo.bShearAllowed =bNoTextFrame;
+ FASTBOOL bCanConv=ImpCanConvTextToCurve();
+ rInfo.bCanConvToPath =bCanConv;
+ rInfo.bCanConvToPoly =bCanConv;
+ rInfo.bCanConvToPathLineToArea=bCanConv;
+ rInfo.bCanConvToPolyLineToArea=bCanConv;
+ rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
+}
+
+UINT16 SdrTextObj::GetObjIdentifier() const
+{
+ return USHORT(eTextKind);
+}
+
+FASTBOOL SdrTextObj::HasEditText() const
+{
+ FASTBOOL bRet=FALSE;
+ if (pEdtOutl!=NULL) {
+ Paragraph* p1stPara=pEdtOutl->GetParagraph( 0 );
+ ULONG nParaAnz=pEdtOutl->GetParagraphCount();
+ if (p1stPara==NULL) nParaAnz=0;
+ if (nParaAnz==1) { // bei nur einem Para nachsehen ob da ueberhaupt was drin steht
+ XubString aStr(pEdtOutl->GetText(p1stPara));
+
+ // Aha, steht nix drin!
+ if(!aStr.Len())
+ nParaAnz = 0;
+ }
+ bRet=nParaAnz!=0;
+ }
+ return bRet;
+}
+
+void SdrTextObj::SetPage(SdrPage* pNewPage)
+{
+ FASTBOOL bRemove=pNewPage==NULL && pPage!=NULL;
+ FASTBOOL bInsert=pNewPage!=NULL && pPage==NULL;
+ FASTBOOL bLinked=IsLinkedText();
+
+ if (bLinked && bRemove) {
+ ImpLinkAbmeldung();
+ }
+
+ SdrAttrObj::SetPage(pNewPage);
+
+ if (bLinked && bInsert) {
+ ImpLinkAnmeldung();
+ }
+}
+
+void SdrTextObj::SetModel(SdrModel* pNewModel)
+{
+ SdrModel* pOldModel=pModel;
+ FASTBOOL bLinked=IsLinkedText();
+ FASTBOOL bChg=pNewModel!=pModel;
+ FASTBOOL bHgtSet=pOutlAttr!=NULL && pOutlAttr->GetItemSet().GetItemState(EE_CHAR_FONTHEIGHT,TRUE)==SFX_ITEM_SET;
+ if (bLinked && bChg) {
+ ImpLinkAbmeldung();
+ }
+
+ SdrAttrObj::SetModel(pNewModel);
+
+ if (bChg && pOutlinerParaObject!=NULL && pOldModel!=NULL && pNewModel!=NULL) {
+ MapUnit aOldUnit(pOldModel->GetScaleUnit());
+ MapUnit aNewUnit(pNewModel->GetScaleUnit());
+ FASTBOOL bScaleUnitChanged=aNewUnit!=aOldUnit;
+ SetTextSizeDirty();
+ // und nun dem OutlinerParaObject einen neuen Pool verpassen
+ // !!! Hier muss noch DefTab und RefDevice der beiden Models
+ // !!! verglichen werden und dann ggf. AutoGrow zuschlagen !!!
+ // !!! fehlende Implementation !!!
+ ULONG nOldFontHgt=pOldModel->GetDefaultFontHeight();
+ ULONG nNewFontHgt=pNewModel->GetDefaultFontHeight();
+ FASTBOOL bDefHgtChanged=nNewFontHgt!=nOldFontHgt;
+ FASTBOOL bSetHgtItem=bDefHgtChanged && pOutlAttr!=NULL && !bHgtSet;
+ if (bSetHgtItem) { // #32665#
+ // zunaechst das HeightItem festklopfen, damit
+ // 1. Es eben bestehen bleibt und
+ // 2. DoStretchChars vom richtigen Wert ausgeht
+ SdrOutlinerSetItem aSI(*pOutlAttr);
+ aSI.GetItemSet().Put(SvxFontHeightItem(nOldFontHgt));
+ pOutlAttr=(SdrOutlinerSetItem*)ImpSetNewAttr(pOutlAttr,&aSI);
+ }
+ // erst jetzt den Outliner holen, etc. damit obiges SetAttr auch wirkt
+ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+ rOutliner.SetText(*pOutlinerParaObject);
+ delete pOutlinerParaObject;
+ pOutlinerParaObject=NULL;
+ if (bScaleUnitChanged) {
+ Fraction aMetricFactor=GetMapFactor(aOldUnit,aNewUnit).X();
+
+ // Funktioniert nicht richtig:
+ // Geht am Outliner leider nur in %
+ // double nPercFloat=double(aMetricFactor)*100+0.5;
+ // USHORT nPerc=(USHORT)nPercFloat;
+ // rOutliner.DoStretchChars(100,nPerc);
+
+ if (bSetHgtItem) {
+ // Und nun noch das Rahmenattribut korregieren
+ nOldFontHgt=BigMulDiv(nOldFontHgt,aMetricFactor.GetNumerator(),aMetricFactor.GetDenominator());
+ SdrOutlinerSetItem aSI(*pOutlAttr);
+ aSI.GetItemSet().Put(SvxFontHeightItem(nOldFontHgt));
+ pOutlAttr=(SdrOutlinerSetItem*)ImpSetNewAttr(pOutlAttr,&aSI);
+ }
+ }
+ SetOutlinerParaObject(rOutliner.CreateParaObject()); // #34494#
+ pOutlinerParaObject->ClearPortionInfo();
+ bPortionInfoChecked=FALSE;
+ rOutliner.Clear();
+ //ImpSetTextStyleSheetListeners();
+ }
+
+ if (bLinked && bChg) {
+ ImpLinkAnmeldung();
+ }
+}
+
+SdrOutliner& SdrTextObj::ImpGetDrawOutliner() const
+{
+ SdrOutliner& rOutl=pModel->GetDrawOutliner(this);
+ rOutl.SetUpdateMode(FALSE);
+ USHORT nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+ if ( !IsOutlText() )
+ nOutlinerMode = OUTLINERMODE_TEXTOBJECT;
+ rOutl.Init( nOutlinerMode );
+
+ rOutl.SetGlobalCharStretching(100,100);
+ ULONG nStat=rOutl.GetControlWord();
+ nStat&=~(EE_CNTRL_STRETCHING|EE_CNTRL_AUTOPAGESIZE);
+ rOutl.SetControlWord(nStat);
+ Size aNullSize;
+ Size aMaxSize(100000,100000);
+ rOutl.SetMinAutoPaperSize(aNullSize);
+ rOutl.SetMaxAutoPaperSize(aMaxSize);
+ rOutl.SetPaperSize(aMaxSize);
+ rOutl.ClearPolygon();
+
+ return rOutl;
+}
+
+FASTBOOL SdrTextObj::NbcSetEckenradius(long nRad)
+{
+ if (pMiscAttr!=NULL) {
+ SdrMiscSetItem aSI(*pMiscAttr);
+ aSI.GetItemSet().Put(SdrEckenradiusItem(nRad));
+ pMiscAttr=(SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,&aSI);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+FASTBOOL SdrTextObj::NbcSetAutoGrowHeight(FASTBOOL bAuto)
+{
+ if (pMiscAttr!=NULL && bTextFrame) {
+ SdrMiscSetItem aSI(*pMiscAttr);
+ aSI.GetItemSet().Put(SdrTextAutoGrowHeightItem(bAuto));
+ pMiscAttr=(SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,&aSI);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+FASTBOOL SdrTextObj::NbcSetMinTextFrameHeight(long nHgt)
+{
+ if (pMiscAttr!=NULL && bTextFrame) {
+ SdrMiscSetItem aSI(*pMiscAttr);
+ aSI.GetItemSet().Put(SdrTextMinFrameHeightItem(nHgt));
+ pMiscAttr=(SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,&aSI);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+FASTBOOL SdrTextObj::NbcSetMaxTextFrameHeight(long nHgt)
+{
+ if (pMiscAttr!=NULL && bTextFrame) {
+ SdrMiscSetItem aSI(*pMiscAttr);
+ aSI.GetItemSet().Put(SdrTextMaxFrameHeightItem(nHgt));
+ pMiscAttr=(SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,&aSI);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+FASTBOOL SdrTextObj::NbcSetAutoGrowWidth(FASTBOOL bAuto)
+{
+ if (pMiscAttr!=NULL && bTextFrame) {
+ SdrMiscSetItem aSI(*pMiscAttr);
+ aSI.GetItemSet().Put(SdrTextAutoGrowWidthItem(bAuto));
+ pMiscAttr=(SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,&aSI);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+FASTBOOL SdrTextObj::NbcSetMinTextFrameWidth(long nWdt)
+{
+ if (pMiscAttr!=NULL && bTextFrame) {
+ SdrMiscSetItem aSI(*pMiscAttr);
+ aSI.GetItemSet().Put(SdrTextMinFrameWidthItem(nWdt));
+ if (bDisableAutoWidthOnDragging) {
+ bDisableAutoWidthOnDragging=FALSE;
+ aSI.GetItemSet().Put(SdrTextAutoGrowWidthItem(FALSE));
+ }
+ pMiscAttr=(SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,&aSI);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+FASTBOOL SdrTextObj::NbcSetMaxTextFrameWidth(long nWdt)
+{
+ if (pMiscAttr!=NULL && bTextFrame) {
+ SdrMiscSetItem aSI(*pMiscAttr);
+ aSI.GetItemSet().Put(SdrTextMaxFrameWidthItem(nWdt));
+ pMiscAttr=(SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,&aSI);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+FASTBOOL SdrTextObj::NbcSetFitToSize(SdrFitToSizeType eFit)
+{
+ if (pMiscAttr!=NULL && bTextFrame) {
+ SdrMiscSetItem aSI(*pMiscAttr);
+ aSI.GetItemSet().Put(SdrTextFitToSizeTypeItem(eFit));
+ pMiscAttr=(SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,&aSI);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, BOOL bLineWidth ) const
+{
+
+ XPolyPolygon aXorXPP;
+ TakeXorPoly(aXorXPP, FALSE);
+ if (aGeo.nDrehWink!=0) { // Unrotate!
+ RotateXPoly(aXorXPP,rAnchorRect.TopLeft(),-aGeo.nSin,aGeo.nCos);
+ }
+ Point aRef(rAnchorRect.TopLeft());
+ aXorXPP.Move(-aRef.X(),-aRef.Y());
+
+ XPolyPolygon* pContourXPP = NULL;
+
+ if( bLineWidth )
+ {
+ // Strichstaerke beruecksichtigen
+ // Beim Hittest muss das unterbleiben (Performance!)
+ pContourXPP = new XPolyPolygon();
+ TakeContour(*pContourXPP);
+ if (aGeo.nDrehWink!=0) // Unrotate!
+ RotateXPoly(*pContourXPP,rAnchorRect.TopLeft(),-aGeo.nSin,aGeo.nCos);
+ pContourXPP->Move(-aRef.X(),-aRef.Y());
+ }
+ rOutliner.SetPolygon(aXorXPP, pContourXPP);
+}
+
+void SdrTextObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
+{
+ rRect=aRect;
+}
+
+void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const
+{
+ long nLeftDist=GetTextLeftDistance();
+ long nRightDist=GetTextRightDistance();
+ long nUpperDist=GetTextUpperDistance();
+ long nLowerDist=GetTextLowerDistance();
+ Rectangle aAnkRect(aRect); // Rect innerhalb dem geankert wird
+ FASTBOOL bFrame=IsTextFrame();
+ if (!bFrame) {
+ TakeUnrotatedSnapRect(aAnkRect);
+ }
+ Point aRotateRef(aAnkRect.TopLeft());
+ aAnkRect.Left()+=nLeftDist;
+ aAnkRect.Top()+=nUpperDist;
+ aAnkRect.Right()-=nRightDist;
+ aAnkRect.Bottom()-=nLowerDist;
+ if (bFrame) {
+ // !!! hier noch etwas verfeinern !!!
+ if (aAnkRect.GetWidth()<2) aAnkRect.Right()=aAnkRect.Left()+1; // Mindestgroesse 2
+ if (aAnkRect.GetHeight()<2) aAnkRect.Bottom()=aAnkRect.Top()+1; // Mindestgroesse 2
+ }
+ if (aGeo.nDrehWink!=0) {
+ Point aTmpPt(aAnkRect.TopLeft());
+ RotatePoint(aTmpPt,aRotateRef,aGeo.nSin,aGeo.nCos);
+ aTmpPt-=aAnkRect.TopLeft();
+ aAnkRect.Move(aTmpPt.X(),aTmpPt.Y());
+ }
+ rAnchorRect=aAnkRect;
+}
+
+void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText,
+ Rectangle* pAnchorRect, BOOL bLineWidth ) const
+{
+ Rectangle aAnkRect; // Rect innerhalb dem geankert wird
+ TakeTextAnchorRect(aAnkRect);
+ SdrTextVertAdjust eVAdj=GetTextVerticalAdjust();
+ SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
+ SdrTextAniKind eAniKind=GetTextAniKind();
+ SdrTextAniDirection eAniDirection=GetTextAniDirection();
+
+ SdrFitToSizeType eFit=GetFitToSize();
+ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ FASTBOOL bContourFrame=IsContourTextFrame();
+
+ FASTBOOL bFrame=IsTextFrame();
+ ULONG nStat0=rOutliner.GetControlWord();
+ Size aNullSize;
+ if (!bContourFrame)
+ {
+ rOutliner.SetControlWord(nStat0|EE_CNTRL_AUTOPAGESIZE);
+ rOutliner.SetMinAutoPaperSize(aNullSize);
+ rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
+ }
+
+ if (!bFitToSize && !bContourFrame)
+ {
+ long nAnkWdt=aAnkRect.GetWidth();
+ long nAnkHgt=aAnkRect.GetHeight();
+ if (bFrame)
+ {
+ long nWdt=nAnkWdt;
+ long nHgt=nAnkHgt;
+ if (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE)
+ {
+ // Grenzenlose Papiergroesse fuer Laufschrift
+ if (eAniDirection==SDRTEXTANI_LEFT || eAniDirection==SDRTEXTANI_RIGHT) nWdt=1000000;
+ if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nHgt=1000000;
+ }
+ rOutliner.SetMaxAutoPaperSize(Size(nWdt,nHgt));
+ }
+ if (eHAdj==SDRTEXTHORZADJUST_BLOCK)
+ rOutliner.SetMinAutoPaperSize(Size(nAnkWdt,0));
+ }
+
+ rOutliner.SetPaperSize(aNullSize);
+ if (bContourFrame)
+ ImpSetContourPolygon( rOutliner, aAnkRect, bLineWidth );
+
+ // Text in den Outliner stecken - ggf. den aus dem EditOutliner
+ OutlinerParaObject* pPara=pOutlinerParaObject;
+ if (pEdtOutl && !bNoEditText)
+ pPara=pEdtOutl->CreateParaObject();
+
+ if (pPara)
+ {
+ BOOL bHitTest = FALSE;
+ if( pModel )
+ bHitTest = &pModel->GetHitTestOutliner() == &rOutliner;
+
+ const SdrTextObj* pTestObj = rOutliner.GetTextObj();
+ if( !pTestObj || !bHitTest || pTestObj != this ||
+ pTestObj->GetOutlinerParaObject() != pOutlinerParaObject )
+ {
+ if( bHitTest )
+ rOutliner.SetTextObj( this );
+
+ rOutliner.SetText(*pPara);
+ }
+ }
+ else
+ {
+// rOutliner.Clear();
+ rOutliner.SetTextObj( NULL );
+ }
+
+ if (pEdtOutl && !bNoEditText && pPara)
+ delete pPara;
+
+ rOutliner.SetUpdateMode(TRUE);
+ rOutliner.SetControlWord(nStat0);
+
+ if (!bPortionInfoChecked)
+ {
+ // Optimierung: ggf. BigTextObject erzeugen
+ ((SdrTextObj*)this)->bPortionInfoChecked=TRUE;
+ if (pOutlinerParaObject!=NULL && rOutliner.ShouldCreateBigTextObject())
+ ((SdrTextObj*)this)->pOutlinerParaObject=rOutliner.CreateParaObject();
+ }
+
+ Point aTextPos(aAnkRect.TopLeft());
+ Size aTextSiz(rOutliner.GetPaperSize()); // GetPaperSize() hat etwas Toleranz drauf, oder?
+
+ if (eHAdj==SDRTEXTHORZADJUST_CENTER || eHAdj==SDRTEXTHORZADJUST_RIGHT)
+ {
+ long nFreeWdt=aAnkRect.GetWidth()-aTextSiz.Width();
+ if (eHAdj==SDRTEXTHORZADJUST_CENTER)
+ aTextPos.X()+=nFreeWdt/2;
+ if (eHAdj==SDRTEXTHORZADJUST_RIGHT)
+ aTextPos.X()+=nFreeWdt;
+ }
+ if (eVAdj==SDRTEXTVERTADJUST_CENTER || eVAdj==SDRTEXTVERTADJUST_BOTTOM)
+ {
+ long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
+ if (eVAdj==SDRTEXTVERTADJUST_CENTER)
+ aTextPos.Y()+=nFreeHgt/2;
+ if (eVAdj==SDRTEXTVERTADJUST_BOTTOM)
+ aTextPos.Y()+=nFreeHgt;
+ }
+ if (aGeo.nDrehWink!=0)
+ RotatePoint(aTextPos,aAnkRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+
+ if (pAnchorRect)
+ *pAnchorRect=aAnkRect;
+
+ // rTextRect ist bei ContourFrame in einigen Faellen nicht korrekt
+ rTextRect=Rectangle(aTextPos,aTextSiz);
+ if (bContourFrame)
+ rTextRect=aAnkRect;
+}
+
+OutlinerParaObject* SdrTextObj::ImpGetEditOutlinerParaObject() const
+{
+ OutlinerParaObject* pPara=NULL;
+ if (pEdtOutl!=NULL) { // Wird gerade editiert, also das ParaObject aus dem aktiven Editor verwenden
+ Paragraph* p1stPara=pEdtOutl->GetParagraph( 0 );
+ ULONG nParaAnz=pEdtOutl->GetParagraphCount();
+ if (nParaAnz==1 && p1stPara!=NULL) { // bei nur einem Para nachsehen ob da ueberhaupt was drin steht
+ XubString aStr(pEdtOutl->GetText(p1stPara));
+
+ // Aha, steht nix drin!
+ if(!aStr.Len())
+ nParaAnz = 0;
+ }
+ if (p1stPara!=NULL && nParaAnz!=0) {
+ pPara=pEdtOutl->CreateParaObject(0, nParaAnz);
+ }
+ }
+ return pPara;
+}
+
+void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& rTextRect, const Rectangle& rAnchorRect, Fraction& rFitXKorreg) const
+{
+ OutputDevice* pOut = rOutliner.GetRefDevice();
+ BOOL bNoStretching(FALSE);
+
+ if(pOut && pOut->GetOutDevType() == OUTDEV_PRINTER)
+ {
+ // #35762#: Checken ob CharStretching ueberhaupt moeglich
+ GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
+ UniString aTestString(sal_Unicode('J'));
+
+ if(pMtf && (!pMtf->IsRecord() || pMtf->IsPause()))
+ pMtf = NULL;
+
+ if(pMtf)
+ pMtf->Pause(TRUE);
+
+ Font aFontMerk(pOut->GetFont());
+ Font aTmpFont(System::GetStandardFont(STDFONT_ROMAN));
+
+ aTmpFont.SetSize(Size(0,100));
+ pOut->SetFont(aTmpFont);
+ Size aSize1(pOut->GetTextWidth(aTestString), pOut->GetTextHeight());
+ aTmpFont.SetSize(Size(800,100));
+ pOut->SetFont(aTmpFont);
+ Size aSize2(pOut->GetTextWidth(aTestString), pOut->GetTextHeight());
+ pOut->SetFont(aFontMerk);
+
+ if(pMtf)
+ pMtf->Pause(FALSE);
+
+ bNoStretching = (aSize1 == aSize2);
+
+#ifdef WNT
+ // #35762# Windows vergroessert bei Size(100,500) den Font proportional
+ // Und das finden wir nicht so schoen.
+ if(aSize2.Height() >= aSize1.Height() * 2)
+ {
+ bNoStretching = TRUE;
+ }
+#endif
+ }
+ unsigned nLoopCount=0;
+ FASTBOOL bNoMoreLoop=FALSE;
+ long nXDiff0=0x7FFFFFFF;
+ long nWantWdt=rAnchorRect.Right()-rAnchorRect.Left();
+ long nIsWdt=rTextRect.Right()-rTextRect.Left();
+ if (nIsWdt==0) nIsWdt=1;
+
+ long nWantHgt=rAnchorRect.Bottom()-rAnchorRect.Top();
+ long nIsHgt=rTextRect.Bottom()-rTextRect.Top();
+ if (nIsHgt==0) nIsHgt=1;
+
+ long nXTolPl=nWantWdt/100; // Toleranz +1%
+ long nXTolMi=nWantWdt/25; // Toleranz -4%
+ long nXKorr =nWantWdt/20; // Korrekturmasstab 5%
+
+ long nX=(nWantWdt*100) /nIsWdt; // X-Stretching berechnen
+ long nY=(nWantHgt*100) /nIsHgt; // Y-Stretching berechnen
+ FASTBOOL bChkX=TRUE;
+ FASTBOOL bChkY=TRUE;
+ if (bNoStretching) { // #35762# evtl. nur proportional moeglich
+ if (nX>nY) { nX=nY; bChkX=FALSE; }
+ else { nY=nX; bChkY=FALSE; }
+ }
+
+ while (nLoopCount<5 && !bNoMoreLoop) {
+ if (nX<0) nX=-nX;
+ if (nX<1) { nX=1; bNoMoreLoop=TRUE; }
+ if (nX>65535) { nX=65535; bNoMoreLoop=TRUE; }
+
+ if (nY<0) nY=-nY;
+ if (nY<1) { nY=1; bNoMoreLoop=TRUE; }
+ if (nY>65535) { nY=65535; bNoMoreLoop=TRUE; }
+
+ if (nIsWdt<=1) { // Ausnahme, weil warscheinlich noch gar kein Text drin ist
+ nX=nY;
+ bNoMoreLoop=TRUE;
+ }
+ rOutliner.SetGlobalCharStretching((USHORT)nX,(USHORT)nY);
+ nLoopCount++;
+ Size aSiz(rOutliner.CalcTextSize());
+ long nXDiff=aSiz.Width()-nWantWdt;
+ rFitXKorreg=Fraction(nWantWdt,aSiz.Width());
+ if (((nXDiff>=nXTolMi || !bChkX) && nXDiff<=nXTolPl) || nXDiff==nXDiff0/*&& Abs(nYDiff)<=nYTol*/) {
+ bNoMoreLoop=TRUE;
+ } else {
+ // Stretchingfaktoren korregieren
+ long nMul=nWantWdt;
+ long nDiv=aSiz.Width();
+ if (Abs(nXDiff)<=2*nXKorr) {
+ if (nMul>nDiv) nDiv+=(nMul-nDiv)/2; // und zwar nur um die haelfte des berechneten
+ else nMul+=(nDiv-nMul)/2; // weil die EE ja eh wieder falsch rechnet
+ }
+ nX=nX*nMul/nDiv;
+ if (bNoStretching) nY=nX;
+ }
+ nXDiff0=nXDiff;
+ }
+}
+
+FASTBOOL SdrTextObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ // Hidden objects on masterpages, draw nothing
+ if((rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE) && bNotVisibleAsMaster)
+ return TRUE;
+
+ FASTBOOL bOk=TRUE;
+ FASTBOOL bPrinter=rXOut.GetOutDev()->GetOutDevType()==OUTDEV_PRINTER;
+
+ if (bPrinter && bEmptyPresObj)
+ return bOk; // Leere Praesentationsobjekte nicht drucken!
+
+ if (!bPrinter && pEdtOutl!=NULL && rInfoRec.pPV!=NULL &&
+ rInfoRec.pPV->GetView().GetTextEditObject()==(SdrObject*)this)
+ return bOk; // Textobjekt wird gerade editiert in der auffordernen View
+
+ if ((rInfoRec.nPaintMode & SDRPAINTMODE_DRAFTTEXT) ==0)
+ {
+ if (pOutlinerParaObject!=NULL || (pEdtOutl!=NULL && HasEditText()))
+ {
+ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+ FASTBOOL bContourFrame=IsContourTextFrame();
+ if (IsFontwork() && !bContourFrame)
+ { // FontWork
+ if (pModel!=NULL)
+ {
+ rOutliner.SetUpdateMode(TRUE); // hier kann ggf. noch optimiert werden !!!
+ ImpTextPortionHandler aTPHandler(rOutliner,*this);
+ rXOut.SetTextAttr(*pTextAttr);
+ aTPHandler.DrawTextToPath(rXOut); // drucken bei aktivem Textedit fehlt hier
+ rOutliner.Clear();
+ }
+ }
+ else
+ {
+ // sonst kein Fontwork
+ // hier findet das richtige Painten des Textes statt
+
+ if (!bContourFrame)
+ {
+ // FitToSize erstmal nicht mit ContourFrame
+ SdrFitToSizeType eFit=GetFitToSize();
+ if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES)
+ {
+ ULONG nStat=rOutliner.GetControlWord();
+ nStat|=EE_CNTRL_STRETCHING|EE_CNTRL_AUTOPAGESIZE;
+ rOutliner.SetControlWord(nStat);
+ }
+ }
+
+ Rectangle aTextRect;
+ Rectangle aAnchorRect;
+ TakeTextRect(rOutliner, aTextRect, FALSE, &aAnchorRect);
+ Rectangle aPaintRect(aTextRect);
+ Fraction aFitXKorreg(1,1);
+ FASTBOOL bFitKorreg=FALSE;
+
+ if (!bContourFrame)
+ {
+ // FitToSize erstmal nicht mit ContourFrame
+ SdrFitToSizeType eFit=GetFitToSize();
+ if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES)
+ {
+ ImpSetCharStretching(rOutliner,aTextRect,aAnchorRect,aFitXKorreg);
+ aPaintRect=aAnchorRect;
+ }
+ }
+ FASTBOOL bAnimated=GetTextAniKind()!=SDRTEXTANI_NONE;
+ OutputDevice* pOutDev=rXOut.GetOutDev();
+ if (bPrinter || (rInfoRec.nPaintMode & SDRPAINTMODE_ANILIKEPRN) !=0 || !bAnimated)
+ {
+ if (!bAnimated && pPlusData!=NULL && pPlusData->pAnimator!=NULL)
+ {
+ delete pPlusData->pAnimator;
+ pPlusData->pAnimator=NULL;
+ }
+ if (aGeo.nDrehWink!=0)
+ {
+ // #49328# bei AutoGrowHeight()=TRUE nicht mehr clippen
+ FASTBOOL bNeedClip=(bTextFrame && !IsAutoGrowHeight()) || bContourFrame;
+ // ClipRegion setzen. Das macht Malte bei gedrehter Ausgabe naemlich nicht!
+ FASTBOOL bMtf=pOutDev->GetConnectMetaFile()!=NULL;
+ // Clipping merken
+ FASTBOOL bClip0=pOutDev->IsClipRegion();
+ Region aClip0(pOutDev->GetClipRegion());
+ if (bNeedClip)
+ {
+ if (bMtf) pOutDev->Push();
+ // Neues Clipping setzen
+ Rectangle aClipRect(aPaintRect);
+ if (bPrinter)
+ { // #42520#: Bei HP-Druckern fehlt sonst oefter der letzte Buchstabe einer Zeile
+ Size a1Pix(pOutDev->PixelToLogic(Size(1,1)));
+ aClipRect.Top()-=a1Pix.Width();
+ aClipRect.Left()-=a1Pix.Height();
+ aClipRect.Right()+=a1Pix.Width();
+ aClipRect.Bottom()+=a1Pix.Height();
+ }
+ Polygon aClipPoly(aClipRect);
+ RotatePoly(aClipPoly,aPaintRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ // Intersect geht leider nicht, weil Poly statt Rect
+ pOutDev->SetClipRegion(aClipPoly);
+ if (bClip0)
+ {
+ // Aber wenn's vorher nur ein Rechteck war, dann
+ // intersecte ich mein Poly nun mit diesem
+ pOutDev->IntersectClipRegion(aClip0.GetBoundRect());
+ }
+ }
+ // Textausgabe
+ rOutliner.Draw(pOutDev,aPaintRect.TopLeft(),(short)(aGeo.nDrehWink/10));
+ if (bNeedClip)
+ {
+ // Clipping restaurieren
+ if (bMtf)
+ pOutDev->Pop();
+ else
+ {
+ if (bClip0)
+ pOutDev->SetClipRegion(aClip0);
+ else
+ pOutDev->SetClipRegion();
+ }
+ }
+ }
+ else
+ {
+ // hier mal vereinheitlichen:
+ // - Grundsaetzlich selbst Clippen
+ // - nicht mehr die Methode mit dem PaintRect verwenden
+ if (!bFitKorreg)
+ {
+ rOutliner.Draw(pOutDev,aPaintRect);
+ }
+ else
+ {
+ ImpTextPortionHandler aHdl(rOutliner,*this);
+ aHdl.DrawFitText(rXOut,aPaintRect.TopLeft(),aFitXKorreg);
+ }
+ }
+ }
+ else
+ ImpPaintAnimatedText(*rXOut.GetOutDev(),rXOut.GetOffset(),rOutliner,aAnchorRect,aPaintRect,rInfoRec);
+
+ rOutliner.Clear();
+ }
+ } // if (pPara!=NULL)
+ if (bEmptyPresObj)
+ {
+ // leere Praesentationsobjekte bekommen einen grauen Rahmen
+ rXOut.GetOutDev()->SetFillColor();
+ rXOut.GetOutDev()->SetLineColor( Color( COL_GRAY ) );
+
+ if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0)
+ {
+ Polygon aPoly(aRect);
+ if (aGeo.nShearWink!=0)
+ ShearPoly(aPoly,aRect.TopLeft(),aGeo.nTan);
+
+ if (aGeo.nDrehWink!=0)
+ RotatePoly(aPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+
+ rXOut.GetOutDev()->DrawPolyLine(aPoly);
+ }
+ else
+ {
+ rXOut.GetOutDev()->DrawRect(aRect);
+ }
+ } // if pOutlParaObj!=NULL
+ }
+ else
+ { // sonst SDRPAINTMODE_DRAFTTEXT
+ FASTBOOL bFill=HasFill();
+ FASTBOOL bLine=HasLine();
+ FASTBOOL bHide=IsFontwork() && IsHideContour() && pFormTextBoundRect!=NULL;
+
+ if (bHide)
+ {
+ bFill=FALSE;
+ bLine=FALSE;
+ }
+
+ if ((bTextFrame && !bLine && !bFill) || bHide)
+ {
+ OutputDevice* pOut=rXOut.GetOutDev();
+ Polygon aPoly;
+
+ if (bHide)
+ aPoly=Polygon(*pFormTextBoundRect);
+ else
+ aPoly=Rect2Poly(aRect,aGeo);
+
+ if (aPoly.GetSize()>=4)
+ {
+ pOut->SetLineColor(Color(COL_BLACK));
+ pOut->DrawPolyLine(aPoly);
+ pOut->DrawLine(aPoly[0],aPoly[2]);
+ pOut->DrawLine(aPoly[1],aPoly[3]);
+ }
+ }
+ }
+ return bOk;
+}
+
+// Geht z.Zt. nur wenn das Obj schon wenigstens einmal gepaintet wurde
+// Denn dann ist der MtfAnimator initiallisiert
+void SdrTextObj::StartTextAnimation(OutputDevice* pOutDev, const Point& rOffset, long nExtraData)
+{
+ if (GetTextAniKind()!=SDRTEXTANI_NONE && ImpGetMtfAnimator()!=NULL) {
+ ImpSdrMtfAnimator* pAnimator=ImpForceMtfAnimator();
+ pAnimator->Start(*pOutDev,rOffset,nExtraData);
+ }
+}
+
+void SdrTextObj::StopTextAnimation(OutputDevice* pOutDev, long nExtraData)
+{
+ if (pPlusData!=NULL && pPlusData->pAnimator!=NULL) {
+ ImpSdrMtfAnimator* pAnimator=pPlusData->pAnimator;
+ for (ULONG nInfoNum=pAnimator->GetInfoCount(); nInfoNum>0;) {
+ nInfoNum--;
+ ImpMtfAnimationInfo* pInfo=pAnimator->GetInfo(nInfoNum);
+ if (pInfo->nExtraData==nExtraData &&
+ (pOutDev==NULL || pInfo->pOutDev==pOutDev)) pAnimator->RemoveInfo(nInfoNum);
+ }
+ }
+}
+
+FASTBOOL SdrTextObj::ImpPaintAnimatedText(OutputDevice& rOut, const Point& rOffset,
+ SdrOutliner& rOutliner, const Rectangle& rAnchorRect, const Rectangle& rPaintRect, const SdrPaintInfoRec& rInfoRec) const
+{
+ if (pMiscAttr==NULL) return FALSE;
+ const SfxItemSet& rSet=pMiscAttr->GetItemSet();
+ SdrTextAniKind eAniKind=GetTextAniKind();
+ FASTBOOL bBlink=eAniKind==SDRTEXTANI_BLINK;
+ SdrTextAniDirection eDirection=((SdrTextAniDirectionItem&)(rSet.Get(SDRATTR_TEXT_ANIDIRECTION))).GetValue();
+ ImpSdrMtfAnimator* pAnimator=((SdrTextObj*)this)->ImpForceMtfAnimator();
+ pAnimator->SetAnimationNotifyHdl(LINK(this,SdrTextObj,ImpAnimationHdl));
+ // erstmal checken, ob nicht schon laeuft
+ ImpMtfAnimationInfo* pRunningInfo=NULL;
+ for (ULONG nInfoNum=pAnimator->GetInfoCount(); nInfoNum>0 && pRunningInfo==NULL;) {
+ nInfoNum--;
+ ImpMtfAnimationInfo* pInfo=pAnimator->GetInfo(nInfoNum);
+ if (pInfo->pPageView==rInfoRec.pPV && pInfo->pOutDev==&rOut) {
+ if (!pInfo->bBackSaved) pRunningInfo=pInfo;
+ else {
+ MapMode aMap1(pInfo->aBackground.GetMapMode());
+ MapMode aMap2(rOut.GetMapMode());
+ if (aMap1.GetMapUnit()==aMap2.GetMapUnit() &&
+ aMap1.GetScaleX()==aMap2.GetScaleX() &&
+ aMap1.GetScaleY()==aMap2.GetScaleY()) pRunningInfo=pInfo;
+ }
+ }
+ }
+ if (pRunningInfo!=NULL) {
+ if (pRunningInfo->bBackSaved) {
+ // Teilinvalidierung des Hintergrunds
+ Rectangle aClipRect(rInfoRec.aDirtyRect);
+ if (rOut.GetMapMode().GetMapUnit()==MAP_TWIP) {
+ HACK(Bei Teilinvalidierung von Laufschrift im Writer 1 Pixel korregieren);
+ Size a1Pix(rOut.PixelToLogic(Size(1,1)));
+ aClipRect.Top()+=a1Pix.Width();
+ aClipRect.Left()+=a1Pix.Height();
+ aClipRect.Right()-=a1Pix.Width();
+ aClipRect.Bottom()-=a1Pix.Height();
+ }
+ Region aRegion(aClipRect);
+ pRunningInfo->SaveBackground(*pAnimator,&aRegion);
+ pRunningInfo->Paint(*pAnimator,rOut);
+ }
+ return TRUE;
+ }
+ pAnimator->SetAttributes(rSet);
+
+ Point aRotateRef(rAnchorRect.TopLeft());
+ // Die Drehreferenz ist bei allen Rechtecken jeweils das eigene TopLeft()
+ // (rPaintRect,rAnchorRect). Ich verschiebe nun aPaintRect so, dass fuer
+ // beide die Drehreferenz rAnchorRect.TopLeft() gilt.
+ Rectangle aPaintRect(rPaintRect);
+ if (GetTextHorizontalAdjust()==SDRTEXTHORZADJUST_BLOCK &&
+ GetFitToSize()!=SDRTEXTFIT_NONE) {
+ // Bei den Default-Textrahmen muss ich erstmal die laengste Zeile berechnen
+ // Das gibt allerdings Probleme bei Absatzformatierungen Center, Rechts
+ // und evtl. auch bei Blocksatz.
+ Size aSiz(rOutliner.CalcTextSize());
+ aPaintRect.Right()=aPaintRect.Left()+aSiz.Width();
+ aPaintRect.Bottom()=aPaintRect.Top()+aSiz.Height();
+ }
+
+ // PaintRect auf's AnchorRect ausrichten (den selben Drehpunkt fuer alle)
+ if (aGeo.nDrehWink!=0) {
+ if (aPaintRect.TopLeft()!=aRotateRef) {
+ Point aTmpPt(aPaintRect.TopLeft());
+ RotatePoint(aTmpPt,aRotateRef,-aGeo.nSin,aGeo.nCos); // -sin=zurueckdrehen
+ aTmpPt-=aPaintRect.TopLeft();
+ aPaintRect.Move(aTmpPt.X(),aTmpPt.Y());
+ }
+ }
+ Rectangle aScrollFrameRect(aPaintRect);
+ if (!bBlink) {
+ if (eDirection==SDRTEXTANI_LEFT || eDirection==SDRTEXTANI_RIGHT) {
+ aScrollFrameRect.Left()=rAnchorRect.Left();
+ aScrollFrameRect.Right()=rAnchorRect.Right();
+ }
+ if (eDirection==SDRTEXTANI_UP || eDirection==SDRTEXTANI_DOWN) {
+ aScrollFrameRect.Top()=rAnchorRect.Top();
+ aScrollFrameRect.Bottom()=rAnchorRect.Bottom();
+ }
+ }
+ Rectangle aAnimationBoundRect(aScrollFrameRect);
+ if (aGeo.nDrehWink!=0) {
+ // Das aAnimationBoundRect ist das BoundRect des gedrehten aScrollFrameRect.
+ // Fuer diesen Bereich muss spaeter der Hintergrund gesichert werden, ...
+ Polygon aPoly(aAnimationBoundRect);
+ RotatePoly(aPoly,aRotateRef,aGeo.nSin,aGeo.nCos);
+ aAnimationBoundRect=aPoly.GetBoundRect();
+ }
+ // ClipRegion am pAnimator setzen, falls erforderlich
+ if (bBlink) pAnimator->SetClipRegion(); // kein Clipping erforderlich
+ else {
+ if (aGeo.nDrehWink==0) pAnimator->SetClipRegion(aScrollFrameRect); // RectClipping
+ else {
+ Polygon aPoly(aScrollFrameRect);
+ RotatePoly(aPoly,aRotateRef,aGeo.nSin,aGeo.nCos);
+ pAnimator->SetClipRegion(aPoly); // PolyClipping
+ }
+ }
+ Rectangle aAnimationBoundRectPlus(aAnimationBoundRect); // Das ist das AnimationBoundRect +PvOfs
+ aAnimationBoundRectPlus.Move(rOffset.X(),rOffset.Y());
+
+ { // Nun das Metafile erzeugen
+ GDIMetaFile* pMtf=new GDIMetaFile;
+ VirtualDevice aBlackHole;
+ aBlackHole.EnableOutput(FALSE);
+ pMtf->Record(&aBlackHole);
+ Point aPaintPos(rPaintRect.TopLeft());
+ //aPaintPos-=aAnimationBoundRect.TopLeft();
+ // Die RedLines der Online-Rechtschreibpruefung werden via DrawPixel
+ // gemalt. Das ist bei Laufschrift, besonders unter OS/2, viel zu langsam.
+ // Deshalb schalte ich diese hier bei der Metafileaufzeichnung temporaer ab.
+ ULONG nStat0=rOutliner.GetControlWord();
+ rOutliner.SetControlWord(nStat0|EE_CNTRL_NOREDLINES);
+ rOutliner.Draw(&aBlackHole,aPaintPos,(short)(aGeo.nDrehWink/10));
+ rOutliner.SetControlWord(nStat0);
+ pMtf->Stop();
+ pMtf->WindStart();
+ pAnimator->SetGDIMetaFile(pMtf);
+ }
+ pAnimator->SetOutputRect(aAnimationBoundRect);
+ pAnimator->SetScrollFrameRect(aScrollFrameRect);
+ pAnimator->SetMtfFrameRect(aPaintRect);
+ pAnimator->SetRotateRef(aRotateRef);
+ pAnimator->SetRotateAngle(aGeo.nDrehWink);
+
+ ImpMtfAnimationInfo* pInfo=pAnimator->Start(rOut,rOffset);
+ // Nun noch die PageView setzen (fuer Xor)
+ pInfo->pPageView=rInfoRec.pPV;
+ return TRUE;
+}
+
+void SdrTextObj::RecalcBoundRect()
+{
+ aOutRect=GetSnapRect();
+}
+
+void SdrTextObj::ImpAddTextToBoundRect()
+{
+ if (pOutlinerParaObject!=NULL) {
+ if (IsContourTextFrame()) return;
+ if (IsFontwork()) {
+ if (pModel!=NULL) {
+ VirtualDevice aVD;
+ ExtOutputDevice aXOut(&aVD);
+ SdrOutliner& rOutl=ImpGetDrawOutliner();
+ rOutl.SetUpdateMode(TRUE);
+ ImpTextPortionHandler aTPHandler(rOutl,*this);
+ aXOut.SetTextAttr(*pTextAttr);
+ aTPHandler.DrawTextToPath(aXOut,FALSE);
+ if (pFormTextBoundRect==NULL) pFormTextBoundRect=new Rectangle;
+ *pFormTextBoundRect=aTPHandler.GetFormTextBoundRect();
+ aOutRect.Union(*pFormTextBoundRect);
+ }
+ } else { // Ansonsten Text im Zeichenobjekt zentriert
+ if (pFormTextBoundRect!=NULL) {
+ delete pFormTextBoundRect;
+ pFormTextBoundRect=NULL;
+ }
+ FASTBOOL bCheckText=TRUE;
+ if (bTextFrame) {
+ bCheckText=GetTextLeftDistance ()<0 ||
+ GetTextRightDistance()<0 ||
+ GetTextUpperDistance()<0 ||
+ GetTextLowerDistance()<0 ||
+ (GetEckenradius()>0 && aGeo.nDrehWink!=0);
+ }
+ if (bCheckText) {
+ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+ Rectangle aTextRect;
+ Rectangle aAnchorRect;
+ TakeTextRect(rOutliner,aTextRect,TRUE,&aAnchorRect); // EditText ignorieren!
+ SdrFitToSizeType eFit=GetFitToSize();
+ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ if (bFitToSize) aTextRect=aAnchorRect;
+ rOutliner.Clear();
+ if (aGeo.nDrehWink!=0) {
+ Polygon aPol(aTextRect);
+ if (aGeo.nDrehWink!=0) RotatePoly(aPol,aTextRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ aOutRect.Union(aPol.GetBoundRect());
+ } else {
+ aOutRect.Union(aTextRect);
+ }
+ }
+ }
+ }
+}
+
+SdrObject* SdrTextObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ if (!bTextFrame && pOutlinerParaObject==NULL) return NULL;
+ if (pVisiLayer!=NULL && !pVisiLayer->IsSet(nLayerId)) return NULL;
+ INT32 nMyTol=nTol;
+ FASTBOOL bFontwork=IsFontwork();
+ SdrFitToSizeType eFit=GetFitToSize();
+ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ Rectangle aR(aRect);
+ Rectangle aAnchor(aR);
+ Rectangle aTextRect(aR);
+ SdrOutliner* pOutliner = NULL;
+ pOutliner = &pModel->GetHitTestOutliner();
+
+ if (bFontwork) {
+ if (pFormTextBoundRect!=NULL) aR=*pFormTextBoundRect;
+ else aR=GetBoundRect();
+ }
+ else
+ {
+ TakeTextRect( *pOutliner, aTextRect, FALSE, &aAnchor, FALSE ); // EditText nicht mehr ignorieren! TRUE); // EditText ignorieren!
+
+ if (bFitToSize)
+ aR=aAnchor;
+ else
+ aR=aTextRect;
+ }
+ if (aR.GetWidth()-1>short(nTol) && aR.GetHeight()-1>short(nTol)) nMyTol=0; // Keine Toleranz noetig hier
+ if (nMyTol!=0) {
+ aR.Left ()-=nMyTol;
+ aR.Top ()-=nMyTol;
+ aR.Right ()+=nMyTol;
+ aR.Bottom()+=nMyTol;
+ }
+ FASTBOOL bRet=FALSE;
+ if (bFontwork) {
+ bRet=aR.IsInside(rPnt);
+ } else {
+ if (aGeo.nDrehWink!=0) {
+ Polygon aPol(aR);
+ RotatePoly(aPol,aR.TopLeft(),aGeo.nSin,aGeo.nCos);
+ bRet=IsPointInsidePoly(aPol,rPnt);
+ } else {
+ bRet=aR.IsInside(rPnt);
+ }
+ if (bRet) { // und nun noch checken, ob wirklich Buchstaben getroffen sind
+ // Featurewunsch zur 4.0
+ // Zunaechst meine Dok-Koordinaten in EE-Dok-Koordinaten umwandeln.
+ Point aPt(rPnt); aPt-=aR.TopLeft();
+ if (bFitToSize) { // #38214#: FitToSize berueksichtigen
+ Fraction aX(aTextRect.GetWidth()-1,aAnchor.GetWidth()-1);
+ Fraction aY(aTextRect.GetHeight()-1,aAnchor.GetHeight()-1);
+ ResizePoint(aPt,Point(),aX,aY);
+ }
+ if (aGeo.nDrehWink!=0) RotatePoint(aPt,Point(),-aGeo.nSin,aGeo.nCos); // -sin fuer Unrotate
+ // Und nun im EE-Dok auf Buchstabensuche gehen
+ long nHitTol = 2000;
+ OutputDevice* pRef = pOutliner->GetRefDevice();
+ if( pRef )
+ nHitTol = pRef->LogicToLogic( nHitTol, MAP_100TH_MM, pRef->GetMapMode().GetMapUnit() );
+
+ bRet = pOutliner->IsTextPos( aPt, nHitTol );
+ }
+ }
+
+ return bRet ? (SdrObject*)this : NULL;
+}
+
+void SdrTextObj::TakeObjNameSingul(XubString& rName) const
+{
+ XubString aStr;
+
+ switch(eTextKind)
+ {
+ case OBJ_OUTLINETEXT:
+ {
+ aStr = ImpGetResStr(STR_ObjNameSingulOUTLINETEXT);
+ break;
+ }
+
+ case OBJ_TITLETEXT :
+ {
+ aStr = ImpGetResStr(STR_ObjNameSingulTITLETEXT);
+ break;
+ }
+
+ default:
+ {
+ if(IsLinkedText())
+ aStr = ImpGetResStr(STR_ObjNameSingulTEXTLNK);
+ else
+ aStr = ImpGetResStr(STR_ObjNameSingulTEXT);
+ break;
+ }
+ }
+
+ if(pOutlinerParaObject && eTextKind != OBJ_OUTLINETEXT)
+ {
+ // Macht bei OUTLINETEXT wohl derzeit noch etwas Probleme
+ XubString aStr2(pOutlinerParaObject->GetTextObject().GetText(0));
+ aStr2.EraseLeadingChars();
+
+ // #69446# avoid non expanded text portions in object name
+ // (second condition is new)
+ if(aStr2.Len() && aStr2.Search(sal_Unicode(255)) == STRING_NOTFOUND)
+ {
+ // #76681# space between ResStr and content text
+ aStr += sal_Unicode(' ');
+
+ aStr += sal_Unicode('\'');
+
+ if(aStr2.Len() > 10)
+ {
+ aStr2.Erase(8);
+ aStr2.AppendAscii("...", 3);
+ }
+
+ aStr += aStr2;
+ aStr += sal_Unicode('\'');
+ }
+ }
+
+ rName = aStr;
+}
+
+void SdrTextObj::TakeObjNamePlural(XubString& rName) const
+{
+ switch (eTextKind) {
+ case OBJ_OUTLINETEXT: rName=ImpGetResStr(STR_ObjNamePluralOUTLINETEXT); break;
+ case OBJ_TITLETEXT : rName=ImpGetResStr(STR_ObjNamePluralTITLETEXT); break;
+ default: {
+ if (IsLinkedText()) {
+ rName=ImpGetResStr(STR_ObjNamePluralTEXTLNK);
+ } else {
+ rName=ImpGetResStr(STR_ObjNamePluralTEXT);
+ }
+ } break;
+ } // switch
+}
+
+void SdrTextObj::operator=(const SdrObject& rObj)
+{
+ SdrAttrObj::operator=(rObj);
+ const SdrTextObj* pText=PTR_CAST(SdrTextObj,&rObj);
+ if (pText!=NULL) {
+ aRect =pText->aRect;
+ aGeo =pText->aGeo;
+ eTextKind =pText->eTextKind;
+ bTextFrame=pText->bTextFrame;
+ aTextSize=pText->aTextSize;
+ bTextSizeDirty=pText->bTextSizeDirty;
+
+ if (pOutlinerParaObject!=NULL) delete pOutlinerParaObject;
+ if (pText->HasText()) {
+ const Outliner* pEO=pText->pEdtOutl;
+ if (pEO!=NULL) {
+ pOutlinerParaObject=pEO->CreateParaObject();
+ } else {
+ pOutlinerParaObject=pText->pOutlinerParaObject->Clone();
+ }
+ } else {
+ pOutlinerParaObject=NULL;
+ }
+ ImpSetTextStyleSheetListeners();
+ }
+}
+
+void SdrTextObj::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL bDetail) const
+{
+ Polygon aPol(aRect);
+ if (aGeo.nShearWink!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoly(aPol,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ rPoly=XPolyPolygon(XPolygon(aPol));
+}
+
+void SdrTextObj::TakeContour(XPolyPolygon& rPoly) const
+{
+ SdrAttrObj::TakeContour(rPoly);
+ // und nun noch ggf. das BoundRect des Textes dazu
+ if (pOutlinerParaObject!=NULL && !IsFontwork() && !IsContourTextFrame()) {
+ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+ Rectangle aAnchor;
+ Rectangle aR;
+ TakeTextRect(rOutliner,aR,FALSE,&aAnchor);
+ rOutliner.Clear();
+ SdrFitToSizeType eFit=GetFitToSize();
+ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ if (bFitToSize) aR=aAnchor;
+ Polygon aPol(aR);
+ if (aGeo.nDrehWink!=0) RotatePoly(aPol,aR.TopLeft(),aGeo.nSin,aGeo.nCos);
+ rPoly.Insert(XPolygon(aPol));
+ }
+}
+
+void SdrTextObj::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+void SdrTextObj::RecalcSnapRect()
+{
+ if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) {
+ Polygon aPol(aRect);
+ if (aGeo.nShearWink!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoly(aPol,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ aSnapRect=aPol.GetBoundRect();
+ } else {
+ aSnapRect=aRect;
+ }
+}
+
+USHORT SdrTextObj::GetSnapPointCount() const
+{
+ return 4;
+}
+
+Point SdrTextObj::GetSnapPoint(USHORT i) const
+{
+ Point aP;
+ switch (i) {
+ case 0: aP=aRect.TopLeft(); break;
+ case 1: aP=aRect.TopRight(); break;
+ case 2: aP=aRect.BottomLeft(); break;
+ case 3: aP=aRect.BottomRight(); break;
+ default: aP=aRect.Center(); break;
+ }
+ if (aGeo.nShearWink!=0) ShearPoint(aP,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoint(aP,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ return aP;
+}
+
+void SdrTextObj::ImpCheckMasterCachable()
+{
+ bNotMasterCachable=FALSE;
+ if (!bNotVisibleAsMaster && pOutlinerParaObject!=NULL && pOutlinerParaObject->IsEditDoc()) {
+ const EditTextObject& rText=pOutlinerParaObject->GetTextObject();
+ bNotMasterCachable=rText.HasField(SvxPageField::StaticType());
+ }
+}
+
+OutlinerParaObject* SdrTextObj::GetOutlinerParaObject() const
+{
+ return pOutlinerParaObject;
+}
+
+void SdrTextObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject)
+{
+ if( pModel )
+ {
+ // Update HitTestOutliner
+ const SdrTextObj* pTestObj = pModel->GetHitTestOutliner().GetTextObj();
+ if( pTestObj && pTestObj->GetOutlinerParaObject() == pOutlinerParaObject )
+ pModel->GetHitTestOutliner().SetTextObj( NULL );
+ }
+
+ if (pOutlinerParaObject!=NULL) {
+ delete pOutlinerParaObject;
+ pOutlinerParaObject=NULL;
+ }
+ pOutlinerParaObject=pTextObject;
+ SetTextSizeDirty();
+ bPortionInfoChecked=FALSE;
+ if (IsTextFrame() && (IsAutoGrowHeight() || IsAutoGrowWidth())) { // Textrahmen anpassen!
+ NbcAdjustTextFrameWidthAndHeight();
+ }
+ if (!IsTextFrame()) {
+ // Das SnapRect behaelt seine Groesse bei
+ bBoundRectDirty=TRUE;
+ SetRectsDirty(TRUE);
+ }
+ ImpSetTextStyleSheetListeners();
+ ImpCheckMasterCachable();
+}
+
+void SdrTextObj::NbcReformatText()
+{
+ if (pOutlinerParaObject!=NULL) {
+ bPortionInfoChecked=FALSE;
+ pOutlinerParaObject->ClearPortionInfo();
+ if (bTextFrame) {
+ NbcAdjustTextFrameWidthAndHeight();
+ } else {
+ // Das SnapRect behaelt seine Groesse bei
+ bBoundRectDirty=TRUE;
+ SetRectsDirty(TRUE);
+ }
+ SetTextSizeDirty();
+ }
+}
+
+void SdrTextObj::ReformatText()
+{
+ if (pOutlinerParaObject!=NULL) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcReformatText();
+ SetChanged();
+ SendRepaintBroadcast();
+ if (GetBoundRect()!=aBoundRect0) {
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+ }
+}
+
+void SdrTextObj::RestartAnimation(SdrPageView* pPageView) const
+{
+ FASTBOOL bAnimated=GetTextAniKind()!=SDRTEXTANI_NONE;
+ if (bAnimated) {
+ ImpSdrMtfAnimator* pAnimator=((SdrTextObj*)this)->ImpGetMtfAnimator();
+ if (pAnimator!=NULL) {
+ if (pPageView==NULL) {
+ pAnimator->Stop();
+ } else {
+ for (ULONG nInfoNum=pAnimator->GetInfoCount(); nInfoNum>0;) {
+ nInfoNum--;
+ ImpMtfAnimationInfo* pInfo=pAnimator->GetInfo(nInfoNum);
+ if (pInfo->pPageView==pPageView) {
+ pAnimator->RemoveInfo(nInfoNum);
+ }
+ }
+ }
+ }
+ }
+}
+
+SdrObjGeoData* SdrTextObj::NewGeoData() const
+{
+ return new SdrTextObjGeoData;
+}
+
+void SdrTextObj::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ SdrAttrObj::SaveGeoData(rGeo);
+ SdrTextObjGeoData& rTGeo=(SdrTextObjGeoData&)rGeo;
+ rTGeo.aRect =aRect;
+ rTGeo.aGeo =aGeo;
+}
+
+void SdrTextObj::RestGeoData(const SdrObjGeoData& rGeo)
+{ // RectsDirty wird von SdrObject gerufen
+ SdrAttrObj::RestGeoData(rGeo);
+ SdrTextObjGeoData& rTGeo=(SdrTextObjGeoData&)rGeo;
+ aRect =rTGeo.aRect;
+ aGeo =rTGeo.aGeo;
+ SetTextSizeDirty();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// I/O
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrTextObj::WriteData(SvStream& rOut) const
+{
+ SdrAttrObj::WriteData(rOut);
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrTextObj");
+#endif
+ rOut<<BYTE(eTextKind);
+ rOut<<aRect;
+ rOut<<INT32(aGeo.nDrehWink);
+ rOut<<INT32(aGeo.nShearWink);
+
+ // Wird gerade editiert, also das ParaObject aus dem aktiven Editor verwenden
+ // Das war frueher. Jetzt wird beim Speichern sowas aehnliches wie EndTextEdit gemacht! #43095#
+ if (pEdtOutl!=NULL) {
+ // #43095#
+ OutlinerParaObject* pPara=ImpGetEditOutlinerParaObject();
+ // casting auf nicht-const
+ ((SdrTextObj*)this)->SetOutlinerParaObject(pPara);
+ }
+ OutlinerParaObject* pPara=pOutlinerParaObject;
+
+ BOOL bOutlinerParaObjectValid=pPara!=NULL;
+ rOut<<bOutlinerParaObjectValid;
+
+ if (bOutlinerParaObjectValid)
+ {
+ SdrDownCompat aTextCompat(rOut,STREAM_WRITE); // Ab V11 eingepackt
+#ifdef DBG_UTIL
+ aTextCompat.SetID("SdrTextObj(OutlinerParaObject)");
+#endif
+ SfxStyleSheetPool* pStyleSheetPool = (SfxStyleSheetPool*) ( pModel!=NULL ? pModel->GetStyleSheetPool() : NULL );
+ pPara->PrepareStore( pStyleSheetPool );
+ pPara->Store(rOut); // neues Store am Outliner ab SV303
+ pPara->FinishStore();
+ }
+
+ // Ab FileVersion 10 wird das TextBoundRect gestreamt
+ BOOL bFormTextBoundRectValid=pFormTextBoundRect!=NULL;
+ rOut<<bFormTextBoundRectValid;
+ if (bFormTextBoundRectValid) {
+ rOut<<*pFormTextBoundRect;
+ }
+}
+
+void SdrTextObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ if (pOutlinerParaObject!=NULL) {
+ delete pOutlinerParaObject;
+ pOutlinerParaObject=NULL;
+ }
+
+ SdrAttrObj::ReadData(rHead,rIn);
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrTextObj");
+#endif
+ BYTE nTmp;
+ rIn>>nTmp;
+ eTextKind=SdrObjKind(nTmp);
+ rIn>>aRect;
+ INT32 n32;
+ rIn>>n32; aGeo.nDrehWink=n32;
+ rIn>>n32; aGeo.nShearWink=n32;
+ aGeo.RecalcSinCos();
+ aGeo.RecalcTan();
+ //rIn>>aText;
+ if (rHead.GetVersion()<=5 && IsOutlText()) { // Das war bis zu diesem Zeitpunkt nicht gespeichert
+ NbcSetAutoGrowHeight(FALSE);
+ }
+
+ BOOL bOutlinerParaObjectValid=FALSE;
+ rIn>>bOutlinerParaObjectValid;
+ if (bOutlinerParaObjectValid)
+ {
+ SfxItemPool* pOutlPool=pModel!=NULL ? &pModel->GetItemPool() : NULL;
+ if (rHead.GetVersion()>=11) {
+ SdrDownCompat aTextCompat(rIn,STREAM_READ); // ab V11 eingepackt
+#ifdef DBG_UTIL
+ aTextCompat.SetID("SdrTextObj(OutlinerParaObject)");
+#endif
+ pOutlinerParaObject=OutlinerParaObject::Create(rIn,pOutlPool);
+ } else {
+ pOutlinerParaObject=OutlinerParaObject::Create(rIn,pOutlPool);
+ }
+ }
+
+ if( pOutlinerParaObject && pOutlinerParaObject->GetOutlinerMode() == OUTLINERMODE_DONTKNOW )
+ {
+ if( eTextKind == OBJ_TITLETEXT )
+ pOutlinerParaObject->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
+ else if( eTextKind == OBJ_OUTLINETEXT )
+ pOutlinerParaObject->SetOutlinerMode( OUTLINERMODE_OUTLINEOBJECT );
+ else
+ pOutlinerParaObject->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
+ }
+
+ if (rHead.GetVersion()>=10) {
+ // Ab FileVersion 10 wird das TextBoundRect gestreamt
+ BOOL bFormTextBoundRectValid=FALSE;
+ rIn>>bFormTextBoundRectValid;
+ if (bFormTextBoundRectValid) {
+ if (pFormTextBoundRect==NULL) pFormTextBoundRect=new Rectangle;
+ rIn>>*pFormTextBoundRect;
+ }
+ }
+ if (rHead.GetVersion()<12 && !bTextFrame) {
+ SdrMiscSetItem aMisc(*pMiscAttr);
+ aMisc.GetItemSet().Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_CENTER));
+ aMisc.GetItemSet().Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_CENTER));
+ pMiscAttr=(SdrMiscSetItem*)ImpSetNewAttr(pMiscAttr,&aMisc);
+ SdrOutlinerSetItem aOutl(*pOutlAttr);
+ aOutl.GetItemSet().Put(SvxAdjustItem(SVX_ADJUST_CENTER));
+ pOutlAttr=(SdrOutlinerSetItem*)ImpSetNewAttr(pOutlAttr,&aOutl);
+ }
+ if (bTextFrame && pOutlinerParaObject!=NULL)
+ NbcAdjustTextFrameWidthAndHeight();
+
+ if ( pOutlinerParaObject &&
+ pOutlinerParaObject->GetTextObject().GetVersion() < 500 &&
+ !pOutlinerParaObject->IsEditDoc() )
+ {
+ pOutlinerParaObject->MergeParaAttribs( pOutlAttr->GetItemSet() );
+ }
+
+ ImpSetTextStyleSheetListeners();
+ SetTextSizeDirty();
+ ImpCheckMasterCachable();
+}
+
+IMPL_LINK(SdrTextObj,ImpAnimationHdl,ImpSdrMtfAnimator*,pAnimator)
+{
+ // Aehnliche Implementation am Grafikobjekt: svdograf.cxx, SdrGrafObj
+
+ // Wenn wir nicht mehr da sind, stoppen wir natuerlich alles
+ // und kehren gleich zurueck
+ if (!bInserted || pPage==NULL || pModel==NULL) {
+ pAnimator->Stop();
+ return 0;
+ }
+
+ // Alle Extra-Data auf 0 setzen, wenn keine andere ExtraData
+ // ausser der eigenen (1) gesetzt;
+ // groesser als 1 bedeutet zum. beim GrafObj, dass die Animation
+ // von aussen gestartet wurde, z.B. von der DiaShow.
+ ULONG nInfoNum;
+ for (nInfoNum=pAnimator->GetInfoCount(); nInfoNum>0;) {
+ nInfoNum--;
+ ImpMtfAnimationInfo* pInfo=pAnimator->GetInfo(nInfoNum);
+ if (pInfo->nExtraData==1L) pInfo->nExtraData=0L;
+ }
+
+ USHORT nPageNum=pPage->GetPageNum();
+ FASTBOOL bMaster=pPage->IsMasterPage() && !bNotVisibleAsMaster;
+ USHORT nLsAnz=pModel->GetListenerCount();
+
+ for (USHORT nLsNum=0; nLsNum<nLsAnz; nLsNum++) {
+ SfxListener* pLs=pModel->GetListener(nLsNum);
+ SdrObjEditView* pView=PTR_CAST(SdrObjEditView,pLs);
+ if (pView!=NULL) {
+ FASTBOOL bDis=!pView->IsAnimationEnabled();
+ FASTBOOL bMrk=pView->IsObjMarked(this);
+ FASTBOOL bEdt=pView->GetTextEditObject()==this;
+ USHORT nPvAnz=pView->GetPageViewCount();
+ for (USHORT nPvNum=0; nPvNum<nPvAnz; nPvNum++) {
+ SdrPageView* pPV=pView->GetPageViewPvNum(nPvNum);
+ SdrPage* pPg=pPV->GetPage();
+ if (pPV->GetVisibleLayers().IsSet(nLayerID)) {
+ FASTBOOL bJa=pPg==pPage;
+ if (!bJa && bMaster && !pPg->IsMasterPage()) {
+ USHORT nMasterAnz=pPg->GetMasterPageCount();
+ for (USHORT nMasterNum=0; nMasterNum<nMasterAnz && !bJa; nMasterNum++) {
+ const SdrMasterPageDescriptor& rMPD=pPg->GetMasterPageDescriptor(nMasterNum);
+ bJa=nPageNum==rMPD.GetPageNum() && rMPD.GetVisibleLayers().IsSet(nLayerID);
+ }
+ }
+ if (bJa) {
+ USHORT nOutAnz=pView->GetWinCount();
+ for (USHORT nOutNum=0; nOutNum<nOutAnz; nOutNum++) {
+ OutputDevice* pOut=pView->GetWin(nOutNum);
+ if (pOut->GetOutDevType()==OUTDEV_WINDOW)
+ {
+ Point aPvOfs( pPV->GetOffset() );
+ ULONG nPos = pAnimator->FindInfo(*pOut,aPvOfs,0);
+ ImpMtfAnimationInfo* pInfo = NULL;
+ const BOOL bPause = ( bMrk || bEdt || bDis );
+
+ if( nPos != CONTAINER_ENTRY_NOTFOUND )
+ {
+ pInfo = pAnimator->GetInfo(nPos);
+
+ if( ( pInfo->pPageView && pInfo->pPageView != pPV ) && pInfo->nExtraData == 0L )
+ pInfo = NULL;
+ }
+ else if( !bPause )
+ {
+ // Falls kein Record gefunden, wird ein neuer erzeugt
+ // Das passiert z.B., wenn das Obj auf einer MasterPage liegt
+ // und diese mittels MasterPagePaintCache angezeigt wurde.
+ pInfo=pAnimator->Start(*pOut,aPvOfs);
+ }
+
+ if( pInfo )
+ {
+ // Flag am gefundenen bzw. neuen Objekt setzen
+ // ( Info soll _nicht_ geloescht werden )
+ if( pInfo->nExtraData == 0L )
+ pInfo->nExtraData = 1L;
+
+ pInfo->bPause = bPause;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Alle Objekte mit nicht gesetztem Flag loeschen
+ for (nInfoNum=pAnimator->GetInfoCount(); nInfoNum>0;) {
+ nInfoNum--;
+ ImpMtfAnimationInfo* pInfo=pAnimator->GetInfo(nInfoNum);
+ if (pInfo->nExtraData==0L) {
+ pAnimator->RemoveInfo(nInfoNum);
+ }
+ if (pInfo->nExtraData==1L) pInfo->nExtraData=0L;
+ }
+ return 0;
+}
+
+void SdrTextObj::SetTextAnimationSupervisor( OutputDevice* pDisplayDev, BOOL bObjSupervises )
+{
+ ImpSdrMtfAnimator* pAnimator = ImpGetMtfAnimator();
+
+ if( GetTextAniKind() != SDRTEXTANI_NONE && pAnimator )
+ {
+ for( ULONG nInfoNum = pAnimator->GetInfoCount(); nInfoNum > 0; )
+ {
+ ImpMtfAnimationInfo* pInfo = pAnimator->GetInfo( --nInfoNum );
+
+ if( pInfo->pOutDev == pDisplayDev )
+ {
+ pInfo->nExtraData = ( bObjSupervises ? 1L : (long) this );
+
+ if( !bObjSupervises )
+ pInfo->bPause = FALSE;
+ }
+ }
+ }
+}
+
+SdrFitToSizeType SdrTextObj::GetFitToSize() const
+{
+ SdrFitToSizeType eType = SDRTEXTFIT_NONE;
+
+ if( pMiscAttr && !IsAutoGrowWidth() )
+ {
+ eType = ((SdrTextFitToSizeTypeItem&)(pMiscAttr->GetItemSet().Get(SDRATTR_TEXT_FITTOSIZE))).GetValue();
+ }
+
+ return eType;
+}
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// Konzept des TextObjekts:
+// ~~~~~~~~~~~~~~~~~~~~~~~~
+// Attribute/Varianten:
+// - BOOL Textrahmen / beschriftetes Zeichenobjekt
+// - BOOL FontWork (wenn nicht Textrahmen und nicht ContourTextFrame)
+// - BOOL ContourTextFrame (wenn nicht Textrahmen und nicht Fontwork)
+// - long Drehwinkel (wenn nicht FontWork)
+// - long Textrahmenabstaende (wenn nicht FontWork)
+// - BOOL FitToSize (wenn nicht FontWork)
+// - BOOL AutoGrowingWidth/Height (wenn nicht FitToSize und nicht FontWork)
+// - long Min/MaxFrameWidth/Height (wenn AutoGrowingWidth/Height)
+// - enum Horizontale Textverankerung Links,Mitte,Rechts,Block,Stretch(ni)
+// - enum Vertikale Textverankerung Oben,Mitte,Unten,Block,Stretch(ni)
+// - enum Laufschrift (wenn nicht FontWork)
+//
+// Jedes abgeleitete Objekt ist entweder ein Textrahmen (bTextFrame=TRUE)
+// oder ein beschriftetes Zeichenobjekt (bTextFrame=FALSE).
+//
+// Defaultverankerung von Textrahmen:
+// SDRTEXTHORZADJUST_BLOCK, SDRTEXTVERTADJUST_TOP
+// = statische Pooldefaults
+// Defaultverankerung von beschrifteten Zeichenobjekten:
+// SDRTEXTHORZADJUST_CENTER, SDRTEXTVERTADJUST_CENTER
+// durch harte Attributierung von SdrAttrObj
+//
+// Jedes vom SdrTextObj abgeleitete Objekt muss ein "UnrotatedSnapRect"
+// (->TakeUnrotatedSnapRect()) liefern (Drehreferenz ist TopLeft dieses
+// Rechtecks (aGeo.nDrehWink)), welches die Grundlage der Textverankerung
+// bildet. Von diesem werden dann ringsum die Textrahmenabstaende abgezogen;
+// das Ergebnis ist der Ankerbereich (->TakeTextAnchorRect()). Innerhalb
+// dieses Bereichs wird dann in Abhaengigkeit von der horizontalen und
+// vertikalen Ausrichtung (SdrTextVertAdjust,SdrTextHorzAdjust) der Ankerpunkt
+// sowie der Ausgabebereich bestimmt. Bei beschrifteten Grafikobjekten kann
+// der Ausgabebereich durchaus groesser als der Ankerbereich werden, bei
+// Textrahmen ist er stets kleiner oder gleich (ausser bei negativen Textrahmen-
+// abstaenden).
+//
+// FitToSize hat Prioritaet vor Textverankerung und AutoGrowHeight/Width. Der
+// Ausgabebereich ist bei FitToSize immer genau der Ankerbereich. Weiterhin
+// gibt es bei FitToSize keinen automatischen Zeilenumbruch.
+//
+// ContourTextFrame:
+// - long Drehwinkel
+// - long Textrahmenabstaende spaeter vielleicht
+// - BOOL FitToSize spaeter vielleicht
+// - BOOL AutoGrowingWidth/Height viel spaeter vielleicht
+// - long Min/MaxFrameWidth/Height viel spaeter vielleicht
+// - enum Horizontale Textverankerung spaeter vielleicht, erstmal Links, Absatz zentr.
+// - enum Vertikale Textverankerung spaeter vielleicht, erstmal oben
+// - enum Laufschrift spaeter vielleicht (evtl. sogar mit korrektem Clipping)
+//
+// Bei Aenderungen zu beachten:
+// - Paint
+// - HitTest
+// - RecalcBoundRect
+// - ConvertToPoly
+// - Edit
+// - Drucken,Speichern, Paint in Nachbarview waerend Edit
+// - ModelChanged (z.B. durch NachbarView oder Lineale) waerend Edit
+// - FillColorChanged waerend Edit
+// - uvm...
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
new file mode 100644
index 0000000000..1d1d314f59
--- /dev/null
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -0,0 +1,786 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdotxat.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <svtools/style.hxx>
+#include "svdotext.hxx"
+#include "svditext.hxx"
+#include "svdmodel.hxx" // fuer GetMaxObjSize und GetStyleSheetPool
+#include "svdoutl.hxx"
+#include "svdorect.hxx" // fuer SetDirty bei NbcAdjustTextFrameWidthAndHeight
+#include "svdocapt.hxx" // fuer SetDirty bei NbcAdjustTextFrameWidthAndHeight
+#include <svdetc.hxx>
+
+#ifndef _MyEDITVIEW_HXX
+#include "editview.hxx"
+#endif
+
+#ifndef _SFXSMPLHINT_HXX //autogen
+#include <svtools/smplhint.hxx>
+#endif
+
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+
+#ifndef _OUTLOBJ_HXX //autogen
+#include <outlobj.hxx>
+#endif
+
+#ifndef _OUTLINER_HXX //autogen
+#include "outliner.hxx"
+#endif
+
+#ifndef _EEITEM_HXX //autogen
+#include "eeitem.hxx"
+#endif
+
+#ifndef _EDITOBJ_HXX //autogen
+#include <editobj.hxx>
+#endif
+
+#ifndef _SVX_FHGTITEM_HXX //autogen
+#include "fhgtitem.hxx"
+#endif
+
+#ifndef _SVX_FWDTITEM_HXX //autogen
+#include "fwdtitem.hxx"
+#endif
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _SFXITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
+
+#define ITEMID_LRSPACE EE_PARA_LRSPACE
+#ifndef _SVX_LRSPITEM_HXX //autogen
+#include <lrspitem.hxx>
+#endif
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SVX_NUMITEM_HXX //autogen
+#include <numitem.hxx>
+#endif
+
+#ifndef _MyEDITENG_HXX //autogen
+#include <editeng.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+// Attribute, StyleSheets und AutoGrow
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrTextObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ SdrAttrObj::SFX_NOTIFY(rBC,rBCType,rHint,rHintType);
+ if (pOutlinerParaObject!=NULL)
+ {
+ if (HAS_BASE(SfxStyleSheet, &rBC))
+ {
+ SfxSimpleHint* pSimple=PTR_CAST(SfxSimpleHint,&rHint);
+ ULONG nId=pSimple==NULL ? 0 : pSimple->GetId();
+ if (nId==SFX_HINT_DATACHANGED)
+ {
+ bPortionInfoChecked=FALSE;
+ pOutlinerParaObject->ClearPortionInfo();
+ SetTextSizeDirty();
+ if (bTextFrame && NbcAdjustTextFrameWidthAndHeight())
+ {
+ SendRepaintBroadcast();
+ }
+ }
+ if (nId==SFX_HINT_DYING)
+ {
+ bPortionInfoChecked=FALSE;
+ pOutlinerParaObject->ClearPortionInfo();
+ }
+ }
+ else if (HAS_BASE(SfxStyleSheetBasePool, &rBC))
+ {
+ SfxStyleSheetHintExtended* pExtendedHint = PTR_CAST(SfxStyleSheetHintExtended, &rHint);
+
+ if (pExtendedHint && pExtendedHint->GetHint() == SFX_STYLESHEET_MODIFIED)
+ {
+ String aOldName(pExtendedHint->GetOldName());
+ String aNewName(pExtendedHint->GetStyleSheet()->GetName());
+ SfxStyleFamily eFamily = pExtendedHint->GetStyleSheet()->GetFamily();
+
+ if(!aOldName.Equals(aNewName))
+ pOutlinerParaObject->ChangeStyleSheetName(eFamily, aOldName, aNewName);
+ }
+ }
+ }
+}
+
+void SdrTextObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ SdrAttrObj::NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+
+ if ( pOutlinerParaObject && !pEdtOutl && !IsLinkedText() )
+ {
+ // StyleSheet auf alle Absaetze anwenden
+ SdrOutliner& rOutliner=ImpGetDrawOutliner();
+ rOutliner.SetText(*pOutlinerParaObject);
+ USHORT nParaCount=(USHORT)rOutliner.GetParagraphCount();
+ if (nParaCount!=0) {
+ for (USHORT nPara=0; nPara<nParaCount; nPara++)
+ {
+ if ( pStyleSheet )
+ {
+ if( nPara > 0 && eTextKind == OBJ_OUTLINETEXT && GetObjInventor() == SdrInventor )
+ {
+ String aNewStyleSheetName( pStyleSheet->GetName() );
+ aNewStyleSheetName.Erase( aNewStyleSheetName.Len()-1, 1 );
+ aNewStyleSheetName += String::CreateFromInt32( rOutliner.GetDepth( nPara ) );
+ SfxStyleSheetBasePool* pStylePool = pModel!=NULL ? pModel->GetStyleSheetPool() : NULL;
+ SfxStyleSheet* pNewStyle = (SfxStyleSheet*) pStylePool->Find( aNewStyleSheetName, pStyleSheet->GetFamily() );
+ DBG_ASSERT( pNewStyle, "AutoStyleSheetName - Style not found!" );
+ if ( pNewStyle )
+ rOutliner.SetStyleSheet( nPara, pNewStyle );
+ }
+ else
+ rOutliner.SetStyleSheet( nPara, pStyleSheet );
+ }
+ else
+ rOutliner.SetStyleSheet( nPara, NULL ); // StyleSheet entfernen
+
+ if (!bDontRemoveHardAttr && pNewStyleSheet!=NULL) {
+ // Harte Absatz-Attributierung aller im
+ // StyleSheet vorhandenen Items entfernen
+ // -> Parents beruecksichtigen !!!
+ SfxItemIter aIter(pNewStyleSheet->GetItemSet());
+ const SfxPoolItem* pItem=aIter.FirstItem();
+ while (pItem!=NULL) {
+ if (!IsInvalidItem(pItem)) {
+ USHORT nW=pItem->Which();
+ if (nW>=EE_ITEMS_START && nW<=EE_ITEMS_END) {
+ // gibts noch nicht, baut Malte aber ein:
+ rOutliner.QuickRemoveCharAttribs(nPara,nW);
+ }
+ }
+ pItem=aIter.NextItem();
+ }
+ }
+ }
+ OutlinerParaObject* pTemp=rOutliner.CreateParaObject( 0, nParaCount );
+ rOutliner.Clear();
+ NbcSetOutlinerParaObject(pTemp);
+ }
+ }
+ if (bTextFrame) {
+ NbcAdjustTextFrameWidthAndHeight();
+ }
+}
+
+void SdrTextObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ SfxItemSet aAttr( rAttr );
+
+ BOOL bCreateLRSpaceItems = FALSE;
+
+ if ( aAttr.GetItemState( EE_PARA_LRSPACE ) == SFX_ITEM_ON )
+ {
+ // SvxLRSpaceItem hart gesetzt: SvxNumBulletItem anpassen
+ SfxItemSet aSet( *aAttr.GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE, 0 );
+ TakeAttributes( aSet, TRUE, TRUE);
+
+ if ( aSet.GetItemState( EE_PARA_LRSPACE ) != SFX_ITEM_ON ||
+ ((const SvxLRSpaceItem&) aSet.Get( EE_PARA_LRSPACE )) !=
+ ((const SvxLRSpaceItem&) aAttr.Get( EE_PARA_LRSPACE )) )
+ {
+ SvxNumBulletItem* pNumBullet = NULL;
+
+ if ( aAttr.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON )
+ pNumBullet = new SvxNumBulletItem( (const SvxNumBulletItem&) aAttr.Get(EE_PARA_NUMBULLET) );
+ else
+ {
+ pNumBullet = new SvxNumBulletItem( (const SvxNumBulletItem&) aSet.Get(EE_PARA_NUMBULLET) );
+
+ if( eTextKind == OBJ_OUTLINETEXT &&
+ pNumBullet->GetNumRule()->GetNumRuleType() != SVX_RULETYPE_PRESENTATION_NUMBERING )
+ {
+ // Das ist das 10er-Item aus den Defaults.
+ // Dieses darf bei Gliederungsobjekten nicht verwendet werden!
+ // Daher wird das Item aus der Vorlage geholt
+ delete pNumBullet;
+ pNumBullet = NULL;
+
+ if( pStyleSheet &&
+ pStyleSheet->GetItemSet().GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON )
+ pNumBullet = new SvxNumBulletItem( (const SvxNumBulletItem&) pStyleSheet->GetItemSet().Get(EE_PARA_NUMBULLET) );
+ }
+ }
+
+ if( pNumBullet )
+ {
+ USHORT nLevel = 0;
+ if( pNumBullet->GetNumRule()->GetNumRuleType() == SVX_RULETYPE_PRESENTATION_NUMBERING )
+ nLevel = 1;
+
+ EditEngine::ImportBulletItem( *pNumBullet, nLevel, NULL,
+ &(const SvxLRSpaceItem&) aAttr.Get( EE_PARA_LRSPACE ) );
+ ( (SfxItemSet&) aAttr).Put( *pNumBullet );
+
+ delete pNumBullet;
+ }
+ else
+ DBG_ASSERT(FALSE, "SdrTextObj::NbcSetAttributes: SvxNumBulletItem nicht angepasst!");
+ }
+ }
+ else if ( aAttr.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON )
+ {
+ // SvxNumBulletItem hart gesetzt: SvxLRSpaceItem anpassen
+ SfxItemSet aSet( *aAttr.GetPool(), EE_PARA_NUMBULLET, EE_PARA_NUMBULLET, 0 );
+ TakeAttributes( aSet, TRUE, TRUE);
+
+ if ( aSet.GetItemState( EE_PARA_NUMBULLET ) != SFX_ITEM_ON ||
+ ((const SvxNumBulletItem&) aSet.Get( EE_PARA_NUMBULLET )) !=
+ ((const SvxNumBulletItem&) aAttr.Get( EE_PARA_NUMBULLET )) )
+ {
+ SvxLRSpaceItem aLRSpace( (const SvxLRSpaceItem&) aSet.Get(EE_PARA_LRSPACE) );
+ USHORT nLevel = 0;
+ if( eTextKind == OBJ_OUTLINETEXT )
+ nLevel = 1;
+
+ if ( Outliner::CreateLRSpaceItem( (const SvxNumBulletItem&) aAttr.Get( EE_PARA_NUMBULLET ), nLevel, aLRSpace ) )
+ ( (SfxItemSet&) aAttr).Put( aLRSpace );
+
+ bCreateLRSpaceItems = TRUE;
+ }
+ }
+
+ if ( aAttr.GetItemState( SDRATTR_TEXT_CONTOURFRAME ) == SFX_ITEM_ON )
+ {
+ // Extra-Repaint wenn das Layout so radikal geaendert wird (#43139#)
+ SendRepaintBroadcast();
+
+ if(IsTextEditActive())
+ {
+ // Text wird gerade editiert, zusaetzlich redraw auf EditText
+ const EditEngine& rEditEng = pEdtOutl->GetEditEngine();
+ for(UINT16 a=0;a<rEditEng.GetViewCount();a++)
+ {
+ EditView* pEdView = rEditEng.GetView(a);
+
+ if(pEdView)
+ {
+ pEdView->Invalidate();
+ }
+ }
+ }
+ }
+
+ SdrAttrObj::NbcSetAttributes(aAttr,bReplaceAll);
+ FASTBOOL bGrowChecked=FALSE;
+ // Attribute auf den gesamten Text anwenden
+ if (pOutlinerParaObject!=NULL)
+ {
+ if ((pEdtOutl==NULL || bCreateLRSpaceItems) && !IsLinkedText())
+ {
+ // #46762# Sonderbehandlung fuer bReplaceAll
+ if (SearchOutlinerItems(aAttr,bReplaceAll))
+ {
+ Outliner* pOutliner;
+ if(pEdtOutl == NULL)
+ {
+ pOutliner = &ImpGetDrawOutliner();
+ pOutliner->SetText(*pOutlinerParaObject);
+ }
+ else
+ {
+ pOutliner = pEdtOutl;
+ }
+ USHORT nParaCount=(USHORT)pOutliner->GetParagraphCount();
+ if (nParaCount!=0)
+ {
+ for (USHORT nPara=0; nPara<nParaCount; nPara++)
+ {
+ // Neue Attribute mit alten (bereits vorhandenen) mergen
+ SfxItemSet aTmpSet(pOutliner->GetParaAttribs(nPara));
+
+ SvxLRSpaceItem aLRSpace( (const SvxLRSpaceItem&) aTmpSet.Get(EE_PARA_LRSPACE) );
+
+ if(pEdtOutl==NULL)
+ {
+ if(bReplaceAll)
+ {
+ // #46762#: bReplaceAll beachten
+ SfxWhichIter aIter(aAttr);
+ USHORT nWh=aIter.FirstWhich();
+ while (nWh!=0)
+ {
+ if (nWh>=EE_ITEMS_START && nWh<=EE_ITEMS_END)
+ {
+ SfxItemState eState=aAttr.GetItemState(nWh,FALSE);
+ if (eState==SFX_ITEM_DEFAULT) aTmpSet.ClearItem(nWh);
+ }
+ nWh=aIter.NextWhich();
+ }
+ }
+ aTmpSet.Put(aAttr,FALSE); // FALSE= InvalidItems nicht als Default, sondern als "Loecher" betrachten
+ }
+
+ if(bCreateLRSpaceItems)
+ {
+ const INT16 nLevel = pOutliner->GetDepth( nPara );
+
+ if ( Outliner::CreateLRSpaceItem( (const SvxNumBulletItem&) aAttr.Get( EE_PARA_NUMBULLET ), nLevel, aLRSpace ) )
+ aTmpSet.Put( aLRSpace );
+ }
+
+ pOutliner->SetParaAttribs(nPara,aTmpSet);
+
+ if(pEdtOutl==NULL)
+ {
+ // Fuer alle hinzugekommenen Attribute:
+ // entsprechende CharAttribs entfernen.
+ if (bReplaceAll)
+ {
+ if( aAttr.Count() == 0 && aTmpSet.Count() == 0 )
+ {
+ // Format -> Standard
+ pOutliner->QuickRemoveCharAttribs(nPara, 0);
+ }
+ else
+ {
+ SfxItemIter aIter( aTmpSet );
+ const SfxPoolItem* pItem = aIter.FirstItem();
+ while ( pItem )
+ {
+ if ( !IsInvalidItem(pItem) )
+ {
+ USHORT nW = pItem->Which();
+ if ( nW >= EE_CHAR_START && nW <= EE_CHAR_END )
+ pOutliner->QuickRemoveCharAttribs( nPara, nW );
+ }
+
+ pItem=aIter.NextItem();
+ }
+ }
+ }
+ }
+ }
+ if(pEdtOutl == NULL)
+ {
+ OutlinerParaObject* pTemp=pOutliner->CreateParaObject( 0, nParaCount );
+ pOutliner->Clear();
+ NbcSetOutlinerParaObject(pTemp);
+ }
+ bGrowChecked=TRUE;
+ }
+ }
+ }
+
+ // #36989#: AutoGrow auch bei TextEdit
+ if (bTextFrame && !bGrowChecked)
+ {
+ NbcAdjustTextFrameWidthAndHeight();
+ bGrowChecked=TRUE;
+ }
+ }
+}
+
+void SdrTextObj::BurnInStyleSheetAttributes()
+{
+ if ( pModel && pOutlinerParaObject && !pEdtOutl && !IsLinkedText() )
+ {
+ Outliner* pOutliner = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, pModel );
+ pOutliner->SetText( *pOutlinerParaObject );
+
+ SdrAttrObj::BurnInStyleSheetAttributes();
+
+ USHORT nParaCount = (USHORT) pOutliner->GetParagraphCount();
+ if ( nParaCount > 0 )
+ {
+ for ( USHORT nPara = 0; nPara < nParaCount; nPara++ )
+ {
+ SfxStyleSheet* pSheet = pOutliner->GetStyleSheet( nPara );
+
+ if( pSheet )
+ {
+ SfxItemSet aSet( pSheet->GetItemSet() );
+ aSet.Put( pOutliner->GetParaAttribs( nPara ), FALSE );
+ pOutliner->SetParaAttribs( nPara, aSet );
+ }
+ }
+
+ OutlinerParaObject* pTemp = pOutliner->CreateParaObject( 0, nParaCount );
+ NbcSetOutlinerParaObject( pTemp );
+ delete pOutliner;
+ }
+ }
+ else
+ SdrAttrObj::BurnInStyleSheetAttributes();
+}
+
+FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, FASTBOOL bWdt) const
+{
+ if (bTextFrame && pModel!=NULL && !rR.IsEmpty()) {
+ SdrFitToSizeType eFit=GetFitToSize();
+ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth();
+ FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight();
+ SdrTextAniKind eAniKind=GetTextAniKind();
+ SdrTextAniDirection eAniDir=GetTextAniDirection();
+ FASTBOOL bScroll=eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE;
+ FASTBOOL bHScroll=bScroll && (eAniDir==SDRTEXTANI_LEFT || eAniDir==SDRTEXTANI_RIGHT);
+ FASTBOOL bVScroll=bScroll && (eAniDir==SDRTEXTANI_UP || eAniDir==SDRTEXTANI_DOWN);
+ if (!bFitToSize && (bWdtGrow || bHgtGrow)) {
+ Rectangle aR0(rR);
+ long nHgt=0,nMinHgt=0,nMaxHgt=0;
+ long nWdt=0,nMinWdt=0,nMaxWdt=0;
+ Size aSiz(rR.GetSize()); aSiz.Width()--; aSiz.Height()--;
+ Size aMaxSiz(100000,100000);
+ Size aTmpSiz(pModel->GetMaxObjSize());
+ if (aTmpSiz.Width()!=0) aMaxSiz.Width()=aTmpSiz.Width();
+ if (aTmpSiz.Height()!=0) aMaxSiz.Height()=aTmpSiz.Height();
+ if (bWdtGrow) {
+ nMinWdt=GetMinTextFrameWidth();
+ nMaxWdt=GetMaxTextFrameWidth();
+ if (nMaxWdt==0 || nMaxWdt>aMaxSiz.Width()) nMaxWdt=aMaxSiz.Width();
+ if (nMinWdt<=0) nMinWdt=1;
+ aSiz.Width()=nMaxWdt;
+ }
+ if (bHgtGrow) {
+ nMinHgt=GetMinTextFrameHeight();
+ nMaxHgt=GetMaxTextFrameHeight();
+ if (nMaxHgt==0 || nMaxHgt>aMaxSiz.Height()) nMaxHgt=aMaxSiz.Height();
+ if (nMinHgt<=0) nMinHgt=1;
+ aSiz.Height()=nMaxHgt;
+ }
+ long nHDist=GetTextLeftDistance()+GetTextRightDistance();
+ long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
+ aSiz.Width()-=nHDist;
+ aSiz.Height()-=nVDist;
+ if (aSiz.Width()<2) aSiz.Width()=2; // Mindestgroesse 2
+ if (aSiz.Height()<2) aSiz.Height()=2; // Mindestgroesse 2
+ if (bHScroll) aSiz.Width()=0x0FFFFFFF; // Laufschrift nicht umbrechen
+ if (bVScroll) aSiz.Height()=0x0FFFFFFF;
+ if (pEdtOutl!=NULL) {
+ pEdtOutl->SetMaxAutoPaperSize(aSiz);
+ if (bWdtGrow) {
+ Size aSiz(pEdtOutl->CalcTextSize());
+ nWdt=aSiz.Width()+1; // lieber etwas Tolleranz
+ if (bHgtGrow) nHgt=aSiz.Height()+1; // lieber etwas Tolleranz
+ } else {
+ nHgt=pEdtOutl->GetTextHeight()+1; // lieber etwas Tolleranz
+ }
+ } else {
+ Outliner& rOutliner=ImpGetDrawOutliner();
+ rOutliner.SetPaperSize(aSiz);
+ rOutliner.SetUpdateMode(TRUE);
+ // !!! hier sollte ich wohl auch noch mal die Optimierung mit
+ // bPortionInfoChecked usw einbauen
+ if (pOutlinerParaObject!=NULL) rOutliner.SetText(*pOutlinerParaObject);
+ if (bWdtGrow) {
+ Size aSiz(rOutliner.CalcTextSize());
+ nWdt=aSiz.Width()+1; // lieber etwas Tolleranz
+ if (bHgtGrow) nHgt=aSiz.Height()+1; // lieber etwas Tolleranz
+ } else {
+ nHgt=rOutliner.GetTextHeight()+1; // lieber etwas Tolleranz
+ }
+ rOutliner.Clear();
+ }
+ if (nWdt<nMinWdt) nWdt=nMinWdt;
+ if (nWdt>nMaxWdt) nWdt=nMaxWdt;
+ nWdt+=nHDist;
+ if (nWdt<1) nWdt=1; // nHDist kann auch negativ sein
+ if (nHgt<nMinHgt) nHgt=nMinHgt;
+ if (nHgt>nMaxHgt) nHgt=nMaxHgt;
+ nHgt+=nVDist;
+ if (nHgt<1) nHgt=1; // nVDist kann auch negativ sein
+ long nWdtGrow=nWdt-(rR.Right()-rR.Left());
+ long nHgtGrow=nHgt-(rR.Bottom()-rR.Top());
+ if (nWdtGrow==0) bWdtGrow=FALSE;
+ if (nHgtGrow==0) bHgtGrow=FALSE;
+ if (bWdtGrow || bHgtGrow) {
+ if (bWdtGrow) {
+ SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
+ if (eHAdj==SDRTEXTHORZADJUST_LEFT) rR.Right()+=nWdtGrow;
+ else if (eHAdj==SDRTEXTHORZADJUST_RIGHT) rR.Left()-=nWdtGrow;
+ else {
+ long nWdtGrow2=nWdtGrow/2;
+ rR.Left()-=nWdtGrow2;
+ rR.Right()=rR.Left()+nWdt;
+ }
+ }
+ if (bHgtGrow) {
+ SdrTextVertAdjust eVAdj=GetTextVerticalAdjust();
+ if (eVAdj==SDRTEXTVERTADJUST_TOP) rR.Bottom()+=nHgtGrow;
+ else if (eVAdj==SDRTEXTVERTADJUST_BOTTOM) rR.Top()-=nHgtGrow;
+ else {
+ long nHgtGrow2=nHgtGrow/2;
+ rR.Top()-=nHgtGrow2;
+ rR.Bottom()=rR.Top()+nHgt;
+ }
+ }
+ if (aGeo.nDrehWink!=0) {
+ Point aD1(rR.TopLeft());
+ aD1-=aR0.TopLeft();
+ Point aD2(aD1);
+ RotatePoint(aD2,Point(),aGeo.nSin,aGeo.nCos);
+ aD2-=aD1;
+ rR.Move(aD2.X(),aD2.Y());
+ }
+ return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
+
+FASTBOOL SdrTextObj::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt)
+{
+ FASTBOOL bRet=AdjustTextFrameWidthAndHeight(aRect,bHgt,bWdt);
+ if (bRet) {
+ SetRectsDirty();
+ if (HAS_BASE(SdrRectObj,this)) { // mal wieder 'nen Hack
+ ((SdrRectObj*)this)->SetXPolyDirty();
+ }
+ if (HAS_BASE(SdrCaptionObj,this)) { // mal wieder 'nen Hack
+ ((SdrCaptionObj*)this)->ImpRecalcTail();
+ }
+ }
+ return bRet;
+}
+
+FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt)
+{
+ Rectangle aNeuRect(aRect);
+ FASTBOOL bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt);
+ if (bRet) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ aRect=aNeuRect;
+ SetRectsDirty();
+ if (HAS_BASE(SdrRectObj,this)) { // mal wieder 'nen Hack
+ ((SdrRectObj*)this)->SetXPolyDirty();
+ }
+ if (HAS_BASE(SdrCaptionObj,this)) { // mal wieder 'nen Hack
+ ((SdrCaptionObj*)this)->ImpRecalcTail();
+ }
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+ return bRet;
+}
+
+void SdrTextObj::ImpSetTextStyleSheetListeners()
+{
+ SfxStyleSheetBasePool* pStylePool=pModel!=NULL ? pModel->GetStyleSheetPool() : NULL;
+ if (pStylePool!=NULL) {
+ Container aStyles(1024,64,64);
+ if (pOutlinerParaObject!=NULL) {
+ // Zunaechst werden alle im ParaObject enthaltenen StyleSheets
+ // im Container aStyles gesammelt. Dazu wird die Family jeweils
+ // ans Ende des StyleSheet-Namen drangehaengt.
+ const EditTextObject& rTextObj=pOutlinerParaObject->GetTextObject();
+ XubString aStyleName;
+ SfxStyleFamily eStyleFam;
+ USHORT nParaAnz=rTextObj.GetParagraphCount();
+
+ for(UINT16 nParaNum(0); nParaNum < nParaAnz; nParaNum++)
+ {
+ rTextObj.GetStyleSheet(nParaNum, aStyleName, eStyleFam);
+
+ if(aStyleName.Len())
+ {
+ XubString aFam = UniString::CreateFromInt32((UINT16)eStyleFam);
+ aFam.Expand(5);
+
+ aStyleName += sal_Unicode('|');
+ aStyleName += aFam;
+
+ BOOL bFnd(FALSE);
+ UINT32 nNum(aStyles.Count());
+
+ while(!bFnd && nNum > 0)
+ {
+ // kein StyleSheet doppelt!
+ nNum--;
+ bFnd = (aStyleName.Equals(*(XubString*)aStyles.GetObject(nNum)));
+ }
+
+ if(!bFnd)
+ {
+ aStyles.Insert(new XubString(aStyleName), CONTAINER_APPEND);
+ }
+ }
+ }
+ }
+
+ // nun die Strings im Container durch StyleSheet* ersetzten
+ ULONG nNum=aStyles.Count();
+ while (nNum>0) {
+ nNum--;
+ XubString* pName=(XubString*)aStyles.GetObject(nNum);
+
+ // UNICODE: String aFam(pName->Cut(pName->Len()-6));
+ String aFam = pName->Copy(0, pName->Len() - 6);
+
+ aFam.Erase(0,1);
+ aFam.EraseTrailingChars();
+
+ // UNICODE: USHORT nFam=USHORT(aFam);
+ UINT16 nFam = (UINT16)aFam.ToInt32();
+
+ SfxStyleFamily eFam=(SfxStyleFamily)nFam;
+ SfxStyleSheetBase* pStyleBase=pStylePool->Find(*pName,eFam);
+ SfxStyleSheet* pStyle=PTR_CAST(SfxStyleSheet,pStyleBase);
+ delete pName;
+ if (pStyle!=NULL && pStyle!=pStyleSheet) {
+ aStyles.Replace(pStyle,nNum);
+ } else {
+ aStyles.Remove(nNum);
+ }
+ }
+ // jetzt alle ueberfluessigen StyleSheets entfernen
+ nNum=GetBroadcasterCount();
+ while (nNum>0) {
+ nNum--;
+ SfxBroadcaster* pBroadcast=GetBroadcasterJOE((USHORT)nNum);
+ SfxStyleSheet* pStyle=PTR_CAST(SfxStyleSheet,pBroadcast);
+ if (pStyle!=NULL && pStyle!=pStyleSheet) { // Sonderbehandlung fuer den StyleSheet des Objekts
+ if (aStyles.GetPos(pStyle)==CONTAINER_ENTRY_NOTFOUND) {
+ EndListening(*pStyle);
+ }
+ }
+ }
+ // und schliesslich alle in aStyles enthaltenen StyleSheets mit den vorhandenen Broadcastern mergen
+ nNum=aStyles.Count();
+ while (nNum>0) {
+ nNum--;
+ SfxStyleSheet* pStyle=(SfxStyleSheet*)aStyles.GetObject(nNum);
+ // StartListening soll selbst nachsehen, ob hier nicht evtl. schon gehorcht wird
+ StartListening(*pStyle,TRUE);
+ }
+ }
+}
+
+void SdrTextObj::NbcResizeTextAttributes(const Fraction& xFact, const Fraction& yFact)
+{
+ if (pOutlinerParaObject!=NULL && xFact.IsValid() && yFact.IsValid()) {
+ Fraction n100(100,1);
+ long nX=long(xFact*n100);
+ long nY=long(yFact*n100);
+ if (nX<0) nX=-nX;
+ if (nX<1) nX=1;
+ if (nX>0xFFFF) nX=0xFFFF;
+ if (nY<0) nY=-nY;
+ if (nY<1) nY=1;
+ if (nY>0xFFFF) nY=0xFFFF;
+ if (nX!=100 || nY!=100) {
+ if (pOutlAttr!=NULL) { // Rahmenattribute
+ const SfxItemSet& rOldSet=pOutlAttr->GetItemSet();
+ const SvxFontWidthItem& rOldWdt=(SvxFontWidthItem&)rOldSet.Get(EE_CHAR_FONTWIDTH);
+ const SvxFontHeightItem& rOldHgt=(SvxFontHeightItem&)rOldSet.Get(EE_CHAR_FONTHEIGHT);
+ // erstmal die alten Werte holen
+ long nAbsWdt=rOldWdt.GetWidth();
+ long nRelWdt=rOldWdt.GetProp();
+ long nAbsHgt=rOldHgt.GetHeight();
+ long nRelHgt=rOldHgt.GetProp();
+ // Relative Breite aendern
+ nRelWdt*=nX;
+ nRelWdt/=nY;
+ if (nRelWdt<0) nRelWdt=-nRelWdt; // nicht negativ
+ if (nRelWdt<=0) nRelWdt=1; // und mind. 1%
+ if (nRelWdt>0xFFFF) nRelWdt=0xFFFF;
+ // Absolute Hoehe aendern
+ nAbsHgt*=nY;
+ nAbsHgt/=100;
+ if (nAbsHgt<0) nAbsHgt=-nAbsHgt; // nicht negativ
+ if (nAbsHgt<=0) nAbsHgt=1; // und mind. 1
+ if (nAbsHgt>0xFFFF) nAbsHgt=0xFFFF;
+ // und nun attributieren
+ SdrOutlinerSetItem aNewOI(*pOutlAttr);
+ SfxItemSet& rNewSet=aNewOI.GetItemSet();
+ rNewSet.Put(SvxFontWidthItem((USHORT)nAbsWdt,(USHORT)nRelWdt));
+ rNewSet.Put(SvxFontHeightItem(nAbsHgt,(USHORT)nRelHgt));
+ pOutlAttr=(SdrOutlinerSetItem*)ImpSetNewAttr(pOutlAttr,&aNewOI);
+ }
+ // Zeichen- und Absatzattribute innerhalb des OutlinerParaObjects
+ Outliner& rOutliner=ImpGetDrawOutliner();
+ rOutliner.SetPaperSize(Size(LONG_MAX,LONG_MAX));
+ rOutliner.SetText(*pOutlinerParaObject);
+ rOutliner.DoStretchChars((USHORT)nX,(USHORT)nY);
+ OutlinerParaObject* pNewPara=rOutliner.CreateParaObject();
+ NbcSetOutlinerParaObject(pNewPara);
+ rOutliner.Clear();
+ }
+ }
+}
+
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
new file mode 100644
index 0000000000..808608473c
--- /dev/null
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -0,0 +1,351 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdotxdr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdotext.hxx"
+#include "svdhdl.hxx"
+#include "svddrag.hxx"
+#include "svdview.hxx"
+#include "svdorect.hxx" // fuer SetXPolyDirty in MovCreate bei SolidDragging
+#include "svdglob.hxx" // Stringcache
+#include "svdstr.hrc" // Objektname
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+// Dragging, Handles, Create
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+USHORT SdrTextObj::GetHdlCount() const
+{
+ return 8;
+}
+
+SdrHdl* SdrTextObj::GetHdl(USHORT nHdlNum) const
+{
+ SdrHdl* pH=NULL;
+ Point aPnt;
+ SdrHdlKind eKind=HDL_MOVE;
+ switch (nHdlNum) {
+ case 0: aPnt=aRect.TopLeft(); eKind=HDL_UPLFT; break; // Oben links
+ case 1: aPnt=aRect.TopCenter(); eKind=HDL_UPPER; break; // Oben
+ case 2: aPnt=aRect.TopRight(); eKind=HDL_UPRGT; break; // Oben rechts
+ case 3: aPnt=aRect.LeftCenter(); eKind=HDL_LEFT ; break; // Links
+ case 4: aPnt=aRect.RightCenter(); eKind=HDL_RIGHT; break; // Rechts
+ case 5: aPnt=aRect.BottomLeft(); eKind=HDL_LWLFT; break; // Unten links
+ case 6: aPnt=aRect.BottomCenter(); eKind=HDL_LOWER; break; // Unten
+ case 7: aPnt=aRect.BottomRight(); eKind=HDL_LWRGT; break; // Unten rechts
+ }
+ if (aGeo.nShearWink!=0) ShearPoint(aPnt,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoint(aPnt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ if (eKind!=HDL_MOVE) {
+ pH=new SdrHdl(aPnt,eKind);
+ pH->SetObj((SdrObject*)this);
+ pH->SetDrehWink(aGeo.nDrehWink);
+ }
+ return pH;
+}
+
+FASTBOOL SdrTextObj::HasSpecialDrag() const
+{
+ return TRUE;
+}
+
+Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
+{
+ Rectangle aTmpRect(aRect);
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind();
+ FASTBOOL bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT);
+ FASTBOOL bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho();
+ FASTBOOL bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho();
+ Point aPos(rDrag.GetNow());
+ // Unrotate:
+ if (aGeo.nDrehWink!=0) RotatePoint(aPos,aTmpRect.TopLeft(),-aGeo.nSin,aGeo.nCos);
+ // Unshear:
+ if (aGeo.nShearWink!=0) ShearPoint(aPos,aTmpRect.TopLeft(),-aGeo.nTan);
+ //
+ FASTBOOL bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT);
+ FASTBOOL bRgt=(eHdl==HDL_UPRGT || eHdl==HDL_RIGHT || eHdl==HDL_LWRGT);
+ FASTBOOL bTop=(eHdl==HDL_UPRGT || eHdl==HDL_UPPER || eHdl==HDL_UPLFT);
+ FASTBOOL bBtm=(eHdl==HDL_LWRGT || eHdl==HDL_LOWER || eHdl==HDL_LWLFT);
+ if (bLft) aTmpRect.Left() =aPos.X();
+ if (bRgt) aTmpRect.Right() =aPos.X();
+ if (bTop) aTmpRect.Top() =aPos.Y();
+ if (bBtm) aTmpRect.Bottom()=aPos.Y();
+ if (bOrtho) { // Ortho
+ long nWdt0=aRect.Right() -aRect.Left();
+ long nHgt0=aRect.Bottom()-aRect.Top();
+ long nXMul=aTmpRect.Right() -aTmpRect.Left();
+ long nYMul=aTmpRect.Bottom()-aTmpRect.Top();
+ long nXDiv=nWdt0;
+ long nYDiv=nHgt0;
+ FASTBOOL bXNeg=(nXMul<0)!=(nXDiv<0);
+ FASTBOOL bYNeg=(nYMul<0)!=(nYDiv<0);
+ nXMul=Abs(nXMul);
+ nYMul=Abs(nYMul);
+ nXDiv=Abs(nXDiv);
+ nYDiv=Abs(nYDiv);
+ Fraction aXFact(nXMul,nXDiv); // Fractions zum kuerzen
+ Fraction aYFact(nYMul,nYDiv); // und zum vergleichen
+ nXMul=aXFact.GetNumerator();
+ nYMul=aYFact.GetNumerator();
+ nXDiv=aXFact.GetDenominator();
+ nYDiv=aYFact.GetDenominator();
+ if (bEcke) { // Eckpunkthandles
+ FASTBOOL bUseX=(aXFact<aYFact) != bBigOrtho;
+ if (bUseX) {
+ long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
+ if (bYNeg) nNeed=-nNeed;
+ if (bTop) aTmpRect.Top()=aTmpRect.Bottom()-nNeed;
+ if (bBtm) aTmpRect.Bottom()=aTmpRect.Top()+nNeed;
+ } else {
+ long nNeed=long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
+ if (bXNeg) nNeed=-nNeed;
+ if (bLft) aTmpRect.Left()=aTmpRect.Right()-nNeed;
+ if (bRgt) aTmpRect.Right()=aTmpRect.Left()+nNeed;
+ }
+ } else { // Scheitelpunkthandles
+ if ((bLft || bRgt) && nXDiv!=0) {
+ long nHgt0=aRect.Bottom()-aRect.Top();
+ long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
+ aTmpRect.Top()-=(nNeed-nHgt0)/2;
+ aTmpRect.Bottom()=aTmpRect.Top()+nNeed;
+ }
+ if ((bTop || bBtm) && nYDiv!=0) {
+ long nWdt0=aRect.Right()-aRect.Left();
+ long nNeed=long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
+ aTmpRect.Left()-=(nNeed-nWdt0)/2;
+ aTmpRect.Right()=aTmpRect.Left()+nNeed;
+ }
+ }
+ }
+ ImpJustifyRect(aTmpRect);
+ return aTmpRect;
+}
+
+class ImpTextDragUser
+{
+public:
+ Rectangle aR;
+};
+
+FASTBOOL SdrTextObj::BegDrag(SdrDragStat& rDrag) const
+{
+ if (bSizProt) return FALSE; // Groesse geschuetzt
+ const SdrHdl* pHdl=rDrag.GetHdl();
+ SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind();
+ if (eHdl==HDL_UPLFT || eHdl==HDL_UPPER || eHdl==HDL_UPRGT ||
+ eHdl==HDL_LEFT || eHdl==HDL_RIGHT ||
+ eHdl==HDL_LWLFT || eHdl==HDL_LOWER || eHdl==HDL_LWRGT)
+ {
+ ImpTextDragUser* pUser=new ImpTextDragUser;
+ pUser->aR=aRect;
+ rDrag.SetUser(pUser);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+FASTBOOL SdrTextObj::MovDrag(SdrDragStat& rDrag) const
+{
+ ImpTextDragUser* pUser=(ImpTextDragUser*)rDrag.GetUser();
+ Rectangle aOldRect(pUser->aR);
+ pUser->aR=ImpDragCalcRect(rDrag);
+ return pUser->aR!=aOldRect;
+}
+
+FASTBOOL SdrTextObj::EndDrag(SdrDragStat& rDrag)
+{
+ ImpTextDragUser* pUser=(ImpTextDragUser*)rDrag.GetUser();
+ Rectangle aNewRect(pUser->aR);
+ if (aNewRect.TopLeft()!=aRect.TopLeft() &&
+ (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0))
+ {
+ Point aNewPos(aNewRect.TopLeft());
+ if (aGeo.nShearWink!=0) ShearPoint(aNewPos,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoint(aNewPos,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ aNewRect.SetPos(aNewPos);
+ }
+ if (aNewRect!=aRect) {
+ long nHgt0=aRect.Bottom()-aRect.Top();
+ long nHgt1=aNewRect.Bottom()-aNewRect.Top();
+ long nWdt0=aRect.Right()-aRect.Left();
+ long nWdt1=aNewRect.Right()-aNewRect.Left();
+ SetLogicRect(aNewRect);
+ }
+ delete pUser;
+ rDrag.SetUser(NULL);
+ return TRUE;
+}
+
+void SdrTextObj::BrkDrag(SdrDragStat& rDrag) const
+{
+ delete rDrag.GetUser();
+ rDrag.SetUser(NULL);
+}
+
+XubString SdrTextObj::GetDragComment(const SdrDragStat& rDrag, FASTBOOL bUndoDragComment, FASTBOOL bCreateComment) const
+{
+ XubString aStr;
+ if (!bCreateComment) ImpTakeDescriptionStr(STR_DragRectResize,aStr);
+ return aStr;
+}
+
+void SdrTextObj::TakeDragPoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rXPP.Clear();
+ Rectangle aTmpRect(ImpDragCalcRect(rDrag));
+ if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) {
+ Polygon aPoly(aTmpRect);
+ if (aGeo.nShearWink!=0) ShearPoly(aPoly,aRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoly(aPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ rXPP.Insert(XPolygon(aPoly));
+ } else {
+ rXPP.Insert(XPolygon(aTmpRect));
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Create
+
+FASTBOOL SdrTextObj::BegCreate(SdrDragStat& rStat)
+{
+ rStat.SetOrtho4Possible();
+ return TRUE;
+}
+
+FASTBOOL SdrTextObj::MovCreate(SdrDragStat& rStat)
+{
+ Rectangle aRect1;
+ rStat.TakeCreateRect(aRect1);
+ ImpJustifyRect(aRect1);
+ rStat.SetActionRect(aRect1);
+ aRect=aRect1; // fuer ObjName
+ bBoundRectDirty=TRUE;
+ bSnapRectDirty=TRUE;
+ if (HAS_BASE(SdrRectObj,this)) {
+ ((SdrRectObj*)this)->SetXPolyDirty();
+ }
+ return TRUE;
+}
+
+FASTBOOL SdrTextObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+{
+ rStat.TakeCreateRect(aRect);
+ ImpJustifyRect(aRect);
+ if (bTextFrame) {
+ if (IsAutoGrowHeight()) {
+ // MinTextHeight
+ long nHgt=aRect.GetHeight()-1;
+ if (nHgt==1) nHgt=0;
+ NbcSetMinTextFrameHeight(nHgt);
+ }
+ if (IsAutoGrowWidth()) {
+ // MinTextWidth
+ long nWdt=aRect.GetWidth()-1;
+ if (nWdt==1) nWdt=0;
+ NbcSetMinTextFrameWidth(nWdt);
+ }
+ // Textrahmen neu berechnen
+ NbcAdjustTextFrameWidthAndHeight();
+ }
+ SetRectsDirty();
+ if (HAS_BASE(SdrRectObj,this)) {
+ ((SdrRectObj*)this)->SetXPolyDirty();
+ }
+ return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
+}
+
+void SdrTextObj::BrkCreate(SdrDragStat& rStat)
+{
+}
+
+FASTBOOL SdrTextObj::BckCreate(SdrDragStat& rStat)
+{
+ return TRUE;
+}
+
+void SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ Rectangle aRect1;
+ rDrag.TakeCreateRect(aRect1);
+ aRect1.Justify();
+ rXPP=XPolyPolygon(XPolygon(aRect1));
+}
+
+Pointer SdrTextObj::GetCreatePointer() const
+{
+ if (IsTextFrame()) return Pointer(POINTER_DRAW_TEXT);
+ return Pointer(POINTER_CROSS);
+}
+
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
new file mode 100644
index 0000000000..dd56dd1e73
--- /dev/null
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdotxed.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdotext.hxx"
+#include "svditext.hxx"
+#include "svdmodel.hxx" // fuer GetMaxObjSize
+#include "svdoutl.hxx"
+
+#ifndef _OUTLINER_HXX //autogen
+#include "outliner.hxx"
+#endif
+
+#ifndef _EDITSTAT_HXX //autogen
+#include <editstat.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+// TextEdit
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrTextObj::HasTextEdit() const
+{
+ // lt. Anweisung von MB duerfen gelinkte Textobjekte nun doch
+ // geaendert werden (kein automatisches Reload)
+ return TRUE;
+}
+
+FASTBOOL SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
+{
+ if (pEdtOutl!=NULL) return FALSE; // Textedit laeuft evtl. schon an einer anderen View!
+ pEdtOutl=&rOutl;
+
+ USHORT nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+ if ( !IsOutlText() )
+ nOutlinerMode = OUTLINERMODE_TEXTOBJECT;
+ rOutl.Init( nOutlinerMode );
+ rOutl.SetRefDevice( pModel->GetRefDevice() );
+
+ SdrFitToSizeType eFit=GetFitToSize();
+ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ FASTBOOL bContourFrame=IsContourTextFrame();
+ ImpSetTextEditParams();
+
+ if (!bContourFrame) {
+ ULONG nStat=rOutl.GetControlWord();
+ nStat|=EE_CNTRL_AUTOPAGESIZE;
+ if (bFitToSize) nStat|=EE_CNTRL_STRETCHING; else nStat&=~EE_CNTRL_STRETCHING;
+ rOutl.SetControlWord(nStat);
+ }
+
+ if (pOutlinerParaObject!=NULL) {
+ rOutl.SetText(*pOutlinerParaObject);
+ }
+ // ggf. Rahmenattribute am 1. (neuen) Absatz des Outliners setzen
+ if (rOutl.GetParagraphCount()==1) { // bei nur einem Para nachsehen ob da ueberhaupt was drin steht
+ XubString aStr( rOutl.GetText( rOutl.GetParagraph( 0 ) ) );
+
+ if(!aStr.Len())
+ {
+ // Aha, steht nix drin!
+ // damit sich der Outliner initiallisiert
+ rOutl.SetText( String(), rOutl.GetParagraph( 0 ) );
+
+ if(pStyleSheet)
+ rOutl.SetStyleSheet( 0, pStyleSheet );
+
+ // Beim setzen der harten Attribute an den ersten Absatz muss
+ // der Parent pOutlAttr (=die Vorlage) temporaer entfernt
+ // werden, da sonst bei SetParaAttribs() auch alle in diesem
+ // Parent enthaltenen Items hart am Absatz attributiert werden.
+ // -> BugID 22467
+ const SfxItemSet* pTmpSet=&pOutlAttr->GetItemSet();
+ const SfxItemSet* pParentMerk=pTmpSet->GetParent();
+ ((SfxItemSet*)pTmpSet)->SetParent(NULL);
+ rOutl.SetParaAttribs(0,*pTmpSet);
+ ((SfxItemSet*)pTmpSet)->SetParent(pParentMerk);
+ }
+ }
+ if (bFitToSize) {
+ Rectangle aAnchorRect;
+ Rectangle aTextRect;
+ TakeTextRect(rOutl, aTextRect, FALSE, &aAnchorRect, FALSE);
+ Fraction aFitXKorreg(1,1);
+ ImpSetCharStretching(rOutl,aTextRect,aAnchorRect,aFitXKorreg);
+ }
+
+ if (pOutlinerParaObject!=NULL && (aGeo.nDrehWink!=0 || IsFontwork())) {
+ SendRepaintBroadcast();
+ }
+ rOutl.UpdateFields();
+ rOutl.ClearModifyFlag();
+ return TRUE;
+}
+
+void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const
+{
+ SdrFitToSizeType eFit=GetFitToSize();
+ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ Size aPaperMin,aPaperMax;
+ Rectangle aViewInit;
+ TakeTextAnchorRect(aViewInit);
+ if (aGeo.nDrehWink!=0) {
+ Point aCenter(aViewInit.Center());
+ aCenter-=aViewInit.TopLeft();
+ Point aCenter0(aCenter);
+ RotatePoint(aCenter,Point(),aGeo.nSin,aGeo.nCos);
+ aCenter-=aCenter0;
+ aViewInit.Move(aCenter.X(),aCenter.Y());
+ }
+ Size aAnkSiz(aViewInit.GetSize());
+ aAnkSiz.Width()--; aAnkSiz.Height()--; // weil GetSize() ein draufaddiert
+ Size aMaxSiz(1000000,1000000);
+ if (pModel!=NULL) {
+ Size aTmpSiz(pModel->GetMaxObjSize());
+ if (aTmpSiz.Width()!=0) aMaxSiz.Width()=aTmpSiz.Width();
+ if (aTmpSiz.Height()!=0) aMaxSiz.Height()=aTmpSiz.Height();
+ }
+ if (bTextFrame) {
+ long nMinWdt=GetMinTextFrameWidth();
+ long nMinHgt=GetMinTextFrameHeight();
+ long nMaxWdt=GetMaxTextFrameWidth();
+ long nMaxHgt=GetMaxTextFrameHeight();
+ if (nMinWdt<1) nMinWdt=1;
+ if (nMinHgt<1) nMinHgt=1;
+ if (!bFitToSize) {
+ if (nMaxWdt==0 || nMaxWdt>aMaxSiz.Width()) nMaxWdt=aMaxSiz.Width();
+ if (nMaxHgt==0 || nMaxHgt>aMaxSiz.Height()) nMaxHgt=aMaxSiz.Height();
+ if (!IsAutoGrowWidth() ) { nMaxWdt=aAnkSiz.Width(); nMinWdt=nMaxWdt; }
+ if (!IsAutoGrowHeight()) { nMaxHgt=aAnkSiz.Height(); nMinHgt=nMaxHgt; }
+ SdrTextAniKind eAniKind=GetTextAniKind();
+ SdrTextAniDirection eAniDirection=GetTextAniDirection();
+ if (eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE) {
+ // Grenzenlose Papiergroesse fuer Laufschrift
+ if (eAniDirection==SDRTEXTANI_LEFT || eAniDirection==SDRTEXTANI_RIGHT) nMaxWdt=1000000;
+ if (eAniDirection==SDRTEXTANI_UP || eAniDirection==SDRTEXTANI_DOWN) nMaxHgt=1000000;
+ }
+ aPaperMax.Width()=nMaxWdt;
+ aPaperMax.Height()=nMaxHgt;
+ } else {
+ aPaperMax=aMaxSiz;
+ }
+ aPaperMin.Width()=nMinWdt;
+ aPaperMin.Height()=nMinHgt;
+ } else {
+ aPaperMax=aMaxSiz;
+ }
+
+ SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
+ SdrTextVertAdjust eVAdj=GetTextVerticalAdjust();
+ if (pViewMin!=NULL) {
+ *pViewMin=aViewInit;
+
+ long nXFree=aAnkSiz.Width()-aPaperMin.Width();
+ if (eHAdj==SDRTEXTHORZADJUST_LEFT) pViewMin->Right()-=nXFree;
+ else if (eHAdj==SDRTEXTHORZADJUST_RIGHT) pViewMin->Left()+=nXFree;
+ else { pViewMin->Left()+=nXFree/2; pViewMin->Right()=pViewMin->Left()+aPaperMin.Width(); }
+
+ long nYFree=aAnkSiz.Height()-aPaperMin.Height();
+ if (eVAdj==SDRTEXTVERTADJUST_TOP) pViewMin->Bottom()-=nYFree;
+ else if (eVAdj==SDRTEXTVERTADJUST_BOTTOM) pViewMin->Top()+=nYFree;
+ else { pViewMin->Top()+=nYFree/2; pViewMin->Bottom()=pViewMin->Top()+aPaperMin.Height(); }
+ }
+
+ // Die PaperSize soll in den meisten Faellen von selbst wachsen
+ aPaperMin.Height()=0; // #33102#
+ if (eHAdj!=SDRTEXTHORZADJUST_BLOCK || bFitToSize) {
+ aPaperMin.Width()=0;
+ }
+ if (pPaperMin!=NULL) *pPaperMin=aPaperMin;
+ if (pPaperMax!=NULL) *pPaperMax=aPaperMax;
+ if (pViewInit!=NULL) *pViewInit=aViewInit;
+}
+
+void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
+{
+ if(rOutl.IsModified())
+ {
+ OutlinerParaObject* pNewText = NULL;
+ Paragraph* p1stPara = rOutl.GetParagraph( 0 );
+ UINT32 nParaAnz = rOutl.GetParagraphCount();
+
+ if(p1stPara)
+ {
+ if(nParaAnz == 1)
+ {
+ // bei nur einem Para nachsehen ob da ueberhaupt was drin steht
+ XubString aStr(rOutl.GetText(p1stPara));
+
+ if(!aStr.Len())
+ {
+ // Aha, steht nix drin!
+ nParaAnz = 0;
+ }
+ }
+
+ // Damit der grauen Feldhintergrund wieder verschwindet
+ rOutl.UpdateFields();
+
+ if(nParaAnz != 0)
+ {
+ // Wirklich Textobjekt kreieren
+ pNewText = rOutl.CreateParaObject( 0, nParaAnz );
+ }
+ }
+ SetOutlinerParaObject(pNewText);
+ }
+
+ pEdtOutl = NULL;
+ rOutl.Clear();
+ UINT32 nStat = rOutl.GetControlWord();
+ nStat &= ~EE_CNTRL_AUTOPAGESIZE;
+ rOutl.SetControlWord(nStat);
+}
+
+SdrObject* SdrTextObj::CheckTextEditHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ return SdrTextObj::CheckHit(rPnt,nTol,pVisiLayer);
+}
+
+USHORT SdrTextObj::GetOutlinerViewAnchorMode() const
+{
+ SdrTextHorzAdjust eH=GetTextHorizontalAdjust();
+ SdrTextVertAdjust eV=GetTextVerticalAdjust();
+ EVAnchorMode eRet=ANCHOR_TOP_LEFT;
+ if (IsContourTextFrame()) return (USHORT)eRet;
+ if (eH==SDRTEXTHORZADJUST_LEFT) {
+ if (eV==SDRTEXTVERTADJUST_TOP) {
+ eRet=ANCHOR_TOP_LEFT;
+ } else if (eV==SDRTEXTVERTADJUST_BOTTOM) {
+ eRet=ANCHOR_BOTTOM_LEFT;
+ } else {
+ eRet=ANCHOR_VCENTER_LEFT;
+ }
+ } else if (eH==SDRTEXTHORZADJUST_RIGHT) {
+ if (eV==SDRTEXTVERTADJUST_TOP) {
+ eRet=ANCHOR_TOP_RIGHT;
+ } else if (eV==SDRTEXTVERTADJUST_BOTTOM) {
+ eRet=ANCHOR_BOTTOM_RIGHT;
+ } else {
+ eRet=ANCHOR_VCENTER_RIGHT;
+ }
+ } else {
+ if (eV==SDRTEXTVERTADJUST_TOP) {
+ eRet=ANCHOR_TOP_HCENTER;
+ } else if (eV==SDRTEXTVERTADJUST_BOTTOM) {
+ eRet=ANCHOR_BOTTOM_HCENTER;
+ } else {
+ eRet=ANCHOR_VCENTER_HCENTER;
+ }
+ }
+ return (USHORT)eRet;
+}
+
+void SdrTextObj::ImpSetTextEditParams() const
+{
+ if (pEdtOutl!=NULL) {
+ FASTBOOL bUpdMerk=pEdtOutl->GetUpdateMode();
+ if (bUpdMerk) pEdtOutl->SetUpdateMode(FALSE);
+ Size aPaperMin;
+ Size aPaperMax;
+ Rectangle aEditArea;
+ TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,NULL);
+ SdrFitToSizeType eFit=GetFitToSize();
+ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ FASTBOOL bContourFrame=IsContourTextFrame();
+ EVAnchorMode eAM=(EVAnchorMode)GetOutlinerViewAnchorMode();
+ ULONG nViewAnz=pEdtOutl->GetViewCount();
+ pEdtOutl->SetMinAutoPaperSize(aPaperMin);
+ pEdtOutl->SetMaxAutoPaperSize(aPaperMax);
+ pEdtOutl->SetPaperSize(Size());
+ if (bContourFrame) {
+ Rectangle aAnchorRect;
+ TakeTextAnchorRect(aAnchorRect);
+ ImpSetContourPolygon(*pEdtOutl,aAnchorRect, TRUE);
+ }
+ if (bUpdMerk) pEdtOutl->SetUpdateMode(TRUE);
+ }
+}
+
diff --git a/svx/source/svdraw/svdotxfl.cxx b/svx/source/svdraw/svdotxfl.cxx
new file mode 100644
index 0000000000..7c3930334b
--- /dev/null
+++ b/svx/source/svdraw/svdotxfl.cxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdotxfl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+
+#include "svdfield.hxx"
+#include "svdotext.hxx"
+
+// Do not remove this, it is still used in src536a!
+void SdrRegisterFieldClasses()
+{
+ SvxFieldItem::GetClassManager().SV_CLASS_REGISTER(SdrMeasureField);
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////// */
+
+FASTBOOL SdrTextObj::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos,
+ FASTBOOL bEdit, Color*& rpTxtColor, Color*& rpFldColor, XubString& rRet) const
+{
+ return FALSE;
+}
+
diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx
new file mode 100644
index 0000000000..50b9a78a69
--- /dev/null
+++ b/svx/source/svdraw/svdotxln.cxx
@@ -0,0 +1,441 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdotxln.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _UCBHELPER_CONTENT_HXX_
+#include <ucbhelper/content.hxx>
+#endif
+#ifndef _UCBHELPER_CONTENTBROKER_HXX_
+#include <ucbhelper/contentbroker.hxx>
+#endif
+#ifndef _UNOTOOLS_DATETIME_HXX_
+#include <unotools/datetime.hxx>
+#endif
+
+#include "svdotext.hxx"
+#include "svditext.hxx"
+#include "svdmodel.hxx"
+#include "svdio.hxx"
+#include "editdata.hxx"
+
+#ifndef SVX_LIGHT
+#ifndef _LNKBASE_HXX //autogen
+#include <so3/lnkbase.hxx>
+#endif
+#endif
+
+#ifndef _SVXLINKMGR_HXX //autogen
+#include <linkmgr.hxx>
+#endif
+
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+
+#include <svtools/urihelper.hxx>
+
+#ifndef SVX_LIGHT
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@@ @@@@@@ @@@@@@ @@ @@ @@@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@@@@ @@ @@ @@ @@ @@@@@@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@@ @@ @@
+// @@@@ @@@@@ @@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@ @@ @@ @@
+//
+// ImpSdrObjTextLink zur Verbindung von SdrTextObj und LinkManager
+//
+// Einem solchen Link merke ich mir als SdrObjUserData am Objekt. Im Gegensatz
+// zum Grafik-Link werden die ObjektDaten jedoch kopiert (fuer Paint, etc.).
+// Die Information ob das Objekt ein Link ist besteht genau darin, dass dem
+// Objekt ein entsprechender UserData-Record angehaengt ist oder nicht.
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpSdrObjTextLink: public SvBaseLink
+{
+ SdrTextObj* pSdrObj;
+
+public:
+ ImpSdrObjTextLink(SdrTextObj* pObj1): SvBaseLink(LINKUPDATE_ONCALL,FORMAT_FILE),pSdrObj(pObj1) {}
+ virtual ~ImpSdrObjTextLink();
+
+ virtual void Closed();
+ virtual void DataChanged(SvData& rData);
+
+ BOOL Connect() { return 0 != SvBaseLink::GetRealObject(); }
+};
+
+ImpSdrObjTextLink::~ImpSdrObjTextLink()
+{
+}
+
+void ImpSdrObjTextLink::Closed()
+{
+ if (pSdrObj!=NULL) {
+ // pLink des Objekts auf NULL setzen, da die Link-Instanz ja gerade destruiert wird.
+ ImpSdrObjTextLinkUserData* pData=pSdrObj->GetLinkUserData();
+ if (pData!=NULL) pData->pLink=NULL;
+ pSdrObj->ReleaseTextLink();
+ }
+ SvBaseLink::Closed();
+}
+
+void ImpSdrObjTextLink::DataChanged(SvData& rData)
+{
+ FASTBOOL bForceReload=FALSE;
+ SdrModel* pModel = pSdrObj ==NULL ? NULL : pSdrObj->GetModel();
+ SvxLinkManager* pLinkManager= pModel==NULL ? NULL : pModel->GetLinkManager();
+ if (pLinkManager!=NULL) {
+ ImpSdrObjTextLinkUserData* pData=pSdrObj->GetLinkUserData();
+ if (pData!=NULL) {
+ String aFile;
+ String aFilter;
+ pLinkManager->GetDisplayNames(*this,NULL,&aFile,NULL,&aFilter);
+
+ if(!pData->aFileName.Equals(aFile) || !pData->aFilterName.Equals(aFilter))
+ {
+ pData->aFileName = aFile;
+ pData->aFilterName = aFilter;
+ pSdrObj->SetChanged();
+ bForceReload = TRUE;
+ }
+ }
+ }
+ if (pSdrObj!=NULL) {
+ pSdrObj->ReloadLinkedText(bForceReload);
+ }
+}
+#endif // SVX_LIGHT
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@ @@ @@ @@ @@ @@ @@@@@ @@@@@@ @@@@@ @@@@@ @@@@ @@@@@@ @@@@
+// @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@@ @@@@ @@ @@ @@@@ @@@@@ @@@@@ @@ @@ @@@@@@ @@ @@@@@@
+// @@ @@ @@ @@@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@ @@ @@ @@ @@ @@ @@@@ @@@@@ @@@@@@ @@ @@ @@@@@ @@ @@ @@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(ImpSdrObjTextLinkUserData,SdrObjUserData);
+
+ImpSdrObjTextLinkUserData::ImpSdrObjTextLinkUserData(SdrTextObj* pObj1):
+ SdrObjUserData(SdrInventor,SDRUSERDATA_OBJTEXTLINK,0),
+ pObj(pObj1),
+ pLink(NULL),
+ eCharSet(RTL_TEXTENCODING_DONTKNOW)
+{
+}
+
+ImpSdrObjTextLinkUserData::~ImpSdrObjTextLinkUserData()
+{
+#ifndef SVX_LIGHT
+ delete pLink;
+#endif
+}
+
+SdrObjUserData* ImpSdrObjTextLinkUserData::Clone(SdrObject* pObj1) const
+{
+ ImpSdrObjTextLinkUserData* pData=new ImpSdrObjTextLinkUserData((SdrTextObj*)pObj1);
+ pData->aFileName =aFileName;
+ pData->aFilterName=aFilterName;
+ pData->aFileDate0 =aFileDate0;
+ pData->eCharSet =eCharSet;
+ pData->pLink=NULL;
+ return pData;
+}
+
+void ImpSdrObjTextLinkUserData::WriteData(SvStream& rOut)
+{
+ SdrObjUserData::WriteData(rOut);
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rOut, STREAM_WRITE);
+
+#ifdef DBG_UTIL
+ aCompat.SetID("ImpSdrObjTextLinkUserData");
+#endif
+
+ String aRelFileName;
+
+ if( aFileName.Len() )
+ {
+ aRelFileName = INetURLObject::AbsToRel( aFileName,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS );
+ }
+
+ rOut.WriteByteString( aRelFileName );
+
+ // UNICODE: rOut << aFilterName;
+ rOut.WriteByteString(aFilterName);
+
+ rOut << UINT16(GetStoreCharSet(eCharSet));
+ rOut << UINT32(aFileDate0.GetDate());
+ rOut << UINT32(aFileDate0.GetTime());
+}
+
+void ImpSdrObjTextLinkUserData::ReadData(SvStream& rIn)
+{
+ SdrObjUserData::ReadData(rIn);
+ // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+ SdrDownCompat aCompat(rIn, STREAM_READ);
+
+#ifdef DBG_UTIL
+ aCompat.SetID("ImpSdrObjTextLinkUserData");
+#endif
+
+ UINT32 nTmp32;
+ UINT16 nTmp16;
+ String aFileNameRel;
+
+ rIn.ReadByteString(aFileNameRel);
+
+ if( aFileNameRel.Len() )
+ {
+
+ aFileName = ::URIHelper::SmartRelToAbs( aFileNameRel, FALSE,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS );
+ }
+ else
+ aFileName.Erase();
+
+ // UNICODE: rIn >> aFilterName;
+ rIn.ReadByteString(aFilterName);
+
+ rIn >> nTmp16; eCharSet = rtl_TextEncoding(nTmp16);
+ rIn >> nTmp32; aFileDate0.SetDate(nTmp32);
+ rIn >> nTmp32; aFileDate0.SetTime(nTmp32);
+}
+
+void ImpSdrObjTextLinkUserData::AfterRead()
+{
+ if (pObj!=NULL) {
+ pObj->ImpLinkAnmeldung();
+ // lt. Anweisung von MB kein automatisches Reload mehr
+ //pObj->ReloadLinkedText();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrTextObj::SetTextLink(const String& rFileName, const String& rFilterName, rtl_TextEncoding eCharSet)
+{
+ if(eCharSet == RTL_TEXTENCODING_DONTKNOW)
+ eCharSet = gsl_getSystemTextEncoding();
+
+ ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
+ if (pData!=NULL) {
+ ReleaseTextLink();
+ }
+ pData=new ImpSdrObjTextLinkUserData(this);
+ pData->aFileName=rFileName;
+ pData->aFilterName=rFilterName;
+ pData->eCharSet=eCharSet;
+ InsertUserData(pData);
+ ImpLinkAnmeldung();
+}
+
+void SdrTextObj::ReleaseTextLink()
+{
+ ImpLinkAbmeldung();
+ USHORT nAnz=GetUserDataCount();
+ for (USHORT nNum=nAnz; nNum>0;) {
+ nNum--;
+ SdrObjUserData* pData=GetUserData(nNum);
+ if (pData->GetInventor()==SdrInventor && pData->GetId()==SDRUSERDATA_OBJTEXTLINK) {
+ DeleteUserData(nNum);
+ }
+ }
+}
+
+FASTBOOL SdrTextObj::ReloadLinkedText(FASTBOOL bForceLoad)
+{
+ ImpSdrObjTextLinkUserData* pData = GetLinkUserData();
+ FASTBOOL bRet = TRUE;
+
+ if( pData )
+ {
+ ::ucb::ContentBroker* pBroker = ::ucb::ContentBroker::get();
+ DateTime aFileDT;
+ BOOL bExists = FALSE, bLoad = FALSE;
+
+ if( pBroker )
+ {
+ bExists = TRUE;
+
+ try
+ {
+ INetURLObject aURL; aURL.SetSmartURL( pData->aFileName );
+ ::ucb::Content aCnt( aURL.GetMainURL(), ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() );
+ ::com::sun::star::uno::Any aAny( aCnt.getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ) ) );
+ ::com::sun::star::util::DateTime aDateTime;
+
+ aAny >>= aDateTime;
+ ::utl::typeConvert( aDateTime, aFileDT );
+ }
+ catch( ... )
+ {
+ bExists = FALSE;
+ }
+ }
+
+ if( bExists )
+ {
+ if( bForceLoad )
+ bLoad = TRUE;
+ else
+ bLoad = ( aFileDT > pData->aFileDate0 );
+
+ if( bLoad )
+ {
+ bRet = LoadText( pData->aFileName, pData->aFilterName, pData->eCharSet );
+ }
+
+ pData->aFileDate0 = aFileDT;
+ }
+ }
+
+ return bRet;
+}
+
+FASTBOOL SdrTextObj::LoadText(const String& rFileName, const String& rFilterName, rtl_TextEncoding eCharSet)
+{
+ SvFileStream aIn(rFileName, STREAM_READ);
+ aIn.SetStreamCharSet(eCharSet);
+ char cRTF[5];
+ cRTF[4] = 0;
+ aIn.Read(cRTF, 5);
+
+ BOOL bRTF = cRTF[0] == '{'
+ && cRTF[1] == '\\'
+ && cRTF[2] == 'r'
+ && cRTF[3] == 't'
+ && cRTF[4] == 'f';
+
+ aIn.Seek(0);
+
+ if(!aIn.GetError())
+ {
+ SetText(aIn, bRTF ? EE_FORMAT_RTF : EE_FORMAT_TEXT);
+ }
+
+ return !aIn.GetError();
+}
+
+ImpSdrObjTextLinkUserData* SdrTextObj::GetLinkUserData() const
+{
+ ImpSdrObjTextLinkUserData* pData=NULL;
+ USHORT nAnz=GetUserDataCount();
+ for (USHORT nNum=nAnz; nNum>0 && pData==NULL;) {
+ nNum--;
+ pData=(ImpSdrObjTextLinkUserData*)GetUserData(nNum);
+ if (pData->GetInventor()!=SdrInventor || pData->GetId()!=SDRUSERDATA_OBJTEXTLINK) {
+ pData=NULL;
+ }
+ }
+ return pData;
+}
+
+void SdrTextObj::ImpLinkAnmeldung()
+{
+#ifndef SVX_LIGHT
+ ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
+ SvxLinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
+ if (pLinkManager!=NULL && pData!=NULL && pData->pLink==NULL) { // Nicht 2x Anmelden
+ pData->pLink=new ImpSdrObjTextLink(this);
+#ifdef GCC
+ pLinkManager->InsertFileLink(*pData->pLink,OBJECT_CLIENT_FILE,pData->aFileName,
+ pData->aFilterName.Len() ?
+ &pData->aFilterName : (const String *)NULL,
+ (const String *)NULL);
+#else
+ pLinkManager->InsertFileLink(*pData->pLink,OBJECT_CLIENT_FILE,pData->aFileName,
+ pData->aFilterName.Len() ? &pData->aFilterName : NULL,NULL);
+#endif
+ pData->pLink->Connect();
+ }
+#endif // SVX_LIGHT
+}
+
+void SdrTextObj::ImpLinkAbmeldung()
+{
+#ifndef SVX_LIGHT
+ ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
+ SvxLinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
+ if (pLinkManager!=NULL && pData!=NULL && pData->pLink!=NULL) { // Nicht 2x Abmelden
+ // Bei Remove wird *pLink implizit deleted
+ pLinkManager->Remove(*pData->pLink);
+ pData->pLink=NULL;
+ }
+#endif // SVX_LIGHT
+}
+
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
new file mode 100644
index 0000000000..9c7ef0e856
--- /dev/null
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -0,0 +1,458 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdotxtr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdotext.hxx"
+#include "xoutx.hxx" // fuer XOutCreatePolygon
+#include "svditext.hxx"
+#include "svdtrans.hxx"
+#include "svdogrp.hxx"
+#include "svdopath.hxx"
+#include "svdoutl.hxx"
+#include "svdtxhdl.hxx" // DrawTextToPath fuer Convert
+#include "svdpage.hxx" // fuer Convert
+#include "svdmodel.hxx" // fuer Convert
+
+#ifndef _OUTLINER_HXX //autogen
+#include "outliner.hxx"
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@@ @@@@@ @@ @@ @@@@@@ @@@@ @@@@@ @@@@@@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@@@ @@@ @@ @@ @@ @@@@@ @@
+// @@ @@ @@@@@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@@@ @@@@@ @@@@
+//
+// Transformationen
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) {
+ Rectangle aSR0(GetSnapRect());
+ long nWdt0=aSR0.Right()-aSR0.Left();
+ long nHgt0=aSR0.Bottom()-aSR0.Top();
+ long nWdt1=rRect.Right()-rRect.Left();
+ long nHgt1=rRect.Bottom()-rRect.Top();
+ SdrTextObj::NbcResize(aSnapRect.TopLeft(),Fraction(nWdt1,nWdt0),Fraction(nHgt1,nHgt0));
+ SdrTextObj::NbcMove(Size(rRect.Left()-aSR0.Left(),rRect.Top()-aSR0.Top()));
+ } else {
+ long nHDist=GetTextLeftDistance()+GetTextRightDistance();
+ long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
+ long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0;
+ long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0;
+ long nTWdt1=rRect.GetWidth ()-1-nHDist; if (nTWdt1<0) nTWdt1=0;
+ long nTHgt1=rRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0;
+ aRect=rRect;
+ ImpJustifyRect(aRect);
+ if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139#
+ if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
+ if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
+ if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {
+ NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0));
+ }
+ NbcAdjustTextFrameWidthAndHeight();
+ }
+ ImpCheckShear();
+ SetRectsDirty();
+ }
+}
+
+const Rectangle& SdrTextObj::GetLogicRect() const
+{
+ return aRect;
+}
+
+void SdrTextObj::NbcSetLogicRect(const Rectangle& rRect)
+{
+ long nHDist=GetTextLeftDistance()+GetTextRightDistance();
+ long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
+ long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0;
+ long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0;
+ long nTWdt1=rRect.GetWidth ()-1-nHDist; if (nTWdt1<0) nTWdt1=0;
+ long nTHgt1=rRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0;
+ aRect=rRect;
+ ImpJustifyRect(aRect);
+ if (bTextFrame) {
+ if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
+ if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
+ if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {
+ NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0));
+ }
+ NbcAdjustTextFrameWidthAndHeight();
+ }
+ SetRectsDirty();
+}
+
+long SdrTextObj::GetRotateAngle() const
+{
+ return aGeo.nDrehWink;
+}
+
+long SdrTextObj::GetShearAngle(FASTBOOL bVertical) const
+{
+ return (aGeo.nDrehWink==0 || aGeo.nDrehWink==18000) ? aGeo.nShearWink : 0;
+}
+
+void SdrTextObj::NbcMove(const Size& rSiz)
+{
+ MoveRect(aRect,rSiz);
+ MoveRect(aOutRect,rSiz);
+ MoveRect(aSnapRect,rSiz);
+ SetRectsDirty(TRUE);
+}
+
+void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ FASTBOOL bNoShearMerk=aGeo.nShearWink==0;
+ FASTBOOL bRota90Merk=bNoShearMerk && aGeo.nDrehWink % 9000 ==0;
+ long nHDist=GetTextLeftDistance()+GetTextRightDistance();
+ long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
+ long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0;
+ long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0;
+ FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0);
+ FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0);
+ if (bXMirr || bYMirr) {
+ Point aRef1(GetSnapRect().Center());
+ if (bXMirr) {
+ Point aRef2(aRef1);
+ aRef2.Y()++;
+ NbcMirrorGluePoints(aRef1,aRef2);
+ }
+ if (bYMirr) {
+ Point aRef2(aRef1);
+ aRef2.X()++;
+ NbcMirrorGluePoints(aRef1,aRef2);
+ }
+ }
+
+ if (aGeo.nDrehWink==0 && aGeo.nShearWink==0) {
+ ResizeRect(aRect,rRef,xFact,yFact);
+ if (bYMirr) {
+ aRect.Justify();
+ aRect.Move(aRect.Right()-aRect.Left(),aRect.Bottom()-aRect.Top());
+ aGeo.nDrehWink=18000;
+ aGeo.RecalcSinCos();
+ }
+ } else {
+ Polygon aPol(Rect2Poly(aRect,aGeo));
+ for (USHORT i=0; i<aPol.GetSize(); i++) {
+ ResizePoint(aPol[i],rRef,xFact,yFact);
+ }
+ if (bXMirr!=bYMirr) {
+ // Polygon wenden und etwas schieben
+ Polygon aPol0(aPol);
+ aPol[0]=aPol0[1];
+ aPol[1]=aPol0[0];
+ aPol[2]=aPol0[3];
+ aPol[3]=aPol0[2];
+ aPol[4]=aPol0[1];
+ }
+ Poly2Rect(aPol,aRect,aGeo);
+ }
+
+ if (bRota90Merk) {
+ FASTBOOL bRota90=aGeo.nDrehWink % 9000 ==0;
+ if (!bRota90) { // Scheinbar Rundungsfehler: Korregieren
+ long a=NormAngle360(aGeo.nDrehWink);
+ if (a<4500) a=0;
+ else if (a<13500) a=9000;
+ else if (a<22500) a=18000;
+ else if (a<31500) a=27000;
+ else a=0;
+ aGeo.nDrehWink=a;
+ aGeo.RecalcSinCos();
+ }
+ if (bNoShearMerk!=(aGeo.nShearWink==0)) { // Shear ggf. korregieren wg. Rundungsfehler
+ aGeo.nShearWink=0;
+ aGeo.RecalcTan();
+ }
+ }
+
+ ImpJustifyRect(aRect);
+ long nTWdt1=aRect.GetWidth ()-1-nHDist; if (nTWdt1<0) nTWdt1=0;
+ long nTHgt1=aRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0;
+ if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139#
+ if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1);
+ if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1);
+ if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) {
+ NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0));
+ }
+ NbcAdjustTextFrameWidthAndHeight();
+ }
+ ImpCheckShear();
+ SetRectsDirty();
+}
+
+void SdrTextObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ SetGlueReallyAbsolute(TRUE);
+ long dx=aRect.Right()-aRect.Left();
+ long dy=aRect.Bottom()-aRect.Top();
+ Point aP(aRect.TopLeft());
+ RotatePoint(aP,rRef,sn,cs);
+ aRect.Left()=aP.X();
+ aRect.Top()=aP.Y();
+ aRect.Right()=aRect.Left()+dx;
+ aRect.Bottom()=aRect.Top()+dy;
+ if (aGeo.nDrehWink==0) {
+ aGeo.nDrehWink=NormAngle360(nWink);
+ aGeo.nSin=sn;
+ aGeo.nCos=cs;
+ } else {
+ aGeo.nDrehWink=NormAngle360(aGeo.nDrehWink+nWink);
+ aGeo.RecalcSinCos();
+ }
+ SetRectsDirty();
+ NbcRotateGluePoints(rRef,nWink,sn,cs);
+ SetGlueReallyAbsolute(FALSE);
+}
+
+void SdrTextObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ SetGlueReallyAbsolute(TRUE);
+
+ // #75889# when this is a SdrPathObj aRect maybe not initialized
+ Polygon aPol(Rect2Poly(aRect.IsEmpty() ? GetSnapRect() : aRect, aGeo));
+
+ USHORT nPointCount=aPol.GetSize();
+ for (USHORT i=0; i<nPointCount; i++) {
+ ShearPoint(aPol[i],rRef,tn,bVShear);
+ }
+ Poly2Rect(aPol,aRect,aGeo);
+ ImpJustifyRect(aRect);
+ if (bTextFrame) {
+ NbcAdjustTextFrameWidthAndHeight();
+ }
+ ImpCheckShear();
+ SetRectsDirty();
+ NbcShearGluePoints(rRef,nWink,tn,bVShear);
+ SetGlueReallyAbsolute(FALSE);
+}
+
+void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
+{
+ SetGlueReallyAbsolute(TRUE);
+ FASTBOOL bNoShearMerk=aGeo.nShearWink==0;
+ FASTBOOL bRota90Merk=FALSE;
+ if (bNoShearMerk &&
+ (rRef1.X()==rRef2.X() || rRef1.Y()==rRef2.Y() ||
+ Abs(rRef1.X()-rRef2.X())==Abs(rRef1.Y()-rRef2.Y()))) {
+ bRota90Merk=aGeo.nDrehWink % 9000 ==0;
+ }
+ Polygon aPol(Rect2Poly(aRect,aGeo));
+ USHORT i;
+ USHORT nPntAnz=aPol.GetSize();
+ for (i=0; i<nPntAnz; i++) {
+ MirrorPoint(aPol[i],rRef1,rRef2);
+ }
+ // Polygon wenden und etwas schieben
+ Polygon aPol0(aPol);
+ aPol[0]=aPol0[1];
+ aPol[1]=aPol0[0];
+ aPol[2]=aPol0[3];
+ aPol[3]=aPol0[2];
+ aPol[4]=aPol0[1];
+ Poly2Rect(aPol,aRect,aGeo);
+
+ if (bRota90Merk) {
+ FASTBOOL bRota90=aGeo.nDrehWink % 9000 ==0;
+ if (bRota90Merk && !bRota90) { // Scheinbar Rundungsfehler: Korregieren
+ long a=NormAngle360(aGeo.nDrehWink);
+ if (a<4500) a=0;
+ else if (a<13500) a=9000;
+ else if (a<22500) a=18000;
+ else if (a<31500) a=27000;
+ else a=0;
+ aGeo.nDrehWink=a;
+ aGeo.RecalcSinCos();
+ }
+ }
+ if (bNoShearMerk!=(aGeo.nShearWink==0)) { // Shear ggf. korregieren wg. Rundungsfehler
+ aGeo.nShearWink=0;
+ aGeo.RecalcTan();
+ }
+
+ ImpJustifyRect(aRect);
+ if (bTextFrame) {
+ NbcAdjustTextFrameWidthAndHeight();
+ }
+ ImpCheckShear();
+ SetRectsDirty();
+ NbcMirrorGluePoints(rRef1,rRef2);
+ SetGlueReallyAbsolute(FALSE);
+}
+
+SdrObject* SdrTextObj::ImpConvertObj(FASTBOOL bToPoly) const
+{
+ if (!ImpCanConvTextToCurve()) return NULL;
+ SdrObjGroup* pGroup=new SdrObjGroup();
+ SdrOutliner& rOutl=ImpGetDrawOutliner();
+ rOutl.SetUpdateMode(TRUE);
+ ImpTextPortionHandler aConverter(rOutl,*this);
+
+ aConverter.ConvertToPathObj(*pGroup,bToPoly);
+
+ // Nachsehen, ob ueberhaupt was drin ist:
+ SdrObjList* pOL=pGroup->GetSubList();
+
+ if (pOL->GetObjCount()==0) {
+ delete pGroup;
+ return NULL;
+ }
+ // Ein einzelnes Objekt muss nicht gruppiert werden:
+ if (pOL->GetObjCount()==1) {
+ SdrObject* pObj=pOL->RemoveObject(0);
+ delete pGroup;
+ return pObj;
+ }
+ // Ansonsten die Gruppe zurueckgeben
+ return pGroup;
+}
+
+SdrObject* SdrTextObj::DoConvertToPolyObj(BOOL bBezier) const
+{
+ return ImpConvertObj(!bBezier);
+}
+
+void SdrTextObj::ImpConvertSetAttrAndLayer(SdrObject* pObj, FASTBOOL bNoSetAttr) const
+{
+ if (pObj!=NULL) {
+ pObj->ImpSetAnchorPos(aAnchor);
+ pObj->NbcSetLayer(SdrLayerID(nLayerId));
+ if (pModel!=NULL) {
+ pObj->SetModel(pModel);
+ if (!bNoSetAttr) {
+ SfxItemSet aItemSet((SfxItemPool&)(*GetItemPool()));
+ TakeAttributes(aItemSet,FALSE,TRUE);
+ pObj->SetAttributes(aItemSet,TRUE);
+ pObj->NbcSetStyleSheet(pStyleSheet,TRUE);
+ }
+ }
+ }
+}
+
+SdrObject* SdrTextObj::ImpConvertMakeObj(const XPolyPolygon& rXPP, FASTBOOL bClosed, FASTBOOL bBezier, FASTBOOL bNoSetAttr) const
+{
+ SdrObjKind ePathKind=bClosed?OBJ_PATHFILL:OBJ_PATHLINE;
+ XPolyPolygon aXPP(rXPP);
+ if (bClosed) {
+ // Alle XPolygone des XPolyPolygons schliessen, sonst kommt das PathObj durcheinander!
+ for (USHORT i=0; i<aXPP.Count(); i++) {
+ const XPolygon& rXP=aXPP[i];
+ USHORT nAnz=rXP.GetPointCount();
+ if (nAnz>0) {
+ USHORT nMax=USHORT(nAnz-1);
+ Point aPnt(rXP[0]);
+ if (aPnt!=rXP[nMax]) {
+ aXPP[i].SetPointCount(nAnz+1);
+ aXPP[i][nAnz]=aPnt;
+ }
+ }
+ }
+ }
+ if (!bBezier && pModel!=NULL) {
+ // Polygon aus Bezierkurve interpolieren
+ VirtualDevice aVDev;
+ XPolyPolygon aXPolyPoly;
+
+ MapMode aMap = aVDev.GetMapMode();
+ aMap.SetMapUnit(pModel->GetScaleUnit());
+ aMap.SetScaleX(pModel->GetScaleFraction());
+ aMap.SetScaleY(pModel->GetScaleFraction());
+ aVDev.SetMapMode(aMap);
+
+ for (USHORT i=0; i<aXPP.Count(); i++)
+ aXPolyPoly.Insert(XOutCreatePolygon(aXPP[i],&aVDev));
+ aXPP=aXPolyPoly;
+ ePathKind=bClosed?OBJ_POLY:OBJ_PLIN;
+ }
+ SdrPathObj* pPathObj=new SdrPathObj(ePathKind,aXPP);
+ if (bBezier) {
+ pPathObj->ConvertAllSegments(SDRPATH_CURVE);
+ }
+ ImpConvertSetAttrAndLayer(pPathObj,bNoSetAttr);
+ return pPathObj;
+}
+
+SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) const
+{
+ if (!ImpCanConvTextToCurve()) return pObj;
+ SdrObject* pText=ImpConvertObj(!bBezier);
+ if (pText==NULL) return pObj;
+ if (pObj==NULL) return pText;
+ if (pText->IsGroupObject()) {
+ SdrObjList* pOL=pText->GetSubList();
+ pOL->InsertObject(pObj,0);
+ return pText;
+ } else {
+ SdrObjGroup* pGrp=new SdrObjGroup;
+ SdrObjList* pOL=pGrp->GetSubList();
+ pOL->InsertObject(pObj);
+ pOL->InsertObject(pText);
+ return pGrp;
+ }
+}
+
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
new file mode 100644
index 0000000000..ffdde1d27f
--- /dev/null
+++ b/svx/source/svdraw/svdouno.cxx
@@ -0,0 +1,775 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdouno.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _COM_SUN_STAR_CONTAINER_XCHILD_HPP_
+#include <com/sun/star/container/XChild.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_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
+#include <com/sun/star/io/XPersistObject.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XOUTPUTSTREAM_HPP_
+#include <com/sun/star/io/XOutputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
+#include <com/sun/star/io/XInputStream.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_XOBJECTOUTPUTSTREAM_HPP_
+#include <com/sun/star/io/XObjectOutputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
+#include <com/sun/star/io/XObjectInputStream.hpp>
+#endif
+
+#include <unotools/processfactory.hxx>
+
+#include "svdouno.hxx"
+#include "svdxout.hxx"
+#include "svdpagv.hxx"
+#include "svdmodel.hxx"
+#include "svdio.hxx"
+#include "svdglob.hxx" // Stringcache
+#include "svdstr.hrc" // Objektname
+#include "svdetc.hxx"
+#include "svdview.hxx"
+#include "svdorect.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//************************************************************
+// Defines
+//************************************************************
+
+//************************************************************
+// Hilfsklasse SdrControlEventListenerImpl
+//************************************************************
+
+#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_
+#include <com/sun/star/lang/XEventListener.hpp>
+#endif
+
+#include <cppuhelper/implbase1.hxx>
+
+class SdrControlEventListenerImpl : public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener >
+{
+protected:
+ SdrUnoObj* pObj;
+
+public:
+ SdrControlEventListenerImpl(SdrUnoObj* _pObj)
+ : pObj(_pObj)
+ {}
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ void StopListening(const uno::Reference< lang::XComponent >& xComp);
+ void StartListening(const uno::Reference< lang::XComponent >& xComp);
+};
+
+// XEventListener
+void SAL_CALL SdrControlEventListenerImpl::disposing( const ::com::sun::star::lang::EventObject& Source )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ if (pObj)
+ {
+ pObj->xUnoControlModel = NULL;
+ }
+}
+
+void SdrControlEventListenerImpl::StopListening(const uno::Reference< lang::XComponent >& xComp)
+{
+ if (xComp.is())
+ xComp->removeEventListener(this);
+}
+
+void SdrControlEventListenerImpl::StartListening(const uno::Reference< lang::XComponent >& xComp)
+{
+ if (xComp.is())
+ xComp->addEventListener(this);
+}
+
+//************************************************************
+// SdrUnoObj
+//************************************************************
+
+TYPEINIT1(SdrUnoObj, SdrRectObj);
+
+SdrUnoObj::SdrUnoObj(const String& rModelName, BOOL _bOwnUnoControlModel)
+: bOwnUnoControlModel(_bOwnUnoControlModel)
+{
+ bIsUnoObj = TRUE;
+
+ pEventListener = new SdrControlEventListenerImpl(this);
+ pEventListener->acquire();
+
+ // nur ein owner darf eigenstaendig erzeugen
+ if (rModelName.Len())
+ CreateUnoControlModel(rModelName);
+}
+
+SdrUnoObj::~SdrUnoObj()
+{
+ uno::Reference< lang::XComponent > xComp(xUnoControlModel, uno::UNO_QUERY);
+ if (xComp.is())
+ {
+ // gehoert das Control seiner Umgebung?
+ uno::Reference< container::XChild > xContent(xUnoControlModel, uno::UNO_QUERY);
+ if (xContent.is() && !xContent->getParent().is())
+ xComp->dispose();
+ else
+ pEventListener->StopListening(xComp);
+ }
+ pEventListener->release();
+}
+
+void SdrUnoObj::SetModel(SdrModel* pNewModel)
+{
+ SdrRectObj::SetModel(pNewModel);
+}
+
+void SdrUnoObj::SetPage(SdrPage* pNewPage)
+{
+ SdrRectObj::SetPage(pNewPage);
+}
+
+void SdrUnoObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ rInfo.bRotateFreeAllowed = FALSE;
+ rInfo.bRotate90Allowed = FALSE;
+ rInfo.bMirrorFreeAllowed = FALSE;
+ rInfo.bMirror45Allowed = FALSE;
+ rInfo.bMirror90Allowed = FALSE;
+ rInfo.bTransparenceAllowed = FALSE;
+ rInfo.bGradientAllowed = FALSE;
+ rInfo.bShearAllowed = FALSE;
+ rInfo.bNoOrthoDesired = FALSE;
+ rInfo.bCanConvToPath = FALSE;
+ rInfo.bCanConvToPoly = FALSE;
+ rInfo.bCanConvToPathLineToArea = FALSE;
+ rInfo.bCanConvToPolyLineToArea = FALSE;
+ rInfo.bCanConvToContour = FALSE;
+}
+
+UINT16 SdrUnoObj::GetObjIdentifier() const
+{
+ return UINT16(OBJ_UNO);
+}
+
+FASTBOOL SdrUnoObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ const SdrPageView* pPV = rInfoRec.pPV;
+ OutputDevice* pOut = rXOut.GetOutDev();
+ OutDevType eOutDevType = pOut->GetOutDevType();
+ const SdrUnoControlRec* pControlRec = NULL;
+
+ if (pPV && xUnoControlModel.is())
+ {
+ const SdrPageViewWinList& rWL = pPV->GetWinList();
+ USHORT nWinNum = rWL.Find(pOut);
+
+ if (nWinNum == SDRPAGEVIEWWIN_NOTFOUND && eOutDevType == OUTDEV_VIRDEV)
+ {
+ // Controls koennen sich z.Z. noch nicht ins VDev zeichnen,
+ // daher wird das korrespondierende, im ersten Window liegende
+ // Control invalidiert (s.u.)
+ if (rWL.GetCount() > 0)
+ {
+ // Liste enhaelt Windows, daher nehmen wir das erste
+ nWinNum = 0;
+ }
+ }
+
+ if (nWinNum != SDRPAGEVIEWWIN_NOTFOUND)
+ {
+ const SdrPageViewWinRec& rWR = rWL[nWinNum];
+ const SdrUnoControlList& rControlList = rWR.GetControlList();
+ USHORT nCtrlNum = rControlList.Find(xUnoControlModel);
+
+ if (nCtrlNum != SDRUNOCONTROL_NOTFOUND)
+ {
+ pControlRec = &rControlList[nCtrlNum];
+ }
+ }
+ }
+
+ if (pControlRec && pControlRec->GetControl().is())
+ {
+ uno::Reference< awt::XControl > xUnoControl = pControlRec->GetControl();
+
+ uno::Reference< awt::XView > xView(xUnoControl, uno::UNO_QUERY);
+ if (xView.is())
+ {
+ OutputDevice* pOut = rXOut.GetOutDev();
+ const MapMode& rMap = pOut->GetMapMode();
+ xView->setZoom((float) double(rMap.GetScaleX()),
+ (float) double(rMap.GetScaleY()));
+
+ BOOL bDesignMode = pPV->GetView().IsDesignMode();
+
+ if (eOutDevType != OUTDEV_VIRDEV)
+ {
+ uno::Reference< awt::XWindow > xWindow(xUnoControl, uno::UNO_QUERY);
+ if (xWindow.is() && eOutDevType != OUTDEV_VIRDEV)
+ {
+ Point aPixPos(pOut->LogicToPixel(aRect.TopLeft()));
+ Size aPixSize(pOut->LogicToPixel(aRect.GetSize()));
+ xWindow->setPosSize(aPixPos.X(), aPixPos.Y(),
+ aPixSize.Width(), aPixSize.Height(),
+ awt::PosSize::POSSIZE);
+ }
+ }
+
+ BOOL bInvalidatePeer = FALSE;
+ if (eOutDevType == OUTDEV_WINDOW)
+ {
+ // Nicht wenn an der Stelle ein 'lebendes' Control liegt
+ // das sich selber zeichnet.
+ if (bDesignMode || pPV->GetView().IsPrintPreview())
+ {
+ if (pPV->GetView().IsPrintPreview())
+ {
+ uno::Reference< awt::XGraphics > x( pOut->CreateUnoGraphics()); // UNO3
+ xView->setGraphics( x );
+ }
+
+ // don't draw if we're in print preview and the control isn't printable
+ // FS - 10/06/99
+ BOOL bDrawIt = TRUE;
+ if (pPV->GetView().IsPrintPreview())
+ {
+ uno::Reference< beans::XPropertySet > xP(xUnoControl->getModel(), uno::UNO_QUERY);
+ if (xP.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropInfo = xP->getPropertySetInfo();
+ if( xPropInfo.is() && xPropInfo->hasPropertyByName( rtl::OUString::createFromAscii("Printable")) )
+ {
+ uno::Any aVal( xP->getPropertyValue( rtl::OUString::createFromAscii("Printable")) );
+ if( aVal.hasValue() && aVal.getValueType() == ::getCppuBooleanType() )
+ bDrawIt = *(sal_Bool*)aVal.getValue();
+ }
+ else
+ bDrawIt = FALSE;
+ }
+ else
+ bDrawIt = FALSE;
+ }
+
+ if (bDrawIt)
+ {
+ if( pPV->GetView().IsFillDraft() )
+ {
+ rXOut.SetIgnoreFillAttr( TRUE );
+
+ if ( pPV->GetView().IsLineDraft() )
+ rXOut.SetIgnoreLineAttr( TRUE );
+
+ if ( pLineAttr )
+ rXOut.SetLineAttr( *pLineAttr );
+ if ( pFillAttr )
+ rXOut.SetFillAttr( *pFillAttr );
+
+ rXOut.DrawRect( aRect );
+ }
+ else
+ {
+ Point aP = pOut->LogicToPixel(aRect.TopLeft());
+ xView->draw(aP.X(), aP.Y());
+ }
+ }
+ }
+ else if ( xUnoControl->isTransparent() )
+ {
+ bInvalidatePeer = TRUE;
+ }
+ }
+ else if (eOutDevType == OUTDEV_PRINTER)
+ {
+ uno::Reference< beans::XPropertySet > xP(xUnoControl->getModel(), uno::UNO_QUERY);
+ if (xP.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropInfo = xP->getPropertySetInfo();
+ if( xPropInfo.is() && xPropInfo->hasPropertyByName( rtl::OUString::createFromAscii("Printable")) )
+ {
+ uno::Any aVal( xP->getPropertyValue( rtl::OUString::createFromAscii("Printable")) );
+ if( aVal.hasValue() && aVal.getValueType() == ::getCppuBooleanType() && *(sal_Bool*)aVal.getValue() )
+ {
+ uno::Reference< awt::XGraphics > x = pOut->CreateUnoGraphics(); // UNO3
+ xView->setGraphics( x );
+ Point aP = pOut->LogicToPixel(aRect.TopLeft());
+ xView->draw(aP.X(), aP.Y());
+ }
+ }
+ }
+ }
+ else if (!bDesignMode)
+ {
+ bInvalidatePeer = TRUE;
+ }
+
+ if ( bInvalidatePeer )
+ {
+ uno::Reference< awt::XWindowPeer > xPeer(xUnoControl->getPeer());
+ if (xPeer.is())
+ {
+ xPeer->invalidate(INVALIDATE_NOTRANSPARENT |
+ INVALIDATE_CHILDREN);
+ }
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+SdrObject* SdrUnoObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ return ImpCheckHit(rPnt, nTol, pVisiLayer, TRUE, TRUE);
+}
+
+void SdrUnoObj::TakeObjNameSingul(XubString& rName) const
+{
+ rName = ImpGetResStr(STR_ObjNameSingulUno);
+}
+
+void SdrUnoObj::TakeObjNamePlural(XubString& rName) const
+{
+ rName = ImpGetResStr(STR_ObjNamePluralUno);
+}
+
+void SdrUnoObj::operator = (const SdrObject& rObj)
+{
+ SdrRectObj::operator = (rObj);
+
+ // Freigeben des bisherigen Models
+ SetUnoControlModel(uno::Reference< awt::XControlModel >());
+
+ aUnoControlModelTypeName = ((SdrUnoObj&) rObj).aUnoControlModelTypeName;
+ aUnoControlTypeName = ((SdrUnoObj&) rObj).aUnoControlTypeName;
+
+ // Kopieren des UnoModels
+ uno::Reference< io::XPersistObject > xObj(((SdrUnoObj&) rObj).GetUnoControlModel(), uno::UNO_QUERY );
+
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::utl::getProcessServiceFactory() );
+ if (xObj.is() && xFactory.is() )
+ {
+ // copy it by streaming
+ // creating a pipe
+ uno::Reference< io::XOutputStream > xOutPipe(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.Pipe")), uno::UNO_QUERY);
+ uno::Reference< io::XInputStream > xInPipe(xOutPipe, uno::UNO_QUERY);
+
+ // creating the mark streams
+ uno::Reference< io::XInputStream > xMarkIn(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.MarkableInputStream")), uno::UNO_QUERY);
+ uno::Reference< io::XActiveDataSink > xMarkSink(xMarkIn, uno::UNO_QUERY);
+
+ uno::Reference< io::XOutputStream > xMarkOut(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.MarkableOutputStream")), uno::UNO_QUERY);
+ uno::Reference< io::XActiveDataSource > xMarkSource(xMarkOut, uno::UNO_QUERY);
+
+ // connect mark and sink
+ uno::Reference< io::XActiveDataSink > xSink(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.ObjectInputStream")), uno::UNO_QUERY);
+
+ // connect mark and source
+ uno::Reference< io::XActiveDataSource > xSource(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.ObjectOutputStream")), uno::UNO_QUERY);
+
+ uno::Reference< io::XObjectOutputStream > xOutStrm(xSource, uno::UNO_QUERY);
+ uno::Reference< io::XObjectInputStream > xInStrm(xSink, uno::UNO_QUERY);
+
+ if (xMarkSink.is() && xMarkSource.is() && xSink.is() && xSource.is())
+ {
+ xMarkSink->setInputStream(xInPipe);
+ xMarkSource->setOutputStream(xOutPipe);
+ xSink->setInputStream(xMarkIn);
+ xSource->setOutputStream(xMarkOut);
+
+ // write the object to source
+ xOutStrm->writeObject(xObj);
+ xOutStrm->closeOutput();
+ // read the object
+ uno::Reference< awt::XControlModel > xModel(xInStrm->readObject(), uno::UNO_QUERY);
+ xInStrm->closeInput();
+
+ DBG_ASSERT(xModel.is(), "SdrUnoObj::operator =, keine Model erzeugt");
+
+ xUnoControlModel = xModel;
+
+ // control model muss servicename des controls enthalten
+ uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ uno::Any aValue( xSet->getPropertyValue( rtl::OUString::createFromAscii("DefaultControl")) );
+ OUString aStr;
+
+ if( aValue >>= aStr )
+ aUnoControlTypeName = String(aStr);
+ }
+
+ uno::Reference< lang::XComponent > xComp(xUnoControlModel, uno::UNO_QUERY);
+ if (xComp.is())
+ pEventListener->StartListening(xComp);
+ }
+ }
+}
+
+FASTBOOL SdrUnoObj::HasSpecialDrag() const
+{
+ return FALSE;
+}
+
+void SdrUnoObj::VisAreaChanged(const OutputDevice* pOut)
+{
+ if (!xUnoControlModel.is())
+ return;
+
+ if (pOut)
+ {
+ // Nur dieses eine OutDev beruecksichtigen
+ uno::Reference< awt::XWindow > xWindow(GetUnoControl(pOut), uno::UNO_QUERY);
+ if (xWindow.is())
+ {
+ Rectangle aPixRect(pOut->LogicToPixel(aRect));
+ xWindow->setPosSize(aPixRect.Left(), aPixRect.Top(),
+ aPixRect.GetWidth(), aPixRect.GetHeight(), awt::PosSize::POSSIZE);
+ }
+ }
+ else if (pModel)
+ {
+ // Controls aller PageViews beruecksichtigen
+ USHORT nLstPos = pModel->GetListenerCount();
+ uno::Reference< awt::XWindow > xWindow;
+ Point aPixPos;
+ Size aPixSize;
+ SfxListener* pListener;
+ SdrPageView* pPV;
+ const SdrUnoControlRec* pControlRec = NULL;
+
+ for (; nLstPos ;)
+ {
+ pListener = pModel->GetListener(--nLstPos);
+
+ if (pListener && pListener->ISA(SdrPageView))
+ {
+ pPV = (SdrPageView*) pListener;
+ const SdrPageViewWinList& rWL = pPV->GetWinList();
+ USHORT nPos = rWL.GetCount();
+
+ for (; nPos ; )
+ {
+ // Controls aller OutDevs beruecksichtigen
+ const SdrPageViewWinRec& rWR = rWL[--nPos];
+ const SdrUnoControlList& rControlList = rWR.GetControlList();
+ USHORT nCtrlNum = rControlList.Find(xUnoControlModel);
+ pControlRec = (nCtrlNum != SDRUNOCONTROL_NOTFOUND) ? &rControlList[nCtrlNum] : NULL;
+ if (pControlRec)
+ {
+ xWindow = uno::Reference< awt::XWindow >(pControlRec->GetControl(), uno::UNO_QUERY);
+ if (xWindow.is())
+ {
+ // #62560 Pixelverschiebung weil mit einem Rechteck
+ // und nicht mit Point, Size gearbeitet wurde
+ aPixPos = rWR.GetOutputDevice()->LogicToPixel(aRect.TopLeft());
+ aPixSize = rWR.GetOutputDevice()->LogicToPixel(aRect.GetSize());
+ xWindow->setPosSize(aPixPos.X(), aPixPos.Y(),
+ aPixSize.Width(), aPixSize.Height(),
+ awt::PosSize::POSSIZE);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void SdrUnoObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ SdrRectObj::NbcResize(rRef,xFact,yFact);
+
+ if (aGeo.nShearWink!=0 || aGeo.nDrehWink!=0)
+ {
+ // kleine Korrekturen
+ if (aGeo.nDrehWink>=9000 && aGeo.nDrehWink<27000)
+ {
+ aRect.Move(aRect.Left()-aRect.Right(),aRect.Top()-aRect.Bottom());
+ }
+
+ aGeo.nDrehWink = 0;
+ aGeo.nShearWink = 0;
+ aGeo.nSin = 0.0;
+ aGeo.nCos = 1.0;
+ aGeo.nTan = 0.0;
+ SetRectsDirty();
+ }
+
+ VisAreaChanged();
+}
+
+void SdrUnoObj::NbcMove(const Size& rSize)
+{
+ SdrRectObj::NbcMove(rSize);
+ VisAreaChanged();
+}
+
+void SdrUnoObj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ SdrRectObj::NbcSetSnapRect(rRect);
+ VisAreaChanged();
+}
+
+void SdrUnoObj::NbcSetLogicRect(const Rectangle& rRect)
+{
+ SdrRectObj::NbcSetLogicRect(rRect);
+ VisAreaChanged();
+}
+
+void SdrUnoObj::CreateUnoControlModel(const String& rModelName)
+{
+ DBG_ASSERT(!xUnoControlModel.is(), "model already exists");
+
+ aUnoControlModelTypeName = rModelName;
+
+ uno::Reference< awt::XControlModel > xModel;
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::utl::getProcessServiceFactory() );
+ if (aUnoControlModelTypeName.Len() && xFactory.is() )
+ {
+ xModel = uno::Reference< awt::XControlModel >(xFactory->createInstance(
+ aUnoControlModelTypeName), uno::UNO_QUERY);
+
+ if (xModel.is())
+ SetChanged();
+ }
+
+ SetUnoControlModel(xModel);
+}
+
+void SdrUnoObj::WriteData(SvStream& rOut) const
+{
+ SdrRectObj::WriteData(rOut);
+ SdrDownCompat aCompat(rOut, STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrUnoObj");
+#endif
+
+ if (bOwnUnoControlModel) // nur als besitzt des Models dieses auch schreiben
+ {
+ // UNICODE: rOut << aUnoControlModelTypeName;
+ rOut.WriteByteString(aUnoControlModelTypeName);
+ }
+}
+
+void SdrUnoObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError() != 0)
+ return;
+
+ SdrRectObj::ReadData(rHead,rIn);
+
+ SdrDownCompat aCompat(rIn, STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrUnoObj");
+#endif
+
+ if (bOwnUnoControlModel) // nur als besitzt des Models dieses auch lesen
+ {
+ // UNICODE: rIn >> aUnoControlModelTypeName;
+ rIn.ReadByteString(aUnoControlModelTypeName);
+
+ CreateUnoControlModel(aUnoControlModelTypeName);
+ }
+}
+
+void SdrUnoObj::SetUnoControlModel( uno::Reference< awt::XControlModel > xModel)
+{
+ if (xUnoControlModel.is())
+ {
+ uno::Reference< lang::XComponent > xComp(xUnoControlModel, uno::UNO_QUERY);
+ if (xComp.is())
+ pEventListener->StopListening(xComp);
+
+ if (pModel)
+ {
+ SdrHint aHint(*this);
+ aHint.SetKind(HINT_CONTROLREMOVED);
+ pModel->Broadcast(aHint);
+ }
+ }
+
+ xUnoControlModel = xModel;
+
+ // control model muss servicename des controls enthalten
+ if (xUnoControlModel.is())
+ {
+ uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ uno::Any aValue( xSet->getPropertyValue(String("DefaultControl", gsl_getSystemTextEncoding())) );
+ OUString aStr;
+ if( aValue >>= aStr )
+ aUnoControlTypeName = String(aStr);
+ }
+
+ uno::Reference< lang::XComponent > xComp(xUnoControlModel, uno::UNO_QUERY);
+ if (xComp.is())
+ pEventListener->StartListening(xComp);
+
+ if (pModel)
+ {
+ SdrHint aHint(*this);
+ aHint.SetKind(HINT_CONTROLINSERTED);
+ pModel->Broadcast(aHint);
+ }
+ }
+}
+
+uno::Reference< awt::XControl > SdrUnoObj::GetUnoControl(const OutputDevice* pOut) const
+{
+ uno::Reference< awt::XControl > xUnoControl;
+
+ if (pModel && xUnoControlModel.is())
+ {
+ USHORT nLstCnt = pModel->GetListenerCount();
+
+ for (USHORT nLst = 0; nLst < nLstCnt && !xUnoControl.is(); nLst++ )
+ {
+ // Unter allen Listenern die PageViews suchen
+ SfxListener* pListener = pModel->GetListener(nLst);
+
+ if (pListener && pListener->ISA(SdrPageView))
+ {
+ // PageView gefunden
+ SdrPageView* pPV = (SdrPageView*) pListener;
+ const SdrPageViewWinList& rWL = pPV->GetWinList();
+ USHORT nWRCnt = rWL.GetCount();
+ for (USHORT nWR = 0; nWR < nWRCnt && !xUnoControl.is(); nWR++)
+ {
+ // Alle WinRecords der PageView untersuchen
+ const SdrPageViewWinRec& rWR = rWL[nWR];
+ if (pOut == rWR.GetOutputDevice())
+ {
+ // Richtiges OutputDevice gefunden
+ // Darin nun das Control suchen
+ const SdrUnoControlList& rControlList = rWR.GetControlList();
+ USHORT nCtrlNum = rControlList.Find(xUnoControlModel);
+ if (nCtrlNum != SDRUNOCONTROL_NOTFOUND)
+ {
+ const SdrUnoControlRec* pControlRec = &rControlList[nCtrlNum];
+ if (pControlRec && pControlRec->GetControl().is())
+ {
+ xUnoControl = pControlRec->GetControl();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return xUnoControl;
+}
+
+OutputDevice* SdrUnoObj::GetOutputDevice(uno::Reference< awt::XControl > _xControl) const
+{
+ OutputDevice* pOut = NULL;
+ if (pModel && xUnoControlModel.is() && _xControl.is() && _xControl->getModel() == xUnoControlModel)
+ {
+ USHORT nLstCnt = pModel->GetListenerCount();
+ for (USHORT nLst = 0; nLst < nLstCnt && !pOut; nLst++ )
+ {
+ // Unter allen Listenern die PageViews suchen
+ SfxListener* pListener = pModel->GetListener(nLst);
+ if (pListener && pListener->ISA(SdrPageView))
+ {
+ // PageView gefunden
+ SdrPageView* pPV = (SdrPageView*) pListener;
+ if (pPV)
+ {
+ const SdrPageViewWinList& rWL = pPV->GetWinList();
+ USHORT nWRCnt = rWL.GetCount();
+ for (USHORT nWR = 0; nWR < nWRCnt && !pOut; nWR++)
+ {
+ // Alle WinRecords der PageView untersuchen
+ const SdrPageViewWinRec& rWR = rWL[nWR];
+ const SdrUnoControlList& rControlList = rWR.GetControlList();
+ if (SDRUNOCONTROL_NOTFOUND != rWR.GetControlList().Find(_xControl))
+ pOut = rWR.GetOutputDevice();
+ }
+ }
+ }
+ }
+ }
+ return pOut;
+}
+
+
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
new file mode 100644
index 0000000000..11ae07a42e
--- /dev/null
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdoutl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVDOUTL_HXX //autogen
+#include "svdoutl.hxx"
+#endif
+#ifndef _OUTLINER_HXX //autogen
+#include "outliner.hxx"
+#endif
+#ifndef _SVDOTEXT_HXX //autogen
+#include "svdotext.hxx"
+#endif
+#ifndef _EDITSTAT_HXX //autogen wg. EE_CNTRL_STRETCHING
+#include <editstat.hxx>
+#endif
+#ifndef _SVDMODEL_HXX //autogen wg. SdrModel
+#include <svdmodel.hxx>
+#endif
+#ifndef _EEITEM_HXX //autogen wg. EE_ITEMS_START
+#include <eeitem.hxx>
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen wg. SfxItemPool
+#include <svtools/itempool.hxx>
+#endif
+
+
+//TYPEINIT1( SdrOutliner, Outliner );
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+\************************************************************************/
+SdrOutliner::SdrOutliner( SfxItemPool* pItemPool, USHORT nMode ):
+Outliner( pItemPool, nMode ),
+pTextObj( NULL )
+{
+}
+
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+SdrOutliner::~SdrOutliner()
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+void SdrOutliner::SetTextObj( const SdrTextObj* pObj )
+{
+ if( pObj && pObj != pTextObj )
+ {
+ SetUpdateMode(FALSE);
+ USHORT nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+ if ( !pObj->IsOutlText() )
+ nOutlinerMode = OUTLINERMODE_TEXTOBJECT;
+ Init( nOutlinerMode );
+
+ SetGlobalCharStretching(100,100);
+
+ ULONG nStat = GetControlWord();
+ nStat &= ~( EE_CNTRL_STRETCHING | EE_CNTRL_AUTOPAGESIZE );
+ SetControlWord(nStat);
+
+ Size aNullSize;
+ Size aMaxSize( 100000,100000 );
+ SetMinAutoPaperSize( aNullSize );
+ SetMaxAutoPaperSize( aMaxSize );
+ SetPaperSize( aMaxSize );
+ ClearPolygon();
+ }
+
+ pTextObj = pObj;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+XubString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos,
+ Color*& rpTxtColor, Color*& rpFldColor)
+{
+ FASTBOOL bOk = FALSE;
+ XubString aRet;
+
+ if (pTextObj)
+ bOk = pTextObj->CalcFieldValue(rField, nPara, nPos, FALSE, rpTxtColor, rpFldColor, aRet);
+
+ if (!bOk)
+ aRet = Outliner::CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor);
+
+ return aRet;
+}
+
+
+
+
+
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
new file mode 100644
index 0000000000..85da05c539
--- /dev/null
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -0,0 +1,675 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdovirt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdovirt.hxx"
+#include "xpool.hxx"
+#include "svdxout.hxx"
+#include "svdtrans.hxx"
+#include "svdio.hxx"
+#include "svdetc.hxx"
+#include "svdhdl.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrVirtObj,SdrObject);
+
+SdrVirtObj::SdrVirtObj(SdrObject& rNewObj):
+ rRefObj(rNewObj)
+{
+ bVirtObj=TRUE; // Ja, ich bin ein virtuelles Objekt
+ rRefObj.AddReference(*this);
+ bClosedObj=rRefObj.IsClosedObj();
+}
+
+SdrVirtObj::SdrVirtObj(SdrObject& rNewObj, const Point& rAnchorPos):
+ rRefObj(rNewObj)
+{
+ aAnchor=rAnchorPos;
+ bVirtObj=TRUE; // Ja, ich bin ein virtuelles Objekt
+ rRefObj.AddReference(*this);
+ bClosedObj=rRefObj.IsClosedObj();
+}
+
+SdrVirtObj::~SdrVirtObj()
+{
+ rRefObj.DelReference(*this);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+const SdrObject& SdrVirtObj::GetReferencedObj() const
+{
+ return rRefObj;
+}
+
+SdrObject& SdrVirtObj::ReferencedObj()
+{
+ return rRefObj;
+}
+
+void __EXPORT SdrVirtObj::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ bClosedObj=rRefObj.IsClosedObj();
+ SetRectsDirty(); // hier noch Optimieren.
+ SendRepaintBroadcast();
+}
+
+void SdrVirtObj::NbcSetAnchorPos(const Point& rAnchorPos)
+{
+ aAnchor=rAnchorPos;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrVirtObj::SetModel(SdrModel* pNewModel)
+{
+ SdrObject::SetModel(pNewModel);
+ rRefObj.SetModel(pNewModel);
+}
+
+void SdrVirtObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
+{
+ rRefObj.TakeObjInfo(rInfo);
+}
+
+UINT32 SdrVirtObj::GetObjInventor() const
+{
+ return rRefObj.GetObjInventor();
+}
+
+UINT16 SdrVirtObj::GetObjIdentifier() const
+{
+ return rRefObj.GetObjIdentifier();
+}
+
+SdrObjList* SdrVirtObj::GetSubList() const
+{
+ return rRefObj.GetSubList();
+}
+
+const Rectangle& SdrVirtObj::GetBoundRect() const
+{
+ ((SdrVirtObj*)this)->aOutRect=rRefObj.GetBoundRect(); // Hier noch optimieren
+ ((SdrVirtObj*)this)->aOutRect+=aAnchor;
+ return aOutRect;
+}
+
+void SdrVirtObj::RecalcBoundRect()
+{
+ aOutRect=rRefObj.GetBoundRect();
+ aOutRect+=aAnchor;
+}
+
+void SdrVirtObj::SendRepaintBroadcast(FASTBOOL bNoPaintNeeded) const
+{
+ SdrObject::SendRepaintBroadcast(bNoPaintNeeded);
+}
+
+void SdrVirtObj::SetChanged()
+{
+ SdrObject::SetChanged();
+}
+
+FASTBOOL SdrVirtObj::Paint(ExtOutputDevice& rOut, const SdrPaintInfoRec& rInfoRec) const
+{
+ Point aOfs(rOut.GetOffset());
+ rOut.SetOffset(aOfs+aAnchor);
+ FASTBOOL bRet=rRefObj.Paint(rOut,rInfoRec);
+ rOut.SetOffset(aOfs);
+ return bRet;
+}
+
+SdrObject* SdrVirtObj::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const
+{
+ Point aPnt(rPnt-aAnchor);
+ FASTBOOL bRet=rRefObj.CheckHit(aPnt,nTol,pVisiLayer)!=NULL;
+ return bRet ? (SdrObject*)this : NULL;
+}
+
+SdrObject* SdrVirtObj::Clone() const
+{
+ SdrObject* pObj=new SdrVirtObj(((SdrVirtObj*)this)->rRefObj); // Nur eine weitere Referenz
+ return pObj;
+}
+
+void SdrVirtObj::operator=(const SdrObject& rObj)
+{ // ???anderes Objekt referenzieren???
+ SdrObject::operator=(rObj);
+ aAnchor=((SdrVirtObj&)rObj).aAnchor;
+}
+
+void SdrVirtObj::TakeObjNameSingul(XubString& rName) const
+{
+ rRefObj.TakeObjNameSingul(rName);
+ rName.Insert(sal_Unicode('['), 0);
+ rName += sal_Unicode(']');
+}
+
+void SdrVirtObj::TakeObjNamePlural(XubString& rName) const
+{
+ rRefObj.TakeObjNamePlural(rName);
+ rName.Insert(sal_Unicode('['), 0);
+ rName += sal_Unicode(']');
+}
+
+void operator +=(PolyPolygon& rPoly, const Point& rOfs)
+{
+ if (rOfs.X()!=0 || rOfs.Y()!=0) {
+ USHORT i,j;
+ for (j=0; j<rPoly.Count(); j++) {
+ Polygon aP1(rPoly.GetObject(j));
+ for (i=0; i<aP1.GetSize(); i++) {
+ aP1[i]+=rOfs;
+ }
+ rPoly.Replace(aP1,j);
+ }
+ }
+}
+
+void SdrVirtObj::TakeXorPoly(XPolyPolygon& rPoly, FASTBOOL bDetail) const
+{
+ rRefObj.TakeXorPoly(rPoly,bDetail);
+ rPoly.Move(aAnchor.X(),aAnchor.Y());
+}
+
+void SdrVirtObj::TakeContour(XPolyPolygon& rXPoly, SdrContourType eType) const
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+USHORT SdrVirtObj::GetHdlCount() const
+{
+ return rRefObj.GetHdlCount();
+}
+
+SdrHdl* SdrVirtObj::GetHdl(USHORT nHdlNum) const
+{
+ SdrHdl* pHdl=rRefObj.GetHdl(nHdlNum);
+ Point aP(pHdl->GetPos()+aAnchor);
+ pHdl->SetPos(aP);
+ return pHdl;
+}
+
+USHORT SdrVirtObj::GetPlusHdlCount(const SdrHdl& rHdl) const
+{
+ return rRefObj.GetPlusHdlCount(rHdl);
+}
+
+SdrHdl* SdrVirtObj::GetPlusHdl(const SdrHdl& rHdl, USHORT nPlNum) const
+{
+ SdrHdl* pHdl=rRefObj.GetPlusHdl(rHdl,nPlNum);
+ pHdl->SetPos(pHdl->GetPos()+aAnchor);
+ return pHdl;
+}
+
+void SdrVirtObj::AddToHdlList(SdrHdlList& rHdlList) const
+{
+ SdrObject::AddToHdlList(rHdlList);
+}
+
+FASTBOOL SdrVirtObj::HasSpecialDrag() const
+{
+ return rRefObj.HasSpecialDrag();
+}
+
+FASTBOOL SdrVirtObj::BegDrag(SdrDragStat& rDrag) const
+{
+ return rRefObj.BegDrag(rDrag);
+}
+
+FASTBOOL SdrVirtObj::MovDrag(SdrDragStat& rDrag) const
+{
+ return rRefObj.MovDrag(rDrag);
+}
+
+FASTBOOL SdrVirtObj::EndDrag(SdrDragStat& rDrag)
+{
+ return rRefObj.EndDrag(rDrag);
+}
+
+void SdrVirtObj::BrkDrag(SdrDragStat& rDrag) const
+{
+ rRefObj.BrkDrag(rDrag);
+}
+
+void SdrVirtObj::TakeDragPoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rRefObj.TakeDragPoly(rDrag,rXPP);
+ // Offset handlen !!!!!! fehlt noch !!!!!!!
+}
+
+XubString SdrVirtObj::GetDragComment(const SdrDragStat& rDrag, FASTBOOL bUndoDragComment, FASTBOOL bCreateComment) const
+{
+ return rRefObj.GetDragComment(rDrag,bUndoDragComment,bCreateComment);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrVirtObj::BegCreate(SdrDragStat& rStat)
+{
+ return rRefObj.BegCreate(rStat);
+}
+
+FASTBOOL SdrVirtObj::MovCreate(SdrDragStat& rStat)
+{
+ return rRefObj.MovCreate(rStat);
+}
+
+FASTBOOL SdrVirtObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
+{
+ return rRefObj.EndCreate(rStat,eCmd);
+}
+
+FASTBOOL SdrVirtObj::BckCreate(SdrDragStat& rStat)
+{
+ return rRefObj.BckCreate(rStat);
+}
+
+void SdrVirtObj::BrkCreate(SdrDragStat& rStat)
+{
+ rRefObj.BrkCreate(rStat);
+}
+
+void SdrVirtObj::TakeCreatePoly(const SdrDragStat& rDrag, XPolyPolygon& rXPP) const
+{
+ rRefObj.TakeCreatePoly(rDrag,rXPP);
+ // Offset handlen !!!!!! fehlt noch !!!!!!!
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrVirtObj::NbcMove(const Size& rSiz)
+{
+ MovePoint(aAnchor,rSiz);
+ SetRectsDirty();
+}
+
+void SdrVirtObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ rRefObj.NbcResize(rRef-aAnchor,xFact,yFact);
+ SetRectsDirty();
+}
+
+void SdrVirtObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ rRefObj.NbcRotate(rRef-aAnchor,nWink,sn,cs);
+ SetRectsDirty();
+}
+
+void SdrVirtObj::NbcMirror(const Point& rRef1, const Point& rRef2)
+{
+ rRefObj.NbcMirror(rRef1-aAnchor,rRef2-aAnchor);
+ SetRectsDirty();
+}
+
+void SdrVirtObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ rRefObj.NbcShear(rRef-aAnchor,nWink,tn,bVShear);
+ SetRectsDirty();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrVirtObj::Move(const Size& rSiz)
+{
+ if (rSiz.Width()!=0 || rSiz.Height()!=0) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ SendRepaintBroadcast();
+ NbcMove(rSiz);
+ SetChanged();
+ SendRepaintBroadcast();
+ SendUserCall(SDRUSERCALL_MOVEONLY,aBoundRect0);
+ }
+}
+
+void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ rRefObj.Resize(rRef-aAnchor,xFact,yFact);
+ SetRectsDirty();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrVirtObj::Rotate(const Point& rRef, long nWink, double sn, double cs)
+{
+ if (nWink!=0) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ rRefObj.Rotate(rRef-aAnchor,nWink,sn,cs);
+ SetRectsDirty();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ rRefObj.Mirror(rRef1-aAnchor,rRef2-aAnchor);
+ SetRectsDirty();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+void SdrVirtObj::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear)
+{
+ if (nWink!=0) {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ rRefObj.Shear(rRef-aAnchor,nWink,tn,bVShear);
+ SetRectsDirty();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrVirtObj::RecalcSnapRect()
+{
+ aSnapRect=rRefObj.GetSnapRect();
+ aSnapRect+=aAnchor;
+}
+
+const Rectangle& SdrVirtObj::GetSnapRect() const
+{
+ ((SdrVirtObj*)this)->aSnapRect=rRefObj.GetSnapRect();
+ ((SdrVirtObj*)this)->aSnapRect+=aAnchor;
+ return aSnapRect;
+}
+
+void SdrVirtObj::SetSnapRect(const Rectangle& rRect)
+{
+ {
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ Rectangle aR(rRect);
+ aR-=aAnchor;
+ rRefObj.SetSnapRect(aR);
+ SetRectsDirty();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+}
+
+void SdrVirtObj::NbcSetSnapRect(const Rectangle& rRect)
+{
+ Rectangle aR(rRect);
+ aR-=aAnchor;
+ SetRectsDirty();
+ rRefObj.NbcSetSnapRect(aR);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+const Rectangle& SdrVirtObj::GetLogicRect() const
+{
+ ((SdrVirtObj*)this)->aSnapRect=rRefObj.GetLogicRect(); // !!! Missbrauch von aSnapRect !!!
+ ((SdrVirtObj*)this)->aSnapRect+=aAnchor; // Wenns mal Aerger gibt, muss ein weiteres Rectangle Member her (oder Heap)
+ return aSnapRect;
+}
+
+void SdrVirtObj::SetLogicRect(const Rectangle& rRect)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ Rectangle aR(rRect);
+ aR-=aAnchor;
+ rRefObj.SetLogicRect(aR);
+ SetRectsDirty();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+void SdrVirtObj::NbcSetLogicRect(const Rectangle& rRect)
+{
+ Rectangle aR(rRect);
+ aR-=aAnchor;
+ SetRectsDirty();
+ rRefObj.NbcSetLogicRect(aR);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+long SdrVirtObj::GetRotateAngle() const
+{
+ return rRefObj.GetRotateAngle();
+}
+
+long SdrVirtObj::GetShearAngle(FASTBOOL bVertical) const
+{
+ return rRefObj.GetShearAngle(bVertical);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+USHORT SdrVirtObj::GetSnapPointCount() const
+{
+ return rRefObj.GetSnapPointCount();
+}
+
+Point SdrVirtObj::GetSnapPoint(USHORT i) const
+{
+ Point aP(rRefObj.GetSnapPoint(i));
+ aP+=aAnchor;
+ return aP;
+}
+
+FASTBOOL SdrVirtObj::IsPolyObj() const
+{
+ return rRefObj.IsPolyObj();
+}
+
+USHORT SdrVirtObj::GetPointCount() const
+{
+ return rRefObj.GetPointCount();
+}
+
+const Point& SdrVirtObj::GetPoint(USHORT i) const
+{
+ ((SdrVirtObj*)this)->aHack=rRefObj.GetPoint(i);
+ ((SdrVirtObj*)this)->aHack+=aAnchor;
+ return aHack;
+}
+
+void SdrVirtObj::NbcSetPoint(const Point& rPnt, USHORT i)
+{
+ Point aP(rPnt);
+ aP-=aAnchor;
+ rRefObj.SetPoint(aP,i);
+ SetRectsDirty();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrObjGeoData* SdrVirtObj::NewGeoData() const
+{
+ return rRefObj.NewGeoData();
+}
+
+void SdrVirtObj::SaveGeoData(SdrObjGeoData& rGeo) const
+{
+ rRefObj.SaveGeoData(rGeo);
+}
+
+void SdrVirtObj::RestGeoData(const SdrObjGeoData& rGeo)
+{
+ rRefObj.RestGeoData(rGeo);
+ SetRectsDirty();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrObjGeoData* SdrVirtObj::GetGeoData() const
+{
+ return rRefObj.GetGeoData();
+}
+
+void SdrVirtObj::SetGeoData(const SdrObjGeoData& rGeo)
+{
+ Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetBoundRect();
+ rRefObj.SetGeoData(rGeo);
+ SetRectsDirty();
+ SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrVirtObj::TakeAttributes(SfxItemSet& rAttr, FASTBOOL bMerge, FASTBOOL bOnlyHardAttr) const
+{
+ rRefObj.TakeAttributes(rAttr,bMerge,bOnlyHardAttr);
+}
+
+void SdrVirtObj::NbcSetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ rRefObj.NbcSetAttributes(rAttr,bReplaceAll);
+}
+
+void SdrVirtObj::SetAttributes(const SfxItemSet& rAttr, FASTBOOL bReplaceAll)
+{
+ rRefObj.SetAttributes(rAttr,bReplaceAll);
+}
+
+SfxStyleSheet* SdrVirtObj::GetStyleSheet() const
+{
+ return rRefObj.GetStyleSheet();
+}
+
+void SdrVirtObj::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ rRefObj.SetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+}
+
+void SdrVirtObj::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, FASTBOOL bDontRemoveHardAttr)
+{
+ rRefObj.NbcSetStyleSheet(pNewStyleSheet,bDontRemoveHardAttr);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrVirtObj::NbcReformatText()
+{
+ rRefObj.NbcReformatText();
+}
+
+void SdrVirtObj::ReformatText()
+{
+ rRefObj.ReformatText();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrVirtObj::HasMacro() const
+{
+ return rRefObj.HasMacro();
+}
+
+SdrObject* SdrVirtObj::CheckMacroHit(const SdrObjMacroHitRec& rRec) const
+{
+ return rRefObj.CheckMacroHit(rRec); // Todo: Positionsversatz
+}
+
+Pointer SdrVirtObj::GetMacroPointer(const SdrObjMacroHitRec& rRec) const
+{
+ return rRefObj.GetMacroPointer(rRec); // Todo: Positionsversatz
+}
+
+void SdrVirtObj::PaintMacro(ExtOutputDevice& rXOut, const Rectangle& rDirtyRect, const SdrObjMacroHitRec& rRec) const
+{
+ rRefObj.PaintMacro(rXOut,rDirtyRect,rRec); // Todo: Positionsversatz
+}
+
+FASTBOOL SdrVirtObj::DoMacro(const SdrObjMacroHitRec& rRec)
+{
+ return rRefObj.DoMacro(rRec); // Todo: Positionsversatz
+}
+
+XubString SdrVirtObj::GetMacroPopupComment(const SdrObjMacroHitRec& rRec) const
+{
+ return rRefObj.GetMacroPopupComment(rRec); // Todo: Positionsversatz
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrVirtObj::WriteData(SvStream& rOut) const
+{
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrVirtObj");
+#endif
+ // fehlende Implementation
+ rOut<<aAnchor;
+}
+
+void SdrVirtObj::ReadData(const SdrObjIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ if (rHead.GetVersion()>=4) {
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrVirtObj");
+#endif
+ // fehlende Implementation
+ rIn>>aAnchor;
+ } else {
+ rIn>>aAnchor;
+ }
+}
+
+void SdrVirtObj::AfterRead()
+{
+ // fehlende Implementation
+}
+
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
new file mode 100644
index 0000000000..e9d55a0977
--- /dev/null
+++ b/svx/source/svdraw/svdpage.cxx
@@ -0,0 +1,1749 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdpage.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// HACK
+#ifdef SVX_LIGHT
+#define _IPOBJ_HXX
+#endif
+
+#ifndef _SOT_STORAGE_HXX
+#include <sot/storage.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SVDVIEW_HXX
+#include "svdview.hxx"
+#endif
+#include "svdpage.hxx"
+#include <string.h>
+#ifndef _STRING_H
+#define _STRING_H
+#endif
+#ifndef _APP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _IPOBJ_HXX //autogen
+#include <so3/ipobj.hxx>
+#endif
+
+#include "svdetc.hxx"
+#include "svdxout.hxx"
+#include "svdio.hxx"
+#include "svdobj.hxx"
+#include "svdogrp.hxx"
+#include "svdograf.hxx" // fuer SwapInAll()
+#include "svdoedge.hxx" // Zum kopieren der Konnektoren
+#include "svdoole2.hxx" // Sonderbehandlung OLE beim SdrExchangeFormat
+#include "svditer.hxx"
+#include "svdmodel.hxx"
+#include "svdlayer.hxx"
+#include "svdotext.hxx"
+#include "svdpagv.hxx"
+#include "fmglob.hxx"
+
+#define CONVERT_STARIMAGE_OLE_OBJECT_TO_GRAPHIC 1
+
+DBG_NAME(SdrObjList);
+
+TYPEINIT0(SdrObjList);
+
+SdrObjList::SdrObjList(SdrModel* pNewModel, SdrPage* pNewPage, SdrObjList* pNewUpList):
+ aList(1024,64,64)
+{
+ DBG_CTOR(SdrObjList,NULL);
+ pModel=pNewModel;
+ pPage=pNewPage;
+ pUpList=pNewUpList;
+ bObjOrdNumsDirty=FALSE;
+ bRectsDirty=FALSE;
+ pOwnerObj=NULL;
+ eListKind=SDROBJLIST_UNKNOWN;
+}
+
+SdrObjList::SdrObjList(const SdrObjList& rSrcList):
+ aList(1024,64,64)
+{
+ DBG_CTOR(SdrObjList,NULL);
+ pModel=NULL;
+ pPage=NULL;
+ pUpList=NULL;
+ bObjOrdNumsDirty=FALSE;
+ bRectsDirty=FALSE;
+ pOwnerObj=NULL;
+ eListKind=SDROBJLIST_UNKNOWN;
+ *this=rSrcList;
+}
+
+SdrObjList::~SdrObjList()
+{
+ DBG_DTOR(SdrObjList,NULL);
+ Clear(); // Containerinhalt loeschen!
+}
+
+void SdrObjList::operator=(const SdrObjList& rSrcList)
+{
+ Clear();
+ eListKind=rSrcList.eListKind;
+ CopyObjects(rSrcList);
+}
+
+void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
+{
+ Clear();
+ bObjOrdNumsDirty=FALSE;
+ bRectsDirty =FALSE;
+ ULONG nCloneErrCnt=0;
+ ULONG nAnz=rSrcList.GetObjCount();
+ SdrInsertReason aReason(SDRREASON_COPY);
+ ULONG no;
+ for (no=0; no<nAnz; no++) {
+ SdrObject* pSO=rSrcList.GetObj(no);
+ SdrObject* pDO=pSO->Clone(pPage,pModel);
+ if (pDO!=NULL) {
+ NbcInsertObject(pDO,CONTAINER_APPEND,&aReason);
+ } else {
+ nCloneErrCnt++;
+ }
+ }
+ // und nun zu den Konnektoren
+ // Die neuen Objekte werden auf die der rSrcList abgebildet
+ // und so die Objektverbindungen hergestellt.
+ // Aehnliche Implementation an folgenden Stellen:
+ // void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
+ // SdrModel* SdrExchangeView::GetMarkedObjModel() const
+ // FASTBOOL SdrExchangeView::Paste(const SdrModel& rMod,...)
+ // void SdrEditView::CopyMarked()
+ if (nCloneErrCnt==0) {
+ for (no=0; no<nAnz; no++) {
+ const SdrObject* pSrcOb=rSrcList.GetObj(no);
+ SdrEdgeObj* pSrcEdge=PTR_CAST(SdrEdgeObj,pSrcOb);
+ if (pSrcEdge!=NULL) {
+ SdrObject* pSrcNode1=pSrcEdge->GetConnectedNode(TRUE);
+ SdrObject* pSrcNode2=pSrcEdge->GetConnectedNode(FALSE);
+ if (pSrcNode1!=NULL && pSrcNode1->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode1=NULL; // Listenuebergreifend
+ if (pSrcNode2!=NULL && pSrcNode2->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode2=NULL; // ist (noch) nicht
+ if (pSrcNode1!=NULL || pSrcNode2!=NULL) {
+ SdrObject* pEdgeObjTmp=GetObj(no);
+ SdrEdgeObj* pDstEdge=PTR_CAST(SdrEdgeObj,pEdgeObjTmp);
+ if (pDstEdge!=NULL) {
+ if (pSrcNode1!=NULL) {
+ ULONG nDstNode1=pSrcNode1->GetOrdNum();
+ SdrObject* pDstNode1=GetObj(nDstNode1);
+ if (pDstNode1!=NULL) { // Sonst grober Fehler!
+ pDstEdge->ConnectToNode(TRUE,pDstNode1);
+ } else {
+ DBG_ERROR("SdrObjList::operator=(): pDstNode1==NULL!");
+ }
+ }
+ if (pSrcNode2!=NULL) {
+ ULONG nDstNode2=pSrcNode2->GetOrdNum();
+ SdrObject* pDstNode2=GetObj(nDstNode2);
+ if (pDstNode2!=NULL) { // Node war sonst wohl nicht markiert
+ pDstEdge->ConnectToNode(FALSE,pDstNode2);
+ } else {
+ DBG_ERROR("SdrObjList::operator=(): pDstNode2==NULL!");
+ }
+ }
+ } else {
+ DBG_ERROR("SdrObjList::operator=(): pDstEdge==NULL!");
+ }
+ }
+ }
+ }
+ } else {
+#ifdef DBG_UTIL
+ ByteString aStr("SdrObjList::operator=(): Fehler beim Clonen ");
+
+ if(nCloneErrCnt == 1)
+ {
+ aStr += "eines Zeichenobjekts.";
+ }
+ else
+ {
+ aStr += "von ";
+ aStr += nCloneErrCnt;
+ aStr += " Zeichenobjekten.";
+ }
+
+ aStr += " Objektverbindungen werden nicht mitkopiert.";
+
+ DBG_ERROR(aStr.GetBuffer());
+#endif
+ }
+}
+
+void SdrObjList::Clear()
+{
+ ULONG nAnz=GetObjCount();
+ for (ULONG no=0; no<nAnz; no++) {
+ SdrObject* pObj=GetObj(no);
+ delete pObj;
+ }
+ aList.Clear();
+ if (pModel!=NULL && nAnz!=0) {
+ pModel->SetChanged();
+ SdrHint aHint(HINT_OBJLISTCLEARED);
+ aHint.SetPage(pPage);
+ aHint.SetObjList(this);
+ pModel->Broadcast(aHint);
+ }
+}
+
+SdrPage* SdrObjList::GetPage() const
+{
+ return pPage;
+}
+
+void SdrObjList::SetPage(SdrPage* pNewPage)
+{
+ if (pPage!=pNewPage) {
+ pPage=pNewPage;
+ ULONG nAnz=GetObjCount();
+ for (ULONG no=0; no<nAnz; no++) {
+ SdrObject* pObj=GetObj(no);
+ pObj->SetPage(pPage);
+ }
+ }
+}
+
+SdrModel* SdrObjList::GetModel() const
+{
+ return pModel;
+}
+
+void SdrObjList::SetModel(SdrModel* pNewModel)
+{
+ if (pModel!=pNewModel) {
+ pModel=pNewModel;
+ ULONG nAnz=GetObjCount();
+ for (ULONG i=0; i<nAnz; i++) {
+ SdrObject* pObj=GetObj(i);
+ pObj->SetModel(pModel);
+ }
+ }
+}
+
+void SdrObjList::RecalcObjOrdNums()
+{
+ ULONG nAnz=GetObjCount();
+ for (ULONG no=0; no<nAnz; no++) {
+ SdrObject* pObj=GetObj(no);
+ pObj->SetOrdNum(no);
+ }
+ bObjOrdNumsDirty=FALSE;
+}
+
+void SdrObjList::RecalcRects()
+{
+ aOutRect=Rectangle();
+ aSnapRect=aOutRect;
+ ULONG nAnz=GetObjCount();
+ ULONG i;
+ for (i=0; i<nAnz; i++) {
+ SdrObject* pObj=GetObj(i);
+ if (i==0) {
+ aOutRect=pObj->GetBoundRect();
+ aSnapRect=pObj->GetSnapRect();
+ } else {
+ aOutRect.Union(pObj->GetBoundRect());
+ aSnapRect.Union(pObj->GetSnapRect());
+ }
+ }
+}
+
+void SdrObjList::SetRectsDirty()
+{
+ bRectsDirty=TRUE;
+ if (pUpList!=NULL) pUpList->SetRectsDirty();
+}
+
+void SdrObjList::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason)
+{
+ DBG_ASSERT(pObj!=NULL,"SdrObjList::NbcInsertObject(NULL)");
+ if (pObj!=NULL) {
+ DBG_ASSERT(!pObj->IsInserted(),"ZObjekt hat bereits Inserted-Status");
+ ULONG nAnz=GetObjCount();
+ if (nPos>nAnz) nPos=nAnz;
+ aList.Insert(pObj,nPos);
+ if (nPos<nAnz) bObjOrdNumsDirty=TRUE;
+ pObj->SetOrdNum(nPos);
+ pObj->SetObjList(this);
+ pObj->SetPage(pPage);
+ if (!bRectsDirty) {
+ aOutRect.Union(pObj->GetBoundRect());
+ aSnapRect.Union(pObj->GetSnapRect());
+ }
+ pObj->SetInserted(TRUE); // Ruft u.a. den UserCall
+ }
+}
+
+void SdrObjList::InsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason)
+{
+ DBG_ASSERT(pObj!=NULL,"SdrObjList::InsertObject(NULL)");
+
+ if(pObj)
+ {
+ if(pOwnerObj && !GetObjCount())
+ {
+ // damit der graue Rahmen des leeren Gruppenobjekts korrekt weggemalt wird
+ pOwnerObj->SendRepaintBroadcast();
+ }
+
+ // #69055# if anchor is used, reset it before grouping
+ if(GetOwnerObj())
+ {
+ const Point& rAnchorPos = pObj->GetAnchorPos();
+ if(rAnchorPos.X() || rAnchorPos.Y())
+ pObj->NbcSetAnchorPos(Point());
+ }
+
+ // do insert to new group
+ NbcInsertObject(pObj, nPos, pReason);
+
+ // Falls das Objekt in eine Gruppe eingefuegt wird
+ // und nicht mit seinen Bruedern ueberlappt, muss es
+ // einen eigenen Redraw bekommen
+ if(pOwnerObj)
+ {
+ pOwnerObj->SendRepaintBroadcast();
+ }
+
+ if(pModel)
+ {
+ // Hier muss ein anderer Broadcast her!
+ // Repaint ab Objekt Nummer ... (Achtung: GroupObj)
+ if(pObj->GetPage())
+ {
+ SdrHint aHint(*pObj);
+
+ aHint.SetKind(HINT_OBJINSERTED);
+ pModel->Broadcast(aHint);
+ }
+
+ pModel->SetChanged();
+ }
+ }
+}
+
+SdrObject* SdrObjList::NbcRemoveObject(ULONG nObjNum)
+{
+ ULONG nAnz=GetObjCount();
+ SdrObject* pObj=(SdrObject*)aList.Remove(nObjNum);
+ DBG_ASSERT(pObj!=NULL,"Object zum Removen nicht gefunden");
+ if (pObj!=NULL) {
+ DBG_ASSERT(pObj->IsInserted(),"ZObjekt hat keinen Inserted-Status");
+ pObj->SetInserted(FALSE); // Ruft u.a. den UserCall
+ pObj->SetObjList(NULL);
+ pObj->SetPage(NULL);
+ if (!bObjOrdNumsDirty) { // Optimierung fuer den Fall, dass das letzte Obj rausgenommen wird
+ if (nObjNum!=ULONG(nAnz-1)) {
+ bObjOrdNumsDirty=TRUE;
+ }
+ }
+ SetRectsDirty();
+ }
+ return pObj;
+}
+
+SdrObject* SdrObjList::RemoveObject(ULONG nObjNum)
+{
+ ULONG nAnz=GetObjCount();
+ SdrObject* pObj=(SdrObject*)aList.Remove(nObjNum);
+ DBG_ASSERT(pObj!=NULL,"Object zum Removen nicht gefunden");
+ if (pObj!=NULL) {
+ DBG_ASSERT(pObj->IsInserted(),"ZObjekt hat keinen Inserted-Status");
+ if (pModel!=NULL) {
+ // Hier muss ein anderer Broadcast her!
+ if (pObj->GetPage()!=NULL) {
+ SdrHint aHint(*pObj);
+ aHint.SetKind(HINT_OBJREMOVED);
+ pModel->Broadcast(aHint);
+ }
+ pModel->SetChanged();
+ }
+ pObj->SetInserted(FALSE); // Ruft u.a. den UserCall
+ pObj->SetObjList(NULL);
+ pObj->SetPage(NULL);
+ if (!bObjOrdNumsDirty) { // Optimierung fuer den Fall, dass das letzte Obj rausgenommen wird
+ if (nObjNum!=ULONG(nAnz-1)) {
+ bObjOrdNumsDirty=TRUE;
+ }
+ }
+ SetRectsDirty();
+ if (pOwnerObj!=NULL && GetObjCount()==0) {
+ // damit der graue Rahmen des leeren Gruppenobjekts korrekt gemalt wird
+ pOwnerObj->SendRepaintBroadcast();
+ }
+ }
+ return pObj;
+}
+
+SdrObject* SdrObjList::NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum)
+{
+ SdrObject* pObj=(SdrObject*)aList.GetObject(nObjNum);
+ DBG_ASSERT(pObj!=NULL,"SdrObjList::ReplaceObject: Object zum Removen nicht gefunden");
+ if (pObj!=NULL) {
+ DBG_ASSERT(pObj->IsInserted(),"SdrObjList::ReplaceObject: ZObjekt hat keinen Inserted-Status");
+ pObj->SetInserted(FALSE);
+ pObj->SetObjList(NULL);
+ pObj->SetPage(NULL);
+ aList.Replace(pNewObj,nObjNum);
+ pNewObj->SetOrdNum(nObjNum);
+ pNewObj->SetObjList(this);
+ pNewObj->SetPage(pPage);
+ pNewObj->SetInserted(TRUE);
+ SetRectsDirty();
+ }
+ return pObj;
+}
+
+SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, ULONG nObjNum)
+{
+ //ULONG nAnz=GetObjCount();
+ SdrObject* pObj=(SdrObject*)aList.GetObject(nObjNum);
+ DBG_ASSERT(pObj!=NULL,"SdrObjList::ReplaceObject: Object zum Removen nicht gefunden");
+ if (pObj!=NULL) {
+ DBG_ASSERT(pObj->IsInserted(),"SdrObjList::ReplaceObject: ZObjekt hat keinen Inserted-Status");
+ if (pModel!=NULL) {
+ // Hier muss ein anderer Broadcast her!
+ if (pObj->GetPage()!=NULL) {
+ SdrHint aHint(*pObj);
+ aHint.SetKind(HINT_OBJREMOVED);
+ pModel->Broadcast(aHint);
+ }
+ }
+ pObj->SetInserted(FALSE);
+ pObj->SetObjList(NULL);
+ pObj->SetPage(NULL);
+ aList.Replace(pNewObj,nObjNum);
+ pNewObj->SetOrdNum(nObjNum);
+ pNewObj->SetObjList(this);
+ pNewObj->SetPage(pPage);
+ pNewObj->SetInserted(TRUE);
+ if (pModel!=NULL) {
+ // Hier muss ein anderer Broadcast her!
+ if (pNewObj->GetPage()!=NULL) {
+ SdrHint aHint(*pNewObj);
+ aHint.SetKind(HINT_OBJINSERTED);
+ pModel->Broadcast(aHint);
+ }
+ pModel->SetChanged();
+ }
+ SetRectsDirty();
+ }
+ return pObj;
+}
+
+SdrObject* SdrObjList::NbcSetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum)
+{
+ SdrObject* pObj=(SdrObject*)aList.GetObject(nOldObjNum);
+ if (nOldObjNum==nNewObjNum) return pObj;
+ DBG_ASSERT(pObj!=NULL,"SdrObjList::NbcSetObjectOrdNum: Object nicht gefunden");
+ if (pObj!=NULL) {
+ DBG_ASSERT(pObj->IsInserted(),"SdrObjList::NbcSetObjectOrdNum: ZObjekt hat keinen Inserted-Status");
+ aList.Remove(nOldObjNum);
+ aList.Insert(pObj,nNewObjNum);
+ pObj->SetOrdNum(nNewObjNum);
+ bObjOrdNumsDirty=TRUE;
+ }
+ return pObj;
+}
+
+SdrObject* SdrObjList::SetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum)
+{
+ SdrObject* pObj=(SdrObject*)aList.GetObject(nOldObjNum);
+ if (nOldObjNum==nNewObjNum) return pObj;
+ DBG_ASSERT(pObj!=NULL,"SdrObjList::SetObjectOrdNum: Object nicht gefunden");
+ if (pObj!=NULL) {
+ DBG_ASSERT(pObj->IsInserted(),"SdrObjList::SetObjectOrdNum: ZObjekt hat keinen Inserted-Status");
+ /*if (pModel!=NULL) {
+ // Hier muss ein anderer Broadcast her!
+ if (pObj->GetPage()!=NULL) pModel->Broadcast(SdrHint(*pObj));
+ }*/
+ aList.Remove(nOldObjNum);
+ aList.Insert(pObj,nNewObjNum);
+ pObj->SetOrdNum(nNewObjNum);
+ bObjOrdNumsDirty=TRUE;
+ if (pModel!=NULL) {
+ // Hier muss ein anderer Broadcast her!
+ if (pObj->GetPage()!=NULL) pModel->Broadcast(SdrHint(*pObj));
+ pModel->SetChanged();
+ }
+ }
+ return pObj;
+}
+
+const Rectangle& SdrObjList::GetAllObjSnapRect() const
+{
+ if (bRectsDirty) {
+ ((SdrObjList*)this)->RecalcRects();
+ ((SdrObjList*)this)->bRectsDirty=FALSE;
+ }
+ return aSnapRect;
+}
+
+const Rectangle& SdrObjList::GetAllObjBoundRect() const
+{
+ if (bRectsDirty) {
+ ((SdrObjList*)this)->RecalcRects();
+ ((SdrObjList*)this)->bRectsDirty=FALSE;
+ }
+ return aOutRect;
+}
+
+FASTBOOL SdrObjList::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec, FASTBOOL bRestoreColors) const
+{
+ BOOL bOk(TRUE);
+ BOOL bWasNotActive = rInfoRec.bNotActive;
+ BOOL bIsEnteredGroup(FALSE);
+ UINT32 nWasDrawMode = rXOut.GetOutDev()->GetDrawMode();
+
+ if(!rInfoRec.bOriginalDrawModeSet)
+ {
+ // Original-Paintmode retten
+ ((SdrPaintInfoRec&)rInfoRec).bOriginalDrawModeSet = TRUE;
+ ((SdrPaintInfoRec&)rInfoRec).nOriginalDrawMode = rXOut.GetOutDev()->GetDrawMode();
+ }
+
+ if((rInfoRec.pPV && rInfoRec.pPV->GetObjList() == this)
+ || (rInfoRec.nPaintMode & SDRPAINTMODE_MASTERPAGE))
+ {
+ bIsEnteredGroup = TRUE;
+ }
+
+ if(bIsEnteredGroup && bWasNotActive)
+ {
+ // auf aktive Elemente schalten
+ ((SdrPaintInfoRec&)rInfoRec).bNotActive = FALSE;
+ }
+
+ if(rInfoRec.pPV && rInfoRec.bNotActive)
+ {
+ if(rInfoRec.pPV->GetView().DoVisualizeEnteredGroup())
+ {
+ // Darstellung schmal
+ rXOut.GetOutDev()->SetDrawMode(nWasDrawMode | (
+ DRAWMODE_GHOSTEDLINE|DRAWMODE_GHOSTEDFILL|DRAWMODE_GHOSTEDTEXT|DRAWMODE_GHOSTEDBITMAP|DRAWMODE_GHOSTEDGRADIENT));
+ }
+ }
+ else
+ {
+ // Darstellung normal
+ rXOut.GetOutDev()->SetDrawMode(rInfoRec.nOriginalDrawMode);
+ }
+
+ bOk = Paint(rXOut, rInfoRec, bRestoreColors, IMP_PAGEPAINT_NORMAL);
+
+ if(bIsEnteredGroup && bWasNotActive)
+ {
+ // Zurueck auf Ursprung, Zustand wieder verlassen
+ ((SdrPaintInfoRec&)rInfoRec).bNotActive = TRUE;
+ }
+
+ // Darstellung restaurieren
+ rXOut.GetOutDev()->SetDrawMode(nWasDrawMode);
+
+ return bOk;
+}
+
+
+FASTBOOL SdrObjList::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoRec, FASTBOOL bRestoreColors, USHORT nImpMode) const
+{
+ FASTBOOL bOk=TRUE;
+ FASTBOOL bBrk=FALSE;
+ ULONG nObjAnz=GetObjCount();
+ if (nObjAnz==0) return TRUE;
+ USHORT nEvent=rInfoRec.nBrkEvent;
+ const SetOfByte* pVisiLayer=&rInfoRec.aPaintLayer;
+ FASTBOOL bPrinter=rInfoRec.bPrinter;
+ OutputDevice* pOut=rXOut.GetOutDev();
+ Rectangle aCheckRect(rInfoRec.aCheckRect);
+ FASTBOOL bDrawAll=aCheckRect.IsEmpty();
+ ImpSdrHdcMerk aHDCMerk(*pOut,SDRHDC_SAVEPENANDBRUSHANDFONT,bRestoreColors);
+ FASTBOOL bColorsDirty=FALSE;
+ if (bDrawAll || aCheckRect.IsOver(GetAllObjBoundRect())) {
+ Application* pAppPtr=NULL;
+ if (nEvent!=0) pAppPtr=GetpApp();
+ SetOfByte aPaintLayer(*pVisiLayer);
+ USHORT nPaintCycles = 1;
+ SdrLayerID nLayerId = 0;
+
+ if (pModel)
+ {
+ const SdrLayerAdmin& rLayerAdmin = pModel->GetLayerAdmin();
+ nLayerId = rLayerAdmin.GetLayerID(rLayerAdmin.GetControlLayerName(), FALSE);
+ }
+
+ if( pPage == NULL || ( !pPage->IsMasterPage() && aPaintLayer.IsSet( nLayerId ) ) )
+ {
+ // Der ControlLayer soll gezeichnet werden
+ // Wenn Controls existieren, wird der ControlLayer als letztes gezeichnet
+ SetOfByte aTestLayerSet = aPaintLayer;
+ aTestLayerSet.Clear(nLayerId);
+
+ if (!aTestLayerSet.IsEmpty())
+ {
+ // Es soll nicht nur der ControlLayer gezeichnet werden
+ ULONG nObjNum=0;
+ while (nObjNum<nObjAnz && nPaintCycles < 2)
+ {
+ if (GetObj(nObjNum)->GetLayer() == nLayerId)
+ {
+ // Objekt auf ControlLayer gefunden
+ // Der ControlLayer wird ersteinmal unsichtbar geschaltet
+ nPaintCycles = 2;
+ aPaintLayer.Clear(nLayerId);
+ }
+
+ nObjNum++;
+ }
+ }
+ }
+
+ for (USHORT nCycle = 1; nCycle <= nPaintCycles; nCycle++)
+ {
+ USHORT nPaintImpMode = nImpMode;
+ FASTBOOL bNormal = ( nPaintImpMode == IMP_PAGEPAINT_NORMAL );
+ FASTBOOL bCachePrepare = ( nPaintImpMode == IMP_PAGEPAINT_PREPARE_CACHE );
+ FASTBOOL bBGCachePrepare = ( nPaintImpMode == IMP_PAGEPAINT_PREPARE_BG_CACHE );
+ FASTBOOL bCachePaint = ( nPaintImpMode == IMP_PAGEPAINT_PAINT_CACHE );
+ FASTBOOL bBGCachePaint = ( nPaintImpMode == IMP_PAGEPAINT_PAINT_BG_CACHE );
+ FASTBOOL bPaintFlag = ( bNormal || bCachePrepare || bBGCachePrepare );
+
+ if( nCycle == 2 )
+ {
+ // Im zweiten Durchgang nur den ControlLayer zeichnen
+ aPaintLayer.ClearAll();
+ aPaintLayer.Set(nLayerId);
+ }
+
+ ULONG nObjNum = 0UL;
+
+ while( ( nObjNum < nObjAnz ) && !bBrk )
+ {
+ SdrObject* pObj = GetObj( nObjNum );
+
+ if( nObjNum == 0 && eListKind == SDROBJLIST_MASTERPAGE &&
+ pPage && pPage->IsMasterPage() && rInfoRec.pPV )
+ {
+ // painting pages background obj instead of masterpages background obj
+ SdrPage* pPg = rInfoRec.pPV->GetPage();
+ SdrObject* pBackgroundObj = pPg ? pPg->GetBackgroundObj() : NULL;
+ if( pBackgroundObj )
+ {
+ if( rXOut.GetOutDev()->GetDrawMode() == DRAWMODE_DEFAULT )
+ {
+ pObj = pBackgroundObj;
+ Point aPos ( pPage->GetLftBorder(), pPage->GetUppBorder() );
+ Size aSize ( pPage->GetSize() );
+ aSize.Width() -= pPage->GetLftBorder() + pPage->GetRgtBorder() - 1;
+ aSize.Height() -= pPage->GetUppBorder() + pPage->GetLwrBorder() - 1;
+ Rectangle aLogicRect( aPos, aSize );
+
+ if( pBackgroundObj->GetLogicRect() != aLogicRect )
+ {
+ pBackgroundObj->SetLogicRect( aLogicRect );
+ pBackgroundObj->RecalcBoundRect();
+ }
+ }
+ else
+ pObj = NULL;
+
+ }
+ }
+
+ if( pObj && ( bDrawAll || aCheckRect.IsOver( pObj->GetBoundRect() ) ) )
+ {
+ SdrObjList* pSubList = pObj->GetSubList();
+
+ // Gruppenobjekte beruecksichtigen sichtbare Layer selbst (Ansonsten nur Painten, wenn Layer sichtbar)
+ if( pSubList!=NULL || ((!bPrinter || pObj->IsPrintable()) && aPaintLayer.IsSet(pObj->GetLayer())) )
+ {
+ if( !bNormal && !pObj->IsMasterCachable() )
+ {
+ if( bCachePrepare || bBGCachePrepare )
+ bBrk = TRUE, bPaintFlag = FALSE;
+ else if( bCachePaint || bBGCachePaint )
+ {
+ bPaintFlag = bNormal = TRUE;
+ }
+ }
+
+ if( bPaintFlag )
+ {
+ if( pObj->IsNeedColorRestore() )
+ {
+ if (bColorsDirty && bRestoreColors)
+ aHDCMerk.Restore(*pOut);
+
+ bColorsDirty=FALSE;
+ }
+ else
+ bColorsDirty=TRUE; // andere aendern die Farben
+
+ if( rInfoRec.pPaintProc!=NULL )
+ {
+ SdrPaintProcRec aRec(pObj,rXOut,rInfoRec);
+ Link aLink(*rInfoRec.pPaintProc);
+ aLink.Call(&aRec); // sollte mal 'nen ReturnCode liefern
+ }
+ else
+ bOk=pObj->Paint(rXOut,rInfoRec);
+
+ // nach dem ersten Objekt bei reinem Hintergrundcache
+ // sollen die folgenden Objekte natuerlich nicht gezeichnet werden
+ if( bBGCachePrepare )
+ bPaintFlag = FALSE;
+ }
+ else if( bBGCachePaint )
+ bPaintFlag = TRUE;
+ }
+
+ if( bOk && nEvent != 0 )
+ bOk = !pAppPtr->AnyInput( nEvent );
+
+ if( !bOk )
+ bBrk = TRUE;
+ }
+ nObjNum++;
+ }
+ }
+ }
+
+ if (bColorsDirty && bRestoreColors)
+ aHDCMerk.Restore(*pOut);
+
+ return bOk;
+}
+
+SdrObject* SdrObjList::CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer, FASTBOOL bBackward) const
+{
+ SdrObject* pHit=NULL;
+ Rectangle R(rPnt.X()-nTol,rPnt.Y()-nTol,rPnt.X()+nTol,rPnt.Y()+nTol);
+ if (R.IsOver(GetAllObjBoundRect())) {
+ ULONG nObjAnz=GetObjCount();
+ ULONG nObjNum=bBackward ? 0 : nObjAnz;
+ while (pHit==NULL && (bBackward ? nObjNum<nObjAnz : nObjNum>0)) {
+ if (!bBackward) nObjNum--;
+ SdrObject* pObj=GetObj(nObjNum);
+ if (R.IsOver(pObj->GetBoundRect())) {
+ SdrObjList* pSubList=pObj->GetSubList();
+ if (pSubList!=NULL || pVisiLayer==NULL) { // Gruppenobjekte beruecksichtigen sichtbare Layer selbst
+ pHit=pObj->CheckHit(rPnt,nTol,pVisiLayer/*,bBackward*/);
+ } else { // Ansonsten nur wenn Layer sichtbar
+ SdrLayerID nLayer=pObj->GetLayer();
+ if (pVisiLayer->IsSet(nLayer)) {
+ pHit=pObj->CheckHit(rPnt,nTol,pVisiLayer/*,bBackward*/);
+ }
+ }
+ }
+ if (bBackward) nObjNum++;
+ }
+ }
+ return pHit;
+}
+
+void SdrObjList::NbcReformatAllTextObjects()
+{
+ ULONG nAnz=GetObjCount();
+ ULONG nNum=0;
+
+ Printer* pPrinter = NULL;
+
+ if (pModel)
+ {
+ if (pModel->GetRefDevice() && pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
+ {
+ // Kein RefDevice oder RefDevice kein Printer
+ pPrinter = (Printer*) pModel->GetRefDevice();
+ }
+ }
+
+ while (nNum<nAnz)
+ {
+ SdrObject* pObj = GetObj(nNum);
+#ifndef SVX_LIGHT
+ if (pPrinter &&
+ pObj->GetObjInventor() == SdrInventor &&
+ pObj->GetObjIdentifier() == OBJ_OLE2 &&
+ !( (SdrOle2Obj*) pObj )->IsEmpty() )
+ {
+ const SvInPlaceObjectRef& xObjRef = ((SdrOle2Obj*) pObj)->GetObjRef();
+
+ if( xObjRef.Is() && ( xObjRef->GetMiscStatus() & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE ) )
+ xObjRef->OnDocumentPrinterChanged(pPrinter);
+ }
+#endif
+
+ pObj->NbcReformatText();
+ nAnz=GetObjCount(); // ReformatText may delete an object
+ nNum++;
+ }
+
+}
+
+void SdrObjList::ReformatAllTextObjects()
+{
+ ULONG nAnz=GetObjCount();
+ ULONG nNum=0;
+
+ Printer* pPrinter = NULL;
+
+ if (pModel)
+ {
+ if (pModel->GetRefDevice() && pModel->GetRefDevice()->GetOutDevType() == OUTDEV_PRINTER)
+ {
+ // Kein RefDevice oder RefDevice kein Printer
+ pPrinter = (Printer*) pModel->GetRefDevice();
+ }
+ }
+
+ while (nNum<nAnz)
+ {
+ SdrObject* pObj = GetObj(nNum);
+
+#ifndef SVX_LIGHT
+ if (pPrinter &&
+ pObj->GetObjInventor() == SdrInventor &&
+ pObj->GetObjIdentifier() == OBJ_OLE2 &&
+ !( (SdrOle2Obj*) pObj )->IsEmpty() )
+ {
+ const SvInPlaceObjectRef& xObjRef = ((SdrOle2Obj*) pObj)->GetObjRef();
+
+ if( xObjRef.Is() && ( xObjRef->GetMiscStatus() & SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE ) )
+ xObjRef->OnDocumentPrinterChanged(pPrinter);
+ }
+#endif
+
+ pObj->ReformatText();
+ nAnz=GetObjCount(); // ReformatText may delete an object
+ nNum++;
+ }
+}
+
+void SdrObjList::BurnInStyleSheetAttributes()
+{
+ ULONG nAnz=GetObjCount();
+ ULONG nNum=0;
+ while (nNum<nAnz) {
+ GetObj(nNum)->BurnInStyleSheetAttributes();
+ nNum++;
+ }
+}
+
+void SdrObjList::RemoveNotPersistentObjects(FASTBOOL bNoBroadcast)
+{
+ FASTBOOL bNoOLE=pModel!=NULL && pModel->IsStreamingSdrModel();
+ ULONG nObjAnz=GetObjCount();
+ for (ULONG nObjNum=nObjAnz; nObjNum>0;) {
+ nObjNum--;
+ SdrObject* pObj=GetObj(nObjNum);
+ FASTBOOL bThisObjNot=pObj->IsNotPersistent();
+ if (!bThisObjNot && bNoOLE && pObj->ISA(SdrOle2Obj)) {
+ bThisObjNot=TRUE;
+ }
+ if (bThisObjNot) {
+ if (bNoBroadcast) NbcRemoveObject(nObjNum);
+ else RemoveObject(nObjNum);
+ } else {
+ SdrObjList* pOL=pObj->GetSubList();
+ if (pOL!=NULL) {
+ pOL->RemoveNotPersistentObjects(bNoBroadcast);
+ }
+ }
+ }
+}
+
+void SdrObjList::RestartAllAnimations(SdrPageView* pPageView) const
+{
+ ULONG nAnz=GetObjCount();
+ ULONG nNum=0;
+ while (nNum<nAnz) {
+ GetObj(nNum)->RestartAnimation(pPageView);
+ nNum++;
+ }
+}
+
+FASTBOOL SdrObjList::ImpGetFillColor(SdrObject* pObj, Color& rCol) const
+{
+ SfxItemSet aSet(pModel->GetItemPool());
+ pObj->TakeAttributes(aSet,FALSE,FALSE);
+ return GetDraftFillColor(aSet,rCol);
+}
+
+FASTBOOL SdrObjList::GetFillColor(const Point& rPnt, const SetOfByte& rVisLayers,
+ FASTBOOL bLayerSorted, Color& rCol) const
+{
+ if (pModel==NULL) return FALSE;
+ FASTBOOL bRet=FALSE;
+ FASTBOOL bMaster=pPage!=NULL ? pPage->IsMasterPage() : FALSE;
+ for (ULONG no=GetObjCount(); !bRet && no>0; ) {
+ no--;
+ SdrObject* pObj=GetObj(no);
+ SdrObjList* pOL=pObj->GetSubList();
+ if (pOL!=NULL) { // Aha, Gruppenobjekt
+ bRet=pOL->GetFillColor(rPnt,rVisLayers,bLayerSorted,rCol);
+ } else {
+ SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pObj);
+ if (pTextObj!=NULL &&
+ pObj->IsClosedObj() && rVisLayers.IsSet(pObj->GetLayer()) &&
+ (!bMaster || !pObj->IsNotVisibleAsMaster()) &&
+ pObj->GetBoundRect().IsInside(rPnt) &&
+ !pTextObj->IsHideContour() && pObj->IsHit(rPnt,0,NULL))
+ { // Nachfolgend extra Funktion um Stack zu sparen,
+ // da diese Methode hier rekursiv ist.
+ bRet=ImpGetFillColor(pObj,rCol);
+ }
+ }
+ }
+ return bRet;
+}
+
+
+FASTBOOL SdrObjList::IsReadOnly() const
+{
+ FASTBOOL bRet=FALSE;
+ if (pPage!=NULL && pPage!=this) bRet=pPage->IsReadOnly();
+ return bRet;
+}
+
+ULONG SdrObjList::CountAllObjects() const
+{
+ ULONG nCnt=GetObjCount();
+ ULONG nAnz=nCnt;
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ SdrObjList* pSubOL=GetObj(nNum)->GetSubList();
+ if (pSubOL!=NULL) {
+ nCnt+=pSubOL->CountAllObjects();
+ }
+ }
+ return nCnt;
+}
+
+void SdrObjList::ForceSwapInObjects() const
+{
+ ULONG nObjAnz=GetObjCount();
+ for (ULONG nObjNum=nObjAnz; nObjNum>0;) {
+ nObjNum--;
+ SdrObject* pObj=GetObj(nObjNum);
+ SdrGrafObj* pGrafObj=PTR_CAST(SdrGrafObj,pObj);
+ if (pGrafObj!=NULL) {
+ pGrafObj->ForceSwapIn();
+ }
+ SdrObjList* pOL=pObj->GetSubList();
+ if (pOL!=NULL) {
+ pOL->ForceSwapInObjects();
+ }
+ }
+}
+
+void SdrObjList::Save(SvStream& rOut) const
+{
+ FASTBOOL bNotPersist=pPage!=NULL && pPage->IsObjectsNotPersistent();
+ FASTBOOL bNoOLE=pModel!=NULL && pModel->IsStreamingSdrModel();
+ if (!bNotPersist) {
+ SdrObjListIter aIter(*this,IM_FLAT);
+ while (aIter.IsMore()) {
+ SdrObject* pObj=aIter.Next();
+ FASTBOOL bThisObjNot=pObj->IsNotPersistent();
+ if (!bThisObjNot && bNoOLE && pObj->ISA(SdrOle2Obj)) {
+ bThisObjNot=TRUE;
+ }
+ if (!bThisObjNot) rOut<<*pObj;
+ if (pModel!=NULL) pModel->IncProgress();
+ }
+ }
+ SdrIOHeader(rOut,STREAM_WRITE,SdrIOEndeID); // Endemarke
+}
+
+void SdrObjList::Load(SvStream& rIn, SdrPage& rPage)
+{
+ Clear();
+ if (rIn.GetError()!=0) return;
+ FASTBOOL bEnde=FALSE;
+ SdrInsertReason aReason(SDRREASON_STREAMING);
+ while (rIn.GetError()==0 && !rIn.IsEof() && !bEnde) {
+ SdrObjIOHeaderLookAhead aHead(rIn,STREAM_READ);
+ if (!aHead.IsEnde()) {
+ SdrObject* pObj=SdrObjFactory::MakeNewObject(aHead.nInventor,aHead.nIdentifier,&rPage);
+ if (pObj!=NULL) {
+ rIn>>*pObj;
+#ifdef CONVERT_STARIMAGE_OLE_OBJECT_TO_GRAPHIC
+ if( ( pObj->GetObjIdentifier() == OBJ_OLE2 ) &&
+ ( pObj->GetObjInventor() == SdrInventor ) &&
+ ( ( SdrOle2Obj*) pObj )->GetProgName() == String( RTL_CONSTASCII_USTRINGPARAM( "StarImage" ) ) )
+ {
+ SotStorage* pModelStorage = pModel->GetModelStorage();
+ const String aSimStorageName( ( (SdrOle2Obj*) pObj )->GetName() );
+
+ if( pModelStorage && pModelStorage->IsStorage( aSimStorageName ) )
+ {
+ SotStorageRef xSimStorage( pModelStorage->OpenSotStorage( aSimStorageName ) );
+
+ if( xSimStorage.Is() )
+ {
+ String aStmName( RTL_CONSTASCII_USTRINGPARAM( "StarImageDocument" ) );
+
+ if( xSimStorage->IsStream( aStmName ) ||
+ xSimStorage->IsStream( aStmName = String( RTL_CONSTASCII_USTRINGPARAM( "StarImageDocument 4.0" ) ) ) )
+ {
+ SotStorageStreamRef xSimStm( xSimStorage->OpenSotStream( aStmName ) );
+
+ if( xSimStm.Is() && !xSimStm->GetError() )
+ {
+ Graphic aGraphic;
+
+ xSimStm->SetBufferSize( 32768 );
+ xSimStm->SetKey( xSimStorage->GetKey() );
+ *xSimStm >> aGraphic;
+ xSimStm->SetBufferSize( 0 );
+
+ SdrGrafObj* pNewObj = (SdrGrafObj*) SdrObjFactory::MakeNewObject( SdrInventor, OBJ_GRAF, &rPage );
+
+ if( pNewObj )
+ {
+ pNewObj->SetGraphic( aGraphic );
+ pNewObj->SetLogicRect( pObj->GetLogicRect() );
+ delete pObj;
+ pObj = pNewObj;
+ }
+ }
+ }
+ }
+ }
+ }
+#endif
+ InsertObject(pObj,CONTAINER_APPEND,&aReason);
+ } else { // aha, das wil keiner. Also ueberlesen.
+#ifdef SVX_LIGHT
+ if( aHead.nInventor != FmFormInventor )
+ {
+#endif
+
+#ifdef DBG_UTIL
+ ByteString aStr("SdrObjList::Load(): Zeichenobjekt kann von der Factory nicht erzeugt werden:\n");
+ UINT32 nPos(GetObjCount());
+
+ aStr += "Listenposition: ";
+ aStr += nPos;
+ aStr += "\n";
+ aStr += "Inventor: ";
+ aStr += char(aHead.nInventor);
+ aStr += char(aHead.nInventor >> 8);
+ aStr += char(aHead.nInventor >> 16);
+ aStr += char(aHead.nInventor >> 24);
+ aStr += ", Identifier: ";
+ aStr += aHead.nIdentifier;
+ aStr += "\n";
+ aStr += "FilePos: ";
+ aStr += aHead.GetFilePos();
+ aStr += ", BlockSize: ";
+ aStr += aHead.GetBlockSize();
+
+ DBG_ERROR(aStr.GetBuffer());
+#endif
+
+#ifdef SVX_LIGHT
+ }
+#endif
+ aHead.SkipRecord();
+ }
+ } else {
+ bEnde=TRUE;
+ aHead.SkipRecord(); // die Endemarke weglesen
+ }
+ SdrModel* pMd=pModel;
+ if (pMd==NULL) pMd=rPage.GetModel();
+ if (pMd!=NULL) pMd->DoProgress(rIn.Tell());
+ }
+}
+
+void SdrObjList::AfterRead()
+{
+ ULONG nAnz=GetObjCount();
+ for (ULONG i=0; i<nAnz; i++) {
+ GetObj(i)->AfterRead();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SvStream& operator<<(SvStream& rOut, const SdrMasterPageDescriptor& rMDP)
+{
+ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOMPgDID);
+ rOut<<rMDP.nPgNum;
+ rOut<<rMDP.aVisLayers;
+ return rOut;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrMasterPageDescriptor& rMDP)
+{
+ if (rIn.GetError()!=0) return rIn;
+ SdrIOHeader aHead(rIn,STREAM_READ);
+ rIn>>rMDP.nPgNum;
+ rIn>>rMDP.aVisLayers;
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrMasterPageDescriptorList::Clear()
+{
+ USHORT nAnz=GetCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ delete GetObject(i);
+ }
+ aList.Clear();
+}
+
+void SdrMasterPageDescriptorList::operator=(const SdrMasterPageDescriptorList& rSrcList)
+{
+ Clear();
+ USHORT nAnz=rSrcList.GetCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ Insert(rSrcList[i]);
+ }
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrMasterPageDescriptorList& rMPDL)
+{
+ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOMPDLID);
+ USHORT nAnz=rMPDL.GetCount();
+ rOut<<nAnz;
+ for (USHORT i=0; i<nAnz; i++) {
+ rOut<<rMPDL[i];
+ }
+ return rOut;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrMasterPageDescriptorList& rMPDL)
+{
+ if (rIn.GetError()!=0) return rIn;
+ SdrIOHeader aHead(rIn,STREAM_READ);
+ rMPDL.Clear();
+ USHORT nAnz;
+ rIn>>nAnz;
+ for (USHORT i=0; i<nAnz; i++) {
+ SdrMasterPageDescriptor* pMPD=new SdrMasterPageDescriptor;
+ rIn>>*pMPD;
+ rMPDL.aList.Insert(pMPD,CONTAINER_APPEND);
+ }
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPageGridFrameList::Clear()
+{
+ USHORT nAnz=GetCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ delete GetObject(i);
+ }
+ aList.Clear();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrPage,SdrObjList);
+
+SdrPage::SdrPage(SdrModel& rNewModel, FASTBOOL bMasterPage):
+ SdrObjList(&rNewModel,this),
+ pBackgroundObj( NULL )
+{
+ pLayerAdmin=new SdrLayerAdmin(&rNewModel.GetLayerAdmin());
+ bMaster=bMasterPage;
+ bInserted=FALSE;
+ aPrefVisiLayers.SetAll();
+ nWdt=10;
+ nHgt=10;
+ nBordLft=0;
+ nBordUpp=0;
+ nBordRgt=0;
+ nBordLwr=0;
+ nPageNum=0;
+ eListKind=bMasterPage ? SDROBJLIST_MASTERPAGE : SDROBJLIST_DRAWPAGE;
+ bSwappingLocked=FALSE;
+ bObjectsNotPersistent=FALSE;
+}
+
+SdrPage::SdrPage(const SdrPage& rSrcPage):
+ SdrObjList(rSrcPage.pModel,this),
+ pBackgroundObj( NULL )
+{
+ pLayerAdmin=new SdrLayerAdmin(rSrcPage.pModel->GetLayerAdmin());
+ *this=rSrcPage;
+ eListKind=bMaster ? SDROBJLIST_MASTERPAGE : SDROBJLIST_DRAWPAGE;
+}
+
+SdrPage::~SdrPage()
+{
+ delete pBackgroundObj;
+ delete pLayerAdmin;
+}
+
+void SdrPage::operator=(const SdrPage& rSrcPage)
+{
+ SdrObjList::operator=(rSrcPage);
+ pPage=this;
+ bMaster =rSrcPage.bMaster ;
+ bSwappingLocked=rSrcPage.bSwappingLocked;
+ aPrefVisiLayers=rSrcPage.aPrefVisiLayers;
+ nWdt =rSrcPage.nWdt ;
+ nHgt =rSrcPage.nHgt ;
+ nBordLft =rSrcPage.nBordLft ;
+ nBordUpp =rSrcPage.nBordUpp ;
+ nBordRgt =rSrcPage.nBordRgt ;
+ nBordLwr =rSrcPage.nBordLwr ;
+ nPageNum =rSrcPage.nPageNum ;
+ aMasters =rSrcPage.aMasters ;
+ bObjectsNotPersistent=rSrcPage.bObjectsNotPersistent;
+
+ if( rSrcPage.pBackgroundObj )
+ {
+ pBackgroundObj = rSrcPage.pBackgroundObj->Clone();
+ pBackgroundObj->SetPage( this );
+ pBackgroundObj->SetModel( pModel );
+ }
+}
+
+SdrPage* SdrPage::Clone() const
+{
+ return Clone(NULL);
+}
+
+SdrPage* SdrPage::Clone(SdrModel* pNewModel) const
+{
+ if (pNewModel==NULL) pNewModel=pModel;
+ SdrPage* pPage=new SdrPage(*pNewModel);
+ *pPage=*this;
+ return pPage;
+}
+
+SfxItemPool& SdrPage::GetItemPool() const
+{
+ return pModel->GetItemPool();
+}
+
+void SdrPage::SetSize(const Size& aSiz)
+{
+ nWdt=aSiz.Width();
+ nHgt=aSiz.Height();
+ pModel->SetChanged();
+}
+
+Size SdrPage::GetSize() const
+{
+ return Size(nWdt,nHgt);
+}
+
+INT32 SdrPage::GetWdt() const
+{
+ return nWdt;
+}
+
+void SdrPage::SetOrientation(Orientation eOri)
+{
+ // Quadratisch ist und bleibt immer Portrait
+ Size aSiz(GetSize());
+ if (aSiz.Width()!=aSiz.Height()) {
+ if ((eOri==ORIENTATION_PORTRAIT) == (aSiz.Width()>aSiz.Height())) {
+ SetSize(Size(aSiz.Height(),aSiz.Width()));
+ }
+ }
+}
+
+Orientation SdrPage::GetOrientation() const
+{
+ // Quadratisch ist Portrait
+ Orientation eRet=ORIENTATION_PORTRAIT;
+ Size aSiz(GetSize());
+ if (aSiz.Width()>aSiz.Height()) eRet=ORIENTATION_LANDSCAPE;
+ return eRet;
+}
+
+INT32 SdrPage::GetHgt() const
+{
+ return nHgt;
+}
+
+void SdrPage::SetBorder(INT32 nLft, INT32 nUpp, INT32 nRgt, INT32 nLwr)
+{
+ nBordLft=nLft;
+ nBordUpp=nUpp;
+ nBordRgt=nRgt;
+ nBordLwr=nLwr;
+ pModel->SetChanged();
+}
+
+void SdrPage::SetLftBorder(INT32 nBorder)
+{
+ nBordLft=nBorder; pModel->SetChanged();
+}
+
+void SdrPage::SetUppBorder(INT32 nBorder)
+{
+ nBordUpp=nBorder; pModel->SetChanged();
+}
+
+void SdrPage::SetRgtBorder(INT32 nBorder)
+{
+ nBordRgt=nBorder; pModel->SetChanged();
+}
+
+void SdrPage::SetLwrBorder(INT32 nBorder)
+{
+ nBordLwr=nBorder; pModel->SetChanged();
+}
+
+INT32 SdrPage::GetLftBorder() const
+{
+ return nBordLft;
+}
+
+INT32 SdrPage::GetUppBorder() const
+{
+ return nBordUpp;
+}
+
+INT32 SdrPage::GetRgtBorder() const
+{
+ return nBordRgt;
+}
+
+INT32 SdrPage::GetLwrBorder() const
+{
+ return nBordLwr;
+}
+
+Point SdrPage::GetOffset() const
+{
+ return Point();
+}
+
+void SdrPage::SetModel(SdrModel* pNewModel)
+{
+ SdrModel* pOldModel=pModel;
+ SdrObjList::SetModel(pNewModel);
+ if (pNewModel!=pOldModel)
+ {
+ if (pNewModel!=NULL) {
+ pLayerAdmin->SetParent(&pNewModel->GetLayerAdmin());
+ } else {
+ pLayerAdmin->SetParent(NULL);
+ }
+ pLayerAdmin->SetModel(pNewModel);
+
+ if( pBackgroundObj )
+ pBackgroundObj->SetModel( pNewModel );
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+USHORT SdrPage::GetPageNum() const
+{
+ if (!bInserted) return 0;
+ if (bMaster) {
+ if (pModel->IsMPgNumsDirty()) ((SdrModel*)pModel)->RecalcPageNums(TRUE);
+ } else {
+ if (pModel->IsPagNumsDirty()) ((SdrModel*)pModel)->RecalcPageNums(FALSE);
+ }
+ return nPageNum;
+}
+
+void SdrPage::SetChanged()
+{
+ pModel->SetChanged();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPage::SendRepaintBroadcast() const
+{
+ if (bInserted && pModel!=NULL) pModel->Broadcast(SdrHint(*this));
+}
+
+USHORT SdrPage::GetMasterPagePos(USHORT nPgNum) const
+{
+ USHORT nAnz=aMasters.GetCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ USHORT nMaPgNum=aMasters[i].GetPageNum();
+ if (nMaPgNum==nPgNum) return i;
+ }
+ return SDRPAGE_NOTFOUND;
+}
+
+void SdrPage::InsertMasterPage(USHORT nPgNum, USHORT nPos)
+{
+ aMasters.Insert(nPgNum,nPos);
+ SetChanged();
+ SendRepaintBroadcast();
+}
+
+void SdrPage::InsertMasterPage(const SdrMasterPageDescriptor& rMPD, USHORT nPos)
+{
+ aMasters.Insert(rMPD,nPos);
+ SetChanged();
+ SendRepaintBroadcast();
+}
+
+void SdrPage::RemoveMasterPage(USHORT nPos)
+{
+ if (nPos<aMasters.GetCount()) {
+ aMasters.Remove(nPos);
+ SetChanged();
+ SendRepaintBroadcast();
+ }
+}
+
+void SdrPage::MoveMasterPage(USHORT nPos, USHORT nNewPos)
+{
+ if (nPos<aMasters.GetCount()) {
+ aMasters.Move(nPos,nNewPos);
+ SendRepaintBroadcast();
+ }
+}
+
+SdrPage* SdrPage::GetMasterPage(USHORT nPos) const
+{
+ USHORT nPgNum=GetMasterPageNum(nPos);
+ SdrPage* pPg=pModel->GetMasterPage(nPgNum);
+ return pPg;
+}
+
+void SdrPage::SetMasterPageNum(USHORT nPgNum, USHORT nPos)
+{
+ aMasters[nPos].SetPageNum(nPgNum);
+ SendRepaintBroadcast();
+}
+
+void SdrPage::SetMasterPageVisibleLayers(const SetOfByte& rVL, USHORT nPos)
+{
+ aMasters[nPos].SetVisibleLayers(rVL);
+ SendRepaintBroadcast();
+}
+
+void SdrPage::SetMasterPageDescriptor(const SdrMasterPageDescriptor& rMPD, USHORT nPos)
+{
+ aMasters[nPos]=rMPD;
+ SendRepaintBroadcast();
+}
+
+void SdrPage::SetMasterPageDescriptorList(const SdrMasterPageDescriptorList& rMPDL)
+{
+ aMasters=rMPDL;
+ SendRepaintBroadcast();
+}
+
+void SdrPage::ImpMasterPageRemoved(USHORT nMasterPageNum)
+{
+ USHORT nMasterAnz=GetMasterPageCount();
+ for (USHORT nm=nMasterAnz; nm>0;) {
+ nm--;
+ USHORT nNum=aMasters[nm].GetPageNum();
+ if (nNum==nMasterPageNum) { RemoveMasterPage(nm); SendRepaintBroadcast(); }
+ if (nNum>nMasterPageNum) {
+ // Hintere anpassen wegen Verschiebung durch entfernen
+ aMasters[nm].SetPageNum(USHORT(nNum-1));
+ }
+ }
+}
+
+void SdrPage::ImpMasterPageInserted(USHORT nMasterPageNum)
+{
+ USHORT nMasterAnz=GetMasterPageCount();
+ for (USHORT nm=nMasterAnz; nm>0;) {
+ nm--;
+ USHORT nNum=aMasters[nm].GetPageNum();
+ if (nNum>=nMasterPageNum) {
+ // Hintere anpassen wegen Verschiebung durch einfuegen
+ aMasters[nm].SetPageNum(nNum+1);
+ }
+ }
+}
+
+void SdrPage::ImpMasterPageMoved(USHORT nMasterPageNum, USHORT nNewMasterPageNum)
+{
+ USHORT nMasterAnz=GetMasterPageCount();
+ for (USHORT nm=nMasterAnz; nm>0;) {
+ nm--;
+ USHORT nNum=aMasters[nm].GetPageNum();
+ if (nNum==nMasterPageNum) {
+ aMasters[nm].SetPageNum(nNewMasterPageNum);
+ } else {
+ // Hintere anpassen wegen Verschiebung durch entfernen und einfuegen
+ USHORT nNeuNum=nNum;
+ if (nNeuNum>nMasterPageNum) nNeuNum--;
+ if (nNeuNum>=nNewMasterPageNum) nNeuNum++;
+ aMasters[nm].SetPageNum(nNeuNum);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrPage::GetFillColor(const Point& rPnt, const SetOfByte& rVisLayers,
+ FASTBOOL bLayerSorted, Color& rCol) const
+{
+ if (pModel==NULL) return FALSE;
+ FASTBOOL bRet=SdrObjList::GetFillColor(rPnt,rVisLayers,bLayerSorted,rCol);
+ if (!bRet && !bMaster) {
+ // nun zu den Masterpages
+ USHORT nMasterAnz=GetMasterPageCount();
+ for (USHORT nMaster=nMasterAnz; nMaster>0 && !bRet;) {
+ nMaster--;
+ const SdrMasterPageDescriptor& rMaster=GetMasterPageDescriptor(nMaster);
+ SetOfByte aSet(rVisLayers);
+ aSet&=rMaster.GetVisibleLayers();
+ SdrPage* pMaster=pModel->GetMasterPage(rMaster.GetPageNum());
+ if (pMaster!=NULL) {
+ bRet=pMaster->GetFillColor(rPnt,aSet,bLayerSorted,rCol);
+ }
+ }
+ }
+ return bRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+const SdrPageGridFrameList* SdrPage::GetGridFrameList(const SdrPageView* pPV, const Rectangle* pRect) const
+{
+ return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPage::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
+{
+ if (rIn.GetError()!=0) return;
+ SdrDownCompat aCompat(rIn,STREAM_READ); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrPage");
+#endif
+
+ if (rHead.GetVersion()>=11) {
+ // damit ich meine eigenen SubRecords erkenne (ab V11)
+ char cMagic[4];
+ if (rIn.Read(cMagic,4)!=4 || memcmp(cMagic,SdrIOJoeMagic,4)!=0) {
+ rIn.SetError(SVSTREAM_FILEFORMAT_ERROR);
+ return;
+ }
+ }
+
+ { // MiscellaneousData ab V11 eingepackt
+ SdrDownCompat* pPageMiscCompat=NULL;
+ if (rHead.GetVersion()>=11) {
+ pPageMiscCompat=new SdrDownCompat(rIn,STREAM_READ);
+#ifdef DBG_UTIL
+ pPageMiscCompat->SetID("SdrPage(Miscellaneous)");
+#endif
+ }
+ rIn>>nWdt;
+ rIn>>nHgt;
+ rIn>>nBordLft;
+ rIn>>nBordUpp;
+ rIn>>nBordRgt;
+ rIn>>nBordLwr;
+ USHORT n;
+ rIn>>n; //aName;
+ if (pPageMiscCompat!=NULL) {
+ delete pPageMiscCompat;
+ }
+ }
+
+ FASTBOOL bEnde=FALSE;
+ while (rIn.GetError()==0 && !rIn.IsEof() && !bEnde) {
+ SdrIOHeaderLookAhead aHead(rIn); // Layerdefinitionen lesen
+ if (aHead.IsID(SdrIOLayrID)) {
+ SdrLayer* pLay=new SdrLayer; // Layerdefinition lesen
+ rIn>>*pLay;
+ pLayerAdmin->InsertLayer(pLay);
+ } else
+ if (aHead.IsID(SdrIOLSetID)) {
+ SdrLayerSet* pSet=new SdrLayerSet; // Layersetdefinition lesen
+ rIn>>*pSet;
+ pLayerAdmin->InsertLayerSet(pSet);
+ } else
+ // Fuer den Fall der Faelle kann hier ww. MPgDscr oder MPgDscrList stehen
+ if (aHead.IsID(SdrIOMPgDID)) { // Masterpagedescriptor
+ SdrMasterPageDescriptor aDscr;
+ rIn>>aDscr;
+ aMasters.Insert(aDscr);
+ } else
+ if (aHead.IsID(SdrIOMPDLID)) { // MasterpagedescriptorList
+ SdrMasterPageDescriptorList aDscrList;
+ rIn>>aDscrList;
+ USHORT nAnz=aDscrList.GetCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ aMasters.Insert(aDscrList[nNum]);
+ }
+ } else bEnde=TRUE;
+ }
+
+ if (rHead.GetVersion()>=1) {
+ } else {
+ USHORT nMaAnz=0,i;
+ rIn>>nMaAnz;
+ for (i=0; i<nMaAnz; i++) {
+ USHORT nMaPgNum;
+ rIn>>nMaPgNum;
+ InsertMasterPage(nMaPgNum);
+ }
+ }
+ SdrObjList::Load(rIn,*this); // Liste der Objekte lesen
+
+ if ( rHead.GetVersion() >= 16 )
+ {
+ BOOL bBackgroundObj = FALSE;
+ rIn >> bBackgroundObj;
+ if( bBackgroundObj )
+ {
+ SdrObjIOHeaderLookAhead aHead( rIn,STREAM_READ );
+ if ( !aHead.IsEnde() )
+ {
+ pBackgroundObj = SdrObjFactory::MakeNewObject( aHead.nInventor, aHead.nIdentifier, this );
+ if ( bBackgroundObj )
+ rIn >> *pBackgroundObj;
+ }
+ else
+ aHead.SkipRecord(); // skip end mark
+ }
+ }
+}
+
+void SdrPage::WriteData(SvStream& rOut) const
+{
+ SdrDownCompat aCompat(rOut,STREAM_WRITE); // Fuer Abwaertskompatibilitaet (Lesen neuer Daten mit altem Code)
+#ifdef DBG_UTIL
+ aCompat.SetID("SdrPage");
+#endif
+ rOut.Write(SdrIOJoeMagic,4); // damit ich meine eigenen SubRecords erkenne (ab V11)
+ { // MiscellaneousData ab V11 eingepackt
+ SdrDownCompat aPageMiscCompat(rOut,STREAM_WRITE);
+#ifdef DBG_UTIL
+ aPageMiscCompat.SetID("SdrPage(Miscellaneous)");
+#endif
+ rOut<<nWdt;
+ rOut<<nHgt;
+ rOut<<nBordLft;
+ rOut<<nBordUpp;
+ rOut<<nBordRgt;
+ rOut<<nBordLwr;
+ USHORT n=0;
+ rOut<<n; //rPg.aName;
+ }
+
+ USHORT i; // Lokale Layerdefinitionen der Seite
+ for (i=0; i<pLayerAdmin->GetLayerCount(); i++) {
+ rOut<<*pLayerAdmin->GetLayer(i);
+ }
+ for (i=0; i<pLayerAdmin->GetLayerSetCount(); i++) {
+ rOut<<*pLayerAdmin->GetLayerSet(i);
+ }
+
+ rOut<<aMasters;
+ SdrObjList::Save(rOut);
+
+ BOOL bBackgroundObj = pBackgroundObj ? TRUE : FALSE;
+ rOut << bBackgroundObj;
+ if( pBackgroundObj )
+ rOut << *pBackgroundObj;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrPage& rPg)
+{
+ if (rIn.GetError()!=0) return rIn;
+ SdrIOHeader aHead(rIn,STREAM_READ);
+ rPg.ReadData(aHead,rIn);
+ return rIn;
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrPage& rPg)
+{
+ SdrIOHeader aHead(rOut,STREAM_WRITE,!rPg.bMaster ? SdrIOPageID : SdrIOMaPgID);
+ rPg.WriteData(rOut);
+ return rOut;
+}
+
+XubString SdrPage::GetLayoutName() const
+{
+ // Die wollte Dieter haben.
+ return String();
+}
+
+void SdrPage::SetBackgroundObj( SdrObject* pObj )
+{
+ if ( pObj )
+ {
+ pObj->SetPage( this );
+ pObj->SetModel( pModel );
+ pObj->SetLayer( 1 ); // Nothing known about the backgroundlayer...
+ }
+ delete pBackgroundObj, pBackgroundObj = pObj;
+}
+
+#ifdef GCC
+// Dummy-Implementationen fuer Deklarationen in svdpage.hxx
+Bitmap SdrPage::GetBitmap(const SetOfByte& rVisibleLayers, FASTBOOL bTrimBorders=TRUE) const {}
+GDIMetaFile SdrPage::GetMetaFile(const SetOfByte& rVisibleLayers, FASTBOOL bTrimBorders=TRUE) {}
+#endif
+
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
new file mode 100644
index 0000000000..df4cb25946
--- /dev/null
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -0,0 +1,2642 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdpagv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XWINDOWLISTENER_HPP_
+#include <com/sun/star/awt/XWindowListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XCONTROLCONTAINER_HPP_
+#include <com/sun/star/awt/XControlContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
+#include <com/sun/star/awt/PosSize.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XIMAGEPRODUCERSUPPLIER_HPP_
+#include <com/sun/star/form/XImageProducerSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
+#include <com/sun/star/lang/XComponent.hpp>
+#endif
+
+#include <unotools/processfactory.hxx>
+
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+
+#ifdef OS2
+#include <tools/svpm.h>
+#include <vcl/sysdep.hxx>
+#endif
+
+#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+
+#include "svdedxv.hxx"
+#include "svdpagv.hxx"
+#include "svdoutl.hxx"
+#include "svdpagv.hxx"
+#include "outliner.hxx"
+#include "xpoly.hxx"
+#include "svdxout.hxx"
+#include "svdetc.hxx"
+#include "svdobj.hxx"
+#include "svdouno.hxx"
+#include "svdpage.hxx"
+#include "svdio.hxx"
+#include "svdview.hxx"
+#include "svditer.hxx"
+#include "svdogrp.hxx"
+#include "svdtypes.hxx"
+
+#include "svdotext.hxx" // fuer PaintOutlinerView
+#include "svdoole2.hxx"
+
+#pragma hdrstop
+
+#ifdef JOEDEBUG
+#include "joedebug.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+TYPEINIT1(SdrPageView, SfxListener);
+
+#ifdef JOEDEBUG
+class UnoControl
+{
+public:
+ Window* pWin;
+public:
+ UnoControl(OutputDevice* pParent);
+ ~UnoControl() { delete pWin; }
+ void SetRect(const SdrObject* pObj, const Point& rPvOfs); // nur fuer intern zum testen!
+};
+
+UnoControl::UnoControl(OutputDevice* pParent)
+{
+ if (pParent->GetOutDevType()==OUTDEV_WINDOW)
+ {
+ pWin=new Window((Window*)pParent);
+ pWin->Show();
+ } else {
+ pWin=NULL;
+ }
+}
+
+// nur fuer intern zum testen!
+void UnoControl::SetRect(const SdrObject* pObj, const Point& rPvOfs)
+{
+ if (pWin!=NULL)
+ {
+ Rectangle aRect(pObj->GetBoundRect());
+ aRect.Move(rPvOfs.X(),rPvOfs.Y());
+ Window* pParent=pWin->GetParent();
+ aRect=pParent->LogicToPixel(aRect);
+ pWin->SetPosSizePixel(aRect.TopLeft(),aRect.GetSize());
+ }
+}
+
+class UnoControlModel
+{
+public:
+ UnoControl* CreateUnoControl(OutputDevice* pOutDev1) const { return new UnoControl(pOutDev1); }
+};
+#endif
+
+// Klasse muß als listener fungieren, um den Zustand, ob ein Object sichtbar ist oder nicht
+// festzuhalten
+//------------------------------------------------------------------------------
+SdrUnoControlRec::SdrUnoControlRec(SdrUnoControlList* _pParent, SdrUnoObj* _pObj, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > _xControl) throw()
+ :pObj(_pObj)
+ ,xControl(_xControl)
+ ,bVisible(TRUE)
+ ,bDisposed(FALSE)
+ ,nEvent(0)
+ ,pParent(_pParent)
+{
+ uno::Reference< awt::XWindow> xWindow(xControl, uno::UNO_QUERY);
+ if (xWindow.is())
+ {
+ xWindow->addWindowListener((awt::XWindowListener*)this);
+
+ // Am Property fuer das DefaultControl lauschen um das Control eventuell auszutauschen
+ uno::Reference< beans::XPropertySet > xSet(xControl->getModel(), uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropInfo( xSet->getPropertySetInfo() );
+ if (xPropInfo.is() && xPropInfo->hasPropertyByName( rtl::OUString::createFromAscii("DefaultControl")))
+ xSet->addPropertyChangeListener( rtl::OUString::createFromAscii("DefaultControl"), this);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+SdrUnoControlRec::~SdrUnoControlRec() throw()
+{
+ {
+ ::osl::MutexGuard aEventGuard( m_aEventSafety );
+ if (nEvent)
+ Application::RemoveUserEvent(nEvent);
+ nEvent = 0;
+ }
+
+ ::osl::MutexGuard aDestructionGuard(m_aDestructionSafety);
+ // this is just for the case we're deleted while another thread just handled the event :
+ // if this other thread called our link while we were deleting the event here, the
+ // link handler blocked. With leaving the above block it continued, but now we are prevented
+ // to leave this destructor 'til the link handler recognized that nEvent == 0 and left.
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL SdrUnoControlRec::disposing( const ::com::sun::star::lang::EventObject& Source )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ uno::Reference< awt::XControl > xSource( Source.Source, uno::UNO_QUERY);
+ if (xSource.is())
+ {
+ if (IsListening())
+ StopListening();
+
+ uno::Reference< beans::XPropertySet > xSet(xControl->getModel(), uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropInfo( xSet->getPropertySetInfo() );
+ if (xPropInfo.is() && xPropInfo->hasPropertyByName( rtl::OUString::createFromAscii("DefaultControl")))
+ xSet->removePropertyChangeListener( rtl::OUString::createFromAscii("DefaultControl"), this);
+ }
+
+ if (pParent)
+ {
+ uno::Reference< uno::XInterface > xThis(*this);
+ xControl = NULL;
+ pObj = NULL;
+
+ // jetzt darf mich der Vater freigeben
+ pParent->Disposing(this);
+ pParent = NULL;
+ }
+
+ bDisposed = TRUE;
+ }
+}
+
+//------------------------------------------------------------------------------
+
+// XWindowListener
+void SAL_CALL SdrUnoControlRec::windowResized( const ::com::sun::star::awt::WindowEvent& e )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+}
+
+void SAL_CALL SdrUnoControlRec::windowMoved( const ::com::sun::star::awt::WindowEvent& e )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+}
+
+void SAL_CALL SdrUnoControlRec::windowShown( const ::com::sun::star::lang::EventObject& e )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ if (IsListening())
+ StopListening();
+
+ bVisible = TRUE;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL SdrUnoControlRec::windowHidden( const ::com::sun::star::lang::EventObject& e )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ bVisible = FALSE;
+ // Im Designmodus ist das Control nicht sichtbar und der drawing layer ist
+ // verantwortlich fuer die Darstellung des Controls
+ // In diesem Fall auf Aenderungen an den Eigenschaften der Controls gelauscht,
+ // um ein Repaint auszufuehren.
+ if (!bDisposed)
+ StartListening();
+}
+
+// XPropertyChangeListener
+//------------------------------------------------------------------------------
+void SAL_CALL SdrUnoControlRec::propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ if (!xControl.is())
+ return;
+
+ if (evt.PropertyName == rtl::OUString::createFromAscii("DefaultControl"))
+ {
+ // anlegen eines neuen Controls
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::utl::getProcessServiceFactory() );
+ if( xFactory.is() )
+ {
+ OUString aControlName;
+ if(evt.NewValue >>= aControlName)
+ {
+ uno::Reference< awt::XControl > xUnoControl( xFactory->createInstance(aControlName), uno::UNO_QUERY);
+ ReplaceControl(xUnoControl);
+ }
+ }
+ }
+ else
+ {
+ // Attributaenderung:
+ // Bereich neu Zeichnen
+ OutputDevice* pOut = pObj->GetOutputDevice(xControl);
+ if (pOut && pOut->GetOutDevType() == OUTDEV_WINDOW)
+ ((Window*)pOut)->Invalidate(pObj->GetBoundRect());
+ }
+}
+
+// XImageConsumer
+//------------------------------------------------------------------------------
+void SAL_CALL SdrUnoControlRec::complete( sal_Int32 Status, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer >& xProducer )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ osl::MutexGuard aEventGuard( m_aEventSafety );
+ // bild fertig gelesen, dann nochmals neuzeichnen (async)
+ if (nEvent)
+ Application::RemoveUserEvent(nEvent);
+ nEvent = Application::PostUserEvent(LINK(this,SdrUnoControlRec,OnComplete));
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL SdrUnoControlRec::init( sal_Int32 Width, sal_Int32 Height ) throw(::com::sun::star::uno::RuntimeException)
+{
+}
+
+void SAL_CALL SdrUnoControlRec::setColorModel( sal_Int16 BitCount, const ::com::sun::star::uno::Sequence< sal_Int32 >& RGBAPal, sal_Int32 RedMask, sal_Int32 GreenMask, sal_Int32 BlueMask, sal_Int32 AlphaMask ) throw(::com::sun::star::uno::RuntimeException)
+{
+}
+
+void SAL_CALL SdrUnoControlRec::setPixelsByBytes( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, const ::com::sun::star::uno::Sequence< sal_Int8 >& aProducerData, sal_Int32 nOffset, sal_Int32 nScanSize ) throw(::com::sun::star::uno::RuntimeException)
+{
+}
+
+void SAL_CALL SdrUnoControlRec::setPixelsByLongs( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, const ::com::sun::star::uno::Sequence< sal_Int32 >& aProducerData, sal_Int32 nOffset, sal_Int32 nScanSize ) throw(::com::sun::star::uno::RuntimeException)
+{
+}
+
+//------------------------------------------------------------------------------
+void SdrUnoControlRec::Clear(BOOL bDispose)
+{
+ if (xControl.is())
+ {
+ if (IsListening())
+ StopListening();
+
+ uno::Reference< awt::XWindow > xOldWindow(xControl, uno::UNO_QUERY);
+ if (xOldWindow.is())
+ xOldWindow->removeWindowListener((awt::XWindowListener*)this);
+
+ uno::Reference< beans::XPropertySet > xSet(xControl->getModel(), uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropInfo = xSet->getPropertySetInfo();
+ if (xPropInfo.is() && xPropInfo->hasPropertyByName( rtl::OUString::createFromAscii("DefaultControl")))
+ xSet->removePropertyChangeListener( rtl::OUString::createFromAscii("DefaultControl"), this);
+ }
+
+ if (bDispose)
+ xControl->dispose();
+ xControl = NULL;
+ }
+}
+
+//------------------------------------------------------------------------------
+void SdrUnoControlRec::ReplaceControl(uno::Reference< awt::XControl > _xControl)
+{
+ uno::Reference< awt::XWindow > xWindow(_xControl, uno::UNO_QUERY);
+ if (xWindow.is())
+ {
+ uno::Reference< awt::XControlContainer > xControlContainer(xControl->getContext(), uno::UNO_QUERY);
+ _xControl->setModel(xControl->getModel());
+
+ // Feststellen, welcher Modus eingeschaltet ist
+ BOOL bDesignMode = xControl->isDesignMode();
+
+ // set the correct zoom
+ OutputDevice* pOutDev = pObj->GetOutputDevice(xControl);
+ if (pOutDev && !bDesignMode)
+ {
+ uno::Reference< awt::XView > xView(_xControl, uno::UNO_QUERY);
+ if (xView.is())
+ {
+ const MapMode& rMap = pOutDev->GetMapMode();
+ xView->setZoom((float) double(rMap.GetScaleX()),
+ (float) double(rMap.GetScaleY()));
+ }
+ }
+
+ // Groeße setzen
+ if (pOutDev && pOutDev->GetOutDevType() == OUTDEV_WINDOW)
+ {
+ Rectangle aRect(pObj->GetLogicRect());
+ Point aPixPos(pOutDev->LogicToPixel(aRect.TopLeft()));
+ Size aPixSize(pOutDev->LogicToPixel(aRect.GetSize()));
+ xWindow->setPosSize(aPixPos.X(), aPixPos.Y(), aPixSize.Width(), aPixSize.Height(), awt::PosSize::POSSIZE);
+ }
+
+ // Control wird nicht mehr benoetigt
+ // zunaechst als Listener austragen
+ Clear(TRUE);
+
+ xControlContainer->addControl(String(), _xControl);
+
+ // Designmodus erst setzen, wenn Peer bereits existiert!
+ _xControl->setDesignMode(bDesignMode);
+
+ xControl = _xControl;
+
+ // und wieder alle Listener anmelden
+ {
+ xWindow->addWindowListener((awt::XWindowListener*)this);
+
+ uno::Reference< beans::XPropertySet > xSet(xControl->getModel(), uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropInfo = xSet->getPropertySetInfo();
+ if (xPropInfo.is() && xPropInfo->hasPropertyByName( rtl::OUString::createFromAscii("DefaultControl")))
+ xSet->addPropertyChangeListener(rtl::OUString::createFromAscii("DefaultControl"), this);
+ }
+
+ // wieder lauschen falls noetig
+ if (!bVisible)
+ StartListening();
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void SdrUnoControlRec::StartListening()
+{
+ if (xControl.is())
+ {
+ uno::Reference< beans::XPropertySet > xSet(xControl->getModel(), uno::UNO_QUERY);
+ if (xSet.is())
+ xSet->addPropertyChangeListener(String(), this);
+
+ uno::Reference< form::XImageProducerSupplier > xImg(xSet, uno::UNO_QUERY);
+ if (xImg.is())
+ {
+ uno::Reference< awt::XImageProducer > xProducer = xImg->getImageProducer();
+ if (xProducer.is())
+ xProducer->addConsumer(this);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+void SdrUnoControlRec::StopListening()
+{
+ if (xControl.is())
+ {
+ uno::Reference< beans::XPropertySet > xSet(xControl->getModel(), uno::UNO_QUERY);
+ if (xSet.is())
+ xSet->removePropertyChangeListener(String(), this);
+
+ uno::Reference< form::XImageProducerSupplier > xImg(xSet, uno::UNO_QUERY);
+ if (xImg.is())
+ {
+ uno::Reference< awt::XImageProducer > xProducer = xImg->getImageProducer();
+ if (xProducer.is())
+ xProducer->removeConsumer(this);
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+IMPL_LINK(SdrUnoControlRec, OnComplete, void*, EMPTYTAG)
+{
+ {
+ ::osl::MutexGuard aDestructionGuard( m_aDestructionSafety );
+ {
+ ::osl::MutexGuard aEventGuard( m_aEventSafety );
+ if (!nEvent)
+ // our destructor deleted the event just while we we're waiting for m_aEventSafety
+ // -> get outta here
+ return 0;
+ nEvent = 0;
+ }
+ }
+
+ // Bereich neu Zeichnen
+ OutputDevice* pOut = pObj->GetOutputDevice(xControl);
+ if (pOut && pOut->GetOutDevType() == OUTDEV_WINDOW)
+ ((Window*)pOut)->Invalidate(pObj->GetBoundRect());
+
+ return 0;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+SV_IMPL_OP_PTRARR_SORT( SdrUnoControlAccessArr, SdrUnoControlAccessPtr )
+
+//------------------------------------------------------------------------
+SdrUnoControlRec* SdrUnoControlList::GetObject(USHORT i) const
+{
+ SdrUnoControlAccess* pAccess = aAccessArr[i];
+ return pAccess->pControlRec;
+}
+
+//------------------------------------------------------------------------
+void SdrUnoControlList::Clear(BOOL bDispose)
+{
+ for( USHORT i=aAccessArr.Count(); i > 0; )
+ Delete(--i, bDispose);
+
+ DBG_ASSERT(!aList.Count(), "SdrUnoControlList::Clear(BOOL bDispose): List not empty");
+}
+
+//------------------------------------------------------------------------
+void SdrUnoControlList::Insert(SdrUnoControlRec* pRec)
+{
+ aList.Insert( pRec, LIST_APPEND );
+ pRec->acquire();
+
+ SdrUnoControlAccess* pAccess = new SdrUnoControlAccess(pRec->GetControl()->getModel(), pRec);
+ aAccessArr.Insert( pAccess );
+}
+
+//------------------------------------------------------------------------
+void SdrUnoControlList::Delete(USHORT nPos, BOOL bDispose)
+{
+ SdrUnoControlAccess* pAccess = aAccessArr[nPos];
+ SdrUnoControlRec* pRec = pAccess->pControlRec;
+
+ aList.Remove( pRec );
+ aAccessArr.Remove( nPos );
+
+ // Rec laeßt alles los und wird anschließend zerstoert
+ pRec->Clear(bDispose);
+
+ pRec->release();
+ delete pAccess;
+}
+
+//------------------------------------------------------------------------
+void SdrUnoControlList::Disposing(SdrUnoControlRec* pRec)
+{
+ SdrUnoControlAccess* pAccess = NULL;
+ for (USHORT i = 0; i < aAccessArr.Count(); i++)
+ {
+ pAccess = aAccessArr[i];
+ if (pAccess->pControlRec == pRec)
+ {
+ aList.Remove( pRec );
+ aAccessArr.Remove( i );
+
+ pRec->release();
+ delete pAccess;
+ }
+ break;
+ }
+}
+
+//------------------------------------------------------------------------
+USHORT SdrUnoControlList::Find(SdrUnoControlRec* pUCR) const
+{
+ return Find( pUCR->GetControl()->getModel() );
+}
+
+//------------------------------------------------------------------------
+USHORT SdrUnoControlList::Find(uno::Reference< awt::XControl > rUnoControl) const
+{
+ return Find( rUnoControl->getModel() );
+}
+
+//------------------------------------------------------------------------
+USHORT SdrUnoControlList::Find(uno::Reference< awt::XControlModel > rUnoControlModel) const
+{
+ SdrUnoControlAccess aAccess(rUnoControlModel);
+ USHORT nPos;
+ if( !aAccessArr.Seek_Entry(&aAccess, &nPos) )
+ return SDRUNOCONTROL_NOTFOUND;
+
+ return nPos;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+void SdrPageViewWinList::Clear()
+{
+ USHORT nAnz=GetCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ delete GetObject(i);
+ }
+ aList.Clear();
+}
+
+USHORT SdrPageViewWinList::Find(OutputDevice* pOut) const
+{
+ USHORT nAnz=GetCount();
+ USHORT nRet=SDRPAGEVIEWWIN_NOTFOUND;
+ for (USHORT nNum=0; nNum<nAnz && nRet==SDRPAGEVIEWWIN_NOTFOUND; nNum++) {
+ if (GetObject(nNum)->MatchOutputDevice(pOut))
+ nRet=nNum;
+ }
+ return nRet;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+SdrPageViewWinRec::SdrPageViewWinRec(SdrView& rNewView, OutputDevice* pOut)
+: rView(rNewView),
+ pOutDev(pOut)
+{
+}
+
+SdrPageViewWinRec::~SdrPageViewWinRec()
+{
+ if (xControlContainer.is())
+ {
+ // notify derived views
+ rView.RemoveControlContainer(xControlContainer);
+
+ // clear the control place holders
+ aControlList.Clear(FALSE);
+
+ // dispose the control container
+ uno::Reference< lang::XComponent > xComponent(xControlContainer, uno::UNO_QUERY);
+ xComponent->dispose();
+ }
+}
+
+void SdrPageViewWinRec::CreateControlContainer()
+{
+ if (!xControlContainer.is())
+ {
+ if (pOutDev && pOutDev->GetOutDevType() == OUTDEV_WINDOW &&
+ !rView.IsPrintPreview())
+ {
+ Window* pWindow = (Window*) pOutDev;
+ xControlContainer = VCLUnoHelper::CreateControlContainer( pWindow );
+
+ // UnoContainerModel erzeugen
+ uno::Reference< awt::XWindow > xC(xControlContainer, uno::UNO_QUERY);
+
+ // #58917# Das Show darf nicht am VCL-Fenster landen, weil dann Assertion vom SFX
+ BOOL bVis = pWindow->IsVisible();
+ xC->setVisible(TRUE);
+ if ( !bVis )
+ pWindow->Hide();
+ }
+ else
+ {
+ // Printer und VirtualDevice, bzw. kein OutDev
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::utl::getProcessServiceFactory() );
+ if( xFactory.is() )
+ {
+ xControlContainer = uno::Reference< awt::XControlContainer >(xFactory->createInstance(rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlContainer")), uno::UNO_QUERY);
+ uno::Reference< awt::XControlModel > xModel(xFactory->createInstance(rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlContainerModel")), uno::UNO_QUERY);
+ uno::Reference< awt::XControl > xControl(xControlContainer, uno::UNO_QUERY);
+ if (xControl.is())
+ xControl->setModel(xModel);
+
+ Point aPosPix;
+ Size aSizePix;
+
+ if ( pOutDev )
+ {
+ aPosPix = pOutDev->GetMapMode().GetOrigin();
+ aSizePix = pOutDev->GetOutputSizePixel();
+ }
+
+ uno::Reference< awt::XWindow > xContComp(xControlContainer, uno::UNO_QUERY);
+ if( xContComp.is() )
+ xContComp->setPosSize(aPosPix.X(), aPosPix.Y(), aSizePix.Width(), aSizePix.Height(), awt::PosSize::POSSIZE);
+ }
+ }
+
+ rView.InsertControlContainer(xControlContainer);
+ }
+}
+
+BOOL SdrPageViewWinRec::MatchOutputDevice(OutputDevice* pOut) const
+{
+ BOOL bMatch = FALSE;
+
+ if (pOutDev == pOut)
+ {
+ bMatch = TRUE;
+ }
+
+ return (bMatch);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+DBG_NAME(SdrPageView);
+
+
+SdrPageView::SdrPageView(SdrPage* pPage1, const Point& rOffs, SdrView& rNewView):
+ rView(rNewView),
+ //aRedraw(1024,16,16),
+ aOfs(rOffs),
+ pPaintingPageObj( NULL )
+{
+ DBG_CTOR(SdrPageView,NULL);
+ pDragPoly0=new XPolyPolygon;
+ pDragPoly=new XPolyPolygon;
+ pWinList=new SdrPageViewWinList;
+ pPage=pPage1;
+ if (pPage!=NULL) {
+ aPgOrg.X()=pPage->GetLftBorder();
+ aPgOrg.Y()=pPage->GetUppBorder();
+ }
+// aOut.SetOutDev(rView.pWin);
+// aOut.SetOffset(rOffs);
+// eDrwStat=RS_READY;
+ bHasMarked=FALSE;
+ //aDragPoly.Clear();
+ aLayerVisi.SetAll();
+ aLayerPrn.SetAll();
+ bVisible=FALSE;
+
+ pAktList = NULL;
+ pAktGroup = NULL;
+ SetAktGroupAndList(NULL, pPage);
+
+ StartListening(*rNewView.GetModel());
+ USHORT nWinAnz=rNewView.GetWinCount();
+ for (USHORT nWinNum=0; nWinNum<nWinAnz; nWinNum++) {
+ AddWin(rNewView.GetWin(nWinNum));
+ }
+}
+
+
+SdrPageView::~SdrPageView()
+{
+ if (rView.GetModel()->GetPaintingPageView() == this)
+ {
+ // Abmelden
+ rView.GetModel()->SetPaintingPageView(NULL);
+ }
+
+ DBG_DTOR(SdrPageView,NULL);
+ delete pWinList;
+ delete pDragPoly0;
+ delete pDragPoly;
+}
+
+SdrPageViewWinRec* SdrPageView::ImpMakePageViewWinRec(OutputDevice* pOut)
+{
+ // MIB 3.7.08: Das WinRec muss sofort in die Liste eingetragen werden,
+ // weil sich das InsertControlContainer darauf verlaesst
+ SdrPageViewWinRec* pRec = new SdrPageViewWinRec(rView, pOut);
+ pWinList->Insert(pRec);
+
+ ULONG nObjAnz=pPage!=NULL?pPage->GetObjCount():0;
+
+ for (ULONG nObjNum=0; nObjNum<nObjAnz; nObjNum++)
+ {
+ SdrObject* pObj = pPage->GetObj(nObjNum);
+
+ if (pObj->IsUnoObj())
+ {
+ SdrUnoObj* pSdrUnoObj = PTR_CAST(SdrUnoObj, pObj);
+ ImpInsertControl(pSdrUnoObj, pRec);
+ }
+ else if (pObj->GetObjIdentifier() == OBJ_GRUP &&
+ pObj->GetObjInventor() == SdrInventor)
+ {
+ // Gruppenobjekt: sind Uno-Objekte enthalten?
+ SdrObjListIter aIter(*((SdrObjGroup*) pObj)->GetSubList(), IM_DEEPNOGROUPS);
+
+ SdrObject* pObj = NULL;
+
+ while (aIter.IsMore())
+ {
+ pObj = aIter.Next();
+
+ if (pObj && pObj->IsUnoObj())
+ {
+ SdrUnoObj* pSdrUnoObj = PTR_CAST(SdrUnoObj, pObj);
+ ImpInsertControl(pSdrUnoObj, pRec);
+ }
+ }
+ }
+ }
+ return pRec;
+}
+
+void SdrPageView::AddWin(OutputDevice* pOutDev)
+{
+ USHORT nPos = pWinList->Find(pOutDev);
+
+ if (nPos == SDRPAGEVIEWWIN_NOTFOUND)
+ SdrPageViewWinRec* pWinRec = ImpMakePageViewWinRec(pOutDev);
+}
+
+void SdrPageView::DelWin(OutputDevice* pOutDev)
+{
+ USHORT nPos=pWinList->Find(pOutDev);
+
+ if (nPos != SDRPAGEVIEWWIN_NOTFOUND)
+ {
+ pWinList->Delete(nPos);
+ }
+}
+
+void SdrPageView::ImpInsertControl(const SdrUnoObj* pSdrUnoObj,
+ SdrPageViewWinRec* pRec)
+{
+ if (pSdrUnoObj)
+ {
+ uno::Reference< awt::XControlModel > xUnoControlModel(pSdrUnoObj->GetUnoControlModel());
+ if (!xUnoControlModel.is())
+ return;
+
+ USHORT nCtrlNum = pRec->aControlList.Find(xUnoControlModel);
+ if (nCtrlNum == SDRUNOCONTROL_NOTFOUND)
+ {
+ // Control fuer die View erzeugen
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::utl::getProcessServiceFactory() );
+ uno::Reference< awt::XControl > xUnoControl;
+ if( xFactory.is() )
+ xUnoControl = uno::Reference< awt::XControl >(xFactory->createInstance(pSdrUnoObj->GetUnoControlTypeName()), uno::UNO_QUERY);
+
+ if (xUnoControl.is())
+ {
+ xUnoControl->setModel(xUnoControlModel);
+ if (pRec->pOutDev->GetOutDevType() != OUTDEV_WINDOW)
+ {
+ uno::Reference< awt::XView > xView = xUnoControl->getView();
+ if (xView.is())
+ {
+// xView->setGraphics(pRec->pOutDev->GetGraphicsInterface(TRUE));
+ }
+ }
+
+ // ControlContainer ggf. erzeugen
+ pRec->CreateControlContainer();
+
+ // xControl in ControlContainer einfuegen (Eigentuemer-Uebergang)
+ if (pRec->GetControlContainerRef().is())
+ {
+ uno::Reference< awt::XWindow > xWindow(xUnoControl, uno::UNO_QUERY);
+ if (xWindow.is())
+ {
+ Rectangle aRect(pSdrUnoObj->GetLogicRect());
+ Point aPixPos(pRec->pOutDev->LogicToPixel(aRect.TopLeft()));
+ Size aPixSize(pRec->pOutDev->LogicToPixel(aRect.GetSize()));
+ xWindow->setPosSize(aPixPos.X(), aPixPos.Y(), aPixSize.Width(), aPixSize.Height(), awt::PosSize::POSSIZE);
+ }
+
+ // set the correct zoom
+ if (!GetView().IsDesignMode())
+ {
+ uno::Reference< awt::XView > xView(xUnoControl, uno::UNO_QUERY);
+ if (xView.is())
+ {
+ const MapMode& rMap = pRec->pOutDev->GetMapMode();
+ xView->setZoom((float) double(rMap.GetScaleX()),
+ (float) double(rMap.GetScaleY()));
+ }
+ }
+
+ pRec->GetControlContainerRef()->addControl(pSdrUnoObj->GetUnoControlTypeName(), xUnoControl);
+
+ // Designmodus erst setzen, wenn Peer bereits existiert!
+ xUnoControl->setDesignMode(GetView().IsDesignMode());
+
+ SdrUnoControlRec* pUCR = new SdrUnoControlRec(&pRec->aControlList, (SdrUnoObj*)pSdrUnoObj, xUnoControl);
+ pRec->aControlList.Insert(pUCR);
+ }
+ }
+ }
+ }
+}
+
+
+void SdrPageView::ImpUnoInserted(const SdrObject* pObj)
+{
+ SdrUnoObj* pSdrUnoObj = (SdrUnoObj*)pObj;
+ USHORT nPos = pWinList->GetCount();
+
+ for (; nPos; )
+ ImpInsertControl(pSdrUnoObj, &(*pWinList)[--nPos]);
+
+}
+
+void SdrPageView::ImpUnoRemoved(const SdrObject* pObj)
+{
+ SdrUnoObj* pSdrUno=(SdrUnoObj*)pObj;
+ USHORT nPos = pWinList->GetCount();
+ for (; nPos; )
+ {
+ SdrPageViewWinRec& rPVWR=(*pWinList)[--nPos];
+ USHORT nControlPos=rPVWR.aControlList.Find(pSdrUno->GetUnoControlModel());
+
+ if (nControlPos != SDRUNOCONTROL_NOTFOUND)
+ rPVWR.aControlList.Delete(nControlPos, TRUE);
+ }
+}
+
+
+void __EXPORT SdrPageView::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ if (bVisible) {
+ SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+ if (pSdrHint!=NULL) {
+ SdrHintKind eKind=pSdrHint->GetKind();
+ const SdrObject* pObj=pSdrHint->GetObject();
+ if ( pObj!=NULL && pObj->GetPage() == pPage )
+ {
+ if (pObj->IsUnoObj())
+ {
+ if (eKind == HINT_OBJINSERTED ||
+ eKind == HINT_CONTROLINSERTED)
+ {
+ ImpUnoInserted(pObj);
+ }
+ else if (eKind == HINT_OBJREMOVED ||
+ eKind == HINT_CONTROLREMOVED)
+
+ {
+ ImpUnoRemoved(pObj);
+ }
+ }
+ else if (pObj->GetObjIdentifier() == OBJ_GRUP &&
+ pObj->GetObjInventor() == SdrInventor)
+ {
+ // Gruppenobjekt: sind Uno-Objekte enthalten?
+ SdrObjListIter aIter(*((SdrObjGroup*) pObj)->GetSubList(), IM_DEEPNOGROUPS);
+
+ SdrObject* pObj = NULL;
+
+ while (aIter.IsMore())
+ {
+ pObj = aIter.Next();
+
+ if (pObj && pObj->IsUnoObj())
+ {
+ if (eKind == HINT_OBJINSERTED ||
+ eKind == HINT_CONTROLINSERTED)
+
+ {
+ ImpUnoInserted(pObj);
+ }
+ else if (eKind == HINT_OBJREMOVED ||
+ eKind == HINT_CONTROLREMOVED)
+
+ {
+ ImpUnoRemoved(pObj);
+ }
+ }
+ }
+ }
+ }
+ if (pSdrHint->IsNeedRepaint()) {
+ if (((eKind==HINT_OBJCHG
+ || eKind==HINT_OBJINSERTED || eKind==HINT_OBJREMOVED
+ || eKind == HINT_CONTROLINSERTED || eKind == HINT_CONTROLREMOVED) &&
+ pSdrHint->GetPage()!=NULL) ||
+ eKind==HINT_PAGECHG)
+ {
+ FASTBOOL bInv=FALSE;
+ if (pSdrHint->GetPage()==pPage) bInv=TRUE;
+ else if (pSdrHint->GetPage()->IsMasterPage()) { // ebenfalls Invalidate, wenn pPage die geaenderte Page als MasterPage referenziert
+ USHORT nMaPgAnz=pPage!=NULL?pPage->GetMasterPageCount():0;
+ for (USHORT i=0; i<nMaPgAnz && !bInv; i++) {
+ const SdrPage* pMPg=pPage->GetMasterPage(i);
+ bInv=pMPg==pSdrHint->GetPage();
+ }
+ }
+ if (bInv) {
+ InvalidateAllWin(pSdrHint->GetRect(),TRUE);
+ }
+ }
+ }
+ if (eKind==HINT_OBJLISTCLEARED && pSdrHint->GetPage()==pPage) {
+ if (GetAktGroup()!=NULL) {
+ rView.UnmarkAllObj();
+ LeaveAllGroup();
+ //pWinList ...
+ }
+ }
+ }
+ }
+}
+
+
+void SdrPageView::ModelHasChanged()
+{
+ if (GetAktGroup()!=NULL) CheckAktGroup();
+}
+
+
+FASTBOOL SdrPageView::IsReadOnly() const
+{
+ return pPage==NULL || rView.GetModel()->IsReadOnly() || pPage->IsReadOnly() || GetObjList()->IsReadOnly();
+}
+
+
+void SdrPageView::Show()
+{
+ if (!bVisible) {
+ bVisible=TRUE;
+ InvalidateAllWin();
+ USHORT nWinAnz=rView.GetWinCount();
+ for (USHORT nWinNum=0; nWinNum<nWinAnz; nWinNum++) {
+ AddWin(rView.GetWin(nWinNum));
+ }
+ }
+}
+
+
+void SdrPageView::Hide()
+{
+ if (bVisible) {
+ InvalidateAllWin();
+ bVisible=FALSE;
+ pWinList->Clear();
+ }
+}
+
+
+void SdrPageView::SetOffset(const Point& rPnt)
+{
+ if (aOfs!=rPnt) {
+ if (bVisible) InvalidateAllWin();
+ aOfs=rPnt;
+ if (bVisible) InvalidateAllWin();
+ }
+}
+
+
+Rectangle SdrPageView::GetPageRect() const
+{
+ if (pPage==NULL) return Rectangle();
+ return Rectangle(GetOffset(),Size(pPage->GetWdt()+1,pPage->GetHgt()+1));
+}
+
+
+void SdrPageView::InvalidateAllWin()
+{
+ if (bVisible && pPage!=NULL) {
+ Rectangle aRect(Point(0,0),Size(pPage->GetWdt()+1,pPage->GetHgt()+1));
+ aRect.Union(pPage->GetAllObjBoundRect());
+ aRect.Move(aOfs.X(),aOfs.Y());
+ rView.InvalidateAllWin(aRect);
+ }
+}
+
+
+void SdrPageView::InvalidateAllWin(const Rectangle& rRect, FASTBOOL bPlus1Pix)
+{
+ if (bVisible) {
+ rView.InvalidateAllWin(rRect+GetOffset(),bPlus1Pix);
+ }
+}
+
+
+void SdrPageView::ImpPaintOutlinerView(OutputDevice* pOut, const Rectangle& rRect) const
+{
+ if (rView.pTextEditOutliner==NULL) return;
+ const SdrObject* pTextObjTmp=rView.GetTextEditObject();
+ const SdrTextObj* pText=PTR_CAST(SdrTextObj,pTextObjTmp);
+ FASTBOOL bTextFrame=pText!=NULL && pText->IsTextFrame();
+ ULONG nViewAnz=rView.pTextEditOutliner->GetViewCount();
+ for (ULONG i=0; i<nViewAnz; i++) {
+ OutlinerView* pOLV=rView.pTextEditOutliner->GetView(i);
+ if (pOLV->GetWindow()==pOut) {
+ rView.ImpPaintOutlinerView(*pOLV,&rRect);
+ return;
+ }
+ }
+}
+
+FASTBOOL SdrPageView::DoCachedMasterPaint(const SdrPage* pMasterPage, ExtOutputDevice& rXOut,
+ const SdrPaintInfoRec& InfoRec) const
+{
+ return DoCachedMasterPaint( pMasterPage, rXOut, InfoRec, SDR_MASTERPAGECACHE_FULL );
+}
+
+FASTBOOL SdrPageView::DoCachedMasterPaint(const SdrPage* pPg, ExtOutputDevice& rXOut,
+ const SdrPaintInfoRec& rInfoRec, ULONG nCacheMode) const
+{
+ if( pPage->GetBackgroundObj() )
+ return FALSE; // own background available
+
+ ULONG nImplPrepareMode, nImplPaintMode;
+
+ if( SDR_MASTERPAGECACHE_FULL != nCacheMode && SDR_MASTERPAGECACHE_BACKGROUND != nCacheMode )
+ {
+ DBG_ERROR( "Wrong cache mode! Assuming SDR_MASTERPAGECACHE_FULL." );
+ nCacheMode = SDR_MASTERPAGECACHE_FULL;
+ }
+
+ if( SDR_MASTERPAGECACHE_FULL == nCacheMode )
+ nImplPrepareMode = IMP_PAGEPAINT_PREPARE_CACHE, nImplPaintMode = IMP_PAGEPAINT_PAINT_CACHE;
+ else
+ nImplPrepareMode = IMP_PAGEPAINT_PREPARE_BG_CACHE, nImplPaintMode = IMP_PAGEPAINT_PAINT_BG_CACHE;
+
+#ifdef nixJOEDEBUG
+ DebWrite("SdrPageView("); DebWrite(GetStr((void*)this)); DebWrite(")::DoCachedMasterPaint(");
+ DebWrite(GetStr((void*)pPg)); DebWrite(",pWin="); DebWrite(GetStr(rXOut.GetOutDev()));
+ DebWrite("("); DebWrite(GetStr(rXOut.GetOutDev()->GetOutDevType())); DebWriteln("),...)");
+ DebIncIndent();
+ DebWrite("pWin->GetMapMode()="); DebWriteln(GetStr(rXOut.GetMapMode()));
+#endif
+
+ FASTBOOL bRet=TRUE;
+
+ OutputDevice* pWin=rXOut.GetOutDev();
+ ImpMasterBmp* pBmp=rView.pMasterBmp;;
+ const MapMode& rMap=pWin->GetMapMode();
+
+ // 1. Gucken, ob vielleicht eine passende Bmp da ist
+ FASTBOOL bCreate=pBmp==NULL;
+
+ // Seitennummer der MasterPage muss gleich sein
+ if (!bCreate)
+ bCreate=pBmp->nMasterPageNum!=pPg->GetPageNum();
+ if (!bCreate) // Scaling checken
+ bCreate=rMap.GetScaleX()!=pBmp->aMapX || rMap.GetScaleY()!=pBmp->aMapY;
+
+ // Sichtbare Layer muessen gleich sein
+ if (!bCreate)
+ bCreate=pBmp->aVisLayers!=rInfoRec.aPaintLayer;
+
+ // Der sichtbare Bereich von pPg muss innerhalb des Bereiches des VD liegen
+ Point aTopLeftTmp(rMap.GetOrigin()); aTopLeftTmp.X()=-aTopLeftTmp.X(); aTopLeftTmp.Y()=-aTopLeftTmp.Y();
+ Size aWinSize(pWin->GetOutputSize());
+ Rectangle aNeedLogRect(aTopLeftTmp,aWinSize);
+ aNeedLogRect.Right()++; aNeedLogRect.Bottom()++; // Weil Rect(Pnt,Siz) unten rechts immer eins weniger ist
+ Rectangle aPageBound(pPg->GetAllObjBoundRect()); // Nur den wirklich verwendeten Bereich der MasterPage
+ Size aPageSize(aPageBound.GetSize()); aPageSize.Width()--; aPageSize.Height()--;
+ aNeedLogRect.Intersection(aPageBound); // Nur den wirklich verwendeten Bereich der MasterPage
+
+ // Wenn die Seite vollstaendig ins Fenster passen wuerde...
+ if (aWinSize.Width()>=aPageSize.Width())
+ {
+ aNeedLogRect.Left()=aPageBound.Left();
+ aNeedLogRect.Right()=aPageBound.Right();
+ }
+
+ // Wenn die Seite vollstaendig ins Fenster passen wuerde...
+ if (aWinSize.Height()>=aPageSize.Height())
+ {
+ aNeedLogRect.Top()=aPageBound.Top();
+ aNeedLogRect.Bottom()=aPageBound.Bottom();
+ }
+ if (!bCreate)
+ bCreate=!pBmp->aLogBound.IsInside(aNeedLogRect);
+
+#ifdef nixJOEDEBUG
+ Rectangle aVisibleArea(aTopLeftTmp,aWinSize);
+ aVisibleArea.Right()++; aVisibleArea.Bottom()++; // Weil Rect(Pnt,Siz) unten rechts immer eins weniger ist
+ DEBOUT(aVisibleArea);
+ DEBOUT(aPageBound);
+ DEBOUT(aNeedLogRect);
+ DEBOUT(pBmp->aLogBound);
+#endif
+
+ // 2. Wenn keine passende Bmp da ist, dann versuchen eine zu erzeugen
+ if (bCreate)
+ {
+#ifdef nixJOEDEBUG
+ DebWriteln("*** Bitmap wird neu erzeugt ***");
+#endif
+ pPg->SwapInAll(); // Gelinkte Graphiken auf MasterPages machen sonst Probleme
+
+ if (pBmp==NULL)
+ {
+ pBmp=new ImpMasterBmp(*pWin);
+ rView.pMasterBmp=pBmp;
+ }
+ pBmp->aVD.SetClipRegion(); // ggf. gesetztes Clipping entfernen
+ pBmp->aVD.SetMapMode(rMap);
+ Size aNeedLogSize(aNeedLogRect.GetSize()); aNeedLogSize.Width()--; aNeedLogSize.Height()--;
+ Size a1Pix(pWin->PixelToLogic(Size(1,1)));
+ aNeedLogSize.Width() +=a1Pix.Width(); // 1 Pixel fuer Toleranz drauf
+ aNeedLogSize.Height()+=a1Pix.Height();
+
+#ifdef nixJOEDEBUG
+ DEBOUT(aNeedLogSize);
+#endif
+
+ // Die Wiese im Hintergrund fuer StarDraw
+#ifdef MAC
+ Color aWiesenColor( RGB_COLORDATA( 223, 223, 223 ) );
+#else
+ Color aWiesenColor( RGB_COLORDATA( 234, 234, 234 ) );
+#endif
+ pBmp->aVD.SetBackground( Wallpaper( aWiesenColor ) );
+
+ if (pBmp->aVD.SetOutputSize(aNeedLogSize,TRUE))
+ {
+ // MapMode ausrechnen und am VirtDev setzen
+ MapMode aNewMap(rMap);
+ Point aMapOrgTmp(aNeedLogRect.TopLeft());
+ aMapOrgTmp.X()=-aMapOrgTmp.X(); aMapOrgTmp.Y()=-aMapOrgTmp.Y();
+ Point aMapOrgGridTmp(aMapOrgTmp);
+ aMapOrgGridTmp-=aOfs; // Position der PageView abziehen fuer Border, Grid, ...
+ aNewMap.SetOrigin(aMapOrgGridTmp);
+ pBmp->aVD.SetMapMode(aNewMap);
+ rXOut.SetOutDev(&pBmp->aVD);
+ // Paper, Border etc. painten
+ if (rView.bPageVisible) ((SdrPageView*)this)->DrawPaper(pBmp->aVD);
+ if (rView.bBordVisible) ((SdrPageView*)this)->DrawBorder(pBmp->aVD);
+ if (rView.bGridVisible && !rView.bGridFront) ((SdrPageView*)this)->DrawGrid(pBmp->aVD);
+ if (rView.bHlplVisible && !rView.bHlplFront) ((SdrPageView*)this)->DrawHelplines(pBmp->aVD);
+
+ // DrawMode vom Window uebernehmen
+ const ULONG nOldDrawMode = pBmp->aVD.GetDrawMode();
+ pBmp->aVD.SetDrawMode( pWin->GetDrawMode() );
+
+ // und nun endlich die MasterPage
+ aNewMap.SetOrigin(aMapOrgTmp);
+ pBmp->aVD.SetMapMode(aNewMap);
+
+#ifdef nixJOEDEBUG
+ DebWrite("pBmp->aVD.SetMapMode("); DebWrite(GetStr(aNewMap)); DebWriteln(");");
+#endif
+ Point aTopLeftVDPixelLog(-aMapOrgTmp.X(),-aMapOrgTmp.Y());
+ pBmp->aVD.IntersectClipRegion(Rectangle(aTopLeftVDPixelLog,aNeedLogSize));
+ SdrPaintInfoRec aInfoRec(rInfoRec);
+ aInfoRec.aCheckRect=aNeedLogRect;
+ aInfoRec.aDirtyRect=aNeedLogRect;
+ pPg->Paint(rXOut,aInfoRec,FALSE,nImplPrepareMode);
+ pBmp->aLogBound=aNeedLogRect;
+ pBmp->nMasterPageNum=pPg->GetPageNum();
+ pBmp->aMapX=rMap.GetScaleX();
+ pBmp->aMapY=rMap.GetScaleY();
+ pBmp->aVisLayers=rInfoRec.aPaintLayer;
+ rXOut.SetOutDev(pWin);
+ // MapOrigin des VDev wieder auf 0 setzen
+ aNewMap.SetOrigin(Point());
+ pBmp->aVD.SetMapMode(aNewMap);
+ pBmp->aVD.SetClipRegion(); // ggf. gesetztes Clipping entfernen
+
+ // urspr. DrawMode wieder setzen
+ pBmp->aVD.SetDrawMode( nOldDrawMode );
+ }
+ else
+ {
+#ifdef nixJOEDEBUG
+ DebWriteln("pBmp->aVD.SetOutputSize() ging daneben");
+#endif
+ // Speicher reicht nicht
+ delete pBmp;
+ pBmp=NULL;
+ rView.pMasterBmp=NULL;
+ }
+ }
+ // 3. Bmp painten
+ if (pBmp!=NULL)
+ {
+ Size aSiz(pBmp->aVD.GetOutputSize());
+ pWin->DrawOutDev(pBmp->aLogBound.TopLeft(),aSiz,Point(),aSiz,pBmp->aVD);
+ pPg->Paint(rXOut,rInfoRec,FALSE,nImplPaintMode);
+#ifdef nixJOEDEBUG
+ DebWrite("Bitmap gepaintet: Size="); DebWrite(GetStr(aSiz));
+ DebWrite(", Position="); DebWrite(GetStr(pBmp->aLogBound.TopLeft()));
+ DebWriteln("");
+#endif
+
+ // #74982# activate plugins on master page
+ if(rInfoRec.pPV)
+ {
+ SdrView* pSdrView = (SdrView*) &rInfoRec.pPV->GetView();
+ SdrObjListIter aIter(*pPg, IM_DEEPNOGROUPS);
+
+ while(aIter.IsMore())
+ {
+ SdrObject* pObj = aIter.Next();
+
+ if(pObj && pObj->ISA(SdrOle2Obj))
+ {
+ pSdrView->DoConnect((SdrOle2Obj*)pObj);
+ }
+ }
+ }
+ }
+ else
+ bRet=FALSE; // ansonsten hat der Speicher nicht ausgereicht
+
+//#endif
+
+#ifdef nixJOEDEBUG
+ DebWrite("Returniert mit "); DebOut(bRet);
+ DebDecIndent();
+#endif
+
+ return bRet;
+}
+
+
+FASTBOOL SdrPageView::MasterShouldBeCached(const SdrPage* pPg) const
+{
+ ULONG nObjAnz=pPg->GetObjCount();
+ FASTBOOL bYes=nObjAnz>10; // bei mehr als 10 Objekten wird der Cache angeschaltet
+ for (ULONG nObjNum=0; nObjNum<nObjAnz && !bYes; nObjNum++) {
+ const SdrObject* pObj=pPg->GetObj(nObjNum);
+ if (!pObj->IsNotVisibleAsMaster()) { // z.B. TitleText und OutlineText
+ UINT32 nInv=pObj->GetObjInventor();
+ UINT16 nId=pObj->GetObjIdentifier();
+ // Bestimmte Objekttypen werden grundsaetzlich als langsam im Paint eingestuft:
+ bYes=nInv==SdrInventor &&
+ (nId==OBJ_GRUP ||
+ nId==OBJ_PATHLINE || nId==OBJ_PATHFILL || nId==OBJ_FREELINE || nId==OBJ_FREEFILL ||
+ nId==OBJ_GRAF || nId==OBJ_OLE2 || nId==OBJ_PATHPOLY || nId==OBJ_PATHPLIN);
+ // Alles was Text hat wird gecached.
+ if (!bYes) bYes=pObj->GetOutlinerParaObject()!=NULL;
+ // Nochmal auf GruppenObjekt checken
+ if (!bYes) bYes=pObj->GetSubList()!=NULL;
+ // Und nun Attribute Checken
+ if (!bYes) {
+ SfxItemSet aSet(rView.pMod->GetItemPool());
+ pObj->TakeAttributes(aSet,FALSE,FALSE);
+ XLineStyle eLineStyle=((XLineStyleItem&)(aSet.Get(XATTR_LINESTYLE))).GetValue();
+ XFillStyle eFillStyle=((XFillStyleItem&)(aSet.Get(XATTR_FILLSTYLE))).GetValue();
+ bYes=(eLineStyle!=XLINE_NONE && eLineStyle!=XLINE_SOLID) ||
+ (eFillStyle!=XFILL_NONE && eFillStyle!=XFILL_SOLID);
+#ifdef nichtmehrJOEDEBUG
+ DebWriteln("SdrPageView::MasterShouldBeCached()");
+ DebIncIndent();
+ DEBOUT(nObjNum);
+ DEBOUT(USHORT(nId));
+ DEBOUT(eLineStyle);
+ DEBOUT(eFillStyle);
+ DebDecIndent();
+#endif
+ }
+ }
+ }
+ return bYes;
+}
+
+
+void SdrPageView::InitRedraw(USHORT nWinNum, const Region& rReg, USHORT nPaintMode, const Link* pPaintProc)
+{
+ OutputDevice* pOut=rView.GetWin(nWinNum);
+ if (pOut!=NULL) InitRedraw(pOut,rReg,nPaintMode,pPaintProc);
+}
+
+
+void SdrPageView::InitRedraw(OutputDevice* pOut_, const Region& rReg, USHORT nPaintMode, const Link* pPaintProc)
+{
+ if (pPage==NULL) return;
+ USHORT nWinAnz=pOut_!=NULL ? 1 : rView.GetWinCount();
+ rView.GetModel()->SetPaintingPageView(this);
+ //SdrPageWin* pRed=GetWin(nWinNum);
+ for (USHORT nWinNum=0; nWinNum<nWinAnz; nWinNum++) {
+ OutputDevice* pOut=pOut_!=NULL ? pOut_ : rView.GetWin(nWinNum);
+ DBG_ASSERT(pOut!=NULL,"SdrPageView::InitRedraw(): pOut==NULL");
+ if (pOut==NULL) break;
+// if (pOut!=NULL /*&& pRed!=NULL*/) {
+
+ FASTBOOL bPrinter=(pOut->GetOutDevType()==OUTDEV_PRINTER);
+ const ULONG nOldDrawMode = pOut->GetDrawMode();
+
+ // DrawMode temp. zuruecksetzen
+ pOut->SetDrawMode( DRAWMODE_DEFAULT );
+
+ //pRed->bPrinter=bPrinter;
+ ExtOutputDevice* pXOut=rView.pXOut;
+ pXOut->SetOutDev(pOut);
+ //pRed->eDrwStat=SDRREDRAW_BEGIN;
+ //pRed->aDrwReg=rReg;
+ //pRed->aCheckRect=rReg.GetBoundRect();
+ FASTBOOL bDrawAll=rReg.IsEmpty();
+ Rectangle aDirtyRect(rReg.GetBoundRect());
+ Size a1PixSiz(pOut->PixelToLogic(Size(1,1)));
+ Rectangle aCheckRect(aDirtyRect);
+ aCheckRect.Left() -=a1PixSiz.Width();
+ aCheckRect.Top() -=a1PixSiz.Height();
+ aCheckRect.Right() +=a1PixSiz.Width();
+ aCheckRect.Bottom()+=a1PixSiz.Height();
+ aCheckRect-=aOfs; // Rect relativ zur PageView zum checken der Objekte
+
+ FASTBOOL bTextEdit=rView.IsTextEdit() && rView.pTextEditPV==this;
+ FASTBOOL bOnlyTextEdit=FALSE;
+ if (bTextEdit && !bDrawAll && !bPrinter && rView.IsTextEditFrame() &&
+ rView.pTextEditOutlinerView)
+ {
+ Rectangle aTmpRect(rView.pTextEditOutlinerView->GetOutputArea());
+
+ // Da nicht mehr der gesamte Hintergrund der EditArea mit einem DrawRect()
+ // vollflaechig gepainted wird, entfaellt das folgende Union()
+// aTmpRect.Union(rView.aMinTextEditArea);
+
+ aTmpRect.Left() -=2*a1PixSiz.Width();
+ aTmpRect.Top() -=2*a1PixSiz.Height();
+ aTmpRect.Right() +=2*a1PixSiz.Width();
+ aTmpRect.Bottom()+=2*a1PixSiz.Height();
+ // wenn der Invalidierte Bereich vollstaendig von der OutlinerView
+ // verdeckt wird, male ich nur die OutlinerView und sonst nix.
+ bOnlyTextEdit=aTmpRect.IsInside(aDirtyRect);
+
+ // Da nicht mehr der gesamte Hintergrund der EditArea mit einem DrawRect()
+ // vollflaechig gepainted wird, muss bOnlyTextEdit ggf. auf FALSE gesetzt werden
+ if( bOnlyTextEdit && rView.pTextEditOutliner )
+ {
+ Paragraph* p1stPara = rView.pTextEditOutliner->GetParagraph( 0 );
+ if ( !p1stPara )
+ {
+ // Kein Text vorhanden
+ bOnlyTextEdit = FALSE;
+ }
+ else
+ {
+ if ( rView.pTextEditOutliner->GetParagraphCount() == 1 )
+ {
+ // bei nur einem Para nachsehen ob da ueberhaupt was drin steht
+ XubString aStr( rView.pTextEditOutliner->GetText( p1stPara ) );
+ if ( !aStr.Len() )
+ bOnlyTextEdit = FALSE; // Kein Text vorhanden
+ }
+ }
+ }
+
+ // Funkt noch nicht:
+ //if (!bOnlyTextEdit) { // aTmpRect ggf. von aCheckRect abziehen
+ // if (aTmpRect2.Left()<=pRed->aCheckRect.Left() && aTmpRect2.Right()>=pRed->aCheckRect.Right()) {
+ // if (aTmpRect2.Top()<=pRed->aCheckRect.Top() && aTmpRect2.Bottom()>pRed->aCheckRect.Top()) {
+ // pRed->aCheckRect.Top()=aTmpRect2.Bottom();
+ // }
+ // }
+ //if (aTmpRect2.Top()<=pRed->aCheckRect.Top() && aTmpRect2.Bottom()>=pRed->aCheckRect.Bottom()) {
+ // ...
+ //}
+ //}
+ }
+#ifdef neeJOEDEBUG
+ if (bTextEdit && !bOnlyTextEdit) {
+ String aMsg("PageView::InitRedraw: bOnlyTextEdit=");
+ if (bOnlyTextEdit) aMsg+="TRUE"; else aMsg+="FALSE";
+ DebWriteln(aMsg);
+ }
+#endif
+ ImpSdrHdcMerk aHDCMerk(*pOut,SDRHDC_SAVEPENANDBRUSHANDFONT,rView.bRestoreColors);
+ FASTBOOL bColorsDirty=TRUE; // Dirty, wg. DrawPager, ...
+ if (!bOnlyTextEdit) {
+ if (!bPrinter) { // Papier, Seitenraender, Raster und Hilfslinien
+ if (rView.bPageVisible) DrawPaper(*pOut);
+ if (rView.bBordVisible) DrawBorder(*pOut);
+ if (rView.bGridVisible && !rView.bGridFront) DrawGrid(*pOut,aCheckRect);
+ if (rView.bHlplVisible && !rView.bHlplFront) DrawHelplines(*pOut);
+ }
+ }
+
+ pXOut->SetOffset(aOfs);
+
+ // eingestellten DrawMode wiederherstellen
+ pOut->SetDrawMode( nOldDrawMode );
+
+ if (!bOnlyTextEdit) {
+ SdrPaintInfoRec aInfoRec;
+ aInfoRec.pPV=this;
+ aInfoRec.bPrinter=bPrinter;
+ aInfoRec.aDirtyRect=aDirtyRect;
+ aInfoRec.aCheckRect=aCheckRect;
+ aInfoRec.pPaintProc=pPaintProc;
+ #ifdef nixJOEDEBUG
+ String aMsg("SdrPageView::InitRedraw(): "); if (pPage->IsMasterPage()) aMsg+="MasterPage "; else aMsg+="Seite ";
+ aMsg+=(pPage->GetPageNum()+1); aMsg+=" auf OutDev "; aMsg+=...nWinNum...; aMsg+=" ("; aMsg+=GetStr(pOut->GetOutDevType()); aMsg+=").";
+ DebWriteln(aMsg);
+ DebOut(*pPage);
+ #endif
+ if (bPrinter) {
+ if (rView.IsLineDraftPrn()) pXOut->SetIgnoreLineAttr(TRUE);
+ if (rView.IsFillDraftPrn()) pXOut->SetIgnoreFillAttr(TRUE);
+ if (rView.IsTextDraftPrn()) nPaintMode|=SDRPAINTMODE_DRAFTTEXT;
+ if (rView.IsGrafDraftPrn()) nPaintMode|=SDRPAINTMODE_DRAFTGRAF;
+ } else {
+ if (rView.IsLineDraft()) pXOut->SetIgnoreLineAttr(TRUE);
+ if (rView.IsFillDraft()) pXOut->SetIgnoreFillAttr(TRUE);
+ if (rView.IsTextDraft()) nPaintMode|=SDRPAINTMODE_DRAFTTEXT;
+ if (rView.IsGrafDraft()) nPaintMode|=SDRPAINTMODE_DRAFTGRAF;
+ if (rView.IsHideGrafDraft()) nPaintMode|=SDRPAINTMODE_HIDEDRAFTGRAF;
+ }
+ const SetOfByte& rPaintLayer=bPrinter ? aLayerPrn : aLayerVisi;
+
+ // erstmal alle MasterPages Painten
+ USHORT nMaPgAnz=pPage->GetMasterPageCount();
+ FASTBOOL bNeedMPagPaint=TRUE;
+ if (!bPrinter && nMaPgAnz==1 && rView.IsMasterPagePaintCaching()) { // Die MasterPage ggf. mit 'ner Bitmap malen
+ SdrPage* pMasterPage=pPage->GetMasterPage(0);
+ if (pMasterPage!=NULL && pMasterPage->GetObjCount()!=0 && MasterShouldBeCached(pMasterPage)) {
+ // Gucken, ob passende Bmp da ist. Wenn nicht, dann versuchen eine zu erzeugen. Bmp painten.
+ aInfoRec.aPaintLayer=rPaintLayer;
+ aInfoRec.aPaintLayer&=pPage->GetMasterPageVisibleLayers(0);
+ aInfoRec.nPaintMode=nPaintMode|SDRPAINTMODE_MASTERPAGE;
+ bNeedMPagPaint=!DoCachedMasterPaint(pMasterPage,*pXOut,aInfoRec,rView.GetMasterPagePaintCacheMode());
+ }
+ }
+ if (bNeedMPagPaint) {
+ USHORT nMaPgNum=0;
+ while (nMaPgNum<nMaPgAnz) {
+ SdrPage* pMasterPage=pPage->GetMasterPage(nMaPgNum);
+ if (pMasterPage!=NULL && pMasterPage->GetObjCount()!=0) {
+ aInfoRec.aPaintLayer=rPaintLayer;
+ aInfoRec.aPaintLayer&=pPage->GetMasterPageVisibleLayers(nMaPgNum);
+ aInfoRec.nPaintMode=nPaintMode|SDRPAINTMODE_MASTERPAGE;
+ pMasterPage->Paint(*pXOut,aInfoRec,rView.bRestoreColors);
+ }
+ nMaPgNum++;
+ }
+ }
+ // Und nun die eigentliche Zeichenseite Painten
+ aInfoRec.aPaintLayer=rPaintLayer;
+ aInfoRec.nPaintMode=nPaintMode;
+ if (GetObjList()!=pPage) aInfoRec.pAktList=GetObjList();
+ if (!bPrinter && rView.ImpIsGlueVisible()) {
+ aInfoRec.nPaintMode|=SDRPAINTMODE_GLUEPOINTS;
+ }
+
+ // Zeichnen
+ pPage->Paint(*pXOut,aInfoRec,rView.bRestoreColors);
+
+ pXOut->SetIgnoreLineAttr(FALSE);
+ pXOut->SetIgnoreFillAttr(FALSE);
+ pXOut->SetOffset(Point(0,0));
+
+ if (!bPrinter) { // Raster und Hilfslinien malen
+ if (rView.bGridVisible && rView.bGridFront) DrawGrid(*pOut,aCheckRect);
+ if (rView.bHlplVisible && rView.bHlplFront) DrawHelplines(*pOut);
+ }
+ }
+ if (bTextEdit) {
+ ImpPaintOutlinerView(pOut,aCheckRect);
+ bColorsDirty=TRUE;
+ }
+ //pRed->eDrwStat=SDRREDRAW_READY;
+ if (rView.bRestoreColors /*&& bColorsDirty*/) {
+ aHDCMerk.Restore(*pOut);
+ }
+ }
+
+ rView.PostPaint();
+ rView.RestartAfterPaintTimer(); // #37074#: fuer SolidHandles im LiveModus der praesentation
+}
+
+
+FASTBOOL SdrPageView::IsReady() const
+{
+ FASTBOOL bRet=TRUE;
+/* for (USHORT i=0; i<GetWinCount() && bRet; i++) {
+ if (GetWin(i)->eDrwStat!=SDRREDRAW_READY) bRet=FALSE;
+ }*/
+ return bRet;
+}
+
+
+void SdrPageView::DrawPaper(OutputDevice& rOut)
+{
+ if (pPage==NULL)
+ return;
+
+#ifdef nixJOEDEBUG
+ DebWriteln("SdrPageView::DrawPaper()");
+ DebIncIndent();
+ DebWrite("MapMode des OutDev: ");
+ DebWriteln(GetStr(rOut.GetMapMode()));
+ DebDecIndent();
+#endif
+
+ rOut.SetLineColor( Color( COL_GRAY ) );
+ rOut.SetFillColor( Color( COL_WHITE ) );
+ Rectangle aRect(GetPageRect());
+ rOut.DrawRect(aRect);
+}
+
+
+void SdrPageView::DrawBorder(OutputDevice& rOut)
+{
+ if (pPage==NULL)
+ return;
+
+ Color aGrayColor( COL_GRAY );
+ rOut.SetLineColor( aGrayColor );
+ rOut.SetFillColor();
+
+ Rectangle aRect(GetPageRect());
+ aRect.Left ()+=pPage->GetLftBorder();
+ aRect.Top ()+=pPage->GetUppBorder();
+ aRect.Right ()-=pPage->GetRgtBorder();
+ aRect.Bottom()-=pPage->GetLwrBorder();
+ rOut.DrawRect(aRect);
+
+#ifdef neinJOEDEBUG // BoundRect und SnapRect der Page sichtbar machen
+ rOut.SetFillColor();
+ Rectangle aBnd(pPage->GetAllObjBoundRect());
+ Rectangle aSnp(pPage->GetAllObjSnapRect());
+ if (!aBnd.IsEmpty()) {
+ aBnd.Move(aOfs.X(),aOfs.Y());
+ rOut.SetLineColor( Color(COL_BLUE) );
+ rOut.DrawRect(aBnd);
+ }
+ if (!aSnp.IsEmpty()) {
+ aSnp.Move(aOfs.X(),aOfs.Y());
+ rOut.SetLineCOlor( Color(COL_RED) );
+ rOut.DrawRect(aSnp);
+ }
+#endif
+}
+
+#ifdef OS2
+#define RGBCOLOR(r,g,b) ((ULONG)(((BYTE)(b) | ((USHORT)(g)<<8)) | (((ULONG)(BYTE)(r))<<16)))
+#endif
+
+
+void SdrPageView::DrawGrid(OutputDevice& rOut, const Rectangle& rRect)
+{
+ if (pPage==NULL)
+ return;
+
+ long nx1=rView.aGridBig.Width();
+ long nx2=rView.aGridFin.Width();
+ long ny1=rView.aGridBig.Height();
+ long ny2=rView.aGridFin.Height();
+
+ if (nx1==0) nx1=nx2;
+ if (nx2==0) nx2=nx1;
+ if (ny1==0) ny1=ny2;
+ if (ny2==0) ny2=ny1;
+ if (nx1==0) { nx1=ny1; nx2=ny2; }
+ if (ny1==0) { ny1=nx1; ny2=nx2; }
+ if (nx1<0) nx1=-nx1;
+ if (nx2<0) nx2=-nx2;
+ if (ny1<0) ny1=-ny1;
+ if (ny2<0) ny2=-ny2;
+
+ if (nx1!=0)
+ {
+ // no more global output size, use window size instead to decide grid sizes
+ long nScreenWdt = rOut.GetOutputSizePixel().Width();
+ // old: long nScreenWdt=System::GetDesktopRectPixel().GetWidth();
+
+ // Grid bei kleinen Zoomstufen etwas erweitern
+ //Size a1PixSiz(rOut.PixelToLogic(Size(1,1)));
+ long nMinDotPix=2;
+ long nMinLinPix=4;
+
+ if (nScreenWdt>=1600)
+ {
+ nMinDotPix=4;
+ nMinLinPix=8;
+ }
+ else if (nScreenWdt>=1024)
+ {
+ nMinDotPix=3;
+ nMinLinPix=6;
+ }
+ else
+ { // z.B. 640x480
+ nMinDotPix=2;
+ nMinLinPix=4;
+ }
+ Size aMinDotDist(rOut.PixelToLogic(Size(nMinDotPix,nMinDotPix)));
+ //Size a3PixSiz(rOut.PixelToLogic(Size(2,2)));
+ Size aMinLinDist(rOut.PixelToLogic(Size(nMinLinPix,nMinLinPix)));
+ FASTBOOL bHoriSolid=nx2<aMinDotDist.Width();
+ FASTBOOL bVertSolid=ny2<aMinDotDist.Height();
+ // Linienabstand vergroessern (mind. 4 Pixel)
+ // Vergroesserung: *2 *5 *10 *20 *50 *100 ...
+ int nTgl=0;
+ long nVal0=nx1;
+ while (nx1<aMinLinDist.Width())
+ {
+ long a=nx1;
+
+ if (nTgl==0) nx1*=2;
+ if (nTgl==1) nx1=nVal0*5; // => nx1*=2.5
+ if (nTgl==2) nx1*=2;
+
+ nVal0=a;
+ nTgl++; if (nTgl>=3) nTgl=0;
+ }
+ nTgl=0;
+ nVal0=ny1;
+ while (ny1<aMinLinDist.Height())
+ {
+ long a=ny1;
+
+ if (nTgl==0) ny1*=2;
+ if (nTgl==1) ny1=nVal0*5; // => ny1*=2.5
+ if (nTgl==2) ny1*=2;
+
+ nVal0=a;
+ nTgl++;
+
+ if (nTgl>=3) nTgl=0;
+ }
+ // Keine Zwischenpunkte, wenn...
+ //if (nx2<a2PixSiz.Width()) nx2=nx1;
+ //if (ny2<a2PixSiz.Height()) ny2=ny1;
+
+ FASTBOOL bHoriFine=nx2<nx1;
+ FASTBOOL bVertFine=ny2<ny1;
+ FASTBOOL bHoriLines=bHoriSolid || bHoriFine || !bVertFine;
+ FASTBOOL bVertLines=bVertSolid || bVertFine;
+
+ Color aCol(COL_GRAY);
+ Color aColorMerk( rOut.GetLineColor() );
+ rOut.SetLineColor( aCol );
+
+ FASTBOOL bMap0=rOut.IsMapModeEnabled();
+#ifdef WIN // SetPixel-Profiling fuer Windows
+ COLORREF aWinColRef=PALETTERGB(aCol.GetRed()>>8,aCol.GetGreen()>>8,aCol.GetBlue()>>8);
+ HDC aWinhDC=Sysdepen::GethDC(rOut);
+#endif
+#ifdef OS2 // SetPixel-Profiling fuer OS/2
+ HPS aOS2hPS=Sysdepen::GethPS(rOut);
+ LINEBUNDLE aOS2BundleMerker;
+ memset(&aOS2BundleMerker,0,sizeof(aOS2BundleMerker));
+ GpiQueryAttrs(aOS2hPS,PRIM_LINE,LBB_COLOR,&aOS2BundleMerker);
+ LINEBUNDLE aOS2Bundle;
+ memset(&aOS2Bundle,0,sizeof(aOS2Bundle));
+ aOS2Bundle.lColor=RGBCOLOR(aCol.GetRed()>>8,aCol.GetGreen()>>8,aCol.GetBlue()>>8);
+ GpiSetAttrs(aOS2hPS,PRIM_LINE,LBB_COLOR,0,&aOS2Bundle);
+ long nOS2MaxYPix=rOut.GetOutputSizePixel().Height()-1;
+#endif
+
+//#ifdef JOEDEBUG
+// aPgOrg.X()=0;
+// aPgOrg.Y()=0;
+//#endif
+
+ //Point aWriterPageOffset(pPage->GetOffset());
+ long nWrX=0;//aWriterPageOffset.X();
+ long nWrY=0;//aWriterPageOffset.Y();
+ Point aOrg(aPgOrg);
+ long xo=aOfs.X();
+ long yo=aOfs.Y();
+ long x1=pPage->GetLftBorder()+1+nWrX;
+ long x2=pPage->GetWdt()-pPage->GetRgtBorder()-1+nWrY;
+ long y1=pPage->GetUppBorder()+1+nWrX;
+ long y2=pPage->GetHgt()-pPage->GetLwrBorder()-1+nWrY;
+ const SdrPageGridFrameList* pFrames=pPage->GetGridFrameList(this,NULL);
+ USHORT nBufSiz=1024; // 4k Buffer = max. 512 Punkte
+
+#ifdef VCL
+ long* pBuf = NULL;
+#else // VCL
+ long* pBuf = new long[ nBufSiz ];
+#endif // VCL
+
+ unsigned nGridPaintAnz=1;
+ if (pFrames!=NULL) nGridPaintAnz=pFrames->GetCount();
+ for (unsigned nGridPaintNum=0; nGridPaintNum<nGridPaintAnz; nGridPaintNum++) {
+ if (pFrames!=NULL) {
+ const SdrPageGridFrame& rGF=(*pFrames)[nGridPaintNum];
+ nWrX=rGF.GetPaperRect().Left();
+ nWrY=rGF.GetPaperRect().Top();
+ x1=rGF.GetUserArea().Left();
+ x2=rGF.GetUserArea().Right();
+ y1=rGF.GetUserArea().Top();
+ y2=rGF.GetUserArea().Bottom();
+ aOrg=rGF.GetUserArea().TopLeft();
+ aOrg-=rGF.GetPaperRect().TopLeft();
+ }
+ if (!rRect.IsEmpty()) {
+ Size a1PixSiz(rOut.PixelToLogic(Size(1,1)));
+ long nX1Pix=a1PixSiz.Width(); // 1 Pixel Toleranz drauf
+ long nY1Pix=a1PixSiz.Height();
+ if (x1<rRect.Left() -nX1Pix/*-nWrX/**/) x1=rRect.Left() -nX1Pix/*-nWrX/**/;
+ if (x2>rRect.Right() +nX1Pix/*-nWrX/**/) x2=rRect.Right() +nX1Pix/*-nWrX/**/;
+ if (y1<rRect.Top() -nY1Pix/*-nWrY/**/) y1=rRect.Top() -nY1Pix/*-nWrY/**/;
+ if (y2>rRect.Bottom()+nY1Pix/*-nWrY/**/) y2=rRect.Bottom()+nY1Pix/*-nWrY/**/;
+ }
+ Point aPnt;
+
+ long xBigOrg=aOrg.X()+nWrX;
+ while (xBigOrg>=x1) xBigOrg-=nx1;
+ while (xBigOrg<x1) xBigOrg+=nx1;
+ long xFinOrg=xBigOrg;
+ while (xFinOrg>=x1) xFinOrg-=nx2;
+ while (xFinOrg<x1) xFinOrg+=nx2;
+
+ long yBigOrg=aOrg.Y()+nWrY;
+ while (yBigOrg>=y1) yBigOrg-=ny1;
+ while (yBigOrg<y1) yBigOrg+=ny1;
+ long yFinOrg=yBigOrg;
+ while (yFinOrg>=y1) yFinOrg-=ny2;
+ while (yFinOrg<y1) yFinOrg+=ny2;
+
+#ifdef VCL
+
+ // VCL hat eine DrawGrid-Methode (toll, nicht wahr!?)
+ if( x1 <= x2 && y1 <= y2 )
+ {
+ if( bHoriLines )
+ {
+ ULONG nGridFlags = ( bHoriSolid ? GRID_HORZLINES : GRID_DOTS );
+ UINT16 nSteps = nx1 / nx2;
+ UINT32 nRestPerStepMul1000 = ((nx1 * 1000L)/ nSteps) - (nx2 * 1000L);
+ UINT32 nStepOffset = 0;
+ UINT16 nPointOffset = 0;
+
+ for(UINT16 a=0;a<nSteps;a++)
+ {
+ // Zeichnen
+ rOut.DrawGrid(
+ Rectangle( xo + xFinOrg + (a * nx2) + nPointOffset, yo + yBigOrg, x2, y2 ),
+ Size( nx1, ny1 ), nGridFlags );
+
+ // Schritt machen
+ nStepOffset += nRestPerStepMul1000;
+ while(nStepOffset >= 1000)
+ {
+ nStepOffset -= 1000;
+ nPointOffset++;
+ }
+ }
+
+ // rOut.DrawGrid( Rectangle( xo + xFinOrg, yo + yBigOrg, x2, y2 ), Size( nx2, ny1 ), nGridFlags );
+ }
+
+ if( bVertLines )
+ {
+ ULONG nGridFlags = ( bVertSolid ? GRID_VERTLINES : GRID_DOTS );
+ UINT16 nSteps = ny1 / ny2;
+ UINT32 nRestPerStepMul1000 = ((ny1 * 1000L)/ nSteps) - (ny2 * 1000L);
+ UINT32 nStepOffset = 0;
+ UINT16 nPointOffset = 0;
+
+ for(UINT16 a=0;a<nSteps;a++)
+ {
+ // Zeichnen
+ rOut.DrawGrid(
+ Rectangle( xo + xBigOrg, yo + yFinOrg + (a * ny2) + nPointOffset, x2, y2 ),
+ Size( nx1, ny1 ), nGridFlags );
+
+ // Schritt machen
+ nStepOffset += nRestPerStepMul1000;
+ while(nStepOffset >= 1000)
+ {
+ nStepOffset -= 1000;
+ nPointOffset++;
+ }
+ }
+
+ // rOut.DrawGrid( Rectangle( xo + xBigOrg, yo + yFinOrg, x2, y2 ), Size( nx1, ny2 ), nGridFlags );
+ }
+ }
+
+#else // VCL
+ long nStp;
+ FASTBOOL b1st;
+ USHORT nCnt;
+ long nZw;
+ long i,j;
+
+ if (x1<=x2 && y1<=y2) {
+ if (bHoriLines) {
+ nStp=nx2;
+ nZw=ny1;
+ j=yBigOrg; b1st=TRUE;
+ while (j<y2) {
+ if (!bHoriSolid) {
+ Point aTmpPnt(0,yo+j);
+ if (rOut.IsMapModeEnabled()!=bMap0) rOut.EnableMapMode(bMap0);
+ aPnt.Y()=rOut.LogicToPixel(aTmpPnt).Y();
+ i=xFinOrg; nCnt=0;
+ while (i<x2) {
+ if (b1st || nCnt>=nBufSiz) {
+ Point aTmpPnt(xo+i,0);
+ if (rOut.IsMapModeEnabled()!=bMap0) rOut.EnableMapMode(bMap0);
+ aPnt.X()=rOut.LogicToPixel(aTmpPnt).X();
+ if (nCnt<nBufSiz) pBuf[nCnt]=aPnt.X();
+ } else aPnt.X()=pBuf[nCnt];
+#if defined WIN // SetPixel-Profiling fuer Windows
+ SetPixel(aWinhDC,(int)aPnt.X(),(int)aPnt.Y(),aWinColRef);
+#elif defined OS2 // SetPixel-Profiling fuer OS/2
+ POINTL aOS2Pt;
+ aOS2Pt.x=aPnt.X();
+ aOS2Pt.y=nOS2MaxYPix-aPnt.Y();
+ GpiSetPel(aOS2hPS,&aOS2Pt);
+#else // Optimierung fuer Mac und Unit fehlt noch !
+ if (rOut.IsMapModeEnabled()) rOut.EnableMapMode(FALSE);
+ rOut.DrawPixel(aPnt,aCol);
+#endif
+ i+=nStp;
+ nCnt++;
+ }
+ } else {
+ if (rOut.IsMapModeEnabled()!=bMap0) rOut.EnableMapMode(bMap0);
+ rOut.DrawLine(Point(xo+x1,yo+j),Point(xo+x2,yo+j));
+ }
+ b1st=FALSE; j+=nZw;
+ }
+ }
+ if (bVertLines) {
+ nStp=ny2;
+ nZw=nx1;
+ j=xBigOrg; b1st=TRUE;
+ while (j<x2) {
+ if (!bVertSolid) {
+ Point aTmpPnt(xo+j,0);
+ if (rOut.IsMapModeEnabled()!=bMap0) rOut.EnableMapMode(bMap0);
+ aPnt.X()=rOut.LogicToPixel(aTmpPnt).X();
+ i=yFinOrg; nCnt=0;
+ while (i<y2) {
+ if (b1st || nCnt>=nBufSiz) {
+ Point aTmpPnt(0,yo+i);
+ if (rOut.IsMapModeEnabled()!=bMap0) rOut.EnableMapMode(bMap0);
+ aPnt.Y()=rOut.LogicToPixel(aTmpPnt).Y();
+ if (nCnt<nBufSiz) pBuf[nCnt]=aPnt.Y();
+ } else aPnt.Y()=pBuf[nCnt];
+#if defined WIN // SetPixel-Profiling fuer Windows
+ SetPixel(aWinhDC,(int)aPnt.X(),(int)aPnt.Y(),aWinColRef);
+#elif defined OS2 // SetPixel-Profiling fuer OS/2
+ POINTL aOS2Pt;
+ aOS2Pt.x=aPnt.X();
+ aOS2Pt.y=nOS2MaxYPix-aPnt.Y();
+ GpiSetPel(aOS2hPS,&aOS2Pt);
+#else // Optimierung fuer Mac und Unit fehlt noch !
+ if (rOut.IsMapModeEnabled()) rOut.EnableMapMode(FALSE);
+ rOut.DrawPixel(aPnt,aCol);
+#endif
+ i+=nStp;
+ nCnt++;
+ }
+ } else {
+ if (rOut.IsMapModeEnabled()!=bMap0) rOut.EnableMapMode(bMap0);
+ rOut.DrawLine(Point(xo+j,yo+y1),Point(xo+j,yo+y2));
+ }
+ b1st=FALSE; j+=nZw;
+ }
+ }
+ }
+
+#endif // VCL
+
+ }
+ delete [] pBuf;
+ rOut.EnableMapMode(bMap0);
+#ifndef VCL
+ if (bHoriSolid || bVertSolid)
+#endif
+ {
+ rOut.SetLineColor(aColorMerk);
+ }
+#ifdef OS2 // SetPixel-Profiling fuer OS/2
+ // OS2-LineAttribute restaurieren
+ GpiSetAttrs(aOS2hPS,PRIM_LINE,LBB_COLOR,0,&aOS2BundleMerker);
+#endif
+ }
+}
+
+
+void SdrPageView::DrawHelplines(OutputDevice& rOut)
+{
+ aHelpLines.DrawAll(rOut,aOfs);
+}
+
+
+FASTBOOL SdrPageView::RedrawOne(USHORT nBrkEvent)
+{
+ return TRUE;
+}
+
+
+FASTBOOL SdrPageView::RedrawUntilInput(USHORT nBrkEvent)
+{
+ return TRUE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+void SdrPageView::RedrawOneLayer(SdrLayerID nId, const Rectangle& rRect, OutputDevice* pOut_, USHORT nPaintMode, const Link* pPaintProc) const
+{
+ if (pPage==NULL) return;
+ USHORT nWinAnz=pOut_!=NULL ? 1 : rView.GetWinCount();
+ if (pPage->GetObjCount()==0) return; // Liste ist leer!
+ for (USHORT nWinNum=0; nWinNum<nWinAnz; nWinNum++) {
+ OutputDevice* pOut=pOut_!=NULL ? pOut_ : rView.GetWin(nWinNum);
+ DBG_ASSERT(pOut!=NULL,"SdrPageView::InitRedraw(): pOut==NULL");
+ if (pOut==NULL) break;
+
+ FASTBOOL bPrinter=(pOut->GetOutDevType()==OUTDEV_PRINTER);
+ if (!(bPrinter?&aLayerPrn:&aLayerVisi)->IsSet(nId)) break; // der ist aber nicht druck/sichtbar!
+ ExtOutputDevice* pXOut=rView.pXOut;
+ pXOut->SetOutDev(pOut);
+
+ FASTBOOL bDrawAll=rRect.IsEmpty();
+
+ Size a1PixSiz(pOut->PixelToLogic(Size(1,1)));
+ Rectangle aCheckRect(rRect);
+ aCheckRect.Left() -=a1PixSiz.Width();
+ aCheckRect.Top() -=a1PixSiz.Height();
+ aCheckRect.Right() +=a1PixSiz.Width();
+ aCheckRect.Bottom()+=a1PixSiz.Height();
+ aCheckRect-=aOfs; // Rect relativ zur PageView zum checken der Objekte
+
+ FASTBOOL bTextEdit=rView.IsTextEdit() && rView.pTextEditPV==this;
+ FASTBOOL bOnlyTextEdit=FALSE;
+ if (bTextEdit && !bDrawAll && !bPrinter && rView.IsTextEditFrame()) {
+ Rectangle aTmpRect(rView.pTextEditOutlinerView->GetOutputArea());
+ aTmpRect.Union(rView.aMinTextEditArea);
+ //Rectangle aTmpRect(rView.aTextEditArea);
+ aTmpRect.Left() -=2*a1PixSiz.Width();
+ aTmpRect.Top() -=2*a1PixSiz.Height();
+ aTmpRect.Right() +=2*a1PixSiz.Width();
+ aTmpRect.Bottom()+=2*a1PixSiz.Height();
+ // wenn der Invalidierte Bereich vollstaendig von der OutlinerView
+ // verdeckt wird, male ich nur die OutlinerView und sonst nix.
+ bOnlyTextEdit=aTmpRect.IsInside(rRect);
+ }
+
+ ImpSdrHdcMerk aHDCMerk(*pOut,SDRHDC_SAVEPENANDBRUSHANDFONT,rView.bRestoreColors);
+ FASTBOOL bColorsDirty=FALSE;
+
+ pXOut->SetOffset(aOfs);
+ if (!bOnlyTextEdit) {
+ SdrPaintInfoRec aInfoRec;
+ aInfoRec.pPV=this;
+ aInfoRec.bPrinter=bPrinter;
+ aInfoRec.aDirtyRect=rRect;
+ aInfoRec.aCheckRect=aCheckRect;
+ aInfoRec.pPaintProc=pPaintProc;
+
+ if (bPrinter) {
+ if (rView.IsLineDraftPrn()) pXOut->SetIgnoreLineAttr(TRUE);
+ if (rView.IsFillDraftPrn()) pXOut->SetIgnoreFillAttr(TRUE);
+ if (rView.IsTextDraftPrn()) nPaintMode|=SDRPAINTMODE_DRAFTTEXT;
+ if (rView.IsGrafDraftPrn()) nPaintMode|=SDRPAINTMODE_DRAFTGRAF;
+ } else {
+ if (rView.IsLineDraft()) pXOut->SetIgnoreLineAttr(TRUE);
+ if (rView.IsFillDraft()) pXOut->SetIgnoreFillAttr(TRUE);
+ if (rView.IsTextDraft()) nPaintMode|=SDRPAINTMODE_DRAFTTEXT;
+ if (rView.IsGrafDraft()) nPaintMode|=SDRPAINTMODE_DRAFTGRAF;
+ if (rView.IsHideGrafDraft()) nPaintMode|=SDRPAINTMODE_HIDEDRAFTGRAF;
+ }
+
+ aInfoRec.aPaintLayer.ClearAll();
+ aInfoRec.aPaintLayer.Set((BYTE)nId);
+ aInfoRec.nPaintMode=nPaintMode;
+ if (GetObjList()!=pPage) aInfoRec.pAktList=GetObjList();
+ if (!bPrinter && rView.ImpIsGlueVisible()) {
+ aInfoRec.nPaintMode|=SDRPAINTMODE_GLUEPOINTS;
+ }
+
+ pPage->Paint(*pXOut,aInfoRec,rView.bRestoreColors);
+
+ pXOut->SetIgnoreLineAttr(FALSE);
+ pXOut->SetIgnoreFillAttr(FALSE);
+ pXOut->SetOffset(Point(0,0));
+ }
+ if (bTextEdit)
+ {
+ SdrObject* pObj = rView.GetTextEditObject();
+ if( pObj && pObj->GetLayer() == nId )
+ {
+ ImpPaintOutlinerView(pOut,aCheckRect);
+ bColorsDirty=TRUE;
+ }
+ }
+
+ if (rView.bRestoreColors /*&& bColorsDirty*/) {
+ aHDCMerk.Restore(*pOut);
+ }
+
+ const USHORT nWinNum1 = rView.FindWin( pOut );
+ if( nWinNum1 != SDRVIEWWIN_NOTFOUND )
+ rView.AfterInitRedraw( nWinNum1 ); // fuer SolidHandles im Writer und Calc (Joe, 13.3.1998)
+ }
+
+ // #72567# removed: rView.PostPaint();
+ rView.RestartAfterPaintTimer(); // #36496#: fuer SolidHandles im Writer und Calc
+}
+
+#ifdef alter_kram
+inline void alt() { // Func draus machen, damit joeseg nicht meckert
+ SdrObjListIter aIter(SdrObjListIter(*pPage,IM_FLAT/*IM_DEEPNOGROUPS*/));
+ while (aIter.IsMore()) {
+ SdrObject* pObj=aIter.Next();
+ FASTBOOL bPaint=FALSE;
+ if (!bPrinter || pObj->IsPrintable()) {
+ bPaint=pObj->GetSubList()!=NULL; // Gruppenobjekte berueksichtigen den Layer selbst
+ if (!bPaint) {
+ SdrLayerID nLay=pObj->GetLayer();
+ bPaint=nLay==nID;
+ }
+ }
+ if (bPaint && (rRect.IsEmpty() || pObj->GetBoundRect().IsOver(rRect))) {
+ // Farben und Clipping erst sichern, wenn noetig.
+ if (!aHDCMerk.IsSaved()) {
+ aHDCMerk.Save(*pO);
+ //pHDCMerk=new ImpMyHDCMerk(*pO,rView.bRestoreColors);
+ if (!rRect.IsEmpty()) {
+ // Kein Clipping in die Metafileaufzeichnung
+ GDIMetaFile* pMtf=pO->GetConnectMetaFile();
+ if (pMtf!=NULL && (!pMtf->IsRecord() || pMtf->IsPause())) pMtf=NULL;
+ if (pMtf!=NULL) pMtf->Pause(TRUE);
+ pO->IntersectClipRegion(rRect);
+ if (pMtf!=NULL) pMtf->Pause(FALSE);
+ }
+ }
+ if (rView.pTextEditObj==pObj && rView.pTextEditPV==this) { // TextEdit
+ aInfoRec.nPaintMode|=SDRPAINTMODE_TEXTEDIT;
+ if (pPaintProc!=NULL) {
+ SdrPaintProcRec aRec(pObj,*pXOut,aInfoRec);
+ Link aLink(*pPaintProc);
+ aLink.Call(&aRec);
+ } else {
+ pObj->Paint(*pXOut,aInfoRec);
+ }
+ aInfoRec.nPaintMode&=~SDRPAINTMODE_TEXTEDIT;
+
+ ImpPaintOutlinerView(pOut,rRect);
+ } else {
+ if (pObj->IsNeedColorRestore()/*HAS_BASE(SdrVirtObj,pObj)*/) {
+ if (bColorsDirty && rView.bRestoreColors) {
+ aHDCMerk.Restore(*pO);
+ //ImpRecoverColors(*pOut,pHDCMerk->pFarbMerk);
+ }
+ bColorsDirty=FALSE;
+ } else bColorsDirty=TRUE; // andere aendern die Farben
+ /*if (rView.pObjEdit!=NULL && pObj==rView.pObjEdit->pObj &&
+ this==rView.pObjEdit->pPV &&
+ (pO==rView.pObjEdit->pWin || rView.pObjEdit->pWin==NULL)) {
+ pObj->PaintEdit(*rView.pObjEdit,*pXOut,rRect,0);
+ } else*/ {
+ if (pPaintProc!=NULL) {
+ SdrPaintProcRec aRec(pObj,*pXOut,aInfoRec);
+ Link aLink(*pPaintProc);
+ aLink.Call(&aRec);
+ } else {
+ pObj->Paint(*pXOut,aInfoRec);
+ }
+ }
+ }
+ }
+ }
+}
+#endif alter_kram
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+void SdrPageView::AdjHdl()
+{
+ rView.AdjustMarkHdl();
+}
+
+
+void SdrPageView::SetLayer(const XubString& rName, SetOfByte& rBS, FASTBOOL bJa)
+{
+ if (pPage==NULL) return;
+ SdrLayerID nID=pPage->GetLayerAdmin().GetLayerID(rName,TRUE);
+ if (nID!=SDRLAYER_NOTFOUND) {
+ rBS.Set(nID,bJa);
+ }
+}
+
+
+FASTBOOL SdrPageView::IsLayer(const XubString& rName, const SetOfByte& rBS) const
+{
+ if(!pPage)
+ return FALSE;
+
+ BOOL bRet(FALSE);
+
+ if(rName.Len())
+ {
+ SdrLayerID nId = pPage->GetLayerAdmin().GetLayerID(rName, TRUE);
+
+ if(nId != SDRLAYER_NOTFOUND)
+ {
+ bRet = rBS.IsSet(nId);
+ }
+ }
+ return bRet;
+}
+
+
+void SdrPageView::SetAllLayers(SetOfByte& rB, FASTBOOL bJa)
+{
+ if (bJa) {
+ rB.SetAll();
+ rB.Clear(SDRLAYER_NOTFOUND);
+ } else {
+ rB.ClearAll();
+ }
+}
+
+
+void SdrPageView::ShowLayerSet(const XubString& rName, FASTBOOL bShow)
+{
+ if (pPage==NULL) return;
+ SdrLayerSet* pSet=pPage->GetLayerAdmin().GetLayerSet(rName,TRUE);
+ if (pSet!=NULL) {
+ for (USHORT i=0; i<255; i++) {
+ if (pSet->IsMember(BYTE(i))) {
+ aLayerVisi.Set(BYTE(i),bShow);
+ } else {
+ if (bShow && pSet->IsExcluded(BYTE(i))) {
+ aLayerVisi.Clear(BYTE(i));
+ }
+ }
+ }
+ }
+ if (!bShow) rView.AdjustMarkHdl();
+ InvalidateAllWin();
+}
+
+
+FASTBOOL SdrPageView::IsLayerSetVisible(const XubString& rName) const
+{
+ if (pPage==NULL) return FALSE;
+ FASTBOOL bRet=FALSE;
+ SdrLayerSet* pSet=pPage->GetLayerAdmin().GetLayerSet(rName,TRUE);
+ if (pSet!=NULL) {
+ bRet=TRUE;
+ USHORT i=0;
+ while (bRet && i<255) {
+ if (pSet->IsMember(BYTE(i))) {
+ bRet=aLayerVisi.IsSet(BYTE(i));
+ } else {
+ if (pSet->IsExcluded(BYTE(i))) {
+ bRet=!aLayerVisi.IsSet(BYTE(i));
+ }
+ }
+ i++;
+ }
+ }
+ return bRet;
+}
+
+
+FASTBOOL SdrPageView::IsObjMarkable(SdrObject* pObj) const
+{
+ if(pObj)
+ {
+ // Vom Markieren ausgeschlossen?
+ if(pObj->IsMarkProtect())
+ return FALSE;
+
+ // Der Layer muss sichtbar und darf nicht gesperrt sein
+ SdrLayerID nL = pObj->GetLayer();
+ return aLayerVisi.IsSet(BYTE(nL)) && !aLayerLock.IsSet(BYTE(nL));
+ }
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+void SdrPageView::SetPageOrigin(const Point& rOrg)
+{
+ if (rOrg!=aPgOrg) {
+ aPgOrg=rOrg;
+ if (rView.IsGridVisible()) {
+ InvalidateAllWin();
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+void SdrPageView::ImpInvalidateHelpLineArea(USHORT nNum) const
+{
+ if (rView.IsHlplVisible() && nNum<aHelpLines.GetCount()) {
+ const SdrHelpLine& rHL=aHelpLines[nNum];
+ for (USHORT i=0; i<rView.GetWinCount(); i++) {
+ OutputDevice* pOut=rView.GetWin(i);
+ if (pOut->GetOutDevType()==OUTDEV_WINDOW) {
+ Rectangle aR(rHL.GetBoundRect(*pOut));
+ Size aSiz(pOut->PixelToLogic(Size(1,1)));
+ aR.Left ()-=aSiz.Width();
+ aR.Right ()+=aSiz.Width();
+ aR.Top ()-=aSiz.Height();
+ aR.Bottom()+=aSiz.Height();
+ aR.Move(aOfs.X(),aOfs.Y());
+ rView.InvalidateOneWin(*(Window*)pOut,aR);
+ }
+ }
+ }
+}
+
+
+void SdrPageView::SetHelpLines(const SdrHelpLineList& rHLL)
+{
+ aHelpLines=rHLL;
+ InvalidateAllWin();
+}
+
+
+void SdrPageView::SetHelpLine(USHORT nNum, const SdrHelpLine& rNewHelpLine)
+{
+ if (nNum<aHelpLines.GetCount() && aHelpLines[nNum]!=rNewHelpLine) {
+ FASTBOOL bNeedRedraw=TRUE;
+ if (aHelpLines[nNum].GetKind()==rNewHelpLine.GetKind()) {
+ switch (rNewHelpLine.GetKind()) {
+ case SDRHELPLINE_VERTICAL : if (aHelpLines[nNum].GetPos().X()==rNewHelpLine.GetPos().X()) bNeedRedraw=FALSE; break;
+ case SDRHELPLINE_HORIZONTAL: if (aHelpLines[nNum].GetPos().Y()==rNewHelpLine.GetPos().Y()) bNeedRedraw=FALSE; break;
+ } // switch
+ }
+ if (bNeedRedraw) ImpInvalidateHelpLineArea(nNum);
+ aHelpLines[nNum]=rNewHelpLine;
+ if (bNeedRedraw) ImpInvalidateHelpLineArea(nNum);
+ }
+}
+
+
+void SdrPageView::DeleteHelpLine(USHORT nNum)
+{
+ if (nNum<aHelpLines.GetCount()) {
+ ImpInvalidateHelpLineArea(nNum);
+ aHelpLines.Delete(nNum);
+ }
+}
+
+
+void SdrPageView::InsertHelpLine(const SdrHelpLine& rHL, USHORT nNum)
+{
+ if (nNum>aHelpLines.GetCount()) nNum=aHelpLines.GetCount();
+ aHelpLines.Insert(rHL,nNum);
+ if (rView.IsHlplVisible()) {
+ if (rView.IsHlplFront()) {
+ // Hier optimieren ...
+ ImpInvalidateHelpLineArea(nNum);
+ } else {
+ ImpInvalidateHelpLineArea(nNum);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+// Betretene Gruppe und Liste setzen
+void SdrPageView::SetAktGroupAndList(SdrObject* pNewGroup, SdrObjList* pNewList)
+{
+ if(pAktGroup != pNewGroup)
+ {
+ pAktGroup = pNewGroup;
+ }
+ if(pAktList != pNewList)
+ {
+ pAktList = pNewList;
+ }
+}
+
+FASTBOOL SdrPageView::EnterGroup(SdrObject* pObj)
+{
+ FASTBOOL bRet=FALSE;
+ if (pObj!=NULL && pObj->IsGroupObject()) {
+ FASTBOOL bDisInvalidate=rView.pDisabledAttr!=NULL;
+ FASTBOOL bGlueInvalidate=!bDisInvalidate && rView.ImpIsGlueVisible();
+ if (bGlueInvalidate) rView.GlueInvalidate();
+
+ // deselect all
+ rView.UnmarkAll();
+
+ // set current group and list
+ SdrObjList* pNewObjList = pObj->GetSubList();
+ SetAktGroupAndList(pObj, pNewObjList);
+
+ // select contained object if only one object is contained,
+ // else select nothing and let the user decide what to do next
+ if(pNewObjList && pNewObjList->GetObjCount() == 1)
+ {
+ SdrObject* pFirstObject = pNewObjList->GetObj(0L);
+
+ for(UINT16 nv = 0; nv < rView.GetPageViewCount(); nv++)
+ rView.MarkObj(pFirstObject, rView.GetPageViewPvNum(nv));
+ }
+
+ // build new handles
+ rView.AdjustMarkHdl();
+
+ // invalidate only when view wants to visualize group entering
+ if(rView.DoVisualizeEnteredGroup())
+ InvalidateAllWin();
+
+ if (bGlueInvalidate)
+ rView.GlueInvalidate();
+ bRet=TRUE;
+ }
+ return bRet;
+}
+
+void SdrPageView::LeaveOneGroup()
+{
+ if(GetAktGroup())
+ {
+ BOOL bDisInvalidate = (rView.pDisabledAttr != NULL);
+ BOOL bGlueInvalidate = (!bDisInvalidate && rView.ImpIsGlueVisible());
+
+ if(bGlueInvalidate)
+ rView.GlueInvalidate();
+
+ SdrObject* pLastGroup = GetAktGroup();
+ SdrObject* pParentGroup = GetAktGroup()->GetUpGroup();
+ SdrObjList* pParentList = pPage;
+
+ if(pParentGroup)
+ pParentList = pParentGroup->GetSubList();
+
+ // Alles deselektieren
+ rView.UnmarkAll();
+
+ // Zuweisungen, pAktGroup und pAktList muessen gesetzt sein
+ SetAktGroupAndList(pParentGroup, pParentList);
+
+ // gerade verlassene Gruppe selektieren
+ if(pLastGroup)
+ for(UINT16 nv = 0; nv < rView.GetPageViewCount(); nv++)
+ rView.MarkObj(pLastGroup, rView.GetPageViewPvNum(nv));
+
+ rView.AdjustMarkHdl();
+
+ // invalidate only when view wants to visualize group entering
+ if(rView.DoVisualizeEnteredGroup())
+ InvalidateAllWin();
+
+ if(bGlueInvalidate)
+ rView.GlueInvalidate();
+ }
+}
+
+
+void SdrPageView::LeaveAllGroup()
+{
+ if(GetAktGroup())
+ {
+ BOOL bDisInvalidate = (rView.pDisabledAttr != NULL);
+ BOOL bGlueInvalidate = (!bDisInvalidate && rView.ImpIsGlueVisible());
+
+ if(bGlueInvalidate)
+ rView.GlueInvalidate();
+
+ SdrObject* pLastGroup = GetAktGroup();
+
+ // Alles deselektieren
+ rView.UnmarkAll();
+
+ // Zuweisungen, pAktGroup und pAktList muessen gesetzt sein
+ SetAktGroupAndList(NULL, pPage);
+
+ // Oberste letzte Gruppe finden und selektieren
+ if(pLastGroup)
+ {
+ while(pLastGroup->GetUpGroup())
+ pLastGroup = pLastGroup->GetUpGroup();
+
+ for(UINT16 nv = 0; nv < rView.GetPageViewCount(); nv++)
+ rView.MarkObj(pLastGroup, rView.GetPageViewPvNum(nv));
+ }
+
+ rView.AdjustMarkHdl();
+
+ // invalidate only when view wants to visualize group entering
+ if(rView.DoVisualizeEnteredGroup())
+ InvalidateAllWin();
+
+ if(bGlueInvalidate)
+ rView.GlueInvalidate();
+ }
+}
+
+
+USHORT SdrPageView::GetEnteredLevel() const
+{
+ USHORT nAnz=0;
+ SdrObject* pGrp=GetAktGroup();
+ while (pGrp!=NULL) {
+ nAnz++;
+ pGrp=pGrp->GetUpGroup();
+ }
+ return nAnz;
+}
+
+
+XubString SdrPageView::GetActualGroupName() const
+{
+ if(GetAktGroup())
+ {
+ XubString aStr(GetAktGroup()->GetName());
+
+ if(!aStr.Len())
+ aStr += sal_Unicode('?');
+
+ return aStr;
+ }
+ else
+ return String();
+}
+
+
+XubString SdrPageView::GetActualPathName(sal_Unicode cSep) const
+{
+ XubString aStr;
+ BOOL bNamFnd(FALSE);
+ SdrObject* pGrp = GetAktGroup();
+
+ while(pGrp)
+ {
+ XubString aStr1(pGrp->GetName());
+
+ if(!aStr1.Len())
+ aStr1 += sal_Unicode('?');
+ else
+ bNamFnd = TRUE;
+
+ aStr += aStr1;
+ pGrp = pGrp->GetUpGroup();
+
+ if(pGrp)
+ aStr += cSep;
+ }
+
+ if(!bNamFnd && GetAktGroup())
+ {
+ aStr = String();
+ aStr += sal_Unicode('(');
+ aStr += GetEnteredLevel();
+ aStr += sal_Unicode(')');
+ }
+
+ return aStr;
+}
+
+
+void SdrPageView::CheckAktGroup()
+{
+ SdrObject* pGrp=GetAktGroup();
+ while (pGrp!=NULL &&
+ (!pGrp->IsInserted() || pGrp->GetObjList()==NULL ||
+ pGrp->GetPage()==NULL || pGrp->GetModel()==NULL)) { // irgendwas daneben?
+ pGrp=pGrp->GetUpGroup();
+ }
+ if (pGrp!=GetAktGroup()) {
+ if (pGrp!=NULL) EnterGroup(pGrp);
+ else LeaveAllGroup();
+ }
+}
+
+
+SvStream& operator<<(SvStream& rOut, const SdrPageView& rPageView)
+{
+ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOPgVwID);
+ {
+ if (rPageView.pPage!=NULL) {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_PAGVIEW);
+ rOut<<BOOL(rPageView.bVisible);
+ rOut<<BOOL(rPageView.pPage->IsMasterPage());
+ rOut<<rPageView.pPage->GetPageNum();
+ rOut<<rPageView.aOfs;
+ rOut<<rPageView.aPgOrg;
+ }
+ } {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_PAGVLAYER);
+ rOut<<rPageView.aLayerVisi;
+ rOut<<rPageView.aLayerLock;
+ rOut<<rPageView.aLayerPrn;
+ } {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_PAGVHELPLINES);
+ rOut<<rPageView.aHelpLines;
+ }
+ //if (GetAktGroup()!=NULL) {
+ // // ...
+ // //rOut<<aAktGroup;
+ //}
+ return rOut;
+}
+
+
+SvStream& operator>>(SvStream& rIn, SdrPageView& rPageView)
+{
+ if (rIn.GetError()!=0) return rIn;
+ SdrIOHeader aHead(rIn,STREAM_READ);
+ while (aHead.GetBytesLeft()>0 && rIn.GetError()==0 && !rIn.IsEof()) {
+ SdrNamedSubRecord aSubRecord(rIn,STREAM_READ);
+ if (aSubRecord.GetInventor()==SdrInventor) {
+ switch (aSubRecord.GetIdentifier()) {
+ case SDRIORECNAME_PAGVIEW: {
+ BOOL bVisible;
+ BOOL bMaster;
+ USHORT nPgNum;
+ rIn>>bVisible;
+ rPageView.bVisible=bVisible;
+ rIn>>bMaster;
+ rIn>>nPgNum;
+ rIn>>rPageView.aOfs;
+ rIn>>rPageView.aPgOrg;
+ SdrModel* pMod=rPageView.GetView().GetModel();
+ if (!bMaster) rPageView.pPage=pMod->GetPage(nPgNum);
+ else rPageView.pPage=pMod->GetMasterPage(nPgNum);
+ rPageView.pAktList=rPageView.pPage;
+#ifdef JOEDEBUG
+ String aStr("Lesen der PageView fuer ");
+ if (bMaster) aStr+="Master";
+ aStr+="Page ";
+ aStr+=nPgNum+1;
+ DebWriteln(aStr);
+#endif
+ } break;
+ case SDRIORECNAME_PAGVLAYER: {
+ rIn>>rPageView.aLayerVisi;
+ rIn>>rPageView.aLayerLock;
+ rIn>>rPageView.aLayerPrn;
+#ifdef JOEDEBUG
+ DebWriteln("Lesen der Layerstati");
+#endif
+ } break;
+ case SDRIORECNAME_PAGVHELPLINES: {
+ rIn>>rPageView.aHelpLines;
+#ifdef JOEDEBUG
+ String aStr("Lesen der Hilfsliniendefinitionen (");
+ aStr+=rPageView.aHelpLines.GetCount();
+ aStr+=" Stueck)";
+ DebWriteln(aStr);
+#endif
+ } break;
+ case SDRIORECNAME_PAGVAKTGROUP: {
+ //rIn>>aAktGroup; fehlende Implementation!
+#ifdef JOEDEBUG
+ DebWriteln("Lesen der EnteredGroup - nicht implementiert");
+#endif
+ } break;
+ }
+ }
+ }
+ return rIn;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
new file mode 100644
index 0000000000..8fbd073b31
--- /dev/null
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -0,0 +1,2063 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdpntv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _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_AWT_XCONTROL_HPP_
+#include <com/sun/star/awt/XControl.hpp>
+#endif
+
+#include "svdpntv.hxx"
+#include "editdata.hxx"
+#include "svdmrkv.hxx"
+#include "svdxout.hxx"
+#include "svdpagv.hxx"
+#include "svdpage.hxx"
+#include "svdmodel.hxx"
+#include "svdvmark.hxx"
+#include "svdio.hxx"
+#include "svdundo.hxx"
+#include "svdview.hxx"
+#include "svdglue.hxx"
+#include "svdobj.hxx"
+#include "svdograf.hxx"
+#include "svdattrx.hxx"
+#include "svdibrow.hxx"
+#include "svditer.hxx"
+#include "svdouno.hxx"
+
+#ifndef _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SFXITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+
+#ifndef _B2D_MBMP_HXX
+#include <goodies/b2dmbmp.hxx>
+#endif
+
+#ifndef _B2D_MTRI_HXX
+#include <goodies/b2dmtri.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void RollingRect::DrawHor(OutputDevice& rOut, long x1, long x2, long y, BOOL bMov) const
+{
+ USHORT nLen2=nLen*2;
+ BOOL bBck=x1>x2;
+ long nOfs=nIdx;
+ if (bBck) {
+ long nTmp;
+ nTmp=x1-x2+1+nLen2+nLen;
+ nTmp%=nLen2;
+ nOfs=nLen2-nOfs+nTmp;
+ nTmp=x1; x1=x2; x2=nTmp;
+ }
+ while (nOfs>0) nOfs-=nLen2;
+ long a1,a2,a;
+ a=x1+nOfs;
+ while (a<=x2+1) {
+ a1=a;
+ a2=a+(nLen-1);
+ if (bMov) {
+ if (!bBck) a2++; else a1--;
+ if (a1>=x1 && a1<=x2) ((Window&)rOut).Invert(Rectangle(a1,y,a1,y));
+ if (a2>=x1 && a2<=x2) ((Window&)rOut).Invert(Rectangle(a2,y,a2,y));
+ } else {
+ if (a1<x1) a1=x1;
+ if (a2>x2) a2=x2;
+ if (a1<=a2) ((Window&)rOut).Invert(Rectangle(a1,y,a2,y));
+ }
+ a+=nLen2;
+ }
+}
+
+void RollingRect::DrawVer(OutputDevice& rOut, long x, long y1, long y2, BOOL bMov) const
+{
+ USHORT nLen2=nLen*2;
+ BOOL bBck=y1>y2;
+ long nOfs=nIdx;
+ if (bBck) {
+ long nTmp;
+ nTmp=y1-y2+1+nLen2+nLen;
+ nTmp%=nLen2;
+ nOfs=nLen2-nOfs+nTmp;
+ nTmp=y1; y1=y2; y2=nTmp;
+ }
+ while (nOfs>0) nOfs-=nLen2;
+ long a1,a2,a;
+ a=y1+nOfs;
+ while (a<=y2+1) {
+ a1=a;
+ a2=a+nLen-1;
+ if (bMov) {
+ if (!bBck) a2++; else a1--;
+ if (a1>=y1 && a1<=y2) ((Window&)rOut).Invert(Rectangle(x,a1,x,a1));
+ if (a2>=y1 && a2<=y2) ((Window&)rOut).Invert(Rectangle(x,a2,x,a2));
+ } else {
+ if (a1<y1) a1=y1;
+ if (a2>y2) a2=y2;
+ if (a1<=a2) ((Window&)rOut).Invert(Rectangle(x,a1,x,a2));
+ }
+ a+=nLen2;
+ }
+}
+
+void RollingRect::DrawRect(OutputDevice& rOut, BOOL bMov) const
+{
+ BOOL bMap0=rOut.IsMapModeEnabled();
+ Point aPt1(rOut.LogicToPixel(aP1));
+ Point aPt2(rOut.LogicToPixel(aP2));
+ rOut.EnableMapMode(FALSE);
+ Size aS(rOut.GetOutputSizePixel());
+ long dx=Abs(aPt2.X()-aPt1.X());
+ long dy=Abs(aPt2.Y()-aPt1.Y());
+ if (IsStripes()) {
+ DrawHor(rOut,aPt1.X(),0,aPt1.Y(),bMov);
+ DrawHor(rOut,aPt2.X(),aS.Width(),aPt1.Y(),bMov);
+ if (dy!=0) {
+ DrawHor(rOut,aPt1.X(),0,aPt2.Y(),bMov);
+ DrawHor(rOut,aPt2.X(),aS.Width(),aPt2.Y(),bMov);
+ }
+ DrawVer(rOut,aPt1.X(),aPt1.Y(),0,bMov);
+ DrawVer(rOut,aPt1.X(),aPt2.Y(),aS.Height(),bMov);
+ if (dx!=0) {
+ DrawVer(rOut,aPt2.X(),aPt1.Y(),0,bMov);
+ DrawVer(rOut,aPt2.X(),aPt2.Y(),aS.Height(),bMov);
+ }
+ } else if (IsCrossHair()) {
+ DrawHor(rOut,aPt1.X(),0,aPt1.Y(),bMov);
+ DrawHor(rOut,aPt1.X(),aS.Width(),aPt1.Y(),bMov);
+ DrawVer(rOut,aPt1.X(),aPt1.Y(),0,bMov);
+ DrawVer(rOut,aPt1.X(),aPt1.Y(),aS.Height(),bMov);
+ } else {
+ if (dx!=0) {
+ DrawHor(rOut,aPt1.X(),aPt2.X(),aPt1.Y(),bMov);
+ if (dy>0) DrawHor(rOut,aPt2.X(),aPt1.X(),aPt2.Y(),bMov);
+ }
+ if (dy!=0 || (dy==1 && dx>1)) {
+ DrawVer(rOut,aPt1.X(),aPt1.Y(),aPt2.Y(),bMov);
+ if (dx>0) DrawVer(rOut,aPt2.X(),aPt2.Y(),aPt1.Y(),bMov);
+ }
+ }
+ rOut.EnableMapMode(bMap0);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FrameAnimator::FrameAnimator(SdrView& rNewView):
+ rView(rNewView)
+{
+ aTim.SetTimeoutHdl(LINK(this,FrameAnimator,Hdl));
+ aTim.SetTimeout(50);
+ pOut=NULL;
+}
+
+void FrameAnimator::Start() const
+{
+ if (!Application::IsRemoteServer())
+ {
+ // Die Animation ist in der Remote-Version zu langsam.
+ // Daher nur in der Nicht-Remote-Version Animation starten
+ ((FrameAnimator*)this)->aTim.Start();
+ }
+}
+
+void FrameAnimator::Stop() const
+{
+ ((FrameAnimator*)this)->aTim.Stop();
+}
+
+IMPL_LINK(FrameAnimator,Hdl,AutoTimer*,pTim)
+{
+ if (rView.aDragStat.IsShown()) {
+ USHORT i=0;
+ do {
+ OutputDevice* pO=rView.pDragWin;
+ if (pO==NULL) {
+ pO=rView.GetWin(i);
+ i++;
+ }
+ if (pO!=NULL) {
+ RollIt(*pO,FALSE);
+ }
+ } while (pOut==NULL && i<rView.GetWinCount());
+ IncRollIdx();
+ }
+ return 0;
+}
+
+void FrameAnimator::Invert(OutputDevice* pNewOut) const
+{
+ USHORT i=0;
+ ((FrameAnimator*)this)->pOut=pNewOut;
+ do {
+ OutputDevice* pO=pNewOut;
+ if (pO==NULL) {
+ pO=rView.GetWin(i);
+ i++;
+ }
+ if (pO!=NULL) {
+ RollingRect::Invert(*pO);
+ }
+ } while (pOut==NULL && i<rView.GetWinCount());
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//#define TEST_IAO
+
+SdrViewWinRec::SdrViewWinRec(OutputDevice* pW)
+: pWin(pW),
+// pVDev(NULL),
+ pIAOManager(NULL),
+ bXorVisible(FALSE)
+{
+ // is it a window?
+ if(pW && pW->GetOutDevType() == OUTDEV_WINDOW)
+ {
+ // create B2dIAOManager for this window
+ pIAOManager = new B2dIAOManager((Window*)pW);
+#ifdef TEST_IAO
+ if(pIAOManager)
+ {
+ // create some demo shapes
+ B2dIAOLine* pLine;
+ B2dIAOMarker* pMarker;
+ B2dIAOBitmapObj* pBitmap;
+ B2dIAOTriangle* pTriangle;
+
+ static BOOL bCreateLines = FALSE;
+ static BOOL bCreateMarkers = FALSE;
+ static BOOL bCreateField = FALSE;
+ static BOOL bCreateSingleMarker = FALSE;
+ static BOOL bCreateBitmap = FALSE;
+ static BOOL bCreateBitmapField = FALSE;
+ static BOOL bCreateTriangle = FALSE;
+
+ if(bCreateLines)
+ {
+ pLine = new B2dIAOLine(pIAOManager, Point(5000, 5200), Point(5000, 7000));
+ pLine->SetBaseColor(Color(COL_CYAN));
+ pLine = new B2dIAOLineStriped(pIAOManager, Point(5100, 5200), Point(5100, 7000));
+ pLine->SetBaseColor(Color(COL_BLUE));
+ B2dIAOLineTwoColor* p2Line = new B2dIAOLineTwoColor(pIAOManager, Point(5200, 5200), Point(5200, 7000));
+ p2Line->SetBaseColor(Color(COL_YELLOW));
+ p2Line->Set2ndColor(Color(COL_BLACK));
+ B2dIAOLineTwoColorAnim* p3Line = new B2dIAOLineTwoColorAnim(pIAOManager, Point(5300, 5200), Point(5300, 7000));
+ p3Line->SetBaseColor(Color(COL_YELLOW));
+ p3Line->Set2ndColor(Color(COL_BLACK));
+ }
+
+ if(bCreateMarkers)
+ {
+ pMarker = new B2dIAOMarker(pIAOManager, Point(5000, 5000), B2D_IAO_MARKER_POINT);
+ pMarker->SetBaseColor(Color(COL_LIGHTRED));
+ pMarker = new B2dIAOMarker(pIAOManager, Point(5100, 5000), B2D_IAO_MARKER_PLUS);
+ pMarker->SetBaseColor(Color(COL_LIGHTGREEN));
+ pMarker = new B2dIAOMarker(pIAOManager, Point(5200, 5000), B2D_IAO_MARKER_CROSS);
+ pMarker->SetBaseColor(Color(COL_LIGHTBLUE));
+
+ pMarker = new B2dIAOMarker(pIAOManager, Point(5000, 5100), B2D_IAO_MARKER_RECT_5X5);
+ pMarker->SetBaseColor(Color(COL_LIGHTGREEN));
+ pMarker->Set2ndColor(Color(COL_BLACK));
+ pMarker = new B2dIAOMarker(pIAOManager, Point(5100, 5100), B2D_IAO_MARKER_RECT_7X7);
+ pMarker->SetBaseColor(Color(COL_LIGHTGREEN));
+ pMarker->Set2ndColor(Color(COL_BLACK));
+ pMarker = new B2dIAOMarker(pIAOManager, Point(5200, 5100), B2D_IAO_MARKER_RECT_9X9);
+ pMarker->SetBaseColor(Color(COL_LIGHTGREEN));
+ pMarker->Set2ndColor(Color(COL_BLACK));
+ }
+
+ if(bCreateField || bCreateBitmapField)
+ {
+ static UINT16 nNumX = 10;
+ static UINT16 nNumY = 10;
+ static UINT16 nStart = 2000;
+ static UINT16 nEnd = 16000;
+
+ for(UINT16 a=nStart;a<nEnd;a+=(nEnd-nStart)/nNumX)
+ {
+ for(UINT16 b=nStart;b<nEnd;b+=(nEnd-nStart)/nNumY)
+ {
+ if(bCreateField)
+ {
+ pMarker = new B2dIAOMarker(pIAOManager, Point(a, b), B2D_IAO_MARKER_RECT_7X7);
+ pMarker->SetBaseColor(Color(
+ (((a-nStart)*256L)/(nEnd-nStart)),
+ (((b-nStart)*256L)/(nEnd-nStart)),
+ 0x80));
+ pMarker->Set2ndColor(Color(COL_BLACK));
+ }
+ if(bCreateBitmapField)
+ {
+ Bitmap aBitmap(Size(10, 10), 8);
+ pBitmap = new B2dIAOBitmapObj(pIAOManager, Point(a, b), aBitmap);
+ }
+ }
+ }
+ }
+ if(bCreateSingleMarker)
+ {
+ pMarker = new B2dIAOMarker(pIAOManager, Point(5000, 5000), B2D_IAO_MARKER_RECT_7X7);
+ pMarker->SetBaseColor(Color(COL_LIGHTGREEN));
+ pMarker->Set2ndColor(Color(COL_BLACK));
+ }
+ if(bCreateBitmap)
+ {
+ Bitmap aBitmap(Size(10, 10), 8);
+ pBitmap = new B2dIAOBitmapObj(pIAOManager, Point(6000, 6000), aBitmap);
+ }
+ if(bCreateTriangle)
+ {
+ pTriangle = new B2dIAOTriangle(pIAOManager, Point(5000, 5000), Point(7000, 5000), Point(6000, 7000), Color(COL_YELLOW));
+ pLine = new B2dIAOLine(pIAOManager, pTriangle->GetBasePosition(), pTriangle->Get2ndPosition());
+ pLine = new B2dIAOLine(pIAOManager, pTriangle->Get2ndPosition(), pTriangle->Get3rdPosition());
+ pLine = new B2dIAOLine(pIAOManager, pTriangle->Get3rdPosition(), pTriangle->GetBasePosition());
+
+ pTriangle = new B2dIAOBitmapTriangle(pIAOManager, Point(8000, 5000), Point(10000, 5000), Point(9000, 7000), Color(COL_RED));
+ pLine = new B2dIAOLine(pIAOManager, pTriangle->GetBasePosition(), pTriangle->Get2ndPosition());
+ pLine = new B2dIAOLine(pIAOManager, pTriangle->Get2ndPosition(), pTriangle->Get3rdPosition());
+ pLine = new B2dIAOLine(pIAOManager, pTriangle->Get3rdPosition(), pTriangle->GetBasePosition());
+ }
+ }
+#endif
+ }
+}
+
+SdrViewWinRec::~SdrViewWinRec()
+{
+// if (pVDev!=NULL)
+// delete pVDev;
+
+ // cleanup IAOManager for this window
+ if(pIAOManager)
+ delete pIAOManager;
+ pIAOManager = NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrViewWinList::Clear()
+{
+ USHORT nAnz=GetCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ delete GetObject(i);
+ }
+ aList.Clear();
+}
+
+USHORT SdrViewWinList::Find(OutputDevice* pW) const
+{
+ USHORT nAnz=GetCount();
+ USHORT nRet=SDRVIEWWIN_NOTFOUND;
+ for (USHORT nNum=0; nNum<nAnz && nRet==SDRVIEWWIN_NOTFOUND; nNum++) {
+ if (GetObject(nNum)->pWin==pW) nRet=nNum;
+ }
+ return nRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@ @@ @@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@@ @@@@@@ @@ @@@@@@ @@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@ @@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT2(SdrPaintView,SfxListener,SfxRepeatTarget);
+
+DBG_NAME(SdrPaintView);
+
+void SdrPaintView::ImpClearVars()
+{
+ pXOut=NULL;
+ bForeignXOut=FALSE;
+ pItemBrowser=NULL;
+ bLayerSortedRedraw=FALSE;
+ bPageVisible=TRUE;
+ bBordVisible=TRUE;
+ bGridVisible=TRUE;
+ bGridFront =FALSE;
+ bHlplVisible=TRUE;
+ bHlplFront =TRUE;
+ bGlueVisible=FALSE;
+ bGlueVisible2=FALSE;
+ bGlueVisible3=FALSE;
+ bGlueVisible4=FALSE;
+ bSwapAsynchron=FALSE;
+ bPrintPreview=FALSE;
+ bLineDraft=FALSE;
+ bFillDraft=FALSE;
+ bGrafDraft=FALSE;
+ bHideGrafDraft=FALSE;
+ bTextDraft=FALSE;
+ bLineDraftPrn=FALSE;
+ bFillDraftPrn=FALSE;
+ bGrafDraftPrn=FALSE;
+ bTextDraftPrn=FALSE;
+
+ bObjectPaintIgnoresClipping=FALSE;
+
+ eAnimationMode = SDR_ANIMATION_ANIMATE;
+
+ nHitTolPix=2;
+ nMinMovPix=3;
+ nHitTolLog=0;
+ nMinMovLog=0;
+ pActualOutDev=NULL;
+
+ bSaveHiddenPages=FALSE;
+ bPageTwice=FALSE;
+ pDragWin=NULL;
+ bRestoreColors=TRUE;
+ pDisabledAttr=NULL;
+ pDefaultStyleSheet=NULL;
+ bEncircle=FALSE;
+ bSomeObjChgdFlag=FALSE;
+
+ bMasterBmp=FALSE;
+ pMasterBmp=NULL;
+ nMasterCacheMode = SDR_MASTERPAGECACHE_DEFAULT;
+
+ aComeBackTimer.SetTimeout(1);
+ aComeBackTimer.SetTimeoutHdl(LINK(this,SdrPaintView,ImpComeBackHdl));
+ aAfterPaintTimer.SetTimeout(1);
+ aAfterPaintTimer.SetTimeoutHdl(LINK(this,SdrPaintView,ImpAfterPaintHdl));
+ aUserMarkerAnimator.SetTimeout(50);
+ aUserMarkerAnimator.SetTimeoutHdl(LINK(this,SdrPaintView,ImpUserMarkerAnimatorHdl));
+
+ String aNam; // System::GetUserName() just return an empty string
+
+ if (pMod)
+ SetDefaultStyleSheet(pMod->GetDefaultStyleSheet(), TRUE);
+
+ aNam.ToUpperAscii();
+}
+
+
+SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut):
+ aPagV(1024,16,16),
+ aPagHide(1024,16,16),
+ aAni(*(SdrView*)this),
+ aDefaultAttr(pModel1->GetItemPool()),
+ aUserMarkers(1024,16,16)
+{
+ DBG_CTOR(SdrPaintView,NULL);
+ pMod=pModel1;
+ ImpClearVars();
+ if (pOut!=NULL) AddWin(pOut);
+ pXOut=new ExtOutputDevice(pOut);
+
+ // Flag zur Visualisierung von Gruppen
+ bVisualizeEnteredGroup = TRUE;
+}
+
+SdrPaintView::SdrPaintView(SdrModel* pModel1, ExtOutputDevice* pExtOut):
+ aPagV(1024,16,16),
+ aPagHide(1024,16,16),
+ aAni(*(SdrView*)this),
+ aDefaultAttr(pModel1->GetItemPool()),
+ aUserMarkers(1024,16,16)
+{
+ DBG_CTOR(SdrPaintView,NULL);
+ pMod=pModel1;
+ ImpClearVars();
+ pMod=pModel1;
+ if (pExtOut!=NULL) {
+ bForeignXOut=TRUE;
+ pXOut=pExtOut;
+ OutputDevice* pO=pXOut->GetOutDev();
+ if (pO!=NULL) AddWin(pO);
+ } else {
+ pXOut=new ExtOutputDevice(NULL);
+ }
+
+ // Flag zur Visualisierung von Gruppen
+ bVisualizeEnteredGroup = TRUE;
+}
+
+SdrPaintView::~SdrPaintView()
+{
+ DBG_DTOR(SdrPaintView,NULL);
+ aAfterPaintTimer.Stop();
+
+ ClearAll();
+ if (!bForeignXOut && pXOut!=NULL) {
+ delete pXOut;
+ }
+ if (pDisabledAttr!=NULL) {
+ delete pDisabledAttr;
+ }
+ if (pMasterBmp!=NULL) {
+ delete pMasterBmp;
+ }
+ if (pItemBrowser!=NULL) {
+ delete pItemBrowser;
+ }
+ USHORT nAnz=ImpGetUserMarkerCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ SdrViewUserMarker* pUM=ImpGetUserMarker(nNum);
+ pUM->pView=NULL; // Weil's mich gleich nichtmehr gibt.
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrPaintView::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType)
+{
+ BOOL bObjChg=!bSomeObjChgdFlag; // TRUE= auswerten fuer ComeBack-Timer
+ BOOL bMaster=pMasterBmp!=NULL; // TRUE= auswerten fuer MasterPagePaintCache
+ if (bObjChg || bMaster) {
+ SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+ if (pSdrHint!=NULL) {
+ SdrHintKind eKind=pSdrHint->GetKind();
+ if (eKind==HINT_OBJCHG || eKind==HINT_OBJINSERTED || eKind==HINT_OBJREMOVED) {
+ if (bObjChg) {
+ bSomeObjChgdFlag=TRUE;
+ aComeBackTimer.Start();
+ }
+ if (bMaster) {
+ const SdrPage* pPg=pSdrHint->GetPage();
+ if (pPg!=NULL && pPg->IsMasterPage() && pPg->GetPageNum()==pMasterBmp->GetMasterPageNum()) {
+ ReleaseMasterPagePaintCache();
+ }
+ }
+ }
+ if (eKind==HINT_PAGEORDERCHG) {
+ const SdrPage* pPg=pSdrHint->GetPage();
+ if (!pPg->IsInserted()) { // aha, Seite geloescht: also hiden
+ USHORT nAnz=GetPageViewCount();
+ USHORT nv;
+ for (nv=nAnz; nv>0;) {
+ nv--;
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (pPV->GetPage()==pPg) {
+ HidePagePvNum(nv);
+ }
+ }
+ }
+ if (bMaster) ReleaseMasterPagePaintCache();
+ }
+ if (eKind==HINT_PAGECHG) {
+ if (bMaster) ReleaseMasterPagePaintCache();
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+IMPL_LINK_INLINE_START(SdrPaintView,ImpComeBackHdl,Timer*,pTimer)
+{
+ if (bSomeObjChgdFlag) {
+ bSomeObjChgdFlag=FALSE;
+ ModelHasChanged();
+ }
+ return 0;
+}
+
+IMPL_LINK_INLINE_END(SdrPaintView,ImpComeBackHdl,Timer*,pTimer)
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+struct ImpAsyncStruct
+{
+ const SdrObject* mpObj;
+ const OutputDevice* mpOut;
+ const Rectangle maRectPix;
+
+ ImpAsyncStruct( const SdrObject* pObj, const OutputDevice* pOut ) :
+ mpObj( pObj ), mpOut( pOut ), maRectPix( pOut->LogicToPixel( pObj->GetBoundRect() ) ) {}
+};
+
+void SdrPaintView::ImpAddAsyncObj( const SdrObject* pObj, const OutputDevice* pOut )
+{
+ aAsyncPaintList.Insert( new ImpAsyncStruct( pObj, pOut ), LIST_APPEND );
+}
+
+IMPL_LINK(SdrPaintView,ImpAfterPaintHdl,Timer*,pTimer)
+{
+ while( aAsyncPaintList.Count() )
+ {
+ Rectangle aInvRect;
+ const OutputDevice* pOut = NULL;
+
+ for( void* p = aAsyncPaintList.First(); p; )
+ {
+ ImpAsyncStruct* pAsync = (ImpAsyncStruct*) p;
+ BOOL bMatch = TRUE;
+
+ if( pAsync->mpObj && pAsync->mpObj->ISA( SdrGrafObj) )
+ ( (SdrGrafObj*) pAsync->mpObj )->ForceSwapIn();
+
+ if( !pOut )
+ pOut = pAsync->mpOut;
+ else if( pOut != pAsync->mpOut )
+ bMatch = FALSE;
+
+ if( bMatch )
+ {
+ aInvRect.Union( pAsync->maRectPix );
+ delete (ImpAsyncStruct*) aAsyncPaintList.Remove();
+ p = aAsyncPaintList.GetCurObject();
+ }
+ else
+ p = aAsyncPaintList.Next();
+ }
+
+ if( OUTDEV_WINDOW == pOut->GetOutDevType() )
+ ( (Window*) pOut )->Invalidate( pOut->PixelToLogic( aInvRect ) );
+ }
+
+ ((SdrMarkView*)this)->ImpAfterPaint();
+
+ return 0;
+}
+
+void SdrPaintView::FlushComeBackTimer() const
+{
+ if (bSomeObjChgdFlag) {
+ // casting auf nonconst
+ ((SdrPaintView*)this)->ImpComeBackHdl(&((SdrPaintView*)this)->aComeBackTimer);
+ ((SdrPaintView*)this)->aComeBackTimer.Stop();
+ }
+}
+
+void SdrPaintView::ModelHasChanged()
+{
+ // Auch alle PageViews benachrichtigen
+ USHORT nv;
+ USHORT nAnz;
+ nAnz=GetPageViewCount();
+ for (nv=nAnz; nv>0;) {
+ nv--;
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (!pPV->GetPage()->IsInserted()) {
+ HidePage(pPV);
+ }
+ }
+ nAnz=GetPageViewCount();
+ for (nv=0; nv<nAnz; nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ pPV->ModelHasChanged();
+ }
+ nAnz=GetPageHideCount();
+ for (nv=0; nv<nAnz; nv++) {
+ SdrPageView* pPV=GetPageHidePvNum(nv);
+ pPV->ModelHasChanged();
+ }
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+IMPL_LINK_INLINE_START(SdrPaintView,ImpUserMarkerAnimatorHdl,AutoTimer*,pTimer)
+{
+ USHORT nAnz=ImpGetUserMarkerCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ SdrViewUserMarker* pUM=ImpGetUserMarker(nNum);
+ if (pUM->IsAnimate() && pUM->IsVisible()) pUM->DoAnimateOneStep();
+ }
+ return 0;
+}
+
+IMPL_LINK_INLINE_END(SdrPaintView,ImpUserMarkerAnimatorHdl,AutoTimer*,pTimer)
+
+void SdrPaintView::ImpInsertUserMarker(SdrViewUserMarker* pMarker)
+{
+ aUserMarkers.Insert(pMarker);
+ ImpCheckMarkerAnimator();
+}
+
+void SdrPaintView::ImpRemoveUserMarker(SdrViewUserMarker* pMarker)
+{
+ aUserMarkers.Remove(pMarker);
+ ImpCheckMarkerAnimator();
+}
+
+void SdrPaintView::ImpCheckMarkerAnimator()
+{
+ BOOL bNeed=FALSE;
+ USHORT nAnz=ImpGetUserMarkerCount();
+ for (USHORT nNum=0; nNum<nAnz && !bNeed; nNum++) {
+ SdrViewUserMarker* pUM=ImpGetUserMarker(nNum);
+ bNeed=pUM->IsAnimate();
+ }
+ if (bNeed) aUserMarkerAnimator.Start();
+ else aUserMarkerAnimator.Stop();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrPaintView::IsAction() const
+{
+ return IsEncirclement();
+}
+
+void SdrPaintView::MovAction(const Point& rPnt)
+{
+ if (IsEncirclement()) {
+ MovEncirclement(rPnt);
+ }
+}
+
+void SdrPaintView::EndAction()
+{
+ if (IsEncirclement()) EndEncirclement();
+}
+
+void SdrPaintView::BckAction()
+{
+ BrkEncirclement();
+}
+
+void SdrPaintView::BrkAction()
+{
+ BrkEncirclement();
+}
+
+void SdrPaintView::TakeActionRect(Rectangle& rRect) const
+{
+ if (IsEncirclement()) {
+ rRect=Rectangle(aDragStat.GetStart(),aDragStat.GetNow());
+ }
+}
+
+void SdrPaintView::ToggleShownXor(OutputDevice* pOut, const Region* pRegion) const
+{
+ if (IsEncirclement() && aDragStat.IsShown()) {
+ DrawEncirclement(pOut);
+ }
+ USHORT nAnz=ImpGetUserMarkerCount();
+ for (USHORT nNum=0; nNum<nAnz; nNum++) {
+ SdrViewUserMarker* pUM=ImpGetUserMarker(nNum);
+ if (pUM->IsVisible()) pUM->Draw(pOut,FALSE,!bRestoreColors); // den 3. Parameter hier noch richtig setzen !!!!!
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+USHORT SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const
+{
+ if (nMinMov>=0) return USHORT(nMinMov);
+ if (pOut==NULL) pOut=GetWin(0);
+ if (pOut!=NULL) {
+ return short(-pOut->PixelToLogic(Size(nMinMov,0)).Width());
+ } else {
+ return 0;
+ }
+}
+
+USHORT SdrPaintView::ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const
+{
+ if (nHitTol>=0) return USHORT(nHitTol);
+ if (pOut==NULL) pOut=GetWin(0);
+ if (pOut!=NULL) {
+ return short(-pOut->PixelToLogic(Size(nHitTol,0)).Width());
+ } else {
+ return 0;
+ }
+}
+
+void SdrPaintView::TheresNewMapMode()
+{
+ if (pActualOutDev!=NULL) {
+ nHitTolLog=(USHORT)((OutputDevice*)pActualOutDev)->PixelToLogic(Size(nHitTolPix,0)).Width();
+ nMinMovLog=(USHORT)((OutputDevice*)pActualOutDev)->PixelToLogic(Size(nMinMovPix,0)).Width();
+ }
+}
+
+void SdrPaintView::SetActualWin(const OutputDevice* pWin)
+{
+ pActualOutDev=pWin;
+ TheresNewMapMode();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPaintView::BegEncirclement(const Point& rPnt, OutputDevice* pOut, short nMinMov)
+{
+ BrkAction();
+ aDragStat.Reset(rPnt);
+ aDragStat.SetMinMove(ImpGetMinMovLogic(nMinMov,pOut));
+ if (nMinMov==0) aDragStat.SetMinMoved();
+ aAni.Reset();
+ aDragStat.NextPoint();
+ pDragWin=pOut;
+ bEncircle=TRUE;
+ if (aDragStat.IsMinMoved()) ShowEncirclement(pOut);
+}
+
+void SdrPaintView::MovEncirclement(const Point& rPnt)
+{
+ if (IsEncirclement()) {
+ if (aDragStat.IsMinMoved()) HideEncirclement(pDragWin);
+ aDragStat.NextMove(rPnt);
+ if (aDragStat.CheckMinMoved(rPnt)) ShowEncirclement(pDragWin);
+ }
+}
+
+Rectangle SdrPaintView::EndEncirclement(BOOL bNoJustify)
+{
+ if (IsEncirclement() && aDragStat.IsMinMoved()) {
+ HideEncirclement(pDragWin);
+ bEncircle=FALSE;
+ Rectangle aRect(aDragStat.GetStart(),aDragStat.GetNow());
+ if (!bNoJustify) aRect.Justify();
+ return aRect;
+ }
+ bEncircle=FALSE;
+ return Rectangle();
+}
+
+void SdrPaintView::BrkEncirclement()
+{
+ if (IsEncirclement()) {
+ HideEncirclement(pDragWin);
+ bEncircle=FALSE;
+ }
+}
+
+void SdrPaintView::ShowEncirclement(OutputDevice* pOut)
+{
+ if (IsEncirclement() && !aDragStat.IsShown()) {
+ DrawEncirclement(pOut);
+ aDragStat.SetShown(TRUE);
+ aAni.Start();
+ }
+}
+
+void SdrPaintView::HideEncirclement(OutputDevice* pOut)
+{
+ if (IsEncirclement() && aDragStat.IsShown()) {
+ aAni.Stop();
+ DrawEncirclement(pOut);
+ aDragStat.SetShown(FALSE);
+ }
+}
+
+void SdrPaintView::DrawEncirclement(OutputDevice* pOut) const
+{
+ if (IsEncirclement()) {
+ aAni.SetP1(aDragStat.GetStart());
+ aAni.SetP2(aDragStat.GetNow());
+ aAni.Invert(pOut);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPaintView::ShowShownXor(OutputDevice* pOut, BOOL bShow)
+{
+ USHORT nAnz=GetWinCount();
+ USHORT nw=0;
+ BOOL bWeiter=TRUE;
+ do {
+ if (pOut!=NULL) {
+ nw=aWinList.Find(pOut);
+ bWeiter=FALSE;
+ }
+ if (nw<nAnz && nw!=SDRVIEWWIN_NOTFOUND) {
+ BOOL bOn=IsShownXorVisibleWinNum(nw);
+ if (bOn!=bShow) {
+ ToggleShownXor(GetWin(nw),NULL);
+ SetShownXorVisible(nw,bShow);
+ }
+ } else bWeiter=FALSE;
+ } while (bWeiter);
+}
+
+BOOL SdrPaintView::IsShownXorVisible(OutputDevice* pOut) const
+{
+ USHORT nPos=aWinList.Find(pOut);
+ if (nPos!=SDRVIEWWIN_NOTFOUND) {
+ return IsShownXorVisibleWinNum(nPos);
+ } else {
+ return FALSE;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPaintView::ClearPageViews()
+{
+ BrkAction();
+ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ InvalidateAllWin(pPV->GetPageRect());
+ delete pPV;
+ }
+ aPagV.Clear();
+}
+
+void SdrPaintView::ClearHideViews()
+{
+ for (USHORT nh=0; nh<GetPageHideCount(); nh++) {
+ SdrPageView* pPV=GetPageHidePvNum(nh);
+ delete pPV;
+ }
+ aPagHide.Clear();
+}
+
+void SdrPaintView::Clear()
+{
+ ClearPageViews();
+ ClearHideViews();
+}
+
+void SdrPaintView::ClearAll()
+{
+ for( void* p = aAsyncPaintList.First(); p; p = aAsyncPaintList.Next() )
+ delete (ImpAsyncStruct*) p;
+
+ aAsyncPaintList.Clear();
+ ClearPageViews();
+ ClearHideViews();
+}
+
+SdrPageView* SdrPaintView::ShowPage(SdrPage* pPage, const Point& rOffs)
+{
+ SdrPageView* pPV=NULL;
+ if (pPage!=NULL) {
+ SdrPageView* pTmpPV=NULL;
+ if (!bPageTwice) pTmpPV=GetPageView(pPage); // Evtl. jede Seite nur einmal!
+ if (pTmpPV==NULL) {
+ USHORT nPos=GetHiddenPV(pPage); // War die schon mal da?
+ if (nPos<GetPageHideCount()) {
+ pPV=GetPageHidePvNum(nPos);
+ aPagHide.Remove(nPos);
+ pPV->SetOffset(rOffs);
+ } else {
+ pPV=new SdrPageView(pPage,rOffs,*((SdrView*)this));
+ }
+ if (pPV!=NULL) {
+ aPagV.Insert(pPV,CONTAINER_APPEND);
+ pPV->Show();
+ }
+ }
+ }
+ return pPV;
+}
+
+SdrPageView* SdrPaintView::ShowPagePgNum(USHORT nPgNum, const Point& rOffs)
+{
+ return ShowPage(pMod->GetPage(nPgNum),rOffs);
+}
+
+SdrPageView* SdrPaintView::ShowMasterPagePgNum(USHORT nPgNum, const Point& rOffs)
+{
+ return ShowPage(pMod->GetMasterPage(nPgNum),rOffs);
+}
+
+void SdrPaintView::HidePage(SdrPageView* pPV)
+{
+ if (pPV!=NULL) {
+ ULONG nPos=aPagV.GetPos(pPV);
+ if (nPos!=CONTAINER_ENTRY_NOTFOUND) {
+ aPagV.Remove(nPos);
+ pPV->Hide();
+ if (bSaveHiddenPages) {
+ aPagHide.Insert(pPV,CONTAINER_APPEND);
+ } else {
+ delete pPV;
+ }
+ }
+ }
+}
+
+void SdrPaintView::HidePagePgNum(USHORT nPgNum)
+{
+ HidePage(pMod->GetPage(nPgNum));
+}
+
+void SdrPaintView::HideAllPages()
+{
+ while (GetPageViewCount()>0) HidePagePvNum(0);
+}
+
+void SdrPaintView::SetPagePos(SdrPageView* pPV, const Point& rOffs)
+{
+ if (pPV!=NULL) {
+ pPV->SetOffset(rOffs);
+ }
+}
+
+void SdrPaintView::SetPagePosPgNum(USHORT nPgNum, const Point& rOffs)
+{
+ SetPagePos(pMod->GetPage(nPgNum),rOffs);
+}
+
+SdrPageView* SdrPaintView::GetPageView(const SdrPage* pPage) const
+{
+ if (pPage==NULL) return NULL;
+ BOOL bWeiter=TRUE;
+ SdrPageView* pPV=NULL;
+ for (USHORT i=0; i<GetPageViewCount() && bWeiter; i++) {
+ pPV=GetPageViewPvNum(i);
+ bWeiter=(pPV->GetPage()!=pPage);
+ }
+ if (bWeiter) return NULL;
+ else return pPV;
+}
+
+SdrPageView* SdrPaintView::GetPageViewPgNum(USHORT nPgNum) const
+{
+ return GetPageView(pMod->GetPage(nPgNum));
+}
+
+SdrPageView* SdrPaintView::GetPageView(const Point& rPnt) const
+{
+ SdrPageView* pHit=NULL;
+ SdrPageView* pBest=GetPageViewPvNum(0);
+ ULONG nBest=0xFFFFFFFF;
+
+ for (USHORT i=GetPageViewCount(); i>0 && pHit==NULL;) {
+ i--;
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ Rectangle aRect(pPV->GetPageRect());
+ if (aRect.IsInside(rPnt)) {
+ pHit=pPV;
+ pBest=pHit;
+ } else {
+ ULONG dx=0,dy=0;
+ if (rPnt.X()<aRect.Left ()) dx=ULONG(aRect.Left ()-rPnt.X());
+ if (rPnt.Y()<aRect.Top ()) dy=ULONG(aRect.Top ()-rPnt.Y());
+ if (rPnt.X()>aRect.Right ()) dx=ULONG(rPnt.X()-aRect.Left ());
+ if (rPnt.Y()>aRect.Bottom()) dy=ULONG(rPnt.Y()-aRect.Bottom());
+ ULONG nDist=dx+dy;
+ if (nDist<nBest) {
+ nBest=nDist;
+ pBest=pPV;
+ }
+ }
+ }
+ return pBest;
+}
+
+USHORT SdrPaintView::GetPageViewNum(const SdrPageView* pPV) const
+{
+ if (pPV==NULL) return 0xFFFF;
+ ULONG nNum=aPagV.GetPos(pPV);
+ if (nNum==CONTAINER_ENTRY_NOTFOUND) nNum=0xFFFF;
+ return USHORT(nNum);
+}
+
+SdrPageView* SdrPaintView::HitPage(const Point& rPnt) const
+{
+ SdrPageView* pHit=NULL;
+ for (USHORT i=GetPageViewCount(); i>0 && pHit==NULL;) {
+ i--;
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ if (pPV->GetPageRect().IsInside(rPnt)) pHit=pPV;
+ }
+ return pHit;
+}
+
+USHORT SdrPaintView::GetHiddenPV(const SdrPage* pPage) const
+{
+ BOOL bWeiter=TRUE;
+ USHORT i;
+ for (i=0; i<GetPageHideCount() && bWeiter;) {
+ SdrPageView* pPV=GetPageHidePvNum(i);
+ bWeiter=(pPV->GetPage()!=pPage);
+ if (bWeiter) i++;
+ }
+ return i;
+}
+
+USHORT SdrPaintView::GetPageHideNum(const SdrPageView* pPV) const
+{
+ if (pPV==NULL) return 0xFFFF;
+ ULONG nNum=aPagHide.GetPos(pPV);
+ if (nNum==CONTAINER_ENTRY_NOTFOUND) nNum=0xFFFF;
+ return USHORT(nNum);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPaintView::AddWin(OutputDevice* pWin1)
+{
+ SdrViewWinRec* pWinRec=new SdrViewWinRec(pWin1);
+ pWinRec->bXorVisible=TRUE; // Normalerweise ist Xor nicht unterdrueckt
+ aWinList.Insert(pWinRec);
+ for (USHORT i=0; i<GetPageViewCount(); i++) {
+ GetPageViewPvNum(i)->AddWin(pWin1);
+ }
+ if (pItemBrowser!=NULL) pItemBrowser->ForceParent();
+}
+
+void SdrPaintView::DelWin(OutputDevice* pWin1)
+{
+ USHORT nPos=aWinList.Find(pWin1);
+ if (nPos!=SDRVIEWWIN_NOTFOUND) {
+ for (USHORT i=0; i<GetPageViewCount(); i++) {
+ GetPageViewPvNum(i)->DelWin(pWin1);
+ }
+ aWinList.Delete(nPos);
+ }
+ if (pItemBrowser!=NULL) pItemBrowser->ForceParent();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TRISTATE SdrPaintView::IsLayerSetVisible(const XubString& rName) const
+{
+ TRISTATE nRet=FALSE;
+ USHORT i=0;
+ BOOL b1st=TRUE;
+ while (i<GetPageViewCount() && nRet!=FUZZY) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ BOOL bOn=pPV->IsLayerSetVisible(rName);
+ if (b1st) {
+ nRet=bOn;
+ b1st=FALSE;
+ } else {
+ if (nRet!=bOn) nRet=FUZZY;
+ }
+ i++;
+ }
+ return nRet;
+}
+
+void SdrPaintView::ShowLayerSet(const XubString& rName, BOOL bShow)
+{
+ USHORT i;
+ for (i=0; i<GetPageViewCount(); i++) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ pPV->ShowLayerSet(rName,bShow);
+ }
+ InvalidateAllWin();
+}
+
+void SdrPaintView::SetLayerVisible(const XubString& rName, BOOL bShow)
+{
+ USHORT i;
+ for (i=0; i<GetPageViewCount(); i++) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ pPV->SetLayerVisible(rName,bShow);
+ }
+ InvalidateAllWin();
+}
+
+TRISTATE SdrPaintView::IsLayerVisible(const XubString& rName) const
+{
+ TRISTATE nRet=FALSE;
+ USHORT i=0;
+ BOOL b1st=TRUE;
+ while (i<GetPageViewCount() && nRet!=FUZZY) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ BOOL bOn=pPV->IsLayerVisible(rName);
+ if (b1st) {
+ nRet=bOn;
+ b1st=FALSE;
+ } else {
+ if (nRet!=bOn) nRet=FUZZY;
+ }
+ i++;
+ }
+ return nRet;
+}
+
+void SdrPaintView::SetAllLayersVisible(BOOL bShow)
+{
+ USHORT i;
+ for (i=0; i<GetPageViewCount(); i++) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ pPV->SetAllLayersVisible(bShow);
+ }
+ InvalidateAllWin();
+}
+
+void SdrPaintView::SetLayerLocked(const XubString& rName, BOOL bLock)
+{
+ USHORT i;
+ for (i=0; i<GetPageViewCount(); i++) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ pPV->SetLayerLocked(rName,bLock);
+ }
+}
+
+TRISTATE SdrPaintView::IsLayerLocked(const XubString& rName) const
+{
+ TRISTATE nRet=FALSE;
+ USHORT i=0;
+ BOOL b1st=TRUE;
+ while (i<GetPageViewCount() && nRet!=FUZZY) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ BOOL bLock=pPV->IsLayerLocked(rName);
+ if (b1st) {
+ nRet=bLock;
+ b1st=FALSE;
+ } else {
+ if (nRet!=bLock) nRet=FUZZY;
+ }
+ i++;
+ }
+ return nRet;
+}
+
+void SdrPaintView::SetAllLayersLocked(BOOL bLock)
+{
+ USHORT i;
+ for (i=0; i<GetPageViewCount(); i++) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ pPV->SetAllLayersLocked(bLock);
+ }
+}
+
+void SdrPaintView::SetLayerPrintable(const XubString& rName, BOOL bPrn)
+{
+ USHORT i;
+ for (i=0; i<GetPageViewCount(); i++) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ pPV->SetLayerPrintable(rName,bPrn);
+ }
+}
+
+TRISTATE SdrPaintView::IsLayerPrintable(const XubString& rName) const
+{
+ TRISTATE nRet=FALSE;
+ USHORT i=0;
+ BOOL b1st=TRUE;
+ while (i<GetPageViewCount() && nRet!=FUZZY) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ BOOL bPrn=pPV->IsLayerPrintable(rName);
+ if (b1st) {
+ nRet=bPrn;
+ b1st=FALSE;
+ } else {
+ if (nRet!=bPrn) nRet=FUZZY;
+ }
+ i++;
+ }
+ return nRet;
+}
+
+void SdrPaintView::SetAllLayersPrintable(BOOL bPrn)
+{
+ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ pPV->SetAllLayersPrintable(bPrn);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPaintView::InitRedraw(OutputDevice* pOut, const Region& rReg, USHORT nPaintMode)
+{
+ for (USHORT i=0; i<GetPageViewCount(); i++) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ pPV->InitRedraw(pOut,rReg,nPaintMode,NULL);
+ }
+ USHORT nWinNum=aWinList.Find(pOut);
+ if (nWinNum!=SDRVIEWWIN_NOTFOUND) {
+ ((SdrMarkView*)this)->AfterInitRedraw(nWinNum);
+ if (IsShownXorVisibleWinNum(nWinNum)) { // Durch Invalidate zerstoerte Handles wiederherstellen
+ OutputDevice* pOut=GetWin(nWinNum);
+ if (pOut!=NULL && pOut->GetOutDevType()!=OUTDEV_PRINTER) {
+ ToggleShownXor(pOut,&rReg);
+ }
+ }
+ }
+
+ RestartAfterPaintTimer();
+}
+
+B2dIAOManager* SdrPaintView::GetIAOManager(OutputDevice* pOut)
+{
+ UINT16 nWinIndex = aWinList.Find(pOut);
+ if(nWinIndex != SDRVIEWWIN_NOTFOUND)
+ {
+ if(aWinList[nWinIndex].pIAOManager)
+ {
+ return aWinList[nWinIndex].pIAOManager;
+ }
+ }
+ return NULL;
+}
+
+B2dIAOManager* SdrPaintView::GetFirstIAOManager()
+{
+ if(aWinList.GetCount())
+ {
+ if(aWinList[0].pIAOManager)
+ {
+ return aWinList[0].pIAOManager;
+ }
+ }
+ return NULL;
+}
+
+void SdrPaintView::RefreshAllIAOManagers()
+{
+ for(UINT16 a=0;a<aWinList.GetCount();a++)
+ {
+ if(aWinList[a].pIAOManager)
+ {
+ aWinList[a].pIAOManager->UpdateDisplay();
+ }
+ }
+}
+
+#ifdef TEST_IAO
+static UINT16 nStepWidthForMove = 100;
+static UINT32 nDirectObjectNum = 0L;
+static UINT32 nInsertXPos = 4000;
+static UINT32 nInsertYPos = 4000;
+static UINT32 nInsertIncrement = 100;
+#endif
+
+BOOL SdrPaintView::KeyInput(const KeyEvent& rKEvt, Window* pWin)
+{
+#ifdef TEST_IAO
+ B2dIAOManager* pIAOManager = NULL;
+ if(aWinList.GetCount() && aWinList[0].pIAOManager)
+ pIAOManager = aWinList[0].pIAOManager;
+
+ if(pIAOManager)
+ {
+ switch(rKEvt.GetCharCode())
+ {
+ case '1' : // On/Off
+ {
+ pIAOManager->SetVisible(!pIAOManager->IsVisible());
+ break;
+ }
+ case 'a':
+ case 's':
+ case 'w':
+ case 'y': // move all
+ {
+ Vector2D aMove;
+
+ if(rKEvt.GetCharCode() == 'a') aMove.X() -= (double)nStepWidthForMove;
+ if(rKEvt.GetCharCode() == 's') aMove.X() += (double)nStepWidthForMove;
+ if(rKEvt.GetCharCode() == 'w') aMove.Y() -= (double)nStepWidthForMove;
+ if(rKEvt.GetCharCode() == 'y') aMove.Y() += (double)nStepWidthForMove;
+
+ Matrix3D aTrans;
+ aTrans.Translate(aMove);
+ pIAOManager->Transform(aTrans);
+ break;
+ }
+ case '3':
+ {
+ nDirectObjectNum++;
+ if(nDirectObjectNum >= pIAOManager->GetIAOCount())
+ nDirectObjectNum = 0L;
+ break;
+ }
+ case '2':
+ {
+ if(nDirectObjectNum)
+ nDirectObjectNum--;
+ else
+ nDirectObjectNum = pIAOManager->GetIAOCount()-1;
+ break;
+ }
+ case '4':
+ {
+ B2dIAObject* pAct = pIAOManager->GetIAObject(nDirectObjectNum);
+ if(pAct)
+ {
+ delete pAct;
+ }
+ break;
+ }
+ case '5':
+ {
+ B2dIAOMarker* pMarker = new B2dIAOMarker(pIAOManager, Point(nInsertXPos, nInsertYPos), B2D_IAO_MARKER_RECT_7X7);
+ nInsertXPos += nInsertIncrement;
+ nInsertYPos += nInsertIncrement;
+ pMarker->SetBaseColor(Color(COL_YELLOW));
+ pMarker->Set2ndColor(Color(COL_BLACK));
+ break;
+ }
+ case 'd':
+ case 'f':
+ case 'r':
+ case 'c': // move
+ {
+ Vector2D aMove;
+
+ if(rKEvt.GetCharCode() == 'd') aMove.X() -= (double)nStepWidthForMove;
+ if(rKEvt.GetCharCode() == 'f') aMove.X() += (double)nStepWidthForMove;
+ if(rKEvt.GetCharCode() == 'r') aMove.Y() -= (double)nStepWidthForMove;
+ if(rKEvt.GetCharCode() == 'c') aMove.Y() += (double)nStepWidthForMove;
+
+ Matrix3D aTrans;
+ aTrans.Translate(aMove);
+
+ B2dIAObject* pAct = pIAOManager->GetIAObject(nDirectObjectNum);
+ if(pAct)
+ pAct->Transform(aTrans);
+ break;
+ }
+ case 't':
+ case 'z':
+ case 'u':
+ case 'i': // rotate all
+ {
+ B2dIAObject* pCenterObj = pIAOManager->GetIAObject(nDirectObjectNum);
+ if(pCenterObj)
+ {
+ Vector2D aCenter(pCenterObj->GetBasePosition());
+ Matrix3D aTrans;
+
+ aTrans.Translate(-aCenter);
+ if(rKEvt.GetCharCode() == 't') aTrans.Rotate( 1.0 * (F_PI / 180.0));
+ if(rKEvt.GetCharCode() == 'z') aTrans.Rotate( 10.0 * (F_PI / 180.0));
+ if(rKEvt.GetCharCode() == 'u') aTrans.Rotate(-10.0 * (F_PI / 180.0));
+ if(rKEvt.GetCharCode() == 'i') aTrans.Rotate( -1.0 * (F_PI / 180.0));
+ aTrans.Translate(aCenter);
+
+ pIAOManager->Transform(aTrans);
+ }
+ break;
+ }
+ }
+
+ // update display if necessary
+ pIAOManager->UpdateDisplay();
+ }
+#endif
+ return FALSE;
+}
+
+void SdrPaintView::InitRedraw(USHORT nWinNum, const Region& rReg, USHORT nPaintMode)
+{
+ for (USHORT i=0; i<GetPageViewCount(); i++) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ pPV->InitRedraw(nWinNum,rReg,nPaintMode,NULL);
+ }
+ ((SdrMarkView*)this)->AfterInitRedraw(nWinNum);
+ if (IsShownXorVisibleWinNum(nWinNum)) { // Durch Invalidate zerstoerte Handles wiederherstellen
+ OutputDevice* pOut=GetWin(nWinNum);
+ if (pOut!=NULL && pOut->GetOutDevType()!=OUTDEV_PRINTER) {
+ ToggleShownXor(pOut,&rReg);
+ }
+ }
+
+ RestartAfterPaintTimer();
+}
+
+void SdrPaintView::PostPaint()
+{
+ // refresh with Paint-functionality
+ RefreshAllIAOManagers();
+}
+
+void SdrPaintView::RestartAfterPaintTimer()
+{
+ // start timer for ImpAfterPaint()
+ aAfterPaintTimer.Start();
+}
+
+BOOL SdrPaintView::IsRedrawReady() const
+{
+ BOOL bOk=TRUE;
+ for (USHORT i=0; i<GetPageViewCount() && bOk; i++) {
+ SdrPageView* pPV=GetPageViewPvNum(i);
+ bOk=pPV->IsReady();
+ }
+ return bOk;
+}
+
+BOOL SdrPaintView::RedrawOne(USHORT nBrkEvent)
+{
+ return TRUE;
+}
+
+BOOL SdrPaintView::RedrawUntilInput(USHORT nBrkEvent)
+{
+ return TRUE;
+}
+
+void SdrPaintView::GlueInvalidate() const
+{
+ USHORT nPvAnz=GetPageViewCount();
+ USHORT nWinAnz=GetWinCount();
+ for (USHORT nWinNum=0; nWinNum<nWinAnz; nWinNum++) {
+ OutputDevice* pOut=GetWin(nWinNum);
+ if (pOut->GetOutDevType()==OUTDEV_WINDOW) {
+ pXOut->SetOutDev(pOut);
+ for (USHORT nPvNum=0; nPvNum<nPvAnz; nPvNum++) {
+ const SdrPageView* pPV=GetPageViewPvNum(nPvNum);
+ const SdrObjList* pOL=pPV->GetObjList();
+ pXOut->SetOffset(pPV->GetOffset());
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
+ const SdrObject* pObj=pOL->GetObj(nObjNum);
+ const SdrGluePointList* pGPL=pObj->GetGluePointList();
+ if (pGPL!=NULL && pGPL->GetCount()!=0) {
+ pGPL->Invalidate(*(Window*)pOut,pObj);
+ }
+ }
+ }
+ }
+ pXOut->SetOffset(Point(0,0));
+ }
+}
+
+void SdrPaintView::InvalidateAllWin()
+{
+ for (USHORT i=0; i<GetWinCount(); i++) {
+ OutputDevice* pOut=GetWin(i);
+ if (pOut->GetOutDevType()==OUTDEV_WINDOW) {
+ InvalidateOneWin(*(Window*)pOut);
+ }
+ }
+}
+
+void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix)
+{
+ USHORT nWinAnz=GetWinCount();
+ for (USHORT i=0; i<nWinAnz; i++) {
+ OutputDevice* pOut=GetWin(i);
+ if (pOut->GetOutDevType()==OUTDEV_WINDOW) {
+ Rectangle aRect(rRect);
+ if (bPlus1Pix) {
+ Size aPixSiz(1,1);
+ Size aSiz(pOut->PixelToLogic(aPixSiz));
+ aRect.Left ()-=aSiz.Width();
+ aRect.Top ()-=aSiz.Height();
+ aRect.Right ()+=aSiz.Width();
+ aRect.Bottom()+=aSiz.Height();
+ }
+ Point aOrg(pOut->GetMapMode().GetOrigin());
+ aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y();
+ Rectangle aOutRect(aOrg,pOut->GetOutputSize());
+ if (aRect.IsOver(aOutRect)) {
+ InvalidateOneWin(*(Window*)pOut,aRect);
+ }
+ }
+ }
+}
+
+void SdrPaintView::InvalidateOneWin(Window& rWin)
+{
+ rWin.Invalidate();
+}
+
+void SdrPaintView::InvalidateOneWin(Window& rWin, const Rectangle& rRect)
+{
+ rWin.Invalidate(rRect);
+}
+
+void SdrPaintView::LeaveOneGroup()
+{
+ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ pPV->LeaveOneGroup();
+ }
+}
+
+void SdrPaintView::LeaveAllGroup()
+{
+ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ pPV->LeaveAllGroup();
+ }
+}
+
+BOOL SdrPaintView::IsGroupEntered() const
+{
+ BOOL bRet=FALSE;
+ USHORT nPVAnz=GetPageViewCount();
+ for (USHORT nv=0; nv<nPVAnz && !bRet; nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (pPV->GetEnteredLevel()!=0) bRet=TRUE;
+ }
+ return bRet;
+}
+
+void SdrPaintView::SetMasterPagePaintCaching( BOOL bOn, ULONG nCacheMode )
+{
+ bMasterBmp = bOn;
+
+ if( bOn )
+ {
+ if( SDR_MASTERPAGECACHE_DEFAULT == nCacheMode || SDR_MASTERPAGECACHE_NONE == nCacheMode )
+ nMasterCacheMode = SDR_MASTERPAGECACHE_FULL;
+ else
+ nMasterCacheMode = nCacheMode;
+
+ ReleaseMasterPagePaintCache();
+ }
+ else
+ nMasterCacheMode = SDR_MASTERPAGECACHE_NONE;
+}
+
+// z.B. rufen, wenn Obj der MPg geaendert
+void SdrPaintView::ReleaseMasterPagePaintCache()
+{
+ if (pMasterBmp!=NULL) {
+ delete pMasterBmp;
+ pMasterBmp=NULL;
+ }
+}
+
+void SdrPaintView::SetNotPersistDefaultAttr(const SfxItemSet& rAttr, BOOL bReplaceAll)
+{
+ // bReplaceAll hat hier keinerlei Wirkung
+ BOOL bMeasure=ISA(SdrView) && ((SdrView*)this)->IsMeasureTool();
+ const SfxPoolItem *pPoolItem=NULL;
+ if (rAttr.GetItemState(SDRATTR_LAYERID,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ SdrLayerID nLayerId=((const SdrLayerIdItem*)pPoolItem)->GetValue();
+ const SdrLayer* pLayer=pMod->GetLayerAdmin().GetLayerPerID(nLayerId);
+ if (pLayer!=NULL) {
+ if (bMeasure) aMeasureLayer=pLayer->GetName();
+ else aAktLayer=pLayer->GetName();
+ }
+ }
+ if (rAttr.GetItemState(SDRATTR_LAYERNAME,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ if (bMeasure) aMeasureLayer=((const SdrLayerNameItem*)pPoolItem)->GetValue();
+ else aAktLayer=((const SdrLayerNameItem*)pPoolItem)->GetValue();
+ }
+}
+
+void SdrPaintView::MergeNotPersistDefaultAttr(SfxItemSet& rAttr, BOOL bOnlyHardAttr) const
+{
+ // bOnlyHardAttr hat hier keinerlei Wirkung
+ BOOL bMeasure=ISA(SdrView) && ((SdrView*)this)->IsMeasureTool();
+ const XubString& aNam=bMeasure?aMeasureLayer:aAktLayer;
+ rAttr.Put(SdrLayerNameItem(aNam));
+ SdrLayerID nLayer=pMod->GetLayerAdmin().GetLayerID(aNam,TRUE);
+ if (nLayer!=SDRLAYER_NOTFOUND) {
+ rAttr.Put(SdrLayerIdItem(nLayer));
+ }
+}
+
+void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, BOOL bReplaceAll)
+{
+#ifdef DBG_UTIL
+ {
+ BOOL bHasEEFeatureItems=FALSE;
+ SfxItemIter aIter(rAttr);
+ const SfxPoolItem* pItem=aIter.FirstItem();
+ while (!bHasEEFeatureItems && pItem!=NULL) {
+ if (!IsInvalidItem(pItem)) {
+ USHORT nW=pItem->Which();
+ if (nW>=EE_FEATURE_START && nW<=EE_FEATURE_END) bHasEEFeatureItems=TRUE;
+ }
+ pItem=aIter.NextItem();
+ }
+
+ if(bHasEEFeatureItems)
+ {
+ String aMessage;
+ aMessage.AppendAscii("SdrPaintView::SetDefaultAttr(): Das setzen von EE_FEATURE-Items an der SdrView macht keinen Sinn! Es fuehrt nur zu Overhead und nicht mehr lesbaren Dokumenten.");
+ InfoBox(NULL, aMessage).Execute();
+ }
+ }
+#endif
+ if (bReplaceAll) aDefaultAttr.Set(rAttr);
+ else aDefaultAttr.Put(rAttr,FALSE); // FALSE= InvalidItems nicht als Default, sondern als "Loecher" betrachten
+ SetNotPersistDefaultAttr(rAttr,bReplaceAll);
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+}
+
+void SdrPaintView::SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
+{
+ pDefaultStyleSheet=pStyleSheet;
+ if (pStyleSheet!=NULL && !bDontRemoveHardAttr) {
+ SfxWhichIter aIter(pStyleSheet->GetItemSet());
+ USHORT nWhich=aIter.FirstWhich();
+ while (nWhich!=0) {
+ if (pStyleSheet->GetItemSet().GetItemState(nWhich,TRUE)==SFX_ITEM_SET) {
+ aDefaultAttr.ClearItem(nWhich);
+ }
+ nWhich=aIter.NextWhich();
+ }
+ }
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+}
+
+/* new interface src537 */
+BOOL SdrPaintView::GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr) const
+{
+ if(bOnlyHardAttr || !pDefaultStyleSheet)
+ {
+ rTargetSet.Put(aDefaultAttr, FALSE);
+ }
+ else
+ {
+ // sonst DefStyleSheet dazumergen
+ rTargetSet.Put(pDefaultStyleSheet->GetItemSet(), FALSE);
+ rTargetSet.Put(aDefaultAttr, FALSE);
+ }
+ MergeNotPersistDefaultAttr(rTargetSet, bOnlyHardAttr);
+ return TRUE;
+}
+
+BOOL SdrPaintView::SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll)
+{
+ SetDefaultAttr(rSet,bReplaceAll);
+ return TRUE;
+}
+
+SfxStyleSheet* SdrPaintView::GetStyleSheet(BOOL& rOk) const
+{
+ rOk=TRUE;
+ return GetDefaultStyleSheet();
+}
+
+BOOL SdrPaintView::SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
+{
+ SetDefaultStyleSheet(pStyleSheet,bDontRemoveHardAttr);
+ return TRUE;
+}
+
+void SdrPaintView::SetDisabledAttr(const SfxItemSet* pNewDisabledAttr)
+{
+ if (pDisabledAttr!=NULL || pNewDisabledAttr!=NULL) {
+ if (pDisabledAttr!=NULL) delete pDisabledAttr;
+ pDisabledAttr=NULL;
+ if (pNewDisabledAttr!=NULL) {
+ pDisabledAttr=new SfxItemSet(*pNewDisabledAttr);
+ }
+ for (USHORT nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (pPV->GetEnteredLevel()!=0) {
+ InvalidateAllWin(pPV->GetPageRect());
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPaintView::ShowItemBrowser(BOOL bShow)
+{
+ if (bShow) {
+ if (pItemBrowser==NULL) {
+ pItemBrowser=new SdrItemBrowser(*(SdrView*)this);
+ pItemBrowser->SetFloatingMode(TRUE);
+ }
+ pItemBrowser->Show();
+ pItemBrowser->GrabFocus();
+ } else {
+ if (pItemBrowser!=NULL) {
+ pItemBrowser->Hide();
+ delete pItemBrowser;
+ pItemBrowser=NULL;
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPaintView::WriteRecords(SvStream& rOut) const
+{
+ {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWPAGEVIEWS);
+ USHORT nv;
+ for (nv=0; nv<GetPageViewCount(); nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (pPV->GetPage()->IsInserted()) {
+ rOut<<*pPV;
+ }
+ }
+ for (nv=0; nv<GetPageHideCount(); nv++) {
+ SdrPageView* pPV=GetPageHidePvNum(nv);
+ if (pPV->GetPage()->IsInserted()) {
+ rOut<<*pPV;
+ }
+ }
+ } {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWVISIELEM);
+ rOut<<BOOL(bLayerSortedRedraw);
+ rOut<<BOOL(bPageVisible);
+ rOut<<BOOL(bBordVisible);
+ rOut<<BOOL(bGridVisible);
+ rOut<<BOOL(bGridFront);
+ rOut<<BOOL(bHlplVisible);
+ rOut<<BOOL(bHlplFront);
+ rOut<<BOOL(bGlueVisible);
+ rOut<<aGridBig;
+ rOut<<aGridFin;
+ rOut<<aGridWdtX;
+ rOut<<aGridWdtY;
+ rOut<<aGridSubdiv;
+ } {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWAKTLAYER);
+
+ // UNICODE: rOut << aAktLayer;
+ rOut.WriteByteString(aAktLayer);
+
+ // UNICODE: rOut << aMeasureLayer;
+ rOut.WriteByteString(aMeasureLayer);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrPaintView::ReadRecord(const SdrIOHeader& rViewHead,
+ const SdrNamedSubRecord& rSubHead,
+ SvStream& rIn)
+{
+ BOOL bRet=FALSE;
+ if (rSubHead.GetInventor()==SdrInventor) {
+ bRet=TRUE;
+ switch (rSubHead.GetIdentifier()) {
+ case SDRIORECNAME_VIEWPAGEVIEWS: {
+ while (rSubHead.GetBytesLeft()>0 && rIn.GetError()==0 && !rIn.IsEof()) {
+ SdrPageView* pPV=new SdrPageView(NULL,Point(),*(SdrView*)this);
+ rIn>>*pPV;
+ if (pPV->GetPage()!=NULL) {
+ if (pPV->IsVisible()) {
+ aPagV.Insert(pPV,CONTAINER_APPEND);
+ } else aPagHide.Insert(pPV,CONTAINER_APPEND);
+ } else {
+ DBG_ERROR("SdrPaintView::ReadRecord(): Seite der PageView nicht gefunden");
+ delete pPV;
+ }
+ }
+ } break;
+
+ case SDRIORECNAME_VIEWVISIELEM:
+ {
+ BOOL bTemp;
+
+ rIn>>bTemp; bLayerSortedRedraw=bTemp;
+ rIn>>bTemp; bPageVisible =bTemp;
+ rIn>>bTemp; bBordVisible =bTemp;
+ rIn>>bTemp; bGridVisible =bTemp;
+ rIn>>bTemp; bGridFront =bTemp;
+ rIn>>bTemp; bHlplVisible =bTemp;
+ rIn>>bTemp; bHlplFront =bTemp;
+ rIn>>bTemp; bGlueVisible =bTemp;
+ rIn>>aGridBig;
+ rIn>>aGridFin;
+
+ if(rSubHead.GetBytesLeft() > 0)
+ {
+ rIn >> aGridWdtX;
+ rIn >> aGridWdtY;
+ rIn >> aGridSubdiv;
+ }
+ break;
+ }
+ case SDRIORECNAME_VIEWAKTLAYER:
+ {
+ // UNICODE: rIn >> aAktLayer;
+ rIn.ReadByteString(aAktLayer);
+
+ if(rSubHead.GetBytesLeft() > 0)
+ {
+ // UNICODE: rIn >> aMeasureLayer;
+ rIn.ReadByteString(aMeasureLayer);
+ }
+ break;
+ }
+
+ default:
+ bRet = FALSE;
+ }
+ }
+ return bRet;
+}
+
+void SdrPaintView::MakeVisible(const Rectangle& rRect, Window& rWin)
+{
+ MapMode aMap(rWin.GetMapMode());
+ Size aActualSize(rWin.GetOutputSize());
+
+ if( aActualSize.Height() > 0 && aActualSize.Width() > 0 )
+ {
+ Size aNewSize(rRect.GetSize());
+ BOOL bNewScale=FALSE;
+ BOOL bNeedMoreX=aNewSize.Width()>aActualSize.Width();
+ BOOL bNeedMoreY=aNewSize.Height()>aActualSize.Height();
+ if (bNeedMoreX || bNeedMoreY)
+ {
+ bNewScale=TRUE;
+ // Neuen MapMode (Size+Org) setzen und dabei alles invalidieren
+ Fraction aXFact(aNewSize.Width(),aActualSize.Width());
+ Fraction aYFact(aNewSize.Height(),aActualSize.Height());
+ if (aYFact>aXFact) aXFact=aYFact;
+ aXFact*=aMap.GetScaleX();
+ aXFact.ReduceInaccurate(10); // Um Ueberlaeufe und BigInt-Mapping zu vermeiden
+ aMap.SetScaleX(aXFact);
+ aMap.SetScaleY(aYFact);
+ rWin.SetMapMode(aMap);
+ aActualSize=rWin.GetOutputSize();
+ }
+ Point aOrg(aMap.GetOrigin());
+ long dx=0,dy=0;
+ long l=-aOrg.X();
+ long r=-aOrg.X()+aActualSize.Width()-1;
+ long o=-aOrg.Y();
+ long u=-aOrg.Y()+aActualSize.Height()-1;
+ if (l>rRect.Left()) dx=rRect.Left()-l;
+ else if (r<rRect.Right()) dx=rRect.Right()-r;
+ if (o>rRect.Top()) dy=rRect.Top()-o;
+ else if (u<rRect.Bottom()) dy=rRect.Bottom()-u;
+ aMap.SetOrigin(Point(aOrg.X()-dx,aOrg.Y()-dy));
+ if (!bNewScale) {
+ if (dx!=0 || dy!=0) {
+ BOOL bXor=IsShownXorVisible(&rWin);
+ if (bXor) HideShownXor(&rWin);
+ rWin.Scroll(-dx,-dy);
+ rWin.SetMapMode(aMap);
+ rWin.Update();
+ if (bXor) ShowShownXor(&rWin);
+ }
+ } else {
+ rWin.SetMapMode(aMap);
+ InvalidateOneWin(rWin);
+ }
+ }
+}
+
+void SdrPaintView::DoConnect(SdrOle2Obj* pOleObj)
+{
+}
+
+void SdrPaintView::VisAreaChanged(const OutputDevice* pOut)
+{
+ USHORT nCount = GetPageViewCount();
+
+ for (USHORT i = 0; i < nCount; i++)
+ {
+ SdrPageView* pPV = GetPageViewPvNum(i);
+
+ if (pOut)
+ {
+ // Nur dieses eine OutDev
+ USHORT nPos = pPV->GetWinList().Find((OutputDevice*) pOut);
+
+ if (nPos != SDRPAGEVIEWWIN_NOTFOUND)
+ {
+ VisAreaChanged(pPV->GetWinList()[nPos]);
+ }
+ }
+ else
+ {
+ // Alle OutDevs
+ USHORT nWinAnz = pPV->GetWinList().GetCount();
+
+ for (USHORT nWinNum = 0; nWinNum < nWinAnz; nWinNum++)
+ {
+ VisAreaChanged(pPV->GetWinList()[nWinNum]);
+ }
+ }
+ }
+}
+
+void SdrPaintView::VisAreaChanged(const SdrPageViewWinRec& rPVWR)
+{
+ if (rPVWR.GetControlContainerRef().is())
+ {
+ const SdrUnoControlList& rCList = rPVWR.GetControlList();
+
+ for (ULONG i = 0; i < rCList.GetCount(); i++)
+ {
+ const SdrUnoControlRec& rControlRec = rCList[i];
+ uno::Reference< awt::XControl > xUnoControl = rControlRec.GetControl();
+
+ if (xUnoControl.is())
+ {
+ uno::Reference< awt::XWindow > xVclComponent( xUnoControl, uno::UNO_QUERY );
+
+ if (xVclComponent.is() && rControlRec.GetUnoObj())
+ {
+ Rectangle aRect = rControlRec.GetUnoObj()->GetLogicRect();
+ OutputDevice* pOut = rPVWR.GetOutputDevice();
+ Point aPixPos(pOut->LogicToPixel(aRect.TopLeft()));
+ Size aPixSize(pOut->LogicToPixel(aRect.GetSize()));
+
+ xVclComponent->setPosSize(aPixPos.X(), aPixPos.Y(),
+ aPixSize.Width(), aPixSize.Height(), awt::PosSize::POSSIZE);
+ }
+ }
+ }
+ }
+}
+
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
new file mode 100644
index 0000000000..8a3925e0ea
--- /dev/null
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -0,0 +1,604 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdpoev.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdpoev.hxx"
+#include <math.h>
+#include "svdpagv.hxx"
+#include "svdpage.hxx"
+#include "svdopath.hxx"
+#include "svdundo.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+#include "svdtrans.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPolyEditView::ImpResetPolyPossibilityFlags()
+{
+ eMarkedPointsSmooth=SDRPATHSMOOTH_DONTCARE;
+ eMarkedSegmentsKind=SDRPATHSEGMENT_DONTCARE;
+ bSetMarkedPointsSmoothPossible=FALSE;
+ bSetMarkedSegmentsKindPossible=FALSE;
+}
+
+void SdrPolyEditView::ImpClearVars()
+{
+ ImpResetPolyPossibilityFlags();
+}
+
+SdrPolyEditView::SdrPolyEditView(SdrModel* pModel1, OutputDevice* pOut):
+ SdrEditView(pModel1,pOut)
+{
+ ImpClearVars();
+}
+
+SdrPolyEditView::SdrPolyEditView(SdrModel* pModel1, ExtOutputDevice* pXOut):
+ SdrEditView(pModel1,pXOut)
+{
+ ImpClearVars();
+}
+
+SdrPolyEditView::~SdrPolyEditView()
+{
+}
+
+void SdrPolyEditView::ImpCheckPolyPossibilities()
+{
+ ImpResetPolyPossibilityFlags();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ if (nMarkAnz>0 && !ImpIsFrameHandles()) {
+ BOOL bReadOnly=FALSE;
+ BOOL b1stSmooth=TRUE;
+ BOOL b1stSegm=TRUE;
+ BOOL bCurve=FALSE;
+ BOOL bSmoothFuz=FALSE;
+ BOOL bSegmFuz=FALSE;
+ XPolyFlags eSmooth=XPOLY_NORMAL;
+
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz; nMarkNum++) {
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrObject* pObj=pM->GetObj();
+ SdrUShortCont* pPts=pM->GetMarkedPoints();
+ SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
+ if (pPath!=NULL && pPts!=NULL) {
+ ULONG nMarkedPntAnz=pPts->GetCount();
+ if (nMarkedPntAnz!=0) {
+ BOOL bClosed=pPath->IsClosed();
+ bSetMarkedPointsSmoothPossible=TRUE;
+ if (bClosed) bSetMarkedSegmentsKindPossible=TRUE;
+ const XPolyPolygon& rXPP=pPath->GetPathPoly();
+ for (USHORT nMarkedPntNum=0; nMarkedPntNum<(USHORT)nMarkedPntAnz; nMarkedPntNum++) {
+ USHORT nNum=pPts->GetObject(nMarkedPntNum);
+ USHORT nPolyNum=0,nPntNum=0;
+ if (pPath->FindPolyPnt(nNum,nPolyNum,nPntNum,FALSE)) {
+ const XPolygon& rXP=rXPP[nPolyNum];
+ BOOL bCanSegment=bClosed || nPntNum<rXP.GetPointCount()-1;
+
+ if (!bSetMarkedSegmentsKindPossible && bCanSegment) {
+ bSetMarkedSegmentsKindPossible=TRUE;
+ }
+ if (!bSmoothFuz) {
+ if (b1stSmooth) {
+ b1stSmooth=FALSE;
+ eSmooth=rXP.GetFlags(nPntNum);
+ } else {
+ bSmoothFuz=eSmooth!=rXP.GetFlags(nPntNum);
+ }
+ }
+ if (!bSegmFuz) {
+ if (bCanSegment) {
+ BOOL bCrv=rXP.IsControl(nPntNum+1);
+ if (b1stSegm) {
+ b1stSegm=FALSE;
+ bCurve=bCrv;
+ } else {
+ bSegmFuz=bCrv!=bCurve;
+ }
+ }
+ }
+ }
+ }
+ if (!b1stSmooth && !bSmoothFuz) {
+ if (eSmooth==XPOLY_NORMAL) eMarkedPointsSmooth=SDRPATHSMOOTH_ANGULAR;
+ if (eSmooth==XPOLY_SMOOTH) eMarkedPointsSmooth=SDRPATHSMOOTH_ASYMMETRIC;
+ if (eSmooth==XPOLY_SYMMTR) eMarkedPointsSmooth=SDRPATHSMOOTH_SYMMETRIC;
+ }
+ if (!b1stSegm && !bSegmFuz) {
+ eMarkedSegmentsKind= bCurve ? SDRPATHSEGMENT_CURVE : SDRPATHSEGMENT_LINE;
+ }
+ }
+ }
+ }
+ if (bReadOnly) {
+ bSetMarkedPointsSmoothPossible=FALSE;
+ bSetMarkedSegmentsKindPossible=FALSE;
+ }
+ }
+}
+
+void SdrPolyEditView::SetMarkedPointsSmooth(SdrPathSmoothKind eKind)
+{
+ XPolyFlags eFlags;
+ if (eKind==SDRPATHSMOOTH_ANGULAR) eFlags=XPOLY_NORMAL;
+ else if (eKind==SDRPATHSMOOTH_ASYMMETRIC) eFlags=XPOLY_SMOOTH;
+ else if (eKind==SDRPATHSMOOTH_SYMMETRIC) eFlags=XPOLY_SYMMTR;
+ else return;
+ if (HasMarkedPoints()) {
+ aMark.ForceSort();
+ BegUndo(ImpGetResStr(STR_EditSetPointsSmooth),aMark.GetPointMarkDescription()/*,SDRREPFUNC_OBJ_*/);
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nMarkNum=nMarkAnz; nMarkNum>0;) {
+ nMarkNum--;
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrUShortCont* pPts=pM->GetMarkedPoints();
+ SdrObject* pObj=pM->GetObj();
+ SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
+ if (pPts!=NULL && pPath!=NULL) {
+ pPts->ForceSort();
+ AddUndo(new SdrUndoGeoObj(*pPath));
+ Rectangle aBoundRect0; if (pPath->pUserCall!=NULL) aBoundRect0=pPath->GetBoundRect();
+ pPath->SendRepaintBroadcast();
+ for (ULONG nNum=pPts->GetCount(); nNum>0;) {
+ nNum--;
+ USHORT nPtNum=pPts->GetObject(nNum);
+ USHORT nPolyNum,nPntNum;
+ if (pPath->FindPolyPnt(nPtNum,nPolyNum,nPntNum,FALSE)) {
+ pPath->ImpSetSmoothFlag(nPolyNum,nPntNum,eFlags);
+ }
+ }
+ // die folgenden 5 Statements sowie das obige SendRepaintBroadcast,
+ // da ich das wesentlich schnellere ImpSetSmoothFlag verwende.
+ pPath->ImpForceKind(); // ebenso impl. an der SdrPolyEditView
+ pPath->SetRectsDirty();
+ pPath->SetChanged();
+ pPath->SendRepaintBroadcast();
+ pPath->SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+ }
+ EndUndo();
+ }
+}
+
+void SdrPolyEditView::SetMarkedSegmentsKind(SdrPathSegmentKind eKind)
+{
+ SdrPathType eType;
+ if (eKind==SDRPATHSEGMENT_LINE) eType=SDRPATH_LINE;
+ else if (eKind==SDRPATHSEGMENT_CURVE) eType=SDRPATH_CURVE;
+ else if (eKind==SDRPATHSEGMENT_TOGGLE) eType=SDRPATH_NONE;
+ else return;
+ if (HasMarkedPoints()) {
+ aMark.ForceSort();
+ BegUndo(ImpGetResStr(STR_EditSetSegmentsKind),aMark.GetPointMarkDescription()/*,SDRREPFUNC_OBJ_*/);
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nMarkNum=nMarkAnz; nMarkNum>0;) {
+ nMarkNum--;
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrUShortCont* pPts=pM->GetMarkedPoints();
+ SdrObject* pObj=pM->GetObj();
+ SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
+ if (pPts!=NULL && pPath!=NULL) {
+ pPts->ForceSort();
+ AddUndo(new SdrUndoGeoObj(*pPath));
+ Rectangle aBoundRect0; if (pPath->pUserCall!=NULL) aBoundRect0=pPath->GetBoundRect();
+ pPath->SendRepaintBroadcast();
+ for (ULONG nNum=pPts->GetCount(); nNum>0;) { // hier muss ich mir noch den 1. und letzten Punkt
+ nNum--; // eines jeden Polygons merken (fehlende Impl.) !!!
+ USHORT nPtNum=pPts->GetObject(nNum);
+ USHORT nPolyNum,nPntNum;
+ if (pPath->FindPolyPnt(nPtNum,nPolyNum,nPntNum,FALSE)) {
+ pPath->ImpConvertSegment(nPolyNum,nPntNum,eType,FALSE);
+ }
+ }
+ // die folgenden 5 Statements sowie das obige SendRepaintBroadcast,
+ // da ich das wesentlich schnellere ImpSetSmoothFlag verwende.
+ pPath->ImpForceKind(); // ebenso impl. an der SdrPolyEditView
+ pPath->SetRectsDirty();
+ pPath->SetChanged();
+ pPath->SendRepaintBroadcast();
+ pPath->SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+ }
+ EndUndo();
+ }
+}
+
+void SdrPolyEditView::DeleteMarkedPoints()
+{
+ if (HasMarkedPoints()) {
+ BrkAction();
+ aMark.ForceSort();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ // Description
+ BegUndo(ImpGetResStr(STR_EditDelete),aMark.GetPointMarkDescription(),SDRREPFUNC_OBJ_DELETE);
+ // und nun das eigentliche loeschen
+ ULONG nObjDelCount=0;
+ for (ULONG nMarkNum=nMarkAnz; nMarkNum>0;) {
+ nMarkNum--;
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrUShortCont* pPts=pM->GetMarkedPoints();
+ SdrObject* pObj=pM->GetObj();
+ BOOL bDel=FALSE;
+ if (pPts!=NULL) {
+ pPts->ForceSort();
+ ULONG nMarkPtsAnz=pPts->GetCount();
+ if (nMarkPtsAnz!=0) {
+ AddUndo(new SdrUndoGeoObj(*pObj));
+
+ if(nMarkPtsAnz > 5)
+ {
+ Rectangle aBoundRect0(pObj->GetBoundRect());
+ pObj->SendRepaintBroadcast();
+ for (ULONG i=nMarkPtsAnz; i>0 && !bDel;)
+ {
+ i--;
+ bDel=!pObj->NbcDelPoint(pPts->GetObject(i));
+ }
+ if(!bDel)
+ {
+ pObj->SetChanged();
+ pObj->SendRepaintBroadcast();
+ pObj->SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0);
+ }
+ }
+ else
+ {
+ for (ULONG i=nMarkPtsAnz; i>0 && !bDel;)
+ {
+ i--;
+ bDel=!pObj->DelPoint(pPts->GetObject(i));
+ }
+ }
+ }
+ }
+ if (bDel) {
+ AddUndo(new SdrUndoDelObj(*pObj));
+ pM->GetPageView()->GetObjList()->RemoveObject(pObj->GetOrdNum());
+ nObjDelCount++;
+ }
+ }
+ EndUndo();
+ UnmarkAllPoints();
+ MarkListHasChanged();
+ }
+}
+
+void SdrPolyEditView::RipUpAtMarkedPoints()
+{
+ if (HasMarkedPoints()) {
+ aMark.ForceSort();
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ BegUndo(ImpGetResStr(STR_EditRipUp),aMark.GetPointMarkDescription()/*,SDRREPFUNC_OBJ_MOVE*/);
+ for (ULONG nMarkNum=nMarkAnz; nMarkNum>0;) {
+ nMarkNum--;
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrUShortCont* pPts=pM->GetMarkedPoints();
+ SdrObject* pObj=pM->GetObj();
+ if (pPts!=NULL) {
+ pPts->ForceSort();
+ AddUndo(new SdrUndoGeoObj(*pObj));
+ BOOL bKorregFlag=FALSE;
+ BOOL bInsAny=FALSE;
+ ULONG nMarkPtsAnz=pPts->GetCount();
+ USHORT nMax=pObj->GetHdlCount();
+ for (ULONG i=nMarkPtsAnz; i>0;) {
+ i--;
+ USHORT nNewPt0Idx=0;
+ SdrObject* pNeuObj=pObj->RipPoint(pPts->GetObject(i),nNewPt0Idx);
+ if (pNeuObj!=NULL) {
+ bInsAny=TRUE;
+ SdrInsertReason aReason(SDRREASON_VIEWCALL,pObj);
+ pM->GetPageView()->GetObjList()->InsertObject(pNeuObj,pObj->GetOrdNum()+1,&aReason);
+ AddUndo(new SdrUndoNewObj(*pNeuObj));
+ MarkObj(pNeuObj,pM->GetPageView(),FALSE,TRUE);
+ }
+ if (nNewPt0Idx!=0) { // Korrektur notwendig?
+ DBG_ASSERT(bKorregFlag==FALSE,"Mehrfache Indexkorrektur bei SdrPolyEditView::RipUp()");
+ if (!bKorregFlag) {
+ bKorregFlag=TRUE;
+ for (ULONG nBla=0; nBla<nMarkPtsAnz; nBla++) {
+ USHORT nPntNum=pPts->GetObject(nBla);
+ nPntNum+=nNewPt0Idx;
+ if (nPntNum>=nMax) nPntNum-=nMax;
+ pPts->Replace(nPntNum,nBla);
+ }
+ i=nMarkPtsAnz; // ... und nochmal von vorn
+ }
+ }
+ }
+ }
+ }
+ UnmarkAllPoints();
+ EndUndo();
+ MarkListHasChanged();
+ }
+}
+
+BOOL SdrPolyEditView::IsRipUpAtMarkedPointsPossible() const
+{
+ BOOL bRet=FALSE;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nMarkNum=0; nMarkNum<nMarkAnz && !bRet; nMarkNum++) {
+ SdrMark* pM=aMark.GetMark(nMarkNum);
+ SdrObject* pObj=pM->GetObj();
+ SdrUShortCont* pPts=pM->GetMarkedPoints();
+ ULONG nMarkPntAnz=pPts!=NULL ? pPts->GetCount() : 0;
+ if (pPts!=NULL && nMarkPntAnz!=0 && pObj!=NULL && pObj->ISA(SdrPathObj)) {
+ const XPolyPolygon& rXPP=((SdrPathObj*)pObj)->GetPathPoly();
+ if (rXPP.Count()==1) { // es muss genau 1 Polygon drin sein!
+ const XPolygon& rXP=rXPP[0];
+ USHORT nPntAnz=rXP.GetPointCount();
+ if (nPntAnz>=3) {
+ bRet=pObj->IsClosedObj();
+ if (!bRet) {
+ for (ULONG nMarkPntNum=0; nMarkPntNum<nMarkPntAnz && !bRet; nMarkPntNum++) {
+ USHORT nMarkPt=pPts->GetObject(nMarkPntNum);
+ bRet=nMarkPt>0 && nMarkPt<nPntAnz-1;
+ }
+ }
+ }
+ }
+ }
+ }
+ return bRet;
+}
+
+BOOL SdrPolyEditView::IsOpenCloseMarkedObjectsPossible() const
+{
+ BOOL bRet=FALSE;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz && !bRet; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ if (pO->ISA(SdrPathObj)) {
+ const XPolyPolygon& rXPP=((SdrPathObj*)pO)->GetPathPoly();
+ USHORT nPolyAnz=rXPP.Count();
+ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz && !bRet; nPolyNum++) {
+ const XPolygon& rXP=rXPP[nPolyNum];
+ USHORT nPntAnz=rXP.GetPointCount();
+ bRet=nPntAnz>=3;
+ }
+ }
+ else
+ return FALSE;
+ }
+ return bRet;
+}
+
+SdrObjClosedKind SdrPolyEditView::GetMarkedObjectsClosedState() const
+{
+ BOOL bOpen=FALSE;
+ BOOL bClosed=FALSE;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz && (!bOpen || !bClosed); nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ if (pO->ISA(SdrPathObj)) {
+ const XPolyPolygon& rXPP=((SdrPathObj*)pO)->GetPathPoly();
+ if (rXPP.Count()==1) { // es muss genau 1 Polygon drin sein!
+ const XPolygon& rXP=rXPP[0];
+ USHORT nPntAnz=rXP.GetPointCount();
+ if (nPntAnz>=3) {
+ if (pO->IsClosedObj()) bClosed=TRUE; else bOpen=TRUE;
+ }
+ }
+ }
+ }
+ if (bOpen && bClosed) return SDROBJCLOSED_DONTCARE;
+ if (bOpen) return SDROBJCLOSED_OPEN;
+ return SDROBJCLOSED_CLOSED;
+}
+
+void SdrPolyEditView::ShutMarkedObjects()
+{
+ CloseMarkedObjects();
+}
+
+void SdrPolyEditView::CloseMarkedObjects(BOOL bToggle, BOOL bOpen, long nOpenDistance)
+{
+ if (HasMarkedObj()) {
+ BegUndo(ImpGetResStr(STR_EditShut),aMark.GetPointMarkDescription());
+ BOOL bChg=FALSE;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ BOOL bClosed=pO->IsClosedObj();
+ if (pO->IsPolyObj() && (bClosed==bOpen) || bToggle) {
+ AddUndo(new SdrUndoGeoObj(*pO));
+ if (pO->ISA(SdrPathObj)) {
+ ((SdrPathObj*)pO)->ToggleClosed(nOpenDistance);
+ } else {
+ if (!bOpen) pO->Shut();
+ }
+ bChg=TRUE;
+ }
+ }
+ EndUndo();
+ if (bChg) {
+ UnmarkAllPoints();
+ MarkListHasChanged();
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPolyEditView::ImpCopyMarkedPoints()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrPolyEditView::ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* p1, const void* p2, const void* p3, const void* p4, const void* p5)
+{
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ for (ULONG nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pObj=pM->GetObj();
+ const SdrUShortCont* pPts=pM->GetMarkedPoints();
+ Point aPvOfs(pM->GetPageView()->GetOffset());
+ ULONG nPtAnz=pPts==NULL ? 0 : pPts->GetCount();
+ SdrPathObj* pPath=PTR_CAST(SdrPathObj,pObj);
+ if (nPtAnz!=0 && pPath!=NULL) {
+ AddUndo(new SdrUndoGeoObj(*pObj));
+ XPolyPolygon aXPP(pPath->GetPathPoly());
+ BOOL bClosed=pPath->IsClosed();
+ for (ULONG nPtNum=0; nPtNum<nPtAnz; nPtNum++) {
+ USHORT nPt=pPts->GetObject(nPtNum);
+ USHORT nPolyNum,nPointNum;
+ if (pPath->TakePolyIdxForHdlNum(nPt,nPolyNum,nPointNum)) {
+ XPolygon& rXP=aXPP[nPolyNum];
+ USHORT nPointAnz=rXP.GetPointCount();
+ Point& rPos=rXP[nPointNum];
+ Point* pC1=NULL;
+ Point* pC2=NULL;
+ if (nPointNum>0 && rXP.IsControl(nPointNum-1)) {
+ pC1=&rXP[nPointNum-1];
+ }
+ if (nPointNum<nPointAnz-1 && rXP.IsControl(nPointNum+1)) {
+ pC2=&rXP[nPointNum+1];
+ }
+ if (bClosed && nPointNum==0 && nPointAnz>=2 && rXP.IsControl(nPointAnz-2)) {
+ pC1=&rXP[nPointAnz-2];
+ }
+ rPos+=aPvOfs;
+ if (pC1!=NULL) *pC1+=aPvOfs;
+ if (pC2!=NULL) *pC2+=aPvOfs;
+ (*pTrFunc)(rPos,pC1,pC2,p1,p2,p3,p4,p5);
+ rPos-=aPvOfs;
+ if (pC1!=NULL) *pC1-=aPvOfs;
+ if (pC2!=NULL) *pC2-=aPvOfs;
+ if (bClosed && nPointNum==0) rXP[nPointAnz-1]=rXP[0];
+ }
+ }
+ pPath->SetPathPoly(aXPP);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+static void ImpMove(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* p2, const void* p3, const void* p4, const void* p5)
+{
+ MovePoint(rPt,*(const Size*)p1);
+ if (pC1!=NULL) MovePoint(*pC1,*(const Size*)p1);
+ if (pC2!=NULL) MovePoint(*pC2,*(const Size*)p1);
+}
+
+void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz, BOOL bCopy)
+{
+ bCopy=FALSE; // noch nicht implementiert
+ ForceUndirtyMrkPnt();
+ XubString aStr(ImpGetResStr(STR_EditMove));
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr,aMark.GetPointMarkDescription(),SDRREPFUNC_OBJ_MOVE);
+ if (bCopy) ImpCopyMarkedPoints();
+ ImpTransformMarkedPoints(ImpMove,&rSiz);
+ EndUndo();
+ AdjustMarkHdl();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+static void ImpResize(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* p2, const void* p3, const void* p4, const void* p5)
+{
+ ResizePoint(rPt,*(const Point*)p1,*(const Fraction*)p2,*(const Fraction*)p3);
+ if (pC1!=NULL) ResizePoint(*pC1,*(const Point*)p1,*(const Fraction*)p2,*(const Fraction*)p3);
+ if (pC2!=NULL) ResizePoint(*pC2,*(const Point*)p1,*(const Fraction*)p2,*(const Fraction*)p3);
+}
+
+void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, BOOL bCopy)
+{
+ bCopy=FALSE; // noch nicht implementiert
+ ForceUndirtyMrkPnt();
+ XubString aStr(ImpGetResStr(STR_EditResize));
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr,aMark.GetPointMarkDescription(),SDRREPFUNC_OBJ_RESIZE);
+ if (bCopy) ImpCopyMarkedPoints();
+ ImpTransformMarkedPoints(ImpResize,&rRef,&xFact,&yFact);
+ EndUndo();
+ AdjustMarkHdl();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+static void ImpRotate(Point& rPt, Point* pC1, Point* pC2, const void* p1, const void* p2, const void* p3, const void* p4, const void* p5)
+{
+ RotatePoint(rPt,*(const Point*)p1,*(const double*)p3,*(const double*)p4);
+ if (pC1!=NULL) RotatePoint(*pC1,*(const Point*)p1,*(const double*)p3,*(const double*)p4);
+ if (pC2!=NULL) RotatePoint(*pC2,*(const Point*)p1,*(const double*)p3,*(const double*)p4);
+}
+
+void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, long nWink, BOOL bCopy)
+{
+ bCopy=FALSE; // noch nicht implementiert
+ ForceUndirtyMrkPnt();
+ XubString aStr(ImpGetResStr(STR_EditResize));
+ if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
+ BegUndo(aStr,aMark.GetPointMarkDescription(),SDRREPFUNC_OBJ_ROTATE);
+ if (bCopy) ImpCopyMarkedPoints();
+ double nSin=sin(nWink*nPi180);
+ double nCos=cos(nWink*nPi180);
+ ImpTransformMarkedPoints(ImpRotate,&rRef,&nWink,&nSin,&nCos);
+ EndUndo();
+ AdjustMarkHdl();
+}
+
diff --git a/svx/source/svdraw/svdscrol.cxx b/svx/source/svdraw/svdscrol.cxx
new file mode 100644
index 0000000000..bdd299353e
--- /dev/null
+++ b/svx/source/svdraw/svdscrol.cxx
@@ -0,0 +1,457 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdscrol.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svdscrol.hxx"
+#include <math.h>
+#include "svdtrans.hxx"
+#include "svdpagv.hxx"
+#include "svdview.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void ImpMtfAnimationInfo::SaveBackground(const ImpSdrMtfAnimator& rAnimator, const Region* pClip)
+{
+ Point aZero;
+ MapMode aMapMode(pOutDev->GetMapMode());
+ aMapMode.SetOrigin(aZero);
+ aBackground.SetMapMode(aMapMode);
+ Size aOutputSize(rAnimator.aOutputRect.GetSize());
+ Point aOutputTopLeft(rAnimator.aOutputRect.TopLeft());
+ aOutputTopLeft+=aOffset;
+
+// if (pClip!=NULL) {
+// Region aRegion(*pClip);
+// aRegion.Move(-aOutputTopLeft.X(),-aOutputTopLeft.Y());
+// aBackground.SetClipRegion(aRegion);
+// }
+
+ // #73647#
+ Region aBackClipRegion = pOutDev->GetActiveClipRegion();
+ aBackClipRegion.Move(-aOutputTopLeft.X(), -aOutputTopLeft.Y());
+ aBackground.SetClipRegion(aBackClipRegion);
+
+ aBackground.DrawOutDev(aZero,aOutputSize,aOutputTopLeft,aOutputSize,*pOutDev);
+
+// see #68462#
+// if (pPageView!=NULL) { // Xor ggf. entfernen vom gesicherten Hintergrund
+// const SdrView& rView=pPageView->GetView();
+// if (rView.IsShownXorVisible(pOutDev)) {
+// Point aPaintPos;
+// aPaintPos-=aOutputTopLeft;
+// aPaintPos+=aOffset;
+// MapMode aMap(aBackground.GetMapMode());
+// aMap.SetOrigin(aPaintPos);
+// aBackground.SetMapMode(aMap);
+// rView.ToggleShownXor(&aBackground,NULL);
+// aMap.SetOrigin(aZero);
+// aBackground.SetMapMode(aMap); // MapMode wieder zurueksetzen, sonst geht das DrawOutDev spaeter schief
+// }
+// }
+ aBackground.SetClipRegion();
+}
+
+void ImpMtfAnimationInfo::Paint(const ImpSdrMtfAnimator& rAnimator, OutputDevice& rOut) const
+{
+ Point aZero;
+ Size aOutputSize(rAnimator.aOutputRect.GetSize());
+ Point aOutputTopLeft(rAnimator.aOutputRect.TopLeft());
+ aOutputTopLeft+=aOffset;
+ Region aClipMerk;
+ FASTBOOL bClipMerk;
+ if (rAnimator.bClipRegion) {
+ bClipMerk=rOut.IsClipRegion();
+ aClipMerk=rOut.GetClipRegion();
+ if (aOffset==aZero) {
+ rOut.SetClipRegion(rAnimator.aClipRegion);
+ } else {
+ Region aTempRegion(rAnimator.aClipRegion);
+ aTempRegion.Move(aOffset.X(),aOffset.Y());
+ rOut.SetClipRegion(aTempRegion);
+ }
+ }
+ rOut.DrawOutDev(aOutputTopLeft,aOutputSize,aZero,aOutputSize,aVirDev);
+ if (rAnimator.bClipRegion) {
+ if (bClipMerk) rOut.SetClipRegion(aClipMerk);
+ else rOut.SetClipRegion();
+ }
+}
+
+void ImpMtfAnimationInfo::AnimateOneStep(ImpSdrMtfAnimator& rAnimator)
+{
+ if (bReady) return;
+ Point aZero;
+ Size aOutputSize(rAnimator.aOutputRect.GetSize());
+ Point aOutputTopLeft(rAnimator.aOutputRect.TopLeft());
+ aOutputTopLeft+=aOffset;
+ if (!bBackSaved) {
+ MapMode aMapMode(pOutDev->GetMapMode());
+ aMapMode.SetOrigin(aZero);
+ aBackground.SetMapMode(aMapMode);
+ if (!aBackground.SetOutputSize(aOutputSize)) {
+ DBG_ERROR("AnimateOneStep(): Zuwenig Speicherplatz zum sichern des Hintergrunds!");
+ }
+ SaveBackground(rAnimator);
+ bBackSaved=TRUE;
+ aVirDev.SetMapMode(aMapMode);
+ if (!aVirDev.SetOutputSize(aOutputSize)) {
+ DBG_ERROR("AnimateOneStep(): Zuwenig Speicherplatz fuer das Paint-VDev!");
+ }
+ }
+ // erstmal den Hintergrund ins VDev kopieren
+ aVirDev.DrawOutDev(aZero,aOutputSize,aZero,aOutputSize,aBackground);
+
+ SdrTextAniKind eAniKind=rAnimator.eAniKind;
+ SdrTextAniDirection eDirection=rAnimator.eDirection;
+ FASTBOOL bBlink=eAniKind==SDRTEXTANI_BLINK;
+ FASTBOOL bSlide=eAniKind==SDRTEXTANI_SLIDE;
+ FASTBOOL bHorz=eDirection==SDRTEXTANI_LEFT || eDirection==SDRTEXTANI_RIGHT;
+ FASTBOOL bVert=eDirection==SDRTEXTANI_UP || eDirection==SDRTEXTANI_DOWN;
+ FASTBOOL bRev=eDirection==SDRTEXTANI_RIGHT || eDirection==SDRTEXTANI_DOWN;
+ if (bBackTrack) bRev=!bRev; // Rueckweg bei Alternate (oder Slide)
+ FASTBOOL bStartInside=rAnimator.bStartInside && !bSlide;
+ FASTBOOL bStopInside=rAnimator.bStopInside || bSlide;
+ Rectangle aScrollFrameRect(rAnimator.aScrollFrameRect);
+ Rectangle aMtfBoundRect(rAnimator.aMtfBoundRect);
+ long nFL=bHorz?aScrollFrameRect.Left():aScrollFrameRect.Top(); // Frame Links bzw. Oben
+ long nFR=bHorz?aScrollFrameRect.Right():aScrollFrameRect.Bottom(); // Frame Rechts bzw. Unten
+ long nFW=nFR-nFL; // Frame Breite bzw. Hoehe
+ long nTL=bHorz?aMtfBoundRect.Left():aMtfBoundRect.Top(); // Text Links bzw. Oben
+ long nTR=bHorz?aMtfBoundRect.Right():aMtfBoundRect.Bottom(); // Text Rechts bzw. Unten
+ long nTW=nTR-nTL; // Text Breite bzw. Hoehe
+ if (bNeu) {
+ bNeu=FALSE;
+ bShown=TRUE;
+ if (bBlink) {
+ bShown=bStartInside;
+ } else {
+ if (bStartInside && nLoopNum==0) {
+ // Wenn der Text kleiner als der Scrollbereich, dann andere StartPos (wie bRev)
+ nLoopStep=0; // Die durch die Verankerung vorgegebene Position verwenden!
+ } else {
+ if (!bRev) nLoopStep=nFR-nTL;
+ else nLoopStep=nFL-nTR;
+ }
+ }
+ } else {
+ USHORT nMaxLoop=rAnimator.nMaxCount;
+ if (bSlide && nMaxLoop==0) nMaxLoop=1;
+ if (bBlink && nMaxLoop!=0 && !bStartInside && !bStopInside) nMaxLoop++; // etwas andere Zaehlung beim Blinken
+ FASTBOOL bLastLoop=nMaxLoop>0 && nLoopNum>=nMaxLoop-1 && (!bSlide || !bBackTrack);
+ if (bBlink) {
+ bShown=!bShown;
+ if (bShown) nLoopNum++;
+ if (bLastLoop && bShown==bStopInside) bReady=TRUE;
+ } else {
+ bShown=TRUE;
+ long nStep=rAnimator.nAmount;
+ if (nStep==0) nStep=-1;
+ if (nStep<0) {
+ nStep=pOutDev->PixelToLogic(Size(-nStep,0)).Width();
+ }
+ if (!bRev) nStep=-nStep;
+ nLoopStep+=nStep;
+ // Nun den Maximalwert fuer nLoopStep berechnen
+ long nLoopStepMax=0;
+ FASTBOOL bScrollOut=FALSE;
+ if (eAniKind==SDRTEXTANI_SCROLL) {
+ if (bLastLoop && bStopInside) nLoopStepMax=0; // Die durch die Verankerung vorgegebene Position verwenden!
+ else bScrollOut=TRUE;
+ } else if (eAniKind==SDRTEXTANI_ALTERNATE) {
+ if (bLastLoop) {
+ if (!bStopInside) bScrollOut=TRUE;
+ else nLoopStepMax=0; // Die durch die Verankerung vorgegebene Position verwenden!
+ } else { // Am Rand wenden
+ // Je nachdem, ob die Textbreite oder der sichtbare Bereich
+ // groesser ist, ist der eine oder der andere Rand relevant.
+ if ((!bRev) != (nTW>=nFW)) nLoopStepMax=nFL-nTL;
+ else nLoopStepMax=nFR-nTR;
+ }
+ } else if (bSlide) {
+ if (bBackTrack) bScrollOut=TRUE;
+ else nLoopStepMax=0; // Die durch die Verankerung vorgegebene Position verwenden!
+ }
+ if (bScrollOut) { // Rausschieben
+ if (!bRev) nLoopStepMax=nFL-nTR;
+ else nLoopStepMax=nFR-nTL;
+ }
+ if ((!bRev && nLoopStep<=nLoopStepMax) || (bRev && nLoopStep>=nLoopStepMax)) {
+ // Anschlag erreicht
+ nLoopStep=nLoopStepMax;
+ if (bSlide) {
+ if (!bBackTrack) nLoopNum++;
+ } else {
+ nLoopNum++;
+ }
+ if (!bLastLoop) {
+ if (eAniKind==SDRTEXTANI_SCROLL) bNeu=TRUE; // Naechste Runde wieder von vorn
+ else bBackTrack=!bBackTrack; // Sonst Alternate oder Slide
+ } else {
+ bReady=TRUE;
+ }
+ }
+ }
+ }
+
+ if (rAnimator.pMtf!=NULL && bShown) {
+ rAnimator.pMtf->WindStart();
+ Point aPaintPos;
+ if (!bBlink) { // hier wird nun die Position bestimmt
+ long nRoundedDistance=nLoopStep;
+ if (rAnimator.nRotateAngle!=0) {
+ // ggf. auf Pixel alignen um tanzende Buchstaben
+ // bei gedrehtem Text einzuschraenken #33360#
+ long nWink=rAnimator.nRotateAngle;
+ if (bVert) nWink+=9000;
+ nWink=NormAngle360(nWink);
+ if (nWink>18000) nWink-=18000;
+ if ((nWink>=3000 && nWink<=6000) || (nWink>=3000+9000 && nWink<=6000+9000)) {
+ // Andere Winkel sind zu Flach
+ double nSin=sin(nWink*nPi180);
+ long nUnrotDist=Round(nRoundedDistance*nSin);
+ nUnrotDist=pOutDev->LogicToPixel(Size(nUnrotDist,0)).Width();
+ nUnrotDist=pOutDev->PixelToLogic(Size(nUnrotDist,0)).Width();
+ nRoundedDistance=Round(nUnrotDist/nSin);
+ }
+ }
+ if (bHorz) aPaintPos.X()+=nRoundedDistance;
+ if (bVert) aPaintPos.Y()+=nRoundedDistance;
+ if (rAnimator.nRotateAngle!=0) {
+ RotatePoint(aPaintPos,aZero,rAnimator.nSin,rAnimator.nCos);
+ }
+ }
+ aPaintPos-=aOutputTopLeft;
+ aPaintPos+=aOffset;
+ MapMode aMap(aVirDev.GetMapMode());
+ aMap.SetOrigin(aPaintPos);
+ aVirDev.SetMapMode(aMap);
+ rAnimator.pMtf->Play(&aVirDev);
+ aMap.SetOrigin(aZero);
+ aVirDev.SetMapMode(aMap); // MapMode wieder zurueksetzen, sonst geht das DrawOutDev spaeter schief
+ }
+
+// see #68462#
+// if (pPageView!=NULL) {
+// const SdrView& rView=pPageView->GetView();
+// if (rView.IsShownXorVisible(pOutDev)) {
+// Point aPaintPos;
+// aPaintPos-=aOutputTopLeft;
+// aPaintPos+=aOffset;
+// MapMode aMap(aVirDev.GetMapMode());
+// aMap.SetOrigin(aPaintPos);
+// aVirDev.SetMapMode(aMap);
+// rView.ToggleShownXor(&aVirDev,NULL);
+// aMap.SetOrigin(aZero);
+// aVirDev.SetMapMode(aMap); // MapMode wieder zurueksetzen, sonst geht das DrawOutDev spaeter schief
+// }
+// }
+ Paint(rAnimator,*pOutDev);
+}
+
+void ImpMtfAnimationInfo::Restart()
+{
+ bPause=FALSE;
+ bReady=FALSE;
+ bBackSaved=FALSE;
+ bBackTrack=FALSE;
+ bNeu=TRUE;
+ nLoopNum=0;
+ nLoopStep=0;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ImpSdrMtfAnimator::ImpSdrMtfAnimator():
+ aInfoList(1024,16,16),
+ pMtf(NULL),
+ nRotateAngle(0),
+ nSin(0.0),
+ nCos(0.0),
+ bClipRegion(FALSE),
+ eAniKind(SDRTEXTANI_NONE),
+ eDirection(SDRTEXTANI_LEFT),
+ bStartInside(FALSE),
+ bStopInside(FALSE),
+ nMaxCount(0),
+ nDelay(0),
+ nAmount(0)
+{
+ aTimer.SetTimeoutHdl(LINK(this,ImpSdrMtfAnimator,ImpTimerHdl));
+}
+
+ImpSdrMtfAnimator::~ImpSdrMtfAnimator()
+{
+ ImpClearInfoList();
+ if (pMtf!=NULL) delete pMtf;
+}
+
+ULONG ImpSdrMtfAnimator::FindInfo(const OutputDevice& rOut, const Point& rOffset, long nExtraData) const
+{
+ ULONG nAnz=GetInfoCount();
+ for (ULONG nNum=0; nNum<nAnz; nNum++) {
+ const ImpMtfAnimationInfo* pInfo=GetInfo(nNum);
+ if (pInfo->pOutDev==&rOut && pInfo->aOffset==rOffset && pInfo->nExtraData==nExtraData) {
+ return nNum;
+ }
+
+ }
+ return CONTAINER_ENTRY_NOTFOUND;
+}
+
+void ImpSdrMtfAnimator::ImpClearInfoList()
+{
+ ULONG nAnz=GetInfoCount();
+ for (ULONG nNum=nAnz; nNum>0;) {
+ nNum--;
+ RemoveInfo(nNum);
+ }
+}
+
+IMPL_LINK(ImpSdrMtfAnimator,ImpTimerHdl,AutoTimer*,pTimer)
+{
+ aNotifyLink.Call(this);
+ ULONG nAnz=GetInfoCount();
+ for (ULONG nNum=0; nNum<nAnz; nNum++) {
+ ImpMtfAnimationInfo* pInfo=GetInfo(nNum);
+ if (!pInfo->bPause) pInfo->AnimateOneStep(*this);
+ }
+ if (nAnz==0) aTimer.Stop();
+ return 0;
+}
+
+void ImpSdrMtfAnimator::SetGDIMetaFile(GDIMetaFile* pMetaFile)
+{
+ if (pMtf!=NULL) delete pMtf;
+ pMtf=pMetaFile;
+}
+
+void ImpSdrMtfAnimator::SetRotateAngle(long nWink)
+{
+ if (nRotateAngle!=nWink) {
+ nRotateAngle=nWink;
+ double a=nWink*nPi180;
+ nSin=sin(a);
+ nCos=cos(a);
+ }
+}
+
+void ImpSdrMtfAnimator::SetAttributes(const SfxItemSet& rSet)
+{
+ eAniKind =((SdrTextAniKindItem &)rSet.Get(SDRATTR_TEXT_ANIKIND )).GetValue();
+ eDirection =((SdrTextAniDirectionItem &)rSet.Get(SDRATTR_TEXT_ANIDIRECTION )).GetValue();
+ bStartInside=((SdrTextAniStartInsideItem&)rSet.Get(SDRATTR_TEXT_ANISTARTINSIDE)).GetValue();
+ bStopInside =((SdrTextAniStopInsideItem &)rSet.Get(SDRATTR_TEXT_ANISTOPINSIDE )).GetValue();
+ nMaxCount =((SdrTextAniCountItem &)rSet.Get(SDRATTR_TEXT_ANICOUNT )).GetValue();
+ nDelay =((SdrTextAniDelayItem &)rSet.Get(SDRATTR_TEXT_ANIDELAY )).GetValue();
+ nAmount =((SdrTextAniAmountItem &)rSet.Get(SDRATTR_TEXT_ANIAMOUNT )).GetValue();
+}
+
+ImpMtfAnimationInfo* ImpSdrMtfAnimator::Start(OutputDevice& rOutDev, const Point& rOffset, long nExtraData)
+{
+ ImpMtfAnimationInfo* pInfo=NULL;
+ ULONG nPos=FindInfo(rOutDev,rOffset,nExtraData);
+ if (nPos==CONTAINER_ENTRY_NOTFOUND) {
+ pInfo=new ImpMtfAnimationInfo;
+ pInfo->pOutDev=&rOutDev;
+ pInfo->aOffset=rOffset;
+ pInfo->nExtraData=nExtraData;
+ ImpInsertInfo(pInfo);
+ } else {
+ pInfo=GetInfo(nPos);
+ }
+ pInfo->Restart();
+ long nTimeout=nDelay;
+ if (nTimeout==0) {
+ if (eAniKind==SDRTEXTANI_BLINK) nTimeout=250;
+ else nTimeout=50;
+ }
+ aTimer.SetTimeout(nTimeout);
+ aTimer.Start();
+ return pInfo;
+}
+
+void ImpSdrMtfAnimator::Stop()
+{
+ ImpClearInfoList();
+ aTimer.Stop();
+}
+
+void ImpSdrMtfAnimator::Stop(OutputDevice& rOutDev)
+{
+ ULONG nAnz=GetInfoCount();
+ for (ULONG nNum=nAnz; nNum>0;) {
+ nNum--;
+ ImpMtfAnimationInfo* pInfo=GetInfo(nNum);
+ if (pInfo->pOutDev==&rOutDev) RemoveInfo(nNum);
+ }
+ if (GetInfoCount()==0) aTimer.Stop();
+}
+
+void ImpSdrMtfAnimator::Stop(OutputDevice& rOutDev, const Point& rOffset)
+{
+ ULONG nAnz=GetInfoCount();
+ for (ULONG nNum=nAnz; nNum>0;) {
+ nNum--;
+ ImpMtfAnimationInfo* pInfo=GetInfo(nNum);
+ if (pInfo->pOutDev==&rOutDev && pInfo->aOffset==rOffset) RemoveInfo(nNum);
+ }
+ if (GetInfoCount()==0) aTimer.Stop();
+}
+
diff --git a/svx/source/svdraw/svdscrol.hxx b/svx/source/svdraw/svdscrol.hxx
new file mode 100644
index 0000000000..548d17ffcc
--- /dev/null
+++ b/svx/source/svdraw/svdscrol.hxx
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdscrol.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVDSCROL_HXX
+#define _SVDSCROL_HXX
+
+#ifndef _VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _TIMER_HXX //autogen
+#include <vcl/timer.hxx>
+#endif
+
+#ifndef _SVDATTR_HXX
+#include "svdattr.hxx"
+#endif
+
+//************************************************************
+// Vorausdeklarationen
+//************************************************************
+
+class SfxItemSet;
+class ImpSdrMtfAnimator;
+class SdrPageView;
+
+//************************************************************
+// ImpMtfAnimationInfo
+//************************************************************
+
+class ImpMtfAnimationInfo
+{
+public:
+ VirtualDevice aBackground; // Der gesicherte Hintergrund
+ VirtualDevice aVirDev; // VDev, um Flackern bei der Ausgabe zu vermeiden
+ Point aOffset; // Der PageView-Offset
+ OutputDevice* pOutDev; // Das OutDev in dem letztenendes ausgegeben wird
+ const SdrPageView* pPageView; // fuer ShownXor
+ long nExtraData; // Userdata fuer den Aufrufer
+ long nLoopNum; // Nummer des Durchlaufs
+ long nLoopStep; // Schrittnummer
+ FASTBOOL bPause; // Pause, weil Obj. z.B. selektiert ist
+ FASTBOOL bBackSaved; // FALSE=Neuer Entry, Hintergrund ist noch zu sichern,...
+ FASTBOOL bShown; // Schon hingemalt?
+ FASTBOOL bReady; // Fertig animiert?
+ FASTBOOL bBackTrack; // Ruekweg bei Alternate
+ FASTBOOL bNeu; // Neuer Scrollbeginn?
+
+ ImpMtfAnimationInfo()
+ : pOutDev(NULL),
+ pPageView(NULL),
+ nExtraData(0),
+ nLoopNum(0),
+ nLoopStep(0),
+ bPause(FALSE),
+ bBackSaved(FALSE),
+ bShown(FALSE),
+ bReady(FALSE),
+ bBackTrack(FALSE),
+ bNeu(FALSE)
+ {}
+
+ void Restart();
+ void SaveBackground(const ImpSdrMtfAnimator& rAnimator, const Region* pClip=NULL);
+ void Paint(const ImpSdrMtfAnimator& rAnimator, OutputDevice& rOut) const;
+ void AnimateOneStep(ImpSdrMtfAnimator& rAnimator);
+};
+
+//************************************************************
+// ImpSdrMtfAnimator
+//************************************************************
+
+class ImpSdrMtfAnimator
+{
+ friend class ImpMtfAnimationInfo;
+
+ Brush aBackBrush;
+ AutoTimer aTimer;
+ Container aInfoList;
+ GDIMetaFile* pMtf;
+ Link aNotifyLink;
+ Rectangle aScrollFrameRect;
+ Rectangle aMtfBoundRect;
+ Rectangle aOutputRect;
+ Point a__RotateRef;
+ Region aClipRegion;
+ long nRotateAngle;
+ double nSin;
+ double nCos;
+ FASTBOOL bClipRegion;
+
+ // Attribute
+ SdrTextAniKind eAniKind;
+ SdrTextAniDirection eDirection;
+ FASTBOOL bStartInside;
+ FASTBOOL bStopInside;
+ USHORT nMaxCount;
+ USHORT nDelay;
+ short nAmount;
+
+private:
+ void ImpInsertInfo(ImpMtfAnimationInfo* pE) { aInfoList.Insert(pE,CONTAINER_APPEND); }
+ void ImpClearInfoList();
+ DECL_LINK(ImpTimerHdl,AutoTimer*);
+
+public:
+ ULONG GetInfoCount() const { return aInfoList.Count(); }
+ const ImpMtfAnimationInfo* GetInfo(ULONG nPos) const { return (ImpMtfAnimationInfo*)aInfoList.GetObject(nPos); }
+ ImpMtfAnimationInfo* GetInfo(ULONG nPos) { return (ImpMtfAnimationInfo*)aInfoList.GetObject(nPos); }
+ ULONG FindInfo(const OutputDevice& rOut, const Point& rOffset, long nExtraData) const;
+ void RemoveInfo(ULONG nNum) { delete (ImpMtfAnimationInfo*)aInfoList.Remove(nNum); }
+
+ ImpSdrMtfAnimator();
+ ~ImpSdrMtfAnimator();
+ void SetAnimationNotifyHdl(const Link& rLink) { aNotifyLink=rLink; }
+ const Link& GetAnimationNotifyHdl() const { return aNotifyLink; }
+ void SetGDIMetaFile(GDIMetaFile* pMetaFile);
+ const GDIMetaFile* GetGDIMetaFile() const { return pMtf; }
+ ImpMtfAnimationInfo* Start(OutputDevice& rOutDev, const Point& rOffset, long nExtraData=0);
+ void Stop();
+ void Stop(OutputDevice& rOutDev);
+ void Stop(OutputDevice& rOutDev, const Point& rOffset);
+ void SetAttributes(const SfxItemSet& rSet);
+ void SetOutputRect(const Rectangle& rRect) { aOutputRect=rRect; }
+ void SetScrollFrameRect(const Rectangle& rRect) { aScrollFrameRect=rRect; }
+ void SetMtfFrameRect(const Rectangle& rRect) { aMtfBoundRect=rRect; }
+ void SetRotateRef(const Point& rPt) { a__RotateRef=rPt; }
+ void SetRotateAngle(long nWink);
+ void SetClipRegion() { bClipRegion=FALSE; }
+ void SetClipRegion(const Region& rReg) { aClipRegion=rReg; bClipRegion=TRUE; }
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDSCROL_HXX
+
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
new file mode 100644
index 0000000000..acee7b6da6
--- /dev/null
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -0,0 +1,794 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdsnpv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "svdsnpv.hxx"
+#include <math.h>
+
+#include "svdetc.hxx"
+#include "svdio.hxx"
+#include "svdobj.hxx"
+#include "svdpagv.hxx"
+#include "svdpage.hxx"
+#include "svditer.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@ @@ @@@@ @@@@@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@ @@@@@@ @@@@@@ @@@@@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@@ @@ @@ @@ @@@ @@ @@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@@@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrSnapView::ClearVars()
+{
+ nMagnSizPix=4;
+ bSnapEnab=TRUE;
+ bGridSnap=TRUE;
+ bSnapTo1Pix=TRUE;
+ bBordSnap=TRUE;
+ bHlplSnap=TRUE;
+ bOFrmSnap=TRUE;
+ bOPntSnap=FALSE;
+ bOConSnap=TRUE;
+ bMoveMFrmSnap=TRUE;
+ bMoveOFrmSnap=TRUE;
+ bMoveOPntSnap=TRUE;
+ bMoveOConSnap=TRUE;
+ bMoveSnapOnlyTopLeft=FALSE;
+ bSetPageOrg=FALSE;
+ bOrtho=FALSE;
+ bBigOrtho=TRUE;
+ nSnapAngle=1500;
+ bAngleSnapEnab=FALSE;
+ bMoveOnlyDragging=FALSE;
+ bSlantButShear=FALSE;
+ bCrookNoContortion=FALSE;
+ eCrookMode=SDRCROOK_ROTATE;
+ bHlplFixed=FALSE;
+ pDragHelpLinePV=NULL;
+ nDragHelpLineNum=0;
+ bDragHelpLine=FALSE;
+ bEliminatePolyPoints=FALSE;
+ nEliminatePolyPointLimitAngle=0;
+}
+
+SdrSnapView::SdrSnapView(SdrModel* pModel1, OutputDevice* pOut):
+ SdrPaintView(pModel1,pOut)
+{
+ ClearVars();
+}
+
+SdrSnapView::SdrSnapView(SdrModel* pModel1, ExtOutputDevice* pXOut):
+ SdrPaintView(pModel1,pXOut)
+{
+ ClearVars();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrSnapView::IsAction() const
+{
+ return IsSetPageOrg() || IsDragHelpLine() || SdrPaintView::IsAction();
+}
+
+void SdrSnapView::MovAction(const Point& rPnt)
+{
+ aLastMausPosNoSnap=rPnt;
+ SdrPaintView::MovAction(rPnt);
+ if (IsSetPageOrg()) {
+ MovSetPageOrg(rPnt);
+ }
+ if (IsDragHelpLine()) {
+ MovDragHelpLine(rPnt);
+ }
+}
+
+void SdrSnapView::EndAction()
+{
+ if (IsSetPageOrg()) {
+ EndSetPageOrg();
+ }
+ if (IsDragHelpLine()) {
+ EndDragHelpLine();
+ }
+ SdrPaintView::EndAction();
+}
+
+void SdrSnapView::BckAction()
+{
+ BrkSetPageOrg();
+ BrkDragHelpLine();
+ SdrPaintView::BckAction();
+}
+
+void SdrSnapView::BrkAction()
+{
+ BrkSetPageOrg();
+ BrkDragHelpLine();
+ SdrPaintView::BrkAction();
+}
+
+void SdrSnapView::TakeActionRect(Rectangle& rRect) const
+{
+ if (IsSetPageOrg() || IsDragHelpLine()) {
+ rRect=Rectangle(aDragStat.GetNow(),aDragStat.GetNow());
+ } else {
+ SdrPaintView::TakeActionRect(rRect);
+ }
+}
+
+void SdrSnapView::ToggleShownXor(OutputDevice* pOut, const Region* pRegion) const
+{
+ SdrPaintView::ToggleShownXor(pOut,pRegion);
+ if (IsSetPageOrg()) {
+ DrawSetPageOrg(pOut);
+ }
+ if (IsDragHelpLine()) {
+ DrawDragHelpLine(pOut);
+ }
+}
+
+void SdrSnapView::SnapMove()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+Point SdrSnapView::GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const
+{
+ Point aPt(rPnt);
+ SnapPos(aPt,pPV);
+ return aPt;
+}
+
+#define NOT_SNAPPED 0x7FFFFFFF
+USHORT SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
+{
+ if (!bSnapEnab) return SDRSNAP_NOTSNAPPED;
+ BOOL bPVOfs=FALSE;
+ long x=rPnt.X();
+ long y=rPnt.Y();
+ long xOffs=0;
+ long yOffs=0;
+ if (pPV==NULL) {
+ bPVOfs=TRUE;
+ pPV=GetPageView(rPnt);
+ if (pPV==NULL) return SDRSNAP_NOTSNAPPED;
+ }
+ bPVOfs=TRUE;
+ // !!!!!!hier stattdessen mal die GridFrames verwenden!!!!!!!!
+ // SdrPage::GetOffset() kann dann entsorgt werden.
+ Point aWriterPageOffset(pPV->GetPage()->GetOffset());
+ xOffs=pPV->GetOffset().X()+aWriterPageOffset.X();
+ yOffs=pPV->GetOffset().Y()+aWriterPageOffset.Y();
+ x-=xOffs;
+ y-=yOffs;
+
+ long dx=NOT_SNAPPED;
+ long dy=NOT_SNAPPED;
+ long dx1,dy1;
+ long mx=aMagnSiz.Width();
+ long my=aMagnSiz.Height();
+ if (bHlplVisible && bHlplSnap && !bDragHelpLine) {
+ const SdrHelpLineList& rHLL=pPV->GetHelpLines();
+ USHORT nAnz=rHLL.GetCount();
+ for (USHORT i=nAnz; i>0;) {
+ i--;
+ const SdrHelpLine& rHL=rHLL[i];
+ const Point& rPos=rHL.GetPos();
+ switch (rHL.GetKind()) {
+ case SDRHELPLINE_VERTICAL: {
+ long a=x-rPos.X();
+ if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; }
+ } break;
+ case SDRHELPLINE_HORIZONTAL: {
+ long b=y-rPos.Y();
+ if (Abs(b)<=my) { dy1=-b; if (Abs(dy1)<Abs(dy)) dy=dy1; }
+ } break;
+ case SDRHELPLINE_POINT: {
+ long a=x-rPos.X();
+ long b=y-rPos.Y();
+ if (Abs(a)<=mx && Abs(b)<=my) {
+ dx1=-a; dy1=-b;
+ if (Abs(dx1)<Abs(dx) && Abs(dy1)<Abs(dy)) { dx=dx1; dy=dy1; }
+ }
+ } break;
+ } // switch
+ }
+ }
+ if (bBordVisible && bBordSnap) {
+ SdrPage* pPage=pPV->GetPage();
+ long xs=pPage->GetWdt();
+ long ys=pPage->GetHgt();
+ long lft=pPage->GetLftBorder();
+ long rgt=pPage->GetRgtBorder();
+ long upp=pPage->GetUppBorder();
+ long lwr=pPage->GetLwrBorder();
+ long a;
+ a=x- lft ; if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // linker Rand
+ a=x-(xs-rgt); if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // rechter Rand
+ a=x ; if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // linke Papierkante
+ a=x- xs ; if (Abs(a)<=mx) { dx1=-a; if (Abs(dx1)<Abs(dx)) dx=dx1; } // rechte Papierkante
+ a=y- upp ; if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // linker Rand
+ a=y-(ys-lwr); if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // rechter Rand
+ a=y ; if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // linke Papierkante
+ a=y- ys ; if (Abs(a)<=my) { dy1=-a; if (Abs(dy1)<Abs(dy)) dy=dy1; } // rechte Papierkante
+ }
+ if (bOFrmSnap || bOPntSnap /*|| (bConnVisible && bOConSnap)*/) {
+ ULONG nMaxPointSnapCount=200;
+ ULONG nMaxFrameSnapCount=200;
+ SdrObjListIter aIter(*pPV->GetPage(),IM_FLAT/*IM_DEEPNOGROUPS*/,TRUE);
+ while (aIter.IsMore() && (nMaxPointSnapCount>0 || nMaxFrameSnapCount>0)) {
+ SdrObject* pO=aIter.Next();
+ Rectangle aRect(pO->GetBoundRect());
+ aRect.Left ()-=mx;
+ aRect.Right ()+=mx;
+ aRect.Top ()-=my;
+ aRect.Bottom()+=my;
+ if (aRect.IsInside(rPnt)) {
+ if (bOPntSnap && nMaxPointSnapCount>0) {
+ USHORT nAnz=pO->GetSnapPointCount();
+ for (USHORT i=0; i<nAnz && nMaxPointSnapCount>0; i++) {
+ Point aP(pO->GetSnapPoint(i));
+ dx1=x-aP.X();
+ dy1=y-aP.Y();
+ if (Abs(dx1)<=mx && Abs(dy1)<=my && Abs(dx1)<Abs(dx) && Abs(dy1)<Abs(dy)) {
+ dx=-dx1;
+ dy=-dy1;
+ }
+ nMaxPointSnapCount--;
+ }
+ }
+ if (bOFrmSnap && nMaxFrameSnapCount>0) {
+ Rectangle aLog(pO->GetSnapRect());
+ Rectangle aR1(aLog);
+ aR1.Left ()-=mx;
+ aR1.Right ()+=mx;
+ aR1.Top ()-=my;
+ aR1.Bottom()+=my;
+ if (aR1.IsInside(rPnt)) {
+ if (Abs(x-aLog.Left ())<=mx) { dx1=-(x-aLog.Left ()); if (Abs(dx1)<Abs(dx)) dx=dx1; }
+ if (Abs(x-aLog.Right ())<=mx) { dx1=-(x-aLog.Right ()); if (Abs(dx1)<Abs(dx)) dx=dx1; }
+ if (Abs(y-aLog.Top ())<=my) { dy1=-(y-aLog.Top ()); if (Abs(dy1)<Abs(dy)) dy=dy1; }
+ if (Abs(y-aLog.Bottom())<=my) { dy1=-(y-aLog.Bottom()); if (Abs(dy1)<Abs(dy)) dy=dy1; }
+ }
+ nMaxFrameSnapCount--;
+ }
+ }
+ }
+ }
+ if(bGridSnap)
+ {
+ double fSnapWidth = aSnapWdtX;
+ if(dx == NOT_SNAPPED && fSnapWidth != 0.0)
+ {
+ double fx = (double)x;
+
+ // round statt trunc
+ if(fx - (double)pPV->GetPageOrigin().X() >= 0.0)
+ fx += fSnapWidth / 2.0;
+ else
+ fx -= fSnapWidth / 2.0;
+
+ x = (long)((fx - (double)pPV->GetPageOrigin().X()) / fSnapWidth);
+ x = (long)((double)x * fSnapWidth + (double)pPV->GetPageOrigin().X());
+ dx = 0;
+ }
+ fSnapWidth = aSnapWdtY;
+ if(dy == NOT_SNAPPED && fSnapWidth)
+ {
+ double fy = (double)y;
+
+ // round statt trunc
+ if(fy - (double)pPV->GetPageOrigin().Y() >= 0.0)
+ fy += fSnapWidth / 2.0;
+ else
+ fy -= fSnapWidth / 2.0;
+
+ y = (long)((fy - (double)pPV->GetPageOrigin().Y()) / fSnapWidth);
+ y = (long)((double)y * fSnapWidth + (double)pPV->GetPageOrigin().Y());
+ dy = 0;
+ }
+ }
+ BOOL bRet=SDRSNAP_NOTSNAPPED;
+ if (dx==NOT_SNAPPED) dx=0; else bRet|=SDRSNAP_XSNAPPED;
+ if (dy==NOT_SNAPPED) dy=0; else bRet|=SDRSNAP_YSNAPPED;
+ if (bPVOfs) {
+ x+=xOffs;
+ y+=yOffs;
+ }
+ rPnt.X()=x+dx;
+ rPnt.Y()=y+dy;
+ return bRet;
+}
+
+void SdrSnapView::CheckSnap(const Point& rPt, const SdrPageView* pPV,
+ long& nBestXSnap, long& nBestYSnap,
+ BOOL& bXSnapped, BOOL& bYSnapped) const
+{
+ Point aPt(rPt);
+ USHORT nRet=SnapPos(aPt,pPV);
+ aPt-=rPt;
+ if ((nRet & SDRSNAP_XSNAPPED) !=0) {
+ if (bXSnapped) {
+ if (Abs(aPt.X())<Abs(nBestXSnap)) {
+ nBestXSnap=aPt.X();
+ }
+ } else {
+ nBestXSnap=aPt.X();
+ bXSnapped=TRUE;
+ }
+ }
+ if ((nRet & SDRSNAP_YSNAPPED) !=0) {
+ if (bYSnapped) {
+ if (Abs(aPt.Y())<Abs(nBestYSnap)) {
+ nBestYSnap=aPt.Y();
+ }
+ } else {
+ nBestYSnap=aPt.Y();
+ bYSnapped=TRUE;
+ }
+ }
+}
+
+USHORT SdrSnapView::SnapRect(const Rectangle& rRect, const SdrPageView* pPV, long& rDX, long& rDY) const
+{
+ long nBestXSnap=0;
+ long nBestYSnap=0;
+ BOOL bXSnapped=FALSE;
+ BOOL bYSnapped=FALSE;
+ CheckSnap(rRect.TopLeft() ,pPV,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
+ if (!bMoveSnapOnlyTopLeft) {
+ CheckSnap(rRect.TopRight() ,pPV,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
+ CheckSnap(rRect.BottomLeft() ,pPV,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
+ CheckSnap(rRect.BottomRight(),pPV,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
+ }
+ rDX=nBestXSnap;
+ rDY=nBestYSnap;
+ USHORT nRet=0;
+ if (bXSnapped) nRet+=SDRSNAP_XSNAPPED;
+ if (bYSnapped) nRet+=SDRSNAP_YSNAPPED;
+ return nRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrSnapView::BegSetPageOrg(const Point& rPnt, OutputDevice* pOut, short nMinMov)
+{
+ BrkAction();
+ aAni.Reset();
+ aAni.SetCrossHair(TRUE);
+ aDragStat.Reset(GetSnapPos(rPnt,NULL));
+ aDragStat.SetMinMove(ImpGetMinMovLogic(nMinMov,pOut));
+ if (nMinMov==0) aDragStat.SetMinMoved();
+ pDragWin=pOut;
+ bSetPageOrg=TRUE;
+ if (aDragStat.IsMinMoved()) ShowSetPageOrg(pOut);
+ return TRUE;
+}
+
+void SdrSnapView::MovSetPageOrg(const Point& rPnt)
+{
+ if (bSetPageOrg) {
+ if (aDragStat.IsMinMoved()) HideSetPageOrg(pDragWin);
+ aDragStat.NextMove(GetSnapPos(rPnt,NULL));
+ if (aDragStat.CheckMinMoved(rPnt)) ShowSetPageOrg(pDragWin);
+ }
+}
+
+BOOL SdrSnapView::EndSetPageOrg()
+{
+ BOOL bRet=FALSE;
+ if (bSetPageOrg) {
+ HideSetPageOrg(pDragWin);
+ bSetPageOrg=FALSE;
+ Point aPnt=aDragStat.GetNow();
+ SdrPageView* pPV=HitPage(aPnt);
+ if (pPV!=NULL) {
+ aPnt-=pPV->GetOffset();
+ pPV->SetPageOrigin(aPnt);
+ bRet=TRUE;
+ }
+ }
+ return bRet;
+}
+
+void SdrSnapView::BrkSetPageOrg()
+{
+ if (bSetPageOrg) {
+ HideSetPageOrg(pDragWin);
+ bSetPageOrg=FALSE;
+ }
+}
+
+void SdrSnapView::ShowSetPageOrg(OutputDevice* pOut)
+{
+ if (bSetPageOrg && !aDragStat.IsShown()) {
+ DrawSetPageOrg(pOut);
+ aDragStat.SetShown(TRUE);
+ aAni.Start();
+ }
+}
+
+void SdrSnapView::HideSetPageOrg(OutputDevice* pOut)
+{
+ if (bSetPageOrg && aDragStat.IsShown()) {
+ aAni.Stop();
+ DrawSetPageOrg(pOut);
+ aDragStat.SetShown(FALSE);
+ }
+}
+
+void SdrSnapView::DrawSetPageOrg(OutputDevice* pOut) const
+{
+ if (bSetPageOrg) {
+ aAni.SetP1(aDragStat.GetNow());
+ aAni.Invert(pOut);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrSnapView::PickHelpLine(const Point& rPnt, short nTol, const OutputDevice& rOut, USHORT& rnHelpLineNum, SdrPageView*& rpPV) const
+{
+ rpPV=NULL;
+ nTol=ImpGetHitTolLogic(nTol,&rOut);
+ for (USHORT nv=GetPageViewCount(); nv>0;) {
+ nv--;
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ Point aPnt(rPnt);
+ aPnt-=pPV->GetOffset();
+ USHORT nIndex=pPV->GetHelpLines().HitTest(aPnt,USHORT(nTol),rOut);
+ if (nIndex!=SDRHELPLINE_NOTFOUND) {
+ rpPV=pPV;
+ rnHelpLineNum=nIndex;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+BOOL SdrSnapView::BegDragHelpLine(USHORT nHelpLineNum, SdrPageView* pPV, OutputDevice* pOut, short nMinMov)
+{
+ BOOL bRet=FALSE;
+ if (bHlplFixed) return FALSE;
+ BrkAction();
+ if (pPV!=NULL && nHelpLineNum<pPV->GetHelpLines().GetCount()) {
+ pDragHelpLinePV=pPV;
+ nDragHelpLineNum=nHelpLineNum;
+ aDragHelpLine=pPV->GetHelpLines()[nHelpLineNum];
+ Point aPnt(aDragHelpLine.GetPos());
+ aPnt+=pPV->GetOffset();
+ aDragHelpLine.SetPos(aPnt);
+ pDragWin=pOut;
+ aDragStat.Reset(GetSnapPos(aPnt,pPV));
+ aDragStat.SetMinMove(ImpGetMinMovLogic(nMinMov,pOut));
+ if (nMinMov==0) aDragStat.SetMinMoved();
+ bDragHelpLine=TRUE;
+ if (aDragStat.IsMinMoved()) ShowDragHelpLine(pOut);
+ bRet=TRUE;
+ }
+ return bRet;
+}
+
+BOOL SdrSnapView::BegDragHelpLine(const Point& rPnt, SdrHelpLineKind eNewKind, OutputDevice* pOut, short nMinMov)
+{
+ BOOL bRet=FALSE;
+ BrkAction();
+ if (GetPageViewCount()>0) {
+ pDragHelpLinePV=NULL;
+ nDragHelpLineNum=0xFFFF;
+ aDragStat.Reset(GetSnapPos(rPnt,NULL));
+ aDragStat.SetMinMove(ImpGetMinMovLogic(nMinMov,pOut));
+ if (nMinMov==0) aDragStat.SetMinMoved();
+ aDragHelpLine.SetPos(aDragStat.GetNow());
+ aDragHelpLine.SetKind(eNewKind);
+ pDragWin=pOut;
+ bDragHelpLine=TRUE;
+ if (aDragStat.IsMinMoved()) ShowDragHelpLine(pOut);
+ bRet=TRUE;
+ }
+ return bRet;
+}
+
+void SdrSnapView::SetDraggedHelpLineKind(SdrHelpLineKind eNewKind)
+{
+ if (bDragHelpLine) {
+ BOOL bVis=aDragStat.IsShown();
+ HideDragHelpLine(pDragWin);
+ aDragHelpLine.SetKind(eNewKind);
+ aDragStat.SetMinMoved();
+ ShowDragHelpLine(pDragWin);
+ }
+}
+
+void SdrSnapView::MovDragHelpLine(const Point& rPnt)
+{
+ if (bDragHelpLine && aDragStat.CheckMinMoved(rPnt)) {
+ Point aPnt(GetSnapPos(rPnt,NULL));
+ if (aPnt!=aDragStat.GetNow()) {
+ if (aDragStat.IsMinMoved()) HideDragHelpLine(pDragWin);
+ aDragStat.NextMove(aPnt);
+ aDragHelpLine.SetPos(aDragStat.GetNow());
+ if (aDragStat.CheckMinMoved(rPnt)) ShowDragHelpLine(pDragWin);
+ }
+ }
+}
+
+BOOL SdrSnapView::EndDragHelpLine()
+{
+ BOOL bRet=FALSE;
+ if (bDragHelpLine) {
+ if (aDragStat.IsMinMoved()) {
+ HideDragHelpLine(pDragWin);
+ if (pDragHelpLinePV!=NULL) {
+ Point aPnt(aDragStat.GetNow());
+ aPnt-=pDragHelpLinePV->GetOffset(); // an die PageView anpassen
+ aDragHelpLine.SetPos(aPnt);
+ pDragHelpLinePV->SetHelpLine(nDragHelpLineNum,aDragHelpLine);
+ bRet=TRUE;
+ } else { // ansonsten neue Hilfslinie
+ Point aPnt(aDragStat.GetNow());
+ SdrPageView* pPV=GetPageView(aPnt);
+ if (pPV!=NULL) {
+ aPnt-=pPV->GetOffset(); // an die PageView anpassen
+ aDragHelpLine.SetPos(aPnt);
+ pDragHelpLinePV=pPV;
+ nDragHelpLineNum=pPV->GetHelpLines().GetCount();
+ pPV->InsertHelpLine(aDragHelpLine);
+ bRet=TRUE;
+ }
+ }
+ bDragHelpLine=FALSE;
+ } else {
+ BrkDragHelpLine();
+ }
+ }
+ return bRet;
+}
+
+void SdrSnapView::BrkDragHelpLine()
+{
+ if (bDragHelpLine) {
+ HideDragHelpLine(pDragWin);
+ bDragHelpLine=FALSE;
+ pDragHelpLinePV=NULL;
+ }
+}
+
+void SdrSnapView::ShowDragHelpLine(OutputDevice* pOut)
+{
+ if (bDragHelpLine && !aDragStat.IsShown()) {
+ DrawDragHelpLine(pOut);
+ aDragStat.SetShown(TRUE);
+ }
+}
+
+void SdrSnapView::HideDragHelpLine(OutputDevice* pOut)
+{
+ if (bDragHelpLine && aDragStat.IsShown()) {
+ DrawDragHelpLine(pOut);
+ aDragStat.SetShown(FALSE);
+ }
+}
+
+void SdrSnapView::DrawDragHelpLine(OutputDevice* pOut) const
+{
+ if (bDragHelpLine)
+ {
+ USHORT i=0;
+ do
+ {
+ OutputDevice* pO=pOut;
+ if (pO==NULL)
+ {
+ pO=GetWin(i);
+ i++;
+ }
+ if (pO!=NULL)
+ {
+ RasterOp eRop0=pO->GetRasterOp();
+ pO->SetRasterOp(ROP_INVERT);
+ Color aColor0( pO->GetLineColor() );
+ Color aBlackColor( COL_BLACK );
+ pO->SetLineColor( aBlackColor );
+ aDragHelpLine.Draw(*pO,Point());
+ pO->SetRasterOp(eRop0);
+ pO->SetLineColor( aColor0 );
+ }
+ } while (pOut==NULL && i<GetWinCount());
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrSnapView::WriteRecords(SvStream& rOut) const
+{
+ SdrPaintView::WriteRecords(rOut);
+ {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWSNAP);
+ rOut<<aMagnSiz;
+ rOut<<aSnapSiz;
+
+ rOut << (BOOL)bSnapEnab;
+ rOut << (BOOL)bGridSnap;
+ rOut << (BOOL)bBordSnap;
+ rOut << (BOOL)bHlplSnap;
+ rOut << (BOOL)bOFrmSnap;
+ rOut << (BOOL)bOPntSnap;
+ rOut << (BOOL)bOConSnap;
+ rOut << (BOOL)bMoveMFrmSnap;
+ rOut << (BOOL)bMoveOFrmSnap;
+ rOut << (BOOL)bMoveOPntSnap;
+ rOut << (BOOL)bMoveOConSnap;
+ rOut << (BOOL)bHlplFixed;
+
+ rOut<<nMagnSizPix;
+
+ rOut << (BOOL)bSnapTo1Pix;
+ rOut << (BOOL)bMoveSnapOnlyTopLeft;
+
+ rOut<<aSnapWdtX;
+ rOut<<aSnapWdtY;
+ } {
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWORTHO);
+
+ rOut << (BOOL)bOrtho;
+ rOut << (BOOL)bBigOrtho;
+
+ rOut<<nSnapAngle;
+
+ rOut << (BOOL)bAngleSnapEnab;
+ rOut << (BOOL)bMoveOnlyDragging;
+ rOut << (BOOL)bSlantButShear;
+ rOut << (BOOL)bCrookNoContortion;
+
+ rOut<<USHORT(eCrookMode);
+ }
+}
+
+BOOL SdrSnapView::ReadRecord(const SdrIOHeader& rViewHead,
+ const SdrNamedSubRecord& rSubHead,
+ SvStream& rIn)
+{
+ BOOL bRet=FALSE;
+ if (rSubHead.GetInventor()==SdrInventor)
+ {
+ bRet=TRUE;
+ BOOL bZwi;
+
+ switch (rSubHead.GetIdentifier())
+ {
+ case SDRIORECNAME_VIEWSNAP:
+ {
+ rIn>>aMagnSiz;
+ rIn>>aSnapSiz;
+
+ rIn >> bZwi; bSnapEnab = bZwi;
+ rIn >> bZwi; bGridSnap = bZwi;
+ rIn >> bZwi; bBordSnap = bZwi;
+ rIn >> bZwi; bHlplSnap = bZwi;
+ rIn >> bZwi; bOFrmSnap = bZwi;
+ rIn >> bZwi; bOPntSnap = bZwi;
+ rIn >> bZwi; bOConSnap = bZwi;
+ rIn >> bZwi; bMoveMFrmSnap = bZwi;
+ rIn >> bZwi; bMoveOFrmSnap = bZwi;
+ rIn >> bZwi; bMoveOPntSnap = bZwi;
+ rIn >> bZwi; bMoveOConSnap = bZwi;
+
+ if (rSubHead.GetBytesLeft()>0)
+ {
+ rIn >> bZwi; bHlplFixed = bZwi; // kam erst spaeter dazu
+ }
+ if (rSubHead.GetBytesLeft()>0)
+ {
+ // kam erst spaeter dazu
+ rIn>>nMagnSizPix;
+ rIn >> bZwi; bSnapTo1Pix = bZwi;
+ }
+ if (rSubHead.GetBytesLeft()>0)
+ {
+ // kam erst spaeter dazu
+ rIn >> bZwi; bMoveSnapOnlyTopLeft = bZwi;
+ }
+ if (rSubHead.GetBytesLeft()>0)
+ {
+ // kam erst spaeter dazu
+ rIn>>aSnapWdtX;
+ rIn>>aSnapWdtY;
+ }
+ } break;
+ case SDRIORECNAME_VIEWORTHO:
+ {
+ rIn >> bZwi; bOrtho = bZwi;
+ rIn >> bZwi; bBigOrtho = bZwi;
+
+ rIn>>nSnapAngle;
+
+ if (rSubHead.GetBytesLeft()>0)
+ {
+ // kam erst spaeter dazu
+ rIn >> bZwi; bAngleSnapEnab = bZwi;
+ rIn >> bZwi; bMoveOnlyDragging = bZwi;
+ rIn >> bZwi; bSlantButShear = bZwi;
+ rIn >> bZwi; bCrookNoContortion = bZwi;
+ }
+ if (rSubHead.GetBytesLeft()>0)
+ {
+ // kam erst spaeter dazu
+ USHORT nCrookMode;
+ rIn>>nCrookMode;
+ eCrookMode=SdrCrookMode(nCrookMode);
+ }
+ } break;
+ default: bRet=FALSE;
+ }
+ }
+ if (!bRet) bRet=SdrPaintView::ReadRecord(rViewHead,rSubHead,rIn);
+ return bRet;
+}
+
diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src
new file mode 100644
index 0000000000..f633e46cd4
--- /dev/null
+++ b/svx/source/svdraw/svdstr.src
@@ -0,0 +1,16507 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdstr.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+/* StarView resource file */
+
+#include "svdstr.hrc"
+ // Ab hier gecachte Strings
+String STR_ObjNameSingulNONE
+{
+ Text = "Zeichenobjekt" ;
+ Text [ ENGLISH ] = "drawobject" ;
+ Text [ norwegian ] = "Tegneobjekt" ;
+ Text [ italian ] = "Oggetto di disegno" ;
+ Text [ portuguese_brazilian ] = "Desenhar objeto" ;
+ Text [ portuguese ] = "Objecto de desenho" ;
+ Text [ finnish ] = "Piirto-objekti" ;
+ Text [ danish ] = "Tegneobjekt" ;
+ Text [ french ] = "Objet de dessin" ;
+ Text [ swedish ] = "Ritobjekt" ;
+ Text [ dutch ] = "Tekenobject" ;
+ Text [ spanish ] = "Objeto de dibujo" ;
+ Text [ english_us ] = "draw object" ;
+ Text[ chinese_simplified ] = "»æͼ¶ÔÏó";
+ Text[ russian ] = "Ãðàôè÷åñêèé îáúåêò";
+ Text[ polish ] = "Obiekt graficzny";
+ Text[ japanese ] = "}Œ`•`‰æµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ø¹Ïª«¥ó";
+ Text[ arabic ] = "ßÇÆä ÑÓæãí";
+ Text[ dutch ] = "Tekenobject";
+ Text[ chinese_simplified ] = "»æͼ¶ÔÏó";
+ Text[ greek ] = "Aíôéêåßìåíï ó÷åäßáóçò";
+ Text[ korean ] = "±×¸®±â °³Ã¼";
+ Text[ turkish ] = "Çizim nesnesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralNONE
+{
+ Text = "Zeichenobjekte" ;
+ Text [ ENGLISH ] = "drawobjects" ;
+ Text [ norwegian ] = "Tegneobjektr" ;
+ Text [ italian ] = "Oggetti di disegno" ;
+ Text [ portuguese_brazilian ] = "Desenhar objetos" ;
+ Text [ portuguese ] = "Objectos de desenho" ;
+ Text [ finnish ] = "Piirto-objektit" ;
+ Text [ danish ] = "Tegneobjekter" ;
+ Text [ french ] = "Objets de dessin" ;
+ Text [ swedish ] = "Ritobjekt" ;
+ Text [ dutch ] = "Tekenobjecten" ;
+ Text [ spanish ] = "Objetos de dibujo" ;
+ Text [ english_us ] = "draw objects" ;
+ Text[ chinese_simplified ] = "»æͼ¶ÔÏó";
+ Text[ russian ] = "Ãðàôè÷åñêèå îáúåêòû";
+ Text[ polish ] = "Obiekty graficzne";
+ Text[ japanese ] = "}Œ`•`‰æµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ø¹Ïª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ÑÓæãíÉ";
+ Text[ dutch ] = "Tekenobjecten";
+ Text[ chinese_simplified ] = "»æͼ¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíá ó÷åäßáóçò";
+ Text[ korean ] = "±×¸®±â °³Ã¼";
+ Text[ turkish ] = "Çizim nesnesi";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulGRUP
+{
+ Text = "Gruppenobjekt" ;
+ Text [ ENGLISH ] = "groupobject" ;
+ Text [ norwegian ] = "Gruppeobjekter" ;
+ Text [ italian ] = "Oggetto di gruppo" ;
+ Text [ portuguese_brazilian ] = "Agrupar objeto" ;
+ Text [ portuguese ] = "Objecto de grupo" ;
+ Text [ finnish ] = "Ryhmäohjekti" ;
+ Text [ danish ] = "Gruppeobjekt" ;
+ Text [ french ] = "Objet de groupe" ;
+ Text [ swedish ] = "Gruppobjekt" ;
+ Text [ dutch ] = "Groepsobject" ;
+ Text [ spanish ] = "Objeto de grupo" ;
+ Text [ english_us ] = "group object" ;
+ Text[ chinese_simplified ] = "·Ö×é¶ÔÏó";
+ Text[ russian ] = "Ãðóïïîâîé îáúåêò";
+ Text[ polish ] = "Obiekty grupy";
+ Text[ japanese ] = "¸ÞÙ°Ìß µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "¸s²Õª«¥ó";
+ Text[ arabic ] = "ßÇÆä ãÌãæÚÉ";
+ Text[ dutch ] = "Groepsobject";
+ Text[ chinese_simplified ] = "·Ö×é¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíï ïìÜäáò";
+ Text[ korean ] = "±×·ì °³Ã¼";
+ Text[ turkish ] = "Grup nesnesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRUP
+{
+ Text = "Gruppenobjekte" ;
+ Text [ ENGLISH ] = "groupobjects" ;
+ Text [ norwegian ] = "Gruppeobjekter" ;
+ Text [ italian ] = "Oggetti di gruppo" ;
+ Text [ portuguese_brazilian ] = "Agrupar objetos" ;
+ Text [ portuguese ] = "Objectos de grupo" ;
+ Text [ finnish ] = "Ryhmäobjektit" ;
+ Text [ danish ] = "Gruppeobjekter" ;
+ Text [ french ] = "Objets de groupe" ;
+ Text [ swedish ] = "Gruppobjekt" ;
+ Text [ dutch ] = "Groepsobjecten" ;
+ Text [ spanish ] = "Objetos de grupo" ;
+ Text [ english_us ] = "group objects" ;
+ Text[ chinese_simplified ] = "·Ö×é¶ÔÏó";
+ Text[ russian ] = "Ãðóïïîâûå îáúåêòû";
+ Text[ polish ] = "Obiekty grupy";
+ Text[ japanese ] = "¸ÞÙ°Ìß µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "¸s²Õª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ãÌãæÚÉ";
+ Text[ dutch ] = "Groepsobjecten";
+ Text[ chinese_simplified ] = "·Ö×é¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíá ïìÜäáò";
+ Text[ korean ] = "±×·ì °³Ã¼";
+ Text[ turkish ] = "Grup nesneleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulGRUPEMPTY
+{
+ Text = "leeres Gruppenobjekt" ;
+ Text [ ENGLISH ] = "empty groupobject" ;
+ Text [ portuguese ] = "Objecto de grupo vazio" ;
+ Text [ english_us ] = "blank group object" ;
+ Text [ portuguese_brazilian ] = "leeres Gruppenobjekt" ;
+ Text [ swedish ] = "tomt gruppobjekt" ;
+ Text [ danish ] = "Tomt gruppeobjekt" ;
+ Text [ italian ] = "Gruppo di oggetti vuoto" ;
+ Text [ spanish ] = "Objeto de grupo vacío" ;
+ Text [ french ] = "Objet groupé vide" ;
+ Text [ dutch ] = "Leeg groepsobject" ;
+ Text[ chinese_simplified ] = "¿ÕµÄ·Ö×é¶ÔÏó";
+ Text[ russian ] = "ïóñòîé ãðóïïîâîé îáúåêò";
+ Text[ polish ] = "pusty obiekt grupy";
+ Text[ japanese ] = "‹ó‚̸ÞÙ°Ìß µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ªÅªº¸s²Õª«¥ó";
+ Text[ arabic ] = "ßÇÆä ÊÌãíÚ ÝÇÑÛ";
+ Text[ dutch ] = "Leeg groepsobject";
+ Text[ chinese_simplified ] = "¿ÕµÄ·Ö×é¶ÔÏó";
+ Text[ greek ] = "êåíü áíôéêåßìåíï ïìÜäáò";
+ Text[ korean ] = "ºñ¾î ÀÖ´Â ±×·ì °³Ã¼";
+ Text[ turkish ] = "Boþ grup nesnesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRUPEMPTY
+{
+ Text = "leere Gruppenobjekte" ;
+ Text [ ENGLISH ] = "empty groupobjects" ;
+ Text [ portuguese ] = "Objectos de grupo vazios" ;
+ Text [ english_us ] = "Blank group objects" ;
+ Text [ portuguese_brazilian ] = "leere Gruppenobjekte" ;
+ Text [ swedish ] = "tomma gruppobjekt" ;
+ Text [ danish ] = "Tomme gruppeobjekter" ;
+ Text [ italian ] = "Gruppi di oggetti vuoti" ;
+ Text [ spanish ] = "Objetos de grupo vacíos" ;
+ Text [ french ] = "Objets de groupe vides" ;
+ Text [ dutch ] = "Lege groepsobjecten" ;
+ Text[ chinese_simplified ] = "¿Õ°×µÄ·Ö×é¶ÔÏó";
+ Text[ russian ] = "ïóñòûå ãðóïïîâûå îáúåêòû";
+ Text[ polish ] = "Puste obiekty grupy";
+ Text[ japanese ] = "‹ó‚̸ÞÙ°Ìß µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ªÅ¥Õªº¸s²Õª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ÊÌãíÚ ÝÇÑÛÉ";
+ Text[ dutch ] = "Lege groepsobjecten";
+ Text[ chinese_simplified ] = "¿Õ°×µÄ·Ö×é¶ÔÏó";
+ Text[ greek ] = "êåíÜ áíôéêåßìåíá ïìÜäáò";
+ Text[ korean ] = "ºñ¾î ÀÖ´Â ±×·ì °³Ã¼";
+ Text[ turkish ] = "Boþ grup nesneleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulGRUPLNK
+{
+ Text = "verknüpftes Gruppenobjekt" ;
+ Text [ ENGLISH ] = "linked groupobject" ;
+ Text [ portuguese ] = "Objecto de grupo ligado" ;
+ Text [ english_us ] = "Linked group object" ;
+ Text [ portuguese_brazilian ] = "verknüpftes Gruppenobjekt" ;
+ Text [ swedish ] = "länkat gruppobjekt" ;
+ Text [ danish ] = "Kædet gruppeobjekt" ;
+ Text [ italian ] = "Gruppo di oggetti collegato" ;
+ Text [ spanish ] = "Objeto de grupo enlazado" ;
+ Text [ french ] = "Objet groupé lié" ;
+ Text [ dutch ] = "Gekoppeld groepsobject" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄ·Ö×é¶ÔÏó";
+ Text[ russian ] = "ñâÿçàííûé ãðóïïîâîé îáúåêò";
+ Text[ polish ] = "Po³¹czony obiekt grupy";
+ Text[ japanese ] = "Øݸ‚³‚ꂽ¸ÞÙ°Ìß µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "³sµ²ªº¸s²Õª«¥ó";
+ Text[ arabic ] = "ßÇÆä ÊÌãíÚ ãÑÊÈØ";
+ Text[ dutch ] = "Gekoppeld groepsobject";
+ Text[ chinese_simplified ] = "Á´½ÓµÄ·Ö×é¶ÔÏó";
+ Text[ greek ] = "ÓõíäåäåìÝíï áíôéêåßìåíï ïìÜäáò";
+ Text[ korean ] = "¿¬°áµÈ ±×·ì °³Ã¼";
+ Text[ turkish ] = "Baðlantýlý grup nesnesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRUPLNK
+{
+ Text = "verknüpfte Gruppenobjekte" ;
+ Text [ ENGLISH ] = "linked groupobjects" ;
+ Text [ portuguese ] = "Objectos de grupo ligados" ;
+ Text [ english_us ] = "Linked group objects" ;
+ Text [ portuguese_brazilian ] = "verknüpfte Gruppenobjekte" ;
+ Text [ swedish ] = "länkade gruppobjekt" ;
+ Text [ danish ] = "Kædede gruppeobjekter" ;
+ Text [ italian ] = "Gruppi di oggetti collegati" ;
+ Text [ spanish ] = "Objetos de grupo vinculados" ;
+ Text [ french ] = "Objets de groupe liés" ;
+ Text [ dutch ] = "Gekoppelde groepsobjecten" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄ·Ö×é¶ÔÏó";
+ Text[ russian ] = "ñâÿçàííûå ãðóïïîâûå îáúåêòû";
+ Text[ polish ] = "Po³¹czone obiekty grupy";
+ Text[ japanese ] = "Øݸ‚µ‚½¸ÞÙ°Ìß µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "³sµ²ªº¸s²Õª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ÊÌãíÚ ãÑÊÈØÉ";
+ Text[ dutch ] = "Gekoppelde groepsobjecten";
+ Text[ chinese_simplified ] = "Á´½ÓµÄ·Ö×é¶ÔÏó";
+ Text[ greek ] = "ÓõíäåäåìÝíá áíôéêåßìåíá ïìÜäáò";
+ Text[ korean ] = "¿¬°áµÈ ±×·ì °³Ã¼";
+ Text[ turkish ] = "Baðlantýlý grup nesneleri";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulLINE
+{
+ Text = "Linie" ;
+ Text [ ENGLISH ] = "line" ;
+ Text [ norwegian ] = "Linje" ;
+ Text [ italian ] = "Linea" ;
+ Text [ portuguese_brazilian ] = "Linha" ;
+ Text [ portuguese ] = "Linha" ;
+ Text [ finnish ] = "Viiva" ;
+ Text [ danish ] = "Streg" ;
+ Text [ french ] = "Trait" ;
+ Text [ swedish ] = "Linje" ;
+ Text [ dutch ] = "Lijn" ;
+ Text [ spanish ] = "Línea" ;
+ Text [ english_us ] = "Line" ;
+ Text[ chinese_simplified ] = "ÏßÌõ";
+ Text[ russian ] = "Ëèíèÿ";
+ Text[ polish ] = "Linia";
+ Text[ japanese ] = "ü";
+ Text[ chinese_traditional ] = "½u±ø";
+ Text[ arabic ] = "ÎØ";
+ Text[ dutch ] = "Lijn";
+ Text[ chinese_simplified ] = "ÏßÌõ";
+ Text[ greek ] = "ÃñáììÞ";
+ Text[ korean ] = "¼±";
+ Text[ turkish ] = "Çizgi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulLINE_Hori
+{
+ Text = "horizontale Linie" ;
+ Text [ ENGLISH ] = "horizontal line" ;
+ Text [ portuguese ] = "Linha horizontal" ;
+ Text [ english_us ] = "horizontal line" ;
+ Text [ portuguese_brazilian ] = "horizontale Linie" ;
+ Text [ swedish ] = "horisontell linje" ;
+ Text [ danish ] = "Vandret streg" ;
+ Text [ italian ] = "Linea orizzontale" ;
+ Text [ spanish ] = "Línea horizontal" ;
+ Text [ french ] = "Ligne horizontale" ;
+ Text [ dutch ] = "Horizontale lijn" ;
+ Text[ chinese_simplified ] = "ˮƽÏß";
+ Text[ russian ] = "ãîðèçîíòàëüíàÿ ëèíèÿ";
+ Text[ polish ] = "Linia pozioma";
+ Text[ japanese ] = "…•½ü";
+ Text[ chinese_traditional ] = "¤ô¥­½u";
+ Text[ arabic ] = "ÎØ ÃÝÞí";
+ Text[ dutch ] = "Horizontale lijn";
+ Text[ chinese_simplified ] = "ˮƽÏß";
+ Text[ greek ] = "ïñéæüíôéá ãñáììÞ";
+ Text[ korean ] = "¼öÆò¼±";
+ Text[ turkish ] = "Yatay çizgi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulLINE_Vert
+{
+ Text = "vertikale Linie" ;
+ Text [ ENGLISH ] = "vertical line" ;
+ Text [ portuguese ] = "Linha vertical" ;
+ Text [ english_us ] = "Vertical line" ;
+ Text [ portuguese_brazilian ] = "vertikale Linie" ;
+ Text [ swedish ] = "Vertikal linje" ;
+ Text [ danish ] = "Lodret streg" ;
+ Text [ italian ] = "Linea verticale" ;
+ Text [ spanish ] = "Línea vertical" ;
+ Text [ french ] = "Ligne verticale" ;
+ Text [ dutch ] = "Verticale lijn" ;
+ Text[ chinese_simplified ] = "´¹Ö±Ïß";
+ Text[ russian ] = "âåðòèêàëüíàÿ ëèíèÿ";
+ Text[ polish ] = "Linia pionowa";
+ Text[ japanese ] = "‚’¼ü";
+ Text[ chinese_traditional ] = "««ª½½u";
+ Text[ arabic ] = "ÎØ ÑÃÓí";
+ Text[ dutch ] = "Verticale lijn";
+ Text[ chinese_simplified ] = "´¹Ö±Ïß";
+ Text[ greek ] = "êáôáêüñõöç ãñáììÞ";
+ Text[ korean ] = "¼öÁ÷¼±";
+ Text[ turkish ] = "Dikey çizgi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulLINE_Diag
+{
+ Text = "diagonale Linie" ;
+ Text [ ENGLISH ] = "diagonal line" ;
+ Text [ portuguese ] = "Linha diagonal" ;
+ Text [ english_us ] = "diagonal line" ;
+ Text [ portuguese_brazilian ] = "diagonale Linie" ;
+ Text [ swedish ] = "diagonal linje" ;
+ Text [ danish ] = "Diagonal streg" ;
+ Text [ italian ] = "Linea diagonale" ;
+ Text [ spanish ] = "Línea diagonal" ;
+ Text [ french ] = "Ligne diagonale" ;
+ Text [ dutch ] = "Diagonale lijn" ;
+ Text[ chinese_simplified ] = "¶Ô½ÇÏß";
+ Text[ russian ] = "äèàãîíîàëüíàÿ ëèíèÿ";
+ Text[ polish ] = "Przek¹tna";
+ Text[ japanese ] = "‘Ίpü";
+ Text[ chinese_traditional ] = "¹ï¨¤½u";
+ Text[ arabic ] = "ÎØ ÞØÑí";
+ Text[ dutch ] = "Diagonale lijn";
+ Text[ chinese_simplified ] = "¶Ô½ÇÏß";
+ Text[ greek ] = "Äéáãþíéïò ãñáììÞ";
+ Text[ korean ] = "´ë°¢¼±";
+ Text[ turkish ] = "Diyagonal çizgi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralLINE
+{
+ Text = "Linien" ;
+ Text [ ENGLISH ] = "lines" ;
+ Text [ norwegian ] = "Linjer" ;
+ Text [ italian ] = "Linee" ;
+ Text [ portuguese_brazilian ] = "Linhas" ;
+ Text [ portuguese ] = "Linhas" ;
+ Text [ finnish ] = "Viivat" ;
+ Text [ danish ] = "Streger" ;
+ Text [ french ] = "Lignes" ;
+ Text [ swedish ] = "Linjer" ;
+ Text [ dutch ] = "Lijnen" ;
+ Text [ spanish ] = "Líneas" ;
+ Text [ english_us ] = "Lines" ;
+ Text[ chinese_simplified ] = "ÏßÌõ";
+ Text[ russian ] = "Ëèíèè";
+ Text[ polish ] = "Linia";
+ Text[ japanese ] = "ü";
+ Text[ chinese_traditional ] = "½u±ø";
+ Text[ arabic ] = "ÎØæØ";
+ Text[ dutch ] = "Lijnen";
+ Text[ chinese_simplified ] = "ÏßÌõ";
+ Text[ greek ] = "ÃñáììÝò";
+ Text[ korean ] = "¼±";
+ Text[ turkish ] = "Çizgi";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulRECT
+{
+ Text = "Rechteck" ;
+ Text [ ENGLISH ] = "rectangular" ;
+ Text [ norwegian ] = "Rektangulær" ;
+ Text [ italian ] = "Rettangolo" ;
+ Text [ portuguese_brazilian ] = "Rectangular" ;
+ Text [ portuguese ] = "Rectângulo" ;
+ Text [ finnish ] = "Rectangular" ;
+ Text [ danish ] = "Rektangel" ;
+ Text [ french ] = "Rectangle" ;
+ Text [ swedish ] = "Rektangel" ;
+ Text [ dutch ] = "Rechthoek" ;
+ Text [ spanish ] = "Rectángulo" ;
+ Text [ english_us ] = "Rectangle" ;
+ Text[ chinese_simplified ] = "¾ØÐÎ";
+ Text[ russian ] = "Ïðÿìîóãîëüíèê";
+ Text[ polish ] = "Prostok¹t";
+ Text[ japanese ] = "’·•ûŒ`";
+ Text[ chinese_traditional ] = "¯x§Î";
+ Text[ arabic ] = "ãÓÊØíá";
+ Text[ dutch ] = "Rechthoek";
+ Text[ chinese_simplified ] = "¾ØÐÎ";
+ Text[ greek ] = "Ïñèïãþíéï";
+ Text[ korean ] = "Á÷»ç°¢Çü";
+ Text[ turkish ] = "Dikdörtgen";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralRECT
+{
+ Text = "Rechtecke" ;
+ Text [ ENGLISH ] = "rectangles" ;
+ Text [ norwegian ] = "Rektangler" ;
+ Text [ italian ] = "Rettangoli" ;
+ Text [ portuguese_brazilian ] = "Retângulos" ;
+ Text [ portuguese ] = "Rectângulo" ;
+ Text [ finnish ] = "Suorakulmiot" ;
+ Text [ danish ] = "Rektangler" ;
+ Text [ french ] = "Rectangles" ;
+ Text [ swedish ] = "Rektanglar" ;
+ Text [ dutch ] = "Rechthoeken" ;
+ Text [ spanish ] = "Rectángulos" ;
+ Text [ english_us ] = "Rectangles" ;
+ Text[ chinese_simplified ] = "¾ØÐÎ";
+ Text[ russian ] = "Ïðÿìîóãîëüíèêè";
+ Text[ polish ] = "Prostok¹ty";
+ Text[ japanese ] = "’·•ûŒ`";
+ Text[ chinese_traditional ] = "¯x§Î";
+ Text[ arabic ] = "ãÓÊØíáÇÊ";
+ Text[ dutch ] = "Rechthoeken";
+ Text[ chinese_simplified ] = "¾ØÐÎ";
+ Text[ greek ] = "Ïñèïãþíéá";
+ Text[ korean ] = "Á÷»ç°¢Çü";
+ Text[ turkish ] = "Dikdörtgenler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulQUAD
+{
+ Text = "Quadrat" ;
+ Text [ ENGLISH ] = "square" ;
+ Text [ portuguese ] = "Quadrado" ;
+ Text [ english_us ] = "Square" ;
+ Text [ portuguese_brazilian ] = "Quadrat" ;
+ Text [ swedish ] = "Kvadrat" ;
+ Text [ danish ] = "Kvadrat" ;
+ Text [ italian ] = "Quadrato" ;
+ Text [ spanish ] = "Cuadrado" ;
+ Text [ french ] = "Carré" ;
+ Text [ dutch ] = "Vierkant" ;
+ Text[ chinese_simplified ] = "Õý·½ÐÎ";
+ Text[ russian ] = "Êâàäðàò";
+ Text[ polish ] = "Kwadrat";
+ Text[ japanese ] = "³•ûŒ`";
+ Text[ chinese_traditional ] = "¥¿¤è§Î";
+ Text[ arabic ] = "ãÑÈÚ";
+ Text[ dutch ] = "Vierkant";
+ Text[ chinese_simplified ] = "Õý·½ÐÎ";
+ Text[ greek ] = "ÔåôñÜãùíï";
+ Text[ korean ] = "Á¤»ç°¢Çü";
+ Text[ turkish ] = "Kare";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralQUAD
+{
+ Text = "Quadrate" ;
+ Text [ ENGLISH ] = "squares" ;
+ Text [ portuguese ] = "Quadrados" ;
+ Text [ english_us ] = "Squares" ;
+ Text [ portuguese_brazilian ] = "Quadrate" ;
+ Text [ swedish ] = "Kvadrater" ;
+ Text [ danish ] = "Kvadrater" ;
+ Text [ italian ] = "Quadrate" ;
+ Text [ spanish ] = "Cuadrados" ;
+ Text [ french ] = "Carrés" ;
+ Text [ dutch ] = "Vierkanten" ;
+ Text[ chinese_simplified ] = "Õý·½ÐÎ";
+ Text[ russian ] = "Êâàäðàòû";
+ Text[ polish ] = "Kwadraty";
+ Text[ japanese ] = "³•ûŒ`";
+ Text[ chinese_traditional ] = "¥¿¤è§Î";
+ Text[ arabic ] = "ãÑÈÚÇÊ";
+ Text[ dutch ] = "Vierkanten";
+ Text[ chinese_simplified ] = "Õý·½ÐÎ";
+ Text[ greek ] = "ÔåôñÜãùíá";
+ Text[ korean ] = "Á¤»ç°¢Çü";
+ Text[ turkish ] = "Kareler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulPARAL
+{
+ Text = "Parallelogramm" ;
+ Text [ ENGLISH ] = "parallelogramm" ;
+ Text [ portuguese ] = "Paralelograma" ;
+ Text [ english_us ] = "Parallelogram" ;
+ Text [ portuguese_brazilian ] = "Parallelogramm" ;
+ Text [ swedish ] = "Parallellogram" ;
+ Text [ danish ] = "Parallelogram" ;
+ Text [ italian ] = "Parallelogramma" ;
+ Text [ spanish ] = "Paralelograma" ;
+ Text [ french ] = "Parallélogramme" ;
+ Text [ dutch ] = "Parallelogram" ;
+ Text[ chinese_simplified ] = "ƽÐÐËıßÐÎ";
+ Text[ russian ] = "Ïàðàëëåëîãðàìì";
+ Text[ polish ] = "Równoleg³obok";
+ Text[ japanese ] = "•½sŽl•ÓŒ`";
+ Text[ chinese_traditional ] = "¥­¦æ¥|Ãä§Î";
+ Text[ arabic ] = "ãÊæÇÒí ÃÖáÇÚ";
+ Text[ dutch ] = "Parallelogram";
+ Text[ chinese_simplified ] = "ƽÐÐËıßÐÎ";
+ Text[ greek ] = "Ðáñáëëçëüãñáììï";
+ Text[ korean ] = "ÆòÇà»çº¯Çü";
+ Text[ turkish ] = "Paralelkenar";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralPARAL
+{
+ Text = "Parallelogramme" ;
+ Text [ ENGLISH ] = "parallelogramms" ;
+ Text [ portuguese ] = "Paralelogramas" ;
+ Text [ english_us ] = "Parallelograms" ;
+ Text [ portuguese_brazilian ] = "Parallelogramme" ;
+ Text [ swedish ] = "Parallellogram" ;
+ Text [ danish ] = "Parallelogrammer" ;
+ Text [ italian ] = "Parallelogrammi" ;
+ Text [ spanish ] = "Paralelogramos" ;
+ Text [ french ] = "Parallélogramme" ;
+ Text [ dutch ] = "Parallelogrammen" ;
+ Text[ chinese_simplified ] = "ƽÐÐËıßÐÎ";
+ Text[ russian ] = "Ïàðàëëåëîãðàììû";
+ Text[ polish ] = "Równoleg³oboki";
+ Text[ japanese ] = "•½sŽl•ÓŒ`";
+ Text[ chinese_traditional ] = "¥­¦æ¥|Ãä§Î";
+ Text[ arabic ] = "ãÊæÇÒíÇÊ ÇáÃÖáÇÚ";
+ Text[ dutch ] = "Parallelogrammen";
+ Text[ chinese_simplified ] = "ƽÐÐËıßÐÎ";
+ Text[ greek ] = "Ðáñáëëçëüãñáììá";
+ Text[ korean ] = "ÆòÇà»çº¯Çü";
+ Text[ turkish ] = "Paralelkenarlar";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulRAUTE
+{
+ Text = "Raute" ;
+ Text [ ENGLISH ] = "rhombus" ;
+ Text [ portuguese ] = "Losango" ;
+ Text [ english_us ] = "Rhombus" ;
+ Text [ portuguese_brazilian ] = "Raute" ;
+ Text [ swedish ] = "Romb" ;
+ Text [ danish ] = "Rombe" ;
+ Text [ italian ] = "Rombo" ;
+ Text [ spanish ] = "Rombo" ;
+ Text [ french ] = "Ovale" ;
+ Text [ dutch ] = "Ruit" ;
+ Text[ chinese_simplified ] = "ÁâÐÎ";
+ Text[ russian ] = "Ðîìá";
+ Text[ polish ] = "Romb";
+ Text[ japanese ] = "‚ЂµŒ`";
+ Text[ chinese_traditional ] = "µÙ§Î";
+ Text[ arabic ] = "ãõÚóíøóä";
+ Text[ dutch ] = "Ruit";
+ Text[ chinese_simplified ] = "ÁâÐÎ";
+ Text[ greek ] = "Ñüìâïò";
+ Text[ korean ] = "¸¶¸§¸ð²Ã";
+ Text[ turkish ] = "Elmas";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralRAUTE
+{
+ Text = "Rauten" ;
+ Text [ ENGLISH ] = "rhombuses" ;
+ Text [ portuguese ] = "Losangos" ;
+ Text [ english_us ] = "Rhombuses" ;
+ Text [ portuguese_brazilian ] = "Rauten" ;
+ Text [ swedish ] = "Romber" ;
+ Text [ danish ] = "Romber" ;
+ Text [ italian ] = "Rombi" ;
+ Text [ spanish ] = "Rombos" ;
+ Text [ french ] = "Ovales" ;
+ Text [ dutch ] = "Ruiten" ;
+ Text[ chinese_simplified ] = "ÁâÐÎ";
+ Text[ russian ] = "Ðîìáû";
+ Text[ polish ] = "Romby";
+ Text[ japanese ] = "‚ЂµŒ`";
+ Text[ chinese_traditional ] = "µÙ§Î";
+ Text[ arabic ] = "ãõÚóíøóäÇÊ";
+ Text[ dutch ] = "Ruiten";
+ Text[ chinese_simplified ] = "ÁâÐÎ";
+ Text[ greek ] = "Ñüìâïé";
+ Text[ korean ] = "¸¶¸§¸ð²Ã";
+ Text[ turkish ] = "Elmaslar";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulRECTRND
+{
+ Text = "abgerundetes Rechteck" ;
+ Text [ ENGLISH ] = "rounded rectangular" ;
+ Text [ portuguese ] = "Rectângulo arredondado" ;
+ Text [ english_us ] = "Rounded rectangle" ;
+ Text [ portuguese_brazilian ] = "abgerundetes Rechteck" ;
+ Text [ swedish ] = "rundad rektangel" ;
+ Text [ danish ] = "Afrundet rektangel" ;
+ Text [ italian ] = "Rettangolo arrotondato" ;
+ Text [ spanish ] = "Rectángulo redondeado" ;
+ Text [ french ] = "Rectangle arrondi" ;
+ Text [ dutch ] = "Afgeronde rechthoek" ;
+ Text[ chinese_simplified ] = "Ô²½Ç¾ØÐÎ";
+ Text[ russian ] = "çàêðóãëåííûé ïðÿìîóãîëüíèê";
+ Text[ polish ] = "Prostok¹t z zaokr¹glonymi naro¿nikami";
+ Text[ japanese ] = "Šp‚ðŠÛ‚­‚µ‚½’·•ûŒ`";
+ Text[ chinese_traditional ] = "¶ê¨¤¯x§Î";
+ Text[ arabic ] = "ãÓÊØíá ãÓÊÏíÑ ÇáÒæÇíÇ";
+ Text[ dutch ] = "Afgeronde rechthoek";
+ Text[ chinese_simplified ] = "Ô²½Ç¾ØÐÎ";
+ Text[ greek ] = "ÓôñïããõëïðïéçìÝíï ïñèïãþíéï";
+ Text[ korean ] = "µÕ±Û¸° Á÷»ç°¢Çü";
+ Text[ turkish ] = "Yuvarlak köþeli dikdörtgen";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralRECTRND
+{
+ Text = "abgerundete Rechtecke" ;
+ Text [ ENGLISH ] = "rounded rectangles" ;
+ Text [ portuguese ] = "Rectângulo arredondado" ;
+ Text [ english_us ] = "Rounded Rectangles" ;
+ Text [ portuguese_brazilian ] = "abgerundete Rechtecke" ;
+ Text [ swedish ] = "rundade rektanglar" ;
+ Text [ danish ] = "Afrundede rektangler" ;
+ Text [ italian ] = "Rettangoli arrotondati" ;
+ Text [ spanish ] = "Rectángulos redondeados" ;
+ Text [ french ] = "Rectangles arrondis" ;
+ Text [ dutch ] = "Afgeronde rechthoeken" ;
+ Text[ chinese_simplified ] = "Ô²½Ç¾ØÐÎ";
+ Text[ russian ] = "çàêðóãëåííûå ïðÿìîóãîëüíèêè";
+ Text[ polish ] = "Prostok¹ty z zaokr¹glonymi naro¿nikami";
+ Text[ japanese ] = "Šp‚ðŠÛ‚­‚µ‚½’·•ûŒ`";
+ Text[ chinese_traditional ] = "¶ê¨¤¯x§Î";
+ Text[ arabic ] = "ãÓÊØíáÇÊ ãÓÊÏíÑÉ ÇáÒæÇíÇ";
+ Text[ dutch ] = "Afgeronde rechthoeken";
+ Text[ chinese_simplified ] = "Ô²½Ç¾ØÐÎ";
+ Text[ greek ] = "ÓôñïããõëïðïéçìÝíá ïñèïãþíéá";
+ Text[ korean ] = "µÕ±Û¸° Á÷»ç°¢Çü";
+ Text[ turkish ] = "Yuvarlak köþeli dikdörtgenler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulQUADRND
+{
+ Text = "abgerundetes Quadrat" ;
+ Text [ ENGLISH ] = "rounded square" ;
+ Text [ portuguese ] = "Quadrado arredondado" ;
+ Text [ english_us ] = "rounded square" ;
+ Text [ portuguese_brazilian ] = "abgerundetes Quadrat" ;
+ Text [ swedish ] = "rundad kvadrat" ;
+ Text [ danish ] = "Afrundet kvadrat" ;
+ Text [ italian ] = "Quadrato arrotondato" ;
+ Text [ spanish ] = "Cuadrado redondeado" ;
+ Text [ french ] = "Carré arrondi" ;
+ Text [ dutch ] = "Afgrond vierkant" ;
+ Text[ chinese_simplified ] = "Ô²½ÇÕý·½ÐÎ";
+ Text[ russian ] = "çàêðóãëåííûé êâàäðàò";
+ Text[ polish ] = "Kwadrat z zaokr¹glonymi naro¿nikami";
+ Text[ japanese ] = "Šp‚ðŠÛ‚­‚µ‚½³•ûŒ`";
+ Text[ chinese_traditional ] = "¶ê¨¤¥¿¤è§Î";
+ Text[ arabic ] = "ãÑÈÚ ãÓÊÏíÑ ÇáÒæÇíÇ";
+ Text[ dutch ] = "Afgrond vierkant";
+ Text[ chinese_simplified ] = "Ô²½ÇÕý·½ÐÎ";
+ Text[ greek ] = "óôñïããõëåìÝíï ôåôñÜãùíï";
+ Text[ korean ] = "µÕ±Û¸° Á¤»ç°¢Çü";
+ Text[ turkish ] = "Yuvarlak köþeli kare";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralQUADRND
+{
+ Text = "abgerundete Quadrate" ;
+ Text [ ENGLISH ] = "rounded squares" ;
+ Text [ portuguese ] = "Quadrados arredondados" ;
+ Text [ english_us ] = "Rounded Squares" ;
+ Text [ portuguese_brazilian ] = "abgerundete Quadrate" ;
+ Text [ swedish ] = "rundade kvadrater" ;
+ Text [ danish ] = "Afrundede kvadrater" ;
+ Text [ italian ] = "Quadrati arrotondati" ;
+ Text [ spanish ] = "Cuadrados redondeados" ;
+ Text [ french ] = "Carrés arrondis" ;
+ Text [ dutch ] = "Afgeronde vierkanten" ;
+ Text[ chinese_simplified ] = "Ô²½ÇÕý·½ÐÎ";
+ Text[ russian ] = "çàêðóãëåííûå êâàäðàòû";
+ Text[ polish ] = "Kwadraty z zaokr¹glonymi naro¿nikami";
+ Text[ japanese ] = "Šp‚ðŠÛ‚­‚µ‚½³•ûŒ`";
+ Text[ chinese_traditional ] = "¶ê¨¤¥¿¤è§Î";
+ Text[ arabic ] = "ãÑÈÚÇÊ ãÓÊÏíÑÉ ÇáÒæÇíÇ";
+ Text[ dutch ] = "Afgeronde vierkanten";
+ Text[ chinese_simplified ] = "Ô²½ÇÕý·½ÐÎ";
+ Text[ greek ] = "ÓôñïããõëåìÝíá ôåôñÜãùíá";
+ Text[ korean ] = "µÕ±Û¸° Á¤»ç°¢Çü";
+ Text[ turkish ] = "Yuvarlak köþeli kareler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulPARALRND
+{
+ Text = "abgerundetes Parallelogramm" ;
+ Text [ ENGLISH ] = "rounded parallelogramm" ;
+ Text [ portuguese ] = "Paralelograma arredondado" ;
+ Text [ english_us ] = "Rounded Parallelogram" ;
+ Text [ portuguese_brazilian ] = "abgerundetes Parallelogramm" ;
+ Text [ swedish ] = "rundad parallellogram" ;
+ Text [ danish ] = "Afrundet parallelogram" ;
+ Text [ italian ] = "Parallelogramma arrotondato" ;
+ Text [ spanish ] = "Paralelograma redondeado" ;
+ Text [ french ] = "Parallélogramme arrondi" ;
+ Text [ dutch ] = "Afgerond paralellogram" ;
+ Text[ chinese_simplified ] = "Ô²½ÇƽÐÐËıßÐÎ";
+ Text[ russian ] = "çàêðóãëåííûé ïàðàëëåëîãðàìì";
+ Text[ polish ] = "Równoleg³obok z zaokr¹glonymi naro¿nikami";
+ Text[ japanese ] = "Šp‚ðŠÛ‚­‚µ‚½•½sŽl•ÓŒ`";
+ Text[ chinese_traditional ] = "¶ê¨¤¥­¦æ¥|Ãä§Î";
+ Text[ arabic ] = "ãÊæÇÒí ÃÖáÇÚ ãÓÊÏíÑ ÇáÒæÇíÇ";
+ Text[ dutch ] = "Afgerond paralellogram";
+ Text[ chinese_simplified ] = "Ô²½ÇƽÐÐËıßÐÎ";
+ Text[ greek ] = "ÓôñïããõëåìÝíï ðáñáëëçëüãñáììá";
+ Text[ korean ] = "µÕ±Û¸° ÆòÇà»çº¯Çü";
+ Text[ turkish ] = "Yuvarlak köþeli paralelkenar";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralPARALRND
+{
+ Text = "abgerundete Parallelogramme" ;
+ Text [ ENGLISH ] = "rounded parallelogramms" ;
+ Text [ portuguese ] = "Paralelogramas arredondados" ;
+ Text [ english_us ] = "Rounded parallelograms" ;
+ Text [ portuguese_brazilian ] = "abgerundete Parallelogramme" ;
+ Text [ swedish ] = "rundade parallellogrammer" ;
+ Text [ danish ] = "Afrundede parallelogrammer" ;
+ Text [ italian ] = "parallelogrammi arrotondati" ;
+ Text [ spanish ] = "Paralelogramas redondeados" ;
+ Text [ french ] = "Parallélogrammes arrondis" ;
+ Text [ dutch ] = "Afgeronde parallelogrammen" ;
+ Text[ chinese_simplified ] = "Ô²½ÇƽÐÐËıßÐÎ";
+ Text[ russian ] = "çàêðóãëåííûå ïàðàëëåëîãðàììû";
+ Text[ polish ] = "Równoleg³oboki z zaokr¹glonymi naro¿nikami";
+ Text[ japanese ] = "Šp‚ðŠÛ‚­‚µ‚½•½sŽl•ÓŒ`";
+ Text[ chinese_traditional ] = "¶ê¨¤¥­¦æ¥|Ãä§Î";
+ Text[ arabic ] = "ãÊæÇÒíÇÊ ÃÖáÇÚ ãÓÊÏíÑÉ ÇáÒæÇíÇ";
+ Text[ dutch ] = "Afgeronde parallelogrammen";
+ Text[ chinese_simplified ] = "Ô²½ÇƽÐÐËıßÐÎ";
+ Text[ greek ] = "ÓôñïããõëåìÝíá ðáñáëëçëïãñÜììáôá";
+ Text[ korean ] = "µÕ±Û¸° ÆòÇà»çº¯Çü";
+ Text[ turkish ] = "Yuvarlak köþeli paralelkenarlar";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulRAUTERND
+{
+ Text = "abgerundete Raute" ;
+ Text [ ENGLISH ] = "rounded rhombus" ;
+ Text [ portuguese ] = "Losango arredondado" ;
+ Text [ english_us ] = "rounded rhombus" ;
+ Text [ portuguese_brazilian ] = "abgerundete Raute" ;
+ Text [ swedish ] = "Rundad romb" ;
+ Text [ danish ] = "Afrundet rombe" ;
+ Text [ italian ] = "Rombo arrotondato" ;
+ Text [ spanish ] = "Rombo redondeado" ;
+ Text [ french ] = "Ovale arrondi" ;
+ Text [ dutch ] = "Afgeronde ruit" ;
+ Text[ chinese_simplified ] = "Ô²½ÇÁâÐÎ";
+ Text[ russian ] = "çàêðóãëåííûé ðîìá";
+ Text[ polish ] = "Romb z zaokr¹glonymi naro¿nikami";
+ Text[ japanese ] = "Šp‚ðŠÛ‚­‚µ‚½‚ЂµŒ`";
+ Text[ chinese_traditional ] = "¶ê¨¤µÙ§Î";
+ Text[ arabic ] = "ãõÚóíøóä ãÓÊÏíÑ ÇáÒæÇíÇ";
+ Text[ dutch ] = "Afgeronde ruit";
+ Text[ chinese_simplified ] = "Ô²½ÇÁâÐÎ";
+ Text[ greek ] = "ÓôñïããõëåìÝíïò ñüìâïò";
+ Text[ korean ] = "µÕ±Û¸° ¸¶¸§¸ð²Ã";
+ Text[ turkish ] = "Yuvarlak köþeli elmas";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralRAUTERND
+{
+ Text = "abgerundete Rauten" ;
+ Text [ ENGLISH ] = "rounded rhombuses" ;
+ Text [ portuguese ] = "Losangos arredondados" ;
+ Text [ english_us ] = "Rounded rhombuses" ;
+ Text [ portuguese_brazilian ] = "abgerundete Rauten" ;
+ Text [ swedish ] = "rundade romber" ;
+ Text [ danish ] = "Afrundede romber" ;
+ Text [ italian ] = "Rombi arrotondati" ;
+ Text [ spanish ] = "Rombos redondeados" ;
+ Text [ french ] = "Ovales arrondis" ;
+ Text [ dutch ] = "Afgeronde ruiten" ;
+ Text[ chinese_simplified ] = "Ô²½ÇÁâÐÎ";
+ Text[ russian ] = "çàêðóãëåííûå ðîìáû";
+ Text[ polish ] = "Romby z zaokr¹glonymi naro¿nikami";
+ Text[ japanese ] = "Šp‚ðŠÛ‚­‚µ‚½‚ЂµŒ`";
+ Text[ chinese_traditional ] = "¶ê¨¤µÙ§Î";
+ Text[ arabic ] = "ãõÚóíøóäÇÊ ãÓÊÏíÑÉ ÇáÒæÇíÇ";
+ Text[ dutch ] = "Afgeronde ruiten";
+ Text[ chinese_simplified ] = "Ô²½ÇÁâÐÎ";
+ Text[ greek ] = "ÓôñïããõëåìÝíïé ñüìâïé";
+ Text[ korean ] = "µÕ±Û¸° ¸¶¸§¸ð²Ã";
+ Text[ turkish ] = "Yuvarlak köþeli elmaslar";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulCIRC
+{
+ Text = "Kreis" ;
+ Text [ ENGLISH ] = "circle" ;
+ Text [ norwegian ] = "Sirkel" ;
+ Text [ italian ] = "Cerchio" ;
+ Text [ portuguese_brazilian ] = "Círculo" ;
+ Text [ portuguese ] = "Círculo" ;
+ Text [ finnish ] = "Ympyrä" ;
+ Text [ danish ] = "Cirkel" ;
+ Text [ french ] = "Cercle" ;
+ Text [ swedish ] = "Cirkel" ;
+ Text [ dutch ] = "Cirkel" ;
+ Text [ spanish ] = "Círculo" ;
+ Text [ english_us ] = "Circle" ;
+ Text[ chinese_simplified ] = "Ô²";
+ Text[ russian ] = "Êðóã";
+ Text[ polish ] = "Ko³o";
+ Text[ japanese ] = "‰~";
+ Text[ chinese_traditional ] = "¶ê";
+ Text[ arabic ] = "ÏÇÆÑÉ";
+ Text[ dutch ] = "Cirkel";
+ Text[ chinese_simplified ] = "Ô²";
+ Text[ greek ] = "Êýêëïò";
+ Text[ korean ] = "¿ø";
+ Text[ turkish ] = "Daire";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralCIRC
+{
+ Text = "Kreise" ;
+ Text [ ENGLISH ] = "circles" ;
+ Text [ norwegian ] = "Sirkler" ;
+ Text [ italian ] = "Cerchi" ;
+ Text [ portuguese_brazilian ] = "Círculos" ;
+ Text [ portuguese ] = "Círculos" ;
+ Text [ finnish ] = "Ymyrät" ;
+ Text [ danish ] = "Cirkler" ;
+ Text [ french ] = "Cercles" ;
+ Text [ swedish ] = "Cirklar" ;
+ Text [ dutch ] = "Cirkel" ;
+ Text [ spanish ] = "Círculos" ;
+ Text [ english_us ] = "Circles" ;
+ Text[ chinese_simplified ] = "Ô²";
+ Text[ russian ] = "Êðóãè";
+ Text[ polish ] = "Ko³a";
+ Text[ japanese ] = "‰~";
+ Text[ chinese_traditional ] = "¶ê";
+ Text[ arabic ] = "ÏæÇÆÑ";
+ Text[ dutch ] = "Cirkel";
+ Text[ chinese_simplified ] = "Ô²";
+ Text[ greek ] = "Êýêëïé";
+ Text[ korean ] = "¿ø";
+ Text[ turkish ] = "Daire";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulSECT
+{
+ Text = "Kreisausschnitt" ;
+ Text [ ENGLISH ] = "sector" ;
+ Text [ norwegian ] = "Sektor" ;
+ Text [ italian ] = "Settore di cerchio" ;
+ Text [ portuguese_brazilian ] = "Setor" ;
+ Text [ portuguese ] = "Sector" ;
+ Text [ finnish ] = "Lohko" ;
+ Text [ danish ] = "Cirkelsektor" ;
+ Text [ french ] = "Secteur de cercle" ;
+ Text [ swedish ] = "Cirkelsektor" ;
+ Text [ dutch ] = "Cirkelsector" ;
+ Text [ spanish ] = "Sector de círculo" ;
+ Text [ english_us ] = "Circle sector" ;
+ Text[ chinese_simplified ] = "ÉÈÐÎ";
+ Text[ russian ] = "Ñåêòîð êðóãà";
+ Text[ polish ] = "Wycinek ko³a";
+ Text[ japanese ] = "îŒ`";
+ Text[ chinese_traditional ] = "®°§Î";
+ Text[ arabic ] = "ÞØÇÚ ÏÇÆÑí";
+ Text[ dutch ] = "Cirkelsector";
+ Text[ chinese_simplified ] = "ÉÈÐÎ";
+ Text[ greek ] = "ÔïìÝáò êýêëïõ";
+ Text[ korean ] = "¿ø ºÎä²Ã";
+ Text[ turkish ] = "Pasta";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralSECT
+{
+ Text = "Kreisausschnitte" ;
+ Text [ ENGLISH ] = "sectors" ;
+ Text [ norwegian ] = "Sektorer" ;
+ Text [ italian ] = "Settori di cerchio" ;
+ Text [ portuguese_brazilian ] = "Setores" ;
+ Text [ portuguese ] = "Sectores de círculo" ;
+ Text [ finnish ] = "Lohkot" ;
+ Text [ danish ] = "Cirkelsektorer" ;
+ Text [ french ] = "Secteurs de cercle" ;
+ Text [ swedish ] = "Cirkelsektorer" ;
+ Text [ dutch ] = "Cirkelsectoren" ;
+ Text [ spanish ] = "Sectores de círculo" ;
+ Text [ english_us ] = "Circle sectors" ;
+ Text[ chinese_simplified ] = "ÉÈÐÎ";
+ Text[ russian ] = "Ñåêòîðû êðóãà";
+ Text[ polish ] = "Wycinki ko³a";
+ Text[ japanese ] = "îŒ`";
+ Text[ chinese_traditional ] = "®°§Î";
+ Text[ arabic ] = "ÞØÇÚÇÊ ÏÇÆÑíÉ";
+ Text[ dutch ] = "Cirkelsectoren";
+ Text[ chinese_simplified ] = "ÉÈÐÎ";
+ Text[ greek ] = "Ôïìåßò êýêëïõ";
+ Text[ korean ] = "¿ø ºÎä²Ã";
+ Text[ turkish ] = "Pastalar";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulCARC
+{
+ Text = "Kreisbogen" ;
+ Text [ ENGLISH ] = "arc" ;
+ Text [ norwegian ] = "Arc" ;
+ Text [ italian ] = "Arco" ;
+ Text [ portuguese_brazilian ] = "Arco" ;
+ Text [ portuguese ] = "Arco" ;
+ Text [ finnish ] = "Kaari" ;
+ Text [ danish ] = "Cirkelbue" ;
+ Text [ french ] = "Arc de cercle" ;
+ Text [ swedish ] = "Cirkelbåge" ;
+ Text [ dutch ] = "Cirkelboog" ;
+ Text [ spanish ] = "Arco de círculo" ;
+ Text [ english_us ] = "Arc" ;
+ Text[ chinese_simplified ] = "Ô²»¡";
+ Text[ russian ] = "Äóãà îêðóæíîñòè";
+ Text[ polish ] = "£uk ko³a";
+ Text[ japanese ] = "‰~ŒÊ";
+ Text[ chinese_traditional ] = "¶ê©·";
+ Text[ arabic ] = "ÞæÓ ÏÇÆÑí";
+ Text[ dutch ] = "Cirkelboog";
+ Text[ chinese_simplified ] = "Ô²»¡";
+ Text[ greek ] = "Êõêëéêü ôüîï";
+ Text[ korean ] = "¿øÈ£";
+ Text[ turkish ] = "Yay";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralCARC
+{
+ Text = "Kreisbögen" ;
+ Text [ ENGLISH ] = "arcs" ;
+ Text [ norwegian ] = "Buer" ;
+ Text [ italian ] = "Archi di cerchio" ;
+ Text [ portuguese_brazilian ] = "Arcos" ;
+ Text [ portuguese ] = "Arcos" ;
+ Text [ finnish ] = "Kaaret" ;
+ Text [ danish ] = "Cirkelbuer" ;
+ Text [ french ] = "Arcs" ;
+ Text [ swedish ] = "Cirkelbågar" ;
+ Text [ dutch ] = "Cirkelbogen" ;
+ Text [ spanish ] = "Arcos de círculo" ;
+ Text [ english_us ] = "Arcs" ;
+ Text[ chinese_simplified ] = "Ô²»¡";
+ Text[ russian ] = "Äóãè îêðóæíîñòè";
+ Text[ polish ] = "£uki ko³a";
+ Text[ japanese ] = "‰~ŒÊ";
+ Text[ chinese_traditional ] = "¶ê©·";
+ Text[ arabic ] = "ÃÞæÇÓ ÏÇÆÑíÉ";
+ Text[ dutch ] = "Cirkelbogen";
+ Text[ chinese_simplified ] = "Ô²»¡";
+ Text[ greek ] = "ÊõêëéêÜ ôüîá";
+ Text[ korean ] = "¿øÈ£";
+ Text[ turkish ] = "Yaylar";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulCCUT
+{
+ Text = "Kreisabschnitt" ;
+ Text [ ENGLISH ] = "segment" ;
+ Text [ norwegian ] = "Segment" ;
+ Text [ italian ] = "Segmento di cerchio" ;
+ Text [ portuguese_brazilian ] = "Segmento" ;
+ Text [ portuguese ] = "Segmento" ;
+ Text [ finnish ] = "Segmentti" ;
+ Text [ danish ] = "Cirkelsegment" ;
+ Text [ french ] = "Segment de cercle" ;
+ Text [ swedish ] = "Cirkelsegment" ;
+ Text [ dutch ] = "Segment" ;
+ Text [ spanish ] = "Segmento de círculo" ;
+ Text [ english_us ] = "Circle segment" ;
+ Text[ chinese_simplified ] = "ÉÈÐÎ";
+ Text[ russian ] = "Ñåãìåíò îêðóæíîñòè";
+ Text[ polish ] = "Odcinek ko³a";
+ Text[ japanese ] = "‰~‚ÌØ•Ð";
+ Text[ chinese_traditional ] = "®°§Î";
+ Text[ arabic ] = "ÞØÚÉ ãä ÏÇÆÑÉ";
+ Text[ dutch ] = "Segment";
+ Text[ chinese_simplified ] = "ÉÈÐÎ";
+ Text[ greek ] = "ÔìÞìá êýêëïõ";
+ Text[ korean ] = "¿ø ¼¼±×¸ÕÆ®";
+ Text[ turkish ] = "Daire parçasý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralCCUT
+{
+ Text = "Kreisabschnitte" ;
+ Text [ ENGLISH ] = "segments" ;
+ Text [ norwegian ] = "Segmenter" ;
+ Text [ italian ] = "Segmenti di cerchio" ;
+ Text [ portuguese_brazilian ] = "Segmentos" ;
+ Text [ portuguese ] = "Segmentos" ;
+ Text [ finnish ] = "Segmentti" ;
+ Text [ danish ] = "Cirkelsegmenter" ;
+ Text [ french ] = "Segments de cercle" ;
+ Text [ swedish ] = "Cirkelsegment" ;
+ Text [ dutch ] = "Cirkelsegmenten" ;
+ Text [ spanish ] = "Segmentos de círculo" ;
+ Text [ english_us ] = "Circle segments" ;
+ Text[ chinese_simplified ] = "Ô²»¡¶Î";
+ Text[ russian ] = "Ñåãìåíòû îêðóæíîñòè";
+ Text[ polish ] = "Odcinki ko³a";
+ Text[ japanese ] = "‰~‚ÌØ•Ð";
+ Text[ chinese_traditional ] = "¶ê©·¬q";
+ Text[ arabic ] = "ÞØÚ ãä ÏÇÆÑÉ";
+ Text[ dutch ] = "Cirkelsegmenten";
+ Text[ chinese_simplified ] = "Ô²»¡¶Î";
+ Text[ greek ] = "ÔìÞìáôá êýêëïõ";
+ Text[ korean ] = "¿ø ¼¼±×¸ÕÆ®";
+ Text[ turkish ] = "Daire parçalarý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulCIRCE
+{
+ Text = "Ellipse" ;
+ Text [ ENGLISH ] = "ellipse" ;
+ Text [ norwegian ] = "Ellipse" ;
+ Text [ italian ] = "Ellisse" ;
+ Text [ portuguese_brazilian ] = "Elipse" ;
+ Text [ portuguese ] = "Elipse" ;
+ Text [ finnish ] = "Soikio" ;
+ Text [ danish ] = "Ellipse" ;
+ Text [ french ] = "Ellipse" ;
+ Text [ swedish ] = "Ellips" ;
+ Text [ dutch ] = "Ellips" ;
+ Text [ spanish ] = "Elipse" ;
+ Text [ english_us ] = "Ellipse" ;
+ Text[ chinese_simplified ] = "ÍÖÔ²";
+ Text[ russian ] = "Ýëëèïñû";
+ Text[ polish ] = "Elipsa";
+ Text[ japanese ] = "‘ȉ~Œ`";
+ Text[ chinese_traditional ] = "¾ò¶ê";
+ Text[ arabic ] = "Ôßá ÈíÖæí";
+ Text[ dutch ] = "Ellips";
+ Text[ chinese_simplified ] = "ÍÖÔ²";
+ Text[ greek ] = "¸ëëåéøç";
+ Text[ korean ] = "Ÿ¿ø";
+ Text[ turkish ] = "Elips";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralCIRCE
+{
+ Text = "Ellipsen" ;
+ Text [ ENGLISH ] = "ellipses" ;
+ Text [ norwegian ] = "Ellipser" ;
+ Text [ italian ] = "Ellissi" ;
+ Text [ portuguese_brazilian ] = "Elipses" ;
+ Text [ portuguese ] = "Elipses" ;
+ Text [ finnish ] = "Soikiot" ;
+ Text [ danish ] = "Ellipser" ;
+ Text [ french ] = "Ellipses" ;
+ Text [ swedish ] = "Ellipser" ;
+ Text [ dutch ] = "Ellipsen" ;
+ Text [ spanish ] = "Elipses" ;
+ Text [ english_us ] = "Ellipses" ;
+ Text[ chinese_simplified ] = "ÍÖÔ²";
+ Text[ russian ] = "Ýëëèïñû";
+ Text[ polish ] = "Elipsy";
+ Text[ japanese ] = "‘ȉ~Œ`";
+ Text[ chinese_traditional ] = "¾ò¶ê";
+ Text[ arabic ] = "ÃÔßÇá ÈíÖæíÉ";
+ Text[ dutch ] = "Ellipsen";
+ Text[ chinese_simplified ] = "ÍÖÔ²";
+ Text[ greek ] = "¸ëëåéøç";
+ Text[ korean ] = "Ÿ¿ø";
+ Text[ turkish ] = "Elips";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulSECTE
+{
+ Text = "Ellipsenausschnitt" ;
+ Text [ ENGLISH ] = "elliptical sector" ;
+ Text [ norwegian ] = "Ellipseformet Sektor" ;
+ Text [ italian ] = "Settore di ellisse" ;
+ Text [ portuguese_brazilian ] = "Setor Elíptico" ;
+ Text [ portuguese ] = "Sector de elipse" ;
+ Text [ finnish ] = "Soikion lohko" ;
+ Text [ danish ] = "Ellipsesektor" ;
+ Text [ french ] = "Secteur elliptique" ;
+ Text [ swedish ] = "Ellipssektor" ;
+ Text [ dutch ] = "Ellipssector" ;
+ Text [ spanish ] = "Sector elíptico" ;
+ Text [ english_us ] = "Ellipse Pie" ;
+ Text[ chinese_simplified ] = "ÍÖÔ²²¿·Ö";
+ Text[ russian ] = "Ñåêòîð ýëëèïñà";
+ Text[ polish ] = "Wycinek elipsy";
+ Text[ japanese ] = "‘ȉ~Œ`‚ÌîŒ`";
+ Text[ chinese_traditional ] = "¾ò¶ê³¡¥÷";
+ Text[ arabic ] = "ãÞØÚ ãä Ôßá ÈíÖæí";
+ Text[ dutch ] = "Ellipssector";
+ Text[ chinese_simplified ] = "ÍÖÔ²²¿·Ö";
+ Text[ greek ] = "ÔïìÝáò Ýëëåéøçò";
+ Text[ korean ] = "Ÿ¿ø ºÎä²Ã";
+ Text[ turkish ] = "Elips pasta";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralSECTE
+{
+ Text = "Ellipsenausschnitte" ;
+ Text [ ENGLISH ] = "elliptical sectors" ;
+ Text [ norwegian ] = "Ellipseformede Sektorer" ;
+ Text [ italian ] = "Settori di ellisse" ;
+ Text [ portuguese_brazilian ] = "Setores Elípticos" ;
+ Text [ portuguese ] = "Sectores de elipse" ;
+ Text [ finnish ] = "Soikion lohkot" ;
+ Text [ danish ] = "Ellipsesektorer" ;
+ Text [ french ] = "Secteurs ellipses" ;
+ Text [ swedish ] = "Ellipssektorer" ;
+ Text [ dutch ] = "Ellipssectoren" ;
+ Text [ spanish ] = "Sectores de la elipse" ;
+ Text [ english_us ] = "Ellipse Pies" ;
+ Text[ chinese_simplified ] = "ÍÖÔ²²¿·Ö";
+ Text[ russian ] = "Ñåêòîðû ýëëèïñà";
+ Text[ polish ] = "Wycinki elipsy";
+ Text[ japanese ] = "‘ȉ~Œ`‚ÌîŒ`";
+ Text[ chinese_traditional ] = "¾ò¶ê³¡¥÷";
+ Text[ arabic ] = "ãÞÇØÚ ãä Ôßá ÈíÖæí";
+ Text[ dutch ] = "Ellipssectoren";
+ Text[ chinese_simplified ] = "ÍÖÔ²²¿·Ö";
+ Text[ greek ] = "ÔïìÝáò Ýëëåéøçò";
+ Text[ korean ] = "Ÿ¿øÇü ºÎä²Ã";
+ Text[ turkish ] = "Elips pastalar";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulCARCE
+{
+ Text = "Ellipsenbogen" ;
+ Text [ ENGLISH ] = "elliptical arc" ;
+ Text [ norwegian ] = "Ellipseformet Bue" ;
+ Text [ italian ] = "Arco ellittico" ;
+ Text [ portuguese_brazilian ] = "Arco Elíptico" ;
+ Text [ portuguese ] = "Arco elíptico" ;
+ Text [ finnish ] = "Soikea kaari" ;
+ Text [ danish ] = "Ellipsebue" ;
+ Text [ french ] = "Arc d'ellipse" ;
+ Text [ swedish ] = "Ellipsbåge" ;
+ Text [ dutch ] = "Ellipsboog" ;
+ Text [ spanish ] = "Arco de elipse" ;
+ Text [ english_us ] = "Elliptical arc" ;
+ Text[ chinese_simplified ] = "ÍÖÔ²»¡";
+ Text[ russian ] = "Äóãà ýëëèïñà";
+ Text[ polish ] = "£uk elipsy";
+ Text[ japanese ] = "‘ȉ~Œ`‚̉~ŒÊ";
+ Text[ chinese_traditional ] = "¾ò¶ê©·";
+ Text[ arabic ] = "ÞæÓ ÈíÖæí";
+ Text[ dutch ] = "Ellipsboog";
+ Text[ chinese_simplified ] = "ÍÖÔ²»¡";
+ Text[ greek ] = "Ôüîï Ýëëåéøçò";
+ Text[ korean ] = "Ÿ¿øÈ£";
+ Text[ turkish ] = "Elips yay";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralCARCE
+{
+ Text = "Ellipsenbögen" ;
+ Text [ ENGLISH ] = "elliptical arcs" ;
+ Text [ norwegian ] = "Ellipseformede Buer" ;
+ Text [ italian ] = "Archi ellittici" ;
+ Text [ portuguese_brazilian ] = "Arcos Elípticos" ;
+ Text [ portuguese ] = "Arcos elípticos" ;
+ Text [ finnish ] = "Soikeat kaaret" ;
+ Text [ danish ] = "Ellipsebuer" ;
+ Text [ french ] = "Arcs d'ellipses" ;
+ Text [ swedish ] = "Ellipsbågar" ;
+ Text [ dutch ] = "Ellipsbogen" ;
+ Text [ spanish ] = "Arcos elípticos" ;
+ Text [ english_us ] = "Elliptical arcs" ;
+ Text[ chinese_simplified ] = "ÍÖÔ²»¡";
+ Text[ russian ] = "Äóãè ýëëèïñà";
+ Text[ polish ] = "£uki elipsy";
+ Text[ japanese ] = "‘ȉ~Œ`‚̉~ŒÊ";
+ Text[ chinese_traditional ] = "¾ò¶ê©·";
+ Text[ arabic ] = "ÃÞæÇÓ ÈíÖæíÉ";
+ Text[ dutch ] = "Ellipsbogen";
+ Text[ chinese_simplified ] = "ÍÖÔ²»¡";
+ Text[ greek ] = "Ôüîï Ýëëåéøçò";
+ Text[ korean ] = "Ÿ¿øÈ£";
+ Text[ turkish ] = "Elips yaylar";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulCCUTE
+{
+ Text = "Ellipsenabschnitt" ;
+ Text [ ENGLISH ] = "elliptical segment" ;
+ Text [ norwegian ] = "Ellipseformet Segment" ;
+ Text [ italian ] = "Segmento di ellisse" ;
+ Text [ portuguese_brazilian ] = "Segmento Elíptico" ;
+ Text [ portuguese ] = "Segmento elíptico" ;
+ Text [ finnish ] = "Soikion segmentti" ;
+ Text [ danish ] = "Ellipsesegment" ;
+ Text [ french ] = "Segment d'ellipse" ;
+ Text [ swedish ] = "Ellipssegment" ;
+ Text [ dutch ] = "Ellipssegment" ;
+ Text [ spanish ] = "Segmento elíptico" ;
+ Text [ english_us ] = "Ellipse Segment" ;
+ Text[ chinese_simplified ] = "ÍÖԲȱ";
+ Text[ russian ] = "Ñåãìåíò ýëëèïñà";
+ Text[ polish ] = "Odcinek ko³a";
+ Text[ japanese ] = "‘ȉ~Œ`‚ÌØ•Ð";
+ Text[ chinese_traditional ] = "¾ò¶ê¯Ê";
+ Text[ arabic ] = "ÞØÚÉ ãä Ôßá ÈíÖæí";
+ Text[ dutch ] = "Ellipssegment";
+ Text[ chinese_simplified ] = "ÍÖԲȱ";
+ Text[ greek ] = "ÔìÞìá Ýëëåéøçò";
+ Text[ korean ] = "Ÿ¿ø ¼¼±×¸ÕÆ®";
+ Text[ turkish ] = "Elips parçasý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralCCUTE
+{
+ Text = "Ellipsenabschnitte" ;
+ Text [ ENGLISH ] = "elliptical segments" ;
+ Text [ norwegian ] = "Ellipseformede Segmenter" ;
+ Text [ italian ] = "Segmenti di ellisse" ;
+ Text [ portuguese_brazilian ] = "Segmentos Elípticos" ;
+ Text [ portuguese ] = "Segmentos elípticos" ;
+ Text [ finnish ] = "Soikion segmentit" ;
+ Text [ danish ] = "Ellipsesegmenter" ;
+ Text [ french ] = "Segments d'ellipses" ;
+ Text [ swedish ] = "Ellipssegment" ;
+ Text [ dutch ] = "Ellips-segmenten" ;
+ Text [ spanish ] = "Segmentos elípticos" ;
+ Text [ english_us ] = "Ellipse Segments" ;
+ Text[ chinese_simplified ] = "ÍÖԲȱ";
+ Text[ russian ] = "Ñåãìåíòû ýëëèïñà";
+ Text[ polish ] = "Segmenty elipsy";
+ Text[ japanese ] = "‘ȉ~Œ`‚ÌØ•Ð";
+ Text[ chinese_traditional ] = "¾ò¶ê¯Ê";
+ Text[ arabic ] = "ÞØÚ ãä Ôßá ÈíÖæí";
+ Text[ dutch ] = "Ellips-segmenten";
+ Text[ chinese_simplified ] = "ÍÖԲȱ";
+ Text[ greek ] = "ÔìÞìáôá Ýëëåéøçò";
+ Text[ korean ] = "Ÿ¿ø ¼¼±×¸ÕÆ®";
+ Text[ turkish ] = "Elips parçalarý";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulPOLY
+{
+ Text = "Polygon" ;
+ Text [ ENGLISH ] = "polygon" ;
+ Text [ norwegian ] = "Polygon" ;
+ Text [ italian ] = "Poligono" ;
+ Text [ portuguese_brazilian ] = "Polígono" ;
+ Text [ portuguese ] = "Polígono" ;
+ Text [ finnish ] = "Murtoviiva" ;
+ Text [ danish ] = "Polygon" ;
+ Text [ french ] = "Polygone" ;
+ Text [ swedish ] = "Polygon" ;
+ Text [ dutch ] = "Veelhoek" ;
+ Text [ spanish ] = "Polígono" ;
+ Text [ english_us ] = "Polygon" ;
+ Text[ chinese_simplified ] = "¶à±ßÐÎ";
+ Text[ russian ] = "Ìíîãîóãîëüíèê";
+ Text[ polish ] = "Wielok¹t";
+ Text[ japanese ] = "‘½ŠpŒ`";
+ Text[ chinese_traditional ] = "¦hÃä§Î";
+ Text[ arabic ] = "ãÖáÚ";
+ Text[ dutch ] = "Veelhoek";
+ Text[ chinese_simplified ] = "¶à±ßÐÎ";
+ Text[ greek ] = "Ðïëýãùíï";
+ Text[ korean ] = "´Ù°¢Çü";
+ Text[ turkish ] = "Çokgen";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulPOLY_PntAnz
+{
+ Text = "Polygon mit %N Punkten" ;
+ Text [ ENGLISH ] = "polygon with %N points" ;
+ Text [ norwegian ] = "+++Polygon" ;
+ Text [ italian ] = "Poligono con %N punti" ;
+ Text [ portuguese_brazilian ] = "+++Polígono" ;
+ Text [ portuguese ] = "Polígono com %N pontos" ;
+ Text [ finnish ] = "+++Murtoviiva" ;
+ Text [ danish ] = "Polygon med %N punkter" ;
+ Text [ french ] = "Polygone avec %N points" ;
+ Text [ swedish ] = "Polygon med %N punkter" ;
+ Text [ dutch ] = "Veelhoek met %N punten" ;
+ Text [ spanish ] = "Polígono con %N puntos" ;
+ Text [ english_us ] = "Polygon %N corners" ;
+ Text[ chinese_simplified ] = "´ø %N µãµÄ¶à±ßÐÎ";
+ Text[ russian ] = "Ìíîãîóãîëüíèê ñ %N óñòóïàìè";
+ Text[ polish ] = "Wielok¹t z %N naro¿nikami";
+ Text[ japanese ] = "%N“_•t‚«‚Ì‘½ŠpŒ`";
+ Text[ chinese_traditional ] = "±a %N ÂIªº¦hÃä§Î";
+ Text[ arabic ] = "ãÖáÚ Ðæ %N äÞØÉ/äÞÇØ";
+ Text[ dutch ] = "Veelhoek met %N punten";
+ Text[ chinese_simplified ] = "´ø %N µãµÄ¶à±ßÐÎ";
+ Text[ greek ] = "Ðïëýãùíï ìå %N óçìåßá";
+ Text[ korean ] = "%N Á¡ÀÌ ÀÖ´Â ´Ù°¢Çü";
+ Text[ turkish ] = "%N noktalý çokgen";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralPOLY
+{
+ Text = "Polygone" ;
+ Text [ ENGLISH ] = "polygons" ;
+ Text [ norwegian ] = "Polygons" ;
+ Text [ italian ] = "Poligoni" ;
+ Text [ portuguese_brazilian ] = "Polígonos" ;
+ Text [ portuguese ] = "Polígonos" ;
+ Text [ finnish ] = "Murtoviivat" ;
+ Text [ danish ] = "Polygoner" ;
+ Text [ french ] = "Polygones" ;
+ Text [ swedish ] = "Polygoner" ;
+ Text [ dutch ] = "Veelhoeken" ;
+ Text [ spanish ] = "Polígonos" ;
+ Text [ english_us ] = "Polygons" ;
+ Text[ chinese_simplified ] = "¶à±ßÐÎ";
+ Text[ russian ] = "Ìíîãîóãîëüíèêè";
+ Text[ polish ] = "Wielok¹ty";
+ Text[ japanese ] = "‘½ŠpŒ`";
+ Text[ chinese_traditional ] = "¦hÃä§Î";
+ Text[ arabic ] = "ãÖáÚÇÊ";
+ Text[ dutch ] = "Veelhoeken";
+ Text[ chinese_simplified ] = "¶à±ßÐÎ";
+ Text[ greek ] = "Ðïëýãùíá";
+ Text[ korean ] = "´Ù°¢Çü";
+ Text[ turkish ] = "Çokgenler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulPLIN
+{
+ Text = "Polylinie" ;
+ Text [ ENGLISH ] = "polyline" ;
+ Text [ norwegian ] = "Polylinje" ;
+ Text [ italian ] = "Polilinea" ;
+ Text [ portuguese_brazilian ] = "Polilinha" ;
+ Text [ portuguese ] = "Polilinha" ;
+ Text [ finnish ] = "Murtoviiva" ;
+ Text [ danish ] = "Polylinje" ;
+ Text [ french ] = "Polyligne" ;
+ Text [ swedish ] = "Polylinje" ;
+ Text [ dutch ] = "Veellijn" ;
+ Text [ spanish ] = "Polilínea" ;
+ Text [ english_us ] = "Polyline" ;
+ Text[ chinese_simplified ] = "¶à±ßÏßÌõ";
+ Text[ russian ] = "Ïîëèëèíèÿ";
+ Text[ polish ] = "Linia ³amana";
+ Text[ japanese ] = "‘½Üü";
+ Text[ chinese_traditional ] = "¦hÃä½u±ø";
+ Text[ arabic ] = "ÎØ ãÊÚÏÏ";
+ Text[ dutch ] = "Veellijn";
+ Text[ chinese_simplified ] = "¶à±ßÏßÌõ";
+ Text[ greek ] = "ÐïëõãñáììÞ";
+ Text[ korean ] = "´ÙÁß¼±";
+ Text[ turkish ] = "Çoklu çizgi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulPLIN_PntAnz
+{
+ Text = "Polylinie mit %N Punkten" ;
+ Text [ ENGLISH ] = "polyline with %N points" ;
+ Text [ norwegian ] = "+++Polylinje" ;
+ Text [ italian ] = "Polilinea con %N punti" ;
+ Text [ portuguese_brazilian ] = "+++Polilinha" ;
+ Text [ portuguese ] = "Polilinha com %N pontos" ;
+ Text [ finnish ] = "+++Murtoviiva" ;
+ Text [ danish ] = "Polylinje med %N punkter" ;
+ Text [ french ] = "Polyligne avec %N points" ;
+ Text [ swedish ] = "Polylinje med %N punkter" ;
+ Text [ dutch ] = "Veellijn met %N punten" ;
+ Text [ spanish ] = "Polilínea con %N puntos" ;
+ Text [ english_us ] = "Polyline with %N corners" ;
+ Text[ chinese_simplified ] = "´ø %N µãµÄ¶à±ßÏßÌõ";
+ Text[ russian ] = "Ëîìàíàÿ ñ %N óñòóïîì(àìè)";
+ Text[ polish ] = "Linia ³amana z %N punktami";
+ Text[ japanese ] = "%N“_•t‚«‚Ì‘½Üü";
+ Text[ chinese_traditional ] = "±a %N ÂIªº¦hÃä½u±ø";
+ Text[ arabic ] = "ÎØ ãÊÚÏÏ Ðæ äÞÇØ %N";
+ Text[ dutch ] = "Veellijn met %N punten";
+ Text[ chinese_simplified ] = "´ø %N µãµÄ¶à±ßÏßÌõ";
+ Text[ greek ] = "ÐïëõãñáììÝò ìå %N óçìåßá";
+ Text[ korean ] = "%N Á¡ÀÌ ÀÖ´Â ´ÙÁß¼±";
+ Text[ turkish ] = "%N noktalý çoklu çizgiler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralPLIN
+{
+ Text = "Polylinien" ;
+ Text [ ENGLISH ] = "polylines" ;
+ Text [ norwegian ] = "Polylinjes" ;
+ Text [ italian ] = "Polilinee" ;
+ Text [ portuguese_brazilian ] = "Polilinhas" ;
+ Text [ portuguese ] = "Polilinhas" ;
+ Text [ finnish ] = "Murtoviivat" ;
+ Text [ danish ] = "Polylinjer" ;
+ Text [ french ] = "Polylignes" ;
+ Text [ swedish ] = "Polylinjer" ;
+ Text [ dutch ] = "Veellijnen" ;
+ Text [ spanish ] = "Polilíneas" ;
+ Text [ english_us ] = "Polylines" ;
+ Text[ chinese_simplified ] = "¶à±ßÏß";
+ Text[ russian ] = "Ïîëèëèíèè";
+ Text[ polish ] = "Linia ³amana";
+ Text[ japanese ] = "‘½Üü";
+ Text[ chinese_traditional ] = "¦hÃä½u";
+ Text[ arabic ] = "ÎØæØ ãÊÚÏÏÉ";
+ Text[ dutch ] = "Veellijnen";
+ Text[ chinese_simplified ] = "¶à±ßÏß";
+ Text[ greek ] = "ÐïëõãñáììÝò";
+ Text[ korean ] = "´ÙÁß¼±";
+ Text[ turkish ] = "Çoklu çizgiler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulPATHLINE
+{
+ Text = "Bézierkurve" ;
+ Text [ ENGLISH ] = "bézier" ;
+ Text [ norwegian ] = "Bézier" ;
+ Text [ italian ] = "Curva di Bezier" ;
+ Text [ portuguese_brazilian ] = "Curva de Bézier" ;
+ Text [ portuguese ] = "Curvas Bézier" ;
+ Text [ finnish ] = "Bezier-käyrä" ;
+ Text [ danish ] = "Bezierkurve" ;
+ Text [ french ] = "Courbe de Bézier" ;
+ Text [ swedish ] = "Bézierkurva" ;
+ Text [ dutch ] = "Bézierboog" ;
+ Text [ spanish ] = "Curva de Bézier" ;
+ Text [ english_us ] = "Bézier curve" ;
+ Text[ chinese_simplified ] = "Bézier ÇúÏß";
+ Text[ russian ] = "Êðèâàÿ Áåçüå";
+ Text[ polish ] = "Krzywa Beziera";
+ Text[ japanese ] = "ÍÞ¼Þ­‹Èü";
+ Text[ chinese_traditional ] = "¦±§Î½u±ø";
+ Text[ arabic ] = "ãäÍäì Bézier";
+ Text[ dutch ] = "Bézierboog";
+ Text[ chinese_simplified ] = "Bézier ÇúÏß";
+ Text[ greek ] = "Êáìðýëç Bezier";
+ Text[ korean ] = "º£Áö¾î °î¼±";
+ Text[ turkish ] = "Bézier eðrisi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralPATHLINE
+{
+ Text = "Bézierkurven" ;
+ Text [ ENGLISH ] = "béziers" ;
+ Text [ norwegian ] = "Bézierer" ;
+ Text [ italian ] = "Curve di Bezier" ;
+ Text [ portuguese_brazilian ] = "Curvas de Bézier" ;
+ Text [ portuguese ] = "Curvas Bézier" ;
+ Text [ finnish ] = "Bezier-käyrät" ;
+ Text [ danish ] = "Bezierkurver" ;
+ Text [ french ] = "Courbes de Bézier" ;
+ Text [ swedish ] = "Bézierkurvor" ;
+ Text [ dutch ] = "Bézierbogen" ;
+ Text [ spanish ] = "Curvas de Bézier" ;
+ Text [ english_us ] = "Bézier curves" ;
+ Text[ chinese_simplified ] = "Bézier ÇúÏß";
+ Text[ russian ] = "Êðèâàÿ Áåçüå";
+ Text[ polish ] = "Krzywa Beziera";
+ Text[ japanese ] = "ÍÞ¼Þª‹Èü";
+ Text[ chinese_traditional ] = "¦±§Î½u¬q";
+ Text[ arabic ] = "ãäÍäíÇÊ Bézier";
+ Text[ dutch ] = "Bézierbogen";
+ Text[ chinese_simplified ] = "Bézier ÇúÏß";
+ Text[ greek ] = "Êáìðýëåò Bezier";
+ Text[ korean ] = "º£Áö¾î °î¼±";
+ Text[ turkish ] = "Bézier eðrileri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulPATHFILL
+{
+ Text = "Bézierkurve" ;
+ Text [ ENGLISH ] = "bézier" ;
+ Text [ norwegian ] = "Bézier" ;
+ Text [ italian ] = "Curva di Bezier" ;
+ Text [ portuguese_brazilian ] = "Curva de Bézier" ;
+ Text [ portuguese ] = "Curvas Bézier" ;
+ Text [ finnish ] = "Bezier-käyrä" ;
+ Text [ danish ] = "Bezierkurve" ;
+ Text [ french ] = "Courbe de Bézier" ;
+ Text [ swedish ] = "Bézierkurva" ;
+ Text [ dutch ] = "Bézierboog" ;
+ Text [ spanish ] = "Curva de Bézier" ;
+ Text [ english_us ] = "Bézier curve" ;
+ Text[ chinese_simplified ] = "Bézier ÇúÏß";
+ Text[ russian ] = "Êðèâàÿ Áåçüå";
+ Text[ polish ] = "Krzywa Beziera";
+ Text[ japanese ] = "ÍÞ¼Þ­‹Èü";
+ Text[ chinese_traditional ] = "¦±§Î½u±ø";
+ Text[ arabic ] = "ãäÍäì Bézier";
+ Text[ dutch ] = "Bézierboog";
+ Text[ chinese_simplified ] = "Bézier ÇúÏß";
+ Text[ greek ] = "Êáìðýëç Bezier";
+ Text[ korean ] = "º£Áö¾î °î¼±";
+ Text[ turkish ] = "Bézier eðrisi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralPATHFILL
+{
+ Text = "Bézierkurven" ;
+ Text [ ENGLISH ] = "béziers" ;
+ Text [ norwegian ] = "Bézierer" ;
+ Text [ italian ] = "Curve di Bezier" ;
+ Text [ portuguese_brazilian ] = "Curvas de Bézier" ;
+ Text [ portuguese ] = "Curvas Bézier" ;
+ Text [ finnish ] = "Bezier-käyrät" ;
+ Text [ danish ] = "Bezierkurver" ;
+ Text [ french ] = "Courbes de Bézier" ;
+ Text [ swedish ] = "Bézierkurvor" ;
+ Text [ dutch ] = "Bézierbogen" ;
+ Text [ spanish ] = "Curvas de Bézier" ;
+ Text [ english_us ] = "Bézier curves" ;
+ Text[ chinese_simplified ] = "Bézier ÇúÏß";
+ Text[ russian ] = "Êðèâàÿ Áåçüå";
+ Text[ polish ] = "Krzywa Beziera";
+ Text[ japanese ] = "ÍÞ¼Þª‹Èü";
+ Text[ chinese_traditional ] = "¦±§Î½u¬q";
+ Text[ arabic ] = "ãäÍäíÇÊ Bézier";
+ Text[ dutch ] = "Bézierbogen";
+ Text[ chinese_simplified ] = "Bézier ÇúÏß";
+ Text[ greek ] = "Êáìðýëåò Bezier";
+ Text[ korean ] = "º£Áö¾î °î¼±";
+ Text[ turkish ] = "Bézier eðrileri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulFREELINE
+{
+ Text = "Freihandlinie" ;
+ Text [ ENGLISH ] = "freehand-line" ;
+ Text [ norwegian ] = "Frihånd" ;
+ Text [ italian ] = "Linea a mano libera" ;
+ Text [ portuguese_brazilian ] = "Linha a mao livre" ;
+ Text [ portuguese ] = "Linha de forma livre" ;
+ Text [ finnish ] = "Vapaa kuvio" ;
+ Text [ danish ] = "Frihåndslinje" ;
+ Text [ french ] = "Ligne à main levée" ;
+ Text [ swedish ] = "Frihandslinje" ;
+ Text [ dutch ] = "Vrije hand-lijn" ;
+ Text [ spanish ] = "Línea a mano alzada" ;
+ Text [ english_us ] = "Freeform Line" ;
+ Text[ chinese_simplified ] = "×ÔÓÉÐÎÏßÌõ";
+ Text[ russian ] = "Ðèñîâàííàÿ ëèíèÿ";
+ Text[ polish ] = "Dowolne linie";
+ Text[ japanese ] = "ÌØ°ÊÝÄÞ‚Ìü";
+ Text[ chinese_traditional ] = "¦Û¥Ñ§Î½u±ø";
+ Text[ arabic ] = "ÎØ ÍÑ";
+ Text[ dutch ] = "Vrije hand-lijn";
+ Text[ chinese_simplified ] = "×ÔÓÉÐÎÏßÌõ";
+ Text[ greek ] = "ÃñáììÞ åëåýèåñçò ó÷åäßáóçò";
+ Text[ korean ] = "ÀÚÀ¯Çü ¼±";
+ Text[ turkish ] = "Serbest çizgi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralFREELINE
+{
+ Text = "Freihandlinien" ;
+ Text [ ENGLISH ] = "freehand-lines" ;
+ Text [ norwegian ] = "Frihender" ;
+ Text [ italian ] = "Linee a mano libera" ;
+ Text [ portuguese_brazilian ] = "Linhas a mao livre" ;
+ Text [ portuguese ] = "Linhas de forma livre" ;
+ Text [ finnish ] = "Vapaat kuviot" ;
+ Text [ danish ] = "Frihåndslinjer" ;
+ Text [ french ] = "Lignes à main levée" ;
+ Text [ swedish ] = "Frihandslinjer" ;
+ Text [ dutch ] = "Vrije hand-lijnen" ;
+ Text [ spanish ] = "Líneas a mano alzada" ;
+ Text [ english_us ] = "Freeform Lines" ;
+ Text[ chinese_simplified ] = "×ÔÓÉÐÎÏßÌõ";
+ Text[ russian ] = "Ðèñîâàííûå ëèíèè";
+ Text[ polish ] = "Dowolne linie";
+ Text[ japanese ] = "ÌØ°ÊÝÄÞ‚Ìü";
+ Text[ chinese_traditional ] = "¦Û¥Ñ§Î½u±ø";
+ Text[ arabic ] = "ÎØæØ ÍÑÉ";
+ Text[ dutch ] = "Vrije hand-lijnen";
+ Text[ chinese_simplified ] = "×ÔÓÉÐÎÏßÌõ";
+ Text[ greek ] = "ÃñáììÝò åëåýèåñçò ó÷åäßáóçò";
+ Text[ korean ] = "ÀÚÀ¯Çü ¼±";
+ Text[ turkish ] = "Serbest çizgiler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulFREEFILL
+{
+ Text = "Freihandlinie" ;
+ Text [ ENGLISH ] = "freehand-area" ;
+ Text [ norwegian ] = "Frihånd" ;
+ Text [ italian ] = "Linea a mano libera" ;
+ Text [ portuguese_brazilian ] = "Linha a mao livre" ;
+ Text [ portuguese ] = "Linha de forma livre" ;
+ Text [ finnish ] = "Vapaa kuvio" ;
+ Text [ danish ] = "Frihåndslinje" ;
+ Text [ french ] = "Ligne à main levée" ;
+ Text [ swedish ] = "Frihandslinje" ;
+ Text [ dutch ] = "Vrije hand-lijn" ;
+ Text [ spanish ] = "Línea a mano alzada" ;
+ Text [ english_us ] = "Freeform Line" ;
+ Text[ chinese_simplified ] = "×ÔÓÉÐÎÏßÌõ";
+ Text[ russian ] = "Ðèñîâàííàÿ ëèíèÿ";
+ Text[ polish ] = "Dowolne linie";
+ Text[ japanese ] = "ÌØ°ÊÝÄÞ‚Ìü";
+ Text[ chinese_traditional ] = "¦Û¥Ñ§Î½u±ø";
+ Text[ arabic ] = "ÎØ ÍÑ";
+ Text[ dutch ] = "Vrije hand-lijn";
+ Text[ chinese_simplified ] = "×ÔÓÉÐÎÏßÌõ";
+ Text[ greek ] = "ÃñáììÞ åëåýèåñçò ó÷åäßáóçò";
+ Text[ korean ] = "ÀÚÀ¯Çü ¼±";
+ Text[ turkish ] = "Serbest çizgi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralFREEFILL
+{
+ Text = "Freihandlinien" ;
+ Text [ ENGLISH ] = "freehand-areas" ;
+ Text [ norwegian ] = "Frihender" ;
+ Text [ italian ] = "Linee a mano libera" ;
+ Text [ portuguese_brazilian ] = "Linhas a mao livre" ;
+ Text [ portuguese ] = "Linhas de forma livre" ;
+ Text [ finnish ] = "Vapaat kuviot" ;
+ Text [ danish ] = "Frihåndslinjer" ;
+ Text [ french ] = "Lignes à main levée" ;
+ Text [ swedish ] = "Frihandslinjer" ;
+ Text [ dutch ] = "Vrije hand-lijnen" ;
+ Text [ spanish ] = "Líneas a mano alzada" ;
+ Text [ english_us ] = "Freeform Lines" ;
+ Text[ chinese_simplified ] = "×ÔÓÉÐÎÏßÌõ";
+ Text[ russian ] = "Ðèñîâàííûå ëèíèè";
+ Text[ polish ] = "Dowolne linie";
+ Text[ japanese ] = "ÌØ°ÊÝÄÞ‚Ìü";
+ Text[ chinese_traditional ] = "¦Û¥Ñ§Î½u±ø";
+ Text[ arabic ] = "ÎØæØ ÍÑÉ";
+ Text[ dutch ] = "Vrije hand-lijnen";
+ Text[ chinese_simplified ] = "×ÔÓÉÐÎÏßÌõ";
+ Text[ greek ] = "ÃñáììÝò åëåýèåñçò ó÷åäßáóçò";
+ Text[ korean ] = "ÀÚÀ¯Çü ¼±";
+ Text[ turkish ] = "Serbest çizgiler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulCOMBLINE
+{
+ Text = "Kurvenobjekt" ;
+ Text [ ENGLISH ] = "Curve" ;
+ Text [ portuguese ] = "Curva" ;
+ Text [ english_us ] = "Curve" ;
+ Text [ portuguese_brazilian ] = "Kurvenobjekt" ;
+ Text [ swedish ] = "Kurvobjekt" ;
+ Text [ danish ] = "Kurveobjekt" ;
+ Text [ italian ] = "Curva" ;
+ Text [ spanish ] = "Objeto de curva" ;
+ Text [ french ] = "Objet de courbe" ;
+ Text [ dutch ] = "Boogobject" ;
+ Text[ chinese_simplified ] = "ÇúÏ߶ÔÏó";
+ Text[ russian ] = "Îáúåêò êðèâûõ";
+ Text[ polish ] = "Obiekt krzywych";
+ Text[ japanese ] = "‹ÈüµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "¦±½uª«¥ó";
+ Text[ arabic ] = "ßÇÆä ãäÍäì";
+ Text[ dutch ] = "Boogobject";
+ Text[ chinese_simplified ] = "ÇúÏ߶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíï êáìðýëçò";
+ Text[ korean ] = "°î¼± °³Ã¼";
+ Text[ turkish ] = "Eðri nesneler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralCOMBLINE
+{
+ Text = "Kurvenobjekte" ;
+ Text [ ENGLISH ] = "Curves" ;
+ Text [ portuguese ] = "Objectos curvados" ;
+ Text [ english_us ] = "Curve objects" ;
+ Text [ portuguese_brazilian ] = "Kurvenobjekte" ;
+ Text [ swedish ] = "Kurvobjekt" ;
+ Text [ danish ] = "Kurveobjekter" ;
+ Text [ italian ] = "Oggetti curva" ;
+ Text [ spanish ] = "Objetos de curva" ;
+ Text [ french ] = "Objets incurvés" ;
+ Text [ dutch ] = "Boogobjecten" ;
+ Text[ chinese_simplified ] = "ÇúÏ߶ÔÏó";
+ Text[ russian ] = "Îáúåêòû êðèâîé";
+ Text[ polish ] = "Obiekty krzywych";
+ Text[ japanese ] = "‹Èü‚̵ÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "¦±½uª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ãäÍäì";
+ Text[ dutch ] = "Boogobjecten";
+ Text[ chinese_simplified ] = "ÇúÏ߶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíá êáìðýëçò";
+ Text[ korean ] = "°î¼± °³Ã¼";
+ Text[ turkish ] = "Eðri nesneler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulCOMBFILL
+{
+ Text = "Kurvenobjekt" ;
+ Text [ ENGLISH ] = "Curve" ;
+ Text [ portuguese ] = "Curva" ;
+ Text [ english_us ] = "Curve" ;
+ Text [ portuguese_brazilian ] = "Kurvenobjekt" ;
+ Text [ swedish ] = "Kurvobjekt" ;
+ Text [ danish ] = "Kurveobjekt" ;
+ Text [ italian ] = "Oggetto curva" ;
+ Text [ spanish ] = "Objeto de curva" ;
+ Text [ french ] = "Objet de courbe" ;
+ Text [ dutch ] = "Boogobject" ;
+ Text[ chinese_simplified ] = "ÇúÏ߶ÔÏó";
+ Text[ russian ] = "Îáúåêò êðèâûõ";
+ Text[ polish ] = "Obiekty krzywych";
+ Text[ japanese ] = "‹ÈüµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "¦±½uª«¥ó";
+ Text[ arabic ] = "ßÇÆä ãäÍäì";
+ Text[ dutch ] = "Boogobject";
+ Text[ chinese_simplified ] = "ÇúÏ߶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíï êáìðýëçò";
+ Text[ korean ] = "°î¼± °³Ã¼";
+ Text[ turkish ] = "Eðri nesne";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralCOMBFILL
+{
+ Text = "Kurvenobjekte" ;
+ Text [ ENGLISH ] = "Curves" ;
+ Text [ portuguese ] = "Objectos curvados" ;
+ Text [ english_us ] = "Curve objects" ;
+ Text [ portuguese_brazilian ] = "Kurvenobjekte" ;
+ Text [ swedish ] = "Kurvobjekt" ;
+ Text [ danish ] = "Kurveobjekter" ;
+ Text [ italian ] = "Oggetti curva" ;
+ Text [ spanish ] = "Objetos de curva" ;
+ Text [ french ] = "Objets incurvés" ;
+ Text [ dutch ] = "Boogobjecten" ;
+ Text[ chinese_simplified ] = "ÇúÏ߶ÔÏó";
+ Text[ russian ] = "Îáúåêòû êðèâîé";
+ Text[ polish ] = "Obiekty krzywych";
+ Text[ japanese ] = "‹Èü‚̵ÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "¦±½uª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ãäÍäì";
+ Text[ dutch ] = "Boogobjecten";
+ Text[ chinese_simplified ] = "ÇúÏ߶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíá êáìðýëçò";
+ Text[ korean ] = "°î¼± °³Ã¼";
+ Text[ turkish ] = "Eðri nesneler";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulNATSPLN
+{
+ Text = "Natürlicher Spline" ;
+ Text [ ENGLISH ] = "natural spline" ;
+ Text [ norwegian ] = "Naturlig spor rilleNatural Spline" ;
+ Text [ italian ] = "Curva Spline naturale" ;
+ Text [ portuguese_brazilian ] = "Spline Natural" ;
+ Text [ portuguese ] = "Spline natural" ;
+ Text [ finnish ] = "Luonnollinen splini" ;
+ Text [ danish ] = "Naturlig spline" ;
+ Text [ french ] = "Spline naturelle" ;
+ Text [ swedish ] = "Naturlig spline" ;
+ Text [ dutch ] = "Natuurlijke spline" ;
+ Text [ spanish ] = "Spline natural" ;
+ Text [ english_us ] = "Natural Spline" ;
+ Text[ chinese_simplified ] = "×ÔÈ»µÄ³ÝÌõÐÎ";
+ Text[ russian ] = "Íàòóðàëüíûé ñïëàéí";
+ Text[ polish ] = "Naturalna krzywa sk³adana";
+ Text[ japanese ] = "Ž©‘R‹Èü";
+ Text[ chinese_traditional ] = "¦ÛµMªº¾¦±ø§Î";
+ Text[ arabic ] = "ÔÑíÍÉ ØÈíÚíÉ";
+ Text[ dutch ] = "Natuurlijke spline";
+ Text[ chinese_simplified ] = "×ÔÈ»µÄ³ÝÌõÐÎ";
+ Text[ greek ] = "ÖõóéêÞ Spline";
+ Text[ korean ] = "ÀÚ¿¬ÀûÀÎ ½ºÇöóÀÎ";
+ Text[ turkish ] = "Doðal Spline";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralNATSPLN
+{
+ Text = "Natürliche Splines" ;
+ Text [ ENGLISH ] = "natural splines" ;
+ Text [ norwegian ] = "+++Natural Splines" ;
+ Text [ italian ] = "Curve Spline naturali" ;
+ Text [ portuguese_brazilian ] = "Splines Naturais" ;
+ Text [ portuguese ] = "Splines naturais" ;
+ Text [ finnish ] = "Luonnolliset splinit" ;
+ Text [ danish ] = "Naturlige splines" ;
+ Text [ french ] = "Splines naturelles" ;
+ Text [ swedish ] = "Naturliga splines" ;
+ Text [ dutch ] = "Natuurlijke splines" ;
+ Text [ spanish ] = "splines naturales" ;
+ Text [ english_us ] = "Natural Splines" ;
+ Text[ chinese_simplified ] = "×ÔÈ»ÐγÝÌõ";
+ Text[ russian ] = "Íàòóðàëüíûå ñïëàéíû";
+ Text[ polish ] = "Naturalne krzywe sk³adane";
+ Text[ japanese ] = "Ž©‘R‹Èü";
+ Text[ chinese_traditional ] = "¦ÛµM§Î¾¦±ø";
+ Text[ arabic ] = "ÔÑÇÆÍ ØÈíÚíÉ";
+ Text[ language_user1 ] = " ";
+ Text[ dutch ] = "Natuurlijke splines";
+ Text[ chinese_simplified ] = "×ÔÈ»ÐγÝÌõ";
+ Text[ greek ] = "ÖõóéêÝò Splines";
+ Text[ korean ] = "ÀÚ¿¬ ½ºÇöóÀÎ";
+ Text[ turkish ] = "Doðal Spline";
+};
+String STR_ObjNameSingulPERSPLN
+{
+ Text = "Periodischer Spline" ;
+ Text [ ENGLISH ] = "periodic spline" ;
+ Text [ norwegian ] = "+++PeriodiskPeriodic Spline" ;
+ Text [ italian ] = "Curva Spline periodica" ;
+ Text [ portuguese_brazilian ] = "Spline Periódico" ;
+ Text [ portuguese ] = "Spline periódico" ;
+ Text [ finnish ] = "Jaksollinen splini" ;
+ Text [ danish ] = "Periodisk spline" ;
+ Text [ french ] = "Spline périodique" ;
+ Text [ swedish ] = "Periodisk spline" ;
+ Text [ dutch ] = "Periodieke spline" ;
+ Text [ spanish ] = "spline periódico" ;
+ Text [ english_us ] = "Periodic Spline" ;
+ Text[ chinese_simplified ] = "ÓйæÔòµÄ³ÝÌõ";
+ Text[ russian ] = "Ïåðèîäè÷åñêèé ñïëàéí";
+ Text[ polish ] = "Okresowa krzywa sk³adana";
+ Text[ japanese ] = "ŽüŠú“I‚È‹Èü";
+ Text[ chinese_traditional ] = "¦³³W«hªº¾¦±ø";
+ Text[ arabic ] = "ÔÑíÍÉ ÏæÑíÉ";
+ Text[ dutch ] = "Periodieke spline";
+ Text[ chinese_simplified ] = "ÓйæÔòµÄ³ÝÌõ";
+ Text[ greek ] = "ÐåñéïäéêÞ Spline";
+ Text[ korean ] = "ÁÖ±âÀû ½ºÇöóÀÎ";
+ Text[ turkish ] = "Düzenli Spline";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralPERSPLN
+{
+ Text = "Periodische Splines" ;
+ Text [ ENGLISH ] = "periodic splines" ;
+ Text [ norwegian ] = "+++PeriodiskPeriodic Splines" ;
+ Text [ italian ] = "Curve Spline periodiche" ;
+ Text [ portuguese_brazilian ] = "Splines Periódicos" ;
+ Text [ portuguese ] = "Splines periódicos" ;
+ Text [ finnish ] = "Jaksolliset splinit" ;
+ Text [ danish ] = "Periodiske splines" ;
+ Text [ french ] = "Splines périodiques" ;
+ Text [ swedish ] = "Periodiska splines" ;
+ Text [ dutch ] = "Periodieke splines" ;
+ Text [ spanish ] = "splines periódicos" ;
+ Text [ english_us ] = "Periodic Splines" ;
+ Text[ chinese_simplified ] = "ÓйæÂɵijÝÌõÐÎ";
+ Text[ russian ] = "Ñïëàéíû ñ ïåðèîäàìè";
+ Text[ polish ] = "Okresowe krzywe sk³adane";
+ Text[ japanese ] = "ŽüŠú“I‚È‹Èü";
+ Text[ chinese_traditional ] = "¦³³W«ßªº¾¦±ø§Î";
+ Text[ arabic ] = "ÔÑÇÆÍ ÏæÑíÉ";
+ Text[ language_user1 ] = " ";
+ Text[ dutch ] = "Periodieke splines";
+ Text[ chinese_simplified ] = "ÓйæÂɵijÝÌõÐÎ";
+ Text[ greek ] = "ÐåñéïäéêÝò Splines";
+ Text[ korean ] = "ÁÖ±âÀû ½ºÇöóÀÎ";
+ Text[ turkish ] = "Düzenli Spline";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulTEXT
+{
+ Text = "Textrahmen" ;
+ Text [ ENGLISH ] = "textframe" ;
+ Text [ norwegian ] = "Tekstramme" ;
+ Text [ italian ] = "Cornice" ;
+ Text [ portuguese_brazilian ] = "Moldura de texto" ;
+ Text [ portuguese ] = "Moldura de texto" ;
+ Text [ finnish ] = "Tekstikehys" ;
+ Text [ danish ] = "Tekstboks" ;
+ Text [ french ] = "Cadre texte" ;
+ Text [ swedish ] = "Textram" ;
+ Text [ dutch ] = "Tekstkader" ;
+ Text [ spanish ] = "Marco de texto" ;
+ Text [ english_us ] = "Text Frame" ;
+ Text[ chinese_simplified ] = "Îı¾¿ò";
+ Text[ russian ] = "Òåêñòîâàÿ ðàìêà";
+ Text[ polish ] = "Ramka tekstu";
+ Text[ japanese ] = "÷½Ä˜g";
+ Text[ chinese_traditional ] = "¤å¦r¤è¶ô";
+ Text[ arabic ] = "ÅØÇÑ äÕ";
+ Text[ dutch ] = "Tekstkader";
+ Text[ chinese_simplified ] = "Îı¾¿ò";
+ Text[ greek ] = "Ðëáßóéï êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® Ʋ";
+ Text[ turkish ] = "Metin çerçevesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralTEXT
+{
+ Text = "Textrahmen" ;
+ Text [ ENGLISH ] = "textframes" ;
+ Text [ norwegian ] = "Tekstrammer" ;
+ Text [ italian ] = "Cornici" ;
+ Text [ portuguese_brazilian ] = "Molduras de texto" ;
+ Text [ portuguese ] = "Moldura de texto" ;
+ Text [ finnish ] = "Tekstikehykset" ;
+ Text [ danish ] = "Tekstbokse" ;
+ Text [ french ] = "Cadre texte" ;
+ Text [ swedish ] = "Textramar" ;
+ Text [ dutch ] = "Tekstkader" ;
+ Text [ spanish ] = "Marco de texto" ;
+ Text [ english_us ] = "Text Frame" ;
+ Text[ chinese_simplified ] = "Îı¾¿ò";
+ Text[ russian ] = "Òåêñòîâûå ðàìêè";
+ Text[ polish ] = "Ramka tekstu";
+ Text[ japanese ] = "÷½Ä˜g";
+ Text[ chinese_traditional ] = "¤å¦r¤è¶ô";
+ Text[ arabic ] = "ÅØÇÑÇÊ äÕ";
+ Text[ dutch ] = "Tekstkader";
+ Text[ chinese_simplified ] = "Îı¾¿ò";
+ Text[ greek ] = "Ðëáßóéï êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® Ʋ";
+ Text[ turkish ] = "Metin çerçevesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulTEXTLNK
+{
+ Text = "verknüpfter Textrahmen" ;
+ Text [ ENGLISH ] = "linked textframe" ;
+ Text [ portuguese ] = "Moldura de texto ligada" ;
+ Text [ english_us ] = "Linked text frame" ;
+ Text [ portuguese_brazilian ] = "verknüpfter Textrahmen" ;
+ Text [ swedish ] = "länkad textram" ;
+ Text [ danish ] = "Kædet tekstboks" ;
+ Text [ italian ] = "Cornice di testo collegata" ;
+ Text [ spanish ] = "Marco de texto vinculado" ;
+ Text [ french ] = "Cadre texte lié" ;
+ Text [ dutch ] = "Gekoppeld tekstkader" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄÎı¾¿ò";
+ Text[ russian ] = "ñâÿçàííàÿ òåêñòîâàÿ ðàìêà";
+ Text[ polish ] = "Po³¹czona ramka tekstu";
+ Text[ japanese ] = "Øݸ‚³‚ꂽ÷½Ä˜g";
+ Text[ chinese_traditional ] = "³sµ²¤å¦r¤è¶ô";
+ Text[ arabic ] = "ÅØÇÑ ÇáäÕ ÇáãÑÊÈØ";
+ Text[ dutch ] = "Gekoppeld tekstkader";
+ Text[ chinese_simplified ] = "Á´½ÓµÄÎı¾¿ò";
+ Text[ greek ] = "óõíäåäåìÝíï ðëáßóéï êåéìÝíïõ";
+ Text[ korean ] = "¿¬°áµÈ ÅؽºÆ® Ʋ";
+ Text[ turkish ] = "Baðlantýlý metin çerçevesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralTEXTLNK
+{
+ Text = "verknüpfte Textrahmen" ;
+ Text [ ENGLISH ] = "linked textframes" ;
+ Text [ portuguese ] = "Molduras de texto ligadas" ;
+ Text [ english_us ] = "Linked text frames" ;
+ Text [ portuguese_brazilian ] = "verknüpfte Textrahmen" ;
+ Text [ swedish ] = "länkade textramar" ;
+ Text [ danish ] = "Kædede tekstbokse" ;
+ Text [ italian ] = "Cornici di testo collegate" ;
+ Text [ spanish ] = "Marcos de texto vinculados" ;
+ Text [ french ] = "Cadres texte liés" ;
+ Text [ dutch ] = "Gekoppelde tekstkaders" ;
+ Text[ chinese_simplified ] = "Á¬½ÓµÄÎı¾¿ò";
+ Text[ russian ] = "ñâÿçàííûå òåêñòîâûå ðàìêè";
+ Text[ polish ] = "Po³¹czona ramka tekstu";
+ Text[ japanese ] = "Øݸ‚³‚ꂽ÷½Ä˜g";
+ Text[ chinese_traditional ] = "³sµ²ªº¤å¦r¤è¶ô";
+ Text[ arabic ] = "ÅØÇÑÇÊ ÇáäÕ ÇáãÑÊÈØÉ";
+ Text[ dutch ] = "Gekoppelde tekstkaders";
+ Text[ chinese_simplified ] = "Á¬½ÓµÄÎı¾¿ò";
+ Text[ greek ] = "óõíäåäåìÝíá ðëáßóéá êåéìÝíïõ";
+ Text[ korean ] = "¿¬°áµÈ ÅؽºÆ® Ʋ";
+ Text[ turkish ] = "Baðlantýlý metin çerçeveleri";
+ Text[ language_user1 ] = " ";
+};
+ //String STR_ObjNameSingulXTXT {
+ // Text="Textfortsetzungsrahmen";
+ // Text[ENGLISH]="drawobject";
+ // Text[norwegian]="Tegneobjekt";
+ // Text[italian]="Disegna oggetto";
+ // Text[portuguese_brazilian]="Desenhar objeto";
+ // Text[portuguese]="Desenhar objecto";
+ // Text[finnish]="Piirto-objekti";
+ // Text[danish]="Tegneobjekt";
+ // Text[french]="Drawobject";
+ // Text[swedish]="Ritobjekt";
+ // Text[dutch]="Tekenobject";
+ // Text[spanish]="Objeto de dibujo";
+ // Text[english_us]="drawobject";
+ //};
+ //String STR_ObjNamePluralXTXT {
+ // Text="Textfortsetzungsrahmen";
+ // Text[ENGLISH]="drawobjects";
+ // Text[norwegian]="Tegneobjektr";
+ // Text[italian]="Disegna oggetti";
+ // Text[portuguese_brazilian]="Desenhar objetos";
+ // Text[portuguese]="Desenhar objectos";
+ // Text[finnish]="Piirto-objektit";
+ // Text[danish]="Tegneobjekter";
+ // Text[french]="Drawobjects";
+ // Text[swedish]="Ritobjekt";
+ // Text[dutch]="Tekenobjecten";
+ // Text[spanish]="Objetos de dibujo";
+ // Text[english_us]="drawobjects";
+ //};
+String STR_ObjNameSingulFITTEXT
+{
+ Text = "angepasstes Textobjekt" ;
+ Text [ ENGLISH ] = "fit-to-size textobject" ;
+ Text [ norwegian ] = "Tilpass størrelse på Tegneobjekt" ;
+ Text [ italian ] = "Oggetto di testo adattato" ;
+ Text [ portuguese_brazilian ] = "Objeto de texto encaixado" ;
+ Text [ portuguese ] = "Objecto de texto encaixado" ;
+ Text [ finnish ] = "Muuttuvakokoinen tekstiobjekti" ;
+ Text [ danish ] = "Tilpasset tekstobjekt" ;
+ Text [ french ] = "Ajuster la taille de l'objet au texte" ;
+ Text [ swedish ] = "anpassat textobjekt" ;
+ Text [ dutch ] = "Aangepast tekstobject" ;
+ Text [ spanish ] = "Objeto de texto ajustado" ;
+ Text [ english_us ] = "Fit-to-size text object" ;
+ Text[ chinese_simplified ] = "µ÷Õû¹ýµÄÎÄ×Ö¶ÔÏó";
+ Text[ russian ] = "ñîãëàñîâàííûé îáúåêò òåêñòà";
+ Text[ polish ] = "dostosowany obiekt tekstowy";
+ Text[ japanese ] = "“K‡‚µ‚½Ã·½Ä µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "½Õ¾ã¹Lªº¤å¥»¹ï¶H";
+ Text[ arabic ] = "ÚäÕÑ äÕ Êã ãáÇÁãÊå";
+ Text[ dutch ] = "Aangepast tekstobject";
+ Text[ chinese_simplified ] = "µ÷Õû¹ýµÄÎÄ×Ö¶ÔÏó";
+ Text[ greek ] = "ðñïóáñìïóìÝíï áíôéêåßìåíï êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® °³Ã¼¿¡ Å©±â ¸ÂÃã";
+ Text[ turkish ] = "Ayarlanmýþ metin nesnesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralFITTEXT
+{
+ Text = "angepasste Textobjekte" ;
+ Text [ ENGLISH ] = "fit-to-size textobjects" ;
+ Text [ norwegian ] = "Tilpass størrelse på Tegneobjekter" ;
+ Text [ italian ] = "oggetti di testo adattati" ;
+ Text [ portuguese_brazilian ] = "Objetos de texto encaixados" ;
+ Text [ portuguese ] = "Objectos de texto encaixados" ;
+ Text [ finnish ] = "Muuttuvakokoiset tekstiobjektit" ;
+ Text [ danish ] = "Tilpassede tekstobjekter" ;
+ Text [ french ] = "Ajuster la taille des objets au texte" ;
+ Text [ swedish ] = "anpassade textobjekt" ;
+ Text [ dutch ] = "Aangepaste tekstobjecten" ;
+ Text [ spanish ] = "Objetos de texto ajustados" ;
+ Text [ english_us ] = "Fit-to-size text objects" ;
+ Text[ chinese_simplified ] = "µ÷Õû¹ýµÄÎÄ×Ö¶ÔÏó";
+ Text[ russian ] = "ñîãëàñîâàííûå îáúåêòû òåêñòà";
+ Text[ polish ] = "dostosowane obiekty tekstowe";
+ Text[ japanese ] = "‡‚Á‚½Ã·½Ä µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "½Õ¾ã¹Lªº¤å¦rª«¥ó";
+ Text[ arabic ] = "ÚäÇÕÑ äÕ Êã ãáÇÁãÊåÇ";
+ Text[ dutch ] = "Aangepaste tekstobjecten";
+ Text[ chinese_simplified ] = "µ÷Õû¹ýµÄÎÄ×Ö¶ÔÏó";
+ Text[ greek ] = "ðñïóáñìïóìÝíá áíôéêåßìåíá êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® °³Ã¼¿¡ Å©±â ¸ÂÃã";
+ Text[ turkish ] = "Ayarlanmýþ metin nesneleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulFITALLTEXT
+{
+ Text = "angepasstes Textobjekt" ;
+ Text [ ENGLISH ] = "fit-to-size textobject" ;
+ Text [ norwegian ] = "Tilpass størrelse på Tegneobjekt" ;
+ Text [ italian ] = "Oggetto di testo adattato" ;
+ Text [ portuguese_brazilian ] = "Objeto de texto encaixado" ;
+ Text [ portuguese ] = "Objecto de texto encaixado" ;
+ Text [ finnish ] = "Muuttuvakokoinen tekstiobjekti" ;
+ Text [ danish ] = "Tilpasset tekstobjekt" ;
+ Text [ french ] = "Ajuster la taille de l'objet au texte" ;
+ Text [ swedish ] = "anpassat textobjekt" ;
+ Text [ dutch ] = "Aangepast tekstobject" ;
+ Text [ spanish ] = "Objeto de texto ajustado" ;
+ Text [ english_us ] = "Fit-to-size text object" ;
+ Text[ chinese_simplified ] = "µ÷Õû¹ýµÄÎÄ×Ö¶ÔÏó";
+ Text[ russian ] = "ñîãëàñîâàííûé îáúåêò òåêñòà";
+ Text[ polish ] = "dostosowany obiekt tekstowy";
+ Text[ japanese ] = "“K‡‚µ‚½Ã·½Ä µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "½Õ¾ã¹Lªº¤å¦rª«¥ó";
+ Text[ arabic ] = "ÚäÕÑ äÕ Êã ãáÇÁãÊå";
+ Text[ dutch ] = "Aangepast tekstobject";
+ Text[ chinese_simplified ] = "µ÷Õû¹ýµÄÎÄ×Ö¶ÔÏó";
+ Text[ greek ] = "ðñïóáñìïóìÝíï áíôéêåßìåíï êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® °³Ã¼¿¡ Å©±â ¸ÂÃã";
+ Text[ turkish ] = "Ayarlanmýþ metin nesnesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralFITALLTEXT
+{
+ Text = "angepasste Textobjekte" ;
+ Text [ ENGLISH ] = "fit-to-size textobjects" ;
+ Text [ norwegian ] = "Tilpass størrelse på Tegneobjekter" ;
+ Text [ italian ] = "oggetti di testo adattati" ;
+ Text [ portuguese_brazilian ] = "Objetos de texto encaixados" ;
+ Text [ portuguese ] = "Objectos de texto encaixados" ;
+ Text [ finnish ] = "Muuttuvakokoiset tekstiobjektit" ;
+ Text [ danish ] = "Tilpassede tekstobjekter" ;
+ Text [ french ] = "Ajuster la taille des objets au texte" ;
+ Text [ swedish ] = "anpassade textobjekt" ;
+ Text [ dutch ] = "Aangepaste tekstobjecten" ;
+ Text [ spanish ] = "Objetos de texto ajustados" ;
+ Text [ english_us ] = "Fit-to-size text objects" ;
+ Text[ chinese_simplified ] = "µ÷Õû¹ýµÄÎÄ×Ö¶ÔÏó";
+ Text[ russian ] = "ñîãëàñîâàííûå îáúåêòû òåêñòà";
+ Text[ polish ] = "dostosowane obiekty tekstowe";
+ Text[ japanese ] = "‡‚Á‚½Ã·½Ä µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "½Õ¾ã¹Lªº¤å¦rª«¥ó";
+ Text[ arabic ] = "ÚäÇÕÑ äÕ Êã ãáÇÁãÊåÇ";
+ Text[ dutch ] = "Aangepaste tekstobjecten";
+ Text[ chinese_simplified ] = "µ÷Õû¹ýµÄÎÄ×Ö¶ÔÏó";
+ Text[ greek ] = "ðñïóáñìïóìÝíá áíôéêåßìåíá êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® °³Ã¼¿¡ Å©±â ¸ÂÃã";
+ Text[ turkish ] = "Ayarlanmýþ metin nesneleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulTITLETEXT
+{
+ Text = "Titeltext" ;
+ Text [ ENGLISH ] = "titletext" ;
+ Text [ norwegian ] = "Titteltekst" ;
+ Text [ italian ] = "Testo del titolo" ;
+ Text [ portuguese_brazilian ] = "Textoi,título" ;
+ Text [ portuguese ] = "Texto do título" ;
+ Text [ finnish ] = "Otsikkoteksti" ;
+ Text [ danish ] = "Titeltekst" ;
+ Text [ french ] = "Texte (titres)" ;
+ Text [ swedish ] = "Rubriktext" ;
+ Text [ dutch ] = "Titeltekst" ;
+ Text [ spanish ] = "Texto del título" ;
+ Text [ english_us ] = "Title text" ;
+ Text[ chinese_simplified ] = "±êÌâÎÄ";
+ Text[ russian ] = "Òåêñò çàãîëîâêà";
+ Text[ polish ] = "Tekst tytu³owy";
+ Text[ japanese ] = "À²Ä٠÷½Ä";
+ Text[ chinese_traditional ] = "¼ÐÃD¤å¦r";
+ Text[ arabic ] = "äÕ ÇáÚäæÇä";
+ Text[ dutch ] = "Titeltekst";
+ Text[ chinese_simplified ] = "±êÌâÎÄ";
+ Text[ greek ] = "Êåßìåíï ôßôëïõ";
+ Text[ korean ] = "Á¦¸ñ ÅؽºÆ®";
+ Text[ turkish ] = "Baþlýk metni";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralTITLETEXT
+{
+ Text = "Titeltexte" ;
+ Text [ ENGLISH ] = "titletexts" ;
+ Text [ norwegian ] = "Titteltekst" ;
+ Text [ italian ] = "Testi del titolo" ;
+ Text [ portuguese_brazilian ] = "Texto,título" ;
+ Text [ portuguese ] = "Textos de título" ;
+ Text [ finnish ] = "Otsikkotekstit" ;
+ Text [ danish ] = "Titeltekster" ;
+ Text [ french ] = "Textes (titres)" ;
+ Text [ swedish ] = "Rubriktexter" ;
+ Text [ dutch ] = "Titelteksten" ;
+ Text [ spanish ] = "Textos del título" ;
+ Text [ english_us ] = "Title texts" ;
+ Text[ chinese_simplified ] = "±êÌâÎÄ";
+ Text[ russian ] = "Òåêñòû çàãîëîâêîâ";
+ Text[ polish ] = "Teksty tytu³owe";
+ Text[ japanese ] = "À²ÄÙ";
+ Text[ chinese_traditional ] = "¼ÐÃD¤å¦r";
+ Text[ arabic ] = "äÕæÕ ÇáÚäæÇä";
+ Text[ dutch ] = "Titelteksten";
+ Text[ chinese_simplified ] = "±êÌâÎÄ";
+ Text[ greek ] = "Êåßìåíá ôßôëïõ";
+ Text[ korean ] = "Á¦¸ñ ÅؽºÆ®";
+ Text[ turkish ] = "Baþlýk metinleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulOUTLINETEXT
+{
+ Text = "Gliederungstext" ;
+ Text [ ENGLISH ] = "outline" ;
+ Text [ norwegian ] = "Outline" ;
+ Text [ italian ] = "Testo struttura" ;
+ Text [ portuguese_brazilian ] = "Esboço" ;
+ Text [ portuguese ] = "Texto do esquema" ;
+ Text [ finnish ] = "Jäsennys" ;
+ Text [ danish ] = "Dispositionstekst" ;
+ Text [ french ] = "Texte de plan" ;
+ Text [ swedish ] = "Dispositionstext" ;
+ Text [ dutch ] = "Overzichtstekst" ;
+ Text [ spanish ] = "Texto del esquema" ;
+ Text [ english_us ] = "Outline Text" ;
+ Text[ chinese_simplified ] = "´ó¸ÙÎÄ";
+ Text[ russian ] = "Òåêñò ñòðóêòóðû";
+ Text[ polish ] = "Tekst konspektu";
+ Text[ japanese ] = "Œ©o‚µ";
+ Text[ chinese_traditional ] = "¤jºõ¤å¦r";
+ Text[ arabic ] = "äÕ ÇáÊÞÓíã";
+ Text[ dutch ] = "Overzichtstekst";
+ Text[ chinese_simplified ] = "´ó¸ÙÎÄ";
+ Text[ greek ] = "Êåßìåíï äéÜñèñùóçò";
+ Text[ korean ] = "°³¿ä ÅؽºÆ®";
+ Text[ turkish ] = "Anahat metni";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralOUTLINETEXT
+{
+ Text = "Gliederungstexte" ;
+ Text [ ENGLISH ] = "outlines" ;
+ Text [ norwegian ] = "Omriss" ;
+ Text [ italian ] = "Testi struttura" ;
+ Text [ portuguese_brazilian ] = "Vazados" ;
+ Text [ portuguese ] = "Textos do esquema" ;
+ Text [ finnish ] = "Jäsennykset" ;
+ Text [ danish ] = "Dispositionstekster" ;
+ Text [ french ] = "Textes de plan" ;
+ Text [ swedish ] = "Dispositionstexter" ;
+ Text [ dutch ] = "Overzichtteksten" ;
+ Text [ spanish ] = "Textos del esquema" ;
+ Text [ english_us ] = "Outline Texts" ;
+ Text[ chinese_simplified ] = "´ó¸ÙÎÄ×Ö";
+ Text[ russian ] = "Òåêñòû ñòðóêòóðû";
+ Text[ polish ] = "Teksty konspektu";
+ Text[ japanese ] = "Œ©o‚µ";
+ Text[ chinese_traditional ] = "¤jºõ¤å¦r";
+ Text[ arabic ] = "äÕæÕ ÇáÊÞÓíã";
+ Text[ dutch ] = "Overzichtteksten";
+ Text[ chinese_simplified ] = "´ó¸ÙÎÄ×Ö";
+ Text[ greek ] = "Êåßìåíá äéÜñèñùóçò";
+ Text[ korean ] = "°³¿ä ÅؽºÆ®";
+ Text[ turkish ] = "Anahat metinleri";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulGRAF
+{
+ Text = "Grafik" ;
+ Text [ ENGLISH ] = "graphic" ;
+ Text [ norwegian ] = "Graphic" ;
+ Text [ italian ] = "Grafico" ;
+ Text [ portuguese_brazilian ] = "Gráfico" ;
+ Text [ portuguese ] = "Imagem" ;
+ Text [ finnish ] = "Kuva" ;
+ Text [ danish ] = "Grafik" ;
+ Text [ french ] = "Image" ;
+ Text [ swedish ] = "Grafik" ;
+ Text [ dutch ] = "Afbeelding" ;
+ Text [ spanish ] = "Imagen" ;
+ Text [ english_us ] = "graphic" ;
+ Text[ chinese_simplified ] = "ͼÐÎ";
+ Text[ russian ] = "Ãðàôèêà";
+ Text[ polish ] = "Grafika";
+ Text[ japanese ] = "¸Þ×̨¯¸";
+ Text[ chinese_traditional ] = "¹Ï§Î";
+ Text[ arabic ] = "ÑÓãÉ";
+ Text[ language_user1 ] = "Check in the program to see if small letter correct, this is a STRING: TSM 08.09.99";
+ Text[ dutch ] = "Afbeelding";
+ Text[ chinese_simplified ] = "ͼÐÎ";
+ Text[ greek ] = "Ãñáöéêü";
+ Text[ korean ] = "±×·¡ÇÈ";
+ Text[ turkish ] = "Grafik";
+};
+String STR_ObjNamePluralGRAF
+{
+ Text = "Grafiken" ;
+ Text [ ENGLISH ] = "graphics" ;
+ Text [ norwegian ] = "Grafikker" ;
+ Text [ italian ] = "Immagini" ;
+ Text [ portuguese_brazilian ] = "Gráficos" ;
+ Text [ portuguese ] = "Imagens" ;
+ Text [ finnish ] = "Kuvat" ;
+ Text [ danish ] = "Grafik" ;
+ Text [ french ] = "Images" ;
+ Text [ swedish ] = "Grafiker" ;
+ Text [ dutch ] = "Afbeeldingen" ;
+ Text [ spanish ] = "Imágenes" ;
+ Text [ english_us ] = "graphics" ;
+ Text[ chinese_simplified ] = "ͼÐÎ";
+ Text[ russian ] = "Ãðàôèêè";
+ Text[ polish ] = "Grafiki";
+ Text[ japanese ] = "¸Þ×̨¯¸";
+ Text[ chinese_traditional ] = "¹Ï§Î";
+ Text[ arabic ] = "ÕæÑ";
+ Text[ language_user1 ] = "check in the program and see if small letter correct, this is a STRING entry: TSM 08.09.99";
+ Text[ dutch ] = "Afbeeldingen";
+ Text[ chinese_simplified ] = "ͼÐÎ";
+ Text[ greek ] = "ÃñáöéêÜ";
+ Text[ korean ] = "±×·¡ÇÈ";
+ Text[ turkish ] = "Grafik";
+};
+String STR_ObjNameSingulGRAFLNK
+{
+ Text = "verknüpfte Grafik" ;
+ Text [ ENGLISH ] = "linked graphic" ;
+ Text [ portuguese ] = "Imagem ligada" ;
+ Text [ english_us ] = "Linked graphic" ;
+ Text [ portuguese_brazilian ] = "verknüpfte Grafik" ;
+ Text [ swedish ] = "länkad grafik" ;
+ Text [ danish ] = "Kædet grafik" ;
+ Text [ italian ] = "Grafico collegato" ;
+ Text [ spanish ] = "Imagen vinculada" ;
+ Text [ french ] = "Image liée" ;
+ Text [ dutch ] = "Gekoppelde afbeelding" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄͼÐÎ";
+ Text[ russian ] = "ñâÿçàííàÿ ãðàôèêà";
+ Text[ polish ] = "Po³¹czona grafika";
+ Text[ japanese ] = "Øݸ‚³‚ꂽ¸Þ×̨¯¸";
+ Text[ chinese_traditional ] = "³sµ²ªºÂI°}¹Ï";
+ Text[ arabic ] = "ÑÓãÉ ãÑÊÈØÉ";
+ Text[ dutch ] = "Gekoppelde afbeelding";
+ Text[ chinese_simplified ] = "Á´½ÓµÄͼÐÎ";
+ Text[ greek ] = "ÓõíäåäåìÝíï ãñáöéêü";
+ Text[ korean ] = "¿¬°áµÈ ±×·¡ÇÈ";
+ Text[ turkish ] = "Baðlantýlý grafik";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRAFLNK
+{
+ Text = "verknüpfte Grafiken" ;
+ Text [ ENGLISH ] = "linked graphics" ;
+ Text [ portuguese ] = "Imagens ligadas" ;
+ Text [ english_us ] = "Linked graphics" ;
+ Text [ portuguese_brazilian ] = "verknüpfte Grafiken" ;
+ Text [ swedish ] = "länkade grafiker" ;
+ Text [ danish ] = "Kædet grafik" ;
+ Text [ italian ] = "Grafici collegati" ;
+ Text [ spanish ] = "Imágenes vinculadas" ;
+ Text [ french ] = "Images liées" ;
+ Text [ dutch ] = "Gekoppelde afbeeldingen" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄͼÐÎ";
+ Text[ russian ] = "Ñâÿçàííûå ãðàôèêè";
+ Text[ polish ] = "Po³¹czone grafiki";
+ Text[ japanese ] = "Øݸ‚³‚ꂽ¸Þ×̨¯¸½";
+ Text[ chinese_traditional ] = "³sµ²ªº¹Ï§Î";
+ Text[ arabic ] = "ÑÓæãÇÊ ãÑÊÈØÉ";
+ Text[ dutch ] = "Gekoppelde afbeeldingen";
+ Text[ chinese_simplified ] = "Á´½ÓµÄͼÐÎ";
+ Text[ greek ] = "ÓõíäåäåìÝíá ãñáöéêÜ";
+ Text[ korean ] = "¿¬°áµÈ ±×·¡ÇÈ";
+ Text[ turkish ] = "Baðlantýlý grafikler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulGRAFNONE
+{
+ Text = "leeres Grafikobjekt" ;
+ Text [ ENGLISH ] = "empty graphicobject" ;
+ Text [ norwegian ] = "Tomt grafikkobjekt" ;
+ Text [ italian ] = "Oggetto grafico vuoto" ;
+ Text [ portuguese_brazilian ] = "Objeto gráfico vazio" ;
+ Text [ portuguese ] = "Objecto gráfico vazio" ;
+ Text [ finnish ] = "Tyhjä grafiikkaobjekti" ;
+ Text [ danish ] = "Tomt grafikobjekt" ;
+ Text [ french ] = "Objet graphique vide" ;
+ Text [ swedish ] = "tomma grafikobjekt" ;
+ Text [ dutch ] = "Leeg grafisch object" ;
+ Text [ spanish ] = "Objeto gráfico vacío" ;
+ Text [ english_us ] = "Blank graphic object" ;
+ Text[ chinese_simplified ] = "¿ÕµÄͼÐζÔÏó";
+ Text[ russian ] = "ïóñòîé ãðàôè÷åñêèé îáúåêò";
+ Text[ polish ] = "Pusty obiekt graficzny";
+ Text[ japanese ] = "‹ó‚Ì}Œ`•`‰æµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ªÅªº¹Ï§Îª«¥ó";
+ Text[ arabic ] = "ßÇÆä ÕæÑÉ ÝÇÑÛ";
+ Text[ dutch ] = "Leeg grafisch object";
+ Text[ chinese_simplified ] = "¿ÕµÄͼÐζÔÏó";
+ Text[ greek ] = "Êåíü ãñáöéêü áíôéêåßìåíï";
+ Text[ korean ] = "ºñ¾î ÀÖ´Â ±×·¡ÇÈ °³Ã¼";
+ Text[ turkish ] = "Boþ grafik nesnesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRAFNONE
+{
+ Text = "leere Grafikobjekte" ;
+ Text [ ENGLISH ] = "empty graphicobjects" ;
+ Text [ norwegian ] = "Tomme grafikkobjekter" ;
+ Text [ italian ] = "Oggetti grafici vuoti" ;
+ Text [ portuguese_brazilian ] = "Objetos gráficos vazios" ;
+ Text [ portuguese ] = "Objectos gráficos vazios" ;
+ Text [ finnish ] = "Tyhjät grafiikkaobjektit" ;
+ Text [ danish ] = "Tomme grafikobjekter" ;
+ Text [ french ] = "Objets graphiques vides" ;
+ Text [ swedish ] = "tomma grafikobjekt" ;
+ Text [ dutch ] = "Lege grafische objecten" ;
+ Text [ spanish ] = "Objetos gráficos vacíos" ;
+ Text [ english_us ] = "Blank graphic objects" ;
+ Text[ chinese_simplified ] = "¿Õ°×µÄͼÐζÔÏó";
+ Text[ russian ] = "ïóñòûå ãðàôè÷åñêèå îáúåêòû";
+ Text[ polish ] = "puste obiekty graficzne";
+ Text[ japanese ] = "‹ó‚Ì}Œ`•`‰æµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ªÅ¥Õªº¹Ï§Îª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ÑÓã ÝÇÑÛÉ";
+ Text[ dutch ] = "Lege grafische objecten";
+ Text[ chinese_simplified ] = "¿Õ°×µÄͼÐζÔÏó";
+ Text[ greek ] = "ÊåíÜ ãñáöéêÜ áíôéêåßìåíá";
+ Text[ korean ] = "ºñ¾î ÀÖ´Â ±×·¡ÇÈ °³Ã¼";
+ Text[ turkish ] = "Boþ grafik nesneleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulGRAFNONELNK
+{
+ Text = "leeres verknüpftes Grafikobjekt" ;
+ Text [ ENGLISH ] = "empty linked graphic" ;
+ Text [ portuguese ] = "Objecto gráfico vazio ligado" ;
+ Text [ english_us ] = "Blank linked graphic" ;
+ Text [ portuguese_brazilian ] = "leeres verknüpftes Grafikobjekt" ;
+ Text [ swedish ] = "tomt länkat grafikobjekt" ;
+ Text [ danish ] = "Tomt kædet grafikobjekt" ;
+ Text [ italian ] = "Oggetto grafico vuoto collegato" ;
+ Text [ spanish ] = "Objeto gráfico enlazado vacío" ;
+ Text [ french ] = "Objet graphique lié vide" ;
+ Text [ dutch ] = "Leeg gekoppeld grafisch object" ;
+ Text[ chinese_simplified ] = "¿ÕµÄÁ´½ÓͼÐζÔÏó";
+ Text[ russian ] = "ïóñòîé ñâÿçàííûé ãðàôè÷åñêèé îáúåêò";
+ Text[ polish ] = "Pusty po³¹czony obiekt graficzny";
+ Text[ japanese ] = "‹ó‚ÌØݸ‚³‚ꂽ}Œ`•`‰æµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ªÅªº³sµ²¹Ï§Îª«¥ó";
+ Text[ arabic ] = "ßÇÆä ÕæÑÉ ÝÇÑÛ ãÑÊÈØ";
+ Text[ dutch ] = "Leeg gekoppeld grafisch object";
+ Text[ chinese_simplified ] = "¿ÕµÄÁ´½ÓͼÐζÔÏó";
+ Text[ greek ] = "êåíü óõíäåäåìÝíï áíôéêåßìåíï ãñáöéêïý";
+ Text[ korean ] = "ºñ¾î ÀÖ´Â ¿¬°á ±×·¡ÇÈ";
+ Text[ turkish ] = "Boþ baðlantýlý grafik nesnesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRAFNONELNK
+{
+ Text = "leere verknüpfte Grafikobjekte" ;
+ Text [ ENGLISH ] = "empty linked graphics" ;
+ Text [ portuguese ] = "Objectos gráficos vazios ligados" ;
+ Text [ english_us ] = "Blank linked graphics" ;
+ Text [ portuguese_brazilian ] = "leere verknüpfte Grafikobjekte" ;
+ Text [ swedish ] = "tomma länkade grafikobjekt" ;
+ Text [ danish ] = "Tomme kædede grafikobjekter" ;
+ Text [ italian ] = "Oggetti grafici vuoti collegati" ;
+ Text [ spanish ] = "Objetos gráficos vinculados vacíos" ;
+ Text [ french ] = "Objets graphiques liés vides" ;
+ Text [ dutch ] = "Lege gekoppelde grafische objecten" ;
+ Text[ chinese_simplified ] = "¿Õ°×µÄÁ´½ÓͼÐζÔÏó";
+ Text[ russian ] = "ïóñòûå ñâÿçàííûå ãðàôè÷åñêèå îáúåêòû";
+ Text[ polish ] = "Puste po³¹czone obiekty graficzne";
+ Text[ japanese ] = "‹ó‚ÌØݸ‚µ‚½}Œ`•`‰æµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ªÅ¥Õªº³sµ²¹Ï§Îª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ÑÓã ÝÇÑÛÉ ãÑÊÈØÉ";
+ Text[ dutch ] = "Lege gekoppelde grafische objecten";
+ Text[ chinese_simplified ] = "¿Õ°×µÄÁ´½ÓͼÐζÔÏó";
+ Text[ greek ] = "êåíÜ óõíäåäåìÝíá áíôéêåßìåíá ãñáöéêþí";
+ Text[ korean ] = "ºñ¾î ÀÖ´Â ¿¬°á ±×·¡ÇÈ °³Ã¼";
+ Text[ turkish ] = "Boþ baðlantýlý grafik nesneleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulGRAFMTF
+{
+ Text = "Metafile" ;
+ Text [ ENGLISH ] = "metafile" ;
+ Text [ norwegian ] = "Metafil" ;
+ Text [ italian ] = "Metafile" ;
+ Text [ portuguese_brazilian ] = "Metaarquivo" ;
+ Text [ portuguese ] = "Metaficheiro" ;
+ Text [ finnish ] = "Metatiedosto" ;
+ Text [ danish ] = "Metafil" ;
+ Text [ french ] = "Métafichier" ;
+ Text [ swedish ] = "Metafil" ;
+ Text [ dutch ] = "Metabestand" ;
+ Text [ spanish ] = "Metaarchivo" ;
+ Text [ english_us ] = "Metafile" ;
+ Text[ chinese_simplified ] = "ÔªÎļþ";
+ Text[ russian ] = "Ìåòàôàéë";
+ Text[ polish ] = "Metapliki";
+ Text[ japanese ] = "ÒÀ̧²Ù";
+ Text[ chinese_traditional ] = "¤¸ÀÉ®×";
+ Text[ arabic ] = "ãáÝ Úáæí";
+ Text[ dutch ] = "Metabestand";
+ Text[ chinese_simplified ] = "ÔªÎļþ";
+ Text[ greek ] = "Metafile";
+ Text[ korean ] = "¸ÞŸÆÄÀÏ";
+ Text[ turkish ] = "Metafile";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRAFMTF
+{
+ Text = "Metafiles" ;
+ Text [ ENGLISH ] = "metafiles" ;
+ Text [ norwegian ] = "Metafiler" ;
+ Text [ italian ] = "Metafile" ;
+ Text [ portuguese_brazilian ] = "Metaarquivos" ;
+ Text [ portuguese ] = "Metaficheiros" ;
+ Text [ finnish ] = "Metatiedostot" ;
+ Text [ danish ] = "Metafiler" ;
+ Text [ french ] = "Métafichiers" ;
+ Text [ swedish ] = "Metafiler" ;
+ Text [ dutch ] = "Metabestanden" ;
+ Text [ spanish ] = "Metaarchivos" ;
+ Text [ english_us ] = "Metafiles" ;
+ Text[ chinese_simplified ] = "ÔªÎļþ";
+ Text[ russian ] = "Ìåòàôàéëû";
+ Text[ polish ] = "Metapliki";
+ Text[ japanese ] = "ÒÀ̧²Ù";
+ Text[ chinese_traditional ] = "¤¸ÀÉ®×";
+ Text[ arabic ] = "ÇáãáÝÇÊ ÇáÚáíÇ";
+ Text[ dutch ] = "Metabestanden";
+ Text[ chinese_simplified ] = "ÔªÎļþ";
+ Text[ greek ] = "Metafiles";
+ Text[ korean ] = "¸ÞŸ ÆÄÀÏ";
+ Text[ turkish ] = "Meta dosyasý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulGRAFMTFLNK
+{
+ Text = "verknüpftes Metafile" ;
+ Text [ ENGLISH ] = "linked metafile" ;
+ Text [ portuguese ] = "Metaficheiro ligado" ;
+ Text [ english_us ] = "Linked Metafile" ;
+ Text [ portuguese_brazilian ] = "verknüpftes Metafile" ;
+ Text [ swedish ] = "länkad metafil" ;
+ Text [ danish ] = "Kædet metafil" ;
+ Text [ italian ] = "Metafile collegato" ;
+ Text [ spanish ] = "Metaarchivo vinculado" ;
+ Text [ french ] = "Métafichier lié" ;
+ Text [ dutch ] = "Gekoppeld Meta-bestand" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄÔªÎļþ";
+ Text[ russian ] = "ìåòàôàéë ñ ññûëêîé";
+ Text[ polish ] = "Po³¹czone metapliki";
+ Text[ japanese ] = "Øݸ‚³‚ꂽÒÀ̧²Ù";
+ Text[ chinese_traditional ] = "³sµ²ªº¤¸ÀÉ®×";
+ Text[ arabic ] = "ãáÝ Úáæí ãÑÊÈØ";
+ Text[ dutch ] = "Gekoppeld Meta-bestand";
+ Text[ chinese_simplified ] = "Á´½ÓµÄÔªÎļþ";
+ Text[ greek ] = "ÓõíäåäåìÝíï Metafile";
+ Text[ korean ] = "¿¬°áµÈ ¸ÞŸÆÄÀÏ";
+ Text[ turkish ] = "Baðlantýlý Metafile";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRAFMTFLNK
+{
+ Text = "verknüpfte Metafiles" ;
+ Text [ ENGLISH ] = "linked metafiles" ;
+ Text [ portuguese ] = "Metaficheiros ligados" ;
+ Text [ english_us ] = "Linked Metafiles" ;
+ Text [ portuguese_brazilian ] = "verknüpfte Metafiles" ;
+ Text [ swedish ] = "länkade metafiler" ;
+ Text [ danish ] = "Kædede metafiler" ;
+ Text [ italian ] = "Metafile collegati" ;
+ Text [ spanish ] = "Metaarchivos vinculados" ;
+ Text [ french ] = "Métafichiers liés" ;
+ Text [ dutch ] = "Gekoppelde Meta-bestanden" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄÔªÎļþ";
+ Text[ russian ] = "Ìåòàôàéëû ñ ññûëêàìè";
+ Text[ polish ] = "Po³¹czone metapliki";
+ Text[ japanese ] = "Øݸ‚³‚ꂽÒÀ̧²Ù";
+ Text[ chinese_traditional ] = "³sµ²ªº¤¸ÀÉ®×";
+ Text[ arabic ] = "ãáÝÇÊ ÚáæíÉ ãÑÊÈØÉ";
+ Text[ dutch ] = "Gekoppelde Meta-bestanden";
+ Text[ chinese_simplified ] = "Á´½ÓµÄÔªÎļþ";
+ Text[ greek ] = "ÓõíäåäåìÝíá Metafile";
+ Text[ korean ] = "¿¬°áµÈ ¸ÞŸ ÆÄÀÏ";
+ Text[ turkish ] = "Baðlantýlý meta dosyalarý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulGRAFBMP
+{
+ Text = "Bitmap" ;
+ Text [ ENGLISH ] = "bitmap" ;
+ Text [ norwegian ] = "Bitmap" ;
+ Text [ italian ] = "Bitmap" ;
+ Text [ portuguese_brazilian ] = "Bitmap" ;
+ Text [ portuguese ] = "Bitmap" ;
+ Text [ finnish ] = "Bittikartta" ;
+ Text [ danish ] = "Bitmap" ;
+ Text [ french ] = "Bitmap" ;
+ Text [ swedish ] = "Bitmap" ;
+ Text [ dutch ] = "Bitmap" ;
+ Text [ spanish ] = "Bitmap" ;
+ Text [ english_us ] = "Bitmap" ;
+ Text[ chinese_simplified ] = "λͼ";
+ Text[ russian ] = "Bitmap";
+ Text[ polish ] = "Mapa bitowa";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï";
+ Text[ arabic ] = "ÕæÑÉ äÞØíÉ";
+ Text[ dutch ] = "Bitmap";
+ Text[ chinese_simplified ] = "λͼ";
+ Text[ greek ] = "Bitmap";
+ Text[ korean ] = "ºñÆ®¸Ê";
+ Text[ turkish ] = "Bit eþlem";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRAFBMP
+{
+ Text = "Bitmaps" ;
+ Text [ ENGLISH ] = "bitmaps" ;
+ Text [ norwegian ] = "Punktmatriser" ;
+ Text [ italian ] = "Bitmap" ;
+ Text [ portuguese_brazilian ] = "Bitmaps" ;
+ Text [ portuguese ] = "Bitmaps" ;
+ Text [ finnish ] = "Bittikartat" ;
+ Text [ danish ] = "Bitmaps" ;
+ Text [ french ] = "Bitmaps" ;
+ Text [ swedish ] = "Bitmaps" ;
+ Text [ dutch ] = "Bitmaps" ;
+ Text [ spanish ] = "Bitmaps" ;
+ Text [ english_us ] = "Bitmaps" ;
+ Text[ chinese_simplified ] = "λͼ";
+ Text[ russian ] = "Êàðòèíêè â ôîðìàòå Bitmap";
+ Text[ polish ] = "Mapy bitowe";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï";
+ Text[ arabic ] = "ÕæÑ äÞØíÉ";
+ Text[ dutch ] = "Bitmaps";
+ Text[ chinese_simplified ] = "λͼ";
+ Text[ greek ] = "Bitmaps";
+ Text[ korean ] = "ºñÆ®¸Ê";
+ Text[ turkish ] = "Bit eþlem";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulGRAFBMPLNK
+{
+ Text = "verknüpfte Bitmap" ;
+ Text [ ENGLISH ] = "linked bitmap" ;
+ Text [ portuguese ] = "Bitmap ligado" ;
+ Text [ english_us ] = "Linked Bitmap" ;
+ Text [ portuguese_brazilian ] = "verknüpfte Bitmap" ;
+ Text [ swedish ] = "länkad bitmap" ;
+ Text [ danish ] = "Kædet bitmap" ;
+ Text [ italian ] = "Bitmap collegato" ;
+ Text [ spanish ] = "Bitmap vinculado" ;
+ Text [ french ] = "Bitmap lié" ;
+ Text [ dutch ] = "Gekoppelde Bitmap" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄλͼ";
+ Text[ russian ] = "Ñâÿçàííûé òî÷å÷íûé ðèñóíîê";
+ Text[ polish ] = "Po³¹czona mapa bitowa";
+ Text[ japanese ] = "Øݸ‚³‚ꂽËÞ¯ÄϯÌß";
+ Text[ chinese_traditional ] = "³sµ²ªºÂI°}¹Ï";
+ Text[ arabic ] = "ÕæÑÉ äÞØíÉ ãÑÊÈØÉ";
+ Text[ dutch ] = "Gekoppelde Bitmap";
+ Text[ chinese_simplified ] = "Á´½ÓµÄλͼ";
+ Text[ greek ] = "ÓõíäåäåìÝíï Bitmap";
+ Text[ korean ] = "¿¬°áµÈ ºñÆ®¸Ê";
+ Text[ turkish ] = "Baðlantýlý bit eþlem";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRAFBMPLNK
+{
+ Text = "verknüpfte Bitmaps" ;
+ Text [ ENGLISH ] = "linked bitmaps" ;
+ Text [ portuguese ] = "Bitmaps ligados" ;
+ Text [ english_us ] = "Linked bitmaps" ;
+ Text [ portuguese_brazilian ] = "verknüpfte Bitmaps" ;
+ Text [ swedish ] = "länkade bitmappar" ;
+ Text [ danish ] = "Kædede bitmaps" ;
+ Text [ italian ] = "Bitmap collegati" ;
+ Text [ spanish ] = "Bitmaps vinculados" ;
+ Text [ french ] = "Bitmaps liés" ;
+ Text [ dutch ] = "Gekoppelde Bitmaps" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄλͼ";
+ Text[ russian ] = "Ñâÿçàííûå êàðòèíêè Bitmap";
+ Text[ polish ] = "Po³¹czone mapy bitowe";
+ Text[ japanese ] = "Øݸ‚³‚ꂽËÞ¯ÄϯÌß";
+ Text[ chinese_traditional ] = "³sµ²ªºÂI°}¹Ï";
+ Text[ arabic ] = "ÕæÑ äÞØíÉ ãÑÊÈØÉ";
+ Text[ dutch ] = "Gekoppelde Bitmaps";
+ Text[ chinese_simplified ] = "Á´½ÓµÄλͼ";
+ Text[ greek ] = "ÓõíäåäåìÝíá bitmaps";
+ Text[ korean ] = "¿¬°áµÈ ºñÆ®¸Ê";
+ Text[ turkish ] = "Baðlantýlý bit eþlemler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulGRAFMAC
+{
+ Text = "Mac-Grafik" ;
+ Text [ ENGLISH ] = "mac-graphic" ;
+ Text [ norwegian ] = "Mac-Grafikk" ;
+ Text [ italian ] = "Immagine Mac" ;
+ Text [ portuguese_brazilian ] = "Mac-Gráfico" ;
+ Text [ portuguese ] = "Gráfico Mac" ;
+ Text [ finnish ] = "Mac-kuva" ;
+ Text [ danish ] = "Mac-grafik" ;
+ Text [ french ] = "Image Mac" ;
+ Text [ swedish ] = "Mac-grafik" ;
+ Text [ dutch ] = "Mac-afbeelding" ;
+ Text [ spanish ] = "Imagen Mac" ;
+ Text [ english_us ] = "Mac graphic" ;
+ Text[ chinese_simplified ] = "Mac-ͼÐÎ";
+ Text[ russian ] = "Ãðàôèêà Mac";
+ Text[ polish ] = "Grafika Mac";
+ Text[ japanese ] = "Mac ¸Þ×̨¯¸";
+ Text[ chinese_traditional ] = "Mac-¹Ï§Î";
+ Text[ arabic ] = "ÑÓãÉ Mac";
+ Text[ dutch ] = "Mac-afbeelding";
+ Text[ chinese_simplified ] = "Mac-ͼÐÎ";
+ Text[ greek ] = "Ãñáöéêü Mac";
+ Text[ korean ] = "Mac ±×·¡ÇÈ";
+ Text[ turkish ] = "Mac grafiði";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRAFMAC
+{
+ Text = "Mac-Grafiken" ;
+ Text [ ENGLISH ] = "mac-graphics" ;
+ Text [ norwegian ] = "Mac-Grafikker" ;
+ Text [ italian ] = "Immagini Mac" ;
+ Text [ portuguese_brazilian ] = "Mac-Gráficos" ;
+ Text [ portuguese ] = "Imagens Mac" ;
+ Text [ finnish ] = "Mac-kuvat" ;
+ Text [ danish ] = "Mac-grafik" ;
+ Text [ french ] = "Images Mac" ;
+ Text [ swedish ] = "Mac-grafiker" ;
+ Text [ dutch ] = "Mac-afbeeldingen" ;
+ Text [ spanish ] = "Imágenes Mac" ;
+ Text [ english_us ] = "Mac graphics" ;
+ Text[ chinese_simplified ] = "Mac-ͼÐÎ";
+ Text[ russian ] = "Ãðàôèêè Mac";
+ Text[ polish ] = "Grafiki Mac";
+ Text[ japanese ] = "Mac¸Þ×̨¯¸";
+ Text[ chinese_traditional ] = "Mac-¹Ï§Î";
+ Text[ arabic ] = "ÑÓæãÇÊ Mac";
+ Text[ dutch ] = "Mac-afbeeldingen";
+ Text[ chinese_simplified ] = "Mac-ͼÐÎ";
+ Text[ greek ] = "Ãñáöéêü Mac";
+ Text[ korean ] = "Mac ±×·¡ÇÈ";
+ Text[ turkish ] = "Mac grafikleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulGRAFMACLNK
+{
+ Text = "verknüpfte Mac-Grafiken" ;
+ Text [ ENGLISH ] = "linked mac-graphic" ;
+ Text [ portuguese ] = "Imagens Mac ligadas" ;
+ Text [ english_us ] = "Linked Mac graphic" ;
+ Text [ portuguese_brazilian ] = "verknüpfte Mac-Grafiken" ;
+ Text [ swedish ] = "länkade Mac-Grafiker" ;
+ Text [ danish ] = "Kædet Mac-grafik" ;
+ Text [ italian ] = "Grafici Mac collegati" ;
+ Text [ spanish ] = "Imágenes Mac vinculadas" ;
+ Text [ french ] = "Images Mac liées" ;
+ Text [ dutch ] = "Gekoppelde Mac-afbeeldingen" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄ Mac-ͼÐÎ";
+ Text[ russian ] = "ñâÿçàííàÿ ãðàôèêà Mac";
+ Text[ polish ] = "Po³¹czona grafika Mac";
+ Text[ japanese ] = "Øݸ‚³‚ꂽMac¸Þ×̨¯¸";
+ Text[ chinese_traditional ] = "³sµ²ªº Mac-¹Ï§Î";
+ Text[ arabic ] = "ÑÓãÉ Mac ãÑÊÈØÉ";
+ Text[ dutch ] = "Gekoppelde Mac-afbeeldingen";
+ Text[ chinese_simplified ] = "Á´½ÓµÄ Mac-ͼÐÎ";
+ Text[ greek ] = "ÓõíäåäåìÝíá ãñáöéêÜ Mac";
+ Text[ korean ] = "¿¬°áµÈ Mac ±×·¡ÇÈ";
+ Text[ turkish ] = "Baðlantýlý Mac grafikleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralGRAFMACLNK
+{
+ Text = "verknüpfte Mac-Grafik" ;
+ Text [ ENGLISH ] = "linked mac-graphics" ;
+ Text [ portuguese ] = "Gráfico Mac ligado" ;
+ Text [ english_us ] = "Linked Mac graphics" ;
+ Text [ portuguese_brazilian ] = "verknüpfte Mac-Grafik" ;
+ Text [ swedish ] = "länkad Mac-Grafik" ;
+ Text [ danish ] = "Kædet Mac-grafik" ;
+ Text [ italian ] = "Grafico Mac collegato" ;
+ Text [ spanish ] = "Imagen Mac vinculada" ;
+ Text [ french ] = "Image Mac liée" ;
+ Text [ dutch ] = "Gekoppelde Mac-afbeelding" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄ Mac-ͼÐÎ";
+ Text[ russian ] = "Ñâÿçàííûå ãðàôèêè Mac";
+ Text[ polish ] = "Po³¹czone grafiki Mac";
+ Text[ japanese ] = "Øݸ‚³‚ꂽMac‚̸Þ×̨¯¸";
+ Text[ chinese_traditional ] = "³sµ²ªº Mac ¹Ï§Î";
+ Text[ arabic ] = "ÑÓæãÇÊ Mac ãÑÊÈØÉ";
+ Text[ dutch ] = "Gekoppelde Mac-afbeelding";
+ Text[ chinese_simplified ] = "Á´½ÓµÄ Mac-ͼÐÎ";
+ Text[ greek ] = "ÓõíäåäåìÝíï ãñáöéêü Mac";
+ Text[ korean ] = "¿¬°áµÈ Mac ±×·¡ÇÈ";
+ Text[ turkish ] = "Baðlantýlý Mac grafikleri";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulOLE2
+{
+ Text = "eingebettetes Objekt (OLE)" ;
+ Text [ ENGLISH ] = "embedded object (OLE)" ;
+ Text [ norwegian ] = "Innbakt objekt (OLE)" ;
+ Text [ italian ] = "Oggetto incorporato (OLE)" ;
+ Text [ portuguese_brazilian ] = "Objeto embutido (OLE)" ;
+ Text [ portuguese ] = "Objecto incorporado (OLE)" ;
+ Text [ finnish ] = "Upotettu objekti (OLE)" ;
+ Text [ danish ] = "Integreret objekt (OLE)" ;
+ Text [ french ] = "Objet incorporé (OLE)" ;
+ Text [ swedish ] = "inbäddat objekt (OLE)" ;
+ Text [ dutch ] = "Ingesloten object (OLE)" ;
+ Text [ spanish ] = "Objeto incrustado (OLE)" ;
+ Text [ english_us ] = "embedded object (OLE)" ;
+ Text[ chinese_simplified ] = "ǶÈëµÄ¶ÔÏó(OLE)";
+ Text[ russian ] = "âñòðîåííûé îáúåêò (OLE)";
+ Text[ polish ] = "osadzony obiekt (OLE)";
+ Text[ japanese ] = "–„‚ßž‚ݵÌÞ¼Þª¸Ä(OLE)";
+ Text[ chinese_traditional ] = "´O¤Jªºª«¥ó(OLE)";
+ Text[ arabic ] = "ßÇÆä ãÏãÌ (OLE)";
+ Text[ dutch ] = "Ingesloten object (OLE)";
+ Text[ chinese_simplified ] = "ǶÈëµÄ¶ÔÏó(OLE)";
+ Text[ greek ] = "ÅíóùìáôùìÝíï áíôéêåßìåíï (OLE)";
+ Text[ korean ] = "Æ÷ÇÔµÈ °³Ã¼(OLE)";
+ Text[ turkish ] = "Gömülü nesne (OLE)";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralOLE2
+{
+ Text = "eingebettete Objekte (OLE)" ;
+ Text [ ENGLISH ] = "embedded objects (OLE)" ;
+ Text [ norwegian ] = "Innbakte objekter (OLE)" ;
+ Text [ italian ] = "Oggetti incorporati (OLE)" ;
+ Text [ portuguese_brazilian ] = "Objetos embutidos (OLE)" ;
+ Text [ portuguese ] = "Objectos incorporados (OLE)" ;
+ Text [ finnish ] = "Upotetut objektit (OLE)" ;
+ Text [ danish ] = "Integrerede objekter (OLE)" ;
+ Text [ french ] = "Objets incorporés (OLE)" ;
+ Text [ swedish ] = "inbäddade objekt (OLE)" ;
+ Text [ dutch ] = "Ingesloten objecten (OLE)" ;
+ Text [ spanish ] = "Objetos incrustados (OLE)" ;
+ Text [ english_us ] = "Embedded objects (OLE)" ;
+ Text[ chinese_simplified ] = "ÄÚǶµÄ¶ÔÏó(OLE)";
+ Text[ russian ] = "âíåäðåííûå îáúåêòû (OLE)";
+ Text[ polish ] = "osadzone obiekty (OLE)";
+ Text[ japanese ] = "–„‚ßž‚ݵÌÞ¼Þª¸Ä(OLE)";
+ Text[ chinese_traditional ] = "¤º´Oªºª«¥ó(OLE)";
+ Text[ arabic ] = "ßÇÆäÇÊ ãÏãÌÉ (OLE)";
+ Text[ dutch ] = "Ingesloten objecten (OLE)";
+ Text[ chinese_simplified ] = "ÄÚǶµÄ¶ÔÏó(OLE)";
+ Text[ greek ] = "åíóùìáôùìÝíá áíôéêåßìåíá (OLE)";
+ Text[ korean ] = "Æ÷ÇÔµÈ °³Ã¼(OLE)";
+ Text[ turkish ] = "gömülü nesne (OLE)";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulUno
+{
+ Text = "Kontrollfeld" ;
+ Text [ ENGLISH ] = "Control field" ;
+ Text[ english_us ] = "Control";
+ Text[ portuguese ] = "Campo de controlo";
+ Text[ russian ] = "Ýëåìåíò óïðàâëåíèÿ";
+ Text[ dutch ] = "Controleveld";
+ Text[ french ] = "Champ de contrôle";
+ Text[ spanish ] = "Campo de control";
+ Text[ italian ] = "Campo di controllo";
+ Text[ danish ] = "Kontrolelement";
+ Text[ swedish ] = "Kontrollfält";
+ Text[ polish ] = "Pole kontrolne";
+ Text[ portuguese_brazilian ] = "Uno-Control Objekt";
+ Text[ japanese ] = "ºÝÄÛ°Ù";
+ Text[ chinese_simplified ] = "¿ØÖÆ×Ö¶Î";
+ Text[ chinese_traditional ] = "±±¨î¶µ";
+ Text[ arabic ] = "ÚäÕÑ ÊÍßã";
+ Text[ dutch ] = "Controleveld";
+ Text[ chinese_simplified ] = "¿ØÖÆ×Ö¶Î";
+ Text[ greek ] = "Ðåäßï åëÝã÷ïõ";
+ Text[ korean ] = "ÄÁÆ®·Ñ Çʵå";
+ Text[ turkish ] = "Komut alaný";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralUno
+{
+ Text = "Kontrollfelder" ;
+ Text [ ENGLISH ] = "Control fields" ;
+ Text[ english_us ] = "Controls";
+ Text[ portuguese ] = "Campos de controlo";
+ Text[ russian ] = "Ýëåìåíòû óïðàâëåíèÿ";
+ Text[ dutch ] = "Controlevelden";
+ Text[ french ] = "Champs de contrôle";
+ Text[ spanish ] = "Campos de control";
+ Text[ italian ] = "Campi di controllo";
+ Text[ danish ] = "Kontrolelementer";
+ Text[ swedish ] = "Kontrollfält";
+ Text[ polish ] = "Pola kontrolne";
+ Text[ portuguese_brazilian ] = "Uno-Control Objekte";
+ Text[ japanese ] = "ºÝÄ۰٠̨°ÙÄÞ";
+ Text[ chinese_simplified ] = "¿ØÖÆ×Ö¶Î";
+ Text[ chinese_traditional ] = "±±¨î¶µ";
+ Text[ arabic ] = "ÚäÇÕÑ ÊÍßã";
+ Text[ dutch ] = "Controlevelden";
+ Text[ chinese_simplified ] = "¿ØÖÆ×Ö¶Î";
+ Text[ greek ] = "Ðåäßá åëÝã÷ïõ";
+ Text[ korean ] = "ÄÁÆ®·Ñ Çʵå";
+ Text[ turkish ] = "Komut alaný";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulOLE2LNK
+{
+ Text = "verknüpftes eingebettetes Objekt (OLE)" ;
+ Text [ ENGLISH ] = "linked embedded object (OLE)" ;
+ Text [ portuguese ] = "Objecto incorporado e ligado (OLE)" ;
+ Text [ english_us ] = "linked embedded object (OLE)" ;
+ Text [ portuguese_brazilian ] = "verknüpftes eingebettetes Objekt (OLE)" ;
+ Text [ swedish ] = "länkat inbäddat objekt (OLE)" ;
+ Text [ danish ] = "Kædet integreret objekt (OLE)" ;
+ Text [ italian ] = "Oggetto collegato e incorporato (OLE)" ;
+ Text [ spanish ] = "Objeto (OLE) incrustado vinculado" ;
+ Text [ french ] = "Objet lié et incorporé (OLE)" ;
+ Text [ dutch ] = "Gekoppeld ingesloten object (OLE)" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄǶÈë¶ÔÏó(OLE)";
+ Text[ russian ] = "ñâÿçàííûé âñòðîåííûé îáúåêò (OLE)";
+ Text[ polish ] = "Po³¹czony osadzony obiekt (OLE)";
+ Text[ japanese ] = "Øݸ‚³‚ꂽ–„‚ßž‚ݵÌÞ¼Þª¸Ä(OLE)";
+ Text[ chinese_traditional ] = "³sµ²´O¤Jªºª«¥ó(OLE)";
+ Text[ arabic ] = "ÚäÕÑ ãÏãÌ ãÑÊÈØ (OLE)";
+ Text[ dutch ] = "Gekoppeld ingesloten object (OLE)";
+ Text[ chinese_simplified ] = "Á´½ÓµÄǶÈë¶ÔÏó(OLE)";
+ Text[ greek ] = "ÅíóùìáôùìÝíï áíôéêåßìåíï (OLE) ìå óýíäåóç";
+ Text[ korean ] = "¿¬°áµÈ Æ÷ÇÔ °³Ã¼(OLE)";
+ Text[ turkish ] = "Baðlantýlý gömülü nesne (OLE)";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralOLE2LNK
+{
+ Text = "verknüpfte eingebettete Objekte (OLE)" ;
+ Text [ ENGLISH ] = "linked embedded objects (OLE)" ;
+ Text [ portuguese ] = "Objectos incorporados ligados (OLE)" ;
+ Text [ english_us ] = "Linked embedded objects (OLE)" ;
+ Text [ portuguese_brazilian ] = "verknüpfte eingebettete Objekte (OLE)" ;
+ Text [ swedish ] = "länkade inbäddade objekt (OLE)" ;
+ Text [ danish ] = "Kædede integrerede objekter (OLE)" ;
+ Text [ italian ] = "Oggetti collegati e incorporati (OLE)" ;
+ Text [ spanish ] = "Objetos (OLE) incrustados vinculados" ;
+ Text [ french ] = "Objets liés et incorporés (OLE)" ;
+ Text [ dutch ] = "Gekoppelde ingesloten objecten (OLE)" ;
+ Text[ chinese_simplified ] = "Á´½ÓµÄǶÈë¶ÔÏó(OLE)";
+ Text[ russian ] = "ñâÿçàííûå âíåäðåííûå îáúåêòû (OLE)";
+ Text[ polish ] = "Po³¹czone osadzone obiekty (OLE)";
+ Text[ japanese ] = "Øݸ‚³‚ꂽ–„‚ßž‚ݵÌÞ¼Þª¸Ä(OLE)";
+ Text[ chinese_traditional ] = "´O¤Jªºª«¥ó(OLE)";
+ Text[ arabic ] = "ÚäÇÕÑ ãÏãÌÉ ãÑÊÈØÉ (OLE)";
+ Text[ dutch ] = "Gekoppelde ingesloten objecten (OLE)";
+ Text[ chinese_simplified ] = "Á´½ÓµÄǶÈë¶ÔÏó(OLE)";
+ Text[ greek ] = "óõíäåäåìÝíá åíóùìáôùìÝíá áíôéêåßìåíá (OLE)";
+ Text[ korean ] = "¿¬°áµÈ Æ÷ÇÔ °³Ã¼ (OLE)";
+ Text[ turkish ] = "Baðlantýlý, gömülü nesne (OLE)";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjOLE2NamePrefix
+{
+ Text = "Objekt" ;
+ Text [ ENGLISH ] = "Object" ;
+ Text [ portuguese ] = "Objecto" ;
+ Text [ english_us ] = "Object" ;
+ Text [ portuguese_brazilian ] = "Objekt" ;
+ Text [ swedish ] = "Objekt" ;
+ Text [ danish ] = "Objekt" ;
+ Text [ italian ] = "Oggetto" ;
+ Text [ spanish ] = "Objeto" ;
+ Text [ french ] = "Objet" ;
+ Text [ dutch ] = "Object" ;
+ Text[ chinese_simplified ] = "¶ÔÏó";
+ Text[ russian ] = "Îáúåêò";
+ Text[ polish ] = "Obiekt";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ª«¥ó";
+ Text[ arabic ] = "ÇáßÇÆä";
+ Text[ dutch ] = "Object";
+ Text[ chinese_simplified ] = "¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíï";
+ Text[ korean ] = "°³Ã¼";
+ Text[ turkish ] = "Nesne";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulFrame
+{
+ Text = "Frame" ;
+ Text [ ENGLISH ] = "frame" ;
+ Text [ portuguese ] = "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[ chinese_simplified ] = "¿ò¶ÔÏó";
+ Text[ russian ] = "Êàäð";
+ Text[ polish ] = "Frame";
+ Text[ japanese ] = "ÌÚ°Ñ";
+ Text[ chinese_traditional ] = "®Ø";
+ Text[ arabic ] = "Frame";
+ Text[ dutch ] = "Frame";
+ Text[ chinese_simplified ] = "¿ò¶ÔÏó";
+ Text[ greek ] = "Ðëáßóéï";
+ Text[ korean ] = "ÇÁ·¹ÀÓ";
+ Text[ turkish ] = "Frame";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralFrame
+{
+ Text = "Frames" ;
+ Text [ ENGLISH ] = "frames" ;
+ Text [ portuguese ] = "Formas" ;
+ Text [ english_us ] = "Frames" ;
+ Text [ portuguese_brazilian ] = "Frames" ;
+ Text [ swedish ] = "Ramar" ;
+ Text [ danish ] = "Frames" ;
+ Text [ italian ] = "Frame" ;
+ Text [ spanish ] = "Frames" ;
+ Text [ french ] = "Frames" ;
+ Text [ dutch ] = "Frames" ;
+ Text[ chinese_simplified ] = "¿ò¶ÔÏó";
+ Text[ russian ] = "Êàäðû";
+ Text[ polish ] = "Ramki";
+ Text[ japanese ] = "ÌÚ°Ñ";
+ Text[ chinese_traditional ] = "®Ø";
+ Text[ arabic ] = "Frames";
+ Text[ dutch ] = "Frames";
+ Text[ chinese_simplified ] = "¿ò¶ÔÏó";
+ Text[ greek ] = "Ðëáßóéá";
+ Text[ korean ] = "ÇÁ·¹ÀÓ";
+ Text[ turkish ] = "Frame";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjFrameNamePrefix
+{
+ Text = "Frame" ;
+ Text [ ENGLISH ] = "Frame" ;
+ Text [ portuguese ] = "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[ chinese_simplified ] = "¿ò¶ÔÏó";
+ Text[ russian ] = "Êàäð";
+ Text[ polish ] = "Frame";
+ Text[ japanese ] = "ÌÚ°Ñ";
+ Text[ chinese_traditional ] = "®Ø";
+ Text[ arabic ] = "Frame";
+ Text[ dutch ] = "Frame";
+ Text[ chinese_simplified ] = "¿ò¶ÔÏó";
+ Text[ greek ] = "Ðëáßóéï";
+ Text[ korean ] = "ÇÁ·¹ÀÓ";
+ Text[ turkish ] = "Frame";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulEDGE
+{
+ Text = "Objektverbinder" ;
+ Text [ ENGLISH ] = "connector" ;
+ Text [ norwegian ] = "Connector" ;
+ Text [ italian ] = "Connettore di oggetti" ;
+ Text [ portuguese_brazilian ] = "Conector" ;
+ Text [ portuguese ] = "Conectores de objectos" ;
+ Text [ finnish ] = "Yhdistin" ;
+ Text [ danish ] = "Objektforbindelser" ;
+ Text [ french ] = "Connecteurs d'objets" ;
+ Text [ swedish ] = "Objektförbindelse" ;
+ Text [ dutch ] = "Objectverbinding" ;
+ Text [ spanish ] = "Conectores de objetos" ;
+ Text [ english_us ] = "Object Connectors" ;
+ Text[ chinese_simplified ] = "¶ÔÏóÁ¬½Ó·û";
+ Text[ russian ] = "Ñîåäèíèòåëè îáúåêòà";
+ Text[ polish ] = "£¹cznik obiektów";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä ºÈ¸À";
+ Text[ chinese_traditional ] = "ª«¥ó³s±µ²Å";
+ Text[ arabic ] = "ÑæÇÈØ ÇáßÇÆä";
+ Text[ dutch ] = "Objectverbinding";
+ Text[ chinese_simplified ] = "¶ÔÏóÁ¬½Ó·û";
+ Text[ greek ] = "ÓõíäÝóåéò áíôéêåéìÝíùí";
+ Text[ korean ] = "°³Ã¼ ¿¬°á¼±";
+ Text[ turkish ] = "Nesne baðlayýcýsý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralEDGE
+{
+ Text = "Objektverbinder" ;
+ Text [ ENGLISH ] = "connectors" ;
+ Text [ norwegian ] = "Bindepunkter" ;
+ Text [ italian ] = "Connettori di oggetti" ;
+ Text [ portuguese_brazilian ] = "Conectores" ;
+ Text [ portuguese ] = "Conectores de objectos" ;
+ Text [ finnish ] = "Yhdistimet" ;
+ Text [ danish ] = "Objektforbindelser" ;
+ Text [ french ] = "Connecteurs d'objets" ;
+ Text [ swedish ] = "Objektförbindelse" ;
+ Text [ dutch ] = "Objectverbindingen" ;
+ Text [ spanish ] = "Conectores de objetos" ;
+ Text [ english_us ] = "Object Connectors" ;
+ Text[ chinese_simplified ] = "¶ÔÏóÁ¬½Ó·û";
+ Text[ russian ] = "Ñîåäèíèòåëè îáúåêòà";
+ Text[ polish ] = "£¹czniki obiektów";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä ºÈ¸À";
+ Text[ chinese_traditional ] = "ª«¥ó³s±µ²Å";
+ Text[ arabic ] = "ÑæÇÈØ ÇáßÇÆä";
+ Text[ dutch ] = "Objectverbindingen";
+ Text[ chinese_simplified ] = "¶ÔÏóÁ¬½Ó·û";
+ Text[ greek ] = "ÓõíäÝóåéò áíôéêåéìÝíùí";
+ Text[ korean ] = "°³Ã¼ ¿¬°á¼±";
+ Text[ turkish ] = "Nesne baðlayýcýsý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulCAPTION
+{
+ Text = "Legende" ;
+ Text [ ENGLISH ] = "caption" ;
+ Text [ norwegian ] = "Bildetekst" ;
+ Text [ italian ] = "Legenda" ;
+ Text [ portuguese_brazilian ] = "Legenda" ;
+ Text [ portuguese ] = "Legenda" ;
+ Text [ finnish ] = "Selite" ;
+ Text [ danish ] = "Forklaring" ;
+ Text [ french ] = "Légende" ;
+ Text [ swedish ] = "Förklaring" ;
+ Text [ dutch ] = "Legenda" ;
+ Text [ spanish ] = "Leyenda" ;
+ Text [ english_us ] = "Callout" ;
+ Text[ chinese_simplified ] = "ͼÀý";
+ Text[ russian ] = "Ëåãåíäà";
+ Text[ polish ] = "Legenda";
+ Text[ japanese ] = "‚«o‚µ";
+ Text[ chinese_traditional ] = "¹Ï¨Ò";
+ Text[ arabic ] = "ÊÚáíÞ ÊÝÓíÑí";
+ Text[ dutch ] = "Legenda";
+ Text[ chinese_simplified ] = "ͼÀý";
+ Text[ greek ] = "ÅðéãñáöÞ";
+ Text[ korean ] = "¹ü·Ê";
+ Text[ turkish ] = "Belirtme çizgisi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralCAPTION
+{
+ Text = "Legenden" ;
+ Text [ ENGLISH ] = "captions" ;
+ Text [ norwegian ] = "Bildetekster" ;
+ Text [ italian ] = "Legende" ;
+ Text [ portuguese_brazilian ] = "Capturas" ;
+ Text [ portuguese ] = "Legendas" ;
+ Text [ finnish ] = "Selitteet" ;
+ Text [ danish ] = "Forklaringer" ;
+ Text [ french ] = "Légendes" ;
+ Text [ swedish ] = "Förklaringar" ;
+ Text [ dutch ] = "Legenda's" ;
+ Text [ spanish ] = "Leyendas" ;
+ Text [ english_us ] = "Callouts" ;
+ Text[ chinese_simplified ] = "ͼÀý";
+ Text[ russian ] = "Ëåãåíäû";
+ Text[ polish ] = "Legendy";
+ Text[ japanese ] = "‚«o‚µ";
+ Text[ chinese_traditional ] = "¹Ï¨Ò";
+ Text[ arabic ] = "ÊÚáíÞÇÊ ÊÝÓíÑíÉ";
+ Text[ dutch ] = "Legenda's";
+ Text[ chinese_simplified ] = "ͼÀý";
+ Text[ greek ] = "ÅðéãñáöÝò";
+ Text[ korean ] = "¹ü·Ê";
+ Text[ turkish ] = "Belirtme çizgileri";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ObjNameSingulPAGE
+{
+ Text = "Seitendarstellungsobjekt" ;
+ Text [ ENGLISH ] = "preview-object" ;
+ Text [ norwegian ] = "Forhåndsvisnings-objekt" ;
+ Text [ italian ] = "Oggetto anteprima di stampa" ;
+ Text [ portuguese_brazilian ] = "Examinar-objeto" ;
+ Text [ portuguese ] = "Objecto de apresentação de páginas" ;
+ Text [ finnish ] = "Esikatseluobjekti" ;
+ Text [ danish ] = "Sidevisningsobjekt" ;
+ Text [ french ] = "Objet de prévisualisation" ;
+ Text [ swedish ] = "Förhandsgranskningsobjekt" ;
+ Text [ dutch ] = "Afdrukvoorbeeld van object" ;
+ Text [ spanish ] = "Objeto de presentación de página" ;
+ Text [ english_us ] = "Preview object" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ¶ÔÏó";
+ Text[ russian ] = "Ïðåäâàðèòåëüíûé ïðîñìîòð îáúåêòà";
+ Text[ polish ] = "Obiekty prezentacji stron";
+ Text[ japanese ] = "ÌßÚËÞ­° µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "¹wÄýª«¥ó";
+ Text[ arabic ] = "ßÇÆä ÚÑÖ ÇáÕÝÍÇÊ";
+ Text[ dutch ] = "Afdrukvoorbeeld van object";
+ Text[ chinese_simplified ] = "Ô¤ÊÓ¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíï ðáñïõóßáóçò óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö ¸ð¾ç °³Ã¼";
+ Text[ turkish ] = "Önizleme nesnesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralPAGE
+{
+ Text = "Seitendarstellungsobjekte" ;
+ Text [ ENGLISH ] = "preview-objects" ;
+ Text [ norwegian ] = "Forhåndsvisnings-objekter" ;
+ Text [ italian ] = "Oggetti Anteprima di stampa" ;
+ Text [ portuguese_brazilian ] = "Examinar-objetos" ;
+ Text [ portuguese ] = "Objectos de apresentação de páginas" ;
+ Text [ finnish ] = "Esikatseluobjektit" ;
+ Text [ danish ] = "Sidevisningsobjekter" ;
+ Text [ french ] = "Objets de prévisualisation" ;
+ Text [ swedish ] = "Förhandsgranskningsobjekt" ;
+ Text [ dutch ] = "Afdrukvoorbeeld van objecten" ;
+ Text [ spanish ] = "Objetos para presentaciones de páginas" ;
+ Text [ english_us ] = "Preview objects" ;
+ Text[ chinese_simplified ] = "Ô¤ÊÓ¶ÔÏó";
+ Text[ russian ] = "Ïðåäâàðèòåëüíûé ïðîñìîòð îáúåêòîâ";
+ Text[ polish ] = "Obiekty prezentacji stron";
+ Text[ japanese ] = "ÌßÚËÞ­° µÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "¹wÄýª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ÚÑÖ ÇáÕÝÍÇÊ";
+ Text[ dutch ] = "Afdrukvoorbeeld van objecten";
+ Text[ chinese_simplified ] = "Ô¤ÊÓ¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíá ðáñïõóßáóçò óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö ¸ð¾ç °³Ã¼";
+ Text[ turkish ] = "Önizleme nesneleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulMEASURE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Bemaßungsobjekt : Bema˜ungsobjekt */
+ /* ### ACHTUNG: Neuer Text in Resource? Bemaßungsobjekt : Bema˜ungsobjekt */
+ Text = "Bemaßungsobjekt" ;
+ Text [ ENGLISH ] = "measurement-object" ;
+ Text [ portuguese ] = "Objecto dimensional" ;
+ Text [ english_us ] = "Dimension line" ;
+ Text [ portuguese_brazilian ] = "Bemaßungsobjekt" ;
+ Text [ swedish ] = "Dimensioneringsobjekt" ;
+ Text [ danish ] = "Dimensioneringsobjekt" ;
+ Text [ italian ] = "Oggetto di quotatura" ;
+ Text [ spanish ] = "Objeto de dimensionamiento" ;
+ Text [ french ] = "Objet de cotation" ;
+ Text [ dutch ] = "Objectafmetingen" ;
+ Text[ chinese_simplified ] = "¶¨³ß´ç¶ÔÏó";
+ Text[ russian ] = "Îáúåêò äëÿ èçìåðåíèÿ";
+ Text[ polish ] = "Obiekt do wymiarowania";
+ Text[ japanese ] = "kŽÚ‹L“ü‚·‚éµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "©w¤Ø¤oª«¥ó";
+ Text[ arabic ] = "ßÇÆä ÇáÞíÇÓ";
+ Text[ dutch ] = "Objectafmetingen";
+ Text[ chinese_simplified ] = "¶¨³ß´ç¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíï ìÝôñçóçò";
+ Text[ korean ] = "Ä¡¼ö¼±";
+ Text[ turkish ] = "Ölçüm nesnesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePluralMEASURE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Bemaßungsobjekte : Bema˜ungsobjekte */
+ /* ### ACHTUNG: Neuer Text in Resource? Bemaßungsobjekte : Bema˜ungsobjekte */
+ Text = "Bemaßungsobjekte" ;
+ Text [ ENGLISH ] = "measurement-objects" ;
+ Text [ portuguese ] = "Objectos dimensionais" ;
+ Text [ english_us ] = "Dimensioning objects" ;
+ Text [ portuguese_brazilian ] = "Bemaßungsobjekte" ;
+ Text [ swedish ] = "Dimensioneringsobjekt" ;
+ Text [ danish ] = "Dimensioneringsobjekter" ;
+ Text [ italian ] = "Oggetti di quotatura" ;
+ Text [ spanish ] = "Objetos de dimensionamiento" ;
+ Text [ french ] = "Objets de cotation" ;
+ Text [ dutch ] = "Objectafmetingen" ;
+ Text[ chinese_simplified ] = "¶¨³ß¶È¶ÔÏó";
+ Text[ russian ] = "Îáúåêòû äëÿ èçìåðåíèÿ";
+ Text[ polish ] = "Obiekty do wymiarowania";
+ Text[ japanese ] = "¡–@‹L“ü‚·‚éµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "©w¤Ø«×ª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ÇáÞíÇÓ";
+ Text[ dutch ] = "Objectafmetingen";
+ Text[ chinese_simplified ] = "¶¨³ß¶È¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíá äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö °³Ã¼";
+ Text[ turkish ] = "Ölçüm nesneleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNamePlural
+{
+ Text = "Zeichenobjekte" ;
+ Text [ ENGLISH ] = "drawobjects" ;
+ Text [ norwegian ] = "Tegneobjektr" ;
+ Text [ italian ] = "Oggetti di disegno" ;
+ Text [ portuguese_brazilian ] = "Desenhar objetos" ;
+ Text [ portuguese ] = "Objectos de desenho" ;
+ Text [ finnish ] = "Piirto-objektit" ;
+ Text [ danish ] = "Tegneobjekter" ;
+ Text [ french ] = "Objets de dessin" ;
+ Text [ swedish ] = "Ritobjekt" ;
+ Text [ dutch ] = "Tekenobjecten" ;
+ Text [ spanish ] = "Objetos de dibujo" ;
+ Text [ english_us ] = "draw objects" ;
+ Text[ chinese_simplified ] = "»æͼ¶ÔÏó";
+ Text[ russian ] = "Ãðàôè÷åñêèå îáúåêòû";
+ Text[ polish ] = "Obiekty graficzne";
+ Text[ japanese ] = "}Œ`•`‰æµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ø¹Ïª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ÑÓæãíÉ";
+ Text[ dutch ] = "Tekenobjecten";
+ Text[ chinese_simplified ] = "»æͼ¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíá ó÷åäßáóçò";
+ Text[ korean ] = "±×¸®±â °³Ã¼";
+ Text[ turkish ] = "Çizim nesneleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameNoObj
+{
+ Text = "kein Zeichenobjekt" ;
+ Text [ ENGLISH ] = "no drawobject" ;
+ Text [ norwegian ] = "Ingen tegneobjekter" ;
+ Text [ italian ] = "Nessun oggetto disegnato" ;
+ Text [ portuguese_brazilian ] = "Sem Desenhar objetos" ;
+ Text [ portuguese ] = "Sem objecto de desenho" ;
+ Text [ finnish ] = "Ei piirto-objektia" ;
+ Text [ danish ] = "Intet tegneobjekt" ;
+ Text [ french ] = "Pas d'objet de dessin" ;
+ Text [ swedish ] = "Inget ritobjekt" ;
+ Text [ dutch ] = "Geen tekenobject" ;
+ Text [ spanish ] = "Ningún objeto de dibujo" ;
+ Text [ english_us ] = "No draw object" ;
+ Text[ chinese_simplified ] = "²»ÊÇ×Ö·û¶ÔÏó";
+ Text[ russian ] = "Áåç ãðàôè÷åñêîãî îáúåêòà";
+ Text[ polish ] = "brak obiektu rysunkowego";
+ Text[ japanese ] = "•`‰æµÌÞ¼Þª¸Ä‚È‚µ";
+ Text[ chinese_traditional ] = "¤£¬O¦r¤¸ª«¥ó";
+ Text[ arabic ] = "ÈÏæä ßÇÆä ÑÓæãí";
+ Text[ dutch ] = "Geen tekenobject";
+ Text[ chinese_simplified ] = "²»ÊÇ×Ö·û¶ÔÏó";
+ Text[ greek ] = "×ùñßò áíôéêåßìåíï ó÷åäßáóçò";
+ Text[ korean ] = "±×¸®±â °³Ã¼ ¾øÀ½";
+ Text[ turkish ] = "Çizim nesnesi yok";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameAnd
+{
+ Text = "und" ;
+ Text [ ENGLISH ] = "and" ;
+ Text [ norwegian ] = "and" ;
+ Text [ italian ] = "e" ;
+ Text [ portuguese_brazilian ] = "e" ;
+ Text [ portuguese ] = "e" ;
+ Text [ finnish ] = "ja" ;
+ Text [ danish ] = "og" ;
+ Text [ french ] = "ET" ;
+ Text [ swedish ] = "och" ;
+ Text [ dutch ] = "en" ;
+ Text [ spanish ] = "y" ;
+ Text [ english_us ] = "and" ;
+ Text[ chinese_simplified ] = "ºÍ";
+ Text[ russian ] = "è";
+ Text[ polish ] = "i";
+ Text[ japanese ] = "‚¨‚æ‚Ñ";
+ Text[ chinese_traditional ] = "©M";
+ Text[ arabic ] = "æ";
+ Text[ dutch ] = "en";
+ Text[ chinese_simplified ] = "ºÍ";
+ Text[ greek ] = "êáé";
+ Text[ korean ] = "±×¸®°í";
+ Text[ turkish ] = "ve";
+ Text[ language_user1 ] = " ";
+};
+String STR_ObjNameSingulPlural
+{
+ Text = "Zeichenobjekt(e)" ;
+ Text [ ENGLISH ] = "drawobject(s)" ;
+ Text [ norwegian ] = "tegneobjekt(er)" ;
+ Text [ italian ] = "Oggetto(i) di disegno" ;
+ Text [ portuguese_brazilian ] = "desenhar objeto(s)" ;
+ Text [ portuguese ] = "Objecto(s) de desenho" ;
+ Text [ finnish ] = "piirto-objekti(a)" ;
+ Text [ danish ] = "Tegneobjekt(er)" ;
+ Text [ french ] = "objet(s) de dessin" ;
+ Text [ swedish ] = "Ritobjekt" ;
+ Text [ dutch ] = "Tekenobject(en)" ;
+ Text [ spanish ] = "objeto(s) de dibujo" ;
+ Text [ english_us ] = "draw object(s)" ;
+ Text[ chinese_simplified ] = "»æͼ¶ÔÏó";
+ Text[ russian ] = "Îáúåêò(û) ãðàôèêè";
+ Text[ polish ] = "Obiekt (y) graficzny (e)";
+ Text[ japanese ] = "•`‰æµÌÞ¼Þª¸Ä";
+ Text[ chinese_traditional ] = "ø¹Ïª«¥ó";
+ Text[ arabic ] = "ßÇÆä (ßÇÆäÇÊ) ÑÓæãí (É)";
+ Text[ dutch ] = "Tekenobject(en)";
+ Text[ chinese_simplified ] = "»æͼ¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíï/-á ó÷åäßáóçò";
+ Text[ korean ] = "±×¸®±â °³Ã¼";
+ Text[ turkish ] = "Çizim nesnesi";
+ Text[ language_user1 ] = " ";
+};
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+
+// Neu ab 537: Namen fuer 3D-Objekte
+String STR_ObjNameSingulCube3d
+{
+ Text = "3D Würfel" ;
+ Text [ ENGLISH ] = "3D cube" ;
+ Text[ english_us ] = "3D cube";
+ Text[ portuguese ] = "Cubo 3D";
+ Text[ greek ] = "Êýâïò 3Ä";
+ Text[ dutch ] = "3D dobbelsteen";
+ Text[ french ] = "Cube 3D";
+ Text[ spanish ] = "Cubo 3D";
+ Text[ swedish ] = "3D kub";
+ Text[ russian ] = "Êóá 3-Ì";
+ Text[ italian ] = "Cubo 3D";
+ Text[ danish ] = "3D terning";
+ Text[ polish ] = "kostka 3-W";
+ Text[ portuguese_brazilian ] = "3D cube";
+ Text[ japanese ] = "3D—§•û‘Ì";
+ Text[ korean ] = "3D Á¤À°¸éü";
+ Text[ chinese_simplified ] = "ÈýάÁ¢·½Ìå";
+ Text[ chinese_traditional ] = "3 ºû¥ß¤è";
+ Text[ arabic ] = "ãßÚÈ ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B küp";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ObjNamePluralCube3d
+{
+ Text = "3D Würfel" ;
+ Text [ ENGLISH ] = "3D cubes" ;
+ Text[ english_us ] = "3D cubes";
+ Text[ portuguese ] = "Cubos 3D";
+ Text[ greek ] = "Êýâïò 3Ä";
+ Text[ dutch ] = "3D dobbelstenen";
+ Text[ french ] = "Cubes 3D";
+ Text[ spanish ] = "Cubos 3D";
+ Text[ swedish ] = "3D kuber";
+ Text[ russian ] = "Êóáû 3-Ì";
+ Text[ italian ] = "Cubi 3D";
+ Text[ danish ] = "3D terninger";
+ Text[ polish ] = "kostki 3-W";
+ Text[ portuguese_brazilian ] = "3D cubes";
+ Text[ japanese ] = "3D—§•û‘Ì";
+ Text[ korean ] = "3D Á¤À°¸éü";
+ Text[ chinese_simplified ] = "ÈýάÁ¢·½Ìå";
+ Text[ chinese_traditional ] = "3 ºû¥ß¤è";
+ Text[ arabic ] = "ãßÚÈÇÊ ËáÇËíÉ ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B küpler";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ObjNameSingulExtrude3d
+{
+ Text = "Extrusionsobjekt" ;
+ Text [ ENGLISH ] = "extrude-object" ;
+ Text[ english_us ] = "Extrusion object";
+ Text[ portuguese ] = "Objecto de extrusão";
+ Text[ greek ] = "Áíôéêåßìåíï åîþèçóçò";
+ Text[ dutch ] = "Extrusieobject";
+ Text[ french ] = "Objet d'extrusion";
+ Text[ spanish ] = "Objeto de extrusión";
+ Text[ swedish ] = "Extrusionsobjekt";
+ Text[ russian ] = "Îáúåêò ýêñòðóçèè";
+ Text[ italian ] = "Oggetto di estrusione";
+ Text[ danish ] = "Ekstruderingsobjekt";
+ Text[ polish ] = "obiekt wyt³aczany";
+ Text[ portuguese_brazilian ] = "extrude-object";
+ Text[ japanese ] = "•‚‚«o‚µµÌÞ¼Þª¸Ä";
+ Text[ korean ] = "ÀÔü¸é °³Ã¼";
+ Text[ chinese_simplified ] = "ģѹʽ¶ÔÏó";
+ Text[ chinese_traditional ] = "¼ÒÀ£¦¡ª«¥ó";
+ Text[ arabic ] = "ßÇÆä ãäÈËÞ";
+ Text[ turkish ] = "Kalýp nesne";
+};
+
+String STR_ObjNamePluralExtrude3d
+{
+ Text = "Extrusionsobjekte" ;
+ Text [ ENGLISH ] = "extrude-objects" ;
+ Text[ english_us ] = "Extrusion objects";
+ Text[ portuguese ] = "Objectos de extrusão";
+ Text[ greek ] = "Áíôéêåßìåíá åîþèçóçò";
+ Text[ dutch ] = "Extrusieobjecten";
+ Text[ french ] = "Objets d'extrusion";
+ Text[ spanish ] = "Objetos de extrusión";
+ Text[ swedish ] = "Extrusionsobjekt";
+ Text[ russian ] = "Îáúåêòû ýêñòðóçèè";
+ Text[ italian ] = "Oggetti di estrusione";
+ Text[ danish ] = "Ekstruderingsobjekter";
+ Text[ polish ] = "obiekty wyt³aczane";
+ Text[ portuguese_brazilian ] = "extrude-objects";
+ Text[ japanese ] = "•‚‚«o‚µµÌÞ¼Þª¸Ä";
+ Text[ korean ] = "ÀÔü¸é °³Ã¼";
+ Text[ chinese_simplified ] = "ģѹʽ¶ÔÏó";
+ Text[ chinese_traditional ] = "¼ÒÀ£¦¡ª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ãäÈËÞÉ";
+ Text[ turkish ] = "Kalýp nesneler";
+};
+
+String STR_ObjNameSingulLabel3d
+{
+ Text = "3D Text" ;
+ Text [ ENGLISH ] = "3D text" ;
+ Text[ english_us ] = "3D text";
+ Text[ portuguese ] = "Texto 3D";
+ Text[ greek ] = "Êåßìåíï 3Ä";
+ Text[ dutch ] = "3D tekst";
+ Text[ french ] = "Texte 3D";
+ Text[ spanish ] = "Texto 3D";
+ Text[ swedish ] = "3D text";
+ Text[ russian ] = "Òåêñò 3-Ì";
+ Text[ italian ] = "Testo 3D";
+ Text[ danish ] = "3D tekst";
+ Text[ polish ] = "tekst 3-W";
+ Text[ portuguese_brazilian ] = "3D text";
+ Text[ japanese ] = "3D÷½Ä";
+ Text[ korean ] = "3D ÅؽºÆ®";
+ Text[ chinese_simplified ] = "3 άÎÄ×Ö";
+ Text[ chinese_traditional ] = "3 ºû¤å¦r";
+ Text[ arabic ] = "äÕ ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B metin";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ObjNamePluralLabel3d
+{
+ Text = "3D Texte" ;
+ Text [ ENGLISH ] = "3D texts" ;
+ Text[ english_us ] = "3D texts";
+ Text[ portuguese ] = "Textos 3D";
+ Text[ greek ] = "Êåßìåíá 3Ä";
+ Text[ dutch ] = "3D teksten";
+ Text[ french ] = "Textes 3D";
+ Text[ spanish ] = "Textos 3D";
+ Text[ swedish ] = "3D texter";
+ Text[ russian ] = "Òåêñòû 3-Ì";
+ Text[ italian ] = "Testi 3D";
+ Text[ danish ] = "3D tekster";
+ Text[ polish ] = "tekst 3-W";
+ Text[ portuguese_brazilian ] = "3D texts";
+ Text[ japanese ] = "3D÷½Ä";
+ Text[ korean ] = "3D ÅؽºÆ®";
+ Text[ chinese_simplified ] = "3 άÎÄ×Ö";
+ Text[ chinese_traditional ] = "3 ºû¤å¦r";
+ Text[ arabic ] = "äÕæÕ ËáÇËíÉ ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B metinler";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ObjNameSingulLathe3d
+{
+ Text = "Rotationsobjekt" ;
+ Text [ ENGLISH ] = "rotation object" ;
+ Text[ english_us ] = "rotation object";
+ Text[ portuguese ] = "Objecto de rotação";
+ Text[ greek ] = "Áíôéêåßìåíï ðåñéóôñïöÞò";
+ Text[ dutch ] = "Rotatieobject";
+ Text[ french ] = "Objet de rotation";
+ Text[ spanish ] = "Objeto de rotación";
+ Text[ swedish ] = "Rotationsobjekt";
+ Text[ russian ] = "Îáúåêò âðàùåíèÿ";
+ Text[ italian ] = "Oggetto di rotazione";
+ Text[ danish ] = "Rotationslegeme";
+ Text[ polish ] = "obiekt rotacyjny";
+ Text[ portuguese_brazilian ] = "rotation object";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä‚̉ñ“]";
+ Text[ korean ] = "ȸÀü °³Ã¼";
+ Text[ chinese_simplified ] = "ÐýתÌå";
+ Text[ chinese_traditional ] = "±ÛÂફ¥ó";
+ Text[ arabic ] = "ßÇÆä ÇÓÊÏÇÑÉ";
+ Text[ turkish ] = "Döner nesne";
+};
+
+String STR_ObjNamePluralLathe3d
+{
+ Text = "Rotationsobjekte" ;
+ Text [ ENGLISH ] = "rotation objects" ;
+ Text[ english_us ] = "rotation objects";
+ Text[ portuguese ] = "Objectos de rotação";
+ Text[ greek ] = "Áíôéêåßìåíá ðåñéóôñïöÞò";
+ Text[ dutch ] = "Rotatieobject";
+ Text[ french ] = "Objets de rotation";
+ Text[ spanish ] = "Objetos de rotación";
+ Text[ swedish ] = "Rotationsobjekt";
+ Text[ russian ] = "Îáúåêòû âðàùåíèÿ";
+ Text[ italian ] = "Oggetti di rotazione";
+ Text[ danish ] = "Rotationslegemer";
+ Text[ polish ] = "obiekty rotacyjne";
+ Text[ portuguese_brazilian ] = "rotation objects";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä‚̉ñ“]";
+ Text[ korean ] = "ȸÀü °³Ã¼";
+ Text[ chinese_simplified ] = "ÐýתÌå";
+ Text[ chinese_traditional ] = "±ÛÂફ¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ÇÓÊÏÇÑÉ";
+ Text[ turkish ] = "Döner nesneler";
+};
+
+String STR_ObjNameSingulObj3d
+{
+ Text = "3D Objekt" ;
+ Text [ ENGLISH ] = "3D object" ;
+ Text[ english_us ] = "3D object";
+ Text[ portuguese ] = "Objecto 3D";
+ Text[ greek ] = "Áíôéêåßìåíï 3Ä";
+ Text[ dutch ] = "3D object";
+ Text[ french ] = "Objet 3D";
+ Text[ spanish ] = "Objeto 3D";
+ Text[ swedish ] = "3D objekt";
+ Text[ russian ] = "Îáúåêò 3-Ì";
+ Text[ italian ] = "Oggetto 3D";
+ Text[ danish ] = "3D objekt";
+ Text[ polish ] = "obiekt 3-W";
+ Text[ portuguese_brazilian ] = "3D object";
+ Text[ japanese ] = "3DµÌÞ¼Þª¸Ä";
+ Text[ korean ] = "3D °³Ã¼";
+ Text[ chinese_simplified ] = "3 ά¶ÔÏó";
+ Text[ chinese_traditional ] = "3 ºûª«¥ó";
+ Text[ arabic ] = "ßÇÆä ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B nesne";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ObjNamePluralObj3d
+{
+ Text = "3D Objekte" ;
+ Text [ ENGLISH ] = "3D objects" ;
+ Text[ english_us ] = "3D objects";
+ Text[ portuguese ] = "Objectos 3D";
+ Text[ greek ] = "Áíôéêåßìåíá 3Ä";
+ Text[ dutch ] = "3D objecten";
+ Text[ french ] = "Objets 3D";
+ Text[ spanish ] = "Objetos 3D";
+ Text[ swedish ] = "3D objekt";
+ Text[ russian ] = "Îáúåêòû 3-Ì";
+ Text[ italian ] = "Oggetti 3D";
+ Text[ danish ] = "3D objekter";
+ Text[ polish ] = "obiekty 3-W";
+ Text[ portuguese_brazilian ] = "3D objects";
+ Text[ japanese ] = "3DµÌÞ¼Þª¸Ä";
+ Text[ korean ] = "3D °³Ã¼";
+ Text[ chinese_simplified ] = "3 ά¶ÔÏó";
+ Text[ chinese_traditional ] = "3 ºûª«¥ó";
+ Text[ arabic ] = "ßÇÆäÇÊ ËáÇËíÉ ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B nesneler";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ObjNameSingulPoly3d
+{
+ Text = "3D Polygon" ;
+ Text [ ENGLISH ] = "3D polygon" ;
+ Text[ english_us ] = "3D polygon";
+ Text[ portuguese ] = "Polígono 3D";
+ Text[ greek ] = "Ðïëýãùíï 3Ä";
+ Text[ dutch ] = "3D veelhoek";
+ Text[ french ] = "Polygone 3D";
+ Text[ spanish ] = "Polígono 3D";
+ Text[ swedish ] = "3D polygon";
+ Text[ russian ] = "Ïîëèãîí 3-Ì";
+ Text[ italian ] = "Poligono 3D";
+ Text[ danish ] = "3D polygon";
+ Text[ polish ] = "wielok¹t 3-W";
+ Text[ portuguese_brazilian ] = "3D polygon";
+ Text[ japanese ] = "3D‘½ŠpŒ`";
+ Text[ korean ] = "3D ´Ù°¢Çü";
+ Text[ chinese_simplified ] = "3 ά¶à±ßÐÎ";
+ Text[ chinese_traditional ] = "3 ºû¦hÃä§Î";
+ Text[ arabic ] = "ãÖáÚ ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B çokgen";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ObjNamePluralPoly3d
+{
+ Text = "3D Polygone" ;
+ Text [ ENGLISH ] = "3D polygons" ;
+ Text[ english_us ] = "3D polygons";
+ Text[ portuguese ] = "Polígonos 3D";
+ Text[ greek ] = "Ðïëýãùíá 3Ä";
+ Text[ dutch ] = "3D veelhoeken";
+ Text[ french ] = "Polygones 3D";
+ Text[ spanish ] = "Polígonos 3D";
+ Text[ swedish ] = "3D polygoner";
+ Text[ russian ] = "Ïîëèãîíû 3-Ì";
+ Text[ italian ] = "Poligoni 3D";
+ Text[ danish ] = "3D polygoner";
+ Text[ polish ] = "wielok¹ty 3-W";
+ Text[ portuguese_brazilian ] = "3D polygons";
+ Text[ japanese ] = "3D‘½ŠpŒ`";
+ Text[ korean ] = "3D ´Ù°¢Çü";
+ Text[ chinese_simplified ] = "3 ά¶à±ßÐÎ";
+ Text[ chinese_traditional ] = "3 ºû¦hÃä§Î";
+ Text[ arabic ] = "ãÖáÚÇÊ ËáÇËíÉ ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B çokgenler";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ObjNameSingulScene3d
+{
+ Text = "3D Szene" ;
+ Text [ ENGLISH ] = "3D scene" ;
+ Text[ english_us ] = "3D scene";
+ Text[ portuguese ] = "Cena 3D";
+ Text[ greek ] = "3Ä óêçíÞ";
+ Text[ dutch ] = "3D scene";
+ Text[ french ] = "Séquence 3D";
+ Text[ spanish ] = "Escena 3D";
+ Text[ swedish ] = "3D scen";
+ Text[ russian ] = "Ñöåíà 3-Ì";
+ Text[ italian ] = "Scena 3D";
+ Text[ danish ] = "3D scene";
+ Text[ polish ] = "scena 3-W";
+ Text[ portuguese_brazilian ] = "3D scene";
+ Text[ japanese ] = "3D¼°Ý";
+ Text[ korean ] = "3D Àå¸é";
+ Text[ chinese_simplified ] = "3 άͼ°¸";
+ Text[ chinese_traditional ] = "3 ºû¹Ï®×";
+ Text[ arabic ] = "ãÔåÏ ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B görüntü";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ObjNamePluralScene3d
+{
+ Text = "3D Szenen" ;
+ Text [ ENGLISH ] = "3D scenes" ;
+ Text[ english_us ] = "3D scenes";
+ Text[ portuguese ] = "Cenas 3D";
+ Text[ greek ] = "3Ä óêçíÝò";
+ Text[ dutch ] = "3D scenes";
+ Text[ french ] = "Séquences 3D";
+ Text[ spanish ] = "Escenas 3D";
+ Text[ swedish ] = "3D scener";
+ Text[ russian ] = "Ñöåíû 3-Ì";
+ Text[ italian ] = "Scene 3D";
+ Text[ danish ] = "3D scener";
+ Text[ polish ] = "sceny 3-W";
+ Text[ portuguese_brazilian ] = "3D scenes";
+ Text[ japanese ] = "3D¼°Ý";
+ Text[ korean ] = "3D Àå¸é";
+ Text[ chinese_simplified ] = "3 άͼ°¸";
+ Text[ chinese_traditional ] = "3 ºû¹Ï®×";
+ Text[ arabic ] = "ãÔÇåÏ ËáÇËíÉ ÇáÃÈÚÇÏ";
+ Text[ turkish ] = "3B görüntüler";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ObjNameSingulSphere3d
+{
+ Text = "Kugel" ;
+ Text [ ENGLISH ] = "sphere" ;
+ Text[ english_us ] = "sphere";
+ Text[ portuguese ] = "Esfera";
+ Text[ greek ] = "Óöáßñá";
+ Text[ dutch ] = "Kogel";
+ Text[ french ] = "Sphère";
+ Text[ spanish ] = "Esfera";
+ Text[ swedish ] = "Klot";
+ Text[ russian ] = "Øàð";
+ Text[ italian ] = "Sfera";
+ Text[ danish ] = "Kugle";
+ Text[ polish ] = "kula";
+ Text[ portuguese_brazilian ] = "sphere";
+ Text[ japanese ] = "‹…";
+ Text[ korean ] = "¿ø±¸";
+ Text[ chinese_simplified ] = "ÇòÌå";
+ Text[ chinese_traditional ] = "²yÅé";
+ Text[ arabic ] = "ᥐ";
+ Text[ turkish ] = "Küre";
+};
+
+String STR_ObjNamePluralSphere3d
+{
+ Text = "Kugeln" ;
+ Text [ ENGLISH ] = "spheres" ;
+ Text[ english_us ] = "spheres";
+ Text[ portuguese ] = "Esferas";
+ Text[ greek ] = "Óöáßñåò";
+ Text[ dutch ] = "Kogels";
+ Text[ french ] = "Sphères";
+ Text[ spanish ] = "Esferas";
+ Text[ swedish ] = "Klot";
+ Text[ russian ] = "Øàðû";
+ Text[ italian ] = "Sfere";
+ Text[ danish ] = "Kugler";
+ Text[ polish ] = "kule";
+ Text[ portuguese_brazilian ] = "spheres";
+ Text[ japanese ] = "‹…";
+ Text[ korean ] = "¿ø±¸";
+ Text[ chinese_simplified ] = "ÇòÌå";
+ Text[ chinese_traditional ] = "²yÅé";
+ Text[ arabic ] = "ßÑÇÊ";
+ Text[ turkish ] = "Küreler";
+};
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+
+String STR_EditWithCopy
+{
+ Text = " mit kopieren" ;
+ Text [ ENGLISH ] = " with copy" ;
+ Text [ norwegian ] = " med kopi" ;
+ Text [ italian ] = "con la copia" ;
+ Text [ portuguese_brazilian ] = "com cópia" ;
+ Text [ portuguese ] = "com cópia" ;
+ Text [ finnish ] = " kopioineen" ;
+ Text [ danish ] = "med kopier" ;
+ Text [ french ] = "avec copie" ;
+ Text [ swedish ] = "med kopiering" ;
+ Text [ dutch ] = "meekopiëren" ;
+ Text [ spanish ] = "con copia" ;
+ Text [ english_us ] = "with copy" ;
+ Text[ chinese_simplified ] = "Ò»Æð¸´ÖÆ";
+ Text[ russian ] = "êîïèðîâàòü";
+ Text[ polish ] = "Kopiuj ";
+ Text[ japanese ] = "ºËß°•t‚«";
+ Text[ chinese_traditional ] = "¤@°_½Æ»s";
+ Text[ arabic ] = "ãÚ ÇáäÓÎ";
+ Text[ dutch ] = "meekopiëren";
+ Text[ chinese_simplified ] = "Ò»Æð¸´ÖÆ";
+ Text[ greek ] = "ìå áíôéãñáöÞ";
+ Text[ korean ] = "º¹»ç¿Í ÇÔ²²";
+ Text[ turkish ] = "ile birlikte kopyala";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditPosSize
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Position und Größe für %O setzen : Position und Gr÷˜e f³r %O setzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Position und Größe für %O setzen : Position und Gr÷˜e f³r %O setzen */
+ Text = "Position und Größe für %O setzen" ;
+ Text [ ENGLISH ] = "Set position and size for %O" ;
+ Text [ norwegian ] = "Angi posisjon og størrelse for %O" ;
+ Text [ italian ] = "Imposta posizione e dimensione per %O" ;
+ Text [ portuguese_brazilian ] = "Definir posição e tamanho para %O" ;
+ Text [ portuguese ] = "Definir posição e tamanho para %O" ;
+ Text [ finnish ] = "Määritä objektin %O paikka ja koko" ;
+ Text [ danish ] = "Definer placering og størrelse for %O" ;
+ Text [ french ] = "Définir position et taille de %O" ;
+ Text [ swedish ] = "Definiera placering och storlek för %O" ;
+ Text [ dutch ] = "Positie en grootte voor %O instellen" ;
+ Text [ spanish ] = "Definir posición y tamaño para %O" ;
+ Text [ english_us ] = "Set position and size for %O" ;
+ Text[ chinese_simplified ] = "É趨 %O λÖúʹóС";
+ Text[ russian ] = "Óñòàíîâèòü ïîëîæåíèå è ðàçìåð äëÿ %O";
+ Text[ polish ] = "Ustaw pozycjê i rozmiar dla %O";
+ Text[ japanese ] = "%O‚̈ʒu‚Æ»²½Þ‚ðÝ’è";
+ Text[ chinese_traditional ] = "³]©w %O ¦ì¸m©M¤j¤p";
+ Text[ arabic ] = "ÊÚííä ãæÖÚ æÍÌã %O";
+ Text[ dutch ] = "Positie en grootte voor %O instellen";
+ Text[ chinese_simplified ] = "É趨 %O λÖúʹóС";
+ Text[ greek ] = "Ïñéóìüò èÝóçò êáé ìåãÝèïõò ãéá %O";
+ Text[ korean ] = "%O¿¡ À§Ä¡¿Í Å©±â ¼³Á¤";
+ Text[ turkish ] = "%O için konum ve boyut belirle";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditDelete
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O löschen : %O l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? %O löschen : %O l÷schen */
+ Text = "%O löschen" ;
+ Text [ ENGLISH ] = "Delete %O" ;
+ Text [ norwegian ] = "Slett %O" ;
+ Text [ italian ] = "Elimina %O" ;
+ Text [ portuguese_brazilian ] = "Apagar %O" ;
+ Text [ portuguese ] = "Eliminar %O" ;
+ Text [ finnish ] = "Poista %O" ;
+ Text [ danish ] = "Slet %O" ;
+ Text [ french ] = "Supprimer %O" ;
+ Text [ swedish ] = "Radera %0" ;
+ Text [ dutch ] = "%O verwijderen" ;
+ Text [ spanish ] = "Eliminar %O" ;
+ Text [ english_us ] = "Delete %O" ;
+ Text[ chinese_simplified ] = "ɾ³ý %O";
+ Text[ russian ] = "Óäàëèòü %O";
+ Text[ polish ] = "Usuñ %O";
+ Text[ japanese ] = "%O‚ðíœ";
+ Text[ chinese_traditional ] = "§R°£ %O";
+ Text[ arabic ] = "ÍÐÝ %O";
+ Text[ dutch ] = "%O verwijderen";
+ Text[ chinese_simplified ] = "ɾ³ý %O";
+ Text[ greek ] = "ÄéáãñáöÞ %O";
+ Text[ korean ] = "%O »èÁ¦";
+ Text[ turkish ] = "Sil: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditMovToTop
+{
+ Text = "%O weiter nach vorn stellen" ;
+ Text [ ENGLISH ] = "Move %O to front" ;
+ Text [ norwegian ] = "Flytt %O frem" ;
+ Text [ italian ] = "Porta %O più avanti" ;
+ Text [ portuguese_brazilian ] = "Mover %O para frente" ;
+ Text [ portuguese ] = "Mover %O mais para a frente" ;
+ Text [ finnish ] = "Siirrä %O askel eteen" ;
+ Text [ danish ] = "Flyt %O fremad" ;
+ Text [ french ] = "Déplacer %O vers l'avant" ;
+ Text [ swedish ] = "Flytta %O längre fram" ;
+ Text [ dutch ] = "%O verder naar voren plaatsen" ;
+ Text [ spanish ] = "Desplazar %O hacia adelante" ;
+ Text [ english_us ] = "Move %O forward" ;
+ Text[ chinese_simplified ] = "%O ÔÙÇ°ÖÃ";
+ Text[ russian ] = "Ïåðåìåñòèòü %O âïåðåä";
+ Text[ polish ] = "Przenieœ %O do przodu";
+ Text[ japanese ] = "%O‚ð‚¸‚Á‚Æ‘O•û‚ÖˆÚ“®";
+ Text[ chinese_traditional ] = "%O ¦A«e¸m";
+ Text[ arabic ] = "ÅÒÇÍÉ %O ÈÕæÑÉ ÃßÈÑ Åáì ÇáÃãÇã";
+ Text[ dutch ] = "%O verder naar voren plaatsen";
+ Text[ chinese_simplified ] = "%O ÔÙÇ°ÖÃ";
+ Text[ greek ] = "Ìåôáêßíçóç %O ðñïò ôá åìðñüò";
+ Text[ korean ] = "%O °è¼Ó ¾ÕÀ¸·Î À̵¿";
+ Text[ turkish ] = "Bir öne getir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditMovToBtm
+{
+ Text = "%O weiter nach hinten stellen" ;
+ Text [ ENGLISH ] = "Move %O to behind" ;
+ Text [ norwegian ] = "Flytt %O bak" ;
+ Text [ italian ] = "Porta %O più indietro" ;
+ Text [ portuguese_brazilian ] = "Mover %O para tr s" ;
+ Text [ portuguese ] = "Mover %O mais para trás" ;
+ Text [ finnish ] = "Siirrä %O askel taakse" ;
+ Text [ danish ] = "Flyt %O bagud" ;
+ Text [ french ] = "Déplacer %O vers l'arrière" ;
+ Text [ swedish ] = "Flytta %O längre bak" ;
+ Text [ dutch ] = "%O verder naar achteren plaatsen" ;
+ Text [ spanish ] = "Desplazar %O hacia atrás" ;
+ Text [ english_us ] = "Move %O further back" ;
+ Text[ chinese_simplified ] = "%O ÔÙºóÖÃ";
+ Text[ russian ] = "Ïåðåìåñòèòü %O íàçàä";
+ Text[ polish ] = "Przenieœ %O do ty³u";
+ Text[ japanese ] = "%O‚ð‚¸‚Á‚ÆŒã•û‚ÖˆÚ“®";
+ Text[ chinese_traditional ] = "%O ¦A«á¸m";
+ Text[ arabic ] = "ÅÒÇÍÉ %O ÈÕæÑÉ ÃßÈÑ Åáì ÇáÎáÝ";
+ Text[ dutch ] = "%O verder naar achteren plaatsen";
+ Text[ chinese_simplified ] = "%O ÔÙºóÖÃ";
+ Text[ greek ] = "Ìåôáêßíçóç %O ðñïò ôá ðßóù";
+ Text[ korean ] = "%O °è¼Ó µÚ·Î À̵¿";
+ Text[ turkish ] = "Bir alta gönder: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditPutToTop
+{
+ Text = "%O nach vorn stellen" ;
+ Text [ ENGLISH ] = "Put %O to front" ;
+ Text [ norwegian ] = "Plasser %O foran" ;
+ Text [ italian ] = "Sposta %O in avanti" ;
+ Text [ portuguese_brazilian ] = "Colocar %O para frente" ;
+ Text [ portuguese ] = "Mover %O para a frente" ;
+ Text [ finnish ] = "Siirrä %O edustalle" ;
+ Text [ danish ] = "Placer %O forrest" ;
+ Text [ french ] = "Placer %O à l'avant" ;
+ Text [ swedish ] = "Flytta %O längst fram" ;
+ Text [ dutch ] = "%O naar voren verplaatsen" ;
+ Text [ spanish ] = "Desplazar %O al frente" ;
+ Text [ english_us ] = "Move %O to front" ;
+ Text[ chinese_simplified ] = "ÔÙÇ°ÖÃ %O";
+ Text[ russian ] = "Ïîìåñòèòü ñïåðåäè %O";
+ Text[ polish ] = "Przenieœ %O do przodu";
+ Text[ japanese ] = "%O‚ð‘O•û‚ÖˆÚ“®";
+ Text[ chinese_traditional ] = "¦A«e¸m %O";
+ Text[ arabic ] = "ÅÒÇÍÉ %O Åáì ÇáÃãÇã";
+ Text[ dutch ] = "%O naar voren verplaatsen";
+ Text[ chinese_simplified ] = "ÔÙÇ°ÖÃ %O";
+ Text[ greek ] = "Ìåôáêßíçóç %O ðñïò ôá åìðñüò";
+ Text[ korean ] = "%O ¾ÕÀ¸·Î À̵¿";
+ Text[ turkish ] = "En öne getir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditPutToBtm
+{
+ Text = "%O nach hinten stellen" ;
+ Text [ ENGLISH ] = "Put %O to behind" ;
+ Text [ norwegian ] = "Plasser %O bak" ;
+ Text [ italian ] = "Sposta %O indietro" ;
+ Text [ portuguese_brazilian ] = "Colcar %O para tr s" ;
+ Text [ portuguese ] = "Mover %O para trás" ;
+ Text [ finnish ] = "Siirrä %O taustalle" ;
+ Text [ danish ] = "Placer %O bagest" ;
+ Text [ french ] = "Placer %O à l'arrière" ;
+ Text [ swedish ] = "Flytta %O längst bak" ;
+ Text [ dutch ] = "%O naar achteren verplaatsen" ;
+ Text [ spanish ] = "Desplazar %O hacia atrás" ;
+ Text [ english_us ] = "Move %O to back" ;
+ Text[ chinese_simplified ] = "ÔÙºóÖÃ %O";
+ Text[ russian ] = "Ïîìåñòèòü %O ñçàäè";
+ Text[ polish ] = "Przenieœ %O do ty³u";
+ Text[ japanese ] = "%O‚ðŒã•û‚ÖˆÚ“®";
+ Text[ chinese_traditional ] = "¦A«á¸m %O";
+ Text[ arabic ] = "ÅÒÇÍÉ %O Åáì ÇáÎáÝ";
+ Text[ dutch ] = "%O naar achteren verplaatsen";
+ Text[ chinese_simplified ] = "ÔÙºóÖÃ %O";
+ Text[ greek ] = "Ìåôáêßíçóç %O ðñïò ôá ðßóù";
+ Text[ korean ] = "%O µÚ·Î À̵¿";
+ Text[ turkish ] = "En alta gönder: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditRevOrder
+{
+ Text = "Reihenfolge von %O umkehren" ;
+ Text [ ENGLISH ] = "Reverse order of %O" ;
+ Text [ portuguese ] = "Inverter a ordem de %O" ;
+ Text [ english_us ] = "Reverse order of %O" ;
+ Text [ portuguese_brazilian ] = "Reihenfolge von %O umkehren" ;
+ Text [ swedish ] = "Omvänd ordning av %O" ;
+ Text [ danish ] = "Inverter rækkefølge af %O" ;
+ Text [ italian ] = "Inverti la sequenza di %O" ;
+ Text [ spanish ] = "Invertir el orden de %O" ;
+ Text [ french ] = "Inverser l'ordre de %O" ;
+ Text [ dutch ] = "Volgorde van %0 omkeren" ;
+ Text[ chinese_simplified ] = "%O ˳ÐòÏà·´";
+ Text[ russian ] = "Èçìåíèòü ïîñëåäîâàòåëüíîñòü %O";
+ Text[ polish ] = "Odwróæ kolejnoœæ %O";
+ Text[ japanese ] = "%O‚̇˜‚ð‹t‚É‚·‚é";
+ Text[ chinese_traditional ] = "%O ¶¶§Ç¬Û¤Ï";
+ Text[ arabic ] = "ÚßÓ ÊÑÊíÈ %O";
+ Text[ dutch ] = "Volgorde van %0 omkeren";
+ Text[ chinese_simplified ] = "%O ˳ÐòÏà·´";
+ Text[ greek ] = "ÁíôéóôñïöÞ äéÜôáîçò ôïõ %O";
+ Text[ korean ] = "%OÀÇ ¼ø¼­¸¦ °Å²Ù·Î";
+ Text[ turkish ] = "Sýrasýný deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditMove
+{
+ Text = "%O verschieben" ;
+ Text [ ENGLISH ] = "Move %O" ;
+ Text [ norwegian ] = "Flytt %O" ;
+ Text [ italian ] = "Sposta %O" ;
+ Text [ portuguese_brazilian ] = "Mover %O" ;
+ Text [ portuguese ] = "Mover %O" ;
+ Text [ finnish ] = "Siirrä %O" ;
+ Text [ danish ] = "Flyt %O" ;
+ Text [ french ] = "Déplacer %O" ;
+ Text [ swedish ] = "Flytta %O" ;
+ Text [ dutch ] = "%O verplaatsen" ;
+ Text [ spanish ] = "Desplazar %O" ;
+ Text [ english_us ] = "Move %O" ;
+ Text[ chinese_simplified ] = "Òƶ¯ %O";
+ Text[ russian ] = "Ïåðåìåñòèòü %O";
+ Text[ polish ] = "Przenieœ %O";
+ Text[ japanese ] = "%O‚ðˆÚ“®";
+ Text[ chinese_traditional ] = "²¾°Ê %O";
+ Text[ arabic ] = "ÅÒÇÍÉ %O";
+ Text[ dutch ] = "%O verplaatsen";
+ Text[ chinese_simplified ] = "Òƶ¯ %O";
+ Text[ greek ] = "Ìåôáêßíçóç %O";
+ Text[ korean ] = "%O À̵¿";
+ Text[ turkish ] = "Taþý: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditResize
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Größe von %O ändern : Gr÷˜e von %O õndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Größe von %O ändern : Gr÷˜e von %O õndern */
+ Text = "Größe von %O ändern" ;
+ Text [ ENGLISH ] = "Resize %O" ;
+ Text [ norwegian ] = "Endre størrelse på %O" ;
+ Text [ italian ] = "Ridimensiona %O" ;
+ Text [ portuguese_brazilian ] = "Redimensionar %O" ;
+ Text [ portuguese ] = "Redimensionar %O" ;
+ Text [ finnish ] = "Muuta objektin %O kokoa" ;
+ Text [ danish ] = "Modificer størrelse på %O" ;
+ Text [ french ] = "Redimensionner %O" ;
+ Text [ swedish ] = "Förändra storleken på %O" ;
+ Text [ dutch ] = "Grootte van %O wijzigen" ;
+ Text [ spanish ] = "Modificar tamaño de %O" ;
+ Text [ english_us ] = "Resize %O" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä %O ´óС";
+ Text[ russian ] = "Èçìåíèòü ðàçìåð %O";
+ Text[ polish ] = "Zmieñ rozmiar %O";
+ Text[ japanese ] = "%O‚Ì»²½Þ‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧó %O ¤j¤p";
+ Text[ arabic ] = "ÊÛííÑ ÍÌã %O";
+ Text[ dutch ] = "Grootte van %O wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä %O ´óС";
+ Text[ greek ] = "Ôñïðïðïßçóç ìåãÝèïõò %O";
+ Text[ korean ] = "%OÀÇ Å©±â º¯°æ";
+ Text[ turkish ] = "Boyutunu deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditRotate
+{
+ Text = "%O drehen" ;
+ Text [ ENGLISH ] = "Rotate %O" ;
+ Text [ norwegian ] = "Roter %O" ;
+ Text [ italian ] = "Ruota %O" ;
+ Text [ portuguese_brazilian ] = "Rotar %O" ;
+ Text [ portuguese ] = "Rodar %O" ;
+ Text [ finnish ] = "Käännä %O" ;
+ Text [ danish ] = "Roter %O" ;
+ Text [ french ] = "Rotation %O" ;
+ Text [ swedish ] = "Rotera %O" ;
+ Text [ dutch ] = "%O draaien" ;
+ Text [ spanish ] = "Rodar %O" ;
+ Text [ english_us ] = "Rotate %O" ;
+ Text[ chinese_simplified ] = "Ðýת %O";
+ Text[ russian ] = "Ïîâåðíóòü %O";
+ Text[ polish ] = "Obróæ %O";
+ Text[ japanese ] = "%O‚ð‰ñ“]";
+ Text[ chinese_traditional ] = "±ÛÂà %O";
+ Text[ arabic ] = "ÇÓÊÏÇÑÉ %O";
+ Text[ dutch ] = "%O draaien";
+ Text[ chinese_simplified ] = "Ðýת %O";
+ Text[ greek ] = "ÐåñéóôñïöÞ %O";
+ Text[ korean ] = "%O ȸÀü";
+ Text[ turkish ] = "Döndür: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditMirrorHori
+{
+ Text = "%O horizontal spiegeln" ;
+ Text [ ENGLISH ] = "Mirror %O horizontal" ;
+ Text [ norwegian ] = "Speil %O horisontal" ;
+ Text [ italian ] = "Rispecchia %O in orizzontale" ;
+ Text [ portuguese_brazilian ] = "Espelhar %O horizontalmente" ;
+ Text [ portuguese ] = "Espelhar %O horizontalmente" ;
+ Text [ finnish ] = "Peilaa %O vaakasuunnassa" ;
+ Text [ danish ] = "Spejlvend %O vandret" ;
+ Text [ french ] = "Refléter %O horizontalement" ;
+ Text [ swedish ] = "Spegla %O horisontellt" ;
+ Text [ dutch ] = "%O horizontaal spiegelen" ;
+ Text [ spanish ] = "Reflejar %O horizontalmente" ;
+ Text [ english_us ] = "Flip %O horizontal" ;
+ Text[ chinese_simplified ] = "%O ˮƽ·½Ïò·´Ó³";
+ Text[ russian ] = "Îòðàçèòü %O ïî ãîðèçîíòàëè";
+ Text[ polish ] = "Przerzuæ %O w poziomie";
+ Text[ japanese ] = "%O‚ð¶‰E‚É”½“]";
+ Text[ chinese_traditional ] = "%O ¤ô¥­¤Ï¬M";
+ Text[ arabic ] = "ÇäÚßÇÓ %O ÃÝÞíÇð";
+ Text[ dutch ] = "%O horizontaal spiegelen";
+ Text[ chinese_simplified ] = "%O ˮƽ·½Ïò·´Ó³";
+ Text[ greek ] = "ÁíáóôñïöÞ %O ïñéæïíôßùò";
+ Text[ korean ] = "%O ¼öÆòÀ¸·Î ´ëĪ";
+ Text[ turkish ] = "Yatay yansýt: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditMirrorVert
+{
+ Text = "%O vertikal spiegeln" ;
+ Text [ ENGLISH ] = "Mirror %O vertical" ;
+ Text [ norwegian ] = "Speil %O vertikal" ;
+ Text [ italian ] = "Rispecchia %O in verticale" ;
+ Text [ portuguese_brazilian ] = "Espelhar %O verticalmente" ;
+ Text [ portuguese ] = "Espelhar %O verticalmente" ;
+ Text [ finnish ] = "Peilaa %O pystysuunnassa" ;
+ Text [ danish ] = "Spejlvend %O lodret" ;
+ Text [ french ] = "Refléter %O verticalement" ;
+ Text [ swedish ] = "Spegla %O vertikalt" ;
+ Text [ dutch ] = "%O verticaal spiegelen" ;
+ Text [ spanish ] = "Reflejar %O verticalmente" ;
+ Text [ english_us ] = "Flip %O vertical" ;
+ Text[ chinese_simplified ] = "%O ´¹Ö±·½Ïò·´Ó³";
+ Text[ russian ] = "Îòðàçèòü %O ïî âåðòèêàëè";
+ Text[ polish ] = "Przerzuæ %O w pionie";
+ Text[ japanese ] = "%O‚ð㉺‚É”½“]";
+ Text[ chinese_traditional ] = "%O ««ª½¤Ï¬M";
+ Text[ arabic ] = "ÇäÚßÇÓ %O ÑÃÓíÇð";
+ Text[ dutch ] = "%O verticaal spiegelen";
+ Text[ chinese_simplified ] = "%O ´¹Ö±·½Ïò·´Ó³";
+ Text[ greek ] = "ÁíáóôñïöÞ %O êáôáêüñõöá";
+ Text[ korean ] = "%O ¼öÁ÷À¸·Î ´ëĪ";
+ Text[ turkish ] = "Dikey yansýt: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditMirrorDiag
+{
+ Text = "%O diagonal spiegeln" ;
+ Text [ ENGLISH ] = "Mirror %O diagonal" ;
+ Text [ norwegian ] = "Speil %O diagonal" ;
+ Text [ italian ] = "Rispecchia %O in diagonale" ;
+ Text [ portuguese_brazilian ] = "Espelhar %O em diagonal" ;
+ Text [ portuguese ] = "Espelhar %O na diagonal" ;
+ Text [ finnish ] = "Peilaa %O vinosti" ;
+ Text [ danish ] = "Spejlvend %O diagonalt" ;
+ Text [ french ] = "Refléter %O diagonalement" ;
+ Text [ swedish ] = "Spegla %O diagonalt" ;
+ Text [ dutch ] = "%O diagonaal spiegelen" ;
+ Text [ spanish ] = "Reflejar %O diagonalmente" ;
+ Text [ english_us ] = "Flip %O diagonal" ;
+ Text[ chinese_simplified ] = "%O ¶Ô½Ç·´Ó³";
+ Text[ russian ] = "Îòðàçèòü %O ïî äèàãîíàëè";
+ Text[ polish ] = "Przerzuæ %O po przek¹tnej";
+ Text[ japanese ] = "%O‚ðŽÎ‚ß‚É”½“]";
+ Text[ chinese_traditional ] = "%O ¹ï¨¤¤Ï¬M";
+ Text[ arabic ] = "ÇäÚßÇÓ %O ÞØÑíÇð";
+ Text[ dutch ] = "%O diagonaal spiegelen";
+ Text[ chinese_simplified ] = "%O ¶Ô½Ç·´Ó³";
+ Text[ greek ] = "ÁíáóôñïöÞ %O äéáãùíßùò";
+ Text[ korean ] = "%O ´ë°¢¼±À¸·Î ´ëĪ";
+ Text[ turkish ] = "Diyagonal yansýt: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditMirrorFree
+{
+ Text = "%O frei spiegeln" ;
+ Text [ ENGLISH ] = "Mirror %O" ;
+ Text [ norwegian ] = "Speil %O" ;
+ Text [ italian ] = "Rispecchia %O liberamente" ;
+ Text [ portuguese_brazilian ] = "Espelhar %O" ;
+ Text [ portuguese ] = "Espelhar %O livremente" ;
+ Text [ finnish ] = "Peilaa %O" ;
+ Text [ danish ] = "Spejlvend %O frit" ;
+ Text [ french ] = "Refléter %O librement" ;
+ Text [ swedish ] = "Spegla %O" ;
+ Text [ dutch ] = "%O vrij spiegelen" ;
+ Text [ spanish ] = "Reflejar %O libremente" ;
+ Text [ english_us ] = "Flip %O freehand" ;
+ Text[ chinese_simplified ] = "%O ×ÔÓÉ·´Ó³";
+ Text[ russian ] = "Ñâîáîäíîå îòðàæåíèå %O";
+ Text[ polish ] = "Przerzuæ %O dowolnie";
+ Text[ japanese ] = "%O‚ðŽ©—R‚É”½“]";
+ Text[ chinese_traditional ] = "%O ¦Û¥Ñ¤Ï¬M";
+ Text[ arabic ] = "ÇäÚßÇÓ %O ÈÔßá ÍÑ";
+ Text[ dutch ] = "%O vrij spiegelen";
+ Text[ chinese_simplified ] = "%O ×ÔÓÉ·´Ó³";
+ Text[ greek ] = "ÁíáóôñïöÞ %O åëåýèåñá";
+ Text[ korean ] = "%O ÀÓÀÇ´ë·Î ´ëĪ";
+ Text[ turkish ] = "Serbest yansýt: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditShear
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O verzerren (schrägstellen) : %O verzerren (schrõgstellen) */
+ /* ### ACHTUNG: Neuer Text in Resource? %O verzerren (schrägstellen) : %O verzerren (schrõgstellen) */
+ Text = "%O verzerren (schräg stellen)" ;
+ Text [ ENGLISH ] = "Shear %O" ;
+ Text [ norwegian ] = "Skjærevinkel %O" ;
+ Text [ italian ] = "Distorci %O (inclina)" ;
+ Text [ portuguese_brazilian ] = "Aparar %O" ;
+ Text [ portuguese ] = "Deformar %O (inclinar)" ;
+ Text [ finnish ] = "Vääristä %O" ;
+ Text [ danish ] = "Vrid %O (stil skråt)" ;
+ Text [ french ] = "Déformer %O (incliner)" ;
+ Text [ swedish ] = "Förvräng %O (snedställ)" ;
+ Text [ dutch ] = "%O vervormen (schuintrekken)" ;
+ Text [ spanish ] = "Distorsionar (inclinar) %O" ;
+ Text [ english_us ] = "Distort %O (slant)" ;
+ Text[ chinese_simplified ] = "%O ŤÇú(Çãб)";
+ Text[ russian ] = "Èñêàçèòü %O (ïîä íàêëîíîì)";
+ Text[ polish ] = "Zniekszta³æ %O (pochyl)";
+ Text[ japanese ] = "%O‚ð˜c‚ß‚é(ŒXŽÎ‚³‚¹‚é)";
+ Text[ chinese_traditional ] = "%O §á¦±(¶É±×)";
+ Text[ arabic ] = "ÊÍÑíÝ Ôßá %O (ãÇÆá)";
+ Text[ dutch ] = "%O vervormen (schuintrekken)";
+ Text[ chinese_simplified ] = "%O ŤÇú(Çãб)";
+ Text[ greek ] = "Ðáñáìüñöùóç %O (ðëÜãéá)";
+ Text[ korean ] = "%O Àϱ׷¯¶ß¸²(±â¿ï±â)";
+ Text[ turkish ] = "Çarpýt (eð): %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditCrook
+{
+ Text = "%O im Kreis anordnen" ;
+ Text [ ENGLISH ] = "Crook %O" ;
+ Text [ portuguese ] = "Dispor %O em círculo" ;
+ Text [ english_us ] = "Arrange %O in circle" ;
+ Text [ portuguese_brazilian ] = "%O im Kreis anordnen" ;
+ Text [ swedish ] = "Placera %O i cirkel" ;
+ Text [ danish ] = "Arranger %O i cirkel" ;
+ Text [ italian ] = "Disponi %O in cerchio" ;
+ Text [ spanish ] = "Organizar %O en círculo" ;
+ Text [ french ] = "Disposer en cercle %O" ;
+ Text [ dutch ] = "%O in cirkel schikken" ;
+ Text[ chinese_simplified ] = "%O ÅÅÐò³ÉÔ²ÐÎ";
+ Text[ russian ] = "Ðàñïîëîæèòü %O â êðóãó";
+ Text[ polish ] = "RozmieϾ %O w kole";
+ Text[ japanese ] = "%O‚ð‰~Œ`‚É”z—ñ";
+ Text[ chinese_traditional ] = "%O ±Æ§Ç¦¨¶ê§Î";
+ Text[ arabic ] = "ÊÑÊíÈ %O Ýí ÏÇÆÑÉ";
+ Text[ dutch ] = "%O in cirkel schikken";
+ Text[ chinese_simplified ] = "%O ÅÅÐò³ÉÔ²ÐÎ";
+ Text[ greek ] = "ÔïðïèÝôçóç óå êýêëï %O";
+ Text[ korean ] = "%OÀ» ¿ø ¾È¿¡¼­ Á¤·Ä";
+ Text[ turkish ] = "Daire biçiminde düzenle: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditCrookContortion
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O kreisförmig verbiegen : %O kreisf÷rmig verbiegen */
+ /* ### ACHTUNG: Neuer Text in Resource? %O kreisförmig verbiegen : %O kreisf÷rmig verbiegen */
+ Text = "%O kreisförmig verbiegen" ;
+ Text [ ENGLISH ] = "Crook %O" ;
+ Text [ portuguese ] = "Curvar %O em círculo" ;
+ Text [ english_us ] = "Curve %O in circle" ;
+ Text [ portuguese_brazilian ] = "%O kreisförmig verbiegen" ;
+ Text [ swedish ] = "Böj %O till en cirkel" ;
+ Text [ danish ] = "Bøj %O i kurveform" ;
+ Text [ italian ] = "Piega %O a cerchio" ;
+ Text [ spanish ] = "Doblar %O en círculo" ;
+ Text [ french ] = "Courber %O en cercle" ;
+ Text [ dutch ] = "%O in cirkel buigen" ;
+ Text[ chinese_simplified ] = "%O ת±ä³ÉÔ²ÐÎ";
+ Text[ russian ] = "Ñîãíóòü %O â âèäå êðóãà";
+ Text[ polish ] = "Przekszta³æ %O w ko³o";
+ Text[ japanese ] = "%O‚ðŠÛ‚­¶°ÌÞ‚³‚¹‚é";
+ Text[ chinese_traditional ] = "%O ÂàÅܦ¨¶ê§Î";
+ Text[ arabic ] = "Ëäí %O Úáì Ôßá ÏÇÆÑÉ";
+ Text[ dutch ] = "%O in cirkel buigen";
+ Text[ chinese_simplified ] = "%O ת±ä³ÉÔ²ÐÎ";
+ Text[ greek ] = "Êáìðýëç %O óå êýêëï";
+ Text[ korean ] = "%OÀ» ¿øÇüÅ·Π±¸ºÎ¸²";
+ Text[ turkish ] = "Daire biçiminde eð: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditDistort
+{
+ Text = "%O frei verzerren" ;
+ Text [ ENGLISH ] = "Distort %O" ;
+ Text [ portuguese ] = "Deformar %O livremente" ;
+ Text [ english_us ] = "Distort %O" ;
+ Text [ portuguese_brazilian ] = "%O frei verzerren" ;
+ Text [ swedish ] = "Förvräng %O fritt" ;
+ Text [ danish ] = "Vrid %O frit" ;
+ Text [ italian ] = "Distorci %O liberamente" ;
+ Text [ spanish ] = "Distorsión libre de %O" ;
+ Text [ french ] = "Déformer librement %O" ;
+ Text [ dutch ] = "%O vrij vervormen" ;
+ Text[ chinese_simplified ] = "%O ×ÔÓÉŤÇú";
+ Text[ russian ] = "Ñâîáîäíîå èñêàæåíèå %O";
+ Text[ polish ] = "Zniekszta³æ dowolnie %O";
+ Text[ japanese ] = "%O‚ðŽ©—R‚ɘc‚ß‚é";
+ Text[ chinese_traditional ] = "%O ¦Û¥Ñ§á¦±";
+ Text[ arabic ] = "ÊÍÑíÝ Ôßá %O (ÍÑ)";
+ Text[ dutch ] = "%O vrij vervormen";
+ Text[ chinese_simplified ] = "%O ×ÔÓÉŤÇú";
+ Text[ greek ] = "Åëåýèåñç ðáñáìüñöùóç %O";
+ Text[ korean ] = "%O ÀÓÀÇ´ë·Î Àϱ׷¯¶ß¸²";
+ Text[ turkish ] = "Serbest çarpýt: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditRipUp
+{
+ Text = "%O auftrennen" ;
+ Text [ ENGLISH ] = "Rip up %O" ;
+ Text [ norwegian ] = "+++Rip up %O" ;
+ Text [ italian ] = "separa %O" ;
+ Text [ portuguese_brazilian ] = "Abrir %O" ;
+ Text [ portuguese ] = "Separar %O" ;
+ Text [ finnish ] = "Katkaise %O" ;
+ Text [ danish ] = "Opdel %O" ;
+ Text [ french ] = "Scinder %O" ;
+ Text [ swedish ] = "Upphäv %O" ;
+ Text [ dutch ] = "%O opsplitsen" ;
+ Text [ spanish ] = "Separar %O" ;
+ Text [ english_us ] = "Undo %O" ;
+ Text[ chinese_simplified ] = "·Ö¿ª %O";
+ Text[ russian ] = "Ðàçúåäèíèòü %O";
+ Text[ polish ] = "Rozdziel %O";
+ Text[ japanese ] = "%O‚ðŒ³‚É–ß‚·";
+ Text[ chinese_traditional ] = "¤À¶} %O";
+ Text[ arabic ] = "ÝÕá %O";
+ Text[ dutch ] = "%O opsplitsen";
+ Text[ chinese_simplified ] = "·Ö¿ª %O";
+ Text[ greek ] = "Äéáßñåóç %O";
+ Text[ korean ] = "%O ½ÇÇà Ãë¼Ò";
+ Text[ turkish ] = "Böl: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditSetPointsSmooth
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Béziereigenschaften von %O ändern : BÚziereigenschaften von %O õndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Béziereigenschaften von %O ändern : BÚziereigenschaften von %O õndern */
+ Text = "Béziereigenschaften von %O ändern" ;
+ Text [ ENGLISH ] = "Change bézier-properties of %O" ;
+ Text [ portuguese ] = "Alterar propriedades Bézier de %O" ;
+ Text [ english_us ] = "Modify bézier properties of %O" ;
+ Text [ portuguese_brazilian ] = "Béziereigenschaften von %O ändern" ;
+ Text [ swedish ] = "Modifiera bézieregenskaperna för %O" ;
+ Text [ danish ] = "Modificer bezieregenskaber af %O" ;
+ Text [ italian ] = "Modifica le proprietà Bézier di %O" ;
+ Text [ spanish ] = "Modificar propiedades Bézier de %O" ;
+ Text [ french ] = "Modifier les propriétés Bézier de %O" ;
+ Text [ dutch ] = "Bézier-eigenschappen van %O wijzigen" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä %O µÄBézier ÊôÐÔ";
+ Text[ russian ] = "Èçìåíèòü ñâîéñòâà Áåçüå %O";
+ Text[ polish ] = "Zmieñ w³aœciowoœci Béziera %O";
+ Text[ japanese ] = "%O‚ÌÍÞ¼Þª‹Èü‚Ì‘®«‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧó %O ªº¦±½uÄÝ©Ê";
+ Text[ arabic ] = "ÊÚÏíá ÎÕÇÆÕ Bézier ãä %O";
+ Text[ dutch ] = "Bézier-eigenschappen van %O wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä %O µÄBézier ÊôÐÔ";
+ Text[ greek ] = "Ôñïðïðïßçóç éäéïôÞôùí êáìðýëçò ôïõ %O";
+ Text[ korean ] = "%OÀÇ º£Áö¾î ¼Ó¼º º¯°æ";
+ Text[ turkish ] = "Bézier özelliklerini deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditSetSegmentsKind
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Béziereigenschaften von %O ändern : BÚziereigenschaften von %O õndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Béziereigenschaften von %O ändern : BÚziereigenschaften von %O õndern */
+ Text = "Béziereigenschaften von %O ändern" ;
+ Text [ ENGLISH ] = "Change bézier-properties of %O" ;
+ Text [ portuguese ] = "Alterar propriedades Bézier de %O" ;
+ Text [ english_us ] = "Modify bézier properties of %O" ;
+ Text [ portuguese_brazilian ] = "Béziereigenschaften von %O ändern" ;
+ Text [ swedish ] = "Ändra bézieregenskaper från %O" ;
+ Text [ danish ] = "Modificer bezieregenskaber af %O" ;
+ Text [ italian ] = "Modifica le proprietà Bézier di %O" ;
+ Text [ spanish ] = "Modificar propiedades Bézier de %O" ;
+ Text [ french ] = "Modifier les propriétés Bézier de %O" ;
+ Text [ dutch ] = "Bézier-eigenschappen van %O wijzigen" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä %O µÄBézier ÊôÐÔ";
+ Text[ russian ] = "Èçìåíèòü ñâîéñòâà Áåçüå %O";
+ Text[ polish ] = "Zmieñ w³aœciwoœci Béziera %O";
+ Text[ japanese ] = "%O‚ÌÍÞ¼Þª‹Èü‚Ì‘®«‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧó %O ªº¦±½uÄÝ©Ê";
+ Text[ arabic ] = "ÊÚÏíá ÎÕÇÆÕ Bézier ãä %O";
+ Text[ dutch ] = "Bézier-eigenschappen van %O wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä %O µÄBézier ÊôÐÔ";
+ Text[ greek ] = "Ôñïðïðïßçóç éäéïôÞôùí êáìðýëçò ôïõ %O";
+ Text[ korean ] = "%OÀÇ º£Áö¾î ¼Ó¼º º¯°æ";
+ Text[ turkish ] = "Bézier özelliklerini deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditShut
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O schließen : %O schlie˜en */
+ /* ### ACHTUNG: Neuer Text in Resource? %O schließen : %O schlie˜en */
+ Text = "%O schließen" ;
+ Text [ ENGLISH ] = "Shut %O" ;
+ Text [ norwegian ] = "Lukk %O" ;
+ Text [ italian ] = "Chiudi %O" ;
+ Text [ portuguese_brazilian ] = "Fechar %O" ;
+ Text [ portuguese ] = "Fechar %O" ;
+ Text [ finnish ] = "Sulje %O" ;
+ Text [ danish ] = "Luk %O" ;
+ Text [ french ] = "Fermer %O" ;
+ Text [ swedish ] = "Stäng %O" ;
+ Text [ dutch ] = "%O sluiten" ;
+ Text [ spanish ] = "Cerrar %O" ;
+ Text [ english_us ] = "Close %O" ;
+ Text[ chinese_simplified ] = "¹Ø±Õ %O";
+ Text[ russian ] = "Çàêðûòü %O";
+ Text[ polish ] = "Zamknij %O";
+ Text[ japanese ] = "%O‚ð•Â‚¶‚é";
+ Text[ chinese_traditional ] = "Ãö³¬ %O";
+ Text[ arabic ] = "ÅÛáÇÞ %O";
+ Text[ dutch ] = "%O sluiten";
+ Text[ chinese_simplified ] = "¹Ø±Õ %O";
+ Text[ greek ] = "Êëåßóéìï %O";
+ Text[ korean ] = "%O ´Ý±â";
+ Text[ turkish ] = "Kapat: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditSetGlueEscDir
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Austrittsrichtung für %O setzen : Austrittsrichtung f³r %O setzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Austrittsrichtung für %O setzen : Austrittsrichtung f³r %O setzen */
+ Text = "Austrittsrichtung für %O setzen" ;
+ Text [ ENGLISH ] = "Set escape direction for %O" ;
+ Text [ portuguese ] = "Definir direcção de saída para %O" ;
+ Text [ english_us ] = "Set exit direction for %O" ;
+ Text [ portuguese_brazilian ] = "Austrittsrichtung für %O setzen" ;
+ Text [ swedish ] = "Definiera utgångsriktning för %O" ;
+ Text [ danish ] = "Definer udgangsretningen for %0" ;
+ Text [ italian ] = "Imposta allineamento per %O" ;
+ Text [ spanish ] = "Definir dirección de salida de %O" ;
+ Text [ french ] = "Définir la direction de sortie pour %O" ;
+ Text [ dutch ] = "Uittredingsrichting voor %0 definiëren" ;
+ Text[ chinese_simplified ] = "Ϊ %O É趨Í˳ö·½Ïò";
+ Text[ russian ] = "Óñòàíîâèòü äëÿ %O íàïðàâëåíèå âûõîäà";
+ Text[ polish ] = "Okreœl kierunek wyjœcia dla %O ";
+ Text[ japanese ] = "%O‚Ìo‚·•ûŒü‚ðÝ’è";
+ Text[ chinese_traditional ] = "¬° %O ³]©w°h¥X¤è¦V";
+ Text[ arabic ] = "ÊÚííä ÇÊÌÇå ÇáÎÑæÌ áÜ %O";
+ Text[ language_user1 ] = " ";
+ Text[ dutch ] = "Uittredingsrichting voor %0 definiëren";
+ Text[ chinese_simplified ] = "Ϊ %O É趨Í˳ö·½Ïò";
+ Text[ greek ] = "Ïñéóìüò êáôåýèõíóçò åîüäïõ ãéá %O";
+ Text[ korean ] = "%OÀÇ ³¡³»±â ¹æÇâ ¼³Á¤";
+ Text[ turkish ] = "%O için çýkýþ yönü belirle";
+};
+String STR_EditSetGluePercent
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Relativattribut für %O setzen : Relativattribut f³r %O setzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Relativattribut für %O setzen : Relativattribut f³r %O setzen */
+ Text = "Relativattribut für %O setzen" ;
+ Text [ ENGLISH ] = "Set relative-attribute for %O" ;
+ Text [ portuguese ] = "Definir atributos relativos para %O" ;
+ Text [ english_us ] = "Set relative attribute at %O" ;
+ Text [ portuguese_brazilian ] = "Relativattribut für %O setzen" ;
+ Text [ swedish ] = "Definiera relativattribut för %O" ;
+ Text [ danish ] = "Definer relativattribut for %O" ;
+ Text [ italian ] = "Imposta l'attributo relativo per %O" ;
+ Text [ spanish ] = "Definir atributo relativo para %O" ;
+ Text [ french ] = "Définir l'attribut relatif pour %O" ;
+ Text [ dutch ] = "Relatief attribuut voor %O definiëren" ;
+ Text[ chinese_simplified ] = "Ϊ %O É趨Ïà¹ØÊôÐÔ";
+ Text[ russian ] = "Óñòàíîâèòü äëÿ %O îòíîñèòåëüíûé àòðèáóò";
+ Text[ polish ] = "OsadŸ atrybut wzglêdny dla %O";
+ Text[ japanese ] = "%O‚Ì‘Š‘Α®«‚ðÝ’è";
+ Text[ chinese_traditional ] = "¬° %O ³]©w¬ÛÃöÄÝ©Ê";
+ Text[ arabic ] = "ÊÚííä ÓãÉ äÓÈíÉ áÜ %O";
+ Text[ dutch ] = "Relatief attribuut voor %O definiëren";
+ Text[ chinese_simplified ] = "Ϊ %O É趨Ïà¹ØÊôÐÔ";
+ Text[ greek ] = "Ïñéóìüò ó÷åôéêÞò éäéüôçôáò ãéá %O";
+ Text[ korean ] = "%OÀÇ »ó´ë ¼Ó¼º ¼³Á¤";
+ Text[ turkish ] = "%O için göreceli öznitelik belirle";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditSetGlueAlign
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Bezugspunkt für %O setzen : Bezugspunkt f³r %O setzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Bezugspunkt für %O setzen : Bezugspunkt f³r %O setzen */
+ Text = "Bezugspunkt für %O setzen" ;
+ Text [ ENGLISH ] = "Set reference for %O" ;
+ Text [ portuguese ] = "Definir ponto de referência para %O" ;
+ Text [ english_us ] = "Set reference point for %O" ;
+ Text [ portuguese_brazilian ] = "Bezugspunkt für %O setzen" ;
+ Text [ swedish ] = "Sätt referenspunkt för %O" ;
+ Text [ danish ] = "Definer referencepunkt for %O" ;
+ Text [ italian ] = "Imposta punto di riferimento per %O" ;
+ Text [ spanish ] = "Definir puntos de referencia para %O" ;
+ Text [ french ] = "Ajuster point de référence à%O" ;
+ Text [ dutch ] = "Verwijzingspunt voor %O definiëren" ;
+ Text[ chinese_simplified ] = "Ϊ %O É趨ÒýÓõã";
+ Text[ russian ] = "Óñòàíîâèòü äëÿ %O èñõîäíóþ òî÷êó";
+ Text[ polish ] = "Okreœl punkt odniesienia dla %O ";
+ Text[ japanese ] = "%O‚ÉŽQÆ“_‚ðÝ’è";
+ Text[ chinese_traditional ] = "¬° %O ³]©w°Ñ·ÓÂI";
+ Text[ arabic ] = "ÊÚííä äÞØÉ ãÑÌÚíÉ áÜ %O";
+ Text[ dutch ] = "Verwijzingspunt voor %O definiëren";
+ Text[ chinese_simplified ] = "Ϊ %O É趨ÒýÓõã";
+ Text[ greek ] = "Ïñéóìüò óçìåßïõ áíáöïñÜò ãéá %O";
+ Text[ korean ] = "%O¸¦ À§ÇÑ ÂüÁ¶ Æ÷ÀÎÆ® ¼³Á¤";
+ Text[ turkish ] = "%O için referans noktasý belirle";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditGroup
+{
+ Text = "%O gruppieren" ;
+ Text [ ENGLISH ] = "Group %O" ;
+ Text [ norwegian ] = "Gruppe%O" ;
+ Text [ italian ] = "Raggruppa %O" ;
+ Text [ portuguese_brazilian ] = "Agrupar %O" ;
+ Text [ portuguese ] = "Agrupar %O" ;
+ Text [ finnish ] = "Ryhmitä %O" ;
+ Text [ danish ] = "Grupper %O" ;
+ Text [ french ] = "Grouper %O" ;
+ Text [ swedish ] = "Gruppera %O" ;
+ Text [ dutch ] = "%O groeperen" ;
+ Text [ spanish ] = "Agrupar %O" ;
+ Text [ english_us ] = "Group %O" ;
+ Text[ chinese_simplified ] = "·Ö×é %O";
+ Text[ russian ] = "Ãðóïïèðîâàòü %O";
+ Text[ polish ] = "Grupuj %O";
+ Text[ japanese ] = "%O‚ð¸ÞÙ°Ì߉»‚·‚é";
+ Text[ chinese_traditional ] = "¸s²Õ %O";
+ Text[ arabic ] = "ÊÌãíÚ %O";
+ Text[ dutch ] = "%O groeperen";
+ Text[ chinese_simplified ] = "·Ö×é %O";
+ Text[ greek ] = "Ïìáäïðïßçóç %O";
+ Text[ korean ] = "%O ±×·ìÈ­";
+ Text[ turkish ] = "Grupla: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditUngroup
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O auflösen : %O aufl÷sen */
+ /* ### ACHTUNG: Neuer Text in Resource? %O auflösen : %O aufl÷sen */
+ Text = "%O auflösen" ;
+ Text [ ENGLISH ] = "Ungroup %O" ;
+ Text [ norwegian ] = "Opphev gruppering %O" ;
+ Text [ italian ] = "Separa %O" ;
+ Text [ portuguese_brazilian ] = "Desagrupar %O" ;
+ Text [ portuguese ] = "Desagrupar %O" ;
+ Text [ finnish ] = "Pura ryhmä %O" ;
+ Text [ danish ] = "Ophæv %O" ;
+ Text [ french ] = "Dissocier %O" ;
+ Text [ swedish ] = "Dela upp %O" ;
+ Text [ dutch ] = "%O opheffen" ;
+ Text [ spanish ] = "Deshacer %O" ;
+ Text [ english_us ] = "Ungroup %O" ;
+ Text[ chinese_simplified ] = "½â³ý%O µÄ·Ö×é";
+ Text[ russian ] = "Ðàçãðóïïèðîâàòü %O";
+ Text[ polish ] = "Rozgrupuj %O";
+ Text[ japanese ] = "%O‚̉ðœ";
+ Text[ chinese_traditional ] = "¸Ñ°£%O ªº¸s²Õ";
+ Text[ arabic ] = "Ýß ÊÌãíÚ %O";
+ Text[ dutch ] = "%O opheffen";
+ Text[ chinese_simplified ] = "½â³ý%O µÄ·Ö×é";
+ Text[ greek ] = "ÊáôÜñãçóç ïìáäïðïßçóçò %O";
+ Text[ korean ] = "%O ±×·ì ÇØÁ¦";
+ Text[ turkish ] = "Grubu çöz: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditSetAttributes
+{
+ Text = "Attribute auf %O anwenden" ;
+ Text [ ENGLISH ] = "Apply attributes to %O" ;
+ Text [ norwegian ] = "Bruk attributter til %O" ;
+ Text [ italian ] = "Applica attributi a %O" ;
+ Text [ portuguese_brazilian ] = "Aplicar atributos a %O" ;
+ Text [ portuguese ] = "Aplicar atributos a %O" ;
+ Text [ finnish ] = "Käytä määritteitä objektissa %O" ;
+ Text [ danish ] = "Anvend attributter på %O" ;
+ Text [ french ] = "Appliquer les attributs à %O" ;
+ Text [ swedish ] = "Använd attribut på %O" ;
+ Text [ dutch ] = "Attributen op %O toepassen" ;
+ Text [ spanish ] = "Aplicar atributos a %O" ;
+ Text [ english_us ] = "Apply attributes to %O" ;
+ Text[ chinese_simplified ] = "·ÖÅäÊôÐÔ¸ø %O";
+ Text[ russian ] = "Ïðèìåíèòü àòðèáóòû ê %O";
+ Text[ polish ] = "Zastosuj atrybuty do %O";
+ Text[ japanese ] = "%O‚É‘®«‚ð“K—p";
+ Text[ chinese_traditional ] = "¤À°tÄݩʵ¹ %O";
+ Text[ arabic ] = "ÊØÈíÞ ÇáÓãÇÊ Úáì %O";
+ Text[ dutch ] = "Attributen op %O toepassen";
+ Text[ chinese_simplified ] = "·ÖÅäÊôÐÔ¸ø %O";
+ Text[ greek ] = "ÅöáñìïãÞ éäéïôÞôùí óå %O";
+ Text[ korean ] = "%O¿¡ ¼Ó¼º Àû¿ë";
+ Text[ turkish ] = "Öznitelikleri uygula: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditSetStylesheet
+{
+ Text = "Vorlage auf %O anwenden" ;
+ Text [ ENGLISH ] = "Apply stylesheet to %O" ;
+ Text [ norwegian ] = "Bruk attributter til %O" ;
+ Text [ italian ] = "Applica modello a %O" ;
+ Text [ portuguese_brazilian ] = "Aplicar folha de estilos a %O" ;
+ Text [ portuguese ] = "Aplicar estilos a %O" ;
+ Text [ finnish ] = "Käytä tyylitiedostoa objektissa %O" ;
+ Text [ danish ] = "Anvend typografi på %O" ;
+ Text [ french ] = "Appliquer la feuille de style à %O" ;
+ Text [ swedish ] = "Använd formatmall för %O" ;
+ Text [ dutch ] = "Opmaakprofiel op %O toepassen" ;
+ Text [ spanish ] = "Aplicar estilo a %O" ;
+ Text [ english_us ] = "Apply Styles to %O" ;
+ Text[ chinese_simplified ] = "·ÖÅäÑùʽµ½ %O";
+ Text[ russian ] = "Ïðèìåíèòü ê %O ñòèëè";
+ Text[ polish ] = "Zastosuj styl dla %O";
+ Text[ japanese ] = "%O‚ɽÀ²Ù‚ð“K—p";
+ Text[ chinese_traditional ] = "¤À°t¼Ë¦¡¨ì %O";
+ Text[ arabic ] = "ÊØÈíÞ ÇáäãØ Úáì %O";
+ Text[ dutch ] = "Opmaakprofiel op %O toepassen";
+ Text[ chinese_simplified ] = "·ÖÅäÑùʽµ½ %O";
+ Text[ greek ] = "ÅöáñìïãÞ óôõë óå %O";
+ Text[ korean ] = "%O¿¡ ¼­½Ä Àû¿ë";
+ Text[ turkish ] = "Biçimleri %O için kullan";
+ Text[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM - -";
+};
+String STR_EditDelStylesheet
+{
+ Text = "Vorlage von %O entfernen" ;
+ Text [ ENGLISH ] = "Remove stylesheet from %O" ;
+ Text [ norwegian ] = "Fjern stilark fra %O" ;
+ Text [ italian ] = "Rimuovi fogli di stile da %O" ;
+ Text [ portuguese_brazilian ] = "Remover folha de estilos de %O" ;
+ Text [ portuguese ] = "Remover estilo de %O" ;
+ Text [ finnish ] = "Poista tyylitiedosto objektista %O" ;
+ Text [ danish ] = "Fjern typografi fra %O" ;
+ Text [ french ] = "Retirer la feuille de style de %O" ;
+ Text [ swedish ] = "Ta bort formatmall för %O" ;
+ Text [ dutch ] = "Opmaakprofiel van %O verwijderen" ;
+ Text [ spanish ] = "Eliminar estilo de %O" ;
+ Text [ english_us ] = "Remove Style from %O" ;
+ Text[ chinese_simplified ] = "´Ó %O Ö®ÖÐɾ³ýÑùʽ";
+ Text[ russian ] = "Óäàëèòü ñòèëü %O";
+ Text[ polish ] = "Usuñ styl z %O";
+ Text[ japanese ] = "%O‚̽À²Ù‚ðíœ";
+ Text[ chinese_traditional ] = "±q %O ¤§¤¤§R°£¼Ë¦¡";
+ Text[ arabic ] = "ÅÒÇáÉ ÇáäãØ ãä %O";
+ Text[ dutch ] = "Opmaakprofiel van %O verwijderen";
+ Text[ chinese_simplified ] = "´Ó %O Ö®ÖÐɾ³ýÑùʽ";
+ Text[ greek ] = "ÄéáãñáöÞ ðñïôýðïõ áðü %O";
+ Text[ korean ] = "%OÀÇ ¼­½Ä Á¦°Å";
+ Text[ turkish ] = "Biçimini kaldýr: %O";
+ Text[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM - -";
+};
+String STR_EditConvToPoly
+{
+ Text = "%O in Polygon umwandeln" ;
+ Text [ ENGLISH ] = "Convert %O to polygon" ;
+ Text [ norwegian ] = "Konverter %O til polygon" ;
+ Text [ italian ] = "Converti %O in poligono" ;
+ Text [ portuguese_brazilian ] = "Converter %O em polígono" ;
+ Text [ portuguese ] = "Converter %O em polígono" ;
+ Text [ finnish ] = "Muunna %O monikulmioksi" ;
+ Text [ danish ] = "Konverter %O til polygon" ;
+ Text [ french ] = "Convertir %O en polygone" ;
+ Text [ swedish ] = "Ändra %O till polygon" ;
+ Text [ dutch ] = "%O naar veelhoek converteren" ;
+ Text [ spanish ] = "Convertir %O en polígono" ;
+ Text [ english_us ] = "Convert %O to polygon" ;
+ Text[ chinese_simplified ] = "%O ת±ä³É¶à±ßÐÎ";
+ Text[ russian ] = "Ïðåâðàòèòü %O â ìíîãîóãîëüíèê";
+ Text[ polish ] = "Konwertuj %O na wielok¹t";
+ Text[ japanese ] = "%O‚𑽊pŒ`‚É•ÏŠ·";
+ Text[ chinese_traditional ] = "%O ÂàÅܦ¨¦hÃä§Î";
+ Text[ arabic ] = "ÊÍæíá %O Åáì ãÖáÚ";
+ Text[ dutch ] = "%O naar veelhoek converteren";
+ Text[ chinese_simplified ] = "%O ת±ä³É¶à±ßÐÎ";
+ Text[ greek ] = "ÌåôáôñïðÞ %O óå ðïëýãùíï";
+ Text[ korean ] = "%OÀ» ´Ù°¢ÇüÀ¸·Î º¯È¯";
+ Text[ turkish ] = "Çokgene dönüþtür: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditConvToPolys
+{
+ Text = "%O in Polygone umwandeln" ;
+ Text [ ENGLISH ] = "Convert %O to polygons" ;
+ Text [ norwegian ] = "Konverter %O to polygons" ;
+ Text [ italian ] = "Converti %O in poligoni" ;
+ Text [ portuguese_brazilian ] = "Converter %O em polígonos" ;
+ Text [ portuguese ] = "Converter %O em polígonos" ;
+ Text [ finnish ] = "Muunna %O monikulmioiksi" ;
+ Text [ danish ] = "Konverter %O til polygoner" ;
+ Text [ french ] = "Convertir %O en polygones" ;
+ Text [ swedish ] = "Ändra %O till polygoner" ;
+ Text [ dutch ] = "%O naar veelhoeken converteren" ;
+ Text [ spanish ] = "Convertir %O en polígonos" ;
+ Text [ english_us ] = "Convert %O to polygons" ;
+ Text[ chinese_simplified ] = "%O ת»»³É¶à±ßÐÎ";
+ Text[ russian ] = "Ïðåâðàòèòü %O â ìíîãîóãîëüíèê";
+ Text[ polish ] = "Konwertuj %O na wielok¹t";
+ Text[ japanese ] = "%O‚𑽊pŒ`‚É•ÏŠ·";
+ Text[ chinese_traditional ] = "%O Âà´«¦¨¦hÃä§Î";
+ Text[ arabic ] = "ÊÍæíá %O Åáì ãÖáÚÇÊ";
+ Text[ dutch ] = "%O naar veelhoeken converteren";
+ Text[ chinese_simplified ] = "%O ת»»³É¶à±ßÐÎ";
+ Text[ greek ] = "ÌåôáôñïðÞ %O óå ðïëýãùíá";
+ Text[ korean ] = "%OÀ» ´Ù°¢ÇüÀ¸·Î º¯È¯";
+ Text[ turkish ] = "Çokgenlere dönüþtür: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditConvToCurve
+{
+ Text = "%O in Kurve umwandeln" ;
+ Text [ ENGLISH ] = "Convert %O to curve" ;
+ Text [ norwegian ] = "Konverter %O til graf" ;
+ Text [ italian ] = "Converti %O in curva" ;
+ Text [ portuguese_brazilian ] = "Converter %O em curva" ;
+ Text [ portuguese ] = "Converter %O em curva" ;
+ Text [ finnish ] = "Muunna %O käyräksi" ;
+ Text [ danish ] = "Konverter %O til kurve" ;
+ Text [ french ] = "Convertir %O en courbe" ;
+ Text [ swedish ] = "Ändra %O till kurva" ;
+ Text [ dutch ] = "%O naar boog converteren" ;
+ Text [ spanish ] = "Convertir %O en curva" ;
+ Text [ english_us ] = "Convert %O to curve" ;
+ Text[ chinese_simplified ] = "%O ת±ä³ÉÇúÏß";
+ Text[ russian ] = "Ïðåâðàòèòü %O â êðèâóþ";
+ Text[ polish ] = "Konwertuj %O na krzyw¹";
+ Text[ japanese ] = "%O‚ð‹Èü‚É•ÏŠ·";
+ Text[ chinese_traditional ] = "%O ÂàÅܦ¨¦±½u";
+ Text[ arabic ] = "ÊÍæíá %O Åáì ãäÍäì";
+ Text[ dutch ] = "%O naar boog converteren";
+ Text[ chinese_simplified ] = "%O ת±ä³ÉÇúÏß";
+ Text[ greek ] = "ÌåôáôñïðÞ %O óå êáìðýëç";
+ Text[ korean ] = "%OÀ» °î¼±À¸·Î º¯È¯";
+ Text[ turkish ] = "Eðriye dönüþtür: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditConvToCurves
+{
+ Text = "%O in Kurven umwandeln" ;
+ Text [ ENGLISH ] = "Convert %O to curves" ;
+ Text [ norwegian ] = "Konverter %O til grafer" ;
+ Text [ italian ] = "Converti %O in curve" ;
+ Text [ portuguese_brazilian ] = "Converter %O em curvas" ;
+ Text [ portuguese ] = "Converter %O em curvas" ;
+ Text [ finnish ] = "Muunna %O käyriksi" ;
+ Text [ danish ] = "Konverter %O til kurver" ;
+ Text [ french ] = "Convertir %O en courbes" ;
+ Text [ swedish ] = "Ändra %O till kurvor" ;
+ Text [ dutch ] = "%O naar bogen converteren" ;
+ Text [ spanish ] = "Convertir %O en curvas" ;
+ Text [ english_us ] = "Convert %O to curves" ;
+ Text[ chinese_simplified ] = "%O ת±ä³ÉÇúÏß";
+ Text[ russian ] = "Ïðåâðàòèòü %O â êðèâóþ";
+ Text[ polish ] = "Konwertuj %O na krzywe";
+ Text[ japanese ] = "%O‚ð‹Èü‚É•ÏŠ·";
+ Text[ chinese_traditional ] = "%O ÂàÅܦ¨¦±½u";
+ Text[ arabic ] = "ÊÍæíá %O Åáì ãäÍäíÇÊ";
+ Text[ dutch ] = "%O naar bogen converteren";
+ Text[ chinese_simplified ] = "%O ת±ä³ÉÇúÏß";
+ Text[ greek ] = "ÌåôáôñïðÞ %O óå êáìðýëåò";
+ Text[ korean ] = "%OÀ» °î¼±À¸·Î º¯È¯";
+ Text[ turkish ] = "Eðrilere dönüþtür: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditConvToContour
+{
+ Text = "%O in Kontur umwandeln" ;
+ Text [ ENGLISH ] = "Convert %O to contour" ;
+ Text[ english_us ] = "Convert %O to contour";
+ Text[ portuguese ] = "Converter %O em contorno";
+ Text[ russian ] = "Ïðåîáðàçîâàòü %O â êîíòóð";
+ Text[ greek ] = "ÌåôáôñïðÞ %O óå ðåñßãñáììá";
+ Text[ dutch ] = "%O converteren naar contour";
+ Text[ french ] = "Convertir %O en contour";
+ Text[ spanish ] = "Convertir %O en contorno";
+ Text[ italian ] = "Converti %O in contorno";
+ Text[ danish ] = "Konverter %O til kontur";
+ Text[ swedish ] = "Omvandla %O till kontur";
+ Text[ polish ] = "Konwertuj %O na kontur";
+ Text[ portuguese_brazilian ] = "Convert %O to contour";
+ Text[ japanese ] = "%O‚ð—ÖŠs‚É•ÏŠ·";
+ Text[ korean ] = "%O À±°ûÀ¸·Î º¯È¯";
+ Text[ chinese_simplified ] = "ת»» %O ³ÉΪÂÖÀªÍ¼";
+ Text[ chinese_traditional ] = "%O Âà´«¦¨½ü¹ø";
+ Text[ arabic ] = "ÊÍæíá %O Åáì ÎØ ßÝÇÝí";
+ Text[ turkish ] = "Kontura dönüþtür: %O";
+};
+String STR_EditConvToContours
+{
+ Text = "%O in Konturen umwandeln" ;
+ Text [ ENGLISH ] = "Convert %O to contours" ;
+ Text[ english_us ] = "Convert %O to contours";
+ Text[ portuguese ] = "Converter %O em contornos";
+ Text[ russian ] = "Ïðåîáðàçîâàòü %O â êîíòóðû";
+ Text[ greek ] = "ÌåôáôñïðÞ %O óå ðåñßãñáììá";
+ Text[ dutch ] = "%O converteren naar contouren";
+ Text[ french ] = "Convertir %O en contours";
+ Text[ spanish ] = "Convertir %O en contornos";
+ Text[ italian ] = "Converti %O in contorni";
+ Text[ danish ] = "Konverter %O til konturer";
+ Text[ swedish ] = "Omvandla %O till konturer";
+ Text[ polish ] = "Konwertuj %O na kontury";
+ Text[ portuguese_brazilian ] = "Convert %O to contours";
+ Text[ japanese ] = "%O‚ð—ÖŠs‚É•ÏŠ·";
+ Text[ korean ] = "%O À±°ûÀ¸·Î º¯È¯";
+ Text[ chinese_simplified ] = "ת»» %O ³ÉΪÂÖÀªÍ¼";
+ Text[ chinese_traditional ] = "%O Âà´«¦¨½ü¹ø";
+ Text[ arabic ] = "ÊÍæíá %O Åáì ÎØæØ ßÝÇÝíÉ";
+ Text[ turkish ] = "Konturlara dönüþtür: %O";
+};
+String STR_EditAlign
+{
+ Text = "%O ausrichten" ;
+ Text [ ENGLISH ] = "Align %O" ;
+ Text [ norwegian ] = "Juster %O" ;
+ Text [ italian ] = "Allinea %O" ;
+ Text [ portuguese_brazilian ] = "Alinhar %O" ;
+ Text [ portuguese ] = "Alinhar %O" ;
+ Text [ finnish ] = "Tasaa %O" ;
+ Text [ danish ] = "Juster %O" ;
+ Text [ french ] = "Aligner %O" ;
+ Text [ swedish ] = "Justera %O" ;
+ Text [ dutch ] = "%O uitlijnen" ;
+ Text [ spanish ] = "Alinear %O" ;
+ Text [ english_us ] = "Align %O" ;
+ Text[ chinese_simplified ] = "¶ÔÆë %O";
+ Text[ russian ] = "Âûðîâíÿòü %O";
+ Text[ polish ] = "Wyrównaj %O";
+ Text[ japanese ] = "%O‚Ì”z’u";
+ Text[ chinese_traditional ] = "¹ï»ô %O";
+ Text[ arabic ] = "ãÍÇÐÇÉ %O";
+ Text[ dutch ] = "%O uitlijnen";
+ Text[ chinese_simplified ] = "¶ÔÆë %O";
+ Text[ greek ] = "Óôïß÷éóç %O";
+ Text[ korean ] = "%O ¸ÂÃã";
+ Text[ turkish ] = "Hizala: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditAlignVTop
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O kopfbündig ausrichten : %O kopfb³ndig ausrichten */
+ /* ### ACHTUNG: Neuer Text in Resource? %O kopfbündig ausrichten : %O kopfb³ndig ausrichten */
+ Text = "%O kopfbündig ausrichten" ;
+ Text [ ENGLISH ] = "Align %O" ;
+ Text [ norwegian ] = "Juster %O" ;
+ Text [ italian ] = "Allinea %O in alto" ;
+ Text [ portuguese_brazilian ] = "Alinhar %O" ;
+ Text [ portuguese ] = "Alinhar %O para cima" ;
+ Text [ finnish ] = "Tasaa %O" ;
+ Text [ danish ] = "Juster %O til toppen" ;
+ Text [ french ] = "Aligner %O à l'en-tête" ;
+ Text [ swedish ] = "Justera %O mot överkant" ;
+ Text [ dutch ] = "%O op bovenkant uitlijnen" ;
+ Text [ spanish ] = "Alinear %O arriba" ;
+ Text [ english_us ] = "Align %O to top" ;
+ Text[ chinese_simplified ] = "%O ÏòÉ϶ÔÆë";
+ Text[ russian ] = "Âûðîâíÿòü %O ïî âåðõíåìó êðàþ";
+ Text[ polish ] = "Wyrównaj %O do góry";
+ Text[ japanese ] = "%O‚ð㑵‚¦";
+ Text[ chinese_traditional ] = "%O ¦V¤W¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ %O Åáì ÃÚáì";
+ Text[ dutch ] = "%O op bovenkant uitlijnen";
+ Text[ chinese_simplified ] = "%O ÏòÉ϶ÔÆë";
+ Text[ greek ] = "Óôïß÷éóç %O ðñïò ôá ðÜíù";
+ Text[ korean ] = "%O À§·Î ¸ÂÃã";
+ Text[ turkish ] = "Yukarý doðru hizala: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditAlignVBottom
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O fußbündig ausrichten : %O fu˜b³ndig ausrichten */
+ /* ### ACHTUNG: Neuer Text in Resource? %O fußbündig ausrichten : %O fu˜b³ndig ausrichten */
+ Text = "%O fußbündig ausrichten" ;
+ Text [ ENGLISH ] = "Align %O" ;
+ Text [ norwegian ] = "Juster %O" ;
+ Text [ italian ] = "Allinea %O in basso" ;
+ Text [ portuguese_brazilian ] = "Alinhar %O" ;
+ Text [ portuguese ] = "Alinhar %O para baixo" ;
+ Text [ finnish ] = "Tasaa %O" ;
+ Text [ danish ] = "Juster %O til bunden" ;
+ Text [ french ] = "Aligner %O au pied de page " ;
+ Text [ swedish ] = "Justera %O mot nederkant" ;
+ Text [ dutch ] = "%O op onderkant uitlijnen" ;
+ Text [ spanish ] = "Alinear %O al pie" ;
+ Text [ english_us ] = "Align %O to bottom" ;
+ Text[ chinese_simplified ] = "%O Ïò϶ÔÆë";
+ Text[ russian ] = "Âûðîâíÿòü %O ïî íèæíåìó êðàþ";
+ Text[ polish ] = "Wyrównaj %O do do³u";
+ Text[ japanese ] = "%O‚ð‰º‘µ‚¦";
+ Text[ chinese_traditional ] = "%O ¦V¤U¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ %O Åáì ÃÓÝá";
+ Text[ dutch ] = "%O op onderkant uitlijnen";
+ Text[ chinese_simplified ] = "%O Ïò϶ÔÆë";
+ Text[ greek ] = "Óôïß÷éóç %O ðñïò ôá êÜôù";
+ Text[ korean ] = "%O ¾Æ·¡·Î ¸ÂÃã";
+ Text[ turkish ] = "Aþaðý doðru hizala: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditAlignVCenter
+{
+ Text = "%O horizontal zentrieren" ;
+ Text [ ENGLISH ] = "Center %O horizontal" ;
+ Text [ norwegian ] = "Midtstill %O horisontal" ;
+ Text [ italian ] = "Centra %O orizzontalmente" ;
+ Text [ portuguese_brazilian ] = "Centralizar %O horizontalmente" ;
+ Text [ portuguese ] = "Centrar %O na horizontal" ;
+ Text [ finnish ] = "Keskitä %O vaakasuunnassa" ;
+ Text [ danish ] = "Centrer %O vandret" ;
+ Text [ french ] = "Centrer %O horizontalement" ;
+ Text [ swedish ] = "%O horisontellt centrerad" ;
+ Text [ dutch ] = "%O horizontaal centreren" ;
+ Text [ spanish ] = "Centrar %O horizontalmente" ;
+ Text [ english_us ] = "Horizontally center %O" ;
+ Text[ chinese_simplified ] = "%O ˮƽ¶ÔÆë";
+ Text[ russian ] = "Öåíòðèðîâàòü %O ïî ãîðèçîíòàëè";
+ Text[ polish ] = "Wyœrodkuj %O w poziomie";
+ Text[ japanese ] = "%O‚ð…•½‚É’†‰›";
+ Text[ chinese_traditional ] = "%O ¤ô¥­¹ï»ô";
+ Text[ arabic ] = "ÊæÓíØ%O ÃÝÞíÇð";
+ Text[ dutch ] = "%O horizontaal centreren";
+ Text[ chinese_simplified ] = "%O ˮƽ¶ÔÆë";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá ïñéæüíôéá %O";
+ Text[ korean ] = "%O ¼öÆò °¡¿îµ¥ ¸ÂÃã";
+ Text[ turkish ] = "Yatay ortala: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditAlignHLeft
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O linksbündig ausrichten : %O linksb³ndig ausrichten */
+ /* ### ACHTUNG: Neuer Text in Resource? %O linksbündig ausrichten : %O linksb³ndig ausrichten */
+ Text = "%O linksbündig ausrichten" ;
+ Text [ ENGLISH ] = "Align %O" ;
+ Text [ norwegian ] = "Juster %O" ;
+ Text [ italian ] = "Allinea %O a sinistra" ;
+ Text [ portuguese_brazilian ] = "Alinhar %O" ;
+ Text [ portuguese ] = "Alinhar %O à esquerda" ;
+ Text [ finnish ] = "Tasaa %O" ;
+ Text [ danish ] = "Venstrejuster %O" ;
+ Text [ french ] = "Aligner %O à gauche" ;
+ Text [ swedish ] = "Justera %O mot vänsterkant" ;
+ Text [ dutch ] = "%O op links uitlijnen" ;
+ Text [ spanish ] = "Alinear %O a la izquierda" ;
+ Text [ english_us ] = "Align %O left" ;
+ Text[ chinese_simplified ] = "%O ×ó¶ÔÆë";
+ Text[ russian ] = "Âûðîâíÿòü %O ïî ëåâîìó êðàþ";
+ Text[ polish ] = "Wyrównaj %O do lewej";
+ Text[ japanese ] = "%O‚𶑵‚¦";
+ Text[ chinese_traditional ] = "%O ¥ª¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ %O Åáì ÇáíÓÇÑ";
+ Text[ dutch ] = "%O op links uitlijnen";
+ Text[ chinese_simplified ] = "%O ×ó¶ÔÆë";
+ Text[ greek ] = "Óôïß÷éóç %O áñéóôåñÜ";
+ Text[ korean ] = "%O ¿ÞÂÊÀ¸·Î ¸ÂÃã";
+ Text[ turkish ] = "Sola hizala: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditAlignHRight
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O rechtsbündig ausrichten : %O rechtsb³ndig ausrichten */
+ /* ### ACHTUNG: Neuer Text in Resource? %O rechtsbündig ausrichten : %O rechtsb³ndig ausrichten */
+ Text = "%O rechtsbündig ausrichten" ;
+ Text [ ENGLISH ] = "Align %O" ;
+ Text [ norwegian ] = "Juster %O" ;
+ Text [ italian ] = "Allinea %O a destra" ;
+ Text [ portuguese_brazilian ] = "Alinhar %O" ;
+ Text [ portuguese ] = "Alinhar %O à direita" ;
+ Text [ finnish ] = "Tasaa %O" ;
+ Text [ danish ] = "Højrejuster %O" ;
+ Text [ french ] = "Aligner %O à droite" ;
+ Text [ swedish ] = "Justera %O mot högerkant" ;
+ Text [ dutch ] = "%O op rechts uitlijnen" ;
+ Text [ spanish ] = "Alinear %O a la derecha" ;
+ Text [ english_us ] = "Align %O right" ;
+ Text[ chinese_simplified ] = "%O ÓÒ¶ÔÆë";
+ Text[ russian ] = "Âûðîâíÿòü %O ïî ïðàâîìó êðàþ";
+ Text[ polish ] = "Wyrównaj %O do prawej";
+ Text[ japanese ] = "%O‚ð‰E‘µ‚¦";
+ Text[ chinese_traditional ] = "%O ¥k¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ %O Åáì Çáíãíä";
+ Text[ dutch ] = "%O op rechts uitlijnen";
+ Text[ chinese_simplified ] = "%O ÓÒ¶ÔÆë";
+ Text[ greek ] = "Óôïß÷éóç %O äåîéÜ";
+ Text[ korean ] = "%O ¿À¸¥ÂÊÀ¸·Î ¸ÂÃã";
+ Text[ turkish ] = "Saða hizala: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditAlignHCenter
+{
+ Text = "%O vertikal zentrieren" ;
+ Text [ ENGLISH ] = "Center %O vertical" ;
+ Text [ norwegian ] = "Midtstill %O vertikal" ;
+ Text [ italian ] = "Centra %O verticalmente" ;
+ Text [ portuguese_brazilian ] = "Centralizar %O verticalmente" ;
+ Text [ portuguese ] = "Centrar %O na vertical" ;
+ Text [ finnish ] = "Keskitä %O pystysuunnassa" ;
+ Text [ danish ] = "Centrer %O lodret" ;
+ Text [ french ] = "Centrer %O verticalement" ;
+ Text [ swedish ] = "%O vertikalt centrerad" ;
+ Text [ dutch ] = "%O verticaal centreren" ;
+ Text [ spanish ] = "Centrar %O verticalmente" ;
+ Text [ english_us ] = "Vertically center %O" ;
+ Text[ chinese_simplified ] = "%O ´¹Ö±¾ÓÖÐ";
+ Text[ russian ] = "Öåíòðèðîâàòü %O ïî âåðòèêàëè";
+ Text[ polish ] = "Wyœrodkuj %O w pionie";
+ Text[ japanese ] = "%O‚ð‚’¼‚É’†‰›";
+ Text[ chinese_traditional ] = "%O ««ª½¸m¤¤";
+ Text[ arabic ] = "ÊæÓíØ %O ÚãæÏíÇð";
+ Text[ dutch ] = "%O verticaal centreren";
+ Text[ chinese_simplified ] = "%O ´¹Ö±¾ÓÖÐ";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá êáôáêüñõöá %O";
+ Text[ korean ] = "%O ¼öÁ÷ °¡¿îµ¥ ¸ÂÃã";
+ Text[ turkish ] = "Dikey ortala: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditAlignCenter
+{
+ Text = "%O zentrieren" ;
+ Text [ ENGLISH ] = "Center %O" ;
+ Text [ norwegian ] = "Midtstill %O" ;
+ Text [ italian ] = "Centra %O" ;
+ Text [ portuguese_brazilian ] = "Centralizar %O" ;
+ Text [ portuguese ] = "Centrar %O" ;
+ Text [ finnish ] = "Keskitä %O" ;
+ Text [ danish ] = "Centrer %O" ;
+ Text [ french ] = "Centrer %O" ;
+ Text [ swedish ] = "Centrera %O" ;
+ Text [ dutch ] = "%O centreren" ;
+ Text [ spanish ] = "Centrar %O" ;
+ Text [ english_us ] = "Center %O" ;
+ Text[ chinese_simplified ] = "%O ¾ÓÖÐ";
+ Text[ russian ] = "Öåíòðèðîâàòü %O";
+ Text[ polish ] = "Wyœrodkuj %O";
+ Text[ japanese ] = "%O‚𒆉›‘µ‚¦";
+ Text[ chinese_traditional ] = "%O ¸m¤¤";
+ Text[ arabic ] = "ÊæÓíØ %O";
+ Text[ dutch ] = "%O centreren";
+ Text[ chinese_simplified ] = "%O ¾ÓÖÐ";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá %O";
+ Text[ korean ] = "%O °¡¿îµ¥ ¸ÂÃã";
+ Text[ turkish ] = "Ortala: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditTransform
+{
+ Text = "%O transformieren" ;
+ Text [ ENGLISH ] = "Transform %O" ;
+ Text [ norwegian ] = "Omform %O" ;
+ Text [ italian ] = "Trasforma %O" ;
+ Text [ portuguese_brazilian ] = "Transformar %O" ;
+ Text [ portuguese ] = "Transformar %O" ;
+ Text [ finnish ] = "Transformoi %O" ;
+ Text [ danish ] = "Transformer %O" ;
+ Text [ french ] = "Transformer %O" ;
+ Text [ swedish ] = "Omvandla %O" ;
+ Text [ dutch ] = "%O transformeren" ;
+ Text [ spanish ] = "Transformar %O" ;
+ Text [ english_us ] = "Transform %O" ;
+ Text[ chinese_simplified ] = "ת»» %O";
+ Text[ russian ] = "Ïðåîáðàçîâàòü %O";
+ Text[ polish ] = "Przekszta³æ %O";
+ Text[ japanese ] = "%O‚ð•Ï‚¦‚é";
+ Text[ chinese_traditional ] = "Âà´« %O";
+ Text[ arabic ] = "ÊÍæíá %O";
+ Text[ dutch ] = "%O transformeren";
+ Text[ chinese_simplified ] = "ת»» %O";
+ Text[ greek ] = "Ìåôáó÷çìáôéóìüò %O";
+ Text[ korean ] = "%O º¯Çü";
+ Text[ turkish ] = "Dönüþtür: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditCombine_PolyPoly
+{
+ Text = "%O kombinieren" ;
+ Text [ ENGLISH ] = "Combine %O" ;
+ Text [ portuguese ] = "Combinar %O" ;
+ Text [ english_us ] = "Combine %O" ;
+ Text [ portuguese_brazilian ] = "%O kombinieren" ;
+ Text [ swedish ] = "Kombinera %O" ;
+ Text [ danish ] = "Kombiner %O" ;
+ Text [ italian ] = "Combina %O" ;
+ Text [ spanish ] = "Combinar %O" ;
+ Text [ french ] = "Combiner %O" ;
+ Text [ dutch ] = "%O combineren" ;
+ Text[ chinese_simplified ] = "×éºÏ %O";
+ Text[ russian ] = "Êîìáèíèðîâàòü %O";
+ Text[ polish ] = "Kombinuj %O";
+ Text[ japanese ] = "%O‚ðŒ‹‡";
+ Text[ chinese_traditional ] = "%O ¦X¨Ö";
+ Text[ arabic ] = "ÊæÝíÞ %O";
+ Text[ dutch ] = "%O combineren";
+ Text[ chinese_simplified ] = "×éºÏ %O";
+ Text[ greek ] = "Óõíäõáóìüò %O";
+ Text[ korean ] = "%O Á¶ÇÕ";
+ Text[ turkish ] = "Birleþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditMergeMergePoly
+{
+ Text = "%O verschmelzen" ;
+ Text [ ENGLISH ] = "Merge %O" ;
+ Text[ english_us ] = "Merge %O";
+ Text[ portuguese ] = "Unir %O";
+ Text[ russian ] = "Ñîåäèíèòü %O";
+ Text[ greek ] = "Óõã÷þíåõóç %O";
+ Text[ dutch ] = "Merge %O";
+ Text[ french ] = "Fusionner %O";
+ Text[ spanish ] = "Unir %O";
+ Text[ italian ] = "Unisci %O";
+ Text[ danish ] = "Føj %O sammen";
+ Text[ swedish ] = "Sammansmält %O";
+ Text[ polish ] = "Scal %O";
+ Text[ portuguese_brazilian ] = "Merge %O";
+ Text[ japanese ] = "%O‚ð‡‚킹‚Ä1‚‚ɂ·‚é";
+ Text[ korean ] = "%O º´ÇÕ";
+ Text[ chinese_simplified ] = "ÈÚºÏ %O";
+ Text[ chinese_traditional ] = "¦X¦} %O";
+ Text[ arabic ] = "ÏãÌ %O";
+ Text[ turkish ] = "Birleþtir: %O";
+};
+String STR_EditMergeSubstractPoly
+{
+ Text = "%O subtrahieren" ;
+ Text [ ENGLISH ] = "Substract %O" ;
+ Text[ english_us ] = "Subtract %O";
+ Text[ portuguese ] = "Subtrair %O";
+ Text[ russian ] = "Îòíÿòü %O";
+ Text[ greek ] = "Áöáßñåóç %O";
+ Text[ dutch ] = "Subtract %O";
+ Text[ french ] = "Soustraire %O";
+ Text[ spanish ] = "Substraer %O";
+ Text[ italian ] = "Sottrai %O";
+ Text[ danish ] = "Træk %O fra";
+ Text[ swedish ] = "Dra ifrån %O";
+ Text[ polish ] = "Odejmij %O";
+ Text[ portuguese_brazilian ] = "Substract %O";
+ Text[ japanese ] = "%O‚ð1‚‚ɂµ‚½‚à‚Ì‚©‚ç‚Ü‚½ŠO‚·";
+ Text[ korean ] = "%O °¨»ê";
+ Text[ chinese_simplified ] = "·ÖÀë %O";
+ Text[ chinese_traditional ] = "´î¤Ö %O";
+ Text[ arabic ] = "ØÑÍ %O";
+ Text[ turkish ] = "%O çýkart";
+};
+String STR_EditMergeIntersectPoly
+{
+ Text = "%O schneiden" ;
+ Text [ ENGLISH ] = "Intersect %O" ;
+ Text[ english_us ] = "Intersect %O";
+ Text[ portuguese ] = "Intersectar %O";
+ Text[ russian ] = "Îòðåçàòü %O";
+ Text[ greek ] = "ÔïìÞ %O";
+ Text[ dutch ] = "Intersect %O";
+ Text[ french ] = "Intersecter %O";
+ Text[ spanish ] = "Cortar %O";
+ Text[ italian ] = "Interseca %O";
+ Text[ danish ] = "Skær %O af";
+ Text[ swedish ] = "Skär av %O";
+ Text[ polish ] = "Odetnij %O";
+ Text[ portuguese_brazilian ] = "Intersect %O";
+ Text[ japanese ] = "%O‚̈ꕔ‚ðØ‚èŽæ‚é";
+ Text[ korean ] = "%O ±³Â÷";
+ Text[ chinese_simplified ] = "%O ¼ô³ý";
+ Text[ chinese_traditional ] = "°£¥h %O";
+ Text[ arabic ] = "ÔØÑ %O";
+ Text[ turkish ] = "%O kes";
+};
+String STR_DistributeMarkedObjects
+{
+ Text = "Objekte der Auswahl verteilen" ;
+ Text [ ENGLISH ] = "Distribute selection" ;
+ Text[ english_us ] = "Distribute selected objects";
+ Text[ portuguese ] = "Distribuir objectos seleccionados";
+ Text[ russian ] = "Ðàñïðåäåëèòü âûáðàííûå îáúåêòû";
+ Text[ greek ] = "ÊáôáíïìÞ ôùí áíôéêåéìÝíùí ôçò åðéëïãÞò";
+ Text[ dutch ] = "Geselecteerde objecten verdelen";
+ Text[ french ] = "Répartir les objets sélectionnés";
+ Text[ spanish ] = "Distribuir objetos de la selección";
+ Text[ italian ] = "Distribuisci gli oggetti della selezione";
+ Text[ danish ] = "Distribuer de udvalgte objekter";
+ Text[ swedish ] = "Fördela utvalda objekt";
+ Text[ polish ] = "Rozdziel wybrane obiekty";
+ Text[ portuguese_brazilian ] = "Distribute selection";
+ Text[ japanese ] = "‘I‘ð‚µ‚½µÌÞ¼Þª¸Ä‚Ì•ª•z";
+ Text[ korean ] = "¼±Åà °³Ã¼ ¹èºÐ";
+ Text[ chinese_simplified ] = "·ÖÅäÑ¡ÖеĶÔÏó";
+ Text[ chinese_traditional ] = "¤À¥¬¿ï¾Üªºª«¥ó";
+ Text[ arabic ] = "ÊæÒíÚ ÇáßÇÆäÇÊ ÇáãÍÏÏÉ";
+ Text[ turkish ] = "Seçilen nesneleri daðýt";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditCombine_OnePoly
+{
+ Text = "%O verbinden" ;
+ Text [ ENGLISH ] = "+++Combine %O" ;
+ Text [ portuguese ] = "Ligar %O" ;
+ Text [ english_us ] = "Combine %O" ;
+ Text [ portuguese_brazilian ] = "%O verbinden" ;
+ Text [ swedish ] = "Förbind %O" ;
+ Text [ danish ] = "Forbind %O" ;
+ Text [ italian ] = "Collega %O" ;
+ Text [ spanish ] = "Enlazar %O" ;
+ Text [ french ] = "Relier %O" ;
+ Text [ dutch ] = "%O combineren" ;
+ Text[ chinese_simplified ] = "%O ºÏ²¢";
+ Text[ russian ] = "Ñîåäèíèòü %O";
+ Text[ polish ] = "Po³¹cz %O";
+ Text[ japanese ] = "%O‚ðŒ‹‡";
+ Text[ chinese_traditional ] = "%O ¦X¨Ö";
+ Text[ arabic ] = "ÑÈØ %O";
+ Text[ dutch ] = "%O combineren";
+ Text[ chinese_simplified ] = "%O ºÏ²¢";
+ Text[ greek ] = "Óýíäåóç %O";
+ Text[ korean ] = "%O °áÇÕ";
+ Text[ turkish ] = "Baðlantý oluþtur: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditDismantle_Polys
+{
+ Text = "Kombination von %O aufheben" ;
+ Text [ ENGLISH ] = "Dismantle %O" ;
+ Text [ portuguese ] = "Remover combinação de %O" ;
+ Text [ english_us ] = "Split %O" ;
+ Text [ portuguese_brazilian ] = "Kombination von %O aufheben" ;
+ Text [ swedish ] = "Upphäv kombination för %O" ;
+ Text [ danish ] = "Ophæv kombination af %O" ;
+ Text [ italian ] = "Elimina la combinazione di %O" ;
+ Text [ spanish ] = "Deshacer combinación de %O" ;
+ Text [ french ] = "Dissocier combinaison de %O" ;
+ Text [ dutch ] = "Combinatie van %0 opheffen" ;
+ Text[ chinese_simplified ] = "·Ö¿ª %O µÄ×éºÏ";
+ Text[ russian ] = "Ñíÿòü êîìáèíàöèþ %O";
+ Text[ polish ] = "Usuñ kombinacjê z %O";
+ Text[ japanese ] = "%O‚ÌŒ‹‡‚ð‰ðœ";
+ Text[ chinese_traditional ] = "¤À¶} %O ªº²Õ¦X";
+ Text[ arabic ] = "ÅÒÇáÉ ÇÊÍÇÏ %O";
+ Text[ dutch ] = "Combinatie van %0 opheffen";
+ Text[ chinese_simplified ] = "·Ö¿ª %O µÄ×éºÏ";
+ Text[ greek ] = "ÊáôÜñãçóç óõíäõáóìïý %O";
+ Text[ korean ] = "%OÀÇ Á¶ÇÕ ÇØÁ¦";
+ Text[ turkish ] = "Kombinasyonu kaldýr: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditDismantle_Lines
+{
+ Text = "%O aufbrechen" ;
+ Text [ ENGLISH ] = "Dismantle %O" ;
+ Text [ portuguese ] = "Subdividir %O" ;
+ Text [ english_us ] = "Split %O" ;
+ Text [ portuguese_brazilian ] = "%O aufbrechen" ;
+ Text [ swedish ] = "Bryt upp %O" ;
+ Text [ danish ] = "Opdel %O" ;
+ Text [ italian ] = "Separa %O" ;
+ Text [ spanish ] = "%O dividir" ;
+ Text [ french ] = "Fractionner %O" ;
+ Text [ dutch ] = "%O splitsen" ;
+ Text[ chinese_simplified ] = "·Ö¿ª %O";
+ Text[ russian ] = "Ðàçáèòü %O";
+ Text[ polish ] = "Rozdziel %O";
+ Text[ japanese ] = "%O‚𕪊„";
+ Text[ chinese_traditional ] = "¤À¶} %O";
+ Text[ arabic ] = "ÊÞÓíã %O";
+ Text[ dutch ] = "%O splitsen";
+ Text[ chinese_simplified ] = "·Ö¿ª %O";
+ Text[ greek ] = "Èñáýóç %O";
+ Text[ korean ] = "%O ºÐÇÒ";
+ Text[ turkish ] = "Ayýr: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditImportMtf
+{
+ Text = "%O aufbrechen" ;
+ Text [ ENGLISH ] = "Dismantle %O" ;
+ Text [ portuguese ] = "Subdividir %O" ;
+ Text [ english_us ] = "Split %O" ;
+ Text [ portuguese_brazilian ] = "%O aufbrechen" ;
+ Text [ swedish ] = "Bryt upp %O" ;
+ Text [ danish ] = "Opdel %O" ;
+ Text [ italian ] = "Separa %O" ;
+ Text [ spanish ] = "Dividir %O" ;
+ Text [ french ] = "Fractionner %O" ;
+ Text [ dutch ] = "%O splitsen" ;
+ Text[ chinese_simplified ] = "·Ö¿ª %O";
+ Text[ russian ] = "Ðàçáèòü %O";
+ Text[ polish ] = "Rozdziel %O";
+ Text[ japanese ] = "%O‚Ì•ªŠ„";
+ Text[ chinese_traditional ] = "¤À¶} %O";
+ Text[ arabic ] = "ÊÞÓíã %O";
+ Text[ dutch ] = "%O splitsen";
+ Text[ chinese_simplified ] = "·Ö¿ª %O";
+ Text[ greek ] = "Èñáýóç %O";
+ Text[ korean ] = "%O ºÐÇÒ";
+ Text[ turkish ] = "Ayýr: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_EditImportSGV
+{
+ Text = "StarDraw Dos Zeichnung importieren" ;
+};
+String STR_EditImportHPGL
+{
+ Text = "HPGL importieren" ;
+};
+String STR_EditImportDXF
+{
+ Text = "DXF importieren" ;
+};
+String STR_ExchangePaste
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Objekt(e) einfügen : Objekt(e) einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Objekt(e) einfügen : Objekt(e) einf³gen */
+ Text = "Objekt(e) einfügen" ;
+ Text [ ENGLISH ] = "Paste object(s)" ;
+ Text [ norwegian ] = "Lim inn objekt(er)" ;
+ Text [ italian ] = "Incolla oggetti" ;
+ Text [ portuguese_brazilian ] = "Colar objeto(s)" ;
+ Text [ portuguese ] = "Inserir objecto(s)" ;
+ Text [ finnish ] = "Liitä objekteja" ;
+ Text [ danish ] = "Indsæt objekt(er)" ;
+ Text [ french ] = "Insérer le(s) objet(s)" ;
+ Text [ swedish ] = "Infoga objekt" ;
+ Text [ dutch ] = "Object(en) plakken" ;
+ Text [ spanish ] = "Pegar objeto(s)" ;
+ Text [ english_us ] = "Insert object(s)" ;
+ Text[ chinese_simplified ] = "²åÈë¶ÔÏó";
+ Text[ russian ] = "Âñòàâèòü îáúåêò(û)";
+ Text[ polish ] = "Wstaw obiekt (y)";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤Jª«¥ó";
+ Text[ arabic ] = "ÅÏÑÇÌ ßÇÆä (ßÇÆäÇÊ)";
+ Text[ dutch ] = "Object(en) plakken";
+ Text[ chinese_simplified ] = "²åÈë¶ÔÏó";
+ Text[ greek ] = "ÅéóáãùãÞ áíôéêåéìÝíïõ/-ùí";
+ Text[ korean ] = "°³Ã¼ »ðÀÔ";
+ Text[ turkish ] = "Nesne ekle";
+ Text[ language_user1 ] = " ";
+};
+String STR_ExchangeClpCut
+{
+ Text = "%O ausschneiden" ;
+ Text [ ENGLISH ] = "Cut %O" ;
+ Text [ norwegian ] = "Klipp ut %O" ;
+ Text [ italian ] = "Taglia %O" ;
+ Text [ portuguese_brazilian ] = "Cortar %O" ;
+ Text [ portuguese ] = "Cortar %O" ;
+ Text [ finnish ] = "Leikkaa %O" ;
+ Text [ danish ] = "Klip %O" ;
+ Text [ french ] = "Couper %O" ;
+ Text [ swedish ] = "Klipp ut %O" ;
+ Text [ dutch ] = "%O knippen" ;
+ Text [ spanish ] = "Recortar %O" ;
+ Text [ english_us ] = "Cut %O" ;
+ Text[ chinese_simplified ] = "¼ô³ý %O";
+ Text[ russian ] = "Âûðåçàòü %O";
+ Text[ polish ] = "Wytnij %O";
+ Text[ japanese ] = "%O‚ðØ‚èŽæ‚é";
+ Text[ chinese_traditional ] = "°Å¤U %O";
+ Text[ arabic ] = "ÞÕ %O";
+ Text[ dutch ] = "%O knippen";
+ Text[ chinese_simplified ] = "¼ô³ý %O";
+ Text[ greek ] = "ÁðïêïðÞ %O";
+ Text[ korean ] = "%O À߶󳻱â";
+ Text[ turkish ] = "Kes: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_ExchangeClpPaste
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Zwischenablage einfügen : Zwischenablage einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zwischenablage einfügen : Zwischenablage einf³gen */
+ Text = "Zwischenablage einfügen" ;
+ Text [ ENGLISH ] = "Paste clipboard" ;
+ Text [ norwegian ] = "Lim inn Utklippstavle" ;
+ Text [ italian ] = "Incolla Appunti" ;
+ Text [ portuguese_brazilian ] = "Colar clipboard" ;
+ Text [ portuguese ] = "Colar conteúdo da Área de Transferência" ;
+ Text [ finnish ] = "Liitä leikepöydältä" ;
+ Text [ danish ] = "Indsæt udklipsholder" ;
+ Text [ french ] = "Coller le contenu du presse-papiers" ;
+ Text [ swedish ] = "Klistra in innehållet i urklippet" ;
+ Text [ dutch ] = "Inhoud van het Klembord plakken" ;
+ Text [ spanish ] = "Pegar contenido del portapapeles" ;
+ Text [ english_us ] = "Paste Clipboard" ;
+ Text[ chinese_simplified ] = "²åÈë¼ôÌù°åÄÚÈÝ";
+ Text[ russian ] = "Âñòàâèòü áóôåð îáìåíà";
+ Text[ polish ] = "Wklej schowek";
+ Text[ japanese ] = "¸Ø¯ÌßÎÞ°ÄÞ‚Ì“\\‚è•t‚¯";
+ Text[ chinese_traditional ] = "´¡¤J°Å¶K鷺®e";
+ Text[ arabic ] = "áÕÞ ÇáÍÇÝÙÉ";
+ Text[ dutch ] = "Inhoud van het Klembord plakken";
+ Text[ chinese_simplified ] = "²åÈë¼ôÌù°åÄÚÈÝ";
+ Text[ greek ] = "Åðéêüëëçóç Clipboard";
+ Text[ korean ] = "Ŭ¸³º¸µå ºÙ¿©³Ö±â";
+ Text[ turkish ] = "Pano içeriðini yapýþtýr";
+ Text[ language_user1 ] = " ";
+};
+String STR_ExchangeDD
+{
+ Text = "Drag&Drop %O" ;
+ Text [ ENGLISH ] = "Drag&Drop %O" ;
+ Text [ norwegian ] = "Dra og Slipp %O" ;
+ Text [ italian ] = "Trascina&Rilascia %O" ;
+ Text [ portuguese_brazilian ] = "Arrastar e Soltar %O" ;
+ Text [ portuguese ] = "Arrastar & Largar %O" ;
+ Text [ finnish ] = "Vedä & pudota %O" ;
+ Text [ danish ] = "Træk-og-slip %O" ;
+ Text [ french ] = "Glisser-Déposer %O" ;
+ Text [ swedish ] = "Dra-och-släpp %O" ;
+ Text [ dutch ] = "Slepen&neerzetten %O" ;
+ Text [ spanish ] = "Arrastrar y colocar %O" ;
+ Text [ english_us ] = "Drag and Drop %O" ;
+ Text[ chinese_simplified ] = "ÍÏ·Å %O";
+ Text[ russian ] = "Ïåðåòàùèòü %O";
+ Text[ polish ] = "Przeci¹gnij i upuœæ %O";
+ Text[ japanese ] = "%O‚ÌÄÞׯ¸Þ&ÄÞÛ¯Ìß";
+ Text[ chinese_traditional ] = "©ì¦² %O";
+ Text[ arabic ] = "ÓÍÈ æ ÅÓÞÇØ %O";
+ Text[ dutch ] = "Slepen&neerzetten %O";
+ Text[ chinese_simplified ] = "ÍÏ·Å %O";
+ Text[ greek ] = "Ìåôáêßíçóç êáé Aðüèåóç %O";
+ Text[ korean ] = "%O µå·¡±× ¾Ø µå·Ó";
+ Text[ turkish ] = "Sürükle ve býrak: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_ExchangeDDPaste
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Drag&Drop einfügen : Drag&Drop einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Drag&Drop einfügen : Drag&Drop einf³gen */
+ Text = "Drag&Drop einfügen" ;
+ Text [ ENGLISH ] = "Paste Drag&Drop" ;
+ Text [ norwegian ] = "Lim inn Dra og Slipp" ;
+ Text [ italian ] = "Incolla Trascina&Rilascia" ;
+ Text [ portuguese_brazilian ] = "Colar Arrastar e Soltar" ;
+ Text [ portuguese ] = "Inserir Arrastar & Largar" ;
+ Text [ finnish ] = "Liitä veto & pudotus" ;
+ Text [ danish ] = "Indsæt træk-og-slip" ;
+ Text [ french ] = "Coller Glisser-Déposer" ;
+ Text [ swedish ] = "Infoga dra-och-släpp" ;
+ Text [ dutch ] = "Plakken via slepen&neerzetten" ;
+ Text [ spanish ] = "Insertar arrastrar y colocar" ;
+ Text [ english_us ] = "Insert Drag and Drop" ;
+ Text[ chinese_simplified ] = "²åÈëÍÏ·ÅÄÚÈÝ";
+ Text[ russian ] = "Âñòàâèòü ðåæèì ïåðåòàñêèâàíèÿ";
+ Text[ polish ] = "Wstaw Przeci¹gnij i upuœæ";
+ Text[ japanese ] = "ÄÞׯ¸Þ&ÂÞÛ¯Ìß‚ð‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤J©ì¦²¤º®e";
+ Text[ arabic ] = "ÅÏÑÇÌ ÓÍÈ æ ÅÓÞÇØ";
+ Text[ dutch ] = "Plakken via slepen&neerzetten";
+ Text[ chinese_simplified ] = "²åÈëÍÏ·ÅÄÚÈÝ";
+ Text[ greek ] = "ÅéóáãùãÞ 'Ìåôáêßíçóç êáé Aðüèåóç'";
+ Text[ korean ] = "µå·¡±× ¾Ø µå·Ó »ðÀÔ";
+ Text[ turkish ] = "Sürükle ve býrak iþleviyle ekle";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragInsertPoint
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Punkt in %O einfügen : Punkt in %O einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Punkt in %O einfügen : Punkt in %O einf³gen */
+ Text = "Punkt in %O einfügen" ;
+ Text [ ENGLISH ] = "Insert point to %O" ;
+ Text [ norwegian ] = "Sett inn punkt til %O" ;
+ Text [ italian ] = "Inserisci punto a %O" ;
+ Text [ portuguese_brazilian ] = "Inserir ponto a %O" ;
+ Text [ portuguese ] = "Inserir ponto em %O" ;
+ Text [ finnish ] = "Lisää piste objektiin %O" ;
+ Text [ danish ] = "Indsæt punkt i %O" ;
+ Text [ french ] = "Insérer un point dans %O" ;
+ Text [ swedish ] = "Infoga punkt i %O" ;
+ Text [ dutch ] = "Punt in %O invoegen" ;
+ Text [ spanish ] = "Insertar punto en %O" ;
+ Text [ english_us ] = "Insert point to %O" ;
+ Text[ chinese_simplified ] = "ÔÚ%O ²åÈë½Óµã";
+ Text[ russian ] = "Âñòàâèòü òî÷êó â %O";
+ Text[ polish ] = "Wstaw punkt do %O";
+ Text[ japanese ] = "%O‚ÉÎß²ÝÄ‚ð‘}“ü";
+ Text[ chinese_traditional ] = "¦b%O ´¡¤J±µÂI";
+ Text[ arabic ] = "ÅÏÑÇÌ äÞØÉ Ýí %O";
+ Text[ dutch ] = "Punt in %O invoegen";
+ Text[ chinese_simplified ] = "ÔÚ%O ²åÈë½Óµã";
+ Text[ greek ] = "ÅéóáãùãÞ óçìåßïõ óôï %O";
+ Text[ korean ] = "Á¡À» %O·Î »ðÀÔ";
+ Text[ turkish ] = "Nokta ekle: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragInsertGluePoint
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Klebepunkt in %O einfügen : Klebepunkt in %O einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Klebepunkt in %O einfügen : Klebepunkt in %O einf³gen */
+ Text = "Klebepunkt in %O einfügen" ;
+ Text [ ENGLISH ] = "Insert glue-point to %O" ;
+ Text [ portuguese ] = "Inserir ponto de colagem em %O" ;
+ Text [ english_us ] = "Insert glue point to %O" ;
+ Text [ portuguese_brazilian ] = "Klebepunkt in %O einfügen" ;
+ Text [ swedish ] = "Infoga fästpunkt för %O" ;
+ Text [ danish ] = "Indsæt klæbepunkt i %O" ;
+ Text [ italian ] = "Inserisci punto di incollaggio in %O" ;
+ Text [ spanish ] = "Añadir punto de adhesión en %O" ;
+ Text [ french ] = "Insérer un point de collage dans %O" ;
+ Text [ dutch ] = "Plakpunt in %0 invoegen" ;
+ Text[ chinese_simplified ] = "ÔÚ %O ´¦²åÈëÕ³½áµã";
+ Text[ russian ] = "Âñòàâèòü òî÷êó ñîåäèíåíèÿ â %O";
+ Text[ polish ] = "Wstaw punkt sklejania do %O";
+ Text[ japanese ] = "%O‚ÉÚ’…“_‚ð‘}“ü";
+ Text[ chinese_traditional ] = "¦b %O ´¡¤J±µÂI";
+ Text[ arabic ] = "ÅÏÑÇÌ äÞØÉ áÕÞ Ýí %O";
+ Text[ dutch ] = "Plakpunt in %0 invoegen";
+ Text[ chinese_simplified ] = "ÔÚ %O ´¦²åÈëÕ³½áµã";
+ Text[ greek ] = "ÅéóáãùãÞ óçìåßïõ êüëëçóçò óå %O";
+ Text[ korean ] = "Á¢ÂøÁ¡À» %O·Î »ðÀÔ";
+ Text[ turkish ] = "Yapýþtýrma noktasý ekle: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethMovHdl
+{
+ Text = "Referenzpunkt verschieben" ;
+ Text [ ENGLISH ] = "Move reference-point" ;
+ Text [ norwegian ] = "Fjern referanse-punkt" ;
+ Text [ italian ] = "Sposta punto di riferimento" ;
+ Text [ portuguese_brazilian ] = "Mover ponto de referência" ;
+ Text [ portuguese ] = "Mover ponto de referência" ;
+ Text [ finnish ] = "Siirrä lähtöpistettä" ;
+ Text [ danish ] = "Flyt referencepunkt" ;
+ Text [ french ] = "Déplacer le point de référence" ;
+ Text [ swedish ] = "Flytta referenspunkt" ;
+ Text [ dutch ] = "Verwijzingspunt verplaatsen" ;
+ Text [ spanish ] = "Desplazar punto de referencia" ;
+ Text [ english_us ] = "Move reference-point" ;
+ Text[ chinese_simplified ] = "Òƶ¯ÒýÓõã";
+ Text[ russian ] = "Ïåðåìåñòèòü òî÷êó îòñ÷åòà";
+ Text[ polish ] = "Przesuñ punkt odniesienia";
+ Text[ japanese ] = "ŽQÆ“_‚̈ړ®";
+ Text[ chinese_traditional ] = "²¾°Ê°Ñ·ÓÂI";
+ Text[ arabic ] = "ÅÒÇÍÉ ÇáäÞØÉ ÇáãÑÌÚíÉ";
+ Text[ dutch ] = "Verwijzingspunt verplaatsen";
+ Text[ chinese_simplified ] = "Òƶ¯ÒýÓõã";
+ Text[ greek ] = "ÌåôáöïñÜ óçìåßïõ áíáöïñÜò";
+ Text[ korean ] = "ÂüÁ¶Á¡ À̵¿";
+ Text[ turkish ] = "Referans noktasýný taþý";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethObjOwn
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O geometrisch verändern : %O geometrisch verõndern */
+ /* ### ACHTUNG: Neuer Text in Resource? %O geometrisch verändern : %O geometrisch verõndern */
+ Text = "%O geometrisch verändern" ;
+ Text [ ENGLISH ] = "Change geometrics of %O" ;
+ Text [ norwegian ] = "Endre geometrien i %O" ;
+ Text [ italian ] = "Cambia %O geometricamente" ;
+ Text [ portuguese_brazilian ] = "Mudar geometria de %O" ;
+ Text [ portuguese ] = "Mudar geometria de %O" ;
+ Text [ finnish ] = "Muuta objektin %O geometriaa" ;
+ Text [ danish ] = "Modificer %O geometrisk" ;
+ Text [ french ] = "Modifier la géométrie de %O" ;
+ Text [ swedish ] = "Ändra %O geometriskt" ;
+ Text [ dutch ] = "Geometrie van %O wijzigen" ;
+ Text [ spanish ] = "Modificar geométricamente %O" ;
+ Text [ english_us ] = "Resize %O" ;
+ Text[ chinese_simplified ] = "%O ¼¸ºÎ¸ü¸Ä";
+ Text[ russian ] = "Èçìåíèòü %O ãåîìåòðè÷åñêè";
+ Text[ polish ] = "Zmieñ geometrycznie %O";
+ Text[ japanese ] = "%O‚ðŠô‰½Šw“I‚É•ÏX";
+ Text[ chinese_traditional ] = "%O ´X¦óÅܧó";
+ Text[ arabic ] = "ÊÛííÑ ÍÌã %O";
+ Text[ dutch ] = "Geometrie van %O wijzigen";
+ Text[ chinese_simplified ] = "%O ¼¸ºÎ¸ü¸Ä";
+ Text[ greek ] = "Ôñïðïðïßçóç ãåùìåôñéêÜ %O";
+ Text[ korean ] = "%O ±âÇÏÇÐÀû Á¶Á¤";
+ Text[ turkish ] = "Geometrik deðiþiklik yap: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethMove
+{
+ Text = "%O verschieben" ;
+ Text [ ENGLISH ] = "Move %O" ;
+ Text [ norwegian ] = "Flytt %O" ;
+ Text [ italian ] = "Sposta %O" ;
+ Text [ portuguese_brazilian ] = "Mover %O" ;
+ Text [ portuguese ] = "Mover %O" ;
+ Text [ finnish ] = "Siirrä %O" ;
+ Text [ danish ] = "Flyt %O" ;
+ Text [ french ] = "Déplacer %O" ;
+ Text [ swedish ] = "Flytta %O" ;
+ Text [ dutch ] = "%O verplaatsen" ;
+ Text [ spanish ] = "Desplazar %O" ;
+ Text [ english_us ] = "Move %O" ;
+ Text[ chinese_simplified ] = "%O ÒѾ­Òƶ¯";
+ Text[ russian ] = "Ïåðåìåñòèòü %O";
+ Text[ polish ] = "Przesuñ %O";
+ Text[ japanese ] = "%O‚ðˆÚ“®";
+ Text[ chinese_traditional ] = "%O ¤w¸g²¾°Ê";
+ Text[ arabic ] = "ÅÒÇÍÉ %O";
+ Text[ dutch ] = "%O verplaatsen";
+ Text[ chinese_simplified ] = "%O ÒѾ­Òƶ¯";
+ Text[ greek ] = "Ìåôáêßíçóç %O";
+ Text[ korean ] = "%O À̵¿";
+ Text[ turkish ] = "Taþý: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethResize
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Größe von %O verändern : Gr÷˜e von %O verõndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Größe von %O verändern : Gr÷˜e von %O verõndern */
+ Text = "Größe von %O verändern" ;
+ Text [ ENGLISH ] = "Resize %O" ;
+ Text [ norwegian ] = "Endre størrelse på %O" ;
+ Text [ italian ] = "Ridimensiona %O" ;
+ Text [ portuguese_brazilian ] = "Redimensionar %O" ;
+ Text [ portuguese ] = "Redimensionar %O" ;
+ Text [ finnish ] = "Muuta objektin %O kokoa" ;
+ Text [ danish ] = "Modificer størrelse på %O" ;
+ Text [ french ] = "Redimensionner %O" ;
+ Text [ swedish ] = "Förändra storleken för %O" ;
+ Text [ dutch ] = "Grootte van %O wijzigen" ;
+ Text [ spanish ] = "Modificar el tamaño de %O" ;
+ Text [ english_us ] = "Resize %O" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä %O ´óС";
+ Text[ russian ] = "Èçìåíèòü ðàçìåð %O";
+ Text[ polish ] = "Zmieñ rozmiar %O";
+ Text[ japanese ] = "%O‚Ì»²½Þ‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧó %O ¤j¤p";
+ Text[ arabic ] = "ÊÛííÑ ÍÌã %O";
+ Text[ dutch ] = "Grootte van %O wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä %O ´óС";
+ Text[ greek ] = "Ôñïðïðïßçóç ìåãÝèïõò %O";
+ Text[ korean ] = "%OÀÇ Å©±â Á¶Á¤";
+ Text[ turkish ] = "Boyutunu deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethRotate
+{
+ Text = "%O drehen" ;
+ Text [ ENGLISH ] = "Rotate %O" ;
+ Text [ norwegian ] = "Roter %O" ;
+ Text [ italian ] = "Ruota %O" ;
+ Text [ portuguese_brazilian ] = "Rotar %O" ;
+ Text [ portuguese ] = "Rodar %O" ;
+ Text [ finnish ] = "Käännä %O" ;
+ Text [ danish ] = "Roter %O" ;
+ Text [ french ] = "Rotation %O" ;
+ Text [ swedish ] = "Rotera %O" ;
+ Text [ dutch ] = "%O draaien" ;
+ Text [ spanish ] = "Rodar %O" ;
+ Text [ english_us ] = "Rotate %O" ;
+ Text[ chinese_simplified ] = "Ðýת %O";
+ Text[ russian ] = "Ïîâåðíóòü %O";
+ Text[ polish ] = "Obróæ %O";
+ Text[ japanese ] = "%O‚ð‰ñ“]";
+ Text[ chinese_traditional ] = "±ÛÂà %O";
+ Text[ arabic ] = "ÇÓÊÏÇÑÉ %O";
+ Text[ dutch ] = "%O draaien";
+ Text[ chinese_simplified ] = "Ðýת %O";
+ Text[ greek ] = "ÐåñéóôñïöÞ %O";
+ Text[ korean ] = "%O ȸÀü";
+ Text[ turkish ] = "Döndür: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethMirrorHori
+{
+ Text = "%O horizontal spiegeln" ;
+ Text [ ENGLISH ] = "Mirror %O horizontal" ;
+ Text [ norwegian ] = "Speil %O horisontal" ;
+ Text [ italian ] = "Rispecchia %O in orizzontale" ;
+ Text [ portuguese_brazilian ] = "Espelhar %O horizontalmente" ;
+ Text [ portuguese ] = "Espelhar %O horizontalmente" ;
+ Text [ finnish ] = "Peilaa %O vaakasuunnassa" ;
+ Text [ danish ] = "Spejlvend %O vandret" ;
+ Text [ french ] = "Refléter %O horizontalement" ;
+ Text [ swedish ] = "Spegla %O horisontellt" ;
+ Text [ dutch ] = "%O horizontaal spiegelen" ;
+ Text [ spanish ] = "Reflejar %O horizontalmente" ;
+ Text [ english_us ] = "Flip %O horizontal" ;
+ Text[ chinese_simplified ] = "%O ˮƽ·½Ïò·´Ó³";
+ Text[ russian ] = "Îòðàçèòü %O ïî ãîðèçîíòàëè";
+ Text[ polish ] = "Przerzuæ %O w poziomie";
+ Text[ japanese ] = "%O‚ð¶‰E‚É”½“]";
+ Text[ chinese_traditional ] = "%O ¤ô¥­¤Ï¬M";
+ Text[ arabic ] = "ÇäÚßÇÓ %O ÃÝÞíÇð";
+ Text[ dutch ] = "%O horizontaal spiegelen";
+ Text[ chinese_simplified ] = "%O ˮƽ·½Ïò·´Ó³";
+ Text[ greek ] = "Êáôüðôñéóç %O ïñéæïíôßùò";
+ Text[ korean ] = "%OÀ» ¼öÆòÀ¸·Î ´ëĪ";
+ Text[ turkish ] = "Yatay yansýt: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethMirrorVert
+{
+ Text = "%O vertikal spiegeln" ;
+ Text [ ENGLISH ] = "Mirror %O vertical" ;
+ Text [ norwegian ] = "Speil %O vertikal" ;
+ Text [ italian ] = "Rispecchia %O in verticale" ;
+ Text [ portuguese_brazilian ] = "Espelhar %O verticalmente" ;
+ Text [ portuguese ] = "Espelhar %O verticalmente" ;
+ Text [ finnish ] = "Peilaa %O pystysuunnassa" ;
+ Text [ danish ] = "Spejlvend %O lodret" ;
+ Text [ french ] = "Refléter %O verticalement" ;
+ Text [ swedish ] = "Spegla %O vertikalt" ;
+ Text [ dutch ] = "%O verticaal spiegelen" ;
+ Text [ spanish ] = "Reflejar %O verticalmente" ;
+ Text [ english_us ] = "Flip %O vertical" ;
+ Text[ chinese_simplified ] = "%O ´¹Ö±·½Ïò·´Ó³";
+ Text[ russian ] = "Îòðàçèòü %O ïî âåðòèêàëè";
+ Text[ polish ] = "Przerzuæ %O w pionie";
+ Text[ japanese ] = "%O‚ð㉺‚É”½“]";
+ Text[ chinese_traditional ] = "%O ««ª½¤Ï¬M";
+ Text[ arabic ] = "ÇäÚßÇÓ %O ÑÃÓíÇð";
+ Text[ dutch ] = "%O verticaal spiegelen";
+ Text[ chinese_simplified ] = "%O ´¹Ö±·½Ïò·´Ó³";
+ Text[ greek ] = "Êáôüðôñéóç %O êáôáêüñõöá";
+ Text[ korean ] = "%OÀ» ¼öÁ÷À¸·Î ´ëĪ";
+ Text[ turkish ] = "Dikey yansýt: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethMirrorDiag
+{
+ Text = "%O diagonal spiegeln" ;
+ Text [ ENGLISH ] = "Mirror %O diagonal" ;
+ Text [ norwegian ] = "Speil %O diagonal" ;
+ Text [ italian ] = "Rispecchia %O in diagonale" ;
+ Text [ portuguese_brazilian ] = "Espelhar %O em diagonal" ;
+ Text [ portuguese ] = "Espelhar %O na diagonal" ;
+ Text [ finnish ] = "Peilaa %O vinosti" ;
+ Text [ danish ] = "Spejlvend %O diagonalt" ;
+ Text [ french ] = "Refléter %O diagonalement" ;
+ Text [ swedish ] = "Spegla %O diagonalt" ;
+ Text [ dutch ] = "%O diagonaal spiegelen" ;
+ Text [ spanish ] = "Reflejar %O diagonalmente" ;
+ Text [ english_us ] = "Flip %O diagonal" ;
+ Text[ chinese_simplified ] = "%O ¶Ô½Ç·´Ó³";
+ Text[ russian ] = "Îòðàçèòü %O ïî äèàãîíàëè";
+ Text[ polish ] = "Przerzuæ %O po przek¹tnej";
+ Text[ japanese ] = "%O‚ðŽÎ‚ß‚É”½“]";
+ Text[ chinese_traditional ] = "%O ¹ï¨¤¤Ï¬M";
+ Text[ arabic ] = "ÇäÚßÇÓ %O ÞØÑíÇð";
+ Text[ dutch ] = "%O diagonaal spiegelen";
+ Text[ chinese_simplified ] = "%O ¶Ô½Ç·´Ó³";
+ Text[ greek ] = "Êáôüðôñéóç %O äéáãùíßùò";
+ Text[ korean ] = "%OÀ» ´ë°¢¼±À¸·Î ´ëĪ";
+ Text[ turkish ] = "Diyagonal yansýt: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethMirrorFree
+{
+ Text = "%O frei spiegeln" ;
+ Text [ ENGLISH ] = "Mirror %O" ;
+ Text [ norwegian ] = "Speil %O" ;
+ Text [ italian ] = "Rispecchia %O" ;
+ Text [ portuguese_brazilian ] = "Espelhar %O" ;
+ Text [ portuguese ] = "Espelhar %O livremente" ;
+ Text [ finnish ] = "Peilaa %O" ;
+ Text [ danish ] = "Spejlvend %O" ;
+ Text [ french ] = "Refléter %O librement" ;
+ Text [ swedish ] = "Spegla %O" ;
+ Text [ dutch ] = "%O vrij spiegelen" ;
+ Text [ spanish ] = "Reflejar libremente %O" ;
+ Text [ english_us ] = "Flip %O freehand" ;
+ Text[ chinese_simplified ] = "%O ×ÔÓÉ·´Ó³";
+ Text[ russian ] = "Ñâîáîäíîå îòðàæåíèå %O";
+ Text[ polish ] = "Przerzuæ %O dowolnie";
+ Text[ japanese ] = "%O‚ðŽ©—R‚É”½“]";
+ Text[ chinese_traditional ] = "%O ¦Û¥Ñ¤Ï¬M";
+ Text[ arabic ] = "ÇäÚßÇÓ %O ÈÔßá ÍÑ";
+ Text[ dutch ] = "%O vrij spiegelen";
+ Text[ chinese_simplified ] = "%O ×ÔÓÉ·´Ó³";
+ Text[ greek ] = "Êáôüðôñéóç %O åëåýèåñá";
+ Text[ korean ] = "%OÀ» ÀÓÀÇ´ë·Î ´ëĪ";
+ Text[ turkish ] = "Serbest yansýt: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethGradient
+{
+ Text = "interaktiver Farbverlauf für %O" ;
+ Text [ ENGLISH ] = "Interactive gradient for %O" ;
+ Text[ english_us ] = "Interactive gradient for %O";
+ Text[ portuguese ] = "Gradação interactiva para %O";
+ Text[ greek ] = "ÄéáëïãéêÞ äéáâÜèìéóç ÷ñþìáôïò ãéá %O";
+ Text[ dutch ] = "Interactief kleurverloop voor %O";
+ Text[ french ] = "Dégradé interactif pour %O";
+ Text[ spanish ] = "gradiente interactivo para %O";
+ Text[ swedish ] = "Interaktiv färggradient för %O";
+ Text[ russian ] = "Èíòåðàêòèâíàÿ ãðàäèåíòíàÿ äëÿ %O";
+ Text[ italian ] = "Sfumatura interattiva per %O";
+ Text[ danish ] = "Interaktiv farvegraduering for %O";
+ Text[ polish ] = "Interaktywny gradient dla %O";
+ Text[ portuguese_brazilian ] = "Interactive gradient for %O";
+ Text[ japanese ] = "%O—p²ÝÀ׸èÌÞ¸Þ×ÃÞ°¼®Ý";
+ Text[ korean ] = "%O¸¦ À§ÇÑ ´ëÈ­½Ä ±×¶óµ¥À̼Ç";
+ Text[ chinese_simplified ] = "ÓÃÓÚ %O µÄ½»»¥Ê½²Êɫͼ°¸";
+ Text[ chinese_traditional ] = "%O ¥æ°Ê¦¡±m¦â¹Ï®×";
+ Text[ arabic ] = "ÊÏÑÌ áæä ÊÈÇÏáí áÜ %O";
+ Text[ turkish ] = "%O için etkileþimli gradyan";
+};
+String STR_DragMethTransparence
+{
+ Text = "interaktive Transparenz für %O" ;
+ Text [ ENGLISH ] = "Interactive transparence for %O" ;
+ Text[ english_us ] = "Interactive transparency for %O";
+ Text[ portuguese ] = "Transparência interactiva para %O";
+ Text[ greek ] = "ÄéáëïãéêÞ äéáöÜíåéá ãéá %O";
+ Text[ dutch ] = "Interactieve transparantie voor %O";
+ Text[ french ] = "Tranparence interactive pour %O";
+ Text[ spanish ] = "transparencia interactiva para %O";
+ Text[ swedish ] = "Interaktiv transparens för %O";
+ Text[ russian ] = "Èíòåðàêòèâíàÿ ïðîçðà÷íîñòü äëÿ %O";
+ Text[ italian ] = "Trasparenza interattiva per %O";
+ Text[ danish ] = "Interaktiv transparens for %O";
+ Text[ polish ] = "Interaktywna przezroczystoϾ dla %O";
+ Text[ portuguese_brazilian ] = "Interactive transparence for %O";
+ Text[ japanese ] = "%O‚Ì‚½‚߂̲ÝÀ׸èÌÞ“§‰ß«";
+ Text[ korean ] = "%O¸¦ À§ÇÑ ´ëÈ­½Ä Åõ¸íÈ¿°ú";
+ Text[ chinese_simplified ] = "ÓÃÓÚ %O µÄ½»»¥Ê½Í¸Ã÷";
+ Text[ chinese_traditional ] = "%O ªº¥æ°Ê¦¡³z©ú";
+ Text[ arabic ] = "ÔÝÇÝíÉ ÊÈÇÏáíÉ áÜ %O";
+ Text[ turkish ] = "%O için etkileþimli saydamlýk";
+};
+String STR_DragMethShear
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O verzerren (schrägstellen) : %O verzerren (schrõgstellen) */
+ /* ### ACHTUNG: Neuer Text in Resource? %O verzerren (schrägstellen) : %O verzerren (schrõgstellen) */
+ Text = "%O verzerren (schräg stellen)" ;
+ Text [ ENGLISH ] = "Shear %O" ;
+ Text [ norwegian ] = "Skjærevinkel %O" ;
+ Text [ italian ] = "Distorci %O (inclina)" ;
+ Text [ portuguese_brazilian ] = "Aparar %O" ;
+ Text [ portuguese ] = "Deformar %O (inclinar)" ;
+ Text [ finnish ] = "Vääristä %O" ;
+ Text [ danish ] = "Vrid %O (stil skråt)" ;
+ Text [ french ] = "Déformer %O (incliner)" ;
+ Text [ swedish ] = "Förvräng %O (snedställ)" ;
+ Text [ dutch ] = "%O vervormen (schuintrekken)" ;
+ Text [ spanish ] = "Distorsionar (inclinar) %O" ;
+ Text [ english_us ] = "Distort %O (slant)" ;
+ Text[ chinese_simplified ] = "%O ŤÇú(Çãб)";
+ Text[ russian ] = "Èñêàçèòü %O (ïîä íàêëîíîì)";
+ Text[ polish ] = "Zniekszta³æ %O (pochyl)";
+ Text[ japanese ] = "%O‚ð˜c‚ß‚é(ŒXŽÎ‚³‚¹‚é)";
+ Text[ chinese_traditional ] = "§á¦±(¶É±×) %O";
+ Text[ arabic ] = "ÊÍÑíÝ Ôßá %O (ãÇÆá)";
+ Text[ dutch ] = "%O vervormen (schuintrekken)";
+ Text[ chinese_simplified ] = "%O ŤÇú(Çãб)";
+ Text[ greek ] = "Ðáñáìüñöùóç %O (ðëÜãéá)";
+ Text[ korean ] = "%O Àϱ׷¯¶ß¸²(±â¿ï±â)";
+ Text[ turkish ] = "Çarpýt (eð): %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethCrook
+{
+ Text = "%O im Kreis anordnen" ;
+ Text [ ENGLISH ] = "Crook %O" ;
+ Text [ portuguese ] = "Dispor %O em círculo" ;
+ Text [ english_us ] = "Arrange %O in circle" ;
+ Text [ portuguese_brazilian ] = "%O im Kreis anordnen" ;
+ Text [ swedish ] = "Placera %O i cirkel" ;
+ Text [ danish ] = "Arranger %O i cirkel" ;
+ Text [ italian ] = "Disponi %O in cerchio" ;
+ Text [ spanish ] = "Organizar %O en círculo" ;
+ Text [ french ] = "Disposer dans le cercle %O" ;
+ Text [ dutch ] = "%O in cirkel schikken" ;
+ Text[ chinese_simplified ] = "ÅÅÐò %O ³ÉÔ²ÐÎ";
+ Text[ russian ] = "Ðàñïîëîæèòü %O â êðóãó";
+ Text[ polish ] = "RozmieϾ %O w kole";
+ Text[ japanese ] = "%O‚ð‰~Œ`‚É”z—ñ";
+ Text[ chinese_traditional ] = "±Æ§Ç %O ¦¨¶ê§Î";
+ Text[ arabic ] = "ÊÑÊíÈ %O Ýí ÏÇÆÑÉ";
+ Text[ dutch ] = "%O in cirkel schikken";
+ Text[ chinese_simplified ] = "ÅÅÐò %O ³ÉÔ²ÐÎ";
+ Text[ greek ] = "ÔïðïèÝôçóç óå êýêëï %O";
+ Text[ korean ] = "%OÀ» ¿ø ¾È¿¡¼­ Á¤·Ä";
+ Text[ turkish ] = "Daire biçiminde düzenle: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethCrookContortion
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O kreisförmig verbiegen : %O kreisf÷rmig verbiegen */
+ /* ### ACHTUNG: Neuer Text in Resource? %O kreisförmig verbiegen : %O kreisf÷rmig verbiegen */
+ Text = "%O kreisförmig verbiegen" ;
+ Text [ ENGLISH ] = "Crook %O" ;
+ Text [ portuguese ] = "Curvar %O em círculo" ;
+ Text [ english_us ] = "Curve %O in circle" ;
+ Text [ portuguese_brazilian ] = "%O kreisförmig verbiegen" ;
+ Text [ swedish ] = "Böj %O till en cirkel" ;
+ Text [ danish ] = "Bøj %O i kurveform" ;
+ Text [ italian ] = "Piega %O a cerchio" ;
+ Text [ spanish ] = "Doblar %O en círculo" ;
+ Text [ french ] = "Courber %O en cercle" ;
+ Text [ dutch ] = "%O cirkelvormig buigen" ;
+ Text[ chinese_simplified ] = "%O ת±ä³ÉÔ²ÐÎ";
+ Text[ russian ] = "Ñîãíóòü %O â âèäå êðóãà";
+ Text[ polish ] = "Przekszta³æ %O w ko³o";
+ Text[ japanese ] = "%O‚ðŠÛ‚­¶°ÌÞ‚³‚¹‚é";
+ Text[ chinese_traditional ] = "%O ÂàÅܦ¨¶ê§Î";
+ Text[ arabic ] = "Ëäí %O Úáì Ôßá ÏÇÆÑÉ";
+ Text[ dutch ] = "%O cirkelvormig buigen";
+ Text[ chinese_simplified ] = "%O ת±ä³ÉÔ²ÐÎ";
+ Text[ greek ] = "Êáìðýëç %O óå êýêëï";
+ Text[ korean ] = "%OÀ» ¿øÇüÅ·Π±¸ºÎ¸²";
+ Text[ turkish ] = "Daire biçiminde eð: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragMethDistort
+{
+ Text = "%O frei verzerren" ;
+ Text [ ENGLISH ] = "Distort %O" ;
+ Text [ portuguese ] = "Deformar %O livremente" ;
+ Text [ english_us ] = "Distort %O" ;
+ Text [ portuguese_brazilian ] = "%O frei verzerren" ;
+ Text [ swedish ] = "Förvräng %O fritt" ;
+ Text [ danish ] = "Vrid %O frit" ;
+ Text [ italian ] = "Distorci %O liberamente" ;
+ Text [ spanish ] = "Distorsión libre de %O" ;
+ Text [ french ] = "Déformer librement %O" ;
+ Text [ dutch ] = "%O vrij vertekenen" ;
+ Text[ chinese_simplified ] = "%O ×ÔÓÉŤÇú";
+ Text[ russian ] = "Ñâîáîäíîå èñêàæåíèå %O";
+ Text[ polish ] = "%O zniekszta³æ dowolnie";
+ Text[ japanese ] = "%O‚ðŽ©—R‚ɘc‚ß‚é";
+ Text[ chinese_traditional ] = "%O ¦Û¥Ñ§á¦±";
+ Text[ arabic ] = "ÊÍÑíÝ Ôßá %O (ÍÑ)";
+ Text[ dutch ] = "%O vrij vertekenen";
+ Text[ chinese_simplified ] = "%O ×ÔÓÉŤÇú";
+ Text[ greek ] = "Åëåýèåñç ðáñáìüñöùóç %O";
+ Text[ korean ] = "%OÀ» Àϱ׷¯¶ß¸²";
+ Text[ turkish ] = "Serbest çarpýt: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragRectEckRad
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Eckenradius von %O verändern : Eckenradius von %O verõndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Eckenradius von %O verändern : Eckenradius von %O verõndern */
+ Text = "Eckenradius von %O verändern" ;
+ Text [ ENGLISH ] = "Change radius of %O" ;
+ Text [ norwegian ] = "Endre radius på %O" ;
+ Text [ italian ] = "Cambia il raggio d'angolo di %O" ;
+ Text [ portuguese_brazilian ] = "Mudar o raio de %O" ;
+ Text [ portuguese ] = "Mudar o raio do ângulo de %O" ;
+ Text [ finnish ] = "Muuta objektin %O sädettä" ;
+ Text [ danish ] = "Modificer hjørneradius på %O" ;
+ Text [ french ] = "Modifier le rayon d'angle de %O" ;
+ Text [ swedish ] = "Ändra hörnradien från %O" ;
+ Text [ dutch ] = "Hoekafronding van %O wijzigen" ;
+ Text [ spanish ] = "Modificar radio de ángulo en %O" ;
+ Text [ english_us ] = "Alter radius by %O" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä %O ½Ç¶È";
+ Text[ russian ] = "Èçìåíèòü ðàäèóñ çàêðóãëåííîãî óãëà %O";
+ Text[ polish ] = "Zmieñ promieñ krzywizny %O ";
+ Text[ japanese ] = "%O‚ÌŠp‚Ì”¼Œa‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧó %O ¨¤«×";
+ Text[ arabic ] = "ÊÛííÑ äÕÝ ÞØÑ ÒÇæíÉ %O";
+ Text[ dutch ] = "Hoekafronding van %O wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä %O ½Ç¶È";
+ Text[ greek ] = "ÁëëáãÞ áêôßíáò ãùíßáò %O";
+ Text[ korean ] = "%OÀÇ ¸ð¼­¸®°¢µµ º¯°æ";
+ Text[ turkish ] = "Köþe çapýný deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragPathObj
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O verändern : %O verõndern */
+ /* ### ACHTUNG: Neuer Text in Resource? %O verändern : %O verõndern */
+ Text = "%O verändern" ;
+ Text [ ENGLISH ] = "Change %O" ;
+ Text [ norwegian ] = "Endre %O" ;
+ Text [ italian ] = "Cambia %O" ;
+ Text [ portuguese_brazilian ] = "Mudar %O" ;
+ Text [ portuguese ] = "Mudar %O" ;
+ Text [ finnish ] = "Muokkaa objektia %O" ;
+ Text [ danish ] = "Modificer %O" ;
+ Text [ french ] = "Modifier %O" ;
+ Text [ swedish ] = "Ändra %O" ;
+ Text [ dutch ] = "%O wijzigen" ;
+ Text [ spanish ] = "Modificar %O" ;
+ Text [ english_us ] = "Alter %O" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä %O";
+ Text[ russian ] = "Èçìåíèòü %O";
+ Text[ polish ] = "Zmieñ %O";
+ Text[ japanese ] = "%O‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧó %O";
+ Text[ arabic ] = "ÊÛííÑ %O";
+ Text[ dutch ] = "%O wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä %O";
+ Text[ greek ] = "ÁëëáãÞ %O";
+ Text[ korean ] = "%O º¯°æ";
+ Text[ turkish ] = "Deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragRectResize
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Größe von %O ändern : Gr÷˜e von %O õndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Größe von %O ändern : Gr÷˜e von %O õndern */
+ Text = "Größe von %O ändern" ;
+ Text [ ENGLISH ] = "Resize %O" ;
+ Text [ norwegian ] = "Endre størrelse på %O" ;
+ Text [ italian ] = "Ridimensiona %O" ;
+ Text [ portuguese_brazilian ] = "Redimensionar %O" ;
+ Text [ portuguese ] = "Redimensionar %O" ;
+ Text [ finnish ] = "Muuta objektin %O kokoa" ;
+ Text [ danish ] = "Modificer størrelse på %O" ;
+ Text [ french ] = "Redimensionner %O" ;
+ Text [ swedish ] = "Förändra storleken på %O" ;
+ Text [ dutch ] = "Grootte van %O wijzigen" ;
+ Text [ spanish ] = "Cambiar el tamaño de %O" ;
+ Text [ english_us ] = "Resize %O" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä %O ´óС";
+ Text[ russian ] = "Èçìåíèòü ðàçìåð %O";
+ Text[ polish ] = "Zmieñ rozmiar %O";
+ Text[ japanese ] = "%O‚Ì»²½Þ‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧó %O ¤j¤p";
+ Text[ arabic ] = "ÊÛííÑ ÍÌã %O";
+ Text[ dutch ] = "Grootte van %O wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä %O ´óС";
+ Text[ greek ] = "Ôñïðïðïßçóç ìåãÝèïõò %O";
+ Text[ korean ] = "%OÀÇ Å©±â Á¶Á¤";
+ Text[ turkish ] = "Boyutunu deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragCaptFram
+{
+ Text = "%O verschieben" ;
+ Text [ ENGLISH ] = "Move %O" ;
+ Text [ norwegian ] = "Flytt %O" ;
+ Text [ italian ] = "Sposta %O" ;
+ Text [ portuguese_brazilian ] = "Mover %O" ;
+ Text [ portuguese ] = "Mover %O" ;
+ Text [ finnish ] = "Siirrä %O" ;
+ Text [ danish ] = "Flyt %O" ;
+ Text [ french ] = "Déplacer %O" ;
+ Text [ swedish ] = "Flytta %O" ;
+ Text [ dutch ] = "%O verplaatsen" ;
+ Text [ spanish ] = "Desplazar %O" ;
+ Text [ english_us ] = "Move %O" ;
+ Text[ chinese_simplified ] = "Òƶ¯ %O";
+ Text[ russian ] = "Ïåðåìåñòèòü %O";
+ Text[ polish ] = "Przenieœ %O";
+ Text[ japanese ] = "%O‚ðˆÚ“®";
+ Text[ chinese_traditional ] = "²¾°Ê %O";
+ Text[ arabic ] = "ÅÒÇÍÉ %O";
+ Text[ dutch ] = "%O verplaatsen";
+ Text[ chinese_simplified ] = "Òƶ¯ %O";
+ Text[ greek ] = "Ìåôáêßíçóç %O";
+ Text[ korean ] = "%O À̵¿";
+ Text[ turkish ] = "Taþý: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragCaptTail
+{
+ Text = "Endpunkt von %O verschieben" ;
+ Text [ ENGLISH ] = "Move tail of %O" ;
+ Text [ norwegian ] = "+++Move tail of %O" ;
+ Text [ italian ] = "Sposta coda di %O" ;
+ Text [ portuguese_brazilian ] = "Mover ponto final de %O" ;
+ Text [ portuguese ] = "Mover ponto final de %O" ;
+ Text [ finnish ] = "Siirrä objektin %O loppupiste" ;
+ Text [ danish ] = "Flyt slutpunkt på %O" ;
+ Text [ french ] = "Déplacer point limite de %O" ;
+ Text [ swedish ] = "Flytta slutpunkten för %O" ;
+ Text [ dutch ] = "Einpunt van %0 verplaatsen" ;
+ Text [ spanish ] = "Desplazar punto final de %O" ;
+ Text [ english_us ] = "Move end point of %O" ;
+ Text[ chinese_simplified ] = "Òƶ¯ %O µÄÖÕµã";
+ Text[ russian ] = "Ïåðåìåñòèòü êîíå÷íóþ òî÷êó %O";
+ Text[ polish ] = "Przesuñ punkt koñcowy z %O";
+ Text[ japanese ] = "%O‚ÌI“_‚ðˆÚ“®";
+ Text[ chinese_traditional ] = "²¾°Ê %O ªº²×ÂI";
+ Text[ arabic ] = "ÅÒÇÍÉ äÞØÉ ÇáäåÇíÉ ÇáÎÇÕÉ ÈÜ %O";
+ Text[ dutch ] = "Einpunt van %0 verplaatsen";
+ Text[ chinese_simplified ] = "Òƶ¯ %O µÄÖÕµã";
+ Text[ greek ] = "Ìåôáêßíçóç óçìåßïõ ôÝëïõò áðü %O";
+ Text[ korean ] = "%OÀÇ ³¡Á¡ À̵¿";
+ Text[ turkish ] = "Bitiþ noktasýný taþý: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragCircAngle
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Winkel von %O ändern : Winkel von %O õndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Winkel von %O ändern : Winkel von %O õndern */
+ Text = "Winkel von %O ändern" ;
+ Text [ ENGLISH ] = "Change angle of %O" ;
+ Text [ norwegian ] = "Endre vinkel på %O" ;
+ Text [ italian ] = "Cambia angolo di %O" ;
+ Text [ portuguese_brazilian ] = "Mudar ângulo de %O" ;
+ Text [ portuguese ] = "Mudar ângulo de %O" ;
+ Text [ finnish ] = "Muuta objektin %O kulmaa" ;
+ Text [ danish ] = "Modificer vinkel på %O" ;
+ Text [ french ] = "Changer angle de %O" ;
+ Text [ swedish ] = "Ändra vinkeln för %O" ;
+ Text [ dutch ] = "Hoek van %O wijzigen" ;
+ Text [ spanish ] = "Modificar ángulo de %O" ;
+ Text [ english_us ] = "Adjust angle by %O" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä %O µÄ½Ç¶È";
+ Text[ russian ] = "Èçìåíèòü óãîë %O";
+ Text[ polish ] = "Zmieñ k¹t %O";
+ Text[ japanese ] = "%O‚ÌŠp“x‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧó %O ªº¨¤«×";
+ Text[ arabic ] = "ÊÛííÑ ÒÇæíÉ %O";
+ Text[ dutch ] = "Hoek van %O wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä %O µÄ½Ç¶È";
+ Text[ greek ] = "ÁëëáãÞ ãùíßáò %O";
+ Text[ korean ] = "%OÀÇ ¸ð¼­¸® À̵¿";
+ Text[ turkish ] = "Açýsýný deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_DragEdgeTail
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O verändern : %O verõndern */
+ /* ### ACHTUNG: Neuer Text in Resource? %O verändern : %O verõndern */
+ Text = "%O verändern" ;
+ Text [ ENGLISH ] = "Change %O" ;
+ Text [ norwegian ] = "Endre %O" ;
+ Text [ italian ] = "Cambia %O" ;
+ Text [ portuguese_brazilian ] = "Mudar %O" ;
+ Text [ portuguese ] = "Mudar %O" ;
+ Text [ finnish ] = "Muokkaa objektia %O" ;
+ Text [ danish ] = "Modificer %O" ;
+ Text [ french ] = "Modifier %O" ;
+ Text [ swedish ] = "Ändra %O" ;
+ Text [ dutch ] = "%O wijzigen" ;
+ Text [ spanish ] = "Modificar %O" ;
+ Text [ english_us ] = "Adjust %O" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä %O";
+ Text[ russian ] = "Èçìåíèòü %O";
+ Text[ polish ] = "Dopasuj %O";
+ Text[ japanese ] = "%O‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧó %O";
+ Text[ arabic ] = "ÊÛííÑ %O";
+ Text[ dutch ] = "%O wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä %O";
+ Text[ greek ] = "ÁëëáãÞ %O";
+ Text[ korean ] = "%O Á¶Á¤";
+ Text[ turkish ] = "Deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewTextEdit
+{
+ Text = "TextEdit: Absatz %a, Zeile %z, Spalte %s" ;
+ Text [ ENGLISH ] = "textedit: paragraph %a, line %z, column %s" ;
+ Text [ portuguese ] = "EditarTexto: Parágrafo %a, Linha %z, Coluna %s" ;
+ Text [ english_us ] = "TextEdit: Paragraph %a, Row %z, Column %s" ;
+ Text [ portuguese_brazilian ] = "TextEdit: Absatz %a, Zeile %z, Spalte %s" ;
+ Text [ swedish ] = "TextEdit: Stycke %a, Rad %z, Kolumn %s" ;
+ Text [ danish ] = "Tekstredigering: Afsnit %a, Række %z, Kolonne %s" ;
+ Text [ italian ] = "TextEdit: Paragrafo %a, Riga %z, Colonna %s" ;
+ Text [ spanish ] = "Editar Texto: Párrafo %a, Línea %z, Columna %s" ;
+ Text [ french ] = "TextEdit : Paragraphe %a, Ligne %z, Colonne %s" ;
+ Text [ dutch ] = "TextEdit: Alinea %a, Rij %r, Kolom %k" ;
+ Text[ chinese_simplified ] = "±à¼­ÎÄ×Ö£º¶ÎÂä%a£¬ÐÐ%z£¬À¸%s";
+ Text[ russian ] = "Ïðàâêà òåêñòà: Àáçàö %a, Ñòðîêà %z, Ñòîëáåö %s";
+ Text[ polish ] = "Edytuj tekst: Akapit %a, Wiersz %z, Kolumna %s";
+ Text[ japanese ] = "÷½Ä•ÒW: ’i—Ž%aAs%zA—ñ%s";
+ Text[ chinese_traditional ] = "½s¿è¤å¦r¡G¬q¸¨%a¡A¦æ%z¡AÄæ%s";
+ Text[ arabic ] = "ÊÍÑíÑ ÇáäÕ: ÇáÝÞÑÉ %a¡ ÇáÓØÑ %z¡ ÇáÚãæÏ %s";
+ Text[ dutch ] = "TextEdit: Alinea %a, Rij %r, Kolom %k";
+ Text[ chinese_simplified ] = "±à¼­ÎÄ×Ö£º¶ÎÂä%a£¬ÐÐ%z£¬À¸%s";
+ Text[ greek ] = "Åðåîåñãáóßá êåéìÝíïõ: ÐáñÜãñáöïò %a, ÃñáììÞ %z, ÓôÞëç %s";
+ Text[ korean ] = "ÅؽºÆ® ÆíÁý: ´Ü¶ô %a, Çà %z, ¿­ %s";
+ Text[ turkish ] = "Metin düzenleme: Paragraf %a, Satýr %z, Sütun %s";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewMarked
+{
+ Text = "%O markiert" ;
+ Text [ ENGLISH ] = "%O marked" ;
+ Text [ norwegian ] = "%O merketmarked" ;
+ Text [ italian ] = "%O" ;
+ Text [ portuguese_brazilian ] = "%O marcado" ;
+ Text [ portuguese ] = "%O marcado(s)" ;
+ Text [ finnish ] = "%O merkitty" ;
+ Text [ danish ] = "%O markeret" ;
+ Text [ french ] = "%O sélectionné(e)(s)" ;
+ Text [ swedish ] = "markerad %O" ;
+ Text [ dutch ] = "%O gemarkeerd" ;
+ Text [ spanish ] = "%O marcado" ;
+ Text [ english_us ] = "%O selected" ;
+ Text[ chinese_simplified ] = "ÒѾ­Ñ¡È¡ %O";
+ Text[ russian ] = "Âûäåëåí %O";
+ Text[ polish ] = "Zaznaczono %O";
+ Text[ japanese ] = "%O‚ðÏ°¸";
+ Text[ chinese_traditional ] = "¤w¸g¿ï¾Ü %O";
+ Text[ arabic ] = "%O ãÍÏÏ";
+ Text[ dutch ] = "%O gemarkeerd";
+ Text[ chinese_simplified ] = "ÒѾ­Ñ¡È¡ %O";
+ Text[ greek ] = "ÅðéëïãÞ %O";
+ Text[ korean ] = "%O ¼±Åà ǥ½Ã";
+ Text[ language_user1 ] = " ";
+ Text[ turkish ] = "%O seçildi";
+};
+String STR_ViewMarkedPoint
+{
+ Text = "Punkt von %O" ;
+ Text [ ENGLISH ] = "point from %O" ;
+ Text [ portuguese ] = "Ponto de %O" ;
+ Text [ english_us ] = "Point from %O" ;
+ Text [ portuguese_brazilian ] = "Punkt von %O" ;
+ Text [ swedish ] = "Punkt för %O" ;
+ Text [ danish ] = "Punkt for %O" ;
+ Text [ italian ] = "Punto di %O" ;
+ Text [ spanish ] = "Punto de %O" ;
+ Text [ french ] = "Point de %O" ;
+ Text [ dutch ] = "Punt van %0" ;
+ Text[ chinese_simplified ] = "%O µÄ½Óµã";
+ Text[ russian ] = "Òî÷êà %O";
+ Text[ polish ] = "Punkt z %O";
+ Text[ japanese ] = "%O‚Ì“_";
+ Text[ chinese_traditional ] = "%O ªº±µÂI";
+ Text[ arabic ] = "äÞØÉ ãä %O";
+ Text[ dutch ] = "Punt van %0";
+ Text[ chinese_simplified ] = "%O µÄ½Óµã";
+ Text[ greek ] = "Óçìåßï áðü %O";
+ Text[ korean ] = "%OÀÇ Á¡";
+ Text[ turkish ] = "Nokta: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewMarkedPoints
+{
+ Text = "%N Punkte von %O" ;
+ Text [ ENGLISH ] = "%N points from %O" ;
+ Text [ portuguese ] = "%N pontos de %O" ;
+ Text [ english_us ] = "%N points from %O" ;
+ Text [ portuguese_brazilian ] = "%N Punkte von %O" ;
+ Text [ swedish ] = "%N punkter för %O" ;
+ Text [ danish ] = "%N punkt for %O" ;
+ Text [ italian ] = "%N punkti di %O" ;
+ Text [ spanish ] = "%N Puntos de %O" ;
+ Text [ french ] = "%N points de %O" ;
+ Text [ dutch ] = "%N punten van %0" ;
+ Text[ chinese_simplified ] = "%O µÄ %N ½Óµã";
+ Text[ russian ] = "%N òî÷êè(åê) %O";
+ Text[ polish ] = "%N punkty z %O";
+ Text[ japanese ] = "%O‚Ì%N“_";
+ Text[ chinese_traditional ] = "%O ªº %N ±µÂI";
+ Text[ arabic ] = "%N äÞÇØ ãä %O";
+ Text[ dutch ] = "%N punten van %0";
+ Text[ chinese_simplified ] = "%O µÄ %N ½Óµã";
+ Text[ greek ] = "%N óçìåßá áðü %O";
+ Text[ korean ] = "%OÀÇ %N Á¡";
+ Text[ turkish ] = "%N yapýþtýrma noktasý: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewMarkedGluePoint
+{
+ Text = "Klebepunkt von %O" ;
+ Text [ ENGLISH ] = "glue-point from %O" ;
+ Text [ portuguese ] = "Ponto de colagem de %O" ;
+ Text [ english_us ] = "Glue point from %O" ;
+ Text [ portuguese_brazilian ] = "Klebepunkt von %O" ;
+ Text [ swedish ] = "Fästpunkt för %O" ;
+ Text [ danish ] = "Klæbepunkt for %O" ;
+ Text [ italian ] = "Punto di incollaggio di %O" ;
+ Text [ spanish ] = "Punto de adhesión de %O" ;
+ Text [ french ] = "Point de collage de %O" ;
+ Text [ dutch ] = "Plakpunt van %0" ;
+ Text[ chinese_simplified ] = "%O µÄÕ³½áµã";
+ Text[ russian ] = "Òî÷êà ñîåäèíåíèÿ èç %O";
+ Text[ polish ] = "Punkt sklejania z %O";
+ Text[ japanese ] = "%O‚ÌÚ’…“_";
+ Text[ chinese_traditional ] = "%O ªº±µÂI";
+ Text[ arabic ] = "äÞØÉ áÕÞ ãä %O";
+ Text[ dutch ] = "Plakpunt van %0";
+ Text[ chinese_simplified ] = "%O µÄÕ³½áµã";
+ Text[ greek ] = "Óçìåßï êüëëçóçò áðü %O";
+ Text[ korean ] = "%OÀÇ Á¢ÂøÁ¡";
+ Text[ turkish ] = "Yapýþtýrma noktasý: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewMarkedGluePoints
+{
+ Text = "%N Klebepunkte von %O" ;
+ Text [ ENGLISH ] = "%N glue-points from %O" ;
+ Text [ portuguese ] = "%N pontos de colagem de %O" ;
+ Text [ english_us ] = "%N glue points from %O" ;
+ Text [ portuguese_brazilian ] = "%N Klebepunkte von %O" ;
+ Text [ swedish ] = "%N fästpunkter för %O" ;
+ Text [ danish ] = "%N klæbepunkt for %O" ;
+ Text [ italian ] = "%N punti di incollaggio di %O" ;
+ Text [ spanish ] = "%N Puntos de adhesión de %O" ;
+ Text [ french ] = "%N points de collage de %O" ;
+ Text [ dutch ] = "%N plakpunten van %0" ;
+ Text[ chinese_simplified ] = "%O µÄ %N Õ³½áµã";
+ Text[ russian ] = "%N òî÷åê ñîåäèíåíèÿ èç %O";
+ Text[ polish ] = "%N punkty sklejania z %O";
+ Text[ japanese ] = "%O‚Ì%NÚ’…“_";
+ Text[ chinese_traditional ] = "%O ªº %N ±µÂI";
+ Text[ arabic ] = "%N äÞÇØ áÕÞ ãä %O";
+ Text[ dutch ] = "%N plakpunten van %0";
+ Text[ chinese_simplified ] = "%O µÄ %N Õ³½áµã";
+ Text[ greek ] = "%N óçìåßá êüëëçóçò áðü %O";
+ Text[ korean ] = "%OÀÇ %N Á¢ÂøÁ¡";
+ Text[ turkish ] = "%N yapýþtýrma noktasý: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewMarkObjs
+{
+ Text = "Markiere Objekte" ;
+ Text [ ENGLISH ] = "Marking objects" ;
+ Text [ norwegian ] = "Merke objekter" ;
+ Text [ italian ] = "Seleziona oggetti" ;
+ Text [ portuguese_brazilian ] = "Marcar objetos" ;
+ Text [ portuguese ] = "Marcar objectos" ;
+ Text [ finnish ] = "Merkitse objektit" ;
+ Text [ danish ] = "Marker objekter" ;
+ Text [ french ] = "Objets sélectionnés" ;
+ Text [ swedish ] = "Markera objekt" ;
+ Text [ dutch ] = "Markeer objecten" ;
+ Text [ spanish ] = "Marcar objetos" ;
+ Text [ english_us ] = "Mark objects" ;
+ Text[ chinese_simplified ] = "±ê¼Ç¶ÔÏó";
+ Text[ russian ] = "Îáîçíà÷èòü îáúåêòû";
+ Text[ polish ] = "Zaznacz obiekty";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä‚ðÏ°¸";
+ Text[ chinese_traditional ] = "¿ï¨úª«¥ó";
+ Text[ arabic ] = "ÊÍÏíÏ ßÇÆäÇÊ";
+ Text[ dutch ] = "Markeer objecten";
+ Text[ chinese_simplified ] = "±ê¼Ç¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíá ìå óÞìáíóç";
+ Text[ korean ] = "°³Ã¼ ¼±Åà ǥ½Ã";
+ Text[ turkish ] = "Nesneleri seç";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewMarkMoreObjs
+{
+ Text = "Markiere weitere Objekte" ;
+ Text [ ENGLISH ] = "Marking additional objects" ;
+ Text [ norwegian ] = "Merke tilleggsobjekter" ;
+ Text [ italian ] = "Seleziona oggetti aggiuntivi" ;
+ Text [ portuguese_brazilian ] = "Marcar objetos adicionais" ;
+ Text [ portuguese ] = "Marcar objectos adicionais" ;
+ Text [ finnish ] = "Merkitse lisää objekteja" ;
+ Text [ danish ] = "Marker flere objekter" ;
+ Text [ french ] = "Sélectionner des objets supplémentaires" ;
+ Text [ swedish ] = "Markera ytterligare objekt" ;
+ Text [ dutch ] = "Markeer verdere objecten" ;
+ Text [ spanish ] = "Marcar objetos adicionales" ;
+ Text [ english_us ] = "Mark additional objects" ;
+ Text[ chinese_simplified ] = "Ñ¡ÔñÆäËûµÄ¶ÔÏó";
+ Text[ russian ] = "Îáîçíà÷èòü äîïîëíèòåëüíûå îáúåêòû";
+ Text[ polish ] = "Zaznacz dodatkowe obiekty";
+ Text[ japanese ] = "‘¼‚̵ÌÞ¼Þª¸Ä‚àÏ°¸";
+ Text[ chinese_traditional ] = "¿ï¨ú¨ä¥Lªºª«¥ó";
+ Text[ arabic ] = "ÊÍÏíÏ äÞÇØ ÃÎÑì";
+ Text[ dutch ] = "Markeer verdere objecten";
+ Text[ chinese_simplified ] = "Ñ¡ÔñÆäËûµÄ¶ÔÏó";
+ Text[ greek ] = "ÓÞìáíóç åðéðëÝïí áíôéêåéìÝíùí";
+ Text[ korean ] = "±âŸ °³Ã¼ ¼±Åà ǥ½Ã";
+ Text[ turkish ] = "Ek nesneler seç";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewMarkPoints
+{
+ Text = "Markiere Punkte" ;
+ Text [ ENGLISH ] = "Marking points" ;
+ Text [ english_us ] = "Mark points" ;
+ Text [ portuguese_brazilian ] = "Markiere Punkte" ;
+ Text [ swedish ] = "Markera punkter" ;
+ Text [ danish ] = "Marker punkter" ;
+ Text [ italian ] = "Marca punti" ;
+ Text [ spanish ] = "Marcar puntos" ;
+ Text [ french ] = "Sélectionner des points" ;
+ Text [ dutch ] = "Parkeer punten" ;
+ Text [ portuguese ] = "Marcar pontos" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ½Óµã";
+ Text[ russian ] = "Îáîçíà÷èòü òî÷êè";
+ Text[ polish ] = "Zaznacz punkty";
+ Text[ japanese ] = "“_‚ðÏ°¸";
+ Text[ chinese_traditional ] = "¿ï¨ú±µÂI";
+ Text[ arabic ] = "ÊÍÏíÏ äÞÇØ";
+ Text[ dutch ] = "Parkeer punten";
+ Text[ chinese_simplified ] = "Ñ¡Ôñ½Óµã";
+ Text[ greek ] = "ÓÞìáíóç óçìåßùí";
+ Text[ korean ] = "Á¡ ¼±Åà ǥ½Ã";
+ Text[ turkish ] = "Noktalarý seç";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewMarkMorePoints
+{
+ Text = "Markiere weitere Punkte" ;
+ Text [ ENGLISH ] = "Marking additional points" ;
+ Text [ english_us ] = "Mark additional points" ;
+ Text [ portuguese_brazilian ] = "Markiere weitere Punkte" ;
+ Text [ swedish ] = "Markerar ytterligare punkter" ;
+ Text [ danish ] = "Marker flere punkter" ;
+ Text [ italian ] = "Marca ulteriori punti" ;
+ Text [ spanish ] = "Marcar puntos adicionales" ;
+ Text [ french ] = "Sélectionne des points supplémentaires" ;
+ Text [ dutch ] = "Markeer verdere punten" ;
+ Text [ portuguese ] = "Marcar pontos adicionais" ;
+ Text[ chinese_simplified ] = "Ñ¡ÔñÆäËûµÄ½Óµã";
+ Text[ russian ] = "Îáîçíà÷èòü äîïîëíèòåëüíûå òî÷êè";
+ Text[ polish ] = "Zaznacz dodatkowe punkty";
+ Text[ japanese ] = "‘¼‚Ì“_‚àÏ°¸";
+ Text[ chinese_traditional ] = "¿ï¨ú¨ä¥Lªº±µÂI";
+ Text[ arabic ] = "ÊÍÏíÏ äÞÇØ ÃÎÑì";
+ Text[ dutch ] = "Markeer verdere punten";
+ Text[ chinese_simplified ] = "Ñ¡ÔñÆäËûµÄ½Óµã";
+ Text[ greek ] = "ÓÞìáíóç åðéðëÝïí óçìåßùí";
+ Text[ korean ] = "±âŸ Á¡ ¼±Åà ǥ½Ã";
+ Text[ turkish ] = "Ek noktalar seç";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewMarkGluePoints
+{
+ Text = "Markiere Klebepunkte" ;
+ Text [ ENGLISH ] = "Marking glue-points" ;
+ Text [ portuguese ] = "Marcar pontos de colagem" ;
+ Text [ english_us ] = "Mark glue points" ;
+ Text [ portuguese_brazilian ] = "Markiere Klebepunkte" ;
+ Text [ swedish ] = "Markera fästpunkter" ;
+ Text [ danish ] = "Marker klæbepunkter" ;
+ Text [ italian ] = "Marca punti di incollaggio" ;
+ Text [ spanish ] = "Marcar puntos de adhesión" ;
+ Text [ french ] = "Sélectionne points de collage" ;
+ Text [ dutch ] = "Markeer plakpunten" ;
+ Text[ chinese_simplified ] = "±ê¼ÇÕ³½áµã";
+ Text[ russian ] = "Âûäåëèòü òî÷êè ñîåäèíåíèÿ";
+ Text[ polish ] = "Zaznacz punkty sklejania";
+ Text[ japanese ] = "Ú’…“_‚ðÏ°¸";
+ Text[ chinese_traditional ] = "¿ï¨ú±µÂI";
+ Text[ arabic ] = "ÊÍÏíÏ äÞÇØ ÇááÕÞ";
+ Text[ dutch ] = "Markeer plakpunten";
+ Text[ chinese_simplified ] = "±ê¼ÇÕ³½áµã";
+ Text[ greek ] = "ÓÞìáíóç óçìåßùí êüëëçóçò";
+ Text[ korean ] = "Á¢ÂøÁ¡ ¼±Åà ǥ½Ã";
+ Text[ turkish ] = "Yapýþtýrma noktalarýný seç";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewMarkMoreGluePoints
+{
+ Text = "Markiere weitere Klebepunkte" ;
+ Text [ ENGLISH ] = "Marking additional glue-points" ;
+ Text [ english_us ] = "Mark additional glue points" ;
+ Text [ portuguese_brazilian ] = "Markiere weitere Klebepunkte" ;
+ Text [ swedish ] = "Markera ytterligare fästpunkter" ;
+ Text [ danish ] = "Marker flere klæbepunkter" ;
+ Text [ italian ] = "Marca ulteriori punti di incollaggio" ;
+ Text [ spanish ] = "Marcar puntos de adhesión adicionales" ;
+ Text [ french ] = "Sélectionne autres points de collage " ;
+ Text [ dutch ] = "Markeer verdere plakpunten" ;
+ Text [ portuguese ] = "Marcar pontos de colagem adicionais" ;
+ Text[ chinese_simplified ] = "±ê¼ÇÆäËûµÄÕ³½áµã";
+ Text[ russian ] = "Âûäåëèòü îñòàëüíûå òî÷êè ñîåäèíåíèÿ";
+ Text[ polish ] = "Zaznacz dalsze punkty sklejania";
+ Text[ japanese ] = "‘¼‚ÌÚ’…“_‚àÏ°¸";
+ Text[ chinese_traditional ] = "¿ï¨ú¨ä¥Lªº±µÂI";
+ Text[ arabic ] = "ÊÍÏíÏ äÞÇØ áÕÞ ÃÎÑì";
+ Text[ dutch ] = "Markeer verdere plakpunten";
+ Text[ chinese_simplified ] = "±ê¼ÇÆäËûµÄÕ³½áµã";
+ Text[ greek ] = "ÓÞìáíóç åðéðëÝïí óçìåßùí êüëëçóçò";
+ Text[ korean ] = "±âŸ Á¢ÂøÁ¡ ¼±Åà ǥ½Ã";
+ Text[ turkish ] = "Ek yapýþtýrma noktalarý seç";
+ Text[ language_user1 ] = " ";
+};
+String STR_ViewCreateObj
+{
+ Text = "Erzeuge %O" ;
+ Text [ ENGLISH ] = "Create %O" ;
+ Text [ norwegian ] = "Lag %O" ;
+ Text [ italian ] = "Crea %O" ;
+ Text [ portuguese_brazilian ] = "Criar %O" ;
+ Text [ portuguese ] = "Criar %O" ;
+ Text [ finnish ] = "Luo %O" ;
+ Text [ danish ] = "Opret %O" ;
+ Text [ french ] = "Créer %O" ;
+ Text [ swedish ] = "Skapa %O" ;
+ Text [ dutch ] = "%O maken" ;
+ Text [ spanish ] = "Crear %O" ;
+ Text [ english_us ] = "Create %O" ;
+ Text[ chinese_simplified ] = "Éú³É %O";
+ Text[ russian ] = "Ñîçäàòü %O";
+ Text[ polish ] = "Utwórz %O";
+ Text[ japanese ] = "%O‚Ìì¬";
+ Text[ chinese_traditional ] = "¥Í¦¨ %O";
+ Text[ arabic ] = "ÅäÔÇÁ %O";
+ Text[ dutch ] = "%O maken";
+ Text[ chinese_simplified ] = "Éú³É %O";
+ Text[ greek ] = "Äçìéïõñãßá %O";
+ Text[ korean ] = "%O ¸¸µé±â";
+ Text[ turkish ] = "Oluþtur: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoInsertObj
+{
+ /* ### ACHTUNG: Neuer Text in Resource? %O einfügen : %O einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? %O einfügen : %O einf³gen */
+ Text = "%O einfügen" ;
+ Text [ ENGLISH ] = "Insert %O" ;
+ Text [ norwegian ] = "Sett inn %O" ;
+ Text [ italian ] = "Inserisci %O" ;
+ Text [ portuguese_brazilian ] = "Inserir %O" ;
+ Text [ portuguese ] = "Introduzir %O" ;
+ Text [ finnish ] = "Lisää %O" ;
+ Text [ danish ] = "Indsæt %O" ;
+ Text [ french ] = "Insérer %O" ;
+ Text [ swedish ] = "Infoga %O" ;
+ Text [ dutch ] = "%O invoegen" ;
+ Text [ spanish ] = "Insertar %O" ;
+ Text [ english_us ] = "Insert %O" ;
+ Text[ chinese_simplified ] = "²åÈë %O";
+ Text[ russian ] = "Âñòàâèòü %O";
+ Text[ polish ] = "Wstaw %O";
+ Text[ japanese ] = "%O‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤J %O";
+ Text[ arabic ] = "ÅÏÑÇÌ %O";
+ Text[ dutch ] = "%O invoegen";
+ Text[ chinese_simplified ] = "²åÈë %O";
+ Text[ greek ] = "ÅéóáãùãÞ %O";
+ Text[ korean ] = "%O »ðÀÔ";
+ Text[ turkish ] = "Ekle: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoCopyObj
+{
+ Text = "%O kopieren" ;
+ Text [ ENGLISH ] = "Copy %O" ;
+ Text [ norwegian ] = "Kopi %O" ;
+ Text [ italian ] = "Copia %O" ;
+ Text [ portuguese_brazilian ] = "Copiar %O" ;
+ Text [ portuguese ] = "Copiar %O" ;
+ Text [ finnish ] = "Kopioi %O" ;
+ Text [ danish ] = "Kopier %O" ;
+ Text [ french ] = "Copier %O" ;
+ Text [ swedish ] = "Kopiera %O" ;
+ Text [ dutch ] = "%O kopiëren" ;
+ Text [ spanish ] = "Copiar %O" ;
+ Text [ english_us ] = "Copy %O" ;
+ Text[ chinese_simplified ] = "¸´ÖÆ %O ";
+ Text[ russian ] = "Êîïèðîâàòü %O";
+ Text[ polish ] = "Kopiuj %O";
+ Text[ japanese ] = "%O‚ðºËß°‚·‚é";
+ Text[ chinese_traditional ] = "½Æ»s %O";
+ Text[ arabic ] = "äÓÎ %O";
+ Text[ dutch ] = "%O kopiëren";
+ Text[ chinese_simplified ] = "¸´ÖÆ %O ";
+ Text[ greek ] = "ÁíôéãñáöÞ %O";
+ Text[ korean ] = "%O º¹»ç";
+ Text[ turkish ] = "Kopyala: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoObjOrdNum
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Objektreihenfolge von %O ändern : Objektreihenfolge von %O õndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Objektreihenfolge von %O ändern : Objektreihenfolge von %O õndern */
+ Text = "Objektreihenfolge von %O ändern" ;
+ Text [ ENGLISH ] = "Change order of %O" ;
+ Text [ norwegian ] = "Endre rekkefølge av %O" ;
+ Text [ italian ] = "Cambia la sequenza degli oggetti di %O" ;
+ Text [ portuguese_brazilian ] = "Mudar ordem de %O" ;
+ Text [ portuguese ] = "Alterar sequência dos objectos de %O" ;
+ Text [ finnish ] = "Muuta objektien %O järjestystä" ;
+ Text [ danish ] = "Modificer objektrækkefølge for %O" ;
+ Text [ french ] = "Modifier l'ordre de %O" ;
+ Text [ swedish ] = "Ändra objektordningen för %O" ;
+ Text [ dutch ] = "Objectvolgorde van %O wijzigen" ;
+ Text [ spanish ] = "Modificar el orden de %O" ;
+ Text [ english_us ] = "Change object order of %O" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä¶ÔÏó˳Ðò %O";
+ Text[ russian ] = "Èçìåíèòü ïîðÿäîê îáúåêòà %O";
+ Text[ polish ] = "Zmieñ kolejnoœæ obiektów %O";
+ Text[ japanese ] = "%O‚̵ÌÞ¼Þª¸Ä‡˜‚ð•ÏX";
+ Text[ chinese_traditional ] = "ÅÜ§óª«¥ó¶¶§Ç %O";
+ Text[ arabic ] = "ÊÛííÑ ÊÑíÈ ÇáßÇÆä ãä %O";
+ Text[ dutch ] = "Objectvolgorde van %O wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä¶ÔÏó˳Ðò %O";
+ Text[ greek ] = "ÁëëáãÞ óåéñÜò áíôéêåéìÝíùí ôïõ %O";
+ Text[ korean ] = "%OÀÇ °³Ã¼ ¼ø¼­ º¯°æ";
+ Text[ turkish ] = "Nesne sýrasýný deðiþtir: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoObjSetText
+{
+ Text = "Text von %O editieren" ;
+ Text [ ENGLISH ] = "Edit text of %O" ;
+ Text [ norwegian ] = "Rediger tekst i %O" ;
+ Text [ italian ] = "Modifica testo di %O" ;
+ Text [ portuguese_brazilian ] = "Edit text of %O" ;
+ Text [ portuguese ] = "Editar texto de %O" ;
+ Text [ finnish ] = "Edit text of %O" ;
+ Text [ danish ] = "Rediger tekst af %O" ;
+ Text [ french ] = "Éditer le texte de %O" ;
+ Text [ swedish ] = "Redigera text för %0" ;
+ Text [ dutch ] = "Tekst van %0 editeren" ;
+ Text [ spanish ] = "Editar texto de %O" ;
+ Text [ english_us ] = "Edit text of %O" ;
+ Text[ chinese_simplified ] = "±à¼­ %O µÄÎÄ×Ö";
+ Text[ russian ] = "Ðåäàêòèðîâàòü òåêñò %O";
+ Text[ polish ] = "Edytuj tekst z %O";
+ Text[ japanese ] = "%O‚Ì÷½Ä‚ð•ÒW";
+ Text[ chinese_traditional ] = "½s¿è %O ªº¤å¦r";
+ Text[ arabic ] = "ÊÍÑíÑ äÕ %O";
+ Text[ dutch ] = "Tekst van %0 editeren";
+ Text[ chinese_simplified ] = "±à¼­ %O µÄÎÄ×Ö";
+ Text[ greek ] = "Åðåîåñãáóßá êåéìÝíïõ áðü %O";
+ Text[ korean ] = "%OÀÇ ÅؽºÆ® ÆíÁý";
+ Text[ turkish ] = "Metnini düzenle: %O";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoNewPage
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Seite einfügen : Seite einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Seite einfügen : Seite einf³gen */
+ Text = "Seite einfügen" ;
+ Text [ ENGLISH ] = "Insert page" ;
+ Text [ norwegian ] = "Insert page" ;
+ Text [ italian ] = "Inserisci pagina" ;
+ Text [ portuguese_brazilian ] = "Inserir página" ;
+ Text [ portuguese ] = "Inserir página" ;
+ Text [ finnish ] = "Lisää sivu" ;
+ Text [ danish ] = "Indsæt side" ;
+ Text [ french ] = "Insérer une page" ;
+ Text [ swedish ] = "Infoga sida" ;
+ Text [ dutch ] = "Pagina invoegen" ;
+ Text [ spanish ] = "Insertar página" ;
+ Text [ english_us ] = "Insert page" ;
+ Text[ chinese_simplified ] = "²åÈëÒ³Ãæ";
+ Text[ russian ] = "Âñòàâèòü ñòðàíèöó";
+ Text[ polish ] = "Wstaw stronê";
+ Text[ japanese ] = "Íß°¼Þ‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤J­¶­±";
+ Text[ arabic ] = "ÅÏÑÇÌ ÕÝÍÉ";
+ Text[ dutch ] = "Pagina invoegen";
+ Text[ chinese_simplified ] = "²åÈëÒ³Ãæ";
+ Text[ greek ] = "ÐñïóèÞêç óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö »ðÀÔ";
+ Text[ turkish ] = "Sayfa ekle";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoDelPage
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Seite löschen : Seite l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Seite löschen : Seite l÷schen */
+ Text = "Seite löschen" ;
+ Text [ ENGLISH ] = "Delete page" ;
+ Text [ norwegian ] = "Slett side" ;
+ Text [ italian ] = "Elimina pagina" ;
+ Text [ portuguese_brazilian ] = "Apagar página" ;
+ Text [ portuguese ] = "Eliminar página" ;
+ Text [ finnish ] = "Delete page" ;
+ Text [ danish ] = "Slet side" ;
+ Text [ french ] = "Supprimer la page" ;
+ Text [ swedish ] = "Radera sida" ;
+ Text [ dutch ] = "Pagina wissen" ;
+ Text [ spanish ] = "Eliminar página" ;
+ Text [ english_us ] = "Delete page" ;
+ Text[ chinese_simplified ] = "ɾ³ýÒ³Ãæ";
+ Text[ russian ] = "Óäàëèòü ñòðàíèöó";
+ Text[ polish ] = "Usuñ stronê";
+ Text[ japanese ] = "Íß°¼Þ‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£­¶­±";
+ Text[ arabic ] = "ÍÐÝ ÕÝÍÉ";
+ Text[ dutch ] = "Pagina wissen";
+ Text[ chinese_simplified ] = "ɾ³ýÒ³Ãæ";
+ Text[ greek ] = "ÄéáãñáöÞ óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö »èÁ¦";
+ Text[ turkish ] = "Sayfayý sil";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoCopPage
+{
+ Text = "Seite kopieren" ;
+ Text [ ENGLISH ] = "Copy page" ;
+ Text [ norwegian ] = "Kopier side" ;
+ Text [ italian ] = "Copia pagina" ;
+ Text [ portuguese_brazilian ] = "Copiar página" ;
+ Text [ portuguese ] = "Copiar página" ;
+ Text [ finnish ] = "Copy page" ;
+ Text [ danish ] = "Kopier side" ;
+ Text [ french ] = "Copier la page" ;
+ Text [ swedish ] = "Kopiera sida" ;
+ Text [ dutch ] = "Pagina kopiëren" ;
+ Text [ spanish ] = "Copiar página" ;
+ Text [ english_us ] = "Copy page" ;
+ Text[ chinese_simplified ] = "¸´ÖÆÒ³Ãæ";
+ Text[ russian ] = "Êîïèðîâàòü ñòðàíèöó";
+ Text[ polish ] = "Kopiuj stronê";
+ Text[ japanese ] = "Íß°¼Þ‚̺Ëß°";
+ Text[ chinese_traditional ] = "½Æ»s­¶­±";
+ Text[ arabic ] = "äÓÎ ÇáÕÝÍÉ";
+ Text[ dutch ] = "Pagina kopiëren";
+ Text[ chinese_simplified ] = "¸´ÖÆÒ³Ãæ";
+ Text[ greek ] = "ÁíôéãñáöÞ óåëßäáò";
+ Text[ korean ] = "ÆäÀÌÁö º¹»ç";
+ Text[ turkish ] = "Sayfayý kopyala";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoMovPage
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Reihenfolge der Seiten verändern : Reihenfolge der Seiten verõndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Reihenfolge der Seiten verändern : Reihenfolge der Seiten verõndern */
+ Text = "Reihenfolge der Seiten verändern" ;
+ Text [ ENGLISH ] = "Change order of pages" ;
+ Text [ norwegian ] = "Endre rekkefølge av sider" ;
+ Text [ italian ] = "Cambia la sequenza delle pagine" ;
+ Text [ portuguese_brazilian ] = "Change order of pages" ;
+ Text [ portuguese ] = "Alterar a ordem das páginas" ;
+ Text [ finnish ] = "Change order of pages" ;
+ Text [ danish ] = "Modificer siderækkefølge" ;
+ Text [ french ] = "Changer l'ordre des pages" ;
+ Text [ swedish ] = "Ändra sidornas följd" ;
+ Text [ dutch ] = "Paginavolgorde wijzigen" ;
+ Text [ spanish ] = "Modificar el orden de las páginas" ;
+ Text [ english_us ] = "Change order of pages" ;
+ Text[ chinese_simplified ] = "¸ü¸ÄÒ³ÃæµÄ˳Ðò";
+ Text[ russian ] = "Èçìåíèòü ïîðÿäîê ñòðàíèö";
+ Text[ polish ] = "Zmieñ kolejnoœæ stron";
+ Text[ japanese ] = "Íß°¼Þ‚̇˜‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧ󭶭±¶¶§Ç";
+ Text[ arabic ] = "ÊÛííÑ ÊÑÊíÈ ÇáÕÝÍÇÊ";
+ Text[ dutch ] = "Paginavolgorde wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸ÄÒ³ÃæµÄ˳Ðò";
+ Text[ greek ] = "ÁëëáãÞ óåéñÜò óåëßäùí";
+ Text[ korean ] = "ÆäÀÌÁö ¼ø¼­ º¯°æ";
+ Text[ turkish ] = "Sayfa sýrasýný deðiþtir";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoNewPageMasterDscr
+{
+ Text = "Hintergrundseite zuordnen" ;
+ Text [ ENGLISH ] = "Assign masterpage" ;
+ Text [ portuguese ] = "Atribuir página do plano de fundo" ;
+ Text [ english_us ] = "Assign background page" ;
+ Text [ portuguese_brazilian ] = "Hintergrundseite zuordnen" ;
+ Text [ swedish ] = "Tilldela bakgrundssida" ;
+ Text [ danish ] = "Tildel baggrundsside" ;
+ Text [ italian ] = "Correla pagina di sfondo" ;
+ Text [ spanish ] = "Asignar página de fondo" ;
+ Text [ french ] = "Assigner un arrière-plan" ;
+ Text [ dutch ] = "Achtergrondpagina toewijzen" ;
+ Text[ chinese_simplified ] = "ÅäÖñ³¾°Ò³Ãæ";
+ Text[ russian ] = "Íàçíà÷èòü ñòðàíèöó ôîíà";
+ Text[ polish ] = "Przypisz stronê t³a";
+ Text[ japanese ] = "”wŒi‚ÌÍß°¼Þ‚ðŠ„‚è“–‚Ä‚é";
+ Text[ chinese_traditional ] = "°t¸m­I´º­¶­±";
+ Text[ arabic ] = "ÊÚííä ÕÝÍÉ ÇáÎáÝíÉ";
+ Text[ dutch ] = "Achtergrondpagina toewijzen";
+ Text[ chinese_simplified ] = "ÅäÖñ³¾°Ò³Ãæ";
+ Text[ greek ] = "Áíôéóôïß÷éóç óåëßäáò öüíôïõ";
+ Text[ korean ] = "¹è°æ ÆäÀÌÁö ¹èÁ¤";
+ Text[ turkish ] = "Artalan sayfasý ata";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoDelPageMasterDscr
+{
+ Text = "Hintergrundseitenzuordnung entfernen" ;
+ Text [ ENGLISH ] = "Remove masterpage-assignment" ;
+ Text [ portuguese ] = "Remover atributos da página do plano de fundo" ;
+ Text [ english_us ] = "Clear background page assignment" ;
+ Text [ portuguese_brazilian ] = "Hintergrundseitenzuordnung entfernen" ;
+ Text [ swedish ] = "Ta bort sidformatmallens bakgrund" ;
+ Text [ danish ] = "Fjern baggrundssidetildeling" ;
+ Text [ italian ] = "Elimina correlazione pagina di sfondo" ;
+ Text [ spanish ] = "Eliminar atributos de la página de fondo" ;
+ Text [ french ] = "Supprimer les attributs d'une page en arrière-plan" ;
+ Text [ dutch ] = "Toewijzing achtergrondpagina´s verwijderen" ;
+ Text[ chinese_simplified ] = "ɾ³ý±³¾°Ò³ÃæÅäÖÃ";
+ Text[ russian ] = "Óäàëèòü íàçíà÷åíèå ñòðàíèöû ôîíà";
+ Text[ polish ] = "Usuñ atrybuty t³a stron";
+ Text[ japanese ] = "”wŒiÍß°¼Þ‚ÌŠ„‚è“–‚Ä‚ðíœ";
+ Text[ chinese_traditional ] = "§R°£­I´º­¶­±°t¸m";
+ Text[ arabic ] = "ÅÒÇáÉ ÊÚííä ÕÝÍÇÊ ÇáÎáÝíÉ";
+ Text[ dutch ] = "Toewijzing achtergrondpagina´s verwijderen";
+ Text[ chinese_simplified ] = "ɾ³ý±³¾°Ò³ÃæÅäÖÃ";
+ Text[ greek ] = "ÊáôÜñãçóç áíôéóôïß÷çóçò óåëéäþí öüíôïõ";
+ Text[ korean ] = "¹è°æ ÆäÀÌÁö ¹èÁ¤ Á¦°Å";
+ Text[ turkish ] = "Artalan sayfa atamasýný kaldýr";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoMovPageMasterDscr
+{
+ Text = "Hintergrundseitenzuordnung verschieben" ;
+ Text [ ENGLISH ] = "Move masterpage-assignment" ;
+ Text [ portuguese ] = "Mover atributos da página do plano de fundo" ;
+ Text [ english_us ] = "Move background page assignment" ;
+ Text [ portuguese_brazilian ] = "Hintergrundseitenzuordnung verschieben" ;
+ Text [ swedish ] = "Flytta sidformatmallens bakgrund" ;
+ Text [ danish ] = "Flyt baggrundssidetildeling" ;
+ Text [ italian ] = "Sposta correlazione pagina di sfondo" ;
+ Text [ spanish ] = "Desplazar atributos de la página de fondo" ;
+ Text [ french ] = "Déplacer attributs de la page en arrière-plan" ;
+ Text [ dutch ] = "Toewijzing achtergrondpagina´s verplaatsen" ;
+ Text[ chinese_simplified ] = "Òƶ¯±³¾°Ò³Ãæ·ÖÅä";
+ Text[ russian ] = "Ïåðåìåñòèòü íàçíà÷åíèå ñòðàíèöû ôîíà";
+ Text[ polish ] = "Przesuñ atrybuty t³a stron";
+ Text[ japanese ] = "”wŒi‚ÌÍß°¼ÞŠ„‚è“–‚Ä‚ðˆÚ“®";
+ Text[ chinese_traditional ] = "²¾°Ê­I´º­¶­±°t¸m";
+ Text[ arabic ] = "ÅÒÇÍÉ ÊÚííä ÕÝÍÉ ÇáÎáÝíÉ";
+ Text[ dutch ] = "Toewijzing achtergrondpagina´s verplaatsen";
+ Text[ chinese_simplified ] = "Òƶ¯±³¾°Ò³Ãæ·ÖÅä";
+ Text[ greek ] = "Ìåôáêßíçóç áíôéóôïß÷çóçò óåëéäþí öüíôïõ";
+ Text[ korean ] = "¹è°æ ÆäÀÌÁö ¹èÁ¤ À̵¿";
+ Text[ turkish ] = "Artalan sayfa atamasýný taþý";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoChgPageMasterDscr
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Hintergrundseitenzuordnung ändern : Hintergrundseitenzuordnung õndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Hintergrundseitenzuordnung ändern : Hintergrundseitenzuordnung õndern */
+ Text = "Hintergrundseitenzuordnung ändern" ;
+ Text [ ENGLISH ] = "Change masterpage-assignment" ;
+ Text [ portuguese ] = "Alterar atributos da página do plano de fundo" ;
+ Text [ english_us ] = "Change background page assignment" ;
+ Text [ portuguese_brazilian ] = "Hintergrundseitenzuordnung ändern" ;
+ Text [ swedish ] = "Ändra sidformatmallens bakgrund" ;
+ Text [ danish ] = "Modificer baggrundssidetildeling" ;
+ Text [ italian ] = "Modifica correlazione pagina di sfondo" ;
+ Text [ spanish ] = "Modificar atributos de la página de fondo" ;
+ Text [ french ] = "Modifier les attributs d'une page en arrière-plan" ;
+ Text [ dutch ] = "Toewijzing achtergrondpagina´s wijzigen" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä±³¾°Ò³ÃæÅäÖÃ";
+ Text[ russian ] = "Èçìåíèòü íàçíà÷åíèå ñòðàíèöû ôîíà";
+ Text[ polish ] = "Zmieñ atrybuty t³a stron";
+ Text[ japanese ] = "”wŒi‚ÌÍß°¼ÞŠ„‚è“–‚Ä‚Ì•ÏX";
+ Text[ chinese_traditional ] = "Åܧó­I´º­¶­±°t¸m";
+ Text[ arabic ] = "ÊÛííÑ ÊÚííä ÕÝÍÇÊ ÇáÎáÝíÉ";
+ Text[ dutch ] = "Toewijzing achtergrondpagina´s wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä±³¾°Ò³ÃæÅäÖÃ";
+ Text[ greek ] = "ÁëëáãÞ áíôéóôïß÷éóçò óåëéäþí öüíôïõ";
+ Text[ korean ] = "¹è°æ ÆäÀÌÁö ¹èÁ¤ º¯°æ";
+ Text[ turkish ] = "Artalan sayfa atamasýný deðiþtir";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoMergeModel
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Dokument einfügen : Dokument einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Dokument einfügen : Dokument einf³gen */
+ Text = "Dokument einfügen" ;
+ Text [ ENGLISH ] = "Insert document" ;
+ Text [ portuguese ] = "Inserir documento" ;
+ Text [ english_us ] = "Insert document" ;
+ Text [ portuguese_brazilian ] = "Dokument einfügen" ;
+ Text [ swedish ] = "Infoga dokument" ;
+ Text [ danish ] = "Indsæt dokument" ;
+ Text [ italian ] = "Inserisci documento" ;
+ Text [ spanish ] = "Insertar documento" ;
+ Text [ french ] = "Insérer un document" ;
+ Text [ dutch ] = "Document invoegen" ;
+ Text[ chinese_simplified ] = "²åÈëÎĵµ";
+ Text[ russian ] = "Âñòàâèòü äîêóìåíò";
+ Text[ polish ] = "Wstaw dokument";
+ Text[ japanese ] = "ÄÞ·­ÒÝÄ‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤J¤å¥ó";
+ Text[ arabic ] = "ÅÏÑÇÌ ãÓÊäÏ";
+ Text[ dutch ] = "Document invoegen";
+ Text[ chinese_simplified ] = "²åÈëÎĵµ";
+ Text[ greek ] = "ÅéóáãùãÞ åããñÜöïõ";
+ Text[ korean ] = "¹®¼­ »ðÀÔ";
+ Text[ turkish ] = "Belge ekle";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoNewLayer
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Ebene einfügen : Ebene einf³gen */
+ /* ### ACHTUNG: Neuer Text in Resource? Ebene einfügen : Ebene einf³gen */
+ Text = "Ebene einfügen" ;
+ Text [ ENGLISH ] = "Insert layer" ;
+ Text [ portuguese ] = "Inserir nível" ;
+ Text [ english_us ] = "Insert Layer" ;
+ Text [ portuguese_brazilian ] = "Ebene einfügen" ;
+ Text [ swedish ] = "Infoga nivå" ;
+ Text [ danish ] = "Indsæt niveau" ;
+ Text [ italian ] = "Inserisci livello" ;
+ Text [ spanish ] = "Insertar nivel" ;
+ Text [ french ] = "Insérer une couche" ;
+ Text [ dutch ] = "Niveau invoegen" ;
+ Text[ chinese_simplified ] = "²åÈë·Ö²ã";
+ Text[ russian ] = "Âñòàâèòü ñëîé";
+ Text[ polish ] = "Wstaw warstwê";
+ Text[ japanese ] = "‘w‚Ì‘}“ü";
+ Text[ chinese_traditional ] = "´¡¤J¤À¼h";
+ Text[ arabic ] = "ÅÏÑÇÌ ØÈÞÉ";
+ Text[ dutch ] = "Niveau invoegen";
+ Text[ chinese_simplified ] = "²åÈë·Ö²ã";
+ Text[ greek ] = "ÅéóáãùãÞ åðéðÝäïõ";
+ Text[ korean ] = "°èÃþ »ðÀÔ";
+ Text[ turkish ] = "Düzey ekle";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoDelLayer
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Ebene löschen : Ebene l÷schen */
+ /* ### ACHTUNG: Neuer Text in Resource? Ebene löschen : Ebene l÷schen */
+ Text = "Ebene löschen" ;
+ Text [ ENGLISH ] = "Delete layer" ;
+ Text [ portuguese ] = "Eliminar nível" ;
+ Text [ english_us ] = "Delete layer" ;
+ Text [ portuguese_brazilian ] = "Ebene löschen" ;
+ Text [ swedish ] = "Radera nivå" ;
+ Text [ danish ] = "Slet niveau" ;
+ Text [ italian ] = "Elimina livello" ;
+ Text [ spanish ] = "Eliminar nivel" ;
+ Text [ french ] = "Supprimer le niveau" ;
+ Text [ dutch ] = "Niveau wissen" ;
+ Text[ chinese_simplified ] = "ɾ³ý·Ö²ã";
+ Text[ russian ] = "Óäàëèòü ñëîé";
+ Text[ polish ] = "Usuñ warstwê";
+ Text[ japanese ] = "‘w‚Ìíœ";
+ Text[ chinese_traditional ] = "§R°£¤À¼h";
+ Text[ arabic ] = "ÍÐÝ ØÈÞÉ";
+ Text[ dutch ] = "Niveau wissen";
+ Text[ chinese_simplified ] = "ɾ³ý·Ö²ã";
+ Text[ greek ] = "ÄéáãñáöÞ åðéðÝäïõ";
+ Text[ korean ] = "°èÃþ »èÁ¦";
+ Text[ turkish ] = "Düzey sil";
+ Text[ language_user1 ] = " ";
+};
+String STR_UndoMovLayer
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Reihenfolge der Ebenen verändern : Reihenfolge der Ebenen verõndern */
+ /* ### ACHTUNG: Neuer Text in Resource? Reihenfolge der Ebenen verändern : Reihenfolge der Ebenen verõndern */
+ Text = "Reihenfolge der Ebenen verändern" ;
+ Text [ ENGLISH ] = "Change order of layers" ;
+ Text [ portuguese ] = "Alterar a ordem dos níveis" ;
+ Text [ english_us ] = "Change order of layers" ;
+ Text [ portuguese_brazilian ] = "Reihenfolge der Ebenen verändern" ;
+ Text [ swedish ] = "Ändra nivåernas ordning" ;
+ Text [ danish ] = "Modificer niveaurækkefølge" ;
+ Text [ italian ] = "Cambia la sequenza dei livelli" ;
+ Text [ spanish ] = "Modificar el orden de los niveles" ;
+ Text [ french ] = "Changer l'ordre des niveaux" ;
+ Text [ dutch ] = "Niveauvolgorde wijzigen" ;
+ Text[ chinese_simplified ] = "¸ü¸Ä·Ö²ã˳Ðò";
+ Text[ russian ] = "Èçìåíèòü ïîñëåäîâàòåëüíîñòü ñëîåâ";
+ Text[ polish ] = "Zmieñ kolejnoœæ warstw";
+ Text[ japanese ] = "‘w‚̇˜‚ð•ÏX";
+ Text[ chinese_traditional ] = "Åܧó¤À¼h¶¶§Ç";
+ Text[ arabic ] = "ÊÛííÑ ÊÑÊíÈ ÇáØÈÞÇÊ";
+ Text[ dutch ] = "Niveauvolgorde wijzigen";
+ Text[ chinese_simplified ] = "¸ü¸Ä·Ö²ã˳Ðò";
+ Text[ greek ] = "ÁëëáãÞ äéÜôáîçò åðéðÝäùí";
+ Text[ korean ] = "°èÃþ ¼ø¼­ º¯°æ";
+ Text[ turkish ] = "Düzey sýrasýný deðiþtir";
+ Text[ language_user1 ] = " ";
+};
+String STR_StandardLayerName
+{
+ Text = "Standard" ;
+ Text [ ENGLISH ] = "Standard" ;
+ Text [ norwegian ] = "Standard" ;
+ Text [ italian ] = "Standard" ;
+ Text [ portuguese_brazilian ] = "Padrão" ;
+ Text [ portuguese ] = "Padrão" ;
+ 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 ] = "±ê×¼";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ polish ] = "Standard";
+ Text[ japanese ] = "•W€";
+ Text[ chinese_traditional ] = "¼Ð·Ç";
+ Text[ arabic ] = "ÞíÇÓí";
+ Text[ dutch ] = "Standaard";
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "Ç¥ÁØ";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ItemValON
+{
+ Text = "ein" ;
+ Text [ ENGLISH ] = "on" ;
+ Text [ portuguese ] = "Ligado" ;
+ Text [ english_us ] = "on" ;
+ Text [ portuguese_brazilian ] = "ein" ;
+ Text [ swedish ] = "på" ;
+ Text [ danish ] = "aktiveret" ;
+ Text [ italian ] = "on" ;
+ Text [ spanish ] = "activado" ;
+ Text [ french ] = "activé" ;
+ Text [ dutch ] = "aan" ;
+ Text[ chinese_simplified ] = "¼¤»î";
+ Text[ russian ] = "âêë.";
+ Text[ polish ] = "w³¹cz";
+ Text[ japanese ] = "µÝ";
+ Text[ chinese_traditional ] = "¿E¬¡";
+ Text[ arabic ] = "ÊÔÛíá";
+ Text[ dutch ] = "aan";
+ Text[ chinese_simplified ] = "¼¤»î";
+ Text[ greek ] = "íáé";
+ Text[ korean ] = "Àû¿ë";
+ Text[ turkish ] = "Açýk";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValOFF
+{
+ Text = "aus" ;
+ Text [ ENGLISH ] = "off" ;
+ Text [ portuguese ] = "Desligado" ;
+ Text [ english_us ] = "off" ;
+ Text [ portuguese_brazilian ] = "aus" ;
+ Text [ swedish ] = "av" ;
+ Text [ danish ] = "deaktiveret" ;
+ Text [ italian ] = "off" ;
+ Text [ spanish ] = "desactivado" ;
+ Text [ french ] = "désactivé" ;
+ Text [ dutch ] = "uit" ;
+ Text[ chinese_simplified ] = "ʧ»î";
+ Text[ russian ] = "âûêë.";
+ Text[ polish ] = "wy³¹cz";
+ Text[ japanese ] = "µÌ";
+ Text[ chinese_traditional ] = "¥¢¬¡";
+ Text[ arabic ] = "ÅíÞÇÝ";
+ Text[ dutch ] = "uit";
+ Text[ chinese_simplified ] = "ʧ»î";
+ Text[ greek ] = "ü÷é";
+ Text[ korean ] = "ÇØÁ¦";
+ Text[ turkish ] = "Kapalý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValYES
+{
+ Text = "ja" ;
+ Text [ ENGLISH ] = "yes" ;
+ Text [ portuguese ] = "sim" ;
+ Text [ english_us ] = "yes" ;
+ Text [ portuguese_brazilian ] = "ja" ;
+ Text [ swedish ] = "ja" ;
+ Text [ danish ] = "ja" ;
+ Text [ italian ] = "sì" ;
+ Text [ spanish ] = "sí" ;
+ Text [ french ] = "oui" ;
+ Text [ dutch ] = "ja" ;
+ Text[ chinese_simplified ] = "ÊÇ";
+ Text[ russian ] = "äà";
+ Text[ polish ] = "tak";
+ Text[ japanese ] = "‚Í‚¢";
+ Text[ chinese_traditional ] = "¬O";
+ Text[ arabic ] = "äÚã";
+ Text[ dutch ] = "ja";
+ Text[ chinese_simplified ] = "ÊÇ";
+ Text[ greek ] = "váé";
+ Text[ korean ] = "¿¹";
+ Text[ turkish ] = "Evet";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValNO
+{
+ Text = "nein" ;
+ Text [ ENGLISH ] = "no" ;
+ Text [ portuguese ] = "Não" ;
+ Text [ english_us ] = "No" ;
+ Text [ portuguese_brazilian ] = "nein" ;
+ Text [ swedish ] = "nej" ;
+ Text [ danish ] = "nej" ;
+ Text [ italian ] = "no" ;
+ Text [ spanish ] = "No" ;
+ Text [ french ] = "non" ;
+ Text [ dutch ] = "nee" ;
+ Text[ chinese_simplified ] = "·ñ";
+ Text[ russian ] = "íåò";
+ Text[ polish ] = "Nie";
+ Text[ japanese ] = "‚¢‚¢‚¦";
+ Text[ chinese_traditional ] = "§_";
+ Text[ arabic ] = "áÇ";
+ Text[ dutch ] = "nee";
+ Text[ chinese_simplified ] = "·ñ";
+ Text[ greek ] = "ü÷é";
+ Text[ korean ] = "¾Æ´Ï¿À";
+ Text[ turkish ] = "Hayýr";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ItemValCAPTIONTYPE1
+{
+ Text = "Typ 1" ;
+ Text [ ENGLISH ] = "Type 1" ;
+ Text [ portuguese ] = "Tipo 1" ;
+ Text [ english_us ] = "Type 1" ;
+ Text [ portuguese_brazilian ] = "Typ 1" ;
+ Text [ swedish ] = "Typ 1" ;
+ Text [ danish ] = "Type 1" ;
+ Text [ italian ] = "Tipo 1" ;
+ Text [ spanish ] = "Tipo 1" ;
+ Text [ french ] = "Type 1" ;
+ Text [ dutch ] = "Type 1" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ 1";
+ Text[ russian ] = "Òèï 1";
+ Text[ polish ] = "Typ 1";
+ Text[ japanese ] = "À²Ìß1";
+ Text[ chinese_traditional ] = "Ãþ«¬ 1";
+ Text[ arabic ] = "ÇáäæÚ 1";
+ Text[ dutch ] = "Type 1";
+ Text[ chinese_simplified ] = "ÀàÐÍ 1";
+ Text[ greek ] = "Ôýðïò 1";
+ Text[ korean ] = "À¯Çü 1";
+ Text[ turkish ] = "Tip 1";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValCAPTIONTYPE2
+{
+ Text = "Typ 2" ;
+ Text [ ENGLISH ] = "Type 2" ;
+ Text [ portuguese ] = "Tipo 2" ;
+ Text [ english_us ] = "Type 2" ;
+ Text [ portuguese_brazilian ] = "Typ 2" ;
+ Text [ swedish ] = "Typ 2" ;
+ Text [ danish ] = "Type 2" ;
+ Text [ italian ] = "Tipo 2" ;
+ Text [ spanish ] = "Tipo 2" ;
+ Text [ french ] = "Type 2" ;
+ Text [ dutch ] = "Type 2" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ 2";
+ Text[ russian ] = "Òèï 2";
+ Text[ polish ] = "Typ 2";
+ Text[ japanese ] = "À²Ìß2";
+ Text[ chinese_traditional ] = "Ãþ«¬ 2";
+ Text[ arabic ] = "ÇáäæÚ 2";
+ Text[ dutch ] = "Type 2";
+ Text[ chinese_simplified ] = "ÀàÐÍ 2";
+ Text[ greek ] = "Ôýðïò 2";
+ Text[ korean ] = "À¯Çü 2";
+ Text[ turkish ] = "Tip 2";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValCAPTIONTYPE3
+{
+ Text = "Typ 3" ;
+ Text [ ENGLISH ] = "Type 3" ;
+ Text [ portuguese ] = "Tipo 3" ;
+ Text [ english_us ] = "Type 3" ;
+ Text [ portuguese_brazilian ] = "Typ 3" ;
+ Text [ swedish ] = "Typ 3" ;
+ Text [ danish ] = "Type 3" ;
+ Text [ italian ] = "Tipo 3" ;
+ Text [ spanish ] = "Tipo 3" ;
+ Text [ french ] = "Type 3" ;
+ Text [ dutch ] = "Type 3" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ 3";
+ Text[ russian ] = "Òèï 3";
+ Text[ polish ] = "Typ 3";
+ Text[ japanese ] = "À²Ìß3";
+ Text[ chinese_traditional ] = "Ãþ«¬ 3";
+ Text[ arabic ] = "ÇáäæÚ 3";
+ Text[ dutch ] = "Type 3";
+ Text[ chinese_simplified ] = "ÀàÐÍ 3";
+ Text[ greek ] = "Ôýðïò 3";
+ Text[ korean ] = "À¯Çü 3";
+ Text[ turkish ] = "Tip 3";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValCAPTIONTYPE4
+{
+ Text = "Typ 4" ;
+ Text [ ENGLISH ] = "Type 4" ;
+ Text [ portuguese ] = "Tipo 4" ;
+ Text [ english_us ] = "Type 4" ;
+ Text [ portuguese_brazilian ] = "Typ 4" ;
+ Text [ swedish ] = "Typ 4" ;
+ Text [ danish ] = "Type 4" ;
+ Text [ italian ] = "Tipo 4" ;
+ Text [ spanish ] = "Tipo 4" ;
+ Text [ french ] = "Type 4" ;
+ Text [ dutch ] = "Type 4" ;
+ Text[ chinese_simplified ] = "ÀàÐÍ 4";
+ Text[ russian ] = "Òèï 4";
+ Text[ polish ] = "Typ 4";
+ Text[ japanese ] = "À²Ìß4";
+ Text[ chinese_traditional ] = "Ãþ«¬ 4";
+ Text[ arabic ] = "ÇáäæÚ 4";
+ Text[ dutch ] = "Type 4";
+ Text[ chinese_simplified ] = "ÀàÐÍ 4";
+ Text[ greek ] = "Ôýðïò 4";
+ Text[ korean ] = "À¯Çü 4";
+ Text[ turkish ] = "Tip 4";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValCAPTIONESCHORI
+{
+ Text = "Horizontal" ;
+ Text [ ENGLISH ] = "Horizontal" ;
+ Text [ portuguese ] = "Horizontal" ;
+ Text [ english_us ] = "Horizontal" ;
+ Text [ portuguese_brazilian ] = "Horizontal" ;
+ Text [ swedish ] = "Horisontellt" ;
+ Text [ danish ] = "Vandret" ;
+ Text [ italian ] = "Orizzontale" ;
+ Text [ spanish ] = "Horizontal" ;
+ Text [ french ] = "Horizontal" ;
+ Text [ dutch ] = "Horizontaal" ;
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò";
+ Text[ russian ] = "Ãîðèçîíòàëüíî";
+ Text[ polish ] = "Poziomo";
+ Text[ japanese ] = "…•½";
+ Text[ chinese_traditional ] = "¤ô¥­¤è¦V";
+ Text[ arabic ] = "ÃÝÞí";
+ Text[ dutch ] = "Horizontaal";
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò";
+ Text[ greek ] = "Ïñéæüíôéá";
+ Text[ korean ] = "¼öÆò";
+ Text[ turkish ] = "Yatay";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValCAPTIONESCVERT
+{
+ Text = "Vertikal" ;
+ Text [ ENGLISH ] = "Vertical" ;
+ Text [ portuguese ] = "Vertical" ;
+ Text [ english_us ] = "Vertical" ;
+ Text [ portuguese_brazilian ] = "Vertikal" ;
+ Text [ swedish ] = "Vertikalt" ;
+ Text [ danish ] = "Lodret" ;
+ Text [ italian ] = "Verticale" ;
+ Text [ spanish ] = "Vertical" ;
+ Text [ french ] = "Vertical" ;
+ Text [ dutch ] = "Verticaal" ;
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò";
+ Text[ russian ] = "Âåðòèêàëüíî";
+ Text[ polish ] = "Pionowo";
+ Text[ japanese ] = "‚’¼";
+ Text[ chinese_traditional ] = "««ª½¤è¦V";
+ Text[ arabic ] = "ÑÃÓí";
+ Text[ dutch ] = "Verticaal";
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò";
+ Text[ greek ] = "Êáôáêüñõöá";
+ Text[ korean ] = "¼öÁ÷";
+ Text[ turkish ] = "Dikey";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValCAPTIONESCBESTFIT
+{
+ Text = "Automatisch" ;
+ Text [ ENGLISH ] = "Best fit" ;
+ Text [ portuguese ] = "Automático" ;
+ Text [ english_us ] = "Automatic" ;
+ Text [ portuguese_brazilian ] = "Automatisch" ;
+ Text [ swedish ] = "Automatisk" ;
+ Text [ danish ] = "Automatisk" ;
+ Text [ italian ] = "Automatico" ;
+ Text [ spanish ] = "Automático" ;
+ Text [ french ] = "Automatique" ;
+ Text [ dutch ] = "Automatisch" ;
+ Text[ chinese_simplified ] = "×Ô¶¯";
+ Text[ russian ] = "Àâòîìàòè÷åñêè";
+ Text[ polish ] = "Automatycznie";
+ Text[ japanese ] = "Ž©“®";
+ Text[ chinese_traditional ] = "¦Û°Ê";
+ Text[ arabic ] = "ÊáÞÇÆí";
+ Text[ dutch ] = "Automatisch";
+ Text[ chinese_simplified ] = "×Ô¶¯";
+ Text[ greek ] = "Áõôüìáôá";
+ Text[ korean ] = "ÀÚµ¿";
+ Text[ turkish ] = "Otomatik";
+ Text[ language_user1 ] = " ";
+};
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ItemValFITTOSIZENONE
+{
+ Text = "Aus" ;
+ Text [ ENGLISH ] = "Off" ;
+ Text [ portuguese ] = "Desl." ;
+ Text [ english_us ] = "Off" ;
+ Text [ portuguese_brazilian ] = "Aus" ;
+ Text [ swedish ] = "Av" ;
+ Text [ danish ] = "Deaktiveret" ;
+ Text [ italian ] = "Off" ;
+ Text [ spanish ] = "Desactivado" ;
+ Text [ french ] = "Désactivé" ;
+ Text [ dutch ] = "Uit" ;
+ Text[ chinese_simplified ] = "ʧ»î";
+ Text[ russian ] = "Âûêë.";
+ Text[ polish ] = "Wy³¹cz";
+ Text[ japanese ] = "µÌ";
+ Text[ chinese_traditional ] = "¥¢¬¡";
+ Text[ arabic ] = "ÅíÞÇÝ";
+ Text[ dutch ] = "Uit";
+ Text[ chinese_simplified ] = "ʧ»î";
+ Text[ greek ] = "¼÷é";
+ Text[ korean ] = "ÇØÁ¦";
+ Text[ turkish ] = "Kapalý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValFITTOSIZEPROP
+{
+ Text = "Proportional" ;
+ Text [ ENGLISH ] = "Proportional" ;
+ Text [ portuguese ] = "Proporcional" ;
+ Text [ english_us ] = "Proportional" ;
+ Text [ portuguese_brazilian ] = "Proportional" ;
+ Text [ swedish ] = "Proportionell" ;
+ Text [ danish ] = "Proportional" ;
+ Text [ italian ] = "Proporzionale" ;
+ Text [ spanish ] = "Proporcional" ;
+ Text [ french ] = "Proportionnel" ;
+ Text [ dutch ] = "Proportioneel" ;
+ Text[ chinese_simplified ] = "³É±ÈÀý";
+ Text[ russian ] = "Ïðîïîðöèîíàëüíî";
+ Text[ polish ] = "Proporcjonalny";
+ Text[ japanese ] = "‹Ï®";
+ Text[ chinese_traditional ] = "¦¨¤ñ¨Ò";
+ Text[ arabic ] = "ÊäÇÓÈí";
+ Text[ dutch ] = "Proportioneel";
+ Text[ chinese_simplified ] = "³É±ÈÀý";
+ Text[ greek ] = "ÁíáëïãéêÜ";
+ Text[ korean ] = "ºñ·Ê";
+ Text[ turkish ] = "Orantýlý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValFITTOSIZEALLLINES
+{
+ Text = "Alle Zeilen separat" ;
+ Text [ ENGLISH ] = "All lines" ;
+ Text [ portuguese ] = "Todas as linhas separadas" ;
+ Text [ english_us ] = "Fit to size (all rows seperately) " ;
+ Text [ portuguese_brazilian ] = "Alle Zeilen separat" ;
+ Text [ swedish ] = "Alla rader separat" ;
+ Text [ danish ] = "Alle rækker separat" ;
+ Text [ italian ] = "Tutte le righe separate" ;
+ Text [ spanish ] = "Todas las filas separadas" ;
+ Text [ french ] = "Toutes les lignes séparément" ;
+ Text [ dutch ] = "Alle rijen separaat" ;
+ Text[ chinese_simplified ] = "µ¥¶À´¦ÀíËùÓеÄÐÐ";
+ Text[ russian ] = "Âñå ñòðîêè îòäåëüíî";
+ Text[ polish ] = "Wszystkie wiersze oddzielnie";
+ Text[ japanese ] = "‘SsŒÂ•Ê";
+ Text[ chinese_traditional ] = "³æ¿W³B²z©Ò¦³ªº¦æ";
+ Text[ arabic ] = "ßá ÇáÕÝæÝ ãäÝÕáÉ";
+ Text[ dutch ] = "Alle rijen separaat";
+ Text[ chinese_simplified ] = "µ¥¶À´¦ÀíËùÓеÄÐÐ";
+ Text[ greek ] = "¼ëåò ôéò óôÞëåò îå÷ùñéóôÜ";
+ Text[ korean ] = "¸ðµç ÇàÀ» ºÐ¸®";
+ Text[ turkish ] = "Tüm satýrlarý tek tek sýðdýr";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValFITTOSIZERESIZEAT
+{
+ Text = "Durch hartes ueberattributieren" ;
+ Text [ ENGLISH ] = "Using hard attributes" ;
+ Text [ portuguese ] = "Usar atributos duros" ;
+ Text [ english_us ] = "Use hard attributes" ;
+ Text [ portuguese_brazilian ] = "Durch hartes ueberattributieren" ;
+ Text [ swedish ] = "Genom hård överattributering" ;
+ Text [ danish ] = "Gennem hård attributering" ;
+ Text [ italian ] = "Usa attributi duri" ;
+ Text [ spanish ] = "Usar atributos fijos" ;
+ Text [ french ] = "Forcer : plus d'attributs" ;
+ Text [ dutch ] = "Gebruik vaste attributen" ;
+ Text[ chinese_simplified ] = "ʹÓÃÊÖ¹¤ÊôÐÔ";
+ Text[ russian ] = "Ïðèìåíèòü æåñòêèå àòðèáóòû";
+ Text[ polish ] = "Zastosuj twarde atrybuty";
+ Text[ japanese ] = "Žè“®‚Å‘®«‚ðŽg—p";
+ Text[ chinese_traditional ] = "¨Ï¥Î¤â¤uÄÝ©Ê";
+ Text[ language_user1 ] = " ";
+ Text[ arabic ] = "ÇÓÊÎÏÇã ÓãÇÊ íÏæíÉ";
+ Text[ dutch ] = "Gebruik vaste attributen";
+ Text[ chinese_simplified ] = "ʹÓÃÊÖ¹¤ÊôÐÔ";
+ Text[ greek ] = "×ñÞóç \"óêëçñþí\" éäéïôÞôùí";
+ Text[ korean ] = "°íÁ¤ ¼Ó¼º »ç¿ë";
+ Text[ turkish ] = "Sabit öznitelikler";
+};
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ItemValTEXTVADJTOP
+{
+ Text = "Oben" ;
+ Text [ ENGLISH ] = "Top" ;
+ Text [ portuguese ] = "Em cima" ;
+ Text [ english_us ] = "Top" ;
+ Text [ portuguese_brazilian ] = "Oben" ;
+ Text [ swedish ] = "Överst" ;
+ Text [ danish ] = "Oppe" ;
+ Text [ italian ] = "Sopra" ;
+ Text [ spanish ] = "Arriba" ;
+ Text [ french ] = "En haut" ;
+ Text [ dutch ] = "Boven" ;
+ Text[ chinese_simplified ] = "ÉÏ";
+ Text[ russian ] = "Ââåðõó";
+ Text[ polish ] = "W górze";
+ Text[ japanese ] = "ã";
+ Text[ chinese_traditional ] = "¤W";
+ Text[ arabic ] = "ÃÚáì";
+ Text[ dutch ] = "Boven";
+ Text[ chinese_simplified ] = "ÉÏ";
+ Text[ greek ] = "ÐÜíù";
+ Text[ korean ] = "ˤ";
+ Text[ turkish ] = "Üst";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTVADJCENTER
+{
+ Text = "Mitte" ;
+ Text [ ENGLISH ] = "Center" ;
+ Text [ portuguese ] = "Centro" ;
+ Text [ english_us ] = "Center" ;
+ Text [ portuguese_brazilian ] = "Mitte" ;
+ Text [ swedish ] = "Mitten" ;
+ Text [ danish ] = "Midte" ;
+ Text [ italian ] = "Centro" ;
+ Text [ spanish ] = "Centro" ;
+ Text [ french ] = "Milieu" ;
+ Text [ dutch ] = "Midden" ;
+ Text[ chinese_simplified ] = "ÖÐ";
+ Text[ russian ] = "Ïî ñåðåäèíå";
+ Text[ polish ] = "Œrodek";
+ Text[ japanese ] = "’†‰›";
+ Text[ chinese_traditional ] = "¤¤";
+ Text[ arabic ] = "ÇáæÓØ";
+ Text[ dutch ] = "Midden";
+ Text[ chinese_simplified ] = "ÖÐ";
+ Text[ greek ] = "ÊÝíôñï";
+ Text[ korean ] = "°¡¿îµ¥";
+ Text[ turkish ] = "Orta";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTVADJBOTTOM
+{
+ Text = "Unten" ;
+ Text [ ENGLISH ] = "Bottom" ;
+ Text [ portuguese ] = "Em baixo" ;
+ Text [ english_us ] = "Bottom" ;
+ Text [ portuguese_brazilian ] = "Unten" ;
+ Text [ swedish ] = "Nederst" ;
+ Text [ danish ] = "Nede" ;
+ Text [ italian ] = "Sotto" ;
+ Text [ spanish ] = "Abajo" ;
+ Text [ french ] = "Inférieur" ;
+ Text [ dutch ] = "Beneden" ;
+ Text[ chinese_simplified ] = "ÏÂ";
+ Text[ russian ] = "Âíèçó";
+ Text[ polish ] = "W dole";
+ Text[ japanese ] = "‰º";
+ Text[ chinese_traditional ] = "¤U";
+ Text[ arabic ] = "ÃÓÝá";
+ Text[ dutch ] = "Beneden";
+ Text[ chinese_simplified ] = "ÏÂ";
+ Text[ greek ] = "ÊÜôù";
+ Text[ korean ] = "¾Æ·¡";
+ Text[ turkish ] = "Alt";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTVADJBLOCK
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Ausnutzung der gesamten Höhe : Ausnutzung der gesamten H÷he */
+ /* ### ACHTUNG: Neuer Text in Resource? Ausnutzung der gesamten Höhe : Ausnutzung der gesamten H÷he */
+ Text = "Ausnutzung der gesamten Höhe" ;
+ Text [ ENGLISH ] = "Using hole height" ;
+ Text [ portuguese ] = "Aproveitar altura total" ;
+ Text [ english_us ] = "Use entire height" ;
+ Text [ portuguese_brazilian ] = "Ausnutzung der gesamten Höhe" ;
+ Text [ swedish ] = "Utnyttja hela bredden" ;
+ Text [ danish ] = "Udnyt hele højden" ;
+ Text [ italian ] = "Utilizzo dell'intera altezza" ;
+ Text [ spanish ] = "Utilizar toda la altura" ;
+ Text [ french ] = "Utiliser la totalité de la hauteur" ;
+ Text [ dutch ] = "De gehele hoogte benutten" ;
+ Text[ chinese_simplified ] = "×î¼ÑʹÓÃÕû¸ö¸ß¶È";
+ Text[ russian ] = "Èñïîëüçîâàíèå âñåé âûñîòû";
+ Text[ polish ] = "Wykorzystanie ca³ej wysokoœci";
+ Text[ japanese ] = "‚‚³‚¢‚Á‚Ï‚¢Žg—p";
+ Text[ chinese_traditional ] = "³ÌÓì¨Ï¥Î¾ã­Ó°ª«×";
+ Text[ arabic ] = "ÇÓÊÛáÇá ßá ÇáÇÑÊÝÇÚ";
+ Text[ dutch ] = "De gehele hoogte benutten";
+ Text[ chinese_simplified ] = "×î¼ÑʹÓÃÕû¸ö¸ß¶È";
+ Text[ greek ] = "×ñÞóç ïëüêëçñïõ ôïõ ýøïõò";
+ Text[ korean ] = "Àüü ³ôÀÌ ÀÌ¿ë";
+ Text[ turkish ] = "Tüm yüksekliði kullan";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTVADJSTRETCH
+{
+ Text = "Gedehnt" ;
+ Text [ ENGLISH ] = "Stretched" ;
+ Text [ portuguese ] = "Extenso" ;
+ Text [ english_us ] = "Stretched" ;
+ Text [ portuguese_brazilian ] = "Gedehnt" ;
+ Text [ swedish ] = "Utsträckt" ;
+ Text [ danish ] = "Udvidet" ;
+ Text [ italian ] = "Esteso" ;
+ Text [ spanish ] = "Extendido" ;
+ Text [ french ] = "Elargi" ;
+ Text [ dutch ] = "Verbreed" ;
+ Text[ chinese_simplified ] = "ÉìÕ¹µÄ";
+ Text[ russian ] = "Ðàñòÿíóòî";
+ Text[ polish ] = "Rozci¹gniêty";
+ Text[ japanese ] = "‚¢‚Á‚Ï‚¢‚ÉL‚΂·";
+ Text[ chinese_traditional ] = "¦ù®iªº";
+ Text[ arabic ] = "ããØæØ";
+ Text[ dutch ] = "Verbreed";
+ Text[ chinese_simplified ] = "ÉìÕ¹µÄ";
+ Text[ greek ] = "ÅðéìÞêõíóç";
+ Text[ korean ] = "¾ÓÂÊ ´ÃÀÓ";
+ Text[ turkish ] = "Geniþletilmiþ";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTHADJLEFT
+{
+ Text = "Links" ;
+ Text [ ENGLISH ] = "Left" ;
+ Text [ portuguese ] = "Esquerda" ;
+ Text [ english_us ] = "Left" ;
+ Text [ portuguese_brazilian ] = "Links" ;
+ Text [ swedish ] = "Vänster" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ italian ] = "Sinistra" ;
+ Text [ spanish ] = "Izquierda" ;
+ Text [ french ] = "À gauche" ;
+ Text [ dutch ] = "Links" ;
+ Text[ chinese_simplified ] = "Ïò×ó";
+ Text[ russian ] = "Ñëåâà";
+ Text[ polish ] = "Z lewej";
+ Text[ japanese ] = "¶";
+ Text[ chinese_traditional ] = "¦V¥ª";
+ Text[ arabic ] = "íÓÇÑ";
+ Text[ dutch ] = "Links";
+ Text[ chinese_simplified ] = "Ïò×ó";
+ Text[ greek ] = "ÁñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ";
+ Text[ turkish ] = "Sol";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTHADJCENTER
+{
+ Text = "Mitte" ;
+ Text [ ENGLISH ] = "Center" ;
+ Text [ portuguese ] = "Centro" ;
+ Text [ english_us ] = "Center" ;
+ Text [ portuguese_brazilian ] = "Mitte" ;
+ Text [ swedish ] = "Mitten" ;
+ Text [ danish ] = "Midte" ;
+ Text [ italian ] = "Centro" ;
+ Text [ spanish ] = "Centro" ;
+ Text [ french ] = "Milieu" ;
+ Text [ dutch ] = "Midden" ;
+ Text[ chinese_simplified ] = "¾ÓÖÐ";
+ Text[ russian ] = "Ïî ñåðåäèíå";
+ Text[ polish ] = "Œrodek";
+ Text[ japanese ] = "’†‰›";
+ Text[ chinese_traditional ] = "¸m¤¤";
+ Text[ arabic ] = "ÇáæÓØ";
+ Text[ dutch ] = "Midden";
+ Text[ chinese_simplified ] = "¾ÓÖÐ";
+ Text[ greek ] = "ÊÝíôñï";
+ Text[ korean ] = "°¡¿îµ¥";
+ Text[ turkish ] = "Orta";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTHADJRIGHT
+{
+ Text = "Rechts" ;
+ Text [ ENGLISH ] = "Right" ;
+ Text [ portuguese ] = "Direita" ;
+ Text [ english_us ] = "Right" ;
+ Text [ portuguese_brazilian ] = "Rechts" ;
+ Text [ swedish ] = "Höger" ;
+ Text [ danish ] = "Højre" ;
+ Text [ italian ] = "Destra" ;
+ Text [ spanish ] = "A la derecha" ;
+ Text [ french ] = "À droite" ;
+ Text [ dutch ] = "Rechts" ;
+ Text[ chinese_simplified ] = "ÏòÓÒ";
+ Text[ russian ] = "Ñïðàâà";
+ Text[ polish ] = "Z prawej";
+ Text[ japanese ] = "‰E";
+ Text[ chinese_traditional ] = "¦V¥k";
+ Text[ arabic ] = "íãíä";
+ Text[ dutch ] = "Rechts";
+ Text[ chinese_simplified ] = "ÏòÓÒ";
+ Text[ greek ] = "ÄåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ";
+ Text[ turkish ] = "Sað";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTHADJBLOCK
+{
+ Text = "Ausnutzung der gesamten Breite" ;
+ Text [ ENGLISH ] = "Using hole width" ;
+ Text [ portuguese ] = "Utilizar a largura total" ;
+ Text [ english_us ] = "Use entire width" ;
+ Text [ portuguese_brazilian ] = "Ausnutzung der gesamten Breite" ;
+ Text [ swedish ] = "Utnyttja hela bredden" ;
+ Text [ danish ] = "Udnyt hele bredden" ;
+ Text [ italian ] = "Utilizzo dell'intera larghezza" ;
+ Text [ spanish ] = "Utilizar todo el ancho" ;
+ Text [ french ] = "Utiliser la totalité de la largeur" ;
+ Text [ dutch ] = "De gehele breedte benutten" ;
+ Text[ chinese_simplified ] = "×î¼ÑʹÓÃÕû¸ö¿í¶È";
+ Text[ russian ] = "Èñïîëüçîâàíèå âñåé øèðèíû";
+ Text[ polish ] = "Wykorzystanie ca³ej szerokoœci";
+ Text[ japanese ] = "•‚¢‚Á‚Ï‚¢Žg—p";
+ Text[ chinese_traditional ] = "³ÌÓì¨Ï¥Î¾ã­Ó¼e«×";
+ Text[ arabic ] = "ÇÓÊÛáÇá ßá ÇáÚÑÖ";
+ Text[ dutch ] = "De gehele breedte benutten";
+ Text[ chinese_simplified ] = "×î¼ÑʹÓÃÕû¸ö¿í¶È";
+ Text[ greek ] = "ÅêìåôÜëëåõóç ïëüêëçñïõ ðëÜôïõò";
+ Text[ korean ] = "Àüü ³Êºñ ÀÌ¿ë";
+ Text[ turkish ] = "Tüm geniþliði kullan";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTHADJSTRETCH
+{
+ Text = "Gedehnt" ;
+ Text [ ENGLISH ] = "Stretched" ;
+ Text [ portuguese ] = "Extenso" ;
+ Text [ english_us ] = "Stretched" ;
+ Text [ portuguese_brazilian ] = "Gedehnt" ;
+ Text [ swedish ] = "Utsträckt" ;
+ Text [ danish ] = "Udvidet" ;
+ Text [ italian ] = "Esteso" ;
+ Text [ spanish ] = "Extendido" ;
+ Text [ french ] = "Elargi" ;
+ Text [ dutch ] = "Verbreed" ;
+ Text[ chinese_simplified ] = "ÉìÕ¹µÄ";
+ Text[ russian ] = "Ðàñòÿíóòî";
+ Text[ polish ] = "Rozci¹gniêty";
+ Text[ japanese ] = "‚¢‚Á‚Ï‚¢‚ÉL‚΂·";
+ Text[ chinese_traditional ] = "¦ù®iªº";
+ Text[ arabic ] = "ããØæØ";
+ Text[ dutch ] = "Verbreed";
+ Text[ chinese_simplified ] = "ÉìÕ¹µÄ";
+ Text[ greek ] = "ÅðéìÞêõíóç";
+ Text[ korean ] = "¾çÂÊ ´ÃÀÓ";
+ Text[ turkish ] = "Geniþletilmiþ";
+ Text[ language_user1 ] = " ";
+};
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ItemValTEXTANI_NONE
+{
+ Text = "aus" ;
+ Text [ ENGLISH ] = "off" ;
+ Text [ portuguese ] = "desligado" ;
+ Text [ english_us ] = "off" ;
+ Text [ portuguese_brazilian ] = "aus" ;
+ Text [ swedish ] = "av" ;
+ Text [ danish ] = "deaktiveret" ;
+ Text [ italian ] = "off" ;
+ Text [ spanish ] = "desactivado" ;
+ Text [ french ] = "off" ;
+ Text [ dutch ] = "uit" ;
+ Text[ chinese_simplified ] = "ʧ»î";
+ Text[ russian ] = "âûêë.";
+ Text[ polish ] = "wy³¹cz";
+ Text[ japanese ] = "µÌ";
+ Text[ chinese_traditional ] = "¥¢¬¡";
+ Text[ arabic ] = "ÅíÞÇÝ";
+ Text[ dutch ] = "uit";
+ Text[ chinese_simplified ] = "ʧ»î";
+ Text[ greek ] = "ü÷é";
+ Text[ korean ] = "ÇØÁ¦";
+ Text[ turkish ] = "Kapalý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTANI_BLINK
+{
+ Text = "blinken" ;
+ Text [ ENGLISH ] = "blink" ;
+ Text [ portuguese ] = "intermitente" ;
+ Text [ english_us ] = "flash" ;
+ Text [ portuguese_brazilian ] = "blinken" ;
+ Text [ swedish ] = "blinka" ;
+ Text [ danish ] = "blink" ;
+ Text [ italian ] = "lampeggia" ;
+ Text [ spanish ] = "intermitente" ;
+ Text [ french ] = "clignoter" ;
+ Text [ dutch ] = "knipperen" ;
+ Text[ chinese_simplified ] = "ÉÁ˸";
+ Text[ russian ] = "ìèãàòü";
+ Text[ polish ] = "miganie";
+ Text[ japanese ] = "“_–Å";
+ Text[ chinese_traditional ] = "°{Ã{";
+ Text[ arabic ] = "æãíÖ";
+ Text[ dutch ] = "knipperen";
+ Text[ chinese_simplified ] = "ÉÁ˸";
+ Text[ greek ] = "íá áíáâïóâÞíåé";
+ Text[ korean ] = "±ô¹ÚÀÓ";
+ Text[ turkish ] = "Yanýp sönme";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTANI_SCROLL
+{
+ Text = "durchlaufen" ;
+ Text [ ENGLISH ] = "scroll" ;
+ Text [ portuguese ] = "Deslize contínuo" ;
+ Text [ english_us ] = "Scroll Through" ;
+ Text [ portuguese_brazilian ] = "durchlaufen" ;
+ Text [ swedish ] = "passera igenom" ;
+ Text [ danish ] = "glid igennem" ;
+ Text [ italian ] = "Scorrimento" ;
+ Text [ spanish ] = "continuo" ;
+ Text [ french ] = "Défiler à travers" ;
+ Text [ dutch ] = "doorlopen" ;
+ Text[ chinese_simplified ] = "Á¬Ðø";
+ Text[ russian ] = "×åðåç âñþ ñòðàíèöó";
+ Text[ polish ] = "Przep³yw";
+ Text[ japanese ] = "’ʉß";
+ Text[ chinese_traditional ] = "¤£¶¡Â_";
+ Text[ arabic ] = "ÊÍÑíß ÚÈÑ";
+ Text[ dutch ] = "doorlopen";
+ Text[ chinese_simplified ] = "Á¬Ðø";
+ Text[ greek ] = "êýëéóç äéá ìÝóïõ";
+ Text[ korean ] = "Àüü ½ºÅ©·Ñ";
+ Text[ turkish ] = "Kaydýr";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTANI_ALTERNATE
+{
+ Text = "alternierend" ;
+ Text [ ENGLISH ] = "alternate" ;
+ Text [ portuguese ] = "alternado" ;
+ Text [ english_us ] = "alternating" ;
+ Text [ portuguese_brazilian ] = "alternierend" ;
+ Text [ swedish ] = "alternerande" ;
+ Text [ danish ] = "alternerende" ;
+ Text [ italian ] = "alternativamente" ;
+ Text [ spanish ] = "alternando" ;
+ Text [ french ] = "alterné" ;
+ Text [ dutch ] = "alternerend" ;
+ Text[ chinese_simplified ] = "½»»¥µÄ";
+ Text[ russian ] = "ñìåííûé";
+ Text[ polish ] = "zmienny";
+ Text[ japanese ] = "ŒðŒÝ";
+ Text[ chinese_traditional ] = "¥æ¤¬ªº";
+ Text[ arabic ] = "ãÊäÇæÈ";
+ Text[ dutch ] = "alternerend";
+ Text[ chinese_simplified ] = "½»»¥µÄ";
+ Text[ greek ] = "ÅíáëëáãÞ";
+ Text[ korean ] = "´ëü Áß";
+ Text[ turkish ] = "Deðiken";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTANI_SLIDE
+{
+ Text = "nur reinschieben" ;
+ Text [ ENGLISH ] = "slide" ;
+ Text [ portuguese ] = "Deslizar só para dentro" ;
+ Text [ english_us ] = "Scroll In" ;
+ Text [ portuguese_brazilian ] = "nur reinschieben" ;
+ Text [ swedish ] = "endast infogning" ;
+ Text [ danish ] = "skub kun ind" ;
+ Text [ italian ] = "solo scorrimento inserente" ;
+ Text [ spanish ] = "solo entrar" ;
+ Text [ french ] = "seulement défiler dedans" ;
+ Text [ dutch ] = "alleen rollen" ;
+ Text[ chinese_simplified ] = "Ö»ÊÇËÍÈë";
+ Text[ russian ] = "Ïåðåäâèæåíèå òîëüêî âî âíóòðü";
+ Text[ polish ] = "Tylko zwin¹æ";
+ Text[ japanese ] = "ŠŠ‚èž‚Ü‚¹‚é‚Ì‚Ý";
+ Text[ chinese_traditional ] = "¥u¬O°e¤J";
+ Text[ arabic ] = "ÝÞØ ÅÒÇÍÉ ááÏÇÎá";
+ Text[ dutch ] = "alleen rollen";
+ Text[ chinese_simplified ] = "Ö»ÊÇËÍÈë";
+ Text[ greek ] = "Ìüíï êýëéóç ðñïò ôá ìÝóá";
+ Text[ korean ] = "½ºÅ©·Ñ ÀÎ";
+ Text[ turkish ] = "Ýçeri sür";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTANI_LEFT
+{
+ Text = "nach links" ;
+ Text [ ENGLISH ] = "left" ;
+ Text [ portuguese ] = "para a esquerda" ;
+ Text [ english_us ] = "left" ;
+ Text [ portuguese_brazilian ] = "nach links" ;
+ Text [ swedish ] = "åt vänster" ;
+ Text [ danish ] = "mod venstre" ;
+ Text [ italian ] = "verso sinistra" ;
+ Text [ spanish ] = "hacia la izquierda" ;
+ Text [ french ] = "vers la gauche" ;
+ Text [ dutch ] = "naar links" ;
+ Text[ chinese_simplified ] = "Ïò×ó";
+ Text[ russian ] = "âëåâî";
+ Text[ polish ] = "w lewo";
+ Text[ japanese ] = "¶‚Ö";
+ Text[ chinese_traditional ] = "¦V¥ª";
+ Text[ arabic ] = "Åáì ÇáíÓÇÑ";
+ Text[ language_user1 ] = " ";
+ Text[ dutch ] = "naar links";
+ Text[ chinese_simplified ] = "Ïò×ó";
+ Text[ greek ] = "ðñïò ôá áñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊÀ¸·Î";
+ Text[ turkish ] = "Sola";
+};
+String STR_ItemValTEXTANI_UP
+{
+ Text = "nach oben" ;
+ Text [ ENGLISH ] = "up" ;
+ Text [ portuguese ] = "para cima" ;
+ Text [ english_us ] = "up" ;
+ Text [ portuguese_brazilian ] = "nach oben" ;
+ Text [ swedish ] = "uppåt" ;
+ Text [ danish ] = "opad" ;
+ Text [ italian ] = "verso l'alto" ;
+ Text [ spanish ] = "hacia arriba" ;
+ Text [ french ] = "vers le haut" ;
+ Text [ dutch ] = "naar boven" ;
+ Text[ chinese_simplified ] = "ÏòÉÏ";
+ Text[ russian ] = "ââåðõ";
+ Text[ polish ] = "w górê";
+ Text[ japanese ] = "ã‚Ö";
+ Text[ chinese_traditional ] = "¦V¤W";
+ Text[ arabic ] = "Åáì ÃÚáì";
+ Text[ dutch ] = "naar boven";
+ Text[ chinese_simplified ] = "ÏòÉÏ";
+ Text[ greek ] = "ðñïò ôá ðÜíù";
+ Text[ korean ] = "À§·Î";
+ Text[ language_user1 ] = " ";
+ Text[ turkish ] = "Yukarý";
+};
+String STR_ItemValTEXTANI_RIGHT
+{
+ Text = "nach rechts" ;
+ Text [ ENGLISH ] = "right" ;
+ Text [ portuguese ] = "para a direita" ;
+ Text [ english_us ] = "right" ;
+ Text [ portuguese_brazilian ] = "nach rechts" ;
+ Text [ swedish ] = "åt höger" ;
+ Text [ danish ] = "mod højre" ;
+ Text [ italian ] = "verso destra" ;
+ Text [ spanish ] = "hacia la derecha" ;
+ Text [ french ] = "vers la droite" ;
+ Text [ dutch ] = "naar rechts" ;
+ Text[ chinese_simplified ] = "ÏòÓÒ";
+ Text[ russian ] = "âïðàâî";
+ Text[ polish ] = "w prawo";
+ Text[ japanese ] = "‰E‚Ö";
+ Text[ chinese_traditional ] = "¦V¥k";
+ Text[ arabic ] = "Åáì Çáíãíä";
+ Text[ dutch ] = "naar rechts";
+ Text[ chinese_simplified ] = "ÏòÓÒ";
+ Text[ greek ] = "ðñïò ôá äåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊÀ¸·Î";
+ Text[ turkish ] = "Saða";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValTEXTANI_DOWN
+{
+ Text = "nach unten" ;
+ Text [ ENGLISH ] = "down" ;
+ Text [ portuguese ] = "para baixo" ;
+ Text [ english_us ] = "down" ;
+ Text [ portuguese_brazilian ] = "nach unten" ;
+ Text [ swedish ] = "nedåt" ;
+ Text [ danish ] = "nedad" ;
+ Text [ italian ] = "verso il basso" ;
+ Text [ spanish ] = "hacia abajo" ;
+ Text [ french ] = "vers le bas" ;
+ Text [ dutch ] = "naar beneden" ;
+ Text[ chinese_simplified ] = "ÏòÏÂ";
+ Text[ russian ] = "âíèç";
+ Text[ polish ] = "w dó³";
+ Text[ japanese ] = "‰º‚Ö";
+ Text[ chinese_traditional ] = "¦V¤U";
+ Text[ arabic ] = "Åáì ÃÓÝá";
+ Text[ dutch ] = "naar beneden";
+ Text[ chinese_simplified ] = "ÏòÏÂ";
+ Text[ greek ] = "ðñïò ôá êÜôù";
+ Text[ korean ] = "¾Æ·¡·Î";
+ Text[ turkish ] = "Aþaðý";
+ Text[ language_user1 ] = " ";
+};
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ItemValEDGE_ORTHOLINES
+{
+ Text = "Standard-Verbinder" ;
+ Text [ ENGLISH ] = "standard-connector" ;
+ Text [ portuguese ] = "Conector padrão" ;
+ Text [ english_us ] = "Standard Connector" ;
+ Text [ portuguese_brazilian ] = "Standard-Verbinder" ;
+ Text [ swedish ] = "Standardförbindelse" ;
+ Text [ danish ] = "Standard-forbindelse" ;
+ Text [ italian ] = "Connettore standard" ;
+ Text [ spanish ] = "Conector estándar" ;
+ Text [ french ] = "Connecteur standard" ;
+ Text [ dutch ] = "Standaardverbinding" ;
+ Text[ chinese_simplified ] = "±ê×¼Á¬½Ó·û";
+ Text[ russian ] = "Ñòàíäàðòíàÿ ñîåäèíèòåëüíàÿ ëèíèÿ";
+ Text[ polish ] = "£¹cznik standardowy";
+ Text[ japanese ] = "•W€ºÈ¸À";
+ Text[ chinese_traditional ] = "¼Ð·Ç³s±µ²Å";
+ Text[ arabic ] = "ÑÇÈØ ÞíÇÓí";
+ Text[ dutch ] = "Standaardverbinding";
+ Text[ chinese_simplified ] = "±ê×¼Á¬½Ó·û";
+ Text[ greek ] = "Óýíäåóç ðñïåðéëïãÞò";
+ Text[ korean ] = "Ç¥ÁØ ¿¬°á¼±";
+ Text[ turkish ] = "Standart baðlayýcý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValEDGE_THREELINES
+{
+ Text = "Linien-Verbinder" ;
+ Text [ ENGLISH ] = "line-connector" ;
+ Text [ portuguese ] = "Conector linear" ;
+ Text [ english_us ] = "Line Connector" ;
+ Text [ portuguese_brazilian ] = "Linien-Verbinder" ;
+ Text [ swedish ] = "Förbindelselinje" ;
+ Text [ danish ] = "Linje-forbindelse" ;
+ Text [ italian ] = "Connettore lineare" ;
+ Text [ spanish ] = "Conector lineal" ;
+ Text [ french ] = "Connecteur linéaire" ;
+ Text [ dutch ] = "Lijnverbinding" ;
+ Text[ chinese_simplified ] = "ÏßÌõÁ¬½Ó·û";
+ Text[ russian ] = "Ñîåäèíèòåëüíàÿ ëèíèÿ";
+ Text[ polish ] = "£¹cznik linii";
+ Text[ japanese ] = "üºÈ¸À";
+ Text[ chinese_traditional ] = "½u±ø³s±µ²Å";
+ Text[ arabic ] = "ÑÇÈØ ÇáÎØæØ";
+ Text[ dutch ] = "Lijnverbinding";
+ Text[ chinese_simplified ] = "ÏßÌõÁ¬½Ó·û";
+ Text[ greek ] = "Óýíäåóç ãñáììþí";
+ Text[ korean ] = "¼± ¿¬°á¼±";
+ Text[ turkish ] = "Köþeli baðlayýcý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValEDGE_ONELINE
+{
+ Text = "Direkt-Verbinder" ;
+ Text [ ENGLISH ] = "direct-connector" ;
+ Text [ portuguese ] = "Conector directo" ;
+ Text [ english_us ] = "Straight Connector" ;
+ Text [ portuguese_brazilian ] = "Direkt-Verbinder" ;
+ Text [ swedish ] = "Direktförbindelse" ;
+ Text [ danish ] = "Direktforbindelse" ;
+ Text [ italian ] = "Connettore diretto" ;
+ Text [ spanish ] = "Conector directo" ;
+ Text [ french ] = "Connecteur direct" ;
+ Text [ dutch ] = "Direct-verbinding" ;
+ Text[ chinese_simplified ] = "Ö±ÏßÁ¬½Ó·û";
+ Text[ russian ] = "Ïðÿìàÿ ñîåäèíèòåëüíàÿ ëèíèÿ";
+ Text[ polish ] = "£¹cznik prosty";
+ Text[ japanese ] = "’¼üºÈ¸À";
+ Text[ chinese_traditional ] = "ª½½u³s±µ²Å";
+ Text[ arabic ] = "ÑÇÈØ ãÈÇÔÑ";
+ Text[ dutch ] = "Direct-verbinding";
+ Text[ chinese_simplified ] = "Ö±ÏßÁ¬½Ó·û";
+ Text[ greek ] = "Áð´åõèåßáò óýíäåóç";
+ Text[ korean ] = "Á÷¼± ¿¬°á¼±";
+ Text[ turkish ] = "Düz baðlayýcý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValEDGE_BEZIER
+{
+ Text = "Kurven-Verbinder" ;
+ Text [ ENGLISH ] = "curve-connector" ;
+ Text [ portuguese ] = "Conector curvilíneo" ;
+ Text [ english_us ] = "Curved Connector" ;
+ Text [ portuguese_brazilian ] = "Kurven-Verbinder" ;
+ Text [ swedish ] = "Kurvförbindelse" ;
+ Text [ danish ] = "Kurve-forbindelse" ;
+ Text [ italian ] = "Connettore curvo" ;
+ Text [ spanish ] = "Conector curvo" ;
+ Text [ french ] = "Connecteur en arc" ;
+ Text [ dutch ] = "Curvenverbinding" ;
+ Text[ chinese_simplified ] = "ÇúÏßÁ¬½Ó·û";
+ Text[ russian ] = "Êðèâàÿ ñîåäèíèòåëüíàÿ ëèíèÿ";
+ Text[ polish ] = "£¹cznik krzywych";
+ Text[ japanese ] = "‹ÈüºÈ¸À";
+ Text[ chinese_traditional ] = "¦±½u³s±µ²Å";
+ Text[ arabic ] = "ÑÇÈØ ÇáãäÍäíÇÊ";
+ Text[ dutch ] = "Curvenverbinding";
+ Text[ chinese_simplified ] = "ÇúÏßÁ¬½Ó·û";
+ Text[ greek ] = "Óýíäåóç êáìðõëþí";
+ Text[ korean ] = "°î¼± ¿¬°á¼±";
+ Text[ turkish ] = "Eðri baðlayýcý";
+ Text[ language_user1 ] = " ";
+};
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ItemValMEASURE_STD
+{
+ Text = "Standard" ;
+ Text [ ENGLISH ] = "standard" ;
+ Text [ portuguese ] = "Padrão" ;
+ Text [ english_us ] = "Standard" ;
+ Text [ portuguese_brazilian ] = "Standard" ;
+ Text [ swedish ] = "Standard" ;
+ Text [ danish ] = "Standard" ;
+ Text [ italian ] = "Standard" ;
+ Text [ spanish ] = "Predeterminado" ;
+ Text [ french ] = "Standard" ;
+ Text [ dutch ] = "Standaard" ;
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ russian ] = "Ñòàíäàðò";
+ Text[ polish ] = "Standard";
+ Text[ japanese ] = "•W€";
+ Text[ chinese_traditional ] = "¼Ð·Ç";
+ Text[ arabic ] = "ÞíÇÓí";
+ Text[ dutch ] = "Standaard";
+ Text[ chinese_simplified ] = "±ê×¼";
+ Text[ greek ] = "ÐñïåðéëïãÞ";
+ Text[ korean ] = "Ç¥ÁØ";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValMEASURE_RADIUS
+{
+ Text = "Radius" ;
+ Text [ ENGLISH ] = "radius" ;
+ Text [ portuguese ] = "Raio" ;
+ Text [ english_us ] = "Radius" ;
+ Text [ portuguese_brazilian ] = "Radius" ;
+ Text [ swedish ] = "Radie" ;
+ Text [ danish ] = "Radius" ;
+ Text [ italian ] = "Raggio" ;
+ Text [ spanish ] = "Radio" ;
+ Text [ french ] = "Rayon" ;
+ Text [ dutch ] = "Radius" ;
+ Text[ chinese_simplified ] = "°ë¾¶";
+ Text[ russian ] = "Ðàäèóñ";
+ Text[ polish ] = "Promieñ";
+ Text[ japanese ] = "”¼Œa";
+ Text[ chinese_traditional ] = "¥b®|";
+ Text[ arabic ] = "äÕÝ ÞõØÑ";
+ Text[ dutch ] = "Radius";
+ Text[ chinese_simplified ] = "°ë¾¶";
+ Text[ greek ] = "Áêôßíá";
+ Text[ korean ] = "¹ÝÁö¸§";
+ Text[ turkish ] = "Çap";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValMEASURE_TEXTHAUTO
+{
+ Text = "automatisch" ;
+ Text [ ENGLISH ] = "automatic" ;
+ Text [ portuguese ] = "automático" ;
+ Text [ english_us ] = "automatic" ;
+ Text [ portuguese_brazilian ] = "automatisch" ;
+ Text [ swedish ] = "automatiskt" ;
+ Text [ danish ] = "automatisk" ;
+ Text [ italian ] = "automatico" ;
+ Text [ spanish ] = "automático" ;
+ Text [ french ] = "automatiquement" ;
+ Text [ dutch ] = "automatisch" ;
+ Text[ chinese_simplified ] = "×Ô¶¯";
+ Text[ russian ] = "àâòîìàòè÷åñêè";
+ Text[ polish ] = "Automatycznie";
+ Text[ japanese ] = "Ž©“®";
+ Text[ chinese_traditional ] = "¦Û°Ê";
+ Text[ arabic ] = "ÊáÞÇÆí";
+ Text[ dutch ] = "automatisch";
+ Text[ chinese_simplified ] = "×Ô¶¯";
+ Text[ greek ] = "áõôüìáôá";
+ Text[ korean ] = "ÀÚµ¿";
+ Text[ turkish ] = "otomatik";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValMEASURE_TEXTLEFTOUTSIDE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? links außen : links au˜en */
+ /* ### ACHTUNG: Neuer Text in Resource? links außen : links au˜en */
+ Text = "links außen" ;
+ Text [ ENGLISH ] = "left outside" ;
+ Text [ portuguese ] = "Extremo esquerdo" ;
+ Text [ english_us ] = "left outside" ;
+ Text [ portuguese_brazilian ] = "links außen" ;
+ Text [ swedish ] = "vänster utsida" ;
+ Text [ danish ] = "venstre yderside" ;
+ Text [ italian ] = "a sinistra all'esterno" ;
+ Text [ spanish ] = "izquierda fuera" ;
+ Text [ french ] = "Extrême gauche" ;
+ Text [ dutch ] = "linksbuiten" ;
+ Text[ chinese_simplified ] = "×óÍâ";
+ Text[ russian ] = "ñëåâà ñíàðóæè";
+ Text[ polish ] = "z lewej na zewn¹trz";
+ Text[ japanese ] = "ŠO‘¤‚̶";
+ Text[ chinese_traditional ] = "¥ª¥~";
+ Text[ arabic ] = "Åáì ÇáíÓÇÑ ÎÇÑÌÇð";
+ Text[ dutch ] = "linksbuiten";
+ Text[ chinese_simplified ] = "×óÍâ";
+ Text[ greek ] = "áñéóôåñÜ åîùôåñéêÜ";
+ Text[ korean ] = "¿ÞÂÊ ¹Ù±ù";
+ Text[ turkish ] = "Sol dýþta";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValMEASURE_TEXTINSIDE
+{
+ Text = "innen (Mitte)" ;
+ Text [ ENGLISH ] = "inside (centered)" ;
+ Text [ portuguese ] = "interior (centro)" ;
+ Text [ english_us ] = "inside (centered)" ;
+ Text [ portuguese_brazilian ] = "innen (Mitte)" ;
+ Text [ swedish ] = "insidan (mitten)" ;
+ Text [ danish ] = "inderside (centreret)" ;
+ Text [ italian ] = "interno (centro)" ;
+ Text [ spanish ] = "interior centro" ;
+ Text [ french ] = "à l'intérieur (centre)" ;
+ Text [ dutch ] = "binnen (midden)" ;
+ Text[ chinese_simplified ] = "ÄÚ²¿(¾ÓÖÐ)";
+ Text[ russian ] = "âíóòðè (ïî ñðåäèíå)";
+ Text[ polish ] = "wewn¹trz (œrodek)";
+ Text[ japanese ] = "“à‘¤(’†‰›)";
+ Text[ chinese_traditional ] = "¤º³¡(¸m¤¤)";
+ Text[ arabic ] = "ÈÇáÏÇÎá (ÇáæÓØ)";
+ Text[ dutch ] = "binnen (midden)";
+ Text[ chinese_simplified ] = "ÄÚ²¿(¾ÓÖÐ)";
+ Text[ greek ] = "åóùôåñéêÜ (êÝíôñï)";
+ Text[ korean ] = "¾È(°¡¿îµ¥)";
+ Text[ turkish ] = "Ýç (orta)";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValMEASURE_TEXTRIGHTOUTSID
+{
+ /* ### ACHTUNG: Neuer Text in Resource? rechts außen : rechts au˜en */
+ /* ### ACHTUNG: Neuer Text in Resource? rechts außen : rechts au˜en */
+ Text = "rechts außen" ;
+ Text [ ENGLISH ] = "right outside" ;
+ Text [ portuguese ] = "Extremo direito" ;
+ Text [ english_us ] = "right outside" ;
+ Text [ portuguese_brazilian ] = "rechts außen" ;
+ Text [ swedish ] = "höger utsida" ;
+ Text [ danish ] = "højre yderside" ;
+ Text [ italian ] = "a destra all'esterno" ;
+ Text [ spanish ] = "derecha fuera" ;
+ Text [ french ] = "Extrême droite" ;
+ Text [ dutch ] = "rechtsbuiten" ;
+ Text[ chinese_simplified ] = "ÓÒÍâ";
+ Text[ russian ] = "ñïðàâà ñíàðóæè";
+ Text[ polish ] = "z prawej na zewn¹trz";
+ Text[ japanese ] = "ŠO‘¤‚̉E";
+ Text[ chinese_traditional ] = "¥k¥~";
+ Text[ arabic ] = "Åáì Çáíãíä ÎÇÑÌÇð";
+ Text[ dutch ] = "rechtsbuiten";
+ Text[ chinese_simplified ] = "ÓÒÍâ";
+ Text[ greek ] = "äåîéÜ åîùôåñéêÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ ¹Ù±ù";
+ Text[ turkish ] = "Sað dýþta";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValMEASURE_TEXTVAUTO
+{
+ Text = "automatisch" ;
+ Text [ ENGLISH ] = "automatic" ;
+ Text [ portuguese ] = "automático" ;
+ Text [ english_us ] = "automatic" ;
+ Text [ portuguese_brazilian ] = "automatisch" ;
+ Text [ swedish ] = "automatiskt" ;
+ Text [ danish ] = "automatisk" ;
+ Text [ italian ] = "automatico" ;
+ Text [ spanish ] = "automático" ;
+ Text [ french ] = "automatiquement" ;
+ Text [ dutch ] = "automatisch" ;
+ Text[ chinese_simplified ] = "×Ô¶¯";
+ Text[ russian ] = "àâòîìàòè÷åñêè";
+ Text[ polish ] = "Automatycznie";
+ Text[ japanese ] = "Ž©“®";
+ Text[ chinese_traditional ] = "¦Û°Ê";
+ Text[ arabic ] = "ÊáÞÇÆí";
+ Text[ dutch ] = "automatisch";
+ Text[ chinese_simplified ] = "×Ô¶¯";
+ Text[ greek ] = "áõôüìáôá";
+ Text[ korean ] = "ÀÚµ¿";
+ Text[ turkish ] = "Otomatik";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValMEASURE_ABOVE
+{
+ Text = "auf der Linie" ;
+ Text [ ENGLISH ] = "on the line" ;
+ Text [ portuguese ] = "sobre a linha" ;
+ Text [ english_us ] = "on the line" ;
+ Text [ portuguese_brazilian ] = "auf der Linie" ;
+ Text [ swedish ] = "på linjen" ;
+ Text [ danish ] = "på linjen" ;
+ Text [ italian ] = "sulla linea" ;
+ Text [ spanish ] = "en la línea" ;
+ Text [ french ] = "sur la ligne" ;
+ Text [ dutch ] = "op de lijn" ;
+ Text[ chinese_simplified ] = "ÔÚÏßÌõÉÏ";
+ Text[ russian ] = "íà ëèíèè";
+ Text[ polish ] = "na linii";
+ Text[ japanese ] = "ü‚Ìã‚É";
+ Text[ chinese_traditional ] = "¦b½u±ø¤W";
+ Text[ arabic ] = "Úáì ÇáÎØ";
+ Text[ dutch ] = "op de lijn";
+ Text[ chinese_simplified ] = "ÔÚÏßÌõÉÏ";
+ Text[ greek ] = "ðÜíù óôç ãñáììÞ";
+ Text[ korean ] = "¼± À§";
+ Text[ turkish ] = "Çizgi üzerinde";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValMEASURETEXT_BREAKEDLINE
+{
+ Text = "unterbrochene Linie" ;
+ Text [ ENGLISH ] = "breaked line" ;
+ Text [ portuguese ] = "Linha interrompida" ;
+ Text [ english_us ] = "broken line" ;
+ Text [ portuguese_brazilian ] = "unterbrochene Linie" ;
+ Text [ swedish ] = "bruten linje" ;
+ Text [ danish ] = "afbrudt linje" ;
+ Text [ italian ] = "linea interrotta" ;
+ Text [ spanish ] = "línea interrumpida" ;
+ Text [ french ] = "Lignie interrompue" ;
+ Text [ dutch ] = "onderbroken lijn" ;
+ Text[ chinese_simplified ] = "Õ۶ϵÄÏßÌõ";
+ Text[ russian ] = "Ïðåðûâèñòàÿ ëèíèÿ";
+ Text[ polish ] = "Linia przerwana";
+ Text[ japanese ] = "’†’f‚³‚ꂽü";
+ Text[ chinese_traditional ] = "§éÂ_ªº½u±ø";
+ Text[ arabic ] = "ÎØ ãÞØæÚ";
+ Text[ dutch ] = "onderbroken lijn";
+ Text[ chinese_simplified ] = "Õ۶ϵÄÏßÌõ";
+ Text[ greek ] = "ÄéáêåêïììÝíç ãñáììÞ";
+ Text[ korean ] = "Áߴܼ±";
+ Text[ turkish ] = "Kesik çizgi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValMEASURE_BELOW
+{
+ Text = "unter der Linie" ;
+ Text [ ENGLISH ] = "below the line" ;
+ Text [ portuguese ] = "abaixo da linha" ;
+ Text [ english_us ] = "below the line" ;
+ Text [ portuguese_brazilian ] = "unter der Linie" ;
+ Text [ swedish ] = "under linjen" ;
+ Text [ danish ] = "under linjen" ;
+ Text [ italian ] = "sotto la linea" ;
+ Text [ spanish ] = "bajo la línea" ;
+ Text [ french ] = "en dessous de ligne" ;
+ Text [ dutch ] = "beneden de lijn" ;
+ Text[ chinese_simplified ] = "ÔÚÏßÌõÏÂ";
+ Text[ russian ] = "ïîä ëèíèåé";
+ Text[ polish ] = "pod lini¹";
+ Text[ japanese ] = "ü‚̉º‚É";
+ Text[ chinese_traditional ] = "¦b½u±ø¤U";
+ Text[ arabic ] = "ÃÓÝá ÇáÎØ";
+ Text[ dutch ] = "beneden de lijn";
+ Text[ chinese_simplified ] = "ÔÚÏßÌõÏÂ";
+ Text[ greek ] = "êÜôù áðü ôç ãñáììÞ";
+ Text[ korean ] = "¼± ¾Æ·¡";
+ Text[ turkish ] = "Çizginin altýnda";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValMEASURETEXT_VERTICALCEN
+{
+ Text = "zur Linie zentriert" ;
+ Text [ ENGLISH ] = "centered" ;
+ Text [ english_us ] = "centered" ;
+ Text [ portuguese_brazilian ] = "zur Linie zentriert" ;
+ Text [ swedish ] = "centrera till linjen" ;
+ Text [ danish ] = "centreret til linjen" ;
+ Text [ italian ] = "centrato alla linea" ;
+ Text [ spanish ] = "centrado según línea" ;
+ Text [ french ] = "centré rel. à la ligne" ;
+ Text [ dutch ] = "op de lijn gecentreerd" ;
+ Text [ portuguese ] = "Centrado em rel. à linha" ;
+ Text[ chinese_simplified ] = "¾ÓÖÐ";
+ Text[ russian ] = "Öåíòðèðîâàòü ïî ëèíèè";
+ Text[ polish ] = "wyœrodkowany do linii";
+ Text[ japanese ] = "ü‚É’†‰›‘µ‚¦";
+ Text[ chinese_traditional ] = "¸m¤¤";
+ Text[ arabic ] = "ÊæÓíØ ááÎØ";
+ Text[ dutch ] = "op de lijn gecentreerd";
+ Text[ chinese_simplified ] = "¾ÓÖÐ";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá ùò ðñïò ôç ãñáììÞ";
+ Text[ korean ] = "°¡¿îµ¥";
+ Text[ turkish ] = "Ortala";
+ Text[ language_user1 ] = " ";
+};
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ItemValCIRC_FULL
+{
+ Text = "Vollkreis" ;
+ Text [ ENGLISH ] = "full circle" ;
+ Text [ portuguese ] = "Círculo inteiro" ;
+ Text [ english_us ] = "full circle" ;
+ Text [ portuguese_brazilian ] = "Vollkreis" ;
+ Text [ swedish ] = "Hel cirkel" ;
+ Text [ danish ] = "Hel cirkel" ;
+ Text [ italian ] = "Cerchio pieno" ;
+ Text [ spanish ] = "Círculo completo" ;
+ Text [ french ] = "Cercle entier" ;
+ Text [ dutch ] = "Volle cirkel" ;
+ Text[ chinese_simplified ] = "ÕûÔ²";
+ Text[ russian ] = "Êðóã";
+ Text[ polish ] = "Zape³nione ko³o";
+ Text[ japanese ] = "‰~";
+ Text[ chinese_traditional ] = "¾ã¶ê";
+ Text[ arabic ] = "ÏÇÆÑÉ ããÊáÆÉ";
+ Text[ dutch ] = "Volle cirkel";
+ Text[ chinese_simplified ] = "ÕûÔ²";
+ Text[ greek ] = "ÐëÞñçò êýêëïò";
+ Text[ korean ] = "¿ÏÀü ¿ø";
+ Text[ turkish ] = "Tam daire";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValCIRC_SECT
+{
+ Text = "Kreissektor" ;
+ Text [ ENGLISH ] = "circle sector" ;
+ Text [ portuguese ] = "Sector de círculo" ;
+ Text [ english_us ] = "Circle Pie" ;
+ Text [ portuguese_brazilian ] = "Kreissektor" ;
+ Text [ swedish ] = "Cirkelsektor" ;
+ Text [ danish ] = "Cirkelsektor" ;
+ Text [ italian ] = "Settore di cerchio" ;
+ Text [ spanish ] = "Sector de círculo" ;
+ Text [ french ] = "Secteur de cercle" ;
+ Text [ dutch ] = "Cirkelsector" ;
+ Text[ chinese_simplified ] = "Ô²ÉÈÐÎ";
+ Text[ russian ] = "Ñåêòîð îêðóæíîñòè";
+ Text[ polish ] = "Wycinek ko³a";
+ Text[ japanese ] = "îŒ`";
+ Text[ chinese_traditional ] = "®°§Î";
+ Text[ arabic ] = "ÞØÇÚ ÏÇÆÑÉ";
+ Text[ dutch ] = "Cirkelsector";
+ Text[ chinese_simplified ] = "Ô²ÉÈÐÎ";
+ Text[ greek ] = "ÔïìÝáò êýêëïõ";
+ Text[ korean ] = "¿ø ºÎä²Ã";
+ Text[ turkish ] = "Pasta";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValCIRC_CUT
+{
+ Text = "Kreisabschnitt" ;
+ Text [ ENGLISH ] = "circle cut" ;
+ Text [ portuguese ] = "Segmento de círculo" ;
+ Text [ english_us ] = "Circle segment" ;
+ Text [ portuguese_brazilian ] = "Kreisabschnitt" ;
+ Text [ swedish ] = "Cirkelsegment" ;
+ Text [ danish ] = "Cirkelsegment" ;
+ Text [ italian ] = "Segmento di cerchio" ;
+ Text [ spanish ] = "Segmento de círculo" ;
+ Text [ french ] = "Segment de cercle" ;
+ Text [ dutch ] = "Cirkelsegment" ;
+ Text[ chinese_simplified ] = "Ô²»¡¶Î";
+ Text[ russian ] = "Ñåãìåíò îêðóæíîñòè";
+ Text[ polish ] = "Odcinek ko³a";
+ Text[ japanese ] = "‰~‚ÌØ•Ð";
+ Text[ chinese_traditional ] = "¶ê©·¬q";
+ Text[ arabic ] = "ÞØÚÉ ãä ÏÇÆÑÉ";
+ Text[ dutch ] = "Cirkelsegment";
+ Text[ chinese_simplified ] = "Ô²»¡¶Î";
+ Text[ greek ] = "ÔìÞìá êýêëïõ";
+ Text[ korean ] = "¿ø ¼¼±×¸ÕÆ®";
+ Text[ turkish ] = "Daire parçasý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemValCIRC_ARC
+{
+ Text = "Kreisbogen" ;
+ Text [ ENGLISH ] = "arc" ;
+ Text [ portuguese ] = "Arco de círculo" ;
+ Text [ english_us ] = "Arc" ;
+ Text [ portuguese_brazilian ] = "Kreisbogen" ;
+ Text [ swedish ] = "Cirkelbåge" ;
+ Text [ danish ] = "Cirkelbue" ;
+ Text [ italian ] = "Arco di cerchio" ;
+ Text [ spanish ] = "Arco de círculo" ;
+ Text [ french ] = "Arc de cercle" ;
+ Text [ dutch ] = "Cirkelboog" ;
+ Text[ chinese_simplified ] = "Ô²»¡";
+ Text[ russian ] = "Äóãà îêðóæíîñòè";
+ Text[ polish ] = "£uk ko³a";
+ Text[ japanese ] = "‰~ŒÊ";
+ Text[ chinese_traditional ] = "¶ê©·";
+ Text[ arabic ] = "ÞæÓ ÏÇÆÑí";
+ Text[ dutch ] = "Cirkelboog";
+ Text[ chinese_simplified ] = "Ô²»¡";
+ Text[ greek ] = "Êõêëéêü ôüîï";
+ Text[ korean ] = "¿øÈ£";
+ Text[ turkish ] = "Yay";
+ Text[ language_user1 ] = " ";
+};
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+String STR_ItemNam_SHADOW
+{
+ Text = "Schatten" ;
+ Text [ ENGLISH ] = "Shadow" ;
+ Text [ portuguese ] = "Sombras" ;
+ Text [ english_us ] = "Shadow" ;
+ Text [ portuguese_brazilian ] = "Schatten" ;
+ Text [ swedish ] = "Skugga" ;
+ Text [ danish ] = "Skygge" ;
+ Text [ italian ] = "Ombra" ;
+ Text [ spanish ] = "Sombra" ;
+ Text [ french ] = "Ombre" ;
+ Text [ dutch ] = "Schaduw" ;
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ russian ] = "Òåíü";
+ Text[ polish ] = "Cieñ";
+ Text[ japanese ] = "‰e";
+ Text[ chinese_traditional ] = "³±¼v";
+ Text[ arabic ] = "ÇáÙá";
+ Text[ dutch ] = "Schaduw";
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ greek ] = "ÓêéÜ";
+ Text[ korean ] = "À½¿µ";
+ Text[ turkish ] = "Gölge";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_SHADOWCOLOR
+{
+ Text = "Schattenfarbe" ;
+ Text [ ENGLISH ] = "Shadow-color" ;
+ Text [ portuguese ] = "Cor da sombra" ;
+ Text [ english_us ] = "Shadow color" ;
+ Text [ portuguese_brazilian ] = "Schattenfarbe" ;
+ Text [ swedish ] = "Skuggfärg" ;
+ Text [ danish ] = "Skyggefarve" ;
+ Text [ italian ] = "Colore ombra" ;
+ Text [ spanish ] = "Color de sombra" ;
+ Text [ french ] = "Couleur d'ombre" ;
+ Text [ dutch ] = "Schaduwkleur" ;
+ Text[ chinese_simplified ] = "ÒõÓ°ÑÕÉ«";
+ Text[ russian ] = "Öâåò òåíè";
+ Text[ polish ] = "Kolor cienia";
+ Text[ japanese ] = "‰e‚ÌF";
+ Text[ chinese_traditional ] = "³±¼vÃC¦â";
+ Text[ arabic ] = "áæä ÇáÙá";
+ Text[ dutch ] = "Schaduwkleur";
+ Text[ chinese_simplified ] = "ÒõÓ°ÑÕÉ«";
+ Text[ greek ] = "×ñþìá óêéÜò";
+ Text[ korean ] = "À½¿µ »ö";
+ Text[ turkish ] = "Gölge rengi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_SHADOWXDIST
+{
+ Text = "Horizontaler Schattenversatz" ;
+ Text [ ENGLISH ] = "Horizontal shadow-distance" ;
+ Text [ portuguese ] = "Deslocamento horizontal da sombra" ;
+ Text [ english_us ] = "Horizontal shadow outline" ;
+ Text [ portuguese_brazilian ] = "Horizontaler Schattenversatz" ;
+ Text [ swedish ] = "Horisontell skuggförskjutning" ;
+ Text [ danish ] = "Vandret skyggeforskydning" ;
+ Text [ italian ] = "Spostamento orizzontale ombra" ;
+ Text [ spanish ] = "Desplazamiento hor. de sombra" ;
+ Text [ french ] = "Décalage horizontal de l'ombre" ;
+ Text [ dutch ] = "Horizontale schaduwopvulling" ;
+ Text[ chinese_simplified ] = "ˮƽ·½ÏòÒõÓ°";
+ Text[ russian ] = "Ãîðèçîíòàëüíûé êîíòóð òåíè";
+ Text[ polish ] = "Poziome przesuniêcie cienia";
+ Text[ japanese ] = "¶‰E‚ɉe‚̈ړ®";
+ Text[ chinese_traditional ] = "¤ô¥­³±¼v";
+ Text[ arabic ] = "ÅÒÇÍÉ ÇáÙá ÃÝÞíÇð";
+ Text[ dutch ] = "Horizontale schaduwopvulling";
+ Text[ chinese_simplified ] = "ˮƽ·½ÏòÒõÓ°";
+ Text[ greek ] = "Ïñéæüíôéá ìåôáôüðéóç óêéÜò";
+ Text[ korean ] = "¼öÆòÀû À½¿µ À±°û";
+ Text[ turkish ] = "Yatay gölge konumu";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_SHADOWYDIST
+{
+ Text = "Vertikaler Schattenversatz" ;
+ Text [ ENGLISH ] = "Vertical shadow-distance" ;
+ Text [ portuguese ] = "Deslocamento vertical da sombra" ;
+ Text [ english_us ] = "Vertical shadow outline" ;
+ Text [ portuguese_brazilian ] = "Vertikaler Schattenversatz" ;
+ Text [ swedish ] = "Vertikalt skuggavstånd" ;
+ Text [ danish ] = "Lodret skyggeforskydning" ;
+ Text [ italian ] = "Spostamento verticale ombra" ;
+ Text [ spanish ] = "Desplazamiento vert. de sombra" ;
+ Text [ french ] = "Décalage vertical de l'ombre" ;
+ Text [ dutch ] = "Verticale schaduwopvulling" ;
+ Text[ chinese_simplified ] = "´¹Ö±·½ÏòÒõÓ°";
+ Text[ russian ] = "Âåðòèêàëüíûé êîíòóð òåíè";
+ Text[ polish ] = "Pionowe przesuniêcie cienia";
+ Text[ japanese ] = "㉺‚ɉe‚̈ړ®";
+ Text[ chinese_traditional ] = "««ª½³±¼v";
+ Text[ arabic ] = "ÅÒÇÍÉ ÇáÙá ÑÃÓíÇð";
+ Text[ dutch ] = "Verticale schaduwopvulling";
+ Text[ chinese_simplified ] = "´¹Ö±·½ÏòÒõÓ°";
+ Text[ greek ] = "Êáôáêüñõöç ìåôáôüðéóç óêéÜò";
+ Text[ korean ] = "¼öÁ÷Àû À½¿µ À±°û";
+ Text[ turkish ] = "Dikey gölge kaymasý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_SHADOWTRANSPARENCE
+{
+ Text = "Schattentransparenz" ;
+ Text [ ENGLISH ] = "Shadow-transparence" ;
+ Text [ portuguese ] = "Transparência da sombra" ;
+ Text [ english_us ] = "Shadow transparency" ;
+ Text [ portuguese_brazilian ] = "Schattentransparenz" ;
+ Text [ swedish ] = "Skuggtransparens" ;
+ Text [ danish ] = "Skyggetransparens" ;
+ Text [ italian ] = "Trasparenza ombre" ;
+ Text [ spanish ] = "Transparencia de sombra" ;
+ Text [ french ] = "Transparence d'ombre" ;
+ Text [ dutch ] = "Schaduw transparant" ;
+ Text[ chinese_simplified ] = "ÒõӰ͸Ã÷";
+ Text[ russian ] = "Ïðîçðà÷íîñòü òåíè";
+ Text[ polish ] = "PrzezroczystoϾ cienia";
+ Text[ japanese ] = "‰e‚Ì“§–¾«";
+ Text[ chinese_traditional ] = "³±¼v³z©ú";
+ Text[ arabic ] = "ÔÝÇÝíÉ ÇáÙá";
+ Text[ dutch ] = "Schaduw transparant";
+ Text[ chinese_simplified ] = "ÒõӰ͸Ã÷";
+ Text[ greek ] = "ÄéáöÜíåéá óêéÜò";
+ Text[ korean ] = "Åõ¸í À½¿µ";
+ Text[ turkish ] = "Gölge saydamlýðý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_SHADOW3D
+{
+ Text = "3D-Schatten" ;
+ Text [ ENGLISH ] = "3D-Shadow" ;
+ Text [ portuguese ] = "Sombreado 3D" ;
+ Text [ english_us ] = "3D shadow" ;
+ Text [ portuguese_brazilian ] = "3D-Schatten" ;
+ Text [ swedish ] = "3D-skugga" ;
+ Text [ danish ] = "3D-skygge" ;
+ Text [ italian ] = "Ombra 3D" ;
+ Text [ spanish ] = "Sombra 3D" ;
+ Text [ french ] = "Ombre 3D" ;
+ Text [ dutch ] = "3D-schaduw" ;
+ Text[ chinese_simplified ] = "3 άÒõÓ°";
+ Text[ russian ] = "Òåíü 3-Ì";
+ Text[ polish ] = "Cieñ 3-W";
+ Text[ japanese ] = "3D ‰e•t‚«";
+ Text[ chinese_traditional ] = "3 ºû³±¼v";
+ Text[ arabic ] = "Ùá ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ dutch ] = "3D-schaduw";
+ Text[ chinese_simplified ] = "3 άÒõÓ°";
+ Text[ greek ] = "ÓêéÜ 3Ä";
+ Text[ korean ] = "3D À½¿µ";
+ Text[ turkish ] = "3B gölge";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_SHADOWPERSP
+{
+ Text = "Perspektivischer Schatten" ;
+ Text [ ENGLISH ] = "Perspectivic shadow" ;
+ Text [ portuguese ] = "Perspectiva da sombra" ;
+ Text [ english_us ] = "Perspective shadow" ;
+ Text [ portuguese_brazilian ] = "Perspektivischer Schatten" ;
+ Text [ swedish ] = "Perspektivisk skugga" ;
+ Text [ danish ] = "Perspektivisk skygge" ;
+ Text [ italian ] = "Ombra in prospettiva" ;
+ Text [ spanish ] = "Sombra en perspectiva" ;
+ Text [ french ] = "Ombre en perspective" ;
+ Text [ dutch ] = "Perspectivische schaduw" ;
+ Text[ chinese_simplified ] = "͸ÊÓÒõÓ°";
+ Text[ russian ] = "Ïåðñïåêòèâíàÿ òåíü";
+ Text[ polish ] = "Cieñ perspektywiczny";
+ Text[ japanese ] = "‰“‹ß‚ð‚‚¯‚½‰e";
+ Text[ chinese_traditional ] = "³zµø³±¼v";
+ Text[ arabic ] = "Ùá ãäÙæÑí";
+ Text[ dutch ] = "Perspectivische schaduw";
+ Text[ chinese_simplified ] = "͸ÊÓÒõÓ°";
+ Text[ greek ] = "ÐñïïðôéêÞ óêéÜ";
+ Text[ korean ] = "¿ø±Ù°¨ÀÖ´Â À½¿µ";
+ Text[ turkish ] = "Perspektifli gölge";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_SHADOWRESERVE1 { Text = "" ; };
+String STR_ItemNam_SHADOWRESERVE2 { Text = "" ; };
+String STR_ItemNam_SHADOWRESERVE3 { Text = "" ; };
+String STR_ItemNam_SHADOWRESERVE4 { Text = "" ; };
+String STR_ItemNam_SHADOWRESERVE5 { Text = "" ; };
+String STR_ItemNamSET_SHADOW
+{
+ Text = "Schattenattribute" ;
+ Text [ ENGLISH ] = "Shadow-attributes" ;
+ Text [ english_us ] = "Shadow attributes" ;
+ Text [ portuguese_brazilian ] = "Schattenattribute" ;
+ Text [ swedish ] = "Skuggattribut" ;
+ Text [ danish ] = "Skyggeattributter" ;
+ Text [ italian ] = "Attributi ombra" ;
+ Text [ spanish ] = "Atributos de sombra" ;
+ Text [ french ] = "Attributs d'ombre" ;
+ Text [ dutch ] = "Schaduwattributen" ;
+ Text [ portuguese ] = "Atributos da sombra" ;
+ Text[ chinese_simplified ] = "ÒõÓ°ÊôÐÔ";
+ Text[ russian ] = "Àòðèáóòû òåíè";
+ Text[ polish ] = "Atrybuty cienia";
+ Text[ japanese ] = "‰e‚Ì‘®«";
+ Text[ chinese_traditional ] = "³±¼vÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáÙá";
+ Text[ dutch ] = "Schaduwattributen";
+ Text[ chinese_simplified ] = "ÒõÓ°ÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò óêéÜò";
+ Text[ korean ] = "À½¿µ ¼Ó¼º";
+ Text[ turkish ] = "Gölge öznitelikleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONTYPE
+{
+ Text = "Legendentyp" ;
+ Text [ ENGLISH ] = "Caption-type" ;
+ Text [ portuguese ] = "Tipo de legenda" ;
+ Text [ english_us ] = "Callout type" ;
+ Text [ portuguese_brazilian ] = "Legendentyp" ;
+ Text [ swedish ] = "Förklaringstyp" ;
+ Text [ danish ] = "Forklaringstype" ;
+ Text [ italian ] = "Tipo di legenda" ;
+ Text [ spanish ] = "Tipo de leyenda" ;
+ Text [ french ] = "Type de légende" ;
+ Text [ dutch ] = "Legendatype" ;
+ Text[ chinese_simplified ] = "ͼÀýÀàÐÍ";
+ Text[ russian ] = "Òèï ëåãåíäû";
+ Text[ polish ] = "Typ legendy";
+ Text[ japanese ] = "‚«o‚µ‚ÌŽí—Þ";
+ Text[ chinese_traditional ] = "¹Ï¨ÒÃþ«¬";
+ Text[ arabic ] = "äæÚ ÇáÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Legendatype";
+ Text[ chinese_simplified ] = "ͼÀýÀàÐÍ";
+ Text[ greek ] = "Ôýðïò åðéãñáöÞò";
+ Text[ korean ] = "¹ü·Ê Çü½Ä";
+ Text[ turkish ] = "Belirtme çizgisi tipi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONFIXEDANGLE
+{
+ Text = "Winkelvorgabe" ;
+ Text [ ENGLISH ] = "Given angle" ;
+ Text [ portuguese ] = "Ângulo dado" ;
+ Text [ english_us ] = "Given angle" ;
+ Text [ portuguese_brazilian ] = "Winkelvorgabe" ;
+ Text [ swedish ] = "Given vinkel" ;
+ Text [ danish ] = "Given vinkel" ;
+ Text [ italian ] = "Angolo dato" ;
+ Text [ spanish ] = "Ángulo dado" ;
+ Text [ french ] = "Angle donné" ;
+ Text [ dutch ] = "Gegeven hoek" ;
+ Text[ chinese_simplified ] = "Ô¤Éè½Ç¶È";
+ Text[ russian ] = "Çàäàíèå óãëà";
+ Text[ polish ] = "Podany k¹t";
+ Text[ japanese ] = "ݒ肳‚ꂽŠp“x";
+ Text[ chinese_traditional ] = "¹w³]¨¤«×";
+ Text[ arabic ] = "ÇáÒÇæíÉ ÇáãÚØÇÉ";
+ Text[ dutch ] = "Gegeven hoek";
+ Text[ chinese_simplified ] = "Ô¤Éè½Ç¶È";
+ Text[ greek ] = "ÄåäïìÝíç ãùíßá";
+ Text[ korean ] = "ÁÖ¾îÁø °¢µµ";
+ Text[ turkish ] = "Belirlenen açý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONANGLE
+{
+ Text = "Winkel" ;
+ Text [ ENGLISH ] = "Angle" ;
+ Text [ portuguese ] = "Ângulo" ;
+ Text [ english_us ] = "Angle" ;
+ Text [ portuguese_brazilian ] = "Winkel" ;
+ Text [ swedish ] = "Vinkel" ;
+ Text [ danish ] = "Vinkel" ;
+ Text [ italian ] = "Angolo" ;
+ Text [ spanish ] = "Ángulo" ;
+ Text [ french ] = "Angle" ;
+ Text [ dutch ] = "Hoek" ;
+ Text[ chinese_simplified ] = "½Ç¶È";
+ Text[ russian ] = "Óãîë";
+ Text[ polish ] = "K¹t";
+ Text[ japanese ] = "Šp“x";
+ Text[ chinese_traditional ] = "¨¤«×";
+ Text[ arabic ] = "ÇáÒÇæíÉ";
+ Text[ dutch ] = "Hoek";
+ Text[ chinese_simplified ] = "½Ç¶È";
+ Text[ greek ] = "Ãùíßá";
+ Text[ korean ] = "°¢µµ";
+ Text[ turkish ] = "Açý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONGAP
+{
+ Text = "Freiraum" ;
+ Text [ ENGLISH ] = "Caption-gap" ;
+ Text [ portuguese ] = "Espaço livre" ;
+ Text [ english_us ] = "Gap" ;
+ Text [ portuguese_brazilian ] = "Freiraum" ;
+ Text [ swedish ] = "Frirum" ;
+ Text [ danish ] = "Frirum" ;
+ Text [ italian ] = "Spazio libero" ;
+ Text [ spanish ] = "Espacio libre" ;
+ Text [ french ] = "Espace capture" ;
+ Text [ dutch ] = "Vrijruimte" ;
+ Text[ chinese_simplified ] = "×ÔÓÉ¿Õ¼ä";
+ Text[ russian ] = "Ïðîïóñê";
+ Text[ polish ] = "Wolne miejsce";
+ Text[ japanese ] = "‹ó”’•”•ª";
+ Text[ chinese_traditional ] = "¦Û¥ÑªÅ¶¡";
+ Text[ arabic ] = "ÊÈÇÚÏ";
+ Text[ dutch ] = "Vrijruimte";
+ Text[ chinese_simplified ] = "×ÔÓÉ¿Õ¼ä";
+ Text[ greek ] = "Åëåýèåñïò ÷þñïò";
+ Text[ korean ] = "°ø¹é";
+ Text[ turkish ] = "Boþluk";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONESCDIR
+{
+ Text = "Austrittsrichtung" ;
+ Text [ ENGLISH ] = "Escape-direction" ;
+ Text [ portuguese ] = "Direcção de saída" ;
+ Text [ english_us ] = "Exit direction" ;
+ Text [ portuguese_brazilian ] = "Austrittsrichtung" ;
+ Text [ swedish ] = "Utgångsriktning" ;
+ Text [ danish ] = "Udgangsretning" ;
+ Text [ italian ] = "Direzione di uscita" ;
+ Text [ spanish ] = "Dirección de salida" ;
+ Text [ french ] = "Direction de sortie" ;
+ Text [ dutch ] = "Uittredingsrichting" ;
+ Text[ chinese_simplified ] = "Í˳ö·½Ïò";
+ Text[ russian ] = "Íàïðàâëåíèå âûõîäà";
+ Text[ polish ] = "Kierunek wyjœcia";
+ Text[ japanese ] = "o‚·•ûŒü";
+ Text[ chinese_traditional ] = "°h¥X¤è¦V";
+ Text[ arabic ] = "ÇÊÌÇå ÇáÎÑæÌ";
+ Text[ dutch ] = "Uittredingsrichting";
+ Text[ chinese_simplified ] = "Í˳ö·½Ïò";
+ Text[ greek ] = "Êáôåýèõíóç åîüäïõ";
+ Text[ korean ] = "³¡³»±â ¹æÇâ";
+ Text[ turkish ] = "Çýkýþ yönü";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONESCISREL
+{
+ Text = "Relative Austrittsposition" ;
+ Text [ ENGLISH ] = "Relative Escape-position" ;
+ Text [ portuguese ] = "Posição de saída relativa" ;
+ Text [ english_us ] = "Relative exit position" ;
+ Text [ portuguese_brazilian ] = "Relative Austrittsposition" ;
+ Text [ swedish ] = "Relativ utträdesposition" ;
+ Text [ danish ] = "Relativ udgangsplacering" ;
+ Text [ italian ] = "Posizione di uscita relativa" ;
+ Text [ spanish ] = "Dirección de salida relativa" ;
+ Text [ french ] = "Position de sortie relative" ;
+ Text [ dutch ] = "Relatieve uittredingspositie" ;
+ Text[ chinese_simplified ] = "Ïà¶ÔµÄÍ˳öλÖÃ";
+ Text[ russian ] = "Îòíîñèòåëüíàÿ ïîçèöèÿ âûõîäà";
+ Text[ polish ] = "Wzglêdna pozycja wyjœciowa";
+ Text[ japanese ] = "‘Š‘ΓI‚Èo‚·ˆÊ’u";
+ Text[ chinese_traditional ] = "¬Û¹ïªº°h¥X¦ì¸m";
+ Text[ arabic ] = "ãæÖÚ ÎÑæÌ äÓÈí";
+ Text[ dutch ] = "Relatieve uittredingspositie";
+ Text[ chinese_simplified ] = "Ïà¶ÔµÄÍ˳öλÖÃ";
+ Text[ greek ] = "Ó÷åôéêÞ èÝóç åîüäïõ";
+ Text[ korean ] = "»ó´ëÀû ³¡³»±â À§Ä¡";
+ Text[ turkish ] = "Göreceli çýkýþ konumu";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONESCREL
+{
+ Text = "Austrittsposition" ;
+ Text [ ENGLISH ] = "Austrittsposition" ;
+ Text [ portuguese ] = "Posição de saída" ;
+ Text [ english_us ] = "Exit Position" ;
+ Text [ portuguese_brazilian ] = "Austrittsposition" ;
+ Text [ swedish ] = "Utträdesposition" ;
+ Text [ danish ] = "Udgangsplacering" ;
+ Text [ italian ] = "Posizione di uscita" ;
+ Text [ spanish ] = "Posición de salida" ;
+ Text [ french ] = "Position de sortie" ;
+ Text [ dutch ] = "Uittredingspositie" ;
+ Text[ chinese_simplified ] = "Í˳öλÖÃ";
+ Text[ russian ] = "Ïîçèöèÿ âûõîäà";
+ Text[ polish ] = "Po³o¿enie wyjœciowe";
+ Text[ japanese ] = "o‚·ˆÊ’u";
+ Text[ chinese_traditional ] = "°h¥X¦ì¸m";
+ Text[ arabic ] = "ãæÖÚ ÇáÎÑæÌ";
+ Text[ dutch ] = "Uittredingspositie";
+ Text[ chinese_simplified ] = "Í˳öλÖÃ";
+ Text[ greek ] = "ÈÝóç åîüäïõ";
+ Text[ korean ] = "³¡³»±â À§Ä¡";
+ Text[ turkish ] = "Çýkýþ konumu";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONESCABS
+{
+ Text = "Austrittsposition" ;
+ Text [ ENGLISH ] = "Austrittsposition" ;
+ Text [ portuguese ] = "Posição de saída" ;
+ Text [ english_us ] = "Exit Position" ;
+ Text [ portuguese_brazilian ] = "Austrittsposition" ;
+ Text [ swedish ] = "Utträdesposition" ;
+ Text [ danish ] = "Udgangsplacering" ;
+ Text [ italian ] = "Posizione di uscita" ;
+ Text [ spanish ] = "Posición de salida" ;
+ Text [ french ] = "Position de sortie" ;
+ Text [ dutch ] = "Uittredingspositie" ;
+ Text[ chinese_simplified ] = "Í˳öλÖÃ";
+ Text[ russian ] = "Ïîçèöèÿ âûõîäà";
+ Text[ polish ] = "Po³o¿enie wyjœciowe";
+ Text[ japanese ] = "o‚·ˆÊ’u";
+ Text[ chinese_traditional ] = "°h¥X¦ì¸m";
+ Text[ arabic ] = "ãæÖÚ ÇáÎÑæÌ";
+ Text[ dutch ] = "Uittredingspositie";
+ Text[ chinese_simplified ] = "Í˳öλÖÃ";
+ Text[ greek ] = "ÈÝóç åîüäïõ";
+ Text[ korean ] = "³¡³»±â À§Ä¡";
+ Text[ turkish ] = "Çýkýþ konumu";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONLINELEN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Linienlänge : Linienlõnge */
+ /* ### ACHTUNG: Neuer Text in Resource? Linienlänge : Linienlõnge */
+ Text = "Linienlänge" ;
+ Text [ ENGLISH ] = "Line-length" ;
+ Text [ portuguese ] = "Comprimento de linha" ;
+ Text [ english_us ] = "Line length" ;
+ Text [ portuguese_brazilian ] = "Linienlänge" ;
+ Text [ swedish ] = "Linjelängd" ;
+ Text [ danish ] = "Linjelængde" ;
+ Text [ italian ] = "Lunghezza linea" ;
+ Text [ spanish ] = "Largo de la línea" ;
+ Text [ french ] = "Longueur de ligne" ;
+ Text [ dutch ] = "Lijnlengte" ;
+ Text[ chinese_simplified ] = "ÏßÌõ³¤¶È";
+ Text[ russian ] = "Äëèíà ëèíèè";
+ Text[ polish ] = "D³ugoœæ linii";
+ Text[ japanese ] = "ü‚Ì’·‚³";
+ Text[ chinese_traditional ] = "½u±øªø«×";
+ Text[ arabic ] = "Øæá ÇáÎØ";
+ Text[ dutch ] = "Lijnlengte";
+ Text[ chinese_simplified ] = "ÏßÌõ³¤¶È";
+ Text[ greek ] = "ÌÞêïò ãñáììÞò";
+ Text[ korean ] = "¼± ±æÀÌ";
+ Text[ turkish ] = "Çizgi uzunluðu";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONFITLINELEN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Automatische Linienlänge : Automatische Linienlõnge */
+ /* ### ACHTUNG: Neuer Text in Resource? Automatische Linienlänge : Automatische Linienlõnge */
+ Text = "Automatische Linienlänge" ;
+ Text [ ENGLISH ] = "Fit line-length" ;
+ Text [ portuguese ] = "Comprimento de linha automático" ;
+ Text [ english_us ] = "Auto line length" ;
+ Text [ portuguese_brazilian ] = "Automatische Linienlänge" ;
+ Text [ swedish ] = "Automatisk linjelängd" ;
+ Text [ danish ] = "Automatisk linjelængde" ;
+ Text [ italian ] = "Lunghezza automatica linea" ;
+ Text [ spanish ] = "Largo de línea automático" ;
+ Text [ french ] = "Longueur de ligne automatique" ;
+ Text [ dutch ] = "Automatische lijnlengte" ;
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷ÕûÏßÌõ³¤¶È";
+ Text[ russian ] = "Àâòîìàòè÷åñêàÿ äëèíà ëèíèè";
+ Text[ polish ] = "Automatyczna d³ugoœæ linii";
+ Text[ japanese ] = "Ž©“®“I‚Èü‚Ì’·‚³";
+ Text[ chinese_traditional ] = "¦Û°Ê½Õ¾ã½u±øªø«×";
+ Text[ arabic ] = "ÇáØæá ÇáÊáÞÇÆí ááÎØæØ";
+ Text[ dutch ] = "Automatische lijnlengte";
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷ÕûÏßÌõ³¤¶È";
+ Text[ greek ] = "Áõôüìáôï ìÞêïò ãñáììþí";
+ Text[ korean ] = "ÀÚµ¿ ¼± ±æÀÌ";
+ Text[ turkish ] = "Otomatik çizgi uzunluðu";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_CAPTIONRESERVE1 { Text = "" ; };
+String STR_ItemNam_CAPTIONRESERVE2 { Text = "" ; };
+String STR_ItemNam_CAPTIONRESERVE3 { Text = "" ; };
+String STR_ItemNam_CAPTIONRESERVE4 { Text = "" ; };
+String STR_ItemNam_CAPTIONRESERVE5 { Text = "" ; };
+String STR_ItemNamSET_CAPTION
+{
+ Text = "Legendenattribute" ;
+ Text [ ENGLISH ] = "Caption-attributes" ;
+ Text [ portuguese ] = "Atributos da legenda" ;
+ Text [ english_us ] = "Callout attributes" ;
+ Text [ portuguese_brazilian ] = "Legendenattribute" ;
+ Text [ swedish ] = "Förklaringsattribut" ;
+ Text [ danish ] = "Forklaringsattributter" ;
+ Text [ italian ] = "Attributi legenda" ;
+ Text [ spanish ] = "Atributos de leyenda" ;
+ Text [ french ] = "Attributs légende" ;
+ Text [ dutch ] = "Legenda-attributen" ;
+ Text[ chinese_simplified ] = "ͼÀýÊôÐÔ";
+ Text[ russian ] = "Àòðèáóòû ëåãåíäû";
+ Text[ polish ] = "Atrybuty legendy";
+ Text[ japanese ] = "‚«o‚µ‚Ì‘®«";
+ Text[ chinese_traditional ] = "¹Ï¨ÒÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Legenda-attributen";
+ Text[ chinese_simplified ] = "ͼÀýÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò åðéãñáöÞò";
+ Text[ korean ] = "¹ü·Ê ¼Ó¼º";
+ Text[ turkish ] = "Belirtme çizgisi öznitelikleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNamSET_OUTLINER
+{
+ Text = "Textattribute" ;
+ Text [ ENGLISH ] = "Text-attributes" ;
+ Text [ english_us ] = "Text attributes" ;
+ Text [ portuguese_brazilian ] = "Textattribute" ;
+ Text [ swedish ] = "Textattribut" ;
+ Text [ danish ] = "Tekstattributter" ;
+ Text [ italian ] = "Attributi di testo" ;
+ Text [ spanish ] = "Atributos de texto" ;
+ Text [ french ] = "Attributs texte" ;
+ Text [ dutch ] = "Tekstattributen" ;
+ Text [ portuguese ] = "Atributos do texto" ;
+ Text[ chinese_simplified ] = "Îı¾ÊôÐÔ";
+ Text[ russian ] = "Àòðèáóòû òåêñòà";
+ Text[ polish ] = "Atrybuty tekstu";
+ Text[ japanese ] = "÷½Ä‚Ì‘®«";
+ Text[ chinese_traditional ] = "¤å¦rÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáäÕ";
+ Text[ dutch ] = "Tekstattributen";
+ Text[ chinese_simplified ] = "Îı¾ÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® ¼Ó¼º";
+ Text[ turkish ] = "Metin öznitelikleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_ECKENRADIUS
+{
+ Text = "Eckenradius" ;
+ Text [ ENGLISH ] = "Eckenradius" ;
+ Text [ portuguese ] = "Raio do ângulo" ;
+ Text [ english_us ] = "Corner radius" ;
+ Text [ portuguese_brazilian ] = "Eckenradius" ;
+ Text [ swedish ] = "Hörnradie" ;
+ Text [ danish ] = "Hjørneradius" ;
+ Text [ italian ] = "Raggio d'angolo" ;
+ Text [ spanish ] = "Radio de ángulo" ;
+ Text [ french ] = "Rayon d'angle" ;
+ Text [ dutch ] = "Hoekafronding" ;
+ Text[ chinese_simplified ] = "½Ç°ë¾¶";
+ Text[ russian ] = "Ðàäèóñ çàêðóãëåííîãî óãëà";
+ Text[ polish ] = "Promieñ krzywizny";
+ Text[ japanese ] = "Šp‚Ì”¼Œa";
+ Text[ chinese_traditional ] = "¨¤¥b®|";
+ Text[ arabic ] = "äÕÝ ÞØÑ ÇáÒÇæíÉ";
+ Text[ dutch ] = "Hoekafronding";
+ Text[ chinese_simplified ] = "½Ç°ë¾¶";
+ Text[ greek ] = "Áêôßíá ãùíßáò";
+ Text[ korean ] = "¸ð¼­¸® °¢µµ";
+ Text[ turkish ] = "Köþe çapý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_LEFTDIST
+{
+ Text = "Linker Rahmenabstand" ;
+ Text [ ENGLISH ] = "Left framedistance" ;
+ Text [ portuguese ] = "Margem esquerda da moldura" ;
+ Text [ english_us ] = "Left Border Spacing" ;
+ Text [ portuguese_brazilian ] = "Linker Rahmenabstand" ;
+ Text [ swedish ] = "Vänster ramavstånd" ;
+ Text [ danish ] = "Venstre rammeafstand" ;
+ Text [ italian ] = "Distanza sinistra cornice" ;
+ Text [ spanish ] = "Margen izquierdo" ;
+ Text [ french ] = "Bord gauche du cadre" ;
+ Text [ dutch ] = "Linker kaderafstand" ;
+ Text[ chinese_simplified ] = "×ó¿ò¼ä¸ô";
+ Text[ russian ] = "Ëåâûé èíòåðâàë ðàìêè";
+ Text[ polish ] = "Lewy odstêp ramek";
+ Text[ japanese ] = "¶˜gü‚Ü‚Å‚ÌŠÔŠu";
+ Text[ chinese_traditional ] = "¥ª®Ø¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ ÇáÃíÓÑ ááÅØÇÑ";
+ Text[ dutch ] = "Linker kaderafstand";
+ Text[ chinese_simplified ] = "×ó¿ò¼ä¸ô";
+ Text[ greek ] = "Áðüóôáóç ðëáéóßïõ áñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ Æ² °£°Ý";
+ Text[ turkish ] = "Sol çerçeve aralýðý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_RIGHTDIST
+{
+ Text = "Rechter Rahmenabstand" ;
+ Text [ ENGLISH ] = "Right framedistance" ;
+ Text [ portuguese ] = "Margem direita da moldura" ;
+ Text [ english_us ] = "Right border distance" ;
+ Text [ portuguese_brazilian ] = "Rechter Rahmenabstand" ;
+ Text [ swedish ] = "Höger ramavstånd" ;
+ Text [ danish ] = "Højre rammeafstand" ;
+ Text [ italian ] = "Distanta destra cornice" ;
+ Text [ spanish ] = "Margen derecho" ;
+ Text [ french ] = "Bord droit du cadre" ;
+ Text [ dutch ] = "Rechter kaderafstand" ;
+ Text[ chinese_simplified ] = "ÓÒ¿ò¼ä¸ô";
+ Text[ russian ] = "Ðàññòîÿíèå îò ðàìêè ñïðàâà";
+ Text[ polish ] = "Prawy odstêp ramek";
+ Text[ japanese ] = "‰E˜gü‚Ü‚Å‚ÌŠÔŠu";
+ Text[ chinese_traditional ] = "¥k®Ø¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ ÇáÃíãä ááÅØÇÑ";
+ Text[ dutch ] = "Rechter kaderafstand";
+ Text[ chinese_simplified ] = "ÓÒ¿ò¼ä¸ô";
+ Text[ greek ] = "ÄåîéÜ áðüóôáóç ðëáéóßïõ";
+ Text[ korean ] = "¿À¸¥ÂÊ Æ² °£°Ý";
+ Text[ turkish ] = "Sað çerçeve aralýðý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_UPPERDIST
+{
+ Text = "Oberer Rahmenabstand" ;
+ Text [ ENGLISH ] = "Upper framedistance" ;
+ Text [ portuguese ] = "Margem superior da moldura" ;
+ Text [ english_us ] = "Upper border distance" ;
+ Text [ portuguese_brazilian ] = "Oberer Rahmenabstand" ;
+ Text [ swedish ] = "Övre ramavstånd" ;
+ Text [ danish ] = "Rammeafstand foroven" ;
+ Text [ italian ] = "Distanza superiore cornice" ;
+ Text [ spanish ] = "Margen superior" ;
+ Text [ french ] = "Bord supérieur du cadre" ;
+ Text [ dutch ] = "Kaderafstand boven" ;
+ Text[ chinese_simplified ] = "ÉÏ¿ò¼ä¸ô";
+ Text[ russian ] = "Âåðõíèé èíòåðâàë ðàìêè";
+ Text[ polish ] = "Górny odstêp ramek";
+ Text[ japanese ] = "ã˜gü‚Ü‚Å‚ÌŠÔŠu";
+ Text[ chinese_traditional ] = "¤W®Ø¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ ÇáÚáæí ááÅØÇÑ";
+ Text[ dutch ] = "Kaderafstand boven";
+ Text[ chinese_simplified ] = "ÉÏ¿ò¼ä¸ô";
+ Text[ greek ] = "¢íù áðüóôáóç ðëáéóßïõ";
+ Text[ korean ] = "À§ Ʋ °£°Ý";
+ Text[ turkish ] = "Üst çerçeve aralýðý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_LOWERDIST
+{
+ Text = "Unterer Rahmenabstand" ;
+ Text [ ENGLISH ] = "Lower framedistance" ;
+ Text [ portuguese ] = "Margem inferior da moldura" ;
+ Text [ english_us ] = "Lower Border Spacing" ;
+ Text [ portuguese_brazilian ] = "Unterer Rahmenabstand" ;
+ Text [ swedish ] = "Nedre ramavstånd" ;
+ Text [ danish ] = "Rammeafstand forneden" ;
+ Text [ italian ] = "Distanza inferiore cornice" ;
+ Text [ spanish ] = "Margen inferior" ;
+ Text [ french ] = "Espacement inférieur du cadre" ;
+ Text [ dutch ] = "Kaderafstand beneden" ;
+ Text[ chinese_simplified ] = "Ï¿ò¼ä¸ô";
+ Text[ russian ] = "Íèæíèé èíòåðâàë ðàìêè";
+ Text[ polish ] = "Dolny odstêp ramek";
+ Text[ japanese ] = "‰º˜gü‚Ü‚Å‚ÌŠÔŠu";
+ Text[ chinese_traditional ] = "¤U®Ø¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ ÇáÓÝáí ááÅØÇÑ";
+ Text[ dutch ] = "Kaderafstand beneden";
+ Text[ chinese_simplified ] = "Ï¿ò¼ä¸ô";
+ Text[ greek ] = "Áðüóôáóç ðëáéóßïõ êÜôù";
+ Text[ korean ] = "¾Æ·¡ Ʋ °£°Ý";
+ Text[ turkish ] = "Alt çerçeve aralýðý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_AUTOGROWHEIGHT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Automatische Anpassung der Rahmenhöhe : Automatische Anpassung der Rahmenh÷he */
+ /* ### ACHTUNG: Neuer Text in Resource? Automatische Anpassung der Rahmenhöhe : Automatische Anpassung der Rahmenh÷he */
+ Text = "Automatische Anpassung der Rahmenhöhe" ;
+ Text [ ENGLISH ] = "Fit frameheight" ;
+ Text [ portuguese ] = "Ajuste automático da altura da moldura." ;
+ Text [ english_us ] = "AutoFit frame height" ;
+ Text [ portuguese_brazilian ] = "Automatische Anpassung der Rahmenhöhe" ;
+ Text [ swedish ] = "Automatisk anpassning av ramhöjd" ;
+ Text [ danish ] = "Autotilpas rammehøjden" ;
+ Text [ italian ] = "Adattamento automatico dell'altezza cornice" ;
+ Text [ spanish ] = "Ajuste automático de la altura del marco" ;
+ Text [ french ] = "Adaptation autom. de la hauteur du cadre" ;
+ Text [ dutch ] = "Automatische aanpassing van kaderhoogte" ;
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷Õû¿ò¸ß¶È";
+ Text[ russian ] = "Àâòîïîäáîð âûñîòû ðàìêè";
+ Text[ polish ] = "Autodopasowanie wysokoœci ramki";
+ Text[ japanese ] = "Ž©“®“I‚ɘg‚Ì‚‚³‚É“K‡";
+ Text[ chinese_traditional ] = "¦Û°Ê½Õ¾ã®Ø°ª«×";
+ Text[ arabic ] = "ãáÇÁãÉ ÇÑÊÝÇÚ ÇáÅØÇÑ ÊáÞÇÆíÇð";
+ Text[ dutch ] = "Automatische aanpassing van kaderhoogte";
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷Õû¿ò¸ß¶È";
+ Text[ greek ] = "Áõôüìáôç ðñïóáñìïãÞ ôïõ ýøïõò ôïõ ðëáéóßïõ";
+ Text[ korean ] = "ÇÁ·¹ÀÓ ³ôÀÌ ÀÚµ¿ ¸ÂÃã";
+ Text[ turkish ] = "Otomatik çerçeve yüksekliði ayarý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_MINFRAMEHEIGHT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Minimale Rahmenhöhe : Minimale Rahmenh÷he */
+ /* ### ACHTUNG: Neuer Text in Resource? Minimale Rahmenhöhe : Minimale Rahmenh÷he */
+ Text = "Minimale Rahmenhöhe" ;
+ Text [ ENGLISH ] = "Min. frameheight" ;
+ Text [ portuguese ] = "Altura mínima da moldura" ;
+ Text [ english_us ] = "Min. frame height" ;
+ Text [ portuguese_brazilian ] = "Minimale Rahmenhöhe" ;
+ Text [ swedish ] = "Minsta ramhöjd" ;
+ Text [ danish ] = "Minimal rammehøjde" ;
+ Text [ italian ] = "Altezza minima cornice" ;
+ Text [ spanish ] = "Altura mínima del marco" ;
+ Text [ french ] = "Hauteur minimale du cadre" ;
+ Text [ dutch ] = "Minimale kaderhoogte" ;
+ Text[ chinese_simplified ] = "×îС¿ò¸ß";
+ Text[ russian ] = "Ìèíèìàëüíàÿ âûñîòà ðàìêè";
+ Text[ polish ] = "Minimalna wysokoϾ ramki";
+ Text[ japanese ] = "ŬŒÀ‚̘g‚Ì‚‚³";
+ Text[ chinese_traditional ] = "³Ì¤p®Ø°ª";
+ Text[ arabic ] = "ÇáÇÑÊÝÇÚ ÇáÃÏäì ááÅØÇÑ";
+ Text[ dutch ] = "Minimale kaderhoogte";
+ Text[ chinese_simplified ] = "×îС¿ò¸ß";
+ Text[ greek ] = "ÅëÜ÷éóôï ýøïò ðëáéóßïõ";
+ Text[ korean ] = "ÃÖ¼Ò Æ² ³ôÀÌ";
+ Text[ turkish ] = "Asgari çerçeve yüksekliði";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_MAXFRAMEHEIGHT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Maximale Rahmenhöhe : Maximale Rahmenh÷he */
+ /* ### ACHTUNG: Neuer Text in Resource? Maximale Rahmenhöhe : Maximale Rahmenh÷he */
+ Text = "Maximale Rahmenhöhe" ;
+ Text [ ENGLISH ] = "Max. frameheight" ;
+ Text [ portuguese ] = "Altura máxima da moldura" ;
+ Text [ english_us ] = "Max. frame height" ;
+ Text [ portuguese_brazilian ] = "Maximale Rahmenhöhe" ;
+ Text [ swedish ] = "Maximal ramhöjd" ;
+ Text [ danish ] = "Maksimal rammehøjde" ;
+ Text [ italian ] = "Altezza massima cornice" ;
+ Text [ spanish ] = "Altura máxima del marco" ;
+ Text [ french ] = "Hauteur maximale du cadre" ;
+ Text [ dutch ] = "Maximale kaderhoogte" ;
+ Text[ chinese_simplified ] = "×î´ó¿ò¸ß";
+ Text[ russian ] = "Ìàêñèìàëüíàÿ âûñîòà ðàìêè";
+ Text[ polish ] = "Maksymalna wysokoϾ ramki";
+ Text[ japanese ] = "Å‘åŒÀ‚̘g‚Ì‚‚³";
+ Text[ chinese_traditional ] = "³Ì¤j®Ø°ª";
+ Text[ arabic ] = "ÇáÇÑÊÝÇÚ ÇáÃÞÕì ááÅØÇÑ";
+ Text[ dutch ] = "Maximale kaderhoogte";
+ Text[ chinese_simplified ] = "×î´ó¿ò¸ß";
+ Text[ greek ] = "ÌÝãéóôï ýøïò ðëáéóßïõ";
+ Text[ korean ] = "ÃÖ´ë Ʋ ³ôÀÌ";
+ Text[ turkish ] = "Azami çerçeve yüksekliði";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_AUTOGROWWIDTH
+{
+ Text = "Automatische Anpassung der Rahmenbreite" ;
+ Text [ ENGLISH ] = "Fit frameheight" ;
+ Text [ portuguese ] = "Ajuste automático da largura da moldura." ;
+ Text [ english_us ] = "AutoFit frame width" ;
+ Text [ portuguese_brazilian ] = "Automatische Anpassung der Rahmenbreite" ;
+ Text [ swedish ] = "Automatisk anpassning av rambredd" ;
+ Text [ danish ] = "Autotilpas rammebredden" ;
+ Text [ italian ] = "Adattamento automatico della larghezza cornice" ;
+ Text [ spanish ] = "Ajuste automático del ancho del marco" ;
+ Text [ french ] = "Adaptation autom. de la largeur du cadre" ;
+ Text [ dutch ] = "Automatische aanpassing van kaderbreedte" ;
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷Õû¿ò¿í¶È";
+ Text[ russian ] = "Àâòîïîäáîð øèðèíû ðàìêè";
+ Text[ polish ] = "Autodopasowanie wysokoœci ramki";
+ Text[ japanese ] = "Ž©“®“I‚ɘg‚Ì•‚É“K‡";
+ Text[ chinese_traditional ] = "¦Û°Ê½Õ¾ã®Ø¼e«×";
+ Text[ arabic ] = "ãáÇÁãÉ ÚÑÖ ÇáÅØÇÑ ÊáÞÇÆíÇð";
+ Text[ dutch ] = "Automatische aanpassing van kaderbreedte";
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷Õû¿ò¿í¶È";
+ Text[ greek ] = "Áõôüìáôç ðñïóáñìïãÞ ôïõ ðëÜôïõò ôïõ ðëáéóßïõ";
+ Text[ korean ] = "ÇÁ·¹ÀÓ ³Êºñ ÀÚµ¿ Á¶Àý";
+ Text[ turkish ] = "Otomatik çerçeve geniþliði ayarý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_MINFRAMEWIDTH
+{
+ Text = "Minimale Rahmenbreite" ;
+ Text [ ENGLISH ] = "Min. framewidth" ;
+ Text [ portuguese ] = "Largura mínima da moldura" ;
+ Text [ english_us ] = "Min. frame width" ;
+ Text [ portuguese_brazilian ] = "Minimale Rahmenbreite" ;
+ Text [ swedish ] = "Minsta rambredd" ;
+ Text [ danish ] = "Minimal rammehøjde" ;
+ Text [ italian ] = "Larghezza minima cornice" ;
+ Text [ spanish ] = "Ancho mínimo del marco" ;
+ Text [ french ] = "Largeur minimale du cadre" ;
+ Text [ dutch ] = "Minimale kaderbreedte" ;
+ Text[ chinese_simplified ] = "×îС¿ò¿í";
+ Text[ russian ] = "Ìèíèìàëüíàÿ øèðèíà ðàìêè";
+ Text[ polish ] = "Minimalna szerokoϾ ramki";
+ Text[ japanese ] = "ŬŒÀ‚̘g‚Ì•";
+ Text[ chinese_traditional ] = "³Ì¤p®Ø¼e";
+ Text[ arabic ] = "ÇáÚÑÖ ÇáÃÏäì ááÅØÇÑ";
+ Text[ dutch ] = "Minimale kaderbreedte";
+ Text[ chinese_simplified ] = "×îС¿ò¿í";
+ Text[ greek ] = "ÅëÜ÷éóôï ðëÜôïò ðëáéóßïõ";
+ Text[ korean ] = "ÃÖ¼Ò Æ² ³Êºñ";
+ Text[ turkish ] = "Asgari çerçeve geniþliði";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_MAXFRAMEWIDTH
+{
+ Text = "Maximale Rahmenbreite" ;
+ Text [ ENGLISH ] = "Max. framewidth" ;
+ Text [ portuguese ] = "Largura máxima da moldura" ;
+ Text [ english_us ] = "Max. frame width" ;
+ Text [ portuguese_brazilian ] = "Maximale Rahmenbreite" ;
+ Text [ swedish ] = "Maximal rambredd" ;
+ Text [ danish ] = "Maksimal rammebredde" ;
+ Text [ italian ] = "Larghezza massima cornice" ;
+ Text [ spanish ] = "Ancho máximo del marco" ;
+ Text [ french ] = "Largeur maximale du cadre" ;
+ Text [ dutch ] = "Maximale kaderbreedte" ;
+ Text[ chinese_simplified ] = "×î´ó¿ò¿í";
+ Text[ russian ] = "Ìàêñèìàëüíàÿ øèðèíà ðàìêè";
+ Text[ polish ] = "Maksymalna szerokoϾ ramki";
+ Text[ japanese ] = "Å‘åŒÀ‚̘g‚Ì•";
+ Text[ chinese_traditional ] = "³Ì¤j®Ø¼e";
+ Text[ arabic ] = "ÇáÚÑÖ ÇáÃÞÕì ááÅØÇÑ";
+ Text[ dutch ] = "Maximale kaderbreedte";
+ Text[ chinese_simplified ] = "×î´ó¿ò¿í";
+ Text[ greek ] = "ÌÝãéóôï ðëÜôïò ðëáéóßïõ";
+ Text[ korean ] = "ÃÖ´ë Ʋ ³Êºñ";
+ Text[ turkish ] = "Azami çerçeve geniþliði";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_VERTADJUST
+{
+ Text = "Vertikale Textverankerung" ;
+ Text [ ENGLISH ] = "Vertical Textanchor" ;
+ Text [ portuguese ] = "Âncora de texto vertical" ;
+ Text [ english_us ] = "Vertical text anchor" ;
+ Text [ portuguese_brazilian ] = "Vertikale Textverankerung" ;
+ Text [ swedish ] = "Vertikal textförankring" ;
+ Text [ danish ] = "Lodret tekstforankring" ;
+ Text [ italian ] = "Ancoraggio verticale testo" ;
+ Text [ spanish ] = "Anclaje vertical del texto" ;
+ Text [ french ] = "Ancrage vertical du texte" ;
+ Text [ dutch ] = "Verticale tekstverankering" ;
+ Text[ chinese_simplified ] = "´¹Ö±·½ÏòÎÄ×ÖËø¶¨";
+ Text[ russian ] = "Âåðòèêàëüíàÿ ïðèâÿçêà òåêñòà";
+ Text[ polish ] = "Pionowe zakotwiczenie tekstu";
+ Text[ japanese ] = "‚’¼‚É÷½Ä‚̱ݶ°";
+ Text[ chinese_traditional ] = "««ª½¤è¦V¤å¦rÂê©w";
+ Text[ arabic ] = "ÅÑÓÇÁ ÇáäÕ ÑÃÓíÇð";
+ Text[ dutch ] = "Verticale tekstverankering";
+ Text[ chinese_simplified ] = "´¹Ö±·½ÏòÎÄ×ÖËø¶¨";
+ Text[ greek ] = "Êáôáêüñõöç áãêýñùóç êåéìÝíïõ";
+ Text[ korean ] = "¼öÁ÷À¸·Î ÅؽºÆ® À§Ä¡ °íÁ¤";
+ Text[ turkish ] = "Dikey metin sabitleme";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_HORZADJUST
+{
+ Text = "Horizontale Textverankerung" ;
+ Text [ ENGLISH ] = "Horizontal Textanchor" ;
+ Text [ portuguese ] = "Âncora de texto horizontal" ;
+ Text [ english_us ] = "Horizontal text anchor" ;
+ Text [ portuguese_brazilian ] = "Horizontale Textverankerung" ;
+ Text [ swedish ] = "Horisontell textförankring" ;
+ Text [ danish ] = "Vandret tekstforankring" ;
+ Text [ italian ] = "Ancoraggio orizzontale testo" ;
+ Text [ spanish ] = "Anclaje horizontal del texto" ;
+ Text [ french ] = "Ancrage du texte horizontal" ;
+ Text [ dutch ] = "Horizontale tekstverankering" ;
+ Text[ chinese_simplified ] = "ˮƽ·½ÏòÎÄ×ÖËø¶¨";
+ Text[ russian ] = "Ãîðèçîíòàëüíàÿ ïðèâÿçêà òåêñòà";
+ Text[ polish ] = "Poziome zakotwiczenie tekstu";
+ Text[ japanese ] = "…•½‚É÷½Ä‚̱ݶ°";
+ Text[ chinese_traditional ] = "¤ô¥­¤è¦V¤å¦rÂê©w";
+ Text[ arabic ] = "ÅÑÓÇÁ ÇáäÕ ÃÝÞíÇð";
+ Text[ dutch ] = "Horizontale tekstverankering";
+ Text[ chinese_simplified ] = "ˮƽ·½ÏòÎÄ×ÖËø¶¨";
+ Text[ greek ] = "Ïñéæüíôéá áãêýñùóç êåéìÝíïõ";
+ Text[ korean ] = "¼öÆòÀ¸·Î ÅؽºÆ® À§Ä¡ °íÁ¤";
+ Text[ turkish ] = "Yatay metin sabitleme";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_TEXT_FITTOSIZE
+{
+ Text = "Text-an-Rahmen" ;
+ Text [ ENGLISH ] = "Text fit-to-size" ;
+ Text [ portuguese ] = "Ajustar texto à moldura" ;
+ Text [ english_us ] = "Fit text to frame" ;
+ Text [ portuguese_brazilian ] = "Text-an-Rahmen" ;
+ Text [ swedish ] = "Text-till-ram" ;
+ Text [ danish ] = "Tekst til rammen" ;
+ Text [ italian ] = "Testo alla cornice" ;
+ Text [ spanish ] = "Texto en marco" ;
+ Text [ french ] = "Texte au cadre" ;
+ Text [ dutch ] = "Tekst-aan-kader" ;
+ Text[ chinese_simplified ] = "ÎÄ×ֺͿò¶ÔÆë";
+ Text[ russian ] = "Ïîäáîð òåêñòà ïîä ðàìêó";
+ Text[ polish ] = "Tekst do ramki";
+ Text[ japanese ] = "÷½Ä‚ð˜g‚ɇ‚í‚·";
+ Text[ chinese_traditional ] = "¤å¦r©M®Ø¹ï»ô";
+ Text[ arabic ] = "ãáÇÁãÉ ÇáäÕ ááÅØÇÑ";
+ Text[ dutch ] = "Tekst-aan-kader";
+ Text[ chinese_simplified ] = "ÎÄ×ֺͿò¶ÔÆë";
+ Text[ greek ] = "ÐñïóáñìïãÞ êåéìÝíïõ óå ðëáßóéï";
+ Text[ korean ] = "ÅؽºÆ®¸¦ Ʋ¿¡ ¸ÂÃã";
+ Text[ turkish ] = "Metni çerçeveye sýðdýr";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ItemNam_GRAFRED
+{
+ Text = "Rotanteil";
+ Text[ english ] = "Red portion";
+ Text[ english_us ] = "Red";
+ Text[ portuguese ] = "Proporção de vermelho";
+ Text[ greek ] = "Áíáëïãßá êüêêéíï";
+ Text[ dutch ] = "Rood";
+ Text[ french ] = "Proportion de rouge";
+ Text[ spanish ] = "Proporción de rojo";
+ Text[ swedish ] = "Andel rött";
+ Text[ russian ] = "Äîëÿ êðàñíîãî";
+ Text[ italian ] = "Percentuale di rosso";
+ Text[ danish ] = "Rød-andel";
+ Text[ polish ] = "IloϾ czerwonego w kolorze";
+ Text[ portuguese_brazilian ] = "Red portion";
+ Text[ japanese ] = "ÔF‚ÌŠ„‡";
+ Text[ korean ] = "Àû»öºñ";
+ Text[ chinese_simplified ] = "ºìÉ«±ÈÀý";
+ Text[ chinese_traditional ] = "¬õ¦â¤ñ¨Ò";
+ Text[ arabic ] = "äÓÈÉ ÇáÃÍãÑ";
+ Text[ turkish ] = "Kýrmýzý oraný";
+};
+String STR_ItemNam_GRAFGREEN
+{
+ Text = "Grünanteil";
+ Text[ english ] = "Green portion";
+ Text[ english_us ] = "Green";
+ Text[ portuguese ] = "Proporção de verde";
+ Text[ greek ] = "Áíáëïãßá ðñÜóéíï";
+ Text[ dutch ] = "Groen";
+ Text[ french ] = "Proportion de vert";
+ Text[ spanish ] = "Proporción de verde";
+ Text[ swedish ] = "Andel grönt";
+ Text[ russian ] = "Äîëÿ çåëåíîãî";
+ Text[ italian ] = "Percentuale di verde";
+ Text[ danish ] = "Grøn-andel";
+ Text[ polish ] = "IloϾ zielonego w kolorze";
+ Text[ portuguese_brazilian ] = "Green portion";
+ Text[ japanese ] = "—ÎF‚ÌŠ„‡";
+ Text[ korean ] = "³ì»öºñ";
+ Text[ chinese_simplified ] = "ÂÌÉ«±ÈÀý";
+ Text[ chinese_traditional ] = "ºñ¦â¤ñ¨Ò";
+ Text[ arabic ] = "äÓÈÉ ÇáÃÎÖÑ";
+ Text[ turkish ] = "Yeþil oraný";
+};
+String STR_ItemNam_GRAFBLUE
+{
+ Text = "Blauanteil";
+ Text[ english ] = "Blue portion";
+ Text[ english_us ] = "Blue";
+ Text[ portuguese ] = "Proporção de azul";
+ Text[ greek ] = "Áíáëïãßá ìðëå";
+ Text[ dutch ] = "Blauw";
+ Text[ french ] = "Proportion de bleu";
+ Text[ spanish ] = "Proporción de azul";
+ Text[ swedish ] = "Andel blått";
+ Text[ russian ] = "Äîëÿ ñèíåãî";
+ Text[ italian ] = "Percentuale di blu";
+ Text[ danish ] = "Blå-andel";
+ Text[ polish ] = "IloϾ niebieskiego w kolorze";
+ Text[ portuguese_brazilian ] = "Blue portion";
+ Text[ japanese ] = "ÂF‚ÌŠ„‡";
+ Text[ korean ] = "û»öºñ";
+ Text[ chinese_simplified ] = "À¶É«±ÈÀý";
+ Text[ chinese_traditional ] = "ÂŦâ¤ñ¨Ò";
+ Text[ arabic ] = "äÓÈÉ ÇáÃÒÑÞ";
+ Text[ turkish ] = "Mavi oraný";
+};
+String STR_ItemNam_GRAFLUMINANCE
+{
+ Text = "Helligkeit";
+ Text[ english ] = "Luminance";
+ Text[ english_us ] = "Brightness";
+ Text[ portuguese ] = "Brilho";
+ Text[ greek ] = "Öùôåéíüôçôá";
+ Text[ dutch ] = "Helderheid";
+ Text[ french ] = "Luminosité";
+ Text[ spanish ] = "Brillo";
+ Text[ swedish ] = "Ljusstyrka";
+ Text[ russian ] = "ßðêîñòü";
+ Text[ italian ] = "Luminosità";
+ Text[ danish ] = "Lysstyrke";
+ Text[ polish ] = "JasnoϾ";
+ Text[ portuguese_brazilian ] = "Luminance";
+ Text[ japanese ] = "–¾“x";
+ Text[ korean ] = "¸íµµ";
+ Text[ chinese_simplified ] = "ÁÁ¶È";
+ Text[ chinese_traditional ] = "«G«×";
+ Text[ arabic ] = "ÇáÅÖÇÁÉ";
+ Text[ turkish ] = "Parlaklýk";
+};
+String STR_ItemNam_GRAFCONTRAST
+{
+ Text = "Kontrast";
+ Text[ english ] = "Contrast";
+ Text[ english_us ] = "Contrast";
+ Text[ portuguese ] = "Contraste";
+ Text[ greek ] = "ÊïíôñÜóô";
+ Text[ dutch ] = "Contrast";
+ Text[ french ] = "Contraste";
+ Text[ spanish ] = "Contraste";
+ Text[ swedish ] = "Kontrast";
+ Text[ russian ] = "Êîíòðàñòíîñòü";
+ Text[ italian ] = "Contrasto";
+ Text[ danish ] = "Kontrast";
+ Text[ polish ] = "Kontrast";
+ Text[ portuguese_brazilian ] = "Contrast";
+ Text[ japanese ] = "ºÝÄ×½Ä";
+ Text[ korean ] = "´ëºñ";
+ Text[ chinese_simplified ] = "¶Ô±È¶È";
+ Text[ chinese_traditional ] = "¹ï¤ñ«×";
+ Text[ arabic ] = "ÇáÊÈÇíä";
+ Text[ turkish ] = "Kontrast";
+};
+String STR_ItemNam_GRAFGAMMA
+{
+ Text = "Gamma";
+ Text[ english ] = "Gamma";
+ Text[ english_us ] = "Gamma";
+ Text[ portuguese ] = "Gamma";
+ Text[ greek ] = "ã";
+ Text[ dutch ] = "Gamma";
+ Text[ french ] = "Gamma";
+ Text[ spanish ] = "Gamma";
+ Text[ swedish ] = "Gamma";
+ Text[ russian ] = "Ãàììà";
+ Text[ italian ] = "Gamma";
+ Text[ danish ] = "Gamma";
+ Text[ polish ] = "Gamma";
+ Text[ portuguese_brazilian ] = "Gamma";
+ Text[ japanese ] = "¶ÞÝÏ";
+ Text[ korean ] = "°¨¸¶";
+ Text[ chinese_simplified ] = "»ÒɫϵÊý";
+ Text[ chinese_traditional ] = "¦Ç¦â¨t¼Æ";
+ Text[ arabic ] = "󂋂";
+ Text[ turkish ] = "Gamma";
+};
+String STR_ItemNam_GRAFTRANSPARENCE
+{
+ Text = "Transparenz";
+ Text[ english ] = "Transparency";
+ Text[ english_us ] = "Transparency";
+ Text[ portuguese ] = "Transparência";
+ Text[ greek ] = "ÄéáöÜíåéá";
+ Text[ dutch ] = "Transparantie";
+ Text[ french ] = "Transparence";
+ Text[ spanish ] = "Transparencia";
+ Text[ swedish ] = "Transparens";
+ Text[ russian ] = "Ïðîçðà÷íûé";
+ Text[ italian ] = "Trasparenza";
+ Text[ danish ] = "Transparens";
+ Text[ polish ] = "PrzezroczystoϾ";
+ Text[ portuguese_brazilian ] = "Transparency";
+ Text[ japanese ] = "“§‰ß«";
+ Text[ korean ] = "Åõ¸íµµ";
+ Text[ chinese_simplified ] = "͸Ã÷";
+ Text[ chinese_traditional ] = "³z©ú";
+ Text[ arabic ] = "ÔÝÇÝíÉ";
+ Text[ turkish ] = "Saydamlýk";
+};
+String STR_ItemNam_GRAFINVERT
+{
+ Text = "Invertieren";
+ Text[ english ] = "Invert";
+ Text[ english_us ] = "Invert";
+ Text[ portuguese ] = "Inverter";
+ Text[ greek ] = "ÁíôéóôñïöÞ";
+ Text[ dutch ] = "Invers";
+ Text[ french ] = "Invertir";
+ Text[ spanish ] = "Invertir";
+ Text[ swedish ] = "Invertera";
+ Text[ russian ] = "Èíâåðòèðîâàòü";
+ Text[ italian ] = "Inverti";
+ Text[ danish ] = "Inverter";
+ Text[ polish ] = "Odwróæ";
+ Text[ portuguese_brazilian ] = "Invert";
+ Text[ japanese ] = "‹t“]";
+ Text[ korean ] = "¹ÝÀü";
+ Text[ chinese_simplified ] = "»¥²¹É«×ª»»";
+ Text[ chinese_traditional ] = "¤¬¸É¦âÂà´«";
+ Text[ arabic ] = "ÚßÓ";
+ Text[ turkish ] = "Tersine çevir";
+};
+String STR_ItemNam_GRAFMODE
+{
+ Text = "Grafikmodus";
+ Text[ english ] = "Graphics mode";
+ Text[ english_us ] = "Graphics mode";
+ Text[ portuguese ] = "Modo gráfico";
+ Text[ greek ] = "ÊáôÜóôáóç ãñáöéêþí";
+ Text[ dutch ] = "Afbeeldingenmodus";
+ Text[ french ] = "Mode Graphique";
+ Text[ spanish ] = "Modo gráfico";
+ Text[ swedish ] = "Grafikläge";
+ Text[ russian ] = "Ãðàôè÷åñêèé ðåæèì";
+ Text[ italian ] = "Modo grafico";
+ Text[ danish ] = "Billedmodus";
+ Text[ polish ] = "Tryb grafiki";
+ Text[ portuguese_brazilian ] = "Graphics mode";
+ Text[ japanese ] = "¸Þ×̨¯¸Ó°ÄÞ";
+ Text[ korean ] = "±×·¡ÇÈ ¸ðµå";
+ Text[ chinese_simplified ] = "ͼÐη½Ê½";
+ Text[ chinese_traditional ] = "¹Ï§Î¼Ò¦¡";
+ Text[ arabic ] = "æÖÚ ÇáÕæÑ";
+ Text[ turkish ] = "Grafik kipi";
+};
+String STR_ItemNam_GRAFRESERVE2 { Text = "" ; };
+String STR_ItemNam_GRAFRESERVE3 { Text = "" ; };
+String STR_ItemNam_GRAFRESERVE4 { Text = "" ; };
+String STR_ItemNam_GRAFRESERVE5 { Text = "" ; };
+String STR_ItemNam_GRAFRESERVE6 { Text = "" ; };
+
+String STR_ItemNam_RESERVE19 { Text = "" ; };
+String STR_ItemNamSET_MISC
+{
+ Text = "Diverse Attribute" ;
+ Text [ ENGLISH ] = "Miscellaneous attributes" ;
+ Text [ english_us ] = "Various attributes" ;
+ Text [ portuguese_brazilian ] = "Diverse Attribute" ;
+ Text [ swedish ] = "Diverse attribut" ;
+ Text [ danish ] = "Diverse attributter" ;
+ Text [ italian ] = "Diversi attributi" ;
+ Text [ spanish ] = "Atributos diversos" ;
+ Text [ french ] = "Attributs divers" ;
+ Text [ dutch ] = "Diverse attributen" ;
+ Text [ portuguese ] = "Atributos diversos" ;
+ Text[ chinese_simplified ] = "¸÷ÖÖÊôÐÔ";
+ Text[ russian ] = "Ðàçëè÷íûå àòðèáóòû";
+ Text[ polish ] = "Ró¿ne atrybuty";
+ Text[ japanese ] = "‚¢‚ë‚¢‚ë‚È‘®«";
+ Text[ chinese_traditional ] = "¦UºØÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ãÎÊáÝÉ";
+ Text[ dutch ] = "Diverse attributen";
+ Text[ chinese_simplified ] = "¸÷ÖÖÊôÐÔ";
+ Text[ greek ] = "ÄéÜöïñåò éäéüôçôåò";
+ Text[ korean ] = "´Ù¾çÇÑ ¼Ó¼º";
+ Text[ turkish ] = "Çeþitli öznitelikler";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_OBJMOVEPROTECT
+{
+ Text = "Positionsschutz" ;
+ Text [ ENGLISH ] = "Position-protected" ;
+ Text [ portuguese ] = "Protecção de posição" ;
+ Text [ english_us ] = "Position protected" ;
+ Text [ portuguese_brazilian ] = "Positionsschutz" ;
+ Text [ swedish ] = "Positionsskydd" ;
+ Text [ danish ] = "Placeringsbeskyttelse" ;
+ Text [ italian ] = "Protezione posizione" ;
+ Text [ spanish ] = "Protección de posición" ;
+ Text [ french ] = "Protection de position" ;
+ Text [ dutch ] = "Positiebeveiliging" ;
+ Text[ chinese_simplified ] = "±£»¤Î»ÖÃ";
+ Text[ russian ] = "Çàùèòà ïîçèöèè";
+ Text[ polish ] = "Ochrona pozycji";
+ Text[ japanese ] = "ˆÊ’u‚Ì•ÛŒì";
+ Text[ chinese_traditional ] = "«OÅ@¦ì¸m";
+ Text[ arabic ] = "ÍãÇíÉ ÇáãæÖÚ";
+ Text[ dutch ] = "Positiebeveiliging";
+ Text[ chinese_simplified ] = "±£»¤Î»ÖÃ";
+ Text[ greek ] = "Ðñïóôáóßá èÝóçò";
+ Text[ korean ] = "À§Ä¡ º¸È£";
+ Text[ turkish ] = "Konum korumasý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_OBJSIZEPROTECT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Größenschutz : Gr÷˜enschutz */
+ /* ### ACHTUNG: Neuer Text in Resource? Größenschutz : Gr÷˜enschutz */
+ Text = "Größenschutz" ;
+ Text [ ENGLISH ] = "Size-protected" ;
+ Text [ portuguese ] = "Protecção de tamanho" ;
+ Text [ english_us ] = "Size Protection" ;
+ Text [ portuguese_brazilian ] = "Größenschutz" ;
+ Text [ swedish ] = "Storleksskydd" ;
+ Text [ danish ] = "Størrelsesbeskyttelse" ;
+ Text [ italian ] = "Protezione dimensione" ;
+ Text [ spanish ] = "Protección de tamaño" ;
+ Text [ french ] = "Protection de taille" ;
+ Text [ dutch ] = "Formaatbeveiliging" ;
+ Text[ chinese_simplified ] = "±£»¤´óС";
+ Text[ russian ] = "Çàùèòà ðàçìåðà";
+ Text[ polish ] = "Ochrona rozmiaru";
+ Text[ japanese ] = "»²½Þ‚Ì•ÛŒì";
+ Text[ chinese_traditional ] = "«OÅ@¤j¤p";
+ Text[ arabic ] = "ÍãÇíÉ ÇáÍÌã";
+ Text[ dutch ] = "Formaatbeveiliging";
+ Text[ chinese_simplified ] = "±£»¤´óС";
+ Text[ greek ] = "Ðñïóôáóßá ìåãÝèïõò";
+ Text[ korean ] = "Å©±â º¸È£";
+ Text[ turkish ] = "Boyut korumasý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_OBJPRINTABLE
+{
+ Text = "Nicht drucken" ;
+ Text [ ENGLISH ] = "Not print" ;
+ Text [ portuguese ] = "Não imprimir" ;
+ Text [ english_us ] = "Don't print" ;
+ Text [ portuguese_brazilian ] = "Nicht drucken" ;
+ Text [ swedish ] = "Inte skriva ut" ;
+ Text [ danish ] = "Udskriv ikke" ;
+ Text [ italian ] = "Non stampare" ;
+ Text [ spanish ] = "No imprimir" ;
+ Text [ french ] = "Ne pas imprimer" ;
+ Text [ dutch ] = "Niet afdrukken" ;
+ Text[ chinese_simplified ] = "²»Òª´òÓ¡";
+ Text[ russian ] = "Áåç ïå÷àòè";
+ Text[ polish ] = "Nie drukuj";
+ Text[ japanese ] = "ˆóü‚µ‚È‚¢";
+ Text[ chinese_traditional ] = "¤£­n¦C¦L";
+ Text[ arabic ] = "ÚÏã ÇáØÈÇÚÉ";
+ Text[ dutch ] = "Niet afdrukken";
+ Text[ chinese_simplified ] = "²»Òª´òÓ¡";
+ Text[ greek ] = "Íá ìçí åêôõðùèåß";
+ Text[ korean ] = "ÀμâÇÏÁö ¾ÊÀ½";
+ Text[ turkish ] = "Yazdýrma";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_LAYERID
+{
+ Text = "Ebenenkennung" ;
+ Text [ ENGLISH ] = "Layer-Id" ;
+ Text [ portuguese ] = "Indicador de níveis" ;
+ Text [ english_us ] = "Layer Indicator" ;
+ Text [ portuguese_brazilian ] = "Ebenenkennung" ;
+ Text [ swedish ] = "Nivåidentifikation" ;
+ Text [ danish ] = "Niveau-identifikation" ;
+ Text [ italian ] = "Contrassegno livello" ;
+ Text [ spanish ] = "Identificación de niveles" ;
+ Text [ french ] = "Indicateur de niveaux" ;
+ Text [ dutch ] = "Niveau-indicator" ;
+ Text[ chinese_simplified ] = "¼¶±êʶ";
+ Text[ russian ] = "Óêàçàòåëü ñëîÿ";
+ Text[ polish ] = "WskaŸnik warstw";
+ Text[ japanese ] = "‘w‚ÌŽ¯•Ê";
+ Text[ chinese_traditional ] = "¯Å¼ÐÃÑ";
+ Text[ arabic ] = "ÊÚÑíÝ ÇáãÓÊæíÇÊ";
+ Text[ dutch ] = "Niveau-indicator";
+ Text[ chinese_simplified ] = "¼¶±êʶ";
+ Text[ greek ] = "Äåßêôçò åðéðÝäïõ";
+ Text[ korean ] = "°èÃþ Ç¥Áö";
+ Text[ turkish ] = "Düzey tanýtýcýsý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_LAYERNAME
+{
+ Text = "Ebene" ;
+ Text [ ENGLISH ] = "Layer" ;
+ Text [ portuguese ] = "Nível" ;
+ Text [ english_us ] = "Le~vel" ;
+ Text [ portuguese_brazilian ] = "Ebene" ;
+ Text [ swedish ] = "Nivå" ;
+ Text [ danish ] = "Niveau" ;
+ Text [ italian ] = "Livello" ;
+ Text [ spanish ] = "Nivel" ;
+ Text [ french ] = "Niveau" ;
+ Text [ dutch ] = "Niveau" ;
+ Text[ chinese_simplified ] = "¼¶(~V)";
+ Text[ russian ] = "Óðîâåíü";
+ Text[ polish ] = "Poziom";
+ Text[ japanese ] = "‘w(~V)";
+ Text[ chinese_traditional ] = "¯Å(~V)";
+ Text[ arabic ] = "ÇáØÈÞÉ";
+ Text[ dutch ] = "Niveau";
+ Text[ chinese_simplified ] = "¼¶(~V)";
+ Text[ greek ] = "Åðßðåäï";
+ Text[ korean ] = "·¹º§(~V)";
+ Text[ turkish ] = "Düzey";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_OBJECTNAME
+{
+ Text = "Objektname" ;
+ Text [ ENGLISH ] = "Object-name" ;
+ Text [ portuguese ] = "Nome do objecto" ;
+ Text [ english_us ] = "Object name" ;
+ Text [ portuguese_brazilian ] = "Objektname" ;
+ Text [ swedish ] = "Objektnamn" ;
+ Text [ danish ] = "Objektnavn" ;
+ Text [ italian ] = "Nome oggetto" ;
+ Text [ spanish ] = "Nombre del objeto" ;
+ Text [ french ] = "Nom de l'objet" ;
+ Text [ dutch ] = "Objectnaam" ;
+ Text[ chinese_simplified ] = "¶ÔÏóÃû³Æ";
+ Text[ russian ] = "Èìÿ îáúåêòà";
+ Text[ polish ] = "Nazwa obiektu";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä–¼";
+ Text[ chinese_traditional ] = "ª«¥ó¦WºÙ";
+ Text[ arabic ] = "ÇÓã ÇáßÇÆä";
+ Text[ dutch ] = "Objectnaam";
+ Text[ chinese_simplified ] = "¶ÔÏóÃû³Æ";
+ Text[ greek ] = "¼íïìá áíôéêåéìÝíïõ";
+ Text[ korean ] = "°³Ã¼ À̸§";
+ Text[ turkish ] = "Nesne adý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_STARTANGLE
+{
+ Text = "Startwinkel" ;
+ Text [ ENGLISH ] = "Start-angle" ;
+ Text [ portuguese ] = "Ângulo de partida" ;
+ Text [ english_us ] = "Start angle" ;
+ Text [ portuguese_brazilian ] = "Startwinkel" ;
+ Text [ swedish ] = "Startvinkel" ;
+ Text [ danish ] = "Startvinkel" ;
+ Text [ italian ] = "Angolo di inizio" ;
+ Text [ spanish ] = "Ángulo inicial" ;
+ Text [ french ] = "Angle de départ" ;
+ Text [ dutch ] = "Starthoek" ;
+ Text[ chinese_simplified ] = "Æðʼ½Ç¶È";
+ Text[ russian ] = "Èçíà÷àëüíûé óãîë";
+ Text[ polish ] = "K¹t pocz¹tkowy";
+ Text[ japanese ] = "Žn‚ß‚éŠp“x";
+ Text[ chinese_traditional ] = "°_©l¨¤«×";
+ Text[ arabic ] = "ÒÇæíÉ ÇáÈÏÁ";
+ Text[ dutch ] = "Starthoek";
+ Text[ chinese_simplified ] = "Æðʼ½Ç¶È";
+ Text[ greek ] = "Áñ÷éêÞ ãùíßá";
+ Text[ korean ] = "½ÃÀÛ °¢µµ";
+ Text[ turkish ] = "Baþlangýç açýsý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_ENDANGLE
+{
+ Text = "Endwinkel" ;
+ Text [ ENGLISH ] = "End-angle" ;
+ Text [ portuguese ] = "Ângulo final" ;
+ Text [ english_us ] = "Final angle" ;
+ Text [ portuguese_brazilian ] = "Endwinkel" ;
+ Text [ swedish ] = "Slutvinkel" ;
+ Text [ danish ] = "Slutvinkel" ;
+ Text [ italian ] = "Angolo finale" ;
+ Text [ spanish ] = "Ángulo final" ;
+ Text [ french ] = "Angle final" ;
+ Text [ dutch ] = "Eindhoek" ;
+ Text[ chinese_simplified ] = "×îÖսǶÈ";
+ Text[ russian ] = "Êîíå÷íûé óãîë";
+ Text[ polish ] = "K¹t koñcowy";
+ Text[ japanese ] = "I‚¦‚éŠp“x";
+ Text[ chinese_traditional ] = "³Ì²×¨¤«×";
+ Text[ arabic ] = "ÒÇæíÉ ÇáäåÇíÉ";
+ Text[ dutch ] = "Eindhoek";
+ Text[ chinese_simplified ] = "×îÖսǶÈ";
+ Text[ greek ] = "ÔåëéêÞ ãùíßá";
+ Text[ korean ] = "³¡ °¢µµ";
+ Text[ turkish ] = "Son açý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_POSITIONX
+{
+ Text = "X-Position" ;
+ Text [ ENGLISH ] = "x-position" ;
+ Text [ portuguese ] = "Posição X" ;
+ Text [ english_us ] = "X Position" ;
+ Text [ portuguese_brazilian ] = "X-Position" ;
+ Text [ swedish ] = "X-position" ;
+ Text [ danish ] = "X-position" ;
+ Text [ italian ] = "Posizione X" ;
+ Text [ spanish ] = "Posición X" ;
+ Text [ french ] = "Position X" ;
+ Text [ dutch ] = "X-positie" ;
+ Text[ chinese_simplified ] = "X λÖÃ";
+ Text[ russian ] = "Ïîçèöèÿ X";
+ Text[ polish ] = "Pozycja X";
+ Text[ japanese ] = "XˆÊ’u";
+ Text[ chinese_traditional ] = "X ¦ì¸m";
+ Text[ arabic ] = "ÇáãæÖÚ Ó";
+ Text[ dutch ] = "X-positie";
+ Text[ chinese_simplified ] = "X λÖÃ";
+ Text[ greek ] = "ÈÝóç-X";
+ Text[ korean ] = "X À§Ä¡";
+ Text[ turkish ] = "X konumu";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_POSITIONY
+{
+ Text = "Y-Position" ;
+ Text [ ENGLISH ] = "y-position" ;
+ Text [ portuguese ] = "Posição Y" ;
+ Text [ english_us ] = "Y Position" ;
+ Text [ portuguese_brazilian ] = "Y-Position" ;
+ Text [ swedish ] = "Y-position" ;
+ Text [ danish ] = "Y-position" ;
+ Text [ italian ] = "Posizione Y" ;
+ Text [ spanish ] = "Posición Y" ;
+ Text [ french ] = "Position Y" ;
+ Text [ dutch ] = "Y-positie" ;
+ Text[ chinese_simplified ] = "Y λÖÃ";
+ Text[ russian ] = "Ïîçèöèÿ Y";
+ Text[ polish ] = "Pozycja Y";
+ Text[ japanese ] = "YˆÊ’u";
+ Text[ chinese_traditional ] = "Y ¦ì¸m";
+ Text[ arabic ] = "ÇáãæÖÚ Õ";
+ Text[ dutch ] = "Y-positie";
+ Text[ chinese_simplified ] = "Y λÖÃ";
+ Text[ greek ] = "ÈÝóç-Y";
+ Text[ korean ] = "Y À§Ä¡";
+ Text[ turkish ] = "Y konumu";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_SIZEWIDTH
+{
+ Text = "Breite" ;
+ Text [ ENGLISH ] = "Width" ;
+ Text [ portuguese ] = "Largura" ;
+ Text [ english_us ] = "Width" ;
+ Text [ portuguese_brazilian ] = "Breite" ;
+ Text [ swedish ] = "Bredd" ;
+ Text [ danish ] = "Bredde" ;
+ Text [ italian ] = "Larghezza" ;
+ Text [ spanish ] = "Ancho" ;
+ Text [ french ] = "Largeur" ;
+ Text [ dutch ] = "Breedte" ;
+ Text[ chinese_simplified ] = "¿í¶È";
+ Text[ russian ] = "Øèðèíà";
+ Text[ polish ] = "SzerokoϾ";
+ Text[ japanese ] = "•";
+ Text[ chinese_traditional ] = "¼e«×";
+ Text[ arabic ] = "ÇáÚÑÖ";
+ Text[ dutch ] = "Breedte";
+ Text[ chinese_simplified ] = "¿í¶È";
+ Text[ greek ] = "ÐëÜôïò";
+ Text[ korean ] = "³Êºñ";
+ Text[ turkish ] = "Geniþlik";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_SIZEHEIGHT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Höhe : H÷he */
+ /* ### ACHTUNG: Neuer Text in Resource? Höhe : H÷he */
+ Text = "Höhe" ;
+ Text [ ENGLISH ] = "Height" ;
+ Text [ portuguese ] = "Altura" ;
+ Text [ english_us ] = "Height" ;
+ Text [ portuguese_brazilian ] = "Höhe" ;
+ Text [ swedish ] = "Höjd" ;
+ Text [ danish ] = "Højde" ;
+ Text [ italian ] = "Altezza" ;
+ Text [ spanish ] = "Altura" ;
+ Text [ french ] = "Hauteur" ;
+ Text [ dutch ] = "Hoogte" ;
+ Text[ chinese_simplified ] = "¸ß¶È";
+ Text[ russian ] = "Âûñîòà";
+ Text[ polish ] = "WysokoϾ";
+ Text[ japanese ] = "‚‚³";
+ Text[ chinese_traditional ] = "°ª«×";
+ Text[ arabic ] = "ÇáÇÑÊÝÇÚ";
+ Text[ dutch ] = "Hoogte";
+ Text[ chinese_simplified ] = "¸ß¶È";
+ Text[ greek ] = "¾øïò";
+ Text[ korean ] = "³ôÀÌ";
+ Text[ turkish ] = "Yükseklik";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_ROTATEANGLE
+{
+ Text = "Drehwinkel" ;
+ Text [ ENGLISH ] = "Rotate-angle" ;
+ Text [ portuguese ] = "Ângulo de rotação" ;
+ Text [ english_us ] = "Rotation angle" ;
+ Text [ portuguese_brazilian ] = "Drehwinkel" ;
+ Text [ swedish ] = "Rotationsvinkel" ;
+ Text [ danish ] = "Rotationsvinkel" ;
+ Text [ italian ] = "Angolo di rotazione" ;
+ Text [ spanish ] = "Ángulo de rotación" ;
+ Text [ french ] = "Angle de rotation" ;
+ Text [ dutch ] = "Draaihoek" ;
+ Text[ chinese_simplified ] = "Ðýת½Ç¶È";
+ Text[ russian ] = "Óãîë ïîâîðîòà";
+ Text[ polish ] = "K¹t obrotowy";
+ Text[ japanese ] = "‰ñ“]Šp“x";
+ Text[ chinese_traditional ] = "±ÛÂਤ«×";
+ Text[ arabic ] = "ÒÇæíÉ ÇáÇÓÊÏÇÑÉ";
+ Text[ dutch ] = "Draaihoek";
+ Text[ chinese_simplified ] = "Ðýת½Ç¶È";
+ Text[ greek ] = "Ãùíßá ðåñéóôñïöÞò";
+ Text[ korean ] = "ȸÀü °¢µµ";
+ Text[ turkish ] = "Dönüþ açýsý";
+ Text[ language_user1 ] = " ";
+};
+String STR_ItemNam_SHEARANGLE
+{
+ Text = "Scherwinkel" ;
+ Text [ ENGLISH ] = "Shear-angle" ;
+ Text [ portuguese ] = "Ângulo de tesoura" ;
+ Text [ english_us ] = "Shear angle" ;
+ Text [ portuguese_brazilian ] = "Scherwinkel" ;
+ Text [ swedish ] = "Förskjutningsvinkel" ;
+ Text [ danish ] = "Forskydningsvinkel" ;
+ Text [ italian ] = "Angolo di apertura" ;
+ Text [ spanish ] = "Ángulo de desviación" ;
+ Text [ french ] = "Angle de cisaillement" ;
+ Text [ dutch ] = "Scheerhoek" ;
+ Text[ chinese_simplified ] = "Èñ½Ç½Ç¶È";
+ Text[ russian ] = "Óãîë ñðåçà";
+ Text[ polish ] = "K¹t œcinania";
+ Text[ japanese ] = "Ø‚èŽæ‚éŠp“x";
+ Text[ chinese_traditional ] = "¾U¨¤¨¤«×";
+ Text[ arabic ] = "ÒÇæíÉ ÇáÞÕ";
+ Text[ dutch ] = "Scheerhoek";
+ Text[ chinese_simplified ] = "Èñ½Ç½Ç¶È";
+ Text[ greek ] = "Ãùíßá äéÜôìçóçò";
+ Text[ korean ] = "±³Â÷°¢";
+ Text[ turkish ] = "Kesiþme açýsý";
+ Text[ language_user1 ] = " ";
+};
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Ende der gecachten Strings
+
+ // und hier noch Bitmaps
+Bitmap BMAP_GrafikEi { File = "grafikei.bmp" ; };
+Bitmap BMAP_GrafikDe { File = "grafikde.bmp" ; };
+
+// Strings fuer den Vorlagen-Dialog
+String SIP_UNKNOWN_ATTR
+{
+ Text = "Unbekanntes Attribut";
+ Text [ ENGLISH ] = "Unknown Attribute" ;
+ Text[ english_us ] = "Unknown attribute";
+ Text[ portuguese ] = "Atributo desconhecido";
+ Text[ russian ] = "Íåèçâåñòíûé àòðèáóò";
+ Text[ dutch ] = "Onbekend attribuut";
+ Text[ french ] = "Attribut inconnu";
+ Text[ spanish ] = "Atributo desconocido";
+ Text[ italian ] = "Attributo sconosciuto";
+ Text[ danish ] = "Ukendt attribut";
+ Text[ swedish ] = "Obekant attribut";
+ Text[ polish ] = "Nieznany atrybut";
+ Text[ portuguese_brazilian ] = "Unknown Attribute";
+ Text[ japanese ] = "•s–¾‚È‘®«";
+ Text[ chinese_simplified ] = "ÊôÐÔ²»Ã÷";
+ Text[ chinese_traditional ] = "Äݩʤ£©ú";
+ Text[ arabic ] = "ÓãÉ ÛíÑ ãÚÑæÝÉ";
+ Text[ dutch ] = "Onbekend attribuut";
+ Text[ chinese_simplified ] = "ÊôÐÔ²»Ã÷";
+ Text[ greek ] = "¢ãíùóôç éäéüôçôá";
+ Text[ korean ] = "¾Ë·ÁÁöÁö ¾ÊÀº ¼Ó¼º";
+ Text[ turkish ] = "Bilinmeyen öznitelik";
+};
+
+// Strings fuer den Vorlagen-Dialog
+String SIP_XA_LINESTYLE
+{
+ Text = "Linienstil";
+ Text [ ENGLISH ] = "Linestyle" ;
+ Text[ english_us ] = "Line style";
+ Text[ portuguese ] = "Estilo de linha";
+ Text[ russian ] = "Ñòèëü ëèíèè";
+ Text[ dutch ] = "Lijntype";
+ Text[ french ] = "Style de ligne";
+ Text[ spanish ] = "Estilo de línea";
+ Text[ italian ] = "Stile linea";
+ Text[ danish ] = "Stregtype";
+ Text[ swedish ] = "Linjestil";
+ Text[ polish ] = "Styl linii";
+ Text[ portuguese_brazilian ] = "Linestyle";
+ Text[ japanese ] = "ü½À²Ù";
+ Text[ chinese_simplified ] = "ÏßÌõʽÑù";
+ Text[ chinese_traditional ] = "½u±ø¼Ë¦¡";
+ Text[ arabic ] = "äãØ ÇáÎØ";
+ Text[ dutch ] = "Lijntype";
+ Text[ chinese_simplified ] = "ÏßÌõʽÑù";
+ Text[ greek ] = "Óôõë ãñáììÞò";
+ Text[ korean ] = "¼± À¯Çü";
+ Text[ turkish ] = "Çizgi biçimi";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_LINEDASH
+{
+ Text = "Linienmuster";
+ Text [ ENGLISH ] = "Linepattern" ;
+ Text[ english_us ] = "Line pattern";
+ Text[ portuguese ] = "Linha padrão";
+ Text[ russian ] = "Îáðàçöû ëèíèè";
+ Text[ dutch ] = "Lijnpatroon";
+ Text[ french ] = "Style de ligne";
+ Text[ spanish ] = "Diseño de línea";
+ Text[ italian ] = "Modello linea";
+ Text[ danish ] = "Stregmønstre";
+ Text[ swedish ] = "Linjemönster";
+ Text[ polish ] = "Deseñ linii";
+ Text[ portuguese_brazilian ] = "Linepattern";
+ Text[ japanese ] = "ü‚ÌÊßÀ°Ý";
+ Text[ chinese_simplified ] = "ÏßÌõģʽ";
+ Text[ chinese_traditional ] = "½u±ø¼Ë¦¡";
+ Text[ arabic ] = "ãËÇá ááÎØ";
+ Text[ dutch ] = "Lijnpatroon";
+ Text[ chinese_simplified ] = "ÏßÌõģʽ";
+ Text[ greek ] = "Ó÷Ýäéï ãñáììþí";
+ Text[ korean ] = "¼± ÆÐÅÏ";
+ Text[ turkish ] = "Çizgi deseni";
+};
+
+String SIP_XA_LINEWIDTH
+{
+ Text = "Strichstärke";
+ Text [ ENGLISH ] = "Linewidth" ;
+ Text[ english_us ] = "Line width";
+ Text[ portuguese ] = "Espessura";
+ Text[ russian ] = "Øèðèíà ëèíèè";
+ Text[ dutch ] = "Lijndikte";
+ Text[ french ] = "Épaisseur de trait";
+ Text[ spanish ] = "Espesor del trazo";
+ Text[ italian ] = "Spessore del tratto";
+ Text[ danish ] = "Stregstyrke";
+ Text[ swedish ] = "Linjestyrka";
+ Text[ polish ] = "GruboϾ linii";
+ Text[ portuguese_brazilian ] = "Linewidth";
+ Text[ japanese ] = "ü‚Ì‘¾‚³";
+ Text[ chinese_simplified ] = "Ïß´Ö";
+ Text[ chinese_traditional ] = "½u±ø¼e«×";
+ Text[ arabic ] = "Óõãß ÇáÎØ";
+ Text[ dutch ] = "Lijndikte";
+ Text[ chinese_simplified ] = "Ïß´Ö";
+ Text[ greek ] = "ÐÜ÷ïò ãñáììÞò";
+ Text[ korean ] = "¼± ³Êºñ";
+ Text[ turkish ] = "Çizgi kalýnlýðý";
+};
+
+String SIP_XA_LINECOLOR
+{
+ Text = "Linienfarbe";
+ Text [ ENGLISH ] = "Linecolor" ;
+ Text[ english_us ] = "Line color";
+ Text[ portuguese ] = "Cor";
+ Text[ russian ] = "Öâåò ëèíèè";
+ Text[ dutch ] = "Lijnkleur";
+ Text[ french ] = "Couleur de ligne";
+ Text[ spanish ] = "Color de línea";
+ Text[ italian ] = "Colore linea";
+ Text[ danish ] = "Stregfarve";
+ Text[ swedish ] = "Linjefärg";
+ Text[ polish ] = "Kolor linii";
+ Text[ portuguese_brazilian ] = "Linecolor";
+ Text[ japanese ] = "ü‚ÌF";
+ Text[ chinese_simplified ] = "ÏßÌõÑÕÉ«";
+ Text[ chinese_traditional ] = "½u±øÃC¦â";
+ Text[ arabic ] = "áæä ÇáÎØ";
+ Text[ dutch ] = "Lijnkleur";
+ Text[ chinese_simplified ] = "ÏßÌõÑÕÉ«";
+ Text[ greek ] = "×ñþìá ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ »ö";
+ Text[ turkish ] = "Çizgi rengi";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_LINESTART
+{
+ Text = "Linienanfang";
+ Text [ ENGLISH ] = "Linestart" ;
+ Text[ english_us ] = "Line head";
+ Text[ portuguese ] = "Início";
+ Text[ russian ] = "Íà÷àëî ëèíèè";
+ Text[ dutch ] = "Lijnbegin";
+ Text[ french ] = "Début de ligne";
+ Text[ spanish ] = "Comienzo de línea";
+ Text[ italian ] = "Inizio linea";
+ Text[ danish ] = "Stregstart";
+ Text[ swedish ] = "Linjebörjan";
+ Text[ polish ] = "Pocz¹tek linii";
+ Text[ portuguese_brazilian ] = "Linestart";
+ Text[ japanese ] = "ü‚ÌŽn“_";
+ Text[ chinese_simplified ] = "ÏßÌõ¿ª¶Ë";
+ Text[ chinese_traditional ] = "½u±ø¶}ºÝ";
+ Text[ arabic ] = "ÈÏÇíÉ ÇáÎØ";
+ Text[ dutch ] = "Lijnbegin";
+ Text[ chinese_simplified ] = "ÏßÌõ¿ª¶Ë";
+ Text[ greek ] = "Áñ÷Þ ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ½ÃÀÛ";
+ Text[ turkish ] = "Çizgi baþý";
+};
+
+String SIP_XA_LINEEND
+{
+ Text = "Linienende";
+ Text [ ENGLISH ] = "Lineend" ;
+ Text[ english_us ] = "Line end";
+ Text[ portuguese ] = "Fim";
+ Text[ russian ] = "Êîíåö ëèíèè";
+ Text[ dutch ] = "Lijnuiteinde";
+ Text[ french ] = "Extrémité de ligne";
+ Text[ spanish ] = "Fin de línea";
+ Text[ italian ] = "Fine linea";
+ Text[ danish ] = "Stregslut";
+ Text[ swedish ] = "Linjeslut";
+ Text[ polish ] = "Koniec linii";
+ Text[ portuguese_brazilian ] = "Lineend";
+ Text[ japanese ] = "ü‚ÌI“_";
+ Text[ chinese_simplified ] = "ÏßÌõβ¶Ë";
+ Text[ chinese_traditional ] = "½u±ø§ÀºÝ";
+ Text[ arabic ] = "äåÇíÉ ÇáÎØ";
+ Text[ dutch ] = "Lijnuiteinde";
+ Text[ chinese_simplified ] = "ÏßÌõβ¶Ë";
+ Text[ greek ] = "ÔÝëïò ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ³¡";
+ Text[ turkish ] = "Çizgi sonu";
+};
+
+String SIP_XA_LINESTARTWIDTH
+{
+ Text = "Linienanfangsbreite";
+ Text [ ENGLISH ] = "Width of linestart" ;
+ Text[ english_us ] = "Line head width";
+ Text[ portuguese ] = "Espessura início de linha";
+ Text[ russian ] = "Øèðèíà íà÷àëà ëèíèè";
+ Text[ dutch ] = "Dikte lijnbegin";
+ Text[ french ] = "Largeur du début de ligne";
+ Text[ spanish ] = "Ancho de comienzo de línea";
+ Text[ italian ] = "Spessore inizio linea";
+ Text[ danish ] = "Stregstartbredde";
+ Text[ swedish ] = "Bredd på linjens början";
+ Text[ polish ] = "Szerokoœæ pocz¹tku linii";
+ Text[ portuguese_brazilian ] = "Width of linestart";
+ Text[ japanese ] = "ü‚ÌŽn“_‚Ì‘¾‚³";
+ Text[ chinese_simplified ] = "ÏßÌõ¿ª¶Ë¿í¶È";
+ Text[ chinese_traditional ] = "½u±ø¶}ºÝ¼e«×";
+ Text[ arabic ] = "ÚÑÖ ÈÏÇíÉ ÇáÎØ";
+ Text[ dutch ] = "Dikte lijnbegin";
+ Text[ chinese_simplified ] = "ÏßÌõ¿ª¶Ë¿í¶È";
+ Text[ greek ] = "ÐëÜôïò áñ÷Þò ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ½ÃÀÛ ³Êºñ";
+ Text[ turkish ] = "Çizgi baþý geniþliði";
+};
+
+String SIP_XA_LINEENDWIDTH
+{
+ Text = "Linienendebreite";
+ Text [ ENGLISH ] = "Width of lineend" ;
+ Text[ english_us ] = "Line end width";
+ Text[ portuguese ] = "Espessura fim de linha";
+ Text[ russian ] = "Øèðèíà êîíöà ëèíèè";
+ Text[ dutch ] = "Dikte lijnuiteinde";
+ Text[ french ] = "Largeur de l'extrémité de ligne";
+ Text[ spanish ] = "Ancho de fin de línea";
+ Text[ italian ] = "Spessore fine linea";
+ Text[ danish ] = "Stregslutbredde";
+ Text[ swedish ] = "Bredd på linjeslut";
+ Text[ polish ] = "Szerokoœæ koñca linii";
+ Text[ portuguese_brazilian ] = "Width of lineend";
+ Text[ japanese ] = "ü‚ÌI“_‚Ì‘¾‚³";
+ Text[ chinese_simplified ] = "ÏßÌõβ¶Ë¿í¶È";
+ Text[ chinese_traditional ] = "½u±ø§ÀºÝ¼e«×";
+ Text[ arabic ] = "ÚÑÖ äåÇíÉ ÇáÎØ";
+ Text[ dutch ] = "Dikte lijnuiteinde";
+ Text[ chinese_simplified ] = "ÏßÌõβ¶Ë¿í¶È";
+ Text[ greek ] = "ÐëÜôïò ôÝëïõò ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ³¡ ³Êºñ";
+ Text[ turkish ] = "Çizgi sonu geniþliði";
+};
+
+String SIP_XA_LINESTARTCENTER
+{
+ Text = "Linienanfang zentriert";
+ Text [ ENGLISH ] = "Center linestart" ;
+ Text[ english_us ] = "Center arrowhead";
+ Text[ portuguese ] = "Início centrado";
+ Text[ russian ] = "Âûðàâíèâàíèå íà÷àëà ëèíèè ïî öåíòðó";
+ Text[ dutch ] = "Lijnbegin gecentreerd";
+ Text[ french ] = "Début de ligne centré";
+ Text[ spanish ] = "Comienzo de línea, centrado";
+ Text[ italian ] = "Centra inizio linea";
+ Text[ danish ] = "Centrer stregstart";
+ Text[ swedish ] = "Linjebörjan centrerat";
+ Text[ polish ] = "Wyœrodkuj pocz¹tek linii";
+ Text[ portuguese_brazilian ] = "Center linestart";
+ Text[ japanese ] = "ü‚ÌŽn“_‚𒆉›‘µ‚¦";
+ Text[ chinese_simplified ] = "ÏßÌõ¿ª¶Ë¾ÓÖÐ";
+ Text[ chinese_traditional ] = "½u±ø¶}ºÝ¸m¤¤";
+ Text[ arabic ] = "ÈÏÇíÉ ÇáÎØ¡ ÊæÓíØ";
+ Text[ dutch ] = "Lijnbegin gecentreerd";
+ Text[ chinese_simplified ] = "ÏßÌõ¿ª¶Ë¾ÓÖÐ";
+ Text[ greek ] = "Áñ÷Þ ãñáììÞò êåíôñáñéóìÝíá";
+ Text[ korean ] = "¼±ÀÇ ½ÃÀÛ - °¡¿îµ¥";
+ Text[ turkish ] = "Çizgi baþýný ortala";
+};
+
+String SIP_XA_LINEENDCENTER
+{
+ Text = "Linienende zentriert";
+ Text [ ENGLISH ] = "Center lineend" ;
+ Text[ english_us ] = "Center arrowend";
+ Text[ portuguese ] = "Fim centrado";
+ Text[ russian ] = "Âûðàâíèâàíèå êîíöà ëèíèè ïî öåíòðó";
+ Text[ dutch ] = "Lijnuiteinde gecentreerd";
+ Text[ french ] = "Extrémités centrées";
+ Text[ spanish ] = "Fines de línea, centrado";
+ Text[ italian ] = "Centra fine linea";
+ Text[ danish ] = "Centrer stregslut";
+ Text[ swedish ] = "Linjeslut centrerat";
+ Text[ polish ] = "Wyœrodkuj koniec linii";
+ Text[ portuguese_brazilian ] = "Center lineend";
+ Text[ japanese ] = "ü‚ÌI“_‚𒆉›‘µ‚¦";
+ Text[ chinese_simplified ] = "ÏßÌõβ¶Ë¾ÓÖÐ";
+ Text[ chinese_traditional ] = "½u±ø§ÀºÝ¸m¤¤";
+ Text[ arabic ] = "äåÇíÉ ÇáÎØ¡ ÊæÓíØ";
+ Text[ dutch ] = "Lijnuiteinde gecentreerd";
+ Text[ chinese_simplified ] = "ÏßÌõβ¶Ë¾ÓÖÐ";
+ Text[ greek ] = "ÊåíôñáñéóìÝíï ôÝëïò ãñáììÞò";
+ Text[ korean ] = "¼±ÀÇ ³¡ - °¡¿îµ¥";
+ Text[ turkish ] = "Çizgi sonunu ortala";
+};
+
+String SIP_XA_LINETRANSPARENCE
+{
+ Text = "Linientransparenz";
+ Text [ ENGLISH ] = "Linetransparence" ;
+ Text[ english_us ] = "Line transparency";
+ Text[ portuguese ] = "Transparência";
+ Text[ russian ] = "Ïðîçðà÷íîñòü ëèíèè";
+ Text[ dutch ] = "Lijntransparantie";
+ Text[ french ] = "Transparence de ligne";
+ Text[ spanish ] = "Transparencia de línea";
+ Text[ italian ] = "Trasparenza linee";
+ Text[ danish ] = "Stregtransparens";
+ Text[ swedish ] = "Linjegenomskinlighet";
+ Text[ polish ] = "PrzezroczystoϾ linii";
+ Text[ portuguese_brazilian ] = "Linetransparence";
+ Text[ japanese ] = "ü‚Ì“§‰ß«";
+ Text[ chinese_simplified ] = "ÏßÌõ͸Ã÷";
+ Text[ chinese_traditional ] = "½u±ø³z©ú";
+ Text[ arabic ] = "ÔÝÇÝíÉ ÇáÎØ";
+ Text[ dutch ] = "Lijntransparantie";
+ Text[ chinese_simplified ] = "ÏßÌõ͸Ã÷";
+ Text[ greek ] = "ÄéáöÜíåéá ãñáììÞò";
+ Text[ korean ] = "Åõ¸í ¼±";
+ Text[ turkish ] = "Çizgi saydamlýðý";
+};
+
+String SIP_XA_LINEJOINT
+{
+ Text = "Linienübergang";
+ Text [ ENGLISH ] = "Line joint" ;
+ Text[ english_us ] = "Line joint";
+ Text[ portuguese ] = "Junção de linhas";
+ Text[ russian ] = "Ïåðåõîä ëèíèè";
+ Text[ greek ] = "ÌåôÜâáóç ãñáììÞò";
+ Text[ dutch ] = "Samenkomende lijnen";
+ Text[ french ] = "Jonction de lignes";
+ Text[ spanish ] = "Junta de líneas";
+ Text[ italian ] = "Passaggio linea";
+ Text[ danish ] = "Linjeovergang";
+ Text[ swedish ] = "Linjeövergång";
+ Text[ polish ] = "Po³¹czenie linii";
+ Text[ portuguese_brazilian ] = "Line joint";
+ Text[ japanese ] = "ü‚ÌŒp‚¬–Ú";
+ Text[ korean ] = "¼± ÀÌÀ½";
+ Text[ chinese_simplified ] = "ÏßÌõ½ÓºÏ";
+ Text[ chinese_traditional ] = "½u±ø±µ¦X";
+ Text[ arabic ] = "æÕáÉ ÎØæØ";
+ Text[ turkish ] = "Çizgi geçiþi";
+};
+
+String SIP_XA_LINERESERVED2
+{
+ Text = "Linie Reserve 2";
+ Text [ ENGLISH ] = "Line reserved 2" ;
+ Text[ english_us ] = "Line reserved for 2";
+ Text[ portuguese ] = "Linha de reserva 2";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ëèíèÿ 2";
+ Text[ dutch ] = "Lijnreserve 2";
+ Text[ french ] = "Réservé pour ligne 2";
+ Text[ spanish ] = "Línea reserva 2";
+ Text[ italian ] = "Riservato per linea 2";
+ Text[ danish ] = "Streg reserve 2";
+ Text[ swedish ] = "Linje reserverad för 2";
+ Text[ polish ] = "Zarezerwowana linia 2";
+ Text[ portuguese_brazilian ] = "Line reserved 2";
+ Text[ japanese ] = "ü —\\”õ2";
+ Text[ chinese_simplified ] = "ÏßÌõÔ¤Áô 2";
+ Text[ chinese_traditional ] = "½u±ø¹w¯d 2";
+ Text[ arabic ] = "ÎØ ãÍÌæÒ áÜ 2";
+ Text[ dutch ] = "Lijnreserve 2";
+ Text[ chinese_simplified ] = "ÏßÌõÔ¤Áô 2";
+ Text[ greek ] = "ÃñáììÞ åíáëëáêô. 2";
+ Text[ korean ] = "¿¹ºñ¼± 2";
+ Text[ turkish ] = "Çizgi - Yedek 2";
+};
+
+String SIP_XA_LINERESERVED3
+{
+ Text = "Linie Reserve 3";
+ Text [ ENGLISH ] = "Line reserved 3" ;
+ Text[ english_us ] = "Line reserved for 3";
+ Text[ portuguese ] = "Linha de reserva 3";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ëèíèÿ 3";
+ Text[ dutch ] = "Lijnreserve 3";
+ Text[ french ] = "Réservé pour ligne 3";
+ Text[ spanish ] = "Línea reserva 3";
+ Text[ italian ] = "Riservato per linea 3";
+ Text[ danish ] = "Streg reserve 3";
+ Text[ swedish ] = "Linje reserverad för 3";
+ Text[ polish ] = "Zarezerwowana linia 3";
+ Text[ portuguese_brazilian ] = "Line reserved 3";
+ Text[ japanese ] = "ü —\\”õ3";
+ Text[ chinese_simplified ] = "ÏßÌõÔ¤Áô 3";
+ Text[ chinese_traditional ] = "½u±ø¹w¯d 3";
+ Text[ arabic ] = "ÎØ ãÍÌæÒ áÜ 3";
+ Text[ dutch ] = "Lijnreserve 3";
+ Text[ chinese_simplified ] = "ÏßÌõÔ¤Áô 3";
+ Text[ greek ] = "ÃñáììÞ åíáëëáêô. 3";
+ Text[ korean ] = "¿¹ºñ¼± 3";
+ Text[ turkish ] = "Çizgi - Yedek 3";
+};
+
+String SIP_XA_LINERESERVED4
+{
+ Text = "Linie Reserve 4";
+ Text [ ENGLISH ] = "Line reserved 4" ;
+ Text[ english_us ] = "Line reserved for 4";
+ Text[ portuguese ] = "Linha de reserva 4";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ëèíèÿ 4";
+ Text[ dutch ] = "Lijnreserve 4";
+ Text[ french ] = "Réservé pour ligne 4";
+ Text[ spanish ] = "Línea reserva 4";
+ Text[ italian ] = "Riservato per linea 4";
+ Text[ danish ] = "Streg reserve 4";
+ Text[ swedish ] = "Linje reserverad för 4";
+ Text[ polish ] = "Zarezerwowana linia 4";
+ Text[ portuguese_brazilian ] = "Line reserved 4";
+ Text[ japanese ] = "ü —\\”õ4";
+ Text[ chinese_simplified ] = "ÏßÌõÔ¤Áô 4";
+ Text[ chinese_traditional ] = "½u±ø¹w¯d 4";
+ Text[ arabic ] = "ÎØ ãÍÌæÒ áÜ 4";
+ Text[ dutch ] = "Lijnreserve 4";
+ Text[ chinese_simplified ] = "ÏßÌõÔ¤Áô 4";
+ Text[ greek ] = "ÃñáììÞ åíáëëáêô. 4";
+ Text[ korean ] = "¿¹ºñ¼± 4";
+ Text[ turkish ] = "Çizgi - Yedek 4";
+};
+
+String SIP_XA_LINERESERVED5
+{
+ Text = "Linie Reserve 5";
+ Text [ ENGLISH ] = "Line reserved 5" ;
+ Text[ english_us ] = "Line reserved for 5";
+ Text[ portuguese ] = "Linha de reserva 5";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ëèíèÿ 5";
+ Text[ dutch ] = "Lijnreserve 5";
+ Text[ french ] = "Réservé pour ligne 5";
+ Text[ spanish ] = "Línea reserva 5";
+ Text[ italian ] = "Riservato per linea 5";
+ Text[ danish ] = "Streg reserve 5";
+ Text[ swedish ] = "Linje reserverad för 5";
+ Text[ polish ] = "Zarezerwowana linia 5";
+ Text[ portuguese_brazilian ] = "Line reserved 5";
+ Text[ japanese ] = "ü —\\”õ5";
+ Text[ chinese_simplified ] = "ÏßÌõÔ¤Áô 5";
+ Text[ chinese_traditional ] = "½u±ø¹w¯d 5";
+ Text[ arabic ] = "ÎØ ãÍÌæÒ áÜ 5";
+ Text[ dutch ] = "Lijnreserve 5";
+ Text[ chinese_simplified ] = "ÏßÌõÔ¤Áô 5";
+ Text[ greek ] = "ÃñáììÞ åíáëëáêô. 5";
+ Text[ korean ] = "¿¹ºñ¼± 5";
+ Text[ turkish ] = "Çizgi - Yedek 5";
+};
+
+String SIP_XA_LINERESERVED_LAST
+{
+ Text = "Linie Reserve 6";
+ Text [ ENGLISH ] = "Line reserved 6" ;
+ Text[ english_us ] = "Line reserved for 6";
+ Text[ portuguese ] = "Linha de reserva 6";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ëèíèÿ 6";
+ Text[ dutch ] = "Lijnreserve 6";
+ Text[ french ] = "Réservé pour ligne 6";
+ Text[ spanish ] = "Línea reserva 6";
+ Text[ italian ] = "Riservato per linea 6";
+ Text[ danish ] = "Streg reserve 6";
+ Text[ swedish ] = "Linje reserverad för 6";
+ Text[ polish ] = "Zarezerwowana linia 6";
+ Text[ portuguese_brazilian ] = "Line reserved 6";
+ Text[ japanese ] = "ü —\\”õ6";
+ Text[ chinese_simplified ] = "ÏßÌõÔ¤Áô 6";
+ Text[ chinese_traditional ] = "½u±ø¹w¯d 6";
+ Text[ arabic ] = "ÎØ ãÍÌæÒ áÜ 6";
+ Text[ dutch ] = "Lijnreserve 6";
+ Text[ chinese_simplified ] = "ÏßÌõÔ¤Áô 6";
+ Text[ greek ] = "ÃñáììÞ åíáëëáêô. 6";
+ Text[ korean ] = "¿¹ºñ¼± 6";
+ Text[ turkish ] = "Çizgi - Yedek 6";
+};
+
+String SIP_XATTRSET_LINE
+{
+ Text = "Linienattribute";
+ Text [ ENGLISH ] = "Lineattributes" ;
+ Text[ english_us ] = "Line attributes";
+ Text[ portuguese ] = "Atributos";
+ Text[ russian ] = "Àòðèáóòû ëèíèè";
+ Text[ dutch ] = "Lijneattributen";
+ Text[ french ] = "Attributs de lignes";
+ Text[ spanish ] = "Atributos de línea";
+ Text[ italian ] = "Attributi linea";
+ Text[ danish ] = "Stregattributter";
+ Text[ swedish ] = "Linjeattribut";
+ Text[ polish ] = "Atrybuty linii";
+ Text[ portuguese_brazilian ] = "Lineattributes";
+ Text[ japanese ] = "ü‚Ì‘®«";
+ Text[ chinese_simplified ] = "ÏßÌõÊôÐÔ";
+ Text[ chinese_traditional ] = "½u±øÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáÎØ";
+ Text[ dutch ] = "Lijneattributen";
+ Text[ chinese_simplified ] = "ÏßÌõÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò ãñáììÞò";
+ Text[ korean ] = "¼± ¼Ó¼º";
+ Text[ turkish ] = "Çizgi öznitelikleri";
+};
+
+String SIP_XA_FILLSTYLE
+{
+ Text = "Füllstil";
+ Text [ ENGLISH ] = "Fillstyle" ;
+ Text[ english_us ] = "Fillstyle";
+ Text[ portuguese ] = "Preenchimento";
+ Text[ russian ] = "Ñòèëü çàëèâêè";
+ Text[ dutch ] = "Vulling";
+ Text[ french ] = "Style de remplissage";
+ Text[ spanish ] = "Estilo de relleno";
+ Text[ italian ] = "Stile riempimento";
+ Text[ danish ] = "Fyldtype";
+ Text[ swedish ] = "Fyllningsstil";
+ Text[ polish ] = "Styl wype³nienia";
+ Text[ portuguese_brazilian ] = "Fillstyle";
+ Text[ japanese ] = "“h‚è‚‚Ԃµ½À²Ù";
+ Text[ chinese_simplified ] = "ÌîÉ«Ñùʽ";
+ Text[ chinese_traditional ] = "¥R¶ñ¼Ë¦¡";
+ Text[ arabic ] = "äãØ ÇáÊÚÈÆÉ";
+ Text[ dutch ] = "Vulling";
+ Text[ chinese_simplified ] = "ÌîÉ«Ñùʽ";
+ Text[ greek ] = "Óôõë ãåìßóìáôïò";
+ Text[ korean ] = "ä¿ì±â À¯Çü";
+ Text[ turkish ] = "Dolgu biçimi";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FILLCOLOR
+{
+ Text = "Füllfarbe";
+ Text [ ENGLISH ] = "Fillcolor" ;
+ Text[ english_us ] = "Fillcolor";
+ Text[ portuguese ] = "Cor";
+ Text[ russian ] = "Öâåò çàëèâêè";
+ Text[ dutch ] = "Vulllingskleur";
+ Text[ french ] = "Couleur de remplissage";
+ Text[ spanish ] = "Color de relleno";
+ Text[ italian ] = "Colore di riempimento";
+ Text[ danish ] = "Fyldfarve";
+ Text[ swedish ] = "Fyllningsfärg";
+ Text[ polish ] = "Kolor wype³nienia";
+ Text[ portuguese_brazilian ] = "Fillcolor";
+ Text[ japanese ] = "“h‚è‚‚Ԃµ‚ÌF";
+ Text[ chinese_simplified ] = "³äÌîµÄÑÕÉ«";
+ Text[ chinese_traditional ] = "¥R¶ñÃC¦â";
+ Text[ arabic ] = "áæä ÇáÊÚÈÆÉ";
+ Text[ dutch ] = "Vulllingskleur";
+ Text[ chinese_simplified ] = "³äÌîµÄÑÕÉ«";
+ Text[ greek ] = "ÃÝìéóìá ìå ÷ñþìá";
+ Text[ korean ] = "ä¿ì±â »ö";
+ Text[ turkish ] = "Dolgu rengi";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FILLGRADIENT
+{
+ Text = "Farbverlauf";
+ Text [ ENGLISH ] = "Gradient" ;
+ Text[ english_us ] = "Gradient";
+ Text[ portuguese ] = "Gradação";
+ Text[ russian ] = "Ãðàäèåíòíàÿ";
+ Text[ dutch ] = "Kleurverloop";
+ Text[ french ] = "Dégradé";
+ Text[ spanish ] = "Gradiente";
+ Text[ italian ] = "Sfumatura";
+ Text[ danish ] = "Farvegraduering";
+ Text[ swedish ] = "Färggradient";
+ Text[ polish ] = "Gradient";
+ Text[ portuguese_brazilian ] = "Gradient";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý";
+ Text[ chinese_simplified ] = "²Êɫͼ°¸";
+ Text[ chinese_traditional ] = "±m¦â¹Ï®×";
+ Text[ arabic ] = "ÊÏÑÌ Çááæä";
+ Text[ dutch ] = "Kleurverloop";
+ Text[ chinese_simplified ] = "²Êɫͼ°¸";
+ Text[ greek ] = "ÄéáâÜèìéóç ÷ñþìáôïò";
+ Text[ korean ] = "±×¶óµ¥À̼Ç";
+ Text[ turkish ] = "Gradyan";
+};
+
+String SIP_XA_FILLHATCH
+{
+ Text = "Schraffur";
+ Text [ ENGLISH ] = "Cross hatch" ;
+ Text[ english_us ] = "Hatching";
+ Text[ portuguese ] = "Tracejado";
+ Text[ russian ] = "Øòðèõîâêà";
+ Text[ dutch ] = "Arcering";
+ Text[ french ] = "Hachure";
+ Text[ spanish ] = "Trama";
+ Text[ italian ] = "Tratteggio";
+ Text[ danish ] = "Skravering";
+ Text[ swedish ] = "Skraffering";
+ Text[ polish ] = "Kreskowanie";
+ Text[ portuguese_brazilian ] = "Cross hatch";
+ Text[ japanese ] = "ʯÁݸÞ";
+ Text[ chinese_simplified ] = "ÒõÓ°Ïß";
+ Text[ chinese_traditional ] = "³±¼v½u";
+ Text[ arabic ] = "äÞÔ";
+ Text[ dutch ] = "Arcering";
+ Text[ chinese_simplified ] = "ÒõÓ°Ïß";
+ Text[ greek ] = "ÃñáììïóêéÜ";
+ Text[ korean ] = "ÇØĪ";
+ Text[ turkish ] = "Desen";
+};
+
+String SIP_XA_FILLBITMAP
+{
+ Text = "Füllbitmap";
+ Text [ ENGLISH ] = "Fillbitmap" ;
+ Text[ english_us ] = "Fillbitmap";
+ Text[ portuguese ] = "Bitmap de preenchimento";
+ Text[ russian ] = "Bitmap çàëèâêè";
+ Text[ dutch ] = "Vullingsbitmap";
+ Text[ french ] = "Bitmap de remplissage";
+ Text[ spanish ] = "Bitmap de relleno";
+ Text[ italian ] = "Bitmap di riempimento";
+ Text[ danish ] = "Fyldbitmap";
+ Text[ swedish ] = "Fyllningsbitmap";
+ Text[ polish ] = "Mapa bitowa do wype³niania";
+ Text[ portuguese_brazilian ] = "Fillbitmap";
+ Text[ japanese ] = "“h‚è‚‚ԂµËÞ¯ÄϯÌß";
+ Text[ chinese_simplified ] = "³äÌîλͼ";
+ Text[ chinese_traditional ] = "¥R¶ñÂI°}¹Ï";
+ Text[ arabic ] = "ÕæÑÉ ÊÚÈÆÉ äÞØíÉ";
+ Text[ dutch ] = "Vullingsbitmap";
+ Text[ chinese_simplified ] = "³äÌîλͼ";
+ Text[ greek ] = "Bitmap ãåìßóìáôïò";
+ Text[ korean ] = "ä¿ì±â ºñÆ®¸Ê";
+ Text[ turkish ] = "Dolgu için bit eþlem";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FILLTRANSPARENCE
+{
+ Text = "Flächentransparenz";
+ Text [ ENGLISH ] = "Transparence" ;
+ Text[ english_us ] = "Fill transparency";
+ Text[ portuguese ] = "Transparência";
+ Text[ russian ] = "Ïðîçðà÷íîñòü çàëèâêè";
+ Text[ dutch ] = "Transparantie";
+ Text[ french ] = "Transparence";
+ Text[ spanish ] = "Transparencia";
+ Text[ italian ] = "Trasparenza";
+ Text[ danish ] = "Fladetransparens";
+ Text[ swedish ] = "Ytans genomskinlighet";
+ Text[ polish ] = "PrzezroczystoϾ powierzchni";
+ Text[ portuguese_brazilian ] = "Transparence";
+ Text[ japanese ] = "•\\–Ê‚Ì“§‰»«";
+ Text[ chinese_simplified ] = "͸Ã÷";
+ Text[ chinese_traditional ] = "¥­­±³z©ú";
+ Text[ arabic ] = "ÔÝÇÝíÉ";
+ Text[ dutch ] = "Transparantie";
+ Text[ chinese_simplified ] = "͸Ã÷";
+ Text[ greek ] = "ÄéáöÜíåéá åðéöÜíåéáò";
+ Text[ korean ] = "Åõ¸í ä¿ì±â";
+ Text[ turkish ] = "Yüzey saydamlýðý";
+};
+
+String SIP_XA_GRADIENTSTEPCOUNT
+{
+ Text = "Farbverlaufschrittanzahl";
+ Text [ ENGLISH ] = "Gradient steps" ;
+ Text[ english_us ] = "Number of gradient steps";
+ Text[ portuguese ] = "Número de gradações";
+ Text[ russian ] = "Øàãè ãðàäèåíòíîé";
+ Text[ dutch ] = "Gradatie kleurverloop";
+ Text[ french ] = "Finesse du grain (dégradé)";
+ Text[ spanish ] = "Incremento";
+ Text[ italian ] = "Numero gradi di sfumatura";
+ Text[ danish ] = "Antal farvegradueringstrin";
+ Text[ swedish ] = "Antal färggradientsteg";
+ Text[ polish ] = "Inkrement";
+ Text[ portuguese_brazilian ] = "Gradient steps";
+ Text[ japanese ] = "¸Þ×ÃÞ°¼®Ý‚Ì’iŠK”";
+ Text[ chinese_simplified ] = "²Êɫͼ°¸±ä»¯²½Êý";
+ Text[ chinese_traditional ] = "±m¦â¹Ï®×¨B¼Æ";
+ Text[ arabic ] = "ÚÏÏ ÎØæÇÊ ÊÏÑÌ Çááæä";
+ Text[ dutch ] = "Gradatie kleurverloop";
+ Text[ chinese_simplified ] = "²Êɫͼ°¸±ä»¯²½Êý";
+ Text[ greek ] = "Áñéèìüò âçìÜôùí äéáâÜèìéóçò ÷ñþìáôïò";
+ Text[ korean ] = "±×¶óµ¥ÀÌ¼Ç ´Ü°èÀÇ ¼ö";
+ Text[ turkish ] = "Gradyan adýmlarý sayýsý";
+};
+
+String SIP_XA_FILLBMP_TILE
+{
+ Text = "Kachelfüllung";
+ Text [ ENGLISH ] = "Tilefill" ;
+ Text[ english_us ] = "Tile fill";
+ Text[ portuguese ] = "Em mosaico";
+ Text[ russian ] = "Çàëèâêà ïëèòêè";
+ Text[ dutch ] = "Tegelvulling";
+ Text[ french ] = "Remplissage du carrelage";
+ Text[ spanish ] = "Relleno de azulejo";
+ Text[ italian ] = "Riempimento piastrella";
+ Text[ danish ] = "Flisefyld";
+ Text[ swedish ] = "Kakelfyllning";
+ Text[ polish ] = "Wype³nianie p³ytek";
+ Text[ portuguese_brazilian ] = "Tilefill";
+ Text[ japanese ] = "À²Ù‚Ì“h‚è‚‚Ԃµ";
+ Text[ chinese_simplified ] = "ƽÆ̳äÌî";
+ Text[ chinese_traditional ] = "¥­çE¥R¶ñ";
+ Text[ arabic ] = "ÊÚÈÆÉ ÇáÈáÇØÉ";
+ Text[ dutch ] = "Tegelvulling";
+ Text[ chinese_simplified ] = "ƽÆ̳äÌî";
+ Text[ greek ] = "ÃÝìéóìá ðëáêáêéïý";
+ Text[ korean ] = "¹ÙµÏÆÇ Ã¤¿ì±â";
+ Text[ turkish ] = "Döþeme taþlarý";
+};
+
+String SIP_XA_FILLBMP_POS
+{
+ Text = "Füllbitmapposition";
+ Text [ ENGLISH ] = "Position of fillbitmap" ;
+ Text[ english_us ] = "Fillbitmap position";
+ Text[ portuguese ] = "Posição do bitmap";
+ Text[ russian ] = "Ïîçèöèÿ bitmap çàëèâêè";
+ Text[ dutch ] = "Positie vullingsbitmap";
+ Text[ french ] = "Position du bitmap de remplissage";
+ Text[ spanish ] = "Posición bitmap de relleno";
+ Text[ italian ] = "Posizione bitmap di riempimento";
+ Text[ danish ] = "Fyldbitmapplacering";
+ Text[ swedish ] = "Fyllningsbitmap position";
+ Text[ polish ] = "Pozycja mapy bitowej do wype³niania";
+ Text[ portuguese_brazilian ] = "Position of fillbitmap";
+ Text[ japanese ] = "“h‚è‚‚ԂµËÞ¯ÄϯÌ߂̈ʒu";
+ Text[ chinese_simplified ] = "³äÌîλͼλÖÃ";
+ Text[ chinese_traditional ] = "¥R¶ñÂI°}¹Ï¦ì¸m";
+ Text[ arabic ] = "ãæÖÚ ÕæÑ ÊÚÈÆÉ äÞØíÉ";
+ Text[ dutch ] = "Positie vullingsbitmap";
+ Text[ chinese_simplified ] = "³äÌîλͼλÖÃ";
+ Text[ greek ] = "ÈÝóç bitmap ãåìßóìáôïò";
+ Text[ korean ] = "ä¿ì±â ºñÆ®¸Ê À§Ä¡";
+ Text[ turkish ] = "Dolgu bit eþlem konumu";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FILLBMP_SIZEX
+{
+ Text = "Füllbitmapbreite";
+ Text [ ENGLISH ] = "Width of fillbitmap" ;
+ Text[ english_us ] = "Fillbitmap width";
+ Text[ portuguese ] = "Largura do bitmap";
+ Text[ russian ] = "Øèðèíà îáëàñòè çàëèâêè òî÷å÷íîãî ðèñóíêà";
+ Text[ dutch ] = "Breedte vullingsbitmap";
+ Text[ french ] = "Largeur du bitmap de remplissage";
+ Text[ spanish ] = "Ancho bitmap de relleno";
+ Text[ italian ] = "Larghezza bitmap di riempimento";
+ Text[ danish ] = "Fyldbitmapbredde";
+ Text[ swedish ] = "Bredd på fyllningsbitmap";
+ Text[ polish ] = "Szerokoœæ mapy bitowej do wype³niania";
+ Text[ portuguese_brazilian ] = "Width of fillbitmap";
+ Text[ japanese ] = "“h‚è‚‚ԂµËÞ¯ÄϯÌß‚Ì•";
+ Text[ chinese_simplified ] = "³äÌîλͼ¿í¶È";
+ Text[ chinese_traditional ] = "¥R¶ñÂI°}¹Ï¼e«×";
+ Text[ arabic ] = "ÚÑÖ ÕæÑÉ ÇáÊÚÈÆÉ ÇáäÞØíÉ";
+ Text[ dutch ] = "Breedte vullingsbitmap";
+ Text[ chinese_simplified ] = "³äÌîλͼ¿í¶È";
+ Text[ greek ] = "ÐëÜôïò bitmap ãåìßóìáôïò";
+ Text[ korean ] = "ä¿ì±â ºñÆ®¸Ê ³Êºñ";
+ Text[ turkish ] = "Dolgu bit eþlem geniþliði";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FILLBMP_SIZEY
+{
+ Text = "Füllbitmaphöhe";
+ Text [ ENGLISH ] = "Height of fillbitmap" ;
+ Text[ english_us ] = "Height of fillbitmap";
+ Text[ portuguese ] = "Altura do bitmap";
+ Text[ russian ] = "Âûñîòà îáëàñòè çàëèâêè òî÷å÷íîãî ðèñóíêà";
+ Text[ dutch ] = "Hoogte vullingsbitmap";
+ Text[ french ] = "Hauteur du bitmap de remplissage";
+ Text[ spanish ] = "Alto de bitmap de relleno";
+ Text[ italian ] = "Altezza bitmap di riempimento";
+ Text[ danish ] = "Fyldbitmapbredde";
+ Text[ swedish ] = "Fyllningsbitmap höjd";
+ Text[ polish ] = "Wysokoœæ mapy bitowej do wype³niania";
+ Text[ portuguese_brazilian ] = "Height of fillbitmap";
+ Text[ japanese ] = "“h‚è‚‚ԂµËÞ¯ÄϯÌß‚Ì‚‚³";
+ Text[ chinese_simplified ] = "³äÌîλͼ¸ß¶È";
+ Text[ chinese_traditional ] = "¥R¶ñÂI°}¹Ï°ª«×";
+ Text[ arabic ] = "ÇÑÊÝÇÚ ÕæÑÉ ÇáÊÚÈÆÉ ÇáäÞØíÉ";
+ Text[ dutch ] = "Hoogte vullingsbitmap";
+ Text[ chinese_simplified ] = "³äÌîλͼ¸ß¶È";
+ Text[ greek ] = "¾øïò bitmap ãåìßóìáôïò";
+ Text[ korean ] = "ä¿ì±â ºñÆ®¸ÊÀÇ ³ôÀÌ";
+ Text[ turkish ] = "Dolgu bit eþlem yüksekliði";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FILLFLOATTRANSPARENCE
+{
+ Text = "Transparenter Verlauf";
+ Text [ ENGLISH ] = "Transparent gradient" ;
+ Text[ english_us ] = "Transparent gradient";
+ Text[ portuguese ] = "Gradação transparente";
+ Text[ greek ] = "ÄéáöáíÝò äéáâÜèìéóç";
+ Text[ dutch ] = "Transparant verloop";
+ Text[ french ] = "Dégradé transparent";
+ Text[ spanish ] = "Gradiente transparente";
+ Text[ swedish ] = "Transparent gradient";
+ Text[ russian ] = "Ïðîçðà÷íàÿ ãðàäèåíòíàÿ";
+ Text[ italian ] = "Sfumatura trasparente";
+ Text[ danish ] = "Transparent graduering";
+ Text[ polish ] = "Przezroczysty gradient";
+ Text[ portuguese_brazilian ] = "Transparent gradient";
+ Text[ japanese ] = "“§‰ß«‚̸Þ×ÃÞ°¼®Ý";
+ Text[ korean ] = "Åõ¸í ±×¶óµ¥À̼Ç";
+ Text[ chinese_simplified ] = "͸Ã÷ͼ°¸";
+ Text[ chinese_traditional ] = "³z©ú¹Ï®×";
+ Text[ arabic ] = "ÊÏÑÌ ÔÝÇÝ";
+ Text[ turkish ] = "Saydam gradyan";
+};
+
+String SIP_XA_FILLRESERVED2
+{
+ Text = "Füllung Reserve 2";
+ Text [ ENGLISH ] = "Fill reserved 2" ;
+ Text[ english_us ] = "Fill reserved for 2";
+ Text[ portuguese ] = "Enchimento de reserva 2";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ çàëèâêà 2";
+ Text[ dutch ] = "Vullingsreserve 2";
+ Text[ french ] = "Réservé pour remplissage 2";
+ Text[ spanish ] = "Relleno reserva 2";
+ Text[ italian ] = "Riservato per riempimento 1";
+ Text[ danish ] = "Fyld reserve 2";
+ Text[ swedish ] = "Fyllning reserverad för 2";
+ Text[ polish ] = "Zarezerwowane wype³nianie 2";
+ Text[ portuguese_brazilian ] = "Fill reserved 2";
+ Text[ japanese ] = "“h‚è‚‚Ԃµ —\\”õ2";
+ Text[ chinese_simplified ] = "³äÌîÔ¤Áô 2";
+ Text[ chinese_traditional ] = "¥R¶ñ¹w¯d 2";
+ Text[ arabic ] = "ÇáÊÚÈÆÉ ãÍÌæÒÉ áÜ 2";
+ Text[ dutch ] = "Vullingsreserve 2";
+ Text[ chinese_simplified ] = "³äÌîÔ¤Áô 2";
+ Text[ greek ] = "ÃÝìéóìá åíáëëáêô. 2";
+ Text[ korean ] = "¿¹ºñ ä¿ì±â2";
+ Text[ turkish ] = "Dolgu - Yedek 2";
+};
+
+String SIP_XA_FILLBMP_SIZELOG
+{
+ Text = "Kachelgröße nicht in %";
+ Text [ ENGLISH ] = "Tile size not in %" ;
+ Text[ english_us ] = "Tile size not in %";
+ Text[ portuguese ] = "Tamanho não em %";
+ Text[ russian ] = "Ðàçìåð ïëèòêè íå â %";
+ Text[ dutch ] = "Tegelgrootte niet in %";
+ Text[ french ] = "Taille de carrelage absente dans %";
+ Text[ spanish ] = "Tamaño de azulejo en %";
+ Text[ italian ] = "Dimensione piastrella non in %";
+ Text[ danish ] = "Flisestørrelse ikke i %";
+ Text[ swedish ] = "Kakelstorlek ej i %";
+ Text[ polish ] = "Wielkoœæ p³ytek nie w %";
+ Text[ portuguese_brazilian ] = "Tile size not in %";
+ Text[ japanese ] = "%‚É•s“K‡‚ÌÀ²Ù »²½Þ";
+ Text[ chinese_simplified ] = "ƽÆÌ´óС²»ÊÇ %";
+ Text[ chinese_traditional ] = "¥­çE¤j¤p¤£¬O %";
+ Text[ arabic ] = "ÍÌã ÇáÈáÇØÉ ÈÏæä %";
+ Text[ dutch ] = "Tegelgrootte niet in %";
+ Text[ chinese_simplified ] = "ƽÆÌ´óС²»ÊÇ %";
+ Text[ greek ] = "ÌÝãåèïò åðéêÜëõøçò ü÷é óå %";
+ Text[ korean ] = "¹ÙµÏÆÇ Å©±â¸¦ %·Î ÇÏÁö ¾ÊÀ½";
+ Text[ turkish ] = "Döþeme taþlarý boyutu % deðil";
+};
+
+String SIP_XA_FILLBMP_TILEOFFSETX
+{
+ Text = "Kachelversatz X in %";
+ Text [ ENGLISH ] = "Tile offset X in %" ;
+ Text[ english_us ] = "Tile offset X in %";
+ Text[ portuguese ] = "Offset X em mosaico em %";
+ Text[ russian ] = "Ñìåùåíèå ïëèòêè X â %";
+ Text[ dutch ] = "Tegelopvulling X in %";
+ Text[ french ] = "Décalage de carrelage X dans %";
+ Text[ spanish ] = "Desplazamiento de azulejo en %";
+ Text[ italian ] = "Spost. piastrella X in %";
+ Text[ danish ] = "Fliseforskydning X i %";
+ Text[ swedish ] = "Förskjutning sida vid sida X i %";
+ Text[ polish ] = "Przesuniêcie p³ytek X w %";
+ Text[ portuguese_brazilian ] = "Tile offset X in %";
+ Text[ japanese ] = "%‚Å‚ÌÀ²Ù µÌ¾¯Ä X";
+ Text[ chinese_simplified ] = "ƽÆÌÆ«ÒÆ X %";
+ Text[ chinese_traditional ] = "¥­çE°¾²¾ X ¤£¬O %";
+ Text[ arabic ] = "ÅÒÇÍÉ ÇáÈáÇØÉ Ó ÈÜ %";
+ Text[ dutch ] = "Tegelopvulling X in %";
+ Text[ chinese_simplified ] = "ƽÆÌÆ«ÒÆ X %";
+ Text[ greek ] = "Ìåôáôüðéóç åðéêÜëõøçò X óå %";
+ Text[ korean ] = "¹ÙµÏÆÇ ¿ÀÇÁ¼ÂX¸¦ %·Î";
+ Text[ turkish ] = "Döþeme taþý konumu X (%)";
+};
+
+String SIP_XA_FILLBMP_TILEOFFSETY
+{
+ Text = "Kachelversatz Y in %";
+ Text [ ENGLISH ] = "Tile offset Y in %" ;
+ Text[ english_us ] = "Tile offset Y in %";
+ Text[ portuguese ] = "Offset Y em mosaico em %";
+ Text[ russian ] = "Ñìåùåíèå ïëèòêè Y â %";
+ Text[ dutch ] = "Trapsgewijze plaatsing tegels in %";
+ Text[ french ] = "Décalage de carrelage Y dans %";
+ Text[ spanish ] = "Desplazamiento de azulejo Y en %";
+ Text[ italian ] = "Spost. piastrella Y in %";
+ Text[ danish ] = "Fliseforskydning Y i %";
+ Text[ swedish ] = "Förskjutning sida vid sida Y i %";
+ Text[ polish ] = "Przesuniêcie p³ytek Y w %";
+ Text[ portuguese_brazilian ] = "Tile offset Y in %";
+ Text[ japanese ] = "%‚Å‚ÌÀ²Ù µÌ¾¯Ä Y";
+ Text[ chinese_simplified ] = "ƽÆÌÆ«ÒÆ Y %";
+ Text[ chinese_traditional ] = "¥­çE Y ¤£¬O %";
+ Text[ arabic ] = "ÅÒÇÍÉ ÇáÈáÇØÉ Õ ÈÜ %";
+ Text[ dutch ] = "Trapsgewijze plaatsing tegels in %";
+ Text[ chinese_simplified ] = "ƽÆÌÆ«ÒÆ Y %";
+ Text[ greek ] = "Ìåôáôüðéóç åðéêÜëõøçò Y óå %";
+ Text[ korean ] = "¹ÙµÏÆÇ ¿ÀÇÁ¼ÂY¸¦ %·Î";
+ Text[ turkish ] = "Döþeme taþý konumu Y (%)";
+};
+
+String SIP_XA_FILLBMP_STRETCH
+{
+ Text = "Bitmapstreckung";
+ Text [ ENGLISH ] = "Bitmap scaling" ;
+ Text[ english_us ] = "Bitmap scaling";
+ Text[ portuguese ] = "Extensão do bitmap";
+ Text[ russian ] = "Ìàñøòàáèðîâàíèå òî÷å÷íîãî ðèñóíêà";
+ Text[ dutch ] = "Bitmapmaatstaf";
+ Text[ french ] = "Extension de bitmap";
+ Text[ spanish ] = "Redimensionamiento de bitmap";
+ Text[ italian ] = "Estensione bitmap";
+ Text[ danish ] = "Bitmapskalering";
+ Text[ swedish ] = "Bitmapsträckning";
+ Text[ polish ] = "Skalowanie mapy bitowej";
+ Text[ portuguese_brazilian ] = "Bitmap scaling";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß‚ðˆø‚Á’£‚Á‚ÄL‚΂·";
+ Text[ chinese_simplified ] = "λͼÑÓÉì";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï©µ¦ù";
+ Text[ arabic ] = "ÊÍÌíã ÕæÑÉ äÞØíÉ";
+ Text[ dutch ] = "Bitmapmaatstaf";
+ Text[ chinese_simplified ] = "λͼÑÓÉì";
+ Text[ greek ] = "ÅðéìÞêõíóç Bitmap";
+ Text[ korean ] = "ºñÆ®¸Ê ±æ°Ô ´ÃÀÓ";
+ Text[ turkish ] = "Bit eþlem ölçeklendirme";
+};
+
+String SIP_XA_FILLRESERVED3
+{
+ Text = "Bmp Reserve 3";
+ Text [ ENGLISH ] = "Bitmap reserved 3" ;
+ Text[ english_us ] = "Bitmap reserved for 3";
+ Text[ portuguese ] = "Bitmap de reserva 3";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé òî÷å÷íûé ðèñóíîê 3";
+ Text[ dutch ] = "Bitmapreserve 3";
+ Text[ french ] = "Réservé pour Bitmap 3";
+ Text[ spanish ] = "Bitmap reserva 3";
+ Text[ italian ] = "Riservato per bitmap 3";
+ Text[ danish ] = "Bitmap reserve 3";
+ Text[ swedish ] = "Bitmap reserverad för 3";
+ Text[ polish ] = "Zarezerwowwna mapa bitowa 3";
+ Text[ portuguese_brazilian ] = "Bitmap reserved 3";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß‚Ì—\\”õ 3";
+ Text[ chinese_simplified ] = "λͼԤÁô 3";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï¹w¯d 3";
+ Text[ arabic ] = "ÕæÑÉ äÞØíÉ ãÍÌæÒÉ áÜ 3";
+ Text[ dutch ] = "Bitmapreserve 3";
+ Text[ chinese_simplified ] = "λͼԤÁô 3";
+ Text[ greek ] = "Bitmap åíáëëáêô. 3";
+ Text[ korean ] = "¿¹ºñ ºñÆ®¸Ê 3";
+ Text[ turkish ] = "Bit eþlem - Yedek 3";
+};
+
+String SIP_XA_FILLRESERVED4
+{
+ Text = "Bmp Reserve 4";
+ Text [ ENGLISH ] = "Bitmap reserved 4" ;
+ Text[ english_us ] = "Bitmap reserved for 4";
+ Text[ portuguese ] = "Bitmap de reserva 4";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé òî÷å÷íûé ðèñóíîê 4";
+ Text[ dutch ] = "Bitmapreserve 4";
+ Text[ french ] = "Réservé pour Bitmap 4";
+ Text[ spanish ] = "Bitmap reserva 4";
+ Text[ italian ] = "Riservato per bitmap 4";
+ Text[ danish ] = "Bitmap reserve 4";
+ Text[ swedish ] = "Bitmap reserverad för 4";
+ Text[ polish ] = "Zarezerwowana mapa bitowa 4";
+ Text[ portuguese_brazilian ] = "Bitmap reserved 4";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß‚Ì—\\”õ 4";
+ Text[ chinese_simplified ] = "λͼԤÁô 4";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï¹w¯d 4";
+ Text[ arabic ] = "ÕæÑÉ äÞØíÉ ãÍÌæÒÉ áÜ 4";
+ Text[ dutch ] = "Bitmapreserve 4";
+ Text[ chinese_simplified ] = "λͼԤÁô 4";
+ Text[ greek ] = "Bitmap åíáëëáêô. 4";
+ Text[ korean ] = "¿¹ºñ ºñÆ®¸Ê 4";
+ Text[ turkish ] = "Bit eþlem - Yedek 4";
+};
+
+String SIP_XA_FILLRESERVED5
+{
+ Text = "Bmp Reserve 5";
+ Text [ ENGLISH ] = "Bitmap reserved 5" ;
+ Text[ english_us ] = "Bitmap reserved for 5";
+ Text[ portuguese ] = "Bitmap de reserva 5";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé òî÷å÷íûé ðèñóíîê 5";
+ Text[ dutch ] = "Bitmapreserve 5";
+ Text[ french ] = "Réservé pour Bitmap 5";
+ Text[ spanish ] = "Bitmap reserva 5";
+ Text[ italian ] = "Riservato per bitmap 5";
+ Text[ danish ] = "Bitmap reserve 5";
+ Text[ swedish ] = "Bitmap reserverad för 5";
+ Text[ polish ] = "Zarezerwowana mapa bitowa 5";
+ Text[ portuguese_brazilian ] = "Bitmap reserved 5";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß‚Ì—\\”õ 5";
+ Text[ chinese_simplified ] = "λͼԤÁô 5";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï¹w¯d 5";
+ Text[ arabic ] = "ÕæÑÉ äÞØíÉ ãÍÌæÒÉ áÜ 5";
+ Text[ dutch ] = "Bitmapreserve 5";
+ Text[ chinese_simplified ] = "λͼԤÁô 5";
+ Text[ greek ] = "Bitmap åíáëëáêô. 5";
+ Text[ korean ] = "¿¹ºñ ºñÆ®¸Ê 5";
+ Text[ turkish ] = "Bit eþlem - Yedek 5";
+};
+
+String SIP_XA_FILLRESERVED6
+{
+ Text = "Bmp Reserve 6";
+ Text [ ENGLISH ] = "Bitmap reserved 6" ;
+ Text[ english_us ] = "Bitmap reserved for 6";
+ Text[ portuguese ] = "Bitmap de reserva 6";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé òî÷å÷íûé ðèñóíîê 6";
+ Text[ dutch ] = "Bitmapreserve 6";
+ Text[ french ] = "Réservé pour Bitmap 6";
+ Text[ spanish ] = "Bitmap reserva 6";
+ Text[ italian ] = "Riservato per bitmap 6";
+ Text[ danish ] = "Bitmap reserve 6";
+ Text[ swedish ] = "Bitmap reserverad för 6";
+ Text[ polish ] = "Zarezerwowana mapa bitowa 6";
+ Text[ portuguese_brazilian ] = "Bitmap reserved 6";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß‚Ì—\\”õ 6";
+ Text[ chinese_simplified ] = "λͼԤÁô 6";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï¹w¯d 6";
+ Text[ arabic ] = "ÕæÑÉ äÞØíÉ ãÍÌæÒÉ áÜ 6";
+ Text[ dutch ] = "Bitmapreserve 6";
+ Text[ chinese_simplified ] = "λͼԤÁô 6";
+ Text[ greek ] = "Bitmap åíáëëáêô. 6";
+ Text[ korean ] = "¿¹ºñ ºñÆ®¸Ê 6";
+ Text[ turkish ] = "Bit eþlem - Yedek 6";
+};
+
+String SIP_XA_FILLRESERVED7
+{
+ Text = "Bmp Reserve 7";
+ Text [ ENGLISH ] = "Bitmap reserved 7" ;
+ Text[ english_us ] = "Bitmap reserved for 7";
+ Text[ portuguese ] = "Bitmap de reserva 7";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé òî÷å÷íûé ðèñóíîê 7";
+ Text[ dutch ] = "Bitmapreserve 7";
+ Text[ french ] = "Réservé pour Bitmap 7";
+ Text[ spanish ] = "Bitmap reserva 7";
+ Text[ italian ] = "Riservato per bitmap 7";
+ Text[ danish ] = "Bitmap reserve 7";
+ Text[ swedish ] = "Bitmap reserverad för 7";
+ Text[ polish ] = "Zarezerwowana mapa bitowa 7";
+ Text[ portuguese_brazilian ] = "Bitmap reserved 7";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß‚Ì—\\”õ 7";
+ Text[ chinese_simplified ] = "λͼԤÁô 7";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï¹w¯d 7";
+ Text[ arabic ] = "ÕæÑÉ äÞØíÉ ãÍÌæÒÉ áÜ 7";
+ Text[ dutch ] = "Bitmapreserve 7";
+ Text[ chinese_simplified ] = "λͼԤÁô 7";
+ Text[ greek ] = "Bitmap åíáëëáêô. 7";
+ Text[ korean ] = "¿¹ºñ ºñÆ®¸Ê 7";
+ Text[ turkish ] = "Bit eþlem - Yedek 7";
+};
+
+String SIP_XA_FILLRESERVED8
+{
+ Text = "Bmp Reserve 8";
+ Text [ ENGLISH ] = "Bitmap reserved 8" ;
+ Text[ english_us ] = "Bitmap reserved for 8";
+ Text[ portuguese ] = "Bitmap de reserva 8";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé òî÷å÷íûé ðèñóíîê 8";
+ Text[ dutch ] = "Bitmapreserve 8";
+ Text[ french ] = "Réservé pour Bitmap 8";
+ Text[ spanish ] = "Bitmap reserva 8";
+ Text[ italian ] = "Riservato per bitmap 8";
+ Text[ danish ] = "Bitmap reserve 8";
+ Text[ swedish ] = "Bitmap reserverad för 8";
+ Text[ polish ] = "Zarezerwowana mapa bitowa 8";
+ Text[ portuguese_brazilian ] = "Bitmap reserved 8";
+ Text[ japanese ] = "ËÞ¯ÄϯÌß‚Ì—\\”õ 8";
+ Text[ chinese_simplified ] = "λͼԤÁô 8";
+ Text[ chinese_traditional ] = "ÂI°}¹Ï¹w¯d 8";
+ Text[ arabic ] = "ÕæÑÉ äÞØíÉ ãÍÌæÒÉ áÜ 8";
+ Text[ dutch ] = "Bitmapreserve 8";
+ Text[ chinese_simplified ] = "λͼԤÁô 8";
+ Text[ greek ] = "Bitmap åíáëëáêô. 8";
+ Text[ korean ] = "¿¹ºñ ºñÆ®¸Ê 8";
+ Text[ turkish ] = "Bit eþlem - Yedek 8";
+};
+
+String SIP_XA_FILLBMP_POSOFFSETX
+{
+ Text = "Kachelposition X in %";
+ Text [ ENGLISH ] = "Tile position X in %" ;
+ Text[ english_us ] = "Tile position X in %";
+ Text[ portuguese ] = "Posição mosaico X em %";
+ Text[ russian ] = "Ïîçèöèÿ ïëèòêè X â %";
+ Text[ dutch ] = "Tegelpositie X in %";
+ Text[ french ] = "Position de carrelage X dans %";
+ Text[ spanish ] = "Posición azulejo X en %";
+ Text[ italian ] = "Posizione piastrella X in %";
+ Text[ danish ] = "Fliseposition X i %";
+ Text[ swedish ] = "Position sida vid sida X i %";
+ Text[ polish ] = "Pozycja p³ytek X w %";
+ Text[ portuguese_brazilian ] = "Tile position X in %";
+ Text[ japanese ] = "%‚Å‚ÌÀ²Ù‚̈ʒuX";
+ Text[ chinese_simplified ] = "ƽÆÌλÖà X %";
+ Text[ chinese_traditional ] = "¥­çE¦ì¸m X ¦b %";
+ Text[ arabic ] = "ÇáãæÖÚ ÇáÈáÇØÉ Ó ÈÜ %";
+ Text[ dutch ] = "Tegelpositie X in %";
+ Text[ chinese_simplified ] = "ƽÆÌλÖà X %";
+ Text[ greek ] = "ÈÝóç X ðëáêáêéïý óå %";
+ Text[ korean ] = "¹ÙµÏÆÇ À§Ä¡X ¸¦ %·Î";
+ Text[ turkish ] = "Döþeme taþý konumu X (%)";
+};
+
+String SIP_XA_FILLBMP_POSOFFSETY
+{
+ Text = "Kachelposition Y in %";
+ Text [ ENGLISH ] = "Tile position Y in %" ;
+ Text[ english_us ] = "Tile position Y in %";
+ Text[ portuguese ] = "Posição mosaico Y em %";
+ Text[ russian ] = "Ïîçèöèÿ ïëèòêè Y â %";
+ Text[ dutch ] = "Tegelpositie Y in %";
+ Text[ french ] = "Position de carrelage Y dans %";
+ Text[ spanish ] = "Posición azulejo Y en %";
+ Text[ italian ] = "Posizione piastrella Y in %";
+ Text[ danish ] = "Fliseposition Y i %";
+ Text[ swedish ] = "Position sida vid sida Y i %";
+ Text[ polish ] = "Pozycja p³ytek Y w %";
+ Text[ portuguese_brazilian ] = "Tile position Y in %";
+ Text[ japanese ] = "%‚Å‚ÌÀ²Ù‚̈ʒu";
+ Text[ chinese_simplified ] = "ƽÆÌλÖà Y %";
+ Text[ chinese_traditional ] = "¾Q¥­¦ì¸m Y ¦b %";
+ Text[ arabic ] = "ãæÖÚ ÇáÈáÇØÉ Õ ÈÜ %";
+ Text[ dutch ] = "Tegelpositie Y in %";
+ Text[ chinese_simplified ] = "ƽÆÌλÖà Y %";
+ Text[ greek ] = "ÈÝóç Y ðëáêáêéïý óå %";
+ Text[ korean ] = "¹ÙµÏÆÇ À§Ä¡Y¸¦ %·Î";
+ Text[ turkish ] = "Döþeme taþý konumu Y (%)";
+};
+
+String SIP_XA_FILLBACKGROUND
+{
+ Text = "Hintergrundfüllung";
+ Text [ ENGLISH ] = "Background fill" ;
+ Text[ english_us ] = "Background fill";
+ Text[ portuguese ] = "Preencher plano de fundo";
+ Text[ russian ] = "Çàïîëíåíèå ôîíà";
+ Text[ greek ] = "ÃÝìéóìá öüíôïõ";
+ Text[ dutch ] = "Achtergrondvulling";
+ Text[ french ] = "Remplissage d'arrière-plan";
+ Text[ spanish ] = "Relleno de fondo";
+ Text[ italian ] = "Riempimento sfondo";
+ Text[ danish ] = "Baggrundsfyld";
+ Text[ swedish ] = "Bakgrundsfyllning";
+ Text[ polish ] = "Wype³nienie t³a";
+ Text[ portuguese_brazilian ] = "Background fill";
+ Text[ japanese ] = "”wŒi‚ð“h‚è‚‚Ԃ·";
+ Text[ korean ] = "¹è°æ ä¿ì±â";
+ Text[ chinese_simplified ] = "³äÌî±³¾°";
+ Text[ chinese_traditional ] = "¥R¶ñ­I´º";
+ Text[ arabic ] = "ÊÚÈÆÉ ÇáÎáÝíÉ";
+ Text[ turkish ] = "Artalan dolgusu";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FILLRESERVED10
+{
+ Text = "Füllung Reserve 10";
+ Text [ ENGLISH ] = "Fill reserved 10" ;
+ Text[ english_us ] = "Fill reserved for 10";
+ Text[ portuguese ] = "Preenchimento de reserva 10";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ çàëèâêà 10";
+ Text[ dutch ] = "Vullingsreserve 10";
+ Text[ french ] = "Réservé pour remplissage 10";
+ Text[ spanish ] = "Relleno reserva 10";
+ Text[ italian ] = "Riservato per riempimento 10";
+ Text[ danish ] = "Fyld reserve 10";
+ Text[ swedish ] = "Fyllning reserverad för 10";
+ Text[ polish ] = "Zarezerwowane wype³nianie 10";
+ Text[ portuguese_brazilian ] = "Fill reserved 10";
+ Text[ japanese ] = "“h‚è‚‚Ԃµ‚Ì—\\”õ 10";
+ Text[ chinese_simplified ] = "³äÌîÔ¤Áô 10";
+ Text[ chinese_traditional ] = "¥R¶ñ¹w¯d 10";
+ Text[ arabic ] = "ÇáÊÚÈÆÉ ãÍÌæÒÉ áÜ 10";
+ Text[ dutch ] = "Vullingsreserve 10";
+ Text[ chinese_simplified ] = "³äÌîÔ¤Áô 10";
+ Text[ greek ] = "ÃÝìéóìá åíáëëáêô. 10";
+ Text[ korean ] = "¿¹ºñ ä¿ì±â10";
+ Text[ turkish ] = "Dolgu - Yedek 10";
+};
+
+String SIP_XA_FILLRESERVED11
+{
+ Text = "Füllung Reserve 11";
+ Text [ ENGLISH ] = "Fill reserved 11" ;
+ Text[ english_us ] = "Fill reserved for 11";
+ Text[ portuguese ] = "Preenchimento de reserva 11";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ çàëèâêà 11";
+ Text[ dutch ] = "Vullingsreserve 11";
+ Text[ french ] = "Réservé pour remplissage 11";
+ Text[ spanish ] = "Relleno reserva 11";
+ Text[ italian ] = "Riservato per riempimento 11";
+ Text[ danish ] = "Fyld reserve 11";
+ Text[ swedish ] = "Fyllning reserverad för 11";
+ Text[ polish ] = "Zarezerwowane wype³nianie 11";
+ Text[ portuguese_brazilian ] = "Fill reserved 11";
+ Text[ japanese ] = "“h‚è‚‚Ԃµ‚Ì—\\”õ 11";
+ Text[ chinese_simplified ] = "³äÌîÔ¤Áô 11";
+ Text[ chinese_traditional ] = "¥R¶ñ¹w¯d 11";
+ Text[ arabic ] = "ÇáÊÚÈÆÉ ãÍÌæÒÉ áÜ 11";
+ Text[ dutch ] = "Vullingsreserve 11";
+ Text[ chinese_simplified ] = "³äÌîÔ¤Áô 11";
+ Text[ greek ] = "ÃÝìéóìá åíáëëáêô. 11";
+ Text[ korean ] = "¿¹ºñ ä¿ì±â 11";
+ Text[ turkish ] = "Dolgu - Yedek 11";
+};
+
+String SIP_XA_FILLRESERVED_LAST
+{
+ Text = "Füllung Reserve 12";
+ Text [ ENGLISH ] = "Fill reserved 12" ;
+ Text[ english_us ] = "Fill reserved for 12";
+ Text[ portuguese ] = "Preenchimento de reserva 12";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ çàëèâêà 12";
+ Text[ dutch ] = "Vullingsreserve 12";
+ Text[ french ] = "Réservé pour remplissage 12";
+ Text[ spanish ] = "Relleno reserva 12";
+ Text[ italian ] = "Riservato per riempimento 12";
+ Text[ danish ] = "Fyld reserve 12";
+ Text[ swedish ] = "Fyllning reserverad för 12";
+ Text[ polish ] = "Zarezerwowane wype³nianie 12";
+ Text[ portuguese_brazilian ] = "Fill reserved 12";
+ Text[ japanese ] = "“h‚è‚‚Ԃµ‚Ì—\\”õ 12";
+ Text[ chinese_simplified ] = "³äÌîÔ¤Áô 12";
+ Text[ chinese_traditional ] = "¥R¶ñ¹w¯d 12";
+ Text[ arabic ] = "ÇáÊÚÈÆÉ ãÍÌæÒÉ áÜ 12";
+ Text[ dutch ] = "Vullingsreserve 12";
+ Text[ chinese_simplified ] = "³äÌîÔ¤Áô 12";
+ Text[ greek ] = "ÃÝìéóìá åíáëëáêô. 12";
+ Text[ korean ] = "¿¹ºñ ä¿ì±â 12";
+ Text[ turkish ] = "Dolgu - Yedek 12";
+};
+
+String SIP_XATTRSET_FILL
+{
+ Text = "Flächenattribute";
+ Text [ ENGLISH ] = "Fill attributes" ;
+ Text[ english_us ] = "Fill attributes";
+ Text[ portuguese ] = "Atributos de preenchimento";
+ Text[ russian ] = "Àòðèáóòû çàëèâêè";
+ Text[ dutch ] = "Vullingsattributen";
+ Text[ french ] = "Attributs de remplissage";
+ Text[ spanish ] = "Atributos de relleno";
+ Text[ italian ] = "Attributi di riempimento";
+ Text[ danish ] = "Fladeattributter";
+ Text[ swedish ] = "Ytattribut";
+ Text[ polish ] = "Atrybuty powierzchni";
+ Text[ portuguese_brazilian ] = "Fill attributes";
+ Text[ japanese ] = "•\\–Ê‚Ì‘®«";
+ Text[ chinese_simplified ] = "³äÌîÊôÐÔ";
+ Text[ chinese_traditional ] = "¥R¶ñÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáÊÚÈÆÉ";
+ Text[ dutch ] = "Vullingsattributen";
+ Text[ chinese_simplified ] = "³äÌîÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò åðéöÜíåéáò";
+ Text[ korean ] = "ä¿ì±â ¼Ó¼º";
+ Text[ turkish ] = "Yüzey öznitelikleri";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FORMTXTSTYLE
+{
+ Text = "Fontworkstil";
+ Text [ ENGLISH ] = "Fontwork style" ;
+ Text[ english_us ] = "Fontwork style";
+ Text[ portuguese ] = "Estilo Fontwork";
+ Text[ russian ] = "Ñòèëü Fontwork";
+ Text[ dutch ] = "Fontwork stijl";
+ Text[ french ] = "Style Fontwork";
+ Text[ spanish ] = "Estilos Fontwork";
+ Text[ italian ] = "Stile Fontwork";
+ Text[ danish ] = "FontWork-type";
+ Text[ swedish ] = "Fontwork-stil";
+ Text[ polish ] = "Styl Fontwork";
+ Text[ portuguese_brazilian ] = "Fontwork style";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸ ½À²Ù";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÑùʽ";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬­·®æ";
+ Text[ arabic ] = "äãØ Fontwork";
+ Text[ dutch ] = "Fontwork stijl";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÑùʽ";
+ Text[ greek ] = "Óôõë Fontwork";
+ Text[ korean ] = "Fontwork À¯Çü";
+ Text[ turkish ] = "Fontwork biçimi";
+};
+
+String SIP_XA_FORMTXTADJUST
+{
+ Text = "Fontworkausrichtung";
+ Text [ ENGLISH ] = "Fontwork justification" ;
+ Text[ english_us ] = "Fontwork alignment";
+ Text[ portuguese ] = "Alinhamento Fontwork";
+ Text[ russian ] = "Âûðàâíèâàíèå Fontwork";
+ Text[ dutch ] = "Fontwork uitlijning";
+ Text[ french ] = "Alignement Fontwork";
+ Text[ spanish ] = "Alineación Fontwork";
+ Text[ italian ] = "Allineamento Fontwork";
+ Text[ danish ] = "FontWork-justering";
+ Text[ swedish ] = "Fontwork-justering";
+ Text[ polish ] = "Wyrównanie Fontwork";
+ Text[ portuguese_brazilian ] = "Fontwork justification";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸‚Ì”z’u";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌå¶ÔÆë";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ Fontwork";
+ Text[ dutch ] = "Fontwork uitlijning";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌå¶ÔÆë";
+ Text[ greek ] = "Óôïß÷éóç Fontwork";
+ Text[ korean ] = "Fontwork ¸ÂÃã";
+ Text[ turkish ] = "Fontwork hizalamasý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FORMTXTDISTANCE
+{
+ Text = "Fontworkabstand";
+ Text [ ENGLISH ] = "Fontwork distance" ;
+ Text[ english_us ] = "FontWork spacing";
+ Text[ portuguese ] = "Distância Fontwork";
+ Text[ russian ] = "Èíòåðâàë Fontwork";
+ Text[ dutch ] = "Fontwork afstand";
+ Text[ french ] = "Écart Fontwork";
+ Text[ spanish ] = "Distancia Fontwork";
+ Text[ italian ] = "Distanza Fontwork";
+ Text[ danish ] = "FontWork-afstand";
+ Text[ swedish ] = "Fontwork-avstånd";
+ Text[ polish ] = "Odstêp Fontwork";
+ Text[ portuguese_brazilian ] = "Fontwork distance";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸‚ÌŠÔŠu";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌå¼ä¸ô";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬¶¡¹j";
+ Text[ arabic ] = "ÊÈÇÚÏ Fontwork";
+ Text[ dutch ] = "Fontwork afstand";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌå¼ä¸ô";
+ Text[ greek ] = "Áðüóôáóç Fontwork";
+ Text[ korean ] = "Fontwork °£°Ý";
+ Text[ turkish ] = "Fontwork aralýðý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FORMTXTSTART
+{
+ Text = "Fontwork Schriftbeginn";
+ Text [ ENGLISH ] = "Fontwork start" ;
+ Text[ english_us ] = "Fontwork font begin";
+ Text[ portuguese ] = "Início Fontwork";
+ Text[ russian ] = "Íà÷àëî øðèôòà Fontwork";
+ Text[ dutch ] = "Fontwork schriftbegin";
+ Text[ french ] = "Début de texte Fontwork";
+ Text[ spanish ] = "Inicio Fontwork";
+ Text[ italian ] = "Inizio carattere Fontwork";
+ Text[ danish ] = "FontWork skriftstart";
+ Text[ swedish ] = "Fontwork skriftbörjan";
+ Text[ polish ] = "Fontwork - pocz¹tek tekstu";
+ Text[ portuguese_brazilian ] = "Fontwork start";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸‚ÌÌ«ÝÄŠJŽn";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåµÄ¿ª¶Ë";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬¶}ºÝ";
+ Text[ arabic ] = "ÈÏÁ Fontwork";
+ Text[ dutch ] = "Fontwork schriftbegin";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåµÄ¿ª¶Ë";
+ Text[ greek ] = "Áñ÷Þ ãñáììáôïóåéñÜò Fontwork";
+ Text[ korean ] = "Fontwork ±Û²Ã ½ÃÀÛ";
+ Text[ turkish ] = "Fontwork: Yazýtipi baþý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FORMTXTMIRROR
+{
+ Text = "Fontwork Spiegelschrift";
+ Text [ ENGLISH ] = "Fontwork mirror" ;
+ Text[ english_us ] = "Fontwork mirror";
+ Text[ portuguese ] = "Reflectir Fontwork";
+ Text[ russian ] = "Çåðêàëüíàÿ ïå÷àòü Fontwork";
+ Text[ dutch ] = "Fontwork spiegelschrift";
+ Text[ french ] = "Reflet Fontwork";
+ Text[ spanish ] = "Reflejo Fontwork";
+ Text[ italian ] = "Carattere rispecchiato Fontwork";
+ Text[ danish ] = "FontWork spejlskrift";
+ Text[ swedish ] = "Fontwork spegelskrift";
+ Text[ polish ] = "Fontwork - odbicie pisma";
+ Text[ portuguese_brazilian ] = "Fontwork mirror";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸‚̂Ђ¾‚蕶Žš";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌå·´Ó³";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬¤Ï¬M";
+ Text[ arabic ] = "ÇáßÊÇÈÉ ÇáãäÚßÓÉ áÜ Fontwork";
+ Text[ dutch ] = "Fontwork spiegelschrift";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌå·´Ó³";
+ Text[ greek ] = "Êáèñåðôéóìüò ãñáöÞò Fontwork";
+ Text[ korean ] = "Fontwork ´ëĪ±Û²Ã";
+ Text[ turkish ] = "Fontwork aynalý yazý";
+};
+
+String SIP_XA_FORMTXTOUTLINE
+{
+ Text = "Fontwork Konturschrift";
+ Text [ ENGLISH ] = "Fontwork contour" ;
+ Text[ english_us ] = "Fontwork outline";
+ Text[ portuguese ] = "Contorno Fontwork";
+ Text[ russian ] = "Êîíòóðíûé øðèôò Fontwork";
+ Text[ dutch ] = "Fontwork contourschrift";
+ Text[ french ] = "Coutour Fontwork";
+ Text[ spanish ] = "Contorno Fontwork";
+ Text[ italian ] = "Carattere contorno Fontwork";
+ Text[ danish ] = "FontWork konturskrift";
+ Text[ swedish ] = "Fontwork konturskrift";
+ Text[ polish ] = "Fontwork - Kontur";
+ Text[ portuguese_brazilian ] = "Fontwork contour";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸ ’†”²‚«";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÂÖÀª";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬½ü¹ø";
+ Text[ arabic ] = "ÇáÎØ ÇáãÍíØ áÜ Fontwork";
+ Text[ dutch ] = "Fontwork contourschrift";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÂÖÀª";
+ Text[ greek ] = "Ðåñßãñáììá Fontwork";
+ Text[ korean ] = "Fontwork À±°û ±Û²Ã";
+ Text[ turkish ] = "Fontwork: Konturlu yazý";
+};
+
+String SIP_XA_FORMTXTSHADOW
+{
+ Text = "Fontworkschatten";
+ Text [ ENGLISH ] = "Fontwork shadow" ;
+ Text[ english_us ] = "Fontwork shadow";
+ Text[ portuguese ] = "Sombreado Fontwork";
+ Text[ russian ] = "Òåíü Fontwork";
+ Text[ dutch ] = "Fontwork schaduw";
+ Text[ french ] = "Ombre Fontwork";
+ Text[ spanish ] = "Sombra Fontwork";
+ Text[ italian ] = "Ombra Fontwork";
+ Text[ danish ] = "FontWork-skygge";
+ Text[ swedish ] = "Fontwork-skugga";
+ Text[ polish ] = "Fontwork - cieñ";
+ Text[ portuguese_brazilian ] = "Fontwork shadow";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸ ‰e•t‚«";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÒõÓ°";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬³±¼v";
+ Text[ arabic ] = "Ùá Fontwork";
+ Text[ dutch ] = "Fontwork schaduw";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÒõÓ°";
+ Text[ greek ] = "ÓêéÜ Fontwork";
+ Text[ korean ] = "Fontwork À½¿µ";
+ Text[ turkish ] = "Fontwork gölgesi";
+};
+
+String SIP_XA_FORMTXTSHDWCOLOR
+{
+ Text = "Fontworkschattenfarbe";
+ Text [ ENGLISH ] = "Color of fontwork color" ;
+ Text[ english_us ] = "Fontwork shadow color";
+ Text[ portuguese ] = "Cor do sombreado Fontwork";
+ Text[ russian ] = "Öâåò òåíè fontwork";
+ Text[ dutch ] = "Fontwork schaduwkleur";
+ Text[ french ] = "Couleur d'ombre Fontwork";
+ Text[ spanish ] = "Color de sombra Fontwork";
+ Text[ italian ] = "Colore ombra Fontwork";
+ Text[ danish ] = "FontWork-skyggefarve";
+ Text[ swedish ] = "Fontwork-skuggningsfärg";
+ Text[ polish ] = "Fontwork - kolor cienia";
+ Text[ portuguese_brazilian ] = "Color of fontwork color";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸ ‰e‚ÌF";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÒõÓ°ÑÕÉ«";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬³±¼vÃC¦â";
+ Text[ arabic ] = "áæä Ùá Fontwork";
+ Text[ dutch ] = "Fontwork schaduwkleur";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÒõÓ°ÑÕÉ«";
+ Text[ greek ] = "×ñþìá óêéÜò Fontwork";
+ Text[ korean ] = "Fontwork À½¿µ»ö";
+ Text[ turkish ] = "Fontwork gölge rengi";
+};
+
+String SIP_XA_FORMTXTSHDWXVAL
+{
+ Text = "Fontworkschattenversatz X";
+ Text [ ENGLISH ] = "Offset of fontwork X" ;
+ Text[ english_us ] = "Fontwork shadow offset X";
+ Text[ portuguese ] = "Offset do sombreado Fontwork X";
+ Text[ russian ] = "Ñìåùåíèå òåíè fontwork X";
+ Text[ dutch ] = "Fontwork schaduwvulling X";
+ Text[ french ] = "Décalage d'ombre Fontwork X";
+ Text[ spanish ] = "Desplaz. sombra de Fontwork X";
+ Text[ italian ] = "Spost. ombra Fontwork X";
+ Text[ danish ] = "FontWork-skyggeforskydning X";
+ Text[ swedish ] = "Fontwork skuggförskjutning X";
+ Text[ polish ] = "Fontwork X - przesuniêcie cienia";
+ Text[ portuguese_brazilian ] = "Offset of fontwork X";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸ ‰e‚̵̾¯Ä X";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÆ«ÒÆ X";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬°¾²¾ X";
+ Text[ arabic ] = "ÅÒÇÍÉ Ùá Fontwork (Ó)";
+ Text[ dutch ] = "Fontwork schaduwvulling X";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÆ«ÒÆ X";
+ Text[ greek ] = "Ìåôáôüðéóç × óêéÜò Fontwork";
+ Text[ korean ] = "Fontwork À½¿µ ¿ÀÇÁ¼Â X";
+ Text[ turkish ] = "Fontwork gölge konumu X";
+};
+
+String SIP_XA_FORMTXTSHDWYVAL
+{
+ Text = "Fontworkschattenversatz Y";
+ Text [ ENGLISH ] = "Offset of fontwork Y" ;
+ Text[ english_us ] = "Fontwork shadow offset Y";
+ Text[ portuguese ] = "Offset do sombreado Fontwork Y";
+ Text[ russian ] = "Ñìåùåíèå òåíè fontwork Y";
+ Text[ dutch ] = "Fontwork schaduwvulling Y";
+ Text[ french ] = "Décalage d'ombre Fontwork Y";
+ Text[ spanish ] = "Desplaz. sombra de Fontwork Y";
+ Text[ italian ] = "Spost. ombra Fontwork Y";
+ Text[ danish ] = "FontWork-skyggeforskydning Y";
+ Text[ swedish ] = "Fontwork skuggförskjutning Y";
+ Text[ polish ] = "Fontwork Y - przesuniêcie cienia";
+ Text[ portuguese_brazilian ] = "Offset of fontwork Y";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸ ‰e‚̵̾¯Ä Y";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÆ«ÒÆ Y";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬³±¼v°¾²¾ Y";
+ Text[ arabic ] = "ÅÒÇÍÉ Ùá Fontwork (Õ)";
+ Text[ dutch ] = "Fontwork schaduwvulling Y";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÆ«ÒÆ Y";
+ Text[ greek ] = "Ìåôáôüðéóç Y óêéÜò Fontwork";
+ Text[ korean ] = "Fontwork À½¿µ ¿ÀÇÁ¼Â Y";
+ Text[ turkish ] = "Fontwork gölge konumu Y";
+};
+
+String SIP_XA_FORMTXTSTDFORM
+{
+ Text = "Fontwork Standardform";
+ Text [ ENGLISH ] = "Fontwork standard form" ;
+ Text[ english_us ] = "Fontwork default form";
+ Text[ portuguese ] = "Forma padrão Fontwork";
+ Text[ russian ] = "Ñòàíäàðòíàÿ ôîðìà Fontwork";
+ Text[ dutch ] = "Fontwork standaardvorm";
+ Text[ french ] = "Forme standard Fontwork";
+ Text[ spanish ] = "Forma estándar Fontwork";
+ Text[ italian ] = "Forma standard Fontwork";
+ Text[ danish ] = "FontWork standardform";
+ Text[ swedish ] = "Fontwork standardform";
+ Text[ polish ] = "Fontwork - standardowe kszta³ty";
+ Text[ portuguese_brazilian ] = "Fontwork standard form";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸ •W€Ì«°Ñ";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌå±ê×¼¸ñʽ";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬¼Ð­ã®æ¦¡";
+ Text[ arabic ] = "ÇÓÊãÇÑÉ Fontwork ÇáÇÝÊÑÇÖíÉ";
+ Text[ dutch ] = "Fontwork standaardvorm";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌå±ê×¼¸ñʽ";
+ Text[ greek ] = "ÐñïåðéëåãìÝíç ìïñöÞ Fontwork";
+ Text[ korean ] = "Fontwork ±âº»Çü";
+ Text[ turkish ] = "Fontwork: Standart biçim";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_XA_FORMTXTHIDEFORM
+{
+ Text = "Fontworkkontur verstecken";
+ Text [ ENGLISH ] = "Hide fontwork contour" ;
+ Text[ english_us ] = "Hide fontwork outline";
+ Text[ portuguese ] = "Ocultar contorno Fontwork";
+ Text[ russian ] = "Ñêðûòü êîíòóð fontwork";
+ Text[ dutch ] = "Fontwork contour verbergen";
+ Text[ french ] = "Masquer le contour Fontwork";
+ Text[ spanish ] = "Ocultar contorno Fontwork";
+ Text[ italian ] = "Nascondi contorno Fontwork";
+ Text[ danish ] = "Skjul FontWork-kontur";
+ Text[ swedish ] = "Dölj fontworkkontur";
+ Text[ polish ] = "Fontwork - ukryj kontur";
+ Text[ portuguese_brazilian ] = "Hide fontwork contour";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸ ’†”²‚«‚ð”ñ•\\Ž¦";
+ Text[ chinese_simplified ] = "Òþ²ØÃÀ¹¤×ÖÌåÂÖÀª";
+ Text[ chinese_traditional ] = "Áô¤J¬ü³N¦r«¬½ü¹ø";
+ Text[ arabic ] = "ÅÎÝÇÁ ÇáÎØ ÇáãÍíØ áÜ Fontwork";
+ Text[ dutch ] = "Fontwork contour verbergen";
+ Text[ chinese_simplified ] = "Òþ²ØÃÀ¹¤×ÖÌåÂÖÀª";
+ Text[ greek ] = "Áðüêñõøç ðåñéãñÜììáôïò Fontwork";
+ Text[ korean ] = "Fontwork À±°û ¼û±â±â";
+ Text[ turkish ] = "Fontwork konturunu gizle";
+};
+
+String SIP_XA_FORMTXTSHDWTRANSP
+{
+ Text = "Fontworkschattentransparenz";
+ Text [ ENGLISH ] = "Transparence of fontwork shadow" ;
+ Text[ english_us ] = "FontWork shadow transparency";
+ Text[ portuguese ] = "Transparência do sombreado Fontwork";
+ Text[ russian ] = "Ïðîçðà÷íîñòü òåíè fontwork";
+ Text[ dutch ] = "Fontwork schaduwtransparantie";
+ Text[ french ] = "Transparence d'ombre Fontwork";
+ Text[ spanish ] = "Transparencia de sombra Fontwork";
+ Text[ italian ] = "Trasparenza ombra Fontwork";
+ Text[ danish ] = "FontWork-skyggetransparens";
+ Text[ swedish ] = "Fontwork-skuggningsgenomskinlighet";
+ Text[ polish ] = "Fontwork - PrzezroczystoϾ cienia";
+ Text[ portuguese_brazilian ] = "Transparence of fontwork shadow";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸ ‰e‚Ì“§‰»«";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÒõӰ͸Ã÷";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬³±¼v³z©ú";
+ Text[ arabic ] = "ÔÝÇÝíÉ Ùá Fontwork";
+ Text[ dutch ] = "Fontwork schaduwtransparantie";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÒõӰ͸Ã÷";
+ Text[ greek ] = "ÄéáöÜíåéá óêéÜò Fontwork";
+ Text[ korean ] = "Fontwork Åõ¸í À½¿µ";
+ Text[ turkish ] = "Fontwork gölge saydamlýðý";
+};
+
+String SIP_XA_FTRESERVED2
+{
+ Text = "Fontwork Reserve 2";
+ Text [ ENGLISH ] = "Fontwork reserved 2" ;
+ Text[ english_us ] = "Fontwork reserved for 2";
+ Text[ portuguese ] = "Fontwork de reserva 2";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé Fontwork 2";
+ Text[ dutch ] = "Fontwork reserve 2";
+ Text[ french ] = "Réservé pour Fontwork 2";
+ Text[ spanish ] = "Fontwork reserva 2";
+ Text[ italian ] = "Riservato per Fontwork 2";
+ Text[ danish ] = "FontWork reserve 2";
+ Text[ swedish ] = "Fontwork reserverad för 2";
+ Text[ polish ] = "Zarezerwowany Fontwork 2";
+ Text[ portuguese_brazilian ] = "Fontwork reserved 2";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸‚Ì—\\”õ 2";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÔ¤Áô 2";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬¹w¯d 2";
+ Text[ arabic ] = "Fontwork ãÍÌæÒ áÜ 2";
+ Text[ dutch ] = "Fontwork reserve 2";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÔ¤Áô 2";
+ Text[ greek ] = "Fontwork åíáëëáêô. 2";
+ Text[ korean ] = "Fontwork ¿¹ºñ 2";
+ Text[ turkish ] = "Fontwork: Yedek 2";
+};
+
+String SIP_XA_FTRESERVED3
+{
+ Text = "Fontwork Reserve 3";
+ Text [ ENGLISH ] = "Fontwork reserved 3" ;
+ Text[ english_us ] = "Fontwork reserved for 3";
+ Text[ portuguese ] = "Fontwork de reserva 3";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé Fontwork 3";
+ Text[ dutch ] = "Fontwork reserve 3";
+ Text[ french ] = "Réservé pour Fontwork 3";
+ Text[ spanish ] = "Fontwork reserva 3";
+ Text[ italian ] = "Riservato per Fontwork 3";
+ Text[ danish ] = "FontWork reserve 3";
+ Text[ swedish ] = "Fontwork reserverad för 3";
+ Text[ polish ] = "Zarezerwowany Fontwork 3";
+ Text[ portuguese_brazilian ] = "Fontwork reserved 3";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸‚Ì—\\”õ 3";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÔ¤Áô 3";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬¹w¯d 3";
+ Text[ arabic ] = "Fontwork ãÍÌæÒ áÜ 3";
+ Text[ dutch ] = "Fontwork reserve 3";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÔ¤Áô 3";
+ Text[ greek ] = "Fontwork åíáëëáêô. 3";
+ Text[ korean ] = "Fontwork ¿¹ºñ 3";
+ Text[ turkish ] = "Fontwork: Yedek 3";
+};
+
+String SIP_XA_FTRESERVED4
+{
+ Text = "Fontwork Reserve 4";
+ Text [ ENGLISH ] = "Fontwork reserved 4" ;
+ Text[ english_us ] = "Fontwork reserved for 4";
+ Text[ portuguese ] = "Fontwork de reserva 4";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé Fontwork 4";
+ Text[ dutch ] = "Fontwork reserve 4";
+ Text[ french ] = "Réservé pour Fontwork 4";
+ Text[ spanish ] = "Fontwork reserva 4";
+ Text[ italian ] = "Riservato per Fontwork 4";
+ Text[ danish ] = "FontWork reserve 4";
+ Text[ swedish ] = "Fontwork reserverad för 4";
+ Text[ polish ] = "Zarezerwowany Fontwork 4";
+ Text[ portuguese_brazilian ] = "Fontwork reserved 4";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸‚Ì—\\”õ 4";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÔ¤Áô 4";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬¹w¯d 4";
+ Text[ arabic ] = "Fontwork ãÍÌæÒ áÜ 4";
+ Text[ dutch ] = "Fontwork reserve 4";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÔ¤Áô 4";
+ Text[ greek ] = "Fontwork åíáëëáêô. 4";
+ Text[ korean ] = "Fontwork ¿¹ºñ 4";
+ Text[ turkish ] = "Fontwork: Yedek 4";
+};
+
+String SIP_XA_FTRESERVED5
+{
+ Text = "Fontwork Reserve 5";
+ Text [ ENGLISH ] = "Fontwork reserved 5" ;
+ Text[ english_us ] = "Fontwork reserved for 5";
+ Text[ portuguese ] = "Fontwork de reserva 5";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé Fontwork 5";
+ Text[ dutch ] = "Fontwork reserve 5";
+ Text[ french ] = "Réservé pour Fontwork 5";
+ Text[ spanish ] = "Fontwork reserva 5";
+ Text[ italian ] = "Riservato per Fontwork 5";
+ Text[ danish ] = "FontWork reserve 5";
+ Text[ swedish ] = "Fontwork reserverad för 5";
+ Text[ polish ] = "Zarezerwowany Fontwork 5";
+ Text[ portuguese_brazilian ] = "Fontwork reserved 5";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸‚Ì—\\”õ 5";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÔ¤Áô 5";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬¹w¯d 5";
+ Text[ arabic ] = "Fontwork ãÍÌæÒ áÜ 5";
+ Text[ dutch ] = "Fontwork reserve 5";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÔ¤Áô 5";
+ Text[ greek ] = "Fontwork åíáëëáêô. 5";
+ Text[ korean ] = "Fontwork ¿¹ºñ 5";
+ Text[ turkish ] = "Fontwork: Yedek 5";
+};
+
+String SIP_XA_FTRESERVED_LAST
+{
+ Text = "Fontwork Reserve 6";
+ Text [ ENGLISH ] = "Fontwork reserved 6" ;
+ Text[ english_us ] = "Fontwork reserved for 6";
+ Text[ portuguese ] = "Fontwork de reserva 6";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé Fontwork 6";
+ Text[ dutch ] = "Fontwork reserve 6";
+ Text[ french ] = "Réservé pour Fontwork 6";
+ Text[ spanish ] = "Fontwork reserva 6";
+ Text[ italian ] = "Riservato per Fontwork 6";
+ Text[ danish ] = "FontWork reserve 6";
+ Text[ swedish ] = "Fontwork reserverad för 6";
+ Text[ polish ] = "Zarezerwowany Fontwork 6";
+ Text[ portuguese_brazilian ] = "Fontwork reserved 6";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸‚Ì—\\”õ 6";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÔ¤Áô 6";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬¹w¯d 6";
+ Text[ arabic ] = "Fontwork ãÍÌæÒ áÜ 6";
+ Text[ dutch ] = "Fontwork reserve 6";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÔ¤Áô 6";
+ Text[ greek ] = "Fontwork åíáëëáêô. 6";
+ Text[ korean ] = "Fontwork ¿¹ºñ 6";
+ Text[ turkish ] = "Fontwork: Yedek 6";
+};
+
+String SIP_XATTRSET_TEXT
+{
+ Text = "Fontworkattribute";
+ Text [ ENGLISH ] = "Fontwork attributes" ;
+ Text[ english_us ] = "Fontwork attributes";
+ Text[ portuguese ] = "Atributos Fontwork";
+ Text[ russian ] = "Àòðèáóòû Fontwork";
+ Text[ dutch ] = "Fontwork attributen";
+ Text[ french ] = "Attributs Fontwork";
+ Text[ spanish ] = "Atributos de Fontwork";
+ Text[ italian ] = "Attributi Fontwork";
+ Text[ danish ] = "FontWork-attributter";
+ Text[ swedish ] = "Fontwork-attribut";
+ Text[ polish ] = "Atrybuty Fontwork";
+ Text[ portuguese_brazilian ] = "Fontwork attributes";
+ Text[ japanese ] = "Ì«ÝÄÜ°¸‚Ì‘®«";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÊôÐÔ";
+ Text[ chinese_traditional ] = "¬ü³N¦r«¬ÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ Fontwork";
+ Text[ dutch ] = "Fontwork attributen";
+ Text[ chinese_simplified ] = "ÃÀ¹¤×ÖÌåÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò Fontwork";
+ Text[ korean ] = "Fontwork ¼Ó¼º";
+ Text[ turkish ] = "Fontwork öznitelikleri";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_SHADOW
+{
+ Text = "Schatten";
+ Text [ ENGLISH ] = "Shadow" ;
+ Text[ english_us ] = "Shadow";
+ Text[ portuguese ] = "Sombreado";
+ Text[ russian ] = "Òåíü";
+ Text[ dutch ] = "Schaduw";
+ Text[ french ] = "Ombre";
+ Text[ spanish ] = "Sombra";
+ Text[ italian ] = "Ombra";
+ Text[ danish ] = "Skygge";
+ Text[ swedish ] = "Skugga";
+ Text[ polish ] = "Cieñ";
+ Text[ portuguese_brazilian ] = "Shadow";
+ Text[ japanese ] = "‰e";
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ chinese_traditional ] = "³±¼v";
+ Text[ arabic ] = "ÇáÙá";
+ Text[ dutch ] = "Schaduw";
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ greek ] = "ÓêéÜ";
+ Text[ korean ] = "À½¿µ";
+ Text[ turkish ] = "Gölge";
+};
+
+String SIP_SA_SHADOWCOLOR
+{
+ Text = "Schattenfarbe";
+ Text [ ENGLISH ] = "Shadow color" ;
+ Text[ english_us ] = "Shadow color";
+ Text[ portuguese ] = "Cor do sombreado";
+ Text[ russian ] = "Öâåò òåíè";
+ Text[ dutch ] = "Schaduwkleur";
+ Text[ french ] = "Couleur d'ombre";
+ Text[ spanish ] = "Color de sombra";
+ Text[ italian ] = "Colore ombra";
+ Text[ danish ] = "Skyggefarve";
+ Text[ swedish ] = "Skuggfärg";
+ Text[ polish ] = "Kolor cienia";
+ Text[ portuguese_brazilian ] = "Shadow color";
+ Text[ japanese ] = "‰e‚ÌF";
+ Text[ chinese_simplified ] = "ÒõÓ°ÑÕÉ«";
+ Text[ chinese_traditional ] = "³±¼vÃC¦â";
+ Text[ arabic ] = "áæä ÇáÙá";
+ Text[ dutch ] = "Schaduwkleur";
+ Text[ chinese_simplified ] = "ÒõÓ°ÑÕÉ«";
+ Text[ greek ] = "×ñþìá óêéÜò";
+ Text[ korean ] = "À½¿µ »ö";
+ Text[ turkish ] = "Gölge rengi";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_SHADOWXDIST
+{
+ Text = "Schattenabstand X";
+ Text [ ENGLISH ] = "Shadow distance X" ;
+ Text[ english_us ] = "Shadow distance X";
+ Text[ portuguese ] = "Distância sombreado X";
+ Text[ russian ] = "Èíòåðâàë òåíè X";
+ Text[ dutch ] = "Schaduwafstand X";
+ Text[ french ] = "Écart d'ombre X";
+ Text[ spanish ] = "Distancia de sombra X";
+ Text[ italian ] = "Distanza ombra X";
+ Text[ danish ] = "Skyggeafstand X";
+ Text[ swedish ] = "Skuggavstånd X";
+ Text[ polish ] = "Odstêp cienia X";
+ Text[ portuguese_brazilian ] = "Shadow distance X";
+ Text[ japanese ] = "‰e‚ÌŠÔŠu X";
+ Text[ chinese_simplified ] = "ÒõÓ°¼ä¸ô X";
+ Text[ chinese_traditional ] = "³±¼v¶¡¹j X";
+ Text[ arabic ] = "ãÓÇÝÉ ÇáÙá (Ó)";
+ Text[ dutch ] = "Schaduwafstand X";
+ Text[ chinese_simplified ] = "ÒõÓ°¼ä¸ô X";
+ Text[ greek ] = "Áðüóôáóç óêéÜò X";
+ Text[ korean ] = "À½¿µ °£°Ý X";
+ Text[ turkish ] = "Gölge aralýðý X";
+};
+
+String SIP_SA_SHADOWYDIST
+{
+ Text = "Schattenabstand Y";
+ Text [ ENGLISH ] = "Shadow distance Y" ;
+ Text[ english_us ] = "Shadow distance Y";
+ Text[ portuguese ] = "Distância sombreado Y";
+ Text[ russian ] = "Èíòåðâàë òåíè Y";
+ Text[ dutch ] = "Schaduwafstand Y";
+ Text[ french ] = "Écart d'ombre Y";
+ Text[ spanish ] = "Distancia de sombra Y";
+ Text[ italian ] = "Distanza ombra Y";
+ Text[ danish ] = "Skyggeafstand Y";
+ Text[ swedish ] = "Skuggavstånd Y";
+ Text[ polish ] = "Odstêp cienia Y";
+ Text[ portuguese_brazilian ] = "Shadow distance Y";
+ Text[ japanese ] = "‰e‚ÌŠÔŠu Y";
+ Text[ chinese_simplified ] = "ÒõÓ°¼ä¸ô Y";
+ Text[ chinese_traditional ] = "³±¼v¶¡¹j Y";
+ Text[ arabic ] = "ãÓÇÝÉ ÇáÙá (Õ)";
+ Text[ dutch ] = "Schaduwafstand Y";
+ Text[ chinese_simplified ] = "ÒõÓ°¼ä¸ô Y";
+ Text[ greek ] = "Áðüóôáóç óêéÜò Y";
+ Text[ korean ] = "À½¿µ °£°Ý Y";
+ Text[ turkish ] = "Gölge aralýðý Y";
+};
+
+String SIP_SA_SHADOWTRANSPARENCE
+{
+ Text = "Schattentransparenz";
+ Text [ ENGLISH ] = "Shadow transparence" ;
+ Text[ english_us ] = "Shadow transparency";
+ Text[ portuguese ] = "Transparência do sombreado";
+ Text[ russian ] = "Ïðîçðà÷íîñòü òåíè";
+ Text[ dutch ] = "Transparantie schaduw";
+ Text[ french ] = "Transparence d'ombre";
+ Text[ spanish ] = "Transparencia de sombra";
+ Text[ italian ] = "Trasparenza ombra";
+ Text[ danish ] = "Skyggetransparens";
+ Text[ swedish ] = "Skuggtransparens";
+ Text[ polish ] = "PrzezroczystoϾ cienia";
+ Text[ portuguese_brazilian ] = "Shadow transparence";
+ Text[ japanese ] = "‰e‚Ì“§–¾«";
+ Text[ chinese_simplified ] = "ÒõӰ͸Ã÷";
+ Text[ chinese_traditional ] = "³±¼v³z©ú";
+ Text[ arabic ] = "ÔÝÇÝíÉ ÇáÙá";
+ Text[ dutch ] = "Transparantie schaduw";
+ Text[ chinese_simplified ] = "ÒõӰ͸Ã÷";
+ Text[ greek ] = "ÄéáöÜíåéá óêéÜò";
+ Text[ korean ] = "Åõ¸í À½¿µ";
+ Text[ turkish ] = "Gölge saydamlýðý";
+};
+
+String SIP_SA_SHADOW3D
+{
+ Text = "3D-Schatten";
+ Text [ ENGLISH ] = "3D-Shadow" ;
+ Text[ english_us ] = "3D shadow";
+ Text[ portuguese ] = "Sombreado 3D";
+ Text[ russian ] = "Òåíü 3-Ì";
+ Text[ dutch ] = "3D-schaduw";
+ Text[ french ] = "Ombre 3D";
+ Text[ spanish ] = "Sombra 3D";
+ Text[ italian ] = "Ombra 3D";
+ Text[ danish ] = "3D-skygge";
+ Text[ swedish ] = "3D-skuggning";
+ Text[ polish ] = "Cieñ 3-W";
+ Text[ portuguese_brazilian ] = "3D-Shadow";
+ Text[ japanese ] = "3D ‰e";
+ Text[ chinese_simplified ] = "3 άÒõÓ°";
+ Text[ chinese_traditional ] = "3ºû³±¼v";
+ Text[ arabic ] = "Ùá ËáÇËí ÇáÃÈÚÇÏ";
+ Text[ dutch ] = "3D-schaduw";
+ Text[ chinese_simplified ] = "3 άÒõÓ°";
+ Text[ greek ] = "ÓêéÜ 3Ä";
+ Text[ korean ] = "3D À½¿µ";
+ Text[ turkish ] = "3B gölge";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_SHADOWPERSP
+{
+ Text = "Perspektivischer Schatten";
+ Text [ ENGLISH ] = "Perspective shadow" ;
+ Text[ english_us ] = "Perspective shadow";
+ Text[ portuguese ] = "Sombreado em perspectiva";
+ Text[ russian ] = "Òåíü â ïåðñïåêòèâå";
+ Text[ dutch ] = "Perspectivische schaduw";
+ Text[ french ] = "Ombre perspective";
+ Text[ spanish ] = "Sombra en perspectiva";
+ Text[ italian ] = "Ombra in prospettiva";
+ Text[ danish ] = "Perspektivisk skygge";
+ Text[ swedish ] = "Perspektivisk skugga";
+ Text[ polish ] = "Cieñ perspektywiczny";
+ Text[ portuguese_brazilian ] = "Perspective shadow";
+ Text[ japanese ] = "‰“‹ß‚ð‚‚¯‚½‰e";
+ Text[ chinese_simplified ] = "Ç°¾°ÒõÓ°";
+ Text[ chinese_traditional ] = "«e´º³±¼v";
+ Text[ arabic ] = "Ùá ãäÙæÑí";
+ Text[ dutch ] = "Perspectivische schaduw";
+ Text[ chinese_simplified ] = "Ç°¾°ÒõÓ°";
+ Text[ greek ] = "ÐñïïðôéêÞ óêéÜ";
+ Text[ korean ] = "¿ø±Ù°¨ÀÖ´Â À½¿µ";
+ Text[ turkish ] = "Perspektifli gölge";
+};
+
+String SIP_SA_SHADOWRESERVE1
+{
+ Text = "Schatten Reserve 1";
+ Text [ ENGLISH ] = "Shadow reserved 1" ;
+ Text[ english_us ] = "Shadow reserved for 1";
+ Text[ portuguese ] = "Sombreado de reserva 1";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ òåíü 1";
+ Text[ dutch ] = "Schaduwreserve 1";
+ Text[ french ] = "Réservé pour ombre 1";
+ Text[ spanish ] = "Sombra reserva 1";
+ Text[ italian ] = "Riservato per ombra 1";
+ Text[ danish ] = "Skygge reserve 1";
+ Text[ swedish ] = "Skugga reserverad för 1";
+ Text[ polish ] = "Zarezerwowany cieñ 1";
+ Text[ portuguese_brazilian ] = "Shadow reserved 1";
+ Text[ japanese ] = "‰e‚Ì—\\”õ 1";
+ Text[ chinese_simplified ] = "ÒõÓ°Ô¤Áô 1";
+ Text[ chinese_traditional ] = "³±¼v¹w¯d 1";
+ Text[ arabic ] = "ÇáÙá ãÍÌæÒ áÜ 1";
+ Text[ dutch ] = "Schaduwreserve 1";
+ Text[ chinese_simplified ] = "ÒõÓ°Ô¤Áô 1";
+ Text[ greek ] = "ÓêéÜ åíáëëáêô. 1";
+ Text[ korean ] = "¿¹ºñ À½¿µ 1";
+ Text[ turkish ] = "Gölge - Yedek 1";
+};
+
+String SIP_SA_SHADOWRESERVE2
+{
+ Text = "Schatten Reserve 2";
+ Text [ ENGLISH ] = "Shadow reserved 2" ;
+ Text[ english_us ] = "Shadow reserved for 2";
+ Text[ portuguese ] = "Sombreado de reserva 2";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ òåíü 2";
+ Text[ dutch ] = "Schaduwreserve 2";
+ Text[ french ] = "Réservé pour ombre 2";
+ Text[ spanish ] = "Sombra reserva 2";
+ Text[ italian ] = "Riservato per ombra 2";
+ Text[ danish ] = "Skygge reserve 1";
+ Text[ swedish ] = "Skugga reserverad för 2";
+ Text[ polish ] = "Zarezerwowany cieñ 2";
+ Text[ portuguese_brazilian ] = "Shadow reserved 2";
+ Text[ japanese ] = "‰e‚Ì—\\”õ 2";
+ Text[ chinese_simplified ] = "ÒõÓ°Ô¤Áô 2";
+ Text[ chinese_traditional ] = "³±¼v¹w¯d 2";
+ Text[ arabic ] = "ÇáÙá ãÍÌæÒ áÜ 2";
+ Text[ dutch ] = "Schaduwreserve 2";
+ Text[ chinese_simplified ] = "ÒõÓ°Ô¤Áô 2";
+ Text[ greek ] = "ÓêéÜ åíáëëáêô. 2";
+ Text[ korean ] = "¿¹ºñ À½¿µ 2";
+ Text[ turkish ] = "Gölge - Yedek 2";
+};
+
+String SIP_SA_SHADOWRESERVE3
+{
+ Text = "Schatten Reserve 3";
+ Text [ ENGLISH ] = "Shadow reserved 3" ;
+ Text[ english_us ] = "Shadow reserved for 3";
+ Text[ portuguese ] = "Sombreado de reserva 3";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ òåíü 3";
+ Text[ dutch ] = "Schaduwreserve 3";
+ Text[ french ] = "Réservé pour ombre 3";
+ Text[ spanish ] = "Sombra reserva 3";
+ Text[ italian ] = "Riservato per ombra 3";
+ Text[ danish ] = "Skygge reserve 1";
+ Text[ swedish ] = "Skugga reserverad för 3";
+ Text[ polish ] = "Zarezerwowany cieñ 3";
+ Text[ portuguese_brazilian ] = "Shadow reserved 3";
+ Text[ japanese ] = "‰e‚Ì—\\”õ 3";
+ Text[ chinese_simplified ] = "ÒõÓ°Ô¤Áô 3";
+ Text[ chinese_traditional ] = "³±¼v¹w¯d 3";
+ Text[ arabic ] = "ÇáÙá ãÍÌæÒ áÜ 3";
+ Text[ dutch ] = "Schaduwreserve 3";
+ Text[ chinese_simplified ] = "ÒõÓ°Ô¤Áô 3";
+ Text[ greek ] = "ÓêéÜ åíáëëáêô. 3";
+ Text[ korean ] = "¿¹ºñ À½¿µ 3";
+ Text[ turkish ] = "Gölge - Yedek 3";
+};
+
+String SIP_SA_SHADOWRESERVE4
+{
+ Text = "Schatten Reserve 4";
+ Text [ ENGLISH ] = "Shadow reserved 4" ;
+ Text[ english_us ] = "Shadow reserved for 4";
+ Text[ portuguese ] = "Sombreado de reserva 4";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ òåíü 4";
+ Text[ dutch ] = "Schaduwreserve 4";
+ Text[ french ] = "Réservé pour ombre 4";
+ Text[ spanish ] = "Sombra reserva 4";
+ Text[ italian ] = "Riservato per ombra 4";
+ Text[ danish ] = "Skygge reserve 1";
+ Text[ swedish ] = "Skugga reserverad för 4";
+ Text[ polish ] = "Zarezerwowany cieñ 4";
+ Text[ portuguese_brazilian ] = "Shadow reserved 4";
+ Text[ japanese ] = "‰e‚Ì—\\”õ 4";
+ Text[ chinese_simplified ] = "ÒõÓ°Ô¤Áô 4";
+ Text[ chinese_traditional ] = "³±¼v¹w¯d 4";
+ Text[ arabic ] = "ÇáÙá ãÍÌæÒ áÜ 4";
+ Text[ dutch ] = "Schaduwreserve 4";
+ Text[ chinese_simplified ] = "ÒõÓ°Ô¤Áô 4";
+ Text[ greek ] = "ÓêéÜ åíáëëáêô. 4";
+ Text[ korean ] = "¿¹ºñ À½¿µ 4";
+ Text[ turkish ] = "Gölge - Yedek 4";
+};
+
+String SIP_SA_SHADOWRESERVE5
+{
+ Text = "Schatten Reserve 5";
+ Text [ ENGLISH ] = "Shadow reserved 5" ;
+ Text[ english_us ] = "Shadow reserved for 5";
+ Text[ portuguese ] = "Sombreado de reserva 5";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ òåíü 5";
+ Text[ dutch ] = "Schaduwreserve 5";
+ Text[ french ] = "Réservé pour ombre 5";
+ Text[ spanish ] = "Sombra reserva 5";
+ Text[ italian ] = "Riservato per ombra 5";
+ Text[ danish ] = "Skygge reserve 1";
+ Text[ swedish ] = "Skugga reserverad för 5";
+ Text[ polish ] = "Zarezerwowany cieñ 5";
+ Text[ portuguese_brazilian ] = "Shadow reserved 5";
+ Text[ japanese ] = "‰e‚Ì—\\”õ 5";
+ Text[ chinese_simplified ] = "ÒõÓ°Ô¤Áô 5";
+ Text[ chinese_traditional ] = "³±¼v¹w¯d 5";
+ Text[ arabic ] = "ÇáÙá ãÍÌæÒ áÜ 5";
+ Text[ dutch ] = "Schaduwreserve 5";
+ Text[ chinese_simplified ] = "ÒõÓ°Ô¤Áô 5";
+ Text[ greek ] = "ÓêéÜ åíáëëáêô. 5";
+ Text[ korean ] = "¿¹ºñ À½¿µ 5";
+ Text[ turkish ] = "Gölge - Yedek 5";
+};
+
+String SIP_SDRATTRSET_SHADOW
+{
+ Text = "Schattenattribute";
+ Text [ ENGLISH ] = "Shadow attributes" ;
+ Text[ english_us ] = "Shadow attributes";
+ Text[ portuguese ] = "Atributos do sombreado";
+ Text[ russian ] = "Àòðèáóòû òåíè";
+ Text[ dutch ] = "Schaduwattributen";
+ Text[ french ] = "Attributs d'ombre";
+ Text[ spanish ] = "Atributos de sombra";
+ Text[ italian ] = "Attributi ombra";
+ Text[ danish ] = "Skyggeattributter";
+ Text[ swedish ] = "Skuggattribut";
+ Text[ polish ] = "Atrybuty cienia";
+ Text[ portuguese_brazilian ] = "Shadow attributes";
+ Text[ japanese ] = "‰e‚Ì‘®«";
+ Text[ chinese_simplified ] = "ÒõÓ°ÊôÐÔ";
+ Text[ chinese_traditional ] = "³±¼vÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáÙá";
+ Text[ dutch ] = "Schaduwattributen";
+ Text[ chinese_simplified ] = "ÒõÓ°ÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò óêéÜò";
+ Text[ korean ] = "À½¿µ ¼Ó¼º";
+ Text[ turkish ] = "Gölge öznitelikleri";
+};
+
+String SIP_SA_CAPTIONTYPE
+{
+ Text = "Legendentyp";
+ Text [ ENGLISH ] = "Type of legend" ;
+ Text[ english_us ] = "Type of legend";
+ Text[ portuguese ] = "Tipo de legenda";
+ Text[ russian ] = "Òèï ëåãåíäû";
+ Text[ dutch ] = "Legendatype";
+ Text[ french ] = "Type de légende";
+ Text[ spanish ] = "Tipo de leyenda";
+ Text[ italian ] = "Tipo di legenda";
+ Text[ danish ] = "Forklaringstype";
+ Text[ swedish ] = "Typ av förklaring";
+ Text[ polish ] = "Typ legendy";
+ Text[ portuguese_brazilian ] = "Type of legend";
+ Text[ japanese ] = "–}—á‚ÌŽí—Þ";
+ Text[ chinese_simplified ] = "ͼÀýÀàÐÍ";
+ Text[ chinese_traditional ] = "¹Ï¨ÒÃþ«¬";
+ Text[ arabic ] = "äæÚ ÇáÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Legendatype";
+ Text[ chinese_simplified ] = "ͼÀýÀàÐÍ";
+ Text[ greek ] = "Ôýðïò åðéãñáöÞò";
+ Text[ korean ] = "¹ü·Ê Çü½Ä";
+ Text[ turkish ] = "Belirtme çizgisi tipi";
+};
+
+String SIP_SA_CAPTIONFIXEDANGLE
+{
+ Text = "Legendenwinkelfixierung";
+ Text [ ENGLISH ] = "Fixed angle of legend" ;
+ Text[ english_us ] = "Fixed legend angle";
+ Text[ portuguese ] = "Fixação do ângulo da legenda";
+ Text[ russian ] = "Ôèêñèðîâàíèå óãëà ëåãåíäû";
+ Text[ dutch ] = "Legendahoek fixeren";
+ Text[ french ] = "Fixation de l'angle de la légende";
+ Text[ spanish ] = "Fijación ángulo de leyenda";
+ Text[ italian ] = "Fissaggio angolo legenda";
+ Text[ danish ] = "Fast forklaringsvinkel";
+ Text[ swedish ] = "Fixerad förklaringsvinkel";
+ Text[ polish ] = "Sta³y k¹t legendy";
+ Text[ portuguese_brazilian ] = "Fixed angle of legend";
+ Text[ japanese ] = "–}—á‚Ì‹÷‚ðŒÅ’è";
+ Text[ chinese_simplified ] = "¹Ì¶¨Í¼Àý½Ç¶È";
+ Text[ chinese_traditional ] = "¹Ï¨Ò¨¤«×©T©w";
+ Text[ arabic ] = "ÊËÈíÊ ÒÇæíÉ ÇáÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Legendahoek fixeren";
+ Text[ chinese_simplified ] = "¹Ì¶¨Í¼Àý½Ç¶È";
+ Text[ greek ] = "ÓôáèåñÞ êëßóç åðéãñáöÞò";
+ Text[ korean ] = "¹ü·Ê °¢µµ °íÁ¤";
+ Text[ turkish ] = "Sabit belirtme çizgisi açýsý";
+};
+
+String SIP_SA_CAPTIONANGLE
+{
+ Text = "Legendenwinkel";
+ Text [ ENGLISH ] = "Angle of legend" ;
+ Text[ english_us ] = "Legend angle";
+ Text[ portuguese ] = "Ângulo da legenda";
+ Text[ russian ] = "Óãîë ëåãåíäû";
+ Text[ dutch ] = "Legendahoek";
+ Text[ french ] = "Angle de légende";
+ Text[ spanish ] = "Angulo de leyenda";
+ Text[ italian ] = "Angolo legenda";
+ Text[ danish ] = "Forklaringsvinkel";
+ Text[ swedish ] = "Förklaringsvinkel";
+ Text[ polish ] = "K¹t legendy";
+ Text[ portuguese_brazilian ] = "Angle of legend";
+ Text[ japanese ] = "–}—á‚Ì‹÷";
+ Text[ chinese_simplified ] = "ͼÀý½Ç¶È";
+ Text[ chinese_traditional ] = "¹Ï¨Ò¨¤«×";
+ Text[ arabic ] = "ÒÇæíÉ ÇáÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Legendahoek";
+ Text[ chinese_simplified ] = "ͼÀý½Ç¶È";
+ Text[ greek ] = "Êëßóç åðéãñáöÞò";
+ Text[ korean ] = "¹ü·Ê °¢µµ";
+ Text[ turkish ] = "Belirtme çizgisi açýsý";
+};
+
+String SIP_SA_CAPTIONGAP
+{
+ Text = "Legendelinienabstand";
+ Text [ ENGLISH ] = "Distance of legend line" ;
+ Text[ english_us ] = "Legend line distance";
+ Text[ portuguese ] = "Distância da linha da legenda";
+ Text[ russian ] = "Ðàññòîÿíèå ìåæäó ëèíèÿìè ëåãåíäû";
+ Text[ dutch ] = "Legenda-lijnafstand";
+ Text[ french ] = "Écart des lignes de légende";
+ Text[ spanish ] = "Distancia línea de leyenda";
+ Text[ italian ] = "Distanza linee legenda";
+ Text[ danish ] = "Forklaringslinjeafstand";
+ Text[ swedish ] = "Förklaringslinje avstånd";
+ Text[ polish ] = "Odstêp linii legendy";
+ Text[ portuguese_brazilian ] = "Distance of legend line";
+ Text[ japanese ] = "–}—á‚ÌüŠÔŠu";
+ Text[ chinese_simplified ] = "ͼÀýÏßÌõ¼ä¸ô";
+ Text[ chinese_traditional ] = "¹Ï¨Ò½u±ø¶¡¹j";
+ Text[ arabic ] = "ÊÈÇÚÏ ÎØ ÇáÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Legenda-lijnafstand";
+ Text[ chinese_simplified ] = "ͼÀýÏßÌõ¼ä¸ô";
+ Text[ greek ] = "Áðüóôáóç ãñáììÞò åðéãñáöÞò";
+ Text[ korean ] = "¹ü·Ê¼± °£°Ý";
+ Text[ turkish ] = "Belirtme çizgisi aralýðý";
+};
+
+String SIP_SA_CAPTIONESCDIR
+{
+ Text = "Legendenaustrittsrichtung";
+ Text [ ENGLISH ] = "Direction of legend exit" ;
+ Text[ english_us ] = "Legend exit alignment";
+ Text[ portuguese ] = "Direcção de saída da legenda";
+ Text[ russian ] = "Íàïðàâëåíèå âûõîäà ëåãåíäû";
+ Text[ dutch ] = "Richting waarin legenda verdwijnt";
+ Text[ french ] = "Direction de la sortie de légende";
+ Text[ spanish ] = "Dirección salida de leyenda";
+ Text[ italian ] = "Direzione uscita legenda";
+ Text[ danish ] = "Forklaringsudgangsretning";
+ Text[ swedish ] = "Förklaringens utgångsriktning";
+ Text[ polish ] = "Kierunek wyjœcia legendy";
+ Text[ portuguese_brazilian ] = "Direction of legend exit";
+ Text[ japanese ] = "–}—á‚ðo‚·•ûŒü";
+ Text[ chinese_simplified ] = "ͼÀýÍ˳ö·½Ïò";
+ Text[ chinese_traditional ] = "¹Ï¨Ò°h¥X¤è¦V";
+ Text[ arabic ] = "ÇÊÌÇå ÎÑæÌ ÇáÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ language_user1 ] = " ";
+ Text[ dutch ] = "Richting waarin legenda verdwijnt";
+ Text[ chinese_simplified ] = "ͼÀýÍ˳ö·½Ïò";
+ Text[ greek ] = "Êáôåýèõíóç åîüäïõ åðéãñáöÞò";
+ Text[ korean ] = "¹ü·Ê ³¡³»±â ¹æÇâ";
+ Text[ turkish ] = "Belirtme çizgisi çýkýþ yönü";
+};
+
+String SIP_SA_CAPTIONESCISREL
+{
+ Text = "Legende relativer Austritt";
+ Text [ ENGLISH ] = "Reative exit of legend" ;
+ Text[ english_us ] = "Relative exit legend";
+ Text[ portuguese ] = "Saída relativa da legenda";
+ Text[ russian ] = "Îòíîñèòåëüíûé âûõîä ëåãåíäû";
+ Text[ dutch ] = "Relatief verdwijnen van legenda";
+ Text[ french ] = "Sortie relative de la légende";
+ Text[ spanish ] = "Salida relativa de leyenda";
+ Text[ italian ] = "Uscita legenda relativa";
+ Text[ danish ] = "Forklaring relativ udgang";
+ Text[ swedish ] = "Förklaring relativ utgång";
+ Text[ polish ] = "Wzglêdne wyjœcie legendy";
+ Text[ portuguese_brazilian ] = "Reative exit of legend";
+ Text[ japanese ] = "‘Š‘ΓI‚É–}—á‚ðo‚·";
+ Text[ chinese_simplified ] = "Ïà¶ÔÍ˳öµÄͼÀý";
+ Text[ chinese_traditional ] = "¬Û¹ï°h¥Xªº¹Ï¨Ò";
+ Text[ arabic ] = "ÇáÎÑæÌ ÇáäÓÈí ááÔÑÍ ÇáÊÝÓíÑí";
+ Text[ language_user1 ] = " ";
+ Text[ dutch ] = "Relatief verdwijnen van legenda";
+ Text[ chinese_simplified ] = "Ïà¶ÔÍ˳öµÄͼÀý";
+ Text[ greek ] = "Ó÷åôéêÞ Ýîïäïò åðéãñáöÞò";
+ Text[ korean ] = "¹ü·Ê »ó´ëÀû ³¡³»±â";
+ Text[ turkish ] = "Belirtme çizgisi: Göreceli çýkýþ";
+};
+
+String SIP_SA_CAPTIONESCREL
+{
+ Text = "Legende relativer Austritt";
+ Text [ ENGLISH ] = "Reative exit of legend" ;
+ Text[ english_us ] = "Relative exit legend";
+ Text[ portuguese ] = "Saída relativa da legenda";
+ Text[ russian ] = "Îòíîñèòåëüíûé âûõîä ëåãåíäû";
+ Text[ dutch ] = "Relatief verdwijnen van legenda";
+ Text[ french ] = "Sortie relative de la légende";
+ Text[ spanish ] = "Salida relativa de leyenda";
+ Text[ italian ] = "Uscita legenda relativa";
+ Text[ danish ] = "Forklaring relativ udgang";
+ Text[ swedish ] = "Förklaring relativ utgång";
+ Text[ polish ] = "Wzglêdne wyjœcie legendy";
+ Text[ portuguese_brazilian ] = "Reative exit of legend";
+ Text[ japanese ] = "–}—á‚Ì‘Š‘ΓIoŒû";
+ Text[ chinese_simplified ] = "Ïà¶ÔÍ˳öµÄͼÀý";
+ Text[ chinese_traditional ] = "Reative exit of legend";
+ Text[ arabic ] = "ÇáÎÑæÌ ÇáäÓÈí ááÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Relatief verdwijnen van legenda";
+ Text[ chinese_simplified ] = "Ïà¶ÔÍ˳öµÄͼÀý";
+ Text[ greek ] = "Ó÷åôéêÞ Ýîïäïò åðéãñáöÞò";
+ Text[ korean ] = "¹ü·Ê »ó´ëÀû ³¡³»±â";
+ Text[ turkish ] = "Belirtme çizgisi: Göreceli çýkýþ";
+};
+
+String SIP_SA_CAPTIONESCABS
+{
+ Text = "Legende absoluter Austritt";
+ Text [ ENGLISH ] = "Absolute exit of legend" ;
+ Text[ english_us ] = "Absolute exit of legend";
+ Text[ portuguese ] = "Saída absoluta da legenda";
+ Text[ russian ] = "Àáñîëþòíûé âûõîä ëåãåíäû";
+ Text[ dutch ] = "Absoluut verdwijnen van legenda";
+ Text[ french ] = "Sortie absolue de la légende";
+ Text[ spanish ] = "Salida absoluta de leyenda";
+ Text[ italian ] = "Uscita legenda assoluta";
+ Text[ danish ] = "Forklaring absolut udgang";
+ Text[ swedish ] = "Förklaring med absolut utgång";
+ Text[ polish ] = "Bezwzglêdne wyjœcie legendy";
+ Text[ portuguese_brazilian ] = "Absolute exit of legend";
+ Text[ japanese ] = "â‘ΓI‚É–}—á‚ðo‚·";
+ Text[ chinese_simplified ] = "¾ø¶ÔÍ˳öµÄͼÀý";
+ Text[ chinese_traditional ] = "Absolute exit of legend";
+ Text[ arabic ] = "ÇáÎÑæÌ ÇáãØáÞ ááÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Absoluut verdwijnen van legenda";
+ Text[ chinese_simplified ] = "¾ø¶ÔÍ˳öµÄͼÀý";
+ Text[ greek ] = "Áðüëõôç Ýîïäïò áðü åðéãñáöÞ";
+ Text[ korean ] = "¹ü·Ê Àý´ëÀû ³¡³»±â";
+ Text[ turkish ] = "Belirtme çizgisi: Mutlak çýkýþ";
+};
+
+String SIP_SA_CAPTIONLINELEN
+{
+ Text = "Legendenlinienlänge";
+ Text [ ENGLISH ] = "Length of legend line" ;
+ Text[ english_us ] = "Legend line length";
+ Text[ portuguese ] = "Comprimento da linha da legenda";
+ Text[ russian ] = "Äëèíà ëèíèè ëåãåíäû";
+ Text[ dutch ] = "Lengte van legendalijnen";
+ Text[ french ] = "Longueur de la ligne de légende";
+ Text[ spanish ] = "Longitud de línea de leyenda";
+ Text[ italian ] = "Lunghezza linee legenda";
+ Text[ danish ] = "Forklaringslinjelængde";
+ Text[ swedish ] = "Förklaringens linjelängd";
+ Text[ polish ] = "D³ugoœæ linii legendy";
+ Text[ portuguese_brazilian ] = "Length of legend line";
+ Text[ japanese ] = "–}—á‚Ìü‚Ì’·‚³";
+ Text[ chinese_simplified ] = "ͼÀýÏßÌõ³¤¶È";
+ Text[ chinese_traditional ] = "¹Ï¨Ò½u±øªø«×";
+ Text[ arabic ] = "Øæá ÎØ ÇáÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Lengte van legendalijnen";
+ Text[ chinese_simplified ] = "ͼÀýÏßÌõ³¤¶È";
+ Text[ greek ] = "ÌÞêïò ãñáììÞò åðéãñáöþí";
+ Text[ korean ] = "¹ü·Ê ¼± ±æÀÌ";
+ Text[ turkish ] = "Belirtme çizgisi uzunluðu";
+};
+
+String SIP_SA_CAPTIONFITLINELEN
+{
+ Text = "Legendenlinienlängenautomatik";
+ Text [ ENGLISH ] = "Automatic length of legend line" ;
+ Text[ english_us ] = "AutoLength of legend lines";
+ Text[ portuguese ] = "Comprimento automático da linha da legenda";
+ Text[ russian ] = "Àâòîäëèíà ëèíèè ëåãåíäû";
+ Text[ dutch ] = "Automatische lengte van legenda";
+ Text[ french ] = "Adaptation automatique de la longueur des lignes de la légende";
+ Text[ spanish ] = "Longitud de línea de leyenda, automático";
+ Text[ italian ] = "Lunghezza automatica delle linee legenda";
+ Text[ danish ] = "Forklaringslinjelængdeautomatik";
+ Text[ swedish ] = "Automatisk förklaringslinjelängd";
+ Text[ polish ] = "Automatyczna d³ugoœæ linii legendy";
+ Text[ portuguese_brazilian ] = "Automatic length of legend line";
+ Text[ japanese ] = "–}—á‚Ìü‚Ì’·‚³Ž©“®’²®";
+ Text[ chinese_simplified ] = "×Ô¶¯Í¼ÀýÏßÌõ³¤¶È";
+ Text[ chinese_traditional ] = "¦Û°Ê¹Ï¨Ò½u±øªø«×";
+ Text[ arabic ] = "ÇáØæá ÇáÊáÞÇÆí áÎØæØ ÇáÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Automatische lengte van legenda";
+ Text[ chinese_simplified ] = "×Ô¶¯Í¼ÀýÏßÌõ³¤¶È";
+ Text[ greek ] = "Áõôüìáôï ìÞêïò ãñáììÞò åðéãñáöþí";
+ Text[ korean ] = "ÀÚµ¿ ¹ü·Ê¼± ±æÀÌ";
+ Text[ turkish ] = "Otomatik belirtme çizgisi uzunluðu";
+};
+
+String SIP_SA_CAPTIONRESERVE1
+{
+ Text = "Legende Reserve 1";
+ Text [ ENGLISH ] = "Legend reserved 1" ;
+ Text[ english_us ] = "Legend reserved for 1";
+ Text[ portuguese ] = "Legenda de reserva 1";
+ Text[ russian ] = "Ëåãåíäà ðåçåðâà 1";
+ Text[ dutch ] = "Legenda reserve 1";
+ Text[ french ] = "Réservé pour la légende 1";
+ Text[ spanish ] = "Leyenda reserva 1";
+ Text[ italian ] = "Riservato per legenda 1";
+ Text[ danish ] = "Forklaring reserve 1";
+ Text[ swedish ] = "Förklaring reserverad för 1";
+ Text[ polish ] = "Zarezerwowana legenda 1";
+ Text[ portuguese_brazilian ] = "Legend reserved 1";
+ Text[ japanese ] = "–}—á‚Ì—\\”õ 1";
+ Text[ chinese_simplified ] = "ͼÀýÔ¤Áô 1";
+ Text[ chinese_traditional ] = "¹Ï¨Ò¹w¯d 1";
+ Text[ arabic ] = "ÊÚáíÞ ÊÝÓíÑí ãÍÌæÒ áÜ 1";
+ Text[ dutch ] = "Legenda reserve 1";
+ Text[ chinese_simplified ] = "ͼÀýÔ¤Áô 1";
+ Text[ greek ] = "ÅðéãñáöÞ åíáëëáêô. 1";
+ Text[ korean ] = "¿¹ºñ ¹ü·Ê 1";
+ Text[ turkish ] = "Belirtme çizgisi - Yedek 1";
+};
+
+String SIP_SA_CAPTIONRESERVE2
+{
+ Text = "Legende Reserve 2";
+ Text [ ENGLISH ] = "Legend reserved 2" ;
+ Text[ english_us ] = "Legend reserved for 2";
+ Text[ portuguese ] = "Legenda de reserva 2";
+ Text[ russian ] = "Ëåãåíäà ðåçåðâà 2";
+ Text[ dutch ] = "Legenda reserve 2";
+ Text[ french ] = "Réservé pour la légende 2";
+ Text[ spanish ] = "Leyenda reserva 2";
+ Text[ italian ] = "Riservato per legenda 2";
+ Text[ danish ] = "Forklaring reserve 2";
+ Text[ swedish ] = "Förklaring reserverad för 2";
+ Text[ polish ] = "Zarezerwowana legenda 2";
+ Text[ portuguese_brazilian ] = "Legend reserved 2";
+ Text[ japanese ] = "–}—á‚Ì—\\”õ 2";
+ Text[ chinese_simplified ] = "ͼÀýÔ¤Áô 2";
+ Text[ chinese_traditional ] = "¹Ï¨Ò¹w¯d 2";
+ Text[ arabic ] = "ÊÚáíÞ ÊÝÓíÑí ãÍÌæÒ áÜ 2";
+ Text[ dutch ] = "Legenda reserve 2";
+ Text[ chinese_simplified ] = "ͼÀýÔ¤Áô 2";
+ Text[ greek ] = "ÅðéãñáöÞ åíáëëáêô. 2";
+ Text[ korean ] = "¿¹ºñ ¹ü·Ê 2";
+ Text[ turkish ] = "Belirtme çizgisi - Yedek 2";
+};
+
+String SIP_SA_CAPTIONRESERVE3
+{
+ Text = "Legende Reserve 3";
+ Text [ ENGLISH ] = "Legend reserved 3" ;
+ Text[ english_us ] = "Legend reserved for 3";
+ Text[ portuguese ] = "Legenda de reserva 3";
+ Text[ russian ] = "Ëåãåíäà ðåçåðâà 3";
+ Text[ dutch ] = "Legenda reserve 3";
+ Text[ french ] = "Réservé pour la légende 3";
+ Text[ spanish ] = "Leyenda reserva 3";
+ Text[ italian ] = "Riservato per legenda 3";
+ Text[ danish ] = "Forklaring reserve 3";
+ Text[ swedish ] = "Förklaring reserverad för 3";
+ Text[ polish ] = "Zarezerwowana legenda 3";
+ Text[ portuguese_brazilian ] = "Legend reserved 3";
+ Text[ japanese ] = "–}—á‚Ì—\\”õ 3";
+ Text[ chinese_simplified ] = "ͼÀýÔ¤Áô 3";
+ Text[ chinese_traditional ] = "¹Ï¨Ò¹w¯d 3";
+ Text[ arabic ] = "ÊÚáíÞ ÊÝÓíÑí ãÍÌæÒ áÜ 3";
+ Text[ dutch ] = "Legenda reserve 3";
+ Text[ chinese_simplified ] = "ͼÀýÔ¤Áô 3";
+ Text[ greek ] = "ÅðéãñáöÞ åíáëëáêô. 3";
+ Text[ korean ] = "¿¹¿Ü ¹ü·Ê 3";
+ Text[ turkish ] = "Belirtme çizgisi - Yedek 3";
+};
+
+String SIP_SA_CAPTIONRESERVE4
+{
+ Text = "Legende Reserve 4";
+ Text [ ENGLISH ] = "Legend reserved 4" ;
+ Text[ english_us ] = "Legend reserved for 4";
+ Text[ portuguese ] = "Legenda de reserva 4";
+ Text[ russian ] = "Ëåãåíäà ðåçåðâà 4";
+ Text[ dutch ] = "Legenda reserve 4";
+ Text[ french ] = "Réservé pour la légende 4";
+ Text[ spanish ] = "Leyenda reserva 4";
+ Text[ italian ] = "Riservato per legenda 4";
+ Text[ danish ] = "Forklaring reserve 4";
+ Text[ swedish ] = "Förklaring reserverad för 4";
+ Text[ polish ] = "Zarezerwowana legenda 4";
+ Text[ portuguese_brazilian ] = "Legend reserved 4";
+ Text[ japanese ] = "–}—á‚Ì—\\”õ 4";
+ Text[ chinese_simplified ] = "ͼÀýÔ¤Áô 4";
+ Text[ chinese_traditional ] = "¹Ï¨Ò¹w¯d 4";
+ Text[ arabic ] = "ÊÚáíÞ ÊÝÓíÑí ãÍÌæÒ áÜ 4";
+ Text[ dutch ] = "Legenda reserve 4";
+ Text[ chinese_simplified ] = "ͼÀýÔ¤Áô 4";
+ Text[ greek ] = "ÅðéãñáöÞ åíáëëáêô. 4";
+ Text[ korean ] = "¿¹¿Ü ¹ü·Ê 4";
+ Text[ turkish ] = "Belirtme çizgisi - Yedek 4";
+};
+
+String SIP_SA_CAPTIONRESERVE5
+{
+ Text = "Legende Reserve 5";
+ Text [ ENGLISH ] = "Legend reserved 5" ;
+ Text[ english_us ] = "Legend reserved 5";
+ Text[ portuguese ] = "Legenda de reserva 5";
+ Text[ russian ] = "Ëåãåíäà ðåçåðâà 5";
+ Text[ dutch ] = "Legenda reserve 5";
+ Text[ french ] = "Réservé pour la légende 5";
+ Text[ spanish ] = "Leyenda reserva 5";
+ Text[ italian ] = "Riservato per legenda 5";
+ Text[ danish ] = "Forklaring reserve 5";
+ Text[ swedish ] = "Förklaring reserverad för 5";
+ Text[ polish ] = "Zarezerwowana legenda 5";
+ Text[ portuguese_brazilian ] = "Legend reserved 5";
+ Text[ japanese ] = "–}—á‚Ì—\\”õ 5";
+ Text[ chinese_simplified ] = "ͼÀýÔ¤Áô 5";
+ Text[ chinese_traditional ] = "¹Ï¨Ò¹w¯d 5";
+ Text[ arabic ] = "ÊÚáíÞ ÊÝÓíÑí ãÍÌæÒ áÜ 5";
+ Text[ dutch ] = "Legenda reserve 5";
+ Text[ chinese_simplified ] = "ͼÀýÔ¤Áô 5";
+ Text[ greek ] = "ÅðéãñáöÞ åíáëëáêô. 5";
+ Text[ korean ] = "¿¹ºñ ¹ü·Ê 5";
+ Text[ turkish ] = "Belirtme çizgisi - Yedek 5";
+};
+
+String SIP_SDRATTRSET_CAPTION
+{
+ Text = "Legendenattribute";
+ Text [ ENGLISH ] = "Attributes of legend" ;
+ Text[ english_us ] = "Legend attributes";
+ Text[ portuguese ] = "Atributos da legenda";
+ Text[ russian ] = "Àòðèáóòû ëåãåíäû";
+ Text[ dutch ] = "Legenda-attributen";
+ Text[ french ] = "Attributs des légendes";
+ Text[ spanish ] = "Atributos de leyenda";
+ Text[ italian ] = "Attributi legenda";
+ Text[ danish ] = "Forklaringsattributter";
+ Text[ swedish ] = "Förklaringsattribut";
+ Text[ polish ] = "Atrybuty legendy";
+ Text[ portuguese_brazilian ] = "Attributes of legend";
+ Text[ japanese ] = "–}—á‚Ì‘®«";
+ Text[ chinese_simplified ] = "ͼÀýÊôÐÔ";
+ Text[ chinese_traditional ] = "¹Ï¨ÒÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáÊÚáíÞ ÇáÊÝÓíÑí";
+ Text[ dutch ] = "Legenda-attributen";
+ Text[ chinese_simplified ] = "ͼÀýÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò åðéãñáöÞò";
+ Text[ korean ] = "¹ü·Ê ¼Ó¼º";
+ Text[ turkish ] = "Belirtme çizgisi öznitelikleri";
+};
+
+String SIP_SDRATTRSET_OUTLINER
+{
+ Text = "Textattribute";
+ Text [ ENGLISH ] = "Text attributes" ;
+ Text[ english_us ] = "Text attributes";
+ Text[ portuguese ] = "Atributos do texto";
+ Text[ russian ] = "Àòðèáóòû òåêñòà";
+ Text[ dutch ] = "Tekstattributen";
+ Text[ french ] = "Attributs de texte";
+ Text[ spanish ] = "Atributos de texto";
+ Text[ italian ] = "Attributi testo";
+ Text[ danish ] = "Tekstattributter";
+ Text[ swedish ] = "Textattribut";
+ Text[ polish ] = "Atrybuty tekstu";
+ Text[ portuguese_brazilian ] = "Text attributes";
+ Text[ japanese ] = "÷½Ä‚Ì‘®«";
+ Text[ chinese_simplified ] = "ÎÄ×ÖÊôÐÔ";
+ Text[ chinese_traditional ] = "¤å¦rÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáäÕ";
+ Text[ dutch ] = "Tekstattributen";
+ Text[ chinese_simplified ] = "ÎÄ×ÖÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò êåéìÝíïõ";
+ Text[ korean ] = "ÅؽºÆ® ¼Ó¼º";
+ Text[ turkish ] = "Metin öznitelikleri";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_ECKENRADIUS
+{
+ Text = "Eckenradius";
+ Text [ ENGLISH ] = "Edge radius" ;
+ Text[ english_us ] = "Corner radius";
+ Text[ portuguese ] = "Raio de ângulo";
+ Text[ russian ] = "Ðàäèóñ çàêðóãëåííîãî óãëà";
+ Text[ dutch ] = "Hoekradius";
+ Text[ french ] = "Rayon d'angle";
+ Text[ spanish ] = "Radio de ángulo";
+ Text[ italian ] = "Raggio d'angolo";
+ Text[ danish ] = "Hjørneradius";
+ Text[ swedish ] = "Hörnradie";
+ Text[ polish ] = "Promieñ krzywizny";
+ Text[ portuguese_brazilian ] = "Edge radius";
+ Text[ japanese ] = "Šp‚Ì”¼Œa";
+ Text[ chinese_simplified ] = "½Ç°ë¾¶";
+ Text[ chinese_traditional ] = "¨¤¥b®|";
+ Text[ arabic ] = "äÕÝ ÞØÑ ÇáÒÇæíÉ";
+ Text[ dutch ] = "Hoekradius";
+ Text[ chinese_simplified ] = "½Ç°ë¾¶";
+ Text[ greek ] = "Áêôßíá ãùíßáò";
+ Text[ korean ] = "¸ð¼­¸® °¢µµ";
+ Text[ turkish ] = "Köþe çapý";
+};
+
+String SIP_SA_TEXT_MINFRAMEHEIGHT
+{
+ Text = "Minimale Rahmenhöhe";
+ Text [ ENGLISH ] = "Minimal frame height" ;
+ Text[ english_us ] = "Minimal frame height";
+ Text[ portuguese ] = "Altura mínima da moldura";
+ Text[ russian ] = "Ìèíèìàëüíàÿ âûñîòà ðàìêè";
+ Text[ dutch ] = "Minimale kaderhoogte";
+ Text[ french ] = "Hauteur de cadre minimale";
+ Text[ spanish ] = "Altura de marco mínima";
+ Text[ italian ] = "Altezza minima cornice";
+ Text[ danish ] = "Minimal rammehøjde";
+ Text[ swedish ] = "Minimal ramhöjd";
+ Text[ polish ] = "Minimalna wysokoϾ ramki";
+ Text[ portuguese_brazilian ] = "Minimal frame height";
+ Text[ japanese ] = "Å’á‚̘g‚Ì‚‚³";
+ Text[ chinese_simplified ] = "×îСµÄ¿ò¸ß¶È";
+ Text[ chinese_traditional ] = "³Ì¤pªº®Ø°ª";
+ Text[ arabic ] = "ÇáÇÑÊÝÇÚ ÇáÃÏäì ááÅØÇÑ";
+ Text[ dutch ] = "Minimale kaderhoogte";
+ Text[ chinese_simplified ] = "×îСµÄ¿ò¸ß¶È";
+ Text[ greek ] = "ÅëÜ÷éóôï ýøïò ðëáéóßïõ";
+ Text[ korean ] = "ÃÖ¼Ò Æ² ³ôÀÌ";
+ Text[ turkish ] = "Asgari çerçeve yüksekliði";
+};
+
+String SIP_SA_TEXT_AUTOGROWHEIGHT
+{
+ Text = "Automatische Höhenanpassung";
+ Text [ ENGLISH ] = "Automatic height adjustment" ;
+ Text[ english_us ] = "AutoHeight adjustment";
+ Text[ portuguese ] = "Ajuste automático da altura";
+ Text[ russian ] = "Àâòîïîäáîð âûñîòû";
+ Text[ dutch ] = "Automatische hoogte-instelling";
+ Text[ french ] = "Adapter la hauteur au texte";
+ Text[ spanish ] = "Ajute de altura automático";
+ Text[ italian ] = "Adattamento altezza automatico";
+ Text[ danish ] = "Automatisk højdejustering";
+ Text[ swedish ] = "Automatisk höjdanpassning";
+ Text[ polish ] = "Automatyczne dopasowanie wysokoœci";
+ Text[ portuguese_brazilian ] = "Automatic height adjustment";
+ Text[ japanese ] = "Ž©“®“I‚É‚‚³’²®";
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷Õû¸ß¶È";
+ Text[ chinese_traditional ] = "¦Û°Ê½ÕÓì°ª«×";
+ Text[ arabic ] = "ãáÇÁãÉ ÇáÇÑÊÝÇÚ ÊáÞÇÆíÇð";
+ Text[ dutch ] = "Automatische hoogte-instelling";
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷Õû¸ß¶È";
+ Text[ greek ] = "Áõôüìáôç ðñïóáñìïãÞ ôïõ ýøïõò";
+ Text[ korean ] = "ÀÚµ¿ ³ôÀÌ Á¶Á¤";
+ Text[ turkish ] = "Otomatik yükseklik ayarý";
+};
+
+String SIP_SA_TEXT_FITTOSIZE
+{
+ Text = "Text an Rahmen anpassen";
+ Text [ ENGLISH ] = "Adjust text to frame" ;
+ Text[ english_us ] = "Fit text to frame";
+ Text[ portuguese ] = "Ajustar texto à moldura";
+ Text[ russian ] = "Âûðîâíÿòü òåêñò ïî ðàìêå";
+ Text[ dutch ] = "Tekst aanpassen aan kader";
+ Text[ french ] = "Adapter le texte au cadre";
+ Text[ spanish ] = "Ajustar texto al marco";
+ Text[ italian ] = "Adatta il testo alla cornice";
+ Text[ danish ] = "Tilpas tekst til ramme";
+ Text[ swedish ] = "Anpassa texten till ramen";
+ Text[ polish ] = "Dopasuj tekst do ramki";
+ Text[ portuguese_brazilian ] = "Adjust text to frame";
+ Text[ japanese ] = "÷½Ä‚ð˜g‚ɇ‚킹‚é";
+ Text[ chinese_simplified ] = "ÎÄ×ֺͿò¶ÔÆë";
+ Text[ chinese_traditional ] = "¤å¦r¹ï»ô®Ø";
+ Text[ arabic ] = "ãáÇÁãÉ ÇáäÕ ááÅØÇÑ";
+ Text[ dutch ] = "Tekst aanpassen aan kader";
+ Text[ chinese_simplified ] = "ÎÄ×ֺͿò¶ÔÆë";
+ Text[ greek ] = "ÐñïóáñìïãÞ êåéìÝíïõ ùò ðñïò ðëáßóéï";
+ Text[ korean ] = "ÅؽºÆ®¸¦ Ʋ¿¡ ¸ÂÃã";
+ Text[ turkish ] = "Metni çerçeveye sýðdýr";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_TEXT_LEFTDIST
+{
+ Text = "Linker Textrahmenabstand";
+ Text [ ENGLISH ] = "Left text frame distance" ;
+ Text[ english_us ] = "Left text frame distance";
+ Text[ portuguese ] = "Distância esquerda à moldura de texto";
+ Text[ russian ] = "Èíòåðâàë ðàìêè òåêñòà ñëåâà";
+ Text[ dutch ] = "Afstand tekst-kader, links";
+ Text[ french ] = "Écart gauche du cadre texte";
+ Text[ spanish ] = "Distancia izquierda al marco de texto";
+ Text[ italian ] = "Distanza sinistra cornice testo";
+ Text[ danish ] = "Venstre tekstboksafstand";
+ Text[ swedish ] = "Vänster textramavstånd";
+ Text[ polish ] = "Lewy odstêp ramki tekstu";
+ Text[ portuguese_brazilian ] = "Left text frame distance";
+ Text[ japanese ] = "÷½Ä˜g‚̶‘¤ŠÔŠu";
+ Text[ chinese_simplified ] = "×ó±ßÎÄ×Ö¿ò¼ä¸ô";
+ Text[ chinese_traditional ] = "¥ª¤å¦r¤è®Ø¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ ÇáÃíÓÑ áÅØÇÑ ÇáäÕ";
+ Text[ dutch ] = "Afstand tekst-kader, links";
+ Text[ chinese_simplified ] = "×ó±ßÎÄ×Ö¿ò¼ä¸ô";
+ Text[ greek ] = "Áðüóôáóç áñéóôåñïý ðëáéóßïõ êåéìÝíïõ";
+ Text[ korean ] = "¿ÞÂÊ ÅؽºÆ® Ʋ °£°Ý";
+ Text[ turkish ] = "Sol metin çerçevesi aralýðý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_TEXT_RIGHTDIST
+{
+ Text = "Rechter Textrahmenabstand";
+ Text [ ENGLISH ] = "Right text frame distance" ;
+ Text[ english_us ] = "Right text frame distance";
+ Text[ portuguese ] = "Distância esquerda à moldura de texto";
+ Text[ russian ] = "Èíòåðâàë ðàìêè òåêñòà ñïðàâà";
+ Text[ dutch ] = "Afstand tekst-kader, rechts";
+ Text[ french ] = "Écart droit du cadre texte";
+ Text[ spanish ] = "Distancia derecha al marco de texto";
+ Text[ italian ] = "Distanza destra cornice testo";
+ Text[ danish ] = "Højre tekstboksafstand";
+ Text[ swedish ] = "Högra textramavståndet";
+ Text[ polish ] = "Prawy odstêp ramki tekstu";
+ Text[ portuguese_brazilian ] = "Right text frame distance";
+ Text[ japanese ] = "÷½Ä˜g‚̉E‘¤ŠÔŠu";
+ Text[ chinese_simplified ] = "ÓÒ±ßÎÄ×Ö¿ò¼ä¸ô";
+ Text[ chinese_traditional ] = "¥k¤å¦r¤è¶ô¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ ÇáÃíãä áÅØÇÑ ÇáäÕ";
+ Text[ dutch ] = "Afstand tekst-kader, rechts";
+ Text[ chinese_simplified ] = "ÓÒ±ßÎÄ×Ö¿ò¼ä¸ô";
+ Text[ greek ] = "ÄåîéÜ áðüóôáóç ðëáéóßïõ êåéìÝíïõ";
+ Text[ korean ] = "¿À¸¥ÂÊ ÅؽºÆ® Ʋ °£°Ý";
+ Text[ turkish ] = "Sað metin çerçevesi aralýðý";
+};
+
+String SIP_SA_TEXT_UPPERDIST
+{
+ Text = "Oberer Textrahmenabstand";
+ Text [ ENGLISH ] = "Upper text frame distance" ;
+ Text[ english_us ] = "Upper text frame distance";
+ Text[ portuguese ] = "Distância superior à moldura de texto";
+ Text[ russian ] = "Èíòåðâàë ðàìêè òåêñòà ñâåðõó";
+ Text[ dutch ] = "Afstand tekst-kader, boven";
+ Text[ french ] = "Écart supérieur du cadre texte";
+ Text[ spanish ] = "Distancia superior al marco de texto";
+ Text[ italian ] = "Distanza superiore cornice testo";
+ Text[ danish ] = "Øvre tekstboksafstand";
+ Text[ swedish ] = "Övre textramens avstånd";
+ Text[ polish ] = "Górny odstêp ramki tekstu";
+ Text[ portuguese_brazilian ] = "Upper text frame distance";
+ Text[ japanese ] = "÷½Ä˜g‚Ìã•”ŠÔŠu";
+ Text[ chinese_simplified ] = "ÉϱßÎÄ×Ö¿ò¼ä¸ô";
+ Text[ chinese_traditional ] = "¤W¤å¦r¤è¶ô¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ ÇáÚáæí áÅØÇÑ ÇáäÕ";
+ Text[ dutch ] = "Afstand tekst-kader, boven";
+ Text[ chinese_simplified ] = "ÉϱßÎÄ×Ö¿ò¼ä¸ô";
+ Text[ greek ] = "¢íù ðåñéèþñéï ðëáéóßïõ êåéìÝíïõ";
+ Text[ korean ] = "À§ÂÊ ÅؽºÆ® Ʋ °£°Ý";
+ Text[ turkish ] = "Üst metin çerçevesi aralýðý";
+};
+
+String SIP_SA_TEXT_LOWERDIST
+{
+ Text = "Unterer Textrahmenabstand";
+ Text [ ENGLISH ] = "Lower text frame distance" ;
+ Text[ english_us ] = "Lower text frame distance";
+ Text[ portuguese ] = "Distância inferior à moldura de texto";
+ Text[ russian ] = "Èíòåðâàë ðàìêè òåêñòà ñíèçó";
+ Text[ dutch ] = "Afstand tekst-kader, beneden";
+ Text[ french ] = "Écart inférieur du cadre texte";
+ Text[ spanish ] = "Distancia inferior al marco de texto";
+ Text[ italian ] = "Distanza inferiore cornice testo";
+ Text[ danish ] = "Nedre tekstboksafstand";
+ Text[ swedish ] = "Nedre textramavstånd";
+ Text[ polish ] = "Dolny odstêp ramki tekstu";
+ Text[ portuguese_brazilian ] = "Lower text frame distance";
+ Text[ japanese ] = "÷½Ä˜g‚̉º•”ŠÔŠu";
+ Text[ chinese_simplified ] = "ϱßÎÄ×Ö¿ò¼ä¸ô";
+ Text[ chinese_traditional ] = "¤U¤å¦r¤è¶ô¶¡¹j";
+ Text[ arabic ] = "ÇáÊÈÇÚÏ ÇáÓÝáí áÅØÇÑ ÇáäÕ";
+ Text[ dutch ] = "Afstand tekst-kader, beneden";
+ Text[ chinese_simplified ] = "ϱßÎÄ×Ö¿ò¼ä¸ô";
+ Text[ greek ] = "Áðüóôáóç êÜôù ðëáéóßïõ êåéìÝíïõ";
+ Text[ korean ] = "¾Æ·¡ÂÊ ÅؽºÆ® Ʋ °£°Ý";
+ Text[ turkish ] = "Alt metin çerçevesi aralýðý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_TEXT_VERTADJUST
+{
+ Text = "Vertikale Textverankerung";
+ Text [ ENGLISH ] = "Vertical text anchor" ;
+ Text[ english_us ] = "Vertical text anchor";
+ Text[ portuguese ] = "Âncora vertical do texto";
+ Text[ russian ] = "Âåðòèêàëüíàÿ ïðèâÿçêà òåêñòà";
+ Text[ dutch ] = "Verticaal tekstanker";
+ Text[ french ] = "Ancrage de texte vertical";
+ Text[ spanish ] = "Anclaje de texto, vertical";
+ Text[ italian ] = "Ancoraggio testo verticale";
+ Text[ danish ] = "Lodret tekstforankring";
+ Text[ swedish ] = "Vertikal textförankring";
+ Text[ polish ] = "Pionowe zakotwiczenie tekstu";
+ Text[ portuguese_brazilian ] = "Vertical text anchor";
+ Text[ japanese ] = "‚’¼‚È÷½Ä ±Ý¶°";
+ Text[ chinese_simplified ] = "´¹Ö±·½ÏòÎÄ×ÖËø¶¨";
+ Text[ chinese_traditional ] = "««ª½¤è¦V¤å¦rÂê©w";
+ Text[ arabic ] = "ÅÑÓÇÁ ÇáäÕ ÑÃÓíÇð";
+ Text[ dutch ] = "Verticaal tekstanker";
+ Text[ chinese_simplified ] = "´¹Ö±·½ÏòÎÄ×ÖËø¶¨";
+ Text[ greek ] = "Êáôáêüñõöç áãêýñùóç êåéìÝíïõ";
+ Text[ korean ] = "¼öÁ÷¹æÇâ ÅؽºÆ® °íÁ¤";
+ Text[ turkish ] = "Dikey metin sabitleme";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_TEXT_MAXFRAMEHEIGHT
+{
+ Text = "Maximale Rahmenhöhe";
+ Text [ ENGLISH ] = "Maximal frame height" ;
+ Text[ english_us ] = "Maximal frame height";
+ Text[ portuguese ] = "Altura máxima da moldura";
+ Text[ russian ] = "Ìàêñèìàëüíàÿ âûñîòà ðàìêè";
+ Text[ dutch ] = "Maximale kaderhoogte";
+ Text[ french ] = "Hauteur de cadre maximale";
+ Text[ spanish ] = "Altura de marco máxima";
+ Text[ italian ] = "Altezza massima cornice";
+ Text[ danish ] = "Maksimal rammehøjde";
+ Text[ swedish ] = "Maximal ramhöjd";
+ Text[ polish ] = "Maksymalna wysokoϾ ramki";
+ Text[ portuguese_brazilian ] = "Maximal frame height";
+ Text[ japanese ] = "Å‚‚̘g‚Ì‚‚³";
+ Text[ chinese_simplified ] = "×î´óµÄ¿ò¸ß¶È";
+ Text[ chinese_traditional ] = "³Ì¤jªº®Ø°ª";
+ Text[ arabic ] = "ÇáÇÑÊÝÇÚ ÇáÃÞÕì ááÅØÇÑ";
+ Text[ dutch ] = "Maximale kaderhoogte";
+ Text[ chinese_simplified ] = "×î´óµÄ¿ò¸ß¶È";
+ Text[ greek ] = "ÌÝãéóôï ýøïò ðëáéóßïõ";
+ Text[ korean ] = "ÃÖ´ë Ʋ ³ôÀÌ";
+ Text[ turkish ] = "Azami çerçeve yüksekliði";
+};
+
+String SIP_SA_TEXT_MINFRAMEWIDTH
+{
+ Text = "Minimale Rahmenbreite";
+ Text [ ENGLISH ] = "Minimal frame width" ;
+ Text[ english_us ] = "Minimal frame width";
+ Text[ portuguese ] = "Largura mínima da moldura";
+ Text[ russian ] = "Ìèíèìàëüíàÿ øèðèíà ðàìêè";
+ Text[ dutch ] = "Minimale kaderbreedte";
+ Text[ french ] = "Largeur de cadre minimale";
+ Text[ spanish ] = "Ancho mínimo de marco";
+ Text[ italian ] = "Larghezza minima cornice";
+ Text[ danish ] = "Minimal rammehøjde";
+ Text[ swedish ] = "Minimal rambredd";
+ Text[ polish ] = "Minimalna szerokoϾ ramki";
+ Text[ portuguese_brazilian ] = "Minimal frame width";
+ Text[ japanese ] = "Å’á‚̘g•";
+ Text[ chinese_simplified ] = "×îСµÄ¿ò¿í¶È";
+ Text[ chinese_traditional ] = "³Ì¤pªº®Ø°ª";
+ Text[ arabic ] = "ÇáÚÑÖ ÇáÃÏäì ááÅØÇÑ";
+ Text[ dutch ] = "Minimale kaderbreedte";
+ Text[ chinese_simplified ] = "×îСµÄ¿ò¿í¶È";
+ Text[ greek ] = "ÅëÜ÷éóôï ðëÜôïò ðëáéóßïõ";
+ Text[ korean ] = "ÃÖ¼Ò Æ² ³Êºñ";
+ Text[ turkish ] = "Asgari çerçeve geniþliði";
+};
+
+String SIP_SA_TEXT_MAXFRAMEWIDTH
+{
+ Text = "Maximale Rahmenbreite";
+ Text [ ENGLISH ] = "Maximal frame width" ;
+ Text[ english_us ] = "Maximal frame width";
+ Text[ portuguese ] = "Largura máxima da moldura";
+ Text[ russian ] = "Ìàêñèìàëüíàÿ øèðèíà ðàìêè";
+ Text[ dutch ] = "Maximale kaderbreedte";
+ Text[ french ] = "Largeur de cadre maximale";
+ Text[ spanish ] = "Ancho máximo de marco";
+ Text[ italian ] = "Larghezza massima cornice";
+ Text[ danish ] = "Maksimal rammebredde";
+ Text[ swedish ] = "Maximal rambredd";
+ Text[ polish ] = "Maksymalna szerokoϾ ramki";
+ Text[ portuguese_brazilian ] = "Maximal frame width";
+ Text[ japanese ] = "Å‚‚̘g•";
+ Text[ chinese_simplified ] = "×î´óµÄ¿ò¿í¶È";
+ Text[ chinese_traditional ] = "³Ì¤pªº®Ø¼e";
+ Text[ arabic ] = "ÇáÚÑÖ ÇáÃÞÕì ááÅØÇÑ";
+ Text[ dutch ] = "Maximale kaderbreedte";
+ Text[ chinese_simplified ] = "×î´óµÄ¿ò¿í¶È";
+ Text[ greek ] = "ÌÝãéóôï ðëÜôïò ðëáéóßïõ";
+ Text[ korean ] = "ÃÖ´ë Ʋ ³Êºñ";
+ Text[ turkish ] = "Azami çerçeve geniþliði";
+};
+
+String SIP_SA_TEXT_AUTOGROWWIDTH
+{
+ Text = "Automatische Breitenanpassung";
+ Text [ ENGLISH ] = "Automatic adjustment of width" ;
+ Text[ english_us ] = "AutoWidth adjustment";
+ Text[ portuguese ] = "Ajuste automático da largura";
+ Text[ russian ] = "Àâòîïîäáîð âûñîòû";
+ Text[ dutch ] = "Automatische breedte-instelling";
+ Text[ french ] = "Adapter la largeur au texte";
+ Text[ spanish ] = "Ajuste automático de ancho";
+ Text[ italian ] = "Adattamento automatico larghezza";
+ Text[ danish ] = "Atomatisk breddejustering";
+ Text[ swedish ] = "Automatisk breddanpassning";
+ Text[ polish ] = "Automatyczne dopasowanie szerokoœci";
+ Text[ portuguese_brazilian ] = "Automatic adjustment of width";
+ Text[ japanese ] = "Ž©“®“I‚É•’²®";
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷Õû¿í¶È";
+ Text[ chinese_traditional ] = "¦Û°Ê½ÕÓì¼e«×";
+ Text[ arabic ] = "ãáÇÁãÉ ÇáÚÑÖ ÊáÞÇÆíÇð";
+ Text[ dutch ] = "Automatische breedte-instelling";
+ Text[ chinese_simplified ] = "×Ô¶¯µ÷Õû¿í¶È";
+ Text[ greek ] = "Áõôüìáôç ðñïóáñìïãÞ ðëÜôïõò";
+ Text[ korean ] = "ÀÚµ¿ ³Êºñ Á¶Á¤";
+ Text[ turkish ] = "Otomatik geniþlik ayarý";
+};
+
+String SIP_SA_TEXT_HORZADJUST
+{
+ Text = "Horizontale Textverankerung";
+ Text [ ENGLISH ] = "Horizontal text anchor" ;
+ Text[ english_us ] = "Horizontal text anchor";
+ Text[ portuguese ] = "Âncora horizontal do texto";
+ Text[ russian ] = "Ãîðèçîíòàëüíàÿ ïðèâÿçêà òåêñòà";
+ Text[ dutch ] = "Horizontaal tekstanker";
+ Text[ french ] = "Ancrage horizontal du texte";
+ Text[ spanish ] = "Anclaje horizontal de texto";
+ Text[ italian ] = "Ancoraggio testo orizzontale";
+ Text[ danish ] = "Vandret tekstforankring";
+ Text[ swedish ] = "Horisontal textförankring";
+ Text[ polish ] = "Poziome zakotwiczenie tekstu";
+ Text[ portuguese_brazilian ] = "Horizontal text anchor";
+ Text[ japanese ] = "…•½‚È÷½Ä ±Ý¶°";
+ Text[ chinese_simplified ] = "ˮƽ·½ÏòÎÄ×ÖËø¶¨";
+ Text[ chinese_traditional ] = "¤ô¥­¤è¦V¤å¦rÂê©w";
+ Text[ arabic ] = "ÅÑÓÇÁ ÇáäÕ ÃÝÞíÇð";
+ Text[ dutch ] = "Horizontaal tekstanker";
+ Text[ chinese_simplified ] = "ˮƽ·½ÏòÎÄ×ÖËø¶¨";
+ Text[ greek ] = "Ïñéæüíôéá áãêýñùóç êåéìÝíïõ";
+ Text[ korean ] = "¼öÆò¹æÇâ ÅؽºÆ® °íÁ¤";
+ Text[ turkish ] = "Yatay metin sabitleme";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_TEXT_ANIKIND
+{
+ Text = "Laufschrift";
+ Text [ ENGLISH ] = "Ticker" ;
+ Text[ english_us ] = "Ticker";
+ Text[ portuguese ] = "Animação de texto";
+ Text[ russian ] = "Áåãóùàÿ ñòðîêà";
+ Text[ dutch ] = "Tekstanimatie";
+ Text[ french ] = "Défilement de texte";
+ Text[ spanish ] = "Animación de texto";
+ Text[ italian ] = "Scritta scorrevole";
+ Text[ danish ] = "Animeret tekst";
+ Text[ swedish ] = "Rullande text";
+ Text[ polish ] = "Przesuwaj¹ce siê pismo";
+ Text[ portuguese_brazilian ] = "Ticker";
+ Text[ japanese ] = "÷½Ä±ÆÒ°¼®Ý";
+ Text[ chinese_simplified ] = "»î¶¯±êÌâ";
+ Text[ chinese_traditional ] = "¬¡°Ê¼ÐÃD";
+ Text[ arabic ] = "ÇáßÊÇÈÉ ÇáãÊÍÑßÉ";
+ Text[ dutch ] = "Tekstanimatie";
+ Text[ chinese_simplified ] = "»î¶¯±êÌâ";
+ Text[ greek ] = "Êéíïýìåíï êåßìåíï";
+ Text[ korean ] = "ƼĿ";
+ Text[ turkish ] = "Hareketli yazý";
+};
+
+String SIP_SA_TEXT_ANIDIRECTION
+{
+ Text = "Laufschriftrichtung";
+ Text [ ENGLISH ] = "Direction of ticker" ;
+ Text[ english_us ] = "Ticker direction";
+ Text[ portuguese ] = "Direcção da animação de texto";
+ Text[ russian ] = "Íàïðàâëåíèå áåãóùåé ñòðîêè";
+ Text[ dutch ] = "Richting tekstanimatie";
+ Text[ french ] = "Sens de défilement du texte ";
+ Text[ spanish ] = "Dirección de la animación de texto";
+ Text[ italian ] = "Direzione scritta scorrevole";
+ Text[ danish ] = "Tekstanimationsretning";
+ Text[ swedish ] = "Rullande textens riktning";
+ Text[ polish ] = "Kierunek przesuwaj¹cego siê pisma";
+ Text[ portuguese_brazilian ] = "Direction of ticker";
+ Text[ japanese ] = "÷½Ä±ÆÒ°¼®Ý‚Ì•ûŒü";
+ Text[ chinese_simplified ] = "»î¶¯±êÌâµÄ·½Ïò";
+ Text[ chinese_traditional ] = "¼ÐÃD¬¡°Êªº¤è¦V";
+ Text[ arabic ] = "ÇÊÌÇå ÇáßÊÇÈÉ ÇáãÊÍÑßÉ";
+ Text[ dutch ] = "Richting tekstanimatie";
+ Text[ chinese_simplified ] = "»î¶¯±êÌâµÄ·½Ïò";
+ Text[ greek ] = "Êáôåýèõíóç êéíïýìåíïõ êåéìÝíïõ";
+ Text[ korean ] = "ƼĿ ¹æÇâ";
+ Text[ turkish ] = "Hareketli yazý yönü";
+};
+
+String SIP_SA_TEXT_ANISTARTINSIDE
+{
+ Text = "Laufschriftstart innerhalb";
+ Text [ ENGLISH ] = "Ticker start inside" ;
+ Text[ english_us ] = "Ticker start inside";
+ Text[ portuguese ] = "Início da animação de texto, dentro";
+ Text[ russian ] = "Íà÷àëî áåãóùåé ñòðîêè âíóòðè";
+ Text[ dutch ] = "Tekstanimatie vanaf midden";
+ Text[ french ] = "Texte visible au départ";
+ Text[ spanish ] = "Inicio de la animación en";
+ Text[ italian ] = "Inizio scritta scorrevole";
+ Text[ danish ] = "Tekstanimationstart indenfor";
+ Text[ swedish ] = "Den rullande texten startar inom";
+ Text[ polish ] = "Pocz¹tek przesuwaj¹cego siê pisma wewn¹trz";
+ Text[ portuguese_brazilian ] = "Ticker start inside";
+ Text[ japanese ] = "˜g“à‚Å÷½Ä ±ÆÒ°¼®Ý‚ÌŽn‚Ü‚è";
+ Text[ chinese_simplified ] = "ÄÚ²¿»î¶¯±êÌâ";
+ Text[ chinese_traditional ] = "¤º³¡¬¡°Ê¼ÐÃD";
+ Text[ arabic ] = "ÈÏÁ ÇáßÊÇÈÉ ÇáãÊÍÑßÉ ÈÇáÏÇÎá";
+ Text[ dutch ] = "Tekstanimatie vanaf midden";
+ Text[ chinese_simplified ] = "ÄÚ²¿»î¶¯±êÌâ";
+ Text[ greek ] = "Åêêßíçóç êéíïýìåíïõ êåéìÝíïõ åóùôåñéêÜ";
+ Text[ korean ] = "ƼĿ ½ÃÀÛ ¹üÀ§";
+ Text[ turkish ] = "Hareketli yazý baþlangýcý:";
+};
+
+String SIP_SA_TEXT_ANISTOPINSIDE
+{
+ Text = "Laufschriftstop innerhalb";
+ Text [ ENGLISH ] = "Ticker stop inside" ;
+ Text[ english_us ] = "Ticker stop inside";
+ Text[ portuguese ] = "Paragem da animação de texto, dentro";
+ Text[ russian ] = "Îñòàíîâêà áåãóùåé ñòðîêè âíóòðè";
+ Text[ dutch ] = "Tekstanimatie stoppen vanaf midden";
+ Text[ french ] = "Texte visible à l'arrêt";
+ Text[ spanish ] = "Parada de animación en";
+ Text[ italian ] = "Fine scritta scorrevole";
+ Text[ danish ] = "Tekstanimationsstop indenfor";
+ Text[ swedish ] = "Den rullande texten stannar inom";
+ Text[ polish ] = "Koniec przesuwaj¹cego siê pisma";
+ Text[ portuguese_brazilian ] = "Ticker stop inside";
+ Text[ japanese ] = "˜g“à‚Å÷½Ä ±ÆÒ°¼®Ý‚ÌI‚í‚è";
+ Text[ chinese_simplified ] = "ÄÚ²¿Í£Ö¹»î¶¯±êÌâ";
+ Text[ chinese_traditional ] = "¤º³¡°±¤î¬¡°Ê¼ÐÃD";
+ Text[ arabic ] = "ÅíÞÇÝ ÇáßÊÇÈÉ ÇáãÊÍÑß ÈÇáÏÇÎá";
+ Text[ dutch ] = "Tekstanimatie stoppen vanaf midden";
+ Text[ chinese_simplified ] = "ÄÚ²¿Í£Ö¹»î¶¯±êÌâ";
+ Text[ greek ] = "ÓôÜóç êéíïýìåíïõ êåéìÝíïõ åóùôåñéêÜ";
+ Text[ korean ] = "ƼĿ Á¤Áö ¹üÀ§";
+ Text[ turkish ] = "Hareketli yazý duraðý:";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_TEXT_ANICOUNT
+{
+ Text = "Laufschriftdurchlaufanzahl";
+ Text [ ENGLISH ] = "Number of Ticker runs" ;
+ Text[ english_us ] = "Number of ticker runs";
+ Text[ portuguese ] = "Quantidade de animações";
+ Text[ russian ] = "Êîëè÷åñòâî ïðîãîíîâ áåãóùåé ñòðîêè";
+ Text[ dutch ] = "Snelheid tekstanimatie";
+ Text[ french ] = "Nombre de défilements";
+ Text[ spanish ] = "Cantidad de animaciones";
+ Text[ italian ] = "Numero passi scritta scorrevole";
+ Text[ danish ] = "Antal tekstanimationsgennemløb";
+ Text[ swedish ] = "Antal varv för rullande text";
+ Text[ polish ] = "Liczba przebiegów przesuwaj¹cego siê pisma";
+ Text[ portuguese_brazilian ] = "Number of Ticker runs";
+ Text[ japanese ] = "÷½Ä±ÆÒ°¼®Ý‚ÌÙ°Ìß”";
+ Text[ chinese_simplified ] = "»î¶¯±êÌâµÄÊýÄ¿";
+ Text[ chinese_traditional ] = "¬¡°Ê¼ÐÃDªº¼Æ¥Ø";
+ Text[ arabic ] = "ÚÏÏ ÇáßÊÇÈÇÊ ÇáãÊÍÑßÉ";
+ Text[ dutch ] = "Snelheid tekstanimatie";
+ Text[ chinese_simplified ] = "»î¶¯±êÌâµÄÊýÄ¿";
+ Text[ greek ] = "Áñéèìüò åðáíáëÞøåùí êéíïýìåíïõ êåéìÝíïõ";
+ Text[ korean ] = "ƼĿ ½ÇÇà ¼ö";
+ Text[ turkish ] = "Hareketli yazý hareket sayýsý";
+};
+
+String SIP_SA_TEXT_ANIDELAY
+{
+ Text = "Laufschriftzeittakt";
+ Text [ ENGLISH ] = "Speed of ticker" ;
+ Text[ english_us ] = "Speed of ticker";
+ Text[ portuguese ] = "Cadência da animação";
+ Text[ russian ] = "Ñêîðîñòü áåãóùåé ñòðîêè";
+ Text[ dutch ] = "Tijdsinsteloing tekstanimatie";
+ Text[ french ] = "Cadence de défilement";
+ Text[ spanish ] = "Incremento de animación";
+ Text[ italian ] = "Velocità scritta scorrevole";
+ Text[ danish ] = "Hastiged tekstanimation";
+ Text[ swedish ] = "Rullande textens hastighet";
+ Text[ polish ] = "Czêstotliwoœæ przesuwaj¹cego siê pisma";
+ Text[ portuguese_brazilian ] = "Speed of ticker";
+ Text[ japanese ] = "÷½Ä±ÆÒ°¼®Ý‚ÌisؽÞÑ";
+ Text[ chinese_simplified ] = "»î¶¯±êÌâµÄËÙ¶È";
+ Text[ chinese_traditional ] = "¬¡°Ê¤å¦rªº³t«×";
+ Text[ arabic ] = "ÓÑÚÉ ÇáßÊÇÈÉ ÇáãÊÍÑßÉ";
+ Text[ dutch ] = "Tijdsinsteloing tekstanimatie";
+ Text[ chinese_simplified ] = "»î¶¯±êÌâµÄËÙ¶È";
+ Text[ greek ] = "Ñõèìüò êéíïýìåíïõ êåéìÝíïõ";
+ Text[ korean ] = "ƼĿ ¼Óµµ";
+ Text[ turkish ] = "Hareketli yazý hýzý";
+};
+
+String SIP_SA_TEXT_ANIAMOUNT
+{
+ Text = "Laufschriftschrittweite";
+ Text [ ENGLISH ] = "Step size of ticker" ;
+ Text[ english_us ] = "Ticker step size";
+ Text[ portuguese ] = "Ritmo da animação";
+ Text[ russian ] = "Øèðèíà øàãà áåãóùåé ñòðîêè";
+ Text[ dutch ] = "Stapgrootte tekstanimatie";
+ Text[ french ] = "Pas de progression du défilement";
+ Text[ spanish ] = "Retardo de la animación";
+ Text[ italian ] = "Passi scritta scorrevole";
+ Text[ danish ] = "Trinvidde tekstanimation";
+ Text[ swedish ] = "Rullande textens stegstorlek";
+ Text[ polish ] = "Inkrement przesuwaj¹cego siê pisma";
+ Text[ portuguese_brazilian ] = "Step size of ticker";
+ Text[ japanese ] = "÷½Ä±ÆÒ°¼®Ý‚̽ïÌߊԊu";
+ Text[ chinese_simplified ] = "»î¶¯±êÌâµÄÿ²½¼ä¸ô";
+ Text[ chinese_traditional ] = "¬¡°Ê¼ÐÃDªº¨C¨B¶¡¹j";
+ Text[ arabic ] = "ÍÌã ÎØæÉ ÇáßÊÇÈÉ ÇáãÊÍÑßÉ";
+ Text[ dutch ] = "Stapgrootte tekstanimatie";
+ Text[ chinese_simplified ] = "»î¶¯±êÌâµÄÿ²½¼ä¸ô";
+ Text[ greek ] = "ÂÞìá êéíïýìåíïõ êåéìÝíïõ";
+ Text[ korean ] = "ƼĿ ´Ü°è Æø";
+ Text[ turkish ] = "Hareketli yazý aralýðý";
+};
+
+String SIP_SA_TEXT_CONTOURFRAME
+{
+ Text = "Konturentextfluss";
+ Text [ ENGLISH ] = "Outline" ;
+ Text[ english_us ] = "Outline text flow";
+ Text[ portuguese ] = "Fluxo texto de contorno";
+ Text[ russian ] = "Êîíòóð";
+ Text[ dutch ] = "Animatie contourtekst";
+ Text[ french ] = "Contours des enchaînements";
+ Text[ spanish ] = "Flujo de texto de contorno";
+ Text[ italian ] = "Flusso testo di contorno";
+ Text[ danish ] = "Konturtekstretning";
+ Text[ swedish ] = "Konturtextflöde";
+ Text[ polish ] = "Konturn";
+ Text[ portuguese_brazilian ] = "Outline";
+ Text[ japanese ] = "—ÖŠs‚É‚»‚Á‚½Ã·½Ä‚Ì—¬‚ê";
+ Text[ chinese_simplified ] = "ÎÄ×ÖÂÖÀªÁ÷";
+ Text[ chinese_traditional ] = "¤å¦r½ü¹ø¬y";
+ Text[ arabic ] = "ÓÑíÇä äÕ ÇáÎØ ÇáßÝÇÝí";
+ Text[ dutch ] = "Animatie contourtekst";
+ Text[ chinese_simplified ] = "ÎÄ×ÖÂÖÀªÁ÷";
+ Text[ greek ] = "ÑïÞ êåéìÝíïõ ðåñéãñÜììáôïò";
+ Text[ korean ] = "À±°û ÅؽºÆ® È帧";
+ Text[ turkish ] = "Konturlu metin akýþý";
+};
+
+String SIP_SA_AUTOSHAPE_ADJUSTMENT
+{
+ Text = "SvDraw Autoshape Adjustment";
+ Text [ ENGLISH ] = "SvDraw Autoshape Adjustment" ;
+};
+
+String SIP_SA_RESERVE14
+{
+ Text = "SvDraw Reserve 14";
+ Text [ ENGLISH ] = "SvDraw Reserve 14" ;
+ Text[ english_us ] = "SvDraw reserved for 14";
+ Text[ portuguese ] = "SvDraw Reserva 14";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé SvDraw 14";
+ Text[ dutch ] = "SvDraw reserve 14";
+ Text[ french ] = "Réservé pour SvDraw 14";
+ Text[ spanish ] = "SvDraw reserva 14";
+ Text[ italian ] = "Riservato per SvDraw 14";
+ Text[ danish ] = "SvDraw reserve 14";
+ Text[ swedish ] = "SvDraw reserverad för 14";
+ Text[ polish ] = "Rezerwa SvDraw 14";
+ Text[ portuguese_brazilian ] = "SvDraw Reserve 14";
+ Text[ japanese ] = "SvDraw‚Ì—\\”õ 14";
+ Text[ chinese_simplified ] = "SvDraw Reserve 14";
+ Text[ chinese_traditional ] = "SvDraw ¹w¯d 14";
+ Text[ arabic ] = "SvDraw ãÍÌæÒ áÜ 14";
+ Text[ dutch ] = "SvDraw reserve 14";
+ Text[ chinese_simplified ] = "SvDraw Reserve 14";
+ Text[ greek ] = "SvDraw åíáëëáêô. 14";
+ Text[ korean ] = "SvDraw ¿¹ºñ 14";
+ Text[ turkish ] = "SvDraw - Yedek 14";
+};
+
+String SIP_SA_RESERVE15
+{
+ Text = "SvDraw Reserve 15";
+ Text [ ENGLISH ] = "SvDraw Reserve 15" ;
+ Text[ english_us ] = "SvDraw reserved for 15";
+ Text[ portuguese ] = "SvDraw Reserva 15";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé SvDraw 15";
+ Text[ dutch ] = "SvDraw reserve 15";
+ Text[ french ] = "Réservé pour SvDraw 15";
+ Text[ spanish ] = "SvDraw reserva 15";
+ Text[ italian ] = "Riservato per SvDraw 15";
+ Text[ danish ] = "SvDraw reserve 15";
+ Text[ swedish ] = "SvDraw reserverad för 15";
+ Text[ polish ] = "Rezerwa SvDraw 15";
+ Text[ portuguese_brazilian ] = "SvDraw Reserve 15";
+ Text[ japanese ] = "SvDraw‚Ì—\\”õ 15";
+ Text[ chinese_simplified ] = "SvDraw Reserve 15";
+ Text[ chinese_traditional ] = "SvDraw ¹w¯d 15";
+ Text[ arabic ] = "SvDraw ãÍÌæÒ áÜ 15";
+ Text[ dutch ] = "SvDraw reserve 15";
+ Text[ chinese_simplified ] = "SvDraw Reserve 15";
+ Text[ greek ] = "SvDraw åíáëëáêô. 15";
+ Text[ korean ] = "SvDraw ¿¹ºñ 15";
+ Text[ turkish ] = "SvDraw - Yedek 15";
+};
+
+String SIP_SA_RESERVE16
+{
+ Text = "SvDraw Reserve 16";
+ Text [ ENGLISH ] = "SvDraw Reserve 16" ;
+ Text[ english_us ] = "SvDraw reserved for 16";
+ Text[ portuguese ] = "SvDraw Reserva 16";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé SvDraw 16";
+ Text[ dutch ] = "SvDraw reserve 16";
+ Text[ french ] = "Réservé pour SvDraw 16";
+ Text[ spanish ] = "SvDraw reserva 16";
+ Text[ italian ] = "Riservato per SvDraw 16";
+ Text[ danish ] = "SvDraw reserve 16";
+ Text[ swedish ] = "SvDraw reserverad för 16";
+ Text[ polish ] = "Rezerwa SvDraw 16";
+ Text[ portuguese_brazilian ] = "SvDraw Reserve 16";
+ Text[ japanese ] = "SvDraw‚Ì—\\”õ 16";
+ Text[ chinese_simplified ] = "SvDraw Reserve 16";
+ Text[ chinese_traditional ] = "SvDraw ¹w¯d 16";
+ Text[ arabic ] = "SvDraw ãÍÌæÒ áÜ 16";
+ Text[ dutch ] = "SvDraw reserve 16";
+ Text[ chinese_simplified ] = "SvDraw Reserve 16";
+ Text[ greek ] = "SvDraw åíáëëáêô. 16";
+ Text[ korean ] = "SvDraw ¿¹ºñ 16";
+ Text[ turkish ] = "SvDraw - Yedek 16";
+};
+
+String SIP_SA_RESERVE17
+{
+ Text = "SvDraw Reserve 17";
+ Text [ ENGLISH ] = "SvDraw Reserve 17" ;
+ Text[ english_us ] = "SvDraw reserved for 17";
+ Text[ portuguese ] = "SvDraw Reserva 17";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé SvDraw 17";
+ Text[ dutch ] = "SvDraw reserve 17";
+ Text[ french ] = "Réservé pour SvDraw 17";
+ Text[ spanish ] = "SvDraw reserva 17";
+ Text[ italian ] = "Riservato per SvDraw 17";
+ Text[ danish ] = "SvDraw reserve 17";
+ Text[ swedish ] = "SvDraw reserverad för 17";
+ Text[ polish ] = "Rezerwa SvDraw 17";
+ Text[ portuguese_brazilian ] = "SvDraw Reserve 17";
+ Text[ japanese ] = "SvDraw‚Ì—\\”õ 17";
+ Text[ chinese_simplified ] = "SvDraw Reserve 17";
+ Text[ chinese_traditional ] = "SvDraw ¹w¯d17";
+ Text[ arabic ] = "SvDraw ãÍÌæÒ áÜ 17";
+ Text[ dutch ] = "SvDraw reserve 17";
+ Text[ chinese_simplified ] = "SvDraw Reserve 17";
+ Text[ greek ] = "SvDraw åíáëëáêô. 17";
+ Text[ korean ] = "SvDraw ¿¹ºñ 17";
+ Text[ turkish ] = "SvDraw - Yedek 17";
+};
+
+String SIP_SA_RESERVE18
+{
+ Text = "SvDraw Reserve 18";
+ Text [ ENGLISH ] = "SvDraw Reserve 18" ;
+ Text[ english_us ] = "SvDraw reserved for 18";
+ Text[ portuguese ] = "SvDraw Reserva 18";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé SvDraw 18";
+ Text[ dutch ] = "SvDraw reserve 18";
+ Text[ french ] = "Réservé pour SvDraw 18";
+ Text[ spanish ] = "SvDraw reserva 18";
+ Text[ italian ] = "Riservato per SvDraw 18";
+ Text[ danish ] = "SvDraw reserve 18";
+ Text[ swedish ] = "SvDraw reserverad för 18";
+ Text[ polish ] = "SvDraw Reserve 18";
+ Text[ portuguese_brazilian ] = "SvDraw Reserve 18";
+ Text[ japanese ] = "SvDraw‚Ì—\\”õ 18";
+ Text[ chinese_simplified ] = "SvDraw Reserve 18";
+ Text[ chinese_traditional ] = "SvDraw ¹w¯d 18";
+ Text[ arabic ] = "SvDraw ãÍÌæÒ áÜ 18";
+ Text[ dutch ] = "SvDraw reserve 18";
+ Text[ chinese_simplified ] = "SvDraw Reserve 18";
+ Text[ greek ] = "SvDraw åíáëëáêô. 18";
+ Text[ korean ] = "SvDraw ¿¹ºñ 18";
+ Text[ turkish ] = "SvDraw - Yedek 18";
+};
+
+String SIP_SA_RESERVE19
+{
+ Text = "SvDraw Reserve 19";
+ Text [ ENGLISH ] = "SvDraw Reserve 19" ;
+ Text[ english_us ] = "SvDraw reserved for 19";
+ Text[ portuguese ] = "SvDraw Reserva 19";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé SvDraw 19";
+ Text[ dutch ] = "SvDraw reserve 19";
+ Text[ french ] = "Réservé pour SvDraw 19";
+ Text[ spanish ] = "SvDraw reserva 19";
+ Text[ italian ] = "Riservato per SvDraw 19";
+ Text[ danish ] = "SvDraw reserve 19";
+ Text[ swedish ] = "SvDraw reserverad för 19";
+ Text[ polish ] = "Rezerwa SvDraw 19";
+ Text[ portuguese_brazilian ] = "SvDraw Reserve 19";
+ Text[ japanese ] = "SvDraw‚Ì—\\”õ 19";
+ Text[ chinese_simplified ] = "SvDraw Reserve 19";
+ Text[ chinese_traditional ] = "SvDraw ¹w¯d 19";
+ Text[ arabic ] = "SvDraw ãÍÌæÒ áÜ 19";
+ Text[ dutch ] = "SvDraw reserve 19";
+ Text[ chinese_simplified ] = "SvDraw Reserve 19";
+ Text[ greek ] = "SvDraw åíáëëáêô. 19";
+ Text[ korean ] = "SvDraw ¿¹ºñ 19";
+ Text[ turkish ] = "SvDraw - Yedek 19";
+};
+
+String SIP_SDRATTRSET_MISC
+{
+ Text = "Diverse Attribute";
+ Text [ ENGLISH ] = "Div. attributes" ;
+ Text[ english_us ] = "Various attributes";
+ Text[ portuguese ] = "Diversos atributos";
+ Text[ russian ] = "Ðàçëè÷íûå àòðèáóòû";
+ Text[ dutch ] = "Diverse attributen";
+ Text[ french ] = "Divers attributs";
+ Text[ spanish ] = "Diversos atributos";
+ Text[ italian ] = "Attributi vari";
+ Text[ danish ] = "Diverse attributter";
+ Text[ swedish ] = "Diverse attribut";
+ Text[ polish ] = "Ró¿ne atrybuty";
+ Text[ portuguese_brazilian ] = "Div. attributes";
+ Text[ japanese ] = "‚¢‚ë‚¢‚ë‚È‘®«";
+ Text[ chinese_simplified ] = "¸÷ÖÖÊôÐÔ";
+ Text[ chinese_traditional ] = "¦UÏúÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ãÎÊáÝÉ";
+ Text[ dutch ] = "Diverse attributen";
+ Text[ chinese_simplified ] = "¸÷ÖÖÊôÐÔ";
+ Text[ greek ] = "ÄéÜöïñåò éäéüôçôåò";
+ Text[ korean ] = "´Ù¾çÇÑ ¼Ó¼º";
+ Text[ turkish ] = "Çeþitli öznitelikler";
+};
+
+String SIP_SA_EDGEKIND
+{
+ Text = "Verbindertyp";
+ Text [ ENGLISH ] = "Type of connector" ;
+ Text[ english_us ] = "Type of connector";
+ Text[ portuguese ] = "Tipo de conector";
+ Text[ russian ] = "Òèï ñîåäèíèòåëüíûõ ëèíèé";
+ Text[ dutch ] = "Type verbinding";
+ Text[ french ] = "Type de connecteur";
+ Text[ spanish ] = "Tipo de conector";
+ Text[ italian ] = "Tipo connettore";
+ Text[ danish ] = "Forbindelsestyper";
+ Text[ swedish ] = "Typ av förbindelse";
+ Text[ polish ] = "Typ ³¹cznika";
+ Text[ portuguese_brazilian ] = "Type of connector";
+ Text[ japanese ] = "ºÈ¸À‚ÌŽí—Þ";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÀàÐÍ";
+ Text[ chinese_traditional ] = "³s±µ²ÅÃþ«¬";
+ Text[ arabic ] = "äæÚ ÇáÑÇÈØ";
+ Text[ dutch ] = "Type verbinding";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÀàÐÍ";
+ Text[ greek ] = "Ôýðïò óýíäåóçò";
+ Text[ korean ] = "¿¬°á¼± À¯Çü";
+ Text[ turkish ] = "Baðlayýcý tipi";
+};
+
+String SIP_SA_EDGENODE1HORZDIST
+{
+ Text = "Horz. Abstand Objekt 1";
+ Text [ ENGLISH ] = "Horz. distance object 1" ;
+ Text[ english_us ] = "Horz. distance object 1";
+ Text[ portuguese ] = "Distância horizontal objecto 1";
+ Text[ russian ] = "Ãîðèçîíò. ðàññòîÿíèå äî îáúåêòà 1";
+ Text[ dutch ] = "Horiz. afstand object 1";
+ Text[ french ] = "Écart horizontal object 1";
+ Text[ spanish ] = "Distancia horz. objeto 1";
+ Text[ italian ] = "Distanza orizz. oggetto 1";
+ Text[ danish ] = "Vandret afstand objekt 1";
+ Text[ swedish ] = "Horisontalt avstånd objekt 1";
+ Text[ polish ] = "Poziomy odstêp do obiektu 1";
+ Text[ portuguese_brazilian ] = "Horz. distance object 1";
+ Text[ japanese ] = "…•½‚ÈŠÔŠu µÌÞ¼Þª¸Ä 1";
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò¼ä¸ô¶ÔÏó 1";
+ Text[ chinese_traditional ] = "¤ô¥­¤è¦V¶¡¹jª«¥ó 1";
+ Text[ arabic ] = "ÊÈÇÚÏ ÃÝÞí Ü ÇáßÇÆä1";
+ Text[ dutch ] = "Horiz. afstand object 1";
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò¼ä¸ô¶ÔÏó 1";
+ Text[ greek ] = "Ïñéæ. áðüóôáóç áíôéêåéìÝíïõ 1";
+ Text[ korean ] = "¼öÆò °£°Ý °³Ã¼ 1";
+ Text[ turkish ] = "Yatay uzaklýk Nesne 1";
+};
+
+String SIP_SA_EDGENODE1VERTDIST
+{
+ Text = "Vert. Abstand Objekt 1";
+ Text [ ENGLISH ] = "Vert. distance object 1" ;
+ Text[ english_us ] = "Vert. distance object 1";
+ Text[ portuguese ] = "Distância vertical objecto 1";
+ Text[ russian ] = "Âåðòèê. ðàññòîÿíèå äî îáúåêòà 1";
+ Text[ dutch ] = "Vert. afstand object 1";
+ Text[ french ] = "Écart vertical objet 1";
+ Text[ spanish ] = "Distancia vert. objeto 1";
+ Text[ italian ] = "Distanza vert. oggetto 1";
+ Text[ danish ] = "Lodret afstand objekt 1";
+ Text[ swedish ] = "Vert. avstånd objekt 1";
+ Text[ polish ] = "Pionowy odstêp do obiektu 1";
+ Text[ portuguese_brazilian ] = "Vert. distance object 1";
+ Text[ japanese ] = "‚’¼‚ÈŠÔŠu µÌÞ¼Þª¸Ä 1";
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò¼ä¸ô¶ÔÏó 1";
+ Text[ chinese_traditional ] = "««ª½¤è¦V¶¡¹jª«¥ó 1";
+ Text[ arabic ] = "ÊÈÇÚÏ ÑÃÓí Ü ÇáßÇÆä 1";
+ Text[ dutch ] = "Vert. afstand object 1";
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò¼ä¸ô¶ÔÏó 1";
+ Text[ greek ] = "Êáôáê. áðüóôáóç áíôéêåéìÝíïõ 1";
+ Text[ korean ] = "¼öÁ÷ °£°Ý °³Ã¼ 1";
+ Text[ turkish ] = "Dikey uzaklýk Nesne 1";
+};
+
+String SIP_SA_EDGENODE2HORZDIST
+{
+ Text = "Horz. Abstand Objekt 2";
+ Text [ ENGLISH ] = "Horz. distance object 2" ;
+ Text[ english_us ] = "Horz. distance object 2";
+ Text[ portuguese ] = "Distância hor. - objecto 2";
+ Text[ russian ] = "Ãîðèçîíò. ðàññòîÿíèå îò îáúåêòà 2";
+ Text[ dutch ] = "Horiz. afstand object 2";
+ Text[ french ] = "Écart horiz. de l'objet 2";
+ Text[ spanish ] = "Distancia hor. objeto 2";
+ Text[ italian ] = "Distanza orizz. oggetto 2";
+ Text[ danish ] = "Vandret afstand objekt 2";
+ Text[ swedish ] = "Horisontalt avstånd objekt 2";
+ Text[ polish ] = "Odstêp poziomy do obiektu 2";
+ Text[ portuguese_brazilian ] = "Horz. distance object 2";
+ Text[ japanese ] = "¶‰E‚ÌŠÔŠu µÌÞ¼Þª¸Ä2";
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò¼ä¸ô¶ÔÏó 2";
+ Text[ chinese_traditional ] = "¤ô¥­¤è¦V¶¡¹jª«¥ó 2";
+ Text[ arabic ] = "ÊÈÇÚÏ ÃÝÞí Ü ÇáßÇÆä 2";
+ Text[ dutch ] = "Horiz. afstand object 2";
+ Text[ chinese_simplified ] = "ˮƽ·½Ïò¼ä¸ô¶ÔÏó 2";
+ Text[ greek ] = "Ïñéæüíôéá áðüóôáóç áíôéêåéìÝíïõ 2";
+ Text[ korean ] = "¼öÆò °£°Ý °³Ã¼ 2";
+ Text[ turkish ] = "Yatay uzaklýk Nesne 2";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_EDGENODE2VERTDIST
+{
+ Text = "Vert. Abstand Objekt 2";
+ Text [ ENGLISH ] = "Vert. distance object 2" ;
+ Text[ english_us ] = "Vert. distance object 2";
+ Text[ portuguese ] = "Distância vert. - objecto 2";
+ Text[ russian ] = "Âåðòèê. ðàññòîÿíèå îò îáúåêòà 2";
+ Text[ dutch ] = "Vert. afstand object 2";
+ Text[ french ] = "Écart vertical objet 2";
+ Text[ spanish ] = "Distancia ver. objeto 2";
+ Text[ italian ] = "Distanza vert. oggetto 2";
+ Text[ danish ] = "Lodr. afstand objekt 2";
+ Text[ swedish ] = "Vert. avstånd objekt 2";
+ Text[ polish ] = "Odstêp poziomy do obiektu 2";
+ Text[ portuguese_brazilian ] = "Vert. distance object 2";
+ Text[ japanese ] = "㉺‚ÌŠÔŠu µÌÞ¼Þª¸Ä2";
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò¼ä¸ô¶ÔÏó 2";
+ Text[ chinese_traditional ] = "««ª½¤è¦Vªº¶¡¹jª«¥ó 2";
+ Text[ arabic ] = "ÊÈÇÚÏ ÑÃÓí Ü ÇáßÇÆä 2";
+ Text[ dutch ] = "Vert. afstand object 2";
+ Text[ chinese_simplified ] = "´¹Ö±·½Ïò¼ä¸ô¶ÔÏó 2";
+ Text[ greek ] = "Êáôáê. áðüóôáóç áíôéêåéìÝíïõ 2";
+ Text[ korean ] = "¼öÁ÷ °£°Ý °³Ã¼ 2";
+ Text[ turkish ] = "Dikey uzaklýk Nesne 2";
+};
+
+String SIP_SA_EDGENODE1GLUEDIST
+{
+ Text = "Klebeabstand Objekt 1";
+ Text [ ENGLISH ] = "Glue distance object 1" ;
+ Text[ english_us ] = "Glue distance object 1";
+ Text[ portuguese ] = "Distância de adesão - objecto 1";
+ Text[ russian ] = "Èíòåðâàë ìåæäó òî÷êàìè ñîåäèíåíèÿ îáúåêòà 1";
+ Text[ dutch ] = "Kleefafstand object 1";
+ Text[ french ] = "Écart d'adhésion objet 1";
+ Text[ spanish ] = "Distancia adhesión objeto 1";
+ Text[ italian ] = "Distanza incollaggio oggetto 1";
+ Text[ danish ] = "Klæbeafstand objekt 1";
+ Text[ swedish ] = "Klisteravstånd objekt 1";
+ Text[ polish ] = "Odstêp klejenia do obiektu 1";
+ Text[ portuguese_brazilian ] = "Glue distance object 1";
+ Text[ japanese ] = "Ú’…ŠÔŠu µÌÞ¼Þª¸Ä1";
+ Text[ chinese_simplified ] = "½ÓÌù¼ä¸ô¶ÔÏó 1";
+ Text[ chinese_traditional ] = "±µÂI¶¡¹jª«¥ó 1";
+ Text[ arabic ] = "ÊÈÇÚÏ ÇááÕÞ Ü ÇáßÇÆä 1";
+ Text[ dutch ] = "Kleefafstand object 1";
+ Text[ chinese_simplified ] = "½ÓÌù¼ä¸ô¶ÔÏó 1";
+ Text[ greek ] = "Áðüóôáóç êüëëçóçò áíôéêåéìÝíïõ 1";
+ Text[ korean ] = "Á¢Âø °£°Ý °³Ã¼ 1";
+ Text[ turkish ] = "Yapýþtýrma aralýðý: Nesne 1";
+};
+
+String SIP_SA_EDGENODE2GLUEDIST
+{
+ Text = "Klebeabstand Objekt 2";
+ Text [ ENGLISH ] = "Glue distance object 2" ;
+ Text[ english_us ] = "Glue distance object 2";
+ Text[ portuguese ] = "Distância de adesão - objecto 2";
+ Text[ russian ] = "Èíòåðâàë ìåæäó òî÷êàìè ñîåäèíåíèÿ îáúåêòà 2";
+ Text[ dutch ] = "Kleefafstand object 2";
+ Text[ french ] = "écart d'adhésion objet 2";
+ Text[ spanish ] = "Distancia adhesión objeto 2";
+ Text[ italian ] = "Distanza incollaggio oggetto 2";
+ Text[ danish ] = "Klæbeafstand objekt 2";
+ Text[ swedish ] = "Klisteravstånd objekt 2";
+ Text[ polish ] = "Odstêp klejenia do obiektu 2";
+ Text[ portuguese_brazilian ] = "Glue distance object 2";
+ Text[ japanese ] = "Ú’…ŠÔŠu µÌÞ¼Þª¸Ä2";
+ Text[ chinese_simplified ] = "½ÓÌù¼ä¸ô¶ÔÏó 2";
+ Text[ chinese_traditional ] = "±µÂI¶¡¹jª«¥ó 2";
+ Text[ arabic ] = "ÊÈÇÚÏ ÇááÕÞ Ü ÇáßÇÆä 2";
+ Text[ dutch ] = "Kleefafstand object 2";
+ Text[ chinese_simplified ] = "½ÓÌù¼ä¸ô¶ÔÏó 2";
+ Text[ greek ] = "Áðüóôáóç êüëëçóçò áíôéêåéìÝíïõ 2";
+ Text[ korean ] = "Á¢Âø °£°Ý °³Ã¼ 2";
+ Text[ turkish ] = "Yapýþtýrma aralýðý: Nesne 2";
+};
+
+String SIP_SA_EDGELINEDELTAANZ
+{
+ Text = "Anzahl verschiebbarer Linien";
+ Text [ ENGLISH ] = "Number of movable lines" ;
+ Text[ english_us ] = "Number of movable lines";
+ Text[ portuguese ] = "Número de linhas móveis";
+ Text[ russian ] = "Êîëè÷åñòâî ïåðåìåùàåìûõ ëèíèé";
+ Text[ dutch ] = "Aantal verplaatsbare lijnen";
+ Text[ french ] = "Nombre de lignes déplaçables";
+ Text[ spanish ] = "Núm. líneas desplazables";
+ Text[ italian ] = "Numro linee mobili";
+ Text[ danish ] = "Antal flyttelige linjer";
+ Text[ swedish ] = "Antal förflyttningsbara linjer";
+ Text[ polish ] = "Liczba linii przesuwalnych";
+ Text[ portuguese_brazilian ] = "Number of movable lines";
+ Text[ japanese ] = "ˆÚ“®‚Å‚«‚éü‚Ì”";
+ Text[ chinese_simplified ] = "¸÷ÖÖÏßÌõÊýÄ¿";
+ Text[ chinese_traditional ] = "¥i²¾°Ê¦¡½u±øªº¼Æ¥Ø";
+ Text[ arabic ] = "ÚÏÏ ÇáÎØæØ ÇáÞÇÈáÉ ááÅÒÇÍÉ";
+ Text[ dutch ] = "Aantal verplaatsbare lijnen";
+ Text[ chinese_simplified ] = "¸÷ÖÖÏßÌõÊýÄ¿";
+ Text[ greek ] = "Áñéèìüò ãñáììþí ðïõ ìåôáêéíïýíôáé";
+ Text[ korean ] = "À̵¿¼± °³¼ö";
+ Text[ turkish ] = "Taþýnabilir çizgi sayýsý";
+};
+
+String SIP_SA_EDGELINE1DELTA
+{
+ Text = "Versatz Linie 1";
+ Text [ ENGLISH ] = "Offset line 1" ;
+ Text[ english_us ] = "Offset line 1";
+ Text[ portuguese ] = "Linha de offset 1";
+ Text[ russian ] = "Ïåðåìåùàåìàÿ ëèíèÿ 1";
+ Text[ dutch ] = "Lijnvulling 1";
+ Text[ french ] = "Ligne de décalage 1";
+ Text[ spanish ] = "Desplazamiento línea 1";
+ Text[ italian ] = "Linea spost. 1";
+ Text[ danish ] = "Forskydningslinje 1";
+ Text[ swedish ] = "Förskjutningslinje 1";
+ Text[ polish ] = "Przesuniêcie linii 1";
+ Text[ portuguese_brazilian ] = "Offset line 1";
+ Text[ japanese ] = "µÌ¾¯Äü1";
+ Text[ chinese_simplified ] = "Æ«ÒÆÏßÌõ 1";
+ Text[ chinese_traditional ] = "°¾²¾½u±ø 1";
+ Text[ arabic ] = "ÎØ ÇáÅÒÇÍÉ 1";
+ Text[ dutch ] = "Lijnvulling 1";
+ Text[ chinese_simplified ] = "Æ«ÒÆÏßÌõ 1";
+ Text[ greek ] = "ÃñáììÞ ìåôáôüðéóçò 1";
+ Text[ korean ] = "¿ÀÇÁ¼Â ¼± 1";
+ Text[ turkish ] = "Kayma çizgisi 1";
+};
+
+String SIP_SA_EDGELINE2DELTA
+{
+ Text = "Versatz Linie 2";
+ Text [ ENGLISH ] = "Offset line 2" ;
+ Text[ english_us ] = "Offset line 2";
+ Text[ portuguese ] = "Linha de offset 2";
+ Text[ russian ] = "Ïåðåìåùàåìàÿ ëèíèÿ 2";
+ Text[ dutch ] = "Lijnvulling 2";
+ Text[ french ] = "Ligne de décalage 2";
+ Text[ spanish ] = "Desplazamiento línea 2";
+ Text[ italian ] = "Linea spost. 2";
+ Text[ danish ] = "Forskydningslinje 2";
+ Text[ swedish ] = "Förskjutningslinje 2";
+ Text[ polish ] = "Przesuniêcie linii 2";
+ Text[ portuguese_brazilian ] = "Offset line 2";
+ Text[ japanese ] = "µÌ¾¯Äü2";
+ Text[ chinese_simplified ] = "Æ«ÒÆÏßÌõ 2";
+ Text[ chinese_traditional ] = "°¾²¾½u±ø 2";
+ Text[ arabic ] = "ÎØ ÇáÅÒÇÍÉ 2";
+ Text[ dutch ] = "Lijnvulling 2";
+ Text[ chinese_simplified ] = "Æ«ÒÆÏßÌõ 2";
+ Text[ greek ] = "ÃñáììÞ ìåôáôüðéóçò 2";
+ Text[ korean ] = "¿ÀÇÁ¼Â ¼± 2";
+ Text[ turkish ] = "Kayma çizgisi 2";
+};
+
+String SIP_SA_EDGELINE3DELTA
+{
+ Text = "Versatz Linie 3";
+ Text [ ENGLISH ] = "Offset line 3" ;
+ Text[ english_us ] = "Offset line 3";
+ Text[ portuguese ] = "Linha de offset 3";
+ Text[ russian ] = "Ïåðåìåùàåìàÿ ëèíèÿ 3";
+ Text[ dutch ] = "Lijnvulling 3";
+ Text[ french ] = "Ligne de décalage 3";
+ Text[ spanish ] = "Desplazamiento línea 3";
+ Text[ italian ] = "Linea spost. 3";
+ Text[ danish ] = "Forskydningslinje 3";
+ Text[ swedish ] = "Förskjutningslinje 3";
+ Text[ polish ] = "Przesuniêcie linii 3";
+ Text[ portuguese_brazilian ] = "Offset line 3";
+ Text[ japanese ] = "µÌ¾¯Äü3";
+ Text[ chinese_simplified ] = "Æ«ÒÆÏßÌõ 3";
+ Text[ chinese_traditional ] = "°¾²¾½u±ø 3";
+ Text[ arabic ] = "ÎØ ÇáÅÒÇÍÉ 3";
+ Text[ dutch ] = "Lijnvulling 3";
+ Text[ chinese_simplified ] = "Æ«ÒÆÏßÌõ 3";
+ Text[ greek ] = "ÃñáììÞ ìåôáôüðéóçò 3";
+ Text[ korean ] = "¿ÀÇÁ¼Â ¼± 3";
+ Text[ turkish ] = "Kayma çizgisi 3";
+};
+
+String SIP_SA_EDGERESERVE02
+{
+ Text = "Verbinder Reserve 2";
+ Text [ ENGLISH ] = "Connector reserved 2" ;
+ Text[ english_us ] = "Connector reserved 2";
+ Text[ portuguese ] = "Conector de reserva 2";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ñîåäèíèòåëüíàÿ ëèíèÿ 2";
+ Text[ dutch ] = "Verbindingsreserve 2";
+ Text[ french ] = "Réservé pour connecteur 2";
+ Text[ spanish ] = "Conector reserva 2";
+ Text[ italian ] = "Riservato per connettore 2";
+ Text[ danish ] = "Forbindelse reserve 2";
+ Text[ swedish ] = "Förbindelse reserverad för 2";
+ Text[ polish ] = "Zarezerwowany ³¹cznik 2";
+ Text[ portuguese_brazilian ] = "Connector reserved 2";
+ Text[ japanese ] = "ºÈ¸À —\\”õ2";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 2";
+ Text[ chinese_traditional ] = "³s±µ²Å¹w¯d 2";
+ Text[ arabic ] = "ÇáÑÇÈØ ãÍÌæÒ áÜ 2";
+ Text[ dutch ] = "Verbindingsreserve 2";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 2";
+ Text[ greek ] = "ÓõíäÝóåéò åíáëëáêô. 2";
+ Text[ korean ] = "¿¹ºñ ¿¬°á¼± 2";
+ Text[ turkish ] = "Baðlayýcý - Yedek 2";
+};
+
+String SIP_SA_EDGERESERVE03
+{
+ Text = "Verbinder Reserve 3";
+ Text [ ENGLISH ] = "Connector reserved 3" ;
+ Text[ english_us ] = "Connector reserved 3";
+ Text[ portuguese ] = "Conector de reserva 3";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ñîåäèíèòåëüíàÿ ëèíèÿ 3";
+ Text[ dutch ] = "Verbindingsreserve 3";
+ Text[ french ] = "Réservé pour connecteur 3";
+ Text[ spanish ] = "Conector reserva 3";
+ Text[ italian ] = "Riservato per connettore 3";
+ Text[ danish ] = "Forbindelse reserve 3";
+ Text[ swedish ] = "Förbindelse reserverad för 3";
+ Text[ polish ] = "Zarezerwowany ³¹cznik 3";
+ Text[ portuguese_brazilian ] = "Connector reserved 3";
+ Text[ japanese ] = "ºÈ¸À —\\”õ3";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 3";
+ Text[ chinese_traditional ] = "³s±µ²Å¹w¯d 3";
+ Text[ arabic ] = "ÇáÑÇÈØ ãÍÌæÒ áÜ 3";
+ Text[ dutch ] = "Verbindingsreserve 3";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 3";
+ Text[ greek ] = "ÓõíäÝóåéò åíáëëáêô. 3";
+ Text[ korean ] = "¿¹ºñ ¿¬°á¼± 3";
+ Text[ turkish ] = "Baðlayýcý - Yedek 3";
+};
+
+String SIP_SA_EDGERESERVE04
+{
+ Text = "Verbinder Reserve 4";
+ Text [ ENGLISH ] = "Connector reserved 4" ;
+ Text[ english_us ] = "Connector reserved 4";
+ Text[ portuguese ] = "Conector de reserva 4";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ñîåäèíèòåëüíàÿ ëèíèÿ 4";
+ Text[ dutch ] = "Verbindingsreserve 4";
+ Text[ french ] = "Réservé pour connecteur 4";
+ Text[ spanish ] = "Conector reserva 4";
+ Text[ italian ] = "Riservato per connettore 4";
+ Text[ danish ] = "Forbindelse reserve 4";
+ Text[ swedish ] = "Förbindelse reserverad för 4";
+ Text[ polish ] = "Zarezerwowany ³¹cznik 4";
+ Text[ portuguese_brazilian ] = "Connector reserved 4";
+ Text[ japanese ] = "ºÈ¸À —\\”õ4";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 4";
+ Text[ chinese_traditional ] = "³s±µ²Å¹w¯d 4";
+ Text[ arabic ] = "ÇáÑÇÈØ ãÍÌæÒ áÜ 4";
+ Text[ dutch ] = "Verbindingsreserve 4";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 4";
+ Text[ greek ] = "ÓõíäÝóåéò åíáëëáêô. 4";
+ Text[ korean ] = "¿¹ºñ ¿¬°á¼± 4";
+ Text[ turkish ] = "Baðlayýcý - Yedek 4";
+};
+
+String SIP_SA_EDGERESERVE05
+{
+ Text = "Verbinder Reserve 5";
+ Text [ ENGLISH ] = "Connector reserved 5" ;
+ Text[ english_us ] = "Connector reserved 5";
+ Text[ portuguese ] = "Conector de reserva 5";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ñîåäèíèòåëüíàÿ ëèíèÿ 5";
+ Text[ dutch ] = "Verbindingsreserve 5";
+ Text[ french ] = "Réservé pour connecteur 5";
+ Text[ spanish ] = "Conector reserva 5";
+ Text[ italian ] = "Riservato per connettore 5";
+ Text[ danish ] = "Forbindelse reserve 5";
+ Text[ swedish ] = "Förbindelse reserverad för 5";
+ Text[ polish ] = "Zarezerwowany ³¹cznik 5";
+ Text[ portuguese_brazilian ] = "Connector reserved 5";
+ Text[ japanese ] = "ºÈ¸À —\\”õ5";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 5";
+ Text[ chinese_traditional ] = "³s±µ²Å¹w¯d 5";
+ Text[ arabic ] = "ÇáÑÇÈØ ãÍÌæÒ áÜ 5";
+ Text[ dutch ] = "Verbindingsreserve 5";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 5";
+ Text[ greek ] = "ÓõíäÝóåéò åíáëëáêô. 5";
+ Text[ korean ] = "¿¹ºñ ¿¬°á¼± 5";
+ Text[ turkish ] = "Baðlayýcý - Yedek 5";
+};
+
+String SIP_SA_EDGERESERVE06
+{
+ Text = "Verbinder Reserve 6";
+ Text [ ENGLISH ] = "Connector reserved 6" ;
+ Text[ english_us ] = "Connector reserved 6";
+ Text[ portuguese ] = "Conector de reserva 6";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ñîåäèíèòåëüíàÿ ëèíèÿ 6";
+ Text[ dutch ] = "Verbindingsreserve 6";
+ Text[ french ] = "Réservé pour connecteur 6";
+ Text[ spanish ] = "Conector reserva 6";
+ Text[ italian ] = "Riservato per connettore 6";
+ Text[ danish ] = "Forbindelse reserve 6";
+ Text[ swedish ] = "Förbindelse reserverad för 6";
+ Text[ polish ] = "Zarezerwowany ³¹cznik 6";
+ Text[ portuguese_brazilian ] = "Connector reserved 6";
+ Text[ japanese ] = "ºÈ¸À —\\”õ6";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 6";
+ Text[ chinese_traditional ] = "³s±µ²Å¹w¯d 6";
+ Text[ arabic ] = "ÇáÑÇÈØ ãÍÌæÒ áÜ 6";
+ Text[ dutch ] = "Verbindingsreserve 6";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 6";
+ Text[ greek ] = "ÓõíäÝóåéò åíáëëáêô. 6";
+ Text[ korean ] = "¿¹ºñ ¿¬°á¼± 6";
+ Text[ turkish ] = "Baðlayýcý - Yedek 6";
+};
+
+String SIP_SA_EDGERESERVE07
+{
+ Text = "Verbinder Reserve 7";
+ Text [ ENGLISH ] = "Connector reserved 7" ;
+ Text[ english_us ] = "Connector reserved 7";
+ Text[ portuguese ] = "Conector de reserva 7";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ñîåäèíèòåëüíàÿ ëèíèÿ 7";
+ Text[ dutch ] = "Verbindingsreserve 7";
+ Text[ french ] = "Réservé pour connecteur 7";
+ Text[ spanish ] = "Conector reserva 7";
+ Text[ italian ] = "Riservato per connettore 7";
+ Text[ danish ] = "Forbindelse reserve 7";
+ Text[ swedish ] = "Förbindelse reserverad för 7";
+ Text[ polish ] = "Zarezerwowany ³¹cznik 7";
+ Text[ portuguese_brazilian ] = "Connector reserved 7";
+ Text[ japanese ] = "ºÈ¸À —\\”õ7";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 7";
+ Text[ chinese_traditional ] = "³s±µ²Å¹w¯d 7";
+ Text[ arabic ] = "ÇáÑÇÈØ ãÍÌæÒ áÜ 7";
+ Text[ dutch ] = "Verbindingsreserve 7";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 7";
+ Text[ greek ] = "ÓõíäÝóåéò åíáëëáêô. 7";
+ Text[ korean ] = "¿¹ºñ ¿¬°á¼± 7";
+ Text[ turkish ] = "Baðlayýcý - Yedek 7";
+};
+
+String SIP_SA_EDGERESERVE08
+{
+ Text = "Verbinder Reserve 8";
+ Text [ ENGLISH ] = "Connector reserved 8" ;
+ Text[ english_us ] = "Connector reserved 8";
+ Text[ portuguese ] = "Conector de reserva 8";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ñîåäèíèòåëüíàÿ ëèíèÿ 8";
+ Text[ dutch ] = "Verbindingsreserve 8";
+ Text[ french ] = "Réservé pour connecteur 8";
+ Text[ spanish ] = "Conector reserva 8";
+ Text[ italian ] = "Riservato per connettore 8";
+ Text[ danish ] = "Forbindelse reserve 8";
+ Text[ swedish ] = "Förbindelse reserverad för 8";
+ Text[ polish ] = "Zarezerwowany ³¹cznik 8";
+ Text[ portuguese_brazilian ] = "Connector reserved 8";
+ Text[ japanese ] = "ºÈ¸À —\\”õ8";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 8";
+ Text[ chinese_traditional ] = "³s±µ²Å¹w¯d 8";
+ Text[ arabic ] = "ÇáÑÇÈØ ãÍÌæÒ áÜ 8";
+ Text[ dutch ] = "Verbindingsreserve 8";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 8";
+ Text[ greek ] = "ÓõíäÝóåéò åíáëëáêô. 8";
+ Text[ korean ] = "¿¹ºñ ¿¬°á¼± 8";
+ Text[ turkish ] = "Baðlayýcý - Yedek 8";
+};
+
+String SIP_SA_EDGERESERVE09
+{
+ Text = "Verbinder Reserve 9";
+ Text [ ENGLISH ] = "Connector reserved 9" ;
+ Text[ english_us ] = "Connector reserved 9";
+ Text[ portuguese ] = "Conector de reserva 9";
+ Text[ russian ] = "Çàðåçåðâèðîâàííàÿ ñîåäèíèòåëüíàÿ ëèíèÿ 9";
+ Text[ dutch ] = "Verbindingsreserve 9";
+ Text[ french ] = "Réservé pour connecteur 9";
+ Text[ spanish ] = "Conector reserva 9";
+ Text[ italian ] = "Riservato per connettore 9";
+ Text[ danish ] = "Forbindelse reserve 9";
+ Text[ swedish ] = "Förbindelse reserverad för 9";
+ Text[ polish ] = "Zarezerwowany ³¹cznik 9";
+ Text[ portuguese_brazilian ] = "Connector reserved 9";
+ Text[ japanese ] = "ºÈ¸À —\\”õ9";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 9";
+ Text[ chinese_traditional ] = "³s±µ²Å¹w¯d 9";
+ Text[ arabic ] = "ÇáÑÇÈØ ãÍÌæÒ áÜ 9";
+ Text[ dutch ] = "Verbindingsreserve 9";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÔ¤Áô 9";
+ Text[ greek ] = "ÓõíäÝóåéò åíáëëáêô. 9";
+ Text[ korean ] = "¿¹ºñ ¿¬°á¼± 9";
+ Text[ turkish ] = "Baðlayýcý - Yedek 9";
+};
+
+String SIP_SDRATTRSET_EDGE
+{
+ Text = "Verbinderattribute";
+ Text [ ENGLISH ] = "Connector attributes" ;
+ Text[ english_us ] = "Connector attributes";
+ Text[ portuguese ] = "Atributos de conector";
+ Text[ russian ] = "Àòðèáóòû ñîåäèíèòåëüíûõ ëèíèé";
+ Text[ dutch ] = "Verbindingsattributen";
+ Text[ french ] = "Attributs des connecteurs";
+ Text[ spanish ] = "Atributos de conector";
+ Text[ italian ] = "Attributi connettore";
+ Text[ danish ] = "Forbindelsesattributter";
+ Text[ swedish ] = "Förbindelseattribut";
+ Text[ polish ] = "Atrybuty ³¹czników";
+ Text[ portuguese_brazilian ] = "Connector attributes";
+ Text[ japanese ] = "ºÈ¸À‚Ì‘®«";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÊôÐÔ";
+ Text[ chinese_traditional ] = "³s±µ²ÅÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáÑÇÈØ";
+ Text[ dutch ] = "Verbindingsattributen";
+ Text[ chinese_simplified ] = "Á¬½Ó·ûÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò óýíäåóçò";
+ Text[ korean ] = "¿¬°á¼± ¼Ó¼º";
+ Text[ turkish ] = "Baðlayýcý öznitelikleri";
+};
+
+String SIP_SA_MEASUREKIND
+{
+ Text = "Bemassungstyp";
+ Text [ ENGLISH ] = "Type of dimensioning" ;
+ Text[ english_us ] = "Type of dimensioning";
+ Text[ portuguese ] = "Tipo de dimensões";
+ Text[ russian ] = "Òèï çàäàíèÿ ðàçìåðîâ";
+ Text[ dutch ] = "Afmetingstype";
+ Text[ french ] = "Type de cotation";
+ Text[ spanish ] = "Tipo de dimensionamiento";
+ Text[ italian ] = "Tipo di quotatura";
+ Text[ danish ] = "Dimensioneringstype";
+ Text[ swedish ] = "Typ av dimensionering";
+ Text[ polish ] = "Typ wymiarowania";
+ Text[ portuguese_brazilian ] = "Type of dimensioning";
+ Text[ japanese ] = "¡–@‚ÌŽí—Þ";
+ Text[ chinese_simplified ] = "¶¨³ß¶ÈµÄÀàÐÍ";
+ Text[ chinese_traditional ] = "©w¤Ø«×Ãþ«¬";
+ Text[ arabic ] = "äæÚ ÇáÞíÇÓ";
+ Text[ dutch ] = "Afmetingstype";
+ Text[ chinese_simplified ] = "¶¨³ß¶ÈµÄÀàÐÍ";
+ Text[ greek ] = "Ôýðïò äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö À¯Çü";
+ Text[ turkish ] = "Ölçüm tipi";
+};
+
+String SIP_SA_MEASURETEXTHPOS
+{
+ Text = "Masstext Horizontalposition";
+ Text [ ENGLISH ] = "Dimension text horizontal position" ;
+ Text[ english_us ] = "Dimension value - horizontal position";
+ Text[ portuguese ] = "Texto de dimens. em posição horizontal";
+ Text[ russian ] = "Ãîðèçîíòàëüíàÿ ïîçèöèÿ òåêñòà ðàçìåðîâ";
+ Text[ dutch ] = "Tekstafmetingen horizontale positie";
+ Text[ french ] = "Affichage parallèle de la valeur de la cote";
+ Text[ spanish ] = "Pos. horiz. texto dimension.";
+ Text[ italian ] = "Testo di quotatura in posizione orizzontale";
+ Text[ danish ] = "Måletekst vandret position";
+ Text[ swedish ] = "Måttext horisontal position";
+ Text[ polish ] = "Pozioma pozycja tekstu wymiarowego";
+ Text[ portuguese_brazilian ] = "Dimension text horizontal position";
+ Text[ japanese ] = "¡–@ ¶‰E‚̈ʒu";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×ÖˮƽλÖÃ";
+ Text[ chinese_traditional ] = "©w¶q¤å¦r¤ô¥­¦ì¸m";
+ Text[ arabic ] = "ÇáæÖÚ ÇáÃÝÞí áäÕ ÇáÞíÇÓ";
+ Text[ language_user1 ] = " ";
+ Text[ dutch ] = "Tekstafmetingen horizontale positie";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×ÖˮƽλÖÃ";
+ Text[ greek ] = "Êåßìåíï äéáóôáóéïëüãçóçò - Ïñéæüíôéá èÝóç";
+ Text[ korean ] = "Ä¡¼ö°ª - ¼öÆò À§Ä¡";
+ Text[ turkish ] = "Ölçüm metni - Yatay konum";
+};
+
+String SIP_SA_MEASURETEXTVPOS
+{
+ Text = "Masstext Vertikalposition";
+ Text [ ENGLISH ] = "Dimension text vertical position" ;
+ Text[ english_us ] = "Dimension value - vertical position";
+ Text[ portuguese ] = "Texto de dimens. em posição vertical";
+ Text[ russian ] = "Âåðòèêàëüíàÿ ïîçèöèÿ òåêñòà ðàçìåðîâ";
+ Text[ dutch ] = "Tekstafmetingen verticale positie";
+ Text[ french ] = "Affichage perpendiculaire de la valeur de la cote";
+ Text[ spanish ] = "Pos. vert. texto dimension.";
+ Text[ italian ] = "Testo di quotatura in posizione verticale";
+ Text[ danish ] = "Måletekst lodret position";
+ Text[ swedish ] = "Måttext vertikal position";
+ Text[ polish ] = "Pionowa pozycja tekstu wymiarowego";
+ Text[ portuguese_brazilian ] = "Dimension text vertical position";
+ Text[ japanese ] = "¡–@ ㉺‚̈ʒu";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×Ö´¹Ö±Î»ÖÃ";
+ Text[ chinese_traditional ] = "Dimension text vertical position";
+ Text[ arabic ] = "ÇáæÖÚ ÇáÑÃÓí áäÕ ÇáÞíÇÓ";
+ Text[ language_user1 ] = " ";
+ Text[ dutch ] = "Tekstafmetingen verticale positie";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×Ö´¹Ö±Î»ÖÃ";
+ Text[ greek ] = "Êåßìåíï äéáóôáóéïëüãçóçò - Êáôáêüñõöç èÝóç";
+ Text[ korean ] = "Ä¡¼ö°ª - ¼öÁ÷ À§Ä¡";
+ Text[ turkish ] = "Ölçüm metni - Dikey konum";
+};
+
+String SIP_SA_MEASURELINEDIST
+{
+ Text = "Masslinienabstand";
+ Text [ ENGLISH ] = "Dimension line distance" ;
+ Text[ english_us ] = "Dimension line space";
+ Text[ portuguese ] = "Distância - linhas de dimensionamento";
+ Text[ russian ] = "Ðàññòîÿíèå ðàçìåðíîé ëèíèè";
+ Text[ dutch ] = "Afstand lijnafmetingen";
+ Text[ french ] = "Écart des lignes de cote";
+ Text[ spanish ] = "Distancia líneas dimensionamiento";
+ Text[ italian ] = "Distanza linea di quotatura";
+ Text[ danish ] = "Målelinjeafstand";
+ Text[ swedish ] = "Måttlinjeavstånd";
+ Text[ polish ] = "Odstêp linii wymiarowych";
+ Text[ portuguese_brazilian ] = "Dimension line distance";
+ Text[ japanese ] = "Œv‘ªü‚ÌŠÔŠu";
+ Text[ chinese_simplified ] = "¶¨Á¿ÏßÌõ¼ä¸ô";
+ Text[ chinese_traditional ] = "©w¶q½u±ø¶¡¹j";
+ Text[ arabic ] = "ÊÈÇÚÏ ÎØ ÇáÞíÇÓ";
+ Text[ dutch ] = "Afstand lijnafmetingen";
+ Text[ chinese_simplified ] = "¶¨Á¿ÏßÌõ¼ä¸ô";
+ Text[ greek ] = "Áðüóôáóç ãñáììÞò äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö¼± °£°Ý";
+ Text[ turkish ] = "Ölçüm çizgisi aralýðý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_MEASUREHELPLINEOVERHANG
+{
+ Text = "Masshilfslinienüberhang";
+ Text [ ENGLISH ] = "Backlog of dimension help line" ;
+ Text[ english_us ] = "Dimension help line overhang";
+ Text[ portuguese ] = "Guias sobressalentes";
+ Text[ russian ] = "Âûñòóï ïðîìåæóòî÷íûõ ðàçìåðíûõ ëèíèé";
+ Text[ dutch ] = "Afmetingen hulplijn overhangend";
+ Text[ french ] = "Dépassement des repères côtés";
+ Text[ spanish ] = "Guías sobresalientes";
+ Text[ italian ] = "Sporgimento linee guida di quotatura";
+ Text[ danish ] = "Målehjælpelinjeoverhæng";
+ Text[ swedish ] = "För lång måtthjälplinje";
+ Text[ polish ] = "Zwis pomocniczych linii wymiarowych";
+ Text[ portuguese_brazilian ] = "Backlog of dimension help line";
+ Text[ japanese ] = "¡–@•â•ü‚Ì“Ë‚«o‚µ";
+ Text[ chinese_simplified ] = "¶¨Á¿¸´ÖÆÏßÑÓÉì";
+ Text[ chinese_traditional ] = "©w¶q»²§U½u±ø©µ¦ù";
+ Text[ arabic ] = "ÇáÒíÇÏÉ Ýí ÎØæØ ãÓÇÚÏÉ ÇáÞíÇÓ";
+ Text[ dutch ] = "Afmetingen hulplijn overhangend";
+ Text[ chinese_simplified ] = "¶¨Á¿¸´ÖÆÏßÑÓÉì";
+ Text[ greek ] = "Ðñïåîï÷Þ âïçèçôéêÞò ãñáììÞò äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö ¾È³»¼± µ¹Ãâ";
+ Text[ turkish ] = "Yardýmcý çizgi sarkmasý";
+};
+
+String SIP_SA_MEASUREHELPLINEDIST
+{
+ Text = "Masshilfslinienabstand";
+ Text [ ENGLISH ] = "Distance of dimension help line" ;
+ Text[ english_us ] = "Distance of dimension help line";
+ Text[ portuguese ] = "Distância entre guias de dimens.";
+ Text[ russian ] = "Èíòåðâàë ìåæäó ïðîìåæóòî÷íûìè ðàçìåðíûìè ëèíèÿìè";
+ Text[ dutch ] = "Afstand afmetingen hulplijn";
+ Text[ french ] = "Écart des repères côtés";
+ Text[ spanish ] = "Distancia entre guías";
+ Text[ italian ] = "Distanza linee guida di quotatura";
+ Text[ danish ] = "Målehjælpelinjeafstand";
+ Text[ swedish ] = "Måtthjälplinje avstånd";
+ Text[ polish ] = "Odstêp pomocniczych linii wymiarowych";
+ Text[ portuguese_brazilian ] = "Distance of dimension help line";
+ Text[ japanese ] = "¡–@•â•ü‚ÌŠÔŠu";
+ Text[ chinese_simplified ] = "¶¨Á¿¸¨ÖúÏß¼ä¸ô";
+ Text[ chinese_traditional ] = "©w¶q»²§U½u±ø¶¡¹j";
+ Text[ arabic ] = "ÊÈÇÚÏ ÎØ ãÓÇÚÏÉ ÇáÞíÇÓ";
+ Text[ dutch ] = "Afstand afmetingen hulplijn";
+ Text[ chinese_simplified ] = "¶¨Á¿¸¨ÖúÏß¼ä¸ô";
+ Text[ greek ] = "Áðüóôáóç ôçò âïçèçôéêÞò ãñáììÞò äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö ¾È³»¼± °£°Ý";
+ Text[ turkish ] = "Yardýmcý ölçüm çizgisi aralýðý";
+};
+
+String SIP_SA_MEASUREHELPLINE1LEN
+{
+ Text = "Masshilfslinienüberlänge 1";
+ Text [ ENGLISH ] = "dimension line backlog 1" ;
+ Text[ english_us ] = "Backlog of dimension help line 1";
+ Text[ portuguese ] = "Ultrapassar comprimento das guias de dimens. 1";
+ Text[ russian ] = "Âûñòóï ðàçìåðíîé ïðîìåæóòî÷íîé ëèíèè 1";
+ Text[ dutch ] = "Afmetingen hulplijn extra lang 1";
+ Text[ french ] = "Dépassement des repères 1";
+ Text[ spanish ] = "Extralargo líneas aux. de dimensionamiento 1";
+ Text[ italian ] = "Sporgimento linee guida di quotatura 1";
+ Text[ danish ] = "Målehjælpelinjeoverlængde 1";
+ Text[ swedish ] = "För lång måtthjälplinje 1";
+ Text[ polish ] = "Nadd³ugoœæ pomocniczych linii wymiarowych 1";
+ Text[ portuguese_brazilian ] = "dimension line backlog 1";
+ Text[ japanese ] = "¡–@•â•ü‚Ì“Ë‚«o‚µ1";
+ Text[ chinese_simplified ] = "¶¨Á¿¸¨ÖúÏßÑÓÉì 1";
+ Text[ chinese_traditional ] = "©w¶q»²§U½u±ø©µ¦ù 1";
+ Text[ arabic ] = "ÇáÒíÇÏÉ Ýí Øæá ÎØæØ ÇáÞíÇÓ 1";
+ Text[ dutch ] = "Afmetingen hulplijn extra lang 1";
+ Text[ chinese_simplified ] = "¶¨Á¿¸¨ÖúÏßÑÓÉì 1";
+ Text[ greek ] = "Ðñïåîï÷Þ âïçèçôéêÞò ãñáììÞò äéáóôáóéïëüãçóçò 1";
+ Text[ korean ] = "Ä¡¼ö ¾È³»¼± ¹é·Î±× 1";
+ Text[ turkish ] = "Yardýmcý ölçüm çizgisi taþmasý 1";
+};
+
+String SIP_SA_MEASUREHELPLINE2LEN
+{
+ Text = "Masshilfslinienüberlänge 2";
+ Text [ ENGLISH ] = "dimension line backlog 2" ;
+ Text[ english_us ] = "Backlog of dimension help line 2";
+ Text[ portuguese ] = "Ultrapassar comprimento das guias de dimens. 2";
+ Text[ russian ] = "Âûñòóï ðàçìåðíîé ïðîìåæóòî÷íîé ëèíèè 2";
+ Text[ dutch ] = "Afmetingen hulplijn extra lang 2";
+ Text[ french ] = "Dépassement des repères 2";
+ Text[ spanish ] = "Extralargo líneas aux. de dimensionamiento 2";
+ Text[ italian ] = "Sporgimento linee guida di quotatura 2";
+ Text[ danish ] = "Målehjælpelinjeoverlængde 2";
+ Text[ swedish ] = "För lång måtthjälplinje 2";
+ Text[ polish ] = "Nadd³ugoœæ pomocniczych linii wymiarowych 2";
+ Text[ portuguese_brazilian ] = "dimension line backlog 2";
+ Text[ japanese ] = "¡–@•â•ü‚Ì“Ë‚«o‚µ2";
+ Text[ chinese_simplified ] = "¶¨Á¿¸¨ÖúÏßÑÓÉì 2";
+ Text[ chinese_traditional ] = "©w¶q»²§U½u±ø©µ¦ù 2";
+ Text[ arabic ] = "ÇáÒíÇÏÉ Ýí Øæá ÎØæØ ÇáÞíÇÓ 2";
+ Text[ dutch ] = "Afmetingen hulplijn extra lang 2";
+ Text[ chinese_simplified ] = "¶¨Á¿¸¨ÖúÏßÑÓÉì 2";
+ Text[ greek ] = "Ðñïåîï÷Þ âïçèçôéêÞò ãñáììÞò äéáóôáóéïëüãçóçò 2";
+ Text[ korean ] = "Ä¡¼ö ¾È³»¼± ¹é·Î±× 2";
+ Text[ turkish ] = "Yardýmcý ölçüm çizgisi taþmasý 2";
+};
+
+String SIP_SA_MEASUREBELOWREFEDGE
+{
+ Text = "Unterkantenbemassung";
+ Text [ ENGLISH ] = "lower edge dimensioning" ;
+ Text[ english_us ] = "Lower edge dimensioning";
+ Text[ portuguese ] = "Dimensionamento margem inferior";
+ Text[ russian ] = "Ðàçìåðû íèæíåãî êàíòà";
+ Text[ dutch ] = "Afmetingen onderkant";
+ Text[ french ] = "Cotation de l'arête inférieure";
+ Text[ spanish ] = "Dimensionamiento borde inferior";
+ Text[ italian ] = "Quotatura bordi inferiori";
+ Text[ danish ] = "Underkantdimensionering";
+ Text[ swedish ] = "Underkantsdimensionering";
+ Text[ polish ] = "Wymiarowanie krawêdzi dolnej";
+ Text[ portuguese_brazilian ] = "lower edge dimensioning";
+ Text[ japanese ] = "‰º‚ÌŠp‚Ì¡–@‹L“ü";
+ Text[ chinese_simplified ] = "ϱßÔµ¶¨³ß¶È";
+ Text[ chinese_traditional ] = "¤UÃä½t©w¤Ø«×";
+ Text[ arabic ] = "ÞíÇÓ ÇáÍæÇÝ ÇáÓÝáíÉ";
+ Text[ dutch ] = "Afmetingen onderkant";
+ Text[ chinese_simplified ] = "ϱßÔµ¶¨³ß¶È";
+ Text[ greek ] = "Äéáóôáóéïëüãçóç êÜôù Üêñïõ";
+ Text[ korean ] = "¾Æ·¡ ¸ð¼­¸® Ä¡¼ö";
+ Text[ turkish ] = "Alt kenar ölçüsü";
+};
+
+String SIP_SA_MEASURETEXTROTA90
+{
+ Text = "Masstext quer zu Masslinie";
+ Text [ ENGLISH ] = "Dimensioning text across to line" ;
+ Text[ english_us ] = "Dimension value across dimension line";
+ Text[ portuguese ] = "Texto dimens. oblíquo à linha de dimens.";
+ Text[ russian ] = "Ïîïåðå÷íîå ïîëîæåíèå òåêñòà ðàçìåðîâ ê ðàçìåðíîé ëèíèè";
+ Text[ dutch ] = "Tekstafmetingen haaks op lijnafmetingen";
+ Text[ french ] = "Valeur de la cote perpendiculaire à la ligne de cote";
+ Text[ spanish ] = "Dimens. de texto a través de línea";
+ Text[ italian ] = "Testo di quotatura perpendicolare alla linea";
+ Text[ danish ] = "Måletekst på tværs af målelinjen";
+ Text[ swedish ] = "Måttext vinkelrät mot måttlinje";
+ Text[ polish ] = "Tekst wymiarowy poprzecznie do liniii wymiarowej";
+ Text[ portuguese_brazilian ] = "Dimensioning text across to line";
+ Text[ japanese ] = "¡–@‚ð¡–@ü‚ɑ΂µŽÎ‚ß";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×ֺͶ¨Á¿ÏßÌõÏཻ";
+ Text[ chinese_traditional ] = "©w¶q¤å¦r©M©w¶q½u±ø¬Û¥æ";
+ Text[ arabic ] = "äÕ ÇáÞíÇÓ ÚÑÖÇð ãÚ ÎØ ÇáÞíÇÓ";
+ Text[ dutch ] = "Tekstafmetingen haaks op lijnafmetingen";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×ֺͶ¨Á¿ÏßÌõÏཻ";
+ Text[ greek ] = "Êåßìåíï äéáóôáóéïëüãçóçò ëïîÜ ðñïò ãñáììÞ äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö°ªÀ» Ä¡¼ö¼±¿¡ °¡·Î·Î";
+ Text[ turkish ] = "Ölçüm çizgisini kesen ölçüm metni";
+};
+
+String SIP_SA_MEASURETEXTUPSIDEDOWN
+{
+ Text = "Masstext um 180ø drehen";
+ Text [ ENGLISH ] = "Turn dimensioning text 180ø" ;
+ Text[ english_us ] = "Rotate dimension value by 180ø";
+ Text[ portuguese ] = "Rodar texto dimens. 180ø";
+ Text[ russian ] = "Ïîâîðà÷èâàòü òåêñò ðàçìåðîâ íà 180ø";
+ Text[ dutch ] = "Tekstafmetingen 180ø draaien";
+ Text[ french ] = "Faire pivoter de 180ø la valeur de la cote";
+ Text[ spanish ] = "Girar texto dimens. en 180ø";
+ Text[ italian ] = "Ruota testo di quotatura di 180°";
+ Text[ danish ] = "Roter måletekst om 180ø";
+ Text[ swedish ] = "Rotera måttext med 180ø";
+ Text[ polish ] = "Obróæ tekst wymiarowy o 180ø";
+ Text[ portuguese_brazilian ] = "Turn dimensioning text 180ø";
+ Text[ japanese ] = "¡–@‚ð180“x‰ñ“]";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×ÖÐýת180¶È";
+ Text[ chinese_traditional ] = "©w¶q¤å¦r±ÛÂà180«×";
+ Text[ arabic ] = "ÇÓÊÏÇÑÉ äÕ ÇáÞíÇÓ ÈãÞÏÇÑ ø180";
+ Text[ dutch ] = "Tekstafmetingen 180ø draaien";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×ÖÐýת180¶È";
+ Text[ greek ] = "ÐåñéóôñïöÞ êåéìÝíïõ äéáóôáóéïëüãçóçò êáôÜ 180ø";
+ Text[ korean ] = "Ä¡¼ö°ª 180? ȸÀü";
+ Text[ turkish ] = "Ölçüm metnini 180ø döndür";
+};
+
+String SIP_SA_MEASUREOVERHANG
+{
+ Text = "Masslinienüberstand";
+ Text [ ENGLISH ] = "Dimension line backlog" ;
+ Text[ english_us ] = "Dimension line overhang";
+ Text[ portuguese ] = "Ultrapassar linhas de dimensionamento";
+ Text[ russian ] = "Âûñòóï ðàçìåðíîé ëèíèè";
+ Text[ dutch ] = "Lijnafmetingen, uitstekend";
+ Text[ french ] = "Dépassement des lignes de cote";
+ Text[ spanish ] = "Resalte líneas de dimensionamiento";
+ Text[ italian ] = "Sporgimento linee di quotatura";
+ Text[ danish ] = "Målelinjeoverskud";
+ Text[ swedish ] = "För lång måttlinje";
+ Text[ polish ] = "Wystêp linii wymiarowych";
+ Text[ portuguese_brazilian ] = "Dimension line backlog";
+ Text[ japanese ] = "Œv‘ªü‚Ì“Ë‚«o‚µ";
+ Text[ chinese_simplified ] = "¶¨Á¿ÏßÑÓÉì";
+ Text[ chinese_traditional ] = "©w¶q½u±ø©µ¦ù";
+ Text[ arabic ] = "ÇáÒíÇÏÉ Ýí Øæá ÎØæØ ÇáÞíÇÓ";
+ Text[ dutch ] = "Lijnafmetingen, uitstekend";
+ Text[ chinese_simplified ] = "¶¨Á¿ÏßÑÓÉì";
+ Text[ greek ] = "Ðñïåîï÷Þ ãñáììÞò äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö¼± µ¹Ãâ";
+ Text[ turkish ] = "Ölçüm çizgisi sarkmasý";
+};
+
+String SIP_SA_MEASUREUNIT
+{
+ Text = "Masseinheit";
+ Text [ ENGLISH ] = "measure unit" ;
+ Text[ english_us ] = "Measure unit";
+ Text[ portuguese ] = "Unidade de medida";
+ Text[ russian ] = "Åäèíèöà èçìåðåíèÿ";
+ Text[ dutch ] = "Maateenheid";
+ Text[ french ] = "Unité de mesure";
+ Text[ spanish ] = "Unidad de medida";
+ Text[ italian ] = "Unità di musura";
+ Text[ danish ] = "Måleenhed";
+ Text[ swedish ] = "Måttenhet";
+ Text[ polish ] = "Jednostka miary";
+ Text[ portuguese_brazilian ] = "measure unit";
+ Text[ japanese ] = "’PˆÊ";
+ Text[ chinese_simplified ] = "¶¨Á¿µ¥Î»";
+ Text[ chinese_traditional ] = "©w¶q³æ¦ì";
+ Text[ arabic ] = "æÍÏÉ ÇáÞíÇÓ";
+ Text[ dutch ] = "Maateenheid";
+ Text[ chinese_simplified ] = "¶¨Á¿µ¥Î»";
+ Text[ greek ] = "ÌïíÜäá ìÝôñçóçò";
+ Text[ korean ] = "Ä¡¼ö ´ÜÀ§";
+ Text[ turkish ] = "Ölçüm birimi";
+};
+
+String SIP_SA_MEASURESCALE
+{
+ Text = "Masstabzusatzfaktor";
+ Text [ ENGLISH ] = "scale extra factor" ;
+ Text[ english_us ] = "Additional scale factor";
+ Text[ portuguese ] = "Factor adicional da escala";
+ Text[ russian ] = "Äîïîëíèòåëüíûé ôàêòîð ìàñøòàáà";
+ Text[ dutch ] = "schaal, extra factor";
+ Text[ french ] = "Facteur supplémentaire d'échelle";
+ Text[ spanish ] = "Factor adicional de escala";
+ Text[ italian ] = "Fattore distanza di quotatura";
+ Text[ danish ] = "Yderlig målestoksfaktor";
+ Text[ swedish ] = "Ytterligare skalafaktor";
+ Text[ polish ] = "Dodatkowy czynnik skali";
+ Text[ portuguese_brazilian ] = "scale extra factor";
+ Text[ japanese ] = "¡–@‚̒ljÁ—v‘f";
+ Text[ chinese_simplified ] = "¶¨Á¿¸½¼ÓÒòËØ";
+ Text[ chinese_traditional ] = "©w¶qªþ¥[¦]¯À";
+ Text[ arabic ] = "ãÚíÇÑ ÞíÇÓí ÅÖÇÝí";
+ Text[ dutch ] = "schaal, extra factor";
+ Text[ chinese_simplified ] = "¶¨Á¿¸½¼ÓÒòËØ";
+ Text[ greek ] = "Ðñüóèåôïò ðáñÜãïíôáò êëßìáêáò";
+ Text[ korean ] = "¹èÀ² Ãß°¡ ¿äÀÎ";
+ Text[ turkish ] = "Ek ölçek faktörü";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_MEASURESHOWUNIT
+{
+ Text = "Masseinheitenanzeige";
+ Text [ ENGLISH ] = "Measure unit display" ;
+ Text[ english_us ] = "Measure unit display";
+ Text[ portuguese ] = "Visualizar unidades de medida";
+ Text[ russian ] = "Ïîêàç åäèíèö èçìåðåíèÿ";
+ Text[ dutch ] = "Weergave maateenheid";
+ Text[ french ] = "Affichage de l'unité de mesure";
+ Text[ spanish ] = "Visualización unidades de medida";
+ Text[ italian ] = "Visualizzazione unità di misura";
+ Text[ danish ] = "Måleenhedsvisning";
+ Text[ swedish ] = "Måttenhetsvisning";
+ Text[ polish ] = "WskaŸnik jednostek miary";
+ Text[ portuguese_brazilian ] = "Measure unit display";
+ Text[ japanese ] = "’PˆÊ‚Ì•\\Ž¦";
+ Text[ chinese_simplified ] = "¶¨Á¿µ¥Î»ÏÔʾ";
+ Text[ chinese_traditional ] = "©w¶q³æ¦ìÅã¥Ü";
+ Text[ arabic ] = "ÚÑÖ æÍÏÉ ÇáÞíÇÓ";
+ Text[ dutch ] = "Weergave maateenheid";
+ Text[ chinese_simplified ] = "¶¨Á¿µ¥Î»ÏÔʾ";
+ Text[ greek ] = "ÅìöÜíéóç ìïíÜäáò ìÝôñçóçò";
+ Text[ korean ] = "Ä¡¼ö ´ÜÀ§ Ç¥½Ã";
+ Text[ turkish ] = "Ölçü birimini göster";
+};
+
+String SIP_SA_MEASUREFORMATSTRING
+{
+ Text = "Masstextformat";
+ Text [ ENGLISH ] = "Format of dimensioning text" ;
+ Text[ english_us ] = "Dimension value format";
+ Text[ portuguese ] = "Formato do texto de dimens.";
+ Text[ russian ] = "Ôîðìàò òåêñòà ðàçìåðîâ";
+ Text[ dutch ] = "Formaat tekstafmetingen";
+ Text[ french ] = "Format de la valeur de la ligne de cote";
+ Text[ spanish ] = "Formato texto dimensionado";
+ Text[ italian ] = "Formato testo di quotatura";
+ Text[ danish ] = "Måletekstformat";
+ Text[ swedish ] = "Måttextformat";
+ Text[ polish ] = "Format tekstu wymiarowego";
+ Text[ portuguese_brazilian ] = "Format of dimensioning text";
+ Text[ japanese ] = "¡–@‚Ì‘Ž®";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×Ö¸ñʽ";
+ Text[ chinese_traditional ] = "©w¶q¤å¦r®æ¦¡";
+ Text[ arabic ] = "ÊäÓíÞ äÕ ÇáÞíÇÓ";
+ Text[ dutch ] = "Formaat tekstafmetingen";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×Ö¸ñʽ";
+ Text[ greek ] = "ÌïñöÞ êåéìÝíïõ äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö°ª ¼­½Ä";
+ Text[ turkish ] = "Ölçüm metni formatý";
+};
+
+String SIP_SA_MEASURETEXTAUTOANGLE
+{
+ Text = "Masstextwinkelautomatik";
+ Text [ ENGLISH ] = "Automatic angle of dimensining text" ;
+ Text[ english_us ] = "AutoPositioning of the dimension value";
+ Text[ portuguese ] = "Posicionamento autom. do texto de dimens.";
+ Text[ russian ] = "Àâòîóãîë òåêñòà ðàçìåðîâ";
+ Text[ dutch ] = "Automatische hoek bij tekstafmetingen";
+ Text[ french ] = "Positionnement automatique de la valeur de la ligne de cote";
+ Text[ spanish ] = "Posicionamiento automático del texto de ángulo";
+ Text[ italian ] = "Posizionamento automatico del testo di quotatura";
+ Text[ danish ] = "Måletekstvinkelautomatik";
+ Text[ swedish ] = "Automatisk vinkel på måttext";
+ Text[ polish ] = "Automatyczny k¹t tekstu wymiarowego";
+ Text[ portuguese_brazilian ] = "Automatic angle of dimensining text";
+ Text[ japanese ] = "¡–@‚ÌŠp“x‚ðŽ©“®’²®";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×Ö×Ô¶¯¶¨½Ç¶È";
+ Text[ chinese_traditional ] = "©w¶q¤å¦r¨¤«×¦Û°Ê¤Æ";
+ Text[ arabic ] = "ÒÇæíÉ ÊáÞÇÆíÉ áäÕ ÇáÞíÇÓ";
+ Text[ dutch ] = "Automatische hoek bij tekstafmetingen";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×Ö×Ô¶¯¶¨½Ç¶È";
+ Text[ greek ] = "Áõôüìáôïò ïñéóìüò èÝóçò êåéìÝíïõ äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö°ª ÀÚµ¿ À§Ä¡";
+ Text[ turkish ] = "Otomatik ölçüm metni açýsý";
+};
+
+String SIP_SA_MEASURETEXTAUTOANGLEVIEW
+{
+ Text = "Winkel für Masstextwinkelautomatik";
+ Text [ ENGLISH ] = "Angle for Automatic angle of dimensining text" ;
+ Text[ english_us ] = "Angle for the automatic positioning of the dimension value";
+ Text[ portuguese ] = "Ângulo para o posicionamento autom. do texto de dimension.";
+ Text[ russian ] = "Óãîë äëÿ àâòîóãëà òåêñòà ðàçìåðîâ";
+ Text[ dutch ] = "Hoek voor automatische hoek bij tekstafmetingen";
+ Text[ french ] = "Angle de positionnement automatique de la valeur de la ligne de cote";
+ Text[ spanish ] = "Angulo para ángulo automát. de texto dimens.";
+ Text[ italian ] = "Angolo per il posizionamento automatico del testo di quotatura";
+ Text[ danish ] = "Vinkel for måletekstvinkelautomatik";
+ Text[ swedish ] = "Vinkel måttextvinkelsautomatik";
+ Text[ polish ] = "K¹t dla automatycznego k¹ta tekstu wymiarowego";
+ Text[ portuguese_brazilian ] = "Angle for Automatic angle of dimensining text";
+ Text[ japanese ] = "¡–@‚ÌŠp“x‚ðŽ©“®’²®‚·‚邽‚ß‚ÌŠp“x";
+ Text[ chinese_simplified ] = "ÓÃÓÚ¶¨Á¿ÎÄ×Ö×Ô¶¯¶¨½Ç¶ÈµÄ½Ç¶È";
+ Text[ chinese_traditional ] = "©w¶q¤å¦r¨¤«×¦Û°Ê¤Æªº¨¤«×";
+ Text[ arabic ] = "ÚÑÖ ÇáÒÇæíÉ ÇáÊáÞÇÆíÉ áäÕ ÇáÞíÇÓ";
+ Text[ dutch ] = "Hoek voor automatische hoek bij tekstafmetingen";
+ Text[ chinese_simplified ] = "ÓÃÓÚ¶¨Á¿ÎÄ×Ö×Ô¶¯¶¨½Ç¶ÈµÄ½Ç¶È";
+ Text[ greek ] = "Ãùíßá êëßóçò ãéá ôïí áõôüìáôï ïñéóìü èÝóçò ôïõ êåéìÝíïõ äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö°ª ÀÚµ¿ À§Ä¡¿ë °¢µµ";
+ Text[ turkish ] = "Otomatik ölçüm metni açýsý için açý";
+};
+
+String SIP_SA_MEASURETEXTISFIXEDANGLE
+{
+ Text = "Masstextwinkelfestsetzung";
+ Text [ ENGLISH ] = "ascertained angle of Automatic angle" ;
+ Text[ english_us ] = "Determination of the dimension value angle";
+ Text[ portuguese ] = "Definir ângulo do texto de dimens.";
+ Text[ russian ] = "Îïðåäåëåíèå óãëà òåêñòà ðàçìåðîâ";
+ Text[ dutch ] = "Vaststelling van hoek bij tekstafmetingen";
+ Text[ french ] = "Définition de l'angle de la valeur de la ligne de cote";
+ Text[ spanish ] = "Definición del ángulo de texto dimensionado";
+ Text[ italian ] = "Determinazione dell'angolo del testo di quotatura";
+ Text[ danish ] = "Definer måletekstvinkel";
+ Text[ swedish ] = "Fästläggning av måttextvinkel";
+ Text[ polish ] = "Zakleszczenie k¹ta tekstu wymiarowego";
+ Text[ portuguese_brazilian ] = "ascertained angle of Automatic angle";
+ Text[ japanese ] = "¡–@‚ÌŠp“x‚ð’è‚ß‚é";
+ Text[ chinese_simplified ] = "È·¶¨¶¨Á¿ÎÄ×ֵĽǶÈ";
+ Text[ chinese_traditional ] = "³]©w©w¶q¤å¦r¨¤«×";
+ Text[ arabic ] = "ÊÚííä ÒÇæíÉ äÕ ÇáÞíÇÓ";
+ Text[ dutch ] = "Vaststelling van hoek bij tekstafmetingen";
+ Text[ chinese_simplified ] = "È·¶¨¶¨Á¿ÎÄ×ֵĽǶÈ";
+ Text[ greek ] = "Êáèïñéóìüò ôçò êëßóçò ôïõ êåéìÝíïõ äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö°ª °¢µµ Á¤ÀÇ";
+ Text[ turkish ] = "Ölçüm metni açýsýnýn belirlenmesi";
+};
+
+String SIP_SA_MEASURETEXTFIXEDANGLE
+{
+ Text = "Masstextwinkel";
+ Text [ ENGLISH ] = "Angle of dimensioning text" ;
+ Text[ english_us ] = "Angle of the dimension value";
+ Text[ portuguese ] = "Ângulo do texto de dimens.";
+ Text[ russian ] = "Óãîë òåêñòà ðàçìåðîâ";
+ Text[ dutch ] = "Hoek bij tekstafmetingen";
+ Text[ french ] = "Angle de la valeur de la ligne de cote";
+ Text[ spanish ] = "Angulo de texto dimensionado";
+ Text[ italian ] = "Angolo del testo di quotatura";
+ Text[ danish ] = "Måletekstvinkel";
+ Text[ swedish ] = "Måttextvinkel";
+ Text[ polish ] = "K¹t tekstu wymiarowego";
+ Text[ portuguese_brazilian ] = "Angle of dimensioning text";
+ Text[ japanese ] = "¡–@‚ÌŠp“x";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×ֽǶÈ";
+ Text[ chinese_traditional ] = "©w¶q¤å¦r¨¤«×";
+ Text[ arabic ] = "ÒÇæíÉ äÕ ÇáÞíÇÓ";
+ Text[ dutch ] = "Hoek bij tekstafmetingen";
+ Text[ chinese_simplified ] = "¶¨Á¿ÎÄ×ֽǶÈ";
+ Text[ greek ] = "Ãùíßá êëßóçò êåéìÝíïõ äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö°ª °¢µµ";
+ Text[ turkish ] = "Ölçüm metni açýsý";
+};
+
+String SIP_SA_MEASURERESERVE04
+{
+ Text = "Bemassung Reserve 4";
+ Text [ ENGLISH ] = "Dimensioning reserved 4" ;
+ Text[ english_us ] = "Dimensioning reserved 4";
+ Text[ portuguese ] = "Dimensionamento de reserva 4";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé ðàçìåð 4";
+ Text[ dutch ] = "Afmetingsreserve 4";
+ Text[ french ] = "Réservé pour cotation 4";
+ Text[ spanish ] = "Dimensionamiento reserva 4";
+ Text[ italian ] = "Quotatura riservato 4";
+ Text[ danish ] = "Dimensionering reserve 4";
+ Text[ swedish ] = "Dimensionering reserverad för 4";
+ Text[ polish ] = "Zarezerwowane wymiarowanie 4";
+ Text[ portuguese_brazilian ] = "Dimensioning reserved 4";
+ Text[ japanese ] = "¡–@‹L“ü —\\”õ4";
+ Text[ chinese_simplified ] = "¶¨³ß´çÔ¤Áô 4";
+ Text[ chinese_traditional ] = "©w¤Ø«×¹w¯d 4";
+ Text[ arabic ] = "ÇáÞíÇÓ ãÍÌæÒ áÜ 4";
+ Text[ dutch ] = "Afmetingsreserve 4";
+ Text[ chinese_simplified ] = "¶¨³ß´çÔ¤Áô 4";
+ Text[ greek ] = "Äéáóôáóéïëüãçóç åíáëëáêô. 4";
+ Text[ korean ] = "¿¹ºñ Ä¡¼ö 4";
+ Text[ turkish ] = "Boyutlar - Yedek 4";
+};
+
+String SIP_SA_MEASURERESERVE05
+{
+ Text = "Bemassung Reserve 5";
+ Text [ ENGLISH ] = "Dimensioning reserved 5" ;
+ Text[ english_us ] = "Dimensioning reserved 5";
+ Text[ portuguese ] = "Dimensionamento de reserva 5";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé ðàçìåð 5";
+ Text[ dutch ] = "Afmetingsreserve 5";
+ Text[ french ] = "Réservé pour cotation 5";
+ Text[ spanish ] = "Dimensionamiento reserva 5";
+ Text[ italian ] = "Quotatura riservato 5";
+ Text[ danish ] = "Dimensionering reserve 5";
+ Text[ swedish ] = "Dimensionering reserverad för 5";
+ Text[ polish ] = "Zarezerwowane wymiarowanie 5";
+ Text[ portuguese_brazilian ] = "Dimensioning reserved 5";
+ Text[ japanese ] = "¡–@‹L“ü —\\”õ5";
+ Text[ chinese_simplified ] = "¶¨³ß´çÔ¤Áô 5";
+ Text[ chinese_traditional ] = "©w¤Ø«×¹w¯d 5";
+ Text[ arabic ] = "ÇáÞíÇÓ ãÍÌæÒ áÜ 5";
+ Text[ dutch ] = "Afmetingsreserve 5";
+ Text[ chinese_simplified ] = "¶¨³ß´çÔ¤Áô 5";
+ Text[ greek ] = "Äéáóôáóéïëüãçóç åíáëëáêô. 5";
+ Text[ korean ] = "¿¹ºñ Ä¡¼ö 5";
+ Text[ turkish ] = "Boyutlar - Yedek 5";
+};
+
+String SIP_SA_MEASURERESERVE06
+{
+ Text = "Bemassung Reserve 6";
+ Text [ ENGLISH ] = "Dimensioning reserved 6" ;
+ Text[ english_us ] = "Dimensioning reserved for 6";
+ Text[ portuguese ] = "Dimensionamento de reserva 6";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé ðàçìåð 6";
+ Text[ dutch ] = "Afmetingsreserve 6";
+ Text[ french ] = "Réservé pour cotation 6";
+ Text[ spanish ] = "Dimensionamiento reserva 6";
+ Text[ italian ] = "Quotatura riservato 6";
+ Text[ danish ] = "Dimensionering reserve 6";
+ Text[ swedish ] = "Dimensionering reserverad för 6";
+ Text[ polish ] = "Zarezerwowane wymiarowanie 6";
+ Text[ portuguese_brazilian ] = "Dimensioning reserved 6";
+ Text[ japanese ] = "¡–@‹L“ü —\\”õ6";
+ Text[ chinese_simplified ] = "¶¨³ß´çÔ¤Áô 6";
+ Text[ chinese_traditional ] = "©w¤Ø«×¹w¯d 6";
+ Text[ arabic ] = "ÇáÞíÇÓ ãÍÌæÒ áÜ 6";
+ Text[ dutch ] = "Afmetingsreserve 6";
+ Text[ chinese_simplified ] = "¶¨³ß´çÔ¤Áô 6";
+ Text[ greek ] = "Äéáóôáóéïëüãçóç åíáëëáêô. 6";
+ Text[ korean ] = "¿¹ºñ Ä¡¼ö 6";
+ Text[ turkish ] = "Boyutlar - Yedek 6";
+};
+
+String SIP_SA_MEASURERESERVE07
+{
+ Text = "Bemassung Reserve 7";
+ Text [ ENGLISH ] = "Dimensioning reserved 7" ;
+ Text[ english_us ] = "Dimensioning reserved for 7";
+ Text[ portuguese ] = "Dimensionamento de reserva 7";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé ðàçìåð 7";
+ Text[ dutch ] = "Afmetingsreserve 7";
+ Text[ french ] = "Réservé pour cotation 7";
+ Text[ spanish ] = "Dimensionamiento reserva 7";
+ Text[ italian ] = "Quotatura riservato 7";
+ Text[ danish ] = "Dimensionering reserve 7";
+ Text[ swedish ] = "Dimensionering reserverad för 7";
+ Text[ polish ] = "Zarezerwowane wymiarowanie 7";
+ Text[ portuguese_brazilian ] = "Dimensioning reserved 7";
+ Text[ japanese ] = "¡–@‹L“ü —\\”õ7";
+ Text[ chinese_simplified ] = "¶¨³ß´çÔ¤Áô 7";
+ Text[ chinese_traditional ] = "©w¤Ø«×¹w¯d 7";
+ Text[ arabic ] = "ÇáÞíÇÓ ãÍÌæÒ áÜ 7";
+ Text[ dutch ] = "Afmetingsreserve 7";
+ Text[ chinese_simplified ] = "¶¨³ß´çÔ¤Áô 7";
+ Text[ greek ] = "Äéáóôáóéïëüãçóç åíáëëáêô. 7";
+ Text[ korean ] = "¿¹ºñ Ä¡¼ö 7";
+ Text[ turkish ] = "Boyutlar - Yedek 7";
+};
+
+String SIP_SDRATTRSET_MEASURE
+{
+ Text = "Bemassungsattribute";
+ Text [ ENGLISH ] = "Attributes of dimensioning" ;
+ Text[ english_us ] = "Dimensioning attributes";
+ Text[ portuguese ] = "Atributos de dimensionamento";
+ Text[ russian ] = "Àòðèáóòû ðàçìåðîâ";
+ Text[ dutch ] = "Afmetingsattributen";
+ Text[ french ] = "Attributs de cotation";
+ Text[ spanish ] = "Atributo de dimensionamiento";
+ Text[ italian ] = "Attributi di quotatura";
+ Text[ danish ] = "Dimensioneringsattributter";
+ Text[ swedish ] = "Dimensioneringsattribut";
+ Text[ polish ] = "Atrybuty wymiarowania";
+ Text[ portuguese_brazilian ] = "Attributes of dimensioning";
+ Text[ japanese ] = "¡–@‹L“ü‚Ì‘®«";
+ Text[ chinese_simplified ] = "¶¨³ß´çÊôÐÔ";
+ Text[ chinese_traditional ] = "©w¤Ø«×ÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáÞíÇÓ";
+ Text[ dutch ] = "Afmetingsattributen";
+ Text[ chinese_simplified ] = "¶¨³ß´çÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò äéáóôáóéïëüãçóçò";
+ Text[ korean ] = "Ä¡¼ö ¼Ó¼º";
+ Text[ turkish ] = "Boyut öznitelikleri";
+};
+
+String SIP_SA_CIRCKIND
+{
+ Text = "Kreistyp";
+ Text [ ENGLISH ] = "Type of circle" ;
+ Text[ english_us ] = "Type of circle";
+ Text[ portuguese ] = "Tipo de círculo";
+ Text[ russian ] = "Òèï êðóãà";
+ Text[ dutch ] = "Type cirkel";
+ Text[ french ] = "Type de cercle";
+ Text[ spanish ] = "Tipo de círculo";
+ Text[ italian ] = "Tipo di cerchio";
+ Text[ danish ] = "Cirkeltype";
+ Text[ swedish ] = "Typ av cirkel";
+ Text[ polish ] = "Typ ko³a";
+ Text[ portuguese_brazilian ] = "Type of circle";
+ Text[ japanese ] = "‰~‚ÌŽí—Þ";
+ Text[ chinese_simplified ] = "Ô²ÐÎÀàÐÍ";
+ Text[ chinese_traditional ] = "¶ê§ÎÃþ«¬";
+ Text[ arabic ] = "äæÚ ÇáÏÇÆÑÉ";
+ Text[ dutch ] = "Type cirkel";
+ Text[ chinese_simplified ] = "Ô²ÐÎÀàÐÍ";
+ Text[ greek ] = "Ôýðïò êýêëïõ";
+ Text[ korean ] = "¿ø À¯Çü";
+ Text[ turkish ] = "Daire tipi";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_CIRCSTARTANGLE
+{
+ Text = "Startwinkel";
+ Text [ ENGLISH ] = "Start angle" ;
+ Text[ english_us ] = "Start angle";
+ Text[ portuguese ] = "Ângulo inicial";
+ Text[ russian ] = "Íà÷àëüíûé óãîë";
+ Text[ dutch ] = "Beginhoek";
+ Text[ french ] = "Angle de départ";
+ Text[ spanish ] = "Angulo inicial";
+ Text[ italian ] = "Angolo inizio";
+ Text[ danish ] = "Startvinkel";
+ Text[ swedish ] = "Startvinkel";
+ Text[ polish ] = "K¹t pocz¹tkowy";
+ Text[ portuguese_brazilian ] = "Start angle";
+ Text[ japanese ] = "Žn‚ß‚éŠp“x";
+ Text[ chinese_simplified ] = "Æðʼ½Ç¶È";
+ Text[ chinese_traditional ] = "°_©l¨¤«×";
+ Text[ arabic ] = "ÒÇæíÉ ÇáÈÏÁ";
+ Text[ dutch ] = "Beginhoek";
+ Text[ chinese_simplified ] = "Æðʼ½Ç¶È";
+ Text[ greek ] = "Áñ÷éêÞ ãùíßá";
+ Text[ korean ] = "½ÃÀÛ °¢µµ";
+ Text[ turkish ] = "Baþlangýç açýsý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_CIRCENDANGLE
+{
+ Text = "Endwinkel";
+ Text [ ENGLISH ] = "End angle" ;
+ Text[ english_us ] = "End angle";
+ Text[ portuguese ] = "Ângulo final";
+ Text[ russian ] = "Êîíå÷íûé óãîë";
+ Text[ dutch ] = "Eindhoek";
+ Text[ french ] = "Angle final";
+ Text[ spanish ] = "Angulo final";
+ Text[ italian ] = "Angolo fine";
+ Text[ danish ] = "Slutvinkel";
+ Text[ swedish ] = "Slutvinkel";
+ Text[ polish ] = "K¹t koñcowy";
+ Text[ portuguese_brazilian ] = "End angle";
+ Text[ japanese ] = "I‚¦‚éŠp“x";
+ Text[ chinese_simplified ] = "ÖÕ½áµÄ½Ç¶È";
+ Text[ chinese_traditional ] = "²×ºÝ¨¤«×";
+ Text[ arabic ] = "ÒÇæíÉ ÇáäåÇíÉ";
+ Text[ dutch ] = "Eindhoek";
+ Text[ chinese_simplified ] = "ÖÕ½áµÄ½Ç¶È";
+ Text[ greek ] = "ÔåëéêÞ ãùíßá";
+ Text[ korean ] = "³¡ °¢µµ";
+ Text[ turkish ] = "Bitiþ açýsý";
+};
+
+String SIP_SA_CIRCRESERVE0
+{
+ Text = "Kreis Reserve 0";
+ Text [ ENGLISH ] = "Circle reserved 0" ;
+ Text[ english_us ] = "Circle reserved for 0";
+ Text[ portuguese ] = "Círculo de reserva 0";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé ðàçìåð 0";
+ Text[ dutch ] = "Cirkelreserve 0";
+ Text[ french ] = "Réservé pour cercle 0";
+ Text[ spanish ] = "Círculo reserva 0";
+ Text[ italian ] = "Cerchio riservato 0";
+ Text[ danish ] = "Cirkel reserve 0";
+ Text[ swedish ] = "Cirkel reserverad för 0";
+ Text[ polish ] = "Zarezerwowane ko³o 0";
+ Text[ portuguese_brazilian ] = "Circle reserved 0";
+ Text[ japanese ] = "‰~ —\\”õ0";
+ Text[ chinese_simplified ] = "Ô²ÐÎÔ¤Áô 0";
+ Text[ chinese_traditional ] = "¶ê§Î¹w¯d 0";
+ Text[ arabic ] = "ÇáÏÇÆÑÉ ãÍÌæÒÉ áÜ 0";
+ Text[ dutch ] = "Cirkelreserve 0";
+ Text[ chinese_simplified ] = "Ô²ÐÎÔ¤Áô 0";
+ Text[ greek ] = "Êýêëïò åíáëëáêô. 0";
+ Text[ korean ] = "¿¹ºñ ¿ø 0";
+ Text[ turkish ] = "Daire - Yedek 0";
+};
+
+String SIP_SA_CIRCRESERVE1
+{
+ Text = "Kreis Reserve 1";
+ Text [ ENGLISH ] = "Circle reserved 1" ;
+ Text[ english_us ] = "Circle reserved for 1";
+ Text[ portuguese ] = "Círculo de reserva 1";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé ðàçìåð 1";
+ Text[ dutch ] = "Cirkelreserve 1";
+ Text[ french ] = "Réservé pour cercle 1";
+ Text[ spanish ] = "Círculo reserva 1";
+ Text[ italian ] = "Cerchio riservato 1";
+ Text[ danish ] = "Cirkel reserve 1";
+ Text[ swedish ] = "Cirkel reserverad för 1";
+ Text[ polish ] = "Zarezerwowane ko³o 1";
+ Text[ portuguese_brazilian ] = "Circle reserved 1";
+ Text[ japanese ] = "‰~ —\\”õ1";
+ Text[ chinese_simplified ] = "Ô²ÐÎÔ¤Áô 1";
+ Text[ chinese_traditional ] = "¶ê§Î¹w¯d 1";
+ Text[ arabic ] = "ÇáÏÇÆÑÉ ãÍÌæÒÉ áÜ 1";
+ Text[ dutch ] = "Cirkelreserve 1";
+ Text[ chinese_simplified ] = "Ô²ÐÎÔ¤Áô 1";
+ Text[ greek ] = "Êýêëïò åíáëëáêô. 1";
+ Text[ korean ] = "¿¹ºñ ¿ø 1";
+ Text[ turkish ] = "Daire - Yedek 1";
+};
+
+String SIP_SA_CIRCRESERVE2
+{
+ Text = "Kreis Reserve 2";
+ Text [ ENGLISH ] = "Circle reserved 2" ;
+ Text[ english_us ] = "Circle reserved for 2";
+ Text[ portuguese ] = "Círculo de reserva 2";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé ðàçìåð 2";
+ Text[ dutch ] = "Cirkelreserve 2";
+ Text[ french ] = "Réservé pour cercle 2";
+ Text[ spanish ] = "Círculo reserva 2";
+ Text[ italian ] = "Cerchio riservato 2";
+ Text[ danish ] = "Cirkel reserve 2";
+ Text[ swedish ] = "Cirkel reserverad för 2";
+ Text[ polish ] = "Zarezerwowane ko³o 2";
+ Text[ portuguese_brazilian ] = "Circle reserved 2";
+ Text[ japanese ] = "‰~ —\\”õ2";
+ Text[ chinese_simplified ] = "Ô²ÐÎÔ¤Áô 2";
+ Text[ chinese_traditional ] = "¶ê§Î¹w¯d 2";
+ Text[ arabic ] = "ÇáÏÇÆÑÉ ãÍÌæÒÉ áÜ 2";
+ Text[ dutch ] = "Cirkelreserve 2";
+ Text[ chinese_simplified ] = "Ô²ÐÎÔ¤Áô 2";
+ Text[ greek ] = "Êýêëïò åíáëëáêô. 2";
+ Text[ korean ] = "¿¹ºñ ¿ø 2";
+ Text[ turkish ] = "Daire - Yedek 2";
+};
+
+String SIP_SA_CIRCRESERVE3
+{
+ Text = "Kreis Reserve 3";
+ Text [ ENGLISH ] = "Circle reserved 3" ;
+ Text[ english_us ] = "Circle reserved for 3";
+ Text[ portuguese ] = "Círculo de reserva 3";
+ Text[ russian ] = "Çàðåçåðâèðîâàííûé ðàçìåð 3";
+ Text[ dutch ] = "Cirkelreserve 3";
+ Text[ french ] = "Réservé pour cercle 3";
+ Text[ spanish ] = "Círculo reserva 3";
+ Text[ italian ] = "Cerchio riservato 3";
+ Text[ danish ] = "Cirkel reserve 3";
+ Text[ swedish ] = "Cirkel reserverad för 3";
+ Text[ polish ] = "Zarezerwowane ko³o 3";
+ Text[ portuguese_brazilian ] = "Circle reserved 3";
+ Text[ japanese ] = "‰~ —\\”õ3";
+ Text[ chinese_simplified ] = "Ô²ÐÎÔ¤Áô 3";
+ Text[ chinese_traditional ] = "¶ê§Î¹w¯d 3";
+ Text[ arabic ] = "ÇáÏÇÆÑÉ ãÍÌæÒÉ áÜ 3";
+ Text[ dutch ] = "Cirkelreserve 3";
+ Text[ chinese_simplified ] = "Ô²ÐÎÔ¤Áô 3";
+ Text[ greek ] = "Êýêëïò åíáëëáêô. 3";
+ Text[ korean ] = "¿¹ºñ ¿ø 3";
+ Text[ turkish ] = "Daire - Yedek 3";
+};
+
+String SIP_SDRATTRSET_CIRC
+{
+ Text = "Kreisattribute";
+ Text [ ENGLISH ] = "Attributes of circle" ;
+ Text[ english_us ] = "Circle attributes";
+ Text[ portuguese ] = "Atributos de círculo";
+ Text[ russian ] = "Àòðèáóòû êðóãà";
+ Text[ dutch ] = "Cirkelattributen";
+ Text[ french ] = "Attributs du cercle";
+ Text[ spanish ] = "Atributos de círculo";
+ Text[ italian ] = "Attributi cerchio";
+ Text[ danish ] = "Cirkelattributter";
+ Text[ swedish ] = "Cirkelattribut";
+ Text[ polish ] = "Atrybuty ko³a";
+ Text[ portuguese_brazilian ] = "Attributes of circle";
+ Text[ japanese ] = "‰~‚Ì‘®«";
+ Text[ chinese_simplified ] = "Ô²ÐÎÊôÐÔ";
+ Text[ chinese_traditional ] = "¶ê§ÎÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáÏÇÆÑÉ";
+ Text[ dutch ] = "Cirkelattributen";
+ Text[ chinese_simplified ] = "Ô²ÐÎÊôÐÔ";
+ Text[ greek ] = "Éäéüôçôåò êýêëïõ";
+ Text[ korean ] = "¿ø ¼Ó¼º";
+ Text[ turkish ] = "Daire öznitelikleri";
+};
+
+String SIP_SA_OBJMOVEPROTECT
+{
+ Text = "Objektposition geschützt";
+ Text [ ENGLISH ] = "Protected object positon" ;
+ Text[ english_us ] = "Protected object positon";
+ Text[ portuguese ] = "Posição do objecto protegida";
+ Text[ russian ] = "Çàùèùåííàÿ ïîçèöèÿ îáúåêòà";
+ Text[ dutch ] = "Objectpositie beveiligd";
+ Text[ french ] = "Position d'objet protégée";
+ Text[ spanish ] = "Posición de objeto protegida";
+ Text[ italian ] = "Posizione oggetto protetta";
+ Text[ danish ] = "Beskyttet objektplacering";
+ Text[ swedish ] = "Objektposition skyddad";
+ Text[ polish ] = "Chroniona pozycja obiektu";
+ Text[ portuguese_brazilian ] = "Protected object positon";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä‚̈ʒu‚ð•ÛŒì";
+ Text[ chinese_simplified ] = "Êܱ£»¤µÄ¶ÔÏóλÖÃ";
+ Text[ chinese_traditional ] = "¨ü«OÅ@ªºª«¥ó¦ì¸m";
+ Text[ arabic ] = "ãæÖÚ ßÇÆä ãÍãí";
+ Text[ dutch ] = "Objectpositie beveiligd";
+ Text[ chinese_simplified ] = "Êܱ£»¤µÄ¶ÔÏóλÖÃ";
+ Text[ greek ] = "Ðñïóôáôåõüìåíç èÝóç áíôéêåéìÝíïõ";
+ Text[ korean ] = "°³Ã¼ À§Ä¡ º¸È£";
+ Text[ turkish ] = "Nesne konumu korumalý";
+};
+
+String SIP_SA_OBJSIZEPROTECT
+{
+ Text = "Objektgröße geschützt";
+ Text [ ENGLISH ] = "Protected object size" ;
+ Text[ english_us ] = "Protected object size";
+ Text[ portuguese ] = "Tamanho do ojceto protegido";
+ Text[ russian ] = "Çàùèùåííûé ðàçìåð îáúåêòà";
+ Text[ dutch ] = "Objectformaat beveiligd";
+ Text[ french ] = "Taille d'objet protégée";
+ Text[ spanish ] = "Tamaño de objeto protegido";
+ Text[ italian ] = "Dimensione oggetto protetta";
+ Text[ danish ] = "Beskyttet objektstørrelse";
+ Text[ swedish ] = "Objektstorlek skyddad";
+ Text[ polish ] = "Chroniony rozmiar obiektu";
+ Text[ portuguese_brazilian ] = "Protected object size";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä‚Ì»²½Þ‚ð•ÛŒì";
+ Text[ chinese_simplified ] = "Êܱ£»¤µÄ¶ÔÏó´óС";
+ Text[ chinese_traditional ] = "¨ü«OÅ@ªºª«¥ó¤j¤p";
+ Text[ arabic ] = "ÍÌã ßÇÆä ãÍãí";
+ Text[ dutch ] = "Objectformaat beveiligd";
+ Text[ chinese_simplified ] = "Êܱ£»¤µÄ¶ÔÏó´óС";
+ Text[ greek ] = "Ðñïóôáôåõüìåíï ìÝãåèïò áíôéêåéìÝíïõ";
+ Text[ korean ] = "°³Ã¼ Å©±â º¸È£";
+ Text[ turkish ] = "Nesne boyutu korumalý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_OBJPRINTABLE
+{
+ Text = "Objekt druckbar";
+ Text [ ENGLISH ] = "Object is printable" ;
+ Text[ english_us ] = "Object, printable";
+ Text[ portuguese ] = "Objecto imprimível";
+ Text[ russian ] = "Ïå÷àòàåìûé îáúåêò";
+ Text[ dutch ] = "Object afdrukbaar";
+ Text[ french ] = "Objet imprimable";
+ Text[ spanish ] = "Objeto imprimible";
+ Text[ italian ] = "Oggetto stampabile";
+ Text[ danish ] = "Objekt som kan udskrives";
+ Text[ swedish ] = "Objekt kan skrivas ut";
+ Text[ polish ] = "Obiekt drukowalny";
+ Text[ portuguese_brazilian ] = "Object is printable";
+ Text[ japanese ] = "µÌÞ¼Þª¸Äˆóü‰Â”\\";
+ Text[ chinese_simplified ] = "¿É´òÓ¡µÄ¶ÔÏó";
+ Text[ chinese_traditional ] = "¥i¦C¦Lªºª«¥ó";
+ Text[ arabic ] = "ÇáßÇÆä ÞÇÈá ááØÈÇÚÉ";
+ Text[ dutch ] = "Object afdrukbaar";
+ Text[ chinese_simplified ] = "¿É´òÓ¡µÄ¶ÔÏó";
+ Text[ greek ] = "Áíôéêåßìåíï åêôõðþóéìï";
+ Text[ korean ] = "°³Ã¼, Àμ⠰¡´É";
+ Text[ turkish ] = "Nesne yazdýrýlabilir";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_LAYERID
+{
+ Text = "Ebenenkennung";
+ Text [ ENGLISH ] = "Layer ID" ;
+ Text[ english_us ] = "Level ID";
+ Text[ portuguese ] = "Identificar níveis";
+ Text[ russian ] = "Èäåíèòôèêàöèÿ ñëîÿ";
+ Text[ dutch ] = "Niveau-ID";
+ Text[ french ] = "Identification du niveau";
+ Text[ spanish ] = "Identificación de niveles";
+ Text[ italian ] = "Livello identificazione";
+ Text[ danish ] = "Niveau-identifikation";
+ Text[ swedish ] = "Nivå-ID";
+ Text[ polish ] = "ID warstw";
+ Text[ portuguese_brazilian ] = "Layer ID";
+ Text[ japanese ] = "‘w‚Ì”FŽ¯";
+ Text[ chinese_simplified ] = "²ã±êʶ";
+ Text[ chinese_traditional ] = "¼h¼ÐÃÑ";
+ Text[ arabic ] = "ÊÚÑíÝ ÇáØÈÞÉ";
+ Text[ dutch ] = "Niveau-ID";
+ Text[ chinese_simplified ] = "²ã±êʶ";
+ Text[ greek ] = "Ôáõôüôçôá åðéðÝäïõ";
+ Text[ korean ] = "·¹º§ ID";
+ Text[ turkish ] = "Düzey tanýtýcýsý";
+};
+
+String SIP_SA_LAYERNAME
+{
+ Text = "Ebene";
+ Text [ ENGLISH ] = "Layer" ;
+ Text[ english_us ] = "Level";
+ Text[ portuguese ] = "Nível";
+ Text[ russian ] = "Ñëîé";
+ Text[ dutch ] = "Niveau";
+ Text[ french ] = "Niveau";
+ Text[ spanish ] = "Nivel";
+ Text[ italian ] = "Livello";
+ Text[ danish ] = "Niveau";
+ Text[ swedish ] = "Nivå";
+ Text[ polish ] = "Warstwa";
+ Text[ portuguese_brazilian ] = "Layer";
+ Text[ japanese ] = "‘w";
+ Text[ chinese_simplified ] = "²ã";
+ Text[ chinese_traditional ] = "¼h";
+ Text[ arabic ] = "ØÈÞÉ";
+ Text[ dutch ] = "Niveau";
+ Text[ chinese_simplified ] = "²ã";
+ Text[ greek ] = "Åðßðåäï";
+ Text[ korean ] = "·¹º§";
+ Text[ turkish ] = "Düzey";
+};
+
+String SIP_SA_OBJECTNAME
+{
+ Text = "Objektname";
+ Text [ ENGLISH ] = "Object name" ;
+ Text[ english_us ] = "Object name";
+ Text[ portuguese ] = "Nome do objecto";
+ Text[ russian ] = "Èìÿ îáúåêòà";
+ Text[ dutch ] = "Objectnaam";
+ Text[ french ] = "Nom d'objet";
+ Text[ spanish ] = "Nombre de objeto";
+ Text[ italian ] = "Nome oggetto";
+ Text[ danish ] = "Objektnavn";
+ Text[ swedish ] = "Objektnamn";
+ Text[ polish ] = "Nazwa obiektu";
+ Text[ portuguese_brazilian ] = "Object name";
+ Text[ japanese ] = "µÌÞ¼Þª¸Ä–¼";
+ Text[ chinese_simplified ] = "¶ÔÏóÃû³Æ";
+ Text[ chinese_traditional ] = "ª«¥ó¦WºÙ";
+ Text[ arabic ] = "ÇÓã ÇáßÇÆä";
+ Text[ dutch ] = "Objectnaam";
+ Text[ chinese_simplified ] = "¶ÔÏóÃû³Æ";
+ Text[ greek ] = "¼íïìá áíôéêåéìÝíïõ";
+ Text[ korean ] = "°³Ã¼ À̸§";
+ Text[ turkish ] = "Nesne adý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_ALLPOSITIONX
+{
+ Text = "X-Position gesamt";
+ Text [ ENGLISH ] = "All position X" ;
+ Text[ english_us ] = "Position X, complete";
+ Text[ portuguese ] = "Posição X para todos";
+ Text[ russian ] = "Ïîçèöèÿ X öåëèêîì";
+ Text[ dutch ] = "X-posities, totaal";
+ Text[ french ] = "Position X pour tout";
+ Text[ spanish ] = "Posición X, todo";
+ Text[ italian ] = "Posizione X completa";
+ Text[ danish ] = "X-position, samlet";
+ Text[ swedish ] = "X-position, totalt";
+ Text[ polish ] = "Pozycja X ³¹cznie";
+ Text[ portuguese_brazilian ] = "All position X";
+ Text[ japanese ] = "XˆÊ’u ‘S‘Ì";
+ Text[ chinese_simplified ] = "È«²¿µÄλÖà X";
+ Text[ chinese_traditional ] = "¥þ³¡¦ì¸m X";
+ Text[ arabic ] = "ßá ãæÖÚ Ó";
+ Text[ dutch ] = "X-posities, totaal";
+ Text[ chinese_simplified ] = "È«²¿µÄλÖà X";
+ Text[ greek ] = "ÈÝóç X, ðëÞñçò";
+ Text[ korean ] = "X À§Ä¡, Àüü";
+ Text[ turkish ] = "X konumu (tümü)";
+};
+
+String SIP_SA_ALLPOSITIONY
+{
+ Text = "Y-Position gesamt";
+ Text [ ENGLISH ] = "All position Y" ;
+ Text[ english_us ] = "Position Y, complete";
+ Text[ portuguese ] = "Posição Y para todos";
+ Text[ russian ] = "Ïîçèöèÿ Y öåëèêîì";
+ Text[ dutch ] = "Y-posities, totaal";
+ Text[ french ] = "Position Y pour tout";
+ Text[ spanish ] = "Posición Y, todo";
+ Text[ italian ] = "Positione Y completa";
+ Text[ danish ] = "Y-position, samlet";
+ Text[ swedish ] = "Y-postition, totalt";
+ Text[ polish ] = "Pozycja Y ³¹cznie";
+ Text[ portuguese_brazilian ] = "All position Y";
+ Text[ japanese ] = "YˆÊ’u ‘S‘Ì";
+ Text[ chinese_simplified ] = "È«²¿µÄλÖà Y";
+ Text[ chinese_traditional ] = "¥þ³¡¦ì¸m Y";
+ Text[ arabic ] = "ßá ãæÖÚ Õ";
+ Text[ dutch ] = "Y-posities, totaal";
+ Text[ chinese_simplified ] = "È«²¿µÄλÖà Y";
+ Text[ greek ] = "ÈÝóç Y, ðëÞñçò";
+ Text[ korean ] = "Y À§Ä¡, Àüü";
+ Text[ turkish ] = "Y konumu (tümü)";
+};
+
+String SIP_SA_ALLSIZEWIDTH
+{
+ Text = "Breite gesamt";
+ Text [ ENGLISH ] = "All size width" ;
+ Text[ english_us ] = "Width, complete";
+ Text[ portuguese ] = "Largura total";
+ Text[ russian ] = "Øèðèíà öåëèêîì";
+ Text[ dutch ] = "Breedte, totaal";
+ Text[ french ] = "Largeur totale";
+ Text[ spanish ] = "Ancho, todo";
+ Text[ italian ] = "Larghezza completa";
+ Text[ danish ] = "Bredde, samlet";
+ Text[ swedish ] = "Bredd totalt";
+ Text[ polish ] = "Szerokoœæ ³¹cznie";
+ Text[ portuguese_brazilian ] = "All size width";
+ Text[ japanese ] = "• ‘S‘Ì";
+ Text[ chinese_simplified ] = "×Ü¿í¶È";
+ Text[ chinese_traditional ] = "¥þ³¡¼e«×";
+ Text[ arabic ] = "ßá ÇáÚÑÖ";
+ Text[ dutch ] = "Breedte, totaal";
+ Text[ chinese_simplified ] = "×Ü¿í¶È";
+ Text[ greek ] = "ÐëÜôïò, ðëÞñçò";
+ Text[ korean ] = "³Êºñ, Àüü";
+ Text[ turkish ] = "Toplam geniþlik";
+};
+
+String SIP_SA_ALLSIZEHEIGHT
+{
+ Text = "Höhe gesamt";
+ Text [ ENGLISH ] = "All size height" ;
+ Text[ english_us ] = "Height, complete";
+ Text[ portuguese ] = "Altura total";
+ Text[ russian ] = "Âûñîòà öåëèêîì";
+ Text[ dutch ] = "Hoogte, totaal";
+ Text[ french ] = "Hauteur totale";
+ Text[ spanish ] = "Alto, todo";
+ Text[ italian ] = "Alttezza completa";
+ Text[ danish ] = "Højde, samlet";
+ Text[ swedish ] = "Höjd totalt";
+ Text[ polish ] = "Wysokoœæ ³¹cznie";
+ Text[ portuguese_brazilian ] = "All size height";
+ Text[ japanese ] = "‚‚³ ‘S‘Ì";
+ Text[ chinese_simplified ] = "×ܸ߶È";
+ Text[ chinese_traditional ] = "¥þ³¡°ª«×";
+ Text[ arabic ] = "ßá ÇáÇÑÊÝÇÚ";
+ Text[ dutch ] = "Hoogte, totaal";
+ Text[ chinese_simplified ] = "×ܸ߶È";
+ Text[ greek ] = "¾øïò, óõíïëéêÜ";
+ Text[ korean ] = "³ôÀÌ, Àüü";
+ Text[ turkish ] = "Toplam yükseklik";
+};
+
+String SIP_SA_ONEPOSITIONX
+{
+ Text = "X-Position einzeln";
+ Text [ ENGLISH ] = "Single X-Position" ;
+ Text[ english_us ] = "Single position X";
+ Text[ portuguese ] = "Posição X individual";
+ Text[ russian ] = "Ïîçèöèÿ X ïî îòäåëüíîñòè";
+ Text[ dutch ] = "X-positie, enkel";
+ Text[ french ] = "Position X individuelle";
+ Text[ spanish ] = "Posición X, individual";
+ Text[ italian ] = "Posizione X singola";
+ Text[ danish ] = "X-position, enkelt";
+ Text[ swedish ] = "X-position individuell";
+ Text[ polish ] = "Pozycja X pojedynczo";
+ Text[ portuguese_brazilian ] = "Single X-Position";
+ Text[ japanese ] = "XˆÊ’u •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸öλÖà X";
+ Text[ chinese_traditional ] = "³æ­Ó X ¦ì¸m";
+ Text[ arabic ] = "ÇáãæÖÚ Ó ãÝÑÏ";
+ Text[ dutch ] = "X-positie, enkel";
+ Text[ chinese_simplified ] = "µ¥¸öλÖà X";
+ Text[ greek ] = "ÈÝóç X ÷ùñéóôÜ";
+ Text[ korean ] = "X À§Ä¡, ´ÜÀÏ";
+ Text[ turkish ] = "X konumu (tek)";
+};
+
+String SIP_SA_ONEPOSITIONY
+{
+ Text = "Y-Position einzeln";
+ Text [ ENGLISH ] = "Single Y-Position" ;
+ Text[ english_us ] = "Single position Y";
+ Text[ portuguese ] = "Posição Y individual";
+ Text[ russian ] = "Ïîçèöèÿ Y ïî îòäåëüíîñòè";
+ Text[ dutch ] = "Y-positie, enkel";
+ Text[ french ] = "Position Y individuelle";
+ Text[ spanish ] = "Posición Y, individual";
+ Text[ italian ] = "Posizione Y singola";
+ Text[ danish ] = "Y-position, enkelt";
+ Text[ swedish ] = "Y-position individuell";
+ Text[ polish ] = "Pozycja Y pojedynczo";
+ Text[ portuguese_brazilian ] = "Single Y-Position";
+ Text[ japanese ] = "YˆÊ’u •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸öλÖà Y";
+ Text[ chinese_traditional ] = "³æ­Ó Y ¦ì¸m";
+ Text[ arabic ] = "ãæÖÚ Õ ãÝÑÏ";
+ Text[ dutch ] = "Y-positie, enkel";
+ Text[ chinese_simplified ] = "µ¥¸öλÖà Y";
+ Text[ greek ] = "ÈÝóç Y ÷ùñéóôÜ";
+ Text[ korean ] = "Y À§Ä¡, ´ÜÀÏ";
+ Text[ turkish ] = "Y konumu (tek)";
+};
+
+String SIP_SA_ONESIZEWIDTH
+{
+ Text = "Breite einzeln";
+ Text [ ENGLISH ] = "Single width" ;
+ Text[ english_us ] = "Single width";
+ Text[ portuguese ] = "Largura individual";
+ Text[ russian ] = "Øèðèíà ïî îòäåëüíîñòè";
+ Text[ dutch ] = "Breedte, enkel";
+ Text[ french ] = "Largeur individuelle";
+ Text[ spanish ] = "Ancho, individual";
+ Text[ italian ] = "Larghezza singola";
+ Text[ danish ] = "Bredde, enkelt";
+ Text[ swedish ] = "Individuell bredd";
+ Text[ polish ] = "SzerokoϾ pojedyncza";
+ Text[ portuguese_brazilian ] = "Single width";
+ Text[ japanese ] = "• •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸ö¿í¶È";
+ Text[ chinese_traditional ] = "³æ­Ó¼e«×";
+ Text[ arabic ] = "ÚÑÖ ãÝÑÏ";
+ Text[ dutch ] = "Breedte, enkel";
+ Text[ chinese_simplified ] = "µ¥¸ö¿í¶È";
+ Text[ greek ] = "ÐëÜôïò îå÷ùñéóôÜ";
+ Text[ korean ] = "´ÜÀÏ ³Êºñ";
+ Text[ turkish ] = "Geniþlik (tek)";
+};
+
+String SIP_SA_ONESIZEHEIGHT
+{
+ Text = "Höhe einzeln";
+ Text [ ENGLISH ] = "Single height" ;
+ Text[ english_us ] = "Single height";
+ Text[ portuguese ] = "Altura individual";
+ Text[ russian ] = "Âûñîòà ïî òäåëüíîñòè";
+ Text[ dutch ] = "Hoogte, enkel";
+ Text[ french ] = "Hauteur individuelle";
+ Text[ spanish ] = "Alto, individual";
+ Text[ italian ] = "Altezza singola";
+ Text[ danish ] = "Højde, enkelt";
+ Text[ swedish ] = "Individuell höjd";
+ Text[ polish ] = "WysokoϾ pojedyncza";
+ Text[ portuguese_brazilian ] = "Single height";
+ Text[ japanese ] = "‚‚³ •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸ö¸ß¶È";
+ Text[ chinese_traditional ] = "³æ­Ó°ª«×";
+ Text[ arabic ] = "ÇÑÊÝÇÚ ÝÑÏí";
+ Text[ dutch ] = "Hoogte, enkel";
+ Text[ chinese_simplified ] = "µ¥¸ö¸ß¶È";
+ Text[ greek ] = "¾øïò ìåìïíùìÝíá";
+ Text[ korean ] = "´ÜÀÏ ³ôÀÌ";
+ Text[ turkish ] = "Yükseklik (tek)";
+};
+
+String SIP_SA_LOGICSIZEWIDTH
+{
+ Text = "Breite logisch";
+ Text [ ENGLISH ] = "Logical width" ;
+ Text[ english_us ] = "Logical width";
+ Text[ portuguese ] = "Largura lógica";
+ Text[ russian ] = "Ëîãè÷åñêàÿ øèðèíà";
+ Text[ dutch ] = "Logische breedte";
+ Text[ french ] = "Largeur logique";
+ Text[ spanish ] = "Ancho, lógico";
+ Text[ italian ] = "Larghezza logica";
+ Text[ danish ] = "Bredde, logisk";
+ Text[ swedish ] = "Logisk bredd";
+ Text[ polish ] = "Logiczna szerokoϾ";
+ Text[ portuguese_brazilian ] = "Logical width";
+ Text[ japanese ] = "•K‘R“I‚È•";
+ Text[ chinese_simplified ] = "Âß¼­¿í¶È";
+ Text[ chinese_traditional ] = "ÅÞ¿è¼e«×";
+ Text[ arabic ] = "ÇáÚÑÖ ÇáãäØÞí";
+ Text[ dutch ] = "Logische breedte";
+ Text[ chinese_simplified ] = "Âß¼­¿í¶È";
+ Text[ greek ] = "Ëïãéêü ðëÜôïò";
+ Text[ korean ] = "³í¸®Àû ³Êºñ";
+ Text[ turkish ] = "Mantýksal geniþlik";
+};
+
+String SIP_SA_LOGICSIZEHEIGHT
+{
+ Text = "Höhe logisch";
+ Text [ ENGLISH ] = "Logical height" ;
+ Text[ english_us ] = "Logical height";
+ Text[ portuguese ] = "Altura lógica";
+ Text[ russian ] = "Ëîãè÷åñêàÿ âûñîòà";
+ Text[ dutch ] = "Logische hoogte";
+ Text[ french ] = "Hauteur logique";
+ Text[ spanish ] = "Alto, lógico";
+ Text[ italian ] = "Altezza logica";
+ Text[ danish ] = "Højde, logisk";
+ Text[ swedish ] = "Logisk höjd";
+ Text[ polish ] = "Logiczna wysokoϾ";
+ Text[ portuguese_brazilian ] = "Logical height";
+ Text[ japanese ] = "•K‘R“I‚È‚‚³";
+ Text[ chinese_simplified ] = "Âß¼­¸ß¶È";
+ Text[ chinese_traditional ] = "ÅÞ¿è°ª«×";
+ Text[ arabic ] = "ÇáÇÑÊÝÇÚ ÇáãäØÞí";
+ Text[ dutch ] = "Logische hoogte";
+ Text[ chinese_simplified ] = "Âß¼­¸ß¶È";
+ Text[ greek ] = "Ëïãéêü ýøïò";
+ Text[ korean ] = "³í¸®Àû ³ôÀÌ";
+ Text[ turkish ] = "Mantýksal yükseklik";
+};
+
+String SIP_SA_ROTATEANGLE
+{
+ Text = "Drehwinkel einzeln";
+ Text [ ENGLISH ] = "Single turn angle" ;
+ Text[ english_us ] = "Single rotation angle";
+ Text[ portuguese ] = "Ângulo de rotação individual";
+ Text[ russian ] = "Óãîë ïîâîðîòà ïî îòäåëüíîñòè";
+ Text[ dutch ] = "Draaihoek, enkel";
+ Text[ french ] = "Angle de rotation individuel";
+ Text[ spanish ] = "Angulo de rotación, individual";
+ Text[ italian ] = "Rotazione singola";
+ Text[ danish ] = "Rotationsvinkel, enkelt";
+ Text[ swedish ] = "Individuell rotationsvinkel";
+ Text[ polish ] = "Pojedynczy k¹t obrotowy";
+ Text[ portuguese_brazilian ] = "Single turn angle";
+ Text[ japanese ] = "‰ñ“]Šp“x •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸öÐýת½Ç¶È";
+ Text[ chinese_traditional ] = "³æ­Ó±ÛÂਤ«×";
+ Text[ arabic ] = "ÒÇæíÉ ÏæÑÇä ÝÑÏíÉ";
+ Text[ dutch ] = "Draaihoek, enkel";
+ Text[ chinese_simplified ] = "µ¥¸öÐýת½Ç¶È";
+ Text[ greek ] = "Ãùíßá ðåñéóôñïöÞò ìåìïíùìÝíá";
+ Text[ korean ] = "´ÜÀÏ È¸Àü °¢µµ";
+ Text[ turkish ] = "Dönüþ açýsý (tek)";
+};
+
+String SIP_SA_SHEARANGLE
+{
+ Text = "Scherwinkel einzeln";
+ Text [ ENGLISH ] = "Single shear angle" ;
+ Text[ english_us ] = "Single shear angle";
+ Text[ portuguese ] = "Ângulo de desvio individual";
+ Text[ russian ] = "Óãîë ñðåçà ïî îòäåëüíîñòè";
+ Text[ dutch ] = "Scheerhoek, enkel";
+ Text[ french ] = "Angle de cisaillement individuel";
+ Text[ spanish ] = "Angulo de desviación, individual";
+ Text[ italian ] = "Angolo di troncatura singolo";
+ Text[ danish ] = "Forskydningsvinkel, enkelt";
+ Text[ swedish ] = "Enstaka förskjutningvinkel";
+ Text[ polish ] = "Pojedynczy k¹t œcinania";
+ Text[ portuguese_brazilian ] = "Single shear angle";
+ Text[ japanese ] = "Ø‚èŽæ‚éŠp“x •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸öÈñ½Ç";
+ Text[ chinese_traditional ] = "³æ­Ó¾U¨¤¨¤«×";
+ Text[ arabic ] = "ÒÇæíÉ ÞÕ ãÝÑÏÉ";
+ Text[ dutch ] = "Scheerhoek, enkel";
+ Text[ chinese_simplified ] = "µ¥¸öÈñ½Ç";
+ Text[ greek ] = "Ãùíßá äéÜôìçóçò, ìåìïíùìÝíá";
+ Text[ korean ] = "´ÜÀÏ ±³Â÷ °¢µµ";
+ Text[ turkish ] = "Kesiþme açýsý (tek)";
+};
+
+String SIP_SA_MOVEX
+{
+ Text = "Horz. verschieben";
+ Text [ ENGLISH ] = "Move horizontally" ;
+ Text[ english_us ] = "Move horizontally";
+ Text[ portuguese ] = "Deslocar na horizontal";
+ Text[ russian ] = "Ãîðèçîíò. ñìåùåíèå";
+ Text[ dutch ] = "Horizontaal verplaatsen";
+ Text[ french ] = "Déplacer à l'horizontale";
+ Text[ spanish ] = "Desplazar horizontal";
+ Text[ italian ] = "Sposta orizz.";
+ Text[ danish ] = "Flyt vandret";
+ Text[ swedish ] = "Flytta horisontalt";
+ Text[ polish ] = "Przesuñ w poziomie";
+ Text[ portuguese_brazilian ] = "Move horizontally";
+ Text[ japanese ] = "¶‰E‚Ɉړ®";
+ Text[ chinese_simplified ] = "ˮƽ·½ÏòÒƶ¯";
+ Text[ chinese_traditional ] = "¤ô¥­¤è¦V²¾°Ê";
+ Text[ arabic ] = "ÇáÅÒÇÍÉ ÃÝÞíÇð";
+ Text[ dutch ] = "Horizontaal verplaatsen";
+ Text[ chinese_simplified ] = "ˮƽ·½ÏòÒƶ¯";
+ Text[ greek ] = "Ïñéæüíôéá ìåôáêßíçóç";
+ Text[ korean ] = "¼öÆò À̵¿";
+ Text[ turkish ] = "Yatay taþý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_MOVEY
+{
+ Text = "Vert. verschieben";
+ Text [ ENGLISH ] = "Move vertically" ;
+ Text[ english_us ] = "Move vertically";
+ Text[ portuguese ] = "Deslocar na vertical";
+ Text[ russian ] = "Âåðòèê. ñìåùåíèå";
+ Text[ dutch ] = "Verticaal verplaatsen";
+ Text[ french ] = "Déplacer à la verticale";
+ Text[ spanish ] = "Desplazar vertical";
+ Text[ italian ] = "Sposta vert.";
+ Text[ danish ] = "Flyt lodret";
+ Text[ swedish ] = "Flytta vertikalt";
+ Text[ polish ] = "Przesuñ w pionie";
+ Text[ portuguese_brazilian ] = "Move vertically";
+ Text[ japanese ] = "㉺‚Ɉړ®";
+ Text[ chinese_simplified ] = "´¹Ö±·½ÏòÒƶ¯";
+ Text[ chinese_traditional ] = "««ª½¤è¦V²¾°Ê";
+ Text[ arabic ] = "ÇáÅÒÇÍÉ ÑÃÓíÇð";
+ Text[ dutch ] = "Verticaal verplaatsen";
+ Text[ chinese_simplified ] = "´¹Ö±·½ÏòÒƶ¯";
+ Text[ greek ] = "Êáôáêüñõöç ìåôáêßíçóç";
+ Text[ korean ] = "¼öÁ÷ À̵¿";
+ Text[ turkish ] = "Dikey taþý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_RESIZEXONE
+{
+ Text = "Resize X einzeln";
+ Text [ ENGLISH ] = "Single resize X" ;
+ Text[ english_us ] = "Resize X, single";
+ Text[ portuguese ] = "Redimensionar apenas X";
+ Text[ russian ] = "Èçìåíèòü ðàçìåð X ïî îòäåëüíîñòè";
+ Text[ dutch ] = "Herschalen X, enkel";
+ Text[ french ] = "Redimensionner uniquement X";
+ Text[ spanish ] = "Redimensión X, individual";
+ Text[ italian ] = "Ridimensiona X singolarmente";
+ Text[ danish ] = "Redimensioner X, enkelt";
+ Text[ swedish ] = "Återställ X individuellt";
+ Text[ polish ] = "Zmieñ rozmiar X pojedynczo";
+ Text[ portuguese_brazilian ] = "Single resize X";
+ Text[ japanese ] = "Ø»²½ÞX •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸ö±ä»¯´óС X";
+ Text[ chinese_traditional ] = "³æ­ÓÅܤƤj¤p X";
+ Text[ arabic ] = "ÊÛííÑ ÍÌã ÝÑÏí (Ó)";
+ Text[ dutch ] = "Herschalen X, enkel";
+ Text[ chinese_simplified ] = "µ¥¸ö±ä»¯´óС X";
+ Text[ greek ] = "Ôñïðïðïßçóç ìåãÝèïõò X, îå÷ùñéóôÜ";
+ Text[ korean ] = "Å©±â º¯°æ X, ´ÜÀÏ";
+ Text[ turkish ] = "X için yeni boyut (tek)";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_RESIZEYONE
+{
+ Text = "Resize Y einzeln";
+ Text [ ENGLISH ] = "Single resize Y" ;
+ Text[ english_us ] = "Resize Y, single";
+ Text[ portuguese ] = "Redimensionar apenas Y";
+ Text[ russian ] = "Èçìåíèòü ðàçìåð Y ïî îòäåëüíîñòè";
+ Text[ dutch ] = "Herschalen Y";
+ Text[ french ] = "Redimensionner uniquement Y";
+ Text[ spanish ] = "Redimensión Y, individual";
+ Text[ italian ] = "Ridimensiona Y singolarmente";
+ Text[ danish ] = "Redimensioner Y, enkelt";
+ Text[ swedish ] = "Återställ Y individuellt";
+ Text[ polish ] = "Zmieñ rozmiar Y pojedynczo";
+ Text[ portuguese_brazilian ] = "Single resize Y";
+ Text[ japanese ] = "Ø»²½ÞY •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸ö±ä»¯´óС Y";
+ Text[ chinese_traditional ] = "³æ­ÓÅܤƤj¤p Y";
+ Text[ arabic ] = "ÊÛííÑ ÍÌã ÝÑÏí (Õ)";
+ Text[ dutch ] = "Herschalen Y";
+ Text[ chinese_simplified ] = "µ¥¸ö±ä»¯´óС Y";
+ Text[ greek ] = "Ôñïðïðïßçóç ìåãÝèïõò Y, îå÷ùñéóôÜ";
+ Text[ korean ] = "Å©±â º¯°æ Y, ´ÜÀÏ";
+ Text[ turkish ] = "Y için yeni boyut (tek)";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_ROTATEONE
+{
+ Text = "Drehen einzeln";
+ Text [ ENGLISH ] = "Single rotate" ;
+ Text[ english_us ] = "Single rotation";
+ Text[ portuguese ] = "Rotação individual";
+ Text[ russian ] = "Âðàùàòü ïî îòäåëüíîñòè";
+ Text[ dutch ] = "Roteren, enkel";
+ Text[ french ] = "Rotation individuelle";
+ Text[ spanish ] = "Rodar, individual";
+ Text[ italian ] = "Rotazione singola";
+ Text[ danish ] = "Roter, enkelt";
+ Text[ swedish ] = "Individuell rotation";
+ Text[ polish ] = "Obróæ pojedynczo";
+ Text[ portuguese_brazilian ] = "Single rotate";
+ Text[ japanese ] = "‰ñ“] •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸öÐýת";
+ Text[ chinese_traditional ] = "³æ­Ó±ÛÂà";
+ Text[ arabic ] = "ÇÓÊÏÇÑÉ ãÝÑÏÉ";
+ Text[ dutch ] = "Roteren, enkel";
+ Text[ chinese_simplified ] = "µ¥¸öÐýת";
+ Text[ greek ] = "ÐåñéóôñïöÞ, ìåìïíùìÝíá";
+ Text[ korean ] = "´ÜÀÏ È¸Àü";
+ Text[ turkish ] = "Döndür (tek)";
+};
+
+String SIP_SA_HORZSHEARONE
+{
+ Text = "Scheren horz. einzeln";
+ Text [ ENGLISH ] = "Single horizontal shear" ;
+ Text[ english_us ] = "Single horizontal shear";
+ Text[ portuguese ] = "Desvio horizontal individual";
+ Text[ russian ] = "Ñðåçàòü ãîðèçîíòàëüíî ïî îòäåëüíîñòè";
+ Text[ dutch ] = "Scheren horiz., enkel";
+ Text[ french ] = "Cisaillement horiz. individuel";
+ Text[ spanish ] = "Cortar horiz., individual";
+ Text[ italian ] = "Troncatura orizz. singola";
+ Text[ danish ] = "Forskyd vandret, enkelt";
+ Text[ swedish ] = "Skär horisontalt enstaka";
+ Text[ polish ] = "Ciêcie pojedyncze w poziomie";
+ Text[ portuguese_brazilian ] = "Single horizontal shear";
+ Text[ japanese ] = "¶‰E‚ÉØ‚èŽæ‚é •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸öˮƽ·½Ïò¼ôÏÂ";
+ Text[ chinese_traditional ] = "³æ­Ó¤ô¥­¤è¦V¾U¨¤";
+ Text[ arabic ] = "ÞÕ ÃÝÞí ÝÑÏí";
+ Text[ dutch ] = "Scheren horiz., enkel";
+ Text[ chinese_simplified ] = "µ¥¸öˮƽ·½Ïò¼ôÏÂ";
+ Text[ greek ] = "Ïñéæüíôéá äéÜôìçóç, ìåìïíùìÝíá";
+ Text[ korean ] = "¼öÆòÀ¸·Î ´ÜÀÏ ±³Â÷";
+ Text[ turkish ] = "Yatay kesiþme (tek)";
+};
+
+String SIP_SA_VERTSHEARONE
+{
+ Text = "Scheren vert. einzeln";
+ Text [ ENGLISH ] = "Single vertical shear" ;
+ Text[ english_us ] = "Single vertical shear";
+ Text[ portuguese ] = "Desvio vertical individual";
+ Text[ russian ] = "Ñðåçàòü ïî âåðòèêàëè ïî îòäåëüíîñòè";
+ Text[ dutch ] = "Scheren vert., enkel";
+ Text[ french ] = "Cisaillement vert. individuel";
+ Text[ spanish ] = "Cortar vert., individual";
+ Text[ italian ] = "Troncatura vert. singola";
+ Text[ danish ] = "Forskyd lodret, enkelt";
+ Text[ swedish ] = "Skär vertikalt enstaka";
+ Text[ polish ] = "Ciêcie pojedyncze w pionie";
+ Text[ portuguese_brazilian ] = "Single vertical shear";
+ Text[ japanese ] = "㉺‚ÉØ‚èŽæ‚é •ÊX";
+ Text[ chinese_simplified ] = "µ¥¸ö´¹Ö±·½Ïò¼ôÏÂ";
+ Text[ chinese_traditional ] = "³æ­Ó««ª½¤è¦V¾U¨¤";
+ Text[ arabic ] = "ÞÕ ÑÃÓí ãÝÑÏ";
+ Text[ dutch ] = "Scheren vert., enkel";
+ Text[ chinese_simplified ] = "µ¥¸ö´¹Ö±·½Ïò¼ôÏÂ";
+ Text[ greek ] = "Êáôáêüñõöç äéÜôìçóç, ìåìïíùìÝíá";
+ Text[ korean ] = "¼öÁ÷À¸·Î ´ÜÀÏ ±³Â÷";
+ Text[ turkish ] = "Dikey kesiþme (tek)";
+};
+
+String SIP_SA_RESIZEXALL
+{
+ Text = "Resize X gesamt";
+ Text [ ENGLISH ] = "All resize X" ;
+ Text[ english_us ] = "Resize X, complete";
+ Text[ portuguese ] = "Redimensionar X, todos";
+ Text[ russian ] = "Èçìåíèòü ðàçìåðû X öåëèêîì";
+ Text[ dutch ] = "Herschalen X, compleet";
+ Text[ french ] = "Redimensionner X pour tout";
+ Text[ spanish ] = "Redimensión X, todo";
+ Text[ italian ] = "Risimensiona X completamente";
+ Text[ danish ] = "Redimensioner X, samlet";
+ Text[ swedish ] = "Återställ X totalt";
+ Text[ polish ] = "Zmieñ rozmiar X ³¹cznie";
+ Text[ portuguese_brazilian ] = "All resize X";
+ Text[ japanese ] = "Ø»²½ÞX ‘S‘Ì";
+ Text[ chinese_simplified ] = "È«²¿±ä»¯´óС X";
+ Text[ chinese_traditional ] = "¥þ³¡¤j¤pÅÜ¤Æ X";
+ Text[ arabic ] = "ÊÛííÑ ÍÌã Ó ßáíÇð";
+ Text[ dutch ] = "Herschalen X, compleet";
+ Text[ chinese_simplified ] = "È«²¿±ä»¯´óС X";
+ Text[ greek ] = "Ôñïðïðïßçóç ìåãÝèïõò X, óõíïëéêÜ";
+ Text[ korean ] = "Å©±â º¯°æ X, Àüü";
+ Text[ turkish ] = "X için yeni boyut (tümü)";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_RESIZEYALL
+{
+ Text = "Resize Y gesamt";
+ Text [ ENGLISH ] = "All resize Y" ;
+ Text[ english_us ] = "Resize Y, complete";
+ Text[ portuguese ] = "Redimensionar Y, todos";
+ Text[ russian ] = "Èçìåíèòü ðàçìåðû Y öåëèêîì";
+ Text[ dutch ] = "Herschalen Y, compleet";
+ Text[ french ] = "Redimensionner Y pour tout";
+ Text[ spanish ] = "Redimensión Y, todo";
+ Text[ italian ] = "Ridimensiona Y completamente";
+ Text[ danish ] = "Redimensioner Y, samlet";
+ Text[ swedish ] = "Återställ Y totalt";
+ Text[ polish ] = "Zmieñ rozmiar Y ³¹cznie";
+ Text[ portuguese_brazilian ] = "All resize Y";
+ Text[ japanese ] = "Ø»²½ÞY ‘S‘Ì";
+ Text[ chinese_simplified ] = "È«²¿±ä»¯´óС Y";
+ Text[ chinese_traditional ] = "¥þ³¡ÅܤƤj¤p Y";
+ Text[ arabic ] = "ÊÛííÑ ÍÌã Õ ßáíÇð";
+ Text[ dutch ] = "Herschalen Y, compleet";
+ Text[ chinese_simplified ] = "È«²¿±ä»¯´óС Y";
+ Text[ greek ] = "Ôñïðïðïßçóç ìåãÝèïõò Y, óõíïëéêÜ";
+ Text[ korean ] = "Å©±â º¯°æ Y, Àüü";
+ Text[ turkish ] = "Y için yeni boyut (tümü)";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_ROTATEALL
+{
+ Text = "Drehen gesamt";
+ Text [ ENGLISH ] = "All turn" ;
+ Text[ english_us ] = "Rotate all";
+ Text[ portuguese ] = "Rodar todos";
+ Text[ russian ] = "Âðàùàòü öåëèêîì";
+ Text[ dutch ] = "Draaien, compleet";
+ Text[ french ] = "Rotation pour tout";
+ Text[ spanish ] = "Rodar, todo";
+ Text[ italian ] = "Ruota completamente";
+ Text[ danish ] = "Roter, samlet";
+ Text[ swedish ] = "Rotera totalt";
+ Text[ polish ] = "Obrót ³¹cznie";
+ Text[ portuguese_brazilian ] = "All turn";
+ Text[ japanese ] = "‰ñ“] ‘S‘Ì";
+ Text[ chinese_simplified ] = "È«²¿µÄÐýת";
+ Text[ chinese_traditional ] = "¥þ³¡±ÛÂà";
+ Text[ arabic ] = "ÇÓÊÏÇÑÉ Çáßá";
+ Text[ dutch ] = "Draaien, compleet";
+ Text[ chinese_simplified ] = "È«²¿µÄÐýת";
+ Text[ greek ] = "ÓôñïöÞ, ðëÞñçò";
+ Text[ korean ] = "Àüü ȸÀü";
+ Text[ turkish ] = "Döndür (tümü)";
+};
+
+String SIP_SA_HORZSHEARALL
+{
+ Text = "Scheren horz. gesamt";
+ Text [ ENGLISH ] = "All shear horizontal" ;
+ Text[ english_us ] = "Shear horizontal, complete";
+ Text[ portuguese ] = "Desvio horizontal, tudo";
+ Text[ russian ] = "Ñðåçàòü ïî ãîðèçîíòàëè öåëèêîì";
+ Text[ dutch ] = "Scheren, compleet";
+ Text[ french ] = "Cisaillement horiz. pour tout";
+ Text[ spanish ] = "Cortar horiz., todo";
+ Text[ italian ] = "Tronca tutto orizz.";
+ Text[ danish ] = "Forskyd vandret, samlet";
+ Text[ swedish ] = "Skär horisontalt totalt";
+ Text[ polish ] = "Ciêcie w poziomie ³¹cznie";
+ Text[ portuguese_brazilian ] = "All shear horizontal";
+ Text[ japanese ] = "¶‰E‚ÉØ‚èŽæ‚é ‘S‘Ì";
+ Text[ chinese_simplified ] = "È«²¿Ë®Æ½·½ÏòµÄ¼ôÏÂ";
+ Text[ chinese_traditional ] = "¥þ³¡¤ô¥­¤è¦V¾U¨¤";
+ Text[ arabic ] = "ÞÕ ÃÝÞí ßáí";
+ Text[ dutch ] = "Scheren, compleet";
+ Text[ chinese_simplified ] = "È«²¿Ë®Æ½·½ÏòµÄ¼ôÏÂ";
+ Text[ greek ] = "Ïñéæüíôéá äéÜôìçóç, óýíïëï";
+ Text[ korean ] = "¼öÆòÀ¸·Î Àüü ȸÀü";
+ Text[ turkish ] = "Yatay kesiþme (tümü)";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_VERTSHEARALL
+{
+ Text = "Scheren vert. gesamt";
+ Text [ ENGLISH ] = "All shear vertical" ;
+ Text[ english_us ] = "Shear vertical, complete";
+ Text[ portuguese ] = "Desvio vertical, tudo";
+ Text[ russian ] = "Ñðåçàòü ïî âåðòèêàëè öåëèêîì";
+ Text[ dutch ] = "Verticaal scheren, compleet";
+ Text[ french ] = "Cisaillement horiz. pour tout";
+ Text[ spanish ] = "Cortar vert., todo";
+ Text[ italian ] = "Tronca tutto vert.";
+ Text[ danish ] = "Forskyd lodret, samlet";
+ Text[ swedish ] = "Skär vertikalt totalt";
+ Text[ polish ] = "Ciêcie w pionie ³¹cznie";
+ Text[ portuguese_brazilian ] = "All shear vertical";
+ Text[ japanese ] = "㉺‚ÉØ‚èŽæ‚é ‘S‘Ì";
+ Text[ chinese_simplified ] = "È«²¿´¹Ö±·½ÏòµÄ¼ôÏÂ";
+ Text[ chinese_traditional ] = "¥þ³¡««ª½¤è¦Vªº¾U¨¤";
+ Text[ arabic ] = "ÞÕ ÑÃÓí ßáí";
+ Text[ dutch ] = "Verticaal scheren, compleet";
+ Text[ chinese_simplified ] = "È«²¿´¹Ö±·½ÏòµÄ¼ôÏÂ";
+ Text[ greek ] = "Êáôáêüñõöç äéÜôìçóç, óõíïëéêÜ";
+ Text[ korean ] = "¼öÁ÷À¸·Î Àüü ±³Â÷";
+ Text[ turkish ] = "Dikey kesiþme (tümü)";
+};
+
+String SIP_SA_TRANSFORMREF1X
+{
+ Text = "Referenzpunkt 1 X";
+ Text [ ENGLISH ] = "Reference point 1 X" ;
+ Text[ english_us ] = "Reference point 1 X";
+ Text[ portuguese ] = "Ponto de referência 1 X";
+ Text[ russian ] = "Òî÷êà îòñ÷åòà 1 X";
+ Text[ dutch ] = "Referentiepunt 1 X";
+ Text[ french ] = "Point de référence 1 X";
+ Text[ spanish ] = "Punto de referencia 1 X";
+ Text[ italian ] = "Punto di riferimento 1 X";
+ Text[ danish ] = "Referencepunkt 1 X";
+ Text[ swedish ] = "Referenspunkt 1 X";
+ Text[ polish ] = "Punkt odwo³ania 1 X";
+ Text[ portuguese_brazilian ] = "Reference point 1 X";
+ Text[ japanese ] = "ŽQÆ“_1 X";
+ Text[ chinese_simplified ] = "²ÎÕÕµã 1 X";
+ Text[ chinese_traditional ] = "°Ñ·ÓÂI 1 X";
+ Text[ arabic ] = "ÇáäÞØÉ ÇáãÑÌÚíÉ 1 Ó";
+ Text[ dutch ] = "Referentiepunt 1 X";
+ Text[ chinese_simplified ] = "²ÎÕÕµã 1 X";
+ Text[ greek ] = "Óçìåßï áíáöïñÜò 1 X";
+ Text[ korean ] = "ÂüÁ¶ Æ÷ÀÎÆ® 1 X";
+ Text[ turkish ] = "Referans noktasý 1 X";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_TRANSFORMREF1Y
+{
+ Text = "Referenzpunkt 1 Y";
+ Text [ ENGLISH ] = "Reference point 1 Y" ;
+ Text[ english_us ] = "Reference point 1 Y";
+ Text[ portuguese ] = "Ponto de referência 1 Y";
+ Text[ russian ] = "Òî÷êà îòñ÷åòà 1 Y";
+ Text[ dutch ] = "Referentiepunt 1 Y";
+ Text[ french ] = "Point de référence 1 Y";
+ Text[ spanish ] = "Punto de referencia 1 Y";
+ Text[ italian ] = "Punto di riferimento 1 Y";
+ Text[ danish ] = "Referencepunkt 1 Y";
+ Text[ swedish ] = "Referenspunkt 1 Y";
+ Text[ polish ] = "Punkt odwo³ania 1 Y";
+ Text[ portuguese_brazilian ] = "Reference point 1 Y";
+ Text[ japanese ] = "ŽQÆ“_1 Y";
+ Text[ chinese_simplified ] = "²ÎÕÕµã 1 Y";
+ Text[ chinese_traditional ] = "°Ñ·ÓÂI 1 Y";
+ Text[ arabic ] = "ÇáäÞØÉ ÇáãÑÌÚíÉ 1 Õ";
+ Text[ dutch ] = "Referentiepunt 1 Y";
+ Text[ chinese_simplified ] = "²ÎÕÕµã 1 Y";
+ Text[ greek ] = "Óçìåßï áíáöïñÜò 1 Y";
+ Text[ korean ] = "ÂüÁ¶ Æ÷ÀÎÆ® 1 Y";
+ Text[ turkish ] = "Referans noktasý 1 Y";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_TRANSFORMREF2X
+{
+ Text = "Referenzpunkt 2 X";
+ Text [ ENGLISH ] = "Reference point 2 X" ;
+ Text[ english_us ] = "Reference point 2 X";
+ Text[ portuguese ] = "Ponto de referência 2 X";
+ Text[ russian ] = "Òî÷êà îòñ÷åòà 2 X";
+ Text[ dutch ] = "Referentiepunt 2 X";
+ Text[ french ] = "Point de référence 2 X";
+ Text[ spanish ] = "Punto de referencia 2 X";
+ Text[ italian ] = "Punto di riferimento 2 X";
+ Text[ danish ] = "Referencepunkt 2 X";
+ Text[ swedish ] = "Referenspunkt 2 X";
+ Text[ polish ] = "Punkt odwo³ania 2 X";
+ Text[ portuguese_brazilian ] = "Reference point 2 X";
+ Text[ japanese ] = "ŽQÆ“_2 X";
+ Text[ chinese_simplified ] = "²ÎÕÕµã 2 X";
+ Text[ chinese_traditional ] = "°Ñ·ÓÂI 2 X";
+ Text[ arabic ] = "ÇáäÞØÉ ÇáãÑÌÚíÉ 2 Ó";
+ Text[ dutch ] = "Referentiepunt 2 X";
+ Text[ chinese_simplified ] = "²ÎÕÕµã 2 X";
+ Text[ greek ] = "Óçìåßï áíáöïñÜò 2 X";
+ Text[ korean ] = "ÂüÁ¶ Æ÷ÀÎÆ® 2 X";
+ Text[ turkish ] = "Referans noktasý 2 X";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_SA_TRANSFORMREF2Y
+{
+ Text = "Referenzpunkt 2 Y";
+ Text [ ENGLISH ] = "Reference point 2 Y" ;
+ Text[ english_us ] = "Reference point 2 Y";
+ Text[ portuguese ] = "Ponto de referência 2 Y";
+ Text[ russian ] = "Òî÷êà îòñ÷åòà 2 Y";
+ Text[ dutch ] = "Referentiepunt 2 Y";
+ Text[ french ] = "Point de référence 2 Y";
+ Text[ spanish ] = "Punto de referencia 2 Y";
+ Text[ italian ] = "Punto di riferimento 2 Y";
+ Text[ danish ] = "Referencepunkt 2 Y";
+ Text[ swedish ] = "Referenspunkt 2 Y";
+ Text[ polish ] = "Punkt odwo³ania 2 Y";
+ Text[ portuguese_brazilian ] = "Reference point 2 Y";
+ Text[ japanese ] = "ŽQÆ“_2 Y";
+ Text[ chinese_simplified ] = "²ÎÕÕµã 2 Y";
+ Text[ chinese_traditional ] = "°Ñ·ÓÂI 2 Y";
+ Text[ arabic ] = "ÇáäÞØÉ ÇáãÑÌÚíÉ 2 Õ";
+ Text[ dutch ] = "Referentiepunt 2 Y";
+ Text[ chinese_simplified ] = "²ÎÕÕµã 2 Y";
+ Text[ greek ] = "Óçìåßï áíáöïñÜò 2 Y";
+ Text[ korean ] = "ÂüÁ¶ Æ÷ÀÎÆ® 2 Y";
+ Text[ turkish ] = "Referans noktasý 2 Y";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_PARA_HYPHENATE
+{
+ Text = "Silbentrennung";
+ Text [ ENGLISH ] = "Hyphentation" ;
+ Text[ english_us ] = "Hyphentation";
+ Text[ portuguese ] = "Divisão silábica";
+ Text[ russian ] = "Ðàññòàíîâêà ïåðåíîñîâ";
+ Text[ dutch ] = "Woordafbreking";
+ Text[ french ] = "Coupure de mot";
+ Text[ spanish ] = "Separación silábica";
+ Text[ italian ] = "Sillabazione";
+ Text[ danish ] = "Orddeling";
+ Text[ swedish ] = "Avstavning";
+ Text[ polish ] = "Dzielenie wyrazów";
+ Text[ portuguese_brazilian ] = "Hyphentation";
+ Text[ japanese ] = "ʲÌÈ°¼®Ý";
+ Text[ chinese_simplified ] = "Á¬×Ö·û";
+ Text[ chinese_traditional ] = "³s¦r²Å";
+ Text[ arabic ] = "ÝÕá ÇáãÞÇØÚ";
+ Text[ dutch ] = "Woordafbreking";
+ Text[ chinese_simplified ] = "Á¬×Ö·û";
+ Text[ greek ] = "Óõëëáâéóìüò";
+ Text[ korean ] = "ÇÏÀÌÇ ³Ö±â";
+ Text[ turkish ] = "Heceleme";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_PARA_BULLETSTATE
+{
+ Text = "Aufzählungszeichen anzeigen";
+ Text [ ENGLISH ] = "Show bullet" ;
+ Text[ english_us ] = "Show bullets";
+ Text[ portuguese ] = "Mostrar marcas";
+ Text[ russian ] = "Ïîêàçàòü ìàðêåðû ñïèñêà";
+ Text[ dutch ] = "Opsommingsteken weergeven";
+ Text[ french ] = "Afficher les puces";
+ Text[ spanish ] = "Mostrar viñeta";
+ Text[ italian ] = "Mostra caratteri per la numerazione";
+ Text[ danish ] = "Vis punkttegn";
+ Text[ swedish ] = "Visa uppräkningstecken";
+ Text[ polish ] = "Poka¿ znaki wypunktowania";
+ Text[ portuguese_brazilian ] = "Show bullet";
+ Text[ japanese ] = "‰Óð‘‚«‹L†‚Æ’i—Ž”Ô†‚Ì•\\Ž¦";
+ Text[ chinese_simplified ] = "ÏÔʾ±àºÅ";
+ Text[ chinese_traditional ] = "Åã¥Ü½s¸¹";
+ Text[ arabic ] = "ÅÙåÇÑ ÚáÇãÇÊ ÇáÊÚÏÇÏ";
+ Text[ dutch ] = "Opsommingsteken weergeven";
+ Text[ chinese_simplified ] = "ÏÔʾ±àºÅ";
+ Text[ greek ] = "ÅìöÜíéóç óõìâüëùí áñßèìçóçò";
+ Text[ korean ] = "±Û¸Ó¸®Ç¥ Ç¥½Ã";
+ Text[ turkish ] = "Madde iþaretlerini göster";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_PARA_OUTLLRSPACE
+{
+ Text = "Einzüge bei Aufzählung";
+ Text [ ENGLISH ] = "Indent of enumeration" ;
+ Text[ english_us ] = "Numbering indents";
+ Text[ portuguese ] = "Avançar numeração";
+ Text[ russian ] = "Îòñòóïû â ñïèñêå";
+ Text[ dutch ] = "Inspringing bij opsomming";
+ Text[ french ] = "Retraits des puces";
+ Text[ spanish ] = "Sangría en enumeración";
+ Text[ italian ] = "Rientri nella numerazione";
+ Text[ danish ] = "Indrykning ved punktopstilling";
+ Text[ swedish ] = "Indrag vid uppräkning";
+ Text[ polish ] = "Wciêcia przy wyliczaniu";
+ Text[ portuguese_brazilian ] = "Indent of enumeration";
+ Text[ japanese ] = "±³Äײ݂̲ÝÃÞÝÄ";
+ Text[ chinese_simplified ] = "±àºÅËõ½ø";
+ Text[ chinese_traditional ] = "½s¸¹ÁY±Æ";
+ Text[ arabic ] = "Úãá ÅÒÇÍÇÊ ÚäÏ ÇáÊÚÏÇÏ";
+ Text[ dutch ] = "Inspringing bij opsomming";
+ Text[ chinese_simplified ] = "±àºÅËõ½ø";
+ Text[ greek ] = "Åóï÷Ýò êáôÜ ôçí áñßèìçóç";
+ Text[ korean ] = "±Û¸Ó¸®Ç¥¿¡¼­ µé¿© ¾²±â";
+ Text[ turkish ] = "Numaralama için girintiler";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_PARA_OUTLLEVEL
+{
+ Text = "Aufzählungsebene";
+ Text [ ENGLISH ] = "Layer of enumeration" ;
+ Text[ english_us ] = "Numbering level";
+ Text[ portuguese ] = "Nível de numeração";
+ Text[ russian ] = "Ñëîé ñïèñêà";
+ Text[ dutch ] = "Nummeringsniveau";
+ Text[ french ] = "Niveau d'énumération";
+ Text[ spanish ] = "Nivel de enumeración";
+ Text[ italian ] = "Livello di numerazione";
+ Text[ danish ] = "Punktopstillingsniveau";
+ Text[ swedish ] = "Uppräkningsnivå";
+ Text[ polish ] = "Warstwa wypunktowania";
+ Text[ portuguese_brazilian ] = "Layer of enumeration";
+ Text[ japanese ] = "±³Äײ݂ÌÚÍÞÙ";
+ Text[ chinese_simplified ] = "±àºÅ²ã";
+ Text[ chinese_traditional ] = "½s¸¹¼h¦¸";
+ Text[ arabic ] = "ãÓÊæì ÇáÊÚÏÇÏ";
+ Text[ dutch ] = "Nummeringsniveau";
+ Text[ chinese_simplified ] = "±àºÅ²ã";
+ Text[ greek ] = "Åðßðåäï áñßèìçóçò";
+ Text[ korean ] = "±Û¸Ó¸®Ç¥ ·¹º§";
+ Text[ turkish ] = "Numaralama düzeyi";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_PARA_BULLET
+{
+ Text = "Aufzählungszeichen";
+ Text [ ENGLISH ] = "Character of enumeration" ;
+ Text[ english_us ] = "Bullets and Numberings";
+ Text[ portuguese ] = "Marcas e numeração";
+ Text[ russian ] = "Ñèìâîëû ñïèñêà";
+ Text[ dutch ] = "Nummeringsteken";
+ Text[ french ] = "Puces";
+ Text[ spanish ] = "Viñeta";
+ Text[ italian ] = "Carattere per elenchi numerati";
+ Text[ danish ] = "Punkttegn";
+ Text[ swedish ] = "Uppräkningstecken";
+ Text[ polish ] = "Znaki wypunktowania";
+ Text[ portuguese_brazilian ] = "Character of enumeration";
+ Text[ japanese ] = "‰Óð‘‚«‹L†‚Æ’i—Ž”Ô†";
+ Text[ chinese_simplified ] = "±àºÅ·û";
+ Text[ chinese_traditional ] = "½s¸¹²Å";
+ Text[ arabic ] = "ÚáÇãÇÊ ÊÚÏÇÏ";
+ Text[ dutch ] = "Nummeringsteken";
+ Text[ chinese_simplified ] = "±àºÅ·û";
+ Text[ greek ] = "Óýìâïëá áñßèìçóçò";
+ Text[ korean ] = "±Û¸Ó¸®Ç¥";
+ Text[ turkish ] = "Numaralama ve madde iþaretleri";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_PARA_LRSPACE
+{
+ Text = "Einzüge";
+ Text [ ENGLISH ] = "Indents" ;
+ Text[ english_us ] = "Indents";
+ Text[ portuguese ] = "Avanços";
+ Text[ russian ] = "Îòñóïû";
+ Text[ dutch ] = "Inspringingen";
+ Text[ french ] = "Retraits";
+ Text[ spanish ] = "Sangrías";
+ Text[ italian ] = "Rientri";
+ Text[ danish ] = "Indrykning";
+ Text[ swedish ] = "Indrag";
+ Text[ polish ] = "Wciêcia";
+ Text[ portuguese_brazilian ] = "Indents";
+ Text[ japanese ] = "²ÝÃÞÝÄ";
+ Text[ chinese_simplified ] = "Ëõ½ø";
+ Text[ chinese_traditional ] = "ÁY±Æ";
+ Text[ arabic ] = "ÅÒÇÍÇÊ";
+ Text[ dutch ] = "Inspringingen";
+ Text[ chinese_simplified ] = "Ëõ½ø";
+ Text[ greek ] = "Åóï÷Ýò";
+ Text[ korean ] = "µé¿© ¾²±â";
+ Text[ turkish ] = "Girintiler";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_PARA_ULSPACE
+{
+ Text = "Absatzabstände";
+ Text [ ENGLISH ] = "Paragraph distances" ;
+ Text[ english_us ] = "Paragraph distances";
+ Text[ portuguese ] = "Entrelinhas para parágrafos";
+ Text[ russian ] = "Èíòåðâàëû ìåæäó àáçàöàìè";
+ Text[ dutch ] = "Alinea-afstanden";
+ Text[ french ] = "Écarts de paragraphe";
+ Text[ spanish ] = "Espacios entre párrafos";
+ Text[ italian ] = "Distanza paragrafi";
+ Text[ danish ] = "Afsnitsafstand";
+ Text[ swedish ] = "Styckeavstånd";
+ Text[ polish ] = "Odstêp akapitów";
+ Text[ portuguese_brazilian ] = "Paragraph distances";
+ Text[ japanese ] = "’i—Ž‚ÌŠÔŠu";
+ Text[ chinese_simplified ] = "¶ÎÂä¼ä¸ô";
+ Text[ chinese_traditional ] = "¬q¸¨¶¡¹j";
+ Text[ arabic ] = "ÊÈÇÚÏÇÊ ÇáÝÞÑÉ";
+ Text[ dutch ] = "Alinea-afstanden";
+ Text[ chinese_simplified ] = "¶ÎÂä¼ä¸ô";
+ Text[ greek ] = "ÁðïóôÜóåéò ðáñáãñÜöùí";
+ Text[ korean ] = "´Ü¶ô °£°Ý";
+ Text[ turkish ] = "Paragraf aralýklarý";
+};
+
+String SIP_EE_PARA_SBL
+{
+ Text = "Zeilenabstand";
+ Text [ ENGLISH ] = "Line distance" ;
+ Text[ english_us ] = "Line spacing";
+ Text[ portuguese ] = "Entrelinhas";
+ Text[ russian ] = "ìåæäó ñòðîêàìè";
+ Text[ dutch ] = "Regelafstand";
+ Text[ french ] = "Écart des lignes";
+ Text[ spanish ] = "Interlineado";
+ Text[ italian ] = "Interlinea";
+ Text[ danish ] = "Linjeafstand";
+ Text[ swedish ] = "Radavstånd";
+ Text[ polish ] = "Odstêp wierszy";
+ Text[ portuguese_brazilian ] = "Line distance";
+ Text[ japanese ] = "sŠÔ";
+ Text[ chinese_simplified ] = "ÏßÌõ¼ä¸ô";
+ Text[ chinese_traditional ] = "¦æ¶Z";
+ Text[ arabic ] = "ÊÈÇÚÏ ÇáÃÓØÑ";
+ Text[ dutch ] = "Regelafstand";
+ Text[ chinese_simplified ] = "ÏßÌõ¼ä¸ô";
+ Text[ greek ] = "ÄéÜóôé÷ï";
+ Text[ korean ] = "ÁÙ °£°Ý";
+ Text[ turkish ] = "Satýr aralýðý";
+};
+
+String SIP_EE_PARA_JUST
+{
+ Text = "Absatzausrichtung";
+ Text [ ENGLISH ] = "Paragraph alignment" ;
+ Text[ english_us ] = "Paragraph alignment";
+ Text[ portuguese ] = "Alinhamento de parágrafos";
+ Text[ russian ] = "Âûðàâíèâàíèå àáçàöà";
+ Text[ dutch ] = "Alinea-uitlijning";
+ Text[ french ] = "Alignement de paragraphe";
+ Text[ spanish ] = "Alineación de párrafo";
+ Text[ italian ] = "Allineamento paragrafo";
+ Text[ danish ] = "Afsnitsjustering";
+ Text[ swedish ] = "Styckejustering";
+ Text[ polish ] = "Wyrównanie akapitu";
+ Text[ portuguese_brazilian ] = "Paragraph alignment";
+ Text[ japanese ] = "’i—Ž‚Ì”z’u";
+ Text[ chinese_simplified ] = "¶ÎÂä¶ÔÆë";
+ Text[ chinese_traditional ] = "¬q¸¨¹ï»ô";
+ Text[ arabic ] = "ãÍÇÐÇÉ ÇáÝÞÑÉ";
+ Text[ dutch ] = "Alinea-uitlijning";
+ Text[ chinese_simplified ] = "¶ÎÂä¶ÔÆë";
+ Text[ greek ] = "Óôïß÷éóç ðáñáãñÜöïõ";
+ Text[ korean ] = "´Ü¶ô ¸ÂÃã";
+ Text[ turkish ] = "Paragraf hizalamasý";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_PARA_TABS
+{
+ Text = "Tabulatoren";
+ Text [ ENGLISH ] = "Tabulators" ;
+ Text[ english_us ] = "Tabulators";
+ Text[ portuguese ] = "Tabulações";
+ Text[ russian ] = "Òàáóëÿòîðû";
+ Text[ dutch ] = "Tabulatoren";
+ Text[ french ] = "Tabulations";
+ Text[ spanish ] = "Tabulaciones";
+ Text[ italian ] = "Tabulazioni";
+ Text[ danish ] = "Tabulatorer";
+ Text[ swedish ] = "Tabulatorer";
+ Text[ polish ] = "Tabulatory";
+ Text[ portuguese_brazilian ] = "Tabulators";
+ Text[ japanese ] = "ÀÌÞ";
+ Text[ chinese_simplified ] = "ÖƱí·û";
+ Text[ chinese_traditional ] = "¨îªí²Å";
+ Text[ arabic ] = "ÚáÇãÇÊ ÇáÌÏæáÉ";
+ Text[ dutch ] = "Tabulatoren";
+ Text[ chinese_simplified ] = "ÖƱí·û";
+ Text[ greek ] = "ÓôçëïèÝôåò";
+ Text[ korean ] = "ÅÇ";
+ Text[ turkish ] = "Sekmeler";
+};
+
+String SIP_EE_CHAR_COLOR
+{
+ Text = "Schriftfarbe";
+ Text [ ENGLISH ] = "Text color" ;
+ Text[ english_us ] = "Font color";
+ Text[ portuguese ] = "Cor da letra";
+ Text[ russian ] = "Öâåò òåêñòà";
+ Text[ dutch ] = "Tekstkleur";
+ Text[ french ] = "Couleur de police";
+ Text[ spanish ] = "Color de fuente";
+ Text[ italian ] = "Colore carattere";
+ Text[ danish ] = "Skriftfarve";
+ Text[ swedish ] = "Teckensnittsfärg";
+ Text[ polish ] = "Kolor czcionki";
+ Text[ portuguese_brazilian ] = "Text color";
+ Text[ japanese ] = "Ì«ÝÄ‚ÌF";
+ Text[ chinese_simplified ] = "ÎÄ×ÖÑÕÉ«";
+ Text[ chinese_traditional ] = "¦r«¬ÃC¦â";
+ Text[ arabic ] = "áæä ÇáÎØ";
+ Text[ dutch ] = "Tekstkleur";
+ Text[ chinese_simplified ] = "ÎÄ×ÖÑÕÉ«";
+ Text[ greek ] = "×ñþìá ãñáììáôïóåéñÜò";
+ Text[ korean ] = "±Û²Ã »ö";
+ Text[ turkish ] = "Yazýtipi rengi";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_CHAR_FONTINFO
+{
+ Text = "Zeichensatz";
+ Text [ ENGLISH ] = "Font" ;
+ Text[ english_us ] = "Character set";
+ Text[ portuguese ] = "Tipos de caracteres";
+ Text[ russian ] = "Øðèôò";
+ Text[ dutch ] = "Tekenset";
+ Text[ french ] = "Police";
+ Text[ spanish ] = "Juego de caracteres";
+ Text[ italian ] = "Tipo di carattere";
+ Text[ danish ] = "Tegnsæt";
+ Text[ swedish ] = "Teckensnitt";
+ Text[ polish ] = "Czcionka";
+ Text[ portuguese_brazilian ] = "Font";
+ Text[ japanese ] = "•¶Žš—ñ";
+ Text[ chinese_simplified ] = "×ÖÌå";
+ Text[ chinese_traditional ] = "¦r«¬";
+ Text[ arabic ] = "ãÌãæÚÉ ÃÍÑÝ";
+ Text[ dutch ] = "Tekenset";
+ Text[ chinese_simplified ] = "×ÖÌå";
+ Text[ greek ] = "Óåô ÷áñáêôÞñùí";
+ Text[ korean ] = "¹®ÀÚ ¼¼Æ®";
+ Text[ turkish ] = "Karakter kümesi";
+};
+
+String SIP_EE_CHAR_FONTHEIGHT
+{
+ Text = "Schriftgrad";
+ Text [ ENGLISH ] = "Font size" ;
+ Text[ english_us ] = "Font size";
+ Text[ portuguese ] = "Tamanho da letra";
+ Text[ russian ] = "Ðàçìåð øðèôòà";
+ Text[ dutch ] = "Schriftgrootte";
+ Text[ french ] = "Taille de la police";
+ Text[ spanish ] = "Tamaño de fuente";
+ Text[ italian ] = "Dimensione carattere";
+ Text[ danish ] = "Skriftgrad";
+ Text[ swedish ] = "Teckensnittsstorlek";
+ Text[ polish ] = "Rozmiar czcionki";
+ Text[ portuguese_brazilian ] = "Font size";
+ Text[ japanese ] = "Ì«ÝÄ »²½Þ";
+ Text[ chinese_simplified ] = "×ÖÌå´óС";
+ Text[ chinese_traditional ] = "¦r«¬";
+ Text[ arabic ] = "ÍÌã ÇáÎØ";
+ Text[ dutch ] = "Schriftgrootte";
+ Text[ chinese_simplified ] = "×ÖÌå´óС";
+ Text[ greek ] = "ÌÝãåèïò ãñáììáôïóåéñÜò";
+ Text[ korean ] = "±Û²Ã Å©±â";
+ Text[ turkish ] = "Yazýtipi boyutu";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_CHAR_FONTWIDTH
+{
+ Text = "Schriftbreite";
+ Text [ ENGLISH ] = "Font width" ;
+ Text[ english_us ] = "Font width";
+ Text[ portuguese ] = "Largura da letra";
+ Text[ russian ] = "Øèðèíà øðèôòà";
+ Text[ dutch ] = "Schriftbreedte";
+ Text[ french ] = "Largeur de la police";
+ Text[ spanish ] = "Ancho de fuente";
+ Text[ italian ] = "Larghezza carattere";
+ Text[ danish ] = "Skriftbredde";
+ Text[ swedish ] = "Teckensnittsbredd";
+ Text[ polish ] = "SzerokoϾ czcionki";
+ Text[ portuguese_brazilian ] = "Font width";
+ Text[ japanese ] = "Ì«ÝÄ‚Ì•";
+ Text[ chinese_simplified ] = "×ÖÌå¿í¶È";
+ Text[ chinese_traditional ] = "¦r«¬¼e«×";
+ Text[ arabic ] = "ÚÑÖ ÇáÎØ";
+ Text[ dutch ] = "Schriftbreedte";
+ Text[ chinese_simplified ] = "×ÖÌå¿í¶È";
+ Text[ greek ] = "ÐëÜôïò ÷áñáêôÞñùí";
+ Text[ korean ] = "±Û²Ã ³Êºñ";
+ Text[ turkish ] = "Yazýtipi geniþliði";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_CHAR_WEIGHT
+{
+ Text = "Schriftdicke";
+ Text [ ENGLISH ] = "Bold" ;
+ Text[ english_us ] = "Bold (thickness)";
+ Text[ portuguese ] = "Espessura para caracteres";
+ Text[ russian ] = "Òîëùèíà øðèôòà";
+ Text[ dutch ] = "Vet";
+ Text[ french ] = "Graisse de police";
+ Text[ spanish ] = "Negrita";
+ Text[ italian ] = "Grassetto (spessore carattere)";
+ Text[ danish ] = "Skrifttykkelse";
+ Text[ swedish ] = "Teckensnittstjocklek";
+ Text[ polish ] = "GruboϾ czcionki";
+ Text[ portuguese_brazilian ] = "Bold";
+ Text[ japanese ] = "Ì«ÝÄ‚Ì‘¾‚³";
+ Text[ chinese_simplified ] = "´ÖÌå";
+ Text[ chinese_traditional ] = "¦r«¬«p«×";
+ Text[ arabic ] = "Óãß ÇáÎØ";
+ Text[ dutch ] = "Vet";
+ Text[ chinese_simplified ] = "´ÖÌå";
+ Text[ greek ] = "ÐÜ÷ïò ãñáììáôïóåéñÜò";
+ Text[ korean ] = "±Û²Ã µÎ²²";
+ Text[ turkish ] = "Yazýtipi kalýnlýðý";
+};
+
+String SIP_EE_CHAR_UNDERLINE
+{
+ Text = "Unterstreichung";
+ Text [ ENGLISH ] = "Underline" ;
+ Text[ english_us ] = "Underline";
+ Text[ portuguese ] = "Sublinhado";
+ Text[ russian ] = "Ïîä÷åðêèâàíèå";
+ Text[ dutch ] = "Onderstrepen";
+ Text[ french ] = "Soulignage";
+ Text[ spanish ] = "Subrayado";
+ Text[ italian ] = "Sottolineato";
+ Text[ danish ] = "Understregning";
+ Text[ swedish ] = "Understrykning";
+ Text[ polish ] = "Podkreœlenie";
+ Text[ portuguese_brazilian ] = "Underline";
+ Text[ japanese ] = "伟";
+ Text[ chinese_simplified ] = "Ï»®Ïß";
+ Text[ chinese_traditional ] = "¤U¦E½u";
+ Text[ arabic ] = "ÎØ ÊÍÊí";
+ Text[ dutch ] = "Onderstrepen";
+ Text[ chinese_simplified ] = "Ï»®Ïß";
+ Text[ greek ] = "ÕðïãñÜììéóç";
+ Text[ korean ] = "¹ØÁÙ";
+ Text[ turkish ] = "Altý çizili";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_CHAR_STRIKEOUT
+{
+ Text = "Durchstreichung";
+ Text [ ENGLISH ] = "Strike through" ;
+ Text[ english_us ] = "Strikethrough";
+ Text[ portuguese ] = "Traçado";
+ Text[ russian ] = "Çà÷åðêèâàíèå";
+ Text[ dutch ] = "Doorhalen";
+ Text[ french ] = "Barré";
+ Text[ spanish ] = "Tachado";
+ Text[ italian ] = "Barrato";
+ Text[ danish ] = "Gennemstregning";
+ Text[ swedish ] = "Genomstrykning";
+ Text[ polish ] = "Przekreœlenie";
+ Text[ portuguese_brazilian ] = "Strike through";
+ Text[ japanese ] = "Žæ‚èÁ‚µü";
+ Text[ chinese_simplified ] = "Öл®Ïß";
+ Text[ chinese_traditional ] = "¤¤¦E½u";
+ Text[ arabic ] = "ÔØÈ";
+ Text[ dutch ] = "Doorhalen";
+ Text[ chinese_simplified ] = "Öл®Ïß";
+ Text[ greek ] = "ÄéáãñÜììéóç";
+ Text[ korean ] = "Ãë¼Ò¼±";
+ Text[ turkish ] = "Üstü çizili";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_CHAR_ITALIC
+{
+ Text = "Kursiv";
+ Text [ ENGLISH ] = "Cursive" ;
+ Text[ english_us ] = "Italic";
+ Text[ portuguese ] = "Itálico";
+ Text[ russian ] = "Êóðñèâ";
+ Text[ dutch ] = "Cursief";
+ Text[ french ] = "Italique";
+ Text[ spanish ] = "Cursiva";
+ Text[ italian ] = "Corsivo";
+ Text[ danish ] = "Kursiv";
+ Text[ swedish ] = "Kursiv";
+ Text[ polish ] = "Kursywa";
+ Text[ portuguese_brazilian ] = "Cursive";
+ Text[ japanese ] = "ŽÎ‘Ì";
+ Text[ chinese_simplified ] = "бÌå";
+ Text[ chinese_traditional ] = "±×Åé";
+ Text[ arabic ] = "ãÇÆá";
+ Text[ dutch ] = "Cursief";
+ Text[ chinese_simplified ] = "бÌå";
+ Text[ greek ] = "ÐëÜãéá";
+ Text[ korean ] = "±â¿ïÀÓ²Ã";
+ Text[ turkish ] = "Ýtalik";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_CHAR_OUTLINE
+{
+ Text = "Konturenschrift";
+ Text [ ENGLISH ] = "Contour" ;
+ Text[ english_us ] = "Outline";
+ Text[ portuguese ] = "Contorno";
+ Text[ russian ] = "Êîíòóð";
+ Text[ dutch ] = "Contour";
+ Text[ french ] = "Police avec contour";
+ Text[ spanish ] = "Contorno";
+ Text[ italian ] = "Contorno carattere";
+ Text[ danish ] = "Konturskrift";
+ Text[ swedish ] = "Konturskrift";
+ Text[ polish ] = "Kontur";
+ Text[ portuguese_brazilian ] = "Contour";
+ Text[ japanese ] = "’†”²‚«";
+ Text[ chinese_simplified ] = "×ÖÌåÂÖÀª";
+ Text[ chinese_traditional ] = "½ü¹ø¦r«¬";
+ Text[ arabic ] = "ÎØ ßöÝÇÝí";
+ Text[ dutch ] = "Contour";
+ Text[ chinese_simplified ] = "×ÖÌåÂÖÀª";
+ Text[ greek ] = "ÃñáììáôïóåéñÜ ðåñéãñÜììáôïò";
+ Text[ korean ] = "À±°û";
+ Text[ turkish ] = "Konturlu yazý";
+};
+
+String SIP_EE_CHAR_SHADOW
+{
+ Text = "Schatten für Schrift";
+ Text [ ENGLISH ] = "Shadow" ;
+ Text[ english_us ] = "Font shadow";
+ Text[ portuguese ] = "Sombreado";
+ Text[ russian ] = "Ñ òåíüþ";
+ Text[ dutch ] = "Schaduw";
+ Text[ french ] = "Ombre";
+ Text[ spanish ] = "Sombra";
+ Text[ italian ] = "Ombra carattere";
+ Text[ danish ] = "Skriftskygge";
+ Text[ swedish ] = "Skugga för teckensnitt";
+ Text[ polish ] = "Cieñ";
+ Text[ portuguese_brazilian ] = "Shadow";
+ Text[ japanese ] = "‰e•t‚«";
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ chinese_traditional ] = "¦r«¬³±¼v";
+ Text[ arabic ] = "Ùá ÇáÎØ";
+ Text[ dutch ] = "Schaduw";
+ Text[ chinese_simplified ] = "ÒõÓ°";
+ Text[ greek ] = "ÓêéÜ ãñáììáôïóåéñÜò";
+ Text[ korean ] = "±Û²Ã À½¿µ";
+ Text[ turkish ] = "Yazýtipi gölgesi";
+};
+
+String SIP_EE_CHAR_ESCAPEMENT
+{
+ Text = "Hoch-/tiefstellung";
+ Text [ ENGLISH ] = "Escapement" ;
+ Text[ english_us ] = "Superscript/subscript";
+ Text[ portuguese ] = "Acima/abaixo da linha";
+ Text[ russian ] = "Âåðõíèé/Íèæíèé èíäåêñ";
+ Text[ dutch ] = "Super-/subscript";
+ Text[ french ] = "Exposant/Indice";
+ Text[ spanish ] = "Sub/Superíndice";
+ Text[ italian ] = "Apice/pedice";
+ Text[ danish ] = "Hævet/sænket skrift";
+ Text[ swedish ] = "Upphöjt/nedsänkt";
+ Text[ polish ] = "Ind. gn./dln.";
+ Text[ portuguese_brazilian ] = "Escapement";
+ Text[ japanese ] = "ã•t‚«/‰º•t‚«";
+ Text[ chinese_simplified ] = "Éϱê/ϱê";
+ Text[ chinese_traditional ] = "¤W¼Ð/¤U¼Ð";
+ Text[ arabic ] = "ãÑÊÝÚ/ãäÎÝÖ";
+ Text[ dutch ] = "Super-/subscript";
+ Text[ chinese_simplified ] = "Éϱê/ϱê";
+ Text[ greek ] = "ÅêèÝôçò/Äåßêôçò";
+ Text[ korean ] = "À§ ÷ÀÚ/ ¾Æ·¡ ÷ÀÚ";
+ Text[ turkish ] = "Alt/üst simge";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_CHAR_PAIRKERNING
+{
+ Text = "Kerning";
+ Text [ ENGLISH ] = "Kerning" ;
+ Text[ english_us ] = "Kerning";
+ Text[ portuguese ] = "Kerning";
+ Text[ russian ] = "Êåðíèíã";
+ Text[ dutch ] = "Spatiëring";
+ Text[ french ] = "Crénage";
+ Text[ spanish ] = "Ajuste entre caracteres";
+ Text[ italian ] = "Kerning";
+ Text[ danish ] = "Knibning";
+ Text[ swedish ] = "Kerning";
+ Text[ polish ] = "Kerning";
+ Text[ portuguese_brazilian ] = "Kerning";
+ Text[ japanese ] = "¶°ÆݸÞ";
+ Text[ chinese_simplified ] = "×Öĸ¼ä¸ôÏàµÈ";
+ Text[ chinese_traditional ] = "¦r¥À¶¡¹j¬Ûµ¥";
+ Text[ arabic ] = "ÊÞäíä ÇáÃÍÑÝ";
+ Text[ dutch ] = "Spatiëring";
+ Text[ chinese_simplified ] = "×Öĸ¼ä¸ôÏàµÈ";
+ Text[ greek ] = "Ðýêíùóç";
+ Text[ korean ] = "Ä¿´×";
+ Text[ turkish ] = "Aralýk azaltma";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_CHAR_KERNING
+{
+ Text = "Manuelle Unterschneidung";
+ Text [ ENGLISH ] = "Manual kerning" ;
+ Text[ english_us ] = "Manual kerning";
+ Text[ portuguese ] = "Sublinhado manual";
+ Text[ russian ] = "Ìàíóàëüíûé êåðíèíã";
+ Text[ dutch ] = "Handmatige spatiëring";
+ Text[ french ] = "Crénage manuel";
+ Text[ spanish ] = "Ajuste entre caracteres, manual";
+ Text[ italian ] = "Kerning manuale";
+ Text[ danish ] = "Manuel knibning";
+ Text[ swedish ] = "Manuell kerning";
+ Text[ polish ] = "Rêczny kerning";
+ Text[ portuguese_brazilian ] = "Manual kerning";
+ Text[ japanese ] = "Žè“®‚Ŷ°ÆݸÞ";
+ Text[ chinese_simplified ] = "ʹÓÃÕßÉ趨×Öĸ¼ä¸ô";
+ Text[ chinese_traditional ] = "¦Û­q¦r¥À¶¡¹j";
+ Text[ arabic ] = "ÊÞäíä ÃÍÑÝ íÏæí";
+ Text[ dutch ] = "Handmatige spatiëring";
+ Text[ chinese_simplified ] = "ʹÓÃÕßÉ趨×Öĸ¼ä¸ô";
+ Text[ greek ] = "×åéñïêßíçôç äéáãñáììÜôùóç";
+ Text[ korean ] = "¼öµ¿ Ä¿´×";
+ Text[ turkish ] = "Manüel aralýk azaltma";
+};
+
+String SIP_EE_CHAR_WLM
+{
+ Text = "Leerräume nicht unterstreichen";
+ Text [ ENGLISH ] = "No underline for spaces" ;
+ Text[ english_us ] = "No underline for spaces";
+ Text[ portuguese ] = "Não sublinhar espaços";
+ Text[ russian ] = "Ïðîáåëû íå ïîä÷åðêèâàòü";
+ Text[ dutch ] = "Spaties niet onderstepen";
+ Text[ french ] = "Aucun soulignage des espaces";
+ Text[ spanish ] = "No subrayar espacios vacíos";
+ Text[ italian ] = "Non sottolineare spazi";
+ Text[ danish ] = "Ingen understregning af mellemrum";
+ Text[ swedish ] = "Stryk inte under blanksteg";
+ Text[ polish ] = "Nie podkreœlaj spacji";
+ Text[ portuguese_brazilian ] = "No underline for spaces";
+ Text[ japanese ] = "‹ó”’‚͉ºü‚È‚µ";
+ Text[ chinese_simplified ] = "¿Õ¸ñ´¦²»¼ÓÏ»®Ïß";
+ Text[ chinese_traditional ] = "ªÅ®æ¤£¥[¤U¦E½u";
+ Text[ arabic ] = "ÇáÝÑÇÛÇÊ ÈÏæä ÎØ ÊÍÊí";
+ Text[ dutch ] = "Spaties niet onderstepen";
+ Text[ chinese_simplified ] = "¿Õ¸ñ´¦²»¼ÓÏ»®Ïß";
+ Text[ greek ] = "×ùñßò õðïãñÜììéóç êåíþí";
+ Text[ korean ] = "°ø¹é¿¡ ¹ØÁÙ ±ßÁö ¾ÊÀ½";
+ Text[ turkish ] = "Boþluklarýn altýný çizme";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_FEATURE_TAB
+{
+ Text = "Tabulator";
+ Text [ ENGLISH ] = "Tabulator" ;
+ Text[ english_us ] = "Tabulator";
+ Text[ portuguese ] = "Tabulação";
+ Text[ russian ] = "Òàáóëÿòîð";
+ Text[ dutch ] = "Tabulator";
+ Text[ french ] = "Tabulation";
+ Text[ spanish ] = "Tabulación";
+ Text[ italian ] = "Tabulazione";
+ Text[ danish ] = "Tabulator";
+ Text[ swedish ] = "Tabulator";
+ Text[ polish ] = "Tabulator";
+ Text[ portuguese_brazilian ] = "Tabulator";
+ Text[ japanese ] = "ÀÌÞ";
+ Text[ chinese_simplified ] = "ÖƱí·û";
+ Text[ chinese_traditional ] = "¨îªí²Å";
+ Text[ arabic ] = "ÚáÇãÉ ÇáÌÏæáÉ";
+ Text[ dutch ] = "Tabulator";
+ Text[ chinese_simplified ] = "ÖƱí·û";
+ Text[ greek ] = "ÓôçëïèÝôçò";
+ Text[ korean ] = "ÅÇ";
+ Text[ turkish ] = "Sekme";
+ Text[ language_user1 ] = " ";
+};
+
+String SIP_EE_FEATURE_LINEBR
+{
+ Text = "Weicher Zeilenumbruch";
+ Text [ ENGLISH ] = "Soft line break" ;
+ Text[ english_us ] = "Soft line break";
+ Text[ portuguese ] = "Quebra de linha suave";
+ Text[ russian ] = "Ìÿãêèé ðàçðûâ ñòðîêè";
+ Text[ dutch ] = "Zachte woordafbreking";
+ Text[ french ] = "Renvoi à la ligne souple";
+ Text[ spanish ] = "Salto de línea, suave";
+ Text[ italian ] = "A capo morbido";
+ Text[ danish ] = "Blødt linjeskift";
+ Text[ swedish ] = "Mjuk radbrytning";
+ Text[ polish ] = "Miêkki podzia³ wierszy";
+ Text[ portuguese_brazilian ] = "Soft line break";
+ Text[ japanese ] = "”CˆÓŽw’è‚̉üs";
+ Text[ chinese_simplified ] = "ÈíÐÔ»»Ðзû";
+ Text[ chinese_traditional ] = "³n©Ê´«¦æ²Å";
+ Text[ arabic ] = "ÝÇÕá ÃÓØÑ ÊáÞÇÆí";
+ Text[ dutch ] = "Zachte woordafbreking";
+ Text[ chinese_simplified ] = "ÈíÐÔ»»Ðзû";
+ Text[ greek ] = "ÁðáëÞ áëëáãÞ ãñáììÞò";
+ Text[ korean ] = "ÀÓÀÇ ÁöÁ¤ ÁÙ ¹Ù²Ù±â";
+ Text[ turkish ] = "Satýr sonu";
+};
+
+String SIP_EE_FEATURE_NOTCONV
+{
+ Text = "Nichtkonvertierbares Zeichen";
+ Text [ ENGLISH ] = "Non convertable character" ;
+ Text[ english_us ] = "Non convertable character";
+ Text[ portuguese ] = "Caracter não convertível";
+ Text[ russian ] = "Íåïðåîáðàçóåìûé çíàê";
+ Text[ dutch ] = "Niet-converteerbaar teken";
+ Text[ french ] = "Caractère non convertible";
+ Text[ spanish ] = "Carácter no convertible";
+ Text[ italian ] = "Carattere non convertibile";
+ Text[ danish ] = "Ikke konvertibelt tegn";
+ Text[ swedish ] = "Ej konvertibelt tecken";
+ Text[ polish ] = "Znak niemo¿liwy do konwersji";
+ Text[ portuguese_brazilian ] = "Non convertable character";
+ Text[ japanese ] = "•ÏŠ·‚Å‚«‚È‚¢•¶Žš";
+ Text[ chinese_simplified ] = "ÎÞ·¨×ª»»µÄ×Ö·û";
+ Text[ chinese_traditional ] = "¤£¥iÂà´«ªº¦r¤¸";
+ Text[ arabic ] = "ÃÍÑÝ ÛíÑ ÞÇÈáÉ ááÊÍæíá";
+ Text[ dutch ] = "Niet-converteerbaar teken";
+ Text[ chinese_simplified ] = "ÎÞ·¨×ª»»µÄ×Ö·û";
+ Text[ greek ] = "Ìç ìåôáôñÝøéìïò ÷áñáêôÞñáò";
+ Text[ korean ] = "º¯È¯ ºÒ°¡´ÉÇÑ ¹®ÀÚ";
+ Text[ turkish ] = "Dönüþtürülemeyen karakter";
+};
+
+String SIP_EE_FEATURE_FIELD
+{
+ Text = "Feldbefehl";
+ Text [ ENGLISH ] = "Auto field" ;
+ Text[ english_us ] = "Fields";
+ Text[ portuguese ] = "Campos";
+ Text[ russian ] = "Ïîëå";
+ Text[ dutch ] = "Veldopdracht";
+ Text[ french ] = "Instruction de champ";
+ Text[ spanish ] = "Campo";
+ Text[ italian ] = "Comando di campo";
+ Text[ danish ] = "Felt";
+ Text[ swedish ] = "Fältkommando";
+ Text[ polish ] = "Pole";
+ Text[ portuguese_brazilian ] = "Auto field";
+ Text[ japanese ] = "̨°ÙÄÞ";
+ Text[ chinese_simplified ] = "×Ö¶ÎÃüÁî";
+ Text[ chinese_traditional ] = "Äæ¦ì«ü¥O";
+ Text[ arabic ] = "ÍÞá";
+ Text[ dutch ] = "Veldopdracht";
+ Text[ chinese_simplified ] = "×Ö¶ÎÃüÁî";
+ Text[ greek ] = "ÅíôïëÞ ðåäßïõ";
+ Text[ korean ] = "ÇÊµå ¸í·É";
+ Text[ turkish ] = "Alan öðesi";
+};
+
+String SIP_SA_GRAFRED
+{
+ Text = "Rotanteil";
+ Text[ english ] = "Red portion";
+ Text[ english_us ] = "Red";
+ Text[ portuguese ] = "Proporção de vermelho";
+ Text[ greek ] = "Áíáëïãßá êüêêéíï";
+ Text[ dutch ] = "Rood";
+ Text[ french ] = "Proportion de rouge";
+ Text[ spanish ] = "Proporción de rojo";
+ Text[ swedish ] = "Andel rött";
+ Text[ russian ] = "Äîëÿ êðàñíîãî";
+ Text[ italian ] = "Percentuale di rosso";
+ Text[ danish ] = "Rød-andel";
+ Text[ polish ] = "IloϾ czerwonego w kolorze";
+ Text[ portuguese_brazilian ] = "Red portion";
+ Text[ japanese ] = "ÔF‚ÌŠ„‡";
+ Text[ korean ] = "Àû»öºñ";
+ Text[ chinese_simplified ] = "ºìÉ«±ÈÀý";
+ Text[ chinese_traditional ] = "¬õ¦â¤ñ¨Ò";
+ Text[ arabic ] = "äÓÈÉ ÇáÃÍãÑ";
+ Text[ turkish ] = "Kýrmýzý oraný";
+};
+String SIP_SA_GRAFGREEN
+{
+ Text = "Grünanteil";
+ Text[ english ] = "Green portion";
+ Text[ english_us ] = "Green";
+ Text[ portuguese ] = "Proporção de verde";
+ Text[ greek ] = "Áíáëïãßá ðñÜóéíï";
+ Text[ dutch ] = "Groen";
+ Text[ french ] = "Proportion de vert";
+ Text[ spanish ] = "Proporción de verde";
+ Text[ swedish ] = "Andel grönt";
+ Text[ russian ] = "Äîëÿ çåëåíîãî";
+ Text[ italian ] = "Percentuale di verde";
+ Text[ danish ] = "Grøn-andel";
+ Text[ polish ] = "IloϾ zielonego w kolorze";
+ Text[ portuguese_brazilian ] = "Green portion";
+ Text[ japanese ] = "—ÎF‚ÌŠ„‡";
+ Text[ korean ] = "³ì»öºñ";
+ Text[ chinese_simplified ] = "ÂÌÉ«±ÈÀý";
+ Text[ chinese_traditional ] = "ºñ¦â¤ñ¨Ò";
+ Text[ arabic ] = "äÓÈÉ ÇáÃÎÖÑ";
+ Text[ turkish ] = "Yeþil oraný";
+};
+String SIP_SA_GRAFBLUE
+{
+ Text = "Blauanteil";
+ Text[ english ] = "Blue portion";
+ Text[ english_us ] = "Blue";
+ Text[ portuguese ] = "Proporção de azul";
+ Text[ greek ] = "Áíáëïãßá ìðëå";
+ Text[ dutch ] = "Blauw";
+ Text[ french ] = "Proportion de bleu";
+ Text[ spanish ] = "Proporción de azul";
+ Text[ swedish ] = "Andel blått";
+ Text[ russian ] = "Äîëÿ ñèíåãî";
+ Text[ italian ] = "Percentuale di blu";
+ Text[ danish ] = "Blå-andel";
+ Text[ polish ] = "IloϾ niebieskiego w kolorze";
+ Text[ portuguese_brazilian ] = "Blue portion";
+ Text[ japanese ] = "ÂF‚ÌŠ„‡";
+ Text[ korean ] = "û»öºñ";
+ Text[ chinese_simplified ] = "À¶É«±ÈÀý";
+ Text[ chinese_traditional ] = "ÂŦâ¤ñ¨Ò";
+ Text[ arabic ] = "äÓÈÉ ÇáÃÒÑÞ";
+ Text[ turkish ] = "Mavi oraný";
+};
+String SIP_SA_GRAFLUMINANCE
+{
+ Text = "Helligkeit";
+ Text[ english ] = "Luminance";
+ Text[ english_us ] = "Brightness";
+ Text[ portuguese ] = "Brilho";
+ Text[ greek ] = "Öùôåéíüôçôá";
+ Text[ dutch ] = "Helderheid";
+ Text[ french ] = "Luminosité";
+ Text[ spanish ] = "Brillo";
+ Text[ swedish ] = "Ljusstyrka";
+ Text[ russian ] = "ßðêîñòü";
+ Text[ italian ] = "Luminosità";
+ Text[ danish ] = "Lysstyrke";
+ Text[ polish ] = "JasnoϾ";
+ Text[ portuguese_brazilian ] = "Luminance";
+ Text[ japanese ] = "–¾“x";
+ Text[ korean ] = "¸íµµ";
+ Text[ chinese_simplified ] = "ÁÁ¶È";
+ Text[ chinese_traditional ] = "«G«×";
+ Text[ arabic ] = "ÇáÅÖÇÁÉ";
+ Text[ turkish ] = "Parlaklýk";
+};
+String SIP_SA_GRAFCONTRAST
+{
+ Text = "Kontrast";
+ Text[ english ] = "Contrast";
+ Text[ english_us ] = "Contrast";
+ Text[ portuguese ] = "Contraste";
+ Text[ greek ] = "ÊïíôñÜóô";
+ Text[ dutch ] = "Contrast";
+ Text[ french ] = "Contraste";
+ Text[ spanish ] = "Contraste";
+ Text[ swedish ] = "Kontrast";
+ Text[ russian ] = "Êîíòðàñòíîñòü";
+ Text[ italian ] = "Contrasto";
+ Text[ danish ] = "Kontrast";
+ Text[ polish ] = "Kontrast";
+ Text[ portuguese_brazilian ] = "Contrast";
+ Text[ japanese ] = "ºÝÄ×½Ä";
+ Text[ korean ] = "´ëºñ";
+ Text[ chinese_simplified ] = "¶Ô±È¶È";
+ Text[ chinese_traditional ] = "¹ï¤ñ«×";
+ Text[ arabic ] = "ÇáÊÈÇíä";
+ Text[ turkish ] = "Kontrast";
+};
+String SIP_SA_GRAFGAMMA
+{
+ Text = "Gamma";
+ Text[ english ] = "Gamma";
+ Text[ english_us ] = "Gamma";
+ Text[ portuguese ] = "Gamma";
+ Text[ greek ] = "ã";
+ Text[ dutch ] = "Gamma";
+ Text[ french ] = "Gamma";
+ Text[ spanish ] = "Gamma";
+ Text[ swedish ] = "Gamma";
+ Text[ russian ] = "Ãàììà";
+ Text[ italian ] = "Gamma";
+ Text[ danish ] = "Gamma";
+ Text[ polish ] = "Gamma";
+ Text[ portuguese_brazilian ] = "Gamma";
+ Text[ japanese ] = "¶ÞÝÏ";
+ Text[ korean ] = "°¨¸¶";
+ Text[ chinese_simplified ] = "»ÒɫϵÊý";
+ Text[ chinese_traditional ] = "¦Ç¦â¨t¼Æ";
+ Text[ arabic ] = "󂋂";
+ Text[ turkish ] = "Gamma";
+};
+String SIP_SA_GRAFTRANSPARENCE
+{
+ Text = "Transparenz";
+ Text[ english ] = "Transparency";
+ Text[ english_us ] = "Transparency";
+ Text[ portuguese ] = "Transparência";
+ Text[ greek ] = "ÄéáöÜíåéá";
+ Text[ dutch ] = "Transparantie";
+ Text[ french ] = "Transparence";
+ Text[ spanish ] = "Transparencia";
+ Text[ swedish ] = "Transparens";
+ Text[ russian ] = "Ïðîçðà÷íûé";
+ Text[ italian ] = "Trasparenza";
+ Text[ danish ] = "Transparens";
+ Text[ polish ] = "PrzezroczystoϾ";
+ Text[ portuguese_brazilian ] = "Transparency";
+ Text[ japanese ] = "“§‰ß«";
+ Text[ korean ] = "Åõ¸íµµ";
+ Text[ chinese_simplified ] = "͸Ã÷";
+ Text[ chinese_traditional ] = "³z©ú";
+ Text[ arabic ] = "ÔÝÇÝíÉ";
+ Text[ turkish ] = "Saydamlýk";
+};
+String SIP_SA_GRAFINVERT
+{
+ Text = "Invertieren";
+ Text[ english ] = "Invert";
+ Text[ english_us ] = "Invert";
+ Text[ portuguese ] = "Inverter";
+ Text[ greek ] = "ÁíôéóôñïöÞ";
+ Text[ dutch ] = "Invers";
+ Text[ french ] = "Invertir";
+ Text[ spanish ] = "Invertir";
+ Text[ swedish ] = "Invertera";
+ Text[ russian ] = "Èíâåðòèðîâàòü";
+ Text[ italian ] = "Inverti";
+ Text[ danish ] = "Inverter";
+ Text[ polish ] = "Odwróæ";
+ Text[ portuguese_brazilian ] = "Invert";
+ Text[ japanese ] = "‹t“]";
+ Text[ korean ] = "¹ÝÀü";
+ Text[ chinese_simplified ] = "»¥²¹É«×ª»»";
+ Text[ chinese_traditional ] = "¤¬¸É¦âÂà´«";
+ Text[ arabic ] = "ÚßÓ";
+ Text[ turkish ] = "Tersine çevir";
+};
+String SIP_SA_GRAFMODE
+{
+ Text = "Grafikmodus";
+ Text[ english ] = "Graphics mode";
+ Text[ english_us ] = "Graphics mode";
+ Text[ portuguese ] = "Modo gráfico";
+ Text[ greek ] = "ÊáôÜóôáóç ãñáöéêþí";
+ Text[ dutch ] = "Afbeeldingenmodus";
+ Text[ french ] = "Mode Graphique";
+ Text[ spanish ] = "Modo gráfico";
+ Text[ swedish ] = "Grafikläge";
+ Text[ russian ] = "Ãðàôè÷åñêèé ðåæèì";
+ Text[ italian ] = "Modo grafico";
+ Text[ danish ] = "Billedmodus";
+ Text[ polish ] = "Tryb grafiki";
+ Text[ portuguese_brazilian ] = "Graphics mode";
+ Text[ japanese ] = "¸Þ×̨¯¸Ó°ÄÞ";
+ Text[ korean ] = "±×·¡ÇÈ ¸ðµå";
+ Text[ chinese_simplified ] = "ͼÐη½Ê½";
+ Text[ chinese_traditional ] = "¹Ï§Î¼Ò¦¡";
+ Text[ arabic ] = "æÖÚ ÇáÕæÑ";
+ Text[ turkish ] = "Grafik kipi";
+};
+String SIP_SA_GRAFRESERVE2 { Text = "" ; };
+String SIP_SA_GRAFRESERVE3 { Text = "" ; };
+String SIP_SA_GRAFRESERVE4 { Text = "" ; };
+String SIP_SA_GRAFRESERVE5 { Text = "" ; };
+String SIP_SA_GRAFRESERVE6 { Text = "" ; };
+String SIP_SDRATTRSET_GRAF
+{
+ Text = "Grafikattribute";
+ Text [ ENGLISH ] = "Graphics attributes" ;
+ Text[ english_us ] = "Graphics attributes";
+ Text[ portuguese ] = "Atributos gráficos";
+ Text[ greek ] = "Éäéüôçôåò ãñáöéêþí";
+ Text[ dutch ] = "Grafische attributen";
+ Text[ french ] = "Attributs graphiques";
+ Text[ spanish ] = "Atributos de imagen";
+ Text[ swedish ] = "Grafikattribut";
+ Text[ russian ] = "Àòðèáóòû ãðàôèêè";
+ Text[ italian ] = "Attributi grafici";
+ Text[ danish ] = "Billedattributter";
+ Text[ polish ] = "Atrybuty grafiki";
+ Text[ portuguese_brazilian ] = "Graphics attributes";
+ Text[ japanese ] = "¸Þ×̨¯¸‚Ì‘®«";
+ Text[ korean ] = "±×·¡ÇÈ ¼Ó¼º";
+ Text[ chinese_simplified ] = "ͼÐÎÊôÐÔ";
+ Text[ chinese_traditional ] = "¹Ï§ÎÄÝ©Ê";
+ Text[ arabic ] = "ÓãÇÊ ÇáÕæÑ";
+ Text[ turkish ] = "Grafik öznitelikleri";
+};
+
+Bitmap SIP_SA_MARKERS
+{
+ File = "markers.bmp";
+};
+
+Bitmap SIP_SA_FINE_MARKERS
+{
+ File = "markers2.bmp";
+};
+
+// ******************************************************************* EOF
+
diff --git a/svx/source/svdraw/svdtouch.cxx b/svx/source/svdraw/svdtouch.cxx
new file mode 100644
index 0000000000..86382aa990
--- /dev/null
+++ b/svx/source/svdraw/svdtouch.cxx
@@ -0,0 +1,396 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdtouch.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "svdtouch.hxx"
+#include "xoutx.hxx"
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+#ifndef _SV_POLY_HXX //autogen
+#include <vcl/poly.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class ImpPolyHitCalc {
+public:
+ long x1,x2,y1,y2; // Koordinaten des Rect, muessen sortiert sein!
+ FASTBOOL bEdge; // ein Punkt lag genau auf einer Kante
+ FASTBOOL bIntersect; // mind. 2 Punkte auf verschiedenen Seiten einer Kante
+ FASTBOOL bPntInRect; // mind. 1 Punkt war vollstaendig im Rect
+ USHORT nOCnt; // wenn Counter ungerade, dann getroffen
+ USHORT nUCnt; // wenn Counter ungerade, dann getroffen
+ USHORT nLCnt; // wenn Counter ungerade, dann getroffen
+ USHORT nRCnt; // wenn Counter ungerade, dann getroffen
+ FASTBOOL bLine; // TRUE=PolyLine, kein Polygon
+public:
+ ImpPolyHitCalc(const Rectangle& aR, FASTBOOL bIsLine=FALSE)
+ {
+ bLine=bIsLine;
+ bEdge=FALSE;
+ bIntersect=FALSE;
+ bPntInRect=FALSE;
+ x1=aR.Left();
+ x2=aR.Right();
+ y1=aR.Top();
+ y2=aR.Bottom();
+ nOCnt=0;
+ nUCnt=0;
+ nLCnt=0;
+ nRCnt=0;
+ }
+ FASTBOOL IsDecided() { return bEdge || bIntersect || bPntInRect; }
+ void CheckPntInRect(const Point& rP)
+ {
+ if (!bPntInRect) {
+ bPntInRect=rP.X()>=x1 && rP.X()<=x2 && rP.Y()>=y1 && rP.Y()<=y2;
+ }
+ }
+ FASTBOOL IsHit() { return (!bLine && (nOCnt & 1)==1) || IsDecided(); }
+};
+
+#define CAREFUL_MULDIV(Res,Val,Mul,Div) { \
+ if (Abs(Val)>0xB504 || Abs(Mul)>0xB504) { \
+ BigInt aBigTemp(Val); \
+ aBigTemp*=Mul; \
+ aBigTemp/=Div; \
+ Res=long(aBigTemp); \
+ } else { \
+ Res=Val*Mul/Div; \
+ } \
+}
+
+void ImpCheckIt(ImpPolyHitCalc& rH, long lx1, long ly1, long lx2, long ly2,
+ long rx1, long ry1, long rx2, long ry2, USHORT& nOCnt, USHORT& nUCnt)
+{
+ if ((ly1>ly2) || ((ly1==ly2) && (lx1>lx2))) {
+ long nTmp; // die 2 Punkte nach Y sortieren
+ nTmp=lx1;
+ lx1=lx2;
+ lx2=nTmp;
+ nTmp=ly1;
+ ly1=ly2;
+ ly2=nTmp;
+ }
+ FASTBOOL b1=FALSE,b2=FALSE,b3=FALSE,b4=FALSE; // je 1 Flag fuer jeden der 4 Punkte LO,RO,LU,RU
+ FASTBOOL bx1,bx2;
+ FASTBOOL by1=ly1<=ry1 && ly2>ry1;
+ FASTBOOL by2=ly1<=ry2 && ly2>ry2;
+ long dx,dy,a;
+ if (by1 || by2) {
+ dx=lx2-lx1;
+ dy=ly2-ly1;
+ }
+ if (by1) { // Nur wer die Scanline schneidet
+ bx1=lx1<rx1; // x1,y1
+ bx2=lx2<rx1;
+ FASTBOOL bA=FALSE; // Optimierung: ggf eine Division sparen
+ if (bx1 && bx2) b1=TRUE;
+ else if (bx1 || bx2) {
+ long yTemp=ry1-ly1;
+ CAREFUL_MULDIV(a,dx,yTemp,dy); // a=dx*yTemp/dy;
+ a+=lx1;
+ bA=TRUE;
+ rH.bEdge=(a==rx1);
+ if (a<rx1) b1=TRUE;
+ } // x2,y1
+ bx1=lx1<rx2;
+ bx2=lx2<rx2;
+ if (bx1 && bx2) b2=TRUE;
+ else if (bx1 || bx2) {
+ if (!bA) {
+ long yTemp=ry1-ly1;
+ CAREFUL_MULDIV(a,dx,yTemp,dy);
+ a+=lx1;
+ }
+ rH.bEdge=(a==rx2);
+ if (a<rx2) b2=TRUE;
+ }
+ }
+ if (by2) { // Nur wer die Scanline schneidet
+ bx1=lx1<rx1; // x1,y2
+ bx2=lx2<rx1;
+ FASTBOOL bA=FALSE; // Optimierung: ggf eine Division sparen
+ if (bx1 && bx2) b3=TRUE;
+ else if (bx1 || bx2) {
+ long yTemp=ry2-ly1;
+ CAREFUL_MULDIV(a,dx,yTemp,dy);
+ a+=lx1;
+ bA=TRUE;
+ rH.bEdge=(a==rx1);
+ if (a<rx1) b3=TRUE;
+ }
+ bx1=lx1<rx2; // x2,y2
+ bx2=lx2<rx2;
+ if (bx1 && bx2) b4=TRUE;
+ else if (bx1 || bx2) {
+ if (!bA) {
+ long yTemp=ry2-ly1;
+ CAREFUL_MULDIV(a,dx,yTemp,dy);
+ a+=lx1;
+ }
+ rH.bEdge=(a==rx2);
+ if (a<rx2) b4=TRUE;
+ }
+ }
+ if (by1 || by2) { // nun die Ergebnisse auswerten
+ if (by1 && by2) { // Linie durch beide Scanlines
+ if (b1 && b2 && b3 && b4) { nOCnt++; nUCnt++; } // Rect komplett rechts neben der Linie
+ else if (b1 || b2 || b3 || b4) rH.bIntersect=TRUE; // Nur zum Teil->Schnittpunkt
+ } else { // ansonsten Ober- und Unterkante des Rects getrennt betrachten
+ if (by1) { // Linie durch Oberkante
+ if (b1 && b2) nOCnt++; // Oberkante komplett rechts neben der Linie
+ else if (b1 || b2) rH.bIntersect=TRUE; // Nur zum Teil->Schnittpunkt
+ }
+ if (by2) { // Linie durch Unterkante
+ if (b3 && b4) nUCnt++; // Unterkante komplett rechts neben der Linie
+ else if (b3 || b4) rH.bIntersect=TRUE; // Nur zum Teil->Schnittpunkt
+ }
+ }
+ }
+}
+
+void CheckPolyHit(const Polygon& rPoly, ImpPolyHitCalc& rH)
+{
+ USHORT nAnz=rPoly.GetSize();
+ if (nAnz==0) return;
+ if (nAnz==1) { rH.CheckPntInRect(rPoly[0]); return; }
+ Point aPt0=rPoly[USHORT(nAnz-1)];
+ rH.CheckPntInRect(aPt0);
+ USHORT i=0;
+ if (rH.bLine) {
+ aPt0=rPoly[0];
+ i++;
+ }
+ for (; i<nAnz && !rH.IsDecided(); i++) {
+ Point aP1(aPt0);
+ Point aP2(rPoly[i]);
+ rH.CheckPntInRect(aP2);
+ if (!rH.IsDecided()) {
+ ImpCheckIt(rH,aP1.X(),aP1.Y(),aP2.X(),aP2.Y(),rH.x1,rH.y1,rH.x2,rH.y2,rH.nOCnt,rH.nUCnt);
+ ImpCheckIt(rH,aP1.Y(),aP1.X(),aP2.Y(),aP2.X(),rH.y1,rH.x1,rH.y2,rH.x2,rH.nLCnt,rH.nRCnt);
+ }
+ aPt0=rPoly[i];
+ }
+ if (!rH.bLine) { // Sicherheitshalber nochmal checken
+ if ((rH.nOCnt&1)!=(rH.nUCnt&1)) rH.bIntersect=TRUE; // da wird wohl eine durchgegangen sein
+ if ((rH.nLCnt&1)!=(rH.nRCnt&1)) rH.bIntersect=TRUE; // da wird wohl eine durchgegangen sein
+ if ((rH.nOCnt&1)!=(rH.nLCnt&1)) rH.bIntersect=TRUE; // da wird wohl eine durchgegangen sein
+ }
+}
+
+FASTBOOL IsRectTouchesPoly(const Polygon& rPoly, const Rectangle& rHit)
+{
+ ImpPolyHitCalc aHit(rHit);
+ CheckPolyHit(rPoly,aHit);
+ return aHit.IsHit();
+}
+
+FASTBOOL IsRectTouchesPoly(const PolyPolygon& rPoly, const Rectangle& rHit)
+{
+ ImpPolyHitCalc aHit(rHit);
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz && !aHit.IsDecided(); i++) {
+ CheckPolyHit(rPoly.GetObject(i),aHit);
+ }
+ return aHit.IsHit();
+}
+
+FASTBOOL IsRectTouchesPoly(const XPolygon& rPoly, const Rectangle& rHit, OutputDevice* pOut)
+{
+ return IsRectTouchesPoly(XOutCreatePolygon(rPoly,pOut),rHit);
+}
+
+FASTBOOL IsRectTouchesPoly(const XPolyPolygon& rPoly, const Rectangle& rHit, OutputDevice* pOut)
+{
+ ImpPolyHitCalc aHit(rHit);
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz && !aHit.IsDecided(); i++) {
+ CheckPolyHit(XOutCreatePolygon(rPoly[i],pOut),aHit);
+ }
+ return aHit.IsHit();
+}
+
+FASTBOOL IsRectTouchesLine(const Point& rPt1, const Point& rPt2, const Rectangle& rHit)
+{
+ Polygon aPol(2);
+ aPol[0]=rPt1;
+ aPol[1]=rPt2;
+ ImpPolyHitCalc aHit(rHit,TRUE);
+ CheckPolyHit(aPol,aHit);
+ return aHit.IsHit();
+}
+
+FASTBOOL IsRectTouchesLine(const Polygon& rLine, const Rectangle& rHit)
+{
+ ImpPolyHitCalc aHit(rHit,TRUE);
+ CheckPolyHit(rLine,aHit);
+ return aHit.IsHit();
+}
+
+FASTBOOL IsRectTouchesLine(const PolyPolygon& rLine, const Rectangle& rHit)
+{
+ ImpPolyHitCalc aHit(rHit,TRUE);
+ USHORT nAnz=rLine.Count();
+ for (USHORT nNum=0; nNum<nAnz && !aHit.IsHit(); nNum++) {
+ CheckPolyHit(rLine[nNum],aHit);
+ }
+ return aHit.IsHit();
+}
+
+FASTBOOL IsRectTouchesLine(const XPolygon& rLine, const Rectangle& rHit, OutputDevice* pOut)
+{
+ return IsRectTouchesLine(XOutCreatePolygon(rLine,pOut),rHit);
+}
+
+FASTBOOL IsRectTouchesLine(const XPolyPolygon& rLine, const Rectangle& rHit, OutputDevice* pOut)
+{
+ ImpPolyHitCalc aHit(rHit,TRUE);
+ USHORT nAnz=rLine.Count();
+ for (USHORT nNum=0; nNum<nAnz && !aHit.IsHit(); nNum++) {
+ CheckPolyHit(XOutCreatePolygon(rLine[nNum],pOut),aHit);
+ }
+ return aHit.IsHit();
+}
+
+BYTE CheckPointTouchesPoly(const Polygon& rPoly, const Point& rHit) // 0=Ausserhalb, 1=Innerhalb, 2=Beruehrung
+{
+ USHORT nAnz=rPoly.GetSize();
+ if (nAnz<2) return FALSE;
+ FASTBOOL bEdge=FALSE;
+ USHORT nCnt=0;
+ Point aPt0=rPoly[USHORT(nAnz-1)];
+ for (USHORT i=0; i<nAnz && !bEdge; i++) {
+ Point aP1(rPoly[i]);
+ Point aP2(aPt0);
+ if ((aP1.Y()>aP2.Y()) || ((aP1.Y()==aP2.Y()) && (aP1.X()>aP2.X()))) { Point aTmp(aP1); aP1=aP2; aP2=aTmp; }
+ bEdge=((aP1.X()==aP2.X()) && (rHit.X()==aP1.X()) && (rHit.Y()>=aP1.Y()) && (rHit.Y()<=aP2.Y())) ||
+ ((aP1.Y()==aP2.Y()) && (rHit.Y()==aP1.Y()) && (rHit.X()>=aP1.X()) && (rHit.X()<=aP2.X())) ||
+ (rHit.X()==aP1.X()) && (rHit.Y()==aP1.Y());
+ if (!bEdge && aP1.Y()<=rHit.Y() && aP2.Y()>rHit.Y()) { // Nur wer die Scanline schneidet
+ FASTBOOL bx1=aP1.X()<rHit.X();
+ FASTBOOL bx2=aP2.X()<rHit.X();
+ if (bx1 && bx2) nCnt++;
+ else if (bx1 || bx2) {
+ long dx=aP2.X()-aP1.X();
+ long dy=aP2.Y()-aP1.Y();
+ long yTemp=rHit.Y()-aP1.Y();
+ long xTemp;
+ if (Abs(dx)>0xB504 || Abs(yTemp)>0xB504) { // gegen Integerueberlaeufe
+ BigInt aBigTemp(dx);
+ aBigTemp*=yTemp;
+ aBigTemp/=dy;
+ xTemp=long(aBigTemp);
+ } else {
+ xTemp=dx*yTemp /dy;
+ }
+ xTemp+=aP1.X();
+ bEdge=(xTemp==rHit.X());
+ if (xTemp<rHit.X()) nCnt++;
+ }
+ }
+ aPt0=rPoly[i];
+ }
+ if (bEdge) return 2;
+ return (nCnt & 1)==1;
+}
+
+FASTBOOL IsPointInsidePoly(const Polygon& rPoly, const Point& rHit)
+{
+ return CheckPointTouchesPoly(rPoly,rHit)!=0;
+}
+
+FASTBOOL IsPointInsidePoly(const PolyPolygon& rPoly, const Point& rHit)
+{
+ FASTBOOL bInside=FALSE;
+ FASTBOOL bEdge=FALSE;
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz && !bEdge; i++) {
+ BYTE n=CheckPointTouchesPoly(rPoly.GetObject(i),rHit);
+ bEdge=n==2;
+ if (n==1) bInside=!bInside;
+ }
+ return bInside || bEdge;
+}
+
+FASTBOOL IsPointInsidePoly(const XPolygon& rPoly, const Point& rHit, OutputDevice* pOut)
+{
+ return IsPointInsidePoly(XOutCreatePolygon(rPoly,pOut),rHit);
+}
+
+FASTBOOL IsPointInsidePoly(const XPolyPolygon& rPoly, const Point& rHit, OutputDevice* pOut)
+{
+ FASTBOOL bInside=FALSE;
+ FASTBOOL bEdge=FALSE;
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz && !bEdge; i++) {
+ BYTE n=CheckPointTouchesPoly(XOutCreatePolygon(rPoly[i],pOut),rHit);
+ bEdge=n==2;
+ if (n==1) bInside=!bInside;
+ }
+ return bInside || bEdge;
+
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
new file mode 100644
index 0000000000..778830ba5f
--- /dev/null
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -0,0 +1,1285 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdtrans.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "svdtrans.hxx"
+#include <math.h>
+#include "xpoly.hxx"
+
+#ifndef _APP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void MoveXPoly(XPolygon& rPoly, const Size& S)
+{
+ rPoly.Move(S.Width(),S.Height());
+}
+
+void MoveXPoly(XPolyPolygon& rPoly, const Size& S)
+{
+ rPoly.Move(S.Width(),S.Height());
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact, FASTBOOL bNoJustify)
+{
+ Fraction xFact(rxFact);
+ Fraction yFact(ryFact);
+ long nHgt=rRect.Bottom()-rRect.Top();
+
+ {
+ if (xFact.GetDenominator()==0) {
+ long nWdt=rRect.Right()-rRect.Left();
+ if (xFact.GetNumerator()>=0) { // DivZero abfangen
+ xFact=Fraction(xFact.GetNumerator(),1);
+ if (nWdt==0) rRect.Right()++;
+ } else {
+ xFact=Fraction(xFact.GetNumerator(),-1);
+ if (nWdt==0) rRect.Left()--;
+ }
+ }
+ rRect.Left() =rRef.X()+Round(((double)(rRect.Left() -rRef.X())*xFact.GetNumerator())/xFact.GetDenominator());
+ rRect.Right() =rRef.X()+Round(((double)(rRect.Right() -rRef.X())*xFact.GetNumerator())/xFact.GetDenominator());
+ }
+ {
+ if (yFact.GetDenominator()==0) {
+ long nHgt=rRect.Bottom()-rRect.Top();
+ if (yFact.GetNumerator()>=0) { // DivZero abfangen
+ yFact=Fraction(yFact.GetNumerator(),1);
+ if (nHgt==0) rRect.Bottom()++;
+ } else {
+ yFact=Fraction(yFact.GetNumerator(),-1);
+ if (nHgt==0) rRect.Top()--;
+ }
+
+ yFact=Fraction(yFact.GetNumerator(),1); // DivZero abfangen
+ }
+ rRect.Top() =rRef.Y()+Round(((double)(rRect.Top() -rRef.Y())*yFact.GetNumerator())/yFact.GetDenominator());
+ rRect.Bottom()=rRef.Y()+Round(((double)(rRect.Bottom()-rRef.Y())*yFact.GetNumerator())/yFact.GetDenominator());
+ }
+ if (!bNoJustify) rRect.Justify();
+}
+
+
+void ResizePoly(Polygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ USHORT nAnz=rPoly.GetSize();
+ for (USHORT i=0; i<nAnz; i++) {
+ ResizePoint(rPoly[i],rRef,xFact,yFact);
+ }
+}
+
+void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ USHORT nAnz=rPoly.GetPointCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ ResizePoint(rPoly[i],rRef,xFact,yFact);
+ }
+}
+
+void ResizePoly(PolyPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz; i++) {
+ ResizePoly(rPoly[i],rRef,xFact,yFact);
+ }
+}
+
+void ResizeXPoly(XPolyPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+{
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz; i++) {
+ ResizeXPoly(rPoly[i],rRef,xFact,yFact);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void RotatePoly(Polygon& rPoly, const Point& rRef, double sn, double cs)
+{
+ USHORT nAnz=rPoly.GetSize();
+ for (USHORT i=0; i<nAnz; i++) {
+ RotatePoint(rPoly[i],rRef,sn,cs);
+ }
+}
+
+void RotateXPoly(XPolygon& rPoly, const Point& rRef, double sn, double cs)
+{
+ USHORT nAnz=rPoly.GetPointCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ RotatePoint(rPoly[i],rRef,sn,cs);
+ }
+}
+
+void RotatePoly(PolyPolygon& rPoly, const Point& rRef, double sn, double cs)
+{
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz; i++) {
+ RotatePoly(rPoly[i],rRef,sn,cs);
+ }
+}
+
+void RotateXPoly(XPolyPolygon& rPoly, const Point& rRef, double sn, double cs)
+{
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz; i++) {
+ RotateXPoly(rPoly[i],rRef,sn,cs);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void MirrorRect(Rectangle& rRect, const Point& rRef1, const Point& rRef2, FASTBOOL bNoJustify)
+{
+ // !!! fehlende Implementation !!!
+ if (!bNoJustify) rRect.Justify();
+}
+
+void MirrorPoint(Point& rPnt, const Point& rRef1, const Point& rRef2)
+{
+ long mx=rRef2.X()-rRef1.X();
+ long my=rRef2.Y()-rRef1.Y();
+ if (mx==0) { // Achse senkrecht
+ long dx=rRef1.X()-rPnt.X();
+ rPnt.X()+=2*dx;
+ } else if (my==0) { // Achse waagerecht
+ long dy=rRef1.Y()-rPnt.Y();
+ rPnt.Y()+=2*dy;
+ } else if (mx==my) { // Achse diagonal '\'
+ long dx1=rPnt.X()-rRef1.X();
+ long dy1=rPnt.Y()-rRef1.Y();
+ rPnt.X()=rRef1.X()+dy1;
+ rPnt.Y()=rRef1.Y()+dx1;
+ } else if (mx==-my) { // Achse diagonal '/'
+ long dx1=rPnt.X()-rRef1.X();
+ long dy1=rPnt.Y()-rRef1.Y();
+ rPnt.X()=rRef1.X()-dy1;
+ rPnt.Y()=rRef1.Y()-dx1;
+ } else { // beliebige Achse
+ // mal optimieren !!!
+ // Lot auf der Spiegelachse faellen oder so
+ long nRefWink=GetAngle(rRef2-rRef1);
+ rPnt-=rRef1;
+ long nPntWink=GetAngle(rPnt);
+ long nWink=2*(nRefWink-nPntWink);
+ double a=nWink*nPi180;
+ double nSin=sin(a);
+ double nCos=cos(a);
+ RotatePoint(rPnt,Point(),nSin,nCos);
+ rPnt+=rRef1;
+ }
+}
+
+void MirrorPoly(Polygon& rPoly, const Point& rRef1, const Point& rRef2)
+{
+ USHORT nAnz=rPoly.GetSize();
+ for (USHORT i=0; i<nAnz; i++) {
+ MirrorPoint(rPoly[i],rRef1,rRef2);
+ }
+}
+
+void MirrorXPoly(XPolygon& rPoly, const Point& rRef1, const Point& rRef2)
+{
+ USHORT nAnz=rPoly.GetPointCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ MirrorPoint(rPoly[i],rRef1,rRef2);
+ }
+}
+
+void MirrorPoly(PolyPolygon& rPoly, const Point& rRef1, const Point& rRef2)
+{
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz; i++) {
+ MirrorPoly(rPoly[i],rRef1,rRef2);
+ }
+}
+
+void MirrorXPoly(XPolyPolygon& rPoly, const Point& rRef1, const Point& rRef2)
+{
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz; i++) {
+ MirrorXPoly(rPoly[i],rRef1,rRef2);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear)
+{
+ USHORT nAnz=rPoly.GetSize();
+ for (USHORT i=0; i<nAnz; i++) {
+ ShearPoint(rPoly[i],rRef,tn,bVShear);
+ }
+}
+
+void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear)
+{
+ USHORT nAnz=rPoly.GetPointCount();
+ for (USHORT i=0; i<nAnz; i++) {
+ ShearPoint(rPoly[i],rRef,tn,bVShear);
+ }
+}
+
+void ShearPoly(PolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear)
+{
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz; i++) {
+ ShearPoly(rPoly[i],rRef,tn,bVShear);
+ }
+}
+
+void ShearXPoly(XPolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear)
+{
+ USHORT nAnz=rPoly.Count();
+ for (USHORT i=0; i<nAnz; i++) {
+ ShearXPoly(rPoly[i],rRef,tn,bVShear);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@ @@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@ @@ @@ @@ @@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@ @@ @@@@ @@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter,
+ const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert)
+{
+ FASTBOOL bC1=pC1!=NULL;
+ FASTBOOL bC2=pC2!=NULL;
+ long x0=rPnt.X();
+ long y0=rPnt.Y();
+ long cx=rCenter.X();
+ long cy=rCenter.Y();
+ double nWink=GetCrookAngle(rPnt,rCenter,rRad,bVert);
+ double sn=sin(nWink);
+ double cs=cos(nWink);
+ RotatePoint(rPnt,rCenter,sn,cs);
+ if (bC1) {
+ if (bVert) {
+ // Richtung Zentrum verschieben, als Ausgangsposition fuer Rotate
+ pC1->Y()-=y0;
+ // Resize, entsprechend der Entfernung vom Zentrum
+ pC1->Y()=Round(((double)pC1->Y()) /rRad.X()*(cx-pC1->X()));
+ pC1->Y()+=cy;
+ } else {
+ // Richtung Zentrum verschieben, als Ausgangsposition fuer Rotate
+ pC1->X()-=x0;
+ // Resize, entsprechend der Entfernung vom Zentrum
+ long nPntRad=cy-pC1->Y();
+ double nFact=(double)nPntRad/(double)rRad.Y();
+ pC1->X()=Round((double)pC1->X()*nFact);
+ pC1->X()+=cx;
+ }
+ RotatePoint(*pC1,rCenter,sn,cs);
+ }
+ if (bC2) {
+ if (bVert) {
+ // Richtung Zentrum verschieben, als Ausgangsposition fuer Rotate
+ pC2->Y()-=y0;
+ // Resize, entsprechend der Entfernung vom Zentrum
+ pC2->Y()=Round(((double)pC2->Y()) /rRad.X()*(rCenter.X()-pC2->X()));
+ pC2->Y()+=cy;
+ } else {
+ // Richtung Zentrum verschieben, als Ausgangsposition fuer Rotate
+ pC2->X()-=x0;
+ // Resize, entsprechend der Entfernung vom Zentrum
+ long nPntRad=rCenter.Y()-pC2->Y();
+ double nFact=(double)nPntRad/(double)rRad.Y();
+ pC2->X()=Round((double)pC2->X()*nFact);
+ pC2->X()+=cx;
+ }
+ RotatePoint(*pC2,rCenter,sn,cs);
+ }
+ rSin=sn;
+ rCos=cs;
+ return nWink;
+}
+
+double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter,
+ const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert)
+{
+ FASTBOOL bC1=pC1!=NULL;
+ FASTBOOL bC2=pC2!=NULL;
+ long x0=rPnt.X();
+ long y0=rPnt.Y();
+ long dx1=0,dy1=0;
+ long dxC1=0,dyC1=0;
+ long dxC2=0,dyC2=0;
+ if (bVert) {
+ long nStart=rCenter.X()-rRad.X();
+ dx1=rPnt.X()-nStart;
+ rPnt.X()=nStart;
+ if (bC1) {
+ dxC1=pC1->X()-nStart;
+ pC1->X()=nStart;
+ }
+ if (bC2) {
+ dxC2=pC2->X()-nStart;
+ pC2->X()=nStart;
+ }
+ } else {
+ long nStart=rCenter.Y()-rRad.Y();
+ dy1=rPnt.Y()-nStart;
+ rPnt.Y()=nStart;
+ if (bC1) {
+ dyC1=pC1->Y()-nStart;
+ pC1->Y()=nStart;
+ }
+ if (bC2) {
+ dyC2=pC2->Y()-nStart;
+ pC2->Y()=nStart;
+ }
+ }
+ double nWink=GetCrookAngle(rPnt,rCenter,rRad,bVert);
+ double sn=sin(nWink);
+ double cs=cos(nWink);
+ RotatePoint(rPnt,rCenter,sn,cs);
+ if (bC1) { if (bVert) pC1->Y()-=y0-rCenter.Y(); else pC1->X()-=x0-rCenter.X(); RotatePoint(*pC1,rCenter,sn,cs); }
+ if (bC2) { if (bVert) pC2->Y()-=y0-rCenter.Y(); else pC2->X()-=x0-rCenter.X(); RotatePoint(*pC2,rCenter,sn,cs); }
+ if (bVert) {
+ rPnt.X()+=dx1;
+ if (bC1) pC1->X()+=dxC1;
+ if (bC2) pC2->X()+=dxC2;
+ } else {
+ rPnt.Y()+=dy1;
+ if (bC1) pC1->Y()+=dyC1;
+ if (bC2) pC2->Y()+=dyC2;
+ }
+ rSin=sn;
+ rCos=cs;
+ return nWink;
+}
+
+double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter,
+ const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert,
+ const Rectangle rRefRect)
+{
+ FASTBOOL bC1=pC1!=NULL;
+ FASTBOOL bC2=pC2!=NULL;
+ long x0=rPnt.X();
+ long y0=rPnt.Y();
+ CrookSlantXPoint(rPnt,pC1,pC2,rCenter,rRad,rSin,rCos,bVert);
+ if (bVert) {
+ } else {
+ long nBase=rCenter.Y()-rRad.Y();
+ long nTop=rRefRect.Top();
+ long nBtm=rRefRect.Bottom();
+ long nHgt=nBtm-nTop;
+ long dy=rPnt.Y()-y0;
+ FASTBOOL bOben=rRad.Y()<0;
+ double a=((double)(y0-nTop))/nHgt;
+ a*=dy;
+ rPnt.Y()=y0+Round(a);
+ } return 0.0;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert)
+{
+ double nSin,nCos;
+ USHORT nPointAnz=rPoly.GetPointCount();
+ USHORT i=0;
+ while (i<nPointAnz) {
+ Point* pPnt=&rPoly[i];
+ Point* pC1=NULL;
+ Point* pC2=NULL;
+ if (i+1<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt links
+ pC1=pPnt;
+ i++;
+ pPnt=&rPoly[i];
+ }
+ i++;
+ if (i<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt rechts
+ pC2=&rPoly[i];
+ i++;
+ }
+ CrookRotateXPoint(*pPnt,pC1,pC2,rCenter,rRad,nSin,nCos,bVert);
+ }
+}
+
+void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert)
+{
+ double nSin,nCos;
+ USHORT nPointAnz=rPoly.GetPointCount();
+ USHORT i=0;
+ while (i<nPointAnz) {
+ Point* pPnt=&rPoly[i];
+ Point* pC1=NULL;
+ Point* pC2=NULL;
+ if (i+1<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt links
+ pC1=pPnt;
+ i++;
+ pPnt=&rPoly[i];
+ }
+ i++;
+ if (i<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt rechts
+ pC2=&rPoly[i];
+ i++;
+ }
+ CrookSlantXPoint(*pPnt,pC1,pC2,rCenter,rRad,nSin,nCos,bVert);
+ }
+}
+
+void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert, const Rectangle rRefRect)
+{
+ double nSin,nCos;
+ USHORT nPointAnz=rPoly.GetPointCount();
+ USHORT i=0;
+ while (i<nPointAnz) {
+ Point* pPnt=&rPoly[i];
+ Point* pC1=NULL;
+ Point* pC2=NULL;
+ if (i+1<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt links
+ pC1=pPnt;
+ i++;
+ pPnt=&rPoly[i];
+ }
+ i++;
+ if (i<nPointAnz && rPoly.IsControl(i)) { // Kontrollpunkt rechts
+ pC2=&rPoly[i];
+ i++;
+ }
+ CrookStretchXPoint(*pPnt,pC1,pC2,rCenter,rRad,nSin,nCos,bVert,rRefRect);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert)
+{
+ USHORT nPolyAnz=rPoly.Count();
+ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) {
+ CrookRotatePoly(rPoly[nPolyNum],rCenter,rRad,bVert);
+ }
+}
+
+void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert)
+{
+ USHORT nPolyAnz=rPoly.Count();
+ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) {
+ CrookSlantPoly(rPoly[nPolyNum],rCenter,rRad,bVert);
+ }
+}
+
+void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert, const Rectangle rRefRect)
+{
+ USHORT nPolyAnz=rPoly.Count();
+ for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) {
+ CrookStretchPoly(rPoly[nPolyNum],rCenter,rRad,bVert,rRefRect);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+long GetAngle(const Point& rPnt)
+{
+ long a=0;
+ if (rPnt.Y()==0) {
+ if (rPnt.X()<0) a=-18000;
+ } else if (rPnt.X()==0) {
+ if (rPnt.Y()>0) a=-9000;
+ else a=9000;
+ } else {
+ a=Round((atan2((double)-rPnt.Y(),(double)rPnt.X())/nPi180));
+ }
+ return a;
+}
+
+long NormAngle180(long a)
+{
+ while (a<18000) a+=36000;
+ while (a>=18000) a-=36000;
+ return a;
+}
+
+long NormAngle360(long a)
+{
+ while (a<0) a+=36000;
+ while (a>=36000) a-=36000;
+ return a;
+}
+
+USHORT GetAngleSector(long nWink)
+{
+ while (nWink<0) nWink+=36000;
+ while (nWink>=36000) nWink-=36000;
+ if (nWink< 9000) return 0;
+ if (nWink<18000) return 1;
+ if (nWink<27000) return 2;
+ return 3;
+}
+
+long GetLen(const Point& rPnt)
+{
+ long x=Abs(rPnt.X());
+ long y=Abs(rPnt.Y());
+ if (x+y<0x8000) { // weil 7FFF * 7FFF * 2 = 7FFE0002
+ x*=x;
+ y*=y;
+ x+=y;
+ x=Round(sqrt((double)x));
+ return x;
+ } else {
+ double nx=x;
+ double ny=y;
+ nx*=nx;
+ ny*=ny;
+ nx+=ny;
+ nx=sqrt(nx);
+ if (nx>0x7FFFFFFF) {
+ return 0x7FFFFFFF; // Ueberlauf, mehr is nich!
+ } else {
+ return Round(nx);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void GeoStat::RecalcSinCos()
+{
+ if (nDrehWink==0) {
+ nSin=0.0;
+ nCos=1.0;
+ } else {
+ double a=nDrehWink*nPi180;
+ nSin=sin(a);
+ nCos=cos(a);
+ }
+}
+
+void GeoStat::RecalcTan()
+{
+ if (nShearWink==0) {
+ nTan=0.0;
+ } else {
+ double a=nShearWink*nPi180;
+ nTan=tan(a);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo)
+{
+ Polygon aPol(5);
+ aPol[0]=rRect.TopLeft();
+ aPol[1]=rRect.TopRight();
+ aPol[2]=rRect.BottomRight();
+ aPol[3]=rRect.BottomLeft();
+ aPol[4]=rRect.TopLeft();
+ if (rGeo.nShearWink!=0) ShearPoly(aPol,rRect.TopLeft(),rGeo.nTan);
+ if (rGeo.nDrehWink!=0) RotatePoly(aPol,rRect.TopLeft(),rGeo.nSin,rGeo.nCos);
+ return aPol;
+}
+
+void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo)
+{
+ rGeo.nDrehWink=GetAngle(rPol[1]-rPol[0]);
+ rGeo.nDrehWink=NormAngle360(rGeo.nDrehWink);
+ // Drehung ist damit im Kasten
+ rGeo.RecalcSinCos();
+
+ Point aPt1(rPol[1]-rPol[0]);
+ if (rGeo.nDrehWink!=0) RotatePoint(aPt1,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin fuer Rueckdrehung
+ long nWdt=aPt1.X();
+
+ Point aPt0(rPol[0]);
+ Point aPt3(rPol[3]-rPol[0]);
+ if (rGeo.nDrehWink!=0) RotatePoint(aPt3,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin fuer Rueckdrehung
+ long nHgt=aPt3.Y();
+ long nShW=GetAngle(aPt3);
+ nShW-=27000; // ShearWink wird zur Senkrechten gemessen
+ nShW=-nShW; // Negieren, denn '+' ist Rechtskursivierung
+
+ FASTBOOL bMirr=aPt3.Y()<0;
+ if (bMirr) { // "Punktetausch" bei Spiegelung
+ nHgt=-nHgt;
+ nShW+=18000;
+ aPt0=rPol[3];
+ }
+ nShW=NormAngle180(nShW);
+ if (nShW<-9000 || nShW>9000) {
+ nShW=NormAngle180(nShW+18000);
+ }
+ if (nShW<-SDRMAXSHEAR) nShW=-SDRMAXSHEAR; // ShearWinkel begrenzen auf +/- 89.00 deg
+ if (nShW>SDRMAXSHEAR) nShW=SDRMAXSHEAR;
+ rGeo.nShearWink=nShW;
+ rGeo.RecalcTan();
+ Point aRU(aPt0);
+ aRU.X()+=nWdt;
+ aRU.Y()+=nHgt;
+ rRect=Rectangle(aPt0,aRU);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void OrthoDistance8(const Point& rPt0, Point& rPt, FASTBOOL bBigOrtho)
+{
+ long dx=rPt.X()-rPt0.X();
+ long dy=rPt.Y()-rPt0.Y();
+ long dxa=Abs(dx);
+ long dya=Abs(dy);
+ if (dx==0 || dy==0 || dxa==dya) return;
+ if (dxa>=dya*2) { rPt.Y()=rPt0.Y(); return; }
+ if (dya>=dxa*2) { rPt.X()=rPt0.X(); return; }
+ if ((dxa<dya) != bBigOrtho) {
+ rPt.Y()=rPt0.Y()+(dxa* (dy>=0 ? 1 : -1) );
+ } else {
+ rPt.X()=rPt0.X()+(dya* (dx>=0 ? 1 : -1) );
+ }
+}
+
+void OrthoDistance4(const Point& rPt0, Point& rPt, FASTBOOL bBigOrtho)
+{
+ long dx=rPt.X()-rPt0.X();
+ long dy=rPt.Y()-rPt0.Y();
+ long dxa=Abs(dx);
+ long dya=Abs(dy);
+ if ((dxa<dya) != bBigOrtho) {
+ rPt.Y()=rPt0.Y()+(dxa* (dy>=0 ? 1 : -1) );
+ } else {
+ rPt.X()=rPt0.X()+(dya* (dx>=0 ? 1 : -1) );
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+long BigMulDiv(long nVal, long nMul, long nDiv)
+{
+ BigInt aVal(nVal);
+ aVal*=nMul;
+ if (aVal.IsNeg()!=(nDiv<0)) {
+ aVal-=nDiv/2; // fuer korrektes Runden
+ } else {
+ aVal+=nDiv/2; // fuer korrektes Runden
+ }
+ aVal/=nDiv;
+ return long(aVal);
+}
+
+void Kuerzen(Fraction& rF, unsigned nDigits)
+{
+ INT32 nMul=rF.GetNumerator();
+ INT32 nDiv=rF.GetDenominator();
+ FASTBOOL bNeg=FALSE;
+ if (nMul<0) { nMul=-nMul; bNeg=!bNeg; }
+ if (nDiv<0) { nDiv=-nDiv; bNeg=!bNeg; }
+ if (nMul==0 || nDiv==0) return;
+ UINT32 a;
+ a=UINT32(nMul); unsigned nMulZ=0; // Fuehrende Nullen zaehlen
+ while (a<0x00800000) { nMulZ+=8; a<<=8; }
+ while (a<0x80000000) { nMulZ++; a<<=1; }
+ a=UINT32(nDiv); unsigned nDivZ=0; // Fuehrende Nullen zaehlen
+ while (a<0x00800000) { nDivZ+=8; a<<=8; }
+ while (a<0x80000000) { nDivZ++; a<<=1; }
+ // Anzahl der verwendeten Digits bestimmen
+ int nMulDigits=32-nMulZ;
+ int nDivDigits=32-nDivZ;
+ // Nun bestimmen, wieviele Stellen hinten weg koennen
+ int nMulWeg=nMulDigits-nDigits; if (nMulWeg<0) nMulWeg=0;
+ int nDivWeg=nDivDigits-nDigits; if (nDivWeg<0) nDivWeg=0;
+ int nWeg=Min(nMulWeg,nDivWeg);
+ nMul>>=nWeg;
+ nDiv>>=nWeg;
+ if (nMul==0 || nDiv==0) {
+ DBG_WARNING("Oups, beim kuerzen einer Fraction hat sich Joe verrechnet.");
+ return;
+ }
+ if (bNeg) nMul=-nMul;
+ rF=Fraction(nMul,nDiv);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Wieviele eU-Einheiten passen in einen mm bzw. Inch?
+// Oder wie gross ist ein eU in mm bzw. Inch, und davon der Kehrwert
+
+FrPair GetInchOrMM(MapUnit eU)
+{
+ switch (eU) {
+ case MAP_1000TH_INCH: return FrPair(1000,1);
+ case MAP_100TH_INCH : return FrPair( 100,1);
+ case MAP_10TH_INCH : return FrPair( 10,1);
+ case MAP_INCH : return FrPair( 1,1);
+ case MAP_POINT : return FrPair( 72,1);
+ case MAP_TWIP : return FrPair(1440,1);
+ case MAP_100TH_MM : return FrPair( 100,1);
+ case MAP_10TH_MM : return FrPair( 10,1);
+ case MAP_MM : return FrPair( 1,1);
+ case MAP_CM : return FrPair( 1,10);
+ case MAP_PIXEL : {
+ VirtualDevice aVD;
+ aVD.SetMapMode(MapMode(MAP_100TH_MM));
+ Point aP(aVD.PixelToLogic(Point(64,64))); // 64 Pixel fuer bessere Genauigkeit
+ return FrPair(6400,aP.X(),6400,aP.Y());
+ }
+ case MAP_APPFONT: case MAP_SYSFONT: {
+ VirtualDevice aVD;
+ aVD.SetMapMode(MapMode(eU));
+ Point aP(aVD.LogicToPixel(Point(32,32))); // 32 Einheiten fuer bessere Genauigkeit
+ aVD.SetMapMode(MapMode(MAP_100TH_MM));
+ aP=aVD.PixelToLogic(aP);
+ return FrPair(3200,aP.X(),3200,aP.Y());
+ }
+ }
+ return Fraction(1,1);
+}
+
+FrPair GetInchOrMM(FieldUnit eU)
+{
+ switch (eU) {
+ case FUNIT_INCH : return FrPair( 1,1);
+ case FUNIT_POINT : return FrPair( 72,1);
+ case FUNIT_TWIP : return FrPair(1440,1);
+ case FUNIT_100TH_MM : return FrPair( 100,1);
+ case FUNIT_MM : return FrPair( 1,1);
+ case FUNIT_CM : return FrPair( 1,10);
+ case FUNIT_M : return FrPair( 1,1000);
+ case FUNIT_KM : return FrPair( 1,1000000);
+ case FUNIT_PICA : return FrPair( 6,1);
+ case FUNIT_FOOT : return FrPair( 1,12);
+ case FUNIT_MILE : return FrPair( 1,63360);
+ }
+ return Fraction(1,1);
+}
+
+// Den Faktor berechnen, der anzuwenden ist um n Einheiten von eS nach
+// eD umzurechnen. Z.B. GetMapFactor(UNIT_MM,UNIT_100TH_MM) => 100.
+
+FrPair GetMapFactor(MapUnit eS, MapUnit eD)
+{
+ if (eS==eD) return FrPair(1,1,1,1);
+ FrPair aS(GetInchOrMM(eS));
+ FrPair aD(GetInchOrMM(eD));
+ FASTBOOL bSInch=IsInch(eS);
+ FASTBOOL bDInch=IsInch(eD);
+ FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y());
+ if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); }
+ if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); }
+ return aRet;
+};
+
+FrPair GetMapFactor(MapUnit eS, FieldUnit eD)
+{
+ FrPair aS(GetInchOrMM(eS));
+ FrPair aD(GetInchOrMM(eD));
+ FASTBOOL bSInch=IsInch(eS);
+ FASTBOOL bDInch=IsInch(eD);
+ FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y());
+ if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); }
+ if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); }
+ return aRet;
+};
+
+FrPair GetMapFactor(FieldUnit eS, MapUnit eD)
+{
+ FrPair aS(GetInchOrMM(eS));
+ FrPair aD(GetInchOrMM(eD));
+ FASTBOOL bSInch=IsInch(eS);
+ FASTBOOL bDInch=IsInch(eD);
+ FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y());
+ if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); }
+ if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); }
+ return aRet;
+};
+
+FrPair GetMapFactor(FieldUnit eS, FieldUnit eD)
+{
+ if (eS==eD) return FrPair(1,1,1,1);
+ FrPair aS(GetInchOrMM(eS));
+ FrPair aD(GetInchOrMM(eD));
+ FASTBOOL bSInch=IsInch(eS);
+ FASTBOOL bDInch=IsInch(eD);
+ FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y());
+ if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); }
+ if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); }
+ return aRet;
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ // 1 mile = 8 furlong = 63.360" = 1.609.344,0mm
+ // 1 furlong = 10 chains = 7.920" = 201.168,0mm
+ // 1 chain = 4 poles = 792" = 20.116,8mm
+ // 1 pole = 5 1/2 yd = 198" = 5.029,2mm
+ // 1 yd = 3 ft = 36" = 914,4mm
+ // 1 ft = 12 " = 1" = 304,8mm
+
+void GetMeterOrInch(MapUnit eMU, short& rnKomma, long& rnMul, long& rnDiv, FASTBOOL& rbMetr, FASTBOOL& rbInch)
+{
+ rnMul=1; rnDiv=1;
+ short nKomma=0;
+ FASTBOOL bMetr=FALSE,bInch=FALSE;
+ switch (eMU) {
+ // Metrisch
+ case MAP_100TH_MM : bMetr=TRUE; nKomma=5; break;
+ case MAP_10TH_MM : bMetr=TRUE; nKomma=4; break;
+ case MAP_MM : bMetr=TRUE; nKomma=3; break;
+ case MAP_CM : bMetr=TRUE; nKomma=2; break;
+ // Inch
+ case MAP_1000TH_INCH: bInch=TRUE; nKomma=3; break;
+ case MAP_100TH_INCH : bInch=TRUE; nKomma=2; break;
+ case MAP_10TH_INCH : bInch=TRUE; nKomma=1; break;
+ case MAP_INCH : bInch=TRUE; nKomma=0; break;
+ case MAP_POINT : bInch=TRUE; rnDiv=72; break; // 1Pt = 1/72"
+ case MAP_TWIP : bInch=TRUE; rnDiv=144; nKomma=1; break; // 1Twip = 1/1440"
+ // Sonstiges
+ case MAP_PIXEL : break;
+ case MAP_SYSFONT : break;
+ case MAP_APPFONT : break;
+ case MAP_RELATIVE : break;
+ } // switch
+ rnKomma=nKomma;
+ rbMetr=bMetr;
+ rbInch=bInch;
+}
+
+void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, FASTBOOL& rbMetr, FASTBOOL& rbInch)
+{
+ rnMul=1; rnDiv=1;
+ short nKomma=0;
+ FASTBOOL bMetr=FALSE,bInch=FALSE;
+ switch (eFU) {
+ case FUNIT_NONE : break;
+ // Metrisch
+ case FUNIT_100TH_MM : bMetr=TRUE; nKomma=5; break;
+ case FUNIT_MM : bMetr=TRUE; nKomma=3; break;
+ case FUNIT_CM : bMetr=TRUE; nKomma=2; break;
+ case FUNIT_M : bMetr=TRUE; nKomma=0; break;
+ case FUNIT_KM : bMetr=TRUE; nKomma=-3; break;
+ // Inch
+ case FUNIT_TWIP : bInch=TRUE; rnDiv=144; nKomma=1; break; // 1Twip = 1/1440"
+ case FUNIT_POINT : bInch=TRUE; rnDiv=72; break; // 1Pt = 1/72"
+ case FUNIT_PICA : bInch=TRUE; rnDiv=6; break; // 1Pica = 1/6" ?
+ case FUNIT_INCH : bInch=TRUE; break; // 1" = 1"
+ case FUNIT_FOOT : bInch=TRUE; rnMul=12; break; // 1Ft = 12"
+ case FUNIT_MILE : bInch=TRUE; rnMul=6336; nKomma=-1; break; // 1mile = 63360"
+ // sonstiges
+ case FUNIT_CUSTOM : break;
+ case FUNIT_PERCENT : nKomma=2; break;
+ } // switch
+ rnKomma=nKomma;
+ rbMetr=bMetr;
+ rbInch=bInch;
+}
+
+void SdrFormatter::Undirty()
+{
+ if (aScale.GetNumerator()==0 || aScale.GetDenominator()==0) aScale=Fraction(1,1);
+ FASTBOOL bSrcMetr,bSrcInch,bDstMetr,bDstInch;
+ long nMul1,nDiv1,nMul2,nDiv2;
+ short nKomma1,nKomma2;
+ // Zunaechst normalisieren auf m bzw. "
+ if (!bSrcFU) {
+ GetMeterOrInch(eSrcMU,nKomma1,nMul1,nDiv1,bSrcMetr,bSrcInch);
+ } else {
+ GetMeterOrInch(eSrcFU,nKomma1,nMul1,nDiv1,bSrcMetr,bSrcInch);
+ }
+ if (!bDstFU) {
+ GetMeterOrInch(eDstMU,nKomma2,nMul2,nDiv2,bDstMetr,bDstInch);
+ } else {
+ GetMeterOrInch(eDstFU,nKomma2,nMul2,nDiv2,bDstMetr,bDstInch);
+ }
+ nMul1*=nDiv2;
+ nDiv1*=nMul2;
+ nKomma1-=nKomma2;
+
+ if (bSrcInch && bDstMetr) {
+ nKomma1+=4;
+ nMul1*=254;
+ }
+ if (bSrcMetr && bDstInch) {
+ nKomma1-=4;
+ nDiv1*=254;
+ }
+
+ // Temporaere Fraction zum Kuerzen
+ Fraction aTempFract(nMul1,nDiv1);
+ nMul1=aTempFract.GetNumerator();
+ nDiv1=aTempFract.GetDenominator();
+
+ nMul_=nMul1;
+ nDiv_=nDiv1;
+ nKomma_=nKomma1;
+ bDirty=FALSE;
+}
+
+
+void SdrFormatter::TakeStr(long nVal, XubString& rStr) const
+{
+ sal_Unicode aNullCode('0');
+
+ if(!nVal)
+ {
+ rStr = UniString();
+ rStr += aNullCode;
+ return;
+ }
+
+ // Hier fallen trotzdem evtl. Nachkommastellen weg, wg. MulDiv statt Real
+ BOOL bNeg(nVal < 0);
+ International aInter(GetpApp()->GetAppInternational());
+ xub_StrLen nK(nKomma_);
+ XubString aStr;
+
+ ForceUndirty();
+
+ if(bNeg)
+ nVal = -nVal;
+
+ while(nK <= -3)
+ {
+ nVal *= 1000;
+ nK += 3;
+ }
+
+ while(nK <= -1)
+ {
+ nVal *= 10;
+ nK++;
+ }
+
+ if(nMul_ != nDiv_)
+ nVal = BigMulDiv(nVal, nMul_, nDiv_);
+
+ aStr = UniString::CreateFromInt32(nVal);
+
+ if(nK > 0)
+ {
+ // Komma erforderlich
+ xub_StrLen nAnz(nK - aStr.Len());
+
+ if(nAnz >= 0 && aInter.IsNumLeadingZero())
+ nAnz++;
+
+ for(xub_StrLen i=0; i<nAnz; i++)
+ aStr.Insert(aNullCode, 0);
+
+ // zuviele Nachkommastellen abhacken
+ xub_StrLen nNumDigits(aInter.GetNumDigits());
+ xub_StrLen nWeg(nK - nNumDigits);
+
+ if(nWeg > 0)
+ {
+ // hier muesste eigentlich noch gerundet werden!
+ aStr.Erase(aStr.Len() - nWeg);
+ nK = nNumDigits;
+ }
+ }
+
+ // Vorkommastellen fuer spaeter merken
+ xub_StrLen nVorKomma(aStr.Len() - nK);
+
+ if(nK > 0)
+ {
+ // KommaChar einfuegen
+ // erstmal trailing Zeros abhacken
+ while(nK > 0 && aStr.GetChar(aStr.Len() - 1) == aNullCode)
+ {
+ aStr.Erase(aStr.Len() - 1);
+ nK--;
+ }
+
+ if(nK > 0)
+ {
+ // na, noch Nachkommastellen da?
+ sal_Unicode cDec(aInter.GetNumDecimalSep());
+ aStr.Insert(cDec, nVorKomma);
+ }
+ }
+
+ // ggf. Trennpunkte bei jedem Tausender einfuegen
+ if(nVorKomma > 3 && aInter.IsNumThousandSep())
+ {
+ sal_Unicode cDot(aInter.GetNumThousandSep());
+ xub_StrLen i(nVorKomma - 3);
+
+ while(i > 0)
+ {
+ aStr.Insert(cDot, i);
+ i -= 3;
+ }
+ }
+
+ if(!aStr.Len())
+ aStr += aNullCode;
+
+ if(bNeg && (aStr.Len() > 1 || aStr.GetChar(0) != aNullCode))
+ {
+ rStr.Insert(sal_Unicode('-'), 0);
+ }
+
+ rStr = aStr;
+}
+
+void SdrFormatter::TakeUnitStr(MapUnit eUnit, XubString& rStr)
+{
+ switch(eUnit)
+ {
+ // Metrisch
+ case MAP_100TH_MM :
+ {
+ sal_Char aText[] = "/100mm";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case MAP_10TH_MM :
+ {
+ sal_Char aText[] = "/10mm";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case MAP_MM :
+ {
+ sal_Char aText[] = "mm";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case MAP_CM :
+ {
+ sal_Char aText[] = "cm";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+
+ // Inch
+ case MAP_1000TH_INCH:
+ {
+ sal_Char aText[] = "/1000\"";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case MAP_100TH_INCH :
+ {
+ sal_Char aText[] = "/100\"";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case MAP_10TH_INCH :
+ {
+ sal_Char aText[] = "/10\"";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case MAP_INCH :
+ {
+ rStr = UniString();
+ rStr += sal_Unicode('"');
+ break;
+ }
+ case MAP_POINT :
+ {
+ sal_Char aText[] = "pt";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case MAP_TWIP :
+ {
+ sal_Char aText[] = "twip";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+
+ // Sonstiges
+ case MAP_PIXEL :
+ {
+ sal_Char aText[] = "pixel";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case MAP_SYSFONT :
+ {
+ sal_Char aText[] = "sysfont";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case MAP_APPFONT :
+ {
+ sal_Char aText[] = "appfont";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case MAP_RELATIVE :
+ {
+ rStr = UniString();
+ rStr += sal_Unicode('%');
+ break;
+ }
+ }
+}
+
+void SdrFormatter::TakeUnitStr(FieldUnit eUnit, XubString& rStr)
+{
+ switch(eUnit)
+ {
+ default :
+ case FUNIT_NONE :
+ case FUNIT_CUSTOM :
+ {
+ rStr = UniString();
+ break;
+ }
+
+ // Metrisch
+ case FUNIT_100TH_MM:
+ {
+ sal_Char aText[] = "/100mm";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_MM :
+ {
+ sal_Char aText[] = "mm";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_CM :
+ {
+ sal_Char aText[] = "cm";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_M :
+ {
+ rStr = UniString();
+ rStr += sal_Unicode('m');
+ break;
+ }
+ case FUNIT_KM :
+ {
+ sal_Char aText[] = "km";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+
+ // Inch
+ case FUNIT_TWIP :
+ {
+ sal_Char aText[] = "twip";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_POINT :
+ {
+ sal_Char aText[] = "pt";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_PICA :
+ {
+ sal_Char aText[] = "pica";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_INCH :
+ {
+ rStr = UniString();
+ rStr += sal_Unicode('"');
+ break;
+ }
+ case FUNIT_FOOT :
+ {
+ sal_Char aText[] = "ft";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+ case FUNIT_MILE :
+ {
+ sal_Char aText[] = "mile(s)";
+ rStr = UniString(aText, sizeof(aText-1));
+ break;
+ }
+
+ // sonstiges
+ case FUNIT_PERCENT:
+ {
+ rStr = UniString();
+ rStr += sal_Unicode('%');
+ break;
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/svx/source/svdraw/svdtxhdl.cxx b/svx/source/svdraw/svdtxhdl.cxx
new file mode 100644
index 0000000000..ec1946b68a
--- /dev/null
+++ b/svx/source/svdraw/svdtxhdl.cxx
@@ -0,0 +1,374 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdtxhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "svdtxhdl.hxx"
+#include <limits.h>
+#include "svditext.hxx"
+#include "svdmodel.hxx"
+#include "svdpage.hxx"
+#include "svdogrp.hxx"
+#include "svdotext.hxx"
+#include "svdxout.hxx"
+#include "svdoutl.hxx"
+
+#ifndef _OUTLINER_HXX //autogen
+#include "outliner.hxx"
+#endif
+
+#ifndef _OUTLOBJ_HXX //autogen
+#include <outlobj.hxx>
+#endif
+
+#ifndef _SVX_SVXFONT_HXX //autogen
+#include "svxfont.hxx"
+#endif
+
+#ifndef _SVX_XLNCLIT_HXX //autogen
+#include "xlnclit.hxx"
+#endif
+
+#ifndef _SVX_XLNWTIT_HXX //autogen
+#include "xlnwtit.hxx"
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX //autogen
+#include "xflclit.hxx"
+#endif
+
+#ifndef _SV_METRIC_HXX //autogen
+#include <vcl/metric.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ImpTextPortionHandler::ImpTextPortionHandler(SdrOutliner& rOutln, const SdrTextObj& rTxtObj):
+ rOutliner(rOutln),
+ rTextObj(rTxtObj),
+ aPoly(0)
+{
+ pModel=rTextObj.GetModel();
+ MapMode aMap=aVDev.GetMapMode();
+
+ aMap.SetMapUnit(pModel->GetScaleUnit());
+ aMap.SetScaleX(pModel->GetScaleFraction());
+ aMap.SetScaleY(pModel->GetScaleFraction());
+ aVDev.SetMapMode(aMap);
+}
+
+void ImpTextPortionHandler::ConvertToPathObj(SdrObjGroup& rGroup, FASTBOOL bPoly)
+{
+ bToPoly=bPoly;
+ pGroup=&rGroup;
+
+ Rectangle aAnchorRect;
+ Rectangle aTextRect;
+ SdrFitToSizeType eFit=rTextObj.GetFitToSize();
+ FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ // Bei TakeTextRect wird u.a. auch der Text in
+ // den Outliner gesteckt
+ rTextObj.TakeTextRect(rOutliner,aTextRect,FALSE,&aAnchorRect);
+ aFormTextBoundRect=aTextRect; // Missbrauch von FormTextBoundRect
+ if (bFitToSize) aFormTextBoundRect=aAnchorRect;
+ rOutliner.SetDrawPortionHdl(LINK(this,ImpTextPortionHandler,ConvertHdl));
+ rOutliner.StripPortions();
+ rOutliner.SetDrawPortionHdl(Link());
+ rOutliner.Clear();
+ if (bFitToSize) {
+ Fraction nX(aAnchorRect.Right()-aAnchorRect.Left(),aTextRect.Right()-aTextRect.Left());
+ Fraction nY(aAnchorRect.Bottom()-aAnchorRect.Top(),aTextRect.Bottom()-aTextRect.Top());
+ pGroup->NbcResize(aAnchorRect.TopLeft(),nX,nY);
+ }
+ if (rTextObj.aGeo.nDrehWink!=0) { // #35825# Rotieren erst nach Resize (wg. FitToSize)
+ pGroup->NbcRotate(aFormTextBoundRect.TopLeft(),rTextObj.aGeo.nDrehWink,rTextObj.aGeo.nSin,rTextObj.aGeo.nCos);
+ }
+}
+
+void ImpTextPortionHandler::DrawTextToPath(ExtOutputDevice& rXOut, FASTBOOL bDrawEffect)
+{
+ aFormTextBoundRect=Rectangle();
+ const Rectangle& rBR = rTextObj.GetSnapRect();
+
+ bDraw = bDrawEffect;
+
+ OutlinerParaObject* pPara=rTextObj.GetOutlinerParaObject();
+ if (rTextObj.IsTextEditActive()) {
+ pPara=rTextObj.ImpGetEditOutlinerParaObject();
+ }
+ if (pPara!=NULL) {
+ XPolyPolygon aXPP;
+ //rTextObj.TakeContour(aXPP);
+ rTextObj.TakeXorPoly(aXPP,FALSE);
+ pXOut=&rXOut;
+ Font aFont(rXOut.GetOutDev()->GetFont());
+ rOutliner.Clear();
+ rOutliner.SetPaperSize(Size(LONG_MAX,LONG_MAX));
+ rOutliner.SetText(*pPara);
+ USHORT nCnt = Min(aXPP.Count(), (USHORT) rOutliner.GetParagraphCount());
+
+ if ( nCnt == 1 ) bToLastPoint = TRUE;
+ else bToLastPoint = FALSE;
+
+ for (nParagraph = 0; nParagraph < nCnt; nParagraph++)
+ {
+ aPoly = XOutCreatePolygon(aXPP[USHORT(nParagraph)], rXOut.GetOutDev());
+ nTextWidth = 0;
+
+ rOutliner.SetDrawPortionHdl(LINK(this,ImpTextPortionHandler,FormTextWidthHdl));
+ rOutliner.StripPortions();
+ rOutliner.SetDrawPortionHdl(LINK(this,ImpTextPortionHandler,FormTextDrawHdl));
+ rOutliner.StripPortions();
+ rOutliner.SetDrawPortionHdl(Link());
+
+ const Rectangle& rFTBR=rXOut.GetFormTextBoundRect();
+ aFormTextBoundRect.Union(rFTBR);
+ }
+ rXOut.GetOutDev()->SetFont(aFont);
+ rOutliner.Clear();
+ }
+ if (rTextObj.IsTextEditActive()) {
+ delete pPara;
+ }
+}
+
+IMPL_LINK(ImpTextPortionHandler,ConvertHdl,DrawPortionInfo*,pInfo)
+{
+ // aFormTextBoundRect enthaelt den Ausgabebereich des Textobjekts
+ Point aPos(aFormTextBoundRect.TopLeft());
+ aPos+=pInfo->rStartPos;
+ Color aColor(pInfo->rFont.GetColor());
+ xub_StrLen nCnt = pInfo->rText.Len();
+ long nBase=aPos.Y();
+ long nLeftX=aPos.X();
+
+ SfxItemSet aAttrSet((SfxItemPool&)(*rTextObj.GetItemPool()));
+
+ long nHochTief=pInfo->rFont.GetEscapement();
+ if (nHochTief==0) {
+ aVDev.SetFont(pInfo->rFont); // Normalstellung
+ } else { // Fuer Hoch-Tiefstellung den Font verkleinern
+ long nPercent=pInfo->rFont.GetPropr();
+ if (nPercent!=100) {
+ Font aFont(pInfo->rFont);
+ Size aSize(aFont.GetSize());
+ aSize.Height()=(aSize.Height() * nPercent +50) / 100;
+ aSize.Width()=(aSize.Width() * nPercent +50) / 100;
+ aFont.SetSize(aSize);
+ aVDev.SetFont(aFont);
+ }
+ FASTBOOL bNeg=nHochTief<0;
+ if (bNeg) nHochTief=-nHochTief;
+ nHochTief=(nHochTief * pInfo->rFont.GetSize().Height() +50) /100;
+ if (bNeg) nHochTief=-nHochTief;
+ }
+ FontMetric aFontMetric(aVDev.GetFontMetric());
+ aPos.Y()-=aFontMetric.GetAscent()+nHochTief;
+
+ if (pInfo->rFont.IsOutline()) {
+ aAttrSet.Put(XLineColorItem(String(),aColor));
+ aAttrSet.Put(XLineStyleItem(XLINE_SOLID));
+ aAttrSet.Put(XLineWidthItem(0));
+ aAttrSet.Put(XFillStyleItem(XFILL_NONE));
+ } else {
+ aAttrSet.Put(XFillColorItem(String(),aColor));
+ aAttrSet.Put(XLineStyleItem(XLINE_NONE));
+ aAttrSet.Put(XFillStyleItem(XFILL_SOLID));
+ }
+
+ for(xub_StrLen i = 0; i<nCnt; i++)
+ {
+ // UNICODE: BYTE aCharByte = (BYTE)((pInfo->rText)[i]);
+ // since XOutGetCharOutline() is not yet changed, make a short
+ // term solution here
+ sal_Unicode aUnicode = (pInfo->rText).GetChar(i);
+ XPolyPolygon aXPP(
+ XOutGetCharOutline(aUnicode, aVDev));
+
+ if(aXPP.Count())
+ {
+ aXPP.Move(aPos.X(), aPos.Y());
+
+ // aFormTextBoundRect enthaelt den Ausgabebereich des Textobjekts
+ // #35825# Rotieren erst nach Resize (wg. FitToSize)
+ //RotateXPoly(aXPP,aFormTextBoundRect.TopLeft(),rTextObj.aGeo.nSin,rTextObj.aGeo.nCos);
+
+ SdrObject* pObj = rTextObj.ImpConvertMakeObj(aXPP, TRUE, !bToPoly, TRUE);
+ pObj->NbcSetAttributes(aAttrSet, FALSE);
+ pGroup->GetSubList()->InsertObject(pObj);
+ }
+
+ aPos.X() = nLeftX + pInfo->pDXArray[i]; // - nSlant;
+ }
+
+ long nLineLen=aPos.X()-nLeftX;
+ FontUnderline eUndl=pInfo->rFont.GetUnderline();
+ FontStrikeout eStrk=pInfo->rFont.GetStrikeout();
+ if (eUndl!=UNDERLINE_NONE) {
+ FASTBOOL bDouble=eUndl==UNDERLINE_DOUBLE;
+ long nDescent=aFontMetric.GetDescent();
+ long nDick=nDescent / (bDouble ? 5 : 3);
+ long nDist=(nDescent-nDick*2)/3; // Linienabstand bei doppelt
+
+ XPolyPolygon aXPP;
+ if (eUndl!=UNDERLINE_DOTTED) {
+ Point aPoint(0,0);
+ XPolygon aXP(Rectangle(aPoint,Point(nLineLen,nDick)));
+ aXPP.Insert(aXP);
+ if (bDouble) {
+ aXP.Move(0,nDick+nDist);
+ aXPP.Insert(aXP);
+ }
+ } else {
+ Point aPoint(0,0);
+ XPolygon aXP(Rectangle(aPoint,Point(nDick,nDick)));
+ long n=0;
+ while (n<=nLineLen) {
+ if (n+nDick>nLineLen) { // ler letzte Dot ggf. etwas schmaler
+ aXP=XPolygon(Rectangle(Point(n,0),Point(nLineLen,nDick)));
+ }
+ aXPP.Insert(aXP);
+ aXP.Move(2*nDick,0);
+ n+=2*nDick;
+ }
+ }
+
+ long y=nDescent-nDick; // y-Position der Striche zur Baseline bestimmen
+ if (bDouble) y-=nDick+nDist;
+ y=(y+1)/2;
+
+ aXPP.Move(nLeftX,nBase+y-nHochTief);
+ // aFormTextBoundRect enthaelt den Ausgabebereich des Textobjekts
+ // #35825# Rotieren erst nach Resize (wg. FitToSize)
+ //RotateXPoly(aXPP,aFormTextBoundRect.TopLeft(),rTextObj.aGeo.nSin,rTextObj.aGeo.nCos);
+ SdrObject* pObj=rTextObj.ImpConvertMakeObj(aXPP,TRUE,!bToPoly, TRUE);
+ pObj->NbcSetAttributes(aAttrSet,FALSE);
+ pGroup->GetSubList()->InsertObject(pObj);
+ }
+ if (eStrk!=STRIKEOUT_NONE) {
+ FASTBOOL bDouble=eStrk==STRIKEOUT_DOUBLE;
+ long nDescent=aFontMetric.GetDescent();
+ long nDick=nDescent / (bDouble ? 5 : 3);
+ long nDist=(nDescent-nDick*2)/3; // Linienabstand bei doppelt
+
+ XPolyPolygon aXPP;
+ Point aPoint(0,0);
+ XPolygon aXP(Rectangle(aPoint,Point(nLineLen,nDick)));
+ aXPP.Insert(aXP);
+ if (bDouble) {
+ aXP.Move(0,nDick+nDist);
+ aXPP.Insert(aXP);
+ }
+
+ // y-Position der Striche zur Baseline bestimmen
+ long y=-(long)(aFontMetric.GetAscent()-aFontMetric.GetLeading()+1)/3;
+ if (!bDouble) y-=(nDick+1)/2;
+ else y-=nDick+(nDist+1)/2;
+
+ aXPP.Move(nLeftX,nBase+y-nHochTief);
+ // aFormTextBoundRect enthaelt den Ausgabebereich des Textobjekts
+ // #35825# Rotieren erst nach Resize (wg. FitToSize)
+ //RotateXPoly(aXPP,aFormTextBoundRect.TopLeft(),rTextObj.aGeo.nSin,rTextObj.aGeo.nCos);
+ SdrObject* pObj=rTextObj.ImpConvertMakeObj(aXPP,TRUE,!bToPoly, TRUE);
+ pObj->NbcSetAttributes(aAttrSet,FALSE);
+ pGroup->GetSubList()->InsertObject(pObj);
+ }
+ return 0;
+}
+
+void ImpTextPortionHandler::DrawFitText(ExtOutputDevice& rXOut, const Point& rPos, const Fraction& rXFact)
+{
+ pXOut=&rXOut;
+ aPos=rPos;
+ aXFact=rXFact;
+ rOutliner.SetDrawPortionHdl(LINK(this,ImpTextPortionHandler,FitTextDrawHdl));
+ rOutliner.StripPortions();
+ rOutliner.SetDrawPortionHdl(Link());
+}
+
+IMPL_LINK_INLINE_START(ImpTextPortionHandler,FitTextDrawHdl,DrawPortionInfo*,pInfo)
+{
+ return 0;
+}
+
+IMPL_LINK_INLINE_END(ImpTextPortionHandler,FitTextDrawHdl,DrawPortionInfo*,pInfo)
+
+IMPL_LINK_INLINE_START(ImpTextPortionHandler,FormTextWidthHdl,DrawPortionInfo*,pInfo)
+{
+ if(pInfo->nPara == nParagraph && pInfo->rText.Len())
+ {
+ // negative Gesamtlaenge fuer ersten Aufruf von DrawFormText
+ nTextWidth -= pInfo->pDXArray[pInfo->rText.Len() - 1];
+ }
+ return 0;
+}
+
+IMPL_LINK_INLINE_END(ImpTextPortionHandler,FormTextWidthHdl,DrawPortionInfo*,pInfo)
+
+IMPL_LINK_INLINE_START(ImpTextPortionHandler,FormTextDrawHdl,DrawPortionInfo*,pInfo)
+{
+ if (pInfo->nPara==nParagraph) {
+ nTextWidth=pXOut->DrawFormText(pInfo->rText,aPoly,pInfo->rFont,
+ nTextWidth,bToLastPoint,bDraw,pInfo->pDXArray);
+ }
+ return 0;
+}
+
+IMPL_LINK_INLINE_END(ImpTextPortionHandler,FormTextDrawHdl,DrawPortionInfo*,pInfo)
+
diff --git a/svx/source/svdraw/svdtxhdl.hxx b/svx/source/svdraw/svdtxhdl.hxx
new file mode 100644
index 0000000000..15388a7596
--- /dev/null
+++ b/svx/source/svdraw/svdtxhdl.hxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdtxhdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVDTXHDL_HXX
+#define _SVDTXHDL_HXX
+
+#ifndef _VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _POLY_HXX //autogen
+#include <vcl/poly.hxx>
+#endif
+
+#ifndef _LINK_HXX //autogen
+#include <tools/link.hxx>
+#endif
+
+//************************************************************
+// Vorausdeklarationen
+//************************************************************
+
+class SdrOutliner;
+class DrawPortionInfo;
+class SdrTextObj;
+class SdrObjGroup;
+class SdrModel;
+class ExtOutputDevice;
+
+//************************************************************
+// ImpTextPortionHandler
+//************************************************************
+
+class ImpTextPortionHandler
+{
+ VirtualDevice aVDev;
+ Rectangle aFormTextBoundRect;
+ SdrOutliner& rOutliner;
+ const SdrTextObj& rTextObj;
+ ExtOutputDevice* pXOut;
+
+ // Variablen fuer ConvertToPathObj
+ SdrObjGroup* pGroup;
+ SdrModel* pModel;
+ FASTBOOL bToPoly;
+
+ // Variablen fuer DrawFitText
+ Point aPos;
+ Fraction aXFact;
+ Fraction aYFact;
+
+ // Variablen fuer DrawTextToPath
+ Polygon aPoly;
+ long nTextWidth;
+ ULONG nParagraph;
+ BOOL bToLastPoint;
+ BOOL bDraw;
+
+public:
+ ImpTextPortionHandler(SdrOutliner& rOutln, const SdrTextObj& rTxtObj);
+
+ void ConvertToPathObj(SdrObjGroup& rGroup, FASTBOOL bToPoly);
+ void DrawFitText(ExtOutputDevice& rXOut, const Point& rPos, const Fraction& rXFact);
+ void DrawTextToPath(ExtOutputDevice& rXOut, FASTBOOL bDrawEffect=TRUE);
+
+ // wird von DrawTextToPath() gesetzt:
+ const Rectangle& GetFormTextBoundRect() { return aFormTextBoundRect; }
+
+ DECL_LINK(ConvertHdl,DrawPortionInfo*);
+ DECL_LINK(FitTextDrawHdl,DrawPortionInfo*);
+ DECL_LINK(FormTextWidthHdl,DrawPortionInfo*);
+ DECL_LINK(FormTextDrawHdl,DrawPortionInfo*);
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDTXHDL_HXX
+
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
new file mode 100644
index 0000000000..724bd1d964
--- /dev/null
+++ b/svx/source/svdraw/svdundo.cxx
@@ -0,0 +1,1407 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdundo.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "svdundo.hxx"
+#include "svditext.hxx"
+#include "svdotext.hxx"
+#include "svdobj.hxx"
+#include "svdpage.hxx"
+#include "svdlayer.hxx"
+#include "svdmodel.hxx"
+#include "svdview.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+#include "scene3d.hxx"
+
+#ifndef _OUTLOBJ_HXX //autogen
+#include <outlobj.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrUndoAction,SfxUndoAction);
+
+BOOL __EXPORT SdrUndoAction::CanRepeat(SfxRepeatTarget& rView) const
+{
+ SdrView* pV=PTR_CAST(SdrView,&rView);
+ if (pV!=NULL) return CanSdrRepeat(*pV);
+ return FALSE;
+}
+
+void __EXPORT SdrUndoAction::Repeat(SfxRepeatTarget& rView)
+{
+ SdrView* pV=PTR_CAST(SdrView,&rView);
+ if (pV!=NULL) SdrRepeat(*pV);
+ DBG_ASSERT(pV!=NULL,"Repeat: Uebergebenes SfxRepeatTarget ist keine SdrView");
+}
+
+XubString __EXPORT SdrUndoAction::GetRepeatComment(SfxRepeatTarget& rView) const
+{
+ SdrView* pV=PTR_CAST(SdrView,&rView);
+ if (pV!=NULL) return GetSdrRepeatComment(*pV);
+ return String();
+}
+
+FASTBOOL SdrUndoAction::CanSdrRepeat(SdrView& rView) const
+{
+ return FALSE;
+}
+
+void SdrUndoAction::SdrRepeat(SdrView& rView)
+{
+}
+
+XubString SdrUndoAction::GetSdrRepeatComment(SdrView& rView) const
+{
+ return String();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoGroup::SdrUndoGroup(SdrModel& rNewMod)
+: SdrUndoAction(rNewMod),
+ aBuf(1024,32,32),
+ eFunction(SDRREPFUNC_OBJ_NONE) /*#72642#*/
+{}
+
+SdrUndoGroup::SdrUndoGroup(SdrModel& rNewMod,const String& rStr)
+: SdrUndoAction(rNewMod),
+ aBuf(1024,32,32),
+ aComment(rStr),
+ eFunction(SDRREPFUNC_OBJ_NONE)
+{}
+
+SdrUndoGroup::~SdrUndoGroup()
+{
+ Clear();
+}
+
+void __EXPORT SdrUndoGroup::Clear()
+{
+ for (ULONG nu=0; nu<GetActionCount(); nu++) {
+ SdrUndoAction* pAct=GetAction(nu);
+ delete pAct;
+ }
+ aBuf.Clear();
+}
+
+void SdrUndoGroup::AddAction(SdrUndoAction* pAct)
+{
+ aBuf.Insert(pAct,CONTAINER_APPEND);
+}
+
+void __EXPORT SdrUndoGroup::Undo()
+{
+ for (ULONG nu=GetActionCount(); nu>0;) {
+ nu--;
+ SdrUndoAction* pAct=GetAction(nu);
+ pAct->Undo();
+ }
+}
+
+void __EXPORT SdrUndoGroup::Redo()
+{
+ for (ULONG nu=0; nu<GetActionCount(); nu++) {
+ SdrUndoAction* pAct=GetAction(nu);
+ pAct->Redo();
+ }
+}
+
+XubString __EXPORT SdrUndoGroup::GetComment() const
+{
+ XubString aRet(aComment);
+ sal_Char aSearchText[] = "%O";
+ String aSearchString(aSearchText, sizeof(aSearchText-1));
+
+ aRet.SearchAndReplace(aSearchString, aObjDescription);
+
+ return aRet;
+}
+
+FASTBOOL SdrUndoGroup::CanSdrRepeat(SdrView& rView) const
+{
+ switch (eFunction) {
+ case SDRREPFUNC_OBJ_NONE : return FALSE;
+ case SDRREPFUNC_OBJ_DELETE : return rView.HasMarkedObj();
+ case SDRREPFUNC_OBJ_COMBINE_POLYPOLY: return rView.IsCombinePossible(FALSE);
+ case SDRREPFUNC_OBJ_COMBINE_ONEPOLY : return rView.IsCombinePossible(TRUE);
+ case SDRREPFUNC_OBJ_DISMANTLE_POLYS : return rView.IsDismantlePossible(FALSE);
+ case SDRREPFUNC_OBJ_DISMANTLE_LINES : return rView.IsDismantlePossible(TRUE);
+ case SDRREPFUNC_OBJ_CONVERTTOPOLY : return rView.IsConvertToPolyObjPossible(FALSE);
+ case SDRREPFUNC_OBJ_CONVERTTOPATH : return rView.IsConvertToPathObjPossible(FALSE);
+ case SDRREPFUNC_OBJ_GROUP : return rView.IsGroupPossible();
+ case SDRREPFUNC_OBJ_UNGROUP : return rView.IsUnGroupPossible();
+ case SDRREPFUNC_OBJ_PUTTOTOP : return rView.IsToTopPossible();
+ case SDRREPFUNC_OBJ_PUTTOBTM : return rView.IsToBtmPossible();
+ case SDRREPFUNC_OBJ_MOVTOTOP : return rView.IsToTopPossible();
+ case SDRREPFUNC_OBJ_MOVTOBTM : return rView.IsToBtmPossible();
+ case SDRREPFUNC_OBJ_REVORDER : return rView.IsReverseOrderPossible();
+ case SDRREPFUNC_OBJ_IMPORTMTF : return rView.IsImportMtfPossible();
+ } // switch
+ return FALSE;
+}
+
+void SdrUndoGroup::SdrRepeat(SdrView& rView)
+{
+ switch (eFunction) {
+ case SDRREPFUNC_OBJ_NONE : break;
+ case SDRREPFUNC_OBJ_DELETE : rView.DeleteMarked(); break;
+ case SDRREPFUNC_OBJ_COMBINE_POLYPOLY: rView.CombineMarkedObjects(FALSE); break;
+ case SDRREPFUNC_OBJ_COMBINE_ONEPOLY : rView.CombineMarkedObjects(TRUE); break;
+ case SDRREPFUNC_OBJ_DISMANTLE_POLYS : rView.DismantleMarkedObjects(FALSE); break;
+ case SDRREPFUNC_OBJ_DISMANTLE_LINES : rView.DismantleMarkedObjects(TRUE); break;
+ case SDRREPFUNC_OBJ_CONVERTTOPOLY : rView.ConvertMarkedToPolyObj(FALSE); break;
+ case SDRREPFUNC_OBJ_CONVERTTOPATH : rView.ConvertMarkedToPathObj(FALSE); break;
+ case SDRREPFUNC_OBJ_GROUP : rView.GroupMarked(); break;
+ case SDRREPFUNC_OBJ_UNGROUP : rView.UnGroupMarked(); break;
+ case SDRREPFUNC_OBJ_PUTTOTOP : rView.PutMarkedToTop(); break;
+ case SDRREPFUNC_OBJ_PUTTOBTM : rView.PutMarkedToBtm(); break;
+ case SDRREPFUNC_OBJ_MOVTOTOP : rView.MovMarkedToTop(); break;
+ case SDRREPFUNC_OBJ_MOVTOBTM : rView.MovMarkedToBtm(); break;
+ case SDRREPFUNC_OBJ_REVORDER : rView.ReverseOrderOfMarked(); break;
+ case SDRREPFUNC_OBJ_IMPORTMTF : rView.DoImportMarkedMtf(); break;
+ } // switch
+}
+
+XubString SdrUndoGroup::GetSdrRepeatComment(SdrView& rView) const
+{
+ XubString aRet(aComment);
+ sal_Char aSearchText[] = "%O";
+ String aSearchString(aSearchText, sizeof(aSearchText-1));
+
+ aRet.SearchAndReplace(aSearchString, ImpGetResStr(STR_ObjNameSingulPlural));
+
+ return aRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@@@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@@@@ @@ @@@@ @@ @@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@ @@@@@ @@@@ @@@@@ @@@@ @@ @@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoObj::SdrUndoObj(SdrObject& rNewObj):
+ SdrUndoAction(*rNewObj.GetModel()),
+ pObj(&rNewObj)
+{
+}
+
+void SdrUndoObj::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, FASTBOOL bRepeat) const
+{
+ rStr = ImpGetResStr(nStrCacheID);
+ sal_Char aSearchText[] = "%O";
+ String aSearchString(aSearchText, sizeof(aSearchText-1));
+
+ xub_StrLen nPos = rStr.Search(aSearchString);
+
+ if(nPos != STRING_NOTFOUND)
+ {
+ rStr.Erase(nPos, 2);
+
+ if(bRepeat)
+ {
+ rStr.Insert(ImpGetResStr(STR_ObjNameSingulPlural), nPos);
+ }
+ else
+ {
+ XubString aStr;
+
+ pObj->TakeObjNameSingul(aStr);
+ rStr.Insert(aStr, nPos);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, FASTBOOL bStyleSheet1, FASTBOOL bSaveText):
+ SdrUndoObj(rNewObj),
+ pUndoSet(NULL),
+ pRedoSet(NULL),
+ pRepeatSet(NULL),
+ pUndoStyleSheet(NULL),
+ pRedoStyleSheet(NULL),
+ pRepeatStyleSheet(NULL),
+ pTextUndo(NULL),
+ pUndoGroup(NULL),
+ bHaveToTakeRedoSet(TRUE)
+{
+ bStyleSheet=bStyleSheet1;
+ pUndoSet=new SfxItemSet(rNewObj.GetModel()->GetUndoItemPool());
+ pRedoSet=new SfxItemSet(rNewObj.GetModel()->GetUndoItemPool());
+ SdrObjList* pOL=rNewObj.GetSubList();
+ if (pOL!=NULL && pOL->GetObjCount()) { // Aha, Gruppenobjekt
+ pUndoGroup=new SdrUndoGroup(*pObj->GetModel());
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
+ pUndoGroup->AddAction(new SdrUndoAttrObj(*pOL->GetObj(nObjNum),bStyleSheet1));
+ }
+ } else {
+ pObj->TakeAttributes(*pUndoSet,FALSE,TRUE);
+ if (bStyleSheet) pUndoStyleSheet=pObj->GetStyleSheet();
+ if (bSaveText) {
+ pTextUndo=pObj->GetOutlinerParaObject();
+ if (pTextUndo!=NULL) pTextUndo=pTextUndo->Clone();
+ }
+ }
+}
+
+__EXPORT SdrUndoAttrObj::~SdrUndoAttrObj()
+{
+ if (pUndoSet!=NULL) delete pUndoSet;
+ if (pRedoSet!=NULL) delete pRedoSet;
+ if (pRepeatSet!=NULL) delete pRepeatSet;
+ if (pUndoGroup!=NULL) delete pUndoGroup;
+ if (pTextUndo !=NULL) delete pTextUndo;
+}
+
+void SdrUndoAttrObj::SetRepeatAttr(const SfxItemSet& rSet)
+{
+ if (pRepeatSet!=NULL) delete pRepeatSet;
+ pRepeatSet=new SfxItemSet(pObj->GetModel()->GetUndoItemPool());
+ pRepeatSet->Put(rSet);
+}
+
+void __EXPORT SdrUndoAttrObj::Undo()
+{
+ if (pUndoGroup!=NULL) {
+ pUndoGroup->Undo();
+ } else {
+ if (bHaveToTakeRedoSet) {
+ bHaveToTakeRedoSet=FALSE;
+ pObj->TakeAttributes(*pRedoSet,FALSE,TRUE);
+ if (bStyleSheet) pRedoStyleSheet=pObj->GetStyleSheet();
+ }
+ if (bStyleSheet) {
+ pRedoStyleSheet=pObj->GetStyleSheet();
+ pObj->SetStyleSheet(pUndoStyleSheet,TRUE);
+ }
+ pObj->SetAttributes(*pUndoSet,TRUE);
+ if (pTextUndo!=NULL) {
+ pObj->SetOutlinerParaObject(pTextUndo->Clone());
+ }
+ }
+}
+
+void __EXPORT SdrUndoAttrObj::Redo()
+{
+ if (pUndoGroup!=NULL) {
+ pUndoGroup->Redo();
+ } else {
+ if (bStyleSheet) {
+ pUndoStyleSheet=pObj->GetStyleSheet();
+ pObj->SetStyleSheet(pRedoStyleSheet,TRUE);
+ }
+ pObj->SetAttributes(*pRedoSet,TRUE);
+ }
+}
+
+XubString __EXPORT SdrUndoAttrObj::GetComment() const
+{
+ XubString aStr;
+ if (bStyleSheet) {
+ ImpTakeDescriptionStr(STR_EditSetStylesheet,aStr);
+ } else {
+ ImpTakeDescriptionStr(STR_EditSetAttributes,aStr);
+ }
+ return aStr;
+}
+
+void SdrUndoAttrObj::SdrRepeat(SdrView& rView)
+{
+ if (pRepeatSet!=NULL) {
+ rView.SetAttrToMarked(*pRepeatSet,FALSE);
+ }
+}
+
+FASTBOOL SdrUndoAttrObj::CanSdrRepeat(SdrView& rView) const
+{
+ return pRepeatSet!=NULL && rView.HasMarkedObj();
+}
+
+XubString SdrUndoAttrObj::GetSdrRepeatComment(SdrView& rView) const
+{
+ XubString aStr;
+ if (bStyleSheet) {
+ ImpTakeDescriptionStr(STR_EditSetStylesheet,aStr,TRUE);
+ } else {
+ ImpTakeDescriptionStr(STR_EditSetAttributes,aStr,TRUE);
+ }
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoMoveObj::Undo()
+{
+ pObj->Move(Size(-aDistance.Width(),-aDistance.Height()));
+}
+
+void __EXPORT SdrUndoMoveObj::Redo()
+{
+ pObj->Move(Size(aDistance.Width(),aDistance.Height()));
+}
+
+XubString __EXPORT SdrUndoMoveObj::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditMove,aStr);
+ return aStr;
+}
+
+void SdrUndoMoveObj::SdrRepeat(SdrView& rView)
+{
+ rView.MoveMarkedObj(aDistance);
+}
+
+FASTBOOL SdrUndoMoveObj::CanSdrRepeat(SdrView& rView) const
+{
+ return rView.HasMarkedObj();
+}
+
+XubString SdrUndoMoveObj::GetSdrRepeatComment(SdrView& rView) const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditMove,aStr,TRUE);
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoGeoObj::SdrUndoGeoObj(SdrObject& rNewObj):
+ SdrUndoObj(rNewObj),
+ pUndoGeo(NULL),
+ pRedoGeo(NULL),
+ pUndoGroup(NULL)
+{
+ SdrObjList* pOL=rNewObj.GetSubList();
+ if (pOL!=NULL && pOL->GetObjCount() && !rNewObj.ISA(E3dScene))
+ {
+ // Aha, Gruppenobjekt
+ // AW: Aber keine 3D-Szene, dann nur fuer die Szene selbst den Undo anlegen
+ pUndoGroup=new SdrUndoGroup(*pObj->GetModel());
+ ULONG nObjAnz=pOL->GetObjCount();
+ for (ULONG nObjNum=0; nObjNum<nObjAnz; nObjNum++) {
+ pUndoGroup->AddAction(new SdrUndoGeoObj(*pOL->GetObj(nObjNum)));
+ }
+ } else {
+ pUndoGeo=pObj->GetGeoData();
+ }
+}
+
+__EXPORT SdrUndoGeoObj::~SdrUndoGeoObj()
+{
+ if (pUndoGeo!=NULL) delete pUndoGeo;
+ if (pRedoGeo!=NULL) delete pRedoGeo;
+ if (pUndoGroup!=NULL) delete pUndoGroup;
+}
+
+void __EXPORT SdrUndoGeoObj::Undo()
+{
+ if (pUndoGroup!=NULL) {
+ pUndoGroup->Undo();
+ } else {
+ if (pRedoGeo!=NULL) delete pRedoGeo;
+ pRedoGeo=pObj->GetGeoData();
+ pObj->SetGeoData(*pUndoGeo);
+ }
+}
+
+void __EXPORT SdrUndoGeoObj::Redo()
+{
+ if (pUndoGroup!=NULL) {
+ pUndoGroup->Redo();
+ } else {
+ if (pUndoGeo!=NULL) delete pUndoGeo;
+ pUndoGeo=pObj->GetGeoData();
+ pObj->SetGeoData(*pRedoGeo);
+ }
+}
+
+XubString __EXPORT SdrUndoGeoObj::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_DragMethObjOwn,aStr);
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoObjList::SdrUndoObjList(SdrObject& rNewObj, FASTBOOL bOrdNumDirect):
+ pView(NULL),
+ pPageView(NULL),
+ SdrUndoObj(rNewObj),
+ bOwner(FALSE)
+{
+ pObjList=pObj->GetObjList();
+ if (bOrdNumDirect) {
+ nOrdNum=pObj->GetOrdNumDirect();
+ } else {
+ nOrdNum=pObj->GetOrdNum();
+ }
+}
+
+__EXPORT SdrUndoObjList::~SdrUndoObjList()
+{
+ if (pObj!=NULL && IsOwner())
+ {
+ // Attribute muessen wieder in den regulaeren Pool
+ SetOwner(FALSE);
+
+ // nun loeschen
+ delete pObj;
+ }
+}
+
+void SdrUndoObjList::SetOwner(BOOL bNew)
+{
+ if(bNew != bOwner)
+ {
+ // Besitzuebergang des Objektes. Hier muss auch die Speicherung der
+ // Items des Objektes zwischen dem allgemeinen Pool und dem Pool des
+ // Undo-Managers wechseln
+ if(bNew)
+ {
+ pObj->MigrateItemPool(&rMod.GetItemPool(), &rMod.GetUndoItemPool());
+ }
+ else
+ {
+ pObj->MigrateItemPool(&rMod.GetUndoItemPool(), &rMod.GetItemPool());
+ pObj->SetStyleSheet(pObj->GetStyleSheet(), TRUE);
+ }
+
+ // umsetzen
+ bOwner = bNew;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoRemoveObj::Undo()
+{
+ DBG_ASSERT(!pObj->IsInserted(),"UndoRemoveObj: pObj ist bereits Inserted");
+ if (!pObj->IsInserted()) {
+ SdrInsertReason aReason(SDRREASON_UNDO);
+ pObjList->InsertObject(pObj,nOrdNum,&aReason);
+ if(pObjList->GetOwnerObj() && pObjList->GetOwnerObj()->ISA(E3dObject) && pObj->ISA(E3dObject))
+ {
+ E3dScene* pScene = ((E3dObject*)pObjList->GetOwnerObj())->GetScene();
+ if(pScene)
+ pScene->CorrectSceneDimensions();
+ }
+ }
+}
+
+void __EXPORT SdrUndoRemoveObj::Redo()
+{
+ DBG_ASSERT(pObj->IsInserted(),"RedoRemoveObj: pObj ist nicht Inserted");
+ if (pObj->IsInserted()) {
+ SdrObject* pChkObj=pObjList->RemoveObject(nOrdNum);
+ DBG_ASSERT(pChkObj==pObj,"RedoRemoveObj: RemoveObjNum!=pObj");
+ if(pObjList->GetOwnerObj() && pObjList->GetOwnerObj()->ISA(E3dObject) && pObj->ISA(E3dObject))
+ {
+ E3dScene* pScene = ((E3dObject*)pObjList->GetOwnerObj())->GetScene();
+ if(pScene)
+ pScene->CorrectSceneDimensions();
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoInsertObj::Undo()
+{
+ DBG_ASSERT(pObj->IsInserted(),"UndoInsertObj: pObj ist nicht Inserted");
+ if (pObj->IsInserted()) {
+ SdrObject* pChkObj=pObjList->RemoveObject(nOrdNum);
+ DBG_ASSERT(pChkObj==pObj,"UndoInsertObj: RemoveObjNum!=pObj");
+ if(pObjList->GetOwnerObj() && pObjList->GetOwnerObj()->ISA(E3dObject) && pObj->ISA(E3dObject))
+ {
+ E3dScene* pScene = ((E3dObject*)pObjList->GetOwnerObj())->GetScene();
+ if(pScene)
+ pScene->CorrectSceneDimensions();
+ }
+ }
+}
+
+void __EXPORT SdrUndoInsertObj::Redo()
+{
+ DBG_ASSERT(!pObj->IsInserted(),"RedoInsertObj: pObj ist bereits Inserted");
+ if (!pObj->IsInserted()) {
+ SdrInsertReason aReason(SDRREASON_UNDO);
+ pObjList->InsertObject(pObj,nOrdNum,&aReason);
+ if(pObjList->GetOwnerObj() && pObjList->GetOwnerObj()->ISA(E3dObject) && pObj->ISA(E3dObject))
+ {
+ E3dScene* pScene = ((E3dObject*)pObjList->GetOwnerObj())->GetScene();
+ if(pScene)
+ pScene->CorrectSceneDimensions();
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoDelObj::Undo()
+{
+ SdrUndoRemoveObj::Undo();
+ DBG_ASSERT(IsOwner(),"UndoDeleteObj: pObj gehoert nicht der UndoAction");
+ SetOwner(FALSE);
+}
+
+void __EXPORT SdrUndoDelObj::Redo()
+{
+ SdrUndoRemoveObj::Redo();
+ DBG_ASSERT(!IsOwner(),"RedoDeleteObj: pObj gehoert bereits der UndoAction");
+ SetOwner(TRUE);
+}
+
+XubString __EXPORT SdrUndoDelObj::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditDelete,aStr);
+ return aStr;
+}
+
+void SdrUndoDelObj::SdrRepeat(SdrView& rView)
+{
+ rView.DeleteMarked();
+}
+
+FASTBOOL SdrUndoDelObj::CanSdrRepeat(SdrView& rView) const
+{
+ return rView.HasMarkedObj();
+}
+
+XubString SdrUndoDelObj::GetSdrRepeatComment(SdrView& rView) const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_EditDelete,aStr,TRUE);
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoNewObj::Undo()
+{
+ SdrUndoInsertObj::Undo();
+ DBG_ASSERT(!IsOwner(),"RedoNewObj: pObj gehoert bereits der UndoAction");
+ SetOwner(TRUE);
+}
+
+void __EXPORT SdrUndoNewObj::Redo()
+{
+ SdrUndoInsertObj::Redo();
+ DBG_ASSERT(IsOwner(),"RedoNewObj: pObj gehoert nicht der UndoAction");
+ SetOwner(FALSE);
+}
+
+XubString __EXPORT SdrUndoNewObj::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoInsertObj,aStr);
+ return aStr;
+}
+
+SdrUndoReplaceObj::SdrUndoReplaceObj(SdrObject& rOldObj1, SdrObject& rNewObj1, FASTBOOL bOrdNumDirect):
+ SdrUndoObj(rOldObj1),
+ pNewObj(&rNewObj1),
+ bOldOwner(FALSE),
+ bNewOwner(FALSE)
+{
+ SetOldOwner(TRUE);
+
+ pObjList=pObj->GetObjList();
+ if (bOrdNumDirect) {
+ nOrdNum=pObj->GetOrdNumDirect();
+ } else {
+ nOrdNum=pObj->GetOrdNum();
+ }
+}
+
+__EXPORT SdrUndoReplaceObj::~SdrUndoReplaceObj()
+{
+ if (pObj!=NULL && IsOldOwner())
+ {
+ // Attribute muessen wieder in den regulaeren Pool
+ SetOldOwner(FALSE);
+
+ // nun loeschen
+ delete pObj;
+ }
+ if (pNewObj!=NULL && IsNewOwner())
+ {
+ // Attribute muessen wieder in den regulaeren Pool
+ SetNewOwner(FALSE);
+
+ // nun loeschen
+ delete pNewObj;
+ }
+}
+
+void __EXPORT SdrUndoReplaceObj::Undo()
+{
+ if (IsOldOwner() && !IsNewOwner()) {
+ DBG_ASSERT(!pObj->IsInserted(),"SdrUndoReplaceObj::Undo(): Altes Objekt ist bereits inserted!");
+ DBG_ASSERT(pNewObj->IsInserted(),"SdrUndoReplaceObj::Undo(): Neues Objekt ist nicht inserted!");
+ SetOldOwner(FALSE);
+ SetNewOwner(TRUE);
+ SdrObject* pCompObj=pObjList->ReplaceObject(pObj,nOrdNum);
+ } else {
+ DBG_ERROR("SdrUndoReplaceObj::Undo(): IsMine-Flags stehen verkehrt. Doppelter Undo-Aufruf?");
+ }
+}
+
+void __EXPORT SdrUndoReplaceObj::Redo()
+{
+ if (!IsOldOwner() && IsNewOwner()) {
+ DBG_ASSERT(!pNewObj->IsInserted(),"SdrUndoReplaceObj::Redo(): Neues Objekt ist bereits inserted!");
+ DBG_ASSERT(pObj->IsInserted(),"SdrUndoReplaceObj::Redo(): Altes Objekt ist nicht inserted!");
+ SetOldOwner(TRUE);
+ SetNewOwner(FALSE);
+ SdrObject* pCompObj=pObjList->ReplaceObject(pNewObj,nOrdNum);
+ } else {
+ DBG_ERROR("SdrUndoReplaceObj::Redo(): IsMine-Flags stehen verkehrt. Doppelter Redo-Aufruf?");
+ }
+}
+
+void SdrUndoReplaceObj::SetNewOwner(BOOL bNew)
+{
+ if(bNew != bNewOwner)
+ {
+ // Besitzuebergang des Objektes. Hier muss auch die Speicherung der
+ // Items des Objektes zwischen dem allgemeinen Pool und dem Pool des
+ // Undo-Managers wechseln
+ if(bNew)
+ {
+ pNewObj->MigrateItemPool(&rMod.GetItemPool(), &rMod.GetUndoItemPool());
+ }
+ else
+ {
+ pNewObj->MigrateItemPool(&rMod.GetUndoItemPool(), &rMod.GetItemPool());
+ }
+
+ // umsetzen
+ bNewOwner = bNew;
+ }
+}
+
+void SdrUndoReplaceObj::SetOldOwner(BOOL bNew)
+{
+ if(bNew != bOldOwner)
+ {
+ // Besitzuebergang des Objektes. Hier muss auch die Speicherung der
+ // Items des Objektes zwischen dem allgemeinen Pool und dem Pool des
+ // Undo-Managers wechseln
+ if(bNew)
+ {
+ pObj->MigrateItemPool(&rMod.GetItemPool(), &rMod.GetUndoItemPool());
+ }
+ else
+ {
+ pObj->MigrateItemPool(&rMod.GetUndoItemPool(), &rMod.GetItemPool());
+ }
+
+ // umsetzen
+ bOldOwner = bNew;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+XubString __EXPORT SdrUndoCopyObj::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoCopyObj,aStr);
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoObjOrdNum::SdrUndoObjOrdNum(SdrObject& rNewObj, UINT32 nOldOrdNum1, UINT32 nNewOrdNum1):
+ SdrUndoObj(rNewObj),
+ nOldOrdNum(nOldOrdNum1),
+ nNewOrdNum(nNewOrdNum1)
+{
+}
+
+void __EXPORT SdrUndoObjOrdNum::Undo()
+{
+ SdrObjList* pOL=pObj->GetObjList();
+ if (pOL==NULL) {
+ DBG_ERROR("UndoObjOrdNum: pObj hat keine ObjList");
+ return;
+ }
+ pOL->SetObjectOrdNum(nNewOrdNum,nOldOrdNum);
+}
+
+void __EXPORT SdrUndoObjOrdNum::Redo()
+{
+ SdrObjList* pOL=pObj->GetObjList();
+ if (pOL==NULL) {
+ DBG_ERROR("RedoObjOrdNum: pObj hat keine ObjList");
+ return;
+ }
+ pOL->SetObjectOrdNum(nOldOrdNum,nNewOrdNum);
+}
+
+XubString __EXPORT SdrUndoObjOrdNum::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoObjOrdNum,aStr);
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoObjSetText::SdrUndoObjSetText(SdrObject& rNewObj):
+ SdrUndoObj(rNewObj),pOldText(NULL),pNewText(NULL),bNewTextAvailable(FALSE)
+{
+ pOldText=rNewObj.GetOutlinerParaObject();
+ if (pOldText!=NULL) pOldText=pOldText->Clone();
+}
+
+__EXPORT SdrUndoObjSetText::~SdrUndoObjSetText()
+{
+ if (pOldText!=NULL) delete pOldText;
+ if (pNewText!=NULL) delete pNewText;
+}
+
+void SdrUndoObjSetText::AfterSetText()
+{
+ if (!bNewTextAvailable) {
+ pNewText=pObj->GetOutlinerParaObject();
+ if (pNewText!=NULL) pNewText=pNewText->Clone();
+ bNewTextAvailable=TRUE;
+ }
+}
+
+void __EXPORT SdrUndoObjSetText::Undo()
+{
+ // alten Text sichern fuer Redo
+ if (!bNewTextAvailable) AfterSetText();
+ // Text fuer Undo kopieren, denn SetOutlinerParaObject() ist Eigentumsuebereignung
+ OutlinerParaObject* pText1=pOldText;
+ if (pText1!=NULL) pText1=pText1->Clone();
+ pObj->SetOutlinerParaObject(pText1);
+}
+
+void __EXPORT SdrUndoObjSetText::Redo()
+{
+ // Text fuer Undo kopieren, denn SetOutlinerParaObject() ist Eigentumsuebereignung
+ OutlinerParaObject* pText1=pNewText;
+ if (pText1!=NULL) pText1=pText1->Clone();
+ pObj->SetOutlinerParaObject(pText1);
+}
+
+XubString __EXPORT SdrUndoObjSetText::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoObjSetText,aStr);
+ return aStr;
+}
+
+XubString SdrUndoObjSetText::GetSdrRepeatComment(SdrView& rView) const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoObjSetText,aStr);
+ return aStr;
+}
+
+void SdrUndoObjSetText::SdrRepeat(SdrView& rView)
+{
+ if (bNewTextAvailable && rView.HasMarkedObj()) {
+ const SdrMarkList& rML=rView.GetMarkList();
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoObjSetText,aStr);
+ rView.BegUndo(aStr);
+ ULONG nAnz=rML.GetMarkCount();
+ for (ULONG nm=0; nm<nAnz; nm++) {
+ SdrObject* pObj=rML.GetMark(nm)->GetObj();
+ SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pObj);
+ if (pTextObj!=NULL) {
+ rView.AddUndo(new SdrUndoObjSetText(*pTextObj));
+ OutlinerParaObject* pText1=pNewText;
+ if (pText1!=NULL) pText1=pText1->Clone();
+ pTextObj->SetOutlinerParaObject(pText1);
+ }
+ }
+ rView.EndUndo();
+ }
+}
+
+FASTBOOL SdrUndoObjSetText::CanSdrRepeat(SdrView& rView) const
+{
+ FASTBOOL bOk=FALSE;
+ if (bNewTextAvailable && rView.HasMarkedObj()) {
+ bOk=TRUE;
+ }
+ return bOk;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@@@ @@ @@ @@@@@ @@@@@
+// @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@@@@@ @@@@ @@@@ @@@@@
+// @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@
+// @@@@@ @@ @@ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoLayer::SdrUndoLayer(USHORT nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel):
+ SdrUndoAction(rNewModel),
+ pLayer(rNewLayerAdmin.GetLayer(nLayerNum)),
+ pLayerAdmin(&rNewLayerAdmin),
+ nNum(nLayerNum),
+ bItsMine(FALSE)
+{
+}
+
+SdrUndoLayer::~SdrUndoLayer()
+{
+ if (bItsMine) {
+ delete pLayer;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrUndoNewLayer::Undo()
+{
+ DBG_ASSERT(!bItsMine,"SdrUndoNewLayer::Undo(): Layer gehoert bereits der UndoAction");
+ bItsMine=TRUE;
+ SdrLayer* pCmpLayer=pLayerAdmin->RemoveLayer(nNum);
+ DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoNewLayer::Undo(): Removter Layer ist != pLayer");
+}
+
+void SdrUndoNewLayer::Redo()
+{
+ DBG_ASSERT(bItsMine,"SdrUndoNewLayer::Undo(): Layer gehoert nicht der UndoAction");
+ bItsMine=FALSE;
+ pLayerAdmin->InsertLayer(pLayer,nNum);
+}
+
+XubString SdrUndoNewLayer::GetComment() const
+{
+ return ImpGetResStr(STR_UndoNewLayer);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrUndoDelLayer::Undo()
+{
+ DBG_ASSERT(bItsMine,"SdrUndoDelLayer::Undo(): Layer gehoert nicht der UndoAction");
+ bItsMine=FALSE;
+ pLayerAdmin->InsertLayer(pLayer,nNum);
+}
+
+void SdrUndoDelLayer::Redo()
+{
+ DBG_ASSERT(!bItsMine,"SdrUndoDelLayer::Undo(): Layer gehoert bereits der UndoAction");
+ bItsMine=TRUE;
+ SdrLayer* pCmpLayer=pLayerAdmin->RemoveLayer(nNum);
+ DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoDelLayer::Redo(): Removter Layer ist != pLayer");
+}
+
+XubString SdrUndoDelLayer::GetComment() const
+{
+ return ImpGetResStr(STR_UndoDelLayer);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrUndoMoveLayer::Undo()
+{
+ SdrLayer* pCmpLayer=pLayerAdmin->RemoveLayer(nNeuPos);
+ DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Undo(): Removter Layer ist != pLayer");
+ pLayerAdmin->InsertLayer(pLayer,nNum);
+}
+
+void SdrUndoMoveLayer::Redo()
+{
+ SdrLayer* pCmpLayer=pLayerAdmin->RemoveLayer(nNum);
+ DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Redo(): Removter Layer ist != pLayer");
+ pLayerAdmin->InsertLayer(pLayer,nNeuPos);
+}
+
+XubString SdrUndoMoveLayer::GetComment() const
+{
+ return ImpGetResStr(STR_UndoMovLayer);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@ @@@@ @@@@@ @@@@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@
+// @@@@@ @@@@@@ @@ @@@ @@@@ @@@@
+// @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@@@@ @@@@@ @@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoPage::SdrUndoPage(SdrPage& rNewPg):
+ SdrUndoAction(*rNewPg.GetModel()), pPage(&rNewPg)
+{ }
+
+void SdrUndoPage::ImpInsertPage(USHORT nNum)
+{
+ DBG_ASSERT(!pPage->IsInserted(),"SdrUndoPage::ImpInsertPage(): pPage ist bereits Inserted");
+ if (!pPage->IsInserted()) {
+ if (pPage->IsMasterPage()) {
+ rMod.InsertMasterPage(pPage,nNum);
+ } else {
+ rMod.InsertPage(pPage,nNum);
+ }
+ }
+}
+
+void SdrUndoPage::ImpRemovePage(USHORT nNum)
+{
+ DBG_ASSERT(pPage->IsInserted(),"SdrUndoPage::ImpRemovePage(): pPage ist nicht Inserted");
+ if (pPage->IsInserted()) {
+ SdrPage* pChkPg=NULL;
+ if (pPage->IsMasterPage()) {
+ pChkPg=rMod.RemoveMasterPage(nNum);
+ } else {
+ pChkPg=rMod.RemovePage(nNum);
+ }
+ DBG_ASSERT(pChkPg==pPage,"SdrUndoPage::ImpRemovePage(): RemovePage!=pPage");
+ }
+}
+
+void SdrUndoPage::ImpMovePage(USHORT nOldNum, USHORT nNewNum)
+{
+ DBG_ASSERT(pPage->IsInserted(),"SdrUndoPage::ImpMovePage(): pPage ist nicht Inserted");
+ if (pPage->IsInserted()) {
+ if (pPage->IsMasterPage()) {
+ rMod.MoveMasterPage(nOldNum,nNewNum);
+ } else {
+ rMod.MovePage(nOldNum,nNewNum);
+ }
+ }
+}
+
+void SdrUndoPage::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, USHORT n, FASTBOOL bRepeat) const
+{
+ rStr=ImpGetResStr(nStrCacheID);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoPageList::SdrUndoPageList(SdrPage& rNewPg):
+ SdrUndoPage(rNewPg),
+ bItsMine(FALSE)
+{
+ nPageNum=rNewPg.GetPageNum();
+}
+
+__EXPORT SdrUndoPageList::~SdrUndoPageList()
+{
+ if(bItsMine && pPage)
+ {
+ delete pPage;
+ pPage = 0L;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoDelPage::SdrUndoDelPage(SdrPage& rNewPg):
+ SdrUndoPageList(rNewPg),
+ pUndoGroup(NULL)
+{
+ bItsMine=TRUE;
+ // Und nun ggf. die MasterPage-Beziehungen merken
+ if (pPage->IsMasterPage()) {
+ USHORT nMasterPageNum=pPage->GetPageNum();
+ USHORT nPageAnz=rMod.GetPageCount();
+ for (USHORT nPageNum=0; nPageNum<nPageAnz; nPageNum++) {
+ SdrPage* pDrawPage=rMod.GetPage(nPageNum);
+ USHORT nMasterAnz=pDrawPage->GetMasterPageCount();
+ for (USHORT nMasterNum=nMasterAnz; nMasterNum>0;) { // Rueckwaerts, da die Beziehungen auch rueckwaerts entfernt werden
+ nMasterNum--;
+ USHORT nReferencedMaster=pDrawPage->GetMasterPageNum(nMasterNum);
+ if (nReferencedMaster==nMasterPageNum) { // Aha, betroffen
+ if (pUndoGroup==NULL) {
+ pUndoGroup=new SdrUndoGroup(rMod);
+ }
+ pUndoGroup->AddAction(new SdrUndoPageRemoveMasterPage(*pDrawPage,nMasterNum));
+ }
+ }
+ }
+ }
+}
+
+__EXPORT SdrUndoDelPage::~SdrUndoDelPage()
+{
+ if (pUndoGroup!=NULL) {
+ delete pUndoGroup;
+ }
+}
+
+void __EXPORT SdrUndoDelPage::Undo()
+{
+ ImpInsertPage(nPageNum);
+ if (pUndoGroup!=NULL) { // MasterPage-Beziehungen wiederherstellen
+ pUndoGroup->Undo();
+ }
+ DBG_ASSERT(bItsMine,"UndoDeletePage: pPage gehoert nicht der UndoAction");
+ bItsMine=FALSE;
+}
+
+void __EXPORT SdrUndoDelPage::Redo()
+{
+ ImpRemovePage(nPageNum);
+ // Die MasterPage-Beziehungen werden ggf. von selbst geloesst
+ DBG_ASSERT(!bItsMine,"RedoDeletePage: pPage gehoert bereits der UndoAction");
+ bItsMine=TRUE;
+}
+
+XubString __EXPORT SdrUndoDelPage::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoDelPage,aStr,0,FALSE);
+ return aStr;
+}
+
+XubString SdrUndoDelPage::GetSdrRepeatComment(SdrView& rView) const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoDelPage,aStr,0,FALSE);
+ return aStr;
+}
+
+void SdrUndoDelPage::SdrRepeat(SdrView& rView)
+{
+}
+
+FASTBOOL SdrUndoDelPage::CanSdrRepeat(SdrView& rView) const
+{
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoNewPage::Undo()
+{
+ ImpRemovePage(nPageNum);
+ DBG_ASSERT(!bItsMine,"UndoNewPage: pPage gehoert bereits der UndoAction");
+ bItsMine=TRUE;
+}
+
+void __EXPORT SdrUndoNewPage::Redo()
+{
+ ImpInsertPage(nPageNum);
+ DBG_ASSERT(bItsMine,"RedoNewPage: pPage gehoert nicht der UndoAction");
+ bItsMine=FALSE;
+}
+
+XubString __EXPORT SdrUndoNewPage::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoNewPage,aStr,0,FALSE);
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+XubString __EXPORT SdrUndoCopyPage::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoCopPage,aStr,0,FALSE);
+ return aStr;
+}
+
+XubString SdrUndoCopyPage::GetSdrRepeatComment(SdrView& rView) const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoCopPage,aStr,0,FALSE);
+ return aStr;
+}
+
+void SdrUndoCopyPage::SdrRepeat(SdrView& rView)
+{
+
+}
+
+FASTBOOL SdrUndoCopyPage::CanSdrRepeat(SdrView& rView) const
+{
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoSetPageNum::Undo()
+{
+ ImpMovePage(nNewPageNum,nOldPageNum);
+}
+
+void __EXPORT SdrUndoSetPageNum::Redo()
+{
+ ImpMovePage(nOldPageNum,nNewPageNum);
+}
+
+XubString __EXPORT SdrUndoSetPageNum::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoMovPage,aStr,0,FALSE);
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@@@ @@@@ @@@@@@ @@@@@ @@@@@ @@@@@ @@@@ @@@@ @@@@@ @@@@
+// @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@@@@@@ @@@@@@ @@@@ @@ @@@@ @@@@@ @@@@@ @@@@@@ @@ @@@ @@@@ @@@@
+// @@ @ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@@@ @@ @@@@@ @@ @@ @@ @@ @@ @@@@@ @@@@@ @@@@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrUndoPageMasterPage::SdrUndoPageMasterPage(SdrPage& rNewPg, USHORT nMasterDescriptorNum):
+ SdrUndoPage(rNewPg), pMasterDescriptor(NULL),
+ pNewMasterDescriptor(NULL), nMasterNum(0), nNewMasterNum(0)
+{
+ nMasterNum=nMasterDescriptorNum;
+ SdrMasterPageDescriptor* pDscr=&rNewPg.GetMasterPageDescriptor(nMasterDescriptorNum);
+ if (pDscr!=NULL) { // den betroffenen MasterPageDescriptor kopieren
+ pMasterDescriptor=new SdrMasterPageDescriptor(*pDscr);
+ } else {
+#ifdef DBGUTIL
+ String aMsg("SdrUndoPageMasterPage::Ctor(): Descriptornummer "); aMsg+=nMasterNum;
+ aMsg+="\nKein MasterPageDescriptor an dieser Position gefunden.";
+ DBG_ERROR(aMsg.GetStr());
+#endif
+ }
+}
+
+__EXPORT SdrUndoPageMasterPage::~SdrUndoPageMasterPage()
+{
+ if (pMasterDescriptor!=NULL) delete pMasterDescriptor;
+ if (pNewMasterDescriptor!=NULL) delete pNewMasterDescriptor;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoPageInsertMasterPage::Undo()
+{
+#ifdef DBGUTIL
+ String aMsg("SdrUndoPageInsertMasterPage::Undo(): Descriptornummer "); aMsg+=nMasterNum;
+ if (pMasterDescriptor!=NULL) {
+ aMsg+=" (MasterPage-Nummer im gemerkten Descriptor ist ";
+ aMsg+=pMasterDescriptor->GetPageNum();
+ aMsg+=')';
+ } else {
+ aMsg+=" (kein Descriptor gemerkt)";
+ }
+ aMsg+="\n";
+ if (nMasterNum>=pPage->GetMasterPageCount()) {
+ aMsg+="An der Seite sind nur ";
+ aMsg+=pPage->GetMasterPageCount();
+ aMsg+=" Descriptoren vorhanden.";
+ DBG_ERROR(aMsg.GetStr());
+ } else if (pMasterDescriptor!=NULL && *pMasterDescriptor!=*pPage->GetMasterPageDescriptor(nMasterNum)) {
+ aMsg+="Aktueller und gemerkter Descriptor enthalten unterschiedliche MasterPage-Nummern";
+ DBG_ERROR(aMsg.GetStr());
+ }
+#endif
+ pPage->RemoveMasterPage(nMasterNum);
+}
+
+void __EXPORT SdrUndoPageInsertMasterPage::Redo()
+{
+ if (pMasterDescriptor!=NULL) {
+ pPage->InsertMasterPage(*pMasterDescriptor,nMasterNum);
+ } else {
+#ifdef DBGUTIL
+ String aMsg("SdrUndoPageInsertMasterPage::Redo(): Descriptornummer "); aMsg+=nMasterNum;
+ aMsg+="Kein MasterPageDescriptor gemerkt.";
+ DBG_ERROR(aMsg.GetStr());
+#endif
+ }
+}
+
+XubString __EXPORT SdrUndoPageInsertMasterPage::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoNewPageMasterDscr,aStr,0,FALSE);
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoPageRemoveMasterPage::Undo()
+{
+ if (pMasterDescriptor!=NULL) {
+ pPage->InsertMasterPage(*pMasterDescriptor,nMasterNum);
+ } else {
+#ifdef DBGUTIL
+ String aMsg("SdrUndoPageRemoveMasterPage::Undo(): Descriptornummer "); aMsg+=nMasterNum;
+ aMsg+="Kein MasterPageDescriptor gemerkt.";
+ DBG_ERROR(aMsg.GetStr());
+#endif
+ }
+}
+
+void __EXPORT SdrUndoPageRemoveMasterPage::Redo()
+{
+#ifdef DBGUTIL
+ String aMsg("SdrUndoPageRemoveMasterPage::Redo(): Descriptornummer "); aMsg+=nMasterNum;
+ if (pMasterDescriptor!=NULL) {
+ aMsg+=" (MasterPage-Nummer im gemerkten Descriptor ist ";
+ aMsg+=pMasterDescriptor->GetPageNum();
+ aMsg+=')';
+ } else {
+ aMsg+=" (kein Descriptor gemerkt)";
+ }
+ aMsg+="\n";
+ if (nMasterNum>=pPage->GetMasterPageCount()) {
+ aMsg+="An der Seite sind nur ";
+ aMsg+=pPage->GetMasterPageCount();
+ aMsg+=" Descriptoren vorhanden.";
+ DBG_ERROR(aMsg.GetStr());
+ } else if (pMasterDescriptor!=NULL && *pMasterDescriptor!=*pPage->GetMasterPageDescriptor(nMasterNum)) {
+ aMsg+="Aktueller und gemerkter Descriptor enthalten unterschiedliche MasterPage-Nummern";
+ DBG_ERROR(aMsg.GetStr());
+ }
+#endif
+ pPage->RemoveMasterPage(nMasterNum);
+}
+
+XubString __EXPORT SdrUndoPageRemoveMasterPage::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoDelPageMasterDscr,aStr,0,FALSE);
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoPageMoveMasterPage::Undo()
+{
+ pPage->MoveMasterPage(nNewMasterNum,nMasterNum);
+}
+
+void __EXPORT SdrUndoPageMoveMasterPage::Redo()
+{
+ pPage->MoveMasterPage(nMasterNum,nNewMasterNum);
+}
+
+XubString __EXPORT SdrUndoPageMoveMasterPage::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoMovPageMasterDscr,aStr,0,FALSE);
+ return aStr;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void __EXPORT SdrUndoPageChangeMasterPage::Undo()
+{
+ if (pNewMasterDescriptor==NULL) {
+ SdrMasterPageDescriptor* pDscr=&pPage->GetMasterPageDescriptor(nMasterNum);
+ if (pDscr!=NULL) { // den neuen MasterPageDescriptor merken fuer Redo
+ pNewMasterDescriptor=new SdrMasterPageDescriptor(*pDscr);
+ } else {
+#ifdef DBGUTIL
+ String aMsg("SdrUndoPageChangeMasterPage::Undo(): Descriptornummer "); aMsg+=nMasterNum;
+ aMsg+="\nKein MasterPageDescriptor an dieser Position gefunden.";
+ DBG_ERROR(aMsg.GetStr());
+#endif
+ }
+ }
+ if (pMasterDescriptor!=NULL) {
+ pPage->SetMasterPageDescriptor(*pMasterDescriptor,nMasterNum);
+ }
+}
+
+void __EXPORT SdrUndoPageChangeMasterPage::Redo()
+{
+ if (pNewMasterDescriptor!=NULL) {
+ pPage->SetMasterPageDescriptor(*pNewMasterDescriptor,nMasterNum);
+ }
+}
+
+XubString __EXPORT SdrUndoPageChangeMasterPage::GetComment() const
+{
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_UndoChgPageMasterDscr,aStr,0,FALSE);
+ return aStr;
+}
+
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
new file mode 100644
index 0000000000..393620b11c
--- /dev/null
+++ b/svx/source/svdraw/svdview.cxx
@@ -0,0 +1,1405 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdview.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _EEITEM_HXX //autogen
+#include <eeitem.hxx>
+#endif
+
+#include "svdio.hxx"
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+#include "svdpagv.hxx"
+#include "svdmrkv.hxx"
+#include "svdedxv.hxx"
+#include "svdobj.hxx"
+#include "svdopath.hxx" // fuer GetContext
+#include "svdograf.hxx" // fuer GetContext
+#include "svdetc.hxx" // Fuer SdrEngineDefaults
+#include "svdibrow.hxx"
+#include "svdoutl.hxx"
+#include "svdview.hxx"
+#include "editview.hxx" // fuer GetField
+#define ITEMID_FIELD EE_FEATURE_FIELD /* wird fuer #include <flditem.hxx> benoetigt */
+#include "flditem.hxx" // fuer URLField
+#include "obj3d.hxx"
+#include "svddrgmt.hxx"
+#include "svdoutl.hxx"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrViewEvent::SdrViewEvent():
+ bMouseDown(FALSE),
+ bMouseUp(FALSE),
+ nMouseClicks(0),
+ nMouseMode(0),
+ nMouseCode(0),
+ nHlplIdx(0),
+ nGlueId(0),
+ pHdl(NULL),
+ pObj(NULL),
+ pRootObj(NULL),
+ pPV(NULL),
+ eHit(SDRHIT_NONE),
+ eEvent(SDREVENT_NONE),
+ eHdlKind(HDL_MOVE),
+ bDoubleHdlSize(FALSE),
+ pURLField(NULL),
+ bIsAction(FALSE),
+ bIsTextEdit(FALSE),
+ bTextEditHit(FALSE),
+ bAddMark(FALSE),
+ bUnmark(FALSE),
+ bPrevNextMark(FALSE),
+ bMarkPrev(FALSE),
+ bInsPointNewObj(FALSE),
+ eEndCreateCmd(SDRCREATE_NEXTPOINT),
+ bDragWithCopy(FALSE),
+ bCaptureMouse(FALSE),
+ bReleaseMouse(FALSE)
+{
+}
+
+SdrViewEvent::~SdrViewEvent()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@
+// @@ @@ @@ @@ @@ @ @@
+// @@@@@ @@ @@@@ @@@@@@@
+// @@@ @@ @@ @@@@@@@
+// @@@ @@ @@ @@@ @@@
+// @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1(SdrView,SdrCreateView);
+
+SdrView::SdrView(SdrModel* pModel1, OutputDevice* pOut):
+ SdrCreateView(pModel1,pOut),
+ bNoExtendedMouseDispatcher(FALSE),
+ bNoExtendedKeyDispatcher(FALSE),
+ bNoExtendedCommandDispatcher(FALSE)
+{
+ bTextEditOnObjectsWithoutTextIfTextTool=FALSE;
+}
+
+SdrView::SdrView(SdrModel* pModel1, ExtOutputDevice* pXOut):
+ SdrCreateView(pModel1,pXOut),
+ bNoExtendedMouseDispatcher(FALSE),
+ bNoExtendedKeyDispatcher(FALSE),
+ bNoExtendedCommandDispatcher(FALSE)
+{
+ bTextEditOnObjectsWithoutTextIfTextTool=FALSE;
+}
+
+SdrView::SdrView(SdrModel* pModel1):
+ SdrCreateView(pModel1,(OutputDevice*)NULL),
+ bNoExtendedMouseDispatcher(FALSE),
+ bNoExtendedKeyDispatcher(FALSE),
+ bNoExtendedCommandDispatcher(FALSE)
+{
+ bTextEditOnObjectsWithoutTextIfTextTool=FALSE;
+}
+
+BOOL SdrView::KeyInput(const KeyEvent& rKEvt, Window* pWin)
+{
+ SetActualWin(pWin);
+ BOOL bRet=SdrCreateView::KeyInput(rKEvt,pWin);
+ if (!bRet && !IsExtendedKeyInputDispatcherEnabled()) {
+ bRet=TRUE;
+ switch (rKEvt.GetKeyCode().GetFullFunction()) {
+ case KEYFUNC_CUT : Cut(); break;
+ case KEYFUNC_COPY : Yank(); break;
+ case KEYFUNC_PASTE : Paste(pWin); break;
+ case KEYFUNC_DELETE: DeleteMarked(); break;
+ case KEYFUNC_UNDO: pMod->Undo(); break;
+ case KEYFUNC_REDO: pMod->Redo(); break;
+ case KEYFUNC_REPEAT: pMod->Repeat(*this); break;
+ default: {
+ switch (rKEvt.GetKeyCode().GetFullCode()) {
+ case KEY_ESCAPE: {
+ if (IsTextEdit()) EndTextEdit();
+ if (IsAction()) BrkAction();
+ if (pWin!=NULL) pWin->ReleaseMouse();
+ } break;
+ case KEY_DELETE: DeleteMarked(); break;
+ case KEY_CUT: case KEY_DELETE+KEY_SHIFT: Cut(); break;
+ case KEY_COPY: case KEY_INSERT+KEY_MOD1: Yank(); break;
+ case KEY_PASTE: case KEY_INSERT+KEY_SHIFT: Paste(pWin); break;
+ case KEY_UNDO: case KEY_BACKSPACE+KEY_MOD2: pMod->Undo(); break;
+ case KEY_BACKSPACE+KEY_MOD2+KEY_SHIFT: pMod->Redo(); break;
+ case KEY_REPEAT: case KEY_BACKSPACE+KEY_MOD2+KEY_MOD1: pMod->Repeat(*this); break;
+ case KEY_MOD1+KEY_A: MarkAll(); break;
+ default: bRet=FALSE;
+ } // switch
+ }
+ } // switch
+ if (bRet && pWin!=NULL) {
+ pWin->SetPointer(GetPreferedPointer(
+ pWin->PixelToLogic(pWin->ScreenToOutputPixel( pWin->GetPointerPosPixel() ) ),
+ pWin,
+ rKEvt.GetKeyCode().GetModifier()));
+ }
+ }
+ return bRet;
+}
+
+BOOL SdrView::MouseButtonDown(const MouseEvent& rMEvt, Window* pWin)
+{
+ SetActualWin(pWin);
+ if (rMEvt.IsLeft()) aDragStat.SetMouseDown(TRUE);
+ BOOL bRet=SdrCreateView::MouseButtonDown(rMEvt,pWin);
+ if (!bRet && !IsExtendedMouseEventDispatcherEnabled()) {
+ SdrViewEvent aVEvt;
+ PickAnything(rMEvt,SDRMOUSEBUTTONDOWN,aVEvt);
+ bRet=DoMouseEvent(aVEvt);
+ }
+ return bRet;
+}
+
+BOOL SdrView::MouseButtonUp(const MouseEvent& rMEvt, Window* pWin)
+{
+ SetActualWin(pWin);
+ if (rMEvt.IsLeft()) aDragStat.SetMouseDown(FALSE);
+ BOOL bAction=IsAction();
+ BOOL bRet=!bAction && SdrCreateView::MouseButtonUp(rMEvt,pWin);
+ if (!bRet && !IsExtendedMouseEventDispatcherEnabled()) {
+ SdrViewEvent aVEvt;
+ PickAnything(rMEvt,SDRMOUSEBUTTONUP,aVEvt);
+ bRet=DoMouseEvent(aVEvt);
+ }
+ return bRet;
+}
+
+BOOL SdrView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
+{
+ SetActualWin(pWin);
+ aDragStat.SetMouseDown(rMEvt.IsLeft());
+ BOOL bRet=SdrCreateView::MouseMove(rMEvt,pWin);
+ if (!IsExtendedMouseEventDispatcherEnabled() && !IsTextEditInSelectionMode()) {
+ SdrViewEvent aVEvt;
+ PickAnything(rMEvt,SDRMOUSEMOVE,aVEvt);
+ if (DoMouseEvent(aVEvt)) bRet=TRUE;
+ }
+ if (pActualOutDev!=NULL && pActualOutDev->GetOutDevType()==OUTDEV_WINDOW &&
+ IsSnapEnabled() && IsOPntSnap() && HasMarkablePoints() && !IsAction()) {
+ // 8.3.1997: Mauszeiger im Punktemodus Fangen
+ // waere eigentlich besser in der SnapView aufgehoben.
+ // Geht aber gerade nicht, weil inkompatibel.
+ Window* pWin=(Window*)pActualOutDev;
+ Point aLogPos(pWin->PixelToLogic(rMEvt.GetPosPixel()));
+ BOOL bHlplSnapMerk=bHlplSnap; bHlplSnap=FALSE;
+ BOOL bBordSnapMerk=bBordSnap; bBordSnap=FALSE;
+ BOOL bOFrmSnapMerk=bOFrmSnap; bOFrmSnap=FALSE;
+ BOOL bGridSnapMerk=bGridSnap; bGridSnap=FALSE;
+ Size aMagnSizMerk(aMagnSiz);
+ USHORT nHdlPixSiz=aHdl.GetHdlSize();
+ Size aHdlSiz(pWin->PixelToLogic(Size(nHdlPixSiz,nHdlPixSiz)));
+ aMagnSiz.Width() +=aHdlSiz.Width() ;
+ aMagnSiz.Height()+=aHdlSiz.Height();
+ Point aNewPos(aLogPos);
+ USHORT nIsSnap=SnapPos(aNewPos,NULL);
+ bHlplSnap=bHlplSnapMerk;
+ bBordSnap=bBordSnapMerk;
+ bOFrmSnap=bOFrmSnapMerk;
+ bGridSnap=bGridSnapMerk;
+ aMagnSiz=aMagnSizMerk;
+ if (nIsSnap!=SDRSNAP_NOTSNAPPED) {
+ long dx=aLogPos.X()-aNewPos.X(); dx=Abs(dx);
+ long dy=aLogPos.Y()-aNewPos.Y(); dy=Abs(dy);
+ if (dx>aHdlSiz.Width()/2 || dy>aHdlSiz.Height()/2) {
+ Point aPixPos(pWin->LogicToPixel(aNewPos));
+#ifdef VCL
+ // #45175#: Pointer::SetPosPixel() ist unter VCL fehlerhaft
+ // bzw. faellt auch bald weg
+ if (pWin!=NULL) pWin->SetPointerPosPixel(aPixPos);
+#else
+ aPixPos=pWin->OutputToScreenPixel(aPixPos);
+ Pointer::SetPosPixel(aPixPos);
+#endif
+ }
+ }
+ }
+ return bRet;
+}
+
+BOOL SdrView::Command(const CommandEvent& rCEvt, Window* pWin)
+{
+ SetActualWin(pWin);
+ BOOL bRet=SdrCreateView::Command(rCEvt,pWin);
+ if (!bRet && !IsExtendedCommandEventDispatcherEnabled()) {
+ if (pWin!=NULL && rCEvt.GetCommand()==COMMAND_STARTDRAG && HasMarkedObj() &&
+ (eDragMode==SDRDRAG_MOVE || bMarkedHitMovesAlways))
+ {
+ SdrViewEvent aVEvt;
+ SdrHitKind eHit=PickAnything(pWin->PixelToLogic(rCEvt.GetMousePosPixel()),aVEvt);
+ if (eHit==SDRHIT_MARKEDOBJECT) {
+ pWin->ReleaseMouse();
+ DragDropMarked(*pWin);
+ bRet=TRUE;
+ }
+ }
+ }
+ return bRet;
+}
+
+BOOL SdrView::QueryDrop(DropEvent& rDEvt, Window* pWin, ULONG nFormat, USHORT nItemNum)
+{
+ SetActualWin(pWin);
+ return SdrCreateView::QueryDrop(rDEvt,pWin,nFormat,nItemNum);
+}
+
+BOOL SdrView::Drop(const DropEvent& rDEvt, Window* pWin, ULONG nFormat, USHORT nItemNum)
+{
+ SetActualWin(pWin);
+ BOOL bRet=SdrCreateView::Drop(rDEvt,pWin,nFormat,nItemNum);
+ if (bRet && pWin!=NULL) {
+ pWin->SetPointer(GetPreferedPointer(pWin->PixelToLogic(
+ pWin->ScreenToOutputPixel(pWin->GetPointerPosPixel())),pWin));
+ }
+ return bRet;
+}
+
+/* new interface src537 */
+BOOL SdrView::GetAttributes(SfxItemSet& rTargetSet, BOOL bOnlyHardAttr) const
+{
+ return SdrCreateView::GetAttributes(rTargetSet, bOnlyHardAttr);
+}
+
+SfxStyleSheet* SdrView::GetStyleSheet() const
+{
+ BOOL bOk=FALSE;
+ return SdrCreateView::GetStyleSheet(bOk);
+}
+
+SdrHitKind SdrView::PickAnything(const MouseEvent& rMEvt, USHORT nEventKind, SdrViewEvent& rVEvt) const
+{
+ rVEvt.bMouseDown=nEventKind==SDRMOUSEBUTTONDOWN;
+ rVEvt.bMouseUp=nEventKind==SDRMOUSEBUTTONUP;
+ rVEvt.nMouseClicks=rMEvt.GetClicks();
+ rVEvt.nMouseMode=rMEvt.GetMode();
+ rVEvt.nMouseCode=rMEvt.GetButtons() | rMEvt.GetModifier();
+ const OutputDevice* pOut=pActualOutDev;
+ if (pOut==NULL) pOut=GetWin(0);
+ Point aPnt(rMEvt.GetPosPixel());
+ if (pOut!=NULL) aPnt=pOut->PixelToLogic(aPnt);
+ rVEvt.aLogicPos=aPnt;
+ return PickAnything(aPnt,rVEvt);
+}
+
+// Mit der Maus draggen (Move)
+// Beispiel beim erzeugen eines Rechtecks. MouseDown muss ohne
+// ModKey erfolgen, weil sonst i.d.R. Markieren forciert wird (s.u.)
+// Drueckt man dann beim MouseMove gleichzeitig Shift, Ctrl, und Alt,
+// so erzeugt man ein zentrisches Quadrat ohne Fang.
+// Die Doppelbelegung von Ortho und Shift stellt i.d.R. kein Problem dar,
+// da sich beides meisst gegenseitig ausschliesst. Einzig Shear (das beim
+// Verzerren, nicht dass beim Drehen) beruecksichtigt beides gleichzeitig.
+// Dass muss der Anwender erstmal noch umschiffen (z.B. mit einer Hilfslinie).
+#define MODKEY_NoSnap bCtrl /* Fang temporaer aus */
+#define MODKEY_Ortho bShift /* na eben ortho */
+#define MODKEY_Center bAlt /* Zentrisch erzeugen/resizen */
+//#define MODKEY_BigOrtho bAlt
+#define MODKEY_AngleSnap bShift
+#define MODKEY_CopyDrag bCtrl /* Draggen mit kopieren */
+
+// irgendwo hinklicken (MouseDown)
+#define MODKEY_PolyPoly bAlt /* Neues Poly bei InsPt und bei Create */
+#define MODKEY_MultiMark bShift /* MarkObj ohne vorher UnmarkAll */
+#define MODKEY_Unmark bAlt /* Unmark durch Rahmenaufziehen */
+#define MODKEY_ForceMark bCtrl /* Rahmenaufziehen erzwingen, auch wenn Obj an MausPos */
+#define MODKEY_DeepMark bAlt /* MarkNextObj */
+#define MODKEY_DeepBackw bShift /* MarkNextObj rueckwaerts */
+
+SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) const
+{
+ const OutputDevice* pOut=pActualOutDev;
+ if (pOut==NULL) pOut=GetWin(0);
+ Point aPnt(rLogicPos);
+ BOOL bEditMode=IsEditMode();
+ BOOL bPointMode=bEditMode && HasMarkablePoints();
+ BOOL bGluePointMode=IsGluePointEditMode();
+ BOOL bInsPolyPt=bPointMode && IsInsObjPointMode() && IsInsObjPointPossible();
+ BOOL bInsGluePt=bGluePointMode && IsInsGluePointMode() && IsInsGluePointPossible();
+ BOOL bIsTextEdit=IsTextEdit();
+ BOOL bTextEditHit=IsTextEditHit(aPnt,0/*nHitTolLog*/);
+ BOOL bTextEditSel=IsTextEditInSelectionMode();
+ BOOL bShift=(rVEvt.nMouseCode & KEY_SHIFT) !=0;
+ BOOL bCtrl=(rVEvt.nMouseCode & KEY_MOD1) !=0;
+ BOOL bAlt=(rVEvt.nMouseCode & KEY_MOD2) !=0;
+ SdrHitKind eHit=SDRHIT_NONE;
+ SdrHdl* pHdl=pOut!=NULL && !bTextEditSel ? HitHandle(aPnt,*pActualOutDev) : NULL;
+ SdrPageView* pPV=NULL;
+ SdrObject* pObj=NULL;
+ SdrObject* pHitObj=NULL;
+ USHORT nHitPassNum=0;
+ USHORT nHlplIdx=0;
+ USHORT nGlueId=0;
+ BOOL bUnmarkedObjHit=FALSE;
+ if (bTextEditHit || bTextEditSel) {
+ eHit=SDRHIT_TEXTEDIT;
+ bTextEditHit=TRUE;
+ } else if (pHdl!=NULL) {
+ eHit=SDRHIT_HANDLE; // Handle getroffen hat hoechste Prioritaet
+ } else if (bEditMode && IsHlplVisible() && IsHlplFront() && pOut!=NULL && PickHelpLine(aPnt,nHitTolLog,*pOut,nHlplIdx,pPV)) {
+ eHit=SDRHIT_HELPLINE; // Hilfslinie im Vordergrund getroffen zum verschieben
+ } else if (bGluePointMode && PickGluePoint(aPnt,pObj,nGlueId,pPV)) {
+ eHit=SDRHIT_GLUEPOINT; // nichtmarkierter Klebepunkt getroffen
+ } else if (PickObj(aPnt,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_MARKED,&pObj,NULL,&nHitPassNum)) {
+ eHit=SDRHIT_MARKEDOBJECT;
+ } else if (PickObj(aPnt,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|/*SDRSEARCH_TESTMARKABLE|*/SDRSEARCH_ALSOONMASTER|SDRSEARCH_WHOLEPAGE,&pObj,NULL,&nHitPassNum)) {
+ // MasterPages und WholePage fuer Macro und URL
+ eHit=SDRHIT_UNMARKEDOBJECT;
+ bUnmarkedObjHit=TRUE;
+ } else if (bEditMode && IsHlplVisible() && !IsHlplFront() && pOut!=NULL && PickHelpLine(aPnt,nHitTolLog,*pOut,nHlplIdx,pPV)) {
+ eHit=SDRHIT_HELPLINE; // Hilfslinie im Vordergrund getroffen zum verschieben
+ }
+ if (IsMacroMode() && eHit==SDRHIT_UNMARKEDOBJECT) {
+ BOOL bRoot=pObj->HasMacro();
+ BOOL bDeep=pObj!=pHitObj && pHitObj->HasMacro();
+ BOOL bMid=FALSE; // Gruppierte Gruppe mit Macro getroffen?
+ SdrObject* pMidObj=NULL;
+ if (pObj!=pHitObj) {
+ SdrObject* pObjTmp=NULL;
+ pObjTmp=pHitObj->GetUpGroup();
+ if (pObjTmp==pObj) pObjTmp=NULL;
+ while (pObjTmp!=NULL) {
+ if (pObjTmp->HasMacro()) {
+ bMid=TRUE;
+ pMidObj=pObjTmp;
+ }
+ pObjTmp=pObjTmp->GetUpGroup();
+ if (pObjTmp==pObj) pObjTmp=NULL;
+ }
+ }
+
+ if (bDeep || bMid || bRoot) {
+ Point aP(aPnt);
+ aP-=pPV->GetOffset();
+ SdrObjMacroHitRec aHitRec;
+ aHitRec.aPos=aP;
+ aHitRec.aDownPos=aP;
+ aHitRec.nTol=nHitTolLog;
+ aHitRec.pVisiLayer=&pPV->GetVisibleLayers();
+ aHitRec.pPageView=pPV;
+ if (bDeep) bDeep=pHitObj->IsMacroHit(aHitRec);
+ if (bMid ) bMid =pMidObj->IsMacroHit(aHitRec);
+ if (bRoot) bRoot=pObj->IsMacroHit(aHitRec);
+ if (bRoot || bMid || bDeep) {
+ // Prio: 1.Root, 2.Mid, 3.Deep
+ rVEvt.pRootObj=pObj;
+ if (!bRoot) pObj=pMidObj;
+ if (!bRoot && !bMid) pObj=pHitObj;
+ eHit=SDRHIT_MACRO;
+ }
+ }
+ }
+ // auf URL-Field checken
+ if (IsMacroMode() && eHit==SDRHIT_UNMARKEDOBJECT) {
+ SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pHitObj);
+ if (pTextObj!=NULL && pTextObj->HasText()) {
+ Point aP(aPnt);
+ aP-=pPV->GetOffset();
+ BOOL bTEHit=pTextObj->IsTextEditHit(aP,0/*nHitTolLog*/,&pPV->GetVisibleLayers());
+ if (bTEHit) {
+ Rectangle aTextRect;
+ Rectangle aAnchor;
+ SdrOutliner* pOutliner = &pTextObj->ImpGetDrawOutliner();
+ if( pTextObj->GetModel() )
+ pOutliner = &pTextObj->GetModel()->GetHitTestOutliner();
+
+ pTextObj->TakeTextRect( *pOutliner, aTextRect, FALSE, &aAnchor, FALSE );
+ aP-=aTextRect.TopLeft();
+ // FitToSize berueksichtigen
+ SdrFitToSizeType eFit=pTextObj->GetFitToSize();
+ BOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
+ if (bFitToSize) {
+ Fraction aX(aTextRect.GetWidth()-1,aAnchor.GetWidth()-1);
+ Fraction aY(aTextRect.GetHeight()-1,aAnchor.GetHeight()-1);
+ ResizePoint(aP,Point(),aX,aY);
+ }
+ // Drehung berueksichtigen
+ const GeoStat& rGeo=pTextObj->GetGeoStat();
+ if (rGeo.nDrehWink!=0) RotatePoint(aP,Point(),-rGeo.nSin,rGeo.nCos); // -sin fuer Unrotate
+ // Laufschrift berueksichtigen fehlt noch ...
+ if(pActualOutDev && pActualOutDev->GetOutDevType() == OUTDEV_WINDOW)
+ {
+ OutlinerView aOLV(pOutliner, (Window*)pActualOutDev);
+ const EditView& aEV=aOLV.GetEditView();
+ const SvxFieldItem* pItem=aEV.GetField(aP);
+ if (pItem!=NULL) {
+ const SvxFieldData* pFld=pItem->GetField();
+ const SvxURLField* pURL=PTR_CAST(SvxURLField,pFld);
+ if (pURL!=NULL) {
+ eHit=SDRHIT_URLFIELD;
+ rVEvt.pURLField=pURL;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (nHitPassNum==SDRSEARCHPASS_DIRECT &&
+ (eHit==SDRHIT_MARKEDOBJECT || eHit==SDRHIT_UNMARKEDOBJECT) &&
+ (IsTextTool() || (IsEditMode() && IsQuickTextEditMode())) && pHitObj->HasTextEdit())
+ {
+ Point aP(aPnt);
+ aP-=pPV->GetOffset();
+ // Ringsum die TextEditArea ein Rand zum Selektieren ohne Textedit
+ Rectangle aBoundRect(pHitObj->GetBoundRect());
+ long nSchlauchTol=nHitTolLog;
+ if (pOut!=NULL) nSchlauchTol=pOut->PixelToLogic(Size(2,0)).Width();
+ aBoundRect.Left()+=nSchlauchTol;
+ aBoundRect.Top()+=nSchlauchTol;
+ aBoundRect.Right()+=nSchlauchTol;
+ aBoundRect.Bottom()+=nSchlauchTol;
+ BOOL bSchlauchHit=(aBoundRect.GetWidth()-1<=nSchlauchTol || aBoundRect.GetWidth()-1<=nSchlauchTol) && !aBoundRect.IsInside(aP);
+ if (!bSchlauchHit) {
+ BOOL bTEHit=pHitObj->IsTextEditHit(aP,0,&pPV->GetVisibleLayers());
+
+ // TextEdit an Objekten im gesperrten Layer
+ if (pPV->GetLockedLayers().IsSet(pHitObj->GetLayer())) bTEHit=FALSE;
+ if (bTEHit) {
+ rVEvt.pRootObj=pObj;
+ pObj=pHitObj;
+ eHit=SDRHIT_TEXTEDITOBJ;
+ }
+ }
+ }
+ if (nHitPassNum!=SDRSEARCHPASS_DIRECT && eHit==SDRHIT_UNMARKEDOBJECT) {
+ eHit=SDRHIT_NONE;
+ pObj=NULL;
+ pPV=NULL;
+ }
+ BOOL bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0;
+ BOOL bMouseRight=(rVEvt.nMouseCode&MOUSE_RIGHT)!=0;
+ BOOL bMouseDown=rVEvt.bMouseDown;
+ BOOL bMouseUp=rVEvt.bMouseUp;
+ SdrEventKind eEvent=SDREVENT_NONE;
+ BOOL bIsAction=IsAction();
+
+ if (bIsAction) {
+ if (bMouseDown) {
+ if (bMouseRight) eEvent=SDREVENT_BCKACTION;
+ } else if (bMouseUp) {
+ if (bMouseLeft) {
+ eEvent=SDREVENT_ENDACTION;
+ if (IsDragObj()) {
+ eEvent=SDREVENT_ENDDRAG;
+ rVEvt.bDragWithCopy=MODKEY_CopyDrag;
+ } else if (IsCreateObj() || IsInsObjPoint()) {
+ eEvent=IsCreateObj() ? SDREVENT_ENDCREATE : SDREVENT_ENDINSOBJPOINT;
+ rVEvt.eEndCreateCmd=SDRCREATE_NEXTPOINT;
+ if (MODKEY_PolyPoly) rVEvt.eEndCreateCmd=SDRCREATE_NEXTOBJECT;
+ if (rVEvt.nMouseClicks>1) rVEvt.eEndCreateCmd=SDRCREATE_FORCEEND;
+ } else if (IsMarking()) {
+ eEvent=SDREVENT_ENDMARK;
+ if (!aDragStat.IsMinMoved()) {
+ eEvent=SDREVENT_BRKMARK;
+ rVEvt.bAddMark=MODKEY_MultiMark;
+ }
+ }
+ }
+ } else eEvent=SDREVENT_MOVACTION;
+ } else if (eHit==SDRHIT_TEXTEDIT) {
+ eEvent=SDREVENT_TEXTEDIT;
+ } else if (bMouseDown && bMouseLeft) {
+ if (rVEvt.nMouseClicks==2 && rVEvt.nMouseCode==MOUSE_LEFT && pObj!=NULL && pHitObj!=NULL && pHitObj->HasTextEdit() && eHit==SDRHIT_MARKEDOBJECT)
+ {
+ rVEvt.pRootObj=pObj;
+ pObj=pHitObj;
+ eEvent=SDREVENT_BEGTEXTEDIT;
+ }
+ else if (MODKEY_ForceMark && eHit!=SDRHIT_URLFIELD)
+ {
+ eEvent=SDREVENT_BEGMARK; // AddMark,Unmark */
+ }
+ else if (eHit==SDRHIT_HELPLINE) {
+ eEvent=SDREVENT_BEGDRAGHELPLINE; // nix weiter
+ } else if (eHit==SDRHIT_GLUEPOINT) {
+ eEvent=SDREVENT_MARKGLUEPOINT; // AddMark+Drag
+ rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // falls bei Deep nicht getroffen
+ } else if (eHit==SDRHIT_HANDLE) {
+ eEvent=SDREVENT_BEGDRAGOBJ; // Mark+Drag,AddMark+Drag,DeepMark+Drag,Unmark
+ BOOL bGlue=pHdl->GetKind()==HDL_GLUE;
+ BOOL bPoly=!bGlue && IsPointMarkable(*pHdl);
+ BOOL bMarked=bGlue || bPoly && pHdl->IsSelected();
+ if (bGlue || bPoly) {
+ eEvent=bGlue ? SDREVENT_MARKGLUEPOINT : SDREVENT_MARKPOINT;
+ if (MODKEY_DeepMark) {
+ rVEvt.bAddMark=TRUE;
+ rVEvt.bPrevNextMark=TRUE;
+ rVEvt.bMarkPrev=MODKEY_DeepBackw;
+ } else if (MODKEY_MultiMark) {
+ rVEvt.bAddMark=TRUE;
+ rVEvt.bUnmark=bMarked; // Toggle
+ if (bGlue) {
+ pObj=pHdl->GetObj();
+ nGlueId=pHdl->GetObjHdlNum();
+ }
+ } else if (bMarked) eEvent=SDREVENT_BEGDRAGOBJ; // MarkState nicht aendern, nur Drag
+ }
+ } else if (bInsPolyPt && (MODKEY_PolyPoly || (!MODKEY_MultiMark && !MODKEY_DeepMark))) {
+ eEvent=SDREVENT_BEGINSOBJPOINT;
+ rVEvt.bInsPointNewObj=MODKEY_PolyPoly;
+ } else if (bInsGluePt && !MODKEY_MultiMark && !MODKEY_DeepMark) {
+ eEvent=SDREVENT_BEGINSGLUEPOINT;
+ } else if (eHit==SDRHIT_TEXTEDITOBJ) {
+ eEvent=SDREVENT_BEGTEXTEDIT; // AddMark+Drag,DeepMark+Drag,Unmark
+ if (MODKEY_MultiMark || MODKEY_DeepMark) { // falls bei Deep nicht getroffen
+ eEvent=SDREVENT_MARKOBJ;
+ }
+ } else if (eHit==SDRHIT_MACRO) {
+ eEvent=SDREVENT_BEGMACROOBJ; // AddMark+Drag
+ if (MODKEY_MultiMark || MODKEY_DeepMark) { // falls bei Deep nicht getroffen
+ eEvent=SDREVENT_MARKOBJ;
+ }
+ } else if (eHit==SDRHIT_URLFIELD) {
+ eEvent=SDREVENT_EXECUTEURL; // AddMark+Drag
+ if (MODKEY_MultiMark || MODKEY_DeepMark) { // falls bei Deep nicht getroffen
+ eEvent=SDREVENT_MARKOBJ;
+ }
+ } else if (eHit==SDRHIT_MARKEDOBJECT) {
+ eEvent=SDREVENT_BEGDRAGOBJ; // DeepMark+Drag,Unmark
+ if (MODKEY_MultiMark || MODKEY_DeepMark) { // falls bei Deep nicht getroffen
+ eEvent=SDREVENT_MARKOBJ;
+ }
+ } else if (IsCreateMode()) {
+ eEvent=SDREVENT_BEGCREATEOBJ; // Nix weiter
+ } else if (eHit==SDRHIT_UNMARKEDOBJECT) {
+ eEvent=SDREVENT_MARKOBJ; // AddMark+Drag
+ } else eEvent=SDREVENT_BEGMARK;
+
+ if (eEvent==SDREVENT_MARKOBJ) {
+ rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // falls bei Deep nicht getroffen
+ rVEvt.bPrevNextMark=MODKEY_DeepMark;
+ rVEvt.bMarkPrev=MODKEY_DeepMark && MODKEY_DeepBackw;
+ }
+ if (eEvent==SDREVENT_BEGMARK) {
+ rVEvt.bAddMark=MODKEY_MultiMark;
+ rVEvt.bUnmark=MODKEY_Unmark;
+ }
+ }
+ rVEvt.bIsAction=bIsAction;
+ rVEvt.bIsTextEdit=bIsTextEdit;
+ rVEvt.bTextEditHit=bTextEditHit;
+ rVEvt.aLogicPos=aPnt;
+ rVEvt.pHdl=pHdl;
+ rVEvt.pObj=pObj;
+ if (rVEvt.pRootObj==NULL) rVEvt.pRootObj=pObj;
+ rVEvt.pPV=pPV;
+ rVEvt.nHlplIdx=nHlplIdx;
+ rVEvt.nGlueId=nGlueId;
+ rVEvt.eHit=eHit;
+ rVEvt.eEvent=eEvent;
+ rVEvt.bCaptureMouse=bMouseLeft && bMouseDown && eEvent!=SDREVENT_NONE;
+ rVEvt.bReleaseMouse=bMouseLeft && bMouseUp;
+#if DGB_UTIL
+ if (rVEvt.pRootObj!=NULL) {
+ if (rVEvt.pRootObj->GetObjList()!=rVEvt.pPV->GetObjList()) {
+ DBG_ERROR("SdrView::PickAnything(): pRootObj->GetObjList()!=pPV->GetObjList() !");
+ }
+ }
+#endif
+ return eHit;
+}
+
+BOOL SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
+{
+ BOOL bRet=FALSE;
+ SdrHitKind eHit=rVEvt.eHit;
+ Point aLogicPos(rVEvt.aLogicPos);
+
+ BOOL bShift=(rVEvt.nMouseCode & KEY_SHIFT) !=0;
+ BOOL bCtrl=(rVEvt.nMouseCode & KEY_MOD1) !=0;
+ BOOL bAlt=(rVEvt.nMouseCode & KEY_MOD2) !=0;
+ BOOL bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0;
+ BOOL bMouseRight=(rVEvt.nMouseCode&MOUSE_RIGHT)!=0;
+ BOOL bMouseDown=rVEvt.bMouseDown;
+ BOOL bMouseUp=rVEvt.bMouseUp;
+ if (bMouseDown) {
+ if (bMouseLeft) aDragStat.SetMouseDown(TRUE);
+ } else if (bMouseUp) {
+ if (bMouseLeft) aDragStat.SetMouseDown(FALSE);
+ } else { // ansonsten MoueMove
+ aDragStat.SetMouseDown(bMouseLeft);
+ }
+
+#ifdef MODKEY_NoSnap
+ SetSnapEnabled(!MODKEY_NoSnap);
+#endif
+#ifdef MODKEY_Ortho
+ SetOrtho(MODKEY_Ortho!=IsOrthoDesired());
+#endif
+#ifdef MODKEY_BigOrtho
+ SetBigOrtho(MODKEY_BigOrtho);
+#endif
+#ifdef MODKEY_AngleSnap
+ SetAngleSnapEnabled(MODKEY_AngleSnap);
+#endif
+#ifdef MODKEY_CopyDrag
+ SetDragWithCopy(MODKEY_CopyDrag);
+#endif
+#ifdef MODKEY_Center
+ SetCreate1stPointAsCenter(MODKEY_Center);
+ SetResizeAtCenter(MODKEY_Center);
+ SetCrookAtCenter(MODKEY_Center);
+#endif
+ if (bMouseLeft && bMouseDown && rVEvt.bIsTextEdit && (eHit==SDRHIT_UNMARKEDOBJECT || eHit==SDRHIT_NONE)) {
+ EndTextEdit(); // Danebengeklickt, Ende mit Edit
+ // pHdl ist dann ungueltig. Sollte aber egal sein, wein pHdl==NULL
+ // sein muesste (wg. eHit).
+ }
+ switch (rVEvt.eEvent) {
+ case SDREVENT_NONE: bRet=FALSE; break;
+ case SDREVENT_TEXTEDIT: bRet=FALSE; break; // Events an die OutlinerView werden hier nicht beruecksichtigt
+ case SDREVENT_MOVACTION: MovAction(aLogicPos); bRet=TRUE; break;
+ case SDREVENT_ENDACTION: EndAction(); bRet=TRUE; break;
+ case SDREVENT_BCKACTION: BckAction(); bRet=TRUE; break;
+ case SDREVENT_BRKACTION: BrkAction(); bRet=TRUE; break;
+ case SDREVENT_ENDMARK : EndAction(); bRet=TRUE; break;
+ case SDREVENT_BRKMARK : {
+ BrkAction();
+ if (!MarkObj(aLogicPos,nHitTolLog,rVEvt.bAddMark)) {
+ // Kein Obj getroffen. Dann werden zuerst
+ // - Markierte Klebepunkte deselektiert
+ // - dann ggf. selektierte Polygonpunkte
+ // - und ansonsten Objekte
+ if (!rVEvt.bAddMark) UnmarkAll();
+ }
+ bRet=TRUE;
+ } break;
+ case SDREVENT_ENDCREATE: { // ggf. MarkObj
+ SdrCreateCmd eCmd=SDRCREATE_NEXTPOINT;
+ if (MODKEY_PolyPoly) eCmd=SDRCREATE_NEXTOBJECT;
+ if (rVEvt.nMouseClicks>1) eCmd=SDRCREATE_FORCEEND;
+ if (!EndCreateObj(eCmd)) { // Event fuer Create nicht ausgewerten? -> Markieren
+ if (eHit==SDRHIT_UNMARKEDOBJECT || eHit==SDRHIT_TEXTEDIT) {
+ MarkObj(rVEvt.pRootObj,rVEvt.pPV);
+ if (eHit==SDRHIT_TEXTEDIT) {
+ BOOL bRet=pActualOutDev!=NULL && pActualOutDev->GetOutDevType()==OUTDEV_WINDOW &&
+ BegTextEdit(rVEvt.pObj,rVEvt.pPV,(Window*)pActualOutDev,(SdrOutliner*)NULL);
+ if (bRet) {
+ MouseEvent aMEvt(pActualOutDev->LogicToPixel(aLogicPos),
+ 1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
+ OutlinerView* pOLV=GetTextEditOutlinerView();
+ if (pOLV!=NULL) {
+ pOLV->MouseButtonDown(aMEvt); // Event an den Outliner, aber ohne Doppelklick
+ pOLV->MouseButtonUp(aMEvt); // Event an den Outliner, aber ohne Doppelklick
+ }
+ }
+ }
+ bRet=TRUE; // Obj markiert und ggf. TextEdit gestartet
+ } else bRet=FALSE; // Create abgebrochen, sonst nix weiter.
+ } else bRet=TRUE; // EndCreate mit TRUE returniert
+ } break;
+ case SDREVENT_ENDDRAG: {
+ bRet=EndDragObj(IsDragWithCopy());
+ ForceMarkedObjToAnotherPage(); // Undo+Klammerung fehlt noch !!!
+ } break;
+ case SDREVENT_MARKOBJ: { // + ggf. BegDrag
+ if (!rVEvt.bAddMark) UnmarkAllObj();
+ BOOL bUnmark=rVEvt.bUnmark;
+ if (rVEvt.bPrevNextMark) {
+ bRet=MarkNextObj(aLogicPos,nHitTolLog,rVEvt.bMarkPrev);
+ } else {
+ aMark.ForceSort();
+ ULONG nAnz0=aMark.GetMarkCount();
+ bRet=MarkObj(aLogicPos,nHitTolLog,rVEvt.bAddMark);
+ aMark.ForceSort();
+ ULONG nAnz1=aMark.GetMarkCount();
+ bUnmark=nAnz1<nAnz0;
+ }
+ if (!bUnmark) {
+ BegDragObj(aLogicPos,NULL,(SdrHdl*)NULL,nMinMovLog);
+ bRet=TRUE;
+ }
+ } break;
+ case SDREVENT_MARKPOINT: { // + ggf. BegDrag
+ if (!rVEvt.bAddMark) UnmarkAllPoints();
+ if (rVEvt.bPrevNextMark) {
+ bRet=MarkNextPoint(aLogicPos,rVEvt.bMarkPrev);
+ } else {
+ bRet=MarkPoint(*rVEvt.pHdl,rVEvt.bUnmark);
+ }
+ if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) {
+ BegDragObj(aLogicPos,NULL,rVEvt.pHdl,nMinMovLog);
+ bRet=TRUE;
+ }
+ } break;
+ case SDREVENT_MARKGLUEPOINT: { // + ggf. BegDrag
+ if (!rVEvt.bAddMark) UnmarkAllGluePoints();
+ if (rVEvt.bPrevNextMark) {
+ bRet=MarkNextGluePoint(aLogicPos,rVEvt.bMarkPrev);
+ } else {
+ bRet=MarkGluePoint(rVEvt.pObj,rVEvt.nGlueId,rVEvt.pPV,rVEvt.bUnmark);
+ }
+ if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) {
+ SdrHdl* pHdl=GetGluePointHdl(rVEvt.pObj,rVEvt.nGlueId);
+ BegDragObj(aLogicPos,NULL,pHdl,nMinMovLog);
+ bRet=TRUE;
+ }
+ } break;
+ case SDREVENT_BEGMARK: bRet=BegMark(aLogicPos,rVEvt.bAddMark,rVEvt.bUnmark); break;
+ case SDREVENT_BEGINSOBJPOINT: bRet=BegInsObjPoint(aLogicPos,MODKEY_PolyPoly); break;
+ case SDREVENT_ENDINSOBJPOINT: {
+ SdrCreateCmd eCmd=SDRCREATE_NEXTPOINT;
+ if (MODKEY_PolyPoly) eCmd=SDRCREATE_NEXTOBJECT;
+ if (rVEvt.nMouseClicks>1) eCmd=SDRCREATE_FORCEEND;
+ EndInsObjPoint(eCmd);
+ bRet=TRUE;
+ } break;
+ case SDREVENT_BEGINSGLUEPOINT: bRet=BegInsGluePoint(aLogicPos); break;
+ case SDREVENT_BEGDRAGHELPLINE: bRet=BegDragHelpLine(rVEvt.nHlplIdx,rVEvt.pPV); break;
+ case SDREVENT_BEGDRAGOBJ: bRet=BegDragObj(aLogicPos,NULL,rVEvt.pHdl,nMinMovLog); break;
+ case SDREVENT_BEGCREATEOBJ: {
+ if (nAktInvent==SdrInventor && nAktIdent==OBJ_CAPTION) {
+ long nHgt=SdrEngineDefaults::GetFontHeight();
+ bRet=BegCreateCaptionObj(aLogicPos,Size(5*nHgt,2*nHgt));
+ } else bRet=BegCreateObj(aLogicPos);
+ } break;
+ case SDREVENT_BEGMACROOBJ: bRet=BegMacroObj(aLogicPos,nHitTolLog,rVEvt.pObj,rVEvt.pPV,(Window*)pActualOutDev); break;
+ case SDREVENT_BEGTEXTEDIT: {
+ if (!IsObjMarked(rVEvt.pObj)) {
+ UnmarkAllObj();
+ MarkObj(rVEvt.pRootObj,rVEvt.pPV);
+ }
+ bRet=pActualOutDev!=NULL && pActualOutDev->GetOutDevType()==OUTDEV_WINDOW &&
+ BegTextEdit(rVEvt.pObj,rVEvt.pPV,(Window*)pActualOutDev,(SdrOutliner*)NULL);
+ if (bRet) {
+ MouseEvent aMEvt(pActualOutDev->LogicToPixel(aLogicPos),
+ 1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
+ OutlinerView* pOLV=GetTextEditOutlinerView();
+ if (pOLV!=NULL) pOLV->MouseButtonDown(aMEvt); // Event an den Outliner, aber ohne Doppelklick
+ }
+ } break;
+ } // switch
+ if (bRet && pActualOutDev!=NULL && pActualOutDev->GetOutDevType()==OUTDEV_WINDOW) {
+ Window* pWin=(Window*)pActualOutDev;
+ // Maus links gedrueckt?
+ BOOL bLeftDown=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseDown;
+ // Maus links losgelassen?
+ BOOL bLeftUp=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseUp;
+ // Maus links gedrueckt oder gehalten?
+ BOOL bLeftDown1=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && !rVEvt.bMouseUp;
+ pWin->SetPointer(GetPreferedPointer(rVEvt.aLogicPos,pWin,
+ rVEvt.nMouseCode & (KEY_SHIFT|KEY_MOD1|KEY_MOD2),bLeftDown1));
+ BOOL bAction=IsAction();
+ if (bLeftDown && bAction) pWin->CaptureMouse();
+ else if (bLeftUp || (rVEvt.bIsAction && !bAction)) pWin->ReleaseMouse();
+ }
+ return bRet;
+}
+
+Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice* pOut, USHORT nModifier, BOOL bLeftDown) const
+{
+ // Actions
+ if (IsCreateObj()) {
+ if (pLibObjDragMeth!=NULL) {
+ return Pointer(POINTER_CROSS);
+ } else {
+ return pAktCreate->GetCreatePointer();
+ }
+ }
+ if (pDragBla!=NULL) {
+ if ((IsDraggingPoints() || IsDraggingGluePoints()) && IsMouseHideWhileDraggingPoints()) return Pointer(POINTER_NULL);
+ return pDragBla->GetPointer();
+ }
+ if (IsMarkObj() || IsMarkPoints() || IsMarkGluePoints() || IsEncirclement() || IsSetPageOrg()) return Pointer(POINTER_ARROW);
+ if (IsDragHelpLine()) return GetDraggedHelpLine().GetPointer();
+ if (IsMacroObj()) {
+ SdrObjMacroHitRec aHitRec;
+ aHitRec.aPos=pOut->LogicToPixel(rMousePos);
+ aHitRec.aDownPos=aMacroDownPos;
+ aHitRec.nTol=nMacroTol;
+ aHitRec.pVisiLayer=&pMacroPV->GetVisibleLayers();
+ aHitRec.pPageView=pMacroPV;
+ aHitRec.pOut=pMacroWin;
+ aHitRec.bDown=bMacroDown;
+ return pMacroObj->GetMacroPointer(aHitRec);
+ }
+ USHORT nTol=nHitTolLog;
+ // TextEdit, ObjEdit, Macro
+ if (IsTextEdit() && (IsTextEditInSelectionMode() || IsTextEditHit(rMousePos,0/*nTol*/))) {
+ if (pOut==NULL || IsTextEditInSelectionMode()) return Pointer(POINTER_TEXT);
+ // hier muss besser der Outliner was liefern:
+ Point aPos(pOut->LogicToPixel(rMousePos));
+ Pointer aPointer(pTextEditOutlinerView->GetPointer(aPos));
+ if (aPointer==POINTER_ARROW) aPointer=POINTER_TEXT;
+ return aPointer;
+ }
+
+ SdrViewEvent aVEvt;
+ aVEvt.nMouseCode=(nModifier&(KEY_SHIFT|KEY_MOD1|KEY_MOD2))|MOUSE_LEFT; // um zu sehen, was bei MouseLeftDown passieren wuerde
+ aVEvt.bMouseDown=!bLeftDown; // Was waere wenn ...
+ aVEvt.bMouseUp=bLeftDown; // Was waere wenn ...
+ if (pOut!=NULL) ((SdrView*)this)->SetActualWin(pOut);
+ SdrHitKind eHit=PickAnything(rMousePos,aVEvt);
+ SdrEventKind eEvent=aVEvt.eEvent;
+ switch (eEvent) {
+ case SDREVENT_BEGCREATEOBJ: return aAktCreatePointer;
+ case SDREVENT_MARKOBJ: case SDREVENT_BEGMARK: return Pointer(POINTER_ARROW);
+ case SDREVENT_MARKPOINT: case SDREVENT_MARKGLUEPOINT: return Pointer(POINTER_MOVEPOINT);
+ case SDREVENT_BEGINSOBJPOINT: case SDREVENT_BEGINSGLUEPOINT: return Pointer(POINTER_CROSS);
+ case SDREVENT_EXECUTEURL: return Pointer(POINTER_REFHAND);
+ case SDREVENT_BEGMACROOBJ: {
+ SdrObjMacroHitRec aHitRec;
+ aHitRec.aPos=aVEvt.aLogicPos;
+ aHitRec.aDownPos=aHitRec.aPos;
+ aHitRec.nTol=nHitTolLog;
+ aHitRec.pVisiLayer=&aVEvt.pPV->GetVisibleLayers();
+ aHitRec.pPageView=aVEvt.pPV;
+ aHitRec.pOut=(OutputDevice*)pOut;
+ return aVEvt.pObj->GetMacroPointer(aHitRec);
+ }
+ } // switch
+ switch (eHit) {
+ case SDRHIT_HELPLINE : return aVEvt.pPV->GetHelpLines()[aVEvt.nHlplIdx].GetPointer();
+ case SDRHIT_GLUEPOINT: return Pointer(POINTER_MOVEPOINT);
+ case SDRHIT_TEXTEDIT : return Pointer(POINTER_TEXT);
+ case SDRHIT_TEXTEDITOBJ: return Pointer(POINTER_TEXT);
+ } // switch
+
+ BOOL bMarkHit=eHit==SDRHIT_MARKEDOBJECT;
+ SdrHdl* pHdl=aVEvt.pHdl;
+ // Nun die Pointer fuer Dragging checken
+ if (pHdl!=NULL || bMarkHit) {
+ SdrHdlKind eHdl= pHdl!=NULL ? pHdl->GetKind() : HDL_MOVE;
+ BOOL bCorner=pHdl!=NULL && pHdl->IsCornerHdl();
+ BOOL bVertex=pHdl!=NULL && pHdl->IsVertexHdl();
+ BOOL bMov=eHdl==HDL_MOVE;
+ if (bMov && (eDragMode==SDRDRAG_MOVE || eDragMode==SDRDRAG_RESIZE || bMarkedHitMovesAlways)) {
+ if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // weil Doppelklick oder Drag&Drop moeglich
+ return Pointer(POINTER_MOVE);
+ }
+ switch (eDragMode) {
+ case SDRDRAG_ROTATE: {
+ if ((bCorner || bMov) && !IsRotateAllowed(TRUE))
+ return Pointer(POINTER_NOTALLOWED);
+
+ // Sind 3D-Objekte selektiert?
+ BOOL b3DObjSelected = FALSE;
+#ifndef SVX_LIGHT
+ for (UINT32 a=0; !b3DObjSelected && a<aMark.GetMarkCount(); a++) {
+ SdrObject* pObj = aMark.GetMark(a)->GetObj();
+ if(pObj && pObj->ISA(E3dObject))
+ b3DObjSelected = TRUE;
+ }
+#endif
+ // Falls es um ein 3D-Objekt geht, muss trotz !IsShearAllowed
+ // weitergemacht werden, da es sich um eine Rotation statt um
+ // einen Shear handelt
+ if (bVertex && !IsShearAllowed() && !b3DObjSelected)
+ return Pointer(POINTER_NOTALLOWED);
+ if (bMov)
+ return Pointer(POINTER_ROTATE);
+ } break;
+ case SDRDRAG_SHEAR: case SDRDRAG_DISTORT: {
+ if (bCorner) {
+ if (!IsDistortAllowed(TRUE) && !IsDistortAllowed(FALSE)) return Pointer(POINTER_NOTALLOWED);
+ else return Pointer(POINTER_REFHAND);
+ }
+ if (bVertex && !IsShearAllowed()) return Pointer(POINTER_NOTALLOWED);
+ if (bMov) {
+ if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // weil Doppelklick oder Drag&Drop moeglich
+ return Pointer(POINTER_MOVE);
+ }
+ } break;
+ case SDRDRAG_MIRROR: {
+ if (bCorner || bVertex || bMov) {
+ SdrHdl* pH1=aHdl.GetHdl(HDL_REF1);
+ SdrHdl* pH2=aHdl.GetHdl(HDL_REF2);
+ BOOL b90=FALSE;
+ BOOL b45=FALSE;
+ Point aDif;
+ if (pH1!=NULL && pH2!=NULL) {
+ aDif=pH2->GetPos()-pH1->GetPos();
+ b90=(aDif.X()==0) || aDif.Y()==0;
+ b45=b90 || (Abs(aDif.X())==Abs(aDif.Y()));
+ }
+ BOOL bNo=FALSE;
+ if (!IsMirrorAllowed(TRUE,TRUE)) bNo=TRUE; // Spiegeln ueberhaupt nicht erlaubt
+ if (!IsMirrorAllowed(FALSE,FALSE) && !b45) bNo=TRUE; // freies Spiegeln nicht erlaubt
+ if (!IsMirrorAllowed(TRUE,FALSE) && !b90) bNo=TRUE; // Spiegeln hor/ver erlaubt
+ if (bNo) return Pointer(POINTER_NOTALLOWED);
+ if (b90) {
+ return Pointer(POINTER_MIRROR);
+ }
+ return Pointer(POINTER_MIRROR);
+ }
+ } break;
+
+ case SDRDRAG_TRANSPARENCE:
+ {
+ if(!IsTransparenceAllowed())
+ return Pointer(POINTER_NOTALLOWED);
+
+ return Pointer(POINTER_REFHAND);
+ break;
+ }
+
+ case SDRDRAG_GRADIENT:
+ {
+ if(!IsGradientAllowed())
+ return Pointer(POINTER_NOTALLOWED);
+
+ return Pointer(POINTER_REFHAND);
+ break;
+ }
+
+ case SDRDRAG_CROOK: {
+ if (bCorner || bVertex || bMov) {
+ if (!IsCrookAllowed(TRUE) && !IsCrookAllowed(FALSE)) return Pointer(POINTER_NOTALLOWED);
+ return Pointer(POINTER_CROOK); break;
+ }
+ }
+ default: {
+ if ((bCorner || bVertex) && !IsResizeAllowed(TRUE)) return Pointer(POINTER_NOTALLOWED);
+ }
+ }
+ if (pHdl!=NULL) return pHdl->GetPointer();
+ if (bMov) {
+ if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // weil Doppelklick oder Drag&Drop moeglich
+ return Pointer(POINTER_MOVE);
+ }
+ }
+ if (eEditMode==SDREDITMODE_CREATE) return aAktCreatePointer;
+ return Pointer(POINTER_ARROW);
+}
+
+XubString SdrView::GetStatusText()
+{
+ XubString aStr;
+ XubString aName;
+
+ aStr.AppendAscii("nix");
+
+ if (pAktCreate!=NULL) {
+ aStr=pAktCreate->GetDragComment(aDragStat,FALSE,TRUE);
+
+ if(!aStr.Len())
+ {
+ pAktCreate->TakeObjNameSingul(aName);
+ aStr = ImpGetResStr(STR_ViewCreateObj);
+ }
+ } else if (pDragBla!=NULL) {
+ if (bInsPolyPoint || IsInsertGluePoint()) {
+ aStr=aInsPointUndoStr;
+ } else {
+ if (aDragStat.IsMinMoved()) {
+ pDragBla->TakeComment(aStr);
+ }
+ }
+ } else if (bMarking) {
+ if (HasMarkedObj()) {
+ aStr=ImpGetResStr(STR_ViewMarkMoreObjs);
+ } else {
+ aStr=ImpGetResStr(STR_ViewMarkObjs);
+ }
+ } else if (bMarkingPoints) {
+ if (HasMarkedPoints()) {
+ aStr=ImpGetResStr(STR_ViewMarkMorePoints);
+ } else {
+ aStr=ImpGetResStr(STR_ViewMarkPoints);
+ }
+ } else if (bMarkingGluePoints) {
+ if (HasMarkedGluePoints()) {
+ aStr=ImpGetResStr(STR_ViewMarkMoreGluePoints);
+ } else {
+ aStr=ImpGetResStr(STR_ViewMarkGluePoints);
+ }
+ } else if (IsTextEdit() && pTextEditOutlinerView!=NULL) {
+ aStr=ImpGetResStr(STR_ViewTextEdit); // "TextEdit - Zeile y Spalte x";
+ ESelection aSel(pTextEditOutlinerView->GetSelection());
+ long nPar=aSel.nEndPara,nLin=0,nCol=aSel.nEndPos;
+ if (aSel.nEndPara>0) {
+ for (USHORT nParaNum=0; nParaNum<aSel.nEndPara; nParaNum++) {
+ nLin+=pTextEditOutliner->GetLineCount(nParaNum);
+ }
+ }
+ // Noch 'ne kleine Unschoenheit:
+ // Am Ende einer Zeile eines mehrzeiligen Absatzes wird die Position
+ // der naechsten Zeile des selben Absatzes angezeigt, so es eine solche
+ // gibt.
+ USHORT nParaLine=0;
+ ULONG nParaLineAnz=pTextEditOutliner->GetLineCount(aSel.nEndPara);
+ BOOL bBrk=FALSE;
+ while (!bBrk) {
+ USHORT nLen=pTextEditOutliner->GetLineLen(aSel.nEndPara,nParaLine);
+ BOOL bLastLine=(nParaLine==nParaLineAnz-1);
+ if (nCol>nLen || (!bLastLine && nCol==nLen)) {
+ nCol-=nLen;
+ nLin++;
+ nParaLine++;
+ } else bBrk=TRUE;
+ if (nLen==0) bBrk=TRUE; // Sicherheitshalber
+ }
+
+ aStr.SearchAndReplaceAscii("%a", UniString::CreateFromInt32(nPar + 1));
+ aStr.SearchAndReplaceAscii("%z", UniString::CreateFromInt32(nLin + 1));
+ aStr.SearchAndReplaceAscii("%s", UniString::CreateFromInt32(nCol + 1));
+ }
+
+ if(aStr.EqualsAscii("nix"))
+ {
+ if (HasMarkedObj()) {
+ ImpTakeDescriptionStr(STR_ViewMarked,aStr);
+ if (IsGluePointEditMode()) {
+ if (HasMarkedGluePoints()) {
+ ImpTakeDescriptionStr(STR_ViewMarked,aStr,0,IMPSDR_GLUEPOINTSDESCRIPTION);
+ }
+ } else {
+ if (HasMarkedPoints()) {
+ ImpTakeDescriptionStr(STR_ViewMarked,aStr,0,IMPSDR_POINTSDESCRIPTION);
+ }
+ }
+ } else {
+ aStr.Erase();
+ }
+ }
+ else if(aName.Len())
+ {
+ aStr.SearchAndReplaceAscii("%O", aName);
+ }
+
+ if(aStr.Len())
+ {
+ // ersten Buchstaben gross schreiben
+ String aTmpStr(aStr.Copy(0, 1));
+ aTmpStr.ToUpperAscii();
+ aStr.Replace(0, 1, aTmpStr);
+ }
+ return aStr;
+}
+
+SdrViewContext SdrView::GetContext() const
+{
+ if( IsTextEdit() )
+ return SDRCONTEXT_TEXTEDIT;
+
+ if( IsGluePointEditMode() )
+ return SDRCONTEXT_GLUEPOINTEDIT;
+
+ const ULONG nMarkAnz = aMark.GetMarkCount();
+
+ if( HasMarkablePoints() && !IsFrameHandles() )
+ {
+ BOOL bPath=TRUE;
+ for( ULONG nMarkNum = 0; nMarkNum < nMarkAnz && bPath; nMarkNum++ )
+ if (!aMark.GetMark(nMarkNum)->GetObj()->ISA(SdrPathObj))
+ bPath=FALSE;
+
+ if( bPath )
+ return SDRCONTEXT_POINTEDIT;
+ }
+
+ if( aMark.GetMarkCount() )
+ {
+ BOOL bGraf = TRUE;
+ for( ULONG nMarkNum = 0; nMarkNum < nMarkAnz && bGraf; nMarkNum++ )
+ {
+ const SdrObject* pMarkObj = aMark.GetMark( nMarkNum )->GetObj();
+
+ if( !pMarkObj->ISA( SdrGrafObj ) )
+ bGraf = FALSE;
+ }
+
+ if( bGraf )
+ return SDRCONTEXT_GRAPHIC;
+ }
+
+ return SDRCONTEXT_STANDARD;
+}
+
+void SdrView::MarkAll()
+{
+ if (IsTextEdit()) {
+ GetTextEditOutlinerView()->SetSelection(ESelection(0,0,0xFFFF,0xFFFF));
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ } else if (IsGluePointEditMode()) MarkAllGluePoints();
+ else if (HasMarkablePoints()) MarkAllPoints();
+ else MarkAllObj();
+}
+
+void SdrView::UnmarkAll()
+{
+ if (IsTextEdit()) {
+ ESelection eSel=GetTextEditOutlinerView()->GetSelection();
+ eSel.nStartPara=eSel.nEndPara;
+ eSel.nStartPos=eSel.nEndPos;
+ GetTextEditOutlinerView()->SetSelection(eSel);
+ if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
+ } else if (HasMarkedGluePoints()) UnmarkAllGluePoints();
+ else if (HasMarkedPoints()) UnmarkAllPoints(); // ! Marked statt Markable !
+ else UnmarkAllObj();
+}
+
+BOOL SdrView::IsAllMarked() const
+{
+ if (IsTextEdit()) {
+ return ImpIsTextEditAllSelected();
+ }
+ if (IsGluePointEditMode()) {
+ ULONG nAnz=GetMarkableGluePointCount();
+ return nAnz!=0 && nAnz==GetMarkedGluePointCount();
+ }
+ if (HasMarkedPoints()) {
+ ULONG nAnz=GetMarkablePointCount();
+ return nAnz!=0 && nAnz==GetMarkedPointCount();
+ }
+ ULONG nAnz=GetMarkableObjCount();
+ return nAnz!=0 && nAnz==GetMarkedObjCount();
+}
+
+BOOL SdrView::IsMarkPossible() const
+{
+ if (IsTextEdit()) {
+ Paragraph* p1stPara=pTextEditOutliner->GetParagraph( 0 );
+ ULONG nParaAnz=pTextEditOutliner->GetParagraphCount();
+ if (p1stPara==NULL) nParaAnz=0;
+ if (nParaAnz==1) { // bei nur einem Para nachsehen ob da ueberhaupt was drin steht
+ XubString aStr(pTextEditOutliner->GetText(p1stPara));
+
+ // Aha, steht nix drin!
+ if(!aStr.Len())
+ nParaAnz = 0;
+ }
+ return nParaAnz!=0;
+ }
+ if (IsGluePointEditMode()) {
+ return HasMarkableGluePoints();
+ }
+ if (HasMarkedPoints()) {
+ return HasMarkablePoints();
+ }
+ return HasMarkableObj();
+}
+
+BOOL SdrView::IsAllMarkPrevNextPossible() const
+{
+ if (IsTextEdit()) {
+ return FALSE;
+ }
+ if (IsGluePointEditMode()) {
+ return HasMarkableGluePoints();
+ }
+ if (HasMarkedPoints()) {
+ return HasMarkablePoints();
+ }
+ return HasMarkableObj();
+}
+
+BOOL SdrView::MarkNext(BOOL bPrev)
+{
+ if (IsTextEdit()) {
+ return FALSE;
+ }
+ if (IsGluePointEditMode() && HasMarkedGluePoints()) {
+ return MarkNextGluePoint(bPrev);
+ }
+ if (HasMarkedPoints()) {
+ return MarkNextPoint(bPrev);
+ }
+ return MarkNextObj(bPrev);
+}
+
+BOOL SdrView::MarkNext(const Point& rPnt, BOOL bPrev)
+{
+ if (IsTextEdit()) {
+ return FALSE;
+ }
+ if (IsGluePointEditMode() && HasMarkedGluePoints()) {
+ //return MarkNextGluePoint(rPnt,bPrev); fehlende Implementation !!!
+ }
+ if (HasMarkedPoints()) {
+ //return MarkNextPoint(rPnt,bPrev); fehlende Implementation !!!
+ }
+ return MarkNextObj(rPnt,-2,bPrev);
+}
+
+const Rectangle& SdrView::GetMarkedRect() const
+{
+ if (IsGluePointEditMode() && HasMarkedGluePoints()) {
+ return GetMarkedGluePointsRect();
+ }
+ if (HasMarkedPoints()) {
+ return GetMarkedPointsRect();
+ }
+ return GetMarkedObjRect();
+}
+
+void SdrView::SetMarkedRect(const Rectangle& rRect)
+{
+ if (IsGluePointEditMode() && HasMarkedGluePoints()) {
+ //SetMarkedGluePointsRect(rRect); fehlende Implementation !!!
+ } else if (HasMarkedPoints()) {
+ //SetMarkedPointsRect(rRect); fehlende Implementation !!!
+ } else SetMarkedObjRect(rRect);
+}
+
+void SdrView::DeleteMarked()
+{
+ if (IsTextEdit()) {
+ SdrObjEditView::KeyInput(KeyEvent(0,KeyCode(KEYFUNC_DELETE)),pTextEditWin);
+ } else {
+ if (IsGluePointEditMode() && HasMarkedGluePoints()) {
+ DeleteMarkedGluePoints();
+ } else if (GetContext()==SDRCONTEXT_POINTEDIT && HasMarkedPoints()) {
+ DeleteMarkedPoints();
+ } else {
+ DeleteMarkedObj();
+ }
+ }
+}
+
+BOOL SdrView::BegMark(const Point& rPnt, BOOL bAddMark, BOOL bUnmark)
+{
+ if (bUnmark) bAddMark=TRUE;
+ if (IsGluePointEditMode()) {
+ if (!bAddMark) UnmarkAllGluePoints();
+ return BegMarkGluePoints(rPnt,bUnmark);
+ } else if (HasMarkablePoints()) {
+ if (!bAddMark) UnmarkAllPoints();
+ return BegMarkPoints(rPnt,bUnmark);
+ } else {
+ if (!bAddMark) UnmarkAllObj();
+ return BegMarkObj(rPnt,bUnmark);
+ }
+}
+
+BOOL SdrView::IsDeleteMarkedPossible() const
+{
+ if (IsReadOnly()) return FALSE;
+ if (IsTextEdit()) return TRUE;
+ if (IsGluePointEditMode() && HasMarkedGluePoints()) return TRUE;
+ if (HasMarkedPoints()) return TRUE;
+ return IsDeleteMarkedObjPossible();
+}
+
+void SdrView::WriteRecords(SvStream& rOut) const
+{
+ {
+ // Der CharSet muss! als erstes rausgestreamt werden
+ SdrNamedSubRecord aSubRecord(rOut,STREAM_WRITE,SdrInventor,SDRIORECNAME_VIEWCHARSET);
+ rtl_TextEncoding eOutCharSet=rOut.GetStreamCharSet();
+
+ // UNICODE:
+ eOutCharSet = gsl_getSystemTextEncoding();
+
+ rOut << UINT16( GetStoreCharSet( eOutCharSet ) );
+ }
+ SdrCreateView::WriteRecords(rOut);
+}
+
+BOOL SdrView::ReadRecord(const SdrIOHeader& rViewHead,
+ const SdrNamedSubRecord& rSubHead,
+ SvStream& rIn)
+{
+ BOOL bRet=FALSE;
+ if (rSubHead.GetInventor()==SdrInventor) {
+ bRet=TRUE;
+ switch (rSubHead.GetIdentifier()) {
+ case SDRIORECNAME_VIEWCHARSET: {
+ UINT16 nCharSet;
+ rIn>>nCharSet;
+ rIn.SetStreamCharSet(rtl_TextEncoding(nCharSet));
+ } break;
+ default: bRet=FALSE;
+ }
+ }
+ if (!bRet) bRet=SdrCreateView::ReadRecord(rViewHead,rSubHead,rIn);
+ return bRet;
+}
+
+SvStream& operator<<(SvStream& rOut, const SdrView& rView)
+{
+ SdrIOHeader aHead(rOut,STREAM_WRITE,SdrIOViewID);
+ rView.WriteRecords(rOut);
+ return rOut;
+}
+
+SvStream& operator>>(SvStream& rIn, SdrView& rView)
+{
+ if (rIn.GetError()!=0) return rIn;
+ rView.BrkAction();
+ rView.Clear();
+ SdrIOHeader aHead(rIn,STREAM_READ);
+ if (!aHead.IsMagic()) {
+ rIn.SetError(SVSTREAM_FILEFORMAT_ERROR); // Format-Fehler
+ return rIn;
+ }
+ rtl_TextEncoding eStreamCharSetMerker=rIn.GetStreamCharSet(); // Der StreamCharSet wird von SdrView::ReadRecord() gesetzt
+ while (aHead.GetBytesLeft()>0 && rIn.GetError()==0 && !rIn.IsEof()) {
+ SdrNamedSubRecord aSubRecord(rIn,STREAM_READ);
+ rView.ReadRecord(aHead,aSubRecord,rIn);
+ }
+ rIn.SetStreamCharSet(eStreamCharSetMerker); // StreamCharSet wieder restaurieren
+ rView.InvalidateAllWin();
+ return rIn;
+}
+
+
diff --git a/svx/source/svdraw/svdviter.cxx b/svx/source/svdraw/svdviter.cxx
new file mode 100644
index 0000000000..58bee33dc1
--- /dev/null
+++ b/svx/source/svdraw/svdviter.cxx
@@ -0,0 +1,330 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdviter.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "svdviter.hxx"
+#include "svdobj.hxx"
+#include "svdpage.hxx"
+#include "svdmodel.hxx"
+#include "svdview.hxx"
+#include "svdpagv.hxx"
+#include "svdsob.hxx"
+
+#ifndef _SFXBRDCST_HXX //autogen
+#include <svtools/brdcst.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrViewIter::ImpInitVars()
+{
+ nListenerNum=0;
+ nPageViewNum=0;
+ nOutDevNum=0;
+ pAktView=NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrViewIter::SdrViewIter(const SdrModel* pModel_)
+{
+ pModel=pModel_;
+ pPage=NULL;
+ pObject=NULL;
+ ImpInitVars();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrViewIter::SdrViewIter(const SdrPage* pPage_, FASTBOOL bNoMasterPage_)
+{
+ pPage=pPage_;
+ pModel=pPage_!=NULL ? pPage_->GetModel() : NULL;
+ pObject=NULL;
+ bNoMasterPage=bNoMasterPage_;
+ ImpInitVars();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrViewIter::SdrViewIter(const SdrObject* pObject_, FASTBOOL bNoMasterPage_)
+{
+ pObject=pObject_;
+ pModel=pObject_!=NULL ? pObject_->GetModel() : NULL;
+ pPage=pObject_!=NULL ? pObject_->GetPage() : NULL;
+ bNoMasterPage=bNoMasterPage_;
+ if (pModel==NULL || pPage==NULL) {
+ pModel=NULL;
+ pPage=NULL;
+ }
+ ImpInitVars();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+FASTBOOL SdrViewIter::ImpCheckPageView(SdrPageView* pPV) const
+{
+ if (pPage!=NULL) {
+ FASTBOOL bMaster=pPage->IsMasterPage();
+ USHORT nPageNum=pPage->GetPageNum();
+ SdrPage* pPg=pPV->GetPage();
+ if (pPg==pPage) {
+ if (pObject!=NULL) {
+ // Objekt gewuenscht? Na dann erstmal sehen, ob
+ // das Obj in dieser PageView auch sichtbar ist.
+ SetOfByte aObjLay;
+ pObject->GetLayer(aObjLay);
+ aObjLay&=pPV->GetVisibleLayers();
+ return !aObjLay.IsEmpty();
+ } else {
+ return TRUE;
+ }
+ } else {
+ if (!bNoMasterPage && bMaster && (pObject==NULL || !pObject->IsNotVisibleAsMaster())) {
+ USHORT nMasterPageAnz=pPg->GetMasterPageCount();
+ USHORT nMasterPagePos=0;
+ while (nMasterPagePos<nMasterPageAnz) {
+ if (nPageNum==pPg->GetMasterPageNum(nMasterPagePos)) {
+ // Aha, die gewuenschte Page ist also MasterPage in dieser PageView
+ if (pObject!=NULL) {
+ // Objekt gewuenscht? Na dann erstmal sehen, ob
+ // das Obj in dieser PageView auch sichtbar ist.
+ SetOfByte aObjLay;
+ pObject->GetLayer(aObjLay);
+ aObjLay&=pPV->GetVisibleLayers();
+ aObjLay&=pPg->GetMasterPageVisibleLayers(nMasterPagePos);
+ if (!aObjLay.IsEmpty()) {
+ return TRUE;
+ } // ansonsten die naechste MasterPage der Page ansehen...
+ } else {
+ return TRUE;
+ }
+ }
+ nMasterPagePos++;
+ }
+ }
+ // MasterPage nicht erlaubt oder keine passende gefunden
+ return FALSE;
+ }
+ } else {
+ return TRUE;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrView* SdrViewIter::ImpFindView()
+{
+ if (pModel!=NULL) {
+ USHORT nLsAnz=pModel->GetListenerCount();
+ while (nListenerNum<nLsAnz) {
+ SfxListener* pLs=pModel->GetListener(nListenerNum);
+ pAktView=PTR_CAST(SdrView,pLs);
+ if (pAktView!=NULL) {
+ if (pPage!=NULL) {
+ USHORT nPvAnz=pAktView->GetPageViewCount();
+ USHORT nPvNum=0;
+ while (nPvNum<nPvAnz) {
+ SdrPageView* pPV=pAktView->GetPageViewPvNum(nPvNum);
+ if (ImpCheckPageView(pPV)) {
+ return pAktView;
+ }
+ nPvNum++;
+ }
+ } else {
+ return pAktView;
+ }
+ }
+ nListenerNum++;
+ }
+ }
+ pAktView=NULL;
+ return pAktView;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrPageView* SdrViewIter::ImpFindPageView()
+{
+ SdrView* pRet=NULL;
+ if (pModel!=NULL) {
+ while (pAktView!=NULL) {
+ USHORT nPvAnz=pAktView->GetPageViewCount();
+ while (nPageViewNum<nPvAnz) {
+ SdrPageView* pPV=pAktView->GetPageViewPvNum(nPageViewNum);
+ if (pPage!=NULL) {
+ if (ImpCheckPageView(pPV)) {
+ return pPV;
+ }
+ } else {
+ return pPV;
+ }
+ nPageViewNum++;
+ }
+ nListenerNum++;
+ ImpFindView();
+ }
+ }
+ return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+OutputDevice* SdrViewIter::ImpFindOutDev()
+{
+ while (pAktView!=NULL) {
+ USHORT nOutDevAnz=pAktView->GetWinCount();
+ if (nOutDevNum<nOutDevAnz) {
+ return pAktView->GetWin(nOutDevNum);
+ }
+ nListenerNum++;
+ ImpFindView();
+ }
+ return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+Window* SdrViewIter::ImpFindWindow()
+{
+ while (pAktView!=NULL) {
+ USHORT nOutDevAnz=pAktView->GetWinCount();
+ while (nOutDevNum<nOutDevAnz) {
+ OutputDevice* pOutDev=pAktView->GetWin(nOutDevNum);
+ if (pOutDev->GetOutDevType()==OUTDEV_WINDOW) {
+ return (Window*)pOutDev;
+ }
+ nOutDevNum++;
+ }
+ nListenerNum++;
+ ImpFindView();
+ }
+ return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrView* SdrViewIter::FirstView()
+{
+ ImpInitVars();
+ return ImpFindView();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrView* SdrViewIter::NextView()
+{
+ nListenerNum++;
+ return ImpFindView();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrPageView* SdrViewIter::FirstPageView()
+{
+ ImpInitVars();
+ ImpFindView();
+ return ImpFindPageView();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrPageView* SdrViewIter::NextPageView()
+{
+ nPageViewNum++;
+ return ImpFindPageView();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+OutputDevice* SdrViewIter::FirstOutDev()
+{
+ ImpInitVars();
+ ImpFindView();
+ return ImpFindOutDev();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+OutputDevice* SdrViewIter::NextOutDev()
+{
+ nOutDevNum++;
+ return ImpFindOutDev();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+Window* SdrViewIter::FirstWindow()
+{
+ ImpInitVars();
+ ImpFindView();
+ return ImpFindWindow();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+Window* SdrViewIter::NextWindow()
+{
+ nOutDevNum++;
+ return ImpFindWindow();
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
new file mode 100644
index 0000000000..b3227b483d
--- /dev/null
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -0,0 +1,1254 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdxcgv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "editeng.hxx"
+
+#include "xexch.hxx"
+#include "xflclit.hxx"
+
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+
+#ifndef _SV_CLIP_HXX //autogen
+#include <vcl/clip.hxx>
+#endif
+
+#ifndef _SV_DRAG_HXX //autogen
+#include <vcl/drag.hxx>
+#endif
+
+#include "svdxcgv.hxx"
+#include "svdoutl.hxx"
+#include "svditext.hxx"
+#include "svdetc.hxx"
+#include "svdxout.hxx"
+#include "svdundo.hxx"
+#include "svdograf.hxx"
+#include "svdoole2.hxx" // fuer kein OLE im SdrClipboardFormat
+#include "svdorect.hxx"
+#include "svdoedge.hxx" // fuer Konnektoren uebers Clipboard
+#include "svdpage.hxx"
+#include "svdpagv.hxx"
+#include "svdtrans.hxx" // Fuer GetMapFactor zum umskalieren bei PasteModel
+#include "svdstr.hrc" // Namen aus der Resource
+#include "svdglob.hxx" // StringCache
+#include "xoutbmp.hxx"
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _BIGINT_HXX //autogen
+#include <tools/bigint.hxx>
+#endif
+
+#ifndef _SOT_FORMATS_HXX //autogen
+#include <sot/formats.hxx>
+#endif
+
+#ifndef _DTRANS_HXX
+#include <so3/dtrans.hxx>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+SdrExchangeView::SdrExchangeView(SdrModel* pModel1, OutputDevice* pOut):
+ SdrObjEditView(pModel1,pOut)
+{
+}
+
+SdrExchangeView::SdrExchangeView(SdrModel* pModel1, ExtOutputDevice* pXOut):
+ SdrObjEditView(pModel1,pXOut)
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+Point SdrExchangeView::GetViewCenter(const OutputDevice* pOut) const
+{
+ Point aCenter;
+ if (pOut==NULL) pOut=GetWin(0);
+ if (pOut!=NULL) {
+ Point aOfs=pOut->GetMapMode().GetOrigin();
+ Size aOutSiz=pOut->GetOutputSize();
+ aOutSiz.Width()/=2;
+ aOutSiz.Height()/=2;
+ aCenter.X()=aOutSiz.Width() -aOfs.X();
+ aCenter.Y()=aOutSiz.Height()-aOfs.Y();
+ }
+ return aCenter;
+}
+
+Point SdrExchangeView::GetPastePos(SdrObjList* pLst, OutputDevice* pOut)
+{
+ Point aP(GetViewCenter(pOut));
+ SdrPage* pPg=NULL;
+ if (pLst!=NULL) pPg=pLst->GetPage();
+ if (pPg!=NULL) {
+ Size aSiz(pPg->GetSize());
+ aP.X()=aSiz.Width()/2;
+ aP.Y()=aSiz.Height()/2;
+ }
+ return aP;
+}
+
+BOOL SdrExchangeView::ImpLimitToWorkArea(Point& rPt, const SdrPageView* pPV) const
+{
+ BOOL bRet(FALSE);
+
+ if(!aMaxWorkArea.IsEmpty())
+ {
+ if(pPV)
+ rPt += pPV->GetOffset();
+
+ if(rPt.X()<aMaxWorkArea.Left())
+ {
+ rPt.X() = aMaxWorkArea.Left();
+ bRet = TRUE;
+ }
+
+ if(rPt.X()>aMaxWorkArea.Right())
+ {
+ rPt.X() = aMaxWorkArea.Right();
+ bRet = TRUE;
+ }
+
+ if(rPt.Y()<aMaxWorkArea.Top())
+ {
+ rPt.Y() = aMaxWorkArea.Top();
+ bRet = TRUE;
+ }
+
+ if(rPt.Y()>aMaxWorkArea.Bottom())
+ {
+ rPt.Y() = aMaxWorkArea.Bottom();
+ bRet = TRUE;
+ }
+
+ if(pPV)
+ rPt -= pPV->GetOffset();
+ }
+ return bRet;
+}
+
+void SdrExchangeView::ImpGetPasteObjList(Point& rPos, SdrObjList*& rpLst)
+{
+ if (rpLst==NULL) {
+ SdrPageView* pPV=GetPageView(rPos);
+ if (pPV!=NULL) {
+ rpLst=pPV->GetObjList();
+ rPos-=pPV->GetOffset();
+ }
+ }
+}
+
+BOOL SdrExchangeView::ImpGetPasteLayer(const SdrObjList* pObjList, SdrLayerID& rLayer) const
+{
+ BOOL bRet=FALSE;
+ rLayer=0;
+ if (pObjList!=NULL) {
+ const SdrPage* pPg=pObjList->GetPage();
+ if (pPg!=NULL) {
+ rLayer=pPg->GetLayerAdmin().GetLayerID(aAktLayer,TRUE);
+ if (rLayer==SDRLAYER_NOTFOUND) rLayer=0;
+ SdrPageView* pPV=GetPageView(pPg);
+ if (pPV!=NULL) {
+ bRet=!pPV->GetLockedLayers().IsSet(rLayer) && pPV->GetVisibleLayers().IsSet(rLayer);
+ }
+ }
+ }
+ return bRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL SdrExchangeView::Paste(const GDIMetaFile& rMtf, const Point& rPos, SdrObjList* pLst, UINT32 nOptions)
+{
+ Point aPos(rPos);
+ ImpGetPasteObjList(aPos,pLst);
+ SdrPageView* pMarkPV=NULL;
+ for ( USHORT nv = 0; nv < GetPageViewCount() && !pMarkPV; nv++ )
+ {
+ SdrPageView* pPV = GetPageViewPvNum(nv);
+ if ( pPV->GetObjList() == pLst )
+ pMarkPV=pPV;
+ }
+
+ ImpLimitToWorkArea( aPos, pMarkPV );
+ if (pLst==NULL) return FALSE;
+ SdrLayerID nLayer;
+ if (!ImpGetPasteLayer(pLst,nLayer)) return FALSE;
+ BOOL bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
+ if (bUnmark) UnmarkAllObj();
+ SdrGrafObj* pObj=new SdrGrafObj(Graphic(rMtf));
+ pObj->SetLayer(nLayer);
+ ImpPasteObject(pObj,*pLst,aPos,rMtf.GetPrefSize(),rMtf.GetPrefMapMode(),nOptions);
+ return TRUE;
+}
+
+BOOL SdrExchangeView::Paste(const Bitmap& rBmp, const Point& rPos, SdrObjList* pLst, UINT32 nOptions)
+{
+ Point aPos(rPos);
+ ImpGetPasteObjList(aPos,pLst);
+ SdrPageView* pMarkPV=NULL;
+ for ( USHORT nv = 0; nv < GetPageViewCount() && !pMarkPV; nv++ )
+ {
+ SdrPageView* pPV = GetPageViewPvNum(nv);
+ if ( pPV->GetObjList() == pLst )
+ pMarkPV=pPV;
+ }
+
+ ImpLimitToWorkArea( aPos, pMarkPV );
+ if (pLst==NULL) return FALSE;
+ SdrLayerID nLayer;
+ if (!ImpGetPasteLayer(pLst,nLayer)) return FALSE;
+ BOOL bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
+ if (bUnmark) UnmarkAllObj();
+ SdrGrafObj* pObj=new SdrGrafObj(Graphic(rBmp));
+ pObj->SetLayer(nLayer);
+ ImpPasteObject(pObj,*pLst,aPos,rBmp.GetSizePixel(),MapMode(MAP_PIXEL),nOptions);
+ return TRUE;
+}
+
+BOOL SdrExchangeView::Paste(const XubString& rStr, const Point& rPos, SdrObjList* pLst, UINT32 nOptions)
+{
+ if(!rStr.Len())
+ return FALSE;
+
+ Point aPos(rPos);
+ ImpGetPasteObjList(aPos,pLst);
+ SdrPageView* pMarkPV=NULL;
+ for ( USHORT nv = 0; nv < GetPageViewCount() && !pMarkPV; nv++ )
+ {
+ SdrPageView* pPV = GetPageViewPvNum(nv);
+ if ( pPV->GetObjList() == pLst )
+ pMarkPV=pPV;
+ }
+
+ ImpLimitToWorkArea( aPos, pMarkPV );
+ if (pLst==NULL) return FALSE;
+ SdrLayerID nLayer;
+ if (!ImpGetPasteLayer(pLst,nLayer)) return FALSE;
+ BOOL bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
+ if (bUnmark) UnmarkAllObj();
+ Rectangle aTextRect(0,0,500,500);
+ SdrPage* pPage=pLst->GetPage();
+ if (pPage!=NULL) {
+ aTextRect.SetSize(pPage->GetSize());
+ }
+ SdrRectObj* pObj=new SdrRectObj(OBJ_TEXT,aTextRect);
+ pObj->SetModel(pMod);
+ pObj->SetLayer(nLayer);
+ pObj->NbcSetText(rStr); // #32424# SetText vor SetAttr, weil SetAttr sonst unwirksam!
+ if (pDefaultStyleSheet!=NULL) pObj->NbcSetStyleSheet(pDefaultStyleSheet,FALSE);
+ pObj->NbcSetAttributes(aDefaultAttr,FALSE);
+ SfxItemSet aTempAttr(pMod->GetItemPool()); // Keine Fuellung oder Linie
+ aTempAttr.Put(XLineStyleItem(XLINE_NONE));
+ aTempAttr.Put(XFillStyleItem(XFILL_NONE));
+ pObj->NbcSetAttributes(aTempAttr, FALSE);
+ pObj->FitFrameToTextSize();
+ Size aSiz(pObj->GetLogicRect().GetSize());
+ MapUnit eMap=pMod->GetScaleUnit();
+ Fraction aMap=pMod->GetScaleFraction();
+ ImpPasteObject(pObj,*pLst,aPos,aSiz,MapMode(eMap,Point(0,0),aMap,aMap),nOptions);
+ return TRUE;
+}
+
+BOOL SdrExchangeView::Paste(SvStream& rInput, USHORT eFormat, const Point& rPos, SdrObjList* pLst, UINT32 nOptions)
+{
+ Point aPos(rPos);
+ ImpGetPasteObjList(aPos,pLst);
+ SdrPageView* pMarkPV=NULL;
+ for ( USHORT nv = 0; nv < GetPageViewCount() && !pMarkPV; nv++ )
+ {
+ SdrPageView* pPV = GetPageViewPvNum(nv);
+ if ( pPV->GetObjList() == pLst )
+ pMarkPV=pPV;
+ }
+
+ ImpLimitToWorkArea( aPos, pMarkPV );
+ if (pLst==NULL) return FALSE;
+ SdrLayerID nLayer;
+ if (!ImpGetPasteLayer(pLst,nLayer)) return FALSE;
+ BOOL bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
+ if (bUnmark) UnmarkAllObj();
+ Rectangle aTextRect(0,0,500,500);
+ SdrPage* pPage=pLst->GetPage();
+ if (pPage!=NULL) {
+ aTextRect.SetSize(pPage->GetSize());
+ }
+ SdrRectObj* pObj=new SdrRectObj(OBJ_TEXT,aTextRect);
+ pObj->SetModel(pMod);
+ pObj->SetLayer(nLayer);
+ if (pDefaultStyleSheet!=NULL) pObj->NbcSetStyleSheet(pDefaultStyleSheet,FALSE);
+ pObj->NbcSetAttributes(aDefaultAttr,FALSE);
+ SfxItemSet aTempAttr(pMod->GetItemPool()); // Keine Fuellung oder Linie
+ aTempAttr.Put(XLineStyleItem(XLINE_NONE));
+ aTempAttr.Put(XFillStyleItem(XFILL_NONE));
+ pObj->NbcSetAttributes(aTempAttr, FALSE);
+ pObj->NbcSetText(rInput,eFormat);
+ pObj->FitFrameToTextSize();
+ Size aSiz(pObj->GetLogicRect().GetSize());
+ MapUnit eMap=pMod->GetScaleUnit();
+ Fraction aMap=pMod->GetScaleFraction();
+ ImpPasteObject(pObj,*pLst,aPos,aSiz,MapMode(eMap,Point(0,0),aMap,aMap),nOptions);
+ return TRUE;
+}
+
+BOOL SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst, UINT32 nOptions)
+{
+ const SdrModel* pSrcMod=&rMod;
+ if (pSrcMod==pMod) return FALSE; // na so geht's ja nun nicht
+ Point aPos(rPos);
+ ImpGetPasteObjList(aPos,pLst);
+ SdrPageView* pMarkPV=NULL;
+ for ( USHORT nv = 0; nv < GetPageViewCount() && !pMarkPV; nv++ )
+ {
+ SdrPageView* pPV = GetPageViewPvNum(nv);
+ if ( pPV->GetObjList() == pLst )
+ pMarkPV=pPV;
+ }
+
+ ImpLimitToWorkArea( aPos, pMarkPV );
+ if (pLst==NULL) return FALSE;
+ BOOL bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
+ if (bUnmark) UnmarkAllObj();
+
+ // evtl. umskalieren bei unterschiedlicher MapUnit am Model
+ // Dafuer erstmal die Faktoren berechnen
+ MapUnit eSrcUnit=pSrcMod->GetScaleUnit();
+ MapUnit eDstUnit=pMod->GetScaleUnit();
+ BOOL bResize=eSrcUnit!=eDstUnit;
+ Fraction xResize,yResize;
+ Point aPt0;
+ if (bResize) {
+ FrPair aResize(GetMapFactor(eSrcUnit,eDstUnit));
+ xResize=aResize.X();
+ yResize=aResize.Y();
+ }
+ SdrObjList* pDstLst=pLst;
+ USHORT nPg,nPgAnz=pSrcMod->GetPageCount();
+ BegUndo(ImpGetResStr(STR_ExchangePaste));
+ for (nPg=0; nPg<nPgAnz; nPg++) {
+ const SdrPage* pSrcPg=pSrcMod->GetPage(nPg);
+ Rectangle aR=pSrcPg->GetAllObjBoundRect();
+ if (bResize) ResizeRect(aR,aPt0,xResize,yResize);
+ Point aDist(aPos-aR.Center());
+ Size aSiz(aDist.X(),aDist.Y());
+ ULONG nDstObjAnz0=pDstLst->GetObjCount();
+ ULONG nCloneErrCnt=0;
+ ULONG nOb,nObAnz=pSrcPg->GetObjCount();
+ BOOL bMark=pMarkPV!=NULL && !IsTextEdit() && (nOptions&SDRINSERT_DONTMARK)==0;
+ for (nOb=0; nOb<nObAnz; nOb++) {
+ const SdrObject* pSrcOb=pSrcPg->GetObj(nOb);
+ SdrObject* pNeuObj=pSrcOb->Clone(pDstLst->GetPage(),pDstLst->GetModel());
+ if (pNeuObj!=NULL) {
+ if (bResize) {
+ pNeuObj->GetModel()->SetPasteResize(TRUE); // #51139#
+ pNeuObj->NbcResize(aPt0,xResize,yResize);
+ pNeuObj->GetModel()->SetPasteResize(FALSE); // #51139#
+ }
+ pNeuObj->NbcMove(aSiz);
+
+ const SdrPage* pPg = pDstLst->GetPage();
+ if ( pPg )
+ pNeuObj->SetLayer( pPg->GetLayerAdmin().GetLayerID(aAktLayer, TRUE) );
+
+ SdrInsertReason aReason(SDRREASON_VIEWCALL);
+ pDstLst->InsertObject(pNeuObj,CONTAINER_APPEND,&aReason);
+
+ AddUndo(new SdrUndoNewObj(*pNeuObj));
+ if (bMark) {
+ // Markhandles noch nicht sofort setzen!
+ // Das erledigt das ModelHasChanged der MarkView.
+ MarkObj(pNeuObj,pMarkPV,FALSE,TRUE);
+ }
+ } else {
+ nCloneErrCnt++;
+ }
+ }
+ // und nun zu den Konnektoren
+ // Die neuen Objekte in pDstLst werden auf die der pSrcPg abgebildet
+ // und so die Objektverbindungen hergestellt.
+ // Aehnliche Implementation an folgenden Stellen:
+ // void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
+ // SdrModel* SdrExchangeView::GetMarkedObjModel() const
+ // BOOL SdrExchangeView::Paste(const SdrModel& rMod,...)
+ // void SdrEditView::CopyMarked()
+ if (nCloneErrCnt==0) {
+ for (nOb=0; nOb<nObAnz; nOb++) {
+ const SdrObject* pSrcOb=pSrcPg->GetObj(nOb);
+ SdrEdgeObj* pSrcEdge=PTR_CAST(SdrEdgeObj,pSrcOb);
+ if (pSrcEdge!=NULL) {
+ SdrObject* pSrcNode1=pSrcEdge->GetConnectedNode(TRUE);
+ SdrObject* pSrcNode2=pSrcEdge->GetConnectedNode(FALSE);
+ if (pSrcNode1!=NULL && pSrcNode1->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode1=NULL; // Listenuebergreifend
+ if (pSrcNode2!=NULL && pSrcNode2->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode2=NULL; // ist (noch) nicht
+ if (pSrcNode1!=NULL || pSrcNode2!=NULL) {
+ SdrObject* pDstEdgeTmp=pDstLst->GetObj(nDstObjAnz0+nOb);
+ SdrEdgeObj* pDstEdge=PTR_CAST(SdrEdgeObj,pDstEdgeTmp);
+ if (pDstEdge!=NULL) {
+ if (pSrcNode1!=NULL) {
+ ULONG nDstNode1=pSrcNode1->GetOrdNum();
+ SdrObject* pDstNode1=pDstLst->GetObj(nDstNode1+nDstObjAnz0);
+ if (pDstNode1!=NULL) { // Sonst grober Fehler!
+ pDstEdge->ConnectToNode(TRUE,pDstNode1);
+ } else {
+ DBG_ERROR("SdrExchangeView::Paste(): pDstNode1==NULL!");
+ }
+ }
+ if (pSrcNode2!=NULL) {
+ ULONG nDstNode2=pSrcNode2->GetOrdNum();
+ SdrObject* pDstNode2=pDstLst->GetObj(nDstNode2+nDstObjAnz0);
+ if (pDstNode2!=NULL) { // Node war sonst wohl nicht markiert
+ pDstEdge->ConnectToNode(FALSE,pDstNode2);
+ } else {
+ DBG_ERROR("SdrExchangeView::Paste(): pDstNode2==NULL!");
+ }
+ }
+ } else {
+ DBG_ERROR("SdrExchangeView::Paste(): pDstEdge==NULL!");
+ }
+ }
+ }
+ }
+ } else {
+#ifdef DBG_UTIL
+ ByteString aStr("SdrExchangeView::Paste(): Fehler beim Clonen ");
+
+ if(nCloneErrCnt == 1)
+ {
+ aStr += "eines Zeichenobjekts.";
+ }
+ else
+ {
+ aStr += "von ";
+ aStr += nCloneErrCnt;
+ aStr += " Zeichenobjekten.";
+ }
+
+ aStr += " Objektverbindungen werden nicht mitkopiert.";
+
+ DBG_ERROR(aStr.GetBuffer());
+#endif
+ }
+ }
+ EndUndo();
+ return TRUE;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void SdrExchangeView::CutMarked(ULONG nFormat)
+{
+ YankMarked(nFormat);
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_ExchangeClpCut,aStr);
+ BegUndo(aStr);
+ DeleteMarkedObj();
+ EndUndo();
+}
+
+void SdrExchangeView::ImpYank(ULONG nFormat, BOOL bClp) const
+{
+ if(HasMarkedObj())
+ {
+ String aStrEditEngineFormat("EditEngineFormat", gsl_getSystemTextEncoding());
+ UINT32 nSdrFormat(SOT_FORMATSTR_ID_DRAWING);
+ UINT32 nEEFormat(Exchange::RegisterFormatName(aStrEditEngineFormat));
+
+ if(bClp)
+ {
+ // 1. Private
+ }
+
+ // 2. SdrExchangeFormat
+ if (nFormat==SDR_ANYFORMAT || nFormat==nSdrFormat) {
+ SdrModel* pModel=GetMarkedObjModel();
+ pModel->SetStreamingSdrModel(TRUE);
+ pModel->RemoveNotPersistentObjects(TRUE); // OLE, etc. entfernen
+ SvMemoryStream aMemStream(4096,4096);
+ aMemStream.SetVersion(SOFFICE_FILEFORMAT_NOW);
+ // StyleSheetPool und Persist fehlt hier wohl noch ...
+ pModel->GetItemPool().Store(aMemStream);
+ aMemStream<<*pModel;
+ if (bClp) Clipboard::CopyData(aMemStream.GetData(),aMemStream.GetSize(),nSdrFormat);
+ else DragServer::CopyData(aMemStream.GetData(),aMemStream.GetSize(),nSdrFormat);
+ delete pModel;
+ }
+ // 3. Metafile
+ if (nFormat==SDR_ANYFORMAT || nFormat==FORMAT_GDIMETAFILE) {
+ GDIMetaFile aMtf(GetMarkedObjMetaFile());
+ if (bClp) Clipboard::CopyGDIMetaFile(aMtf);
+ else DragServer::CopyGDIMetaFile(aMtf);
+ }
+ // 4. Bitmap
+ if (nFormat==SDR_ANYFORMAT || nFormat==FORMAT_BITMAP) {
+ Bitmap aBmp(GetMarkedObjBitmap());
+ if (bClp) Clipboard::CopyBitmap(aBmp);
+ else DragServer::CopyBitmap(aBmp);
+ }
+ // 5. EditEngine, 6. RTF, 7. Text
+ if (nFormat==SDR_ANYFORMAT || nFormat==nEEFormat || nFormat==FORMAT_RTF || nFormat==FORMAT_STRING) {
+ if (aMark.GetMarkCount()==1) {
+ const SdrObject* pObj=aMark.GetMark(0)->GetObj();
+ const OutlinerParaObject* pOLPara=pObj->GetOutlinerParaObject();
+ if (pOLPara!=NULL) {
+ const SdrTextObj* pText=PTR_CAST(SdrTextObj,pObj); // DrawOutliner ggf. mit Rahmendefaults
+ SdrOutliner& rOutliner=pText!=NULL ? pText->ImpGetDrawOutliner() : pMod->GetDrawOutliner();
+ rOutliner.SetUpdateMode(TRUE);
+ rOutliner.SetText(*pOLPara);
+ XubString aStr(rOutliner.GetText(rOutliner.GetParagraph( 0 ), rOutliner.GetParagraphCount()));
+
+ if(aStr.Len())
+ {
+ if (nFormat==SDR_ANYFORMAT || nFormat==nEEFormat) {
+ SvMemoryStream aMemStream(4096,4096);
+ aMemStream.SetVersion(SOFFICE_FILEFORMAT_NOW);
+ ((EditEngine&)rOutliner.GetEditEngine()).Write(aMemStream,EE_FORMAT_BIN);
+ if (bClp) Clipboard::CopyData(aMemStream.GetData(),aMemStream.GetSize(),nEEFormat);
+ else DragServer::CopyData(aMemStream.GetData(),aMemStream.GetSize(),nEEFormat);
+ }
+ if (nFormat==SDR_ANYFORMAT || nFormat==FORMAT_RTF) {
+ SvMemoryStream aMemStream(4096,4096);
+ ((EditEngine&)rOutliner.GetEditEngine()).Write(aMemStream,EE_FORMAT_RTF);
+ if (bClp) Clipboard::CopyData(aMemStream.GetData(),aMemStream.GetSize(),FORMAT_RTF);
+ else DragServer::CopyData(aMemStream.GetData(),aMemStream.GetSize(),FORMAT_RTF);
+ }
+ if (nFormat==SDR_ANYFORMAT || nFormat==FORMAT_STRING) {
+ if (bClp) Clipboard::CopyString(aStr);
+ else DragServer::CopyString(aStr);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void SdrExchangeView::YankMarked(ULONG nFormat)
+{
+ if (HasMarkedObj()) {
+ Clipboard::Clear();
+ ImpYank(nFormat,TRUE);
+ }
+}
+
+DropAction SdrExchangeView::DragDropMarked(Window& rWin, ULONG nFormat)
+{
+ if (HasMarkedObj()) {
+ DragServer::Clear();
+ BrkAction();
+ ImpYank(nFormat,FALSE);
+ SdrModel* pDragModel=NULL;
+ if (nFormat==SDR_ANYFORMAT || nFormat==FORMAT_PRIVATE) {
+ pDragModel=GetMarkedObjModel();
+ DragServer::CopyPrivateData(pDragModel);
+ }
+ Pointer aCopShape(POINTER_COPYDATA);
+ Pointer aMovShape(POINTER_MOVEDATA);
+ SdrMarkList aOldML(aMark); // alte Marklist merken
+
+ XubString aStr;
+ ImpTakeDescriptionStr(STR_ExchangeDD,aStr);
+ BegUndo(aStr);
+ DropAction eAct=rWin.ExecuteDrag(aMovShape,aCopShape);
+ if (pDragModel!=NULL) delete pDragModel;
+ if (eAct==DROP_MOVE || eAct==DROP_DISCARD) { // alle Objekte loeschen, die vorher markiert waren
+ DeleteMarked(aOldML);
+ }
+ EndUndo();
+ DragServer::Clear();
+ return eAct;
+ } else return DROP_NONE;
+}
+
+BOOL SdrExchangeView::PasteClipboard(OutputDevice* pOut, ULONG nFormat, UINT32 nOptions)
+{
+ BOOL bRet=FALSE;
+ if (!IsTextEdit()) UnmarkAllObj();
+ BegUndo(ImpGetResStr(STR_ExchangeClpPaste));
+ bRet=ImpPaste(nFormat,TRUE,0,GetViewCenter(pOut),nOptions);
+ EndUndo();
+ return bRet;
+}
+
+BOOL SdrExchangeView::PasteDragDrop(const Point& rPos, ULONG nFormat, USHORT nItemNum, UINT32 nOptions)
+{
+ BOOL bRet=FALSE;
+ if (!IsTextEdit()) UnmarkAllObj();
+ BegUndo(ImpGetResStr(STR_ExchangeDDPaste));
+ USHORT i=nItemNum;
+ USHORT nMax=i;
+ if (i==SDR_ANYITEM) {
+ i=0;
+ nMax=DragServer::GetItemCount();
+ } else nMax++;
+ while (i<nMax) {
+ if (ImpPaste(nFormat,FALSE,i,rPos,nOptions)) bRet=TRUE;
+ i++;
+ }
+ EndUndo();
+ return bRet;
+}
+
+BOOL SdrExchangeView::IsClipboardFormatSupported(ULONG nFormat) const
+{
+ BOOL bOk(FALSE);
+
+ if(nFormat == SDR_ANYFORMAT)
+ {
+ String aStrEditEngineFormat("EditEngineFormat", gsl_getSystemTextEncoding());
+
+ bOk = Clipboard::HasFormat(FORMAT_PRIVATE) ||
+ Clipboard::HasFormat(FORMAT_GDIMETAFILE) ||
+ Clipboard::HasFormat(FORMAT_BITMAP) ||
+ Clipboard::HasFormat(FORMAT_RTF) ||
+ Clipboard::HasFormat(FORMAT_STRING) ||
+ Clipboard::HasFormat(SOT_FORMATSTR_ID_DRAWING) ||
+ Clipboard::HasFormat(Exchange::RegisterFormatName(aStrEditEngineFormat));
+ }
+ else
+ {
+ bOk = IsExchangeFormatSupported(nFormat);
+ }
+
+ return bOk;
+}
+
+BOOL SdrExchangeView::IsDragDropFormatSupported(ULONG nFormat, USHORT nItemNum) const
+{
+ BOOL bOk=FALSE;
+ USHORT i=nItemNum;
+ USHORT nMax=i;
+
+ if(i == SDR_ANYITEM)
+ {
+ i = 0;
+ nMax = DragServer::GetItemCount();
+ }
+ else
+ nMax++;
+
+ while(i < nMax && !bOk)
+ {
+ if(nFormat == SDR_ANYFORMAT)
+ {
+ String aStrEditEngineFormat("EditEngineFormat", gsl_getSystemTextEncoding());
+
+ bOk = DragServer::HasFormat(i, FORMAT_PRIVATE) ||
+ DragServer::HasFormat(i, FORMAT_GDIMETAFILE) ||
+ DragServer::HasFormat(i, FORMAT_BITMAP) ||
+ DragServer::HasFormat(i, FORMAT_RTF) ||
+ DragServer::HasFormat(i, FORMAT_STRING) ||
+ DragServer::HasFormat(i, SOT_FORMATSTR_ID_DRAWING) ||
+ DragServer::HasFormat(i, Exchange::RegisterFormatName(aStrEditEngineFormat));
+ }
+ else
+ {
+ bOk = IsExchangeFormatSupported(nFormat);
+ }
+
+ i++;
+ }
+
+ return bOk;
+}
+
+BOOL SdrExchangeView::IsExchangeFormatSupported(ULONG nFormat) const
+{
+ String aStrEditEngineFormat("EditEngineFormat", gsl_getSystemTextEncoding());
+ BOOL bOk(nFormat == FORMAT_PRIVATE ||
+ nFormat == FORMAT_GDIMETAFILE ||
+ nFormat == FORMAT_BITMAP ||
+ nFormat == FORMAT_RTF ||
+ nFormat == FORMAT_STRING ||
+ nFormat == SOT_FORMATSTR_ID_DRAWING ||
+ nFormat == Exchange::RegisterFormatName(aStrEditEngineFormat));
+ return bOk;
+}
+
+void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Point& rCenter, const Size& rSiz, const MapMode& rMap, UINT32 nOptions)
+{
+ BigInt nSizX(rSiz.Width());
+ BigInt nSizY(rSiz.Height());
+ MapUnit eSrcMU=rMap.GetMapUnit();
+ MapUnit eDstMU=pMod->GetScaleUnit();
+ FrPair aMapFact(GetMapFactor(eSrcMU,eDstMU));
+ Fraction aDstFr(pMod->GetScaleFraction());
+ nSizX*=aMapFact.X().GetNumerator();
+ nSizX*=rMap.GetScaleX().GetNumerator();
+ nSizX*=aDstFr.GetDenominator();
+ nSizX/=aMapFact.X().GetDenominator();
+ nSizX/=rMap.GetScaleX().GetDenominator();
+ nSizX/=aDstFr.GetNumerator();
+ nSizY*=aMapFact.Y().GetNumerator();
+ nSizY*=rMap.GetScaleY().GetNumerator();
+ nSizX*=aDstFr.GetDenominator();
+ nSizY/=aMapFact.Y().GetDenominator();
+ nSizY/=rMap.GetScaleY().GetDenominator();
+ nSizY/=aDstFr.GetNumerator();
+ long xs=nSizX;
+ long ys=nSizY;
+ Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2);
+ Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys);
+ pObj->SetLogicRect(aR);
+ SdrInsertReason aReason(SDRREASON_VIEWCALL);
+ rLst.InsertObject(pObj,CONTAINER_APPEND,&aReason);
+ AddUndo(new SdrUndoNewObj(*pObj));
+ SdrPageView* pMarkPV=NULL;
+ for (USHORT nv=0; nv<GetPageViewCount() && pMarkPV==NULL; nv++) {
+ SdrPageView* pPV=GetPageViewPvNum(nv);
+ if (pPV->GetObjList()==&rLst) pMarkPV=pPV;
+ }
+ BOOL bMark=pMarkPV!=NULL && !IsTextEdit() && (nOptions&SDRINSERT_DONTMARK)==0;
+ if (bMark) { // Obj in der ersten gefundenen PageView markieren
+ MarkObj(pObj,pMarkPV);
+ }
+}
+
+BOOL SdrExchangeView::ImpPaste(ULONG nFormat, BOOL bClp, USHORT nItemNum, const Point& rPos, UINT32 nOptions)
+{
+ BOOL bRet(FALSE);
+ String aStrEditEngineFormat("EditEngineFormat", gsl_getSystemTextEncoding());
+ UINT32 nSdrFormat(SOT_FORMATSTR_ID_DRAWING);
+ UINT32 nEEFormat(Exchange::RegisterFormatName(aStrEditEngineFormat));
+
+ // 1. Prioritaet fuer Private
+ if (!bRet && (nFormat==FORMAT_PRIVATE || nFormat==SDR_ANYFORMAT) &&
+ ((bClp && Clipboard::HasFormat(FORMAT_PRIVATE)) ||
+ (!bClp && DragServer::HasFormat(nItemNum,FORMAT_PRIVATE)))) {
+ SdrModel* pModel=(SdrModel*)DragServer::PastePrivateData(nItemNum);
+ if (bClp) pModel=(SdrModel*)Clipboard::PastePrivateData();
+ if (pModel!=NULL) {
+ bRet=Paste(*pModel,rPos,NULL,nOptions);
+ }
+ }
+ // 2. Prioritaet fuer SdrExchangeFormat
+ if (!bRet && (nFormat==nSdrFormat || nFormat==SDR_ANYFORMAT) &&
+ ((bClp && Clipboard::HasFormat(nSdrFormat)) ||
+ (!bClp && DragServer::HasFormat(nItemNum,nSdrFormat))))
+ {
+ UINT32 nDataLen(0);
+ char* pDataBuf = NULL;
+
+ if(bClp)
+ {
+ nDataLen = Clipboard::GetDataLen(nSdrFormat);
+
+ if(nDataLen)
+ {
+ pDataBuf = new char[nDataLen];
+ Clipboard::PasteData(pDataBuf, nDataLen, nSdrFormat);
+ }
+ }
+ else
+ {
+ nDataLen = DragServer::GetDataLen(nItemNum, nSdrFormat);
+
+ if(nDataLen)
+ {
+ pDataBuf = new char[nDataLen];
+ DragServer::PasteData(nItemNum, pDataBuf, nDataLen, nSdrFormat);
+ }
+ }
+
+ if(nDataLen)
+ {
+ SvMemoryStream aMemStream(pDataBuf, nDataLen, STREAM_READ);
+
+ aMemStream.SetVersion(SOFFICE_FILEFORMAT_NOW);
+
+ SdrModel* pModel = pMod->AllocModel();
+
+ pModel->SetStreamingSdrModel(TRUE);
+
+ // StyleSheetPool und Persist fehlt hier wohl noch ...
+ pModel->GetItemPool().Load(aMemStream);
+ aMemStream >> *pModel;
+ bRet = Paste(*pModel, rPos, NULL, nOptions);
+ }
+
+ if(pDataBuf != NULL)
+ delete [] pDataBuf;
+ }
+ // 3. Prioritaet fuer Metafile
+ if (!bRet && (nFormat==FORMAT_GDIMETAFILE || nFormat==SDR_ANYFORMAT) &&
+ ((bClp && Clipboard::HasFormat(FORMAT_GDIMETAFILE)) ||
+ (!bClp && DragServer::HasFormat(nItemNum,FORMAT_GDIMETAFILE)))) {
+ GDIMetaFile aMtf;
+ if (bClp) Clipboard::PasteGDIMetaFile(aMtf);
+ else DragServer::PasteGDIMetaFile(nItemNum,aMtf);
+ bRet=Paste(aMtf,rPos,NULL,nOptions);
+ }
+ // 4. Prioritaet fuer Bitmap
+ if (!bRet && (nFormat==FORMAT_BITMAP || nFormat==SDR_ANYFORMAT) &&
+ ((bClp && Clipboard::HasFormat(FORMAT_BITMAP)) ||
+ (!bClp && DragServer::HasFormat(nItemNum,FORMAT_BITMAP)))) {
+ Bitmap aBmp;
+ if (bClp) aBmp=Clipboard::PasteBitmap();
+ else aBmp=DragServer::PasteBitmap(nItemNum);
+ bRet=Paste(aBmp,rPos,NULL,nOptions);
+ }
+ // 5. Prioritaet fuer EditEngineFormat
+ if (!bRet && (nFormat==nEEFormat || nFormat==SDR_ANYFORMAT) &&
+ ((bClp && Clipboard::HasFormat(nEEFormat)) ||
+ (!bClp && DragServer::HasFormat(nItemNum,nEEFormat))))
+ {
+ UINT32 nDataLen(0);
+ char* pDataBuf = NULL;
+
+ if(bClp)
+ {
+ nDataLen = Clipboard::GetDataLen(nEEFormat);
+
+ if(nDataLen)
+ {
+ pDataBuf = new char[nDataLen];
+ Clipboard::PasteData(pDataBuf, nDataLen, nEEFormat);
+ }
+ }
+ else
+ {
+ nDataLen = DragServer::GetDataLen(nItemNum, nEEFormat);
+
+ if(nDataLen)
+ {
+ pDataBuf = new char[nDataLen];
+ DragServer::PasteData(nItemNum, pDataBuf, nDataLen, nEEFormat);
+ }
+ }
+
+ if(nDataLen)
+ {
+ SvMemoryStream aMemStream(pDataBuf, nDataLen, STREAM_READ);
+ bRet = Paste(aMemStream, UINT16(EE_FORMAT_BIN), rPos, NULL, nOptions);
+ }
+
+ if(pDataBuf)
+ delete [] pDataBuf;
+ }
+
+ // 6. Prioritaet fuer RTF
+ if (!bRet && (nFormat==FORMAT_RTF || nFormat==SDR_ANYFORMAT) &&
+ ((bClp && Clipboard::HasFormat(FORMAT_RTF)) ||
+ (!bClp && DragServer::HasFormat(nItemNum,FORMAT_RTF))))
+ {
+ UINT32 nDataLen(0);
+ char* pDataBuf = NULL;
+
+ if(bClp)
+ {
+ nDataLen = Clipboard::GetDataLen(FORMAT_RTF);
+
+ if(nDataLen)
+ {
+ pDataBuf = new char[nDataLen];
+ Clipboard::PasteData(pDataBuf, nDataLen, FORMAT_RTF);
+ }
+ }
+ else
+ {
+ nDataLen = DragServer::GetDataLen(nItemNum, FORMAT_RTF);
+
+ if(nDataLen)
+ {
+ pDataBuf = new char[nDataLen];
+ DragServer::PasteData(nItemNum, pDataBuf, nDataLen, FORMAT_RTF);
+ }
+ }
+
+ if(nDataLen)
+ {
+ SvMemoryStream aMemStream(pDataBuf, nDataLen, STREAM_READ);
+ bRet = Paste(aMemStream, UINT16(EE_FORMAT_RTF), rPos, NULL, nOptions);
+ }
+
+ if(pDataBuf)
+ delete [] pDataBuf;
+ }
+ // 7. Prioritaet fuer unformatierten Text
+ if (!bRet && (nFormat==FORMAT_STRING || nFormat==SDR_ANYFORMAT) &&
+ ((bClp && Clipboard::HasFormat(FORMAT_STRING)) ||
+ (!bClp && DragServer::HasFormat(nItemNum,FORMAT_STRING)))) {
+ XubString aStr;
+ if (bClp) aStr=Clipboard::PasteString();
+ else aStr=DragServer::PasteString(nItemNum);
+ bRet=Paste(aStr,rPos,NULL,nOptions);
+ }
+ return bRet;
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+Bitmap SdrExchangeView::GetMarkedObjBitmap( BOOL bNoVDevIfOneBmpMarked ) const
+{
+
+ Bitmap aBmp;
+
+ if( HasMarkedObj() )
+ {
+ if( bNoVDevIfOneBmpMarked )
+ {
+ SdrObject* pGrafObjTmp = aMark.GetMark( 0 )->GetObj();
+ SdrGrafObj* pGrafObj = ( aMark.GetMarkCount() == 1 ) ? PTR_CAST( SdrGrafObj, pGrafObjTmp ) : NULL;
+
+ if( pGrafObj && !pGrafObj->GetShearAngle() && ( pGrafObj->GetGraphicType() == GRAPHIC_BITMAP ) )
+ aBmp = pGrafObj->GetTransformedGraphic().GetBitmap();
+ }
+
+ if( !aBmp )
+ {
+ const Graphic aGraphic( GetMarkedObjMetaFile( bNoVDevIfOneBmpMarked ) );
+ aBmp = aGraphic.GetBitmap();
+ }
+ }
+
+ return aBmp;
+}
+
+// -----------------------------------------------------------------------------
+
+GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile( BOOL bNoVDevIfOneMtfMarked ) const
+{
+ GDIMetaFile aMtf;
+
+ if( HasMarkedObj() )
+ {
+ if( bNoVDevIfOneMtfMarked )
+ {
+ SdrObject* pGrafObjTmp = aMark.GetMark( 0 )->GetObj();
+ SdrGrafObj* pGrafObj = ( aMark.GetMarkCount() ==1 ) ? PTR_CAST( SdrGrafObj, pGrafObjTmp ) : NULL;
+
+ if( pGrafObj && !pGrafObj->GetShearAngle() && pGrafObj->GetGraphicType() == GRAPHIC_GDIMETAFILE )
+ aMtf = pGrafObj->GetTransformedGraphic().GetGDIMetaFile();
+ }
+
+ if( !aMtf.GetActionCount() )
+ {
+ VirtualDevice aOut;
+ Rectangle aBound( GetMarkedObjBoundRect() );
+ MapMode aMap( pMod->GetScaleUnit(), Point(),
+ pMod->GetScaleFraction(), pMod->GetScaleFraction() );
+
+ aOut.EnableOutput( FALSE );
+ aOut.SetMapMode( aMap );
+ aMtf.Clear();
+ aMtf.Record( &aOut );
+ DrawMarkedObj( aOut, aBound.TopLeft() );
+ aMtf.Stop();
+ aMtf.WindStart();
+
+ const Size aExtSize( aOut.PixelToLogic( Size( 0, 0 ) ) );
+ Size aBoundSize( aBound.GetWidth() + ( aExtSize.Width() ),
+ aBound.GetHeight() + ( aExtSize.Height() ) );
+
+ aMtf.SetPrefMapMode( aMap );
+ aMtf.SetPrefSize( aBoundSize );
+ }
+ }
+
+ return aMtf;
+}
+
+// -----------------------------------------------------------------------------
+
+void SdrExchangeView::DrawMarkedObj(OutputDevice& rOut, const Point& rOfs) const
+{
+ // Wenn das sortieren der MarkList mal stoeren sollte,
+ // werde ich sie mir wohl kopieren muessen.
+ ((SdrExchangeView*)this)->aMark.ForceSort();
+ // Hier kann noch optimiert werden ... (SetOffset)
+ pXOut->SetOutDev(&rOut);
+ SdrPaintInfoRec aInfoRec;
+ aInfoRec.nPaintMode|=SDRPAINTMODE_ANILIKEPRN;
+
+ for (ULONG nm=0; nm<aMark.GetMarkCount(); nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ Point aOfs(-rOfs.X(),-rOfs.Y());
+ aOfs+=pM->GetPageView()->GetOffset();
+ if (aOfs!=pXOut->GetOffset()) pXOut->SetOffset(aOfs);
+ pO->Paint(*pXOut,aInfoRec);
+ }
+ pXOut->SetOffset(Point(0,0));
+}
+
+SdrModel* SdrExchangeView::GetMarkedObjModel() const
+{
+ // Wenn das sortieren der MarkList mal stoeren sollte,
+ // werde ich sie mir wohl kopieren muessen.
+ ((SdrExchangeView*)this)->aMark.ForceSort();
+ SdrModel* pNeuMod=pMod->AllocModel();
+ SdrPage* pNeuPag=pNeuMod->AllocPage(FALSE);
+ pNeuMod->InsertPage(pNeuPag);
+ ULONG nCloneErrCnt=0;
+ ULONG nMarkAnz=aMark.GetMarkCount();
+ ULONG nm;
+ for (nm=0; nm<nMarkAnz; nm++) {
+ const SdrMark* pM=aMark.GetMark(nm);
+ const SdrObject* pObj=pM->GetObj();
+ SdrObject* pNeuObj=pObj->Clone(pNeuPag,pNeuMod);
+ if (pNeuObj!=NULL) {
+ Point aP(pM->GetPageView()->GetOffset());
+ if (aP.X()!=0 || aP.Y()!=0) pNeuObj->NbcMove(Size(aP.X(),aP.Y()));
+ SdrInsertReason aReason(SDRREASON_VIEWCALL);
+ pNeuPag->InsertObject(pNeuObj,CONTAINER_APPEND,&aReason);
+ } else {
+ nCloneErrCnt++;
+ }
+ }
+ // und nun zu den Konnektoren
+ // Die Objekte in pNeuPag werden auf die MarkList abgebildet
+ // und so die Objektverbindungen hergestellt.
+ // Aehnliche Implementation an folgenden Stellen:
+ // void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
+ // SdrModel* SdrExchangeView::GetMarkedObjModel() const
+ // BOOL SdrExchangeView::Paste(const SdrModel& rMod,...)
+ // void SdrEditView::CopyMarked()
+ if (nCloneErrCnt==0) {
+ for (nm=0; nm<nMarkAnz; nm++) {
+ SdrMark* pM=aMark.GetMark(nm);
+ SdrObject* pO=pM->GetObj();
+ SdrEdgeObj* pSrcEdge=PTR_CAST(SdrEdgeObj,pO);
+ if (pSrcEdge!=NULL) {
+ SdrObject* pSrcNode1=pSrcEdge->GetConnectedNode(TRUE);
+ SdrObject* pSrcNode2=pSrcEdge->GetConnectedNode(FALSE);
+ if (pSrcNode1!=NULL && pSrcNode1->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode1=NULL; // Listenuebergreifend
+ if (pSrcNode2!=NULL && pSrcNode2->GetObjList()!=pSrcEdge->GetObjList()) pSrcNode2=NULL; // ist (noch) nicht
+ if (pSrcNode1!=NULL || pSrcNode2!=NULL) {
+ SdrObject* pDstEdgeTmp=pNeuPag->GetObj(nm);
+ SdrEdgeObj* pDstEdge=PTR_CAST(SdrEdgeObj,pDstEdgeTmp);
+ if (pDstEdge!=NULL) {
+ if (pSrcNode1!=NULL) {
+ ULONG nDstNode1=((SdrMarkList*)&aMark)->FindObject(pSrcNode1);
+ SdrObject* pDstNode1=NULL;
+ if (nDstNode1!=CONTAINER_ENTRY_NOTFOUND) {
+ pDstNode1=pNeuPag->GetObj(nDstNode1);
+ }
+ if (pDstNode1!=NULL) { // Node war sonst wohl nicht markiert
+ pDstEdge->ConnectToNode(TRUE,pDstNode1);
+ }
+ }
+ if (pSrcNode2!=NULL) {
+ ULONG nDstNode2=((SdrMarkList*)&aMark)->FindObject(pSrcNode2);
+ SdrObject* pDstNode2=NULL;
+ if (nDstNode2!=CONTAINER_ENTRY_NOTFOUND) {
+ pDstNode2=pNeuPag->GetObj(nDstNode2);
+ }
+ if (pDstNode2!=NULL) { // Node war sonst wohl nicht markiert
+ pDstEdge->ConnectToNode(FALSE,pDstNode2);
+ }
+ }
+ } else {
+ DBG_ERROR("SdrExchangeView::GetMarkedObjModel(): pDstEdge==NULL!");
+ }
+ }
+ }
+ }
+ } else {
+#ifdef DBG_UTIL
+ ByteString aStr("SdrExchangeView::GetMarkedObjModel(): Fehler beim Clonen ");
+
+ if(nCloneErrCnt == 1)
+ {
+ aStr += "eines Zeichenobjekts.";
+ }
+ else
+ {
+ aStr += "von ";
+ aStr += nCloneErrCnt;
+ aStr += " Zeichenobjekten.";
+ }
+
+ aStr += " Objektverbindungen werden nicht mitkopiert.";
+
+ DBG_ERROR(aStr.GetBuffer());
+#endif
+ }
+ return pNeuMod;
+}
+
+BOOL SdrExchangeView::Cut(ULONG nFormat)
+{
+ BOOL bOk=SdrObjEditView::Cut(nFormat);
+ if (!bOk && HasMarkedObj()) {
+ CutMarked(nFormat);
+ bOk=TRUE;
+ }
+ return bOk;
+}
+
+BOOL SdrExchangeView::Yank(ULONG nFormat)
+{
+ BOOL bOk=SdrObjEditView::Yank(nFormat);
+ if (!bOk && HasMarkedObj()) {
+ YankMarked(nFormat);
+ bOk=TRUE;
+ }
+ return bOk;
+}
+
+BOOL SdrExchangeView::Paste(Window* pWin, ULONG nFormat)
+{
+ BOOL bOk=SdrObjEditView::Paste(pWin,nFormat);
+ if (!bOk) bOk=PasteClipboard(pWin,nFormat);
+ return bOk;
+}
+
+BOOL SdrExchangeView::QueryDrop(DropEvent& rDEvt, Window* pWin, ULONG nFormat, USHORT nItemNum)
+{
+ BOOL bOk(FALSE);
+
+ if(!bOk)
+ {
+ if(GetDragMode() == SDRDRAG_GRADIENT || GetDragMode() == SDRDRAG_TRANSPARENCE)
+ {
+ const SdrHdlList& rHdlList = GetHdlList();
+
+ for(UINT32 a=0;a<rHdlList.GetHdlCount();a++)
+ {
+ SdrHdl* pIAOHandle = rHdlList.GetHdl(a);
+
+ if(pIAOHandle && pIAOHandle->GetKind() == HDL_COLR)
+ {
+ // what was hit?
+ const B2dIAOGroup& rIAOGroup = pIAOHandle->GetIAOGroup();
+
+ if(rIAOGroup.IsHit(rDEvt.GetPosPixel()))
+ {
+ bOk = TRUE;
+ ((SdrHdlColor*)pIAOHandle)->SetSize(SDR_HANDLE_COLOR_SIZE_SELECTED);
+ }
+ else
+ {
+ ((SdrHdlColor*)pIAOHandle)->SetSize(SDR_HANDLE_COLOR_SIZE_NORMAL);
+ }
+ }
+ }
+
+ // refresh IAO display
+ RefreshAllIAOManagers();
+ }
+ }
+
+ return bOk;
+}
+
+BOOL SdrExchangeView::Drop(const DropEvent& rDEvt, Window* pWin, ULONG nFormat, USHORT nItemNum)
+{
+ BOOL bOk(FALSE);
+
+#ifndef SVX_LIGHT
+ if(!bOk)
+ {
+ if(GetDragMode() == SDRDRAG_GRADIENT || GetDragMode() == SDRDRAG_TRANSPARENCE)
+ {
+ const SdrHdlList& rHdlList = GetHdlList();
+
+ for(UINT32 a=0;!bOk && a<rHdlList.GetHdlCount();a++)
+ {
+ SdrHdl* pIAOHandle = rHdlList.GetHdl(a);
+
+ if(pIAOHandle && pIAOHandle->GetKind() == HDL_COLR)
+ {
+ // what was hit?
+ const B2dIAOGroup& rIAOGroup = pIAOHandle->GetIAOGroup();
+
+ if(rIAOGroup.IsHit(rDEvt.GetPosPixel()))
+ {
+ SvData aData(SOT_FORMATSTR_ID_XFA);
+ XFillExchangeData* pFillData = NULL;
+ SvDataObjectRef pDataObj = SvDataObject::PasteDragServer(rDEvt);
+ const SvDataTypeList& rTypeList = pDataObj->GetTypeList();
+
+ if(rTypeList.Get(SOT_FORMATSTR_ID_XFA) || nFormat == SDR_ANYFORMAT)
+ {
+ if(pDataObj->GetData(&aData))
+ {
+ if(aData.GetData((SvDataCopyStream**)&pFillData, XFillExchangeData::StaticType(), TRANSFER_MOVE))
+ {
+ XFillAttrSetItem* pSetItem = pFillData->GetXFillAttrSetItem();
+ SfxItemSet rSet = pSetItem->GetItemSet();
+ const XFillColorItem& rColItem = (XFillColorItem&)rSet.Get(XATTR_FILLCOLOR);
+ Color aColor = rColItem.GetValue();
+
+ ((SdrHdlColor*)pIAOHandle)->SetColor(aColor, TRUE);
+
+ bOk = TRUE;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+#endif // SVX_LIGHT
+ return bOk;
+}
+
diff --git a/svx/source/svrtf/makefile.mk b/svx/source/svrtf/makefile.mk
new file mode 100644
index 0000000000..2e3d2d3bbd
--- /dev/null
+++ b/svx/source/svrtf/makefile.mk
@@ -0,0 +1,103 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PROJECTPCH=svxpch
+PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
+
+PRJNAME=svx
+TARGET=svxrtf
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+.IF "$(header)" == ""
+
+CXXFILES = \
+ rtfgrf.cxx \
+ rtfitem.cxx \
+ svxrtf.cxx
+
+SLOFILES = \
+ $(SLO)$/rtfgrf.obj \
+ $(SLO)$/rtfitem.obj \
+ $(SLO)$/svxrtf.obj
+
+.IF "$(GUI)" == "WIN"
+SLOFILES += \
+ $(SLO)$/segincr.obj
+.ENDIF
+
+.ENDIF
+
+# ==========================================================================
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/svrtf/rtfgrf.cxx b/svx/source/svrtf/rtfgrf.cxx
new file mode 100644
index 0000000000..eddc64c849
--- /dev/null
+++ b/svx/source/svrtf/rtfgrf.cxx
@@ -0,0 +1,571 @@
+/*************************************************************************
+ *
+ * $RCSfile: rtfgrf.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _CACHESTR_HXX //autogen
+#include <tools/cachestr.hxx>
+#endif
+#ifndef _SV_GRAPH_HXX //autogen
+#include <vcl/graph.hxx>
+#endif
+#ifndef _RTFKEYWD_HXX
+#include <svtools/rtfkeywd.hxx>
+#endif
+#ifndef _RTFTOKEN_H
+#include <svtools/rtftoken.h>
+#endif
+#ifndef _FILTER_HXX //autogen
+#include <svtools/filter.hxx>
+#endif
+
+#include "impgrf.hxx"
+#include "svxrtf.hxx"
+
+
+#ifdef PRODUCT
+#undef DEBUG_JP
+#endif
+
+#ifdef DEBUG_JP
+
+#include <tools/fsys.hxx>
+
+class GrfWindow : public WorkWindow
+{
+ Graphic aGrf;
+public:
+ GrfWindow( const Graphic& rGrf );
+ virtual void Paint( const Rectangle& rRect );
+};
+
+GrfWindow::GrfWindow( const Graphic& rGrf )
+ : WorkWindow( GetpApp()->GetAppWindow() ),
+ aGrf( rGrf )
+{
+ SetPosSizePixel( Point( 100, 0 ), Size( 300, 300 ));
+ Show();
+ Invalidate();
+ Update();
+}
+
+void GrfWindow::Paint( const Rectangle& )
+{
+ aGrf.Draw( this, Point(0,0), GetSizePixel() );
+}
+#endif
+
+static BYTE __FAR_DATA aPal1[ 2 * 4 ] = {
+ 0x00, 0x00, 0x00, 0x00, // Schwarz
+ 0xFF, 0xFF, 0xFF, 0x00 // Weiss
+};
+
+static BYTE __FAR_DATA aPal4[ 16 * 4 ] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x00,
+ 0x80, 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x00,
+ 0x80, 0x00, 0x80, 0x00,
+ 0x00, 0x80, 0x80, 0x00,
+ 0x80, 0x80, 0x80, 0x00,
+ 0xC0, 0xC0, 0xC0, 0x00,
+ 0xFF, 0x00, 0x00, 0x00,
+ 0x00, 0xFF, 0x00, 0x00,
+ 0xFF, 0xFF, 0x00, 0x00,
+ 0x00, 0x00, 0xFF, 0x00,
+ 0xFF, 0x00, 0xFF, 0x00,
+ 0x00, 0xFF, 0xFF, 0x00,
+ 0xFF, 0xFF, 0xFF, 0x00
+};
+
+static BYTE __FAR_DATA aPal8[ 256 * 4 ] =
+{
+0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00,
+0x80, 0x92, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x00, 0x80, 0x00, 0xAA, 0x00,
+0x00, 0x92, 0xAA, 0x00, 0xC1, 0xC1, 0xC1, 0x00, 0xC9, 0xC9, 0xC9, 0x00,
+0xAA, 0xDB, 0xFF, 0x00, 0x00, 0x49, 0xAA, 0x00, 0x00, 0x49, 0xFF, 0x00,
+0x00, 0x6D, 0x00, 0x00, 0x00, 0x6D, 0x55, 0x00, 0x00, 0x6D, 0xAA, 0x00,
+0x00, 0x6D, 0xFF, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x92, 0x55, 0x00,
+0x00, 0x24, 0xAA, 0x00, 0x00, 0x92, 0xFF, 0x00, 0x00, 0xB6, 0x00, 0x00,
+0x00, 0xB6, 0x55, 0x00, 0x00, 0xB6, 0xAA, 0x00, 0x00, 0xB6, 0xFF, 0x00,
+0x00, 0xDB, 0x00, 0x00, 0x00, 0xDB, 0x55, 0x00, 0x00, 0xDB, 0xAA, 0x00,
+0x00, 0xDB, 0xFF, 0x00, 0xFF, 0xDB, 0xAA, 0x00, 0x00, 0xFF, 0x55, 0x00,
+0x00, 0xFF, 0xAA, 0x00, 0xFF, 0xFF, 0xAA, 0x00, 0x2B, 0x00, 0x00, 0x00,
+0x2B, 0x00, 0x55, 0x00, 0x2B, 0x00, 0xAA, 0x00, 0x2B, 0x00, 0xFF, 0x00,
+0x2B, 0x24, 0x00, 0x00, 0x2B, 0x24, 0x55, 0x00, 0x2B, 0x24, 0xAA, 0x00,
+0x2B, 0x24, 0xFF, 0x00, 0x2B, 0x49, 0x00, 0x00, 0x2B, 0x49, 0x55, 0x00,
+0x2B, 0x49, 0xAA, 0x00, 0x2B, 0x49, 0xFF, 0x00, 0x2B, 0x6D, 0x00, 0x00,
+0x2B, 0x6D, 0x55, 0x00, 0x2B, 0x6D, 0xAA, 0x00, 0x2B, 0x6D, 0xFF, 0x00,
+0x2B, 0x92, 0x00, 0x00, 0x2B, 0x92, 0x55, 0x00, 0x2B, 0x92, 0xAA, 0x00,
+0x2B, 0x92, 0xFF, 0x00, 0x2B, 0xB6, 0x00, 0x00, 0x2B, 0xB6, 0x55, 0x00,
+0x2B, 0xB6, 0xAA, 0x00, 0x2B, 0xB6, 0xFF, 0x00, 0x2B, 0xDB, 0x00, 0x00,
+0x2B, 0xDB, 0x55, 0x00, 0x2B, 0xDB, 0xAA, 0x00, 0x2B, 0xDB, 0xFF, 0x00,
+0x2B, 0xFF, 0x00, 0x00, 0x2B, 0xFF, 0x55, 0x00, 0x2B, 0xFF, 0xAA, 0x00,
+0x2B, 0xFF, 0xFF, 0x00, 0x55, 0x00, 0x00, 0x00, 0x55, 0x00, 0x55, 0x00,
+0x55, 0x00, 0xAA, 0x00, 0x55, 0x00, 0xFF, 0x00, 0x55, 0x24, 0x00, 0x00,
+0x55, 0x24, 0x55, 0x00, 0x55, 0x24, 0xAA, 0x00, 0x55, 0x24, 0xFF, 0x00,
+0x55, 0x49, 0x00, 0x00, 0x55, 0x49, 0x55, 0x00, 0x55, 0x49, 0xAA, 0x00,
+0x55, 0x49, 0xFF, 0x00, 0x55, 0x6D, 0x00, 0x00, 0x55, 0x6D, 0x55, 0x00,
+0x55, 0x6D, 0xAA, 0x00, 0x55, 0x6D, 0xFF, 0x00, 0x55, 0x92, 0x00, 0x00,
+0x55, 0x92, 0x55, 0x00, 0x55, 0x92, 0xAA, 0x00, 0x55, 0x92, 0xFF, 0x00,
+0x55, 0xB6, 0x00, 0x00, 0x55, 0xB6, 0x55, 0x00, 0x55, 0xB6, 0xAA, 0x00,
+0x55, 0xB6, 0xFF, 0x00, 0x55, 0xDB, 0x00, 0x00, 0x55, 0xDB, 0x55, 0x00,
+0x55, 0xDB, 0xAA, 0x00, 0x55, 0xDB, 0xFF, 0x00, 0x55, 0xFF, 0x00, 0x00,
+0x55, 0xFF, 0x55, 0x00, 0x55, 0xFF, 0xAA, 0x00, 0x55, 0xFF, 0xFF, 0x00,
+0x00, 0x00, 0x55, 0x00, 0x80, 0x00, 0x55, 0x00, 0x00, 0x24, 0x55, 0x00,
+0x80, 0x00, 0xFF, 0x00, 0x80, 0x24, 0x00, 0x00, 0x80, 0x24, 0x55, 0x00,
+0x80, 0x24, 0xAA, 0x00, 0x80, 0x24, 0xFF, 0x00, 0x80, 0x49, 0x00, 0x00,
+0x80, 0x49, 0x55, 0x00, 0x80, 0x49, 0xAA, 0x00, 0x80, 0x49, 0xFF, 0x00,
+0x80, 0x6D, 0x00, 0x00, 0x80, 0x6D, 0x55, 0x00, 0x80, 0x6D, 0xAA, 0x00,
+0x80, 0x6D, 0xFF, 0x00, 0x08, 0x08, 0x08, 0x00, 0x0F, 0x0F, 0x0F, 0x00,
+0x17, 0x17, 0x17, 0x00, 0x1F, 0x1F, 0x1F, 0x00, 0x27, 0x27, 0x27, 0x00,
+0x2E, 0x2E, 0x2E, 0x00, 0x36, 0x36, 0x36, 0x00, 0x3E, 0x3E, 0x3E, 0x00,
+0x46, 0x46, 0x46, 0x00, 0x4D, 0x4D, 0x4D, 0x00, 0x55, 0x55, 0x55, 0x00,
+0x5D, 0x5D, 0x5D, 0x00, 0x64, 0x64, 0x64, 0x00, 0x6C, 0x6C, 0x6C, 0x00,
+0x74, 0x74, 0x74, 0x00, 0x7C, 0x7C, 0x7C, 0x00, 0xFF, 0xDB, 0x00, 0x00,
+0x8B, 0x8B, 0x8B, 0x00, 0x93, 0x93, 0x93, 0x00, 0x9B, 0x9B, 0x9B, 0x00,
+0xFF, 0xB6, 0xFF, 0x00, 0xAA, 0xAA, 0xAA, 0x00, 0xB2, 0xB2, 0xB2, 0x00,
+0xB9, 0xB9, 0xB9, 0x00, 0x00, 0x24, 0xFF, 0x00, 0x00, 0x49, 0x00, 0x00,
+0xD1, 0xD1, 0xD1, 0x00, 0xD8, 0xD8, 0xD8, 0x00, 0xE0, 0xE0, 0xE0, 0x00,
+0xE8, 0xE8, 0xE8, 0x00, 0xF0, 0xF0, 0xF0, 0x00, 0xFF, 0xB6, 0xAA, 0x00,
+0xFF, 0xDB, 0xFF, 0x00, 0x80, 0x92, 0x55, 0x00, 0x80, 0x92, 0xAA, 0x00,
+0x80, 0x92, 0xFF, 0x00, 0x80, 0xB6, 0x00, 0x00, 0x80, 0xB6, 0x55, 0x00,
+0x80, 0xB6, 0xAA, 0x00, 0x80, 0xB6, 0xFF, 0x00, 0x80, 0xDB, 0x00, 0x00,
+0x80, 0xDB, 0x55, 0x00, 0x80, 0xDB, 0xAA, 0x00, 0x80, 0xDB, 0xFF, 0x00,
+0x80, 0xFF, 0x00, 0x00, 0x80, 0xFF, 0x55, 0x00, 0x80, 0xFF, 0xAA, 0x00,
+0x80, 0xFF, 0xFF, 0x00, 0xAA, 0x00, 0x00, 0x00, 0xAA, 0x00, 0x55, 0x00,
+0xAA, 0x00, 0xAA, 0x00, 0xAA, 0x00, 0xFF, 0x00, 0xAA, 0x24, 0x00, 0x00,
+0xAA, 0x24, 0x55, 0x00, 0xAA, 0x24, 0xAA, 0x00, 0xAA, 0x24, 0xFF, 0x00,
+0xAA, 0x49, 0x00, 0x00, 0xAA, 0x49, 0x55, 0x00, 0xAA, 0x49, 0xAA, 0x00,
+0xAA, 0x49, 0xFF, 0x00, 0xAA, 0x6D, 0x00, 0x00, 0xAA, 0x6D, 0x55, 0x00,
+0xAA, 0x6D, 0xAA, 0x00, 0xAA, 0x6D, 0xFF, 0x00, 0xAA, 0x92, 0x00, 0x00,
+0xAA, 0x92, 0x55, 0x00, 0xAA, 0x92, 0xAA, 0x00, 0xAA, 0x92, 0xFF, 0x00,
+0xAA, 0xB6, 0x00, 0x00, 0xAA, 0xB6, 0x55, 0x00, 0xAA, 0xB6, 0xAA, 0x00,
+0xAA, 0xB6, 0xFF, 0x00, 0xAA, 0xDB, 0x00, 0x00, 0xAA, 0xDB, 0x55, 0x00,
+0xAA, 0xDB, 0xAA, 0x00, 0x00, 0x49, 0x55, 0x00, 0xAA, 0xFF, 0x00, 0x00,
+0xAA, 0xFF, 0x55, 0x00, 0xAA, 0xFF, 0xAA, 0x00, 0xAA, 0xFF, 0xFF, 0x00,
+0xD5, 0x00, 0x00, 0x00, 0xD5, 0x00, 0x55, 0x00, 0xD5, 0x00, 0xAA, 0x00,
+0xD5, 0x00, 0xFF, 0x00, 0xD5, 0x24, 0x00, 0x00, 0xD5, 0x24, 0x55, 0x00,
+0xD5, 0x24, 0xAA, 0x00, 0xD5, 0x24, 0xFF, 0x00, 0xD5, 0x49, 0x00, 0x00,
+0xD5, 0x49, 0x55, 0x00, 0xD5, 0x49, 0xAA, 0x00, 0xD5, 0x49, 0xFF, 0x00,
+0xD5, 0x6D, 0x00, 0x00, 0xD5, 0x6D, 0x55, 0x00, 0xD5, 0x6D, 0xAA, 0x00,
+0xD5, 0x6D, 0xFF, 0x00, 0xD5, 0x92, 0x00, 0x00, 0xD5, 0x92, 0x55, 0x00,
+0xD5, 0x92, 0xAA, 0x00, 0xD5, 0x92, 0xFF, 0x00, 0xD5, 0xB6, 0x00, 0x00,
+0xD5, 0xB6, 0x55, 0x00, 0xD5, 0xB6, 0xAA, 0x00, 0xD5, 0xB6, 0xFF, 0x00,
+0xD5, 0xDB, 0x00, 0x00, 0xD5, 0xDB, 0x55, 0x00, 0xD5, 0xDB, 0xAA, 0x00,
+0xD5, 0xDB, 0xFF, 0x00, 0xD5, 0xFF, 0x00, 0x00, 0xD5, 0xFF, 0x55, 0x00,
+0xD5, 0xFF, 0xAA, 0x00, 0xD5, 0xFF, 0xFF, 0x00, 0xFF, 0xDB, 0x55, 0x00,
+0xFF, 0x00, 0x55, 0x00, 0xFF, 0x00, 0xAA, 0x00, 0xFF, 0xFF, 0x55, 0x00,
+0xFF, 0x24, 0x00, 0x00, 0xFF, 0x24, 0x55, 0x00, 0xFF, 0x24, 0xAA, 0x00,
+0xFF, 0x24, 0xFF, 0x00, 0xFF, 0x49, 0x00, 0x00, 0xFF, 0x49, 0x55, 0x00,
+0xFF, 0x49, 0xAA, 0x00, 0xFF, 0x49, 0xFF, 0x00, 0xFF, 0x6D, 0x00, 0x00,
+0xFF, 0x6D, 0x55, 0x00, 0xFF, 0x6D, 0xAA, 0x00, 0xFF, 0x6D, 0xFF, 0x00,
+0xFF, 0x92, 0x00, 0x00, 0xFF, 0x92, 0x55, 0x00, 0xFF, 0x92, 0xAA, 0x00,
+0xFF, 0x92, 0xFF, 0x00, 0xFF, 0xB6, 0x00, 0x00, 0xFF, 0xB6, 0x55, 0x00,
+0xF7, 0xF7, 0xF7, 0x00, 0xA2, 0xA2, 0xA2, 0x00, 0x83, 0x83, 0x83, 0x00,
+0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
+0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00,
+0xFF, 0xFF, 0xFF, 0x00
+};
+
+
+/* */
+
+
+inline long SwapLong( long n )
+{
+#ifndef __LITTLEENDIAN
+ return SWAPLONG( n );
+#else
+ return n;
+#endif
+}
+
+inline short SwapShort( short n )
+{
+#ifndef __LITTLEENDIAN
+ return SWAPSHORT( n );
+#else
+ return n;
+#endif
+}
+
+
+static void WriteBMPHeader( SvStream& rStream,
+ const SvxRTFPictureType& rPicType )
+{
+ ULONG n4Width = rPicType.nWidth;
+ ULONG n4Height = rPicType.nHeight;
+ USHORT n4ColBits = rPicType.nBitsPerPixel;
+
+ USHORT nColors = (1 << n4ColBits); // Anzahl der Farben ( 1, 16, 256 )
+ USHORT nWdtOut = rPicType.nWidthBytes;
+ if( !nWdtOut )
+ nWdtOut = (USHORT)((( n4Width * n4ColBits + 31 ) / 32 ) * 4 );
+
+ long nOffset = 14 + 40; // BMP_FILE_HD_SIZ + sizeof(*pBmpInfo);
+ if( 256 >= nColors )
+ nOffset += nColors * 4;
+ long nSize = nOffset + nWdtOut * n4Height;
+ rStream << "BM" // = "BM"
+ << SwapLong(nSize) // Filesize in Bytes
+ << SwapShort(0) // Reserviert
+ << SwapShort(0) // Reserviert
+ << SwapLong(nOffset); // Offset?
+
+ rStream << SwapLong(40) // sizeof( BmpInfo )
+ << SwapLong(n4Width)
+ << SwapLong(n4Height)
+ << (USHORT)1
+ << n4ColBits
+ << SwapLong(0)
+ << SwapLong(0)
+ << SwapLong( rPicType.nGoalWidth
+ ? rPicType.nGoalWidth * 1000L / 254L
+ : 0 ) // DPI in Pixel per Meter
+ << SwapLong( rPicType.nGoalHeight
+ ? rPicType.nGoalHeight * 1000L / 254L // dito
+ : 0 )
+ << SwapLong(0)
+ << SwapLong(0);
+
+
+ switch( rPicType.nBitsPerPixel )
+ {
+ case 1: rStream.Write( aPal1, sizeof( aPal1 )); break;
+ case 4: rStream.Write( aPal4, sizeof( aPal4 )); break;
+ case 8: rStream.Write( aPal8, sizeof( aPal8 )); break;
+ }
+}
+
+/* */
+
+ // 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 SvxRTFParser::HexToBin( String& rToken )
+{
+ // dann mache aus den Hex-Werten mal "Binare Daten"
+ // (missbrauche den String als temp Buffer)
+ if( rToken.Len() & 1 ) // ungerade Anzahl, mit 0 auffuellen
+ rToken += '0';
+
+ xub_StrLen n, nLen;
+ sal_Unicode nVal;
+ BOOL bValidData = TRUE;
+ const sal_Unicode* pStr = rToken.GetBufferAccess();
+ sal_Char* pData = (sal_Char*)pStr;
+ for( n = 0, nLen = rToken.Len(); n < nLen; ++n, ++pStr )
+ {
+ if( ((nVal = *pStr) >= '0') && ( nVal <= '9') )
+ nVal -= '0';
+ else if( (nVal >= 'A') && (nVal <= 'F') )
+ nVal -= 'A' - 10;
+ else if( (nVal >= 'a') && (nVal <= 'f') )
+ nVal -= 'a' - 10;
+ else
+ {
+ DBG_ASSERT( !this, "ungueltiger Hex-Wert" );
+ bValidData = FALSE;
+ break;
+ }
+
+ if( n & 1 )
+ *(pData++) |= nVal & 0x0f;
+ else
+ *(pData) = ( nVal << 4 ) & 0xf0;
+ }
+ return bValidData ? nLen / 4 : STRING_NOTFOUND;
+}
+
+BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
+{
+ // die alten Daten loeschen
+ rGrf.Clear();
+ ULONG nBmpSize = 0;
+
+ rtl_TextEncoding eOldEnc = GetSrcEncoding();
+ SetSrcEncoding( RTL_TEXTENCODING_MS_1252 );
+
+ String sFilter;
+ SvCacheStream* pTmpFile = 0;
+
+ int nToken, bValidBmp = TRUE, bFirstTextToken = TRUE;
+ int nOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
+
+ while( nOpenBrakets && IsParserWorking() && bValidBmp )
+ {
+ nToken = GetNextToken();
+ USHORT nVal = USHORT( nTokenValue );
+ switch( nToken )
+ {
+ case '}': --nOpenBrakets; break;
+ case '{':
+ {
+ if( RTF_IGNOREFLAG != GetNextToken() )
+ nToken = SkipToken( -1 );
+ else if( RTF_UNKNOWNCONTROL != GetNextToken() )
+ nToken = SkipToken( -2 );
+ else
+ {
+ // gleich herausfiltern
+ ReadUnknownData();
+ nToken = GetNextToken();
+ if( '}' != nToken )
+ eState = SVPAR_ERROR;
+ break;
+ }
+ ++nOpenBrakets;
+ }
+ break;
+
+ case RTF_WBITMAP:
+ rPicType.eStyle = SvxRTFPictureType::RTF_BITMAP;
+ rPicType.nType = nVal;
+ pTmpFile = new SvCacheStream;
+ break;
+
+ case RTF_WMETAFILE:
+ rPicType.eStyle = SvxRTFPictureType::WIN_METAFILE;
+ rPicType.nType = nVal;
+ // WinMetaFile ueber Grafik-Filter einlesen
+ pTmpFile = new SvCacheStream;
+ sFilter.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "WMF" ));
+ break;
+
+ case RTF_MACPICT:
+ {
+ rPicType.eStyle = SvxRTFPictureType::MAC_QUICKDRAW;
+ // Mac-Pict bekommt einen leeren Header voran
+ pTmpFile = new SvCacheStream;
+ ByteString aStr;
+ aStr.Fill( 512, '\0' );
+ pTmpFile->Write( aStr.GetBuffer(), aStr.Len() );
+ sFilter.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "PCT" ));
+ }
+ break;
+
+ case RTF_OSMETAFILE:
+ rPicType.eStyle = SvxRTFPictureType::OS2_METAFILE;
+ rPicType.nType = nVal;
+ pTmpFile = new SvCacheStream;
+ break;
+
+ case RTF_DIBITMAP:
+ rPicType.eStyle = SvxRTFPictureType::RTF_DI_BMP;
+ rPicType.nType = nVal;
+ pTmpFile = new SvCacheStream;
+ break;
+
+ case RTF_PICW: rPicType.nWidth = nVal; break;
+ case RTF_PICH: rPicType.nHeight = nVal; break;
+ case RTF_WBMBITSPIXEL: rPicType.nBitsPerPixel = nVal; break;
+ case RTF_WBMPLANES: rPicType.nPlanes = nVal; break;
+ case RTF_WBMWIDTHBYTES: rPicType.nWidthBytes = nVal; break;
+ case RTF_PICWGOAL: rPicType.nGoalWidth = nVal; break;
+ case RTF_PICHGOAL: rPicType.nGoalHeight = nVal; break;
+ case RTF_BIN: rPicType.nMode = SvxRTFPictureType::BINARY_MODE;
+ rPicType.uPicLen = nVal;
+ break;
+ case RTF_PICSCALEX: rPicType.nScalX = nVal; break;
+ case RTF_PICSCALEY: rPicType.nScalY = nVal; break;
+ case RTF_PICSCALED: break;
+
+ case RTF_PICCROPT: rPicType.nCropT = (short)nTokenValue; break;
+ case RTF_PICCROPB: rPicType.nCropB = (short)nTokenValue; break;
+ case RTF_PICCROPL: rPicType.nCropL = (short)nTokenValue; break;
+ case RTF_PICCROPR: rPicType.nCropR = (short)nTokenValue; break;
+
+ case RTF_TEXTTOKEN:
+ // JP 26.06.98: Bug #51719# - nur TextToken auf 1. Ebene
+ // auswerten. Alle anderen sind irgendwelche
+ // nicht auszuwertende Daten
+ if( 1 != nOpenBrakets )
+ break;
+
+ if( bFirstTextToken )
+ {
+ switch( rPicType.eStyle )
+ {
+ case SvxRTFPictureType::RTF_BITMAP:
+ // erstmal die Header und Info-Struktur schreiben
+ if( pTmpFile )
+ ::WriteBMPHeader( *pTmpFile, rPicType );
+ break;
+ }
+ bFirstTextToken = FALSE;
+ }
+
+ if( pTmpFile && SvxRTFPictureType::HEX_MODE == rPicType.nMode )
+ {
+ xub_StrLen nTokenLen = HexToBin( aToken );
+ if( STRING_NOTFOUND == nTokenLen )
+ bValidBmp = FALSE;
+ else
+ {
+ pTmpFile->Write( (sal_Char*)aToken.GetBuffer(),
+ nTokenLen );
+ bValidBmp = 0 == pTmpFile->GetError();
+ }
+ }
+ break;
+ }
+ }
+
+ if( pTmpFile )
+ {
+ if( bValidBmp )
+ {
+ GraphicFilter* pGF = ::GetGrfFilter();
+ USHORT nImportFilter = GRFILTER_FORMAT_DONTKNOW;
+
+ if( sFilter.Len() )
+ {
+ for( USHORT n = pGF->GetImportFormatCount(); n; )
+ {
+ String sTmp( pGF->GetImportFormatShortName( --n ) );
+ if( sTmp == sFilter )
+ {
+ nImportFilter = n;
+ break;
+ }
+ }
+ }
+
+ String sTmpStr;
+ pTmpFile->Seek( STREAM_SEEK_TO_BEGIN );
+ bValidBmp = 0 == pGF->ImportGraphic( rGrf, sTmpStr, *pTmpFile,
+ nImportFilter );
+/* if( bValidBmp )
+ {
+ MapMode aMapMode;
+ Size aSz;
+
+ if( rPicType.nGoalWidth && rPicType.nGoalHeight )
+ {
+ aMapMode.SetMapUnit( MAP_TWIP );
+ aSz.Width() = rPicType.nGoalWidth;
+ aSz.Height() = rPicType.nGoalHeight;
+ }
+ else
+ {
+ aMapMode.SetMapUnit( MAP_100TH_MM );
+ aSz.Width() = rPicType.nWidth;
+ aSz.Height() = rPicType.nHeight;
+ }
+ switch( rPicType.eStyle )
+ {
+ case SvxRTFPictureType::WIN_METAFILE:
+ {
+ GDIMetaFile aMTF( rGrf.GetGDIMetaFile() );
+ aMTF.SetPrefMapMode( aMapMode );
+ aMTF.SetPrefSize( aSz );
+ Fraction aScale( 1, 1 );
+ aMTF.Scale( aScale, aScale );
+ rGrf = Graphic( aMTF );
+ }
+ break;
+ case SvxRTFPictureType::RTF_BITMAP:
+ {
+ Bitmap aBmp( rGrf.GetBitmap() );
+ aBmp.SetPrefMapMode( aMapMode );
+ aBmp.SetPrefSize( aSz );
+ rGrf = Graphic( aBmp );
+ }
+ break;
+ }
+ }
+*/
+ }
+ delete pTmpFile;
+ }
+
+ if( !bValidBmp )
+ {
+ rGrf.Clear();
+ if( '}' != nToken )
+ SkipGroup();
+ }
+#ifdef DEBUG_JP
+ else
+ new GrfWindow( rGrf );
+#endif
+
+ SetSrcEncoding( eOldEnc );
+
+ SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
+ return bValidBmp;
+}
+
+ // alle Werte auf default; wird nach einlesen der Bitmap aufgerufen !
+void SvxRTFPictureType::ResetValues()
+{ // setze alle Werte RTF-Defaults
+ eStyle = RTF_BITMAP;
+ nMode = HEX_MODE;
+ nType = nGoalWidth = nGoalHeight = 0;
+ nWidth = nHeight = uPicLen = nWidthBytes = 0;
+ nBitsPerPixel = nPlanes = 1;
+ nScalX = nScalY = 100; // Skalierung in Prozent
+ nCropT = nCropB = nCropL = nCropR = 0;
+}
+
+
diff --git a/svx/source/svrtf/rtfitem.cxx b/svx/source/svrtf/rtfitem.cxx
new file mode 100644
index 0000000000..a8e88f4d72
--- /dev/null
+++ b/svx/source/svrtf/rtfitem.cxx
@@ -0,0 +1,1606 @@
+/*************************************************************************
+ *
+ * $RCSfile: rtfitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+
+#define ITEMID_FONTLIST 0
+#define ITEMID_FONT 0
+#define ITEMID_POSTURE 0
+#define ITEMID_WEIGHT 0
+#define ITEMID_FONTHEIGHT 0
+#define ITEMID_UNDERLINE 0
+#define ITEMID_CROSSEDOUT 0
+#define ITEMID_SHADOWED 0
+#define ITEMID_AUTOKERN 0
+#define ITEMID_WORDLINEMODE 0
+#define ITEMID_CONTOUR 0
+#define ITEMID_PROPSIZE 0
+#define ITEMID_COLOR 0
+#define ITEMID_CHARSETCOLOR 0
+#define ITEMID_KERNING 0
+#define ITEMID_CASEMAP 0
+#define ITEMID_ESCAPEMENT 0
+#define ITEMID_LANGUAGE 0
+#define ITEMID_NOLINEBREAK 0
+#define ITEMID_NOHYPHENHERE 0
+#define ITEMID_BLINK 0
+#define ITEMID_PAPERBIN 0
+#define ITEMID_SIZE 0
+#define ITEMID_LRSPACE 0
+#define ITEMID_ULSPACE 0
+#define ITEMID_PRINT 0
+#define ITEMID_OPAQUE 0
+#define ITEMID_PROTECT 0
+#define ITEMID_SHADOW 0
+#define ITEMID_BOX 0
+#define ITEMID_BOXINFO 0
+#define TEMID_FMTBREAK 0
+#define ITEMID_FMTKEEP 0
+#define ITEMID_LINE 0
+#define ITEMID_BRUSH 0
+#define ITEMID_LINESPACING 0
+#define TEMID_ADJUST 0
+#define ITEMID_ORPHANS 0
+#define ITEMID_WIDOWS 0
+#define ITEMID_TABSTOP 0
+#define ITEMID_PAGEMODEL 0
+#define ITEMID_FMTSPLIT 0
+#define ITEMID_HYPHENZONE 0
+#define ITEMID_FMTBREAK 0
+#define ITEMID_ADJUST 0
+
+#include "flstitem.hxx"
+#include "fontitem.hxx"
+#include "postitem.hxx"
+#include "wghtitem.hxx"
+#include "fhgtitem.hxx"
+#include "fwdtitem.hxx"
+#include "udlnitem.hxx"
+#include "crsditem.hxx"
+#include "shdditem.hxx"
+#include "akrnitem.hxx"
+#include "wrlmitem.hxx"
+#include "cntritem.hxx"
+#include "prszitem.hxx"
+#include "colritem.hxx"
+#include "cscoitem.hxx"
+#include "kernitem.hxx"
+#include "cmapitem.hxx"
+#include "escpitem.hxx"
+#include "langitem.hxx"
+#include "nlbkitem.hxx"
+#include "nhypitem.hxx"
+#include "lcolitem.hxx"
+#include "blnkitem.hxx"
+
+#include "pbinitem.hxx"
+#include "sizeitem.hxx"
+#include "lrspitem.hxx"
+#include "ulspitem.hxx"
+#include "prntitem.hxx"
+#include "opaqitem.hxx"
+#include "protitem.hxx"
+#include "shaditem.hxx"
+#include "boxitem.hxx"
+#include "brkitem.hxx"
+#include "keepitem.hxx"
+#include "bolnitem.hxx"
+#include "brshitem.hxx"
+
+#include "lspcitem.hxx"
+#include "adjitem.hxx"
+#include "orphitem.hxx"
+#include "widwitem.hxx"
+#include "tstpitem.hxx"
+#include "pmdlitem.hxx"
+#include "spltitem.hxx"
+#include "hyznitem.hxx"
+
+#ifndef _RTFTOKEN_H
+#include <svtools/rtftoken.h>
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+
+#include "svxrtf.hxx"
+
+
+
+#define BRACELEFT '{'
+#define BRACERIGHT '}'
+
+
+// einige Hilfs-Funktionen
+// char
+inline const SvxFontHeightItem& GetSize(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
+ { return (const SvxFontHeightItem&)rSet.Get( nId,bInP); }
+inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
+ { return (const SvxEscapementItem&)rSet.Get( nId,bInP); }
+inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
+ { return (const SvxLineSpacingItem&)rSet.Get( nId,bInP); }
+// frm
+inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
+ { return (const SvxLRSpaceItem&)rSet.Get( nId,bInP); }
+inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
+ { return (const SvxULSpaceItem&)rSet.Get( nId,bInP); }
+
+#define PARDID ((RTFPardAttrMapIds*)aPardMap.GetData())
+#define PLAINID ((RTFPlainAttrMapIds*)aPlainMap.GetData())
+
+// --------------------
+
+void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
+{
+ DBG_ASSERT( pSet, "Es muss ein SfxItemSet uebergeben werden!" );
+ int bFirstToken = TRUE, bWeiter = TRUE;
+ USHORT nStyleNo = 0; // default
+ FontUnderline eUnderline;
+ bPardTokenRead = FALSE;
+
+ int bChkStkPos = !bNewGroup && aAttrStack.Top();
+
+ while( bWeiter && IsParserWorking() ) // solange bekannte Attribute erkannt werden
+ {
+ switch( nToken )
+ {
+ case RTF_PARD:
+ RTFPardPlain( TRUE, &pSet );
+ nStyleNo = 0;
+ bPardTokenRead = TRUE;
+ break;
+
+ case RTF_PLAIN:
+ RTFPardPlain( FALSE, &pSet );
+ break;
+
+ default:
+ do { // middle checked loop
+ if( !bChkStkPos )
+ break;
+
+ SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ if( !pAkt || (pAkt->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
+ pAkt->nSttCnt == pInsPos->GetCntIdx() ))
+ break;
+
+ int nLastToken = GetStackPtr(-1)->nTokenId;
+ if( RTF_PARD == nLastToken || RTF_PLAIN == nLastToken )
+ break;
+
+ if( pAkt->aAttrSet.Count() || pAkt->pChildList ||
+ pAkt->nStyleNo )
+ {
+ // eine neue Gruppe aufmachen
+ SvxRTFItemStackType* pNew = new SvxRTFItemStackType(
+ *pAkt, *pInsPos, TRUE );
+ pNew->aAttrSet.SetParent( pAkt->aAttrSet.GetParent() );
+ // alle bis hierher gueltigen Attribute "setzen"
+ AttrGroupEnd();
+ aAttrStack.Push( pNew );
+ pAkt = pNew;
+ }
+ else
+ // diesen Eintrag als neuen weiterbenutzen
+ pAkt->SetStartPos( *pInsPos );
+
+ pSet = &pAkt->aAttrSet;
+ } while( FALSE );
+
+ switch( nToken )
+ {
+ case RTF_INTBL:
+ case RTF_PAGEBB:
+ case RTF_SBYS:
+ case RTF_V:
+ case RTF_CS:
+ case RTF_LS:
+ case RTF_ILVL:
+ UnknownAttrToken( nToken, pSet );
+ break;
+
+ case RTF_S:
+ {
+ nStyleNo = -1 == nTokenValue ? 0 : USHORT(nTokenValue);
+ // setze am akt. auf dem AttrStack stehenden Style die
+ // StyleNummer
+ SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ if( !pAkt )
+ break;
+
+ pAkt->nStyleNo = USHORT( nStyleNo );
+
+#if 0
+// JP 05.09.95: zuruecksetzen der Style-Attribute fuehrt nur zu Problemen.
+// Es muss reichen, wenn das ueber pard/plain erfolgt
+// ansonsten Bugdoc 15304.rtf - nach nur "\pard" falscher Font !!
+
+ SvxRTFStyleType* pStyle = aStyleTbl.Get( pAkt->nStyleNo );
+ if( pStyle && pStyle->aAttrSet.Count() )
+ {
+ //JP 07.07.95:
+ // alle Attribute, die in der Vorlage gesetzt werden
+ // auf defaults setzen. In RTF werden die Attribute
+ // der Vorlage danach ja wiederholt.
+ // WICHTIG: Attribute die in der Vorlage definiert
+ // sind, werden zurueckgesetzt !!!!
+ // pAkt->aAttrSet.Put( pStyle->aAttrSet );
+
+ SfxItemIter aIter( pStyle->aAttrSet );
+ SfxItemPool* pPool = pStyle->aAttrSet.GetPool();
+ USHORT nWh = aIter.GetCurItem()->Which();
+ while( TRUE )
+ {
+ pAkt->aAttrSet.Put( pPool->GetDefaultItem( nWh ));
+ if( aIter.IsAtEnd() )
+ break;
+ nWh = aIter.NextItem()->Which();
+ }
+ }
+#endif
+ }
+ break;
+
+ case RTF_KEEP:
+ if( PARDID->nSplit )
+ {
+ pSet->Put( SvxFmtSplitItem( FALSE, PARDID->nSplit ));
+ }
+ break;
+
+ case RTF_KEEPN:
+ if( PARDID->nKeep )
+ {
+ pSet->Put( SvxFmtKeepItem( TRUE, PARDID->nKeep ));
+ }
+ break;
+
+ case RTF_LEVEL:
+ if( PARDID->nOutlineLvl )
+ {
+ pSet->Put( SfxUInt16Item( PARDID->nOutlineLvl,
+ (UINT16)nTokenValue ));
+ }
+ break;
+
+ case RTF_QL:
+ if( PARDID->nAdjust )
+ {
+ pSet->Put( SvxAdjustItem( SVX_ADJUST_LEFT, PARDID->nAdjust ));
+ }
+ break;
+ case RTF_QR:
+ if( PARDID->nAdjust )
+ {
+ pSet->Put( SvxAdjustItem( SVX_ADJUST_RIGHT, PARDID->nAdjust ));
+ }
+ break;
+ case RTF_QJ:
+ if( PARDID->nAdjust )
+ {
+ pSet->Put( SvxAdjustItem( SVX_ADJUST_BLOCK, PARDID->nAdjust ));
+ }
+ break;
+ case RTF_QC:
+ if( PARDID->nAdjust )
+ {
+ pSet->Put( SvxAdjustItem( SVX_ADJUST_CENTER, PARDID->nAdjust ));
+ }
+ break;
+
+ case RTF_FI:
+ if( PARDID->nLRSpace )
+ {
+ SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace ));
+ USHORT nSz = 0;
+ if( -1 != nTokenValue )
+ {
+ if( IsCalcValue() )
+ CalcValue();
+ nSz = USHORT(nTokenValue);
+ }
+ aLR.SetTxtFirstLineOfst( nSz );
+ pSet->Put( aLR );
+ }
+ break;
+
+ case RTF_LI:
+ if( PARDID->nLRSpace )
+ {
+ SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace ));
+ USHORT nSz = 0;
+ if( 0 < nTokenValue )
+ {
+ if( IsCalcValue() )
+ CalcValue();
+ nSz = USHORT(nTokenValue);
+ }
+ aLR.SetTxtLeft( nSz );
+ pSet->Put( aLR );
+ }
+ break;
+
+ case RTF_RI:
+ if( PARDID->nLRSpace )
+ {
+ SvxLRSpaceItem aLR( GetLRSpace(*pSet, PARDID->nLRSpace ));
+ USHORT nSz = 0;
+ if( 0 < nTokenValue )
+ {
+ if( IsCalcValue() )
+ CalcValue();
+ nSz = USHORT(nTokenValue);
+ }
+ aLR.SetRight( nSz );
+ pSet->Put( aLR );
+ }
+ break;
+
+ case RTF_SB:
+ if( PARDID->nULSpace )
+ {
+ SvxULSpaceItem aUL( GetULSpace(*pSet, PARDID->nULSpace ));
+ USHORT nSz = 0;
+ if( 0 < nTokenValue )
+ {
+ if( IsCalcValue() )
+ CalcValue();
+ nSz = USHORT(nTokenValue);
+ }
+ aUL.SetUpper( nSz );
+ pSet->Put( aUL );
+ }
+ break;
+
+ case RTF_SA:
+ if( PARDID->nULSpace )
+ {
+ SvxULSpaceItem aUL( GetULSpace(*pSet, PARDID->nULSpace ));
+ USHORT nSz = 0;
+ if( 0 < nTokenValue )
+ {
+ if( IsCalcValue() )
+ CalcValue();
+ nSz = USHORT(nTokenValue);
+ }
+ aUL.SetLower( nSz );
+ pSet->Put( aUL );
+ }
+ break;
+
+ case RTF_SLMULT:
+ if( PARDID->nLinespacing && 1 == nTokenValue )
+ {
+ // dann wird auf mehrzeilig umgeschaltet!
+ SvxLineSpacingItem aLSpace( GetLineSpacing( *pSet,
+ PARDID->nLinespacing, FALSE ));
+
+ // wieviel bekommt man aus dem LineHeight Wert heraus
+
+ // Proportionale-Groesse:
+ // D.H. das Verhaeltnis ergibt sich aus ( n / 240 ) Twips
+
+ nTokenValue = 240;
+ if( IsCalcValue() )
+ CalcValue();
+
+ nTokenValue = short( 100L * aLSpace.GetLineHeight()
+ / long( nTokenValue ) );
+
+ if( nTokenValue > 200 ) // Datenwert fuer PropLnSp
+ nTokenValue = 200; // ist ein BYTE !!!
+
+ aLSpace.SetPropLineSpace( (const BYTE)nTokenValue );
+ aLSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
+
+ pSet->Put( aLSpace );
+ }
+ break;
+
+ case RTF_SL:
+ if( PARDID->nLinespacing )
+ {
+ // errechne das Verhaeltnis aus dem default Font zu der
+ // Size Angabe. Der Abstand besteht aus der Zeilenhoehe
+ // (100%) und dem Leerraum ueber der Zeile (20%).
+ SvxLineSpacingItem aLSpace( 0, PARDID->nLinespacing );
+
+ if( !nTokenValue || -1 == nTokenValue || 1000 == nTokenValue )
+ nTokenValue = 240;
+
+ SvxLineSpace eLnSpc;
+ if( 0 > nTokenValue )
+ {
+ eLnSpc = SVX_LINE_SPACE_FIX;
+ nTokenValue = -nTokenValue;
+ }
+ else
+ eLnSpc = SVX_LINE_SPACE_MIN;
+
+ if( IsCalcValue() )
+ CalcValue();
+ aLSpace.SetLineHeight( (const USHORT)nTokenValue );
+ aLSpace.GetLineSpaceRule() = eLnSpc;
+
+ pSet->Put( aLSpace );
+ }
+ break;
+
+
+/* */
+
+ case RTF_B:
+ if( PLAINID->nWeight &&
+ IsAttrSttPos() ) // nicht im Textfluss ?
+ {
+ pSet->Put( SvxWeightItem(
+ nTokenValue ? WEIGHT_BOLD : WEIGHT_NORMAL,
+ PLAINID->nWeight ));
+ }
+ break;
+
+ case RTF_CAPS:
+ case RTF_SCAPS:
+ if( PLAINID->nCaseMap &&
+ IsAttrSttPos() ) // nicht im Textfluss ?
+ {
+ SvxCaseMap eCaseMap;
+ if( !nTokenValue )
+ eCaseMap = SVX_CASEMAP_NOT_MAPPED;
+ else if( RTF_CAPS == nToken )
+ eCaseMap = SVX_CASEMAP_VERSALIEN;
+ else
+ eCaseMap = SVX_CASEMAP_KAPITAELCHEN;
+
+ pSet->Put( SvxCaseMapItem( eCaseMap, PLAINID->nCaseMap ));
+ }
+ break;
+
+ case RTF_DN:
+ case RTF_SUB:
+ if( PLAINID->nEscapement )
+ {
+ const USHORT nEsc = PLAINID->nEscapement;
+ if( -1 == nTokenValue || RTF_SUB == nToken )
+ nTokenValue = 6;
+ if( IsCalcValue() )
+ CalcValue();
+ const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, FALSE );
+ short nEs;
+ BYTE nProp;
+ if( DFLT_ESC_AUTO_SUPER == rOld.GetEsc() )
+ {
+ nEs = DFLT_ESC_AUTO_SUB;
+ nProp = rOld.GetProp();
+ }
+ else
+ {
+ nEs = (short)-nTokenValue;
+ nProp = DFLT_ESC_PROP;
+ }
+ pSet->Put( SvxEscapementItem( nEs, nProp, nEsc ));
+ }
+ break;
+
+ case RTF_NOSUPERSUB:
+ if( PLAINID->nEscapement )
+ {
+ const USHORT nEsc = PLAINID->nEscapement;
+ pSet->Put( SvxEscapementItem( nEsc ));
+ }
+ break;
+
+ case RTF_EXPND:
+ if( PLAINID->nKering )
+ {
+ if( -1 == nTokenValue )
+ nTokenValue = 0;
+ else
+ nTokenValue *= 5;
+ if( IsCalcValue() )
+ CalcValue();
+ pSet->Put( SvxKerningItem( (short)nTokenValue, PLAINID->nKering ));
+ }
+ break;
+
+ case RTF_KERNING:
+ if( PLAINID->nAutoKerning )
+ {
+ if( -1 == nTokenValue )
+ nTokenValue = 0;
+ else
+ nTokenValue *= 10;
+ if( IsCalcValue() )
+ CalcValue();
+ pSet->Put( SvxAutoKernItem( 0 != nTokenValue,
+ PLAINID->nAutoKerning ));
+ }
+ break;
+
+ case RTF_EXPNDTW:
+ if( PLAINID->nKering )
+ {
+ if( -1 == nTokenValue )
+ nTokenValue = 0;
+ if( IsCalcValue() )
+ CalcValue();
+ pSet->Put( SvxKerningItem( (short)nTokenValue, PLAINID->nKering ));
+ }
+ break;
+
+ case RTF_F:
+ if( PLAINID->nFont )
+ {
+ const Font& rSVFont = GetFont( USHORT(nTokenValue) );
+ pSet->Put( SvxFontItem( rSVFont.GetFamily(),
+ rSVFont.GetName(), rSVFont.GetStyleName(),
+ rSVFont.GetPitch(), rSVFont.GetCharSet(),
+ PLAINID->nFont ));
+ }
+ break;
+
+ case RTF_FS:
+ if( PLAINID->nFontHeight )
+ {
+ if( -1 == nTokenValue )
+ nTokenValue = 240;
+ else
+ nTokenValue *= 10;
+ if( IsCalcValue() )
+ CalcValue();
+ SvxFontHeightItem aFH( (const USHORT)nTokenValue, 100,
+ PLAINID->nFontHeight );
+ pSet->Put( aFH );
+ }
+ break;
+
+ case RTF_I:
+ if( PLAINID->nPosture &&
+ IsAttrSttPos() ) // nicht im Textfluss ?
+ {
+ pSet->Put( SvxPostureItem(
+ nTokenValue ? ITALIC_NORMAL : ITALIC_NONE,
+ PLAINID->nPosture ));
+ }
+ break;
+
+ case RTF_OUTL:
+ if( PLAINID->nContour &&
+ IsAttrSttPos() ) // nicht im Textfluss ?
+ {
+ pSet->Put( SvxContourItem( nTokenValue ? TRUE : FALSE,
+ PLAINID->nContour ));
+ }
+ break;
+
+ case RTF_SHAD:
+ if( PLAINID->nShadowed &&
+ IsAttrSttPos() ) // nicht im Textfluss ?
+ {
+ pSet->Put( SvxShadowedItem( nTokenValue ? TRUE : FALSE,
+ PLAINID->nShadowed ));
+ }
+ break;
+
+ case RTF_STRIKE:
+ if( PLAINID->nCrossedOut &&
+ IsAttrSttPos() ) // nicht im Textfluss ?
+ {
+ pSet->Put( SvxCrossedOutItem(
+ nTokenValue ? STRIKEOUT_SINGLE : STRIKEOUT_NONE,
+ PLAINID->nCrossedOut ));
+ }
+ break;
+
+ case RTF_STRIKEDL:
+ if( PLAINID->nCrossedOut ) // nicht im Textfluss ?
+ {
+ pSet->Put( SvxCrossedOutItem(
+ STRIKEOUT_DOUBLE, PLAINID->nCrossedOut ));
+ }
+ break;
+
+ case RTF_UL:
+ if( !IsAttrSttPos() )
+ break;
+ eUnderline = nTokenValue ? UNDERLINE_SINGLE : UNDERLINE_NONE;
+ goto ATTR_SETUNDERLINE;
+
+ case RTF_ULD:
+ eUnderline = UNDERLINE_DOTTED;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULDASH:
+ eUnderline = UNDERLINE_DASH;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULDASHD:
+ eUnderline = UNDERLINE_DASHDOT;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULDASHDD:
+ eUnderline = UNDERLINE_DASHDOTDOT;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULDB:
+ eUnderline = UNDERLINE_DOUBLE;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULNONE:
+ eUnderline = UNDERLINE_NONE;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULTH:
+ eUnderline = UNDERLINE_BOLD;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULWAVE:
+ eUnderline = UNDERLINE_WAVE;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULTHD:
+ eUnderline = UNDERLINE_BOLDDOTTED;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULTHDASH:
+ eUnderline = UNDERLINE_BOLDDASH;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULLDASH:
+ eUnderline = UNDERLINE_LONGDASH;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULTHLDASH:
+ eUnderline = UNDERLINE_BOLDLONGDASH;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULTHDASHD:
+ eUnderline = UNDERLINE_BOLDDASHDOT;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULTHDASHDD:
+ eUnderline = UNDERLINE_BOLDDASHDOTDOT;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULHWAVE:
+ eUnderline = UNDERLINE_BOLDWAVE;
+ goto ATTR_SETUNDERLINE;
+ case RTF_ULULDBWAVE:
+ eUnderline = UNDERLINE_DOUBLEWAVE;
+ goto ATTR_SETUNDERLINE;
+
+ case RTF_ULW:
+ eUnderline = UNDERLINE_SINGLE;
+
+ if( PLAINID->nWordlineMode )
+ {
+ pSet->Put( SvxWordLineModeItem( TRUE, PLAINID->nWordlineMode ));
+ }
+ goto ATTR_SETUNDERLINE;
+
+ATTR_SETUNDERLINE:
+ if( PLAINID->nUnderline )
+ {
+ pSet->Put( SvxUnderlineItem( eUnderline, PLAINID->nUnderline ));
+ }
+ break;
+
+ case RTF_UP:
+ case RTF_SUPER:
+ if( PLAINID->nEscapement )
+ {
+ const USHORT nEsc = PLAINID->nEscapement;
+ if( -1 == nTokenValue || RTF_SUPER == nToken )
+ nTokenValue = 6;
+ if( IsCalcValue() )
+ CalcValue();
+ const SvxEscapementItem& rOld = GetEscapement( *pSet, nEsc, FALSE );
+ short nEs;
+ BYTE nProp;
+ if( DFLT_ESC_AUTO_SUB == rOld.GetEsc() )
+ {
+ nEs = DFLT_ESC_AUTO_SUPER;
+ nProp = rOld.GetProp();
+ }
+ else
+ {
+ nEs = (short)nTokenValue;
+ nProp = DFLT_ESC_PROP;
+ }
+ pSet->Put( SvxEscapementItem( nEs, nProp, nEsc ));
+ }
+ break;
+
+ case RTF_CF:
+ if( PLAINID->nColor )
+ {
+ pSet->Put( SvxColorItem( GetColor( USHORT(nTokenValue) ),
+ PLAINID->nColor ));
+ }
+ break;
+ case RTF_CB:
+ if( PLAINID->nBgColor )
+ {
+ pSet->Put( SvxColorItem( GetColor( USHORT(nTokenValue) ),
+ PLAINID->nBgColor ));
+ }
+ break;
+
+ case RTF_LANG:
+ if( PLAINID->nLanguage )
+ {
+ pSet->Put( SvxLanguageItem( (LanguageType)nTokenValue,
+ PLAINID->nLanguage ));
+ }
+ break;
+
+/* */
+
+ case BRACELEFT:
+ {
+ // teste auf Swg-Interne Tokens
+ short nSkip = 0;
+ if( RTF_IGNOREFLAG != GetNextToken() )
+ nSkip = -1;
+ else if( (nToken = GetNextToken() ) & RTF_SWGDEFS )
+ {
+ switch( nToken )
+ {
+ case RTF_PGDSCNO:
+ case RTF_PGBRK:
+ case RTF_SOUTLVL:
+ UnknownAttrToken( nToken, pSet );
+ // ueberlese die schliessende Klammer
+ GetNextToken();
+ break;
+
+ case RTF_SWG_ESCPROP:
+ {
+ // prozentuale Veraenderung speichern !
+ BYTE nProp = BYTE( nTokenValue / 100 );
+ short nEsc = 0;
+ if( 1 == ( nTokenValue % 100 ))
+ // Erkennung unseres AutoFlags!
+ nEsc = DFLT_ESC_AUTO_SUPER;
+
+ if( PLAINID->nEscapement )
+ pSet->Put( SvxEscapementItem( nEsc, nProp,
+ PLAINID->nEscapement ));
+ // ueberlese die schliessende Klammer
+ GetNextToken();
+ }
+ break;
+
+ case RTF_HYPHEN:
+ {
+ SvxHyphenZoneItem aHypenZone(
+ (nTokenValue & 1) ? TRUE : FALSE,
+ PARDID->nHyphenzone );
+ aHypenZone.SetPageEnd(
+ (nTokenValue & 2) ? TRUE : FALSE );
+
+ if( PARDID->nHyphenzone &&
+ RTF_HYPHLEAD == GetNextToken() &&
+ RTF_HYPHTRAIL == GetNextToken() &&
+ RTF_HYPHMAX == GetNextToken() )
+ {
+ aHypenZone.GetMinLead() =
+ BYTE(GetStackPtr( -2 )->nTokenValue);
+ aHypenZone.GetMinTrail() =
+ BYTE(GetStackPtr( -1 )->nTokenValue);
+ aHypenZone.GetMaxHyphens() =
+ BYTE(nTokenValue);
+
+ pSet->Put( aHypenZone );
+ }
+ else
+ SkipGroup(); // ans Ende der Gruppe
+ GetNextToken(); // Klammer ueberlesen
+ }
+ break;
+
+ case RTF_SHADOW:
+ {
+ int bSkip = TRUE;
+ do { // middle check loop
+ SvxShadowLocation eSL = SvxShadowLocation( nTokenValue );
+ if( RTF_SHDW_DIST != GetNextToken() )
+ break;
+ USHORT nDist = USHORT( nTokenValue );
+
+ if( RTF_SHDW_STYLE != GetNextToken() )
+ break;
+ //! (pb) class Brush removed -> obsolete
+ //! BrushStyle eStyle = BrushStyle( nTokenValue );
+
+ if( RTF_SHDW_COL != GetNextToken() )
+ break;
+ USHORT nCol = USHORT( nTokenValue );
+
+ if( RTF_SHDW_FCOL != GetNextToken() )
+ break;
+ USHORT nFillCol = USHORT( nTokenValue );
+
+ Color aColor = GetColor( nCol );
+
+ if( PARDID->nShadow )
+ pSet->Put( SvxShadowItem( PARDID->nShadow,
+ &aColor, nDist, eSL ) );
+
+ bSkip = FALSE;
+ } while( FALSE );
+
+ if( bSkip )
+ SkipGroup(); // ans Ende der Gruppe
+ GetNextToken(); // Klammer ueberlesen
+ }
+ break;
+
+ default:
+ if( (nToken & ~(0xff | RTF_SWGDEFS)) == RTF_TABSTOPDEF )
+ {
+ nToken = SkipToken( -2 );
+ ReadTabAttr( nToken, *pSet );
+ }
+ else if( (nToken & ~(0xff| RTF_SWGDEFS)) == RTF_BRDRDEF)
+ {
+ nToken = SkipToken( -2 );
+ ReadBorderAttr( nToken, *pSet );
+ }
+ else // also kein Attribut mehr
+ nSkip = -2;
+ break;
+ }
+ }
+ else
+ nSkip = -2;
+
+ if( nSkip ) // alles voellig unbekannt
+ {
+ --nSkip; // BRACELEFT: ist das naechste Token
+ SkipToken( nSkip );
+ bWeiter = FALSE;
+ }
+ }
+ break;
+ default:
+ if( (nToken & ~0xff ) == RTF_TABSTOPDEF )
+ ReadTabAttr( nToken, *pSet );
+ else if( (nToken & ~0xff ) == RTF_BRDRDEF )
+ ReadBorderAttr( nToken, *pSet );
+ else if( (nToken & ~0xff ) == RTF_SHADINGDEF )
+ ReadBackgroundAttr( nToken, *pSet );
+ else
+ {
+ // kenne das Token nicht also das Token "in den Parser zurueck"
+ if( !bFirstToken )
+ SkipToken( -1 );
+ bWeiter = FALSE;
+ }
+ }
+ }
+ if( bWeiter )
+ {
+ nToken = GetNextToken();
+ }
+ bFirstToken = FALSE;
+ }
+
+/*
+ // teste Attribute gegen ihre Styles
+ if( IsChkStyleAttr() && pSet->Count() && !pInsPos->GetCntIdx() )
+ {
+ SvxRTFStyleType* pStyle = aStyleTbl.Get( nStyleNo );
+ if( pStyle && pStyle->aAttrSet.Count() )
+ {
+ // alle Attribute, die schon vom Style definiert sind, aus dem
+ // akt. Set entfernen
+ const SfxPoolItem* pItem;
+ SfxItemIter aIter( *pSet );
+ USHORT nWhich = aIter.GetCurItem()->Which();
+ while( TRUE )
+ {
+ if( SFX_ITEM_SET == pStyle->aAttrSet.GetItemState(
+ nWhich, FALSE, &pItem ) && *pItem == *aIter.GetCurItem())
+ pSet->ClearItem( nWhich ); // loeschen
+
+ if( aIter.IsAtEnd() )
+ break;
+ nWhich = aIter.NextItem()->Which();
+ }
+ }
+ }
+*/
+}
+
+void SvxRTFParser::ReadTabAttr( int nToken, SfxItemSet& rSet )
+{
+ // dann lese doch mal alle TabStops ein
+ SvxTabStop aTabStop;
+ SvxTabStopItem aAttr( 0, 0, SVX_TAB_ADJUST_DEFAULT, PARDID->nTabStop );
+ int bWeiter = TRUE;
+ do {
+ switch( nToken )
+ {
+ case RTF_TB: // BarTab ???
+ case RTF_TX:
+ {
+ if( IsCalcValue() )
+ CalcValue();
+ aTabStop.GetTabPos() = nTokenValue;
+ aAttr.Insert( aTabStop );
+ aTabStop = SvxTabStop(); // alle Werte default
+ }
+ break;
+
+ case RTF_TQL:
+ aTabStop.GetAdjustment() = SVX_TAB_ADJUST_LEFT;
+ break;
+ case RTF_TQR:
+ aTabStop.GetAdjustment() = SVX_TAB_ADJUST_RIGHT;
+ break;
+ case RTF_TQC:
+ aTabStop.GetAdjustment() = SVX_TAB_ADJUST_CENTER;
+ break;
+ case RTF_TQDEC:
+ aTabStop.GetAdjustment() = SVX_TAB_ADJUST_DECIMAL;
+ break;
+
+ case RTF_TLDOT: aTabStop.GetFill() = '.'; break;
+ case RTF_TLHYPH: aTabStop.GetFill() = ' '; break;
+ case RTF_TLUL: aTabStop.GetFill() = '_'; break;
+ case RTF_TLTH: aTabStop.GetFill() = '-'; break;
+ case RTF_TLEQ: aTabStop.GetFill() = '='; break;
+
+ case BRACELEFT:
+ {
+ // Swg - Kontrol BRACELEFT RTF_IGNOREFLAG RTF_TLSWG BRACERIGHT
+ short nSkip = 0;
+ if( RTF_IGNOREFLAG != GetNextToken() )
+ nSkip = -1;
+ else if( RTF_TLSWG != ( nToken = GetNextToken() ))
+ nSkip = -2;
+ else
+ {
+ aTabStop.GetDecimal() = BYTE(nTokenValue & 0xff);
+ aTabStop.GetFill() = BYTE((nTokenValue >> 8) & 0xff);
+ // ueberlese noch die schliessende Klammer
+ GetNextToken();
+ }
+ if( nSkip )
+ {
+ SkipToken( nSkip ); // Ignore wieder zurueck
+ bWeiter = FALSE;
+ }
+ }
+ break;
+
+ default:
+ bWeiter = FALSE;
+ }
+ if( bWeiter )
+ nToken = GetNextToken();
+ } while( bWeiter );
+
+ // mit Defaults aufuellen fehlt noch !!!
+ rSet.Put( aAttr );
+ SkipToken( -1 );
+}
+
+static void SetBorderLine( int nBorderTyp, SvxBoxItem& rItem,
+ const SvxBorderLine& rBorder )
+{
+ switch( nBorderTyp )
+ {
+ case RTF_BOX: // alle Stufen durchlaufen
+
+ case RTF_BRDRT:
+ rItem.SetLine( &rBorder, BOX_LINE_TOP );
+ if( RTF_BOX != nBorderTyp )
+ return;
+
+ case RTF_BRDRB:
+ rItem.SetLine( &rBorder, BOX_LINE_BOTTOM );
+ if( RTF_BOX != nBorderTyp )
+ return;
+
+ case RTF_BRDRL:
+ rItem.SetLine( &rBorder, BOX_LINE_LEFT );
+ if( RTF_BOX != nBorderTyp )
+ return;
+
+ case RTF_BRDRR:
+ rItem.SetLine( &rBorder, BOX_LINE_RIGHT );
+ if( RTF_BOX != nBorderTyp )
+ return;
+ }
+}
+
+void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
+ int bTableDef )
+{
+ // dann lese doch mal das BoderAttribut ein
+ SvxBoxItem aAttr( PARDID->nBox );
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == rSet.GetItemState( PARDID->nBox, FALSE, &pItem ) )
+ aAttr = *(SvxBoxItem*)pItem;
+
+ SvxBorderLine aBrd( 0, DEF_LINE_WIDTH_0, 0, 0 ); // einfache Linien
+ int bWeiter = TRUE, nBorderTyp = 0;
+
+ do {
+ switch( nToken )
+ {
+ case RTF_BOX:
+ case RTF_BRDRT:
+ case RTF_BRDRB:
+ case RTF_BRDRL:
+ case RTF_BRDRR:
+ nBorderTyp = nToken;
+ goto SETBORDER;
+
+ case RTF_CLBRDRT:
+ if( !bTableDef )
+ break;
+ nBorderTyp = RTF_BRDRT;
+ goto SETBORDER;
+ case RTF_CLBRDRB:
+ if( !bTableDef )
+ break;
+ nBorderTyp = RTF_BRDRB;
+ goto SETBORDER;
+ case RTF_CLBRDRL:
+ if( !bTableDef )
+ break;
+ nBorderTyp = RTF_BRDRL;
+ goto SETBORDER;
+ case RTF_CLBRDRR:
+ if( !bTableDef )
+ break;
+ nBorderTyp = RTF_BRDRR;
+ goto SETBORDER;
+
+SETBORDER:
+ {
+ // auf defaults setzen
+ aBrd.SetOutWidth( DEF_LINE_WIDTH_0 );
+ aBrd.SetInWidth( 0 );
+ aBrd.SetDistance( 0 );
+ aBrd.SetColor( Color( COL_BLACK ) );
+ }
+ break;
+
+
+// werden noch nicht ausgewertet
+ case RTF_BRSP:
+ {
+ switch( nBorderTyp )
+ {
+ case RTF_BRDRB:
+ aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_BOTTOM );
+ break;
+
+ case RTF_BRDRT:
+ aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_TOP );
+ break;
+
+ case RTF_BRDRL:
+ aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_LEFT );
+ break;
+
+ case RTF_BRDRR:
+ aAttr.SetDistance( (USHORT)nTokenValue, BOX_LINE_RIGHT );
+ break;
+
+ case RTF_BOX:
+ aAttr.SetDistance( (USHORT)nTokenValue );
+ break;
+ }
+ }
+ break;
+
+case RTF_BRDRBTW:
+case RTF_BRDRBAR: break;
+
+
+ case RTF_BRDRCF:
+ {
+ aBrd.SetColor( GetColor( USHORT(nTokenValue) ) );
+ SetBorderLine( nBorderTyp, aAttr, aBrd );
+ }
+ break;
+
+ case RTF_BRDRTH:
+ aBrd.SetOutWidth( DEF_LINE_WIDTH_1 );
+ aBrd.SetInWidth( 0 );
+ aBrd.SetDistance( 0 );
+ goto SETBORDERLINE;
+ break;
+
+ case RTF_BRDRDB:
+ aBrd.SetOutWidth( DEF_DOUBLE_LINE0_OUT );
+ aBrd.SetInWidth( DEF_DOUBLE_LINE0_IN );
+ aBrd.SetDistance( DEF_DOUBLE_LINE0_DIST );
+ goto SETBORDERLINE;
+ break;
+
+ case RTF_BRDRSH:
+ // schattierte Box
+ {
+ rSet.Put( SvxShadowItem( PARDID->nShadow, (Color*) 0, 60 /*3pt*/,
+ SVX_SHADOW_BOTTOMRIGHT ) );
+ }
+ break;
+
+ case RTF_BRDRW:
+ if( -1 != nTokenValue )
+ {
+ // sollte es eine "dicke" Linie sein ?
+ if( DEF_LINE_WIDTH_0 != aBrd.GetOutWidth() )
+ nTokenValue *= 2;
+
+ // eine Doppelline?
+ if( aBrd.GetInWidth() )
+ {
+ // WinWord - Werte an StarOffice anpassen
+ if( nTokenValue < DEF_LINE_WIDTH_1 - (DEF_LINE_WIDTH_1/10))
+ {
+ aBrd.SetOutWidth( DEF_DOUBLE_LINE0_OUT );
+ aBrd.SetInWidth( DEF_DOUBLE_LINE0_IN );
+ aBrd.SetDistance( DEF_DOUBLE_LINE0_DIST );
+ }
+ else
+ if( nTokenValue < DEF_LINE_WIDTH_2 - (DEF_LINE_WIDTH_2/10))
+ {
+ aBrd.SetOutWidth( DEF_DOUBLE_LINE1_OUT );
+ aBrd.SetInWidth( DEF_DOUBLE_LINE1_IN );
+ aBrd.SetDistance( DEF_DOUBLE_LINE1_DIST );
+ }
+ else
+ {
+ aBrd.SetOutWidth( DEF_DOUBLE_LINE2_OUT );
+ aBrd.SetInWidth( DEF_DOUBLE_LINE2_IN );
+ aBrd.SetDistance( DEF_DOUBLE_LINE2_DIST );
+ }
+ }
+ else
+ {
+ // WinWord - Werte an StarOffice anpassen
+ if( nTokenValue < DEF_LINE_WIDTH_1 - (DEF_LINE_WIDTH_1/10))
+ aBrd.SetOutWidth( DEF_LINE_WIDTH_0 );
+ else
+ if( nTokenValue < DEF_LINE_WIDTH_2 - (DEF_LINE_WIDTH_2/10))
+ aBrd.SetOutWidth( DEF_LINE_WIDTH_1 );
+ else
+ if( nTokenValue < DEF_LINE_WIDTH_3 - (DEF_LINE_WIDTH_3/10))
+ aBrd.SetOutWidth( DEF_LINE_WIDTH_2 );
+ else
+ if( nTokenValue < DEF_LINE_WIDTH_4 )
+ aBrd.SetOutWidth( DEF_LINE_WIDTH_3 );
+ else
+ aBrd.SetOutWidth( DEF_LINE_WIDTH_4 );
+ }
+ }
+ goto SETBORDERLINE;
+
+ case RTF_BRDRS:
+ case RTF_BRDRDOT:
+ case RTF_BRDRHAIR:
+ case RTF_BRDRDASH:
+SETBORDERLINE:
+ SetBorderLine( nBorderTyp, aAttr, aBrd );
+ break;
+
+ case BRACELEFT:
+ {
+ short nSkip = 0;
+ if( RTF_IGNOREFLAG != GetNextToken() )
+ nSkip = -1;
+ else
+ {
+ int bSwgControl = TRUE, bFirstToken = TRUE;
+ nToken = GetNextToken();
+ do {
+ switch( nToken )
+ {
+ case RTF_BRDBOX:
+ aAttr.SetDistance( USHORT(nTokenValue) );
+ break;
+
+ case RTF_BRDRT:
+ case RTF_BRDRB:
+ case RTF_BRDRR:
+ case RTF_BRDRL:
+ nBorderTyp = nToken;
+ bFirstToken = FALSE;
+ if( RTF_BRDLINE_COL != GetNextToken() )
+ {
+ bSwgControl = FALSE;
+ break;
+ }
+ aBrd.SetColor( GetColor( USHORT(nTokenValue) ));
+
+ if( RTF_BRDLINE_IN != GetNextToken() )
+ {
+ bSwgControl = FALSE;
+ break;
+ }
+ aBrd.SetInWidth( USHORT(nTokenValue));
+
+ if( RTF_BRDLINE_OUT != GetNextToken() )
+ {
+ bSwgControl = FALSE;
+ break;
+ }
+ aBrd.SetOutWidth( USHORT(nTokenValue));
+
+ if( RTF_BRDLINE_DIST != GetNextToken() )
+ {
+ bSwgControl = FALSE;
+ break;
+ }
+ aBrd.SetDistance( USHORT(nTokenValue));
+ SetBorderLine( nBorderTyp, aAttr, aBrd );
+ break;
+
+ default:
+ bSwgControl = FALSE;
+ break;
+ }
+
+ if( bSwgControl )
+ {
+ nToken = GetNextToken();
+ bFirstToken = FALSE;
+ }
+ } while( bSwgControl );
+
+ // Ende der Swg-Gruppe
+ // -> lese noch die schliessende Klammer
+ if( BRACERIGHT == nToken )
+ ;
+ else if( !bFirstToken )
+ {
+ // es ist ein Parser-Fehler, springe zum
+ // Ende der Gruppe
+ SkipGroup();
+ // schliessende BRACERIGHT ueberspringen
+ GetNextToken();
+ }
+ else
+ nSkip = -2;
+ }
+
+ if( nSkip )
+ {
+ SkipToken( nSkip ); // Ignore wieder zurueck
+ bWeiter = FALSE;
+ }
+ }
+ break;
+
+ default:
+ bWeiter = (nToken & ~(0xff| RTF_SWGDEFS)) == RTF_BRDRDEF;
+ }
+ if( bWeiter )
+ nToken = GetNextToken();
+ } while( bWeiter );
+ rSet.Put( aAttr );
+ SkipToken( -1 );
+}
+
+inline ULONG CalcShading( ULONG nColor, ULONG nFillColor, BYTE nShading )
+{
+ nColor = (nColor * nShading) / 100;
+ nFillColor = (nFillColor * ( 100 - nShading )) / 100;
+ return nColor + nFillColor;
+}
+
+void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef )
+{
+ // dann lese doch mal das BoderAttribut ein
+ int bWeiter = TRUE;
+ USHORT nColor = USHRT_MAX, nFillColor = USHRT_MAX;
+ BYTE nFillValue = 0;
+
+ do {
+ switch( nToken )
+ {
+ case RTF_CLCBPAT:
+ case RTF_CBPAT:
+ nFillColor = USHORT( nTokenValue );
+ break;
+
+ case RTF_CLCFPAT:
+ case RTF_CFPAT:
+ nColor = USHORT( nTokenValue );
+ break;
+
+ case RTF_CLSHDNG:
+ case RTF_SHADING:
+ nFillValue = (BYTE)( nTokenValue / 100 );
+ break;
+
+ case RTF_CLBGDKHOR:
+ case RTF_BGDKHORIZ:
+ case RTF_CLBGDKVERT:
+ case RTF_BGDKVERT:
+ case RTF_CLBGDKBDIAG:
+ case RTF_BGDKBDIAG:
+ case RTF_CLBGDKFDIAG:
+ case RTF_BGDKFDIAG:
+ case RTF_CLBGDKCROSS:
+ case RTF_BGDKCROSS:
+ case RTF_CLBGDKDCROSS:
+ case RTF_BGDKDCROSS:
+ // dark -> 60%
+ nFillValue = 60;
+ break;
+
+ case RTF_CLBGHORIZ:
+ case RTF_BGHORIZ:
+ case RTF_CLBGVERT:
+ case RTF_BGVERT:
+ case RTF_CLBGBDIAG:
+ case RTF_BGBDIAG:
+ case RTF_CLBGFDIAG:
+ case RTF_BGFDIAG:
+ case RTF_CLBGCROSS:
+ case RTF_BGCROSS:
+ case RTF_CLBGDCROSS:
+ case RTF_BGDCROSS:
+ // light -> 20%
+ nFillValue = 20;
+ break;
+
+ default:
+ if( bTableDef )
+ bWeiter = (nToken & ~(0xff | RTF_TABLEDEF) ) == RTF_SHADINGDEF;
+ else
+ bWeiter = (nToken & ~0xff) == RTF_SHADINGDEF;
+ }
+ if( bWeiter )
+ nToken = GetNextToken();
+ } while( bWeiter );
+
+ Color aCol( COL_WHITE ), aFCol;
+ if( !nFillValue )
+ {
+ // es wurde nur eine von beiden Farben angegeben oder kein BrushTyp
+ if( USHRT_MAX != nFillColor )
+ {
+ nFillValue = 100;
+ aCol = GetColor( nFillColor );
+ }
+ else if( USHRT_MAX != nColor )
+ aFCol = GetColor( nColor );
+ }
+ else
+ {
+ if( USHRT_MAX != nColor )
+ aCol = GetColor( nColor );
+ else
+ aCol = Color( COL_BLACK );
+
+ if( USHRT_MAX != nFillColor )
+ aFCol = GetColor( nFillColor );
+ else
+ aFCol = Color( COL_WHITE );
+ }
+
+ Color aColor;
+ if( 0 == nFillValue || 100 == nFillValue )
+ aColor = aCol;
+ else
+ aColor = Color(
+ (BYTE)CalcShading( aCol.GetRed(), aFCol.GetRed(), nFillValue ),
+ (BYTE)CalcShading( aCol.GetGreen(), aFCol.GetGreen(), nFillValue ),
+ (BYTE)CalcShading( aCol.GetBlue(), aFCol.GetBlue(), nFillValue ) );
+
+ rSet.Put( SvxBrushItem( aColor, PARDID->nBrush ) );
+
+ SkipToken( -1 );
+}
+
+
+// pard / plain abarbeiten
+void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
+{
+ if( !bNewGroup && aAttrStack.Top() ) // nicht am Anfang einer neuen Gruppe
+ {
+ SvxRTFItemStackType* pAkt = aAttrStack.Top();
+
+ int nLastToken = GetStackPtr(-1)->nTokenId;
+ int bNewStkEntry = TRUE;
+ if( RTF_PARD != nLastToken &&
+ RTF_PLAIN != nLastToken &&
+ BRACELEFT != nLastToken )
+ {
+ if( pAkt->aAttrSet.Count() || pAkt->pChildList || pAkt->nStyleNo )
+ {
+ // eine neue Gruppe aufmachen
+ SvxRTFItemStackType* pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, TRUE );
+ pNew->aAttrSet.SetParent( pAkt->aAttrSet.GetParent() );
+ // alle bis hierher gueltigen Attribute "setzen"
+ AttrGroupEnd();
+ aAttrStack.Push( pNew );
+ pAkt = pNew;
+ }
+ else
+ {
+ // diesen Eintrag als neuen weiterbenutzen
+ pAkt->SetStartPos( *pInsPos );
+ bNewStkEntry = FALSE;
+ }
+ }
+
+ // jetzt noch alle auf default zuruecksetzen
+ if( bNewStkEntry &&
+ ( pAkt->aAttrSet.GetParent() || pAkt->aAttrSet.Count() ))
+ {
+ const SfxPoolItem *pItem, *pDef;
+ const USHORT* pPtr;
+ USHORT nCnt;
+ if( bPard )
+ {
+ pAkt->nStyleNo = 0;
+ pPtr = aPardMap.GetData();
+ nCnt = aPardMap.Count();
+ }
+ else
+ {
+ pPtr = aPlainMap.GetData();
+ nCnt = aPlainMap.Count();
+ }
+
+ for( USHORT n = 0; n < nCnt; ++n, ++pPtr )
+ {
+ // Item gesetzt und unterschiedlich -> das Pooldefault setzen
+ //JP 06.04.98: bei Items die nur SlotItems sind, darf nicht
+ // auf das Default zugefriffen werden. Diese
+ // werden gecleart
+ if( !*pPtr )
+ ;
+ else if( SFX_WHICH_MAX < *pPtr )
+ pAkt->aAttrSet.ClearItem( *pPtr );
+ else if( IsChkStyleAttr() )
+ pAkt->aAttrSet.Put( pAttrPool->GetDefaultItem( *pPtr ) );
+ else if( !pAkt->aAttrSet.GetParent() )
+ pAkt->aAttrSet.ClearItem( *pPtr );
+ else if( SFX_ITEM_SET == pAkt->aAttrSet.GetParent()->
+ GetItemState( *pPtr, TRUE, &pItem ) &&
+ *( pDef = &pAttrPool->GetDefaultItem( *pPtr ))
+ != *pItem )
+ pAkt->aAttrSet.Put( *pDef );
+ else
+ pAkt->aAttrSet.ClearItem( *pPtr );
+ }
+ }
+ else if( bPard )
+ pAkt->nStyleNo = 0; // Style-Nummer zuruecksetzen
+
+ *ppSet = &pAkt->aAttrSet;
+ }
+}
+
+void SvxRTFParser::SetDefault( int nToken, short nValue )
+{
+ if( !bNewDoc )
+ return;
+
+ switch( nToken )
+ {
+ case RTF_DEFF:
+ if( PLAINID->nFont )
+ {
+ if( -1 == nValue )
+ nValue = 0;
+ const Font& rSVFont = GetFont( USHORT(nValue) );
+ pAttrPool->SetPoolDefaultItem( SvxFontItem(
+ rSVFont.GetFamily(), rSVFont.GetName(),
+ rSVFont.GetStyleName(), rSVFont.GetPitch(),
+ rSVFont.GetCharSet(),
+ PLAINID->nFont ));
+ }
+ break;
+
+ case RTF_DEFLANG:
+ // default Language merken
+ if( PLAINID->nLanguage && -1 != nValue )
+ {
+ pAttrPool->SetPoolDefaultItem(
+ SvxLanguageItem( (const LanguageType)nValue,
+ PLAINID->nLanguage ));
+ }
+ break;
+
+ case RTF_DEFTAB:
+ if( PARDID->nTabStop )
+ {
+ // RTF definiert 720 twips als default
+ bIsSetDfltTab = TRUE;
+ if( -1 == nValue || !nValue )
+ nValue = 720;
+
+ // wer keine Twips haben moechte ...
+ if( IsCalcValue() )
+ {
+ nTokenValue = nValue;
+ CalcValue();
+ nValue = (short)nTokenValue;
+ }
+
+ // Verhaeltnis der def. TabWidth / Tabs errechnen und
+ // enstsprechend die neue Anzahl errechnen.
+/*-----------------14.12.94 19:32-------------------
+ ?? wie kommt man auf die 13 ??
+--------------------------------------------------*/
+ USHORT nAnzTabs = (SVX_TAB_DEFDIST * 13 ) / USHORT(nValue);
+
+ // wir wollen Defaulttabs
+ SvxTabStopItem aNewTab( nAnzTabs, USHORT(nValue),
+ SVX_TAB_ADJUST_DEFAULT, PARDID->nTabStop );
+ while( nAnzTabs )
+ ((SvxTabStop&)aNewTab[ --nAnzTabs ]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT;
+
+ pAttrPool->SetPoolDefaultItem( aNewTab );
+ }
+ break;
+ }
+}
+
+// default: keine Umrechnung, alles bei Twips lassen.
+void SvxRTFParser::CalcValue()
+{
+}
+
+ // fuer Tokens, die im ReadAttr nicht ausgewertet werden
+void SvxRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
+{
+}
+
+
diff --git a/svx/source/svrtf/segincr.asm b/svx/source/svrtf/segincr.asm
new file mode 100644
index 0000000000..35987c3ea8
--- /dev/null
+++ b/svx/source/svrtf/segincr.asm
@@ -0,0 +1,12 @@
+ EXTRN __AHINCR:abs
+ .MODEL LARGE
+STARTWS0_SEG SEGMENT WORD PUBLIC 'STARTWS_CODE'
+
+ PUBLIC _SegIncr
+_SegIncr PROC
+ MOV AX, __AHINCR
+ RET
+_SegIncr ENDP
+
+STARTWS0_SEG ENDS
+ END
diff --git a/svx/source/svrtf/svxrtf.cxx b/svx/source/svrtf/svxrtf.cxx
new file mode 100644
index 0000000000..bed5274d81
--- /dev/null
+++ b/svx/source/svrtf/svxrtf.cxx
@@ -0,0 +1,1337 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxrtf.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+
+#define ITEMID_FONT 0
+#include <ctype.h>
+
+#ifdef MAC
+#include "mac_start.h"
+
+#ifndef __TYPES__
+ #include <Types.h>
+#endif
+
+#ifndef __FONTS__
+ #include <Fonts.h>
+#endif
+
+#include "mac_end.h"
+#endif
+
+#ifndef _DATETIME_HXX //autogen
+#include <tools/datetime.hxx>
+#endif
+#ifndef _RTL_TENCINFO_H
+#include <rtl/tencinfo.h>
+#endif
+#ifndef _SFXDOCINF_HXX //autogen
+#include <sfx2/docinf.hxx>
+#endif
+#ifndef _SFXITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
+#ifndef _SFX_WHITER_HXX //autogen wg. SfxWhichIter
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _RTFTOKEN_H
+#include <svtools/rtftoken.h>
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+
+#include "fontitem.hxx"
+
+#include "svxrtf.hxx"
+#include "svxids.hrc"
+
+
+
+SV_IMPL_PTRARR( SvxRTFColorTbl, ColorPtr )
+SV_IMPL_PTRARR( SvxRTFItemStackList, SvxRTFItemStackType* )
+
+
+// -------------- Methoden --------------------
+
+SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn,
+ int bReadNewDoc )
+ : SvRTFParser( rIn, 5 ),
+ pAttrPool( &rPool ),
+ pInsPos( 0 ),
+ aColorTbl( 16, 4 ),
+ aFontTbl( 16, 4 ),
+ nVersionNo( 0 ),
+ pSfxInfo( 0 )
+{
+ bNewDoc = bReadNewDoc;
+
+ bChkStyleAttr = FALSE;
+ bCalcValue = FALSE;
+ bReadDocInfo = FALSE;
+
+ {
+ RTFPlainAttrMapIds aTmp( rPool );
+ aPlainMap.Insert( (USHORT*)&aTmp,
+ sizeof( RTFPlainAttrMapIds ) / sizeof(USHORT), 0 );
+ }
+ {
+ RTFPardAttrMapIds aTmp( rPool );
+ aPardMap.Insert( (USHORT*)&aTmp,
+ sizeof( RTFPardAttrMapIds ) / sizeof(USHORT), 0 );
+ }
+ pDfltFont = new Font;
+ pDfltColor = new Color;
+}
+
+SvxRTFParser::~SvxRTFParser()
+{
+ if( aColorTbl.Count() )
+ ClearColorTbl();
+ if( aFontTbl.Count() )
+ ClearFontTbl();
+ if( aStyleTbl.Count() )
+ ClearStyleTbl();
+ if( aAttrStack.Count() )
+ ClearAttrStack();
+
+ delete pInsPos;
+#ifndef SVX_LIGHT
+ delete pSfxInfo;
+#endif
+ delete pDfltFont;
+ delete pDfltColor;
+}
+
+void SvxRTFParser::SetInsPos( const SvxPosition& rNew )
+{
+ if( pInsPos )
+ delete pInsPos;
+ pInsPos = rNew.Clone();
+}
+
+SvParserState SvxRTFParser::CallParser()
+{
+ DBG_ASSERT( pInsPos, "keine Einfuegeposition" );
+
+ if( !pInsPos )
+ return SVPAR_ERROR;
+
+ if( aColorTbl.Count() )
+ ClearColorTbl();
+ if( aFontTbl.Count() )
+ ClearFontTbl();
+ if( aStyleTbl.Count() )
+ ClearStyleTbl();
+ if( aAttrStack.Count() )
+ ClearAttrStack();
+
+ bIsSetDfltTab = FALSE;
+ bNewGroup = FALSE;
+ nDfltFont = 0;
+
+ sBaseURL.Erase();
+
+ // erzeuge aus den gesetzten WhichIds die richtige WhichId-Tabelle.
+ BuildWhichTbl();
+
+ return SvRTFParser::CallParser();
+}
+
+void SvxRTFParser::Continue( int nToken )
+{
+ SvRTFParser::Continue( nToken );
+
+ if( SVPAR_PENDING != GetStatus() )
+ SetAllAttrOfStk();
+}
+
+
+// wird fuer jedes Token gerufen, das in CallParser erkannt wird
+void SvxRTFParser::NextToken( int nToken )
+{
+ sal_Unicode cCh;
+ switch( nToken )
+ {
+ case RTF_COLORTBL: ReadColorTable(); break;
+ case RTF_FONTTBL: ReadFontTable(); break;
+ case RTF_STYLESHEET: ReadStyleTable(); break;
+
+ case RTF_DEFF:
+ if( bNewDoc )
+ {
+ if( aFontTbl.Count() )
+ // koennen wir sofort setzen
+ SetDefault( nToken, (short)nTokenValue );
+ else
+ // wird nach einlesen der Fonttabelle gesetzt
+ nDfltFont = int(nTokenValue);
+ }
+ break;
+
+ case RTF_DEFTAB:
+ case RTF_DEFLANG:
+ if( bNewDoc )
+ SetDefault( nToken, (short)nTokenValue );
+ break;
+
+
+ case RTF_PICT: ReadBitmapData(); break;
+
+ case RTF_LINE: cCh = '\n'; goto INSINGLECHAR;
+ case RTF_TAB: cCh = '\t'; goto INSINGLECHAR;
+ case RTF_SUBENTRYINDEX: cCh = ':'; goto INSINGLECHAR;
+
+ case RTF_EMDASH: cCh = 151; goto INSINGLECHAR;
+ case RTF_ENDASH: cCh = 150; goto INSINGLECHAR;
+ case RTF_BULLET: cCh = 149; goto INSINGLECHAR;
+ case RTF_LQUOTE: cCh = 145; goto INSINGLECHAR;
+ case RTF_RQUOTE: cCh = 146; goto INSINGLECHAR;
+ case RTF_LDBLQUOTE: cCh = 147; goto INSINGLECHAR;
+ case RTF_RDBLQUOTE: cCh = 148; goto INSINGLECHAR;
+INSINGLECHAR:
+ aToken = ByteString::ConvertToUnicode( cCh,
+ RTL_TEXTENCODING_MS_1252 );
+
+ // kein Break, aToken wird als Text gesetzt
+ case RTF_TEXTTOKEN:
+ {
+ InsertText();
+ // alle angesammelten Attribute setzen
+ for( USHORT n = aAttrSetList.Count(); n; )
+ {
+ SvxRTFItemStackType* pStkSet = aAttrSetList[--n];
+ SetAttrSet( *pStkSet );
+ aAttrSetList.DeleteAndDestroy( n );
+ }
+ }
+ break;
+
+
+ case RTF_PAR:
+ InsertPara();
+ break;
+
+ case '{':
+ if( bNewGroup ) // Verschachtelung !!
+ _GetAttrSet();
+ bNewGroup = TRUE;
+ break;
+
+ case '}':
+ if( !bNewGroup ) // leere Gruppe ??
+ AttrGroupEnd();
+ bNewGroup = FALSE;
+ break;
+
+ case RTF_INFO:
+#ifndef SVX_LIGHT
+ if( bReadDocInfo && bNewDoc )
+ ReadInfo();
+ else
+#endif
+ SkipGroup();
+ break;
+
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // erstmal gesamt ueberlesen (muessen alle in einer Gruppe stehen !!)
+ // Koennen auch ohne dem IGNORE-Flag im RTF-File auftreten; alle Gruppen
+ // mit IGNORE-Flag werden im default-Zweig ueberlesen.
+
+ case RTF_SWG_PRTDATA:
+ case RTF_FIELD:
+ case RTF_ATNID:
+ case RTF_ANNOTATION:
+
+ case RTF_BKMKSTART:
+ case RTF_BKMKEND:
+ case RTF_BKMK_KEY:
+ case RTF_XE:
+ case RTF_TC:
+ case RTF_NEXTFILE:
+ case RTF_TEMPLATE:
+ case RTF_SHPRSLT: // RTF_SHP fehlt noch !!
+ SkipGroup();
+ break;
+ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ case RTF_PGDSCNO:
+ case RTF_PGBRK:
+ case RTF_SHADOW:
+ if( RTF_IGNOREFLAG != GetStackPtr( -1 )->nTokenId )
+ break;
+ nToken = SkipToken( -1 );
+ if( '{' == GetStackPtr( -1 )->nTokenId )
+ nToken = SkipToken( -1 );
+
+ ReadAttr( nToken, &GetAttrSet() );
+ break;
+
+ default:
+ switch( nToken & ~(0xff | RTF_SWGDEFS) )
+ {
+ case RTF_PARFMT: // hier gibts keine Swg-Defines
+ ReadAttr( nToken, &GetAttrSet() );
+ break;
+
+ case RTF_CHRFMT:
+ case RTF_BRDRDEF:
+ case RTF_TABSTOPDEF:
+
+ if( RTF_SWGDEFS & nToken)
+ {
+ if( RTF_IGNOREFLAG != GetStackPtr( -1 )->nTokenId )
+ break;
+ nToken = SkipToken( -1 );
+ if( '{' == GetStackPtr( -1 )->nTokenId )
+ {
+ nToken = SkipToken( -1 );
+ }
+ }
+ ReadAttr( nToken, &GetAttrSet() );
+ break;
+ default:
+ {
+ if( /*( '{' == GetStackPtr( -1 )->nTokenId ) ||*/
+ ( RTF_IGNOREFLAG == GetStackPtr( -1 )->nTokenId &&
+ '{' == GetStackPtr( -2 )->nTokenId ) )
+ SkipGroup();
+ }
+ break;
+ }
+ break;
+ }
+}
+
+void SvxRTFParser::ReadStyleTable()
+{
+ int nToken, bSaveChkStyleAttr = bChkStyleAttr;
+ short nStyleNo = 0;
+ int nOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
+ SvxRTFStyleType* pStyle = new SvxRTFStyleType( *pAttrPool, aWhichMap.GetData() );
+
+ bChkStyleAttr = FALSE; // Attribute nicht gegen die Styles checken
+
+ while( nOpenBrakets && IsParserWorking() )
+ {
+ switch( nToken = GetNextToken() )
+ {
+ case '}': if( --nOpenBrakets && IsParserWorking() )
+ // Style konnte vollstaendig gelesen werden,
+ // also ist das noch ein stabiler Status
+ SaveState( RTF_STYLESHEET );
+ break;
+ case '{':
+ {
+ if( RTF_IGNOREFLAG != GetNextToken() )
+ nToken = SkipToken( -1 );
+ else if( RTF_UNKNOWNCONTROL != ( nToken = GetNextToken() ) &&
+ RTF_PN != nToken )
+ nToken = SkipToken( -2 );
+ else
+ {
+ // gleich herausfiltern
+ ReadUnknownData();
+ nToken = GetNextToken();
+ if( '}' != nToken )
+ eState = SVPAR_ERROR;
+ break;
+ }
+ ++nOpenBrakets;
+ }
+ break;
+
+ case RTF_SBASEDON: pStyle->nBasedOn = USHORT(nTokenValue); break;
+ case RTF_SNEXT: pStyle->nNext = USHORT(nTokenValue); break;
+ case RTF_OUTLINELEVEL:
+ case RTF_SOUTLVL: pStyle->nOutlineNo = BYTE(nTokenValue); break;
+ case RTF_S: nStyleNo = (short)nTokenValue; break;
+ case RTF_CS: nStyleNo = (short)nTokenValue;
+ pStyle->bIsCharFmt = TRUE;
+ break;
+
+ case RTF_TEXTTOKEN:
+ {
+ pStyle->sName = DelCharAtEnd( aToken, ';' );
+
+/*
+??? soll man das umsetzen ???
+ if( !pStyle->sName.Len() )
+ pStyle->sName = "Standard";
+*/
+ // sollte die Nummer doppelt vergeben werden ?
+ if( aStyleTbl.Count() )
+ {
+ SvxRTFStyleType* pOldSt = aStyleTbl.Remove( nStyleNo );
+ if( pOldSt )
+ delete pOldSt;
+ }
+ // alle Daten vom Style vorhanden, also ab in die Tabelle
+ aStyleTbl.Insert( nStyleNo, pStyle );
+ pStyle = new SvxRTFStyleType( *pAttrPool, aWhichMap.GetData() );
+ nStyleNo = 0;
+ }
+ break;
+ default:
+ switch( nToken & ~(0xff | RTF_SWGDEFS) )
+ {
+ case RTF_PARFMT: // hier gibts keine Swg-Defines
+ ReadAttr( nToken, &pStyle->aAttrSet );
+ break;
+
+ case RTF_CHRFMT:
+ case RTF_BRDRDEF:
+ case RTF_TABSTOPDEF:
+
+ if( RTF_SWGDEFS & nToken)
+ {
+ if( RTF_IGNOREFLAG != GetStackPtr( -1 )->nTokenId )
+ break;
+ nToken = SkipToken( -1 );
+ if( '{' == GetStackPtr( -1 )->nTokenId )
+ {
+ nToken = SkipToken( -1 );
+ --nOpenBrakets; // korrigieren!!
+ }
+ }
+ ReadAttr( nToken, &pStyle->aAttrSet );
+ break;
+ }
+ break;
+ }
+ }
+ delete pStyle; // loesche das letze Style
+ SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
+
+ // Flag wieder auf alten Zustand
+ bChkStyleAttr = bSaveChkStyleAttr;
+}
+
+void SvxRTFParser::ReadColorTable()
+{
+ int nToken;
+ BYTE nRed = 0, nGreen = 0, nBlue = 0;
+
+ while( '}' != ( nToken = GetNextToken() ) && IsParserWorking() )
+ {
+ switch( nToken )
+ {
+ case RTF_RED: nRed = BYTE(nTokenValue); break;
+ case RTF_GREEN: nGreen = BYTE(nTokenValue); break;
+ case RTF_BLUE: nBlue = BYTE(nTokenValue); break;
+
+ case RTF_TEXTTOKEN: // oder sollte irgendein Unsin darumstehen?
+ if( 1 == aToken.Len()
+ ? aToken.GetChar( 0 ) != ';'
+ : STRING_NOTFOUND == aToken.Search( ';' ) )
+ break; // es muss zumindestens das ';' gefunden werden
+
+ // else kein break !!
+
+ case ';':
+ if( IsParserWorking() )
+ {
+ // eine Farbe ist Fertig, in die Tabelle eintragen
+ // versuche die Werte auf SV interne Namen zu mappen
+ ColorPtr pColor = 0;
+ if( !pColor )
+ pColor = new Color( nRed, nGreen, nBlue );
+ aColorTbl.Insert( pColor, aColorTbl.Count() );
+ nRed = 0, nGreen = 0, nBlue = 0;
+
+ // Color konnte vollstaendig gelesen werden,
+ // also ist das noch ein stabiler Status
+ SaveState( RTF_COLORTBL );
+ }
+ break;
+ }
+ }
+ SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
+}
+
+void SvxRTFParser::ReadFontTable()
+{
+ int nToken;
+ int nOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
+ Font* pFont = new Font();
+ short nFontNo;
+
+ while( nOpenBrakets && IsParserWorking() )
+ {
+ switch( ( nToken = GetNextToken() ))
+ {
+ case '}': if( --nOpenBrakets && IsParserWorking() )
+ // Style konnte vollstaendig gelesen werden,
+ // also ist das noch ein stabiler Status
+ SaveState( RTF_FONTTBL );
+ break;
+
+ case '{':
+ {
+ if( RTF_IGNOREFLAG != GetNextToken() )
+ nToken = SkipToken( -1 );
+ // Unknown und alle bekannten nicht ausgewerteten Gruppen
+ // sofort ueberspringen
+ else if( RTF_UNKNOWNCONTROL != ( nToken = GetNextToken() ) &&
+ RTF_PANOSE != nToken && RTF_FALT != nToken &&
+ RTF_FALT != nToken && RTF_FNAME != nToken &&
+ RTF_FONTEMB != nToken && RTF_FONTFILE != nToken )
+ nToken = SkipToken( -2 );
+ else
+ {
+ // gleich herausfiltern
+ ReadUnknownData();
+ nToken = GetNextToken();
+ if( '}' != nToken )
+ eState = SVPAR_ERROR;
+ break;
+ }
+ ++nOpenBrakets;
+ }
+ break;
+
+ case RTF_FROMAN: pFont->SetFamily( FAMILY_ROMAN ); break;
+ case RTF_FSWISS: pFont->SetFamily( FAMILY_SWISS ); break;
+ case RTF_FMODERN: pFont->SetFamily( FAMILY_MODERN ); break;
+ case RTF_FSCRIPT: pFont->SetFamily( FAMILY_SCRIPT ); break;
+ case RTF_FDECOR: pFont->SetFamily( FAMILY_DECORATIVE ); break;
+
+ // bei technischen/symbolischen Font wird der CharSet ungeschaltet!!
+ case RTF_FTECH: pFont->SetCharSet( RTL_TEXTENCODING_SYMBOL ); // kein break
+ case RTF_FNIL: pFont->SetFamily( FAMILY_DONTKNOW ); break;
+
+ case RTF_FCHARSET:
+ if( -1 != nTokenValue )
+ pFont->SetCharSet( rtl_getTextEncodingFromWindowsCharset(
+ (BYTE)nTokenValue ) );
+ break;
+
+// AlternativName
+// case RTF_FALT:
+// break;
+
+ case RTF_FPRQ:
+ switch( nTokenValue )
+ {
+ case 1: pFont->SetPitch( PITCH_FIXED ); break;
+ case 2: pFont->SetPitch( PITCH_VARIABLE ); break;
+ }
+ break;
+
+ case RTF_F: nFontNo = (short)nTokenValue; break;
+
+ case RTF_TEXTTOKEN:
+ {
+ if( DelCharAtEnd( aToken, ';' ).Len() )
+ {
+ // alle Daten vom Font vorhanden, also ab in die Tabelle
+ pFont->SetName( aToken );
+ aFontTbl.Insert( nFontNo, pFont );
+ pFont = new Font();
+ }
+ }
+ break;
+ }
+ }
+ // den letzen muessen wir selbst loeschen
+ delete pFont;
+ SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
+
+ // setze den default Font am Doc
+ if( bNewDoc && IsParserWorking() )
+ SetDefault( RTF_DEFF, nDfltFont );
+}
+
+void SvxRTFParser::ReadBitmapData()
+{
+ SvRTFParser::ReadBitmapData();
+}
+
+void SvxRTFParser::ReadOLEData()
+{
+ SvRTFParser::ReadOLEData();
+}
+
+String& SvxRTFParser::GetTextToEndGroup( String& rStr )
+{
+ rStr.Erase( 0 );
+ int nOpenBrakets = 1, nToken; // die erste wurde schon vorher erkannt !!
+
+ while( nOpenBrakets && IsParserWorking() )
+ {
+ switch( nToken = GetNextToken() )
+ {
+ case '}': --nOpenBrakets; break;
+ case '{':
+ {
+ // gleich herausfiltern
+ ReadUnknownData();
+ nToken = GetNextToken();
+ if( '}' != nToken )
+ eState = SVPAR_ERROR;
+ }
+ break;
+
+ case RTF_TEXTTOKEN:
+ rStr += aToken;
+ break;
+ }
+ }
+ SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
+ return rStr;
+}
+
+DateTime& SvxRTFParser::GetDateTimeStamp( DateTime& rDT )
+{
+ DateTime aDT;
+ BOOL bWeiter = TRUE;
+ int nToken;
+ while( bWeiter && IsParserWorking() )
+ {
+ switch( nToken = GetNextToken() )
+ {
+ case RTF_YR: aDT.SetYear( (USHORT)nTokenValue ); break;
+ case RTF_MO: aDT.SetMonth( (USHORT)nTokenValue ); break;
+ case RTF_DY: aDT.SetDay( (USHORT)nTokenValue ); break;
+ case RTF_HR: aDT.SetHour( (USHORT)nTokenValue ); break;
+ case RTF_MIN: aDT.SetMin( (USHORT)nTokenValue ); break;
+ default:
+ bWeiter = FALSE;
+ }
+ }
+ rDT = aDT;
+ SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
+ return rDT;
+}
+
+void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
+{
+#ifndef SVX_LIGHT
+ int nOpenBrakets = 1, nToken; // die erste wurde schon vorher erkannt !!
+ pSfxInfo = new SfxDocumentInfo;
+ String sStr, sComment;
+ long nVersNo;
+ SfxStamp aCreate, aModified;
+ DateTime aDT;
+
+ while( nOpenBrakets && IsParserWorking() )
+ {
+ switch( nToken = GetNextToken() )
+ {
+ case '}': --nOpenBrakets; break;
+ case '{':
+ {
+ if( RTF_IGNOREFLAG != GetNextToken() )
+ nToken = SkipToken( -1 );
+ else if( RTF_UNKNOWNCONTROL != GetNextToken() )
+ nToken = SkipToken( -2 );
+ else
+ {
+ // gleich herausfiltern
+ ReadUnknownData();
+ nToken = GetNextToken();
+ if( '}' != nToken )
+ eState = SVPAR_ERROR;
+ break;
+ }
+ ++nOpenBrakets;
+ }
+ break;
+
+ case RTF_TITLE:
+ pSfxInfo->SetTitle( GetTextToEndGroup( sStr ) );
+ break;
+ case RTF_SUBJECT:
+ pSfxInfo->SetTheme( GetTextToEndGroup( sStr ) );
+ break;
+ case RTF_AUTHOR:
+ aCreate.SetName( GetTextToEndGroup( sStr ) );
+ break;
+ case RTF_OPERATOR:
+ aModified.SetName( GetTextToEndGroup( sStr ) );
+ break;
+ case RTF_KEYWORDS:
+ pSfxInfo->SetKeywords( GetTextToEndGroup( sStr ) );
+ break;
+ case RTF_DOCCOMM:
+ pSfxInfo->SetComment( GetTextToEndGroup( sStr ) );
+ break;
+
+ case RTF_HLINKBASE:
+ sBaseURL = GetTextToEndGroup( sStr ) ;
+ break;
+
+ case RTF_CREATIM:
+ aCreate.SetTime( GetDateTimeStamp( aDT ) );
+ break;
+
+ case RTF_REVTIM:
+ aModified.SetTime( GetDateTimeStamp( aDT ) );
+ break;
+
+ case RTF_PRINTIM:
+ {
+ SfxStamp aTmp;
+ aTmp.SetTime( GetDateTimeStamp( aDT ) );
+ pSfxInfo->SetPrinted( aTmp );
+ }
+ break;
+
+ case RTF_COMMENT:
+ GetTextToEndGroup( sComment );
+ break;
+
+ case RTF_BUPTIM:
+ SkipGroup();
+ break;
+
+ case RTF_VERN:
+ nVersNo = nTokenValue;
+ break;
+
+ case RTF_EDMINS:
+ case RTF_ID:
+ case RTF_VERSION:
+ case RTF_NOFPAGES:
+ case RTF_NOFWORDS:
+ case RTF_NOFCHARS:
+ NextToken( nToken );
+ break;
+
+// default:
+ }
+ }
+
+ pSfxInfo->SetCreated( aCreate );
+ pSfxInfo->SetChanged( aModified );
+
+ if( pChkForVerNo &&
+ COMPARE_EQUAL == sComment.CompareToAscii( pChkForVerNo ))
+ nVersionNo = nVersNo;
+
+ SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
+#endif
+}
+
+
+void SvxRTFParser::ClearColorTbl()
+{
+ aColorTbl.DeleteAndDestroy( 0, aColorTbl.Count() );
+}
+
+void SvxRTFParser::ClearFontTbl()
+{
+ for( ULONG nCnt = aFontTbl.Count(); nCnt; )
+ delete aFontTbl.GetObject( --nCnt );
+}
+
+void SvxRTFParser::ClearStyleTbl()
+{
+ for( ULONG nCnt = aStyleTbl.Count(); nCnt; )
+ delete aStyleTbl.GetObject( --nCnt );
+}
+
+void SvxRTFParser::ClearAttrStack()
+{
+ SvxRTFItemStackType* pTmp;
+ for( ULONG nCnt = aAttrStack.Count(); nCnt; --nCnt )
+ {
+ pTmp = aAttrStack.Pop();
+ delete pTmp;
+ }
+}
+
+String& SvxRTFParser::DelCharAtEnd( String& rStr, const sal_Unicode cDel )
+{
+ if( rStr.Len() && ' ' == rStr.GetChar( 0 ))
+ rStr.EraseLeadingChars();
+ if( rStr.Len() && ' ' == rStr.GetChar( rStr.Len()-1 ))
+ rStr.EraseTrailingChars();
+ if( rStr.Len() && cDel == rStr.GetChar( rStr.Len()-1 ))
+ rStr.Erase( rStr.Len()-1 );
+ return rStr;
+}
+
+
+const Font& SvxRTFParser::GetFont( USHORT nId )
+{
+ const Font* pFont = aFontTbl.Get( nId );
+ if( !pFont )
+ {
+#ifdef MAC
+ Str255 aMacString;
+ GetFontName( nId, aMacString );
+ if( 0 != aMacString[0] ) // FontName gefunden ?
+ {
+ String aFontNm( aMacString.GetBuffer() + 1,
+ (xub_StrLen)aMacString.GetChar(0),
+ RTL_TEXTENCODING_APPLE_ROMAN );
+
+
+ pDfltFont->SetName( aFontNm );
+ pDfltFont->SetFamily( FAMILY_DONTKNOW );
+ }
+ else
+#endif
+ {
+ const SvxFontItem& rDfltFont = (const SvxFontItem&)
+ pAttrPool->GetDefaultItem(
+ ((RTFPlainAttrMapIds*)aPlainMap.GetData())->nFont );
+ pDfltFont->SetName( rDfltFont.GetStyleName() );
+ pDfltFont->SetFamily( rDfltFont.GetFamily() );
+ }
+ pFont = pDfltFont;
+ }
+ return *pFont;
+}
+
+SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr )
+{
+ SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ SvxRTFItemStackType* pNew;
+ if( pAkt )
+ pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, bCopyAttr );
+ else
+ pNew = new SvxRTFItemStackType( *pAttrPool, aWhichMap.GetData(), *pInsPos );
+
+ aAttrStack.Push( pNew );
+ bNewGroup = FALSE;
+ return pNew;
+}
+
+
+void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType )
+{
+ // check attributes to the attributes of the stylesheet or to
+ // the default attrs of the document
+ SfxItemSet &rSet = rStkType.GetAttrSet();
+ const SfxItemPool& rPool = *rSet.GetPool();
+ const SfxPoolItem* pItem;
+ SfxWhichIter aIter( rSet );
+
+ SvxRTFStyleType* pStyle;
+ if( !IsChkStyleAttr() ||
+ !rStkType.GetAttrSet().Count() ||
+ 0 == ( pStyle = aStyleTbl.Get( rStkType.nStyleNo ) ))
+ {
+ for( USHORT nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() )
+ {
+ if( SFX_WHICH_MAX > nWhich &&
+ SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem ) &&
+ rPool.GetDefaultItem( nWhich ) == *pItem )
+ rSet.ClearItem( nWhich ); // loeschen
+ }
+ }
+ else
+ {
+ // alle Attribute, die schon vom Style definiert sind, aus dem
+ // akt. AttrSet entfernen
+ SfxItemSet &rStyleSet = pStyle->aAttrSet;
+ const SfxPoolItem* pSItem;
+ for( USHORT nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() )
+ {
+ if( SFX_ITEM_SET == rStyleSet.GetItemState( nWhich, TRUE, &pSItem ))
+ {
+ // JP 22.06.99: im Style und im Set gleich gesetzt -> loeschen
+ if( SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem )
+ && *pItem == *pSItem )
+ rSet.ClearItem( nWhich ); // loeschen
+ }
+ // Bug 59571 - falls nicht im Style gesetzt und gleich mit
+ // dem PoolDefault -> auch dann loeschen
+ else if( SFX_WHICH_MAX > nWhich &&
+ SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE, &pItem ) &&
+ rPool.GetDefaultItem( nWhich ) == *pItem )
+ rSet.ClearItem( nWhich ); // loeschen
+ }
+ }
+}
+
+void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen
+{
+ if( aAttrStack.Count() )
+ {
+ SvxRTFItemStackType *pOld = aAttrStack.Pop();
+ SvxRTFItemStackType *pAkt = aAttrStack.Top();
+
+ do { // middle check loop
+ ULONG nOldSttNdIdx = pOld->pSttNd->GetIdx();
+ if( !pOld->pChildList &&
+ ((!pOld->aAttrSet.Count() && !pOld->nStyleNo ) ||
+ (nOldSttNdIdx == pInsPos->GetNodeIdx() &&
+ pOld->nSttCnt == pInsPos->GetCntIdx() )))
+ break; // keine Attribute oder Bereich
+
+ // setze nur die Attribute, die unterschiedlich zum Parent sind
+ if( pAkt && pOld->aAttrSet.Count() )
+ {
+ SfxItemIter aIter( pOld->aAttrSet );
+ const SfxPoolItem* pItem = aIter.GetCurItem(), *pGet;
+ while( TRUE )
+ {
+ if( SFX_ITEM_SET == pAkt->aAttrSet.GetItemState(
+ pItem->Which(), FALSE, &pGet ) &&
+ *pItem == *pGet )
+ pOld->aAttrSet.ClearItem( pItem->Which() );
+
+ if( aIter.IsAtEnd() )
+ break;
+ pItem = aIter.NextItem();
+ }
+
+ if( !pOld->aAttrSet.Count() && !pOld->pChildList &&
+ !pOld->nStyleNo )
+ break;
+ }
+
+ // setze alle Attribute, die von Start bis hier
+ // definiert sind.
+ int bCrsrBack = !pInsPos->GetCntIdx();
+ if( bCrsrBack )
+ {
+ // am Absatzanfang ? eine Position zurueck
+ ULONG nNd = pInsPos->GetNodeIdx();
+ MovePos( FALSE );
+ // if can not move backward then later dont move forward !
+ bCrsrBack = nNd != pInsPos->GetNodeIdx();
+ }
+
+ //Bug #46608#: ungueltige Bereiche ignorieren!
+ if( ( pOld->pSttNd->GetIdx() < pInsPos->GetNodeIdx() ||
+ ( pOld->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
+ pOld->nSttCnt <= pInsPos->GetCntIdx() ))
+#if 0
+//BUG 68555 - dont test for empty paragraph or any range
+ && ( nOldSttNdIdx != pInsPos->GetNodeIdx() ||
+ pOld->nSttCnt != pInsPos->GetCntIdx() ||
+ !pOld->nSttCnt )
+#endif
+ )
+ {
+ if( !bCrsrBack )
+ {
+ // alle pard-Attribute gelten nur bis zum vorherigen
+ // Absatz !!
+ if( nOldSttNdIdx == pInsPos->GetNodeIdx() )
+ {
+#if 0
+//BUG 68555 - dont reset pard attrs, if the group not begins not at start of
+// paragraph
+ // Bereich innerhalb eines Absatzes:
+ // alle Absatz-Attribute und StyleNo loeschen
+ // aber nur wenn mitten drin angefangen wurde
+ if( pOld->nSttCnt )
+ {
+ pOld->nStyleNo = 0;
+ for( USHORT n = 0; n < aPardMap.Count() &&
+ pOld->aAttrSet.Count(); ++n )
+ if( aPardMap[n] )
+ pOld->aAttrSet.ClearItem( aPardMap[n] );
+
+ if( !pOld->aAttrSet.Count() && !pOld->pChildList &&
+ !pOld->nStyleNo )
+ break; // auch dieser verlaesst uns jetzt
+ }
+#endif
+ }
+ else
+ {
+ // jetzt wirds kompliziert:
+ // - alle Zeichen-Attribute behalten den Bereich,
+ // - alle Absatz-Attribute bekommen den Bereich
+ // bis zum vorherigen Absatz
+ SvxRTFItemStackType* pNew = new SvxRTFItemStackType(
+ *pOld, *pInsPos, TRUE );
+ pNew->aAttrSet.SetParent( pOld->aAttrSet.GetParent() );
+
+ // loesche aus pNew alle Absatz Attribute
+ for( USHORT n = 0; n < aPardMap.Count() &&
+ pNew->aAttrSet.Count(); ++n )
+ if( aPardMap[n] )
+ pNew->aAttrSet.ClearItem( aPardMap[n] );
+
+ // gab es ueberhaupt welche ?
+ if( pNew->aAttrSet.Count() == pOld->aAttrSet.Count() )
+ delete pNew; // das wars dann
+ else
+ {
+ pNew->nStyleNo = 0;
+
+ // spanne jetzt den richtigen Bereich auf
+ // pNew von alter
+ SetEndPrevPara( pOld->pEndNd, pOld->nEndCnt );
+ pNew->nSttCnt = 0;
+
+ if( IsChkStyleAttr() )
+ _ClearStyleAttr( *pOld );
+
+ if( pAkt )
+ {
+ pAkt->Add( pOld );
+ pAkt->Add( pNew );
+ }
+ else
+ {
+ // letzter vom Stack, also zwischenspeichern, bis der
+ // naechste Text eingelesen wurde. (keine Attribute
+ // aufspannen!!)
+ aAttrSetList.Insert( pOld, aAttrSetList.Count() );
+ aAttrSetList.Insert( pNew, aAttrSetList.Count() );
+ }
+ pOld = 0; // pOld nicht loeschen
+ break; // das wars !!
+ }
+ }
+ }
+
+ pOld->pEndNd = pInsPos->MakeNodeIdx();
+ pOld->nEndCnt = pInsPos->GetCntIdx();
+
+ if( IsChkStyleAttr() )
+ _ClearStyleAttr( *pOld );
+
+ if( pAkt )
+ pAkt->Add( pOld );
+ else
+ // letzter vom Stack, also zwischenspeichern, bis der
+ // naechste Text eingelesen wurde. (keine Attribute
+ // aufspannen!!)
+ aAttrSetList.Insert( pOld, aAttrSetList.Count() );
+
+ pOld = 0;
+ }
+
+ if( bCrsrBack )
+ // am Absatzanfang ? eine Position zurueck
+ MovePos( TRUE );
+
+ } while( FALSE );
+
+ if( pOld )
+ delete pOld;
+
+ bNewGroup = FALSE;
+ }
+}
+
+void SvxRTFParser::SetAllAttrOfStk() // end all Attr. and set it into doc
+{
+ // noch alle Attrbute vom Stack holen !!
+ while( aAttrStack.Count() )
+ AttrGroupEnd();
+
+ for( USHORT n = aAttrSetList.Count(); n; )
+ {
+ SvxRTFItemStackType* pStkSet = aAttrSetList[--n];
+ SetAttrSet( *pStkSet );
+ aAttrSetList.DeleteAndDestroy( n );
+ }
+}
+
+// setzt alle Attribute, die unterschiedlich zum aktuellen sind
+void SvxRTFParser::SetAttrSet( SvxRTFItemStackType &rSet )
+{
+ // wurde DefTab nie eingelesen? dann setze auf default
+ if( !bIsSetDfltTab )
+ SetDefault( RTF_DEFTAB, 720 );
+
+ if( rSet.pChildList )
+ rSet.Compress( *this );
+ if( rSet.aAttrSet.Count() || rSet.nStyleNo )
+ SetAttrInDoc( rSet );
+
+ // dann mal alle Childs abarbeiten
+ if( rSet.pChildList )
+ for( USHORT n = 0; n < rSet.pChildList->Count(); ++n )
+ SetAttrSet( *(*rSet.pChildList)[ n ] );
+}
+
+ // wurde noch kein Text eingefuegt ? (SttPos vom obersten StackEintrag!)
+int SvxRTFParser::IsAttrSttPos()
+{
+ SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ return !pAkt || (pAkt->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
+ pAkt->nSttCnt == pInsPos->GetCntIdx());
+}
+
+
+void SvxRTFParser::SetAttrInDoc( SvxRTFItemStackType & )
+{
+}
+
+#ifdef USED
+void SvxRTFParser::SaveState( int nToken )
+{
+ SvRTFParser::SaveState( nToken );
+}
+
+void SvxRTFParser::RestoreState()
+{
+ SvRTFParser::RestoreState();
+}
+#endif
+
+void SvxRTFParser::BuildWhichTbl()
+{
+ if( aWhichMap.Count() )
+ aWhichMap.Remove( 0, aWhichMap.Count() );
+ aWhichMap.Insert( (USHORT)0, (USHORT)0 );
+
+ // Aufbau einer Which-Map 'rWhichMap' aus einem Array von
+ // 'pWhichIds' von Which-Ids. Es hat die Lange 'nWhichIds'.
+ // Die Which-Map wird nicht geloescht.
+ SvParser::BuildWhichTbl( aWhichMap, (USHORT*)aPardMap.GetData(), aPardMap.Count() );
+ SvParser::BuildWhichTbl( aWhichMap, (USHORT*)aPlainMap.GetData(), aPlainMap.Count() );
+}
+
+/* */
+
+SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange )
+ : aAttrSet( rPool, pWhichRange )
+{
+ nOutlineNo = BYTE(-1); // nicht gesetzt
+ nBasedOn = 0;
+ nNext = 0;
+ bIsCharFmt = FALSE;
+}
+
+
+SvxRTFItemStackType::SvxRTFItemStackType(
+ SfxItemPool& rPool, const USHORT* pWhichRange,
+ const SvxPosition& rPos )
+ : aAttrSet( rPool, pWhichRange ),
+ pChildList( 0 ),
+ nStyleNo( 0)
+{
+ pSttNd = rPos.MakeNodeIdx();
+ nSttCnt = rPos.GetCntIdx();
+ pEndNd = pSttNd;
+ nEndCnt = nSttCnt;
+}
+
+SvxRTFItemStackType::SvxRTFItemStackType(
+ const SvxRTFItemStackType& rCpy,
+ const SvxPosition& rPos,
+ int bCopyAttr )
+ : aAttrSet( *rCpy.aAttrSet.GetPool(), rCpy.aAttrSet.GetRanges() ),
+ pChildList( 0 ),
+ nStyleNo( rCpy.nStyleNo )
+{
+ pSttNd = rPos.MakeNodeIdx();
+ nSttCnt = rPos.GetCntIdx();
+ pEndNd = pSttNd;
+ nEndCnt = nSttCnt;
+
+ aAttrSet.SetParent( &rCpy.aAttrSet );
+ if( bCopyAttr )
+ aAttrSet.Put( rCpy.aAttrSet );
+}
+
+SvxRTFItemStackType::~SvxRTFItemStackType()
+{
+ if( pChildList )
+ delete pChildList;
+ if( pSttNd != pEndNd )
+ delete pEndNd;
+ delete pSttNd;
+}
+
+void SvxRTFItemStackType::Add( SvxRTFItemStackType* pIns )
+{
+ if( !pChildList )
+ pChildList = new SvxRTFItemStackList;
+ pChildList->Insert( pIns, pChildList->Count() );
+}
+
+void SvxRTFItemStackType::SetStartPos( const SvxPosition& rPos )
+{
+ delete pSttNd;
+ pSttNd = rPos.MakeNodeIdx();
+ nSttCnt = rPos.GetCntIdx();
+ pEndNd = pSttNd;
+ nEndCnt = nEndCnt;
+}
+
+
+void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser )
+{
+ DBG_ASSERT( pChildList, "es gibt keine ChildListe" );
+
+ USHORT n;
+ SvxRTFItemStackType* pTmp = (*pChildList)[0];
+
+ if( !pTmp->aAttrSet.Count() ||
+ pSttNd->GetIdx() != pTmp->pSttNd->GetIdx() ||
+ nSttCnt != pTmp->nSttCnt )
+ return;
+
+ SvxNodeIdx* pLastNd = pTmp->pEndNd;
+ xub_StrLen nLastCnt = pTmp->nEndCnt;
+
+ SfxItemSet aMrgSet( pTmp->aAttrSet );
+ for( n = 1; n < pChildList->Count(); ++n )
+ {
+ pTmp = (*pChildList)[n];
+ if( pTmp->pChildList )
+ pTmp->Compress( rParser );
+
+ if( !pTmp->nSttCnt
+ ? (pLastNd->GetIdx()+1 != pTmp->pSttNd->GetIdx() ||
+ !rParser.IsEndPara( pLastNd, nLastCnt ) )
+ : ( pTmp->nSttCnt != nLastCnt ||
+ pLastNd->GetIdx() != pTmp->pSttNd->GetIdx() ))
+ {
+ while( ++n < pChildList->Count() )
+ if( (pTmp = (*pChildList)[n])->pChildList )
+ pTmp->Compress( rParser );
+ return;
+ }
+
+ if( n )
+ {
+ // suche alle, die ueber den gesamten Bereich gesetzt sind
+ SfxItemIter aIter( aMrgSet );
+ const SfxPoolItem* pItem;
+ do {
+ USHORT nWhich = aIter.GetCurItem()->Which();
+ if( SFX_ITEM_SET != pTmp->aAttrSet.GetItemState( nWhich,
+ FALSE, &pItem ) || *pItem != *aIter.GetCurItem() )
+ aMrgSet.ClearItem( nWhich );
+
+ if( aIter.IsAtEnd() )
+ break;
+ aIter.NextItem();
+ } while( TRUE );
+
+ if( !aMrgSet.Count() )
+ return;
+ }
+
+ pLastNd = pTmp->pEndNd;
+ nLastCnt = pTmp->nEndCnt;
+ }
+
+ if( pEndNd->GetIdx() != pLastNd->GetIdx() || nEndCnt != nLastCnt )
+ return;
+
+ // es kann zusammengefasst werden
+ aAttrSet.Put( aMrgSet );
+
+ for( n = 0; n < pChildList->Count(); ++n )
+ {
+ pTmp = (*pChildList)[n];
+ pTmp->aAttrSet.Differentiate( aMrgSet );
+
+ if( !pTmp->pChildList && !pTmp->aAttrSet.Count() && !pTmp->nStyleNo )
+ {
+ pChildList->Remove( n );
+ delete pTmp;
+ --n;
+ continue;
+ }
+ }
+ if( !pChildList->Count() )
+ {
+ delete pChildList;
+ pChildList = 0;
+ }
+}
+
+/* */
+
+RTFPlainAttrMapIds::RTFPlainAttrMapIds( const SfxItemPool& rPool )
+{
+ nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, FALSE );
+ nBgColor = 0;
+ nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, FALSE );
+ nContour = rPool.GetTrueWhich( SID_ATTR_CHAR_CONTOUR, FALSE );
+ nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, FALSE );
+ nEscapement = rPool.GetTrueWhich( SID_ATTR_CHAR_ESCAPEMENT, FALSE );
+ nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, FALSE );
+ nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, FALSE );
+ nKering = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, FALSE );
+ nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, FALSE );
+ nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, FALSE );
+ nShadowed = rPool.GetTrueWhich( SID_ATTR_CHAR_SHADOWED, FALSE );
+ nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, FALSE );
+ nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, FALSE );
+ nWordlineMode = rPool.GetTrueWhich( SID_ATTR_CHAR_WORDLINEMODE, FALSE );
+ nAutoKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_AUTOKERN, FALSE );
+}
+
+RTFPardAttrMapIds ::RTFPardAttrMapIds ( const SfxItemPool& rPool )
+{
+ nLinespacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, FALSE );
+ nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, FALSE );
+ nTabStop = rPool.GetTrueWhich( SID_ATTR_TABSTOP, FALSE );
+ nHyphenzone = rPool.GetTrueWhich( SID_ATTR_PARA_HYPHENZONE, FALSE );
+ nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, FALSE );
+ nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, FALSE );
+ nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, FALSE );
+ nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, FALSE );
+ nShadow = rPool.GetTrueWhich( SID_ATTR_BORDER_SHADOW, FALSE );
+ nOutlineLvl = rPool.GetTrueWhich( SID_ATTR_PARA_OUTLLEVEL, FALSE );
+ nSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, FALSE );
+ nKeep = rPool.GetTrueWhich( SID_ATTR_PARA_KEEP, FALSE );
+}
+
+
diff --git a/svx/source/svxlink/fileobj.cxx b/svx/source/svxlink/fileobj.cxx
new file mode 100644
index 0000000000..874e1751ab
--- /dev/null
+++ b/svx/source/svxlink/fileobj.cxx
@@ -0,0 +1,1009 @@
+/*************************************************************************
+ *
+ * $RCSfile: fileobj.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+
+#ifdef OS2
+#include <vcl/sysdep.hxx>
+#endif
+
+
+#ifndef _SV_WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+#ifndef _FILTER_HXX //autogen
+#include <svtools/filter.hxx>
+#endif
+#ifndef _SOERR_HXX //autogen
+#include <so3/soerr.hxx>
+#endif
+#ifndef _LNKBASE_HXX //autogen
+#include <so3/lnkbase.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_PROGRESS_HXX //autogen
+#include <sfx2/progress.hxx>
+#endif
+#ifndef _SFX_INTERNO_HXX //autogen
+#include <sfx2/interno.hxx>
+#endif
+#ifndef _SFX_DOCFILT_HACK_HXX //autogen
+#include <sfx2/docfilt.hxx>
+#endif
+
+#include "fileobj.hxx"
+#include "linkmgr.hxx"
+#include "fobjcach.hxx"
+#include "dialmgr.hxx"
+#include "dialogs.hrc"
+#include "xoutbmp.hxx" // XOutBitmap
+#include "impgrf.hxx"
+#include "dialdll.hxx"
+
+// es gibt wohl ein paar Compiler-Fehler beim optimieren
+#pragma optimize( "", off )
+
+#define FILETYPE_TEXT 1
+#define FILETYPE_GRF 2
+
+class SvxFileObjProgress_Impl : public SfxProgress
+{
+public:
+ SvxFileObjProgress_Impl( const String& rStr )
+ : SfxProgress( 0, rStr, 100, TRUE, FALSE )
+ {}
+
+ DECL_STATIC_LINK( SvxFileObjProgress_Impl, UpdatePercentHdl, GraphicFilter* );
+};
+
+
+class ImplGrfCastBaseLink : public SvBaseLink
+{
+public:
+ ImplGrfCastBaseLink() : SvBaseLink( 0, 0 ) {}
+ void SetObject( SvPseudoObject* pObj ) { SetObj( pObj ); }
+};
+
+struct Impl_DownLoadData
+{
+ Graphic aGrf;
+ Timer aTimer;
+
+ Impl_DownLoadData( const Link& rLink )
+ {
+ aTimer.SetTimeout( 100 );
+ aTimer.SetTimeoutHdl( rLink );
+ aGrf.SetDefaultType();
+ }
+ ~Impl_DownLoadData()
+ {
+ aTimer.Stop();
+ }
+};
+
+// --------------------------------------------------------------------------
+
+
+SvFileObject::SvFileObject()
+ : nType( FILETYPE_TEXT ), pDownLoadData( 0 )
+{
+ bLoadAgain = bMedUseCache = TRUE;
+ bSynchron = bLoadError = bWaitForData = bDataReady = bNativFormat =
+ bClearMedium = bProgress = FALSE;
+}
+
+
+SvFileObject::~SvFileObject()
+{
+ if ( xMed.Is() )
+ {
+ xMed->SetDataAvailableLink( Link() );
+ xMed->SetDoneLink( Link() );
+ xMed.Clear();
+ }
+ delete pDownLoadData;
+}
+
+
+const SvDataTypeList & SvFileObject::GetTypeList() const
+{
+ return aTypeList;
+}
+
+
+BOOL SvFileObject::GetData( SvData * pSvData )
+{
+ aTypeList.Clear();
+ switch( nType )
+ {
+ case FILETYPE_TEXT:
+ if( FORMAT_FILE == pSvData->GetFormat() )
+ {
+ // das Medium muss in der Applikation geoffnet werden, um die
+ // relativen Datei Links aufzuloesen!!!! Wird ueber den
+ // LinkManager und damit von dessen Storage erledigt.
+ pSvData->SetData( sFileNm );
+
+/*
+===========================================================================
+JP 28.02.96: noch eine Baustelle:
+ Idee: hier das Medium und die DocShell anlegen, Doc laden
+ und ueber OLE-SS (GetObj(...)) den Bereich als
+ PseudoObject erfragen. Dieses mit den Daten oder
+ dessen Daten verschicken.
+
+===========================================================================
+
+ SfxMedium aMed( aFileNm.GetFull(), STREAM_READ, TRUE );
+ aMed.DownLoad(); // nur mal das Medium anfassen (DownLoaden)
+
+ if( aMed.IsStorage() )
+ pSvData->SetData( SvStorageRef( aMed.GetStorage() ),
+ TRANSFER_COPY );
+ else
+ {
+ SvStream* pStream = aMed.GetInStream();
+ if( !pStream )
+ return FALSE;
+
+ UINT32 nLen = pStream->Seek( STREAM_SEEK_TO_END );
+ pStream->Seek( STREAM_SEEK_TO_BEGIN );
+
+ void* pData = SvMemAlloc( nLen );
+ pStream->Read( pData, nLen );
+ pSvData->SetData( pData, nLen, TRANSFER_MOVE );
+ }
+*/
+ aTypeList.Append( *pSvData );
+ }
+ break;
+
+ case FILETYPE_GRF:
+ if( !bLoadError )
+ {
+ SfxMediumRef xTmpMed;
+ ULONG nFmt = pSvData->GetFormat(),
+ nGrfFmtId = Graphic::RegisterClipboardFormatName();
+
+ if( FORMAT_GDIMETAFILE == nFmt || FORMAT_BITMAP == nFmt ||
+ nGrfFmtId == nFmt )
+ {
+ Graphic aGrf;
+
+ //JP 15.07.98: Bug 52959
+ // falls das Nativformat doch erwuenscht ist, muss am
+ // Ende das Flag zurueckgesetzt werden.
+ BOOL bOldNativFormat = bNativFormat;
+ bNativFormat = 0 != (ASPECT_ICON & pSvData->GetAspect());
+
+ // falls gedruckt werden soll, warten wir bis die
+ // Daten vorhanden sind
+ if( ASPECT_DOCPRINT & pSvData->GetAspect() )
+ {
+
+ // testhalber mal ein LoadFile rufen um das nach-
+ // laden ueberahaupt anzustossen
+ if( !xMed.Is() )
+ {
+ LoadFile_Impl();
+ if( xMed.Is() )
+ // dann mit der hoechsten Prioritaet
+ xMed->SetTransferPriority( SFX_TFPRIO_VISIBLE_LOWRES_GRAPHIC );
+ }
+
+ xTmpMed = xMed;
+ while( bWaitForData )
+ Application::Reschedule();
+
+ xMed = xTmpMed;
+ }
+
+ if( pDownLoadData ||
+ ( !bWaitForData && ( xMed.Is() || // wurde als URL geladen
+ ( bSynchron && LoadFile_Impl() && xMed.Is() ) )) )
+ {
+ // falls
+
+ // falls es uebers Internet gesogen wurde, nicht
+ // wieder versuchen
+ bLoadAgain = !xMed->IsRemote();
+ bLoadError = !GetGraphic_Impl( aGrf, xMed->GetInStream() );
+ if( bLoadError )
+ GetCache()->Remove( *this );
+ }
+ else if( !LoadFile_Impl() ||
+ !GetGraphic_Impl( aGrf, xMed.Is() ? xMed->GetInStream() : 0 ))
+ {
+ if( !xMed.Is() )
+ break;
+ aGrf.SetDefaultType();
+ }
+
+ if( nGrfFmtId != nFmt )
+ nFmt = (bLoadError || GRAPHIC_BITMAP == aGrf.GetType())
+ ? FORMAT_BITMAP
+ : FORMAT_GDIMETAFILE;
+
+ GDIMetaFile aMeta;
+ Bitmap aBmp;
+ SvData aData( nFmt );
+ if( nGrfFmtId == nFmt )
+ aData.SetData( &aGrf, TRANSFER_REFERENCE );
+ else if( FORMAT_BITMAP == nFmt )
+ {
+ aBmp = aGrf.GetBitmap();
+ aData.SetData( &aBmp, TRANSFER_REFERENCE );
+ }
+ else
+ {
+ aMeta = aGrf.GetGDIMetaFile();
+ aData.SetData( &aMeta, TRANSFER_REFERENCE );
+ }
+
+ *pSvData = aData;
+ aTypeList.Append( *pSvData );
+
+ bNativFormat = bOldNativFormat;
+
+ // alles fertig?
+ if( xMed.Is() && !bSynchron && bClearMedium )
+ {
+ xMed.Clear();
+ bClearMedium = FALSE;
+ }
+ }
+ }
+ break;
+ }
+ return 0 != aTypeList.Count();
+}
+
+
+
+
+BOOL SvFileObject::Connect( SvBaseLink& rLink )
+{
+ if( !rLink.GetLinkManager() )
+ return FALSE;
+
+ // teste doch mal, ob nicht ein anderer Link mit der gleichen
+ // Verbindung schon existiert
+ rLink.GetLinkManager()->GetDisplayNames( rLink, 0, &sFileNm, 0, &sFilter );
+
+ SvPseudoObject* pObj = this;
+ if( OBJECT_CLIENT_GRF == rLink.GetObjType() )
+ {
+ if( !rLink.IsUseCache() )
+ bMedUseCache = FALSE;
+
+ // Reload-Erkennung ???
+ SvPersist* pPersist = rLink.GetLinkManager()->GetCacheContainer();
+ SvInPlaceObjectRef aRef( pPersist );
+ if( aRef.Is() )
+ {
+ SfxObjectShell* pShell = ((SfxInPlaceObject*)&aRef)->GetObjectShell();
+ if( pShell->IsAbortingImport() )
+ return FALSE;
+
+ if( pShell->IsReloading() )
+ bMedUseCache = FALSE;
+
+ if( pShell->GetMedium() )
+ sReferer = pShell->GetMedium()->GetName();
+ }
+
+ FileObjCacheEntry_Impl* pEntry = GetCache()->Insert( *this, sFileNm );
+ pObj = pEntry->GetObject();
+ }
+
+ if( pObj == this )
+ {
+ switch( rLink.GetObjectType() )
+ {
+ case OBJECT_CLIENT_GRF:
+ nType = FILETYPE_GRF;
+ bSynchron = rLink.IsSynchron();
+ break;
+
+ case OBJECT_CLIENT_FILE:
+ nType = FILETYPE_TEXT;
+ break;
+
+ default:
+ return FALSE;
+ }
+
+ SetUpdateTimeout( 0 );
+ }
+ else
+ bProgress = FALSE;
+
+ // und jetzt bei diesem oder gefundenem Pseudo-Object anmelden
+ pObj->AddDataAdvise( &rLink, rLink.GetContentType(),
+ (bProgress ? ADVISEMODE_ONLYONCE : 0 ));
+ // um ueber Status-Aenderungen informiert zu werden
+ pObj->AddDataAdvise( &rLink, SvxLinkManager::RegisterStatusInfoId(),
+ ADVISEMODE_ONLYONCE );
+ pObj->AddConnectAdvise( &rLink, ADVISE_CLOSED );
+
+ if( pObj != this )
+ // am Link das richtige Object setzen
+ ((ImplGrfCastBaseLink&)rLink).SetObject( pObj );
+
+ return TRUE;
+}
+
+
+BOOL SvFileObject::LoadFile_Impl()
+{
+ // wir sind noch im Laden!!
+ if( bWaitForData || !bLoadAgain || xMed.Is() || pDownLoadData )
+ return FALSE;
+
+ // z.Z. nur auf die aktuelle DocShell
+ xMed = new SfxMedium( sFileNm, STREAM_STD_READ, TRUE );
+ // Keinen Eintrag im Roter Button Menu
+ xMed->SetDontCreateCancellable();
+ xMed->SetUsesCache( bMedUseCache );
+ if( sReferer.Len() )
+ xMed->SetReferer( sReferer );
+ // erstmal mit der niedrigsten Prioritaet
+ xMed->SetTransferPriority( SFX_TFPRIO_INVISIBLE_HIGHRES_GRAPHIC );
+
+ if( !bSynchron )
+ {
+ bLoadAgain = bDataReady = bInNewData = FALSE;
+ bWaitForData = TRUE;
+
+ SfxMediumRef xTmpMed = xMed;
+ xMed->SetDataAvailableLink( STATIC_LINK( this, SvFileObject, LoadGrfNewData_Impl ) );
+ xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) );
+
+ bClearMedium = !xMed.Is();
+ if( bClearMedium )
+ xMed = xTmpMed; // falls gleich im DownLoad schon schluss ist
+ return bDataReady;
+ }
+
+ bWaitForData = TRUE;
+ bDataReady = bInNewData = FALSE;
+ xMed->DownLoad();
+ bLoadAgain = !xMed->IsRemote();
+ bWaitForData = FALSE;
+
+ // Grafik ist fertig, also DataChanged von der Statusaederung schicken:
+ SendStateChg_Impl( xMed->GetInStream() && xMed->GetInStream()->GetError()
+ ? STATE_LOAD_ERROR : STATE_LOAD_OK );
+
+ return TRUE;
+}
+
+
+BOOL SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
+{
+ Link aPercentLnk;
+ GraphicFilter* pGF = GetGrfFilter();
+ SvxFileObjProgress_Impl* pProgress = 0;
+ if( bProgress && !SfxGetpApp()->GetProgress() )
+ {
+ pProgress = new SvxFileObjProgress_Impl(
+ String( ResId( RID_SVXSTR_GRFLINKPROGRESS, DIALOG_MGR() ) ) );
+
+ aPercentLnk = pGF->GetUpdatePercentHdl();
+ pGF->SetUpdatePercentHdl(
+ STATIC_LINK( pProgress, SvxFileObjProgress_Impl, UpdatePercentHdl ));
+ }
+
+ const int nFilter = sFilter.Len() && pGF->GetImportFormatCount()
+ ? pGF->GetImportFormatNumber( sFilter )
+ : GRFILTER_FORMAT_DONTKNOW;
+
+ String aEmptyStr;
+ int nRes;
+
+ // vermeiden, dass ein native Link angelegt wird
+ if( ( !pStream || !pDownLoadData ) && !rGrf.IsLink() &&
+ !rGrf.GetContext() && !bNativFormat )
+ rGrf.SetLink( GfxLink() );
+
+ if( !pStream )
+ nRes = xMed.Is() ? GRFILTER_OPENERROR
+ : pGF->ImportGraphic( rGrf, sFileNm, nFilter );
+ else if( !pDownLoadData )
+ {
+ pStream->Seek( STREAM_SEEK_TO_BEGIN );
+ nRes = pGF->ImportGraphic( rGrf, aEmptyStr, *pStream, nFilter );
+ }
+ else
+ {
+ nRes = pGF->ImportGraphic( pDownLoadData->aGrf, aEmptyStr,
+ *pStream, nFilter );
+
+ if( pDownLoadData )
+ {
+ rGrf = pDownLoadData->aGrf;
+ if( GRAPHIC_NONE == rGrf.GetType() )
+ rGrf.SetDefaultType();
+
+
+ if( !pDownLoadData->aGrf.GetContext() )
+ {
+ xMed->SetDataAvailableLink( Link() );
+// xMed->SetDoneLink( Link() );
+ delete pDownLoadData, pDownLoadData = 0;
+ bDataReady = TRUE;
+ bWaitForData = FALSE;
+ }
+ else if( FALSE )
+ {
+ // Timer aufsetzen, um zurueck zukehren
+ pDownLoadData->aTimer.Start();
+ }
+ }
+ }
+
+ if( pStream && ERRCODE_IO_PENDING == pStream->GetError() )
+ pStream->ResetError();
+
+#ifndef PRODUCT
+ if( nRes )
+ {
+ if( xMed.Is() && !pStream )
+ {
+ DBG_WARNING3( "GrafikFehler [%d] - [%s] URL[%s]",
+ nRes,
+ xMed->GetPhysicalName().GetBuffer(),
+ sFileNm.GetBuffer() );
+ }
+ else
+ {
+ DBG_WARNING2( "GrafikFehler [%d] - [%s]",
+ nRes, sFileNm.GetBuffer() );
+ }
+ }
+#endif
+
+ if( pProgress )
+ {
+ pGF->SetUpdatePercentHdl( aPercentLnk );
+ delete pProgress;
+
+ // Statusaederung schicken:
+ SendStateChg_Impl( GRFILTER_OK == nRes ? STATE_LOAD_OK : STATE_LOAD_ERROR );
+ }
+
+ return GRFILTER_OK == nRes;
+}
+
+
+SvLinkName* SvFileObject::Edit( Window* pParent, const SvBaseLink& rLink )
+{
+ if( !rLink.GetLinkManager() )
+ return 0;
+
+ String sFile, sRange, sTmpFilter;
+ rLink.GetLinkManager()->GetDisplayNames( rLink, 0, &sFile, &sRange,
+ &sTmpFilter );
+
+ SvLinkName* pNewNm = 0;
+ if( OBJECT_CLIENT_GRF == rLink.GetObjectType() )
+ {
+ nType = FILETYPE_GRF; // falls noch nicht gesetzt
+
+ SvxImportGraphicDialog* pDlg = new SvxImportGraphicDialog( pParent,
+ String( ResId( RID_SVXSTR_EDITGRFLINK, DIALOG_MGR() ) ), FALSE );
+
+ pDlg->SetPath( sFile, FALSE );
+ pDlg->SetCurFilter( sTmpFilter );
+
+ if( RET_OK == pDlg->Execute() )
+ {
+ sFile = pDlg->GetPath();
+ sFile += cTokenSeperator;
+ sFile += cTokenSeperator;
+ sFile += pDlg->GetCurFilter();
+ pNewNm = new SvLinkName( sFile );
+ }
+ delete pDlg;
+ }
+ else if( OBJECT_CLIENT_FILE == rLink.GetObjectType() )
+ {
+ nType = FILETYPE_TEXT; // falls noch nicht gesetzt
+ Window* pOld = Application::GetDefModalDialogParent();
+ Application::SetDefModalDialogParent( pParent );
+
+ const SfxObjectFactory* pFactory;
+ SvPersist* pPersist = rLink.GetLinkManager()->GetCacheContainer();
+ SvInPlaceObjectRef aRef( pPersist );
+ if( aRef.Is() )
+ {
+ SfxObjectShell* pShell = ((SfxInPlaceObject*)&aRef)->GetObjectShell();
+ pFactory = &pShell->GetFactory();
+ }
+ else
+ pFactory = &SFX_APP()->GetDefaultFactory();
+ SfxMediumRef xMed = SFX_APP()->InsertDocumentDialog( 0, *pFactory );
+
+ if( xMed.Is() )
+ {
+ sFile = xMed->GetName();
+ sFile += cTokenSeperator;
+// Bereich! sFile += xMed->GetFilter()->GetName();
+ sFile += cTokenSeperator;
+ sFile += xMed->GetFilter()->GetFilterName();
+ pNewNm = new SvLinkName( sFile );
+ }
+ Application::SetDefModalDialogParent( pOld );
+ }
+ return pNewNm;
+}
+
+
+IMPL_STATIC_LINK( SvxFileObjProgress_Impl, UpdatePercentHdl, GraphicFilter *, pFilter )
+{
+ pThis->SetState( pFilter->GetPercent() );
+ return 0;
+}
+
+
+IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
+{
+ // wenn wir von hier kommen, kann es kein Fehler mehr sein
+ pThis->bLoadError = FALSE;
+ pThis->bWaitForData = FALSE;
+ if( !pThis->bInNewData && !pThis->bDataReady )
+ {
+ // Grafik ist fertig, also DataChanged von der Status-
+ // aederung schicken:
+ pThis->bDataReady = TRUE;
+ pThis->SendStateChg_Impl( STATE_LOAD_OK );
+
+ // und dann nochmal die Daten senden (muss das noch sein??)
+ SvData aSvData;
+ pThis->DataChanged( aSvData );
+ }
+
+ if( pThis->bDataReady )
+ {
+ pThis->bLoadAgain = TRUE;
+ pThis->xMed->SetDataAvailableLink( Link() );
+ pThis->xMed->SetDoneLink( Link() );
+
+ Application::PostUserEvent(
+ STATIC_LINK( pThis, SvFileObject, DelMedium_Impl ),
+ new SfxMediumRef( pThis->xMed ));
+ if( pThis->pDownLoadData )
+ delete pThis->pDownLoadData, pThis->pDownLoadData = 0;
+ pThis->xMed.Clear();
+ }
+
+ return 0;
+}
+
+IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
+{
+ delete pDelMed;
+ return 0;
+}
+
+IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
+{
+ // wenn wir von hier kommen, kann es kein Fehler mehr sein
+ if( pThis->bInNewData )
+ return 0;
+
+ pThis->bInNewData = TRUE;
+ pThis->bLoadError = FALSE;
+
+ if( !pThis->pDownLoadData )
+ {
+ pThis->pDownLoadData = new Impl_DownLoadData(
+ STATIC_LINK( pThis, SvFileObject, LoadGrfNewData_Impl ) );
+
+ // Null-Link setzen, damit keine temporaeren Grafiken
+ // rausgeswapt werden; der Filter prueft, ob schon
+ // ein Link gesetzt ist => falls dies zutrifft, wird
+ // _kein_ neuer Link gesetzt; der Link muss hier gesetzt werden,
+ // (bevor das erste Mal gefiltert wird), um zu verhindern,
+ // dass der Kontext zurueckgesetzt wird (aynchrones Laden)
+ if( !pThis->bNativFormat )
+ {
+ static GfxLink aDummyLink;
+ pThis->pDownLoadData->aGrf.SetLink( aDummyLink );
+ }
+ }
+
+ SvData aSvData;
+ pThis->DataChanged( aSvData );
+
+ SvStream* pStrm = pThis->xMed->GetInStream();
+ if( pStrm && pStrm->GetError() )
+ {
+ if( ERRCODE_IO_PENDING == pStrm->GetError() )
+ pStrm->ResetError();
+
+ // im DataChanged ein DataReady?
+ else if( pThis->bWaitForData && pThis->pDownLoadData )
+ {
+ pThis->bLoadError = TRUE;
+ GetCache()->Remove( *pThis );
+ }
+ }
+
+ if( pThis->bDataReady )
+ {
+ // Grafik ist fertig, also DataChanged von der Status-
+ // aederung schicken:
+ pThis->SendStateChg_Impl( pStrm->GetError() ? STATE_LOAD_ERROR
+ : STATE_LOAD_OK );
+ }
+
+ pThis->bInNewData = FALSE;
+ return 0;
+}
+
+
+IMPL_STATIC_LINK( SvFileObject, OldCacheGrf_Impl, void*, EMPTYARG )
+{
+ ULONG nCnt = pThis->GetSelectorCount();
+ if( nCnt )
+ {
+ SvAdvSelectorList& rSelLst = pThis->GetSelectorList();
+ SvAdvDataSelector * pD;
+
+ while( nCnt-- )
+ if( 0 != ( pD = PTR_CAST( SvAdvDataSelector,
+ rSelLst.GetObject( nCnt ) )) )
+ {
+ SvBaseLinkRef xLnkRef( pD->GetSink() );
+ if( xLnkRef.Is() && OBJECT_CLIENT_GRF == xLnkRef->GetObjType() )
+ {
+ SvPersist* pPersist = xLnkRef->GetLinkManager()->GetCacheContainer();
+ SvInPlaceObjectRef xRef( pPersist );
+ if ( xRef.Is() )
+ SfxObjectShell* pShell = ((SfxInPlaceObject*)&xRef)->GetObjectShell();
+ }
+ }
+ }
+ return 0;
+}
+
+
+
+ULONG SvFileObject::GetUpToDateStatus()
+/* [Beschreibung]
+
+ Die Methode stellt fest, ob aus einem Grafik-Object die Grafik gelesen
+ werden kann.
+ Zurueckgegeben wird:
+ ERRCODE_NONE wenn sie komplett gelesen wurde
+ ERRCODE_SO_PENDING wenn sie noch nicht komplett gelesen wurde
+ ERRCODE_SO_FALSE sonst
+*/
+{
+ ULONG nRet = ERRCODE_SO_FALSE;
+ if( FILETYPE_GRF == nType && !bLoadError )
+ {
+ if( pDownLoadData || bWaitForData )
+ nRet = ERRCODE_SO_PENDING;
+ else if( !bWaitForData )
+ {
+ if( bDataReady || ( bSynchron && LoadFile_Impl() && xMed.Is() ) )
+ nRet = ERRCODE_NONE;
+ else
+ {
+ INetURLObject aUrl( sFileNm );
+
+ if( aUrl.HasError() ||
+ INET_PROT_NOT_VALID == aUrl.GetProtocol() ||
+ INET_PROT_FILE == aUrl.GetProtocol() )
+ nRet = ERRCODE_NONE;
+ }
+ }
+
+ }
+ return nRet;
+}
+
+
+void SvFileObject::CancelTransfers()
+{
+ if( xMed.Is() )
+ xMed->CancelTransfers();
+
+ // und aus dem Cache austragen, wenn man mitten im Laden ist
+ if( !bDataReady )
+ {
+ SvxGrfLinkData_Impl* pData = *(SvxGrfLinkData_Impl**)GetAppData( SHL_LNKCCH );
+ if( pData->pCache )
+ pData->pCache->Remove( *this );
+
+ // nicht noch mal aufsetzen
+ bLoadAgain = bMedUseCache = FALSE;
+ bDataReady = bLoadError = bWaitForData = TRUE;
+ SendStateChg_Impl( STATE_LOAD_ABORT );
+ }
+}
+
+
+void SvFileObject::SetTransferPriority( USHORT nPrio )
+{
+ if( xMed.Is() )
+ xMed->SetTransferPriority( nPrio );
+}
+
+
+void SvFileObject::SendStateChg_Impl( USHORT nState )
+{
+ if( GetSelectorCount() )
+ {
+ ULONG nId = SvxLinkManager::RegisterStatusInfoId();
+ SvData aData( nId );
+ String sData( String::CreateFromInt32( nState ));
+ aData.SetData( sData );
+ DataChanged( aData );
+ }
+}
+
+/* */
+
+
+FileObjCacheEntry_Impl::FileObjCacheEntry_Impl(
+ SvFileObject& rObj, const String& rName )
+ : pPrev( 0 ), pNext( 0 ),
+ xObj( &rObj ),
+ sFileName( rName )
+{
+}
+
+
+FileObjCacheEntry_Impl::~FileObjCacheEntry_Impl()
+{
+// xObj->pImpCachePointer = 0;
+}
+
+
+/* */
+
+
+FileObjCache_Impl::FileObjCache_Impl( USHORT nMaxCnt )
+ : pFirst( 0 ), pLast( 0 ), nSize( 0 ), nMaxSize( nMaxCnt )
+{
+ StartListening( *SFX_APP() );
+}
+
+
+FileObjCache_Impl::~FileObjCache_Impl()
+{
+ while( pFirst )
+ {
+ FileObjCacheEntry_Impl* p = pFirst->pNext;
+ delete pFirst;
+ pFirst = p;
+ }
+}
+
+
+ // FileObject einfuegen. Wenn doppelt, dann returne das schon
+ // vorhandene, ansonsten lege ein neues an.
+
+FileObjCacheEntry_Impl* FileObjCache_Impl::Insert(
+ SvFileObject& rObj, const String& rName )
+{
+ FileObjCacheEntry_Impl* p = pFirst;
+ while( p && p->sFileName != rName )
+ p = p->pNext;
+
+ if( !p ) // nicht gefunden, also neu anlegen
+ {
+ p = new FileObjCacheEntry_Impl( rObj, rName );
+ if( !nSize++ )
+ {
+ pFirst = pLast = p;
+ return pFirst;
+ }
+ else if( nSize > nMaxSize ) // letzten entfernen
+ {
+ // evtuell nach vorne suchen, ob es einen gibt, der nicht
+ // mehr verbunden ist ?
+ pLast = pLast->pPrev;
+ delete pLast->pNext;
+ pLast->pNext = 0;
+ --nSize;
+ }
+ }
+ else if( p != pFirst ) // gefunden, also nach vorne verschieben
+ {
+ if( p->pNext )
+ p->pNext->pPrev = p->pPrev;
+ else if( p == pLast ) // das muss der Letzte sein!
+ pLast = p->pPrev ? p->pPrev : p;
+
+ if( p->pPrev )
+ {
+ p->pPrev->pNext = p->pNext;
+ p->pPrev = 0;
+ }
+ }
+ else
+ return pFirst; // der gefundene
+
+ p->pNext = pFirst;
+ pFirst->pPrev = p;
+ pFirst = p;
+
+ return pFirst;
+}
+
+ // enferne dieses Object
+
+void FileObjCache_Impl::Remove( SvFileObject& rObj )
+{
+ FileObjCacheEntry_Impl* p = pFirst;
+ while( p && &p->xObj != &rObj )
+ p = p->pNext;
+
+ if( p )
+ {
+ // ausketten
+ if( p == pFirst )
+ pFirst = p->pNext;
+ if( p == pLast )
+ pLast = p->pPrev;
+
+ if( p->pNext )
+ p->pNext->pPrev = p->pPrev;
+
+ if( p->pPrev )
+ p->pPrev->pNext = p->pNext;
+
+ delete p;
+ --nSize;
+ }
+}
+
+ // enferne dieses Object
+
+void FileObjCache_Impl::Remove( const String& rName )
+{
+ FileObjCacheEntry_Impl* p = pFirst;
+ while( p && p->sFileName != rName )
+ p = p->pNext;
+
+ if( p )
+ {
+ // ausketten
+ if( p == pFirst )
+ pFirst = p->pNext;
+ if( p == pLast )
+ pLast = p->pPrev;
+
+ if( p->pNext )
+ p->pNext->pPrev = p->pPrev;
+
+ if( p->pPrev )
+ p->pPrev->pNext = p->pNext;
+
+ delete p;
+ --nSize;
+ }
+}
+
+
+void FileObjCache_Impl::SFX_NOTIFY( SfxBroadcaster& , const TypeId& ,
+ const SfxHint& rHint, const TypeId& )
+{
+ if( rHint.ISA( SfxSimpleHint ) && SFX_HINT_DEINITIALIZING ==
+ ((SfxSimpleHint&)rHint).GetId() )
+ {
+ // die Applikation wird herunter gefahren, lasse alle Mediums los
+ while( pFirst )
+ {
+ FileObjCacheEntry_Impl* p = pFirst->pNext;
+ delete pFirst;
+ pFirst = p;
+ }
+
+ EndListening( *SFX_APP() );
+ }
+}
+
+ // suche nach einem Object mit dem Namen
+
+FileObjCacheEntry_Impl* FileObjCache_Impl::Found( const String& rName )
+{
+ FileObjCacheEntry_Impl* p = pFirst;
+ while( p && p->sFileName != rName )
+ p = p->pNext;
+ return p;
+}
+
+
+/* */
+
+SvxGrfLinkCacheDll::SvxGrfLinkCacheDll()
+{
+ DBG_ASSERT( !(*GetAppData(SHL_LNKCCH)), "Ctor, but pointer not null" );
+
+ (*(SvxGrfLinkData_Impl**)GetAppData(SHL_LNKCCH)) = new SvxGrfLinkData_Impl;
+}
+
+
+SvxGrfLinkCacheDll::~SvxGrfLinkCacheDll()
+{
+ DBG_ASSERT( (*GetAppData(SHL_LNKCCH)), "Dtor, pointer == null" );
+
+ delete (*(SvxGrfLinkData_Impl**)GetAppData(SHL_LNKCCH));
+ (*(SvxGrfLinkData_Impl**)GetAppData(SHL_LNKCCH)) = 0;
+}
+
diff --git a/svx/source/svxlink/fileobj.hxx b/svx/source/svxlink/fileobj.hxx
new file mode 100644
index 0000000000..d00470a3c2
--- /dev/null
+++ b/svx/source/svxlink/fileobj.hxx
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * $RCSfile: fileobj.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _FILEOBJ_HXX
+#define _FILEOBJ_HXX
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _PSEUDO_HXX //autogen
+#include <so3/pseudo.hxx>
+#endif
+#ifndef _SFXDOCFILE_HXX //autogen
+#include <sfx2/docfile.hxx>
+#endif
+
+class Graphic;
+struct Impl_DownLoadData;
+
+class SvFileObject : public SvPseudoObject
+{
+ String sFileNm;
+ String sFilter;
+ String sReferer;
+ SfxMediumRef xMed;
+ Impl_DownLoadData* pDownLoadData;
+
+ BYTE nType;
+
+ BOOL bProgress : 1;
+ BOOL bLoadAgain : 1;
+ BOOL bSynchron : 1;
+ BOOL bLoadError : 1;
+ BOOL bWaitForData : 1;
+ BOOL bInNewData : 1;
+ BOOL bDataReady : 1;
+ BOOL bMedUseCache : 1;
+ BOOL bNativFormat : 1;
+ BOOL bClearMedium : 1;
+
+ SvDataTypeList aTypeList;
+
+ BOOL GetGraphic_Impl( Graphic&, SvStream* pStream = 0 );
+ BOOL LoadFile_Impl();
+ void SendStateChg_Impl( USHORT nState );
+
+ DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
+ DECL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void* );
+ DECL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void* );
+ DECL_STATIC_LINK( SvFileObject, OldCacheGrf_Impl, void* );
+protected:
+ virtual ~SvFileObject();
+
+public:
+ SvFileObject();
+
+ virtual const SvDataTypeList & GetTypeList() const;
+ virtual BOOL GetData( SvData * );
+
+ virtual BOOL Connect( SvBaseLink& );
+ virtual SvLinkName* Edit( Window*, const SvBaseLink& );
+
+ // erfrage ob das man direkt auf die Daten zugreifen kann oder ob das
+ // erst angestossen werden muss
+ virtual ULONG GetUpToDateStatus();
+
+ void CancelTransfers();
+ void SetTransferPriority( USHORT nPrio );
+};
+
+
+
+#endif
+
diff --git a/svx/source/svxlink/linkmgr.cxx b/svx/source/svxlink/linkmgr.cxx
new file mode 100644
index 0000000000..0bb0ffadfc
--- /dev/null
+++ b/svx/source/svxlink/linkmgr.cxx
@@ -0,0 +1,425 @@
+/*************************************************************************
+ *
+ * $RCSfile: linkmgr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+
+#include <sot/dtrans.hxx>
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+#ifndef _LNKBASE_HXX //autogen
+#include <so3/lnkbase.hxx>
+#endif
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _FSYS_HXX //autogen
+#include <tools/fsys.hxx>
+#endif
+#ifndef _IPOBJ_HXX //autogen
+#include <so3/ipobj.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXRECTITEM_HXX //autogen
+#include <svtools/rectitem.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFX_INTERNO_HXX //autogen
+#include <sfx2/interno.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _UNOTOOLS_CHARCLASS_HXX
+#include <unotools/charclass.hxx>
+#endif
+
+#include "linkmgr.hxx"
+#include "fileobj.hxx"
+#include "fobjcach.hxx"
+#include "dialmgr.hxx"
+#include "dialogs.hrc"
+#include "unolingu.hxx"
+
+class SvxInternalLink : public SvPseudoObject
+{
+public:
+ SvxInternalLink() {}
+
+ virtual BOOL Connect( SvBaseLink& );
+};
+
+class ImplCastBaseLink : public SvBaseLink
+{
+public:
+ ImplCastBaseLink() : SvBaseLink( 0, 0 ) {}
+ void SetObject( SvPseudoObject* pObj ) { SetObj( pObj ); }
+};
+
+
+SvxLinkManager::SvxLinkManager( SvPersist * pCacheCont )
+ : SvLinkManager( pCacheCont )
+{
+}
+
+SvPseudoObjectRef SvxLinkManager::CreateObj( SvBaseLink & rLink )
+{
+ switch( rLink.GetObjType() )
+ {
+ case OBJECT_CLIENT_FILE:
+ case OBJECT_CLIENT_GRF:
+ return new SvFileObject();
+
+ case OBJECT_INTERN:
+ return new SvxInternalLink();
+ }
+ return SvLinkManager::CreateObj( rLink );
+}
+
+
+BOOL SvxLinkManager::InsertFileLink( SvBaseLink& rLink,
+ USHORT nFileType,
+ const String& rFileNm,
+ const String* pFilterNm,
+ const String* pRange )
+{
+ if( !( OBJECT_CLIENT_SO & rLink.GetObjectType() ))
+ return FALSE;
+
+ String sCmd( rFileNm );
+ sCmd += cTokenSeperator;
+ if( pRange )
+ sCmd += *pRange;
+ if( pFilterNm )
+ ( sCmd += cTokenSeperator ) += *pFilterNm;
+
+ return SvLinkManager::InsertLink( rLink, nFileType,
+ LINKUPDATE_ONCALL, &sCmd );
+}
+
+BOOL SvxLinkManager::InsertFileLink( SvBaseLink& rLink )
+{
+ if( OBJECT_CLIENT_FILE == ( OBJECT_CLIENT_FILE & rLink.GetObjectType() ))
+ return SvLinkManager::InsertLink( rLink, rLink.GetObjectType(),
+ LINKUPDATE_ONCALL );
+ return FALSE;
+}
+
+ // erfrage die Strings fuer den Dialog
+BOOL SvxLinkManager::GetDisplayNames( const SvBaseLink& rLink,
+ String* pType,
+ String* pFile,
+ String* pLink,
+ String* pFilter ) const
+{
+ BOOL bRet = FALSE;
+ const SvLinkName* pLNm = rLink.GetLinkSourceName();
+ if( pLNm )
+ switch( rLink.GetObjectType() )
+ {
+ case OBJECT_CLIENT_FILE:
+ case OBJECT_CLIENT_GRF:
+ {
+ USHORT nPos = 0;
+ String sCmd( pLNm->GetName() );
+ String sFile( sCmd.GetToken( 0, cTokenSeperator, nPos ) );
+ String sRange( sCmd.GetToken( 0, cTokenSeperator, nPos ) );
+
+ if( pFile )
+ *pFile = sFile;
+ if( pLink )
+ *pLink = sRange;
+ if( pFilter )
+ *pFilter = sCmd.Copy( nPos );
+
+ if( pType )
+ *pType = String( ResId(
+ OBJECT_CLIENT_FILE == rLink.GetObjectType()
+ ? RID_SVXSTR_FILELINK
+ : RID_SVXSTR_GRAFIKLINK
+ , DIALOG_MGR() ));
+
+ bRet = TRUE;
+ }
+ break;
+ default:
+ bRet = SvLinkManager::GetDisplayNames( rLink, pType, pFile,
+ pLink, pFilter );
+ break;
+ }
+ return bRet;
+}
+
+// eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
+// (ist zur Zeit nur fuer die FileLinks interressant!)
+void SvxLinkManager::CancelTransfers()
+{
+ SvFileObject* pFileObj;
+ SvBaseLink* pLnk;
+
+ const SvBaseLinks& rLnks = GetLinks();
+ for( USHORT n = rLnks.Count(); n; )
+ if( 0 != ( pLnk = &(*rLnks[ --n ])) &&
+ OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
+ 0 != ( pFileObj = (SvFileObject*)pLnk->GetObj() ) )
+// 0 != ( pFileObj = (SvFileObject*)SvFileObject::ClassFactory()->
+// CastAndAddRef( pLnk->GetObj() )) )
+ pFileObj->CancelTransfers();
+}
+
+void SvxLinkManager::SetTransferPriority( SvBaseLink& rLink, USHORT nPrio )
+{
+ SvFileObject* pFileObj =
+// (SvFileObject*)SvFileObject::ClassFactory()->
+// CastAndAddRef( rLink.GetObj() );
+ OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & rLink.GetObjType()) ?
+ (SvFileObject*)rLink.GetObj() : 0;
+
+ if( pFileObj )
+ pFileObj->SetTransferPriority( nPrio );
+}
+
+
+void SvxLinkManager::PrepareReload( SvBaseLink* pLnk )
+{
+ FileObjCache_Impl* pCache = ::GetCache();
+ SvFileObject* pFileObj;
+
+ if( pLnk ) // einen speziellen?
+ {
+ if( OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
+ 0 != ( pFileObj = (SvFileObject*)pLnk->GetObj() ) )
+ {
+ pCache->Remove( *pFileObj );
+ pLnk->SetUseCache( FALSE );
+ }
+ return ;
+ }
+
+ // dann eben alle
+ const SvBaseLinks& rLnks = GetLinks();
+ for( USHORT n = rLnks.Count(); n; )
+ if( 0 != ( pLnk = &(*rLnks[ --n ])) &&
+ OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
+ 0 != ( pFileObj = (SvFileObject*)pLnk->GetObj() ) )
+ {
+ pCache->Remove( *pFileObj );
+ }
+}
+
+ // 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
+ULONG SvxLinkManager::RegisterStatusInfoId()
+{
+ static ULONG nFormat = 0;
+
+ if( !nFormat )
+ {
+// wie sieht die neue Schnittstelle aus?
+// nFormat = Exchange::RegisterFormatName( "StatusInfo vom SvxInternalLink" );
+ nFormat = Exchange::RegisterFormatName(
+ String( RTL_CONSTASCII_STRINGPARAM(
+ "StatusInfo vom SvxInternalLink" ),
+ RTL_TEXTENCODING_MS_1252 ));
+ }
+ return nFormat;
+}
+
+
+BOOL SvxInternalLink::Connect( SvBaseLink& rLink )
+{
+ String sTopic, sItem, sReferer;
+ if( rLink.GetLinkManager() &&
+ rLink.GetLinkManager()->GetDisplayNames( rLink, 0, &sTopic, &sItem ) )
+ {
+ // erstmal nur ueber die DocumentShells laufen und die mit dem
+ // Namen heraussuchen:
+
+ CharClass aCC( SvxCreateLocale( LANGUAGE_SYSTEM ));
+ String sNm( sTopic ), sTmp;
+ aCC.toLower( sNm );
+
+ TypeId aType( TYPE(SfxObjectShell) );
+
+ BOOL bFirst = TRUE;
+ SfxObjectShell* pShell = 0;
+ SvPersist* pPersist = rLink.GetLinkManager()->GetCacheContainer();
+ SvInPlaceObjectRef aRef( pPersist );
+ if( aRef.Is() )
+ {
+ // sch... SFX das gerade gelesen Doc hat noch keinen Namen und
+ // steht noch nicht in der Doc. Liste
+ pShell = ((SfxInPlaceObject*)&aRef)->GetObjectShell();
+
+ if( pShell && pShell->GetMedium() )
+ {
+ sReferer = pShell->GetMedium()->GetName();
+ if( !pShell->HasName() )
+ {
+ sTmp = sReferer;
+ INetURLObject aURL( sTmp );
+ if ( aURL.GetProtocol() == INET_PROT_FILE )
+ sTmp = aURL.getFSysPath( INetURLObject::FSYS_DETECT );
+ }
+ }
+ }
+
+ if ( !pShell )
+ {
+ bFirst = FALSE;
+ pShell = SfxObjectShell::GetFirst( &aType );
+ }
+
+ while( pShell )
+ {
+ if( !sTmp.Len() )
+ sTmp = pShell->GetTitle( SFX_TITLE_FULLNAME );
+
+ aCC.toLower( sTmp );
+ if( sTmp == sNm ) // die wollen wir haben
+ {
+ SvPseudoObject* pNewObj = pShell->DdeCreateHotLink( sItem );
+ if( pNewObj )
+ {
+ ((ImplCastBaseLink&)rLink).SetObject( pNewObj );
+ pNewObj->AddDataAdvise( &rLink, rLink.GetContentType(),
+ LINKUPDATE_ONCALL == rLink.GetUpdateMode()
+ ? ADVISEMODE_ONLYONCE
+ : 0 );
+ }
+ return 0 != pNewObj;
+ }
+
+ if( bFirst )
+ {
+ bFirst = FALSE;
+ pShell = SfxObjectShell::GetFirst( &aType );
+ }
+ else
+ pShell = SfxObjectShell::GetNext( *pShell, &aType );
+
+ sTmp.Erase();
+ }
+ }
+
+ DirEntry aFileNm( GUI2FSYS( sTopic ) );
+ aFileNm.ToAbs();
+ if( FSYS_KIND_FILE == FileStat( aFileNm ).GetKind() )
+ {
+ // File vorhanden
+
+ // dann versuche die Datei zu laden:
+
+ SfxStringItem aName( SID_FILE_NAME, aFileNm.GetFull() );
+ 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() );
+ SfxStringItem aReferer( SID_REFERER, sReferer );
+
+ SfxBoolItem aSilent(SID_SILENT, TRUE);
+ const SfxPoolItem* pRet = SFX_DISPATCHER().Execute(
+ SID_OPENDOC, SFX_CALLMODE_SYNCHRON,
+ &aName, &aNewView,
+ &aViewStat,&aRectItem/*aHidden*/,
+ &aSilent, &aReferer, 0L );
+
+ SfxObjectShell* pShell;
+ if( pRet && pRet->ISA( SfxViewFrameItem ) &&
+ ((SfxViewFrameItem*)pRet)->GetFrame() &&
+ 0 != ( pShell = ((SfxViewFrameItem*)pRet)
+ ->GetFrame()->GetObjectShell() ) )
+ {
+ SvPseudoObject* pNewObj = pShell->DdeCreateHotLink( sItem );
+ if( pNewObj )
+ {
+ ((ImplCastBaseLink&)rLink).SetObject( pNewObj );
+ pNewObj->AddDataAdvise( &rLink, rLink.GetContentType(),
+ LINKUPDATE_ONCALL == rLink.GetUpdateMode()
+ ? ADVISEMODE_ONLYONCE
+ : 0 );
+//JP 13.04.96: interne Links sind nicht am Closed interresiert!
+// pNewObj->AddConnectAdvise( &rLink, ADVISE_CLOSED );
+ }
+ return 0 != pNewObj;
+ }
+ }
+
+ return FALSE;
+}
+
+
+
diff --git a/svx/source/svxlink/linkmgr.src b/svx/source/svxlink/linkmgr.src
new file mode 100644
index 0000000000..90be288ab4
--- /dev/null
+++ b/svx/source/svxlink/linkmgr.src
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * $RCSfile: linkmgr.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "dialogs.hrc"
+String RID_SVXSTR_FILELINK
+{
+ Text = "Dokument" ;
+ Text [ ENGLISH ] = "Document" ;
+ Text [ norwegian ] = "Dokument" ;
+ Text [ italian ] = "Documento" ;
+ Text [ portuguese_brazilian ] = "Documento" ;
+ Text [ portuguese ] = "Documento" ;
+ Text [ finnish ] = "Asiakirja" ;
+ Text [ danish ] = "Dokument" ;
+ Text [ french ] = "Document" ;
+ Text [ swedish ] = "Dokument" ;
+ Text [ dutch ] = "Document" ;
+ Text [ spanish ] = "Documento" ;
+ Text [ english_us ] = "Document" ;
+ Text[ chinese_simplified ] = "Îĵµ";
+ Text[ russian ] = "Äîêóìåíò";
+ Text[ polish ] = "Dokument";
+ Text[ japanese ] = "ÄÞ·­ÒÝÄ";
+ Text[ chinese_traditional ] = "¤å¥ó";
+ Text[ arabic ] = "ÇáãÓÊäÏ";
+ Text[ dutch ] = "Document";
+ Text[ chinese_simplified ] = "Îĵµ";
+ Text[ greek ] = "¸ããñáöï";
+ Text[ korean ] = "¹®¼­";
+ Text[ turkish ] = "Belge";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_GRAFIKLINK
+{
+ Text = "Grafik" ;
+ Text [ ENGLISH ] = "Graphic" ;
+ Text [ norwegian ] = "Graphic" ;
+ Text [ italian ] = "Immagine" ;
+ Text [ portuguese_brazilian ] = "Gráfico" ;
+ Text [ portuguese ] = "Imagem" ;
+ Text [ finnish ] = "Kuva" ;
+ Text [ danish ] = "Grafik" ;
+ Text [ french ] = "Image" ;
+ Text [ swedish ] = "Grafik" ;
+ Text [ dutch ] = "Afbeelding" ;
+ Text [ spanish ] = "Imagen" ;
+ Text [ english_us ] = "Graphic" ;
+ 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 RID_SVXSTR_EDITGRFLINK
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Grafik Verknüpfen : Grafik Verkn³pfen */
+ /* ### ACHTUNG: Neuer Text in Resource? Grafik Verknüpfen : Grafik Verkn³pfen */
+ Text = "Grafik Verknüpfen" ;
+ Text [ ENGLISH ] = "Link to Graphic" ;
+ Text [ norwegian ] = "Koble til Grafikk" ;
+ Text [ italian ] = "Collega immagine" ;
+ Text [ portuguese_brazilian ] = "Ligar a Gráfico" ;
+ Text [ portuguese ] = "Ligar imagem" ;
+ Text [ finnish ] = "Linkki kuvaan" ;
+ Text [ danish ] = "Kæd grafik" ;
+ Text [ french ] = "Image du lien" ;
+ Text [ swedish ] = "Länka till grafik" ;
+ Text [ dutch ] = "Afbeelding koppelen" ;
+ Text [ spanish ] = "Enlazar imagen" ;
+ Text [ english_us ] = "Link graphics" ;
+ Text[ chinese_simplified ] = "Á´½ÓͼÐÎ";
+ Text[ russian ] = "Ñâÿçàòü ãðàôèêó";
+ Text[ polish ] = "Po³¹cz grafikê";
+ Text[ japanese ] = "¸Þ×̨¯¸‚ðØݸ‚·‚é";
+ Text[ chinese_traditional ] = "³sµ²¹Ï§Î";
+ Text[ arabic ] = "ÑÈØ ÇáÑÓæãÇÊ";
+ Text[ language_user1 ] = "LS 09.08.99 Wir wollen in der franz?ischen Version m?lichst Substantive als Dialog?erschriften haben. Hier wird die bestehende Verkn?fung ge?dert, d.h., es wird eine neue Grafik ausgew?lt";
+ Text[ dutch ] = "Afbeelding koppelen";
+ Text[ chinese_simplified ] = "Á´½ÓͼÐÎ";
+ Text[ greek ] = "Óýíäåóç ãñáöéêïý";
+ Text[ korean ] = "±×·¡ÇÈ ¿¬°á";
+ Text[ turkish ] = "Grafik baðlantýsý oluþtur";
+};
+String RID_SVXSTR_GRFLINKPROGRESS
+{
+ Text = "Importiere Grafik..." ;
+ Text [ English ] = "Importing graphic..." ;
+ Text [ dutch ] = "Bezig met het importeren van afbeelding..." ;
+ Text [ english_us ] = "Importing graphic..." ;
+ Text [ italian ] = "Importazione immagine..." ;
+ Text [ spanish ] = "Importando imagen..." ;
+ Text [ french ] = "Import d'image en cours..." ;
+ Text [ swedish ] = "Importerar grafik..." ;
+ Text [ danish ] = "Importerer grafik..." ;
+ Text [ portuguese ] = "A importar imagem..." ;
+ Text [ portuguese_brazilian ] = "Importiere Grafik..." ;
+ Text[ chinese_simplified ] = "ÊäÈëͼÐÎ...";
+ Text[ russian ] = "Èìïîðò ãðàôèêè...";
+ Text[ polish ] = "Importuj grafikê...";
+ Text[ japanese ] = "¸Þ×̨¯¸‚ð²ÝÎß°Ä‚·‚é...";
+ Text[ chinese_traditional ] = "¿é¤J¹Ï§Î...";
+ Text[ arabic ] = "ÇÓÊíÑÇÏ ÑÓæãÇÊ...";
+ Text[ dutch ] = "Bezig met het importeren van afbeelding...";
+ Text[ chinese_simplified ] = "ÊäÈëͼÐÎ...";
+ Text[ greek ] = "ÅéóáãùãÞ ãñáöéêïý...";
+ Text[ korean ] = "±×·¡ÇÈ °¡Á® ¿À´Â Áß...";
+ Text[ turkish ] = "Ýçe aktar (grafik)...";
+ Text[ language_user1 ] = " ";
+};
+Bitmap RID_SVXGRF_GRAPHICLOAD
+{
+ File = "grfload.bmp" ;
+};
diff --git a/svx/source/svxlink/makefile.mk b/svx/source/svxlink/makefile.mk
new file mode 100644
index 0000000000..7a814d0887
--- /dev/null
+++ b/svx/source/svxlink/makefile.mk
@@ -0,0 +1,105 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PROJECTPCH=svxpch
+PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
+
+PRJNAME=svx
+TARGET=svxlink
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+.IF "$(header)" == ""
+
+CXXFILES=\
+ linkmgr.cxx \
+ fileobj.cxx
+
+SLOFILES=\
+ $(SLO)$/linkmgr.obj \
+ $(SLO)$/fileobj.obj
+
+SRCFILES= \
+ linkmgr.src
+
+.IF "$(GUI)" == "WNT"
+NOOPTFILES=\
+ $(SLO)$/fileobj.obj
+.ENDIF
+
+.ENDIF
+
+# ==========================================================================
+
+.INCLUDE : target.mk
+
+
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
new file mode 100644
index 0000000000..9074642a8e
--- /dev/null
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -0,0 +1,633 @@
+/*************************************************************************
+ *
+ * $RCSfile: colrctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+
+#include "dialogs.hrc"
+
+#define ITEMID_COLOR 0
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+
+#include <tools/list.hxx>
+
+#ifndef _SV_DRAG_HXX //autogen
+#include <vcl/drag.hxx>
+#endif
+#ifndef _SFXVIEWSH_HXX //autogen
+#include <sfx2/viewsh.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+#include "colrctrl.hxx"
+
+#include "svdview.hxx"
+#include "drawitem.hxx"
+#include "colritem.hxx"
+#include "xattr.hxx"
+#include "xtable.hxx"
+#include "dialmgr.hxx"
+#include "xexch.hxx"
+
+SFX_IMPL_DOCKINGWINDOW( SvxColorChildWindow, SID_COLOR_CONTROL )
+
+/*************************************************************************
+|*
+|* SvxColorValueSet: Ctor
+|*
+\************************************************************************/
+
+SvxColorValueSet::SvxColorValueSet( Window* pParent, WinBits nWinStyle ) :
+
+ ValueSet( pParent, nWinStyle )
+
+{
+}
+
+/*************************************************************************
+|*
+|* SvxColorValueSet: Ctor
+|*
+\************************************************************************/
+
+SvxColorValueSet::SvxColorValueSet( Window* pParent, const ResId& rResId ) :
+
+ ValueSet( pParent, rResId )
+
+{
+}
+
+/*************************************************************************
+|*
+|* SvxColorValueSet: MouseButtonDown
+|*
+\************************************************************************/
+
+void SvxColorValueSet::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ // Fuer Mac noch anders handlen !
+ if( rMEvt.IsLeft() )
+ {
+ bLeft = TRUE;
+ ValueSet::MouseButtonDown( rMEvt );
+ }
+ else
+ {
+ bLeft = FALSE;
+ MouseEvent aMEvt( rMEvt.GetPosPixel(),
+ rMEvt.GetClicks(),
+ rMEvt.GetMode(),
+ MOUSE_LEFT,
+ rMEvt.GetModifier() );
+ ValueSet::MouseButtonDown( aMEvt );
+ }
+}
+
+/*************************************************************************
+|*
+|* SvxColorValueSet: MouseButtonUp
+|*
+\************************************************************************/
+
+void SvxColorValueSet::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ // Fuer Mac noch anders handlen !
+ if( rMEvt.IsLeft() )
+ {
+ bLeft = TRUE;
+ ValueSet::MouseButtonUp( rMEvt );
+ }
+ else
+ {
+ bLeft = FALSE;
+ MouseEvent aMEvt( rMEvt.GetPosPixel(),
+ rMEvt.GetClicks(),
+ rMEvt.GetMode(),
+ MOUSE_LEFT,
+ rMEvt.GetModifier() );
+ ValueSet::MouseButtonUp( aMEvt );
+ }
+ SetNoSelection();
+}
+
+
+
+/*************************************************************************
+|*
+|* Command-Event
+|*
+\************************************************************************/
+
+void SvxColorValueSet::Command(const CommandEvent& rCEvt)
+{
+ if (rCEvt.GetCommand() & COMMAND_STARTDRAG &&
+ SfxObjectShell::Current())
+ {
+ aDragPosPixel = rCEvt.GetMousePosPixel();
+
+ // Aus dem ExecuteDrag heraus kann die Farbleiste geloescht werden
+ // (beim Umschalten auf einen anderen Dokument-Typ), das wuerde aber
+ // den StarView MouseMove-Handler, der Command() aufruft, umbringen.
+ // Deshalb Drag&Drop asynchron:
+ Application::PostUserEvent(STATIC_LINK(this, SvxColorValueSet, ExecDragHdl));
+ }
+ else
+ {
+ // Basisklasse
+ ValueSet::Command(rCEvt);
+ }
+}
+
+
+/*************************************************************************
+|*
+|* Drag&Drop asynchron ausfuehren
+|*
+\************************************************************************/
+
+void SvxColorValueSet::DoDrag()
+{
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+
+ if (pDocSh)
+ {
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ XFillAttrSetItem aXFillSetItem(&pDocSh->GetPool());
+ SfxItemSet& rSet = aXFillSetItem.GetItemSet();
+ USHORT nItemId = GetItemId(aDragPosPixel);
+ rSet.Put(XFillColorItem(GetItemText( nItemId ), GetItemColor(nItemId)));
+
+ if (nItemId == 1)
+ {
+ rSet.Put(XFillStyleItem(XFILL_NONE));
+ }
+ else
+ {
+ rSet.Put(XFillStyleItem(XFILL_SOLID));
+ }
+
+ XFillExchangeData aXFillExchangeData(aXFillSetItem);
+
+ SvData* pData = new SvData(XFillExchangeData::RegisterClipboardFormatName(),
+ MEDIUM_MEMORY | MEDIUM_STREAM);
+ pData->SetData(&aXFillExchangeData);
+ SvDataMemberObjectRef pDataObj = new SvDataMemberObject();
+ pDataObj->Append(pData);
+
+ // Drag starten
+ DropAction eAct = pDataObj->ExecuteDrag(this, POINTER_MOVEDATA,
+ POINTER_COPYDATA, POINTER_LINKDATA,
+ DRAG_COPYABLE);
+ DragServer::Clear();
+ ReleaseMouse();
+ }
+}
+
+
+/*************************************************************************
+|*
+|* Command-Event
+|*
+\************************************************************************/
+
+IMPL_STATIC_LINK(SvxColorValueSet, ExecDragHdl, void*, EMPTYARG)
+{
+ // Als Link, damit asynchron ohne ImpMouseMoveMsg auf dem Stack auch die
+ // Farbleiste geloescht werden darf
+ pThis->DoDrag();
+ return(0);
+}
+
+/*************************************************************************
+|*
+|* Ableitung vom SfxChildWindow als "Behaelter" fuer Animator
+|*
+\************************************************************************/
+
+__EXPORT SvxColorChildWindow::SvxColorChildWindow( Window* pParent,
+ USHORT nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo ) :
+ SfxChildWindow( pParent, nId )
+{
+ SvxColorDockingWindow* pWin = new SvxColorDockingWindow( pBindings, this,
+ pParent, SVX_RES( RID_SVXCTRL_COLOR ) );
+ pWindow = pWin;
+
+ eChildAlignment = SFX_ALIGN_BOTTOM;
+
+ pWin->Initialize( pInfo );
+}
+
+
+
+/*************************************************************************
+|*
+|* Ctor: SvxColorDockingWindow
+|*
+\************************************************************************/
+
+__EXPORT SvxColorDockingWindow::SvxColorDockingWindow
+(
+ SfxBindings* pBindings,
+ SfxChildWindow* pCW,
+ Window* pParent,
+ const ResId& rResId
+) :
+
+ SfxDockingWindow( pBindings, pCW, pParent, rResId ),
+
+ aColorSet ( this, ResId( 1 ) ),
+ pColorTable ( NULL ),
+ nLeftSlot ( SID_ATTR_FILL_COLOR ),
+ nRightSlot ( SID_ATTR_LINE_COLOR ),
+ nCols ( 20 ),
+ nLines ( 1 ),
+ aColorSize ( 14, 14 )
+
+{
+ FreeResource();
+
+ aColorSet.SetStyle( aColorSet.GetStyle() | WB_ITEMBORDER );
+ aColorSet.SetSelectHdl( LINK( this, SvxColorDockingWindow, SelectHdl ) );
+
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ if ( pDocSh )
+ {
+ const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
+ if( pItem )
+ {
+ pColorTable = ( (SvxColorTableItem*) pItem )->GetColorTable();
+ FillValueSet();
+ }
+ }
+ aItemSize = aColorSet.CalcItemSizePixel( aColorSize );
+ aItemSize.Width() = aItemSize.Width() + aColorSize.Width();
+ aItemSize.Width() /= 2;
+ aItemSize.Height() = aItemSize.Height() + aColorSize.Height();
+ aItemSize.Height() /= 2;
+
+ SetSize();
+ aColorSet.Show();
+ StartListening( *pBindings, TRUE );
+}
+
+
+/*************************************************************************
+|*
+|* Dtor: SvxColorDockingWindow
+|*
+\************************************************************************/
+
+__EXPORT SvxColorDockingWindow::~SvxColorDockingWindow()
+{
+ EndListening( GetBindings() );
+}
+
+/*************************************************************************
+|*
+|* Notify
+|*
+\************************************************************************/
+
+void SvxColorDockingWindow::SFX_NOTIFY( SfxBroadcaster& rBC,
+ const TypeId& rBCType,
+ const SfxHint& rHint,
+ const TypeId& rHintType )
+{
+ const SfxPoolItemHint *pPoolItemHint = PTR_CAST(SfxPoolItemHint, &rHint);
+ if ( pPoolItemHint
+ && ( pPoolItemHint->GetObject()->ISA( SvxColorTableItem ) ) )
+ {
+ // Die Liste der Farben hat sich geaendert
+ pColorTable = ( (SvxColorTableItem*) pPoolItemHint->GetObject() )->GetColorTable();
+ FillValueSet();
+ }
+}
+
+/*************************************************************************
+|*
+|* FillValueSet
+|*
+\************************************************************************/
+
+void SvxColorDockingWindow::FillValueSet()
+{
+ if( pColorTable )
+ {
+ aColorSet.Clear();
+
+ // Erster Eintrag: unsichtbar
+ long nPtX = aColorSize.Width() - 1;
+ long nPtY = aColorSize.Height() - 1;
+ VirtualDevice aVD;
+ aVD.SetOutputSizePixel( aColorSize );
+ aVD.SetLineColor( Color( COL_BLACK ) );
+ aVD.SetBackground( Wallpaper( Color( COL_WHITE ) ) );
+ aVD.DrawLine( Point(), Point( nPtX, nPtY ) );
+ aVD.DrawLine( Point( 0, nPtY ), Point( nPtX, 0 ) );
+
+ Bitmap aBmp( aVD.GetBitmap( Point(), aColorSize ) );
+
+ aColorSet.InsertItem( (USHORT)1, aBmp, SVX_RESSTR( RID_SVXSTR_INVISIBLE ) );
+
+ XColorEntry* pEntry;
+ nCount = pColorTable->Count();
+
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pColorTable->Get( i );
+ aColorSet.InsertItem( (USHORT)i+2,
+ pEntry->GetColor(), pEntry->GetName() );
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* SetSize
+|*
+\************************************************************************/
+
+void SvxColorDockingWindow::SetSize()
+{
+ // Groesse fuer ValueSet berechnen
+ Size aSize = GetOutputSizePixel();
+ aSize.Width() -= 4;
+ aSize.Height() -= 4;
+
+ // Zeilen und Spalten berechnen
+ nCols = (USHORT) ( aSize.Width() / aItemSize.Width() );
+ nLines = (USHORT) ( (float) aSize.Height() / (float) aItemSize.Height() + 0.35 );
+ if( nLines == 0 )
+ nLines++;
+
+ // Scrollbar setzen/entfernen
+ WinBits nBits = aColorSet.GetStyle();
+ if ( nLines * nCols >= nCount )
+ nBits &= ~WB_VSCROLL;
+ else
+ nBits |= WB_VSCROLL;
+ aColorSet.SetStyle( nBits );
+
+ // ScrollBar ?
+ long nScrollWidth = aColorSet.GetScrollWidth();
+ if( nScrollWidth > 0 )
+ {
+ // Spalten mit ScrollBar berechnen
+ nCols = (USHORT) ( ( aSize.Width() - nScrollWidth ) / aItemSize.Width() );
+ }
+ aColorSet.SetColCount( nCols );
+
+ if( IsFloatingMode() )
+ aColorSet.SetLineCount( nLines );
+ else
+ {
+ aColorSet.SetLineCount( 0 ); // sonst wird LineHeight ignoriert
+ aColorSet.SetItemHeight( aItemSize.Height() );
+ }
+
+ aColorSet.SetPosSizePixel( Point( 2, 2 ), aSize );
+}
+
+/*************************************************************************
+|*
+|* SvxColorDockingWindow: Close
+|*
+\************************************************************************/
+
+BOOL __EXPORT SvxColorDockingWindow::Close()
+{
+ SfxBoolItem aItem( SID_COLOR_CONTROL, FALSE );
+ GetBindings().GetDispatcher()->Execute(
+ SID_COLOR_CONTROL, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
+ SfxDockingWindow::Close();
+ return( TRUE );
+}
+
+/*************************************************************************
+|*
+|* SelectHdl
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxColorDockingWindow, SelectHdl, void *, EMPTYARG )
+{
+ SfxDispatcher* pDispatcher = GetBindings().GetDispatcher();
+ USHORT nPos = aColorSet.GetSelectItemId();
+ Color aColor( aColorSet.GetItemColor( nPos ) );
+ String aStr( aColorSet.GetItemText( nPos ) );
+
+ if ( aColorSet.IsLeftButton() )
+ {
+ if ( nLeftSlot == SID_ATTR_FILL_COLOR )
+ {
+ if ( nPos == 1 ) // unsichtbar
+ {
+ XFillStyleItem aXFillStyleItem( XFILL_NONE );
+ pDispatcher->Execute( nLeftSlot, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L );
+ }
+ else
+ {
+ BOOL bDone = FALSE;
+
+ // Wenn wir eine DrawView haben und uns im TextEdit-Modus befinden,
+ // wird nicht die Flaechen-, sondern die Textfarbe zugewiesen
+ SfxViewShell* pViewSh = SfxViewShell::Current();
+ if ( pViewSh )
+ {
+ SdrView* pView = pViewSh->GetDrawView();
+ if ( pView && pView->IsTextEdit() )
+ {
+ SvxColorItem aTextColorItem( aColor, SID_ATTR_CHAR_COLOR );
+ pDispatcher->Execute(
+ SID_ATTR_CHAR_COLOR, SFX_CALLMODE_RECORD, &aTextColorItem, 0L );
+ bDone = TRUE;
+ }
+ }
+ if ( !bDone )
+ {
+ XFillStyleItem aXFillStyleItem( XFILL_SOLID );
+ XFillColorItem aXFillColorItem( aStr, aColor );
+ pDispatcher->Execute(
+ nLeftSlot, SFX_CALLMODE_RECORD, &aXFillColorItem, &aXFillStyleItem, 0L );
+ }
+ }
+ }
+ else if ( nPos != 1 ) // unsichtbar
+ {
+ SvxColorItem aLeftColorItem( aColor, nLeftSlot );
+ pDispatcher->Execute( nLeftSlot, SFX_CALLMODE_RECORD, &aLeftColorItem, 0L );
+ }
+ }
+ else
+ {
+ if ( nRightSlot == SID_ATTR_LINE_COLOR )
+ {
+ if( nPos == 1 ) // unsichtbar
+ {
+ XLineStyleItem aXLineStyleItem( XLINE_NONE );
+ pDispatcher->Execute( nRightSlot, SFX_CALLMODE_RECORD, &aXLineStyleItem, 0L );
+ }
+ else
+ {
+ // Sollte der LineStyle unsichtbar sein, so wird er auf SOLID gesetzt
+ SfxViewShell* pViewSh = SfxViewShell::Current();
+ if ( pViewSh )
+ {
+ SdrView* pView = pViewSh->GetDrawView();
+ if ( pView )
+ {
+ SfxItemSet aAttrSet( pView->GetModel()->GetItemPool() );
+ pView->GetAttributes( aAttrSet );
+ if ( aAttrSet.GetItemState( XATTR_LINESTYLE ) != SFX_ITEM_DONTCARE )
+ {
+ XLineStyle eXLS = (XLineStyle)
+ ( (const XLineStyleItem&)aAttrSet.Get( XATTR_LINESTYLE ) ).GetValue();
+ if ( eXLS == XLINE_NONE )
+ {
+ XLineStyleItem aXLineStyleItem( XLINE_SOLID );
+ pDispatcher->Execute( nRightSlot, SFX_CALLMODE_RECORD, &aXLineStyleItem, 0L );
+ }
+ }
+ }
+ }
+
+ XLineColorItem aXLineColorItem( aStr, aColor );
+ pDispatcher->Execute( nRightSlot, SFX_CALLMODE_RECORD, &aXLineColorItem, 0L );
+ }
+ }
+ else if ( nPos != 1 ) // unsichtbar
+ {
+ SvxColorItem aRightColorItem( aColor, nRightSlot );
+ pDispatcher->Execute( nRightSlot, SFX_CALLMODE_RECORD, &aRightColorItem, 0L );
+ }
+ }
+
+ return 0;
+}
+
+/*************************************************************************
+|*
+|* Resizing
+|*
+\************************************************************************/
+
+
+void __EXPORT SvxColorDockingWindow::Resizing( Size& rNewSize )
+{
+ rNewSize.Width() -= 4;
+ rNewSize.Height() -= 4;
+
+ // Spalten und Reihen ermitteln
+ nCols = (USHORT) ( (float) rNewSize.Width() / (float) aItemSize.Width() + 0.5 );
+ nLines = (USHORT) ( (float) rNewSize.Height() / (float) aItemSize.Height() + 0.5 );
+ if( nLines == 0 )
+ nLines = 1;
+
+ // Scrollbar setzen/entfernen
+ WinBits nBits = aColorSet.GetStyle();
+ if ( nLines * nCols >= nCount )
+ nBits &= ~WB_VSCROLL;
+ else
+ nBits |= WB_VSCROLL;
+ aColorSet.SetStyle( nBits );
+
+ // ScrollBar ?
+ long nScrollWidth = aColorSet.GetScrollWidth();
+ if( nScrollWidth > 0 )
+ {
+ // Spalten mit ScrollBar berechnen
+ nCols = (USHORT) ( ( ( (float) rNewSize.Width() - (float) nScrollWidth ) )
+ / (float) aItemSize.Width() + 0.5 );
+ }
+ if( nCols <= 1 )
+ nCols = 2;
+
+ // Max. Reihen anhand der gegebenen Spalten berechnen
+ USHORT nMaxLines = nCount / nCols;
+ if( nCount % nCols )
+ nMaxLines++;
+
+ nLines = Min( nLines, nMaxLines );
+
+ // Groesse des Windows setzen
+ rNewSize.Width() = nCols * aItemSize.Width() + nScrollWidth + 4;
+ rNewSize.Height() = nLines * aItemSize.Height() + 4;
+}
+
+/*************************************************************************
+|*
+|* Resize
+|*
+\************************************************************************/
+
+void __EXPORT SvxColorDockingWindow::Resize()
+{
+ if ( !IsFloatingMode() || !GetFloatingWindow()->IsRollUp() )
+ SetSize();
+ SfxDockingWindow::Resize();
+}
+
diff --git a/svx/source/tbxctrls/colrctrl.src b/svx/source/tbxctrls/colrctrl.src
new file mode 100644
index 0000000000..1355e7d5a3
--- /dev/null
+++ b/svx/source/tbxctrls/colrctrl.src
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * $RCSfile: colrctrl.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "colrctrl.hrc"
+#include "dialogs.hrc"
+#include "helpid.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXCTRL_COLOR -----------------------------------------------------
+DockingWindow RID_SVXCTRL_COLOR
+{
+ HelpID = HID_CTRL_COLOR ;
+ Border = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Sizeable = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Dockable = TRUE ;
+ EnableResizing = TRUE ;
+ Size = MAP_APPFONT ( 150 , 22 ) ;
+ Text = "Farben" ;
+ Text [ ENGLISH ] = "Colors" ;
+ Text [ english_us ] = "Colors" ;
+ Text [ italian ] = "Colori" ;
+ Text [ spanish ] = "Colores" ;
+ Text [ french ] = "Couleurs" ;
+ Text [ dutch ] = "Kleuren" ;
+ Control 1
+ {
+ HelpId = HID_COLOR_CTL_COLORS ;
+ Pos = MAP_APPFONT ( 2 , 2 ) ;
+ Size = MAP_APPFONT ( 146 , 18 ) ;
+ Border = FALSE ;
+ };
+ Text [ swedish ] = "Färger" ;
+ 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[ dutch ] = "Kleuren";
+ Text[ chinese_simplified ] = "ÑÕÉ«";
+ Text[ greek ] = "×ñþìáôá";
+ Text[ korean ] = "»ö";
+ Text[ turkish ] = "Renkler";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
new file mode 100644
index 0000000000..4fa6d45ef5
--- /dev/null
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -0,0 +1,809 @@
+/*************************************************************************
+ *
+ * $RCSfile: fillctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <string> // HACK: prevent conflict between STLPORT and Workshop headers
+
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXVIEWSH_HXX
+#include <sfx2/viewsh.hxx>
+#endif
+#pragma hdrstop
+
+#include "dialogs.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_GRADIENT_LIST SID_GRADIENT_LIST
+#define ITEMID_HATCH_LIST SID_HATCH_LIST
+#define ITEMID_BITMAP_LIST SID_BITMAP_LIST
+
+#define DELAY_TIMEOUT 300
+
+#define TMP_STR_BEGIN '['
+#define TMP_STR_END ']'
+
+#include "drawitem.hxx"
+#include "xattr.hxx"
+#include "xtable.hxx"
+#include "fillctrl.hxx"
+#include "itemwin.hxx"
+#include "dialmgr.hxx"
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxFillToolBoxControl, XFillStyleItem );
+
+/*************************************************************************
+|*
+|* SvxFillToolBoxControl
+|*
+\************************************************************************/
+
+SvxFillToolBoxControl::SvxFillToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind ) :
+
+ SfxToolBoxControl( nId, rTbx, rBind ),
+
+ aColorForwarder ( SID_ATTR_FILL_COLOR, *this ),
+ aGradientForwarder ( SID_ATTR_FILL_GRADIENT, *this ),
+ aHatchForwarder ( SID_ATTR_FILL_HATCH, *this ),
+ aBitmapForwarder ( SID_ATTR_FILL_BITMAP, *this ),
+
+ pStyleItem ( NULL ),
+ pColorItem ( NULL ),
+ pGradientItem ( NULL ),
+ pHatchItem ( NULL ),
+ pBitmapItem ( NULL ),
+ pFillControl ( NULL ),
+ pFillAttrLB ( NULL ),
+ pFillTypeLB ( NULL ),
+
+ bUpdate ( FALSE ),
+ eLastXFS ( XFILL_NONE )
+
+{
+ StartListening( rBind );
+}
+
+//========================================================================
+
+SvxFillToolBoxControl::~SvxFillToolBoxControl()
+{
+ delete pStyleItem;
+ delete pColorItem;
+ delete pGradientItem;
+ delete pHatchItem;
+ delete pBitmapItem;
+}
+
+//========================================================================
+
+void SvxFillToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ FASTBOOL bEnableControls = FALSE;
+
+
+ if( eState == SFX_ITEM_DISABLED )
+ {
+ if( nSID == SID_ATTR_FILL_STYLE )
+ {
+ pFillTypeLB->Disable();
+ pFillTypeLB->SetNoSelection();
+ }
+ pFillAttrLB->Disable();
+ pFillAttrLB->SetNoSelection();
+ }
+ else
+ {
+ if ( SFX_ITEM_AVAILABLE == eState )
+ {
+ if( nSID == SID_ATTR_FILL_STYLE )
+ {
+ delete pStyleItem;
+ pStyleItem = (XFillStyleItem*) pState->Clone();
+ pFillTypeLB->Enable();
+
+ eLastXFS = (XFillStyle) pFillTypeLB->GetSelectEntryPos();
+ bUpdate = TRUE;
+
+ XFillStyle eXFS = (XFillStyle)pStyleItem->GetValue();
+ pFillTypeLB->SelectEntryPos( eXFS );
+ pFillAttrLB->Enable();
+ }
+ else if( pStyleItem )
+ {
+ XFillStyle eXFS = (XFillStyle)pStyleItem->GetValue();
+
+ if( nSID == SID_ATTR_FILL_COLOR )
+ {
+ delete pColorItem;
+ pColorItem = (XFillColorItem*) pState->Clone();
+
+ if( eXFS == XFILL_SOLID )
+ bEnableControls = TRUE;
+ }
+ else if( nSID == SID_ATTR_FILL_GRADIENT )
+ {
+ delete pGradientItem;
+ pGradientItem = (XFillGradientItem*) pState->Clone();
+
+ if( eXFS == XFILL_GRADIENT )
+ bEnableControls = TRUE;
+ }
+ else if( nSID == SID_ATTR_FILL_HATCH )
+ {
+ delete pHatchItem;
+ pHatchItem = (XFillHatchItem*) pState->Clone();
+
+ if( eXFS == XFILL_HATCH )
+ bEnableControls = TRUE;
+ }
+ else if( nSID == SID_ATTR_FILL_BITMAP )
+ {
+ delete pBitmapItem;
+ pBitmapItem = (XFillBitmapItem*) pState->Clone();
+
+ if( eXFS == XFILL_BITMAP )
+ bEnableControls = TRUE;
+ }
+ }
+ if( bEnableControls )
+ {
+ //pFillTypeLB->Enable();
+ pFillAttrLB->Enable();
+
+ bUpdate = TRUE;
+ }
+ }
+ else
+ {
+ // leerer oder uneindeutiger Status
+ if( nSID == SID_ATTR_FILL_STYLE )
+ {
+ pFillTypeLB->SetNoSelection();
+ pFillAttrLB->Disable();
+ pFillAttrLB->SetNoSelection();
+ bUpdate = FALSE;
+ }
+ else
+ {
+ XFillStyle eXFS;
+ if( pStyleItem )
+ eXFS = (XFillStyle)pStyleItem->GetValue();
+ if( !pStyleItem ||
+ ( nSID == SID_ATTR_FILL_COLOR && eXFS == XFILL_SOLID ) ||
+ ( nSID == SID_ATTR_FILL_GRADIENT && eXFS == XFILL_GRADIENT ) ||
+ ( nSID == SID_ATTR_FILL_HATCH && eXFS == XFILL_HATCH ) ||
+ ( nSID == SID_ATTR_FILL_BITMAP && eXFS == XFILL_BITMAP ) )
+ {
+ pFillAttrLB->SetNoSelection();
+ //bUpdate = FALSE;
+ }
+ }
+ }
+ }
+}
+
+//========================================================================
+
+void SvxFillToolBoxControl::SFX_NOTIFY( SfxBroadcaster& rBC,
+ const TypeId& rBCType,
+ const SfxHint& rHint,
+ const TypeId& rHintType )
+{
+ const SfxSimpleHint *pSimpleHint = PTR_CAST(SfxSimpleHint, &rHint);
+
+ if( pStyleItem && pSimpleHint &&
+ ( pSimpleHint->GetId() == SFX_HINT_UPDATEDONE ) &&
+ bUpdate )
+ {
+ bUpdate = FALSE;
+
+ XFillStyle eXFS = (XFillStyle)pStyleItem->GetValue();
+
+ // Pruefen, ob Fuellstil schon vorher aktiv war
+ //if( eTmpXFS != eXFS )
+ if( (XFillStyle) eLastXFS != eXFS )
+ pFillControl->SelectFillTypeHdl( NULL );
+ //eLastXFS = eXFS;
+
+ switch( eXFS )
+ {
+ case XFILL_NONE:
+ break;
+
+ case XFILL_SOLID:
+ {
+ if ( pColorItem )
+ {
+ String aString( pColorItem->GetName() );
+ Color aColor = pColorItem->GetValue();
+
+ pFillAttrLB->SelectEntry( aString );
+
+ if ( pFillAttrLB->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ||
+ pFillAttrLB->GetSelectEntryColor() != aColor )
+ pFillAttrLB->SelectEntry( aColor );
+
+ // NEU
+ // Pruefen, ob Eintrag nicht in der Liste ist
+ if( pFillAttrLB->GetSelectEntryPos() ==
+ LISTBOX_ENTRY_NOTFOUND ||
+ pFillAttrLB->GetSelectEntryColor() != aColor )
+ {
+ long nCount = pFillAttrLB->GetEntryCount();
+ String aTmpStr;
+ if( nCount > 0 )
+ {
+ //Letzter Eintrag wird auf temporaere Farbe geprueft
+ aTmpStr = pFillAttrLB->GetEntry( nCount - 1 );
+ if( aTmpStr.GetChar(0) == TMP_STR_BEGIN &&
+ aTmpStr.GetChar(aTmpStr.Len()-1) == TMP_STR_END )
+ {
+ pFillAttrLB->RemoveEntry( nCount - 1 );
+ }
+ }
+ aTmpStr = TMP_STR_BEGIN;
+ aTmpStr += aString;
+ aTmpStr += TMP_STR_END;
+
+ //pFillAttrLB->SetUpdateMode( FALSE );
+ USHORT nPos = pFillAttrLB->InsertEntry( aColor, aTmpStr );
+ //pFillAttrLB->SetUpdateMode( TRUE );
+ pFillAttrLB->SelectEntryPos( nPos );
+ }
+ // NEU
+ }
+ else
+ pFillAttrLB->SetNoSelection();
+ }
+ break;
+
+ case XFILL_GRADIENT:
+ {
+ if ( pGradientItem )
+ {
+ String aString( pGradientItem->GetName() );
+ pFillAttrLB->SelectEntry( aString );
+ // NEU
+ // Pruefen, ob Eintrag nicht in der Liste ist
+ if( pFillAttrLB->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
+ {
+ long nCount = pFillAttrLB->GetEntryCount();
+ String aTmpStr;
+ if( nCount > 0 )
+ {
+ //Letzter Eintrag wird auf temporaeren Eintrag geprueft
+ aTmpStr = pFillAttrLB->GetEntry( nCount - 1 );
+ if( aTmpStr.GetChar(0) == TMP_STR_BEGIN &&
+ aTmpStr.GetChar(aTmpStr.Len()-1) == TMP_STR_END )
+ {
+ pFillAttrLB->RemoveEntry( nCount - 1 );
+ }
+ }
+ aTmpStr = TMP_STR_BEGIN;
+ aTmpStr += aString;
+ aTmpStr += TMP_STR_END;
+
+ XGradientEntry* pEntry = new XGradientEntry( pGradientItem->GetValue(), aTmpStr );
+ XGradientList aGradientList( String::CreateFromAscii("TmpList") );
+ aGradientList.Insert( pEntry );
+ Bitmap* pBmp = aGradientList.GetBitmap( 0 );
+ ( (ListBox*)pFillAttrLB )->InsertEntry( pEntry->GetName(), *pBmp );
+ pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 );
+ aGradientList.Remove( 0 );
+ delete pEntry;
+ }
+ // NEU
+ }
+ else
+ pFillAttrLB->SetNoSelection();
+ }
+ break;
+
+ case XFILL_HATCH:
+ {
+ if ( pHatchItem )
+ {
+ String aString( pHatchItem->GetName() );
+ pFillAttrLB->SelectEntry( aString );
+ // NEU
+ // Pruefen, ob Eintrag nicht in der Liste ist
+ if( pFillAttrLB->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
+ {
+ long nCount = pFillAttrLB->GetEntryCount();
+ String aTmpStr;
+ if( nCount > 0 )
+ {
+ //Letzter Eintrag wird auf temporaeren Eintrag geprueft
+ aTmpStr = pFillAttrLB->GetEntry( nCount - 1 );
+ if( aTmpStr.GetChar(0) == TMP_STR_BEGIN &&
+ aTmpStr.GetChar(aTmpStr.Len()-1) == TMP_STR_END )
+ {
+ pFillAttrLB->RemoveEntry( nCount - 1 );
+ }
+ }
+ aTmpStr = TMP_STR_BEGIN;
+ aTmpStr += aString;
+ aTmpStr += TMP_STR_END;
+
+ XHatchEntry* pEntry = new XHatchEntry( pHatchItem->GetValue(), aTmpStr );
+ XHatchList aHatchList( String::CreateFromAscii("TmpList" ));
+ aHatchList.Insert( pEntry );
+ Bitmap* pBmp = aHatchList.GetBitmap( 0 );
+ ( (ListBox*)pFillAttrLB )->InsertEntry( pEntry->GetName(), *pBmp );
+ pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 );
+ aHatchList.Remove( 0 );
+ delete pEntry;
+ }
+ // NEU
+ }
+ else
+ pFillAttrLB->SetNoSelection();
+ }
+ break;
+
+ case XFILL_BITMAP:
+ {
+ if ( pBitmapItem )
+ // &&
+ // SfxObjectShell::Current() &&
+ // SfxObjectShell::Current()->GetItem( SID_BITMAP_LIST ) )
+ {
+ String aString( pBitmapItem->GetName() );
+ // Bitmap aBitmap( pBitmapItem->GetValue() );
+
+ // SvxBitmapListItem aItem( *(const SvxBitmapListItem*)(
+ // SfxObjectShell::Current()->GetItem( SID_BITMAP_LIST ) ) );
+ pFillAttrLB->SelectEntry( aString );
+ // NEU
+ // Pruefen, ob Eintrag nicht in der Liste ist
+ if( pFillAttrLB->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
+ {
+ long nCount = pFillAttrLB->GetEntryCount();
+ String aTmpStr;
+ if( nCount > 0 )
+ {
+ //Letzter Eintrag wird auf temporaeren Eintrag geprueft
+ aTmpStr = pFillAttrLB->GetEntry( nCount - 1 );
+ if( aTmpStr.GetChar(0) == TMP_STR_BEGIN &&
+ aTmpStr.GetChar(aTmpStr.Len()-1) == TMP_STR_END )
+ {
+ pFillAttrLB->RemoveEntry( nCount - 1 );
+ }
+ }
+ aTmpStr = TMP_STR_BEGIN;
+ aTmpStr += aString;
+ aTmpStr += TMP_STR_END;
+
+ XBitmapEntry* pEntry = new XBitmapEntry( pBitmapItem->GetValue(), aTmpStr );
+ XBitmapList aBitmapList( String::CreateFromAscii("TmpList") );
+ aBitmapList.Insert( pEntry );
+ aBitmapList.SetDirty( FALSE );
+ //Bitmap* pBmp = aBitmapList.GetBitmap( 0 );
+ //( (ListBox*)pFillAttrLB )->InsertEntry( pEntry->GetName(), *pBmp );
+ pFillAttrLB->Fill( &aBitmapList );
+ pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 );
+ aBitmapList.Remove( 0 );
+ delete pEntry;
+ }
+ // NEU
+ }
+ else
+ pFillAttrLB->SetNoSelection();
+ }
+ break;
+
+ default:
+ DBG_ERROR( "Nicht unterstuetzter Flaechentyp" );
+ break;
+ }
+ }
+
+ const SfxPoolItemHint *pPoolItemHint = PTR_CAST(SfxPoolItemHint, &rHint);
+
+ if( pPoolItemHint && pStyleItem )
+ {
+ XFillStyle eXFS = (XFillStyle) pStyleItem->GetValue();
+
+ // Die Listen haben sich geaendert ?
+ if( pPoolItemHint->GetObject()->ISA( SvxColorTableItem ) &&
+ eXFS == XFILL_SOLID )
+ {
+ Color aTmpColor( pFillAttrLB->GetSelectEntryColor() );
+ pFillAttrLB->Clear();
+ pFillAttrLB->Fill( ( (SvxColorTableItem*) pPoolItemHint->GetObject() )->GetColorTable() );
+ pFillAttrLB->SelectEntry( aTmpColor );
+ }
+ if( pPoolItemHint->GetObject()->ISA( SvxGradientListItem ) &&
+ eXFS == XFILL_GRADIENT )
+ {
+ String aString( pFillAttrLB->GetSelectEntry() );
+ pFillAttrLB->Clear();
+ pFillAttrLB->Fill( ( (SvxGradientListItem*) pPoolItemHint->GetObject() )->GetGradientList() );
+ pFillAttrLB->SelectEntry( aString );
+ }
+ if( pPoolItemHint->GetObject()->ISA( SvxHatchListItem ) &&
+ eXFS == XFILL_HATCH )
+ {
+ String aString( pFillAttrLB->GetSelectEntry() );
+ pFillAttrLB->Clear();
+ pFillAttrLB->Fill( ( (SvxHatchListItem*) pPoolItemHint->GetObject() )->GetHatchList() );
+ pFillAttrLB->SelectEntry( aString );
+ }
+ if( pPoolItemHint->GetObject()->ISA( SvxBitmapListItem ) &&
+ eXFS == XFILL_BITMAP )
+ {
+ String aString( pFillAttrLB->GetSelectEntry() );
+ pFillAttrLB->Clear();
+ pFillAttrLB->Fill( ( (SvxBitmapListItem*) pPoolItemHint->GetObject() )->GetBitmapList() );
+ pFillAttrLB->SelectEntry( aString );
+ }
+ }
+}
+
+//========================================================================
+
+Window* SvxFillToolBoxControl::CreateItemWindow( Window *pParent )
+{
+ if ( GetId() == SID_ATTR_FILL_STYLE )
+ {
+ pFillControl = new FillControl( pParent );
+ // Damit dem FillControl das SvxFillToolBoxControl bekannt ist
+ // (und um kompatibel zu bleiben)
+ pFillControl->SetData( this );
+
+ pFillAttrLB = (SvxFillAttrBox*)pFillControl->pLbFillAttr;
+ pFillTypeLB = (SvxFillTypeBox*)pFillControl->pLbFillType;
+ return pFillControl;
+ }
+ return NULL;
+}
+
+/*************************************************************************
+|*
+|* FillControl
+|*
+\************************************************************************/
+
+FillControl::FillControl( Window* pParent, WinBits nStyle ) :
+ Window( pParent, nStyle )
+{
+#ifdef OS2
+ WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL;
+ pLbFillType = new SvxFillTypeBox( this, nBits );
+#else
+ pLbFillType = new SvxFillTypeBox( this );
+#endif
+ pLbFillAttr = new SvxFillAttrBox( this );
+
+ Size aTypeSize = pLbFillType->GetSizePixel();
+ Size aAttrSize = pLbFillAttr->GetSizePixel();
+ Point aAttrPnt = pLbFillAttr->GetPosPixel();
+ SetSizePixel(
+ Size( aAttrPnt.X() + aAttrSize.Width(),
+ Max( aAttrSize.Height(), aTypeSize.Height() ) ) );
+
+ pLbFillType->SetSelectHdl( LINK( this, FillControl, SelectFillTypeHdl ) );
+ pLbFillAttr->SetSelectHdl( LINK( this, FillControl, SelectFillAttrHdl ) );
+
+ aDelayTimer.SetTimeout( DELAY_TIMEOUT );
+ aDelayTimer.SetTimeoutHdl( LINK( this, FillControl, DelayHdl ) );
+ aDelayTimer.Start();
+}
+
+//------------------------------------------------------------------------
+
+FillControl::~FillControl()
+{
+ delete pLbFillType;
+ delete pLbFillAttr;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( FillControl, DelayHdl, Timer *, pTimer )
+{
+ SelectFillTypeHdl( NULL );
+ ( (SvxFillToolBoxControl*)GetData() )->GetBindings().Invalidate( SID_ATTR_FILL_STYLE );
+ return 0;
+}
+IMPL_LINK_INLINE_END( FillControl, DelayHdl, Timer *, pTimer )
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( FillControl, SelectFillTypeHdl, ListBox *, pBox )
+{
+ XFillStyle eXFS = (XFillStyle)pLbFillType->GetSelectEntryPos();
+
+ // Spaeter sollte eine Optimierung derart erfolgen, dass die
+ // Listen, bzw. Tables nur dann geloescht und wieder aufgebaut
+ // werden, wenn sich die Listen, bzw. Tables tatsaechlich geaendert
+ // haben (in den LBs natuerlich).
+
+ if ( ( pBox && !pBox->IsTravelSelect() ) || !pBox )
+ {
+ // Damit wir in folgendem Fall einen Status anzeigen koennen:
+ // Ein Typ wurde ausgewaehlt aber kein Attribut.
+ // Die Selektion hat genau die gleichen Attribute wie die vorherige.
+ SvxFillToolBoxControl* pControlerItem = (SvxFillToolBoxControl*)GetData();
+ if( pControlerItem )
+ pControlerItem->ClearCache();
+
+ pLbFillAttr->Clear();
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ switch( eXFS )
+ {
+ case XFILL_NONE:
+ {
+ pLbFillType->Selected();
+ SelectFillAttrHdl( pBox );
+ pLbFillAttr->Disable();
+ }
+ break;
+
+ case XFILL_SOLID:
+ {
+ if ( pSh && pSh->GetItem( SID_COLOR_TABLE ) )
+ {
+ SvxColorTableItem aItem( *(const SvxColorTableItem*)(
+ pSh->GetItem( SID_COLOR_TABLE ) ) );
+ pLbFillAttr->Enable();
+ pLbFillAttr->Fill( aItem.GetColorTable() );
+ }
+ else
+ pLbFillAttr->Disable();
+ }
+ break;
+
+ case XFILL_GRADIENT:
+ {
+ if ( pSh && pSh->GetItem( SID_GRADIENT_LIST ) )
+ {
+ SvxGradientListItem aItem( *(const SvxGradientListItem*)(
+ pSh->GetItem( SID_GRADIENT_LIST ) ) );
+ pLbFillAttr->Enable();
+ pLbFillAttr->Fill( aItem.GetGradientList() );
+ }
+ else
+ pLbFillAttr->Disable();
+ }
+ break;
+
+ case XFILL_HATCH:
+ {
+ if ( pSh && pSh->GetItem( SID_HATCH_LIST ) )
+ {
+ SvxHatchListItem aItem( *(const SvxHatchListItem*)(
+ pSh->GetItem( SID_HATCH_LIST ) ) );
+ pLbFillAttr->Enable();
+ pLbFillAttr->Fill( aItem.GetHatchList() );
+ }
+ else
+ pLbFillAttr->Disable();
+ }
+ break;
+
+ case XFILL_BITMAP:
+ {
+ if ( pSh && pSh->GetItem( SID_BITMAP_LIST ) )
+ {
+ SvxBitmapListItem aItem( *(const SvxBitmapListItem*)(
+ pSh->GetItem( SID_BITMAP_LIST ) ) );
+ pLbFillAttr->Enable();
+ pLbFillAttr->Fill( aItem.GetBitmapList() );
+ }
+ else
+ pLbFillAttr->Disable();
+ }
+ break;
+ }
+
+ if( eXFS != XFILL_NONE ) // Wurde schon erledigt
+ {
+ if ( pBox )
+ pLbFillType->Selected();
+
+ // release focus
+ if ( pBox && SfxViewShell::Current()->GetWindow() )
+ SfxViewShell::Current()->GetWindow()->GrabFocus();
+ }
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox )
+{
+ XFillStyle eXFS = (XFillStyle)pLbFillType->GetSelectEntryPos();
+ XFillStyleItem aXFillStyleItem( eXFS );
+ BOOL bAction = pBox && !pLbFillAttr->IsTravelSelect();
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+ SfxDispatcher* pDisp = ( (SvxFillToolBoxControl*)GetData() )->GetBindings().GetDispatcher();
+ DBG_ASSERT( pDisp, "invalid Dispatcher" );
+
+ switch( eXFS )
+ {
+ case XFILL_NONE:
+ if ( bAction )
+ pDisp->Execute( SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L );
+ break;
+
+ case XFILL_SOLID:
+ {
+ if( bAction )
+ {
+ // NEU
+ //Eintrag wird auf temporaere Farbe geprueft
+ String aTmpStr = pLbFillAttr->GetSelectEntry();
+ if( aTmpStr.GetChar(0) == TMP_STR_BEGIN && aTmpStr.GetChar(aTmpStr.Len()-1) == TMP_STR_END )
+ {
+ aTmpStr.Erase( aTmpStr.Len()-1, 1 );
+ aTmpStr.Erase( 0, 1 );
+ }
+
+ XFillColorItem aXFillColorItem( aTmpStr, pLbFillAttr->GetSelectEntryColor() );
+ // NEU
+ pDisp->Execute(
+ SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, &aXFillStyleItem, 0L );
+ }
+ }
+ break;
+
+ case XFILL_GRADIENT:
+ {
+ if( bAction )
+ {
+ USHORT nPos = pLbFillAttr->GetSelectEntryPos();
+
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_GRADIENT_LIST ) )
+ {
+ SvxGradientListItem aItem(
+ *(const SvxGradientListItem*)( pSh->GetItem( SID_GRADIENT_LIST ) ) );
+
+ if ( nPos < aItem.GetGradientList()->Count() ) // kein temp. Eintrag ?
+ {
+ XGradient aGradient = aItem.GetGradientList()->Get( nPos )->GetGradient();
+ XFillGradientItem aXFillGradientItem( pLbFillAttr->GetSelectEntry(), aGradient );
+ pDisp->Execute( SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD,
+ &aXFillGradientItem, &aXFillStyleItem, 0L );
+ }
+ }
+ }
+ }
+ break;
+
+ case XFILL_HATCH:
+ {
+ if( bAction )
+ {
+ USHORT nPos = pLbFillAttr->GetSelectEntryPos();
+
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_HATCH_LIST ) )
+ {
+ SvxHatchListItem aItem( *(const SvxHatchListItem*)( pSh->GetItem( SID_HATCH_LIST ) ) );
+
+ if ( nPos < aItem.GetHatchList()->Count() ) // kein temp. Eintrag ?
+ {
+ XHatch aHatch = aItem.GetHatchList()->Get( nPos )->GetHatch();
+ XFillHatchItem aXFillHatchItem( pLbFillAttr->GetSelectEntry(), aHatch );
+ pDisp->Execute( SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD,
+ &aXFillHatchItem, &aXFillStyleItem, 0L );
+ }
+ }
+ }
+ }
+ break;
+
+ case XFILL_BITMAP:
+ {
+ if( bAction )
+ {
+ USHORT nPos = pLbFillAttr->GetSelectEntryPos();
+
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_BITMAP_LIST ) )
+ {
+ SvxBitmapListItem aItem(
+ *(const SvxBitmapListItem*)( pSh->GetItem( SID_BITMAP_LIST ) ) );
+
+ if ( nPos < aItem.GetBitmapList()->Count() ) // kein temp. Eintrag ?
+ {
+ XOBitmap aXOBitmap = aItem.GetBitmapList()->Get( nPos )->GetXBitmap();
+ XFillBitmapItem aXFillBitmapItem( pLbFillAttr->GetSelectEntry(), aXOBitmap );
+ pDisp->Execute( SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD,
+ &aXFillBitmapItem, &aXFillStyleItem, 0L );
+ }
+ }
+ }
+ }
+ break;
+ }
+
+ // release focus
+ if ( !pLbFillAttr->IsTravelSelect() && pBox && SfxViewShell::Current()->GetWindow() )
+ SfxViewShell::Current()->GetWindow()->GrabFocus();
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+void FillControl::Resize()
+{
+ // Breite der beiden ListBoxen nicht 1/2 : 1/2, sondern 2/5 : 3/5
+ long nW = GetOutputSizePixel().Width() / 5;
+ long nH = 180;
+ long nSep = 0; // war vorher 4
+
+ pLbFillType->SetSizePixel( Size( nW * 2 - nSep, nH ) );
+ pLbFillAttr->SetPosSizePixel( Point( nW * 2 + nSep, 0 ), Size( nW * 3 - nSep, nH ) );
+}
+
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
new file mode 100644
index 0000000000..59510420b7
--- /dev/null
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -0,0 +1,718 @@
+/*************************************************************************
+ *
+ * $RCSfile: grafctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <string> // HACK: prevent conflict between STLPORT and Workshop headers
+
+#ifndef _TOOLBOX_HXX //autogen
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef _FIELD_HXX //autogen
+#include <vcl/field.hxx>
+#endif
+#ifndef _SV_FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXVIEWSH_HXX //autogen
+#include <sfx2/viewsh.hxx>
+#endif
+
+#include "svxids.hrc"
+#include "dialogs.hrc"
+#include "itemwin.hxx"
+#include "dialmgr.hxx"
+#include "grafctrl.hxx"
+
+// -----------
+// - Defines -
+// -----------
+
+#define SYMBOL_TO_FIELD_OFFSET 4
+
+// -----------------------
+// - ImplGrafMetricField -
+// -----------------------
+
+class ImplGrafMetricField : public MetricField
+{
+private:
+ Timer maTimer;
+ USHORT mnSID;
+ SfxBindings& mrBindings;
+
+ DECL_LINK( ImplModifyHdl, Timer* );
+
+protected:
+
+ virtual void Modify();
+
+public:
+
+ ImplGrafMetricField( Window* pParent, USHORT nSID, SfxBindings& rBindings );
+ ~ImplGrafMetricField();
+
+ void Update( const SfxPoolItem* pItem );
+ USHORT GetSID() const { return mnSID; }
+};
+
+// -----------------------------------------------------------------------------
+
+ImplGrafMetricField::ImplGrafMetricField( Window* pParent, USHORT nSID, SfxBindings& rBindings ) :
+
+ MetricField( pParent, WB_BORDER | WB_SPIN | WB_REPEAT | WB_3DLOOK ),
+
+ mnSID ( nSID ),
+ mrBindings ( rBindings )
+
+{
+ Size aSize( GetTextWidth( String::CreateFromAscii("-100 %") ), GetTextHeight() );
+
+ aSize.Width() += 20, aSize.Height() += 6;
+ SetSizePixel( aSize );
+
+ if( SID_ATTR_GRAF_GAMMA == mnSID )
+ {
+ SetDecimalDigits( 2 );
+
+ SetMin( 10 );
+ SetFirst( 10 );
+ SetMax( 1000 );
+ SetLast( 1000 );
+ SetSpinSize( 10 );
+ }
+ else
+ {
+ const long nMinVal = ( SID_ATTR_GRAF_TRANSPARENCE == mnSID ) ? 0 : -100;
+
+ SetUnit( FUNIT_CUSTOM );
+ SetCustomUnitText( String::CreateFromAscii(" %") );
+ SetDecimalDigits( 0 );
+
+ SetMin( nMinVal );
+ SetFirst( nMinVal );
+ SetMax( 100 );
+ SetLast( 100 );
+ SetSpinSize( 1 );
+ }
+
+ maTimer.SetTimeout( 100 );
+ maTimer.SetTimeoutHdl( LINK( this, ImplGrafMetricField, ImplModifyHdl ) );
+}
+
+// -----------------------------------------------------------------------------
+
+ImplGrafMetricField::~ImplGrafMetricField()
+{
+}
+
+// -----------------------------------------------------------------------------
+
+void ImplGrafMetricField::Modify()
+{
+ maTimer.Start();
+}
+
+// -----------------------------------------------------------------------------
+
+IMPL_LINK( ImplGrafMetricField, ImplModifyHdl, Timer*, pTimer )
+{
+ SfxPoolItem* pItem;
+ const long nVal = GetValue();
+
+ switch( mnSID )
+ {
+ case SID_ATTR_GRAF_RED:
+ case SID_ATTR_GRAF_GREEN:
+ case SID_ATTR_GRAF_BLUE:
+ case SID_ATTR_GRAF_LUMINANCE:
+ case SID_ATTR_GRAF_CONTRAST:
+ pItem = new SfxInt16Item( mnSID, (short) nVal );
+ break;
+
+ case SID_ATTR_GRAF_GAMMA:
+ pItem = new SfxUInt32Item( mnSID, nVal );
+ break;
+
+ case SID_ATTR_GRAF_TRANSPARENCE:
+ pItem = new SfxUInt16Item( mnSID, (USHORT) nVal );
+ break;
+
+ default:
+ pItem = 0;
+ break;
+ }
+
+ if( pItem )
+ {
+ mrBindings.GetDispatcher()->Execute( mnSID, SFX_CALLMODE_RECORD, pItem, 0L );
+ delete pItem;
+ }
+ return 0L;
+}
+
+// -----------------------------------------------------------------------------
+
+void ImplGrafMetricField::Update( const SfxPoolItem* pItem )
+{
+ if( pItem )
+ {
+ long nValue;
+
+ switch( mnSID )
+ {
+ case SID_ATTR_GRAF_TRANSPARENCE:
+ nValue = ( (SfxUInt16Item*) pItem )->GetValue();
+ break;
+
+ case SID_ATTR_GRAF_GAMMA:
+ nValue = ( (SfxUInt32Item*) pItem )->GetValue();
+ break;
+
+ default:
+ nValue = ( (SfxInt16Item*) pItem )->GetValue();
+ break;
+ }
+
+ SetValue( nValue );
+ }
+ else
+ SetText( String() );
+}
+
+// --------------------
+// - ImplGrafControl -
+// --------------------
+
+static USHORT ImplGetRID( USHORT nSID )
+{
+ static const USHORT aImplSlotToResMap[][2] =
+ {
+ { SID_ATTR_GRAF_RED, RID_SVXIMG_GRAF_RED },
+ { SID_ATTR_GRAF_GREEN, RID_SVXIMG_GRAF_GREEN },
+ { SID_ATTR_GRAF_BLUE, RID_SVXIMG_GRAF_BLUE },
+ { SID_ATTR_GRAF_LUMINANCE, RID_SVXIMG_GRAF_LUMINANCE },
+ { SID_ATTR_GRAF_CONTRAST, RID_SVXIMG_GRAF_CONTRAST },
+ { SID_ATTR_GRAF_GAMMA, RID_SVXIMG_GRAF_GAMMA },
+ { SID_ATTR_GRAF_TRANSPARENCE, RID_SVXIMG_GRAF_TRANSPARENCE }
+ };
+
+ USHORT nRID = 0;
+
+ for( int i = 0,
+ nCount = sizeof( aImplSlotToResMap ) / ( sizeof( USHORT ) * 2 );
+ i < nCount; i++ )
+ if( aImplSlotToResMap[ i ][ 0 ] == nSID )
+ {
+ nRID = aImplSlotToResMap[ i ][ 1 ];
+ break;
+ }
+
+ return nRID;
+}
+
+// -----------------------------------------------------------------------------
+
+class ImplGrafControl : public Control
+{
+private:
+ FixedImage maImage;
+ ImplGrafMetricField maField;
+
+protected:
+
+ virtual void GetFocus();
+
+public:
+
+ ImplGrafControl( Window* pParent, USHORT nSID, SfxBindings& rBindings );
+ ~ImplGrafControl();
+
+ void Update( const SfxPoolItem* pItem ) { maField.Update( pItem ); }
+ void SetText( const String& rStr ) { maField.SetText( rStr ); }
+};
+
+// -----------------------------------------------------------------------------
+
+ImplGrafControl::ImplGrafControl( Window* pParent, USHORT nSID, SfxBindings& rBindings ) :
+
+ Control( pParent, WB_TABSTOP ),
+
+ maImage ( this ),
+ maField ( this, nSID, rBindings )
+
+{
+ ResId aResId( ImplGetRID( nSID ), DIALOG_MGR() ) ;
+ Image aImage( aResId );
+ Size aImgSize( aImage.GetSizePixel() );
+ Size aFldSize( maField.GetSizePixel() );
+ long nFldY, nImgY;
+
+ maImage.SetImage( aImage );
+ maImage.SetSizePixel( aImgSize );
+
+ if( aImgSize.Height() > aFldSize.Height() )
+ nImgY = 0, nFldY = ( aImgSize.Height() - aFldSize.Height() ) >> 1;
+ else
+ nFldY = 0, nImgY = ( aFldSize.Height() - aImgSize.Height() ) >> 1;
+
+ maImage.SetPosPixel( Point( 0, nImgY ) );
+ maField.SetPosPixel( Point( aImgSize.Width() + SYMBOL_TO_FIELD_OFFSET, nFldY ) );
+ SetSizePixel( Size( aImgSize.Width() + aFldSize.Width() + SYMBOL_TO_FIELD_OFFSET,
+ Max( aImgSize.Height(), aFldSize.Height() ) ) );
+
+ maImage.SetHelpId( nSID );
+ maImage.Show();
+
+ maField.SetHelpId( nSID );
+ maField.Show();
+}
+
+// -----------------------------------------------------------------------------
+
+ImplGrafControl::~ImplGrafControl()
+{
+}
+
+// -----------------------------------------------------------------------------
+
+void ImplGrafControl::GetFocus()
+{
+ maField.GrabFocus();
+}
+
+// -----------------------
+// - ImplGrafModeControl -
+// -----------------------
+
+class ImplGrafModeControl : public ListBox
+{
+private:
+ USHORT mnCurPos;
+ SfxBindings& mrBindings;
+
+ virtual void Select();
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual long Notify( NotifyEvent& rNEvt );
+ void ImplReleaseFocus();
+
+public:
+
+ ImplGrafModeControl( Window* pParent, SfxBindings& rBindings );
+ ~ImplGrafModeControl();
+
+ void Update( const SfxPoolItem* pItem );
+};
+
+// -----------------------------------------------------------------------------
+
+ImplGrafModeControl::ImplGrafModeControl( Window* pParent, SfxBindings& rBindings ) :
+
+ ListBox( pParent, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ),
+
+ mnCurPos ( 0 ),
+ mrBindings ( rBindings )
+
+{
+ SetSizePixel( Size( 100, 260 ) );
+
+ InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_STANDARD ) );
+ InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_GREYS ) );
+ InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_MONO ) );
+ InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_WATERMARK ) );
+
+ Show();
+}
+
+// -----------------------------------------------------------------------
+
+ImplGrafModeControl::~ImplGrafModeControl()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void ImplGrafModeControl::Select()
+{
+ if ( !IsTravelSelect() )
+ {
+ SfxUInt16Item aGrafModeItem( SID_ATTR_GRAF_MODE, GetSelectEntryPos() );
+ mrBindings.GetDispatcher()->Execute( SID_ATTR_GRAF_MODE, SFX_CALLMODE_RECORD, &aGrafModeItem, 0L );
+ ImplReleaseFocus();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+long ImplGrafModeControl::PreNotify( NotifyEvent& rNEvt )
+{
+ USHORT nType = rNEvt.GetType();
+
+ if( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType )
+ mnCurPos = GetSelectEntryPos();
+
+ return ListBox::PreNotify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+long ImplGrafModeControl::Notify( NotifyEvent& rNEvt )
+{
+ long nHandled = ListBox::Notify( rNEvt );
+
+ if( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
+
+ switch( pKEvt->GetKeyCode().GetCode() )
+ {
+ case KEY_RETURN:
+ {
+ Select();
+ nHandled = 1;
+ }
+ break;
+
+ case KEY_ESCAPE:
+ {
+ SelectEntryPos( mnCurPos );
+ ImplReleaseFocus();
+ nHandled = 1;
+ }
+ break;
+ }
+ }
+
+ return nHandled;
+}
+
+// -----------------------------------------------------------------------
+
+void ImplGrafModeControl::ImplReleaseFocus()
+{
+ Window* pShellWnd = SfxViewShell::Current()->GetWindow();
+
+ if( pShellWnd )
+ pShellWnd->GrabFocus();
+}
+
+// -----------------------------------------------------------------------
+
+void ImplGrafModeControl::Update( const SfxPoolItem* pItem )
+{
+ if( pItem )
+ SelectEntryPos( ((SfxUInt16Item*)pItem)->GetValue() );
+ else
+ SetNoSelection();
+}
+
+// -------------------------
+// - SvxGrafToolBoxControl -
+// -------------------------
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxGrafToolBoxControl, SfxVoidItem );
+
+// -----------------------------------------------------------------------------
+
+SvxGrafToolBoxControl::SvxGrafToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind ) :
+ SfxToolBoxControl ( nId, rTbx, rBind )
+{
+ SfxApplication* pSfxApp = SFX_APP();
+ SfxModule* pModule = pSfxApp->GetActiveModule();
+
+ if( pModule )
+ StartListening( rBind, TRUE );
+ else
+ StartListening( *pSfxApp , TRUE );
+
+}
+
+// -----------------------------------------------------------------------------
+
+SvxGrafToolBoxControl::~SvxGrafToolBoxControl()
+{
+}
+
+// -----------------------------------------------------------------------------
+
+void SvxGrafToolBoxControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ ImplGrafControl* pCtrl = (ImplGrafControl*) GetToolBox().GetItemWindow( GetId() );
+ DBG_ASSERT( pCtrl, "Control not found" );
+
+ if( eState == SFX_ITEM_DISABLED )
+ {
+ pCtrl->Disable();
+ pCtrl->SetText( String() );
+ }
+ else
+ {
+ pCtrl->Enable();
+
+ if( eState == SFX_ITEM_AVAILABLE )
+ pCtrl->Update( pState );
+ else
+ pCtrl->Update( NULL );
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SvxGrafToolBoxControl::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType )
+{
+}
+
+// -----------------------------------------------------------------------------
+
+Window* SvxGrafToolBoxControl::CreateItemWindow( Window *pParent )
+{
+ return( new ImplGrafControl( pParent, GetId(), GetBindings() ) );
+}
+
+// ----------------------------
+// - SvxGrafRedToolBoxControl -
+// ----------------------------
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxGrafRedToolBoxControl, SfxInt16Item );
+
+// -----------------------------------------------------------------------------
+
+SvxGrafRedToolBoxControl::SvxGrafRedToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind ) :
+
+ SvxGrafToolBoxControl( nId, rTbx, rBind )
+
+{
+}
+
+// ------------------------------
+// - SvxGrafGreenToolBoxControl -
+// ------------------------------
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxGrafGreenToolBoxControl, SfxInt16Item );
+
+// -----------------------------------------------------------------------------
+
+SvxGrafGreenToolBoxControl::SvxGrafGreenToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind ) :
+
+ SvxGrafToolBoxControl( nId, rTbx, rBind )
+
+{
+}
+
+// -----------------------------
+// - SvxGrafBlueToolBoxControl -
+// -----------------------------
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxGrafBlueToolBoxControl, SfxInt16Item );
+
+// -----------------------------------------------------------------------------
+
+SvxGrafBlueToolBoxControl::SvxGrafBlueToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind ) :
+
+ SvxGrafToolBoxControl( nId, rTbx, rBind )
+
+{
+}
+
+// ----------------------------------
+// - SvxGrafLuminanceToolBoxControl -
+// ----------------------------------
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxGrafLuminanceToolBoxControl, SfxInt16Item );
+
+// -----------------------------------------------------------------------------
+
+SvxGrafLuminanceToolBoxControl::SvxGrafLuminanceToolBoxControl( USHORT nId, ToolBox& rTbx,
+ SfxBindings& rBind ) :
+
+ SvxGrafToolBoxControl( nId, rTbx, rBind )
+
+{
+}
+
+// ----------------------------------
+// - SvxGrafContrastToolBoxControl -
+// ----------------------------------
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxGrafContrastToolBoxControl, SfxInt16Item );
+
+// -----------------------------------------------------------------------------
+
+SvxGrafContrastToolBoxControl::SvxGrafContrastToolBoxControl( USHORT nId, ToolBox& rTbx,
+ SfxBindings& rBind ) :
+
+ SvxGrafToolBoxControl( nId, rTbx, rBind )
+
+{
+}
+
+// ------------------------------
+// - SvxGrafGammaToolBoxControl -
+// ------------------------------
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxGrafGammaToolBoxControl, SfxUInt32Item );
+
+// -----------------------------------------------------------------------------
+
+SvxGrafGammaToolBoxControl::SvxGrafGammaToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind ) :
+
+ SvxGrafToolBoxControl( nId, rTbx, rBind )
+
+{
+}
+
+// -------------------------------------
+// - SvxGrafTransparenceToolBoxControl -
+// -------------------------------------
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxGrafTransparenceToolBoxControl, SfxUInt16Item );
+
+// -----------------------------------------------------------------------------
+
+SvxGrafTransparenceToolBoxControl::SvxGrafTransparenceToolBoxControl( USHORT nId, ToolBox& rTbx,
+ SfxBindings& rBind ) :
+
+ SvxGrafToolBoxControl( nId, rTbx, rBind )
+
+{
+}
+
+// -----------------------------
+// - SvxGrafModeToolBoxControl -
+// -----------------------------
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxGrafModeToolBoxControl, SfxUInt16Item );
+
+// -----------------------------------------------------------------------------
+
+SvxGrafModeToolBoxControl::SvxGrafModeToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind ) :
+
+ SfxToolBoxControl( nId, rTbx, rBind )
+
+{
+ SfxApplication* pSfxApp = SFX_APP();
+ SfxModule* pModule = pSfxApp->GetActiveModule();
+
+ if( pModule )
+ StartListening( rBind, TRUE );
+ else
+ StartListening( *pSfxApp , TRUE );
+}
+
+// -----------------------------------------------------------------------------
+
+SvxGrafModeToolBoxControl::~SvxGrafModeToolBoxControl()
+{
+}
+
+// -----------------------------------------------------------------------------
+
+void SvxGrafModeToolBoxControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ ImplGrafModeControl* pCtrl = (ImplGrafModeControl*) GetToolBox().GetItemWindow( GetId() );
+ DBG_ASSERT( pCtrl, "Control not found" );
+
+ if( eState == SFX_ITEM_DISABLED )
+ {
+ pCtrl->Disable();
+ pCtrl->SetText( String() );
+ }
+ else
+ {
+ pCtrl->Enable();
+
+ if( eState == SFX_ITEM_AVAILABLE )
+ pCtrl->Update( pState );
+ else
+ pCtrl->Update( NULL );
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SvxGrafModeToolBoxControl::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType )
+{
+}
+
+// -----------------------------------------------------------------------------
+
+Window* SvxGrafModeToolBoxControl::CreateItemWindow( Window *pParent )
+{
+ return( new ImplGrafModeControl( pParent, GetBindings() ) );
+}
+
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
new file mode 100644
index 0000000000..c9d0ad3da2
--- /dev/null
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -0,0 +1,698 @@
+/*************************************************************************
+ *
+ * $RCSfile: itemwin.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXVIEWSH_HXX
+#include <sfx2/viewsh.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_ITEMWIN_CXX
+
+#include "dialogs.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_DASH_LIST SID_DASH_LIST
+
+#define DELAY_TIMEOUT 100
+
+#include "xlnclit.hxx"
+#include "xlnwtit.hxx"
+#include "xlineit0.hxx"
+#include "xlndsit.hxx"
+#include "xtable.hxx"
+#include "drawitem.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+#include "itemwin.hxx"
+#include "linectrl.hxx"
+
+#include "linectrl.hrc"
+
+//========================================================================
+// SvxLineBox
+//========================================================================
+
+SvxLineBox::SvxLineBox( Window* pParent, SfxBindings& rBind, WinBits nBits ) :
+
+ LineLB( pParent, nBits ),
+
+ nCurPos ( 0 ),
+ rBindings ( rBind )
+
+{
+ SetSizePixel( Size( 90, 260 ) );
+ Show();
+
+ aDelayTimer.SetTimeout( DELAY_TIMEOUT );
+ aDelayTimer.SetTimeoutHdl( LINK( this, SvxLineBox, DelayHdl_Impl ) );
+ aDelayTimer.Start();
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineBox::~SvxLineBox()
+{
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxLineBox, DelayHdl_Impl, Timer *, pTimer )
+{
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ if ( pSh && GetEntryCount() == 0 )
+ {
+ InsertEntry( SVX_RESSTR(RID_SVXSTR_INVISIBLE) );
+
+ const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
+ Bitmap aBitmap ( SVX_RES ( RID_SVXCTRL_LINECTRL ) );
+ Color aColorOld ( 0xFF, 0xFF, 0xFF );
+ Color aColorNew = rStyles.GetWindowColor();
+ aBitmap.Replace ( aColorOld, aColorNew );
+ Image aSolidLine ( aBitmap );
+ InsertEntry( SVX_RESSTR(RID_SVXSTR_SOLID), aSolidLine );
+
+ const SvxDashListItem* pItem = (const SvxDashListItem*)( pSh->GetItem( SID_DASH_LIST ) );
+ if ( pItem )
+ Fill( pItem->GetDashList() );
+
+ rBindings.Invalidate( SID_ATTR_LINE_DASH );
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineBox::Select()
+{
+ if ( !IsTravelSelect() )
+ {
+ XLineStyle eXLS;
+ USHORT nPos = GetSelectEntryPos();
+ SfxDispatcher* pDisp = rBindings.GetDispatcher();
+ DBG_ASSERT( pDisp, "invalid Dispatcher" );
+
+ switch ( nPos )
+ {
+ case 0:
+ eXLS = XLINE_NONE;
+ break;
+
+ case 1:
+ eXLS = XLINE_SOLID;
+ break;
+
+ default:
+ {
+ eXLS = XLINE_DASH;
+
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND &&
+ SfxObjectShell::Current() &&
+ SfxObjectShell::Current()->GetItem( SID_DASH_LIST ) )
+ {
+ // LineDashItem wird nur geschickt, wenn es auch einen Dash besitzt.
+ // Notify k"ummert sich darum!
+ SvxDashListItem aItem( *(const SvxDashListItem*)(
+ SfxObjectShell::Current()->GetItem( SID_DASH_LIST ) ) );
+ XLineDashItem aLineDashItem( GetSelectEntry(),
+ aItem.GetDashList()->Get( nPos - 2 )->GetDash() );
+ pDisp->Execute( SID_ATTR_LINE_DASH, SFX_CALLMODE_RECORD, &aLineDashItem, 0L );
+ }
+ }
+ break;
+ }
+
+ XLineStyleItem aLineStyleItem( eXLS );
+ pDisp->Execute( SID_ATTR_LINE_STYLE, SFX_CALLMODE_RECORD, &aLineStyleItem, 0L );
+ ReleaseFocus_Impl();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+long SvxLineBox::PreNotify( NotifyEvent& rNEvt )
+{
+ USHORT nType = rNEvt.GetType();
+
+ if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType )
+ nCurPos = GetSelectEntryPos();
+
+ return LineLB::PreNotify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+long SvxLineBox::Notify( NotifyEvent& rNEvt )
+{
+ long nHandled = LineLB::Notify( rNEvt );
+
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
+
+ switch ( pKEvt->GetKeyCode().GetCode() )
+ {
+ case KEY_RETURN:
+ Select();
+ nHandled = 1;
+ break;
+
+ case KEY_ESCAPE:
+ SelectEntryPos( nCurPos );
+ ReleaseFocus_Impl();
+ nHandled = 1;
+ break;
+ }
+ }
+ return nHandled;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineBox::ReleaseFocus_Impl()
+{
+ Window* pShellWnd = SfxViewShell::Current()->GetWindow();
+
+ if ( pShellWnd )
+ pShellWnd->GrabFocus();
+}
+
+//========================================================================
+// SvxColorBox
+//========================================================================
+
+SvxColorBox::SvxColorBox( Window* pParent, USHORT nSID, SfxBindings& rBind, WinBits nBits ) :
+
+ ColorLB( pParent, nBits ),
+
+ nCurPos ( 0 ),
+ nId ( nSID ),
+ rBindings ( rBind )
+
+{
+ SetSizePixel( Size( 100, 180 ) );
+ Show();
+
+/*
+ aDelayTimer.SetTimeout( DELAY_TIMEOUT );
+ aDelayTimer.SetTimeoutHdl( LINK( this, SvxColorBox, DelayHdl_Impl ) );
+ aDelayTimer.Start();
+ Jetzt im DelayHdl()
+
+*/
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ if ( pSh )
+ {
+ const SvxColorTableItem* pItem =
+ (const SvxColorTableItem*)( pSh->GetItem( SID_COLOR_TABLE ) );
+ if(pItem)
+ Fill( pItem->GetColorTable() );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxColorBox, DelayHdl_Impl, Timer *, pTimer )
+{
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ if ( pSh )
+ {
+ const SvxColorTableItem* pItem = (const SvxColorTableItem*)( pSh->GetItem( SID_COLOR_TABLE ) );
+ if ( pItem )
+ Fill( pItem->GetColorTable() );
+ rBindings.Invalidate( nId );
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+SvxColorBox::~SvxColorBox()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorBox::Update( const XLineColorItem* pItem )
+{
+ if ( pItem )
+ SelectEntry( pItem->GetValue() );
+ else
+ SetNoSelection();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorBox::Select()
+{
+ if ( !IsTravelSelect() )
+ {
+ XLineColorItem aLineColorItem( GetSelectEntry(), GetSelectEntryColor() );
+ rBindings.GetDispatcher()->Execute( nId, SFX_CALLMODE_RECORD, &aLineColorItem, 0L );
+ ReleaseFocus_Impl();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+long SvxColorBox::PreNotify( NotifyEvent& rNEvt )
+{
+ USHORT nType = rNEvt.GetType();
+
+ if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType )
+ nCurPos = GetSelectEntryPos();
+
+ return ColorLB::PreNotify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+long SvxColorBox::Notify( NotifyEvent& rNEvt )
+{
+ long nHandled = ColorLB::Notify( rNEvt );
+
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
+
+ switch ( pKEvt->GetKeyCode().GetCode() )
+ {
+ case KEY_RETURN:
+ Select();
+ nHandled = 1;
+ break;
+
+ case KEY_ESCAPE:
+ SelectEntryPos( nCurPos );
+ ReleaseFocus_Impl();
+ nHandled = 1;
+ break;
+ }
+ }
+ return nHandled;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorBox::ReleaseFocus_Impl()
+{
+ Window* pShellWnd = SfxViewShell::Current()->GetWindow();
+
+ if ( pShellWnd )
+ pShellWnd->GrabFocus();
+}
+
+//========================================================================
+// SvxMetricField
+//========================================================================
+
+SvxMetricField::SvxMetricField( Window* pParent, SfxBindings& rBind, WinBits nBits ) :
+
+ MetricField( pParent, nBits ),
+
+ aCurTxt ( String() ),
+ rBindings ( rBind )
+
+{
+ Size aSize = Size(GetTextWidth( String::CreateFromAscii("99,99mm") ),GetTextHeight());
+ aSize.Width() += 20;
+#ifndef MAC
+ aSize.Height() += 6;
+#else
+ aSize.Height() += 5;
+#endif
+ SetSizePixel( aSize );
+ SetUnit( FUNIT_MM );
+ SetDecimalDigits( 2 );
+ SetMax( 5000 );
+ SetMin( 0 );
+ SetLast( 5000 );
+ SetFirst( 0 );
+
+ GET_MODULE_FIELDUNIT( eDlgUnit );
+ SetFieldUnit( *this, eDlgUnit, FALSE );
+ Show();
+}
+
+// -----------------------------------------------------------------------
+
+SvxMetricField::~SvxMetricField()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxMetricField::Update( const XLineWidthItem* pItem )
+{
+ if ( pItem )
+ {
+ if ( pItem->GetValue() != GetCoreValue( *this, ePoolUnit ) )
+ SetMetricValue( *this, pItem->GetValue(), ePoolUnit );
+ }
+ else
+ SetText( String() );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxMetricField::Modify()
+{
+ MetricField::Modify();
+ long nTmp = GetCoreValue( *this, ePoolUnit );
+ XLineWidthItem aLineWidthItem( nTmp );
+ rBindings.GetDispatcher()->Execute( SID_ATTR_LINE_WIDTH, SFX_CALLMODE_RECORD, &aLineWidthItem, 0L );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxMetricField::ReleaseFocus_Impl()
+{
+ Window* pShellWnd = SfxViewShell::Current()->GetWindow();
+ if ( pShellWnd )
+ pShellWnd->GrabFocus();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxMetricField::Down()
+{
+ long nValue = GetValue();
+ nValue -= GetSpinSize();
+
+ // Um unter OS/2 einen Sprung auf Max zu verhindern
+ if ( nValue >= GetMin() )
+ MetricField::Down();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxMetricField::Up()
+{
+ MetricField::Up();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxMetricField::SetCoreUnit( SfxMapUnit eUnit )
+{
+ ePoolUnit = eUnit;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxMetricField::RefreshDlgUnit()
+{
+ FieldUnit eTmpUnit = SFX_APP()->GetOptions().GetMetric();
+ GET_MODULE_FIELDUNIT( eTmpUnit );
+
+ if ( eDlgUnit != eTmpUnit )
+ {
+ eDlgUnit = eTmpUnit;
+ SetFieldUnit( *this, eDlgUnit, FALSE );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+long SvxMetricField::PreNotify( NotifyEvent& rNEvt )
+{
+ USHORT nType = rNEvt.GetType();
+
+ if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType )
+ aCurTxt = GetText();
+
+ return MetricField::PreNotify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+long SvxMetricField::Notify( NotifyEvent& rNEvt )
+{
+ long nHandled = MetricField::Notify( rNEvt );
+
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
+ const KeyCode& rKey = pKEvt->GetKeyCode();
+ SfxViewShell* pSh = SfxViewShell::Current();
+
+ if ( rKey.GetModifier() && rKey.GetGroup() != KEYGROUP_CURSOR && pSh )
+ pSh->KeyInput( *pKEvt );
+ else
+ {
+ FASTBOOL bHandled = FALSE;
+
+ switch ( rKey.GetCode() )
+ {
+ case KEY_RETURN:
+ Reformat();
+ bHandled = TRUE;
+ break;
+
+ case KEY_ESCAPE:
+ SetText( aCurTxt );
+ bHandled = TRUE;
+ break;
+ }
+
+ if ( bHandled )
+ {
+ nHandled = 1;
+ Modify();
+ ReleaseFocus_Impl();
+ }
+ }
+ }
+ return nHandled;
+}
+
+//========================================================================
+// SvxFillTypeBox
+//========================================================================
+
+SvxFillTypeBox::SvxFillTypeBox( Window* pParent, WinBits nBits ) :
+
+ FillTypeLB( pParent, nBits ),
+
+ nCurPos ( 0 ),
+ bSelect ( FALSE )
+
+{
+ SetSizePixel( Size( 90, 100 ) );
+ Fill();
+ SelectEntryPos( XFILL_SOLID );
+ Show();
+}
+
+// -----------------------------------------------------------------------
+
+SvxFillTypeBox::~SvxFillTypeBox()
+{
+}
+
+// -----------------------------------------------------------------------
+
+long SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt )
+{
+ USHORT nType = rNEvt.GetType();
+
+ if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType )
+ nCurPos = GetSelectEntryPos();
+ else if ( EVENT_LOSEFOCUS == nType
+ && Application::GetFocusWindow()
+ && !IsWindowOrChild( Application::GetFocusWindow(), TRUE ) )
+ {
+ if ( !bSelect )
+ SelectEntryPos( nCurPos );
+ else
+ bSelect = FALSE;
+ }
+
+ return FillTypeLB::PreNotify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+long SvxFillTypeBox::Notify( NotifyEvent& rNEvt )
+{
+ long nHandled = FillTypeLB::Notify( rNEvt );
+
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
+
+ switch ( pKEvt->GetKeyCode().GetCode() )
+ {
+ case KEY_RETURN:
+ ( (Link&)GetSelectHdl() ).Call( this );
+ nHandled = 1;
+ break;
+
+ case KEY_ESCAPE:
+ SelectEntryPos( nCurPos );
+ ReleaseFocus_Impl();
+ nHandled = 1;
+ break;
+ }
+ }
+ return nHandled;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFillTypeBox::ReleaseFocus_Impl()
+{
+ Window* pShellWnd = SfxViewShell::Current()->GetWindow();
+
+ if ( pShellWnd )
+ pShellWnd->GrabFocus();
+}
+
+//========================================================================
+// SvxFillAttrBox
+//========================================================================
+
+SvxFillAttrBox::SvxFillAttrBox( Window* pParent, WinBits nBits ) :
+
+ FillAttrLB( pParent, nBits ),
+
+ nCurPos( 0 )
+
+{
+ SetPosPixel( Point( 90, 0 ) );
+ SetSizePixel( Size( 110, 180 ) );
+ Show();
+}
+
+// -----------------------------------------------------------------------
+
+SvxFillAttrBox::~SvxFillAttrBox()
+{
+}
+
+// -----------------------------------------------------------------------
+
+long SvxFillAttrBox::PreNotify( NotifyEvent& rNEvt )
+{
+ USHORT nType = rNEvt.GetType();
+
+ if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType )
+ nCurPos = GetSelectEntryPos();
+
+ return FillAttrLB::PreNotify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+long SvxFillAttrBox::Notify( NotifyEvent& rNEvt )
+{
+ long nHandled = FillAttrLB::Notify( rNEvt );
+
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
+
+ switch ( pKEvt->GetKeyCode().GetCode() )
+ {
+ case KEY_RETURN:
+ ( (Link&)GetSelectHdl() ).Call( this );
+ nHandled = 1;
+ break;
+
+ case KEY_ESCAPE:
+ SelectEntryPos( nCurPos );
+ ReleaseFocus_Impl();
+ nHandled = 1;
+ break;
+ }
+ }
+ return nHandled;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFillAttrBox::ReleaseFocus_Impl()
+{
+ Window* pShellWnd = SfxViewShell::Current()->GetWindow();
+
+ if ( pShellWnd )
+ pShellWnd->GrabFocus();
+}
+
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
new file mode 100644
index 0000000000..5ba9fed0f8
--- /dev/null
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -0,0 +1,726 @@
+/*************************************************************************
+ *
+ * $RCSfile: layctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <string> // HACK: prevent conflict between STLPORT and Workshop headers
+
+#ifndef _SV_SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+#ifndef _SV_TOOLBOX_HXX //autogen
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#pragma hdrstop
+
+#include "dialogs.hrc"
+#include "layctrl.hxx"
+
+SFX_IMPL_TOOLBOX_CONTROL(SvxTableToolBoxControl,SfxUInt16Item);
+SFX_IMPL_TOOLBOX_CONTROL(SvxColumnsToolBoxControl,SfxUInt16Item);
+
+// class TableWindow -----------------------------------------------------
+
+class TableWindow : public SfxPopupWindow
+{
+private:
+ Color aLineColor;
+ Color aHighlightLineColor;
+ Color aFillColor;
+ Color aHighlightFillColor;
+ long nCol;
+ long nLine;
+ long nWidth;
+ long nHeight;
+ long nMX;
+ long nMY;
+ long nTextHeight;
+
+public:
+ TableWindow( USHORT nId, SfxBindings& rBind );
+
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void Paint( const Rectangle& );
+ virtual void PopupModeEnd();
+ virtual SfxPopupWindow* Clone() const;
+
+ USHORT GetColCount() const { return (USHORT)nCol; }
+ USHORT GetLineCount() const { return (USHORT)nLine; }
+};
+
+// -----------------------------------------------------------------------
+
+TableWindow::TableWindow( USHORT nId, SfxBindings& rBind ) :
+
+ SfxPopupWindow( nId, (WinBits)0, rBind )
+
+{
+ const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
+ aLineColor = rStyles.GetWindowTextColor();
+ aHighlightLineColor = rStyles.GetHighlightTextColor();
+ aFillColor = rStyles.GetWindowColor();
+ aHighlightFillColor = rStyles.GetHighlightColor();
+
+ nTextHeight = GetTextHeight()+1;
+ SetBackgroundBrush( Brush( BRUSH_NULL ) );
+ Font aFont = GetFont();
+ aFont.SetFillColor( Color( COL_WHITE ) );
+ aFont.SetTransparent( FALSE );
+ SetFont( aFont );
+
+ nCol = 0;
+ nLine = 0;
+ nWidth = 5;
+ nHeight = 5;
+
+ Size aLogicSize = LogicToPixel( Size( 55, 35 ), MapMode( MAP_10TH_MM ) );
+ nMX = aLogicSize.Width();
+ nMY = aLogicSize.Height();
+ SetOutputSizePixel( Size( nMX*nWidth-1, nMY*nHeight-1+nTextHeight ) );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* TableWindow::Clone() const
+{
+ return new TableWindow( GetId(), (SfxBindings&)GetBindings() );
+}
+
+// -----------------------------------------------------------------------
+
+void TableWindow::MouseMove( const MouseEvent& rMEvt )
+{
+ SfxPopupWindow::MouseMove( rMEvt );
+ Point aPos = rMEvt.GetPosPixel();
+ Point aMousePos = OutputToScreenPixel( aPos );
+ Point aWinPos = GetPosPixel();
+
+ if ( rMEvt.IsEnterWindow() )
+ CaptureMouse();
+ else if ( aMousePos.X() < aWinPos.X() || aMousePos.Y() < aWinPos.Y() )
+ {
+ nCol = 0;
+ nLine = 0;
+ ReleaseMouse();
+ Invalidate();
+ return;
+ }
+
+ Size aWinSize = GetOutputSizePixel();
+ long nNewCol = 0;
+ long nNewLine = 0;
+ long nMinCol = 0;
+ long nMinLine = 0;
+ long nMaxCol = 0;
+ long nMaxLine = 0;
+
+ if ( aPos.X() > 0 )
+ nNewCol = aPos.X() / nMX + 1;
+ if ( aPos.Y() > 0 )
+ nNewLine = aPos.Y() / nMY + 1;
+
+ if ( nNewCol > 500 )
+ nNewCol = 500;
+ if ( nNewLine > 1000 )
+ nNewLine = 1000;
+
+ if ( (nWidth <= nNewCol) || (nHeight < nNewLine) )
+ {
+ Point aMaxPos = OutputToScreenPixel( GetDesktopRectPixel().BottomRight() );
+ long nOff = 0;
+
+ if ( nWidth <= nNewCol )
+ {
+ nWidth = nNewCol;
+ nWidth++;
+ }
+ if ( nHeight <= nNewLine )
+ {
+ nHeight = nNewLine;
+ nOff = 1;
+ }
+ while ( nWidth > 0 &&
+ (short)(aWinPos.X()+(nMX*nWidth-1)) >= aMaxPos.X()-3 )
+ nWidth--;
+
+ while ( nHeight > 0 &&
+ (short)(aWinPos.Y()+(nMY*nHeight-1+nTextHeight)) >=
+ aMaxPos.Y()-3 )
+ nHeight--;
+
+ if ( nNewCol > nWidth )
+ nNewCol = nWidth;
+
+ if ( nNewLine > nHeight )
+ nNewLine = nHeight;
+
+ Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2-nOff,
+ aWinSize.Width(), aWinSize.Height() ) );
+ SetOutputSizePixel( Size( nMX*nWidth-1, nMY*nHeight-1+nTextHeight ) );
+ }
+
+ if ( nNewCol < nCol )
+ {
+ nMinCol = nNewCol;
+ nMaxCol = nCol;
+ }
+ else
+ {
+ nMinCol = nCol;
+ nMaxCol = nNewCol;
+ }
+ if ( nNewLine < nLine )
+ {
+ nMinLine = nNewLine;
+ nMaxLine = nLine;
+ }
+ else
+ {
+ nMinLine = nLine;
+ nMaxLine = nNewLine;
+ }
+
+ if ( (nNewCol != nCol) || (nNewLine != nLine) )
+ {
+ Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2,
+ aWinSize.Width(), aWinSize.Height() ) );
+
+ if ( nNewCol != nCol )
+ {
+ Invalidate( Rectangle( nMinCol*nMX-1, 0, nMaxCol*nMX+1, nMaxLine*nMY ) );
+ nCol = nNewCol;
+ }
+ if ( nNewLine != nLine )
+ {
+ Invalidate( Rectangle( 0, nMinLine*nMY-2, nMaxCol*nMX, nMaxLine*nMY+1 ) );
+ nLine = nNewLine;
+ }
+ }
+ Update();
+}
+
+// -----------------------------------------------------------------------
+
+void TableWindow::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ SfxPopupWindow::MouseButtonDown( rMEvt );
+ CaptureMouse();
+}
+
+// -----------------------------------------------------------------------
+
+void TableWindow::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ SfxPopupWindow::MouseButtonUp( rMEvt );
+ ReleaseMouse();
+
+ if ( IsInPopupMode() )
+ EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL );
+}
+
+// -----------------------------------------------------------------------
+
+void TableWindow::Paint( const Rectangle& )
+{
+ long i;
+ long nStart;
+ Size aSize = GetOutputSizePixel();
+
+ SetLineColor();
+ SetFillColor( aHighlightFillColor );
+ DrawRect( Rectangle( 0, 0, nCol*nMX-1, nLine*nMY-1 ) );
+ SetFillColor( aFillColor );
+ DrawRect( Rectangle( nCol*nMX-1, 0,
+ aSize.Width(), aSize.Height()-nTextHeight+1 ) );
+ DrawRect( Rectangle( 0, nLine*nMY-1,
+ aSize.Width(), aSize.Height()-nTextHeight+1 ) );
+
+ SetLineColor( aHighlightLineColor );
+ for ( i = 1; i < nCol; i++ )
+ DrawLine( Point( i*nMX-1, 0 ), Point( i*nMX-1, nLine*nMY-1 ) );
+ for ( i = 1; i < nLine; i++ )
+ DrawLine( Point( 0, i*nMY-1 ), Point( nCol*nMX-1, i*nMY-1 ) );
+ SetLineColor( aLineColor );
+ for ( i = 1; i <= nWidth; i++ )
+ {
+ if ( i < nCol )
+ nStart = nLine*nMY-1;
+ else
+ nStart = 0;
+ DrawLine( Point( i*nMX-1, nStart ), Point( i*nMX-1, nHeight*nMY-1 ) );
+ }
+ for ( i = 1; i <= nHeight; i++ )
+ {
+ if ( i < nLine )
+ nStart = nCol*nMX-1;
+ else
+ nStart = 0;
+ DrawLine( Point( nStart, i*nMY-1 ), Point( nWidth*nMX-1, i*nMY-1 ) );
+ }
+
+ SetLineColor();
+ String aText;
+ if ( nCol && nLine )
+ {
+ aText += String::CreateFromInt32( nCol );
+ aText.AppendAscii( " x " );
+ aText += String::CreateFromInt32( nLine );
+ }
+ else
+ aText = Button::GetStandardText( BUTTON_CANCEL );
+ Size aTextSize( GetTextWidth( aText ), GetTextHeight() );
+ DrawText( Point( (aSize.Width() - aTextSize.Width()) / 2, aSize.Height() - nTextHeight + 2 ), aText );
+ DrawRect( Rectangle( 0, aSize.Height()-nTextHeight+2,
+ (aSize.Width()-aTextSize.Width())/2-1, aSize.Height() ) );
+ DrawRect( Rectangle( (aSize.Width()-aTextSize.Width())/2+aTextSize.Width(),
+ aSize.Height()-nTextHeight+2,
+ aSize.Width(), aSize.Height() ) );
+ SetLineColor( Color( COL_BLACK ) );
+ SetFillColor();
+ DrawRect( Rectangle( Point(0,0), aSize ) );
+}
+
+// -----------------------------------------------------------------------
+
+void TableWindow::PopupModeEnd()
+{
+ if ( !IsPopupModeCanceled() && nCol && nLine )
+ {
+ SfxUInt16Item aCol( SID_ATTR_TABLE_COLUMN, (UINT16)nCol );
+ SfxUInt16Item aRow( SID_ATTR_TABLE_ROW, (UINT16)nLine );
+ GetBindings().GetDispatcher()->Execute(
+ GetId(), SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aCol, &aRow, 0L );
+ }
+ else if ( IsPopupModeCanceled() )
+ ReleaseMouse();
+ SfxPopupWindow::PopupModeEnd();
+}
+
+// class ColumnsWindow ---------------------------------------------------
+
+class ColumnsWindow : public SfxPopupWindow
+{
+private:
+ Color aLineColor;
+ Color aHighlightLineColor;
+ Color aFillColor;
+ Color aHighlightFillColor;
+ long nCol;
+ long nWidth;
+ long nMX;
+ long nTextHeight;
+
+public:
+ ColumnsWindow( USHORT nId, SfxBindings& rBind );
+
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void Paint( const Rectangle& );
+ virtual void PopupModeEnd();
+ virtual SfxPopupWindow* Clone() const;
+
+ USHORT GetColCount() const { return (USHORT)nCol; }
+};
+
+// -----------------------------------------------------------------------
+
+ColumnsWindow::ColumnsWindow( USHORT nId, SfxBindings& rBind ) :
+
+ SfxPopupWindow( nId, (WinBits)0, rBind )
+
+{
+ const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
+ aLineColor = rStyles.GetWindowTextColor();
+ aHighlightLineColor = rStyles.GetHighlightTextColor();
+ aFillColor = rStyles.GetWindowColor();
+ aHighlightFillColor = rStyles.GetHighlightColor();
+
+ nTextHeight = GetTextHeight()+1;
+ SetBackgroundBrush( Brush( BRUSH_NULL ) );
+ Font aFont = GetFont();
+ aFont.SetFillColor( Color( COL_WHITE ) );
+ aFont.SetTransparent( FALSE );
+ SetFont( aFont );
+
+ nCol = 0;
+ nWidth = 4;
+
+ Size aLogicSize = LogicToPixel( Size( 95, 155 ), MapMode( MAP_10TH_MM ) );
+ nMX = aLogicSize.Width();
+ SetOutputSizePixel( Size( nMX*nWidth-1, aLogicSize.Height()+nTextHeight ) );
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* ColumnsWindow::Clone() const
+{
+ return new ColumnsWindow( GetId(), (SfxBindings&)GetBindings() );
+}
+
+// -----------------------------------------------------------------------
+
+void ColumnsWindow::MouseMove( const MouseEvent& rMEvt )
+{
+ SfxPopupWindow::MouseMove( rMEvt );
+ Point aPos = rMEvt.GetPosPixel();
+ Point aMousePos = OutputToScreenPixel( aPos );
+ Point aWinPos = GetPosPixel();
+
+ if ( rMEvt.IsEnterWindow() )
+ CaptureMouse();
+ else if ( aMousePos.X() < aWinPos.X() || aMousePos.Y() < aWinPos.Y() )
+ {
+ nCol = 0;
+ ReleaseMouse();
+ Invalidate();
+ return;
+ }
+
+ Size aWinSize = GetOutputSizePixel();
+ long nNewCol = 0;
+ long nMinCol = 0;
+ long nMaxCol = 0;
+
+ if ( aPos.X() > 0 )
+ nNewCol = aPos.X() / nMX + 1;
+
+ if ( nNewCol > 20 )
+ nNewCol = 20;
+
+ if ( nWidth <= nNewCol )
+ {
+ Point aMaxPos = OutputToScreenPixel( GetDesktopRectPixel().BottomRight() );
+
+ if ( nWidth <= nNewCol )
+ {
+ nWidth = nNewCol;
+ nWidth++;
+ }
+
+ while ( nWidth > 0 &&
+ (short)(aWinPos.X()+(nMX*nWidth-1)) >= aMaxPos.X()-3 )
+ nWidth--;
+
+ if ( nNewCol > nWidth )
+ nNewCol = nWidth;
+
+ Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2,
+ aWinSize.Width(), aWinSize.Height() ) );
+ SetOutputSizePixel( Size( nMX*nWidth-1, aWinSize.Height() ) );
+ }
+
+ if ( aPos.Y() < 0 )
+ nNewCol = 0;
+
+ if ( nNewCol != nCol )
+ {
+ Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2,
+ aWinSize.Width(), aWinSize.Height() ) );
+
+ if ( nNewCol < nCol )
+ {
+ nMinCol = nNewCol;
+ nMaxCol = nCol;
+ }
+ else
+ {
+ nMinCol = nCol;
+ nMaxCol = nNewCol;
+ }
+
+ Invalidate( Rectangle( nMinCol*nMX-1, 0,
+ nMaxCol*nMX+1, aWinSize.Height()-nTextHeight+2 ) );
+ nCol = nNewCol;
+ }
+ Update();
+}
+
+// -----------------------------------------------------------------------
+
+void ColumnsWindow::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ SfxPopupWindow::MouseButtonDown( rMEvt );
+ CaptureMouse();
+}
+
+// -----------------------------------------------------------------------
+
+void ColumnsWindow::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ SfxPopupWindow::MouseButtonUp( rMEvt );
+ ReleaseMouse();
+
+ if ( IsInPopupMode() )
+ EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL );
+}
+
+// -----------------------------------------------------------------------
+
+void ColumnsWindow::Paint( const Rectangle& )
+{
+ long i;
+ long j;
+ long nLineWidth;
+ Size aSize = GetOutputSizePixel();
+
+ for ( i = 0; i < nWidth; i++ )
+ {
+ if ( i < nCol )
+ {
+ SetLineColor( aHighlightLineColor );
+ SetFillColor( aHighlightFillColor );
+ }
+ else
+ {
+ SetLineColor( aLineColor );
+ SetFillColor( aFillColor );
+ }
+
+ DrawRect( Rectangle( i*nMX-1, -1,
+ i*nMX+nMX, aSize.Height()-nTextHeight+1 ) );
+
+ j = 4;
+ while ( j < aSize.Height()-nTextHeight-4 )
+ {
+ if ( !(j % 16) )
+ nLineWidth = 10;
+ else
+ nLineWidth = 4;
+ DrawLine( Point( i*nMX+4, j ), Point( i*nMX+nMX-nLineWidth-4, j ) );
+ j += 4;
+ }
+ }
+
+ SetLineColor();
+ SetFillColor( aFillColor );
+ String aText;
+ if ( nCol )
+ aText = String( String::CreateFromInt32(nCol) );
+ else
+ aText = Button::GetStandardText( BUTTON_CANCEL );
+ Size aTextSize(GetTextWidth( aText ), GetTextHeight());
+ DrawText( Point( (aSize.Width()-aTextSize.Width()) / 2,
+ aSize.Height()-nTextHeight+2 ),
+ aText );
+ DrawRect( Rectangle( 0, aSize.Height()-nTextHeight+2,
+ (aSize.Width()-aTextSize.Width())/2-1, aSize.Height() ) );
+ DrawRect( Rectangle( (aSize.Width()-aTextSize.Width())/2+aTextSize.Width(),
+ aSize.Height()-nTextHeight+2,
+ aSize.Width(), aSize.Height() ) );
+ SetLineColor( Color( COL_BLACK ) );
+ SetFillColor();
+ DrawRect( Rectangle( Point(0,0), aSize ) );
+}
+
+// -----------------------------------------------------------------------
+
+void ColumnsWindow::PopupModeEnd()
+{
+ if ( !IsPopupModeCanceled() && nCol )
+ {
+ SfxUInt16Item aCol( SID_ATTR_COLUMNS, (UINT16)nCol );
+ GetBindings().GetDispatcher()->Execute(
+ GetId(), SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aCol, 0L );
+ }
+ else if ( IsPopupModeCanceled() )
+ ReleaseMouse();
+ SfxPopupWindow::PopupModeEnd();
+}
+
+// class SvxTableToolBoxControl ------------------------------------------
+
+SvxTableToolBoxControl::SvxTableToolBoxControl( USHORT nId, ToolBox& rTbx,
+ SfxBindings& rBind ) :
+
+ SfxToolBoxControl( nId, rTbx, rBind ),
+
+ bEnabled( TRUE )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxTableToolBoxControl::~SvxTableToolBoxControl()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindowType SvxTableToolBoxControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONTIMEOUTANDMOVE;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindow()
+{
+ if ( bEnabled )
+ {
+ TableWindow* pWin = new TableWindow( GetId(), GetBindings() );
+ pWin->StartPopupMode( &GetToolBox(), FALSE );
+ return pWin;
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindowCascading()
+{
+ if ( bEnabled )
+ return new TableWindow( GetId(), GetBindings() );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxTableToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ if ( pState && pState->ISA(SfxUInt16Item) )
+ bEnabled = FALSE;
+ else
+ bEnabled = SFX_ITEM_DISABLED != eState;
+
+ USHORT nId = GetId();
+ ToolBox& rTbx = GetToolBox();
+
+ rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ rTbx.SetItemState( nId,
+ ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+}
+
+// class SvxColumnsToolBoxControl ------------------------------------------
+
+SvxColumnsToolBoxControl::SvxColumnsToolBoxControl( USHORT nId, ToolBox& rTbx,
+ SfxBindings& rBind ) :
+
+ SfxToolBoxControl( nId, rTbx, rBind )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxColumnsToolBoxControl::~SvxColumnsToolBoxControl()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindowType SvxColumnsToolBoxControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONTIMEOUTANDMOVE;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxColumnsToolBoxControl::CreatePopupWindow()
+{
+ ColumnsWindow* pWin = 0;
+ if(bEnabled)
+ {
+ pWin = new ColumnsWindow( GetId(), GetBindings() );
+ pWin->StartPopupMode( &GetToolBox(), FALSE );
+ }
+ return pWin;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxColumnsToolBoxControl::CreatePopupWindowCascading()
+{
+ ColumnsWindow* pWin = 0;
+ if(bEnabled)
+ {
+ pWin = new ColumnsWindow( GetId(), GetBindings() );
+ }
+ return pWin;
+}
+/* -----------------18.11.99 16:38-------------------
+
+ --------------------------------------------------*/
+void SvxColumnsToolBoxControl::StateChanged( USHORT nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ bEnabled = SFX_ITEM_DISABLED != eState;
+ SfxToolBoxControl::StateChanged(nSID, eState, pState );
+}
+
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
new file mode 100644
index 0000000000..0be788c900
--- /dev/null
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -0,0 +1,803 @@
+/*************************************************************************
+ *
+ * $RCSfile: linectrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+
+#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+
+#ifndef _TOOLBOX_HXX //autogen
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+
+#include "dialogs.hrc"
+#include "helpid.hrc"
+
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_DASH_LIST SID_DASH_LIST
+#define ITEMID_LINEEND_LIST SID_LINEEND_LIST
+
+#include "drawitem.hxx"
+#include "xattr.hxx"
+#include "xtable.hxx"
+#include "linectrl.hxx"
+#include "itemwin.hxx"
+#include "dialmgr.hxx"
+
+// Fuer Linienenden-Controller
+#define MAX_LINES 12
+
+// STATIC DATA -----------------------------------------------------------
+
+#define RESIZE_VALUE_POPUP(value_set) \
+{ \
+ Size aSize = GetOutputSizePixel(); \
+ aSize.Width() -= 4; \
+ aSize.Height() -= 4; \
+ (value_set).SetPosSizePixel( Point(2,2), aSize ); \
+}
+
+#define CALCSIZE_VALUE_POPUP(value_set,item_size) \
+{ \
+ Size aSize = (value_set).CalcWindowSizePixel( (item_size) ); \
+ aSize.Width() += 4; \
+ aSize.Height() += 4; \
+ SetOutputSizePixel( aSize ); \
+}
+
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxLineStyleToolBoxControl, XLineStyleItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxLineWidthToolBoxControl, XLineWidthItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxLineColorToolBoxControl, XLineColorItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxLineEndToolBoxControl, SfxBoolItem );
+
+/*************************************************************************
+|*
+|* SvxLineStyleToolBoxControl
+|*
+\************************************************************************/
+
+SvxLineStyleToolBoxControl::SvxLineStyleToolBoxControl( USHORT nId,
+ ToolBox& rTbx,
+ SfxBindings& rBind ) :
+ SfxToolBoxControl( nId, rTbx, rBind ),
+ aDashForwarder ( SID_ATTR_LINE_DASH, *this ),
+ pStyleItem ( NULL ),
+ pDashItem ( NULL ),
+ bUpdate ( FALSE )
+{
+ StartListening( rBind, TRUE );
+}
+
+//========================================================================
+
+SvxLineStyleToolBoxControl::~SvxLineStyleToolBoxControl()
+{
+ delete pStyleItem;
+ delete pDashItem;
+}
+
+//========================================================================
+
+void SvxLineStyleToolBoxControl::StateChanged (
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ SvxLineBox* pBox = (SvxLineBox*)GetToolBox().GetItemWindow( GetId() );
+ DBG_ASSERT( pBox, "Window not found!" );
+
+ if( eState == SFX_ITEM_DISABLED )
+ {
+ pBox->Disable();
+ pBox->SetNoSelection();
+ }
+ else
+ {
+ pBox->Enable();
+
+ if ( eState == SFX_ITEM_AVAILABLE )
+ {
+ if( nSID == SID_ATTR_LINE_STYLE )
+ {
+ delete pStyleItem;
+ pStyleItem = (XLineStyleItem*)pState->Clone();
+ }
+ else if( nSID == SID_ATTR_LINE_DASH )
+ {
+ delete pDashItem;
+ pDashItem = (XLineDashItem*)pState->Clone();
+ }
+ else
+ DBG_ERROR( "Huch wer kommt nach drinnen rein?");
+
+ bUpdate = TRUE;
+ }
+ else
+ // kein oder uneindeutiger Status
+ pBox->SetNoSelection();
+ }
+}
+
+//========================================================================
+
+void SvxLineStyleToolBoxControl::SFX_NOTIFY( SfxBroadcaster& rBC,
+ const TypeId& rBCType,
+ const SfxHint& rHint,
+ const TypeId& rHintType )
+{
+ const SfxSimpleHint *pSimpleHint = PTR_CAST(SfxSimpleHint, &rHint);
+
+ if ( pSimpleHint &&
+ ( pSimpleHint->GetId() == SFX_HINT_UPDATEDONE ) &&
+ bUpdate )
+ {
+ bUpdate = FALSE;
+
+ SvxLineBox* pBox = (SvxLineBox*)GetToolBox().GetItemWindow( GetId() );
+ DBG_ASSERT( pBox, "Window not found!" );
+
+ // Da der Timer unerwartet zuschlagen kann, kann es vorkommen, dass
+ // die LB noch nicht gefuellt ist. Ein ClearCache() am Control im
+ // DelayHdl() blieb ohne Erfolg.
+ if( pBox->GetEntryCount() == 0 )
+ {
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+ if ( pSh )
+ {
+ pBox->InsertEntry( SVX_RESSTR(RID_SVXSTR_INVISIBLE) );
+ pBox->InsertEntry( SVX_RESSTR(RID_SVXSTR_SOLID) );
+ const SvxDashListItem *pItem =
+ (const SvxDashListItem*)( pSh->GetItem( SID_DASH_LIST ) );
+ if(pItem)
+ pBox->Fill( pItem->GetDashList() );
+ }
+ }
+
+ XLineStyle eXLS;
+
+ if ( pStyleItem )
+ eXLS = ( XLineStyle )pStyleItem->GetValue();
+ else
+ eXLS = XLINE_NONE;
+
+ switch( eXLS )
+ {
+ case XLINE_NONE:
+ pBox->SelectEntryPos( 0 );
+ break;
+
+ case XLINE_SOLID:
+ pBox->SelectEntryPos( 1 );
+ break;
+
+ case XLINE_DASH:
+ {
+ if( pDashItem )
+ {
+ String aString( pDashItem->GetName() );
+ pBox->SelectEntry( aString );
+ }
+ else
+ pBox->SetNoSelection();
+ }
+ break;
+
+ default:
+ DBG_ERROR( "Nicht unterstuetzter Linientyp" );
+ break;
+ }
+ }
+
+ const SfxPoolItemHint *pPoolItemHint = PTR_CAST(SfxPoolItemHint, &rHint);
+
+ if ( pPoolItemHint
+ && ( pPoolItemHint->GetObject()->ISA( SvxDashListItem ) ) )
+ {
+ // Die Liste der Linienstile hat sich geaendert
+ SvxLineBox* pBox = (SvxLineBox*)GetToolBox().GetItemWindow( GetId() );
+ DBG_ASSERT( pBox, "Window not found!" );
+
+ String aString( pBox->GetSelectEntry() );
+ pBox->Clear();
+ pBox->InsertEntry( SVX_RESSTR(RID_SVXSTR_INVISIBLE) );
+ pBox->InsertEntry( SVX_RESSTR(RID_SVXSTR_SOLID) );
+ pBox->Fill( ( (SvxDashListItem*) pPoolItemHint->GetObject() )->GetDashList() );
+ pBox->SelectEntry( aString );
+ }
+}
+
+//========================================================================
+
+Window* SvxLineStyleToolBoxControl::CreateItemWindow( Window *pParent )
+{
+ return new SvxLineBox( pParent, GetBindings() );
+}
+
+/*************************************************************************
+|*
+|* SvxLineWidthToolBoxControl
+|*
+\************************************************************************/
+
+SvxLineWidthToolBoxControl::SvxLineWidthToolBoxControl( USHORT nId,
+ ToolBox& rTbx,
+ SfxBindings& rBind ) :
+ SfxToolBoxControl( nId, rTbx, rBind )
+{
+ SfxApplication* pSfxApp = SFX_APP();
+ SfxModule* pModule = pSfxApp->GetActiveModule();
+
+ if( pModule )
+ StartListening( rBind, TRUE );
+ else
+ StartListening( *pSfxApp , TRUE );
+
+}
+
+//========================================================================
+
+SvxLineWidthToolBoxControl::~SvxLineWidthToolBoxControl()
+{
+}
+
+//========================================================================
+
+void SvxLineWidthToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ SvxMetricField* pFld = (SvxMetricField*)
+ GetToolBox().GetItemWindow( GetId() );
+ DBG_ASSERT( pFld, "Window not found" );
+
+ if ( eState == SFX_ITEM_DISABLED )
+ {
+ pFld->Disable();
+ pFld->SetText( String() );
+ }
+ else
+ {
+ pFld->Enable();
+
+ if ( eState == SFX_ITEM_AVAILABLE )
+ {
+ DBG_ASSERT( pState->ISA(XLineWidthItem), "falscher ItemType" )
+
+ // Core-Unit an MetricField uebergeben
+ // Darf nicht in CreateItemWin() geschehen!
+ SfxMapUnit eUnit = GetCoreMetric();
+ pFld->SetCoreUnit( eUnit );
+
+ pFld->Update( (const XLineWidthItem*)pState );
+ }
+ else
+ pFld->Update( NULL );
+ }
+}
+
+//========================================================================
+
+void SvxLineWidthToolBoxControl::SFX_NOTIFY( SfxBroadcaster& rBC,
+ const TypeId& rBCType,
+ const SfxHint& rHint,
+ const TypeId& rHintType )
+{
+ // SfxItemSetHint funktioniert nicht mehr und kann laut MI
+ // auch nie funktioniert haben!
+ //const SfxItemSetHint *pOptionsHint = PTR_CAST(SfxItemSetHint, &rHint);
+
+ const SfxPoolItemHint *pOptionsHint = PTR_CAST(SfxPoolItemHint, &rHint);
+ if( pOptionsHint
+ && ( pOptionsHint->GetObject()->Which() == SID_ATTR_METRIC ) )
+ {
+ SvxMetricField* pFld = (SvxMetricField*)
+ GetToolBox().GetItemWindow( GetId() );
+ DBG_ASSERT( pFld, "Window not found" );
+
+ pFld->RefreshDlgUnit();
+ }
+}
+
+//========================================================================
+
+Window* SvxLineWidthToolBoxControl::CreateItemWindow( Window *pParent )
+{
+ return( new SvxMetricField( pParent, GetBindings() ) );
+}
+
+/*************************************************************************
+|*
+|* SvxLineColorToolBoxControl
+|*
+\************************************************************************/
+
+SvxLineColorToolBoxControl::SvxLineColorToolBoxControl( USHORT nId,
+ ToolBox& rTbx,
+ SfxBindings& rBind ) :
+ SfxToolBoxControl( nId, rTbx, rBind )
+{
+ StartListening( GetBindings() );
+}
+
+//========================================================================
+
+SvxLineColorToolBoxControl::~SvxLineColorToolBoxControl()
+{
+}
+
+//========================================================================
+
+void SvxLineColorToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ SvxColorBox* pBox = (SvxColorBox*)GetToolBox().GetItemWindow( GetId() );
+ DBG_ASSERT( pBox, "Window not found" );
+
+ if ( eState == SFX_ITEM_DISABLED )
+ {
+ pBox->Disable();
+ pBox->SetNoSelection();
+ }
+ else
+ {
+ pBox->Enable();
+
+ if ( eState == SFX_ITEM_AVAILABLE )
+ {
+ DBG_ASSERT( pState->ISA(XLineColorItem), "falscher ItemTyoe" );
+ pBox->Update( (const XLineColorItem*) pState );
+ }
+ else
+ pBox->Update( NULL );
+ }
+}
+
+//========================================================================
+
+void SvxLineColorToolBoxControl::SFX_NOTIFY( SfxBroadcaster& rBC,
+ const TypeId& rBCType,
+ const SfxHint& rHint,
+ const TypeId& rHintType )
+{
+ const SfxPoolItemHint *pPoolItemHint = PTR_CAST(SfxPoolItemHint, &rHint);
+
+ if ( pPoolItemHint
+ && ( pPoolItemHint->GetObject()->ISA( SvxColorTableItem ) ) )
+ {
+ SvxColorBox* pBox = (SvxColorBox*)GetToolBox().GetItemWindow( GetId() );
+
+ DBG_ASSERT( pBox, "Window not found" );
+
+ // Die Liste der Farben (ColorTable) hat sich geaendert:
+ Color aTmpColor( pBox->GetSelectEntryColor() );
+ pBox->Clear();
+ pBox->Fill( ( (SvxColorTableItem*) pPoolItemHint->GetObject() )->GetColorTable() );
+ pBox->SelectEntry( aTmpColor );
+ }
+}
+
+//========================================================================
+
+Window* SvxLineColorToolBoxControl::CreateItemWindow( Window *pParent )
+{
+ return new SvxColorBox( pParent, GetId(), GetBindings() );
+}
+
+/*************************************************************************
+|*
+|* SvxLineEndWindow
+|*
+\************************************************************************/
+
+SvxLineEndWindow::SvxLineEndWindow( USHORT nId, const String& rWndTitle, SfxBindings& rBindings ) :
+
+ SfxPopupWindow( nId, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_SIZEABLE | WB_3DLOOK ), rBindings ),
+
+ pLineEndList ( NULL ),
+ aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK ) ),
+ nCols ( 2 ),
+ nLines ( 12 ),
+ nLineEndWidth ( 400 ),
+ bPopupMode ( TRUE )
+
+{
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ const SfxPoolItem* pItem = NULL;
+
+ SetHelpId( HID_POPUP_LINEEND );
+ aLineEndSet.SetHelpId( HID_POPUP_LINEEND_CTRL );
+
+ if ( pDocSh )
+ {
+ if( pItem = pDocSh->GetItem( SID_LINEEND_LIST ) )
+ pLineEndList = ( (SvxLineEndListItem*) pItem )->GetLineEndList();
+
+ if( pItem = pDocSh->GetItem( SID_ATTR_LINEEND_WIDTH_DEFAULT ) )
+ nLineEndWidth = ( (SfxUInt16Item*) pItem )->GetValue();
+ }
+ DBG_ASSERT( pLineEndList, "LineEndList wurde nicht gefunden" );
+
+ aLineEndSet.SetSelectHdl( LINK( this, SvxLineEndWindow, SelectHdl ) );
+ aLineEndSet.SetColCount( nCols );
+
+ // ValueSet mit Eintraegen der LineEndList fuellen
+ FillValueSet();
+
+ //ChangeHelpId( HID_POPUP_LINEENDSTYLE );
+ SetText( rWndTitle );
+ aLineEndSet.Show();
+ StartListening( rBindings );
+}
+
+SfxPopupWindow* SvxLineEndWindow::Clone() const
+{
+ return new SvxLineEndWindow( GetId(), GetText(), (SfxBindings&)GetBindings() );
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineEndWindow::~SvxLineEndWindow()
+{
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxLineEndWindow, SelectHdl, void *, EMPTYARG )
+{
+ XLineEndItem* pLineEndItem = NULL;
+ XLineStartItem* pLineStartItem = NULL;
+ USHORT nId = aLineEndSet.GetSelectItemId();
+
+ if( nId == 1 )
+ {
+ pLineStartItem = new XLineStartItem();
+ }
+ else if( nId == 2 )
+ {
+ pLineEndItem = new XLineEndItem();
+ }
+ else if( nId % 2 ) // LinienAnfang
+ {
+ XLineEndEntry* pEntry = pLineEndList->Get( ( nId - 1 ) / 2 - 1 );
+ pLineStartItem = new XLineStartItem( pEntry->GetName(), pEntry->GetLineEnd() );
+ }
+ else // LinienEnde
+ {
+ XLineEndEntry* pEntry = pLineEndList->Get( nId / 2 - 2 );
+ pLineEndItem = new XLineEndItem( pEntry->GetName(), pEntry->GetLineEnd() );
+ }
+
+ if ( IsInPopupMode() )
+ EndPopupMode();
+
+ SfxDispatcher* pDisp = GetBindings().GetDispatcher();
+ DBG_ASSERT( pDisp, "invalid Dispatcher" );
+ if ( pLineStartItem )
+ pDisp->Execute( SID_ATTR_LINEEND_STYLE, SFX_CALLMODE_RECORD, pLineStartItem, 0L , 0L );
+ else
+ pDisp->Execute( SID_ATTR_LINEEND_STYLE, SFX_CALLMODE_RECORD, pLineEndItem, 0L , 0L );
+
+ delete pLineEndItem;
+ delete pLineStartItem;
+ aLineEndSet.SetNoSelection();
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineEndWindow::FillValueSet()
+{
+ if( pLineEndList )
+ {
+ XLineEndEntry* pEntry = NULL;
+ Bitmap* pBmp = NULL;
+ VirtualDevice aVD;
+
+ long nCount = pLineEndList->Count();
+
+ // Erster Eintrag: kein LinienEnde
+ // Temporaer wird ein Eintrag hinzugefuegt, um die UI-Bitmap zu erhalten
+ XPolygon aNothing( 0 );
+ pLineEndList->Insert( new XLineEndEntry( aNothing, SVX_RESSTR( RID_SVXSTR_NONE ) ) );
+ pEntry = pLineEndList->Get( nCount );
+ pBmp = pLineEndList->GetBitmap( nCount );
+ DBG_ASSERT( pBmp, "UI-Bitmap wurde nicht erzeugt" );
+
+ aBmpSize = pBmp->GetSizePixel();
+ aVD.SetOutputSizePixel( aBmpSize, FALSE );
+ aBmpSize.Width() = aBmpSize.Width() / 2;
+ Point aPt0( 0, 0 );
+ Point aPt1( aBmpSize.Width(), 0 );
+
+ aVD.DrawBitmap( Point(), *pBmp );
+ aLineEndSet.InsertItem( 1, aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() );
+ aLineEndSet.InsertItem( 2, aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() );
+
+ delete pLineEndList->Remove( nCount );
+
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pLineEndList->Get( i );
+ DBG_ASSERT( pEntry, "Konnte auf LineEndEntry nicht zugreifen" );
+ pBmp = pLineEndList->GetBitmap( i );
+ DBG_ASSERT( pBmp, "UI-Bitmap wurde nicht erzeugt" );
+
+ aVD.DrawBitmap( aPt0, *pBmp );
+ aLineEndSet.InsertItem( (USHORT)((i+1L)*2L+1L), aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() );
+ aLineEndSet.InsertItem( (USHORT)((i+2L)*2L), aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() );
+ }
+ nLines = Min( (USHORT)(nCount + 1), (USHORT) MAX_LINES );
+ aLineEndSet.SetLineCount( nLines );
+
+ SetSize();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineEndWindow::Resize()
+{
+ if ( !IsRollUp() )
+ {
+ aLineEndSet.SetColCount( nCols );
+ aLineEndSet.SetLineCount( nLines );
+
+ SetSize();
+
+ Size aSize = GetOutputSizePixel();
+ aSize.Width() -= 4;
+ aSize.Height() -= 4;
+ aLineEndSet.SetPosSizePixel( Point( 2, 2 ), aSize );
+ }
+ //SfxPopupWindow::Resize();
+}
+
+// -----------------------------------------------------------------------
+
+void __EXPORT SvxLineEndWindow::Resizing( Size& rNewSize )
+{
+ Size aBitmapSize = aBmpSize; // -> Member
+ aBitmapSize.Width() += 6; //
+ aBitmapSize.Height() += 6; //
+
+ Size aItemSize = aLineEndSet.CalcItemSizePixel( aBitmapSize ); // -> Member
+ //Size aOldSize = GetOutputSizePixel(); // fuer Breite
+
+ USHORT nItemCount = aLineEndSet.GetItemCount(); // -> Member
+
+ // Spalten ermitteln
+ long nItemW = aItemSize.Width();
+ long nW = rNewSize.Width();
+ nCols = (USHORT) Max( ( (ULONG)(( nW + nItemW ) / ( nItemW * 2 ) )),
+ (ULONG) 1L );
+ nCols *= 2;
+
+ // Reihen ermitteln
+ long nItemH = aItemSize.Height();
+ long nH = rNewSize.Height();
+ nLines = (USHORT) Max( ( ( nH + nItemH / 2 ) / nItemH ), 1L );
+
+ USHORT nMaxCols = nItemCount / nLines;
+ if( nItemCount % nLines )
+ nMaxCols++;
+ if( nCols > nMaxCols )
+ nCols = nMaxCols;
+ nW = nItemW * nCols;
+
+ // Keine ungerade Anzahl von Spalten
+ if( nCols % 2 )
+ nCols--;
+ nCols = Max( nCols, (USHORT) 2 );
+
+ USHORT nMaxLines = nItemCount / nCols;
+ if( nItemCount % nCols )
+ nMaxLines++;
+ if( nLines > nMaxLines )
+ nLines = nMaxLines;
+ nH = nItemH * nLines;
+
+ rNewSize.Width() = nW;
+ rNewSize.Height() = nH;
+}
+// -----------------------------------------------------------------------
+
+void SvxLineEndWindow::StartSelection()
+{
+ aLineEndSet.StartSelection();
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxLineEndWindow::Close()
+{
+ return SfxPopupWindow::Close();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineEndWindow::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType )
+{
+ const SfxPoolItemHint *pPoolItemHint = PTR_CAST(SfxPoolItemHint, &rHint);
+
+ if ( pPoolItemHint
+ && ( pPoolItemHint->GetObject()->ISA( SvxLineEndListItem ) ) )
+ {
+ // Die Liste der LinienEnden (LineEndList) hat sich geaendert:
+
+ pLineEndList = ( (SvxLineEndListItem*) pPoolItemHint->
+ GetObject() )->GetLineEndList();
+ DBG_ASSERT( pLineEndList, "LineEndList nicht gefunden" );
+
+ aLineEndSet.Clear();
+ FillValueSet();
+
+ Size aSize = GetOutputSizePixel();
+ Resizing( aSize );
+ Resize();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineEndWindow::PopupModeEnd()
+{
+ if ( IsVisible() )
+ {
+ bPopupMode = FALSE;
+ SetSize();
+ }
+ SfxPopupWindow::PopupModeEnd();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineEndWindow::SetSize()
+{
+ if( !bPopupMode )
+ //if( !IsInPopupMode() )
+ {
+ USHORT nItemCount = aLineEndSet.GetItemCount(); // -> Member
+ USHORT nMaxLines = nItemCount / nCols; // -> Member ?
+ if( nItemCount % nCols )
+ nMaxLines++;
+
+ WinBits nBits = aLineEndSet.GetStyle();
+ if ( nLines == nMaxLines )
+ nBits &= ~WB_VSCROLL;
+ else
+ nBits |= WB_VSCROLL;
+ aLineEndSet.SetStyle( nBits );
+ }
+
+ Size aSize( aBmpSize );
+ aSize.Width() += 6;
+ aSize.Height() += 6;
+ aSize = aLineEndSet.CalcWindowSizePixel( aSize );
+ aSize.Width() += 4;
+ aSize.Height() += 4;
+ SetOutputSizePixel( aSize );
+ aSize.Height() = aBmpSize.Height();
+ aSize.Height() += 14;
+ //SetMinOutputSizePixel( aSize );
+}
+
+/*************************************************************************
+|*
+|* SvxLineEndToolBoxControl
+|*
+\************************************************************************/
+
+SvxLineEndToolBoxControl::SvxLineEndToolBoxControl( USHORT nId, ToolBox &rTbx, SfxBindings &rBindings ) :
+
+ SfxToolBoxControl( nId, rTbx, rBindings )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxLineEndToolBoxControl::~SvxLineEndToolBoxControl()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindowType SvxLineEndToolBoxControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONCLICK;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxLineEndToolBoxControl::CreatePopupWindow()
+{
+ SvxLineEndWindow* pLineEndWin =
+ new SvxLineEndWindow( GetId(),SVX_RESSTR( RID_SVXSTR_LINEEND ), GetBindings() );
+ pLineEndWin->StartPopupMode( &GetToolBox(), TRUE );
+ pLineEndWin->StartSelection();
+ return pLineEndWin;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineEndToolBoxControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+{
+ USHORT nId = GetId();
+ ToolBox& rTbx = GetToolBox();
+
+ rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+}
+
diff --git a/svx/source/tbxctrls/linectrl.src b/svx/source/tbxctrls/linectrl.src
new file mode 100644
index 0000000000..df61517a9a
--- /dev/null
+++ b/svx/source/tbxctrls/linectrl.src
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * $RCSfile: linectrl.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "linectrl.hrc"
+
+Bitmap RID_SVXCTRL_LINECTRL
+{
+ File = "soliline.bmp" ;
+};
+
diff --git a/svx/source/tbxctrls/makefile.mk b/svx/source/tbxctrls/makefile.mk
new file mode 100644
index 0000000000..369e8c8c68
--- /dev/null
+++ b/svx/source/tbxctrls/makefile.mk
@@ -0,0 +1,116 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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=..$/..
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=svxpch
+PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
+
+PRJNAME=svx
+TARGET=tbxctrls
+AUTOSEG=true
+
+# --- 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 --------------------------------------------------------
+
+.IF "$(header)" == ""
+
+IMGLST_SRS=$(SRS)$/tbxctrls.srs
+BMP_IN=$(PRJ)$/win/res
+
+SLOFILES= \
+ $(SLO)$/colrctrl.obj \
+ $(SLO)$/fillctrl.obj \
+ $(SLO)$/grafctrl.obj \
+ $(SLO)$/itemwin.obj \
+ $(SLO)$/layctrl.obj \
+ $(SLO)$/linectrl.obj \
+ $(SLO)$/tbcontrl.obj \
+ $(SLO)$/tbxalign.obj \
+ $(SLO)$/tbxdraw.obj \
+ $(SLO)$/tbxdrctl.obj
+
+SRCFILES = \
+ colrctrl.src \
+ linectrl.src \
+ tbcontrl.src \
+ tbxdraw.src
+
+.ENDIF
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
new file mode 100644
index 0000000000..a4409cb1e4
--- /dev/null
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -0,0 +1,2678 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbcontrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+
+#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SV_TOOLBOX_HXX //autogen wg. ToolBox
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef _SV_SYSTEM_HXX //autogen wg. System
+#include <vcl/system.hxx>
+#endif
+#ifndef _VALUESET_HXX
+#include <svtools/valueset.hxx>
+#endif
+#ifndef _CTRLBOX_HXX //autogen
+#include <svtools/ctrlbox.hxx>
+#endif
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+#ifndef _CTRLTOOL_HXX //autogen
+#include <svtools/ctrltool.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFX_TPLPITEM_HXX
+#include <sfx2/tplpitem.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFXVIEWSH_HXX //autogen
+#include <sfx2/viewsh.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFX_INIMGR_HXX //autogen
+#include <sfx2/inimgr.hxx>
+#endif
+#ifndef _SFXISETHINT_HXX
+#include <svtools/isethint.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_TBCONTRL_CXX
+
+#include "dialogs.hrc"
+#include "svxitems.hrc"
+#include "helpid.hrc"
+
+#define ITEMID_COLOR_TABLE 0
+#define ITEMID_FONTLIST SID_ATTR_CHAR_FONTLIST
+#define ITEMID_FONT SID_ATTR_CHAR_FONT
+#define ITEMID_FONTHEIGHT SID_ATTR_CHAR_FONTHEIGHT
+#define ITEMID_COLOR SID_ATTR_CHAR_COLOR
+#define ITEMID_BRUSH SID_ATTR_BRUSH
+#define ITEMID_BOX SID_ATTR_BORDER_OUTER
+#define ITEMID_BOXINFO SID_ATTR_BORDER_INNER
+#define ITEMID_LINE SID_FRAME_LINESTYLE
+
+#include "htmlmode.hxx"
+#include "xtable.hxx"
+#include "fontitem.hxx"
+#include "fhgtitem.hxx"
+#include "brshitem.hxx"
+#include "boxitem.hxx"
+#include "colritem.hxx"
+#include "flstitem.hxx"
+#include "bolnitem.hxx"
+#include "drawitem.hxx"
+#include "tbcontrl.hxx"
+#include "dlgutil.hxx"
+#include "dialmgr.hxx"
+
+// ------------------------------------------------------------------------
+
+#define IMAGE_COL_TRANSPARENT COL_LIGHTGRAY
+#define MAX_MRU_FONTNAME_ENTRIES 5
+
+// STATIC DATA -----------------------------------------------------------
+
+#ifndef DELETEZ
+#define DELETEZ(p) (delete (p), (p)=NULL)
+#endif
+#define MAX_STYLES_ENTRIES ((USHORT)26)
+
+void lcl_ResizeValueSet( Window &rWin, ValueSet &rValueSet );
+void lcl_CalcSizeValueSet( Window &rWin, ValueSet &rValueSet, const Size &aItemSize );
+BOOL lcl_FontChangedHint( const SfxHint &rHint );
+
+SFX_IMPL_TOOLBOX_CONTROL( SvxStyleToolBoxControl, SfxTemplateItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxFontNameToolBoxControl, SvxFontItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxFontHeightToolBoxControl, SvxFontHeightItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxFontColorToolBoxControl, SvxColorItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxFontColorExtToolBoxControl, SvxColorItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxColorToolBoxControl, SvxColorItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxFrameToolBoxControl, SvxBoxItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxFrameLineStyleToolBoxControl, SvxLineItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxFrameLineColorToolBoxControl, SvxColorItem );
+SFX_IMPL_TOOLBOX_CONTROL( SvxReloadControllerItem, SfxBoolItem );
+
+//========================================================================
+// class SvxStyleBox -----------------------------------------------------
+//========================================================================
+
+class SvxStyleBox : public ListBox
+{
+public:
+ SvxStyleBox( Window* pParent, USHORT nSlot,
+ SfxStyleFamily eFamily, WinBits nStyle, SfxBindings& rBind );
+ SvxStyleBox( Window* pParent, USHORT nSlot, SfxStyleFamily eFamily, SfxBindings& rBind );
+
+ void SetFamily( SfxStyleFamily eNewFamily );
+
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual long Notify( NotifyEvent& rNEvt );
+
+protected:
+ virtual void Select();
+
+private:
+ USHORT nSlotId;
+ SfxStyleFamily eStyleFamily;
+ USHORT nCurSel;
+ BOOL bRelease;
+ SfxBindings& rBindings;
+
+ void ReleaseFocus();
+};
+
+//========================================================================
+// class SvxFontNameBox --------------------------------------------------
+//========================================================================
+
+class SvxFontNameBox : public FontNameBox, public SfxListener
+{
+private:
+ const FontList* pFontList;
+ Font aCurFont;
+ String aCurText;
+ USHORT nFtCount;
+ BOOL bRelease;
+ SfxBindings& rBindings;
+
+ void ReleaseFocus_Impl();
+ void EnableMRU_Impl();
+
+protected:
+ virtual void Select();
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+public:
+ SvxFontNameBox( Window* pParent, SfxBindings& rBind, WinBits nStyle = WB_SORT );
+
+ void FillList();
+ void Update( const SvxFontItem* pFontItem );
+ USHORT GetListCount() { return nFtCount; }
+ void Clear() { FontNameBox::Clear(); nFtCount = 0; }
+ void Fill( const FontList* pList )
+ { FontNameBox::Fill( pList );
+ nFtCount = pList->GetFontNameCount(); }
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual long Notify( NotifyEvent& rNEvt );
+};
+
+//========================================================================
+// class SvxFontSizeBox --------------------------------------------------
+//========================================================================
+
+class SvxFontHeightToolBoxControl;
+
+class SvxFontSizeBox : public FontSizeBox
+{
+private:
+ SvxFontHeightToolBoxControl* pCtrl;
+ String aCurText;
+ BOOL bRelease;
+ SfxBindings& rBindings;
+
+ void ReleaseFocus_Impl();
+
+protected:
+ virtual void Select();
+
+public:
+ SvxFontSizeBox( Window* pParent,
+ SvxFontHeightToolBoxControl& rCtrl, SfxBindings& rBind );
+
+ void StateChanged_Impl( SfxItemState eState,
+ const SfxPoolItem* pState );
+ void Update( const SvxFontItem& rFontItem );
+
+ virtual long Notify( NotifyEvent& rNEvt );
+};
+
+//========================================================================
+// class SvxColorWindow --------------------------------------------------
+//========================================================================
+
+class SvxColorWindow : public SfxPopupWindow, public SfxListener
+{
+private:
+ const USHORT theSlotId;
+ ValueSet aColorSet;
+
+#if __PRIVATE
+ DECL_LINK( SelectHdl, void * );
+#endif
+
+protected:
+ virtual void Resize();
+ virtual BOOL Close();
+
+public:
+ SvxColorWindow( USHORT nId, USHORT nSlotId,
+ const String& rWndTitle,
+ SfxBindings& rBindings );
+
+ void StartSelection();
+
+ virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+
+ virtual SfxPopupWindow* Clone() const;
+};
+
+//========================================================================
+// class SvxFrameWindow --------------------------------------------------
+//========================================================================
+
+// fuer den SelectHdl werden die Modifier gebraucht, also
+// muss man sie im MouseButtonUp besorgen
+
+class SvxFrmValueSet : public ValueSet
+{
+ USHORT nModifier;
+
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+public:
+ SvxFrmValueSet(Window* pParent, WinBits nWinStyle)
+ : ValueSet(pParent, nWinStyle), nModifier(0) {}
+ USHORT GetModifier() const {return nModifier;}
+
+};
+
+void SvxFrmValueSet::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ nModifier = rMEvt.GetModifier();
+ ValueSet::MouseButtonUp(rMEvt);
+}
+
+class SvxFrameWindow : public SfxPopupWindow
+{
+private:
+ SvxFrmValueSet aFrameSet;
+ ImageList aImgList;
+
+#if __PRIVATE
+ DECL_LINK( SelectHdl, void * );
+#endif
+
+protected:
+ virtual void Resize();
+ virtual BOOL Close();
+
+public:
+ SvxFrameWindow( USHORT nId, SfxBindings& rBindings, BOOL bParagraphMode );
+
+ void StartSelection();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual SfxPopupWindow* Clone() const;
+};
+
+//========================================================================
+// class SvxLineWindow ---------------------------------------------------
+//========================================================================
+class SvxLineWindow : public SfxPopupWindow
+{
+private:
+ ValueSet aLineSet;
+
+#if __PRIVATE
+ void MakeLineBitmap( USHORT nNo, Bitmap& rBmp,
+ const Size& rSize, String& rStr );
+ DECL_LINK( SelectHdl, void * );
+#endif
+
+protected:
+ virtual void Resize();
+ virtual BOOL Close();
+
+public:
+ SvxLineWindow( USHORT nId, SfxBindings& rBindings );
+
+ void StartSelection();
+ virtual SfxPopupWindow* Clone() const;
+};
+
+//########################################################################
+// Hilfsklassen:
+//========================================================================
+// class SvxTbxButtonColorUpdater ----------------------------------------
+//========================================================================
+#define TBX_UPDATER_MODE_NONE 0x00
+#define TBX_UPDATER_MODE_CHAR_COLOR 0x01
+#define TBX_UPDATER_MODE_CHAR_BACKGROUND 0x02
+
+class SvxTbxButtonColorUpdater
+{
+public:
+ SvxTbxButtonColorUpdater( USHORT nTbxBtnId,
+ ToolBox* ptrTbx, USHORT nMode = 0 );
+ ~SvxTbxButtonColorUpdater();
+
+ void Update( const Color& rColor );
+
+protected:
+ void DrawChar(VirtualDevice&, const Color&);
+
+private:
+ USHORT nDrawMode;
+ USHORT nBtnId;
+ ToolBox* pTbx;
+ Bitmap* pBtnBmp;
+ Color aCurColor;
+ Rectangle theUpdRect;
+ Size theBmpSize;
+};
+
+//========================================================================
+// class SfxStyleControllerItem ------------------------------------------
+//========================================================================
+class SvxStyleToolBoxControl;
+
+class SfxStyleControllerItem : public SfxControllerItem
+{
+public:
+ SfxStyleControllerItem( USHORT nId, SfxBindings& rBindings, SvxStyleToolBoxControl& rTbxCtl );
+
+protected:
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+
+private:
+ SvxStyleToolBoxControl& rControl;
+};
+
+//========================================================================
+// class SvxStyleBox -----------------------------------------------------
+//========================================================================
+
+SvxStyleBox::SvxStyleBox( Window* pParent, USHORT nSlot,
+ SfxStyleFamily eFamily, WinBits nStyle, SfxBindings& rBind ) :
+
+ ListBox( pParent, nStyle | WinBits( WB_BORDER | WB_AUTOHSCROLL | WB_DROPDOWN ) ),
+
+ eStyleFamily( eFamily ),
+ nSlotId ( nSlot ),
+ bRelease ( TRUE ),
+ rBindings ( rBind )
+
+{
+ SetSizePixel( Size( 140, 360 ) );
+ SetText( String() );
+}
+
+// -----------------------------------------------------------------------
+
+SvxStyleBox::SvxStyleBox( Window* pParent, USHORT nSlot, SfxStyleFamily eFamily, SfxBindings& rBind ) :
+
+ ListBox( pParent, SVX_RES( RID_SVXTBX_STYLE ) ),
+
+ eStyleFamily( eFamily ),
+ nSlotId ( nSlot ),
+ bRelease ( TRUE ),
+ rBindings ( rBind )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStyleBox::ReleaseFocus()
+{
+ if ( !bRelease )
+ {
+ bRelease = TRUE;
+ return;
+ }
+ SfxViewShell* pCurSh = SfxViewShell::Current();
+
+ if ( pCurSh )
+ {
+ Window* pShellWnd = pCurSh->GetWindow();
+
+ if ( pShellWnd )
+ pShellWnd->GrabFocus();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStyleBox::Select()
+{
+ if ( !IsTravelSelect() )
+ {
+ SfxStringItem aItem( nSlotId, GetSelectEntry() );
+ SfxUInt16Item aFamily( SID_STYLE_FAMILY, eStyleFamily );
+ rBindings.GetDispatcher()->Execute(
+ nSlotId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, &aItem, &aFamily, 0L );
+ ReleaseFocus();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStyleBox::SetFamily( SfxStyleFamily eNewFamily )
+{
+ eStyleFamily = eNewFamily;
+}
+
+// -----------------------------------------------------------------------
+
+long SvxStyleBox::PreNotify( NotifyEvent& rNEvt )
+{
+ USHORT nType = rNEvt.GetType();
+
+ if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType )
+ nCurSel = GetSelectEntryPos();
+ return ListBox::PreNotify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+long SvxStyleBox::Notify( NotifyEvent& rNEvt )
+{
+ long nHandled = 0;
+
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
+
+ switch ( nCode )
+ {
+ case KEY_RETURN:
+ case KEY_TAB:
+ {
+ if ( KEY_TAB == nCode )
+ bRelease = FALSE;
+ else
+ nHandled = 1;
+ Select();
+ break;
+ }
+
+ case KEY_ESCAPE:
+ SelectEntryPos( nCurSel );
+ ReleaseFocus();
+ nHandled = 1;
+ break;
+ }
+ }
+ return nHandled ? nHandled : ListBox::Notify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+#define BRUSH(style,name) BrushStyle(style),SVX_RESSTR(name)
+#define COLOR(color,name) Color(color),SVX_RESSTR(name)
+
+BOOL GetDocFontList_Impl( const FontList** ppFontList, SvxFontNameBox* pBox )
+{
+ BOOL bChanged = FALSE;
+ const SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ SvxFontListItem* pFontListItem = NULL;
+
+ if ( pDocSh )
+ pFontListItem =
+ (SvxFontListItem*)pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST );
+
+ if ( pFontListItem )
+ {
+ const FontList* pNewFontList = pFontListItem->GetFontList();
+ DBG_ASSERT( pNewFontList, "Doc-FontList not available!" );
+
+ // keine alte Liste, aber neue Liste
+ if ( !*ppFontList && pNewFontList )
+ {
+ // => "ubernehmen
+ *ppFontList = pNewFontList;
+ bChanged = TRUE;
+ }
+ else
+ {
+ // Vergleich der Fontlisten ist nicht vollkommen
+ // wird die Fontliste am Doc geaendert, kann man hier
+ // nur ueber die Listbox Aenderungen feststellen, weil
+ // ppFontList dabei schon upgedatet wurde
+ bChanged =
+ ( ( *ppFontList != pNewFontList ) ||
+ pBox->GetListCount() != pNewFontList->GetFontNameCount() );
+ HACK(vergleich ist unvollstaendig)
+
+ if ( bChanged )
+ *ppFontList = pNewFontList;
+ }
+
+ if ( pBox )
+ pBox->Enable();
+ }
+ else if ( pBox )
+ pBox->Disable();
+
+ // in die FontBox ggf. auch die neue Liste f"ullen
+ if ( pBox && bChanged )
+ {
+ if ( *ppFontList )
+ pBox->Fill( *ppFontList );
+ else
+ pBox->Clear();
+ }
+ return bChanged;
+}
+
+//========================================================================
+// class SvxFontNameBox --------------------------------------------------
+//========================================================================
+
+SvxFontNameBox::SvxFontNameBox( Window* pParent, SfxBindings& rBind, WinBits nStyle ) :
+
+ FontNameBox ( pParent, nStyle | WinBits( WB_DROPDOWN | WB_AUTOHSCROLL ) ),
+
+ pFontList ( NULL ),
+ nFtCount ( 0 ),
+ bRelease ( TRUE ),
+ rBindings ( rBind )
+
+{
+ SetSizePixel( Size( 120, 180 ) );
+ BOOL bEnable = SFX_INIMANAGER()->Get( SFX_KEY_SHOW_FONTBOX_WYSIWYG ).ToInt32() > 0;
+ EnableWYSIWYG( bEnable );
+ EnableSymbols( bEnable );
+ EnableMRU_Impl();
+ StartListening( *SFX_APP() );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontNameBox::FillList()
+{
+ // alte Selektion merken, und am Ende wieder setzen
+ Selection aOldSel = GetSelection();
+ // hat sich Doc-Fontlist geaendert?
+ GetDocFontList_Impl( &pFontList, this );
+ aCurText = GetText();
+ SetSelection( aOldSel );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontNameBox::Update( const SvxFontItem* pFontItem )
+{
+ if ( pFontItem )
+ {
+ aCurFont.SetName ( pFontItem->GetFamilyName() );
+ aCurFont.SetFamily ( pFontItem->GetFamily() );
+ aCurFont.SetStyleName ( pFontItem->GetStyleName() );
+ aCurFont.SetPitch ( pFontItem->GetPitch() );
+ aCurFont.SetCharSet ( pFontItem->GetCharSet() );
+ }
+ String aCurName = aCurFont.GetName();
+ if ( GetText() != aCurName )
+ SetText( aCurName );
+}
+
+// -----------------------------------------------------------------------
+
+long SvxFontNameBox::PreNotify( NotifyEvent& rNEvt )
+{
+ USHORT nType = rNEvt.GetType();
+
+ if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType )
+ FillList();
+ return FontNameBox::PreNotify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+long SvxFontNameBox::Notify( NotifyEvent& rNEvt )
+{
+ long nHandled = 0;
+
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
+
+ switch ( nCode )
+ {
+ case KEY_RETURN:
+ case KEY_TAB:
+ {
+ if ( KEY_TAB == nCode )
+ bRelease = FALSE;
+ Select();
+ break;
+ }
+
+ case KEY_ESCAPE:
+ SetText( aCurText );
+ ReleaseFocus_Impl();
+ break;
+ }
+ }
+ return FontNameBox::Notify( rNEvt );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontNameBox::ReleaseFocus_Impl()
+{
+ if ( !bRelease )
+ {
+ bRelease = TRUE;
+ return;
+ }
+ SfxViewShell* pCurSh = SfxViewShell::Current();
+
+ if ( pCurSh )
+ {
+ Window* pShellWnd = pCurSh->GetWindow();
+
+ if ( pShellWnd )
+ pShellWnd->GrabFocus();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontNameBox::EnableMRU_Impl()
+{
+ BOOL bEnable = SFX_INIMANAGER()->Get( SFX_KEY_FONT_HISTORY ).ToInt32() > 0;
+ USHORT nEntries = bEnable ? MAX_MRU_FONTNAME_ENTRIES : 0;
+ if ( GetMaxMRUCount() != nEntries )
+ {
+ // refill in the next GetFocus-Handler
+ pFontList = NULL;
+ Clear();
+ SetMaxMRUCount( nEntries );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontNameBox::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ SfxItemSetHint* pHint = PTR_CAST(SfxItemSetHint, &rHint);
+ if ( pHint )
+ EnableMRU_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontNameBox::Select()
+{
+ FontNameBox::Select();
+
+ if ( !IsTravelSelect() )
+ {
+ if ( pFontList )
+ {
+ FontInfo aInfo( pFontList->Get( GetText(),
+ aCurFont.GetWeight(),
+ aCurFont.GetItalic() ) );
+ aCurFont = aInfo;
+
+ SvxFontItem aFontItem( aInfo.GetFamily(),
+ aInfo.GetName(),
+ aInfo.GetStyleName(),
+ aInfo.GetPitch(),
+ aInfo.GetCharSet(),
+ SID_ATTR_CHAR_FONT );
+
+ rBindings.GetDispatcher()->Execute( SID_ATTR_CHAR_FONT, SFX_CALLMODE_RECORD, &aFontItem, 0L );
+ }
+ ReleaseFocus_Impl();
+ }
+}
+
+//========================================================================
+// class SvxFontSizeBox --------------------------------------------------
+//========================================================================
+
+SvxFontSizeBox::SvxFontSizeBox( Window* pParent, SvxFontHeightToolBoxControl &rCtrl, SfxBindings& rBind ) :
+
+ FontSizeBox( pParent, WinBits( WB_DROPDOWN ) ),
+
+ pCtrl ( &rCtrl ),
+ bRelease ( TRUE ),
+ rBindings ( rBind )
+
+{
+ Size aSiz( 45, 180 );
+ SetSizePixel( aSiz );
+ SetValue( 0 );
+ SetText( String() );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontSizeBox::ReleaseFocus_Impl()
+{
+ if ( !bRelease )
+ {
+ bRelease = TRUE;
+ return;
+ }
+
+ SfxViewShell* pCurSh = SfxViewShell::Current();
+
+ if ( pCurSh )
+ {
+ Window* pShellWnd = pCurSh->GetWindow();
+
+ if ( pShellWnd )
+ pShellWnd->GrabFocus();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontSizeBox::Select()
+{
+ FontSizeBox::Select();
+
+ if ( !IsTravelSelect() )
+ {
+ SfxMapUnit eUnit = pCtrl->GetCoreMetric();
+ long nSelVal = GetValue();
+ long nVal = LogicToLogic( nSelVal, MAP_POINT, (MapUnit)eUnit ) / 10;
+
+ SvxFontHeightItem aFontHeightItem( nVal, 100,
+ SID_ATTR_CHAR_FONTHEIGHT );
+
+ rBindings.GetDispatcher()->Execute(
+ SID_ATTR_CHAR_FONTHEIGHT, SFX_CALLMODE_RECORD, &aFontHeightItem, 0L );
+ ReleaseFocus_Impl();
+ }
+}
+
+
+// -----------------------------------------------------------------------
+
+void SvxFontSizeBox::StateChanged_Impl( SfxItemState eState, const SfxPoolItem* pState )
+{
+ if ( SFX_ITEM_AVAILABLE == eState )
+ {
+ // Metric Umrechnen
+ long nVal = 10 * LogicToLogic(
+ ((const SvxFontHeightItem*)pState)->GetHeight(),
+ (MapUnit)pCtrl->GetCoreMetric(),
+ MAP_POINT );
+
+ // ge"andert => neuen Wert setzen
+ if ( GetValue() != nVal )
+ SetValue( nVal );
+ }
+ else
+ {
+ // Wert in der Anzeige l"oschen
+ SetValue( -1L );
+ SetText( String() );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontSizeBox::Update( const SvxFontItem& rFontItem )
+{
+ // Fontliste vom Document abholen
+ const SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ const SvxFontListItem* pFontListItem = (const SvxFontListItem*)
+ ( pDocSh ? pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST ) : NULL );
+
+ // Sizes-Liste auff"ullen
+ long nOldVal = GetValue(); // alten Wert merken
+ FontInfo aFontInfo;
+ FASTBOOL bCreate = FALSE;
+ const FontList* pFontList = pFontListItem ? pFontListItem->GetFontList() : NULL;
+ if ( pFontList )
+ {
+ aFontInfo = FontInfo( pFontList->Get( rFontItem.GetFamilyName(), rFontItem.GetStyleName() ) );
+ Fill( aFontInfo, pFontList );
+ }
+ SetValue( nOldVal ); // alten Wert wiederherstellen
+ aCurText = GetText(); // zum R"ucksetzen bei ESC merken
+}
+
+// -----------------------------------------------------------------------
+
+long SvxFontSizeBox::Notify( NotifyEvent& rNEvt )
+{
+ long nHandled = 0;
+
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
+
+ switch ( nCode )
+ {
+ case KEY_RETURN:
+ case KEY_TAB:
+ {
+ if ( KEY_TAB == nCode )
+ bRelease = FALSE;
+ else
+ nHandled = 1;
+ Select();
+ break;
+ }
+
+ case KEY_ESCAPE:
+ SetText( aCurText );
+ ReleaseFocus_Impl();
+ nHandled = 1;
+ break;
+ }
+ }
+ return nHandled ? nHandled : FontSizeBox::Notify( rNEvt );
+}
+
+//========================================================================
+// class SvxColorWindow --------------------------------------------------
+//========================================================================
+
+SvxColorWindow::SvxColorWindow( USHORT nId, USHORT nSlotId,
+ const String& rWndTitle,
+ SfxBindings& rBindings ) :
+
+ SfxPopupWindow( nId, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK ), rBindings ),
+
+ theSlotId( nSlotId ),
+ aColorSet( this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK ) )
+
+{
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ const SfxPoolItem* pItem = NULL;
+ XColorTable* pColorTable = NULL;
+ const Size aSize12( 12, 12 );
+
+ if ( pDocSh )
+ if ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) )
+ pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+
+ if ( SID_ATTR_CHAR_COLOR_BACKGROUND == theSlotId || SID_BACKGROUND_COLOR == theSlotId )
+ {
+ aColorSet.SetStyle( aColorSet.GetStyle() | WB_NONEFIELD );
+ aColorSet.SetText( SVX_RESSTR( RID_SVXSTR_TRANSPARENT ) );
+ }
+
+ if ( pColorTable )
+ {
+ short i = 0;
+ long nCount = pColorTable->Count();
+ XColorEntry* pEntry = NULL;
+ Color aColWhite( COL_WHITE );
+ String aStrWhite( SVX_RES(RID_SVXITEMS_COLOR_WHITE) );
+
+ if ( nCount > 80 )
+ // bei mehr als 80 Farben ScrollBar anzeigen
+ aColorSet.SetStyle( aColorSet.GetStyle() | WB_VSCROLL );
+
+ for ( i = 0; i < nCount; i++ )
+ {
+ pEntry = pColorTable->Get(i);
+ aColorSet.InsertItem( i+1, pEntry->GetColor(), pEntry->GetName() );
+ }
+
+ while ( i < 80 )
+ {
+ // bei weniger als 80 Farben, mit Weiss auff"ullen
+ aColorSet.InsertItem( i+1, aColWhite, aStrWhite );
+ i++;
+ }
+ }
+
+ aColorSet.SetSelectHdl( LINK( this, SvxColorWindow, SelectHdl ) );
+ aColorSet.SetColCount( 8 );
+ aColorSet.SetLineCount( 10 );
+
+ lcl_CalcSizeValueSet( *this, aColorSet, aSize12 );
+
+ SetHelpId( HID_POPUP_COLOR );
+ SetText( rWndTitle );
+ aColorSet.Show();
+ StartListening( rBindings );
+}
+
+SfxPopupWindow* SvxColorWindow::Clone() const
+{
+ return new SvxColorWindow( GetId(), theSlotId, GetText(), (SfxBindings&)GetBindings() );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxColorWindow, SelectHdl, void *, EMPTYARG )
+{
+ USHORT nItemId = aColorSet.GetSelectItemId();
+ if ( IsInPopupMode() )
+ EndPopupMode();
+
+ if ( ( SID_ATTR_CHAR_COLOR_BACKGROUND == theSlotId || SID_BACKGROUND_COLOR == theSlotId ) && !nItemId )
+ GetBindings().GetDispatcher()->Execute( theSlotId );
+ else
+ {
+ SvxColorItem aColorItem( aColorSet.GetItemColor( nItemId ), theSlotId );
+ GetBindings().GetDispatcher()->Execute( theSlotId, SFX_CALLMODE_RECORD, &aColorItem, 0L );
+ }
+
+ aColorSet.SetNoSelection();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorWindow::Resize()
+{
+ lcl_ResizeValueSet( *this, aColorSet);
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorWindow::StartSelection()
+{
+ aColorSet.StartSelection();
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxColorWindow::Close()
+{
+ return SfxPopupWindow::Close();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorWindow::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ const SfxPoolItemHint* pItemHint = PTR_CAST( SfxPoolItemHint, &rHint );
+ SvxColorTableItem* pItem = pItemHint ?
+ PTR_CAST( SvxColorTableItem, pItemHint->GetObject() ) : NULL;
+ XColorTable* pColorTable = pItem ? pItem->GetColorTable() : NULL;
+
+ if ( pColorTable )
+ {
+ // Die Liste der Farben (ColorTable) hat sich ge"andert:
+ short i = 0;
+ long nCount = pColorTable->Count();
+ XColorEntry* pEntry = NULL;
+ Color aColWhite( COL_WHITE );
+ String aStrWhite( SVX_RES( RID_SVXITEMS_COLOR_WHITE ) );
+
+ // ScrollBar an oder aus
+ WinBits nBits = aColorSet.GetStyle();
+ if ( nCount > 80 )
+ nBits &= ~WB_VSCROLL;
+ else
+ nBits |= WB_VSCROLL;
+ aColorSet.SetStyle( nBits );
+
+ for ( i = 0; i < nCount; ++i )
+ {
+ pEntry = pColorTable->Get(i);
+ aColorSet.SetItemColor( i + 1, pEntry->GetColor() );
+ aColorSet.SetItemText ( i + 1, pEntry->GetName() );
+ }
+
+ while ( i < 80 )
+ {
+ aColorSet.SetItemColor( i + 1, aColWhite );
+ aColorSet.SetItemText ( i + 1, aStrWhite );
+ i++;
+ }
+ }
+}
+
+//========================================================================
+// class SvxFrameWindow --------------------------------------------------
+//========================================================================
+
+SvxFrameWindow::SvxFrameWindow( USHORT nId, SfxBindings& rBindings, BOOL bParagraphMode ) :
+
+ SfxPopupWindow( nId, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK ), rBindings ),
+
+ aFrameSet ( this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK ) ),
+ aImgList ( SVX_RES( RID_SVXIL_FRAME ) )
+
+{
+
+ /*
+ * 1 2 3 4
+ * -------------------------------------
+ * NONE LEFT RIGHT LEFTRIGHT
+ * TOP BOTTOM TOPBOTTOM OUTER
+ * -------------------------------------
+ * HOR HORINNER VERINNER ALL <- kann ueber bParagraphMode
+ * abgeschaltet werden
+ */
+
+ USHORT i = 0;
+
+ for ( i=1; i<9; i++ )
+ aFrameSet.InsertItem( i, aImgList.GetImage(i) );
+
+ if ( !bParagraphMode )
+ for ( i = 9; i < 13; i++ )
+ aFrameSet.InsertItem( i, aImgList.GetImage(i) );
+
+ aFrameSet.SetColCount( 4 );
+ aFrameSet.SetSelectHdl( LINK( this, SvxFrameWindow, SelectHdl ) );
+
+ lcl_CalcSizeValueSet( *this, aFrameSet,Size( 20, 20 ));
+
+ SetHelpId( HID_POPUP_FRAME );
+ SetText( SVX_RESSTR(RID_SVXSTR_FRAME) );
+ aFrameSet.Show();
+}
+
+SfxPopupWindow* SvxFrameWindow::Clone() const
+{
+ //! HACK: wie bekomme ich den Paragraph-Mode ??
+ return new SvxFrameWindow( GetId(), (SfxBindings&)GetBindings(), FALSE );
+}
+
+// -----------------------------------------------------------------------
+
+#define FRM_VALID_LEFT 0x01
+#define FRM_VALID_RIGHT 0x02
+#define FRM_VALID_TOP 0x04
+#define FRM_VALID_BOTTOM 0x08
+#define FRM_VALID_HINNER 0x10
+#define FRM_VALID_VINNER 0x20
+#define FRM_VALID_OUTER 0x0f
+#define FRM_VALID_ALL 0xff
+
+//
+// Per default bleiben ungesetzte Linien unveraendert
+// Mit Shift werden ungesetzte Linien zurueckgsetzt
+//
+IMPL_LINK( SvxFrameWindow, SelectHdl, void *, EMPTYARG )
+{
+ Color aColBlack( COL_BLACK );
+ SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER );
+ SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER );
+ SvxBorderLine theDefLine,
+ *pLeft = 0,
+ *pRight = 0,
+ *pTop = 0,
+ *pBottom = 0;
+ USHORT nSel = aFrameSet.GetSelectItemId();
+ USHORT nModifier = aFrameSet.GetModifier();
+ BYTE nValidFlags = 0;
+
+ switch ( nSel )
+ {
+ case 1: nValidFlags |= FRM_VALID_ALL;
+ break; // NONE
+ case 2: pLeft = &theDefLine;
+ nValidFlags |= FRM_VALID_LEFT;
+ break; // LEFT
+ case 3: pRight = &theDefLine;
+ nValidFlags |= FRM_VALID_RIGHT;
+ break; // RIGHT
+ case 4: pLeft = pRight = &theDefLine;
+ nValidFlags |= FRM_VALID_RIGHT|FRM_VALID_LEFT;
+ break; // LEFTRIGHT
+ case 5: pTop = &theDefLine;
+ nValidFlags |= FRM_VALID_TOP;
+ break; // TOP
+ case 6: pBottom = &theDefLine;
+ nValidFlags |= FRM_VALID_BOTTOM;
+ break; // BOTTOM
+ case 7: pTop = pBottom = &theDefLine;
+ nValidFlags |= FRM_VALID_BOTTOM|FRM_VALID_TOP;
+ break; // TOPBOTTOM
+ case 8: pLeft = pRight = pTop = pBottom = &theDefLine;
+ nValidFlags |= FRM_VALID_OUTER;
+ break; // OUTER
+
+ // Tabelle innen:
+ case 9: // HOR
+ pTop = pBottom = &theDefLine;
+ aBorderInner.SetLine( &theDefLine, BOXINFO_LINE_HORI );
+ aBorderInner.SetLine( NULL, BOXINFO_LINE_VERT );
+ nValidFlags |= FRM_VALID_HINNER|FRM_VALID_TOP|FRM_VALID_BOTTOM;
+ break;
+
+ case 10: // HORINNER
+ pLeft = pRight = pTop = pBottom = &theDefLine;
+ aBorderInner.SetLine( &theDefLine, BOXINFO_LINE_HORI );
+ aBorderInner.SetLine( NULL, BOXINFO_LINE_VERT );
+ nValidFlags |= FRM_VALID_RIGHT|FRM_VALID_LEFT|FRM_VALID_HINNER|FRM_VALID_TOP|FRM_VALID_BOTTOM;
+ break;
+
+ case 11: // VERINNER
+ pLeft = pRight = pTop = pBottom = &theDefLine;
+ aBorderInner.SetLine( NULL, BOXINFO_LINE_HORI );
+ aBorderInner.SetLine( &theDefLine, BOXINFO_LINE_VERT );
+ nValidFlags |= FRM_VALID_RIGHT|FRM_VALID_LEFT|FRM_VALID_VINNER|FRM_VALID_TOP|FRM_VALID_BOTTOM;
+ break;
+
+ case 12: // ALL
+ pLeft = pRight = pTop = pBottom = &theDefLine;
+ aBorderInner.SetLine( &theDefLine, BOXINFO_LINE_HORI );
+ aBorderInner.SetLine( &theDefLine, BOXINFO_LINE_VERT );
+ nValidFlags |= FRM_VALID_ALL;
+ break;
+
+ default:
+ break;
+ }
+ aBorderOuter.SetLine( pLeft, BOX_LINE_LEFT );
+ aBorderOuter.SetLine( pRight, BOX_LINE_RIGHT );
+ aBorderOuter.SetLine( pTop, BOX_LINE_TOP );
+ aBorderOuter.SetLine( pBottom, BOX_LINE_BOTTOM );
+
+ if(nModifier == KEY_SHIFT)
+ nValidFlags |= FRM_VALID_ALL;
+ aBorderInner.SetValid( VALID_TOP, 0 != (nValidFlags&FRM_VALID_TOP ));
+ aBorderInner.SetValid( VALID_BOTTOM, 0 != (nValidFlags&FRM_VALID_BOTTOM ));
+ aBorderInner.SetValid( VALID_LEFT, 0 != (nValidFlags&FRM_VALID_LEFT));
+ aBorderInner.SetValid( VALID_RIGHT, 0 != (nValidFlags&FRM_VALID_RIGHT ));
+ aBorderInner.SetValid( VALID_HORI, 0 != (nValidFlags&FRM_VALID_HINNER ));
+ aBorderInner.SetValid( VALID_VERT, 0 != (nValidFlags&FRM_VALID_VINNER));
+ aBorderInner.SetValid( VALID_DISTANCE, TRUE );
+ aBorderInner.SetValid( VALID_DISABLE, FALSE );
+
+ if ( IsInPopupMode() )
+ EndPopupMode();
+
+ GetBindings().GetDispatcher()->Execute(
+ SID_ATTR_BORDER, SFX_CALLMODE_RECORD, &aBorderOuter, &aBorderInner, 0L );
+ aFrameSet.SetNoSelection();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameWindow::Resize()
+{
+ lcl_ResizeValueSet( *this, aFrameSet);
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameWindow::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ if ( pState )
+ {
+ const SfxUInt16Item* pItem = PTR_CAST( SfxUInt16Item, pState );
+
+ if ( pItem )
+ {
+ BOOL bParMode = (BOOL)pItem->GetValue();
+ BOOL bTableMode = ( aFrameSet.GetItemCount() == 12 );
+ BOOL bResize = FALSE;
+
+ if ( bTableMode && bParMode )
+ {
+ for ( USHORT i = 9; i < 13; i++ )
+ aFrameSet.RemoveItem(i);
+ bResize = TRUE;
+ }
+ else if ( !bTableMode && !bParMode )
+ {
+ for ( USHORT i = 9; i < 13; i++ )
+ aFrameSet.InsertItem( i, aImgList.GetImage(i) );
+ bResize = TRUE;
+ }
+
+ if ( bResize )
+ {
+ lcl_CalcSizeValueSet( *this, aFrameSet,Size( 20, 20 ));
+ }
+ }
+ }
+ SfxPopupWindow::StateChanged( nSID, eState, pState );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameWindow::StartSelection()
+{
+ aFrameSet.StartSelection();
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxFrameWindow::Close()
+{
+ return SfxPopupWindow::Close();
+}
+
+//========================================================================
+// class SvxLineWindow --------------------------------------------------
+//========================================================================
+
+SvxLineWindow::SvxLineWindow( USHORT nId, SfxBindings &rBindings ) :
+
+ SfxPopupWindow( nId, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK ), rBindings ),
+
+ aLineSet( this, WinBits( WB_3DLOOK | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_NONEFIELD ) )
+
+{
+ Size aBmpSize( 55, 12 );
+ Bitmap aBmp;
+ String aStr;
+
+ for ( USHORT i = 1; i < 17; i++ )
+ {
+ MakeLineBitmap( i, aBmp, aBmpSize, aStr );
+ aLineSet.InsertItem( i, aBmp, aStr );
+ }
+
+ aLineSet.SetColCount( 2 );
+ aLineSet.SetSelectHdl( LINK( this, SvxLineWindow, SelectHdl ) );
+ aLineSet.SetText( SVX_RESSTR(STR_NONE) );
+
+ lcl_CalcSizeValueSet( *this, aLineSet,aBmpSize);
+
+ SetHelpId( HID_POPUP_LINE );
+ SetText( SVX_RESSTR(RID_SVXSTR_FRAME_STYLE) );
+ aLineSet.Show();
+}
+
+SfxPopupWindow* SvxLineWindow::Clone() const
+{
+ return new SvxLineWindow( GetId(), (SfxBindings&)GetBindings() );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineWindow::MakeLineBitmap( USHORT nNo,
+ Bitmap& rBmp, const Size& rSize,
+ String& rStr )
+{
+ VirtualDevice aVirDev( *this );
+ Rectangle aRect( Point(2,0), Size(rSize.Width()-4,0) );
+
+ // grau einfaerben und Bitmap sichern:
+ aVirDev.SetOutputSizePixel( rSize );
+ aVirDev.SetLineColor();
+ aVirDev.SetFillColor( Color( COL_WHITE ) );
+ aVirDev.DrawRect( Rectangle( Point(0,0), rSize ) );
+ aVirDev.SetFillColor( Color( COL_BLACK ) );
+
+ switch ( nNo )
+ {
+ case 1: // DEF_LINE_WIDTH_0
+ aRect.Top() = 6;
+ aRect.Bottom() = 6;
+ aVirDev.DrawRect( aRect );
+ break;
+
+ case 2: // DEF_LINE_WIDTH_1
+ aRect.Top() = 5;
+ aRect.Bottom() = 6;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) DEF_LINE_WIDTH_1/20;
+ rStr.AppendAscii(" pt") ;
+ break;
+
+ case 3: // DEF_LINE_WIDTH_2
+ aRect.Top() = 5;
+ aRect.Bottom() = 7;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) DEF_LINE_WIDTH_2/20;
+ rStr.AppendAscii(" pt") ;
+ break;
+
+ case 4: // DEF_LINE_WIDTH_3
+ aRect.Top() = 4;
+ aRect.Bottom() = 7;
+ aVirDev.DrawRect( aRect );
+ aVirDev.DrawRect( Rectangle( Point(2,4), Point(37,7) ) );
+ rStr = (USHORT) DEF_LINE_WIDTH_3/20;
+ rStr.AppendAscii(" pt" );
+ break;
+
+ case 5: // DEF_LINE_WIDTH_4
+ aRect.Top() = 4;
+ aRect.Bottom() = 8;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) DEF_LINE_WIDTH_4/20;
+ rStr.AppendAscii(" pt");
+ break;
+
+ case 6: // DEF_DOUBLE_LINE0
+ aRect.Top() = 5;
+ aRect.Bottom() = 5;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 7;
+ aRect.Bottom() = 7;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE0_OUT+DEF_DOUBLE_LINE0_IN+DEF_DOUBLE_LINE0_DIST)/20;
+ rStr.AppendAscii(" pt");
+ break;
+
+ case 7: // DEF_DOUBLE_LINE7
+ aRect.Top() = 4;
+ aRect.Bottom() = 4;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 7;
+ aRect.Bottom() = 7;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE7_OUT+DEF_DOUBLE_LINE7_IN+DEF_DOUBLE_LINE7_DIST)/20;
+ rStr.AppendAscii(" pt") ;
+ break;
+
+ case 8: // DEF_DOUBLE_LINE1
+ aRect.Top() = 4;
+ aRect.Bottom() = 5;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 7;
+ aRect.Bottom() = 8;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE1_OUT+DEF_DOUBLE_LINE1_IN+DEF_DOUBLE_LINE1_DIST)/20;
+ rStr.AppendAscii(" pt");
+ break;
+
+ case 9: // DEF_DOUBLE_LINE2
+ aRect.Top() = 3;
+ aRect.Bottom() = 5;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 8;
+ aRect.Bottom() = 10;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE2_OUT+DEF_DOUBLE_LINE2_IN+DEF_DOUBLE_LINE2_DIST)/20;
+ rStr.AppendAscii(" pt") ;
+ break;
+
+ case 10: // DEF_DOUBLE_LINE8
+ aRect.Top() = 3;
+ aRect.Bottom() = 4;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 7;
+ aRect.Bottom() = 7;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE8_OUT+DEF_DOUBLE_LINE8_IN+DEF_DOUBLE_LINE8_DIST)/20;
+ rStr.AppendAscii(" pt" );
+ break;
+
+ case 11: // DEF_DOUBLE_LINE9
+ aRect.Top() = 3;
+ aRect.Bottom() = 5;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 8;
+ aRect.Bottom() = 8;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE9_OUT+DEF_DOUBLE_LINE9_IN+DEF_DOUBLE_LINE9_DIST)/20;
+ rStr.AppendAscii(" pt" );
+ break;
+
+ case 12: // DEF_DOUBLE_LINE10
+ aRect.Top() = 2;
+ aRect.Bottom() = 5;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 8;
+ aRect.Bottom() = 8;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE10_OUT+DEF_DOUBLE_LINE10_IN+DEF_DOUBLE_LINE10_DIST)/20;
+ rStr.AppendAscii(" pt");
+ break;
+
+ case 13: // DEF_DOUBLE_LINE3
+ aRect.Top() = 4;
+ aRect.Bottom() = 5;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 7;
+ aRect.Bottom() = 7;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE3_OUT+DEF_DOUBLE_LINE3_IN+DEF_DOUBLE_LINE3_DIST)/20;
+ rStr.AppendAscii(" pt");
+ break;
+
+ case 14: // DEF_DOUBLE_LINE4
+ aRect.Top() = 4;
+ aRect.Bottom() = 4;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 6;
+ aRect.Bottom() = 7;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE4_OUT+DEF_DOUBLE_LINE4_IN+DEF_DOUBLE_LINE4_DIST)/20;
+ rStr.AppendAscii(" pt") ;
+ break;
+
+ case 15: // DEF_DOUBLE_LINE5
+ aRect.Top() = 3;
+ aRect.Bottom() = 5;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 8;
+ aRect.Bottom() = 9;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE5_OUT+DEF_DOUBLE_LINE5_IN+DEF_DOUBLE_LINE5_DIST)/20;
+ rStr.AppendAscii(" pt");
+ break;
+
+ case 16: // DEF_DOUBLE_LINE6
+ aRect.Top() = 3;
+ aRect.Bottom() = 4;
+ aVirDev.DrawRect( aRect );
+ aRect.Top() = 7;
+ aRect.Bottom() = 9;
+ aVirDev.DrawRect( aRect );
+ rStr = (USHORT) (DEF_DOUBLE_LINE6_OUT+DEF_DOUBLE_LINE6_IN+DEF_DOUBLE_LINE6_DIST)/20;
+ rStr.AppendAscii(" pt");
+ break;
+
+ default:
+ break;
+ }
+ rBmp = aVirDev.GetBitmap( Point(0,0), rSize );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxLineWindow, SelectHdl, void *, EMPTYARG )
+{
+ SvxLineItem aLineItem;
+ USHORT n1 = 0,
+ n2 = 0,
+ n3 = 0;
+ BOOL bSetLine = TRUE;
+
+ switch ( aLineSet.GetSelectItemId() )
+ {
+ case 1: n1 = DEF_LINE_WIDTH_0; break;
+ case 2: n1 = DEF_LINE_WIDTH_1; break;
+ case 3: n1 = DEF_LINE_WIDTH_2; break;
+ case 4: n1 = DEF_LINE_WIDTH_3; break;
+ case 5: n1 = DEF_LINE_WIDTH_4; break;
+
+ case 6: n1 = DEF_DOUBLE_LINE0_OUT;
+ n2 = DEF_DOUBLE_LINE0_IN;
+ n3 = DEF_DOUBLE_LINE0_DIST; break;
+ case 7: n1 = DEF_DOUBLE_LINE7_OUT;
+ n2 = DEF_DOUBLE_LINE7_IN;
+ n3 = DEF_DOUBLE_LINE7_DIST; break;
+ case 8: n1 = DEF_DOUBLE_LINE1_OUT;
+ n2 = DEF_DOUBLE_LINE1_IN;
+ n3 = DEF_DOUBLE_LINE1_DIST; break;
+ case 9: n1 = DEF_DOUBLE_LINE2_OUT;
+ n2 = DEF_DOUBLE_LINE2_IN;
+ n3 = DEF_DOUBLE_LINE2_DIST; break;
+ case 10: n1 = DEF_DOUBLE_LINE8_OUT;
+ n2 = DEF_DOUBLE_LINE8_IN;
+ n3 = DEF_DOUBLE_LINE8_DIST; break;
+ case 11: n1 = DEF_DOUBLE_LINE9_OUT;
+ n2 = DEF_DOUBLE_LINE9_IN;
+ n3 = DEF_DOUBLE_LINE9_DIST; break;
+ case 12: n1 = DEF_DOUBLE_LINE10_OUT;
+ n2 = DEF_DOUBLE_LINE10_IN;
+ n3 = DEF_DOUBLE_LINE10_DIST; break;
+ case 13: n1 = DEF_DOUBLE_LINE3_OUT;
+ n2 = DEF_DOUBLE_LINE3_IN;
+ n3 = DEF_DOUBLE_LINE3_DIST; break;
+ case 14: n1 = DEF_DOUBLE_LINE4_OUT;
+ n2 = DEF_DOUBLE_LINE4_IN;
+ n3 = DEF_DOUBLE_LINE4_DIST; break;
+ case 15: n1 = DEF_DOUBLE_LINE5_OUT;
+ n2 = DEF_DOUBLE_LINE5_IN;
+ n3 = DEF_DOUBLE_LINE5_DIST; break;
+ case 16: n1 = DEF_DOUBLE_LINE6_OUT;
+ n2 = DEF_DOUBLE_LINE6_IN;
+ n3 = DEF_DOUBLE_LINE6_DIST; break;
+ case 0:
+ default:
+ bSetLine = FALSE;
+ break;
+ }
+ if ( bSetLine )
+ {
+ SvxBorderLine aTmp( NULL, n1, n2, n3 );
+ aLineItem.SetLine( &aTmp );
+ }
+ else
+ aLineItem.SetLine( 0 );
+
+ if ( IsInPopupMode() )
+ EndPopupMode();
+
+ GetBindings().GetDispatcher()->Execute( SID_FRAME_LINESTYLE, SFX_CALLMODE_RECORD, &aLineItem, 0L );
+ aLineSet.SetNoSelection();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineWindow::Resize()
+{
+ lcl_ResizeValueSet( *this, aLineSet);
+}
+
+// -----------------------------------------------------------------------
+
+void SvxLineWindow::StartSelection()
+{
+ aLineSet.StartSelection();
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxLineWindow::Close()
+{
+ return SfxPopupWindow::Close();
+}
+
+// -----------------------------------------------------------------------
+
+#undef BRUSH
+#undef COLOR
+#undef GET_DOCFONTLIST
+
+//########################################################################
+// Hilfsklassen
+
+//========================================================================
+// class SvxTbxButtonColorUpdater ----------------------------------------
+//========================================================================
+
+SvxTbxButtonColorUpdater::SvxTbxButtonColorUpdater( USHORT nTbxBtnId,
+ ToolBox* ptrTbx,
+ USHORT nMode ) :
+ nDrawMode ( nMode ),
+ nBtnId ( nTbxBtnId ),
+ pTbx ( ptrTbx ),
+ pBtnBmp ( NULL ),
+ aCurColor ( COL_TRANSPARENT )
+
+{
+ DBG_ASSERT( pTbx, "ToolBox not found :-(" );
+ Update(nTbxBtnId == SID_ATTR_CHAR_COLOR2 ? COL_BLACK : COL_GRAY);
+ return;
+/*
+ Pen aPen = Pen( Color( COL_BLACK ) );
+ Image theImage( pTbx->GetItemImage( nBtnId ) );
+ VirtualDevice aVirDev( *pTbx );
+ Point aNullPnt;
+
+ theBmpSize = theImage.GetSizePixel();
+
+ if ( theBmpSize.Width() <= 16 )
+ theUpdRect = Rectangle( Point(7,7), Size(8,8) );
+ else
+ theUpdRect = Rectangle( Point(15,15), Size(16,16) );
+
+ // grau einf"arben und Bitmap sichern:
+ aVirDev.SetPen( Pen( PEN_NULL ) );
+ aVirDev.SetOutputSizePixel( theBmpSize );
+ aVirDev.SetFillInBrush( Brush( Color( IMAGE_COL_TRANSPARENT ) ) );
+ aVirDev.DrawRect( Rectangle( aNullPnt, theBmpSize ) );
+ aVirDev.DrawImage( aNullPnt, theImage );
+ pBtnBmp = new Bitmap( aVirDev.GetBitmap( aNullPnt, theBmpSize ) );
+
+ // durchsichtigen Rahmen malen:
+ aVirDev.SetPen( aPen );
+ aVirDev.SetFillInBrush( aCurBrush );
+
+ if ( nDrawMode != TBX_UPDATER_MODE_NONE )
+ {
+ Color aColor = aCurBrush.GetColor();
+ DrawChar( aVirDev, aColor );
+ }
+ else
+ aVirDev.DrawRect( theUpdRect );
+
+ const Bitmap aBmp( aVirDev.GetBitmap( aNullPnt, theBmpSize ) );
+ aVirDev.DrawPixel( aNullPnt, IMAGE_COL_TRANSPARENT );
+ theImage = Image( aBmp, aVirDev.GetPixel( aNullPnt ) );
+
+ pTbx->SetItemImage( nBtnId, theImage );
+ */
+}
+
+// -----------------------------------------------------------------------
+
+SvxTbxButtonColorUpdater::~SvxTbxButtonColorUpdater()
+{
+ delete pBtnBmp;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxTbxButtonColorUpdater::Update( const Color& rColor )
+{
+ Image aImage( pTbx->GetItemImage( nBtnId ) );
+ BOOL bSizeChanged = ( theBmpSize != aImage.GetSizePixel() );
+
+ if ( aCurColor == rColor && !bSizeChanged )
+ return;
+
+ VirtualDevice aVirDev( *pTbx );
+ Point aNullPnt;
+
+ if ( bSizeChanged )
+ {
+ theBmpSize = aImage.GetSizePixel();
+
+ if ( theBmpSize.Width() <= 16 )
+ theUpdRect = Rectangle( Point(7,7), Size(8,8) );
+ else
+ theUpdRect = Rectangle( Point(14,14), Size(11,11) );
+
+ aVirDev.SetPen( Pen( PEN_NULL ) );
+ aVirDev.SetOutputSizePixel( theBmpSize );
+ aVirDev.SetFillColor( Color( IMAGE_COL_TRANSPARENT ) );
+ aVirDev.DrawRect( Rectangle( aNullPnt, theBmpSize ) );
+ aVirDev.DrawImage( aNullPnt, aImage );
+ delete pBtnBmp;
+ pBtnBmp = new Bitmap( aVirDev.GetBitmap( aNullPnt, theBmpSize ) );
+ aVirDev.DrawRect( theUpdRect );
+ }
+ else if ( !pBtnBmp )
+ pBtnBmp = new Bitmap( aVirDev.GetBitmap( aNullPnt, theBmpSize ) );
+
+ aVirDev.SetOutputSizePixel( theBmpSize );
+ aVirDev.DrawBitmap( aNullPnt, *pBtnBmp );
+ aVirDev.SetLineColor( COL_BLACK );
+ aVirDev.SetFillColor( rColor );
+
+ if( nDrawMode != TBX_UPDATER_MODE_NONE )
+ {
+ DrawChar( aVirDev, rColor );
+ }
+ else
+ aVirDev.DrawRect( theUpdRect );
+
+ aCurColor = rColor;
+
+ const Bitmap aBmp( aVirDev.GetBitmap( aNullPnt, theBmpSize ) );
+ aVirDev.DrawPixel( aNullPnt, IMAGE_COL_TRANSPARENT );
+ Image aNewImage( aBmp, aVirDev.GetPixel( aNullPnt ) );
+ pTbx->SetItemImage( nBtnId, aNewImage );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxTbxButtonColorUpdater::DrawChar( VirtualDevice& rVirDev, const Color& rCol )
+{
+ Font aOldFont = rVirDev.GetFont();
+ Font aFont( System::GetStandardFont( STDFONT_ROMAN ) );
+ Size aSz = aFont.GetSize();
+ aSz.Height() = theBmpSize.Height();
+ aFont.SetSize( aSz );
+ aFont.SetWeight( WEIGHT_BOLD );
+
+ if ( nDrawMode == TBX_UPDATER_MODE_CHAR_COLOR )
+ {
+ aFont.SetColor( rCol );
+ aFont.SetFillColor( Color( IMAGE_COL_TRANSPARENT ) );
+ }
+ else
+ {
+ rVirDev.SetPen( Pen( PEN_NULL ) );
+ rVirDev.SetFillColor( rCol );
+ Rectangle aRect( Point(0,0), theBmpSize );
+ rVirDev.DrawRect( aRect );
+ aFont.SetFillColor( rCol );
+ }
+ rVirDev.SetFont( aFont );
+ Size aTxtSize(rVirDev.GetTextWidth( 'A' ), rVirDev.GetTextHeight());
+ Point aPos( ( theBmpSize.Width() - aTxtSize.Width() ) / 2,
+ ( theBmpSize.Height() - aTxtSize.Height() ) / 2 );
+
+ rVirDev.DrawText( aPos, 'A' );
+ rVirDev.SetFont( aOldFont );
+}
+//========================================================================
+// class SfxStyleControllerItem ------------------------------------------
+//========================================================================
+
+SfxStyleControllerItem::SfxStyleControllerItem(
+ USHORT nId, // Family-ID
+ SfxBindings& rBindings, // the Bindings
+ SvxStyleToolBoxControl& rTbxCtl ) // Controller-Instanz, dem
+ // dieses Item zugeordnet ist.
+ : SfxControllerItem ( nId, rBindings ),
+ rControl ( rTbxCtl )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SfxStyleControllerItem::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ switch ( GetId() )
+ {
+ case SID_STYLE_FAMILY1:
+ case SID_STYLE_FAMILY2:
+ case SID_STYLE_FAMILY3:
+ case SID_STYLE_FAMILY4:
+ case SID_STYLE_FAMILY5:
+ {
+ const USHORT nIdx = GetId() - SID_STYLE_FAMILY_START;
+
+ if ( SFX_ITEM_AVAILABLE == eState )
+ {
+ const SfxTemplateItem* pStateItem =
+ PTR_CAST( SfxTemplateItem, pState );
+ DBG_ASSERT( pStateItem != NULL, "SfxTemplateItem expected" );
+ rControl.SetFamilyState( nIdx, pStateItem );
+ }
+ else
+ rControl.SetFamilyState( nIdx, NULL );
+ break;
+ }
+ }
+}
+
+//########################################################################
+
+//========================================================================
+// class SvxStyleToolBoxControl ------------------------------------------
+//========================================================================
+
+SvxStyleToolBoxControl::SvxStyleToolBoxControl( USHORT nId,
+ ToolBox& rTbx,
+ SfxBindings& rBindings )
+
+ : SfxToolBoxControl ( nId, rTbx, rBindings ),
+ pStyleSheetPool ( NULL ),
+ nActFamily ( 0xffff ),
+ bListening ( FALSE )
+{
+ rBindings.ENTERREGISTRATIONS();
+
+ for ( USHORT i=0; i<MAX_FAMILIES; i++ )
+ {
+ pBoundItems [i] = new SfxStyleControllerItem( SID_STYLE_FAMILY_START + i, rBindings, *this );
+ pFamilyState[i] = NULL;
+ }
+
+ rBindings.LEAVEREGISTRATIONS();
+}
+
+// -----------------------------------------------------------------------
+
+SvxStyleToolBoxControl::~SvxStyleToolBoxControl()
+{
+ for( USHORT i=0; i<MAX_FAMILIES; i++ )
+ {
+ DELETEZ( pBoundItems [i] );
+ DELETEZ( pFamilyState[i] );
+ }
+ pStyleSheetPool = NULL;
+}
+
+// -----------------------------------------------------------------------
+
+SfxStyleFamily SvxStyleToolBoxControl::GetActFamily()
+{
+ switch ( nActFamily-1 + SID_STYLE_FAMILY_START )
+ {
+ case SID_STYLE_FAMILY1: return SFX_STYLE_FAMILY_CHAR;
+ case SID_STYLE_FAMILY2: return SFX_STYLE_FAMILY_PARA;
+ case SID_STYLE_FAMILY3: return SFX_STYLE_FAMILY_FRAME;
+ case SID_STYLE_FAMILY4: return SFX_STYLE_FAMILY_PAGE;
+ case SID_STYLE_FAMILY5: return SFX_STYLE_FAMILY_PSEUDO;
+ default:
+ DBG_ERROR( "unknown style family" );
+ break;
+ }
+ return SFX_STYLE_FAMILY_PARA;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStyleToolBoxControl::FillStyleBox()
+{
+ SvxStyleBox* pBox = (SvxStyleBox*)GetToolBox().GetItemWindow( GetId() );
+
+ DBG_ASSERT( pStyleSheetPool, "StyleSheetPool not found!" );
+ DBG_ASSERT( pBox, "Control not found!" );
+
+ if ( pStyleSheetPool && pBox && nActFamily!=0xffff )
+ {
+ const SfxStyleFamily eFamily = GetActFamily();
+ USHORT nCount = pStyleSheetPool->Count();
+ USHORT i = 0;
+ SfxStyleSheetBase* pStyle = NULL;
+ BOOL bDoFill = FALSE;
+
+ pStyleSheetPool->SetSearchMask( eFamily, SFXSTYLEBIT_USED );
+
+ //------------------------------
+ // Ueberpruefen, ob Fill noetig:
+ //------------------------------
+
+ pStyle = pStyleSheetPool->First();
+
+ if ( nCount != pBox->GetEntryCount() )
+ {
+ bDoFill = TRUE;
+ }
+ else
+ {
+ while ( pStyle && !bDoFill )
+ {
+ bDoFill = ( pBox->GetEntry(i) != pStyle->GetName() );
+ pStyle = pStyleSheetPool->Next();
+ i++;
+ }
+ }
+
+ if ( bDoFill )
+ {
+ pBox->SetUpdateMode( FALSE );
+ pBox->Clear();
+
+ // Listbox nur so gross, wie Eintraege vorhanden,
+ // hoechstens MAX_STYLES_ENTRIES Eintraege
+ // mindestens 4 Eintraege
+
+ if ( nCount > MAX_STYLES_ENTRIES )
+ nCount = MAX_STYLES_ENTRIES;
+ else if (nCount < 4)
+ nCount = 4;
+
+ nCount += 1; // +1 fuer Selektion
+
+ Size aSize( pBox->GetOutputSizePixel() );
+ long nNewHeight = nCount * (14 + 2) ; // 14 == TextHeight
+
+ if ( aSize.Height() != nNewHeight )
+ {
+ aSize.Height() = nNewHeight;
+ pBox->SetOutputSizePixel( aSize );
+ }
+
+ pStyle = pStyleSheetPool->First();
+
+ while ( pStyle )
+ {
+ pBox->InsertEntry( pStyle->GetName() );
+ pStyle = pStyleSheetPool->Next();
+ }
+
+ pBox->SetUpdateMode( TRUE );
+ pBox->SetFamily( eFamily );
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStyleToolBoxControl::SelectStyle( const String& rStyleName )
+{
+ SvxStyleBox* pBox = (SvxStyleBox*)GetToolBox().GetItemWindow( GetId() );
+ DBG_ASSERT( pBox, "Control not found!" );
+
+ if ( pBox )
+ {
+ String aStrSel( pBox->GetSelectEntry() );
+
+ if ( rStyleName.Len() > 0 )
+ {
+ if ( rStyleName != aStrSel )
+ pBox->SelectEntry( rStyleName );
+ }
+ else
+ pBox->SetNoSelection();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStyleToolBoxControl::Update()
+{
+ SfxStyleSheetBasePool* pPool = NULL;
+ SfxObjectShell* pDocShell = SfxObjectShell::Current();
+
+ if ( pDocShell )
+ pPool = pDocShell->GetStyleSheetPool();
+
+ USHORT i;
+ for ( i=0; i<MAX_FAMILIES; i++ )
+ if( pFamilyState[i] )
+ break;
+
+ if ( i==MAX_FAMILIES || !pPool )
+ {
+ pStyleSheetPool = pPool;
+ return;
+ }
+
+ //--------------------------------------------------------------------
+ const SfxTemplateItem* pItem = NULL;
+
+ if ( nActFamily == 0xffff || 0 == (pItem = pFamilyState[nActFamily-1]) )
+ // aktueller Bereich nicht innerhalb der erlaubten Bereiche
+ // oder Default
+ {
+ pStyleSheetPool = pPool;
+ nActFamily = 2;
+
+ pItem = pFamilyState[nActFamily-1];
+ if ( !pItem )
+ {
+ nActFamily++;
+ pItem = pFamilyState[nActFamily-1];
+ }
+
+ if ( !pItem )
+ DBG_WARNING( "Unknown Family" ); // can happens
+ }
+ else if ( pPool != pStyleSheetPool )
+ pStyleSheetPool = pPool;
+
+ FillStyleBox(); // entscheidet selbst, ob gefuellt werden muss
+
+ if ( pItem )
+ SelectStyle( pItem->GetStyleName() );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStyleToolBoxControl::SFX_NOTIFY( SfxBroadcaster& rBC,
+ const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType )
+{
+ if ( rHint.Type() == TYPE(SfxSimpleHint) &&
+ ( (SfxSimpleHint&)rHint ).GetId() == SFX_HINT_UPDATEDONE )
+ {
+ Update(); // Aktualisierung anstossen
+ EndListening( GetBindings() );
+ bListening = FALSE;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStyleToolBoxControl::SetFamilyState( USHORT nIdx,
+ const SfxTemplateItem* pItem )
+{
+ DELETEZ( pFamilyState[nIdx] );
+
+ if ( pItem )
+ pFamilyState[nIdx] = new SfxTemplateItem( *pItem );
+
+ if( !bListening )
+ {
+ StartListening( GetBindings() );
+ bListening = TRUE;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxStyleToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ USHORT nId = GetId();
+ ToolBox& rTbx = GetToolBox();
+ SvxStyleBox* pBox = (SvxStyleBox*)(rTbx.GetItemWindow( nId ));
+ TriState eTri = STATE_NOCHECK;
+
+ DBG_ASSERT( pBox, "Control not found!" );
+
+ if ( SFX_ITEM_DISABLED == eState )
+ pBox->Disable();
+ else
+ pBox->Enable();
+
+ rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+
+ switch ( eState )
+ {
+ case SFX_ITEM_AVAILABLE:
+ eTri = ((const SfxBoolItem*)pState)->GetValue()
+ ? STATE_CHECK
+ : STATE_NOCHECK;
+ break;
+
+ case SFX_ITEM_DONTCARE:
+ eTri = STATE_DONTKNOW;
+ break;
+ }
+
+ rTbx.SetItemState( nId, eTri );
+}
+
+// -----------------------------------------------------------------------
+
+Window* SvxStyleToolBoxControl::CreateItemWindow( Window *pParent )
+{
+ SvxStyleBox* pBox = new SvxStyleBox( pParent,
+ SID_STYLE_APPLY,
+ SFX_STYLE_FAMILY_PARA, GetBindings() );
+ return pBox;
+}
+
+//========================================================================
+// class SvxFontNameToolBoxControl ---------------------------------------
+//========================================================================
+
+SvxFontNameToolBoxControl::SvxFontNameToolBoxControl(
+ USHORT nId,
+ ToolBox& rTbx ,
+ SfxBindings& rBindings)
+
+ : SfxToolBoxControl( nId, rTbx, rBindings )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontNameToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ USHORT nId = GetId();
+ ToolBox& rTbx = GetToolBox();
+ SvxFontNameBox* pBox = (SvxFontNameBox*)(rTbx.GetItemWindow( nId ));
+ TriState eTri = STATE_NOCHECK;
+
+ DBG_ASSERT( pBox, "Control not found!" );
+
+ if ( SFX_ITEM_DISABLED == eState )
+ {
+ pBox->Disable();
+ pBox->Update( (const SvxFontItem*)NULL );
+ }
+ else
+ {
+ pBox->Enable();
+
+ if ( SFX_ITEM_AVAILABLE == eState )
+ {
+ DBG_ASSERT( pState->ISA(SvxFontItem), "falscher ItemType" );
+ pBox->Update( (const SvxFontItem*) pState );
+ }
+ else
+ pBox->SetText( String() );
+ }
+
+ rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+
+ switch ( eState )
+ {
+ case SFX_ITEM_AVAILABLE:
+ eTri = ((const SfxBoolItem*)pState)->GetValue()
+ ? STATE_CHECK
+ : STATE_NOCHECK;
+ break;
+
+ case SFX_ITEM_DONTCARE:
+ eTri = STATE_DONTKNOW;
+ break;
+ }
+
+ rTbx.SetItemState( nId, eTri );
+}
+
+// -----------------------------------------------------------------------
+
+Window* SvxFontNameToolBoxControl::CreateItemWindow( Window *pParent )
+{
+ SvxFontNameBox* pBox = new SvxFontNameBox( pParent, GetBindings() );
+ return pBox;
+}
+
+//========================================================================
+// class SvxFontHeightToolBoxControl -------------------------------------
+//========================================================================
+
+SvxFontHeightToolBoxControl::SvxFontHeightToolBoxControl( USHORT nId, ToolBox& rTbx,
+ SfxBindings& rBindings ) :
+
+ SfxToolBoxControl( nId, rTbx, rBindings ),
+
+ aFontNameForwarder ( SID_ATTR_CHAR_FONT, *this ),
+ pBox ( NULL ),
+ pFontItem ( NULL )
+
+{
+}
+
+// -----------------------------------------------------------------------
+SvxFontHeightToolBoxControl::~SvxFontHeightToolBoxControl()
+{
+ delete pFontItem;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontHeightToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ // FontHeight?
+ if ( SID_ATTR_CHAR_FONTHEIGHT == nSID )
+ {
+ SfxToolBoxControl::StateChanged( nSID, eState, pState );
+ pBox->StateChanged_Impl( eState, pState );
+ }
+ else
+ {
+ // FontItem (Name) nur zur sp"aterne Verwendung merken
+ delete pFontItem;
+ pFontItem = (eState == SFX_ITEM_AVAILABLE) ? (SvxFontItem*)pState->Clone() : NULL;
+
+ if ( pFontItem )
+ pBox->Update( *pFontItem );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+Window* SvxFontHeightToolBoxControl::CreateItemWindow( Window *pParent )
+{
+ pBox = new SvxFontSizeBox( pParent, *this, GetBindings() );
+ return pBox;
+}
+
+//========================================================================
+// class SvxFontColorToolBoxControl --------------------------------------
+//========================================================================
+
+SvxFontColorToolBoxControl::SvxFontColorToolBoxControl(
+ USHORT nId,
+ ToolBox& rTbx ,
+ SfxBindings& rBindings )
+
+ : SfxToolBoxControl ( nId, rTbx, rBindings ),
+ pBtnUpdater(new SvxTbxButtonColorUpdater( nId, &GetToolBox() ))
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxFontColorToolBoxControl::~SvxFontColorToolBoxControl()
+{
+ delete pBtnUpdater;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindowType SvxFontColorToolBoxControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONCLICK;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxFontColorToolBoxControl::CreatePopupWindow()
+{
+ SvxColorWindow* pColorWin =
+ new SvxColorWindow( GetId(), SID_ATTR_CHAR_COLOR,
+ SVX_RESSTR( RID_SVXITEMS_EXTRAS_CHARCOLOR ),
+ GetBindings() );
+
+ pColorWin->StartPopupMode( &GetToolBox(), TRUE );
+ pColorWin->StartSelection();
+ return pColorWin;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontColorToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ USHORT nId = GetId();
+ ToolBox& rTbx = GetToolBox();
+ const SvxColorItem* pItem = 0;
+
+ if ( SFX_ITEM_DONTCARE != eState )
+ pItem = PTR_CAST( SvxColorItem, pState );
+
+ if ( pItem )
+ pBtnUpdater->Update( pItem->GetValue());
+
+ rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+}
+
+//========================================================================
+// class SvxColorToolBoxControl --------------------------------
+//========================================================================
+
+SvxColorToolBoxControl::SvxColorToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings ) :
+
+ SfxToolBoxControl ( nId, rTbx, rBindings )
+{
+ pBtnUpdater = new SvxTbxButtonColorUpdater( nId, &GetToolBox() );
+}
+
+// -----------------------------------------------------------------------
+
+SvxColorToolBoxControl::~SvxColorToolBoxControl()
+{
+ delete pBtnUpdater;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindowType SvxColorToolBoxControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONCLICK;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow()
+{
+ USHORT nResId = GetId() == SID_BACKGROUND_COLOR ?
+ RID_SVXSTR_BACKGROUND : RID_SVXSTR_COLOR;
+ SvxColorWindow* pColorWin = new SvxColorWindow( GetId(),
+ SID_BACKGROUND_COLOR,
+ SVX_RESSTR(nResId),
+ GetBindings() );
+
+ pColorWin->StartPopupMode( &GetToolBox(), TRUE );
+ pColorWin->StartSelection();
+ return pColorWin;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxColorToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ const SvxColorItem* pItem = 0;
+ if ( SFX_ITEM_DONTCARE != eState )
+ pItem = PTR_CAST( SvxColorItem, pState );
+
+ if ( pItem )
+ pBtnUpdater->Update( pItem->GetValue() );
+
+ USHORT nId = GetId();
+ ToolBox& rTbx = GetToolBox();
+ rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+}
+
+//========================================================================
+// class SvxFontColorExtToolBoxControl --------------------------------------
+//========================================================================
+
+SvxFontColorExtToolBoxControl::SvxFontColorExtToolBoxControl
+(
+ USHORT nId,
+ ToolBox& rTbx,
+ SfxBindings& rBindings
+) :
+
+ SfxToolBoxControl( nId, rTbx, rBindings ),
+ pBtnUpdater(0),
+ aForward( SID_ATTR_CHAR_COLOR2 == nId
+ ? SID_ATTR_CHAR_COLOR_EXT
+ : SID_ATTR_CHAR_COLOR_BACKGROUND_EXT, *this )
+
+{
+ USHORT nMode = SID_ATTR_CHAR_COLOR2 == nId
+ ? TBX_UPDATER_MODE_CHAR_COLOR : TBX_UPDATER_MODE_CHAR_BACKGROUND;
+ pBtnUpdater = new SvxTbxButtonColorUpdater( nId, &GetToolBox(), nMode );
+}
+
+// -----------------------------------------------------------------------
+
+SvxFontColorExtToolBoxControl::~SvxFontColorExtToolBoxControl()
+{
+ delete pBtnUpdater;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindowType SvxFontColorExtToolBoxControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONTIMEOUT;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxFontColorExtToolBoxControl::CreatePopupWindow()
+{
+ SvxColorWindow* pColorWin =
+ new SvxColorWindow( GetId(), GetId(),
+ SVX_RESSTR( RID_SVXITEMS_EXTRAS_CHARCOLOR ),
+ GetBindings() );
+
+ if ( GetId() == SID_ATTR_CHAR_COLOR_BACKGROUND )
+ pColorWin->SetText( SVX_RESSTR( RID_SVXSTR_EXTRAS_CHARBACKGROUND ) );
+
+ pColorWin->StartPopupMode( &GetToolBox(), TRUE );
+ pColorWin->StartSelection();
+ return pColorWin;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontColorExtToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ USHORT nId = GetId();
+ ToolBox& rTbx = GetToolBox();
+ const SvxColorItem* pItem = 0;
+
+ if ( nSID == SID_ATTR_CHAR_COLOR_EXT ||
+ nSID == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT )
+ {
+ if ( SFX_ITEM_DONTCARE != eState )
+ {
+ const SfxBoolItem* pBool = PTR_CAST( SfxBoolItem, pState );
+ rTbx.CheckItem( nId, pBool && pBool->GetValue());
+ }
+ rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ }
+ else
+ {
+ if ( SFX_ITEM_DONTCARE != eState )
+ pItem = PTR_CAST( SvxColorItem, pState );
+
+ if ( pItem )
+ pBtnUpdater->Update( pItem->GetValue() );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontColorExtToolBoxControl::Select( BOOL bMod1 )
+{
+ USHORT nId = ( SID_ATTR_CHAR_COLOR2 == GetId() ) ? SID_ATTR_CHAR_COLOR_EXT
+ : SID_ATTR_CHAR_COLOR_BACKGROUND_EXT;
+ SfxBoolItem aItem( nId, GetToolBox().IsItemChecked( GetId() ) );
+ GetBindings().GetDispatcher()->Execute( nId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
+}
+
+//========================================================================
+// class SvxFrameToolBoxControl ------------------------------------------
+//========================================================================
+
+SvxFrameToolBoxControl::SvxFrameToolBoxControl( USHORT nId,
+ ToolBox& rTbx,
+ SfxBindings& rBindings )
+
+ : SfxToolBoxControl( nId, rTbx, rBindings ),
+ bParagraphMode ( FALSE )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindowType SvxFrameToolBoxControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONCLICK;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxFrameToolBoxControl::CreatePopupWindow()
+{
+ SvxFrameWindow* pFrameWin = new SvxFrameWindow( GetId(),
+ GetBindings(),
+ bParagraphMode );
+
+ pFrameWin->StartPopupMode( &GetToolBox(), TRUE );
+ pFrameWin->StartSelection();
+
+ return pFrameWin;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ USHORT nId = GetId();
+ ToolBox& rTbx = GetToolBox();
+ const SfxUInt16Item* pItem = 0;
+
+ if ( SFX_ITEM_DONTCARE != eState )
+ pItem = PTR_CAST( SfxUInt16Item, pState );
+
+ if ( pItem )
+ bParagraphMode = (BOOL)pItem->GetValue();
+
+ rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ rTbx.SetItemState( nId, (SFX_ITEM_DONTCARE == eState)
+ ? STATE_DONTKNOW
+ : STATE_NOCHECK );
+}
+
+//========================================================================
+// class SvxFrameLineStyleToolBoxControl ---------------------------------
+//========================================================================
+
+SvxFrameLineStyleToolBoxControl::SvxFrameLineStyleToolBoxControl(
+ USHORT nId,
+ ToolBox& rTbx,
+ SfxBindings& rBindings )
+
+ : SfxToolBoxControl( nId, rTbx, rBindings )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONCLICK;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow()
+{
+ SvxLineWindow* pLineWin = new SvxLineWindow( GetId(), GetBindings() );
+
+ pLineWin->StartPopupMode( &GetToolBox(), TRUE );
+ pLineWin->StartSelection();
+
+ return pLineWin;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameLineStyleToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ USHORT nId = GetId();
+ ToolBox& rTbx = GetToolBox();
+
+ rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ rTbx.SetItemState( nId, (SFX_ITEM_DONTCARE == eState)
+ ? STATE_DONTKNOW
+ : STATE_NOCHECK );
+}
+
+//========================================================================
+// class SvxFrameLineColorToolBoxControl ---------------------------------
+//========================================================================
+
+SvxFrameLineColorToolBoxControl::SvxFrameLineColorToolBoxControl
+(
+ USHORT nId,
+ ToolBox& rTbx,
+ SfxBindings& rBindings
+) :
+
+ SfxToolBoxControl( nId, rTbx, rBindings )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxFrameLineColorToolBoxControl::~SvxFrameLineColorToolBoxControl()
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindowType SvxFrameLineColorToolBoxControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONCLICK;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPopupWindow* SvxFrameLineColorToolBoxControl::CreatePopupWindow()
+{
+ SvxColorWindow* pColorWin = new SvxColorWindow( GetId(),
+ SID_FRAME_LINECOLOR,
+ SVX_RESSTR(RID_SVXSTR_FRAME_COLOR),
+ GetBindings() );
+
+ pColorWin->StartPopupMode( &GetToolBox(), TRUE );
+ pColorWin->StartSelection();
+ return pColorWin;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameLineColorToolBoxControl::StateChanged(
+
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+
+{
+ USHORT nId = GetId();
+ ToolBox& rTbx = GetToolBox();
+ rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState );
+ rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK );
+}
+
+// class SvxReloadControllerItem_Impl ------------------------------------
+
+class SvxReloadControllerItem_Impl
+{
+public:
+ Image* pNormalImage;
+ Image* pSpecialImage;
+
+ SvxReloadControllerItem_Impl() :
+ pSpecialImage( 0 ), pNormalImage( new Image( SVX_RES( RID_SVX_RELOAD_NORMAL ) ) ) {}
+ ~SvxReloadControllerItem_Impl() { delete pNormalImage; delete pSpecialImage; }
+
+ Image& GetNormalImage() { return *pNormalImage; }
+ Image& GetSpecialImage()
+ {
+ if ( !pSpecialImage )
+ pSpecialImage = new Image( SVX_RES( RID_SVX_RELOAD_SPECIAL ) );
+ return *pSpecialImage;
+ }
+};
+
+// -----------------------------------------------------------------------
+
+SvxReloadControllerItem::SvxReloadControllerItem(
+ USHORT nId, ToolBox& rTbx, SfxBindings& rBindings )
+ : pImpl( new SvxReloadControllerItem_Impl ),
+ SfxToolBoxControl( nId, rTbx, rBindings )
+{
+ rTbx.SetItemImage( nId, pImpl->GetNormalImage() );
+}
+
+// -----------------------------------------------------------------------
+
+SvxReloadControllerItem::~SvxReloadControllerItem()
+{
+ delete pImpl;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxReloadControllerItem::StateChanged(
+ USHORT nSID, SfxItemState eState, const SfxPoolItem* pState )
+{
+ SfxBoolItem* pItem = PTR_CAST( SfxBoolItem, pState );
+ ToolBox& rBox = GetToolBox();
+ if( pItem )
+ {
+ rBox.SetItemImage( GetId(),
+ pItem->GetValue() ? pImpl->GetSpecialImage() :
+ pImpl->GetNormalImage() );
+ }
+ rBox.EnableItem( GetId(), eState != SFX_ITEM_DISABLED );
+// SfxToolBoxControl::StateChanged( nSID, eState, pState );
+}
+
+//========================================================================
+
+void lcl_ResizeValueSet( Window &rWin, ValueSet &rValueSet )
+{
+ Size aSize = rWin.GetOutputSizePixel();
+ aSize.Width() -= 4;
+ aSize.Height() -= 4;
+ rValueSet.SetPosSizePixel( Point(2,2), aSize );
+}
+
+// -----------------------------------------------------------------------
+
+void lcl_CalcSizeValueSet( Window &rWin, ValueSet &rValueSet, const Size &aItemSize ) \
+{
+ Size aSize = rValueSet.CalcWindowSizePixel( aItemSize );
+ aSize.Width() += 4;
+ aSize.Height() += 4;
+ rWin.SetOutputSizePixel( aSize );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL lcl_FontChangedHint( const SfxHint &rHint )
+{
+ SfxPoolItemHint *pItemHint = PTR_CAST(SfxPoolItemHint, &rHint);
+ if ( pItemHint )
+ {
+ SfxPoolItem *pItem = pItemHint->GetObject();
+ return ( pItem->Which() == SID_ATTR_CHAR_FONTLIST );
+ }
+ else
+ {
+ SfxSimpleHint* pSimpleHint = PTR_CAST(SfxSimpleHint, &rHint);
+ return pSimpleHint && ( SFX_HINT_DATACHANGED ==
+ ( pSimpleHint->GetId() & SFX_HINT_DATACHANGED ) );
+ }
+}
+
diff --git a/svx/source/tbxctrls/tbcontrl.src b/svx/source/tbxctrls/tbcontrl.src
new file mode 100644
index 0000000000..7a440c7f91
--- /dev/null
+++ b/svx/source/tbxctrls/tbcontrl.src
@@ -0,0 +1,310 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbcontrl.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+#include <dialogs.hrc>
+#include <helpid.hrc>
+ // pragma ----------------------------------------------------------------
+
+/*
+ * Bitmaps f"ur SvxFrameWindow
+ */
+Image RID_SVX_RELOAD_NORMAL
+{
+ ImageBitmap = Bitmap { File = "reload.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+};
+Image RID_SVX_RELOAD_SPECIAL
+{
+ ImageBitmap = Bitmap { File = "reloads.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+};
+ImageList RID_SVXIL_FRAME
+{
+ ImageBitmap = Bitmap { File = "frames.bmp" ; };
+ IdList = { 1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 9 ; 10 ; 11 ; 12 ; };
+ IdCount = { 12 ; };
+};
+String RID_SVXSTR_TRANSPARENT
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Keine Füllung : Transparent */
+ /* ### ACHTUNG: Neuer Text in Resource? Keine Füllung : Keine F³llung */
+ /* ### ACHTUNG: Neuer Text in Resource? Keine Füllung : Keine F³llung */
+ Text = "Keine Füllung" ;
+ Text [ ENGLISH ] = "No filling" ;
+ Text [ dutch ] = "Geen vulling" ;
+ Text [ english_us ] = "No Fill" ;
+ Text [ italian ] = "Trasparente" ;
+ Text [ spanish ] = "Sin relleno" ;
+ Text [ french ] = "Sans remplissage" ;
+ Text [ swedish ] = "Transparent" ;
+ Text [ danish ] = "Ingen fyld" ;
+ Text [ portuguese ] = "Sem preenchimento" ;
+ Text [ portuguese_brazilian ] = "Keine Füllung" ;
+ Text[ chinese_simplified ] = "²»Ìî³ä";
+ Text[ russian ] = "Áåç çàëèâêè";
+ Text[ polish ] = "Brak wype³nienia";
+ Text[ japanese ] = "“h‚è‚‚Ԃµ‚È‚µ";
+ Text[ chinese_traditional ] = "¤£¥R¶ñ";
+ Text[ arabic ] = "ÈÏæä ÊÚÈÆÉ";
+ Text[ greek ] = "×ùñßò ãÝìéóìá";
+ Text[ korean ] = "ä¿ì±â ¾øÀ½";
+ Text[ turkish ] = "Dolgu yok";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FILLPATTERN
+{
+ Text = "Muster" ;
+ Text [ ENGLISH ] = "Pattern" ;
+ Text [ norwegian ] = "Mønster" ;
+ Text [ italian ] = "Modello" ;
+ Text [ portuguese_brazilian ] = "Padrão" ;
+ Text [ portuguese ] = "Modelo" ;
+ Text [ finnish ] = "Kuvio" ;
+ Text [ danish ] = "Mønster" ;
+ Text [ french ] = "Motif" ;
+ Text [ swedish ] = "Mönster" ;
+ Text [ dutch ] = "Patroon" ;
+ Text [ spanish ] = "Modelo" ;
+ Text [ english_us ] = "Pattern" ;
+ Text[ chinese_simplified ] = "ͼ°¸";
+ Text[ russian ] = "Îáðàçåö";
+ Text[ polish ] = "Deseñ";
+ Text[ japanese ] = "ÊßÀ°Ý";
+ Text[ chinese_traditional ] = "¹Ï®×";
+ Text[ arabic ] = "äÞÔ";
+ Text[ greek ] = "Ìïôßâï";
+ Text[ korean ] = "¹«´Ì";
+ Text[ turkish ] = "Desen";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FRAME
+{
+ 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 ] = "ŠO˜g";
+ Text[ chinese_traditional ] = "Ãä®Ø";
+ Text[ arabic ] = "ÇáÍÏæÏ";
+ Text[ greek ] = "Ðåñßãñáììá";
+ Text[ korean ] = "Å׵θ®";
+ Text[ turkish ] = "Kenarlýk";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FRAME_STYLE
+{
+ Text = "Umrandungsstil" ;
+ Text [ ENGLISH ] = "Border Style" ;
+ Text [ norwegian ] = "Kantlinje mal" ;
+ Text [ italian ] = "Stile bordo" ;
+ Text [ portuguese_brazilian ] = "Estilo da Borda" ;
+ Text [ portuguese ] = "Estilo do contorno" ;
+ Text [ finnish ] = "Reunaviivan tyyli" ;
+ Text [ danish ] = "Rammetype" ;
+ Text [ french ] = "Style de bordure" ;
+ Text [ swedish ] = "Inramningsstil" ;
+ Text [ dutch ] = "Omrandingstype" ;
+ Text [ spanish ] = "Estilo de borde" ;
+ Text [ english_us ] = "Border Style" ;
+ Text[ chinese_simplified ] = "±ß¾àÑùʽ";
+ Text[ russian ] = "Ñòèëü îáðàìëåíèÿ";
+ Text[ polish ] = "Styl obramowania";
+ Text[ japanese ] = "ŠO˜g½À²Ù";
+ Text[ chinese_traditional ] = "Ãä¬É¼Ë¦¡";
+ Text[ arabic ] = "äãØ ÇáÍÏæÏ";
+ Text[ greek ] = "Óôõë ðåñéãñÜììáôïò";
+ Text[ korean ] = "Å׵θ® À¯Çü";
+ Text[ turkish ] = "Kenarlýk biçimi";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FRAME_COLOR
+{
+ Text = "Umrandungsfarbe" ;
+ Text [ ENGLISH ] = "Border Color" ;
+ Text [ norwegian ] = "Kantlinjefarge" ;
+ Text [ italian ] = "Colore bordo" ;
+ Text [ portuguese_brazilian ] = "Cor da Borda" ;
+ Text [ portuguese ] = "Cor do contorno" ;
+ Text [ finnish ] = "Reunaviivan väri" ;
+ Text [ danish ] = "Rammefarve" ;
+ Text [ french ] = "Couleur de bordure" ;
+ Text [ swedish ] = "Inramningsfärg" ;
+ Text [ dutch ] = "Omrandingskleur" ;
+ Text [ spanish ] = "Color del borde" ;
+ Text [ english_us ] = "Border Color" ;
+ Text[ chinese_simplified ] = "±ß¿òÑÕÉ«";
+ Text[ russian ] = "Öâåò îáðàìëåíèÿ";
+ Text[ polish ] = "Kolor obramowania";
+ Text[ japanese ] = "ŠO˜g‚ÌF";
+ Text[ chinese_traditional ] = "Ãä®ØÃC¦â";
+ Text[ arabic ] = "áæä ÇáÍÏæÏ";
+ Text[ greek ] = "×ñþìáôá ðåñéãñáììÜôùí";
+ Text[ korean ] = "Å׵θ® »ö";
+ Text[ turkish ] = "Kenarlýk rengi";
+ Text[ language_user1 ] = " ";
+};
+ListBox RID_SVXTBX_STYLE
+{
+ HelpId = HID_STYLE_LISTBOX ;
+ Size = MAP_APPFONT ( 67 , 86 ) ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ AutoHScroll = TRUE ;
+ DDExtraWidth = TRUE ;
+ Border = TRUE ;
+ Hide = TRUE ;
+};
+String RID_SVXSTR_EXTRAS_CHARBACKGROUND
+{
+ Text = "Zeichenhintergrund" ;
+ Text [ English ] = "Character background" ;
+ Text [ english_us ] = "Highlighting" ;
+ Text [ portuguese_brazilian ] = "Zeichenhintergrund" ;
+ Text [ swedish ] = "Teckenbakgrund" ;
+ Text [ danish ] = "Tegnbaggrund" ;
+ Text [ italian ] = "Sfondo caratteri" ;
+ Text [ spanish ] = "Fondo de carácter" ;
+ Text [ french ] = "Trame de fond" ;
+ Text [ dutch ] = "Tekenachtergrond" ;
+ Text [ portuguese ] = "Destacar caracteres" ;
+ Text[ chinese_simplified ] = "×Ö·û±³¾°";
+ Text[ russian ] = "Ôîí çíàêîâ";
+ Text[ polish ] = "T³o znaków";
+ Text[ japanese ] = "•¶Žš‚Ì”wŒi";
+ Text[ chinese_traditional ] = "¦r¤¸­I´º";
+ Text[ arabic ] = "ÎáÝíÉ ÇáÎØ";
+ Text[ greek ] = "Öüíôï ÷áñáêôÞñùí";
+ Text[ korean ] = "°­Á¶";
+ Text[ turkish ] = "Vurgu";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_BACKGROUND
+{
+ Text = "Hintergrund" ;
+ Text [ English ] = "Background" ;
+ Text[ english_us ] = "Background";
+ Text[ portuguese ] = "Plano de fundo";
+ Text[ russian ] = "Ôîí";
+ Text[ greek ] = "Öüíôï";
+ Text[ dutch ] = "Achtergrond";
+ Text[ french ] = "Arrière-plan";
+ Text[ spanish ] = "Fondo";
+ Text[ italian ] = "Background";
+ Text[ danish ] = "Baggrund";
+ Text[ swedish ] = "Bakgrund";
+ Text[ polish ] = "T³o";
+ Text[ portuguese_brazilian ] = "Background";
+ Text[ japanese ] = "”wŒi";
+ Text[ korean ] = "¹è°æ";
+ Text[ chinese_simplified ] = "±³¾°";
+ Text[ chinese_traditional ] = "­I´º";
+ Text[ arabic ] = "ÇáÎáÝíÉ";
+ Text[ turkish ] = "Artalan";
+};
+Image RID_SVXIMG_GRAF_RED
+{
+ ImageBitmap = Bitmap { File = "sc10865.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+};
+Image RID_SVXIMG_GRAF_GREEN
+{
+ ImageBitmap = Bitmap { File = "sc10866.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+};
+Image RID_SVXIMG_GRAF_BLUE
+{
+ ImageBitmap = Bitmap { File = "sc10867.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+};
+Image RID_SVXIMG_GRAF_LUMINANCE
+{
+ ImageBitmap = Bitmap { File = "sc10863.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+};
+Image RID_SVXIMG_GRAF_CONTRAST
+{
+ ImageBitmap = Bitmap { File = "sc10864.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+};
+Image RID_SVXIMG_GRAF_GAMMA
+{
+ ImageBitmap = Bitmap { File = "sc10868.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+};
+Image RID_SVXIMG_GRAF_TRANSPARENCE
+{
+ ImageBitmap = Bitmap { File = "sc10869.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+};
+
+// ********************************************************************** EOF
diff --git a/svx/source/tbxctrls/tbxalign.cxx b/svx/source/tbxctrls/tbxalign.cxx
new file mode 100644
index 0000000000..8f699817fc
--- /dev/null
+++ b/svx/source/tbxctrls/tbxalign.cxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxalign.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SFXENUMITEM_HXX
+#include <svtools/eitem.hxx>
+#endif
+#pragma hdrstop
+
+#include "dialmgr.hxx"
+#include "dialogs.hrc"
+
+#include "tbxalign.hxx"
+#include "tbxdraw.hxx"
+#include "tbxdraw.hrc"
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+
+SFX_IMPL_TOOLBOX_CONTROL(SvxTbxCtlAlign, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* Klasse fuer SwToolbox
+|*
+\************************************************************************/
+
+SvxTbxCtlAlign::SvxTbxCtlAlign( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings ) :
+
+ SfxToolBoxControl( nId, rTbx, rBindings )
+
+{
+}
+
+/*************************************************************************
+|*
+|* Wenn man ein PopupWindow erzeugen will
+|*
+\************************************************************************/
+
+SfxPopupWindowType SvxTbxCtlAlign::GetPopupWindowType() const
+{
+ return(SFX_POPUPWINDOW_ONCLICK);
+}
+
+/*************************************************************************
+|*
+|* Hier wird das Fenster erzeugt
+|* Lage der Toolbox mit GetToolBox() abfragbar
+|* rItemRect sind die Screen-Koordinaten
+|*
+\************************************************************************/
+
+SfxPopupWindow* SvxTbxCtlAlign::CreatePopupWindow()
+{
+ if ( GetId() == SID_OBJECT_ALIGN )
+ {
+ SvxPopupWindowTbxMgr* pWin =
+ new SvxPopupWindowTbxMgr( GetId(), this,
+ SVX_RES( RID_SVXTBX_ALIGNMENT ),
+ SVX_RES( TBX_ALIGNMENT ),
+ GetBindings() );
+ pWin->StartPopupMode( &GetToolBox(), TRUE );
+ pWin->StartSelection();
+ pWin->Show();
+ return pWin;
+ }
+ return NULL;
+}
+
+
diff --git a/svx/source/tbxctrls/tbxdraw.hrc b/svx/source/tbxctrls/tbxdraw.hrc
new file mode 100644
index 0000000000..85492ec7e9
--- /dev/null
+++ b/svx/source/tbxctrls/tbxdraw.hrc
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxdraw.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "dialogs.hrc"
+#include <svxids.hrc>
+
+#define TBX_DRAW 1
+#define TBX_ALIGNMENT SID_OBJECT_ALIGN_LEFT
diff --git a/svx/source/tbxctrls/tbxdraw.src b/svx/source/tbxctrls/tbxdraw.src
new file mode 100644
index 0000000000..c2ec5282a2
--- /dev/null
+++ b/svx/source/tbxctrls/tbxdraw.src
@@ -0,0 +1,683 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxdraw.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+#include "tbxdraw.hrc"
+#include "dialogs.hrc"
+#include "helpid.hrc"
+#include <svxids.hrc>
+ // pragma ----------------------------------------------------------------
+
+ // -----------------------------------------------------------------------
+#define IMAGE_STDBTN_COLOR Color { Red = 0xC000; Green = 0xC000; Blue = 0xC000; }
+FloatingWindow RID_SVXTBX_DRAW
+{
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ HelpID = HID_DRAWTOOL_TBX ;
+ Text = "Zeichenfunktionen" ;
+ Text [ English ] = "Draw functions" ;
+ ToolBox TBX_DRAW
+ {
+ HelpId = HID_SVXTBX_DRAW ;
+ SVLook = TRUE ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_SELECT ;
+ HelpID = SID_OBJECT_SELECT ;
+ RadioCheck = TRUE ;
+ Text = "Auswahl" ;
+ Text [ ENGLISH ] = "Selection" ;
+ Text [ norwegian ] = "Selection" ;
+ Text [ italian ] = "Selezione" ;
+ Text [ portuguese_brazilian ] = "Seleção" ;
+ Text [ portuguese ] = "Selecção" ;
+ Text [ finnish ] = "Valinta" ;
+ Text [ danish ] = "Marker" ;
+ Text [ french ] = "Sélection" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ dutch ] = "Selectie" ;
+ Text [ spanish ] = "Selección" ;
+ Text [ english_us ] = "Selection" ;
+ Text[ chinese_simplified ] = "Ñ¡Ôñ";
+ Text[ russian ] = "Âûäåëåíèå";
+ Text[ polish ] = "Wybór";
+ Text[ japanese ] = "‘I‘ð";
+ Text[ chinese_traditional ] = "¿ï¾Ü";
+ Text[ greek ] = "ÅðéëïãÞ";
+ Text[ korean ] = "¼±ÅÃ";
+ Text[ arabic ] = "ÊÍÏíÏ";
+ Text[ turkish ] = "Seçim";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_LINE ;
+ HelpID = SID_DRAW_LINE ;
+ RadioCheck = TRUE ;
+ Text = "Linie" ;
+ Text [ ENGLISH ] = "Line" ;
+ Text [ norwegian ] = "Linje" ;
+ Text [ italian ] = "Linea" ;
+ Text [ portuguese_brazilian ] = "Linha" ;
+ Text [ portuguese ] = "Linha" ;
+ Text [ finnish ] = "Viiva" ;
+ Text [ danish ] = "Streg" ;
+ Text [ french ] = "Ligne" ;
+ Text [ swedish ] = "Linje" ;
+ Text [ dutch ] = "Lijn" ;
+ Text [ spanish ] = "Línea" ;
+ Text [ english_us ] = "Line" ;
+ Text[ chinese_simplified ] = "ÏßÌõ";
+ Text[ russian ] = "Ëèíèÿ";
+ Text[ polish ] = "Linia";
+ Text[ japanese ] = "ü";
+ Text[ chinese_traditional ] = "½u±ø";
+ Text[ greek ] = "ÃñáììÞ";
+ Text[ korean ] = "¼±";
+ Text[ arabic ] = "ÎØ";
+ Text[ turkish ] = "Çizgi";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_RECT ;
+ HelpID = SID_DRAW_RECT ;
+ RadioCheck = TRUE ;
+ Text = "Rechteck" ;
+ Text [ ENGLISH ] = "Rectangle" ;
+ Text [ norwegian ] = "Rectangle" ;
+ Text [ italian ] = "Rettangolo" ;
+ Text [ portuguese_brazilian ] = "Retângulo" ;
+ Text [ portuguese ] = "Rectângulo" ;
+ Text [ finnish ] = "Suorakulmio" ;
+ Text [ danish ] = "Rektangel" ;
+ Text [ french ] = "Rectangle" ;
+ Text [ swedish ] = "Rektangel" ;
+ Text [ dutch ] = "Rechthoek" ;
+ Text [ spanish ] = "Rectángulo" ;
+ Text [ english_us ] = "Rectangle" ;
+ Text[ chinese_simplified ] = "¾ØÐÎ";
+ Text[ russian ] = "Ïðÿìîóãîëüíèê";
+ Text[ polish ] = "Prostok¹t";
+ Text[ japanese ] = "ŽlŠpŒ`";
+ Text[ chinese_traditional ] = "¯x§Î";
+ Text[ greek ] = "Ïñèïãþíéï";
+ Text[ korean ] = "»ç°¢Çü";
+ Text[ arabic ] = "ãÓÊØíá";
+ Text[ turkish ] = "Dikdörtgen";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_ELLIPSE ;
+ HelpID = SID_DRAW_ELLIPSE ;
+ RadioCheck = TRUE ;
+ Text = "Ellipse" ;
+ Text [ ENGLISH ] = "Ellipse" ;
+ Text [ norwegian ] = "Ellipse" ;
+ Text [ italian ] = "Ellisse" ;
+ Text [ portuguese_brazilian ] = "Elipse" ;
+ Text [ portuguese ] = "Elipse" ;
+ Text [ finnish ] = "Soikio" ;
+ Text [ danish ] = "Ellipse" ;
+ Text [ french ] = "Ellipse" ;
+ Text [ swedish ] = "Ellips" ;
+ Text [ dutch ] = "Ellips" ;
+ Text [ spanish ] = "Elipse" ;
+ Text [ english_us ] = "Ellipse" ;
+ Text [ dutch ] = "Ellips" ;
+ Text[ chinese_simplified ] = "ÍÖÔ²";
+ Text[ russian ] = "Ýëëèïñû";
+ Text[ polish ] = "Elipsa";
+ Text[ japanese ] = "‘ȉ~Œ`";
+ Text[ chinese_traditional ] = "¾ò¶ê§Î";
+ Text[ greek ] = "¸ëëåéøç";
+ Text[ korean ] = "Ÿ¿ø";
+ Text[ arabic ] = "Ôßá ÈíÖæí";
+ Text[ turkish ] = "Elips";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_POLYGON_NOFILL ;
+ HelpID = SID_DRAW_POLYGON_NOFILL ;
+ RadioCheck = TRUE ;
+ Text = "Polygon" ;
+ Text [ ENGLISH ] = "Polygon" ;
+ Text [ norwegian ] = "Polygon" ;
+ Text [ italian ] = "Poligono" ;
+ Text [ portuguese_brazilian ] = "Polígono" ;
+ Text [ portuguese ] = "Polígono" ;
+ Text [ finnish ] = "Murtoviiva" ;
+ Text [ danish ] = "Polygon" ;
+ Text [ french ] = "Polygone" ;
+ Text [ swedish ] = "Polygon" ;
+ Text [ dutch ] = "Veelhoek" ;
+ Text [ spanish ] = "Polígono" ;
+ Text [ english_us ] = "Polygon" ;
+ Text[ chinese_simplified ] = "¶à±ßÐÎ";
+ Text[ russian ] = "Ìíîãîóãîëüíèê";
+ Text[ polish ] = "Wielok¹t";
+ Text[ japanese ] = "‘½ŠpŒ`";
+ Text[ chinese_traditional ] = "¦hÃä§Î";
+ Text[ greek ] = "Ðïëýãùíï";
+ Text[ korean ] = "´Ù°¢Çü";
+ Text[ arabic ] = "ãÖáÚ";
+ Text[ turkish ] = "Poligon";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_BEZIER_NOFILL ;
+ HelpID = SID_DRAW_BEZIER_NOFILL ;
+ RadioCheck = TRUE ;
+ Text = "Bezier" ;
+ Text [ ENGLISH ] = "Bezier" ;
+ Text [ spanish ] = "Bézier" ;
+ Text [ dutch ] = "Bézier" ;
+ Text [ english_us ] = "Bézier" ;
+ Text [ swedish ] = "Bézier" ;
+ Text [ danish ] = "Bezier" ;
+ Text [ italian ] = "Bézier" ;
+ Text [ french ] = "Bézier" ;
+ Text [ portuguese ] = "Bézier" ;
+ Text [ portuguese_brazilian ] = "Bezier" ;
+ Text[ chinese_simplified ] = "ÇúÏß";
+ Text[ language_user1 ] = " ";
+ Text[ russian ] = "Áåçüå";
+ Text[ polish ] = "Krzywa Beziera";
+ Text[ japanese ] = "ÍÞ¼Þª‹Èü";
+ Text[ chinese_traditional ] = "¦±½u";
+ Text[ greek ] = "Bézier";
+ Text[ korean ] = "º£Áö¾î";
+ Text[ arabic ] = "Bézier";
+ Text[ turkish ] = "Bezier";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_FREELINE_NOFILL ;
+ HelpID = SID_DRAW_FREELINE_NOFILL ;
+ RadioCheck = TRUE ;
+ Text = "Freihand" ;
+ Text [ ENGLISH ] = "???" ;
+ Text [ portuguese ] = "Forma livre" ;
+ Text [ english_us ] = "Freeform" ;
+ Text [ portuguese_brazilian ] = "Freihand" ;
+ Text [ swedish ] = "Frihand" ;
+ Text [ danish ] = "Frihånd" ;
+ Text [ italian ] = "Mano libera" ;
+ Text [ spanish ] = "Mano alzada" ;
+ Text [ french ] = "À main levée" ;
+ Text [ dutch ] = "Vrije hand" ;
+ Text[ chinese_simplified ] = "×ÔÓÉÐÎʽ";
+ Text[ russian ] = "Ðèñîâàííàÿ ôîðìà";
+ Text[ polish ] = "Dowolny kszta³t";
+ Text[ japanese ] = "ÌØ°ÊÝÄÞ";
+ Text[ chinese_traditional ] = "¦Û¥Ñ§Î";
+ Text[ greek ] = "Åëåýèåñç ó÷åäßáóç";
+ Text[ korean ] = "ÀÚÀ¯¼­½Ä";
+ Text[ arabic ] = "ÍÑ";
+ Text[ turkish ] = "Serbest biçim";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_ARC ;
+ HelpID = SID_DRAW_ARC ;
+ RadioCheck = TRUE ;
+ Text = "Kreisbogen" ;
+ Text [ ENGLISH ] = "Arc" ;
+ Text [ norwegian ] = "Arc" ;
+ Text [ italian ] = "Arco di cerchio" ;
+ Text [ portuguese_brazilian ] = "Arco" ;
+ Text [ portuguese ] = "Arco" ;
+ Text [ finnish ] = "Kaari" ;
+ Text [ danish ] = "Cirkelbue" ;
+ Text [ french ] = "Arc de cercle" ;
+ Text [ swedish ] = "Cirkelbåge" ;
+ Text [ dutch ] = "Cirkelboog" ;
+ Text [ spanish ] = "Arco de círculo" ;
+ Text [ english_us ] = "Arc" ;
+ Text[ chinese_simplified ] = "Ô²»¡";
+ Text[ russian ] = "Äóãà";
+ Text[ polish ] = "£uk ko³a";
+ Text[ japanese ] = "‰~ŒÊ";
+ Text[ chinese_traditional ] = "¶ê©·";
+ Text[ greek ] = "Ôüîï";
+ Text[ korean ] = "¿øÈ£";
+ Text[ arabic ] = "ÞæÓ ÏÇÆÑí";
+ Text[ turkish ] = "Yay";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_PIE ;
+ HelpID = SID_DRAW_PIE ;
+ RadioCheck = TRUE ;
+ Text = "Ellipsensektor" ;
+ Text [ ENGLISH ] = "Pie" ;
+ Text [ portuguese ] = "Sectograma" ;
+ Text [ english_us ] = "Circle Pie" ;
+ Text [ portuguese_brazilian ] = "Torta" ;
+ Text [ swedish ] = "Ellipssektor" ;
+ Text [ danish ] = "Ellipsesektor" ;
+ Text [ italian ] = "Settore di cerchio" ;
+ Text [ spanish ] = "Sector de elipse" ;
+ Text [ french ] = "Secteur d'ellipse" ;
+ Text [ dutch ] = "Ellipssector" ;
+ Text[ chinese_simplified ] = "ÍÖÔ²ÉÈÐÎ";
+ Text[ russian ] = "Ñåêòîð ýëëèïñà";
+ Text[ polish ] = "Wycinek elipsy";
+ Text[ japanese ] = "îŒ`";
+ Text[ chinese_traditional ] = "®°§Î";
+ Text[ greek ] = "ÔïìÝáò Ýëëåéøçò";
+ Text[ korean ] = "¿ø¹Ý";
+ Text[ arabic ] = "ÞØÇÚ Ôßá ÈíÖæí";
+ Text[ turkish ] = "Elips dilimi";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_CIRCLECUT ;
+ HelpID = SID_DRAW_CIRCLECUT ;
+ RadioCheck = TRUE ;
+ Text = "Kreissegment" ;
+ Text [ ENGLISH ] = "Circlecut" ;
+ Text [ portuguese ] = "Segmento de círculo" ;
+ Text [ english_us ] = "Circle Segment" ;
+ Text [ portuguese_brazilian ] = "Circlerecortar" ;
+ Text [ swedish ] = "Cirkelsegment" ;
+ Text [ danish ] = "Cirkelsegment" ;
+ Text [ italian ] = "Segmento di cerchio" ;
+ Text [ spanish ] = "Segmento de círculo" ;
+ Text [ french ] = "Segment de cercle" ;
+ Text [ dutch ] = "Cirkelsegment" ;
+ Text[ chinese_simplified ] = "Բȱ";
+ Text[ russian ] = "Ñåãìåíò îêðóæíîñòè";
+ Text[ polish ] = "Odcinek ko³a";
+ Text[ japanese ] = "‰~‚ÌØ•Ð";
+ Text[ chinese_traditional ] = "¶ê¯Ê";
+ Text[ greek ] = "ÔìÞìá êýêëïõ";
+ Text[ korean ] = "¿øÈ£";
+ Text[ arabic ] = "ÞØÚÉ ãä ÏÇÆÑÉ";
+ Text[ turkish ] = "Yay dilimi";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_TEXT ;
+ HelpID = SID_DRAW_TEXT ;
+ RadioCheck = TRUE ;
+ Text = "Text" ;
+ Text [ ENGLISH ] = "Text" ;
+ Text [ norwegian ] = "Text" ;
+ Text [ italian ] = "Testo" ;
+ Text [ portuguese_brazilian ] = "Texto" ;
+ Text [ portuguese ] = "Texto" ;
+ Text [ finnish ] = "Teksti" ;
+ Text [ danish ] = "Tekst" ;
+ Text [ french ] = "Texte" ;
+ Text [ swedish ] = "Text" ;
+ Text [ dutch ] = "Tekst" ;
+ Text [ spanish ] = "Texto" ;
+ Text [ english_us ] = "Text" ;
+ Text[ chinese_simplified ] = "ÎÄ×Ö";
+ Text[ russian ] = "Òåêñò";
+ Text[ polish ] = "Tekst";
+ Text[ japanese ] = "÷½Ä";
+ Text[ chinese_traditional ] = "¤å¦r";
+ Text[ greek ] = "Êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ®";
+ Text[ arabic ] = "ÇáäÕ";
+ Text[ turkish ] = "Metin";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_TEXT_MARQUEE ;
+ HelpID = SID_DRAW_TEXT_MARQUEE ;
+ RadioCheck = TRUE ;
+ Text = "Lauftext" ;
+ Text [ ENGLISH ] = "Marquee" ;
+ Text [ portuguese ] = "Texto animado" ;
+ Text [ english_us ] = "Text Animation" ;
+ Text [ portuguese_brazilian ] = "Lauftext" ;
+ Text [ swedish ] = "Löptext" ;
+ Text [ danish ] = "Animeret tekst" ;
+ Text [ italian ] = "Testo scorrevole" ;
+ Text [ spanish ] = "Animación de texto" ;
+ Text [ french ] = "Défilement de texte" ;
+ Text [ dutch ] = "Tekstanimatie" ;
+ Text[ chinese_simplified ] = "»î¶¯ÎÄ×Ö";
+ Text[ russian ] = "Áåãóùàÿ ñòðîêà";
+ Text[ polish ] = "Animacje tekstu";
+ Text[ japanese ] = "÷½Ä±ÆÒ°¼®Ý";
+ Text[ chinese_traditional ] = "¬¡°Ê¤å¦r";
+ Text[ greek ] = "Êéíïýìåíï êåßìåíï";
+ Text[ korean ] = "ÅؽºÆ® ¾Ö´Ï¸ÞÀ̼Ç";
+ Text[ arabic ] = "äÕ ãÊÍÑß";
+ Text[ turkish ] = "Metin canlandýrma";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_DRAW_CAPTION ;
+ HelpID = SID_DRAW_CAPTION ;
+ RadioCheck = TRUE ;
+ Text = "Legende" ;
+ Text [ ENGLISH ] = "Caption" ;
+ Text [ norwegian ] = "Bildetekst" ;
+ Text [ italian ] = "Legenda" ;
+ Text [ portuguese_brazilian ] = "Legenda" ;
+ Text [ portuguese ] = "Legenda" ;
+ Text [ finnish ] = "Selite" ;
+ Text [ danish ] = "Forklaring" ;
+ Text [ french ] = "Légende" ;
+ Text [ swedish ] = "Förklaring" ;
+ Text [ dutch ] = "Legenda" ;
+ Text [ spanish ] = "Leyenda" ;
+ Text [ english_us ] = "Callouts" ;
+ Text[ chinese_simplified ] = "ͼÀý";
+ Text[ russian ] = "Ëåãåíäà";
+ Text[ polish ] = "Legenda";
+ Text[ japanese ] = "‚«o‚µ";
+ Text[ chinese_traditional ] = "¹Ï¨Ò";
+ Text[ greek ] = "ÅðéãñáöÞ";
+ Text[ korean ] = "¹ü·Ê";
+ Text[ arabic ] = "ÊÚáíÞ ÊÝÓíÑí";
+ Text[ turkish ] = "Belirtme çizgisi";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text [ portuguese ] = "Funções de desenho" ;
+ Text [ english_us ] = "Draw Functions" ;
+ Text [ portuguese_brazilian ] = "Zeichenfunktionen" ;
+ Text [ swedish ] = "Ritfunktioner" ;
+ Text [ danish ] = "Tegnefunktioner" ;
+ Text [ italian ] = "Funzioni di disegno" ;
+ Text [ spanish ] = "Funciones de dibujo" ;
+ Text [ french ] = "Fonctions de dessin" ;
+ Text [ dutch ] = "Tekenfuncties" ;
+ Text[ chinese_simplified ] = "»æͼ¹¦ÄÜ";
+ Text[ russian ] = "Ôóíêöèè ðèñîâàíèÿ";
+ Text[ polish ] = "Funkcje rysowania";
+ Text[ japanese ] = "}Œ`•`‰æ‹@”\\";
+ Text[ chinese_traditional ] = "ø¹Ï¥\\¯à";
+ Text[ greek ] = "Ëåéôïõñãßåò ó÷åäßáóçò";
+ Text[ korean ] = "±×¸®±â ÇÔ¼ö";
+ Text[ arabic ] = "æÙÇÆÝ ÑÓã";
+ Text[ turkish ] = "Çizim iþlevleri";
+ Text[ language_user1 ] = " ";
+};
+FloatingWindow RID_SVXTBX_ALIGNMENT
+{
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Hide = TRUE ;
+ HelpID = HID_ALIGN_TBX ;
+ SVLook = TRUE ;
+ Text = "Ausrichtung" ;
+ Text [ ENGLISH ] = "Alignment" ;
+ Text [ norwegian ] = "Alignment" ;
+ Text [ italian ] = "Allineamento" ;
+ Text [ portuguese_brazilian ] = "Alinhamento" ;
+ Text [ portuguese ] = "Alinhar" ;
+ Text [ finnish ] = "Tasaus" ;
+ Text [ danish ] = "Justering" ;
+ Text [ french ] = "Alignement" ;
+ Text [ swedish ] = "Justering" ;
+ Text [ dutch ] = "Uitlijning" ;
+ Text [ spanish ] = "Alineación" ;
+ Text [ english_us ] = "Alignment" ;
+ ToolBox TBX_ALIGNMENT
+ {
+ HelpId = HID_SVXTBX_ALIGNMENT ;
+ SVLook = TRUE ;
+ HelpID = SID_OBJECT_ALIGN ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_ALIGN_LEFT ;
+ HelpID = SID_OBJECT_ALIGN_LEFT ;
+ Text = "Links" ;
+ Text [ ENGLISH ] = "Left" ;
+ Text [ norwegian ] = "Left" ;
+ Text [ italian ] = "Sinistra" ;
+ Text [ portuguese_brazilian ] = "A Esquerda" ;
+ Text [ portuguese ] = "Esquerda" ;
+ Text [ finnish ] = "Vasen" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ french ] = "À gauche" ;
+ Text [ swedish ] = "Vänster" ;
+ Text [ dutch ] = "Links" ;
+ Text [ spanish ] = "Izquierda" ;
+ Text [ english_us ] = "Left" ;
+ Text[ chinese_simplified ] = "Ïò×ó";
+ Text[ russian ] = "Ñëåâà";
+ Text[ polish ] = "Z lewej";
+ Text[ japanese ] = "¶‘µ‚¦";
+ Text[ chinese_traditional ] = "¦V¥ª";
+ Text[ greek ] = "ÁñéóôåñÜ";
+ Text[ korean ] = "¿ÞÂÊ";
+ Text[ arabic ] = "íÓÇÑ";
+ Text[ turkish ] = "Sol";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_ALIGN_CENTER ;
+ HelpID = SID_OBJECT_ALIGN_CENTER ;
+ Text = "Zentriert" ;
+ Text [ ENGLISH ] = "Centered" ;
+ Text [ norwegian ] = "Centered" ;
+ Text [ italian ] = "Centrato" ;
+ Text [ portuguese_brazilian ] = "Centralizado" ;
+ Text [ portuguese ] = "Centrado" ;
+ Text [ finnish ] = "Keski" ;
+ Text [ danish ] = "Centreret" ;
+ Text [ french ] = "Centré" ;
+ Text [ swedish ] = "Centrerat" ;
+ Text [ dutch ] = "Gecentreerd" ;
+ Text [ spanish ] = "Centrado" ;
+ Text [ english_us ] = "Center" ;
+ Text[ chinese_simplified ] = "¾ÓÖÐ";
+ Text[ russian ] = "Ïî öåíòðó";
+ Text[ polish ] = "Wyœrodkuj";
+ Text[ japanese ] = "’†‰›‘µ‚¦";
+ Text[ chinese_traditional ] = "¸m¤¤";
+ Text[ greek ] = "ÊåíôñáñéóìÝíá";
+ Text[ korean ] = "°¡¿îµ¥";
+ Text[ arabic ] = "ÊæÓíØ";
+ Text[ turkish ] = "Ortala";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_ALIGN_RIGHT ;
+ HelpID = SID_OBJECT_ALIGN_RIGHT ;
+ Text = "Rechts" ;
+ Text [ ENGLISH ] = "Right" ;
+ Text [ norwegian ] = "Right" ;
+ Text [ italian ] = "Destra" ;
+ Text [ portuguese_brazilian ] = "A Direita" ;
+ Text [ portuguese ] = "Direita" ;
+ Text [ finnish ] = "Oikea" ;
+ Text [ danish ] = "Højre" ;
+ Text [ french ] = "À droite" ;
+ Text [ swedish ] = "Höger" ;
+ Text [ dutch ] = "Rechts" ;
+ Text [ spanish ] = "Derecha" ;
+ Text [ english_us ] = "Right" ;
+ Text[ chinese_simplified ] = "ÏòÓÒ";
+ Text[ russian ] = "Ñïðàâà";
+ Text[ polish ] = "Z prawej";
+ Text[ japanese ] = "‰E‘µ‚¦";
+ Text[ chinese_traditional ] = "¦V¥k";
+ Text[ greek ] = "ÄåîéÜ";
+ Text[ korean ] = "¿À¸¥ÂÊ";
+ Text[ arabic ] = "íãíä";
+ Text[ turkish ] = "Sað";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_ALIGN_UP ;
+ HelpID = SID_OBJECT_ALIGN_UP ;
+ Text = "Oben" ;
+ Text [ ENGLISH ] = "Top" ;
+ Text [ norwegian ] = "Top" ;
+ Text [ italian ] = "Sopra" ;
+ Text [ portuguese_brazilian ] = "Topo" ;
+ Text [ portuguese ] = "Em cima" ;
+ Text [ finnish ] = "Ylä" ;
+ Text [ danish ] = "Øverst" ;
+ Text [ french ] = "En haut" ;
+ Text [ swedish ] = "Överst" ;
+ Text [ dutch ] = "Boven" ;
+ Text [ spanish ] = "Arriba" ;
+ Text [ english_us ] = "Top" ;
+ Text[ chinese_simplified ] = "ÏòÉÏ";
+ Text[ russian ] = "Ââåðõó";
+ Text[ polish ] = "W górze";
+ Text[ japanese ] = "ã";
+ Text[ chinese_traditional ] = "¦V¤W";
+ Text[ greek ] = "ÐÜíù";
+ Text[ korean ] = "ˤ";
+ Text[ arabic ] = "ÃÚáì";
+ Text[ turkish ] = "Üst";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_ALIGN_MIDDLE ;
+ HelpID = SID_OBJECT_ALIGN_MIDDLE ;
+ Text = "Mitte" ;
+ Text [ ENGLISH ] = "Centered" ;
+ Text [ norwegian ] = "Centered" ;
+ Text [ italian ] = "Centro" ;
+ Text [ portuguese_brazilian ] = "Centralizado" ;
+ Text [ portuguese ] = "Centro" ;
+ Text [ finnish ] = "Keski" ;
+ Text [ danish ] = "Centreret" ;
+ Text [ french ] = "Milieu" ;
+ Text [ swedish ] = "Mitten" ;
+ Text [ dutch ] = "Midden" ;
+ Text [ spanish ] = "Centro" ;
+ Text [ english_us ] = "Centered" ;
+ Text[ chinese_simplified ] = "ÖÐÐÄ";
+ Text[ russian ] = "Ïî ñåðåäèíå";
+ Text[ polish ] = "Œrodek";
+ Text[ japanese ] = "’†‰›";
+ Text[ chinese_traditional ] = "¸m¤¤";
+ Text[ greek ] = "ÊÝíôñï";
+ Text[ korean ] = "°¡¿îµ¥";
+ Text[ arabic ] = "ÇáæÓØ";
+ Text[ turkish ] = "Orta";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OBJECT_ALIGN_DOWN ;
+ HelpID = SID_OBJECT_ALIGN_DOWN ;
+ Text = "Unten" ;
+ Text [ ENGLISH ] = "Bottom" ;
+ Text [ norwegian ] = "Bottom" ;
+ Text [ italian ] = "Sotto" ;
+ Text [ portuguese_brazilian ] = "Base" ;
+ Text [ portuguese ] = "Em baixo" ;
+ Text [ finnish ] = "Ala" ;
+ Text [ danish ] = "Nederst" ;
+ Text [ french ] = "En bas" ;
+ Text [ swedish ] = "Nederst" ;
+ Text [ dutch ] = "Beneden" ;
+ Text [ spanish ] = "Abajo" ;
+ Text [ english_us ] = "Bottom" ;
+ Text[ chinese_simplified ] = "ÏòÏÂ";
+ Text[ russian ] = "Âíèçó";
+ Text[ polish ] = "W dole";
+ Text[ japanese ] = "‰º";
+ Text[ chinese_traditional ] = "¦V¤U";
+ Text[ greek ] = "ÊÜôù";
+ Text[ korean ] = "¹Ù´Ú";
+ Text[ arabic ] = "ÃÓÝá";
+ Text[ turkish ] = "Alt";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "¶ÔÆë";
+ Text[ russian ] = "Âûðàâíèâàíèå";
+ Text[ polish ] = "Wyrównanie";
+ Text[ japanese ] = "”z’u";
+ Text[ chinese_traditional ] = "¹ï»ô";
+ Text[ greek ] = "Óôïß÷éóç";
+ Text[ korean ] = "¹è¿­";
+ Text[ arabic ] = "ÇáãÍÇÐÇÉ";
+ Text[ turkish ] = "Hizalama";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/tbxctrls/tbxdrctl.cxx b/svx/source/tbxctrls/tbxdrctl.cxx
new file mode 100644
index 0000000000..75e3cbf972
--- /dev/null
+++ b/svx/source/tbxctrls/tbxdrctl.cxx
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxdrctl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <string> // HACK: prevent conflict between STLPORT and Workshop headers
+
+#include <tools/ref.hxx>
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+#pragma hdrstop
+
+#include "dialmgr.hxx"
+#include "dialogs.hrc"
+
+#include "tbxctl.hxx"
+#include "tbxdraw.hxx"
+#include "tbxdraw.hrc"
+
+SFX_IMPL_TOOLBOX_CONTROL(SvxTbxCtlDraw, SfxEnumItem);
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SvxTbxCtlDraw::SvxTbxCtlDraw( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings ) :
+
+ SfxToolBoxControl( nId, rTbx, rBindings ),
+
+ nLastAction( 0 )
+
+{
+}
+
+/*************************************************************************
+|*
+|* Benachrichtigung, wenn sich der Applikationsstatus geaendert hat
+|*
+\************************************************************************/
+
+void SvxTbxCtlDraw::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ GetToolBox().EnableItem( GetId(), ( eState != SFX_ITEM_DISABLED ) );
+
+ if ( SFX_ITEM_AVAILABLE == eState )
+ {
+ USHORT nTemp = ( (SfxEnumItem*)pState )->GetValue();
+
+ if( GetId() == SID_INSERT_DRAW && nTemp != USHRT_MAX )
+ {
+ nLastAction = nTemp;
+ USHORT nImage = nLastAction ? nLastAction : GetId();
+ Image aImage = SFX_IMAGEMANAGER()->GetImage( nImage );
+ GetToolBox().SetItemImage( GetId(), aImage );
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Wenn man ein PopupWindow erzeugen will
+|*
+\************************************************************************/
+
+SfxPopupWindowType SvxTbxCtlDraw::GetPopupWindowType() const
+{
+ return( nLastAction == 0 ? SFX_POPUPWINDOW_ONCLICK : SFX_POPUPWINDOW_ONTIMEOUT);
+}
+
+/*************************************************************************
+|*
+|* Hier wird das Fenster erzeugt
+|* Lage der Toolbox mit GetToolBox() abfragbar
+|* rItemRect sind die Screen-Koordinaten
+|*
+\************************************************************************/
+
+SfxPopupWindow* SvxTbxCtlDraw::CreatePopupWindow()
+{
+ if ( GetId() == SID_INSERT_DRAW )
+ {
+ SvxPopupWindowTbxMgr* pWin =
+ new SvxPopupWindowTbxMgr( GetId(), this,
+ SVX_RES( RID_SVXTBX_DRAW ),
+ SVX_RES( TBX_DRAW ),
+ GetBindings() );
+ pWin->StartPopupMode( &GetToolBox(), TRUE );
+ pWin->StartSelection();
+ pWin->Show();
+ return pWin;
+ }
+ return NULL;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxTbxCtlDraw::Select( BOOL )
+{
+ if ( nLastAction )
+ GetBindings().GetDispatcher()->Execute( nLastAction );
+}
+
diff --git a/svx/source/unodraw/makefile.mk b/svx/source/unodraw/makefile.mk
new file mode 100644
index 0000000000..cd087bb8b4
--- /dev/null
+++ b/svx/source/unodraw/makefile.mk
@@ -0,0 +1,127 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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=svx
+TARGET=unodraw
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+CXXFILES = \
+ unoipset.cxx \
+ unoshape.cxx \
+ unoshap2.cxx \
+ unoshap3.cxx \
+ unopage.cxx \
+ unoshtxt.cxx \
+ unoshcol.cxx \
+ unoprov.cxx \
+ unomod.cxx \
+ unonrule.cxx \
+ unofdesc.cxx \
+ unoctabl.cxx \
+ unomlstr.cxx \
+ unogtabl.cxx \
+ unohtabl.cxx \
+ unobtabl.cxx \
+ unottabl.cxx \
+ unomtabl.cxx \
+ unodtabl.cxx
+
+SLOFILES = \
+ $(SLO)$/unoshape.obj \
+ $(SLO)$/unoipset.obj \
+ $(SLO)$/unoctabl.obj \
+ $(SLO)$/unoshap2.obj \
+ $(SLO)$/unoshap3.obj \
+ $(SLO)$/unopage.obj \
+ $(SLO)$/unoshtxt.obj \
+ $(SLO)$/unoshcol.obj \
+ $(SLO)$/unoprov.obj \
+ $(SLO)$/unomod.obj \
+ $(SLO)$/unonrule.obj \
+ $(SLO)$/unofdesc.obj \
+ $(SLO)$/unomlstr.obj \
+ $(SLO)$/unogtabl.obj \
+ $(SLO)$/unohtabl.obj \
+ $(SLO)$/unobtabl.obj \
+ $(SLO)$/unottabl.obj \
+ $(SLO)$/unomtabl.obj \
+ $(SLO)$/unodtabl.obj
+
+SRSNAME=unodraw
+SRCFILES = \
+ unodraw.src
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/unodraw/unobtabl.cxx b/svx/source/unodraw/unobtabl.cxx
new file mode 100644
index 0000000000..8e6fc44d9f
--- /dev/null
+++ b/svx/source/unodraw/unobtabl.cxx
@@ -0,0 +1,352 @@
+/*************************************************************************
+ *
+ * $RCSfile: unobtabl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XBITMAP_HPP_
+#include <com/sun/star/awt/XBitmap.hpp>
+#endif
+
+#include <cppuhelper/implbase2.hxx>
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+#ifndef _SVX_XIT_HXX
+#include <xit.hxx>
+#endif
+#include "xbtmpit.hxx"
+#include "svdmodel.hxx"
+#include "xdef.hxx"
+#include "xflhtit.hxx"
+#include "unoapi.hxx"
+#include "impgrf.hxx"
+#include "unomid.hxx"
+#include "unoprnms.hxx"
+
+#ifndef _LIST_HXX
+#include<tools/list.hxx>
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+DECLARE_LIST( ItemSetArray_Impl, SfxItemSet* )
+
+class SvxUnoBitmapTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >
+{
+private:
+ XBitmapList* mpBitmapList;
+ SdrModel* mpModel;
+ SfxItemPool* mpPool;
+
+ ItemSetArray_Impl aItemSetArray;
+
+ void CreateName( OUString& rStrName );
+
+public:
+ SvxUnoBitmapTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoBitmapTable() throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ static OUString getImplementationName_Static() throw()
+ {
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.SvxUnoBitmapTable"));
+ }
+
+ static uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw();
+
+ // XNameContainer
+ virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const OUString& Name ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameReplace
+ virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameAccess
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw( uno::RuntimeException);
+};
+
+SvxUnoBitmapTable::SvxUnoBitmapTable( SdrModel* pModel ) throw()
+: mpModel( pModel ),
+ mpBitmapList( pModel ? pModel->GetBitmapList() : NULL ),
+ mpPool( pModel ? &pModel->GetItemPool() : (SfxItemPool*)NULL )
+{
+}
+
+SvxUnoBitmapTable::~SvxUnoBitmapTable() throw()
+{
+ for( int i = 0; i<aItemSetArray.Count(); i++ )
+ delete (SfxItemSet*)aItemSetArray.GetObject( i );
+}
+
+sal_Bool SAL_CALL SvxUnoBitmapTable::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSNL( getSupportedServiceNames() );
+ const OUString * pArray = aSNL.getConstArray();
+
+ for( INT32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return TRUE;
+
+ return FALSE;
+}
+
+OUString SAL_CALL SvxUnoBitmapTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoBitmapTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoBitmapTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+uno::Sequence< OUString > SvxUnoBitmapTable::getSupportedServiceNames_Static(void) throw()
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.BitmapTable" ));
+ return aSNS;
+}
+
+// XNameContainer
+void SAL_CALL SvxUnoBitmapTable::insertByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ if( hasByName( aName ) )
+ throw container::ElementExistException();
+
+ SfxItemSet* mpInSet = new SfxItemSet( *mpPool, XATTR_FILLBITMAP, XATTR_FILLBITMAP );
+ aItemSetArray.Insert( mpInSet );//, aItemSetArray.Count() );
+
+ XFillBitmapItem aBitmap;
+ aBitmap.SetName( String( aName ) );
+
+ if(!aBitmap.PutValue( aElement, MID_GRAFURL ))
+ throw lang::IllegalArgumentException();
+
+ mpInSet->Put( aBitmap, XATTR_FILLBITMAP );
+}
+
+void SAL_CALL SvxUnoBitmapTable::removeByName( const OUString& Name )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoBitmapTable::replaceByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+}
+
+// XNameAccess
+uno::Any SAL_CALL SvxUnoBitmapTable::getByName( const OUString& aName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpPool )
+ {
+ const String aSearchName( aName );
+ const USHORT nCount = mpPool->GetItemCount( XATTR_FILLBITMAP );
+ const XFillBitmapItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillBitmapItem*)mpPool->GetItem( XATTR_FILLBITMAP, nSurrogate );
+
+ if( pItem && ( pItem->GetName() == aSearchName ) )
+ {
+ uno::Any aAny;
+ pItem->QueryValue( aAny, MID_GRAFURL );
+ return aAny;
+ }
+ }
+ }
+ throw container::NoSuchElementException();
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoBitmapTable::getElementNames( )
+ throw( uno::RuntimeException )
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount( XATTR_FILLBITMAP ) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ XFillBitmapItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillBitmapItem*)mpPool->GetItem( XATTR_FILLBITMAP, nSurrogate );
+
+ if( pItem )
+ {
+ pStrings[nSurrogate] = pItem->GetName();
+
+ if( !pStrings[nSurrogate].getLength() )
+ {
+ CreateName( pStrings[nSurrogate] );
+ pItem->SetName( String( pStrings[nSurrogate] ) );
+ }
+ }
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoBitmapTable::hasByName( const OUString& aName )
+ throw( uno::RuntimeException )
+{
+ const String aSearchName( aName );
+ const USHORT nCount = mpPool ? mpPool->GetItemCount( XATTR_FILLBITMAP ) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ const XFillBitmapItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillBitmapItem*)mpPool->GetItem( XATTR_FILLBITMAP, nSurrogate );
+ if( pItem && pItem->GetName() == aSearchName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoBitmapTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType( (const ::rtl::OUString*)0 );
+}
+
+
+sal_Bool SAL_CALL SvxUnoBitmapTable::hasElements( )
+ throw( uno::RuntimeException )
+{
+ return mpPool && mpPool->GetItemCount( XATTR_FILLBITMAP ) != 0;
+}
+
+void SvxUnoBitmapTable::CreateName( OUString& rStrName)
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_FILLGRADIENT) : 0;
+ sal_Bool bFound = sal_True;
+
+ for( sal_Int32 nPostfix = 1; nPostfix<= nCount && bFound; nPostfix++ )
+ {
+ rStrName = OUString::createFromAscii( "Standard " );
+ rStrName += OUString::valueOf( nPostfix );
+ bFound = hasByName( rStrName );
+ }
+}
+
+/**
+ * Create a hatchtable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoBitmapTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoBitmapTable(pModel);
+}
+
+/** returns a GraphicObject for this URL */
+GraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw()
+{
+ if( 0 == rURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX) ) )
+ {
+ // graphic manager url
+ ByteString aUniqueID( String(rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 )), RTL_TEXTENCODING_UTF8 );
+ return GraphicObject( aUniqueID );
+ }
+ else
+ {
+ Graphic aGraphic;
+ GraphicFilter* pFilter = GetGrfFilter();
+
+ if( pFilter->ImportGraphic( aGraphic, INetURLObject( rURL, INET_PROT_FILE ) ) == GRFILTER_OK )
+ {
+ // ok
+ }
+
+ return GraphicObject( aGraphic );
+ }
+}
+
+
diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx
new file mode 100644
index 0000000000..3ba7c32cc9
--- /dev/null
+++ b/svx/source/unodraw/unoctabl.cxx
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoctabl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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_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 _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+
+#include <cppuhelper/implbase2.hxx>
+
+#include "xtable.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+class SvxUnoColorTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >
+{
+private:
+ XColorTable* pTable;
+
+public:
+ SvxUnoColorTable() throw();
+ virtual ~SvxUnoColorTable() throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ static OUString getImplementationName_Static() throw()
+ {
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.SvxUnoColorTable"));
+ }
+
+ static uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw();
+
+ // XNameContainer
+ virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const OUString& Name ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameReplace
+ virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameAccess
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw( uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw( uno::RuntimeException);
+};
+
+SvxUnoColorTable::SvxUnoColorTable() throw()
+{
+ SfxIniManager* pIniMan = SfxIniManager::Get();
+ if( pIniMan )
+ {
+ pTable = new XColorTable( pIniMan->Get( SFX_KEY_PALETTE_PATH ) );
+ }
+ else
+ {
+ pTable = NULL;
+ }
+}
+
+SvxUnoColorTable::~SvxUnoColorTable() throw()
+{
+ delete pTable;
+}
+
+sal_Bool SAL_CALL SvxUnoColorTable::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSNL( getSupportedServiceNames() );
+ const OUString * pArray = aSNL.getConstArray();
+
+ for( INT32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return TRUE;
+
+ return FALSE;
+}
+
+OUString SAL_CALL SvxUnoColorTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoColorTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+uno::Sequence< OUString > SvxUnoColorTable::getSupportedServiceNames_Static(void) throw()
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ColorTable" ));
+ return aSNS;
+}
+
+// XNameContainer
+void SAL_CALL SvxUnoColorTable::insertByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ if( hasByName( aName ) )
+ throw container::ElementExistException();
+
+ INT32 nColor;
+ if( aElement >>= nColor )
+ throw lang::IllegalArgumentException();
+
+ if( pTable )
+ {
+ XColorEntry* pEntry = new XColorEntry( Color( (ColorData)nColor ), aName );
+ pTable->Insert( pTable->Count(), pEntry );
+ }
+}
+
+void SAL_CALL SvxUnoColorTable::removeByName( const OUString& Name )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( Name ) : -1;
+ if( nIndex == -1 )
+ throw container::NoSuchElementException();
+
+ pTable->Remove( nIndex );
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ INT32 nColor;
+ if( aElement >>= nColor )
+ throw lang::IllegalArgumentException();
+
+ long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( aName ) : -1;
+ if( nIndex == -1 )
+ throw container::NoSuchElementException();
+
+ XColorEntry* pEntry = new XColorEntry( Color( (ColorData)nColor ), aName );
+ delete pTable->Replace( nIndex, pEntry );
+}
+
+// XNameAccess
+uno::Any SAL_CALL SvxUnoColorTable::getByName( const OUString& aName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( aName ) : -1;
+ if( nIndex == -1 )
+ throw container::NoSuchElementException();
+
+ XColorEntry* pEntry = pTable->Get( nIndex );
+ uno::Any aAny;
+ aAny <<= (sal_Int32) pEntry->GetColor().GetRGBColor();
+ return aAny;
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getElementNames( )
+ throw( uno::RuntimeException )
+{
+ const long nCount = pTable ? pTable->Count() : 0;
+
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+
+ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ XColorEntry* pEntry = pTable->Get( nIndex );
+ pStrings[nIndex] = pEntry->GetName();
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoColorTable::hasByName( const OUString& aName )
+ throw( uno::RuntimeException )
+{
+ long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( aName ) : -1;
+ return nIndex != -1;
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoColorTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const sal_Int32*)0);
+}
+
+sal_Bool SAL_CALL SvxUnoColorTable::hasElements( )
+ throw( uno::RuntimeException )
+{
+ return pTable && pTable->Count() != 0;
+}
+
+/**
+ * Create a colortable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoColorTable_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr) throw(uno::Exception)
+{
+ return *new SvxUnoColorTable();
+}
+
+//
+// export this service
+//
+
+#ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HPP_
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#endif
+
+#ifndef _OSL_DIAGNOSE_H_
+#include <osl/diagnose.h>
+#endif
+
+#include <cppuhelper/factory.hxx>
+#include <uno/lbnames.h>
+
+extern "C"
+{
+
+void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
+sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey )
+{
+ if( pRegistryKey )
+ {
+ try
+ {
+ uno::Reference< registry::XRegistryKey > xNewKey(
+ reinterpret_cast< registry::XRegistryKey * >( pRegistryKey )->createKey(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + SvxUnoColorTable::getImplementationName_Static() + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) );
+
+ uno::Sequence< OUString > aServices = SvxUnoColorTable::getSupportedServiceNames_Static();
+ for( INT32 i = 0; i < aServices.getLength(); i++ )
+ xNewKey->createKey( aServices.getConstArray()[i]);
+ }
+ catch (registry::InvalidRegistryException &)
+ {
+ OSL_ENSHURE( sal_False, "### InvalidRegistryException!" );
+ }
+ }
+
+ return True;
+}
+
+void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
+{
+ void * pRet = 0;
+ if( pServiceManager && rtl_str_compare( pImplName, "stardiv.one.drawing.SvxUnoColorTable" ) )
+ {
+ uno::Reference< lang::XSingleServiceFactory > xFactory( createOneInstanceFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
+ SvxUnoColorTable::getImplementationName_Static(),
+ SvxUnoColorTable_createInstance,
+ SvxUnoColorTable::getSupportedServiceNames_Static() ) );
+
+ if( xFactory.is())
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
+ }
+
+ return pRet;
+}
+
+}
+
+
diff --git a/svx/source/unodraw/unodraw.src b/svx/source/unodraw/unodraw.src
new file mode 100644
index 0000000000..c561d4f994
--- /dev/null
+++ b/svx/source/unodraw/unodraw.src
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: unodraw.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <dialogs.hrc>
+
+Bitmap RID_UNODRAW_OBJECTS
+{
+ File = "objects.bmp" ;
+};
+Bitmap RID_UNODRAW_OLE2
+{
+ File = "ole.bmp" ;
+};
+Bitmap RID_UNODRAW_GRAPHICS
+{
+ File = "graphic.bmp" ;
+};
+
diff --git a/svx/source/unodraw/unodtabl.cxx b/svx/source/unodraw/unodtabl.cxx
new file mode 100644
index 0000000000..4401f4a5d5
--- /dev/null
+++ b/svx/source/unodraw/unodtabl.cxx
@@ -0,0 +1,343 @@
+/*************************************************************************
+ *
+ * $RCSfile: unodtabl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_LINEDASH_HPP_
+#include <com/sun/star/drawing/LineDash.hpp>
+#endif
+
+#include <cppuhelper/implbase2.hxx>
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _LIST_HXX
+#include<tools/list.hxx>
+#endif
+
+#include "xdash.hxx"
+#include "svdmodel.hxx"
+#include "xdef.hxx"
+#include "xlndsit.hxx"
+//#include "xflgrit.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+DECLARE_LIST( ItemSetArray_Impl, SfxItemSet* )
+
+class SvxUnoDashTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >
+{
+private:
+ XGradientList* mpGradientList;
+ SdrModel* mpModel;
+ SfxItemPool* mpPool;
+
+ ItemSetArray_Impl aItemSetArray;
+
+ void CreateName( OUString& rStrName);
+
+public:
+ SvxUnoDashTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoDashTable() throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ static OUString getImplementationName_Static() throw()
+ {
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.SvxUnoDashTable"));
+ }
+
+ static uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw();
+
+
+ // XNameContainer
+ virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const OUString& Name ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameReplace
+ virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameAccess
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw( uno::RuntimeException);
+};
+
+SvxUnoDashTable::SvxUnoDashTable( SdrModel* pModel ) throw()
+: mpModel( pModel ),
+ mpGradientList( pModel ? pModel->GetGradientList() : NULL ),
+ mpPool( pModel ? &pModel->GetItemPool() : (SfxItemPool*)NULL )
+{
+}
+
+SvxUnoDashTable::~SvxUnoDashTable() throw()
+{
+ for( int i = 0; i<aItemSetArray.Count(); i++ )
+ delete (SfxItemSet*)aItemSetArray.GetObject( i );
+}
+
+sal_Bool SAL_CALL SvxUnoDashTable::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSNL( getSupportedServiceNames() );
+ const OUString * pArray = aSNL.getConstArray();
+
+ for( INT32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return TRUE;
+
+ return FALSE;
+}
+
+OUString SAL_CALL SvxUnoDashTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoDashTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoDashTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+uno::Sequence< OUString > SvxUnoDashTable::getSupportedServiceNames_Static(void) throw()
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DashTable" ));
+ return aSNS;
+}
+
+
+// XNameContainer
+void SAL_CALL SvxUnoDashTable::insertByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ SfxItemSet* mpInSet = new SfxItemSet( *mpPool, XATTR_LINEDASH, XATTR_LINEDASH );
+ aItemSetArray.Insert( mpInSet );//, aItemSetArray.Count() );
+
+ XLineDashItem aLineDash;
+ aLineDash.SetName( String( aName ) );
+ aLineDash.PutValue( aElement );
+
+ mpInSet->Put( aLineDash, XATTR_LINEDASH );
+}
+
+
+
+void SAL_CALL SvxUnoDashTable::removeByName( const OUString& Name )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ /* Currently, don't know how to do this ?
+ long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( Name ) : -1;
+ if( nIndex == -1 )
+ throw container::NoSuchElementException();
+
+ pTable->Remove( nIndex );
+ */
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoDashTable::replaceByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ /* Currently, don't know how to do this ?
+ INT32 nColor;
+ if( aElement >>= nColor )
+ throw lang::IllegalArgumentException();
+
+ long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( aName ) : -1;
+ if( nIndex == -1 )
+ throw container::NoSuchElementException();
+
+ XColorEntry* pEntry = new XColorEntry( Color( (ColorData)nColor ), aName );
+ delete pTable->Replace( nIndex, pEntry );
+ */
+}
+
+// XNameAccess
+uno::Any SAL_CALL SvxUnoDashTable::getByName( const OUString& aName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpPool )
+ {
+ const String aSearchName( aName );
+ const USHORT nCount = mpPool->GetItemCount(XATTR_LINEDASH);
+ const XLineDashItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XLineDashItem*)mpPool->GetItem(XATTR_LINEDASH, nSurrogate);
+
+ if( pItem && ( pItem->GetName() == aSearchName ) )
+ {
+ uno::Any aAny;
+ pItem->QueryValue( aAny );
+ return aAny;
+ }
+ }
+ }
+
+ throw container::NoSuchElementException();
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoDashTable::getElementNames( )
+ throw( uno::RuntimeException )
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_LINEDASH) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ XLineDashItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XLineDashItem*)mpPool->GetItem(XATTR_LINEDASH, nSurrogate);
+
+ if( pItem )
+ {
+ pStrings[nSurrogate] = pItem->GetName();
+
+ if( !pStrings[nSurrogate].getLength() )
+ {
+ CreateName( pStrings[nSurrogate] );
+ pItem->SetName( String( pStrings[nSurrogate] ) );
+ }
+ }
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoDashTable::hasByName( const OUString& aName )
+ throw( uno::RuntimeException )
+{
+ const String aSearchName( aName );
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_LINEDASH) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ const XLineDashItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XLineDashItem*)mpPool->GetItem(XATTR_LINEDASH, nSurrogate);
+ if( pItem && pItem->GetName() == aSearchName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoDashTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const struct drawing::LineDash*)0);
+}
+
+sal_Bool SAL_CALL SvxUnoDashTable::hasElements( )
+ throw( uno::RuntimeException )
+{
+ return mpPool && mpPool->GetItemCount(XATTR_LINEDASH) != 0;
+}
+
+void SvxUnoDashTable::CreateName( OUString& rStrName)
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_LINEDASH) : 0;
+ sal_Bool bFound = sal_True;
+
+ for( sal_Int32 nPostfix = 1; nPostfix<= nCount && bFound; nPostfix++ )
+ {
+ rStrName = OUString::createFromAscii( "Standard " );
+ rStrName += OUString::valueOf( nPostfix );
+ bFound = hasByName( rStrName );
+ }
+}
+
+/**
+ * Create a gradienttable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoDashTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoDashTable(pModel);
+}
+
+
+
diff --git a/svx/source/unodraw/unofdesc.cxx b/svx/source/unodraw/unofdesc.cxx
new file mode 100644
index 0000000000..f374af0635
--- /dev/null
+++ b/svx/source/unodraw/unofdesc.cxx
@@ -0,0 +1,332 @@
+/*************************************************************************
+ *
+ * $RCSfile: unofdesc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "eeitem.hxx"
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _TOOLKIT_HELPRE_VCLUNOHELPER_HXX_
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+
+#define ITEMID_FONT EE_CHAR_FONTINFO
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include <fontitem.hxx>
+#endif
+
+#define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT
+#ifndef _SVX_FHGTITEM_HXX //autoge
+#include <fhgtitem.hxx>
+#endif
+
+#define ITEMID_POSTURE EE_CHAR_ITALIC
+#ifndef _SVX_POSTITEM_HXX //autogen
+#include <postitem.hxx>
+#endif
+
+#define ITEMID_UNDERLINE EE_CHAR_UNDERLINE
+#ifndef _SVX_UDLNITEM_HXX //autogen
+#include <udlnitem.hxx>
+#endif
+
+#define ITEMID_WEIGHT EE_CHAR_WEIGHT
+#ifndef _SVX_WGHTITEM_HXX //autogen
+#include <wghtitem.hxx>
+#endif
+
+#define ITEMID_CROSSEDOUT EE_CHAR_STRIKEOUT
+#ifndef _SVX_CRSDITEM_HXX //autog
+#include <crsditem.hxx>
+#endif
+
+#define ITEMID_WORDLINEMODE EE_CHAR_WLM
+#ifndef _SVX_WRLMITEM_HXX //aut
+#include <wrlmitem.hxx>
+#endif
+
+#ifndef _SVX_UNOMID_HXX //autogen
+#include <unomid.hxx>
+#endif
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+
+#include "unofdesc.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+
+void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, Font& rFont )
+{
+ rFont.SetName( rDesc.Name );
+ rFont.SetStyleName( rDesc.StyleName );
+ rFont.SetSize( Size( rDesc.Width, rDesc.Height ) );
+ rFont.SetFamily( (FontFamily)rDesc.Family );
+ rFont.SetCharSet( (CharSet)rDesc.CharSet );
+ rFont.SetPitch( (FontPitch)rDesc.Pitch );
+ rFont.SetOrientation( (short)(rDesc.Orientation*10) );
+ rFont.SetKerning( rDesc.Kerning );
+ rFont.SetWeight( VCLUnoHelper::ConvertFontWeight(rDesc.Weight) );
+ rFont.SetItalic( (FontItalic)rDesc.Slant );
+ rFont.SetUnderline( (FontUnderline)rDesc.Underline );
+ rFont.SetStrikeout( (FontStrikeout)rDesc.Strikeout );
+ rFont.SetWordLineMode( rDesc.WordLineMode );
+}
+
+void SvxUnoFontDescriptor::ConvertFromFont( const Font& rFont, awt::FontDescriptor& rDesc )
+{
+ rDesc.Name = rFont.GetName();
+ rDesc.StyleName = rFont.GetStyleName();
+ rDesc.Width = rFont.GetSize().Width();
+ rDesc.Height = rFont.GetSize().Height();
+ rDesc.Family = rFont.GetFamily();
+ rDesc.CharSet = rFont.GetCharSet();
+ rDesc.Pitch = rFont.GetPitch();
+ rDesc.Orientation = rFont.GetOrientation() / 10;
+ rDesc.Kerning = rFont.IsKerning();
+ rDesc.Weight = VCLUnoHelper::ConvertFontWeight( rFont.GetWeight() );
+ rDesc.Slant = (awt::FontSlant)rFont.GetItalic();
+ rDesc.Underline = rFont.GetUnderline();
+ rDesc.Strikeout = rFont.GetStrikeout();
+ rDesc.WordLineMode = rFont.IsWordLineMode();
+}
+
+void SvxUnoFontDescriptor::FillItemSet( const awt::FontDescriptor& rDesc, SfxItemSet& rSet )
+{
+ uno::Any aTemp;
+
+ {
+ SvxFontItem aFontItem( EE_CHAR_FONTINFO );
+ aFontItem.GetFamilyName()= rDesc.Name;
+ aFontItem.GetStyleName() = rDesc.StyleName;
+ aFontItem.GetFamily() = (FontFamily)rDesc.Family;
+ aFontItem.GetCharSet() = rDesc.CharSet;
+ aFontItem.GetPitch() = (FontPitch)rDesc.Pitch;
+ rSet.Put(aFontItem);
+ }
+
+ {
+ SvxFontHeightItem aFontHeightItem( 0, 100, EE_CHAR_FONTHEIGHT );
+ aTemp <<= (float)rDesc.Height;
+ ((SfxPoolItem*)&aFontHeightItem)->PutValue( aTemp, MID_FONTHEIGHT|CONVERT_TWIPS );
+ rSet.Put(aFontHeightItem);
+ }
+
+ {
+ SvxPostureItem aPostureItem( (FontItalic)0, EE_CHAR_ITALIC );
+ aTemp <<= rDesc.Slant;
+ ((SfxPoolItem*)&aPostureItem)->PutValue( aTemp, MID_POSTURE );
+ rSet.Put(aPostureItem);
+ }
+
+ {
+ SvxUnderlineItem aUnderlineItem( (FontUnderline)0, EE_CHAR_UNDERLINE );
+ aTemp <<= (sal_Int16)rDesc.Underline;
+ ((SfxPoolItem*)&aUnderlineItem)->PutValue( aTemp, MID_UNDERLINE );
+ rSet.Put( aUnderlineItem );
+ }
+
+ {
+ SvxWeightItem aWeightItem( (FontWeight)0, EE_CHAR_WEIGHT );
+ aTemp <<= rDesc.Weight;
+ ((SfxPoolItem*)&aWeightItem)->PutValue( aTemp, MID_WEIGHT );
+ rSet.Put( aWeightItem );
+ }
+
+ {
+ SvxCrossedOutItem aCrossedOutItem( (FontStrikeout)0, EE_CHAR_STRIKEOUT );
+ aTemp <<= rDesc.Strikeout;
+ ((SfxPoolItem*)&aCrossedOutItem)->PutValue( aTemp, MID_CROSS_OUT );
+ rSet.Put( aCrossedOutItem );
+ }
+
+ {
+ SvxWordLineModeItem aWLMItem( rDesc.WordLineMode, EE_CHAR_WLM );
+ rSet.Put( aWLMItem );
+ }
+}
+
+void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDescriptor& rDesc )
+{
+ const SfxPoolItem* pItem = NULL;
+ {
+ SvxFontItem* pFontItem = (SvxFontItem*)&rSet.Get( EE_CHAR_FONTINFO, TRUE );
+ rDesc.Name = pFontItem->GetFamilyName();
+ rDesc.StyleName = pFontItem->GetStyleName();
+ rDesc.Family = pFontItem->GetFamily();
+ rDesc.CharSet = pFontItem->GetCharSet();
+ rDesc.Pitch = pFontItem->GetPitch();
+ }
+ {
+ pItem = &rSet.Get( EE_CHAR_FONTHEIGHT, TRUE );
+ uno::Any aHeight;
+ if( pItem->QueryValue( aHeight, MID_FONTHEIGHT ) )
+ aHeight >>= rDesc.Height;
+ }
+ {
+ pItem = &rSet.Get( EE_CHAR_ITALIC, TRUE );
+ uno::Any aFontSlant;
+ if(pItem->QueryValue( aFontSlant, MID_POSTURE ))
+ aFontSlant >>= rDesc.Slant;
+ }
+ {
+ pItem = &rSet.Get( EE_CHAR_UNDERLINE, TRUE );
+ uno::Any aUnderline;
+ if(pItem->QueryValue( aUnderline, MID_UNDERLINE ))
+ aUnderline >>= rDesc.Underline;
+ }
+ {
+ pItem = &rSet.Get( EE_CHAR_WEIGHT, TRUE );
+ uno::Any aWeight;
+ if(pItem->QueryValue( aWeight, MID_WEIGHT ))
+ aWeight >>= rDesc.Weight;
+ }
+ {
+ pItem = &rSet.Get( EE_CHAR_STRIKEOUT, TRUE );
+ uno::Any aStrikeOut;
+ if(pItem->QueryValue( aStrikeOut, MID_CROSS_OUT ))
+ aStrikeOut >>= rDesc.Strikeout;
+ }
+ {
+ SvxWordLineModeItem* pWLMItem = (SvxWordLineModeItem*)&rSet.Get( EE_CHAR_WLM, TRUE );
+ rDesc.WordLineMode = pWLMItem->GetValue();
+ }
+}
+
+#define CheckState( state ) \
+ switch( state ) \
+ { \
+ case SFX_ITEM_DONTCARE: \
+ case SFX_ITEM_DISABLED: \
+ return beans::PropertyState_AMBIGUOUS_VALUE; \
+ case SFX_ITEM_READONLY: \
+ case SFX_ITEM_SET: \
+ return beans::PropertyState_DIRECT_VALUE; \
+ }
+
+beans::PropertyState SvxUnoFontDescriptor::getPropertyState( const SfxItemSet& rSet )
+{
+ CheckState(rSet.GetItemState( EE_CHAR_FONTINFO, FALSE ));
+ CheckState(rSet.GetItemState( EE_CHAR_FONTHEIGHT, FALSE ));
+ CheckState(rSet.GetItemState( EE_CHAR_ITALIC, FALSE ));
+ CheckState(rSet.GetItemState( EE_CHAR_UNDERLINE, FALSE ));
+ CheckState(rSet.GetItemState( EE_CHAR_WEIGHT, FALSE ));
+ CheckState(rSet.GetItemState( EE_CHAR_STRIKEOUT, FALSE ));
+ CheckState(rSet.GetItemState( EE_CHAR_WLM, FALSE ));
+
+ return beans::PropertyState_DEFAULT_VALUE;
+}
+
+void SvxUnoFontDescriptor::setPropertyToDefault( SfxItemSet& rSet )
+{
+ rSet.InvalidateItem( EE_CHAR_FONTINFO );
+ rSet.InvalidateItem( EE_CHAR_FONTHEIGHT );
+ rSet.InvalidateItem( EE_CHAR_ITALIC );
+ rSet.InvalidateItem( EE_CHAR_UNDERLINE );
+ rSet.InvalidateItem( EE_CHAR_WEIGHT );
+ rSet.InvalidateItem( EE_CHAR_STRIKEOUT );
+ rSet.InvalidateItem( EE_CHAR_WLM );
+}
+
+uno::Any SvxUnoFontDescriptor::getPropertyDefault( SfxItemPool* pPool )
+{
+ SfxItemSet aSet( *pPool, EE_CHAR_FONTINFO, EE_CHAR_FONTINFO,
+ EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT,
+ EE_CHAR_ITALIC, EE_CHAR_ITALIC,
+ EE_CHAR_UNDERLINE, EE_CHAR_UNDERLINE,
+ EE_CHAR_WEIGHT, EE_CHAR_WEIGHT,
+ EE_CHAR_STRIKEOUT, EE_CHAR_STRIKEOUT,
+ EE_CHAR_WLM, EE_CHAR_WLM, 0 );
+
+ uno::Any aAny;
+
+ if(!pPool->IsWhich(EE_CHAR_FONTINFO)||
+ !pPool->IsWhich(EE_CHAR_FONTHEIGHT)||
+ !pPool->IsWhich(EE_CHAR_ITALIC)||
+ !pPool->IsWhich(EE_CHAR_UNDERLINE)||
+ !pPool->IsWhich(EE_CHAR_WEIGHT)||
+ !pPool->IsWhich(EE_CHAR_STRIKEOUT)||
+ !pPool->IsWhich(EE_CHAR_WLM))
+ return aAny;
+
+ aSet.Put(pPool->GetDefaultItem(EE_CHAR_FONTINFO));
+ aSet.Put(pPool->GetDefaultItem(EE_CHAR_FONTHEIGHT));
+ aSet.Put(pPool->GetDefaultItem(EE_CHAR_ITALIC));
+ aSet.Put(pPool->GetDefaultItem(EE_CHAR_UNDERLINE));
+ aSet.Put(pPool->GetDefaultItem(EE_CHAR_WEIGHT));
+ aSet.Put(pPool->GetDefaultItem(EE_CHAR_STRIKEOUT));
+ aSet.Put(pPool->GetDefaultItem(EE_CHAR_WLM));
+
+ awt::FontDescriptor aDesc;
+
+ FillFromItemSet( aSet, aDesc );
+
+ aAny <<= aDesc;
+
+ return aAny;
+}
+
+
+
diff --git a/svx/source/unodraw/unogtabl.cxx b/svx/source/unodraw/unogtabl.cxx
new file mode 100644
index 0000000000..08f6dd23b4
--- /dev/null
+++ b/svx/source/unodraw/unogtabl.cxx
@@ -0,0 +1,342 @@
+/*************************************************************************
+ *
+ * $RCSfile: unogtabl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_
+#include <com/sun/star/awt/Gradient.hpp>
+#endif
+
+#include <cppuhelper/implbase2.hxx>
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _LIST_HXX
+#include<tools/list.hxx>
+#endif
+
+#include "xgrad.hxx"
+#include "svdmodel.hxx"
+#include "xdef.hxx"
+#include "xflgrit.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+DECLARE_LIST( ItemSetArray_Impl, SfxItemSet* )
+
+class SvxUnoGradientTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >
+{
+private:
+ XGradientList* mpGradientList;
+ SdrModel* mpModel;
+ SfxItemPool* mpPool;
+
+ ItemSetArray_Impl aItemSetArray;
+
+ void CreateName( OUString& rStrName);
+
+public:
+ SvxUnoGradientTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoGradientTable() throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ static OUString getImplementationName_Static() throw()
+ {
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.SvxUnoGradientTable"));
+ }
+
+ static uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw();
+
+
+ // XNameContainer
+ virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const OUString& Name ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameReplace
+ virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameAccess
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw( uno::RuntimeException);
+};
+
+SvxUnoGradientTable::SvxUnoGradientTable( SdrModel* pModel ) throw()
+: mpModel( pModel ),
+ mpGradientList( pModel ? pModel->GetGradientList() : NULL ),
+ mpPool( pModel ? &pModel->GetItemPool() : (SfxItemPool*)NULL )
+{
+}
+
+SvxUnoGradientTable::~SvxUnoGradientTable() throw()
+{
+ for( int i = 0; i<aItemSetArray.Count(); i++ )
+ delete (SfxItemSet*)aItemSetArray.GetObject( i );
+}
+
+sal_Bool SAL_CALL SvxUnoGradientTable::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSNL( getSupportedServiceNames() );
+ const OUString * pArray = aSNL.getConstArray();
+
+ for( INT32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return TRUE;
+
+ return FALSE;
+}
+
+OUString SAL_CALL SvxUnoGradientTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoGradientTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoGradientTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+uno::Sequence< OUString > SvxUnoGradientTable::getSupportedServiceNames_Static(void) throw()
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GradientTable" ));
+ return aSNS;
+}
+
+
+// XNameContainer
+void SAL_CALL SvxUnoGradientTable::insertByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ SfxItemSet* mpInSet = new SfxItemSet( *mpPool, XATTR_FILLGRADIENT, XATTR_FILLGRADIENT );
+ aItemSetArray.Insert( mpInSet );//, aItemSetArray.Count() );
+
+ XFillGradientItem aGradient;
+ aGradient.SetName( String( aName ) );
+ aGradient.PutValue( aElement );
+
+ mpInSet->Put( aGradient, XATTR_FILLGRADIENT );
+}
+
+
+
+void SAL_CALL SvxUnoGradientTable::removeByName( const OUString& Name )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ /* Currently, don't know how to do this ?
+ long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( Name ) : -1;
+ if( nIndex == -1 )
+ throw container::NoSuchElementException();
+
+ pTable->Remove( nIndex );
+ */
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoGradientTable::replaceByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ /* Currently, don't know how to do this ?
+ INT32 nColor;
+ if( aElement >>= nColor )
+ throw lang::IllegalArgumentException();
+
+ long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( aName ) : -1;
+ if( nIndex == -1 )
+ throw container::NoSuchElementException();
+
+ XColorEntry* pEntry = new XColorEntry( Color( (ColorData)nColor ), aName );
+ delete pTable->Replace( nIndex, pEntry );
+ */
+}
+
+// XNameAccess
+uno::Any SAL_CALL SvxUnoGradientTable::getByName( const OUString& aName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpPool )
+ {
+ const String aSearchName( aName );
+ const USHORT nCount = mpPool->GetItemCount(XATTR_FILLGRADIENT);
+ const XFillGradientItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillGradientItem*)mpPool->GetItem(XATTR_FILLGRADIENT, nSurrogate);
+
+ if( pItem && ( pItem->GetName() == aSearchName ) )
+ {
+ uno::Any aAny;
+ pItem->QueryValue( aAny );
+ return aAny;
+ }
+ }
+ }
+
+ throw container::NoSuchElementException();
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoGradientTable::getElementNames( )
+ throw( uno::RuntimeException )
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_FILLGRADIENT) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ XFillGradientItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillGradientItem*)mpPool->GetItem(XATTR_FILLGRADIENT, nSurrogate);
+
+ if( pItem )
+ {
+ pStrings[nSurrogate] = pItem->GetName();
+
+ if( !pStrings[nSurrogate].getLength() )
+ {
+ CreateName( pStrings[nSurrogate] );
+ pItem->SetName( String( pStrings[nSurrogate] ) );
+ }
+ }
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoGradientTable::hasByName( const OUString& aName )
+ throw( uno::RuntimeException )
+{
+ const String aSearchName( aName );
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_FILLGRADIENT) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ const XFillGradientItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillGradientItem*)mpPool->GetItem(XATTR_FILLGRADIENT, nSurrogate);
+ if( pItem && pItem->GetName() == aSearchName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoGradientTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const struct awt::Gradient*)0);
+}
+
+sal_Bool SAL_CALL SvxUnoGradientTable::hasElements( )
+ throw( uno::RuntimeException )
+{
+ return mpPool && mpPool->GetItemCount(XATTR_FILLGRADIENT) != 0;
+}
+
+void SvxUnoGradientTable::CreateName( OUString& rStrName)
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_FILLGRADIENT) : 0;
+ sal_Bool bFound = sal_True;
+
+ for( sal_Int32 nPostfix = 1; nPostfix<= nCount && bFound; nPostfix++ )
+ {
+ rStrName = OUString::createFromAscii( "Standard " );
+ rStrName += OUString::valueOf( nPostfix );
+ bFound = hasByName( rStrName );
+ }
+}
+
+/**
+ * Create a gradienttable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoGradientTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoGradientTable(pModel);
+}
+
+
+
diff --git a/svx/source/unodraw/unohtabl.cxx b/svx/source/unodraw/unohtabl.cxx
new file mode 100644
index 0000000000..231fa7e746
--- /dev/null
+++ b/svx/source/unodraw/unohtabl.cxx
@@ -0,0 +1,322 @@
+/*************************************************************************
+ *
+ * $RCSfile: unohtabl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_HATCH_HPP_
+#include <com/sun/star/drawing/Hatch.hpp>
+#endif
+
+#include <cppuhelper/implbase2.hxx>
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _LIST_HXX
+#include<tools/list.hxx>
+#endif
+
+#include "xhatch.hxx"
+#include "svdmodel.hxx"
+#include "xdef.hxx"
+#include "xflhtit.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+DECLARE_LIST( ItemSetArray_Impl, SfxItemSet* )
+
+class SvxUnoHatchTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >
+{
+private:
+ XHatchList* mpHatchList;
+ SdrModel* mpModel;
+ SfxItemPool* mpPool;
+
+ ItemSetArray_Impl aItemSetArray;
+
+ void CreateName( OUString& rStrName);
+
+public:
+ SvxUnoHatchTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoHatchTable() throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ static OUString getImplementationName_Static() throw()
+ {
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.SvxUnoHatchTable"));
+ }
+
+ static uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw();
+
+ // XNameContainer
+ virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const OUString& Name ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameReplace
+ virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameAccess
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw( uno::RuntimeException);
+};
+
+SvxUnoHatchTable::SvxUnoHatchTable( SdrModel* pModel ) throw()
+: mpModel( pModel ),
+ mpHatchList( pModel ? pModel->GetHatchList() : NULL ),
+ mpPool( pModel ? &pModel->GetItemPool() : (SfxItemPool*)NULL )
+{
+}
+
+SvxUnoHatchTable::~SvxUnoHatchTable() throw()
+{
+ for( int i = 0; i<aItemSetArray.Count(); i++ )
+ delete (SfxItemSet*)aItemSetArray.GetObject( i );
+}
+
+sal_Bool SAL_CALL SvxUnoHatchTable::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSNL( getSupportedServiceNames() );
+ const OUString * pArray = aSNL.getConstArray();
+
+ for( INT32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return TRUE;
+
+ return FALSE;
+}
+
+OUString SAL_CALL SvxUnoHatchTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoHatchTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoHatchTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+uno::Sequence< OUString > SvxUnoHatchTable::getSupportedServiceNames_Static(void) throw()
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.HatchTable" ));
+ return aSNS;
+}
+
+// XNameContainer
+void SAL_CALL SvxUnoHatchTable::insertByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ if( hasByName( aName ) )
+ throw container::ElementExistException();
+
+ SfxItemSet* mpInSet = new SfxItemSet( *mpPool, XATTR_FILLHATCH, XATTR_FILLHATCH );
+ aItemSetArray.Insert( mpInSet );//, aItemSetArray.Count() );
+
+ XFillHatchItem aHatch;
+ aHatch.SetName( String( aName ) );
+ aHatch.PutValue( aElement );
+
+ mpInSet->Put( aHatch, XATTR_FILLHATCH );
+}
+
+void SAL_CALL SvxUnoHatchTable::removeByName( const OUString& Name )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoHatchTable::replaceByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+}
+
+// XNameAccess
+uno::Any SAL_CALL SvxUnoHatchTable::getByName( const OUString& aName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpPool )
+ {
+ const String aSearchName( aName );
+ const USHORT nCount = mpPool->GetItemCount(XATTR_FILLHATCH);
+ const XFillHatchItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillHatchItem*)mpPool->GetItem(XATTR_FILLHATCH, nSurrogate);
+
+ if( pItem && ( pItem->GetName() == aSearchName ) )
+ {
+ uno::Any aAny;
+ pItem->QueryValue( aAny );
+ return aAny;
+ }
+ }
+ }
+
+ throw container::NoSuchElementException();
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoHatchTable::getElementNames( )
+ throw( uno::RuntimeException )
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_FILLHATCH) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ XFillHatchItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillHatchItem*)mpPool->GetItem(XATTR_FILLHATCH, nSurrogate);
+
+ if( pItem )
+ {
+ pStrings[nSurrogate] = pItem->GetName();
+
+ if( !pStrings[nSurrogate].getLength() )
+ {
+ CreateName( pStrings[nSurrogate] );
+ pItem->SetName( String( pStrings[nSurrogate] ) );
+ }
+ }
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoHatchTable::hasByName( const OUString& aName )
+ throw( uno::RuntimeException )
+{
+ const String aSearchName( aName );
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_FILLHATCH) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ const XFillHatchItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillHatchItem*)mpPool->GetItem(XATTR_FILLHATCH, nSurrogate);
+ if( pItem && pItem->GetName() == aSearchName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+void SvxUnoHatchTable::CreateName( OUString& rStrName )
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_FILLGRADIENT) : 0;
+ sal_Bool bFound = sal_True;
+
+ for( sal_Int32 nPostfix = 1; nPostfix<= nCount && bFound; nPostfix++ )
+ {
+ rStrName = OUString::createFromAscii( "Standard " );
+ rStrName += OUString::valueOf( nPostfix );
+ bFound = hasByName( rStrName );
+ }
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoHatchTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const struct drawing::Hatch*)0);
+}
+
+sal_Bool SAL_CALL SvxUnoHatchTable::hasElements( )
+ throw( uno::RuntimeException )
+{
+ return mpPool && mpPool->GetItemCount(XATTR_FILLHATCH) != 0;
+}
+
+/**
+ * Create a hatchtable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoHatchTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoHatchTable(pModel);
+}
+
+
+
diff --git a/svx/source/unodraw/unoipset.cxx b/svx/source/unodraw/unoipset.cxx
new file mode 100644
index 0000000000..5f812fc9f0
--- /dev/null
+++ b/svx/source/unodraw/unoipset.cxx
@@ -0,0 +1,355 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoipset.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _LIST_HXX
+#include <tools/list.hxx>
+#endif
+
+#include <svtools/itemprop.hxx>
+
+#include "unoipset.hxx"
+#include "svdpool.hxx"
+#include "svxids.hrc"
+#include "deflt3d.hxx"
+#include "unoshprp.hxx"
+#include "editeng.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::rtl;
+
+struct SvxIDPropertyCombine
+{
+ sal_uInt16 nWID;
+ uno::Any aAny;
+};
+
+DECLARE_LIST( SvxIDPropertyCombineList, SvxIDPropertyCombine * );
+
+SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMap* pMap )
+: _pMap(pMap)
+{
+ pItemPool = NULL;
+ pCombiList = NULL;
+}
+
+//----------------------------------------------------------------------
+SvxItemPropertySet::~SvxItemPropertySet()
+{
+ if(pItemPool)
+ delete pItemPool;
+ pItemPool = NULL;
+
+ if(pCombiList)
+ delete pCombiList;
+ pCombiList = NULL;
+}
+
+//----------------------------------------------------------------------
+uno::Any* SvxItemPropertySet::GetUsrAnyForID(sal_uInt16 nWID) const
+{
+ if(pCombiList && pCombiList->Count())
+ {
+ SvxIDPropertyCombine* pActual = pCombiList->First();
+ while(pActual)
+ {
+ if(pActual->nWID == nWID)
+ return &pActual->aAny;
+ pActual = pCombiList->Next();
+
+ }
+ }
+ return NULL;
+}
+
+//----------------------------------------------------------------------
+void SvxItemPropertySet::AddUsrAnyForID(const uno::Any& rAny, sal_uInt16 nWID)
+{
+ if(!pCombiList)
+ pCombiList = new SvxIDPropertyCombineList();
+
+ SvxIDPropertyCombine* pNew = new SvxIDPropertyCombine;
+ pNew->nWID = nWID;
+ pNew->aAny = rAny;
+ pCombiList->Insert(pNew);
+}
+
+//----------------------------------------------------------------------
+void SvxItemPropertySet::Generate3DAttrDefaultItem(sal_uInt16 nWID, SfxItemSet& rSet)
+{
+ SfxItemSet aSet( *rSet.GetPool(), SID_ATTR_3D_START, SID_ATTR_3D_END);
+ E3dDefaultAttributes a3DDefaultAttr;
+ a3DDefaultAttr.TakeDefaultValues(aSet);
+ const SfxPoolItem* pItem = 0;
+ SfxPoolItem *pNewItem = 0;
+ SfxItemState eState = aSet.GetItemState( nWID, sal_True, &pItem );
+ if(eState >= SFX_ITEM_DEFAULT && pItem)
+ {
+ pNewItem = pItem->Clone();
+ rSet.Put( *pNewItem, nWID );
+ delete pNewItem;
+ }
+}
+
+//----------------------------------------------------------------------
+void SvxItemPropertySet::ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet,
+ SfxItemSet& rSet, Reference< beans::XPropertySet > xSet )
+{
+ if(rPropSet.AreThereOwnUsrAnys())
+ {
+ const SfxItemPropertyMap* pSrc = rPropSet.getPropertyMap();
+ const SfxItemPropertyMap* pDst = _pMap;
+ while(pSrc->pName)
+ {
+ if(pSrc->nWID)
+ {
+ uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(pSrc->nWID);
+ if(pUsrAny)
+ {
+ // Aequivalenten Eintrag in pDst suchen
+ const SfxItemPropertyMap* pTmp = pDst;
+ int nDiff = strcmp( pSrc->pName, pTmp->pName );
+ while(nDiff > 0)
+ {
+ pTmp++;
+ nDiff = strcmp( pSrc->pName, pTmp->pName );
+ }
+
+ if(nDiff == 0)
+ {
+ // Eintrag gefunden
+ pDst = pTmp;
+
+ if(pDst->nWID >= OWN_ATTR_VALUE_START && pDst->nWID <= OWN_ATTR_VALUE_END)
+ {
+ // Special ID im PropertySet, kann nur direkt am
+ // Objekt gesetzt werden+
+ OUString aName( OUString::createFromAscii( pDst->pName ) );
+ xSet->setPropertyValue( aName, *pUsrAny);
+ }
+ else
+ {
+ // Eintrag sicherstellen in ItemSet
+ if(pDst->nWID >= SID_ATTR_3D_START && pDst->nWID <= SID_ATTR_3D_END)
+ {
+ // 3D-Attribut, eigenen Default
+ Generate3DAttrDefaultItem(pDst->nWID, rSet);
+ }
+ else
+ {
+ // Default aus ItemPool holen
+ if(rSet.GetPool()->IsWhich(pDst->nWID))
+ rSet.Put(rSet.GetPool()->GetDefaultItem(pDst->nWID));
+ }
+
+ // setzen
+ setPropertyValue(pDst, *pUsrAny, rSet);
+ }
+ }
+ }
+ }
+
+ // Naechster Eintrag
+ pSrc++;
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap, const SfxItemSet& rSet ) const
+{
+ uno::Any aVal;
+ if(!pMap || !pMap->nWID)
+ return aVal;
+
+ // item holen
+ const SfxPoolItem* pItem = 0;
+ SfxItemState eState = rSet.GetItemState( pMap->nWID, sal_True, &pItem );
+
+ // item-Wert als UnoAny zurueckgeben
+ if(eState >= SFX_ITEM_DEFAULT && pItem)
+ pItem->QueryValue( aVal, pMap->nMemberId );
+
+ // allgemeine SfxEnumItem Values in konkrete wandeln
+ if ( pMap->pType->getTypeClass() == uno::TypeClass_ENUM &&
+ aVal.getValueType() == ::getCppuType((const sal_Int32*)0) )
+ {
+ sal_Int32 nEnum;
+ aVal >>= nEnum;
+
+ aVal.setValue( &nEnum, *pMap->pType );
+ }
+
+ return aVal;
+}
+
+//----------------------------------------------------------------------
+void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rVal, SfxItemSet& rSet ) const
+{
+ if(!pMap || !pMap->nWID)
+ return;
+
+ // item holen
+ const SfxPoolItem* pItem = 0;
+ SfxPoolItem *pNewItem = 0;
+ SfxItemState eState = rSet.GetItemState( pMap->nWID, sal_True, &pItem );
+
+ // UnoAny in item-Wert stecken
+ if(eState >= SFX_ITEM_DEFAULT && pItem)
+ {
+ pNewItem = pItem->Clone();
+ if( pNewItem->PutValue( rVal, pMap->nMemberId ) )
+ {
+ // neues item in itemset setzen
+ rSet.Put( *pNewItem, pMap->nWID );
+ }
+ delete pNewItem;
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap ) const
+{
+ // Schon ein Wert eingetragen? Dann schnell fertig
+ uno::Any* pUsrAny = GetUsrAnyForID(pMap->nWID);
+ if(pUsrAny)
+ return *pUsrAny;
+
+ // Noch kein UsrAny gemerkt, generiere Default-Eintrag und gib
+ // diesen zurueck
+ if(!pItemPool)
+ {
+ // ItemPool generieren
+ ((SvxItemPropertySet*)this)->pItemPool = new SdrItemPool;
+ // pItemPool->SetDefaultMetric(...eScaleUnit...);
+ // Der Outliner hat keinen eigenen Pool, deshalb den der EditEngine
+ SfxItemPool* pOutlPool=EditEngine::CreatePool();
+ // OutlinerPool als SecondaryPool des SdrPool
+ pItemPool->SetSecondaryPool(pOutlPool);
+ }
+
+ uno::Any aVal;
+ SfxItemSet aSet( *pItemPool, pMap->nWID, pMap->nWID);
+ if(pMap->nWID >= SID_ATTR_3D_START && pMap->nWID <= SID_ATTR_3D_END)
+ {
+ // 3D-Attribut, eigenen Default generieren
+ ((SvxItemPropertySet*)this)->Generate3DAttrDefaultItem(pMap->nWID, aSet);
+ }
+ else if( (pMap->nWID < OWN_ATTR_VALUE_START) && (pMap->nWID > OWN_ATTR_VALUE_END ) )
+ {
+ // Default aus ItemPool holen
+ if(pItemPool->IsWhich(pMap->nWID))
+ aSet.Put(pItemPool->GetDefaultItem(pMap->nWID));
+ }
+
+ if(aSet.Count())
+ {
+ const SfxPoolItem* pItem = NULL;
+ SfxItemState eState = aSet.GetItemState( pMap->nWID, sal_True, &pItem );
+ if(eState >= SFX_ITEM_DEFAULT && pItem)
+ {
+ pItem->QueryValue( aVal, pMap->nMemberId );
+ ((SvxItemPropertySet*)this)->AddUsrAnyForID(aVal, pMap->nWID);
+ }
+ }
+
+ if ( pMap->pType->getTypeClass() == uno::TypeClass_ENUM &&
+ aVal.getValueType() == ::getCppuType((const sal_Int32*)0) )
+ {
+ sal_Int32 nEnum;
+ aVal >>= nEnum;
+
+ aVal.setValue( &nEnum, *pMap->pType );
+ }
+
+ return aVal;
+}
+
+//----------------------------------------------------------------------
+
+void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rVal ) const
+{
+ uno::Any* pUsrAny = GetUsrAnyForID(pMap->nWID);
+ if(!pUsrAny)
+ ((SvxItemPropertySet*)this)->AddUsrAnyForID(rVal, pMap->nWID);
+ else
+ *pUsrAny = rVal;
+}
+
+//----------------------------------------------------------------------
+
+const SfxItemPropertyMap* SvxItemPropertySet::getPropertyMapEntry(const OUString &rName) const
+{
+ return SfxItemPropertyMap::GetByName( _pMap, rName );
+}
+
+//----------------------------------------------------------------------
+
+Reference< ::com::sun::star::beans::XPropertySetInfo > SvxItemPropertySet::getPropertySetInfo() const
+{
+ Reference< ::com::sun::star::beans::XPropertySetInfo > aRef(new SfxItemPropertySetInfo( _pMap ));
+ return aRef;
+}
diff --git a/svx/source/unodraw/unomlstr.cxx b/svx/source/unodraw/unomlstr.cxx
new file mode 100644
index 0000000000..6368b36b66
--- /dev/null
+++ b/svx/source/unodraw/unomlstr.cxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * $RCSfile: unomlstr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 _SVDOBJ_HXX
+#include <svdobj.hxx>
+#endif
+
+#include "unomlstr.hxx"
+
+using namespace ::com::sun::star;
+
+SvxUnoShapeModifyListener::SvxUnoShapeModifyListener( SdrObject* pObj ) throw()
+{
+ mpObj = pObj;
+}
+
+SvxUnoShapeModifyListener::~SvxUnoShapeModifyListener() throw()
+{
+}
+
+// ::com::sun::star::util::XModifyListener
+void SAL_CALL SvxUnoShapeModifyListener::modified(const lang::EventObject& aEvent) throw( uno::RuntimeException )
+{
+ if( mpObj )
+ mpObj->SendRepaintBroadcast();
+}
+
+// ::com::sun::star::lang::XEventListener
+void SvxUnoShapeModifyListener::disposing(const lang::EventObject& Source) throw( uno::RuntimeException )
+{
+ invalidate();
+}
+
+// internal
+void SvxUnoShapeModifyListener::invalidate() throw()
+{
+ mpObj = NULL;
+}
+
+
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
new file mode 100644
index 0000000000..26b94def4e
--- /dev/null
+++ b/svx/source/unodraw/unomod.cxx
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * $RCSfile: unomod.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#ifndef _COM_SUN_STAR_LANG_SERVICENOTREGISTEREDEXCEPTION_HPP_
+#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_NOSUPPORTEXCEPTION_HPP_
+#include <com/sun/star/lang/NoSupportException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_XSHAPE_HPP_
+#include <com/sun/star/drawing/XShape.hpp>
+#endif
+
+#ifndef _LIST_HXX
+#include <tools/list.hxx>
+#endif
+
+#ifndef _SFX_ITEMPROP_HXX
+#include <svtools/itemprop.hxx>
+#endif
+
+#include "globl3d.hxx"
+#include "svdtypes.hxx"
+#include "unoprov.hxx"
+#include "unomod.hxx"
+#include "unopage.hxx"
+
+extern UHashMapEntry pSdrShapeIdentifierMap[];
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( const OUString& ServiceSpecifier )
+ throw( uno::Exception, uno::RuntimeException )
+{
+ const OUString aPrefix( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.") );
+
+ if( ServiceSpecifier.compareTo( aPrefix, aPrefix.getLength() ) == 0 )
+ {
+ OUString aShapeType( ServiceSpecifier.copy( aPrefix.getLength() ) );
+
+ UINT32 nType = aSdrShapeIdentifierMap.getId( aShapeType );
+ if( nType != UHASHMAP_NOTFOUND )
+ {
+ UINT16 nT = (UINT16)(nType & ~E3D_INVENTOR_FLAG);
+ UINT32 nI = (nType & E3D_INVENTOR_FLAG)?E3dInventor:SdrInventor;
+
+ return uno::Reference< uno::XInterface >( (drawing::XShape*) SvxDrawPage::CreateShapeByTypeAndInventor( nT, nI ) );
+ }
+ }
+ throw lang::ServiceNotRegisteredException();
+
+ return uno::Reference< uno::XInterface >();
+}
+
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstanceWithArguments( const OUString& ServiceSpecifier, const uno::Sequence< ::com::sun::star::uno::Any >& Arguments )
+ throw( uno::Exception, uno::RuntimeException )
+{
+ throw lang::NoSupportException();
+ return uno::Reference< uno::XInterface >();
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoDrawMSFactory::getAvailableServiceNames()
+ throw( uno::RuntimeException )
+{
+ const OUString aPrefix( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.") );
+
+ UHashMapEntry* pMap = pSdrShapeIdentifierMap;
+
+ UINT32 nCount = 0;
+ while (pMap->aIdentifier.getLength())
+ {
+ pMap++;
+ nCount++;
+ }
+
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+
+ pMap = pSdrShapeIdentifierMap;
+ UINT32 nIdx = 0;
+ while(pMap->aIdentifier.getLength())
+ {
+ OUString aServiceName( aPrefix );
+ aServiceName += pMap->aIdentifier;
+ pStrings[nIdx] = aServiceName;
+ pMap++;
+ nIdx++;
+ }
+
+ return aSeq;
+}
+
+uno::Sequence< OUString > SvxUnoDrawMSFactory::concatServiceNames( uno::Sequence< OUString >& rServices1, uno::Sequence< OUString >& rServices2 ) throw()
+{
+ const sal_Int32 nLen1 = rServices1.getLength();
+ const sal_Int32 nLen2 = rServices2.getLength();
+
+ uno::Sequence< OUString > aSeq( nLen1+nLen2 );
+ OUString* pStrings = aSeq.getArray();
+
+ sal_Int32 nIdx;
+ OUString* pStringDst = pStrings;
+ const OUString* pStringSrc = rServices1.getArray();
+
+ for( nIdx = 0; nIdx < nLen1; nIdx++ )
+ *pStringDst++ = *pStringSrc++;
+
+ pStringSrc = rServices2.getArray();
+
+ for( nIdx = 0; nIdx < nLen2; nIdx++ )
+ *pStringDst++ = *pStringSrc++;
+
+ return aSeq;
+}
+
+
diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx
new file mode 100644
index 0000000000..1cd7ee42de
--- /dev/null
+++ b/svx/source/unodraw/unomtabl.cxx
@@ -0,0 +1,376 @@
+/*************************************************************************
+ *
+ * $RCSfile: unomtabl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequence.hpp>
+#endif
+
+#include <cppuhelper/implbase2.hxx>
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _SVX_XLNEDIT_HXX //autogen
+#include <xlnedit.hxx>
+#endif
+#ifndef _SVX_XLNSTIT_HXX
+#include <xlnstit.hxx>
+#endif
+#include "svdmodel.hxx"
+#include "xdef.hxx"
+#include "xflhtit.hxx"
+
+#ifndef _LIST_HXX
+#include<tools/list.hxx>
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+DECLARE_LIST( ItemSetArray_Impl, SfxItemSet* )
+
+class SvxUnoMarkerTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >
+{
+private:
+ XBitmapList* mpBitmapList;
+ SdrModel* mpModel;
+ SfxItemPool* mpPool;
+
+ ItemSetArray_Impl aItemSetArray;
+
+ void CreateName( OUString& rStrName );
+
+public:
+ SvxUnoMarkerTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoMarkerTable() throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ static OUString getImplementationName_Static() throw()
+ {
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.SvxUnoMarkerTable"));
+ }
+
+ static uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw();
+
+ // XNameContainer
+ virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const OUString& Name ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameReplace
+ virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameAccess
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw( uno::RuntimeException);
+};
+
+SvxUnoMarkerTable::SvxUnoMarkerTable( SdrModel* pModel ) throw()
+: mpModel( pModel ),
+ mpBitmapList( pModel ? pModel->GetBitmapList() : NULL ),
+ mpPool( pModel ? &pModel->GetItemPool() : (SfxItemPool*)NULL )
+{
+}
+
+SvxUnoMarkerTable::~SvxUnoMarkerTable() throw()
+{
+ for( int i = 0; i<aItemSetArray.Count(); i++ )
+ delete (SfxItemSet*)aItemSetArray.GetObject( i );
+}
+
+sal_Bool SAL_CALL SvxUnoMarkerTable::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSNL( getSupportedServiceNames() );
+ const OUString * pArray = aSNL.getConstArray();
+
+ for( INT32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return TRUE;
+
+ return FALSE;
+}
+
+OUString SAL_CALL SvxUnoMarkerTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoMarkerTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+uno::Sequence< OUString > SvxUnoMarkerTable::getSupportedServiceNames_Static(void) throw()
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.MarkerTable" ));
+ return aSNS;
+}
+
+// XNameContainer
+void SAL_CALL SvxUnoMarkerTable::insertByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ if( hasByName( aName ) )
+ throw container::ElementExistException();
+
+ SfxItemSet* mpInSet = new SfxItemSet( *mpPool, XATTR_LINESTART, XATTR_LINEEND );
+ aItemSetArray.Insert( mpInSet );//, aItemSetArray.Count() );
+
+ XLineEndItem aEndMarker;
+ aEndMarker.SetName( String( aName ) );
+ aEndMarker.PutValue( aElement );
+
+ mpInSet->Put( aEndMarker, XATTR_LINEEND );
+
+ XLineStartItem aStartMarker;
+ aStartMarker.SetName( String( aName ) );
+ aStartMarker.PutValue( aElement );
+
+ mpInSet->Put( aStartMarker, XATTR_LINESTART );
+}
+
+void SAL_CALL SvxUnoMarkerTable::removeByName( const OUString& Name )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+}
+
+// XNameAccess
+uno::Any SAL_CALL SvxUnoMarkerTable::getByName( const OUString& aName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpPool )
+ {
+ const String aSearchName( aName );
+ USHORT nCount = mpPool->GetItemCount( XATTR_LINEEND );
+ const XLineEndItem *pEndItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pEndItem = (XLineEndItem*)mpPool->GetItem( XATTR_LINEEND, nSurrogate );
+
+ if( pEndItem && ( pEndItem->GetName() == aSearchName ) )
+ {
+ uno::Any aAny;
+ pEndItem->QueryValue( aAny );
+ return aAny;
+ }
+
+ }
+
+ const XLineStartItem *pStartItem;
+ nCount = mpPool->GetItemCount( XATTR_LINESTART );
+
+ for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pStartItem = (XLineStartItem*)mpPool->GetItem( XATTR_LINESTART, nSurrogate );
+
+ if( pStartItem && ( pStartItem->GetName() == aSearchName ) )
+ {
+ uno::Any aAny;
+ pStartItem->QueryValue( aAny );
+ return aAny;
+ }
+ }
+ }
+
+ throw container::NoSuchElementException();
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getElementNames( )
+ throw( uno::RuntimeException )
+{
+ const USHORT nEndCount = mpPool ? mpPool->GetItemCount( XATTR_LINEEND ) : 0;
+ const USHORT nStartCount = mpPool ? mpPool->GetItemCount( XATTR_LINESTART ) : 0;
+ uno::Sequence< OUString > aSeq( nEndCount+nStartCount );
+ OUString* pStrings = aSeq.getArray();
+
+ XLineEndItem *pEndItem;
+ for( USHORT nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ )
+ {
+ pEndItem = (XLineEndItem*)mpPool->GetItem( XATTR_LINEEND, nSurrogate);
+
+ if( pEndItem )
+ {
+ pStrings[nSurrogate] = pEndItem->GetName();
+
+ if( !pStrings[nSurrogate].getLength() )
+ {
+ CreateName( pStrings[nSurrogate] );
+ pEndItem->SetName( String( pStrings[nSurrogate] ) );
+ }
+ }
+ }
+
+ XLineStartItem *pStartItem;
+ for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ )
+ {
+ pStartItem = (XLineStartItem*)mpPool->GetItem( XATTR_LINESTART, nSurrogate);
+
+ if( pStartItem )
+ {
+ pStrings[nSurrogate+nEndCount] = pStartItem->GetName();
+
+ if( !pStrings[nSurrogate+nEndCount].getLength() )
+ {
+ CreateName( pStrings[nSurrogate+nEndCount] );
+ pStartItem->SetName( String( pStrings[nSurrogate+nEndCount] ) );
+ }
+ }
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoMarkerTable::hasByName( const OUString& aName )
+ throw( uno::RuntimeException )
+{
+ const String aSearchName( aName );
+ const USHORT nStartCount = mpPool ? mpPool->GetItemCount( XATTR_LINESTART ) : 0;
+ const USHORT nEndCount = mpPool ? mpPool->GetItemCount( XATTR_LINEEND ) : 0;
+ const XLineEndItem *pEndItem;
+ const XLineStartItem *pStartItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ )
+ {
+ pStartItem = (XLineStartItem*)mpPool->GetItem( XATTR_LINESTART, nSurrogate);
+ if( pStartItem && pStartItem->GetName() == aSearchName )
+ return sal_True;
+ }
+
+ for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ )
+ {
+ pEndItem = (XLineEndItem*)mpPool->GetItem( XATTR_LINEEND, nSurrogate);
+ if( pEndItem && pEndItem->GetName() == aSearchName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+void SvxUnoMarkerTable::CreateName( OUString& rStrName )
+{
+ const USHORT nStartCount = mpPool ? mpPool->GetItemCount(XATTR_LINESTART) : 0;
+ const USHORT nEndCount = mpPool ? mpPool->GetItemCount(XATTR_LINEEND) : 0;
+ const USHORT nCount = nStartCount > nEndCount ? nStartCount : nEndCount;
+ sal_Bool bFound = sal_True;
+
+ for( sal_Int32 nPostfix = 1; nPostfix<= nCount && bFound; nPostfix++ )
+ {
+ rStrName = OUString::createFromAscii( "Standard " );
+ rStrName += OUString::valueOf( nPostfix );
+ bFound = hasByName( rStrName );
+ }
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoMarkerTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const drawing::PointSequence*)0);
+}
+
+sal_Bool SAL_CALL SvxUnoMarkerTable::hasElements( )
+ throw( uno::RuntimeException )
+{
+ return mpPool && mpPool->GetItemCount(XATTR_LINEEND) != 0;
+}
+
+/**
+ * Create a hatchtable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoMarkerTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoMarkerTable(pModel);
+}
+
+
+
diff --git a/svx/source/unodraw/unonrule.cxx b/svx/source/unodraw/unonrule.cxx
new file mode 100644
index 0000000000..c7ec69c21b
--- /dev/null
+++ b/svx/source/unodraw/unonrule.cxx
@@ -0,0 +1,503 @@
+/*************************************************************************
+ *
+ * $RCSfile: unonrule.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define PROPERTY_NONE 0
+#define ITEMID_BRUSH 0
+
+#ifndef _SVX_BRSHITEM_HXX //autogen
+#include <brshitem.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_RELORIENTATION_HPP_
+#include <com/sun/star/text/RelOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_VERTORIENTATION_HPP_
+#include <com/sun/star/text/VertOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_HORIZONTALADJUST_HPP_
+#include <com/sun/star/text/HorizontalAdjust.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_DOCUMENTSTATISTIC_HPP_
+#include <com/sun/star/text/DocumentStatistic.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_HORIORIENTATION_HPP_
+#include <com/sun/star/text/HoriOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_HORIORIENTATIONFORMAT_HPP_
+#include <com/sun/star/text/HoriOrientationFormat.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_NOTEPRINTMODE_HPP_
+#include <com/sun/star/text/NotePrintMode.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_SIZETYPE_HPP_
+#include <com/sun/star/text/SizeType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_VERTORIENTATIONFORMAT_HPP_
+#include <com/sun/star/text/VertOrientationFormat.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_WRAPTEXTMODE_HPP_
+#include <com/sun/star/text/WrapTextMode.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XBITMAP_HPP_
+#include <com/sun/star/awt/XBitmap.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_
+#include <com/sun/star/beans/PropertyState.hpp>
+#endif
+#ifndef _GRFMGR_HXX
+#include <goodies/grfmgr.hxx>
+#endif
+
+#ifndef _SVX_NUMITEM_HXX
+#include <numitem.hxx>
+#endif
+
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_ //autogen
+#include <vos/mutex.hxx>
+#endif
+#ifndef _SV_GRAPH_HXX
+#include <vcl/graph.hxx>
+#endif
+
+#include <toolkit/unohlp.hxx>
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "unoprnms.hxx"
+#include "unofdesc.hxx"
+#include "unonrule.hxx"
+#include "unotext.hxx"
+#include "svdmodel.hxx"
+#include "unoapi.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::vos;
+
+/******************************************************************
+ * SvxUnoNumberingRules
+ ******************************************************************/
+
+UNO3_GETIMPLEMENTATION_IMPL( SvxUnoNumberingRules );
+
+SvxUnoNumberingRules::SvxUnoNumberingRules( SdrModel* pModel ) throw() :
+ pNumRule(0)
+{
+ if( pModel )
+ {
+ SvxNumRule* pDefaultRule = ((SvxNumBulletItem*) pModel->GetItemPool().GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET))->GetNumRule();
+ DBG_ASSERT( pDefaultRule, "No default SvxNumRule!" );
+ pNumRule = new SvxNumRule( *pDefaultRule );
+ }
+}
+
+SvxUnoNumberingRules::SvxUnoNumberingRules(const SvxNumRule& rRule) throw() :
+ pNumRule(new SvxNumRule(rRule))
+{
+}
+
+SvxUnoNumberingRules::~SvxUnoNumberingRules() throw()
+{
+ delete pNumRule;
+}
+
+
+//XIndexReplace
+void SAL_CALL SvxUnoNumberingRules::replaceByIndex( sal_Int32 Index, const uno::Any& Element )
+ throw( lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pNumRule == NULL)
+ throw uno::RuntimeException();
+
+ if(pNumRule->GetNumRuleType() == SVX_RULETYPE_PRESENTATION_NUMBERING)
+ Index++;
+
+ if( Index < 0 || Index >= pNumRule->GetLevelCount() )
+ throw lang::IndexOutOfBoundsException();
+
+ uno::Sequence< beans::PropertyValue > aSeq;
+
+ if( !( Element >>= aSeq) )
+ throw lang::IllegalArgumentException();
+ setNumberingRuleByIndex( aSeq, Index );
+}
+
+//XIndexAccess
+sal_Int32 SAL_CALL SvxUnoNumberingRules::getCount() throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pNumRule == NULL)
+ throw uno::RuntimeException();
+
+ sal_Int32 nCount = pNumRule->GetLevelCount();
+ if(pNumRule->GetNumRuleType() == SVX_RULETYPE_PRESENTATION_NUMBERING)
+ nCount -= 1;
+
+ return nCount;
+}
+
+uno::Any SAL_CALL SvxUnoNumberingRules::getByIndex( sal_Int32 Index )
+ throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pNumRule->GetNumRuleType() == SVX_RULETYPE_PRESENTATION_NUMBERING)
+ Index++;
+
+ if( Index < 0 || Index >= pNumRule->GetLevelCount() )
+ throw lang::IndexOutOfBoundsException();
+
+ uno::Sequence<beans::PropertyValue> aRet = getNumberingRuleByIndex(Index);
+ return uno::Any( &aRet, getElementType() );
+}
+
+//XElementAccess
+uno::Type SAL_CALL SvxUnoNumberingRules::getElementType()
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType(( const uno::Sequence< beans::PropertyValue >*)0);
+}
+
+sal_Bool SAL_CALL SvxUnoNumberingRules::hasElements() throw( uno::RuntimeException )
+{
+ return pNumRule != NULL;
+}
+
+uno::Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex( sal_Int32 nIndex) const throw()
+{
+ if(pNumRule == NULL)
+ return uno::Sequence< beans::PropertyValue >(0);
+
+ // NumberingRule aRule;
+ const SvxNumberFormat& rFmt = pNumRule->GetLevel((sal_uInt16) nIndex);
+ sal_uInt16 nIdx = 0;
+
+ const int nProps = 14;
+ beans::PropertyValue* pArray = new beans::PropertyValue[nProps];
+
+ uno::Any aVal;
+ {
+ aVal <<= (sal_Int16)rFmt.GetNumType();
+ beans::PropertyValue aAlignProp( OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_NUMBERINGTYPE)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[nIdx++] = aAlignProp;
+ }
+
+ {
+ SvxAdjust eAdj = rFmt.GetNumAdjust();
+ aVal <<= ConvertUnoAdjust(eAdj);
+ pArray[nIdx++] = beans::PropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_ADJUST)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ }
+
+ {
+ aVal <<= OUString(rFmt.GetPrefix());
+ beans::PropertyValue aPrefixProp( OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_PREFIX)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[nIdx++] = aPrefixProp;
+ }
+
+ {
+ aVal <<= OUString(rFmt.GetSuffix());
+ beans::PropertyValue aSuffixProp( OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_SUFFIX)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[nIdx++] = aSuffixProp;
+ }
+
+ {
+ aVal <<= (sal_Int16)rFmt.GetBulletChar();
+ beans::PropertyValue aBulletProp( OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_BULLETID)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[nIdx++] = aBulletProp;
+ }
+
+ if( rFmt.GetBulletFont() )
+ {
+ awt::FontDescriptor aDesc;
+ SvxUnoFontDescriptor::ConvertFromFont( *rFmt.GetBulletFont(), aDesc );
+ aVal.setValue(&aDesc, ::getCppuType((const ::com::sun::star::awt::FontDescriptor*)0));
+ pArray[nIdx++] = beans::PropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_BULLET_FONT)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ }
+
+ {
+ const SvxBrushItem* pBrush = rFmt.GetBrush();
+ uno::Reference< ::com::sun::star::awt::XBitmap > xBmp;
+
+ if(pBrush && pBrush->GetGraphic())
+ {
+ const Graphic* pGraphic = pBrush->GetGraphic();
+ if( pGraphic )
+ xBmp = VCLUnoHelper::CreateBitmap( pGraphic->GetBitmapEx() );
+ }
+
+ aVal <<= xBmp;
+ const beans::PropertyValue aGraphicProp( OUString(RTL_CONSTASCII_USTRINGPARAM("Graphic")), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[nIdx++] = aGraphicProp;
+
+ if(pBrush && pBrush->GetGraphicObject())
+ {
+ const GraphicObject* pGrafObj = pBrush->GetGraphicObject();
+ OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+ aURL += OUString::createFromAscii( pGrafObj->GetUniqueID().GetBuffer() );
+
+ aVal <<= aURL;
+ const beans::PropertyValue aGraphicProp( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicURL")), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[nIdx++] = aGraphicProp;
+ }
+ }
+
+ {
+ const Size aSize( rFmt.GetGraphicSize() );
+ const awt::Size aUnoSize( aSize.Width(), aSize.Height() );
+ aVal <<= aUnoSize;
+ const beans::PropertyValue aGraphicSizeProp(OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicSize")), -1, aVal, beans::PropertyState_DIRECT_VALUE );
+ pArray[nIdx++] = aGraphicSizeProp;
+ }
+
+ aVal <<= (sal_Int16)rFmt.GetStart();
+ pArray[nIdx++] = beans::PropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_START_WITH)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+
+ aVal <<= (sal_Int32)rFmt.GetAbsLSpace();
+ pArray[nIdx++] = beans::PropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_LEFT_MARGIN)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+
+ aVal <<= (sal_Int32)rFmt.GetFirstLineOffset();
+ pArray[nIdx++] = beans::PropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_FIRST_LINE_OFFSET)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+
+ aVal <<= (sal_Int32)rFmt.GetBulletColor().GetColor();
+ pArray[nIdx++] = beans::PropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_BULLET_COLOR)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+
+ aVal <<= (sal_Int16)rFmt.GetBulletRelSize();
+ pArray[nIdx++] = beans::PropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_BULLET_RELSIZE)), -1, aVal, beans::PropertyState_DIRECT_VALUE);
+
+ DBG_ASSERT( nIdx <= nProps, "FixMe: Array uebergelaufen!!!! [CL]" );
+ uno::Sequence< beans::PropertyValue> aSeq(pArray, nIdx);
+
+ delete [] pArray;
+ return aSeq;
+}
+
+void SvxUnoNumberingRules::setNumberingRuleByIndex( const uno::Sequence< beans::PropertyValue >& rProperties, sal_Int32 nIndex)
+ throw( uno::RuntimeException, lang::IllegalArgumentException )
+{
+ if(pNumRule == NULL)
+ throw uno::RuntimeException();
+
+ SvxNumberFormat aFmt(pNumRule->GetLevel( (sal_uInt16)nIndex ));
+ const beans::PropertyValue* pPropArray = rProperties.getConstArray();
+ for(int i = 0; i < rProperties.getLength(); i++)
+ {
+ const beans::PropertyValue& rProp = pPropArray[i];
+ const OUString& rPropName = rProp.Name;
+ const uno::Any& aVal = rProp.Value;
+
+ if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_NUMBERINGTYPE)) == 0)
+ {
+ sal_Int16 nSet;
+ aVal >>= nSet;
+
+ switch(nSet)
+ {
+ case SVX_NUM_BITMAP:
+ case SVX_NUM_CHAR_SPECIAL:
+ case SVX_NUM_ROMAN_UPPER:
+ case SVX_NUM_ROMAN_LOWER:
+ case SVX_NUM_CHARS_UPPER_LETTER:
+ case SVX_NUM_CHARS_LOWER_LETTER:
+ case SVX_NUM_ARABIC:
+ case SVX_NUM_NUMBER_NONE:
+ aFmt.SetNumType((SvxExtNumType)nSet);
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_PREFIX)) == 0)
+ {
+ OUString aPrefix;
+ if( aVal >>= aPrefix )
+ {
+ aFmt.SetPrefix(aPrefix);
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_SUFFIX)) == 0)
+ {
+ OUString aSuffix;
+ if( aVal >>= aSuffix )
+ {
+ aFmt.SetSuffix(aSuffix);
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_BULLETID)) == 0)
+ {
+ sal_Int16 nSet;
+ if( aVal >>= nSet )
+ {
+ if(nSet < 0x100)
+ {
+ aFmt.SetBulletChar(nSet);
+ continue;
+ }
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_ADJUST)) == 0)
+ {
+ sal_Int16 nAdjust;
+ if( aVal >>= nAdjust )
+ {
+ aFmt.SetNumAdjust(ConvertUnoAdjust( (unsigned short)nAdjust ));
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_BULLET_FONT)) == 0)
+ {
+ awt::FontDescriptor aDesc;
+ if( aVal >>= aDesc )
+ {
+ Font aFont;
+ SvxUnoFontDescriptor::ConvertToFont( aDesc, aFont );
+ aFmt.SetBulletFont(&aFont);
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("Graphic")) == 0)
+ {
+ uno::Reference< awt::XBitmap > xBmp;
+ if( aVal >>= xBmp )
+ {
+ Graphic aGraf( VCLUnoHelper::GetBitmap( xBmp ) );
+ SvxBrushItem aBrushItem(aGraf, GPOS_AREA);
+ aFmt.SetGraphicBrush( &aBrushItem );
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("GraphicURL")) == 0)
+ {
+ OUString aURL;
+ if( aVal >>= aURL )
+ {
+ GraphicObject aGrafObj( CreateGraphicObjectFromURL( aURL ) );
+ SvxBrushItem aBrushItem( aGrafObj, GPOS_AREA );
+ aFmt.SetGraphicBrush( &aBrushItem );
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("GraphicSize")) == 0)
+ {
+ awt::Size aUnoSize;
+ if( aVal >>= aUnoSize )
+ {
+ aFmt.SetGraphicSize( Size( aUnoSize.Width, aUnoSize.Height ) );
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_START_WITH)) == 0)
+ {
+ sal_Int16 nStart;
+ if( aVal >>= nStart )
+ {
+ aFmt.SetStart( nStart );
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_LEFT_MARGIN)) == 0)
+ {
+ sal_Int32 nMargin;
+ if( aVal >>= nMargin )
+ {
+ aFmt.SetAbsLSpace((sal_uInt16)nMargin);
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_FIRST_LINE_OFFSET)) == 0)
+ {
+ sal_Int32 nMargin;
+ if( aVal >>= nMargin )
+ {
+ aFmt.SetFirstLineOffset((sal_uInt16)nMargin);
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_BULLET_COLOR)) == 0)
+ {
+ sal_Int32 nColor;
+ if( aVal >>= nColor )
+ {
+ aFmt.SetBulletColor( (Color) nColor );
+ continue;
+ }
+ }
+ else if(rPropName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_NRULE_BULLET_RELSIZE)) == 0)
+ {
+ sal_Int16 nSize;
+ if( aVal >>= nSize )
+ {
+ aFmt.SetBulletRelSize( (short)nSize );
+ continue;
+ }
+ }
+
+ throw lang::IllegalArgumentException();
+ }
+}
+
+
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
new file mode 100644
index 0000000000..16daf7b631
--- /dev/null
+++ b/svx/source/unodraw/unopage.cxx
@@ -0,0 +1,720 @@
+/*************************************************************************
+ *
+ * $RCSfile: unopage.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+/*
+#ifndef _SFX_BINDINGS_HXX
+#include <sfx2/bindings.hxx>
+#endif
+*/
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "svdobj.hxx"
+#include "svdpage.hxx"
+#include "svdmodel.hxx"
+#include "svdview.hxx"
+#include "svdpagv.hxx"
+#include "unopage.hxx"
+#include "unoshape.hxx"
+#include "globl3d.hxx"
+#include "polysc3d.hxx"
+#include "unoprov.hxx"
+#include "svdopath.hxx"
+#include "unoapi.hxx"
+
+using namespace ::vos;
+using namespace ::rtl;
+using namespace ::cppu;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::drawing;
+
+#define INTERFACE_TYPE( xint ) \
+ ::getCppuType((const Reference< xint >*)0)
+
+#define QUERYINT( xint ) \
+ if( rType == ::getCppuType((const Reference< xint >*)0) ) \
+ aAny <<= Reference< xint >(this)
+
+DECLARE_LIST( SvxDrawPageList, SvxDrawPage * );
+SvxDrawPageList* SvxDrawPage::m_pGlobalDrawPageList = NULL;
+
+extern SfxItemPropertyMap* ImplGetSvxOle2PropertyMap();
+
+/**********************************************************************
+* class SvxDrawPage *
+**********************************************************************/
+
+UNO3_GETIMPLEMENTATION_IMPL( SvxDrawPage );
+
+SvxDrawPage::SvxDrawPage( SdrPage* pInPage ) throw() :
+ pPage ( pInPage ),
+ pModel ( NULL )
+{
+ // Am Broadcaster anmelden
+ pModel = pPage->GetModel();
+ StartListening( *pModel );
+
+ // Erzeugen der (hidden) ::com::sun::star::sdbcx::View
+ pView = new SdrView( pModel );
+ if( pView )
+ pView->SetDesignMode(sal_True);
+
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(m_pGlobalDrawPageList == NULL)
+ m_pGlobalDrawPageList = new SvxDrawPageList();
+
+ if(m_pGlobalDrawPageList->GetPos(this) == LIST_ENTRY_NOTFOUND)
+ m_pGlobalDrawPageList->Insert(this);
+}
+
+//----------------------------------------------------------------------
+// Ctor fuer SvxDrawPage_NewInstance()
+//----------------------------------------------------------------------
+SvxDrawPage::SvxDrawPage() throw() :
+ pPage ( NULL ),
+ pModel ( NULL ),
+ pView ( NULL )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(m_pGlobalDrawPageList == NULL)
+ m_pGlobalDrawPageList = new SvxDrawPageList();
+
+ if(m_pGlobalDrawPageList->GetPos(this) == LIST_ENTRY_NOTFOUND)
+ m_pGlobalDrawPageList->Insert(this);
+}
+
+//----------------------------------------------------------------------
+SvxDrawPage::~SvxDrawPage() throw()
+{
+ // Am Broadcaster abmelden
+ if( pModel )
+ EndListening( *pModel );
+
+ delete pView;
+
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( m_pGlobalDrawPageList != NULL )
+ {
+ m_pGlobalDrawPageList->Remove(this);
+ if( m_pGlobalDrawPageList->Count() == 0 )
+ {
+ delete m_pGlobalDrawPageList;
+ m_pGlobalDrawPageList = NULL;
+ }
+ }
+}
+
+SvxDrawPage* SvxDrawPage::GetPageForSdrPage( SdrPage* pPage ) throw()
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( m_pGlobalDrawPageList != NULL )
+ {
+ for( SvxDrawPage* pUnoPage = m_pGlobalDrawPageList->First();
+ pUnoPage;
+ pUnoPage = m_pGlobalDrawPageList->Next() )
+ {
+ if( pUnoPage->pPage == pPage )
+ return pUnoPage;
+ }
+ }
+
+ return NULL;
+}
+
+// SfxListener
+
+//----------------------------------------------------------------------
+void SvxDrawPage::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+ if( pSdrHint && pSdrHint->GetKind() == HINT_MODELCLEARED )
+ {
+ pModel = NULL;
+ delete pView;
+ pView = NULL;
+ }
+}
+
+// ::com::sun::star::drawing::XShapes
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxDrawPage::add( const Reference< drawing::XShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+ SdrObject *pObj = pShape->GetSdrObject();
+
+ if(!pObj)
+ {
+ pObj = CreateSdrObject( xShape );
+ }
+ else if ( !pObj->IsInserted() )
+ {
+ pObj->SetModel(pModel);
+ pPage->InsertObject( pObj );
+ }
+ else
+ throw uno::RuntimeException();
+
+ if(pObj == NULL)
+ return;
+
+ if(pShape)
+ pShape->Create( pObj, this );
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxDrawPage::remove( const Reference< drawing::XShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+ if(pShape)
+ {
+ SdrObject* pObj = pShape->GetSdrObject();
+ if(pObj)
+ {
+ // SdrObject aus der Page loeschen
+ sal_uInt32 nCount = pPage->GetObjCount();
+ for( sal_uInt32 nNum = 0; nNum < nCount; nNum++ )
+ {
+ if(pPage->GetObj(nNum) == pObj)
+ {
+ pObj->SetUserCall(NULL);
+ delete pPage->RemoveObject(nNum);
+ pShape->InvalidateSdrObject();
+ break;
+ }
+ }
+ }
+ }
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+// ::com::sun::star::container::XIndexAccess
+
+//----------------------------------------------------------------------
+sal_Int32 SAL_CALL SvxDrawPage::getCount()
+ throw( uno::RuntimeException )
+{
+ return( (sal_Int32) pPage->GetObjCount() );
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxDrawPage::getByIndex( sal_Int32 Index )
+ throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pPage == NULL)
+ throw uno::RuntimeException();
+
+ if( Index < 0 || Index >= pPage->GetObjCount())
+ throw lang::IndexOutOfBoundsException();
+
+ SdrObject* pObj = pPage->GetObj( Index );
+ if( pObj == NULL )
+ throw uno::RuntimeException();
+
+ Reference< drawing::XShape > xRet = _CreateShape( pObj );
+ return uno::Any( &xRet, INTERFACE_TYPE( drawing::XShape ) );
+}
+
+
+// ::com::sun::star::container::XElementAccess
+
+//----------------------------------------------------------------------
+uno::Type SAL_CALL SvxDrawPage::getElementType()
+ throw( uno::RuntimeException )
+{
+ return INTERFACE_TYPE( drawing::XShape );
+}
+
+//----------------------------------------------------------------------
+sal_Bool SAL_CALL SvxDrawPage::hasElements()
+ throw( uno::RuntimeException )
+{
+ return pPage?(pPage->GetObjCount()>0):sal_False;
+}
+
+//----------------------------------------------------------------------
+// ACHTUNG: _SelectObjectsInView selektiert die ::com::sun::star::drawing::Shapes nur in der angegebennen
+// SdrPageView. Dies muß nicht die sichtbare SdrPageView sein.
+//----------------------------------------------------------------------
+void SvxDrawPage::_SelectObjectsInView( const Reference< drawing::XShapes > & aShapes, SdrPageView* pPageView ) throw ()
+{
+ DBG_ASSERT(pPageView,"SdrPageView ist NULL! [CL]");
+ DBG_ASSERT(pView, "SdrView ist NULL! [CL]");
+
+ if(pPageView!=NULL && pView!=NULL)
+ {
+ pView->UnmarkAllObj( pPageView );
+
+ long nCount = aShapes->getCount();
+ for( long i = 0; i < nCount; i++ )
+ {
+ uno::Any aAny( aShapes->getByIndex(i) );
+ Reference< drawing::XShape > xShape;
+ if( aAny >>= xShape )
+ {
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+ if( pShape )
+ pView->MarkObj( pShape->pObj, pPageView );
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+// ACHTUNG: _SelectObjectInView selektiert das Shape *nur* in der angegebennen
+// SdrPageView. Dies muß nicht die sichtbare SdrPageView sein.
+//----------------------------------------------------------------------
+void SvxDrawPage::_SelectObjectInView( const Reference< drawing::XShape > & xShape, SdrPageView* pPageView ) throw()
+{
+ DBG_ASSERT(pPageView,"SdrPageView ist NULL! [CL]");
+ DBG_ASSERT(pView, "SdrView ist NULL! [CL]");
+
+ if(pPageView!=NULL && pView != NULL)
+ {
+ pView->UnmarkAllObj( pPageView );
+
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+ if( pShape )
+ pView->MarkObj( pShape->pObj, pPageView );
+ }
+}
+
+//----------------------------------------------------------------------
+Reference< drawing::XShapeGroup > SAL_CALL SvxDrawPage::group( const Reference< drawing::XShapes >& xShapes )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ DBG_ASSERT(pPage,"SdrPage ist NULL! [CL]");
+ DBG_ASSERT(pView, "SdrView ist NULL! [CL]");
+
+ Reference< ::com::sun::star::drawing::XShapeGroup > xShapeGroup;
+ if(pPage==NULL||pView==NULL||!xShapes.is())
+ return xShapeGroup;
+
+ SdrPageView* pPageView = pView->ShowPage( pPage, Point() );
+
+ _SelectObjectsInView( xShapes, pPageView );
+
+ pView->GroupMarked();
+
+ pView->AdjustMarkHdl();
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ if( rMarkList.GetMarkCount() == 1 )
+ {
+ SdrObject* pObj = rMarkList.GetMark(0)->GetObj();
+ if( pObj )
+ {
+ Reference< ::com::sun::star::drawing::XShape > xShape = _CreateShape( pObj );
+ uno::Any aAny( xShape->queryInterface( ::getCppuType((const Reference< drawing::XShapeGroup >*)0) ));
+ aAny >>= xShapeGroup;
+ }
+ }
+
+ pView->HidePage(pPageView);
+
+ if( pModel )
+ pModel->SetChanged();
+
+ return xShapeGroup;
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxDrawPage::ungroup( const Reference< drawing::XShapeGroup >& aGroup )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ DBG_ASSERT(pPage,"SdrPage ist NULL! [CL]");
+ DBG_ASSERT(pView, "SdrView ist NULL! [CL]");
+
+ if(pPage==NULL||pView==NULL||!aGroup.is())
+ return;
+
+ SdrPageView* pPageView = pView->ShowPage( pPage, Point() );
+
+ Reference< drawing::XShape > xShape( aGroup, UNO_QUERY );
+ _SelectObjectInView( xShape, pPageView );
+ pView->UnGroupMarked();
+
+ pView->HidePage(pPageView);
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+SdrObject *SvxDrawPage::_CreateSdrObject( const Reference< drawing::XShape > & xShape ) throw()
+{
+ OUString aType( xShape->getShapeType() );
+ const OUString aPrefix( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.") );
+ if(aType.compareTo( aPrefix, aPrefix.getLength() ) == 0)
+ aType = aType.copy( aPrefix.getLength() );
+
+ sal_uInt16 nType;
+ sal_uInt32 nInventor;
+
+ GetTypeAndInventor( nType, nInventor, aType );
+ SdrObject* pNewObj = 0;
+
+ if( nType != 0 )
+ {
+ awt::Size aSize = xShape->getSize();
+ aSize.Width += 1;
+ aSize.Height += 1;
+ awt::Point aPos = xShape->getPosition();
+ Rectangle aRect( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) );
+
+ if( nInventor == SdrInventor && nType == OBJ_LINE )
+ {
+ pNewObj = new SdrPathObj( aRect.TopLeft(), aRect.BottomRight() );
+ }
+ else
+ pNewObj = SdrObjFactory::MakeNewObject( nInventor, nType, pPage );
+
+ if(pNewObj)
+ {
+ pNewObj->SetSnapRect(aRect);
+
+ if( pNewObj->ISA(E3dPolyScene))
+ {
+ // Szene initialisieren
+ E3dScene* pScene = (E3dScene*)pNewObj;
+
+ double fW = (double)aSize.Width;
+ double fH = (double)aSize.Height;
+
+ Camera3D aCam(pScene->GetCamera());
+ aCam.SetAutoAdjustProjection(sal_False);
+ aCam.SetViewWindow(- fW / 2, - fH / 2, fW, fH);
+ Vector3D aLookAt;
+ Vector3D aCamPos(0.0, 0.0, 10000.0);
+ aCam.SetPosAndLookAt(aCamPos, aLookAt);
+ aCam.SetFocalLength(100.0);
+ aCam.SetDefaults(aCamPos, aLookAt, 10000.0);
+ pScene->SetCamera(aCam);
+
+ pScene->SetRectsDirty();
+ pScene->InitTransformationSet();
+ }
+ }
+ }
+
+ return pNewObj;
+}
+
+//----------------------------------------------------------------------
+void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor, const OUString& aName ) const throw()
+{
+ rType = aSdrShapeIdentifierMap.getId( aName );
+
+ if(rType & E3D_INVENTOR_FLAG)
+ {
+ rInventor = E3dInventor;
+ rType &= ~E3D_INVENTOR_FLAG;
+ }
+ else
+ rInventor = SdrInventor;
+}
+
+//----------------------------------------------------------------------
+SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, SdrObject *pObj, SvxDrawPage *pPage ) throw()
+{
+ SvxShape* pRet = NULL;
+ switch( nInventor )
+ {
+ case E3dInventor:
+ {
+ switch( nType )
+ {
+ case E3D_POLYSCENE_ID :
+ pRet = new Svx3DSceneObject( pObj, pPage );
+ break;
+ case E3D_CUBEOBJ_ID :
+ pRet = new Svx3DCubeObject( pObj );
+ break;
+ case E3D_SPHEREOBJ_ID :
+ pRet = new Svx3DSphereObject( pObj );
+ break;
+ case E3D_LATHEOBJ_ID :
+ pRet = new Svx3DLatheObject( pObj );
+ break;
+ case E3D_EXTRUDEOBJ_ID :
+ pRet = new Svx3DExtrudeObject( pObj );
+ break;
+ case E3D_POLYGONOBJ_ID :
+ pRet = new Svx3DPolygonObject( pObj );
+ break;
+ default: // unbekanntes 3D-Objekt auf der Page
+ pRet = new SvxShape( pObj );
+ break;
+ }
+ break;
+ }
+ case SdrInventor:
+ {
+ switch( nType )
+ {
+// case OBJ_NONE:
+// break;
+ case OBJ_GRUP:
+ pRet = new SvxShapeGroup( pObj, pPage );
+ break;
+ case OBJ_LINE:
+ pRet = new SvxShapePolyPolygon( pObj , PolygonKind_LINE );
+ break;
+ case OBJ_RECT:
+ pRet = new SvxShapeRect( pObj );
+ break;
+ case OBJ_CIRC:
+ case OBJ_SECT:
+ case OBJ_CARC:
+ case OBJ_CCUT:
+ pRet = new SvxShapeCircle( pObj );
+ break;
+ case OBJ_POLY:
+ pRet = new SvxShapePolyPolygon( pObj , PolygonKind_POLY );
+ break;
+ case OBJ_PLIN:
+ pRet = new SvxShapePolyPolygon( pObj , PolygonKind_PLIN );
+ break;
+ case OBJ_SPLNLINE:
+ case OBJ_PATHLINE:
+ pRet = new SvxShapePolyPolygonBezier( pObj , PolygonKind_PATHLINE );
+ break;
+ case OBJ_SPLNFILL:
+ case OBJ_PATHFILL:
+ pRet = new SvxShapePolyPolygonBezier( pObj , PolygonKind_PATHFILL );
+ break;
+ case OBJ_FREELINE:
+ pRet = new SvxShapePolyPolygonBezier( pObj , PolygonKind_FREELINE );
+ break;
+ case OBJ_FREEFILL:
+ pRet = new SvxShapePolyPolygonBezier( pObj , PolygonKind_FREEFILL );
+ break;
+ case OBJ_CAPTION: // todo: caption?
+ case OBJ_TEXT:
+ pRet = new SvxShape( pObj );
+ break;
+ case OBJ_GRAF:
+ pRet = new SvxGraphicObject( pObj );
+ break;
+ case OBJ_OLE2:
+ pRet = new SvxShape( pObj, ImplGetSvxOle2PropertyMap() );
+ break;
+ case OBJ_EDGE:
+ pRet = new SvxShapeConnector( pObj );
+ break;
+ case OBJ_PATHPOLY:
+ pRet = new SvxShapePolyPolygon( pObj , PolygonKind_PATHPOLY );
+ break;
+ case OBJ_PATHPLIN:
+ pRet = new SvxShapePolyPolygon( pObj , PolygonKind_PATHPLIN );
+ break;
+ case OBJ_PAGE:
+ pRet = new SvxShape( pObj );
+ break;
+ case OBJ_MEASURE:
+ pRet = new SvxShapeDimensioning( pObj );
+ break;
+// case OBJ_DUMMY:
+// break;
+// case OBJ_FRAME:
+// break;
+ case OBJ_UNO:
+ pRet = new SvxShapeControl( pObj );
+ break;
+ default: // unbekanntes 2D-Objekt auf der Page
+ DBG_ERROR("Nicht implementierter Starone-Shape erzeugt! [CL]");
+ pRet = new SvxShape( pObj );
+ break;
+ }
+ break;
+ }
+ default: // Unbekannter Inventor
+ {
+ DBG_ERROR("AW: Unknown Inventor in SvxDrawPage::_CreateShape()");
+ break;
+ }
+ }
+
+ if(pRet)
+ {
+ sal_uInt32 nObjId = nType;
+
+ if( nInventor == E3dInventor )
+ nObjId |= E3D_INVENTOR_FLAG;
+
+ switch(nObjId)
+ {
+ case OBJ_CCUT: // Kreisabschnitt
+ case OBJ_CARC: // Kreisbogen
+ case OBJ_SECT: // Kreissektor
+ nObjId = OBJ_CIRC;
+ break;
+
+ case E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG:
+ nObjId = E3D_SCENE_ID | E3D_INVENTOR_FLAG;
+ break;
+ }
+
+ UHashMapEntry* pMap = pSdrShapeIdentifierMap;
+ while (pMap->aIdentifier.getLength())
+ {
+ if(pMap->nId == nObjId)
+ {
+ OUString aIdent( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.") );
+ aIdent += pMap->aIdentifier;
+ pRet->SetShapeType(aIdent);
+ break ;
+ }
+ pMap++;
+ }
+ }
+
+ return pRet;
+}
+
+//----------------------------------------------------------------------
+Reference< drawing::XShape > SvxDrawPage::_CreateShape( SdrObject *pObj ) const throw()
+{
+ Reference< drawing::XShape > xShape( GetXShapeForSdrObject( pObj ) );
+ if( !xShape.is() )
+ xShape = CreateShapeByTypeAndInventor(pObj->GetObjIdentifier(),
+ pObj->GetObjInventor(),
+ pObj,
+ (SvxDrawPage*)this);
+ return xShape;
+}
+
+//----------------------------------------------------------------------
+SdrObject *SvxDrawPage::CreateSdrObject( const Reference< drawing::XShape > & xShape ) throw()
+{
+ SdrObject* pObj = _CreateSdrObject( xShape );
+ if( pObj && !pObj->IsInserted() )
+ pPage->InsertObject( pObj );
+
+ return pObj;
+}
+
+//----------------------------------------------------------------------
+// ::com::sun::star::lang::XServiceInfo
+//----------------------------------------------------------------------
+OUString SAL_CALL SvxDrawPage::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxDrawPage"));
+}
+
+sal_Bool SAL_CALL SvxDrawPage::supportsService( const OUString& ServiceName )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxDrawPage::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSeq( 1 );
+ aSeq.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ShapeCollection" ));
+ return aSeq;
+}
+
+SvxShape* CreateSvxShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor ) throw()
+{
+ return SvxDrawPage::CreateShapeByTypeAndInventor( nType, nInventor );
+}
+
+
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
new file mode 100644
index 0000000000..00051d5dcf
--- /dev/null
+++ b/svx/source/unodraw/unoprov.cxx
@@ -0,0 +1,643 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoprov.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+
+#include "unotext.hxx"
+#include "unoshprp.hxx"
+#include "svdobj.hxx"
+#include "globl3d.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+SfxItemPropertyMap* ImplGetSvxShapePropertyMap()
+{
+ static SfxItemPropertyMap aShapePropertyMap_Impl[] =
+ {
+ EDGERADIUS_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return aShapePropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxConnectorPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap aConnectorPropertyMap_Impl[] =
+ {
+ SPECIAL_CONNECTOR_PROPERTIES
+ EDGERADIUS_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return aConnectorPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxDimensioningPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap aDimensioningPropertyMap_Impl[] =
+ {
+ SPECIAL_DIMENSIONING_PROPERTIES
+ EDGERADIUS_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return aDimensioningPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxCirclePropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap aCirclePropertyMap_Impl[] =
+ {
+ SPECIAL_CIRCLE_PROPERTIES
+ EDGERADIUS_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return aCirclePropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxPolyPolygonPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap aPolyPolygonPropertyMap_Impl[] =
+ {
+ SPECIAL_POLYPOLYGON_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return aPolyPolygonPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxPolyPolygonBezierPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap aPolyPolygonBezierPropertyMap_Impl[] =
+ {
+ SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return aPolyPolygonBezierPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxGraphicObjectPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap aGraphicObjectPropertyMap_Impl[] =
+ {
+ SPECIAL_GRAPHOBJ_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ { MAP_CHAR_LEN("IsMirrored"), OWN_ATTR_MIRRORED , &::getCppuBooleanType(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ {0,0,0,0,0}
+ };
+
+ return aGraphicObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DSceneObjectPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap a3DSceneObjectPropertyMap_Impl[] =
+ {
+ SPECIAL_3DSCENEOBJECT_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return a3DSceneObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DCubeObjectPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap a3DCubeObjectPropertyMap_Impl[] =
+ {
+ SPECIAL_3DCUBEOBJECT_PROPERTIES
+ MISC_3D_OBJ_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return a3DCubeObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DSphereObjectPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap a3DSphereObjectPropertyMap_Impl[] =
+ {
+ SPECIAL_3DSPHEREOBJECT_PROPERTIES
+ MISC_3D_OBJ_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ {0,0,0,0,0}
+ };
+ return a3DSphereObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DLatheObjectPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap a3DLatheObjectPropertyMap_Impl[] =
+ {
+ SPECIAL_3DLATHEOBJECT_PROPERTIES
+ SPECIAL_3DBACKSCALE_PROPERTIES
+ MISC_3D_OBJ_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return a3DLatheObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DExtrudeObjectPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap a3DExtrudeObjectPropertyMap_Impl[] =
+ {
+ SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
+ SPECIAL_3DBACKSCALE_PROPERTIES
+ MISC_3D_OBJ_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return a3DExtrudeObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvx3DPolygonObjectPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap a3DPolygonObjectPropertyMap_Impl[] =
+ {
+ SPECIAL_3DPOLYGONOBJECT_PROPERTIES
+ MISC_3D_OBJ_PROPERTIES
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return a3DPolygonObjectPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxAllPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap aAllPropertyMap_Impl[] =
+ {
+ SHADOW_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ FILL_PROPERTIES
+ EDGERADIUS_PROPERTIES
+ TEXT_PROPERTIES
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SPECIAL_CONNECTOR_PROPERTIES
+ SPECIAL_DIMENSIONING_PROPERTIES
+ SPECIAL_CIRCLE_PROPERTIES
+ SPECIAL_POLYPOLYGON_PROPERTIES
+ SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
+ SPECIAL_GRAPHOBJ_PROPERTIES
+ SPECIAL_3DSCENEOBJECT_PROPERTIES
+ MISC_3D_OBJ_PROPERTIES
+ SPECIAL_3DCUBEOBJECT_PROPERTIES
+ SPECIAL_3DSPHEREOBJECT_PROPERTIES
+ SPECIAL_3DLATHEOBJECT_PROPERTIES
+ SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
+ SPECIAL_3DBACKSCALE_PROPERTIES
+ SPECIAL_3DPOLYGONOBJECT_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return aAllPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxGroupPropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap aGroupPropertyMap_Impl[] =
+ {
+ SVX_UNOEDIT_PARA_PROPERTIES,
+ SVX_UNOEDIT_CHAR_PROPERTIES,
+ SVX_UNOEDIT_SIMPLE_FONT_PROPERTIES,
+ SHADOW_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ FILL_PROPERTIES
+ EDGERADIUS_PROPERTIES
+ TEXT_PROPERTIES
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SPECIAL_CONNECTOR_PROPERTIES
+ SPECIAL_DIMENSIONING_PROPERTIES
+ SPECIAL_CIRCLE_PROPERTIES
+ SPECIAL_POLYPOLYGON_PROPERTIES
+ SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
+ SPECIAL_GRAPHOBJ_PROPERTIES
+ SPECIAL_3DSCENEOBJECT_PROPERTIES
+ MISC_3D_OBJ_PROPERTIES
+ AUTOSHAPE_PROPERTIES
+ {0,0,0,0,0}
+ };
+
+ return aGroupPropertyMap_Impl;
+}
+
+SfxItemPropertyMap* ImplGetSvxOle2PropertyMap()
+{
+ // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+ static SfxItemPropertyMap aOle2PropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , &::getCppuType(( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ { MAP_CHAR_LEN(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence<sal_Int8>*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ { MAP_CHAR_LEN("Model"), OWN_ATTR_OLEMODEL , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ { MAP_CHAR_LEN("OriginalSize"), OWN_ATTR_OLESIZE , &::getCppuType(( const ::com::sun::star::awt::Size*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ { MAP_CHAR_LEN("CLSID"), OWN_ATTR_CLSID , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
+ {0,0,0,0,0}
+ };
+
+ return aOle2PropertyMap_Impl;
+}
+
+// ---------------------------------------------------------------------
+
+SvxUnoPropertyMapProvider aSvxMapProvider;
+
+UHashMapEntry pSdrShapeIdentifierMap[] =
+{
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("RectangleShape"), OBJ_RECT ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("EllipseShape"), OBJ_CIRC ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("ControlShape"), OBJ_UNO ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("ConnectorShape"), OBJ_EDGE ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("MeasureShape"), OBJ_MEASURE ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("LineShape"), OBJ_LINE ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("PolyPolygonShape"), OBJ_POLY ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("PolyLineShape"), OBJ_PLIN ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("OpenBezierShape"), OBJ_PATHLINE ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("ClosedBezierShape"), OBJ_PATHFILL ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("OpenFreeHandShape"), OBJ_FREELINE ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("ClosedFreeHandShape"), OBJ_FREEFILL ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("PolyPolygonPathShape"), OBJ_PATHPOLY ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("PolyLinePathShape"), OBJ_PATHPLIN ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("GraphicObjectShape"), OBJ_GRAF ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("GroupShape"), OBJ_GRUP ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("TextShape"), OBJ_TEXT ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("OLE2Shape"), OBJ_OLE2 ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("PageShape"), OBJ_PAGE ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("FrameShape"), OBJ_FRAME ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("CaptionShape"), OBJ_CAPTION ),
+
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("Shape3DSceneObject"), E3D_SCENE_ID | E3D_INVENTOR_FLAG ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("Shape3DCubeObject"), E3D_CUBEOBJ_ID | E3D_INVENTOR_FLAG ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("Shape3DSphereObject"), E3D_SPHEREOBJ_ID | E3D_INVENTOR_FLAG ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("Shape3DLatheObject"), E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG ),
+ UHashMapEntry (RTL_CONSTASCII_STRINGPARAM(""), 0 )
+};
+
+// ---------------------------------------------------------------------
+
+UHashMap aSdrShapeIdentifierMap( pSdrShapeIdentifierMap );
+
+/***********************************************************************
+* class UHashMap *
+***********************************************************************/
+
+UHashMap::UHashMap( UHashMapEntry* pMap )
+{
+ while( pMap->aIdentifier.getLength() )
+ {
+ OUString aStr( pMap->aIdentifier );
+ size_t nHash = aStr.hashCode() & (HASHARRAYSIZE-1);
+
+ m_aHashList[nHash].Insert(pMap);
+ pMap++;
+ }
+}
+
+// ---------------------------------------------------------------------
+
+UINT32 UHashMap::getId( const OUString& rCompareString )
+{
+ size_t nHash = rCompareString.hashCode() & (HASHARRAYSIZE-1);
+
+ UHashMapEntryList& rList = m_aHashList[nHash];
+
+ UHashMapEntry * pMap = rList.First();
+
+ while(pMap)
+ {
+ if( rCompareString == pMap->aIdentifier )
+ return pMap->nId;
+
+ pMap = rList.Next();
+ }
+
+ return UHASHMAP_NOTFOUND;
+}
+
+/***********************************************************************
+* class SvxUnoPropertyMapProvider *
+***********************************************************************/
+
+EXTERN_C
+#if defined( PM2 ) && (!defined( CSET ) && !defined ( MTW ) && !defined( WTC ))
+int _stdcall
+#else
+#ifdef WNT
+int _cdecl
+#else
+int
+#endif
+#endif
+Svx_CompareMap(const void* pSmaller, const void* pBigger )
+{
+ int nDiff = strcmp( ((const SfxItemPropertyMap*)pSmaller)->pName,
+ ((const SfxItemPropertyMap*)pBigger)->pName );
+ return nDiff;
+}
+
+// ---------------------------------------------------------------------
+
+SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
+{
+ for(UINT16 i=0;i<SVXMAP_END;aMapArr[i++]=NULL);
+}
+
+// ---------------------------------------------------------------------
+
+void SvxUnoPropertyMapProvider::Sort(USHORT nId)
+{
+ SfxItemPropertyMap* pTemp = aMapArr[nId];
+ UINT16 i = 0;
+ while(pTemp[i].pName) { i++; }
+ qsort(aMapArr[nId], i, sizeof(SfxItemPropertyMap), Svx_CompareMap);
+}
+
+// ---------------------------------------------------------------------
+
+SfxItemPropertyMap* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId)
+{
+ DBG_ASSERT(nPropertyId < SVXMAP_END, "Id ?" )
+ if(!aMapArr[nPropertyId]) {
+ switch(nPropertyId) {
+ case SVXMAP_SHAPE: aMapArr[SVXMAP_SHAPE]=ImplGetSvxShapePropertyMap(); break;
+ case SVXMAP_CONNECTOR: aMapArr[SVXMAP_CONNECTOR]=ImplGetSvxConnectorPropertyMap(); break;
+ case SVXMAP_DIMENSIONING: aMapArr[SVXMAP_DIMENSIONING]=ImplGetSvxDimensioningPropertyMap(); break;
+ case SVXMAP_CIRCLE: aMapArr[SVXMAP_CIRCLE]=ImplGetSvxCirclePropertyMap(); break;
+ case SVXMAP_POLYPOLYGON: aMapArr[SVXMAP_POLYPOLYGON]=ImplGetSvxPolyPolygonPropertyMap(); break;
+ case SVXMAP_POLYPOLYGONBEZIER: aMapArr[SVXMAP_POLYPOLYGONBEZIER]=ImplGetSvxPolyPolygonBezierPropertyMap(); break;
+ case SVXMAP_GRAPHICOBJECT: aMapArr[SVXMAP_GRAPHICOBJECT]=ImplGetSvxGraphicObjectPropertyMap(); break;
+ case SVXMAP_3DSCENEOBJECT: aMapArr[SVXMAP_3DSCENEOBJECT]=ImplGetSvx3DSceneObjectPropertyMap(); break;
+ case SVXMAP_3DCUBEOBJEKT: aMapArr[SVXMAP_3DCUBEOBJEKT]=ImplGetSvx3DCubeObjectPropertyMap(); break;
+ case SVXMAP_3DSPHEREOBJECT: aMapArr[SVXMAP_3DSPHEREOBJECT]=ImplGetSvx3DSphereObjectPropertyMap(); break;
+ case SVXMAP_3DLATHEOBJECT: aMapArr[SVXMAP_3DLATHEOBJECT]=ImplGetSvx3DLatheObjectPropertyMap(); break;
+ case SVXMAP_3DEXTRUDEOBJECT: aMapArr[SVXMAP_3DEXTRUDEOBJECT]=ImplGetSvx3DExtrudeObjectPropertyMap(); break;
+ case SVXMAP_3DPOLYGONOBJECT: aMapArr[SVXMAP_3DPOLYGONOBJECT]=ImplGetSvx3DPolygonObjectPropertyMap(); break;
+ case SVXMAP_ALL: aMapArr[SVXMAP_ALL]=ImplGetSvxAllPropertyMap(); break;
+ case SVXMAP_GROUP: aMapArr[SVXMAP_GROUP]=ImplGetSvxGroupPropertyMap(); break;
+ default:
+ DBG_ERROR( "Unknown property map for SvxUnoPropertyMapProvider!" );
+ }
+ Sort(nPropertyId);
+ }
+ return aMapArr[nPropertyId];
+}
+
+// #####################################################################
+
+/** returns an empty UString(). most times sufficient */
+::rtl::OUString SAL_CALL SvxServiceInfoHelper::getImplementationName() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return ::rtl::OUString();
+}
+
+/** the base implementation iterates over the service names from <code>getSupportedServiceNames</code> */
+sal_Bool SAL_CALL SvxServiceInfoHelper::supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException)
+{
+ return supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+sal_Bool SAL_CALL SvxServiceInfoHelper::supportsService( const ::rtl::OUString& ServiceName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& SupportedServices ) throw()
+{
+ const ::rtl::OUString * pArray = SupportedServices.getConstArray();
+ for( INT32 i = 0; i < SupportedServices.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return TRUE;
+ return FALSE;
+}
+
+/** the base implementation has no supported services */
+::com::sun::star::uno::Sequence< ::rtl::OUString > SvxServiceInfoHelper::getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Sequence< ::rtl::OUString> aSeq(0);
+ return aSeq;
+}
+
+/** this method concatenates the given sequences and returns the result
+ */
+::com::sun::star::uno::Sequence< ::rtl::OUString > SvxServiceInfoHelper::concatSequences( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq1, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq2 ) throw()
+{
+ const sal_Int32 nLen1 = rSeq1.getLength();
+ const sal_Int32 nLen2 = rSeq2.getLength();
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq( nLen1 + nLen2 );
+
+ ::rtl::OUString* pStrings = aSeq.getArray();
+
+ sal_Int32 nIdx;
+ const ::rtl::OUString* pStringSrc = rSeq1.getConstArray();
+ for( nIdx = 0; nIdx < nLen1; nIdx++ )
+ *pStrings++ = *pStringSrc++;
+
+ pStringSrc = rSeq2.getConstArray();
+ for( nIdx = 0; nIdx < nLen2; nIdx++ )
+ *pStrings++ = *pStringSrc++;
+
+ return aSeq;
+}
+
+/** this method adds a variable number of char pointer to a given Sequence
+ */
+void SvxServiceInfoHelper::addToSequence( ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq, UINT16 nServices, /* char * */ ... ) throw()
+{
+ UINT32 nCount = rSeq.getLength();
+
+ rSeq.realloc( nCount + nServices );
+ OUString* pStrings = rSeq.getArray();
+
+ va_list marker;
+ va_start( marker, nServices );
+ for( UINT16 i = 0 ; i < nServices; i++ )
+ pStrings[nCount++] = OUString::createFromAscii(va_arg( marker, char*));
+ va_end( marker );
+}
+
+
+
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
new file mode 100644
index 0000000000..02377871fa
--- /dev/null
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -0,0 +1,1386 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoshap2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCESEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequence.hpp>
+#endif
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_ //autogen
+#include <vos/mutex.hxx>
+#endif
+#ifndef _FLTCALL_HXX
+#include <svtools/fltcall.hxx>
+#endif
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "unoprnms.hxx"
+#include "unoshape.hxx"
+#include "unopage.hxx"
+#include "svdobj.hxx"
+#include "svdpage.hxx"
+#include "svdmodel.hxx"
+#include "svdouno.hxx"
+
+using namespace ::osl;
+using namespace ::vos;
+using namespace ::rtl;
+using namespace ::cppu;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+
+#define INTERFACE_TYPE( xint ) \
+ ::getCppuType((const Reference< xint >*)0)
+
+#define QUERYINT( xint ) \
+ if( rType == ::getCppuType((const Reference< xint >*)0) ) \
+ aAny <<= Reference< xint >(this)
+
+class GDIMetaFile;
+class SvStream;
+sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
+ PFilterCallback pCallback=NULL, void * pCallerData=NULL,
+ sal_Bool bPlaceable=sal_True);
+
+/***********************************************************************
+* class SvxShapeGroup *
+***********************************************************************/
+uno::Sequence< uno::Type > SvxShapeGroup::maTypeSequence;
+
+SvxShapeGroup::SvxShapeGroup( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw() :
+ SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_GROUP) ),
+ pPage( pDrawPage )
+{
+ if( pPage )
+ pPage->acquire();
+}
+
+//----------------------------------------------------------------------
+SvxShapeGroup::~SvxShapeGroup() throw()
+{
+ if( pPage )
+ pPage->release();
+}
+
+//----------------------------------------------------------------------
+void SvxShapeGroup::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw()
+{
+ if( pPage )
+ {
+ pPage->release();
+ pPage = NULL;
+ }
+
+ SvxShape::Create( pNewObj, pNewPage );
+
+ pPage = pNewPage;
+ if( pPage )
+ pPage->acquire();
+
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShapeGroup::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
+{
+ return OWeakAggObject::queryInterface( rType );
+}
+
+uno::Any SAL_CALL SvxShapeGroup::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT( drawing::XShapeGroup );
+ else QUERYINT( drawing::XShapes );
+ else QUERYINT( container::XIndexAccess );
+ else QUERYINT( container::XElementAccess );
+ else
+ aAny <<= SvxShape::queryAggregation( rType );
+
+ return aAny;
+}
+
+void SAL_CALL SvxShapeGroup::acquire() throw(uno::RuntimeException)
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxShapeGroup::release() throw(uno::RuntimeException)
+{
+ OWeakAggObject::release();
+}
+
+uno::Sequence< uno::Type > SAL_CALL SvxShapeGroup::getTypes()
+ throw (uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ const uno::Sequence< uno::Type > aBaseTypes( SvxShape::getTypes() );
+ const uno::Type* pBaseTypes = aBaseTypes.getConstArray();
+ const sal_Int32 nBaseTypes = aBaseTypes.getLength();
+ const sal_Int32 nOwnTypes = 2; // !DANGER! Keep this updated!
+
+ maTypeSequence.realloc( nBaseTypes + nOwnTypes );
+ uno::Type* pTypes = maTypeSequence.getArray();
+
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XShapes>*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XShapeGroup>*)0);
+
+ for( sal_Int32 nType = 0; nType < nBaseTypes; nType++ )
+ *pTypes++ = *pBaseTypes++;
+ }
+ return maTypeSequence;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxShapeGroup::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+// ::com::sun::star::drawing::XShape
+
+//----------------------------------------------------------------------
+OUString SAL_CALL SvxShapeGroup::getShapeType()
+ throw( uno::RuntimeException )
+{
+ return SvxShape::getShapeType();
+}
+
+//------------------------------------------------------------------1----
+awt::Point SAL_CALL SvxShapeGroup::getPosition() throw(uno::RuntimeException)
+{
+ return SvxShape::getPosition();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeGroup::setPosition( const awt::Point& Position ) throw(uno::RuntimeException)
+{
+ SvxShape::setPosition(Position);
+}
+
+//----------------------------------------------------------------------
+
+awt::Size SAL_CALL SvxShapeGroup::getSize() throw(uno::RuntimeException)
+{
+ return SvxShape::getSize();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeGroup::setSize( const awt::Size& rSize )
+ throw(beans::PropertyVetoException, uno::RuntimeException)
+{
+ SvxShape::setSize( rSize );
+}
+
+// drawing::XShapeGroup
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeGroup::enterGroup( ) throw(uno::RuntimeException)
+{
+ // Todo
+// pDrView->EnterMarkedGroup();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeGroup::leaveGroup( ) throw(uno::RuntimeException)
+{
+ // Todo
+// pDrView->LeaveOneGroup();
+}
+
+//----------------------------------------------------------------------
+
+// XShapes
+void SAL_CALL SvxShapeGroup::add( const uno::Reference< drawing::XShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+ if(pObj == NULL || pPage == NULL || pShape == NULL || NULL != pShape->GetSdrObject())
+ throw uno::RuntimeException();
+
+ SdrObject* pSdrShape = pPage->_CreateSdrObject( xShape );
+ pObj->GetSubList()->NbcInsertObject( pSdrShape );
+
+ if(pShape)
+ pShape->Create( pSdrShape, pPage );
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SdrObject* pSdrShape = NULL;
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+ if( pShape )
+ pSdrShape = pShape->GetSdrObject();
+
+ if(pObj == NULL || pSdrShape == NULL || pSdrShape->GetObjList()->GetOwnerObj() != pObj )
+ throw uno::RuntimeException();
+
+ SdrObjList& rList = *pSdrShape->GetObjList();
+
+ const nObjCount = rList.GetObjCount();
+ sal_uInt32 nObjNum = 0;
+ while( nObjNum < nObjCount )
+ {
+ if(rList.GetObj( nObjNum ) == pSdrShape )
+ break;
+ nObjNum++;
+ }
+
+ if( nObjNum < nObjCount )
+ {
+ delete rList.NbcRemoveObject( nObjNum );
+ pShape->InvalidateSdrObject();
+ }
+ else
+ {
+ DBG_ASSERT( 0, "Fatality! SdrObject is not belonging to its SdrObjList! [CL]" );
+ }
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+// XIndexAccess
+
+//----------------------------------------------------------------------
+sal_Int32 SAL_CALL SvxShapeGroup::getCount() throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ sal_Int32 nRetval = 0;
+
+ if(pObj && pObj->GetSubList())
+ nRetval = pObj->GetSubList()->GetObjCount();
+ else
+ throw uno::RuntimeException();
+
+ return nRetval;
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShapeGroup::getByIndex( sal_Int32 Index )
+ throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( pObj == NULL || pObj->GetSubList() == NULL )
+ throw uno::RuntimeException();
+
+
+ if( pObj->GetSubList()->GetObjCount() <= Index )
+ throw lang::IndexOutOfBoundsException();
+
+ Reference< drawing::XShape > xShape;
+ SdrObject* pDestObj = pObj->GetSubList()->GetObj( Index );
+
+ if(pDestObj)
+ xShape = pPage->_CreateShape(pDestObj);
+ else
+ throw lang::IndexOutOfBoundsException();
+
+ return Any( &xShape, ::getCppuType((const Reference< drawing::XShape >*)0) );
+}
+
+// ::com::sun::star::container::XElementAccess
+
+//----------------------------------------------------------------------
+uno::Type SAL_CALL SvxShapeGroup::getElementType() throw( uno::RuntimeException )
+{
+ return ::getCppuType(( const Reference< drawing::XShape >*)0);
+}
+
+//----------------------------------------------------------------------
+sal_Bool SAL_CALL SvxShapeGroup::hasElements() throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ return pObj && pObj->GetSubList() && (pObj->GetSubList()->GetObjCount() > 0);
+}
+
+//----------------------------------------------------------------------
+// ::com::sun::star::lang::XServiceInfo
+
+uno::Sequence< OUString > SAL_CALL SvxShapeGroup::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 1, "com.sun.star.drawing.GroupShape" );
+ return aSeq;
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+uno::Sequence< uno::Type > SvxShapeConnector::maTypeSequence;
+
+SvxShapeConnector::SvxShapeConnector( SdrObject* pObj ) throw() :
+ SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_CONNECTOR) )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapeConnector::~SvxShapeConnector() throw()
+{
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShapeConnector::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
+{
+ return OWeakAggObject::queryInterface( rType );
+}
+
+uno::Any SAL_CALL SvxShapeConnector::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT( drawing::XConnectorShape );
+ else
+ return SvxShape::queryAggregation( rType );
+
+ return aAny;
+}
+
+void SAL_CALL SvxShapeConnector::acquire() throw(uno::RuntimeException)
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxShapeConnector::release() throw(uno::RuntimeException)
+{
+ OWeakAggObject::release();
+}
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxShapeConnector::getTypes()
+ throw (uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ const uno::Sequence< uno::Type > aBaseTypes( SvxShape::getTypes() );
+ const uno::Type* pBaseTypes = aBaseTypes.getConstArray();
+ const sal_Int32 nBaseTypes = aBaseTypes.getLength();
+ const sal_Int32 nOwnTypes = 1; // !DANGER! Keep this updated!
+
+ maTypeSequence.realloc( nBaseTypes + nOwnTypes );
+ uno::Type* pTypes = maTypeSequence.getArray();
+
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XConnectorShape>*)0);
+
+ for( sal_Int32 nType = 0; nType < nBaseTypes; nType++ )
+ *pTypes++ = *pBaseTypes++;
+ }
+ return maTypeSequence;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxShapeConnector::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+// ::com::sun::star::drawing::XShape
+
+//----------------------------------------------------------------------
+OUString SAL_CALL SvxShapeConnector::getShapeType()
+ throw( uno::RuntimeException )
+{
+ return SvxShape::getShapeType();
+}
+
+//------------------------------------------------------------------1----
+awt::Point SAL_CALL SvxShapeConnector::getPosition() throw(uno::RuntimeException)
+{
+ return SvxShape::getPosition();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeConnector::setPosition( const awt::Point& Position ) throw(uno::RuntimeException)
+{
+ SvxShape::setPosition(aPosition);
+}
+
+//----------------------------------------------------------------------
+
+awt::Size SAL_CALL SvxShapeConnector::getSize() throw(uno::RuntimeException)
+{
+ return SvxShape::getSize();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeConnector::setSize( const awt::Size& rSize )
+ throw(beans::PropertyVetoException, uno::RuntimeException)
+{
+ SvxShape::setSize( rSize );
+}
+
+//----------------------------------------------------------------------
+
+// XConnectorShape
+
+void SAL_CALL SvxShapeConnector::connectStart( const uno::Reference< drawing::XConnectableShape >& xShape, drawing::ConnectionType nPos ) throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ Reference< drawing::XShape > xRef( xShape, UNO_QUERY );
+ SvxShape* pShape = SvxShape::getImplementation( xRef );
+
+ if( pShape )
+ pObj->ConnectToNode( sal_True, pShape->pObj );
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeConnector::connectEnd( const uno::Reference< drawing::XConnectableShape >& xShape, drawing::ConnectionType nPos )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ Reference< drawing::XShape > xRef( xShape, UNO_QUERY );
+ SvxShape* pShape = SvxShape::getImplementation( xRef );
+
+ if( pObj && pShape )
+ pObj->ConnectToNode( sal_False, pShape->pObj );
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeConnector::disconnectBegin( const uno::Reference< drawing::XConnectableShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj)
+ pObj->DisconnectFromNode( sal_True );
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeConnector::disconnectEnd( const uno::Reference< drawing::XConnectableShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj)
+ pObj->DisconnectFromNode( sal_False );
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+// ::com::sun::star::lang::XServiceInfo
+//----------------------------------------------------------------------
+uno::Sequence< OUString > SAL_CALL SvxShapeConnector::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 5, "com.sun.star.drawing.ConnectorShapeDescriptor",
+ "com.sun.star.drawing.ConnectorShape",
+ "com.sun.star.drawing.Text",
+ "com.sun.star.drawing.RotationDescriptor",
+ "com.sun.star.drawing.ShadowDescriptor");
+ return aSeq;
+}
+
+/***********************************************************************
+* class SvxShapeControl *
+***********************************************************************/
+uno::Sequence< uno::Type > SvxShapeControl::maTypeSequence;
+
+SvxShapeControl::SvxShapeControl( SdrObject* pObj ) throw() :
+ SvxShape( pObj )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapeControl::~SvxShapeControl() throw()
+{
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShapeControl::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
+{
+ return OWeakAggObject::queryInterface( rType );
+}
+
+uno::Any SAL_CALL SvxShapeControl::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT( drawing::XControlShape );
+ else
+ return SvxShape::queryAggregation( rType );
+
+ return aAny;
+}
+
+void SAL_CALL SvxShapeControl::acquire() throw(uno::RuntimeException)
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxShapeControl::release() throw(uno::RuntimeException)
+{
+ OWeakAggObject::release();
+}
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxShapeControl::getTypes()
+ throw (uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ const uno::Sequence< uno::Type > aBaseTypes( SvxShape::getTypes() );
+ const uno::Type* pBaseTypes = aBaseTypes.getConstArray();
+ const sal_Int32 nBaseTypes = aBaseTypes.getLength();
+ const sal_Int32 nOwnTypes = 1; // !DANGER! Keep this updated!
+
+ maTypeSequence.realloc( nBaseTypes + nOwnTypes );
+ uno::Type* pTypes = maTypeSequence.getArray();
+
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XControlShape>*)0);
+
+ for( sal_Int32 nType = 0; nType < nBaseTypes; nType++ )
+ *pTypes++ = *pBaseTypes++;
+ }
+ return maTypeSequence;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxShapeControl::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+// ::com::sun::star::drawing::XShape
+
+//----------------------------------------------------------------------
+OUString SAL_CALL SvxShapeControl::getShapeType()
+ throw( uno::RuntimeException )
+{
+ return SvxShape::getShapeType();
+}
+
+//------------------------------------------------------------------1----
+awt::Point SAL_CALL SvxShapeControl::getPosition() throw(uno::RuntimeException)
+{
+ return SvxShape::getPosition();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeControl::setPosition( const awt::Point& Position ) throw(uno::RuntimeException)
+{
+ SvxShape::setPosition(Position);
+}
+
+//----------------------------------------------------------------------
+
+awt::Size SAL_CALL SvxShapeControl::getSize() throw(uno::RuntimeException)
+{
+ return SvxShape::getSize();
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeControl::setSize( const awt::Size& rSize )
+ throw(beans::PropertyVetoException, uno::RuntimeException)
+{
+ SvxShape::setSize( rSize );
+}
+
+//----------------------------------------------------------------------
+// XControlShape
+
+Reference< awt::XControlModel > SAL_CALL SvxShapeControl::getControl()
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ Reference< awt::XControlModel > xModel;
+
+ SdrUnoObj* pUnoObj = PTR_CAST(SdrUnoObj, pObj);
+ if( pUnoObj )
+ xModel = pUnoObj->GetUnoControlModel();
+
+ return xModel;
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeControl::setControl( const Reference< awt::XControlModel >& xControl )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SdrUnoObj* pUnoObj = PTR_CAST(SdrUnoObj, pObj);
+ if( pUnoObj )
+ pUnoObj->SetUnoControlModel( xControl );
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+// XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxShapeControl::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 1, "com.sun.star.drawing.ControlShape" );
+ return aSeq;
+}
+
+/***********************************************************************
+* class SvxShapeDimensioning *
+***********************************************************************/
+
+//----------------------------------------------------------------------
+SvxShapeDimensioning::SvxShapeDimensioning( SdrObject* pObj ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_DIMENSIONING) )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapeDimensioning::~SvxShapeDimensioning() throw()
+{
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxShapeDimensioning::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 7, "com.sun.star.drawing.LineShapeDescriptor",
+ "com.sun.star.drawing.LineShape",
+ "com.sun.star.drawing.DimensioningShapeDescriptor",
+ "com.sun.star.drawing.DimensioningShape",
+ "com.sun.star.drawing.Text",
+ "com.sun.star.drawing.RotationDescriptor",
+ "com.sun.star.drawing.ShadowDescriptor" );
+ return aSeq;
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+//----------------------------------------------------------------------
+SvxShapeCircle::SvxShapeCircle( SdrObject* pObj ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_CIRCLE) )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapeCircle::~SvxShapeCircle() throw()
+{
+}
+
+// ::com::sun::star::lang::XServiceInfo
+// XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxShapeCircle::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 9, "com.sun.star.drawing.LineShapeDescriptor",
+ "com.sun.star.drawing.LineShape",
+ "com.sun.star.drawing.AreaShapeDescriptor",
+ "com.sun.star.drawing.AreaShape",
+ "com.sun.star.drawing.EllipseShapeDescriptor",
+ "com.sun.star.drawing.EllipseShape",
+ "com.sun.star.drawing.Text",
+ "com.sun.star.drawing.RotationDescriptor",
+ "com.sun.star.drawing.ShadowDescriptor");
+ return aSeq;
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+#include "svdopath.hxx"
+
+//----------------------------------------------------------------------
+SvxShapePolyPolygon::SvxShapePolyPolygon( SdrObject* pObj , drawing::PolygonKind eNew )
+ throw( com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException) : SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGON) ),
+ ePolygonKind( eNew )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapePolyPolygon::~SvxShapePolyPolygon() throw()
+{
+}
+
+//----------------------------------------------------------------------
+
+void SAL_CALL SvxShapePolyPolygon::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYPOLYGON)) == 0 )
+ {
+ drawing::PointSequenceSequence* pOuterSequence = (drawing::PointSequenceSequence*)aValue.getValue();
+
+ if( !pOuterSequence || aValue.getValueType() != ::getCppuType((const drawing::PointSequenceSequence*)0) )
+ throw lang::IllegalArgumentException();
+
+ // Koordinaten in das PolyPolygon packen
+ sal_Int32 nOuterSequenceCount = pOuterSequence->getLength();
+
+ // Neues PolyPolygon vorbereiten
+ XPolyPolygon aNewPolyPolygon;
+
+ // Zeiger auf innere sequences holen
+ drawing::PointSequence* pInnerSequence = pOuterSequence->getArray();
+
+ for(sal_Int32 a=0;a<nOuterSequenceCount;a++)
+ {
+ sal_Int32 nInnerSequenceCount = pInnerSequence->getLength();
+
+ // Neues XPolygon vorbereiten
+ XPolygon aNewPolygon(nInnerSequenceCount);
+
+ // Zeiger auf Arrays holen
+ awt::Point* pArray = pInnerSequence->getArray();
+
+ for(sal_Int32 b=0;b<nInnerSequenceCount;b++)
+ {
+ aNewPolygon[b] = Point( pArray->X, pArray->Y );
+ pArray++;
+ }
+ pInnerSequence++;
+
+ // Neues Teilpolygon einfuegen
+ aNewPolyPolygon.Insert(aNewPolygon);
+ }
+
+ // Polygon setzen
+ SetPolygon(aNewPolyPolygon);
+ }
+ else if(aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYGON)) == 0)
+ {
+ drawing::PointSequence* pSequence = (drawing::PointSequence*)aValue.getValue();
+
+ if( !pSequence || aValue.getValueType() != ::getCppuType((const drawing::PointSequence*)0 ) )
+ throw lang::IllegalArgumentException();
+
+ // Koordinaten in das PolyPolygon packen
+ const sal_Int32 nSequenceCount = pSequence->getLength();
+
+ // Neues PolyPolygon vorbereiten
+ XPolyPolygon aNewPolyPolygon;
+
+ // Neues XPolygon vorbereiten
+ XPolygon aNewPolygon(nSequenceCount);
+
+ // Zeiger auf Arrays holen
+ awt::Point* pArray = pSequence->getArray();
+
+ for(sal_Int32 b=0;b<nSequenceCount;b++)
+ {
+ aNewPolygon[b] = Point( pArray->X, pArray->Y );
+ pArray++;
+ }
+
+ // Neues Teilpolygon einfuegen
+ aNewPolyPolygon.Insert(aNewPolygon);
+
+ // Polygon setzen
+ SetPolygon(aNewPolyPolygon);
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+
+uno::Any SAL_CALL SvxShapePolyPolygon::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYPOLYGON)) == 0)
+ {
+ // PolyPolygon in eine struct PolyPolygon packen
+ const XPolyPolygon& rPolyPoly = GetPolygon();
+ drawing::PointSequenceSequence aRetval( rPolyPoly.Count() );
+
+ // Zeiger auf aeussere Arrays holen
+ drawing::PointSequence* pOuterSequence = aRetval.getArray();
+
+ for(sal_uInt16 a=0;a<rPolyPoly.Count();a++)
+ {
+ // Einzelpolygon holen
+ const XPolygon& rPoly = rPolyPoly[a];
+
+ // Platz in Arrays schaffen
+ pOuterSequence->realloc((sal_Int32)rPoly.GetPointCount());
+
+ // Pointer auf arrays holen
+ awt::Point* pInnerSequence = pOuterSequence->getArray();
+
+ for(sal_uInt16 b=0;b<rPoly.GetPointCount();b++)
+ {
+ *pInnerSequence = awt::Point( rPoly[b].X(), rPoly[b].Y() );
+ pInnerSequence++;
+ }
+
+ pOuterSequence++;
+ }
+ return uno::Any( &aRetval, ::getCppuType((const drawing::PointSequenceSequence*)0) );
+ }
+ else if(aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYGON)) == 0)
+ {
+ // PolyPolygon in eine struct PolyPolygon packen
+ const XPolyPolygon& rPolyPoly = GetPolygon();
+
+ drawing::PointSequence aRetval( rPolyPoly.Count() );
+
+ // Einzelpolygon holen
+ const XPolygon& rPoly = rPolyPoly[0];
+
+ // Pointer auf arrays holen
+ awt::Point* pSequence = aRetval.getArray();
+
+ for(sal_uInt16 b=0;b<rPoly.GetPointCount();b++)
+ *pSequence++ = awt::Point( rPoly[b].X(), rPoly[b].Y() );
+
+ return uno::Any( &aRetval, ::getCppuType((const drawing::PointSequence*)0) );
+ }
+ else if(aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYGONKIND)) == 0)
+ {
+ drawing::PolygonKind ePT = GetPolygonKind();
+ return Any( &ePT, ::getCppuType((const drawing::PolygonKind*)0) );
+ }
+ else
+ {
+ return SvxShape::getPropertyValue(aPropertyName);
+ }
+}
+
+//----------------------------------------------------------------------
+drawing::PolygonKind SvxShapePolyPolygon::GetPolygonKind() const throw()
+{
+ return ePolygonKind;
+}
+
+//----------------------------------------------------------------------
+void SvxShapePolyPolygon::SetPolygon(const XPolyPolygon& rNew) throw()
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj)
+ ((SdrPathObj*)pObj)->SetPathPoly(rNew);
+}
+
+//----------------------------------------------------------------------
+const XPolyPolygon& SvxShapePolyPolygon::GetPolygon() const throw()
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj)
+ return ((SdrPathObj*)pObj)->GetPathPoly();
+ return aEmptyPoly;
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygon::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 9, "com.sun.star.drawing.LineShapeDescriptor",
+ "com.sun.star.drawing.LineShape",
+ "com.sun.star.drawing.AreaShapeDescriptor",
+ "com.sun.star.drawing.AreaShape",
+ "com.sun.star.drawing.PolyPolygonShapeDescriptor",
+ "com.sun.star.drawing.PolyPolygonShape",
+ "com.sun.star.drawing.Text",
+ "com.sun.star.drawing.RotationDescriptor",
+ "com.sun.star.drawing.ShadowDescriptor" );
+ return aSeq;
+}
+
+/***********************************************************************
+* class SvxShapePolyPolygonBezier *
+***********************************************************************/
+
+#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONBEZIERCOORDS_HPP_
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_FLAGSEQUENCE_HPP_
+#include <com/sun/star/drawing/FlagSequence.hpp>
+#endif
+//----------------------------------------------------------------------
+SvxShapePolyPolygonBezier::SvxShapePolyPolygonBezier( SdrObject* pObj , drawing::PolygonKind eNew ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGONBEZIER) ),
+ ePolygonKind( eNew )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapePolyPolygonBezier::~SvxShapePolyPolygonBezier() throw()
+{
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapePolyPolygonBezier::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYPOLYGONBEZIER)) == 0)
+ {
+ // Koordinaten in das PolyPolygon packen
+ drawing::PolyPolygonBezierCoords* pSourcePolyPolygon = (drawing::PolyPolygonBezierCoords*)aValue.getValue();
+
+ if( !pSourcePolyPolygon || aValue.getValueType() != ::getCppuType((const drawing::PolyPolygonBezierCoords*)0) )
+ throw IllegalArgumentException();
+
+ sal_Int32 nOuterSequenceCount = pSourcePolyPolygon->Coordinates.getLength();
+ if(pSourcePolyPolygon->Flags.getLength() != nOuterSequenceCount)
+ throw IllegalArgumentException();
+
+ // Neues PolyPolygon vorbereiten
+ XPolyPolygon aNewPolyPolygon;
+
+ // Zeiger auf innere sequences holen
+ const drawing::PointSequence* pInnerSequence = pSourcePolyPolygon->Coordinates.getConstArray();
+ const drawing::FlagSequence* pInnerSequenceFlags = pSourcePolyPolygon->Flags.getConstArray();
+
+ for(sal_Int32 a=0;a<nOuterSequenceCount;a++)
+ {
+ sal_Int32 nInnerSequenceCount = pInnerSequence->getLength();
+
+ if(pInnerSequenceFlags->getLength() != nInnerSequenceCount)
+ throw IllegalArgumentException();
+
+ // Neues XPolygon vorbereiten
+ XPolygon aNewPolygon(nInnerSequenceCount);
+
+ // Zeiger auf Arrays holen
+ const awt::Point* pArray = pInnerSequence->getConstArray();
+ const drawing::PolygonFlags* pArrayFlags = pInnerSequenceFlags->getConstArray();
+
+ for(sal_Int32 b=0;b<nInnerSequenceCount;b++)
+ {
+ aNewPolygon[b] = Point( pArray->X, pArray->Y );
+ pArray++;
+ aNewPolygon.SetFlags(b, (XPolyFlags)((sal_uInt16)*pArrayFlags++));
+ }
+
+ pInnerSequence++;
+ pInnerSequenceFlags++;
+
+ // Neues Teilpolygon einfuegen
+ aNewPolyPolygon.Insert(aNewPolygon);
+
+ }
+ // Polygon setzen
+ SetPolygon(aNewPolyPolygon);
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShapePolyPolygonBezier::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYPOLYGONBEZIER)) == 0)
+ {
+ // PolyPolygon in eine struct PolyPolygon packen
+ const XPolyPolygon& rPolyPoly = GetPolygon();
+ drawing::PolyPolygonBezierCoords aRetval;
+
+ // Polygone innerhalb vrobereiten
+ aRetval.Coordinates.realloc((sal_Int32)rPolyPoly.Count());
+ aRetval.Flags.realloc((sal_Int32)rPolyPoly.Count());
+
+ // Zeiger auf aeussere Arrays holen
+ drawing::PointSequence* pOuterSequence = aRetval.Coordinates.getArray();
+ drawing::FlagSequence* pOuterFlags = aRetval.Flags.getArray();
+
+ for(sal_uInt16 a=0;a<rPolyPoly.Count();a++)
+ {
+ // Einzelpolygon holen
+ const XPolygon& rPoly = rPolyPoly[a];
+
+ // Platz in Arrays schaffen
+ pOuterSequence->realloc((sal_Int32)rPoly.GetPointCount());
+ pOuterFlags->realloc((sal_Int32)rPoly.GetPointCount());
+
+ // Pointer auf arrays holen
+ awt::Point* pInnerSequence = pOuterSequence->getArray();
+ drawing::PolygonFlags* pInnerFlags = pOuterFlags->getArray();
+
+ for(sal_uInt16 b=0;b<rPoly.GetPointCount();b++)
+ {
+ *pInnerSequence++ = awt::Point( rPoly[b].X(), rPoly[b].Y() );
+ *pInnerFlags++ = (drawing::PolygonFlags)((sal_uInt16)rPoly.GetFlags(b));
+ }
+
+ pOuterSequence++;
+ pOuterFlags++;
+ }
+ return uno::Any( &aRetval, ::getCppuType((const drawing::PolyPolygonBezierCoords*)0));
+ }
+ else if(aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_POLYGONKIND)) == 0)
+ {
+ drawing::PolygonKind ePT = GetPolygonKind();
+ return uno::Any( &ePT, ::getCppuType((const drawing::PolygonKind*)0) );
+ }
+ else
+ {
+ return SvxShape::getPropertyValue(aPropertyName);
+ }
+}
+
+//----------------------------------------------------------------------
+drawing::PolygonKind SvxShapePolyPolygonBezier::GetPolygonKind() const throw()
+{
+ return ePolygonKind;
+}
+
+//----------------------------------------------------------------------
+void SvxShapePolyPolygonBezier::SetPolygon(const XPolyPolygon& rNew) throw()
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj)
+ ((SdrPathObj*)pObj)->SetPathPoly(rNew);
+}
+
+//----------------------------------------------------------------------
+const XPolyPolygon& SvxShapePolyPolygonBezier::GetPolygon() const throw()
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj)
+ return ((SdrPathObj*)pObj)->GetPathPoly();
+ return aEmptyPoly;
+}
+
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 9, "com.sun.star.drawing.LineShapeDescriptor",
+ "com.sun.star.drawing.LineShape",
+ "com.sun.star.drawing.AreaShapeDescriptor",
+ "com.sun.star.drawing.AreaShape",
+ "com.sun.star.drawing.PolyPolygonBezierShapeDescriptor",
+ "com.sun.star.drawing.PolyPolygonBezierShape",
+ "com.sun.star.drawing.Text",
+ "com.sun.star.drawing.RotationDescriptor",
+ "com.sun.star.drawing.ShadowDescriptor" );
+ return aSeq;
+}
+
+/***********************************************************************
+* class SvxGraphicObject *
+***********************************************************************/
+
+#ifndef _COM_SUN_STAR_AWT_XBITMAP_HPP_
+#include <com/sun/star/awt/XBitmap.hpp>
+#endif
+#ifndef _SV_CVTGRF_HXX
+#include <vcl/cvtgrf.hxx>
+#endif
+#ifndef _SVDOGRAF_HXX
+#include <svdograf.hxx>
+#endif
+#ifndef _SFX_DOCFILT_HACK_HXX
+#include <sfx2/docfilt.hxx>
+#endif
+#ifndef _SFXDOCFILE_HXX
+#include <sfx2/docfile.hxx>
+#endif
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_FCONTNR_HXX
+#include <sfx2/fcontnr.hxx>
+#endif
+
+#include "toolkit/unohlp.hxx"
+
+//----------------------------------------------------------------------
+SvxGraphicObject::SvxGraphicObject( SdrObject* pObj ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_GRAPHICOBJECT) )
+{
+}
+
+//----------------------------------------------------------------------
+SvxGraphicObject::~SvxGraphicObject() throw()
+{
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxGraphicObject::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_FILLBITMAP)) == 0)
+ {
+ if( aValue.getValueType() == ::getCppuType(( const uno::Sequence< sal_Int8 >*)0) )
+ {
+ uno::Sequence<sal_Int8>* pSeq = (uno::Sequence<sal_Int8>*)aValue.getValue();
+ SvMemoryStream aMemStm;
+ Graphic aGraphic;
+
+ aMemStm.SetBuffer( (char*)pSeq->getConstArray(), pSeq->getLength(), sal_False, pSeq->getLength() );
+
+ if( GraphicConverter::Import( aMemStm, aGraphic ) == ERRCODE_NONE )
+ {
+ ((SdrGrafObj*)pObj)->SetGraphic(aGraphic);
+ }
+ }
+ else if( aValue.getValueType() == INTERFACE_TYPE( awt::XBitmap))
+ {
+ // Bitmap in das Objekt packen
+ Reference< awt::XBitmap > xBmp;
+ if( aValue >>= xBmp )
+ {
+ // Bitmap einsetzen
+ Graphic aGraphic(VCLUnoHelper::GetBitmap( xBmp ));
+ ((SdrGrafObj*)pObj)->SetGraphic(aGraphic);
+ }
+ }
+ }
+ else if( pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_GRAFURL)) == 0 )
+ {
+ OUString aURL;
+ if(!(aValue >>= aURL))
+ throw lang::IllegalArgumentException();
+
+ if( 0 == aURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX) ) )
+ {
+ // graphic manager url
+ aURL = aURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 );
+ String aTmpStr(aURL);
+ ByteString aUniqueID( aTmpStr, RTL_TEXTENCODING_UTF8 );
+ GraphicObject aGrafObj( aUniqueID );
+ ((SdrGrafObj*)pObj)->ReleaseGraphicLink();
+ ((SdrGrafObj*)pObj)->SetGraphicObject( aGrafObj );
+ }
+ else
+ {
+ const SfxFilter* pFilter = NULL;
+ SfxMedium aSfxMedium(aURL, (STREAM_READ | STREAM_SHARE_DENYNONE), FALSE);
+ SFX_APP()->GetFilterMatcher().GuessFilter(aSfxMedium, &pFilter, SFX_FILTER_IMPORT, SFX_FILTER_NOTINSTALLED | SFX_FILTER_EXECUTABLE );
+
+ if( NULL == pFilter )
+ throw lang::IllegalArgumentException();
+
+ const String aFilterName = pFilter->GetFilterName();
+ ((SdrGrafObj*)pObj)->SetGraphicLink( aURL, aFilterName );
+ }
+
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+ if( pModel )
+ pModel->SetChanged();
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxGraphicObject::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_FILLBITMAP)) == 0)
+ {
+ const Graphic& rGraphic = ((SdrGrafObj*)pObj)->GetGraphic();
+
+ if(rGraphic.GetType() != GRAPHIC_GDIMETAFILE)
+ {
+ // Objekt in eine Bitmap packen
+ Reference< ::com::sun::star::awt::XBitmap > xBitmap( VCLUnoHelper::CreateBitmap(((SdrGrafObj*)pObj)->GetGraphic().GetBitmapEx()) );
+ return uno::Any( &xBitmap, ::getCppuType((const Reference<awt::XBitmap>*)0) );
+ }
+ else
+ {
+ SvMemoryStream aDestStrm( 65535, 65535 );
+
+ ConvertGDIMetaFileToWMF( rGraphic.GetGDIMetaFile(), aDestStrm, NULL, NULL, sal_False );
+ uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize());
+ return uno::Any( &aSeq, ::getCppuType(( uno::Sequence< sal_Int8 >*)0) );
+ }
+ }
+ else if( pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_GRAFURL)) == 0 )
+ {
+ uno::Any aAny;
+ if( ((SdrGrafObj*)pObj)->IsLinkedGraphic() )
+ {
+ aAny <<= OUString( ((SdrGrafObj*)pObj)->GetFileName() );
+ }
+ else
+ {
+ const GraphicObject& rGrafObj = ((SdrGrafObj*)pObj)->GetGraphicObject();
+ OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+ aURL += OUString::createFromAscii( rGrafObj.GetUniqueID().GetBuffer() );
+ aAny <<= aURL;
+ }
+ return aAny;
+ }
+
+/*
+ else if( pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("NativeFormat")) == 0)
+ {
+ const Graphic& rGraphic = ((SdrGrafObj*)pObj)->GetGraphic();
+ GfxLink aLink = ((Graphic*)&rGraphic)->GetLink();
+ if( aLink.GetType() == GFX_LINK_TYPE_NONE )
+ return uno::Any();
+
+ uno::Sequence<BYTE> aSeq(aLink.GetData(), aLink.GetDataSize());
+ return uno::Any( &aSeq, ::getCppuType((const uno::Sequence< BYTE >*)0));
+ }
+ else if( pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("LinkType")) == 0 )
+ {
+ const Graphic& rGraphic = ((SdrGrafObj*)pObj)->GetGraphic();
+ GfxLink aLink = ((Graphic*)&rGraphic)->GetLink();
+
+ uno::Any aAny;
+ aAny <<= (sal_Int32)aLink.GetType();
+ return aAny;
+ }
+*/
+ else
+ {
+ return SvxShape::getPropertyValue(aPropertyName);
+ }
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL SvxGraphicObject::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 7, "com.sun.star.drawing.AreaShapeDescriptor",
+ "com.sun.star.drawing.AreaShape",
+ "com.sun.star.drawing.GraphicObjectShapeDescriptor",
+ "com.sun.star.drawing.GraphicObjectShape",
+ "com.sun.star.drawing.Text",
+ "com.sun.star.drawing.RotationDescriptor",
+ "com.sun.star.drawing.ShadowDescriptor");
+ return aSeq;
+}
+
+
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
new file mode 100644
index 0000000000..864908ed84
--- /dev/null
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -0,0 +1,970 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoshap3.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_
+#include <com/sun/star/drawing/HomogenMatrix.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_POSITION3D_HPP_
+#include <com/sun/star/drawing/Position3D.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_DIRECTION3D_HPP_
+#include <com/sun/star/drawing/Direction3D.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_DOUBLESEQUENCE_HPP_
+#include <com/sun/star/drawing/DoubleSequence.hpp>
+#endif
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "unoshape.hxx"
+#include "unopage.hxx"
+#include "unoprnms.hxx"
+#include "polysc3d.hxx"
+#include "globl3d.hxx"
+#include "cube3d.hxx"
+#include "sphere3d.hxx"
+#include "lathe3d.hxx"
+#include "extrud3d.hxx"
+#include "polygn3d.hxx"
+#include "poly3d.hxx"
+
+using namespace ::vos;
+using namespace ::rtl;
+using namespace ::cppu;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+
+#define INTERFACE_TYPE( xint ) \
+ ::getCppuType((const Reference< xint >*)0)
+
+#define QUERYINT( xint ) \
+ if( rType == ::getCppuType((const Reference< xint >*)0) ) \
+ aAny <<= Reference< xint >(this)
+
+/***********************************************************************
+* class Svx3DSceneObject *
+***********************************************************************/
+uno::Sequence< uno::Type > Svx3DSceneObject::maTypeSequence;
+
+//----------------------------------------------------------------------
+Svx3DSceneObject::Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSCENEOBJECT) ), pPage( pDrawPage )
+{
+}
+
+//----------------------------------------------------------------------
+Svx3DSceneObject::~Svx3DSceneObject() throw()
+{
+}
+
+//----------------------------------------------------------------------
+void Svx3DSceneObject::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw()
+{
+ SvxShape::Create( pNewObj, pNewPage );
+ pPage = pNewPage;
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL Svx3DSceneObject::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT( drawing::XShapes );
+ else QUERYINT( container::XIndexAccess );
+ else QUERYINT( container::XElementAccess );
+ else
+ return SvxShape::queryAggregation( rType );
+
+ return aAny;
+}
+
+uno::Any SAL_CALL Svx3DSceneObject::queryInterface( const uno::Type & rType ) throw( uno::RuntimeException )
+{
+ return SvxShape::queryInterface( rType );
+}
+
+void SAL_CALL Svx3DSceneObject::acquire() throw( uno::RuntimeException )
+{
+ SvxShape::acquire();
+}
+
+void SAL_CALL Svx3DSceneObject::release() throw( uno::RuntimeException )
+{
+ SvxShape::release();
+}
+
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL Svx3DSceneObject::getTypes()
+ throw (uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ const uno::Sequence< uno::Type > aBaseTypes( SvxShape::getTypes() );
+ const uno::Type* pBaseTypes = aBaseTypes.getConstArray();
+ const sal_Int32 nBaseTypes = aBaseTypes.getLength();
+ const sal_Int32 nOwnTypes = 1; // !DANGER! Keep this updated!
+
+ maTypeSequence.realloc( nBaseTypes + nOwnTypes );
+ uno::Type* pTypes = maTypeSequence.getArray();
+
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XShapes>*)0);
+
+ for( sal_Int32 nType = 0; nType < nBaseTypes; nType++ )
+ *pTypes++ = *pBaseTypes++;
+ }
+ return maTypeSequence;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL Svx3DSceneObject::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL Svx3DSceneObject::add( const Reference< drawing::XShape >& xShape )
+ throw( uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+ if(pObj == NULL || pPage == NULL || pShape == NULL || NULL != pShape->GetSdrObject() )
+ throw uno::RuntimeException();
+
+ SdrObject* pSdrShape = pPage->_CreateSdrObject( xShape );
+ if( pSdrShape->ISA(E3dObject) )
+ {
+ pObj->GetSubList()->NbcInsertObject( pSdrShape );
+ }
+ else
+ {
+ delete pSdrShape;
+ pShape->InvalidateSdrObject();
+ throw uno::RuntimeException();
+ }
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL Svx3DSceneObject::remove( const Reference< drawing::XShape >& xShape )
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+
+ if(pObj == NULL || pShape == NULL)
+ throw uno::RuntimeException();
+
+ SdrObject* pSdrShape = pShape->GetSdrObject();
+ if(pSdrShape == NULL || pSdrShape->GetObjList()->GetOwnerObj() != pObj)
+ {
+ throw uno::RuntimeException();
+ }
+ else
+ {
+ SdrObjList& rList = *pSdrShape->GetObjList();
+
+ const nObjCount = rList.GetObjCount();
+ sal_uInt32 nObjNum = 0;
+ while( nObjNum < nObjCount )
+ {
+ if(rList.GetObj( nObjNum ) == pSdrShape )
+ break;
+ nObjNum++;
+ }
+
+ if( nObjNum < nObjCount )
+ {
+ delete rList.NbcRemoveObject( nObjNum );
+ pShape->InvalidateSdrObject();
+ }
+ else
+ {
+ DBG_ASSERT( 0, "Fatality! SdrObject is not belonging to its SdrObjList! [CL]" );
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+sal_Int32 SAL_CALL Svx3DSceneObject::getCount()
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ sal_Int32 nRetval = 0;
+
+ if(pObj && pObj->ISA(E3dPolyScene) && pObj->GetSubList())
+ nRetval = pObj->GetSubList()->GetObjCount();
+ return nRetval;
+}
+
+//----------------------------------------------------------------------
+
+uno::Any SAL_CALL Svx3DSceneObject::getByIndex( sal_Int32 Index )
+ throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( pObj == NULL || pObj->GetSubList() == NULL )
+ throw uno::RuntimeException();
+
+ if( pObj->GetSubList()->GetObjCount() <= Index )
+ throw lang::IndexOutOfBoundsException();
+
+ Reference< drawing::XShape > xShape;
+ SdrObject* pDestObj = pObj->GetSubList()->GetObj( Index );
+
+ if(pDestObj)
+ xShape = pPage->_CreateShape(pDestObj);
+ else
+ throw lang::IndexOutOfBoundsException();
+
+ return uno::Any( &xShape, ::getCppuType((const Reference< drawing::XShape>*)0) );
+}
+
+//----------------------------------------------------------------------
+// ::com::sun::star::container::XElementAccess
+
+uno::Type SAL_CALL Svx3DSceneObject::getElementType()
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType(( const Reference< drawing::XShape>*)0);
+}
+
+//----------------------------------------------------------------------
+sal_Bool SAL_CALL Svx3DSceneObject::hasElements()
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ return pObj && pObj->GetSubList() && (pObj->GetSubList()->GetObjCount() > 0);
+}
+
+//----------------------------------------------------------------------
+#define HOMOGEN_MATRIX_TO_OBJECT \
+ drawing::HomogenMatrix m; \
+ if( aValue >>= m ) { \
+ Matrix4D aMat; \
+ aMat[0][0] = m.Line1.Column1; \
+ aMat[0][1] = m.Line1.Column2; \
+ aMat[0][2] = m.Line1.Column3; \
+ aMat[0][3] = m.Line1.Column4; \
+ aMat[1][0] = m.Line2.Column1; \
+ aMat[1][1] = m.Line2.Column2; \
+ aMat[1][2] = m.Line2.Column3; \
+ aMat[1][3] = m.Line2.Column4; \
+ aMat[2][0] = m.Line3.Column1; \
+ aMat[2][1] = m.Line3.Column2; \
+ aMat[2][2] = m.Line3.Column3; \
+ aMat[2][3] = m.Line3.Column4; \
+ aMat[3][0] = m.Line4.Column1; \
+ aMat[3][1] = m.Line4.Column2; \
+ aMat[3][2] = m.Line4.Column3; \
+ aMat[3][3] = m.Line4.Column4; \
+ ((E3dObject*)pObj)->SetTransform(aMat); \
+ }
+
+#define OBJECT_TO_HOMOGEN_MATRIX \
+ drawing::HomogenMatrix aHomMat; \
+ const Matrix4D& rMat = ((E3dObject*)pObj)->GetTransform(); \
+ aHomMat.Line1.Column1 = rMat[0][0]; \
+ aHomMat.Line1.Column2 = rMat[0][1]; \
+ aHomMat.Line1.Column3 = rMat[0][2]; \
+ aHomMat.Line1.Column4 = rMat[0][3]; \
+ aHomMat.Line2.Column1 = rMat[1][0]; \
+ aHomMat.Line2.Column2 = rMat[1][1]; \
+ aHomMat.Line2.Column3 = rMat[1][2]; \
+ aHomMat.Line2.Column4 = rMat[1][3]; \
+ aHomMat.Line3.Column1 = rMat[2][0]; \
+ aHomMat.Line3.Column2 = rMat[2][1]; \
+ aHomMat.Line3.Column3 = rMat[2][2]; \
+ aHomMat.Line3.Column4 = rMat[2][3]; \
+ aHomMat.Line4.Column1 = rMat[3][0]; \
+ aHomMat.Line4.Column2 = rMat[3][1]; \
+ aHomMat.Line4.Column3 = rMat[3][2]; \
+ aHomMat.Line4.Column4 = rMat[3][3]; \
+ return uno::Any( &aHomMat, ::getCppuType((const drawing::HomogenMatrix*)0) );
+
+//----------------------------------------------------------------------
+void SAL_CALL Svx3DSceneObject::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0 )
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL Svx3DSceneObject::getPropertyValue( const OUString& PropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && PropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0 )
+ {
+ // Objekt in eine homogene 4x4 Matrix packen
+ OBJECT_TO_HOMOGEN_MATRIX
+ }
+ else
+ {
+ return SvxShape::getPropertyValue(PropertyName);
+ }
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL Svx3DSceneObject::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 1, "com.sun.star.drawing.Shape3DScene" );
+ return aSeq;
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+//----------------------------------------------------------------------
+Svx3DCubeObject::Svx3DCubeObject( SdrObject* pObj ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DCUBEOBJEKT) )
+{
+}
+
+//----------------------------------------------------------------------
+Svx3DCubeObject::~Svx3DCubeObject() throw()
+{
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL Svx3DCubeObject::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0 )
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS)) == 0 )
+ {
+ // Position in das Objekt packen
+ drawing::Position3D aUnoPos;
+ if( aValue >>= aUnoPos )
+ {
+ Vector3D aPos(aUnoPos.PositionX, aUnoPos.PositionY, aUnoPos.PositionZ);
+ ((E3dCubeObj*)pObj)->SetCubePos(aPos);
+ }
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_SIZE)) == 0)
+ {
+ // Groesse in das Objekt packen
+ drawing::Direction3D aDirection;
+ if( aValue >>= aDirection )
+ {
+ Vector3D aPos(aDirection.DirectionX, aDirection.DirectionY, aDirection.DirectionZ);
+ ((E3dCubeObj*)pObj)->SetCubePos(aPos);
+ }
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS_IS_CENTER)) == 0 )
+ {
+ // sal_Bool bPosIsCenter in das Objekt packen
+ if( aValue.getValueType() == ::getCppuBooleanType() )
+ {
+ sal_Bool bNew = *(sal_Bool*)aValue.getValue();
+ ((E3dCubeObj*)pObj)->SetPosIsCenter(bNew);
+ }
+ }
+ else
+ {
+ SvxShape::setPropertyValue( aPropertyName, aValue );
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL Svx3DCubeObject::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0)
+ {
+ // Transformation in eine homogene Matrix packen
+ OBJECT_TO_HOMOGEN_MATRIX
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS)) == 0 )
+ {
+ // Position packen
+ const Vector3D& rPos = ((E3dCubeObj*)pObj)->GetCubePos();
+ drawing::Position3D aPos;
+
+ aPos.PositionX = rPos.X();
+ aPos.PositionY = rPos.Y();
+ aPos.PositionZ = rPos.Z();
+
+ return uno::Any( &aPos, ::getCppuType((const drawing::Position3D*)0) );
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_SIZE)) == 0 )
+ {
+ // Groesse packen
+ const Vector3D& rSize = ((E3dCubeObj*)pObj)->GetCubeSize();
+ drawing::Direction3D aDir;
+
+ aDir.DirectionX = rSize.X();
+ aDir.DirectionY = rSize.Y();
+ aDir.DirectionZ = rSize.Z();
+
+ return uno::Any( &aDir, ::getCppuType((const drawing::Direction3D*)0) );
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS_IS_CENTER)) == 0 )
+ {
+ // sal_Bool bPosIsCenter packen
+ sal_Bool bIsCenter = ((E3dCubeObj*)pObj)->GetPosIsCenter();
+ return uno::Any( &bIsCenter, ::getCppuBooleanType() );
+ }
+ else
+ {
+ return SvxShape::getPropertyValue(aPropertyName);
+ }
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL Svx3DCubeObject::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
+ "com.sun.star.drawing.Shape3DCube");
+ return aSeq;
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+//----------------------------------------------------------------------
+Svx3DSphereObject::Svx3DSphereObject( SdrObject* pObj ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSPHEREOBJECT) )
+{
+}
+
+//----------------------------------------------------------------------
+Svx3DSphereObject::~Svx3DSphereObject() throw()
+{
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL Svx3DSphereObject::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0)
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS)) == 0)
+ {
+ // Position in das Objekt packen
+ drawing::Position3D aUnoPos;
+ if( aValue >>= aUnoPos )
+ {
+ Vector3D aPos(aUnoPos.PositionX, aUnoPos.PositionY, aUnoPos.PositionZ);
+ ((E3dSphereObj*)pObj)->SetCenter(aPos);
+ }
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_SIZE)) == 0)
+ {
+ // Groesse in das Objekt packen
+ drawing::Direction3D aDir;
+ if( aValue >>= aDir )
+ {
+ Vector3D aPos(aDir.DirectionX, aDir.DirectionY, aDir.DirectionZ);
+ ((E3dSphereObj*)pObj)->SetSize(aPos);
+ }
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL Svx3DSphereObject::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0)
+ {
+ // Transformation in eine homogene Matrix packen
+ OBJECT_TO_HOMOGEN_MATRIX
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POS)) == 0)
+ {
+ // Position packen
+ const Vector3D& rPos = ((E3dSphereObj*)pObj)->Center();
+ drawing::Position3D aPos;
+
+ aPos.PositionX = rPos.X();
+ aPos.PositionY = rPos.Y();
+ aPos.PositionZ = rPos.Z();
+
+ return uno::Any( &aPos, ::getCppuType((const drawing::Position3D*)0) );
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_SIZE)) == 0)
+ {
+ // Groesse packen
+ const Vector3D& rSize = ((E3dSphereObj*)pObj)->Size();
+ drawing::Direction3D aDir;
+
+ aDir.DirectionX = rSize.X();
+ aDir.DirectionY = rSize.Y();
+ aDir.DirectionZ = rSize.Z();
+
+ return uno::Any( &aDir, ::getCppuType((const drawing::Direction3D*)0) );
+ }
+ else
+ {
+ return SvxShape::getPropertyValue(aPropertyName);
+ }
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL Svx3DSphereObject::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
+ "com.sun.star.drawing.Shape3DSphere");
+ return aSeq;
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONSHAPE3D_HPP_
+#include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
+#endif
+
+
+
+//----------------------------------------------------------------------
+Svx3DLatheObject::Svx3DLatheObject( SdrObject* pObj ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DLATHEOBJECT) )
+{
+}
+
+//----------------------------------------------------------------------
+Svx3DLatheObject::~Svx3DLatheObject() throw()
+{
+}
+
+#define POLYPOLYGONSHAPE3D_TO_POLYPOLYGON3D \
+ drawing::PolyPolygonShape3D aSourcePolyPolygon; \
+ if( !(aValue >>= aSourcePolyPolygon) ) \
+ throw lang::IllegalArgumentException(); \
+ sal_Int32 nOuterSequenceCount = aSourcePolyPolygon.SequenceX.getLength(); \
+ if(nOuterSequenceCount != aSourcePolyPolygon.SequenceY.getLength() \
+ || nOuterSequenceCount != aSourcePolyPolygon.SequenceZ.getLength()) \
+ { \
+ throw lang::IllegalArgumentException(); \
+ } \
+ PolyPolygon3D aNewPolyPolygon; \
+ drawing::DoubleSequence* pInnerSequenceX = aSourcePolyPolygon.SequenceX.getArray(); \
+ drawing::DoubleSequence* pInnerSequenceY = aSourcePolyPolygon.SequenceY.getArray(); \
+ drawing::DoubleSequence* pInnerSequenceZ = aSourcePolyPolygon.SequenceZ.getArray(); \
+ for(sal_Int32 a=0;a<nOuterSequenceCount;a++) \
+ { \
+ sal_Int32 nInnerSequenceCount = pInnerSequenceX->getLength(); \
+ if(nInnerSequenceCount != pInnerSequenceY->getLength() \
+ || nInnerSequenceCount != pInnerSequenceZ->getLength()) \
+ { \
+ throw lang::IllegalArgumentException(); \
+ } \
+ Polygon3D aNewPolygon; \
+ double* pArrayX = pInnerSequenceX->getArray(); \
+ double* pArrayY = pInnerSequenceY->getArray(); \
+ double* pArrayZ = pInnerSequenceZ->getArray(); \
+ for(sal_Int32 b=0;b<nInnerSequenceCount;b++) \
+ { \
+ aNewPolygon[b].X() = *pArrayX++; \
+ aNewPolygon[b].Y() = *pArrayY++; \
+ aNewPolygon[b].Z() = *pArrayZ++; \
+ } \
+ pInnerSequenceX++; \
+ pInnerSequenceY++; \
+ pInnerSequenceZ++; \
+ aNewPolyPolygon.Insert(aNewPolygon); \
+ } \
+
+#define POLYPOLYGON3D_TO_POLYPOLYGONSHAPE3D \
+ drawing::PolyPolygonShape3D aRetval; \
+ aRetval.SequenceX.realloc((sal_Int32)rPolyPoly.Count()); \
+ aRetval.SequenceY.realloc((sal_Int32)rPolyPoly.Count()); \
+ aRetval.SequenceZ.realloc((sal_Int32)rPolyPoly.Count()); \
+ drawing::DoubleSequence* pOuterSequenceX = aRetval.SequenceX.getArray(); \
+ drawing::DoubleSequence* pOuterSequenceY = aRetval.SequenceY.getArray(); \
+ drawing::DoubleSequence* pOuterSequenceZ = aRetval.SequenceZ.getArray(); \
+ for(sal_uInt16 a=0;a<rPolyPoly.Count();a++) \
+ { \
+ const Polygon3D& rPoly = rPolyPoly[a]; \
+ pOuterSequenceX->realloc((sal_Int32)rPoly.GetPointCount()); \
+ pOuterSequenceY->realloc((sal_Int32)rPoly.GetPointCount()); \
+ pOuterSequenceZ->realloc((sal_Int32)rPoly.GetPointCount()); \
+ double* pInnerSequenceX = pOuterSequenceX->getArray(); \
+ double* pInnerSequenceY = pOuterSequenceY->getArray(); \
+ double* pInnerSequenceZ = pOuterSequenceZ->getArray(); \
+ for(sal_uInt16 b=0;b<rPoly.GetPointCount();b++) \
+ { \
+ *pInnerSequenceX++ = rPoly[b].X(); \
+ *pInnerSequenceY++ = rPoly[b].Y(); \
+ *pInnerSequenceZ++ = rPoly[b].Z(); \
+ } \
+ pOuterSequenceX++; \
+ pOuterSequenceY++; \
+ pOuterSequenceZ++; \
+ } \
+ return uno::Any( &aRetval, ::getCppuType((const drawing::PolyPolygonShape3D*)0) ); \
+
+//----------------------------------------------------------------------
+void SAL_CALL Svx3DLatheObject::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0)
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) == 0)
+ {
+ // Polygondefinition in das Objekt packen
+ POLYPOLYGONSHAPE3D_TO_POLYPOLYGON3D
+
+ // Polygon setzen
+ ((E3dLatheObj*)pObj)->SetPolyPoly3D(aNewPolyPolygon);
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL Svx3DLatheObject::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0 )
+ {
+ // Transformation in eine homogene Matrix packen
+ OBJECT_TO_HOMOGEN_MATRIX
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) == 0)
+ {
+ const PolyPolygon3D& rPolyPoly = ((E3dLatheObj*)pObj)->GetPolyPoly3D();
+
+ POLYPOLYGON3D_TO_POLYPOLYGONSHAPE3D
+ }
+ else
+ {
+ return SvxShape::getPropertyValue(aPropertyName);
+ }
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL Svx3DLatheObject::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
+ "com.sun.star.drawing.Shape3DLathe");
+ return aSeq;
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+Svx3DExtrudeObject::Svx3DExtrudeObject( SdrObject* pObj ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DEXTRUDEOBJECT) )
+{
+}
+
+//----------------------------------------------------------------------
+Svx3DExtrudeObject::~Svx3DExtrudeObject() throw()
+{
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL Svx3DExtrudeObject::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0)
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) == 0)
+ {
+ // Polygondefinition in das Objekt packen
+ POLYPOLYGONSHAPE3D_TO_POLYPOLYGON3D
+
+ // Polygon setzen
+ ((E3dExtrudeObj*)pObj)->SetExtrudePolygon(aNewPolyPolygon);
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL Svx3DExtrudeObject::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0)
+ {
+ // Transformation in eine homogene Matrix packen
+ OBJECT_TO_HOMOGEN_MATRIX
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) == 0)
+ {
+ // Polygondefinition packen
+ const PolyPolygon3D& rPolyPoly = ((E3dExtrudeObj*)pObj)->GetExtrudePolygon();
+
+ POLYPOLYGON3D_TO_POLYPOLYGONSHAPE3D
+ }
+ else
+ {
+ return SvxShape::getPropertyValue(aPropertyName);
+ }
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL Svx3DExtrudeObject::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
+ "com.sun.star.drawing.Shape3DExtrude");
+ return aSeq;
+}
+
+/***********************************************************************
+* *
+***********************************************************************/
+
+//----------------------------------------------------------------------
+Svx3DPolygonObject::Svx3DPolygonObject( SdrObject* pObj ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DPOLYGONOBJECT) )
+{
+}
+
+//----------------------------------------------------------------------
+Svx3DPolygonObject::~Svx3DPolygonObject() throw()
+{
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL Svx3DPolygonObject::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0)
+ {
+ // Transformationsmatrix in das Objekt packen
+ HOMOGEN_MATRIX_TO_OBJECT
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) == 0)
+ {
+ // Polygondefinition in das Objekt packen
+ POLYPOLYGONSHAPE3D_TO_POLYPOLYGON3D
+
+ // Polygon setzen
+ ((E3dPolygonObj*)pObj)->SetPolyPolygon3D(aNewPolyPolygon);
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_NORMALSPOLYGON3D)) == 0)
+ {
+ // Normalendefinition in das Objekt packen
+ POLYPOLYGONSHAPE3D_TO_POLYPOLYGON3D
+
+ // Polygon setzen
+ ((E3dPolygonObj*)pObj)->SetPolyNormals3D(aNewPolyPolygon);
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TEXTUREPOLYGON3D)) == 0)
+ {
+ // Texturdefinition in das Objekt packen
+ POLYPOLYGONSHAPE3D_TO_POLYPOLYGON3D
+
+ // Polygon setzen
+ ((E3dPolygonObj*)pObj)->SetPolyTexture3D(aNewPolyPolygon);
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_LINEONLY)) == 0)
+ {
+ // sal_Bool bLineOnly in das Objekt packen
+ if( aValue.getValueType() == ::getCppuBooleanType() )
+ {
+ sal_Bool bNew = *(sal_Bool*)aValue.getValue();
+ ((E3dPolygonObj*)pObj)->SetLineOnly(bNew);
+ }
+ }
+ else
+ {
+ SvxShape::setPropertyValue(aPropertyName, aValue);
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL Svx3DPolygonObject::getPropertyValue( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TRANSFORM_MATRIX)) == 0)
+ {
+ // Transformation in eine homogene Matrix packen
+ OBJECT_TO_HOMOGEN_MATRIX
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_POLYPOLYGON3D)) == 0)
+ {
+ // Polygondefinition packen
+ const PolyPolygon3D& rPolyPoly = ((E3dPolygonObj*)pObj)->GetPolyPolygon3D();
+
+ POLYPOLYGON3D_TO_POLYPOLYGONSHAPE3D
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_NORMALSPOLYGON3D)) == 0)
+ {
+ // Normalendefinition packen
+ const PolyPolygon3D& rPolyPoly = ((E3dPolygonObj*)pObj)->GetPolyNormals3D();
+
+ POLYPOLYGON3D_TO_POLYPOLYGONSHAPE3D
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_TEXTUREPOLYGON3D)) == 0)
+ {
+ // Texturdefinition packen
+ const PolyPolygon3D& rPolyPoly = ((E3dPolygonObj*)pObj)->GetPolyTexture3D();
+
+ POLYPOLYGON3D_TO_POLYPOLYGONSHAPE3D
+ }
+ else if(pObj && aPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_3D_LINEONLY)) == 0)
+ {
+ // sal_Bool bLineOnly packen
+ sal_Bool bNew = ((E3dPolygonObj*)pObj)->GetLineOnly();
+ return uno::Any( &bNew, ::getCppuBooleanType() );
+ }
+ else
+ {
+ return SvxShape::getPropertyValue(aPropertyName);
+ }
+}
+
+// ::com::sun::star::lang::XServiceInfo
+uno::Sequence< OUString > SAL_CALL Svx3DPolygonObject::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 2, "com.sun.star.drawing.Shape3D",
+ "com.sun.star.drawing.Shape3DPolygon");
+ return aSeq;
+}
+
+
+
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
new file mode 100644
index 0000000000..7538ed9ce8
--- /dev/null
+++ b/svx/source/unodraw/unoshape.cxx
@@ -0,0 +1,1786 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoshape.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SVX_USE_UNOGLOBALS_
+
+#ifndef _COM_SUN_STAR_AWT_XBITMAP_HPP_
+#include <com/sun/star/awt/XBitmap.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_RECTANGLE_HPP_
+#include <com/sun/star/awt/Rectangle.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_CIRCLEKIND_HPP_
+#include <com/sun/star/drawing/CircleKind.hpp>
+#endif
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _SV_VIRDEV_HXX
+#include <vcl/virdev.hxx>
+#endif
+#ifndef _SFX_ITEMPROP_HXX
+#include <svtools/itemprop.hxx>
+#endif
+#ifndef _FLTCALL_HXX
+#include <svtools/fltcall.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+#ifndef _SVX_UNOTEXT_HXX
+#include <unotext.hxx>
+#endif
+#ifndef _SVDOBJ_HXX
+#include <svdobj.hxx>
+#endif
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#ifndef _SVSTOR_HXX
+#include <so3/svstor.hxx>
+#endif
+
+#include <toolkit/unohlp.hxx>
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#ifndef _IPOBJ_HXX
+#include <so3/ipobj.hxx>
+#endif
+
+#include "svdmodel.hxx"
+#include "globl3d.hxx"
+#include "fmglob.hxx"
+#include "unopage.hxx"
+#include "view3d.hxx"
+#include "unoshape.hxx"
+#include "svxids.hrc"
+#include "unoshtxt.hxx"
+#include "svdpage.hxx"
+#include "unoshprp.hxx"
+#include "svdoole2.hxx"
+#include "sxciaitm.hxx" // todo: remove
+#include "svdograf.hxx"
+#include "unoapi.hxx"
+
+#include <tools/shl.hxx> //
+#include "dialmgr.hxx" // not nice, we need our own resources some day
+#include "dialogs.hrc" //
+
+using namespace ::osl;
+using namespace ::vos;
+using namespace ::rtl;
+using namespace ::cppu;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+
+const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap()
+{
+ // Propertymap fuer einen Outliner Text
+ static const SfxItemPropertyMap aSvxUnoOutlinerTextCursorPropertyMap[] =
+ {
+ SVX_UNOEDIT_CHAR_PROPERTIES,
+ SVX_UNOEDIT_FONT_PROPERTIES,
+ SVX_UNOEDIT_OUTLINER_PROPERTIES,
+ SVX_UNOEDIT_PARA_PROPERTIES,
+ {0,0}
+ };
+
+ return aSvxUnoOutlinerTextCursorPropertyMap;
+}
+
+class GDIMetaFile;
+class SvStream;
+sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
+ PFilterCallback pCallback=NULL, void * pCallerData=NULL,
+ sal_Bool bPlaceable=sal_True);
+
+DECLARE_LIST( SvxShapeList, SvxShape * );
+
+SvxShapeList* SvxShape::m_pGlobalShapeList = NULL;
+
+#define GET_TEXT_INTERFACE( xint, xval ) \
+ Reference< xint > xval; \
+ if(!xTextAgg.is() ) { Reference< ::com::sun::star::text::XText > xText( (OWeakObject*)this, UNO_QUERY ); } \
+ if(xTextAgg.is() ) \
+ { \
+ uno::Any aAny( \
+ xTextAgg->queryAggregation( ::getCppuType((const Reference< xint >*)0))); \
+ aAny >>= xval; \
+ } \
+
+#define INTERFACE_TYPE( xint ) \
+ ::getCppuType((const Reference< xint >*)0)
+
+/***********************************************************************
+* class SvxShape *
+***********************************************************************/
+
+//UNO3_GETIMPLEMENTATION_IMPL( SvxShape );
+uno::Sequence< uno::Type > SvxShape::maTypeSequence;
+
+SvxShape::SvxShape( SdrObject* pObject ) throw()
+: aPropSet(aSvxMapProvider.GetMap(SVXMAP_SHAPE)),
+ pObj (pObject),
+ bDisposing( sal_False ),
+ pModel(NULL),
+ aSize(100,100),
+ aDisposeListeners( aDisposeContainerMutex )
+{
+ Init();
+}
+
+//----------------------------------------------------------------------
+SvxShape::SvxShape( SdrObject* pObject, const SfxItemPropertyMap* pPropertyMap ) throw()
+: aPropSet(pPropertyMap),
+ bDisposing( sal_False ),
+ pObj (pObject),
+ pModel(NULL),
+ aSize(100,100),
+ aDisposeListeners( aDisposeContainerMutex )
+
+{
+ Init();
+}
+
+//----------------------------------------------------------------------
+SvxShape::SvxShape() throw()
+: aPropSet(aSvxMapProvider.GetMap(SVXMAP_SHAPE)),
+ bDisposing( sal_False ),
+ pObj (NULL),
+ pModel(NULL),
+ aSize(100,100),
+ aDisposeListeners( aDisposeContainerMutex )
+
+{
+ Init();
+}
+
+//----------------------------------------------------------------------
+SvxShape::~SvxShape() throw()
+{
+ if (xTextAgg.is())
+ xTextAgg->setDelegator( Reference< uno::XInterface >() );
+
+ xTextAgg = NULL;
+
+ if( pModel )
+ EndListening( *pModel );
+
+
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( m_pGlobalShapeList != NULL )
+ {
+ m_pGlobalShapeList->Remove(this);
+ if( m_pGlobalShapeList->Count() == 0 )
+ {
+ delete m_pGlobalShapeList;
+ m_pGlobalShapeList = NULL;
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+const ::com::sun::star::uno::Sequence< sal_Int8 > & SvxShape::getUnoTunnelId() throw()
+{
+ static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0;
+ if( !pSeq )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
+ if( !pSeq )
+ {
+ static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
+
+//----------------------------------------------------------------------
+SvxShape* SvxShape::getImplementation( uno::Reference< uno::XInterface > xInt ) throw()
+{
+ uno::Reference< lang::XUnoTunnel > xUT( xInt, ::com::sun::star::uno::UNO_QUERY );
+ if( xUT.is() )
+ return (SvxShape*)xUT->getSomething( SvxShape::getUnoTunnelId() );
+ else
+ return NULL;
+}
+
+//----------------------------------------------------------------------
+sal_Int64 SAL_CALL SvxShape::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException) \
+{
+ if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16 ) )
+ {
+ return (sal_Int64)this;
+ }
+ else
+ {
+ if( !xTextAgg.is() )
+ queryAggregation( ::getCppuType((const Reference< text::XText >*)0));
+
+ if( xTextAgg.is() )
+ {
+ uno::Any aAny( xTextAgg->queryAggregation( ::getCppuType((const Reference< lang::XUnoTunnel >*)0) ) );
+ uno::Reference< lang::XUnoTunnel > xUT;
+ aAny >>= xUT;
+ if( xUT.is() )
+ return xUT->getSomething(rId );
+ }
+ }
+
+ return NULL;
+}
+
+//----------------------------------------------------------------------
+SvxShape* SvxShape::GetShapeForSdrObj( SdrObject* pObj ) throw()
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( m_pGlobalShapeList != NULL )
+ {
+ for( SvxShape* pShape = m_pGlobalShapeList->First();
+ pShape;
+ pShape = m_pGlobalShapeList->Next() )
+ {
+ if( pShape->pObj == pObj )
+ return pShape;
+ }
+ }
+
+ return NULL;
+}
+
+//----------------------------------------------------------------------
+void SvxShape::Init() throw()
+{
+ if(pObj == NULL) // ab hier nur nocht mit Objekt
+ return;
+
+ {
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(m_pGlobalShapeList == NULL)
+ m_pGlobalShapeList = new SvxShapeList();
+
+ if(m_pGlobalShapeList->GetPos(this) == LIST_ENTRY_NOTFOUND)
+ m_pGlobalShapeList->Insert(this);
+ }
+
+ if(!pObj->GetModel())
+ return;
+
+ pModel = pObj->GetModel();
+
+ StartListening( *pModel );
+
+ const sal_uInt32 nInventor = pObj->GetObjInventor();
+
+ if( nInventor == SdrInventor ||
+ nInventor == E3dInventor ||
+ nInventor == FmFormInventor )
+ {
+ UHashMapEntry* pMap = pSdrShapeIdentifierMap;
+ sal_uInt32 nObjId;
+
+ if(nInventor == FmFormInventor)
+ nObjId = OBJ_UNO;
+ else
+ {
+ nObjId = pObj->GetObjIdentifier();
+ if( nInventor == E3dInventor )
+ nObjId |= E3D_INVENTOR_FLAG;
+ }
+
+ switch(nObjId)
+ {
+ case OBJ_CCUT: // Kreisabschnitt
+ case OBJ_CARC: // Kreisbogen
+ case OBJ_SECT: // Kreissektor
+ nObjId = OBJ_CIRC;
+ break;
+
+ case E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG:
+ nObjId = E3D_SCENE_ID | E3D_INVENTOR_FLAG;
+ break;
+ }
+
+ while(pMap->aIdentifier.getLength() && ( pMap->nId != nObjId ) )
+ pMap++;
+
+ if(pMap->aIdentifier)
+ {
+ OUString aType(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing." ) );
+ aType += pMap->aIdentifier;
+ aShapeType = aType;
+ }
+ else
+ {
+ DBG_ASSERT(aShapeType.len() == 0, "[CL] unknown SdrObjekt identifier");
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw()
+{
+ DBG_ASSERT( !pObj || pObj == pNewObj, "SvxShape::Create was called twice!" );
+
+ pObj = pNewObj;
+
+ Init();
+
+ ObtainSettingsFromPropertySet( aPropSet );
+
+ // save user call
+ SdrObjUserCall* pUser = pObj->GetUserCall();
+ pObj->SetUserCall(NULL);
+
+ setPosition( aPosition );
+ setSize( aSize );
+
+ pObj->SetUserCall( pUser );
+
+}
+
+//----------------------------------------------------------------------
+void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw()
+{
+ if(pObj && pModel)
+ {
+ SfxMapUnit eMapUnit = pModel->GetItemPool().GetMetric(0);
+ if(eMapUnit != SFX_MAPUNIT_100TH_MM)
+ {
+ switch(eMapUnit)
+ {
+ case SFX_MAPUNIT_TWIP :
+ {
+ rPoint.A() = MM_TO_TWIPS(rPoint.A());
+ rPoint.B() = MM_TO_TWIPS(rPoint.B());
+ break;
+ }
+ default:
+ {
+ DBG_ERROR("AW: Missing unit translation to PoolMetric!");
+ }
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw()
+{
+ SfxMapUnit eMapUnit = SFX_MAPUNIT_100TH_MM;
+ if(pObj && pModel)
+ {
+ eMapUnit = pModel->GetItemPool().GetMetric(0);
+ if(eMapUnit != SFX_MAPUNIT_100TH_MM)
+ {
+ switch(eMapUnit)
+ {
+ case SFX_MAPUNIT_TWIP :
+ {
+ rPoint.A() = TWIPS_TO_MM(rPoint.A());
+ rPoint.B() = TWIPS_TO_MM(rPoint.B());
+ break;
+ }
+ default:
+ {
+ DBG_ERROR("AW: Missing unit translation to 100th mm!");
+ }
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+void SvxShape::ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet) throw()
+{
+ if(pObj && rPropSet.AreThereOwnUsrAnys())
+ {
+ SfxItemSet aSet( pModel->GetItemPool(),
+ SDRATTR_START, SDRATTR_END,
+ SID_ATTR_3D_START, SID_ATTR_3D_END,
+ 0);
+
+ Reference< beans::XPropertySet > xShape( (OWeakObject*)this, UNO_QUERY );
+ aPropSet.ObtainSettingsFromPropertySet(rPropSet, aSet, xShape);
+ pObj->SetAttributes( aSet, sal_False );
+ pObj->ApplyNotPersistAttr( aSet );
+ }
+}
+
+uno::Any SvxShape::GetBitmap( sal_Bool bMetaFile /* = sal_False */ ) const throw()
+{
+ uno::Any aAny;
+
+ if( pObj == NULL || pModel == NULL )
+ return aAny;
+
+ VirtualDevice aVDev;
+ aVDev.SetMapMode(MapMode(MAP_100TH_MM));
+
+ SdrModel* pModel = pObj->GetModel();
+ SdrPage* pPage = pObj->GetPage();
+ E3dView* pView = new E3dView( pModel, &aVDev );
+ pView->SetMarkHdlHidden( sal_True );
+ SdrPageView* pPageView = pView->ShowPage(pPage, Point());
+
+ SdrObject *pTempObj = pObj;
+ pView->MarkObj(pTempObj,pPageView);
+
+ Rectangle aRect(pTempObj->GetBoundRect());
+ aRect.Justify();
+ Size aSize(aRect.GetSize());
+
+ GDIMetaFile aMtf( pView->GetAllMarkedMetaFile() );
+ if( bMetaFile )
+ {
+ SvMemoryStream aDestStrm( 65535, 65535 );
+ ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, NULL, sal_False );
+ uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize());
+ aAny.setValue( &aSeq, ::getCppuType((const uno::Sequence< sal_Int8 >*)0) );
+ }
+ else
+ {
+ Graphic aGraph(aMtf);
+ aGraph.SetPrefSize(aSize);
+ aGraph.SetPrefMapMode(MAP_100TH_MM);
+
+ Reference< awt::XBitmap > xBmp( VCLUnoHelper::CreateBitmap(aGraph.GetBitmapEx()) );
+ aAny.setValue( &xBmp, ::getCppuType(( const uno::Reference< awt::XBitmap>*)0) );
+ }
+
+ pView->UnmarkAll();
+ delete pView;
+
+ return aAny;
+}
+
+// UserAggObject
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShape::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
+{
+ return OWeakAggObject::queryInterface( rType );
+}
+
+uno::Any SAL_CALL SvxShape::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ if( rType == ::getCppuType((const Reference< beans::XPropertySet >*)0))
+ aAny <<= Reference< beans::XPropertySet >(this);
+ else if( rType == ::getCppuType((const Reference< drawing::XShape >*)0))
+ aAny <<= Reference< drawing::XShape >(this);
+ else if( rType == ::getCppuType((const Reference< lang::XComponent >*)0))
+ aAny <<= Reference< lang::XComponent>(this);
+ else if( rType == ::getCppuType((const Reference< drawing::XShapeDescriptor >*)0))
+ aAny <<= Reference< drawing::XShapeDescriptor>(this);
+ else if( rType == ::getCppuType((const Reference< beans::XPropertyState >*)0))
+ aAny <<= Reference<beans::XPropertyState>(this);
+ else if( rType == ::getCppuType((const Reference< lang::XTypeProvider >*)0))
+ aAny <<= Reference<lang::XTypeProvider>(this);
+ else if( rType == ::getCppuType((const Reference< XServiceInfo >*)0))
+ aAny <<= Reference<XServiceInfo>(this);
+ else if( rType == ::getCppuType((const Reference< XUnoTunnel >*)0))
+ aAny <<= Reference<XUnoTunnel>(this);
+ else
+ aAny <<= OWeakAggObject::queryAggregation( rType );
+
+ if( !aAny.hasValue() && pObj && pObj->GetModel() )
+ {
+ if( !xTextAgg.is() )
+ {
+ SvxTextEditSource aSvxTextEditSource( pObj );
+
+ {
+ Reference< ::com::sun::star::text::XText > xTextParent;
+ Reference< ::com::sun::star::text::XText > xText =
+ new SvxUnoText( &aSvxTextEditSource, ImplGetSvxUnoOutlinerTextCursorPropertyMap(), xTextParent );
+ if(xText.is())
+ {
+ Reference< uno::XAggregation > xAgg( xText, UNO_QUERY );
+ xTextAgg = xAgg;
+ }
+ }
+
+ if(xTextAgg.is())
+ {
+ Reference< uno::XInterface > xDelegator( (OWeakObject*)this, UNO_QUERY );
+ xTextAgg->setDelegator(xDelegator);
+ }
+ else
+ return uno::Any();
+ }
+
+ aAny <<= xTextAgg->queryAggregation( rType );
+ }
+
+ return aAny;
+}
+
+void SAL_CALL SvxShape::acquire() throw(uno::RuntimeException)
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxShape::release() throw(uno::RuntimeException)
+{
+ OWeakAggObject::release();
+}
+
+void SvxShape::addStaticTypes( sal_Int16 nNewTypes, /* uno::Type* */ ... ) throw()
+{
+ const sal_Int32 nOldCount = maTypeSequence.getLength();
+ DBG_ASSERT( nOldCount, "illegal call of addStaticType() before SvxShape::getStaticTypes()!" );
+
+ maTypeSequence.realloc( nOldCount + nNewTypes );
+ uno::Type* pTypes = &maTypeSequence.getArray()[nOldCount];
+
+ va_list marker;
+ va_start( marker, nNewTypes );
+ for( sal_Int32 i = 0 ; i < nNewTypes; i++ )
+ *pTypes++ = *va_arg( marker, uno::Type*);
+ va_end( marker );
+}
+
+uno::Sequence< uno::Type > SAL_CALL SvxShape::getTypes()
+ throw (uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ const uno::Sequence< uno::Type > aBaseTypes( SvxUnoText::getStaticTypes() );
+ const uno::Type* pBaseTypes = aBaseTypes.getConstArray();
+ const sal_Int32 nBaseTypes = aBaseTypes.getLength();
+ const sal_Int32 nOwnTypes = 5; // !DANGER! Keep this updated!
+
+ maTypeSequence.realloc( nBaseTypes + nOwnTypes );
+ uno::Type* pTypes = maTypeSequence.getArray();
+
+ *pTypes++ = ::getCppuType((const uno::Reference< drawing::XShape >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< lang::XComponent >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertySet >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType((const uno::Reference< lang::XServiceInfo >*)0);
+
+ for( sal_Int32 nType = 0; nType < nBaseTypes; nType++ )
+ *pTypes++ = *pBaseTypes++;
+ }
+ return maTypeSequence;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxShape::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+//----------------------------------------------------------------------
+
+Reference< uno::XInterface > SvxShape_NewInstance()
+{
+ uno::Reference< drawing::XShape > xShape( (OWeakObject*)new SvxShape(), UNO_QUERY );
+ return xShape;
+}
+
+// SfxListener
+
+//----------------------------------------------------------------------
+void SvxShape::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw()
+{
+ Reference< drawing::XShape > rHoldMyself( (drawing::XShape*)this );
+
+ const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+
+ if( pSdrHint && pObj)
+ {
+ if( pSdrHint->GetKind() == HINT_OBJREMOVED )
+ {
+ if( pObj == pSdrHint->GetObject() )
+ {
+ pObj = NULL;
+
+ OGuard aGuard( Application::GetSolarMutex() );
+ if(m_pGlobalShapeList != NULL)
+ m_pGlobalShapeList->Remove(this);
+ }
+ }
+ else if( pSdrHint->GetKind() == HINT_MODELCLEARED )
+ {
+ pModel = NULL;
+ }
+ else if( pSdrHint->GetKind() == HINT_OBJLISTCLEARED )
+ {
+ pObj = NULL;
+
+ OGuard aGuard( Application::GetSolarMutex() );
+ if(m_pGlobalShapeList != NULL)
+ m_pGlobalShapeList->Remove(this);
+
+ }
+ }
+
+ if( pObj == NULL )
+ {
+ if(!bDisposing)
+ dispose();
+ }
+}
+
+// XShape
+
+sal_Bool needLogicRectHack( SdrObject* pObj )
+{
+ if( pObj->GetObjInventor() == SdrInventor)
+ {
+ switch(pObj->GetObjIdentifier())
+ {
+ case OBJ_GRUP:
+ case OBJ_LINE:
+ case OBJ_POLY:
+ case OBJ_PLIN:
+ case OBJ_PATHLINE:
+ case OBJ_PATHFILL:
+ case OBJ_FREELINE:
+ case OBJ_FREEFILL:
+ case OBJ_SPLNLINE:
+ case OBJ_SPLNFILL:
+ case OBJ_EDGE:
+ case OBJ_PATHPOLY:
+ case OBJ_PATHPLIN:
+ case OBJ_MEASURE:
+ return sal_True;
+ }
+ }
+ return sal_False;
+}
+
+Rectangle getLogicRectHack( SdrObject* pObj )
+{
+ if(needLogicRectHack(pObj))
+ {
+ return pObj->GetSnapRect();
+ }
+ else
+ {
+ return pObj->GetLogicRect();
+ }
+}
+
+void setLogicRectHack( SdrObject* pObj, const Rectangle& rRect )
+{
+ if(needLogicRectHack(pObj))
+ {
+ pObj->SetSnapRect( rRect );
+ }
+ else
+ {
+ pObj->SetLogicRect( rRect );
+ }
+}
+
+//----------------------------------------------------------------------
+awt::Point SAL_CALL SvxShape::getPosition() throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( pObj && pModel)
+ {
+ Rectangle aRect( getLogicRectHack(pObj) );
+ Point aPt( aRect.Left(), aRect.Top() );
+
+ // Position ist relativ zum Anker, in absolute Position
+ // umrechnen
+ aPt -= pObj->GetAnchorPos();
+
+ ForceMetricTo100th_mm(aPt);
+ return ::com::sun::star::awt::Point( aPt.X(), aPt.Y() );
+ }
+ else
+ {
+ return aPosition;
+ }
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShape::setPosition( const awt::Point& Position ) throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( pObj && pModel)
+ {
+ Rectangle aRect( getLogicRectHack(pObj) );
+ Point aLocalPos( Position.X, Position.Y );
+ ForceMetricToItemPoolMetric(aLocalPos);
+
+ // Position ist absolut, relativ zum Anker stellen
+ aLocalPos -= pObj->GetAnchorPos();
+
+ long nDX = aLocalPos.X() - aRect.Left();
+ long nDY = aLocalPos.Y() - aRect.Top();
+
+ pObj->Move( Size( nDX, nDY ) );
+ pModel->SetChanged();
+ }
+
+ aPosition = Position;
+}
+
+//----------------------------------------------------------------------
+awt::Size SAL_CALL SvxShape::getSize() throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( pObj && pModel)
+ {
+ Rectangle aRect( getLogicRectHack(pObj) );
+ Size aObjSize( aRect.GetWidth(), aRect.GetHeight() );
+ ForceMetricTo100th_mm(aObjSize);
+ return ::com::sun::star::awt::Size( aObjSize.getWidth(), aObjSize.getHeight() );
+ }
+ else
+ return aSize;
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShape::setSize( const awt::Size& rSize )
+ throw(beans::PropertyVetoException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( pObj && pModel)
+ {
+ Rectangle aRect( getLogicRectHack(pObj) );
+ Size aLocalSize( rSize.Width, rSize.Height );
+ ForceMetricToItemPoolMetric(aLocalSize);
+ if(pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_MEASURE )
+ {
+ Fraction aWdt(aLocalSize.Width(),aRect.Right()-aRect.Left());
+ Fraction aHgt(aLocalSize.Height(),aRect.Bottom()-aRect.Top());
+ Point aPt = pObj->GetSnapRect().TopLeft();
+ pObj->Resize(aPt,aWdt,aHgt);
+ }
+ else
+ {
+ aRect.SetSize(aLocalSize);
+ setLogicRectHack( pObj, aRect );
+ }
+
+ pModel->SetChanged();
+ }
+ aSize = rSize;
+}
+
+
+// XShapeDescriptor
+
+//----------------------------------------------------------------------
+OUString SAL_CALL SvxShape::getShapeType() throw(uno::RuntimeException)
+{
+ return aShapeType;
+}
+
+// XComponent
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShape::dispose() throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( bDisposing )
+ return; // catched a recursion
+
+ bDisposing = sal_True;
+
+ lang::EventObject aEvt;
+ aEvt.Source = *(OWeakAggObject*) this;
+ aDisposeListeners.disposeAndClear(aEvt);
+
+ SdrObject* pObj = GetSdrObject();
+ if(pObj)
+ {
+ SdrPage* pPage = pObj->GetPage();
+ // SdrObject aus der Page loeschen
+ sal_uInt32 nCount = pPage->GetObjCount();
+ for( sal_uInt32 nNum = 0; nNum < nCount; nNum++ )
+ {
+ if(pPage->GetObj(nNum) == pObj)
+ {
+ delete pPage->NbcRemoveObject(nNum);
+ InvalidateSdrObject();
+ break;
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShape::addEventListener( const Reference< lang::XEventListener >& xListener )
+ throw(uno::RuntimeException)
+{
+ aDisposeListeners.addInterface(xListener);
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShape::removeEventListener( const Reference< lang::XEventListener >& aListener ) throw(uno::RuntimeException)
+{
+ aDisposeListeners.removeInterface(aListener);
+}
+
+// XPropertySet
+
+//----------------------------------------------------------------------
+Reference< beans::XPropertySetInfo > SAL_CALL
+ SvxShape::getPropertySetInfo() throw(uno::RuntimeException)
+{
+ SfxItemPropertySetInfo aSet( ImplGetSvxUnoOutlinerTextCursorPropertyMap() );
+
+ Reference< beans::XPropertySetInfo > aRet (
+ new SfxExtItemPropertySetInfo(
+ aPropSet.getPropertyMap(),
+ aSet.getProperties() ) );
+ return aRet;
+}
+
+//----------------------------------------------------------------------
+
+void SAL_CALL SvxShape::addPropertyChangeListener( const OUString& aPropertyName, const Reference< beans::XPropertyChangeListener >& xListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL SvxShape::removePropertyChangeListener( const OUString& aPropertyName, const Reference< beans::XPropertyChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL SvxShape::addVetoableChangeListener( const OUString& PropertyName, const Reference< beans::XVetoableChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL SvxShape::removeVetoableChangeListener( const OUString& PropertyName, const Reference< beans::XVetoableChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+
+sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName )
+{
+ SfxItemSet aSet( pModel->GetItemPool(), nWID, nWID );
+ if( !SetFillAttribute( nWID, rName, aSet ) )
+ return sal_False;
+
+ pObj->SetAttributes( aSet, sal_False );
+
+ return sal_True;
+}
+
+sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName, SfxItemSet& rSet )
+{
+ const SfxItemPool* pPool = rSet.GetPool();
+
+ const String aSearchName( rName );
+ const USHORT nCount = pPool->GetItemCount(nWID);
+ const NameOrIndex *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (NameOrIndex*)pPool->GetItem(nWID, nSurrogate);
+ if( pItem && ( pItem->GetName() == aSearchName ) )
+ {
+ rSet.Put( *pItem );
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShape::setPropertyValue( const OUString& rPropertyName, const uno::Any& rVal )
+ throw(beans::UnknownPropertyException,
+ beans::PropertyVetoException,
+ lang::IllegalArgumentException,
+ lang::WrappedTargetException,
+ uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(rPropertyName);
+
+ if( pObj && pModel )
+ {
+ if(pMap && pMap->nWID)
+ {
+ // check for readonly
+ if( ( pMap->nFlags & ::com::sun::star::beans::PropertyAttribute::READONLY ) != 0 )
+ throw beans::UnknownPropertyException();
+
+ switch( pMap->nWID )
+ {
+ case OWN_ATTR_FRAMERECT:
+ {
+ awt::Rectangle aUnoRect;
+ if(rVal >>= aUnoRect)
+ {
+ Point aTopLeft( aUnoRect.X, aUnoRect.Y );
+ Size aObjSize( aUnoRect.Width, aUnoRect.Height );
+ ForceMetricToItemPoolMetric(aTopLeft);
+ ForceMetricToItemPoolMetric(aObjSize);
+ Rectangle aRect;
+ aRect.SetPos(aTopLeft);
+ aRect.SetSize(aObjSize);
+ pObj->SetSnapRect(aRect);
+ return;
+ }
+ break;
+ }
+ case OWN_ATTR_CLSID:
+ {
+ OUString aCLSID;
+ if( rVal >>= aCLSID )
+ {
+ // init a ole object with a global name
+ if( pObj && pObj->ISA(SdrOle2Obj))
+ {
+ const SvInPlaceObjectRef& rIPRef = ((SdrOle2Obj*)pObj)->GetObjRef();
+ if (!rIPRef.Is() )
+ {
+ SvGlobalName aClassName;
+ if( aClassName.MakeId( aCLSID ) )
+ {
+ // create storage and inplace object
+ String aEmptyStr;
+ SvStorageRef aStor = new SvStorage( aEmptyStr, STREAM_STD_READWRITE );
+ SvInPlaceObjectRef aIPObj = &((SvFactory*)SvInPlaceObject::ClassFactory())->CreateAndInit( aClassName, aStor);
+ ((SdrOle2Obj*)pObj)->SetObjRef(aIPObj);
+
+ Rectangle aRect( ( (SdrOle2Obj*) pObj)->GetLogicRect() );
+ aIPObj->SetVisAreaSize( aRect.GetSize() );
+
+ return;
+ }
+ }
+ }
+ }
+ break;
+ }
+ case XATTR_FILLBITMAP:
+ case XATTR_FILLGRADIENT:
+ case XATTR_FILLHATCH:
+ case XATTR_FILLFLOATTRANSPARENCE:
+ case XATTR_LINEEND:
+ case XATTR_LINESTART:
+ // case XATTR_LINEDASH:
+ {
+ if( pMap->nMemberId == MID_NAME )
+ {
+ OUString aStr;
+ if( rVal >>= aStr )
+ if( SetFillAttribute( pMap->nWID, aStr ) )
+ return;
+ break;
+ }
+
+ // warning, this fall-through is intended
+ }
+ default:
+ {
+ SfxItemSet aSet( pModel->GetItemPool(), pMap->nWID, pMap->nWID);
+ pObj->TakeAttributes( aSet, sal_False, sal_False );
+
+ if( SvxUnoTextRangeBase::SetPropertyValueHelper( aSet, pMap, rVal, aSet ))
+ return;
+
+ if(!aSet.Count())
+ {
+ if(pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST)
+ {
+ // Not-Persistant Attribute, hole diese extra
+ pObj->TakeNotPersistAttr(aSet, sal_False);
+ }
+ }
+
+ if(!aSet.Count())
+ {
+ if(pMap->nWID >= SID_ATTR_3D_START && pMap->nWID <= SID_ATTR_3D_END)
+ {
+ // 3D-Attribut, eigenen Default
+ // Diese sollten IMMER gesetzt sein, da TakeAttributes an
+ // 3D-Objekten alle Items erzeugt und eintraegt
+ DBG_ERROR("AW: Got NO default item from group SID_ATTR_3D_");
+ }
+ else
+ {
+ // Default aus ItemPool holen
+ if(pModel->GetItemPool().IsWhich(pMap->nWID))
+ aSet.Put(pModel->GetItemPool().GetDefaultItem(pMap->nWID));
+ }
+ }
+
+ if(aSet.Count())
+ {
+ SfxMapUnit eMapUnit = pModel->GetItemPool().GetMetric(pMap->nWID);
+ if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM)
+ {
+ // Umrechnen auf Metrik des ItemPools in 100stel mm
+ // vorkommende Typen: sal_Int32, sal_uInt32, sal_uInt16
+ uno::Any aVal( rVal );
+
+ switch(eMapUnit)
+ {
+ case SFX_MAPUNIT_TWIP :
+ {
+ if( rVal.getValueType() == ::getCppuType(( const sal_Int32 *)0))
+ aVal <<= (sal_Int32)(MM_TO_TWIPS(*(sal_Int32*)rVal.getValue()));
+ else if( rVal.getValueType() == ::getCppuType(( const sal_uInt32*)0))
+ aVal <<= (sal_uInt32)(MM_TO_TWIPS(*(sal_uInt32*)rVal.getValue()));
+ else if( rVal.getValueType() == ::getCppuType(( const sal_uInt16*)0))
+ aVal <<= (sal_uInt16)(MM_TO_TWIPS(*(sal_uInt16*)rVal.getValue()));
+ else
+ DBG_ERROR("AW: Missing unit translation to PoolMetrics!");
+ break;
+ }
+ default:
+ {
+ DBG_ERROR("AW: Missing unit translation to PoolMetrics!");
+ }
+ }
+ aPropSet.setPropertyValue( pMap, aVal, aSet );
+ }
+ else
+ {
+ aPropSet.setPropertyValue( pMap, rVal, aSet );
+ }
+
+ if(pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST)
+ {
+ // Not-Persist Attribute extra setzen
+ pObj->ApplyNotPersistAttr( aSet );
+ }
+ else
+ {
+ pObj->SetAttributes( aSet, sal_False );
+ }
+ }
+ return;
+ }
+ }
+
+ throw lang::IllegalArgumentException();
+ }
+ else
+ {
+ Reference< beans::XPropertySet > xPropertySet;
+ if(!xTextAgg.is() ) { Reference< ::com::sun::star::text::XText > xText( (OWeakObject*)this, UNO_QUERY ); }
+ if(!xTextAgg.is() )
+ {
+ uno::Any aAny(
+ xTextAgg->queryInterface( ::getCppuType((const Reference< beans::XPropertySet >*)0)));
+ aAny >>= xPropertySet;
+ }
+
+ if( xPropertySet.is() )
+ xPropertySet->setPropertyValue( rPropertyName, rVal );
+ }
+
+ pModel->SetChanged();
+ }
+ else
+ {
+ // since we have no actual sdr object right now
+ // remember all properties in a list. These
+ // properties will be set when the sdr object is
+ // created
+
+// if(pMap && pMap->nWID)
+// Fixme: We should throw a UnknownPropertyException here.
+// But since this class is aggregated from classes
+// that support additional properties that we don't
+// know here we silently store *all* properties, even
+// if they may be not supported after creation
+ aPropSet.setPropertyValue( pMap, rVal );
+ }
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException,
+ lang::WrappedTargetException,
+ uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(PropertyName);
+
+ uno::Any aAny;
+ if( pObj && pModel )
+ {
+ if(pMap && pMap->nWID)
+ {
+ switch( pMap->nWID )
+ {
+ case OWN_ATTR_BITMAP:
+ {
+ aAny = GetBitmap();
+ if(!aAny.hasValue())
+ throw uno::RuntimeException();
+
+ break;
+ }
+ case OWN_ATTR_ISFONTWORK:
+ {
+ sal_Bool bIsFontWork = pObj->ISA(SdrTextObj) && ((SdrTextObj*)pObj)->IsFontwork();
+ aAny.setValue( &bIsFontWork, ::getBooleanCppuType() );
+ break;
+ }
+ case OWN_ATTR_FRAMERECT:
+ {
+ Rectangle aRect( pObj->GetSnapRect() );
+ Point aTopLeft( aRect.TopLeft() );
+ Size aObjSize( aRect.GetWidth(), aRect.GetHeight() );
+ ForceMetricTo100th_mm(aTopLeft);
+ ForceMetricTo100th_mm(aObjSize);
+ ::com::sun::star::awt::Rectangle aUnoRect(
+ aTopLeft.X(), aTopLeft.Y(),
+ aObjSize.getWidth(), aObjSize.getHeight() );
+ aAny <<= aUnoRect;
+ break;
+ }
+ case OWN_ATTR_BOUNDRECT:
+ {
+ Rectangle aRect( pObj->GetBoundRect() );
+ Point aTopLeft( aRect.TopLeft() );
+ Size aObjSize( aRect.GetWidth(), aRect.GetHeight() );
+ ForceMetricTo100th_mm(aTopLeft);
+ ForceMetricTo100th_mm(aObjSize);
+ ::com::sun::star::awt::Rectangle aUnoRect(
+ aTopLeft.X(), aTopLeft.Y(),
+ aObjSize.getWidth(), aObjSize.getHeight() );
+ aAny <<= aUnoRect;
+ break;
+ }
+ case OWN_ATTR_LDNAME:
+ {
+ OUString aName( pObj->GetName() );
+ aAny <<= aName;
+ break;
+ }
+ case OWN_ATTR_LDBITMAP:
+ {
+ sal_uInt16 nId;
+ if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_OLE2 )
+ {
+ nId = RID_UNODRAW_OLE2;
+ }
+ else if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_GRAF )
+ {
+ nId = RID_UNODRAW_GRAPHICS;
+ }
+ else
+ {
+ nId = RID_UNODRAW_OBJECTS;
+ }
+
+ BitmapEx aBmp( SVX_RES(nId) );
+ Reference< awt::XBitmap > xBmp( VCLUnoHelper::CreateBitmap( aBmp ) );
+
+ aAny <<= xBmp;
+ break;
+ }
+ case OWN_ATTR_OLESIZE:
+ {
+ awt::Size aSize;
+ if( pObj->ISA(SdrOle2Obj))
+ {
+ SdrOle2Obj& aObj = *(SdrOle2Obj*)pObj;
+ const SvInPlaceObjectRef& xInplace = aObj.GetObjRef();
+ if( xInplace.Is() )
+ {
+ Size aTmpSize( xInplace->GetVisArea().GetSize() );
+ aSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() );
+ }
+ }
+ aAny <<= aSize;
+ break;
+ }
+ case OWN_ATTR_OLEMODEL:
+ {
+ uno::Reference< frame::XModel > xModel;
+ if( pObj->ISA(SdrOle2Obj))
+ {
+ SdrOle2Obj& aObj = *(SdrOle2Obj*)pObj;
+ xModel = ((SdrOle2Obj*)pObj)->getXModel();
+ }
+ aAny <<= xModel;
+ break;
+ }
+ case OWN_ATTR_MIRRORED:
+ {
+ sal_Bool bMirror = sal_False;
+ if( pObj && pObj->ISA(SdrGrafObj) )
+ bMirror = ((SdrGrafObj*)pObj)->IsMirrored();
+
+ return uno::Any( &bMirror, ::getCppuBooleanType() );
+ }
+ case OWN_ATTR_CLSID:
+ {
+ OUString aCLSID;
+ if( pObj && pObj->ISA(SdrOle2Obj))
+ {
+ const SvInPlaceObjectRef& rIPRef = ((SdrOle2Obj*)pObj)->GetObjRef();
+ if (rIPRef.Is() )
+ {
+ const SvGlobalName &rClassName = rIPRef->GetClassName();
+ aCLSID = rClassName.GetHexName();
+ }
+ }
+ aAny <<= aCLSID;
+ break;
+ }
+ case OWN_ATTR_METAFILE:
+ {
+ if( pObj->ISA(SdrOle2Obj))
+ {
+ SdrOle2Obj& aObj = *(SdrOle2Obj*)pObj;
+
+ if(aObj.HasGDIMetaFile() && aObj.GetGDIMetaFile())
+ {
+ SvMemoryStream aDestStrm( 65535, 65535 );
+
+ ConvertGDIMetaFileToWMF( *aObj.GetGDIMetaFile(), aDestStrm, NULL, NULL, sal_False );
+ uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize());
+ aAny <<= aSeq;
+ }
+ }
+ else
+ {
+ aAny = GetBitmap( sal_True );
+ }
+ break;
+ }
+ case OWN_ATTR_EDGE_START_OBJ:
+ case OWN_ATTR_EDGE_START_POS:
+ case OWN_ATTR_EDGE_END_POS:
+ case OWN_ATTR_EDGE_END_OBJ:
+ {
+ SdrEdgeObj* pEdgeObj = PTR_CAST(SdrEdgeObj,pObj);
+ if(pEdgeObj)
+ {
+ switch(pMap->nWID)
+ {
+ case OWN_ATTR_EDGE_START_OBJ:
+ case OWN_ATTR_EDGE_END_OBJ:
+ {
+ SdrObject* pNode = pEdgeObj->GetConnectedNode(pMap->nWID == OWN_ATTR_EDGE_START_OBJ);
+ if(pNode)
+ {
+ Reference< drawing::XShape > xShape = SvxShape::GetShapeForSdrObj( pNode );
+ if(!xShape.is())
+ {
+ SvxDrawPage* pUnoPage;
+ Reference< drawing::XDrawPage > xPage = pUnoPage = SvxDrawPage::GetPageForSdrPage( pNode->GetPage() );
+ if(!xPage.is())
+ xPage = pUnoPage = new SvxDrawPage( pNode->GetPage() );
+
+ if(xPage.is())
+ xShape = pUnoPage->_CreateShape( pNode );
+ }
+
+ if(xShape.is())
+ aAny <<= xShape;
+
+ }
+ break;
+ }
+
+ case OWN_ATTR_EDGE_START_POS:
+ case OWN_ATTR_EDGE_END_POS:
+ {
+ Point aPoint( pEdgeObj->GetTailPoint( pMap->nWID == OWN_ATTR_EDGE_START_POS ) );
+ awt::Point aUnoPoint( aPoint.X(), aPoint.Y() );
+ aAny <<= aUnoPoint;
+ break;
+ }
+ }
+ }
+ break;
+ }
+ default:
+ {
+ SfxItemSet aSet( pModel->GetItemPool(), pMap->nWID, pMap->nWID);
+ pObj->TakeAttributes( aSet, sal_False, sal_False );
+
+ if(SvxUnoTextRangeBase::GetPropertyValueHelper( aSet, pMap, aAny ))
+ return aAny;
+
+ if(!aSet.Count())
+ {
+ if(pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST)
+ {
+ // Not-Persistant Attribute, hole diese extra
+ pObj->TakeNotPersistAttr(aSet, sal_False);
+ }
+ }
+
+ if(!aSet.Count())
+ {
+ if(pMap->nWID >= SID_ATTR_3D_START && pMap->nWID <= SID_ATTR_3D_END)
+ {
+ // 3D-Attribut, eigenen Default
+ // Diese sollten IMMER gesetzt sein, da TakeAttributes an
+ // 3D-Objekten alle Items erzeugt und eintraegt
+ DBG_ERROR("AW: Got NO default item from group SID_ATTR_3D_");
+ }
+ else
+ {
+ // Default aus ItemPool holen
+ if(pModel->GetItemPool().IsWhich(pMap->nWID))
+ aSet.Put(pModel->GetItemPool().GetDefaultItem(pMap->nWID));
+ }
+
+
+
+ }
+
+ if(aSet.Count())
+ aAny = GetAnyForItem( aSet, pMap );
+ }
+ }
+ }
+ else
+ {
+ GET_TEXT_INTERFACE( beans::XPropertySet, xPropertySet );
+ if( xPropertySet.is() )
+ aAny = xPropertySet->getPropertyValue( PropertyName );
+ }
+ }
+ else
+ {
+
+// Fixme: we should return default values for OWN_ATTR !
+
+// if(pMap && pMap->nWID)
+// FixMe: see setPropertyValue
+ aAny = aPropSet.getPropertyValue( pMap );
+
+ }
+ return aAny;
+}
+
+uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap ) const
+{
+ uno::Any aAny;
+
+ switch(pMap->nWID)
+ {
+ case SDRATTR_CIRCSTARTANGLE:
+ {
+ const SfxPoolItem* pPoolItem=NULL;
+ if(aSet.GetItemState(SDRATTR_CIRCSTARTANGLE,sal_False,&pPoolItem)==SFX_ITEM_SET)
+ {
+ sal_Int32 nAngle = ((SdrCircStartAngleItem*)pPoolItem)->GetValue();
+ aAny <<= nAngle;
+ }
+ break;
+ }
+
+ case SDRATTR_CIRCENDANGLE:
+ {
+ const SfxPoolItem* pPoolItem=NULL;
+ if (aSet.GetItemState(SDRATTR_CIRCENDANGLE,sal_False,&pPoolItem)==SFX_ITEM_SET)
+ {
+ sal_Int32 nAngle = ((SdrCircEndAngleItem*)pPoolItem)->GetValue();
+ aAny <<= nAngle;
+ }
+ break;
+ }
+
+ case SDRATTR_CIRCKIND:
+ {
+ if( pObj->GetObjInventor() == SdrInventor)
+ {
+ drawing::CircleKind eKind;
+ switch(pObj->GetObjIdentifier())
+ {
+ case OBJ_CIRC: // Kreis, Ellipse
+ eKind = drawing::CircleKind_FULL;
+ break;
+ case OBJ_CCUT: // Kreisabschnitt
+ eKind = drawing::CircleKind_CUT;
+ break;
+ case OBJ_CARC: // Kreisbogen
+ eKind = drawing::CircleKind_ARC;
+ break;
+ case OBJ_SECT: // Kreissektor
+ eKind = drawing::CircleKind_SECTION;
+ break;
+ }
+ aAny <<= eKind;
+ }
+ break;
+ }
+ default:
+ {
+ // Hole Wert aus ItemSet
+ aAny = aPropSet.getPropertyValue( pMap, aSet );
+
+ // eventuell umrechnen der Metrik auf 100stel mm noetig
+ SfxMapUnit eMapUnit = pModel->GetItemPool().GetMetric(pMap->nWID);
+ if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM)
+ {
+ // Umrechnen auf Metrik des ItemPools
+ // vorkommende Typen: sal_Int32, sal_uInt32, sal_uInt16
+ switch(eMapUnit)
+ {
+ case SFX_MAPUNIT_TWIP :
+ {
+ if( aAny.getValueType() == ::getCppuType((const sal_Int32 *)0))
+ aAny <<= (sal_Int32)(TWIPS_TO_MM(*(sal_Int32*)aAny.getValue()));
+ else if( aAny.getValueType() == ::getCppuType((const sal_uInt32*)0))
+ aAny <<= (sal_uInt32)(TWIPS_TO_MM(*(sal_uInt32*)aAny.getValue()));
+ else if( aAny.getValueType() == ::getCppuType((const sal_uInt16*)0))
+ aAny <<= (sal_uInt16)(TWIPS_TO_MM(*(sal_uInt16*)aAny.getValue()));
+ else
+ DBG_ERROR("AW: Missing unit translation to 100th mm!");
+ break;
+ }
+ default:
+ {
+ DBG_ERROR("AW: Missing unit translation to 100th mm!");
+ }
+ }
+ }
+ }
+ }
+
+ return aAny;
+}
+
+// XPropertyState
+beans::PropertyState SAL_CALL SvxShape::getPropertyState( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(PropertyName);
+
+ if( pObj == NULL )
+ throw uno::RuntimeException();
+
+ if(pMap && pMap->nWID)
+ {
+ if(pMap->nWID >= OWN_ATTR_VALUE_START && pMap->nWID <= OWN_ATTR_VALUE_END)
+ {
+ return beans::PropertyState_DIRECT_VALUE;
+ }
+ else
+ {
+ SfxItemSet aSet( pModel->GetItemPool(), pMap->nWID, pMap->nWID);
+ pObj->TakeAttributes( aSet, sal_False, sal_True );
+
+ if(!aSet.Count())
+ {
+ if(pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST)
+ {
+ // Not-Persistant Attribute, hole diese extra
+ pObj->TakeNotPersistAttr(aSet, sal_False);
+ }
+ }
+
+ switch( aSet.GetItemState( pMap->nWID, sal_False ) )
+ {
+ case SFX_ITEM_DONTCARE:
+ case SFX_ITEM_DISABLED:
+ return beans::PropertyState_AMBIGUOUS_VALUE;
+ case SFX_ITEM_READONLY:
+ case SFX_ITEM_SET:
+ return beans::PropertyState_DIRECT_VALUE;
+ case SFX_ITEM_DEFAULT:
+ return beans::PropertyState_DEFAULT_VALUE;
+ case SFX_ITEM_UNKNOWN:
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ }
+ }
+ else
+ {
+ GET_TEXT_INTERFACE( beans::XPropertyState, xPropertyState );
+ if( xPropertyState.is() )
+ return xPropertyState->getPropertyState( PropertyName );
+ else
+ return beans::PropertyState_AMBIGUOUS_VALUE;
+ }
+}
+
+uno::Sequence< beans::PropertyState > SAL_CALL SvxShape::getPropertyStates( const uno::Sequence< OUString >& aPropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ const sal_Int32 nCount = aPropertyName.getLength();
+ const OUString* pNames = aPropertyName.getConstArray();
+
+ uno::Sequence< beans::PropertyState > aRet( nCount );
+ beans::PropertyState* pState = aRet.getArray();;
+
+ for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ )
+ pState[nIdx] = getPropertyState( pNames[nIdx] );
+
+ return aRet;
+}
+
+void SAL_CALL SvxShape::setPropertyToDefault( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(PropertyName);
+
+ if( pObj == NULL || pModel == NULL )
+ throw uno::RuntimeException();
+
+ if(pMap && pMap->nWID)
+ {
+ if(pMap->nWID >= OWN_ATTR_VALUE_START && pMap->nWID <= OWN_ATTR_VALUE_END)
+ {
+ return;
+ }
+ else
+ {
+ SfxItemSet aSet( pModel->GetItemPool(), pMap->nWID, pMap->nWID);
+ pObj->TakeAttributes( aSet, sal_False, sal_True );
+
+ if(!aSet.Count())
+ {
+ if(pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST)
+ {
+ // Not-Persistant Attribute, hole diese extra
+ pObj->TakeNotPersistAttr(aSet, sal_False);
+ }
+ }
+
+ aSet.ClearItem( pMap->nWID );
+
+ if(pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST)
+ {
+ // Not-Persist Attribute extra setzen
+ pObj->ApplyNotPersistAttr( aSet );
+ }
+ else
+ {
+ pObj->SetAttributes( aSet, sal_False );
+ }
+ }
+ }
+ else
+ {
+ GET_TEXT_INTERFACE( beans::XPropertyState, xPropertyState );
+
+ if( xPropertyState.is() )
+ xPropertyState->setPropertyToDefault( PropertyName );
+ }
+
+ pModel->SetChanged();
+}
+
+uno::Any SAL_CALL SvxShape::getPropertyDefault( const OUString& aPropertyName )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ const SfxItemPropertyMap* pMap = aPropSet.getPropertyMapEntry(aPropertyName);
+
+ if( pObj == NULL )
+ throw uno::RuntimeException();
+
+ if(pMap && pMap->nWID)
+ {
+ if(pMap->nWID >= OWN_ATTR_VALUE_START && pMap->nWID <= OWN_ATTR_VALUE_END)
+ {
+ return getPropertyValue( aPropertyName );
+ }
+ else
+ {
+ // Default aus ItemPool holen
+ if(!pModel->GetItemPool().IsWhich(pMap->nWID))
+ throw beans::UnknownPropertyException();
+
+ SfxItemSet aSet( pModel->GetItemPool(), pMap->nWID, pMap->nWID);
+ aSet.Put(pModel->GetItemPool().GetDefaultItem(pMap->nWID));
+
+ return GetAnyForItem( aSet, pMap );
+ }
+ }
+ else
+ {
+ GET_TEXT_INTERFACE( beans::XPropertyState, xPropertyState );
+
+ if( xPropertyState.is() )
+ return xPropertyState->getPropertyDefault( aPropertyName );
+ else
+ return uno::Any();
+ }
+}
+
+//----------------------------------------------------------------------
+// XServiceInfo
+//----------------------------------------------------------------------
+OUString SAL_CALL SvxShape::getImplementationName()
+ throw(uno::RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxShape") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxShape::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq;
+
+ GET_TEXT_INTERFACE( XServiceInfo, xInfo );
+
+ if( xInfo.is() )
+ aSeq = xInfo->getSupportedServiceNames();
+
+ addToSequence( aSeq, 2, "com.sun.star.drawing.ShapeDescriptor",
+ "com.sun.star.drawing.Shape");
+
+
+ if( pObj && pObj->GetObjInventor() == SdrInventor)
+ {
+ switch(pObj->GetObjIdentifier())
+ {
+ case OBJ_TEXT:
+ addToSequence( aSeq, 1, "com.sun.star.drawing.TextShape" );
+ break;
+ case OBJ_OLE2:
+ addToSequence( aSeq, 1, "com.sun.star.drawing.OLE2Shape" );
+ break;
+ case OBJ_PAGE:
+ addToSequence( aSeq, 1, "com.sun.star.drawing.PageShape" );
+ break;
+ }
+ }
+
+ return aSeq;
+}
+
+/***********************************************************************
+* class SvxShapeRect *
+***********************************************************************/
+SvxShapeRect::SvxShapeRect( SdrObject* pObj ) throw()
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_SHAPE) )
+{
+
+}
+
+SvxShapeRect::~SvxShapeRect() throw()
+{
+}
+
+uno::Any SAL_CALL SvxShapeRect::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
+{
+ return OWeakAggObject::queryInterface( rType );
+}
+
+uno::Any SAL_CALL SvxShapeRect::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException)
+{
+ return SvxShape::queryAggregation( rType );
+}
+
+void SAL_CALL SvxShapeRect::acquire() throw(uno::RuntimeException)
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxShapeRect::release() throw(uno::RuntimeException)
+{
+ OWeakAggObject::release();
+}
+//----------------------------------------------------------------------
+// XServiceInfo
+//----------------------------------------------------------------------
+uno::Sequence< OUString > SvxShapeRect::getSupportedServiceNames(void) throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSeq( SvxShape::getSupportedServiceNames() );
+ addToSequence( aSeq, 7, "com.sun.star.drawing.AreaShapeDescriptor",
+ "com.sun.star.drawing.AreaShape",
+ "com.sun.star.drawing.LineShape",
+ "com.sun.star.drawing.RectangleShape",
+ "com.sun.star.drawing.Text",
+ "com.sun.star.drawing.RotationDescriptor",
+ "com.sun.star.drawing.ShadowDescriptor");
+ return aSeq;
+}
+
+/** returns a StarOffice API wrapper for the given SdrObject */
+uno::Reference< drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw ()
+{
+ uno::Reference< drawing::XShape > xShape( SvxShape::GetShapeForSdrObj( pObj ) );
+ return xShape;
+}
+
+/** returns the SdrObject from the given StarOffice API wrapper */
+SdrObject* GetSdrObjectFromXShape( uno::Reference< drawing::XShape > xShape ) throw()
+{
+ SvxShape* pShape = SvxShape::getImplementation( xShape );
+ return pShape ? pShape->GetSdrObject() : NULL;
+}
+
+
diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx
new file mode 100644
index 0000000000..0387d79739
--- /dev/null
+++ b/svx/source/unodraw/unoshcol.cxx
@@ -0,0 +1,163 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoshcol.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "unoshcol.hxx"
+#include "unoprov.hxx"
+
+using namespace ::rtl;
+using namespace ::cppu;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::drawing;
+
+/***********************************************************************
+* *
+***********************************************************************/
+SvxShapeCollection::SvxShapeCollection() throw()
+: maShapeContainer( maShapeContainerMutex )
+{
+}
+
+//----------------------------------------------------------------------
+SvxShapeCollection::~SvxShapeCollection() throw()
+{
+}
+
+
+//----------------------------------------------------------------------
+Reference< uno::XInterface > SvxShapeCollection_NewInstance() throw()
+{
+ Reference< drawing::XShapes > xShapes( new SvxShapeCollection() );
+ Reference< uno::XInterface > xRef( xShapes, UNO_QUERY );
+ return xRef;
+}
+
+// XShapes
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeCollection::add( const Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException )
+{
+ maShapeContainer.addInterface( xShape );
+}
+
+//----------------------------------------------------------------------
+void SAL_CALL SvxShapeCollection::remove( const uno::Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException )
+{
+ maShapeContainer.removeInterface( xShape );
+}
+
+//----------------------------------------------------------------------
+sal_Int32 SAL_CALL SvxShapeCollection::getCount() throw( uno::RuntimeException )
+{
+ return maShapeContainer.getLength();
+}
+
+//----------------------------------------------------------------------
+uno::Any SAL_CALL SvxShapeCollection::getByIndex( sal_Int32 Index )
+ throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ if( Index < 0 || Index >= getCount() )
+ throw lang::IndexOutOfBoundsException();
+
+ uno::Sequence< Reference< uno::XInterface> > xElements( maShapeContainer.getElements() );
+
+ Reference< drawing::XShape > xShape( xElements.getArray()[Index], UNO_QUERY );
+ return uno::Any( &xShape, getElementType() );
+}
+
+// XElementAccess
+
+//----------------------------------------------------------------------
+uno::Type SAL_CALL SvxShapeCollection::getElementType() throw( uno::RuntimeException )
+{
+ return ::getCppuType(( const Reference< drawing::XShape >*)0);
+}
+
+//----------------------------------------------------------------------
+sal_Bool SAL_CALL SvxShapeCollection::hasElements() throw( uno::RuntimeException )
+{
+ return getCount() != 0;
+}
+
+//----------------------------------------------------------------------
+// XServiceInfo
+//----------------------------------------------------------------------
+OUString SAL_CALL SvxShapeCollection::getImplementationName()
+ throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxShapeCollection") );
+}
+
+sal_Bool SAL_CALL SvxShapeCollection::supportsService( const OUString& ServiceName )
+ throw( uno::RuntimeException )
+{
+ return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames() throw( uno::RuntimeException )
+{
+ uno::Sequence< OUString > aSeq(1);
+ aSeq.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ShapeCollection") );
+ return aSeq;
+}
+
+
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
new file mode 100644
index 0000000000..a5db6c3bfd
--- /dev/null
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -0,0 +1,204 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoshtxt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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/debug.hxx>
+//#include <svx/editeng.hxx>
+
+#include <unoshtxt.hxx>
+
+#ifndef _SFXHINT_HXX //autogen
+#include <svtools/hint.hxx>
+#endif
+#ifndef _SVDMODEL_HXX //autogen
+#include <svdmodel.hxx>
+#endif
+#ifndef _SVDOUTL_HXX //autogen
+#include <svdoutl.hxx>
+#endif
+#ifndef _SVDOBJ_HXX
+#include <svdobj.hxx>
+#endif
+#ifndef _SVDETC_HXX
+#include <svdetc.hxx>
+#endif
+#ifndef _OUTLINER_HXX
+#include <outliner.hxx>
+#endif
+#ifndef _SVX_UNOFOROU_HXX
+#include <unoforou.hxx>
+#endif
+
+#include "unotext.hxx"
+
+//------------------------------------------------------------------------
+
+SvxTextEditSource::SvxTextEditSource( SdrObject* pObject ) :
+ pObj ( pObject ),
+ pOutliner ( NULL ),
+ pTextForwarder ( NULL ),
+ bDataValid ( FALSE )
+{
+ DBG_ASSERT( pObj, "pObject muss gueltig sein" );
+
+ StartListening( *pObj->GetModel() );
+}
+
+//------------------------------------------------------------------------
+SvxTextEditSource::~SvxTextEditSource()
+{
+ if( pObj )
+ EndListening( *pObj->GetModel() );
+
+ delete pTextForwarder;
+ delete pOutliner;
+}
+
+//------------------------------------------------------------------------
+SvxEditSource* SvxTextEditSource::Clone() const
+{
+ return new SvxTextEditSource( pObj );
+}
+
+//------------------------------------------------------------------------
+SvxTextForwarder* SvxTextEditSource::GetTextForwarder()
+{
+ if (!pTextForwarder)
+ {
+ if( pOutliner == NULL )
+ {
+ SdrModel* pModel = pObj->GetModel();
+ pOutliner = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, pModel );
+ Outliner& aDrawOutliner = pModel->GetDrawOutliner();
+ pOutliner->SetCalcFieldValueHdl( aDrawOutliner.GetCalcFieldValueHdl() );
+ }
+
+ pTextForwarder = new SvxOutlinerForwarder( *pOutliner );
+ }
+
+ if( pObj && !bDataValid )
+ {
+ OutlinerParaObject* pOutlinerParaObject = pObj->GetOutlinerParaObject();
+ if( pOutlinerParaObject )
+ {
+ pOutliner->SetText( *pOutlinerParaObject );
+ }
+
+ bDataValid = TRUE;
+ }
+
+ return pTextForwarder;
+}
+
+//------------------------------------------------------------------------
+void SvxTextEditSource::UpdateData()
+{
+ if( pOutliner )
+ {
+ OutlinerParaObject* pOutlinerParaObject = pOutliner->CreateParaObject();
+ pObj->SetOutlinerParaObject( pOutlinerParaObject );
+ }
+}
+
+//------------------------------------------------------------------------
+void SvxTextEditSource::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+
+ BOOL bDestroyed = FALSE;
+
+ if( pSdrHint )
+ {
+ if( pSdrHint->GetKind() == HINT_OBJCHG )
+ bDataValid = FALSE; // Text muss neu geholt werden
+ if( pSdrHint->GetKind() == HINT_OBJREMOVED )
+ {
+ if( pObj == pSdrHint->GetObject() )
+ {
+ pObj = NULL;
+ bDestroyed = TRUE;
+ }
+ }
+ else if( pSdrHint->GetKind() == HINT_MODELCLEARED ||
+ pSdrHint->GetKind() == HINT_OBJLISTCLEARED )
+ {
+ if( pObj )
+ EndListening( *pObj->GetModel() );
+ pObj = NULL;
+ bDestroyed = TRUE;
+ }
+ }
+
+ if( bDestroyed )
+ {
+ delete pTextForwarder;
+ delete pOutliner;
+ pOutliner = NULL;
+
+ pTextForwarder = new SvxDummyTextSource();
+ }
+
+}
+
+
+
+
diff --git a/svx/source/unodraw/unottabl.cxx b/svx/source/unodraw/unottabl.cxx
new file mode 100644
index 0000000000..161e869d50
--- /dev/null
+++ b/svx/source/unodraw/unottabl.cxx
@@ -0,0 +1,328 @@
+/*************************************************************************
+ *
+ * $RCSfile: unottabl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_
+#include <com/sun/star/awt/Gradient.hpp>
+#endif
+
+#include <cppuhelper/implbase2.hxx>
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _SVX__XGRADIENT_HXX //autogen
+#include "xgrad.hxx"
+#endif
+#ifndef _SVX_XFLFTRIT_HXX
+#include "xflftrit.hxx"
+#endif
+
+#include "svdmodel.hxx"
+#include "xdef.hxx"
+#include "xflhtit.hxx"
+
+#ifndef _LIST_HXX
+#include<tools/list.hxx>
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+using namespace ::cppu;
+
+DECLARE_LIST( ItemSetArray_Impl, SfxItemSet* )
+
+class SvxUnoTransGradientTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >
+{
+private:
+ XBitmapList* mpBitmapList;
+ SdrModel* mpModel;
+ SfxItemPool* mpPool;
+
+ ItemSetArray_Impl aItemSetArray;
+
+ const OUString GetOrCreateName( USHORT nSurrogate );
+
+public:
+ SvxUnoTransGradientTable( SdrModel* pModel ) throw();
+ virtual ~SvxUnoTransGradientTable() throw();
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
+
+ static OUString getImplementationName_Static() throw()
+ {
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.SvxUnoTransGradientTable"));
+ }
+
+ static uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw();
+
+ // XNameContainer
+ virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const OUString& Name ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameReplace
+ virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // XNameAccess
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw( uno::RuntimeException);
+
+ // XElementAccess
+ virtual uno::Type SAL_CALL getElementType( ) throw( uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw( uno::RuntimeException);
+};
+
+SvxUnoTransGradientTable::SvxUnoTransGradientTable( SdrModel* pModel ) throw()
+: mpModel( pModel ),
+ mpBitmapList( pModel ? pModel->GetBitmapList() : NULL ),
+ mpPool( pModel ? &pModel->GetItemPool() : (SfxItemPool*)NULL )
+{
+}
+
+SvxUnoTransGradientTable::~SvxUnoTransGradientTable() throw()
+{
+ for( int i = 0; i<aItemSetArray.Count(); i++ )
+ delete (SfxItemSet*)aItemSetArray.GetObject( i );
+}
+
+sal_Bool SAL_CALL SvxUnoTransGradientTable::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSNL( getSupportedServiceNames() );
+ const OUString * pArray = aSNL.getConstArray();
+
+ for( INT32 i = 0; i < aSNL.getLength(); i++ )
+ if( pArray[i] == ServiceName )
+ return TRUE;
+
+ return FALSE;
+}
+
+OUString SAL_CALL SvxUnoTransGradientTable::getImplementationName() throw( uno::RuntimeException )
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoTransGradientTable") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoTransGradientTable::getSupportedServiceNames( )
+ throw( uno::RuntimeException )
+{
+ return getSupportedServiceNames_Static();
+}
+
+uno::Sequence< OUString > SvxUnoTransGradientTable::getSupportedServiceNames_Static(void) throw()
+{
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TransparencyGradientTable" ));
+ return aSNS;
+}
+
+// XNameContainer
+void SAL_CALL SvxUnoTransGradientTable::insertByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ if( hasByName( aName ) )
+ throw container::ElementExistException();
+
+ SfxItemSet* mpInSet = new SfxItemSet( *mpPool, XATTR_FILLFLOATTRANSPARENCE, XATTR_FILLFLOATTRANSPARENCE );
+ aItemSetArray.Insert( mpInSet );//, aItemSetArray.Count() );
+
+ XFillFloatTransparenceItem aTransGradient;
+ aTransGradient.SetName( String( aName ) );
+ aTransGradient.PutValue( aElement );
+ aTransGradient.SetEnabled( TRUE );
+
+ mpInSet->Put( aTransGradient, XATTR_FILLFLOATTRANSPARENCE );
+}
+
+void SAL_CALL SvxUnoTransGradientTable::removeByName( const OUString& Name )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+}
+
+// XNameReplace
+void SAL_CALL SvxUnoTransGradientTable::replaceByName( const OUString& aName, const uno::Any& aElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+}
+
+// XNameAccess
+uno::Any SAL_CALL SvxUnoTransGradientTable::getByName( const OUString& aName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( mpPool )
+ {
+ const OUString aSearchName( aName );
+ const USHORT nCount = mpPool->GetItemCount(XATTR_FILLFLOATTRANSPARENCE);
+ const XFillFloatTransparenceItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillFloatTransparenceItem*)mpPool->GetItem(XATTR_FILLFLOATTRANSPARENCE, nSurrogate);
+
+ if( pItem && ( GetOrCreateName( nSurrogate ) == aSearchName ) )
+ {
+ uno::Any aAny;
+ pItem->QueryValue( aAny );
+ return aAny;
+ }
+ }
+ }
+
+ throw container::NoSuchElementException();
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoTransGradientTable::getElementNames( )
+ throw( uno::RuntimeException )
+{
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_FILLFLOATTRANSPARENCE) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ const XFillFloatTransparenceItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillFloatTransparenceItem*)mpPool->GetItem(XATTR_FILLFLOATTRANSPARENCE, nSurrogate);
+ if( pItem )
+ pStrings[nSurrogate] = GetOrCreateName( nSurrogate );
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL SvxUnoTransGradientTable::hasByName( const OUString& aName )
+ throw( uno::RuntimeException )
+{
+ const OUString aSearchName( aName );
+ const USHORT nCount = mpPool ? mpPool->GetItemCount(XATTR_FILLFLOATTRANSPARENCE) : 0;
+ uno::Sequence< OUString > aSeq( nCount );
+ OUString* pStrings = aSeq.getArray();
+ const XFillFloatTransparenceItem *pItem;
+
+ for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ {
+ pItem = (XFillFloatTransparenceItem*)mpPool->GetItem(XATTR_FILLFLOATTRANSPARENCE, nSurrogate);
+ if( GetOrCreateName( nSurrogate ) == aSearchName )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+const OUString SvxUnoTransGradientTable::GetOrCreateName( USHORT nSurrogate )
+{
+ String aStrName;
+ XFillFloatTransparenceItem* pItem = (XFillFloatTransparenceItem*)mpPool->
+ GetItem( XATTR_FILLFLOATTRANSPARENCE, nSurrogate );
+ if( pItem )
+ {
+ aStrName = pItem->GetName();
+
+ if( !aStrName.Len() )
+ {
+ aStrName = String::CreateFromAscii( "TrGr" );
+ aStrName += String::CreateFromInt32( sal_Int32( nSurrogate ) );
+
+ pItem->SetName( aStrName );
+ }
+ }
+
+ return aStrName;
+}
+
+// XElementAccess
+uno::Type SAL_CALL SvxUnoTransGradientTable::getElementType( )
+ throw( uno::RuntimeException )
+{
+ return ::getCppuType((const struct awt::Gradient*)0);
+}
+
+sal_Bool SAL_CALL SvxUnoTransGradientTable::hasElements( )
+ throw( uno::RuntimeException )
+{
+ return mpPool && mpPool->GetItemCount(XATTR_FILLFLOATTRANSPARENCE) != 0;
+}
+
+/**
+ * Create a hatchtable
+ */
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoTransGradientTable_createInstance( SdrModel* pModel )
+{
+ return *new SvxUnoTransGradientTable(pModel);
+}
+
+
+
diff --git a/svx/source/unoedit/makefile.mk b/svx/source/unoedit/makefile.mk
new file mode 100644
index 0000000000..d523bafc20
--- /dev/null
+++ b/svx/source/unoedit/makefile.mk
@@ -0,0 +1,98 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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=svx
+TARGET=unoedit
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+CXXFILES = \
+ unoedsrc.cxx \
+ unofored.cxx \
+ unoforou.cxx \
+ unotext.cxx \
+ unotext2.cxx \
+ unofield.cxx
+
+
+SLOFILES = \
+ $(SLO)$/unoedsrc.obj \
+ $(SLO)$/unofored.obj \
+ $(SLO)$/unoforou.obj \
+ $(SLO)$/unotext.obj \
+ $(SLO)$/unotext2.obj \
+ $(SLO)$/unofield.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/unoedit/unoedsrc.cxx b/svx/source/unoedit/unoedsrc.cxx
new file mode 100644
index 0000000000..85562274ff
--- /dev/null
+++ b/svx/source/unoedit/unoedsrc.cxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoedsrc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "unoedsrc.hxx"
+
+//------------------------------------------------------------------------
+
+SvxTextForwarder::SvxTextForwarder()
+{
+}
+
+SvxTextForwarder::~SvxTextForwarder()
+{
+}
+
+//------------------------------------------------------------------------
+
+SvxEditSource::SvxEditSource()
+{
+}
+
+SvxEditSource::~SvxEditSource()
+{
+}
+
+//------------------------------------------------------------------------
+
+
+
diff --git a/svx/source/unoedit/unofield.cxx b/svx/source/unoedit/unofield.cxx
new file mode 100644
index 0000000000..99694c53c7
--- /dev/null
+++ b/svx/source/unoedit/unofield.cxx
@@ -0,0 +1,1099 @@
+/*************************************************************************
+ *
+ * $RCSfile: unofield.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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_LANG_NOSUPPORTEXCEPTION_HPP_
+#include <com/sun/star/lang/NoSupportException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_ //autogen
+#include <vos/mutex.hxx>
+#endif
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "eeitem.hxx"
+#define ITEMID_FIELD EE_FEATURE_FIELD
+#include "flditem.hxx"
+#include "unofield.hxx"
+#include "unoprov.hxx"
+
+using namespace ::rtl;
+using namespace ::vos;
+using namespace ::cppu;
+using namespace ::com::sun::star;
+
+#define QUERYINT( xint ) \
+ if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
+ aAny <<= uno::Reference< xint >(this)
+
+
+#define WID_FCOLOR 0
+#define WID_FORMAT 1
+#define WID_FIX 2
+#define WID_TCOLOR 3
+#define WID_PRES 4
+#define WID_URL 5
+#define WID_TARGET 6
+
+#define ID_DATEFIELD 0
+#define ID_URLFIELD 1
+#define ID_PAGEFIELD 2
+#define ID_PAGESFIELD 3
+#define ID_TIMEFIELD 4
+#define ID_FILEFIELD 5
+#define ID_TABLEFIELD 6
+#define ID_EXT_TIMEFIELD 7
+#define ID_EXT_FILEFIELD 8
+#define ID_AUTHORFIELD 9
+#define ID_NOTFOUND -1
+
+SfxItemPropertyMap* ImplGetFieldItemPropertyMap( USHORT mnId )
+{
+ static SfxItemPropertyMap aDateFieldPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("FieldColor"), WID_FCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ { MAP_CHAR_LEN("Format"), WID_FORMAT, &::getCppuType((const sal_Int32*)0), 0, 0 },
+ { MAP_CHAR_LEN("IsFix"), WID_FIX, &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN("TextColor"), WID_TCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aUrlFieldPropertyMap_Impl[] =
+ {
+
+ { MAP_CHAR_LEN("FieldColor"), WID_FCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ { MAP_CHAR_LEN("Format"), WID_FORMAT, &::getCppuType((const sal_Int32*)0), 0, 0 },
+ { MAP_CHAR_LEN("Presentation"), WID_PRES, &::getCppuType((const OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN("TargetFrame"), WID_TARGET, &::getCppuType((const OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN("TextColor"), WID_TCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ { MAP_CHAR_LEN("URL"), WID_URL, &::getCppuType((const OUString*)0), 0, 0 },
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aPageFieldPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("FieldColor"), WID_FCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ { MAP_CHAR_LEN("TextColor"), WID_TCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aExtTimeFieldPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("FieldColor"), WID_FCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ { MAP_CHAR_LEN("Format"), WID_FORMAT, &::getCppuType((const sal_Int32*)0), 0, 0 },
+ { MAP_CHAR_LEN("IsFix"), WID_FIX, &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN("TextColor"), WID_TCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aExtFileFieldPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("FieldColor"), WID_FCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ { MAP_CHAR_LEN("Format"), WID_FORMAT, &::getCppuType((const sal_Int32*)0), 0, 0 },
+ { MAP_CHAR_LEN("IsFix"), WID_FIX, &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN("TextColor"), WID_TCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ {0,0}
+ };
+
+ static SfxItemPropertyMap aAuthorFieldPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("FieldColor"), WID_FCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ { MAP_CHAR_LEN("Format"), WID_FORMAT, &::getCppuType((const sal_Int32*)0), 0, 0 },
+ { MAP_CHAR_LEN("IsFix"), WID_FIX, &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN("TextColor"), WID_TCOLOR, &::getCppuType((const sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
+ {0,0}
+ };
+
+ switch( mnId )
+ {
+ case ID_DATEFIELD:
+ return aDateFieldPropertyMap_Impl;
+ case ID_URLFIELD:
+ return aUrlFieldPropertyMap_Impl;
+ case ID_PAGEFIELD:
+ case ID_PAGESFIELD:
+ case ID_TIMEFIELD:
+ case ID_FILEFIELD:
+ case ID_TABLEFIELD:
+ return aPageFieldPropertyMap_Impl;
+ case ID_EXT_TIMEFIELD:
+ return aExtTimeFieldPropertyMap_Impl;
+ case ID_EXT_FILEFIELD:
+ return aExtFileFieldPropertyMap_Impl;
+// case ID_AUTHORFIELD:
+ default:
+ return aAuthorFieldPropertyMap_Impl;
+ }
+}
+
+static SfxItemPropertyMap aEmptyPropertyMap_Impl[] =
+{
+ {0,0}
+};
+
+/*
+static SfxItemPropertyMap* aFieldItemPropertyMaps_Impl[] =
+{
+};
+*/
+
+static sal_Char* aFieldItemNameMap_Impl[] =
+{
+ "Date",
+ "Url",
+ "Page",
+ "Pages",
+ "Time",
+ "File",
+ "Table",
+ "ExtTime",
+ "ExtFile",
+ "Author"
+};
+
+// ====================================================================
+// class SvxUnoTextField
+// ====================================================================
+
+SvxUnoTextField::SvxUnoTextField() throw()
+: OComponentHelper( getMutex() ),
+ mpDummyText( new SvxDummyTextSource() ),
+ SvxUnoTextRangeBase(mpDummyText, aEmptyPropertyMap_Impl),
+ mpPropSet(NULL),
+ mnId(ID_NOTFOUND)
+{
+}
+
+SvxUnoTextField::SvxUnoTextField( const SvxUnoText& rText, const ESelection& rSel, const SvxFieldData* pFieldData ) throw()
+: OComponentHelper( getMutex() ),
+ SvxUnoTextRangeBase(rText),
+ mpPropSet(NULL),
+ mnId(ID_NOTFOUND),
+ mpDummyText(NULL)
+{
+ DBG_ASSERT(pFieldData, "pFieldData == NULL! [CL]" );
+
+ SetSelection(rSel);
+
+ mxParentText = ((SvxUnoText*)&rText)->getText();
+
+ if(pFieldData)
+ {
+ mnId = GetFieldId(pFieldData);
+ DBG_ASSERT(mnId != ID_NOTFOUND, "unknown SvxFieldData! [CL]");
+ if(mnId != ID_NOTFOUND)
+ mpPropSet = new SfxItemPropertySet( ImplGetFieldItemPropertyMap(mnId) );
+ }
+}
+
+SvxUnoTextField::~SvxUnoTextField() throw()
+{
+ delete mpPropSet;
+ delete mpDummyText;
+}
+
+// uno::XInterface
+uno::Any SAL_CALL SvxUnoTextField::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT( beans::XPropertySet );
+ else QUERYINT( beans::XPropertyState );
+ else QUERYINT( text::XTextContent );
+ else QUERYINT( text::XTextField );
+ else QUERYINT( text::XTextRange );
+ else QUERYINT( lang::XServiceInfo );
+ else
+ return OComponentHelper::queryAggregation( rType );
+
+ return aAny;
+}
+
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxUnoTextField::getTypes()
+ throw (uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ maTypeSequence == OComponentHelper::getTypes();
+ sal_Int32 nOldCount = maTypeSequence.getLength();
+
+ maTypeSequence.realloc( nOldCount + 5 ); // !DANGER! keep this updated
+ uno::Type* pTypes = &maTypeSequence.getArray()[nOldCount];
+
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextField >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRange >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0);
+ }
+ return maTypeSequence;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxUnoTextField::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+uno::Any SAL_CALL SvxUnoTextField::queryInterface( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ return OComponentHelper::queryInterface(rType);
+}
+
+void SAL_CALL SvxUnoTextField::acquire() throw(uno::RuntimeException)
+{
+ OComponentHelper::acquire();
+}
+
+void SAL_CALL SvxUnoTextField::release() throw(uno::RuntimeException)
+{
+ OComponentHelper::release();
+}
+
+// Interface text::XTextField
+OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand )
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ if(!pForwarder->IsValid())
+ throw uno::RuntimeException();
+
+ if(bShowCommand)
+ {
+ return OUString::createFromAscii( aFieldItemNameMap_Impl[mnId] );
+ }
+ else
+ {
+ Color* pTColor = NULL;
+ Color* pFColor = NULL;
+ const SvxFieldItem* pField = GetField();
+ if(pField == NULL)
+ throw uno::RuntimeException();
+
+ const ESelection aSel = GetSelection();
+
+ String aStr( pForwarder->CalcFieldValue( *pField, aSel.nStartPara, aSel.nStartPos, pTColor, pFColor ) );
+
+ delete pTColor;
+ delete pFColor;
+ return aStr;
+ }
+}
+
+// Interface text::XTextContent
+void SAL_CALL SvxUnoTextField::attach( const uno::Reference< text::XTextRange >& xTextRange )
+ throw(lang::IllegalArgumentException, uno::RuntimeException)
+{
+ throw uno::RuntimeException();
+}
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextField::getAnchor()
+ throw(uno::RuntimeException)
+{
+ uno::Reference< text::XTextRange > xRange( mxParentText, uno::UNO_QUERY );
+ return xRange;
+}
+
+// lang::XComponent
+void SAL_CALL SvxUnoTextField::dispose()
+ throw(uno::RuntimeException)
+{
+ OComponentHelper::dispose();
+}
+
+void SAL_CALL SvxUnoTextField::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
+ throw(uno::RuntimeException)
+{
+ OComponentHelper::addEventListener(xListener);
+}
+
+void SAL_CALL SvxUnoTextField::removeEventListener( const uno::Reference< lang::XEventListener >& aListener )
+ throw(uno::RuntimeException)
+{
+ OComponentHelper::removeEventListener(aListener);
+}
+
+
+// Interface beans::XPropertySet
+uno::Reference< beans::XPropertySetInfo > SAL_CALL SvxUnoTextField::getPropertySetInfo( )
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ uno::Reference< beans::XPropertySetInfo > aRet;
+
+ if( mnId != ID_NOTFOUND )
+ {
+ aRet = new SfxExtItemPropertySetInfo( ImplGetFieldItemPropertyMap(mnId),
+ SvxUnoTextRangeBase::getPropertySetInfo()->getProperties() );
+ }
+ else
+ {
+ aRet = SvxUnoTextRangeBase::getPropertySetInfo();
+ }
+ return aRet;
+}
+
+void SAL_CALL SvxUnoTextField::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( GetField() == NULL )
+ throw uno::RuntimeException();
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), aPropertyName );
+ if ( !pMap )
+ {
+ SvxUnoTextRangeBase::setPropertyValue( aPropertyName, aValue );
+ return;
+ }
+
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ SvxFieldItem aFieldItem( *GetField() );
+
+ switch( pMap->nWID )
+ {
+ case WID_FORMAT:
+ {
+ sal_Int32 nFormat;
+ if(!(aValue >>= nFormat))
+ throw lang::IllegalArgumentException();
+
+ switch( mnId )
+ {
+ case ID_DATEFIELD:
+ {
+ SvxDateField* pDate = PTR_CAST( SvxDateField, aFieldItem.GetField() );
+ if(pDate)
+ pDate->SetFormat( (SvxDateFormat)nFormat );
+ break;
+ }
+ case ID_URLFIELD:
+ {
+ SvxURLField* pURL = PTR_CAST( SvxURLField, aFieldItem.GetField() );
+ if(pURL)
+ pURL->SetFormat( (SvxURLFormat)nFormat );
+ break;
+ }
+ case ID_EXT_TIMEFIELD:
+ {
+ SvxExtTimeField* pTime = PTR_CAST( SvxExtTimeField, aFieldItem.GetField() );
+ if(pTime)
+ pTime->SetFormat( (SvxTimeFormat)nFormat );
+ break;
+ }
+ case ID_EXT_FILEFIELD:
+ {
+ SvxExtFileField* pFile = PTR_CAST( SvxExtFileField, aFieldItem.GetField() );
+ if(pFile)
+ pFile->SetFormat( (SvxFileFormat)nFormat );
+ break;
+ }
+ case ID_AUTHORFIELD:
+ {
+ SvxAuthorField* pAuthor = PTR_CAST( SvxAuthorField, aFieldItem.GetField() );
+ if(pAuthor)
+ pAuthor->SetFormat( (SvxAuthorFormat)nFormat );
+ break;
+ }
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ }
+ break;
+ case WID_FIX:
+ {
+ if( aValue.hasValue() || aValue.getValueType() != ::getCppuBooleanType() )
+ throw lang::IllegalArgumentException();
+ sal_Bool bFix( *(sal_Bool*)aValue.getValue() );
+ switch( mnId )
+ {
+ case ID_EXT_TIMEFIELD:
+ {
+ SvxExtTimeField* pTime = PTR_CAST( SvxExtTimeField, aFieldItem.GetField() );
+ if(pTime)
+ pTime->SetType( (SvxTimeType)bFix?SVXTIMETYPE_FIX:SVXTIMETYPE_VAR );
+ break;
+ }
+ case ID_DATEFIELD:
+ {
+ SvxDateField* pDate = PTR_CAST( SvxDateField, aFieldItem.GetField() );
+ if(pDate)
+ pDate->SetType( (SvxDateType)bFix?SVXDATETYPE_FIX:SVXDATETYPE_VAR );
+ break;
+ }
+ case ID_EXT_FILEFIELD:
+ {
+ SvxExtFileField* pFile = PTR_CAST( SvxExtFileField, aFieldItem.GetField() );
+ if(pFile)
+ pFile->SetType( (SvxFileType)bFix?SVXFILETYPE_FIX:SVXFILETYPE_VAR );
+ break;
+ }
+ case ID_AUTHORFIELD:
+ {
+ SvxAuthorField* pAuthor = PTR_CAST( SvxAuthorField, aFieldItem.GetField() );
+ if(pAuthor)
+ pAuthor->SetType( (SvxAuthorType)bFix?SVXAUTHORTYPE_FIX:SVXAUTHORTYPE_VAR );
+ break;
+ }
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ }
+ break;
+ case WID_PRES:
+ case WID_URL:
+ case WID_TARGET:
+ {
+ SvxURLField* pURL = PTR_CAST( SvxURLField, aFieldItem.GetField() );
+ if(pURL)
+ {
+ OUString aUnoStr;
+ if(!(aValue >>= aUnoStr))
+ throw lang::IllegalArgumentException();
+
+ switch( pMap->nWID )
+ {
+ case WID_PRES:
+ pURL->SetRepresentation( aUnoStr );
+ break;
+ case WID_URL:
+ pURL->SetURL( aUnoStr );
+ break;
+ case WID_TARGET:
+ pURL->SetTargetFrame( aUnoStr );
+ break;
+ }
+ }
+ break;
+ }
+ }
+
+ SfxItemSet aSet = pForwarder->GetAttribs( GetSelection() );
+ aSet.Put( aFieldItem );
+}
+
+uno::Any SAL_CALL SvxUnoTextField::getPropertyValue( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ uno::Any aValue;
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), PropertyName );
+ if ( !pMap )
+ return SvxUnoTextRangeBase::getPropertyValue( PropertyName );
+
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ const SvxFieldItem* pFieldItem = GetField();
+
+ switch(pMap->nWID)
+ {
+ case WID_FORMAT:
+ switch( mnId )
+ {
+ case ID_DATEFIELD:
+ {
+ SvxDateField* pDate = PTR_CAST( SvxDateField, pFieldItem->GetField() );
+ if(pDate)
+ aValue <<= (sal_Int32)pDate->GetFormat();
+ break;
+ }
+ case ID_URLFIELD:
+ {
+ SvxURLField* pURL = PTR_CAST( SvxURLField, pFieldItem->GetField() );
+ if(pURL)
+ aValue <<= (sal_Int32)pURL->GetFormat();
+ break;
+ }
+ case ID_EXT_TIMEFIELD:
+ {
+ SvxExtTimeField* pTime = PTR_CAST( SvxExtTimeField, pFieldItem->GetField() );
+ if(pTime)
+ aValue <<= (sal_Int32)pTime->GetFormat();
+ break;
+ }
+ case ID_EXT_FILEFIELD:
+ {
+ SvxExtFileField* pFile = PTR_CAST( SvxExtFileField, pFieldItem->GetField() );
+ if(pFile)
+ aValue <<= (sal_Int32)pFile->GetFormat();
+ break;
+ }
+ case ID_AUTHORFIELD:
+ {
+ SvxAuthorField* pAuthor = PTR_CAST( SvxAuthorField, pFieldItem->GetField() );
+ if(pAuthor)
+ aValue <<= (sal_Int32)pAuthor->GetFormat();
+ break;
+ }
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ break;
+ case WID_FIX:
+ {
+ sal_Bool bFix = sal_False;
+ switch( mnId )
+ {
+ case ID_EXT_TIMEFIELD:
+ {
+ SvxExtTimeField* pTime = PTR_CAST( SvxExtTimeField, pFieldItem->GetField() );
+ if(pTime)
+ bFix = pTime->GetType() == SVXTIMETYPE_FIX;
+ break;
+ }
+ case ID_DATEFIELD:
+ {
+ SvxDateField* pDate = PTR_CAST( SvxDateField, pFieldItem->GetField() );
+ if(pDate)
+ bFix = pDate->GetType() == SVXDATETYPE_FIX;
+ break;
+ }
+ case ID_EXT_FILEFIELD:
+ {
+ SvxExtFileField* pFile = PTR_CAST( SvxExtFileField, pFieldItem->GetField() );
+ if(pFile)
+ bFix = pFile->GetType() == SVXFILETYPE_FIX;
+ break;
+ }
+ case ID_AUTHORFIELD:
+ {
+ SvxAuthorField* pAuthor = PTR_CAST( SvxAuthorField, pFieldItem->GetField() );
+ if(pAuthor)
+ bFix = pAuthor->GetType() == SVXAUTHORTYPE_FIX;
+ break;
+ }
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ aValue.setValue( &bFix, ::getCppuBooleanType() );
+ }
+ break;
+ case WID_PRES:
+ case WID_URL:
+ case WID_TARGET:
+ {
+ SvxURLField* pURL = PTR_CAST( SvxURLField, pFieldItem->GetField() );
+ if(pURL)
+ {
+ OUString aStr;
+ switch( pMap->nWID )
+ {
+ case WID_PRES:
+ aStr = pURL->GetRepresentation();
+ break;
+ case WID_URL:
+ aStr = pURL->GetURL();
+ break;
+ case WID_TARGET:
+ aStr = pURL->GetTargetFrame();
+ break;
+ }
+ aValue <<= aStr;
+ }
+ break;
+ }
+ case WID_FCOLOR:
+ case WID_TCOLOR:
+ {
+ Color* pFColor = NULL;
+ Color* pTColor = NULL;
+ const ESelection aSel = GetSelection();
+
+ pForwarder->CalcFieldValue( *pFieldItem, aSel.nStartPara, aSel.nStartPos, pTColor, pFColor );
+
+ if( pMap->nWID == WID_FCOLOR )
+ aValue <<= (sal_Int32)pFColor->GetColor();
+ else
+ aValue <<= (sal_Int32)pTColor->GetColor();
+ break;
+
+ delete pTColor;
+ delete pFColor;
+ }
+ }
+ return aValue;
+}
+
+// beans::XPropertyState
+beans::PropertyState SAL_CALL SvxUnoTextField::getPropertyState( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), PropertyName );
+ if ( !pMap )
+ return SvxUnoTextRangeBase::getPropertyState( PropertyName );
+
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ const SvxFieldItem* pFieldItem = GetField();
+
+ sal_Bool bDefault = sal_True;
+
+ switch(pMap->nWID)
+ {
+ case WID_FORMAT:
+ switch( mnId )
+ {
+ case ID_DATEFIELD:
+ {
+ SvxDateField* pDate = PTR_CAST( SvxDateField, pFieldItem->GetField() );
+ if(pDate)
+ bDefault = pDate->GetFormat() == SVXDATEFORMAT_STDSMALL;
+ break;
+ }
+ case ID_URLFIELD:
+ {
+ SvxURLField* pURL = PTR_CAST( SvxURLField, pFieldItem->GetField() );
+ if(pURL)
+ bDefault = pURL->GetFormat() == SVXURLFORMAT_URL;
+ break;
+ }
+ case ID_EXT_TIMEFIELD:
+ {
+ SvxExtTimeField* pTime = PTR_CAST( SvxExtTimeField, pFieldItem->GetField() );
+ if(pTime)
+ bDefault = pTime->GetFormat() == SVXTIMEFORMAT_STANDARD;
+ break;
+ }
+ case ID_EXT_FILEFIELD:
+ {
+ SvxExtFileField* pFile = PTR_CAST( SvxExtFileField, pFieldItem->GetField() );
+ if(pFile)
+ bDefault = pFile->GetFormat() == SVXFILEFORMAT_FULLPATH;
+ break;
+ }
+ case ID_AUTHORFIELD:
+ {
+ SvxAuthorField* pAuthor = PTR_CAST( SvxAuthorField, pFieldItem->GetField() );
+ if(pAuthor)
+ bDefault = pAuthor->GetFormat() == SVXAUTHORFORMAT_FULLNAME;
+ break;
+ }
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ break;
+ case WID_FIX:
+ switch( mnId )
+ {
+ case ID_EXT_TIMEFIELD:
+ {
+ SvxExtTimeField* pTime = PTR_CAST( SvxExtTimeField, pFieldItem->GetField() );
+ if(pTime)
+ bDefault = pTime->GetType() != SVXTIMETYPE_FIX;
+ break;
+ }
+ case ID_DATEFIELD:
+ {
+ SvxDateField* pDate = PTR_CAST( SvxDateField, pFieldItem->GetField() );
+ if(pDate)
+ bDefault = pDate->GetType() != SVXDATETYPE_FIX;
+ break;
+ }
+ case ID_EXT_FILEFIELD:
+ {
+ SvxExtFileField* pFile = PTR_CAST( SvxExtFileField, pFieldItem->GetField() );
+ if(pFile)
+ bDefault = pFile->GetType() != SVXFILETYPE_FIX;;
+ break;
+ }
+ case ID_AUTHORFIELD:
+ {
+ SvxAuthorField* pAuthor = PTR_CAST( SvxAuthorField, pFieldItem->GetField() );
+ if(pAuthor)
+ bDefault = pAuthor->GetType() != SVXAUTHORTYPE_FIX;
+ break;
+ }
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ break;
+ case WID_PRES:
+ case WID_URL:
+ case WID_TARGET:
+ {
+ SvxURLField* pURL = PTR_CAST( SvxURLField, pFieldItem->GetField() );
+ if(pURL)
+ {
+ String aStr;
+ switch( pMap->nWID )
+ {
+ case WID_PRES:
+ aStr = pURL->GetRepresentation();
+ break;
+ case WID_URL:
+ aStr = pURL->GetURL();
+ break;
+ case WID_TARGET:
+ aStr = pURL->GetTargetFrame();
+ break;
+ }
+ bDefault = aStr.Len() == 0;
+ }
+ break;
+ }
+ case WID_FCOLOR:
+ case WID_TCOLOR:
+ {
+ bDefault = sal_False;
+ break;
+ }
+ }
+
+ return bDefault?beans::PropertyState_DEFAULT_VALUE:beans::PropertyState_DIRECT_VALUE;
+}
+
+void SAL_CALL SvxUnoTextField::setPropertyToDefault( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), PropertyName );
+ if ( !pMap )
+ {
+ SvxUnoTextRangeBase::setPropertyToDefault( PropertyName );
+ }
+ else
+ {
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ SvxFieldItem aFieldItem( *GetField() );
+
+ switch( pMap->nWID )
+ {
+ case WID_FORMAT:
+ switch( mnId )
+ {
+ case ID_DATEFIELD:
+ {
+ SvxDateField* pDate = PTR_CAST( SvxDateField, aFieldItem.GetField() );
+ if(pDate)
+ pDate->SetFormat( SVXDATEFORMAT_STDSMALL );
+ break;
+ }
+ case ID_URLFIELD:
+ {
+ SvxURLField* pURL = PTR_CAST( SvxURLField, aFieldItem.GetField() );
+ if(pURL)
+ pURL->SetFormat( SVXURLFORMAT_URL );
+ break;
+ }
+ case ID_EXT_TIMEFIELD:
+ {
+ SvxExtTimeField* pTime = PTR_CAST( SvxExtTimeField, aFieldItem.GetField() );
+ if(pTime)
+ pTime->SetFormat( SVXTIMEFORMAT_STANDARD );
+ break;
+ }
+ case ID_EXT_FILEFIELD:
+ {
+ SvxExtFileField* pFile = PTR_CAST( SvxExtFileField, aFieldItem.GetField() );
+ if(pFile)
+ pFile->SetFormat( SVXFILEFORMAT_FULLPATH );
+ break;
+ }
+ case ID_AUTHORFIELD:
+ {
+ SvxAuthorField* pAuthor = PTR_CAST( SvxAuthorField, aFieldItem.GetField() );
+ if(pAuthor)
+ pAuthor->SetFormat( SVXAUTHORFORMAT_FULLNAME );
+ break;
+ }
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ break;
+ case WID_FIX:
+ switch( mnId )
+ {
+ case ID_EXT_TIMEFIELD:
+ {
+ SvxExtTimeField* pTime = PTR_CAST( SvxExtTimeField, aFieldItem.GetField() );
+ if(pTime)
+ pTime->SetType( SVXTIMETYPE_VAR );
+ break;
+ }
+ case ID_DATEFIELD:
+ {
+ SvxDateField* pDate = PTR_CAST( SvxDateField, aFieldItem.GetField() );
+ if(pDate)
+ pDate->SetType( SVXDATETYPE_VAR );
+ break;
+ }
+ case ID_EXT_FILEFIELD:
+ {
+ SvxExtFileField* pFile = PTR_CAST( SvxExtFileField, aFieldItem.GetField() );
+ if(pFile)
+ pFile->SetType( SVXFILETYPE_VAR );
+ break;
+ }
+ case ID_AUTHORFIELD:
+ {
+ SvxAuthorField* pAuthor = PTR_CAST( SvxAuthorField, aFieldItem.GetField() );
+ if(pAuthor)
+ pAuthor->SetType( SVXAUTHORTYPE_VAR );
+ break;
+ }
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ break;
+ case WID_PRES:
+ case WID_URL:
+ case WID_TARGET:
+ {
+ SvxURLField* pURL = PTR_CAST( SvxURLField, aFieldItem.GetField() );
+ if(pURL)
+ {
+ String aStr;
+ switch( pMap->nWID )
+ {
+ case WID_PRES:
+ pURL->SetRepresentation( aStr );
+ break;
+ case WID_URL:
+ pURL->SetURL( aStr );
+ break;
+ case WID_TARGET:
+ pURL->SetTargetFrame( aStr );
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+}
+
+uno::Any SAL_CALL SvxUnoTextField::getPropertyDefault( const OUString& aPropertyName )
+ throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ uno::Any aValue;
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), aPropertyName );
+ if ( !pMap )
+ return SvxUnoTextRangeBase::getPropertyDefault( aPropertyName );
+
+ switch(pMap->nWID)
+ {
+ case WID_FORMAT:
+ {
+ sal_Int32 nFormat;
+ switch( mnId )
+ {
+ case ID_DATEFIELD:
+ {
+ nFormat = SVXDATEFORMAT_STDSMALL;
+ break;
+ }
+ case ID_URLFIELD:
+ {
+ nFormat = SVXURLFORMAT_URL;
+ break;
+ }
+ case ID_EXT_TIMEFIELD:
+ {
+ nFormat = SVXTIMEFORMAT_STANDARD;
+ break;
+ }
+ case ID_EXT_FILEFIELD:
+ {
+ nFormat = SVXFILEFORMAT_FULLPATH;
+ break;
+ }
+ case ID_AUTHORFIELD:
+ {
+ nFormat = SVXAUTHORFORMAT_FULLNAME;
+ break;
+ }
+ aValue <<= nFormat;
+ }
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ break;
+ case WID_FIX:
+ switch( mnId )
+ {
+ case ID_EXT_TIMEFIELD:
+ case ID_DATEFIELD:
+ case ID_EXT_FILEFIELD:
+ case ID_AUTHORFIELD:
+ {
+ sal_Bool bFix( sal_False );
+ aValue.setValue( &bFix, ::getCppuBooleanType() );
+ break;
+ }
+ default:
+ throw beans::UnknownPropertyException();
+ }
+ break;
+ case WID_PRES:
+ case WID_URL:
+ case WID_TARGET:
+ {
+ OUString aEmptyURL;
+ aValue <<= aEmptyURL;
+ break;
+ }
+ case WID_FCOLOR:
+ {
+ aValue <<= (sal_Int32)0xffffff;
+ break;
+ }
+ case WID_TCOLOR:
+ {
+ aValue <<= (sal_Int32)0x000000;
+ break;
+ }
+ }
+ return aValue;
+}
+
+// OComponentHelper
+void SvxUnoTextField::disposing()
+{
+ // todo
+}
+
+sal_Int32 SvxUnoTextField::GetFieldId( const SvxFieldData* pFieldData ) const throw()
+{
+ if( pFieldData->ISA( SvxURLField ) )
+ return ID_URLFIELD;
+ else if( pFieldData->ISA( SvxPageField ) )
+ return ID_PAGEFIELD;
+ else if( pFieldData->ISA( SvxPagesField ) )
+ return ID_PAGESFIELD;
+ else if( pFieldData->ISA( SvxTimeField ) )
+ return ID_TIMEFIELD;
+ else if( pFieldData->ISA( SvxFileField ) )
+ return ID_FILEFIELD;
+ else if( pFieldData->ISA( SvxTableField ) )
+ return ID_TABLEFIELD;
+ else if( pFieldData->ISA( SvxExtTimeField ) )
+ return ID_EXT_TIMEFIELD;
+ else if( pFieldData->ISA( SvxExtFileField ) )
+ return ID_EXT_FILEFIELD;
+ else if( pFieldData->ISA( SvxAuthorField ) )
+ return ID_AUTHORFIELD;
+ else if( pFieldData->ISA( SvxDateField ) )
+ return ID_DATEFIELD;
+
+ return ID_NOTFOUND;
+}
+
+const SvxFieldItem* SvxUnoTextField::GetField() const throw()
+{
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ SfxItemSet aSet = pForwarder->GetAttribs( GetSelection() );
+
+ if ( aSet.GetItemState( EE_FEATURE_FIELD ) == SFX_ITEM_ON )
+ return (SvxFieldItem*)aSet.GetItem( EE_FEATURE_FIELD );
+ else
+ return NULL;
+}
+
+// Interface text::XTextRange
+uno::Reference< text::XText > SAL_CALL SvxUnoTextField::getText()
+ throw(uno::RuntimeException)
+{
+ return mxParentText;
+}
+
+// lang::XServiceInfo
+OUString SAL_CALL SvxUnoTextField::getImplementationName() throw(uno::RuntimeException)
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextField"));
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxUnoTextRangeBase::getSupportedServiceNames() );
+ SvxServiceInfoHelper::addToSequence( aSeq, 3, "com.sun.star.style.ParagraphProperties",
+ "com.sun.star.text.TextContent",
+ "com.sun.star.text.TextField");
+ return aSeq;
+}
+
diff --git a/svx/source/unoedit/unofored.cxx b/svx/source/unoedit/unofored.cxx
new file mode 100644
index 0000000000..fbb7faf097
--- /dev/null
+++ b/svx/source/unoedit/unofored.cxx
@@ -0,0 +1,299 @@
+/*************************************************************************
+ *
+ * $RCSfile: unofored.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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
+
+#ifndef _EEITEM_HXX //autogen
+#include "eeitem.hxx"
+#endif
+
+#include <svtools/itemset.hxx>
+#include <editeng.hxx>
+#include <editobj.hxx> // nur fuer die GetText-Kruecke
+
+#include "unofored.hxx"
+
+//------------------------------------------------------------------------
+
+SvxEditEngineForwarder::SvxEditEngineForwarder( EditEngine& rEngine ) :
+ rEditEngine( rEngine )
+{
+}
+
+SvxEditEngineForwarder::~SvxEditEngineForwarder()
+{
+ // die EditEngine muss ggf. von aussen geloescht werden
+}
+
+USHORT SvxEditEngineForwarder::GetParagraphCount() const
+{
+ return rEditEngine.GetParagraphCount();
+}
+
+USHORT SvxEditEngineForwarder::GetTextLen( USHORT nParagraph ) const
+{
+ return rEditEngine.GetTextLen( nParagraph );
+}
+
+String SvxEditEngineForwarder::GetText( const ESelection& rSel ) const
+{
+ String aRet = rEditEngine.GetText( rSel, LINEEND_LF );
+ aRet.ConvertLineEnd();
+ return aRet;
+}
+
+SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel ) const
+{
+ return rEditEngine.GetAttribs( rSel );
+}
+
+SfxItemSet SvxEditEngineForwarder::GetParaAttribs( USHORT nPara ) const
+{
+ SfxItemSet aSet( rEditEngine.GetParaAttribs( nPara ) );
+
+ USHORT nWhich = EE_PARA_START;
+ while( nWhich <= EE_PARA_END )
+ {
+ if( aSet.GetItemState( nWhich, TRUE ) != SFX_ITEM_ON )
+ {
+ if( rEditEngine.HasParaAttrib( nPara, nWhich ) )
+ aSet.Put( rEditEngine.GetParaAttrib( nPara, nWhich ) );
+ }
+ nWhich++;
+ }
+
+ return aSet;
+}
+
+void SvxEditEngineForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+{
+ rEditEngine.SetParaAttribs( nPara, rSet );
+}
+
+SfxItemPool* SvxEditEngineForwarder::GetPool() const
+{
+ return rEditEngine.GetEmptyItemSet().GetPool();
+}
+
+void SvxEditEngineForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const
+{
+ rEditEngine.GetPortions( nPara, rList );
+}
+
+void SvxEditEngineForwarder::QuickInsertText( const String& rText, const ESelection& rSel )
+{
+ rEditEngine.QuickInsertText( rText, rSel );
+}
+
+void SvxEditEngineForwarder::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
+{
+ rEditEngine.QuickInsertField( rFld, rSel );
+}
+
+void SvxEditEngineForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
+{
+ rEditEngine.QuickSetAttribs( rSet, rSel );
+}
+
+XubString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+{
+ return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
+}
+
+USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich )
+{
+ EECharAttribArray aAttribs;
+
+ const SfxPoolItem* pLastItem = NULL;
+
+ SfxItemState eState = SFX_ITEM_DEFAULT;
+
+ // check all paragraphs inside the selection
+ for( USHORT nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
+ {
+ SfxItemState eParaState = SFX_ITEM_DEFAULT;
+
+ // calculate start and endpos for this paragraph
+ USHORT nPos = 0;
+ if( rSel.nStartPara == nPara )
+ nPos = rSel.nStartPos;
+
+ USHORT nEndPos = rSel.nEndPos;
+ if( rSel.nEndPara != nPara )
+ nEndPos = rEditEngine.GetTextLen( nPara );
+
+
+ // get list of char attribs
+ rEditEngine.GetCharAttribs( nPara, aAttribs );
+
+ BOOL bEmpty = TRUE; // we found no item inside the selektion of this paragraph
+ BOOL bGaps = FALSE; // we found items but theire gaps between them
+ USHORT nLastEnd = nPos;
+
+ const SfxPoolItem* pParaItem = NULL;
+
+ for( USHORT nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ )
+ {
+ struct EECharAttrib aAttrib = aAttribs.GetObject( nAttrib );
+ DBG_ASSERT( aAttrib.pAttr, "GetCharAttribs gives corrupt data" );
+
+ if( aAttrib.nStart >= nEndPos )
+ break; // break if we are already behind our selektion
+
+ if( aAttrib.nEnd <= nPos )
+ continue; // or if the attribute ends before our selektion
+
+ if( aAttrib.pAttr->Which() != nWhich )
+ continue; // skip if is not the searched item
+
+ // if we already found an item
+ if( pParaItem )
+ {
+ // ... and its different to this one than the state is dont care
+ if( *pParaItem != *aAttrib.pAttr )
+ return SFX_ITEM_DONTCARE;
+ }
+ else
+ {
+ pParaItem = aAttrib.pAttr;
+ }
+
+ if( bEmpty )
+ bEmpty = FALSE;
+
+ if( !bGaps && aAttrib.nStart > nLastEnd )
+ bGaps = TRUE;
+
+ nLastEnd = aAttrib.nEnd;
+ }
+
+ if( !bEmpty && !bGaps && nLastEnd < ( nEndPos - 1 ) )
+ bGaps = TRUE;
+
+ // since we have no portion with our item or if there were gaps
+ if( bEmpty || bGaps )
+ {
+ // we need to check the paragraph item
+ const SfxItemSet& rParaSet = rEditEngine.GetParaAttribs( nPara );
+ if( rParaSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ eState = SFX_ITEM_SET;
+ // get item from the paragraph
+ const SfxPoolItem* pTempItem = rParaSet.GetItem( nWhich );
+ if( pParaItem )
+ {
+ if( *pParaItem != *pTempItem )
+ return SFX_ITEM_DONTCARE;
+ }
+ else
+ {
+ pParaItem = pTempItem;
+ }
+
+ // set if theres no last item or if its the same
+ eParaState = SFX_ITEM_SET;
+ }
+ else if( bEmpty )
+ {
+ eParaState = SFX_ITEM_DEFAULT;
+ }
+ else if( bGaps )
+ {
+ // gaps and item not set in paragraph, thats a dont care
+ return SFX_ITEM_DONTCARE;
+ }
+ }
+ else
+ {
+ eParaState = SFX_ITEM_SET;
+ }
+
+ // if we already found an item check if we found the same
+ if( pLastItem )
+ {
+ if( (pParaItem == NULL) || (*pLastItem != *pParaItem) )
+ return SFX_ITEM_DONTCARE;
+ }
+ else
+ {
+ pLastItem = pParaItem;
+ eState = eParaState;
+ }
+ }
+
+ return eState;
+}
+
+USHORT SvxEditEngineForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const
+{
+ return GetSvxEditEngineItemState( rEditEngine, rSel, nWhich );
+}
+
+USHORT SvxEditEngineForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
+{
+ const SfxItemSet& rSet = rEditEngine.GetParaAttribs( nPara );
+ return rSet.GetItemState( nWhich );
+}
+
+//------------------------------------------------------------------------
+
+
+
diff --git a/svx/source/unoedit/unoforou.cxx b/svx/source/unoedit/unoforou.cxx
new file mode 100644
index 0000000000..75e24da807
--- /dev/null
+++ b/svx/source/unoedit/unoforou.cxx
@@ -0,0 +1,215 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoforou.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <svtools/itemset.hxx>
+#include <editeng.hxx>
+#include <outliner.hxx>
+
+#ifndef _SFXPOOLITEM_HXX
+#include <svtools/poolitem.hxx>
+#endif
+
+#ifndef _SV_WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+
+#ifndef _EEITEM_HXX //autogen
+#include "eeitem.hxx"
+#endif
+
+#include "unoforou.hxx"
+#include "unofored.hxx"
+
+//------------------------------------------------------------------------
+
+SvxOutlinerForwarder::SvxOutlinerForwarder( Outliner& rOutl ) :
+ rOutliner( rOutl )
+{
+}
+
+SvxOutlinerForwarder::~SvxOutlinerForwarder()
+{
+ // der Outliner muss ggf. von aussen geloescht werden
+}
+
+USHORT SvxOutlinerForwarder::GetParagraphCount() const
+{
+ return (USHORT)rOutliner.GetParagraphCount();
+}
+
+USHORT SvxOutlinerForwarder::GetTextLen( USHORT nParagraph ) const
+{
+ return rOutliner.GetEditEngine().GetTextLen( nParagraph );
+}
+
+String SvxOutlinerForwarder::GetText( const ESelection& rSel ) const
+{
+ //! GetText(ESelection) sollte es wohl auch mal am Outliner geben
+ // solange den Hack fuer die EditEngine uebernehmen:
+ EditEngine* pEditEngine = (EditEngine*)&rOutliner.GetEditEngine();
+ return pEditEngine->GetText( rSel, LINEEND_LF );
+}
+
+SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel ) const
+{
+ //! gibt's das nicht am Outliner ???
+ //! und warum ist GetAttribs an der EditEngine nicht const?
+
+ return ((EditEngine&)rOutliner.GetEditEngine()).GetAttribs( rSel );
+}
+
+SfxItemSet SvxOutlinerForwarder::GetParaAttribs( USHORT nPara ) const
+{
+ SfxItemSet aSet( rOutliner.GetParaAttribs( nPara ) );
+
+ EditEngine& rEditEngine = (EditEngine&)rOutliner.GetEditEngine();
+
+ USHORT nWhich = EE_PARA_START;
+ while( nWhich <= EE_PARA_END )
+ {
+ if( aSet.GetItemState( nWhich, TRUE ) != SFX_ITEM_ON )
+ {
+ if( rEditEngine.HasParaAttrib( nPara, nWhich ) )
+ aSet.Put( rEditEngine.GetParaAttrib( nPara, nWhich ) );
+ }
+ nWhich++;
+ }
+
+ return aSet;
+}
+
+void SvxOutlinerForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+{
+ rOutliner.SetParaAttribs( nPara, rSet );
+}
+
+SfxItemPool* SvxOutlinerForwarder::GetPool() const
+{
+ return rOutliner.GetEmptyItemSet().GetPool();
+}
+
+void SvxOutlinerForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const
+{
+ ((EditEngine&)rOutliner.GetEditEngine()).GetPortions( nPara, rList );
+}
+
+void SvxOutlinerForwarder::QuickInsertText( const String& rText, const ESelection& rSel )
+{
+ // Um das Interface mit InsertControlCharacter() zu unterstuetzen, muss hier
+ // der umgekehrte Weg gegangen werden, um entspr. Aktionen auszuloesen
+ String aText( (char)13 ); // '\r' geht auf'm Mac nicht
+ aText.ConvertLineEnd( LINEEND_LF ); // Zeilenenden nur einfach zaehlen
+ if( rText == aText )
+ {
+ // neuen Absatz einfuegen
+// aText.Erase();
+ BOOL bMode = rOutliner.GetUpdateMode();
+ rOutliner.SetUpdateMode( FALSE );
+ WorkWindow aWW( NULL, 0 );
+ OutlinerView aView( &rOutliner, &aWW );
+// ESelection aSel( nParagraph, 0 , nParagraph, 0 );
+ aView.SetSelection( rSel );
+ aView.InsertText( aText );
+// ULONG nAbsPos = rSel.nStartPara + 1;
+// USHORT nDepth = 1;
+// rOutliner.Insert( aText, nAbsPos, nDepth );
+ rOutliner.SetUpdateMode( bMode );
+ aView.SetWindow( NULL );
+
+ }
+ else
+ rOutliner.QuickInsertText( rText, rSel );
+}
+
+void SvxOutlinerForwarder::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
+{
+ rOutliner.QuickInsertField( rFld, rSel );
+}
+
+void SvxOutlinerForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
+{
+ rOutliner.QuickSetAttribs( rSet, rSel );
+}
+
+XubString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+{
+ return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
+}
+
+extern USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich );
+
+USHORT SvxOutlinerForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const
+{
+ return GetSvxEditEngineItemState( (EditEngine&)rOutliner.GetEditEngine(), rSel, nWhich );
+}
+
+USHORT SvxOutlinerForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
+{
+ const SfxItemSet& rSet = rOutliner.GetParaAttribs( nPara );
+ return rSet.GetItemState( nWhich );
+}
+
+//------------------------------------------------------------------------
+
+
+
diff --git a/svx/source/unoedit/unotext.cxx b/svx/source/unoedit/unotext.cxx
new file mode 100644
index 0000000000..01d3c046c9
--- /dev/null
+++ b/svx/source/unoedit/unotext.cxx
@@ -0,0 +1,1412 @@
+/*************************************************************************
+ *
+ * $RCSfile: unotext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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_STYLE_LINESPACING_HPP_
+#include <com/sun/star/style/LineSpacing.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_HORIORIENTATION_HPP_
+#include <com/sun/star/text/HoriOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_CONTROLCHARACTER_HPP_
+#include <com/sun/star/text/ControlCharacter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_HORIORIENTATION_HPP_
+#include <com/sun/star/text/HoriOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_CONTROLCHARACTER_HPP_
+#include <com/sun/star/text/ControlCharacter.hpp>
+#endif
+
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_ //autogen
+#include <vos/mutex.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#include <eeitem.hxx>
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+
+#define ITEMID_FONT EE_CHAR_FONTINFO
+#ifndef _SVX_FONTITEM_HXX //autogen
+#include <fontitem.hxx>
+#endif
+
+#define ITEMID_TABSTOP EE_PARA_TABS
+#ifndef _SVX_TSPTITEM_HXX //autogen
+#include <tstpitem.hxx>
+#endif
+
+#ifndef _SVDOBJ_HXX
+#include "svdobj.hxx"
+#endif
+
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include "unoshtxt.hxx"
+#include "unoprnms.hxx"
+#include "unotext.hxx"
+#include "unoedsrc.hxx"
+#include "unomid.hxx"
+#include "unonrule.hxx"
+#include "unofdesc.hxx"
+
+using namespace ::rtl;
+using namespace ::vos;
+using namespace ::cppu;
+using namespace ::com::sun::star;
+
+#define QUERYINT( xint ) \
+ if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
+ aAny <<= uno::Reference< xint >(this)
+
+SfxItemPropertyMap aEmptyPropMap[] =
+{
+ {0,0}
+};
+
+// ====================================================================
+// helper fuer Item/Property Konvertierung
+// ====================================================================
+
+// Numerierung
+const unsigned short aSvxToUnoAdjust[] =
+{
+ text::HoriOrientation::LEFT,
+ text::HoriOrientation::RIGHT,
+ text::HoriOrientation::FULL,
+ text::HoriOrientation::CENTER,
+ text::HoriOrientation::FULL,
+ text::HoriOrientation::LEFT
+};
+
+const SvxAdjust aUnoToSvxAdjust[] =
+{
+ SVX_ADJUST_LEFT,
+ SVX_ADJUST_RIGHT,
+ SVX_ADJUST_CENTER,
+ SVX_ADJUST_LEFT,
+ SVX_ADJUST_LEFT,
+ SVX_ADJUST_LEFT,
+ SVX_ADJUST_BLOCK
+};
+
+SvxAdjust ConvertUnoAdjust( unsigned short nAdjust ) throw()
+{
+ DBG_ASSERT( nAdjust <= 7, "Enum hat sich geaendert! [CL]" );
+ return aUnoToSvxAdjust[nAdjust];
+}
+
+unsigned short ConvertUnoAdjust( SvxAdjust eAdjust ) throw()
+{
+ DBG_ASSERT( eAdjust <= 6, "Enum hat sich geaendert! [CL]" );
+ return aSvxToUnoAdjust[eAdjust];
+}
+
+void GetSelection( struct ESelection& rSel, SvxTextForwarder* pForwarder ) throw()
+{
+ DBG_ASSERT( pForwarder, "I need a valid SvxTextForwarder!" );
+ if( pForwarder )
+ {
+ sal_Int16 nParaCount = pForwarder->GetParagraphCount();
+ if(nParaCount>0)
+ nParaCount--;
+
+ rSel = ESelection( 0,0, nParaCount, pForwarder->GetTextLen( nParaCount ));
+ }
+}
+
+void CheckSelection( struct ESelection& rSel, SvxTextForwarder* pForwarder ) throw()
+{
+ DBG_ASSERT( pForwarder, "I need a valid SvxTextForwarder!" );
+ if( pForwarder )
+ {
+ ESelection aMaxSelection;
+ GetSelection( aMaxSelection, pForwarder );
+
+ // check start position
+ if( rSel.nStartPara < aMaxSelection.nStartPara )
+ {
+ rSel.nStartPara = aMaxSelection.nStartPara;
+ rSel.nStartPos = aMaxSelection.nStartPos;
+ }
+ else if( rSel.nStartPara > aMaxSelection.nEndPara )
+ {
+ rSel.nStartPara = aMaxSelection.nEndPara;
+ rSel.nStartPos = aMaxSelection.nEndPos;
+ }
+ else if( rSel.nStartPos > pForwarder->GetTextLen( rSel.nStartPara ) )
+ {
+ rSel.nStartPos = pForwarder->GetTextLen( rSel.nStartPara );
+ }
+
+ // check end position
+ if( rSel.nEndPara < aMaxSelection.nStartPara )
+ {
+ rSel.nEndPara = aMaxSelection.nStartPara;
+ rSel.nEndPos = aMaxSelection.nStartPos;
+ }
+ else if( rSel.nEndPara > aMaxSelection.nEndPara )
+ {
+ rSel.nEndPara = aMaxSelection.nEndPara;
+ rSel.nEndPos = aMaxSelection.nEndPos;
+ }
+ else if( rSel.nEndPos > pForwarder->GetTextLen( rSel.nEndPara ) )
+ {
+ rSel.nEndPos = pForwarder->GetTextLen( rSel.nEndPara );
+ }
+ }
+}
+
+static SvxDummyTextSource aDummy;
+
+// ====================================================================
+// class SvxUnoTextRangeBase
+// ====================================================================
+
+UNO3_GETIMPLEMENTATION_IMPL( SvxUnoTextRangeBase );
+
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw()
+: aPropSet(_pMap)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ DBG_ASSERT(pSource,"SvxUnoTextRangeBase: Source darf nicht 0 sein");
+ pEditSource = pSource->Clone();
+ ESelection aSelection;
+ ::GetSelection( aSelection, pEditSource->GetTextForwarder() );
+ SetSelection( aSelection );
+}
+
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxUnoTextRangeBase& rRange ) throw()
+: aPropSet(rRange.getPropertyMap())
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ pEditSource = rRange.pEditSource->Clone();
+ aSelection = rRange.aSelection;
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+}
+
+SvxUnoTextRangeBase::~SvxUnoTextRangeBase() throw()
+{
+ delete pEditSource;
+}
+
+void SvxUnoTextRangeBase::SetSelection( const ESelection& rSelection ) throw()
+{
+ aSelection = rSelection;
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+}
+
+// Interface XTextRange ( XText )
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getStart(void)
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ SvxUnoText* pText = SvxUnoText::getImplementation( getText() );
+
+ if(pText == NULL)
+ throw uno::RuntimeException();
+
+ SvxUnoTextRange* pRange = new SvxUnoTextRange( *pText );
+ uno::Reference< text::XTextRange > xRange( pRange );
+
+ ESelection aNewSel = aSelection;
+ aNewSel.nEndPara = aNewSel.nStartPara;
+ aNewSel.nEndPos = aNewSel.nStartPos;
+ pRange->SetSelection( aNewSel );
+
+ return xRange;
+}
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getEnd(void)
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ SvxUnoText* pText = SvxUnoText::getImplementation( getText() );
+
+ if(pText == NULL)
+ throw uno::RuntimeException();
+
+ SvxUnoTextRange* pNew = new SvxUnoTextRange( *pText );
+ uno::Reference< text::XTextRange > xRet( pNew );
+
+ ESelection aNewSel = aSelection;
+ aNewSel.nStartPara = aNewSel.nEndPara;
+ aNewSel.nStartPos = aNewSel.nEndPos;
+ pNew->SetSelection( aNewSel );
+
+ return xRet;
+}
+
+OUString SAL_CALL SvxUnoTextRangeBase::getString(void)
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ SvxTextForwarder* pForwarder = pEditSource->GetTextForwarder();
+ return pForwarder->GetText( aSelection );
+}
+
+void SAL_CALL SvxUnoTextRangeBase::setString(const OUString& aString)
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ String aConverted( aString );
+ aConverted.ConvertLineEnd( LINEEND_LF ); // Zeilenenden nur einfach zaehlen
+
+ SvxTextForwarder* pForwarder = pEditSource->GetTextForwarder();
+ pForwarder->QuickInsertText( aConverted, aSelection );
+ pEditSource->UpdateData();
+
+ // Selektion anpassen
+ //! Wenn die EditEngine bei QuickInsertText die Selektion zurueckgeben wuerde,
+ //! waer's einfacher...
+ CollapseToStart();
+
+ sal_uInt16 nLen = aConverted.Len();
+ if (nLen)
+ GoRight( nLen, sal_True );
+
+ CollapseToEnd();
+}
+
+// Interface beans::XPropertySet
+uno::Reference< beans::XPropertySetInfo > SAL_CALL SvxUnoTextRangeBase::getPropertySetInfo(void)
+ throw( uno::RuntimeException )
+{
+ return new SfxItemPropertySetInfo( aPropSet.getPropertyMap() );
+}
+
+void SAL_CALL SvxUnoTextRangeBase::setPropertyValue(const OUString& PropertyName, const uno::Any& aValue)
+ throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ _setPropertyValue( PropertyName, aValue, -1 );
+}
+
+void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyName, const uno::Any& aValue, sal_Int32 nPara )
+ throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(aPropSet.getPropertyMap(), PropertyName );
+ if ( !pMap )
+ throw uno::RuntimeException();
+
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ SfxItemSet* pOldSet = NULL;
+ if( nPara != -1 )
+ pOldSet = pForwarder->GetParaAttribs( nPara ).Clone();
+ else
+ pOldSet = pForwarder->GetAttribs( GetSelection() ). Clone();
+
+ SfxItemSet aNewSet( *pOldSet->GetPool(), pOldSet->GetRanges() );
+
+ if(!SetPropertyValueHelper( *pOldSet, pMap, aValue, aNewSet, &aSelection, (SvxTextEditSource*)GetEditSource() ))
+ {
+ // Fuer Teile von zusammengesetzten Items mit mehreren Properties (z.B. Hintergrund)
+ // muss vorher das alte Item aus dem Dokument geholt werden
+ aNewSet.Put(pOldSet->Get(pMap->nWID)); // altes Item in neuen Set
+ aPropSet.setPropertyValue(PropertyName, aValue, aNewSet);
+ }
+
+
+ if(nPara != -1)
+ pForwarder->SetParaAttribs( nPara, aNewSet );
+ else
+ pForwarder->QuickSetAttribs( aNewSet, GetSelection() );
+
+ GetEditSource()->UpdateData();
+
+ delete pOldSet;
+}
+
+sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet& rOldSet, const SfxItemPropertyMap* pMap, const uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL*/ ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ switch( pMap->nWID )
+ {
+ case WID_FONTDESC:
+ {
+ awt::FontDescriptor aDesc;
+ if(aValue >>= aDesc)
+ {
+ SvxUnoFontDescriptor::FillItemSet( aDesc, rNewSet );
+ return sal_True;
+ }
+ }
+ break;
+
+ case EE_PARA_NUMBULLET:
+ {
+ uno::Reference< container::XIndexReplace > xNumRule;
+ if(aValue >>= xNumRule)
+ {
+ SvxUnoNumberingRules *pNumRules = SvxUnoNumberingRules::getImplementation( xNumRule );
+
+ if( pNumRules )
+ {
+ SvxNumRule aRule( *pNumRules->GetNumRule() );
+ SvxNumBulletItem aItem( aRule, EE_PARA_NUMBULLET );
+ rNewSet.Put(aItem);
+ return sal_True;
+ }
+ }
+ }
+ break;
+ case WID_NUMLEVEL:
+ {
+ SvxTextForwarder* pForwarder = pEditSource? pEditSource->GetTextForwarder() : NULL;
+ if(pForwarder && pSelection)
+ {
+ sal_Int16 nLevel;
+ if( aValue >>= nLevel )
+ {
+ SdrObject* pObj = pEditSource->GetSdrObject();
+
+ if(pObj == NULL)
+ return sal_False;
+
+ if((pObj->GetObjInventor() == SdrInventor) &&
+ (pObj->GetObjIdentifier() == OBJ_OUTLINETEXT))
+ nLevel++;
+
+ if(nLevel >= 0 && nLevel <= 9)
+ {
+ Outliner& rOutliner = ((SvxOutlinerForwarder*)pForwarder)->GetOutliner();
+
+ Paragraph* pPara = rOutliner.GetParagraph( pSelection->nStartPara );
+ if( pPara )
+ {
+ rOutliner.SetDepth( pPara, nLevel );
+ return sal_True;
+ }
+ }
+ }
+ }
+ }
+ break;
+ case EE_PARA_BULLETSTATE:
+ {
+ if( aValue.hasValue() && aValue.getValueType() == ::getCppuBooleanType() )
+ {
+ sal_Bool bBullet;
+ bBullet = *(sal_Bool*)aValue.getValue();
+ SfxUInt16Item aItem( EE_PARA_BULLETSTATE, bBullet );
+ rNewSet.Put(aItem);
+ return sal_True;
+ }
+ }
+ break;
+
+ default:
+ return sal_False;
+ }
+
+ throw lang::IllegalArgumentException();
+ return sal_False;
+}
+
+uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyValue(const OUString& PropertyName)
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ return _getPropertyValue( PropertyName, -1 );
+}
+
+uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& PropertyName, sal_Int32 nPara )
+ throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ uno::Any aAny;
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(aPropSet.getPropertyMap(), PropertyName );
+ if ( !pMap )
+ throw beans::UnknownPropertyException();
+
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ SfxItemSet* pAttribs = NULL;
+ if( nPara != -1 )
+ pAttribs = pForwarder->GetParaAttribs( nPara ).Clone();
+ else
+ pAttribs = pForwarder->GetAttribs( GetSelection() ).Clone();
+
+ // Dontcare durch Default ersetzen, damit man immer eine Reflection hat
+ pAttribs->ClearInvalidItems();
+
+ if(!GetPropertyValueHelper( *pAttribs, pMap, aAny, &aSelection, (SvxTextEditSource*)GetEditSource() ))
+ aAny = aPropSet.getPropertyValue(PropertyName, *pAttribs);
+
+ delete pAttribs;
+ return aAny;
+}
+
+sal_Bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertyMap* pMap, uno::Any& aAny, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL */ )
+ throw( uno::RuntimeException )
+{
+ switch( pMap->nWID )
+ {
+ case WID_FONTDESC:
+ {
+ awt::FontDescriptor aDesc;
+ SvxUnoFontDescriptor::FillFromItemSet( rSet, aDesc );
+ aAny <<= aDesc;
+ }
+ break;
+
+ case EE_PARA_NUMBULLET:
+ {
+ if((rSet.GetItemState( EE_PARA_NUMBULLET, sal_True ) & (SFX_ITEM_SET|SFX_ITEM_DEFAULT)) == 0)
+ throw uno::RuntimeException();
+
+ SvxNumBulletItem aBulletItem( *(SvxNumBulletItem*)rSet.GetItem( EE_PARA_NUMBULLET, sal_True ) );
+
+ if( aBulletItem.GetNumRule() == NULL )
+ throw uno::RuntimeException();
+
+ SvxNumRule aRule( *aBulletItem.GetNumRule() );
+ uno::Reference< container::XIndexReplace > xNumRule( new SvxUnoNumberingRules(aRule) );
+
+ aAny.setValue( &xNumRule, ::getCppuType((const uno::Reference< container::XIndexReplace >*)0) );
+ }
+ break;
+
+ case WID_NUMLEVEL:
+ {
+ SvxTextForwarder* pForwarder = pEditSource? pEditSource->GetTextForwarder() : NULL;
+ if(pForwarder && pSelection)
+ {
+
+ Outliner& rOutliner = ((SvxOutlinerForwarder*)pForwarder)->GetOutliner();
+ Paragraph* pPara = rOutliner.GetParagraph( pSelection->nStartPara );
+
+ sal_Int16 nLevel = 0;
+ if( pPara )
+ nLevel = rOutliner.GetDepth( pSelection->nStartPara );
+
+ SdrObject* pObj = pEditSource->GetSdrObject();
+
+ if(pObj != NULL)
+ {
+ if((pObj->GetObjInventor() == SdrInventor) &&
+ (pObj->GetObjIdentifier() == OBJ_OUTLINETEXT))
+ nLevel--;
+ }
+ aAny <<= nLevel;
+ }
+ }
+ break;
+ case EE_PARA_BULLETSTATE:
+ {
+ sal_Bool bState = sal_False;
+ if( rSet.GetItemState( EE_PARA_BULLETSTATE, sal_True ) & (SFX_ITEM_SET|SFX_ITEM_DEFAULT))
+ {
+ SfxUInt16Item* pItem = (SfxUInt16Item*)rSet.GetItem( EE_PARA_BULLETSTATE, sal_True );
+ bState = pItem->GetValue();
+ }
+
+ aAny.setValue( &bState, ::getCppuBooleanType() );
+ }
+ break;
+ default:
+
+ return sal_False;
+ }
+
+ return sal_True;
+}
+
+// wird (noch) nicht unterstuetzt
+void SAL_CALL SvxUnoTextRangeBase::addPropertyChangeListener( const OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL SvxUnoTextRangeBase::removePropertyChangeListener( const OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL SvxUnoTextRangeBase::addVetoableChangeListener( const OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL SvxUnoTextRangeBase::removeVetoableChangeListener( const OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+
+// beans::XPropertyState
+beans::PropertyState SAL_CALL SvxUnoTextRangeBase::getPropertyState( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ return _getPropertyState( PropertyName, -1 );
+}
+
+static sal_uInt16 aSvxUnoFontDescriptorWhichMap[] = { EE_CHAR_FONTINFO, EE_CHAR_FONTHEIGHT, EE_CHAR_ITALIC,
+ EE_CHAR_UNDERLINE, EE_CHAR_WEIGHT, EE_CHAR_STRIKEOUT,
+ EE_CHAR_WLM, 0 };
+
+beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const OUString& PropertyName, sal_Int32 nPara /* = -1 */)
+ throw( beans::UnknownPropertyException, uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(aPropSet.getPropertyMap(), PropertyName );
+ if ( !pMap )
+ throw beans::UnknownPropertyException();
+
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+
+ SfxItemState eItemState = SFX_ITEM_UNKNOWN;
+ sal_uInt16 nWID = 0;
+
+ switch( pMap->nWID )
+ {
+ case WID_FONTDESC:
+ {
+ sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap;
+ SfxItemState eTempItemState;
+ while( *pWhichId )
+ {
+ if(nPara != -1)
+ eTempItemState = pForwarder->GetItemState( nPara, *pWhichId );
+ else
+ eTempItemState = pForwarder->GetItemState( GetSelection(), *pWhichId );
+
+ switch( eTempItemState )
+ {
+ case SFX_ITEM_DISABLED:
+ case SFX_ITEM_DONTCARE:
+ eItemState = SFX_ITEM_DONTCARE;
+ break;
+
+ case SFX_ITEM_DEFAULT:
+ if( eItemState != SFX_ITEM_DEFAULT )
+ {
+ if( eItemState == SFX_ITEM_UNKNOWN )
+ eItemState = SFX_ITEM_DEFAULT;
+ }
+ break;
+
+ case SFX_ITEM_READONLY:
+ case SFX_ITEM_SET:
+ if( eItemState != SFX_ITEM_SET )
+ {
+ if( eItemState == SFX_ITEM_UNKNOWN )
+ eItemState = SFX_ITEM_SET;
+ }
+ break;
+ default:
+ throw beans::UnknownPropertyException();
+ }
+
+ pWhichId++;
+ }
+ }
+ break;
+
+ case WID_NUMLEVEL:
+ eItemState = SFX_ITEM_SET;
+ break;
+
+ default:
+ nWID = pMap->nWID;
+ }
+
+ if( nWID != 0 )
+ {
+ if( nPara != -1 )
+ eItemState = pForwarder->GetItemState( nPara, nWID );
+ else
+ eItemState = pForwarder->GetItemState( GetSelection(), nWID );
+ }
+
+ switch( eItemState )
+ {
+ case SFX_ITEM_DONTCARE:
+ case SFX_ITEM_DISABLED:
+ return beans::PropertyState_AMBIGUOUS_VALUE;
+ case SFX_ITEM_READONLY:
+ case SFX_ITEM_SET:
+ return beans::PropertyState_DIRECT_VALUE;
+ case SFX_ITEM_DEFAULT:
+ return beans::PropertyState_DEFAULT_VALUE;
+ case SFX_ITEM_UNKNOWN:
+ default:
+ throw beans::UnknownPropertyException();
+ }
+}
+
+uno::Sequence< beans::PropertyState > SAL_CALL SvxUnoTextRangeBase::getPropertyStates( const uno::Sequence< OUString >& aPropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ return _getPropertyStates( aPropertyName, -1 );
+}
+
+uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(const uno::Sequence< OUString >& PropertyName, sal_Int32 nPara /* = -1 */)
+ throw( beans::UnknownPropertyException, uno::RuntimeException )
+{
+ const sal_Int32 nCount = PropertyName.getLength();
+ const OUString* pNames = PropertyName.getConstArray();
+
+ uno::Sequence< beans::PropertyState > aRet( nCount );
+ beans::PropertyState* pState = aRet.getArray();
+
+ for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ )
+ *pState++ = getPropertyState( *pNames++ );
+
+ return aRet;
+}
+
+void SAL_CALL SvxUnoTextRangeBase::setPropertyToDefault( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ _setPropertyToDefault( PropertyName, -1 );
+}
+
+void SvxUnoTextRangeBase::_setPropertyToDefault(const OUString& PropertyName, sal_Int32 nPara /* = -1 */)
+ throw( beans::UnknownPropertyException, uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(aPropSet.getPropertyMap(), PropertyName );
+ if ( !pMap )
+ throw beans::UnknownPropertyException();
+
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ SfxItemSet aSet( *pForwarder->GetPool(), TRUE );
+
+ switch( pMap->nWID )
+ {
+ case WID_FONTDESC:
+ SvxUnoFontDescriptor::setPropertyToDefault( aSet );
+ break;
+
+ case WID_NUMLEVEL:
+ {
+ sal_Int16 nLevel = 0;
+
+ SvxTextEditSource* pEditSource = (SvxTextEditSource*)GetEditSource();
+ SdrObject* pObj = pEditSource->GetSdrObject();
+
+ if(pObj == NULL)
+ return;
+
+ if((pObj->GetObjInventor() == SdrInventor) &&
+ (pObj->GetObjIdentifier() == OBJ_OUTLINETEXT))
+ nLevel++;
+
+ Outliner& rOutliner = ((SvxOutlinerForwarder*)pForwarder)->GetOutliner();
+ Paragraph* pPara = rOutliner.GetParagraph( aSelection.nStartPara );
+ if( pPara )
+ rOutliner.SetDepth( pPara, nLevel );
+ return;
+ }
+
+ default:
+ aSet.InvalidateItem( pMap->nWID );
+ }
+
+ if(nPara != -1)
+ pForwarder->SetParaAttribs( nPara, aSet );
+ else
+ pForwarder->QuickSetAttribs( aSet, GetSelection() );
+
+ GetEditSource()->UpdateData();
+}
+
+uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aPropertyName )
+ throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(aPropSet.getPropertyMap(), aPropertyName );
+ if ( !pMap )
+ throw beans::UnknownPropertyException();
+
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ SfxItemPool* pPool = pForwarder->GetPool();
+
+ switch( pMap->nWID )
+ {
+ case WID_FONTDESC:
+ return SvxUnoFontDescriptor::getPropertyDefault( pPool );
+
+ case WID_NUMLEVEL:
+ {
+ uno::Any aValue;
+ aValue <<= (sal_Int16)0;
+ return aValue;
+ }
+ default:
+ {
+ // Default aus ItemPool holen
+ if(!pPool->IsWhich(pMap->nWID))
+ throw beans::UnknownPropertyException();
+
+ SfxItemSet aSet( *pPool, pMap->nWID, pMap->nWID);
+ aSet.Put(pPool->GetDefaultItem(pMap->nWID));
+ return aPropSet.getPropertyValue(aPropertyName, aSet);
+ }
+ }
+}
+
+// internal
+void SvxUnoTextRangeBase::CollapseToStart(void) throw()
+{
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ aSelection.nEndPara = aSelection.nStartPara;
+ aSelection.nEndPos = aSelection.nStartPos;
+}
+
+void SvxUnoTextRangeBase::CollapseToEnd(void) throw()
+{
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ aSelection.nStartPara = aSelection.nEndPara;
+ aSelection.nStartPos = aSelection.nEndPos;
+}
+
+sal_Bool SvxUnoTextRangeBase::IsCollapsed(void) throw()
+{
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ return ( aSelection.nStartPara == aSelection.nEndPara &&
+ aSelection.nStartPos == aSelection.nEndPos );
+}
+
+sal_Bool SvxUnoTextRangeBase::GoLeft(sal_Int16 nCount, sal_Bool Expand) throw()
+{
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ // #75098# use end position, as in Writer (start is anchor, end is cursor)
+ sal_uInt16 nNewPos = aSelection.nEndPos;
+ sal_uInt16 nNewPar = aSelection.nEndPara;
+
+ sal_Bool bOk = sal_True;
+ SvxTextForwarder* pForwarder = NULL;
+ while ( nCount > nNewPos && bOk )
+ {
+ if ( nNewPar == 0 )
+ bOk = sal_False;
+ else
+ {
+ if ( !pForwarder )
+ pForwarder = pEditSource->GetTextForwarder(); // erst hier, wenn's noetig ist...
+
+ --nNewPar;
+ nCount -= nNewPos + 1;
+ nNewPos = pForwarder->GetTextLen( nNewPar );
+ }
+ }
+
+ if ( bOk )
+ {
+ nNewPos -= nCount;
+ aSelection.nStartPara = nNewPar;
+ aSelection.nStartPos = nNewPos;
+ }
+
+ if (!Expand)
+ CollapseToStart();
+
+ return bOk;
+}
+
+sal_Bool SvxUnoTextRangeBase::GoRight(sal_Int16 nCount, sal_Bool Expand) throw()
+{
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ SvxTextForwarder* pForwarder = pEditSource->GetTextForwarder();
+
+ sal_uInt16 nNewPos = aSelection.nEndPos + nCount; //! Ueberlauf ???
+ sal_uInt16 nNewPar = aSelection.nEndPara;
+
+ sal_Bool bOk = sal_True;
+ sal_uInt16 nParCount = pForwarder->GetParagraphCount();
+ sal_uInt16 nThisLen = pForwarder->GetTextLen( nNewPar );
+ while ( nNewPos > nThisLen && bOk )
+ {
+ if ( nNewPar + 1 >= nParCount )
+ bOk = sal_False;
+ else
+ {
+ nNewPos -= nThisLen+1;
+ ++nNewPar;
+ nThisLen = pForwarder->GetTextLen( nNewPar );
+ }
+ }
+
+ if (bOk)
+ {
+ aSelection.nEndPara = nNewPar;
+ aSelection.nEndPos = nNewPos;
+ }
+
+ if (!Expand)
+ CollapseToEnd();
+
+ return bOk;
+}
+
+void SvxUnoTextRangeBase::GotoStart(sal_Bool Expand) throw()
+{
+ aSelection.nStartPara = 0;
+ aSelection.nStartPos = 0;
+
+ if (!Expand)
+ CollapseToStart();
+}
+
+void SvxUnoTextRangeBase::GotoEnd(sal_Bool Expand) throw()
+{
+ CheckSelection( aSelection, pEditSource->GetTextForwarder() );
+
+ SvxTextForwarder* pForwarder = pEditSource->GetTextForwarder();
+
+ sal_uInt16 nPar = pForwarder->GetParagraphCount();
+ if (nPar)
+ --nPar;
+
+ aSelection.nEndPara = nPar;
+ aSelection.nEndPos = pForwarder->GetTextLen( nPar );
+
+ if (!Expand)
+ CollapseToEnd();
+}
+
+// lang::XServiceInfo
+sal_Bool SAL_CALL SvxUnoTextRangeBase::supportsService( const OUString& ServiceName )
+ throw(uno::RuntimeException)
+{
+ return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoTextRangeBase::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq;
+ SvxServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.style.CharacterProperties" );
+ return aSeq;
+}
+
+
+// ====================================================================
+// class SvxUnoTextRange
+// ====================================================================
+
+uno::Sequence< uno::Type > SvxUnoTextRange::maTypeSequence;
+
+uno::Reference< uno::XInterface > SvxUnoTextRange_NewInstance()
+{
+ SvxUnoText aText;
+ uno::Reference< text::XTextRange > xRange( new SvxUnoTextRange( aText ) );
+ return xRange;
+}
+
+SvxUnoTextRange::SvxUnoTextRange( const SvxUnoText& rParent ) throw()
+:SvxUnoTextRangeBase( rParent )
+{
+ xParentText = (text::XText*)&rParent;
+}
+
+SvxUnoTextRange::~SvxUnoTextRange() throw()
+{
+}
+
+uno::Any SAL_CALL SvxUnoTextRange::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT( text::XTextRange );
+ else QUERYINT( beans::XPropertySet );
+ else QUERYINT( beans::XPropertyState );
+ else QUERYINT( lang::XServiceInfo );
+ else QUERYINT( lang::XTypeProvider );
+ else QUERYINT( lang::XUnoTunnel );
+ else
+ return OWeakAggObject::queryAggregation( rType );
+
+ return aAny;
+}
+
+uno::Any SAL_CALL SvxUnoTextRange::queryInterface( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ return OWeakAggObject::queryInterface(rType);
+}
+
+void SAL_CALL SvxUnoTextRange::acquire()
+ throw(uno::RuntimeException)
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxUnoTextRange::release()
+ throw(uno::RuntimeException)
+{
+ OWeakAggObject::release();
+}
+
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxUnoTextRange::getTypes()
+ throw (uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ maTypeSequence.realloc( 6 ); // !DANGER! keep this updated
+ uno::Type* pTypes = maTypeSequence.getArray();
+
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRange >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XTypeProvider >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XUnoTunnel >*)0);
+ }
+ return maTypeSequence;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxUnoTextRange::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+// XTextRange
+uno::Reference< text::XText > SAL_CALL SvxUnoTextRange::getText()
+ throw(uno::RuntimeException)
+{
+ return xParentText;
+}
+
+// lang::XServiceInfo
+OUString SAL_CALL SvxUnoTextRange::getImplementationName()
+ throw(uno::RuntimeException)
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextRange"));
+}
+
+// ====================================================================
+// class SvxUnoText
+// ====================================================================
+
+// UNO3_GETIMPLEMENTATION2_IMPL( SvxUnoText, SvxUnoTextRangeBase );
+
+uno::Sequence< uno::Type > SvxUnoText::maTypeSequence;
+
+SvxUnoText::SvxUnoText() throw()
+: SvxUnoTextRangeBase(&aDummy, aEmptyPropMap )
+{
+
+}
+
+SvxUnoText::SvxUnoText( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, uno::Reference < text::XText > xParent ) throw()
+: SvxUnoTextRangeBase( pSource, _pMap )
+{
+ xParentText = xParent;
+ ESelection aSelection;
+ ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
+ SetSelection( aSelection );
+}
+
+SvxUnoText::SvxUnoText( const SvxUnoText& rText ) throw()
+:SvxUnoTextRangeBase( rText )
+{
+ xParentText = rText.xParentText;
+}
+
+SvxUnoText::~SvxUnoText() throw()
+{
+}
+
+// Internal
+ESelection SvxUnoText::InsertField( const SvxFieldItem& rField ) throw()
+{
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ pForwarder->QuickInsertField( rField, GetSelection() );
+ GetEditSource()->UpdateData();
+
+ // Selektion anpassen
+ //! Wenn die EditEngine bei QuickInsertText die Selektion zurueckgeben wuerde,
+ //! waer's einfacher...
+
+ CollapseToStart();
+ GoRight( 1, sal_True ); // Feld ist immer 1 Zeichen
+
+ return GetSelection(); // Selektion mit dem Feld
+}
+
+// XInterface
+uno::Any SAL_CALL SvxUnoText::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ QUERYINT( text::XText );
+ else QUERYINT( text::XSimpleText );
+ else if( rType == ::getCppuType((const uno::Reference< text::XTextRange >*)0) )
+ aAny <<= uno::Reference< text::XTextRange >((text::XText*)(this));
+ else QUERYINT(container::XEnumerationAccess );
+ else QUERYINT( container::XElementAccess );
+ else QUERYINT( beans::XPropertySet );
+ else QUERYINT( beans::XPropertyState );
+ else QUERYINT( lang::XServiceInfo );
+ else QUERYINT( text::XTextRangeMover );
+ else QUERYINT( lang::XTypeProvider );
+ else QUERYINT( lang::XUnoTunnel );
+ else
+ return OWeakAggObject::queryAggregation( rType );
+
+ return aAny;
+}
+
+uno::Any SAL_CALL SvxUnoText::queryInterface( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ return OWeakAggObject::queryInterface(rType);
+}
+
+void SAL_CALL SvxUnoText::acquire()
+ throw(uno::RuntimeException)
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxUnoText::release()
+ throw(uno::RuntimeException)
+{
+ OWeakAggObject::release();
+}
+
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxUnoText::getStaticTypes() throw()
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ maTypeSequence.realloc( 8 ); // !DANGER! keep this updated
+ uno::Type* pTypes = maTypeSequence.getArray();
+
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XText >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< container::XEnumerationAccess >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeMover >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XTypeProvider >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XUnoTunnel >*)0);
+ }
+ return maTypeSequence;
+}
+
+uno::Sequence< uno::Type > SAL_CALL SvxUnoText::getTypes()
+ throw (uno::RuntimeException)
+{
+ return getStaticTypes();
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxUnoText::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+// XSimpleText
+
+uno::Reference< text::XTextCursor > SAL_CALL SvxUnoText::createTextCursor()
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+ return new SvxUnoTextCursor( *this );
+}
+
+uno::Reference< text::XTextCursor > SAL_CALL SvxUnoText::createTextCursorByRange( const uno::Reference< text::XTextRange >& aTextPosition )
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SvxUnoTextCursor* pCursor = new SvxUnoTextCursor( *this );
+ uno::Reference< text::XTextCursor > xCursor( pCursor );
+
+ if( aTextPosition.is() )
+ {
+ SvxUnoTextRangeBase* pRange = SvxUnoTextRangeBase::getImplementation( aTextPosition );
+ if(pRange)
+ pCursor->SetSelection( pRange->GetSelection() );
+ }
+
+ return xCursor;
+}
+
+void SAL_CALL SvxUnoText::insertString( const uno::Reference< text::XTextRange >& xRange, const OUString& aString, sal_Bool bAbsorb )
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( !xRange.is() )
+ return;
+
+ ESelection aSelection;
+ ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
+ SetSelection( aSelection );
+
+ SvxUnoTextRangeBase* pRange = SvxUnoTextRange::getImplementation( xRange );
+ if(pRange)
+ {
+ // setString am SvxUnoTextRangeBase statt selber QuickInsertText und UpdateData,
+ // damit die Selektion am SvxUnoTextRangeBase angepasst wird.
+ //! Eigentlich muessten alle Cursor-Objekte dieses Textes angepasst werden!
+
+ if (!bAbsorb) // nicht ersetzen -> hinten anhaengen
+ pRange->CollapseToEnd();
+
+ pRange->setString( aString );
+ }
+}
+
+void SAL_CALL SvxUnoText::insertControlCharacter( const uno::Reference< text::XTextRange >& xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb )
+ throw(lang::IllegalArgumentException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ ESelection aSelection;
+ ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
+ SetSelection( aSelection );
+
+ if ( nControlCharacter == text::ControlCharacter::PARAGRAPH_BREAK )
+ {
+ String aText( (char)13, 1 ); // '\r' geht auf'm Mac nicht
+ insertString( xRange, aText, bAbsorb );
+ }
+ else
+ throw lang::IllegalArgumentException();
+}
+
+// XText
+void SAL_CALL SvxUnoText::insertTextContent( const uno::Reference< text::XTextRange >& xRange, const uno::Reference< text::XTextContent >& xContent, sal_Bool bAbsorb ) throw(lang::IllegalArgumentException, uno::RuntimeException)
+{
+}
+
+void SAL_CALL SvxUnoText::removeTextContent( const uno::Reference< text::XTextContent >& xContent ) throw(container::NoSuchElementException, uno::RuntimeException)
+{
+}
+
+// XTextRange
+
+uno::Reference< text::XText > SAL_CALL SvxUnoText::getText()
+ throw(uno::RuntimeException)
+{
+ ESelection aSelection;
+ ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
+ ((SvxUnoText*)this)->SetSelection( aSelection );
+
+ return (text::XText*)this;
+}
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoText::getStart()
+ throw(uno::RuntimeException)
+{
+ return SvxUnoTextRangeBase::getStart();
+}
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoText::getEnd()
+ throw(uno::RuntimeException)
+{
+ return SvxUnoTextRangeBase::getEnd();
+}
+
+OUString SAL_CALL SvxUnoText::getString() throw( uno::RuntimeException )
+{
+ return SvxUnoTextRangeBase::getString();
+}
+
+void SAL_CALL SvxUnoText::setString( const OUString& aString ) throw(uno::RuntimeException)
+{
+ SvxUnoTextRangeBase::setString(aString);
+}
+
+
+// XEnumerationAccess
+uno::Reference< container::XEnumeration > SAL_CALL SvxUnoText::createEnumeration()
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ ESelection aSelection;
+ ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
+ SetSelection( aSelection );
+
+ uno::Reference< container::XEnumeration > xEnum( (container::XEnumeration*) new SvxUnoTextContentEnumeration( *this ) );
+ return xEnum;
+}
+
+// XElementAccess ( container::XEnumerationAccess )
+uno::Type SAL_CALL SvxUnoText::getElementType( ) throw(uno::RuntimeException)
+{
+ return ::getCppuType((const uno::Reference< text::XTextRange >*)0 );
+}
+
+sal_Bool SAL_CALL SvxUnoText::hasElements( ) throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(GetEditSource())
+ {
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ if(pForwarder)
+ return pForwarder->GetParagraphCount() != 0;
+ }
+
+ return sal_False;
+}
+
+// text::XTextRangeMover
+void SAL_CALL SvxUnoText::moveTextRange( const uno::Reference< text::XTextRange >& xRange, sal_Int16 nParagraphs )
+ throw(uno::RuntimeException)
+{
+}
+
+// lang::XServiceInfo
+OUString SAL_CALL SvxUnoText::getImplementationName()
+ throw(uno::RuntimeException)
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoText"));
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoText::getSupportedServiceNames( )
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxUnoTextRangeBase::getSupportedServiceNames() );
+ SvxServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.text.Text" );
+ return aSeq;
+}
+
+const ::com::sun::star::uno::Sequence< sal_Int8 > & SvxUnoText::getUnoTunnelId() throw()
+{
+ static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0;
+ if( !pSeq )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
+ if( !pSeq )
+ {
+ static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
+
+SvxUnoText* SvxUnoText::getImplementation( uno::Reference< uno::XInterface > xInt ) throw()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xUT( xInt, ::com::sun::star::uno::UNO_QUERY );
+ if( xUT.is() )
+ return (SvxUnoText*)xUT->getSomething( SvxUnoText::getUnoTunnelId() );
+ else
+ return NULL;
+}
+
+sal_Int64 SAL_CALL SvxUnoText::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException) \
+{
+ if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16 ) )
+ {
+ return (sal_Int64)this;
+ }
+ else
+ {
+ return SvxUnoTextRangeBase::getSomething( rId );
+ }
+}
+
+
+
diff --git a/svx/source/unoedit/unotext2.cxx b/svx/source/unoedit/unotext2.cxx
new file mode 100644
index 0000000000..7abdb69ec2
--- /dev/null
+++ b/svx/source/unoedit/unotext2.cxx
@@ -0,0 +1,661 @@
+/*************************************************************************
+ *
+ * $RCSfile: unotext2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_ //autogen
+#include <vos/mutex.hxx>
+#endif
+
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+
+#include <rtl/uuid.h>
+#include <rtl/memory.h>
+
+#include <eeitem.hxx>
+
+#define ITEMID_FIELD EE_FEATURE_FIELD
+#include "flditem.hxx"
+#include "unofield.hxx"
+#include "unotext.hxx"
+
+using namespace ::rtl;
+using namespace ::vos;
+using namespace ::cppu;
+using namespace ::com::sun::star;
+
+#define QUERYINT( xint ) \
+ if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
+ aAny <<= uno::Reference< xint >(this)
+
+// ====================================================================
+// SvxUnoTextContentEnumeration
+// ====================================================================
+
+SvxUnoTextContentEnumeration::SvxUnoTextContentEnumeration( const SvxUnoText& _rText ) throw()
+: rText( _rText )
+{
+ xParentText = (text::XText*)&_rText;
+ pEditSource = rText.GetEditSource()->Clone();
+ nNextParagraph = 0;
+}
+
+SvxUnoTextContentEnumeration::~SvxUnoTextContentEnumeration() throw()
+{
+ delete pEditSource;
+}
+
+// container::XEnumeration
+sal_Bool SAL_CALL SvxUnoTextContentEnumeration::hasMoreElements(void)
+ throw( uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+ return nNextParagraph < pEditSource->GetTextForwarder()->GetParagraphCount();
+}
+
+uno::Any SvxUnoTextContentEnumeration::nextElement(void) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(!hasMoreElements())
+ throw container::NoSuchElementException();
+
+ SvxUnoTextContent* pContent = new SvxUnoTextContent( rText, nNextParagraph++ );
+ uno::Reference< text::XTextContent > xRef( pContent );
+ return uno::Any( &xRef, ::getCppuType((const uno::Reference< text::XTextContent>*)0) );
+}
+
+// ====================================================================
+// class SvxUnoTextContent
+// ====================================================================
+uno::Reference< text::XText > xDummyText;
+uno::Sequence< uno::Type > SvxUnoTextContent::maTypeSequence;
+
+static SvxUnoText* getDummyText() throw()
+{
+ if(!xDummyText.is())
+ xDummyText = new SvxUnoText();
+
+ return SvxUnoText::getImplementation( xDummyText );
+}
+
+SvxUnoTextContent::SvxUnoTextContent() throw()
+: SvxUnoTextRangeBase(*getDummyText()),
+ rParentText(*getDummyText()),
+ aDisposeListeners(aDisposeContainerMutex),
+ nParagraph(0)
+{
+}
+
+SvxUnoTextContent::SvxUnoTextContent( const SvxUnoText& rText, sal_uInt16 nPara ) throw()
+: SvxUnoTextRangeBase(rText),rParentText(rText),
+ aDisposeListeners(aDisposeContainerMutex),
+ nParagraph(nPara)
+{
+ xParentText = (text::XText*)&rText;
+ SetSelection( ESelection( nParagraph,0, nParagraph, GetEditSource()->GetTextForwarder()->GetTextLen( nParagraph ) ) );
+}
+
+SvxUnoTextContent::SvxUnoTextContent( const SvxUnoTextContent& rContent ) throw()
+: SvxUnoTextRangeBase(rContent),
+ aDisposeListeners(aDisposeContainerMutex),
+ rParentText(rContent.rParentText)
+{
+ xParentText = rContent.xParentText;
+ nParagraph = rContent.nParagraph;
+ SetSelection( rContent.GetSelection() );
+}
+
+SvxUnoTextContent::~SvxUnoTextContent() throw()
+{
+}
+
+// uno::XInterface
+uno::Any SAL_CALL SvxUnoTextContent::queryAggregation( const uno::Type & rType ) throw( uno::RuntimeException )
+{
+ uno::Any aAny;
+
+ QUERYINT( text::XTextRange );
+ else QUERYINT( beans::XPropertySet );
+ else QUERYINT( beans::XPropertyState );
+ else QUERYINT( text::XTextContent );
+ else QUERYINT( lang::XComponent );
+ else QUERYINT( container::XEnumerationAccess );
+ else QUERYINT( container::XElementAccess );
+ else QUERYINT( lang::XServiceInfo );
+ else QUERYINT( lang::XTypeProvider );
+ else QUERYINT( lang::XUnoTunnel );
+ else
+ return OWeakAggObject::queryAggregation( rType );
+
+ return aAny;
+}
+
+uno::Any SAL_CALL SvxUnoTextContent::queryInterface( const uno::Type & rType ) throw( uno::RuntimeException )
+{
+ return OWeakAggObject::queryInterface(rType);
+}
+
+void SAL_CALL SvxUnoTextContent::acquire() throw( uno::RuntimeException )
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxUnoTextContent::release() throw( uno::RuntimeException )
+{
+ OWeakAggObject::release();
+}
+
+// XTypeProvider
+
+uno::Sequence< uno::Type > SAL_CALL SvxUnoTextContent::getTypes()
+ throw (uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ maTypeSequence.realloc( 8 ); // !DANGER! keep this updated
+ uno::Type* pTypes = maTypeSequence.getArray();
+
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRange >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextContent >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< container::XEnumerationAccess >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XTypeProvider >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XUnoTunnel >*)0);
+ }
+ return maTypeSequence;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxUnoTextContent::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+// text::XTextRange
+
+uno::Reference< text::XText > SAL_CALL SvxUnoTextContent::getText()
+ throw(uno::RuntimeException)
+{
+ return xParentText;
+}
+
+// text::XTextContent
+void SAL_CALL SvxUnoTextContent::attach( const uno::Reference< text::XTextRange >& xTextRange )
+ throw(lang::IllegalArgumentException, uno::RuntimeException)
+{
+}
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextContent::getAnchor() throw( uno::RuntimeException )
+{
+ return uno::Reference< text::XTextRange > ();
+}
+
+// XComponent
+
+void SAL_CALL SvxUnoTextContent::dispose()
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( bDisposing )
+ return; // catched a recursion
+
+ bDisposing = sal_True;
+
+ lang::EventObject aEvt;
+ aEvt.Source = *(OWeakAggObject*) this;
+ aDisposeListeners.disposeAndClear(aEvt);
+
+ // todo:: removemyself
+}
+
+void SAL_CALL SvxUnoTextContent::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
+ throw(uno::RuntimeException)
+{
+ aDisposeListeners.addInterface(xListener);
+}
+
+void SAL_CALL SvxUnoTextContent::removeEventListener( const uno::Reference< lang::XEventListener >& aListener )
+ throw(uno::RuntimeException)
+{
+ aDisposeListeners.removeInterface(aListener);
+}
+
+// XEnumerationAccess
+
+uno::Reference< container::XEnumeration > SAL_CALL SvxUnoTextContent::createEnumeration( )
+ throw(uno::RuntimeException)
+{
+ return new SvxUnoTextRangeEnumeration( rParentText, nParagraph );
+}
+
+// XElementAccess ( container::XEnumerationAccess )
+
+uno::Type SAL_CALL SvxUnoTextContent::getElementType()
+ throw(uno::RuntimeException)
+{
+ return ::getCppuType((const uno::Reference< text::XTextRange >*)0);
+}
+
+sal_Bool SAL_CALL SvxUnoTextContent::hasElements()
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ SvUShorts aPortions;
+ SvxTextForwarder* pForwarder = GetEditSource()->GetTextForwarder();
+ pForwarder->GetPortions( nParagraph, aPortions );
+
+ return aPortions.Count() > 0;
+}
+
+// XPropertySet
+
+void SAL_CALL SvxUnoTextContent::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
+ throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ _setPropertyValue( aPropertyName, aValue, nParagraph );
+}
+
+uno::Any SAL_CALL SvxUnoTextContent::getPropertyValue( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ return _getPropertyValue( PropertyName, nParagraph );
+}
+
+// beans::XPropertyState
+beans::PropertyState SAL_CALL SvxUnoTextContent::getPropertyState( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ return _getPropertyState( PropertyName, nParagraph );
+}
+
+uno::Sequence< beans::PropertyState > SAL_CALL SvxUnoTextContent::getPropertyStates( const uno::Sequence< OUString >& aPropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ return _getPropertyStates( aPropertyName, nParagraph );
+}
+
+void SAL_CALL SvxUnoTextContent::setPropertyToDefault( const OUString& PropertyName )
+ throw(beans::UnknownPropertyException, uno::RuntimeException)
+{
+ _setPropertyToDefault( PropertyName, nParagraph );
+}
+
+// lang::XServiceInfo
+
+OUString SAL_CALL SvxUnoTextContent::getImplementationName()
+ throw(uno::RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextContent") );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoTextContent::getSupportedServiceNames()
+ throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxUnoTextRangeBase::getSupportedServiceNames() );
+ SvxServiceInfoHelper::addToSequence( aSeq, 3, "com.sun.star.style.ParagraphProperties",
+ "com.sun.star.text.TextContent",
+ "com.sun.star.text.Paragraph");
+ return aSeq;
+}
+
+// ====================================================================
+// class SvxUnoTextRangeEnumeration
+// ====================================================================
+
+SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration( const SvxUnoText& rText, sal_uInt16 nPara ) throw()
+: xParentText( (text::XText*)&rText ),
+ rParentText( rText ),
+ nParagraph( nPara ),
+ nNextPortion( 0 )
+{
+ pEditSource = rText.GetEditSource()->Clone();
+ pPortions = new SvUShorts;
+ pEditSource->GetTextForwarder()->GetPortions( nPara, *pPortions );
+}
+
+SvxUnoTextRangeEnumeration::~SvxUnoTextRangeEnumeration() throw()
+{
+ delete pEditSource;
+ delete pPortions;
+}
+
+// container::XEnumeration
+
+sal_Bool SAL_CALL SvxUnoTextRangeEnumeration::hasMoreElements()
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if(pPortions == NULL)
+ throw uno::RuntimeException();
+
+ return nNextPortion < pPortions->Count();
+}
+
+uno::Any SAL_CALL SvxUnoTextRangeEnumeration::nextElement()
+ throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+
+ if( nNextPortion >= pPortions->Count() )
+ throw container::NoSuchElementException();
+
+ sal_uInt16 nStartPos = 0;
+ if (nNextPortion > 0)
+ nStartPos = pPortions->GetObject(nNextPortion-1);
+ sal_uInt16 nEndPos = pPortions->GetObject(nNextPortion);
+ ESelection aSel( nParagraph, nStartPos, nParagraph, nEndPos );
+
+ uno::Reference< text::XTextRange > xRange;
+
+ SvxTextForwarder* pForwarder = rParentText.GetEditSource()->GetTextForwarder();
+ SfxItemSet aSet = pForwarder->GetAttribs( aSel );
+
+ if ( aSet.GetItemState( EE_FEATURE_FIELD ) == SFX_ITEM_ON )
+ {
+ SvxFieldItem* pItem = (SvxFieldItem*)aSet.GetItem( EE_FEATURE_FIELD );
+ const SvxFieldData* pData = pItem->GetField();
+ SvxUnoTextField* pField = new SvxUnoTextField( rParentText, aSel, pData );
+ xRange = pField;
+ }
+ else
+ {
+ SvxUnoTextRange* pRange = new SvxUnoTextRange( rParentText );
+ xRange = pRange;
+
+ pRange->SetSelection(aSel);
+ }
+ nNextPortion++;
+
+ return uno::Any( &xRange, ::getCppuType((const uno::Reference< text::XTextRange >*)0) );
+}
+
+// ====================================================================
+// class SvxUnoTextCursor
+// ====================================================================
+
+uno::Sequence< uno::Type > SvxUnoTextCursor::maTypeSequence;
+
+uno::Reference< uno::XInterface > SvxUnoTextCursor_NewInstance()
+{
+ SvxUnoText aText;
+ uno::Reference< text::XText > xText( (text::XText*)new SvxUnoTextCursor( aText ) );
+ uno::Reference< uno::XInterface > xInt( xText, uno::UNO_QUERY );
+ return xInt;
+}
+
+SvxUnoTextCursor::SvxUnoTextCursor( const SvxUnoText& rText ) throw()
+: SvxUnoTextRangeBase(rText),
+ xParentText( (text::XText*)&rText)
+{
+}
+
+SvxUnoTextCursor::SvxUnoTextCursor( const SvxUnoTextCursor& rCursor ) throw()
+: SvxUnoTextRangeBase(rCursor),
+ xParentText(rCursor.xParentText)
+{
+}
+
+SvxUnoTextCursor::~SvxUnoTextCursor() throw()
+{
+}
+
+// automatisch auskommentiert - [getIdlClass(es) or queryInterface] - Bitte XTypeProvider benutzen!
+//sal_Bool SvxUnoTextCursor::queryInterface( uno::Uik aUIK, Reference< uno::XInterface > & xRef)
+uno::Any SAL_CALL SvxUnoTextCursor::queryAggregation( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ uno::Any aAny;
+
+ if( rType == ::getCppuType((const uno::Reference< text::XTextRange >*)0) )
+ aAny <<= uno::Reference< text::XTextRange >((text::XText*)(this));
+ else QUERYINT( text::XTextCursor );
+ else QUERYINT( beans::XPropertySet );
+ else QUERYINT( beans::XPropertyState );
+ else QUERYINT( lang::XServiceInfo );
+ else QUERYINT( lang::XTypeProvider );
+ else QUERYINT( lang::XUnoTunnel );
+ else
+ return OWeakAggObject::queryAggregation( rType );
+
+ return aAny;
+}
+
+uno::Any SAL_CALL SvxUnoTextCursor::queryInterface( const uno::Type & rType )
+ throw(uno::RuntimeException)
+{
+ return OWeakAggObject::queryInterface(rType);
+}
+
+void SAL_CALL SvxUnoTextCursor::acquire() throw(uno::RuntimeException)
+{
+ OWeakAggObject::acquire();
+}
+
+void SAL_CALL SvxUnoTextCursor::release() throw(uno::RuntimeException)
+{
+ OWeakAggObject::release();
+}
+
+// XTypeProvider
+uno::Sequence< uno::Type > SAL_CALL SvxUnoTextCursor::getTypes()
+ throw(uno::RuntimeException)
+{
+ if( maTypeSequence.getLength() == 0 )
+ {
+ maTypeSequence.realloc( 7 ); // !DANGER! keep this updated
+ uno::Type* pTypes = maTypeSequence.getArray();
+
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRange >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextCursor >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XTypeProvider >*)0);
+ *pTypes++ = ::getCppuType(( const uno::Reference< lang::XUnoTunnel >*)0);
+ }
+ return maTypeSequence;
+}
+
+uno::Sequence< sal_Int8 > SAL_CALL SvxUnoTextCursor::getImplementationId()
+ throw (uno::RuntimeException)
+{
+ static uno::Sequence< sal_Int8 > aId;
+ if( aId.getLength() == 0 )
+ {
+ aId.realloc( 16 );
+ rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
+ }
+ return aId;
+}
+
+// text::XTextCursor
+void SAL_CALL SvxUnoTextCursor::collapseToStart()
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+ CollapseToStart();
+}
+
+void SAL_CALL SvxUnoTextCursor::collapseToEnd()
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+ CollapseToEnd();
+}
+
+sal_Bool SAL_CALL SvxUnoTextCursor::isCollapsed()
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+ return IsCollapsed();
+}
+
+sal_Bool SAL_CALL SvxUnoTextCursor::goLeft( sal_Int16 nCount, sal_Bool bExpand )
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+ return GoLeft( nCount, bExpand );
+}
+
+sal_Bool SAL_CALL SvxUnoTextCursor::goRight( sal_Int16 nCount, sal_Bool bExpand )
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+ return GoRight( nCount, bExpand );
+}
+
+void SAL_CALL SvxUnoTextCursor::gotoStart( sal_Bool bExpand )
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+ GotoStart( bExpand );
+}
+
+void SAL_CALL SvxUnoTextCursor::gotoEnd( sal_Bool bExpand )
+ throw(uno::RuntimeException)
+{
+ OGuard aGuard( Application::GetSolarMutex() );
+ GotoEnd( bExpand );
+}
+
+void SAL_CALL SvxUnoTextCursor::gotoRange( const uno::Reference< text::XTextRange >& xRange, sal_Bool bExpand )
+ throw(uno::RuntimeException)
+{
+ if( !xRange.is() )
+ return;
+
+ SvxUnoTextRangeBase* pRange = SvxUnoTextRangeBase::getImplementation( xRange );
+
+ if( pRange )
+ {
+ ESelection aNewSel = pRange->GetSelection();
+
+ if( bExpand )
+ {
+ const ESelection& rOldSel = GetSelection();
+ aNewSel.nStartPara = rOldSel.nStartPara;
+ aNewSel.nStartPos = rOldSel.nStartPos;
+ }
+
+ SetSelection( aNewSel );
+ }
+}
+
+// text::XTextRange (rest in SvxTextRange)
+uno::Reference< text::XText > SAL_CALL SvxUnoTextCursor::getText(void) throw( uno::RuntimeException )
+{
+ return xParentText;
+}
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextCursor::getStart()
+ throw(uno::RuntimeException)
+{
+ return SvxUnoTextRangeBase::getStart();
+}
+
+uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextCursor::getEnd()
+ throw(uno::RuntimeException)
+{
+ return SvxUnoTextRangeBase::getEnd();
+}
+
+OUString SAL_CALL SvxUnoTextCursor::getString() throw( uno::RuntimeException )
+{
+ return SvxUnoTextRangeBase::getString();
+}
+
+void SAL_CALL SvxUnoTextCursor::setString( const OUString& aString ) throw(uno::RuntimeException)
+{
+ SvxUnoTextRangeBase::setString(aString);
+}
+// lang::XServiceInfo
+OUString SAL_CALL SvxUnoTextCursor::getImplementationName() throw(uno::RuntimeException)
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextCursort"));
+}
+
+sal_Bool SAL_CALL SvxUnoTextCursor::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
+{
+ return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+uno::Sequence< OUString > SAL_CALL SvxUnoTextCursor::getSupportedServiceNames() throw(uno::RuntimeException)
+{
+ uno::Sequence< OUString > aSeq( SvxUnoTextRangeBase::getSupportedServiceNames() );
+ SvxServiceInfoHelper::addToSequence( aSeq, 1,"com.sun.star.text.TextCursor");
+ return aSeq;
+}
+
+
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
new file mode 100644
index 0000000000..9a1e5b4438
--- /dev/null
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -0,0 +1,904 @@
+/*************************************************************************
+ *
+ * $RCSfile: _xoutbmp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <sot/factory.hxx>
+#include <tools/urlobj.hxx>
+#include <tools/fsys.hxx>
+#include <vcl/bmpacc.hxx>
+#include <vcl/poly.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/wrkwin.hxx>
+#include <svtools/solar.hrc>
+#include <sfx2/docfile.hxx>
+#include <sfx2/app.hxx>
+#include "impgrf.hxx"
+#include "xoutbmp.hxx"
+
+// -----------
+// - Defines -
+// -----------
+
+#define FORMAT_BMP "bmp"
+#define FORMAT_GIF "gif"
+#define FORMAT_JPG "jpg"
+
+#define OPT_BMP "BMP-COLORS"
+#define OPT_JPG "JPG_EXPORT_COLORMODE"
+
+#define TRANSFILTER "GIF - Graphics Interchange"
+#define BMPFILTER "BMP - MS Windows"
+#define JPGFILTER "JPG - JPEG"
+
+// --------------
+// - XOutBitmap -
+// --------------
+
+GraphicFilter* XOutBitmap::pGrfFilter = NULL;
+
+// -----------------------------------------------------------------------------
+
+BitmapEx XOutBitmap::CreateQuickDrawBitmapEx( const Graphic& rGraphic, const OutputDevice& rCompDev,
+ const MapMode& rMapMode, const Size& rLogSize,
+ const Point& rPoint, const Size& rSize )
+{
+ BitmapEx aRetBmp;
+
+ if( rGraphic.IsAlpha() )
+ aRetBmp = rGraphic.GetBitmapEx();
+ else
+ {
+ VirtualDevice aVDev( rCompDev );
+ MapMode aMap( rMapMode );
+
+ aMap.SetOrigin( Point() );
+ aVDev.SetMapMode( aMap );
+
+ Point aPoint( aVDev.LogicToPixel( rPoint ) );
+ Size aOldSize( aVDev.LogicToPixel( rSize ) );
+ Size aAbsSize( aOldSize );
+ Size aQSizePix( aVDev.LogicToPixel( rLogSize ) );
+
+ aVDev.SetMapMode( MapMode() );
+
+ if( aOldSize.Width() < 0 )
+ aAbsSize.Width() = -aAbsSize.Width();
+
+ if( aOldSize.Height() < 0 )
+ aAbsSize.Height() = -aAbsSize.Height();
+
+ if( aVDev.SetOutputSizePixel( aAbsSize ) )
+ {
+ Point aNewOrg( -aPoint.X(), -aPoint.Y() );
+ const Point aNullPoint;
+
+ // horizontale Spiegelung ggf. beruecksichtigen
+ if( aOldSize.Width() < 0 )
+ {
+ aNewOrg.X() -= aOldSize.Width();
+
+ // und jetzt noch einen abziehen
+ aNewOrg.X()--;
+ }
+
+ // vertikale Spiegelung ggf. beruecksichtigen
+ if( rSize.Height() < 0 )
+ {
+ aNewOrg.Y() -= aOldSize.Height();
+
+ // und jetzt noch einen abziehen
+ aNewOrg.Y()--;
+ }
+
+ if( rGraphic.GetType() != GRAPHIC_BITMAP )
+ {
+ rGraphic.Draw( &aVDev, aNewOrg, aQSizePix );
+
+ const Bitmap aBmp( aVDev.GetBitmap( aNullPoint, aAbsSize ) );
+ Bitmap aMask;
+
+ Graphic( rGraphic.GetGDIMetaFile().GetMonochromeMtf( COL_BLACK ) ).Draw( &aVDev, aNewOrg, aQSizePix );
+ aMask = aVDev.GetBitmap( aNullPoint, aAbsSize );
+ aRetBmp = BitmapEx( aBmp, aMask );
+ }
+ else
+ {
+ Bitmap aBmp( rGraphic.GetBitmap() );
+
+// UNX has got problems with 1x1 bitmaps which are transparent (KA 02.11.1998)
+#ifdef UNX
+ const Size aBmpSize( aBmp.GetSizePixel() );
+ BOOL bFullTrans = FALSE;
+
+ if( aBmpSize.Width() == 1 && aBmpSize.Height() == 1 && rGraphic.IsTransparent() )
+ {
+ Bitmap aTrans( rGraphic.GetBitmapEx().GetMask() );
+ BitmapReadAccess* pMAcc = aBmp.AcquireReadAccess();
+
+ if( pMAcc )
+ {
+ if( pMAcc->GetColor( 0, 0 ) == BitmapColor( Color( COL_WHITE ) ) )
+ bFullTrans = TRUE;
+
+ aTrans.ReleaseAccess( pMAcc );
+ }
+ }
+
+ if( !bFullTrans )
+#endif // UNX
+
+ {
+ DitherBitmap( aBmp );
+ aVDev.DrawBitmap( aNewOrg, aQSizePix, aBmp );
+ aBmp = aVDev.GetBitmap( aNullPoint, aAbsSize );
+
+ if( !rGraphic.IsTransparent() )
+ aRetBmp = BitmapEx( aBmp );
+ else
+ {
+ Bitmap aTrans( rGraphic.GetBitmapEx().GetMask() );
+
+ if( !aTrans )
+ aRetBmp = BitmapEx( aBmp, rGraphic.GetBitmapEx().GetTransparentColor() );
+ else
+ {
+ aVDev.DrawBitmap( aNewOrg, aQSizePix, aTrans );
+ aRetBmp = BitmapEx( aBmp, aVDev.GetBitmap( Point(), aAbsSize ) );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return aRetBmp;
+}
+
+// ------------------------------------------------------------------------
+
+void XOutBitmap::DrawQuickDrawBitmapEx( OutputDevice* pOutDev, const Point& rPt,
+ const Size& rSize, const BitmapEx& rBmpEx )
+{
+ const Size aBmpSizePix( rBmpEx.GetSizePixel() );
+ const Size aSizePix( pOutDev->LogicToPixel( rSize ) );
+
+ if ( ( aSizePix.Width() - aBmpSizePix.Width() ) || ( aSizePix.Height() - aBmpSizePix.Height() ) )
+ rBmpEx.Draw( pOutDev, rPt, rSize );
+ else
+ rBmpEx.Draw( pOutDev, rPt );
+}
+
+// ------------------------------------------------------------------------
+
+void XOutBitmap::DrawTiledBitmapEx( OutputDevice* pOutDev,
+ const Point& rStartPt, const Size& rGrfSize,
+ const Rectangle& rTileRect, const BitmapEx& rBmpEx )
+{
+ Rectangle aClipRect( pOutDev->LogicToPixel( pOutDev->GetClipRegion().GetBoundRect() ) );
+ Rectangle aPixRect( pOutDev->LogicToPixel( rTileRect ) );
+ const Size aPixSize( pOutDev->LogicToPixel( rGrfSize ) );
+ const Point aPixPoint( pOutDev->LogicToPixel( rStartPt ) );
+ Point aOrg;
+ const long nWidth = aPixSize.Width();
+ const long nHeight = aPixSize.Height();
+ long nXPos = aPixPoint.X() + ( ( aPixRect.Left() - aPixPoint.X() ) / nWidth ) * nWidth;
+ long nYPos = aPixPoint.Y() + ( ( aPixRect.Top() - aPixPoint.Y() ) / nHeight ) * nHeight;
+ const long nBottom = aPixRect.Bottom();
+ const long nRight = aPixRect.Right();
+ const long nLeft = nXPos;
+ const BOOL bNoSize = ( aPixSize == rBmpEx.GetSizePixel() );
+
+ pOutDev->Push();
+ pOutDev->SetMapMode( MapMode() );
+
+ // ggf. neue ClipRegion berechnen und setzen
+ if ( pOutDev->IsClipRegion() )
+ aPixRect.Intersection( aClipRect );
+
+ pOutDev->SetClipRegion( aPixRect );
+
+ while( nYPos <= nBottom )
+ {
+ while( nXPos <= nRight )
+ {
+ if ( bNoSize )
+ rBmpEx.Draw( pOutDev, Point( nXPos, nYPos ) );
+ else
+ rBmpEx.Draw( pOutDev, Point( nXPos, nYPos ), aPixSize );
+
+ nXPos += nWidth;
+ }
+
+ nXPos = nLeft;
+ nYPos += nHeight;
+ }
+
+ pOutDev->Pop();
+}
+
+// ------------------------------------------------------------------------
+
+Bitmap XOutBitmap::GetBitmapFromGraphic( const Graphic& rGraphic )
+{
+ DBG_ERROR( "Please use Graphic::GetBitmap()!" );
+ return rGraphic.GetBitmap();
+}
+
+// ------------------------------------------------------------------------
+
+Animation XOutBitmap::MirrorAnimation( const Animation& rAnimation, BOOL bHMirr, BOOL bVMirr )
+{
+ Animation aNewAnim( rAnimation );
+
+ if( bHMirr || bVMirr )
+ {
+ const Size& rGlobalSize = aNewAnim.GetDisplaySizePixel();
+ ULONG nMirrorFlags = 0L;
+
+ if( bHMirr )
+ nMirrorFlags |= BMP_MIRROR_HORZ;
+
+ if( bVMirr )
+ nMirrorFlags |= BMP_MIRROR_VERT;
+
+ for( USHORT i = 0, nCount = aNewAnim.Count(); i < nCount; i++ )
+ {
+ AnimationBitmap aAnimBmp( aNewAnim.Get( i ) );
+
+ // BitmapEx spiegeln
+ aAnimBmp.aBmpEx.Mirror( nMirrorFlags );
+
+ // Die Positionen innerhalb der Gesamtbitmap
+ // muessen natuerlich auch angepasst werden
+ if( bHMirr )
+ aAnimBmp.aPosPix.X() = rGlobalSize.Width() - aAnimBmp.aPosPix.X() -
+ aAnimBmp.aSizePix.Width();
+
+ if( bVMirr )
+ aAnimBmp.aPosPix.Y() = rGlobalSize.Height() - aAnimBmp.aPosPix.Y() -
+ aAnimBmp.aSizePix.Height();
+
+ aNewAnim.Replace( aAnimBmp, i );
+ }
+ }
+
+ return aNewAnim;
+}
+
+// ------------------------------------------------------------------------
+
+Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const ULONG nMirrorFlags )
+{
+ Graphic aRetGraphic;
+
+ if( nMirrorFlags )
+ {
+ if( rGraphic.IsAnimated() )
+ {
+ aRetGraphic = MirrorAnimation( rGraphic.GetAnimation(),
+ ( nMirrorFlags & BMP_MIRROR_HORZ ) == BMP_MIRROR_HORZ,
+ ( nMirrorFlags & BMP_MIRROR_VERT ) == BMP_MIRROR_VERT );
+ }
+ else
+ {
+ if( rGraphic.IsTransparent() )
+ {
+ BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
+
+ aBmpEx.Mirror( nMirrorFlags );
+ aRetGraphic = aBmpEx;
+ }
+ else
+ {
+ Bitmap aBmp( rGraphic.GetBitmap() );
+
+ aBmp.Mirror( nMirrorFlags );
+ aRetGraphic = aBmp;
+ }
+ }
+ }
+ else
+ aRetGraphic = rGraphic;
+
+ return aRetGraphic;
+}
+
+// ------------------------------------------------------------------------
+
+USHORT XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName,
+ const String& rFilterName, const ULONG nFlags,
+ const Size* pMtfSize_100TH_MM )
+{
+#ifndef SVX_LIGHT
+ if( rGraphic.GetType() != GRAPHIC_NONE )
+ {
+ Graphic aGraphic;
+ String aFilter( rFilterName );
+ String aExt;
+ GraphicFilter* pFilter = GetGrfFilter();
+ USHORT nErr = GRFILTER_FILTERERROR;
+ USHORT nFilter = GRFILTER_FORMAT_NOTFOUND;
+ BOOL bWriteTransGrf;
+ BOOL bAnimated = rGraphic.IsAnimated();
+
+ aFilter.ToLowerAscii();
+ bWriteTransGrf = ( aFilter.EqualsAscii("transgrf") ) || ( aFilter.EqualsAscii("gif") ) || ( nFlags & XOUTBMP_USE_GIF_IF_POSSIBLE );
+
+ if ( !bWriteTransGrf )
+ bWriteTransGrf = ( nFlags & XOUTBMP_USE_GIF_IF_SENSIBLE ) && ( bAnimated || rGraphic.IsTransparent() );
+
+ // richtige Filternummer bestimmen
+ if( !bWriteTransGrf )
+ {
+ const USHORT nCount = pFilter->GetExportFormatCount();
+
+ for( USHORT n = 0; n < nCount; n++ )
+ {
+ if( aFilter == pFilter->GetExportFormatShortName( n ).ToLowerAscii() )
+ {
+ nFilter = n;
+ aExt = aFilter;
+ break;
+ }
+ }
+ }
+ else
+ {
+ nFilter = pFilter->GetExportFormatNumber( String(TRANSFILTER, gsl_getSystemTextEncoding()) );
+ aExt = pFilter->GetExportFormatShortName( nFilter ).ToLowerAscii();
+ }
+
+ // Graphic erstellen
+ if( bWriteTransGrf && ( GRFILTER_FORMAT_NOTFOUND != nFilter ) )
+ {
+ if ( bAnimated )
+ aGraphic = rGraphic;
+ else
+ {
+ if( pMtfSize_100TH_MM && ( rGraphic.GetType() != GRAPHIC_BITMAP ) )
+ {
+ VirtualDevice aVDev;
+ const Size aSize( aVDev.LogicToPixel( *pMtfSize_100TH_MM, MAP_100TH_MM ) );
+
+ if( aVDev.SetOutputSizePixel( aSize ) )
+ {
+ const Wallpaper aWallpaper( aVDev.GetBackground() );
+ const Point aPt;
+
+ aVDev.SetBackground( Wallpaper( Color( COL_BLACK ) ) );
+ aVDev.Erase();
+ rGraphic.Draw( &aVDev, aPt, aSize );
+
+ const Bitmap aBitmap( aVDev.GetBitmap( aPt, aSize ) );
+
+ aVDev.SetBackground( aWallpaper );
+ aVDev.Erase();
+ rGraphic.Draw( &aVDev, aPt, aSize );
+
+ aVDev.SetRasterOp( ROP_XOR );
+ aVDev.DrawBitmap( aPt, aSize, aBitmap );
+ aGraphic = BitmapEx( aBitmap, aVDev.GetBitmap( aPt, aSize ) );
+ }
+ else
+ aGraphic = rGraphic.GetBitmapEx();
+ }
+ else
+ aGraphic = rGraphic.GetBitmapEx();
+ }
+ }
+ else
+ {
+ if( pMtfSize_100TH_MM && ( rGraphic.GetType() != GRAPHIC_BITMAP ) )
+ {
+ VirtualDevice aVDev;
+ const Size aSize( aVDev.LogicToPixel( *pMtfSize_100TH_MM, MAP_100TH_MM ) );
+
+ if( aVDev.SetOutputSizePixel( aSize ) )
+ {
+ rGraphic.Draw( &aVDev, Point(), aSize );
+ aGraphic = aVDev.GetBitmap( Point(), aSize );
+ }
+ else
+ aGraphic = rGraphic.GetBitmap();
+ }
+ else
+ aGraphic = rGraphic.GetBitmap();
+ }
+
+ // Falls Filter nicht gefunden, erst einmal JPEG probieren, dann BMP
+ if( GRFILTER_FORMAT_NOTFOUND == nFilter )
+ {
+ nFilter = pFilter->GetExportFormatNumber( String(JPGFILTER, gsl_getSystemTextEncoding()) );
+ aExt = pFilter->GetExportFormatShortName( nFilter ).ToLowerAscii();
+
+ if ( GRFILTER_FORMAT_NOTFOUND == nFilter )
+ {
+ nFilter = pFilter->GetExportFormatNumber( String(BMPFILTER, gsl_getSystemTextEncoding()) );
+ aExt = pFilter->GetExportFormatShortName( nFilter ).ToLowerAscii();
+ }
+ }
+
+ // Pixel-Graphic ggf. spiegeln
+ if( nFlags )
+ aGraphic = MirrorGraphic( aGraphic, nFlags );
+
+ if( GRFILTER_FORMAT_NOTFOUND != nFilter )
+ {
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( rFileName );
+ aURL.setExtension( aExt );
+
+ if( INET_PROT_FILE == aURL.GetProtocol() )
+ {
+ if( !( nFlags & XOUTBMP_DONT_EXPAND_FILENAME ) )
+ {
+ String aName( aURL.getName() );
+ xub_StrLen nNameLen = aName.Len();
+
+ if( nNameLen > 3 )
+ {
+ nNameLen -= 3;
+
+ if( aName.GetChar( nNameLen - 1 ) == sal_Unicode( '.' ) )
+ --nNameLen;
+ }
+
+ aURL.setName( aName.Insert( sal_Unicode( '*' ), nNameLen ) );
+
+ // !!!DirEntry; create temporary file name
+ DirEntry aPath( aURL.PathToFileName() );
+ aURL.SetSmartURL( aPath.TempName().GetFull() );
+ }
+
+ rFileName = aURL.PathToFileName();
+
+ if( ( nFlags & XOUTBMP_USE_GIF_IF_SENSIBLE ) && ( aExt.ToLowerAscii().EqualsAscii( "bmp" ) ) )
+ {
+ SvFileStream aOStm( rFileName, STREAM_WRITE | STREAM_TRUNC );
+
+ if( aOStm.IsOpen() )
+ {
+ aGraphic.GetBitmap().Write( aOStm, TRUE );
+ nErr = aOStm.GetError() != 0 ? GRFILTER_IOERROR : 0;
+ }
+ else
+ nErr = GRFILTER_IOERROR;
+ }
+ else
+ nErr = ExportGraphic( aGraphic, aURL, *pFilter, nFilter, TRUE );
+ }
+ else if( INET_PROT_NOT_VALID != aURL.GetProtocol() )
+ {
+ if( !( nFlags & XOUTBMP_DONT_EXPAND_FILENAME ) )
+ {
+ String aTimeStr( UniString::CreateFromInt32( Time().GetTime() ) );
+ String aName( aURL.getName() );
+ xub_StrLen nNameLen = aName.Len();
+
+ if( nNameLen > 3 )
+ {
+ nNameLen -= 3;
+
+ if( aName.GetChar( nNameLen - 1 ) == sal_Unicode( '.' ) )
+ --nNameLen;
+ }
+
+ aTimeStr.Insert( sal_Unicode('_'), 0 );
+ aName.Insert( aTimeStr, nNameLen );
+ aURL.SetName( aName );
+ }
+
+ SfxMedium aMedium( rFileName = aURL.PathToFileName(), STREAM_WRITE | STREAM_SHARE_DENYNONE, TRUE, FALSE );
+
+ aMedium.DownLoad();
+
+ INetURLObject aPhysURL; aPhysURL.SetSmartURL( aMedium.GetPhysicalName() );
+ nErr = ExportGraphic( aGraphic, aPhysURL, *pFilter, nFilter, TRUE );
+
+ // uebertragen
+ aMedium.Close();
+ aMedium.Commit();
+
+ if( aMedium.GetError() && nErr == GRFILTER_OK )
+ nErr = 1;
+ }
+ }
+
+ return nErr;
+ }
+ else
+#endif
+ return GRFILTER_OK;
+}
+
+// ------------------------------------------------------------------------
+
+#ifdef WNT
+#pragma optimize ( "", off )
+#endif
+
+// !!!DirEntry
+USHORT XOutBitmap::ExportGraphic( const Graphic& rGraphic, const DirEntry& rPath,
+ GraphicFilter& rFilter, const USHORT nFormat,
+ BOOL bIgnoreOptions )
+{
+ INetURLObject aURL; aURL.SetSmartURL( rPath.GetFull() );
+ return ExportGraphic( rGraphic, aURL, rFilter, nFormat, bIgnoreOptions );
+}
+
+// ------------------------------------------------------------------------
+
+USHORT XOutBitmap::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL,
+ GraphicFilter& rFilter, const USHORT nFormat,
+ BOOL bIgnoreOptions )
+{
+ const String aPath( rURL.PathToFileName() );
+ SvFileStream aOStm( aPath, STREAM_WRITE | STREAM_TRUNC );
+ Config* pOptionsConfig = rFilter.GetOptionsConfig();
+ USHORT nRet;
+
+ pGrfFilter = &rFilter;
+
+ if( bIgnoreOptions && rFilter.AreOptionsEnabled() )
+ {
+ rFilter.EnableOptions( FALSE );
+ nRet = rFilter.ExportGraphic( rGraphic, aPath, aOStm, nFormat );
+ rFilter.EnableOptions( TRUE );
+ }
+ else
+ {
+ Graphic aGraphic;
+
+ if( pOptionsConfig )
+ {
+ const String aFormat( rFilter.GetExportFormatShortName( nFormat ).ToLowerAscii() );
+
+ // Optionen fuer die einzelnen Format beruecksichtigen
+ if( aFormat.EqualsAscii( FORMAT_BMP ) )
+ {
+ USHORT nColorRes = pOptionsConfig->ReadKey( ByteString(OPT_BMP) ).ToInt32();
+
+ if( !nColorRes || ( nColorRes > (USHORT) BMP_CONVERSION_24BIT ) )
+ aGraphic = rGraphic;
+ else
+ {
+ Bitmap aTmp( rGraphic.GetBitmap() );
+
+ if( aTmp.Convert( (BmpConversion) nColorRes ) )
+ aGraphic = aTmp;
+ else
+ aGraphic = rGraphic;
+ }
+ }
+ else if( aFormat.EqualsAscii(FORMAT_JPG) )
+ {
+ Bitmap aTmp( rGraphic.GetBitmap() );
+ const BOOL bGreys = (BOOL)pOptionsConfig->ReadKey( ByteString(OPT_JPG) ).ToInt32();
+ const BmpConversion eConv = bGreys ? BMP_CONVERSION_8BIT_GREYS : BMP_CONVERSION_24BIT;
+
+ if( aTmp.Convert( eConv ) )
+ aGraphic = aTmp;
+ else
+ aGraphic = rGraphic;
+ }
+ else if( aFormat.EqualsAscii(FORMAT_GIF) )
+ aGraphic = rGraphic;
+ else
+ aGraphic = rGraphic;
+ }
+ else
+ aGraphic = rGraphic;
+
+ nRet = rFilter.ExportGraphic( aGraphic, aPath, aOStm, nFormat );
+ }
+
+ pGrfFilter = NULL;
+
+ return nRet;
+}
+
+#ifdef WNT
+#pragma optimize ( "", on )
+#endif
+
+// ------------------------------------------------------------------------
+
+Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const BYTE cThreshold )
+{
+ const Size aSize( rBmp.GetSizePixel() );
+ Bitmap aRetBmp;
+ BOOL bRet = FALSE;
+
+ if( ( aSize.Width() > 2L ) && ( aSize.Height() > 2L ) )
+ {
+ Bitmap aWorkBmp( rBmp );
+
+ if( aWorkBmp.Convert( BMP_CONVERSION_8BIT_GREYS ) )
+ {
+ Bitmap aDstBmp( aSize, 1 );
+ BitmapReadAccess* pReadAcc = aWorkBmp.AcquireReadAccess();
+ BitmapWriteAccess* pWriteAcc = aDstBmp.AcquireWriteAccess();
+
+ if( pReadAcc && pWriteAcc )
+ {
+ const long nWidth = aSize.Width();
+ const long nWidth2 = nWidth - 2L;
+ const long nHeight = aSize.Height();
+ const long nHeight2 = nHeight - 2L;
+ const long lThres2 = (long) cThreshold * cThreshold;
+ const BitmapColor aWhite = (BYTE) pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) );
+ const BitmapColor aBlack = (BYTE) pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) );
+ long nSum1;
+ long nSum2;
+ long lGray;
+
+ // Rand mit Weiss init.
+ pWriteAcc->SetLineColor( Color( COL_WHITE) );
+ pWriteAcc->DrawLine( Point(), Point( nWidth - 1L, 0L ) );
+ pWriteAcc->DrawLine( Point( nWidth - 1L, 0L ), Point( nWidth - 1L, nHeight - 1L ) );
+ pWriteAcc->DrawLine( Point( nWidth - 1L, nHeight - 1L ), Point( 0L, nHeight - 1L ) );
+ pWriteAcc->DrawLine( Point( 0, nHeight - 1L ), Point() );
+
+ for( long nY = 0L, nY1 = 1L, nY2 = 2; nY < nHeight2; nY++, nY1++, nY2++ )
+ {
+ for( long nX = 0L, nXDst = 1L, nXTmp; nX < nWidth2; nX++, nXDst++ )
+ {
+ nXTmp = nX;
+
+ nSum1 = -( nSum2 = lGray = (BYTE) pReadAcc->GetPixel( nY, nXTmp++ ) );
+ nSum2 += ( (long) (BYTE) pReadAcc->GetPixel( nY, nXTmp++ ) ) << 1;
+ nSum1 += ( lGray = pReadAcc->GetPixel( nY, nXTmp ) );
+ nSum2 += lGray;
+
+ nSum1 += ( (long) (BYTE) pReadAcc->GetPixel( nY1, nXTmp ) ) << 1;
+ nSum1 -= ( (long) (BYTE) pReadAcc->GetPixel( nY1, nXTmp -= 2 ) ) << 1;
+
+ nSum1 += ( lGray = -(long) (BYTE) pReadAcc->GetPixel( nY2, nXTmp++ ) );
+ nSum2 += lGray;
+ nSum2 -= ( (long) (BYTE) pReadAcc->GetPixel( nY2, nXTmp++ ) ) << 1;
+ nSum1 += ( lGray = (long) (BYTE) pReadAcc->GetPixel( nY2, nXTmp ) );
+ nSum2 -= lGray;
+
+ if( ( nSum1 * nSum1 + nSum2 * nSum2 ) < lThres2 )
+ pWriteAcc->SetPixel( nY1, nXDst, aWhite );
+ else
+ pWriteAcc->SetPixel( nY1, nXDst, aBlack );
+ }
+ }
+
+ bRet = TRUE;
+ }
+
+ aWorkBmp.ReleaseAccess( pReadAcc );
+ aDstBmp.ReleaseAccess( pWriteAcc );
+
+ if( bRet )
+ aRetBmp = aDstBmp;
+ }
+ }
+
+ if( !aRetBmp )
+ aRetBmp = rBmp;
+ else
+ {
+ aRetBmp.SetPrefMapMode( rBmp.GetPrefMapMode() );
+ aRetBmp.SetPrefSize( rBmp.GetPrefSize() );
+ }
+
+ return aRetBmp;
+};
+
+// ------------------------------------------------------------------------
+
+Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const ULONG nFlags,
+ const BYTE cEdgeDetectThreshold, const Rectangle* pWorkRectPixel )
+{
+ Bitmap aWorkBmp;
+ Polygon aRetPoly;
+ Point aTmpPoint;
+ Rectangle aWorkRect( aTmpPoint, rBmp.GetSizePixel() );
+
+ if( pWorkRectPixel )
+ aWorkRect.Intersection( *pWorkRectPixel );
+
+ aWorkRect.Justify();
+
+ if( ( aWorkRect.GetWidth() > 4 ) && ( aWorkRect.GetHeight() > 4 ) )
+ {
+ // falls Flag gesetzt, muessen wir Kanten detektieren
+ if( nFlags & XOUTBMP_CONTOUR_EDGEDETECT )
+ aWorkBmp = DetectEdges( rBmp, cEdgeDetectThreshold );
+ else
+ aWorkBmp = rBmp;
+
+ BitmapReadAccess* pAcc = aWorkBmp.AcquireReadAccess();
+
+ if( pAcc )
+ {
+ const Size& rPrefSize = aWorkBmp.GetPrefSize();
+ const long nWidth = pAcc->Width();
+ const long nHeight = pAcc->Height();
+ const double fFactorX = (double) rPrefSize.Width() / nWidth;
+ const double fFactorY = (double) rPrefSize.Height() / nHeight;
+ const long nStartX1 = aWorkRect.Left() + 1L;
+ const long nEndX1 = aWorkRect.Right();
+ const long nStartX2 = nEndX1 - 1L;
+ const long nEndX2 = nStartX1 - 1L;
+ const long nStartY1 = aWorkRect.Top() + 1L;
+ const long nEndY1 = aWorkRect.Bottom();
+ const long nStartY2 = nEndY1 - 1L;
+ const long nEndY2 = nStartY1 - 1L;
+ Point* pPoints1 = NULL;
+ Point* pPoints2 = NULL;
+ long nX, nY;
+ USHORT nPolyPos = 0;
+ const BitmapColor aBlack = pAcc->GetBestMatchingColor( Color( COL_BLACK ) );
+
+ if( nFlags & XOUTBMP_CONTOUR_VERT )
+ {
+ pPoints1 = new Point[ nWidth ];
+ pPoints2 = new Point[ nWidth ];
+
+ for( nX = nStartX1; nX < nEndX1; nX++ )
+ {
+ nY = nStartY1;
+
+ // zunaechst Zeile von Links nach Rechts durchlaufen
+ while( nY < nEndY1 )
+ {
+ if( aBlack == pAcc->GetPixel( nY, nX ) )
+ {
+ pPoints1[ nPolyPos ] = Point( nX, nY );
+ nY = nStartY2;
+
+ // diese Schleife wird immer gebreaked da hier ja min. ein Pixel ist
+ while( TRUE )
+ {
+ if( aBlack == pAcc->GetPixel( nY, nX ) )
+ {
+ pPoints2[ nPolyPos ] = Point( nX, nY );
+ break;
+ }
+
+ nY--;
+ }
+
+ nPolyPos++;
+ break;
+ }
+
+ nY++;
+ }
+ }
+ }
+ else
+ {
+ pPoints1 = new Point[ nHeight ];
+ pPoints2 = new Point[ nHeight ];
+
+ for ( nY = nStartY1; nY < nEndY1; nY++ )
+ {
+ nX = nStartX1;
+
+ // zunaechst Zeile von Links nach Rechts durchlaufen
+ while( nX < nEndX1 )
+ {
+ if( aBlack == pAcc->GetPixel( nY, nX ) )
+ {
+ pPoints1[ nPolyPos ] = Point( nX, nY );
+ nX = nStartX2;
+
+ // diese Schleife wird immer gebreaked da hier ja min. ein Pixel ist
+ while( TRUE )
+ {
+ if( aBlack == pAcc->GetPixel( nY, nX ) )
+ {
+ pPoints2[ nPolyPos ] = Point( nX, nY );
+ break;
+ }
+
+ nX--;
+ }
+
+ nPolyPos++;
+ break;
+ }
+
+ nX++;
+ }
+ }
+ }
+
+ const USHORT nNewSize1 = nPolyPos << 1;
+
+ aRetPoly = Polygon( nPolyPos, pPoints1 );
+ aRetPoly.SetSize( nNewSize1 + 1 );
+ aRetPoly[ nNewSize1 ] = aRetPoly[ 0 ];
+
+ for( USHORT j = nPolyPos; nPolyPos < nNewSize1; )
+ aRetPoly[ nPolyPos++ ] = pPoints2[ --j ];
+
+ if( ( fFactorX != 0. ) && ( fFactorY != 0. ) )
+ aRetPoly.Scale( fFactorX, fFactorY );
+
+ delete[] pPoints1;
+ delete[] pPoints2;
+ }
+ }
+
+ return aRetPoly;
+};
+
+// ----------------
+// - DitherBitmap -
+// ----------------
+
+BOOL DitherBitmap( Bitmap& rBitmap )
+{
+ BOOL bRet = FALSE;
+
+ if( ( rBitmap.GetBitCount() >= 8 ) && ( Application::GetDefaultDevice()->GetColorCount() < 257 ) )
+ bRet = rBitmap.Dither( BMP_DITHER_FLOYD );
+ else
+ bRet = FALSE;
+
+ return bRet;
+}
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
new file mode 100644
index 0000000000..63f23be5c7
--- /dev/null
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -0,0 +1,2444 @@
+/*************************************************************************
+ *
+ * $RCSfile: _xpoly.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <math.h>
+#include <string.h>
+#include <tools/stream.hxx>
+#include <tools/debug.hxx>
+#include <vcl/poly.hxx>
+
+#pragma hdrstop
+
+#include "xoutx.hxx"
+#include "xpoly.hxx"
+#include "xpolyimp.hxx"
+
+#define GLOBALOVERFLOW
+
+DBG_NAME(XPolygon);
+DBG_NAME(XPolyPolygon);
+
+/*************************************************************************
+|*
+|* ImpXPolygon::ImpXPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+ImpXPolygon::ImpXPolygon( USHORT nInitSize, USHORT nResize )
+{
+ pPointAry = NULL;
+ pFlagAry = NULL;
+ bDeleteOldPoints = FALSE;
+ nSize = 0;
+ ImpXPolygon::nResize = nResize;
+ nPoints = 0;
+ nRefCount = 1;
+
+ Resize( nInitSize );
+}
+
+/*************************************************************************
+|*
+|* ImpXPolygon::ImpXPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+ImpXPolygon::ImpXPolygon( const ImpXPolygon& rImpXPoly )
+{
+ ( (ImpXPolygon&) rImpXPoly ).CheckPointDelete();
+
+ pPointAry = NULL;
+ pFlagAry = NULL;
+ bDeleteOldPoints = FALSE;
+ nSize = 0;
+ ImpXPolygon::nResize = rImpXPoly.nResize;
+ nPoints = 0;
+ nRefCount = 1;
+
+ Resize( rImpXPoly.nSize );
+
+ // Kopieren
+ nPoints = rImpXPoly.nPoints;
+ memcpy( pPointAry, rImpXPoly.pPointAry, nSize*sizeof( Point ) );
+ memcpy( pFlagAry, rImpXPoly.pFlagAry, nSize );
+}
+
+/*************************************************************************
+|*
+|* ImpXPolygon::~ImpXPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+ImpXPolygon::~ImpXPolygon()
+{
+ delete[] (char*) pPointAry;
+ delete[] pFlagAry;
+ if ( bDeleteOldPoints )
+ delete[] (char*) pOldPointAry;
+}
+
+/*************************************************************************
+|*
+|* ImpXPolygon::operator==()
+|*
+|* Ersterstellung Joe 26-09-95
+|* Letzte Aenderung
+|*
+*************************************************************************/
+
+
+FASTBOOL ImpXPolygon::operator==(const ImpXPolygon& rImpXPoly) const
+{
+ return nPoints==rImpXPoly.nPoints &&
+ (nPoints==0 ||
+ (memcmp(pPointAry,rImpXPoly.pPointAry,nPoints*sizeof(Point))==0 &&
+ memcmp(pFlagAry,rImpXPoly.pFlagAry,nPoints)==0));
+}
+
+/*************************************************************************
+|*
+|* ImpXPolygon::Resize()
+|*
+|* !!! Polygongroesse aendern - wenn bDeletePoints FALSE, dann den
+|* Point-Array nicht loeschen, sondern in pOldPointAry sichern und
+|* das Flag bDeleteOldPoints setzen. Beim naechsten Zugriff wird
+|* das Array dann geloescht.
+|* Damit wird verhindert, dass bei XPoly[n] = XPoly[0] durch ein
+|* Resize der fuer den rechten Ausdruck verwendete Point-Array
+|* vorzeitig geloescht wird.
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+void ImpXPolygon::Resize( USHORT nNewSize, BOOL bDeletePoints )
+{
+ if( nNewSize == nSize )
+ return;
+
+ BYTE* pOldFlagAry = pFlagAry;
+ USHORT nOldSize = nSize;
+
+ CheckPointDelete();
+ pOldPointAry = pPointAry;
+
+ // Neue Groesse auf vielfaches von nResize runden, sofern Objekt
+ // nicht neu angelegt wurde (nSize != 0)
+ if ( nSize != 0 && nNewSize > nSize )
+ {
+ DBG_ASSERT(nResize, "Resize-Versuch trotz nResize = 0 !");
+ nNewSize = nSize + ((nNewSize-nSize-1) / nResize + 1) * nResize;
+ }
+ // Punkt Array erzeugen
+ nSize = nNewSize;
+ pPointAry = (Point*)new char[ nSize*sizeof( Point ) ];
+ memset( pPointAry, 0, nSize*sizeof( Point ) );
+
+ // Flag Array erzeugen
+ pFlagAry = new BYTE[ nSize ];
+ memset( pFlagAry, 0, nSize );
+
+ // Eventuell umkopieren
+ if( nOldSize )
+ {
+ if( nOldSize < nSize )
+ {
+ memcpy( pPointAry, pOldPointAry, nOldSize*sizeof( Point ) );
+ memcpy( pFlagAry, pOldFlagAry, nOldSize );
+ }
+ else
+ {
+ memcpy( pPointAry, pOldPointAry, nSize*sizeof( Point ) );
+ memcpy( pFlagAry, pOldFlagAry, nSize );
+
+ // Anzahl der gueltigen Punkte anpassen
+ if( nPoints > nSize )
+ nPoints = nSize;
+ }
+ if ( bDeletePoints ) delete[] (char*) pOldPointAry;
+ else bDeleteOldPoints = TRUE;
+ delete[] pOldFlagAry;
+ }
+}
+
+
+/*************************************************************************
+|*
+|* ImpXPolygon::InsertSpace()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 29.03.95 ESO
+|*
+*************************************************************************/
+
+void ImpXPolygon::InsertSpace( USHORT nPos, USHORT nCount )
+{
+ USHORT nOldSize = nSize;
+
+ CheckPointDelete();
+
+ if ( nPos > nPoints )
+ nPos = nPoints;
+
+ // Wenn Polygon zu klein dann groesser machen
+ if( (nPoints + nCount) > nSize )
+ Resize( nPoints + nCount );
+
+ // Wenn nicht hinter dem letzten Punkt eingefuegt wurde,
+ // den Rest nach hinten schieben
+ if( nPos < nPoints )
+ {
+ USHORT nMove = nPoints - nPos;
+ memmove( &pPointAry[nPos+nCount], &pPointAry[nPos],
+ nMove * sizeof(Point) );
+ memmove( &pFlagAry[nPos+nCount], &pFlagAry[nPos], nMove );
+ }
+ memset( &pPointAry[nPos], 0, nCount * sizeof( Point ) );
+ memset( &pFlagAry [nPos], 0, nCount );
+
+ nPoints += nCount;
+}
+
+
+/*************************************************************************
+|*
+|* ImpXPolygon::Remove()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.94 ESO
+|*
+*************************************************************************/
+
+void ImpXPolygon::Remove( USHORT nPos, USHORT nCount )
+{
+ CheckPointDelete();
+
+ if( (nPos + nCount) <= nPoints )
+ {
+ USHORT nMove = nPoints - nPos - nCount;
+
+ if( nMove )
+ {
+ memmove( &pPointAry[nPos], &pPointAry[nPos+nCount],
+ nMove * sizeof(Point) );
+ memmove( &pFlagAry[nPos], &pFlagAry[nPos+nCount], nMove );
+ }
+ memset( &pPointAry[nPoints - nCount], 0, nCount * sizeof( Point ) );
+ memset( &pFlagAry [nPoints - nCount], 0, nCount );
+ nPoints -= nCount;
+ }
+}
+
+
+/*************************************************************************
+|*
+|* XPolygon::XPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+XPolygon::XPolygon( USHORT nSize, USHORT nResize )
+{
+ DBG_CTOR(XPolygon,NULL);
+ pImpXPolygon = new ImpXPolygon( nSize, nResize );
+}
+
+/*************************************************************************
+|*
+|* XPolygon::XPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+XPolygon::XPolygon( const XPolygon& rXPoly )
+{
+ DBG_CTOR(XPolygon,NULL);
+ pImpXPolygon = rXPoly.pImpXPolygon;
+ pImpXPolygon->nRefCount++;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::XPolygon()
+|*
+|* XPolygon aus einem Standardpolygon erstellen
+|* Ersterstellung 18.01.95 ESO
+|* Letzte Aenderung 18.01.95 ESO
+|*
+*************************************************************************/
+
+XPolygon::XPolygon( const Polygon& rPoly )
+{
+ DBG_CTOR(XPolygon,NULL);
+
+ USHORT nSize = rPoly.GetSize();
+ pImpXPolygon = new ImpXPolygon( nSize );
+ pImpXPolygon->nPoints = nSize;
+
+ for( USHORT i = 0; i < nSize; i++ )
+ {
+ pImpXPolygon->pPointAry[i] = rPoly[i];
+ pImpXPolygon->pFlagAry[i] = (BYTE) rPoly.GetFlags( i );
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::XPolygon()
+|*
+|* Rechteck (auch mit abgerundeten Ecken) als Bezierpolygon erzeugen
+|* Ersterstellung 09.01.95 ESO
+|* Letzte Aenderung 09.01.95 ESO
+|*
+*************************************************************************/
+
+XPolygon::XPolygon(const Rectangle& rRect, long nRx, long nRy)
+{
+ DBG_CTOR(XPolygon,NULL);
+ pImpXPolygon = new ImpXPolygon(17);
+ long nWh = (rRect.GetWidth() - 1) / 2;
+ long nHh = (rRect.GetHeight() - 1) / 2;
+
+ if ( nRx > nWh ) nRx = nWh;
+ if ( nRy > nHh ) nRy = nHh;
+
+ // Rx negativ, damit Umlauf im Uhrzeigersinn erfolgt
+ nRx = -nRx;
+
+ // Faktor fuer Kontrollpunkte der Bezierkurven: 8/3 * (sin(45g) - 0.5)
+ long nXHdl = (long)(0.552284749 * nRx);
+ long nYHdl = (long)(0.552284749 * nRy);
+ USHORT nPos = 0;
+
+ if ( nRx && nRy )
+ {
+ Point aCenter;
+
+ for (USHORT nQuad = 0; nQuad < 4; nQuad++)
+ {
+ switch ( nQuad )
+ {
+ case 0: aCenter = rRect.TopLeft();
+ aCenter.X() -= nRx;
+ aCenter.Y() += nRy;
+ break;
+ case 1: aCenter = rRect.TopRight();
+ aCenter.X() += nRx;
+ aCenter.Y() += nRy;
+ break;
+ case 2: aCenter = rRect.BottomRight();
+ aCenter.X() += nRx;
+ aCenter.Y() -= nRy;
+ break;
+ case 3: aCenter = rRect.BottomLeft();
+ aCenter.X() -= nRx;
+ aCenter.Y() -= nRy;
+ break;
+ }
+ GenBezArc(aCenter, nRx, nRy, nXHdl, nYHdl, 0, 900, nQuad, nPos);
+ pImpXPolygon->pFlagAry[nPos ] = (BYTE) XPOLY_SMOOTH;
+ pImpXPolygon->pFlagAry[nPos+3] = (BYTE) XPOLY_SMOOTH;
+ nPos += 4;
+ }
+ }
+ else
+ {
+ pImpXPolygon->pPointAry[nPos++] = rRect.TopLeft();
+ pImpXPolygon->pPointAry[nPos++] = rRect.TopRight();
+ pImpXPolygon->pPointAry[nPos++] = rRect.BottomRight();
+ pImpXPolygon->pPointAry[nPos++] = rRect.BottomLeft();
+ }
+ pImpXPolygon->pPointAry[nPos] = pImpXPolygon->pPointAry[0];
+ pImpXPolygon->nPoints = nPos + 1;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::XPolygon()
+|*
+|* Ellipsen(bogen) als Bezierpolygon erzeugen
+|* Ersterstellung 09.01.95
+|* Letzte Aenderung 09.01.95
+|*
+*************************************************************************/
+
+XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy,
+ USHORT nStartAngle, USHORT nEndAngle, BOOL bClose)
+{
+ DBG_CTOR(XPolygon,NULL);
+ pImpXPolygon = new ImpXPolygon(17);
+
+ nStartAngle %= 3600;
+ if ( nEndAngle > 3600 ) nEndAngle %= 3600;
+ BOOL bFull = (nStartAngle == 0 && nEndAngle == 3600);
+
+ // Faktor fuer Kontrollpunkte der Bezierkurven: 8/3 * (sin(45g) - 0.5)
+ long nXHdl = (long)(0.552284749 * nRx);
+ long nYHdl = (long)(0.552284749 * nRy);
+ USHORT nPos = 0;
+ BOOL bLoopEnd = FALSE;
+
+ do
+ {
+ USHORT nA1, nA2;
+ USHORT nQuad = nStartAngle / 900;
+ if ( nQuad == 4 ) nQuad = 0;
+ bLoopEnd = CheckAngles(nStartAngle, nEndAngle, nA1, nA2);
+ GenBezArc(rCenter, nRx, nRy, nXHdl, nYHdl, nA1, nA2, nQuad, nPos);
+ nPos += 3;
+ if ( !bLoopEnd )
+ pImpXPolygon->pFlagAry[nPos] = (BYTE) XPOLY_SMOOTH;
+
+ } while ( !bLoopEnd );
+
+ // Wenn kein Vollkreis, dann ggf. Enden mit Mittelpunkt verbinden
+ if ( !bFull && bClose )
+ pImpXPolygon->pPointAry[++nPos] = rCenter;
+
+ if ( bFull )
+ {
+ pImpXPolygon->pFlagAry[0 ] = (BYTE) XPOLY_SMOOTH;
+ pImpXPolygon->pFlagAry[nPos] = (BYTE) XPOLY_SMOOTH;
+ }
+ pImpXPolygon->nPoints = nPos + 1;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::~XPolygon()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+XPolygon::~XPolygon()
+{
+ DBG_DTOR(XPolygon,NULL);
+ if( pImpXPolygon->nRefCount > 1 )
+ pImpXPolygon->nRefCount--;
+ else
+ delete pImpXPolygon;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::CheckReference()
+|*
+|* Referenzzaehler desImpXPoly pruefen und ggf. von diesem abkoppeln
+|* Ersterstellung 17.01.95 ESO
+|* Letzte Aenderung 17.01.95 ESO
+|*
+*************************************************************************/
+
+void XPolygon::CheckReference()
+{
+ if( pImpXPolygon->nRefCount > 1 )
+ {
+ pImpXPolygon->nRefCount--;
+ pImpXPolygon = new ImpXPolygon( *pImpXPolygon );
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::SetSize()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+void XPolygon::SetSize( USHORT nNewSize )
+{
+ CheckReference();
+ pImpXPolygon->Resize( nNewSize );
+}
+
+/*************************************************************************
+|*
+|* XPolygon::GetSize()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+USHORT XPolygon::GetSize() const
+{
+ pImpXPolygon->CheckPointDelete();
+ return pImpXPolygon->nSize;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::SetPointCount()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+void XPolygon::SetPointCount( USHORT nPoints )
+{
+ pImpXPolygon->CheckPointDelete();
+ CheckReference();
+
+ if( pImpXPolygon->nSize < nPoints )
+ pImpXPolygon->Resize( nPoints );
+
+ if ( nPoints < pImpXPolygon->nPoints )
+ {
+ USHORT nSize = pImpXPolygon->nPoints - nPoints;
+ memset( &pImpXPolygon->pPointAry[nPoints], 0, nSize * sizeof( Point ) );
+ memset( &pImpXPolygon->pFlagAry [nPoints], 0, nSize );
+ }
+ pImpXPolygon->nPoints = nPoints;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::GetPointCount()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+USHORT XPolygon::GetPointCount() const
+{
+ pImpXPolygon->CheckPointDelete();
+ return pImpXPolygon->nPoints;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Insert()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+void XPolygon::Insert( USHORT nPos, const Point& rPt, XPolyFlags eFlags )
+{
+ CheckReference();
+ if (nPos>pImpXPolygon->nPoints) nPos=pImpXPolygon->nPoints;
+ pImpXPolygon->InsertSpace( nPos, 1 );
+ pImpXPolygon->pPointAry[nPos] = rPt;
+ pImpXPolygon->pFlagAry[nPos] = (BYTE)eFlags;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Insert()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+void XPolygon::Insert( USHORT nPos, const XPolygon& rXPoly )
+{
+ CheckReference();
+ if (nPos>pImpXPolygon->nPoints) nPos=pImpXPolygon->nPoints;
+
+ USHORT nPoints = rXPoly.GetPointCount();
+
+ pImpXPolygon->InsertSpace( nPos, nPoints );
+
+ memcpy( &(pImpXPolygon->pPointAry[nPos]),
+ rXPoly.pImpXPolygon->pPointAry,
+ nPoints*sizeof( Point ) );
+ memcpy( &(pImpXPolygon->pFlagAry[nPos]),
+ rXPoly.pImpXPolygon->pFlagAry,
+ nPoints );
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Insert()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+void XPolygon::Insert( USHORT nPos, const Polygon& rPoly )
+{
+ CheckReference();
+ if (nPos>pImpXPolygon->nPoints) nPos=pImpXPolygon->nPoints;
+
+ USHORT nPoints = rPoly.GetSize();
+
+ pImpXPolygon->InsertSpace( nPos, nPoints );
+
+ USHORT i;
+ for( i=0; i < nPoints; i++ )
+ pImpXPolygon->pPointAry[i] = rPoly[i];
+
+ // Die Flags sind durch das InsertSpace bereits auf 0 gesetzt
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Remove()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 08.11.94
+|*
+*************************************************************************/
+
+void XPolygon::Remove( USHORT nPos, USHORT nCount )
+{
+ CheckReference();
+ pImpXPolygon->Remove( nPos, nCount );
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Move()
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 09.11.94
+|*
+*************************************************************************/
+
+void XPolygon::Move( long nHorzMove, long nVertMove )
+{
+ if ( !nHorzMove && !nVertMove )
+ return;
+
+ CheckReference();
+
+ // Punkte verschieben
+ USHORT nCount = pImpXPolygon->nPoints;
+ for ( USHORT i = 0; i < nCount; i++ )
+ {
+ Point* pPt = &(pImpXPolygon->pPointAry[i]);
+ pPt->X() += nHorzMove;
+ pPt->Y() += nVertMove;
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::GetBoundRect()
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+Rectangle XPolygon::GetBoundRect(OutputDevice *pOut) const
+{
+ pImpXPolygon->CheckPointDelete();
+
+ Rectangle aRect(XOutCalcXPolyExtent(*this, pOut));
+
+// USHORT nCount = pImpXPolygon->nPoints;
+// if( !nCount )
+// return Rectangle();
+
+// Polygon aPoly = XOutCreatePolygon(*this, pOut);
+// Rectangle aRect = aPoly.GetBoundRect();
+/*
+ if ( pOut == NULL )
+ {
+ BOOL bHasBezier = FALSE;
+
+ for (USHORT i = 0; i < nCount; i++)
+ {
+ if ( pImpXPolygon->pFlagAry[i] == (BYTE) XPOLY_CONTROL )
+ {
+ bHasBezier = TRUE;
+ i = nCount;
+ }
+ }
+ if ( bHasBezier )
+ { // Breite und Hoehe um 1 Prozent erweitern, um Differenzen zur
+ // ungenauen Bezierberechnung (wg. fehlendem OutputDevice) auszugleichen
+ long nWDiff = aRect.GetWidth() / 200;
+ long nHDiff = aRect.GetHeight() / 200;
+ aRect.Left() -= nWDiff;
+ aRect.Right() += nWDiff;
+ aRect.Top() -= nHDiff;
+ aRect.Bottom() += nHDiff;
+ }
+ }
+*/ return aRect;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::operator[]()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95
+|*
+*************************************************************************/
+
+const Point& XPolygon::operator[]( USHORT nPos ) const
+{
+ DBG_ASSERT(nPos < pImpXPolygon->nPoints, "Ungueltiger Index bei const-Arrayzugriff auf XPolygon");
+
+ pImpXPolygon->CheckPointDelete();
+ return pImpXPolygon->pPointAry[nPos];
+}
+
+/*************************************************************************
+|*
+|* XPolygon::operator[]()
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung 12.01.95 ESO
+|*
+*************************************************************************/
+
+Point& XPolygon::operator[]( USHORT nPos )
+{
+ pImpXPolygon->CheckPointDelete();
+ CheckReference();
+
+ if( nPos >= pImpXPolygon->nSize )
+ {
+ DBG_ASSERT(pImpXPolygon->nResize, "Ungueltiger Index bei Arrayzugriff auf XPolygon");
+ pImpXPolygon->Resize(nPos + 1, FALSE);
+ }
+ if( nPos >= pImpXPolygon->nPoints )
+ pImpXPolygon->nPoints = nPos + 1;
+
+ return pImpXPolygon->pPointAry[nPos];
+}
+
+/*************************************************************************
+|*
+|* XPolygon::operator=()
+|*
+|* Beschreibung Zuweisungsoperator
+|* Ersterstellung ESO 22.11.94
+|* Letzte Aenderung ESO 12.01.95
+|*
+*************************************************************************/
+
+XPolygon& XPolygon::operator=( const XPolygon& rXPoly )
+{
+ pImpXPolygon->CheckPointDelete();
+
+ rXPoly.pImpXPolygon->nRefCount++;
+
+ if( pImpXPolygon->nRefCount > 1 )
+ pImpXPolygon->nRefCount--;
+ else
+ delete pImpXPolygon;
+
+ pImpXPolygon = rXPoly.pImpXPolygon;
+ return *this;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::operator==()
+|*
+|* Beschreibung Gleichheitsoperator
+|* Ersterstellung ESO 22.11.94
+|* Letzte Aenderung Joe 26.09.95
+|*
+*************************************************************************/
+
+BOOL XPolygon::operator==( const XPolygon& rXPoly ) const
+{
+ pImpXPolygon->CheckPointDelete();
+ if (rXPoly.pImpXPolygon==pImpXPolygon) return TRUE;
+ return *rXPoly.pImpXPolygon == *pImpXPolygon;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::operator!=()
+|*
+|* Beschreibung Ungleichheitsoperator
+|* Ersterstellung ESO 22.11.94
+|* Letzte Aenderung Joe 26.09.95
+|*
+*************************************************************************/
+
+BOOL XPolygon::operator!=( const XPolygon& rXPoly ) const
+{
+ pImpXPolygon->CheckPointDelete();
+ if (rXPoly.pImpXPolygon==pImpXPolygon) return FALSE;
+ return *rXPoly.pImpXPolygon != *pImpXPolygon;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::GetFlags()
+|*
+|* Flags fuer den Punkt an der Position nPos zurueckgeben
+|* Ersterstellung ESO 11.11.94
+|* Letzte Aenderung ESO 12.01.95
+|*
+*************************************************************************/
+
+XPolyFlags XPolygon::GetFlags( USHORT nPos ) const
+{
+ pImpXPolygon->CheckPointDelete();
+ return (XPolyFlags) pImpXPolygon->pFlagAry[nPos];
+}
+
+/*************************************************************************
+|*
+|* XPolygon::SetFlags()
+|*
+|* Flags fuer den Punkt an der Position nPos setzen
+|* Ersterstellung ESO 11.11.94
+|* Letzte Aenderung ESO 12.01.95
+|*
+*************************************************************************/
+
+void XPolygon::SetFlags( USHORT nPos, XPolyFlags eFlags )
+{
+ pImpXPolygon->CheckPointDelete();
+ CheckReference();
+ pImpXPolygon->pFlagAry[nPos] = (BYTE) eFlags;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::IsControl()
+|*
+|* Kurzform zur Abfrage des CONTROL-Flags
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 12.01.95
+|*
+*************************************************************************/
+
+BOOL XPolygon::IsControl(USHORT nPos) const
+{
+ return ( (XPolyFlags) pImpXPolygon->pFlagAry[nPos] == XPOLY_CONTROL );
+}
+
+/*************************************************************************
+|*
+|* XPolygon::IsSmooth()
+|*
+|* Kurzform zur Abfrage von SMOOTH- und SYMMTR-Flag
+|* Ersterstellung ESO 18.04.95
+|* Letzte Aenderung ESO 18.04.95
+|*
+*************************************************************************/
+
+BOOL XPolygon::IsSmooth(USHORT nPos) const
+{
+ XPolyFlags eFlag = (XPolyFlags) pImpXPolygon->pFlagAry[nPos];
+ return ( eFlag == XPOLY_SMOOTH || eFlag == XPOLY_SYMMTR );
+}
+
+/*************************************************************************
+|*
+|* XPolygon::CalcDistance()
+|*
+|* Abstand zwischen zwei Punkten berechnen
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 09.01.95
+|*
+*************************************************************************/
+
+double XPolygon::CalcDistance(USHORT nP1, USHORT nP2)
+{
+ const Point& rP1 = pImpXPolygon->pPointAry[nP1];
+ const Point& rP2 = pImpXPolygon->pPointAry[nP2];
+ double fDx = rP2.X() - rP1.X();
+ double fDy = rP2.Y() - rP1.Y();
+ return sqrt(fDx * fDx + fDy * fDy);
+}
+
+/*************************************************************************
+|*
+|* XPolygon::SubdivideBezier()
+|*
+|* Bezierkurve unterteilen
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 09.01.95
+|*
+*************************************************************************/
+
+void XPolygon::SubdivideBezier(USHORT nPos, BOOL bCalcFirst, double fT)
+{
+ Point* pPoints = pImpXPolygon->pPointAry;
+ double fT2 = fT * fT;
+ double fT3 = fT * fT2;
+ double fU = 1.0 - fT;
+ double fU2 = fU * fU;
+ double fU3 = fU * fU2;
+ USHORT nIdx = nPos;
+ short nPosInc, nIdxInc;
+
+ if ( bCalcFirst )
+ {
+ nPos += 3;
+ nPosInc = -1;
+ nIdxInc = 0;
+ }
+ else
+ {
+ nPosInc = 1;
+ nIdxInc = 1;
+ }
+ pPoints[nPos].X() = (long) (fU3 * pPoints[nIdx ].X() +
+ fT * fU2 * pPoints[nIdx+1].X() * 3 +
+ fT2 * fU * pPoints[nIdx+2].X() * 3 +
+ fT3 * pPoints[nIdx+3].X());
+ pPoints[nPos].Y() = (long) (fU3 * pPoints[nIdx ].Y() +
+ fT * fU2 * pPoints[nIdx+1].Y() * 3 +
+ fT2 * fU * pPoints[nIdx+2].Y() * 3 +
+ fT3 * pPoints[nIdx+3].Y());
+ nPos += nPosInc;
+ nIdx += nIdxInc;
+ pPoints[nPos].X() = (long) (fU2 * pPoints[nIdx ].X() +
+ fT * fU * pPoints[nIdx+1].X() * 2 +
+ fT2 * pPoints[nIdx+2].X());
+ pPoints[nPos].Y() = (long) (fU2 * pPoints[nIdx ].Y() +
+ fT * fU * pPoints[nIdx+1].Y() * 2 +
+ fT2 * pPoints[nIdx+2].Y());
+ nPos += nPosInc;
+ nIdx += nIdxInc;
+ pPoints[nPos].X() = (long) (fU * pPoints[nIdx ].X() +
+ fT * pPoints[nIdx+1].X());
+ pPoints[nPos].Y() = (long) (fU * pPoints[nIdx ].Y() +
+ fT * pPoints[nIdx+1].Y());
+}
+
+/************************************************************************/
+
+void XPolygon::GenBezArc(const Point& rCenter, long nRx, long nRy,
+ long nXHdl, long nYHdl, USHORT nStart, USHORT nEnd,
+ USHORT nQuad, USHORT nFirst)
+{
+ Point* pPoints = pImpXPolygon->pPointAry;
+ pPoints[nFirst ] = rCenter;
+ pPoints[nFirst+3] = rCenter;
+
+ if ( nQuad == 1 || nQuad == 2 )
+ {
+ nRx = -nRx; nXHdl = -nXHdl;
+ }
+ if ( nQuad == 0 || nQuad == 1 )
+ {
+ nRy = -nRy; nYHdl = -nYHdl;
+ }
+
+ if ( nQuad == 0 || nQuad == 2 )
+ {
+ pPoints[nFirst].X() += nRx; pPoints[nFirst+3].Y() += nRy;
+ }
+ else
+ {
+ pPoints[nFirst].Y() += nRy; pPoints[nFirst+3].X() += nRx;
+ }
+ pPoints[nFirst+1] = pPoints[nFirst];
+ pPoints[nFirst+2] = pPoints[nFirst+3];
+
+ if ( nQuad == 0 || nQuad == 2 )
+ {
+ pPoints[nFirst+1].Y() += nYHdl; pPoints[nFirst+2].X() += nXHdl;
+ }
+ else
+ {
+ pPoints[nFirst+1].X() += nXHdl; pPoints[nFirst+2].Y() += nYHdl;
+ }
+ if ( nStart > 0 )
+ SubdivideBezier(nFirst, FALSE, (double)nStart / 900);
+ if ( nEnd < 900 )
+ SubdivideBezier(nFirst, TRUE, (double)(nEnd-nStart) / (900-nStart));
+ SetFlags(nFirst+1, XPOLY_CONTROL);
+ SetFlags(nFirst+2, XPOLY_CONTROL);
+}
+
+/************************************************************************/
+
+BOOL XPolygon::CheckAngles(USHORT& nStart, USHORT nEnd, USHORT& nA1, USHORT& nA2)
+{
+ if ( nStart == 3600 ) nStart = 0;
+ if ( nEnd == 0 ) nEnd = 3600;
+ USHORT nStPrev = nStart;
+ USHORT nMax = (nStart / 900 + 1) * 900;
+ USHORT nMin = nMax - 900;
+
+ if ( nEnd >= nMax || nEnd <= nStart ) nA2 = 900;
+ else nA2 = nEnd - nMin;
+ nA1 = nStart - nMin;
+ nStart = nMax;
+
+ // TRUE zurueck, falls letztes Segment berechnet wurde
+ return (nStPrev < nEnd && nStart >= nEnd);
+}
+
+/*************************************************************************
+|*
+|* XPolygon::CalcSmoothJoin()
+|*
+|* glatten Uebergang zu einer Bezierkurve berechnen, indem der
+|* entsprechende Punkt auf die Verbindungslinie von zwei anderen
+|* Punkten projiziert wird
+|* Center = End- bzw. Anfangspunkt der Bezierkurve
+|* Drag = der bewegte Punkt, der die Verschiebung von Pnt vorgibt
+|* Pnt = der zu modifizierende Punkt
+|* Wenn Center am Anfang bzw. Ende des Polygons liegt, wird Pnt
+|* auf die entgegengesetzte Seite verlegt
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 18.04.95
+|*
+\************************************************************************/
+
+void XPolygon::CalcSmoothJoin(USHORT nCenter, USHORT nDrag, USHORT nPnt)
+{
+ CheckReference();
+
+ USHORT nMaxPnt = pImpXPolygon->nPoints - 1;
+
+// if ( nCenter == nMaxPnt ) nPnt = 1;
+// else if ( nCenter == 0 ) nPnt = nMaxPnt - 1;
+
+ // Wenn nPnt kein Control-Punkt, d.h. nicht verschiebbar, dann
+ // statt dessen nDrag auf der Achse nCenter-nPnt verschieben
+ if ( !IsControl(nPnt) )
+ {
+ USHORT nTmp = nDrag;
+ nDrag = nPnt;
+ nPnt = nTmp;
+ }
+ Point* pPoints = pImpXPolygon->pPointAry;
+ Point aDiff = pPoints[nDrag] - pPoints[nCenter];
+ double fDiv = CalcDistance(nCenter, nDrag);
+
+ if ( fDiv )
+ {
+ double fRatio = CalcDistance(nCenter, nPnt) / fDiv;
+ // bei SMOOTH bisherige Laenge beibehalten
+ if ( GetFlags(nCenter) == XPOLY_SMOOTH || !IsControl(nDrag) )
+ {
+ aDiff.X() = (long) (fRatio * aDiff.X());
+ aDiff.Y() = (long) (fRatio * aDiff.Y());
+ }
+ pPoints[nPnt] = pPoints[nCenter] - aDiff;
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::CalcTangent()
+|*
+|* Tangente fuer den Uebergang zwischen zwei Bezierkurven berechnen
+|* Center = End- bzw. Anfangspunkt der Bezierkurven
+|* Prev = vorheriger Zugpunkt
+|* Next = naechster Zugpunkt
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 18.04.95
+|*
+\************************************************************************/
+
+void XPolygon::CalcTangent(USHORT nCenter, USHORT nPrev, USHORT nNext)
+{
+ CheckReference();
+
+ double fAbsLen = CalcDistance(nNext, nPrev);
+
+ if ( fAbsLen )
+ {
+ const Point& rCenter = pImpXPolygon->pPointAry[nCenter];
+ Point& rNext = pImpXPolygon->pPointAry[nNext];
+ Point& rPrev = pImpXPolygon->pPointAry[nPrev];
+ Point aDiff = rNext - rPrev;
+ double fNextLen = CalcDistance(nCenter, nNext) / fAbsLen;
+ double fPrevLen = CalcDistance(nCenter, nPrev) / fAbsLen;
+
+ // bei SYMMTR gleiche Laenge fuer beide Seiten
+ if ( GetFlags(nCenter) == XPOLY_SYMMTR )
+ {
+ fPrevLen = (fNextLen + fPrevLen) / 2;
+ fNextLen = fPrevLen;
+ }
+ rNext.X() = rCenter.X() + (long) (fNextLen * aDiff.X());
+ rNext.Y() = rCenter.Y() + (long) (fNextLen * aDiff.Y());
+ rPrev.X() = rCenter.X() - (long) (fPrevLen * aDiff.X());
+ rPrev.Y() = rCenter.Y() - (long) (fPrevLen * aDiff.Y());
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::PointsToBezier()
+|*
+|* wandelt vier Polygonpunkte in eine Bezierkurve durch diese Punkte um
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 09.01.95
+|*
+\************************************************************************/
+
+void XPolygon::PointsToBezier(USHORT nFirst)
+{
+ double nFullLength, nPart1Length, nPart2Length;
+ double fX0, fY0, fX1, fY1, fX2, fY2, fX3, fY3;
+ double fTx1, fTx2, fTy1, fTy2;
+ double fT1, fU1, fT2, fU2, fV;
+ Point* pPoints = pImpXPolygon->pPointAry;
+
+ if ( nFirst > pImpXPolygon->nPoints - 4 || IsControl(nFirst) ||
+ IsControl(nFirst+1) || IsControl(nFirst+2) || IsControl(nFirst+3) )
+ return;
+
+ CheckReference();
+
+ fTx1 = pPoints[nFirst+1].X();
+ fTy1 = pPoints[nFirst+1].Y();
+ fTx2 = pPoints[nFirst+2].X();
+ fTy2 = pPoints[nFirst+2].Y();
+ fX0 = pPoints[nFirst ].X();
+ fY0 = pPoints[nFirst ].Y();
+ fX3 = pPoints[nFirst+3].X();
+ fY3 = pPoints[nFirst+3].Y();
+
+ nPart1Length = CalcDistance(nFirst, nFirst+1);
+ nPart2Length = nPart1Length + CalcDistance(nFirst+1, nFirst+2);
+ nFullLength = nPart2Length + CalcDistance(nFirst+2, nFirst+3);
+ if ( nFullLength < 20 )
+ return;
+
+ if ( nPart2Length == nFullLength )
+ nPart2Length -= 1;
+ if ( nPart1Length == nFullLength )
+ nPart1Length = nPart2Length - 1;
+ if ( nPart1Length <= 0 )
+ nPart1Length = 1;
+ if ( nPart2Length <= 0 || nPart2Length == nPart1Length )
+ nPart2Length = nPart1Length + 1;
+
+ fT1 = nPart1Length / nFullLength;
+ fU1 = 1.0 - fT1;
+ fT2 = nPart2Length / nFullLength;
+ fU2 = 1.0 - fT2;
+ fV = 3 * (1.0 - (fT1 * fU2) / (fT2 * fU1));
+
+ fX1 = fTx1 / (fT1 * fU1 * fU1) - fTx2 * fT1 / (fT2 * fT2 * fU1 * fU2);
+ fX1 /= fV;
+ fX1 -= fX0 * ( fU1 / fT1 + fU2 / fT2) / 3;
+ fX1 += fX3 * ( fT1 * fT2 / (fU1 * fU2)) / 3;
+
+ fY1 = fTy1 / (fT1 * fU1 * fU1) - fTy2 * fT1 / (fT2 * fT2 * fU1 * fU2);
+ fY1 /= fV;
+ fY1 -= fY0 * ( fU1 / fT1 + fU2 / fT2) / 3;
+ fY1 += fY3 * ( fT1 * fT2 / (fU1 * fU2)) / 3;
+
+ fX2 = fTx2 / (fT2 * fT2 * fU2 * 3) - fX0 * fU2 * fU2 / ( fT2 * fT2 * 3);
+ fX2 -= fX1 * fU2 / fT2;
+ fX2 -= fX3 * fT2 / (fU2 * 3);
+
+ fY2 = fTy2 / (fT2 * fT2 * fU2 * 3) - fY0 * fU2 * fU2 / ( fT2 * fT2 * 3);
+ fY2 -= fY1 * fU2 / fT2;
+ fY2 -= fY3 * fT2 / (fU2 * 3);
+
+ pPoints[nFirst+1] = Point((long) fX1, (long) fY1);
+ pPoints[nFirst+2] = Point((long) fX2, (long) fY2);
+ SetFlags(nFirst+1, XPOLY_CONTROL);
+ SetFlags(nFirst+2, XPOLY_CONTROL);
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Translate()
+|*
+|* Polygon auf den uebergebenen Punkt verschieben
+|* Ersterstellung ESO 17.01.95
+|* Letzte Aenderung ESO 17.01.95
+|*
+*************************************************************************/
+
+void XPolygon::Translate(const Point& rTrans)
+{
+ pImpXPolygon->CheckPointDelete();
+ CheckReference();
+
+ USHORT nPntCnt = pImpXPolygon->nPoints;
+
+ for (USHORT i = 0; i < nPntCnt; i++)
+ pImpXPolygon->pPointAry[i] += rTrans;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Rotate()
+|*
+|* Alle Punkte um den Punkt rCenter drehen, Sinus und Cosinus
+|* muessen uebergeben werden
+|* Ersterstellung ESO 09.01.95
+|* Letzte Aenderung ESO 17.01.95
+|*
+*************************************************************************/
+
+void XPolygon::Rotate(const Point& rCenter, double fSin, double fCos)
+{
+ pImpXPolygon->CheckPointDelete();
+ CheckReference();
+
+ long nX;
+ long nY;
+ long nNewX;
+ long nNewY;
+ long nCenterX = rCenter.X();
+ long nCenterY = rCenter.Y();
+
+ USHORT nPntCnt = pImpXPolygon->nPoints;
+
+ for (USHORT i = 0; i < nPntCnt; i++)
+ {
+ Point *pPt = &(pImpXPolygon->pPointAry[i]);
+ nX = pPt->X()-nCenterX;
+ nY = pPt->Y()-nCenterY;
+ nNewX = (long)floor(fCos * nX + fSin * nY + 0.5);
+ nNewY = -(long)floor(fSin * nX - fCos * nY + 0.5);
+ pPt->X() = nNewX + nCenterX;
+ pPt->Y() = nNewY + nCenterY;
+
+ /* und so stand das in einem anderen File auf T:
+ dass ich am 29-11-1995 gegettet habe. Joe M.
+ USHORT nPntCnt = pImpXPolygon->nPoints;
+
+ for (USHORT i = 0; i < nPntCnt; i++)
+ {
+ Point P = pImpXPolygon->pPointAry[i] - rCenter;
+ long X = P.X();
+ long Y = P.Y();
+ P.X() = (long)floor(fCos * X + fSin * Y + 0.5);
+ P.Y() = -(long)floor(fSin * X - fCos * Y + 0.5);
+ pImpXPolygon->pPointAry[i] = P + rCenter;
+ */
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Rotate()
+|*
+|* Alle Punkte um den Punkt rCenter mit dem Winkel nAngle drehen
+|* Winkel in 10tel Grad, Wertebereich 0 - 3600
+|* Ersterstellung ESO 17.01.95
+|* Letzte Aenderung ESO 17.01.95
+|*
+*************************************************************************/
+
+void XPolygon::Rotate(const Point& rCenter, USHORT nAngle)
+{
+ nAngle %= 3600;
+
+ if ( nAngle != 0 )
+ {
+ double fAngle = F_PI * nAngle / 1800;
+ double fSin = sin(fAngle);
+ double fCos = cos(fAngle);
+ Rotate(rCenter, fSin, fCos);
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Scale()
+|*
+|* XPolygon in X- und/oder Y-Richtung skalieren
+|* Ersterstellung ESO 01.02.95
+|* Letzte Aenderung ESO 01.02.95
+|*
+*************************************************************************/
+
+void XPolygon::Scale(double fSx, double fSy)
+{
+ pImpXPolygon->CheckPointDelete();
+ CheckReference();
+
+ USHORT nPntCnt = pImpXPolygon->nPoints;
+
+ for (USHORT i = 0; i < nPntCnt; i++)
+ {
+ Point& rPnt = pImpXPolygon->pPointAry[i];
+ rPnt.X() = (long)(fSx * rPnt.X());
+ rPnt.Y() = (long)(fSy * rPnt.Y());
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::SlantX()
+|*
+|* XPolygon in X-Richtung um einen beliebigen Winkel kippen,
+|* bezogen auf eine Referenz-Y-Koordinate
+|* Ersterstellung ESO 01.02.95
+|* Letzte Aenderung ESO 01.02.95
+|*
+*************************************************************************/
+
+void XPolygon::SlantX(long nYRef, double fSin, double fCos)
+{
+ pImpXPolygon->CheckPointDelete();
+ CheckReference();
+
+ USHORT nPntCnt = pImpXPolygon->nPoints;
+
+ for (USHORT i = 0; i < nPntCnt; i++)
+ {
+ Point& rPnt = pImpXPolygon->pPointAry[i];
+ long nDy = rPnt.Y() - nYRef;
+ rPnt.X() += (long)(fSin * nDy);
+ rPnt.Y() = nYRef + (long)(fCos * nDy);
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::SlantY()
+|*
+|* XPolygon in Y-Richtung um einen beliebigen Winkel kippen,
+|* bezogen auf eine Referenz-X-Koordinate
+|* Ersterstellung ESO 01.02.95
+|* Letzte Aenderung ESO 01.02.95
+|*
+*************************************************************************/
+
+void XPolygon::SlantY(long nXRef, double fSin, double fCos)
+{
+ pImpXPolygon->CheckPointDelete();
+ CheckReference();
+
+ USHORT nPntCnt = pImpXPolygon->nPoints;
+
+ for (USHORT i = 0; i < nPntCnt; i++)
+ {
+ Point& rPnt = pImpXPolygon->pPointAry[i];
+ long nDx = rPnt.X() - nXRef;
+ rPnt.X() = nXRef + (long)(fCos * nDx);
+ rPnt.Y() -= (long)(fSin * nDx);
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Distort()
+|*
+|* XPolygon verzerren, indem die Koordinaten relativ zu einem
+|* Referenzrechteck in ein beliebiges Viereck skaliert werden
+|* Zuordnung der Viereck-Punkte im Polygon zum Referenzrechteck:
+|* 0: links oben 0----1
+|* 1: rechts oben | |
+|* 2: rechts unten 3----2
+|* 3: links unten
+|* Ersterstellung ESO 07.07.95
+|* Letzte Aenderung ESO 07.07.95
+|*
+*************************************************************************/
+
+void XPolygon::Distort(const Rectangle& rRefRect,
+ const XPolygon& rDistortedRect)
+{
+ pImpXPolygon->CheckPointDelete();
+ CheckReference();
+
+ long Xr, Wr, X1, X2, X3, X4;
+ long Yr, Hr, Y1, Y2, Y3, Y4;
+ double fTx, fTy, fUx, fUy;
+
+ Xr = rRefRect.Left();
+ Yr = rRefRect.Top();
+ Wr = rRefRect.GetWidth();
+ Hr = rRefRect.GetHeight();
+
+ if ( Wr && Hr )
+ {
+ DBG_ASSERT(rDistortedRect.pImpXPolygon->nPoints >= 4,
+ "Distort-Rechteck zu klein");
+
+ X1 = rDistortedRect[0].X();
+ Y1 = rDistortedRect[0].Y();
+ X2 = rDistortedRect[1].X();
+ Y2 = rDistortedRect[1].Y();
+ X3 = rDistortedRect[3].X();
+ Y3 = rDistortedRect[3].Y();
+ X4 = rDistortedRect[2].X();
+ Y4 = rDistortedRect[2].Y();
+
+ USHORT nPntCnt = pImpXPolygon->nPoints;
+
+ for (USHORT i = 0; i < nPntCnt; i++)
+ {
+ Point& rPnt = pImpXPolygon->pPointAry[i];
+
+ fTx = (double)(rPnt.X() - Xr) / Wr;
+ fTy = (double)(rPnt.Y() - Yr) / Hr;
+ fUx = 1.0 - fTx;
+ fUy = 1.0 - fTy;
+
+ rPnt.X() = (long) ( fUy * (fUx * X1 + fTx * X2) +
+ fTy * (fUx * X3 + fTx * X4) );
+ rPnt.Y() = (long) ( fUx * (fUy * Y1 + fTy * Y3) +
+ fTx * (fUy * Y2 + fTy * Y4) );
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Bestimme den linken, unteren Punkt des Polygons und richte das
+|* Polygon so aus, dass dieser Punkt auf dem Index 0 liegt
+|*
+\************************************************************************/
+
+void XPolygon::Rotate20()
+{
+ pImpXPolygon->CheckPointDelete();
+ CheckReference();
+
+ double fMinY = pImpXPolygon->pPointAry->Y();
+ double fMinX = pImpXPolygon->pPointAry->X();
+ long nPntCnt = pImpXPolygon->nPoints;
+ long nIndex0 = 0;
+
+ for (long nPoints = 1;
+ nPoints < nPntCnt;
+ nPoints ++)
+ {
+ Point &rPnt = pImpXPolygon->pPointAry[nPoints];
+
+ if ((rPnt.X () < fMinX) || (fMinX == rPnt.X ()) &&
+ (fMinY >= rPnt.Y ()))
+ {
+ fMinX = rPnt.X ();
+ fMinY = rPnt.Y ();
+ nIndex0 = nPoints;
+ }
+ }
+
+ if (nIndex0 < nPntCnt)
+ {
+ Point *pTemp = new Point [nIndex0];
+ memcpy (pTemp, pImpXPolygon->pPointAry, nIndex0 * sizeof (Point));
+ memcpy (pImpXPolygon->pPointAry, &pImpXPolygon->pPointAry [nIndex0], (nPntCnt - nIndex0) * sizeof (Point));
+ memcpy (&pImpXPolygon->pPointAry [nIndex0], pTemp, nIndex0 * sizeof (Point));
+ delete pTemp;
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolygon::operator>>()
+|*
+|* Beschreibung Stream-Leseoperator
+|* Ersterstellung ESO 04.04.95
+|* Letzte Aenderung ESO 04.04.95
+|*
+*************************************************************************/
+
+SvStream& operator>>( SvStream& rIStream, XPolygon& rXPoly )
+{
+ DBG_CHKOBJ( &rXPoly, XPolygon, NULL );
+
+ USHORT i;
+ USHORT nStart;
+ USHORT nCurPoints;
+ USHORT nReadPoints; // Anzahl der Punkte im Stream
+ USHORT nMerkPoints; // Anzahl der Punkte die ich speichern kann
+ unsigned char bShort;
+ short nShortX;
+ short nShortY;
+ long nLongX;
+ long nLongY;
+
+ rXPoly.pImpXPolygon->CheckPointDelete();
+
+ // Anzahl der Punkte einlesen und Array erzeugen
+ rIStream >> nReadPoints;
+ nMerkPoints=nReadPoints;
+ if (nMerkPoints>XPOLY_MAXPOINTS) {
+ nMerkPoints=XPOLY_MAXPOINTS;
+ // hier koennte man ein Flag am Stream setzen um zu vermerken
+ // dass beim Lesen Informationsverlusst aufgetreten ist !!!!!
+ }
+ rXPoly.pImpXPolygon->nPoints = nMerkPoints;
+
+ if ( rXPoly.pImpXPolygon->nRefCount != 1 )
+ {
+ if ( rXPoly.pImpXPolygon->nRefCount )
+ rXPoly.pImpXPolygon->nRefCount--;
+ rXPoly.pImpXPolygon = new ImpXPolygon( nMerkPoints );
+ }
+ else
+ rXPoly.pImpXPolygon->Resize( nMerkPoints );
+
+ // Je nach CompressMode das Polygon einlesen
+ if ( rIStream.GetCompressMode() == COMPRESSMODE_FULL )
+ {
+ i = 0;
+ while ( i < nReadPoints )
+ {
+ rIStream >> bShort >> nCurPoints;
+
+ if ( bShort )
+ {
+ for ( nStart = i; i < nStart+nCurPoints; i++ )
+ {
+ rIStream >> nShortX >> nShortY;
+ if (i<nMerkPoints) { // restliche Punkte ueberspringen
+ rXPoly.pImpXPolygon->pPointAry[i].X() = nShortX;
+ rXPoly.pImpXPolygon->pPointAry[i].Y() = nShortY;
+ }
+ }
+ }
+ else
+ {
+ for ( nStart = i; i < nStart+nCurPoints; i++ )
+ {
+ rIStream >> nLongX >> nLongY;
+ if (i<nMerkPoints) { // restliche Punkte ueberspringen
+ rXPoly.pImpXPolygon->pPointAry[i].X() = nLongX;
+ rXPoly.pImpXPolygon->pPointAry[i].Y() = nLongY;
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ // Feststellen, ob ueber die Operatoren gelesen werden muss
+#if (__SIZEOFLONG) != 4
+ if ( 1 )
+#else
+#ifdef __BIGENDIAN
+ if ( rIStream.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN )
+#else
+ if ( rIStream.GetNumberFormatInt() != NUMBERFORMAT_INT_LITTLEENDIAN )
+#endif
+#endif
+ {
+ for( i = 0; i < nReadPoints; i++ ) {
+ long x,y;
+ rIStream >> x >> y;
+ if (i<nMerkPoints) { // restliche Punkte ueberspringen
+ rXPoly.pImpXPolygon->pPointAry[i].X()=x;
+ rXPoly.pImpXPolygon->pPointAry[i].Y()=y;
+ }
+ }
+ } else {
+ rIStream.Read( rXPoly.pImpXPolygon->pPointAry, nMerkPoints*sizeof(Point) );
+ if (nReadPoints>nMerkPoints) { // restliche Punkte ueberspringen
+ rIStream.SeekRel( ULONG(nReadPoints-nMerkPoints)*sizeof(Point) );
+ }
+ }
+ }
+ rIStream.Read( rXPoly.pImpXPolygon->pFlagAry, nMerkPoints );
+ if (nReadPoints>nMerkPoints) { // Flags der restlichen Punkte ueberspringen
+ rIStream.SeekRel( ULONG(nReadPoints-nMerkPoints) );
+ // Poly muesste hier noch etwas korregiert werden (Bezier-Kontrollpunkte am Ende..., geschlossen?)
+ }
+ while (rXPoly.GetPointCount()>0 && rXPoly.GetFlags(USHORT(rXPoly.GetPointCount()-1))==XPOLY_CONTROL) {
+ // Kontrollpunkte am Ende entfernen (kann auftreten bei truncate wg. 64k-Grenze!)
+ rXPoly.Remove(USHORT(rXPoly.GetPointCount()-1),1);
+ }
+
+ return rIStream;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::operator<<()
+|*
+|* Beschreibung Stream-Schreiboperator
+|* Ersterstellung ESO 04.04.95
+|* Letzte Aenderung ESO 04.04.95
+|*
+*************************************************************************/
+
+SvStream& operator<<( SvStream& rOStream, const XPolygon& rXPoly )
+{
+ DBG_CHKOBJ( &rXPoly, XPolygon, NULL );
+
+ unsigned char bShort;
+ unsigned char bCurShort;
+ USHORT nStart;
+ USHORT i;
+ USHORT nPoints = rXPoly.GetPointCount();
+
+ rXPoly.pImpXPolygon->CheckPointDelete();
+
+ // Anzahl der Punkte rausschreiben
+ rOStream << nPoints;
+
+ // Je nach CompressMode das Polygon rausschreiben
+ if ( rOStream.GetCompressMode() == COMPRESSMODE_FULL )
+ {
+ i = 0;
+ while ( i < nPoints )
+ {
+ nStart = i;
+
+ // Feststellen, welcher Typ geschrieben werden soll
+ if ( ((rXPoly.pImpXPolygon->pPointAry[nStart].X() >= SHRT_MIN) &&
+ (rXPoly.pImpXPolygon->pPointAry[nStart].X() <= SHRT_MAX)) &&
+ ((rXPoly.pImpXPolygon->pPointAry[nStart].Y() >= SHRT_MIN) &&
+ (rXPoly.pImpXPolygon->pPointAry[nStart].Y() <= SHRT_MAX)) )
+ bShort = TRUE;
+ else
+ bShort = FALSE;
+ while ( i < nPoints )
+ {
+ // Feststellen, welcher Typ geschrieben werden soll
+ if ( ((rXPoly.pImpXPolygon->pPointAry[nStart].X() >= SHRT_MIN) &&
+ (rXPoly.pImpXPolygon->pPointAry[nStart].X() <= SHRT_MAX)) &&
+ ((rXPoly.pImpXPolygon->pPointAry[nStart].Y() >= SHRT_MIN) &&
+ (rXPoly.pImpXPolygon->pPointAry[nStart].Y() <= SHRT_MAX)) )
+ bCurShort = TRUE;
+ else
+ bCurShort = FALSE;
+
+ // Wenn sich die Werte in einen anderen Bereich begeben,
+ // muessen wir neu rausschreiben
+ if ( bCurShort != bShort )
+ {
+ bShort = bCurShort;
+ break;
+ }
+
+ i++;
+ }
+
+ rOStream << bShort << (USHORT)(i-nStart);
+
+ if ( bShort )
+ {
+ for( ; nStart < i; nStart++ )
+ {
+ rOStream << (short)rXPoly.pImpXPolygon->pPointAry[nStart].X()
+ << (short)rXPoly.pImpXPolygon->pPointAry[nStart].Y();
+ }
+ }
+ else
+ {
+ for( ; nStart < i; nStart++ )
+ {
+ rOStream << rXPoly.pImpXPolygon->pPointAry[nStart].X()
+ << rXPoly.pImpXPolygon->pPointAry[nStart].Y();
+ }
+ }
+ }
+ }
+ else
+ {
+ // Feststellen, ob ueber die Operatoren geschrieben werden muss
+#if (__SIZEOFLONG) != 4
+ if ( 1 )
+#else
+#ifdef __BIGENDIAN
+ if ( rOStream.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN )
+#else
+ if ( rOStream.GetNumberFormatInt() != NUMBERFORMAT_INT_LITTLEENDIAN )
+#endif
+#endif
+ {
+ for( i = 0; i < nPoints; i++ )
+ rOStream << rXPoly.pImpXPolygon->pPointAry[i].X()
+ << rXPoly.pImpXPolygon->pPointAry[i].Y();
+ }
+ else if ( nPoints )
+ rOStream.Write( rXPoly.pImpXPolygon->pPointAry, nPoints*sizeof(Point) );
+ }
+
+ if ( nPoints )
+ rOStream.Write( rXPoly.pImpXPolygon->pFlagAry, nPoints );
+
+ return rOStream;
+}
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+//+--------------- XPolyPolygon -----------------------------------------+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+/*************************************************************************
+|*
+|* ImpXPolyPolygon::ImpXPolyPolygon()
+|*
+|* Beschreibung Erzeugt das XPolygon-Array
+|* Ersterstellung CL 09.11.94
+|* Letzte Aenderung MM 09.11.94
+|*
+*************************************************************************/
+
+ImpXPolyPolygon::ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ) :
+ aXPolyList( rImpXPolyPoly.aXPolyList )
+{
+ nRefCount = 1;
+
+ // Einzelne Elemente duplizieren
+ XPolygon* pXPoly = aXPolyList.First();
+ while ( pXPoly )
+ {
+ aXPolyList.Replace( new XPolygon( *(aXPolyList.GetCurObject()) ) );
+ pXPoly = aXPolyList.Next();
+ }
+}
+
+
+/*************************************************************************
+|*
+|* ImpXPolyPolygon::~ImpXPolyPolygon()
+|*
+|* Beschreibung Loescht das Polygon-Array
+|* Ersterstellung CL 09.06.93
+|* Letzte Aenderung CL 09.06.93
+|*
+*************************************************************************/
+
+ImpXPolyPolygon::~ImpXPolyPolygon()
+{
+ XPolygon* pXPoly = aXPolyList.First();
+ while( pXPoly )
+ {
+ delete pXPoly;
+ pXPoly = aXPolyList.Next();
+ }
+}
+
+/*************************************************************************
+|*
+|* ImpXPolyPolygon::operator==()
+|*
+|* Ersterstellung Joe 26-09-95
+|* Letzte Aenderung
+|*
+*************************************************************************/
+
+
+FASTBOOL ImpXPolyPolygon::operator==(const ImpXPolyPolygon& rImpXPolyPoly) const
+{
+ USHORT nAnz=(USHORT)aXPolyList.Count();
+ const XPolygonList& rCmpList=rImpXPolyPoly.aXPolyList;
+ if (nAnz!=(USHORT)rCmpList.Count()) return FALSE;
+ FASTBOOL bEq=TRUE;
+ for (USHORT i=nAnz; i>0 && bEq;) {
+ i--;
+ bEq= *aXPolyList.GetObject(i) == *rCmpList.GetObject(i);
+ }
+ return bEq;
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::XPolyPolygon()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+XPolyPolygon::XPolyPolygon( USHORT nInitSize, USHORT nResize )
+{
+ DBG_CTOR(XPolyPolygon,NULL);
+ pImpXPolyPolygon = new ImpXPolyPolygon( nInitSize, nResize );
+}
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::XPolyPolygon()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+XPolyPolygon::XPolyPolygon( const XPolygon& rXPoly )
+{
+ DBG_CTOR(XPolyPolygon,NULL);
+ pImpXPolyPolygon = new ImpXPolyPolygon;
+ pImpXPolyPolygon->aXPolyList.Insert( new XPolygon( rXPoly ) );
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::XPolyPolygon()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+XPolyPolygon::XPolyPolygon( const XPolyPolygon& rXPolyPoly )
+{
+ DBG_CTOR(XPolyPolygon,NULL);
+ pImpXPolyPolygon = rXPolyPoly.pImpXPolyPolygon;
+ pImpXPolyPolygon->nRefCount++;
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::XPolyPolygon()
+|*
+|* XPolyPolygon aus einen Standard-PolyPolygon erzeugen
+|* Ersterstellung 18.01.95 ESO
+|* Letzte Aenderung 18.01.95 ESO
+|*
+*************************************************************************/
+
+XPolyPolygon::XPolyPolygon( const PolyPolygon& rPolyPoly )
+{
+ DBG_CTOR(XPolyPolygon,NULL);
+ pImpXPolyPolygon = new ImpXPolyPolygon;
+
+ for (USHORT i = 0; i < rPolyPoly.Count(); i++)
+ pImpXPolyPolygon->aXPolyList.Insert(
+ new XPolygon(rPolyPoly.GetObject(i)) );
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::~XPolyPolygon()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+XPolyPolygon::~XPolyPolygon()
+{
+ DBG_DTOR(XPolyPolygon,NULL);
+ if( pImpXPolyPolygon->nRefCount > 1 )
+ pImpXPolyPolygon->nRefCount--;
+ else
+ delete pImpXPolyPolygon;
+}
+
+/*************************************************************************
+|*
+|* XPolygon::CheckReference()
+|*
+|* Referenzzaehler desImpXPolyPoly pruefen und ggf. von diesem abkoppeln
+|* Ersterstellung 18.01.95 ESO
+|* Letzte Aenderung 18.01.95 ESO
+|*
+*************************************************************************/
+
+void XPolyPolygon::CheckReference()
+{
+ if( pImpXPolyPolygon->nRefCount > 1 )
+ {
+ pImpXPolyPolygon->nRefCount--;
+ pImpXPolyPolygon = new ImpXPolyPolygon( *pImpXPolyPolygon );
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Insert()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+void XPolyPolygon::Insert( const XPolygon& rXPoly, USHORT nPos )
+{
+ CheckReference();
+ XPolygon* pXPoly = new XPolygon( rXPoly );
+ pImpXPolyPolygon->aXPolyList.Insert( pXPoly, nPos );
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Insert()
+|*
+|* saemtliche XPolygone aus einem XPolyPolygon einfuegen
+|* Ersterstellung 18.01.95 ESO
+|* Letzte Aenderung 18.01.95 ESO
+|*
+*************************************************************************/
+
+void XPolyPolygon::Insert( const XPolyPolygon& rXPolyPoly, USHORT nPos )
+{
+ CheckReference();
+
+ for (USHORT i = 0; i < rXPolyPoly.Count(); i++)
+ {
+ XPolygon* pXPoly = new XPolygon(rXPolyPoly[i]);
+ pImpXPolyPolygon->aXPolyList.Insert(pXPoly, nPos);
+ if ( nPos != XPOLYPOLY_APPEND )
+ nPos++;
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Remove()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+XPolygon XPolyPolygon::Remove( USHORT nPos )
+{
+ CheckReference();
+ XPolygon* pTmpXPoly = pImpXPolyPolygon->aXPolyList.Remove( nPos );
+ XPolygon aXPoly( *pTmpXPoly );
+ delete pTmpXPoly;
+ return aXPoly;
+}
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Replace()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+XPolygon XPolyPolygon::Replace( const XPolygon& rXPoly, USHORT nPos )
+{
+ CheckReference();
+ XPolygon* pXPoly = new XPolygon( rXPoly );
+ XPolygon* pTmpXPoly = pImpXPolyPolygon->aXPolyList.Replace( pXPoly, nPos );
+ XPolygon aXPoly( *pTmpXPoly );
+ delete pTmpXPoly;
+ return aXPoly;
+}
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::GetObject()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+const XPolygon& XPolyPolygon::GetObject( USHORT nPos ) const
+{
+ return *(pImpXPolyPolygon->aXPolyList.GetObject( nPos ));
+}
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Clear()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung TH 17.10.94
+|*
+*************************************************************************/
+
+void XPolyPolygon::Clear()
+{
+ if ( pImpXPolyPolygon->nRefCount > 1 )
+ {
+ pImpXPolyPolygon->nRefCount--;
+ pImpXPolyPolygon = new ImpXPolyPolygon();
+ }
+ else
+ {
+ XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList.First();
+ while( pXPoly )
+ {
+ delete pXPoly;
+ pXPoly = pImpXPolyPolygon->aXPolyList.Next();
+ }
+ pImpXPolyPolygon->aXPolyList.Clear();
+ }
+}
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Count()
+|*
+|* Beschreibung
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+USHORT XPolyPolygon::Count() const
+{
+ return (USHORT)(pImpXPolyPolygon->aXPolyList.Count());
+}
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Move()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung TH 04.10.94
+|* Letzte Aenderung TH 04.10.94
+|*
+*************************************************************************/
+
+void XPolyPolygon::Move( long nHorzMove, long nVertMove )
+{
+ // Diese Abfrage sollte man fuer die DrawEngine durchfuehren
+ if ( !nHorzMove && !nVertMove )
+ return;
+
+ // Referenzcounter beruecksichtigen
+ CheckReference();
+
+ // Punkte verschieben
+ XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList.First();
+ while( pXPoly )
+ {
+ pXPoly->Move( nHorzMove, nVertMove );
+ pXPoly = pImpXPolyPolygon->aXPolyList.Next();
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::GetBoundRect()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung TH 04.10.94
+|* Letzte Aenderung TH 04.10.94
+|*
+*************************************************************************/
+
+Rectangle XPolyPolygon::GetBoundRect(OutputDevice* pOut) const
+{
+ USHORT nXPoly = (USHORT)pImpXPolyPolygon->aXPolyList.Count();
+ Rectangle aRect;
+
+ for ( USHORT n = 0; n < nXPoly; n++ )
+ {
+ const XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList.GetObject( n );
+
+ aRect.Union( pXPoly->GetBoundRect(pOut) );
+ }
+
+ return aRect;
+}
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator[]()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung TH 28.10.94
+|* Letzte Aenderung TH 28.10.94
+|*
+*************************************************************************/
+
+XPolygon& XPolyPolygon::operator[]( USHORT nPos )
+{
+ CheckReference();
+ return *(pImpXPolyPolygon->aXPolyList.GetObject( nPos ));
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator=()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung CL 27.01.93
+|*
+*************************************************************************/
+
+XPolyPolygon& XPolyPolygon::operator=( const XPolyPolygon& rXPolyPoly )
+{
+ rXPolyPoly.pImpXPolyPolygon->nRefCount++;
+
+ if( pImpXPolyPolygon->nRefCount > 1 )
+ pImpXPolyPolygon->nRefCount--;
+ else
+ delete pImpXPolyPolygon;
+
+ pImpXPolyPolygon = rXPolyPoly.pImpXPolyPolygon;
+ return *this;
+}
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator==()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung Joe 27.01.93
+|*
+*************************************************************************/
+
+BOOL XPolyPolygon::operator==( const XPolyPolygon& rXPolyPoly ) const
+{
+ if (pImpXPolyPolygon==rXPolyPoly.pImpXPolyPolygon) return TRUE;
+ return *pImpXPolyPolygon == *rXPolyPoly.pImpXPolyPolygon;
+}
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator!=()
+|*
+|* Beschreibung POLY.SDW
+|* Ersterstellung CL 27.01.93
+|* Letzte Aenderung Joe 27.01.93
+|*
+*************************************************************************/
+
+BOOL XPolyPolygon::operator!=( const XPolyPolygon& rXPolyPoly ) const
+{
+ if (pImpXPolyPolygon==rXPolyPoly.pImpXPolyPolygon) return FALSE;
+ return *pImpXPolyPolygon != *rXPolyPoly.pImpXPolyPolygon;
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Translate()
+|*
+|* Alle Polygone auf den uebergebenen Punkt verschieben
+|* Ersterstellung ESO 25.01.95
+|* Letzte Aenderung ESO 25.01.95
+|*
+*************************************************************************/
+
+void XPolyPolygon::Translate(const Point& rTrans)
+{
+ CheckReference();
+
+ for (USHORT i = 0; i < Count(); i++)
+ pImpXPolyPolygon->aXPolyList.GetObject(i)->Translate(rTrans);
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Rotate()
+|*
+|* Alle Polygone um den Punkt rCenter drehen, Sinus und Cosinus
+|* muessen uebergeben werden
+|* Ersterstellung ESO 25.01.95
+|* Letzte Aenderung ESO 25.01.95
+|*
+*************************************************************************/
+
+void XPolyPolygon::Rotate(const Point& rCenter, double fSin, double fCos)
+{
+ CheckReference();
+
+ for (USHORT i = 0; i < Count(); i++)
+ pImpXPolyPolygon->aXPolyList.GetObject(i)->Rotate(rCenter, fSin, fCos);
+}
+
+/*************************************************************************
+|*
+|* Bestimme den linken, unteren Punkt des Polygons und richte das
+|* Polygon so aus, dass dieser Punkt auf dem Index 0 liegt
+|*
+\************************************************************************/
+
+void XPolyPolygon::Rotate20()
+{
+ CheckReference();
+
+ for (USHORT i = 0; i < Count(); i++)
+ pImpXPolyPolygon->aXPolyList.GetObject(i)->Rotate20();
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Rotate()
+|*
+|* Alle Poylgone um den Punkt rCenter mit dem Winkel nAngle drehen
+|* Winkel in 10tel Grad, Wertebereich 0 - 3600
+|* Ersterstellung ESO 25.01.95
+|* Letzte Aenderung ESO 25.01.95
+|*
+*************************************************************************/
+
+void XPolyPolygon::Rotate(const Point& rCenter, USHORT nAngle)
+{
+ nAngle %= 3600;
+
+ if ( nAngle != 0 )
+ {
+ double fAngle = F_PI * nAngle / 1800;
+ double fSin = sin(fAngle);
+ double fCos = cos(fAngle);
+ Rotate(rCenter, fSin, fCos);
+ }
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::Scale()
+|*
+|* Alle Polygone in X- und/oder Y-Richtung skalieren
+|* Ersterstellung ESO 01.02.95
+|* Letzte Aenderung ESO 01.02.95
+|*
+*************************************************************************/
+
+void XPolyPolygon::Scale(double fSx, double fSy)
+{
+ CheckReference();
+
+ for (USHORT i = 0; i < Count(); i++)
+ pImpXPolyPolygon->aXPolyList.GetObject(i)->Scale(fSx, fSy);
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::SlantX()
+|*
+|* Alle Polygone in X-Richtung um einen beliebigen Winkel kippen,
+|* bezogen auf eine Referenz-Y-Koordinate
+|* Ersterstellung ESO 01.02.95
+|* Letzte Aenderung ESO 01.02.95
+|*
+*************************************************************************/
+
+void XPolyPolygon::SlantX(long nYRef, double fSin, double fCos)
+{
+ CheckReference();
+
+ for (USHORT i = 0; i < Count(); i++)
+ pImpXPolyPolygon->aXPolyList.GetObject(i)->SlantX(nYRef, fSin, fCos);
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::SlantY()
+|*
+|* Alle Polygone in Y-Richtung um einen beliebigen Winkel kippen,
+|* bezogen auf eine Referenz-X-Koordinate
+|* Ersterstellung ESO 01.02.95
+|* Letzte Aenderung ESO 01.02.95
+|*
+*************************************************************************/
+
+void XPolyPolygon::SlantY(long nXRef, double fSin, double fCos)
+{
+ CheckReference();
+
+ for (USHORT i = 0; i < Count(); i++)
+ pImpXPolyPolygon->aXPolyList.GetObject(i)->SlantY(nXRef, fSin, fCos);
+}
+
+/*************************************************************************
+|*
+|* XPolygon::Distort()
+|*
+|* XPolygon verzerren, indem die Koordinaten relativ zu einem
+|* Referenzrechteck in ein beliebiges Viereck skaliert werden
+|* Zuordnung der Viereck-Punkte im Polygon zum Referenzrechteck:
+|* 0: links oben 0----1
+|* 1: rechts oben | |
+|* 2: rechts unten 3----2
+|* 3: links unten
+|* Ersterstellung ESO 07.07.95
+|* Letzte Aenderung ESO 07.07.95
+|*
+*************************************************************************/
+
+void XPolyPolygon::Distort(const Rectangle& rRefRect,
+ const XPolygon& rDistortedRect)
+{
+ CheckReference();
+
+ for (USHORT i = 0; i < Count(); i++)
+ pImpXPolyPolygon->aXPolyList.GetObject(i)->Distort(rRefRect,
+ rDistortedRect);
+}
+
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator>>()
+|*
+|* Beschreibung Stream-Leseoperator
+|* Ersterstellung ESO 04.04.95
+|* Letzte Aenderung Joe 10.10.95 64k Begrenzung
+|*
+*************************************************************************/
+
+SvStream& operator>>( SvStream& rIStream, XPolyPolygon& rXPolyPoly )
+{
+ DBG_CHKOBJ( &rXPolyPoly, XPolyPolygon, NULL );
+
+ XPolygon* pXPoly;
+
+ // Anzahl der Polygone einlesen
+ USHORT nXPolyCount;
+ rIStream >> nXPolyCount;
+
+ FASTBOOL bTruncated=FALSE;
+ ULONG nAllPointCount=0; // Gesamtanzahl der Punkte mitzaehlen
+
+ if ( rXPolyPoly.pImpXPolyPolygon->nRefCount > 1 ) {
+ rXPolyPoly.pImpXPolyPolygon->nRefCount--;
+ } else {
+ delete rXPolyPoly.pImpXPolyPolygon;
+ }
+ rXPolyPoly.pImpXPolyPolygon = new ImpXPolyPolygon( nXPolyCount );
+
+ while (nXPolyCount>0) {
+ pXPoly = new XPolygon;
+ rIStream >> *pXPoly;
+ nAllPointCount+=pXPoly->GetPointCount();
+ if (!bTruncated) {
+ if (nAllPointCount>XPOLY_MAXPOINTS) {
+ USHORT nDel=(USHORT)(nAllPointCount-XPOLY_MAXPOINTS);
+ USHORT nPos=pXPoly->GetPointCount()-nDel;
+ pXPoly->Remove(nPos,nDel);
+ bTruncated=TRUE; // Alle nachfolgenden Polygone werden ignoriert
+ }
+ rXPolyPoly.pImpXPolyPolygon->aXPolyList.Insert( pXPoly, LIST_APPEND );
+ } else {
+ delete pXPoly;
+ }
+ nXPolyCount--;
+ }
+
+ if (bTruncated) {
+ // hier koennte man ein Flag am Stream setzen um zu vermerken
+ // dass beim Lesen Informationsverlusst aufgetreten ist !!!!!
+ }
+
+ return rIStream;
+}
+
+/*************************************************************************
+|*
+|* XPolyPolygon::operator<<()
+|*
+|* Beschreibung Stream-Schreiboperator
+|* Ersterstellung ESO 04.04.95
+|* Letzte Aenderung ESO 04.04.95
+|*
+*************************************************************************/
+
+SvStream& operator<<( SvStream& rOStream, const XPolyPolygon& rXPolyPoly )
+{
+ DBG_CHKOBJ( &rXPolyPoly, XPolyPolygon, NULL );
+
+ // Anzahl der Polygone rausschreiben
+ rOStream << rXPolyPoly.Count();
+
+ // Die einzelnen Polygone ausgeben
+ XPolygon* pXPoly = rXPolyPoly.pImpXPolyPolygon->aXPolyList.First();
+
+ while( pXPoly )
+ {
+ rOStream << *pXPoly;
+ pXPoly = rXPolyPoly.pImpXPolyPolygon->aXPolyList.Next();
+ }
+
+ return rOStream;
+}
+
+
diff --git a/svx/source/xoutdev/makefile.mk b/svx/source/xoutdev/makefile.mk
new file mode 100644
index 0000000000..2a632505ed
--- /dev/null
+++ b/svx/source/xoutdev/makefile.mk
@@ -0,0 +1,191 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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=SVX
+PROJECTPCH=xout
+PROJECTPCHSOURCE=xoutpch
+TARGET=xout
+AUTOSEG=true
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+HXX1TARGET = xoutx
+HXX1EXT = hxx
+HXX1FILES = $(INC)$/xoutx.hxx
+HXX1EXCL = -K:*compat.hxx
+
+HXX2TARGET = xattr
+HXX2EXT = hxx
+HXX2FILES = $(INC)$/xattr.hxx
+HXX2EXCL = -K:*compat.hxx
+
+HXX3TARGET = xpoly
+HXX3EXT = hxx
+HXX3FILES = $(INC)$/xpoly.hxx
+HXX3EXCL = -K:*compat.hxx
+
+HXX4TARGET = xtable
+HXX4EXT = hxx
+HXX4FILES = $(INC)$/xtable.hxx
+HXX4EXCL = -K:*compat.hxx
+
+HXX5TARGET = xoutbmp
+HXX5EXT = hxx
+HXX5FILES = $(INC)$/xoutbmp.hxx
+HXX5EXCL = -K:*compat.hxx
+
+HXX6TARGET = xpool
+HXX6EXT = hxx
+HXX6FILES = $(INC)$/xpool.hxx
+HXX6EXCL = -K:*compat.hxx
+
+.IF "$(header)" == ""
+
+CXXFILES= \
+ xcpoly.cxx \
+ xoutpch.cxx \
+ xout.cxx \
+ xout1.cxx \
+ xattr.cxx \
+ xattr2.cxx \
+ xattrbmp.cxx \
+ xline.cxx \
+ xpool.cxx \
+ xtable.cxx \
+ xtabcolr.cxx \
+ xtablend.cxx \
+ xtabdash.cxx \
+ xtabhtch.cxx \
+ xtabgrdt.cxx \
+ xtabbtmp.cxx \
+ xexch.cxx \
+ xiocomp.cxx \
+ _xpoly.cxx \
+ _ximp.cxx \
+ _ximp2.cxx \
+ _xoutbmp.cxx \
+ _xfont.cxx
+
+SLOFILES= \
+ $(SLO)$/xcpoly.obj \
+ $(SLO)$/xout.obj \
+ $(SLO)$/xout1.obj \
+ $(SLO)$/xattr.obj \
+ $(SLO)$/xattr2.obj \
+ $(SLO)$/xattrbmp.obj \
+ $(SLO)$/xline.obj \
+ $(SLO)$/xpool.obj \
+ $(SLO)$/xtable.obj \
+ $(SLO)$/xtabcolr.obj \
+ $(SLO)$/xtablend.obj \
+ $(SLO)$/xtabdash.obj \
+ $(SLO)$/xtabhtch.obj \
+ $(SLO)$/xtabgrdt.obj \
+ $(SLO)$/xtabbtmp.obj \
+ $(SLO)$/xexch.obj \
+ $(SLO)$/xiocomp.obj \
+ $(SLO)$/_xpoly.obj \
+ $(SLO)$/_ximp.obj \
+ $(SLO)$/_xoutbmp.obj \
+ $(SLO)$/_xfont.obj
+
+SVXLIGHTOBJFILES= \
+ $(OBJ)$/xcpoly.obj \
+ $(OBJ)$/xout.obj \
+ $(OBJ)$/xout1.obj \
+ $(OBJ)$/xattr.obj \
+ $(OBJ)$/xattr2.obj \
+ $(OBJ)$/xattrbmp.obj \
+ $(OBJ)$/xline.obj \
+ $(OBJ)$/xpool.obj \
+ $(OBJ)$/xtable.obj \
+ $(OBJ)$/xtabcolr.obj \
+ $(OBJ)$/xtablend.obj \
+ $(OBJ)$/xtabdash.obj \
+ $(OBJ)$/xtabhtch.obj \
+ $(OBJ)$/xtabgrdt.obj \
+ $(OBJ)$/xtabbtmp.obj \
+ $(OBJ)$/xexch.obj \
+ $(OBJ)$/xiocomp.obj \
+ $(OBJ)$/_xpoly.obj \
+ $(OBJ)$/_ximp.obj \
+ $(OBJ)$/_ximp2.obj \
+ $(OBJ)$/_xoutbmp.obj \
+ $(OBJ)$/_xfont.obj
+
+.ENDIF
+
+HXXCOPYFILES=\
+ $(PRJ)$/inc$/xenum.hxx
+
+
+.INCLUDE : target.mk
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
new file mode 100644
index 0000000000..d089a0df32
--- /dev/null
+++ b/svx/source/xoutdev/xattr.cxx
@@ -0,0 +1,4159 @@
+/*************************************************************************
+ *
+ * $RCSfile: xattr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+
+#ifndef _COM_SUN_STAR_DRAWING_HATCH_HPP_
+#include <com/sun/star/drawing/Hatch.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_
+#include <com/sun/star/drawing/LineStyle.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_LINEDASH_HPP_
+#include <com/sun/star/drawing/LineDash.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_DASHSTYLE_HPP_
+#include <com/sun/star/drawing/DashStyle.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_POINT_HPP_
+#include <com/sun/star/awt/Point.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequence.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_FILLSTYLE_HPP_
+#include <com/sun/star/drawing/FillStyle.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_
+#include <com/sun/star/awt/Gradient.hpp>
+#endif
+
+#include <tools/stream.hxx>
+
+#include <tools/bigint.hxx>
+#include <svtools/itemset.hxx>
+#include "dialogs.hrc"
+#include "xattr.hxx"
+#include "xtable.hxx"
+#include "xoutx.hxx"
+#include "dialmgr.hxx"
+#include "itemtype.hxx"
+#include "xdef.hxx"
+#include "unomid.hxx"
+
+#define GLOBALOVERFLOW
+
+/************************************************************************/
+
+#ifdef VCL
+#define VCLTOSVCOL( rCol ) (USHORT)((((USHORT)(rCol))<<8)|(rCol))
+#endif
+
+/************************************************************************/
+
+XubString aNameOrIndexEmptyString;
+
+TYPEINIT1_AUTOFACTORY(NameOrIndex, SfxStringItem);
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+long ScaleMetricValue( long nVal, long nMul, long nDiv )
+{
+ BigInt aVal( nVal );
+
+ aVal *= nMul;
+
+ if ( aVal.IsNeg() != ( nDiv < 0 ) )
+ aVal-=nDiv/2; // fuer korrektes Runden
+ else
+ aVal+=nDiv/2; // fuer korrektes Runden
+
+ aVal/=nDiv;
+
+ return long( aVal );
+}
+
+/*************************************************************************
+|*
+|* NameOrIndex::NameOrIndex(USHORT nWhich, long nIndex)
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+NameOrIndex::NameOrIndex(USHORT nWhich, long nIndex) :
+ SfxStringItem(nWhich, aNameOrIndexEmptyString),
+ nPalIndex(nIndex)
+{
+}
+
+/*************************************************************************
+|*
+|* NameOrIndex::NameOrIndex(USHORT nWhich, const String& rName)
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+NameOrIndex::NameOrIndex(USHORT nWhich, const XubString& rName) :
+ SfxStringItem(nWhich, rName),
+ nPalIndex((long)-1)
+{
+}
+
+/*************************************************************************
+|*
+|* NameOrIndex::NameOrIndex(USHORT nWhich, SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+NameOrIndex::NameOrIndex(USHORT nWhich, SvStream& rIn) :
+ SfxStringItem(nWhich, rIn)
+{
+ rIn >> nPalIndex;
+}
+
+/*************************************************************************
+|*
+|* NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex)
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex) :
+ SfxStringItem(rNameOrIndex),
+ nPalIndex(rNameOrIndex.nPalIndex)
+{
+}
+
+/*************************************************************************
+|*
+|* int NameOrIndex::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+int NameOrIndex::operator==(const SfxPoolItem& rItem) const
+{
+ return ( SfxStringItem::operator==(rItem) &&
+ ((const NameOrIndex&) rItem).nPalIndex == nPalIndex );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* NameOrIndex::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* NameOrIndex::Clone(SfxItemPool* pPool) const
+{
+
+ return new NameOrIndex(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* NameOrIndex::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* NameOrIndex::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new NameOrIndex(Which(), rIn);
+}
+
+/*************************************************************************
+|*
+|* SvStream* NameOrIndex::Store(SvStream& rIn) const
+|*
+|* Beschreibung
+|* Ersterstellung 14.11.94
+|* Letzte Aenderung 14.11.94
+|*
+*************************************************************************/
+
+SvStream& NameOrIndex::Store( SvStream& rOut, USHORT nItemVersion ) const
+{
+ SfxStringItem::Store( rOut, nItemVersion );
+ rOut << (INT32)nPalIndex;
+ return rOut;
+}
+
+// -------------------
+// class XColorItem
+// -------------------
+TYPEINIT1_AUTOFACTORY(XColorItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XColorItem::XColorItem(USHORT nWhich, long nIndex, const Color& rTheColor)
+|*
+\************************************************************************/
+
+XColorItem::XColorItem(USHORT nWhich, long nIndex, const Color& rTheColor) :
+ NameOrIndex(nWhich, nIndex),
+ aColor(rTheColor)
+{
+}
+
+/*************************************************************************
+|*
+|* XColorItem::XColorItem(USHORT nWhich, const String& rName, const Color& rTheColor)
+|*
+\************************************************************************/
+
+XColorItem::XColorItem(USHORT nWhich, const XubString& rName, const Color& rTheColor) :
+ NameOrIndex(nWhich, rName),
+ aColor(rTheColor)
+{
+}
+
+/*************************************************************************
+|*
+|* XColorItem::XColorItem(const XColorItem& rItem)
+|*
+\************************************************************************/
+
+XColorItem::XColorItem(const XColorItem& rItem) :
+ NameOrIndex(rItem),
+ aColor(rItem.aColor)
+{
+}
+
+/*************************************************************************
+|*
+|* XColorItem::XColorItem(USHORT nWhich, SvStream& rIn)
+|*
+\************************************************************************/
+
+XColorItem::XColorItem(USHORT nWhich, SvStream& rIn) :
+ NameOrIndex(nWhich, rIn)
+{
+ if (!IsIndex())
+ {
+ rIn >> aColor;
+ }
+}
+
+/*************************************************************************
+|*
+|* XColorItem::Clone(SfxItemPool* pPool) const
+|*
+\************************************************************************/
+
+SfxPoolItem* XColorItem::Clone(SfxItemPool* pPool) const
+{
+ return new XColorItem(*this);
+}
+
+/*************************************************************************
+|*
+|* int XColorItem::operator==(const SfxPoolItem& rItem) const
+|*
+\************************************************************************/
+
+int XColorItem::operator==(const SfxPoolItem& rItem) const
+{
+ return ( NameOrIndex::operator==(rItem) &&
+ ((const XColorItem&) rItem).aColor == aColor );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XColorItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+\************************************************************************/
+
+SfxPoolItem* XColorItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XColorItem(Which(), rIn);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XColorItem::Store(SvStream& rOut) const
+|*
+\************************************************************************/
+
+SvStream& XColorItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+{
+ NameOrIndex::Store( rOut, nItemVersion );
+
+ if ( !IsIndex() )
+ {
+ rOut << aColor;
+ }
+
+ return rOut;
+}
+
+/*************************************************************************
+|*
+|* const XColor& XColorItem::GetValue(const XColorTable* pTable) const
+|*
+\************************************************************************/
+
+const Color& XColorItem::GetValue(const XColorTable* pTable) const
+{
+ if (!IsIndex())
+ return aColor;
+ else
+ return pTable->Get(GetIndex())->GetColor();
+
+}
+
+sal_Bool XColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue().GetRGBColor();
+ return sal_True;
+}
+
+sal_Bool XColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ rVal >>= nValue;
+ SetValue( nValue );
+
+ return sal_True;
+}
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Linienattribute
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+//---------------------
+// class XLineStyleItem
+//---------------------
+TYPEINIT1_AUTOFACTORY(XLineStyleItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle) :
+ SfxEnumItem(XATTR_LINESTYLE, eTheLineStyle)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineStyleItem::XLineStyleItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineStyleItem::XLineStyleItem(SvStream& rIn) :
+ SfxEnumItem(XATTR_LINESTYLE, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineStyleItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 09.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineStyleItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineStyleItem( *this );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineStyleItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineStyleItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ {
+ USHORT nId = 0;
+
+ switch( (USHORT)GetValue() )
+ {
+ case XLINE_NONE:
+ nId = RID_SVXSTR_INVISIBLE;
+ break;
+ case XLINE_SOLID:
+ nId = RID_SVXSTR_SOLID;
+ break;
+ }
+
+ if ( nId )
+ rText = SVX_RESSTR( nId );
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool XLineStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ ::com::sun::star::drawing::LineStyle eLS = (::com::sun::star::drawing::LineStyle)GetValue();
+ rVal <<= eLS;
+ return sal_True;
+}
+
+sal_Bool XLineStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ ::com::sun::star::drawing::LineStyle eLS;
+ if(!(rVal >>= eLS ))
+ return sal_False;
+
+ SetValue( (XLineStyle)eLS );
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+USHORT XLineStyleItem::GetValueCount() const
+{
+ return 3;
+}
+
+
+// ------------
+// class XDash
+// ------------
+/*************************************************************************
+|*
+|* XDash::XDash(XDashStyle, USHORT, ULONG, USHORT, ULONG, ULONG)
+|*
+|* Beschreibung
+|* Ersterstellung 21.11.94
+|* Letzte Aenderung 21.11.94
+|*
+*************************************************************************/
+
+XDash::XDash(XDashStyle eTheDash, USHORT nTheDots, ULONG nTheDotLen,
+ USHORT nTheDashes, ULONG nTheDashLen, ULONG nTheDistance) :
+ eDash(eTheDash),
+ nDots(nTheDots),
+ nDotLen(nTheDotLen),
+ nDashes(nTheDashes),
+ nDashLen(nTheDashLen),
+ nDistance(nTheDistance)
+{
+}
+
+/*************************************************************************
+|*
+|* int XDash::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 29.11.94
+|* Letzte Aenderung 29.11.94
+|*
+*************************************************************************/
+
+int XDash::operator==(const XDash& rDash) const
+{
+ return ( eDash == rDash.eDash &&
+ nDots == rDash.nDots &&
+ nDotLen == rDash.nDotLen &&
+ nDashes == rDash.nDashes &&
+ nDashLen == rDash.nDashLen &&
+ nDistance == rDash.nDistance );
+}
+
+
+// -------------------
+// class XLineDashItem
+// -------------------
+TYPEINIT1_AUTOFACTORY(XLineDashItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XLineDashItem::XLineDashItem(long nIndex, const XDash& rTheDash)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineDashItem::XLineDashItem(long nIndex, const XDash& rTheDash) :
+ NameOrIndex(XATTR_LINEDASH, nIndex),
+ aDash(rTheDash)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineDashItem::XLineDashItem(const String& rName, const XDash& rTheDash)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineDashItem::XLineDashItem(const XubString& rName, const XDash& rTheDash) :
+ NameOrIndex(XATTR_LINEDASH, rName),
+ aDash(rTheDash)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineDashItem::XLineDashItem(const XLineDashItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineDashItem::XLineDashItem(const XLineDashItem& rItem) :
+ NameOrIndex(rItem),
+ aDash(rItem.aDash)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineDashItem::XLineDashItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineDashItem::XLineDashItem(SvStream& rIn) :
+ NameOrIndex(XATTR_LINEDASH, rIn)
+{
+ if (!IsIndex())
+ {
+ USHORT nSTemp;
+ UINT32 nLTemp;
+ INT32 nITemp;
+
+ rIn >> nITemp; aDash.SetDashStyle((XDashStyle)nITemp);
+ rIn >> nSTemp; aDash.SetDots(nSTemp);
+ rIn >> nLTemp; aDash.SetDotLen(nLTemp);
+ rIn >> nSTemp; aDash.SetDashes(nSTemp);
+ rIn >> nLTemp; aDash.SetDashLen(nLTemp);
+ rIn >> nLTemp; aDash.SetDistance(nLTemp);
+ }
+}
+
+/*************************************************************************
+|*
+|* XLineDashItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineDashItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineDashItem(*this);
+}
+
+/*************************************************************************
+|*
+|* int XLineDashItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+int XLineDashItem::operator==(const SfxPoolItem& rItem) const
+{
+ return ( NameOrIndex::operator==(rItem) &&
+ aDash == ((const XLineDashItem&) rItem).aDash );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineDashItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineDashItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineDashItem(rIn);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineDashItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SvStream& XLineDashItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+{
+ NameOrIndex::Store( rOut, nItemVersion );
+
+ if (!IsIndex())
+ {
+ rOut << (INT32) aDash.GetDashStyle();
+ rOut << aDash.GetDots();
+ rOut << (UINT32) aDash.GetDotLen();
+ rOut << aDash.GetDashes();
+ rOut << (UINT32) aDash.GetDashLen();
+ rOut << (UINT32) aDash.GetDistance();
+ }
+
+ return rOut;
+}
+
+/*************************************************************************
+|*
+|* const XDash& XLineDashItem::GetValue(const XDashTable* pTable) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+const XDash& XLineDashItem::GetValue(const XDashTable* pTable) const
+{
+ if (!IsIndex())
+ return aDash;
+ else
+ return pTable->Get(GetIndex())->GetDash();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineDashItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetName();
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+FASTBOOL XLineDashItem::HasMetrics() const
+{
+ return TRUE;
+}
+
+//------------------------------------------------------------------------
+
+FASTBOOL XLineDashItem::ScaleMetrics(long nMul, long nDiv)
+{
+ aDash.SetDotLen( ScaleMetricValue( aDash.GetDotLen(), nMul, nDiv ) );
+ aDash.SetDashLen( ScaleMetricValue( aDash.GetDashLen(), nMul, nDiv ) );
+ aDash.SetDistance( ScaleMetricValue( aDash.GetDistance(), nMul, nDiv ) );
+ return TRUE;
+}
+
+sal_Bool XLineDashItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ const XDash& rXD = GetValue();
+
+ ::com::sun::star::drawing::LineDash aLineDash;
+
+ aLineDash.Style = (::com::sun::star::drawing::DashStyle)((UINT16)rXD.GetDashStyle());
+ aLineDash.Dots = rXD.GetDots();
+ aLineDash.DotLen = rXD.GetDotLen();
+ aLineDash.Dashes = rXD.GetDashes();
+ aLineDash.DashLen = rXD.GetDashLen();
+ aLineDash.Distance = rXD.GetDistance();
+
+ rVal <<= aLineDash;
+
+ return sal_True;
+}
+
+sal_Bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ ::com::sun::star::drawing::LineDash aLineDash;
+ if(!(rVal >>= aLineDash))
+ return sal_False;
+
+ XDash aXDash;
+
+ aXDash.SetDashStyle((XDashStyle)((UINT16)(aLineDash.Style)));
+ aXDash.SetDots(aLineDash.Dots);
+ aXDash.SetDotLen(aLineDash.DotLen);
+ aXDash.SetDashes(aLineDash.Dashes);
+ aXDash.SetDashLen(aLineDash.DashLen);
+ aXDash.SetDistance(aLineDash.Distance);
+
+ SetValue( aXDash );
+ return sal_True;
+}
+
+
+// -------------------
+// class XLineWidthItem
+// -------------------
+TYPEINIT1_AUTOFACTORY(XLineWidthItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XLineWidthItem::XLineWidthItem(long nWidth)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+XLineWidthItem::XLineWidthItem(long nWidth) :
+ SfxMetricItem(XATTR_LINEWIDTH, nWidth)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineWidthItem::XLineWidthItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineWidthItem::XLineWidthItem(SvStream& rIn) :
+ SfxMetricItem(XATTR_LINEWIDTH, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineWidthItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineWidthItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineWidthItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineWidthItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineWidthItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetMetricText( (long) GetValue(),
+ eCoreUnit, ePresUnit);
+ rText += SVX_RESSTR( GetMetricId( ePresUnit) );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool XLineWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+sal_Bool XLineWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ rVal >>= nValue;
+
+ SetValue( nValue );
+ return sal_True;
+}
+
+// -------------------
+// class XLineColorItem
+// -------------------
+TYPEINIT1_AUTOFACTORY(XLineColorItem, XColorItem);
+
+/*************************************************************************
+|*
+|* XLineColorItem::XLineColorItem(long nIndex, const Color& rTheColor)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineColorItem::XLineColorItem(long nIndex, const Color& rTheColor) :
+ XColorItem(XATTR_LINECOLOR, nIndex, rTheColor)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor) :
+ XColorItem(XATTR_LINECOLOR, rName, rTheColor)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineColorItem::XLineColorItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineColorItem::XLineColorItem(SvStream& rIn) :
+ XColorItem(XATTR_LINECOLOR, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineColorItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineColorItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineColorItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineColorItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineColorItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineColorItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineColorItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetName();
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool XLineColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue().GetRGBColor();
+ return sal_True;
+}
+
+sal_Bool XLineColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue))
+ return sal_False;
+
+ SetValue( nValue );
+ return sal_True;
+}
+
+// -----------------------
+// class XLineStartItem
+// -----------------------
+TYPEINIT1_AUTOFACTORY(XLineStartItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XLineStartItem::XLineStartItem(long nIndex)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+XLineStartItem::XLineStartItem(long nIndex) :
+ NameOrIndex(XATTR_LINESTART, nIndex)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineStartItem::XLineStartItem(const XubString& rName,
+|* const XPolygon& rXPolygon)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+XLineStartItem::XLineStartItem(const XubString& rName,
+ const XPolygon& rXPolygon):
+ NameOrIndex(XATTR_LINESTART, rName),
+ aXPolygon(rXPolygon)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineStartItem::XLineStartItem(const XLineStartItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+XLineStartItem::XLineStartItem(const XLineStartItem& rItem) :
+ NameOrIndex(rItem),
+ aXPolygon(rItem.aXPolygon)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineStartItem::XLineStartItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+XLineStartItem::XLineStartItem(SvStream& rIn) :
+ NameOrIndex(XATTR_LINESTART, rIn)
+{
+ if (!IsIndex())
+ {
+ UINT32 nPoints;
+ INT32 nFlags;
+ rIn >> nPoints;
+ aXPolygon.SetSize((USHORT)nPoints);
+ for (USHORT nIndex = 0; nIndex < (USHORT)nPoints; nIndex++)
+ {
+ rIn >> aXPolygon[nIndex].X();
+ rIn >> aXPolygon[nIndex].Y();
+ rIn >> nFlags; aXPolygon.SetFlags(nIndex, (XPolyFlags)nFlags);
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* XLineStartItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineStartItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineStartItem(*this);
+}
+
+/*************************************************************************
+|*
+|* int XLineStartItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+int XLineStartItem::operator==(const SfxPoolItem& rItem) const
+{
+ return ( NameOrIndex::operator==(rItem) &&
+ ((const XLineStartItem&) rItem).aXPolygon == aXPolygon );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineStartItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineStartItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineStartItem(rIn);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineStartItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+SvStream& XLineStartItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+{
+ NameOrIndex::Store( rOut, nItemVersion );
+
+ if (!IsIndex())
+ {
+ UINT32 nPoints = (UINT32)aXPolygon.GetPointCount();
+ rOut << nPoints;
+ for (USHORT nIndex = 0; nIndex < (USHORT)nPoints; nIndex++)
+ {
+ rOut << aXPolygon[nIndex].X();
+ rOut << aXPolygon[nIndex].Y();
+ rOut << (INT32)aXPolygon.GetFlags(nIndex);
+ }
+ }
+
+ return rOut;
+}
+
+/*************************************************************************
+|*
+|* const XPolygon& XLineStartItem::GetValue(const XLineEndTable* pTable)
+|* const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+const XPolygon& XLineStartItem::GetValue(const XLineEndTable* pTable) const
+{
+ if (!IsIndex())
+ return aXPolygon;
+ else
+ return pTable->Get(GetIndex())->GetLineEnd();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineStartItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetName();
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool XLineStartItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ if( nMemberId == MID_NAME )
+ {
+ rVal <<= ::rtl::OUString( GetName() );
+ }
+ else
+ {
+ rVal.clear();
+
+ const UINT16 nCount = aXPolygon.GetPointCount();
+ if( nCount != 0 )
+ {
+ ::com::sun::star::drawing::PointSequence aLineStartEnd(nCount);
+
+ ::com::sun::star::awt::Point* pMemAddr = aLineStartEnd.getArray();
+
+ // XPolygon aXPolygon in aLineStartEnd kopieren
+ for(UINT16 a=0;a<nCount;a++)
+ *pMemAddr++ = ::com::sun::star::awt::Point( aXPolygon[a].X(), aXPolygon[a].Y() );
+
+
+ rVal <<= aLineStartEnd;
+ }
+ }
+
+ return sal_True;
+}
+
+sal_Bool XLineStartItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ if( !rVal.hasValue() )
+ {
+ aXPolygon.SetSize( 0 );
+ }
+ else
+ {
+ ::com::sun::star::drawing::PointSequence aLinePolygon;
+ if(!(rVal >>= aLinePolygon))
+ return sal_False;
+
+ sal_Int32 nPointCount = aLinePolygon.getLength();
+
+ aXPolygon.SetSize((UINT16)nPointCount);
+ ::com::sun::star::awt::Point* pMemAddr = aLinePolygon.getArray();
+
+ for(UINT32 a=0;a<nPointCount;a++)
+ {
+ aXPolygon[a] = Point( pMemAddr->X, pMemAddr->Y );
+ pMemAddr++;
+ }
+ }
+
+ return sal_False;
+}
+
+
+// ---------------------
+// class XLineEndItem
+// ---------------------
+TYPEINIT1_AUTOFACTORY(XLineEndItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XLineEndItem::XLineEndItem(long nIndex)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+XLineEndItem::XLineEndItem(long nIndex) :
+ NameOrIndex(XATTR_LINEEND, nIndex)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineEndItem::XLineEndItem(const XubString& rName,
+|* const XPolygon& rXPolygon)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+XLineEndItem::XLineEndItem(const XubString& rName, const XPolygon& rPolygon) :
+ NameOrIndex(XATTR_LINEEND, rName),
+ aXPolygon(rPolygon)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineEndItem::XLineEndItem(const XLineEndItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+XLineEndItem::XLineEndItem(const XLineEndItem& rItem) :
+ NameOrIndex(rItem),
+ aXPolygon(rItem.aXPolygon)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineEndItem::XLineEndItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+XLineEndItem::XLineEndItem(SvStream& rIn) :
+ NameOrIndex(XATTR_LINEEND, rIn)
+{
+ if (!IsIndex())
+ {
+ UINT32 nPoints;
+ INT32 nFlags;
+ rIn >> nPoints;
+ aXPolygon.SetSize((USHORT)nPoints);
+ for (USHORT nIndex = 0; nIndex < (USHORT)nPoints; nIndex++)
+ {
+ rIn >> aXPolygon[nIndex].X();
+ rIn >> aXPolygon[nIndex].Y();
+ rIn >> nFlags; aXPolygon.SetFlags(nIndex, (XPolyFlags)nFlags);
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* XLineEndItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineEndItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineEndItem(*this);
+}
+
+/*************************************************************************
+|*
+|* int XLineEndItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+int XLineEndItem::operator==(const SfxPoolItem& rItem) const
+{
+ return ( NameOrIndex::operator==(rItem) &&
+ ((const XLineEndItem&) rItem).aXPolygon == aXPolygon );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineEndItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineEndItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineEndItem(rIn);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineEndItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+SvStream& XLineEndItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+{
+ NameOrIndex::Store( rOut, nItemVersion );
+
+ if (!IsIndex())
+ {
+ UINT32 nPoints = (UINT32)aXPolygon.GetPointCount();
+ rOut << nPoints;
+ for (USHORT nIndex = 0; nIndex < (USHORT)nPoints; nIndex++)
+ {
+ rOut << aXPolygon[nIndex].X();
+ rOut << aXPolygon[nIndex].Y();
+ rOut << (INT32)aXPolygon.GetFlags(nIndex);
+ }
+ }
+
+ return rOut;
+}
+
+/*************************************************************************
+|*
+|* const XPolygon& XLineEndItem::GetValue(const XLineEndTable* pTable) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+const XPolygon& XLineEndItem::GetValue(const XLineEndTable* pTable) const
+{
+ if (!IsIndex())
+ return aXPolygon;
+ else
+ return pTable->Get(GetIndex())->GetLineEnd();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineEndItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetName();
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool XLineEndItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ if( nMemberId == MID_NAME )
+ {
+ rVal <<= ::rtl::OUString( GetName() );
+ }
+ else
+ {
+ rVal.clear();
+
+ const UINT16 nCount = aXPolygon.GetPointCount();
+ if( nCount != 0 )
+ {
+ ::com::sun::star::drawing::PointSequence aLineStartEnd(nCount);
+
+ ::com::sun::star::awt::Point* pMemAddr = aLineStartEnd.getArray();
+
+ // XPolygon aXPolygon in aLineStartEnd kopieren
+ for(UINT16 a=0;a<nCount;a++)
+ {
+ *pMemAddr++ = ::com::sun::star::awt::Point( aXPolygon[a].X(), aXPolygon[a].Y() );
+ }
+
+ rVal <<= aLineStartEnd;
+ }
+ }
+
+ return sal_True;
+}
+
+sal_Bool XLineEndItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ if( !rVal.hasValue() )
+ {
+ aXPolygon.SetSize( 0 );
+ }
+ else
+ {
+ ::com::sun::star::drawing::PointSequence aLinePolygon;
+ if(!(rVal >>= aLinePolygon))
+ return sal_False;
+
+ sal_Int32 nPointCount = aLinePolygon.getLength();
+
+ aXPolygon.SetSize((UINT16)nPointCount);
+ ::com::sun::star::awt::Point* pMemAddr = aLinePolygon.getArray();
+
+ for(UINT32 a=0;a<nPointCount;a++)
+ {
+ aXPolygon[a] = Point( pMemAddr->X, pMemAddr->Y );
+ pMemAddr++;
+ }
+ }
+
+ return sal_True;
+}
+
+
+// ----------------------------
+// class XLineStartWidthItem
+// ----------------------------
+TYPEINIT1_AUTOFACTORY(XLineStartWidthItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XLineStartWidthItem::XLineStartWidthItem(long nWidth)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+XLineStartWidthItem::XLineStartWidthItem(long nWidth) :
+ SfxMetricItem(XATTR_LINESTARTWIDTH, nWidth)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn) :
+ SfxMetricItem(XATTR_LINESTARTWIDTH, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineStartWidthItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineStartWidthItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineStartWidthItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineStartWidthItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineStartWidthItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetMetricText( (long) GetValue(),
+ eCoreUnit, ePresUnit);
+ rText += SVX_RESSTR( GetMetricId( ePresUnit) );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool XLineStartWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+sal_Bool XLineStartWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ rVal >>= nValue;
+ SetValue( nValue );
+ return sal_True;
+}
+
+
+
+// --------------------------
+// class XLineEndWidthItem
+// --------------------------
+TYPEINIT1_AUTOFACTORY(XLineEndWidthItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XLineEndWidthItem::XLineEndWidthItem(long nWidth)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineEndWidthItem::XLineEndWidthItem(long nWidth) :
+ SfxMetricItem(XATTR_LINEENDWIDTH, nWidth)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn) :
+ SfxMetricItem(XATTR_LINEENDWIDTH, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineEndWidthItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineEndWidthItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineEndWidthItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineEndWidthItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineEndWidthItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetMetricText( (long) GetValue(),
+ eCoreUnit, ePresUnit);
+ rText += SVX_RESSTR( GetMetricId( ePresUnit) );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool XLineEndWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue();
+ return sal_True;
+}
+
+sal_Bool XLineEndWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ rVal >>= nValue;
+ SetValue( nValue );
+ return sal_True;
+}
+
+
+// -----------------------------
+// class XLineStartCenterItem
+// -----------------------------
+TYPEINIT1_AUTOFACTORY(XLineStartCenterItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XLineStartCenterItem::XLineStartCenterItem(BOOL bStartCenter)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineStartCenterItem::XLineStartCenterItem(BOOL bStartCenter) :
+ SfxBoolItem(XATTR_LINESTARTCENTER, bStartCenter)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn) :
+ SfxBoolItem(XATTR_LINESTARTCENTER, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineStartCenterItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineStartCenterItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineStartCenterItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineStartCenterItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineStartCenterItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = XubString( ResId( GetValue() ? RID_SVXSTR_CENTERED :
+ RID_SVXSTR_NOTCENTERED, DIALOG_MGR() ) );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool XLineStartCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ sal_Bool bValue = GetValue();
+ rVal.setValue( &bValue, ::getCppuBooleanType() );
+ return sal_True;
+}
+
+sal_Bool XLineStartCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ if( !rVal.hasValue() || rVal.getValueType() != ::getCppuBooleanType() )
+ return sal_False;
+
+ SetValue( *(sal_Bool*)rVal.getValue() );
+ return sal_True;
+}
+
+
+// ---------------------------
+// class XLineEndCenterItem
+// ---------------------------
+TYPEINIT1_AUTOFACTORY(XLineEndCenterItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XLineEndCenterItem::XLineEndCenterItem(BOOL bEndCenter)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineEndCenterItem::XLineEndCenterItem(BOOL bEndCenter) :
+ SfxBoolItem(XATTR_LINEENDCENTER, bEndCenter)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn) :
+ SfxBoolItem(XATTR_LINEENDCENTER, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineEndCenterItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineEndCenterItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineEndCenterItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineEndCenterItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineEndCenterItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = XubString( ResId( GetValue() ? RID_SVXSTR_CENTERED :
+ RID_SVXSTR_NOTCENTERED, DIALOG_MGR() ) );
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+sal_Bool XLineEndCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ sal_Bool bValue = GetValue();
+ rVal.setValue( &bValue, ::getCppuBooleanType() );
+ return sal_True;
+}
+
+BOOL XLineEndCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ if( !rVal.hasValue() || rVal.getValueType() != ::getCppuBooleanType() )
+ return sal_False;
+
+ SetValue( *(sal_Bool*)rVal.getValue() );
+ return sal_True;
+}
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Fuellattribute
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+// --------------------
+// class XFillStyleItem
+// --------------------
+TYPEINIT1_AUTOFACTORY(XFillStyleItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle) :
+ SfxEnumItem(XATTR_FILLSTYLE, eFillStyle)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillStyleItem::XFillStyleItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillStyleItem::XFillStyleItem(SvStream& rIn) :
+ SfxEnumItem(XATTR_FILLSTYLE, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillStyleItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.94
+|* Letzte Aenderung 09.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillStyleItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFillStyleItem( *this );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFillStyleItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XFillStyleItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ USHORT nId = 0;
+
+ switch( (USHORT)GetValue() )
+ {
+ case XFILL_NONE:
+ nId = RID_SVXSTR_INVISIBLE;
+ break;
+ case XFILL_SOLID:
+ nId = RID_SVXSTR_SOLID;
+ break;
+ case XFILL_GRADIENT:
+ nId = RID_SVXSTR_GRADIENT;
+ break;
+ case XFILL_HATCH:
+ nId = RID_SVXSTR_HATCH;
+ break;
+ case XFILL_BITMAP:
+ nId = RID_SVXSTR_BITMAP;
+ break;
+ }
+
+ if ( nId )
+ rText = SVX_RESSTR( nId );
+ return ePres;
+ }
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+USHORT XFillStyleItem::GetValueCount() const
+{
+ return 5;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool XFillStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ ::com::sun::star::drawing::FillStyle eFS = (::com::sun::star::drawing::FillStyle)GetValue();
+
+ rVal <<= eFS;
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool XFillStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ ::com::sun::star::drawing::FillStyle eFS;
+ if(!(rVal >>= eFS))
+ return sal_False;
+
+ SetValue( (XFillStyle)eFS );
+
+ return sal_True;
+}
+
+
+// -------------------
+// class XFillColorItem
+// -------------------
+TYPEINIT1_AUTOFACTORY(XFillColorItem, XColorItem);
+
+/*************************************************************************
+|*
+|* XFillColorItem::XFillColorItem(long nIndex, const Color& rTheColor)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillColorItem::XFillColorItem(long nIndex, const Color& rTheColor) :
+ XColorItem(XATTR_FILLCOLOR, nIndex, rTheColor)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor) :
+ XColorItem(XATTR_FILLCOLOR, rName, rTheColor)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillColorItem::XFillColorItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillColorItem::XFillColorItem(SvStream& rIn) :
+ XColorItem(XATTR_FILLCOLOR, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillColorItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillColorItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFillColorItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillColorItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillColorItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFillColorItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XFillColorItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetName();
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool XFillColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ rVal <<= (sal_Int32)GetValue().GetRGBColor();
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool XFillColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ sal_Int32 nValue;
+ if(!(rVal >>= nValue ))
+ return sal_False;
+
+ SetValue( nValue );
+ return sal_True;
+}
+
+
+
+// ----------------
+// class XGradient
+// ----------------
+
+/*************************************************************************
+|*
+|* XGradient::XGradient(XGradientStyle, const Color&, const Color&,
+|* long, USHORT, USHORT, USHORT)
+|*
+|* Beschreibung
+|* Ersterstellung 21.11.94
+|* Letzte Aenderung 21.11.94
+|*
+*************************************************************************/
+
+XGradient::XGradient(const Color& rStart, const Color& rEnd,
+ XGradientStyle eTheStyle, long nTheAngle, USHORT nXOfs,
+ USHORT nYOfs, USHORT nTheBorder,
+ USHORT nStartIntens, USHORT nEndIntens,
+ USHORT nSteps) :
+ aStartColor(rStart),
+ aEndColor(rEnd),
+ eStyle(eTheStyle),
+ nAngle(nTheAngle),
+ nBorder(nTheBorder),
+ nOfsX(nXOfs),
+ nOfsY(nYOfs),
+ nIntensStart(nStartIntens),
+ nIntensEnd(nEndIntens),
+ nStepCount(nSteps)
+{
+}
+
+/*************************************************************************
+|*
+|* int XGradient::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 29.11.94
+|* Letzte Aenderung 29.11.94
+|*
+*************************************************************************/
+
+int XGradient::operator==(const XGradient& rGradient) const
+{
+ return ( eStyle == rGradient.eStyle &&
+ aStartColor == rGradient.aStartColor &&
+ aEndColor == rGradient.aEndColor &&
+ nAngle == rGradient.nAngle &&
+ nBorder == rGradient.nBorder &&
+ nOfsX == rGradient.nOfsX &&
+ nOfsY == rGradient.nOfsY &&
+ nIntensStart == rGradient.nIntensStart &&
+ nIntensEnd == rGradient.nIntensEnd &&
+ nStepCount == rGradient.nStepCount );
+}
+
+
+// -----------------------
+// class XFillGradientItem
+// -----------------------
+TYPEINIT1_AUTOFACTORY(XFillGradientItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XFillGradientItem::XFillGradientItem(long nIndex,
+|* const XGradient& rTheGradient)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillGradientItem::XFillGradientItem(long nIndex,
+ const XGradient& rTheGradient) :
+ NameOrIndex(XATTR_FILLGRADIENT, nIndex),
+ aGradient(rTheGradient)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillGradientItem::XFillGradientItem(const XubString& rName,
+|* const XGradient& rTheGradient)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillGradientItem::XFillGradientItem(const XubString& rName,
+ const XGradient& rTheGradient) :
+ NameOrIndex(XATTR_FILLGRADIENT, rName),
+ aGradient(rTheGradient)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem) :
+ NameOrIndex(rItem),
+ aGradient(rItem.aGradient)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillGradientItem::XFillGradientItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillGradientItem::XFillGradientItem(SvStream& rIn, USHORT nVer) :
+ NameOrIndex(XATTR_FILLGRADIENT, rIn),
+ aGradient(COL_BLACK, COL_WHITE)
+{
+ if (!IsIndex())
+ {
+ USHORT nUSTemp;
+ USHORT nRed;
+ USHORT nGreen;
+ USHORT nBlue;
+ INT16 nITemp;
+ INT32 nLTemp;
+
+ rIn >> nITemp; aGradient.SetGradientStyle((XGradientStyle)nITemp);
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+#ifdef VCL
+ Color aCol;
+ aCol = Color( (BYTE)( nRed >> 8 ), (BYTE)( nGreen >> 8 ), (BYTE)( nBlue >> 8 ) );
+#else
+ Color aCol( COL_USER );
+ aCol = Color( nRed, nGreen, nBlue );
+ aCol.SetColorName(COL_USER);
+#endif
+ aGradient.SetStartColor( aCol );
+
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+#ifdef VCL
+ aCol = Color( (BYTE)( nRed >> 8 ), (BYTE)( nGreen >> 8 ), (BYTE)( nBlue >> 8 ) );
+#else
+ aCol = Color( nRed, nGreen, nBlue );
+ aCol.SetColorName(COL_USER);
+#endif
+ aGradient.SetEndColor(aCol);
+ rIn >> nLTemp; aGradient.SetAngle(nLTemp);
+ rIn >> nUSTemp; aGradient.SetBorder(nUSTemp);
+ rIn >> nUSTemp; aGradient.SetXOffset(nUSTemp);
+ rIn >> nUSTemp; aGradient.SetYOffset(nUSTemp);
+ rIn >> nUSTemp; aGradient.SetStartIntens(nUSTemp);
+ rIn >> nUSTemp; aGradient.SetEndIntens(nUSTemp);
+
+ // bei neueren Versionen wird zusaetzlich
+ // die Schrittweite mit eingelesen
+ if (nVer >= 1)
+ {
+ rIn >> nUSTemp; aGradient.SetSteps(nUSTemp);
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* XFillGradientItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillGradientItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFillGradientItem(*this);
+}
+
+/*************************************************************************
+|*
+|* int XFillGradientItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+int XFillGradientItem::operator==(const SfxPoolItem& rItem) const
+{
+ return ( NameOrIndex::operator==(rItem) &&
+ aGradient == ((const XFillGradientItem&) rItem).aGradient );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFillGradientItem(rIn, nVer);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillGradientItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SvStream& XFillGradientItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+{
+ NameOrIndex::Store( rOut, nItemVersion );
+
+ if (!IsIndex())
+ {
+ rOut << (INT16)aGradient.GetGradientStyle();
+
+#ifdef VCL
+ USHORT nTmp;
+
+ nTmp = VCLTOSVCOL( aGradient.GetStartColor().GetRed() ); rOut << nTmp;
+ nTmp = VCLTOSVCOL( aGradient.GetStartColor().GetGreen() ); rOut << nTmp;
+ nTmp = VCLTOSVCOL( aGradient.GetStartColor().GetBlue() ); rOut << nTmp;
+ nTmp = VCLTOSVCOL( aGradient.GetEndColor().GetRed() ); rOut << nTmp;
+ nTmp = VCLTOSVCOL( aGradient.GetEndColor().GetGreen() ); rOut << nTmp;
+ nTmp = VCLTOSVCOL( aGradient.GetEndColor().GetBlue() ); rOut << nTmp;
+#else
+ rOut << aGradient.GetStartColor().GetRed();
+ rOut << aGradient.GetStartColor().GetGreen();
+ rOut << aGradient.GetStartColor().GetBlue();
+ rOut << aGradient.GetEndColor().GetRed();
+ rOut << aGradient.GetEndColor().GetGreen();
+ rOut << aGradient.GetEndColor().GetBlue();
+#endif
+
+ rOut << (INT32) aGradient.GetAngle();
+ rOut << aGradient.GetBorder();
+ rOut << aGradient.GetXOffset();
+ rOut << aGradient.GetYOffset();
+ rOut << aGradient.GetStartIntens();
+ rOut << aGradient.GetEndIntens();
+ rOut << aGradient.GetSteps();
+ }
+
+ return rOut;
+}
+
+/*************************************************************************
+|*
+|* const XGradient& XFillGradientItem::GetValue(const XGradientTable* pTable)
+|* const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+const XGradient& XFillGradientItem::GetValue(const XGradientTable* pTable) const
+{
+ if (!IsIndex())
+ return aGradient;
+ else
+ return pTable->Get(GetIndex())->GetGradient();
+}
+
+
+/*************************************************************************
+|*
+|* USHORT XFillGradientItem::GetVersion() const
+|*
+|* Beschreibung
+|* Ersterstellung 01.11.95
+|* Letzte Aenderung 01.11.95
+|*
+*************************************************************************/
+
+USHORT XFillGradientItem::GetVersion( USHORT nFileFormatVersion ) const
+{
+ // !!! this version number also represents the version number of superclasses
+ // !!! (e.g. XFillFloatTransparenceItem); if you make any changes here,
+ // !!! the superclass is also affected
+ return 1;
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XFillGradientItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetName();
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ if( nMemberId == MID_NAME )
+ {
+ rVal <<= ::rtl::OUString( GetName() );
+ }
+ else
+ {
+ const XGradient& aXGradient = GetValue();
+ ::com::sun::star::awt::Gradient aGradient;
+
+ aGradient.Style = (::com::sun::star::awt::GradientStyle) aXGradient.GetGradientStyle();
+ aGradient.StartColor = (INT32)aXGradient.GetStartColor().GetColor();
+ aGradient.EndColor = (INT32)aXGradient.GetEndColor().GetColor();
+ aGradient.Angle = aXGradient.GetAngle();
+ aGradient.Border = aXGradient.GetBorder();
+ aGradient.XOffset = aXGradient.GetXOffset();
+ aGradient.YOffset = aXGradient.GetYOffset();
+ aGradient.StartIntensity = aXGradient.GetStartIntens();
+ aGradient.EndIntensity = aXGradient.GetEndIntens();
+ aGradient.StepCount = aXGradient.GetSteps();
+
+ rVal <<= aGradient;
+ }
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ ::com::sun::star::awt::Gradient aGradient;
+ if(!(rVal >>= aGradient))
+ return sal_False;
+
+ XGradient aXGradient;
+
+ aXGradient.SetGradientStyle( (XGradientStyle) aGradient.Style );
+ aXGradient.SetStartColor( aGradient.StartColor );
+ aXGradient.SetEndColor( aGradient.EndColor );
+ aXGradient.SetAngle( aGradient.Angle );
+ aXGradient.SetBorder( aGradient.Border );
+ aXGradient.SetXOffset( aGradient.XOffset );
+ aXGradient.SetYOffset( aGradient.YOffset );
+ aXGradient.SetStartIntens( aGradient.StartIntensity );
+ aXGradient.SetEndIntens( aGradient.EndIntensity );
+ aXGradient.SetSteps( aGradient.StepCount );
+
+ SetValue( aXGradient );
+
+ return sal_True;
+}
+
+// ----------------------------------
+// class XFillFloatTransparenceItem -
+// ----------------------------------
+
+TYPEINIT1_AUTOFACTORY( XFillFloatTransparenceItem, XFillGradientItem );
+
+// -----------------------------------------------------------------------------
+
+XFillFloatTransparenceItem::XFillFloatTransparenceItem() :
+ bEnabled( FALSE )
+{
+ SetWhich( XATTR_FILLFLOATTRANSPARENCE );
+}
+
+//------------------------------------------------------------------------
+
+XFillFloatTransparenceItem::XFillFloatTransparenceItem( long nIndex, const XGradient& rGradient, BOOL bEnable ) :
+ XFillGradientItem ( nIndex, rGradient ),
+ bEnabled ( bEnable )
+{
+ SetWhich( XATTR_FILLFLOATTRANSPARENCE );
+}
+
+//------------------------------------------------------------------------
+
+XFillFloatTransparenceItem::XFillFloatTransparenceItem(const XubString& rName, const XGradient& rGradient, BOOL bEnable ) :
+ XFillGradientItem ( rName, rGradient ),
+ bEnabled ( bEnable )
+{
+ SetWhich( XATTR_FILLFLOATTRANSPARENCE );
+}
+
+//------------------------------------------------------------------------
+
+XFillFloatTransparenceItem::XFillFloatTransparenceItem( const XFillFloatTransparenceItem& rItem ) :
+ XFillGradientItem ( rItem ),
+ bEnabled ( rItem.bEnabled )
+{
+ SetWhich( XATTR_FILLFLOATTRANSPARENCE );
+}
+
+//------------------------------------------------------------------------
+
+XFillFloatTransparenceItem::XFillFloatTransparenceItem( SvStream& rIn, USHORT nVer ) :
+ XFillGradientItem ( rIn, nVer )
+{
+ SetWhich( XATTR_FILLFLOATTRANSPARENCE );
+ rIn >> bEnabled;
+}
+
+//------------------------------------------------------------------------
+
+int XFillFloatTransparenceItem::operator==( const SfxPoolItem& rItem ) const
+{
+ return( XFillGradientItem::operator==( rItem ) &&
+ bEnabled == ( (XFillFloatTransparenceItem&) rItem ).bEnabled );
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* XFillFloatTransparenceItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillFloatTransparenceItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* XFillFloatTransparenceItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return( ( 0 == nVer ) ? Clone( NULL ) : new XFillFloatTransparenceItem( rIn, nVer ) );
+}
+
+//------------------------------------------------------------------------
+
+SvStream& XFillFloatTransparenceItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+{
+ XFillGradientItem::Store( rOut, nItemVersion );
+ rOut << bEnabled;
+ return rOut;
+}
+
+//------------------------------------------------------------------------
+
+USHORT XFillFloatTransparenceItem::GetVersion( USHORT nFileFormatVersion ) const
+{
+ // !!! if version number of this object must be increased, please !!!
+ // !!! increase version number of base class XFillGradientItem !!!
+ return XFillGradientItem::GetVersion( nFileFormatVersion );
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool XFillFloatTransparenceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ return XFillGradientItem::QueryValue( rVal, nMemberId );
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool XFillFloatTransparenceItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ return XFillGradientItem::PutValue( rVal, nMemberId );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XFillFloatTransparenceItem::GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit,
+ XubString& rText,
+ const International * pInternational ) const
+{
+ return XFillGradientItem::GetPresentation( ePres, eCoreUnit, ePresUnit, rText, pInternational );
+}
+
+// -------------
+// class XHatch
+// -------------
+
+/*************************************************************************
+|*
+|* XHatch::XHatch(XHatchStyle, const Color&, long, long)
+|*
+|* Beschreibung
+|* Ersterstellung 21.11.94
+|* Letzte Aenderung 21.11.94
+|*
+*************************************************************************/
+
+XHatch::XHatch(const Color& rCol, XHatchStyle eTheStyle, long nTheDistance,
+ long nTheAngle) :
+ aColor(rCol),
+ eStyle(eTheStyle),
+ nDistance(nTheDistance),
+ nAngle(nTheAngle)
+{
+}
+
+/*************************************************************************
+|*
+|* int XHatch::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 29.11.94
+|* Letzte Aenderung 29.11.94
+|*
+*************************************************************************/
+
+int XHatch::operator==(const XHatch& rHatch) const
+{
+ return ( eStyle == rHatch.eStyle &&
+ aColor == rHatch.aColor &&
+ nDistance == rHatch.nDistance &&
+ nAngle == rHatch.nAngle );
+}
+
+
+// -----------------------
+// class XFillHatchItem
+// -----------------------
+TYPEINIT1_AUTOFACTORY(XFillHatchItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XFillHatchItem::XFillHatchItem(long nIndex,
+|* const XHatch& rTheHatch)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillHatchItem::XFillHatchItem(long nIndex,
+ const XHatch& rTheHatch) :
+ NameOrIndex(XATTR_FILLHATCH, nIndex),
+ aHatch(rTheHatch)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillHatchItem::XFillHatchItem(const XubString& rName,
+|* const XHatch& rTheHatch)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillHatchItem::XFillHatchItem(const XubString& rName,
+ const XHatch& rTheHatch) :
+ NameOrIndex(XATTR_FILLHATCH, rName),
+ aHatch(rTheHatch)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem) :
+ NameOrIndex(rItem),
+ aHatch(rItem.aHatch)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillHatchItem::XFillHatchItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+XFillHatchItem::XFillHatchItem(SvStream& rIn) :
+ NameOrIndex(XATTR_FILLHATCH, rIn),
+ aHatch(COL_BLACK)
+{
+ if (!IsIndex())
+ {
+ USHORT nRed;
+ USHORT nGreen;
+ USHORT nBlue;
+ INT16 nITemp;
+ INT32 nLTemp;
+
+ rIn >> nITemp; aHatch.SetHatchStyle((XHatchStyle)nITemp);
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+
+#ifdef VCL
+ Color aCol;
+ aCol = Color( (BYTE)( nRed >> 8 ), (BYTE)( nGreen >> 8 ), (BYTE)( nBlue >> 8 ) );
+#else
+ Color aCol( COL_USER );
+ aCol = Color( nRed, nGreen, nBlue );
+ aCol.SetColorName(COL_USER);
+#endif
+ aHatch.SetColor(aCol);
+ rIn >> nLTemp; aHatch.SetDistance(nLTemp);
+ rIn >> nLTemp; aHatch.SetAngle(nLTemp);
+ }
+}
+
+/*************************************************************************
+|*
+|* XFillHatchItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillHatchItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFillHatchItem(*this);
+}
+
+/*************************************************************************
+|*
+|* int XFillHatchItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+int XFillHatchItem::operator==(const SfxPoolItem& rItem) const
+{
+ return ( NameOrIndex::operator==(rItem) &&
+ aHatch == ((const XFillHatchItem&) rItem).aHatch );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFillHatchItem(rIn);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillHatchItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 15.11.94
+|*
+*************************************************************************/
+
+SvStream& XFillHatchItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+{
+ NameOrIndex::Store( rOut, nItemVersion );
+
+ if (!IsIndex())
+ {
+ rOut << (INT16)aHatch.GetHatchStyle();
+
+#ifdef VCL
+ USHORT nTmp;
+ nTmp = VCLTOSVCOL( aHatch.GetColor().GetRed() ); rOut << nTmp;
+ nTmp = VCLTOSVCOL( aHatch.GetColor().GetGreen() ); rOut << nTmp;
+ nTmp = VCLTOSVCOL( aHatch.GetColor().GetBlue() ); rOut << nTmp;
+#else
+ rOut << aHatch.GetColor().GetRed();
+ rOut << aHatch.GetColor().GetGreen();
+ rOut << aHatch.GetColor().GetBlue();
+#endif
+
+ rOut << (INT32) aHatch.GetDistance();
+ rOut << (INT32) aHatch.GetAngle();
+ }
+
+ return rOut;
+}
+
+/*************************************************************************
+|*
+|* const XHatch& XFillHatchItem::GetValue(const XHatchTable* pTable) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 18.11.94
+|*
+*************************************************************************/
+
+const XHatch& XFillHatchItem::GetValue(const XHatchTable* pTable) const
+{
+ if (!IsIndex())
+ return aHatch;
+ else
+ return pTable->Get(GetIndex())->GetHatch();
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XFillHatchItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = GetName();
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+FASTBOOL XFillHatchItem::HasMetrics() const
+{
+ return TRUE;
+}
+
+//------------------------------------------------------------------------
+
+FASTBOOL XFillHatchItem::ScaleMetrics(long nMul, long nDiv)
+{
+ aHatch.SetDistance( ScaleMetricValue( aHatch.GetDistance(), nMul, nDiv ) );
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ if( nMemberId == MID_NAME )
+ {
+ rVal <<= ::rtl::OUString( GetName() );
+ }
+ else
+ {
+ ::com::sun::star::drawing::Hatch aUnoHatch;
+
+ aUnoHatch.Style = (::com::sun::star::drawing::HatchStyle)aHatch.GetHatchStyle();
+ aUnoHatch.Color = aHatch.GetColor().GetColor();
+ aUnoHatch.Distance = aHatch.GetDistance();
+ aUnoHatch.Angle = aHatch.GetAngle();
+ rVal <<= aUnoHatch;
+ }
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+sal_Bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ ::com::sun::star::drawing::Hatch aUnoHatch;
+ if(!(rVal >>= aUnoHatch))
+ return sal_False;
+
+ aHatch.SetHatchStyle( (XHatchStyle)aUnoHatch.Style );
+ aHatch.SetColor( aUnoHatch.Color );
+ aHatch.SetDistance( aUnoHatch.Distance );
+ aHatch.SetAngle( aUnoHatch.Angle );
+ return sal_True;
+}
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// FormText-Attribute
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+//-------------------------
+// class XFormTextStyleItem
+//-------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextStyleItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XFormTextStyleItem::XFormTextStyleItem()
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+XFormTextStyleItem::XFormTextStyleItem(XFormTextStyle eTheStyle) :
+ SfxEnumItem(XATTR_FORMTXTSTYLE, eTheStyle)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn) :
+ SfxEnumItem(XATTR_FORMTXTSTYLE, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextStyleItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextStyleItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextStyleItem( *this );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextStyleItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextStyleItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextStyleItem(rIn);
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+USHORT XFormTextStyleItem::GetValueCount() const
+{
+ return 5;
+}
+
+
+//-------------------------
+// class XFormTextAdjustItem
+//-------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextAdjustItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XFormTextAdjustItem::XFormTextAdjustItem()
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+XFormTextAdjustItem::XFormTextAdjustItem(XFormTextAdjust eTheAdjust) :
+ SfxEnumItem(XATTR_FORMTXTADJUST, eTheAdjust)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn) :
+ SfxEnumItem(XATTR_FORMTXTADJUST, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextAdjustItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextAdjustItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextAdjustItem( *this );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextAdjustItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextAdjustItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextAdjustItem(rIn);
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+USHORT XFormTextAdjustItem::GetValueCount() const
+{
+ return 4;
+}
+
+
+//----------------------------
+// class XFormTextDistanceItem
+//----------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextDistanceItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XFormTextDistanceItem::XFormTextDistanceItem()
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+XFormTextDistanceItem::XFormTextDistanceItem(long nDist) :
+ SfxMetricItem(XATTR_FORMTXTDISTANCE, nDist)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn) :
+ SfxMetricItem(XATTR_FORMTXTDISTANCE, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextDistanceItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextDistanceItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextDistanceItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextDistanceItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextDistanceItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextDistanceItem(rIn);
+}
+
+//-------------------------
+// class XFormTextStartItem
+//-------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextStartItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XFormTextStartItem::XFormTextStartItem(long nStart)
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+XFormTextStartItem::XFormTextStartItem(long nStart) :
+ SfxMetricItem(XATTR_FORMTXTSTART, nStart)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextStartItem::XFormTextStartItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+XFormTextStartItem::XFormTextStartItem(SvStream& rIn) :
+ SfxMetricItem(XATTR_FORMTXTSTART, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextStartItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextStartItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextStartItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextStartItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 02.02.95 ESO
+|* Letzte Aenderung 02.02.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextStartItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextStartItem(rIn);
+}
+
+// -------------------------
+// class XFormTextMirrorItem
+// -------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextMirrorItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XFormTextMirrorItem::XFormTextMirrorItem(BOOL bMirror)
+|*
+|* Ersterstellung 06.02.95 ESO
+|* Letzte Aenderung 06.02.95 ESO
+|*
+*************************************************************************/
+
+XFormTextMirrorItem::XFormTextMirrorItem(BOOL bMirror) :
+ SfxBoolItem(XATTR_FORMTXTMIRROR, bMirror)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn)
+|*
+|* Ersterstellung 06.02.95 ESO
+|* Letzte Aenderung 06.02.95 ESO
+|*
+*************************************************************************/
+
+XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn) :
+ SfxBoolItem(XATTR_FORMTXTMIRROR, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextMirrorItem::Clone(SfxItemPool* pPool) const
+|*
+|* Ersterstellung 06.02.95 ESO
+|* Letzte Aenderung 06.02.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextMirrorItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextMirrorItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextMirrorItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Ersterstellung 06.02.95 ESO
+|* Letzte Aenderung 06.02.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextMirrorItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextMirrorItem(rIn);
+}
+
+
+// --------------------------
+// class XFormTextOutlineItem
+// --------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextOutlineItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XFormTextOutlineItem::XFormTextOutlineItem()
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+XFormTextOutlineItem::XFormTextOutlineItem(BOOL bOutline) :
+ SfxBoolItem(XATTR_FORMTXTOUTLINE, bOutline)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn)
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn) :
+ SfxBoolItem(XATTR_FORMTXTOUTLINE, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextOutlineItem::Clone(SfxItemPool* pPool) const
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextOutlineItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextOutlineItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextOutlineItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextOutlineItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextOutlineItem(rIn);
+}
+
+//--------------------------
+// class XFormTextShadowItem
+//--------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextShadowItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XFormTextShadowItem::XFormTextShadowItem()
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+XFormTextShadowItem::XFormTextShadowItem(XFormTextShadow eFormTextShadow) :
+ SfxEnumItem(XATTR_FORMTXTSHADOW, eFormTextShadow)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn) :
+ SfxEnumItem(XATTR_FORMTXTSHADOW, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextShadowItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextShadowItem( *this );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextShadowItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextShadowItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextShadowItem(rIn);
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+USHORT XFormTextShadowItem::GetValueCount() const
+{
+ return 3;
+}
+
+
+// -------------------------------
+// class XFormTextShadowColorItem
+// -------------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextShadowColorItem, XColorItem);
+
+/*************************************************************************
+|*
+|* XFormTextShadowColorItem::XFormTextShadowColorItem()
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+XFormTextShadowColorItem::XFormTextShadowColorItem(long nIndex,
+ const Color& rTheColor) :
+ XColorItem(XATTR_FORMTXTSHDWCOLOR, nIndex, rTheColor)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName, const Color& rTheColor)
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName,
+ const Color& rTheColor) :
+ XColorItem(XATTR_FORMTXTSHDWCOLOR, rName, rTheColor)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn) :
+ XColorItem(XATTR_FORMTXTSHDWCOLOR, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowColorItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextShadowColorItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextShadowColorItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextShadowColorItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextShadowColorItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextShadowColorItem(rIn);
+}
+
+//------------------------------
+// class XFormTextShadowXValItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextShadowXValItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XFormTextShadowXValItem::XFormTextShadowXValItem(long)
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+XFormTextShadowXValItem::XFormTextShadowXValItem(long nVal) :
+ SfxMetricItem(XATTR_FORMTXTSHDWXVAL, nVal)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn) :
+ SfxMetricItem(XATTR_FORMTXTSHDWXVAL, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowXValItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextShadowXValItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextShadowXValItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextShadowXValItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextShadowXValItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextShadowXValItem(rIn);
+}
+
+//------------------------------
+// class XFormTextShadowYValItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextShadowYValItem, SfxMetricItem);
+
+/*************************************************************************
+|*
+|* XFormTextShadowYValItem::XFormTextShadowYValItem(long)
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+XFormTextShadowYValItem::XFormTextShadowYValItem(long nVal) :
+ SfxMetricItem(XATTR_FORMTXTSHDWYVAL, nVal)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn) :
+ SfxMetricItem(XATTR_FORMTXTSHDWYVAL, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowYValItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextShadowYValItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextShadowYValItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextShadowYValItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 28.06.95 ESO
+|* Letzte Aenderung 28.06.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextShadowYValItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextShadowYValItem(rIn);
+}
+
+//---------------------------
+// class XFormTextStdFormItem
+//---------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextStdFormItem, SfxEnumItem);
+
+/*************************************************************************
+|*
+|* XFormTextStdFormItem::XFormTextStdFormItem()
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+XFormTextStdFormItem::XFormTextStdFormItem(XFormTextStdForm eFormTextStdForm) :
+ SfxEnumItem(XATTR_FORMTXTSTDFORM, eFormTextStdForm)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextStdFormItem::XFormTextStdFormItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+XFormTextStdFormItem::XFormTextStdFormItem(SvStream& rIn) :
+ SfxEnumItem(XATTR_FORMTXTSTDFORM, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextStdFormItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextStdFormItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextStdFormItem( *this );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextStdFormItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 27.06.95
+|* Letzte Aenderung 27.06.95
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextStdFormItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextStdFormItem(rIn);
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\*************************************************************************/
+
+USHORT XFormTextStdFormItem::GetValueCount() const
+{
+ return 3;
+}
+
+
+// --------------------------
+// class XFormTextHideFormItem
+// --------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextHideFormItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XFormTextHideFormItem::XFormTextHideFormItem()
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+XFormTextHideFormItem::XFormTextHideFormItem(BOOL bHide) :
+ SfxBoolItem(XATTR_FORMTXTHIDEFORM, bHide)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn)
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn) :
+ SfxBoolItem(XATTR_FORMTXTHIDEFORM, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextHideFormItem::Clone(SfxItemPool* pPool) const
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextHideFormItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextHideFormItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextHideFormItem::Create(SvStream& rIn, USHORT nVer)
+|* const
+|*
+|* Ersterstellung 27.06.95 ESO
+|* Letzte Aenderung 27.06.95 ESO
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextHideFormItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextHideFormItem(rIn);
+}
+
+
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// SetItems
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+TYPEINIT1(XLineAttrSetItem, SfxSetItem);
+
+/*************************************************************************
+|*
+|* Konstruktoren fuer Linienattribute-SetItem
+|*
+\************************************************************************/
+
+XLineAttrSetItem::XLineAttrSetItem( SfxItemSet* pItemSet ) :
+ SfxSetItem( XATTRSET_LINE, pItemSet)
+{
+}
+
+/************************************************************************/
+
+XLineAttrSetItem::XLineAttrSetItem( SfxItemPool* pItemPool ) :
+ SfxSetItem( XATTRSET_LINE,
+ new SfxItemSet( *pItemPool, XATTR_LINE_FIRST, XATTR_LINE_LAST))
+{
+}
+
+/************************************************************************/
+
+XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr ) :
+ SfxSetItem( rLineAttr )
+{
+}
+
+/************************************************************************/
+
+XLineAttrSetItem::XLineAttrSetItem( const XLineAttrSetItem& rLineAttr,
+ SfxItemPool* pItemPool) :
+ SfxSetItem( rLineAttr, pItemPool )
+{
+}
+
+/*************************************************************************
+|*
+|* Clone-Funktion
+|*
+\************************************************************************/
+
+SfxPoolItem* XLineAttrSetItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XLineAttrSetItem( *this, pPool );
+}
+
+/*************************************************************************
+|*
+|* SetItem aus Stream erzeugen
+|*
+\************************************************************************/
+
+SfxPoolItem* XLineAttrSetItem::Create( SvStream& rStream, USHORT nVersion ) const
+{
+ SfxItemSet *pSet = new SfxItemSet( *GetItemSet().GetPool(),
+ XATTR_LINE_FIRST, XATTR_LINE_LAST);
+ pSet->Load( rStream );
+ return new XLineAttrSetItem( pSet );
+}
+
+/*************************************************************************
+|*
+|* SetItem in Stream speichern
+|*
+\************************************************************************/
+
+SvStream& XLineAttrSetItem::Store( SvStream& rStream, USHORT nItemVersion ) const
+{
+ return SfxSetItem::Store( rStream, nItemVersion );
+}
+
+
+TYPEINIT1(XFillAttrSetItem, SfxSetItem);
+
+/*************************************************************************
+|*
+|* Konstruktoren fuer Fuellattribute-SetItem
+|*
+\************************************************************************/
+
+XFillAttrSetItem::XFillAttrSetItem( SfxItemSet* pItemSet ) :
+ SfxSetItem( XATTRSET_FILL, pItemSet)
+{
+}
+
+/************************************************************************/
+
+XFillAttrSetItem::XFillAttrSetItem( SfxItemPool* pItemPool ) :
+ SfxSetItem( XATTRSET_FILL,
+ new SfxItemSet( *pItemPool, XATTR_FILL_FIRST, XATTR_FILL_LAST))
+{
+}
+
+/************************************************************************/
+
+XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr ) :
+ SfxSetItem( rFillAttr )
+{
+}
+
+/************************************************************************/
+
+XFillAttrSetItem::XFillAttrSetItem( const XFillAttrSetItem& rFillAttr,
+ SfxItemPool* pItemPool ) :
+ SfxSetItem( rFillAttr, pItemPool )
+{
+}
+
+/*************************************************************************
+|*
+|* Clone-Funktion
+|*
+\************************************************************************/
+
+SfxPoolItem* XFillAttrSetItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillAttrSetItem( *this, pPool );
+}
+
+/*************************************************************************
+|*
+|* SetItem aus Stream erzeugen
+|*
+\************************************************************************/
+
+SfxPoolItem* XFillAttrSetItem::Create( SvStream& rStream, USHORT nVersion ) const
+{
+ SfxItemSet *pSet = new SfxItemSet( *GetItemSet().GetPool(),
+ XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ pSet->Load( rStream );
+ return new XFillAttrSetItem( pSet );
+}
+
+/*************************************************************************
+|*
+|* SetItem in Stream speichern
+|*
+\************************************************************************/
+
+SvStream& XFillAttrSetItem::Store( SvStream& rStream, USHORT nItemVersion ) const
+{
+ return SfxSetItem::Store( rStream, nItemVersion );
+}
+
+
+TYPEINIT1(XTextAttrSetItem, SfxSetItem);
+
+/*************************************************************************
+|*
+|* Konstruktoren fuer Textattribute-SetItem
+|*
+\************************************************************************/
+
+XTextAttrSetItem::XTextAttrSetItem( SfxItemSet* pItemSet ) :
+ SfxSetItem( XATTRSET_TEXT, pItemSet)
+{
+}
+
+/************************************************************************/
+
+XTextAttrSetItem::XTextAttrSetItem( SfxItemPool* pItemPool ) :
+ SfxSetItem( XATTRSET_TEXT,
+ new SfxItemSet( *pItemPool, XATTR_TEXT_FIRST, XATTR_TEXT_LAST))
+{
+}
+
+/************************************************************************/
+
+XTextAttrSetItem::XTextAttrSetItem( const XTextAttrSetItem& rTextAttr ) :
+ SfxSetItem( rTextAttr )
+{
+}
+
+/************************************************************************/
+
+XTextAttrSetItem::XTextAttrSetItem( const XTextAttrSetItem& rTextAttr,
+ SfxItemPool* pItemPool ) :
+ SfxSetItem( rTextAttr, pItemPool )
+{
+}
+
+/*************************************************************************
+|*
+|* Clone-Funktion
+|*
+\************************************************************************/
+
+SfxPoolItem* XTextAttrSetItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XTextAttrSetItem( *this, pPool );
+}
+
+/*************************************************************************
+|*
+|* SetItem aus Stream erzeugen
+|*
+\************************************************************************/
+
+SfxPoolItem* XTextAttrSetItem::Create( SvStream& rStream, USHORT nVersion ) const
+{
+ SfxItemSet *pSet = new SfxItemSet( *GetItemSet().GetPool(),
+ XATTR_TEXT_FIRST, XATTR_TEXT_LAST);
+ pSet->Load( rStream );
+ return new XTextAttrSetItem( pSet );
+}
+
+/*************************************************************************
+|*
+|* SetItem in Stream speichern
+|*
+\************************************************************************/
+
+SvStream& XTextAttrSetItem::Store( SvStream& rStream, USHORT nItemVersion ) const
+{
+ return SfxSetItem::Store( rStream, nItemVersion );
+}
+
+
+
+
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
new file mode 100644
index 0000000000..909b872542
--- /dev/null
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -0,0 +1,1742 @@
+/*************************************************************************
+ *
+ * $RCSfile: xattr2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#ifndef _COM_SUN_STAR_DRAWING_LINEJOINT_HPP_
+#include <com/sun/star/drawing/LineJoint.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#include "dialogs.hrc"
+#include "xattr.hxx"
+#include "xtable.hxx"
+#include "xoutx.hxx"
+#include "dialmgr.hxx"
+#include "itemtype.hxx"
+#include "xdef.hxx"
+
+#define GLOBALOVERFLOW
+
+/************************************************************************/
+
+//------------------------------
+// class XLineTransparenceItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY(XLineTransparenceItem, SfxUInt16Item);
+
+/*************************************************************************
+|*
+|* XLineTransparenceItem::XLineTransparenceItem(USHORT)
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+XLineTransparenceItem::XLineTransparenceItem(USHORT nLineTransparence) :
+ SfxUInt16Item(XATTR_LINETRANSPARENCE, nLineTransparence)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn) :
+ SfxUInt16Item(XATTR_LINETRANSPARENCE, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XLineTransparenceItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineTransparenceItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineTransparenceItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XLineTransparenceItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XLineTransparenceItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = XubString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) );
+ rText.AppendAscii(": ");
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ rText += XubString( UniString::CreateFromInt32((USHORT) GetValue()) );
+ rText += sal_Unicode('%');
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//-----------------------
+// class XLineJointItem -
+//-----------------------
+
+TYPEINIT1_AUTOFACTORY(XLineJointItem, SfxEnumItem);
+
+// -----------------------------------------------------------------------------
+
+XLineJointItem::XLineJointItem( XLineJoint eLineJoint ) :
+ SfxEnumItem(XATTR_LINEJOINT, eLineJoint)
+{
+}
+
+// -----------------------------------------------------------------------------
+
+XLineJointItem::XLineJointItem( SvStream& rIn ) :
+ SfxEnumItem( XATTR_LINEJOINT, rIn )
+{
+}
+
+// -----------------------------------------------------------------------------
+
+USHORT XLineJointItem::GetVersion( USHORT nFileFormatVersion ) const
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------------
+
+SfxPoolItem* XLineJointItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ XLineJointItem* pRet = new XLineJointItem( rIn );
+
+ if(nVer < 1)
+ pRet->SetValue(XLINEJOINT_ROUND);
+
+ return pRet;
+}
+
+// -----------------------------------------------------------------------------
+
+SfxPoolItem* XLineJointItem::Clone(SfxItemPool* pPool) const
+{
+ return new XLineJointItem( *this );
+}
+
+// -----------------------------------------------------------------------------
+
+SfxItemPresentation XLineJointItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit, XubString& rText, const International*) const
+{
+ rText.Erase();
+
+ switch( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE: return ePres;
+
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ {
+ USHORT nId = 0;
+
+ switch( GetValue() )
+ {
+ case( XLINEJOINT_NONE ):
+ nId = RID_SVXSTR_LINEJOINT_NONE;
+ break;
+
+ case( XLINEJOINT_MIDDLE ):
+ nId = RID_SVXSTR_LINEJOINT_MIDDLE;
+ break;
+
+
+ case( XLINEJOINT_BEVEL ):
+ nId = RID_SVXSTR_LINEJOINT_BEVEL;
+ break;
+
+
+ case( XLINEJOINT_MITER ):
+ nId = RID_SVXSTR_LINEJOINT_MITER;
+ break;
+
+
+ case( XLINEJOINT_ROUND ):
+ nId = RID_SVXSTR_LINEJOINT_ROUND;
+ break;
+ }
+
+ if( nId )
+ rText = SVX_RESSTR( nId );
+
+ return ePres;
+ }
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ ::com::sun::star::drawing::LineJoint eJoint = ::com::sun::star::drawing::LineJoint_NONE;
+
+ switch( GetValue() )
+ {
+ case XLINEJOINT_NONE:
+ break;
+ case XLINEJOINT_MIDDLE:
+ eJoint = ::com::sun::star::drawing::LineJoint_MIDDLE;
+ break;
+ case XLINEJOINT_BEVEL:
+ eJoint = ::com::sun::star::drawing::LineJoint_BEVEL;
+ break;
+ case XLINEJOINT_MITER:
+ eJoint = ::com::sun::star::drawing::LineJoint_MITER;
+ break;
+ case XLINEJOINT_ROUND:
+ eJoint = ::com::sun::star::drawing::LineJoint_ROUND;
+ break;
+ default:
+ DBG_ERROR( "Unknown LineJoint enum value!" );
+ }
+
+ rVal <<= eJoint;
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------------
+
+BOOL XLineJointItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ XLineJoint eJoint = XLINEJOINT_NONE;
+ ::com::sun::star::drawing::LineJoint eUnoJoint;
+
+ if(!(rVal >>= eUnoJoint))
+ return sal_False;
+
+ switch( eUnoJoint )
+ {
+ case ::com::sun::star::drawing::LineJoint_NONE:
+ break;
+ case ::com::sun::star::drawing::LineJoint_MIDDLE:
+ eJoint = XLINEJOINT_MIDDLE;
+ break;
+ case ::com::sun::star::drawing::LineJoint_BEVEL:
+ eJoint = XLINEJOINT_BEVEL;
+ break;
+ case ::com::sun::star::drawing::LineJoint_MITER:
+ eJoint = XLINEJOINT_MITER;
+ break;
+ case ::com::sun::star::drawing::LineJoint_ROUND:
+ eJoint = XLINEJOINT_ROUND;
+ break;
+ }
+
+ SetValue( eJoint );
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------------
+
+USHORT XLineJointItem::GetValueCount() const
+{
+ // don't forget to update the api interface also
+ return 5;
+}
+
+//------------------------------
+// class XFillTransparenceItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY(XFillTransparenceItem, SfxUInt16Item);
+
+/*************************************************************************
+|*
+|* XFillTransparenceItem::XFillTransparenceItem(USHORT)
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+XFillTransparenceItem::XFillTransparenceItem(USHORT nFillTransparence) :
+ SfxUInt16Item(XATTR_FILLTRANSPARENCE, nFillTransparence)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn) :
+ SfxUInt16Item(XATTR_FILLTRANSPARENCE, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFillTransparenceItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillTransparenceItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFillTransparenceItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 07.11.95 KA
+|* Letzte Aenderung 07.11.95 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFillTransparenceItem(rIn);
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XFillTransparenceItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText = XubString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) );
+ rText.AppendAscii(": ");
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ rText += XubString( UniString::CreateFromInt32((USHORT) GetValue() ));
+ rText += sal_Unicode('%');
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------
+// class XFormTextShadowTranspItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY(XFormTextShadowTranspItem, SfxUInt16Item);
+
+/*************************************************************************
+|*
+|* XFormTextShadowTranspItem::XFormTextShadowTranspItem(USHORT)
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.95 KA
+|* Letzte Aenderung 09.11.95 KA
+|*
+*************************************************************************/
+
+XFormTextShadowTranspItem::XFormTextShadowTranspItem(USHORT nShdwTransparence) :
+ SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, nShdwTransparence)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.95 KA
+|* Letzte Aenderung 09.11.95 KA
+|*
+*************************************************************************/
+
+XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn) :
+ SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, rIn)
+{
+}
+
+/*************************************************************************
+|*
+|* XFormTextShadowTranspItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.95 KA
+|* Letzte Aenderung 09.11.95 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextShadowTranspItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFormTextShadowTranspItem(*this);
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 09.11.95 KA
+|* Letzte Aenderung 09.11.95 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFormTextShadowTranspItem(rIn);
+}
+
+
+//------------------------------
+// class XFillGradientStepCountItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY(XGradientStepCountItem, SfxUInt16Item);
+
+/*************************************************************************
+|*
+|* XGradientStepCountItem::XGradientStepCountItem( USHORT )
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+XGradientStepCountItem::XGradientStepCountItem( USHORT nStepCount ) :
+ SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, nStepCount )
+{
+}
+
+/*************************************************************************
+|*
+|* XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn )
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn ) :
+ SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, rIn )
+{
+}
+
+/*************************************************************************
+|*
+|* XGradientStepCountItem::Clone( SfxItemPool* pPool ) const
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XGradientStepCountItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XGradientStepCountItem( *this );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XGradientStepCountItem( rIn );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XGradientStepCountItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+// rText = XubString( ResId( RID_SVXSTR_GRADIENTSTEPCOUNT, DIALOG_MGR() ) );
+// rText += ": ";
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ rText += XubString( UniString::CreateFromInt32((USHORT) GetValue() ));
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+//------------------------------
+// class XFillBmpTileItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY( XFillBmpTileItem, SfxBoolItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpTileItem::XFillBmpTileItem( BOOL bTile ) :
+ SfxBoolItem( XATTR_FILLBMP_TILE, bTile )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpTileItem::XFillBmpTileItem( SvStream& rIn ) :
+ SfxBoolItem( XATTR_FILLBMP_TILE, rIn )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpTileItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBmpTileItem( *this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpTileItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new XFillBmpTileItem( rIn );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxItemPresentation XFillBmpTileItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+//------------------------------
+// class XFillBmpTilePosItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY( XFillBmpPosItem, SfxEnumItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpPosItem::XFillBmpPosItem( RECT_POINT eRP ) :
+ SfxEnumItem( XATTR_FILLBMP_POS, eRP )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpPosItem::XFillBmpPosItem( SvStream& rIn ) :
+ SfxEnumItem( XATTR_FILLBMP_POS, rIn )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpPosItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBmpPosItem( *this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpPosItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new XFillBmpPosItem( rIn );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxItemPresentation XFillBmpPosItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+/******************************************************************************
+|*
+|*
+|*
+\******************************************************************************/
+
+USHORT XFillBmpPosItem::GetValueCount() const
+{
+ return 9;
+}
+
+
+//------------------------------
+// class XFillBmpTileSizeXItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY( XFillBmpSizeXItem, SfxMetricItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpSizeXItem::XFillBmpSizeXItem( long nSizeX ) :
+ SfxMetricItem( XATTR_FILLBMP_SIZEX, nSizeX )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpSizeXItem::XFillBmpSizeXItem( SvStream& rIn ) :
+ SfxMetricItem( XATTR_FILLBMP_SIZEX, rIn )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpSizeXItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBmpSizeXItem( *this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpSizeXItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new XFillBmpSizeXItem( rIn );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxItemPresentation XFillBmpSizeXItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+/*************************************************************************
+|*
+|* Beschreibung
+|* Ersterstellung 05.11.96 KA
+|* Letzte Aenderung 05.11.96 KA
+|*
+\*************************************************************************/
+
+FASTBOOL XFillBmpSizeXItem::HasMetrics() const
+{
+ return GetValue() > 0L;
+}
+
+
+//------------------------------
+// class XFillBmpTileSizeYItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY( XFillBmpSizeYItem, SfxMetricItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpSizeYItem::XFillBmpSizeYItem( long nSizeY ) :
+ SfxMetricItem( XATTR_FILLBMP_SIZEY, nSizeY )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpSizeYItem::XFillBmpSizeYItem( SvStream& rIn ) :
+ SfxMetricItem( XATTR_FILLBMP_SIZEY, rIn )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpSizeYItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBmpSizeYItem( *this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpSizeYItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new XFillBmpSizeYItem( rIn );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxItemPresentation XFillBmpSizeYItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+/*************************************************************************
+|*
+|* Beschreibung
+|* Ersterstellung 05.11.96 KA
+|* Letzte Aenderung 05.11.96 KA
+|*
+\*************************************************************************/
+
+FASTBOOL XFillBmpSizeYItem::HasMetrics() const
+{
+ return GetValue() > 0L;
+}
+
+
+//------------------------------
+// class XFillBmpTileLogItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY( XFillBmpSizeLogItem, SfxBoolItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpSizeLogItem::XFillBmpSizeLogItem( BOOL bLog ) :
+ SfxBoolItem( XATTR_FILLBMP_SIZELOG, bLog )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpSizeLogItem::XFillBmpSizeLogItem( SvStream& rIn ) :
+ SfxBoolItem( XATTR_FILLBMP_SIZELOG, rIn )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpSizeLogItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBmpSizeLogItem( *this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpSizeLogItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new XFillBmpSizeLogItem( rIn );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxItemPresentation XFillBmpSizeLogItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+//------------------------------
+// class XFillBmpTileOffXItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetXItem, SfxUInt16Item );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( USHORT nOffX ) :
+ SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, nOffX )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( SvStream& rIn ) :
+ SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, rIn )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpTileOffsetXItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBmpTileOffsetXItem( *this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpTileOffsetXItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new XFillBmpTileOffsetXItem( rIn );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxItemPresentation XFillBmpTileOffsetXItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+//------------------------------
+// class XFillBmpTileOffYItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetYItem, SfxUInt16Item );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( USHORT nOffY ) :
+ SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, nOffY )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( SvStream& rIn ) :
+ SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, rIn )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpTileOffsetYItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBmpTileOffsetYItem( *this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpTileOffsetYItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new XFillBmpTileOffsetYItem( rIn );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxItemPresentation XFillBmpTileOffsetYItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+//------------------------------
+// class XFillBmpStretchItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY( XFillBmpStretchItem, SfxBoolItem );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpStretchItem::XFillBmpStretchItem( BOOL bStretch ) :
+ SfxBoolItem( XATTR_FILLBMP_STRETCH, bStretch )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+XFillBmpStretchItem::XFillBmpStretchItem( SvStream& rIn ) :
+ SfxBoolItem( XATTR_FILLBMP_STRETCH, rIn )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpStretchItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBmpStretchItem( *this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpStretchItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new XFillBmpStretchItem( rIn );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung 28.02.96 KA
+|* Letzte Aenderung 28.02.96 KA
+|*
+*************************************************************************/
+
+SfxItemPresentation XFillBmpStretchItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+//------------------------------
+// class XFillBmpTileOffPosXItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetXItem, SfxUInt16Item );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( USHORT nOffPosX ) :
+ SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, nOffPosX )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( SvStream& rIn ) :
+ SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, rIn )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpPosOffsetXItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBmpPosOffsetXItem( *this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpPosOffsetXItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new XFillBmpPosOffsetXItem( rIn );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+SfxItemPresentation XFillBmpPosOffsetXItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+//------------------------------
+// class XFillBmpTileOffPosYItem
+//------------------------------
+TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetYItem, SfxUInt16Item );
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( USHORT nOffPosY ) :
+ SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, nOffPosY )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( SvStream& rIn ) :
+ SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, rIn )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpPosOffsetYItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBmpPosOffsetYItem( *this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBmpPosOffsetYItem::Create( SvStream& rIn, USHORT nVer ) const
+{
+ return new XFillBmpPosOffsetYItem( rIn );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+|* Beschreibung
+|* Ersterstellung KA 29.04.96
+|* Letzte Aenderung KA 29.04.96
+|*
+*************************************************************************/
+
+SfxItemPresentation XFillBmpPosOffsetYItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ rText.Erase();
+
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//--------------------------
+// class XFillBackgroundItem
+//--------------------------
+TYPEINIT1_AUTOFACTORY(XFillBackgroundItem, SfxBoolItem);
+
+/*************************************************************************
+|*
+|* XFillBackgroundItem::XFillBackgroundItem( BOOL )
+|*
+|* Beschreibung
+|* Ersterstellung 19.11.96 KA
+|* Letzte Aenderung
+|*
+*************************************************************************/
+
+XFillBackgroundItem::XFillBackgroundItem( BOOL bFill ) :
+ SfxBoolItem( XATTR_FILLBACKGROUND, bFill )
+{
+}
+
+/*************************************************************************
+|*
+|* XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn )
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn ) :
+ SfxBoolItem( XATTR_FILLBACKGROUND, rIn )
+{
+}
+
+/*************************************************************************
+|*
+|* XFillBackgroundItem::Clone( SfxItemPool* pPool ) const
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBackgroundItem::Clone( SfxItemPool* pPool ) const
+{
+ return new XFillBackgroundItem( *this );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 23.01.96 KA
+|* Letzte Aenderung 23.01.96 KA
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFillBackgroundItem( rIn );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XFillBackgroundItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit, XubString& rText, const International*) const
+{
+ rText.Erase();
+
+ switch( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ return ePres;
+ break;
+
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ return ePres;
+ break;
+ }
+
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
+
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
new file mode 100644
index 0000000000..8cc592ab57
--- /dev/null
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -0,0 +1,801 @@
+/*************************************************************************
+ *
+ * $RCSfile: xattrbmp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <com/sun/star/awt/XBitmap.hpp>
+#include <tools/stream.hxx>
+#include <vcl/window.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/bitmapex.hxx>
+#include <toolkit/unohlp.hxx>
+#include "xattr.hxx"
+#include "xtable.hxx"
+#include "xoutx.hxx"
+#include "xdef.hxx"
+#include "unomid.hxx"
+#include "unoprnms.hxx"
+#include "unoapi.hxx"
+
+#define GLOBALOVERFLOW
+
+// ---------------
+// class XOBitmap
+// ---------------
+
+/*************************************************************************
+|*
+|* XOBitmap::XOBitmap()
+|*
+|* Beschreibung
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+XOBitmap::XOBitmap() :
+ eType ( XBITMAP_NONE ),
+ eStyle ( XBITMAP_STRETCH ),
+ pPixelArray ( NULL ),
+ bGraphicDirty ( FALSE )
+{
+}
+
+/*************************************************************************
+|*
+|* XOBitmap::XOBitmap( Bitmap aBitmap, XBitmapStyle eStyle = XBITMAP_TILE )
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+XOBitmap::XOBitmap( const Bitmap& rBmp, XBitmapStyle eInStyle ) :
+ eType ( XBITMAP_IMPORT ),
+ eStyle ( eInStyle ),
+ aGraphicObject ( rBmp ),
+ pPixelArray ( NULL ),
+ bGraphicDirty ( FALSE )
+{
+}
+
+/*************************************************************************
+|*
+|* XOBitmap::XOBitmap( Bitmap aBitmap, XBitmapStyle eStyle = XBITMAP_TILE )
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+XOBitmap::XOBitmap( const GraphicObject& rGraphicObject, XBitmapStyle eInStyle ) :
+ eType ( XBITMAP_IMPORT ),
+ eStyle ( eInStyle ),
+ aGraphicObject ( rGraphicObject ),
+ pPixelArray ( NULL ),
+ bGraphicDirty ( FALSE )
+{
+}
+
+/*************************************************************************
+|*
+|* XOBitmap::XOBitmap( USHORT* pArray, const Color& aPixelColor,
+|* const Color& aBckgrColor, const Size& rSize = Size( 8, 8 ),
+|* XBitmapStyle eStyle = XBITMAP_TILE )
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+XOBitmap::XOBitmap( const USHORT* pArray, const Color& rPixelColor,
+ const Color& rBckgrColor, const Size& rSize,
+ XBitmapStyle eInStyle ) :
+ eStyle ( eInStyle ),
+ pPixelArray ( NULL ),
+ aArraySize ( rSize ),
+ aPixelColor ( rPixelColor ),
+ aBckgrColor ( rBckgrColor ),
+ bGraphicDirty ( TRUE )
+
+{
+ if( aArraySize.Width() == 8 && aArraySize.Height() == 8 )
+ {
+ eType = XBITMAP_8X8;
+ pPixelArray = new USHORT[ 64 ];
+
+ for( USHORT i = 0; i < 64; i++ )
+ *( pPixelArray + i ) = *( pArray + i );
+ }
+ else
+ DBG_ASSERT( 0, "Nicht unterstuetzte Bitmapgroesse" );
+}
+
+/*************************************************************************
+|*
+|* XOBitmap::XOBitmap( const XOBitmap& rXBmp )
+|*
+|* Beschreibung
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+XOBitmap::XOBitmap( const XOBitmap& rXBmp ) :
+ pPixelArray ( NULL )
+{
+ eType = rXBmp.eType;
+ eStyle = rXBmp.eStyle;
+ aGraphicObject = rXBmp.aGraphicObject;
+ aArraySize = rXBmp.aArraySize;
+ aPixelColor = rXBmp.aPixelColor;
+ aBckgrColor = rXBmp.aBckgrColor;
+ bGraphicDirty = rXBmp.bGraphicDirty;
+
+ if( rXBmp.pPixelArray )
+ {
+ if( eType == XBITMAP_8X8 )
+ {
+ pPixelArray = new USHORT[ 64 ];
+
+ for( USHORT i = 0; i < 64; i++ )
+ *( pPixelArray + i ) = *( rXBmp.pPixelArray + i );
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* XOBitmap::XOBitmap( Bitmap aBitmap, XBitmapStyle eStyle = XBITMAP_TILE )
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+XOBitmap::~XOBitmap()
+{
+ if( pPixelArray )
+ delete []pPixelArray;
+}
+
+/*************************************************************************
+|*
+|* XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp )
+|*
+|* Beschreibung
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp )
+{
+ eType = rXBmp.eType;
+ eStyle = rXBmp.eStyle;
+ aGraphicObject = rXBmp.aGraphicObject;
+ aArraySize = rXBmp.aArraySize;
+ aPixelColor = rXBmp.aPixelColor;
+ aBckgrColor = rXBmp.aBckgrColor;
+ bGraphicDirty = rXBmp.bGraphicDirty;
+
+ if( rXBmp.pPixelArray )
+ {
+ if( eType == XBITMAP_8X8 )
+ {
+ pPixelArray = new USHORT[ 64 ];
+
+ for( USHORT i = 0; i < 64; i++ )
+ *( pPixelArray + i ) = *( rXBmp.pPixelArray + i );
+ }
+ }
+ return( *this );
+}
+
+/*************************************************************************
+|*
+|* int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const
+{
+ if( eType != rXOBitmap.eType ||
+ eStyle != rXOBitmap.eStyle ||
+ aGraphicObject != rXOBitmap.aGraphicObject ||
+ aArraySize != rXOBitmap.aArraySize ||
+ aPixelColor != rXOBitmap.aPixelColor ||
+ aBckgrColor != rXOBitmap.aBckgrColor ||
+ bGraphicDirty != rXOBitmap.bGraphicDirty )
+ {
+ return( FALSE );
+ }
+
+ if( pPixelArray && rXOBitmap.pPixelArray )
+ {
+ USHORT nCount = (USHORT) ( aArraySize.Width() * aArraySize.Height() );
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ if( *( pPixelArray + i ) != *( rXOBitmap.pPixelArray + i ) )
+ return( FALSE );
+ }
+ }
+ return( TRUE );
+}
+
+/*************************************************************************
+|*
+|* void SetPixelArray( const USHORT* pArray )
+|*
+|* Beschreibung
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+void XOBitmap::SetPixelArray( const USHORT* pArray )
+{
+ if( eType == XBITMAP_8X8 )
+ {
+ if( pPixelArray )
+ delete []pPixelArray;
+
+ pPixelArray = new USHORT[ 64 ];
+
+ for( USHORT i = 0; i < 64; i++ )
+ *( pPixelArray + i ) = *( pArray + i );
+
+ bGraphicDirty = TRUE;
+ }
+ else
+ DBG_ASSERT( 0, "Nicht unterstuetzter Bitmaptyp" );
+}
+
+/*************************************************************************
+|*
+|* Bitmap XOBitmap::GetBitmap()
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+Bitmap XOBitmap::GetBitmap() const
+{
+ return GetGraphicObject().GetGraphic().GetBitmap();
+}
+
+/*************************************************************************
+|*
+|* Bitmap XOBitmap::GetGraphicObject()
+|*
+|* Beschreibung
+|* Ersterstellung
+|* Letzte Aenderung
+|*
+*************************************************************************/
+
+const GraphicObject& XOBitmap::GetGraphicObject() const
+{
+ if( bGraphicDirty )
+ ( (XOBitmap*) this )->Array2Bitmap();
+
+ return aGraphicObject;
+}
+
+/*************************************************************************
+|*
+|* void XOBitmap::Bitmap2Array()
+|*
+|* Beschreibung Umwandlung der Bitmap in Array, Hinter- u.
+|* Vordergrundfarbe
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+void XOBitmap::Bitmap2Array()
+{
+ VirtualDevice aVD;
+ BOOL bPixelColor = FALSE;
+ const Bitmap aBitmap( GetBitmap() );
+ const USHORT nLines = 8; // von Type abhaengig
+
+ if( !pPixelArray )
+ pPixelArray = new USHORT[ nLines * nLines ];
+
+ aVD.SetOutputSizePixel( aBitmap.GetSizePixel() );
+ aVD.DrawBitmap( Point(), aBitmap );
+ aPixelColor = aBckgrColor = aVD.GetPixel( Point() );
+
+ // Aufbau des Arrays und Ermittlung der Vorder-, bzw.
+ // Hintergrundfarbe
+ for( USHORT i = 0; i < nLines; i++ )
+ {
+ for( USHORT j = 0; j < nLines; j++ )
+ {
+ if ( aVD.GetPixel( Point( j, i ) ) == aBckgrColor )
+ *( pPixelArray + j + i * nLines ) = 0;
+ else
+ {
+ *( pPixelArray + j + i * nLines ) = 1;
+ if( !bPixelColor )
+ {
+ aPixelColor = aVD.GetPixel( Point( j, i ) );
+ bPixelColor = TRUE;
+ }
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* void XOBitmap::Array2Bitmap()
+|*
+|* Beschreibung Umwandlung des Arrays, Hinter- u.
+|* Vordergrundfarbe in eine Bitmap
+|* Ersterstellung 27.07.95
+|* Letzte Aenderung 27.07.95
+|*
+*************************************************************************/
+
+void XOBitmap::Array2Bitmap()
+{
+ VirtualDevice aVD;
+ BOOL bPixelColor = FALSE;
+ USHORT nLines = 8; // von Type abhaengig
+
+ if( !pPixelArray )
+ return;
+
+ aVD.SetOutputSizePixel( Size( nLines, nLines ) );
+
+ // Aufbau der Bitmap
+ for( USHORT i = 0; i < nLines; i++ )
+ {
+ for( USHORT j = 0; j < nLines; j++ )
+ {
+ if( *( pPixelArray + j + i * nLines ) == 0 )
+ aVD.DrawPixel( Point( j, i ), aBckgrColor );
+ else
+ aVD.DrawPixel( Point( j, i ), aPixelColor );
+ }
+ }
+
+ aGraphicObject = GraphicObject( aVD.GetBitmap( Point(), Size( nLines, nLines ) ) );
+ bGraphicDirty = FALSE;
+}
+
+// -----------------------
+// class XFillBitmapItem
+// -----------------------
+TYPEINIT1_AUTOFACTORY(XFillBitmapItem, NameOrIndex);
+
+/*************************************************************************
+|*
+|* XFillBitmapItem::XFillBitmapItem(long nIndex,
+|* const Bitmap& rTheBitmap)
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+XFillBitmapItem::XFillBitmapItem(long nIndex,
+ const XOBitmap& rTheBitmap) :
+ NameOrIndex( XATTR_FILLBITMAP, nIndex ),
+ aXOBitmap( rTheBitmap )
+{
+}
+
+/*************************************************************************
+|*
+|* XFillBitmapItem::XFillBitmapItem(const XubString& rName,
+|* const Bitmap& rTheBitmap)
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+XFillBitmapItem::XFillBitmapItem(const XubString& rName,
+ const XOBitmap& rTheBitmap) :
+ NameOrIndex( XATTR_FILLBITMAP, rName ),
+ aXOBitmap( rTheBitmap )
+{
+}
+
+/*************************************************************************
+|*
+|* XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem)
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem) :
+ NameOrIndex( rItem ),
+ aXOBitmap( rItem.aXOBitmap )
+{
+}
+
+/*************************************************************************
+|*
+|* XFillBitmapItem::XFillBitmapItem(SvStream& rIn)
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 26.07.94
+|*
+*************************************************************************/
+
+XFillBitmapItem::XFillBitmapItem( SvStream& rIn, USHORT nVer ) :
+ NameOrIndex( XATTR_FILLBITMAP, rIn )
+{
+ if( nVer == 0 )
+ {
+ if (!IsIndex())
+ {
+ // Behandlung der alten Bitmaps
+ Bitmap aBmp;
+
+ rIn >> aBmp;
+
+ aXOBitmap.SetBitmap( aBmp );
+ aXOBitmap.SetBitmapStyle( XBITMAP_TILE );
+
+ if( aBmp.GetSizePixel().Width() == 8 &&
+ aBmp.GetSizePixel().Height() == 8 )
+ {
+ aXOBitmap.SetBitmapType( XBITMAP_8X8 );
+ aXOBitmap.Bitmap2Array();
+ }
+ else
+ aXOBitmap.SetBitmapType( XBITMAP_IMPORT );
+ }
+ }
+ else if( nVer == 1 )
+ {
+ if (!IsIndex())
+ {
+ INT16 iTmp;
+ rIn >> iTmp;
+ aXOBitmap.SetBitmapStyle( (XBitmapStyle) iTmp );
+ rIn >> iTmp;
+ aXOBitmap.SetBitmapType( (XBitmapType) iTmp );
+
+ if( aXOBitmap.GetBitmapType() == XBITMAP_IMPORT )
+ {
+ Bitmap aBmp;
+ rIn >> aBmp;
+ aXOBitmap.SetBitmap( aBmp );
+ }
+ else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 )
+ {
+ USHORT* pArray = new USHORT[ 64 ];
+ Color aColor;
+
+ for( USHORT i = 0; i < 64; i++ )
+ rIn >> *( pArray + i );
+ aXOBitmap.SetPixelArray( pArray );
+
+ rIn >> aColor;
+ aXOBitmap.SetPixelColor( aColor );
+ rIn >> aColor;
+ aXOBitmap.SetBackgroundColor( aColor );
+
+ delete []pArray;
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* XFillBitmapItem::Clone(SfxItemPool* pPool) const
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBitmapItem::Clone(SfxItemPool* pPool) const
+{
+ return new XFillBitmapItem(*this);
+}
+
+/*************************************************************************
+|*
+|* int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const
+{
+ return ( NameOrIndex::operator==(rItem) &&
+ aXOBitmap == ((const XFillBitmapItem&) rItem).aXOBitmap );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 17.11.94
+|*
+*************************************************************************/
+
+SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const
+{
+ return new XFillBitmapItem( rIn, nVer );
+}
+
+/*************************************************************************
+|*
+|* SfxPoolItem* XFillBitmapItem::Store(SvStream& rOut) const
+|*
+|* Beschreibung
+|* Ersterstellung 17.11.94
+|* Letzte Aenderung 26.07.94
+|*
+*************************************************************************/
+
+SvStream& XFillBitmapItem::Store( SvStream& rOut, USHORT nItemVersion ) const
+{
+ NameOrIndex::Store( rOut, nItemVersion );
+
+ if (!IsIndex())
+ {
+ rOut << (INT16) aXOBitmap.GetBitmapStyle();
+ if( !aXOBitmap.GetBitmap() )
+ rOut << (INT16) XBITMAP_NONE;
+ else
+ {
+ rOut << (INT16) aXOBitmap.GetBitmapType();
+ if( aXOBitmap.GetBitmapType() == XBITMAP_IMPORT )
+ {
+ const USHORT nOldComprMode = rOut.GetCompressMode();
+ USHORT nNewComprMode = nOldComprMode;
+
+ if( rOut.GetVersion() >= SOFFICE_FILEFORMAT_50 )
+ nNewComprMode |= COMPRESSMODE_ZBITMAP;
+ else
+ nNewComprMode &= ~COMPRESSMODE_ZBITMAP;
+
+ rOut.SetCompressMode( nNewComprMode );
+ rOut << aXOBitmap.GetBitmap();
+ rOut.SetCompressMode( nOldComprMode );
+ }
+ else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 )
+ {
+ USHORT* pArray = aXOBitmap.GetPixelArray();
+ for( USHORT i = 0; i < 64; i++ )
+ rOut << (USHORT) *( pArray + i );
+
+ rOut << aXOBitmap.GetPixelColor();
+ rOut << aXOBitmap.GetBackgroundColor();
+ }
+ }
+ }
+
+ return rOut;
+}
+
+/*************************************************************************
+|*
+|* const Bitmap& XFillBitmapItem::GetValue(const XBitmapTable* pTable) const
+|*
+|* Beschreibung
+|* Ersterstellung 15.11.94
+|* Letzte Aenderung 26.07.94
+|*
+*************************************************************************/
+
+const XOBitmap& XFillBitmapItem::GetValue(const XBitmapTable* pTable) const
+{
+ if (!IsIndex())
+ return aXOBitmap;
+ else
+ return pTable->Get(GetIndex())->GetXBitmap();
+}
+
+
+/*************************************************************************
+|*
+|* USHORT XFillBitmapItem::GetVersion() const
+|*
+|* Beschreibung
+|* Ersterstellung 26.07.95
+|* Letzte Aenderung 26.07.95
+|*
+*************************************************************************/
+
+USHORT XFillBitmapItem::GetVersion( USHORT nFileFormatVersion ) const
+{
+ // 2. Version
+ return( 1 );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation XFillBitmapItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText, const International *
+) const
+{
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return ePres;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ rText += GetName();
+ return ePres;
+ }
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+{
+ if( nMemberId == MID_NAME )
+ {
+ rVal <<= ::rtl::OUString( GetName() );
+ }
+ else if( nMemberId == MID_GRAFURL )
+ {
+ XOBitmap aXOBitmap( GetValue() );
+ ::rtl::OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+ aURL += ::rtl::OUString::createFromAscii( aXOBitmap.GetGraphicObject().GetUniqueID().GetBuffer() );
+ rVal <<= aURL;
+ }
+ else
+ {
+ XOBitmap aXOBitmap( GetValue() );
+ Bitmap aBmp( aXOBitmap.GetBitmap() );
+ BitmapEx aBmpEx( aBmp );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap > xBmp(
+ VCLUnoHelper::CreateBitmap( aBmpEx ) );
+
+ rVal <<= xBmp;
+ }
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId )
+{
+ if( nMemberId == MID_NAME )
+ {
+ ::rtl::OUString aName;
+ if(rVal >>= aName)
+ {
+ SetName( aName );
+ return sal_True;
+ }
+ }
+#ifndef SVX_LIGHT
+ else if( nMemberId == MID_GRAFURL )
+ {
+ ::rtl::OUString aURL;
+ if(rVal >>= aURL)
+ {
+ GraphicObject aGrafObj( CreateGraphicObjectFromURL( aURL ) );
+ XOBitmap aBMP( aGrafObj );
+ SetValue( aBMP );
+ return sal_True;
+ }
+ }
+#endif
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap > xBmp;
+ if( rVal >>= xBmp)
+ {
+ BitmapEx aInputEx( VCLUnoHelper::GetBitmap( xBmp ) );
+ Bitmap aInput( aInputEx.GetBitmap() );
+
+ // Bitmap einsetzen
+ aXOBitmap.SetBitmap( aInput );
+ aXOBitmap.SetBitmapType(XBITMAP_IMPORT);
+
+ if(aInput.GetSizePixel().Width() == 8
+ && aInput.GetSizePixel().Height() == 8
+ && aInput.GetColorCount() == 2)
+ {
+ aXOBitmap.Bitmap2Array();
+ aXOBitmap.SetBitmapType(XBITMAP_8X8);
+ aXOBitmap.SetPixelSize(aInput.GetSizePixel());
+ }
+ return sal_True;
+ }
+ }
+ return sal_False;
+}
+
+
+
diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx
new file mode 100644
index 0000000000..3acf6d6055
--- /dev/null
+++ b/svx/source/xoutdev/xexch.cxx
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * $RCSfile: xexch.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+
+#ifndef _CLIP_HXX
+#include <vcl/clip.hxx>
+#endif
+#ifndef _DRAG_HXX
+#include <vcl/drag.hxx>
+#endif
+#ifndef _SVX_XFLASIT_HXX
+#include <xflasit.hxx>
+#endif
+#ifndef SVX_XFILLIT0_HXX
+#include <xfillit0.hxx>
+#endif
+#ifndef _SFXIPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFXIPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFXITEMSET_HXX
+#include <svtools/itemset.hxx>
+#endif
+#include "xdef.hxx"
+#include "xexch.hxx"
+
+
+TYPEINIT1_AUTOFACTORY( XFillExchangeData, SvDataCopyStream );
+
+
+/*************************************************************************
+|*
+|* Default-Ctor (Fuer Assign())
+|*
+*************************************************************************/
+XFillExchangeData::XFillExchangeData() :
+ pPool(NULL),
+ pXFillAttrSetItem(NULL)
+{
+}
+
+
+/*************************************************************************
+|*
+|* Ctor
+|*
+*************************************************************************/
+XFillExchangeData::XFillExchangeData(const XFillAttrSetItem rXFillAttrSetItem) :
+ pPool(NULL),
+ pXFillAttrSetItem(NULL)
+{
+ const SfxItemSet& rSet = rXFillAttrSetItem.GetItemSet();
+ const XFillStyleItem& rItem = (const XFillStyleItem&) rSet.Get(XATTR_FILLSTYLE);
+ pPool = rSet.GetPool();
+
+ pXFillAttrSetItem = (XFillAttrSetItem*) rXFillAttrSetItem.Clone(pPool);
+}
+
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+*************************************************************************/
+XFillExchangeData::~XFillExchangeData()
+{
+ delete pXFillAttrSetItem;
+}
+
+
+/*************************************************************************
+|*
+|* Laden
+|*
+*************************************************************************/
+void XFillExchangeData::Load( SvStream& rIStm )
+{
+ rIStm >> *this;
+}
+
+
+/*************************************************************************
+|*
+|* Speichern
+|*
+*************************************************************************/
+void XFillExchangeData::Save( SvStream& rOStm )
+{
+ rOStm << *this;
+}
+
+
+/*************************************************************************
+|*
+|* Zuweisen
+|*
+*************************************************************************/
+void XFillExchangeData::Assign( const SvDataCopyStream& rCopyStream )
+{
+ *this = (const XFillExchangeData& ) rCopyStream;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+*************************************************************************/
+ULONG XFillExchangeData::RegisterClipboardFormatName()
+{
+ static ULONG nFormat = 0;
+
+ if ( !nFormat )
+ {
+ String aName("XFA (XOutDev FillAttr)", gsl_getSystemTextEncoding());
+ nFormat = Clipboard::RegisterFormatName( aName );
+ }
+
+ return nFormat;
+}
+
+
+/******************************************************************************
+|*
+|* Binaer-Export (z.Z. ohne Versionsverwaltung, da nicht persistent!)
+|*
+\******************************************************************************/
+
+SvStream& operator<<( SvStream& rOStm, const XFillExchangeData& rData )
+{
+ USHORT nItemVersion = rData.pXFillAttrSetItem->GetVersion( (USHORT) rOStm.GetVersion() );
+ rData.pXFillAttrSetItem->Store( rOStm, nItemVersion );
+ return rOStm;
+}
+
+
+/******************************************************************************
+|*
+|* Binaer-Import (z.Z. ohne Versionsverwaltung, da nicht persistent!)
+|*
+\******************************************************************************/
+
+SvStream& operator>>( SvStream& rIStm, XFillExchangeData& rData )
+{
+ SfxItemSet* pSet = new SfxItemSet(*rData.pPool,
+ XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ pSet->Load( rIStm );
+ rData.pXFillAttrSetItem = new XFillAttrSetItem( pSet );
+
+ return rIStm;
+}
+
+
+
+/*************************************************************************
+|*
+|* XBitmap& XBitmap::operator=( const XBitmap& rXBmp )
+|*
+*************************************************************************/
+
+XFillExchangeData& XFillExchangeData::operator=( const XFillExchangeData& rData )
+{
+ pXFillAttrSetItem = (XFillAttrSetItem*) rData.pXFillAttrSetItem->Clone(pPool);
+
+ return( *this );
+}
+
+
diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx
new file mode 100644
index 0000000000..9ddc3f86ed
--- /dev/null
+++ b/svx/source/xoutdev/xpool.cxx
@@ -0,0 +1,475 @@
+/*************************************************************************
+ *
+ * $RCSfile: xpool.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "xtable.hxx"
+#include "xattr.hxx"
+#include "xpool.hxx"
+#include "svdattr.hxx"
+#include "svxids.hrc"
+
+#define GLOBALOVERFLOW3
+
+static USHORT nVersion1Map[40];
+static USHORT nVersion2Map[66];
+static USHORT nVersion3Map[124];
+static USHORT nVersion4Map[141];
+
+/*************************************************************************
+|*
+|* Konstruktor
+|*
+\************************************************************************/
+
+
+XOutdevItemPool::XOutdevItemPool(USHORT nAttrStart, USHORT nAttrEnd, FASTBOOL bLoadRefCounts):
+ SfxItemPool(String("XOutdevItemPool", gsl_getSystemTextEncoding()), nAttrStart, nAttrEnd, NULL, NULL, bLoadRefCounts)
+{
+ Ctor(NULL,nAttrStart,nAttrEnd);
+}
+
+
+XOutdevItemPool::XOutdevItemPool(SfxItemPool* pMaster, USHORT nAttrStart, USHORT nAttrEnd, FASTBOOL bLoadRefCounts):
+ SfxItemPool(String("XOutdevItemPool", gsl_getSystemTextEncoding()), nAttrStart, nAttrEnd, NULL, NULL, bLoadRefCounts)
+{
+ Ctor(pMaster,nAttrStart,nAttrEnd);
+}
+
+
+void XOutdevItemPool::Ctor(SfxItemPool* pMaster, USHORT nAttrStart, USHORT nAttrEnd)
+{
+ // Mich als Secondary an den MasterPool (Joe)
+ if (pMaster==NULL) {
+ pMaster=this;
+ } else {
+ // Ich ganz hinten dran
+ SfxItemPool* pParent=pMaster;
+ while (pParent->GetSecondaryPool()!=NULL) {
+ pParent=pParent->GetSecondaryPool();
+ }
+ pParent->SetSecondaryPool(this);
+ }
+
+ SfxItemSet* pSet;
+
+ nStart=nAttrStart;
+ nEnd =nAttrEnd;
+ ppPoolDefaults = new SfxPoolItem* [nEnd-nStart+1];
+
+ USHORT i;
+
+ // Am 27-06-1995 hat Elmar 13 neue Whiches fuer XATTR_FORMTXT bei Which 1021
+ // eingebaut.
+ // Alles was zu diesem Zeitpunkt >1021 war verschiebt sich also um
+ // 13 Positionen nach hinten.
+ // Alles was davor liegt (11 LineItems, 6 FillItems, 5 von 6 FormTextItems)
+ // behaelt seine WhichId.
+
+ for (i=1000; i<=1021; i++) {
+ nVersion1Map[i-1000]=i;
+ }
+ for (i=1022; i<=1039; i++) {
+ nVersion1Map[i-1000]=i+13;
+ }
+ SetVersionMap(1,1000,1039,nVersion1Map);
+
+ // Am 09-11-1995 haben dann wiederum Kai Ahrens 14 und Joe 44 (also beide
+ // insgesamt 58) neue Whiches an verschiedenen Stellen spendiert (siehe
+ // auch die Beschreibung in svx\inc\SvdAttr.HXX).
+
+ for (i=1000; i<=1009; i++) { // XOut
+ nVersion2Map[i-1000]=i;
+ }
+ for (i=1010; i<=1015; i++) { // XOut
+ nVersion2Map[i-1000]=i+7;
+ }
+ for (i=1016; i<=1035; i++) { // XOut
+ nVersion2Map[i-1000]=i+14;
+ }
+ for (i=1036; i<=1039; i++) { // SvDraw
+ nVersion2Map[i-1000]=i+14;
+ }
+ for (i=1040; i<=1050; i++) { // SvDraw
+ nVersion2Map[i-1000]=i+22;
+ }
+ for (i=1051; i<=1056; i++) { // SvDraw
+ nVersion2Map[i-1000]=i+27;
+ }
+ for (i=1057; i<=1065; i++) { // SvDraw
+ nVersion2Map[i-1000]=i+52;
+ }
+ SetVersionMap(2,1000,1065,nVersion2Map);
+
+
+ // Am 29-02-1996 hat KA 17 neue Whiches
+ // fuer das XOut spendiert
+
+ for (i=1000; i<=1029; i++) {
+ nVersion3Map[i-1000]=i;
+ }
+ for (i=1030; i<=1123; i++) {
+ nVersion3Map[i-1000]=i+17;
+ }
+ SetVersionMap(3,1000,1123,nVersion3Map);
+
+
+ // Am 10-08-1996 hat Joe 45 neue Items in SvDraw eingebaut
+ // fuer Bemassung, Verbinder und Laufschrift
+
+ for (i=1000; i<=1126; i++) {
+ nVersion4Map[i-1000]=i;
+ }
+ for (i=1127; i<=1140; i++) {
+ nVersion4Map[i-1000]=i+45;
+ }
+ SetVersionMap(4,1000,1140,nVersion4Map);
+
+
+ XubString aNullStr;
+ Bitmap aNullBmp;
+ XPolygon aNullPol;
+ Color aNullLineCol(RGB_Color(COL_BLACK));
+
+#ifndef VCL
+ Color aNullFillCol(Color(0<<8,184<<8,255<<8)); // "Blau 7"
+#else
+ Color aNullFillCol(Color(0,184,255)); // "Blau 7"
+#endif
+
+ Color aNullShadowCol(RGB_Color(COL_LIGHTGRAY));
+ XDash aNullDash;
+ XGradient aNullGrad(aNullLineCol, RGB_Color(COL_WHITE));
+ XHatch aNullHatch(aNullLineCol);
+
+ // LineItems
+ ppPoolDefaults[XATTR_LINESTYLE -XATTR_START] = new XLineStyleItem;
+ ppPoolDefaults[XATTR_LINEDASH -XATTR_START] = new XLineDashItem(aNullStr,aNullDash);
+ ppPoolDefaults[XATTR_LINEWIDTH -XATTR_START] = new XLineWidthItem;
+ ppPoolDefaults[XATTR_LINECOLOR -XATTR_START] = new XLineColorItem(aNullStr,aNullLineCol);
+ ppPoolDefaults[XATTR_LINESTART -XATTR_START] = new XLineStartItem(aNullStr,aNullPol);
+ ppPoolDefaults[XATTR_LINEEND -XATTR_START] = new XLineEndItem (aNullStr,aNullPol);
+ ppPoolDefaults[XATTR_LINESTARTWIDTH -XATTR_START] = new XLineStartWidthItem;
+ ppPoolDefaults[XATTR_LINEENDWIDTH -XATTR_START] = new XLineEndWidthItem;
+ ppPoolDefaults[XATTR_LINESTARTCENTER -XATTR_START] = new XLineStartCenterItem;
+ ppPoolDefaults[XATTR_LINEENDCENTER -XATTR_START] = new XLineEndCenterItem;
+ ppPoolDefaults[XATTR_LINETRANSPARENCE -XATTR_START] = new XLineTransparenceItem;
+ ppPoolDefaults[XATTR_LINEJOINT -XATTR_START] = new XLineJointItem;
+
+ // Reserven fuer LineItems
+ ppPoolDefaults[XATTR_LINERESERVED2 -XATTR_START] = new SfxVoidItem(XATTR_LINERESERVED2);
+ ppPoolDefaults[XATTR_LINERESERVED3 -XATTR_START] = new SfxVoidItem(XATTR_LINERESERVED3);
+ ppPoolDefaults[XATTR_LINERESERVED4 -XATTR_START] = new SfxVoidItem(XATTR_LINERESERVED4);
+ ppPoolDefaults[XATTR_LINERESERVED5 -XATTR_START] = new SfxVoidItem(XATTR_LINERESERVED5);
+ ppPoolDefaults[XATTR_LINERESERVED_LAST -XATTR_START] = new SfxVoidItem(XATTR_LINERESERVED_LAST);
+
+ // FillItems
+ ppPoolDefaults[XATTR_FILLSTYLE -XATTR_START] = new XFillStyleItem;
+ ppPoolDefaults[XATTR_FILLCOLOR -XATTR_START] = new XFillColorItem (aNullStr,aNullFillCol);
+ ppPoolDefaults[XATTR_FILLGRADIENT -XATTR_START] = new XFillGradientItem(aNullStr,aNullGrad);
+ ppPoolDefaults[XATTR_FILLHATCH -XATTR_START] = new XFillHatchItem (aNullStr,aNullHatch);
+ ppPoolDefaults[XATTR_FILLBITMAP -XATTR_START] = new XFillBitmapItem (aNullStr,aNullBmp);
+ ppPoolDefaults[XATTR_FILLTRANSPARENCE -XATTR_START] = new XFillTransparenceItem;
+ ppPoolDefaults[XATTR_GRADIENTSTEPCOUNT -XATTR_START] = new XGradientStepCountItem;
+ ppPoolDefaults[XATTR_FILLBMP_TILE -XATTR_START] = new XFillBmpTileItem;
+ ppPoolDefaults[XATTR_FILLBMP_POS -XATTR_START] = new XFillBmpPosItem;
+ ppPoolDefaults[XATTR_FILLBMP_SIZEX -XATTR_START] = new XFillBmpSizeXItem;
+ ppPoolDefaults[XATTR_FILLBMP_SIZEY -XATTR_START] = new XFillBmpSizeYItem;
+ ppPoolDefaults[XATTR_FILLBMP_SIZELOG -XATTR_START] = new XFillBmpSizeLogItem;
+ ppPoolDefaults[XATTR_FILLBMP_TILEOFFSETX -XATTR_START] = new XFillBmpTileOffsetXItem;
+ ppPoolDefaults[XATTR_FILLBMP_TILEOFFSETY -XATTR_START] = new XFillBmpTileOffsetYItem;
+ ppPoolDefaults[XATTR_FILLBMP_STRETCH -XATTR_START] = new XFillBmpStretchItem;
+ ppPoolDefaults[XATTR_FILLBMP_POSOFFSETX -XATTR_START] = new XFillBmpPosOffsetXItem;
+ ppPoolDefaults[XATTR_FILLBMP_POSOFFSETY -XATTR_START] = new XFillBmpPosOffsetYItem;
+ ppPoolDefaults[XATTR_FILLFLOATTRANSPARENCE -XATTR_START] = new XFillFloatTransparenceItem( aNullStr, aNullGrad, FALSE );
+
+ // Reserven fuer FillItems
+ ppPoolDefaults[XATTR_FILLRESERVED2 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED2);
+ ppPoolDefaults[XATTR_FILLRESERVED3 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED3);
+ ppPoolDefaults[XATTR_FILLRESERVED4 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED4);
+ ppPoolDefaults[XATTR_FILLRESERVED5 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED5);
+ ppPoolDefaults[XATTR_FILLRESERVED6 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED6);
+ ppPoolDefaults[XATTR_FILLRESERVED7 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED7);
+ ppPoolDefaults[XATTR_FILLRESERVED8 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED8);
+ ppPoolDefaults[XATTR_FILLBACKGROUND -XATTR_START] = new XFillBackgroundItem;
+ ppPoolDefaults[XATTR_FILLRESERVED10 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED10);
+ ppPoolDefaults[XATTR_FILLRESERVED11 -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED11);
+ ppPoolDefaults[XATTR_FILLRESERVED_LAST -XATTR_START] = new SfxVoidItem(XATTR_FILLRESERVED_LAST);
+
+ // FormTextItems
+ ppPoolDefaults[XATTR_FORMTXTSTYLE -XATTR_START] = new XFormTextStyleItem;
+ ppPoolDefaults[XATTR_FORMTXTADJUST -XATTR_START] = new XFormTextAdjustItem;
+ ppPoolDefaults[XATTR_FORMTXTDISTANCE -XATTR_START] = new XFormTextDistanceItem;
+ ppPoolDefaults[XATTR_FORMTXTSTART -XATTR_START] = new XFormTextStartItem;
+ ppPoolDefaults[XATTR_FORMTXTMIRROR -XATTR_START] = new XFormTextMirrorItem;
+ ppPoolDefaults[XATTR_FORMTXTOUTLINE -XATTR_START] = new XFormTextOutlineItem;
+ ppPoolDefaults[XATTR_FORMTXTSHADOW -XATTR_START] = new XFormTextShadowItem;
+ ppPoolDefaults[XATTR_FORMTXTSHDWCOLOR -XATTR_START] = new XFormTextShadowColorItem(aNullStr,aNullShadowCol);
+ ppPoolDefaults[XATTR_FORMTXTSHDWXVAL -XATTR_START] = new XFormTextShadowXValItem;
+ ppPoolDefaults[XATTR_FORMTXTSHDWYVAL -XATTR_START] = new XFormTextShadowYValItem;
+ ppPoolDefaults[XATTR_FORMTXTSTDFORM -XATTR_START] = new XFormTextStdFormItem;
+ ppPoolDefaults[XATTR_FORMTXTHIDEFORM -XATTR_START] = new XFormTextHideFormItem;
+
+ // Reserven fuer FormTextItems
+ ppPoolDefaults[XATTR_FORMTXTSHDWTRANSP -XATTR_START] = new XFormTextShadowTranspItem;
+ ppPoolDefaults[XATTR_FTRESERVED2 -XATTR_START] = new SfxVoidItem(XATTR_FTRESERVED2);
+ ppPoolDefaults[XATTR_FTRESERVED3 -XATTR_START] = new SfxVoidItem(XATTR_FTRESERVED3);
+ ppPoolDefaults[XATTR_FTRESERVED4 -XATTR_START] = new SfxVoidItem(XATTR_FTRESERVED4);
+ ppPoolDefaults[XATTR_FTRESERVED5 -XATTR_START] = new SfxVoidItem(XATTR_FTRESERVED5);
+ ppPoolDefaults[XATTR_FTRESERVED_LAST -XATTR_START] = new SfxVoidItem(XATTR_FTRESERVED_LAST);
+
+ // SetItems erzeugen
+ pSet=new SfxItemSet(*pMaster, XATTR_LINE_FIRST, XATTR_LINE_LAST);
+ ppPoolDefaults[XATTRSET_LINE - XATTR_START] = new XLineAttrSetItem(pSet);
+ pSet=new SfxItemSet(*pMaster, XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ ppPoolDefaults[XATTRSET_FILL - XATTR_START] = new XFillAttrSetItem(pSet);
+ pSet=new SfxItemSet(*pMaster, XATTR_TEXT_FIRST, XATTR_TEXT_LAST);
+ ppPoolDefaults[XATTRSET_TEXT - XATTR_START] = new XTextAttrSetItem(pSet);
+
+ // ItemInfos
+ pItemInfos=new SfxItemInfo[nEnd-nStart+1];
+ for (i=nStart; i<=nEnd; i++) {
+ pItemInfos[i-nStart]._nSID=0;
+ pItemInfos[i-nStart]._nFlags=SFX_ITEM_POOLABLE;
+ }
+
+ pItemInfos[XATTR_LINESTYLE -XATTR_START]._nSID = SID_ATTR_LINE_STYLE;
+ pItemInfos[XATTR_LINEDASH -XATTR_START]._nSID = SID_ATTR_LINE_DASH;
+ pItemInfos[XATTR_LINEWIDTH -XATTR_START]._nSID = SID_ATTR_LINE_WIDTH;
+ pItemInfos[XATTR_LINECOLOR -XATTR_START]._nSID = SID_ATTR_LINE_COLOR;
+ pItemInfos[XATTR_LINESTART -XATTR_START]._nSID = SID_ATTR_LINE_START;
+ pItemInfos[XATTR_LINEEND -XATTR_START]._nSID = SID_ATTR_LINE_END;
+ pItemInfos[XATTR_LINESTARTWIDTH -XATTR_START]._nSID = SID_ATTR_LINE_STARTWIDTH;
+ pItemInfos[XATTR_LINEENDWIDTH -XATTR_START]._nSID = SID_ATTR_LINE_ENDWIDTH;
+ pItemInfos[XATTR_LINESTARTCENTER -XATTR_START]._nSID = SID_ATTR_LINE_STARTCENTER;
+ pItemInfos[XATTR_LINEENDCENTER -XATTR_START]._nSID = SID_ATTR_LINE_ENDCENTER;
+
+ pItemInfos[XATTR_FILLSTYLE -XATTR_START]._nSID = SID_ATTR_FILL_STYLE;
+ pItemInfos[XATTR_FILLCOLOR -XATTR_START]._nSID = SID_ATTR_FILL_COLOR;
+ pItemInfos[XATTR_FILLGRADIENT -XATTR_START]._nSID = SID_ATTR_FILL_GRADIENT;
+ pItemInfos[XATTR_FILLHATCH -XATTR_START]._nSID = SID_ATTR_FILL_HATCH;
+ pItemInfos[XATTR_FILLBITMAP -XATTR_START]._nSID = SID_ATTR_FILL_BITMAP;
+
+ pItemInfos[XATTR_FORMTXTSTYLE -XATTR_START]._nSID = SID_FORMTEXT_STYLE;
+ pItemInfos[XATTR_FORMTXTADJUST -XATTR_START]._nSID = SID_FORMTEXT_ADJUST;
+ pItemInfos[XATTR_FORMTXTDISTANCE -XATTR_START]._nSID = SID_FORMTEXT_DISTANCE;
+ pItemInfos[XATTR_FORMTXTSTART -XATTR_START]._nSID = SID_FORMTEXT_START;
+ pItemInfos[XATTR_FORMTXTMIRROR -XATTR_START]._nSID = SID_FORMTEXT_MIRROR;
+ pItemInfos[XATTR_FORMTXTOUTLINE -XATTR_START]._nSID = SID_FORMTEXT_OUTLINE;
+ pItemInfos[XATTR_FORMTXTSHADOW -XATTR_START]._nSID = SID_FORMTEXT_SHADOW;
+ pItemInfos[XATTR_FORMTXTSHDWCOLOR -XATTR_START]._nSID = SID_FORMTEXT_SHDWCOLOR;
+ pItemInfos[XATTR_FORMTXTSHDWXVAL -XATTR_START]._nSID = SID_FORMTEXT_SHDWXVAL;
+ pItemInfos[XATTR_FORMTXTSHDWYVAL -XATTR_START]._nSID = SID_FORMTEXT_SHDWYVAL;
+ pItemInfos[XATTR_FORMTXTSTDFORM -XATTR_START]._nSID = SID_FORMTEXT_STDFORM;
+ pItemInfos[XATTR_FORMTXTHIDEFORM -XATTR_START]._nSID = SID_FORMTEXT_HIDEFORM;
+
+#if SUPD<355
+ pSlotIds = new USHORT[nEnd-nStart+1];
+
+ pSlotIds[XATTR_LINESTYLE -XATTR_START] = SID_ATTR_LINE_STYLE;
+ pSlotIds[XATTR_LINEDASH -XATTR_START] = SID_ATTR_LINE_DASH;
+ pSlotIds[XATTR_LINEWIDTH -XATTR_START] = SID_ATTR_LINE_WIDTH;
+ pSlotIds[XATTR_LINECOLOR -XATTR_START] = SID_ATTR_LINE_COLOR;
+ pSlotIds[XATTR_LINESTART -XATTR_START] = SID_ATTR_LINE_START;
+ pSlotIds[XATTR_LINEEND -XATTR_START] = SID_ATTR_LINE_END;
+ pSlotIds[XATTR_LINESTARTWIDTH -XATTR_START] = SID_ATTR_LINE_STARTWIDTH;
+ pSlotIds[XATTR_LINEENDWIDTH -XATTR_START] = SID_ATTR_LINE_ENDWIDTH;
+ pSlotIds[XATTR_LINESTARTCENTER -XATTR_START] = SID_ATTR_LINE_STARTCENTER;
+ pSlotIds[XATTR_LINEENDCENTER -XATTR_START] = SID_ATTR_LINE_ENDCENTER;
+ pSlotIds[XATTR_LINETRANSPARENCE -XATTR_START] = 0;
+ pSlotIds[XATTR_LINEJOINT -XATTR_START] = 0;
+
+ // Line-Reserven
+ pSlotIds[XATTR_LINERESERVED2 -XATTR_START] = 0;
+ pSlotIds[XATTR_LINERESERVED3 -XATTR_START] = 0;
+ pSlotIds[XATTR_LINERESERVED4 -XATTR_START] = 0;
+ pSlotIds[XATTR_LINERESERVED5 -XATTR_START] = 0;
+ pSlotIds[XATTR_LINERESERVED_LAST -XATTR_START] = 0;
+
+ pSlotIds[XATTR_FILLSTYLE -XATTR_START] = SID_ATTR_FILL_STYLE;
+ pSlotIds[XATTR_FILLCOLOR -XATTR_START] = SID_ATTR_FILL_COLOR;
+ pSlotIds[XATTR_FILLGRADIENT -XATTR_START] = SID_ATTR_FILL_GRADIENT;
+ pSlotIds[XATTR_FILLHATCH -XATTR_START] = SID_ATTR_FILL_HATCH;
+ pSlotIds[XATTR_FILLBITMAP -XATTR_START] = SID_ATTR_FILL_BITMAP;
+ pSlotIds[XATTR_FILLTRANSPARENCE -XATTR_START] = 0;
+ pSlotIds[XATTR_GRADIENTSTEPCOUNT-XATTR_START] = 0;
+
+ pSlotIds[XATTR_FILLBMP_TILE -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLBMP_POS -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLBMP_SIZEX -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLBMP_SIZEY -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLBMP_SIZELOG -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLBMP_TILEOFFSETX -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLBMP_TILEOFFSETY -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLBMP_STRETCH -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLBMP_POSOFFSETX -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLBMP_POSOFFSETY -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLFLOATTRANSPARENCE -XATTR_START] = 0;
+
+ // Fill-Reserven
+ pSlotIds[XATTR_FILLRESERVED2 -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLRESERVED3 -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLRESERVED4 -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLRESERVED5 -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLRESERVED6 -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLRESERVED7 -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLRESERVED8 -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLBACKGROUND -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLRESERVED10 -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLRESERVED11 -XATTR_START] = 0;
+ pSlotIds[XATTR_FILLRESERVED_LAST -XATTR_START] = 0;
+
+ pSlotIds[XATTR_FORMTXTSTYLE -XATTR_START] = SID_FORMTEXT_STYLE;
+ pSlotIds[XATTR_FORMTXTADJUST -XATTR_START] = SID_FORMTEXT_ADJUST;
+ pSlotIds[XATTR_FORMTXTDISTANCE -XATTR_START] = SID_FORMTEXT_DISTANCE;
+ pSlotIds[XATTR_FORMTXTSTART -XATTR_START] = SID_FORMTEXT_START;
+ pSlotIds[XATTR_FORMTXTMIRROR -XATTR_START] = SID_FORMTEXT_MIRROR;
+ pSlotIds[XATTR_FORMTXTOUTLINE -XATTR_START] = SID_FORMTEXT_OUTLINE;
+ pSlotIds[XATTR_FORMTXTSHADOW -XATTR_START] = SID_FORMTEXT_SHADOW;
+ pSlotIds[XATTR_FORMTXTSHDWCOLOR -XATTR_START] = SID_FORMTEXT_SHDWCOLOR;
+ pSlotIds[XATTR_FORMTXTSHDWXVAL -XATTR_START] = SID_FORMTEXT_SHDWXVAL;
+ pSlotIds[XATTR_FORMTXTSHDWYVAL -XATTR_START] = SID_FORMTEXT_SHDWYVAL;
+ pSlotIds[XATTR_FORMTXTSTDFORM -XATTR_START] = SID_FORMTEXT_STDFORM;
+ pSlotIds[XATTR_FORMTXTHIDEFORM -XATTR_START] = SID_FORMTEXT_HIDEFORM;
+
+ // FormText-Reserven
+ pSlotIds[XATTR_FORMTXTSHDWTRANSP-XATTR_START] = 0;
+ pSlotIds[XATTR_FTRESERVED2 -XATTR_START] = 0;
+ pSlotIds[XATTR_FTRESERVED3 -XATTR_START] = 0;
+ pSlotIds[XATTR_FTRESERVED4 -XATTR_START] = 0;
+ pSlotIds[XATTR_FTRESERVED5 -XATTR_START] = 0;
+ pSlotIds[XATTR_FTRESERVED_LAST -XATTR_START] = 0;
+
+ pSlotIds[XATTRSET_LINE - XATTR_START] = 0; // 20136; alter Hack von MI
+ pSlotIds[XATTRSET_FILL - XATTR_START] = 0; // 20135; alter Hack von MI
+ pSlotIds[XATTRSET_TEXT - XATTR_START] = 0;
+#endif
+
+ if (nAttrStart==XATTR_START && nAttrEnd==XATTR_END)
+ {
+ SetDefaults(ppPoolDefaults);
+ SetItemInfos(pItemInfos);
+#if SUPD<355
+ SetMap(pSlotIds);
+#endif
+ }
+}
+
+
+/*************************************************************************
+|*
+|* copy ctor, sorgt dafuer, dass die static defaults gecloned werden
+|* (Parameter 2 = TRUE)
+|*
+\************************************************************************/
+
+XOutdevItemPool::XOutdevItemPool(const XOutdevItemPool& rPool) :
+ SfxItemPool(rPool, TRUE)
+{
+ // damit geclonete Pools nicht im dtor auf die Nase fallen
+ // endgueltige Loesung --> MI
+ ppPoolDefaults = NULL;
+}
+
+/*************************************************************************
+|*
+|* Clone()
+|*
+\************************************************************************/
+
+SfxItemPool* XOutdevItemPool::Clone() const
+{
+ return new XOutdevItemPool(*this);
+}
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+XOutdevItemPool::~XOutdevItemPool()
+{
+#if SUPD<355
+ if (pSlotIds!=NULL) delete pSlotIds;
+#endif
+
+ Delete();
+ if ( ppPoolDefaults )
+ {
+ SfxPoolItem** ppDefaultItem = ppPoolDefaults;
+ for ( USHORT i = nEnd - nStart + 1; i; --i, ++ppDefaultItem )
+ {
+ if ( *ppDefaultItem ) //Teile schon von abgel. Klasse abgeraeumt!
+ {
+#ifndef PRODUCT
+ SetRef( **ppDefaultItem, 0 );
+#endif
+ delete *ppDefaultItem;
+ }
+ }
+ delete ppPoolDefaults;
+ }
+ if (pItemInfos!=NULL) delete[] pItemInfos;
+
+}
+
+
diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx
new file mode 100644
index 0000000000..e365600063
--- /dev/null
+++ b/svx/source/xoutdev/xtabbtmp.cxx
@@ -0,0 +1,662 @@
+/*************************************************************************
+ *
+ * $RCSfile: xtabbtmp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <vcl/virdev.hxx>
+#include <svtools/itemset.hxx>
+#include <sfx2/docfile.hxx>
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+
+#define GLOBALOVERFLOW
+
+sal_Unicode const pszExtBitmap[] = {'s','o','b'};
+sal_Unicode const pszChckBitmap[] = {'S','O','B','L'};
+// Neuer Key, damit alte Version (3.00) nicht bei dem
+// Versuch abstuerzt, eine neue Tabelle zu laden.
+sal_Unicode const pszChckBitmap0[] = {'S','O','B','0'};
+sal_Unicode const pszChckBitmap1[] = {'S','O','B','1'};
+
+// -------------------
+// class XBitmapTable
+// -------------------
+
+/*************************************************************************
+|*
+|* XBitmapTable::XBitmapTable()
+|*
+*************************************************************************/
+
+XBitmapTable::XBitmapTable( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyTable( rPath, pInPool, nInitSize, nReSize)
+{
+ pBmpTable = new Table( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XBitmapTable::~XBitmapTable()
+{
+}
+
+/************************************************************************/
+
+XBitmapEntry* XBitmapTable::Replace(long nIndex, XBitmapEntry* pEntry )
+{
+ return (XBitmapEntry*) XPropertyTable::Replace(nIndex, pEntry);
+}
+
+/************************************************************************/
+
+XBitmapEntry* XBitmapTable::Remove(long nIndex)
+{
+ return (XBitmapEntry*) XPropertyTable::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XBitmapEntry* XBitmapTable::Get(long nIndex) const
+{
+ return (XBitmapEntry*) XPropertyTable::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XBitmapTable::Load()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XBitmapTable::Save()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XBitmapTable::Create()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XBitmapTable::CreateBitmapsForUI()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+Bitmap* XBitmapTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ return( NULL );
+}
+
+/************************************************************************/
+
+SvStream& XBitmapTable::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // Tabellentyp schreiben (0 = gesamte Tabelle)
+ // Version statt Tabellentyp, um auch alte Tabellen zu lesen
+ rOut << (long) -1;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Eintraege
+ XBitmapEntry* pEntry = (XBitmapEntry*)aTable.First();
+
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ // Versionsverwaltung: Version 0
+ XIOCompat aIOC( rOut, STREAM_WRITE, 0 );
+
+ rOut << (long)aTable.GetCurKey();
+
+ // UNICODE: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ rOut << pEntry->GetXBitmap().GetBitmap();
+ pEntry = (XBitmapEntry*)aTable.Next();
+ }
+
+ return rOut;
+}
+
+/************************************************************************/
+
+SvStream& XBitmapTable::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpTable;
+ pBmpTable = new Table( 16, 16 );
+
+ XBitmapEntry* pEntry = NULL;
+ long nType;
+ long nCount;
+ long nIndex;
+ String aName;
+ Bitmap aBitmap;
+
+ rIn >> nType;
+
+ // gesamte Tabelle?
+ if (nType == 0)
+ {
+ rIn >> nCount;
+ for (long nI = 0; nI < nCount; nI++)
+ {
+ rIn >> nIndex;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ rIn >> aBitmap;
+
+ pEntry = new XBitmapEntry (aBitmap, aName);
+ Insert (nIndex, pEntry);
+ }
+ }
+ else // Version ab 3.00a
+ {
+ rIn >> nCount;
+ for (long nI = 0; nI < nCount; nI++)
+ {
+ // Versionsverwaltung
+ XIOCompat aIOC( rIn, STREAM_READ );
+
+ rIn >> nIndex;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ rIn >> aBitmap;
+
+ if (aIOC.GetVersion() > 0)
+ {
+ // lesen neuer Daten ...
+ }
+
+ pEntry = new XBitmapEntry (aBitmap, aName);
+ Insert (nIndex, pEntry);
+ }
+ }
+ return( rIn );
+}
+
+// ------------------
+// class XBitmapList
+// ------------------
+
+/*************************************************************************
+|*
+|* XBitmapList::XBitmapList()
+|*
+*************************************************************************/
+
+XBitmapList::XBitmapList( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyList( rPath, pInPool, nInitSize, nReSize)
+{
+ // pBmpList = new List( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XBitmapList::~XBitmapList()
+{
+}
+
+/************************************************************************/
+
+XBitmapEntry* XBitmapList::Replace(XBitmapEntry* pEntry, long nIndex )
+{
+ return (XBitmapEntry*) XPropertyList::Replace(pEntry, nIndex);
+}
+
+/************************************************************************/
+
+XBitmapEntry* XBitmapList::Remove(long nIndex)
+{
+ return (XBitmapEntry*) XPropertyList::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XBitmapEntry* XBitmapList::Get(long nIndex) const
+{
+ return (XBitmapEntry*) XPropertyList::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XBitmapList::Load()
+{
+#ifndef SVX_LIGHT
+ if( bListDirty )
+ {
+ bListDirty = FALSE;
+
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtBitmap, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_READ | STREAM_NOCREATE,
+ TRUE, // direkt
+ TRUE ); // Download
+
+ SvStream* pStream = aMedium.GetInStream();
+ if( !pStream )
+ return( FALSE );
+
+ String aCheck;
+ // UNICODE: *pStream >> aCheck;
+ pStream->ReadByteString(aCheck);
+
+ // Handelt es sich um die gew"unschte Tabelle?
+ if( aCheck == String(pszChckBitmap, 4) ||
+ aCheck == String(pszChckBitmap0, 4) ||
+ aCheck == String(pszChckBitmap1, 4) )
+ {
+ ImpRead( *pStream );
+ }
+ else
+ return( FALSE );
+
+ return( pStream->GetError() == SVSTREAM_OK );
+ }
+#endif
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XBitmapList::Save()
+{
+#ifndef SVX_LIGHT
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtBitmap, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_WRITE | STREAM_TRUNC,
+ TRUE, // direkt
+ FALSE ); // Upload
+ aMedium.IsRemote();
+
+ SvStream* pStream = aMedium.GetOutStream();
+ if( !pStream )
+ return( FALSE );
+
+ // UNICODE: *pStream << String( pszChckBitmap1, 4 );
+ pStream->WriteByteString(String( pszChckBitmap1, 4 ));
+ ImpStore( *pStream );
+
+ aMedium.Close();
+ aMedium.Commit();
+
+ return( aMedium.GetError() == 0 );
+#else
+ return FALSE;
+#endif
+}
+
+/************************************************************************/
+// Umgestellt am 27.07.95 auf XBitmap
+
+BOOL XBitmapList::Create()
+{
+ // Array der Bitmap
+ //-----------------------
+ // 00 01 02 03 04 05 06 07
+ // 08 09 10 11 12 13 14 15
+ // 16 17 18 19 20 21 22 23
+ // 24 25 26 27 28 29 30 31
+ // 32 33 34 35 36 37 38 39
+ // 40 41 42 43 44 45 46 47
+ // 48 49 50 51 52 53 54 55
+ // 56 57 58 59 60 61 62 63
+
+ String aStr( SVX_RES( RID_SVXSTR_BITMAP ) );
+ Color aColWhite( RGB_Color( COL_WHITE ) );
+ xub_StrLen nLen;
+ USHORT aArray[64];
+
+ memset( aArray, 0, sizeof( aArray ) );
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert( new XBitmapEntry( XOBitmap( aArray, aColWhite, aColWhite ), aStr ) );
+
+ aArray[ 0] = 1; aArray[ 9] = 1; aArray[18] = 1; aArray[27] = 1;
+ aArray[36] = 1; aArray[45] = 1; aArray[54] = 1; aArray[63] = 1;
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert( new XBitmapEntry( XOBitmap( aArray, RGB_Color( COL_BLACK ), aColWhite ), aStr ) );
+
+ aArray[ 7] = 1; aArray[14] = 1; aArray[21] = 1; aArray[28] = 1;
+ aArray[35] = 1; aArray[42] = 1; aArray[49] = 1; aArray[56] = 1;
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert( new XBitmapEntry( XOBitmap( aArray, RGB_Color( COL_LIGHTRED ), aColWhite ), aStr ) );
+
+ aArray[24] = 1; aArray[25] = 1; aArray[26] = 1;
+ aArray[29] = 1; aArray[30] = 1; aArray[31] = 1;
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert( new XBitmapEntry( XOBitmap( aArray, RGB_Color( COL_LIGHTBLUE ), aColWhite ), aStr ) );
+
+ return( TRUE );
+}
+
+/************************************************************************/
+
+BOOL XBitmapList::CreateBitmapsForUI()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+Bitmap* XBitmapList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ return( NULL );
+}
+
+/************************************************************************/
+
+SvStream& XBitmapList::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // Version !!!
+ rOut << (long)-2;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Eintraege
+ XBitmapEntry* pEntry = NULL;
+
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ // Versionsverwaltung: Version 0
+ XIOCompat aIOC( rOut, STREAM_WRITE, 0 );
+
+ pEntry = Get(nIndex);
+ XOBitmap aXOBitmap( pEntry->GetXBitmap() );
+
+ // UNICODE: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ rOut << (INT16) aXOBitmap.GetBitmapStyle();
+ rOut << (INT16) aXOBitmap.GetBitmapType();
+
+ if( aXOBitmap.GetBitmapType() == XBITMAP_IMPORT )
+ {
+ rOut << aXOBitmap.GetBitmap();
+ }
+ else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 )
+ {
+ USHORT* pArray = aXOBitmap.GetPixelArray();
+ for( USHORT i = 0; i < 64; i++ )
+ rOut << (USHORT) *( pArray + i );
+
+ rOut << aXOBitmap.GetPixelColor();
+ rOut << aXOBitmap.GetBackgroundColor();
+ }
+ }
+
+ return rOut;
+}
+
+/************************************************************************/
+
+XubString& XBitmapList::ConvertName( XubString& rStrName )
+{
+ BOOL bFound = FALSE;
+
+ for( USHORT i=0; i<(RID_SVXSTR_BMP_DEF_END-RID_SVXSTR_BMP_DEF_START+1) && !bFound; i++ )
+ {
+ XubString aStrDefName = SVX_RESSTR( RID_SVXSTR_BMP_DEF_START + i );
+ if( rStrName.Search( aStrDefName ) == 0 )
+ {
+ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( RID_SVXSTR_BMP_START + i ) );
+ bFound = TRUE;
+ }
+ }
+
+ return rStrName;
+}
+
+/************************************************************************/
+
+SvStream& XBitmapList::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpList;
+ pBmpList = new List( 16, 16 );
+
+ XBitmapEntry* pEntry = NULL;
+ long nCount;
+ String aName;
+
+ rIn >> nCount; // Version oder Anzahl ?
+
+ if( nCount >= 0 ) // Erste Version
+ {
+ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ // Behandlung der alten Bitmaps
+ Bitmap aBmp;
+ XOBitmap aXOBitmap;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+ rIn >> aBmp;
+
+ aXOBitmap.SetBitmap( aBmp );
+ aXOBitmap.SetBitmapStyle( XBITMAP_TILE );
+
+ if( aBmp.GetSizePixel().Width() == 8 &&
+ aBmp.GetSizePixel().Height() == 8 )
+ {
+ aXOBitmap.SetBitmapType( XBITMAP_8X8 );
+ aXOBitmap.Bitmap2Array();
+ }
+ else
+ aXOBitmap.SetBitmapType( XBITMAP_IMPORT );
+
+ pEntry = new XBitmapEntry( aXOBitmap, aName );
+ Insert( pEntry, nIndex );
+ }
+ }
+ else if( nCount == -1 ) // Zweite Version
+ {
+ rIn >> nCount;
+ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+
+ XOBitmap aXOBitmap;
+ INT16 iTmp;
+
+ rIn >> iTmp;
+ aXOBitmap.SetBitmapStyle( (XBitmapStyle) iTmp );
+ rIn >> iTmp;
+ aXOBitmap.SetBitmapType( (XBitmapType) iTmp );
+
+ if( aXOBitmap.GetBitmapType() == XBITMAP_IMPORT )
+ {
+ Bitmap aBmp;
+ rIn >> aBmp;
+ aXOBitmap.SetBitmap( aBmp );
+ }
+ else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 )
+ {
+ USHORT* pArray = new USHORT[ 64 ];
+ Color aColor;
+
+ for( USHORT i = 0; i < 64; i++ )
+ rIn >> *( pArray + i );
+ aXOBitmap.SetPixelArray( pArray );
+
+ rIn >> aColor;
+ aXOBitmap.SetPixelColor( aColor );
+ rIn >> aColor;
+ aXOBitmap.SetBackgroundColor( aColor );
+
+ delete []pArray;
+ }
+
+ pEntry = new XBitmapEntry( aXOBitmap, aName );
+ Insert( pEntry, nIndex );
+ }
+ }
+ else // Version ab 3.00a
+ {
+ rIn >> nCount;
+ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ // Versionsverwaltung
+ XIOCompat aIOC( rIn, STREAM_READ );
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+
+ XOBitmap aXOBitmap;
+ INT16 iTmp;
+
+ rIn >> iTmp;
+ aXOBitmap.SetBitmapStyle( (XBitmapStyle) iTmp );
+ rIn >> iTmp;
+ aXOBitmap.SetBitmapType( (XBitmapType) iTmp );
+
+ if( aXOBitmap.GetBitmapType() == XBITMAP_IMPORT )
+ {
+ Bitmap aBmp;
+ rIn >> aBmp;
+ aXOBitmap.SetBitmap( aBmp );
+ }
+ else if( aXOBitmap.GetBitmapType() == XBITMAP_8X8 )
+ {
+ USHORT* pArray = new USHORT[ 64 ];
+ Color aColor;
+
+ for( USHORT i = 0; i < 64; i++ )
+ rIn >> *( pArray + i );
+ aXOBitmap.SetPixelArray( pArray );
+
+ rIn >> aColor;
+ aXOBitmap.SetPixelColor( aColor );
+ rIn >> aColor;
+ aXOBitmap.SetBackgroundColor( aColor );
+
+ delete []pArray;
+ }
+
+ if (aIOC.GetVersion() > 0)
+ {
+ // lesen neuer Daten ...
+ }
+
+ pEntry = new XBitmapEntry( aXOBitmap, aName );
+ Insert( pEntry, nIndex );
+ }
+ }
+
+ return( rIn );
+}
+
+
+
diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx
new file mode 100644
index 0000000000..2d44034710
--- /dev/null
+++ b/svx/source/xoutdev/xtabcolr.cxx
@@ -0,0 +1,856 @@
+/*************************************************************************
+ *
+ * $RCSfile: xtabcolr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <sfx2/docfile.hxx>
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+
+#define GLOBALOVERFLOW
+
+sal_Unicode const pszExtColor[] = {'s','o','c'};
+sal_Unicode const pszChckColor[] = {'S','O','C','L'};
+// Neuer Key, damit alte Version (3.00) nicht bei dem
+// Versuch abstuerzt, eine neue Tabelle zu laden.
+sal_Unicode const pszChckColor0[] = {'S','O','C','0'};
+
+// ------------------
+// class XColorTable
+// ------------------
+
+/*************************************************************************
+|*
+|* XColorTable::XColorTable()
+|*
+*************************************************************************/
+
+XColorTable::XColorTable( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyTable( rPath, pInPool, nInitSize, nReSize)
+{
+ // ColorTable braucht keine eigene BmpTable
+ // pBmpTable = new Table( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XColorTable::~XColorTable()
+{
+}
+
+/************************************************************************/
+
+XColorEntry* XColorTable::Replace(long nIndex, XColorEntry* pEntry )
+{
+ return (XColorEntry*) XPropertyTable::Replace(nIndex, pEntry);
+}
+
+/************************************************************************/
+
+XColorEntry* XColorTable::Remove(long nIndex)
+{
+ return (XColorEntry*) XPropertyTable::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XColorEntry* XColorTable::Get(long nIndex) const
+{
+ return (XColorEntry*) XPropertyTable::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XColorTable::Load()
+{
+#ifndef SVX_LIGHT
+ if( bTableDirty )
+ {
+ bTableDirty = FALSE;
+
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtColor, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_READ | STREAM_NOCREATE,
+ TRUE, // direkt
+ TRUE ); // Download
+
+ SvStream* pStream = aMedium.GetInStream();
+ if( !pStream )
+ return( FALSE );
+
+ String aCheck;
+
+ // UNICODE: *pStream >> aCheck;
+ pStream->ReadByteString(aCheck);
+
+ // Handelt es sich um die gew"unschte Tabelle?
+ if( aCheck == String(pszChckColor, 4) ||
+ aCheck == String(pszChckColor0, 4) )
+ {
+ ImpRead( *pStream );
+ }
+ else
+ return( FALSE );
+
+ return( pStream->GetError() == SVSTREAM_OK );
+ }
+#endif
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XColorTable::Save()
+{
+#ifndef SVX_LIGHT
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtColor, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_WRITE | STREAM_TRUNC,
+ TRUE, // direkt
+ FALSE ); // Upload
+ aMedium.IsRemote();
+
+ SvStream* pStream = aMedium.GetOutStream();
+ if( !pStream )
+ return( FALSE );
+
+ // UNICODE: *pStream << String( pszChckColor0, 4 );
+ pStream->WriteByteString(String( pszChckColor0, 4 ));
+
+
+ ImpStore( *pStream );
+
+ aMedium.Close();
+ aMedium.Commit();
+
+ return( aMedium.GetError() == 0 );
+#else
+ return FALSE;
+#endif
+}
+
+/************************************************************************/
+
+BOOL XColorTable::Create()
+{
+ XubString aStr;
+ xub_StrLen nLen;
+ ResMgr* pRes = DIALOG_MGR();
+
+ static USHORT __READONLY_DATA aResId[] =
+ {
+ RID_SVXSTR_BLACK,
+ RID_SVXSTR_BLUE,
+ RID_SVXSTR_GREEN,
+ RID_SVXSTR_CYAN,
+ RID_SVXSTR_RED,
+ RID_SVXSTR_MAGENTA,
+ RID_SVXSTR_BROWN,
+ RID_SVXSTR_GREY,
+ RID_SVXSTR_LIGHTGREY,
+ RID_SVXSTR_LIGHTBLUE,
+ RID_SVXSTR_LIGHTGREEN,
+ RID_SVXSTR_LIGHTCYAN,
+ RID_SVXSTR_LIGHTRED,
+ RID_SVXSTR_LIGHTMAGENTA,
+ RID_SVXSTR_YELLOW,
+ RID_SVXSTR_WHITE
+ };
+
+ // MT: COL_XXX ist in VCL kein enum mehr!!!
+ // COL_WHITE ist seeeehr gross! ( => Zugriff ueber das obige Array hinweg )
+ // Mit der unteren Schleife gibt es keinen Absturtz, aber es ist
+ // alles schwarz, weil alles kleine Werte.
+ // Ausserdem ist die ganze Vorgehensweise laut MM sehr unperformant
+ // => lieber gleich Stringlisten laden.
+
+ // BM: ifndef VCL part removed (deprecated)
+
+ static ColorData __READONLY_DATA aColTab[] =
+ {
+ COL_BLACK,
+ COL_BLUE,
+ COL_GREEN,
+ COL_CYAN,
+ COL_RED,
+ COL_MAGENTA,
+ COL_BROWN,
+ COL_GRAY,
+ COL_LIGHTGRAY,
+ COL_LIGHTBLUE,
+ COL_LIGHTGREEN,
+ COL_LIGHTCYAN,
+ COL_LIGHTRED,
+ COL_LIGHTMAGENTA,
+ COL_YELLOW,
+ COL_WHITE
+ };
+
+ for( USHORT n = 0; n < 16; ++n )
+ {
+ Insert( n, new XColorEntry( Color( aColTab[n] ),
+ String( ResId( aResId[ n ], pRes )) ) );
+ }
+
+ aStr = SVX_RESSTR( RID_SVXSTR_GREY );
+ aStr.AppendAscii(" 80%");
+ nLen = aStr.Len() - 3;
+ Insert(16, new XColorEntry( Color( 51, 51, 51 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('7'));
+ Insert(17, new XColorEntry( Color( 76, 76, 76 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('6'));
+ Insert(18, new XColorEntry( Color(102,102,102 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert(19, new XColorEntry( Color(153,153,153 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(20, new XColorEntry( Color(179,179,179 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(21, new XColorEntry( Color(204,204,204 ), aStr ) );
+ // BM: new 15%
+ aStr.SetChar(nLen, sal_Unicode('1'));
+ aStr.SetChar(nLen + 1, sal_Unicode('5'));
+ Insert(22, new XColorEntry( Color(217,217,217 ), aStr ) );
+ aStr.SetChar(nLen + 1, sal_Unicode('0'));
+ Insert(23, new XColorEntry( Color(230,230,230 ), aStr ) );
+ Insert(24, new XColorEntry( Color(230,230,255 ), SVX_RESSTR( RID_SVXSTR_BLUEGREY ) ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_RED );
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(25, new XColorEntry( Color(255, 51,102 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(26, new XColorEntry( Color(220, 35, 0 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(27, new XColorEntry( Color(184, 71, 0 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert(28, new XColorEntry( Color(255, 51, 51 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('5'));
+ Insert(29, new XColorEntry( Color(235, 97, 61 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('6'));
+ Insert(30, new XColorEntry( Color(184, 71, 71 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('7'));
+ Insert(31, new XColorEntry( Color(184, 0, 71 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('8'));
+ Insert(32, new XColorEntry( Color(153, 40, 76 ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_MAGENTA );
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(33, new XColorEntry( Color(148, 0,107 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(34, new XColorEntry( Color(148, 71,107 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(35, new XColorEntry( Color(148, 71,148 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert(36, new XColorEntry( Color(153,102,204 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('5'));
+ Insert(37, new XColorEntry( Color(107, 71,148 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('6'));
+ Insert(38, new XColorEntry( Color(107, 35,148 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('7'));
+ Insert(39, new XColorEntry( Color(107, 0,148 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('8'));
+ Insert(40, new XColorEntry( Color( 94, 17,166 ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_BLUE );
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(41, new XColorEntry( Color( 40, 0,153 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(42, new XColorEntry( Color( 71, 0,184 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(43, new XColorEntry( Color( 35, 0,220 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert(44, new XColorEntry( Color( 35, 35,220 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('5'));
+ Insert(45, new XColorEntry( Color( 0, 71,255 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('6'));
+ Insert(46, new XColorEntry( Color( 0,153,255 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('7'));
+ Insert(47, new XColorEntry( Color( 0,184,255 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('8'));
+ Insert(48, new XColorEntry( Color(153,204,255 ), aStr ) );
+ //Insert(48, new XColorEntry( Color( 46,215,255 ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_CYAN );
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(49, new XColorEntry( Color( 0,220,255 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(50, new XColorEntry( Color( 0,204,204 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(51, new XColorEntry( Color( 35,184,220 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert(52, new XColorEntry( Color( 71,184,184 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('5'));
+ Insert(53, new XColorEntry( Color( 51,163,163 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('6'));
+ Insert(54, new XColorEntry( Color( 25,138,138 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('7'));
+ Insert(55, new XColorEntry( Color( 0,107,107 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('8'));
+ Insert(56, new XColorEntry( Color( 0, 74, 74 ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_GREEN );
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(57, new XColorEntry( Color( 53, 94, 0 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(58, new XColorEntry( Color( 92,133, 38 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(59, new XColorEntry( Color(125,166, 71 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert(60, new XColorEntry( Color(148,189, 94 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('5'));
+ Insert(61, new XColorEntry( Color( 0,174, 0 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('6'));
+ Insert(62, new XColorEntry( Color( 51,204,102 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('7'));
+ Insert(63, new XColorEntry( Color( 61,235, 61 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('8'));
+ Insert(64, new XColorEntry( Color( 35,255, 35 ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_YELLOW );
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(65, new XColorEntry( Color(230,255, 0 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(66, new XColorEntry( Color(255,255,153 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(67, new XColorEntry( Color(255,255,102 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert(68, new XColorEntry( Color(230,230, 76 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('5'));
+ Insert(69, new XColorEntry( Color(204,204, 0 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('6'));
+ Insert(70, new XColorEntry( Color(179,179, 0 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('7'));
+ Insert(71, new XColorEntry( Color(128,128, 25 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('8'));
+ Insert(72, new XColorEntry( Color(102,102, 0 ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_BROWN );
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(73, new XColorEntry( Color( 76, 25, 0 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(74, new XColorEntry( Color(102, 51, 0 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(75, new XColorEntry( Color(128, 76, 25 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert(76, new XColorEntry( Color(153,102, 51 ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_ORANGE );
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(77, new XColorEntry( Color(204,102, 51 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(78, new XColorEntry( Color(255,102, 51 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(79, new XColorEntry( Color(255,153,102 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert(80, new XColorEntry( Color(255,204,153 ), aStr ) );
+
+ // new chart colors
+ aStr = SVX_RESSTR( RID_SVXSTR_VIOLET );
+ Insert( 81, new XColorEntry( Color( 0x99, 0x99, 0xff ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_BORDEAUX );
+ Insert( 82, new XColorEntry( Color( 0x99, 0x33, 0x66 ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_PALE_YELLOW );
+ Insert( 83, new XColorEntry( Color( 0xff, 0xff, 0xcc ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_PALE_GREEN );
+ Insert( 84, new XColorEntry( Color( 0xcc, 0xff, 0xff ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_DKVIOLET );
+ Insert( 85, new XColorEntry( Color( 0x66, 0x00, 0x66 ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_SALMON );
+ Insert( 86, new XColorEntry( Color( 0xff, 0x80, 0x80 ), aStr ) );
+
+ aStr = SVX_RESSTR( RID_SVXSTR_SEABLUE );
+ Insert( 87, new XColorEntry( Color( 0x00, 0x66, 0xcc ), aStr ) );
+
+ // Sun colors
+ aStr = SVX_RESSTR( RID_SVXSTR_COLOR_SUN );
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert( 88, new XColorEntry( Color( 0x33, 0x33, 0x66 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert( 89, new XColorEntry( Color( 0x66, 0x66, 0x99 ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert( 90, new XColorEntry( Color( 0x99, 0x99, 0xcc ), aStr ) );
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert( 91, new XColorEntry( Color( 0xcc, 0xcc, 0xff ), aStr ) );
+
+ return( Count() == 92 );
+}
+
+/************************************************************************/
+
+BOOL XColorTable::CreateBitmapsForUI()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+Bitmap* XColorTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ return( NULL );
+}
+
+/************************************************************************/
+
+SvStream& XColorTable::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // Tabellentyp schreiben (0 = gesamte Tabelle)
+ // Version statt Tabellentyp, um auch alte Tabellen zu lesen
+ rOut << (long) -1;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Farben
+ XColorEntry* pEntry = (XColorEntry*)aTable.First();
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ // Versionsverwaltung: Version 0
+ XIOCompat aIOC( rOut, STREAM_WRITE, 0 );
+
+ rOut << (long)aTable.GetCurKey();
+
+ // UNICODE:: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+#ifdef VCL
+ USHORT nCol = pEntry->GetColor().GetRed();
+ nCol = nCol << 8;
+ rOut << nCol;
+
+ nCol = pEntry->GetColor().GetGreen();
+ nCol = nCol << 8;
+ rOut << nCol;
+
+ nCol = pEntry->GetColor().GetBlue();
+ nCol = nCol << 8;
+ rOut << nCol;
+#else
+ rOut << pEntry->GetColor().GetRed();
+ rOut << pEntry->GetColor().GetGreen();
+ rOut << pEntry->GetColor().GetBlue();
+#endif
+ pEntry = (XColorEntry*)aTable.Next();
+ }
+ return( rOut );
+}
+
+/************************************************************************/
+
+XubString& XColorTable::ConvertName( XubString& rStrName )
+{
+ static USHORT __READONLY_DATA aDefResId[] =
+ {
+ RID_SVXSTR_BLUEGREY_DEF,
+ RID_SVXSTR_BLACK_DEF,
+ RID_SVXSTR_BLUE_DEF,
+ RID_SVXSTR_GREEN_DEF,
+ RID_SVXSTR_CYAN_DEF,
+ RID_SVXSTR_RED_DEF,
+ RID_SVXSTR_MAGENTA_DEF,
+ RID_SVXSTR_BROWN_DEF,
+ RID_SVXSTR_GREY_DEF,
+ RID_SVXSTR_LIGHTGREY_DEF,
+ RID_SVXSTR_LIGHTBLUE_DEF,
+ RID_SVXSTR_LIGHTGREEN_DEF,
+ RID_SVXSTR_LIGHTCYAN_DEF,
+ RID_SVXSTR_LIGHTRED_DEF,
+ RID_SVXSTR_LIGHTMAGENTA_DEF,
+ RID_SVXSTR_YELLOW_DEF,
+ RID_SVXSTR_WHITE_DEF,
+ RID_SVXSTR_ORANGE_DEF,
+ RID_SVXSTR_VIOLET_DEF,
+ RID_SVXSTR_BORDEAUX_DEF,
+ RID_SVXSTR_PALE_YELLOW_DEF,
+ RID_SVXSTR_PALE_GREEN_DEF,
+ RID_SVXSTR_DKVIOLET_DEF,
+ RID_SVXSTR_SALMON_DEF,
+ RID_SVXSTR_SEABLUE_DEF,
+ RID_SVXSTR_COLOR_SUN_DEF
+ };
+ static USHORT __READONLY_DATA aResId[] =
+ {
+ RID_SVXSTR_BLUEGREY,
+ RID_SVXSTR_BLACK,
+ RID_SVXSTR_BLUE,
+ RID_SVXSTR_GREEN,
+ RID_SVXSTR_CYAN,
+ RID_SVXSTR_RED,
+ RID_SVXSTR_MAGENTA,
+ RID_SVXSTR_BROWN,
+ RID_SVXSTR_GREY,
+ RID_SVXSTR_LIGHTGREY,
+ RID_SVXSTR_LIGHTBLUE,
+ RID_SVXSTR_LIGHTGREEN,
+ RID_SVXSTR_LIGHTCYAN,
+ RID_SVXSTR_LIGHTRED,
+ RID_SVXSTR_LIGHTMAGENTA,
+ RID_SVXSTR_YELLOW,
+ RID_SVXSTR_WHITE,
+ RID_SVXSTR_ORANGE,
+ RID_SVXSTR_VIOLET,
+ RID_SVXSTR_BORDEAUX,
+ RID_SVXSTR_PALE_YELLOW,
+ RID_SVXSTR_PALE_GREEN,
+ RID_SVXSTR_DKVIOLET,
+ RID_SVXSTR_SALMON,
+ RID_SVXSTR_SEABLUE,
+ RID_SVXSTR_COLOR_SUN
+ };
+
+ BOOL bFound = FALSE;
+
+ for( int i=0; i<(sizeof(aDefResId) / sizeof(USHORT)) && !bFound; i++ )
+ {
+ XubString aStrDefName = SVX_RESSTR( aDefResId[i] );
+ if( rStrName.Search( aStrDefName ) == 0 )
+ {
+ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( aResId[i] ) );
+ bFound = TRUE;
+ }
+ }
+
+ return rStrName;
+}
+
+/************************************************************************/
+
+SvStream& XColorTable::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpTable;
+ pBmpTable = new Table( 16, 16 );
+
+ XColorEntry* pEntry = NULL;
+ long nType;
+ long nCount;
+ long nIndex;
+ USHORT nRed;
+ USHORT nGreen;
+ USHORT nBlue;
+ Color aColor;
+ XubString aName;
+
+ rIn >> nType;
+
+ // gesamte Tabelle?
+ if (nType == 0)
+ {
+ rIn >> nCount;
+ for (long nI = 0; nI < nCount; nI++)
+ {
+ rIn >> nIndex;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+ aName = ConvertName( aName );
+
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+
+#ifdef VCL
+ aColor = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aColor = Color( nRed, nGreen, nBlue );
+#endif
+ pEntry = new XColorEntry( aColor, aName);
+ Insert (nIndex, pEntry);
+ }
+ }
+ else // Version ab 3.00a
+ {
+ rIn >> nCount;
+ for (long nI = 0; nI < nCount; nI++)
+ {
+ // Versionsverwaltung
+ XIOCompat aIOC( rIn, STREAM_READ );
+
+ rIn >> nIndex;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+ aName = ConvertName( aName );
+
+ if( aIOC.GetVersion() >= 0 )
+ {
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+#ifdef VCL
+ aColor = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aColor = Color( nRed, nGreen, nBlue );
+#endif
+ }
+ /*
+ else if( aIOC.GetVersion() >= 1 )
+ {
+ // lesen neuer Daten ...
+ }
+ */
+
+ pEntry = new XColorEntry( aColor, aName );
+ Insert( nIndex, pEntry );
+ }
+ }
+ return( rIn );
+}
+
+// --------------------
+// class XColorList
+// --------------------
+
+/*************************************************************************
+|*
+|* XColorList::XColorList()
+|*
+*************************************************************************/
+
+XColorList::XColorList( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyList( rPath, pInPool, nInitSize, nReSize)
+{
+ // pBmpList = new List( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XColorList::~XColorList()
+{
+}
+
+/************************************************************************/
+
+XColorEntry* XColorList::Replace(XColorEntry* pEntry, long nIndex )
+{
+ return (XColorEntry*) XPropertyList::Replace(pEntry, nIndex);
+}
+
+/************************************************************************/
+
+XColorEntry* XColorList::Remove(long nIndex)
+{
+ return (XColorEntry*) XPropertyList::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XColorEntry* XColorList::Get(long nIndex) const
+{
+ return (XColorEntry*) XPropertyList::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XColorList::Load()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XColorList::Save()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XColorList::Create()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XColorList::CreateBitmapsForUI()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+Bitmap* XColorList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ return( NULL );
+}
+
+/************************************************************************/
+
+SvStream& XColorList::ImpStore( SvStream& rOut )
+{
+ // Erstmal von XColorTable uebernommen !!!
+
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // Tabellentyp schreiben (0 = gesamte Tabelle)
+ rOut << (long)0;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Farben
+ XColorEntry* pEntry = (XColorEntry*)aList.First();
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ // rOut << (long)aList.GetCurKey();
+
+ // UNICODE:rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ rOut << pEntry->GetColor().GetRed();
+ rOut << pEntry->GetColor().GetGreen();
+ rOut << pEntry->GetColor().GetBlue();
+ pEntry = (XColorEntry*)aList.Next();
+ }
+ return rOut;
+}
+
+/************************************************************************/
+
+SvStream& XColorList::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ // Erstmal von XColorTable uebernommen !!!
+ delete pBmpList;
+ pBmpList = new List( 16, 16 );
+
+
+ XColorEntry* pEntry = NULL;
+ long nType;
+ long nCount;
+ long nIndex;
+ USHORT nRed;
+ USHORT nGreen;
+ USHORT nBlue;
+ XubString aName;
+
+ rIn >> nType;
+
+ // gesamte Tabelle?
+ if (nType == 0)
+ {
+ rIn >> nCount;
+ for (long nI = 0; nI < nCount; nI++)
+ {
+ rIn >> nIndex;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+
+ pEntry = new XColorEntry (Color(nRed, nGreen, nBlue), aName);
+ Insert (pEntry, nIndex);
+ }
+ }
+ return( rIn );
+}
+
+
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
new file mode 100644
index 0000000000..681d2fc6f3
--- /dev/null
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -0,0 +1,655 @@
+/*************************************************************************
+ *
+ * $RCSfile: xtabdash.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#include <tools/urlobj.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/window.hxx>
+#include <svtools/itemset.hxx>
+#include <sfx2/docfile.hxx>
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+
+#ifndef _SVX_XLINEIT0_HXX //autogen
+#include <xlineit0.hxx>
+#endif
+
+#ifndef _SVX_XLNCLIT_HXX //autogen
+#include <xlnclit.hxx>
+#endif
+
+#ifndef _SVX_XLNWTIT_HXX //autogen
+#include <xlnwtit.hxx>
+#endif
+
+#ifndef _SVX_XLNDSIT_HXX //autogen
+#include <xlndsit.hxx>
+#endif
+
+#define GLOBALOVERFLOW
+
+sal_Unicode const pszExtDash[] = {'s','o','d'};
+sal_Unicode const pszChckDash[] = {'S','O','D','L'};
+// Neuer Key, damit alte Version (3.00) nicht bei dem
+// Versuch abstuerzt, eine neue Tabelle zu laden.
+sal_Unicode const pszChckDash0[] = {'S','O','D','0'};
+
+// -----------------
+// class XDashTable
+// -----------------
+
+/*************************************************************************
+|*
+|* XDashTable::XDashTable()
+|*
+*************************************************************************/
+
+XDashTable::XDashTable( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyTable( rPath, pInPool, nInitSize, nReSize)
+{
+ pBmpTable = new Table( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XDashTable::~XDashTable()
+{
+}
+
+/************************************************************************/
+
+XDashEntry* XDashTable::Replace(long nIndex, XDashEntry* pEntry )
+{
+ return (XDashEntry*) XPropertyTable::Replace(nIndex, pEntry);
+}
+
+/************************************************************************/
+
+XDashEntry* XDashTable::Remove(long nIndex)
+{
+ return (XDashEntry*) XPropertyTable::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XDashEntry* XDashTable::Get(long nIndex) const
+{
+ return (XDashEntry*) XPropertyTable::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XDashTable::Load()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XDashTable::Save()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XDashTable::Create()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XDashTable::CreateBitmapsForUI()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+Bitmap* XDashTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ return( NULL );
+}
+
+/************************************************************************/
+
+SvStream& XDashTable::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // Tabellentyp schreiben (0 = gesamte Tabelle)
+ rOut << (long)0;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Eintraege
+ XDashEntry* pEntry = (XDashEntry*)aTable.First();
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ rOut << (long)aTable.GetCurKey();
+
+ // UNICODE: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ XDash& rDash = pEntry->GetDash();
+ rOut << (long)rDash.GetDashStyle();
+ rOut << (long)rDash.GetDots();
+ rOut << rDash.GetDotLen();
+ rOut << (long)rDash.GetDashes();
+ rOut << rDash.GetDashLen();
+ rOut << rDash.GetDistance();
+ pEntry = (XDashEntry*)aTable.Next();
+ }
+
+ return rOut;
+}
+
+/************************************************************************/
+
+SvStream& XDashTable::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpTable;
+ pBmpTable = new Table( 16, 16 );
+
+ XDashEntry* pEntry = NULL;
+ long nType;
+ long nCount;
+ long nIndex;
+ XubString aName;
+
+ long nStyle;
+ long nDots;
+ ULONG nDotLen;
+ long nDashes;
+ ULONG nDashLen;
+ ULONG nDistance;
+
+ rIn >> nType;
+
+ // gesamte Tabelle?
+ if (nType == 0)
+ {
+ rIn >> nCount;
+ for (long nI = 0; nI < nCount; nI++)
+ {
+ rIn >> nIndex;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ rIn >> nStyle;
+ rIn >> nDots;
+ rIn >> nDotLen;
+ rIn >> nDashes;
+ rIn >> nDashLen;
+ rIn >> nDistance;
+ XDash aDash((XDashStyle)nStyle, (BYTE)nDots, nDotLen,
+ (BYTE)nDashes, nDashLen, nDistance);
+ pEntry = new XDashEntry (aDash, aName);
+ Insert (nIndex, pEntry);
+ }
+ }
+ return( rIn );
+}
+
+
+// ----------------
+// class XDashList
+// ----------------
+
+/*************************************************************************
+|*
+|* XDashList::XDashList()
+|*
+*************************************************************************/
+
+XDashList::XDashList( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyList ( rPath, pInPool, nInitSize, nReSize),
+ pVD ( NULL ),
+ pXOut ( NULL ),
+ pXFSet ( NULL ),
+ pXLSet ( NULL )
+{
+ pBmpList = new List( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XDashList::~XDashList()
+{
+ if( pVD ) delete pVD;
+ if( pXOut ) delete pXOut;
+ if( pXFSet ) delete pXFSet;
+ if( pXLSet ) delete pXLSet;
+}
+
+/************************************************************************/
+
+XDashEntry* XDashList::Replace(XDashEntry* pEntry, long nIndex )
+{
+ return (XDashEntry*) XPropertyList::Replace(pEntry, nIndex);
+}
+
+/************************************************************************/
+
+XDashEntry* XDashList::Remove(long nIndex)
+{
+ return (XDashEntry*) XPropertyList::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XDashEntry* XDashList::Get(long nIndex) const
+{
+ return (XDashEntry*) XPropertyList::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XDashList::Load()
+{
+#ifndef SVX_LIGHT
+ if( bListDirty )
+ {
+ bListDirty = FALSE;
+
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtDash, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_READ | STREAM_NOCREATE,
+ TRUE, // direkt
+ TRUE ); // Download
+
+ SvStream* pStream = aMedium.GetInStream();
+ if( !pStream )
+ return( FALSE );
+
+ String aCheck;
+
+ // UNICODE: *pStream >> aCheck;
+ pStream->ReadByteString(aCheck);
+
+ // Handelt es sich um die gew"unschte Tabelle?
+ if( aCheck == String(pszChckDash, 4) ||
+ aCheck == String(pszChckDash0, 4) )
+ {
+ ImpRead( *pStream );
+ }
+ else
+ return( FALSE );
+
+ return( pStream->GetError() == SVSTREAM_OK );
+ }
+#endif
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XDashList::Save()
+{
+#ifndef SVX_LIGHT
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtDash, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_WRITE | STREAM_TRUNC,
+ TRUE, // direkt
+ FALSE ); // Upload
+ aMedium.IsRemote();
+
+ SvStream* pStream = aMedium.GetOutStream();
+ if( !pStream )
+ return( FALSE );
+
+ // UNICODE: *pStream << String( pszChckDash0, 4 );
+ pStream->WriteByteString(String( pszChckDash0, 4 ));
+
+ ImpStore( *pStream );
+
+ aMedium.Close();
+ aMedium.Commit();
+
+ return( aMedium.GetError() == 0 );
+#else
+ return FALSE;
+#endif
+}
+
+/************************************************************************/
+
+BOOL XDashList::Create()
+{
+ XubString aStr( SVX_RES( RID_SVXSTR_LINESTYLE ) );
+ xub_StrLen nLen;
+
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(new XDashEntry(XDash(XDASH_RECT,1, 50,1, 50, 50),aStr));
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(new XDashEntry(XDash(XDASH_RECT,1,500,1,500,500),aStr));
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(new XDashEntry(XDash(XDASH_RECT,2, 50,3,250,120),aStr));
+
+ return( TRUE );
+}
+
+/************************************************************************/
+
+BOOL XDashList::CreateBitmapsForUI()
+{
+ for( long i = 0; i < Count(); i++)
+ {
+ Bitmap* pBmp = CreateBitmapForUI( i, FALSE );
+ DBG_ASSERT( pBmp, "XDashList: Bitmap(UI) konnte nicht erzeugt werden!" );
+
+ if( pBmp )
+ pBmpList->Insert( pBmp, i );
+ }
+ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+ if( pVD ) { delete pVD; pVD = NULL; }
+ if( pXOut ) { delete pXOut; pXOut = NULL; }
+ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+ if( pXLSet ){ delete pXLSet; pXLSet = NULL; }
+
+ return( TRUE );
+}
+
+/************************************************************************/
+
+Bitmap* XDashList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ Point aZero;
+
+ if( !pVD ) // und pXOut und pXFSet und pXLSet
+ {
+ pVD = new VirtualDevice;
+ DBG_ASSERT( pVD, "XDashList: Konnte kein VirtualDevice erzeugen!" );
+ pVD->SetMapMode( MAP_100TH_MM );
+ pVD->SetOutputSize( pVD->PixelToLogic( Size( BITMAP_WIDTH * 2, BITMAP_HEIGHT ) ) );
+ const StyleSettings& rStyleSettings = pVD->GetSettings().GetStyleSettings();
+ pVD->SetFillColor( rStyleSettings.GetFieldColor() );
+ pVD->SetLineColor( rStyleSettings.GetFieldColor() );
+
+ pXOut = new XOutputDevice( pVD );
+ DBG_ASSERT( pVD, "XDashList: Konnte kein XOutDevice erzeugen!" );
+
+ pXFSet = new XFillAttrSetItem( pXPool );
+ DBG_ASSERT( pVD, "XDashList: Konnte kein XFillAttrSetItem erzeugen!" );
+
+ pXLSet = new XLineAttrSetItem( pXPool );
+ DBG_ASSERT( pVD, "XDashList: Konnte kein XLineAttrSetItem erzeugen!" );
+ pXLSet->GetItemSet().Put( XLineStyleItem( XLINE_DASH ) );
+ pXLSet->GetItemSet().Put( XLineColorItem( String(), RGB_Color( COL_BLACK ) ) );
+ pXLSet->GetItemSet().Put( XLineWidthItem( 30 ) );
+ }
+
+ Size aVDSize = pVD->GetOutputSize();
+ pVD->DrawRect( Rectangle( aZero, aVDSize ) );
+ pXLSet->GetItemSet().Put( XLineDashItem( String(), Get( nIndex )->GetDash() ) );
+ pXOut->SetLineAttr( *pXLSet );
+ pXOut->DrawLine( Point( 0, aVDSize.Height() / 2 ),
+ Point( aVDSize.Width(), aVDSize.Height() / 2 ) );
+
+ Bitmap* pBitmap = new Bitmap( pVD->GetBitmap( aZero, aVDSize ) );
+
+ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+ if( bDelete )
+ {
+ if( pVD ) { delete pVD; pVD = NULL; }
+ if( pXOut ) { delete pXOut; pXOut = NULL; }
+ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+ if( pXLSet ){ delete pXLSet; pXLSet = NULL; }
+ }
+ return( pBitmap );
+}
+
+/************************************************************************/
+
+SvStream& XDashList::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // Version statt Anzahl, um auch alte Tabellen zu lesen
+ rOut << (long) -1;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Eintraege
+ XDashEntry* pEntry = NULL;
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ // Versionsverwaltung: Version 0
+ XIOCompat aIOC( rOut, STREAM_WRITE, 0 );
+
+ pEntry = Get(nIndex);
+
+ // UNICODE: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ XDash& rDash = pEntry->GetDash();
+ rOut << (long)rDash.GetDashStyle();
+ rOut << (long)rDash.GetDots();
+ rOut << rDash.GetDotLen();
+ rOut << (long)rDash.GetDashes();
+ rOut << rDash.GetDashLen();
+ rOut << rDash.GetDistance();
+ }
+ return rOut;
+}
+
+/************************************************************************/
+
+XubString& XDashList::ConvertName( XubString& rStrName )
+{
+ static USHORT __READONLY_DATA aDefResId[] =
+ {
+ RID_SVXSTR_DASH5_DEF,
+ RID_SVXSTR_DASH0_DEF,
+ RID_SVXSTR_DASH1_DEF,
+ RID_SVXSTR_DASH2_DEF,
+ RID_SVXSTR_DASH3_DEF,
+ RID_SVXSTR_DASH4_DEF,
+ RID_SVXSTR_DASH6_DEF,
+ RID_SVXSTR_DASH7_DEF,
+ RID_SVXSTR_DASH8_DEF,
+ RID_SVXSTR_DASH9_DEF,
+ RID_SVXSTR_DASH10_DEF
+ };
+ static USHORT __READONLY_DATA aResId[] =
+ {
+ RID_SVXSTR_DASH5,
+ RID_SVXSTR_DASH0,
+ RID_SVXSTR_DASH1,
+ RID_SVXSTR_DASH2,
+ RID_SVXSTR_DASH3,
+ RID_SVXSTR_DASH4,
+ RID_SVXSTR_DASH6,
+ RID_SVXSTR_DASH7,
+ RID_SVXSTR_DASH8,
+ RID_SVXSTR_DASH9,
+ RID_SVXSTR_DASH10
+ };
+
+ BOOL bFound = FALSE;
+
+ for( int i=0; i<(sizeof(aDefResId) / sizeof(USHORT)) && !bFound; i++ )
+ {
+ XubString aStrDefName = SVX_RESSTR( aDefResId[i] );
+ if( rStrName.Search( aStrDefName ) == 0 )
+ {
+ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( aResId[i] ) );
+ bFound = TRUE;
+ }
+ }
+
+ return rStrName;
+}
+
+/************************************************************************/
+
+SvStream& XDashList::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpList;
+ pBmpList = new List( 16, 16 );
+
+ XDashEntry* pEntry = NULL;
+ long nCount;
+ XubString aName;
+
+ long nStyle;
+ long nDots;
+ ULONG nDotLen;
+ long nDashes;
+ ULONG nDashLen;
+ ULONG nDistance;
+
+ rIn >> nCount;
+
+ if( nCount >= 0 ) // Alte Tabellen (bis 3.00)
+ {
+ for (long nIndex = 0; nIndex < nCount; nIndex++)
+ {
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+ rIn >> nStyle;
+ rIn >> nDots;
+ rIn >> nDotLen;
+ rIn >> nDashes;
+ rIn >> nDashLen;
+ rIn >> nDistance;
+ XDash aDash((XDashStyle)nStyle, (BYTE)nDots, nDotLen,
+ (BYTE)nDashes, nDashLen, nDistance);
+ pEntry = new XDashEntry (aDash, aName);
+ Insert (pEntry, nIndex);
+ }
+ }
+ else // ab 3.00a
+ {
+ rIn >> nCount;
+
+ for (long nIndex = 0; nIndex < nCount; nIndex++)
+ {
+ // Versionsverwaltung
+ XIOCompat aIOC( rIn, STREAM_READ );
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+ rIn >> nStyle;
+ rIn >> nDots;
+ rIn >> nDotLen;
+ rIn >> nDashes;
+ rIn >> nDashLen;
+ rIn >> nDistance;
+
+ if (aIOC.GetVersion() > 0)
+ {
+ // lesen neuer Daten ...
+ }
+
+ XDash aDash((XDashStyle)nStyle, (BYTE)nDots, nDotLen,
+ (BYTE)nDashes, nDashLen, nDistance);
+ pEntry = new XDashEntry (aDash, aName);
+ Insert (pEntry, nIndex);
+ }
+ }
+ return( rIn );
+}
+
+
+
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
new file mode 100644
index 0000000000..e182c8ca65
--- /dev/null
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -0,0 +1,776 @@
+/*************************************************************************
+ *
+ * $RCSfile: xtabgrdt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#include <tools/urlobj.hxx>
+#include <vcl/virdev.hxx>
+#include <svtools/itemset.hxx>
+#include <sfx2/docfile.hxx>
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+
+#ifndef SVX_XFILLIT0_HXX //autogen
+#include <xfillit0.hxx>
+#endif
+
+#ifndef _SVX_XFLGRIT_HXX //autogen
+#include <xflgrit.hxx>
+#endif
+
+#define GLOBALOVERFLOW
+
+sal_Unicode const pszExtGradient[] = {'s','o','g'};
+sal_Unicode const pszChckGradient[] = {'S','O','G','L'};
+// Neuer Key, damit alte Version (3.00) nicht bei dem
+// Versuch abstuerzt, eine neue Tabelle zu laden.
+sal_Unicode const pszChckGradient0[] = {'S','O','G','0'};
+
+// ---------------------
+// class XGradientTable
+// ---------------------
+
+/*************************************************************************
+|*
+|* XGradientTable::XGradientTable()
+|*
+*************************************************************************/
+
+XGradientTable::XGradientTable( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyTable( rPath, pInPool, nInitSize, nReSize)
+{
+ pBmpTable = new Table( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XGradientTable::~XGradientTable()
+{
+}
+
+/************************************************************************/
+
+XGradientEntry* XGradientTable::Replace(long nIndex, XGradientEntry* pEntry )
+{
+ return (XGradientEntry*) XPropertyTable::Replace(nIndex, pEntry);
+}
+
+/************************************************************************/
+
+XGradientEntry* XGradientTable::Remove(long nIndex)
+{
+ return (XGradientEntry*) XPropertyTable::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XGradientEntry* XGradientTable::Get(long nIndex) const
+{
+ return (XGradientEntry*) XPropertyTable::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XGradientTable::Load()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XGradientTable::Save()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XGradientTable::Create()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XGradientTable::CreateBitmapsForUI()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+Bitmap* XGradientTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ return( NULL );
+}
+
+/************************************************************************/
+
+SvStream& XGradientTable::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // Tabellentyp schreiben (0 = gesamte Tabelle)
+ rOut << (long)0;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Eintraege
+ XGradientEntry* pEntry = (XGradientEntry*)aTable.First();
+
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ rOut << (long)aTable.GetCurKey();
+
+ // UNICODE: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ XGradient& rGradient = pEntry->GetGradient();
+ rOut << (long)rGradient.GetGradientStyle();
+ rOut << rGradient.GetStartColor().GetRed();
+ rOut << rGradient.GetStartColor().GetGreen();
+ rOut << rGradient.GetStartColor().GetBlue();
+ rOut << rGradient.GetEndColor().GetRed();
+ rOut << rGradient.GetEndColor().GetGreen();
+ rOut << rGradient.GetEndColor().GetBlue();
+ rOut << rGradient.GetAngle();
+ rOut << (ULONG)rGradient.GetBorder();
+ rOut << (ULONG)rGradient.GetXOffset();
+ rOut << (ULONG)rGradient.GetYOffset();
+ pEntry = (XGradientEntry*)aTable.Next();
+ }
+
+ return rOut;
+}
+
+/************************************************************************/
+
+SvStream& XGradientTable::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpTable;
+ pBmpTable = new Table( 16, 16 );
+
+ XGradientEntry* pEntry = NULL;
+ long nType;
+ long nCount;
+ long nIndex;
+ XubString aName;
+
+ long nStyle;
+ USHORT nRed;
+ USHORT nGreen;
+ USHORT nBlue;
+ Color aStart;
+ Color aEnd;
+ long nAngle;
+ ULONG nBorder;
+ ULONG nXOfs;
+ ULONG nYOfs;
+
+ rIn >> nType;
+
+ // gesamte Tabelle?
+ if (nType == 0)
+ {
+ rIn >> nCount;
+ for (long nI = 0; nI < nCount; nI++)
+ {
+ rIn >> nIndex;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ rIn >> nStyle;
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+
+#ifdef VCL
+ aStart = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aStart = Color( (USHORT)nRed, (USHORT)nGreen, (USHORT)nBlue );
+#endif
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+
+#ifdef VCL
+ aEnd = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aEnd = Color( (USHORT)nRed, (USHORT)nGreen, (USHORT)nBlue );
+#endif
+
+ rIn >> nAngle;
+ rIn >> nBorder;
+ rIn >> nXOfs;
+ rIn >> nYOfs;
+
+ XGradient aGradient(aStart, aEnd, (XGradientStyle)nStyle, nAngle,
+ (USHORT)nXOfs, (USHORT)nYOfs, (USHORT)nBorder);
+ pEntry = new XGradientEntry (aGradient, aName);
+ Insert (nIndex, pEntry);
+ }
+ }
+ return( rIn );
+}
+
+// --------------------
+// class XGradientList
+// --------------------
+
+/*************************************************************************
+|*
+|* XGradientList::XGradientList()
+|*
+*************************************************************************/
+
+XGradientList::XGradientList( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyList ( rPath, pInPool, nInitSize, nReSize),
+ pVD ( NULL ),
+ pXOut ( NULL ),
+ pXFSet ( NULL )
+{
+ pBmpList = new List( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XGradientList::~XGradientList()
+{
+ if( pVD ) delete pVD;
+ if( pXOut ) delete pXOut;
+ if( pXFSet ) delete pXFSet;
+}
+
+/************************************************************************/
+
+XGradientEntry* XGradientList::Replace(XGradientEntry* pEntry, long nIndex )
+{
+ return( (XGradientEntry*) XPropertyList::Replace( pEntry, nIndex ) );
+}
+
+/************************************************************************/
+
+XGradientEntry* XGradientList::Remove(long nIndex)
+{
+ return( (XGradientEntry*) XPropertyList::Remove( nIndex, 0 ) );
+}
+
+/************************************************************************/
+
+XGradientEntry* XGradientList::Get(long nIndex) const
+{
+ return( (XGradientEntry*) XPropertyList::Get( nIndex, 0 ) );
+}
+
+/************************************************************************/
+
+BOOL XGradientList::Load()
+{
+#ifndef SVX_LIGHT
+ if( bListDirty )
+ {
+ bListDirty = FALSE;
+
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtGradient, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_READ | STREAM_NOCREATE,
+ TRUE, // direkt
+ TRUE ); // Download
+
+ SvStream* pStream = aMedium.GetInStream();
+ if( !pStream )
+ return( FALSE );
+
+ String aCheck;
+ // UNICODE: *pStream >> aCheck;
+ pStream->ReadByteString(aCheck);
+
+ // Handelt es sich um die gew"unschte Tabelle?
+ if( aCheck == String(pszChckGradient, 4) ||
+ aCheck == String(pszChckGradient0, 4) )
+ {
+ ImpRead( *pStream );
+ }
+ else
+ return( FALSE );
+
+ return( pStream->GetError() == SVSTREAM_OK );
+ }
+#endif
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XGradientList::Save()
+{
+#ifndef SVX_LIGHT
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtGradient, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_WRITE | STREAM_TRUNC,
+ TRUE, // direkt
+ FALSE ); // Upload
+ aMedium.IsRemote();
+
+ SvStream* pStream = aMedium.GetOutStream();
+ if( !pStream )
+ return( FALSE );
+
+ // UNICODE: *pStream << String( pszChckGradient0, 4 );
+ pStream->WriteByteString(String( pszChckGradient0, 4 ));
+
+ ImpStore( *pStream );
+
+ aMedium.Close();
+ aMedium.Commit();
+
+ return( aMedium.GetError() == 0 );
+#else
+ return FALSE;
+#endif
+}
+
+/************************************************************************/
+
+BOOL XGradientList::Create()
+{
+ XubString aStr( SVX_RES( RID_SVXSTR_GRADIENT ) );
+ xub_StrLen nLen;
+
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(new XGradientEntry(XGradient(RGB_Color(COL_BLACK ),RGB_Color(COL_WHITE ),XGRAD_LINEAR , 0,10,10, 0,100,100),aStr));
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(new XGradientEntry(XGradient(RGB_Color(COL_BLUE ),RGB_Color(COL_RED ),XGRAD_AXIAL , 300,20,20,10,100,100),aStr));
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(new XGradientEntry(XGradient(RGB_Color(COL_RED ),RGB_Color(COL_YELLOW ),XGRAD_RADIAL , 600,30,30,20,100,100),aStr));
+ aStr.SetChar(nLen, sal_Unicode('4'));
+ Insert(new XGradientEntry(XGradient(RGB_Color(COL_YELLOW ),RGB_Color(COL_GREEN ),XGRAD_ELLIPTICAL, 900,40,40,30,100,100),aStr));
+ aStr.SetChar(nLen, sal_Unicode('5'));
+ Insert(new XGradientEntry(XGradient(RGB_Color(COL_GREEN ),RGB_Color(COL_MAGENTA),XGRAD_SQUARE , 1200,50,50,40,100,100),aStr));
+ aStr.SetChar(nLen, sal_Unicode('6'));
+ Insert(new XGradientEntry(XGradient(RGB_Color(COL_MAGENTA),RGB_Color(COL_YELLOW ),XGRAD_RECT , 1900,60,60,50,100,100),aStr));
+
+ return( TRUE );
+}
+
+/************************************************************************/
+
+BOOL XGradientList::CreateBitmapsForUI()
+{
+ for( long i = 0; i < Count(); i++)
+ {
+ Bitmap* pBmp = CreateBitmapForUI( i, FALSE );
+ DBG_ASSERT( pBmp, "XGradientList: Bitmap(UI) konnte nicht erzeugt werden!" );
+
+ if( pBmp )
+ pBmpList->Insert( pBmp, i );
+ }
+ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+ if( pVD ) { delete pVD; pVD = NULL; }
+ if( pXOut ) { delete pXOut; pXOut = NULL; }
+ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+
+ return( FALSE );
+}
+
+/************************************************************************/
+
+Bitmap* XGradientList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ if( !pVD ) // und pXOut und pXFSet
+ {
+ pVD = new VirtualDevice;
+ DBG_ASSERT( pVD, "XGradientList: Konnte kein VirtualDevice erzeugen!" );
+ pVD->SetOutputSizePixel( Size( BITMAP_WIDTH, BITMAP_HEIGHT ) );
+
+ pXOut = new XOutputDevice( pVD );
+ DBG_ASSERT( pVD, "XGradientList: Konnte kein XOutDevice erzeugen!" );
+
+ pXFSet = new XFillAttrSetItem( pXPool );
+ DBG_ASSERT( pVD, "XGradientList: Konnte kein XFillAttrSetItem erzeugen!" );
+ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_GRADIENT ) );
+ }
+
+ pXFSet->GetItemSet().Put(
+ XFillGradientItem( String(), Get( nIndex )->GetGradient() ) );
+ pXOut->SetFillAttr( *pXFSet );
+
+ // #73550#
+ pXOut->OverrideLineColor( Color( COL_BLACK ) );
+
+ Size aVDSize = pVD->GetOutputSizePixel();
+ pXOut->DrawRect( Rectangle( Point(), aVDSize ) );
+ Bitmap* pBitmap = new Bitmap( pVD->GetBitmap( Point(), aVDSize ) );
+
+ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+ if( bDelete )
+ {
+ if( pVD ) { delete pVD; pVD = NULL; }
+ if( pXOut ) { delete pXOut; pXOut = NULL; }
+ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+ }
+ return( pBitmap );
+}
+
+/************************************************************************/
+
+SvStream& XGradientList::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ XGradientEntry* pEntry = NULL;
+
+ // Kennung
+ rOut << (long) -2;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ // Versionsverwaltung: Version 0
+ XIOCompat aIOC( rOut, STREAM_WRITE, 0 );
+
+ pEntry = Get(nIndex);
+
+ // UNICODE: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ XGradient& rGradient = pEntry->GetGradient();
+ rOut << (long)rGradient.GetGradientStyle();
+
+#ifdef VCL
+ USHORT nCol = rGradient.GetStartColor().GetRed();
+ nCol = nCol << 8;
+ rOut << nCol;
+ nCol = rGradient.GetStartColor().GetGreen();
+ nCol = nCol << 8;
+ rOut << nCol;
+ nCol = rGradient.GetStartColor().GetBlue();
+ nCol = nCol << 8;
+ rOut << nCol;
+
+ nCol = rGradient.GetEndColor().GetRed();
+ nCol = nCol << 8;
+ rOut << nCol;
+ nCol = rGradient.GetEndColor().GetGreen();
+ nCol = nCol << 8;
+ rOut << nCol;
+ nCol = rGradient.GetEndColor().GetBlue();
+ nCol = nCol << 8;
+ rOut << nCol;
+#else
+ rOut << rGradient.GetStartColor().GetRed();
+ rOut << rGradient.GetStartColor().GetGreen();
+ rOut << rGradient.GetStartColor().GetBlue();
+
+ rOut << rGradient.GetEndColor().GetRed();
+ rOut << rGradient.GetEndColor().GetGreen();
+ rOut << rGradient.GetEndColor().GetBlue();
+#endif
+ rOut << rGradient.GetAngle();
+ rOut << (ULONG)rGradient.GetBorder();
+ rOut << (ULONG)rGradient.GetXOffset();
+ rOut << (ULONG)rGradient.GetYOffset();
+ rOut << (ULONG)rGradient.GetStartIntens();
+ rOut << (ULONG)rGradient.GetEndIntens();
+ }
+
+ return rOut;
+}
+
+/************************************************************************/
+
+XubString& XGradientList::ConvertName( XubString& rStrName )
+{
+ BOOL bFound = FALSE;
+
+ for( USHORT i=0; i<(RID_SVXSTR_GRDT_DEF_END-RID_SVXSTR_GRDT_DEF_START+1) && !bFound; i++ )
+ {
+ XubString aStrDefName = SVX_RESSTR( RID_SVXSTR_GRDT_DEF_START + i );
+ if( rStrName.Search( aStrDefName ) == 0 )
+ {
+ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( RID_SVXSTR_GRDT_START + i ) );
+ bFound = TRUE;
+ }
+ }
+
+ return rStrName;
+}
+
+/************************************************************************/
+
+SvStream& XGradientList::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpList;
+ pBmpList = new List( 16, 16 );
+
+ XGradientEntry* pEntry = NULL;
+ long nCheck;
+ long nCount;
+ XubString aName;
+
+ long nStyle;
+ USHORT nRed;
+ USHORT nGreen;
+ USHORT nBlue;
+ Color aStart;
+ Color aEnd;
+ long nAngle;
+ ULONG nBorder;
+ ULONG nXOfs;
+ ULONG nYOfs;
+ ULONG nStartIntens;
+ ULONG nEndIntens;
+
+ // Kennung oder Anzahl
+ rIn >> nCheck;
+
+ if( nCheck >= 0 )
+ {
+ nCount = nCheck;
+
+ for (long nIndex = 0; nIndex < nCount; nIndex++)
+ {
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+ rIn >> nStyle;
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+#ifdef VCL
+ aStart = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aStart = Color( (USHORT)nRed, (USHORT)nGreen, (USHORT)nBlue );
+#endif
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+#ifdef VCL
+ aEnd = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aEnd = Color( (USHORT)nRed, (USHORT)nGreen, (USHORT)nBlue );
+#endif
+
+ rIn >> nAngle;
+ rIn >> nBorder;
+ rIn >> nXOfs;
+ rIn >> nYOfs;
+
+ nStartIntens = 100L;
+ nEndIntens = 100L;
+
+ XGradient aGradient( aStart, aEnd, (XGradientStyle)nStyle, nAngle,
+ (USHORT) nXOfs, (USHORT) nYOfs, (USHORT) nBorder,
+ (USHORT) nStartIntens, (USHORT) nEndIntens );
+ pEntry = new XGradientEntry (aGradient, aName);
+ Insert (pEntry, nIndex);
+ }
+ }
+ else if( nCheck == -1L )
+ {
+ rIn >> nCount;
+ for (long nIndex = 0; nIndex < nCount; nIndex++)
+ {
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+ rIn >> nStyle;
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+#ifdef VCL
+ aStart = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aStart = Color( (USHORT)nRed, (USHORT)nGreen, (USHORT)nBlue );
+#endif
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+#ifdef VCL
+ aEnd = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aEnd = Color( (USHORT)nRed, (USHORT)nGreen, (USHORT)nBlue );
+#endif
+
+ rIn >> nAngle;
+ rIn >> nBorder;
+ rIn >> nXOfs;
+ rIn >> nYOfs;
+
+ rIn >> nStartIntens;
+ rIn >> nEndIntens;
+
+ XGradient aGradient( aStart, aEnd, (XGradientStyle)nStyle, nAngle,
+ (USHORT) nXOfs, (USHORT) nYOfs, (USHORT) nBorder,
+ (USHORT) nStartIntens, (USHORT) nEndIntens );
+ pEntry = new XGradientEntry (aGradient, aName);
+ Insert (pEntry, nIndex);
+ }
+ }
+ else // ab 3.00a
+ {
+ rIn >> nCount;
+ for (long nIndex = 0; nIndex < nCount; nIndex++)
+ {
+ // Versionsverwaltung
+ XIOCompat aIOC( rIn, STREAM_READ );
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+ rIn >> nStyle;
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+#ifdef VCL
+ aStart = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aStart = Color( (USHORT)nRed, (USHORT)nGreen, (USHORT)nBlue );
+#endif
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+#ifdef VCL
+ aEnd = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aEnd = Color( (USHORT)nRed, (USHORT)nGreen, (USHORT)nBlue );
+#endif
+
+ rIn >> nAngle;
+ rIn >> nBorder;
+ rIn >> nXOfs;
+ rIn >> nYOfs;
+
+ rIn >> nStartIntens;
+ rIn >> nEndIntens;
+
+ if (aIOC.GetVersion() > 0)
+ {
+ // lesen neuer Daten ...
+ }
+
+ XGradient aGradient( aStart, aEnd, (XGradientStyle)nStyle, nAngle,
+ (USHORT) nXOfs, (USHORT) nYOfs, (USHORT) nBorder,
+ (USHORT) nStartIntens, (USHORT) nEndIntens );
+ pEntry = new XGradientEntry (aGradient, aName);
+ Insert (pEntry, nIndex);
+ }
+ }
+ return( rIn );
+}
+
+
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
new file mode 100644
index 0000000000..442f16603e
--- /dev/null
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -0,0 +1,657 @@
+/*************************************************************************
+ *
+ * $RCSfile: xtabhtch.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#include <tools/urlobj.hxx>
+#include <vcl/virdev.hxx>
+#include <svtools/itemset.hxx>
+#include <sfx2/docfile.hxx>
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+
+#ifndef _SVX_XFLHTIT_HXX //autogen
+#include <xflhtit.hxx>
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX //autogen
+#include <xflclit.hxx>
+#endif
+
+#ifndef SVX_XFILLIT0_HXX //autogen
+#include <xfillit0.hxx>
+#endif
+
+#define GLOBALOVERFLOW
+#include <segmentc.hxx>
+
+sal_Unicode const pszExtHatch[] = {'s','o','h'};
+sal_Unicode const pszChckHatch[] = {'S','O','H','L'};
+// Neuer Key, damit alte Version (3.00) nicht bei dem
+// Versuch abstuerzt, eine neue Tabelle zu laden.
+sal_Unicode const pszChckHatch0[] = {'S','O','H','0'};
+
+// ------------------
+// class XHatchTable
+// ------------------
+
+/*************************************************************************
+|*
+|* XHatchTable::XHatchTable()
+|*
+*************************************************************************/
+
+XHatchTable::XHatchTable( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyTable( rPath, pInPool, nInitSize, nReSize)
+{
+ pBmpTable = new Table( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XHatchTable::~XHatchTable()
+{
+}
+
+/************************************************************************/
+
+XHatchEntry* XHatchTable::Replace(long nIndex, XHatchEntry* pEntry )
+{
+ return (XHatchEntry*) XPropertyTable::Replace(nIndex, pEntry);
+}
+
+/************************************************************************/
+
+XHatchEntry* XHatchTable::Remove(long nIndex)
+{
+ return (XHatchEntry*) XPropertyTable::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XHatchEntry* XHatchTable::Get(long nIndex) const
+{
+ return (XHatchEntry*) XPropertyTable::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XHatchTable::Load()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XHatchTable::Save()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XHatchTable::Create()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XHatchTable::CreateBitmapsForUI()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+Bitmap* XHatchTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ return( NULL );
+}
+
+/************************************************************************/
+
+SvStream& XHatchTable::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // Tabellentyp schreiben (0 = gesamte Tabelle)
+ rOut << (long)0;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Eintraege
+ XHatchEntry* pEntry = (XHatchEntry*)aTable.First();;
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ rOut << (long)aTable.GetCurKey();
+
+ // UNICODE: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ XHatch& rHatch = pEntry->GetHatch();
+ rOut << (long)rHatch.GetHatchStyle();
+ rOut << rHatch.GetColor().GetRed();
+ rOut << rHatch.GetColor().GetGreen();
+ rOut << rHatch.GetColor().GetBlue();
+ rOut << rHatch.GetDistance();
+ rOut << rHatch.GetAngle();
+ pEntry = (XHatchEntry*)aTable.Next();
+ }
+
+ return rOut;
+}
+
+/************************************************************************/
+
+SvStream& XHatchTable::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpTable;
+ pBmpTable = new Table( 16, 16 );
+
+ XHatchEntry* pEntry = NULL;
+ long nType;
+ long nCount;
+ long nIndex;
+ XubString aName;
+
+ long nStyle;
+ USHORT nRed;
+ USHORT nGreen;
+ USHORT nBlue;
+ long nDistance;
+ long nAngle;
+
+ rIn >> nType;
+
+ // gesamte Tabelle?
+ if (nType == 0)
+ {
+ rIn >> nCount;
+ for (long nI = 0; nI < nCount; nI++)
+ {
+ rIn >> nIndex;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ rIn >> nStyle;
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+ rIn >> nDistance;
+ rIn >> nAngle;
+
+ Color aColor ((USHORT)nRed, (USHORT)nGreen, (USHORT)nBlue);
+ XHatch aHatch(aColor, (XHatchStyle)nStyle, nDistance, nAngle);
+ pEntry = new XHatchEntry (aHatch, aName);
+ Insert (nIndex, pEntry);
+ }
+ }
+ return( rIn );
+}
+
+// -----------------
+// class XHatchList
+// -----------------
+
+/*************************************************************************
+|*
+|* XHatchList::XHatchList()
+|*
+*************************************************************************/
+
+XHatchList::XHatchList( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyList ( rPath, pInPool, nInitSize, nReSize),
+ pVD ( NULL ),
+ pXOut ( NULL ),
+ pXFSet ( NULL )
+{
+ pBmpList = new List( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XHatchList::~XHatchList()
+{
+ if( pVD ) delete pVD;
+ if( pXOut ) delete pXOut;
+ if( pXFSet ) delete pXFSet;
+}
+
+/************************************************************************/
+
+XHatchEntry* XHatchList::Replace(XHatchEntry* pEntry, long nIndex )
+{
+ return (XHatchEntry*) XPropertyList::Replace(pEntry, nIndex);
+}
+
+/************************************************************************/
+
+XHatchEntry* XHatchList::Remove(long nIndex)
+{
+ return (XHatchEntry*) XPropertyList::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XHatchEntry* XHatchList::Get(long nIndex) const
+{
+ return (XHatchEntry*) XPropertyList::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XHatchList::Load()
+{
+#ifndef SVX_LIGHT
+ if( bListDirty )
+ {
+ bListDirty = FALSE;
+
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtHatch, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_READ | STREAM_NOCREATE,
+ TRUE, // direkt
+ TRUE ); // Download
+
+ SvStream* pStream = aMedium.GetInStream();
+ if( !pStream )
+ return( FALSE );
+
+ String aCheck;
+ // UNICODE: *pStream >> aCheck;
+ pStream->ReadByteString(aCheck);
+
+ // Handelt es sich um die gew"unschte Tabelle?
+ if( aCheck == String(pszChckHatch, 4) ||
+ aCheck == String(pszChckHatch0, 4) )
+ {
+ ImpRead( *pStream );
+ }
+ else
+ return( FALSE );
+
+ return( pStream->GetError() == SVSTREAM_OK );
+ }
+#endif
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XHatchList::Save()
+{
+#ifndef SVX_LIGHT
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtHatch, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_WRITE | STREAM_TRUNC,
+ TRUE, // direkt
+ FALSE ); // Upload
+ aMedium.IsRemote();
+
+ SvStream* pStream = aMedium.GetOutStream();
+ if( !pStream )
+ return( FALSE );
+
+ // UNICODE: *pStream << String( pszChckHatch0, 4 );
+ pStream->WriteByteString(String( pszChckHatch0, 4 ));
+
+ ImpStore( *pStream );
+
+ aMedium.Close();
+ aMedium.Commit();
+
+ return( aMedium.GetError() == 0 );
+#else
+ return FALSE;
+#endif
+}
+
+/************************************************************************/
+
+BOOL XHatchList::Create()
+{
+ XubString aStr( SVX_RES( RID_SVXSTR_HATCH ) );
+ xub_StrLen nLen;
+
+ aStr.AppendAscii(" 1");
+ nLen = aStr.Len() - 1;
+ Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLACK),XHATCH_SINGLE,100, 0),aStr));
+ aStr.SetChar(nLen, sal_Unicode('2'));
+ Insert(new XHatchEntry(XHatch(RGB_Color(COL_RED ),XHATCH_DOUBLE, 80,450),aStr));
+ aStr.SetChar(nLen, sal_Unicode('3'));
+ Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLUE ),XHATCH_TRIPLE,120, 0),aStr));
+
+ return( TRUE );
+}
+
+/************************************************************************/
+
+BOOL XHatchList::CreateBitmapsForUI()
+{
+ for( long i = 0; i < Count(); i++)
+ {
+ Bitmap* pBmp = CreateBitmapForUI( i, FALSE );
+ DBG_ASSERT( pBmp, "XHatchList: Bitmap(UI) konnte nicht erzeugt werden!" );
+
+ if( pBmp )
+ pBmpList->Insert( pBmp, i );
+ }
+ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+ if( pVD ) { delete pVD; pVD = NULL; }
+ if( pXOut ) { delete pXOut; pXOut = NULL; }
+ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+
+ return( TRUE );
+}
+
+/************************************************************************/
+
+Bitmap* XHatchList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ Point aZero;
+
+ if( !pVD ) // und pXOut und pXFSet
+ {
+ pVD = new VirtualDevice;
+ DBG_ASSERT( pVD, "XHatchList: Konnte kein VirtualDevice erzeugen!" );
+ //pVD->SetMapMode( MAP_100TH_MM );
+ //pVD->SetOutputSize( pVD->PixelToLogic( Size( BITMAP_WIDTH, BITMAP_HEIGHT ) ) );
+ pVD->SetOutputSizePixel( Size( BITMAP_WIDTH, BITMAP_HEIGHT ) );
+
+ pXOut = new XOutputDevice( pVD );
+ DBG_ASSERT( pVD, "XHatchList: Konnte kein XOutDevice erzeugen!" );
+
+ pXFSet = new XFillAttrSetItem( pXPool );
+ DBG_ASSERT( pVD, "XHatchList: Konnte kein XFillAttrSetItem erzeugen!" );
+ }
+
+ // Damit die Schraffuren mit Rahmen angezeigt werden:
+ // MapMode-Aenderungen (100th mm <--> Pixel)
+ Size aPixelSize = pVD->GetOutputSizePixel();
+ pVD->SetMapMode( MAP_PIXEL );
+
+ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_SOLID ) );
+ pXFSet->GetItemSet().Put( XFillColorItem( String(), RGB_Color( COL_WHITE ) ) );
+ pXOut->SetFillAttr( *pXFSet );
+
+ // #73550#
+ pXOut->OverrideLineColor( Color( COL_BLACK ) );
+
+ pXOut->DrawRect( Rectangle( aZero, aPixelSize ) );
+
+ pVD->SetMapMode( MAP_100TH_MM );
+ Size aVDSize = pVD->GetOutputSize();
+ // 1 Pixel (Rahmen) abziehen
+ aVDSize.Width() -= (long) ( aVDSize.Width() / aPixelSize.Width() + 1 );
+ aVDSize.Height() -= (long) ( aVDSize.Height() / aPixelSize.Height() + 1 );
+
+ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_HATCH ) );
+ pXFSet->GetItemSet().Put( XFillHatchItem( String(), Get( nIndex )->GetHatch() ) );
+ pXOut->SetFillAttr( *pXFSet );
+ pXOut->DrawRect( Rectangle( aZero, aVDSize ) );
+
+ Bitmap* pBitmap = new Bitmap( pVD->GetBitmap( aZero, pVD->GetOutputSize() ) );
+
+ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+ if( bDelete )
+ {
+ if( pVD ) { delete pVD; pVD = NULL; }
+ if( pXOut ) { delete pXOut; pXOut = NULL; }
+ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+ }
+
+ return( pBitmap );
+}
+
+/************************************************************************/
+
+SvStream& XHatchList::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // Version statt Anzahl, um auch alte Tabellen zu lesen
+ rOut << (long) -1;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Eintraege
+ XHatchEntry* pEntry = NULL;
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ // Versionsverwaltung: Version 0
+ XIOCompat aIOC( rOut, STREAM_WRITE, 0 );
+
+ pEntry = Get(nIndex);
+
+ // UNICODE: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ XHatch& rHatch = pEntry->GetHatch();
+ rOut << (long)rHatch.GetHatchStyle();
+#ifdef VCL
+ USHORT nCol = rHatch.GetColor().GetRed();
+ nCol = nCol << 8;
+ rOut << nCol;
+
+ nCol = rHatch.GetColor().GetGreen();
+ nCol = nCol << 8;
+ rOut << nCol;
+
+ nCol = rHatch.GetColor().GetBlue();
+ nCol = nCol << 8;
+ rOut << nCol;
+#else
+ rOut << rHatch.GetColor().GetRed();
+ rOut << rHatch.GetColor().GetGreen();
+ rOut << rHatch.GetColor().GetBlue();
+#endif
+ rOut << rHatch.GetDistance();
+ rOut << rHatch.GetAngle();
+ }
+
+ return rOut;
+}
+
+/************************************************************************/
+
+XubString& XHatchList::ConvertName( XubString& rStrName )
+{
+ BOOL bFound = FALSE;
+
+ for( USHORT i=0; i<(RID_SVXSTR_HATCH_DEF_END-RID_SVXSTR_HATCH_DEF_START+1) && !bFound; i++ )
+ {
+ XubString aStrDefName = SVX_RESSTR( RID_SVXSTR_HATCH_DEF_START + i );
+ if( rStrName.Search( aStrDefName ) == 0 )
+ {
+ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( RID_SVXSTR_HATCH_START + i ) );
+ bFound = TRUE;
+ }
+ }
+
+ return rStrName;
+}
+
+/************************************************************************/
+
+SvStream& XHatchList::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpList;
+ pBmpList = new List( 16, 16 );
+
+ XHatchEntry* pEntry = NULL;
+ long nCount;
+ XubString aName;
+
+ long nStyle;
+ USHORT nRed;
+ USHORT nGreen;
+ USHORT nBlue;
+ long nDistance;
+ long nAngle;
+ Color aColor;
+
+ rIn >> nCount;
+
+ if( nCount >= 0 ) // Alte Tabellen (bis 3.00)
+ {
+ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ // UNICODE:rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+ rIn >> nStyle;
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+ rIn >> nDistance;
+ rIn >> nAngle;
+
+#ifdef VCL
+ aColor = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aColor = Color( nRed, nGreen, nBlue );
+#endif
+ XHatch aHatch(aColor, (XHatchStyle)nStyle, nDistance, nAngle);
+ pEntry = new XHatchEntry (aHatch, aName);
+ Insert (pEntry, nIndex);
+ }
+ }
+ else // ab 3.00a
+ {
+ rIn >> nCount;
+
+ for( long nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ // Versionsverwaltung
+ XIOCompat aIOC( rIn, STREAM_READ );
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+ rIn >> nStyle;
+ rIn >> nRed;
+ rIn >> nGreen;
+ rIn >> nBlue;
+ rIn >> nDistance;
+ rIn >> nAngle;
+
+ if (aIOC.GetVersion() > 0)
+ {
+ // lesen neuer Daten ...
+ }
+
+#ifdef VCL
+ aColor = Color( (BYTE) ( nRed >> 8 ),
+ (BYTE) ( nGreen >> 8 ),
+ (BYTE) ( nBlue >> 8 ) );
+#else
+ aColor = Color( nRed, nGreen, nBlue );
+#endif
+ XHatch aHatch(aColor, (XHatchStyle)nStyle, nDistance, nAngle);
+ pEntry = new XHatchEntry (aHatch, aName);
+ Insert (pEntry, nIndex);
+ }
+ }
+ return( rIn );
+}
+
+
+
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
new file mode 100644
index 0000000000..545ab360ff
--- /dev/null
+++ b/svx/source/xoutdev/xtable.cxx
@@ -0,0 +1,544 @@
+/*************************************************************************
+ *
+ * $RCSfile: xtable.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "xtable.hxx"
+#include "xpool.hxx"
+
+#define GLOBALOVERFLOW
+
+// Vergleichsstrings
+sal_Unicode __FAR_DATA pszStandard[] = { 's', 't', 'a', 'n', 'd', 'a', 'r', 'd', '0' };
+
+// Konvertiert in echte RGB-Farben, damit in den Listboxen
+// endlich mal richtig selektiert werden kann.
+Color RGB_Color( ColorData nColorName )
+{
+ Color aColor( nColorName );
+ Color aRGBColor( aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue() );
+ return aRGBColor;
+}
+
+// ---------------------
+// class XPropertyTable
+// ---------------------
+
+/*************************************************************************
+|*
+|* XPropertyTable::XPropertyTable()
+|*
+*************************************************************************/
+
+XPropertyTable::XPropertyTable( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ aTable ( nInitSize, nReSize ),
+ aPath ( rPath ),
+ aName ( pszStandard, 8 ),
+ pXPool ( pInPool ),
+ pBmpTable ( NULL ),
+ bTableDirty ( TRUE ),
+ bBitmapsDirty ( TRUE ),
+ bOwnPool ( FALSE )
+{
+ if( !pXPool )
+ {
+ bOwnPool = TRUE;
+ pXPool = new XOutdevItemPool;
+ DBG_ASSERT( pXPool, "XOutPool konnte nicht erzeugt werden!" );
+ }
+}
+
+/*************************************************************************
+|*
+|* XPropertyTable::XPropertyTable( SvStraem& )
+|*
+*************************************************************************/
+
+XPropertyTable::XPropertyTable( SvStream& rIn ) :
+ pBmpTable ( NULL )
+{
+}
+
+/*************************************************************************
+|*
+|* XPropertyTable::~XPropertyTable()
+|*
+*************************************************************************/
+
+XPropertyTable::~XPropertyTable()
+{
+ XPropertyEntry* pEntry = (XPropertyEntry*)aTable.First();
+ Bitmap* pBitmap = NULL;
+ for (ULONG nIndex = 0; nIndex < aTable.Count(); nIndex++)
+ {
+ delete pEntry;
+ pEntry = (XPropertyEntry*)aTable.Next();
+ }
+ // Hier wird die Bitmaptabelle geloescht
+ if( pBmpTable )
+ {
+ pBitmap = (Bitmap*) pBmpTable->First();
+
+ for( ULONG nIndex = 0; nIndex < pBmpTable->Count(); nIndex++ )
+ {
+ delete pBitmap;
+ pBitmap = (Bitmap*) pBmpTable->Next();
+ }
+ delete pBmpTable;
+ pBmpTable = NULL;
+ }
+ // Eigener Pool wird geloescht
+ if( bOwnPool && pXPool )
+ {
+ delete pXPool;
+ }
+}
+
+/*************************************************************************
+|*
+|* XPropertyTable::Clear()
+|*
+*************************************************************************/
+
+void XPropertyTable::Clear()
+{
+ aTable.Clear();
+ if( pBmpTable )
+ pBmpTable->Clear();
+}
+
+/************************************************************************/
+
+long XPropertyTable::Count() const
+{
+ if( bTableDirty )
+ {
+ // ( (XPropertyTable*) this )->bTableDirty = FALSE; <- im Load()
+ if( !( (XPropertyTable*) this )->Load() )
+ ( (XPropertyTable*) this )->Create();
+ }
+ return( aTable.Count() );
+}
+
+/*************************************************************************
+|*
+|* XPropertyEntry* XPropertyTable::Get()
+|*
+*************************************************************************/
+
+XPropertyEntry* XPropertyTable::Get( long nIndex, USHORT nDummy ) const
+{
+ if( bTableDirty )
+ {
+ // ( (XPropertyTable*) this )->bTableDirty = FALSE; <- im Load()
+ if( !( (XPropertyTable*) this )->Load() )
+ ( (XPropertyTable*) this )->Create();
+ }
+ return (XPropertyEntry*) aTable.GetObject( (ULONG) nIndex );
+}
+
+/*************************************************************************
+|*
+|* long XPropertyTable::Get(const String& rName)
+|*
+*************************************************************************/
+
+long XPropertyTable::Get(const XubString& rName)
+{
+ if( bTableDirty )
+ {
+ // bTableDirty = FALSE;
+ if( !Load() )
+ Create();
+ }
+ long nPos = 0;
+ XPropertyEntry* pEntry = (XPropertyEntry*)aTable.First();
+ while (pEntry && pEntry->GetName() != rName)
+ {
+ nPos++;
+ pEntry = (XPropertyEntry*)aTable.Next();
+ }
+ if (!pEntry) nPos = -1;
+ return nPos;
+}
+
+/*************************************************************************
+|*
+|* Bitmap* XPropertyTable::GetBitmap()
+|*
+*************************************************************************/
+
+Bitmap* XPropertyTable::GetBitmap( long nIndex ) const
+{
+ if( pBmpTable )
+ {
+ if( bBitmapsDirty )
+ {
+ ( (XPropertyTable*) this )->bBitmapsDirty = FALSE;
+ ( (XPropertyTable*) this )->CreateBitmapsForUI();
+ }
+
+ if( pBmpTable->Count() >= (ULONG) nIndex )
+ return (Bitmap*) pBmpTable->GetObject( (ULONG) nIndex );
+ }
+ return( NULL );
+}
+
+/*************************************************************************
+|*
+|* void XPropertyTable::Insert()
+|*
+*************************************************************************/
+
+BOOL XPropertyTable::Insert( long nIndex, XPropertyEntry* pEntry )
+{
+ BOOL bReturn = aTable.Insert( (ULONG) nIndex, pEntry );
+
+ if( pBmpTable && !bBitmapsDirty )
+ {
+ Bitmap* pBmp = CreateBitmapForUI( (ULONG) nIndex );
+ pBmpTable->Insert( (ULONG) nIndex, pBmp );
+ }
+ return bReturn;
+}
+
+/*************************************************************************
+|*
+|* void XPropertyTable::Replace()
+|*
+*************************************************************************/
+
+XPropertyEntry* XPropertyTable::Replace( long nIndex, XPropertyEntry* pEntry )
+{
+ XPropertyEntry* pOldEntry = (XPropertyEntry*) aTable.Replace( (ULONG) nIndex, pEntry );
+
+ if( pBmpTable && !bBitmapsDirty )
+ {
+ Bitmap* pBmp = CreateBitmapForUI( (ULONG) nIndex );
+ Bitmap* pOldBmp = (Bitmap*) pBmpTable->Replace( (ULONG) nIndex, pBmp );
+ if( pOldBmp )
+ delete pOldBmp;
+ }
+ return pOldEntry;
+}
+
+/*************************************************************************
+|*
+|* void XPropertyTable::Remove()
+|*
+*************************************************************************/
+
+XPropertyEntry* XPropertyTable::Remove( long nIndex, USHORT nDummy )
+{
+ if( pBmpTable && !bBitmapsDirty )
+ {
+ Bitmap* pOldBmp = (Bitmap*) pBmpTable->Remove( (ULONG) nIndex );
+ if( pOldBmp )
+ delete pOldBmp;
+ }
+ return (XPropertyEntry*) aTable.Remove((ULONG)nIndex);
+}
+
+/************************************************************************/
+
+void XPropertyTable::SetName( const String& rString )
+{
+ if(rString.Len())
+ {
+ aName = rString;
+ }
+}
+
+// --------------------
+// class XPropertyList
+// --------------------
+
+
+/*************************************************************************
+|*
+|* XPropertyList::XPropertyList()
+|*
+*************************************************************************/
+
+XPropertyList::XPropertyList( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ aList ( nInitSize, nReSize ),
+ aPath ( rPath ),
+ aName ( pszStandard, 8 ),
+ pXPool ( pInPool ),
+ pBmpList ( NULL ),
+ bListDirty ( TRUE ),
+ bBitmapsDirty ( TRUE ),
+ bOwnPool ( FALSE )
+{
+ if( !pXPool )
+ {
+ bOwnPool = TRUE;
+ pXPool = new XOutdevItemPool;
+ DBG_ASSERT( pXPool, "XOutPool konnte nicht erzeugt werden!" );
+ }
+}
+
+/*************************************************************************
+|*
+|* XPropertyList::XPropertyList( SvStraem& )
+|*
+*************************************************************************/
+
+XPropertyList::XPropertyList( SvStream& rIn ) :
+ pBmpList ( NULL )
+{
+}
+
+/*************************************************************************
+|*
+|* XPropertyList::~XPropertyList()
+|*
+*************************************************************************/
+
+XPropertyList::~XPropertyList()
+{
+ XPropertyEntry* pEntry = (XPropertyEntry*)aList.First();
+ Bitmap* pBitmap = NULL;
+ for( ULONG nIndex = 0; nIndex < aList.Count(); nIndex++ )
+ {
+ delete pEntry;
+ pEntry = (XPropertyEntry*)aList.Next();
+ }
+
+ if( pBmpList )
+ {
+ pBitmap = (Bitmap*) pBmpList->First();
+
+ for( ULONG nIndex = 0; nIndex < pBmpList->Count(); nIndex++ )
+ {
+ delete pBitmap;
+ pBitmap = (Bitmap*) pBmpList->Next();
+ }
+ delete pBmpList;
+ pBmpList = NULL;
+ }
+
+ if( bOwnPool && pXPool )
+ {
+ delete pXPool;
+ }
+}
+
+/*************************************************************************
+|*
+|* XPropertyList::Clear()
+|*
+*************************************************************************/
+
+void XPropertyList::Clear()
+{
+ aList.Clear();
+ if( pBmpList )
+ pBmpList->Clear();
+}
+
+/************************************************************************/
+
+long XPropertyList::Count() const
+{
+ if( bListDirty )
+ {
+ // ( (XPropertyList*) this )->bListDirty = FALSE; <- im Load()
+ if( !( (XPropertyList*) this )->Load() )
+ ( (XPropertyList*) this )->Create();
+ }
+ return( aList.Count() );
+}
+
+/*************************************************************************
+|*
+|* XPropertyEntry* XPropertyList::Get()
+|*
+*************************************************************************/
+
+XPropertyEntry* XPropertyList::Get( long nIndex, USHORT nDummy ) const
+{
+ if( bListDirty )
+ {
+ // ( (XPropertyList*) this )->bListDirty = FALSE; <- im Load()
+ if( !( (XPropertyList*) this )->Load() )
+ ( (XPropertyList*) this )->Create();
+ }
+ return (XPropertyEntry*) aList.GetObject( (ULONG) nIndex );
+}
+
+/*************************************************************************
+|*
+|* XPropertyList::Get()
+|*
+*************************************************************************/
+
+long XPropertyList::Get(const XubString& rName)
+{
+ if( bListDirty )
+ {
+ //bListDirty = FALSE;
+ if( !Load() )
+ Create();
+ }
+ long nPos = 0;
+ XPropertyEntry* pEntry = (XPropertyEntry*)aList.First();
+ while (pEntry && pEntry->GetName() != rName)
+ {
+ nPos++;
+ pEntry = (XPropertyEntry*)aList.Next();
+ }
+ if (!pEntry) nPos = -1;
+ return nPos;
+}
+
+/*************************************************************************
+|*
+|* Bitmap* XPropertyList::GetBitmap()
+|*
+*************************************************************************/
+
+Bitmap* XPropertyList::GetBitmap( long nIndex ) const
+{
+ if( pBmpList )
+ {
+ if( bBitmapsDirty )
+ {
+ ( (XPropertyList*) this )->bBitmapsDirty = FALSE;
+ ( (XPropertyList*) this )->CreateBitmapsForUI();
+ }
+ if( pBmpList->Count() >= (ULONG) nIndex )
+ return (Bitmap*) pBmpList->GetObject( (ULONG) nIndex );
+ }
+ return( NULL );
+}
+
+/*************************************************************************
+|*
+|* void XPropertyList::Insert()
+|*
+*************************************************************************/
+
+void XPropertyList::Insert( XPropertyEntry* pEntry, long nIndex )
+{
+ aList.Insert( pEntry, (ULONG) nIndex );
+
+ if( pBmpList && !bBitmapsDirty )
+ {
+ Bitmap* pBmp = CreateBitmapForUI(
+ (ULONG) nIndex < aList.Count() ? nIndex : aList.Count() - 1 );
+ pBmpList->Insert( pBmp, (ULONG) nIndex );
+ }
+}
+
+/*************************************************************************
+|*
+|* void XPropertyList::Replace()
+|*
+*************************************************************************/
+
+XPropertyEntry* XPropertyList::Replace( XPropertyEntry* pEntry, long nIndex )
+{
+ XPropertyEntry* pOldEntry = (XPropertyEntry*) aList.Replace( pEntry, (ULONG) nIndex );
+
+ if( pBmpList && !bBitmapsDirty )
+ {
+ Bitmap* pBmp = CreateBitmapForUI( (ULONG) nIndex );
+ Bitmap* pOldBmp = (Bitmap*) pBmpList->Replace( pBmp, (ULONG) nIndex );
+ if( pOldBmp )
+ delete pOldBmp;
+ }
+ return pOldEntry;
+}
+
+/*************************************************************************
+|*
+|* void XPropertyList::Remove()
+|*
+*************************************************************************/
+
+XPropertyEntry* XPropertyList::Remove( long nIndex, USHORT nDummy )
+{
+ if( pBmpList && !bBitmapsDirty )
+ {
+ Bitmap* pOldBmp = (Bitmap*) pBmpList->Remove( (ULONG) nIndex );
+ if( pOldBmp )
+ delete pOldBmp;
+ }
+ return (XPropertyEntry*) aList.Remove( (ULONG) nIndex );
+}
+
+/************************************************************************/
+
+void XPropertyList::SetName( const String& rString )
+{
+ if(rString.Len())
+ {
+ aName = rString;
+ }
+}
+
+
+
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
new file mode 100644
index 0000000000..6eebd65f98
--- /dev/null
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -0,0 +1,705 @@
+/*************************************************************************
+ *
+ * $RCSfile: xtablend.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+
+#ifndef _SV_VIRDEV_HXX
+#include <vcl/virdev.hxx>
+#endif
+
+#ifndef _SV_APP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _SFXDOCFILE_HXX
+#include <sfx2/docfile.hxx>
+#endif
+
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+
+#include "xtable.hxx"
+#include "xiocomp.hxx"
+#include "xpool.hxx"
+#include "xoutx.hxx"
+
+#ifndef SVX_XFILLIT0_HXX //autogen
+#include <xfillit0.hxx>
+#endif
+
+#ifndef _SVX_XFLCLIT_HXX //autogen
+#include <xflclit.hxx>
+#endif
+
+#ifndef _SVX_XLNSTWIT_HXX //autogen
+#include <xlnstwit.hxx>
+#endif
+
+#ifndef _SVX_XLNEDWIT_HXX //autogen
+#include <xlnedwit.hxx>
+#endif
+
+#ifndef _SVX_XLNCLIT_HXX //autogen
+#include <xlnclit.hxx>
+#endif
+
+#ifndef _SVX_XLINEIT0_HXX //autogen
+#include <xlineit0.hxx>
+#endif
+
+#ifndef _SVX_XLNSTIT_HXX //autogen
+#include <xlnstit.hxx>
+#endif
+
+#ifndef _SVX_XLNEDIT_HXX //autogen
+#include <xlnedit.hxx>
+#endif
+
+#define GLOBALOVERFLOW
+
+sal_Unicode const pszExtLineEnd[] = {'s','o','e'};
+sal_Unicode const pszChckLineEnd[] = {'S','O','E','L'};
+// Neuer Key, damit alte Version (3.00) nicht bei dem
+// Versuch abstuerzt, eine neue Tabelle zu laden.
+sal_Unicode const pszChckLineEnd0[] = {'S','O','E','0'};
+
+// --------------------
+// class XLineEndTable
+// --------------------
+
+/*************************************************************************
+|*
+|* XLineEndTable::XLineEndTable()
+|*
+*************************************************************************/
+
+XLineEndTable::XLineEndTable( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyTable( rPath, pInPool, nInitSize, nReSize)
+{
+ pBmpTable = new Table( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XLineEndTable::~XLineEndTable()
+{
+}
+
+/************************************************************************/
+
+XLineEndEntry* XLineEndTable::Replace(long nIndex, XLineEndEntry* pEntry )
+{
+ return (XLineEndEntry*) XPropertyTable::Replace(nIndex, pEntry);
+}
+
+/************************************************************************/
+
+XLineEndEntry* XLineEndTable::Remove(long nIndex)
+{
+ return (XLineEndEntry*) XPropertyTable::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XLineEndEntry* XLineEndTable::Get(long nIndex) const
+{
+ return (XLineEndEntry*) XPropertyTable::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XLineEndTable::Load()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XLineEndTable::Save()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XLineEndTable::Create()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+Bitmap* XLineEndTable::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ return( NULL );
+}
+
+/************************************************************************/
+
+BOOL XLineEndTable::CreateBitmapsForUI()
+{
+ return( FALSE );
+}
+
+/************************************************************************/
+
+SvStream& XLineEndTable::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // 2. Version
+ rOut << (long)-1;
+
+ // Tabellentyp schreiben (0 = gesamte Tabelle)
+ rOut << (long)0;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Polygone
+ XLineEndEntry* pEntry = (XLineEndEntry*)aTable.First();
+ for (long nIndex = 0; nIndex < Count(); nIndex++)
+ {
+ rOut << (long)aTable.GetCurKey();
+
+ // UNICODE: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ XPolygon& rXPoly = pEntry->GetLineEnd();
+ rOut << rXPoly;
+
+ pEntry = (XLineEndEntry*)aTable.Next();
+ }
+ return rOut;
+}
+
+/************************************************************************/
+
+SvStream& XLineEndTable::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpTable;
+ pBmpTable = new Table( 16, 16 );
+
+ XLineEndEntry* pEntry = NULL;
+ long nVersion;
+ long nType;
+ long nCount;
+ long nIndex;
+ XubString aName;
+ long nFlags;
+
+ rIn >> nVersion;
+
+ if( nVersion == -1L ) // 2. Version
+ {
+ rIn >> nType;
+
+ // gesamte Tabelle?
+ if (nType == 0)
+ {
+ rIn >> nCount;
+ for (long nI = 0; nI < nCount; nI++)
+ {
+ rIn >> nIndex;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ USHORT nPoints;
+ ULONG nTemp;
+ Point aPoint;
+ rIn >> nTemp; nPoints = (USHORT)nTemp;
+ XPolygon* pXPoly = new XPolygon(nPoints);
+ for (USHORT nPoint = 0; nPoint < nPoints; nPoint++)
+ {
+ rIn >> aPoint.X();
+ rIn >> aPoint.Y();
+ rIn >> nFlags;
+ pXPoly->Insert(nPoint, aPoint, (XPolyFlags)nFlags);
+ }
+
+ pEntry = new XLineEndEntry (*pXPoly, aName);
+ Insert (nIndex, pEntry);
+ }
+ }
+ }
+ else // 1. Version
+ {
+ nType = nVersion;
+
+ // gesamte Tabelle?
+ if (nType == 0)
+ {
+ XPolygon aXPoly;
+
+ rIn >> nCount;
+ for (long nI = 0; nI < nCount; nI++)
+ {
+ rIn >> nIndex;
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ rIn >> aXPoly;
+ XPolygon* pXPoly = new XPolygon( aXPoly );
+
+ pEntry = new XLineEndEntry( *pXPoly, aName );
+ Insert( nIndex, pEntry );
+ }
+ }
+ }
+ return( rIn );
+}
+
+// --------------------
+// class XLineEndList
+// --------------------
+
+/*************************************************************************
+|*
+|* XLineEndList::XLineEndList()
+|*
+*************************************************************************/
+
+XLineEndList::XLineEndList( const String& rPath,
+ XOutdevItemPool* pInPool,
+ USHORT nInitSize, USHORT nReSize ) :
+ XPropertyList( rPath, pInPool, nInitSize, nReSize),
+ pVD ( NULL ),
+ pXOut ( NULL ),
+ pXFSet ( NULL ),
+ pXLSet ( NULL )
+{
+ pBmpList = new List( nInitSize, nReSize );
+}
+
+/************************************************************************/
+
+XLineEndList::~XLineEndList()
+{
+ if( pVD ) delete pVD;
+ if( pXOut ) delete pXOut;
+ if( pXFSet ) delete pXFSet;
+ if( pXLSet ) delete pXLSet;
+}
+
+/************************************************************************/
+
+XLineEndEntry* XLineEndList::Replace(XLineEndEntry* pEntry, long nIndex )
+{
+ return (XLineEndEntry*) XPropertyList::Replace(pEntry, nIndex);
+}
+
+/************************************************************************/
+
+XLineEndEntry* XLineEndList::Remove(long nIndex)
+{
+ return (XLineEndEntry*) XPropertyList::Remove(nIndex, 0);
+}
+
+/************************************************************************/
+
+XLineEndEntry* XLineEndList::Get(long nIndex) const
+{
+ return (XLineEndEntry*) XPropertyList::Get(nIndex, 0);
+}
+
+/************************************************************************/
+
+BOOL XLineEndList::Load()
+{
+#ifndef SVX_LIGHT
+ if( bListDirty )
+ {
+ bListDirty = FALSE;
+
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtLineEnd, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_READ | STREAM_NOCREATE,
+ TRUE, // direkt
+ TRUE ); // Download
+
+ SvStream* pStream = aMedium.GetInStream();
+ if( !pStream )
+ return( FALSE );
+
+ String aCheck;
+
+ // UNICODE: *pStream >> aCheck;
+ pStream->ReadByteString(aCheck);
+
+ // Handelt es sich um die gew'unschte Tabelle?
+ if( aCheck == String(pszChckLineEnd, 4) ||
+ aCheck == String(pszChckLineEnd0, 4) )
+ {
+ ImpRead( *pStream );
+ }
+ else
+ return( FALSE );
+
+ return( pStream->GetError() == SVSTREAM_OK );
+ }
+#endif
+ return( FALSE );
+}
+
+/************************************************************************/
+
+BOOL XLineEndList::Save()
+{
+#ifndef SVX_LIGHT
+ INetURLObject aURL;
+
+ aURL.SetSmartURL( aPath );
+ aURL.Append( aName );
+
+ if( !aURL.getExtension().Len() )
+ aURL.setExtension( String( pszExtLineEnd, 3 ) );
+
+ SfxMedium aMedium( aURL.PathToFileName(),
+ STREAM_WRITE | STREAM_TRUNC,
+ TRUE, // direkt
+ FALSE ); // Upload
+ aMedium.IsRemote();
+
+ SvStream* pStream = aMedium.GetOutStream();
+ if( !pStream )
+ return( FALSE );
+
+ // UNICODE: *pStream << String( pszChckLineEnd0, 4 );
+ pStream->WriteByteString(String( pszChckLineEnd0, 4 ));
+
+ ImpStore( *pStream );
+
+ aMedium.Close();
+ aMedium.Commit();
+
+ return( aMedium.GetError() == 0 );
+#else
+ return FALSE;
+#endif
+}
+
+/************************************************************************/
+
+BOOL XLineEndList::Create()
+{
+ XPolygon aTriangle(3);
+ aTriangle[0].X()=10; aTriangle[0].Y()= 0;
+ aTriangle[1].X()= 0; aTriangle[1].Y()=30;
+ aTriangle[2].X()=20; aTriangle[2].Y()=30;
+ Insert( new XLineEndEntry( aTriangle, SVX_RESSTR( RID_SVXSTR_ARROW ) ) );
+
+ XPolygon aSquare(4);
+ aSquare[0].X()= 0; aSquare[0].Y()= 0;
+ aSquare[1].X()=10; aSquare[1].Y()= 0;
+ aSquare[2].X()=10; aSquare[2].Y()=10;
+ aSquare[3].X()= 0; aSquare[3].Y()=10;
+ Insert( new XLineEndEntry( aSquare, SVX_RESSTR( RID_SVXSTR_SQUARE ) ) );
+
+ XPolygon aCircle(Point(0,0),100,100);
+ Insert( new XLineEndEntry( aCircle, SVX_RESSTR( RID_SVXSTR_CIRCLE ) ) );
+
+ return( TRUE );
+}
+
+/************************************************************************/
+
+BOOL XLineEndList::CreateBitmapsForUI()
+{
+ for( long i = 0; i < Count(); i++)
+ {
+ Bitmap* pBmp = CreateBitmapForUI( i, FALSE );
+ DBG_ASSERT( pBmp, "XLineEndList: Bitmap(UI) konnte nicht erzeugt werden!" );
+
+ if( pBmp )
+ pBmpList->Insert( pBmp, i );
+ }
+ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+ if( pVD ) { delete pVD; pVD = NULL; }
+ if( pXOut ) { delete pXOut; pXOut = NULL; }
+ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+ if( pXLSet ){ delete pXLSet; pXLSet = NULL; }
+
+ return( TRUE );
+}
+
+/************************************************************************/
+
+Bitmap* XLineEndList::CreateBitmapForUI( long nIndex, BOOL bDelete )
+{
+ Point aZero;
+ Size aVDSize;
+
+ if( !pVD ) // und pXOut und pXFSet und pXLSet
+ {
+ pVD = new VirtualDevice;
+ DBG_ASSERT( pVD, "XLineEndList: Konnte kein VirtualDevice erzeugen!" );
+ pVD->SetMapMode( MAP_100TH_MM );
+ aVDSize = pVD->PixelToLogic( Size( BITMAP_WIDTH * 2, BITMAP_HEIGHT ) );
+ pVD->SetOutputSize( aVDSize );
+
+ pXOut = new XOutputDevice( pVD );
+ DBG_ASSERT( pVD, "XLineEndList: Konnte kein XOutDevice erzeugen!" );
+
+ pXFSet = new XFillAttrSetItem( pXPool );
+ DBG_ASSERT( pVD, "XLineEndList: Konnte kein XFillAttrSetItem erzeugen!" );
+ pXFSet->GetItemSet().Put( XFillStyleItem( XFILL_SOLID ) );
+ const StyleSettings& rStyleSettings = pVD->GetSettings().GetStyleSettings();
+ pXFSet->GetItemSet().Put( XFillColorItem( String(), rStyleSettings.GetFieldColor() ) );
+
+ pXLSet = new XLineAttrSetItem( pXPool );
+ DBG_ASSERT( pVD, "XLineEndList: Konnte kein XLineAttrSetItem erzeugen!" );
+ pXLSet->GetItemSet().Put( XLineStartWidthItem( aVDSize.Height() ) );
+ pXLSet->GetItemSet().Put( XLineEndWidthItem( aVDSize.Height() ) );
+ pXLSet->GetItemSet().Put( XLineColorItem( String(), RGB_Color( COL_BLACK ) ) );
+
+ }
+ else
+ aVDSize = pVD->GetOutputSize();
+
+ pXLSet->GetItemSet().Put( XLineStyleItem( XLINE_NONE ) );
+ pXOut->SetLineAttr( *pXLSet );
+ pXOut->SetFillAttr( *pXFSet );
+ pXOut->DrawRect( Rectangle( aZero, aVDSize ) );
+
+ pXLSet->GetItemSet().Put( XLineStyleItem( XLINE_SOLID ) );
+ pXLSet->GetItemSet().Put( XLineStartItem( String(), Get( nIndex )->GetLineEnd() ) );
+ pXLSet->GetItemSet().Put( XLineEndItem( String(), Get( nIndex )->GetLineEnd() ) );
+ pXOut->SetLineAttr( *pXLSet );
+ pXOut->DrawLine( Point( 0, aVDSize.Height() / 2 ),
+ Point( aVDSize.Width(), aVDSize.Height() / 2 ) );
+
+ Bitmap* pBitmap = new Bitmap( pVD->GetBitmap( aZero, aVDSize ) );
+
+ // Loeschen, da JOE den Pool vorm Dtor entfernt!
+ if( bDelete )
+ {
+ if( pVD ) { delete pVD; pVD = NULL; }
+ if( pXOut ) { delete pXOut; pXOut = NULL; }
+ if( pXFSet ){ delete pXFSet; pXFSet = NULL; }
+ if( pXLSet ){ delete pXLSet; pXLSet = NULL; }
+ }
+
+ return( pBitmap );
+}
+
+/************************************************************************/
+
+SvStream& XLineEndList::ImpStore( SvStream& rOut )
+{
+ // Schreiben
+ rOut.SetStreamCharSet( gsl_getSystemTextEncoding() );
+
+ // 3. Version
+ rOut << (long) -2;
+
+ // Anzahl der Eintraege
+ rOut << (long)Count();
+
+ // die Polygone
+ XLineEndEntry* pEntry = NULL;
+ for( long nIndex = 0; nIndex < Count(); nIndex++ )
+ {
+ // Versionsverwaltung (auch abwaertskompatibel): Version 0
+ XIOCompat aIOC( rOut, STREAM_WRITE, 0 );
+
+ pEntry = Get( nIndex );
+ // UNICODE: rOut << pEntry->GetName();
+ rOut.WriteByteString(pEntry->GetName());
+
+ XPolygon& rXPoly = pEntry->GetLineEnd();
+ rOut << rXPoly;
+ }
+ return rOut;
+}
+
+/************************************************************************/
+
+XubString& XLineEndList::ConvertName( XubString& rStrName )
+{
+ BOOL bFound = FALSE;
+
+ for( USHORT i=0; i<(RID_SVXSTR_LEND_DEF_END-RID_SVXSTR_LEND_DEF_START+1) && !bFound; i++ )
+ {
+ XubString aStrDefName = SVX_RESSTR( RID_SVXSTR_LEND_DEF_START + i );
+ if( rStrName.Search( aStrDefName ) == 0 )
+ {
+ rStrName.Replace( 0, aStrDefName.Len(), SVX_RESSTR( RID_SVXSTR_LEND_START + i ) );
+ bFound = TRUE;
+ }
+ }
+
+ return rStrName;
+}
+
+/************************************************************************/
+
+SvStream& XLineEndList::ImpRead( SvStream& rIn )
+{
+ // Lesen
+ rIn.SetStreamCharSet( RTL_TEXTENCODING_IBM_850 );
+
+ delete pBmpList;
+ pBmpList = new List( 16, 16 );
+
+ XLineEndEntry* pEntry = NULL;
+ long nVersion;
+ long nCount;
+ XubString aName;
+ long nFlags;
+
+ rIn >> nVersion;
+
+ if( nVersion >= 0 ) // 1. Version
+ {
+ nCount = nVersion;
+ for( long nI = 0; nI < nCount; nI++ )
+ {
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+
+ aName = ConvertName( aName );
+ USHORT nPoints;
+ ULONG nTemp;
+ Point aPoint;
+ rIn >> nTemp; nPoints = (USHORT)nTemp;
+ XPolygon* pXPoly = new XPolygon(nPoints);
+ for (USHORT nPoint = 0; nPoint < nPoints; nPoint++)
+ {
+ rIn >> aPoint.X();
+ rIn >> aPoint.Y();
+ rIn >> nFlags;
+ pXPoly->Insert(nPoint, aPoint, (XPolyFlags)nFlags);
+ }
+
+ pEntry = new XLineEndEntry( *pXPoly, aName );
+ Insert( pEntry, nI );
+ }
+ }
+ else if( nVersion == -1L ) // 2. Version
+ {
+ rIn >> nCount;
+ for( long nI = 0; nI < nCount; nI++ )
+ {
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+ aName = ConvertName( aName );
+
+ XPolygon* pXPoly = new XPolygon;
+ rIn >> *pXPoly;
+
+ pEntry = new XLineEndEntry( *pXPoly, aName );
+ Insert( pEntry, nI );
+ }
+ }
+ else // ab 3.00a
+ {
+ rIn >> nCount;
+ for( long nI = 0; nI < nCount; nI++ )
+ {
+ // Versionsverwaltung
+ XIOCompat aIOC( rIn, STREAM_READ );
+
+ // UNICODE: rIn >> aName;
+ rIn.ReadByteString(aName);
+ aName = ConvertName( aName );
+
+ XPolygon aXPoly;
+ rIn >> aXPoly;
+
+ if (aIOC.GetVersion() > 0)
+ {
+ // lesen neuer Daten ...
+ }
+
+ pEntry = new XLineEndEntry( aXPoly, aName );
+ Insert( pEntry, nI );
+ }
+ }
+ return( rIn );
+}
+
+
+
diff --git a/svx/util/gal.dxp b/svx/util/gal.dxp
new file mode 100644
index 0000000000..227006cc4e
--- /dev/null
+++ b/svx/util/gal.dxp
@@ -0,0 +1,21 @@
+CreateLoader
+Gallery_GetPath
+Gallery_GetPathAsString
+Gallery_GetFilterName
+Gallery_GetGraphic
+Gallery_GetVCDrawModel
+Gallery_IsLinkage
+Gallery_FillThemeList
+Gallery_FillObjList
+Gallery_InsertURL
+Gallery_GetObjCount
+Gallery_GetGraphicObj
+Gallery_InsertGraphicObj
+Gallery_GetSdrObjCount
+Gallery_GetSdrObj
+Gallery_InsertSdrObj
+Gallery_GetThemeNameFromId
+Gallery_BeginLocking
+Gallery_EndLocking
+component_writeInfo
+component_getFactory
diff --git a/svx/util/hidother.hrc b/svx/util/hidother.hrc
new file mode 100644
index 0000000000..f5e3ff9235
--- /dev/null
+++ b/svx/util/hidother.hrc
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * $RCSfile: hidother.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define HID_INTERFACE_BASIDE_VIEWSH 451
diff --git a/svx/util/hidother.src b/svx/util/hidother.src
new file mode 100644
index 0000000000..e5eba39cdd
--- /dev/null
+++ b/svx/util/hidother.src
@@ -0,0 +1,361 @@
+/*************************************************************************
+ *
+ * $RCSfile: hidother.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 "../inc/helpid.hrc" // HID_XXX
+#include "hidother.hrc"
+#include "svxids.hrc"
+#include "../inc/fmhelp.hrc"
+
+hidspecial SID_GALLERY_IMPORTTHEME { HelpID = SID_GALLERY_IMPORTTHEME; };
+hidspecial HID_GALLERY_NEW_THEME { HelpID = HID_GALLERY_NEW_THEME; };
+hidspecial HID_GALLERY_WINDOW { HelpID = HID_GALLERY_WINDOW; };
+hidspecial HID_GALLERY_TITLE { HelpID = HID_GALLERY_TITLE; };
+hidspecial HID_IMPGRF_BTN_STANDARD { HelpID = HID_IMPGRF_BTN_STANDARD; };
+hidspecial HID_IMPGRF_BTN_INTERNET { HelpID = HID_IMPGRF_BTN_INTERNET; };
+hidspecial HID_IMPGRF_BTN_PROPERTIES { HelpID = HID_IMPGRF_BTN_PROPERTIES; };
+hidspecial HID_IMPGRF_BTN_FILTER { HelpID = HID_IMPGRF_BTN_FILTER; };
+hidspecial HID_IMPGRF_CB_LINK { HelpID = HID_IMPGRF_CB_LINK; };
+hidspecial HID_IMPGRF_CB_PREVIEW { HelpID = HID_IMPGRF_CB_PREVIEW; };
+hidspecial HID_INTERFACE_BASIDE_VIEWSH { HelpID = HID_INTERFACE_BASIDE_VIEWSH; };
+hidspecial HID_POPUP_COLOR { HelpID = HID_POPUP_COLOR; };
+hidspecial HID_POPUP_BRUSH { HelpID = HID_POPUP_BRUSH; };
+hidspecial HID_POPUP_FRAME { HelpID = HID_POPUP_FRAME; };
+hidspecial HID_POPUP_LINE { HelpID = HID_POPUP_LINE ; };
+hidspecial HID_TPCOLOR_RGB_1 { HelpID = HID_TPCOLOR_RGB_1; };
+hidspecial HID_TPCOLOR_RGB_2 { HelpID = HID_TPCOLOR_RGB_2; };
+hidspecial HID_TPCOLOR_RGB_3 { HelpID = HID_TPCOLOR_RGB_3; };
+hidspecial HID_TPCOLOR_CMYK_1 { HelpID = HID_TPCOLOR_CMYK_1; };
+hidspecial HID_TPCOLOR_CMYK_2 { HelpID = HID_TPCOLOR_CMYK_2; };
+hidspecial HID_TPCOLOR_CMYK_3 { HelpID = HID_TPCOLOR_CMYK_3; };
+hidspecial HID_REDLINING_FILTER_CB_ACTION { HelpID = HID_REDLINING_FILTER_CB_ACTION; };
+
+hidspecial HID_PROP_GROUPBOX { HelpID = HID_PROP_GROUPBOX; };
+hidspecial HID_PROP_CONTROLSOURCE { HelpID = HID_PROP_CONTROLSOURCE; };
+hidspecial HID_PROP_NAME { HelpID = HID_PROP_NAME; };
+hidspecial HID_PROP_TABINDEX { HelpID = HID_PROP_TABINDEX; };
+hidspecial HID_PROP_MASTERFIELDS { HelpID = HID_PROP_MASTERFIELDS; };
+hidspecial HID_PROP_SLAVEFIELDS { HelpID = HID_PROP_SLAVEFIELDS; };
+hidspecial HID_PROP_DATASOURCE { HelpID = HID_PROP_DATASOURCE; };
+hidspecial HID_PROP_CURSORSOURCE { HelpID = HID_PROP_CURSORSOURCE; };
+hidspecial HID_PROP_CURSORSOURCETYPE { HelpID = HID_PROP_CURSORSOURCETYPE; };
+hidspecial HID_PROP_CURSORTYPE { HelpID = HID_PROP_CURSORTYPE; };
+hidspecial HID_PROP_READONLY { HelpID = HID_PROP_READONLY; };
+hidspecial HID_PROP_DATAENTRY { HelpID = HID_PROP_DATAENTRY; };
+hidspecial HID_PROP_NAVIGATION { HelpID = HID_PROP_NAVIGATION; };
+hidspecial HID_PROP_CYCLE { HelpID = HID_PROP_CYCLE; };
+hidspecial HID_PROP_ALLOW_ADDITIONS { HelpID = HID_PROP_ALLOW_ADDITIONS ; };
+hidspecial HID_PROP_ALLOW_EDITS { HelpID = HID_PROP_ALLOW_EDITS ; };
+hidspecial HID_PROP_ALLOW_DELETIONS { HelpID = HID_PROP_ALLOW_DELETIONS ; };
+hidspecial HID_PROP_DIRTY { HelpID = HID_PROP_DIRTY; };
+hidspecial HID_PROP_OLDVALUE { HelpID = HID_PROP_OLDVALUE; };
+hidspecial HID_PROP_VALUE { HelpID = HID_PROP_VALUE; };
+hidspecial HID_PROP_LOCKED { HelpID = HID_PROP_LOCKED; };
+hidspecial HID_PROP_FORMATKEY { HelpID = HID_PROP_FORMATKEY ; };
+hidspecial HID_PROP_REQUIRED { HelpID = HID_PROP_REQUIRED; };
+hidspecial HID_PROP_SCALE { HelpID = HID_PROP_SCALE; };
+hidspecial HID_PROP_SIZE { HelpID = HID_PROP_SIZE; };
+hidspecial HID_PROP_UNIQUE { HelpID = HID_PROP_UNIQUE; };
+hidspecial HID_PROP_CLASSID { HelpID = HID_PROP_CLASSID; };
+hidspecial HID_PROP_LEFT { HelpID = HID_PROP_LEFT; };
+hidspecial HID_PROP_RIGHT { HelpID = HID_PROP_RIGHT; };
+hidspecial HID_PROP_HEIGHT { HelpID = HID_PROP_HEIGHT; };
+hidspecial HID_PROP_WIDTH { HelpID = HID_PROP_WIDTH; };
+hidspecial HID_PROP_BOUNDCOLUMN { HelpID = HID_PROP_BOUNDCOLUMN; };
+hidspecial HID_PROP_LISTSOURCETYPE { HelpID = HID_PROP_LISTSOURCETYPE; };
+hidspecial HID_PROP_LISTSOURCE { HelpID = HID_PROP_LISTSOURCE; };
+hidspecial HID_PROP_LISTINDEX { HelpID = HID_PROP_LISTINDEX; };
+hidspecial HID_PROP_TEXT { HelpID = HID_PROP_TEXT; };
+hidspecial HID_PROP_LABEL { HelpID = HID_PROP_LABEL; };
+hidspecial HID_PROP_STRINGITEMLIST { HelpID = HID_PROP_STRINGITEMLIST; };
+hidspecial HID_PROP_SEARCHING { HelpID = HID_PROP_SEARCHING; };
+hidspecial HID_PROP_FONT { HelpID = HID_PROP_FONT; };
+hidspecial HID_PROP_ROWHEIGHT { HelpID = HID_PROP_ROWHEIGHT; };
+hidspecial HID_PROP_BACKGROUNDCOLOR { HelpID = HID_PROP_BACKGROUNDCOLOR ; };
+hidspecial HID_PROP_FILLCOLOR { HelpID = HID_PROP_FILLCOLOR; };
+hidspecial HID_PROP_TEXTCOLOR { HelpID = HID_PROP_TEXTCOLOR; };
+hidspecial HID_PROP_LINECOLOR { HelpID = HID_PROP_LINECOLOR; };
+hidspecial HID_PROP_BORDER { HelpID = HID_PROP_BORDER; };
+hidspecial HID_PROP_ALIGN { HelpID = HID_PROP_ALIGN; };
+hidspecial HID_PROP_DROPDOWN { HelpID = HID_PROP_DROPDOWN; };
+hidspecial HID_PROP_MULTILINE { HelpID = HID_PROP_MULTILINE; };
+hidspecial HID_PROP_HSCROLL { HelpID = HID_PROP_HSCROLL; };
+hidspecial HID_PROP_VSCROLL { HelpID = HID_PROP_VSCROLL; };
+hidspecial HID_PROP_TABSTOP { HelpID = HID_PROP_TABSTOP; };
+hidspecial HID_PROP_REFVALUE { HelpID = HID_PROP_REFVALUE; };
+hidspecial HID_PROP_BUTTONTYPE { HelpID = HID_PROP_BUTTONTYPE; };
+hidspecial HID_PROP_SUBMIT_ACTION { HelpID = HID_PROP_SUBMIT_ACTION; };
+hidspecial HID_PROP_SUBMIT_METHOD { HelpID = HID_PROP_SUBMIT_METHOD; };
+hidspecial HID_PROP_SUBMIT_ENCODING { HelpID = HID_PROP_SUBMIT_ENCODING; };
+hidspecial HID_PROP_DEFAULTVALUE { HelpID = HID_PROP_DEFAULTVALUE; };
+hidspecial HID_PROP_SUBMIT_TARGET { HelpID = HID_PROP_SUBMIT_TARGET; };
+hidspecial HID_PROP_DEFAULT_CHECKED { HelpID = HID_PROP_DEFAULT_CHECKED; };
+hidspecial HID_PROP_IMAGE_URL { HelpID = HID_PROP_IMAGE_URL; };
+hidspecial HID_PROP_DEFAULT_SELECT_SEQ { HelpID = HID_PROP_DEFAULT_SELECT_SEQ; };
+hidspecial HID_PROP_MULTISELECTION { HelpID = HID_PROP_MULTISELECTION; };
+
+hidspecial HID_PROP_DATE { HelpID = HID_PROP_DATE; };
+hidspecial HID_PROP_DATEMIN { HelpID = HID_PROP_DATEMIN; };
+hidspecial HID_PROP_DATEMAX { HelpID = HID_PROP_DATEMAX; };
+hidspecial HID_PROP_DATEFORMAT { HelpID = HID_PROP_DATEFORMAT; };
+hidspecial HID_PROP_TIME { HelpID = HID_PROP_TIME; };
+hidspecial HID_PROP_TIMEMIN { HelpID = HID_PROP_TIMEMIN; };
+hidspecial HID_PROP_TIMEMAX { HelpID = HID_PROP_TIMEMAX; };
+hidspecial HID_PROP_TIMEFORMAT { HelpID = HID_PROP_TIMEFORMAT; };
+hidspecial HID_PROP_VALUEMIN { HelpID = HID_PROP_VALUEMIN; };
+hidspecial HID_PROP_VALUEMAX { HelpID = HID_PROP_VALUEMAX; };
+hidspecial HID_PROP_VALUESTEP { HelpID = HID_PROP_VALUESTEP; };
+hidspecial HID_PROP_CURRENCYSYMBOL { HelpID = HID_PROP_CURRENCYSYMBOL; };
+hidspecial HID_PROP_EDITMASK { HelpID = HID_PROP_EDITMASK; };
+hidspecial HID_PROP_LITERALMASK { HelpID = HID_PROP_LITERALMASK; };
+hidspecial HID_PROP_ENABLED { HelpID = HID_PROP_ENABLED; };
+hidspecial HID_PROP_AUTOCOMPLETE { HelpID = HID_PROP_AUTOCOMPLETE; };
+hidspecial HID_PROP_LINECOUNT { HelpID = HID_PROP_LINECOUNT; };
+hidspecial HID_PROP_MAXTEXTLEN { HelpID = HID_PROP_MAXTEXTLEN; };
+hidspecial HID_PROP_SPIN { HelpID = HID_PROP_SPIN; };
+hidspecial HID_PROP_STRICTFORMAT { HelpID = HID_PROP_STRICTFORMAT; };
+hidspecial HID_PROP_SHOWTHOUSANDSEP { HelpID = HID_PROP_SHOWTHOUSANDSEP; };
+hidspecial HID_PROP_HARDLINEBREAKS { HelpID = HID_PROP_HARDLINEBREAKS; };
+hidspecial HID_PROP_TARGET_URL { HelpID = HID_PROP_TARGET_URL; };
+hidspecial HID_PROP_TARGET_FRAME { HelpID = HID_PROP_TARGET_FRAME; };
+hidspecial HID_PROP_TAG { HelpID = HID_PROP_TAG; };
+hidspecial HID_PROP_ECHO_CHAR { HelpID = HID_PROP_ECHO_CHAR; };
+hidspecial HID_PROP_EMPTY_IS_NULL { HelpID = HID_PROP_EMPTY_IS_NULL; };
+hidspecial HID_PROP_DECIMAL_ACCURACY { HelpID = HID_PROP_DECIMAL_ACCURACY; };
+hidspecial HID_PROP_DATE_SHOW_CENTURY { HelpID = HID_PROP_DATE_SHOW_CENTURY; };
+hidspecial HID_PROP_DEFAULT_BUTTON { HelpID = HID_PROP_DEFAULT_BUTTON; };
+hidspecial HID_PROP_HIDDEN_VALUE { HelpID = HID_PROP_HIDDEN_VALUE; };
+hidspecial HID_PROP_TRISTATE { HelpID =HID_PROP_TRISTATE; };
+hidspecial HID_PROP_NAVIGATIONBAR { HelpID =HID_PROP_NAVIGATIONBAR; };
+hidspecial HID_PROP_FILTER_CRITERIA { HelpID =HID_PROP_FILTER_CRITERIA; };
+hidspecial HID_PROP_SORT_CRITERIA { HelpID =HID_PROP_SORT_CRITERIA; };
+hidspecial HID_PROP_DEFAULT_LONG_VALUE { HelpID =HID_PROP_DEFAULT_LONG_VALUE; };
+hidspecial HID_PROP_DEFAULT_TIME { HelpID =HID_PROP_DEFAULT_TIME; };
+hidspecial HID_PROP_DEFAULT_DATE { HelpID =HID_PROP_DEFAULT_DATE; };
+hidspecial HID_PROP_HELPTEXT { HelpID = HID_PROP_HELPTEXT ;};
+
+hidspecial HID_REDLINING_DLG { HelpID = HID_REDLINING_DLG; };
+hidspecial HID_REDLINING_EDIT { HelpID = HID_REDLINING_EDIT; };
+hidspecial HID_REDLINING_PREV { HelpID = HID_REDLINING_PREV; };
+hidspecial HID_REDLINING_NEXT { HelpID = HID_REDLINING_NEXT; };
+hidspecial HID_REDLINING_TABCONTROL { HelpID = HID_REDLINING_TABCONTROL; };
+
+hidspecial HID_EVT_ACTIONPERFORMED { HelpID =HID_EVT_ACTIONPERFORMED ;};
+hidspecial HID_EVT_AFTERDELETE { HelpID =HID_EVT_AFTERDELETE ;};
+hidspecial HID_EVT_AFTERINSERT { HelpID =HID_EVT_AFTERINSERT ;};
+hidspecial HID_EVT_AFTERUPDATE { HelpID =HID_EVT_AFTERUPDATE ;};
+hidspecial HID_EVT_BEFOREDELETE { HelpID =HID_EVT_BEFOREDELETE ;};
+hidspecial HID_EVT_BEFOREINSERT { HelpID =HID_EVT_BEFOREINSERT ;};
+hidspecial HID_EVT_BEFOREUPDATE { HelpID =HID_EVT_BEFOREUPDATE ;};
+hidspecial HID_EVT_COMPONENTHIDDEN { HelpID =HID_EVT_COMPONENTHIDDEN ;};
+hidspecial HID_EVT_COMPONENTMOVED { HelpID =HID_EVT_COMPONENTMOVED ;};
+hidspecial HID_EVT_COMPONENTPAINT { HelpID =HID_EVT_COMPONENTPAINT ;};
+hidspecial HID_EVT_COMPONENTRESIZED { HelpID =HID_EVT_COMPONENTRESIZED ;};
+hidspecial HID_EVT_COMPONENTSHOWN { HelpID =HID_EVT_COMPONENTSHOWN ;};
+hidspecial HID_EVT_CONFIRMDELETE { HelpID =HID_EVT_CONFIRMDELETE ;};
+hidspecial HID_EVT_ELEMENTINSERTED { HelpID =HID_EVT_ELEMENTINSERTED ;};
+hidspecial HID_EVT_ELEMENTREMOVED { HelpID =HID_EVT_ELEMENTREMOVED ;};
+hidspecial HID_EVT_ELEMENTREPLACED { HelpID =HID_EVT_ELEMENTREPLACED ;};
+hidspecial HID_EVT_ERROROCCURED { HelpID =HID_EVT_ERROROCCURED ;};
+hidspecial HID_EVT_FIRING { HelpID =HID_EVT_FIRING ;};
+hidspecial HID_EVT_FOCUSGAINED { HelpID =HID_EVT_FOCUSGAINED ;};
+hidspecial HID_EVT_FOCUSLOST { HelpID =HID_EVT_FOCUSLOST ;};
+hidspecial HID_EVT_ITEMSTATECHANGED { HelpID =HID_EVT_ITEMSTATECHANGED ;};
+hidspecial HID_EVT_KEYTYPED { HelpID =HID_EVT_KEYTYPED ;};
+hidspecial HID_EVT_LOADED { HelpID =HID_EVT_LOADED ;};
+hidspecial HID_EVT_RELOADED { HelpID =HID_EVT_RELOADED ;};
+hidspecial HID_EVT_UNLOADED { HelpID =HID_EVT_UNLOADED ;};
+hidspecial HID_EVT_MOUSEDRAGGED { HelpID =HID_EVT_MOUSEDRAGGED ;};
+hidspecial HID_EVT_MOUSEENTERED { HelpID =HID_EVT_MOUSEENTERED ;};
+hidspecial HID_EVT_MOUSEEXITED { HelpID =HID_EVT_MOUSEEXITED ;};
+hidspecial HID_EVT_MOUSEMOVED { HelpID =HID_EVT_MOUSEMOVED ;};
+hidspecial HID_EVT_MOUSEPRESSED { HelpID =HID_EVT_MOUSEPRESSED ;};
+hidspecial HID_EVT_MOUSERELEASED { HelpID =HID_EVT_MOUSERELEASED ;};
+hidspecial HID_EVT_POSITIONED { HelpID =HID_EVT_POSITIONED ;};
+hidspecial HID_EVT_PROPERTIESCHANGE { HelpID =HID_EVT_PROPERTIESCHANGE ;};
+hidspecial HID_EVT_PROPERTYCHANGE { HelpID =HID_EVT_PROPERTYCHANGE ;};
+hidspecial HID_EVT_PROPERTYSTATECHANGE { HelpID =HID_EVT_PROPERTYSTATECHANGE ;};
+hidspecial HID_EVT_RESETTED { HelpID =HID_EVT_RESETTED ;};
+hidspecial HID_EVT_SUBMITTED { HelpID =HID_EVT_SUBMITTED ;};
+hidspecial HID_EVT_TEXTCHANGED { HelpID =HID_EVT_TEXTCHANGED ;};
+hidspecial HID_EVT_UNLOADED { HelpID =HID_EVT_UNLOADED ;};
+hidspecial HID_EVT_UPDATECANCELED { HelpID =HID_EVT_UPDATECANCELED ;};
+hidspecial HID_EVT_VETOABLECHANGE { HelpID =HID_EVT_VETOABLECHANGE ;};
+hidspecial HID_FORM_NAVIGATOR { HelpID =HID_FORM_NAVIGATOR ;};
+hidspecial HID_FORM_NAVIGATOR_WIN { HelpID =HID_FORM_NAVIGATOR_WIN ;};
+hidspecial HID_FIELD_SEL { HelpID =HID_FIELD_SEL ;};
+hidspecial HID_FIELD_SEL_WIN { HelpID =HID_FIELD_SEL_WIN ;};
+hidspecial HID_FILTER_NAVIGATOR { HelpID =HID_FILTER_NAVIGATOR ;};
+hidspecial HID_FILTER_NAVIGATOR_WIN { HelpID =HID_FILTER_NAVIGATOR_WIN ;};
+hidspecial HID_EVT_CHANGED { HelpID =HID_EVT_CHANGED ;};
+hidspecial HID_PROP_PRINTABLE { HelpID =HID_PROP_PRINTABLE ;};
+
+hidspecial HID_FM_DLG_PROP_FORM { HelpID =HID_FM_DLG_PROP_FORM ;};
+hidspecial HID_FM_DLG_PROP_CONTROL { HelpID =HID_FM_DLG_PROP_CONTROL ;};
+hidspecial HID_FM_DLG_PROP_GRIDCTR { HelpID =HID_FM_DLG_PROP_GRIDCTR ;};
+hidspecial HID_FM_PROPDLG_TABCTR { HelpID =HID_FM_PROPDLG_TABCTR ;};
+hidspecial HID_FM_PROPDLG_TAB_GENERAL { HelpID =HID_FM_PROPDLG_TAB_GENERAL;};
+hidspecial HID_FM_PROPDLG_TAB_DATA { HelpID =HID_FM_PROPDLG_TAB_DATA ;};
+hidspecial HID_FM_PROPDLG_TAB_EVT { HelpID =HID_FM_PROPDLG_TAB_EVT ;};
+
+hidspecial HID_VALUESET_SINGLENUM { HelpID = HID_VALUESET_SINGLENUM ;};
+hidspecial HID_VALUESET_BULLET { HelpID = HID_VALUESET_BULLET ;};
+hidspecial HID_VALUESET_NUM { HelpID = HID_VALUESET_NUM ;};
+hidspecial HID_VALUESET_NUMBMP { HelpID = HID_VALUESET_NUMBMP ;};
+
+hidspecial UID_PROP_DLG_FONT_TYPE { HelpID = UID_PROP_DLG_FONT_TYPE ;};
+hidspecial UID_PROP_DLG_IMAGE_URL { HelpID = UID_PROP_DLG_IMAGE_URL ;};
+hidspecial UID_PROP_DLG_BACKGROUNDCOLOR { HelpID = UID_PROP_DLG_BACKGROUNDCOLOR ;};
+hidspecial UID_PROP_DLG_GRAPHIC_IMPORT { HelpID = UID_PROP_DLG_GRAPHIC_IMPORT ;};
+hidspecial UID_PROP_DLG_ATTR_DATASOURCE { HelpID = UID_PROP_DLG_ATTR_DATASOURCE ;};
+hidspecial UID_PROP_DLG_ATTR_TARGET_URL { HelpID = UID_PROP_DLG_ATTR_TARGET_URL ;};
+hidspecial UID_EVT_MACRODLG { HelpID = UID_EVT_MACRODLG ;};
+hidspecial UID_PROP_DLG_CONTROLLABEL { HelpID = UID_PROP_DLG_CONTROLLABEL ;};
+
+hidspecial HID_EVT_APPROVEACTIONPERFORMED { HelpID = HID_EVT_APPROVEACTIONPERFORMED ;};
+hidspecial HID_EVT_APPROVERESETTED { HelpID = HID_EVT_APPROVERESETTED ;};
+hidspecial HID_EVT_KEYUP { HelpID = HID_EVT_KEYUP ;};
+
+hidspecial HID_PROP_HELPURL { HelpID = HID_PROP_HELPURL ;};
+hidspecial HID_PROP_RECORDMARKER { HelpID = HID_PROP_RECORDMARKER ;};
+
+hidspecial HID_OPTPATH_HEADERBAR { HelpId = HID_OPTPATH_HEADERBAR ;};
+hidspecial HID_OPTCOOKIES_HEADERBAR { HelpId = HID_OPTCOOKIES_HEADERBAR ;};
+
+hidspecial HID_TPPAGE_FULLSIZE { HelpId = HID_TPPAGE_FULLSIZE ;};
+hidspecial HID_OPTINET2_CTL_COOKIES { HelpId = HID_OPTINET2_CTL_COOKIES ;};
+hidspecial HID_OPTPATH_CTL_PATH { HelpId = HID_OPTPATH_CTL_PATH ;};
+
+hidspecial HID_TABORDER_CONTROLS { HelpId = HID_TABORDER_CONTROLS ;};
+
+hidspecial HID_POPUP_LINEEND { HelpId = HID_POPUP_LINEEND ;};
+hidspecial HID_POPUP_LINEEND_CTRL { HelpId = HID_POPUP_LINEEND_CTRL ;};
+hidspecial HID_BORDER_DISTANCE_DLG { HelpId = HID_BORDER_DISTANCE_DLG ;};
+
+hidspecial HID_PROP_EFFECTIVEMIN { HelpId = HID_PROP_EFFECTIVEMIN ;};
+hidspecial HID_PROP_EFFECTIVEMAX { HelpId = HID_PROP_EFFECTIVEMAX ;};
+hidspecial HID_PROP_EFFECTIVEDEFAULT { HelpId = HID_PROP_EFFECTIVEDEFAULT ;};
+hidspecial HID_PROP_CONTROLLABEL { HelpId = HID_PROP_CONTROLLABEL ;};
+
+hidspecial HID_BORDER_DISTANCE_DLG_LEFT { HelpID = HID_BORDER_DISTANCE_DLG_LEFT ;};
+hidspecial HID_BORDER_DISTANCE_DLG_RIGHT { HelpID = HID_BORDER_DISTANCE_DLG_RIGHT ;};
+hidspecial HID_BORDER_DISTANCE_DLG_TOP { HelpID = HID_BORDER_DISTANCE_DLG_TOP ;};
+hidspecial HID_BORDER_DISTANCE_DLG_BOTTOM { HelpID = HID_BORDER_DISTANCE_DLG_BOTTOM ;};
+hidspecial HID_BORDER_DISTANCE_DLG_HELP_PB { HelpID = HID_BORDER_DISTANCE_DLG_HELP_PB ;};
+hidspecial HID_BORDER_DISTANCE_DLG_SYNC_CB { HelpID = HID_BORDER_DISTANCE_DLG_SYNC_CB ;};
+hidspecial HID_BORDER_DISTANCE_DLG_EXAMPLE { HelpID = HID_BORDER_DISTANCE_DLG_EXAMPLE ;};
+
+hidspecial HID_GRID_TRAVEL_FIRST { HelpID = HID_GRID_TRAVEL_FIRST ;};
+hidspecial HID_GRID_TRAVEL_PREV { HelpID = HID_GRID_TRAVEL_PREV ;};
+hidspecial HID_GRID_TRAVEL_NEXT { HelpID = HID_GRID_TRAVEL_NEXT ;};
+hidspecial HID_GRID_TRAVEL_LAST { HelpID = HID_GRID_TRAVEL_LAST ;};
+hidspecial HID_GRID_TRAVEL_NEW { HelpID = HID_GRID_TRAVEL_NEW ;};
+hidspecial HID_GRID_TRAVEL_ABSOLUTE { HelpID = HID_GRID_TRAVEL_ABSOLUTE ;};
+hidspecial HID_GRID_NUMBEROFRECORDS { HelpID = HID_GRID_NUMBEROFRECORDS ;};
+
+hidspecial UID_SEARCH_RECORDSTATUS { HelpID = UID_SEARCH_RECORDSTATUS ;};
+hidspecial UID_SQLERROR_BUTTONMORE { HelpID = UID_SQLERROR_BUTTONMORE ;};
+
+hidspecial HID_ICCDIALOG_RESET_BTN { HelpID = HID_ICCDIALOG_RESET_BTN ;};
+hidspecial HID_ICCDIALOG_OK_BTN { HelpID = HID_ICCDIALOG_OK_BTN ;};
+hidspecial HID_ICCDIALOG_CANCEL_BTN { HelpID = HID_ICCDIALOG_CANCEL_BTN ;};
+hidspecial HID_ICCDIALOG_CHOICECTRL { HelpID = HID_ICCDIALOG_CHOICECTRL ;};
+
+hidspecial HID_HYPERDLG_INET_PATH { HelpID = HID_HYPERDLG_INET_PATH ;};
+hidspecial HID_HYPERDLG_MAIL_PATH { HelpID = HID_HYPERDLG_MAIL_PATH ;};
+hidspecial HID_HYPERDLG_DOC_PATH { HelpID = HID_HYPERDLG_DOC_PATH ;};
+
+hidspecial HID_PROP_FILTERPROPOSAL { HelpID = HID_PROP_FILTERPROPOSAL ;};
+hidspecial HID_PROP_CURRSYM_POSITION { HelpID = HID_PROP_CURRSYM_POSITION ;};
+
+//HID_AUTOCORR_HELP_START
+#define HID_AUTOCORR_HELP_WORD HID_AUTOCORR_HELP_START+0
+#define HID_AUTOCORR_HELP_SENT HID_AUTOCORR_HELP_START+1
+#define HID_AUTOCORR_HELP_SENTWORD HID_AUTOCORR_HELP_START+2
+#define HID_AUTOCORR_HELP_ACORWORD HID_AUTOCORR_HELP_START+3
+// not used at time hidspecial HID_AUTOCORR_HELP_ACORSENT HID_AUTOCORR_HELP_START+4
+#define HID_AUTOCORR_HELP_ACORSENTWORD HID_AUTOCORR_HELP_START+5
+// not used at time hidspecial HID_AUTOCORR_HELP_ACORSENT HID_AUTOCORR_HELP_START+6
+#define HID_AUTOCORR_HELP_CHGQUOTES HID_AUTOCORR_HELP_START+7
+#define HID_AUTOCORR_HELP_CHGSGLQUOTES HID_AUTOCORR_HELP_START+8
+#define HID_AUTOCORR_HELP_SETINETATTR HID_AUTOCORR_HELP_START+9
+#define HID_AUTOCORR_HELP_INGNOREDOUBLESPACE HID_AUTOCORR_HELP_START+10
+#define HID_AUTOCORR_HELP_CHGWEIGHTUNDERL HID_AUTOCORR_HELP_START+11
+#define HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL HID_AUTOCORR_HELP_START+12
+#define HID_AUTOCORR_HELP_CHGTOENEMDASH HID_AUTOCORR_HELP_START+13
+#define HID_AUTOCORR_HELP_CHGORDINALNUMBER HID_AUTOCORR_HELP_START+14
+
+hidspecial HID_AUTOCORR_HELP_WORD { HelpID = HID_AUTOCORR_HELP_WORD;};
+hidspecial HID_AUTOCORR_HELP_SENT { HelpID = HID_AUTOCORR_HELP_SENT;};
+hidspecial HID_AUTOCORR_HELP_SENTWORD { HelpID = HID_AUTOCORR_HELP_SENTWORD;};
+hidspecial HID_AUTOCORR_HELP_ACORWORD { HelpID = HID_AUTOCORR_HELP_ACORWORD;};
+// not used at time hidspecial HID_AUTOCORR_HELP_ACORSENT { HelpID = HID_AUTOCORR_HELP_START+4;};
+hidspecial HID_AUTOCORR_HELP_ACORSENTWORD { HelpID = HID_AUTOCORR_HELP_ACORSENTWORD;};
+// not used at time hidspecial HID_AUTOCORR_HELP_ACORSENT { HelpID = HID_AUTOCORR_HELP_START+6;};
+hidspecial HID_AUTOCORR_HELP_CHGQUOTES { HelpID = HID_AUTOCORR_HELP_CHGQUOTES;};
+hidspecial HID_AUTOCORR_HELP_CHGSGLQUOTES { HelpID = HID_AUTOCORR_HELP_CHGSGLQUOTES;};
+hidspecial HID_AUTOCORR_HELP_SETINETATTR { HelpID = HID_AUTOCORR_HELP_SETINETATTR;};
+hidspecial HID_AUTOCORR_HELP_INGNOREDOUBLESPACE { HelpID = HID_AUTOCORR_HELP_INGNOREDOUBLESPACE;};
+hidspecial HID_AUTOCORR_HELP_CHGWEIGHTUNDERL { HelpID = HID_AUTOCORR_HELP_CHGWEIGHTUNDERL;};
+hidspecial HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL { HelpID = HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL;};
+hidspecial HID_AUTOCORR_HELP_CHGTOENEMDASH { HelpID = HID_AUTOCORR_HELP_CHGTOENEMDASH;};
+hidspecial HID_AUTOCORR_HELP_CHGORDINALNUMBER { HelpID = HID_AUTOCORR_HELP_CHGORDINALNUMBER;};
+//HID_AUTOCORR_HELP_END
+
+
diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk
new file mode 100644
index 0000000000..5cdf592191
--- /dev/null
+++ b/svx/util/makefile.mk
@@ -0,0 +1,697 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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=SVX
+TARGET=svx
+#svx.hid generieren
+GEN_HID=TRUE
+USE_LDUMP2=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+.IF "$(COM)"=="ICC"
+#LINKFLAGS+=/SEGMENTS:1024 /PACKD:32768
+LINKFLAGS+=/SEGMENTS:1024
+.ENDIF
+
+RSCLOCINC+=-I$(PRJ)$/source$/svdraw
+
+.IF "$(GUI)"=="WNT"
+LIBCMT += $(LIBCIMT)
+.ENDIF
+
+# --- Allgemein ----------------------------------------------------
+
+# --- Svx - DLL ----------
+
+.IF "$(header)" == ""
+
+HELPIDFILES= ..$/inc$/helpid.hrc
+
+SHL1TARGET= svx$(UPD)$(DLLPOSTFIX)
+SHL1IMPLIB= svx
+SVXLOKAL= $(LB)$/svx.lib
+SHL1BASE = 0x1d800000
+SHL1STDLIBS= \
+ $(SALLIB) \
+ $(VOSLIB) \
+ $(TOOLSLIB) \
+ $(SVTOOLLIB) \
+ $(SVLLIB) \
+ $(SVLIB) \
+ $(SO2LIB) \
+ $(SOTLIB) \
+ $(XMLOFFLIB) \
+ $(SFX2LIB) \
+ $(GOODIESLIB) \
+ $(BASICLIB) \
+ $(INETLIBSH) \
+ $(CHANELLIB) \
+ $(SVMEMLIB) \
+ $(TKLIB) \
+ $(ONELIB) \
+ $(RTLLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(UCBHELPERLIB) \
+ $(UNOTOOLSLIB)
+
+.IF "$(GUI)"=="WNT"
+SHL1STDLIBS+=\
+ $(SHELLLIB)
+.ENDIF
+
+.IF "$(TF_UCB)" == ""
+SHL1STDLIBS+=\
+ $(CHAOSLIB)
+.ENDIF
+
+.IF "$(BIG_SVX)"==""
+.IF "$(GUI)"=="OS2"
+SHL1STDLIBS+=\
+ $(LB)$/dl1.lib \
+ $(LB)$/dl2.lib
+.ELSE
+SHL1STDLIBS+=\
+ $(LB)$/dl.lib
+.ENDIF
+.ENDIF
+
+.IF "$(SOLAR_JAVA)" != ""
+SHL1STDLIBS+=\
+ $(SJLIB)
+.ENDIF
+
+.IF "$(GUI)"=="WNT"
+SHL1DEPN= $(SLB)$/svx.lib $(LB)$/dl.lib
+.ENDIF
+
+SHL1LIBS= $(SLB)$/svx.lib
+
+SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+DEF1NAME =$(SHL1TARGET)
+DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt
+DEFLIB1NAME=svx
+DEF1DES = Rtf, Edt, Outliner, SvDraw, Form, Fmcomp, Engine3D, MSFilter
+DEF1EXPORTFILE = svx.dxp
+
+.IF "$(BIG_SVX)"==""
+
+SHL2TARGET= dl$(UPD)$(DLLPOSTFIX)
+SHL2IMPLIB= dl
+SVXLOKAL+= $(LB)$/dl.lib
+SHL2BASE = 0x1db00000
+SHL2STDLIBS= \
+ $(LB)$/svx.lib \
+ $(SALLIB) \
+ $(VOSLIB) \
+ $(TOOLSLIB) \
+ $(SVTOOLLIB) \
+ $(SVLLIB) \
+ $(SVLIB) \
+ $(SO2LIB) \
+ $(SOTLIB) \
+ $(SFX2LIB) \
+ $(GOODIESLIB) \
+ $(BASICLIB) \
+ $(INETLIBSH) \
+ $(CHANELLIB) \
+ $(SVMEMLIB) \
+ $(TKLIB) \
+ $(ONELIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(RTLLIB) \
+ $(UNOTOOLSLIB) \
+ $(UCBHELPERLIB)
+
+.IF "$(TF_UCB)" == ""
+SHL2STDLIBS+=\
+ $(CHAOSLIB)
+.ENDIF
+
+.IF "$(GUI)"=="WNT"
+SHL2STDLIBS+=\
+ $(SHELLLIB)
+.ENDIF
+
+.IF "$(SOLAR_JAVA)" != ""
+SHL2STDLIBS+=\
+ $(SJLIB)
+.ENDIF
+
+
+SHL2DEPN= $(SLB)$/dl.lib $(LB)$/svx.lib
+
+SHL2LIBS= $(SLB)$/dl.lib
+
+.IF "$(COM)"=="ICC"
+SHL2OBJS= $(SLO)$/sidll.obj
+.ENDIF
+SHL2OBJS+= $(SLO)$/svxempty.obj
+
+SHL2DEF= $(MISC)$/$(SHL2TARGET).def
+DEF2NAME =$(SHL2TARGET)
+DEF2DEPN =$(MISC)$/$(SHL2TARGET).flt
+DEFLIB2NAME=dl
+DEF2DES =SvDraw, Form, Fmcomp, Engine3D, XOutDev, MSFilter
+
+.ENDIF
+
+LIBEXTRAFILES=\
+ $(LIBPRE) $(SLB)$/svdraw.lib \
+ $(LIBPRE) $(SLB)$/form.lib \
+ $(LIBPRE) $(SLB)$/fmcomp.lib \
+ $(LIBPRE) $(SLB)$/engine3d.lib \
+ $(LIBPRE) $(SLB)$/msfilter.lib \
+ $(LIBPRE) $(SLB)$/xout.lib
+
+LIB1TARGET =$(SLB)$/svx.lib
+LIB1FILES = \
+ $(LIBPRE) $(SLB)$/items.lib \
+ $(LIBPRE) $(SLB)$/svxlink.lib \
+ $(LIBPRE) $(SLB)$/svxrtf.lib \
+ $(LIBPRE) $(SLB)$/editeng.lib \
+ $(LIBPRE) $(SLB)$/outliner.lib \
+ $(LIBPRE) $(SLB)$/dialogs.lib\
+ $(LIBPRE) $(SLB)$/mnuctrls.lib \
+ $(LIBPRE) $(SLB)$/options.lib \
+ $(LIBPRE) $(SLB)$/stbctrls.lib \
+ $(LIBPRE) $(SLB)$/tbxctrls.lib \
+ $(LIBPRE) $(SLB)$/unoedit.lib \
+ $(LIBPRE) $(SLB)$/unodraw.lib \
+ $(LIBPRE) $(SLB)$/gal.lib
+
+
+.IF "$(SVXLIGHT)" != ""
+LIB3TARGET= $(LB)$/svxl.lib
+LIB3ARCHIV= $(LB)$/libsvxl.a
+LIB3FILES= \
+ $(LB)$/sxl_editeng.lib \
+ $(LB)$/sxl_engine3d.lib \
+ $(LB)$/sxl_form.lib \
+ $(LB)$/sxl_items.lib \
+ $(LB)$/sxl_outliner.lib \
+ $(LB)$/sxl_svdraw.lib \
+ $(LB)$/sxl_xout.lib \
+ $(LB)$/sxl_options.lib
+.ENDIF
+
+.IF "$(BIG_SVX)"==""
+LIB2TARGET =$(SLB)$/dl.lib
+LIB2FILES = $(LIBEXTRAFILES)
+.ELSE
+LIB1FILES+=$(LIBEXTRAFILES)
+.ENDIF
+
+.IF "$(GUI)" == "OS2" || "(GUIBASE)" == "WIN"
+LIB1FILES += \
+ $(LIBPRE) $(SLB)$/ibrwimp.lib
+.ENDIF
+
+
+SRSFILELIST=\
+ $(SRS)$/svdstr.srs \
+ $(SRS)$/editeng.srs \
+ $(SRS)$/outliner.srs \
+ $(SRS)$/dialogs.srs \
+ $(SRS)$/drawdlgs.srs \
+ $(SRS)$/mnuctrls.srs \
+ $(SRS)$/stbctrls.srs \
+ $(SRS)$/tbxctrls.srs \
+ $(SRS)$/options.srs \
+ $(SRS)$/svxitems.srs \
+ $(SRS)$/form.srs \
+ $(SRS)$/fmcomp.srs \
+ $(SRS)$/engine3d.srs \
+ $(SRS)$/unodraw.srs \
+ $(SRS)$/svxlink.srs
+
+.IF "$(GUI)" != "MAC"
+SRSFILELIST+= $(SOLARVERSION)$/$(INPATH)$/res$(UPDMINOREXT)$/sfx.srs
+.ELSE
+.IF "$(UPDMINOR)" != ""
+SRSFILELIST+= $(SOLARVERSION)$/$(INPATH)$/res.$(UPDMINOREXT)$/sfx.srs
+.ELSE
+SRSFILELIST+= $(SOLARVERSION)$/$(INPATH)$/res$/sfx.srs
+.ENDIF
+.ENDIF
+
+RESLIB1NAME=svx
+RESLIB1SRSFILES= $(SRSFILELIST)
+
+.IF "$(depend)" != ""
+
+ALL:
+ @echo nothing to depend on
+
+.ELSE
+.IF "$(GUI)"=="WNT"
+
+
+.IF "$(BIG_SVX)"==""
+ALL: \
+ $(MAKELANGDIR) \
+ $(SLB)$/dl.lib $(SLB)$/svx.lib \
+ $(LB)$/dl.lib $(LB)$/svx.lib \
+ $(MISC)$/linkinc.ls \
+ $(SRS)$/hidother.hid \
+ ALLTAR
+.ELSE
+ALL: \
+ $(MAKELANGDIR) \
+ $(SLB)$/svx.lib \
+ $(LB)$/svx.lib \
+ $(MISC)$/linkinc.ls \
+ $(SRS)$/hidother.hid \
+ ALLTAR
+.ENDIF
+
+.ENDIF # "$(GUI)"=="WNT"
+
+.IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
+ALL: \
+ $(MAKELANGDIR) \
+ ALLTAR
+.ENDIF
+
+.IF "$(GUI)"=="OS2"
+ALL: \
+ $(MAKELANGDIR) \
+ implib_defs \
+ implib1 \
+ implib2 \
+ implib3 \
+ implib4 \
+ ALLTAR
+.ENDIF
+.ENDIF #F "$(depend)" != ""
+
+# --- Targets -------------------------------------------------------
+
+
+$(MISC)$/$(SHL1TARGET).flt: makefile.mk
+ @echo ------------------------------
+ @echo Making: $@
+ @echo lcl > $@
+ @echo +getImplementation >> $@
+ @echo Impl >> $@
+ @echo IMPL >> $@
+ @echo START >> $@
+ @echo CharAttribList >> $@
+ @echo CharPosArray >> $@
+ @echo ContentAttribs >> $@
+ @echo ContentAttribsInfo >> $@
+ @echo ContentInfo >> $@
+ @echo ContentNode >> $@
+ @echo DeletedNodeInfo >> $@
+ @echo EditAttrib >> $@
+ @echo EditCharAttrib >> $@
+ @echo EditDbg >> $@
+ @echo EditDoc >> $@
+ @echo EditEngineItemPool >> $@
+ @echo EditHTMLParser >> $@
+ @echo EditLine >> $@
+ @echo EditNodeIdx >> $@
+ @echo EditPaM >> $@
+ @echo EditPosition >> $@
+ @echo EditRTFParser >> $@
+ @echo EditSel >> $@
+ @echo EditSpellWrapper >> $@
+ @echo EditStyleSheet >> $@
+ @echo EditUndoConnectParas >> $@
+ @echo EditUndoDelContent >> $@
+ @echo EditUndoInsertChars >> $@
+ @echo EditUndoInsertFeature >> $@
+ @echo EditUndoManager >> $@
+ @echo EditUndoMoveParagraphs >> $@
+ @echo EditUndoRemoveChars >> $@
+ @echo EditUndoRemoveFeature >> $@
+ @echo EditUndoSetAttribs >> $@
+ @echo EditUndoSetParaAttribs >> $@
+ @echo EditUndoSetStyleSheet >> $@
+ @echo EditUndoSplitPara >> $@
+ @echo GlobalEditData >> $@
+ @echo IdleFormattter >> $@
+ @echo ImpEditEngine >> $@
+ @echo ImpEditView >> $@
+ @echo InternalEditStatus >> $@
+ @echo ParaPortion >> $@
+ @echo ParagraphList >> $@
+ @echo RTFPardAttrMapIds >> $@
+ @echo RTFPlainAttrMapIds >> $@
+ @echo SelRange >> $@
+ @echo SortedPositions_SAR >> $@
+ @echo SvxACorrChars >> $@
+ @echo SvxColorList >> $@
+ @echo SvxFontTable >> $@
+ @echo SvxRTFStyleType >> $@
+ @echo SvxTabStopArr_SAR >> $@
+ @echo TextPortionList >> $@
+ @echo XEditAttrib >> $@
+ @echo XParaPortionList >> $@
+ @echo BinTextObject >> $@
+ @echo DialogsResMgr >> $@
+ @echo E3dDragMethod >> $@
+ @echo E3dTriangle >> $@
+.IF "$(GUI)" != "MAC"
+ @echo GetImp >> $@
+.ENDIF
+ @echo ImpA >> $@
+ @echo ImpB >> $@
+ @echo ImpBrw >> $@
+ @echo ImpC >> $@
+ @echo ImpCheck >> $@
+ @echo ImpColor >> $@
+ @echo ImpD >> $@
+ @echo ImpDrag >> $@
+ @echo ImpEdCtrl >> $@
+ @echo ImpEdit >> $@
+ @echo ImpF >> $@
+ @echo ImpGet >> $@
+ @echo ImpH >> $@
+ @echo ImpHide >> $@
+ @echo ImpI >> $@
+ @echo ImpItem >> $@
+ @echo ImpJ >> $@
+ @echo ImpL >> $@
+ @echo ImpList >> $@
+ @echo ImpM >> $@
+ @echo ImpMulti >> $@
+ @echo ImportInfo >> $@
+ @echo ImpP >> $@
+ @echo ImpPaint >> $@
+ @echo ImpPast >> $@
+ @echo ImpRecalc >> $@
+ @echo ImpReset >> $@
+ @echo ImpRemove >> $@
+ @echo ImpRef >> $@
+ @echo ImpReset >> $@
+ @echo ImpS >> $@
+ @echo ImpScroll >> $@
+ @echo ImpSdrGDIMetaFileImport >> $@
+ @echo ImpSet >> $@
+ @echo ImpShow >> $@
+ @echo ImpT >> $@
+ @echo ImpX >> $@
+ @echo OLUndoAttr >> $@
+ @echo OLUndoDepth >> $@
+ @echo OLUndoExpand >> $@
+ @echo OLUndoHeight >> $@
+ @echo OutlinerEditEng >> $@
+ @echo SdrGraphicLink >> $@
+ @echo SdrItemBrowser >> $@
+ @echo SdrOleLink >> $@
+ @echo SpellCache >> $@
+ @echo SvFileObject >> $@
+ @echo WrongList >> $@
+ @echo WrongRanges >> $@
+ @echo XIOCompat >> $@
+ @echo _SdrItemBrowserControl >> $@
+ @echo _SdrItemBrowserWindow >> $@
+ @echo +FmXGridPeer >> $@
+ @echo +FmXGridControl >> $@
+ @echo FmX >> $@
+ @echo FmExp >> $@
+ @echo ODatabaseForm >> $@
+.IF "$(GUI)"=="WNT" || "$(GUI)"=="WIN"
+ @echo WEP>>$@
+ @echo LIBMAIN>>$@
+ @echo LibMain>>$@
+.ENDIF
+.IF "$(COM)"=="MSC"
+ @echo ??_5>>$@
+ @echo ??_7>>$@
+ @echo ??_8>>$@
+ @echo ??_9>>$@
+ @echo ??_C>>$@
+ @echo ??_E>>$@
+ @echo ??_F>>$@
+ @echo ??_G>>$@
+ @echo ??_H>>$@
+ @echo ??_I>>$@
+ @echo __CT>>$@
+# @echo ?CreateType@>>$@
+# @echo ?LinkStub>>$@
+.ENDIF
+.IF "$(COM)"=="ICC"
+ @echo _alloc >> $@
+ @echo _lower_bound >> $@
+ @echo _stl_prime >> $@
+.ENDIF
+
+$(MISC)$/$(SHL2TARGET).flt: makefile.mk
+ @echo ------------------------------
+ @echo Making: $@
+ @echo lcl > $@
+ @echo +getImplementation >> $@
+ @echo Impl >> $@
+ @echo IMPL >> $@
+ @echo START >> $@
+ @echo CharAttribList >> $@
+ @echo CharPosArray >> $@
+ @echo ContentAttribs >> $@
+ @echo ContentAttribsInfo >> $@
+ @echo ContentInfo >> $@
+ @echo ContentNode >> $@
+ @echo DeletedNodeInfo >> $@
+ @echo EditAttrib >> $@
+ @echo EditCharAttrib >> $@
+ @echo EditDbg >> $@
+ @echo EditDoc >> $@
+ @echo EditEngineItemPool >> $@
+ @echo EditHTMLParser >> $@
+ @echo EditLine >> $@
+ @echo EditNodeIdx >> $@
+ @echo EditPaM >> $@
+ @echo EditPosition >> $@
+ @echo EditRTFParser >> $@
+ @echo EditSel >> $@
+ @echo EditSpellWrapper >> $@
+ @echo EditStyleSheet >> $@
+ @echo EditUndoConnectParas >> $@
+ @echo EditUndoDelContent >> $@
+ @echo EditUndoInsertChars >> $@
+ @echo EditUndoInsertFeature >> $@
+ @echo EditUndoManager >> $@
+ @echo EditUndoMoveParagraphs >> $@
+ @echo EditUndoRemoveChars >> $@
+ @echo EditUndoRemoveFeature >> $@
+ @echo EditUndoSetAttribs >> $@
+ @echo EditUndoSetParaAttribs >> $@
+ @echo EditUndoSetStyleSheet >> $@
+ @echo EditUndoSplitPara >> $@
+ @echo GlobalEditData >> $@
+ @echo IdleFormattter >> $@
+ @echo ImpEditEngine >> $@
+ @echo ImpEditView >> $@
+ @echo InternalEditStatus >> $@
+ @echo ParaPortion >> $@
+ @echo ParagraphList >> $@
+ @echo RTFPardAttrMapIds >> $@
+ @echo RTFPlainAttrMapIds >> $@
+ @echo SelRange >> $@
+ @echo SortedPositions_SAR >> $@
+ @echo SvxACorrChars >> $@
+ @echo SvxColorList >> $@
+ @echo SvxFontTable >> $@
+ @echo SvxRTFStyleType >> $@
+ @echo SvxTabStopArr_SAR >> $@
+ @echo TextPortionList >> $@
+ @echo XEditAttrib >> $@
+ @echo XParaPortionList >> $@
+ @echo BinTextObject >> $@
+ @echo DialogsResMgr >> $@
+ @echo E3dDragMethod >> $@
+ @echo E3dTriangle >> $@
+.IF "$(GUI)" != "MAC"
+ @echo GetImp >> $@
+.ENDIF
+ @echo ImpA >> $@
+ @echo ImpB >> $@
+ @echo ImpBrw >> $@
+ @echo ImpC >> $@
+ @echo ImpCheck >> $@
+ @echo ImpColor >> $@
+ @echo ImpD >> $@
+ @echo ImpDrag >> $@
+ @echo ImpEdCtrl >> $@
+ @echo ImpEdit >> $@
+ @echo ImpF >> $@
+ @echo ImpGet >> $@
+ @echo ImpH >> $@
+ @echo ImpHide >> $@
+ @echo ImpI >> $@
+ @echo ImpItem >> $@
+ @echo ImpJ >> $@
+ @echo ImpL >> $@
+ @echo ImpList >> $@
+ @echo ImpM >> $@
+ @echo ImpMulti >> $@
+ @echo ImportInfo >> $@
+ @echo ImpP >> $@
+ @echo ImpPaint >> $@
+ @echo ImpPast >> $@
+ @echo ImpRecalc >> $@
+ @echo ImpReset >> $@
+ @echo ImpRemove >> $@
+ @echo ImpRef >> $@
+ @echo ImpReset >> $@
+ @echo ImpS >> $@
+ @echo ImpScroll >> $@
+ @echo ImpSdrGDIMetaFileImport >> $@
+ @echo ImpSet >> $@
+ @echo ImpShow >> $@
+ @echo ImpT >> $@
+ @echo ImpX >> $@
+ @echo OLUndoAttr >> $@
+ @echo OLUndoDepth >> $@
+ @echo OLUndoExpand >> $@
+ @echo OLUndoHeight >> $@
+ @echo OutlinerEditEng >> $@
+ @echo SdrGraphicLink >> $@
+ @echo SdrItemBrowser >> $@
+ @echo SdrOleLink >> $@
+ @echo SpellCache >> $@
+ @echo SvFileObject >> $@
+ @echo WrongList >> $@
+ @echo WrongRanges >> $@
+ @echo XIOCompat >> $@
+ @echo _SdrItemBrowserControl >> $@
+ @echo _SdrItemBrowserWindow >> $@
+ @echo +FmXGridControl >> $@
+ @echo +FmXGridPeer >> $@
+ @echo FmX >> $@
+ @echo FmExp >> $@
+ @echo ODatabaseForm >> $@
+.IF "$(GUI)"=="WNT" || "$(GUI)"=="WIN"
+ @echo WEP>>$@
+ @echo LIBMAIN>>$@
+ @echo LibMain>>$@
+.ENDIF
+.IF "$(COM)"=="ICC"
+ @echo _alloc >> $@
+ @echo _lower_bound >> $@
+ @echo _stl_prime >> $@
+.ENDIF
+.IF "$(COM)"=="MSC"
+ @echo ??_5>>$@
+ @echo ??_7>>$@
+ @echo ??_8>>$@
+ @echo ??_9>>$@
+ @echo ??_C>>$@
+ @echo ??_E>>$@
+ @echo ??_F>>$@
+ @echo ??_G>>$@
+ @echo ??_H>>$@
+ @echo ??_I>>$@
+# @echo ?CreateType@>>$@
+# @echo ?LinkStub>>$@
+.ENDIF
+ @echo _alloc>>$@
+ @echo _CT>>$@
+ @echo exception::exception>>$@
+ @echo _TI2>>$@
+ @echo ___CT>>$@
+
+$(SRS)$/hidother.hid: hidother.src
+.IF "$(GUI)$(CPU)"!="WNTI" || "$(product)"!="full"
+ @echo nix
+.ELSE
+ @+echo NO HIDS!!!
+ +-mhids hidother.src ..\$(INPATH)$/srs $(INCLUDE) svx hidother
+.ENDIF
+
+
+.ENDIF # "$(header)" == ""
+
+
+.INCLUDE : target.mk
+
+
+implib1: $(MISC)\svx1.def
+ implib /noi $(LB)\svx1.lib $(MISC)\svx1.def
+
+implib2: $(MISC)\svx2.def
+ implib /noi $(LB)\svx2.lib $(MISC)\svx2.def
+
+implib3: $(MISC)\dl1.def
+ implib /noi $(LB)\dl1.lib $(MISC)\dl1.def
+
+implib4: $(MISC)\dl2.def
+ implib /noi $(LB)\dl2.lib $(MISC)\dl2.def
+
+implib_defs: $(SHL1DEF) $(SHL2DEF)
+ +-$(RM) $(MISC)$/svx1.def
+ +-$(RM) $(MISC)$/svx2.def
+ +-$(RM) $(MISC)$/dl1.def
+ +-$(RM) $(MISC)$/dl2.def
+ splitdef $(SHL1DEF) $(MISC)$/svx1.def $(MISC)$/svx2.def
+ splitdef $(SHL2DEF) $(MISC)$/dl1.def $(MISC)$/dl2.def
+
+
diff --git a/svx/util/makefile.pmk b/svx/util/makefile.pmk
new file mode 100644
index 0000000000..dec8feeca6
--- /dev/null
+++ b/svx/util/makefile.pmk
@@ -0,0 +1,63 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.pmk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+
diff --git a/svx/util/svx.dxp b/svx/util/svx.dxp
new file mode 100644
index 0000000000..51703a0466
--- /dev/null
+++ b/svx/util/svx.dxp
@@ -0,0 +1,2 @@
+component_writeInfo
+component_getFactory
diff --git a/svx/util/svxpch.cxx b/svx/util/svxpch.cxx
new file mode 100644
index 0000000000..74159fc405
--- /dev/null
+++ b/svx/util/svxpch.cxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxpch.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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 <thread.hxx>
+#include <sysdep.hxx>
+#if defined(WNT) || defined (WIN)
+#include <svwin.h>
+#endif
+#include <tlintl.hxx>
+#include <tlfsys.hxx>
+#include <tlbigint.hxx>
+
+#include <sysdep.hxx>
+#include <sv.hxx>
+#include <svtool.hxx>
+#define _ANIMATION
+#include <svgraph.hxx>
+#include <svsystem.hxx>
+#include <svcontnr.hxx>
+#include <sfx.hxx>
+#include <sfxitems.hxx>
+#include <sfxipool.hxx>
+#include <sfxiiter.hxx>
+#include <sfxdoc.hxx>
+#include <sfxview.hxx>
+#include <sfxdlg.hxx>
+#include <sfxstyle.hxx>
+#include <svxenum.hxx>
+#include <sbx.hxx>
+#include <libcall.hxx>
+#include <hmwrap.hxx>
+#include <mail.hxx>
+#include <urlobj.hxx>
+#include <inet.hxx>
+#include <inetui.hxx>
+#include <svtruler.hxx>
+
+#include <limits.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <sfx.hrc>
+
+#include "segmentc.hxx"
+
diff --git a/svx/workben/edittest.cxx b/svx/workben/edittest.cxx
new file mode 100644
index 0000000000..f45a371fb5
--- /dev/null
+++ b/svx/workben/edittest.cxx
@@ -0,0 +1,2174 @@
+/*************************************************************************
+ *
+ * $RCSfile: edittest.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define ITEMID_FONT 0
+#define ITEMID_POSTURE 0
+#define ITEMID_WEIGHT 0
+#define ITEMID_SHADOWED 0
+#define ITEMID_CONTOUR 0
+#define ITEMID_CROSSEDOUT 0
+#define ITEMID_UNDERLINE 0
+#define ITEMID_FONTHEIGHT 0
+#define ITEMID_FONTWIDTH 0
+#define ITEMID_COLOR 0
+#define ITEMID_ADJUST 0
+#define ITEMID_LINESPACING 0
+#define ITEMID_TABSTOP 0
+#define ITEMID_LRSPACE 0
+#define ITEMID_ULSPACE 0
+#define ITEMID_AUTOKERN 0
+#define ITEMID_KERNING 0
+#define ITEMID_ESCAPEMENT 0
+#define ITEMID_WORDLINEMODE 0
+#define ITEMID_FIELD 0
+
+#include <editeng.hxx>
+#include <eeitem.hxx>
+#include <editview.hxx>
+#include <editobj.hxx>
+#include <editstat.hxx>
+#include <svx/editdll.hxx>
+#include <flditem.hxx>
+#include <itemdata.hxx>
+#include <tools/urlobj.hxx>
+#include <svxacorr.hxx>
+#include <tools/fsys.hxx>
+#include <tools/intn.hxx>
+#include <xpoly.hxx>
+#include <svtools/filedlg.hxx>
+
+#include <vcl/window.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/font.hxx>
+#include <vcl/sound.hxx>
+#include <vcl/print.hxx>
+#include <vcl/toolbox.hxx>
+#include <vcl/poly.hxx>
+#include <vcl/help.hxx>
+#include <vcl/scrbar.hxx>
+#include <vcl/wrkwin.hxx>
+#include <vcl/msgbox.hxx>
+
+#include <svtools/style.hxx>
+#include <svx/dialdll.hxx>
+
+
+#include <so3/factory.hxx>
+
+#define SERVICE_SIMPLEREGISTRY "com.sun.star.registry.SimpleRegistry"
+
+#include <unotools/processfactory.hxx>
+#include <unotools/regpathhelper.hxx>
+#include <cppuhelper/servicefactory.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/registry/XSimpleRegistry.hpp>
+#include <sfx2/sfxuno.hxx>
+
+// SVX
+#include <lrspitem.hxx>
+#include <shdditem.hxx>
+#include <cntritem.hxx>
+#include <crsditem.hxx>
+#include <udlnitem.hxx>
+#include <lspcitem.hxx>
+#include <escpitem.hxx>
+#include <kernitem.hxx>
+#include <akrnitem.hxx>
+#include <wrlmitem.hxx>
+#include <colritem.hxx>
+#include <ulspitem.hxx>
+#include <postitem.hxx>
+#include <adjitem.hxx>
+#include <wghtitem.hxx>
+#include <fhgtitem.hxx>
+#include <fontitem.hxx>
+#include <fwdtitem.hxx>
+
+// SVTOOLS
+#include <svtools/undo.hxx>
+#include <svtools/itemset.hxx>
+#include <svtools/itempool.hxx>
+#include <svtools/poolitem.hxx>
+#include <svtools/printdlg.hxx>
+
+
+#define TB_LEFT 1
+#define TB_RIGHT 2
+#define TB_CENTER 3
+#define TB_UNDO 4
+#define TB_REDO 5
+#define TB_FONT1 6
+#define TB_FONT2 7
+#define TB_ITALIC 8
+#define TB_BOLD 9
+#define TB_UNDERLINE 10
+#define TB_BLACK 11
+#define TB_GREEN 12
+#define TB_OPEN 13
+#define TB_SAVE 14
+#define TB_SBL 15
+#define TB_SBSA 16
+#define TB_LR 17
+#define TB_DRAW 18
+#define TB_DEFTAB 19
+#define TB_OPEN2 20
+#define TB_SAVE2 21
+#define TB_STDSEL 33
+#define TB_MOVE 34
+#define TB_PARATTR1 35
+#define TB_ROTATE 38
+#define TB_STYLEA 39
+#define TB_STYLEB 40
+#define TB_STYLEBFROMA 41
+#define TB_STYLEBAFTERA 42
+#define TB_RED 43
+#define TB_STYLEAISU 44
+#define TB_STYLEC 45
+#define TB_FLAT 46
+#define TB_BINOBJ1 47
+#define TB_BINOBJ3 49
+#define TB_BINOBJ4 50
+#define TB_BINOBJ1b 51
+#define TB_BINOBJ2b 52
+#define TB_ATTRIBS 54
+#define TB_IDLE 55
+#define TB_BLOCK 56
+#define TB_CLONEBIN 57
+#define TB_INSERT 58
+#define TB_PKERN 59
+#define TB_KERN 60
+#define TB_SUPER 61
+#define TB_SUB 62
+#define TB_PRINT 63
+#define TB_FONT 64
+#define TB_COLORS 65
+#define TB_WLM 66
+#define TB_OUTL 67
+#define TB_INSFLD 68
+#define TB_UPDFLD 69
+#define TB_ONLINESPELL 70
+#define TB_REDLINES 71
+#define TB_AUTOCORRECT 72
+#define TB_POLY 73
+#define TB_HYPH 74
+
+// VARS...
+short nRotation = 0;
+USHORT nZoom = 100;
+BOOL bURLClicked = FALSE;
+
+
+::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > createApplicationServiceManager()
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xReturn = ::cppu::createServiceFactory();
+
+ try
+ {
+
+ if ( xReturn.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XInitialization > xInit ( xReturn, ::com::sun::star::uno::UNO_QUERY ) ;
+ if ( xInit.is() )
+ {
+ sal_Bool bLocalCreate = sal_True;
+ ::rtl::OUString localRegistry = ::utl::getPathToUserRegistry();
+ ::rtl::OUString systemRegistry = ::utl::getPathToSystemRegistry();
+
+// if ( localRegistry.getLength() == 0)
+// {
+// localRegistry = getDefaultLocalRegistry();
+// bLocalCreate = sal_True;
+// }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > xLocalRegistry ( xReturn->createInstance( DEFINE_CONST_UNICODE(SERVICE_SIMPLEREGISTRY) ), ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > xSystemRegistry ( xReturn->createInstance( DEFINE_CONST_UNICODE(SERVICE_SIMPLEREGISTRY) ), ::com::sun::star::uno::UNO_QUERY );
+
+ if ( xLocalRegistry.is() && (localRegistry.getLength() > 0) )
+ {
+ xLocalRegistry->open(localRegistry,
+ sal_False,
+ bLocalCreate);
+
+ if ( !xLocalRegistry->isValid() )
+ xLocalRegistry->open(localRegistry,
+ sal_True,
+ bLocalCreate);
+ }
+
+ if ( xSystemRegistry.is() && (systemRegistry.getLength() > 0) )
+ {
+ xSystemRegistry->open(systemRegistry,
+ sal_True,
+ sal_False);
+ }
+
+ if ( (xLocalRegistry.is() && xLocalRegistry->isValid()) &&
+ (xSystemRegistry.is() && xSystemRegistry->isValid()) )
+ {
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > seqAnys(2);
+ seqAnys[0] <<= xLocalRegistry ;
+ seqAnys[1] <<= xSystemRegistry ;
+
+ ::com::sun::star::uno::Reference < ::com::sun::star::registry::XSimpleRegistry > xReg(
+ xReturn->createInstanceWithArguments(
+ DEFINE_CONST_UNICODE("com.sun.star.registry.NestedRegistry"), seqAnys ), ::com::sun::star::uno::UNO_QUERY );
+
+ seqAnys = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >( 1 );
+ seqAnys[0] <<= xReg;
+ if ( xReg.is() )
+ xInit->initialize( seqAnys );
+ }
+ }
+ else
+ {
+ xReturn = ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >();
+ }
+ }
+ }
+
+ catch( ::com::sun::star::uno::Exception& )
+ {
+ }
+
+ return xReturn ;
+}
+
+
+
+// --- class EditApp -------------------------------------------------
+
+SV_DECL_PTRARR_DEL( StringList, String*, 0, 4 );
+SV_IMPL_PTRARR( StringList, String* );
+StringList aSimpleHistory;
+
+class EditApp : public Application
+{
+public:
+ virtual void Main();
+};
+
+class MyEditEngine : public EditEngine
+{
+public:
+ virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor );
+ virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos );
+ virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos );
+};
+
+class MyEditStyleSheet : public SfxStyleSheet
+{
+public:
+ TYPEINFO();
+ MyEditStyleSheet(const XubString& rName,
+ SfxStyleSheetBasePool& rPool,
+ SfxStyleFamily eFamily,
+ USHORT nMask);
+ virtual ~MyEditStyleSheet();
+
+ virtual BOOL SetParent ( const XubString& rParentName );
+ virtual BOOL SetFollow( const XubString& rFollowName );
+ virtual SfxItemSet& GetItemSet();
+ virtual BOOL IsUsed() const { return HasListeners(); }
+ virtual BOOL HasFollowSupport() const { return TRUE; }
+ virtual BOOL HasParentSupport() const { return TRUE; }
+};
+
+TYPEINIT1( MyEditStyleSheet, SfxStyleSheet );
+
+MyEditStyleSheet::MyEditStyleSheet(const XubString& rName, SfxStyleSheetBasePool& rPool,
+ SfxStyleFamily eFamily, USHORT nMask) :
+ SfxStyleSheet(rName, rPool, eFamily, nMask)
+{
+}
+
+MyEditStyleSheet::~MyEditStyleSheet()
+{
+ delete pSet;
+}
+
+BOOL MyEditStyleSheet::SetParent(const XubString& rParentName)
+{
+ SfxStyleSheet::SetParent( rParentName );
+
+ BOOL bResult = FALSE;
+ SfxStyleSheetBase* pStyle = rPool.Find( rParentName, nFamily );
+ if (pStyle)
+ {
+ bResult = TRUE;
+ SfxItemSet& rParentSet = pStyle->GetItemSet();
+ GetItemSet().SetParent(&rParentSet);
+ // Macht SetParent, ausserdem STYLESHHET_MODIFIED
+// Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ }
+ return bResult;
+}
+
+BOOL MyEditStyleSheet::SetFollow(const XubString& rFollowName)
+{
+ BOOL bDone = SfxStyleSheet::SetFollow( rFollowName );
+// Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ return bDone;
+}
+
+SfxItemSet& MyEditStyleSheet::GetItemSet()
+{
+ if (!pSet)
+ {
+ pSet = new SfxItemSet( GetPool().GetPool(), EE_ITEMS_START, EE_CHAR_END );
+ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
+ pSet->ClearItem( nWhich );
+ }
+
+ return *pSet;
+}
+
+class MyEditStyleSheetPool : public SfxStyleSheetPool
+{
+protected:
+ virtual SfxStyleSheetBase* Create(const XubString& rName,
+ SfxStyleFamily eFamily,
+ USHORT nMask);
+
+public:
+ MyEditStyleSheetPool(SfxItemPool& rPool);
+ virtual ~MyEditStyleSheetPool();
+
+ SfxStyleSheet* MakeStyleSheet( const XubString& rName, SfxStyleFamily eFamily, USHORT nMask );
+};
+
+MyEditStyleSheetPool::MyEditStyleSheetPool(SfxItemPool& rPool) :
+ SfxStyleSheetPool(rPool)
+{
+}
+
+MyEditStyleSheetPool::~MyEditStyleSheetPool()
+{
+}
+
+SfxStyleSheetBase* MyEditStyleSheetPool::Create(const XubString& rName, SfxStyleFamily eFamily, USHORT nMask )
+{
+ return new MyEditStyleSheet( rName, *this, eFamily, nMask );
+}
+
+SfxStyleSheet* MyEditStyleSheetPool::MakeStyleSheet(const XubString& rName, SfxStyleFamily eFamily, USHORT nMask )
+{
+ SfxStyleSheet* pStyle = (SfxStyleSheet*)Create( rName, eFamily, nMask );
+ aStyles.Insert( pStyle, LIST_APPEND );
+ return pStyle;
+}
+
+XubString __EXPORT MyEditEngine::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+{
+ const SvxFieldData* pField = rField.GetField();
+ if ( !pField )
+ return String( RTL_CONSTASCII_USTRINGPARAM( "<Empty>" ) );
+
+ if ( pField->ISA( SvxDateField ) )
+ return ((const SvxDateField*)pField)->GetFormatted( LANGUAGE_SYSTEM, LANGUAGE_SYSTEM );
+ else if ( pField->ISA( SvxURLField ) )
+ {
+ const SvxURLField* pURL = (const SvxURLField*)pField;
+ if ( !bURLClicked )
+ {
+ delete rpTxtColor;
+ rpTxtColor = new Color( COL_BLUE );
+ }
+ else
+ {
+ delete rpTxtColor;
+ rpTxtColor = new Color( COL_RED );
+ delete rpFldColor;
+ rpFldColor = new Color( COL_YELLOW );
+ }
+ if ( pURL->GetFormat() == SVXURLFORMAT_URL )
+ return pURL->GetURL();
+ return pURL->GetRepresentation();
+ }
+ return String( RTL_CONSTASCII_USTRINGPARAM( "???" ) );
+}
+
+void __EXPORT MyEditEngine::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
+{
+ EditEngine::FieldClicked( rField, nPara, nPos ); // Falls URL
+ const SvxFieldData* pField = rField.GetField();
+ if ( !pField )
+ return;
+
+ if ( pField->ISA( SvxURLField ) )
+ {
+ bURLClicked = TRUE;
+ UpdateFields();
+ }
+ else
+ Sound::Beep();
+}
+
+void __EXPORT MyEditEngine::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
+{
+ const SvxFieldData* pField = rField.GetField();
+ if ( !pField )
+ return;
+
+ InfoBox( 0, String( RTL_CONSTASCII_USTRINGPARAM( "Feld selektiert!" ) ) ).Execute();
+}
+
+
+class MyView : public WorkWindow
+{
+private:
+ EditEngine* pEditEngine;
+ EditView* pEditView;
+
+public:
+ MyView( Window* pParent, EditEngine* pEditEngine );
+ ~MyView();
+
+ virtual void Paint( const Rectangle& );
+ virtual void Resize();
+ virtual void KeyInput( const KeyEvent& rKeyEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+ BOOL Drop( const DropEvent& rEvt );
+ BOOL QueryDrop( DropEvent& rEvt );
+};
+
+MyView::MyView( Window* pParent, EditEngine* pEE ) : WorkWindow( pParent, WinBits( WB_STDWORK ) )
+{
+ pEditEngine = pEE;
+ pEditView = new EditView( pEditEngine, this );
+ pEditEngine->InsertView( pEditView );
+ SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Another View..." ) ) );
+ EnableDrop();
+ SetBackgroundBrush( Brush( Color( COL_LIGHTBLUE ) ) );
+ Show();
+}
+
+MyView::~MyView()
+{
+ pEditEngine->RemoveView( pEditView );
+ delete pEditView;
+}
+
+void __EXPORT MyView::Paint( const Rectangle& rRec )
+{
+ pEditView->Paint( rRec );
+}
+
+void __EXPORT MyView::Resize()
+{
+ Size aPaperSz( GetOutputSize() );
+// aPaperSz.Width() /= 2;
+// aPaperSz.Height() /= 2;
+ pEditView->SetOutputArea( Rectangle( Point( 0,0 ), aPaperSz ) );
+ pEditView->SetVisArea( Rectangle( Point( 0,0 ), aPaperSz ) );
+ Invalidate();
+ pEditView->ShowCursor();
+}
+
+ // --- MyView::KeyInput() --------------------------------------
+void __EXPORT MyView::KeyInput( const KeyEvent& rKEvt )
+{
+ pEditView->PostKeyEvent( rKEvt );
+}
+
+void __EXPORT MyView::MouseMove( const MouseEvent& rMEvt )
+{
+ Point aPos = PixelToLogic( rMEvt.GetPosPixel() );
+ if ( pEditView->GetOutputArea().IsInside( aPos ) )
+ SetPointer( pEditView->GetPointer() );
+ else
+ SetPointer( Pointer() );
+
+
+ pEditView->MouseMove( rMEvt );
+}
+
+void __EXPORT MyView::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ pEditView->MouseButtonDown( rMEvt );
+}
+
+void __EXPORT MyView::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ pEditView->MouseButtonUp( rMEvt );
+}
+
+void __EXPORT MyView::Command( const CommandEvent& rCEvt )
+{
+ if ( rCEvt.GetCommand() == COMMAND_STARTDRAG )
+ pEditView->Command(rCEvt);
+}
+
+BOOL __EXPORT MyView::Drop( const DropEvent& rEvt )
+{
+ return pEditView->Drop( rEvt );
+}
+
+BOOL __EXPORT MyView::QueryDrop( DropEvent& rEvt )
+{
+ return pEditView->QueryDrop( rEvt );
+}
+
+// --- class EditMainWindow --------------------------------------------
+DECLARE_LIST( ViewList, MyView* );
+
+class EditViewWindow : public Window
+{
+private:
+ MyEditEngine* pEditEngine;
+ EditView* pEditView;
+ Pointer aStdPtr;
+ Pointer aURLPtr;
+ WorkWindow* pTmpWindow;
+ ViewList aViewList;
+
+ XubString aTestStr;
+
+
+public:
+ EditViewWindow( Window* pParent );
+ ~EditViewWindow();
+
+ virtual void Paint( const Rectangle& );
+ virtual void Resize();
+ virtual void KeyInput( const KeyEvent& rKeyEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+ void MarkOutputArea();
+ BOOL Drop( const DropEvent& rEvt );
+ BOOL QueryDrop( DropEvent& rEvt );
+
+ long HScrollHdl( ScrollBar* );
+ long VScrollHdl( ScrollBar* );
+
+ EditView* GetEditView() { return pEditView; }
+};
+
+class EditMainWindow : public WorkWindow
+{
+private:
+ ToolBox aToolBox;
+ ScrollBar aHScrollBar;
+ ScrollBar aVScrollBar;
+ EditViewWindow aViewWin;
+ Printer* pPrinter;
+
+ MyEditStyleSheetPool* pStyleSheets;
+
+ WorkWindow* pTmpWindow;
+
+ EditTextObject* pRTFObj;
+ EditTextObject* pBinObj;
+
+ FileDialog* pFileDialogBox;
+ FileDialog* pFileDialogBox2;
+
+
+protected:
+ void SetScrollBars();
+ void SetScrollBarRanges();
+ void CreatePolygon();
+
+ virtual void GetFocus();
+
+public:
+ EditMainWindow();
+ ~EditMainWindow();
+
+ virtual void Resize();
+
+ DECL_LINK( TBSelect, ToolBox * );
+ void UpdateToolBox();
+
+ DECL_LINK( HScrollHdl, ScrollBar * );
+ DECL_LINK( VScrollHdl, ScrollBar * );
+ DECL_LINK( ShowStatus, EditStatus * );
+ void SetTitle();
+};
+
+
+EditMainWindow::~EditMainWindow()
+{
+ delete pRTFObj;
+ delete pBinObj;
+ delete pFileDialogBox;
+ delete pFileDialogBox2;
+ delete pTmpWindow;
+ delete pPrinter;
+ delete pStyleSheets;
+}
+
+EditMainWindow::EditMainWindow() :
+ WorkWindow( NULL, WB_APP | WB_STDWORK | WB_SVLOOK | WB_CLIPCHILDREN ) ,
+ aViewWin( this ),
+ aToolBox( this, WinBits( WB_BORDER | WB_SVLOOK | WB_SCROLL | WB_LINESPACING ) ),
+ aHScrollBar( this, WinBits( WB_HSCROLL | WB_DRAG ) ),
+ aVScrollBar( this, WinBits( WB_VSCROLL | WB_DRAG ) )
+{
+ pRTFObj = 0;
+ pBinObj = 0;
+
+ pFileDialogBox = new FileDialog( this, WinBits( WB_OPEN | WB_SVLOOK ) );
+ pFileDialogBox->SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Open" ) ) );
+ pFileDialogBox->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Text" )), String( RTL_CONSTASCII_USTRINGPARAM( "*.txt" ) ) );
+ pFileDialogBox->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Rich Text Format" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.rtf" ) ) );
+ pFileDialogBox->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "HTML" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.htm;*.html" ) ) );
+ pFileDialogBox->SetCurFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Rich Text Format" ) ) );
+
+ pFileDialogBox2 = new FileDialog( this, WinBits( WB_SAVEAS| WB_SVLOOK ) );
+ pFileDialogBox2->SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Save" ) ) );
+ pFileDialogBox2->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.txt" ) ) );
+ pFileDialogBox2->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Rich Text Format" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.rtf" ) ) );
+ pFileDialogBox2->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "HTL" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.htm" ) ) );
+ pFileDialogBox2->SetCurFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Rich Text Format" ) ) );
+
+ pPrinter = new Printer;
+ pPrinter->SetMapMode( MAP_100TH_MM );
+ aViewWin.SetMapMode( pPrinter->GetMapMode() );
+ aViewWin.GetEditView()->GetEditEngine()->SetRefDevice( pPrinter );
+
+ MapMode aPntMode( MAP_POINT );
+ MapMode aCurrent( aViewWin.GetMapMode() );
+ Size aSz( LogicToLogic( Size( 12, 0 ), &aPntMode, &aCurrent ) );
+
+ SfxItemSet aSet( aViewWin.GetEditView()->GetEditEngine()->GetEmptyItemSet() );
+ Font aFont = GetSettings().GetStyleSettings().GetAppFont();
+ aSet.Put( SvxFontItem( aFont.GetFamily(), aFont.GetName(), String(),aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) );
+ aSet.Put( SvxFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT) );
+ aViewWin.GetEditView()->GetEditEngine()->SetDefaults( aSet );
+
+ pTmpWindow = new WorkWindow( this, WB_STDWORK );
+
+ aToolBox.SetButtonType( BUTTON_TEXT );
+ aToolBox.SetLineCount( 4 );
+
+ {
+ aToolBox.InsertItem( TB_OPEN, String( RTL_CONSTASCII_USTRINGPARAM( "Open" ) ) );
+ aToolBox.InsertItem( TB_SAVE, String( RTL_CONSTASCII_USTRINGPARAM( "Save" ) ) );
+ aToolBox.InsertItem( TB_PRINT, String( RTL_CONSTASCII_USTRINGPARAM( "Print" ) ) );
+ aToolBox.InsertSeparator();
+ aToolBox.InsertItem( TB_LEFT, String( RTL_CONSTASCII_USTRINGPARAM( "L" ) ) );
+ aToolBox.InsertItem( TB_CENTER, String( RTL_CONSTASCII_USTRINGPARAM( "C" ) ) );
+ aToolBox.InsertItem( TB_RIGHT, String( RTL_CONSTASCII_USTRINGPARAM( "R" ) ) );
+ aToolBox.InsertItem( TB_BLOCK, String( RTL_CONSTASCII_USTRINGPARAM( "B" ) ) );
+ aToolBox.InsertSeparator();
+ aToolBox.InsertItem( TB_UNDO, String( RTL_CONSTASCII_USTRINGPARAM( "Undo" ) ) );
+ aToolBox.InsertItem( TB_REDO, String( RTL_CONSTASCII_USTRINGPARAM( "Redo" ) ) );
+ aToolBox.InsertSeparator();
+ aToolBox.InsertItem( TB_FONT1, String( RTL_CONSTASCII_USTRINGPARAM( "Font1" ) ) );
+ aToolBox.InsertItem( TB_FONT2, String( RTL_CONSTASCII_USTRINGPARAM( "Font2" ) ) );
+ aToolBox.InsertItem( TB_STYLEA, String( RTL_CONSTASCII_USTRINGPARAM( "StyleA" ) ) );
+ aToolBox.InsertItem( TB_STYLEB, String( RTL_CONSTASCII_USTRINGPARAM( "StyleB" ) ) );
+ aToolBox.InsertItem( TB_STYLEC, String( RTL_CONSTASCII_USTRINGPARAM( "*StyleC" ) ) );
+ aToolBox.InsertItem( TB_STYLEBFROMA, String( RTL_CONSTASCII_USTRINGPARAM( "B=f(A)" ) ) );
+ aToolBox.InsertItem( TB_STYLEBAFTERA, String( RTL_CONSTASCII_USTRINGPARAM( "A->B" ) ) );
+ aToolBox.InsertItem( TB_STYLEAISU, String( RTL_CONSTASCII_USTRINGPARAM( "A:U" ) ) );
+ aToolBox.InsertItem( TB_DEFTAB, String( RTL_CONSTASCII_USTRINGPARAM( "DefTab" ) ) );
+ aToolBox.InsertBreak();
+ aToolBox.InsertItem( TB_OPEN2, String( RTL_CONSTASCII_USTRINGPARAM( "Read" ) ) );
+ aToolBox.InsertItem( TB_SAVE2, String( RTL_CONSTASCII_USTRINGPARAM( "Write" ) ) );
+ aToolBox.InsertSeparator();
+ aToolBox.InsertItem( TB_FONT, String( RTL_CONSTASCII_USTRINGPARAM( "XXX" ) ) );
+ aToolBox.InsertItem( TB_ITALIC, String( RTL_CONSTASCII_USTRINGPARAM( "K" ) ) );
+ aToolBox.InsertItem( TB_BOLD, String( RTL_CONSTASCII_USTRINGPARAM( "F" ) ) );
+ aToolBox.InsertItem( TB_UNDERLINE, String( RTL_CONSTASCII_USTRINGPARAM( "U" ) ) );
+ aToolBox.InsertItem( TB_SUPER, String( RTL_CONSTASCII_USTRINGPARAM( "SP" ) ) );
+ aToolBox.InsertItem( TB_SUB, String( RTL_CONSTASCII_USTRINGPARAM( "SB" ) ) );
+ aToolBox.InsertItem( TB_PKERN, String( RTL_CONSTASCII_USTRINGPARAM( "PK" ) ) );
+ aToolBox.InsertItem( TB_KERN, String( RTL_CONSTASCII_USTRINGPARAM( "TK" ) ) );
+ aToolBox.InsertItem( TB_WLM, String( RTL_CONSTASCII_USTRINGPARAM( "W!" ) ) );
+ aToolBox.InsertSeparator();
+ aToolBox.InsertItem( TB_BLACK, String( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
+ aToolBox.InsertItem( TB_GREEN, String( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
+ aToolBox.InsertItem( TB_RED, String( RTL_CONSTASCII_USTRINGPARAM( "Red" ) ) );
+ aToolBox.InsertSeparator();
+ aToolBox.InsertItem( TB_SBL, String( RTL_CONSTASCII_USTRINGPARAM( "SBL" ) ) );
+ aToolBox.InsertItem( TB_SBSA, String( RTL_CONSTASCII_USTRINGPARAM( "SBSA" ) ) );
+ aToolBox.InsertItem( TB_LR, String( RTL_CONSTASCII_USTRINGPARAM( "LR" ) ) );
+ aToolBox.InsertSeparator();
+ aToolBox.InsertItem( TB_DRAW, String( RTL_CONSTASCII_USTRINGPARAM( "Draw!" ) ) );
+ aToolBox.InsertItem( TB_ROTATE, String( RTL_CONSTASCII_USTRINGPARAM( "Rotate!" ) ) );
+ aToolBox.InsertItem( TB_MOVE, String( RTL_CONSTASCII_USTRINGPARAM( "Move->2" ) ) );
+ aToolBox.InsertItem( TB_PARATTR1, String( RTL_CONSTASCII_USTRINGPARAM( "ParaAttr0" ) ) );
+ aToolBox.InsertItem( TB_ATTRIBS, String( RTL_CONSTASCII_USTRINGPARAM( "GetAttribs" ) ) );
+ aToolBox.InsertSeparator();
+ aToolBox.InsertItem( TB_INSFLD, String( RTL_CONSTASCII_USTRINGPARAM( "InsFld" ) ) );
+ aToolBox.InsertItem( TB_UPDFLD, String( RTL_CONSTASCII_USTRINGPARAM( "UpdFld" ) ) );
+ }
+ aToolBox.InsertBreak();
+ {
+ aToolBox.InsertItem( TB_ONLINESPELL, String( RTL_CONSTASCII_USTRINGPARAM( "Spell" ) ) );
+ aToolBox.InsertItem( TB_REDLINES, String( RTL_CONSTASCII_USTRINGPARAM( "RedLine" ) ) );
+ aToolBox.InsertItem( TB_AUTOCORRECT, String( RTL_CONSTASCII_USTRINGPARAM( "Auto*" ) ) );
+ aToolBox.InsertItem( TB_HYPH, String( RTL_CONSTASCII_USTRINGPARAM( "Hyph" ) ) );
+ aToolBox.InsertItem( TB_STDSEL, String( RTL_CONSTASCII_USTRINGPARAM( "StdSel" ) ) );
+ aToolBox.InsertItem( TB_FLAT, String( RTL_CONSTASCII_USTRINGPARAM( "FlatMode" ) ) );
+ aToolBox.InsertItem( TB_OUTL, String( RTL_CONSTASCII_USTRINGPARAM( "Outl" ) ) );
+ aToolBox.InsertItem( TB_POLY, String( RTL_CONSTASCII_USTRINGPARAM( "Poly" ) ) );
+ aToolBox.InsertItem( TB_COLORS, String( RTL_CONSTASCII_USTRINGPARAM( "Colors" ) ));
+ aToolBox.InsertItem( TB_IDLE, String( RTL_CONSTASCII_USTRINGPARAM( "Idle!" ) ) );
+ aToolBox.InsertItem( TB_INSERT, String( RTL_CONSTASCII_USTRINGPARAM( "Insert" ) ) );
+ aToolBox.InsertSeparator();
+ aToolBox.InsertItem( TB_BINOBJ1, String( RTL_CONSTASCII_USTRINGPARAM( ">BINObj" ) ) );
+ aToolBox.InsertItem( TB_BINOBJ1b, String( RTL_CONSTASCII_USTRINGPARAM( ">>BINObj" ) ) );
+ aToolBox.InsertItem( TB_BINOBJ2b, String( RTL_CONSTASCII_USTRINGPARAM( "<<BINObj" ) ) );
+ aToolBox.InsertItem( TB_CLONEBIN, String( RTL_CONSTASCII_USTRINGPARAM( "Clone" ) ) );
+ aToolBox.InsertSeparator();
+ aToolBox.InsertItem( TB_BINOBJ3, String( RTL_CONSTASCII_USTRINGPARAM( "StoreBin" ) ) );
+ aToolBox.InsertItem( TB_BINOBJ4, String( RTL_CONSTASCII_USTRINGPARAM( "CreatBin" ) ) );
+ }
+
+ aToolBox.SetPosPixel( Point( 0, 0 ) );
+ aToolBox.SetSelectHdl( LINK( this, EditMainWindow, TBSelect ) );
+
+ SetBackgroundBrush( Brush( Color( COL_LIGHTGRAY ) ) );
+
+ SetPen( PEN_NULL );
+ Show();
+
+ aVScrollBar.SetScrollHdl ( LINK( this, EditMainWindow, VScrollHdl ) );
+ aVScrollBar.SetLineSize( 300 );
+ aVScrollBar.SetPageSize( 2000 );
+ aHScrollBar.SetScrollHdl ( LINK( this, EditMainWindow, HScrollHdl ) );
+ aHScrollBar.SetLineSize( 300 );
+ aHScrollBar.SetPageSize( 2000 );
+ aHScrollBar.Enable();
+ aVScrollBar.Enable();
+
+ pStyleSheets = new MyEditStyleSheetPool( *aViewWin.GetEditView()->GetEditEngine()->GetEmptyItemSet().GetPool() ),
+ pStyleSheets->MakeStyleSheet( String( RTL_CONSTASCII_USTRINGPARAM( "StyleA")), SFX_STYLE_FAMILY_PARA, 0xffff );
+ pStyleSheets->MakeStyleSheet( String( RTL_CONSTASCII_USTRINGPARAM( "StyleB")), SFX_STYLE_FAMILY_PARA, 0xffff );
+
+ SfxStyleSheet* pA = (SfxStyleSheet*)pStyleSheets->Find( String( RTL_CONSTASCII_USTRINGPARAM( "StyleA" )), SFX_STYLE_FAMILY_ALL );
+ DBG_ASSERT( pA, "Erzeugt und doch nicht da: StyleA" );
+ DBG_ASSERT( pA->IsA( TYPE(SfxStyleSheet) ), "Keine gueltige Vorlage" );
+ pA->GetItemSet().Put( SvxWeightItem( WEIGHT_BOLD, EE_CHAR_WEIGHT) );
+ pA->GetItemSet().Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+
+ SfxStyleSheet* pB = (SfxStyleSheet*)pStyleSheets->Find( String( RTL_CONSTASCII_USTRINGPARAM( "StyleB" )), SFX_STYLE_FAMILY_ALL );
+ DBG_ASSERT( pB, "Erzeugt und doch nicht da: StyleB" );
+ DBG_ASSERT( pB->IsA( TYPE(SfxStyleSheet) ), "Keine gueltige Vorlage" );
+ pB->GetItemSet().Put( SvxPostureItem( ITALIC_NORMAL, EE_CHAR_ITALIC ) );
+
+ aViewWin.GetEditView()->GetEditEngine()->SetStyleSheetPool( pStyleSheets );
+ aViewWin.GetEditView()->GetEditEngine()->SetStatusEventHdl( LINK( this, EditMainWindow, ShowStatus ) );
+
+ SetTitle();
+
+ UpdateToolBox();
+ aToolBox.Show();
+ aViewWin.Show();
+}
+
+void EditMainWindow::SetTitle()
+{
+ String aHeading( String( RTL_CONSTASCII_USTRINGPARAM( "SvEdit! - Zoom " ) ) );
+ aHeading += String::CreateFromInt32(nZoom);
+ aHeading += '%';
+ EditEngine* pEditEngine = aViewWin.GetEditView()->GetEditEngine();
+ if ( pEditEngine->GetControlWord() & EE_CNTRL_STRETCHING )
+ {
+ USHORT nX, nY;
+ pEditEngine->GetGlobalCharStretching( nX, nY );
+ aHeading += String( RTL_CONSTASCII_USTRINGPARAM( ", Stretch=(" ) );
+ aHeading += String::CreateFromInt32(nX);
+ aHeading += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) );
+ aHeading += String::CreateFromInt32(nY);
+ aHeading += ')';
+ }
+ SetText( aHeading );
+}
+
+void EditMainWindow::UpdateToolBox()
+{
+ EditView* pEditView = aViewWin.GetEditView();
+ EditEngine* pEditEngine = pEditView->GetEditEngine();
+ SfxItemSet aCurSet( pEditView->GetAttribs() );
+
+ ULONG nControl = pEditEngine->GetControlWord();
+ aToolBox.EnableItem( TB_UNDO, (BOOL)pEditEngine->GetUndoManager().GetUndoActionCount() );
+ aToolBox.EnableItem( TB_REDO, (BOOL)pEditEngine->GetUndoManager().GetRedoActionCount() );
+ aToolBox.EnableItem( TB_BINOBJ2b, (BOOL)(long)pBinObj );
+ aToolBox.EnableItem( TB_MOVE, pEditEngine->GetParagraphCount() > 3 );
+ aToolBox.CheckItem( TB_ONLINESPELL, nControl & EE_CNTRL_ONLINESPELLING ? TRUE : FALSE );
+ aToolBox.CheckItem( TB_AUTOCORRECT, nControl & EE_CNTRL_AUTOCORRECT ? TRUE : FALSE );
+// aToolBox.CheckItem( TB_HYPH, nControl & EE_CNTRL_HYPHENATE ? TRUE : FALSE );
+ aToolBox.CheckItem( TB_REDLINES, nControl & EE_CNTRL_NOREDLINES ? FALSE : TRUE );
+ aToolBox.CheckItem( TB_STDSEL, pEditView->GetSelectionMode() == EE_SELMODE_STD );
+ aToolBox.CheckItem( TB_FLAT, pEditEngine->IsFlatMode() );
+ aToolBox.CheckItem( TB_OUTL, ( nControl & EE_CNTRL_OUTLINER ) ? TRUE : FALSE );
+ aToolBox.CheckItem( TB_POLY, pEditEngine->GetPolygon() ? TRUE : FALSE );
+ aToolBox.CheckItem( TB_COLORS, ( nControl & EE_CNTRL_NOCOLORS ) ? FALSE : TRUE );
+ aToolBox.CheckItem( TB_IDLE, pEditEngine->IsIdleFormatterEnabled() );
+ aToolBox.CheckItem( TB_INSERT, pEditView->IsInsertMode() );
+
+ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_ITEMS_END; nWhich++)
+ {
+// if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
+// ;
+// else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE )
+// ;
+// else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_ON )
+ {
+ const SfxPoolItem& rItem = aCurSet.Get( nWhich );
+ switch ( nWhich )
+ {
+ case EE_PARA_HYPHENATE:
+ aToolBox.CheckItem( TB_HYPH, ((SfxBoolItem&)rItem).GetValue() != 0 );
+ break;
+ case EE_PARA_LRSPACE:
+ aToolBox.CheckItem( TB_LR, ((SvxLRSpaceItem&)rItem).GetTxtLeft() != 0 );
+ break;
+ case EE_PARA_ULSPACE:
+ aToolBox.CheckItem( TB_SBSA, ((SvxULSpaceItem&)rItem).GetUpper() != 0 );
+ break;
+ case EE_PARA_SBL:
+ aToolBox.CheckItem( TB_SBL, ((SvxLineSpacingItem&)rItem).GetPropLineSpace() != 100 );
+ break;
+ case EE_PARA_JUST:
+ {
+ SvxAdjust e = ((SvxAdjustItem&)rItem).GetAdjust();
+ aToolBox.CheckItem( TB_LEFT, e == SVX_ADJUST_LEFT );
+ aToolBox.CheckItem( TB_RIGHT, e == SVX_ADJUST_RIGHT);
+ aToolBox.CheckItem( TB_CENTER, e == SVX_ADJUST_CENTER);
+ aToolBox.CheckItem( TB_BLOCK, e == SVX_ADJUST_BLOCK );
+ }
+ break;
+ case EE_PARA_TABS:
+ break;
+ case EE_CHAR_COLOR:
+ {
+ Color aColor( ((SvxColorItem&)rItem).GetValue() );
+ aToolBox.CheckItem( TB_BLACK, aColor == COL_BLACK );
+ aToolBox.CheckItem( TB_GREEN, aColor == COL_GREEN );
+ aToolBox.CheckItem( TB_RED, aColor == COL_RED );
+ }
+ break;
+ case EE_CHAR_FONTINFO:
+ {
+ FontFamily e = ((SvxFontItem&)rItem).GetFamily();
+ aToolBox.CheckItem( TB_FONT1, e == FAMILY_ROMAN );
+ aToolBox.CheckItem( TB_FONT2, e == FAMILY_SWISS );
+ }
+ break;
+ case EE_CHAR_FONTHEIGHT:
+ break;
+ case EE_CHAR_WEIGHT:
+ {
+ FontWeight e = ((SvxWeightItem&)rItem).GetWeight();
+ aToolBox.CheckItem( TB_BOLD, e == WEIGHT_BOLD );
+ }
+ break;
+ case EE_CHAR_UNDERLINE:
+ {
+ aToolBox.CheckItem( TB_UNDERLINE, ((SvxUnderlineItem&)rItem).GetUnderline() );
+ }
+ break;
+ case EE_CHAR_WLM:
+ {
+ aToolBox.CheckItem( TB_WLM, ((SvxWordLineModeItem&)rItem).GetValue() );
+ }
+ break;
+ case EE_CHAR_PAIRKERNING:
+ {
+ aToolBox.CheckItem( TB_PKERN, ((SvxAutoKernItem&)rItem).GetValue() );
+ }
+ break;
+ case EE_CHAR_KERNING:
+ {
+ aToolBox.CheckItem( TB_KERN, (BOOL)((SvxKerningItem&)rItem).GetValue() );
+ }
+ break;
+ case EE_CHAR_ESCAPEMENT:
+ {
+ aToolBox.CheckItem( TB_SUPER, ((SvxEscapementItem&)rItem).GetEsc() > 0 );
+ aToolBox.CheckItem( TB_SUB, ((SvxEscapementItem&)rItem).GetEsc() < 0 );
+ }
+ break;
+ case EE_CHAR_STRIKEOUT:
+ break;
+ case EE_CHAR_ITALIC:
+ {
+ FontItalic e = ((SvxPostureItem&)rItem).GetPosture();
+ aToolBox.CheckItem( TB_ITALIC, e == ITALIC_NORMAL );
+ }
+ break;
+ case EE_CHAR_OUTLINE:
+ break;
+ case EE_CHAR_SHADOW:
+ break;
+ }
+ }
+ }
+}
+
+IMPL_LINK( EditMainWindow, TBSelect, ToolBox *, p )
+{
+ EditView* pEditView = aViewWin.GetEditView();
+ EditEngine* pEditEngine = pEditView->GetEditEngine();
+ USHORT nId = aToolBox.GetCurItemId();
+ BOOL bChecked = aToolBox.IsItemChecked( nId );
+ SfxPoolItem* pNewItem = 0;
+ switch ( nId )
+ {
+ case TB_LEFT: pNewItem = new SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST );
+ break;
+ case TB_RIGHT: pNewItem = new SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST );
+ break;
+ case TB_CENTER: pNewItem = new SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST );
+ break;
+ case TB_BLOCK: pNewItem = new SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST );
+ break;
+ case TB_HYPH: pNewItem = new SfxBoolItem( EE_PARA_HYPHENATE, !bChecked );
+ break;
+ case TB_UNDO: pEditView->Undo();
+ pEditView->ShowCursor();
+ break;
+ case TB_REDO: pEditView->Redo();
+ pEditView->ShowCursor();
+ break;
+ case TB_ONLINESPELL: {
+ ULONG nControl = pEditView->GetEditEngine()->GetControlWord();
+ if ( bChecked )
+ nControl = nControl & ~EE_CNTRL_ONLINESPELLING;
+ else
+ nControl = nControl | EE_CNTRL_ONLINESPELLING;
+ pEditView->GetEditEngine()->SetControlWord( nControl );
+ }
+ break;
+ case TB_REDLINES: {
+ ULONG nControl = pEditView->GetEditEngine()->GetControlWord();
+ if ( !bChecked )
+ nControl = nControl & ~EE_CNTRL_NOREDLINES;
+ else
+ nControl = nControl | EE_CNTRL_NOREDLINES;
+ pEditView->GetEditEngine()->SetControlWord( nControl );
+ }
+ break;
+ case TB_AUTOCORRECT: {
+ ULONG nControl = pEditView->GetEditEngine()->GetControlWord();
+ if ( bChecked )
+ nControl = nControl & ~EE_CNTRL_AUTOCORRECT;
+ else
+ nControl = nControl | EE_CNTRL_AUTOCORRECT;
+ pEditView->GetEditEngine()->SetControlWord( nControl );
+ }
+ break;
+ case TB_STDSEL: if ( bChecked )
+ pEditView->SetSelectionMode( EE_SELMODE_TXTONLY );
+ else
+ pEditView->SetSelectionMode( EE_SELMODE_STD );
+ break;
+ case TB_FLAT: pEditEngine->SetFlatMode( !pEditEngine->IsFlatMode() );
+ break;
+ case TB_COLORS: {
+ ULONG nControl = pEditView->GetEditEngine()->GetControlWord();
+ if ( bChecked )
+ nControl = nControl | EE_CNTRL_NOCOLORS;
+ else
+ nControl = nControl & ~EE_CNTRL_NOCOLORS;
+ pEditView->GetEditEngine()->SetControlWord( nControl );
+ }
+// aViewWin.Invalidate();
+ pEditView->GetEditEngine()->Draw( pEditView->GetWindow(), pEditView->GetOutputArea(), pEditView->GetVisArea().TopLeft() );
+ break;
+ case TB_OUTL: {
+ ULONG nControl = pEditView->GetEditEngine()->GetControlWord();
+ if ( !bChecked )
+ nControl = nControl | EE_CNTRL_OUTLINER;
+ else
+ nControl = nControl & ~EE_CNTRL_OUTLINER;
+ pEditView->GetEditEngine()->SetControlWord( nControl );
+ }
+ break;
+ case TB_POLY: {
+ if ( !bChecked )
+ CreatePolygon();
+ else
+ pEditView->GetEditEngine()->ClearPolygon();
+ }
+ break;
+ case TB_IDLE: pEditEngine->EnableIdleFormatter( !pEditEngine->IsIdleFormatterEnabled() );
+ break;
+ case TB_INSFLD: {
+ static BYTE nFld = 0;
+ if ( nFld > 2 )
+ nFld = 0;
+ if ( nFld == 0 )
+ {
+ SvxFieldItem aFld( SvxURLField( String( RTL_CONSTASCII_USTRINGPARAM( "www.mopo.de" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "Bla" ) ), SVXURLFORMAT_REPR ), EE_FEATURE_FIELD );
+ pEditView->InsertField( aFld );
+ }
+ else if ( nFld == 1 )
+ pEditView->InsertField( SvxFieldItem( SvxURLField( String( RTL_CONSTASCII_USTRINGPARAM( "www.mopo.de" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "Morgenpost" ) ), SVXURLFORMAT_URL ), EE_FEATURE_FIELD ) );
+ else if ( nFld == 2 )
+ pEditView->InsertField( SvxFieldItem( SvxDateField( Date( 1,1,1995 ), SVXDATETYPE_FIX, SVXDATEFORMAT_D ), EE_FEATURE_FIELD ) );
+
+ nFld++;
+ }
+ break;
+ case TB_UPDFLD: pEditEngine->UpdateFields();
+ break;
+ case TB_INSERT: pEditView->SetInsertMode( !pEditView->IsInsertMode() );
+ break;
+ case TB_FONT1: pNewItem = new SvxFontItem( FAMILY_ROMAN, String( RTL_CONSTASCII_USTRINGPARAM( "Times New Roman" ) ), String(), PITCH_DONTKNOW, RTL_TEXTENCODING_MS_1252, EE_CHAR_FONTINFO );
+ break;
+ case TB_FONT2: pNewItem = new SvxFontItem( FAMILY_SWISS, String( RTL_CONSTASCII_USTRINGPARAM( "Helv" ) ), String(), PITCH_DONTKNOW, RTL_TEXTENCODING_MS_1252, EE_CHAR_FONTINFO );
+ break;
+/*
+ case TB_FONT:
+ {
+ FontDialog* pDlg = new FontDialog( this, WB_SVLOOK );
+ pDlg->SetPrinter( pPrinter );
+ Font aFont = pEditEngine->CreateFontFromItemSet( pEditView->GetAttribs() );
+ MapMode aPntMode( MAP_POINT );
+ MapMode aCurrent( aViewWin.GetMapMode() );
+ Size aSz( aViewWin.LogicToLogic( aFont.GetSize(), &aCurrent, &aPntMode ) );
+ aSz.Width() *= 10;
+ aSz.Height() *= 10;
+ aFont.SetSize( aSz );
+ pDlg->SetSelectFont( aFont );
+ if ( pDlg->Execute() )
+ {
+ Font aNewFont( pDlg->GetSelectFont() );
+ aSz = aViewWin.LogicToLogic( aNewFont.GetSize(), &aPntMode, &aCurrent );
+ aSz.Width() /= 10;
+ aSz.Height() /= 10;
+ aNewFont.SetSize( aSz );
+
+ SfxItemSet aSet( pEditEngine->GetEmptyItemSet() );
+
+ pEditEngine->SetFontInfoInItemSet( aSet, aNewFont );
+ pEditView->SetAttribs( aSet );
+ }
+ delete pDlg;
+ }
+ break;
+*/
+ case TB_BOLD: if ( bChecked )
+ pNewItem = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT);
+ else
+ pNewItem = new SvxWeightItem( WEIGHT_BOLD, EE_CHAR_WEIGHT);
+ break;
+ case TB_ITALIC: if ( bChecked )
+ pNewItem = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC );
+ else
+ pNewItem = new SvxPostureItem( ITALIC_NORMAL, EE_CHAR_ITALIC );
+ break;
+ case TB_UNDERLINE: if ( bChecked )
+ pNewItem = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE );
+ else
+ pNewItem = new SvxUnderlineItem( UNDERLINE_SINGLE, EE_CHAR_UNDERLINE );
+ break;
+ case TB_WLM: pNewItem = new SvxWordLineModeItem( !bChecked, EE_CHAR_WLM );
+ break;
+ case TB_PKERN: pNewItem = new SvxAutoKernItem( !bChecked, EE_CHAR_PAIRKERNING );
+ break;
+ case TB_KERN: if ( bChecked )
+ pNewItem = new SvxKerningItem( 0, EE_CHAR_KERNING );
+ else
+ pNewItem = new SvxKerningItem( 100, EE_CHAR_KERNING);
+ break;
+ case TB_SUPER: if ( bChecked )
+ pNewItem = new SvxEscapementItem( SVX_ESCAPEMENT_OFF, EE_CHAR_ESCAPEMENT);
+ else
+// pNewItem = new SvxEscapementItem( SVX_ESCAPEMENT_SUPERSCRIPT, EE_CHAR_ESCAPEMENT);
+ pNewItem = new SvxEscapementItem( 50, 100, EE_CHAR_ESCAPEMENT );
+ break;
+ case TB_SUB: if ( bChecked )
+ pNewItem = new SvxEscapementItem( SVX_ESCAPEMENT_OFF, EE_CHAR_ESCAPEMENT);
+ else
+// pNewItem = new SvxEscapementItem( SVX_ESCAPEMENT_SUBSCRIPT, EE_CHAR_ESCAPEMENT);
+ pNewItem = new SvxEscapementItem( -50, 100, EE_CHAR_ESCAPEMENT );
+ break;
+ case TB_GREEN: pNewItem = new SvxColorItem( Color(COL_GREEN), EE_CHAR_COLOR);
+ break;
+ case TB_RED: pNewItem = new SvxColorItem( Color(COL_RED), EE_CHAR_COLOR);
+ break;
+ case TB_BLACK: pNewItem = new SvxColorItem( Color(COL_BLACK), EE_CHAR_COLOR);
+ break;
+ case TB_SBL: pNewItem = new SvxLineSpacingItem( 0, EE_PARA_SBL );
+ if ( bChecked )
+ {
+ ((SvxLineSpacingItem*)pNewItem)->SetInterLineSpace( 0 );
+ }
+ else
+ {
+ ((SvxLineSpacingItem*)pNewItem)->SetPropLineSpace( 150 );
+ }
+ break;
+ case TB_SBSA: pNewItem = new SvxULSpaceItem( EE_PARA_ULSPACE );
+ if ( !bChecked )
+ {
+ ((SvxULSpaceItem*)pNewItem)->SetUpper( 400 );
+ ((SvxULSpaceItem*)pNewItem)->SetLower( 400 );
+ }
+ break;
+ case TB_LR: pNewItem = new SvxLRSpaceItem( EE_PARA_LRSPACE );
+ if ( !bChecked )
+ {
+ ((SvxLRSpaceItem*)pNewItem)->SetTxtLeft( 1000 );
+ ((SvxLRSpaceItem*)pNewItem)->SetTxtFirstLineOfst( -500 );
+ ((SvxLRSpaceItem*)pNewItem)->SetRight( 500 );
+ }
+ break;
+ case TB_DEFTAB: if ( bChecked )
+ pEditEngine->SetDefTab( 2000 );
+ else
+ pEditEngine->SetDefTab( 600 );
+ pEditView->ShowCursor();
+ aToolBox.CheckItem( nId, !bChecked );
+ break;
+ case TB_DRAW: {
+ pTmpWindow->SetMapMode( aViewWin.GetMapMode() );
+ pTmpWindow->SetBackgroundBrush( Brush( Color( COL_GRAY ) ) );
+ pTmpWindow->SetFillInBrush( Brush( Color( COL_LIGHTGRAY ) ) );
+ pTmpWindow->Show();
+ pTmpWindow->Invalidate();
+ pTmpWindow->Update();
+ pTmpWindow->DrawText( Point( 20, 20 ), String( RTL_CONSTASCII_USTRINGPARAM( "It's a Test..." ) ) );
+ Rectangle aRect( Point( 500, 500 ), Size( 10000, 4000 ) );
+ pTmpWindow->DrawRect( aRect );
+ pEditEngine->Draw( pTmpWindow, aRect, Point( 0, 0 ) );
+ nRotation = 0;
+ }
+ break;
+ case TB_ROTATE: {
+ nRotation += 100;
+ if ( nRotation == 3600 )
+ nRotation = 0;
+ pTmpWindow->SetMapMode( aViewWin.GetMapMode() );
+ pTmpWindow->SetBackgroundBrush( Brush( Color( COL_LIGHTGRAY ) ) );
+ pTmpWindow->SetFillInBrush( Brush( Color( COL_LIGHTGRAY ) ) );
+ pTmpWindow->Show();
+ pTmpWindow->Invalidate();
+ pTmpWindow->Update();
+ pTmpWindow->DrawText( Point( 20, 20 ), String( RTL_CONSTASCII_USTRINGPARAM( "It's a Test..." ) ) );
+ Rectangle aRect( Point( 500, 500 ), Size( 10000, 4000 ) );
+ pEditEngine->Draw( pTmpWindow, Point( 2000, 4000 ), nRotation );
+ }
+ break;
+
+ case TB_MOVE:
+ {
+ ESelection aESel = pEditView->GetSelection();
+ USHORT nStartPara = Min( aESel.nStartPara, aESel.nEndPara );
+ USHORT nEndPara = Max( aESel.nStartPara, aESel.nEndPara );
+ pEditView->MoveParagraphs( Range(nStartPara,nEndPara), 2 );
+ }
+ break;
+ case TB_PARATTR1:
+ {
+ pEditEngine->SetUpdateMode( FALSE );
+ USHORT nPara = 0;
+ SfxItemSet aSet( pEditEngine->GetEmptyItemSet() );
+ aSet.Put( SvxFontItem( FAMILY_DECORATIVE, String( RTL_CONSTASCII_USTRINGPARAM( "StarBats" ) ), String(),PITCH_DONTKNOW, RTL_TEXTENCODING_MS_1252, EE_CHAR_FONTINFO ) );
+ aSet.Put( SvxColorItem( Color(COL_MAGENTA), EE_CHAR_COLOR ) );
+ aSet.Put( SvxFontHeightItem(600, 100, EE_CHAR_FONTHEIGHT) );
+ aSet.Put( SvxPostureItem( ITALIC_NORMAL, EE_CHAR_ITALIC ) );
+ aSet.Put( SvxLRSpaceItem( 0, 0, 1000, 0, EE_PARA_LRSPACE ) );
+ pEditView->SetParaAttribs( aSet, nPara );
+ pEditEngine->SetUpdateMode( TRUE );
+ pEditView->ShowCursor();
+ }
+ break;
+ case TB_STYLEA:
+ {
+ pEditView->SetStyleSheet( String( RTL_CONSTASCII_USTRINGPARAM( "StyleA" ) ), SFX_STYLE_FAMILY_PARA );
+ }
+ break;
+ case TB_STYLEB:
+ {
+ pEditView->SetStyleSheet( String( RTL_CONSTASCII_USTRINGPARAM( "StyleB" ) ), SFX_STYLE_FAMILY_PARA );
+ }
+ break;
+ case TB_STYLEC:
+ {
+ SfxStyleSheetBase* pC = (SfxStyleSheet*)pStyleSheets->Find( String( RTL_CONSTASCII_USTRINGPARAM( "StyleC" ) ), SFX_STYLE_FAMILY_ALL );
+ if ( !pC )
+ {
+ pStyleSheets->MakeStyleSheet( String( RTL_CONSTASCII_USTRINGPARAM( "StyleC" ) ), SFX_STYLE_FAMILY_PARA, 0xffff );
+ pC = (SfxStyleSheet*)pStyleSheets->Find( String( RTL_CONSTASCII_USTRINGPARAM( "StyleC" ) ), SFX_STYLE_FAMILY_ALL );
+ DBG_ASSERT( pC, "Gerade erzeugt, aber nicht auffindbar!" );
+ pC->GetItemSet().Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ pC->GetItemSet().Put( SvxUnderlineItem( UNDERLINE_DOUBLE, EE_CHAR_UNDERLINE ) );
+ aToolBox.SetItemText( TB_STYLEC, String( RTL_CONSTASCII_USTRINGPARAM( "StyleC" ) ) );
+ }
+ pEditView->SetStyleSheet( String( RTL_CONSTASCII_USTRINGPARAM( "StyleC" ) ), SFX_STYLE_FAMILY_PARA );
+ }
+ break;
+ case TB_STYLEBAFTERA:
+ {
+ SfxStyleSheet* pA = (SfxStyleSheet*)pStyleSheets->Find( String( RTL_CONSTASCII_USTRINGPARAM( "StyleA" )) , SFX_STYLE_FAMILY_ALL );
+ DBG_ASSERT( pA, "Erzeugt und doch nicht da: StyleA" );
+ pA->SetFollow( String( RTL_CONSTASCII_USTRINGPARAM( "StyleB" ) ) );
+ }
+ break;
+ case TB_STYLEAISU:
+ {
+ SfxStyleSheet* pA = (SfxStyleSheet*)pStyleSheets->Find( String( RTL_CONSTASCII_USTRINGPARAM( "StyleA" ) ), SFX_STYLE_FAMILY_ALL );
+ DBG_ASSERT( pA, "Erzeugt und doch nicht da: StyleA" );
+ pA->GetItemSet().Put( SvxUnderlineItem( UNDERLINE_SINGLE, EE_CHAR_UNDERLINE ) );
+ pA->GetPool().Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *pA ) );
+ }
+ break;
+ case TB_STYLEBFROMA:
+ {
+ SfxStyleSheet* pB = (SfxStyleSheet*)pStyleSheets->Find( String( RTL_CONSTASCII_USTRINGPARAM( "StyleB" ) ), SFX_STYLE_FAMILY_ALL );
+ DBG_ASSERT( pB, "Erzeugt und doch nicht da: StyleB" );
+ pB->SetParent( String( RTL_CONSTASCII_USTRINGPARAM( "StyleA" ) ) );
+ }
+ break;
+ case TB_BINOBJ1:
+ {
+ delete pBinObj;
+ pBinObj = pEditEngine->CreateTextObject();
+ }
+ break;
+ case TB_BINOBJ1b:
+ {
+ delete pBinObj;
+ pBinObj = pEditView->CreateTextObject();
+ }
+ break;
+ case TB_CLONEBIN:
+ {
+ if ( pBinObj )
+ {
+ EditTextObject* p = pBinObj->Clone();
+ delete pBinObj;
+ pBinObj = p;
+ }
+ }
+ break;
+ case TB_BINOBJ2b:
+ {
+ if ( pBinObj )
+ {
+ pEditView->InsertText( *pBinObj );
+ }
+ }
+ break;
+ case TB_BINOBJ3:
+ {
+ if ( !pFileDialogBox2->Execute() )
+ return FALSE;
+ DirEntry aDirEntry( pFileDialogBox2->GetPath() );
+ SvFileStream aStrm( aDirEntry.GetFull(), STREAM_WRITE | STREAM_TRUNC );
+ EditTextObject* pTmpObj = pEditEngine->CreateTextObject();
+ pTmpObj->Store( aStrm );
+ DBG_ASSERT( !aStrm.GetError(), "Store: Error!" );
+ delete pTmpObj;
+ }
+ break;
+ case TB_BINOBJ4:
+ {
+ if ( !pFileDialogBox->Execute() )
+ return FALSE;
+ DirEntry aDirEntry( pFileDialogBox->GetPath() );
+ SvFileStream aStrm( aDirEntry.GetFull(), STREAM_READ );
+ delete pBinObj;
+ pBinObj = EditTextObject::Create( aStrm );
+// EditTextObject* pTmpObj = pEditEngine->CreateTextObject( aStrm );
+// pEditEngine->SetText( *pTmpObj );
+// pEditView->ShowCursor();
+// delete pTmpObj;
+ }
+ break;
+ case TB_OPEN:
+ case TB_OPEN2:
+ {
+ if ( !pFileDialogBox->Execute() )
+ return FALSE;
+ DirEntry aDirEntry( pFileDialogBox->GetPath() );
+ aDirEntry.ToAbs();
+ String aFileName( aDirEntry.GetFull() );
+ SvFileStream aStrm( aFileName, STREAM_READ );
+ if ( aStrm.GetError() )
+ InfoBox( 0, String( RTL_CONSTASCII_USTRINGPARAM( "StreamError!" ) ) ).Execute();
+ Application::EnterWait();
+ if ( nId == TB_OPEN )
+ {
+ if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "rtf" ) == COMPARE_EQUAL )
+ pEditEngine->Read( aStrm, EE_FORMAT_RTF );
+ if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "htm" ) == COMPARE_EQUAL )
+ {
+ String aAbs = INetURLObject::SmartRelToAbs( aDirEntry.GetFull() );
+ INetURLObject::SetBaseURL( aAbs );
+ pEditEngine->Read( aStrm, EE_FORMAT_HTML );
+ }
+ else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "bin" ) == COMPARE_EQUAL )
+ pEditEngine->Read( aStrm, EE_FORMAT_BIN );
+ else
+ pEditEngine->Read( aStrm, EE_FORMAT_TEXT );
+
+ pEditView->ShowCursor();
+ }
+ else
+ {
+ if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "rtf" ) == COMPARE_EQUAL )
+ pEditView->Read( aStrm, EE_FORMAT_RTF );
+ else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "bin" ) == COMPARE_EQUAL )
+ pEditView->Read( aStrm, EE_FORMAT_BIN );
+ else
+ pEditView->Read( aStrm, EE_FORMAT_TEXT );
+ }
+
+ Application::LeaveWait();
+
+ }
+ break;
+ case TB_PRINT:
+ {
+ pPrinter->SetPageQueueSize( 1 );
+ PrintDialog aPrnDlg( this );
+ aPrnDlg.SetPrinter( pPrinter );
+ if ( aPrnDlg.Execute() )
+ {
+ pPrinter->StartJob( String( RTL_CONSTASCII_USTRINGPARAM( "SvEdit - PrinterTest" ) ) );
+ pPrinter->StartPage();
+ Size aSz( pEditEngine->CalcTextWidth(), pEditEngine->GetTextHeight() );
+ Pen aPen( PEN_SOLID );
+ aPen.SetColor( Color( COL_BLACK ) );
+ pPrinter->SetPen( aPen );
+ Rectangle aR( Point( 2000, 4000 ), aSz );
+ pPrinter->DrawRect( aR );
+ // So folgt auf IIISi, 75DPI kein Ausdruck!
+// pPrinter->SetClipRegion( Region( aR ) );
+ pEditEngine->Draw( pPrinter, Point( 2000, 4000 ), nRotation );
+// pPrinter->SetClipRegion();
+ pPrinter->EndPage();
+ pPrinter->EndJob();
+ }
+ }
+ break;
+ case TB_SAVE:
+ case TB_SAVE2:
+ {
+ if ( !pFileDialogBox2->Execute() )
+ return FALSE;
+ DirEntry aDirEntry( pFileDialogBox2->GetPath() );
+// DirEntry aDirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "d:\\xxx.rtf" ) ) );
+ SvFileStream aStrm( aDirEntry.GetFull(), STREAM_WRITE | STREAM_TRUNC );
+ Application::EnterWait();
+ if ( nId == TB_SAVE )
+ {
+ if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "rtf") == COMPARE_EQUAL )
+ pEditEngine->Write( aStrm, EE_FORMAT_RTF );
+ else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "bin" ) == COMPARE_EQUAL )
+ pEditEngine->Write( aStrm, EE_FORMAT_BIN );
+ else
+ pEditEngine->Write( aStrm, EE_FORMAT_TEXT );
+ }
+ else
+ {
+ if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "rtf" ) == COMPARE_EQUAL )
+ pEditView->Write( aStrm, EE_FORMAT_RTF );
+ else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "bin" ) == COMPARE_EQUAL )
+ pEditView->Write( aStrm, EE_FORMAT_BIN );
+ else
+ pEditView->Write( aStrm, EE_FORMAT_TEXT );
+ }
+ Application::LeaveWait();
+ }
+ break;
+ case TB_ATTRIBS:
+ {
+ SfxItemSet aCurSet = pEditView->GetAttribs();
+ XubString aDebStr( String( RTL_CONSTASCII_USTRINGPARAM( "Attribute in Selektion:" ) ) );
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "\nVorlage:" ) );
+ XubString aStyle; SfxStyleFamily eFam;
+ pEditView->GetStyleSheet( aStyle, eFam );
+ aDebStr += aStyle;
+ for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_ITEMS_END; nWhich++)
+ {
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "\n" ) );
+ aDebStr += nWhich;
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "\t" ) );
+ if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "---" ) );
+ else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE )
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "XXX" ) );
+ else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_ON )
+ {
+ const SfxPoolItem& rItem = aCurSet.Get( nWhich );
+ switch ( nWhich )
+ {
+ case EE_PARA_LRSPACE:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FI=" ) );
+ aDebStr += ((SvxLRSpaceItem&)rItem).GetTxtFirstLineOfst();
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( ", LI=" ) );
+ aDebStr += ((SvxLRSpaceItem&)rItem).GetTxtLeft();
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( ", RI=" ) );
+ aDebStr += ((SvxLRSpaceItem&)rItem).GetRight();
+ break;
+ case EE_PARA_ULSPACE:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "SB=" ) );
+ aDebStr += ((SvxULSpaceItem&)rItem).GetUpper();
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( ", SA=" ) );
+ aDebStr += ((SvxULSpaceItem&)rItem).GetLower();
+ break;
+ case EE_PARA_SBL:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "SBL=" ) );
+ aDebStr += ((SvxLineSpacingItem&)rItem).GetInterLineSpace();
+ break;
+ case EE_PARA_JUST:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "SvxAdust=" ) );
+ aDebStr += (USHORT)((SvxAdjustItem&)rItem).GetAdjust();
+ break;
+ case EE_PARA_TABS:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "Tabs = ?" ) );
+ break;
+ case EE_CHAR_COLOR:
+ {
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "Color= " ) );
+ Color aColor( ((SvxColorItem&)rItem).GetValue() );
+ aDebStr += aColor.GetRed();
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) );
+ aDebStr += aColor.GetGreen();
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) );
+ aDebStr += aColor.GetBlue();
+ }
+ break;
+ case EE_CHAR_FONTINFO:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "Font=" ) );
+ aDebStr += ((SvxFontItem&)rItem).GetFamilyName();
+ break;
+ case EE_CHAR_FONTHEIGHT:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "Groesse=" ) );
+ aDebStr += ((SvxFontHeightItem&)rItem).GetHeight();
+ break;
+ case EE_CHAR_WEIGHT:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontWeight=" ) );
+ aDebStr += (USHORT)((SvxWeightItem&)rItem).GetWeight();
+ break;
+ case EE_CHAR_UNDERLINE:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontUnderline=" ) );
+ aDebStr += (USHORT)((SvxUnderlineItem&)rItem).GetUnderline();
+ break;
+ case EE_CHAR_WLM:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "WordLineMode=" ) );
+ aDebStr += (USHORT)((SvxWordLineModeItem&)rItem).GetValue();
+ break;
+ case EE_CHAR_STRIKEOUT:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontStrikeout=" ) );
+ aDebStr += (USHORT)((SvxCrossedOutItem&)rItem).GetStrikeout();
+ break;
+ case EE_CHAR_ITALIC:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontPosture=" ) );
+ aDebStr += (USHORT)((SvxPostureItem&)rItem).GetPosture();
+ break;
+ case EE_CHAR_OUTLINE:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontOutline=" ) );
+ aDebStr += (USHORT)((SvxContourItem&)rItem).GetValue();
+ break;
+ case EE_CHAR_SHADOW:
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontShadowed=" ) );
+ aDebStr += (USHORT)((SvxShadowedItem&)rItem).GetValue();
+ break;
+ }
+ }
+ else
+ aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "?" ) );
+ }
+ InfoBox( 0, aDebStr ).Execute();
+ }
+ break;
+ }
+
+ if ( pNewItem )
+ {
+ SfxItemSet aSet = pEditView->GetEmptyItemSet();
+ aSet.Put( *pNewItem );
+ pEditView->SetAttribs( aSet );
+ delete pNewItem;
+ }
+ UpdateToolBox();
+ return 0;
+}
+
+void EditMainWindow::CreatePolygon()
+{
+ EditView* pEditView = aViewWin.GetEditView();
+ Size aSz = pEditView->GetWindow()->GetOutputSize();
+ Point aOffset( aSz.Width()/8, aSz.Height()/8 );
+ aSz.Width() *= 3;
+ aSz.Width() /= 4;
+ aSz.Height() *= 3;
+ aSz.Height() /= 4;
+ Polygon aPoly( 5 );
+ aPoly.SetPoint( Point( aSz.Width()/2, 0 ), 0 );
+ aPoly.SetPoint( Point( aSz.Width(), aSz.Height()/3 ), 1 );
+ aPoly.SetPoint( Point( aSz.Width()/2, aSz.Height() ), 2 );
+ aPoly.SetPoint( Point( 0, aSz.Height()/2 ), 3 );
+ aPoly.SetPoint( Point( aSz.Width()/2, 0 ), 4 );
+ PolyPolygon aPPoly( aPoly );
+ XPolyPolygon aXPoly( aPPoly );
+ pEditView->GetEditEngine()->SetPolygon( aPPoly );
+ pEditView->SetOutputArea( Rectangle( aOffset, aSz ) );
+ ULONG nWord = pEditView->GetControlWord();
+ nWord &= ~(EV_CNTRL_AUTOSCROLL);
+ pEditView->SetControlWord( nWord );
+ aViewWin.Invalidate();
+}
+
+void __EXPORT EditMainWindow::GetFocus()
+{
+ aViewWin.GrabFocus();
+}
+
+IMPL_LINK_INLINE_START( EditMainWindow, HScrollHdl, ScrollBar *, pScrl )
+{
+ EditView* pEditView = aViewWin.GetEditView();
+ pEditView->Scroll( -pScrl->GetDelta(), 0, RGCHK_PAPERSZ1 );
+ return 0;
+}
+IMPL_LINK_INLINE_END( EditMainWindow, HScrollHdl, ScrollBar *, pScrl )
+
+IMPL_LINK_INLINE_START( EditMainWindow, VScrollHdl, ScrollBar *, pScrl )
+{
+ EditView* pEditView = aViewWin.GetEditView();
+ pEditView->Scroll( 0, -pScrl->GetDelta(), RGCHK_PAPERSZ1 );
+ return 0;
+}
+IMPL_LINK_INLINE_END( EditMainWindow, VScrollHdl, ScrollBar *, pScrl )
+
+void EditMainWindow::SetScrollBarRanges()
+{
+ EditView* pEditView = aViewWin.GetEditView();
+ long y = pEditView->GetEditEngine()->GetTextHeight();
+ long x = pEditView->GetEditEngine()->GetPaperSize().Width();
+
+ aHScrollBar.SetRange( Range( 0, x ) );
+ aVScrollBar.SetRange( Range( 0, y ) );
+}
+
+void EditMainWindow::SetScrollBars()
+{
+ EditView* pEditView = aViewWin.GetEditView();
+ Size aSz = GetOutputSizePixel();
+ Size aRealSz( aSz );
+ long nScrollbarWidthPixel = aVScrollBar.GetSizePixel().Width();
+ long nTBHeight = aToolBox.GetSizePixel().Height();
+ aSz.Height() -= nTBHeight;
+ Size aOrgSz( aSz );
+
+ // VScroll...
+ aSz.Height() += 2;
+ Point aPoint( ( aSz.Width()- nScrollbarWidthPixel+1 ), -1+nTBHeight);
+ aSz.Width() = nScrollbarWidthPixel;
+ aVScrollBar.SetPosSizePixel( aPoint, aSz );
+
+ // HScroll...
+ aSz = aOrgSz;
+ Point aPoint2( 0, aRealSz.Height()-aHScrollBar.GetSizePixel().Height()+1 ); // TB-Height schon drin!
+ aSz.Width() -= aVScrollBar.GetSizePixel().Width();
+ aSz.Width() += 2;
+
+ aSz.Height() = nScrollbarWidthPixel;
+ aHScrollBar.SetPosSizePixel( aPoint2, aSz );
+
+ aHScrollBar.SetVisibleSize( pEditView->GetOutputArea().GetWidth() );
+ aVScrollBar.SetVisibleSize( pEditView->GetOutputArea().GetHeight() );
+
+ SetScrollBarRanges();
+
+ aVScrollBar.Show();
+ aHScrollBar.Show();
+}
+
+void __EXPORT EditMainWindow::Resize()
+{
+ long nBorder = aVScrollBar.GetSizePixel().Width();
+ long nExtra = 10;
+ Size aTBSz = aToolBox.CalcWindowSizePixel();
+ Size aOutSzPixel( GetOutputSizePixel() );
+ aToolBox.SetSizePixel( Size( aOutSzPixel.Width(), aTBSz.Height()) );
+
+ aViewWin.SetSizePixel( Size( aOutSzPixel.Width()-nBorder-2*nExtra, aOutSzPixel.Height()-aTBSz.Height()-2*nExtra-nBorder) );
+
+ aViewWin.SetPosPixel( Point( nExtra, aTBSz.Height()+nExtra ) );
+
+ SetScrollBars();
+
+ EditView* pEditView = aViewWin.GetEditView();
+ if ( pEditView && pEditView->GetEditEngine()->GetPolygon() )
+ CreatePolygon();
+}
+
+IMPL_LINK( EditMainWindow, ShowStatus, EditStatus *, pStat )
+{
+ EditView* pEditView = aViewWin.GetEditView();
+ EditEngine* pEditEngine = pEditView->GetEditEngine();
+ if ( ( pStat->GetStatusWord() & EE_STAT_TEXTWIDTHCHANGED ) || ( pStat->GetStatusWord() & EE_STAT_TEXTHEIGHTCHANGED ) )
+ {
+ aViewWin.MarkOutputArea();
+ if ( pEditEngine->GetTextHeight() < (ULONG)pEditView->GetOutputArea().GetHeight() )
+ {
+ // Wird durch RGCHK_PAPERSZ1 'geklippt'
+ if ( !( pEditEngine->GetControlWord() & EE_CNTRL_AUTOPAGESIZE) )
+ pEditView->Scroll( 0, -(long)pEditEngine->GetTextHeight(), RGCHK_PAPERSZ1 );
+ }
+ SetScrollBarRanges();
+ }
+ if ( pStat->GetStatusWord() & EE_STAT_HSCROLL )
+ aHScrollBar.SetThumbPos( pEditView->GetVisArea().Left() );
+ if ( pStat->GetStatusWord() & EE_STAT_VSCROLL )
+ aVScrollBar.SetThumbPos( pEditView->GetVisArea().Top() );
+
+ return 0;
+}
+
+
+EditViewWindow::~EditViewWindow()
+{
+ // erst die angemeldeten Views zerstoeren
+ // (melden sich selbst ab)
+ MyView* pView = aViewList.First();
+ while ( pView )
+ {
+ delete pView;
+ pView = aViewList.Next();
+ }
+
+ pEditEngine->RemoveView( pEditView );
+ delete pEditView;
+ // Beim Zerstoeren der Styles am Ende, EditEngine noch nicht kaputt,
+ // wird der Handler gerufen, ich zerstore hier aber schon die View!
+ pEditEngine->SetStatusEventHdl( Link() );
+// SvxAutoCorrect* pAutoCorrekt = pEditEngine->GetAutoCorrect();
+// pEditEngine->SetAutoCorrect( 0 );
+// delete pAutoCorrekt;
+ delete pEditEngine;
+}
+
+EditViewWindow::EditViewWindow( Window* pParent ) :
+ Window( pParent ), aURLPtr( POINTER_HAND )
+{
+ SetBackgroundBrush( Brush( Color( COL_WHITE ) ) );
+ EnableDrop();
+
+ pEditEngine = new MyEditEngine;
+ Size aPaperSz( 10000,8000 );
+ pEditEngine->SetPaperSize( aPaperSz );
+
+ pEditView = new EditView( pEditEngine, this );
+ pEditView->SetBackgroundColor( Color( COL_WHITE ) );
+ pEditView->SetOutputArea( Rectangle( Point( 100, 100 ), aPaperSz ) );
+ pEditEngine->SetDefaultLanguage( LANGUAGE_ENGLISH );
+ pEditEngine->InsertView( pEditView );
+
+ SetPosSizePixel( Point( 10, 10 ), Size( 600, 400 ) );
+ SetPen( PEN_NULL );
+ Show();
+
+ // Feldbefehle grau hinterlegen
+ ULONG n = pEditEngine->GetControlWord();
+ n = n | (EE_CNTRL_MARKFIELDS|EE_CNTRL_AUTOCOMPLETE);
+ pEditEngine->SetControlWord( n );
+
+ // Test: Autozentrierung
+// ULONG n = pEditEngine->GetControlWord();
+// n = n | EE_CNTRL_AUTOPAGESIZE;
+// pEditEngine->SetControlWord( n );
+
+ // OneLineSpeling
+#ifdef WNT
+// pEditEngine->CreateSpeller( DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "n:\\offenv\\wnti" ) ) ),
+// DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "n:\\offenv\\wnti" ) ) ) );
+// pEditEngine->GetSpeller()->SetActualLanguage( LANGUAGE_GERMAN );
+// pEditEngine->GetSpeller()->SetDefaultLanguage( LANGUAGE_GERMAN );
+// pEditEngine->GetSpeller()->SetMinTrail( 2 );
+
+ // AutoCorrect wird nie zerstoert
+// pEditEngine->SetAutoCorrect( new SvxAutoCorrect( String( RTL_CONSTASCII_USTRINGPARAM( "d:\\prj\\office\\autotext\\autocorr.dat" ) ) ) );
+#endif
+}
+
+void __EXPORT EditViewWindow::Paint( const Rectangle& rRec )
+{
+ if ( pEditView->GetEditEngine()->GetPolygon() )
+ {
+ // Die Punkte des Polygons beziehen sich auf die View...
+ MapMode aMapMode( GetMapMode() );
+ aMapMode.SetOrigin( pEditView->GetOutputArea().TopLeft() );
+ SetMapMode( aMapMode );
+ DrawPolyPolygon( *pEditView->GetEditEngine()->GetPolygon() );
+ aMapMode.SetOrigin( Point() );
+ SetMapMode( aMapMode );
+ }
+ pEditView->Paint( rRec );
+ MarkOutputArea();
+}
+
+void EditViewWindow::MarkOutputArea()
+{
+ static Rectangle aCurFrame;
+ Rectangle aOutArea( pEditView->GetOutputArea() );
+ aOutArea = LogicToPixel( aOutArea );
+ aOutArea.Left()--;
+ aOutArea.Right()++;
+ aOutArea.Top()--;
+ aOutArea.Bottom()++;
+ aOutArea = PixelToLogic( aOutArea );
+ SetPen( Pen( Color( COL_RED ) ) );
+ SetFillInBrush( Brush( BRUSH_NULL ) );
+ DrawRect( aOutArea );
+ if ( !aCurFrame.IsEmpty() )
+ {
+ if ( aCurFrame.Left() < aOutArea.Left() )
+ Invalidate( Rectangle( aCurFrame.TopLeft(), Size( aOutArea.Left()-aCurFrame.Left(), aCurFrame.GetHeight() ) ) );
+ if ( aCurFrame.Right() > aOutArea.Right() )
+ {
+ long nW = aCurFrame.Right() - aOutArea.Right();
+ Point aPos( aCurFrame.TopRight() );
+ aPos.X() -= nW;
+ Invalidate( Rectangle( aPos, Size( nW, aCurFrame.GetHeight() ) ) );
+ }
+ if ( aCurFrame.Top() < aOutArea.Top() )
+ Invalidate( Rectangle( aCurFrame.TopLeft(), Size( aCurFrame.GetWidth(), aOutArea.Top() - aCurFrame.Top() ) ) );
+ if ( aCurFrame.Bottom() > aOutArea.Bottom() )
+ {
+ long nH = aCurFrame.Bottom() - aOutArea.Bottom();
+ Point aPos( aCurFrame.BottomLeft() );
+ aPos.Y() -= nH;
+ Invalidate( Rectangle( aPos, Size( aCurFrame.GetWidth(), nH ) ) );
+ }
+ }
+ aCurFrame = aOutArea;
+}
+
+void __EXPORT EditViewWindow::Resize()
+{
+ Size aPaperSz( GetOutputSize() );
+ pEditView->SetOutputArea( Rectangle( Point(0,0), aPaperSz ) );
+ pEditEngine->SetPaperSize( aPaperSz );
+ pEditView->ShowCursor();
+ Invalidate();
+}
+
+void __EXPORT EditViewWindow::KeyInput( const KeyEvent& rKEvt )
+{
+ char nCharCode = rKEvt.GetCharCode();
+
+ USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ // Auswertung fuer besondere Einstellungen....
+ if ( ( nCode == KEY_S ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ if ( !pEditEngine->GetSpeller().is() )
+ pEditEngine->CreateSpeller( DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "n:\\offenv\\wini" ) ) ),
+ DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "n:\\offenv\\wini" ) ) ) );
+ if ( pEditEngine->HasSpellErrors( LANGUAGE_GERMAN ) == EE_SPELL_OK )
+ InfoBox( 0, String( RTL_CONSTASCII_USTRINGPARAM( "Spell lohnt nicht!" ) ) ).Execute();
+ else
+ pEditView->StartSpeller( LANGUAGE_GERMAN );
+ }
+ if ( ( nCode == KEY_A) && rKEvt.GetKeyCode().IsMod1() )
+ pEditView->SetSelection( ESelection( 0, 0, 0xFFFF, 0xFFFF ) );
+ else if ( ( nCode == KEY_D ) && rKEvt.GetKeyCode().IsMod1() && rKEvt.GetKeyCode().IsMod2() )
+ {
+ SfxItemSet aSet( pEditEngine->GetEmptyItemSet() );
+ aSet.Put( SvxFontItem( FAMILY_SWISS, String( RTL_CONSTASCII_USTRINGPARAM( "Arial" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "" ) ), PITCH_VARIABLE, RTL_TEXTENCODING_MS_1252, EE_CHAR_FONTINFO ) );
+ aSet.Put( SvxFontHeightItem(281, 100, EE_CHAR_FONTHEIGHT) );
+ pEditEngine->SetDefaults( aSet );
+ Invalidate();
+ Update();
+ XubString aText( pEditEngine->GetText() );
+ Font aFont = pEditEngine->CreateFontFromItemSet( aSet );
+ aFont.SetAlign( ALIGN_TOP );
+ Point aPos( pEditView->GetOutputArea().TopLeft() );
+ aPos.Y() += pEditEngine->GetTextHeight();
+ SetFont( aFont );
+ DrawText( aPos, aText );
+ }
+ else if ( ( nCode == KEY_R ) && rKEvt.GetKeyCode().IsMod2() )
+ Invalidate();
+ else if ( ( nCode == KEY_L ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ ULONG n = pEditEngine->GetControlWord();
+ n = n | EE_CNTRL_ONECHARPERLINE;
+ pEditEngine->SetControlWord( n );
+ pEditEngine->QuickFormatDoc();
+ }
+ else if ( ( nCode == KEY_K ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ SfxItemSet aSet( pEditEngine->GetEmptyItemSet() );
+ aSet.Put( SvxPostureItem( ITALIC_NORMAL, EE_CHAR_ITALIC ) );
+ pEditEngine->SetDefaults( aSet );
+ }
+ else if ( ( nCode == KEY_Z ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ pEditView->RemoveAttribs();
+ }
+ else if ( ( nCode == KEY_X ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ SetMapMode( MAP_PIXEL );
+ pEditEngine->SetUpdateMode( FALSE );
+ Size aPaperSz( 400, 200 );
+ pEditEngine->SetPaperSize( aPaperSz );
+ pEditEngine->SetDefTab( 30 );
+ pEditView->SetOutputArea( Rectangle( Point( 30, 30 ), aPaperSz ) );
+ SfxItemSet aSet( pEditEngine->GetEmptyItemSet() );
+ aSet.Put( SvxFontHeightItem( 12, 100, EE_CHAR_FONTHEIGHT ) );
+ pEditEngine->SetDefaults( aSet );
+ pEditEngine->SetRefMapMode( GetMapMode() );
+ pEditEngine->SetUpdateMode( TRUE );
+ Invalidate();
+ }
+ else if ( ( nCode == KEY_V ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ Sound::Beep();
+ static nViews = 0;
+ MyView* pView = new MyView( this, pEditEngine );
+ pView->SetMapMode( MapMode( MAP_100TH_MM, Point(0,0), Fraction(100+nViews*100,100), Fraction(100+nViews*100,100) ) );
+ if ( rKEvt.GetKeyCode().IsMod1() )
+ {
+ pEditEngine->SetUpdateMode( FALSE );
+ SfxItemSet aSet( pEditEngine->GetEmptyItemSet() );
+ aSet.Put( SvxFontHeightItem( 2400, 100, EE_CHAR_FONTHEIGHT ) );
+ pEditEngine->SetDefaults( aSet );
+ pEditEngine->SetRefMapMode( pView->GetMapMode() );
+ pEditEngine->SetUpdateMode( TRUE );
+ pView->Invalidate();
+ pEditEngine->SetPaperSize( Size( 0x7FFFFFFF, 0 ) );
+ pView->SetMapMode( MapMode( MAP_100TH_MM, Point(0,0), Fraction(5,1), Fraction(5,1) ) );
+ }
+ pView->Resize();
+ nViews++;
+ // nur damit sie zerstoert werden koennen:
+ aViewList.Insert( pView, LIST_APPEND );
+ }
+ else if ( ( ( nCode == KEY_ADD ) || ( nCode == KEY_SUBTRACT ) )&& rKEvt.GetKeyCode().IsMod2() )
+ {
+ short nDiff = ( nCode == KEY_ADD ) ? (+5) : (-5);
+ if ( nZoom > 1000 )
+ nDiff *= 20;
+ if ( nZoom <= 25 )
+ nDiff /= 5;
+ if ( ( nZoom + nDiff ) > 0 )
+ nZoom += nDiff;
+ MapMode aMapMode( MAP_100TH_MM, Point(0,0), Fraction(nZoom,100), Fraction(nZoom,100) );
+ SetMapMode( aMapMode );
+ ((EditMainWindow*)GetParent())->SetTitle();
+
+ if ( rKEvt.GetKeyCode().IsMod1() )
+ {
+ InfoBox( 0, String( RTL_CONSTASCII_USTRINGPARAM( "ChangingRefMapMode..." ) ) ).Execute();
+ pEditEngine->SetRefMapMode( aMapMode );
+ }
+ Invalidate();
+ }
+ else if ( rKEvt.GetKeyCode().IsMod2() &&
+ ( ( nCode == KEY_UP) || ( nCode == KEY_DOWN ) ||
+ ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) ) )
+ {
+ if( rKEvt.GetKeyCode().IsMod1() )
+ {
+ ULONG nCtrl = pEditEngine->GetControlWord();
+ if ( ! ( nCtrl & EE_CNTRL_STRETCHING ) )
+ {
+ nCtrl |= EE_CNTRL_STRETCHING;
+ pEditEngine->SetControlWord( nCtrl );
+ }
+ USHORT nX, nY;
+ pEditEngine->GetGlobalCharStretching( nX, nY );
+ if ( ( nCode == KEY_DOWN ) && ( nY > 5 ) )
+ nY += 5;
+ else if ( nCode == KEY_UP )
+ nY -= 5;
+ else if ( nCode == KEY_RIGHT )
+ nX += 5;
+ else if ( ( nCode == KEY_LEFT ) && ( nX > 5 ) )
+ nX -= 5;
+ pEditEngine->SetGlobalCharStretching( nX, nY );
+ ((EditMainWindow*)GetParent())->SetTitle();
+ }
+ else // ZeichenAttr
+ {
+ SfxItemSet aAttrs( pEditView->GetAttribs() );
+ SfxItemSet aNewAttrs( pEditEngine->GetEmptyItemSet() );
+ const SvxFontWidthItem& rItem = (const SvxFontWidthItem&)aAttrs.Get( EE_CHAR_FONTWIDTH );
+ USHORT nProp = rItem.GetProp();
+ if ( nCode == KEY_RIGHT )
+ nProp += 5;
+ else if ( ( nCode == KEY_LEFT ) && ( nProp > 5 ) )
+ nProp -= 5;
+ aNewAttrs.Put( SvxFontWidthItem( 0, nProp, EE_CHAR_FONTWIDTH ) );
+ pEditView->SetAttribs( aNewAttrs );
+ }
+ }
+ else if ( ( nCode == KEY_O ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ MapMode aMapMode( GetMapMode() );
+ aMapMode.SetOrigin( Point( 41, 41 ) );
+ SetMapMode( aMapMode );
+ Invalidate();
+ }
+ else if ( ( nCode == KEY_B ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ SfxItemSet aSet = pEditView->GetEmptyItemSet();
+ aSet.Put( SvxFontHeightItem(800, 100, EE_CHAR_FONTHEIGHT) );
+ pEditView->SetAttribs( aSet );
+ }
+ else if ( ( nCode == KEY_P ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+// ESelection aSel = pEditView->GetSelection();
+// for ( ULONG n = aSel.nStartPara; n <= aSel.nEndPara; n++ )
+// {
+// InfoBox( 0, pEditEngine->GetText( n ) ).Execute();
+// }
+ InfoBox( 0, pEditView->GetSelected() ).Execute();
+
+ }
+ else if ( rKEvt.GetKeyCode().IsMod2() &&
+ ( nCode >= KEY_1 ) && ( nCode <= KEY_9 ) )
+ {
+ ULONG nEECtrl = pEditEngine->GetControlWord();
+ nEECtrl = nEECtrl | EE_CNTRL_AUTOPAGESIZE;
+ pEditEngine->SetControlWord( nEECtrl );
+
+ ULONG nEVCtrl = pEditView->GetControlWord();
+ nEVCtrl |= EV_CNTRL_AUTOSIZE;
+ pEditView->SetControlWord( nEVCtrl );
+
+ pEditView->SetAnchorMode( (EVAnchorMode)(nCode-KEY_1) );
+ pEditView->SetOutputArea( Rectangle( Point(0,0), GetOutputSize() ) );
+ pEditEngine->SetMaxAutoPaperSize( GetOutputSize() );
+ pEditEngine->SetPaperSize( Size( 0, 0 ) );
+ }
+ else if ( rKEvt.GetKeyCode().IsMod2() && ( nCode == KEY_0 ) )
+ {
+ ULONG nEVCtrl = pEditView->GetControlWord();
+ nEVCtrl = nEVCtrl | EV_CNTRL_AUTOSIZE;
+ pEditView->SetControlWord( nEVCtrl );
+
+ Size aOutSz( GetOutputSize() );
+ Size aPaperSz( aOutSz.Width() / 2, 0 );
+ pEditView->SetOutputArea( Rectangle( Point(), aPaperSz ) );
+ pEditEngine->SetPaperSize( aPaperSz );
+ // Max-Height wird bei View verwendet,
+ // MinSize/MaxSize nur, wenn AUTOPAGESIZE ( KEY_1 - KEY_9 )
+ pEditEngine->SetMaxAutoPaperSize( Size( aOutSz.Width() / 2, aOutSz.Height() / 2 ) );
+ pEditEngine->SetMinAutoPaperSize( Size( aOutSz.Width() / 8, aOutSz.Height() / 8 ) );
+ }
+ else if ( nCode == KEY_F7 )
+ {
+ // Aendern der Deafaults
+ SfxItemSet aSet( pEditEngine->GetEmptyItemSet() );
+ aSet.Put( SvxFontItem( FAMILY_ROMAN, String( RTL_CONSTASCII_USTRINGPARAM( "Times New Roman" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "" ) ), PITCH_DONTKNOW, RTL_TEXTENCODING_MS_1252, EE_CHAR_FONTINFO ) );
+ aSet.Put( SvxColorItem( Color(COL_BLUE), EE_CHAR_COLOR ) );
+ aSet.Put( SvxFontHeightItem( 500, 100, EE_CHAR_FONTHEIGHT ) );
+ pEditEngine->SetDefaults( aSet );
+ }
+ else if ( nCode == KEY_F8 )
+ {
+ // Aendern der Deafaults
+ SfxItemSet aSet( pEditEngine->GetEmptyItemSet() );
+ aSet.Put( SvxFontItem( FAMILY_ROMAN, String( RTL_CONSTASCII_USTRINGPARAM( "Times New Roman" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "" ) ), PITCH_DONTKNOW, RTL_TEXTENCODING_MS_1252, EE_CHAR_FONTINFO ) );
+ aSet.Put( SvxColorItem( Color(COL_BLUE), EE_CHAR_COLOR ) );
+ aSet.Put( SvxFontHeightItem( 200, 100, EE_CHAR_FONTHEIGHT ) );
+ pEditEngine->SetDefaults( aSet );
+ }
+ else if ( nCode == KEY_F9 )
+ pEditView->InsertText( String( RTL_CONSTASCII_USTRINGPARAM( "Ein kleiner Test-String.... " ) ), TRUE );
+ else if ( nCode == KEY_F6 )
+ pEditView->SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "kleiner" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "grosser" ) ) );
+ else if ( ( nCode == KEY_I ) && rKEvt.GetKeyCode().IsMod1() && rKEvt.GetKeyCode().IsMod2() )
+ {
+ XubString aStr( String( RTL_CONSTASCII_USTRINGPARAM( "Vorlage: " ) ) );
+ XubString aName;
+ SfxStyleFamily aFam;
+ if ( pEditView->GetStyleSheet( aName, aFam ) )
+ aStr += aName;
+ InfoBox( 0, aStr ).Execute();
+ }
+ else if ( ( nCode == KEY_I ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ pEditView->SpellIgnoreWord();
+ }
+ else if ( ( nCode == KEY_J ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ Size aTextSz( pEditEngine->CalcTextWidth(), pEditEngine->GetTextHeight() );
+ Rectangle aRect( pEditView->GetOutputArea().TopLeft(), aTextSz );
+ Brush aTmpBrush( Color( COL_LIGHTBLUE ), BRUSH_25 );
+ Brush aOldBrush( GetFillInBrush() );
+ SetFillInBrush( aTmpBrush );
+ DrawRect( aRect );
+ SetFillInBrush( aOldBrush );
+ pEditView->Paint( aRect );
+ }
+ else if ( ( nCode == KEY_H ) && rKEvt.GetKeyCode().IsMod2() )
+ {
+ Push();
+ Size aSz( pEditEngine->CalcTextWidth(), pEditEngine->GetTextHeight() );
+ Pen aPen( PEN_SOLID );
+ Brush aBrush( Color( COL_GRAY ), BRUSH_SOLID );
+ aPen.SetColor( Color( COL_BLACK ) );
+ SetPen( aPen );
+ SetFillInBrush( aBrush );
+ Rectangle aR( pEditView->GetOutputArea().TopLeft(), aSz );
+ DrawRect( aR );
+ Pop();
+ pEditEngine->Draw( this, pEditView->GetOutputArea() );
+ pEditView->ShowCursor( TRUE, TRUE );
+ }
+
+ // Eingabe an EditEngine...
+ else
+ {
+ BOOL bDone = pEditView->PostKeyEvent( rKEvt );
+ if ( !bDone )
+ Window::KeyInput( rKEvt );
+ }
+
+ ((EditMainWindow*)GetParent())->UpdateToolBox();
+}
+
+void __EXPORT EditViewWindow::MouseMove( const MouseEvent& rMEvt )
+{
+ Point aPos = PixelToLogic( rMEvt.GetPosPixel() );
+ if ( pEditView->GetOutputArea().IsInside( aPos ) )
+ {
+ const SvxFieldItem* pField = pEditView->GetFieldUnderMousePointer();
+ if ( pField )
+ SetPointer( aURLPtr );
+ else
+ SetPointer( pEditView->GetPointer() );
+
+// aPos -= pEditView->GetOutputArea().TopLeft();
+// aPos += pEditView->GetVisArea().TopLeft();
+// if ( pEditView->GetEditEngine()->IsTextPos( aPos, PixelToLogic( Size( 5, 0 ) ).Width() ) )
+// SetPointer( pEditView->GetPointer() );
+// else
+// SetPointer( Pointer( POINTER_REFHAND ) );
+
+ }
+ else
+ SetPointer( aStdPtr );
+
+// static long x = 0;
+// x++;
+// DBG_ASSERT( x < 1000, String( RTL_CONSTASCII_USTRINGPARAM( "?" ) ) );
+ pEditView->MouseMove( rMEvt );
+}
+
+void __EXPORT EditViewWindow::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ GrabFocus();
+ pEditView->MouseButtonDown( rMEvt );
+}
+
+void __EXPORT EditViewWindow::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ pEditView->MouseButtonUp( rMEvt );
+ ((EditMainWindow*)GetParent())->UpdateToolBox();
+}
+
+void __EXPORT EditViewWindow::Command( const CommandEvent& rCEvt )
+{
+ if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ {
+ if( pEditView->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel() ) )
+ pEditView->ExecuteSpellPopup( rCEvt.GetMousePosPixel() );
+ }
+ else
+ pEditView->Command(rCEvt);
+
+}
+
+BOOL __EXPORT EditViewWindow::Drop( const DropEvent& rEvt )
+{
+ return pEditView->Drop( rEvt );
+}
+
+BOOL __EXPORT EditViewWindow::QueryDrop( DropEvent& rEvt )
+{
+ return pEditView->QueryDrop( rEvt );
+}
+
+// --- aEditApp ------------------------------------------------------
+
+void __EXPORT EditApp::Main()
+{
+#ifdef WNT
+ SvFactory::Init();
+#endif
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr = createApplicationServiceManager();
+ ::utl::setProcessServiceFactory( xSMgr );
+
+ EditDLL aEditDll;
+ SvxGlobalItemData aItemData;
+ SvxFieldItem::GetClassManager().SV_CLASS_REGISTER( SvxDateField );
+ SvxFieldItem::GetClassManager().SV_CLASS_REGISTER( SvxURLField );
+
+ Help::EnableQuickHelp();
+
+ EditMainWindow aWindow;
+ Execute();
+}
+
+EditApp aEditApp;
diff --git a/svx/workben/makefile.mk b/svx/workben/makefile.mk
new file mode 100644
index 0000000000..823639e470
--- /dev/null
+++ b/svx/workben/makefile.mk
@@ -0,0 +1,171 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01: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=SVX
+TARGET=edittest
+LIBTARGET=NO
+
+ENABLE_EXCEPTIONS=TRUE
+
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+CXXFILES= edittest.cxx
+
+OBJFILES= $(OBJ)$/edittest.obj
+
+APP1TARGET= $(TARGET)
+APP1OBJS= $(OBJFILES)
+APP1LIBS= $(LB)/svx.lib $(LB)/dl.lib
+APP1STDLIBS=$(TOOLSLIB) \
+ $(OSLLIB) \
+ $(ONELIB) \
+ $(VOSLIB) \
+ $(SO2LIB) \
+ $(SVTOOLLIB) \
+ $(SVLLIB) \
+ $(UNOTOOLSLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(SALLIB) \
+ $(GOODIESLIB) \
+ $(SFXLIB) \
+ $(SOTLIB) \
+ $(DLLIB) \
+ $(SVLIB)
+
+.IF "$(GUI)"!="UNX"
+APP1DEF= $(MISC)$/$(TARGET).def
+.ENDIF
+
+
+.IF "$(COM)"=="GCC"
+ADDOPTFILES=$(OBJ)$/edittest.obj
+add_cflagscxx="-frtti -fexceptions"
+.ENDIF
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+
+# ------------------------------------------------------------------
+# MAC
+# ------------------------------------------------------------------
+
+.IF "$(GUI)" == "MAC"
+
+$(MISC)$/$(TARGET).def: makefile
+ echo Kein Def-File fuer Applikationen auf Mac
+.ENDIF
+
+
+# ------------------------------------------------------------------
+# Windows
+# ------------------------------------------------------------------
+
+.IF "$(GUI)" == "WIN"
+
+$(MISC)$/$(TARGET).def: makefile
+ echo NAME $(TARGET) >$@
+ echo DESCRIPTION 'StarView - Testprogramm' >>$@
+ echo EXETYPE WINDOWS >>$@
+ echo STUB 'winSTUB.EXE' >>$@
+ echo PROTMODE >>$@
+ echo CODE PRELOAD MOVEABLE DISCARDABLE >>$@
+ echo DATA PRELOAD MOVEABLE MULTIPLE >>$@
+ echo HEAPSIZE 8192 >>$@
+ echo STACKSIZE 32768 >>$@
+
+.ENDIF
+
+# ------------------------------------------------------------------
+# OS2
+# ------------------------------------------------------------------
+
+.IF "$(GUI)" == "OS2"
+
+$(MISC)$/$(TARGET).def: makefile
+ echo NAME $(TARGET) WINDOWAPI >$@
+ echo DESCRIPTION 'StarView - Testprogramm' >>$@
+.IF "$(COM)" != "BLC"
+ echo STUB 'os2STUB.EXE' >>$@
+.ENDIF
+.IF "$(COM)"!="MTW"
+ echo EXETYPE OS2 >>$@
+.ENDIF
+ echo PROTMODE >>$@
+ echo CODE LOADONCALL >>$@
+ echo DATA PRELOAD MULTIPLE >>$@
+ echo HEAPSIZE 16384 >>$@
+ echo STACKSIZE 32768 >>$@
+
+.ENDIF
diff --git a/svx/xml/SvxDrawPage.xml b/svx/xml/SvxDrawPage.xml
new file mode 100644
index 0000000000..b8554021d9
--- /dev/null
+++ b/svx/xml/SvxDrawPage.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxDrawPage</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::DrawPage</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxGraphicObject.xml b/svx/xml/SvxGraphicObject.xml
new file mode 100644
index 0000000000..46207705de
--- /dev/null
+++ b/svx/xml/SvxGraphicObject.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxGraphicObject</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::GraphicObjectShape</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxShape.xml b/svx/xml/SvxShape.xml
new file mode 100644
index 0000000000..ea35216749
--- /dev/null
+++ b/svx/xml/SvxShape.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxShape</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::TextShape</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxShapeCircle.xml b/svx/xml/SvxShapeCircle.xml
new file mode 100644
index 0000000000..be85d803df
--- /dev/null
+++ b/svx/xml/SvxShapeCircle.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxShapeCircle</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::EllipseShape</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxShapeCollection.xml b/svx/xml/SvxShapeCollection.xml
new file mode 100644
index 0000000000..7bbfd69147
--- /dev/null
+++ b/svx/xml/SvxShapeCollection.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxShapeCollection</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::Shapes</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxShapeConnector.xml b/svx/xml/SvxShapeConnector.xml
new file mode 100644
index 0000000000..abc1fdf220
--- /dev/null
+++ b/svx/xml/SvxShapeConnector.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxShapeConnector</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::ConnectorShape</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxShapeControl.xml b/svx/xml/SvxShapeControl.xml
new file mode 100644
index 0000000000..a0bf644192
--- /dev/null
+++ b/svx/xml/SvxShapeControl.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxShapeControl</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::ControlShape</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxShapeDimensioning.xml b/svx/xml/SvxShapeDimensioning.xml
new file mode 100644
index 0000000000..e6e401fd70
--- /dev/null
+++ b/svx/xml/SvxShapeDimensioning.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxShapeDimensioning</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::DimensioningShape</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxShapeGroup.xml b/svx/xml/SvxShapeGroup.xml
new file mode 100644
index 0000000000..2f9ed055fe
--- /dev/null
+++ b/svx/xml/SvxShapeGroup.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxShapeGroup</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::ShapeGroup</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxShapePolyPolygon.xml b/svx/xml/SvxShapePolyPolygon.xml
new file mode 100644
index 0000000000..fe16a8834e
--- /dev/null
+++ b/svx/xml/SvxShapePolyPolygon.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxShapePolyPolygon</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::PolyPolygonShape</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxShapePolyPolygonBezier.xml b/svx/xml/SvxShapePolyPolygonBezier.xml
new file mode 100644
index 0000000000..498ba8845c
--- /dev/null
+++ b/svx/xml/SvxShapePolyPolygonBezier.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxShapePolyPolygonBezier</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::drawing::PolyPolygonBezierShape</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxUnoNumberingRules.xml b/svx/xml/SvxUnoNumberingRules.xml
new file mode 100644
index 0000000000..45c2d3fac7
--- /dev/null
+++ b/svx/xml/SvxUnoNumberingRules.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxUnoNumberingRules</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::text::NumberingRules</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxUnoText.xml b/svx/xml/SvxUnoText.xml
new file mode 100644
index 0000000000..b581a1fda0
--- /dev/null
+++ b/svx/xml/SvxUnoText.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxUnoText</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::text::Text</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxUnoTextContent.xml b/svx/xml/SvxUnoTextContent.xml
new file mode 100644
index 0000000000..b525cffb6c
--- /dev/null
+++ b/svx/xml/SvxUnoTextContent.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxUnoTextContent</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::text::Paragraph</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxUnoTextContentEnum.xml b/svx/xml/SvxUnoTextContentEnum.xml
new file mode 100644
index 0000000000..fca3cd30fe
--- /dev/null
+++ b/svx/xml/SvxUnoTextContentEnum.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxUnoTextContentEnum</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::container::XEnumeration</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxUnoTextCursor.xml b/svx/xml/SvxUnoTextCursor.xml
new file mode 100644
index 0000000000..d7a8f73c5c
--- /dev/null
+++ b/svx/xml/SvxUnoTextCursor.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxUnoTextCursor</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::text::TextCursor</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxUnoTextField.xml b/svx/xml/SvxUnoTextField.xml
new file mode 100644
index 0000000000..4f77a6e729
--- /dev/null
+++ b/svx/xml/SvxUnoTextField.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxUnoTextField</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::text::TextField</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxUnoTextRange.xml b/svx/xml/SvxUnoTextRange.xml
new file mode 100644
index 0000000000..552fec324d
--- /dev/null
+++ b/svx/xml/SvxUnoTextRange.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxUnoTextRange</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::text::TextRange</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/svx/xml/SvxUnoTextRangeEnumeration.xml b/svx/xml/SvxUnoTextRangeEnumeration.xml
new file mode 100644
index 0000000000..91a0c37093
--- /dev/null
+++ b/svx/xml/SvxUnoTextRangeEnumeration.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE COMPONENTDESCRIPTION PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "componentdescription.dtd">
+
+<COMPONENTDESCRIPTION xmlns:xlink="http://www.w3.org/1999/xlink/Namespace" >
+<Author>automatically generated by objects2xml</Author>
+<Name>com.sun.star.comp.office.SvxUnoTextRangeEnumeration</Name>
+<Description>
+ This component provides ...
+</Description>
+
+<SupportedService>com::sun::star::text::TextPortionEnumeration</SupportedService>
+
+<Language>c++</Language>
+
+<Status StatusValue="final"/>
+
+<!--
+<ModuleName>...</ModuleName>
+
+<LoaderName>com.sun.star.loader...</LoaderName>
+
+<ServiceDependency>...</ServiceDependency>
+
+<ProjectBuildDependency>...</ProjectBuildDependency>
+...
+
+<RuntimeModuleDependency>...</RuntimeModuleDependency>
+...
+
+<Type>com.sun.star....</Type>
+...
+-->
+</COMPONENTDESCRIPTION>
diff --git a/uui/prj/d.lst b/uui/prj/d.lst
new file mode 100644
index 0000000000..43b9f0e327
--- /dev/null
+++ b/uui/prj/d.lst
@@ -0,0 +1,4 @@
+..\%__SRC%\bin\uui*.dll %_DEST%\bin%_EXT%\uui*.dll
+..\%__SRC%\bin\uui*.res %_DEST%\bin%_EXT%\uui*.res
+..\%__SRC%\lib\libuui*.* %_DEST%\lib%_EXT%\libuui*.*
+..\%__SRC%\lib\iuui.lib %_DEST%\lib%_EXT%\iuui.lib
diff --git a/uui/source/cookiedg.cxx b/uui/source/cookiedg.cxx
new file mode 100644
index 0000000000..62be0b2952
--- /dev/null
+++ b/uui/source/cookiedg.cxx
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * $RCSfile: cookiedg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04: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 SVTOOLS_HTTPCOOK_HXX
+#include <svtools/httpcook.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef UUI_COOKIEDG_HRC
+#include <cookiedg.hrc>
+#endif
+#ifndef UUI_COOKIEDG_HXX
+#include <cookiedg.hxx>
+#endif
+#ifndef UUI_IDS_HRC
+#include <ids.hrc>
+#endif
+
+// CookiesDialog ---------------------------------------------------------
+
+IMPL_LINK( CookiesDialog, ButtonHdl_Impl, PushButton *, pBtn )
+{
+ short nRet = ( &maSendBtn == pBtn ) ? RET_OK : RET_CANCEL;
+ EndDialog( nRet );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+CookiesDialog::CookiesDialog( Window* pParent,
+ CntHTTPCookieRequest* pRequest,
+ ResMgr* pResMgr ) :
+
+ ModalDialog( pParent, ResId( DLG_COOKIES, pResMgr ) ),
+
+ maCookieFB ( this, ResId( FB_COOKIES ) ),
+ maCookieFT ( this, ResId( FT_COOKIES ) ),
+ maInFutureLine ( this, ResId( FL_COOKIES ) ),
+ maInFutureSendBtn ( this, ResId( RB_INFUTURE_SEND ) ),
+ maInFutureIgnoreBtn ( this, ResId( RB_INFUTURE_IGNORE ) ),
+ maInFutureInteractiveBtn( this, ResId( RB_INFUTURE_INTERACTIVE ) ),
+ maInFutureGB ( this, ResId( GB_INFUTURE ) ),
+ maIgnoreBtn ( this, ResId( BTN_COOKIES_CANCEL ) ),
+ maSendBtn ( this, ResId( BTN_COOKIES_OK ) ),
+
+ mpCookieRequest ( pRequest )
+
+{
+ FreeResource();
+
+ Link aLink( LINK( this, CookiesDialog, ButtonHdl_Impl ) );
+ maIgnoreBtn.SetClickHdl( aLink );
+ maSendBtn.SetClickHdl( aLink );
+ const Bitmap& rBitmap = maCookieFB.GetBitmap();
+ Size aSize = rBitmap.GetSizePixel();
+ SetMapMode( MapMode( MAP_APPFONT ) );
+ Size aLogicSize = PixelToLogic( aSize );
+ Point aPoint( 6 ,
+ 6 + ( 145 - aLogicSize.Height() ) / 2 );
+ maCookieFB.SetPosSizePixel( LogicToPixel( aPoint ), aSize );
+ maCookieFB.Show();
+
+ USHORT nOffset = CNTHTTP_COOKIE_REQUEST_RECV == mpCookieRequest->m_eType
+ ? 0 : STR_COOKIES_SEND_START - STR_COOKIES_RECV_START;
+ INetURLObject aObj( mpCookieRequest->m_rURL );
+ SetText( String( ResId( STR_COOKIES_RECV_TITLE + nOffset, pResMgr ) ) );
+ String aMsg( ResId( STR_COOKIES_RECV_START + nOffset, pResMgr ) );
+ aMsg.SearchAndReplaceAscii( "${HOST}", aObj.GetHost() );
+ aMsg.SearchAndReplaceAscii( "${PATH}", aObj.GetPath() );
+ String aTemplate( ResId( STR_COOKIES_RECV_COOKIES, pResMgr ) );
+ List& rList =mpCookieRequest->m_rCookieList;
+ String aPair, aCookie;
+
+ for ( USHORT i = (USHORT)rList.Count(); i--; )
+ {
+ CntHTTPCookie* pCookie = (CntHTTPCookie*)rList.GetObject(i);
+
+ if ( CNTHTTP_COOKIE_POLICY_INTERACTIVE == pCookie->m_nPolicy )
+ {
+ aCookie = aTemplate;
+ aCookie.SearchAndReplaceAscii( "${DOMAIN}", pCookie->m_aDomain );
+ aCookie.SearchAndReplaceAscii( "${PATH}", pCookie->m_aPath );
+ aPair = pCookie->m_aName;
+ aPair += '=';
+ aPair += pCookie->m_aValue;
+ aCookie.SearchAndReplaceAscii( "${COOKIE}", aPair );
+ aMsg += aCookie;
+ }
+ }
+ maInFutureInteractiveBtn.Check( TRUE );
+ maCookieFT.SetText( aMsg );
+}
+
+// -----------------------------------------------------------------------
+
+short CookiesDialog::Execute()
+{
+ maSendBtn.GrabFocus();
+ short nRet = ModalDialog::Execute();
+ USHORT nStatus = CNTHTTP_COOKIE_POLICY_INTERACTIVE;
+
+ if ( maInFutureSendBtn.IsChecked() )
+ nStatus = CNTHTTP_COOKIE_POLICY_ACCEPTED;
+
+ if ( maInFutureIgnoreBtn.IsChecked() )
+ nStatus = CNTHTTP_COOKIE_POLICY_BANNED;
+ List& rList = mpCookieRequest->m_rCookieList;
+
+ for ( USHORT i = (USHORT)rList.Count(); i--; )
+ {
+ USHORT& rStatus = ( (CntHTTPCookie*)rList.GetObject(i) )->m_nPolicy;
+
+ if ( rStatus == CNTHTTP_COOKIE_POLICY_INTERACTIVE )
+ rStatus = nStatus;
+ }
+
+ if ( nRet == RET_OK )
+ mpCookieRequest->m_nRet = CNTHTTP_COOKIE_POLICY_ACCEPTED;
+ else
+ mpCookieRequest->m_nRet = CNTHTTP_COOKIE_POLICY_BANNED;
+
+ return nRet;
+}
+
diff --git a/uui/source/cookiedg.hrc b/uui/source/cookiedg.hrc
new file mode 100644
index 0000000000..9384b6452a
--- /dev/null
+++ b/uui/source/cookiedg.hrc
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * $RCSfile: cookiedg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04: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 UUI_COOKIEDG_HRC
+#define UUI_COOKIEDG_HRC
+
+//============================================================================
+#define FB_COOKIES 10
+#define FT_COOKIES 11
+#define FL_COOKIES 12
+
+#define RB_INFUTURE_SEND 20
+#define RB_INFUTURE_IGNORE 21
+#define RB_INFUTURE_INTERACTIVE 22
+#define GB_INFUTURE 23
+
+#define BTN_COOKIES_CANCEL 30
+#define BTN_COOKIES_OK 31
+
+#endif // UUI_COOKIEDG_HRC
+
diff --git a/uui/source/cookiedg.hxx b/uui/source/cookiedg.hxx
new file mode 100644
index 0000000000..12213d73cf
--- /dev/null
+++ b/uui/source/cookiedg.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * $RCSfile: cookiedg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04: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 UUI_COOKIEDG_HXX
+#define UUI_COOKIEDG_HXX
+
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _SV_DIALOG_HXX
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _SV_FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_GROUP_HXX
+#include <vcl/group.hxx>
+#endif
+
+struct CntHTTPCookieRequest;
+
+//============================================================================
+class CookiesDialog : public ModalDialog
+{
+ FixedBitmap maCookieFB;
+ FixedText maCookieFT;
+ FixedLine maInFutureLine;
+ RadioButton maInFutureSendBtn;
+ RadioButton maInFutureIgnoreBtn;
+ RadioButton maInFutureInteractiveBtn;
+ GroupBox maInFutureGB;
+ PushButton maIgnoreBtn;
+ PushButton maSendBtn;
+
+ CntHTTPCookieRequest* mpCookieRequest;
+
+ DECL_LINK( ButtonHdl_Impl, PushButton * );
+
+public:
+ CookiesDialog( Window* pParent, CntHTTPCookieRequest* pRequest,
+ ResMgr* pResMgr );
+
+ virtual short Execute();
+};
+
+#endif // UUI_COOKIEDG_HXX
+
diff --git a/uui/source/cookiedg.src b/uui/source/cookiedg.src
new file mode 100644
index 0000000000..a20c4598da
--- /dev/null
+++ b/uui/source/cookiedg.src
@@ -0,0 +1,393 @@
+/*************************************************************************
+ *
+ * $RCSfile: cookiedg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04: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 UUI_COOKIEDG_HRC
+#include <cookiedg.hrc>
+#endif
+#ifndef UUI_IDS_HRC
+#include <ids.hrc>
+#endif
+
+ModalDialog DLG_COOKIES
+{
+ HelpId = HID_DLG_COOKIES ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 295 , 193 ) ;
+ Moveable = TRUE ;
+ FixedBitmap FB_COOKIES
+ {
+ Border = True ;
+ Hide = TRUE ;
+ Fixed = Bitmap
+ {
+ File = "cookie.bmp" ;
+ };
+ };
+ FixedText FT_COOKIES
+ {
+ SVLook = TRUE ;
+ WordBreak = True ;
+ Pos = MAP_APPFONT ( 65 , 6 ) ;
+ Size = MAP_APPFONT ( 224 , 145 ) ;
+ };
+ FixedLine FL_COOKIES
+ {
+ Pos = MAP_APPFONT ( 6 , 155 ) ;
+ Size = MAP_APPFONT ( 283 , 1 ) ;
+ };
+ RadioButton RB_INFUTURE_SEND
+ {
+ Pos = MAP_APPFONT ( 12 , 171 ) ;
+ Size = MAP_APPFONT ( 52 , 10 ) ;
+ Text = "Üb~ermitteln" ;
+ Text [ English ] = "~Transmit" ;
+ Text [ portuguese ] = "~Enviar" ;
+ Text [ english_us ] = "~Send" ;
+ Text [ portuguese_brazilian ] = "Ãbermitteln" ;
+ Text [ swedish ] = "~Acceptera" ;
+ Text [ danish ] = "Accepter" ;
+ Text [ italian ] = "Trasm~etti" ;
+ Text [ spanish ] = "~Aceptar" ;
+ Text [ french ] = "~Accepter" ;
+ Text [ dutch ] = "~Zenden" ;
+ Text[ chinese_simplified ] = "´«ËÍ(~S)";
+ Text[ russian ] = "Ïðèíÿòü";
+ Text[ polish ] = "Wyœlij";
+ Text[ japanese ] = "Žó‚¯“ü‚ê‚é(~S)";
+ Text[ chinese_traditional ] = "±µ¨ü(~S)";
+ Text[ greek ] = "ÁðïóôïëÞ";
+ Text[ korean ] = "Àü´Þ(~S)";
+ Text[ arabic ] = "ÅÑÓÇá";
+ Text[ turkish ] = "Gönder";
+ };
+ RadioButton RB_INFUTURE_IGNORE
+ {
+ Pos = MAP_APPFONT ( 67 , 171 ) ;
+ Size = MAP_APPFONT ( 52 , 10 ) ;
+ Text = "I~gnorieren" ;
+ Text [ English ] = "I~gnore" ;
+ Text [ english_us ] = "I~gnore" ;
+ Text [ portuguese_brazilian ] = "Ignorieren" ;
+ Text [ swedish ] = "I~gnorera" ;
+ Text [ danish ] = "Ignorer" ;
+ Text [ italian ] = "I~gnora" ;
+ Text [ spanish ] = "I~gnorar" ;
+ Text [ french ] = "I~gnorer" ;
+ Text [ dutch ] = "~Negeren" ;
+ Text [ portuguese ] = "I~gnorar" ;
+ Text[ chinese_simplified ] = "ºöÂÔ(~G)";
+ Text[ russian ] = "Èãíîðèðîâàòü";
+ Text[ polish ] = "Ignoruj";
+ Text[ japanese ] = "–³Ž‹‚·‚é(~G)";
+ Text[ chinese_traditional ] = "©¿²¤(~G)";
+ Text[ greek ] = "ÐáñÜâëåøç";
+ Text[ korean ] = "¹«½Ã(~G)";
+ Text[ arabic ] = "ÊÌÇåá";
+ Text[ turkish ] = "Yok say";
+ };
+ RadioButton RB_INFUTURE_INTERACTIVE
+ {
+ Pos = MAP_APPFONT ( 122 , 171 ) ;
+ Size = MAP_APPFONT ( 52 , 10 ) ;
+ Text = "I~nteraktiv" ;
+ Text [ English ] = "I~nteractive" ;
+ Text [ portuguese ] = "In~teractivo" ;
+ Text [ english_us ] = "I~nteractive" ;
+ Text [ portuguese_brazilian ] = "Interaktiv" ;
+ Text [ swedish ] = "I~nteraktiv" ;
+ Text [ danish ] = "Interaktiv" ;
+ Text [ italian ] = "I~nterattivo" ;
+ Text [ spanish ] = "~Interactivo" ;
+ Text [ french ] = "~Avertir" ;
+ Text [ dutch ] = "In~teractief" ;
+ Text[ chinese_simplified ] = "½»»¥Ê½(~N)";
+ Text[ russian ] = "Èíòåðàêòèâíî";
+ Text[ polish ] = "Interaktywny";
+ Text[ japanese ] = "–ˆ‰ñŠm”F‚·‚é(~N)";
+ Text[ chinese_traditional ] = "½T»{(~N)";
+ Text[ greek ] = "ÄéáëïãéêÜ";
+ Text[ korean ] = "´ëÈ­½Ä(~N)";
+ Text[ arabic ] = "ÊÝÇÚá";
+ Text[ turkish ] = "Etkileþimli";
+ };
+ GroupBox GB_INFUTURE
+ {
+ Pos = MAP_APPFONT ( 6 , 160 ) ;
+ Size = MAP_APPFONT ( 174 , 27 ) ;
+ Text = "Zukünftige Handhabung für diese Cookies" ;
+ Text [ English ] = "Allgemeine Handhabung" ;
+ Text [ english_us ] = "Future Cookie Handling" ;
+ Text [ portuguese_brazilian ] = "Zuk³nftige Handhabung" ;
+ Text [ swedish ] = "Framtida hantering av dessa cookies" ;
+ Text [ danish ] = "Fremtidig håndtering af disse cookies" ;
+ Text [ italian ] = "Gestione futura dei cookies" ;
+ Text [ spanish ] = "Futuro tratamiento de estas cookies" ;
+ Text [ french ] = "Traitement futur des présents Cookies" ;
+ Text [ dutch ] = "Toekomstige handhaving voor deze cookies" ;
+ Text [ portuguese ] = "Tratamento futuro para estes cookies" ;
+ Text[ chinese_simplified ] = "½ñºó´¦ÀíÕâЩ Cookie µÄ·½Ê½";
+ Text[ russian ] = "Áóäóùåå îáñëóæèâàíèå äëÿ ýòèõ Cookies ";
+ Text[ polish ] = "Obs³uga tych plików cookie w przysz³oœci";
+ Text[ japanese ] = "¸¯·°‚Ì¡Œã‚Ì‘€ìŽè‡";
+ Text[ chinese_traditional ] = "¤µ«á³B²z Cookie ªº¤è¦¡";
+ Text[ greek ] = "ÌåëëïíôéêÞ ìåôá÷åßñçóç ãéá áõôÜ ôá Cookies";
+ Text[ korean ] = "¾ÕÀ¸·ÎÀÇ Cookie Ãë±Þ";
+ Text[ arabic ] = "ØÑíÞÉ ÇáÊÚÇãá ãÚ åÐå ÇáÜßæßíÒ (ý(Cookies ãÓÊÞÈáíÇð";
+ Text[ turkish ] = "Cookie'lerde uygulanacak kurallar";
+ };
+ PushButton BTN_COOKIES_CANCEL
+ {
+ Pos = MAP_APPFONT ( 186 , 173 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Ignorieren" ;
+ Text [ English ] = "~Ignorieren" ;
+ Text [ english_us ] = "~Ignore" ;
+ Text [ portuguese_brazilian ] = "~Ignorieren" ;
+ Text [ swedish ] = "~Ignorera" ;
+ Text [ danish ] = "Ignorer" ;
+ Text [ italian ] = "~Ignora" ;
+ Text [ spanish ] = "~Ignorar" ;
+ Text [ french ] = "~Ignorer" ;
+ Text [ dutch ] = "N~egeren" ;
+ Text [ portuguese ] = "~Ignorar" ;
+ Text[ chinese_simplified ] = "ºöÂÔ(~I)";
+ Text[ russian ] = "Ïðîïóñòèòü";
+ Text[ polish ] = "Zignoruj";
+ Text[ japanese ] = "–³Ž‹‚·‚é(~I)";
+ Text[ chinese_traditional ] = "©¿²¤(~I)";
+ Text[ greek ] = "ÐáñÜâëåøç";
+ Text[ korean ] = "¹«½Ã(~I)";
+ Text[ arabic ] = "ÊÌÇåá";
+ Text[ turkish ] = "Yok say";
+ };
+ PushButton BTN_COOKIES_OK
+ {
+ Pos = MAP_APPFONT ( 239 , 173 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ Text = "Ü~bermitteln" ;
+ Text [ English ] = "~Accept" ;
+ Text [ portuguese ] = "~Enviar" ;
+ Text [ english_us ] = "~Send" ;
+ Text [ portuguese_brazilian ] = "~Ãbermitteln" ;
+ Text [ swedish ] = "~Acceptera" ;
+ Text [ danish ] = "Accepter" ;
+ Text [ italian ] = "~Trasmetti" ;
+ Text [ spanish ] = "~Aceptar" ;
+ Text [ french ] = "~Accepter" ;
+ Text [ dutch ] = "~Zenden" ;
+ Text[ chinese_simplified ] = "´«ËÍ(~S)";
+ Text[ russian ] = "Ïðèíÿòü";
+ Text[ polish ] = "Wyœlij";
+ Text[ japanese ] = "Žó‚¯“ü‚ê‚é(~S)";
+ Text[ chinese_traditional ] = "±µ¨ü(~S)";
+ Text[ greek ] = "Á~ðïóôïëÞ";
+ Text[ korean ] = "Àü´Þ(~S)";
+ Text[ arabic ] = "ÅÑÓÇá";
+ Text[ turkish ] = "Gönder";
+ };
+};
+
+String STR_COOKIES_RECV_START
+{
+ Text = "Der Server '${HOST}' möchte ein oder mehrere Cookies setzen.\nCookies sind Informationen, die sich auf bestimmte Klassen von URLs beziehen. Fordert StarOffice später ein Dokument an, welches der URL nach einer Klasse eines vorher empfangenen Cookies entspricht, wird diese Information von StarOffice an den Server gesendet. So können sich Server den Zustand einer WWW Anwendung (z.B. in den Warenkorb gelegte Artikel in einem Einkaufssystem) merken.\n\nFolgende Cookies sollen gesetzt werden:\n\n" ;
+ Text [ English ] = "The '${HOST}' server wishes to set one or more cookies. Cookies contain information referring to certain classes of URLs. If StarOffice later requests a document with a URL which corresponds to the class of a previously set cookie, StarOffice will send the information to the server. In this way, the server can recognize the status of a WWW application.\n\nThe following cookies will be set:\n\n" ;
+ Text [ portuguese ] = "O servidor '${HOST}' deseja instalar um ou mais cookies.\nCookies são informações que se referem a determinadas classes de URLs. Se o StarOffice pedir mais tarde um documento com um URL correspondente a uma classe de um cookie previamente instalado, essa informação será enviada pelo StarOffice ao servidor. Desta forma os servidores poderão reconhecer o estado de uma aplicação WWW (por ex. artigos colocados no cesto de mercadorias num sistema de compras).\n\nSerão definidos os seguintes cookies:\n\n" ;
+ Text [ english_us ] = "The '${HOST}' server wishes to set one or more cookies.\nCookies contain information referring to certain URL classes. If StarOffice later requests a document with a URL corresponding to the class of a previously set cookie, StarOffice will send this information to the server. This allows a server to recognize the status of a WWW application, e.g., when shopping online.\n\nThe following Cookies should be set:\n\n" ;
+ Text [ portuguese_brazilian ] = "Der Server '${HOST}' m÷chte ein oder mehrere Cookies setzen.\nCookies sind Informationen, die sich auf bestimmte Klassen von URLs beziehen. Fordert StarOffice spaeter ein Dokument an, welches der URL nach einer Klasse eines vorher empfangenen Cookies entspricht, wird diese Information von StarOffice an den Server gesendet. So k÷nnen sich Server den Zustand einer WWW Anwendung (z.B. in den Warenkorb gelegte Artikel in einem Einkaufssystem) merken.\n\nFolgende Cookies sollen gesetzt werden:\n\n" ;
+ Text [ swedish ] = "Servern '${HOST}' vill sätta en eller flera cookies.\nCookies innehåller information som refererar till vissa URL-klasser. Denna information sänds från StarOffice till servern om StarOffice vid ett senare tillfälle kräver ett dokument som motsvarar webbadressen (URL) enligt en klass för en tidigare mottagen cookie. På så sätt kan servern känna igen tillståndet hos en WWW-tillämpning (t.ex. varor i en varukorg när Du handlar online).\n\nFöljande cookies skall tilldelas:\n\n" ;
+ Text [ danish ] = "Serveren '${HOST}' ønsker at sætte en eller flere cookies.\nCookies er informationer, som relaterer til bestemte URL-klasser. Læser StarOffice senere et dokument, hvis URLs klasse svarer til en før modtaget cookie, sender StarOffice denne information til serveren. Således kan serveren kontrollere en WWW-applikations tilstand (f.eks. varer i din indkøbskurv når du handler online).\n\nFølgende cookies skal sættes:\n\n" ;
+ Text [ italian ] = "Il server '${HOST}' vorrebbe impostare uno o più cookies.\nI cookies sono informazioni che si riferiscono a determinate classi di URL. Se in seguito StarOffice richiede un documento, che corrisponde all'URL secondo una classe di un cookie precedentemente ricevuto, questa informazione viene inviata al server. In tal modo i server è possono memorizzare lo stato di un'applicazione WWW (ad esempio gli articoli introdotti nel \"carrello\" di un supermercato elettronico).\n\nÈ necessario impostare i seguenti cookies:\n\n" ;
+ Text [ spanish ] = "El servidor '${HOST}' desea instalar una o más cookies.\nLas cookies son informaciones referentes a determinadas clases de URLs. Si StarOffice solicita más tarde un documento que de acuerdo con su URL corresponda a una clase de una cookie recibida anteriormente, StarOffice enviará esta información al servidor. De esta forma los servidores pueden recordar el estado de una aplicación www (p.ej. los artículos de una cesta de compra en un sistema de compras).\n\nLas siguientes cookies se deberán instalar:\n\n" ;
+ Text [ french ] = "Le serveur '${HOST}' tente d'envoyer un ou plusieurs Cookies.\nLes Cookies sont des informations se rapportant à certaines classes d'URL. Plus tard, si StarOffice requiert un document dont l'URL correspond à la classe d'un Cookie déjà reçu, cette information est envoyée au serveur. Ceci permet aux serveurs de reconnaître l'état d'une application WWW (par ex. les articles placés dans le panier d'un système d'achat).\n\nLes Cookies suivants vont être placés :\n\n" ;
+ Text [ dutch ] = "Server '${HOST}' wil een of meer cookies zetten.\nCookies zijn gegevens die betrekking hebben op bepaalde klassen van URLs. Vraagt StarOffice later een document op dat wat URL betreft met de klasse van een eerder ontvangen cookie overeenkomt, dan wordt deze informatie aan de server gezonden. Zo kan een server de toestand van een WWW-toepassing (zoals bijv. de in een boodschappenmand gelegde artikelen in een winkel) onthouden.\n\nDe volgende cookies moeten worden gezet:\n\n" ;
+ Text[ chinese_simplified ] = "·þÎñÆ÷ '${HOST}' Òª½¨Á¢Ò»¸ö»ò¶à¸öCookies¡£\nCookies°üº¬ÓйØÌض¨URLs¿âµÄÐÅÏ¢¡£Èç¹ûStarOfficeÒÔºóÐèÒªÒ»¸öº¬ÓÐÉÏÒ»´Î½ÓÊܵÄcookie¿âµÄURLÎĵµ£¬ÄÇôStarOffice¾Í»á½«Õâ¸öÐÅÏ¢´«µÝ¸ø·þÎñÆ÷¡£ÕâÑù·þÎñÆ÷¾ÍÄܹ»ÈϳöÍòάÍøÓ¦ÓóÌÐòµÄ״̬(ÈçÁª»úϵͳ²É¹ºÀºÄÚµÄÉÌÆ·)¡£\n\nÏÖÔÚÒª½¨Á¢ÒÔϵÄCookies:\n\n";
+ Text[ russian ] = "Ñåðâåð '${HOST}' ïûòàåòñÿ óñòàíîâèòü îäèí èëè íåñêîëüêî ôàéëîâ Cookiå.\nÔàéëû Cookie ÿâëÿþòñÿ èíôîðìàöèåé, êîòîðàÿ îòíîñèòñÿ ê îïðåäåëåííûì êëàññàì URL. Åñëè StarOffice çàòðåáóåò êîãäà-íèáóäü äîêóìåíò ñ URL, êîòîðûé ñîîòâåòñòâóåò êëàññó ðàíåå óñòàíîâëåííîãî Cookie, òî StarOffice íàïðàâèò ýòó èíôîðìàöèþ íà ñåðâåð. Òàêèì îáðàçîì, ñåðâåðû ìîãóò êîíòðîëèðîâàòü ñîñòîÿíèå ïðèëîæåíèÿ WWW (íàïð. âî âðåìÿ Âàøèõ çàêóïîê ÷åðåç online).\n\nÍåîáõîäèìî óñòàíîâèòü ñëåäóþùèå ôàéëû Cookie:\n\n";
+ Text[ polish ] = "Serwer '${HOST}' chce osadziæ jeden lub wiêcej plików typu Cookies.\nCookies s¹ to informacje, które odnosz¹ siê do okreœlonych klas URL. Jeœli StarOffice za¿¹da póŸniej dokumentu, który odpowiada URL wed³ug klasy wczeœniej odbieranego pliku Cookies, to ta informacja zostanie przes³ana przez StarOffice do serwera. W ten sposób serwer zapamiêtuje stan aplikacji WWW (n.p. wrzucone do koszyka artyku³y w systemie zakupów.\n\nNastêpuj¹ce Cookies maj¹ zostaæ osadzone:\n\n";
+ Text[ japanese ] = "»°ÊÞ° '${HOST}' ‚Í1‚ˆÈã‚̸¯·°‚Ìݒ肪•K—v‚Å‚·B\n¸¯·°‚ÍURL‚Ì‚ ‚é¸×½‚ÉŠÖ˜A‚·‚éî•ñ‚Å‚·B‚·‚Å‚ÉŽóM‚µ‚Ä‚¢‚鸯·°‚Æ“¯‚¶URL‚ÌÄÞ·­ÒÝÄ‚ð StarOffice ‚ª—v‹‚µ‚½‚Æ‚«A‚±‚Ìî•ñ‚ª StarOffice ‚©‚ç»°ÊÞ°‚É‘—‚ç‚ê‚Ü‚·B‚»‚µ‚Ä»°ÊÞ°‚ª WWW ‚ÌŽg—pó‘Ô(µÝײÝw”ƒ‚ÌÛ‚É”ƒ‚¢•¨‚©‚²‚Ì’†‚É“ü‚ꂽ¤•i‚È‚Ç)‚ðŠo‚¦‚Ä‚¨‚«‚Ü‚·B\n\nˆÈ‰º‚̸¯·°‚ðݒ肵‚Ü‚·B\n\n";
+ Text[ chinese_traditional ] = "¦øªA¾¹'${HOST}' ­n¶Ç°e¤@­Ó©Î¦h­Ó cookie ¡C\ncookie §t¦³¦³ÃöURLµ{¦¡®wªº°T®§¡CStarOffice ¦b¤U¤@¦¸½Ð¨D¸Ë¸ü¬Û¦Pªº¸ê®Æ®É´N·|«ö·Óµ{¦¡®wÀˬdURL¬Û²Åªºcookie¦}±N¦³Ãö°T®§¶Ç°eµ¹¹ï¤è¦øªA¾¹¡C³o¼Ë¡A¹ï¤è¦øªA¾¹´N¯à°÷ª¾¹D±z¨Ï¥ÎªºÂsÄý¾¹ªº¦³Ãö¸ê®Æ(¦p½u¤W¾P°â¨t²ÎªºªöÁÊÄx§t¦³ªºª««~¦WºÙ)¡C\n\n²{¦b­n«Ø¥ß¦p¤Uªº cookie:\n\n";
+ Text[ greek ] = "Ï äéáêïìéóôÞò '${HOST}' åðéèõìåß íá ôïðïèåôÞóåé Ýíá Þ ðåñéóóüôåñá cookies. \nÔá Cookies åßíáé ðëçñïöïñßåò, ðïõ áíáöÝñïíôáé óå óõãêåêñéìÝíåò êëÜóçò ôùí URL. Áí ãßíåé áñãüôåñá ç æÞôçóç êÜðïéïõ åããñÜöïõ áðü ôï StarOffice, ôï ïðïßï áíôéóôïé÷åß óå ìéá êëÜóç URL åíüò Cookie ðïõ Ýãéíå äåêôü ðñïçãïõìÝíùò, ôï StarOffice áðïóôÝëëåé áõôÞ ôçí ðëçñïöïñßá ðñïò ôïí äéáêïìéóôÞ. ¸ôóé ï äéáêïìéóôÞò Ý÷åé ôçí äõíáôüôçôá íá 'èõìÜôáé' ôçí êáôÜóôáóç ìéáò åöáñìïãÞò WWW üðùò ð.÷. üôáí êÜíåôå áãïñÝò online.\n\nÔá áêüëïõèá Cookie ðñüêåéôáé íá ôïðïèåôçèïýí:\n\n";
+ Text[ korean ] = "'${HOST}' ¼­¹ö´Â Çϳª ¶Ç´Â ±× ÀÌ»óÀÇ Cookie¸¦ ¿øÇÕ´Ï´Ù.\nCookieµéÀº URLÀÇ Æ¯Á¤ Ŭ·¡½º¿¡ °ü·ÃµÈ Á¤º¸µéÀÔ´Ï´Ù. ³ªÁß¿¡ StarOffice°¡ URL¿¡ µû¶ó ÀÌÀü¿¡ ¹ÞÀº CookieÀÇ Å¬·¡½º¿¡ ¸Â´Â ¹®¼­¸¦ ¿ä±¸Çϸé StarOffice°¡ ±× Á¤º¸¸¦ ¼­¹ö¿¡ º¸³¾ °ÍÀÔ´Ï´Ù. ±×·¯¸é ¼­¹ö´Â WWW Àû¿ë »óÅÂ(¿¹¸¦ µé¾î ¿Â¶óÀÎ ¼îÇο¡¼­)¸¦ ÀνÄÇÒ ¼ö ÀÖ½À´Ï´Ù. \n\n´ÙÀ½ CookieµéÀÌ ÁöÁ¤µÇ¾î¾ß ÇÕ´Ï´Ù:\n\n";
+ Text[ arabic ] = "íÑíÏ ÇáãÒæÏ '${HOST}' ÊÚííä ßæßí æÇÍÏ Ãæ ÃßËÑ.\nÇáßæßíÒ (Cookies) åí ãÚáæãÇÊ ÎÇÕÉ ÈÝÆÇÊ ãÚíäÉ ãä ÇáÚäÇæíä (URLs). ÅÐÇ ØáÈ StarOffice áÇÍÞÇð ãÓÊäÏÇð íÊØÇÈÞ ÚäæÇäå ãÚ ÝÆÉ ßæßíÒ Êã ÇÓÊÞÈÇáåÇ ãä ÞÈá¡ íÞæã StarOffice ÈÅÑÓÇá åÐå ÇáãÚáæãÇÊ Åáì ÇáãÒæÏ. ÈåÐå ÇáØÑíÞÉ íãßä ááãÒæÏÇÊ ãÚÑÝÉ ÈíÇäÇÊ Úä ÇÓÊÎÏÇãÇÊ WWW (ãËáÇð ÇáãÔÊÑíÇÊ ÇáãæÌæÏÉ Ýí ÍÞíÈÉ ÇáÔÑÇÁ ÃËäÇÁ ÇáÊÓæÞ ÚÈÑ ÇáÅäÊÑäÊ).\n\níõÑÇÏ ÊÚííä ÇáÜßæßíÒ ÇáÊÇáíÉ:\n\n";
+ Text[ turkish ] = "Sunucu '${HOST}' bir ya da birden çok Cookie göndermek istiyor.\nCookie'ler, belirli URL sýnýflarýna iliþkin bilgilerdir. StarOffice ileride daha önceden alýnmýþ bir Cookie sýnýfýnýn URL'si ile örtüþen bir belge talep ettiðinde, bu bilgi StarOffice tarafýndan ilgili sunucuya gönderilir. Böylece sunucu, bir WWW uygulamasýnýn son durumunu (örn. bir alýþveriþ sisteminde, sepete konulan ürünleri) kaydedebilir. \n\nÞu Cookie'ler bilgisayarýnýzda belirlenmiþ olmalý:\n\n";
+};
+
+String STR_COOKIES_RECV_COOKIES
+{
+ Text = "Domain: ${DOMAIN}, Pfad: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ text [ English ] = "Domain: ${DOMAIN}, Pfad: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ portuguese ] = "Domínio: ${DOMAIN}, Atalho: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ english_us ] = "Domain: ${DOMAIN}, Path: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ portuguese_brazilian ] = "Domain: ${DOMAIN}, Pfad: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ swedish ] = "Domän: ${DOMAIN}, Sökväg: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ danish ] = "Domæne: ${DOMAIN}, Sti: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ italian ] = "Domain: ${DOMAIN}, Percorso: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ spanish ] = "Dominio: ${DOMAIN}, Ruta: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ french ] = "Domaine : ${DOMAIN}, Chemin : ${PATH}, Cookie : ${COOKIE}.\n" ;
+ Text [ dutch ] = "Domein: ${DOMAIN}, Pad: ${PATH}, Cookie: ${COOKIE}\n" ;
+ Text[ chinese_simplified ] = "Óò£º${DOMAIN}£¬ ·¾¶£º${PATH}£¬Cookie£º${COOKIE}¡£\n";
+ Text[ russian ] = "Äîìåí: ${DOMAIN}, Ïóòü: ${PATH}, Ôàéë Cookie: ${COOKIE}.\n";
+ Text[ polish ] = "Domena: ${DOMAIN}, Œcie¿ka: ${PATH}, Cookie: ${COOKIE}.\n";
+ Text[ japanese ] = "ÄÞÒ²Ý: ${DOMAIN}¤Êß½: ${PATH}A¸¯·°: ${COOKIE}B\n";
+ Text[ chinese_traditional ] = "°ì¡G${DOMAIN}¡A¸ô®|¡G${PATH}, Cookie¡G${COOKIE}¡C\n";
+ Text[ greek ] = "ÔïìÝáò: ${DOMAIN}, ÄéáäñïìÞ: ${PATH}, Cookie: ${COOKIE}.\n";
+ Text[ korean ] = "µµ¸ÞÀÎ: ${DOMAIN}, °æ·Î: ${PATH}, Cookie: ${COOKIE}.\n";
+ Text[ arabic ] = "ÇáäØÇÞ: ${DOMAIN}, ÇáãÓÇÑ: ${PATH}, Çáßæßí: ${COOKIE}.\n";
+ Text[ turkish ] = "Etki alaný: ${DOMAIN}, Veri yolu: ${PATH}, Cookie: ${COOKIE}.\n";
+};
+
+String STR_COOKIES_RECV_TITLE
+{
+ Text = "Cookieempfang" ;
+ Text [ English ] = "Cookieempfang" ;
+ Text [ portuguese ] = "Recepção de cookies" ;
+ Text [ english_us ] = "Cookie Reception" ;
+ Text [ portuguese_brazilian ] = "Cookieempfang" ;
+ Text [ swedish ] = "Cookiemottagning" ;
+ Text [ danish ] = "Cookiemodtagelse" ;
+ Text [ italian ] = "Ricevimento cookie" ;
+ Text [ spanish ] = "Recepción de cookies" ;
+ Text [ french ] = "Réception de Cookies" ;
+ Text [ dutch ] = "Cookieontvangst" ;
+ Text[ chinese_simplified ] = "½ÓÊÜ Cookie";
+ Text[ russian ] = "Ïðèåì ôàéëîâ Cookie";
+ Text[ polish ] = "Pobieranie plików cookie";
+ Text[ japanese ] = "¸¯·°‚ÌŽóM";
+ Text[ chinese_traditional ] = "±µ¨ü Cookie";
+ Text[ greek ] = "ËÞøç ôùí Cookie";
+ Text[ korean ] = "Cookie ¼ö½Å";
+ Text[ arabic ] = "ÇÓÊÞÈÇá ßæßí";
+ Text[ turkish ] = "Cookie al";
+};
+
+String STR_COOKIES_SEND_START
+{
+ Text = "StarOffice hat für den Server '${HOST}' Cookies gespeichert, die beim Anfordern des Dokumentes ${PATH} verschickt werden sollen.\nCookies sind Informationen, die sich auf bestimmte Klassen von URLs beziehen. Sie werden von manchen Servern beim Aufruf bestimmter Dokumente an StarOffice geschickt und dort gespeichert. Fordert StarOffice später ein Dokument an, welches der URL nach einer Klasse eines vorher empfangenen Cookies entspricht, wird diese Information von StarOffice an den Server gesendet. So können sich Server den Zustand einer WWW Anwendung (z.B. in den Warenkorb gelegte Artikel in einem Einkaufssystem) merken.\n\nFolgende Cookies sollen gesetzt werden:\n\n" ;
+ Text [ English ] = "StarOffice has saved cookies for the '${HOST}' server, which will be set when the document ${PATH} is requested.\n Cookies contain information referring to certain classes of URLs. They are sent by some servers to StarOffice when certain documents are activated. If StarOffice later requests a document with a URL which corresponds to the class of a previously set cookie, StarOffice will send the information to the server. In this way, the server can recognize the status of a WWW application. \n\nThe following cookies will be set:\n\n" ;
+ Text [ portuguese ] = "O StarOffice guardou cookies para o servidor '${HOST}'. Estes serão enviados quando o documento ${PATH} for aberto.\nCookies são informações sobre determinadas classes de URLs. Estes serão enviados por alguns servidores para o StarOffice quando aí se abrirem ou se guardarem determinados documentos. Se o StarOffice carregar um documento que, de acordo com o URL, corresponda a uma das classes de cookies recebidas anteriormente. Esta informação será enviada pelo StarOffice ao servidor correspondente. Desta forma os servidores poderão controlar o estado de uma aplicação WWW (por ex. os artigos colocados num cesto de mercadorias quando faz compras online).\n Deverão ser instalados os seguintes cookies:\n\n" ;
+ Text [ english_us ] = "StarOffice has saved cookies for the server '${HOST}' which will be sent when requesting the document ${PATH}.\nCookies contain information which refers to certain URL classes. They are sent by some servers to StarOffice where they are saved when certain documents are accessed. If StarOffice loads a document that, according to the URL, corresponds to a class of one of the previously received Cookies, StarOffice will send this information to that server. This enables a server to keep track of the status of a WWW application, e.g., when shopping online.\n\nThe following Cookies should be set:\n\n" ;
+ Text [ portuguese_brazilian ] = "StarOffice hat f³r den Server '${HOST}' Cookies gespeichert, die beim Anfordern des Dokumentes ${PATH} verschickt werden sollen.\nCookies sind Informationen, die sich auf bestimmte Klassen von URLs beziehen. Sie werden von manchen Servern beim Aufruf bestimmter Dokumente an StarOffice geschickt und dort gespeichert. Fordert StarOffice spaeter ein Dokument an, welches der URL nach einer Klasse eines vorher empfangenen Cookies entspricht, wird diese Information von StarOffice an den Server gesendet. So k÷nnen sich Server den Zustand einer WWW Anwendung (z.B. in den Warenkorb gelegte Artikel in einem Einkaufssystem) merken.\n\nFolgende Cookies sollen gesetzt werden:\n\n" ;
+ Text [ swedish ] = "StarOffice har sparat cookies för servern '${HOST}, som skall skickas då dokumentet ${PATH} krävs.\nCookies är information som refererar till vissa URL-klasser. De skickas av vissa servrar till StarOffice och sparas där när vissa dokument öppnas. Denna information skickas av StarOffice till servern om StarOffice vid ett senare tillfälle kräver ett dokument, som motsvarar en klass hos en tidigare tilldelad cookie. På så sätt kan servern känna igen tillståndet för en WWW-tillämpning (t.ex. varor i en varukorg när Du handlar online).\n\nFöljande cookies skall tilldelas:\n\n" ;
+ Text [ danish ] = "StarOffice har gemt cookies for serveren '${HOST}', som skal sendes, når dokmentet ${PATH} læses.\nCookies er informationer, som relaterer til bestemte URL-klasser. De bliver sendt til StarOffice af nogle servere og gemt der, når bestemte dokumenter læses. Læser StarOffice senere et dokument, hvis URLs klasse svarer til en før modtaget cookie, sender StarOffice denne information til serveren. Således kan serveren kontrollere en WWW-applikations tilstand (f.eks. varer i din indkøbskurv når du handler online).\n\nFølgende cookies skal sættes:\n\n" ;
+ Text [ italian ] = "StarOffice ha salvato per il server '${HOST}' dei cookies da inviare al momento della richiesta del documento ${PATH}.\nI cookies sono informazioni che si riferiscono a determinate classi di URL. Vengono inviati da alcuni server quando si richiamano determinati documenti a StarOffice e qui salvati. Se StarOffice in seguito richiede un documento che corrisponde all'URL di una classe di un cookie precedentemente ricevuto, tale informazione viene inviata da StarOffice al server. In tal modo i server possono memorizzare lo stato di un'applicazione WWW (ad esempio gli articoli introdotti nel \"carrello\" di un supermercato elettronico).\n\nÈ necessarion impostare i seguenti cookies:\n\n" ;
+ Text [ spanish ] = "StarOffice ha guardado cookies para el servidor '${HOST}' que serán enviadas cuando se solicite el documento ${PATH}.\nLas cookies son informaciones referentes a determinadas clases de URLs. Cuando se solicita un documento, algunos servidores las envían a StarOffice y las guardan allí. Si StarOffice solicita más tarde un documento que de acuerdo con su URL corresponda a una clase de una cookie recibida anteriormente, StarOffice enviará esta información al servidor. Así, los servidores pueden recordar el estado de una aplicación www, como por ejemplo los artículos en la cesta de un sistema de compras.\n\nEstas son las cookies a instalar:\n\n" ;
+ Text [ french ] = "StarOffice a enregistré des Cookies pour le serveur '${HOST}', qui seront envoyés au moment de la requête du document ${PATH}.\nLes Cookies sont des informations se rapportant à certaines classes d'URL. Plus tard, si StarOffice requiert un document dont l'URL correspond à la classe d'un Cookie déjà reçu, cette information est envoyée au serveur. Ceci permet aux serveurs de reconnaître l'état d'une application WWW (par ex. les articles placés dans le panier d'un système d'achat).\n\nLes Cookies suivants vont être placés : \n\n" ;
+ Text [ dutch ] = "StarOffice heeft voor server '${HOST}' cookies opgeslagen die bij het opvragen van het document ${PATH} worden verzonden.\nCookies zijn gegevens die betrekking hebben op bepaalde klassen van URLs . Ze worden door enkele servers bij het oproepen van bepaalde documenten aan StarOffice gezonden en daar opgeslagen. Vraagt StarOffice later een document op dat wat de URL betreft overeenkomt met een klasse van een eerder ontvangen cookie, dan wordt deze informatie door StarOffice aan de server gezonden. Zo kunnen servers de toestand van een WWW-applicatie (zoals bijv. de in een boodschappenmand gelegde artikelen in een winkel) onthouden.\n\nDe volgende cookies moeten worden gezet:\n\n" ;
+ Text[ chinese_simplified ] = "StarOfficeΪ·þÎñÆ÷'${HOST}'±£´æÁËCookie£¬ÔÚÏ´ÎÇëÇóÎĵµ${PATH}ʱ³ÌÐò¾Í»á·¢³öÕâЩCookies¡£\nCookie°üº¬ÓйØÌض¨URLs¿âµÄÐÅÏ¢¡£ÔÚµ÷ÓÃÌض¨µÄÎĵµÊ±ÓÐЩ·þÎñÆ÷¾Í»áÏòStarOffice·¢³öCookies²¢ÓÉStarOffice±£´æÆä¡£Èç¹ûStarOfficeÒÔºóÐèÒªÒ»¸öº¬ÓÐÒÔÇ°½ÓÊܵÄCookies¿âµÄULRÎĵµ£¬ÄÇôStarOffice¾Í»á½«Õâ¸öÐÅÏ¢´«µÝ¸ø·þÎñÆ÷¡£ÕâÑù·þÎñÆ÷¾ÍÄܹ»ÈϳöÍòάÍøÓ¦ÓóÌÐòµÄ״̬(ÈçÁª»úϵͳ²É¹ºÀºÄÚµÄÉÌÆ·)¡£\n\nÏÖÔÚÒªÉ趨ÒÔϵÄCookies:\n\n";
+ Text[ russian ] = "StarOffice ñîõðàíèë äëÿ ñåðâåðà '${HOST}' ôàéëû Cookie, êîòîðûå íåîáõîäèìî îòïðàâèòü ïðè òðåáîâàíèè äîêóìåíòà ${PATH}.\nÔàéëû Cookie ñîäåðæàò èíôîðìàöèþ, êîòîðàÿ îòíîñèòñÿ ê îïðåäåëåííûì êëàññàì URL. Ïðè âûçîâå îïðåäåëåííûõ äîêóìåíòîâ îíè îòïðàâëÿþòñÿ íåêîòîðûìè ñåðâåðàìè â StarOffice è òàì ñîõðàíÿþòñÿ. Åñëè StarOffice çàòðåáóåò êîãäà-íèáóäü äîêóìåíò ñ URL, êîòîðûé ñîîòâåòñòâóåò êëàññó ðàíåå óñòàíîâëåííîãî Cookie, òî StarOffice íàïðàâèò ýòó èíôîðìàöèþ íà ñåðâåð. Òàêèì îáðàçîì, ñåðâåðû ìîãóò êîíòðîëèðîâàòü ñîñòîÿíèå ïðèëîæåíèÿ WWW (íàïð. âî âðåìÿ Âàøèõ çàêóïîê ÷åðåç online).\n\nÍåîáõîäèìî óñòàíîâèòü ñëåäóþùèå ôàéëû Cookie:\n\n";
+ Text[ polish ] = "StarOffice zapisa³ dla serwera '${HOST}' Cookies, które zostan¹ wys³ane przy za¿¹daniu dokumentu ${PATH}.\nCookies s¹ informacjami, które odnosz¹ siê do okreœlonych klas URL. Bêd¹ one wysy³ane do StarOffice przez niektóre serwery przy wywo³aniu okreœlonych dokumentów i zostan¹ tam zapisane. Jeœli StarOffice za¿¹da póŸniej dokumentu, który odpowiada URL wed³ug klasy wczeœniej otrzymywanego Cookies, to ta informacja zostanie przekazana przez StarOffice do serwera. W ten sposób serwer mo¿e zapamiêtaæ stan aplikacji WWW (n.p. w³o¿one do koszyka artyku³y w systemie zakupów).\n\nOsadzone maj¹ byæ nastêpuj¹ce Cookies:\n\n\\";
+ Text[ japanese ] = "StarOffice ‚Í»°ÊÞ° '${HOST}' —p‚ÉAÄÞ·­ÒÝÄ ${PATH} —v‹‚ÌÛ‚É‘—M‚³‚ê‚鸯·°‚ð•Û‘¶‚µ‚Ü‚µ‚½B\n¸¯·°‚Í UR L‚Ì‚ ‚é¸×½‚ÉŠÖ˜A‚·‚éî•ñ‚ÅA‚ ‚éÄÞ·­ÒÝÄ‚ª‚¢‚­‚‚©‚Ì»°ÊÞ°‚©‚çŒÄ‚Ño‚³‚ê‚½Û‚É StarOffice ‚É‘—M‚³‚êA‚»‚±‚Å•Û‘¶‚³‚ê‚Ü‚·B‚·‚Å‚ÉŽóM‚µ‚½¸¯·°‚Æ“¯‚¶ URL ‚ÌÄÞ·­ÒÝÄ‚ð StarOffice ‚ª—v‹‚µ‚½‚Æ‚«A‚±‚Ìî•ñ‚ª StarOffice ‚©‚ç»°ÊÞ°‚É‘—‚ç‚ê‚Ü‚·B‚»‚µ‚Ä»°ÊÞ°‚ª WWW ‚ÌŽg—pó‘Ô(µÝײÝw”ƒ‚ÌÛ‚É”ƒ‚¢•¨‚©‚²‚Ì’†‚É“ü‚ꂽ¤•i‚È‚Ç)‚ðŠo‚¦‚Ä‚¨‚«‚Ü‚·B\n\nˆÈ‰º‚̸¯·°‚ðݒ肵‚Ü‚·B\n\n";
+ Text[ chinese_traditional ] = "StarOffice ¤w¸g«O¦s¤F¦øªA¾¹'${HOST}' ¶Ç°eªº cookie ¡CStarOffice ¦b¤U¤@¦¸½Ð¨D¸Ë¸ü¬Û¦Pªº¤å¥ó¸ê®Æ${PATH}®É´N·|«ö·Óµ{¦¡®wÀˬdURL¬Û²Åªºcookie¦}±N¦³Ãö°T®§¶Ç°eµ¹¹ï¤è¦øªA¾¹¡C³o¼Ë¡A¹ï¤è¦øªA¾¹´N¯à°÷ª¾¹D±z¨Ï¥ÎªºÂsÄý¾¹ªº¦³Ãö¸ê®Æ(¦p½u¤W¾P°â¨t²ÎªºªöÁÊÄx§t¦³ªºª««~¦WºÙ)¡C\n\n²{¦b­n«Ø¥ß¦p¤Uªº cookie:\n\n";
+ Text[ greek ] = "Ôï StarOffice Ý÷åé áðïèçêåýóåé cookies ãéá ôïí äéáêïìéóôÞ '${HOST}', ôá ïðïßá èá áðïóôáëïýí êáôÜ ôçí æÞôçóç ôïõ åããñÜöïõ ${PATH}.\nÔá Cookies åßíáé ðëçñïöïñßåò, ðïõ áíáöÝñïíôáé óå óõãêåêñéìÝíåò êëÜóçò ôùí URL. Ìå ôçí æÞôçóç óõãêåêñéìÝíùí åããñÜöùí áðïóôÝëëïíôáé áðü ïñéóìÝíïõò äéáêïìéóôÝò ðñïò ôï StarOffice êáé áðïèçêåýïíôáé åêåß. Áí ãßíåé áñãüôåñá æÞôçóç áðü ôï StarOffice êÜðïéïõ åããñÜöïõ, ôï ïðïßï áíôéóôïé÷åß óå ìéá êëÜóç URL åíüò Cookie ðïõ Ýãéíå äåêôü ðñïçãïõìÝíùò, ôï StarOffice áðïóôÝëëåé áõôÞ ôçí ðëçñïöïñßá ðñïò ôïí äéáêïìéóôÞ. ¸ôóé ï äéáêïìéóôÞò Ý÷åé ôçí äõíáôüôçôá íá 'èõìÜôáé' ôçí êáôÜóôáóç ìéáò åöáñìïãÞò WWW üðùò ð.÷. üôáí êÜíåôå áãïñÝò online.\n\nÔá áêüëïõèá Cookie ðñüêåéôáé íá ôïðïèåôçèïýí:\n\n";
+ Text[ korean ] = "StarOffice´Â ¼­¹ö'$(HOST)'¸¦ À§ÇØ ¹®¼­${PATH} ¿ä±¸½Ã º¸³»Á®¾ß ÇÒ CookieµéÀ» ÀúÀåÇÏ¿´½À´Ï´Ù .\nCookieµéÀº URLÀÇ Æ¯Á¤ Ŭ·¡½º¿¡ °ü·ÃµÈ Á¤º¸µéÀÔ´Ï´Ù. CookieµéÀº ƯÁ¤ ¹®¼­µéÀ» ºÒ·¯ ¿Ã ¶§ ¿©·¯ ¼­¹öµé¿¡ ÀÇÇØ StarOffice¿¡ º¸³»Á®¼­ °Å±â¿¡ ÀúÀåµË´Ï´Ù. ³ªÁß¿¡ StarOffice°¡ URL¿¡ µû¶ó ÀÌÀü¿¡ ¹ÞÀº CookieÀÇ Å¬·¡½º¿¡ ¸Â´Â ¹®¼­¸¦ ¿ä±¸Çϸé StarOffice°¡ ±× Á¤º¸¸¦ ¼­¹ö¿¡ º¸³¾ °ÍÀÔ´Ï´Ù. ±×·¯¸é ¼­¹ö´Â WWW Àû¿ë »óÅÂ(¿¹¸¦ µé¾î ¿Â¶óÀÎ ¼îÇο¡¼­)¸¦ ÀνÄÇÒ ¼ö ÀÖ½À´Ï´Ù. \n\n´ÙÀ½ CookieµéÀÌ ÁöÁ¤µÇ¾î¾ß ÇÕ´Ï´Ù:\n\n";
+ Text[ arabic ] = "ÞÇã StarOffice ÈÊÎÒí ßæßíÒ (Cookies) ááãÒæÏ '${HOST}'. ÓæÝ íÊã ÅÑÓÇá åÐå ÇáÜßæßíÒ ÚäÏ ØáÈ ÇáãÓÊäÏ.${PATH}\nÇáßæßíÒ åí ãÚáæãÇÊ ÎÇÕÉ ÈÝÆÇÊ ãÚíäÉ ãä ÇáÚäÇæíä .(URLs) íÊã ÅÑÓÇá åÐå ÇáãÚáæãÇÊ ãä ÞÈá ÈÚÖ ÇáãÒæÏÇÊ Åáì StarOffice ÚäÏ ÇÓÊÏÚÇÁ ãÓÊäÏÇÊ ÎÇÕÉ¡ ÍíË íÊã ÊÎÒíä åÐå ÇáãÚáæãÇÊ Ýí StarOffice. ÅÐÇ ØáÈ StarOffice áÇÍÞÇð ãÓÊäÏÇð íÊØÇÈÞ ÚäæÇäå ãÚ ÝÆÉ ßæßíÒ Êã ÇÓÊÞÈÇáåÇ ãä ÞÈá¡ íÞæã StarOffice ÈÅÑÓÇá åÐå ÇáãÚáæãÇÊ Åáì ÇáãÒæÏ. ÈåÐå ÇáØÑíÞÉ íãßä ááãÒæÏÇÊ ãÚÑÝÉ ÈíÇäÇÊ Úä ÇÓÊÎÏÇãÇÊ WWW (ãËáÇð ÇáãÔÊÑíÇÊ ÇáãæÌæÏÉ Ýí ÍÞíÈÉ ÇáÔÑÇÁ ÃËäÇÁ ÇáÊÓæÞ ÚÈÑ ÇáÅäÊÑäÊ).\n\níõÑÇÏ ÊÚííä ÇáÜßæßíÒ ÇáÊÇáíÉ:\n\n";
+ Text[ turkish ] = "StarOffice, sunucu '${HOST}' için Cookie'ler kaydetti. Bunlar, ${PATH} belgesi talep edildiðinde StarOffice tarafýndan gönderilir.\nCookie'ler, belirli URL sýnýflarýna iliþkin bilgilerdir. StarOffice ileride daha önceden alýnmýþ bir Cookie sýnýfýnýn URL'si ile örtüþen bir belge talep ettiðinde, bu bilgi StarOffice tarafýndan ilgili sunucuya gönderilir. Böylece sunucu, bir WWW uygulamasýnýn son durumunu (örn. bir alýþveriþ sisteminde, sepete konulan ürünleri) kaydedebilir. \n\nÞu Cookie'ler bilgisayarýnýzda belirlenecek:\n\n";
+};
+
+String STR_COOKIES_SEND_COOKIES
+{
+ Text = "Domain: ${DOMAIN}, Pfad: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ English ] = "Domain: ${DOMAIN}, Pfad: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ portuguese ] = "Domínio: ${DOMAIN}, Atalho: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ english_us ] = "Domain: ${DOMAIN}, Path: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ portuguese_brazilian ] = "Domain: ${DOMAIN}, Pfad: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ swedish ] = "Domän: ${DOMAIN}, Sökväg: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ danish ] = "Domæne: ${DOMAIN}, Sti: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ italian ] = "Dominio: ${DOMAIN}, Percorso: ${PATH}, cookie: ${COOKIE}.\n" ;
+ Text [ spanish ] = "Dominio: ${DOMAIN}, Ruta: ${PATH}, Cookie: ${COOKIE}.\n" ;
+ Text [ french ] = "Domaine : ${DOMAIN}, Chemin : ${PATH}, Cookie : ${COOKIE}.\n" ;
+ Text [ dutch ] = "Domein: ${DOMAIN}, Pad: ${PATH}, Cookie: ${COOKIE}\n" ;
+ Text[ chinese_simplified ] = "Óò£º${DOMAIN}£¬Â·¾¶£º${PATH}£¬Cookie£º${COOKIE}¡£\n";
+ Text[ russian ] = "Äîìåí: ${DOMAIN}, Ïóòü: ${PATH}, Ôàéë Cookie: ${COOKIE}.\n";
+ Text[ polish ] = "Domena: ${DOMAIN}, Œcie¿ka: ${PATH}, Cookie: ${COOKIE}.\n";
+ Text[ japanese ] = "ÄÞÒ²Ý: ${DOMAIN}AÊß½: ${PATH}A¸¯·°: ${COOKIE}B\n";
+ Text[ chinese_traditional ] = "°ì¡G${DOMAIN}¡A¸ô®|¡G${PATH}¡ACookie ¡G${COOKIE}¡C\n";
+ Text[ greek ] = "ÔïìÝáò: ${DOMAIN}, ÄéáäñïìÞ: ${PATH}, Cookie: ${COOKIE}.\n";
+ Text[ korean ] = "µµ¸ÞÀÎ: ${DOMAIN}, °æ·Î: ${PATH}, Cookie: ${COOKIE}.\n";
+ Text[ arabic ] = "ÇáäØÇÞ: ${DOMAIN}, ÇáãÓÇÑ: ${PATH}, Çáßæßí: ${COOKIE}.\n";
+ Text[ turkish ] = "Etki alaný: ${DOMAIN}, Veri yolu: ${PATH}, Cookie: ${COOKIE}.\n";
+};
+
+String STR_COOKIES_SEND_TITLE
+{
+ Text = "Cookies versenden" ;
+ Text [ English ] = "Cookies versenden" ;
+ Text [ portuguese ] = "Enviar cookies" ;
+ Text [ english_us ] = "Send Cookies" ;
+ Text [ portuguese_brazilian ] = "Cookies versenden" ;
+ Text [ swedish ] = "Skicka cookies" ;
+ Text [ danish ] = "Send cookies" ;
+ Text [ italian ] = "Trasmetti cookie" ;
+ Text [ spanish ] = "Enviar cookies" ;
+ Text [ french ] = "Envoi de Cookies" ;
+ Text [ dutch ] = "Cookies verzenden" ;
+ Text[ chinese_simplified ] = "¼Ä·¢ Cookie";
+ Text[ russian ] = "Îòïðàâèòü Cookies";
+ Text[ polish ] = "Wyœlij pliki cookie";
+ Text[ japanese ] = "¸¯·°‚Ì‘—M";
+ Text[ chinese_traditional ] = "¶Ç°e Cookie";
+ Text[ greek ] = "ÁðïóôïëÞ Cookies";
+ Text[ korean ] = "Cookies º¸³»±â";
+ Text[ arabic ] = "ÅÑÓÇá ÇáßæßíÒ";
+ Text[ turkish ] = "Cookies gönder";
+};
+
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
new file mode 100644
index 0000000000..dcfe0865c2
--- /dev/null
+++ b/uui/source/iahndl.cxx
@@ -0,0 +1,925 @@
+/*************************************************************************
+ *
+ * $RCSfile: iahndl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04: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 _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+#ifndef _SVTOOLS_HRC
+#include <svtools/svtools.hrc>
+#endif
+
+#ifndef _COM_SUN_STAR_TASK_CLASSIFIEDINTERACTIONREQUEST_HPP_
+#include <com/sun/star/task/ClassifiedInteractionRequest.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONABORT_HPP_
+#include <com/sun/star/task/XInteractionAbort.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONAPPROVE_HPP_
+#include <com/sun/star/task/XInteractionApprove.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONDISAPPROVE_HPP_
+#include <com/sun/star/task/XInteractionDisapprove.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONRETRY_HPP_
+#include <com/sun/star/task/XInteractionRetry.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_AUTHENTICATIONREQUEST_HPP_
+#include <com/sun/star/ucb/AuthenticationRequest.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_HANDLECOOKIESREQUEST_HPP_
+#include <com/sun/star/ucb/HandleCookiesRequest.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVEBADTRANSFERURLEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveBadTransferURLException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVECHAOSEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveCHAOSException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVEFILEIOEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveFileIOException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveIOException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVENETWORKCONNECTEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveNetworkConnectException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVENETWORKEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveNetworkException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVENETWORKGENERALEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveNetworkGeneralException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVENETWORKOFFLINEEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveNetworkOffLineException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVENETWORKREADEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveNetworkReadException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVENETWORKRESOLVENAMEEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveNetworkResolveNameException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVENETWORKWRITEEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveNetworkWriteException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_INTERACTIVEWRONGMEDIUMEXCEPTION_HPP_
+#include <com/sun/star/ucb/InteractiveWrongMediumException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XINTERACTIONCOOKIEHANDLING_HPP_
+#include <com/sun/star/ucb/XInteractionCookieHandling.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XINTERACTIONSUPPLYAUTHENTICATION_HPP_
+#include <com/sun/star/ucb/XInteractionSupplyAuthentication.hpp>
+#endif
+#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
+#include <cppuhelper/typeprovider.hxx>
+#endif
+#ifndef SVTOOLS_HTTPCOOK_HXX
+#include <svtools/httpcook.hxx>
+#endif
+#ifndef _LOGINERR_HXX
+#include <svtools/loginerr.hxx>
+#endif
+#ifndef _EINF_HXX
+#include <tools/errinf.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+
+#ifndef UUI_COOKIEDG_HXX
+#include <cookiedg.hxx>
+#endif
+#ifndef UUI_IAHNDL_HXX
+#include <iahndl.hxx>
+#endif
+#ifndef UUI_IDS_HRC
+#include <ids.hrc>
+#endif
+#ifndef UUI_LOGINDLG_HXX
+#include <logindlg.hxx>
+#endif
+
+using namespace com::sun::star;
+
+namespace unnamed_uui_iahndl {} using namespace unnamed_uui_iahndl;
+ // unnamed namespaces don't work well yet...
+
+//============================================================================
+namespace unnamed_uui_iahndl {
+
+class SimpleErrorContext: public ErrorContext
+{
+ UniString m_aContext;
+
+public:
+ SimpleErrorContext(UniString const & rTheContext): m_aContext(rTheContext)
+ {}
+
+ virtual BOOL GetString(ULONG, UniString & rCtxStr);
+};
+
+//============================================================================
+USHORT executeErrorDialog(ULONG nID, USHORT nMask);
+
+//============================================================================
+void executeLoginDialog(LoginErrorInfo & rInfo);
+
+//============================================================================
+void executeCookieDialog(CntHTTPCookieRequest & rRequest);
+
+}
+
+//============================================================================
+//
+// UUIInteractionHandler
+//
+//============================================================================
+
+// static
+sal_Char const UUIInteractionHandler::m_aImplementationName[]
+ = "UUIInteractionHandler";
+
+//============================================================================
+// virtual
+uno::Any SAL_CALL UUIInteractionHandler::queryInterface(uno::Type const &
+ rType)
+ throw (uno::RuntimeException)
+{
+ uno::Any
+ aRet(cppu::queryInterface(rType,
+ static_cast< lang::XServiceInfo * >(this),
+ static_cast< lang::XTypeProvider * >(this),
+ static_cast< task::XInteractionHandler * >(
+ this)));
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface(rType);
+}
+
+//============================================================================
+// virtual
+void SAL_CALL UUIInteractionHandler::acquire() throw (uno::RuntimeException)
+{
+ OWeakObject::acquire();
+}
+
+//============================================================================
+// virtual
+void SAL_CALL UUIInteractionHandler::release() throw (uno::RuntimeException)
+{
+ OWeakObject::release();
+}
+
+//============================================================================
+// virtual
+rtl::OUString SAL_CALL UUIInteractionHandler::getImplementationName()
+ throw (uno::RuntimeException)
+{
+ return rtl::OUString::createFromAscii(m_aImplementationName);
+}
+
+//============================================================================
+// virtual
+sal_Bool SAL_CALL UUIInteractionHandler::supportsService(rtl::OUString const &
+ rServiceName)
+ throw (uno::RuntimeException)
+{
+ uno::Sequence< rtl::OUString > aNames(getSupportedServiceNames_static());
+ for (sal_Int32 i = 0; i < aNames.getLength(); ++i)
+ if (aNames[i] == rServiceName)
+ return true;
+ return false;
+}
+
+//============================================================================
+// virtual
+uno::Sequence< rtl::OUString > SAL_CALL
+UUIInteractionHandler::getSupportedServiceNames()
+ throw (uno::RuntimeException)
+{
+ return getSupportedServiceNames_static();
+}
+
+//============================================================================
+// virtual
+uno::Sequence< uno::Type > SAL_CALL UUIInteractionHandler::getTypes()
+ throw (uno::RuntimeException)
+{
+ static cppu::OTypeCollection * pCollection = 0;
+ if (!pCollection)
+ {
+ osl::Guard< osl::Mutex > aGuard(osl::Mutex::getGlobalMutex());
+ if (!pCollection)
+ {
+ static cppu::OTypeCollection
+ aTheCollection(
+ getCppuType(
+ static_cast< uno::Reference< lang::XServiceInfo >
+ const * >(
+ 0)),
+ getCppuType(
+ static_cast< uno::Reference< lang::XTypeProvider >
+ const * >(
+ 0)),
+ getCppuType(
+ static_cast<
+ uno::Reference< task::XInteractionHandler >
+ const * >(
+ 0)));
+ pCollection = &aTheCollection;
+ }
+ }
+ return pCollection->getTypes();
+}
+
+//============================================================================
+// virtual
+uno::Sequence< sal_Int8 > SAL_CALL
+UUIInteractionHandler::getImplementationId() throw (uno::RuntimeException)
+{
+ static cppu::OImplementationId * pID = 0;
+ if (!pID)
+ {
+ osl::Guard< osl::Mutex > aGuard(osl::Mutex::getGlobalMutex());
+ if (!pID)
+ {
+ static cppu::OImplementationId aTheID(false);
+ pID = &aTheID;
+ }
+ }
+ return pID->getImplementationId();
+}
+
+//============================================================================
+// virtual
+void SAL_CALL
+UUIInteractionHandler::handle(
+ uno::Reference< task::XInteractionRequest > const & rRequest)
+ throw (uno::RuntimeException)
+{
+ if (!rRequest.is())
+ return;
+
+ uno::Any aTheRequest(rRequest->getRequest());
+ uno::Sequence< uno::Reference< task::XInteractionContinuation > >
+ aContinuations(rRequest->getContinuations());
+
+ ucb::AuthenticationRequest aAuthenticationRequest;
+ if (aTheRequest >>= aAuthenticationRequest)
+ {
+ uno::Reference< task::XInteractionAbort > xAbort;
+ uno::Reference< task::XInteractionRetry > xRetry;
+ uno::Reference< ucb::XInteractionSupplyAuthentication >
+ xSupplyAuthentication;
+ for (sal_Int32 i = 0; i < aContinuations.getLength(); ++i)
+ {
+ if (!xAbort.is())
+ {
+ xAbort = uno::Reference< task::XInteractionAbort >(
+ aContinuations[i], uno::UNO_QUERY);
+ if (xAbort.is())
+ continue;
+ }
+ if (!xRetry.is())
+ {
+ xRetry = uno::Reference< task::XInteractionRetry >(
+ aContinuations[i], uno::UNO_QUERY);
+ if (xRetry.is())
+ continue;
+ }
+ if (!xSupplyAuthentication.is())
+ {
+ xSupplyAuthentication
+ = uno::Reference< ucb::XInteractionSupplyAuthentication >(
+ aContinuations[i], uno::UNO_QUERY);
+ if (xSupplyAuthentication.is())
+ continue;
+ }
+ }
+ bool bRemember;
+ bool bRememberPersistent;
+ if (xSupplyAuthentication.is())
+ {
+ ucb::RememberAuthentication eDefault;
+ uno::Sequence< ucb::RememberAuthentication >
+ aModes(xSupplyAuthentication->
+ getRememberPasswordModes(eDefault));
+ bRemember = eDefault != ucb::RememberAuthentication_NO;
+ bRememberPersistent = false;
+ for (sal_Int32 i = 0; i < aModes.getLength(); ++i)
+ if (aModes[i] == ucb::RememberAuthentication_PERSISTENT)
+ {
+ bRememberPersistent = true;
+ break;
+ }
+ }
+ else
+ {
+ bRemember = false;
+ bRememberPersistent = false;
+ }
+ LoginErrorInfo aInfo;
+ aInfo.SetTitle(aAuthenticationRequest.ServerName);
+ aInfo.SetServer(aAuthenticationRequest.ServerName);
+ if (aAuthenticationRequest.HasRealm
+ || aAuthenticationRequest.HasAccount)
+ aInfo.SetAccount(aAuthenticationRequest.Account);
+ if (aAuthenticationRequest.HasUserName)
+ aInfo.SetUserName(aAuthenticationRequest.UserName);
+ if (aAuthenticationRequest.HasPassword)
+ aInfo.SetPassword(aAuthenticationRequest.Password);
+ aInfo.SetErrorText(aAuthenticationRequest.Diagnostic);
+ aInfo.SetPersistentPassword(bRememberPersistent);
+ aInfo.SetSavePassword(bRemember);
+ aInfo.SetModifyAccount(aAuthenticationRequest.HasAccount);
+ aInfo.SetModifyUserName(aAuthenticationRequest.HasUserName
+ && xSupplyAuthentication.is()
+ && xSupplyAuthentication->canSetUserName());
+ executeLoginDialog(aInfo);
+ switch (aInfo.GetResult())
+ {
+ case ERRCODE_BUTTON_OK:
+ if (xSupplyAuthentication.is())
+ {
+ xSupplyAuthentication->setUserName(aInfo.GetUserName());
+ xSupplyAuthentication->setPassword(aInfo.GetPassword());
+ xSupplyAuthentication->
+ setRememberPassword(
+ aInfo.GetIsSavePassword() ?
+ bRememberPersistent ?
+ ucb::RememberAuthentication_PERSISTENT :
+ ucb::RememberAuthentication_SESSION :
+ ucb::RememberAuthentication_NO);
+ xSupplyAuthentication->setAccount(aInfo.GetAccount());
+ xSupplyAuthentication->select();
+ }
+ break;
+
+ case ERRCODE_BUTTON_RETRY:
+ if (xRetry.is())
+ xRetry->select();
+ break;
+
+ default:
+ if (xAbort.is())
+ xAbort->select();
+ break;
+ }
+ return;
+ }
+
+ ucb::HandleCookiesRequest aCookiesRequest;
+ if (aTheRequest >>= aCookiesRequest)
+ {
+ List aCookies;
+ {for (sal_Int32 i = 0; i < aCookiesRequest.Cookies.getLength(); ++i)
+ {
+ CntHTTPCookie * pCookie = new CntHTTPCookie;
+ pCookie->m_aName = UniString(aCookiesRequest.Cookies[i].Name);
+ pCookie->m_aValue = UniString(aCookiesRequest.Cookies[i].Value);
+ pCookie->m_aDomain = UniString(aCookiesRequest.Cookies[i].Domain);
+ pCookie->m_aPath = UniString(aCookiesRequest.Cookies[i].Path);
+ pCookie->m_aExpires
+ = DateTime(Date(aCookiesRequest.Cookies[i].Expires.Day,
+ aCookiesRequest.Cookies[i].Expires.Month,
+ aCookiesRequest.Cookies[i].Expires.Year),
+ Time(aCookiesRequest.Cookies[i].Expires.Hours,
+ aCookiesRequest.Cookies[i].Expires.Minutes,
+ aCookiesRequest.Cookies[i].Expires.Seconds,
+ aCookiesRequest.Cookies[i].Expires.
+ HundredthSeconds));
+ pCookie->m_nFlags = aCookiesRequest.Cookies[i].Secure ?
+ CNTHTTP_COOKIE_FLAG_SECURE : 0;
+ switch (aCookiesRequest.Cookies[i].Policy)
+ {
+ case ucb::CookiePolicy_CONFIRM:
+ pCookie->m_nPolicy = CNTHTTP_COOKIE_POLICY_INTERACTIVE;
+ break;
+
+ case ucb::CookiePolicy_ACCEPT:
+ pCookie->m_nPolicy = CNTHTTP_COOKIE_POLICY_ACCEPTED;
+ break;
+
+ case ucb::CookiePolicy_IGNORE:
+ pCookie->m_nPolicy = CNTHTTP_COOKIE_POLICY_BANNED;
+ break;
+ }
+ aCookies.Insert(pCookie, LIST_APPEND);
+ }}
+ CntHTTPCookieRequest aRequest(aCookiesRequest.URL,
+ aCookies,
+ aCookiesRequest.Request
+ == ucb::CookieRequest_RECEIVE ?
+ CNTHTTP_COOKIE_REQUEST_RECV :
+ CNTHTTP_COOKIE_REQUEST_SEND);
+ executeCookieDialog(aRequest);
+ for (sal_Int32 i = 0; i < aContinuations.getLength(); ++i)
+ {
+ uno::Reference< ucb::XInteractionCookieHandling >
+ xCookieHandling(aContinuations[i], uno::UNO_QUERY);
+ if (xCookieHandling.is())
+ {
+ switch (aRequest.m_nRet)
+ {
+ case CNTHTTP_COOKIE_POLICY_INTERACTIVE:
+ xCookieHandling->
+ setGeneralPolicy(ucb::CookiePolicy_CONFIRM);
+ break;
+
+ case CNTHTTP_COOKIE_POLICY_ACCEPTED:
+ xCookieHandling->
+ setGeneralPolicy(ucb::CookiePolicy_ACCEPT);
+ break;
+
+ case CNTHTTP_COOKIE_POLICY_BANNED:
+ xCookieHandling->
+ setGeneralPolicy(ucb::CookiePolicy_IGNORE);
+ break;
+ }
+ for (sal_Int32 j = 0; j < aCookiesRequest.Cookies.getLength();
+ ++j)
+ if (aCookiesRequest.Cookies[j].Policy
+ == ucb::CookiePolicy_CONFIRM)
+ switch (static_cast< CntHTTPCookie * >(
+ aCookies.GetObject(j))->
+ m_nPolicy)
+ {
+ case CNTHTTP_COOKIE_POLICY_ACCEPTED:
+ xCookieHandling->
+ setSpecificPolicy(aCookiesRequest.
+ Cookies[j],
+ true);
+ break;
+
+ case CNTHTTP_COOKIE_POLICY_BANNED:
+ xCookieHandling->
+ setSpecificPolicy(aCookiesRequest.
+ Cookies[j],
+ false);
+ break;
+ }
+ xCookieHandling->select();
+ break;
+ }
+ }
+ while (aCookies.Count() != 0)
+ delete static_cast< CntHTTPCookie * >(
+ aCookies.Remove(aCookies.Count() - 1));
+ return;
+ }
+
+ task::InteractionClassification eClassification
+ = task::InteractionClassification_ERROR;
+ task::ClassifiedInteractionRequest aClassifiedInteractionRequest;
+ if (aTheRequest >>= aClassifiedInteractionRequest)
+ eClassification = aClassifiedInteractionRequest.Classification;
+
+ sal_uInt32 nErrorID = ERRCODE_NONE;
+ bool bErrorFlags = false;
+ SimpleErrorContext * pContext = 0;
+ bool bExecuted = false;
+ USHORT nButton;
+ ucb::InteractiveIOException aIOException;
+ ucb::InteractiveNetworkException aNetworkException;
+ ucb::InteractiveCHAOSException aCHAOSException;
+ ucb::InteractiveBadTransferURLException aTransferException;
+ ucb::InteractiveWrongMediumException aWrongMediumException;
+ if (aTheRequest >>= aIOException)
+ {
+ static sal_uInt32 const aID[ucb::IOErrorCode_WRONG_VERSION + 1]
+ = { ERRCODE_IO_ABORT, // ABORT
+ ERRCODE_IO_ACCESSDENIED, // ACCESS_DENIED
+ ERRCODE_IO_ALREADYEXISTS, // ALREADY_EXISTING
+ ERRCODE_IO_BADCRC, // BAD_CRC
+ ERRCODE_IO_CANTCREATE, // CANT_CREATE
+ ERRCODE_IO_CANTREAD, // CANT_READ
+ ERRCODE_IO_CANTSEEK, // CANT_SEEK
+ ERRCODE_IO_CANTTELL, // CANT_TELL
+ ERRCODE_IO_CANTWRITE, // CANT_WRITE
+ ERRCODE_IO_CURRENTDIR, // CURRENT_DIRECTORY
+ ERRCODE_IO_DEVICENOTREADY, // DEVICE_NOT_READY
+ ERRCODE_IO_NOTSAMEDEVICE, // DIFFERENT_DEVICES
+ ERRCODE_IO_GENERAL, // GENERAL
+ ERRCODE_IO_INVALIDACCESS, // INVALID_ACCESS
+ ERRCODE_IO_INVALIDCHAR, // INVALID_CHARACTER
+ ERRCODE_IO_INVALIDDEVICE, // INVALID_DEVICE
+ ERRCODE_IO_INVALIDLENGTH, // INVALID_LENGTH
+ ERRCODE_IO_INVALIDPARAMETER, // INVALID_PARAMETER
+ ERRCODE_IO_ISWILDCARD, // IS_WILDCARD
+ ERRCODE_IO_LOCKVIOLATION, // LOCKING_VIOLATION
+ ERRCODE_IO_MISPLACEDCHAR, // MISPLACED_CHARACTER
+ ERRCODE_IO_NAMETOOLONG, // NAME_TOO_LONG
+ ERRCODE_IO_NOTEXISTS, // NOT_EXISTING
+ ERRCODE_IO_NOTEXISTSPATH, // NOT_EXISTING_PATH
+ ERRCODE_IO_NOTSUPPORTED, // NOT_SUPPORTED
+ ERRCODE_IO_NOTADIRECTORY, // NO_DIRECTORY
+ ERRCODE_IO_NOTAFILE, // NO_FILE
+ ERRCODE_IO_OUTOFSPACE, // OUT_OF_DISK_SPACE
+ ERRCODE_IO_TOOMANYOPENFILES, // OUT_OF_FILE_HANDLES
+ ERRCODE_IO_OUTOFMEMORY, // OUT_OF_MEMORY
+ ERRCODE_IO_PENDING, // PENDING
+ ERRCODE_IO_RECURSIVE, // RECURSIVE
+ ERRCODE_IO_UNKNOWN, // UNKNOWN
+ ERRCODE_IO_WRITEPROTECTED, // WRITE_PROTECTED
+ ERRCODE_IO_WRONGFORMAT, // WRONG_FORMAT
+ ERRCODE_IO_WRONGVERSION }; // WRONG_VERSION
+ nErrorID = aID[aIOException.Code];
+ bErrorFlags = true;
+
+ ucb::InteractiveFileIOException aFileIOException;
+ if (aTheRequest >>= aFileIOException)
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ ResMgr * pManager
+ = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui));
+ UniString aTheContext(ResId(STR_ERROR_FILEIO, pManager));
+ delete pManager;
+
+ aTheContext.SearchAndReplaceAscii("($URL1)",
+ aFileIOException.FileName);
+ pContext = new SimpleErrorContext(aTheContext);
+ }
+ }
+ else if (aTheRequest >>= aNetworkException)
+ {
+ ucb::InteractiveNetworkOffLineException aOffLineException;
+ ucb::InteractiveNetworkResolveNameException aResolveNameException;
+ ucb::InteractiveNetworkConnectException aConnectException;
+ ucb::InteractiveNetworkReadException aReadException;
+ ucb::InteractiveNetworkWriteException aWriteException;
+ nErrorID = (aTheRequest >>= aOffLineException) ?
+ ERRCODE_INET_OFFLINE :
+ (aTheRequest >>= aResolveNameException) ?
+ *new StringErrorInfo(ERRCODE_INET_NAME_RESOLVE,
+ aResolveNameException.Server) :
+ (aTheRequest >>= aConnectException) ?
+ *new StringErrorInfo(ERRCODE_INET_CONNECT,
+ aConnectException.Server) :
+ (aTheRequest >>= aReadException) ?
+ *new StringErrorInfo(ERRCODE_INET_READ,
+ aReadException.Diagnostic) :
+ (aTheRequest >>= aWriteException) ?
+ *new StringErrorInfo(ERRCODE_INET_WRITE,
+ aWriteException.Diagnostic) :
+ ERRCODE_INET_GENERAL;
+ }
+ else if (aTheRequest >>= aCHAOSException)
+ nErrorID
+ = aCHAOSException.Arguments.getLength() >= 2 ?
+ *new TwoStringErrorInfo(aCHAOSException.ID,
+ aCHAOSException.Arguments[0],
+ aCHAOSException.Arguments[1]) :
+ aCHAOSException.Arguments.getLength() == 1 ?
+ *new StringErrorInfo(aCHAOSException.ID,
+ aCHAOSException.Arguments[0]) :
+ aCHAOSException.ID;
+ else if (aTheRequest >>= aTransferException)
+ {
+ DBG_ERROR("UUIInteractionHandler::handle():"
+ " Can't handle TransferException");
+ nButton = ERRCODE_BUTTON_CANCEL;
+ bExecuted = true;
+ }
+ else if (aTheRequest >>= aWrongMediumException)
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ ResMgr * pManager
+ = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui));
+ UniString aText(ResId(STR_ERROR_WRONGMEDIUM, pManager));
+ delete pManager;
+
+ sal_Int32 nMedium;
+ aWrongMediumException.Medium >>= nMedium;
+ aText.SearchAndReplaceAscii("$$",
+ UniString::CreateFromInt32(nMedium + 1));
+
+ ErrorBox aErrorBox(0, WB_OK_CANCEL, aText);
+ nButton = aErrorBox.Execute();
+ bExecuted = true;
+ }
+
+ sal_uInt16 nFlags = 0;
+ if (bErrorFlags)
+ {
+ bool bCanApprove = false;
+ for (sal_Int32 i = 0; i < aContinuations.getLength(); ++i)
+ {
+ if (uno::Reference< task::XInteractionApprove >::query(
+ aContinuations[i]).
+ is())
+ bCanApprove = true;
+ else if (uno::Reference< task::XInteractionDisapprove >::query(
+ aContinuations[i]).
+ is())
+ nFlags |= ERRCODE_BUTTON_NO;
+ else if (uno::Reference< task::XInteractionAbort >::query(
+ aContinuations[i]).
+ is())
+ nFlags |= ERRCODE_BUTTON_CANCEL;
+ else if (uno::Reference< task::XInteractionRetry >::query(
+ aContinuations[i]).
+ is())
+ nFlags |= ERRCODE_BUTTON_RETRY;
+ }
+ if (bCanApprove)
+ nFlags |= nFlags & ERRCODE_BUTTON_NO ? ERRCODE_BUTTON_YES :
+ ERRCODE_BUTTON_NO;
+ switch (eClassification)
+ {
+ case task::InteractionClassification_ERROR:
+ nFlags |= ERRCODE_MSG_ERROR;
+ break;
+
+ case task::InteractionClassification_WARNING:
+ nFlags |= ERRCODE_MSG_WARNING;
+ break;
+
+ case task::InteractionClassification_INFO:
+ nFlags |= ERRCODE_MSG_INFO;
+ break;
+
+ case task::InteractionClassification_QUERY:
+ nFlags |= ERRCODE_MSG_QUERY;
+ break;
+ }
+ }
+
+ if (!bExecuted)
+ nButton
+ = executeErrorDialog(nErrorID, bErrorFlags ? nFlags : USHRT_MAX);
+
+ if (pContext)
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ delete pContext;
+ }
+
+ switch (nButton)
+ {
+ case ERRCODE_BUTTON_OK:
+ case ERRCODE_BUTTON_YES:
+ {for (sal_Int32 i = 0; i < aContinuations.getLength(); ++i)
+ {
+ uno::Reference< task::XInteractionApprove >
+ xApprove(aContinuations[i], uno::UNO_QUERY);
+ if (xApprove.is())
+ {
+ xApprove->select();
+ break;
+ }
+ }}
+ break;
+
+ case ERRCODE_BUTTON_CANCEL:
+ {for (sal_Int32 i = 0; i < aContinuations.getLength(); ++i)
+ {
+ uno::Reference< task::XInteractionAbort >
+ xAbort(aContinuations[i], uno::UNO_QUERY);
+ if (xAbort.is())
+ {
+ xAbort->select();
+ break;
+ }
+ }}
+ break;
+
+ case ERRCODE_BUTTON_RETRY:
+ {for (sal_Int32 i = 0; i < aContinuations.getLength(); ++i)
+ {
+ uno::Reference< task::XInteractionRetry >
+ xRetry(aContinuations[i], uno::UNO_QUERY);
+ if (xRetry.is())
+ {
+ xRetry->select();
+ break;
+ }
+ }}
+ break;
+
+ case ERRCODE_BUTTON_NO:
+ {for (sal_Int32 i = 0; i < aContinuations.getLength(); ++i)
+ {
+ uno::Reference< task::XInteractionDisapprove >
+ xDisapprove(aContinuations[i], uno::UNO_QUERY);
+ if (xDisapprove.is())
+ {
+ xDisapprove->select();
+ break;
+ }
+ }}
+ break;
+ }
+}
+
+//============================================================================
+// static
+uno::Sequence< rtl::OUString >
+UUIInteractionHandler::getSupportedServiceNames_static()
+{
+ uno::Sequence< rtl::OUString > aNames(1);
+ aNames[0] = rtl::OUString::createFromAscii(
+ "com.sun.star.uui.InteractionHandler");
+ return aNames;
+}
+
+//============================================================================
+// static
+uno::Reference< uno::XInterface >
+#if SUPD >= 590
+SAL_CALL
+#endif // SUPD
+UUIInteractionHandler::createInstance(
+ uno::Reference< lang::XMultiServiceFactory > const &)
+{
+ return static_cast< uno::XWeak * >(static_cast< cppu::OWeakObject * >(
+ new UUIInteractionHandler));
+}
+
+//============================================================================
+//
+// SimpleErrorContext
+//
+//============================================================================
+
+// virtual
+BOOL SimpleErrorContext::GetString(ULONG, UniString & rCtxStr)
+{
+ rCtxStr = m_aContext;
+ return true;
+}
+
+//============================================================================
+//
+// executeErrorDialog
+//
+//============================================================================
+
+namespace unnamed_uui_iahndl {
+
+USHORT executeErrorDialog(ULONG nID, USHORT nMask)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ ResMgr * pManager1 = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(ofa));
+ SfxErrorHandler * pHandler1
+ = new SfxErrorHandler(RID_ERRHDL, ERRCODE_AREA_TOOLS,
+ ERRCODE_AREA_LIB1 - 1, pManager1);
+ ResMgr * pManager2 = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(cnt));
+ SfxErrorHandler * pHandler2
+ = new SfxErrorHandler(RID_CHAOS_START + 12, ERRCODE_AREA_CHAOS,
+ ERRCODE_AREA_CHAOS_END, pManager2);
+ // cf. chaos/source/inc/cntrids.hrc, where
+ // #define RID_CHAOS_ERRHDL (RID_CHAOS_START + 12)
+
+ // Needed because within ErrorHandler::HanldeError() ResIds are created
+ // without a ResMgr---they require a default ResMgr:
+ ResMgr * pDefaultManager = Resource::GetResManager();
+ Resource::SetResManager(pManager1);
+
+ USHORT nButton = ErrorHandler::HandleError(nID, nMask);
+
+ Resource::SetResManager(pDefaultManager);
+
+ delete pHandler2;
+ delete pManager2;
+ delete pHandler1;
+ delete pManager1;
+ return nButton;
+}
+
+//============================================================================
+//
+// executeLoginDialog
+//
+//============================================================================
+
+void executeLoginDialog(LoginErrorInfo & rInfo)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ bool bAccount = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) != 0;
+
+ sal_uInt16 nFlags = 0;
+ if (rInfo.GetPath().Len() == 0)
+ nFlags |= LF_NO_PATH;
+ if (rInfo.GetErrorText().Len() == 0)
+ nFlags |= LF_NO_ERRORTEXT;
+ if (!bAccount)
+ nFlags |= LF_NO_ACCOUNT;
+ if (!(rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_USER_NAME))
+ nFlags |= LF_USERNAME_READONLY;
+
+ ResMgr * pManager = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui));
+ LoginDialog * pDialog = new LoginDialog(0, nFlags, rInfo.GetServer(),
+ rInfo.GetAccount(), pManager);
+ if (rInfo.GetErrorText().Len() != 0)
+ pDialog->SetErrorText(rInfo.GetErrorText());
+ pDialog->SetName(rInfo.GetUserName());
+ if (bAccount)
+ pDialog->ClearAccount();
+ else
+ pDialog->ClearPassword();
+ pDialog->SetPassword(rInfo.GetPassword());
+ pDialog->SetSavePasswordText(ResId(rInfo.GetIsPersistentPassword() ?
+ RID_SAVE_PASSWORD :
+ RID_KEEP_PASSWORD,
+ pManager));
+ pDialog->SetSavePassword(rInfo.GetIsSavePassword());
+
+ rInfo.SetResult(pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK :
+ ERRCODE_BUTTON_CANCEL);
+ rInfo.SetUserName(pDialog->GetName());
+ rInfo.SetPassword(pDialog->GetPassword());
+ rInfo.SetAccount(pDialog->GetAccount());
+ rInfo.SetSavePassword(pDialog->IsSavePassword());
+ delete pDialog;
+ delete pManager;
+}
+
+//============================================================================
+//
+// executeCookieDialog
+//
+//============================================================================
+
+void executeCookieDialog(CntHTTPCookieRequest & rRequest)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+
+ ResMgr * pManager = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui));
+ CookiesDialog * pDialog = new CookiesDialog(0, &rRequest, pManager);
+ pDialog->Execute();
+ delete pDialog;
+ delete pManager;
+}
+
+}
+
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
new file mode 100644
index 0000000000..0f5b6b6cc0
--- /dev/null
+++ b/uui/source/iahndl.hxx
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * $RCSfile: iahndl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04: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 UUI_IAHNDL_HXX
+#define UUI_IAHNDL_HXX
+
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#endif
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+
+namespace com { namespace sun { namespace star { namespace lang {
+ class XMultiServiceFactory;
+ class XSingleServiceFactory;
+} } } }
+
+//============================================================================
+class UUIInteractionHandler:
+ public cppu::OWeakObject,
+ public com::sun::star::lang::XServiceInfo,
+ public com::sun::star::lang::XTypeProvider,
+ public com::sun::star::task::XInteractionHandler
+{
+public:
+ static sal_Char const m_aImplementationName[];
+
+ virtual com::sun::star::uno::Any SAL_CALL
+ queryInterface(com::sun::star::uno::Type const & rType)
+ throw (com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire()
+ throw (com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL release()
+ throw (com::sun::star::uno::RuntimeException);
+
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw (com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL supportsService(rtl::OUString const &
+ rServiceName)
+ throw (com::sun::star::uno::RuntimeException);
+
+ virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException);
+
+ 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);
+
+ virtual void SAL_CALL
+ handle(com::sun::star::uno::Reference<
+ com::sun::star::task::XInteractionRequest > const &
+ rRequest)
+ throw (com::sun::star::uno::RuntimeException);
+
+ static com::sun::star::uno::Sequence< rtl::OUString >
+ getSupportedServiceNames_static();
+
+ static com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
+#if SUPD >= 590
+ SAL_CALL
+#endif // SUPD 590
+ createInstance(com::sun::star::uno::Reference<
+ com::sun::star::lang::XMultiServiceFactory > const &);
+};
+
+#endif // UUI_IAHNDL_HXX
+
diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc
new file mode 100644
index 0000000000..d1539c2449
--- /dev/null
+++ b/uui/source/ids.hrc
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * $RCSfile: ids.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+//============================================================================
+//
+// The UUI Resources
+//
+// $Author: hr $ $Date: 2000-09-18 17:04:10 $ $Revision: 1.1.1.1 $
+//============================================================================
+
+#ifndef UUI_IDS_HRC
+#define UUI_IDS_HRC
+
+#ifndef _SOLAR_HRC
+#include <svtools/solar.hrc>
+#endif
+
+//============================================================================
+#define RID_KEEP_PASSWORD (RID_UUI_START + 0)
+#define RID_SAVE_PASSWORD (RID_UUI_START + 1)
+#define DLG_LOGIN (RID_UUI_START + 2)
+#define DLG_COOKIES (RID_UUI_START + 3)
+#define STR_COOKIES_RECV_START (RID_UUI_START + 4)
+#define STR_COOKIES_RECV_COOKIES (RID_UUI_START + 5)
+#define STR_COOKIES_RECV_TITLE (RID_UUI_START + 6)
+#define STR_COOKIES_SEND_START (RID_UUI_START + 7)
+#define STR_COOKIES_SEND_COOKIES (RID_UUI_START + 8)
+#define STR_COOKIES_SEND_TITLE (RID_UUI_START + 9)
+#define STR_ERROR_FILEIO (RID_UUI_START + 10)
+#define STR_ERROR_WRONGMEDIUM (RID_UUI_START + 11)
+
+//============================================================================
+#define HID_DLG_LOGIN (HID_UUI_START + 0)
+#define HID_DLG_COOKIES (HID_UUI_START + 1)
+
+// HID_UUI_END (aka HID_CHAOS_NEW_DATABASE) is reserved in
+// sfx2/util/hidother.src!
+
+#endif // UUI_IDS_HRC
+
diff --git a/uui/source/ids.src b/uui/source/ids.src
new file mode 100644
index 0000000000..0b9c2215e0
--- /dev/null
+++ b/uui/source/ids.src
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * $RCSfile: ids.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+//============================================================================
+//
+// Miscellaneous Resources
+//
+// $Author: hr $ $Date: 2000-09-18 17:04:10 $ $Revision: 1.1.1.1 $
+//============================================================================
+
+#ifndef UUI_IDS_HRC
+#include <ids.hrc>
+#endif
+
+String RID_KEEP_PASSWORD
+{
+ Text = "Passwort bis Applikationsende ~merken";
+ Text[ english ] = "~Remember password until application ends";
+ Text[ arabic ] = "ÊÐßøÑ ßáãÉ ÇáÓÑ ÍÊì äåÇíÉ ÌáÓÉ ÇáÚãá";
+ Text[ chinese_simplified ] = "½áÊø³ÌÐò֮ǰһֱ¼Çס¿ÚÁî(~R)";
+ Text[ chinese_simplified ] = "½áÊø³ÌÐò֮ǰһֱ¼Çס¿ÚÁî(~R)";
+ Text[ chinese_traditional ] = "µ²§ôµ{§Ç¤§«e¤@ª½°O¦í±K½X(~R)";
+ Text[ danish ] = "Husk adgangskoden til applikationen afsluttes";
+ Text[ dutch ] = "Wachtwoord o~nthouden tot aan beëindigen van het programma";
+ Text[ dutch ] = "Wachtwoord o~nthouden tot aan beëindigen van het programma";
+ Text[ english_us ] = "~Remember password till end of session";
+ Text[ french ] = "Se rappeler du ~mot de passe jusqu'à la fin de la session";
+ Text[ greek ] = "Áðï~ìíçìüíåõóç êùäéêïý Ýùò ôï ôÝëïò ôçò åöáñìïãÞò";
+ Text[ italian ] = "An~nota password fino alla fine dell'applicazione";
+ Text[ japanese ] = "Ê߽ܰÄނͱÌßع°¼®ÝI—¹‚Ü‚Å‹L‰¯‚µ‚Ä‚¨‚­";
+ Text[ korean ] = "¼¼¼ÇÀ» Á¾·áÇÒ ¶§±îÁö Æнº¿öµå ±â¾ï";
+ Text[ polish ] = "Zapamiêtaj has³o do koñca aplikacji";
+ Text[ portuguese ] = "~Lembrar senha até terminar a aplicação";
+ Text[ portuguese_brazilian ] = "Passwort ~merken";
+ Text[ russian ] = "Çàïîìíèòü ïàðîëü äî êîíöà ïðèëîæåíèÿ";
+ Text[ spanish ] = "~Recordar contraseña hasta finalizar la aplicación";
+ Text[ swedish ] = "Ko~m ihåg lösenordet tills tillämpningen avslutas";
+ Text[ turkish ] = "~Remember password till end of session";
+};
+
+String RID_SAVE_PASSWORD
+{
+ Text = "Passwort dauerhaft ~speichern";
+ Text[ english ] = "~Save password permanently";
+ Text[ arabic ] = "ÍÝÙ ÏÇÆã áßáãÉ ÇáÓÑ";
+ Text[ chinese_simplified ] = "±£´æ¿ÚÁî(~S)";
+ Text[ chinese_simplified ] = "±£´æ¿ÚÁî(~S)";
+ Text[ chinese_traditional ] = "Àx¦s±K½X(~S)";
+ Text[ danish ] = "Gem adgangskoden permanent";
+ Text[ dutch ] = "Wachtwoord ~opslaan";
+ Text[ dutch ] = "Wachtwoord ~opslaan";
+ Text[ english_us ] = "~Remember password";
+ Text[ french ] = "~Enregistrer le mot de passe";
+ Text[ greek ] = "ÁðïèÞêåõ~óç êùäéêïý ðñüóâáóçò";
+ Text[ italian ] = "Salva pa~ssword ";
+ Text[ japanese ] = "Ê߽ܰÄÞ‚Ì’·Šú•Û‘¶(~S)";
+ Text[ korean ] = "Æнº¿öµå ¿µ±¸ ÀúÀå";
+ Text[ polish ] = "Zapisz has³o";
+ Text[ portuguese ] = "~Guardar senha";
+ Text[ portuguese_brazilian ] = "Passwort ~speichern";
+ Text[ russian ] = "Ñîõðàíèòü ïàðîëü";
+ Text[ spanish ] = "~Guardar contraseña";
+ Text[ swedish ] = "~Spara lösenord permanent";
+ Text[ turkish ] = "~Save password";
+};
+
+String STR_ERROR_FILEIO
+{
+ Text = "Fehler beim Zugriff auf die Datei ($URL1)";
+ Text[ english ] = "Error accessing file ($URL1)";
+ Text[ arabic ] = "ÍÏË ÎØà ÃËäÇÁ ãÍÇæáÉ ÇáæÕæá Åáì ÇáãáÝ ($URL1)";
+ Text[ chinese_simplified ] = "ÔÚ¶ÁÈ¡Îļþ($URL1)ʱ·¢Éú´íÎó";
+ Text[ chinese_traditional ] = "Ū¨úÀÉ®× ($URL1) µo¥Í¿ù»~";
+ Text[ danish ] = "Fejl ved adgang til filen ($URL1)";
+ Text[ dutch ] = "Fout bij toegang tot bestand ($URL1)";
+ Text[ english_us ] = "Error accessing file ($URL1)";
+ Text[ french ] = "Erreur lors de l'accès au fichier ($URL1)";
+ Text[ greek ] = "ÓöÜëìá êáôÜ ôçí ðñüóâáóç óôï áñ÷åßï ($URL1)";
+ Text[ italian ] = "Errore di accesso al file ($URL1)";
+ Text[ japanese ] = "($URL1) ̧²Ù‚Ö±¸¾½‚·‚éÛ‚Ì´×°";
+ Text[ korean ] = "Error accessing file ($URL1)";
+ Text[ polish ] = "B³¹d przy dostêpie do pliku ($URL1)";
+ Text[ portuguese ] = "Erro de acesso ao ficheiro ($URL1)";
+ Text[ portuguese_brazilian ] = "Error accessing file ($URL1)";
+ Text[ russian ] = "Îøèáêà ïðè äîñòóïå ê ôàéëó ($URL1)";
+ Text[ spanish ] = "Error de acceso al archivo ($URL1)";
+ Text[ swedish ] = "Fel vid åtkomst till filen ($URL1)";
+ Text[ turkish ] = "Error accessing file ($URL1)";
+};
+
+String STR_ERROR_WRONGMEDIUM
+{
+ Text = "Legen Sie bitte den Datenträger $$ ein.";
+ Text[ english ] = "Please insert disk $$.";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇáÞÑÕ $$ .";
+ Text[ chinese_simplified ] = "ÇëÄú·ÅÈëÈíÅÌ $$¡£";
+ Text[ chinese_traditional ] = "½Ð©ñ¸mºÏ¤ù $$ ¡C";
+ Text[ danish ] = "Indsæt venligst datamediet $$.";
+ Text[ dutch ] = "Leg datamedium in station $$.";
+ Text[ english_us ] = "Please insert data storage medium $$.";
+ Text[ french ] = "Veuillez insérer le média $$.";
+ Text[ greek ] = "Ðáñáêáëþ åéóÜãåôå ôïí äßóêï $$.";
+ Text[ italian ] = "Inserite il supporto dati $$.";
+ Text[ japanese ] = "”}‘Ì $$ ‚ð“ü‚ê‚Ä‚­‚¾‚³‚¢B";
+ Text[ korean ] = "Please insert disk $$.";
+ Text[ polish ] = "Wsuñ proszê noœnik danych $$.";
+ Text[ portuguese ] = "Introduza o media $$.";
+ Text[ portuguese_brazilian ] = "Please insert disk $$.";
+ Text[ russian ] = "Âñòàâüòå, ïîæàëóéñòà, äèñê $$.";
+ Text[ spanish ] = "Inserte por favor el medio $$.";
+ Text[ swedish ] = "Lägg in datamediet $$.";
+ Text[ turkish ] = "Please insert disk $$.";
+};
+
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
new file mode 100644
index 0000000000..d5b934a520
--- /dev/null
+++ b/uui/source/logindlg.cxx
@@ -0,0 +1,351 @@
+/*************************************************************************
+ *
+ * $RCSfile: logindlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 _SVT_FILEDLG_HXX
+#include <svtools/filedlg.hxx>
+#endif
+#ifndef _FSYS_HXX
+#include <tools/fsys.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef UUI_IDS_HRC
+#include <ids.hrc>
+#endif
+#ifndef UUI_LOGINDLG_HRC
+#include <logindlg.hrc>
+#endif
+#ifndef UUI_LOGINDLG_HXX
+#include <logindlg.hxx>
+#endif
+
+#ifdef UNX
+#include <limits.h>
+#define _MAX_PATH PATH_MAX
+#endif
+
+// LoginDialog -------------------------------------------------------
+
+void LoginDialog::HideControls_Impl( USHORT nFlags )
+{
+ FASTBOOL bPathHide = FALSE;
+ FASTBOOL bErrorHide = FALSE;
+ FASTBOOL bAccountHide = FALSE;
+
+ if ( ( nFlags & LF_NO_PATH ) == LF_NO_PATH )
+ {
+ aPathFT.Hide();
+ aPathED.Hide();
+ aPathBtn.Hide();
+ bPathHide = TRUE;
+ }
+ else if ( ( nFlags & LF_PATH_READONLY ) == LF_PATH_READONLY )
+ {
+ aPathED.Hide();
+ aPathInfo.Show();
+ aPathBtn.Hide();
+ }
+
+ if ( ( nFlags & LF_NO_USERNAME ) == LF_NO_USERNAME )
+ {
+ aNameFT.Hide();
+ aNameED.Hide();
+ }
+ else if ( ( nFlags & LF_USERNAME_READONLY ) == LF_USERNAME_READONLY )
+ {
+ aNameED.Hide();
+ aNameInfo.Show();
+ }
+
+ if ( ( nFlags & LF_NO_PASSWORD ) == LF_NO_PASSWORD )
+ {
+ aPasswordFT.Hide();
+ aPasswordED.Hide();
+ }
+
+ if ( ( nFlags & LF_NO_SAVEPASSWORD ) == LF_NO_SAVEPASSWORD )
+ aSavePasswdBtn.Hide();
+
+ if ( ( nFlags & LF_NO_ERRORTEXT ) == LF_NO_ERRORTEXT )
+ {
+ aErrorInfo.Hide();
+ aErrorGB.Hide();
+ bErrorHide = TRUE;
+ }
+
+ if ( ( nFlags & LF_NO_ACCOUNT ) == LF_NO_ACCOUNT )
+ {
+ aAccountFT.Hide();
+ aAccountED.Hide();
+ bAccountHide = TRUE;
+ }
+
+ if ( bErrorHide )
+ {
+ long nOffset = aLoginGB.GetPosPixel().Y() -
+ aErrorGB.GetPosPixel().Y();
+ Point aNewPnt = aRequestInfo.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aRequestInfo.SetPosPixel( aNewPnt );
+ aNewPnt = aPathFT.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aPathFT.SetPosPixel( aNewPnt );
+ aNewPnt = aPathED.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aPathED.SetPosPixel( aNewPnt );
+ aNewPnt = aPathInfo.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aPathInfo.SetPosPixel( aNewPnt );
+ aNewPnt = aPathBtn.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aPathBtn.SetPosPixel( aNewPnt );
+ aNewPnt = aNameFT.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aNameFT.SetPosPixel( aNewPnt );
+ aNewPnt = aNameED.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aNameED.SetPosPixel( aNewPnt );
+ aNewPnt = aNameInfo.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aNameInfo.SetPosPixel( aNewPnt );
+ aNewPnt = aPasswordFT.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aPasswordFT.SetPosPixel( aNewPnt );
+ aNewPnt = aPasswordED.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aPasswordED.SetPosPixel( aNewPnt );
+ aNewPnt = aAccountFT.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aAccountFT.SetPosPixel( aNewPnt );
+ aNewPnt = aAccountED.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aAccountED.SetPosPixel( aNewPnt );
+ aNewPnt = aSavePasswdBtn.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aSavePasswdBtn.SetPosPixel( aNewPnt );
+ aNewPnt = aLoginGB.GetPosPixel();
+ aNewPnt.Y() -= nOffset;
+ aLoginGB.SetPosPixel( aNewPnt );
+ Size aNewSiz = GetSizePixel();
+ aNewSiz.Height() -= nOffset;
+ SetSizePixel( aNewSiz );
+ }
+
+ if ( bPathHide )
+ {
+ long nOffset = aNameED.GetPosPixel().Y() -
+ aPathED.GetPosPixel().Y();
+
+ Point aTmpPnt1 = aNameFT.GetPosPixel();
+ Point aTmpPnt2 = aPasswordFT.GetPosPixel();
+ aNameFT.SetPosPixel( aPathFT.GetPosPixel() );
+ aPasswordFT.SetPosPixel( aTmpPnt1 );
+ aAccountFT.SetPosPixel( aTmpPnt2 );
+ aTmpPnt1 = aNameED.GetPosPixel();
+ aTmpPnt2 = aPasswordED.GetPosPixel();
+ aNameED.SetPosPixel( aPathED.GetPosPixel() );
+ aPasswordED.SetPosPixel( aTmpPnt1 );
+ aAccountED.SetPosPixel( aTmpPnt2 );
+ aNameInfo.SetPosPixel( aPathInfo.GetPosPixel() );
+ aTmpPnt1 = aSavePasswdBtn.GetPosPixel();
+ aTmpPnt1.Y() -= nOffset;
+ aSavePasswdBtn.SetPosPixel( aTmpPnt1 );
+ Size aNewSz = aLoginGB.GetSizePixel();
+ aNewSz.Height() -= nOffset;
+ aLoginGB.SetSizePixel( aNewSz );
+ aNewSz = GetSizePixel();
+ aNewSz.Height() -= nOffset;
+ SetSizePixel( aNewSz );
+ }
+
+ if ( bAccountHide )
+ {
+ long nOffset = aAccountED.GetPosPixel().Y() - aPasswordED.GetPosPixel().Y();
+
+ Point aTmpPnt = aSavePasswdBtn.GetPosPixel();
+ aTmpPnt.Y() -= nOffset;
+ aSavePasswdBtn.SetPosPixel( aTmpPnt );
+ Size aNewSz = aLoginGB.GetSizePixel();
+ aNewSz.Height() -= nOffset;
+ aLoginGB.SetSizePixel( aNewSz );
+ aNewSz = GetSizePixel();
+ aNewSz.Height() -= nOffset;
+ SetSizePixel( aNewSz );
+ }
+};
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( LoginDialog, OKHdl_Impl, OKButton *, EMPTYARG )
+{
+ // trim the strings
+ aNameED.SetText( aNameED.GetText().EraseLeadingChars().
+ EraseTrailingChars() );
+ aPasswordED.SetText( aPasswordED.GetText().EraseLeadingChars().
+ EraseTrailingChars() );
+ EndDialog( RET_OK );
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( LoginDialog, PathHdl_Impl, PushButton *, EMPTYARG )
+{
+ PathDialog* pDlg = new PathDialog( this, WB_3DLOOK );
+ DirEntry aEntry;
+ aEntry.ToAbs();
+ pDlg->SetPath( aEntry.GetFull() );
+
+ if ( pDlg->Execute() == RET_OK )
+ aPathED.SetText( pDlg->GetPath() );
+
+ delete pDlg;
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+LoginDialog::LoginDialog
+(
+ Window* pParent,
+ USHORT nFlags,
+ const String& rServer,
+ const String& rRealm,
+ ResMgr* pResMgr
+) :
+
+ ModalDialog( pParent, ResId( DLG_LOGIN, pResMgr ) ),
+
+ aErrorInfo ( this, ResId( INFO_LOGIN_ERROR ) ),
+ aErrorGB ( this, ResId( GB_LOGIN_ERROR ) ),
+ aRequestInfo ( this, ResId( INFO_LOGIN_REQUEST ) ),
+ aPathFT ( this, ResId( FT_LOGIN_PATH ) ),
+ aPathED ( this, ResId( ED_LOGIN_PATH ) ),
+ aPathInfo ( this, ResId( INFO_LOGIN_PATH ) ),
+ aPathBtn ( this, ResId( BTN_LOGIN_PATH ) ),
+ aNameFT ( this, ResId( FT_LOGIN_USERNAME ) ),
+ aNameED ( this, ResId( ED_LOGIN_USERNAME ) ),
+ aNameInfo ( this, ResId( INFO_LOGIN_USERNAME ) ),
+ aPasswordFT ( this, ResId( FT_LOGIN_PASSWORD ) ),
+ aPasswordED ( this, ResId( ED_LOGIN_PASSWORD ) ),
+ aAccountFT ( this, ResId( FT_LOGIN_ACCOUNT ) ),
+ aAccountED ( this, ResId( ED_LOGIN_ACCOUNT ) ),
+ aSavePasswdBtn ( this, ResId( CB_LOGIN_SAVEPASSWORD ) ),
+ aLoginGB ( this, ResId( GB_LOGIN_LOGIN ) ),
+ aOKBtn ( this, ResId( BTN_LOGIN_OK ) ),
+ aCancelBtn ( this, ResId( BTN_LOGIN_CANCEL ) ),
+ aHelpBtn ( this, ResId( BTN_LOGIN_HELP ) )
+
+{
+ // Einlog-Ort eintragen
+ String aServer;
+
+ if ( ( ( nFlags & LF_NO_ACCOUNT ) == LF_NO_ACCOUNT ) && rRealm.Len() )
+ {
+ aServer = rRealm;
+ ( ( aServer += ' ' ) += String( ResId( STR_LOGIN_AT ) ) ) += ' ';
+ }
+ aServer += rServer;
+ String aTxt = aRequestInfo.GetText();
+ aTxt.SearchAndReplaceAscii( "%1", aServer );
+ aRequestInfo.SetText( aTxt );
+
+ FreeResource();
+
+ aPathED.SetMaxTextLen( _MAX_PATH );
+ aNameED.SetMaxTextLen( _MAX_PATH );
+
+ aOKBtn.SetClickHdl( LINK( this, LoginDialog, OKHdl_Impl ) );
+ aPathBtn.SetClickHdl( LINK( this, LoginDialog, PathHdl_Impl ) );
+
+ HideControls_Impl( nFlags );
+};
+
+// -----------------------------------------------------------------------
+
+void LoginDialog::SetName( const String& rNewName )
+{
+ aNameED.SetText( rNewName );
+ aNameInfo.SetText( rNewName );
+}
+
+// -----------------------------------------------------------------------
+
+void LoginDialog::ClearPassword()
+{
+ aPasswordED.SetText( String() );
+
+ if ( aNameED.GetText().Len() == 0 )
+ aNameED.GrabFocus();
+ else
+ aPasswordED.GrabFocus();
+};
+
+// -----------------------------------------------------------------------
+
+void LoginDialog::ClearAccount()
+{
+ aAccountED.SetText( String() );
+ aAccountED.GrabFocus();
+};
+
diff --git a/uui/source/logindlg.hrc b/uui/source/logindlg.hrc
new file mode 100644
index 0000000000..e1d0cb96a8
--- /dev/null
+++ b/uui/source/logindlg.hrc
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * $RCSfile: logindlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 UUI_LOGINDLG_HRC
+#define UUI_LOGINDLG_HRC
+
+//============================================================================
+#define INFO_LOGIN_ERROR 10
+#define GB_LOGIN_ERROR 11
+
+#define INFO_LOGIN_REQUEST 20
+#define FT_LOGIN_PATH 21
+#define ED_LOGIN_PATH 22
+#define INFO_LOGIN_PATH 23
+#define BTN_LOGIN_PATH 24
+#define FT_LOGIN_USERNAME 25
+#define ED_LOGIN_USERNAME 26
+#define INFO_LOGIN_USERNAME 27
+#define FT_LOGIN_PASSWORD 28
+#define ED_LOGIN_PASSWORD 29
+#define FT_LOGIN_ACCOUNT 30
+#define ED_LOGIN_ACCOUNT 31
+#define CB_LOGIN_SAVEPASSWORD 32
+#define GB_LOGIN_LOGIN 33
+
+#define BTN_LOGIN_OK 50
+#define BTN_LOGIN_CANCEL 51
+#define BTN_LOGIN_HELP 52
+
+#define STR_LOGIN_AT 60
+
+#endif // UUI_LOGINDLG_HRC
+
diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx
new file mode 100644
index 0000000000..3cc55c2842
--- /dev/null
+++ b/uui/source/logindlg.hxx
@@ -0,0 +1,151 @@
+/*************************************************************************
+ *
+ * $RCSfile: logindlg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 UUI_LOGINDLG_HXX
+#define UUI_LOGINDLG_HXX
+
+#ifndef _STDCTRL_HXX
+#include <svtools/stdctrl.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _SV_DIALOG_HXX
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _SV_EDIT_HXX
+#include <vcl/edit.hxx>
+#endif
+#ifndef _SV_GROUP_HXX
+#include <vcl/group.hxx>
+#endif
+
+//============================================================================
+#define LF_NO_PATH 0x0001 // "Pfad" verstecken
+#define LF_NO_USERNAME 0x0002 // "Name" verstecken
+#define LF_NO_PASSWORD 0x0004 // "Passwort" verstecken
+#define LF_NO_SAVEPASSWORD 0x0008 // "Passwort speichern" verstecken
+#define LF_NO_ERRORTEXT 0x0010 // Meldung verstecken
+#define LF_PATH_READONLY 0x0020 // "Pfad" readonly
+#define LF_USERNAME_READONLY 0x0040 // "Name" readonly
+#define LF_NO_ACCOUNT 0x0080 // "Account" verstecken
+
+//============================================================================
+class LoginDialog : public ModalDialog
+{
+ FixedInfo aErrorInfo;
+ GroupBox aErrorGB;
+ FixedInfo aRequestInfo;
+ FixedText aPathFT;
+ Edit aPathED;
+ FixedInfo aPathInfo;
+ PushButton aPathBtn;
+ FixedText aNameFT;
+ Edit aNameED;
+ FixedInfo aNameInfo;
+ FixedText aPasswordFT;
+ Edit aPasswordED;
+ FixedText aAccountFT;
+ Edit aAccountED;
+ CheckBox aSavePasswdBtn;
+ GroupBox aLoginGB;
+ OKButton aOKBtn;
+ CancelButton aCancelBtn;
+ HelpButton aHelpBtn;
+
+ void HideControls_Impl( USHORT nFlags );
+
+ DECL_LINK( OKHdl_Impl, OKButton * );
+ DECL_LINK( PathHdl_Impl, PushButton * );
+
+public:
+ LoginDialog( Window* pParent, USHORT nFlags,
+ const String& rServer, const String& rRealm,
+ ResMgr * pResMgr );
+
+ String GetPath() const { return aPathED.GetText(); }
+ void SetPath( const String& rNewPath )
+ { aPathED.SetText( rNewPath );
+ aPathInfo.SetText( rNewPath );}
+ String GetName() const { return aNameED.GetText(); }
+ void SetName( const String& rNewName );
+ String GetPassword() const { return aPasswordED.GetText(); }
+ void SetPassword( const String& rNew )
+ { aPasswordED.SetText( rNew ); }
+ String GetAccount() const { return aAccountED.GetText(); }
+ void SetAccount( const String& rNew )
+ { aAccountED.SetText( rNew ); }
+ BOOL IsSavePassword() const
+ { return aSavePasswdBtn.IsChecked(); }
+ void SetSavePassword( BOOL bSave )
+ { aSavePasswdBtn.Check( bSave ); }
+ void SetSavePasswordText( const String& rTxt )
+ { aSavePasswdBtn.SetText( rTxt ); }
+ void SetErrorText( const String& rTxt )
+ { aErrorInfo.SetText( rTxt ); }
+ void SetLoginRequestText( const String& rTxt )
+ { aRequestInfo.SetText( rTxt ); }
+ void ClearPassword();
+ void ClearAccount();
+};
+
+#endif // UUI_LOGINDLG_HXX
+
diff --git a/uui/source/logindlg.src b/uui/source/logindlg.src
new file mode 100644
index 0000000000..46e92a47df
--- /dev/null
+++ b/uui/source/logindlg.src
@@ -0,0 +1,388 @@
+/*************************************************************************
+ *
+ * $RCSfile: logindlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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 UUI_IDS_HRC
+#include <ids.hrc>
+#endif
+#ifndef UUI_LOGINDLG_HRC
+#include <logindlg.hrc>
+#endif
+
+ModalDialog DLG_LOGIN
+{
+ HelpId = HID_DLG_LOGIN ;
+ Border = TRUE ;
+ Moveable = TRUE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 265 , 158 ) ;
+ Text = "Benutzername und Passwort erforderlich" ;
+ Text [ English ] = "User Name and Password required" ;
+ FixedText INFO_LOGIN_ERROR
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 185 , 18 ) ;
+ WordBreak = TRUE ;
+ };
+ GroupBox GB_LOGIN_ERROR
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 197 , 35 ) ;
+ Text = "Meldung vom Server" ;
+ Text [ English ] = "Report from server" ;
+ Text [ english_us ] = "Message from server" ;
+ Text [ portuguese_brazilian ] = "Meldung vom Server" ;
+ Text [ swedish ] = "Meddelande från servern" ;
+ Text [ danish ] = "Melding fra serveren" ;
+ Text [ italian ] = "Segnalazione dal server" ;
+ Text [ spanish ] = "Mensaje del servidor" ;
+ Text [ french ] = "Message en provenance du serveur" ;
+ Text [ dutch ] = "Melding van de server" ;
+ Text [ portuguese ] = "Mensagem do servidor" ;
+ Text[ chinese_simplified ] = "·þÎñÆ÷±¨¸æ";
+ Text[ russian ] = "Ñîîáùåíèå ñ ñåðâåðà";
+ Text[ polish ] = "WiadomoϾ z serwera";
+ Text[ japanese ] = "»°ÊÞ°‚©‚ç‚ÌÒ¯¾°¼Þ";
+ Text[ chinese_traditional ] = "¦øªA¾¹³ø§i";
+ Text[ greek ] = "ÌÞíõìá ôïõ äéáêïìéóôÞ";
+ Text[ korean ] = "¼­¹ö·ÎºÎÅÍÀÇ ¸Þ½ÃÁö";
+ Text[ arabic ] = "ÑÓÇáÉ ãä ÇáãÒæøÏ";
+ Text[ turkish ] = "Sunucudan ileti";
+ };
+ FixedText INFO_LOGIN_REQUEST
+ {
+ Pos = MAP_APPFONT ( 12 , 55 ) ;
+ Size = MAP_APPFONT ( 185 , 18 ) ;
+ WordBreak = TRUE ;
+ Text = "Bitte geben Sie hier Benutzernamen und Passwort für %1 ein." ;
+ Text [ English ] = "Please enter user name and password here for %1." ;
+ Text [ portuguese ] = "Especifique o nome do utilizador e a senha para %1." ;
+ Text [ english_us ] = "Please enter user name and password for %1 here." ;
+ Text [ portuguese_brazilian ] = "Bitte geben Sie hier Benutzernamen und Passwort für %1 ein." ;
+ Text [ swedish ] = "Var vänlig och mata in användarnamn och lösenord här för %1." ;
+ Text [ danish ] = "Indtast her venligst brugernavnet og adgangkoden for %1." ;
+ Text [ italian ] = "Digitate qui il nome dell'utente e la password per %1." ;
+ Text [ spanish ] = "Especifique su nombre de usuario y su contraseña para %1." ;
+ Text [ french ] = "Veuilez saisir votre nom d'utilisateur et votre mot de passe pour %1." ;
+ Text [ dutch ] = "Vermeld hier de gebruiker en het wachtwoord voor %1." ;
+ Text[ chinese_simplified ] = "ÇëÄúÔÚ´ËΪ %1 ÊäÈëÓû§ÃûºÍ¿ÚÁî¡£";
+ Text[ russian ] = "Ââåäèòå, ïîæàëóéñòà, èìÿ ïîëüçîâàòåëÿ è ïàðîëü äëÿ %1.";
+ Text[ polish ] = "Wpisz nazwisko u¿ytkownika i has³o dla %1";
+ Text[ japanese ] = "‚±‚±‚É %1 ‚ÌÕ°»Þ°–¼‚ÆÊ߽ܰÄÞ‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢B";
+ Text[ chinese_traditional ] = "½Ð¬° %1 ¿é¤J¨Ï¥Î¦W©M±K½X¡C";
+ Text[ greek ] = "Ðáñáêáëþ åéóÜãåôå åäþ ôï üíïìá ÷ñÞóôç êáé ôïí êùäéêü ðñüóâáóçò ãéá ôï %1.";
+ Text[ korean ] = "¿©±â¿¡ »ç¿ëÀÚ À̸§°ú %1ÀÇ Æнº¿öµå¸¦ ÀÔ·ÂÇϽʽÿÀ.";
+ Text[ arabic ] = "ÇáÑÌÇÁ ÅÏÎÇá ÇÓã ÇáãÓÊÎÏã æßáãÉ ÇáÓÑ áÜ %1 åäÇ.";
+ Text[ turkish ] = "%1 için buraya kullanýcý adý ve þifre girin.";
+ };
+ FixedText FT_LOGIN_PATH
+ {
+ Pos = MAP_APPFONT ( 12 , 77 ) ;
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ Text = "~Pfad" ;
+ Text [ English ] = "~Path" ;
+ Text [ english_us ] = "~Path" ;
+ Text [ portuguese_brazilian ] = "~Pfad" ;
+ Text [ swedish ] = "Sö~kväg" ;
+ Text [ danish ] = "Sti" ;
+ Text [ italian ] = "~Percorso" ;
+ Text [ spanish ] = "~Ruta" ;
+ Text [ french ] = "~Chemin" ;
+ Text [ dutch ] = "~Pad" ;
+ Text [ portuguese ] = "~Atalho" ;
+ Text[ chinese_simplified ] = "·¾¶(~P)";
+ Text[ russian ] = "Ïóòü";
+ Text[ polish ] = "Œcie¿ka";
+ Text[ japanese ] = "Êß½(~H)";
+ Text[ chinese_traditional ] = "¸ô®|(~H)";
+ Text[ greek ] = "ÄéáäñïìÞ";
+ Text[ korean ] = "°æ·Î(~H)";
+ Text[ arabic ] = "ÇáãÓÇÑ";
+ Text[ turkish ] = "Veri yolu";
+ };
+ Edit ED_LOGIN_PATH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 66 , 76 ) ;
+ Size = MAP_APPFONT ( 114 , 12 ) ;
+ };
+ FixedText INFO_LOGIN_PATH
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 66 , 77 ) ;
+ Size = MAP_APPFONT ( 131 , 10 ) ;
+ };
+ PushButton BTN_LOGIN_PATH
+ {
+ Pos = MAP_APPFONT ( 183 , 75 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ Text = "~..." ;
+ };
+ FixedText FT_LOGIN_USERNAME
+ {
+ Pos = MAP_APPFONT ( 12 , 92 ) ;
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ Text = "~Benutzername" ;
+ Text [ English ] = "~Username" ;
+ Text [ english_us ] = "~User name" ;
+ Text [ portuguese_brazilian ] = "~Benutzername" ;
+ Text [ swedish ] = "~Användarnamn" ;
+ Text [ danish ] = "Brugernavn" ;
+ Text [ italian ] = "Nome utente" ;
+ Text [ spanish ] = "~Nombre de usuario" ;
+ Text [ french ] = "~Nom d'utilisateur" ;
+ Text [ dutch ] = "Naam ~gebruiker" ;
+ Text [ portuguese ] = "~Nome do utilizador" ;
+ Text[ chinese_simplified ] = "̞(~U)";
+ Text[ russian ] = "Ïîëüçîâàòåëü";
+ Text[ polish ] = "Nazwisko u¿ytkownika";
+ Text[ japanese ] = "Õ°»Þ°–¼(~U)";
+ Text[ chinese_traditional ] = "¨Ï¥Î¦W(~U)";
+ Text[ greek ] = "¼íïìá ÷ñÞóôç";
+ Text[ korean ] = "»ç¿ëÀÚ À̸§(~U)";
+ Text[ arabic ] = "ÇÓã ÇáãÓÊÎÏã";
+ Text[ turkish ] = "Kullanýcý adý";
+ };
+ Edit ED_LOGIN_USERNAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 66 , 91 ) ;
+ Size = MAP_APPFONT ( 131 , 12 ) ;
+ };
+ FixedText INFO_LOGIN_USERNAME
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 66 , 92 ) ;
+ Size = MAP_APPFONT ( 131 , 10 ) ;
+ };
+ FixedText FT_LOGIN_PASSWORD
+ {
+ Pos = MAP_APPFONT ( 12 , 107 ) ;
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ Text = "P~asswort" ;
+ Text [ English ] = "P~assword" ;
+ Text [ english_us ] = "Pass~word" ;
+ Text [ portuguese_brazilian ] = "P~asswort" ;
+ Text [ swedish ] = "Lösen~ord" ;
+ Text [ danish ] = "Adgangskode" ;
+ Text [ italian ] = "P~assword" ;
+ Text [ spanish ] = "~Contraseña" ;
+ Text [ french ] = "~Mot de passe" ;
+ Text [ dutch ] = "W~achtwoord" ;
+ Text [ portuguese ] = "~Senha" ;
+ Text[ chinese_simplified ] = "¿ÚÁî(~W)";
+ Text[ russian ] = "Ïàðîëü";
+ Text[ polish ] = "Has³o";
+ Text[ japanese ] = "Ê߽ܰÄÞ(~W)";
+ Text[ chinese_traditional ] = "±K½X(~W)";
+ Text[ greek ] = "Êùäéêüò ðñüóâ~áóçò";
+ Text[ korean ] = "Æнº¿öµå(~W)";
+ Text[ arabic ] = "ßáãÉ ÇáÓÑ";
+ Text[ turkish ] = "Þifre";
+ };
+ Edit ED_LOGIN_PASSWORD
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 66 , 106 ) ;
+ Size = MAP_APPFONT ( 131 , 12 ) ;
+ PassWord = TRUE ;
+ };
+ FixedText FT_LOGIN_ACCOUNT
+ {
+ Pos = MAP_APPFONT ( 12 , 122 ) ;
+ Size = MAP_APPFONT ( 51 , 10 ) ;
+ Text = "A~ccount" ;
+ Text [ English ] = "A~ccount" ;
+ Text[ english_us ] = "A~ccount";
+ Text[ portuguese ] = "~Conta";
+ Text[ russian ] = "Ó÷åòíàÿ çàïèñü";
+ Text[ dutch ] = "A~ccount";
+ Text[ french ] = "C~ompte";
+ Text[ spanish ] = "~Cuenta";
+ Text[ italian ] = "A~ccount";
+ Text[ danish ] = "Konto";
+ Text[ swedish ] = "~Konto";
+ Text[ polish ] = "Konto";
+ Text[ portuguese_brazilian ] = "A~ccount";
+ Text[ japanese ] = "±¶³ÝÄ(~C)";
+ Text[ chinese_simplified ] = "ÕʺÅ(~C)";
+ Text[ chinese_traditional ] = "±b¸¹(~C)";
+ Text[ greek ] = "Ëïãáñéáóìü~ò";
+ Text[ korean ] = "°èÁ¤(~C)";
+ Text[ arabic ] = "ÇÔÊÑÇß";
+ Text[ turkish ] = "Hesap";
+ };
+ Edit ED_LOGIN_ACCOUNT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 66 , 121 ) ;
+ Size = MAP_APPFONT ( 131 , 12 ) ;
+ PassWord = TRUE ;
+ };
+ CheckBox CB_LOGIN_SAVEPASSWORD
+ {
+ Pos = MAP_APPFONT ( 12 , 136 ) ;
+ Size = MAP_APPFONT ( 185 , 10 ) ;
+ Text = "Passwort ~speichern" ;
+ Text [ English ] = "~Save password" ;
+ Text [ english_us ] = "~Save password" ;
+ Text [ italian ] = "Salva pa~ssword" ;
+ Text [ spanish ] = "Guardar ~contraseña" ;
+ Text [ french ] = "~Enregistrer le mot de passe" ;
+ Text [ dutch ] = "Wachtwoord ~opslaan" ;
+ Text [ swedish ] = "~Spara lösenord" ;
+ Text [ danish ] = "Gem adgangskode" ;
+ Text [ portuguese ] = "Guardar ~senha" ;
+ Text [ portuguese_brazilian ] = "Passwort ~speichern" ;
+ Text[ chinese_simplified ] = "´æÅÌ¿ÚÁî(~S)";
+ Text[ russian ] = "Ñîõðàíèòü ïàðîëü";
+ Text[ polish ] = "Zapisz has³o";
+ Text[ japanese ] = "Ê߽ܰÄÞ‚Ì•Û‘¶(~S)";
+ Text[ chinese_traditional ] = "Àx¦s±K½X(~S)";
+ Text[ greek ] = "ÁðïèÞêåõ~óç êùäéêïý ðñüóâáóçò";
+ Text[ korean ] = "Æнº¿öµå ÀúÀå(~S)";
+ Text[ arabic ] = "ÍÝÙ ßáãÉ ÇáÓÑ";
+ Text[ turkish ] = "Þifreyi kaydet";
+ };
+ GroupBox GB_LOGIN_LOGIN
+ {
+ Pos = MAP_APPFONT ( 7 , 44 ) ;
+ Size = MAP_APPFONT ( 197 , 108 ) ;
+ Text = "Anmelden" ;
+ Text [ English ] = "Connect" ;
+ Text [ english_us ] = "Login" ;
+ Text [ portuguese_brazilian ] = "Anmelden" ;
+ Text [ swedish ] = "Logga in" ;
+ Text [ danish ] = "Login" ;
+ Text [ italian ] = "Login" ;
+ Text [ spanish ] = "Registrar" ;
+ Text [ french ] = "Login" ;
+ Text [ dutch ] = "Aanmelden" ;
+ Text [ portuguese ] = "Login" ;
+ Text[ chinese_simplified ] = "Ç©µ½";
+ Text[ russian ] = "Âõîä â ñèñòåìó";
+ Text[ polish ] = "Zarejestruj";
+ Text[ japanese ] = "Û¸Þ²Ý";
+ Text[ chinese_traditional ] = "µn¤J";
+ Text[ greek ] = "Óýíäåóç";
+ Text[ korean ] = "·Î±×ÀÎ";
+ Text[ arabic ] = "ÊÓÌíá";
+ Text[ turkish ] = "Oturum aç";
+ };
+ OKButton BTN_LOGIN_OK
+ {
+ Pos = MAP_APPFONT ( 209 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_LOGIN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 209 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BTN_LOGIN_HELP
+ {
+ Pos = MAP_APPFONT ( 209 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ String STR_LOGIN_AT
+ {
+ Text = "auf " ;
+ Text [ English ] = "at " ;
+ Text [ portuguese ] = "em " ;
+ Text [ english_us ] = "to " ;
+ Text [ portuguese_brazilian ] = "auf " ;
+ Text [ swedish ] = "på " ;
+ Text [ danish ] = "på " ;
+ Text [ italian ] = "su " ;
+ Text [ spanish ] = "en " ;
+ Text [ french ] = "sur " ;
+ Text [ dutch ] = "op " ;
+ Text[ chinese_simplified ] = "ÔÚ ";
+ Text[ russian ] = "íà ";
+ Text[ polish ] = "na ";
+ Text[ japanese ] = "Û¸Þ²Ýæ ";
+ Text[ chinese_traditional ] = "¦b ";
+ Text[ greek ] = "óôï ";
+ Text[ korean ] = "¿¡ ";
+ Text[ arabic ] = "Úáì ";
+ Text[ turkish ] = "yeri ";
+ };
+ Text [ english_us ] = "User Name and Password Required" ;
+ Text [ portuguese_brazilian ] = "Benutzername und Passwort erforderlich" ;
+ Text [ swedish ] = "Användarnamn och lösenord nödvändigt" ;
+ Text [ danish ] = "Brugernavn og adgangskode påkrævet" ;
+ Text [ italian ] = "Nome utente e password sono necessari" ;
+ Text [ spanish ] = "Se requieren el nombre de usuario y la contraseña" ;
+ Text [ french ] = "Nom d'utilisateur et mot de passe requis" ;
+ Text [ dutch ] = "Naam gebruiker en wachtwoord vereist" ;
+ Text [ portuguese ] = "Requere-se nome de utilizador e senha" ;
+ Text[ chinese_simplified ] = "ÒªÇóÊäÈëÓû§ÃûºÍ¿ÚÁî";
+ Text[ russian ] = "Íåîáõîäèìû èìÿ ïîëüçîâàòåëÿ è ïàðîëü";
+ Text[ polish ] = "Wymagane nazwisko u¿ytkownika i has³o";
+ Text[ japanese ] = "Õ°»Þ°–¼‚ÆÊ߽ܰÄÞ‚ª•K—v";
+ Text[ chinese_traditional ] = "½Ð¿é¤J¨Ï¥Î¦W©M±K½X";
+ Text[ greek ] = "Áðáéôåßôáé ôï üíïìá ÷ñÞóôç êáé ï êùäéêüò ðñüóâáóçò";
+ Text[ korean ] = "»ç¿ëÀÚ À̸§°ú Æнº¿öµå°¡ ÇÊ¿äÇÕ´Ï´Ù.";
+ Text[ arabic ] = "ãØáæÈ ÅÏÎÇá ÇÓã ÇáãÓÊÎÏã æßáãÉ ÇáÓÑ";
+ Text[ turkish ] = "Kullanýcý adý ve þifre gerekli";
+};
+
diff --git a/uui/source/makefile.mk b/uui/source/makefile.mk
new file mode 100644
index 0000000000..71119dc0fc
--- /dev/null
+++ b/uui/source/makefile.mk
@@ -0,0 +1,83 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:04:11 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning 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 = uui
+TARGET = source
+ENABLE_EXCEPTIONS = true
+
+.INCLUDE: svpre.mk
+.INCLUDE: settings.mk
+.INCLUDE: sv.mk
+
+SLOFILES = \
+ $(SLO)$/cookiedg.obj \
+ $(SLO)$/iahndl.obj \
+ $(SLO)$/logindlg.obj \
+ $(SLO)$/services.obj
+
+SRCFILES = \
+ cookiedg.src \
+ ids.src \
+ logindlg.src
+
+.INCLUDE: target.mk
diff --git a/uui/source/services.cxx b/uui/source/services.cxx
new file mode 100644
index 0000000000..98f07784b1
--- /dev/null
+++ b/uui/source/services.cxx
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * $RCSfile: services.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:04:11 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning 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_XREGISTRYKEY_HPP_
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#endif
+#ifndef _CPPU_MACROS_HXX_
+#include <cppu/macros.hxx>
+#endif
+#ifndef _CPPUHELPER_FACTORY_HXX_
+#include <cppuhelper/factory.hxx>
+#endif
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
+#ifndef _SAL_TYPES_H_
+#include <sal/types.h>
+#endif
+#ifndef _UNO_ENVIRONMENT_H_
+#include <uno/environment.h>
+#endif
+
+#ifndef UUI_IAHNDL_HXX
+#include <iahndl.hxx>
+#endif
+
+using namespace com::sun::star;
+
+//============================================================================
+//
+// component_getImplementationEnvironment
+//
+//============================================================================
+
+extern "C" void SAL_CALL
+component_getImplementationEnvironment(sal_Char const ** pEnvTypeName,
+ uno_Environment **)
+{
+ *pEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
+//============================================================================
+//
+// component_getDescription
+//
+//============================================================================
+
+extern "C" sal_Char const * SAL_CALL component_getDescription()
+{
+ return "UCB User Interface Interaction Handler";
+}
+
+//============================================================================
+//
+// component_writeInfo
+//
+//============================================================================
+
+extern "C" sal_Bool SAL_CALL component_writeInfo(void *, void * pRegistryKey)
+{
+ bool bSuccess = pRegistryKey != 0;
+ uno::Reference< registry::XRegistryKey > xKey;
+ if (bSuccess)
+ {
+ rtl::OUString aKeyName(rtl::OUString::createFromAscii("/"));
+ aKeyName += rtl::OUString::createFromAscii(
+ UUIInteractionHandler::m_aImplementationName);
+ aKeyName += rtl::OUString::createFromAscii("/UNO/SERVICES");
+ try
+ {
+ xKey = static_cast< registry::XRegistryKey * >(pRegistryKey)->
+ createKey(aKeyName);
+ }
+ catch (registry::InvalidRegistryException &) {}
+ bSuccess = xKey.is() != false;
+ }
+ if (bSuccess)
+ {
+ uno::Sequence< rtl::OUString >
+ aServiceNames(
+ UUIInteractionHandler::getSupportedServiceNames_static());
+ for (sal_Int32 i = 0; i < aServiceNames.getLength(); ++i)
+ try
+ {
+ xKey->createKey(aServiceNames[i]);
+ }
+ catch (registry::InvalidRegistryException &)
+ {
+ bSuccess = false;
+ break;
+ }
+ }
+ return bSuccess;
+}
+
+//============================================================================
+//
+// component_getFactory
+//
+//============================================================================
+
+extern "C" void * SAL_CALL component_getFactory(sal_Char const * pImplName,
+ void * pServiceManager,
+ void *)
+{
+ void * pFactory = 0;
+ if (pServiceManager
+ && rtl_str_compare(pImplName,
+ UUIInteractionHandler::m_aImplementationName)
+ == 0)
+ {
+ uno::Reference< lang::XSingleServiceFactory >
+ xTheFactory(
+ cppu::createOneInstanceFactory(
+ static_cast< lang::XMultiServiceFactory * >(
+ pServiceManager),
+ rtl::OUString::createFromAscii(
+ UUIInteractionHandler::m_aImplementationName),
+ &UUIInteractionHandler::createInstance,
+ UUIInteractionHandler::getSupportedServiceNames_static()));
+ if (xTheFactory.is())
+ {
+ xTheFactory->acquire();
+ pFactory = xTheFactory.get();
+ }
+ }
+ return pFactory;
+}
+
diff --git a/uui/util/makefile.mk b/uui/util/makefile.mk
new file mode 100644
index 0000000000..74e31612d4
--- /dev/null
+++ b/uui/util/makefile.mk
@@ -0,0 +1,96 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:04:11 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning 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 = uui
+TARGET = uui
+RESTARGET = $(TARGET)
+GEN_HID = true
+NO_BSYMBOLIC = true
+USE_DEFFILE = true
+
+.INCLUDE: svpre.mk
+.INCLUDE: settings.mk
+.INCLUDE: sv.mk
+
+SHL1TARGET = $(TARGET)$(UPD)$(DLLPOSTFIX)
+SHL1IMPLIB = i$(TARGET)
+SHL1DEF = $(MISC)$/$(SHL1TARGET).def
+SHL1LIBS = \
+ $(SLB)$/source.lib
+SHL1STDLIBS = \
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(SALLIB) \
+ $(SVTOOLLIB) \
+ $(TOOLSLIB) \
+ $(VCLLIB)
+
+DEF1NAME = $(SHL1TARGET)
+DEF1DES = Universal Content Broker User Interface
+DEF1EXPORTFILE = exports.dxp
+
+RESLIB1NAME = $(RESTARGET)
+RESLIB1SRSFILES = \
+ $(SRS)$/source.srs
+
+.INCLUDE: target.mk
diff --git a/xmlhelp/prj/d.lst b/xmlhelp/prj/d.lst
new file mode 100644
index 0000000000..ca542872c6
--- /dev/null
+++ b/xmlhelp/prj/d.lst
@@ -0,0 +1 @@
+..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.* \ No newline at end of file
diff --git a/xmloff/dtd/office.dtd b/xmloff/dtd/office.dtd
new file mode 100644
index 0000000000..c994d4a50b
--- /dev/null
+++ b/xmloff/dtd/office.dtd
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ $Id: office.dtd,v 1.1.1.1 2000-09-18 17:07:00 hr Exp $
+
+ Copyright 2000 Sun Microsystems Inc.
+-->
+
+<!ENTITY % dtypes-mod SYSTEM "dtypes.mod">
+%dtypes-mod;
+<!ENTITY % nmspace-mod SYSTEM "nmspace.mod">
+%nmspace-mod;
+<!ENTITY % style-mod SYSTEM "style.mod">
+%style-mod;
+<!ENTITY % office-mod SYSTEM "office.mod">
+%office-mod;
+<!ENTITY % meta-mod SYSTEM "meta.mod">
+%meta-mod;
+<!ENTITY % drawing-mod SYSTEM "drawing.mod">
+%drawing-mod;
+<!ENTITY % text-mod SYSTEM "text.mod">
+%text-mod;
+<!ENTITY % table-mod SYSTEM "table.mod">
+%table-mod;
+<!ENTITY % chart-mod SYSTEM "chart.mod">
+%chart-mod;
+<!ENTITY % datastyl-mod SYSTEM "datastyl.mod">
+%datastyl-mod;
diff --git a/xmloff/inc/DashStyle.hxx b/xmloff/inc/DashStyle.hxx
new file mode 100644
index 0000000000..b63f632dc6
--- /dev/null
+++ b/xmloff/inc/DashStyle.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: DashStyle.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_DASHSTYLE_HXX
+#define _XMLOFF_DASHSTYLE_HXX
+
+#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+
+class SvXMLNamespaceMap;
+class SvXMLAttributeList;
+class SvXMLUnitConverter;
+
+class XMLDashStyle
+{
+public:
+ XMLDashStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > * _pHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter );
+ ~XMLDashStyle();
+
+ sal_Bool exportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool importXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > * mpHandler;
+ const SvXMLNamespaceMap& mrNamespaceMap;
+ const SvXMLUnitConverter& mrUnitConverter;
+
+ SvXMLAttributeList *mpAttrList;
+
+ sal_Bool ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+ void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+
+};
+
+#endif // _XMLOFF_DASHSTYLE_HXX
diff --git a/xmloff/inc/GradientStyle.hxx b/xmloff/inc/GradientStyle.hxx
new file mode 100644
index 0000000000..dd7942849e
--- /dev/null
+++ b/xmloff/inc/GradientStyle.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: GradientStyle.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_GRADIENTSTYLE_HXX
+#define _XMLOFF_GRADIENTSTYLE_HXX
+
+#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+
+class SvXMLNamespaceMap;
+class SvXMLAttributeList;
+class SvXMLUnitConverter;
+
+class XMLGradientStyle
+{
+public:
+ XMLGradientStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > * _pHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter );
+ ~XMLGradientStyle();
+
+ sal_Bool exportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool importXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > * mpHandler;
+ const SvXMLNamespaceMap& mrNamespaceMap;
+ const SvXMLUnitConverter& mrUnitConverter;
+
+ SvXMLAttributeList *mpAttrList;
+
+ sal_Bool ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+ void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+
+};
+
+#endif // _XMLOFF_GRADIENTSTYLE_HXX
diff --git a/xmloff/inc/HatchStyle.hxx b/xmloff/inc/HatchStyle.hxx
new file mode 100644
index 0000000000..3255de3717
--- /dev/null
+++ b/xmloff/inc/HatchStyle.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * $RCSfile: HatchStyle.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_HATCHSTYLE_HXX
+#define _XMLOFF_HATCHSTYLE_HXX
+
+#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+
+class SvXMLNamespaceMap;
+class SvXMLAttributeList;
+class SvXMLUnitConverter;
+
+namespace com { namespace sun { namespace star { namespace rtl { class OUString; } } } }
+
+class XMLHatchStyle
+{
+public:
+ XMLHatchStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & _rHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter );
+ ~XMLHatchStyle();
+
+ sal_Bool exportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool importXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler;
+ const SvXMLNamespaceMap& mrNamespaceMap;
+ const SvXMLUnitConverter& rUnitConverter;
+
+ SvXMLAttributeList *pAttrList;
+
+ sal_Bool ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+ void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+
+};
+
+#endif // _XMLOFF_HATCHELEMENT_HXX
diff --git a/xmloff/inc/ImageStyle.hxx b/xmloff/inc/ImageStyle.hxx
new file mode 100644
index 0000000000..2aefc90dbc
--- /dev/null
+++ b/xmloff/inc/ImageStyle.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: ImageStyle.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_IMAGESTYLE_HXX
+#define _XMLOFF_IMAGESTYLE_HXX
+
+#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+
+class SvXMLNamespaceMap;
+class SvXMLAttributeList;
+class SvXMLUnitConverter;
+
+class XMLImageStyle
+{
+public:
+ XMLImageStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & _rHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter );
+ ~XMLImageStyle();
+
+ sal_Bool exportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool importXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler;
+ const SvXMLNamespaceMap& mrNamespaceMap;
+ const SvXMLUnitConverter& rUnitConverter;
+
+ SvXMLAttributeList *pAttrList;
+
+ sal_Bool ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+ void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+
+};
+
+#endif // _XMLOFF_IMAGESTYLE_HXX
diff --git a/xmloff/inc/MarkerStyle.hxx b/xmloff/inc/MarkerStyle.hxx
new file mode 100644
index 0000000000..128e1a6566
--- /dev/null
+++ b/xmloff/inc/MarkerStyle.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: MarkerStyle.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_MARKERSTYLE_HXX
+#define _XMLOFF_MARKERSTYLE_HXX
+
+#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+
+class SvXMLNamespaceMap;
+class SvXMLAttributeList;
+class SvXMLUnitConverter;
+
+class XMLMarkerStyle
+{
+public:
+ XMLMarkerStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & _rHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter );
+ ~XMLMarkerStyle();
+
+ sal_Bool exportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool importXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler;
+ const SvXMLNamespaceMap& mrNamespaceMap;
+ const SvXMLUnitConverter& rUnitConverter;
+
+ SvXMLAttributeList *pAttrList;
+
+ sal_Bool ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+ void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+
+};
+
+#endif // _XMLOFF_MARKERSTYLE_HXX
diff --git a/xmloff/inc/SchXMLExport.hxx b/xmloff/inc/SchXMLExport.hxx
new file mode 100644
index 0000000000..f5f1025a34
--- /dev/null
+++ b/xmloff/inc/SchXMLExport.hxx
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLExport.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 SCH_XMLEXPORT_HXX_
+#define SCH_XMLEXPORT_HXX_
+
+#ifndef _XMLOFF_SCH_XMLEXPORTHELPER_HXX_
+#include "SchXMLExportHelper.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXP_HXX
+#include "xmlexp.hxx"
+#endif
+#ifndef _UNIVERSALL_REFERENCE_HXX
+#include "uniref.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
+#include "xmlprmap.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLERFACTORY_HXX
+#include "prhdlfac.hxx"
+#endif
+
+namespace com { namespace sun { namespace star {
+ namespace chart {
+ class XDiagram;
+ class XChartDocument;
+ class XChartDataArray;
+ struct ChartSeriesAddress;
+ }
+ namespace drawing {
+ class XShape;
+ }
+ namespace task {
+ class XStatusIndicator;
+ }
+ namespace frame {
+ class XModel;
+ }
+}}}
+
+class SvXMLAutoStylePoolP;
+class SvXMLUnitConverter;
+class XMLChartExportPropertyMapper;
+
+// ------------------------------------------
+// export class for a complete chart document
+// ------------------------------------------
+
+class SchXMLExport : public SvXMLExport
+{
+private:
+ com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > mxStatusIndicator;
+ SvXMLAutoStylePoolP maAutoStylePool;
+
+ SchXMLExportHelper maExportHelper;
+
+protected:
+ virtual void _ExportStyles( sal_Bool bUsed );
+ virtual void _ExportAutoStyles();
+ virtual void _ExportMasterStyles();
+ virtual void _ExportContent();
+
+public:
+ SchXMLExport( com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel,
+ const rtl::OUString& rFileName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler >& rHandler,
+ sal_Bool bShowProgress,
+ sal_Bool bIncludeTable = sal_False );
+ virtual ~SchXMLExport();
+
+ void SetProgress( sal_Int32 nPercentage );
+};
+
+#endif // SCH_XMLEXPORT_HXX_
diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx
new file mode 100644
index 0000000000..a8ce6b8955
--- /dev/null
+++ b/xmloff/inc/SchXMLImport.hxx
@@ -0,0 +1,202 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLImport.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 SCH_XMLIMPORT_HXX_
+#define SCH_XMLIMPORT_HXX_
+
+#ifndef _XMLOFF_SCH_XMLIMPORTHELPER_HXX_
+#include "SchXMLImportHelper.hxx"
+#endif
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLERFACTORY_HXX
+#include "prhdlfac.hxx"
+#endif
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+
+/* ----------------------------------------
+ these enums are used for the
+ SvXMLTokenMapEntries to distinguish
+ the tokens in switch-directives
+ ----------------------------------------*/
+
+enum SchXMLDocElemTokenMap
+{
+ XML_TOK_DOC_AUTOSTYLES,
+ XML_TOK_DOC_META,
+ XML_TOK_DOC_BODY
+};
+
+enum SchXMLTableElemTokenMap
+{
+ XML_TOK_TABLE_HEADER_COLS,
+ XML_TOK_TABLE_COLUMNS,
+ XML_TOK_TABLE_COLUMN,
+ XML_TOK_TABLE_HEADER_ROWS,
+ XML_TOK_TABLE_ROWS,
+ XML_TOK_TABLE_ROW
+};
+
+enum SchXMLChartElemTokenMap
+{
+ XML_TOK_CHART_PLOT_AREA,
+ XML_TOK_CHART_TITLE,
+ XML_TOK_CHART_SUBTITLE,
+ XML_TOK_CHART_LEGEND,
+ XML_TOK_CHART_TABLE
+};
+
+enum SchXMLPlotAreaElemTokenMap
+{
+ XML_TOK_PA_AXIS,
+ XML_TOK_PA_SERIES,
+ XML_TOK_PA_CATEGORIES,
+ XML_TOK_PA_WALL,
+ XML_TOK_PA_FLOOR
+};
+
+enum SchXMLSeriesElemTokenMap
+{
+ XML_TOK_SERIES_DATA_POINT,
+ XML_TOK_SERIES_DOMAIN
+};
+
+// ----------------------------------------
+
+enum SchXMLChartAttrMap
+{
+ XML_TOK_CHART_CLASS,
+ XML_TOK_CHART_WIDTH,
+ XML_TOK_CHART_HEIGHT,
+ XML_TOK_CHART_STYLE_NAME
+};
+
+enum SchXMLPlotAreaAttrTokenMap
+{
+ XML_TOK_PA_X,
+ XML_TOK_PA_Y,
+ XML_TOK_PA_WIDTH,
+ XML_TOK_PA_HEIGHT,
+ XML_TOK_PA_STYLE_NAME
+};
+
+enum SchXMLAxisAttrTokenMap
+{
+ XML_TOK_AXIS_CLASS,
+ XML_TOK_AXIS_NAME,
+ XML_TOK_AXIS_STYLE_NAME
+};
+
+enum SchXMLLegendAttrMap
+{
+ XML_TOK_LEGEND_POSITION,
+ XML_TOK_LEGEND_X,
+ XML_TOK_LEGEND_Y
+};
+
+enum SchXMLAutoStyleAttrMap
+{
+ XML_TOK_AS_FAMILY,
+ XML_TOK_AS_NAME
+};
+
+enum SchXMLCellAttrMap
+{
+ XML_TOK_CELL_VAL_TYPE,
+ XML_TOK_CELL_VALUE
+};
+
+enum SchXMLSeriesAttrMap
+{
+ XML_TOK_SERIES_CELL_RANGE,
+ XML_TOK_SERIES_LABEL_ADDRESS,
+ XML_TOK_SERIES_STYLE_NAME,
+ XML_TOK_SERIES_CHART_CLASS // not available yet
+};
+
+class SchXMLImport : public SvXMLImport
+{
+private:
+ com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > mxStatusIndicator;
+
+ SchXMLImportHelper maImportHelper;
+
+protected:
+ virtual SvXMLImportContext *CreateContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+public:
+ SchXMLImport( com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel,
+ sal_Bool bLoadDoc, sal_Bool bShowProgress );
+ virtual ~SchXMLImport();
+};
+
+#endif // SCH_XMLIMPORT_HXX_
diff --git a/xmloff/inc/TransGradientStyle.hxx b/xmloff/inc/TransGradientStyle.hxx
new file mode 100644
index 0000000000..05c6b752c7
--- /dev/null
+++ b/xmloff/inc/TransGradientStyle.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: TransGradientStyle.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_TRANSGRADIENTSTYLE_HXX
+#define _XMLOFF_TRANSGRADIENTSTYLE_HXX
+
+#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+
+class SvXMLNamespaceMap;
+class SvXMLAttributeList;
+class SvXMLUnitConverter;
+
+class XMLTransGradientStyle
+{
+public:
+ XMLTransGradientStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & _rHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter );
+ ~XMLTransGradientStyle();
+
+ sal_Bool exportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool importXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler;
+ const SvXMLNamespaceMap& mrNamespaceMap;
+ const SvXMLUnitConverter& rUnitConverter;
+
+ SvXMLAttributeList *pAttrList;
+
+ sal_Bool ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName );
+
+ void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue );
+
+};
+
+#endif // _XMLOFF_TRANSGRADIENTSTYLE_HXX
diff --git a/xmloff/inc/XMLChartPropertySetMapper.hxx b/xmloff/inc/XMLChartPropertySetMapper.hxx
new file mode 100644
index 0000000000..e821a1b565
--- /dev/null
+++ b/xmloff/inc/XMLChartPropertySetMapper.hxx
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLChartPropertySetMapper.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
+#define _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
+
+#ifndef _UNIVERSALL_REFERENCE_HXX
+#include "uniref.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
+#include "xmlprmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXPPR_HXX
+#include "xmlexppr.hxx"
+#endif
+#ifndef _XMLOFF_XMLIMPPR_HXX
+#include "xmlimppr.hxx"
+#endif
+
+namespace rtl { class OUString; }
+
+extern const XMLPropertyMapEntry aXMLChartPropMap[];
+
+
+// ----------------------------------------
+
+class XMLChartPropHdlFactory : public XMLPropertyHandlerFactory
+{
+private:
+ const XMLPropertyHandler* GetShapePropertyHandler( sal_Int32 nType ) const;
+
+public:
+ virtual ~XMLChartPropHdlFactory();
+ virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const;
+};
+
+// ----------------------------------------
+
+class XMLChartPropertySetMapper : public XMLPropertySetMapper
+{
+protected:
+ virtual void ContextFilter(
+ ::std::vector< XMLPropertyState >& rProperties,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > rPropSet ) const;
+
+public:
+ XMLChartPropertySetMapper();
+ ~XMLChartPropertySetMapper();
+};
+
+// ----------------------------------------
+
+class XMLChartExportPropertyMapper : public SvXMLExportPropertyMapper
+{
+private:
+ const rtl::OUString msCDATA;
+ const rtl::OUString msTrue;
+ const rtl::OUString msFalse;
+
+ /// this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
+ virtual void handleElementItem(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const XMLPropertyState& rProperty, const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap, sal_uInt16 nFlags ) const;
+
+ /// this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set
+ virtual void handleSpecialItem(
+ SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap ) const;
+
+public:
+ XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper );
+ virtual ~XMLChartExportPropertyMapper();
+};
+
+// ----------------------------------------
+
+class XMLChartImportPropertyMapper : public SvXMLImportPropertyMapper
+{
+private:
+public:
+ XMLChartImportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper );
+ virtual ~XMLChartImportPropertyMapper();
+
+ virtual sal_Bool handleSpecialItem(
+ XMLPropertyState& rProperty,
+ ::std::vector< XMLPropertyState >& rProperties,
+ const ::rtl::OUString& rValue,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const;
+
+ virtual void finished(
+ ::std::vector< XMLPropertyState >& rProperties ) const;
+};
+
+#endif // _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
diff --git a/xmloff/inc/XMLChartStyleContext.hxx b/xmloff/inc/XMLChartStyleContext.hxx
new file mode 100644
index 0000000000..aab41da101
--- /dev/null
+++ b/xmloff/inc/XMLChartStyleContext.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLChartStyleContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLCHARTSTYLECONTEXT_HXX_
+#define _XMLOFF_XMLCHARTSTYLECONTEXT_HXX_
+
+#ifndef _XMLOFF_PRSTYLEI_HXX_
+#include "prstylei.hxx"
+#endif
+
+class XMLChartStyleContext : public XMLPropStyleContext
+{
+private:
+public:
+
+ TYPEINFO();
+
+ XMLChartStyleContext( SvXMLImport& rImport, sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLName,
+ const com::sun::star::uno::Reference<
+ com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ SvXMLStylesContext& rStyles );
+ virtual ~XMLChartStyleContext();
+
+ virtual SvXMLImportContext* CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference<
+ com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void CreateAndInsert( sal_Bool bOverwrite );
+ virtual void Finish( sal_Bool bOverwrite );
+};
+
+#endif // _XMLOFF_XMLCHARTSTYLECONTEXT_HXX_
diff --git a/xmloff/inc/XMLClipPropertyHandler.hxx b/xmloff/inc/XMLClipPropertyHandler.hxx
new file mode 100644
index 0000000000..abf8771916
--- /dev/null
+++ b/xmloff/inc/XMLClipPropertyHandler.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLClipPropertyHandler.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLCLIPPROPERTYHANDLER_HXX
+#define _XMLOFF_XMLCLIPPROPERTYHANDLER_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLClipPropertyHandler : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLClipPropertyHandler();
+
+ virtual sal_Bool equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const;
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
diff --git a/xmloff/inc/XMLElementPropertyContext.hxx b/xmloff/inc/XMLElementPropertyContext.hxx
new file mode 100644
index 0000000000..2a64f0ce3c
--- /dev/null
+++ b/xmloff/inc/XMLElementPropertyContext.hxx
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLElementPropertyContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLELEMENTPROPERTYCONTEXT_HXX
+#define _XMLOFF_XMLELEMENTPROPERTYCONTEXT_HXX
+
+#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
+#include "xmlprmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+class SvXMLImport;
+
+namespace rtl
+{
+ class OUString;
+}
+
+class XMLElementPropertyContext : public SvXMLImportContext
+{
+ sal_Bool bInsert;
+
+protected:
+
+ ::std::vector< XMLPropertyState > &rProperties;
+ XMLPropertyState aProp;
+
+ sal_Bool IsInsert() const { return bInsert; }
+ void SetInsert( sal_Bool bIns ) { bInsert = bIns; }
+
+public:
+ TYPEINFO();
+
+ XMLElementPropertyContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const XMLPropertyState& rProp,
+ ::std::vector< XMLPropertyState > &rProps );
+
+ virtual ~XMLElementPropertyContext();
+
+ virtual void EndElement();
+};
+
+
+#endif // _XMLOFF_ELEMENTPROPERTYCONTEXT_HXX
+
diff --git a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx
new file mode 100644
index 0000000000..312d5c3ab1
--- /dev/null
+++ b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLFootnoteConfigurationImportContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLFOOTNOTECONFIGURATIONIMPORTCONTEXT_HXX
+#define _XMLOFF_XMLFOOTNOTECONFIGURATIONIMPORTCONTEXT_HXX
+
+#ifndef _XMLOFF_XMLSTYLE_HXX
+#include "xmlstyle.hxx"
+#endif
+
+namespace com { namespace sun { namespace star {
+ namespace uno { template<class X> class Reference; }
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace beans { class XPropertySet; }
+} } }
+namespace rtl { class OUString; }
+class SvXMLImport;
+
+/// import footnote and endnote configuration elements
+class XMLFootnoteConfigurationImportContext : public SvXMLStyleContext
+{
+ const ::rtl::OUString sPropertyCharStyleName;
+ const ::rtl::OUString sPropertyNumberingType;
+ const ::rtl::OUString sPropertyPageStyleName;
+ const ::rtl::OUString sPropertyParagraphStyleName;
+ const ::rtl::OUString sPropertyPrefix;
+ const ::rtl::OUString sPropertyStartAt;
+ const ::rtl::OUString sPropertySuffix;
+ const ::rtl::OUString sPropertyPositionEndOfDoc;
+ const ::rtl::OUString sPropertyFootnoteCounting;
+ const ::rtl::OUString sPropertyEndNotice;
+ const ::rtl::OUString sPropertyBeginNotice;
+
+ ::rtl::OUString sCitationStyle;
+ ::rtl::OUString sAnchorStyle;
+ ::rtl::OUString sDefaultStyle;
+ ::rtl::OUString sPageStyle;
+ ::rtl::OUString sPrefix;
+ ::rtl::OUString sSuffix;
+ ::rtl::OUString sNumFormat;
+ ::rtl::OUString sNumSync;
+ ::rtl::OUString sBeginNotice;
+ ::rtl::OUString sEndNotice;
+
+ SvXMLTokenMap* pAttrTokenMap;
+
+ sal_Int16 nOffset;
+ sal_Int16 nNumbering;
+ sal_Bool bPosition;
+ sal_Bool bIsEndnote;
+
+public:
+
+ TYPEINFO();
+
+ XMLFootnoteConfigurationImportContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList,
+ sal_Bool bEndnote);
+
+ /// parse attributes
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+
+ /// for footnotes, also parse begin and end notices
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+
+ /// get token map for attributes
+ const SvXMLTokenMap& GetFtnConfigAttrTokenMap();
+
+ /// set configuration at document; calls ProcessSettings
+ /// Uses CreateAndInsertLate() to ensure that all styles it references
+ /// have been set.
+ virtual void XMLFootnoteConfigurationImportContext::CreateAndInsertLate(
+ sal_Bool bOverwrite );
+
+ /// set configuration at document
+ void ProcessSettings(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rConfig);
+
+ /// for helper class: set begin notice
+ void SetBeginNotice( ::rtl::OUString sText);
+
+ /// for helper class: set end notice
+ void SetEndNotice( ::rtl::OUString sText);
+};
+
+#endif
diff --git a/xmloff/inc/XMLTextListAutoStylePool.hxx b/xmloff/inc/XMLTextListAutoStylePool.hxx
new file mode 100644
index 0000000000..dfa9c94e8f
--- /dev/null
+++ b/xmloff/inc/XMLTextListAutoStylePool.hxx
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextListAutoStylePool.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX
+#define _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX
+
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
+#include <com/sun/star/uno/Reference.hxx>
+#endif
+
+namespace com { namespace sun { namespace star { namespace container {
+ class XIndexReplace; } } } }
+namespace rtl { class OUString; }
+
+
+class XMLTextListAutoStylePool_Impl;
+class XMLTextListAutoStylePoolNames_Impl;
+class SvXMLExport;
+
+class XMLTextListAutoStylePool
+{
+ SvXMLExport& rExport;
+
+ const ::rtl::OUString sPrefix;
+
+ XMLTextListAutoStylePool_Impl *pPool;
+ XMLTextListAutoStylePoolNames_Impl *pNames;
+ sal_uInt32 nName;
+
+public:
+
+ XMLTextListAutoStylePool( SvXMLExport& rExport );
+ ~XMLTextListAutoStylePool();
+
+ void RegisterName( const ::rtl::OUString& rName );
+ sal_Bool HasName( const ::rtl::OUString& rName ) const;
+
+ ::rtl::OUString Add(
+ const ::rtl::OUString& rInternalName,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XIndexReplace > & rNumRule );
+
+ ::rtl::OUString Find(
+ const ::rtl::OUString& rInternalName ) const;
+
+ void exportXML() const;
+};
+
+
+#endif // _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX
diff --git a/xmloff/inc/i18nmap.hxx b/xmloff/inc/i18nmap.hxx
new file mode 100644
index 0000000000..40e4f7d724
--- /dev/null
+++ b/xmloff/inc/i18nmap.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * $RCSfile: i18nmap.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_I18NMAP_HXX
+#define _XMLOFF_I18NMAP_HXX
+
+#ifndef _SOLAR_H //autogen wg. USHORT
+#include <tools/solar.h>
+#endif
+
+#ifndef _RTL_MACROS_HXX_
+#include <rtl/macros.hxx>
+#endif
+
+namespace rtl
+{
+ class OUString;
+}
+
+class SvI18NMap_Impl;
+class SvI18NMapEntry_Impl;
+
+class SvI18NMap
+{
+ SvI18NMap_Impl *pImpl;
+
+ SvI18NMapEntry_Impl *_Find( USHORT nKind,
+ const ::rtl::OUString& rName ) const;
+
+public:
+
+ SvI18NMap();
+ ~SvI18NMap();
+
+ // Add a name mapping
+ void Add( USHORT nKind, const ::rtl::OUString& rName,
+ const ::rtl::OUString& rNewName );
+
+ // Return a mapped name. If the name could not be found, return the
+ // original name.
+ const ::rtl::OUString& Get( USHORT nKind,
+ const ::rtl::OUString& rName ) const;
+};
+
+
+#endif // _XMLOFF_I18NMAP_HXX
+
diff --git a/xmloff/inc/numehelp.hxx b/xmloff/inc/numehelp.hxx
new file mode 100644
index 0000000000..9ccd41a76b
--- /dev/null
+++ b/xmloff/inc/numehelp.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: numehelp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 XMLOFF_NUMEHELP_HXX
+#define XMLOFF_NUMEHELP_HXX
+
+#ifndef _SAL_TYPES_H_
+#include <sal/types.h>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#endif
+
+class SvXMLExport;
+namespace rtl
+{
+ class OUString;
+}
+
+class XMLNumberFormatAttributesExportHelper
+{
+public :
+ static sal_Bool GetCurrencySymbol(const sal_Int32 nNumberFormat, rtl::OUString& sCurrencySymbol,
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > & xNumberFormatsSupplier);
+ static sal_Int16 GetCellType(const sal_Int32 nNumberFormat, sal_Bool& bIsStandard,
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > & xNumberFormatsSupplier);
+ static void SetNumberFormatAttributes(SvXMLExport& rXMLExport,
+ const sal_Int32 nNumberFormat,
+ const double& fValue,
+ sal_uInt16 nNamespace,
+ sal_Bool bExportValue = sal_True);
+ static void SetNumberFormatAttributes(SvXMLExport& rXMLExport,
+ const rtl::OUString& sValue,
+ const rtl::OUString& sCharacters,
+ sal_uInt16 nNamespace,
+ sal_Bool bExportValue = sal_True);
+};
+
+#endif
+
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
new file mode 100644
index 0000000000..14244f1530
--- /dev/null
+++ b/xmloff/inc/txtflde.hxx
@@ -0,0 +1,415 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtflde.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+/** @#file
+ * XML export of all text fields
+ */
+
+#ifndef _XMLOFF_TXTFLDE_HXX
+#define _XMLOFF_TXTFLDE_HXX
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+
+#ifndef _RTL_USTRING
+#include <rtl/ustring>
+#endif
+
+class SvXMLExport;
+class SvXMLNumFmtExport;
+
+/// field IDs,
+// including translation between UNO speak and XML speak if appropriate
+
+enum FieldIdEnum {
+ FIELD_ID_SENDER, // sender == extended user
+ FIELD_ID_AUTHOR,
+ FIELD_ID_DATE, // current date
+ FIELD_ID_TIME, // current time (+date)
+ FIELD_ID_PAGENUMBER, // page number
+ FIELD_ID_PAGESTRING, // page contination string (page number string)
+ FIELD_ID_REFPAGE_SET, // set reference page
+ FIELD_ID_REFPAGE_GET, // get reference page number
+
+ FIELD_ID_PLACEHOLDER, // placeholder field == jump edit field
+
+ FIELD_ID_VARIABLE_DECL, // field type for set variable
+ FIELD_ID_VARIABLE_GET, // get variable == get expression
+ FIELD_ID_VARIABLE_SET, // set variable == set expression
+ FIELD_ID_VARIABLE_INPUT, // input field (variable)
+ FIELD_ID_USER_DECL, // field type for user field
+ FIELD_ID_USER_GET, // user field
+ FIELD_ID_USER_INPUT, // input field (user field)
+ FIELD_ID_TEXT_INPUT, // input field (text)
+ FIELD_ID_EXPRESSION, // expression field = formula field
+ FIELD_ID_SEQUENCE_DECL, // field type for sequence
+ FIELD_ID_SEQUENCE, // sequence field
+
+ FIELD_ID_DATABASE_NEXT, // select next row
+ FIELD_ID_DATABASE_SELECT, // select row # (NumSet)
+ FIELD_ID_DATABASE_DISPLAY, // display data (form letter field)
+ FIELD_ID_DATABASE_NAME, // display current db name (database name)
+ FIELD_ID_DATABASE_NUMBER, // display row # (SetNumber)
+
+ FIELD_ID_DOCINFO_CREATION_AUTHOR, // docinfo fields
+ FIELD_ID_DOCINFO_CREATION_TIME,
+ FIELD_ID_DOCINFO_CREATION_DATE,
+ FIELD_ID_DOCINFO_DESCRIPTION,
+ FIELD_ID_DOCINFO_INFORMATION0, // ATTENTION: INFO-fields must be numbered
+ FIELD_ID_DOCINFO_INFORMATION1, // consecutively (to find out
+ FIELD_ID_DOCINFO_INFORMATION2, // number)
+ FIELD_ID_DOCINFO_INFORMATION3,
+ FIELD_ID_DOCINFO_PRINT_TIME,
+ FIELD_ID_DOCINFO_PRINT_DATE,
+ FIELD_ID_DOCINFO_PRINT_AUTHOR,
+ FIELD_ID_DOCINFO_TITLE,
+ FIELD_ID_DOCINFO_SUBJECT,
+ FIELD_ID_DOCINFO_KEYWORDS,
+ FIELD_ID_DOCINFO_REVISION,
+ FIELD_ID_DOCINFO_EDIT_DURATION,
+ FIELD_ID_DOCINFO_SAVE_TIME,
+ FIELD_ID_DOCINFO_SAVE_DATE,
+ FIELD_ID_DOCINFO_SAVE_AUTHOR,
+
+ FIELD_ID_CONDITIONAL_TEXT, // conditionally choose between 2 texts
+ FIELD_ID_HIDDEN_TEXT, // conditionally hide a text
+ FIELD_ID_HIDDEN_PARAGRAPH, // conditionally hide a paragraph
+
+ FIELD_ID_TEMPLATE_NAME, // display name of template
+ FIELD_ID_CHAPTER, // display name/number of current chapter
+ FIELD_ID_FILE_NAME, // display name of current file
+
+ FIELD_ID_COUNT_PARAGRAPHS, // statistics fields: - paragraphs
+ FIELD_ID_COUNT_WORDS, // - words
+ FIELD_ID_COUNT_CHARACTERS, // - chars
+ FIELD_ID_COUNT_PAGES, // - pages
+ FIELD_ID_COUNT_TABLES, // - tables
+ FIELD_ID_COUNT_GRAPHICS, // - graphics
+ FIELD_ID_COUNT_OBJECTS, // - objects
+
+ FIELD_ID_MACRO, // macro fields
+ FIELD_ID_REF_REFERENCE, // get reference field (reference)
+ FIELD_ID_REF_SEQUENCE, // get reference field (sequence)
+ FIELD_ID_REF_BOOKMARK, // get reference field (bookmark)
+ FIELD_ID_REF_FOOTNOTE, // get reference field (footnote)
+ FIELD_ID_REF_ENDNOTE, // get reference field (endnote)
+ FIELD_ID_DDE, // DDE field
+
+ FIELD_ID_UNKNOWN // invalid or unknown field type!
+};
+
+namespace com { namespace sun { namespace star{
+ namespace text { class XTextField; }
+ namespace beans { class XPropertySet; }
+ namespace frame { class XModel; }
+} } }
+
+namespace rtl { class OUString; }
+
+
+
+class XMLTextFieldExport
+{
+ SvXMLExport& rExport;
+
+public:
+
+ XMLTextFieldExport( SvXMLExport& rExp );
+ virtual ~XMLTextFieldExport();
+
+ /// export this field. Assumes styles have been exported.
+ /// To be called for every field in the document body.
+ void ExportField(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextField > & rTextField );
+
+ /// export styles for this field (if appropriate).
+ /// (requires final call to SvXMLNumFmtExport)
+ /// to be called for every field during style export.
+ void ExportFieldAutoStyle(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextField > & rTextField );
+
+ /// export field declarations.
+ /// to be called once at beginning of document body.
+ void ExportFieldDeclarations();
+
+protected:
+
+ SvXMLExport& GetExport() { return rExport; }
+
+ /// export an empty element
+ void ExportElement(const sal_Char* pElementName, /// element name
+ sal_Bool bAddSpace = sal_False); /// add blanks around
+ /// element?
+
+ /// export an element with string content
+ void ExportElement(const sal_Char* pElementName, /// element name
+ const ::rtl::OUString& sContent, /// element content
+ sal_Bool bAddSpace = sal_False); /// add blanks around
+ /// element?
+
+
+
+ /// export a boolean attribute
+ void ProcessBoolean(
+ const sal_Char* pXmlName, /// attribute name (namespace text)
+ sal_Bool bBool, /// attribute value
+ sal_Bool bDefault); /// attribute default; omit, if attribute differs
+
+ /// export an integer attribute
+ void ProcessInteger(
+ const sal_Char* pXmlName, /// attribute name (namespace text)
+ sal_Int32 nNum); /// attribute value
+
+ /// export an integer attribute, omit if default
+ void ProcessInteger(
+ const sal_Char* pXmlName, /// attribute name (namespace text)
+ sal_Int32 nNum, /// attribute value
+ sal_Int32 nDefault); /// default value
+
+ /// export a string attribute
+ void ProcessString(
+ const sal_Char* pXmlName, /// attribute name (namespace text)
+ const ::rtl::OUString& sValue, /// attribute value
+ sal_Bool bOmitEmpty = sal_False); /// omit attribute, if value is empty
+
+ /// export a string attribute, omit if default
+ void ProcessString(
+ const sal_Char* pXmlName, /// attribute name (namespace text)
+ const ::rtl::OUString& sValue, /// attribute value
+ const ::rtl::OUString& sDefault);/// default value; omit if equal
+
+ /// export a string attribute
+ void ProcessString(
+ const sal_Char* pXmlName, /// attribute name (namespace text)
+ const sal_Char* pValue, /// attribute value
+ sal_Bool bOmitEmpty = sal_False); /// omit attribute, if value is empty
+
+ /// export a string attribute, omit if default
+ void ProcessString(
+ const sal_Char* pXmlName, /// attribute name (namespace text)
+ const sal_Char* pValue, /// attribute value
+ const sal_Char* pDefault); /// attribute default
+
+ /// export a numbering format (numeric, roman, alphabetic, etc.)
+ void ProcessNumberingType(
+ sal_Int16 nNumberingType); /// numbering type key
+
+ /// export display attribute (value, formula, none)
+ void ProcessDisplay(sal_Bool bIsVisible, /// is visible?
+ sal_Bool bIsCommand, /// is show command/show name?
+ sal_Bool bDefault = sal_True); /// omit, if default
+
+ /// export all data-style related attributes
+ void ProcessValueAndType(
+ sal_Bool bIsString, /// do we process a string or a number?
+ sal_Int32 nFormatKey, /// format key for NumberFormatter; possibly -1
+ const ::rtl::OUString& sContent, /// string content; possibly invalid
+ const ::rtl::OUString& sDefault, /// default string
+ double fValue, /// float content; possibly invalid
+ sal_Bool bExportValue, /// export value attribute?
+ sal_Bool bExportValueType, /// export value-type attribute?
+ sal_Bool bExportStyle); /// export style-sttribute?
+
+ /// export times, dates and durations according to ISO 8601
+ void ProcessDateTime(
+ const sal_Char* sXMLName, /// name of attribute
+ double dValue, /// date/time value
+ sal_Bool bIsDate, /// export as date (rather than date/time)?
+ sal_Bool bIsDuration = sal_False, /// export as duration
+ sal_Bool bOmitDurationIfZero = sal_True); /// omit zero-length durat.
+
+ /// export a date, time, or duration
+ void ProcessDateTime(
+ const sal_Char* sXMLName, /// name of attribute
+ sal_Int32 nMinutes, /// date/time value in minutes
+ sal_Bool bIsDate, /// export as date?
+ sal_Bool bIsDuration, /// export as duration?
+ sal_Bool bOmitDurationIfZero); /// omit zero-length durations
+
+ /// for XDependentTextFields, get PropertySet of FieldMaster
+ ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >
+ GetMasterPropertySet(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextField > & rTextField);
+
+// /// get PropertySet of (any) DependentTextField for this FieldMaster
+// ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >
+// GetDependentFieldPropertySet(const ::rtl::OUString& sFieldMasterName,
+// const ::com::sun::star::uno::Reference<
+// ::com::sun::star::frame::XModel> & rModel);
+
+ /// get PropertySet of (any) DependentTextField for this FieldMaster
+ // (real version)
+ sal_Bool GetDependentFieldPropertySet(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xmaster,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xField);
+
+
+ // determine element name from field properties
+ const sal_Char* MapAuthorFieldName(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & xPropSet);
+ const sal_Char* MapSenderFieldName(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & xPropSet);
+ const sal_Char* MapPlaceholderType(sal_uInt16 nType);
+ const sal_Char* MapTemplateDisplayFormat(sal_Int16 nType);
+ const sal_Char* MapChapterDisplayFormat(sal_Int16 nType);
+ const sal_Char* MapFilenameDisplayFormat(sal_Int16 nType);
+ const sal_Char* MapDocInfoFieldName(enum FieldIdEnum nToken);
+ const sal_Char* MapReferenceSource(sal_Int16 nType);
+ const sal_Char* MapReferenceType(sal_Int16 nType);
+ const sal_Char* MapPageNumberName(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropSet,
+ sal_Int32& nOffset); /// also adjust page offset
+ const sal_Char* MapCountFieldName(sal_Int16 nToken);
+
+ /// get field ID from XTextField (and it's Property-Set)
+ enum FieldIdEnum GetFieldID(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextField > & rTextField,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & xPropSet);
+
+ /// get field ID from XTextField service name (and it's PropertySet)
+ enum FieldIdEnum MapFieldName(const ::rtl::OUString& sFieldName,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet> & xPropSet);
+
+ /// determine, whether field has string or numeric content
+ sal_Bool IsStringField(sal_uInt16 nFieldType, /// field ID
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & xPropSet);
+
+
+ /// explode a field master name into field type and field name
+ sal_Bool ExplodeFieldMasterName(
+ const ::rtl::OUString& sMasterName, /// name as returned by SO API
+ ::rtl::OUString& sFieldType, /// out: field type
+ ::rtl::OUString& sVarName); /// out: variable name
+
+private:
+ // constants
+
+ // service names
+ const ::rtl::OUString sServicePrefix;
+ const ::rtl::OUString sFieldMasterPrefix;
+
+ // property names
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyIsFixed;
+ const ::rtl::OUString sPropertyAuthorFullname;
+ const ::rtl::OUString sPropertyFieldSubType;
+ const ::rtl::OUString sPropertyHint;
+ const ::rtl::OUString sPropertyPlaceholder;
+ const ::rtl::OUString sPropertyPlaceholderType;
+ const ::rtl::OUString sPropertyIsVisible;
+ const ::rtl::OUString sPropertyIsShowFormula;
+ const ::rtl::OUString sPropertyIsInput;
+ const ::rtl::OUString sPropertyIsExpression;
+ const ::rtl::OUString sPropertyNumberFormat;
+ const ::rtl::OUString sPropertyVariableName;
+ const ::rtl::OUString sPropertySubType;
+ const ::rtl::OUString sPropertyName;
+ const ::rtl::OUString sPropertyVariableSubType;
+ const ::rtl::OUString sPropertyValue;
+ const ::rtl::OUString sPropertyChapterNumberingLevel;
+ const ::rtl::OUString sPropertyNumberingSeparator;
+ const ::rtl::OUString sPropertyNumberingType;
+ const ::rtl::OUString sPropertyDataBaseName;
+ const ::rtl::OUString sPropertyDataTableName;
+ const ::rtl::OUString sPropertyDateTimeValue;
+ const ::rtl::OUString sPropertyDataColumnName;
+ const ::rtl::OUString sPropertySetNumber;
+ const ::rtl::OUString sPropertyIsDataBaseFormat;
+ const ::rtl::OUString sPropertyUserText;
+ const ::rtl::OUString sPropertyOffset;
+ const ::rtl::OUString sPropertyCondition;
+ const ::rtl::OUString sPropertyDateTime;
+ const ::rtl::OUString sPropertyTrueContent;
+ const ::rtl::OUString sPropertyFalseContent;
+ const ::rtl::OUString sPropertyRevision;
+ const ::rtl::OUString sPropertyChapterFormat;
+ const ::rtl::OUString sPropertyFileFormat;
+ const ::rtl::OUString sPropertyLevel;
+ const ::rtl::OUString sPropertyIsDate;
+ const ::rtl::OUString sPropertyAdjust;
+ const ::rtl::OUString sPropertyOn;
+ const ::rtl::OUString sPropertyMacro;
+ const ::rtl::OUString sPropertyReferenceFieldPart;
+ const ::rtl::OUString sPropertyReferenceFieldType;
+ const ::rtl::OUString sPropertyReferenceFieldSource;
+ const ::rtl::OUString sPropertySequenceNumber;
+ const ::rtl::OUString sPropertySourceName;
+ const ::rtl::OUString sPropertyIsAutomaticUpdate;
+ const ::rtl::OUString sPropertyDependentTextFields;
+ const ::rtl::OUString sPropertyDDECommandType;
+ const ::rtl::OUString sPropertyDDECommandFile;
+ const ::rtl::OUString sPropertyDDECommandElement;
+
+ const ::rtl::OUString sEmpty;
+};
+
+
+
+
+
+
+#endif
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
new file mode 100644
index 0000000000..0b67256f62
--- /dev/null
+++ b/xmloff/inc/txtfldi.hxx
@@ -0,0 +1,1212 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtfldi.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+/** @#file
+ *
+ * import of all text fields
+ * (except variable related + database display field: see txtvfldi.hxx)
+ */
+
+#ifndef _XMLOFF_TXTFLDI_HXX
+#define _XMLOFF_TXTFLDI_HXX
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_PAGENUMBERTYPE_HPP_
+#include <com/sun/star/text/PageNumberType.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+#ifndef _XMLOFF_TEXTIMP_HXX_
+#include "txtimp.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+
+
+namespace com { namespace sun { namespace star {
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace text { class XTextField; }
+ namespace beans { class XPropertySet; }
+} } }
+
+namespace rtl
+{
+ class OUString;
+}
+
+
+class SvXMLImport;
+class XMLTextImportHelper;
+class SvXMLTokenMap;
+
+
+
+
+enum XMLTextFieldAttrTokens
+{
+ XML_TOK_TEXTFIELD_FIXED = 0,
+ XML_TOK_TEXTFIELD_DESCRIPTION,
+ XML_TOK_TEXTFIELD_PLACEHOLDER_TYPE,
+ XML_TOK_TEXTFIELD_TIME_ADJUST,
+ XML_TOK_TEXTFIELD_DATE_ADJUST,
+ XML_TOK_TEXTFIELD_PAGE_ADJUST,
+ XML_TOK_TEXTFIELD_SELECT_PAGE,
+ XML_TOK_TEXTFIELD_ACTIVE,
+
+ XML_TOK_TEXTFIELD_NAME,
+ XML_TOK_TEXTFIELD_FORMULA,
+ XML_TOK_TEXTFIELD_NUM_FORMAT,
+ XML_TOK_TEXTFIELD_NUM_LETTER_SYNC,
+ XML_TOK_TEXTFIELD_DISPLAY_FORMULA,
+ XML_TOK_TEXTFIELD_NUMBERING_LEVEL,
+ XML_TOK_TEXTFIELD_NUMBERING_SEPARATOR,
+ XML_TOK_TEXTFIELD_DISPLAY,
+ XML_TOK_TEXTFIELD_OUTLINE_LEVEL,
+
+ XML_TOK_TEXTFIELD_VALUE_TYPE,
+ XML_TOK_TEXTFIELD_VALUE,
+ XML_TOK_TEXTFIELD_STRING_VALUE,
+ XML_TOK_TEXTFIELD_DATE_VALUE,
+ XML_TOK_TEXTFIELD_TIME_VALUE,
+ XML_TOK_TEXTFIELD_BOOL_VALUE,
+ XML_TOK_TEXTFIELD_CURRENCY,
+ XML_TOK_TEXTFIELD_DATA_STYLE_NAME,
+
+ XML_TOK_TEXTFIELD_DATABASE_NAME,
+ XML_TOK_TEXTFIELD_TABLE_NAME,
+ XML_TOK_TEXTFIELD_COLUMN_NAME,
+ XML_TOK_TEXTFIELD_ROW_NUMBER,
+ XML_TOK_TEXTFIELD_CONDITION,
+ XML_TOK_TEXTFIELD_STRING_VALUE_IF_TRUE,
+ XML_TOK_TEXTFIELD_STRING_VALUE_IF_FALSE,
+ XML_TOK_TEXTFIELD_REVISION,
+
+ XML_TOK_TEXTFIELD_REFERENCE_TYPE,
+
+ XML_TOK_TEXTFIELD_UNKNOWN
+};
+
+
+
+
+
+/// abstract class for text field import
+class XMLTextFieldImportContext : public SvXMLImportContext
+{
+ const ::rtl::OUString sServicePrefix;
+
+ // data members
+ ::rtl::OUStringBuffer sContentBuffer; /// collect character data
+ ::rtl::OUString sContent; /// character data after collection
+ ::rtl::OUString sServiceName; /// service name for text field
+ XMLTextImportHelper& rTextImportHelper; /// the import helper
+
+protected:
+
+ // data members for use in subclasses
+ sal_Bool bValid; /// ist dieses Feld gültig?
+
+public:
+
+ TYPEINFO();
+
+ XMLTextFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ const sal_Char* pService, /// name of SO API service
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+ virtual ~XMLTextFieldImportContext();
+
+ /// process character data: will be collected in member sContentBuffer
+ virtual void Characters( const ::rtl::OUString& sContent );
+
+ /// parses attributes and calls ProcessAttribute
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ /// create XTextField and insert into document; calls PrepareTextField
+ virtual void EndElement();
+
+ /// create the appropriate field context from
+ /// (for use in paragraph import)
+ static XMLTextFieldImportContext* CreateTextFieldImportContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rName,
+ sal_uInt16 nToken);
+
+
+protected:
+
+ /// get helper
+ inline XMLTextImportHelper& GetImportHelper() { return rTextImportHelper; }
+
+ inline ::rtl::OUString GetServiceName() { return sServiceName; }
+ inline void SetServiceName(::rtl::OUString sStr) { sServiceName = sStr; }
+
+ ::rtl::OUString GetContent();
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue ) = 0;
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet) = 0;
+
+ /// create field from ServiceName
+ sal_Bool CreateField(::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xField,
+ const ::rtl::OUString& sServiceName);
+};
+
+
+
+class XMLSenderFieldImportContext : public XMLTextFieldImportContext
+{
+
+ sal_Int16 nSubType; /// API subtype for ExtUser field
+
+ const ::rtl::OUString sEmpty; /// empty string
+ const ::rtl::OUString sPropertyFixed;
+ const ::rtl::OUString sPropertyFieldSubType;
+ const ::rtl::OUString sPropertyContent;
+
+protected:
+
+ // variables for access in subclass
+ sal_Bool bFixed;
+ sal_uInt16 nElementToken; /// token for this elment field
+
+public:
+
+ TYPEINFO();
+
+ XMLSenderFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName, /// element name w/o prefix
+ sal_uInt16 nToken); /// element token
+
+protected:
+
+ /// start element
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** inherit sender field because of fixed attribute in ProcessAttributes */
+class XMLAuthorFieldImportContext : public XMLSenderFieldImportContext
+{
+
+ sal_Bool bAuthorFullName;
+ const ::rtl::OUString sServiceAuthor;
+ const ::rtl::OUString sPropertyAuthorFullName;
+ const ::rtl::OUString sPropertyFixed;
+ const ::rtl::OUString sPropertyContent;
+
+public:
+
+ TYPEINFO();
+
+ XMLAuthorFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName, /// element name w/o prefix
+ sal_uInt16 nToken); /// element token
+
+protected:
+
+ /// start element
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+class XMLPlaceholderFieldImportContext : public XMLTextFieldImportContext
+{
+
+ const ::rtl::OUString sEmpty; /// empty string
+ const ::rtl::OUString sServiceJumpEdit;
+ const ::rtl::OUString sPropertyPlaceholderType;
+ const ::rtl::OUString sPropertyPlaceholder;
+ const ::rtl::OUString sPropertyHint;
+
+ ::rtl::OUString sDescription;
+
+ sal_Int16 nPlaceholderType;
+
+public:
+
+ TYPEINFO();
+
+ XMLPlaceholderFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+class XMLTimeFieldImportContext : public XMLTextFieldImportContext
+{
+
+protected:
+ const ::rtl::OUString sPropertyNumberFormat;
+ const ::rtl::OUString sPropertyFixed;
+ const ::rtl::OUString sPropertyDateTimeValue;
+ const ::rtl::OUString sPropertyAdjust;
+ const ::rtl::OUString sPropertyIsDate;
+
+ double fTimeValue;
+ sal_Int32 nAdjust;
+ sal_Int32 nFormatKey;
+ sal_Bool bTimeOK;
+ sal_Bool bFormatOK;
+ sal_Bool bFixed;
+ sal_Bool bIsDate; // is this a date?
+ // (for XMLDateFieldImportContext, really)
+
+public:
+
+ TYPEINFO();
+
+ XMLTimeFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import date fields (<text:date>);
+ inherit from TimeField to reuse implementation */
+class XMLDateFieldImportContext : public XMLTimeFieldImportContext
+{
+
+public:
+
+ TYPEINFO();
+
+ XMLDateFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+};
+
+
+/** import page continuation fields (<text:page-continuation-string>) */
+class XMLPageContinuationImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+ const ::rtl::OUString sPropertyUserText;
+ const ::rtl::OUString sPropertyNumberingType;
+
+ ::rtl::OUString sString; /// continuation string
+ com::sun::star::text::PageNumberType eSelectPage; /// previous, current
+ /// or next page
+ sal_Bool sStringOK; /// continuation string encountered?
+
+public:
+
+ TYPEINFO();
+
+ XMLPageContinuationImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import page number fields (<text:page-number>) */
+class XMLPageNumberImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+ const ::rtl::OUString sPropertyNumberingType;
+ const ::rtl::OUString sPropertyOffset;
+
+ ::rtl::OUString sNumberFormat;
+ ::rtl::OUString sNumberSync;
+ sal_Int16 nPageAdjust;
+ com::sun::star::text::PageNumberType eSelectPage; /// previous, current
+ /// or next page
+ sal_Bool sNumberFormatOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLPageNumberImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** superclass for database fields: handle database and table names */
+class XMLDatabaseFieldImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyDatabaseName;
+ const ::rtl::OUString sPropertyTableName;
+
+ ::rtl::OUString sDatabaseName;
+ ::rtl::OUString sTableName;
+
+protected:
+ sal_Bool bDatabaseOK;
+ sal_Bool bTableOK;
+
+ /// protected constructor: only for subclasses
+ XMLDatabaseFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ const sal_Char* pServiceName,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+public:
+
+TYPEINFO();
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+/** import database name fields (<text:database-name>) */
+class XMLDatabaseNameImportContext : public XMLDatabaseFieldImportContext
+{
+public:
+
+ TYPEINFO();
+
+ XMLDatabaseNameImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+};
+
+
+/** import database next fields (<text:database-next>) */
+class XMLDatabaseNextImportContext : public XMLDatabaseFieldImportContext
+{
+ const ::rtl::OUString sPropertyCondition;
+ const ::rtl::OUString sTrue;
+ ::rtl::OUString sCondition;
+ sal_Bool bConditionOK;
+
+protected:
+
+ // for use in child classes
+ XMLDatabaseNextImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ const sal_Char* pServiceName,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+public:
+
+ TYPEINFO();
+
+ XMLDatabaseNextImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import database select fields (<text:database-select>) */
+class XMLDatabaseSelectImportContext : public XMLDatabaseNextImportContext
+{
+ const ::rtl::OUString sPropertySetNumber;
+ sal_Int32 nNumber;
+ sal_Bool bNumberOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLDatabaseSelectImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import database display number fields (<text:database-row-number>) */
+class XMLDatabaseNumberImportContext : public XMLDatabaseFieldImportContext
+{
+ const ::rtl::OUString sPropertyNumberingType;
+ const ::rtl::OUString sPropertySetNumber;
+ ::rtl::OUString sNumberFormat;
+ ::rtl::OUString sNumberSync;
+ sal_Int32 nValue;
+ sal_Bool bValueOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLDatabaseNumberImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import docinfo fields with only fixed atribute */
+class XMLSimpleDocInfoImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyFixed;
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+protected:
+ sal_Bool bFixed;
+
+public:
+
+ TYPEINFO();
+
+ XMLSimpleDocInfoImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ sal_uInt16 nToken);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ static const sal_Char* MapTokenToServiceName(sal_uInt16 nToken);
+};
+
+
+
+/** import docinfo fields with date or time attributes and numberformats */
+class XMLDateTimeDocInfoImportContext : public XMLSimpleDocInfoImportContext
+{
+ const ::rtl::OUString sPropertyNumberFormat;
+ const ::rtl::OUString sPropertyIsDate;
+
+ sal_Int32 nFormat;
+ sal_Bool bFormatOK;
+ sal_Bool bIsDate;
+
+public:
+
+ TYPEINFO();
+
+ XMLDateTimeDocInfoImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ sal_uInt16 nToken);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import revision field (<text:editing-cycles>) */
+class XMLRevisionDocInfoImportContext : public XMLSimpleDocInfoImportContext
+{
+ const ::rtl::OUString sPropertyRevision;
+ sal_Int16 nRevision;
+ sal_Bool bRevisionOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLRevisionDocInfoImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ sal_uInt16 nToken);
+
+protected:
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import user docinfo field (<text:user-defined>) */
+class XMLUserDocInfoImportContext : public XMLSimpleDocInfoImportContext
+{
+public:
+
+ TYPEINFO();
+
+ XMLUserDocInfoImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ sal_uInt16 nToken);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+};
+
+
+
+/** import hidden paragraph fields (<text:hidden-paragraph>) */
+class XMLHiddenParagraphImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyCondition;
+
+ ::rtl::OUString sCondition;
+
+public:
+
+ TYPEINFO();
+
+ XMLHiddenParagraphImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import conditional text fields (<text:conditional-text>) */
+class XMLConditionalTextImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyCondition;
+ const ::rtl::OUString sPropertyTrueContent;
+ const ::rtl::OUString sPropertyFalseContent;
+
+ ::rtl::OUString sCondition;
+ ::rtl::OUString sTrueContent;
+ ::rtl::OUString sFalseContent;
+
+ sal_Bool bConditionOK;
+ sal_Bool bTrueOK;
+ sal_Bool bFalseOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLConditionalTextImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import conditional text fields (<text:hidden-text>) */
+class XMLHiddenTextImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyCondition;
+ const ::rtl::OUString sPropertyTrueContent;
+
+ ::rtl::OUString sCondition;
+ ::rtl::OUString sString;
+
+ sal_Bool bConditionOK;
+ sal_Bool bStringOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLHiddenTextImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import file name fields (<text:file-name>) */
+class XMLFileNameImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyFixed;
+ const ::rtl::OUString sPropertyFileFormat;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+ sal_Int16 nFormat;
+ sal_Bool bFixed;
+
+public:
+
+ TYPEINFO();
+
+ XMLFileNameImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import document template name fields (<text:template-name>) */
+class XMLTemplateNameImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyFileFormat;
+
+ sal_Int16 nFormat;
+
+public:
+
+ TYPEINFO();
+
+ XMLTemplateNameImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import chapter fields (<text:chapter>) */
+class XMLChapterImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyChapterFormat;
+ const ::rtl::OUString sPropertyLevel;
+
+ sal_Int16 nFormat;
+ sal_Int8 nLevel;
+
+public:
+
+ TYPEINFO();
+
+ XMLChapterImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import count fields (<text:[XXX]-count>) */
+class XMLCountFieldImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyNumberingType;
+
+ ::rtl::OUString sNumberFormat;
+ ::rtl::OUString sLetterSync;
+
+ sal_Bool bNumberFormatOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLCountFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ sal_uInt16 nToken);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ static const sal_Char* MapTokenToServiceName(sal_uInt16 nToken);
+};
+
+
+/** import page variable fields (<text:get-page-variable>) */
+class XMLPageVarGetFieldImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyNumberingType;
+
+ ::rtl::OUString sNumberFormat;
+ ::rtl::OUString sLetterSync;
+
+ sal_Bool bNumberFormatOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLPageVarGetFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import page variable fields (<text:get-page-variable>) */
+class XMLPageVarSetFieldImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyOn;
+ const ::rtl::OUString sPropertyOffset;
+
+ sal_Int16 nAdjust;
+ sal_Bool bActive;
+
+public:
+
+ TYPEINFO();
+
+ XMLPageVarSetFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import macro fields (<text:execute-macro>) */
+class XMLMacroFieldImportContext : public XMLTextFieldImportContext
+{
+
+ const ::rtl::OUString sPropertyHint;
+ const ::rtl::OUString sPropertyMacro;
+
+ ::rtl::OUString sMacro;
+ ::rtl::OUString sDescription;
+
+ sal_Bool bMacroOK;
+ sal_Bool bDescriptionOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLMacroFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import reference fields (<text:reference-get>) */
+class XMLReferenceFieldImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyReferenceFieldPart;
+ const ::rtl::OUString sPropertyReferenceFieldSource;
+ const ::rtl::OUString sPropertySourceName;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+ ::rtl::OUString sName;
+ sal_uInt16 nElementToken;
+ sal_Int16 nSource;
+ sal_Int16 nType;
+
+ sal_Bool bNameOK;
+ sal_Bool bTypeOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLReferenceFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nToken,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// start element
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import dde field declaration container (<text:dde-connection-decls>) */
+class XMLDdeFieldDeclsImportContext : public SvXMLImportContext
+{
+
+ SvXMLTokenMap aTokenMap;
+
+public:
+
+ TYPEINFO();
+
+ XMLDdeFieldDeclsImportContext(SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+
+
+};
+
+
+
+/** import dde field declaration (<text:dde-connection-decl>) */
+class XMLDdeFieldDeclImportContext : public SvXMLImportContext
+{
+
+ const ::rtl::OUString sPropertyDDECommand;
+ const ::rtl::OUString sPropertyIsAutomaticUpdate;
+ const ::rtl::OUString sPropertyName;
+
+ const SvXMLTokenMap& rTokenMap;
+
+public:
+
+ TYPEINFO();
+
+ XMLDdeFieldDeclImportContext(SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ const SvXMLTokenMap& rMap);
+
+ // create fieldmaster
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+};
+
+
+
+/** import dde fields (<text:dde-connection>) */
+class XMLDdeFieldImportContext : public XMLTextFieldImportContext
+{
+ ::rtl::OUString sName;
+
+public:
+
+ TYPEINFO();
+
+ XMLDdeFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// create textfield, attach master, and insert into document
+ virtual void EndElement();
+
+ /// empty method
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+};
+
+#endif
diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx
new file mode 100644
index 0000000000..c75bc5a335
--- /dev/null
+++ b/xmloff/inc/txtvfldi.hxx
@@ -0,0 +1,599 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtvfldi.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+/** @#file
+ *
+ * XML import of all variable related text fields plus database display field
+ */
+
+#ifndef _XMLOFF_TXTVFLDI_HXX
+#define _XMLOFF_TXTVFLDI_HXX
+
+#ifndef _XMLOFF_TXTVFLDI_HXX
+#include "txtvfldi.hxx"
+#endif
+
+#ifndef _XMLOFF_TXTFLDI_HXX
+#include "txtfldi.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#endif
+
+
+
+/// variable type (for XMLSetVarFieldImportContext)
+enum VarType
+{
+ VarTypeSimple,
+ VarTypeUserField,
+ VarTypeSequence
+};
+
+
+
+/** helper class: parses value-type and associated value attributes */
+class XMLValueImportHelper
+{
+
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyValue;
+ const ::rtl::OUString sPropertyFormula;
+ const ::rtl::OUString sPropertyNumberFormat;
+
+ SvXMLImport& rImport;
+ XMLTextImportHelper& rHelper;
+
+ ::rtl::OUString sValue; /// string value (only valid if bStringValueOK)
+ double fValue; /// double value (only valid if bFloatValueOK)
+ sal_Int32 nFormatKey; /// format key (only valid of bFormatOK)
+ ::rtl::OUString sFormula; /// formula string
+ ::rtl::OUString sDefault; /// default (see bStringDefault/bFormulaDef.)
+
+ sal_Bool bStringType; /// is this a string (or a float) type?
+ sal_Bool bFormatOK; /// have we read a style:data-style-name attr.?
+ sal_Bool bTypeOK; /// have we read a value-type attribute?
+ sal_Bool bStringValueOK; /// have we read a string-value attr.?
+ sal_Bool bFloatValueOK; /// have we read any of the float attr.s?
+ sal_Bool bFormulaOK; /// have we read the formula attribute?
+
+ const sal_Bool bSetType; /// should PrepareField set the SetExp subtype?
+ const sal_Bool bSetValue; /// should PrepareField set content/value?
+ const sal_Bool bSetStyle; /// should PrepareField set NumberFormat?
+ const sal_Bool bSetFormula; /// should PrepareField set Formula?
+
+ const sal_Bool bStringDefault; /// default: string-value = content
+ const sal_Bool bFormulaDefault; /// default: formula = content
+
+public:
+ XMLValueImportHelper(
+ SvXMLImport& rImprt, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ sal_Bool bType, /// process type (PrepareField)
+ sal_Bool bStyle, /// process data style (P.F.)
+ sal_Bool bValue, /// process value (Prep.Field)
+ sal_Bool bFormula); /// process formula (Prep.F.)
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ /// is value a string (rather than double)?
+ inline sal_Bool IsStringValue() { return bStringType; }
+
+ /// has format been read?
+ inline sal_Bool IsFormatOK() { return bFormatOK; }
+
+ inline void SetDefault(const ::rtl::OUString& sStr) { sDefault = sStr; }
+};
+
+
+
+/**
+ * abstract parent class for all variable related fields
+ * - variable-set/get/decl (not -decls),
+ * - user-field-get/decl (not -decls),
+ * - sequence/-decl (not -decls),
+ * - expression,
+ * - text-input
+ *
+ * Processes the following attributes:
+ * - name
+ * - formula
+ * - display
+ * - value, value-type, data-style-name (via XMLValueImportHelper)
+ * - description.
+ *
+ * Each attribute has a corresponding member, a bool variable to indicate
+ * whether it was set or not, and a bool variable whether it should be set
+ * using the standard property name.
+ *
+ * bValid is set true, when name is found!
+ * (Most variable related fields are valid, if a name is
+ * found. However, some are always valid. In this case, setting bValid
+ * does not matter.)
+ */
+class XMLVarFieldImportContext : public XMLTextFieldImportContext
+{
+protected:
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyHint;
+ const ::rtl::OUString sPropertyIsVisible;
+ const ::rtl::OUString sPropertyIsDisplayFormula;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+private:
+ ::rtl::OUString sName; /// name attribute
+ ::rtl::OUString sFormula; /// formula attribute
+ ::rtl::OUString sDescription; /// description
+ XMLValueImportHelper aValueHelper; /// value, value-type, and style
+ sal_Bool bDisplayFormula; /// display formula?(rather than value)
+ sal_Bool bDisplayNone; /// hide field?
+
+ sal_Bool bNameOK; /// sName was set
+ sal_Bool bFormulaOK; /// sFormula was set
+ sal_Bool bDescriptionOK; /// sDescription was set
+ sal_Bool bDisplayOK; /// sDisplayFormula/-None were set
+
+ sal_Bool bSetName; /// set sName with ???-property
+ sal_Bool bSetFormula; /// set Formula property
+ sal_Bool bSetFormulaDefault; /// use content as default for formula
+ sal_Bool bSetDescription; /// set sDescription with Hint-property
+ sal_Bool bSetVisible; /// set IsVisible
+ sal_Bool bSetDisplayFormula; /// set DisplayFormula (sub type???)
+ sal_Bool bSetPresentation; /// set presentation frm elem. content?
+
+public:
+
+ TYPEINFO();
+
+ XMLVarFieldImportContext(
+ // for XMLTextFieldImportContext:
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ const sal_Char* pServiceName, /// name of SO API service
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName, /// element name w/o prefix
+ // config variables for PrepareField behavior:
+ sal_Bool bName, /// set sName with ???-property
+ sal_Bool bFormula, /// set Formula property
+ sal_Bool bFormulaDefault, /// use content as default for formula
+ sal_Bool bDescription, /// set sDescription with Hint-property
+ sal_Bool bVisible, /// set IsVisible (display attr)
+ sal_Bool bDisplayFormula, /// set ??? (display attr.)
+ sal_Bool bType, /// set value type with ???-property
+ sal_Bool bStyle, /// set data style (NumberFormat-Prop.)
+ sal_Bool bValue, /// set value with Content/Value-Prop.
+ sal_Bool bPresentation); /// set presentation from elem. content
+
+protected:
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ // various accessor methods:
+ inline ::rtl::OUString GetName() { return sName; }
+ inline sal_Bool IsStringValue() { return aValueHelper.IsStringValue();}
+ inline sal_Bool IsNameOK() { return bNameOK; }
+ inline sal_Bool IsFormulaOK() { return bFormulaOK; }
+ inline sal_Bool IsDescriptionOK() { return bDescriptionOK; }
+ inline sal_Bool IsDisplayOK() { return bDisplayOK; }
+};
+
+
+
+/** import variable get fields (<text:variable-get>) */
+class XMLVariableGetFieldImportContext : public XMLVarFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+
+public:
+
+ TYPEINFO();
+
+ XMLVariableGetFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+
+protected:
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import expression fields (<text:expression>) */
+class XMLExpressionFieldImportContext : public XMLVarFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+
+public:
+
+ TYPEINFO();
+
+ XMLExpressionFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+protected:
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+/*** import text input fields (<text:text-input>) */
+class XMLTextInputFieldImportContext : public XMLVarFieldImportContext
+{
+ const ::rtl::OUString sPropertyContent;
+
+public:
+
+ TYPEINFO();
+
+ XMLTextInputFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+protected:
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+
+
+
+/**
+ * uperclass for variable/user-set, var/user-input, and sequence fields
+ * inds field master of appropriate type and attaches field to it.
+ */
+class XMLSetVarFieldImportContext : public XMLVarFieldImportContext
+{
+ const VarType eFieldType;
+
+public:
+
+ TYPEINFO();
+
+ XMLSetVarFieldImportContext(
+ // for XMLTextFieldImportContext:
+ SvXMLImport& rImport, /// see XMLTextFieldImportContext
+ XMLTextImportHelper& rHlp, /// see XMLTextFieldImportContext
+ const sal_Char* pServiceName, /// see XMLTextFieldImportContext
+ sal_uInt16 nPrfx, /// see XMLTextFieldImportContext
+ const ::rtl::OUString& rLocalName, /// see XMLTextFieldImportContext
+ // for finding appropriate field master (see EndElement())
+ VarType eVarType, /// variable type
+ // config variables:
+ sal_Bool bName, /// see XMLTextFieldImportContext
+ sal_Bool bFormula, /// see XMLTextFieldImportContext
+ sal_Bool bFormulaDefault, /// see XMLTextFieldImportContext
+ sal_Bool bDescription, /// see XMLTextFieldImportContext
+ sal_Bool bVisible, /// see XMLTextFieldImportContext
+ sal_Bool bDisplayFormula, /// see XMLTextFieldImportContext
+ sal_Bool bType, /// see XMLTextFieldImportContext
+ sal_Bool bStyle, /// see XMLTextFieldImportContext
+ sal_Bool bValue, /// see XMLTextFieldImportContext
+ sal_Bool bPresentation); /// see XMLTextFieldImportContext
+
+protected:
+
+ /// create XTextField, attach master and insert into document;
+ /// also calls PrepareTextField
+ virtual void EndElement();
+
+ /// find appropriate field master
+ sal_Bool FindFieldMaster(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xMaster);
+};
+
+
+
+/** import variable set fields (<text:variable-set>) */
+class XMLVariableSetFieldImportContext : public XMLSetVarFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+
+public:
+
+ TYPEINFO();
+
+ XMLVariableSetFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+protected:
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** variable input fields (<text:variable-input>) */
+class XMLVariableInputFieldImportContext : public XMLSetVarFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+ const ::rtl::OUString sPropertyIsInput;
+
+public:
+
+ TYPEINFO();
+
+ XMLVariableInputFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+protected:
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** user fields (<text:user-field-get>) */
+class XMLUserFieldImportContext : public XMLSetVarFieldImportContext
+{
+
+public:
+
+ TYPEINFO();
+
+ XMLUserFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+};
+
+/** user input fields (<text:user-field-input>) */
+class XMLUserFieldInputImportContext : public XMLVarFieldImportContext
+{
+
+public:
+
+ TYPEINFO();
+
+ XMLUserFieldInputImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** sequence fields (<text:sequence>) */
+class XMLSequenceFieldImportContext : public XMLSetVarFieldImportContext
+{
+ const ::rtl::OUString sPropertyFormula;
+ const ::rtl::OUString sPropertyNumberFormat;
+ ::rtl::OUString sFormula;
+
+ ::rtl::OUString sNumFormat;
+ ::rtl::OUString sNumFormatSync;
+
+public:
+
+ TYPEINFO();
+
+ XMLSequenceFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+
+
+
+/**
+ * variable declaration container for all variable fields
+ * (variable-decls, user-field-decls, sequence-decls)
+ */
+class XMLVariableDeclsImportContext : public SvXMLImportContext
+{
+ enum VarType eVarDeclsContextType;
+ XMLTextImportHelper& rImportHelper;
+
+public:
+
+ TYPEINFO();
+
+ XMLVariableDeclsImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName, /// element name w/o prefix
+ enum VarType eVarType); /// variable type
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+};
+
+/**
+ * variable field declarations
+ * (variable-decl, user-field-decl, sequence-decl)
+ */
+class XMLVariableDeclImportContext : public SvXMLImportContext
+{
+ const ::rtl::OUString sPropertyName;
+ const ::rtl::OUString sPropertySubType;
+ const ::rtl::OUString sPropertyNumberingLevel;
+ const ::rtl::OUString sPropertyNumberingSeparator;
+ const ::rtl::OUString sPropertyIsExpression;
+
+ ::rtl::OUString sName;
+ XMLValueImportHelper aValueHelper;
+ sal_Int8 nNumLevel;
+ sal_Char cSeparationChar;
+
+public:
+
+ TYPEINFO();
+
+ XMLVariableDeclImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName, /// element name w/o prefix
+ const ::com::sun::star::uno::Reference< /// list of element attributes
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList,
+ enum VarType eVarType); /// variable type
+
+ /// get field master for name and rename if appropriate [TODO: rename]
+ static sal_Bool FindFieldMaster(::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xMaster,
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rHelper,
+ const ::rtl::OUString& sVarName,
+ enum VarType eVarType);
+};
+
+
+/** import database display fields (<text:database-display>) */
+class XMLDatabaseDisplayImportContext : public XMLDatabaseFieldImportContext
+{
+ const ::rtl::OUString sPropertyColumnName;
+ const ::rtl::OUString sPropertyDatabaseFormat;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+ XMLValueImportHelper aValueHelper;
+
+ ::rtl::OUString sColumnName;
+ sal_Bool bColumnOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLDatabaseDisplayImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// create, prepare and insert database field master and database field
+ virtual void EndElement();
+};
+
+#endif
diff --git a/xmloff/inc/unoatrcn.hxx b/xmloff/inc/unoatrcn.hxx
new file mode 100644
index 0000000000..aa975e607f
--- /dev/null
+++ b/xmloff/inc/unoatrcn.hxx
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoatrcn.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase3.hxx>
+#endif
+
+extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvUnoAttributeContainer_CreateInstance();
+
+class SvXMLAttrContainerItem_Impl;
+
+class SvUnoAttributeContainer : public ::cppu::WeakAggImplHelper3<
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::container::XNameContainer >
+{
+private:
+ SvXMLAttrContainerItem_Impl* mpContainer;
+
+ sal_uInt16 getIndexByName(const ::rtl::OUString& aName ) const;
+
+public:
+ SvUnoAttributeContainer( SvXMLAttrContainerItem_Impl* pContainer = NULL );
+ virtual ~SvUnoAttributeContainer();
+
+ SvXMLAttrContainerItem_Impl* GetContainerImpl() const { return mpContainer; }
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
+ static SvUnoAttributeContainer* getImplementation( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt ) throw();
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasElements(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::container::XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const ::rtl::OUString& aName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const ::rtl::OUString& aName) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::container::XNameReplace
+ virtual void SAL_CALL replaceByName(const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::container::XNameContainer
+ virtual void SAL_CALL insertByName(const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByName(const ::rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+
+ friend ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvUnoAttributeContainer_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr ) throw( ::com::sun::star::uno::Exception );
+};
+
diff --git a/xmloff/inc/xexptran.hxx b/xmloff/inc/xexptran.hxx
new file mode 100644
index 0000000000..7a42ff70e6
--- /dev/null
+++ b/xmloff/inc/xexptran.hxx
@@ -0,0 +1,214 @@
+/*************************************************************************
+ *
+ * $RCSfile: xexptran.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XEXPTRANSFORM_HXX
+#define _XEXPTRANSFORM_HXX
+
+#ifndef _RTL_USTRING_
+#include <rtl/ustring>
+#endif
+
+#ifndef _B2D_MATRIX3D_HXX
+#include <goodies/matrix3d.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCESEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequence.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_SIZE_HPP_
+#include <com/sun/star/awt/Size.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_FLAGSEQUENCESEQUENCE_HPP_
+#include <com/sun/star/drawing/FlagSequenceSequence.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_FLAGSEQUENCE_HPP_
+#include <com/sun/star/drawing/FlagSequence.hpp>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+struct ImpSdXMLExpTransObjBase;
+class SvXMLUnitConverter;
+
+//////////////////////////////////////////////////////////////////////////////
+
+DECLARE_LIST(ImpSdXMLExpTransObjBaseList, ImpSdXMLExpTransObjBase*);
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SdXMLImExTransform
+{
+ ImpSdXMLExpTransObjBaseList maList;
+ rtl::OUString msString;
+
+ void EmptyList();
+ ImpSdXMLExpTransObjBase* FindObject(sal_uInt16 nType, sal_uInt32 nInd = 0L);
+
+public:
+ SdXMLImExTransform() {}
+ SdXMLImExTransform(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv);
+ ~SdXMLImExTransform() { EmptyList(); }
+
+ void AddRotate(double fNew);
+ void AddScale(const Vector2D& rNew);
+ void AddTranslate(const Vector2D& rNew);
+ void AddSkewX(double fNew);
+ void AddSkewY(double fNew);
+ void AddMatrix(const Matrix3D& rNew);
+
+ sal_Bool FindRotate(double& rNew, sal_uInt32 nInd = 0L);
+
+ sal_Bool NeedsAction() const { return (sal_Bool)(maList.Count() > 0L); }
+
+ const rtl::OUString& GetExportString(const SvXMLUnitConverter& rConv);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SdXMLImExViewBox
+{
+ rtl::OUString msString;
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnW;
+ sal_Int32 mnH;
+
+public:
+ SdXMLImExViewBox(sal_Int32 nX = 0L, sal_Int32 nY = 0L, sal_Int32 nW = 1000L, sal_Int32 nH = 1000L);
+ SdXMLImExViewBox(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv);
+
+ sal_Int32 GetX() const { return mnX; }
+ sal_Int32 GetY() const { return mnY; }
+ sal_Int32 GetWidth() const { return mnW; }
+ sal_Int32 GetHeight() const { return mnH; }
+ const rtl::OUString& GetExportString(const SvXMLUnitConverter& rConv);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SdXMLImExPointsElement
+{
+ rtl::OUString msString;
+ com::sun::star::drawing::PointSequenceSequence maPoly;
+
+public:
+ SdXMLImExPointsElement(com::sun::star::drawing::PointSequence* pPoints,
+ const SdXMLImExViewBox& rViewBox,
+ const com::sun::star::awt::Point& rObjectPos,
+ const com::sun::star::awt::Size& rObjectSize,
+ const SvXMLUnitConverter& rConv);
+ SdXMLImExPointsElement(const rtl::OUString& rNew,
+ const SdXMLImExViewBox& rViewBox,
+ const com::sun::star::awt::Point& rObjectPos,
+ const com::sun::star::awt::Size& rObjectSize,
+ const SvXMLUnitConverter& rConv);
+
+ const rtl::OUString& GetExportString() const { return msString; }
+ const com::sun::star::drawing::PointSequenceSequence& GetPointSequenceSequence() const { return maPoly; }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SdXMLImExSvgDElement
+{
+ rtl::OUString msString;
+ const SdXMLImExViewBox& mrViewBox;
+ sal_Bool mbIsClosed;
+ sal_Bool mbIsCurve;
+
+ sal_Int32 mnLastX;
+ sal_Int32 mnLastY;
+
+ com::sun::star::drawing::PointSequenceSequence maPoly;
+ com::sun::star::drawing::FlagSequenceSequence maFlag;
+
+public:
+ SdXMLImExSvgDElement(const SdXMLImExViewBox& rViewBox);
+ SdXMLImExSvgDElement(const rtl::OUString& rNew,
+ const SdXMLImExViewBox& rViewBox,
+ const com::sun::star::awt::Point& rObjectPos,
+ const com::sun::star::awt::Size& rObjectSize,
+ const SvXMLUnitConverter& rConv);
+
+ void AddPolygon(
+ com::sun::star::drawing::PointSequence* pPoints,
+ com::sun::star::drawing::FlagSequence* pFlags,
+ const com::sun::star::awt::Point& rObjectPos,
+ const com::sun::star::awt::Size& rObjectSize,
+ const SvXMLUnitConverter& rConv,
+ sal_Bool bClosed = FALSE, sal_Bool bRelative = TRUE);
+
+ const rtl::OUString& GetExportString() const { return msString; }
+ sal_Bool IsClosed() const { return mbIsClosed; }
+ sal_Bool IsCurve() const { return mbIsCurve; }
+ const com::sun::star::drawing::PointSequenceSequence& GetPointSequenceSequence() const { return maPoly; }
+ const com::sun::star::drawing::FlagSequenceSequence& GetFlagSequenceSequence() const { return maFlag; }
+};
+
+
+#endif // _XEXPTRANSFORM_HXX
diff --git a/xmloff/inc/xmlcnitm.hxx b/xmloff/inc/xmlcnitm.hxx
new file mode 100644
index 0000000000..ac20012d7d
--- /dev/null
+++ b/xmloff/inc/xmlcnitm.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlcnitm.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLCNITM_HXX
+#define _XMLOFF_XMLCNITM_HXX
+
+#ifndef _SFXPOOLITEM_HXX
+#include <svtools/poolitem.hxx>
+#endif
+
+class SvXMLNamespaceMap;
+namespace rtl { class OUString; }
+
+//============================================================================
+
+class SvXMLAttrContainerItem_Impl;
+
+class SvXMLAttrContainerItem: public SfxPoolItem
+{
+ SvXMLAttrContainerItem_Impl *pImpl;
+
+public:
+ TYPEINFO();
+
+ SvXMLAttrContainerItem( sal_uInt16 nWhich = 0 );
+ SvXMLAttrContainerItem( const SvXMLAttrContainerItem& );
+ virtual ~SvXMLAttrContainerItem();
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual int Compare( const SfxPoolItem &rWith ) const;
+
+ virtual SfxItemPresentation GetPresentation(
+ SfxItemPresentation ePresentation,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresentationMetric,
+ XubString &rText,
+ const International *pInternational = 0 ) const;
+
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxPoolItem *Clone( SfxItemPool * = 0) const
+ { return new SvXMLAttrContainerItem( *this ); }
+
+ sal_Bool AddAttr( const ::rtl::OUString& rLName,
+ const ::rtl::OUString& rValue );
+ sal_Bool AddAttr( const ::rtl::OUString& rPrefix,
+ const ::rtl::OUString& rNamespace,
+ const ::rtl::OUString& rLName,
+ const ::rtl::OUString& rValue );
+
+ sal_uInt16 GetAttrCount() const;
+ ::rtl::OUString GetAttrNamespace( sal_uInt16 i ) const;
+ ::rtl::OUString GetAttrPrefix( sal_uInt16 i ) const;
+ const ::rtl::OUString& GetAttrLName( sal_uInt16 i ) const;
+ const ::rtl::OUString& GetAttrValue( sal_uInt16 i ) const;
+
+ sal_uInt16 GetFirstNamespaceIndex() const;
+ sal_uInt16 GetNextNamespaceIndex( sal_uInt16 nIdx ) const;
+ const ::rtl::OUString& GetNamespace( sal_uInt16 i ) const;
+ const ::rtl::OUString& GetPrefix( sal_uInt16 i ) const;
+};
+
+#endif // _XMLOFF_XMLCNITM_HXX
+
diff --git a/xmloff/inc/xmlehelp.hxx b/xmloff/inc/xmlehelp.hxx
new file mode 100644
index 0000000000..124c9f6255
--- /dev/null
+++ b/xmloff/inc/xmlehelp.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlehelp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLEHELP_HXX
+#define _XMLOFF_XMLEHELP_HXX
+
+#ifndef _RTL_MACROS_HXX_
+#include <rtl/macros.hxx>
+#endif
+#ifndef _VCL_MAPUNIT_HXX
+#include <vcl/mapunit.hxx>
+#endif
+
+namespace rtl { class OUStringBuffer; }
+
+class SvXMLExportHelper
+{
+public:
+ static void AddLength( long nValue, MapUnit eValueUnit,
+ ::rtl::OUStringBuffer& rOut,
+ MapUnit eOutUnit );
+ static void AddPercentage( long nVal, ::rtl::OUStringBuffer& rOut );
+};
+
+
+
+#endif // _XMLOFF_XMLEHELP_HXX
+
diff --git a/xmloff/inc/xmlkywd.hxx b/xmloff/inc/xmlkywd.hxx
new file mode 100644
index 0000000000..34422dfd4d
--- /dev/null
+++ b/xmloff/inc/xmlkywd.hxx
@@ -0,0 +1,1145 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlkywd.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLKYWD_HXX
+#define _XMLOFF_XMLKYWD_HXX
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+
+/* if XML_DEFINE_KEYWORDS is defined the variables are
+ defined rather than declared. So this file MUST be included
+ WITHOUT this define.
+
+ (Except the xmlkywd.cxx file that actually defines the
+ variables which sets this define.)
+ */
+
+#ifndef XML_DEFINE_KEYWORDS
+#define XML_CONSTASCII_ACTION( n, s ) extern sal_Char __FAR_DATA n[sizeof(s)]
+#else
+#define XML_CONSTASCII_ACTION( n, s ) sal_Char __FAR_DATA n[sizeof(s)] = s
+#endif
+
+// common XML
+XML_CONSTASCII_ACTION( sXML_CDATA, "CDATA" );
+XML_CONSTASCII_ACTION( sXML_WS, " " );
+XML_CONSTASCII_ACTION( sXML_xml, "xml" );
+XML_CONSTASCII_ACTION( sXML_xmlns, "xmlns" );
+XML_CONSTASCII_ACTION( sXML_xml_pi, "version=\"1.0\" encoding=\"UTF-8\"" );
+XML_CONSTASCII_ACTION( sXML_id, "id" );
+
+// namespace prefixes and names
+XML_CONSTASCII_ACTION( sXML_np_office, "office" );
+XML_CONSTASCII_ACTION( sXML_n_office, "http://openoffice.org/2000/office" );
+XML_CONSTASCII_ACTION( sXML_n_office_old, "http://sun.com/xmlns/staroffice/office" );
+XML_CONSTASCII_ACTION( sXML_np_meta, "meta" );
+XML_CONSTASCII_ACTION( sXML_n_meta, "http://openoffice.org/2000/meta" );
+XML_CONSTASCII_ACTION( sXML_n_meta_old, "http://sun.com/xmlns/staroffice/meta" );
+XML_CONSTASCII_ACTION( sXML_np_style, "style" );
+XML_CONSTASCII_ACTION( sXML_n_style, "http://openoffice.org/2000/style" );
+XML_CONSTASCII_ACTION( sXML_n_style_old, "http://sun.com/xmlns/staroffice/style" );
+XML_CONSTASCII_ACTION( sXML_np_number, "number" );
+XML_CONSTASCII_ACTION( sXML_n_number, "http://openoffice.org/2000/datastyle" );
+XML_CONSTASCII_ACTION( sXML_n_number_old, "http://sun.com/xmlns/staroffice/number" );
+XML_CONSTASCII_ACTION( sXML_np_text, "text" );
+XML_CONSTASCII_ACTION( sXML_n_text, "http://openoffice.org/2000/text" );
+XML_CONSTASCII_ACTION( sXML_n_text_old, "http://sun.com/xmlns/staroffice/text" );
+XML_CONSTASCII_ACTION( sXML_np_table, "table" );
+XML_CONSTASCII_ACTION( sXML_n_table, "http://openoffice.org/2000/table" );
+XML_CONSTASCII_ACTION( sXML_n_table_old, "http://sun.com/xmlns/staroffice/table" );
+XML_CONSTASCII_ACTION( sXML_np_draw, "draw" );
+XML_CONSTASCII_ACTION( sXML_n_draw, "http://openoffice.org/2000/drawing" );
+XML_CONSTASCII_ACTION( sXML_n_draw_old, "http://sun.com/xmlns/staroffice/draw" );
+XML_CONSTASCII_ACTION( sXML_np_presentation, "presentation" );
+XML_CONSTASCII_ACTION( sXML_n_presentation, "http://openoffice.org/2000/presentation" );
+XML_CONSTASCII_ACTION( sXML_n_presentation_old, "http://sun.com/xmlns/staroffice/presentation" );
+XML_CONSTASCII_ACTION( sXML_np_chart, "chart" );
+XML_CONSTASCII_ACTION( sXML_n_chart, "http://openoffice.org/2000/chart" );
+XML_CONSTASCII_ACTION( sXML_n_chart_old, "http://sun.com/xmlns/staroffice/chart" );
+XML_CONSTASCII_ACTION( sXML_np_fo, "fo" );
+XML_CONSTASCII_ACTION( sXML_n_fo_old, "http://www.w3.org/1999/XSL/Format/" );
+XML_CONSTASCII_ACTION( sXML_n_fo, "http://www.w3.org/1999/XSL/Format" );
+XML_CONSTASCII_ACTION( sXML_np_xlink, "xlink" );
+XML_CONSTASCII_ACTION( sXML_n_xlink, "http://www.w3.org/1999/xlink" );
+XML_CONSTASCII_ACTION( sXML_n_xlink_old, "http://www.w3.org/1999/xlink/namespace" );
+XML_CONSTASCII_ACTION( sXML_np_dc, "dc" );
+XML_CONSTASCII_ACTION( sXML_n_dc, "http://purl.org/dc/elements/1.1/" );
+XML_CONSTASCII_ACTION( sXML_np_svg, "svg" );
+XML_CONSTASCII_ACTION( sXML_n_svg, "http://www.w3.org/2000/svg" );
+
+// ids and hrefs
+XML_CONSTASCII_ACTION( sXML_styles_id, "styles" );
+XML_CONSTASCII_ACTION( sXML_styles_href, "#styles" );
+XML_CONSTASCII_ACTION( sXML_auto_styles_id, "astyles" );
+XML_CONSTASCII_ACTION( sXML_auto_styles_href, "#astyles" );
+
+// units
+XML_CONSTASCII_ACTION( sXML_unit_mm, "mm" );
+XML_CONSTASCII_ACTION( sXML_unit_cm, "cm" );
+XML_CONSTASCII_ACTION( sXML_unit_pt, "pt" );
+XML_CONSTASCII_ACTION( sXML_unit_pc, "pc" );
+XML_CONSTASCII_ACTION( sXML_unit_inch, "inch" );
+
+// booleans
+XML_CONSTASCII_ACTION( sXML_true, "true" );
+XML_CONSTASCII_ACTION( sXML_false, "false" );
+XML_CONSTASCII_ACTION( sXML_none, "none" );
+XML_CONSTASCII_ACTION( sXML_no_limit, "no-limit" );
+
+// office namespace
+XML_CONSTASCII_ACTION( sXML_document, "document" );
+XML_CONSTASCII_ACTION( sXML_body, "body" );
+XML_CONSTASCII_ACTION( sXML_class, "class" );
+XML_CONSTASCII_ACTION( sXML_meta, "meta" );
+XML_CONSTASCII_ACTION( sXML_version, "version" );
+XML_CONSTASCII_ACTION( sXML_annotation, "annotation" );
+XML_CONSTASCII_ACTION( sXML_author, "author" );
+XML_CONSTASCII_ACTION( sXML_create_date, "create-date" );
+
+// meta namespace
+XML_CONSTASCII_ACTION( sXML_keywords, "keywords" );
+XML_CONSTASCII_ACTION( sXML_keyword, "keyword" );
+XML_CONSTASCII_ACTION( sXML_user_defined, "user-defined" );
+XML_CONSTASCII_ACTION( sXML_initial_creator, "initial-creator" );
+XML_CONSTASCII_ACTION( sXML_creation_date, "creation-date" );
+XML_CONSTASCII_ACTION( sXML_printed_by, "printed-by" );
+XML_CONSTASCII_ACTION( sXML_print_date, "print-date" );
+XML_CONSTASCII_ACTION( sXML_template, "template" );
+XML_CONSTASCII_ACTION( sXML_editing_cycles, "editing-cycles" );
+XML_CONSTASCII_ACTION( sXML_editing_duration, "editing-duration" );
+XML_CONSTASCII_ACTION( sXML_auto_reload, "auto-reload" );
+XML_CONSTASCII_ACTION( sXML_delay, "delay" );
+XML_CONSTASCII_ACTION( sXML_hyperlink_behaviour, "hyperlink-behaviour" );
+XML_CONSTASCII_ACTION( sXML_target_frame_name, "target-frame-name" );
+XML_CONSTASCII_ACTION( sXML_generator, "generator" );
+
+// style namespace
+XML_CONSTASCII_ACTION( sXML_properties, "properties" );
+XML_CONSTASCII_ACTION( sXML_styles, "styles" );
+XML_CONSTASCII_ACTION( sXML_automatic_styles, "automatic-styles" );
+XML_CONSTASCII_ACTION( sXML_master_styles, "master-styles" );
+XML_CONSTASCII_ACTION( sXML_use_styles, "use-styles" );
+XML_CONSTASCII_ACTION( sXML_style, "style" );
+XML_CONSTASCII_ACTION( sXML_stylesheet, "stylesheet" );
+XML_CONSTASCII_ACTION( sXML_map, "map" );
+
+XML_CONSTASCII_ACTION( sXML_name, "name" );
+XML_CONSTASCII_ACTION( sXML_parent_style_name, "parent-style-name" );
+XML_CONSTASCII_ACTION( sXML_next_style_name, "next-style-name" );
+XML_CONSTASCII_ACTION( sXML_family, "family" );
+XML_CONSTASCII_ACTION( sXML_data_style, "data-style" );
+XML_CONSTASCII_ACTION( sXML_pool_id, "pool-id" );
+XML_CONSTASCII_ACTION( sXML_help_file_name, "help-file-name" );
+XML_CONSTASCII_ACTION( sXML_help_id, "help-id" );
+XML_CONSTASCII_ACTION( sXML_auto_update, "auto-update" );
+XML_CONSTASCII_ACTION( sXML_apply_style_name, "apply-style-name" );
+
+XML_CONSTASCII_ACTION( sXML_font_family_generic, "font-family-generic" );
+XML_CONSTASCII_ACTION( sXML_font_style_name, "font-style-name" );
+XML_CONSTASCII_ACTION( sXML_font_pitch, "font-pitch" );
+XML_CONSTASCII_ACTION( sXML_font_charset, "font-charset" );
+
+XML_CONSTASCII_ACTION( sXML_vertical_pos, "vertical-pos" );
+XML_CONSTASCII_ACTION( sXML_vertical_rel, "vertical-rel" );
+
+XML_CONSTASCII_ACTION( sXML_register_true, "register-true" );
+XML_CONSTASCII_ACTION( sXML_drop_cap, "drop-cap" );
+
+XML_CONSTASCII_ACTION( sXML_lines, "lines" );
+XML_CONSTASCII_ACTION( sXML_length, "length" );
+XML_CONSTASCII_ACTION( sXML_distance, "distance" );
+XML_CONSTASCII_ACTION( sXML_rel_width, "rel-width" );
+XML_CONSTASCII_ACTION( sXML_may_break_between_rows, "may-break-between-rows" );
+XML_CONSTASCII_ACTION( sXML_column_width, "column-width" );
+XML_CONSTASCII_ACTION( sXML_rel_column_width, "rel-column-width" );
+XML_CONSTASCII_ACTION( sXML_row_height, "row-height" );
+XML_CONSTASCII_ACTION( sXML_min_row_height, "min-row-height" );
+XML_CONSTASCII_ACTION( sXML_use_optimal_column_width, "use-optimal-column-width");
+XML_CONSTASCII_ACTION( sXML_use_optimal_row_height, "use-optimal-row-height");
+
+XML_CONSTASCII_ACTION( sXML_word, "word" );
+
+XML_CONSTASCII_ACTION( sXML_num_format, "num-format" );
+XML_CONSTASCII_ACTION( sXML_num_letter_sync, "num-letter-sync" );
+XML_CONSTASCII_ACTION( sXML_num_prefix, "num-prefix" );
+XML_CONSTASCII_ACTION( sXML_num_suffix, "num-suffix" );
+
+XML_CONSTASCII_ACTION( sXML_decorative, "decorative" );
+XML_CONSTASCII_ACTION( sXML_modern, "modern" );
+XML_CONSTASCII_ACTION( sXML_roman, "roman" );
+XML_CONSTASCII_ACTION( sXML_script, "script" );
+XML_CONSTASCII_ACTION( sXML_swiss, "swiss" );
+XML_CONSTASCII_ACTION( sXML_system, "system" );
+
+XML_CONSTASCII_ACTION( sXML_fixed, "fixed" );
+XML_CONSTASCII_ACTION( sXML_variable, "variable" );
+
+XML_CONSTASCII_ACTION( sXML_text, "text" );
+XML_CONSTASCII_ACTION( sXML_paragraph, "paragraph" );
+XML_CONSTASCII_ACTION( sXML_frame, "frame" );
+
+XML_CONSTASCII_ACTION( sXML_ISO_8859_1, "ISO-8859-1" );
+XML_CONSTASCII_ACTION( sXML_x_mac_roman, "x-mac-roman" );
+XML_CONSTASCII_ACTION( sXML_IBM437, "IBM437" );
+XML_CONSTASCII_ACTION( sXML_IBM850, "IBM850" );
+XML_CONSTASCII_ACTION( sXML_IBM860, "IBM860" );
+XML_CONSTASCII_ACTION( sXML_IBM861, "IBM861" );
+XML_CONSTASCII_ACTION( sXML_IBM863, "IBM863" );
+XML_CONSTASCII_ACTION( sXML_IBM865, "IBM865" );
+XML_CONSTASCII_ACTION( sXML_x_system, "x-system" );
+XML_CONSTASCII_ACTION( sXML_x_symbol, "x-symbol" );
+
+XML_CONSTASCII_ACTION( sXML_top, "top" );
+XML_CONSTASCII_ACTION( sXML_middle, "middle" );
+XML_CONSTASCII_ACTION( sXML_bottom, "bottom" );
+XML_CONSTASCII_ACTION( sXML_left, "left" );
+XML_CONSTASCII_ACTION( sXML_right, "right" );
+XML_CONSTASCII_ACTION( sXML_center, "center" );
+
+XML_CONSTASCII_ACTION( sXML_page, "page" );
+XML_CONSTASCII_ACTION( sXML_page_content, "page-content" );
+//char __FAR_DATA XML_CONSTASCII_ACTION( sXML_frame, "frame" );
+XML_CONSTASCII_ACTION( sXML_frame_content, "frame-content" );
+//char __FAR_DATA XML_CONSTASCII_ACTION( sXML_paragraph, "paragraph" );
+XML_CONSTASCII_ACTION( sXML_paragraph_content, "paragraph-content" );
+XML_CONSTASCII_ACTION( sXML_line, "line" );
+XML_CONSTASCII_ACTION( sXML_baseline, "baseline" );
+XML_CONSTASCII_ACTION( sXML_char, "char" );
+XML_CONSTASCII_ACTION( sXML_as_char, "as_char" );
+
+XML_CONSTASCII_ACTION( sXML_A, "A" );
+XML_CONSTASCII_ACTION( sXML_a, "a" );
+XML_CONSTASCII_ACTION( sXML_I, "I" );
+XML_CONSTASCII_ACTION( sXML_i, "i" );
+XML_CONSTASCII_ACTION( sXML_1, "1" );
+XML_CONSTASCII_ACTION( sXML__empty, "" );
+
+XML_CONSTASCII_ACTION( sXML_opaque_foreground, "foreground" );
+XML_CONSTASCII_ACTION( sXML_opaque_background, "background" );
+
+XML_CONSTASCII_ACTION( sXML_columnsplit_auto, "auto" );
+XML_CONSTASCII_ACTION( sXML_columnsplit_avoid, "avoid" );
+
+XML_CONSTASCII_ACTION( sXML_protect_content, "content" );
+XML_CONSTASCII_ACTION( sXML_protect_position, "position" );
+XML_CONSTASCII_ACTION( sXML_protect_size, "size" );
+
+
+XML_CONSTASCII_ACTION( sXML_text_outline, "text-outline" );
+XML_CONSTASCII_ACTION( sXML_text_crossing_out, "text-crossing-out" );
+XML_CONSTASCII_ACTION( sXML_text_position, "text-position" );
+XML_CONSTASCII_ACTION( sXML_text_underline, "text-underline" );
+XML_CONSTASCII_ACTION( sXML_decorate_words_only, "decorate-words-only" );
+XML_CONSTASCII_ACTION( sXML_score_spaces, "score-spaces" );
+XML_CONSTASCII_ACTION( sXML_letter_kerning, "letter-kerning" );
+XML_CONSTASCII_ACTION( sXML_text_blinking, "text-blinking" );
+XML_CONSTASCII_ACTION( sXML_text_background_color, "text-background-color" );
+XML_CONSTASCII_ACTION( sXML_min_line_height, "min-line-height" );
+XML_CONSTASCII_ACTION( sXML_line_height_at_least, "line-height-at-least" );
+XML_CONSTASCII_ACTION( sXML_line_spacing, "line-spacing" );
+XML_CONSTASCII_ACTION( sXML_break_inside, "break-inside" );
+XML_CONSTASCII_ACTION( sXML_border_line_width, "border-line-width" );
+XML_CONSTASCII_ACTION( sXML_border_line_width_top, "border-line-width-top" );
+XML_CONSTASCII_ACTION( sXML_border_line_width_bottom, "border-line-width-bottom" );
+XML_CONSTASCII_ACTION( sXML_border_line_width_left, "border-line-width-left" );
+XML_CONSTASCII_ACTION( sXML_border_line_width_right, "border-line-width-right" );
+XML_CONSTASCII_ACTION( sXML_shadow, "shadow" );
+XML_CONSTASCII_ACTION( sXML_text_align_last, "text-align-last" );
+XML_CONSTASCII_ACTION( sXML_justify_single_word, "justify-single-word" );
+
+XML_CONSTASCII_ACTION( sXML_tabstop_tab_stops, "tab-stops" );
+XML_CONSTASCII_ACTION( sXML_tabstop_tab_stop, "tab-stop" );
+XML_CONSTASCII_ACTION( sXML_tabstop_position, "position" );
+XML_CONSTASCII_ACTION( sXML_tabstop_type, "type" );
+XML_CONSTASCII_ACTION( sXML_tabstop_char, "char" );
+XML_CONSTASCII_ACTION( sXML_tabstop_leader, "leader-char" );
+
+XML_CONSTASCII_ACTION( sXML_solid, "solid" );
+XML_CONSTASCII_ACTION( sXML_double, "double" );
+XML_CONSTASCII_ACTION( sXML_dotted, "dotted" );
+XML_CONSTASCII_ACTION( sXML_dashed, "dashed" );
+XML_CONSTASCII_ACTION( sXML_groove, "groove" );
+XML_CONSTASCII_ACTION( sXML_ridge, "ridge" );
+XML_CONSTASCII_ACTION( sXML_inset, "inset" );
+XML_CONSTASCII_ACTION( sXML_outset, "outset" );
+
+XML_CONSTASCII_ACTION( sXML_thin, "thin" );
+XML_CONSTASCII_ACTION( sXML_thick, "thick" );
+
+XML_CONSTASCII_ACTION( sXML_column, "column" );
+XML_CONSTASCII_ACTION( sXML_columns, "columns" );
+XML_CONSTASCII_ACTION( sXML_even_page, "even-page" );
+XML_CONSTASCII_ACTION( sXML_odd_page, "odd_page" );
+
+XML_CONSTASCII_ACTION( sXML_outline_level, "outline-level" );
+XML_CONSTASCII_ACTION( sXML_list_level, "list-level" );
+XML_CONSTASCII_ACTION( sXML_table_header, "table-header" );
+XML_CONSTASCII_ACTION( sXML_header, "header" );
+XML_CONSTASCII_ACTION( sXML_footer, "footer" );
+XML_CONSTASCII_ACTION( sXML_footnote, "footnote" );
+XML_CONSTASCII_ACTION( sXML_endnote, "endnote" );
+
+XML_CONSTASCII_ACTION( sXML_presentation_page_layout, "presentation-page-layout" );
+XML_CONSTASCII_ACTION( sXML_master_page, "master-page" );
+XML_CONSTASCII_ACTION( sXML_page_master_name, "page-master-name" );
+XML_CONSTASCII_ACTION( sXML_page_master, "page-master" );
+
+XML_CONSTASCII_ACTION( sXML_cell_protect, "cell-protect");
+XML_CONSTASCII_ACTION( sXML_hidden_and_protected, "hidden-and-protected");
+XML_CONSTASCII_ACTION( sXML_formula_hidden, "formula_hidden");
+XML_CONSTASCII_ACTION( sXML_print_content, "print-content");
+XML_CONSTASCII_ACTION( sXML_direction, "direction");
+XML_CONSTASCII_ACTION( sXML_ltr, "ltr");
+XML_CONSTASCII_ACTION( sXML_ttb, "ttb");
+XML_CONSTASCII_ACTION( sXML_rotation_angle, "rotation-angle" );
+XML_CONSTASCII_ACTION( sXML_rotation_align, "rotation-align" );
+XML_CONSTASCII_ACTION( sXML_text_align_source, "text-align-source" );
+XML_CONSTASCII_ACTION( sXML_fix, "fix" );
+
+XML_CONSTASCII_ACTION( sXML_horizontal_pos, "horizontal-pos" );
+XML_CONSTASCII_ACTION( sXML_horizontal_rel, "horizontal-rel" );
+XML_CONSTASCII_ACTION( sXML_mirror, "mirror" );
+XML_CONSTASCII_ACTION( sXML_clip, "clip" );
+XML_CONSTASCII_ACTION( sXML_horizontal, "horizontal" );
+XML_CONSTASCII_ACTION( sXML_horizontal_on_left_pages, "horizontal-on-left-pages" );
+XML_CONSTASCII_ACTION( sXML_horizontal_on_right_pages, "horizontal-on-right-pages" );
+
+XML_CONSTASCII_ACTION( sXML_from_left, "from-left" );
+XML_CONSTASCII_ACTION( sXML_from_inside, "from-inside" );
+XML_CONSTASCII_ACTION( sXML_from_top, "from-top" );
+XML_CONSTASCII_ACTION( sXML_inside, "inside" );
+
+XML_CONSTASCII_ACTION( sXML_paragraph_start_margin, "paragraph-start-margin" );
+XML_CONSTASCII_ACTION( sXML_paragraph_end_margin, "paragraph-end-margin" );
+XML_CONSTASCII_ACTION( sXML_page_start_margin, "page-start-margin" );
+XML_CONSTASCII_ACTION( sXML_page_end_margin, "page-end-margin" );
+XML_CONSTASCII_ACTION( sXML_frame_start_margin, "frame-start-margin" );
+XML_CONSTASCII_ACTION( sXML_frame_end_margin, "frame-end-margin" );
+
+
+// text namespace
+XML_CONSTASCII_ACTION( sXML_p, "p" );
+XML_CONSTASCII_ACTION( sXML_h, "h" );
+XML_CONSTASCII_ACTION( sXML_section_desc, "section-desc" );
+XML_CONSTASCII_ACTION( sXML_section, "section" );
+XML_CONSTASCII_ACTION( sXML_span, "span" );
+XML_CONSTASCII_ACTION( sXML_s, "s" );
+XML_CONSTASCII_ACTION( sXML_tab_stop, "tab-stop" );
+XML_CONSTASCII_ACTION( sXML_line_break, "line-break" );
+XML_CONSTASCII_ACTION( sXML_list_style, "list-style" );
+XML_CONSTASCII_ACTION( sXML_list_level_style_number, "list-level-style-number" );
+XML_CONSTASCII_ACTION( sXML_list_level_style_bullet, "list-level-style-bullet" );
+XML_CONSTASCII_ACTION( sXML_list_level_style_image, "list-level-style-image" );
+
+XML_CONSTASCII_ACTION( sXML_outline_style, "outline-style" );
+XML_CONSTASCII_ACTION( sXML_outline_level_style, "outline-level-style" );
+
+XML_CONSTASCII_ACTION( sXML_style_name, "style-name" );
+XML_CONSTASCII_ACTION( sXML_cond_style_name, "cond-style-name" );
+XML_CONSTASCII_ACTION( sXML_section_name, "section-name" );
+XML_CONSTASCII_ACTION( sXML_hidden, "hidden" );
+XML_CONSTASCII_ACTION( sXML_condition, "condition" );
+XML_CONSTASCII_ACTION( sXML_protected, "protected" );
+XML_CONSTASCII_ACTION( sXML_c, "c" );
+
+XML_CONSTASCII_ACTION( sXML_consecutive_numbering, "consecutive-numbering" );
+XML_CONSTASCII_ACTION( sXML_level, "level" );
+XML_CONSTASCII_ACTION( sXML_display_levels, "display-levels" );
+XML_CONSTASCII_ACTION( sXML_start_value, "start-value" );
+XML_CONSTASCII_ACTION( sXML_bullet_char, "bullet-char" );
+
+XML_CONSTASCII_ACTION( sXML_space_before, "space-before" );
+XML_CONSTASCII_ACTION( sXML_min_label_width, "min-label-width" );
+XML_CONSTASCII_ACTION( sXML_min_label_distance, "min-label-distance" );
+
+XML_CONSTASCII_ACTION( sXML_list_info, "list-info" );
+XML_CONSTASCII_ACTION( sXML_list_block, "list-block" );
+XML_CONSTASCII_ACTION( sXML_ordered_list, "ordered-list" );
+XML_CONSTASCII_ACTION( sXML_unordered_list, "unordered-list" );
+XML_CONSTASCII_ACTION( sXML_list_item, "list-item" );
+XML_CONSTASCII_ACTION( sXML_list_header, "list-header" );
+XML_CONSTASCII_ACTION( sXML_list_style_name, "list-style-name" );
+XML_CONSTASCII_ACTION( sXML_display_label, "display-label" );
+XML_CONSTASCII_ACTION( sXML_restart_numbering, "restart-numbering" );
+XML_CONSTASCII_ACTION( sXML_continue_numbering, "continue-numbering" );
+
+XML_CONSTASCII_ACTION( sXML_underline_none, "none" );
+XML_CONSTASCII_ACTION( sXML_underline_single, "single" );
+XML_CONSTASCII_ACTION( sXML_underline_double, "double" );
+XML_CONSTASCII_ACTION( sXML_underline_dotted, "dotted" );
+XML_CONSTASCII_ACTION( sXML_underline_dash, "dash" );
+XML_CONSTASCII_ACTION( sXML_underline_long_dash, "long-dash" );
+XML_CONSTASCII_ACTION( sXML_underline_dot_dash, "dot-dash" );
+XML_CONSTASCII_ACTION( sXML_underline_dot_dot_dash, "dot-dot-dash" );
+XML_CONSTASCII_ACTION( sXML_underline_wave, "wave" );
+XML_CONSTASCII_ACTION( sXML_underline_bold, "bold" );
+XML_CONSTASCII_ACTION( sXML_underline_bold_dotted, "bold-dotted" );
+XML_CONSTASCII_ACTION( sXML_underline_bold_dash, "bold-dash" );
+XML_CONSTASCII_ACTION( sXML_underline_bold_long_dash, "bold-long-dash" );
+XML_CONSTASCII_ACTION( sXML_underline_bold_dot_dash, "bold-dot-dash" );
+XML_CONSTASCII_ACTION( sXML_underline_bold_dot_dot_dash, "bold-dot-dot-dash" );
+XML_CONSTASCII_ACTION( sXML_underline_bold_wave, "bold-wave" );
+XML_CONSTASCII_ACTION( sXML_underline_double_wave, "double-wave" );
+XML_CONSTASCII_ACTION( sXML_underline_small_wave, "small-wave" );
+
+XML_CONSTASCII_ACTION( sXML_crossedout_none, "none" );
+XML_CONSTASCII_ACTION( sXML_crossedout_single, "single-line" );
+XML_CONSTASCII_ACTION( sXML_crossedout_double, "double-line" );
+XML_CONSTASCII_ACTION( sXML_crossedout_thick, "thick-line" );
+XML_CONSTASCII_ACTION( sXML_crossedout_slash, "slash" );
+XML_CONSTASCII_ACTION( sXML_crossedout_cross, "X" );
+XML_CONSTASCII_ACTION( sXML_text_box, "text-box" );
+XML_CONSTASCII_ACTION( sXML_run_through, "run-through" );
+XML_CONSTASCII_ACTION( sXML_wrap, "wrap" );
+XML_CONSTASCII_ACTION( sXML_number_wrapped_paragraphs, "number-wrapped-paragraphs" );
+XML_CONSTASCII_ACTION( sXML_wrap_contour, "wrap-contour" );
+XML_CONSTASCII_ACTION( sXML_wrap_contour_mode, "wrap-contour-mode" );
+XML_CONSTASCII_ACTION( sXML_background, "background" );
+XML_CONSTASCII_ACTION( sXML_foreground, "foreground" );
+XML_CONSTASCII_ACTION( sXML_outside, "outside" );
+XML_CONSTASCII_ACTION( sXML_parallel, "parallel" );
+XML_CONSTASCII_ACTION( sXML_protect, "protect" );
+XML_CONSTASCII_ACTION( sXML_dynamic, "dynamic" );
+XML_CONSTASCII_ACTION( sXML_content, "content" );
+XML_CONSTASCII_ACTION( sXML_size, "size" );
+XML_CONSTASCII_ACTION( sXML_editable, "editable" );
+XML_CONSTASCII_ACTION( sXML_anchor_type, "anchor-type" );
+XML_CONSTASCII_ACTION( sXML_anchor_page_number, "anchor-page-number" );
+
+// fo namespace
+XML_CONSTASCII_ACTION( sXML_margin_top, "margin-top" );
+XML_CONSTASCII_ACTION( sXML_margin_bottom, "margin-bottom" );
+XML_CONSTASCII_ACTION( sXML_margin_left, "margin-left" );
+XML_CONSTASCII_ACTION( sXML_margin_right, "margin-right" );
+XML_CONSTASCII_ACTION( sXML_text_indent, "text-indent" );
+XML_CONSTASCII_ACTION( sXML_auto_text_indent, "auto-text-indent" );
+XML_CONSTASCII_ACTION( sXML_vertical_align, "vertical-align" );
+
+XML_CONSTASCII_ACTION( sXML_font_family, "font-family" );
+XML_CONSTASCII_ACTION( sXML_font_size, "font-size" );
+XML_CONSTASCII_ACTION( sXML_font_variant, "font-variant" );
+XML_CONSTASCII_ACTION( sXML_text_transform, "text-transform" );
+XML_CONSTASCII_ACTION( sXML_color, "color" );
+XML_CONSTASCII_ACTION( sXML_letter_spacing, "letter-spacing" );
+XML_CONSTASCII_ACTION( sXML_font_style, "font-style" );
+XML_CONSTASCII_ACTION( sXML_font_weight, "font-weight" );
+XML_CONSTASCII_ACTION( sXML_text_shadow, "text-shadow" );
+XML_CONSTASCII_ACTION( sXML_language, "language" );
+XML_CONSTASCII_ACTION( sXML_country, "country" );
+XML_CONSTASCII_ACTION( sXML_line_height, "line-height" );
+XML_CONSTASCII_ACTION( sXML_widows, "widows" );
+XML_CONSTASCII_ACTION( sXML_orphans, "orphans" );
+XML_CONSTASCII_ACTION( sXML_hyphenate, "hyphenate" );
+XML_CONSTASCII_ACTION( sXML_hyphenation_keep, "hyphenation-keep" );
+XML_CONSTASCII_ACTION( sXML_hyphenation_remain_char_count, "hyphenation-remain-char-count" );
+XML_CONSTASCII_ACTION( sXML_hyphenation_push_char_count, "hyphenation-push-char-count" );
+XML_CONSTASCII_ACTION( sXML_hyphenation_ladder_count, "hyphenation-ladder-count" );
+XML_CONSTASCII_ACTION( sXML_break_before, "break-before" );
+XML_CONSTASCII_ACTION( sXML_break_after, "break-after" );
+XML_CONSTASCII_ACTION( sXML_background_color, "background-color" );
+XML_CONSTASCII_ACTION( sXML_background_image, "background-image" );
+XML_CONSTASCII_ACTION( sXML_repeat, "repeat" );
+XML_CONSTASCII_ACTION( sXML_position, "position" );
+XML_CONSTASCII_ACTION( sXML_filter_name, "filter-name" );
+XML_CONSTASCII_ACTION( sXML_border, "border" );
+XML_CONSTASCII_ACTION( sXML_border_top, "border-top" );
+XML_CONSTASCII_ACTION( sXML_border_bottom, "border-bottom" );
+XML_CONSTASCII_ACTION( sXML_border_left, "border-left" );
+XML_CONSTASCII_ACTION( sXML_border_right, "border-right" );
+XML_CONSTASCII_ACTION( sXML_padding, "padding" );
+XML_CONSTASCII_ACTION( sXML_padding_top, "padding-top" );
+XML_CONSTASCII_ACTION( sXML_padding_bottom, "padding-bottom" );
+XML_CONSTASCII_ACTION( sXML_padding_left, "padding-left" );
+XML_CONSTASCII_ACTION( sXML_padding_right, "padding-right" );
+XML_CONSTASCII_ACTION( sXML_keep_with_next, "keep-with-next" );
+
+XML_CONSTASCII_ACTION( sXML_text_align, "text-align" );
+XML_CONSTASCII_ACTION( sXML_width, "width" );
+XML_CONSTASCII_ACTION( sXML_height, "height" );
+XML_CONSTASCII_ACTION( sXML_min_height, "min-height" );
+XML_CONSTASCII_ACTION( sXML_chain_next_name, "chain-next-name" );
+
+XML_CONSTASCII_ACTION( sXML_start, "start" );
+XML_CONSTASCII_ACTION( sXML_end, "end" );
+XML_CONSTASCII_ACTION( sXML_justify, "justify" );
+XML_CONSTASCII_ACTION( sXML_justified, "justified" );
+XML_CONSTASCII_ACTION( sXML_relative, "relative" ) ;
+
+XML_CONSTASCII_ACTION( sXML_transparent, "transparent" );
+XML_CONSTASCII_ACTION( sXML_background_repeat, "repeat" );
+XML_CONSTASCII_ACTION( sXML_background_no_repeat, "no-repeat" );
+XML_CONSTASCII_ACTION( sXML_background_stretch, "stretch" );
+
+XML_CONSTASCII_ACTION( sXML_casemap_normal, "normal" );
+XML_CONSTASCII_ACTION( sXML_casemap_small_caps, "small-caps" );
+XML_CONSTASCII_ACTION( sXML_casemap_lowercase, "lowercase" );
+XML_CONSTASCII_ACTION( sXML_casemap_uppercase, "uppercase" );
+XML_CONSTASCII_ACTION( sXML_casemap_capitalize, "capitalize" );
+
+XML_CONSTASCII_ACTION( sXML_escapement_sub, "sub" );
+XML_CONSTASCII_ACTION( sXML_escapement_super, "super" );
+
+XML_CONSTASCII_ACTION( sXML_kerning_normal, "normal" );
+
+XML_CONSTASCII_ACTION( sXML_posture_normal, "normal" );
+XML_CONSTASCII_ACTION( sXML_posture_italic, "italic" );
+XML_CONSTASCII_ACTION( sXML_posture_oblique, "oblique" );
+
+XML_CONSTASCII_ACTION( sXML_weight_normal, "normal" );
+XML_CONSTASCII_ACTION( sXML_weight_bold, "bold" );
+
+XML_CONSTASCII_ACTION( sXML_number_columns_repeated, "number-columns-repeated" );
+XML_CONSTASCII_ACTION( sXML_number_rows_repeated, "number-rows-repeated" );
+XML_CONSTASCII_ACTION( sXML_number_columns_spanned, "number-columns-spanned" );
+XML_CONSTASCII_ACTION( sXML_number_rows_spanned, "number-rows-spanned" );
+
+XML_CONSTASCII_ACTION( sXML_page_width, "page-width" );
+XML_CONSTASCII_ACTION( sXML_page_height, "page-height" );
+XML_CONSTASCII_ACTION( sXML_page_orientation, "page-orientation" );
+XML_CONSTASCII_ACTION( sXML_orientation_portrait, "orientation-portrait" );
+XML_CONSTASCII_ACTION( sXML_orientation_landscape, "orientation-landscape" );
+
+
+XML_CONSTASCII_ACTION( sXML_sender_firstname, "sender-firstname" );
+XML_CONSTASCII_ACTION( sXML_sender_lastname, "sender-lastname" );
+XML_CONSTASCII_ACTION( sXML_sender_initials, "sender-initials" );
+XML_CONSTASCII_ACTION( sXML_sender_title, "sender-title" );
+XML_CONSTASCII_ACTION( sXML_sender_position, "sender-position" );
+XML_CONSTASCII_ACTION( sXML_sender_email, "sender-email" );
+XML_CONSTASCII_ACTION( sXML_sender_phone_private, "sender-phone-private" );
+XML_CONSTASCII_ACTION( sXML_sender_fax, "sender-fax" );
+XML_CONSTASCII_ACTION( sXML_sender_company, "sender-company" );
+XML_CONSTASCII_ACTION( sXML_sender_phone_work, "sender-phone-work" );
+XML_CONSTASCII_ACTION( sXML_sender_street, "sender-street" );
+XML_CONSTASCII_ACTION( sXML_sender_city, "sender-city" );
+XML_CONSTASCII_ACTION( sXML_sender_postal_code, "sender-postal-code" );
+XML_CONSTASCII_ACTION( sXML_sender_country, "sender-country" );
+XML_CONSTASCII_ACTION( sXML_sender_state_or_province, "sender-state-or-province" );
+XML_CONSTASCII_ACTION( sXML_author_name, "author-name" );
+XML_CONSTASCII_ACTION( sXML_author_initials, "author-initials" );
+XML_CONSTASCII_ACTION( sXML_placeholder_type, "placeholder-type" );
+XML_CONSTASCII_ACTION( sXML_variable_decl, "variable-decl" );
+XML_CONSTASCII_ACTION( sXML_variable_decls, "variable-decls" );
+XML_CONSTASCII_ACTION( sXML_variable_set, "variable-set" );
+XML_CONSTASCII_ACTION( sXML_variable_get, "variable-get" );
+XML_CONSTASCII_ACTION( sXML_image, "image" );
+XML_CONSTASCII_ACTION( sXML_desc, "desc" );
+XML_CONSTASCII_ACTION( sXML_display, "display" );
+XML_CONSTASCII_ACTION( sXML_variable_input, "variable-input" );
+XML_CONSTASCII_ACTION( sXML_user_field_decl, "user-field-decl" );
+XML_CONSTASCII_ACTION( sXML_user_field_decls, "user-field-decls" );
+XML_CONSTASCII_ACTION( sXML_user_field_get, "user-field-get" );
+XML_CONSTASCII_ACTION( sXML_user_field_input, "user-field-input" );
+XML_CONSTASCII_ACTION( sXML_sequence_decl, "sequence-decl" );
+XML_CONSTASCII_ACTION( sXML_sequence_decls, "sequence-decls" );
+XML_CONSTASCII_ACTION( sXML_sequence, "sequence" );
+XML_CONSTASCII_ACTION( sXML_display_name, "display-name" );
+XML_CONSTASCII_ACTION( sXML_text_input, "text-input" );
+XML_CONSTASCII_ACTION( sXML_display_formula, "display-formula" );
+XML_CONSTASCII_ACTION( sXML_data_style_name, "data-style-name" );
+XML_CONSTASCII_ACTION( sXML_display_outline_level, "display-outline-level" );
+XML_CONSTASCII_ACTION( sXML_separation_character, "separation-character" );
+XML_CONSTASCII_ACTION( sXML_row_number, "row-number" );
+XML_CONSTASCII_ACTION( sXML_database_row_number, "database-row-number" );
+XML_CONSTASCII_ACTION( sXML_column_name, "column-name" );
+XML_CONSTASCII_ACTION( sXML_database_next, "database-next" );
+XML_CONSTASCII_ACTION( sXML_database_select, "database-select" );
+XML_CONSTASCII_ACTION( sXML_database_display, "database-display" );
+XML_CONSTASCII_ACTION( sXML_time_adjust, "time-adjust" );
+XML_CONSTASCII_ACTION( sXML_date_adjust, "date-adjust" );
+XML_CONSTASCII_ACTION( sXML_page_number, "page-number" );
+XML_CONSTASCII_ACTION( sXML_page_continuation_string, "page-continuation-string" );
+XML_CONSTASCII_ACTION( sXML_page_adjust, "page-adjust" );
+XML_CONSTASCII_ACTION( sXML_select_page, "select-page" );
+XML_CONSTASCII_ACTION( sXML_previous, "previous" );
+XML_CONSTASCII_ACTION( sXML_next, "next" );
+XML_CONSTASCII_ACTION( sXML_current, "current" );
+XML_CONSTASCII_ACTION( sXML_conditional_text, "conditional-text" );
+XML_CONSTASCII_ACTION( sXML_hidden_text, "hidden-text" );
+XML_CONSTASCII_ACTION( sXML_hidden_paragraph, "hidden-paragraph" );
+XML_CONSTASCII_ACTION( sXML_string_value_if_true, "string-value-if-true" );
+XML_CONSTASCII_ACTION( sXML_string_value_if_false, "string-value-if-false" );
+XML_CONSTASCII_ACTION( sXML_user_info_0, "user-info-0" );
+XML_CONSTASCII_ACTION( sXML_user_info_1, "user-info-1" );
+XML_CONSTASCII_ACTION( sXML_user_info_2, "user-info-2" );
+XML_CONSTASCII_ACTION( sXML_user_info_3, "user-info-3" );
+XML_CONSTASCII_ACTION( sXML_revision, "revision" );
+XML_CONSTASCII_ACTION( sXML_creation_time, "creation-time" );
+XML_CONSTASCII_ACTION( sXML_print_time, "print-time" );
+XML_CONSTASCII_ACTION( sXML_modification_time, "modification-time" );
+XML_CONSTASCII_ACTION( sXML_modification_date, "modification-date" );
+XML_CONSTASCII_ACTION( sXML_file_name, "file-name" );
+XML_CONSTASCII_ACTION( sXML_template_name, "template-name" );
+XML_CONSTASCII_ACTION( sXML_full, "full" );
+XML_CONSTASCII_ACTION( sXML_name_and_extension, "name-and-extension" );
+XML_CONSTASCII_ACTION( sXML_number_and_name, "number-and-name" );
+XML_CONSTASCII_ACTION( sXML_plain_number, "plain-number" );
+XML_CONSTASCII_ACTION( sXML_plain_number_and_name, "plain-number-and-name" );
+XML_CONSTASCII_ACTION( sXML_citation, "citation");
+XML_CONSTASCII_ACTION( sXML_paragraph_count, "paragraph-count" );
+XML_CONSTASCII_ACTION( sXML_word_count, "word-count" );
+XML_CONSTASCII_ACTION( sXML_character_count, "character-count" );
+XML_CONSTASCII_ACTION( sXML_page_count, "page-count" );
+XML_CONSTASCII_ACTION( sXML_table_count, "table-count" );
+XML_CONSTASCII_ACTION( sXML_image_count, "image-count" );
+XML_CONSTASCII_ACTION( sXML_object_count, "object-count" );
+XML_CONSTASCII_ACTION( sXML_active, "active" );
+XML_CONSTASCII_ACTION( sXML_page_variable_set, "page-variable-set" );
+XML_CONSTASCII_ACTION( sXML_page_variable_get, "page-variable-get" );
+XML_CONSTASCII_ACTION( sXML_execute_macro, "execute-macro" );
+XML_CONSTASCII_ACTION( sXML_reference_get, "reference-get" );
+XML_CONSTASCII_ACTION( sXML_sequence_ref, "sequence-ref" );
+XML_CONSTASCII_ACTION( sXML_bookmark_ref, "bookmark-ref" );
+XML_CONSTASCII_ACTION( sXML_footnote_ref, "footnote-ref" );
+XML_CONSTASCII_ACTION( sXML_endnote_ref, "endnote-ref" );
+XML_CONSTASCII_ACTION( sXML_reference_type, "reference-type" );
+XML_CONSTASCII_ACTION( sXML_category_and_value, "category-and-value" );
+XML_CONSTASCII_ACTION( sXML_dde_connection_decls, "dde-connection-decls" );
+XML_CONSTASCII_ACTION( sXML_dde_connection_decl, "dde-connection-decl" );
+XML_CONSTASCII_ACTION( sXML_dde_connection, "dde-connection" );
+XML_CONSTASCII_ACTION( sXML_command, "command" );
+XML_CONSTASCII_ACTION( sXML_dde_target, "dde-target" );
+XML_CONSTASCII_ACTION( sXML_dde_file, "dde-file" );
+XML_CONSTASCII_ACTION( sXML_dde_command, "dde-command" );
+XML_CONSTASCII_ACTION( sXML_automatic_update, "automatic-update" );
+XML_CONSTASCII_ACTION( sXML_bookmark, "bookmark" );
+XML_CONSTASCII_ACTION( sXML_bookmark_start, "bookmark-start" );
+XML_CONSTASCII_ACTION( sXML_bookmark_end, "bookmark-end" );
+XML_CONSTASCII_ACTION( sXML_reference, "reference" );
+XML_CONSTASCII_ACTION( sXML_reference_start, "reference-start" );
+XML_CONSTASCII_ACTION( sXML_reference_end, "reference-end" );
+XML_CONSTASCII_ACTION( sXML_label, "label" );
+XML_CONSTASCII_ACTION( sXML_quo_vadis, "quo-vadis" );
+XML_CONSTASCII_ACTION( sXML_ergo_sum, "ergo-sum" );
+XML_CONSTASCII_ACTION( sXML_footnotes_configuration, "footnotes-configuration");
+XML_CONSTASCII_ACTION( sXML_endnotes_configuration, "endnotes-configuration");
+XML_CONSTASCII_ACTION( sXML_citation_style_name, "citation-style-name" );
+XML_CONSTASCII_ACTION( sXML_default_style_name, "default-style-name" );
+XML_CONSTASCII_ACTION( sXML_prefix, "prefix" );
+XML_CONSTASCII_ACTION( sXML_suffix, "suffix" );
+XML_CONSTASCII_ACTION( sXML_footnotes_position, "footnotes-position" );
+XML_CONSTASCII_ACTION( sXML_start_numbering_at, "start-numbering-at" );
+XML_CONSTASCII_ACTION( sXML_offset, "offset" );
+
+XML_CONSTASCII_ACTION( sXML_chapter, "chapter");
+XML_CONSTASCII_ACTION( sXML_list, "list");
+XML_CONSTASCII_ACTION( sXML_index, "index");
+XML_CONSTASCII_ACTION( sXML_extra, "extra");
+XML_CONSTASCII_ACTION( sXML_html, "html");
+
+// table namespace
+XML_CONSTASCII_ACTION( sXML_table, "table" );
+XML_CONSTASCII_ACTION( sXML_sub_table, "sub-table" );
+XML_CONSTASCII_ACTION( sXML_table_page, "table-page" );
+XML_CONSTASCII_ACTION( sXML_page_style_name, "page-style-name" );
+XML_CONSTASCII_ACTION( sXML_use_cell_protection, "use-cell-protection" );
+XML_CONSTASCII_ACTION( sXML_table_header_columns, "table-header-columns" );
+XML_CONSTASCII_ACTION( sXML_table_columns, "table-columns" );
+XML_CONSTASCII_ACTION( sXML_table_column, "table-column" );
+XML_CONSTASCII_ACTION( sXML_visibility, "visibility" );
+XML_CONSTASCII_ACTION( sXML_collapse, "collapse" );
+XML_CONSTASCII_ACTION( sXML_table_header_rows, "table-header-rows" );
+XML_CONSTASCII_ACTION( sXML_table_rows, "table-rows" );
+XML_CONSTASCII_ACTION( sXML_table_row, "table-row" );
+XML_CONSTASCII_ACTION( sXML_table_cell, "table-cell" );
+XML_CONSTASCII_ACTION( sXML_covered_table_cell, "covered-table-cell" );
+XML_CONSTASCII_ACTION( sXML_align, "align" );
+XML_CONSTASCII_ACTION( sXML_value_type, "value-type");
+XML_CONSTASCII_ACTION( sXML_float, "float");
+XML_CONSTASCII_ACTION( sXML_time, "time");
+XML_CONSTASCII_ACTION( sXML_percentage, "percentage");
+XML_CONSTASCII_ACTION( sXML_currency, "currency");
+XML_CONSTASCII_ACTION( sXML_boolean, "boolean");
+XML_CONSTASCII_ACTION( sXML_string, "string");
+XML_CONSTASCII_ACTION( sXML_formula, "formula");
+XML_CONSTASCII_ACTION( sXML_value, "value");
+XML_CONSTASCII_ACTION( sXML_date_value, "date-value");
+XML_CONSTASCII_ACTION( sXML_time_value, "time-value");
+XML_CONSTASCII_ACTION( sXML_boolean_value, "boolean-value");
+XML_CONSTASCII_ACTION( sXML_string_value, "string-value");
+XML_CONSTASCII_ACTION( sXML_margins, "margins" );
+XML_CONSTASCII_ACTION( sXML_number_matrix_columns_spanned, "number-matrix-columns-spanned" );
+XML_CONSTASCII_ACTION( sXML_number_matrix_rows_spanned, "number-matrix-rows-spanned" );
+
+XML_CONSTASCII_ACTION( sXML_named_expressions, "named-expressions");
+XML_CONSTASCII_ACTION( sXML_named_range, "named-range");
+XML_CONSTASCII_ACTION( sXML_cell_range_address, "cell-range-address");
+XML_CONSTASCII_ACTION( sXML_base_cell_address, "base-cell-address");
+XML_CONSTASCII_ACTION( sXML_range_usable_as, "range-usable-as");
+XML_CONSTASCII_ACTION( sXML_named_expression, "named-expression");
+XML_CONSTASCII_ACTION( sXML_expression, "expression");
+XML_CONSTASCII_ACTION( sXML_repeat_column, "repeat-column");
+XML_CONSTASCII_ACTION( sXML_repeat_row, "repeat-row");
+XML_CONSTASCII_ACTION( sXML_print_range, "print-range");
+
+XML_CONSTASCII_ACTION( sXML_filter, "filter");
+XML_CONSTASCII_ACTION( sXML_target_range_address, "target-range-address");
+XML_CONSTASCII_ACTION( sXML_condition_source_range_address, "condition-source-range-address");
+XML_CONSTASCII_ACTION( sXML_condition_source, "condition-source");
+XML_CONSTASCII_ACTION( sXML_display_duplicates, "display-duplicates");
+XML_CONSTASCII_ACTION( sXML_filter_and, "filter-and");
+XML_CONSTASCII_ACTION( sXML_filter_or, "filter-or");
+XML_CONSTASCII_ACTION( sXML_filter_condition, "filter-condition");
+XML_CONSTASCII_ACTION( sXML_field_number, "field-number");
+XML_CONSTASCII_ACTION( sXML_case_sensitive, "case-sensitive");
+XML_CONSTASCII_ACTION( sXML_data_type, "data-type");
+XML_CONSTASCII_ACTION( sXML_operator, "operator");
+
+XML_CONSTASCII_ACTION( sXML_database_ranges, "database-ranges");
+XML_CONSTASCII_ACTION( sXML_database_range, "database-range");
+XML_CONSTASCII_ACTION( sXML_is_selection, "is-selection");
+XML_CONSTASCII_ACTION( sXML_on_update_keep_styles, "on-update-keep-styles");
+XML_CONSTASCII_ACTION( sXML_on_update_keep_size, "on-update-keep-size");
+XML_CONSTASCII_ACTION( sXML_has_persistent_data, "has-persistent-data");
+XML_CONSTASCII_ACTION( sXML_orientation, "orientation");
+XML_CONSTASCII_ACTION( sXML_contains_header, "contains-header");
+XML_CONSTASCII_ACTION( sXML_display_filter_buttons, "display-filter-buttons");
+XML_CONSTASCII_ACTION( sXML_range_address, "range-address");
+XML_CONSTASCII_ACTION( sXML_database_source_sql, "database-source-sql");
+XML_CONSTASCII_ACTION( sXML_database_name, "database-name");
+XML_CONSTASCII_ACTION( sXML_sql_statement, "sql-statement");
+XML_CONSTASCII_ACTION( sXML_parse_sql_statement, "parse-sql-statement");
+XML_CONSTASCII_ACTION( sXML_database_source_table, "database-source-table");
+XML_CONSTASCII_ACTION( sXML_table_name, "table-name");
+XML_CONSTASCII_ACTION( sXML_database_source_query, "database-source-query");
+XML_CONSTASCII_ACTION( sXML_query_name, "query-name");
+XML_CONSTASCII_ACTION( sXML_sort, "sort");
+XML_CONSTASCII_ACTION( sXML_bind_styles_to_content, "bind-styles-to-content");
+XML_CONSTASCII_ACTION( sXML_sort_by, "sort-by");
+XML_CONSTASCII_ACTION( sXML_order, "order");
+XML_CONSTASCII_ACTION( sXML_subtotal_rules, "subtotal-rules");
+XML_CONSTASCII_ACTION( sXML_page_breaks_on_group_change, "page-breaks-on-group-change");
+XML_CONSTASCII_ACTION( sXML_sort_groups, "sort-groups");
+XML_CONSTASCII_ACTION( sXML_subtotal_rule, "subtotal-rule");
+XML_CONSTASCII_ACTION( sXML_group_by_field_number, "group-by-field-number");
+XML_CONSTASCII_ACTION( sXML_subtotal_field, "subtotal-field");
+XML_CONSTASCII_ACTION( sXML_function, "function");
+XML_CONSTASCII_ACTION( sXML_match, "match");
+XML_CONSTASCII_ACTION( sXML_nomatch, "!match");
+XML_CONSTASCII_ACTION( sXML_empty, "empty");
+XML_CONSTASCII_ACTION( sXML_noempty, "!empty");
+XML_CONSTASCII_ACTION( sXML_bottom_percent, "bottom percent");
+XML_CONSTASCII_ACTION( sXML_bottom_values, "bottom values");
+XML_CONSTASCII_ACTION( sXML_top_percent, "top percent");
+XML_CONSTASCII_ACTION( sXML_top_values, "top values");
+XML_CONSTASCII_ACTION( sXML_descending, "descending");
+XML_CONSTASCII_ACTION( sXML_ascending, "ascending");
+XML_CONSTASCII_ACTION( sXML_automatic, "automatic");
+XML_CONSTASCII_ACTION( sXML_row, "row");
+
+XML_CONSTASCII_ACTION( sXML_data_pilot_tables, "data-pilot-tables");
+XML_CONSTASCII_ACTION( sXML_application_data, "application-data");
+XML_CONSTASCII_ACTION( sXML_buttons, "buttons");
+XML_CONSTASCII_ACTION( sXML_grand_total, "grand-total");
+XML_CONSTASCII_ACTION( sXML_both, "both");
+XML_CONSTASCII_ACTION( sXML_ignore_empty_rows, "ignore-empty-rows");
+XML_CONSTASCII_ACTION( sXML_identify_categories, "identify-categories");
+XML_CONSTASCII_ACTION( sXML_data_pilot_table, "data-pilot-table");
+XML_CONSTASCII_ACTION( sXML_source_cell_range, "source-cell-range");
+XML_CONSTASCII_ACTION( sXML_source_name, "source-name");
+XML_CONSTASCII_ACTION( sXML_source_service, "source-service");
+XML_CONSTASCII_ACTION( sXML_object_name, "object-name");
+XML_CONSTASCII_ACTION( sXML_username, "username");
+XML_CONSTASCII_ACTION( sXML_passwort, "passwort");
+XML_CONSTASCII_ACTION( sXML_source_field_name, "source-field-name");
+XML_CONSTASCII_ACTION( sXML_is_data_layout_field, "is-data-layout-field");
+XML_CONSTASCII_ACTION( sXML_data, "data");
+XML_CONSTASCII_ACTION( sXML_used_hierarchy, "used-hierarchy");
+XML_CONSTASCII_ACTION( sXML_data_pilot_field, "data-pilot-field");
+XML_CONSTASCII_ACTION( sXML_display_empty, "display-empty");
+XML_CONSTASCII_ACTION( sXML_data_pilot_level, "data-pilot-level");
+XML_CONSTASCII_ACTION( sXML_data_pilot_subtotals, "data-pilot-subtotals");
+XML_CONSTASCII_ACTION( sXML_data_pilot_subtotal, "data-pilot-subtotal");
+XML_CONSTASCII_ACTION( sXML_data_pilot_members, "data-pilot-members");
+XML_CONSTASCII_ACTION( sXML_display_details, "display-details");
+XML_CONSTASCII_ACTION( sXML_data_pilot_member, "data-pilot-member");
+
+// draw namespace
+XML_CONSTASCII_ACTION( sXML_draw, "draw" );
+XML_CONSTASCII_ACTION( sXML_master_page_name , "master-page-name" );
+XML_CONSTASCII_ACTION( sXML_g , "g" );
+XML_CONSTASCII_ACTION( sXML_rect , "rect" );
+XML_CONSTASCII_ACTION( sXML_polyline , "polyline" );
+XML_CONSTASCII_ACTION( sXML_polygon , "polygon" );
+XML_CONSTASCII_ACTION( sXML_path , "path" );
+XML_CONSTASCII_ACTION( sXML_ellipse , "ellipse" );
+XML_CONSTASCII_ACTION( sXML_transform , "transform" );
+XML_CONSTASCII_ACTION( sXML_corner_radius , "corner-radius" );
+XML_CONSTASCII_ACTION( sXML_drawpool , "drawpool" );
+XML_CONSTASCII_ACTION( sXML_graphic , "graphic" );
+XML_CONSTASCII_ACTION( sXML_spreadsheet , "spreadsheet" );
+XML_CONSTASCII_ACTION( sXML_marker_start , "marker-start" );
+XML_CONSTASCII_ACTION( sXML_marker_end , "marker-end" );
+XML_CONSTASCII_ACTION( sXML_marker_start_width , "marker-start-width" );
+XML_CONSTASCII_ACTION( sXML_marker_end_width , "marker-end-width" );
+XML_CONSTASCII_ACTION( sXML_marker_start_center , "marker-start-center" );
+XML_CONSTASCII_ACTION( sXML_marker_end_center , "marker-end-center" );
+XML_CONSTASCII_ACTION( sXML_stroke_linejoin , "stroke-linejoin" );
+XML_CONSTASCII_ACTION( sXML_stroke_width, "stroke-width" );
+XML_CONSTASCII_ACTION( sXML_fill, "fill" );
+XML_CONSTASCII_ACTION( sXML_fill_color , "fill-color" );
+XML_CONSTASCII_ACTION( sXML_gradient_step_count , "gradient-step-count" );
+XML_CONSTASCII_ACTION( sXML_shadow_offset_x , "shadow-offset-x" );
+XML_CONSTASCII_ACTION( sXML_shadow_offset_y , "shadow-offset-y" );
+XML_CONSTASCII_ACTION( sXML_shadow_color , "shadow-color" );
+XML_CONSTASCII_ACTION( sXML_shadow_transparency , "shadow-transparency" );
+XML_CONSTASCII_ACTION( sXML_color_mode , "color-mode" );
+XML_CONSTASCII_ACTION( sXML_luminance , "luminance" );
+XML_CONSTASCII_ACTION( sXML_contrast , "contrast" );
+XML_CONSTASCII_ACTION( sXML_gamma , "gamma" );
+XML_CONSTASCII_ACTION( sXML_red , "red" );
+XML_CONSTASCII_ACTION( sXML_green , "green" );
+XML_CONSTASCII_ACTION( sXML_blue , "blue" );
+XML_CONSTASCII_ACTION( sXML_greyscale, "greyscale" );
+XML_CONSTASCII_ACTION( sXML_mono, "mono" );
+XML_CONSTASCII_ACTION( sXML_watermark, "watermark" );
+XML_CONSTASCII_ACTION( sXML_standard, "standard" );
+XML_CONSTASCII_ACTION( sXML_visible, "visible" );
+XML_CONSTASCII_ACTION( sXML_OLE2, "ole2" );
+XML_CONSTASCII_ACTION( sXML_fill_gradient_name, "fill-gradient-name" );
+XML_CONSTASCII_ACTION( sXML_fill_hatch_name, "fill-hatch-name" );
+XML_CONSTASCII_ACTION( sXML_fill_image_name, "fill-image-name" );
+XML_CONSTASCII_ACTION( sXML_transparency_name, "transparency-name" );
+XML_CONSTASCII_ACTION( sXML_fill_image, "fill-image" );
+XML_CONSTASCII_ACTION( sXML_transparency, "transparency" );
+XML_CONSTASCII_ACTION( sXML_marker, "marker" );
+
+
+XML_CONSTASCII_ACTION( sXML__unknown_, "_unknown_" );
+
+XML_CONSTASCII_ACTION( sXML_3DCube, "3dcube" );
+XML_CONSTASCII_ACTION( sXML_3DSphere, "3dsphere" );
+XML_CONSTASCII_ACTION( sXML_3DLathe, "3dlathe" );
+XML_CONSTASCII_ACTION( sXML_3DExtrude, "3dextrude" );
+XML_CONSTASCII_ACTION( sXML_3DPolygon, "3dpolygon" );
+
+XML_CONSTASCII_ACTION( sXML_gradient_style, "gradient-style" );
+XML_CONSTASCII_ACTION( sXML_start_color, "start-color" );
+XML_CONSTASCII_ACTION( sXML_end_color, "end-color" );
+XML_CONSTASCII_ACTION( sXML_start_intensity, "start-intensity" );
+XML_CONSTASCII_ACTION( sXML_end_intensity, "end-intensity" );
+XML_CONSTASCII_ACTION( sXML_gradient_angel, "gradient-angel" );
+XML_CONSTASCII_ACTION( sXML_gradient_border, "gradient-border" );
+
+XML_CONSTASCII_ACTION( sXML_hatch_style, "style" );
+XML_CONSTASCII_ACTION( sXML_hatch_distance, "hatch-distance" );
+XML_CONSTASCII_ACTION( sXML_rotation, "rotation" );
+XML_CONSTASCII_ACTION( sXML_hatchstyle_single, "single" );
+XML_CONSTASCII_ACTION( sXML_hatchstyle_double, "double" );
+XML_CONSTASCII_ACTION( sXML_hatchstyle_triple, "triple" );
+
+XML_CONSTASCII_ACTION( sXML_gradientstyle_linear, "linear" );
+XML_CONSTASCII_ACTION( sXML_gradientstyle_axial, "axial" );
+XML_CONSTASCII_ACTION( sXML_gradientstyle_radial, "radial" );
+XML_CONSTASCII_ACTION( sXML_gradientstyle_ellipsoid, "ellipsoid" );
+XML_CONSTASCII_ACTION( sXML_gradientstyle_square, "square" );
+XML_CONSTASCII_ACTION( sXML_gradientstyle_rectangular, "rectangular" );
+
+XML_CONSTASCII_ACTION( sXML_start_transparency, "start-transparency" );
+XML_CONSTASCII_ACTION( sXML_end_transparency, "end-transparency" );
+
+XML_CONSTASCII_ACTION( sXML_control, "control" );
+XML_CONSTASCII_ACTION( sXML_connector, "connector" );
+XML_CONSTASCII_ACTION( sXML_measure, "measure" );
+XML_CONSTASCII_ACTION( sXML_caption, "caption" );
+
+// presentation namespace
+XML_CONSTASCII_ACTION( sXML_notes, "notes" );
+XML_CONSTASCII_ACTION( sXML_presentation_page_layout_name, "presentation-page-layout-name" );
+XML_CONSTASCII_ACTION( sXML_placeholder, "placeholder" );
+XML_CONSTASCII_ACTION( sXML_object, "object" );
+XML_CONSTASCII_ACTION( sXML_presentation_title , "title" );
+XML_CONSTASCII_ACTION( sXML_presentation_outline , "outline" );
+XML_CONSTASCII_ACTION( sXML_presentation_notes , "notes" );
+XML_CONSTASCII_ACTION( sXML_presentation_subtitle , "subtitle" );
+XML_CONSTASCII_ACTION( sXML_presentation_object , "object" );
+XML_CONSTASCII_ACTION( sXML_presentation_chart , "chart" );
+XML_CONSTASCII_ACTION( sXML_presentation_table , "table" );
+XML_CONSTASCII_ACTION( sXML_presentation_orgchart , "orgchart" );
+XML_CONSTASCII_ACTION( sXML_presentation_page , "page" );
+XML_CONSTASCII_ACTION( sXML_presentation_graphic , "graphic" );
+XML_CONSTASCII_ACTION( sXML_manual, "manual" );
+XML_CONSTASCII_ACTION( sXML_semi_automatic, "semi-automatic" );
+XML_CONSTASCII_ACTION( sXML_slow, "slow" );
+XML_CONSTASCII_ACTION( sXML_medium, "medium" );
+XML_CONSTASCII_ACTION( sXML_fast, "fast" );
+XML_CONSTASCII_ACTION( sXML_user_transformed, "user-transformed" );
+
+// svg namespace
+XML_CONSTASCII_ACTION( sXML_x, "x" );
+XML_CONSTASCII_ACTION( sXML_y, "y" );
+XML_CONSTASCII_ACTION( sXML_r, "r" );
+XML_CONSTASCII_ACTION( sXML_x1, "x1" );
+XML_CONSTASCII_ACTION( sXML_y1, "y1" );
+XML_CONSTASCII_ACTION( sXML_x2, "x2" );
+XML_CONSTASCII_ACTION( sXML_y2, "y2" );
+XML_CONSTASCII_ACTION( sXML_cx, "cx" );
+XML_CONSTASCII_ACTION( sXML_cy, "cy" );
+XML_CONSTASCII_ACTION( sXML_rx, "rx" );
+XML_CONSTASCII_ACTION( sXML_ry, "ry" );
+XML_CONSTASCII_ACTION( sXML_viewBox, "viewBox" );
+XML_CONSTASCII_ACTION( sXML_points, "points" );
+XML_CONSTASCII_ACTION( sXML_d, "d" );
+
+// xlink namespace
+XML_CONSTASCII_ACTION( sXML_type, "type" );
+XML_CONSTASCII_ACTION( sXML_show, "show" );
+XML_CONSTASCII_ACTION( sXML_actuate, "actuate" );
+XML_CONSTASCII_ACTION( sXML_href, "href" );
+XML_CONSTASCII_ACTION( sXML_role, "role" );
+
+XML_CONSTASCII_ACTION( sXML_simple, "simple" );
+XML_CONSTASCII_ACTION( sXML_embed, "embed" );
+XML_CONSTASCII_ACTION( sXML_onLoad, "onLoad" );
+XML_CONSTASCII_ACTION( sXML_onRequest, "onRequest" );
+XML_CONSTASCII_ACTION( sXML_auto, "auto" );
+XML_CONSTASCII_ACTION( sXML_parsed, "parsed" );
+
+// dc namespace
+XML_CONSTASCII_ACTION( sXML_title, "title" );
+XML_CONSTASCII_ACTION( sXML_description, "description" );
+XML_CONSTASCII_ACTION( sXML_subject, "subject" );
+XML_CONSTASCII_ACTION( sXML_creator, "creator" );
+XML_CONSTASCII_ACTION( sXML_date, "date" );
+//char __FAR_DATA XML_CONSTASCII_ACTION( sXML_language, "language" );
+
+// number namespace
+
+XML_CONSTASCII_ACTION( sXML_number_style, "number-style" );
+XML_CONSTASCII_ACTION( sXML_currency_style, "currency-style" );
+XML_CONSTASCII_ACTION( sXML_percentage_style, "percentage-style" );
+XML_CONSTASCII_ACTION( sXML_date_style, "date-style" );
+XML_CONSTASCII_ACTION( sXML_time_style, "time-style" );
+XML_CONSTASCII_ACTION( sXML_boolean_style, "boolean-style" );
+XML_CONSTASCII_ACTION( sXML_text_style, "text-style" );
+XML_CONSTASCII_ACTION( sXML_number, "number" );
+XML_CONSTASCII_ACTION( sXML_scientific_number, "scientific-number" );
+XML_CONSTASCII_ACTION( sXML_fraction, "fraction" );
+XML_CONSTASCII_ACTION( sXML_currency_symbol, "currency-symbol" );
+XML_CONSTASCII_ACTION( sXML_text_content, "text-content" );
+XML_CONSTASCII_ACTION( sXML_day, "day" );
+XML_CONSTASCII_ACTION( sXML_month, "month" );
+XML_CONSTASCII_ACTION( sXML_year, "year" );
+XML_CONSTASCII_ACTION( sXML_day_of_week, "day-of-week" );
+XML_CONSTASCII_ACTION( sXML_week_of_year, "week-of-year" );
+XML_CONSTASCII_ACTION( sXML_quarter, "quarter" );
+XML_CONSTASCII_ACTION( sXML_hours, "hours" );
+XML_CONSTASCII_ACTION( sXML_minutes, "minutes" );
+XML_CONSTASCII_ACTION( sXML_seconds, "seconds" );
+XML_CONSTASCII_ACTION( sXML_am_pm, "am-pm" );
+XML_CONSTASCII_ACTION( sXML_short, "short" );
+XML_CONSTASCII_ACTION( sXML_long, "long" );
+XML_CONSTASCII_ACTION( sXML_automatic_order, "automatic-order" );
+XML_CONSTASCII_ACTION( sXML_format_source, "format-source" );
+XML_CONSTASCII_ACTION( sXML_truncate_on_overflow, "truncate-on-overflow" );
+XML_CONSTASCII_ACTION( sXML_volatile, "volatile" );
+XML_CONSTASCII_ACTION( sXML_decimal_places, "decimal-places" );
+XML_CONSTASCII_ACTION( sXML_min_integer_digits, "min-integer-digits" );
+XML_CONSTASCII_ACTION( sXML_min_exponent_digits, "min-exponent-digits" );
+XML_CONSTASCII_ACTION( sXML_min_numerator_digits, "min-numerator-digits" );
+XML_CONSTASCII_ACTION( sXML_min_denominator_digits, "min-denominator-digits" );
+XML_CONSTASCII_ACTION( sXML_grouping, "grouping" );
+XML_CONSTASCII_ACTION( sXML_decimal_replacement, "decimal-replacement" );
+XML_CONSTASCII_ACTION( sXML_textual, "textual" );
+
+XML_CONSTASCII_ACTION( sXML_fade_from_left, "fade-from-left" );
+XML_CONSTASCII_ACTION( sXML_fade_from_top, "fade-from-top" );
+XML_CONSTASCII_ACTION( sXML_fade_from_right, "fade-from-right" );
+XML_CONSTASCII_ACTION( sXML_fade_from_bottom, "fade-from-bottom" );
+XML_CONSTASCII_ACTION( sXML_fade_to_center, "fade-to-center" );
+XML_CONSTASCII_ACTION( sXML_fade_from_center, "fade-from-center" );
+XML_CONSTASCII_ACTION( sXML_move_from_left, "move-from-left" );
+XML_CONSTASCII_ACTION( sXML_move_from_top, "move-from-top" );
+XML_CONSTASCII_ACTION( sXML_move_from_right, "move-from-right" );
+XML_CONSTASCII_ACTION( sXML_move_from_bottom, "move-from-bottom" );
+XML_CONSTASCII_ACTION( sXML_roll_from_left, "roll-from-left" );
+XML_CONSTASCII_ACTION( sXML_roll_from_right, "roll-from-right" );
+XML_CONSTASCII_ACTION( sXML_roll_from_bottom, "roll-from-bottom" );
+XML_CONSTASCII_ACTION( sXML_vertical_stripes, "vertical-stripes" );
+XML_CONSTASCII_ACTION( sXML_horizontal_stripes, "horizontal-stripes" );
+XML_CONSTASCII_ACTION( sXML_clockwise, "clockwise" );
+XML_CONSTASCII_ACTION( sXML_counterclockwise, "counterclockwise" );
+XML_CONSTASCII_ACTION( sXML_fade_from_upperleft, "fade-from-upperleft" );
+XML_CONSTASCII_ACTION( sXML_fade_from_upperright, "fade-from-upperright" );
+XML_CONSTASCII_ACTION( sXML_fade_from_lowerleft, "fade-from-lowerleft" );
+XML_CONSTASCII_ACTION( sXML_fade_from_lowerright, "fade-from-lowerright" );
+XML_CONSTASCII_ACTION( sXML_close_vertical, "close-vertical" );
+XML_CONSTASCII_ACTION( sXML_close_horizontal, "close-horizontal" );
+XML_CONSTASCII_ACTION( sXML_open_vertical, "open-vertical" );
+XML_CONSTASCII_ACTION( sXML_open_horizontal, "open-horizontal" );
+XML_CONSTASCII_ACTION( sXML_spiralin_left, "spiralin-left" );
+XML_CONSTASCII_ACTION( sXML_spiralin_right, "spiralin-right" );
+XML_CONSTASCII_ACTION( sXML_spiralout_left, "spiralout-left" );
+XML_CONSTASCII_ACTION( sXML_spiralout_right, "spiralout-right" );
+XML_CONSTASCII_ACTION( sXML_dissolve, "dissolve" );
+XML_CONSTASCII_ACTION( sXML_wavyline_from_left, "wavyline-from-left" );
+XML_CONSTASCII_ACTION( sXML_wavyline_from_top, "wavyline-from-top" );
+XML_CONSTASCII_ACTION( sXML_wavyline_from_right, "wavyline-from-right" );
+XML_CONSTASCII_ACTION( sXML_wavyline_from_bottom, "wavyline-from-bottom" );
+XML_CONSTASCII_ACTION( sXML_random, "random" );
+XML_CONSTASCII_ACTION( sXML_stretch_from_left, "stretch-from-left" );
+XML_CONSTASCII_ACTION( sXML_stretch_from_top, "stretch-from-top" );
+XML_CONSTASCII_ACTION( sXML_stretch_from_right, "stretch-from-right" );
+XML_CONSTASCII_ACTION( sXML_stretch_from_bottom, "stretch-from-bottom" );
+XML_CONSTASCII_ACTION( sXML_vertical_lines, "vertical-lines" );
+XML_CONSTASCII_ACTION( sXML_horizontal_lines, "horizontal-lines" );
+
+// svg namespace
+XML_CONSTASCII_ACTION( sXML_miter , "miter" );
+XML_CONSTASCII_ACTION( sXML_round , "round" );
+XML_CONSTASCII_ACTION( sXML_bevel , "bevel" );
+XML_CONSTASCII_ACTION( sXML_bitmap , "bitmap" );
+XML_CONSTASCII_ACTION( sXML_gradient , "gradient" );
+XML_CONSTASCII_ACTION( sXML_hatch , "hatch" );
+XML_CONSTASCII_ACTION( sXML_dash, "dash" );
+XML_CONSTASCII_ACTION( sXML_stroke , "stroke" );
+XML_CONSTASCII_ACTION( sXML_stroke_dasharray , "stroke-dasharray" );
+XML_CONSTASCII_ACTION( sXML_stroke_color , "stroke-color" );
+
+// chart namespace
+// elements
+XML_CONSTASCII_ACTION( sXML_chart, "chart" );
+XML_CONSTASCII_ACTION( sXML_plot_area, "plot-area" );
+XML_CONSTASCII_ACTION( sXML_subtitle, "subtitle" );
+XML_CONSTASCII_ACTION( sXML_legend, "legend" );
+XML_CONSTASCII_ACTION( sXML_wall, "wall" );
+XML_CONSTASCII_ACTION( sXML_floor, "floor" );
+XML_CONSTASCII_ACTION( sXML_axis, "axis" );
+XML_CONSTASCII_ACTION( sXML_grid, "grid" );
+XML_CONSTASCII_ACTION( sXML_series, "series" );
+XML_CONSTASCII_ACTION( sXML_domain, "domain" );
+XML_CONSTASCII_ACTION( sXML_categories, "categories" );
+XML_CONSTASCII_ACTION( sXML_data_point, "data-point" );
+XML_CONSTASCII_ACTION( sXML_statistics, "statistics" );
+// attributes
+XML_CONSTASCII_ACTION( sXML_scale_text, "scale-text" );
+XML_CONSTASCII_ACTION( sXML_legend_position, "legend-position" );
+XML_CONSTASCII_ACTION( sXML_repeated, "repeated" );
+XML_CONSTASCII_ACTION( sXML_attached_axis, "attached-axis" );
+XML_CONSTASCII_ACTION( sXML_values_cell_range_address, "values-cell-range-address" );
+XML_CONSTASCII_ACTION( sXML_label_cell_address, "label-cell-address" );
+// entity values
+XML_CONSTASCII_ACTION( sXML_area, "area" );
+XML_CONSTASCII_ACTION( sXML_circle, "circle" );
+XML_CONSTASCII_ACTION( sXML_ring, "ring" );
+XML_CONSTASCII_ACTION( sXML_scatter, "scatter" );
+XML_CONSTASCII_ACTION( sXML_radar, "radar" );
+XML_CONSTASCII_ACTION( sXML_bar, "bar" );
+XML_CONSTASCII_ACTION( sXML_stock, "stock" );
+XML_CONSTASCII_ACTION( sXML_bubble, "bubble" );
+XML_CONSTASCII_ACTION( sXML_category, "category" );
+XML_CONSTASCII_ACTION( sXML_major, "major" );
+XML_CONSTASCII_ACTION( sXML_minor, "minor" );
+// properties
+XML_CONSTASCII_ACTION( sXML_stock_updown_bars, "stock-updown-bars" );
+XML_CONSTASCII_ACTION( sXML_stock_with_volume, "stock-with-volume" );
+XML_CONSTASCII_ACTION( sXML_three_dimensional, "three-dimensional" );
+XML_CONSTASCII_ACTION( sXML_deep, "deep" );
+XML_CONSTASCII_ACTION( sXML_shape, "shape" );
+XML_CONSTASCII_ACTION( sXML_splines, "splines" );
+XML_CONSTASCII_ACTION( sXML_stacked, "stacked" );
+XML_CONSTASCII_ACTION( sXML_symbol, "symbol" );
+XML_CONSTASCII_ACTION( sXML_vertical, "vertical" );
+XML_CONSTASCII_ACTION( sXML_minimum, "minimum" );
+XML_CONSTASCII_ACTION( sXML_maximum, "maximum" );
+XML_CONSTASCII_ACTION( sXML_interval_major, "interval-major" );
+XML_CONSTASCII_ACTION( sXML_interval_minor, "interval-minor" );
+XML_CONSTASCII_ACTION( sXML_origin, "origin" );
+XML_CONSTASCII_ACTION( sXML_logarithmic, "logarithmic" );
+XML_CONSTASCII_ACTION( sXML_tick_marks_major_inner, "tick-marks-major-inner" );
+XML_CONSTASCII_ACTION( sXML_tick_marks_major_outer, "tick-marks-major-outer" );
+XML_CONSTASCII_ACTION( sXML_tick_marks_minor_inner, "tick-marks-minor-inner" );
+XML_CONSTASCII_ACTION( sXML_tick_marks_minor_outer, "tick-marks-minor-outer" );
+XML_CONSTASCII_ACTION( sXML_gap_width, "gap-width" );
+XML_CONSTASCII_ACTION( sXML_overlap, "overlap" );
+XML_CONSTASCII_ACTION( sXML_label_arrangement, "label-arrangement" );
+XML_CONSTASCII_ACTION( sXML_side_by_side, "side-by-side" );
+XML_CONSTASCII_ACTION( sXML_stagger_odd, "stagger-odd" );
+XML_CONSTASCII_ACTION( sXML_stagger_even, "stagger-even" );
+XML_CONSTASCII_ACTION( sXML_variance, "variance" );
+XML_CONSTASCII_ACTION( sXML_mean_value, "mean-value" );
+XML_CONSTASCII_ACTION( sXML_standard_deviation, "standard-deviation" );
+XML_CONSTASCII_ACTION( sXML_error_margin, "error-margin" );
+XML_CONSTASCII_ACTION( sXML_error_upper_limit, "error-upper-limit" );
+XML_CONSTASCII_ACTION( sXML_error_lower_limit, "error-lower-limit" );
+XML_CONSTASCII_ACTION( sXML_error_upper_indicator, "error-upper-indicator" );
+XML_CONSTASCII_ACTION( sXML_error_lower_indicator, "error-lower-indicator" );
+XML_CONSTASCII_ACTION( sXML_constant, "constant" );
+XML_CONSTASCII_ACTION( sXML_linear, "linear" );
+XML_CONSTASCII_ACTION( sXML_exponential, "exponential" );
+XML_CONSTASCII_ACTION( sXML_polynomial, "polynomial" );
+XML_CONSTASCII_ACTION( sXML_power, "power" );
+XML_CONSTASCII_ACTION( sXML_data_label_number, "data-label-number" );
+XML_CONSTASCII_ACTION( sXML_data_label_text, "data-label-text" );
+XML_CONSTASCII_ACTION( sXML_data_label_symbol, "data-label-symbol" );
+XML_CONSTASCII_ACTION( sXML_solid_type, "solid-type" );
+XML_CONSTASCII_ACTION( sXML_cuboid, "cuboid" );
+XML_CONSTASCII_ACTION( sXML_cylinder, "cylinder" );
+XML_CONSTASCII_ACTION( sXML_cone, "cone" );
+XML_CONSTASCII_ACTION( sXML_pyramid, "pyramid" );
+XML_CONSTASCII_ACTION( sXML_connect_bars, "connect-bars" );
+XML_CONSTASCII_ACTION( sXML_lines_used, "lines-used" );
+XML_CONSTASCII_ACTION( sXML_pie_offset, "pie-offset" );
+
+#endif
+
diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx
new file mode 100644
index 0000000000..1b97391c28
--- /dev/null
+++ b/xmloff/inc/xmlnmspe.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlnmspe.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLNMSPE_HXX
+#define _XMLOFF_XMLNMSPE_HXX
+
+#ifndef _SAL_TYPES_H_
+#include <sal/types.h>
+#endif
+
+#define XML_NAMESPACE( prefix, key ) \
+const sal_uInt16 XML_NAMESPACE_##prefix = key; \
+const sal_uInt16 XML_NAMESPACE_##prefix##_IDX = key;
+
+#define XML_OLD_NAMESPACE( prefix, index ) \
+const sal_uInt16 XML_OLD_NAMESPACE_##prefix##_IDX = \
+ (_XML_OLD_NAMESPACE_BASE+index);
+
+// current namespaces
+// These namespaces have the same index in the namespace table as prefix used.
+// If a namespace is added, _XML_OLD_NAMESPACE_BASE has to be adjusted!
+XML_NAMESPACE( OFFICE, 0U )
+XML_NAMESPACE( STYLE, 1U )
+XML_NAMESPACE( TEXT , 2U )
+XML_NAMESPACE( TABLE, 3U )
+XML_NAMESPACE( DRAW , 4U )
+XML_NAMESPACE( FO , 5U )
+XML_NAMESPACE( XLINK, 6U )
+XML_NAMESPACE( DC , 7U )
+XML_NAMESPACE( META , 8U )
+XML_NAMESPACE( NUMBER, 9U )
+XML_NAMESPACE( PRESENTATION, 10U )
+XML_NAMESPACE( SVG, 11U )
+XML_NAMESPACE( CHART, 12U )
+
+#define _XML_OLD_NAMESPACE_BASE 13U
+
+// namespaces used in the technical preview (SO 5.2)
+XML_OLD_NAMESPACE( FO, 0U )
+XML_OLD_NAMESPACE( XLINK, 1U )
+
+XML_OLD_NAMESPACE( OFFICE, 2U )
+XML_OLD_NAMESPACE( STYLE, 3U )
+XML_OLD_NAMESPACE( TEXT, 4U )
+XML_OLD_NAMESPACE( TABLE, 5U )
+XML_OLD_NAMESPACE( META, 6U )
+
+
+
+#endif // _XMLOFF_XMLNMSPE_HXX
diff --git a/xmloff/inc/xmltabe.hxx b/xmloff/inc/xmltabe.hxx
new file mode 100644
index 0000000000..48826b2cf3
--- /dev/null
+++ b/xmloff/inc/xmltabe.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmltabe.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLTABE_HXX
+#define _XMLOFF_XMLTABE_HXX
+
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
+#ifndef _VCL_MAPUNIT_HXX
+#include <vcl/mapunit.hxx>
+#endif
+
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include "attrlist.hxx"
+#endif
+
+class SvXMLNamespaceMap;
+class SvXMLUnitConverter;
+
+#ifndef _COM_SUN_STAR_STYLE_TABSTOP_HPP_
+#include <com/sun/star/style/TabStop.hpp>
+#endif
+
+class SvxXMLTabStopExport
+{
+ const ::rtl::OUString msCDATA;
+ const ::rtl::OUString msWS;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler; // the handlers
+
+ SvXMLAttributeList *mpAttrList; // a common attribute list
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > mxAttrList; // and an interface of it
+
+ const SvXMLNamespaceMap *mpNamespaceMap; // the namepspace map
+ const SvXMLUnitConverter& mrUnitConv;
+
+protected:
+
+ // Check if common attribute list is empty.
+#ifdef PRODUCT
+ void CheckAttrList() {}
+#else
+ void CheckAttrList();
+#endif
+ void ClearAttrList();
+ void AddAttribute( sal_uInt16 nPrefixKey, const char *pName,
+ const ::rtl::OUString& rValue );
+ ::rtl::OUString GetQNameByKey( sal_uInt16 nKey,
+ const ::rtl::OUString& rLocalName ) const;
+
+ void exportTabStop( const ::com::sun::star::style::TabStop* pTabStop );
+
+public:
+
+ SvxXMLTabStopExport( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLUnitConverter& rUnitConverter );
+ virtual ~SvxXMLTabStopExport();
+
+ // core API
+ void Export( const ::com::sun::star::uno::Any& rAny, const SvXMLNamespaceMap& rNamespMap );
+};
+
+
+#endif // _XMLOFF_XMLTABE_HXX
+
diff --git a/xmloff/inc/xmltabi.hxx b/xmloff/inc/xmltabi.hxx
new file mode 100644
index 0000000000..f4e65addf5
--- /dev/null
+++ b/xmloff/inc/xmltabi.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmltabi.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLTABI_HXX
+#define _XMLOFF_XMLTABI_HXX
+
+#ifndef _XMLOFF_XMLELEMENTPROPERTYCONTEXT_HXX
+#include "XMLElementPropertyContext.hxx"
+#endif
+
+class SvxXMLTabStopArray_Impl;
+class SvXMLImport;
+
+namespace rtl
+{
+ class OUString;
+}
+
+class SvxXMLTabStopImportContext : public XMLElementPropertyContext
+{
+private:
+ SvxXMLTabStopArray_Impl* mpTabStops;
+
+public:
+ TYPEINFO();
+
+ SvxXMLTabStopImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const XMLPropertyState& rProp,
+ ::std::vector< XMLPropertyState > &rProps );
+
+ virtual ~SvxXMLTabStopImportContext();
+
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void EndElement();
+};
+
+
+#endif // _XMLOFF_XMLTABI_HXX
+
diff --git a/xmloff/prj/d.lst b/xmloff/prj/d.lst
new file mode 100644
index 0000000000..79d0e84e25
--- /dev/null
+++ b/xmloff/prj/d.lst
@@ -0,0 +1,73 @@
+mkdir: %_DEST%\inc%_EXT%\xmloff
+
+..\%__SRC%\misc\*.map %_DEST%\bin%_EXT%\*.map
+..\%__SRC%\lib\ixo.lib %_DEST%\lib%_EXT%\ixo.lib
+..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
+..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*.so
+
+hedabu: ..\inc\attrlist.hxx %_DEST%\inc%_EXT%\xmloff\attrlist.hxx
+hedabu: ..\inc\i18nmap.hxx %_DEST%\inc%_EXT%\xmloff\i18nmap.hxx
+hedabu: ..\inc\nmspmap.hxx %_DEST%\inc%_EXT%\xmloff\nmspmap.hxx
+hedabu: ..\inc\unoatrcn.hxx %_DEST%\inc%_EXT%\xmloff\unoatrcn.hxx
+hedabu: ..\inc\xmlcnimp.hxx %_DEST%\inc%_EXT%\xmloff\xmlcnimp.hxx
+hedabu: ..\inc\xmlbrshi.hxx %_DEST%\inc%_EXT%\xmloff\xmlbrshi.hxx
+hedabu: ..\inc\xmlbrshe.hxx %_DEST%\inc%_EXT%\xmloff\xmlbrshe.hxx
+hedabu: ..\inc\xmlcnitm.hxx %_DEST%\inc%_EXT%\xmloff\xmlcnitm.hxx
+hedabu: ..\inc\xmlement.hxx %_DEST%\inc%_EXT%\xmloff\xmlement.hxx
+hedabu: ..\inc\xmlexpit.hxx %_DEST%\inc%_EXT%\xmloff\xmlexpit.hxx
+hedabu: ..\inc\xmlictxt.hxx %_DEST%\inc%_EXT%\xmloff\xmlictxt.hxx
+hedabu: ..\inc\xmlimp.hxx %_DEST%\inc%_EXT%\xmloff\xmlimp.hxx
+hedabu: ..\inc\xmlitmap.hxx %_DEST%\inc%_EXT%\xmloff\xmlitmap.hxx
+hedabu: ..\inc\xmlkywd.hxx %_DEST%\inc%_EXT%\xmloff\xmlkywd.hxx
+hedabu: ..\inc\xmlmetae.hxx %_DEST%\inc%_EXT%\xmloff\xmlmetae.hxx
+hedabu: ..\inc\xmlmetai.hxx %_DEST%\inc%_EXT%\xmloff\xmlmetai.hxx
+hedabu: ..\inc\hxx %_DEST%\inc%_EXT%\xmloff\hxx.hxx
+hedabu: ..\inc\xmlstyle.hxx %_DEST%\inc%_EXT%\xmloff\xmlstyle.hxx
+hedabu: ..\inc\xmltkmap.hxx %_DEST%\inc%_EXT%\xmloff\xmltkmap.hxx
+hedabu: ..\inc\xmluconv.hxx %_DEST%\inc%_EXT%\xmloff\xmluconv.hxx
+hedabu: ..\inc\xmlnmspe.hxx %_DEST%\inc%_EXT%\xmloff\xmlnmspe.hxx
+hedabu: ..\inc\xmlnumfi.hxx %_DEST%\inc%_EXT%\xmloff\xmlnumfi.hxx
+hedabu: ..\inc\xmlnumfe.hxx %_DEST%\inc%_EXT%\xmloff\xmlnumfe.hxx
+hedabu: ..\inc\xmlexp.hxx %_DEST%\inc%_EXT%\xmloff\xmlexp.hxx
+hedabu: ..\inc\xmlastpl.hxx %_DEST%\inc%_EXT%\xmloff\xmlastpl.hxx
+hedabu: ..\inc\xmlitem.hxx %_DEST%\inc%_EXT%\xmloff\xmlitem.hxx
+hedabu: ..\inc\xmlimpit.hxx %_DEST%\inc%_EXT%\xmloff\xmlimpit.hxx
+hedabu: ..\inc\xmlnumi.hxx %_DEST%\inc%_EXT%\xmloff\xmlnumi.hxx
+hedabu: ..\inc\xmlnume.hxx %_DEST%\inc%_EXT%\xmloff\xmlnume.hxx
+hedabu: ..\inc\xmltabi.hxx %_DEST%\inc%_EXT%\xmloff\xmltabi.hxx
+hedabu: ..\inc\xmltabe.hxx %_DEST%\inc%_EXT%\xmloff\xmltabe.hxx
+hedabu: ..\inc\maptype.hxx %_DEST%\inc%_EXT%\xmloff\maptype.hxx
+hedabu: ..\inc\uniref.hxx %_DEST%\inc%_EXT%\xmloff\uniref.hxx
+hedabu: ..\inc\xmlaustp.hxx %_DEST%\inc%_EXT%\xmloff\xmlaustp.hxx
+hedabu: ..\inc\xmlexppr.hxx %_DEST%\inc%_EXT%\xmloff\xmlexppr.hxx
+hedabu: ..\inc\xmlimppr.hxx %_DEST%\inc%_EXT%\xmloff\xmlimppr.hxx
+hedabu: ..\inc\xmlprcon.hxx %_DEST%\inc%_EXT%\xmloff\xmlprcon.hxx
+hedabu: ..\inc\xmlprhdl.hxx %_DEST%\inc%_EXT%\xmloff\xmlprhdl.hxx
+hedabu: ..\inc\xmlprmap.hxx %_DEST%\inc%_EXT%\xmloff\xmlprmap.hxx
+hedabu: ..\inc\xmltypes.hxx %_DEST%\inc%_EXT%\xmloff\xmltypes.hxx
+hedabu: ..\inc\families.hxx %_DEST%\inc%_EXT%\xmloff\families.hxx
+hedabu: ..\inc\styleexp.hxx %_DEST%\inc%_EXT%\xmloff\styleexp.hxx
+hedabu: ..\inc\txtstyle.hxx %_DEST%\inc%_EXT%\xmloff\txtstyle.hxx
+hedabu: ..\inc\prstylei.hxx %_DEST%\inc%_EXT%\xmloff\prstylei.hxx
+hedabu: ..\inc\txtstyli.hxx %_DEST%\inc%_EXT%\xmloff\txtstyli.hxx
+hedabu: ..\inc\txtprmap.hxx %_DEST%\inc%_EXT%\xmloff\txtprmap.hxx
+hedabu: ..\inc\pkgurl.hxx %_DEST%\inc%_EXT%\xmloff\pkgurl.hxx
+hedabu: ..\inc\txtflde.hxx %_DEST%\inc%_EXT%\xmloff\txtflde.hxx
+hedabu: ..\inc\txtfldi.hxx %_DEST%\inc%_EXT%\xmloff\txtfldi.hxx
+hedabu: ..\inc\txtvfldi.hxx %_DEST%\inc%_EXT%\xmloff\txtvfldi.hxx
+hedabu: ..\inc\txtparae.hxx %_DEST%\inc%_EXT%\xmloff\txtparae.hxx
+hedabu: ..\inc\txtimp.hxx %_DEST%\inc%_EXT%\xmloff\txtimp.hxx
+hedabu: ..\inc\prhdlfac.hxx %_DEST%\inc%_EXT%\xmloff\prhdlfac.hxx
+hedabu: ..\inc\EnumPropertyHdl.hxx %_DEST%\inc%_EXT%\xmloff\EnumPropertyHdl.hxx
+hedabu: ..\inc\NamedBoolPropertyHdl.hxx %_DEST%\inc%_EXT%\xmloff\NamedBoolPropertyHdl.hxx
+hedabu: ..\inc\numehelp.hxx %_DEST%\inc%_EXT%\xmloff\numehelp.hxx
+hedabu: ..\inc\sdxmlimp.hxx %_DEST%\inc%_EXT%\xmloff\sdxmlimp.hxx
+hedabu: ..\inc\sdxmlexp.hxx %_DEST%\inc%_EXT%\xmloff\sdxmlexp.hxx
+hedabu: ..\inc\XMLTextListAutoStylePool.hxx %_DEST%\inc%_EXT%\xmloff\XMLTextListAutoStylePool.hxx
+hedabu: ..\inc\SchXMLExport.hxx %_DEST%\inc%_EXT%\xmloff\SchXMLExport.hxx
+hedabu: ..\inc\SchXMLImport.hxx %_DEST%\inc%_EXT%\xmloff\SchXMLImport.hxx
+hedabu: ..\inc\SchXMLTableAddresses.hxx %_DEST%\inc%_EXT%\xmloff\SchXMLTableAddresses.hxx
+hedabu: ..\inc\shapeexport.hxx %_DEST%\inc%_EXT%\xmloff\shapeexport.hxx
+hedabu: ..\inc\shapeimport.hxx %_DEST%\inc%_EXT%\xmloff\shapeimport.hxx
+hedabu: ..\inc\SchXMLExportHelper.hxx %_DEST%\inc%_EXT%\xmloff\SchXMLExportHelper.hxx
+hedabu: ..\inc\SchXMLImportHelper.hxx %_DEST%\inc%_EXT%\xmloff\SchXMLImportHelper.hxx
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
new file mode 100644
index 0000000000..eb2065a4da
--- /dev/null
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -0,0 +1,474 @@
+/*************************************************************************
+ *
+ * $RCSfile: PropertyMaps.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "XMLChartPropertySetMapper.hxx"
+
+#ifndef _XMLOFF_PROPMAPPINGTYPES_HXX
+#include "maptype.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLTYPES_HXX
+#include "xmltypes.hxx"
+#endif
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlement.hxx"
+#endif
+#ifndef _XMLOFF_ENUMPROPERTYHANDLER_HXX
+#include "EnumPropertyHdl.hxx"
+#endif
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include "attrlist.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_CHART_CHARTAXISARRANGEORDERTYPE_HPP_
+#include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTERRORCATEGORY_HPP_
+#include <com/sun/star/chart/ChartErrorCategory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTERRORINDICATORTYPE_HPP_
+#include <com/sun/star/chart/ChartErrorIndicatorType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTREGRESSIONCURVETYPE_HPP_
+#include <com/sun/star/chart/ChartRegressionCurveType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTAXISMARKS_HPP_
+#include <com/sun/star/chart/ChartAxisMarks.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTDATACAPTION_HPP_
+#include <com/sun/star/chart/ChartDataCaption.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTSOLIDTYPE_HPP_
+#include <com/sun/star/chart/ChartSolidType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTSYMBOLTYPE_HPP_
+#include <com/sun/star/chart/ChartSymbolType.hpp>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+using namespace com::sun::star;
+
+#define XML_SCH_TYPE_AXIS_ARRANGEMENT ( XML_SCH_TYPES_START + 0 )
+#define XML_SCH_TYPE_ERROR_CATEGORY ( XML_SCH_TYPES_START + 1 )
+#define XML_SCH_TYPE_REGRESSION_TYPE ( XML_SCH_TYPES_START + 2 )
+#define XML_SCH_TYPE_SOLID_TYPE ( XML_SCH_TYPES_START + 3 )
+
+#define MAP_ENTRY( a, ns, nm, t ) { a, XML_NAMESPACE_##ns, sXML_##nm, t }
+#define MAP_CONTEXT( a, ns, nm, t, c ) { a, XML_NAMESPACE_##ns, sXML_##nm, t, c }
+#define MAP_SPECIAL( a, ns, nm, t, c ) { a, XML_NAMESPACE_##ns, sXML_##nm, t | MID_FLAG_SPECIAL_ITEM, XML_SCH_SPECIAL_##c }
+#define MAP_ENTRY_END { 0,0,0,0 }
+
+#define XML_SCH_SPECIAL_TICKS_MAJ_INNER 1
+#define XML_SCH_SPECIAL_TICKS_MAJ_OUTER 2
+#define XML_SCH_SPECIAL_TICKS_MIN_INNER 3
+#define XML_SCH_SPECIAL_TICKS_MIN_OUTER 4
+#define XML_SCH_SPECIAL_ERROR_UPPER_INDICATOR 5
+#define XML_SCH_SPECIAL_ERROR_LOWER_INDICATOR 6
+#define XML_SCH_SPECIAL_TEXT_ROTATION 7
+#define XML_SCH_SPECIAL_DATA_LABEL_NUMBER 8
+#define XML_SCH_SPECIAL_DATA_LABEL_TEXT 9
+#define XML_SCH_SPECIAL_DATA_LABEL_SYMBOL 10
+
+#define XML_SCH_USER_SYMBOL 1001
+
+const XMLPropertyMapEntry aXMLChartPropMap[] =
+{
+ // chart subtypes
+ MAP_ENTRY( "UpDown", CHART, stock_updown_bars, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Volume", CHART, stock_with_volume, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Dim3D", CHART, three_dimensional, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Deep", CHART, deep, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Lines", CHART, lines, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Percent", CHART, percentage, XML_TYPE_BOOL ),
+ MAP_ENTRY( "SolidType", CHART, solid_type, XML_SCH_TYPE_SOLID_TYPE ),
+ MAP_ENTRY( "SplineType", CHART, splines, XML_TYPE_NUMBER ),
+ MAP_ENTRY( "Stacked", CHART, stacked, XML_TYPE_BOOL ),
+ MAP_CONTEXT( "SymbolType", CHART, symbol, XML_TYPE_NUMBER, XML_SCH_USER_SYMBOL ),
+ MAP_ENTRY( "Vertical", CHART, vertical, XML_TYPE_BOOL ),
+ MAP_ENTRY( "NumberOfLines", CHART, lines_used, XML_TYPE_NUMBER ),
+ MAP_ENTRY( "StackedBarsConnected", CHART, connect_bars, XML_TYPE_BOOL ),
+
+ // axis properties
+ MAP_ENTRY( "DisplayLabels", CHART, display_label, XML_TYPE_BOOL ),
+ MAP_SPECIAL( "Marks", CHART, tick_marks_major_inner, XML_TYPE_NUMBER, TICKS_MAJ_INNER ), // convert one constant
+ MAP_SPECIAL( "Marks", CHART, tick_marks_major_outer, XML_TYPE_NUMBER, TICKS_MAJ_OUTER ), // to two bools
+ MAP_SPECIAL( "HelpMarks", CHART, tick_marks_minor_inner, XML_TYPE_NUMBER, TICKS_MIN_INNER ), // see above
+ MAP_SPECIAL( "HelpMarks", CHART, tick_marks_minor_outer, XML_TYPE_NUMBER, TICKS_MIN_OUTER ),
+ MAP_ENTRY( "Logarithmic", CHART, logarithmic, XML_TYPE_BOOL ),
+ MAP_ENTRY( "Max", CHART, maximum, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "Min", CHART, minimum, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "Origin", CHART, origin, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "Step", CHART, interval_major, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "StepHelp", CHART, interval_minor, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "GapWidth", CHART, gap_width, XML_TYPE_NUMBER ),
+ MAP_ENTRY( "Overlap", CHART, overlap, XML_TYPE_NUMBER ),
+ MAP_ENTRY( "TextBreak", TEXT, line_break, XML_TYPE_BOOL ),
+ MAP_ENTRY( "ArrangeOrder", CHART, label_arrangement, XML_SCH_TYPE_AXIS_ARRANGEMENT ),
+// MAP_ENTRY( NUMBERFORMAT ) separate style - use HelperClass
+
+ // statistical properties
+ MAP_ENTRY( "MeanValue", CHART, mean_value, XML_TYPE_BOOL ),
+ MAP_ENTRY( "ErrorMargin", CHART, error_margin, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "ConstantErrorLow", CHART, error_lower_limit, XML_TYPE_DOUBLE ),
+ MAP_ENTRY( "ConstantErrorHigh", CHART, error_upper_limit, XML_TYPE_DOUBLE ),
+ MAP_SPECIAL( "ErrorIndicator", CHART, error_upper_indicator, XML_TYPE_NUMBER, ERROR_UPPER_INDICATOR ), // convert one constant
+ MAP_SPECIAL( "ErrorIndicator", CHART, error_lower_indicator, XML_TYPE_NUMBER, ERROR_LOWER_INDICATOR ), // to two bools
+// MAP_ENTRY( "ErrorCategory", CHART, SCHATTR_STAT_KIND_ERROR, &::getCppuType((const chart::ChartErrorCategory*)0), 0, 0 },\
+// MAP_ENTRY( "PercentageError", CHART, SCHATTR_STAT_PERCENT, &::getCppuType((const double*)0), 0, 0 },\
+// MAP_ENTRY( "RegressionCurves", CHART, SCHATTR_STAT_REGRESSTYPE, &::getCppuType((const chart::ChartRegressionCurveType*)0), 0, 0 }
+
+ // series/data-point properties
+ MAP_SPECIAL( "DataCaption", CHART, data_label_number, XML_TYPE_NUMBER, DATA_LABEL_NUMBER ), // convert one constant
+ MAP_SPECIAL( "DataCaption", CHART, data_label_text, XML_TYPE_NUMBER, DATA_LABEL_TEXT ), // to 'tristate' and two bools
+ MAP_SPECIAL( "DataCaption", CHART, data_label_symbol, XML_TYPE_NUMBER, DATA_LABEL_SYMBOL ),
+ MAP_ENTRY( "SegmentOffset", CHART, pie_offset, XML_TYPE_NUMBER ),
+
+ // text properties for titles
+ MAP_SPECIAL( "TextRotation", TEXT, rotation_angle, XML_TYPE_NUMBER, TEXT_ROTATION ), // convert 1/100th degrees to degrees
+
+ // misc properties
+
+ // draw properties
+ // ...
+
+ // stroke attributes
+// { "LineStyle", XML_NAMESPACE_DRAW, sXML_stroke, XML_SD_TYPE_STROKE, 0 },
+// { "LineDash", XML_NAMESPACE_SVG, sXML_stroke_dasharray, XML_SD_TYPE_DASHARRAY, 0 },
+// { "LineWidth", XML_NAMESPACE_SVG, sXML_stroke_width, XML_TYPE_MEASURE, 0 },
+// { "LineColor", XML_NAMESPACE_SVG, sXML_stroke_color, XML_TYPE_COLOR, 0 },
+// { "LineStartWidth", XML_NAMESPACE_DRAW, sXML_marker_start_width, XML_TYPE_MEASURE, 0 },
+// { "LineStartCenter",XML_NAMESPACE_DRAW, sXML_marker_start_center, XML_TYPE_BOOL, 0 },
+// { "LineEndWidth", XML_NAMESPACE_DRAW, sXML_marker_end_width, XML_TYPE_MEASURE, 0 },
+// { "LineEndCenter", XML_NAMESPACE_DRAW, sXML_marker_end_center, XML_TYPE_BOOL, 0 },
+// { "LineJoint", XML_NAMESPACE_SVG, sXML_stroke_linejoin, XML_SD_TYPE_LINEJOIN, 0 },
+
+// // fill attributes
+// { "FillStyle", XML_NAMESPACE_DRAW, sXML_fill, XML_SD_TYPE_FILLSTYLE, 0 },
+// { "FillColor", XML_NAMESPACE_DRAW, sXML_fill_color, XML_TYPE_COLOR, 0 },
+
+ MAP_ENTRY_END
+};
+
+// ----------------------------------------
+// maps for enums to XML attributes
+// ----------------------------------------
+
+SvXMLEnumMapEntry aXMLChartAxisArrangementEnumMap[] =
+{
+ { sXML_side_by_side, chart::ChartAxisArrangeOrderType_SIDE_BY_SIDE },
+ { sXML_stagger_even, chart::ChartAxisArrangeOrderType_STAGGER_EVEN },
+ { sXML_stagger_odd, chart::ChartAxisArrangeOrderType_STAGGER_ODD }
+};
+
+SvXMLEnumMapEntry aXMLChartErrorCategoryEnumMap[] =
+{
+ { sXML_none, chart::ChartErrorCategory_NONE },
+ { sXML_variance, chart::ChartErrorCategory_VARIANCE },
+ { sXML_standard_deviation, chart::ChartErrorCategory_STANDARD_DEVIATION },
+ { sXML_percentage, chart::ChartErrorCategory_PERCENT },
+ { sXML_error_margin, chart::ChartErrorCategory_ERROR_MARGIN },
+ { sXML_constant, chart::ChartErrorCategory_CONSTANT_VALUE }
+};
+
+SvXMLEnumMapEntry aXMLChartRegressionCurveTypeEnumMap[] =
+{
+ { sXML_none, chart::ChartRegressionCurveType_NONE },
+ { sXML_linear, chart::ChartRegressionCurveType_LINEAR },
+ { sXML_logarithmic, chart::ChartRegressionCurveType_LOGARITHM },
+ { sXML_exponential, chart::ChartRegressionCurveType_EXPONENTIAL },
+ { sXML_polynomial, chart::ChartRegressionCurveType_POLYNOMIAL },
+ { sXML_power, chart::ChartRegressionCurveType_POWER }
+};
+
+SvXMLEnumMapEntry aXMLChartSolidTypeEnumMap[] =
+{
+ { sXML_cuboid, chart::ChartSolidType::RECTANGULAR_SOLID },
+ { sXML_cylinder, chart::ChartSolidType::CYLINDER },
+ { sXML_cone, chart::ChartSolidType::CONE },
+ { sXML_pyramid, chart::ChartSolidType::PYRAMID },
+};
+
+// ----------------------------------------
+
+XMLChartPropHdlFactory::~XMLChartPropHdlFactory()
+{
+}
+
+const XMLPropertyHandler* XMLChartPropHdlFactory::GetPropertyHandler( sal_Int32 nType ) const
+{
+ const XMLPropertyHandler* pHdl = XMLPropertyHandlerFactory::GetPropertyHandler( nType );
+ if( ! pHdl )
+ {
+ switch( nType )
+ {
+ case XML_SCH_TYPE_AXIS_ARRANGEMENT:
+ pHdl = new XMLEnumPropertyHdl( aXMLChartAxisArrangementEnumMap,
+ ::getCppuType((const chart::ChartAxisArrangeOrderType*)0) );
+ break;
+
+ case XML_SCH_TYPE_ERROR_CATEGORY:
+ pHdl = new XMLEnumPropertyHdl( aXMLChartErrorCategoryEnumMap,
+ ::getCppuType((const chart::ChartErrorCategory*)0) );
+ break;
+
+ case XML_SCH_TYPE_REGRESSION_TYPE:
+ pHdl = new XMLEnumPropertyHdl( aXMLChartRegressionCurveTypeEnumMap,
+ ::getCppuType((const chart::ChartRegressionCurveType*)0) );
+ break;
+
+ case XML_SCH_TYPE_SOLID_TYPE:
+ // here we have a constant rather than an enum
+ pHdl = new XMLEnumPropertyHdl( aXMLChartSolidTypeEnumMap, ::getCppuType((const sal_Int32*)0) );
+ break;
+ }
+ if( pHdl )
+ PutHdlCache( nType, pHdl );
+ }
+
+ return pHdl;
+}
+
+// ----------------------------------------
+
+XMLChartPropertySetMapper::XMLChartPropertySetMapper() :
+ XMLPropertySetMapper( aXMLChartPropMap, new XMLChartPropHdlFactory )
+{
+}
+
+XMLChartPropertySetMapper::~XMLChartPropertySetMapper()
+{
+}
+
+void XMLChartPropertySetMapper::ContextFilter(
+ std::vector< XMLPropertyState >& rProperties,
+ uno::Reference< beans::XPropertySet > rPropSet ) const
+{
+ // filter properties
+ for( std::vector< XMLPropertyState >::iterator property = rProperties.begin();
+ property != rProperties.end();
+ property++ )
+ {
+ // find properties with context
+ // to prevent writing this property set mnIndex member to -1
+ switch( GetEntryContextId( property->mnIndex ))
+ {
+ case XML_SCH_USER_SYMBOL:
+ {
+ sal_Int32 nIndex = chart::ChartSymbolType::AUTO;
+ property->maValue >>= nIndex;
+ if( nIndex == chart::ChartSymbolType::AUTO )
+ property->mnIndex = -1;
+ }
+ break;
+ }
+ }
+}
+
+// ----------------------------------------
+
+XMLChartExportPropertyMapper::XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper ) :
+ SvXMLExportPropertyMapper( rMapper ),
+ msCDATA( rtl::OUString::createFromAscii( sXML_CDATA )),
+ msTrue( rtl::OUString::createFromAscii( sXML_true )),
+ msFalse( rtl::OUString::createFromAscii( sXML_false ))
+{
+}
+
+XMLChartExportPropertyMapper::~XMLChartExportPropertyMapper()
+{
+}
+
+void XMLChartExportPropertyMapper::handleElementItem(
+ const uno::Reference< xml::sax::XDocumentHandler > & rHandler,
+ const XMLPropertyState& rProperty, const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap, sal_uInt16 nFlags ) const
+{
+ // call parent
+ SvXMLExportPropertyMapper::handleElementItem( rHandler, rProperty, rUnitConverter, rNamespaceMap, nFlags );
+}
+
+void XMLChartExportPropertyMapper::handleSpecialItem(
+ SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap ) const
+{
+ sal_Int32 nContextId = maPropMapper->GetEntryContextId( rProperty.mnIndex );
+
+ if( nContextId )
+ {
+ rtl::OUString sAttrName = maPropMapper->GetEntryXMLName( rProperty.mnIndex );
+ sal_Int32 nNameSpace = XML_NAMESPACE_CHART;
+ rtl::OUStringBuffer sValueBuffer;
+ rtl::OUString sValue;
+
+ sal_Int32 nValue = 0;
+ sal_Bool bValue = sal_False;
+
+ switch( nContextId )
+ {
+ case XML_SCH_SPECIAL_TICKS_MAJ_INNER:
+ case XML_SCH_SPECIAL_TICKS_MIN_INNER:
+ rProperty.maValue >>= nValue;
+ bValue = (( nValue & chart::ChartAxisMarks::INNER ) == chart::ChartAxisMarks::INNER );
+ SvXMLUnitConverter::convertBool( sValueBuffer, bValue );
+ break;
+ case XML_SCH_SPECIAL_TICKS_MAJ_OUTER:
+ case XML_SCH_SPECIAL_TICKS_MIN_OUTER:
+ rProperty.maValue >>= nValue;
+ bValue = (( nValue & chart::ChartAxisMarks::OUTER ) == chart::ChartAxisMarks::OUTER );
+ SvXMLUnitConverter::convertBool( sValueBuffer, bValue );
+ break;
+ case XML_SCH_SPECIAL_ERROR_UPPER_INDICATOR:
+ {
+ chart::ChartErrorIndicatorType eType;
+ rProperty.maValue >>= eType;
+ bValue = ( eType == chart::ChartErrorIndicatorType_TOP_AND_BOTTOM ||
+ eType == chart::ChartErrorIndicatorType_UPPER );
+ SvXMLUnitConverter::convertBool( sValueBuffer, bValue );
+ }
+ break;
+ case XML_SCH_SPECIAL_ERROR_LOWER_INDICATOR:
+ {
+ chart::ChartErrorIndicatorType eType;
+ rProperty.maValue >>= eType;
+ bValue = ( eType == chart::ChartErrorIndicatorType_TOP_AND_BOTTOM ||
+ eType == chart::ChartErrorIndicatorType_LOWER );
+ SvXMLUnitConverter::convertBool( sValueBuffer, bValue );
+ }
+ break;
+ case XML_SCH_SPECIAL_TEXT_ROTATION:
+ {
+ // convert from 100th degrees to degrees (double)
+ rProperty.maValue >>= nValue;
+ double fVal = (double)(nValue) / 100.0;
+ SvXMLUnitConverter::convertNumber( sValueBuffer, fVal );
+ }
+ break;
+ case XML_SCH_SPECIAL_DATA_LABEL_NUMBER:
+ {
+ rProperty.maValue >>= nValue;
+ if((( nValue & chart::ChartDataCaption::VALUE ) == chart::ChartDataCaption::VALUE ))
+ sValueBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( sXML_value ));
+ else if(( nValue & chart::ChartDataCaption::PERCENT ) == chart::ChartDataCaption::PERCENT )
+ sValueBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( sXML_percentage ));
+ else
+ sValueBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( sXML_none ));
+ }
+ break;
+ case XML_SCH_SPECIAL_DATA_LABEL_TEXT:
+ rProperty.maValue >>= nValue;
+ bValue = (( nValue & chart::ChartDataCaption::TEXT ) == chart::ChartDataCaption::TEXT );
+ SvXMLUnitConverter::convertBool( sValueBuffer, bValue );
+ break;
+ case XML_SCH_SPECIAL_DATA_LABEL_SYMBOL:
+ rProperty.maValue >>= nValue;
+ bValue = (( nValue & chart::ChartDataCaption::SYMBOL ) == chart::ChartDataCaption::SYMBOL );
+ SvXMLUnitConverter::convertBool( sValueBuffer, bValue );
+ break;
+ }
+ sValue = sValueBuffer.makeStringAndClear();
+ sAttrName = rNamespaceMap.GetQNameByKey( nNameSpace, sAttrName );
+ rAttrList.AddAttribute( sAttrName, msCDATA, sValue );
+ }
+ else
+ {
+ // call parent
+ SvXMLExportPropertyMapper::handleSpecialItem( rAttrList, rProperty, rUnitConverter, rNamespaceMap );
+ }
+}
+
+// ----------------------------------------
+
+XMLChartImportPropertyMapper::XMLChartImportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper ) :
+ SvXMLImportPropertyMapper( rMapper )
+{
+}
+
+XMLChartImportPropertyMapper::~XMLChartImportPropertyMapper()
+{
+}
+
+sal_Bool XMLChartImportPropertyMapper::handleSpecialItem(
+ XMLPropertyState& rProperty,
+ ::std::vector< XMLPropertyState >& rProperties,
+ const ::rtl::OUString& rValue,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const
+{
+ return sal_False;
+}
+
+void XMLChartImportPropertyMapper::finished( ::std::vector< XMLPropertyState >& rProperties ) const
+{
+}
+
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
new file mode 100644
index 0000000000..72b8409e88
--- /dev/null
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -0,0 +1,525 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLChartContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "SchXMLChartContext.hxx"
+#include "SchXMLImport.hxx"
+#include "SchXMLPlotAreaContext.hxx"
+#include "SchXMLParagraphContext.hxx"
+#include "SchXMLTableContext.hxx"
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlement.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_XMLSTYLE_HXX
+#include "xmlstyle.hxx"
+#endif
+#ifndef _XMLOFF_PRSTYLEI_HXX_
+#include "prstylei.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_CHART_XCHARTDOCUMENT_HPP_
+#include <com/sun/star/chart/XChartDocument.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XDIAGRAM_HPP_
+#include <com/sun/star/chart/XDiagram.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTRANGE_HPP_
+#include <com/sun/star/text/XTextRange.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTLEGENDPOSITION_HPP_
+#include <com/sun/star/chart/ChartLegendPosition.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XSTRINGMAPPING_HPP_
+#include <com/sun/star/util/XStringMapping.hpp>
+#endif
+
+using namespace com::sun::star;
+
+enum SchXMLChartType
+{
+ XML_CHART_CLASS_LINE,
+ XML_CHART_CLASS_AREA,
+ XML_CHART_CLASS_CIRCLE,
+ XML_CHART_CLASS_RING,
+ XML_CHART_CLASS_SCATTER,
+ XML_CHART_CLASS_RADAR,
+ XML_CHART_CLASS_BAR,
+ XML_CHART_CLASS_STOCK,
+ XML_CHART_CLASS_BUBBLE // not yet implemented
+};
+
+// ----------------------------------------
+
+static __FAR_DATA SvXMLEnumMapEntry aXMLChartClassMap[] =
+{
+ { sXML_line, XML_CHART_CLASS_LINE },
+ { sXML_area, XML_CHART_CLASS_AREA },
+ { sXML_circle, XML_CHART_CLASS_CIRCLE },
+ { sXML_ring, XML_CHART_CLASS_RING },
+ { sXML_scatter, XML_CHART_CLASS_SCATTER },
+ { sXML_radar, XML_CHART_CLASS_RADAR },
+ { sXML_bar, XML_CHART_CLASS_BAR },
+ { sXML_stock, XML_CHART_CLASS_STOCK },
+ { sXML_bubble, XML_CHART_CLASS_BUBBLE },
+ { 0, 0 }
+};
+
+static __FAR_DATA SvXMLEnumMapEntry aXMLLegendAlignmentMap[] =
+{
+ { sXML_left, chart::ChartLegendPosition_LEFT },
+ { sXML_top, chart::ChartLegendPosition_TOP },
+ { sXML_right, chart::ChartLegendPosition_RIGHT },
+ { sXML_bottom, chart::ChartLegendPosition_BOTTOM },
+ { 0, 0 }
+};
+
+// ----------------------------------------
+
+SchXMLChartContext::SchXMLChartContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ),
+ mrImportHelper( rImpHelper ),
+ mbHasOwnTable( sal_False )
+{
+ // hide title, subtitle and legend
+ uno::Reference< beans::XPropertySet > xProp( mrImportHelper.GetChartDocument(), uno::UNO_QUERY );
+ if( xProp.is())
+ {
+ uno::Any aFalseBool;
+ aFalseBool <<= (sal_Bool)(sal_False);
+ try
+ {
+ xProp->setPropertyValue( rtl::OUString::createFromAscii( "HasMainTitle" ), aFalseBool );
+ xProp->setPropertyValue( rtl::OUString::createFromAscii( "HasSubTitle" ), aFalseBool );
+ xProp->setPropertyValue( rtl::OUString::createFromAscii( "HasLegend" ), aFalseBool );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "XML-Chart Import: Property not found" );
+ }
+ }
+}
+
+SchXMLChartContext::~SchXMLChartContext()
+{}
+
+void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ // parse attributes
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+ rtl::OUString aValue;
+ const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetChartAttrTokenMap();
+
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ rtl::OUString aValue = xAttrList->getValueByIndex( i );
+ USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ switch( rAttrTokenMap.Get( nPrefix, aLocalName ))
+ {
+ case XML_TOK_CHART_CLASS:
+ {
+ USHORT nEnumVal;
+ rtl::OUString aServiceName;
+ if( GetImport().GetMM100UnitConverter().convertEnum( nEnumVal, aValue, aXMLChartClassMap ))
+ {
+ switch( nEnumVal )
+ {
+ case XML_CHART_CLASS_LINE:
+ aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.chart.LineDiagram" ));
+ break;
+ case XML_CHART_CLASS_AREA:
+ aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.chart.AreaDiagram" ));
+ break;
+ case XML_CHART_CLASS_CIRCLE:
+ aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.chart.PieDiagram" ));
+ break;
+ case XML_CHART_CLASS_RING:
+ aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.chart.DonutDiagram" ));
+ break;
+ case XML_CHART_CLASS_SCATTER:
+ aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.chart.XYDiagram" ));
+ break;
+ case XML_CHART_CLASS_RADAR:
+ aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.chart.NetDiagram" ));
+ break;
+ case XML_CHART_CLASS_BAR:
+ aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.chart.BarDiagram" ));
+ break;
+ case XML_CHART_CLASS_STOCK:
+ aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.chart.StockDiagram" ));
+ break;
+ case XML_CHART_CLASS_BUBBLE:
+ DBG_ERROR( "Bubble chart not supported yet" );
+ break;
+ }
+ }
+ if( aServiceName.getLength())
+ {
+ uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument();
+ if( xDoc.is())
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFact( xDoc, uno::UNO_QUERY );
+ if( xFact.is())
+ {
+ uno::Reference< chart::XDiagram > xDia( xFact->createInstance( aServiceName ), uno::UNO_QUERY );
+ if( xDia.is())
+ xDoc->setDiagram( xDia );
+ }
+ }
+ }
+ }
+ break;
+
+ case XML_TOK_CHART_WIDTH:
+ GetImport().GetMM100UnitConverter().convertMeasure( mnWidth, aValue );
+ break;
+
+ case XML_TOK_CHART_HEIGHT:
+ GetImport().GetMM100UnitConverter().convertMeasure( mnHeight, aValue );
+ break;
+
+ case XML_TOK_CHART_STYLE_NAME:
+ msAutoStyleName = aValue;
+ break;
+ }
+ }
+}
+
+void SchXMLChartContext::EndElement()
+{
+ uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument();
+ uno::Reference< beans::XPropertySet > xProp( xDoc, uno::UNO_QUERY );
+ uno::Any aTrueBool;
+ aTrueBool <<= (sal_Bool)(sal_True);
+
+ if( xProp.is())
+ {
+ if( maMainTitle.getLength())
+ {
+ try
+ {
+ xProp->setPropertyValue( rtl::OUString::createFromAscii( "HasMainTitle" ), aTrueBool );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR1( "Couldn't set property %s on document", "HasMainTitle" );
+ }
+ uno::Reference< text::XTextRange > xRange( xDoc->getTitle(), uno::UNO_QUERY );
+ if( xRange.is())
+ xRange->setString( maMainTitle );
+ }
+ if( maSubTitle.getLength())
+ {
+ try
+ {
+ xProp->setPropertyValue( rtl::OUString::createFromAscii( "HasSubTitle" ), aTrueBool );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR1( "Couldn't set property %s on document", "HasSubTitle" );
+ }
+ uno::Reference< text::XTextRange > xRange( xDoc->getSubTitle(), uno::UNO_QUERY );
+ if( xRange.is())
+ xRange->setString( maSubTitle );
+
+ }
+ }
+
+ if( mbHasOwnTable )
+ {
+ // apply data read in table sub-element to chart
+ SchXMLTableHelper::applyTable( maTable, maSeriesAddresses, msCategoriesAddress, xDoc );
+ }
+ else
+ {
+ // translate cell-address strings
+ uno::Reference< util::XStringMapping > xTableAddressMapper = mrImportHelper.GetTableAddressMapper();
+ if( xTableAddressMapper.is())
+ {
+ // series
+ sal_Int32 nLength = maSeriesAddresses.getLength();
+ sal_Int32 nIdx;
+ uno::Sequence< rtl::OUString > aStrSeq( nLength * 2 + 1 );
+
+ for( nIdx = 0; nIdx < nLength; nIdx++ )
+ {
+ aStrSeq[ nIdx * 2 ] = maSeriesAddresses[ nIdx ].DataRangeAddress;
+ aStrSeq[ nIdx * 2 + 1 ] = maSeriesAddresses[ nIdx ].LabelAddress;
+
+ // domains
+ if( maSeriesAddresses[ nIdx ].DomainRangeAddresses.getLength())
+ xTableAddressMapper->mapStrings( maSeriesAddresses[ nIdx ].DomainRangeAddresses );
+ }
+ // categories
+ aStrSeq[ nLength * 2 ] = msCategoriesAddress;
+
+ // translate
+ xTableAddressMapper->mapStrings( aStrSeq );
+
+ // write back
+ for( nIdx = 0; nIdx < nLength; nIdx++ )
+ {
+ maSeriesAddresses[ nIdx ].DataRangeAddress = aStrSeq[ nIdx * 2 ];
+ maSeriesAddresses[ nIdx ].LabelAddress = aStrSeq[ nIdx * 2 + 1 ];
+ }
+ msCategoriesAddress = aStrSeq[ nLength * 2 ];
+ }
+
+ // set table references at document
+ if( xProp.is())
+ {
+ try
+ {
+ uno::Any aAny;
+ aAny <<= msCategoriesAddress;
+ xProp->setPropertyValue( rtl::OUString::createFromAscii( "CategoriesRangeAddress" ), aAny );
+
+ aAny <<= maSeriesAddresses;
+ xProp->setPropertyValue( rtl::OUString::createFromAscii( "SeriesAddresses" ), aAny );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_WARNING( "Required property not found in ChartDocument" );
+ }
+ }
+ }
+}
+
+SvXMLImportContext* SchXMLChartContext::CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+ const SvXMLTokenMap& rTokenMap = mrImportHelper.GetChartElemTokenMap();
+
+ switch( rTokenMap.Get( nPrefix, rLocalName ))
+ {
+ case XML_TOK_CHART_PLOT_AREA:
+ pContext = new SchXMLPlotAreaContext( mrImportHelper, GetImport(), rLocalName,
+ maSeriesAddresses, msCategoriesAddress );
+ break;
+
+ case XML_TOK_CHART_TITLE:
+ pContext = new SchXMLTitleContext( GetImport(), rLocalName, maMainTitle );
+ break;
+
+ case XML_TOK_CHART_SUBTITLE:
+ pContext = new SchXMLTitleContext( GetImport(), rLocalName, maSubTitle );
+ break;
+
+ case XML_TOK_CHART_LEGEND:
+ pContext = new SchXMLLegendContext( mrImportHelper, GetImport(), rLocalName );
+ break;
+
+ case XML_TOK_CHART_TABLE:
+ pContext = new SchXMLTableContext( mrImportHelper, GetImport(), rLocalName, maTable );
+ if( pContext )
+ mbHasOwnTable = sal_True;
+ break;
+ }
+
+ if( ! pContext )
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+
+ return pContext;
+}
+
+// ----------------------------------------
+
+SchXMLTitleContext::SchXMLTitleContext( SvXMLImport& rImport, const rtl::OUString& rLocalName,
+ rtl::OUString& aTitle ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ),
+ maTitle( aTitle )
+{
+}
+
+SchXMLTitleContext::~SchXMLTitleContext()
+{}
+
+
+SvXMLImportContext* SchXMLTitleContext::CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+
+ if( nPrefix == XML_NAMESPACE_TEXT &&
+ rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_p )))
+ {
+ pContext = new SchXMLParagraphContext( GetImport(), rLocalName, maTitle );
+ }
+ else
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+
+ return pContext;
+}
+
+// ----------------------------------------
+
+SchXMLLegendContext::SchXMLLegendContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ),
+ mrImportHelper( rImpHelper )
+{
+}
+
+void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument();
+ if( ! xDoc.is())
+ return;
+
+ // turn on legend
+ uno::Reference< beans::XPropertySet > xDocProp( xDoc, uno::UNO_QUERY );
+ if( xDocProp.is())
+ {
+ uno::Any aTrueBool;
+ aTrueBool <<= (sal_Bool)(sal_True);
+ try
+ {
+ xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "HasLegend" ), aTrueBool );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "Property HasLegend not found" );
+ }
+ }
+
+ // parse attributes
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+ rtl::OUString aValue;
+ const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetLegendAttrTokenMap();
+
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ rtl::OUString aValue = xAttrList->getValueByIndex( i );
+ USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ switch( rAttrTokenMap.Get( nPrefix, aLocalName ))
+ {
+ case XML_TOK_LEGEND_POSITION:
+ {
+ uno::Reference< beans::XPropertySet > xProp( xDoc->getLegend(), uno::UNO_QUERY );
+ if( xProp.is())
+ {
+ try
+ {
+ USHORT nEnumVal;
+ if( GetImport().GetMM100UnitConverter().convertEnum( nEnumVal, aValue, aXMLLegendAlignmentMap ))
+ {
+ uno::Any aAny;
+ aAny <<= (chart::ChartLegendPosition)(nEnumVal);
+ xProp->setPropertyValue( rtl::OUString::createFromAscii( "Alignment" ), aAny );
+ }
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "Property Alignment (legend) not found" );
+ }
+ }
+ }
+ break;
+
+ case XML_TOK_LEGEND_X:
+ case XML_TOK_LEGEND_Y:
+ break;
+ }
+ }
+}
+
+SchXMLLegendContext::~SchXMLLegendContext()
+{
+}
+
diff --git a/xmloff/source/chart/SchXMLChartContext.hxx b/xmloff/source/chart/SchXMLChartContext.hxx
new file mode 100644
index 0000000000..6833bbe89c
--- /dev/null
+++ b/xmloff/source/chart/SchXMLChartContext.hxx
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLChartContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _SCH_XMLCHARTCONTEXT_HXX_
+#define _SCH_XMLCHARTCONTEXT_HXX_
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
+#include <com/sun/star/uno/Sequence.h>
+#endif
+
+#include "transporttypes.hxx"
+
+class SchXMLImport;
+class SchXMLImportHelper;
+
+namespace com { namespace sun { namespace star {
+ namespace chart {
+ class XChartDocument;
+ class XDiagram;
+ struct ChartSeriesAddress;
+ }
+ namespace util {
+ class XStringMapping;
+ }
+ namespace xml { namespace sax {
+ class XAttributeList;
+}}}}}
+
+// ----------------------------------------
+
+class SchXMLChartContext : public SvXMLImportContext
+{
+private:
+ SchXMLTable maTable;
+ SchXMLImportHelper& mrImportHelper;
+
+ sal_Int32 mnWidth, mnHeight;
+ rtl::OUString maMainTitle, maSubTitle;
+ sal_Bool mbHasOwnTable;
+ rtl::OUString msAutoStyleName;
+
+ com::sun::star::uno::Sequence< com::sun::star::chart::ChartSeriesAddress > maSeriesAddresses;
+ rtl::OUString msCategoriesAddress;
+
+public:
+ SchXMLChartContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName );
+ virtual ~SchXMLChartContext();
+
+ virtual void StartElement( const com::sun::star::uno::Reference<
+ com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void EndElement();
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference<
+ com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ----------------------------------------
+
+class SchXMLTitleContext : public SvXMLImportContext
+{
+private:
+ rtl::OUString& maTitle;
+
+public:
+ SchXMLTitleContext( SvXMLImport& rImport, const rtl::OUString& rLocalName,
+ rtl::OUString& aTitle );
+ virtual ~SchXMLTitleContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ----------------------------------------
+
+class SchXMLLegendContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+
+public:
+ SchXMLLegendContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName );
+ virtual ~SchXMLLegendContext();
+
+ virtual void StartElement( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+#endif // _SCH_XMLCHARTCONTEXT_HXX_
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
new file mode 100644
index 0000000000..65df2dee90
--- /dev/null
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -0,0 +1,1759 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLExport.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 "SchXMLExport.hxx"
+#include "XMLChartPropertySetMapper.hxx"
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _SVTOOLS_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+#ifndef _XMLOFF_XMLASTPLP_HXX
+#include "xmlaustp.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_XMLMETAE_HXX
+#include "xmlmetae.hxx"
+#endif
+
+#ifndef _TOOLS_SOLMATH_HXX
+#include <tools/solmath.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATORSUPPLIER_HPP_
+#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFOSUPPLIER_HPP_
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_
+#include <com/sun/star/text/XText.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CHART_XCHARTDOCUMENT_HPP_
+#include <com/sun/star/chart/XChartDocument.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTLEGENDPOSITION_HPP_
+#include <com/sun/star/chart/ChartLegendPosition.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XTWOAXISXSUPPLIER_HPP_
+#include <com/sun/star/chart/XTwoAxisXSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XTWOAXISYSUPPLIER_HPP_
+#include <com/sun/star/chart/XTwoAxisYSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XAXISZSUPPLIER_HPP_
+#include <com/sun/star/chart/XAxisZSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XCHARTDATAARRAY_HPP_
+#include <com/sun/star/chart/XChartDataArray.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTDATAROWSOURCE_HPP_
+#include <com/sun/star/chart/ChartDataRowSource.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTAXISASSIGN_HPP_
+#include <com/sun/star/chart/ChartAxisAssign.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTSERIESADDRESS_HPP_
+#include <com/sun/star/chart/ChartSeriesAddress.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XSTRINGMAPPING_HPP_
+#include <com/sun/star/util/XStringMapping.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_
+#include <com/sun/star/drawing/HomogenMatrix.hpp>
+#endif
+
+using namespace com::sun::star;
+
+#define SCH_XML_AXIS_NAME_X "primary-x"
+#define SCH_XML_AXIS_NAME_2X "secondary-x"
+#define SCH_XML_AXIS_NAME_Y "primary-y"
+#define SCH_XML_AXIS_NAME_2Y "secondary-y"
+#define SCH_XML_AXIS_NAME_Z "primary-z"
+
+// ========================================
+// class SchXMLExportHelper
+// ========================================
+
+SchXMLExportHelper::SchXMLExportHelper(
+ SvXMLExport& rExport,
+ SvXMLAutoStylePoolP& rASPool ) :
+ mrExport( rExport ),
+ mrAutoStylePool( rASPool ),
+ mnColCount( 0 ),
+ mnRowCount( 0 ),
+ mnDomainAxes( 0 ), // CHECKME: Is this correct?
+ mbHasRowDescriptions( sal_False ),
+ mbHasColumnDescriptions( sal_False )
+{
+ msTableName = rtl::OUString::createFromAscii( "local-table" );
+
+ // create factory
+ mxPropertyHandlerFactory = new XMLChartPropHdlFactory;
+
+ if( mxPropertyHandlerFactory.is() )
+ {
+ // create property set mapper
+ mxPropertySetMapper = new XMLChartPropertySetMapper;
+
+ // register chart auto-style family
+ mrAutoStylePool.AddFamily(
+ XML_STYLE_FAMILY_SCH_CHART_ID,
+ rtl::OUString::createFromAscii( XML_STYLE_FAMILY_SCH_CHART_NAME ),
+ mxPropertySetMapper,
+ rtl::OUString::createFromAscii( XML_STYLE_FAMILY_SCH_CHART_PREFIX ));
+ }
+
+ mxExpPropMapper = new XMLChartExportPropertyMapper( mxPropertySetMapper );
+}
+
+void SchXMLExportHelper::exportAutoStyles()
+{
+ if( mxExpPropMapper.is())
+ {
+ mrAutoStylePool.exportXML(
+ XML_STYLE_FAMILY_SCH_CHART_ID,
+ *( mxExpPropMapper.get()),
+ mrExport.GetDocHandler(),
+ mrExport.GetMM100UnitConverter(),
+ mrExport.GetNamespaceMap());
+ }
+}
+void SchXMLExportHelper::collectAutoStyles( uno::Reference< chart::XChartDocument > rChartDoc )
+{
+ parseDocument( rChartDoc, sal_False );
+}
+
+void SchXMLExportHelper::exportChart( uno::Reference< chart::XChartDocument > rChartDoc,
+ sal_Bool bIncludeTable )
+{
+ if( ! bIncludeTable )
+ {
+ // get table addresses from model
+ uno::Reference< lang::XServiceInfo > xServ( rChartDoc, uno::UNO_QUERY );
+ if( xServ.is())
+ {
+ if( xServ->supportsService(
+ rtl::OUString::createFromAscii( "com.sun.star.chart.ChartTableAddressSupplier" )))
+ {
+ uno::Reference< beans::XPropertySet > xProp( xServ, uno::UNO_QUERY );
+ if( xProp.is())
+ {
+ uno::Any aAny;
+ aAny = xProp->getPropertyValue(
+ rtl::OUString::createFromAscii( "CategoriesRangeAddress" ));
+ aAny >>= msCategoriesAddress;
+
+ aAny = xProp->getPropertyValue(
+ rtl::OUString::createFromAscii( "SeriesAddresses" ));
+ aAny >>= maSeriesAddresses;
+
+ // map strings
+ if( mxTableAddressMapper.is())
+ {
+ // categories
+ uno::Sequence< rtl::OUString > aStrSeq( 1 );
+ aStrSeq[ 0 ] = msCategoriesAddress;
+ mxTableAddressMapper->mapStrings( aStrSeq );
+ msCategoriesAddress = aStrSeq[ 0 ];
+
+ // series
+ sal_Int32 nLength = maSeriesAddresses.getLength();
+ sal_Int32 nIdx;
+ aStrSeq.realloc( nLength * 2);
+ for( nIdx = 0; nIdx < nLength; nIdx++ )
+ {
+ aStrSeq[ nIdx * 2 ] = maSeriesAddresses[ nIdx ].DataRangeAddress;
+ aStrSeq[ nIdx * 2 + 1 ] = maSeriesAddresses[ nIdx ].LabelAddress;
+
+ // domains
+ if( maSeriesAddresses[ nIdx ].DomainRangeAddresses.getLength())
+ mxTableAddressMapper->mapStrings( maSeriesAddresses[ nIdx ].DomainRangeAddresses );
+ }
+
+ mxTableAddressMapper->mapStrings( aStrSeq );
+
+ for( nIdx = 0; nIdx < nLength; nIdx++ )
+ {
+ maSeriesAddresses[ nIdx ].DataRangeAddress = aStrSeq[ nIdx * 2 ];
+ maSeriesAddresses[ nIdx ].LabelAddress = aStrSeq[ nIdx * 2 + 1 ];
+ }
+ }
+ }
+ }
+ }
+ }
+
+ parseDocument( rChartDoc, sal_True, bIncludeTable );
+}
+
+
+// private methods
+// ---------------
+
+/// if bExportContent is false the auto-styles are collected
+void SchXMLExportHelper::parseDocument( uno::Reference< chart::XChartDocument >& rChartDoc,
+ sal_Bool bExportContent,
+ sal_Bool bIncludeTable )
+{
+ if( ! rChartDoc.is())
+ {
+ DBG_ERROR( "No XChartDocument was given for export." );
+ return;
+ }
+
+ // get Properties of ChartDocument
+ sal_Bool bHasMainTitle = sal_False;
+ sal_Bool bHasSubTitle = sal_False;
+ sal_Bool bHasLegend = sal_False;
+
+ sal_Int32 nStyleFamily = XML_STYLE_FAMILY_SCH_CHART_ID;
+
+ std::vector< XMLPropertyState > aPropertyStates;
+
+ uno::Reference< beans::XPropertySet > xDocPropSet( rChartDoc, uno::UNO_QUERY );
+ if( xDocPropSet.is())
+ {
+ try
+ {
+ uno::Any aAny( xDocPropSet->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasMainTitle" ))));
+ aAny >>= bHasMainTitle;
+ aAny = xDocPropSet->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasSubTitle" )));
+ aAny >>= bHasSubTitle;
+ aAny = xDocPropSet->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasLegend" )));
+ aAny >>= bHasLegend;
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_WARNING( "Required property not found in ChartDocument" );
+ }
+ }
+
+ // get some values of general interest
+
+ // reset
+ mbHasColumnDescriptions = mbHasRowDescriptions = sal_False;
+ mnColCount = mnRowCount = 0;
+
+ // set
+ uno::Reference< chart::XChartDataArray > xData( rChartDoc->getData(), uno::UNO_QUERY );
+ if( xData.is())
+ {
+ uno::Sequence< uno::Sequence< double > > xValues = xData->getData();
+
+ if( xValues.getLength())
+ {
+ // determine size of data
+ const uno::Sequence< double >* pSequence = xValues.getConstArray();
+ mnColCount = pSequence->getLength();
+ mnRowCount = xValues.getLength();
+
+ // determine existence of headers
+ uno::Sequence< rtl::OUString > xRowDescr = xData->getRowDescriptions();
+ uno::Sequence< rtl::OUString > xColDescr = xData->getColumnDescriptions();
+ mbHasColumnDescriptions = ( xColDescr.getLength() > 0 );
+ mbHasRowDescriptions = ( xRowDescr.getLength() > 0 );
+ }
+ }
+
+ uno::Reference< chart::XDiagram > xDiagram = rChartDoc->getDiagram();
+
+ // chart element
+ // -------------
+
+ SvXMLElementExport* pElChart = 0;
+ // get property states for autostyles
+ if( mxPropertySetMapper.is())
+ {
+ uno::Reference< beans::XPropertySet > xPropSet( rChartDoc->getArea(), uno::UNO_QUERY );
+ if( xPropSet.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+ if( bExportContent )
+ {
+ // attributes
+ // determine class
+ if( xDiagram.is())
+ {
+ rtl::OUString sChartType = xDiagram->getDiagramType();
+ rtl::OUString sXMLChartType;
+ mnDomainAxes = 0;
+
+ if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.LineDiagram" )))
+ sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_line ));
+ else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.AreaDiagram" )))
+ sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_area ));
+ else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.BarDiagram" )))
+ sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_bar ));
+ else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.PieDiagram" )))
+ sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_circle ));
+ else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.DonutDiagram" )))
+ sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_ring ));
+ else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.XYDiagram" )))
+ {
+ sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_scatter ));
+ mnDomainAxes = 1;
+ }
+ else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.NetDiagram" )))
+ sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_radar ));
+ else if( 0 == sChartType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart.StockDiagram" )))
+ sXMLChartType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_stock ));
+
+ if( sXMLChartType.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_class, sXMLChartType );
+
+ uno::Reference< drawing::XShape > xShape ( rChartDoc->getArea(), uno::UNO_QUERY );
+ if( xShape.is())
+ {
+ // write size of entire chart
+// CHECKME: needed? CL addSize( xShape );
+ }
+ }
+ // write style name
+ rtl::OUString aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+
+ //element
+ pElChart = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_chart, sal_True, sal_True );
+ }
+ else // autostyles
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ // remove property states for autostyles
+ aPropertyStates.clear();
+
+ // title element
+ // -------------
+
+ if( bHasMainTitle )
+ {
+ // get property states for autostyles
+ if( mxPropertySetMapper.is())
+ {
+ uno::Reference< beans::XPropertySet > xPropSet( rChartDoc->getTitle(), uno::UNO_QUERY );
+ if( xPropSet.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+ if( bExportContent )
+ {
+ uno::Reference< drawing::XShape > xShape = rChartDoc->getTitle();
+ if( xShape.is()) // && "hasTitleBeenMoved"
+ addPosition( xShape );
+
+ // write style name
+ rtl::OUString aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+
+ // element
+ SvXMLElementExport aElTitle( mrExport, XML_NAMESPACE_CHART, sXML_title, sal_True, sal_True );
+
+ // content (text:p)
+ uno::Reference< text::XTextRange > xRange( xShape, uno::UNO_QUERY );
+ if( xRange.is())
+ {
+ SvXMLElementExport aTitle( mrExport, XML_NAMESPACE_TEXT, sXML_p, sal_True, sal_False );
+ mrExport.GetDocHandler()->characters( xRange->getString());
+ }
+ }
+ else // autostyles
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ // remove property states for autostyles
+ aPropertyStates.clear();
+ }
+
+ // subtitle element
+ // ----------------
+
+ if( bHasSubTitle )
+ {
+ // get property states for autostyles
+ if( mxPropertySetMapper.is())
+ {
+ uno::Reference< beans::XPropertySet > xPropSet( rChartDoc->getSubTitle(), uno::UNO_QUERY );
+ if( xPropSet.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+
+ if( bExportContent )
+ {
+ uno::Reference< drawing::XShape > xShape = rChartDoc->getSubTitle();
+ if( xShape.is())
+ addPosition( xShape );
+
+ // write style name
+ rtl::OUString aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+
+ // element (has no subelements)
+ SvXMLElementExport aElSubTitle( mrExport, XML_NAMESPACE_CHART, sXML_subtitle, sal_True, sal_True );
+
+ // content (text:p)
+ uno::Reference< text::XTextRange > xRange( xShape, uno::UNO_QUERY );
+ if( xRange.is())
+ {
+ SvXMLElementExport aSubTitle( mrExport, XML_NAMESPACE_TEXT, sXML_p, sal_True, sal_False );
+ mrExport.GetDocHandler()->characters( xRange->getString());
+ }
+ }
+ else // autostyles
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ // remove property states for autostyles
+ aPropertyStates.clear();
+ }
+
+ // legend element
+ // --------------
+ if( bHasLegend )
+ {
+ // get property states for autostyles
+ if( mxPropertySetMapper.is())
+ {
+ uno::Reference< beans::XPropertySet > xPropSet( rChartDoc->getLegend(), uno::UNO_QUERY );
+ if( xPropSet.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+
+ if( bExportContent )
+ {
+ uno::Reference< beans::XPropertySet > xProp( rChartDoc->getLegend(), uno::UNO_QUERY );
+ if( xProp.is())
+ {
+ chart::ChartLegendPosition aLegendPos = chart::ChartLegendPosition_NONE;
+ try
+ {
+ uno::Any aAny( xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Alignment" ))));
+ aAny >>= aLegendPos;
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_WARNING( "Property Align not found in ChartLegend" );
+ }
+
+ switch( aLegendPos )
+ {
+ case chart::ChartLegendPosition_LEFT:
+ msString = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_left ));
+ break;
+ case chart::ChartLegendPosition_RIGHT:
+ msString = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_right ));
+ break;
+ case chart::ChartLegendPosition_TOP:
+ msString = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_top ));
+ break;
+ case chart::ChartLegendPosition_BOTTOM:
+ msString = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_bottom ));
+ break;
+ case chart::ChartLegendPosition_NONE:
+ {
+ msString = rtl::OUString();
+ uno::Reference< drawing::XShape > xShape( xProp, uno::UNO_QUERY );
+ if( xShape.is())
+ addPosition( xShape );
+ }
+ break;
+ }
+ if( msString.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_legend_position, msString );
+ }
+
+ // write style name
+ rtl::OUString aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+
+ // element
+ SvXMLElementExport aLegend( mrExport, XML_NAMESPACE_CHART, sXML_legend, sal_True, sal_True );
+ }
+ else // autostyles
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ // remove property states for autostyles
+ aPropertyStates.clear();
+ }
+
+ // plot-area element
+ // -----------------
+ if( xDiagram.is())
+ exportPlotArea( xDiagram, bExportContent, bIncludeTable );
+
+ // table element
+ // (is included as subelement of chart)
+ // ------------------------------------
+ if( bExportContent && bIncludeTable )
+ exportTable( xData );
+
+ // close <chart:chart> element
+ if( pElChart )
+ delete pElChart;
+}
+
+void SchXMLExportHelper::exportTable( uno::Reference< chart::XChartDataArray >& rData )
+{
+ // table element
+ // -------------
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_name, msTableName );
+ SvXMLElementExport aTable( mrExport, XML_NAMESPACE_TABLE, sXML_table, sal_True, sal_True );
+
+ if( rData.is())
+ {
+ double fData;
+
+ // get NaN
+ double fSolarNaN;
+ SolarMath::SetNAN( fSolarNaN, FALSE );
+ double fNaN = fSolarNaN;
+ sal_Bool bConvertNaN = sal_False;
+ uno::Reference< chart::XChartData > xChartData( rData, uno::UNO_QUERY );
+ if( xChartData.is())
+ {
+ fNaN = xChartData->getNotANumber();
+ bConvertNaN = ( ! SolarMath::IsNAN( fNaN ));
+ }
+
+ uno::Sequence< uno::Sequence< double > > xValues = rData->getData();
+
+ if( xValues.getLength())
+ {
+ const uno::Sequence< double >* pSequence = xValues.getConstArray();
+ const double* pData = 0;
+
+ sal_Int32 nCol, nRow;
+
+ // export column headers
+ uno::Sequence< rtl::OUString > xRowDescr = rData->getRowDescriptions();
+ uno::Sequence< rtl::OUString > xColDescr = rData->getColumnDescriptions();
+ sal_Int32 nColDescrLength = xColDescr.getLength();
+ sal_Int32 nRowDescrLength = xRowDescr.getLength();
+
+ // columns
+ if( mbHasRowDescriptions )
+ {
+ // row description are put in the first column
+ SvXMLElementExport aHeaderColumns( mrExport, XML_NAMESPACE_TABLE, sXML_table_header_columns, sal_True, sal_True );
+ SvXMLElementExport aHeaderColumn( mrExport, XML_NAMESPACE_TABLE, sXML_table_column, sal_True, sal_True );
+ }
+ // non-header columns
+ if( mnColCount )
+ {
+ SvXMLElementExport aColumns( mrExport, XML_NAMESPACE_TABLE, sXML_table_columns, sal_True, sal_True );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_number_columns_repeated,
+ rtl::OUString::valueOf( (sal_Int64) mnColCount ));
+ SvXMLElementExport aColumn( mrExport, XML_NAMESPACE_TABLE, sXML_table_column, sal_True, sal_True );
+ }
+
+ // rows
+ if( mbHasColumnDescriptions )
+ {
+ SvXMLElementExport aHeaderRows( mrExport, XML_NAMESPACE_TABLE, sXML_table_header_rows, sal_True, sal_True );
+ SvXMLElementExport aRow( mrExport, XML_NAMESPACE_TABLE, sXML_table_row, sal_True, sal_True );
+ // write one empty cell (the cell A1 is never used)
+ {
+ SvXMLElementExport aEmptyCell( mrExport, XML_NAMESPACE_TABLE, sXML_table_cell, sal_True, sal_True );
+ }
+ for( nCol = 0; nCol < nColDescrLength; nCol++ )
+ {
+ mrExport.AddAttributeASCII( XML_NAMESPACE_TABLE, sXML_value_type, sXML_string );
+ SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, sXML_table_cell, sal_True, sal_True );
+ SvXMLElementExport aP( mrExport, XML_NAMESPACE_TEXT, sXML_p, sal_True, sal_False );
+ mrExport.GetDocHandler()->characters( xColDescr[ nCol ] );
+ }
+ }
+
+ // export data
+ SvXMLElementExport aRows( mrExport, XML_NAMESPACE_TABLE, sXML_table_rows, sal_True, sal_True );
+ for( nRow = 0; nRow < mnRowCount; nRow++ )
+ {
+ // <table:table-row>
+ SvXMLElementExport aRow( mrExport, XML_NAMESPACE_TABLE, sXML_table_row, sal_True, sal_True );
+ pData = pSequence[ nRow ].getConstArray();
+
+ if( mbHasRowDescriptions )
+ {
+ // cells containing row descriptions (in the first column)
+ mrExport.AddAttributeASCII( XML_NAMESPACE_TABLE, sXML_value_type, sXML_string );
+ SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, sXML_table_cell, sal_True, sal_True );
+ SvXMLElementExport aP( mrExport, XML_NAMESPACE_TEXT, sXML_p, sal_True, sal_False );
+ if( nRow < nRowDescrLength )
+ mrExport.GetDocHandler()->characters( xRowDescr[ nRow ] );
+ }
+
+ for( nCol = 0; nCol < mnColCount; nCol++ )
+ {
+ // get string by value
+ fData = pData[ nCol ];
+
+ // convert NaN
+ if( bConvertNaN && // implies xChartData.is()
+ xChartData->isNotANumber( fData ))
+ fData = fSolarNaN;
+
+ SvXMLUnitConverter::convertNumber( msStringBuffer, fData );
+ msString = msStringBuffer.makeStringAndClear();
+
+ // <table:table-cell>
+ mrExport.AddAttributeASCII( XML_NAMESPACE_TABLE, sXML_value_type, sXML_float );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_value, msString );
+ SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, sXML_table_cell, sal_True, sal_True );
+
+ // <text:p>
+ SvXMLElementExport aP( mrExport, XML_NAMESPACE_TEXT, sXML_p, sal_True, sal_False );
+ mrExport.GetDocHandler()->characters( msString );
+ }
+ }
+ }
+ }
+}
+
+void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiagram,
+ sal_Bool bExportContent,
+ sal_Bool bIncludeTable )
+{
+ DBG_ASSERT( xDiagram.is(), "Invalid XDiagram as parameter" );
+ if( ! xDiagram.is())
+ return;
+
+ // variables for autostyles
+ uno::Reference< beans::XPropertySet > xPropSet;
+ std::vector< XMLPropertyState > aPropertyStates;
+ sal_Int32 nStyleFamily = XML_STYLE_FAMILY_SCH_CHART_ID;
+ rtl::OUString aASName;
+ sal_Bool bHasTwoYAxes = sal_False;
+ sal_Bool bIs3DChart = sal_False;
+ drawing::HomogenMatrix aTransMatrix;
+
+ // plot-area element
+ // -----------------
+
+ SvXMLElementExport* pElPlotArea = 0;
+ // get property states for autostyles
+ xPropSet = uno::Reference< beans::XPropertySet >( xDiagram, uno::UNO_QUERY );
+ if( xPropSet.is())
+ {
+ if( mxPropertySetMapper.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+ if( bExportContent )
+ {
+ // attributes
+ uno::Reference< drawing::XShape > xShape ( xDiagram, uno::UNO_QUERY );
+ if( xShape.is())
+ {
+ addPosition( xShape );
+ addSize( xShape );
+ }
+
+ // 3d attributes
+ if( xPropSet.is())
+ {
+ try
+ {
+ uno::Any aAny( xPropSet->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryYAxis" ))));
+ aAny >>= bHasTwoYAxes;
+ aAny = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dim3D" )));
+ aAny >>= bIs3DChart;
+
+ if( bIs3DChart )
+ {
+ // get transformation matrix
+ aAny = xPropSet->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "D3DTransformMatrix" )));
+ aAny >>= aTransMatrix;
+ }
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_WARNING( "Required property not found in Diagram" );
+ }
+
+ // write rotation of 3d chart
+ if( bIs3DChart )
+ {
+ //ToDo: use aTransMatrix to extract vectors as attributes
+ }
+ }
+
+ // write style name
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+
+ // element
+ pElPlotArea = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_plot_area, sal_True, sal_True );
+ }
+ else // autostyles
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ // remove property states for autostyles
+ aPropertyStates.clear();
+
+
+ // axis elements
+ // -------------
+ exportAxes( xDiagram, bExportContent );
+
+ // categories element
+ // ------------------
+ chart::ChartDataRowSource eDataRowSource = chart::ChartDataRowSource_COLUMNS;
+ sal_Bool bRowSourceColumns;
+ uno::Reference< beans::XPropertySet > xProp( xDiagram, uno::UNO_QUERY );
+ if( xProp.is())
+ {
+ try
+ {
+ uno::Any aAny( xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataRowSource" ))));
+ aAny >>= eDataRowSource;
+ bRowSourceColumns = ( eDataRowSource == chart::ChartDataRowSource_COLUMNS );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_WARNING( "Required property not found in Diagram" );
+ }
+ }
+ sal_Int32 nNumOfSeries = bRowSourceColumns
+ ? mnColCount
+ : mnRowCount;
+ sal_Int32 nColOffset = mbHasColumnDescriptions? 1: 0;
+ sal_Int32 nRowOffset = mbHasRowDescriptions? 1: 0;
+
+ if( bExportContent &&
+ (( bRowSourceColumns && mbHasRowDescriptions ) ||
+ ( ! bRowSourceColumns && mbHasColumnDescriptions )))
+ {
+ // fill msString with cell-range-address of categories
+ if( bIncludeTable )
+ {
+ // export own table references
+ msStringBuffer.append( msTableName );
+
+ if( bRowSourceColumns )
+ {
+ getCellAddress( 0, nRowOffset );
+ msStringBuffer.append( (sal_Unicode) ':' );
+ getCellAddress( 0, mnRowCount );
+ }
+ else
+ {
+ getCellAddress( nColOffset, 0 );
+ msStringBuffer.append( (sal_Unicode) ':' );
+ getCellAddress( mnColCount, 0 );
+ }
+ msString = msStringBuffer.makeStringAndClear();
+ }
+ else
+ {
+ msString = msCategoriesAddress;
+ }
+
+ if( msString.getLength())
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_cell_range_address, msString );
+ SvXMLElementExport aDomain( mrExport, XML_NAMESPACE_CHART, sXML_categories, sal_True, sal_True );
+ }
+ }
+
+ // series elements
+ // ---------------
+ msStringBuffer.setLength( 0 );
+ SvXMLElementExport* pSeries = NULL;
+ rtl::OUString aSeriesASName;
+ sal_Int32 nRepeated = 0;
+ sal_Bool bWrite = sal_False;
+ sal_Int32 nAttachedAxis;
+
+ for( sal_Int32 nSeries = mnDomainAxes; nSeries < nNumOfSeries; nSeries++ )
+ {
+ nAttachedAxis = chart::ChartAxisAssign::PRIMARY_Y;
+
+ // get property states for autostyles
+ xPropSet = xDiagram->getDataRowProperties( nSeries );
+ if( xPropSet.is())
+ {
+ // determine attached axis
+ try
+ {
+ uno::Any aAny( xPropSet->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Axis" ))));
+ aAny >>= nAttachedAxis;
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_WARNING( "Required property not found in DataRowProperties" );
+ }
+
+ if( mxPropertySetMapper.is())
+ {
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+ }
+
+ if( bExportContent )
+ {
+ if( bIncludeTable )
+ {
+ // export own table references
+ msStringBuffer.append( msTableName );
+ if( bRowSourceColumns )
+ {
+ getCellAddress( nSeries + nColOffset, nRowOffset );
+ msStringBuffer.append( (sal_Unicode) ':' );
+ getCellAddress( nSeries + nColOffset, mnRowCount );
+ }
+ else
+ {
+ getCellAddress( nColOffset, nSeries + nRowOffset );
+ msStringBuffer.append( (sal_Unicode) ':' );
+ getCellAddress( mnColCount, nSeries + nRowOffset );
+ }
+ msString = msStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_values_cell_range_address, msString );
+
+ // reference to label
+ if( bRowSourceColumns )
+ {
+ if( mbHasColumnDescriptions )
+ {
+ msStringBuffer.append( msTableName );
+ getCellAddress( nSeries + nColOffset, 0 );
+ msString = msStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_label_cell_address, msString );
+ }
+ }
+ else
+ {
+ if( mbHasRowDescriptions )
+ {
+ msStringBuffer.append( msTableName );
+ getCellAddress( 0, nSeries + nRowOffset );
+ msString = msStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_label_cell_address, msString );
+ }
+ }
+ }
+ else
+ {
+ if( maSeriesAddresses.getLength() > nSeries )
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_values_cell_range_address,
+ maSeriesAddresses[ nSeries ].DataRangeAddress );
+ }
+ }
+
+ if( bHasTwoYAxes )
+ {
+ if( nAttachedAxis == chart::ChartAxisAssign::SECONDARY_Y )
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_attached_axis, SCH_XML_AXIS_NAME_2Y );
+ else
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_attached_axis, SCH_XML_AXIS_NAME_Y );
+ }
+
+ // write style name
+ aSeriesASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aSeriesASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aSeriesASName );
+ // open series element until end of for loop
+ pSeries = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_series, sal_True, sal_True );
+ }
+ else // autostyles
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ // remove property states for autostyles
+ aPropertyStates.clear();
+
+ // domain element if necessary
+ // ---------------------------
+ if( bExportContent &&
+ mnDomainAxes > 0 &&
+ nSeries == mnDomainAxes )
+ {
+ msStringBuffer.setLength( 0 );
+ for( sal_Int32 nDomain = 0; nDomain < mnDomainAxes; nDomain++ )
+ {
+ if( bIncludeTable )
+ {
+ // first series has a domain, that is the first table row (column)
+ msStringBuffer.append( msTableName );
+ if( bRowSourceColumns )
+ {
+ getCellAddress( nColOffset + nDomain, nRowOffset );
+ msStringBuffer.append( (sal_Unicode) ':' );
+ getCellAddress( nColOffset + nDomain, mnRowCount );
+ }
+ else
+ {
+ getCellAddress( nColOffset, nRowOffset + nDomain );
+ msStringBuffer.append( (sal_Unicode) ':' );
+ getCellAddress( mnColCount, nRowOffset + nDomain );
+ }
+ }
+ else
+ {
+ if( maSeriesAddresses.getLength() > nSeries &&
+ maSeriesAddresses[ nSeries ].DomainRangeAddresses.getLength() > nDomain )
+ {
+ msStringBuffer.append( maSeriesAddresses[ nSeries ].DomainRangeAddresses[ nDomain ] );
+ }
+ }
+
+ msString = msStringBuffer.makeStringAndClear();
+ if( msString.getLength())
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_cell_range_address, msString );
+ SvXMLElementExport aDomain( mrExport, XML_NAMESPACE_CHART, sXML_domain, sal_True, sal_True );
+ }
+ }
+ }
+
+ // data-points
+ // -----------
+ // write data-points only if they contain autostyles
+ // objects with equal autostyles are grouped using the attribute
+ // repeat="number"
+
+ // Note: if only the nth data-point has autostyles there is an element
+ // without style and repeat="n-1" attribute written in advance.
+
+ if( mxPropertySetMapper.is())
+ {
+ const sal_Int32 nSeriesCount =
+ ( bRowSourceColumns ? ( mnRowCount - nRowOffset ): ( mnColCount - nColOffset ));
+ sal_Bool bIsEmpty = sal_False;
+ rtl::OUString aLastASName;
+ aASName = rtl::OUString();
+
+ for( sal_Int32 nElement = 0; nElement < nSeriesCount; nElement++ )
+ {
+ // get property states for autostyles
+ xPropSet = xDiagram->getDataPointProperties( nElement, nSeries );
+ if( xPropSet.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ bIsEmpty = ( aPropertyStates.size() == 0 );
+
+ if( bExportContent )
+ {
+ if( bIsEmpty )
+ {
+ if( aLastASName.getLength())
+ {
+ aASName = rtl::OUString();
+ bWrite = sal_True;
+ }
+ else
+ {
+ // not when entering here initially
+ if( nElement )
+ nRepeated++;
+ }
+ }
+ else
+ {
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.equals( aLastASName ))
+ {
+ nRepeated++;
+ }
+ else
+ {
+ // not when entering here initially
+ if( nElement )
+ bWrite = sal_True;
+ }
+ }
+
+ // write last autostyle
+ if( bWrite )
+ {
+ if( nRepeated )
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_repeated,
+ rtl::OUString::valueOf( (sal_Int64)(nRepeated + 1) ));
+ nRepeated = 0;
+ }
+ if( aLastASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aLastASName );
+ SvXMLElementExport aPoint( mrExport, XML_NAMESPACE_CHART, sXML_data_point, sal_True, sal_True );
+ }
+ aLastASName = aASName;
+ }
+ else
+ {
+ if( ! bIsEmpty )
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+ } // for
+
+ // write final autostyle
+ if( bExportContent && ! bIsEmpty )
+ {
+ if( nRepeated )
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_repeated,
+ rtl::OUString::valueOf( (sal_Int64)(nRepeated + 1) ));
+ nRepeated = 0;
+ }
+ if( aLastASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aLastASName );
+ SvXMLElementExport aPoint( mrExport, XML_NAMESPACE_CHART, sXML_data_point, sal_True, sal_True );
+ }
+ }
+
+ // close series element
+ if( pSeries )
+ delete pSeries;
+ }
+ if( pElPlotArea )
+ delete pElPlotArea;
+}
+
+void SchXMLExportHelper::exportAxes( uno::Reference< chart::XDiagram > xDiagram, sal_Bool bExportContent )
+{
+ DBG_ASSERT( xDiagram.is(), "Invalid XDiagram as parameter" );
+ if( ! xDiagram.is())
+ return;
+
+ // variables for autostyles
+ uno::Reference< beans::XPropertySet > xPropSet;
+ std::vector< XMLPropertyState > aPropertyStates;
+ sal_Int32 nStyleFamily = XML_STYLE_FAMILY_SCH_CHART_ID;
+ rtl::OUString aASName;
+
+ // get some properties from document first
+ sal_Bool bHasXAxis = sal_False,
+ bHasYAxis = sal_False,
+ bHasZAxis = sal_False,
+ bHasSecondaryXAxis = sal_False,
+ bHasSecondaryYAxis = sal_False;
+ sal_Bool bHasXAxisTitle = sal_False,
+ bHasYAxisTitle = sal_False,
+ bHasZAxisTitle = sal_False;
+ sal_Bool bHasXAxisMajorGrid = sal_False,
+ bHasXAxisMinorGrid = sal_False,
+ bHasYAxisMajorGrid = sal_False,
+ bHasYAxisMinorGrid = sal_False,
+ bHasZAxisMajorGrid = sal_False,
+ bHasZAxisMinorGrid = sal_False;
+
+ uno::Reference< beans::XPropertySet > xProp( xDiagram, uno::UNO_QUERY );
+ if( xProp.is())
+ {
+ try
+ {
+ uno::Any aAny;
+
+ // check for supported services ...
+ uno::Reference< lang::XServiceInfo > xServ( xDiagram, uno::UNO_QUERY );
+ if( xServ.is())
+ {
+ bHasXAxis = xServ->supportsService(
+ rtl::OUString::createFromAscii( "com.sun.star.chart.ChartAxisXSupplier" ));
+ bHasYAxis = xServ->supportsService(
+ rtl::OUString::createFromAscii( "com.sun.star.chart.ChartAxisYSupplier" ));
+ bHasZAxis = xServ->supportsService(
+ rtl::OUString::createFromAscii( "com.sun.star.chart.ChartAxisZSupplier" ));
+ bHasSecondaryXAxis = xServ->supportsService(
+ rtl::OUString::createFromAscii( "com.sun.star.chart.ChartTwoAxisXSupplier" ));
+ bHasSecondaryYAxis = xServ->supportsService(
+ rtl::OUString::createFromAscii( "com.sun.star.chart.ChartTwoAxisYSupplier" ));
+ }
+
+ // ... and then the properties provided by this service
+ if( bHasXAxis )
+ {
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasXAxis" )));
+ aAny >>= bHasXAxis;
+ }
+ if( bHasYAxis )
+ {
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasYAxis" )));
+ aAny >>= bHasYAxis;
+ }
+ if( bHasZAxis )
+ {
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasZAxis" )));
+ aAny >>= bHasZAxis;
+ }
+ if( bHasSecondaryXAxis )
+ {
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryXAxis" )));
+ aAny >>= bHasSecondaryXAxis;
+ }
+ if( bHasSecondaryYAxis )
+ {
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasSecondaryYAxis" )));
+ aAny >>= bHasSecondaryYAxis;
+ }
+
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasXAxisTitle" )));
+ aAny >>= bHasXAxisTitle;
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasYAxisTitle" )));
+ aAny >>= bHasYAxisTitle;
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasZAxisTitle" )));
+ aAny >>= bHasZAxisTitle;
+
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasXAxisGrid" )));
+ aAny >>= bHasXAxisMajorGrid;
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasXAxisHelpGrid" )));
+ aAny >>= bHasXAxisMinorGrid;
+
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasYAxisGrid" )));
+ aAny >>= bHasYAxisMajorGrid;
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasYAxisHelpGrid" )));
+ aAny >>= bHasYAxisMinorGrid;
+
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasZAxisGrid" )));
+ aAny >>= bHasZAxisMajorGrid;
+ aAny = xProp->getPropertyValue(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasZAxisHelpGrid" )));
+ aAny >>= bHasZAxisMinorGrid;
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_WARNING( "Required property not found in ChartDocument" );
+ }
+ }
+
+ SvXMLElementExport* pAxis = NULL;
+
+ // x axis
+ // -------
+
+ if( bHasXAxis )
+ {
+ uno::Reference< chart::XAxisXSupplier > xAxisSupp( xDiagram, uno::UNO_QUERY );
+ if( xAxisSupp.is())
+ {
+ // get property states for autostyles
+ if( mxPropertySetMapper.is())
+ {
+ xPropSet = xAxisSupp->getXAxis();
+ if( xPropSet.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+ if( bExportContent )
+ {
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, (mnDomainAxes > 0)
+ ? sXML_domain // scatter (or bubble) chart
+ : sXML_category );
+
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_name, SCH_XML_AXIS_NAME_X );
+
+ // write style name
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ // element
+ pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_axis, sal_True, sal_True );
+ }
+ else // autostyles
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+
+ // axis-title
+ if( bHasXAxisTitle )
+ {
+ if( bExportContent )
+ {
+ uno::Reference< drawing::XShape > xShape( xAxisSupp->getXAxisTitle(), uno::UNO_QUERY );
+ if( xShape.is()) // && "HasBeenMoved"
+ addPosition( xShape );
+
+ SvXMLElementExport aTitle( mrExport, XML_NAMESPACE_CHART, sXML_title, sal_True, sal_True );
+ // content (text:p)
+ uno::Reference< text::XTextRange > xRange( xShape, uno::UNO_QUERY );
+ if( xRange.is())
+ {
+ SvXMLElementExport aTitlePara( mrExport, XML_NAMESPACE_TEXT, sXML_p, sal_True, sal_False );
+ mrExport.GetDocHandler()->characters( xRange->getString());
+ }
+ }
+ }
+
+ // grid
+ uno::Reference< beans::XPropertySet > xMajorGrid( xAxisSupp->getXMainGrid(), uno::UNO_QUERY );
+ if( bHasXAxisMajorGrid && xMajorGrid.is())
+ {
+ aPropertyStates = mxPropertySetMapper->Filter( xMajorGrid );
+ if( bExportContent )
+ {
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_major );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ }
+ else
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+ }
+ uno::Reference< beans::XPropertySet > xMinorGrid( xAxisSupp->getXHelpGrid(), uno::UNO_QUERY );
+ if( bHasXAxisMinorGrid && xMinorGrid.is())
+ {
+ aPropertyStates = mxPropertySetMapper->Filter( xMinorGrid );
+ if( bExportContent )
+ {
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_minor );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ }
+ else
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+ }
+ if( pAxis )
+ {
+ delete pAxis;
+ pAxis = NULL;
+ }
+ }
+ }
+
+ // secondary x axis
+ if( bHasSecondaryXAxis )
+ {
+ uno::Reference< chart::XTwoAxisXSupplier > xAxisSupp( xDiagram, uno::UNO_QUERY );
+ if( xAxisSupp.is())
+ {
+ // get property states for autostyles
+ if( mxPropertySetMapper.is())
+ {
+ xPropSet = xAxisSupp->getSecondaryXAxis();
+ if( xPropSet.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+ if( bExportContent )
+ {
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, (mnDomainAxes > 0)
+ ? sXML_domain // scatter (or bubble) chart
+ : sXML_category );
+
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_name, SCH_XML_AXIS_NAME_2X );
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_axis, sal_True, sal_True );
+ }
+ else // autostyles
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+
+ if( pAxis )
+ {
+ delete pAxis;
+ pAxis = NULL;
+ }
+ }
+ }
+
+ // y axis
+ // -------
+
+ if( bHasYAxis )
+ {
+ uno::Reference< chart::XAxisYSupplier > xAxisSupp( xDiagram, uno::UNO_QUERY );
+ if( xAxisSupp.is())
+ {
+ // get property states for autostyles
+ if( mxPropertySetMapper.is())
+ {
+ xPropSet = xAxisSupp->getYAxis();
+ if( xPropSet.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+ if( bExportContent )
+ {
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_value );
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_name, SCH_XML_AXIS_NAME_Y );
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_axis, sal_True, sal_True );
+ }
+ else
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+
+ // axis-title
+ if( bHasYAxisTitle )
+ {
+ if( bExportContent )
+ {
+ uno::Reference< drawing::XShape > xShape( xAxisSupp->getYAxisTitle(), uno::UNO_QUERY );
+ if( xShape.is()) // && "HasBeenMoved"
+ addPosition( xShape );
+
+ SvXMLElementExport aTitle( mrExport, XML_NAMESPACE_CHART, sXML_title, sal_True, sal_True );
+ // content (text:p)
+ uno::Reference< text::XTextRange > xRange( xShape, uno::UNO_QUERY );
+ if( xRange.is())
+ {
+ SvXMLElementExport aTitlePara( mrExport, XML_NAMESPACE_TEXT, sXML_p, sal_True, sal_False );
+ mrExport.GetDocHandler()->characters( xRange->getString());
+ }
+ }
+ }
+
+ // grid
+ uno::Reference< beans::XPropertySet > xMajorGrid( xAxisSupp->getYMainGrid(), uno::UNO_QUERY );
+ if( bHasYAxisMajorGrid && xMajorGrid.is())
+ {
+ aPropertyStates = mxPropertySetMapper->Filter( xMajorGrid );
+
+ if( bExportContent )
+ {
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_major );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ }
+ else
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+ }
+ // minor grid
+ uno::Reference< beans::XPropertySet > xMinorGrid( xAxisSupp->getYHelpGrid(), uno::UNO_QUERY );
+ if( bHasYAxisMinorGrid && xMinorGrid.is())
+ {
+ aPropertyStates = mxPropertySetMapper->Filter( xMinorGrid );
+
+ if( bExportContent )
+ {
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_minor );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ }
+ else
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+ }
+ if( pAxis )
+ {
+ delete pAxis;
+ pAxis = NULL;
+ }
+ }
+ }
+ if( bHasSecondaryYAxis )
+ {
+ uno::Reference< chart::XTwoAxisYSupplier > xAxisSupp( xDiagram, uno::UNO_QUERY );
+ if( xAxisSupp.is())
+ {
+ // get property states for autostyles
+ if( mxPropertySetMapper.is())
+ {
+ xPropSet = xAxisSupp->getSecondaryYAxis();
+ if( xPropSet.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+ if( bExportContent )
+ {
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_value );
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_name, SCH_XML_AXIS_NAME_2Y );
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_axis, sal_True, sal_True );
+ }
+ else // autostyles
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+ if( pAxis )
+ {
+ delete pAxis;
+ pAxis = NULL;
+ }
+ }
+ }
+
+ // z axis
+ // -------
+
+ if( bHasZAxis )
+ {
+ uno::Reference< chart::XAxisZSupplier > xAxisSupp( xDiagram, uno::UNO_QUERY );
+ if( xAxisSupp.is())
+ {
+ // get property states for autostyles
+ if( mxPropertySetMapper.is())
+ {
+ xPropSet = xAxisSupp->getZAxis();
+ if( xPropSet.is())
+ aPropertyStates = mxPropertySetMapper->Filter( xPropSet );
+ }
+ if( bExportContent )
+ {
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_series );
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_name, SCH_XML_AXIS_NAME_Z );
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, sXML_axis, sal_True, sal_True );
+ }
+ else
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+
+ // axis-title
+ if( bHasZAxisTitle )
+ {
+ if( bExportContent )
+ {
+ uno::Reference< drawing::XShape > xShape( xAxisSupp->getZAxisTitle(), uno::UNO_QUERY );
+ if( xShape.is())
+ addPosition( xShape );
+
+ SvXMLElementExport aTitle( mrExport, XML_NAMESPACE_CHART, sXML_title, sal_True, sal_True );
+ // content (text:p)
+ uno::Reference< text::XTextRange > xRange( xShape, uno::UNO_QUERY );
+ if( xRange.is())
+ {
+ SvXMLElementExport aTitlePara( mrExport, XML_NAMESPACE_TEXT, sXML_p, sal_True, sal_False );
+ mrExport.GetDocHandler()->characters( xRange->getString());
+ }
+ }
+ }
+
+ // grid
+ uno::Reference< beans::XPropertySet > xMajorGrid( xAxisSupp->getZMainGrid(), uno::UNO_QUERY );
+ if( bHasZAxisMajorGrid && xMajorGrid.is())
+ {
+ aPropertyStates = mxPropertySetMapper->Filter( xMajorGrid );
+
+ if( bExportContent )
+ {
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_major );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ }
+ else
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+ }
+ // minor grid
+ uno::Reference< beans::XPropertySet > xMinorGrid( xAxisSupp->getZHelpGrid(), uno::UNO_QUERY );
+ if( bHasZAxisMinorGrid && xMinorGrid.is())
+ {
+ aPropertyStates = mxPropertySetMapper->Filter( xMinorGrid );
+
+ if( bExportContent )
+ {
+ aASName = GetAutoStylePoolP().Find( nStyleFamily, aPropertyStates );
+ if( aASName.getLength())
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_style_name, aASName );
+ mrExport.AddAttributeASCII( XML_NAMESPACE_CHART, sXML_class, sXML_minor );
+ SvXMLElementExport aGrid( mrExport, XML_NAMESPACE_CHART, sXML_grid, sal_True, sal_True );
+ }
+ else
+ {
+ if( aPropertyStates.size())
+ GetAutoStylePoolP().Add( nStyleFamily, aPropertyStates );
+ }
+ aPropertyStates.clear();
+ }
+ }
+ if( pAxis )
+ {
+ delete pAxis;
+ pAxis = NULL;
+ }
+ }
+}
+
+void SchXMLExportHelper::getCellAddress( sal_Int32 nCol, sal_Int32 nRow )
+{
+ msStringBuffer.append( (sal_Unicode)'.' );
+ if( nCol < 26 )
+ msStringBuffer.append( (sal_Unicode)('A' + nCol) );
+ else if( nCol < 702 )
+ {
+ msStringBuffer.append( (sal_Unicode)('A' + nCol / 26 - 1 ));
+ msStringBuffer.append( (sal_Unicode)('A' + nCol % 26) );
+ }
+ else
+ {
+ msStringBuffer.append( (sal_Unicode)('A' + nCol / 702 - 1 ));
+ msStringBuffer.append( (sal_Unicode)('A' + (nCol % 702) / 26 ));
+ msStringBuffer.append( (sal_Unicode)('A' + nCol % 26) );
+ }
+
+ msStringBuffer.append( nRow + (sal_Int32)1 );
+}
+
+void SchXMLExportHelper::addPosition( uno::Reference< drawing::XShape > xShape )
+{
+ if( xShape.is())
+ {
+ awt::Point aPos = xShape->getPosition();
+
+ mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, aPos.X );
+ msString = msStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute( XML_NAMESPACE_SVG, sXML_x, msString );
+
+ mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, aPos.Y );
+ msString = msStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute( XML_NAMESPACE_SVG, sXML_y, msString );
+ }
+}
+
+void SchXMLExportHelper::addSize( uno::Reference< drawing::XShape > xShape )
+{
+ if( xShape.is())
+ {
+ awt::Size aSize = xShape->getSize();
+
+ mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, aSize.Width );
+ msString = msStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute( XML_NAMESPACE_SVG, sXML_width, msString );
+
+ mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, aSize.Height );
+ msString = msStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute( XML_NAMESPACE_SVG, sXML_height, msString );
+ }
+}
+
+// ========================================
+// class SchXMLExport
+// ========================================
+
+SchXMLExport::SchXMLExport( uno::Reference< frame::XModel > xModel,
+ const rtl::OUString& rFileName,
+ const uno::Reference< xml::sax::XDocumentHandler >& rHandler,
+ sal_Bool bShowProgress,
+ sal_Bool bIncludeTable ) :
+ // MAP_CM should become the application setting
+ SvXMLExport( rFileName, rHandler, xModel, MAP_CM ),
+ maExportHelper( *this, maAutoStylePool )
+{
+ // get status indicator (if requested)
+ if( bShowProgress )
+ {
+ uno::Reference<frame::XController> xController( xModel->getCurrentController());
+ if( xController.is())
+ {
+ uno::Reference<frame::XFrame> xFrame( xController->getFrame());
+ if( xFrame.is())
+ {
+ uno::Reference<task::XStatusIndicatorSupplier> xFactory( xFrame, uno::UNO_QUERY );
+ if( xFactory.is())
+ {
+ mxStatusIndicator = xFactory->getStatusIndicator();
+ }
+ }
+ }
+ }
+
+ // add progress view
+ if( mxStatusIndicator.is())
+ {
+ const rtl::OUString aText( RTL_CONSTASCII_USTRINGPARAM( "XML Export" ));
+ mxStatusIndicator->start( aText, 100 ); // use percentage as values
+ }
+}
+
+SchXMLExport::~SchXMLExport()
+{
+ // stop progress view
+ if( mxStatusIndicator.is())
+ {
+ mxStatusIndicator->end();
+ mxStatusIndicator->reset();
+ }
+}
+
+void SchXMLExport::_ExportStyles( sal_Bool bUsed )
+{
+ // not available in chart
+ DBG_WARNING( "Style Export requested. Not available for Chart" );
+}
+
+void SchXMLExport::_ExportMasterStyles()
+{
+ // not available in chart
+ DBG_WARNING( "Master Style Export requested. Not available for Chart" );
+}
+
+void SchXMLExport::_ExportAutoStyles()
+{
+ uno::Reference< chart::XChartDocument > xChartDoc( GetModel(), uno::UNO_QUERY );
+ if( xChartDoc.is())
+ {
+ maExportHelper.collectAutoStyles( xChartDoc );
+ maExportHelper.exportAutoStyles();
+ }
+ else
+ {
+ DBG_ERROR( "Couldn't export chart due to wrong XModel (must be XChartDocument)" );
+ }
+}
+
+void SchXMLExport::_ExportContent()
+{
+ uno::Reference< chart::XChartDocument > xChartDoc( GetModel(), uno::UNO_QUERY );
+ if( xChartDoc.is())
+ {
+ maExportHelper.exportChart( xChartDoc, sal_True );
+ }
+ else
+ {
+ DBG_ERROR( "Couldn't export chart due to wrong XModel" );
+ }
+}
+
+void SchXMLExport::SetProgress( sal_Int32 nPercentage )
+{
+ // set progress view
+ if( mxStatusIndicator.is())
+ mxStatusIndicator->setValue( nPercentage );
+}
+
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
new file mode 100644
index 0000000000..98bbb4c2d7
--- /dev/null
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -0,0 +1,509 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLImport.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 "SchXMLImport.hxx"
+#include "SchXMLChartContext.hxx"
+#include "contexts.hxx"
+#include "XMLChartPropertySetMapper.hxx"
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+#ifndef _XMLOFF_XMLSTYLE_HXX
+#include "xmlstyle.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATORSUPPLIER_HPP_
+#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XSTRINGMAPPING_HPP_
+#include <com/sun/star/util/XStringMapping.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XCHARTDOCUMENT_HPP_
+#include <com/sun/star/chart/XChartDocument.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XCHARTDATAARRAY_HPP_
+#include <com/sun/star/chart/XChartDataArray.hpp>
+#endif
+
+using namespace com::sun::star;
+
+/* ----------------------------------------
+ TokenMaps for distinguishing different
+ tokens in different contexts
+ ----------------------------------------*/
+
+// ----------------------------------------
+// element maps
+// ----------------------------------------
+
+static __FAR_DATA SvXMLTokenMapEntry aDocElemTokenMap[] =
+{
+ { XML_NAMESPACE_OFFICE, sXML_automatic_styles, XML_TOK_DOC_AUTOSTYLES },
+ { XML_NAMESPACE_OFFICE, sXML_meta, XML_TOK_DOC_META },
+ { XML_NAMESPACE_OFFICE, sXML_body, XML_TOK_DOC_BODY },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aTableElemTokenMap[] =
+{
+ { XML_NAMESPACE_TABLE, sXML_table_header_columns, XML_TOK_TABLE_HEADER_COLS },
+ { XML_NAMESPACE_TABLE, sXML_table_columns, XML_TOK_TABLE_COLUMNS },
+ { XML_NAMESPACE_TABLE, sXML_table_column, XML_TOK_TABLE_COLUMN },
+ { XML_NAMESPACE_TABLE, sXML_table_header_rows, XML_TOK_TABLE_HEADER_ROWS },
+ { XML_NAMESPACE_TABLE, sXML_table_rows, XML_TOK_TABLE_ROWS },
+ { XML_NAMESPACE_TABLE, sXML_table_row, XML_TOK_TABLE_ROW },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aChartElemTokenMap[] =
+{
+ { XML_NAMESPACE_CHART, sXML_plot_area, XML_TOK_CHART_PLOT_AREA },
+ { XML_NAMESPACE_CHART, sXML_title, XML_TOK_CHART_TITLE },
+ { XML_NAMESPACE_CHART, sXML_subtitle, XML_TOK_CHART_SUBTITLE },
+ { XML_NAMESPACE_CHART, sXML_legend, XML_TOK_CHART_LEGEND },
+ { XML_NAMESPACE_TABLE, sXML_table, XML_TOK_CHART_TABLE },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aPlotAreaElemTokenMap[] =
+{
+ { XML_NAMESPACE_CHART, sXML_axis, XML_TOK_PA_AXIS },
+ { XML_NAMESPACE_CHART, sXML_series, XML_TOK_PA_SERIES },
+ { XML_NAMESPACE_CHART, sXML_categories, XML_TOK_PA_CATEGORIES },
+ { XML_NAMESPACE_CHART, sXML_wall, XML_TOK_PA_WALL },
+ { XML_NAMESPACE_CHART, sXML_floor, XML_TOK_PA_FLOOR },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aSeriesElemTokenMap[] =
+{
+ { XML_NAMESPACE_CHART, sXML_data_point, XML_TOK_SERIES_DATA_POINT },
+ { XML_NAMESPACE_CHART, sXML_domain, XML_TOK_SERIES_DOMAIN },
+ XML_TOKEN_MAP_END
+};
+
+// ----------------------------------------
+// attribute maps
+// ----------------------------------------
+
+static __FAR_DATA SvXMLTokenMapEntry aChartAttrTokenMap[] =
+{
+ { XML_NAMESPACE_CHART, sXML_class, XML_TOK_CHART_CLASS },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_CHART_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_CHART_HEIGHT },
+ { XML_NAMESPACE_CHART, sXML_style_name, XML_TOK_CHART_STYLE_NAME },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aPlotAreaAttrTokenMap[] =
+{
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_PA_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_PA_Y },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_PA_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_PA_HEIGHT },
+ { XML_NAMESPACE_CHART, sXML_style_name, XML_TOK_PA_STYLE_NAME },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aAxisAttrTokenMap[] =
+{
+ { XML_NAMESPACE_CHART, sXML_class, XML_TOK_AXIS_CLASS },
+ { XML_NAMESPACE_CHART, sXML_name, XML_TOK_AXIS_NAME },
+ { XML_NAMESPACE_CHART, sXML_style_name, XML_TOK_AXIS_STYLE_NAME },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aLegendAttrTokenMap[] =
+{
+ { XML_NAMESPACE_CHART, sXML_legend_position, XML_TOK_LEGEND_POSITION },
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_LEGEND_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_LEGEND_Y },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aAutoStyleAttrTokenMap[] =
+{
+ { XML_NAMESPACE_STYLE, sXML_family, XML_TOK_AS_FAMILY },
+ { XML_NAMESPACE_STYLE, sXML_name, XML_TOK_AS_NAME },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aCellAttrTokenMap[] =
+{
+ { XML_NAMESPACE_TABLE, sXML_value_type, XML_TOK_CELL_VAL_TYPE },
+ { XML_NAMESPACE_TABLE, sXML_value, XML_TOK_CELL_VALUE },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aSeriesAttrTokenMap[] =
+{
+ { XML_NAMESPACE_CHART, sXML_values_cell_range_address, XML_TOK_SERIES_CELL_RANGE },
+ { XML_NAMESPACE_CHART, sXML_label_cell_address, XML_TOK_SERIES_LABEL_ADDRESS },
+ { XML_NAMESPACE_CHART, sXML_style_name, XML_TOK_SERIES_STYLE_NAME },
+ { XML_NAMESPACE_CHART, sXML_class, XML_TOK_SERIES_CHART_CLASS },
+ XML_TOKEN_MAP_END
+};
+
+// ========================================
+
+SchXMLImportHelper::SchXMLImportHelper() :
+ mpAutoStyles( 0 ),
+
+ mpDocElemTokenMap( 0 ),
+ mpTableElemTokenMap( 0 ),
+ mpChartElemTokenMap( 0 ),
+ mpPlotAreaElemTokenMap( 0 ),
+ mpSeriesElemTokenMap( 0 ),
+
+ mpChartAttrTokenMap( 0 ),
+ mpPlotAreaAttrTokenMap( 0 ),
+ mpAxisAttrTokenMap( 0 ),
+ mpLegendAttrTokenMap( 0 ),
+ mpAutoStyleAttrTokenMap( 0 ),
+ mpCellAttrTokenMap( 0 ),
+ mpSeriesAttrTokenMap( 0 )
+{
+}
+
+SchXMLImportHelper::~SchXMLImportHelper()
+{
+ // delete token maps
+ if( mpDocElemTokenMap )
+ delete mpDocElemTokenMap;
+ if( mpTableElemTokenMap )
+ delete mpTableElemTokenMap;
+ if( mpChartElemTokenMap )
+ delete mpChartElemTokenMap;
+ if( mpPlotAreaElemTokenMap )
+ delete mpPlotAreaElemTokenMap;
+ if( mpSeriesElemTokenMap )
+ delete mpSeriesElemTokenMap;
+
+ if( mpChartAttrTokenMap )
+ delete mpChartAttrTokenMap;
+ if( mpPlotAreaAttrTokenMap )
+ delete mpPlotAreaAttrTokenMap;
+ if( mpAxisAttrTokenMap )
+ delete mpAxisAttrTokenMap;
+ if( mpLegendAttrTokenMap )
+ delete mpLegendAttrTokenMap;
+ if( mpAutoStyleAttrTokenMap )
+ delete mpAutoStyleAttrTokenMap;
+ if( mpCellAttrTokenMap )
+ delete mpCellAttrTokenMap;
+ if( mpSeriesAttrTokenMap )
+ delete mpSeriesAttrTokenMap;
+}
+
+SvXMLImportContext* SchXMLImportHelper::CreateChartContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix, const rtl::OUString& rLocalName,
+ const uno::Reference< frame::XModel > xChartModel,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+
+ uno::Reference< chart::XChartDocument > xDoc( xChartModel, uno::UNO_QUERY );
+ if( xDoc.is())
+ {
+ mxChartDoc = xDoc;
+ pContext = new SchXMLChartContext( *this, rImport, rLocalName );
+ }
+ else
+ {
+ DBG_ERROR( "No valid XChartDocument given as XModel" );
+ pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
+/* ----------------------------------------
+ get various token maps
+ ----------------------------------------*/
+
+const SvXMLTokenMap& SchXMLImportHelper::GetDocElemTokenMap()
+{
+ if( ! mpDocElemTokenMap )
+ mpDocElemTokenMap = new SvXMLTokenMap( aDocElemTokenMap );
+ return *mpDocElemTokenMap;
+}
+
+const SvXMLTokenMap& SchXMLImportHelper::GetTableElemTokenMap()
+{
+ if( ! mpTableElemTokenMap )
+ mpTableElemTokenMap = new SvXMLTokenMap( aTableElemTokenMap );
+ return *mpTableElemTokenMap;
+}
+
+const SvXMLTokenMap& SchXMLImportHelper::GetChartElemTokenMap()
+{
+ if( ! mpChartElemTokenMap )
+ mpChartElemTokenMap = new SvXMLTokenMap( aChartElemTokenMap );
+ return *mpChartElemTokenMap;
+}
+
+const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaElemTokenMap()
+{
+ if( ! mpPlotAreaElemTokenMap )
+ mpPlotAreaElemTokenMap = new SvXMLTokenMap( aPlotAreaElemTokenMap );
+ return *mpPlotAreaElemTokenMap;
+}
+
+const SvXMLTokenMap& SchXMLImportHelper::GetSeriesElemTokenMap()
+{
+ if( ! mpSeriesElemTokenMap )
+ mpSeriesElemTokenMap = new SvXMLTokenMap( aSeriesElemTokenMap );
+ return *mpSeriesElemTokenMap;
+}
+
+// ----------------------------------------
+
+const SvXMLTokenMap& SchXMLImportHelper::GetChartAttrTokenMap()
+{
+ if( ! mpChartAttrTokenMap )
+ mpChartAttrTokenMap = new SvXMLTokenMap( aChartAttrTokenMap );
+ return *mpChartAttrTokenMap;
+}
+
+const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaAttrTokenMap()
+{
+ if( ! mpPlotAreaAttrTokenMap )
+ mpPlotAreaAttrTokenMap = new SvXMLTokenMap( aPlotAreaAttrTokenMap );
+ return *mpPlotAreaAttrTokenMap;
+}
+
+const SvXMLTokenMap& SchXMLImportHelper::GetAxisAttrTokenMap()
+{
+ if( ! mpAxisAttrTokenMap )
+ mpAxisAttrTokenMap = new SvXMLTokenMap( aAxisAttrTokenMap );
+ return *mpAxisAttrTokenMap;
+}
+
+const SvXMLTokenMap& SchXMLImportHelper::GetLegendAttrTokenMap()
+{
+ if( ! mpLegendAttrTokenMap )
+ mpLegendAttrTokenMap = new SvXMLTokenMap( aLegendAttrTokenMap );
+ return *mpLegendAttrTokenMap;
+}
+
+const SvXMLTokenMap& SchXMLImportHelper::GetAutoStyleAttrTokenMap()
+{
+ if( ! mpAutoStyleAttrTokenMap )
+ mpAutoStyleAttrTokenMap = new SvXMLTokenMap( aAutoStyleAttrTokenMap );
+ return *mpAutoStyleAttrTokenMap;
+}
+
+const SvXMLTokenMap& SchXMLImportHelper::GetCellAttrTokenMap()
+{
+ if( ! mpCellAttrTokenMap )
+ mpCellAttrTokenMap = new SvXMLTokenMap( aCellAttrTokenMap );
+ return *mpCellAttrTokenMap;
+}
+
+const SvXMLTokenMap& SchXMLImportHelper::GetSeriesAttrTokenMap()
+{
+ if( ! mpSeriesAttrTokenMap )
+ mpSeriesAttrTokenMap = new SvXMLTokenMap( aSeriesAttrTokenMap );
+ return *mpSeriesAttrTokenMap;
+}
+
+// ----------------------------------------
+
+// -1 means don't change
+void SchXMLImportHelper::ResizeChartData( sal_Int32 nSeries, sal_Int32 nDataPoints )
+{
+ if( mxChartDoc.is())
+ {
+ sal_Bool bWasChanged = sal_False;
+
+ // chart data is an array of rows,
+ // a series represents always a column
+ sal_Int32 nColCount = nSeries;
+ sal_Int32 nRowCount = nDataPoints;
+
+ uno::Reference< chart::XChartDataArray > xData( mxChartDoc->getData(), uno::UNO_QUERY );
+ if( xData.is())
+ {
+ uno::Sequence< uno::Sequence< double > > xArray = xData->getData();
+
+ // increase number of rows
+ if( xArray.getLength() < nRowCount )
+ {
+ sal_Int32 nOldLen = xArray.getLength();
+ xArray.realloc( nRowCount );
+ if( nColCount == -1 )
+ {
+ sal_Int32 nSize = xArray[ 0 ].getLength();
+ for( sal_Int32 i = nOldLen; i < nRowCount; i++ )
+ xArray[ i ].realloc( nSize );
+ }
+ bWasChanged = sal_True;
+ }
+
+ if( nSeries == -1 &&
+ nRowCount > 0 )
+ nColCount = xArray[ 0 ].getLength();
+
+ // columns
+ if( nColCount > 0 &&
+ xArray[ 0 ].getLength() < nColCount )
+ {
+ if( nDataPoints == -1 )
+ nRowCount = xArray.getLength();
+
+ for( sal_Int32 i = 0; i < nRowCount; i++ )
+ xArray[ i ].realloc( nColCount );
+ bWasChanged = sal_True;
+ }
+
+ if( bWasChanged )
+ {
+ xData->setData( xArray );
+
+ uno::Reference< chart::XChartData > xChData( xData, uno::UNO_QUERY );
+ if( xChData.is())
+ mxChartDoc->attachData( xChData );
+ }
+ }
+ }
+}
+
+// ========================================
+
+SchXMLImport::SchXMLImport( uno::Reference< frame::XModel > xModel,
+ sal_Bool bLoadDoc, sal_Bool bShowProgress ) :
+ SvXMLImport( xModel )
+{
+ // get status indicator (if requested)
+ if( bShowProgress )
+ {
+ uno::Reference< frame::XController > xController( xModel->getCurrentController());
+ if( xController.is())
+ {
+ uno::Reference< frame::XFrame > xFrame( xController->getFrame());
+ if( xFrame.is())
+ {
+ uno::Reference< task::XStatusIndicatorSupplier > xFactory( xFrame, uno::UNO_QUERY );
+ if( xFactory.is())
+ {
+ mxStatusIndicator = xFactory->getStatusIndicator();
+ }
+ }
+ }
+ }
+
+ // add progress view
+ if( mxStatusIndicator.is())
+ {
+ const rtl::OUString aText( RTL_CONSTASCII_USTRINGPARAM( "XML Import" ));
+ mxStatusIndicator->start( aText, 100 ); // use percentage as values
+ }
+}
+
+SchXMLImport::~SchXMLImport()
+{
+ // stop progress view
+ if( mxStatusIndicator.is())
+ {
+ mxStatusIndicator->end();
+ mxStatusIndicator->reset();
+ }
+}
+
+// create the main context (subcontexts are created
+// by the one created here)
+SvXMLImportContext *SchXMLImport::CreateContext( USHORT nPrefix, const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+
+ // accept <office:document>
+ if( XML_NAMESPACE_OFFICE == nPrefix &&
+ rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_document )))
+ {
+ pContext = new SchXMLDocContext( maImportHelper, *this, nPrefix, rLocalName );
+ }
+ else
+ {
+ pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList );
+ }
+
+ return pContext;
+}
+
diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx
new file mode 100644
index 0000000000..e3aefd8d66
--- /dev/null
+++ b/xmloff/source/chart/SchXMLParagraphContext.cxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLParagraphContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "SchXMLImport.hxx"
+#include "SchXMLParagraphContext.hxx"
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+SchXMLParagraphContext::SchXMLParagraphContext( SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ rtl::OUString& rText ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_TEXT, rLocalName ),
+ mrText( rText )
+{
+}
+
+SchXMLParagraphContext::~SchXMLParagraphContext()
+{}
+
+void SchXMLParagraphContext::Characters( const rtl::OUString& rChars )
+{
+ mrText = rChars;
+}
+
diff --git a/xmloff/source/chart/SchXMLParagraphContext.hxx b/xmloff/source/chart/SchXMLParagraphContext.hxx
new file mode 100644
index 0000000000..0b4b436c0a
--- /dev/null
+++ b/xmloff/source/chart/SchXMLParagraphContext.hxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLParagraphContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _SCH_XMLPARAGRAPHCONTEXT_HXX_
+#define _SCH_XMLPARAGRAPHCONTEXT_HXX_
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+class SchXMLImport;
+
+namespace com { namespace sun { namespace star { namespace xml { namespace sax {
+ class XAttributeList;
+}}}}}
+
+class SchXMLParagraphContext : public SvXMLImportContext
+{
+private:
+ rtl::OUString& mrText;
+
+public:
+ SchXMLParagraphContext( SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ rtl::OUString& rText );
+ virtual ~SchXMLParagraphContext();
+
+ virtual void Characters( const rtl::OUString& rChars );
+};
+
+#endif // _SCH_XMLPARAGRAPHCONTEXT_HXX_
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
new file mode 100644
index 0000000000..a28469f6eb
--- /dev/null
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -0,0 +1,765 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLPlotAreaContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 "SchXMLChartContext.hxx"
+#include "SchXMLPlotAreaContext.hxx"
+#include "SchXMLImport.hxx"
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlement.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_PRSTYLEI_HXX_
+#include "prstylei.hxx"
+#endif
+#ifndef _XMLOFF_XMLSTYLE_HXX
+#include "xmlstyle.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XTWOAXISXSUPPLIER_HPP_
+#include <com/sun/star/chart/XTwoAxisXSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XTWOAXISYSUPPLIER_HPP_
+#include <com/sun/star/chart/XTwoAxisYSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XAXISZSUPPLIER_HPP_
+#include <com/sun/star/chart/XAxisZSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTRANGE_HPP_
+#include <com/sun/star/text/XTextRange.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XSTRINGMAPPING_HPP_
+#include <com/sun/star/util/XStringMapping.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTDATAROWSOURCE_HPP_
+#include <com/sun/star/chart/ChartDataRowSource.hpp>
+#endif
+
+using namespace com::sun::star;
+
+static __FAR_DATA SvXMLEnumMapEntry aXMLAxisClassMap[] =
+{
+ { sXML_category, SCH_XML_AXIS_CATEGORY },
+ { sXML_domain, SCH_XML_AXIS_DOMAIN },
+ { sXML_value, SCH_XML_AXIS_VALUE },
+ { sXML_series, SCH_XML_AXIS_SERIES },
+ { 0, 0 }
+};
+
+SchXMLPlotAreaContext::SchXMLPlotAreaContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName,
+ uno::Sequence< chart::ChartSeriesAddress >& rSeriesAddresses,
+ rtl::OUString& rCategoriesAddress ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ),
+ mrImportHelper( rImpHelper ),
+ mrSeriesAddresses( rSeriesAddresses ),
+ mrCategoriesAddress( rCategoriesAddress )
+{
+ // get Diagram
+ uno::Reference< chart::XChartDocument > xDoc( rImpHelper.GetChartDocument(), uno::UNO_QUERY );
+ if( xDoc.is())
+ {
+ mxDiagram = xDoc->getDiagram();
+ }
+ DBG_ASSERT( mxDiagram.is(), "Couldn't get XDiagram" );
+
+ // turn off all axes initially
+ uno::Any aFalseBool;
+ aFalseBool <<= (sal_Bool)(sal_False);
+
+ uno::Reference< lang::XServiceInfo > xInfo( mxDiagram, uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xProp( mxDiagram, uno::UNO_QUERY );
+ if( xInfo.is() &&
+ xProp.is())
+ {
+ try
+ {
+ if( xInfo->supportsService( rtl::OUString::createFromAscii( "com.sun.star.chart.ChartAxisXSupplier" )))
+ {
+ xProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasXAxis" ), aFalseBool );
+ xProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasXAxisDescription" ), aFalseBool );
+ }
+ if( xInfo->supportsService( rtl::OUString::createFromAscii( "com.sun.star.chart.ChartTwoAxisXSupplier" )))
+ {
+ xProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasSecondaryXAxis" ), aFalseBool );
+ xProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasSecondaryXAxisDescription" ), aFalseBool );
+ }
+
+ if( xInfo->supportsService( rtl::OUString::createFromAscii( "com.sun.star.chart.ChartAxisYSupplier" )))
+ {
+ xProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasYAxis" ), aFalseBool );
+ xProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasYAxisDescription" ), aFalseBool );
+ }
+ if( xInfo->supportsService( rtl::OUString::createFromAscii( "com.sun.star.chart.ChartTwoAxisYSupplier" )))
+ {
+ xProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasSecondaryYAxis" ), aFalseBool );
+ xProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasSecondaryYAxisDescription" ), aFalseBool );
+ }
+
+ if( xInfo->supportsService( rtl::OUString::createFromAscii( "com.sun.star.chart.ChartAxisZSupplier" )))
+ {
+ xProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasZAxis" ), aFalseBool );
+ xProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasZAxisDescription" ), aFalseBool );
+ }
+ // data from now on only comes out of columns
+ uno::Any aAny;
+ chart::ChartDataRowSource eSource = chart::ChartDataRowSource_COLUMNS;
+ aAny <<= eSource;
+ xProp->setPropertyValue( rtl::OUString::createFromAscii( "DataRowSource" ), aAny );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "Property required by service not supported" );
+ }
+ }
+}
+
+SchXMLPlotAreaContext::~SchXMLPlotAreaContext()
+{}
+
+SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+ const SvXMLTokenMap& rTokenMap = mrImportHelper.GetPlotAreaElemTokenMap();
+
+ switch( rTokenMap.Get( nPrefix, rLocalName ))
+ {
+ case XML_TOK_PA_AXIS:
+ pContext = new SchXMLAxisContext( mrImportHelper, GetImport(), rLocalName, mxDiagram, maAxes );
+ break;
+
+ case XML_TOK_PA_SERIES:
+ {
+ sal_Int32 nIndex = mrSeriesAddresses.getLength();
+ mrSeriesAddresses.realloc( nIndex + 1 );
+
+ pContext = new SchXMLSeriesContext( mrImportHelper, GetImport(), rLocalName,
+ mxDiagram, mrSeriesAddresses[ nIndex ],
+ nIndex );
+ }
+ break;
+
+ case XML_TOK_PA_CATEGORIES:
+ pContext = new SchXMLCategoriesDomainContext( mrImportHelper, GetImport(),
+ nPrefix, rLocalName,
+ mrCategoriesAddress );
+ break;
+
+ case XML_TOK_PA_WALL:
+ case XML_TOK_PA_FLOOR:
+ default:
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
+void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ // parse attributes
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+ rtl::OUString aValue;
+ const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetPlotAreaAttrTokenMap();
+
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ rtl::OUString aValue = xAttrList->getValueByIndex( i );
+ USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ switch( rAttrTokenMap.Get( nPrefix, aLocalName ))
+ {
+ case XML_TOK_PA_X:
+ case XML_TOK_PA_Y:
+ case XML_TOK_PA_WIDTH:
+ case XML_TOK_PA_HEIGHT:
+ break;
+
+ case XML_TOK_PA_STYLE_NAME:
+ msAutoStyleName = aValue;
+ break;
+ }
+ }
+}
+
+void SchXMLPlotAreaContext::EndElement()
+{
+ // set properties
+ if( msAutoStyleName.getLength())
+ {
+ uno::Reference< beans::XPropertySet > xProp( mxDiagram, uno::UNO_QUERY );
+ if( xProp.is())
+ {
+ const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
+ if( pStylesCtxt )
+ {
+ const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
+ mrImportHelper.GetChartFamilyID(), msAutoStyleName );
+
+ if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ (( XMLPropStyleContext* )pStyle )->FillPropertySet( xProp );
+ }
+ }
+ }
+}
+
+// ========================================
+
+SchXMLAxisContext::SchXMLAxisContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName,
+ uno::Reference< chart::XDiagram > xDiagram,
+ std::vector< SchXMLAxis >& aAxes ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ),
+ mrImportHelper( rImpHelper ),
+ mxDiagram( xDiagram ),
+ maAxes( aAxes )
+{
+}
+
+SchXMLAxisContext::~SchXMLAxisContext()
+{}
+
+void SchXMLAxisContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ // parse attributes
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+ rtl::OUString aValue;
+ SchXMLImport& rImport = ( SchXMLImport& )GetImport();
+ const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetAxisAttrTokenMap();
+
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ rtl::OUString aValue = xAttrList->getValueByIndex( i );
+ USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ switch( rAttrTokenMap.Get( nPrefix, aLocalName ))
+ {
+ case XML_TOK_AXIS_CLASS:
+ {
+ USHORT nEnumVal;
+ if( rImport.GetMM100UnitConverter().convertEnum( nEnumVal, aValue, aXMLAxisClassMap ))
+ maCurrentAxis.eClass = ( SchXMLAxisClass )nEnumVal;
+ }
+ break;
+ case XML_TOK_AXIS_NAME:
+ maCurrentAxis.aName = aValue;
+ break;
+ case XML_TOK_AXIS_STYLE_NAME:
+ msAutoStyleName = aValue;
+ break;
+ }
+ }
+
+ // check for number of axes with same category
+ maCurrentAxis.nIndexInCategory = 0;
+ sal_Int32 nNumOfAxes = maAxes.size();
+ for( sal_Int32 nCurrent = 0; nCurrent < nNumOfAxes; nCurrent++ )
+ {
+ if( maAxes[ nCurrent ].eClass == maCurrentAxis.eClass )
+ maCurrentAxis.nIndexInCategory++;
+ }
+}
+
+void SchXMLAxisContext::EndElement()
+{
+ // add new Axis to list
+ maAxes.push_back( maCurrentAxis );
+
+ // set axis at chart
+ uno::Reference< beans::XPropertySet > xDiaProp( mxDiagram, uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xProp;
+ uno::Any aTrueBool;
+ aTrueBool <<= (sal_Bool)(sal_True);
+ sal_Bool bHasTitle = ( maCurrentAxis.aTitle.getLength() > 0 );
+
+ switch( maCurrentAxis.eClass )
+ {
+ case SCH_XML_AXIS_CATEGORY:
+ case SCH_XML_AXIS_DOMAIN:
+ if( maCurrentAxis.nIndexInCategory == 0 )
+ {
+ try
+ {
+ xDiaProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasXAxis" ), aTrueBool );
+ if( bHasTitle )
+ xDiaProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasXAxisTitle" ), aTrueBool );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "Couldn't turn on x axis" );
+ }
+ uno::Reference< chart::XAxisXSupplier > xSuppl( mxDiagram, uno::UNO_QUERY );
+ if( xSuppl.is())
+ {
+ xProp = xSuppl->getXAxis();
+ if( bHasTitle )
+ {
+ uno::Reference< text::XTextRange > xRange( xSuppl->getXAxisTitle(), uno::UNO_QUERY );
+ if( xRange.is())
+ xRange->setString( maCurrentAxis.aTitle );
+ }
+ }
+ }
+ else
+ {
+ try
+ {
+ xDiaProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasSecondaryXAxis" ), aTrueBool );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "Couldn't turn on second x axis" );
+ }
+ uno::Reference< chart::XTwoAxisXSupplier > xSuppl( mxDiagram, uno::UNO_QUERY );
+ if( xSuppl.is())
+ xProp = xSuppl->getSecondaryXAxis();
+ }
+ break;
+
+ case SCH_XML_AXIS_VALUE:
+ if( maCurrentAxis.nIndexInCategory == 0 )
+ {
+ try
+ {
+ xDiaProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasYAxis" ), aTrueBool );
+ if( bHasTitle )
+ xDiaProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasYAxisTitle" ), aTrueBool );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "Couldn't turn on y axis" );
+ }
+ uno::Reference< chart::XAxisYSupplier > xSuppl( mxDiagram, uno::UNO_QUERY );
+ if( xSuppl.is())
+ {
+ xProp = xSuppl->getYAxis();
+ if( bHasTitle )
+ {
+ uno::Reference< text::XTextRange > xRange( xSuppl->getYAxisTitle(), uno::UNO_QUERY );
+ if( xRange.is())
+ xRange->setString( maCurrentAxis.aTitle );
+ }
+ }
+ }
+ else
+ {
+ try
+ {
+ xDiaProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasSecondaryYAxis" ), aTrueBool );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "Couldn't turn on second y axis" );
+ }
+ uno::Reference< chart::XTwoAxisYSupplier > xSuppl( mxDiagram, uno::UNO_QUERY );
+ if( xSuppl.is())
+ xProp = xSuppl->getSecondaryYAxis();
+ }
+ break;
+
+ case SCH_XML_AXIS_SERIES:
+ {
+ try
+ {
+ xDiaProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasZAxis" ), aTrueBool );
+ if( bHasTitle )
+ xDiaProp->setPropertyValue(
+ rtl::OUString::createFromAscii( "HasZAxisTitle" ), aTrueBool );
+ }
+ catch( beans::UnknownPropertyException )
+ {
+ DBG_ERROR( "Couldn't turn on z axis" );
+ }
+ uno::Reference< chart::XAxisZSupplier > xSuppl( mxDiagram, uno::UNO_QUERY );
+ if( xSuppl.is())
+ {
+ xProp = xSuppl->getZAxis();
+ if( bHasTitle )
+ {
+ uno::Reference< text::XTextRange > xRange( xSuppl->getZAxisTitle(), uno::UNO_QUERY );
+ if( xRange.is())
+ xRange->setString( maCurrentAxis.aTitle );
+ }
+ }
+ }
+ break;
+ }
+
+ // set properties
+ if( msAutoStyleName.getLength() &&
+ xProp.is())
+ {
+ const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
+ if( pStylesCtxt )
+ {
+ const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
+ mrImportHelper.GetChartFamilyID(), msAutoStyleName );
+
+ if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ (( XMLPropStyleContext* )pStyle )->FillPropertySet( xProp );
+ }
+ }
+}
+
+SvXMLImportContext* SchXMLAxisContext::CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+ SchXMLImport& rImport = ( SchXMLImport& )GetImport();
+
+ if( nPrefix == XML_NAMESPACE_CHART )
+ {
+ if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_title )))
+ {
+ pContext = new SchXMLTitleContext( rImport, rLocalName, maCurrentAxis.aTitle );
+ }
+ else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_grid )))
+ {
+ }
+ }
+
+ if( ! pContext )
+ pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName );
+
+ return pContext;
+}
+
+
+// ========================================
+
+
+SchXMLSeriesContext::SchXMLSeriesContext(
+ SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName,
+ uno::Reference< chart::XDiagram >& xDiagram,
+ com::sun::star::chart::ChartSeriesAddress& rSeriesAddress,
+ sal_Int32 nSeriesIndex ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ),
+ mxDiagram( xDiagram ),
+ mrImportHelper( rImpHelper ),
+ mrSeriesAddress( rSeriesAddress ),
+ mnSeriesIndex( nSeriesIndex ),
+ mnDataPointIndex( -1 )
+{
+}
+
+SchXMLSeriesContext::~SchXMLSeriesContext()
+{
+}
+
+void SchXMLSeriesContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ // parse attributes
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+ rtl::OUString aValue;
+ const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetSeriesAttrTokenMap();
+
+ for( sal_Int32 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ rtl::OUString aValue = xAttrList->getValueByIndex( i );
+ USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ switch( rAttrTokenMap.Get( nPrefix, aLocalName ))
+ {
+ case XML_TOK_SERIES_CELL_RANGE:
+ mrSeriesAddress.DataRangeAddress = aValue;
+ break;
+ case XML_TOK_SERIES_LABEL_ADDRESS:
+ mrSeriesAddress.LabelAddress = aValue;
+ break;
+ case XML_TOK_SERIES_STYLE_NAME:
+ msAutoStyleName = aValue;
+ break;
+ case XML_TOK_SERIES_CHART_CLASS:
+ // not supported yet
+ break;
+ }
+ }
+}
+
+void SchXMLSeriesContext::EndElement()
+{
+ if( msAutoStyleName.getLength() &&
+ mxDiagram.is())
+ {
+ uno::Reference< beans::XPropertySet > xProp;
+
+ try
+ {
+ xProp = mxDiagram->getDataRowProperties( mnSeriesIndex );
+ }
+ catch( lang::IndexOutOfBoundsException )
+ {
+ try
+ {
+ mrImportHelper.ResizeChartData( mnSeriesIndex + 1 );
+ xProp = mxDiagram->getDataRowProperties( mnSeriesIndex );
+ }
+ catch( lang::IndexOutOfBoundsException )
+ {
+ DBG_ERROR( "resizing of chart data didn't work!" );
+ }
+ }
+
+ if( xProp.is())
+ {
+ const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
+ if( pStylesCtxt )
+ {
+ const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
+ mrImportHelper.GetChartFamilyID(), msAutoStyleName );
+
+ if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ (( XMLPropStyleContext* )pStyle )->FillPropertySet( xProp );
+ }
+ }
+ }
+}
+
+SvXMLImportContext* SchXMLSeriesContext::CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+ const SvXMLTokenMap& rTokenMap = mrImportHelper.GetSeriesElemTokenMap();
+
+ switch( rTokenMap.Get( nPrefix, rLocalName ))
+ {
+ case XML_TOK_SERIES_DOMAIN:
+ {
+ sal_Int32 nIndex = mrSeriesAddress.DomainRangeAddresses.getLength();
+ mrSeriesAddress.DomainRangeAddresses.realloc( nIndex + 1 );
+ pContext = new SchXMLCategoriesDomainContext(
+ mrImportHelper, GetImport(),
+ nPrefix, rLocalName,
+ mrSeriesAddress.DomainRangeAddresses[ nIndex ] );
+ }
+ break;
+ case XML_TOK_SERIES_DATA_POINT:
+ mnDataPointIndex++;
+ pContext = new SchXMLDataPointContext( mrImportHelper, GetImport(), rLocalName, mxDiagram,
+ mnSeriesIndex, mnDataPointIndex );
+ default:
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
+// ========================================
+
+SchXMLDataPointContext::SchXMLDataPointContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName,
+ uno::Reference< chart::XDiagram >& xDiagram,
+ sal_Int32 nSeries, sal_Int32& rIndex ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ),
+ mrImportHelper( rImpHelper ),
+ mxDiagram( xDiagram ),
+ mnSeries( nSeries ),
+ mrIndex( rIndex )
+{
+}
+
+SchXMLDataPointContext::~SchXMLDataPointContext()
+{
+}
+
+void SchXMLDataPointContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+ rtl::OUString aValue;
+
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ if( nPrefix == XML_NAMESPACE_CHART )
+ {
+ if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_style_name )))
+ msAutoStyleName = xAttrList->getValueByIndex( i );
+ else if( aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_repeated )))
+ mrIndex += xAttrList->getValueByIndex( i ).toInt32() - 1;
+ }
+ }
+}
+
+void SchXMLDataPointContext::EndElement()
+{
+ if( msAutoStyleName.getLength() &&
+ mxDiagram.is())
+ {
+ uno::Reference< beans::XPropertySet > xProp;
+
+ try
+ {
+ xProp = mxDiagram->getDataPointProperties( mnSeries, mrIndex );
+ }
+ catch( lang::IndexOutOfBoundsException )
+ {
+ // resize chart
+ mrImportHelper.ResizeChartData( mnSeries + 1, mrIndex + 1 );
+ xProp = mxDiagram->getDataPointProperties( mnSeries, mrIndex );
+ }
+
+ // set properties
+ if( xProp.is())
+ {
+ const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext();
+ if( pStylesCtxt )
+ {
+ const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
+ mrImportHelper.GetChartFamilyID(), msAutoStyleName );
+
+ if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ (( XMLPropStyleContext* )pStyle )->FillPropertySet( xProp );
+ }
+ }
+ }
+}
+
+// ========================================
+
+SchXMLCategoriesDomainContext::SchXMLCategoriesDomainContext(
+ SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ rtl::OUString& rAddress ) :
+ SvXMLImportContext( rImport, nPrefix, rLocalName ),
+ mrImportHelper( rImpHelper ),
+ mrAddress( rAddress )
+{
+}
+
+SchXMLCategoriesDomainContext::~SchXMLCategoriesDomainContext()
+{
+}
+
+void SchXMLCategoriesDomainContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+ rtl::OUString aValue;
+
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ if( nPrefix == XML_NAMESPACE_TABLE &&
+ aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_cell_range_address )))
+ {
+ mrAddress = xAttrList->getValueByIndex( i );
+ }
+ }
+}
+
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx
new file mode 100644
index 0000000000..da4d7e3a18
--- /dev/null
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLPlotAreaContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _SCH_XMLPLOTAREACONTEXT_HXX_
+#define _SCH_XMLPLOTAREACONTEXT_HXX_
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
+#include <com/sun/star/uno/Sequence.h>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTSERIESADDRESS_HPP_
+#include <com/sun/star/chart/ChartSeriesAddress.hpp>
+#endif
+
+#include "transporttypes.hxx"
+
+class SvXMLImport;
+
+namespace com { namespace sun { namespace star {
+ namespace chart {
+ class XDiagram;
+ }
+ namespace xml { namespace sax {
+ class XAttributeList;
+}}}}}
+
+class SchXMLPlotAreaContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > mxDiagram;
+ std::vector< SchXMLAxis > maAxes;
+ rtl::OUString msAutoStyleName;
+ com::sun::star::uno::Sequence< com::sun::star::chart::ChartSeriesAddress >& mrSeriesAddresses;
+ rtl::OUString& mrCategoriesAddress;
+
+public:
+ SchXMLPlotAreaContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName,
+ com::sun::star::uno::Sequence<
+ com::sun::star::chart::ChartSeriesAddress >& rSeriesAddresses,
+ rtl::OUString& rCategoriesAddress );
+ virtual ~SchXMLPlotAreaContext();
+
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void EndElement();
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ----------------------------------------
+
+class SchXMLAxisContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > mxDiagram;
+ SchXMLAxis maCurrentAxis;
+ std::vector< SchXMLAxis >& maAxes;
+ rtl::OUString msAutoStyleName;
+
+public:
+ SchXMLAxisContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName,
+ com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > xDiagram,
+ std::vector< SchXMLAxis >& aAxes );
+ virtual ~SchXMLAxisContext();
+
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void EndElement();
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ----------------------------------------
+
+class SchXMLSeriesContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > mxDiagram;
+ com::sun::star::chart::ChartSeriesAddress& mrSeriesAddress;
+ rtl::OUString msAutoStyleName;
+ sal_Int32 mnSeriesIndex;
+ sal_Int32 mnDataPointIndex;
+
+public:
+ SchXMLSeriesContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName,
+ com::sun::star::uno::Reference< com::sun::star::chart::XDiagram >& xDiagram,
+ com::sun::star::chart::ChartSeriesAddress& rSeriesAddress,
+ sal_Int32 nSeriesIndex );
+ ~SchXMLSeriesContext();
+
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void EndElement();
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+//----------------------------------------
+
+class SchXMLDataPointContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > mxDiagram;
+ rtl::OUString msAutoStyleName;
+ sal_Int32 mnSeries;
+ sal_Int32& mrIndex;
+
+public:
+ SchXMLDataPointContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport, const rtl::OUString& rLocalName,
+ com::sun::star::uno::Reference< com::sun::star::chart::XDiagram >& xDiagram,
+ sal_Int32 nSeries, sal_Int32& rIndex );
+ virtual ~SchXMLDataPointContext();
+
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void EndElement();
+};
+
+// ----------------------------------------
+
+class SchXMLCategoriesDomainContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ rtl::OUString& mrAddress;
+
+public:
+ SchXMLCategoriesDomainContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ rtl::OUString& rAddress );
+ ~SchXMLCategoriesDomainContext();
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+#endif // _SCH_XMLPLOTAREACONTEXT_HXX_
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
new file mode 100644
index 0000000000..4d03e199ef
--- /dev/null
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -0,0 +1,711 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLTableContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 "SchXMLTableContext.hxx"
+#include "SchXMLParagraphContext.hxx"
+#include "SchXMLImport.hxx"
+#include "transporttypes.hxx"
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _TOOLS_SOLMATH_HXX
+#include <tools/solmath.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XCHARTDOCUMENT_HPP_
+#include <com/sun/star/chart/XChartDocument.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XCHARTDATAARRAY_HPP_
+#include <com/sun/star/chart/XChartDataArray.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTDATAROWSOURCE_HPP_
+#include <com/sun/star/chart/ChartDataRowSource.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTSERIESADDRESS_HPP_
+#include <com/sun/star/chart/ChartSeriesAddress.hpp>
+#endif
+
+using namespace com::sun::star;
+
+// ----------------------------------------
+// class SchXMLTableContext
+// ----------------------------------------
+
+SchXMLTableContext::SchXMLTableContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLName,
+ SchXMLTable& aTable ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLName ),
+ mrImportHelper( rImpHelper ),
+ mrTable( aTable )
+{
+ mrTable.nColumnIndex = -1;
+ mrTable.nMaxColumnIndex = -1;
+ mrTable.nRowIndex = -1;
+ mrTable.aData.clear();
+}
+
+SchXMLTableContext::~SchXMLTableContext()
+{
+}
+
+SvXMLImportContext *SchXMLTableContext::CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+ const SvXMLTokenMap& rTokenMap = mrImportHelper.GetTableElemTokenMap();
+
+ switch( rTokenMap.Get( nPrefix, rLocalName ))
+ {
+ case XML_TOK_TABLE_HEADER_COLS:
+ case XML_TOK_TABLE_COLUMNS:
+ pContext = new SchXMLTableColumnsContext( mrImportHelper, GetImport(), rLocalName, mrTable );
+ break;
+
+ case XML_TOK_TABLE_COLUMN:
+ pContext = new SchXMLTableColumnContext( mrImportHelper, GetImport(), rLocalName, mrTable );
+ break;
+
+ case XML_TOK_TABLE_HEADER_ROWS:
+ case XML_TOK_TABLE_ROWS:
+ pContext = new SchXMLTableRowsContext( mrImportHelper, GetImport(), rLocalName, mrTable );
+ break;
+
+ case XML_TOK_TABLE_ROW:
+ pContext = new SchXMLTableRowContext( mrImportHelper, GetImport(), rLocalName, mrTable );
+ break;
+
+ default:
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
+// ========================================
+// classes for columns
+// ========================================
+
+// ----------------------------------------
+// class SchXMLTableColumnsContext
+// ----------------------------------------
+
+SchXMLTableColumnsContext::SchXMLTableColumnsContext(
+ SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLocalName ),
+ mrImportHelper( rImpHelper ),
+ mrTable( aTable )
+{
+}
+
+SchXMLTableColumnsContext::~SchXMLTableColumnsContext()
+{
+}
+
+SvXMLImportContext* SchXMLTableColumnsContext::CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+
+ if( nPrefix == XML_NAMESPACE_TABLE &&
+ rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_column )))
+ {
+ pContext = new SchXMLTableColumnContext( mrImportHelper, GetImport(), rLocalName, mrTable );
+ }
+ else
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+
+ return pContext;
+}
+
+// ----------------------------------------
+// class SchXMLTableColumnContext
+// ----------------------------------------
+
+SchXMLTableColumnContext::SchXMLTableColumnContext(
+ SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLocalName ),
+ mrImportHelper( rImpHelper ),
+ mrTable( aTable )
+{
+}
+
+void SchXMLTableColumnContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ // get number-columns-repeated attribute
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+ rtl::OUString aValue;
+
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ if( nPrefix == XML_NAMESPACE_TABLE &&
+ aLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_number_columns_repeated )))
+ {
+ aValue = xAttrList->getValueByIndex( i );
+ break; // we only need this attribute
+ }
+ }
+
+ if( aValue.getLength())
+ {
+ sal_Int32 nRepeated = aValue.toInt32();
+ mrTable.nNumberOfColsEstimate += nRepeated;
+ }
+ else
+ {
+ mrTable.nNumberOfColsEstimate++;
+ }
+}
+
+SchXMLTableColumnContext::~SchXMLTableColumnContext()
+{
+}
+
+// ========================================
+// classes for rows
+// ========================================
+
+// ----------------------------------------
+// class SchXMLTableRowsContext
+// ----------------------------------------
+
+SchXMLTableRowsContext::SchXMLTableRowsContext(
+ SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLocalName ),
+ mrImportHelper( rImpHelper ),
+ mrTable( aTable )
+{
+}
+
+SchXMLTableRowsContext::~SchXMLTableRowsContext()
+{
+}
+
+SvXMLImportContext* SchXMLTableRowsContext::CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+
+ if( nPrefix == XML_NAMESPACE_TABLE &&
+ rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_row )))
+ {
+ pContext = new SchXMLTableRowContext( mrImportHelper, GetImport(), rLocalName, mrTable );
+ }
+ else
+ {
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
+// ----------------------------------------
+// class SchXMLTableRowContext
+// ----------------------------------------
+
+SchXMLTableRowContext::SchXMLTableRowContext(
+ SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLocalName ),
+ mrImportHelper( rImpHelper ),
+ mrTable( aTable )
+{
+ mrTable.nColumnIndex = -1;
+ mrTable.nRowIndex++;
+
+ std::vector< SchXMLCell > aNewRow;
+ aNewRow.reserve( mrTable.nNumberOfColsEstimate );
+ while( mrTable.aData.size() <= mrTable.nRowIndex )
+ mrTable.aData.push_back( aNewRow );
+}
+
+SchXMLTableRowContext::~SchXMLTableRowContext()
+{
+}
+
+SvXMLImportContext* SchXMLTableRowContext::CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+
+ // <table:table-cell> element
+ if( nPrefix == XML_NAMESPACE_TABLE &&
+ rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_cell )))
+ {
+ pContext = new SchXMLTableCellContext( mrImportHelper, GetImport(), rLocalName, mrTable );
+ }
+ else
+ {
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
+
+// ========================================
+// classes for cells and their content
+// ========================================
+
+// ----------------------------------------
+// class SchXMLTableCellContext
+// ----------------------------------------
+
+SchXMLTableCellContext::SchXMLTableCellContext(
+ SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLocalName ),
+ mrImportHelper( rImpHelper ),
+ mrTable( aTable )
+{
+}
+
+SchXMLTableCellContext::~SchXMLTableCellContext()
+{
+}
+
+void SchXMLTableCellContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
+ rtl::OUString aValue;
+ rtl::OUString aLocalName;
+ rtl::OUString aCellContent;
+ SchXMLCellType eValueType = SCH_CELL_TYPE_UNKNOWN;
+ const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetCellAttrTokenMap();
+
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ switch( rAttrTokenMap.Get( nPrefix, aLocalName ))
+ {
+ case XML_TOK_CELL_VAL_TYPE:
+ aValue = xAttrList->getValueByIndex( i );
+ if( aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_float )))
+ eValueType = SCH_CELL_TYPE_FLOAT;
+ else if( aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_string )))
+ eValueType = SCH_CELL_TYPE_STRING;
+ break;
+
+ case XML_TOK_CELL_VALUE:
+ aCellContent = xAttrList->getValueByIndex( i );
+ break;
+ }
+ }
+
+ mbReadPara = sal_True;
+ SchXMLCell aCell;
+ aCell.eType = eValueType;
+
+ if( eValueType == SCH_CELL_TYPE_FLOAT )
+ {
+ double fData;
+ sal_Bool bResult = SvXMLUnitConverter::convertNumber( fData, aCellContent );
+ DBG_ASSERT( bResult, "Error converting string to double" );
+
+ aCell.fValue = fData;
+ // dont read following <text:p> element
+ mbReadPara = sal_False;
+ }
+
+ mrTable.aData[ mrTable.nRowIndex ].push_back( aCell );
+ mrTable.nColumnIndex++;
+ if( mrTable.nMaxColumnIndex < mrTable.nColumnIndex )
+ mrTable.nMaxColumnIndex = mrTable.nColumnIndex;
+}
+
+SvXMLImportContext* SchXMLTableCellContext::CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+
+ // <text:p> element
+ if( mbReadPara &&
+ nPrefix == XML_NAMESPACE_TEXT &&
+ rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_p )))
+ {
+ // we have to read a string here (not a float)
+ pContext = new SchXMLParagraphContext( GetImport(), rLocalName, maCellContent );
+ }
+ else
+ {
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
+void SchXMLTableCellContext::EndElement()
+{
+ if( mbReadPara && maCellContent.getLength())
+ mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ].aString = maCellContent;
+}
+
+// ========================================
+
+void SchXMLTableHelper::applyTable(
+ const SchXMLTable& rTable,
+ uno::Sequence< chart::ChartSeriesAddress >& rSeriesAddresses,
+ rtl::OUString& rCategoriesAddress,
+ uno::Reference< chart::XChartDocument > xChartDoc )
+{
+ // general note: series are always interpreted as columns in import
+
+ // first check if data can be attached to an appropriate object
+ if( rTable.nRowIndex > -1 &&
+ xChartDoc.is())
+ {
+ uno::Reference< chart::XChartDataArray > xData( xChartDoc->getData(), uno::UNO_QUERY );
+ if( xData.is())
+ {
+ sal_Int32 nNumSeriesAddresses = rSeriesAddresses.getLength();
+ sal_Int32 nNumLabelAddresses = nNumSeriesAddresses;
+ sal_Int32 nDomainOffset = 0;
+ sal_Int32 nNumAddrSize = nNumSeriesAddresses;
+
+ uno::Reference< chart::XChartData > xChartData( xData, uno::UNO_QUERY );
+ if( xChartData.is())
+ {
+ sal_Int32 nColumns = 0;
+ sal_Int32 nRows = 0;
+ sal_Int32 i, j;
+
+ // set data
+ if( nNumSeriesAddresses )
+ {
+ // get NaN
+ double fSolarNaN;
+ SolarMath::SetNAN( fSolarNaN, FALSE );
+ double fNaN = fSolarNaN;
+ fNaN = xChartData->getNotANumber();
+
+ // convert data from std::vector to uno::Sequence
+ // ----------------------------------------------
+
+ // determine size of data
+ std::vector< SchNumericCellRangeAddress > aNumericAddresses( nNumSeriesAddresses );
+
+ for( i = 0; i < nNumSeriesAddresses; i++ )
+ {
+ if( rSeriesAddresses[ i ].DomainRangeAddresses.getLength())
+ {
+ GetCellRangeAddress( rSeriesAddresses[ i ].DomainRangeAddresses[ 0 ],
+ aNumericAddresses[ i + nDomainOffset ] );
+ AdjustMax( aNumericAddresses[ i + nDomainOffset ], nRows, nColumns );
+ nDomainOffset++;
+ aNumericAddresses.reserve( nNumSeriesAddresses + nDomainOffset );
+ }
+
+ GetCellRangeAddress( rSeriesAddresses[ i ].DataRangeAddress,
+ aNumericAddresses[ i + nDomainOffset ] );
+ AdjustMax( aNumericAddresses[ i + nDomainOffset ], nRows, nColumns );
+ }
+ nNumAddrSize += nDomainOffset;
+
+ // allocate memory for sequence
+ uno::Sequence< uno::Sequence< double > > aSequence( nRows );
+ for( i = 0; i < nRows; i++ )
+ {
+ aSequence[ i ].realloc( nColumns );
+
+ // initialize values with NaN
+ for( j = 0; j < nColumns; j++ )
+ aSequence[ i ][ j ] = fNaN;
+ }
+
+ // copy data
+ for( i = 0; i < nNumAddrSize; i++ )
+ PutTableContentIntoSequence( rTable, aNumericAddresses[ i ], i, aSequence );
+
+ // set data to XChartDataArray
+ xData->setData( aSequence );
+ }
+
+ // set labels
+ uno::Sequence< rtl::OUString > aLabels;
+ aLabels.realloc( nNumAddrSize );
+
+ sal_Int32 nRow, nCol;
+ for( i = 0; i < nNumSeriesAddresses; i++ )
+ {
+ if( rSeriesAddresses[ i ].LabelAddress.getLength())
+ {
+ GetCellAddress( rSeriesAddresses[ i ].LabelAddress, nCol, nRow );
+ aLabels[ i + nDomainOffset ] = rTable.aData[ nRow ][ nCol ].aString;
+ }
+ }
+ xData->setColumnDescriptions( aLabels );
+
+ // set categories
+ aLabels = xData->getRowDescriptions();
+
+ if( rCategoriesAddress.getLength())
+ {
+ SchNumericCellRangeAddress aAddress;
+ if( GetCellRangeAddress( rCategoriesAddress, aAddress ))
+ {
+ uno::Sequence< rtl::OUString > aLabels;
+
+ if( aAddress.nCol1 == aAddress.nCol2 )
+ {
+ sal_Int32 nWidth = aAddress.nRow2 - aAddress.nRow1 + 1;
+ aLabels.realloc( nWidth );
+
+ for( i = 0; i < nWidth; i++ )
+ {
+ DBG_ASSERT( rTable.aData[ aAddress.nRow1 + i ][ aAddress.nCol1 ].eType == SCH_CELL_TYPE_STRING, "expecting string" );
+ aLabels[ i ] = rTable.aData[ aAddress.nRow1 + i ][ aAddress.nCol1 ].aString;
+ }
+ }
+ else
+ {
+ DBG_ASSERT( aAddress.nRow1 == aAddress.nRow2, "range must be in one row or one column" );
+
+ sal_Int32 nWidth = aAddress.nCol2 - aAddress.nCol1 + 1;
+ aLabels.realloc( nWidth );
+
+ for( sal_Int32 i = 0; i < nWidth; i++ )
+ {
+ DBG_ASSERT( rTable.aData[ aAddress.nRow1 ][ aAddress.nCol1 + i ].eType == SCH_CELL_TYPE_STRING, "expecting string" );
+ aLabels[ i ] = rTable.aData[ aAddress.nRow1 ][ aAddress.nCol1 + i ].aString;
+ }
+ }
+
+ xData->setRowDescriptions( aLabels );
+ }
+ }
+
+ // apply data to chart
+ // not necessary ?
+ // xChartDoc->attachData( xChartData );
+ }
+ }
+ }
+}
+
+void SchXMLTableHelper::AdjustMax( const SchNumericCellRangeAddress& rAddr,
+ sal_Int32& nRows, sal_Int32& nColumns )
+{
+ // rows and columns are both mapped to columns ( == series )
+ if( rAddr.nCol1 == rAddr.nCol2 )
+ {
+ if( rAddr.nRow1 > nRows )
+ nRows = rAddr.nRow1;
+ if( rAddr.nRow2 > nRows )
+ nRows = rAddr.nRow2;
+ if( rAddr.nCol1 > nColumns )
+ nColumns = rAddr.nCol1;
+ if( rAddr.nCol2 > nColumns )
+ nColumns = rAddr.nCol2;
+ }
+ else
+ {
+ DBG_ASSERT( rAddr.nRow1 == rAddr.nRow2, "row indexes should be equal" );
+ if( rAddr.nRow1 > nRows )
+ nColumns = rAddr.nRow1;
+ if( rAddr.nRow2 > nRows )
+ nColumns = rAddr.nRow2;
+ if( rAddr.nCol1 > nColumns )
+ nRows = rAddr.nCol1;
+ if( rAddr.nCol2 > nColumns )
+ nRows = rAddr.nCol2;
+ }
+}
+
+void SchXMLTableHelper::GetCellAddress( const rtl::OUString& rStr, sal_Int32& rCol, sal_Int32& rRow )
+{
+ sal_Int32 nPos = rStr.indexOf( sal_Unicode( '.' ));
+ if( nPos != -1 )
+ {
+ // currently just one letter is accepted
+ sal_Unicode aLetter = rStr.getStr()[ nPos + 1 ];
+ if( 'a' <= aLetter && aLetter <= 'z' )
+ rCol = aLetter - 'a';
+ else
+ rCol = aLetter - 'A';
+
+ rRow = (rStr.copy( nPos + 2 )).toInt32() - 1;
+ }
+}
+
+sal_Bool SchXMLTableHelper::GetCellRangeAddress(
+ const rtl::OUString& rStr, SchNumericCellRangeAddress& rResult )
+{
+ sal_Int32 nBreakAt = rStr.indexOf( sal_Unicode( ':' ));
+ if( nBreakAt != -1 )
+ {
+ GetCellAddress( rStr.copy( 0, nBreakAt ), rResult.nCol1, rResult.nRow1 );
+ GetCellAddress( rStr.copy( nBreakAt + 1 ), rResult.nCol2, rResult.nRow2 );
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+
+// returns true if datarange was inside one column
+void SchXMLTableHelper::PutTableContentIntoSequence(
+ const SchXMLTable& rTable,
+ SchNumericCellRangeAddress& rAddress,
+ sal_Int32 nSeriesIndex,
+ uno::Sequence< uno::Sequence< double > >& aSequence )
+{
+ if( rAddress.nCol2 > rTable.nMaxColumnIndex + 1 ||
+ rAddress.nRow2 > rTable.nRowIndex + 1 )
+ {
+ DBG_ERROR( "Invalid references" );
+ //ToDo: strip the range
+ return;
+ }
+
+ // currently only ranges that span one row or one column are supported
+
+ sal_Int32 nSeqPos = 0;
+ uno::Sequence< double >* pSeqArray = aSequence.getArray();
+
+ // same column
+ if( rAddress.nCol1 == rAddress.nCol2 )
+ {
+ if( rAddress.nRow1 <= rAddress.nRow2 )
+ {
+ for( sal_Int32 nRow = rAddress.nRow1; nRow <= rAddress.nRow2; nRow++, nSeqPos++ )
+ {
+ DBG_ASSERT( rTable.aData[ nRow ][ rAddress.nCol1 ].eType != SCH_CELL_TYPE_UNKNOWN, "trying to refer to unknown cell" );
+ pSeqArray[ nSeqPos ][ nSeriesIndex ] = rTable.aData[ nRow ][ rAddress.nCol1 ].fValue;
+ }
+ }
+ else // reverse
+ {
+ for( sal_Int32 nRow = rAddress.nRow1; nRow >= rAddress.nRow2; nRow--, nSeqPos++ )
+ {
+ DBG_ASSERT( rTable.aData[ nRow ][ rAddress.nCol1 ].eType != SCH_CELL_TYPE_UNKNOWN, "trying to refer to unknown cell" );
+ pSeqArray[ nSeqPos ][ nSeriesIndex ] = rTable.aData[ nRow ][ rAddress.nCol1 ].fValue;
+ }
+ }
+ }
+ else // same row
+ {
+ DBG_ASSERT( rAddress.nRow1 == rAddress.nRow2, "range must be in one row or one column" );
+
+ if( rAddress.nCol1 <= rAddress.nCol2 )
+ {
+ for( sal_Int32 nCol = rAddress.nCol1; nCol <= rAddress.nCol2; nCol++, nSeqPos++ )
+ {
+ DBG_ASSERT( rTable.aData[ rAddress.nRow1 ][ nCol ].eType != SCH_CELL_TYPE_UNKNOWN, "trying to refer to unknown cell" );
+ pSeqArray[ nSeqPos ][ nSeriesIndex ] = rTable.aData[ rAddress.nRow1 ][ nCol ].fValue;
+ }
+ }
+ else // reverse
+ {
+ for( sal_Int32 nCol = rAddress.nCol1; nCol >= rAddress.nCol2; nCol--, nSeqPos++ )
+ {
+ DBG_ASSERT( rTable.aData[ rAddress.nRow1 ][ nCol ].eType != SCH_CELL_TYPE_UNKNOWN, "trying to refer to unknown cell" );
+ pSeqArray[ nSeqPos ][ nSeriesIndex ] = rTable.aData[ rAddress.nRow1 ][ nCol ].fValue;
+ }
+ }
+ }
+}
+
diff --git a/xmloff/source/chart/SchXMLTableContext.hxx b/xmloff/source/chart/SchXMLTableContext.hxx
new file mode 100644
index 0000000000..218ef6c352
--- /dev/null
+++ b/xmloff/source/chart/SchXMLTableContext.hxx
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * $RCSfile: SchXMLTableContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _SCH_XMLTABLECONTEXT_HXX_
+#define _SCH_XMLTABLECONTEXT_HXX_
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+#ifndef SCH_XMLIMPORT_HXX_
+#include "SchXMLImport.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
+#include <com/sun/star/uno/Sequence.h>
+#endif
+
+#include "transporttypes.hxx"
+
+namespace com { namespace sun { namespace star {
+ namespace frame {
+ class XModel;
+ }
+ namespace xml { namespace sax {
+ class XAttributeList;
+ }}
+ namespace chart {
+ class XChartDocument;
+ struct ChartSeriesAddress;
+}}}}
+
+// ========================================
+
+class SchXMLTableContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ SchXMLTable& mrTable;
+
+public:
+ SchXMLTableContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable );
+ virtual ~SchXMLTableContext();
+
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ----------------------------------------
+
+class SchXMLTableHelper
+{
+private:
+ static void GetCellAddress( const rtl::OUString& rStr, sal_Int32& rCol, sal_Int32& rRow );
+ static sal_Bool GetCellRangeAddress( const rtl::OUString& rStr, SchNumericCellRangeAddress& rResult );
+ static void PutTableContentIntoSequence(
+ const SchXMLTable& rTable,
+ SchNumericCellRangeAddress& rAddress,
+ sal_Int32 nSeriesIndex,
+ com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< double > >& aSequence );
+ static void AdjustMax( const SchNumericCellRangeAddress& rAddr,
+ sal_Int32& nRows, sal_Int32& nColumns );
+
+public:
+ /** The data for the ChartDocument is applied by reading the
+ table, the addresses of series, the addresses of labels,
+ the cell-range-address for the categories
+ */
+ static void applyTable( const SchXMLTable& rTable,
+ com::sun::star::uno::Sequence<
+ com::sun::star::chart::ChartSeriesAddress >& rSeriesAddresses,
+ rtl::OUString& rCategoriesAddress,
+ com::sun::star::uno::Reference< com::sun::star::chart::XChartDocument > xChartDoc );
+};
+
+// ========================================
+
+// ----------------------------------------
+// classes for columns
+// ----------------------------------------
+
+/** With this context all column elements are parsed to
+ determine the index of the column containing
+ the row descriptions and probably get an estimate
+ for the altogether number of columns
+ */
+class SchXMLTableColumnsContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ SchXMLTable& mrTable;
+
+public:
+ SchXMLTableColumnsContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable );
+ virtual ~SchXMLTableColumnsContext();
+
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ----------------------------------------
+
+class SchXMLTableColumnContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ SchXMLTable& mrTable;
+
+public:
+ SchXMLTableColumnContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable );
+ virtual ~SchXMLTableColumnContext();
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ----------------------------------------
+// classes for rows
+// ----------------------------------------
+
+class SchXMLTableRowsContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ SchXMLTable& mrTable;
+
+public:
+ SchXMLTableRowsContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable );
+ virtual ~SchXMLTableRowsContext();
+
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ----------------------------------------
+
+class SchXMLTableRowContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ SchXMLTable& mrTable;
+
+public:
+ SchXMLTableRowContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable );
+ virtual ~SchXMLTableRowContext();
+
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ----------------------------------------
+// classes for cells and their content
+// ----------------------------------------
+
+class SchXMLTableCellContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+ SchXMLTable& mrTable;
+ rtl::OUString maCellContent;
+ sal_Bool mbReadPara;
+
+public:
+ SchXMLTableCellContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ const rtl::OUString& rLocalName,
+ SchXMLTable& aTable );
+ virtual ~SchXMLTableCellContext();
+
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void EndElement();
+};
+
+#endif // _SCH_XMLTABLECONTEXT_HXX_
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx
new file mode 100644
index 0000000000..52a6df42e0
--- /dev/null
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLChartStyleContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 "XMLChartStyleContext.hxx"
+
+using namespace com::sun::star;
+
+TYPEINIT1( XMLChartStyleContext, XMLPropStyleContext );
+
+XMLChartStyleContext::XMLChartStyleContext(
+ SvXMLImport& rImport, sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList,
+ SvXMLStylesContext& rStyles ) :
+ XMLPropStyleContext( rImport, nPrefix, rLName, xAttrList, rStyles )
+{
+}
+
+XMLChartStyleContext::~XMLChartStyleContext()
+{}
+
+SvXMLImportContext* XMLChartStyleContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ if( !pContext )
+ pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName,
+ xAttrList );
+
+ return pContext;
+}
+
+void XMLChartStyleContext::CreateAndInsert( sal_Bool bOverwrite )
+{
+ XMLPropStyleContext::CreateAndInsert( bOverwrite );
+}
+
+void XMLChartStyleContext::Finish( sal_Bool bOverwrite )
+{
+ XMLPropStyleContext::Finish( bOverwrite );
+}
+
diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx
new file mode 100644
index 0000000000..03095e3b6f
--- /dev/null
+++ b/xmloff/source/chart/contexts.cxx
@@ -0,0 +1,191 @@
+/*************************************************************************
+ *
+ * $RCSfile: contexts.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLMETAI_HXX
+#include "xmlmetai.hxx"
+#endif
+#ifndef SCH_XMLIMPORT_HXX_
+#include "SchXMLImport.hxx"
+#endif
+#ifndef _XMLOFF_XMLCHARTSTYLECONTEXT_HXX_
+#include "XMLChartStyleContext.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_CHART_XCHARTDOCUMENT_HPP_
+#include <com/sun/star/chart/XChartDocument.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_XCHARTDATAARRAY_HPP_
+#include <com/sun/star/chart/XChartDataArray.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART_CHARTDATAROWSOURCE_HPP_
+#include <com/sun/star/chart/ChartDataRowSource.hpp>
+#endif
+
+#include "contexts.hxx"
+#include "SchXMLChartContext.hxx"
+
+using namespace com::sun::star;
+
+// ==================================================
+
+SchXMLDocContext::SchXMLDocContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ USHORT nPrefix,
+ const rtl::OUString& rLName ) :
+ SvXMLImportContext( rImport, nPrefix, rLName ),
+ mrImportHelper( rImpHelper )
+{
+ DBG_ASSERT( XML_NAMESPACE_OFFICE == nPrefix &&
+ rLName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_document )),
+ "SchXMLDocContext instanciated with no <office:document> element" );
+}
+
+SchXMLDocContext::~SchXMLDocContext()
+{}
+
+SvXMLImportContext* SchXMLDocContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+ const SvXMLTokenMap& rTokenMap = mrImportHelper.GetDocElemTokenMap();
+
+ switch( rTokenMap.Get( nPrefix, rLocalName ))
+ {
+ case XML_TOK_DOC_AUTOSTYLES:
+ {
+ SvXMLStylesContext* pStylesCtxt =
+ new SvXMLStylesContext( GetImport(), nPrefix, rLocalName, xAttrList );
+ mrImportHelper.SetAutoStylesContext( pStylesCtxt );
+ pContext = pStylesCtxt;
+ }
+ break;
+ case XML_TOK_DOC_META:
+ pContext = new SfxXMLMetaContext( GetImport(), nPrefix, rLocalName, GetImport().GetModel());
+ break;
+ case XML_TOK_DOC_BODY:
+ pContext = new SchXMLBodyContext( mrImportHelper, GetImport(), nPrefix, rLocalName );
+ break;
+ default:
+ pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList );
+ break;
+ }
+
+ return pContext;
+}
+
+// ----------------------------------------
+
+SchXMLBodyContext::SchXMLBodyContext( SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ USHORT nPrefix,
+ const rtl::OUString& rLName ) :
+ SvXMLImportContext( rImport, nPrefix, rLName ),
+ mrImportHelper( rImpHelper )
+{
+ DBG_ASSERT( XML_NAMESPACE_OFFICE == nPrefix &&
+ rLName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_body )),
+ "SchXMLBodyContext instanciated with no <office:body> element" );
+}
+
+SchXMLBodyContext::~SchXMLBodyContext()
+{}
+
+void SchXMLBodyContext::EndElement()
+{
+}
+
+SvXMLImportContext* SchXMLBodyContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+
+ // <chart:chart> element
+ if( nPrefix == XML_NAMESPACE_CHART &&
+ rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_chart )))
+ {
+ pContext = mrImportHelper.CreateChartContext( GetImport(),
+ nPrefix, rLocalName,
+ GetImport().GetModel(),
+ xAttrList );
+ }
+ else
+ {
+ pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList );
+ }
+
+ return pContext;
+}
+
+
diff --git a/xmloff/source/chart/contexts.hxx b/xmloff/source/chart/contexts.hxx
new file mode 100644
index 0000000000..b44b0021f9
--- /dev/null
+++ b/xmloff/source/chart/contexts.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * $RCSfile: contexts.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _SCH_XML_CONTEXTS_HXX_
+#define _SCH_XML_CONTEXTS_HXX_
+
+#include "SchXMLImport.hxx"
+#include "SchXMLTableContext.hxx"
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+
+namespace com { namespace sun { namespace star { namespace xml { namespace sax {
+ class XAttributeList;
+}}}}}
+
+/* ========================================
+
+ These contexts are only nedded by
+ SchXMLImport not by the SchXMLImportHelper
+ that is also used by other applications
+
+ ======================================== */
+
+class SchXMLDocContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+
+public:
+ SchXMLDocContext(
+ SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLName );
+ virtual ~SchXMLDocContext();
+
+ virtual SvXMLImportContext* CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ========================================
+
+class SchXMLBodyContext : public SvXMLImportContext
+{
+private:
+ SchXMLImportHelper& mrImportHelper;
+
+public:
+ SchXMLBodyContext(
+ SchXMLImportHelper& rImpHelper,
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLName );
+ virtual ~SchXMLBodyContext();
+
+ virtual void EndElement();
+ virtual SvXMLImportContext* CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+};
+
+// ========================================
+
+#endif // _SCH_XML_CONTEXTS_HXX_
diff --git a/xmloff/source/chart/makefile.mk b/xmloff/source/chart/makefile.mk
new file mode 100644
index 0000000000..9f727fc5e7
--- /dev/null
+++ b/xmloff/source/chart/makefile.mk
@@ -0,0 +1,90 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:07: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 = xmloff
+TARGET = chart
+AUTOSEG = true
+ENABLE_EXCEPTIONS = TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = $(SLO)$/SchXMLExport.obj \
+ $(SLO)$/SchXMLImport.obj \
+ $(SLO)$/contexts.obj \
+ $(SLO)$/SchXMLTableContext.obj \
+ $(SLO)$/SchXMLChartContext.obj \
+ $(SLO)$/SchXMLPlotAreaContext.obj \
+ $(SLO)$/SchXMLParagraphContext.obj \
+ $(SLO)$/PropertyMaps.obj \
+ $(SLO)$/XMLChartStyleContext.obj
+
+# --- Targets --------------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/xmloff/source/chart/transporttypes.hxx b/xmloff/source/chart/transporttypes.hxx
new file mode 100644
index 0000000000..eff9444a32
--- /dev/null
+++ b/xmloff/source/chart/transporttypes.hxx
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * $RCSfile: transporttypes.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 SCH_XML_TRANSPORTTYPES_HXX_
+#define SCH_XML_TRANSPORTTYPES_HXX_
+
+#ifndef __SGI_STL_VECTOR
+#include <stl/vector>
+#endif
+
+enum SchXMLCellType
+{
+ SCH_CELL_TYPE_UNKNOWN,
+ SCH_CELL_TYPE_FLOAT,
+ SCH_CELL_TYPE_STRING
+};
+
+struct SchXMLCell
+{
+ rtl::OUString aString;
+ double fValue;
+ SchXMLCellType eType;
+
+ SchXMLCell() : fValue( 0.0 ), eType( SCH_CELL_TYPE_UNKNOWN ) {}
+};
+
+struct SchXMLTable
+{
+ std::vector< std::vector< SchXMLCell > > aData; /// an array of rows containing the table contents
+
+ sal_Int32 nRowIndex; /// reflects the index of the row currently parsed
+ sal_Int32 nColumnIndex; /// reflects the index of the column currently parsed
+ sal_Int32 nMaxColumnIndex; /// the greatest number of columns detected
+
+ sal_Int32 nNumberOfColsEstimate; /// parsing column-elements may yield an estimate
+
+ SchXMLTable() : nRowIndex( -1 ),
+ nColumnIndex( -1 ),
+ nMaxColumnIndex( -1 ),
+ nNumberOfColsEstimate( 0 ) {}
+};
+
+// ----------------------------------------
+
+struct SchNumericCellRangeAddress
+{
+ sal_Int32 nRow1, nRow2;
+ sal_Int32 nCol1, nCol2;
+
+ SchNumericCellRangeAddress() :
+ nRow1( -1 ), nRow2( -1 ),
+ nCol1( -1 ), nCol2( -1 )
+ {}
+
+ SchNumericCellRangeAddress( const SchNumericCellRangeAddress& aOther )
+ {
+ nRow1 = aOther.nRow1; nRow2 = aOther.nRow2;
+ nCol1 = aOther.nCol1; nCol2 = aOther.nCol2;
+ }
+};
+
+// ----------------------------------------
+
+enum SchXMLAxisClass
+{
+ SCH_XML_AXIS_CATEGORY,
+ SCH_XML_AXIS_DOMAIN,
+ SCH_XML_AXIS_VALUE,
+ SCH_XML_AXIS_SERIES,
+ SCH_XML_AXIS_UNDEF
+};
+
+struct SchXMLAxis
+{
+ enum SchXMLAxisClass eClass;
+ sal_Int8 nIndexInCategory;
+ rtl::OUString aName;
+ rtl::OUString aTitle;
+
+ SchXMLAxis() : eClass( SCH_XML_AXIS_UNDEF ), nIndexInCategory( 0 ) {}
+};
+
+#endif // SCH_XML_TRANSPORTTYPES_HXX_
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
new file mode 100644
index 0000000000..618ba2595f
--- /dev/null
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLShapeStyleContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _XMLOFF_XMLSHAPESTYLECONTEXT_HXX
+#include "XMLShapeStyleContext.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( XMLShapeStyleContext, XMLPropStyleContext );
+
+XMLShapeStyleContext::XMLShapeStyleContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ SvXMLStylesContext& rStyles,
+ sal_uInt16 nFamily)
+: XMLPropStyleContext(rImport, nPrfx, rLName, xAttrList, rStyles)
+{
+ // set Family
+ SetFamily(nFamily);
+}
+
+XMLShapeStyleContext::~XMLShapeStyleContext()
+{
+}
+
+
diff --git a/xmloff/source/draw/makefile.mk b/xmloff/source/draw/makefile.mk
new file mode 100644
index 0000000000..a60c263837
--- /dev/null
+++ b/xmloff/source/draw/makefile.mk
@@ -0,0 +1,95 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:07: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=xmloff
+TARGET=draw
+AUTOSEG=true
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = \
+ $(SLO)$/sdxmlimp.obj \
+ $(SLO)$/sdxmlexp.obj \
+ $(SLO)$/ximpstyl.obj \
+ $(SLO)$/ximpbody.obj \
+ $(SLO)$/ximpshap.obj \
+ $(SLO)$/ximpgrp.obj \
+ $(SLO)$/ximpnote.obj \
+ $(SLO)$/sdpropls.obj \
+ $(SLO)$/propimp0.obj \
+ $(SLO)$/xexptran.obj \
+ $(SLO)$/shapeexport.obj \
+ $(SLO)$/shapeimport.obj \
+ $(SLO)$/XMLShapeStyleContext.obj
+
+# --- Targets --------------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/xmloff/source/draw/propimp0.cxx b/xmloff/source/draw/propimp0.cxx
new file mode 100644
index 0000000000..db945aac44
--- /dev/null
+++ b/xmloff/source/draw/propimp0.cxx
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * $RCSfile: propimp0.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _PROPIMP0_HXX
+#include "propimp0.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_LINEDASH_HPP_
+#include <com/sun/star/drawing/LineDash.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+// implementation of graphic property Stroke
+
+
+//////////////////////////////////////////////////////////////////////////////
+// implementation of presentation page property Change
+
+
+XMLDashArrayPropertyHdl::~XMLDashArrayPropertyHdl()
+{
+}
+
+sal_Bool XMLDashArrayPropertyHdl::equals(
+ const ::com::sun::star::uno::Any& r1,
+ const ::com::sun::star::uno::Any& r2 ) const
+{
+ sal_Int32 nChange1, nChange2;
+
+ if((r1 >>= nChange1) && (r2 >>= nChange2))
+ return (nChange1 == nChange2);
+ return sal_False;
+}
+
+sal_Bool XMLDashArrayPropertyHdl::importXML(
+ const OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRetval(sal_False);
+
+
+ return bRetval;
+}
+
+sal_Bool XMLDashArrayPropertyHdl::exportXML(
+ OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Int32 nVal;
+ sal_Bool bRetval(sal_False);
+
+ if(rValue >>= nVal)
+ {
+
+ sal_Int16 Dots;
+ sal_Int32 DotLen;
+ sal_Int16 Dashes;
+ sal_Int32 DashLen;
+ sal_Int32 Distance;
+
+ }
+
+ return bRetval;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// implementation of an effect duration property handler
+
+
+XMLDurationPropertyHdl::~XMLDurationPropertyHdl()
+{
+}
+
+sal_Bool XMLDurationPropertyHdl::importXML(
+ const OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ const String aStr( rStrImpValue );
+
+ sal_Int32 nVal = aStr.ToInt32();
+ rValue <<= nVal;
+
+ return sal_True;
+}
+
+sal_Bool XMLDurationPropertyHdl::exportXML(
+ OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Int32 nVal;
+
+ if(rValue >>= nVal)
+ {
+ OUStringBuffer aOut;
+ aOut.append( nVal );
+ aOut.append( OUString::createFromAscii( "s" ));
+ rStrExpValue = aOut.makeStringAndClear();
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+
diff --git a/xmloff/source/draw/propimp0.hxx b/xmloff/source/draw/propimp0.hxx
new file mode 100644
index 0000000000..e41e529a6a
--- /dev/null
+++ b/xmloff/source/draw/propimp0.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: propimp0.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _PROPIMP0_HXX
+#define _PROPIMP0_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// graphic property Stroke
+
+class XMLDashArrayPropertyHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLDashArrayPropertyHdl();
+ virtual sal_Bool equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const;
+ virtual sal_Bool importXML( const rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+class XMLDurationPropertyHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLDurationPropertyHdl();
+ virtual sal_Bool importXML( const rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+
+#endif // _PROPIMP0_HXX
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
new file mode 100644
index 0000000000..f595767546
--- /dev/null
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -0,0 +1,424 @@
+/*************************************************************************
+ *
+ * $RCSfile: sdpropls.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_
+#include <com/sun/star/drawing/LineStyle.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_LINEJOINT_HPP_
+#include <com/sun/star/drawing/LineJoint.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_FILLSTYLE_HPP_
+#include <com/sun/star/drawing/FillStyle.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_COLORMODE_HPP_
+#include <com/sun/star/drawing/ColorMode.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_PRESENTATION_ANIMATIONSPEED_HPP_
+#include <com/sun/star/presentation/AnimationSpeed.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_PRESENTATION_FADEEFFECT_HPP_
+#include <com/sun/star/presentation/FadeEffect.hpp>
+#endif
+
+#ifndef _XMLOFF_ENUMPROPERTYHANDLER_HXX
+#include <EnumPropertyHdl.hxx>
+#endif
+
+#ifndef _XMLOFF_NAMEDBOOLPROPERTYHANDLER_HXX
+#include <NamedBoolPropertyHdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include <xmlkywd.hxx>
+#endif
+
+#ifndef _SDPROPLS_HXX
+#include "sdpropls.hxx"
+#endif
+
+#ifndef _PROPIMP0_HXX
+#include "propimp0.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include <xmlnmspe.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+// entry list for graphic properties
+
+#define CTF_CHARHEIGHT 1
+#define CTF_CHARHEIGHT_REL 2
+#define CTF_PARALEFTMARGIN 3
+#define CTF_PARALEFTMARGIN_REL 4
+#define CTF_PARARIGHTMARGIN 5
+#define CTF_PARARIGHTMARGIN_REL 6
+#define CTF_PARAFIRSTLINE 7
+#define CTF_PARAFIRSTLINE_REL 8
+#define CTF_PARATOPMARGIN 9
+#define CTF_PARATOPMARGIN_REL 10
+#define CTF_PARABOTTOMMARGIN 11
+#define CTF_PARABOTTOMMARGIN_REL 12
+
+const XMLPropertyMapEntry aXMLSDProperties[] =
+{
+ // stroke attributes
+ { "LineStyle", XML_NAMESPACE_DRAW, sXML_stroke, XML_SD_TYPE_STROKE, 0 },
+ { "LineDashName", XML_NAMESPACE_DRAW, sXML_stroke_dasharray, XML_TYPE_STRING, 0 },
+ { "LineWidth", XML_NAMESPACE_SVG, sXML_stroke_width, XML_TYPE_MEASURE, 0 },
+ { "LineColor", XML_NAMESPACE_SVG, sXML_stroke_color, XML_TYPE_COLOR, 0 },
+ { "LineStartName", XML_NAMESPACE_DRAW, sXML_marker_start, XML_TYPE_STRING, 0 },
+ { "LineStartWidth", XML_NAMESPACE_DRAW, sXML_marker_start_width, XML_TYPE_MEASURE, 0 },
+ { "LineStartCenter",XML_NAMESPACE_DRAW, sXML_marker_start_center, XML_TYPE_BOOL, 0 },
+ { "LineEndName", XML_NAMESPACE_DRAW, sXML_marker_end, XML_TYPE_STRING, 0 },
+ { "LineEndWidth", XML_NAMESPACE_DRAW, sXML_marker_end_width, XML_TYPE_MEASURE, 0 },
+ { "LineEndCenter", XML_NAMESPACE_DRAW, sXML_marker_end_center, XML_TYPE_BOOL, 0 },
+// { "LineTransparence", XML_NAMESPACE_SVG,sXML_stroke_opacity, XML_SD_TYPE_OPACITY, 0 },
+ { "LineJoint", XML_NAMESPACE_SVG, sXML_stroke_linejoin, XML_SD_TYPE_LINEJOIN, 0 },
+
+ // fill attributes
+ { "FillStyle", XML_NAMESPACE_DRAW, sXML_fill, XML_SD_TYPE_FILLSTYLE, 0 },
+ { "FillColor", XML_NAMESPACE_DRAW, sXML_fill_color, XML_TYPE_COLOR, 0 },
+ { "FillGradientName", XML_NAMESPACE_DRAW, sXML_fill_gradient_name,XML_TYPE_STRING, 0 },
+// { "FillGradient", XML_NAMESPACE_DRAW, sXML_gradient_step_count, XML_SD_TYPE_GRADIENT_STEPCOUNT, 0 },
+ { "FillHatchName", XML_NAMESPACE_DRAW, sXML_fill_hatch_name, XML_TYPE_STRING, 0 },
+ { "FillBitmapName", XML_NAMESPACE_DRAW, sXML_fill_image_name, XML_TYPE_STRING, 0 },
+ { "FillTransparenceName", XML_NAMESPACE_DRAW, sXML_transparency_name, XML_TYPE_STRING, 0 },
+
+ // text frame attributes
+
+ // shadow attributes
+ { "Shadow", XML_NAMESPACE_DRAW, sXML_shadow, XML_SD_TYPE_SHADOW, 0 },
+ { "ShadowXDistance",XML_NAMESPACE_DRAW, sXML_shadow_offset_x, XML_TYPE_MEASURE, 0 },
+ { "ShadowYDistance",XML_NAMESPACE_DRAW, sXML_shadow_offset_y, XML_TYPE_MEASURE, 0 },
+ { "ShadowColor", XML_NAMESPACE_DRAW, sXML_shadow_color, XML_TYPE_COLOR, 0 },
+ { "ShadowTransparence", XML_NAMESPACE_DRAW, sXML_shadow_transparency, XML_TYPE_PERCENT, 0 },
+
+ // graphic attributes
+ { "GraphicColorMode", XML_NAMESPACE_DRAW, sXML_color_mode, XML_SD_TYPE_COLORMODE, 0 },
+ { "AdjustLuminance", XML_NAMESPACE_DRAW, sXML_luminance, XML_TYPE_PERCENT, 0 }, // signed?
+ { "AdjustContrast", XML_NAMESPACE_DRAW, sXML_contrast, XML_TYPE_PERCENT, 0 }, // signed?
+ { "Gamma", XML_NAMESPACE_DRAW, sXML_gamma, XML_TYPE_DOUBLE, 0 }, // signed?
+ { "AdjustRed", XML_NAMESPACE_DRAW, sXML_red, XML_TYPE_PERCENT, 0 }, // signed?
+ { "AdjustGreen", XML_NAMESPACE_DRAW, sXML_green, XML_TYPE_PERCENT, 0 }, // signed?
+ { "AdjustBlue", XML_NAMESPACE_DRAW, sXML_blue, XML_TYPE_PERCENT, 0 }, // signed?
+
+ // animation text attributes
+
+ // text attributes
+ { "CharColor", XML_NAMESPACE_FO, sXML_color, XML_TYPE_COLOR, 0 },
+ { "CharCrossedOut", XML_NAMESPACE_STYLE, sXML_text_crossing_out, XML_TYPE_BOOL, 0},
+// { "CharEscapement", XML_NAMESPACE_STYLE, sXML_text_position, XML_TYPE_TEXT_ESCAPEMENT|MID_FLAG_MERGE_ATTRIBUTE, 0 }, BugID #76842#
+// { "CharEscapementHeight", XML_NAMESPACE_STYLE, sXML_text_position, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT|MID_FLAG_MERGE_ATTRIBUTE, 0 },
+// ?? { "CharContoured", XML_NAMESPACE_STYLE, sXML_text_outline, XML_TYPE_BOOL, 0 },
+/// { "CharFontName", XML_NAMESPACE_FO, sXML_font_family, XML_TYPE_TEXT_FONTFAMILYNAME, 0 },
+ { "CharFontStyleName",XML_NAMESPACE_STYLE, sXML_font_style_name, XML_TYPE_STRING, 0 },
+ { "CharFontFamily", XML_NAMESPACE_STYLE, sXML_font_family_generic,XML_TYPE_TEXT_FONTFAMILY, 0 },
+// ?? { "CharFontPitch", XML_NAMESPACE_STYLE, sXML_font_pitch, XML_TYPE_TEXT_FONTPITCH, 0 },
+ { "CharFontCharSet", XML_NAMESPACE_STYLE, sXML_font_charset, XML_TYPE_TEXT_FONTENCODING, 0 },
+ { "CharHeight", XML_NAMESPACE_FO, sXML_font_size, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT },
+// ?? { "CharPropFontHeight",XML_NAMESPACE_FO, sXML_font_size, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL },
+// ?? { "CharKerning", XML_NAMESPACE_FO, sXML_letter_spacing, XML_TYPE_TEXT_KERNING, 0 },
+// { "CharLocale", XML_NAMESPACE_FO, sXML_language, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 }, not supported yet
+// { "CharLocale", XML_NAMESPACE_FO, sXML_country, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 }, not supported yet
+ { "CharPosture", XML_NAMESPACE_FO, sXML_font_style, XML_TYPE_TEXT_POSTURE, 0 },
+/// { "CharShadowed", XML_NAMESPACE_FO, sXML_text_shadow, XML_TYPE_TEXT_SHADOWED, 0 },
+ { "CharUnderline", XML_NAMESPACE_STYLE, sXML_text_underline, XML_TYPE_TEXT_UNDERLINE, 0 },
+ { "CharWeight", XML_NAMESPACE_FO, sXML_font_weight, XML_TYPE_TEXT_WEIGHT, 0 },
+// ?? { "WordMode", XML_NAMESPACE_STYLE, sXML_decorate_words_only,XML_TYPE_BOOL, 0 },
+// ?? { "CharAutoKerning", XML_NAMESPACE_STYLE, sXML_letter_kerning, XML_TYPE_BOOL, 0 },
+ { "ParaLineSpacing", XML_NAMESPACE_FO, sXML_line_height, XML_TYPE_LINE_SPACE_FIXED, 0 },
+ { "ParaLineSpacing", XML_NAMESPACE_STYLE, sXML_line_height_at_least, XML_TYPE_LINE_SPACE_MINIMUM, 0 },
+ { "ParaLineSpacing", XML_NAMESPACE_STYLE, sXML_line_spacing, XML_TYPE_LINE_SPACE_DISTANCE, 0 },
+ { "ParaAdjust", XML_NAMESPACE_FO, sXML_text_align, XML_TYPE_TEXT_ADJUST, 0 },
+ { "ParaLastLineAdjust", XML_NAMESPACE_STYLE, sXML_text_align_last, XML_TYPE_TEXT_ADJUSTLAST, 0 },
+// ?? { "ParaExpandSingleWord",XML_NAMESPACE_STYLE, sXML_justify_single_word,XML_TYPE_BOOL, 0 },
+ { "ParaIsHyphenation", XML_NAMESPACE_FO, sXML_hyphenate, XML_TYPE_BOOL, 0 },
+// ?? { "ParaHyphenationMaxLeadingChars", XML_NAMESPACE_FO, sXML_hyphenation_remain_char_count, XML_TYPE_NUMBER, 0 },
+// ?? { "ParaHyphenationMaxTrailingChars",XML_NAMESPACE_FO, sXML_hyphenation_push_char_count, XML_TYPE_NUMBER, 0 },
+// ?? { "ParaHyphenationMaxHyphens", XML_NAMESPACE_FO, sXML_hyphenation_ladder_count, XML_TYPE_NUMBER_NONE, 0 },
+ { "ParaLeftMargin", XML_NAMESPACE_FO, sXML_margin_left, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARALEFTMARGIN },
+// ?? { "ParaLeftMarginRelative", XML_NAMESPACE_FO, sXML_margin_left, XML_TYPE_PERCENT, CTF_PARALEFTMARGIN_REL },
+ { "ParaRightMargin", XML_NAMESPACE_FO, sXML_margin_right, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARARIGHTMARGIN },
+// ?? { "ParaRightMarginRelative", XML_NAMESPACE_FO, sXML_margin_right, XML_TYPE_PERCENT, CTF_PARARIGHTMARGIN_REL },
+// ?? { "ParaFirstLineIndent", XML_NAMESPACE_FO, sXML_text_indent, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAFIRSTLINE },
+// ?? { "ParaFirstLineIndentRelative", XML_NAMESPACE_FO, sXML_text_indent, XML_TYPE_PERCENT, CTF_PARAFIRSTLINE_REL },
+// ?? { "ParaLastLineAdjust", XML_NAMESPACE_STYLE, sXML_auto_text_indent, XML_TYPE_BOOL, 0 },
+
+ { "ParaTopMargin", XML_NAMESPACE_FO, sXML_margin_top, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARATOPMARGIN },
+// ?? { "ParaTopMarginRelative", XML_NAMESPACE_FO, sXML_margin_top, XML_TYPE_PERCENT, CTF_PARATOPMARGIN_REL },
+ { "ParaBottomMargin", XML_NAMESPACE_FO, sXML_margin_bottom, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARABOTTOMMARGIN },
+// ?? { "ParaBottomMarginRelative",XML_NAMESPACE_FO, sXML_margin_bottom, XML_TYPE_PERCENT, CTF_PARABOTTOMMARGIN_REL },
+ { 0L }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// entry list for presentation page properties
+
+const XMLPropertyMapEntry aXMLSDPresPageProps[] =
+{
+ { "Change", XML_NAMESPACE_PRESENTATION, "transition-type", XML_SD_TYPE_PRESPAGE_TYPE, 0 },
+ { "Effect", XML_NAMESPACE_PRESENTATION, "transition-style", XML_SD_TYPE_PRESPAGE_STYLE, 0 },
+ { "Speed", XML_NAMESPACE_PRESENTATION, "transition-speed", XML_SD_TYPE_PRESPAGE_SPEED, 0 },
+ { "Duration", XML_NAMESPACE_PRESENTATION, "duration", XML_SD_TYPE_PRESPAGE_DURATION, 0 },
+// still missing:
+// { "", XML_NAMESPACE_PRESENTATION, "visibility", XML_SD_TYPE_PRESPAGE_VISIBILITY, 0 },
+// { "", XML_NAMESPACE_PRESENTATION, "sound", XML_SD_TYPE_PRESPAGE_SOUND, 0 },
+ { 0L }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// implementation of factory for own graphic properties
+
+SvXMLEnumMapEntry aXML_LineStyle_EnumMap[] =
+{
+ { sXML_none, drawing::LineStyle_NONE },
+ { sXML_solid, drawing::LineStyle_SOLID },
+ { sXML_dash, drawing::LineStyle_DASH },
+ { NULL, 0 }
+};
+
+SvXMLEnumMapEntry aXML_LineJoint_EnumMap[] =
+{
+ { sXML_none, drawing::LineJoint_NONE },
+ { sXML_miter, drawing::LineJoint_MITER },
+ { sXML_round, drawing::LineJoint_ROUND },
+ { sXML_bevel, drawing::LineJoint_BEVEL },
+ { sXML_middle, drawing::LineJoint_MIDDLE },
+ { NULL, 0 }
+};
+
+SvXMLEnumMapEntry aXML_FillStyle_EnumMap[] =
+{
+ { sXML_none, drawing::FillStyle_NONE },
+ { sXML_solid, drawing::FillStyle_SOLID },
+ { sXML_bitmap, drawing::FillStyle_BITMAP },
+ { sXML_gradient,drawing::FillStyle_GRADIENT },
+ { sXML_hatch, drawing::FillStyle_HATCH },
+ { NULL, 0 }
+};
+
+SvXMLEnumMapEntry aXML_PresChange_EnumMap[] =
+{
+ { sXML_manual, 0 },
+ { sXML_automatic, 1 },
+ { sXML_semi_automatic, 2 },
+ { NULL, 0 }
+};
+
+SvXMLEnumMapEntry aXML_ColorMode_EnumMap[] =
+{
+ { sXML_greyscale, drawing::ColorMode_GREYS },
+ { sXML_mono, drawing::ColorMode_MONO },
+ { sXML_watermark, drawing::ColorMode_WATERMARK },
+ { sXML_standard, drawing::ColorMode_STANDARD },
+ { NULL, 0 }
+};
+
+SvXMLEnumMapEntry aXML_TransSpeed_EnumMap[] =
+{
+ { sXML_slow, presentation::AnimationSpeed_FAST },
+ { sXML_medium, presentation::AnimationSpeed_MEDIUM },
+ { sXML_fast, presentation::AnimationSpeed_FAST },
+ { NULL, 0 }
+};
+
+SvXMLEnumMapEntry aXML_FadeEffect_EnumMap[] =
+{
+ { sXML_none, presentation::FadeEffect_NONE },
+ { sXML_fade_from_left, presentation::FadeEffect_FADE_FROM_LEFT },
+ { sXML_fade_from_top, presentation::FadeEffect_FADE_FROM_TOP },
+ { sXML_fade_from_right, presentation::FadeEffect_FADE_FROM_RIGHT },
+ { sXML_fade_from_bottom, presentation::FadeEffect_FADE_FROM_BOTTOM },
+ { sXML_fade_to_center, presentation::FadeEffect_FADE_TO_CENTER },
+ { sXML_fade_from_center, presentation::FadeEffect_FADE_FROM_CENTER },
+ { sXML_move_from_left, presentation::FadeEffect_MOVE_FROM_LEFT },
+ { sXML_move_from_top, presentation::FadeEffect_MOVE_FROM_TOP },
+ { sXML_move_from_right, presentation::FadeEffect_MOVE_FROM_RIGHT },
+ { sXML_move_from_bottom, presentation::FadeEffect_MOVE_FROM_BOTTOM },
+ { sXML_roll_from_left, presentation::FadeEffect_ROLL_FROM_LEFT },
+ { sXML_roll_from_right, presentation::FadeEffect_ROLL_FROM_RIGHT },
+ { sXML_roll_from_bottom, presentation::FadeEffect_ROLL_FROM_BOTTOM },
+ { sXML_vertical_stripes, presentation::FadeEffect_VERTICAL_STRIPES },
+ { sXML_horizontal_stripes, presentation::FadeEffect_HORIZONTAL_STRIPES },
+ { sXML_clockwise, presentation::FadeEffect_CLOCKWISE },
+ { sXML_counterclockwise, presentation::FadeEffect_COUNTERCLOCKWISE },
+ { sXML_fade_from_upperleft, presentation::FadeEffect_FADE_FROM_UPPERLEFT },
+ { sXML_fade_from_upperright,presentation::FadeEffect_FADE_FROM_UPPERRIGHT },
+ { sXML_fade_from_lowerleft, presentation::FadeEffect_FADE_FROM_LOWERLEFT },
+ { sXML_fade_from_lowerright,presentation::FadeEffect_FADE_FROM_LOWERRIGHT },
+ { sXML_close_vertical, presentation::FadeEffect_CLOSE_VERTICAL },
+ { sXML_close_horizontal, presentation::FadeEffect_CLOSE_HORIZONTAL },
+ { sXML_open_vertical, presentation::FadeEffect_OPEN_VERTICAL },
+ { sXML_open_horizontal, presentation::FadeEffect_OPEN_HORIZONTAL },
+ { sXML_spiralin_left, presentation::FadeEffect_SPIRALIN_LEFT },
+ { sXML_spiralin_right, presentation::FadeEffect_SPIRALIN_RIGHT },
+ { sXML_spiralout_left, presentation::FadeEffect_SPIRALOUT_LEFT },
+ { sXML_spiralout_right, presentation::FadeEffect_SPIRALOUT_RIGHT },
+ { sXML_dissolve, presentation::FadeEffect_DISSOLVE },
+ { sXML_wavyline_from_left, presentation::FadeEffect_WAVYLINE_FROM_LEFT },
+ { sXML_wavyline_from_top, presentation::FadeEffect_WAVYLINE_FROM_TOP },
+ { sXML_wavyline_from_right, presentation::FadeEffect_WAVYLINE_FROM_RIGHT },
+ { sXML_wavyline_from_bottom,presentation::FadeEffect_WAVYLINE_FROM_BOTTOM },
+ { sXML_random, presentation::FadeEffect_RANDOM },
+ { sXML_stretch_from_left, presentation::FadeEffect_STRETCH_FROM_LEFT },
+ { sXML_stretch_from_top, presentation::FadeEffect_STRETCH_FROM_TOP },
+ { sXML_stretch_from_right, presentation::FadeEffect_STRETCH_FROM_RIGHT },
+ { sXML_stretch_from_bottom, presentation::FadeEffect_STRETCH_FROM_BOTTOM },
+ { sXML_vertical_lines, presentation::FadeEffect_VERTICAL_LINES },
+ { sXML_horizontal_lines, presentation::FadeEffect_HORIZONTAL_LINES },
+ { NULL, 0 }
+};
+
+XMLSdPropHdlFactory::~XMLSdPropHdlFactory()
+{
+}
+
+const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nType ) const
+{
+ XMLPropertyHandler* pHdl = (XMLPropertyHandler*)XMLPropertyHandlerFactory::GetPropertyHandler( nType );
+ if(!pHdl)
+ {
+ switch(nType)
+ {
+ case XML_SD_TYPE_STROKE :
+ {
+ pHdl = new XMLEnumPropertyHdl( aXML_LineStyle_EnumMap, ::getCppuType((const drawing::LineStyle*)0) );
+ break;
+ }
+ case XML_SD_TYPE_LINEJOIN :
+ {
+ pHdl = new XMLEnumPropertyHdl( aXML_LineJoint_EnumMap, ::getCppuType((const drawing::LineJoint*)0) );
+ break;
+ }
+ case XML_SD_TYPE_DASHARRAY :
+ {
+ pHdl = new XMLDashArrayPropertyHdl();
+ break;
+ }
+ case XML_SD_TYPE_FILLSTYLE :
+ {
+ pHdl = new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap, ::getCppuType((const drawing::FillStyle*)0) );
+ break;
+ }
+ case XML_SD_TYPE_COLORMODE :
+ {
+ pHdl = new XMLEnumPropertyHdl( aXML_ColorMode_EnumMap, ::getCppuType((const drawing::ColorMode*)0) );
+ break;
+ }
+ case XML_SD_TYPE_PRESPAGE_TYPE :
+ {
+ pHdl = new XMLEnumPropertyHdl( aXML_PresChange_EnumMap, ::getCppuType((const sal_Int32*)0) );
+ break;
+ }
+ case XML_SD_TYPE_SHADOW :
+ {
+ const OUString aTrueStr( OUString::createFromAscii(sXML_visible) );
+ const OUString aFalseStr( OUString::createFromAscii(sXML_hidden) );
+ pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr );
+ break;
+ }
+ case XML_SD_TYPE_PRESPAGE_STYLE :
+ {
+ pHdl = new XMLEnumPropertyHdl( aXML_FadeEffect_EnumMap, ::getCppuType((const presentation::FadeEffect*)0) );
+ break;
+ }
+ case XML_SD_TYPE_PRESPAGE_SPEED :
+ {
+ pHdl = new XMLEnumPropertyHdl( aXML_TransSpeed_EnumMap, ::getCppuType((const presentation::AnimationSpeed*)0) );
+ break;
+ }
+ case XML_SD_TYPE_PRESPAGE_DURATION :
+ {
+ pHdl = new XMLDurationPropertyHdl();
+ break;
+ }
+// still missing:
+// case XML_SD_TYPE_PRESPAGE_VISIBILITY :
+// {
+// break;
+// }
+// case XML_SD_TYPE_PRESPAGE_SOUND :
+// {
+// break;
+// }
+ }
+
+ if(pHdl)
+ PutHdlCache(nType, pHdl);
+ }
+
+ return pHdl;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx
new file mode 100644
index 0000000000..44c4dc4002
--- /dev/null
+++ b/xmloff/source/draw/sdpropls.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * $RCSfile: sdpropls.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _SDPROPLS_HXX
+#define _SDPROPLS_HXX
+
+#ifndef _XMLOFF_PROPMAPPINGTYPES_HXX
+#include <maptype.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLTYPES_HXX
+#include <xmltypes.hxx>
+#endif
+
+#ifndef _XMLOFF_PROPERTYHANDLERFACTORY_HXX
+#include <prhdlfac.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// entry list for graphic properties
+
+extern const XMLPropertyMapEntry aXMLSDProperties[];
+
+//////////////////////////////////////////////////////////////////////////////
+// entry list for presentation page properties
+
+extern const XMLPropertyMapEntry aXMLSDPresPageProps[];
+
+//////////////////////////////////////////////////////////////////////////////
+// types of own properties
+
+#define XML_SD_TYPE_STROKE (XML_SD_TYPES_START + 0)
+#define XML_SD_TYPE_PRESPAGE_TYPE (XML_SD_TYPES_START + 1)
+#define XML_SD_TYPE_PRESPAGE_STYLE (XML_SD_TYPES_START + 2)
+#define XML_SD_TYPE_PRESPAGE_SPEED (XML_SD_TYPES_START + 3)
+#define XML_SD_TYPE_PRESPAGE_DURATION (XML_SD_TYPES_START + 4)
+// still missing:
+//#define XML_SD_TYPE_PRESPAGE_VISIBILITY (XML_SD_TYPES_START + 5)
+//#define XML_SD_TYPE_PRESPAGE_SOUND (XML_SD_TYPES_START + 6)
+#define XML_SD_TYPE_DASHARRAY (XML_SD_TYPES_START + 7 )
+#define XML_SD_TYPE_MARKER (XML_SD_TYPES_START + 8 )
+#define XML_SD_TYPE_OPACITY (XML_SD_TYPES_START + 9 )
+#define XML_SD_TYPE_LINEJOIN (XML_SD_TYPES_START + 10 )
+#define XML_SD_TYPE_FILLSTYLE (XML_SD_TYPES_START + 11 )
+#define XML_SD_TYPE_GRADIENT (XML_SD_TYPES_START + 12 )
+#define XML_SD_TYPE_GRADIENT_STEPCOUNT (XML_SD_TYPES_START + 13 )
+#define XML_SD_TYPE_SHADOW (XML_SD_TYPES_START + 14 )
+#define XML_SD_TYPE_COLORMODE (XML_SD_TYPES_START + 15 )
+
+
+//////////////////////////////////////////////////////////////////////////////
+// factory for own graphic properties
+
+class XMLSdPropHdlFactory : public XMLPropertyHandlerFactory
+{
+public:
+ virtual ~XMLSdPropHdlFactory();
+ virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const;
+};
+
+
+#endif // _SDPROPLS_HXX
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
new file mode 100644
index 0000000000..9ad6105af1
--- /dev/null
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -0,0 +1,3090 @@
+/*************************************************************************
+ *
+ * $RCSfile: sdxmlexp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _LANG_HXX
+#include <tools/lang.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLMETAE_HXX
+#include "xmlmetae.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFOSUPPLIER_HPP_
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATORSUPPLIER_HPP_
+#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
+#include <com/sun/star/lang/Locale.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _SDXMLEXP_HXX
+#include "sdxmlexp.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGESSUPPLIER_HPP_
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XMASTERPAGESSUPPLIER_HPP_
+#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_VIEW_PAPERORIENTATION_HPP_
+#include <com/sun/star/view/PaperOrientation.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_XSTYLEFAMILIESSUPPLIER_HPP_
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_
+#include <com/sun/star/style/XStyle.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_PRESENTATION_XPRESENTATIONPAGE_HPP_
+#include <com/sun/star/presentation/XPresentationPage.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XMASTERPAGETARGET_HPP_
+#include <com/sun/star/drawing/XMasterPageTarget.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_
+#include <com/sun/star/text/XText.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CHART_XCHARTDOCUMENT_HPP_
+#include <com/sun/star/chart/XChartDocument.hpp>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _SV_GEN_HXX
+#include <tools/gen.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLASTPLP_HXX
+#include "xmlaustp.hxx"
+#endif
+
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+
+#ifndef _XMLOFF_STYLEEXP_HXX_
+#include "styleexp.hxx"
+#endif
+
+#ifndef _SDPROPLS_HXX
+#include "sdpropls.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLEXPPR_HXX
+#include "xmlexppr.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
+#include <com/sun/star/beans/XPropertyState.hpp>
+#endif
+
+#ifndef _XEXPTRANSFORM_HXX
+#include "xexptran.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONBEZIERCOORDS_HPP_
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#endif
+
+#ifndef _ISOLANG_HXX
+#include <tools/isolang.hxx>
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX
+#include <cppuhelper/implbase1.hxx>
+#endif
+
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+// wrapper to have control for virtual function calls to handle all kinds
+// of possible item specialities
+
+class ImpPresPageDrawStylePropMapper : public SvXMLExportPropertyMapper
+{
+ /** this method is called for every item that has the MID_FLAG_NO_ITEM_EXPORT flag set */
+ virtual void handleNoItem(
+ SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap ) const;
+
+ /** this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set */
+ virtual void handleElementItem(
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const XMLPropertyState& rProperty, const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap, sal_uInt16 nFlags ) const;
+
+ /** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set */
+ virtual void handleSpecialItem(
+ SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap ) const;
+
+public:
+ ImpPresPageDrawStylePropMapper( const UniReference< XMLPropertySetMapper >& rMapper );
+ virtual ~ImpPresPageDrawStylePropMapper();
+};
+
+ImpPresPageDrawStylePropMapper::ImpPresPageDrawStylePropMapper(
+ const UniReference< XMLPropertySetMapper >& rMapper )
+: SvXMLExportPropertyMapper( rMapper )
+{
+}
+
+ImpPresPageDrawStylePropMapper::~ImpPresPageDrawStylePropMapper()
+{
+}
+
+void ImpPresPageDrawStylePropMapper::handleNoItem(
+ SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap ) const
+{
+ // call parent
+ SvXMLExportPropertyMapper::handleNoItem(rAttrList, rProperty, rUnitConverter, rNamespaceMap);
+}
+
+void ImpPresPageDrawStylePropMapper::handleElementItem(
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const XMLPropertyState& rProperty, const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap, sal_uInt16 nFlags ) const
+{
+ // call parent
+ SvXMLExportPropertyMapper::handleElementItem(rHandler, rProperty, rUnitConverter, rNamespaceMap, nFlags);
+}
+
+void ImpPresPageDrawStylePropMapper::handleSpecialItem(
+ SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap ) const
+{
+ // call parent
+ SvXMLExportPropertyMapper::handleSpecialItem(rAttrList, rProperty, rUnitConverter, rNamespaceMap);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+class ImpXMLShapeStyleInfo
+{
+ OUString msStyleName;
+ sal_Int32 mnFamily;
+
+public:
+ ImpXMLShapeStyleInfo(
+ const OUString& rStyStr,
+ sal_Int32 nFam);
+
+ const OUString& GetStyleName() const { return msStyleName; }
+ sal_Int32 GetFamily() const { return mnFamily; }
+};
+
+ImpXMLShapeStyleInfo::ImpXMLShapeStyleInfo(
+ const OUString& rStyStr,
+ sal_Int32 nFam)
+: msStyleName(rStyStr),
+ mnFamily(nFam)
+{
+}
+
+DECLARE_LIST(ImpXMLShapeStyleInfoList, ImpXMLShapeStyleInfo*);
+
+//////////////////////////////////////////////////////////////////////////////
+
+class ImpXMLDrawPageInfo
+{
+ OUString msStyleName;
+ OUString msPageLayoutName;
+
+public:
+ ImpXMLDrawPageInfo(const OUString& rStyStr);
+
+ void SetPageLayoutName(const OUString& rStr);
+
+ const OUString& GetStyleName() const { return msStyleName; }
+ const OUString& GetPageLayoutName() const { return msPageLayoutName; }
+};
+
+ImpXMLDrawPageInfo::ImpXMLDrawPageInfo(const OUString& rStyStr)
+: msStyleName(rStyStr)
+{
+}
+
+void ImpXMLDrawPageInfo::SetPageLayoutName(const OUString& rStr)
+{
+ msPageLayoutName = rStr;
+}
+
+DECLARE_LIST(ImpXMLDrawPageInfoList, ImpXMLDrawPageInfo*);
+
+//////////////////////////////////////////////////////////////////////////////
+
+class ImpXMLEXPPageMasterInfo
+{
+ sal_Int32 mnBorderBottom;
+ sal_Int32 mnBorderLeft;
+ sal_Int32 mnBorderRight;
+ sal_Int32 mnBorderTop;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+ view::PaperOrientation meOrientation;
+ OUString msName;
+ OUString msMasterPageName;
+
+public:
+ ImpXMLEXPPageMasterInfo(const SdXMLExport& rExp, const uno::Reference<drawing::XDrawPage>& xPage);
+ BOOL operator==(const ImpXMLEXPPageMasterInfo& rInfo) const;
+ void SetName(const OUString& rStr);
+
+ const OUString& GetName() const { return msName; }
+ const OUString& GetMasterPageName() const { return msMasterPageName; }
+
+ sal_Int32 GetBorderBottom() const { return mnBorderBottom; }
+ sal_Int32 GetBorderLeft() const { return mnBorderLeft; }
+ sal_Int32 GetBorderRight() const { return mnBorderRight; }
+ sal_Int32 GetBorderTop() const { return mnBorderTop; }
+ sal_Int32 GetWidth() const { return mnWidth; }
+ sal_Int32 GetHeight() const { return mnHeight; }
+ view::PaperOrientation GetOrientation() const { return meOrientation; }
+};
+
+ImpXMLEXPPageMasterInfo::ImpXMLEXPPageMasterInfo(
+ const SdXMLExport& rExp,
+ const uno::Reference<drawing::XDrawPage>& xPage)
+: mnBorderBottom(0),
+ mnBorderLeft(0),
+ mnBorderRight(0),
+ mnBorderTop(0),
+ mnWidth(0),
+ mnHeight(0),
+ meOrientation(rExp.IsDraw() ? view::PaperOrientation_PORTRAIT : view::PaperOrientation_LANDSCAPE)
+{
+ uno::Reference <beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Any aAny;
+
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("BorderBottom")));
+ aAny >>= mnBorderBottom;
+
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("BorderLeft")));
+ aAny >>= mnBorderLeft;
+
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("BorderRight")));
+ aAny >>= mnBorderRight;
+
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("BorderTop")));
+ aAny >>= mnBorderTop;
+
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Width")));
+ aAny >>= mnWidth;
+
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Height")));
+ aAny >>= mnHeight;
+
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Orientation")));
+ aAny >>= meOrientation;
+ }
+
+ uno::Reference <container::XNamed> xMasterNamed(xPage, uno::UNO_QUERY);
+ if(xMasterNamed.is())
+ {
+ msMasterPageName = xMasterNamed->getName();
+ }
+}
+
+BOOL ImpXMLEXPPageMasterInfo::operator==(const ImpXMLEXPPageMasterInfo& rInfo) const
+{
+ return ((mnBorderBottom == rInfo.mnBorderBottom)
+ && (mnBorderLeft == rInfo.mnBorderLeft)
+ && (mnBorderRight == rInfo.mnBorderRight)
+ && (mnBorderTop == rInfo.mnBorderTop)
+ && (mnWidth == rInfo.mnWidth)
+ && (mnHeight == rInfo.mnHeight)
+ && (meOrientation == rInfo.meOrientation));
+}
+
+void ImpXMLEXPPageMasterInfo::SetName(const OUString& rStr)
+{
+ msName = rStr;
+}
+
+DECLARE_LIST(ImpXMLEXPPageMasterList, ImpXMLEXPPageMasterInfo*);
+
+//////////////////////////////////////////////////////////////////////////////
+
+#define IMP_AUTOLAYOUT_INFO_MAX (27L)
+
+class ImpXMLAutoLayoutInfo
+{
+ sal_uInt16 mnType;
+ ImpXMLEXPPageMasterInfo* mpPageMasterInfo;
+ OUString msLayoutName;
+ Rectangle maTitleRect;
+ Rectangle maPresRect;
+ sal_Int32 mnGapX;
+ sal_Int32 mnGapY;
+
+public:
+ ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterInfo* pInf);
+
+ BOOL operator==(const ImpXMLAutoLayoutInfo& rInfo) const;
+
+ sal_uInt16 GetLayoutType() const { return mnType; }
+ sal_Int32 GetGapX() const { return mnGapX; }
+ sal_Int32 GetGapY() const { return mnGapY; }
+
+ const OUString& GetLayoutName() const { return msLayoutName; }
+ void SetLayoutName(const OUString& rNew) { msLayoutName = rNew; }
+
+ const Rectangle& GetTitleRectangle() const { return maTitleRect; }
+ const Rectangle& GetPresRectangle() const { return maPresRect; }
+
+ static BOOL IsCreateNecessary(sal_uInt16 nTyp);
+};
+
+BOOL ImpXMLAutoLayoutInfo::IsCreateNecessary(sal_uInt16 nTyp)
+{
+ if(nTyp == 5 /* AUTOLAYOUT_ORG */
+ || nTyp == 20 /* AUTOLAYOUT_NONE */
+ || nTyp >= IMP_AUTOLAYOUT_INFO_MAX)
+ return FALSE;
+ return TRUE;
+}
+
+BOOL ImpXMLAutoLayoutInfo::operator==(const ImpXMLAutoLayoutInfo& rInfo) const
+{
+ return ((mnType == rInfo.mnType
+ && mpPageMasterInfo == rInfo.mpPageMasterInfo));
+}
+
+ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterInfo* pInf)
+: mnType(nTyp),
+ mpPageMasterInfo(pInf)
+{
+ // create full info (initialze with typical values)
+ Point aPagePos(0,0);
+ Size aPageSize(28000, 21000);
+ Size aPageInnerSize(28000, 21000);
+
+ if(mpPageMasterInfo)
+ {
+ aPagePos = Point(mpPageMasterInfo->GetBorderLeft(), mpPageMasterInfo->GetBorderTop());
+ aPageSize = Size(mpPageMasterInfo->GetWidth(), mpPageMasterInfo->GetHeight());
+ aPageInnerSize = aPageSize;
+ aPageInnerSize.Width() -= mpPageMasterInfo->GetBorderLeft() + mpPageMasterInfo->GetBorderRight();
+ aPageInnerSize.Height() -= mpPageMasterInfo->GetBorderTop() + mpPageMasterInfo->GetBorderBottom();
+ }
+
+ // title rectangle aligning
+ Point aTitlePos(aPagePos);
+ Size aTitleSize(aPageInnerSize);
+
+ if(mnType == 21 /* AUTOLAYOUT_NOTES */)
+ {
+ aTitleSize.Height() = (long) (aTitleSize.Height() / 2.5);
+ Point aPos = aTitlePos;
+ aPos.Y() += long( aTitleSize.Height() * 0.083 );
+ Size aPartArea = aTitleSize;
+ Size aSize;
+
+ // tatsaechliche Seitengroesse in das Handout-Rechteck skalieren
+ double fH = (double) aPartArea.Width() / aPageSize.Width();
+ double fV = (double) aPartArea.Height() / aPageSize.Height();
+
+ if ( fH > fV )
+ fH = fV;
+ aSize.Width() = (long) (fH * aPageSize.Width());
+ aSize.Height() = (long) (fH * aPageSize.Height());
+
+ aPos.X() += (aPartArea.Width() - aSize.Width()) / 2;
+ aPos.Y() += (aPartArea.Height()- aSize.Height())/ 2;
+
+ aTitlePos = aPos;
+ aTitleSize = aSize;
+ }
+ else
+ {
+ aTitlePos.X() += long( aTitleSize.Width() * 0.0735 );
+ aTitlePos.Y() += long( aTitleSize.Height() * 0.083 );
+ aTitleSize.Width() = long( aTitleSize.Width() * 0.854 );
+ aTitleSize.Height() = long( aTitleSize.Height() * 0.167 );
+ }
+
+ maTitleRect.SetPos(aTitlePos);
+ maTitleRect.SetSize(aTitleSize);
+
+ // layout rectangle aligning
+ Point aLayoutPos(aPagePos);
+ Size aLayoutSize(aPageInnerSize);
+
+ if(mnType == 21 /* AUTOLAYOUT_NOTES */)
+ {
+ aLayoutPos.X() += long( aLayoutSize.Width() * 0.0735 );
+ aLayoutPos.Y() += long( aLayoutSize.Height() * 0.472 );
+ aLayoutSize.Width() = long( aLayoutSize.Width() * 0.854 );
+ aLayoutSize.Height() = long( aLayoutSize.Height() * 0.444 );
+ }
+ else if(mnType >= 22 && mnType <= 26) // AUTOLAYOUT_HANDOUT
+ {
+ // keep info for inner area in maPresRect, put info for gap size
+ // to maTitleRect position
+ mnGapX = (aPageSize.Width() - aPageInnerSize.Width()) / 2;
+ mnGapY = (aPageSize.Height() - aPageInnerSize.Height()) / 2;
+
+ if(!mnGapX)
+ mnGapX = aPageSize.Width() / 10;
+
+ if(!mnGapY)
+ mnGapY = aPageSize.Height() / 10;
+
+ if(mnGapX < aPageInnerSize.Width() / 10)
+ mnGapX = aPageInnerSize.Width() / 10;
+
+ if(mnGapY < aPageInnerSize.Height() / 10)
+ mnGapY = aPageInnerSize.Height() / 10;
+ }
+ else
+ {
+ aLayoutPos.X() += long( aLayoutSize.Width() * 0.0735 );
+ aLayoutPos.Y() += long( aLayoutSize.Height() * 0.278 );
+ aLayoutSize.Width() = long( aLayoutSize.Width() * 0.854 );
+ aLayoutSize.Height() = long( aLayoutSize.Height() * 0.630 );
+ }
+
+ maPresRect.SetPos(aLayoutPos);
+ maPresRect.SetSize(aLayoutSize);
+}
+
+DECLARE_LIST(ImpXMLAutoLayoutInfoList, ImpXMLAutoLayoutInfo*);
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLExport::SdXMLExport(
+ const uno::Reference<frame::XModel>& rMod,
+ const OUString& rFileName,
+ const uno::Reference<xml::sax::XDocumentHandler>& rHandler,
+ BOOL bShowProgr,
+ BOOL bIsDraw)
+: SvXMLExport( rFileName, rHandler, rMod, MAP_CM ),
+ mpPageMasterInfoList(new ImpXMLEXPPageMasterList(1, 4, 4)),
+ mpPageMaterUsageList(new ImpXMLEXPPageMasterList(1, 4, 4)),
+ mpDrawPageInfoList(new ImpXMLDrawPageInfoList(4, 8, 8)),
+ mpShapeStyleInfoList(new ImpXMLShapeStyleInfoList(16, 64, 64)),
+ mpAutoLayoutInfoList(new ImpXMLAutoLayoutInfoList(1, 4, 4)),
+ mpSdPropHdlFactory(0L),
+ mpPropertySetMapper(0L),
+ mpPresPagePropsMapper(0L),
+ mnDocMasterPageCount(0L),
+ mnDocDrawPageCount(0L),
+ mnShapeStyleInfoIndex(0L),
+ mbIsDraw(bIsDraw),
+ mbFamilyGraphicUsed(FALSE),
+ mbFamilyPresentationUsed(FALSE)
+{
+ // prepare factory parts
+ mpSdPropHdlFactory = new XMLSdPropHdlFactory;
+ if(mpSdPropHdlFactory)
+ {
+ // set lock to avoid deletion
+ mpSdPropHdlFactory->acquire();
+
+ // build one ref
+ const UniReference< XMLPropertyHandlerFactory > aFactoryRef = mpSdPropHdlFactory;
+
+ // construct PropertySetMapper
+ mpPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDProperties, aFactoryRef);
+ if(mpPropertySetMapper)
+ {
+ // set lock to avoid deletion
+ mpPropertySetMapper->acquire();
+ }
+
+ // construct PresPagePropsMapper
+ mpPresPagePropsMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, aFactoryRef);
+ if(mpPresPagePropsMapper)
+ {
+ // set lock to avoid deletion
+ mpPresPagePropsMapper->acquire();
+ }
+ }
+
+ // add family name
+ GetAutoStylePool()->AddFamily(
+ XML_STYLE_FAMILY_SD_GRAPHICS_ID,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)),
+ GetPropertySetMapper(),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX)));
+ GetAutoStylePool()->AddFamily(
+ XML_STYLE_FAMILY_SD_PRESENTATION_ID,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_NAME)),
+ GetPropertySetMapper(),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_PREFIX)));
+
+ // prepare access to styles
+ uno::Reference< style::XStyleFamiliesSupplier > xFamSup( GetModel(), uno::UNO_QUERY );
+ if(xFamSup.is())
+ {
+ mxDocStyleFamilies = xFamSup->getStyleFamilies();
+ }
+
+ // prepare access to master pages
+ uno::Reference < drawing::XMasterPagesSupplier > xMasterPagesSupplier(GetModel(), uno::UNO_QUERY);
+ if(xMasterPagesSupplier.is())
+ {
+ mxDocMasterPages = mxDocMasterPages.query( xMasterPagesSupplier->getMasterPages() );
+ if(mxDocMasterPages.is())
+ {
+ mnDocMasterPageCount = mxDocMasterPages->getCount();
+ }
+ }
+
+ // prepare access to draw pages
+ uno::Reference <drawing::XDrawPagesSupplier> xDrawPagesSupplier(GetModel(), uno::UNO_QUERY);
+ if(xDrawPagesSupplier.is())
+ {
+ mxDocDrawPages = mxDocDrawPages.query( xDrawPagesSupplier->getDrawPages() );
+ if(mxDocDrawPages.is())
+ {
+ mnDocDrawPageCount = mxDocDrawPages->getCount();
+ }
+ }
+
+ // add namespaces
+ _GetNamespaceMap().AddAtIndex(
+ XML_NAMESPACE_PRESENTATION, sXML_np_presentation, sXML_n_presentation, XML_NAMESPACE_PRESENTATION);
+
+ // get status indicator (if intended)
+ if(bShowProgr)
+ {
+ uno::Reference<frame::XController> xController(rMod->getCurrentController());
+ if(xController.is())
+ {
+ uno::Reference<frame::XFrame> xFrame(xController->getFrame());
+ if(xFrame.is())
+ {
+ uno::Reference<task::XStatusIndicatorSupplier> xFactory(xFrame, uno::UNO_QUERY);
+ if(xFactory.is())
+ {
+ mxStatusIndicator = xFactory->getStatusIndicator();
+ }
+ }
+ }
+ }
+
+ // add progress view
+ if(mxStatusIndicator.is())
+ {
+ const OUString aText(RTL_CONSTASCII_USTRINGPARAM("XML Export"));
+ mxStatusIndicator->start(aText, 100);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+__EXPORT SdXMLExport::~SdXMLExport()
+{
+ // cleanup factory, decrease refcount. Should lead to destruction.
+ if(mpSdPropHdlFactory)
+ {
+ mpSdPropHdlFactory->release();
+ mpSdPropHdlFactory = 0L;
+ }
+
+ // cleanup mapper, decrease refcount. Should lead to destruction.
+ if(mpPropertySetMapper)
+ {
+ mpPropertySetMapper->release();
+ mpPropertySetMapper = 0L;
+ }
+
+ // cleanup presPage mapper, decrease refcount. Should lead to destruction.
+ if(mpPresPagePropsMapper)
+ {
+ mpPresPagePropsMapper->release();
+ mpPresPagePropsMapper = 0L;
+ }
+
+ // clear evtl. temporary page master infos
+ if(mpPageMasterInfoList)
+ {
+ while(mpPageMasterInfoList->Count())
+ delete mpPageMasterInfoList->Remove(mpPageMasterInfoList->Count() - 1L);
+ delete mpPageMasterInfoList;
+ mpPageMasterInfoList = 0L;
+ }
+ if(mpPageMaterUsageList)
+ {
+ delete mpPageMaterUsageList;
+ mpPageMaterUsageList = 0L;
+ }
+
+ // clear draw style infos
+ if(mpDrawPageInfoList)
+ {
+ while(mpDrawPageInfoList->Count())
+ delete mpDrawPageInfoList->Remove(mpDrawPageInfoList->Count() - 1L);
+ delete mpDrawPageInfoList;
+ mpDrawPageInfoList = 0L;
+ }
+
+ // clear shape style infos
+ if(mpShapeStyleInfoList)
+ {
+ while(mpShapeStyleInfoList->Count())
+ delete mpShapeStyleInfoList->Remove(mpShapeStyleInfoList->Count() - 1L);
+ delete mpShapeStyleInfoList;
+ mpShapeStyleInfoList = 0L;
+ }
+
+ // clear auto-layout infos
+ if(mpAutoLayoutInfoList)
+ {
+ while(mpAutoLayoutInfoList->Count())
+ delete mpAutoLayoutInfoList->Remove(mpAutoLayoutInfoList->Count() - 1L);
+ delete mpAutoLayoutInfoList;
+ mpAutoLayoutInfoList = 0L;
+ }
+
+ // stop progress view
+ if(mxStatusIndicator.is())
+ {
+ mxStatusIndicator->end();
+ mxStatusIndicator->reset();
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// to get default values in XPropertySet use this wrapper class
+
+class ImpDefaultMapper : public ::cppu::WeakAggImplHelper1< beans::XPropertySet >
+{
+ uno::Reference< beans::XPropertyState > mxState;
+ uno::Reference< beans::XPropertySet > mxSet;
+
+public:
+ ImpDefaultMapper( uno::Reference< beans::XPropertyState >& rxState );
+
+ // Methods
+ virtual uno::Reference< beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue ) throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
+
+ // empty implementations
+ virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
+};
+
+ImpDefaultMapper::ImpDefaultMapper( uno::Reference< beans::XPropertyState >& rxState )
+: mxState( rxState ),
+ mxSet( rxState, uno::UNO_QUERY )
+{
+}
+
+uno::Reference< beans::XPropertySetInfo > SAL_CALL ImpDefaultMapper::getPropertySetInfo() throw(uno::RuntimeException)
+{
+ return mxSet->getPropertySetInfo();
+}
+
+void SAL_CALL ImpDefaultMapper::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue ) throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ mxState->setPropertyToDefault( aPropertyName /*, aValue */ );
+}
+
+uno::Any SAL_CALL ImpDefaultMapper::getPropertyValue( const OUString& PropertyName ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ return mxState->getPropertyDefault( PropertyName );
+}
+
+// empty implementations
+void SAL_CALL ImpDefaultMapper::addPropertyChangeListener( const OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL ImpDefaultMapper::removePropertyChangeListener( const OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL ImpDefaultMapper::addVetoableChangeListener( const OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+void SAL_CALL ImpDefaultMapper::removeVetoableChangeListener( const OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) {}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpWriteDefaultStyleInfos()
+{
+ // create annd write pool defaults
+ AddAttribute(XML_NAMESPACE_STYLE, sXML_name, OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_drawpool)));
+ AddAttribute(XML_NAMESPACE_STYLE, sXML_family, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_POOL_NAME)));
+
+ // write drawpool style
+ SvXMLElementExport aPSY(*this, XML_NAMESPACE_STYLE, sXML_style, sal_True, sal_True);
+
+ // write graphics style properites
+ uno::Any aAny(mxDocStyleFamilies->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME))));
+ uno::Reference< container::XIndexAccess > xGraphicStyles;
+
+ if(aAny >>= xGraphicStyles)
+ {
+ BOOL bDone(FALSE);
+ const sal_Int32 nNum = xGraphicStyles->getCount();
+
+ for(sal_Int32 a(0L); !bDone && a < nNum; a++)
+ {
+ aAny = xGraphicStyles->getByIndex(a);
+ uno::Reference< style::XStyle > xSingleStyle;
+
+ if(aAny >>= xSingleStyle)
+ {
+ OUString aParentStyle = xSingleStyle->getParentStyle();
+ if(!aParentStyle.getLength())
+ {
+ // style without parent found
+ uno::Reference< beans::XPropertyState > xPropState(xSingleStyle, uno::UNO_QUERY);
+ if(xPropState.is())
+ {
+ uno::Reference< beans::XPropertySet > xImpDefaultMapper( new ImpDefaultMapper( xPropState ) );
+ const UniReference< XMLPropertySetMapper > aMapperRef = GetPropertySetMapper();
+ std::vector< XMLPropertyState > xPropStates = aMapperRef->Filter( xImpDefaultMapper );
+
+ if(xPropStates.size())
+ {
+ ImpPresPageDrawStylePropMapper aExpPropMapper(aMapperRef);
+
+ aExpPropMapper.exportXML(GetDocHandler(), xPropStates,
+ GetMM100UnitConverter(), GetNamespaceMap());
+ bDone = TRUE;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpWriteObjGraphicStyleInfos()
+{
+ XMLStyleExport aStEx(*this,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_drawpool)), GetAutoStylePool().get());
+ const UniReference< XMLPropertySetMapper > aMapperRef = GetPropertySetMapper();
+
+ aStEx.exportStyleFamily(XML_STYLE_FAMILY_SD_GRAPHICS_NAME, XML_STYLE_FAMILY_SD_GRAPHICS_NAME,
+ aMapperRef, FALSE, XML_STYLE_FAMILY_SD_GRAPHICS_ID);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+BOOL SdXMLExport::ImpPrepAutoLayoutInfo(const uno::Reference<drawing::XDrawPage>& xPage, OUString& rName)
+{
+ rName = OUString();
+ BOOL bRetval(FALSE);
+
+ uno::Reference <beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ sal_uInt16 nType;
+ uno::Any aAny;
+
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Layout")));
+ if(aAny >>= nType)
+ {
+ if(ImpXMLAutoLayoutInfo::IsCreateNecessary(nType))
+ {
+ ImpXMLEXPPageMasterInfo* pInfo = 0L;
+
+ // get master-page info
+ uno::Reference < drawing::XMasterPageTarget > xMasterPageInt(xPage, uno::UNO_QUERY);
+ if(xMasterPageInt.is())
+ {
+ uno::Reference<drawing::XDrawPage> xUsedMasterPage(xMasterPageInt->getMasterPage());
+ if(xUsedMasterPage.is())
+ {
+ uno::Reference < container::XNamed > xMasterNamed(xUsedMasterPage, uno::UNO_QUERY);
+ if(xMasterNamed.is())
+ {
+ OUString sMasterPageName = xMasterNamed->getName();
+ pInfo = ImpGetPageMasterInfoByName(sMasterPageName);
+ }
+ }
+ }
+
+ // create entry and look for existance
+ ImpXMLAutoLayoutInfo* pNew = new ImpXMLAutoLayoutInfo(nType, pInfo);
+ BOOL bDidExist(FALSE);
+
+ for(sal_uInt32 nCnt = 0L; !bDidExist && nCnt < mpAutoLayoutInfoList->Count(); nCnt++)
+ {
+ if(*mpAutoLayoutInfoList->GetObject(nCnt) == *pNew)
+ {
+ delete pNew;
+ pNew = mpAutoLayoutInfoList->GetObject(nCnt);
+ bDidExist = TRUE;
+ }
+ }
+
+ if(!bDidExist)
+ {
+ mpAutoLayoutInfoList->Insert(pNew, LIST_APPEND);
+ OUString sNewName = OUString(RTL_CONSTASCII_USTRINGPARAM("AL"));
+ sNewName += OUString::valueOf(sal_Int32(mpAutoLayoutInfoList->Count() - 1));
+ sNewName += OUString(RTL_CONSTASCII_USTRINGPARAM("T"));
+ sNewName += OUString::valueOf(sal_Int32(nType));
+ pNew->SetLayoutName(sNewName);
+ }
+
+ rName = pNew->GetLayoutName();
+ bRetval = TRUE;
+ }
+ }
+ }
+
+ return bRetval;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpWriteAutoLayoutInfos()
+{
+ if(mpAutoLayoutInfoList->Count())
+ {
+ for(sal_uInt32 nCnt = 0L; nCnt < mpAutoLayoutInfoList->Count(); nCnt++)
+ {
+ ImpXMLAutoLayoutInfo* pInfo = mpAutoLayoutInfoList->GetObject(nCnt);
+ if(pInfo)
+ {
+ // prepare presentation-page layout attributes, style-name
+ AddAttribute(XML_NAMESPACE_STYLE, sXML_name, pInfo->GetLayoutName());
+
+ // write draw-style attributes
+ SvXMLElementExport aDSE(*this, XML_NAMESPACE_STYLE, sXML_presentation_page_layout, sal_True, sal_True);
+
+ // write presentation placeholders
+ switch(pInfo->GetLayoutType())
+ {
+ case 0 : // AUTOLAYOUT_TITLE
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderSubtitle, pInfo->GetPresRectangle());
+ break;
+ }
+ case 1 : // AUTOLAYOUT_ENUM
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, pInfo->GetPresRectangle());
+ break;
+ }
+ case 2 : // AUTOLAYOUT_CHART
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, pInfo->GetPresRectangle());
+ break;
+ }
+ case 3 : // AUTOLAYOUT_2TEXT
+ {
+ Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ Rectangle aRight(aLeft);
+ aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+ break;
+ }
+ case 4 : // AUTOLAYOUT_TEXTCHART
+ {
+ Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ Rectangle aRight(aLeft);
+ aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aRight);
+ break;
+ }
+ case 6 : // AUTOLAYOUT_TEXTCLIP
+ {
+ Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ Rectangle aRight(aLeft);
+ aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aRight);
+ break;
+ }
+ case 7 : // AUTOLAYOUT_CHARTTEXT
+ {
+ Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ Rectangle aRight(aLeft);
+ aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+ break;
+ }
+ case 8 : // AUTOLAYOUT_TAB
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTable, pInfo->GetPresRectangle());
+ break;
+ }
+ case 9 : // AUTOLAYOUT_CLIPTEXT
+ {
+ Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ Rectangle aRight(aLeft);
+ aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+ break;
+ }
+ case 10 : // AUTOLAYOUT_TEXTOBJ
+ {
+ Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ Rectangle aRight(aLeft);
+ aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRight);
+ break;
+ }
+ case 11 : // AUTOLAYOUT_OBJ
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, pInfo->GetPresRectangle());
+ break;
+ }
+ case 12 : // AUTOLAYOUT_TEXT2OBJ
+ {
+ Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ Rectangle aRightTop(aLeft);
+ aRightTop.Left() = long(aRightTop.Left() + aRightTop.GetWidth() * 1.05);
+ aRightTop.setHeight(long(aRightTop.GetHeight() * 0.477));
+ Rectangle aRightBottom(aRightTop);
+ aRightBottom.Top() = long(aRightBottom.Top() + aRightBottom.GetHeight() * 1.095);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRightTop);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRightBottom);
+ break;
+ }
+ case 13 : // AUTOLAYOUT_OBJTEXT
+ {
+ Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ Rectangle aRight(aLeft);
+ aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+ break;
+ }
+ case 14 : // AUTOLAYOUT_OBJOVERTEXT
+ {
+ Rectangle aTop(pInfo->GetPresRectangle());
+ aTop.setHeight(long(aTop.GetHeight() * 0.477));
+ Rectangle aBottom(aTop);
+ aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.095);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTop);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aBottom);
+ break;
+ }
+ case 15 : // AUTOLAYOUT_2OBJTEXT
+ {
+ Rectangle aLeftTop(pInfo->GetPresRectangle());
+ aLeftTop.setWidth(long(aLeftTop.GetWidth() * 0.488));
+ Rectangle aRight(aLeftTop);
+ aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+ aLeftTop.setHeight(long(aLeftTop.GetHeight() * 0.477));
+ Rectangle aLeftBottom(aLeftTop);
+ aLeftBottom.Top() = long(aLeftBottom.Top() + aLeftBottom.GetHeight() * 1.095);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeftTop);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeftBottom);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+ break;
+ }
+ case 16 : // AUTOLAYOUT_2OBJOVERTEXT
+ {
+ Rectangle aTopLeft(pInfo->GetPresRectangle());
+ aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
+ Rectangle aBottom(aTopLeft);
+ aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.095);
+ aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
+ Rectangle aTopRight(aTopLeft);
+ aTopRight.Left() = long(aTopRight.Left() + aTopRight.GetWidth() * 1.05);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopRight);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aBottom);
+ break;
+ }
+ case 17 : // AUTOLAYOUT_TEXTOVEROBJ
+ {
+ Rectangle aTop(pInfo->GetPresRectangle());
+ aTop.setHeight(long(aTop.GetHeight() * 0.477));
+ Rectangle aBottom(aTop);
+ aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.095);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aTop);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aBottom);
+ break;
+ }
+ case 18 : // AUTOLAYOUT_4OBJ
+ {
+ Rectangle aTopLeft(pInfo->GetPresRectangle());
+ aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
+ aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
+ Rectangle aBottomLeft(aTopLeft);
+ aBottomLeft.Top() = long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095);
+ Rectangle aTopRight(aTopLeft);
+ aTopRight.Left() = long(aTopRight.Left() + aTopRight.GetWidth() * 1.05);
+ Rectangle aBottomRight(aTopRight);
+ aBottomRight.Top() = long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopRight);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aBottomLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aBottomRight);
+ break;
+ }
+ case 19 : // AUTOLAYOUT_ONLY_TITLE
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ break;
+ }
+ case 21 : // AUTOLAYOUT_NOTES
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderPage, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderNotes, pInfo->GetPresRectangle());
+ break;
+ }
+ case 22 : // AUTOLAYOUT_HANDOUT1
+ case 23 : // AUTOLAYOUT_HANDOUT2
+ case 24 : // AUTOLAYOUT_HANDOUT3
+ case 25 : // AUTOLAYOUT_HANDOUT4
+ case 26 : // AUTOLAYOUT_HANDOUT6
+ {
+ sal_Int32 nColCnt, nRowCnt;
+ sal_Int32 nGapX = pInfo->GetGapX();
+ sal_Int32 nGapY = pInfo->GetGapY();
+
+ switch(pInfo->GetLayoutType())
+ {
+ case 22 : nColCnt = 1; nRowCnt = 1; break;
+ case 23 : nColCnt = 1; nRowCnt = 2; break;
+ case 24 : nColCnt = 1; nRowCnt = 3; break;
+ case 25 : nColCnt = 2; nRowCnt = 2; break;
+ case 26 : nColCnt = 3; nRowCnt = 3; break;
+ }
+
+ Size aPartSize(pInfo->GetTitleRectangle().GetSize());
+ Point aPartPos(pInfo->GetTitleRectangle().TopLeft());
+
+ if(aPartSize.Width() > aPartSize.Height())
+ {
+ sal_Int32 nZwi(nColCnt);
+ nColCnt = nRowCnt;
+ nRowCnt = nZwi;
+ }
+
+ aPartSize.Width() = (aPartSize.Width() - ((nColCnt - 1) * nGapX)) / nColCnt;
+ aPartSize.Height() = (aPartSize.Height() - ((nRowCnt - 1) * nGapY)) / nRowCnt;
+
+ Point aTmpPos(aPartPos);
+
+ for(sal_Int32 a = 0L; a < nRowCnt; a++)
+ {
+ aTmpPos.X() = aPartPos.X();
+
+ for(sal_Int32 b = 0L; b < nColCnt; b++)
+ {
+ Rectangle aTmpRect(aTmpPos, aPartSize);
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderHandout, aTmpRect);
+ aTmpPos.X() += aPartSize.Width() + nGapX;
+ }
+
+ aTmpPos.Y() += aPartSize.Height() + nGapY;
+ }
+ break;
+ }
+ default:
+ {
+ DBG_ERROR("XMLEXP: unknown autolayout export");
+ break;
+ }
+ }
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpWriteAutoLayoutPlaceholder(XmlPlaceholder ePl, const Rectangle& rRect)
+{
+ OUString aStr;
+ OUStringBuffer sStringBuffer;
+
+ // prepare presentation-placeholder attributes, presentation:object
+ switch(ePl)
+ {
+ case XmlPlaceholderTitle: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("title")); break;
+ case XmlPlaceholderOutline: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("outline")); break;
+ case XmlPlaceholderSubtitle: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("subtitle")); break;
+ case XmlPlaceholderText: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("text")); break;
+ case XmlPlaceholderGraphic: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("graphic")); break;
+ case XmlPlaceholderObject: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("object")); break;
+ case XmlPlaceholderChart: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("chart")); break;
+ case XmlPlaceholderOrgchart: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("orgchart")); break;
+ case XmlPlaceholderTable: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("table")); break;
+ case XmlPlaceholderPage: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("page")); break;
+ case XmlPlaceholderNotes: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("notes")); break;
+ case XmlPlaceholderHandout: aStr = OUString(RTL_CONSTASCII_USTRINGPARAM("handout")); break;
+ }
+
+ AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_object, aStr);
+
+ // svg:x,y,width,height
+ GetMM100UnitConverter().convertMeasure(sStringBuffer, rRect.Left());
+ aStr = sStringBuffer.makeStringAndClear();
+ AddAttribute(XML_NAMESPACE_SVG, sXML_x, aStr);
+
+ GetMM100UnitConverter().convertMeasure(sStringBuffer, rRect.Top());
+ aStr = sStringBuffer.makeStringAndClear();
+ AddAttribute(XML_NAMESPACE_SVG, sXML_y, aStr);
+
+ GetMM100UnitConverter().convertMeasure(sStringBuffer, rRect.GetWidth());
+ aStr = sStringBuffer.makeStringAndClear();
+ AddAttribute(XML_NAMESPACE_SVG, sXML_width, aStr);
+
+ GetMM100UnitConverter().convertMeasure(sStringBuffer, rRect.GetHeight());
+ aStr = sStringBuffer.makeStringAndClear();
+ AddAttribute(XML_NAMESPACE_SVG, sXML_height, aStr);
+
+ // write presentation-placeholder
+ SvXMLElementExport aPPL(*this, XML_NAMESPACE_PRESENTATION, sXML_placeholder, sal_True, sal_True);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpPrepPageMasterInfos()
+{
+ if(mnDocMasterPageCount)
+ {
+ // look for needed page-masters, create these
+ for(sal_Int32 nMPageId = 0L; nMPageId < mnDocMasterPageCount; nMPageId++)
+ {
+ uno::Any aAny(mxDocMasterPages->getByIndex(nMPageId));
+ uno::Reference< drawing::XDrawPage > xMasterPage;
+ ImpXMLEXPPageMasterInfo* pNewInfo = 0L;
+ BOOL bDoesExist(FALSE);
+
+ if(aAny >>= xMasterPage)
+ {
+ pNewInfo = new ImpXMLEXPPageMasterInfo(*this, xMasterPage);
+
+ // compare with prev page-master infos
+ for(sal_uInt32 a = 0; !bDoesExist && a < mpPageMasterInfoList->Count(); a++)
+ {
+ if(mpPageMasterInfoList->GetObject(a)
+ && *mpPageMasterInfoList->GetObject(a) == *pNewInfo)
+ {
+ delete pNewInfo;
+ pNewInfo = mpPageMasterInfoList->GetObject(a);
+ bDoesExist = TRUE;
+ }
+ }
+ }
+
+ // add entry when not found same page-master infos
+ if(!bDoesExist)
+ mpPageMasterInfoList->Insert(pNewInfo, LIST_APPEND);
+ mpPageMaterUsageList->Insert(pNewInfo, LIST_APPEND);
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpWritePageMasterInfos()
+{
+ // write created page-masters, create names for these
+ for(sal_uInt32 nCnt = 0L; nCnt < mpPageMasterInfoList->Count(); nCnt++)
+ {
+ ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->GetObject(nCnt);
+ if(pInfo)
+ {
+ // create name
+ OUString sNewName = OUString(RTL_CONSTASCII_USTRINGPARAM("PM"));
+
+ sNewName += OUString::valueOf((sal_Int32)nCnt);
+ pInfo->SetName(sNewName);
+
+ // prepare page-master attributes
+ OUString sString;
+ OUStringBuffer sStringBuffer;
+
+ sString = sNewName;
+ AddAttribute(XML_NAMESPACE_STYLE, sXML_name, sString);
+
+ GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetBorderTop());
+ sString = sStringBuffer.makeStringAndClear();
+ AddAttribute(XML_NAMESPACE_FO, sXML_margin_top, sString);
+
+ GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetBorderBottom());
+ sString = sStringBuffer.makeStringAndClear();
+ AddAttribute(XML_NAMESPACE_FO, sXML_margin_bottom, sString);
+
+ GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetBorderLeft());
+ sString = sStringBuffer.makeStringAndClear();
+ AddAttribute(XML_NAMESPACE_FO, sXML_margin_left, sString);
+
+ GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetBorderRight());
+ sString = sStringBuffer.makeStringAndClear();
+ AddAttribute(XML_NAMESPACE_FO, sXML_margin_right, sString);
+
+ GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetWidth());
+ sString = sStringBuffer.makeStringAndClear();
+ AddAttribute(XML_NAMESPACE_FO, sXML_page_width, sString);
+
+ GetMM100UnitConverter().convertMeasure(sStringBuffer, pInfo->GetHeight());
+ sString = sStringBuffer.makeStringAndClear();
+ AddAttribute(XML_NAMESPACE_FO, sXML_page_height, sString);
+
+ if(pInfo->GetOrientation() == view::PaperOrientation_PORTRAIT)
+ AddAttributeASCII(XML_NAMESPACE_FO, sXML_page_orientation, sXML_orientation_portrait);
+ else
+ AddAttributeASCII(XML_NAMESPACE_FO, sXML_page_orientation, sXML_orientation_landscape);
+
+ // write page-master
+ SvXMLElementExport aPME(*this, XML_NAMESPACE_STYLE, sXML_page_master, sal_True, sal_True);
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetPageMasterInfoByName(const OUString& rName)
+{
+ if(rName.getLength() && mpPageMasterInfoList->Count())
+ {
+ for(sal_uInt32 nCnt = 0L; nCnt < mpPageMasterInfoList->Count(); nCnt++)
+ {
+ ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->GetObject(nCnt);
+ if(pInfo)
+ {
+ if(pInfo->GetMasterPageName().getLength() && rName.equals(pInfo->GetMasterPageName()))
+ {
+ return pInfo;
+ }
+ }
+ }
+ }
+ return 0L;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpPrepDrawPageInfos()
+{
+ // create draw:style-name entries for page export
+ // containing presentation page attributes AND background attributes
+ // fixed family for page-styles is "drawing-page" (XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME)
+ if(mnDocDrawPageCount)
+ {
+ // prepare name creation
+ for(sal_uInt32 nCnt = 0L; nCnt < mnDocDrawPageCount; nCnt++)
+ {
+ uno::Any aAny(mxDocDrawPages->getByIndex(nCnt));
+ uno::Reference<drawing::XDrawPage> xDrawPage;
+
+ if(aAny >>= xDrawPage)
+ {
+ // create name
+ OUString sNewName = OUString(RTL_CONSTASCII_USTRINGPARAM("P"));
+ sNewName += OUString::valueOf((sal_Int32)nCnt);
+
+ // create Info object
+ ImpXMLDrawPageInfo* pInfo = new ImpXMLDrawPageInfo(sNewName);
+ mpDrawPageInfoList->Insert(pInfo, LIST_APPEND);
+
+ if(IsImpress())
+ {
+ // create presentation-page-layout
+ OUString aStr;
+
+ if(ImpPrepAutoLayoutInfo(xDrawPage, aStr))
+ {
+ pInfo->SetPageLayoutName(aStr);
+ }
+ }
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpWriteDrawPageInfos()
+{
+ if(mnDocDrawPageCount && mpDrawPageInfoList->Count())
+ {
+ // prepare write
+ for(sal_uInt32 nCnt = 0L; nCnt < mnDocDrawPageCount; nCnt++)
+ {
+ uno::Any aAny(mxDocDrawPages->getByIndex(nCnt));
+ uno::Reference<drawing::XDrawPage> xDrawPage;
+
+ if(aAny >>= xDrawPage)
+ {
+ ImpXMLDrawPageInfo* pInfo = mpDrawPageInfoList->GetObject(nCnt);
+ if(pInfo)
+ {
+ // prepare draw-style attributes, style-name
+ AddAttribute(XML_NAMESPACE_STYLE, sXML_name, pInfo->GetStyleName());
+
+ // style-family
+ AddAttribute(XML_NAMESPACE_STYLE, sXML_family,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME)));
+
+ // write draw-style attributes
+ SvXMLElementExport aDSE(*this, XML_NAMESPACE_STYLE, sXML_style, sal_True, sal_True);
+
+ if(IsImpress())
+ {
+ // write draw-style properites
+ uno::Reference< beans::XPropertySet > xPropSet(xDrawPage, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ const UniReference< XMLPropertySetMapper > aMapperRef = GetPresPagePropsMapper();
+ std::vector< XMLPropertyState > xPropStates = aMapperRef->Filter( xPropSet );
+
+ if(xPropStates.size())
+ {
+ ImpPresPageDrawStylePropMapper aExpPropMapper(aMapperRef);
+
+ aExpPropMapper.exportXML(GetDocHandler(), xPropStates,
+ GetMM100UnitConverter(), GetNamespaceMap());
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::SetProgress(sal_Int32 nProg)
+{
+ // set progress view
+ if(mxStatusIndicator.is())
+ mxStatusIndicator->setValue(nProg);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::_ExportContent()
+{
+ // page export
+ for(sal_Int32 nPageInd(0); nPageInd < mnDocDrawPageCount; nPageInd++)
+ {
+ uno::Any aAny(mxDocDrawPages->getByIndex(nPageInd));
+ uno::Reference<drawing::XDrawPage> xDrawPage;
+
+ SetProgress(((nPageInd + 1) * 100) / mnDocDrawPageCount);
+
+ if(aAny >>= xDrawPage)
+ {
+ // prepare page attributes, name of page
+ uno::Reference < container::XNamed > xNamed(xDrawPage, uno::UNO_QUERY);
+ if(xNamed.is())
+ AddAttribute(XML_NAMESPACE_DRAW, sXML_name, xNamed->getName());
+
+ // draw:style-name (presentation page attributes AND background attributes)
+ ImpXMLDrawPageInfo* pInfo = mpDrawPageInfoList->GetObject(nPageInd);
+ if(pInfo)
+ {
+ OUString sString = pInfo->GetStyleName();
+ AddAttribute(XML_NAMESPACE_DRAW, sXML_style_name, sString);
+ }
+
+ // draw:master-page-name
+ uno::Reference < drawing::XMasterPageTarget > xMasterPageInt(xDrawPage, uno::UNO_QUERY);
+ if(xMasterPageInt.is())
+ {
+ uno::Reference<drawing::XDrawPage> xUsedMasterPage(xMasterPageInt->getMasterPage());
+ if(xUsedMasterPage.is())
+ {
+ uno::Reference < container::XNamed > xMasterNamed(xUsedMasterPage, uno::UNO_QUERY);
+ if(xMasterNamed.is())
+ {
+ AddAttribute(XML_NAMESPACE_DRAW, sXML_master_page_name, xMasterNamed->getName());
+ }
+ }
+ }
+
+ // presentation:page-layout-name
+ if(pInfo && IsImpress() && pInfo->GetPageLayoutName().getLength())
+ {
+ OUString sString = pInfo->GetPageLayoutName();
+ AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_presentation_page_layout_name, sString);
+ }
+
+ // write page
+ SvXMLElementExport aDPG(*this, XML_NAMESPACE_DRAW, sXML_page, sal_True, sal_True);
+
+ // write graphic objects on this page (if any)
+ uno::Reference< container::XIndexAccess > xShapes(xDrawPage, uno::UNO_QUERY);
+ if(xShapes.is() && xShapes->getCount())
+ {
+ // write shapes per se
+ ImpWriteSingleShapeStyleInfos(xShapes);
+ }
+
+ // write presentation notes (ONLY if presentation)
+ if(IsImpress())
+ {
+ uno::Reference< presentation::XPresentationPage > xPresPage(xDrawPage, uno::UNO_QUERY);
+ if(xPresPage.is())
+ {
+ uno::Reference< drawing::XDrawPage > xNotesPage(xPresPage->getNotesPage());
+ if(xNotesPage.is())
+ {
+ uno::Reference< container::XIndexAccess > xShapes(xNotesPage, uno::UNO_QUERY);
+ if(xShapes.is() && xShapes->getCount())
+ {
+ // write presentation notes
+ SvXMLElementExport aPSY(*this, XML_NAMESPACE_PRESENTATION, sXML_notes, sal_True, sal_True);
+
+ // write shapes per se
+ ImpWriteSingleShapeStyleInfos(xShapes);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportTextBoxShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
+
+ SdXMLImExTransform aTransform;
+ OUString aStr;
+ OUStringBuffer sStringBuffer;
+
+ // presentation attribute (if presentation)
+ sal_Bool bIsPresShape(FALSE);
+ sal_Bool bIsEmptyPresObj(FALSE);
+ sal_Bool bIsPlaceholderDependant(TRUE);
+
+ switch(eShapeType)
+ {
+ case XmlShapeTypePresSubtitleShape:
+ {
+ aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_subtitle));
+ bIsPresShape = TRUE;
+ break;
+ }
+ case XmlShapeTypePresTitleTextShape:
+ {
+ aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_title));
+ bIsPresShape = TRUE;
+ break;
+ }
+ case XmlShapeTypePresOutlinerShape:
+ {
+ aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_outline));
+ bIsPresShape = TRUE;
+ break;
+ }
+ case XmlShapeTypePresNotesShape:
+ {
+ aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_notes));
+ bIsPresShape = TRUE;
+ break;
+ }
+ }
+
+ if(bIsPresShape)
+ {
+ // is empty pes shape?
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject"))))
+ {
+ uno::Any aAny( xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject"))) );
+ aAny >>= bIsEmptyPresObj;
+ }
+
+ // is uder-transformed?
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsPlaceholderDependent"))))
+ {
+ uno::Any aAny( xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("IsPlaceholderDependent"))) );
+ aAny >>= bIsPlaceholderDependant;
+ }
+
+ // write presentation class entry
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_class, aStr);
+
+ // write presentation placeholder entry
+ if(bIsEmptyPresObj)
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_placeholder,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true)));
+
+ // write user-transformed entry
+ if(!bIsPlaceholderDependant)
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_user_transformed,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true)));
+ }
+
+ // text shape, prepare parameters
+ awt::Point aPoint( xShape->getPosition() );
+ awt::Size aSize( xShape->getSize() );
+
+ // svg: x
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.X);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_x, aStr);
+
+ // svg: y
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.Y);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_y, aStr);
+
+ // svg: width
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aSize.Width);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_width, aStr);
+
+ // svg: height
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aSize.Height);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_height, aStr);
+
+ // evtl. rotation (100'th degree, part of transformation)?
+ sal_Int32 nRotAngle(0L);
+ uno::Any aAny = xPropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("RotateAngle")));
+ aAny >>= nRotAngle;
+ if(nRotAngle)
+ aTransform.AddRotate(nRotAngle / 100.0);
+
+ // does transformation need to be exported?
+ if(aTransform.NeedsAction())
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_transform, aTransform.GetExportString(rExp.GetMM100UnitConverter()));
+
+ // write text-box
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_TEXT, sXML_text_box, sal_True, sal_True);
+
+ // export text
+ if(!bIsEmptyPresObj)
+ {
+ uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY );
+ if( xText.is() )
+ rExp.GetTextParagraphExport()->exportText( xText );
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportRectangleShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ SdXMLImExTransform aTransform;
+ OUString aStr;
+ OUStringBuffer sStringBuffer;
+
+ // rectangle, prepare parameters
+ awt::Point aPoint = xShape->getPosition();
+ awt::Size aSize = xShape->getSize();
+
+ // svg: x
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.X);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_x, aStr);
+
+ // svg: y
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.Y);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_y, aStr);
+
+ // svg: width
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aSize.Width);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_width, aStr);
+
+ // svg: height
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aSize.Height);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_height, aStr);
+
+ // evtl. rotation (100'th degree, part of transformation)?
+ sal_Int32 nRotAngle(0L);
+ uno::Any aAny = xPropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("RotateAngle")));
+ aAny >>= nRotAngle;
+ if(nRotAngle)
+ aTransform.AddRotate(nRotAngle / 100.0);
+
+ // does transformation need to be exported?
+ if(aTransform.NeedsAction())
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_transform, aTransform.GetExportString(rExp.GetMM100UnitConverter()));
+
+ // evtl. corner radius?
+ sal_Int32 nCornerRadius(0L);
+ aAny = xPropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("CornerRadius")));
+ aAny >>= nCornerRadius;
+ if(nCornerRadius)
+ {
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, nCornerRadius);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_DRAW, sXML_corner_radius, aStr);
+ }
+
+ // write rectangle
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_rect, sal_True, sal_True);
+
+ // export text
+ uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY );
+ if( xText.is() )
+ rExp.GetTextParagraphExport()->exportText( xText );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportLineShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ SdXMLImExTransform aTransform;
+ OUString aStr;
+ OUStringBuffer sStringBuffer;
+ awt::Point aStart(0,0);
+ awt::Point aEnd(1,1);
+
+ drawing::PointSequenceSequence* pSourcePolyPolygon = 0L;
+ uno::Any aAny = xPropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygon")));
+ pSourcePolyPolygon = (drawing::PointSequenceSequence*)aAny.getValue();
+
+ if(pSourcePolyPolygon)
+ {
+ drawing::PointSequence* pOuterSequence = pSourcePolyPolygon->getArray();
+ if(pOuterSequence)
+ {
+ drawing::PointSequence* pInnerSequence = pOuterSequence++;
+ if(pInnerSequence)
+ {
+ awt::Point* pArray = pInnerSequence->getArray();
+ if(pArray)
+ {
+ if(pInnerSequence->getLength() > 0)
+ {
+ aStart = awt::Point(pArray->X, pArray->Y);
+ pArray++;
+ }
+
+ if(pInnerSequence->getLength() > 1)
+ {
+ aEnd = awt::Point(pArray->X, pArray->Y);
+ }
+ }
+ }
+ }
+ }
+
+ // svg: x1
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aStart.X);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_x1, aStr);
+
+ // svg: y1
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aStart.Y);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_y1, aStr);
+
+ // svg: x2
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aEnd.X);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_x2, aStr);
+
+ // svg: y2
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aEnd.Y);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_y2, aStr);
+
+ // evtl. rotation (100'th degree, part of transformation)?
+ sal_Int32 nRotAngle(0L);
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("RotateAngle")));
+ aAny >>= nRotAngle;
+ if(nRotAngle)
+ aTransform.AddRotate(nRotAngle / 100.0);
+
+ // does transformation need to be exported?
+ if(aTransform.NeedsAction())
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_transform, aTransform.GetExportString(rExp.GetMM100UnitConverter()));
+
+ // write line
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_line, sal_True, sal_True);
+
+ // export text
+ uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY );
+ if( xText.is() )
+ rExp.GetTextParagraphExport()->exportText( xText );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportEllipseShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ SdXMLImExTransform aTransform;
+ // get size to decide between Circle and Ellipse
+ awt::Point aPoint = xShape->getPosition();
+ awt::Size aSize = xShape->getSize();
+ sal_Int32 nRx((aSize.Width + 1) / 2);
+ sal_Int32 nRy((aSize.Height + 1) / 2);
+ BOOL bCircle(nRx == nRy);
+ OUString aStr;
+ OUStringBuffer sStringBuffer;
+
+ // svg: cx
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.X + nRx);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_cx, aStr);
+
+ // svg: cy
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.Y + nRy);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_cy, aStr);
+
+ // evtl. rotation (100'th degree, part of transformation)?
+ sal_Int32 nRotAngle(0L);
+ uno::Any aAny = xPropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("RotateAngle")));
+ aAny >>= nRotAngle;
+ if(nRotAngle)
+ aTransform.AddRotate(nRotAngle / 100.0);
+
+ // does transformation need to be exported?
+ if(aTransform.NeedsAction())
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_transform, aTransform.GetExportString(rExp.GetMM100UnitConverter()));
+
+ if(bCircle)
+ {
+ // svg: r
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, nRx);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_r, aStr);
+
+ // write circle
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_circle, sal_True, sal_True);
+
+ // export text
+ uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY );
+ if( xText.is() )
+ rExp.GetTextParagraphExport()->exportText( xText );
+ }
+ else
+ {
+ // svg: rx
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, nRx);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_rx, aStr);
+
+ // svg: ry
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, nRy);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_ry, aStr);
+
+ // write ellipse
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_ellipse, sal_True, sal_True);
+
+ // export text
+ uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY );
+ if( xText.is() )
+ rExp.GetTextParagraphExport()->exportText( xText );
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportPolygonShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ BOOL bClosed(eShapeType == XmlShapeTypeDrawPolyPolygonShape
+ || eShapeType == XmlShapeTypeDrawClosedBezierShape);
+ BOOL bBezier(eShapeType == XmlShapeTypeDrawClosedBezierShape
+ || eShapeType == XmlShapeTypeDrawOpenBezierShape);
+ SdXMLImExTransform aTransform;
+ OUString aStr;
+ OUStringBuffer sStringBuffer;
+
+ // prepare posistion and size parameters
+ awt::Point aPoint = xShape->getPosition();
+ awt::Size aSize = xShape->getSize();
+
+ // svg: x
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.X);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_x, aStr);
+
+ // svg: y
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.Y);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_y, aStr);
+
+ // svg: width
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aSize.Width);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_width, aStr);
+
+ // svg: height
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aSize.Height);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_height, aStr);
+
+ // evtl. rotation (100'th degree, part of transformation)?
+ sal_Int32 nRotAngle(0L);
+ uno::Any aAny = xPropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("RotateAngle")));
+ aAny >>= nRotAngle;
+ if(nRotAngle)
+ aTransform.AddRotate(nRotAngle / 100.0);
+
+ // does transformation need to be exported?
+ if(aTransform.NeedsAction())
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_transform, aTransform.GetExportString(rExp.GetMM100UnitConverter()));
+
+ // create and export ViewBox
+ SdXMLImExViewBox aViewBox(0, 0, aSize.Width, aSize.Height);
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_viewBox, aViewBox.GetExportString(rExp.GetMM100UnitConverter()));
+
+
+ if(bBezier)
+ {
+ // get PolygonBezier
+ aAny = xPropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier")));
+ drawing::PolyPolygonBezierCoords* pSourcePolyPolygon =
+ (drawing::PolyPolygonBezierCoords*)aAny.getValue();
+
+ if(pSourcePolyPolygon && pSourcePolyPolygon->Coordinates.getLength())
+ {
+ sal_Int32 nOuterCnt(pSourcePolyPolygon->Coordinates.getLength());
+ drawing::PointSequence* pOuterSequence = pSourcePolyPolygon->Coordinates.getArray();
+ drawing::FlagSequence* pOuterFlags = pSourcePolyPolygon->Flags.getArray();
+
+ if(pOuterSequence && pOuterFlags)
+ {
+ // prepare svx:d element export
+ SdXMLImExSvgDElement aSvgDElement(aViewBox);
+
+ for(sal_Int32 a(0L); a < nOuterCnt; a++)
+ {
+ drawing::PointSequence* pSequence = pOuterSequence++;
+ drawing::FlagSequence* pFlags = pOuterFlags++;
+
+ if(pSequence && pFlags)
+ {
+ aSvgDElement.AddPolygon(pSequence, pFlags,
+ aPoint, aSize, rExp.GetMM100UnitConverter(), bClosed);
+ }
+ }
+
+ // write point array
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_d, aSvgDElement.GetExportString());
+ }
+
+ // write object now
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_path, sal_True, sal_True);
+
+ // export text
+ uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY );
+ if( xText.is() )
+ rExp.GetTextParagraphExport()->exportText( xText );
+ }
+ }
+ else
+ {
+ // get non-bezier polygon
+ aAny = xPropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygon")));
+ drawing::PointSequenceSequence* pSourcePolyPolygon =
+ (drawing::PointSequenceSequence*)aAny.getValue();
+
+ if(pSourcePolyPolygon && pSourcePolyPolygon->getLength())
+ {
+ sal_Int32 nOuterCnt(pSourcePolyPolygon->getLength());
+
+ if(1L == nOuterCnt && !bBezier)
+ {
+ // simple polygon shape, can be written as svg:points sequence
+ drawing::PointSequence* pSequence = pSourcePolyPolygon->getArray();
+ if(pSequence)
+ {
+ SdXMLImExPointsElement aPoints(pSequence, aViewBox, aPoint, aSize, rExp.GetMM100UnitConverter());
+
+ // write point array
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_points, aPoints.GetExportString());
+ }
+
+ // write object now
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW,
+ bClosed ? sXML_polygon : sXML_polyline , sal_True, sal_True);
+
+ // export text
+ uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY );
+ if( xText.is() )
+ rExp.GetTextParagraphExport()->exportText( xText );
+ }
+ else
+ {
+ // polypolygon or bezier, needs to be written as a svg:path sequence
+ drawing::PointSequence* pOuterSequence = pSourcePolyPolygon->getArray();
+ if(pOuterSequence)
+ {
+ // prepare svx:d element export
+ SdXMLImExSvgDElement aSvgDElement(aViewBox);
+
+ for(sal_Int32 a(0L); a < nOuterCnt; a++)
+ {
+ drawing::PointSequence* pSequence = pOuterSequence++;
+ if(pSequence)
+ {
+ aSvgDElement.AddPolygon(pSequence, 0L, aPoint,
+ aSize, rExp.GetMM100UnitConverter(), bClosed);
+ }
+ }
+
+ // write point array
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_d, aSvgDElement.GetExportString());
+ }
+
+ // write object now
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_path, sal_True, sal_True);
+
+ // export text
+ uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY );
+ if( xText.is() )
+ rExp.GetTextParagraphExport()->exportText( xText );
+ }
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportGraphicObjectShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ SdXMLImExTransform aTransform;
+ OUString aStr;
+ OUStringBuffer sStringBuffer;
+
+ sal_Bool bIsEmptyPresObj = sal_False;
+ uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
+
+ // prepare posistion and size parameters
+ awt::Point aPoint = xShape->getPosition();
+ awt::Size aSize = xShape->getSize();
+
+ // svg: x
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.X);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_x, aStr);
+
+ // svg: y
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.Y);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_y, aStr);
+
+ // svg: width
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aSize.Width);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_width, aStr);
+
+ // svg: height
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aSize.Height);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_height, aStr);
+
+ // evtl. rotation (100'th degree, part of transformation)?
+ sal_Int32 nRotAngle(0L);
+ uno::Any aAny = xPropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("RotateAngle")));
+ aAny >>= nRotAngle;
+ if(nRotAngle)
+ aTransform.AddRotate(nRotAngle / 100.0);
+
+ // does transformation need to be exported?
+ if(aTransform.NeedsAction())
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_transform, aTransform.GetExportString(rExp.GetMM100UnitConverter()));
+
+ if(eShapeType == XmlShapeTypePresGraphicObjectShape)
+ {
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject"))))
+ {
+ uno::Any aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject")));
+ aAny >>= bIsEmptyPresObj;
+ }
+
+ // write presentation class entry
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_class,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_graphic)));
+
+ // write presentation placeholder entry
+ if(bIsEmptyPresObj)
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_placeholder,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true)));
+ }
+
+ if( !bIsEmptyPresObj )
+ {
+ aAny = xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicURL")));
+ aAny >>= aStr;
+ rExp.AddAttribute(XML_NAMESPACE_XLINK, sXML_href, aStr );
+
+ aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_simple));
+ rExp.AddAttribute(XML_NAMESPACE_XLINK, sXML_type, aStr );
+
+ aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_embed));
+ rExp.AddAttribute(XML_NAMESPACE_XLINK, sXML_show, aStr );
+
+ aStr = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_onRequest));
+ rExp.AddAttribute(XML_NAMESPACE_XLINK, sXML_actuate, aStr );
+ }
+ // write graphic object
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_OFFICE, sXML_image, sal_True, sal_True);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportChartShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
+
+ sal_Bool bIsEmptyPresObj = sal_False;
+ if(eShapeType == XmlShapeTypePresChartShape)
+ {
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject"))))
+ {
+ uno::Any aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject")));
+ aAny >>= bIsEmptyPresObj;
+ }
+
+ // write presentation class entry
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_class,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_chart)));
+
+ // write presentation placeholder entry
+ if(bIsEmptyPresObj)
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_placeholder,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true)));
+ }
+
+ OUString aStr;
+ OUStringBuffer sStringBuffer;
+
+ // rectangle, prepare parameters
+ awt::Point aPoint( xShape->getPosition());
+ awt::Size aSize( xShape->getSize());
+
+ // svg: x
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.X);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_x, aStr);
+
+ // svg: y
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aPoint.Y);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_y, aStr);
+
+ // svg: width
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aSize.Width);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_width, aStr);
+
+ // svg: height
+ rExp.GetMM100UnitConverter().convertMeasure(sStringBuffer, aSize.Height);
+ aStr = sStringBuffer.makeStringAndClear();
+ rExp.AddAttribute(XML_NAMESPACE_SVG, sXML_height, aStr);
+
+ uno::Reference< chart::XChartDocument > xChartDoc;
+ if( !bIsEmptyPresObj )
+ {
+ uno::Any aAny( xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ) ) );
+ aAny >>= xChartDoc;
+ }
+
+ if( xChartDoc.is() )
+ {
+ rExp.GetChartExport()->exportChart( xChartDoc, sal_False );
+ }
+ else
+ {
+ // write chart object (fake for now, replace later)
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_CHART, sXML_chart, sal_True, sal_True);
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportSpreadsheetShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
+
+ if(eShapeType == XmlShapeTypePresTableShape)
+ {
+ sal_Bool bIsEmptyPresObj = sal_False;
+
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject"))))
+ {
+ uno::Any aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject")));
+ aAny >>= bIsEmptyPresObj;
+ }
+
+ // write presentation class entry
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_class,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_table)));
+
+ // write presentation placeholder entry
+ if(bIsEmptyPresObj)
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_placeholder,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true)));
+ }
+
+ // write spreadsheet object (fake for now, replace later)
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML__unknown_, sal_True, sal_True);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportControlShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ // this is a control shape, in this place the database team
+ // would have to export the control abilities. Add Export later
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_control, sal_True, sal_True);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportConnectorShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ // write connector shape. Add Export later.
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_connector, sal_True, sal_True);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportMeasureShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ // write measure shape. Add Export later.
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_measure, sal_True, sal_True);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportOLE2Shape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
+
+ if(eShapeType == XmlShapeTypePresOLE2Shape)
+ {
+ sal_Bool bIsEmptyPresObj = sal_False;
+
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject"))))
+ {
+ uno::Any aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject")));
+ aAny >>= bIsEmptyPresObj;
+ }
+
+ // write presentation class entry
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_class,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_object)));
+
+ // write presentation placeholder entry
+ if(bIsEmptyPresObj)
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_placeholder,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true)));
+ }
+
+ // write spreadsheet object (fake for now, replace later)
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML__unknown_, sal_True, sal_True);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportPageShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ OUString aStr;
+
+ // a presentation page shape, normally used on notes pages only. If
+ // it is used not as presentation shape, it may have been created with
+ // copy-paste exchange between draw and impress (this IS possible...)
+ if(eShapeType == XmlShapeTypePresPageShape)
+ {
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_class,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_page)));
+ }
+
+ // write Page shape
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_page, sal_True, sal_True);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExportCaptionShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ // write Caption shape. Add export later.
+ SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_caption, sal_True, sal_True);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpExport3DShape(SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType eShapeType)
+{
+ switch(eShapeType)
+ {
+ case XmlShapeTypeDraw3DCubeObject:
+ {
+ // write 3DCube shape
+// SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_3DCube, sal_True, sal_True);
+ break;
+ }
+ case XmlShapeTypeDraw3DSphereObject:
+ {
+ // write 3DSphere shape
+// SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_3DSphere, sal_True, sal_True);
+ break;
+ }
+ case XmlShapeTypeDraw3DLatheObject:
+ {
+ // write 3DLathe shape
+// SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_3DLathe, sal_True, sal_True);
+ break;
+ }
+ case XmlShapeTypeDraw3DExtrudeObject:
+ {
+ // write 3DExtrude shape
+// SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_3DExtrude, sal_True, sal_True);
+ break;
+ }
+ case XmlShapeTypeDraw3DPolygonObject:
+ {
+ // write 3DPolygon shape
+// SvXMLElementExport aOBJ(rExp, XML_NAMESPACE_DRAW, sXML_3DPolygon, sal_True, sal_True);
+ break;
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpWriteSingleShapeStyleInfo(const uno::Reference< drawing::XShape >& xShape)
+{
+ // get correct shape-style info
+ ImpXMLShapeStyleInfo* pInfo =
+ (mnShapeStyleInfoIndex < mpShapeStyleInfoList->Count()) ?
+ mpShapeStyleInfoList->GetObject(mnShapeStyleInfoIndex) : 0L;
+ mnShapeStyleInfoIndex++;
+
+ if(pInfo && pInfo->GetStyleName().getLength())
+ {
+ XmlShapeType eShapeType(XmlShapeTypeNotYetSet);
+
+ ImpCalcShapeType(xShape, eShapeType);
+ ImpWriteSingleShapeStyleInfo(*this, xShape,
+ pInfo->GetFamily(), pInfo->GetStyleName(), eShapeType);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType& eShapeType)
+{
+ // set in every case, so init here
+ eShapeType = XmlShapeTypeUnknown;
+
+ uno::Reference< drawing::XShapeDescriptor > xShapeDescriptor(xShape, uno::UNO_QUERY);
+ if(xShapeDescriptor.is())
+ {
+ String aType((OUString)xShapeDescriptor->getShapeType());
+
+ if(aType.EqualsAscii((const sal_Char*)"com.sun.star.", 0, 13))
+ {
+ if(aType.EqualsAscii("drawing.", 13, 8))
+ {
+ // drawing shapes
+ if (aType.EqualsAscii("Rectangle", 21, 9)) { eShapeType = XmlShapeTypeDrawRectangleShape; }
+ else if(aType.EqualsAscii("Ellipse", 21, 7)) { eShapeType = XmlShapeTypeDrawEllipseShape; }
+ else if(aType.EqualsAscii("Control", 21, 7)) { eShapeType = XmlShapeTypeDrawControlShape; }
+ else if(aType.EqualsAscii("Connector", 21, 9)) { eShapeType = XmlShapeTypeDrawConnectorShape; }
+ else if(aType.EqualsAscii("Measure", 21, 7)) { eShapeType = XmlShapeTypeDrawMeasureShape; }
+ else if(aType.EqualsAscii("Line", 21, 4)) { eShapeType = XmlShapeTypeDrawLineShape; }
+ else if(aType.EqualsAscii("PolyPolygon", 21, 11)) { eShapeType = XmlShapeTypeDrawPolyPolygonShape; }
+ else if(aType.EqualsAscii("PolyLine", 21, 8)) { eShapeType = XmlShapeTypeDrawPolyLineShape; }
+ else if(aType.EqualsAscii("OpenBezier", 21, 10)) { eShapeType = XmlShapeTypeDrawOpenBezierShape; }
+ else if(aType.EqualsAscii("ClosedBezier", 21, 12)) { eShapeType = XmlShapeTypeDrawClosedBezierShape; }
+ else if(aType.EqualsAscii("GraphicObject", 21, 13)) { eShapeType = XmlShapeTypeDrawGraphicObjectShape; }
+ else if(aType.EqualsAscii("Group", 21, 5)) { eShapeType = XmlShapeTypeDrawGroupShape; }
+ else if(aType.EqualsAscii("Text", 21, 4)) { eShapeType = XmlShapeTypeDrawTextShape; }
+ else if(aType.EqualsAscii("OLE2", 21, 4))
+ {
+ eShapeType = XmlShapeTypeDrawOLE2Shape;
+
+ // get info about presentation shape
+ uno::Reference <beans::XPropertySet> xPropSet(xShape, uno::UNO_QUERY);
+
+ if(xPropSet.is())
+ {
+ uno::Any aAny;
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Model")));
+ uno::Reference <lang::XServiceInfo> xObjectInfo;
+
+ if(aAny >>= xObjectInfo)
+ {
+ if(xObjectInfo->supportsService(OUString(RTL_CONSTASCII_USTRINGPARAM
+ ("com.sun.star.chart.ChartDocument"))))
+ {
+ eShapeType = XmlShapeTypeDrawChartShape;
+ }
+ else if(xObjectInfo->supportsService(OUString(RTL_CONSTASCII_USTRINGPARAM
+ ("com.sun.star.sheet.SpreadsheetDocument"))))
+ {
+ eShapeType = XmlShapeTypeDrawTableShape;
+ }
+ else
+ {
+ // general OLE2 Object
+ }
+ }
+ }
+ }
+ else if(aType.EqualsAscii("Page", 21, 4)) { eShapeType = XmlShapeTypeDrawPageShape; }
+ else if(aType.EqualsAscii("Frame", 21, 5)) { eShapeType = XmlShapeTypeDrawFrameShape; }
+ else if(aType.EqualsAscii("Caption", 21, 6)) { eShapeType = XmlShapeTypeDrawCaptionShape; }
+
+ // 3D shapes
+ else if(aType.EqualsAscii("Scene", 21 + 7, 5)) { eShapeType = XmlShapeTypeDraw3DSceneObject; }
+ else if(aType.EqualsAscii("Cube", 21 + 7, 4)) { eShapeType = XmlShapeTypeDraw3DCubeObject; }
+ else if(aType.EqualsAscii("Sphere", 21 + 7, 6)) { eShapeType = XmlShapeTypeDraw3DSphereObject; }
+ else if(aType.EqualsAscii("Lathe", 21 + 7, 5)) { eShapeType = XmlShapeTypeDraw3DLatheObject; }
+ else if(aType.EqualsAscii("Extrude", 21 + 7, 7)) { eShapeType = XmlShapeTypeDraw3DExtrudeObject; }
+ else if(aType.EqualsAscii("Polygon", 21 + 7, 7)) { eShapeType = XmlShapeTypeDraw3DPolygonObject; }
+ }
+ else if(aType.EqualsAscii("presentation.", 13, 13))
+ {
+ // presentation shapes
+ if (aType.EqualsAscii("TitleText", 26, 9)) { eShapeType = XmlShapeTypePresTitleTextShape; }
+ else if(aType.EqualsAscii("Outliner", 26, 8)) { eShapeType = XmlShapeTypePresOutlinerShape; }
+ else if(aType.EqualsAscii("Subtitle", 26, 8)) { eShapeType = XmlShapeTypePresSubtitleShape; }
+ else if(aType.EqualsAscii("GraphicObject", 26, 13)) { eShapeType = XmlShapeTypePresGraphicObjectShape; }
+ else if(aType.EqualsAscii("Page", 26, 4)) { eShapeType = XmlShapeTypePresPageShape; }
+ else if(aType.EqualsAscii("OLE2", 26, 4)) { eShapeType = XmlShapeTypePresOLE2Shape; }
+ else if(aType.EqualsAscii("Chart", 26, 5)) { eShapeType = XmlShapeTypePresChartShape; }
+ else if(aType.EqualsAscii("Table", 26, 5)) { eShapeType = XmlShapeTypePresTableShape; }
+ else if(aType.EqualsAscii("OrgChart", 26, 8)) { eShapeType = XmlShapeTypePresOrgChartShape; }
+ else if(aType.EqualsAscii("Notes", 26, 5)) { eShapeType = XmlShapeTypePresNotesShape; }
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpWriteSingleShapeStyleInfo(
+ SvXMLExport& rExp,
+ const uno::Reference< drawing::XShape >& xShape,
+ sal_uInt16 nFamily, const OUString& rStyleName, XmlShapeType eShapeType)
+{
+ // add style-name attribute (REQUIRED) Style-name, evtl. auto-style
+ if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily)
+ rExp.AddAttribute(XML_NAMESPACE_DRAW, sXML_style_name, rStyleName);
+ else
+ rExp.AddAttribute(XML_NAMESPACE_PRESENTATION, sXML_style_name, rStyleName);
+
+ switch(eShapeType)
+ {
+ case XmlShapeTypeDrawRectangleShape:
+ {
+ ImpExportRectangleShape(rExp, xShape, eShapeType);
+ break;
+ }
+ case XmlShapeTypeDrawEllipseShape:
+ {
+ ImpExportEllipseShape(rExp, xShape, eShapeType);
+ break;
+ }
+ case XmlShapeTypeDrawLineShape:
+ {
+ ImpExportLineShape(rExp, xShape, eShapeType);
+ break;
+ }
+ case XmlShapeTypeDrawPolyPolygonShape: // closed PolyPolygon
+ case XmlShapeTypeDrawPolyLineShape: // open PolyPolygon
+ case XmlShapeTypeDrawClosedBezierShape: // closed PolyPolygon containing curves
+ case XmlShapeTypeDrawOpenBezierShape: // open PolyPolygon containing curves
+ {
+ ImpExportPolygonShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDrawTextShape:
+ case XmlShapeTypePresTitleTextShape:
+ case XmlShapeTypePresOutlinerShape:
+ case XmlShapeTypePresSubtitleShape:
+ case XmlShapeTypePresNotesShape:
+ {
+ ImpExportTextBoxShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDrawGraphicObjectShape:
+ case XmlShapeTypePresGraphicObjectShape:
+ {
+ ImpExportGraphicObjectShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDrawChartShape:
+ case XmlShapeTypePresChartShape:
+ {
+ ImpExportChartShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDrawTableShape:
+ case XmlShapeTypePresTableShape:
+ {
+ ImpExportSpreadsheetShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDrawControlShape:
+ {
+ ImpExportControlShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDrawConnectorShape:
+ {
+ ImpExportConnectorShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDrawMeasureShape:
+ {
+ ImpExportMeasureShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDrawOLE2Shape:
+ case XmlShapeTypePresOLE2Shape:
+ {
+ ImpExportOLE2Shape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDrawPageShape:
+ case XmlShapeTypePresPageShape:
+ {
+ ImpExportPageShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDrawCaptionShape:
+ {
+ ImpExportCaptionShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypeDraw3DCubeObject:
+ case XmlShapeTypeDraw3DSphereObject:
+ case XmlShapeTypeDraw3DLatheObject:
+ case XmlShapeTypeDraw3DExtrudeObject:
+ case XmlShapeTypeDraw3DPolygonObject:
+ {
+ ImpExport3DShape(rExp, xShape, eShapeType);
+ break;
+ }
+
+ case XmlShapeTypePresOrgChartShape:
+ case XmlShapeTypeDraw3DSceneObject:
+ case XmlShapeTypeDrawFrameShape:
+ case XmlShapeTypeDrawGroupShape:
+ case XmlShapeTypeUnknown:
+ case XmlShapeTypeNotYetSet:
+ default:
+ {
+ // this should never happen and is an error
+ DBG_ERROR("XMLEXP: WriteShape: unknown or unexpected type of shape in export!");
+ break;
+ }
+ }
+}
+
+void SdXMLExport::ImpWriteSingleShapeStyleInfos(uno::Reference< container::XIndexAccess >& xShapes)
+{
+ const sal_Int32 nShapeCount(xShapes->getCount());
+ sal_Int32 nShapeId;
+
+ // loop over shapes
+ for(nShapeId = 0L; nShapeId < nShapeCount; nShapeId++)
+ {
+ uno::Any aAny(xShapes->getByIndex(nShapeId));
+ uno::Reference< drawing::XShape > xShape;
+
+ if(aAny >>= xShape)
+ {
+ uno::Reference< container::XIndexAccess > xShapes(xShape, uno::UNO_QUERY);
+ if(xShapes.is() && xShapes->getCount())
+ {
+ // write group shape
+ SvXMLElementExport aPGR(*this, XML_NAMESPACE_DRAW, sXML_g, sal_True, sal_True);
+
+ // write members
+ ImpWriteSingleShapeStyleInfos(xShapes);
+ }
+ else
+ {
+ // single shape
+ ImpWriteSingleShapeStyleInfo(xShape);
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::ImpPrepSingleShapeStyleInfo(uno::Reference< drawing::XShape >& xShape,
+ const OUString& rPrefix)
+{
+ uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ OUString aParentName;
+ OUString aNewName;
+ uno::Reference< style::XStyle > xStyle;
+ sal_Int32 nFamily(XML_STYLE_FAMILY_SD_GRAPHICS_ID);
+
+ uno::Any aAny = xPropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Style")));
+ if(aAny >>= xStyle)
+ {
+ // get family ID
+ uno::Reference< beans::XPropertySet > xStylePropSet(xStyle, uno::UNO_QUERY);
+ if(xStylePropSet.is())
+ {
+ OUString aFamilyName;
+ aAny = xStylePropSet->getPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Family")));
+ if(aAny >>= aFamilyName)
+ {
+ if(aFamilyName.getLength() && aFamilyName.equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("presentation"))))
+ {
+ nFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID;
+ }
+ }
+ }
+
+ // get parent-style name
+ if(XML_STYLE_FAMILY_SD_PRESENTATION_ID == nFamily && rPrefix.getLength())
+ {
+ aParentName = rPrefix;
+ aParentName += xStyle->getName();
+ }
+ else
+ aParentName = xStyle->getName();
+ }
+
+ // filter propset
+ std::vector< XMLPropertyState > xPropStates = GetPropertySetMapper()->Filter( xPropSet );
+
+ if(!xPropStates.size())
+ {
+ // no hard attributes, use parent style name for export
+ aNewName = aParentName;
+ }
+ else
+ {
+ // there are filtered properties -> hard attributes
+ // try to find this style in AutoStylePool
+ aNewName = GetAutoStylePool()->Find(nFamily, aParentName, xPropStates);
+
+ if(!aNewName.getLength())
+ {
+ // Style did not exist, add it to AutoStalePool
+ aNewName = GetAutoStylePool()->Add(nFamily, aParentName, xPropStates);
+ }
+ }
+
+ // in aNewName is the StyleInfo to be used for exporting this object.
+ // Remember: String maybe still empty due to objects without style,
+ // like PageObjects(!)
+ // Now remember this association in helper class for later export
+ ImpXMLShapeStyleInfo* pInfo = new ImpXMLShapeStyleInfo(aNewName, nFamily);
+ mpShapeStyleInfoList->Insert(pInfo, LIST_APPEND);
+
+ // prep text styles
+ uno::Reference< text::XText > xText(xShape, uno::UNO_QUERY);
+ if(xText.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
+
+ sal_Bool bIsEmptyPresObj = sal_False;
+
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject"))))
+ {
+ uno::Any aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject")));
+ aAny >>= bIsEmptyPresObj;
+ }
+
+ if(!bIsEmptyPresObj)
+ {
+ GetTextParagraphExport()->collectTextAutoStyles( xText );
+ }
+ }
+
+ // check for calc ole
+ const OUString aShapeType( xShape->getShapeType() );
+ if( (0 == aShapeType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.OLE2Shape" ))) ||
+ (0 == aShapeType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.CalcShape" ))) )
+ {
+ uno::Reference< chart::XChartDocument > xChartDoc;
+ uno::Any aAny( xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ) ) );
+ aAny >>= xChartDoc;
+ if( xChartDoc.is() )
+ {
+ GetChartExport()->collectAutoStyles( xChartDoc );
+ }
+ }
+ }
+}
+
+void SdXMLExport::ImpPrepSingleShapeStyleInfos(uno::Reference< container::XIndexAccess >& xShapes,
+ const OUString& rPrefix)
+{
+ const sal_Int32 nShapeCount(xShapes->getCount());
+ sal_Int32 nShapeId;
+
+ // loop over shapes
+ for(nShapeId = 0L; nShapeId < nShapeCount; nShapeId++)
+ {
+ uno::Any aAny(xShapes->getByIndex(nShapeId));
+ uno::Reference< drawing::XShape > xShape;
+
+ if(aAny >>= xShape)
+ {
+ uno::Reference< container::XIndexAccess > xShapes(xShape, uno::UNO_QUERY);
+ if(xShapes.is() && xShapes->getCount())
+ {
+ // group shape
+ ImpPrepSingleShapeStyleInfos(xShapes, rPrefix);
+ }
+ else
+ {
+ // single shape
+ ImpPrepSingleShapeStyleInfo(xShape, rPrefix);
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::_ExportStyles(BOOL bUsed)
+{
+ // export fill styles
+ SvXMLExport::_ExportStyles( bUsed );
+
+ // prepare and write default-draw-style-pool
+ ImpWriteDefaultStyleInfos();
+
+ // write draw:style-name for object graphic-styles
+ ImpWriteObjGraphicStyleInfos();
+
+ // prepare page-master infos
+ ImpPrepPageMasterInfos();
+
+ // write page-master infos
+ ImpWritePageMasterInfos();
+
+ // prepare draw:style-name for page export
+ ImpPrepDrawPageInfos();
+
+ // write draw:style-name for page export
+ ImpWriteDrawPageInfos();
+
+ // write draw:auto-layout-name for page export
+ ImpWriteAutoLayoutInfos();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::_ExportAutoStyles()
+{
+ // create auto style infos for objects on master pages
+ for(sal_Int32 nMPageId(0L); nMPageId < mnDocMasterPageCount; nMPageId++)
+ {
+ uno::Any aAny(mxDocMasterPages->getByIndex(nMPageId));
+ uno::Reference< drawing::XDrawPage > xMasterPage;
+
+ if(aAny >>= xMasterPage)
+ {
+ // get MasterPage Name
+ OUString aMasterPageNamePrefix;
+ uno::Reference < container::XNamed > xNamed(xMasterPage, uno::UNO_QUERY);
+ if(xNamed.is())
+ {
+ aMasterPageNamePrefix = xNamed->getName();
+ }
+ if(aMasterPageNamePrefix.getLength())
+ {
+ aMasterPageNamePrefix += OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
+ }
+
+ uno::Reference< container::XIndexAccess > xShapes(xMasterPage, uno::UNO_QUERY);
+ if(xShapes.is() && xShapes->getCount())
+ ImpPrepSingleShapeStyleInfos(xShapes, aMasterPageNamePrefix);
+
+ if(IsImpress())
+ {
+ uno::Reference< presentation::XPresentationPage > xPresPage(xMasterPage, uno::UNO_QUERY);
+ if(xPresPage.is())
+ {
+ uno::Reference< drawing::XDrawPage > xNotesPage(xPresPage->getNotesPage());
+ if(xNotesPage.is())
+ {
+ uno::Reference< container::XIndexAccess > xShapes(xNotesPage, uno::UNO_QUERY);
+ if(xShapes.is() && xShapes->getCount())
+ ImpPrepSingleShapeStyleInfos(xShapes, aMasterPageNamePrefix);
+ }
+ }
+ }
+ }
+ }
+
+ // create auto style infos for objects on pages
+ for(sal_Int32 nPageInd(0); nPageInd < mnDocDrawPageCount; nPageInd++)
+ {
+ uno::Any aAny(mxDocDrawPages->getByIndex(nPageInd));
+ uno::Reference<drawing::XDrawPage> xDrawPage;
+
+ if(aAny >>= xDrawPage)
+ {
+ // get MasterPage Name
+ OUString aMasterPageNamePrefix;
+ uno::Reference < drawing::XMasterPageTarget > xMasterPageInt(xDrawPage, uno::UNO_QUERY);
+ if(xMasterPageInt.is())
+ {
+ uno::Reference<drawing::XDrawPage> xUsedMasterPage(xMasterPageInt->getMasterPage());
+ if(xUsedMasterPage.is())
+ {
+ uno::Reference < container::XNamed > xMasterNamed(xUsedMasterPage, uno::UNO_QUERY);
+ if(xMasterNamed.is())
+ {
+ aMasterPageNamePrefix = xMasterNamed->getName();
+ }
+ }
+ }
+ if(aMasterPageNamePrefix.getLength())
+ {
+ aMasterPageNamePrefix += OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
+ }
+
+ // prepare object infos
+ uno::Reference< container::XIndexAccess > xShapes(xDrawPage, uno::UNO_QUERY);
+ if(xShapes.is() && xShapes->getCount())
+ ImpPrepSingleShapeStyleInfos(xShapes, aMasterPageNamePrefix);
+
+ // prepare presentation notes page object infos (ONLY if presentation)
+ if(IsImpress())
+ {
+ uno::Reference< presentation::XPresentationPage > xPresPage(xDrawPage, uno::UNO_QUERY);
+ if(xPresPage.is())
+ {
+ uno::Reference< drawing::XDrawPage > xNotesPage(xPresPage->getNotesPage());
+ if(xNotesPage.is())
+ {
+ uno::Reference< container::XIndexAccess > xShapes(xNotesPage, uno::UNO_QUERY);
+ if(xShapes.is() && xShapes->getCount())
+ ImpPrepSingleShapeStyleInfos(xShapes, aMasterPageNamePrefix);
+ }
+ }
+ }
+ }
+ }
+
+ GetShapeExport()->exportAutoStyles();
+
+ // ...for text
+ GetTextParagraphExport()->exportTextAutoStyles();
+
+ // ...for chart
+ GetChartExport()->exportAutoStyles();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLExport::_ExportMasterStyles()
+{
+ // export MasterPages in master-styles section
+ for(sal_Int32 nMPageId = 0L; nMPageId < mnDocMasterPageCount; nMPageId++)
+ {
+ uno::Any aAny(mxDocMasterPages->getByIndex(nMPageId));
+ uno::Reference< drawing::XDrawPage > xMasterPage;
+
+ if(aAny >>= xMasterPage)
+ {
+ // prepare masterpage attributes
+ OUString sMasterPageName;
+ uno::Reference < container::XNamed > xNamed(xMasterPage, uno::UNO_QUERY);
+ if(xNamed.is())
+ {
+ sMasterPageName = xNamed->getName();
+ AddAttribute(XML_NAMESPACE_STYLE, sXML_name, sMasterPageName);
+ }
+
+ ImpXMLEXPPageMasterInfo* pInfo = mpPageMaterUsageList->GetObject(nMPageId);
+ if(pInfo)
+ {
+ OUString sString = pInfo->GetName();
+ AddAttribute(XML_NAMESPACE_STYLE, sXML_page_master_name, sString);
+ }
+
+ // write masterpage
+ SvXMLElementExport aMPG(*this, XML_NAMESPACE_STYLE, sXML_master_page, sal_True, sal_True);
+
+ // write presentation styles (ONLY if presentation)
+ if(IsImpress() && mxDocStyleFamilies.is() && xNamed.is())
+ {
+ XMLStyleExport aStEx(*this,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_drawpool)), GetAutoStylePool().get());
+ const UniReference< XMLPropertySetMapper > aMapperRef = GetPropertySetMapper();
+
+ OUString aPrefix = xNamed->getName();
+ aPrefix += OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
+ aStEx.exportStyleFamily(xNamed->getName(),
+ XML_STYLE_FAMILY_SD_PRESENTATION_NAME, aMapperRef, FALSE,
+ XML_STYLE_FAMILY_SD_PRESENTATION_ID, &aPrefix);
+ }
+
+ // write graphic objects on this master page (if any)
+ uno::Reference< container::XIndexAccess > xShapes(xMasterPage, uno::UNO_QUERY);
+ if(xShapes.is() && xShapes->getCount())
+ ImpWriteSingleShapeStyleInfos(xShapes);
+
+ // write presentation notes (ONLY if presentation)
+ if(IsImpress())
+ {
+ uno::Reference< presentation::XPresentationPage > xPresPage(xMasterPage, uno::UNO_QUERY);
+ if(xPresPage.is())
+ {
+ uno::Reference< drawing::XDrawPage > xNotesPage(xPresPage->getNotesPage());
+ if(xNotesPage.is())
+ {
+ uno::Reference< container::XIndexAccess > xShapes(xNotesPage, uno::UNO_QUERY);
+ if(xShapes.is() && xShapes->getCount())
+ {
+ // write presentation notes
+ SvXMLElementExport aPSY(*this, XML_NAMESPACE_PRESENTATION, sXML_notes, sal_True, sal_True);
+
+ // write shapes per se
+ ImpWriteSingleShapeStyleInfos(xShapes);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
new file mode 100644
index 0000000000..b232c7024f
--- /dev/null
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -0,0 +1,607 @@
+/*************************************************************************
+ *
+ * $RCSfile: sdxmlimp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _SDXMLIMP_HXX
+#include "sdxmlimp.hxx"
+#endif
+
+#ifndef _XIMPBODY_HXX
+#include "ximpbody.hxx"
+#endif
+
+#ifndef _SFX_XMLMETAI_HXX
+#include "xmlmetai.hxx"
+#endif
+
+#ifndef _XIMPSTYLE_HXX
+#include "ximpstyl.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFOSUPPLIER_HPP_
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATORSUPPLIER_HPP_
+#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_XSTYLEFAMILIESSUPPLIER_HPP_
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XMASTERPAGESSUPPLIER_HPP_
+#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGESSUPPLIER_HPP_
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#endif
+
+#ifndef _SDPROPLS_HXX
+#include "sdpropls.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLEXPPR_HXX
+#include "xmlexppr.hxx"
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_
+#include <com/sun/star/style/XStyle.hpp>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aDocElemTokenMap[] =
+{
+ { XML_NAMESPACE_OFFICE, sXML_styles, XML_TOK_DOC_STYLES },
+ { XML_NAMESPACE_OFFICE, sXML_automatic_styles, XML_TOK_DOC_AUTOSTYLES },
+ { XML_NAMESPACE_OFFICE, sXML_master_styles, XML_TOK_DOC_MASTERSTYLES },
+ { XML_NAMESPACE_OFFICE, sXML_meta, XML_TOK_DOC_META },
+ { XML_NAMESPACE_OFFICE, sXML_body, XML_TOK_DOC_BODY },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aBodyElemTokenMap[] =
+{
+ { XML_NAMESPACE_DRAW, sXML_page, XML_TOK_BODY_PAGE },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aStylesElemTokenMap[] =
+{
+ { XML_NAMESPACE_STYLE, sXML_page_master, XML_TOK_STYLES_PAGE_MASTER },
+ { XML_NAMESPACE_STYLE, sXML_presentation_page_layout, XML_TOK_STYLES_PRESENTATION_PAGE_LAYOUT },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aMasterPageElemTokenMap[] =
+{
+ { XML_NAMESPACE_STYLE, sXML_style, XML_TOK_MASTERPAGE_STYLE },
+ { XML_NAMESPACE_PRESENTATION, sXML_notes, XML_TOK_MASTERPAGE_NOTES },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aMasterPageAttrTokenMap[] =
+{
+ { XML_NAMESPACE_STYLE, sXML_name, XML_TOK_MASTERPAGE_NAME },
+ { XML_NAMESPACE_STYLE, sXML_page_master_name, XML_TOK_MASTERPAGE_PAGE_MASTER_NAME },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aPageMasterAttrTokenMap[] =
+{
+ { XML_NAMESPACE_STYLE, sXML_name, XML_TOK_PAGEMASTER_NAME },
+ { XML_NAMESPACE_FO, sXML_margin_top, XML_TOK_PAGEMASTER_MARGIN_TOP },
+ { XML_NAMESPACE_FO, sXML_margin_bottom, XML_TOK_PAGEMASTER_MARGIN_BOTTOM },
+ { XML_NAMESPACE_FO, sXML_margin_left, XML_TOK_PAGEMASTER_MARGIN_LEFT },
+ { XML_NAMESPACE_FO, sXML_margin_right, XML_TOK_PAGEMASTER_MARGIN_RIGHT },
+ { XML_NAMESPACE_FO, sXML_page_width, XML_TOK_PAGEMASTER_PAGE_WIDTH },
+ { XML_NAMESPACE_FO, sXML_page_height, XML_TOK_PAGEMASTER_PAGE_HEIGHT },
+ { XML_NAMESPACE_FO, sXML_page_orientation, XML_TOK_PAGEMASTER_PAGE_ORIENTATION },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aDrawPageAttrTokenMap[] =
+{
+ { XML_NAMESPACE_DRAW, sXML_name, XML_TOK_DRAWPAGE_NAME },
+ { XML_NAMESPACE_DRAW, sXML_style_name, XML_TOK_DRAWPAGE_STYLE_NAME },
+ { XML_NAMESPACE_DRAW, sXML_master_page_name, XML_TOK_DRAWPAGE_MASTER_PAGE_NAME },
+ { XML_NAMESPACE_PRESENTATION, sXML_presentation_page_layout_name, XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aDrawPageElemTokenMap[] =
+{
+ { XML_NAMESPACE_PRESENTATION, sXML_notes, XML_TOK_DRAWPAGE_NOTES },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aPresentationPlaceholderAttrTokenMap[] =
+{
+ { XML_NAMESPACE_PRESENTATION, sXML_object, XML_TOK_PRESENTATIONPLACEHOLDER_OBJECTNAME },
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_PRESENTATIONPLACEHOLDER_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_PRESENTATIONPLACEHOLDER_Y },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_PRESENTATIONPLACEHOLDER_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_PRESENTATIONPLACEHOLDER_HEIGHT },
+ XML_TOKEN_MAP_END
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+class SdXMLDocContext_Impl : public SvXMLImportContext
+{
+ const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+
+public:
+ SdXMLDocContext_Impl(
+ SdXMLImport& rImport,
+ USHORT nPrfx,
+ const OUString& rLName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList);
+ virtual ~SdXMLDocContext_Impl();
+
+ virtual SvXMLImportContext *CreateChildContext(USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLDocContext_Impl::SdXMLDocContext_Impl(
+ SdXMLImport& rImport,
+ USHORT nPrfx,
+ const OUString& rLName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+: SvXMLImportContext(rImport, nPrfx, rLName)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLDocContext_Impl::~SdXMLDocContext_Impl()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext *SdXMLDocContext_Impl::CreateChildContext(
+ USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ SvXMLImportContext* pContext = 0L;
+
+ const SvXMLTokenMap& rTokenMap = GetSdImport().GetDocElemTokenMap();
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ case XML_TOK_DOC_STYLES:
+ {
+ // office:styles inside office:document
+ pContext = GetSdImport().CreateStylesContext(rLocalName, xAttrList);
+ break;
+ }
+ case XML_TOK_DOC_AUTOSTYLES:
+ {
+ // office:automatic-styles inside office:document
+ pContext = GetSdImport().CreateAutoStylesContext(rLocalName, xAttrList);
+ break;
+ }
+ case XML_TOK_DOC_MASTERSTYLES:
+ {
+ // office:master-styles inside office:document
+ pContext = GetSdImport().CreateMasterStylesContext(rLocalName, xAttrList);
+ break;
+ }
+ case XML_TOK_DOC_META:
+ {
+ // office:meta inside office:document
+ pContext = GetSdImport().CreateMetaContext(rLocalName, xAttrList);
+ break;
+ }
+ case XML_TOK_DOC_BODY:
+ {
+ // office:body inside office:document
+ pContext = GetSdImport().CreateBodyContext(rLocalName, xAttrList);
+ break;
+ }
+ }
+
+ // call parent when no own context was created
+ if(!pContext)
+ pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList);
+
+ return pContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLImport::SdXMLImport(
+ uno::Reference<frame::XModel>& rMod,
+ BOOL bLDoc,
+ UINT16 nStyleFamMask,
+ BOOL bShowProgr,
+ BOOL bIsDraw)
+: SvXMLImport(rMod),
+ mpMasterStylesContext(0L),
+ mpDocElemTokenMap(0L),
+ mpBodyElemTokenMap(0L),
+ mpStylesElemTokenMap(0L),
+ mpMasterPageElemTokenMap(0L),
+ mpMasterPageAttrTokenMap(0L),
+ mpPageMasterAttrTokenMap(0L),
+ mpDrawPageAttrTokenMap(0L),
+ mpDrawPageElemTokenMap(0L),
+ mpPresentationPlaceholderAttrTokenMap(0L),
+ mnStyleFamilyMask(nStyleFamMask),
+ mnNewPageCount(0L),
+ mnNewMasterPageCount(0L),
+ mbLoadDoc(bLDoc),
+ mbIsDraw(bIsDraw)
+{
+ // prepare access to styles
+ uno::Reference< style::XStyleFamiliesSupplier > xFamSup( GetModel(), uno::UNO_QUERY );
+ if(xFamSup.is())
+ {
+ mxDocStyleFamilies = xFamSup->getStyleFamilies();
+ }
+
+ // prepare access to master pages
+ uno::Reference < drawing::XMasterPagesSupplier > xMasterPagesSupplier(GetModel(), uno::UNO_QUERY);
+ if(xMasterPagesSupplier.is())
+ {
+ mxDocMasterPages = mxDocMasterPages.query( xMasterPagesSupplier->getMasterPages() );
+ }
+
+ // prepare access to draw pages
+ uno::Reference <drawing::XDrawPagesSupplier> xDrawPagesSupplier(GetModel(), uno::UNO_QUERY);
+ if(xDrawPagesSupplier.is())
+ {
+ mxDocDrawPages = mxDocDrawPages.query( xDrawPagesSupplier->getDrawPages() );
+ }
+
+ // add namespaces
+ GetNamespaceMap().AddAtIndex(
+ XML_NAMESPACE_PRESENTATION, sXML_np_presentation, sXML_n_presentation, XML_NAMESPACE_PRESENTATION);
+
+ // get status indicator (if intended)
+ if(bShowProgr)
+ {
+ uno::Reference<frame::XController> xController(rMod->getCurrentController());
+ if(xController.is())
+ {
+ uno::Reference<frame::XFrame> xFrame(xController->getFrame());
+ if(xFrame.is())
+ {
+ uno::Reference<task::XStatusIndicatorSupplier> xFactory(xFrame, uno::UNO_QUERY);
+ if(xFactory.is())
+ {
+ mxStatusIndicator = xFactory->getStatusIndicator();
+ }
+ }
+ }
+ }
+
+ // add progress view
+ if(mxStatusIndicator.is())
+ {
+ const OUString aText(RTL_CONSTASCII_USTRINGPARAM("XML Import"));
+ mxStatusIndicator->start(aText, 100);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLImport::~SdXMLImport()
+{
+ // stop progress view
+ if(mxStatusIndicator.is())
+ {
+ mxStatusIndicator->end();
+ mxStatusIndicator->reset();
+ }
+
+ // Styles or AutoStyles context?
+ if(mpMasterStylesContext)
+ mpMasterStylesContext->ReleaseRef();
+
+ // delete all token maps
+ if(mpDocElemTokenMap)
+ delete mpDocElemTokenMap;
+ if(mpBodyElemTokenMap)
+ delete mpBodyElemTokenMap;
+ if(mpStylesElemTokenMap)
+ delete mpStylesElemTokenMap;
+ if(mpMasterPageElemTokenMap)
+ delete mpMasterPageElemTokenMap;
+ if(mpMasterPageAttrTokenMap)
+ delete mpMasterPageAttrTokenMap;
+ if(mpPageMasterAttrTokenMap)
+ delete mpPageMasterAttrTokenMap;
+ if(mpDrawPageAttrTokenMap)
+ delete mpDrawPageAttrTokenMap;
+ if(mpDrawPageElemTokenMap)
+ delete mpDrawPageElemTokenMap;
+ if(mpPresentationPlaceholderAttrTokenMap)
+ delete mpPresentationPlaceholderAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLImport::SetProgress(sal_Int32 nProg)
+{
+ // set progress view
+ if(mxStatusIndicator.is())
+ mxStatusIndicator->setValue(nProg);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+const SvXMLTokenMap& SdXMLImport::GetDocElemTokenMap()
+{
+ if(!mpDocElemTokenMap)
+ mpDocElemTokenMap = new SvXMLTokenMap(aDocElemTokenMap);
+ return *mpDocElemTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+const SvXMLTokenMap& SdXMLImport::GetBodyElemTokenMap()
+{
+ if(!mpBodyElemTokenMap)
+ mpBodyElemTokenMap = new SvXMLTokenMap(aBodyElemTokenMap);
+ return *mpBodyElemTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+const SvXMLTokenMap& SdXMLImport::GetStylesElemTokenMap()
+{
+ if(!mpStylesElemTokenMap)
+ mpStylesElemTokenMap = new SvXMLTokenMap(aStylesElemTokenMap);
+ return *mpStylesElemTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+const SvXMLTokenMap& SdXMLImport::GetMasterPageElemTokenMap()
+{
+ if(!mpMasterPageElemTokenMap)
+ mpMasterPageElemTokenMap = new SvXMLTokenMap(aMasterPageElemTokenMap);
+ return *mpMasterPageElemTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+const SvXMLTokenMap& SdXMLImport::GetMasterPageAttrTokenMap()
+{
+ if(!mpMasterPageAttrTokenMap)
+ mpMasterPageAttrTokenMap = new SvXMLTokenMap(aMasterPageAttrTokenMap);
+ return *mpMasterPageAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+const SvXMLTokenMap& SdXMLImport::GetPageMasterAttrTokenMap()
+{
+ if(!mpPageMasterAttrTokenMap)
+ mpPageMasterAttrTokenMap = new SvXMLTokenMap(aPageMasterAttrTokenMap);
+ return *mpPageMasterAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+const SvXMLTokenMap& SdXMLImport::GetDrawPageAttrTokenMap()
+{
+ if(!mpDrawPageAttrTokenMap)
+ mpDrawPageAttrTokenMap = new SvXMLTokenMap(aDrawPageAttrTokenMap);
+ return *mpDrawPageAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+const SvXMLTokenMap& SdXMLImport::GetDrawPageElemTokenMap()
+{
+ if(!mpDrawPageElemTokenMap)
+ mpDrawPageElemTokenMap = new SvXMLTokenMap(aDrawPageElemTokenMap);
+ return *mpDrawPageElemTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+const SvXMLTokenMap& SdXMLImport::GetPresentationPlaceholderAttrTokenMap()
+{
+ if(!mpPresentationPlaceholderAttrTokenMap)
+ mpPresentationPlaceholderAttrTokenMap = new SvXMLTokenMap(aPresentationPlaceholderAttrTokenMap);
+ return *mpPresentationPlaceholderAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext *SdXMLImport::CreateContext(USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ SvXMLImportContext* pContext = 0;
+
+ if(XML_NAMESPACE_OFFICE == nPrefix && 0 == rLocalName.compareToAscii(sXML_document))
+ {
+ pContext = new SdXMLDocContext_Impl(*this, nPrefix, rLocalName, xAttrList);
+ }
+ else
+ {
+ pContext = SvXMLImport::CreateContext(nPrefix, rLocalName, xAttrList);
+ }
+
+ return pContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ SvXMLImportContext* pContext = 0L;
+
+ if(!IsStylesOnlyMode())
+ {
+ uno::Reference<document::XDocumentInfoSupplier> xSupp(GetModel(), uno::UNO_QUERY);
+
+ if(xSupp.is())
+ {
+ pContext = new SfxXMLMetaContext(*this,
+ XML_NAMESPACE_OFFICE, rLocalName, GetModel());
+ }
+ }
+
+ if(!pContext)
+ {
+ pContext = new SvXMLImportContext(*this, XML_NAMESPACE_OFFICE, rLocalName);
+ }
+
+ return pContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext *SdXMLImport::CreateBodyContext(const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ SvXMLImportContext *pContext = 0;
+ pContext = new SdXMLBodyContext(*this, XML_NAMESPACE_OFFICE, rLocalName);
+ return pContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLStylesContext *SdXMLImport::CreateStylesContext(const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ if(GetShapeImport()->GetStylesContext())
+ return GetShapeImport()->GetStylesContext();
+
+ GetShapeImport()->SetStylesContext(new SdXMLStylesContext(
+ *this, XML_NAMESPACE_OFFICE, rLocalName, xAttrList, FALSE));
+
+ return GetShapeImport()->GetStylesContext();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLStylesContext *SdXMLImport::CreateAutoStylesContext(const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ if(GetShapeImport()->GetAutoStylesContext())
+ return GetShapeImport()->GetAutoStylesContext();
+
+ GetShapeImport()->SetAutoStylesContext(new SdXMLStylesContext(
+ *this, XML_NAMESPACE_OFFICE, rLocalName, xAttrList, TRUE));
+
+ return GetShapeImport()->GetAutoStylesContext();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext* SdXMLImport::CreateMasterStylesContext(const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList)
+{
+ if(mpMasterStylesContext)
+ return mpMasterStylesContext;
+
+ mpMasterStylesContext = new SdXMLMasterStylesContext(
+ *this, XML_NAMESPACE_OFFICE, rLocalName);
+ mpMasterStylesContext->AddRef();
+
+ return mpMasterStylesContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// import pool defaults. Parameter contains pool defaults read
+// from input data. These data needs to be set at the model.
+//
+void SdXMLImport::ImportPoolDefaults(const XMLPropStyleContext* pPool)
+{
+}
+
+
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
new file mode 100644
index 0000000000..f441c5a604
--- /dev/null
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -0,0 +1,234 @@
+/*************************************************************************
+ *
+ * $RCSfile: shapeexport.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _COM_SUN_STAR_TEXT_XTEXT_HPP_
+#include <com/sun/star/text/XText.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CHART_XCHARTDOCUMENT_HPP_
+#include <com/sun/star/chart/XChartDocument.hpp>
+#endif
+
+#ifndef _XMLOFF_SHAPEEXPORT_HXX
+#include "shapeexport.hxx"
+#endif
+
+#ifndef _SDPROPLS_HXX
+#include "sdpropls.hxx"
+#endif
+
+#ifndef _SDXMLEXP_HXX
+#include "sdxmlexp.hxx"
+#endif
+
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+XMLShapeExport::XMLShapeExport(SvXMLExport& rExp)
+: rExport( rExp )
+{
+ // construct PropertyHandlerFactory
+ xSdPropHdlFactory = new XMLSdPropHdlFactory;
+
+ // construct PropertySetMapper
+ xPropertySetMapper = new XMLPropertySetMapper(
+ (XMLPropertyMapEntry*)aXMLSDProperties, xSdPropHdlFactory);
+
+ rExp.GetAutoStylePool()->AddFamily(
+ XML_STYLE_FAMILY_SD_GRAPHICS_ID,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)),
+ GetPropertySetMapper(),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX)));
+ rExp.GetAutoStylePool()->AddFamily(
+ XML_STYLE_FAMILY_SD_PRESENTATION_ID,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_NAME)),
+ GetPropertySetMapper(),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_PREFIX)));
+}
+
+XMLShapeExport::~XMLShapeExport()
+{
+}
+
+// This method collects all automatic styles for the given XShape
+void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShape >& xShape)
+{
+ uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ // filter propset
+ OUString aParentName; // parent maybe the pool in later versions
+ OUString aNewName;
+ std::vector< XMLPropertyState > xPropStates = GetPropertySetMapper()->Filter( xPropSet );
+
+ if(xPropStates.size())
+ {
+ // there are filtered properties -> hard attributes
+ // try to find this style in AutoStylePool
+ aNewName = GetExport().GetAutoStylePool()->Find(
+ XML_STYLE_FAMILY_SD_GRAPHICS_ID, aParentName, xPropStates);
+
+ if(!aNewName.getLength())
+ {
+ // Style did not exist, add it to AutoStalePool
+ GetExport().GetAutoStylePool()->Add(
+ XML_STYLE_FAMILY_SD_GRAPHICS_ID, aParentName, xPropStates);
+ }
+ }
+ }
+
+ // prep text styles
+ uno::Reference< text::XText > xText(xShape, uno::UNO_QUERY);
+ if(xText.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
+
+ sal_Bool bIsEmptyPresObj = sal_False;
+
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject"))))
+ {
+ uno::Any aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject")));
+ aAny >>= bIsEmptyPresObj;
+ }
+
+ if(!bIsEmptyPresObj)
+ {
+ GetExport().GetTextParagraphExport()->collectTextAutoStyles( xText );
+ }
+ }
+
+ // check for calc ole
+ const OUString aShapeType( xShape->getShapeType() );
+ if( (0 == aShapeType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.OLE2Shape" ))) ||
+ (0 == aShapeType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.CalcShape" ))) )
+ {
+ uno::Reference< chart::XChartDocument > xChartDoc;
+ uno::Any aAny( xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ) ) );
+ aAny >>= xChartDoc;
+ if( xChartDoc.is() )
+ {
+ GetExport().GetChartExport()->collectAutoStyles( xChartDoc );
+ }
+ }
+}
+
+// This method exports the given XShape
+void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape)
+{
+ uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ OUString aParentName; // parent maybe the pool in later versions
+ OUString aNewName;
+ std::vector< XMLPropertyState > xPropStates( GetPropertySetMapper()->Filter( xPropSet ) );
+
+ if(xPropStates.size())
+ aNewName = GetExport().GetAutoStylePool()->Find(
+ XML_STYLE_FAMILY_SD_GRAPHICS_ID, aParentName, xPropStates);
+
+ DBG_ASSERT(aNewName.getLength(), "XMLEXP: xShape without style name(!)");
+ XmlShapeType eShapeType(XmlShapeTypeNotYetSet);
+
+ SdXMLExport::ImpCalcShapeType(xShape, eShapeType);
+ SdXMLExport::ImpWriteSingleShapeStyleInfo(GetExport(), xShape,
+ XML_STYLE_FAMILY_SD_GRAPHICS_ID, aNewName, eShapeType);
+ }
+}
+
+void XMLShapeExport::exportAutoStyles()
+{
+ // export all autostyle infos
+ const UniReference< XMLPropertySetMapper > aMapperRef( GetPropertySetMapper() );
+ SvXMLExportPropertyMapper aExpPropMapper(aMapperRef);
+
+ // ...for graphic
+// if(IsFamilyGraphicUsed())
+ {
+ GetExport().GetAutoStylePool()->exportXML(
+ XML_STYLE_FAMILY_SD_GRAPHICS_ID,
+ aExpPropMapper,
+ GetExport().GetDocHandler(),
+ GetExport().GetMM100UnitConverter(),
+ GetExport().GetNamespaceMap());
+ }
+
+ // ...for presentation
+// if(IsFamilyPresentationUsed())
+ {
+ GetExport().GetAutoStylePool()->exportXML(
+ XML_STYLE_FAMILY_SD_PRESENTATION_ID,
+ aExpPropMapper,
+ GetExport().GetDocHandler(),
+ GetExport().GetMM100UnitConverter(),
+ GetExport().GetNamespaceMap());
+ }
+}
+
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
new file mode 100644
index 0000000000..7fd4997d37
--- /dev/null
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -0,0 +1,589 @@
+/*************************************************************************
+ *
+ * $RCSfile: shapeimport.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _COM_SUN_STAR_CHART_XCHARTDOCUMENT_HPP_
+#include <com/sun/star/chart/XChartDocument.hpp>
+#endif
+
+#ifndef _XMLOFF_SHAPEIMPORT_HXX
+#include "shapeimport.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XIMPSTYLE_HXX
+#include "ximpstyl.hxx"
+#endif
+
+#ifndef _XIMPSHAPE_HXX
+#include "ximpshap.hxx"
+#endif
+
+#ifndef _SDPROPLS_HXX
+#include "sdpropls.hxx"
+#endif
+
+#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
+#include "xmlprmap.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+XMLShapeImportHelper::XMLShapeImportHelper(const uno::Reference< frame::XModel>& rModel)
+: mxModel(rModel),
+ mpSdPropHdlFactory(0L),
+ mpPropertySetMapper(0L),
+ mpPresPagePropsMapper(0L),
+ mpStylesContext(0L),
+ mpAutoStylesContext(0L),
+ mpGroupShapeElemTokenMap(0L),
+ mpShapeAttrTokenMap(0L),
+ mpRectShapeAttrTokenMap(0L),
+ mpLineShapeAttrTokenMap(0L),
+ mpEllipseShapeAttrTokenMap(0L),
+ mpPolygonShapeAttrTokenMap(0L),
+ mpPathShapeAttrTokenMap(0L),
+ mpTextBoxShapeAttrTokenMap(0L),
+ mpControlShapeAttrTokenMap(0L),
+ mpPageShapeAttrTokenMap(0L),
+ mpGraphicObjectShapeAttrTokenMap(0L)
+{
+ // prepare factory parts
+ mpSdPropHdlFactory = new XMLSdPropHdlFactory;
+ if(mpSdPropHdlFactory)
+ {
+ // set lock to avoid deletion
+ mpSdPropHdlFactory->acquire();
+
+ // build one ref
+ const UniReference< XMLPropertyHandlerFactory > aFactoryRef = mpSdPropHdlFactory;
+
+ // construct PropertySetMapper
+ mpPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDProperties, aFactoryRef);
+ if(mpPropertySetMapper)
+ {
+ // set lock to avoid deletion
+ mpPropertySetMapper->acquire();
+ }
+
+ // construct PresPagePropsMapper
+ mpPresPagePropsMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, aFactoryRef);
+ if(mpPresPagePropsMapper)
+ {
+ // set lock to avoid deletion
+ mpPresPagePropsMapper->acquire();
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+XMLShapeImportHelper::~XMLShapeImportHelper()
+{
+ // cleanup factory, decrease refcount. Should lead to destruction.
+ if(mpSdPropHdlFactory)
+ {
+ mpSdPropHdlFactory->release();
+ mpSdPropHdlFactory = 0L;
+ }
+
+ // cleanup mapper, decrease refcount. Should lead to destruction.
+ if(mpPropertySetMapper)
+ {
+ mpPropertySetMapper->release();
+ mpPropertySetMapper = 0L;
+ }
+
+ // cleanup presPage mapper, decrease refcount. Should lead to destruction.
+ if(mpPresPagePropsMapper)
+ {
+ mpPresPagePropsMapper->release();
+ mpPresPagePropsMapper = 0L;
+ }
+
+ if(mpGroupShapeElemTokenMap) delete mpGroupShapeElemTokenMap;
+ if(mpShapeAttrTokenMap) delete mpShapeAttrTokenMap;
+ if(mpRectShapeAttrTokenMap) delete mpRectShapeAttrTokenMap;
+ if(mpLineShapeAttrTokenMap) delete mpLineShapeAttrTokenMap;
+ if(mpEllipseShapeAttrTokenMap) delete mpEllipseShapeAttrTokenMap;
+ if(mpPolygonShapeAttrTokenMap) delete mpPolygonShapeAttrTokenMap;
+ if(mpPathShapeAttrTokenMap) delete mpPathShapeAttrTokenMap;
+ if(mpTextBoxShapeAttrTokenMap) delete mpTextBoxShapeAttrTokenMap;
+ if(mpControlShapeAttrTokenMap) delete mpControlShapeAttrTokenMap;
+ if(mpPageShapeAttrTokenMap) delete mpPageShapeAttrTokenMap;
+ if(mpGraphicObjectShapeAttrTokenMap) delete mpGraphicObjectShapeAttrTokenMap;
+
+ // Styles or AutoStyles context?
+ if(mpStylesContext)
+ mpStylesContext->ReleaseRef();
+ if(mpAutoStylesContext)
+ mpAutoStylesContext->ReleaseRef();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aGroupShapeElemTokenMap[] =
+{
+ { XML_NAMESPACE_DRAW, sXML_g, XML_TOK_GROUP_GROUP },
+ { XML_NAMESPACE_DRAW, sXML_rect, XML_TOK_GROUP_RECT },
+ { XML_NAMESPACE_DRAW, sXML_line, XML_TOK_GROUP_LINE },
+ { XML_NAMESPACE_DRAW, sXML_circle, XML_TOK_GROUP_CIRCLE },
+ { XML_NAMESPACE_DRAW, sXML_ellipse, XML_TOK_GROUP_ELLIPSE },
+ { XML_NAMESPACE_DRAW, sXML_polygon, XML_TOK_GROUP_POLYGON },
+ { XML_NAMESPACE_DRAW, sXML_polyline, XML_TOK_GROUP_POLYLINE },
+ { XML_NAMESPACE_DRAW, sXML_path, XML_TOK_GROUP_PATH },
+ { XML_NAMESPACE_TEXT, sXML_text_box, XML_TOK_GROUP_TEXT_BOX },
+
+ { XML_NAMESPACE_DRAW, sXML_control, XML_TOK_GROUP_CONTROL },
+ { XML_NAMESPACE_DRAW, sXML_connector, XML_TOK_GROUP_CONNECTOR },
+ { XML_NAMESPACE_DRAW, sXML_measure, XML_TOK_GROUP_MEASURE },
+ { XML_NAMESPACE_DRAW, sXML_page, XML_TOK_GROUP_PAGE },
+ { XML_NAMESPACE_DRAW, sXML_caption, XML_TOK_GROUP_CAPTION },
+
+ { XML_NAMESPACE_CHART, sXML_chart, XML_TOK_GROUP_CHART },
+ { XML_NAMESPACE_OFFICE, sXML_image, XML_TOK_GROUP_IMAGE },
+// { XML_NAMESPACE_DRAW, sXML_3DCube, XML_TOK_GROUP_3D_CUBE },
+// { XML_NAMESPACE_DRAW, sXML_3DSphere, XML_TOK_GROUP_3D_SPHERE },
+// { XML_NAMESPACE_DRAW, sXML_3DLathe, XML_TOK_GROUP_3D_LATHE },
+// { XML_NAMESPACE_DRAW, sXML_3DExtrude, XML_TOK_GROUP_3D_EXTRUDE },
+// { XML_NAMESPACE_DRAW, sXML_3DPolygon, XML_TOK_GROUP_3D_POLYGON },
+
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetGroupShapeElemTokenMap()
+{
+ if(!mpGroupShapeElemTokenMap)
+ mpGroupShapeElemTokenMap = new SvXMLTokenMap(aGroupShapeElemTokenMap);
+ return *mpGroupShapeElemTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aShapeAttrTokenMap[] =
+{
+ { XML_NAMESPACE_DRAW, sXML_style_name, XML_TOK_SHAPE_DRAWSTYLE_NAME_GRAPHICS },
+ { XML_NAMESPACE_PRESENTATION, sXML_class, XML_TOK_SHAPE_PRESENTATION_CLASS },
+ { XML_NAMESPACE_PRESENTATION, sXML_style_name, XML_TOK_SHAPE_DRAWSTYLE_NAME_PRESENTATION },
+ { XML_NAMESPACE_SVG, sXML_transform, XML_TOK_SHAPE_TRANSFORM },
+ { XML_NAMESPACE_PRESENTATION, sXML_placeholder, XML_TOK_SHAPE_IS_PLACEHOLDER },
+ { XML_NAMESPACE_PRESENTATION, sXML_user_transformed, XML_TOK_SHAPE_IS_USER_TRANSFORMED },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetShapeAttrTokenMap()
+{
+ if(!mpShapeAttrTokenMap)
+ mpShapeAttrTokenMap = new SvXMLTokenMap(aShapeAttrTokenMap);
+ return *mpShapeAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aRectShapeAttrTokenMap[] =
+{
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_RECTSHAPE_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_RECTSHAPE_Y },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_RECTSHAPE_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_RECTSHAPE_HEIGHT },
+ { XML_NAMESPACE_DRAW, sXML_corner_radius, XML_TOK_RECTSHAPE_CORNER_RADIUS },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetRectShapeAttrTokenMap()
+{
+ if(!mpRectShapeAttrTokenMap)
+ mpRectShapeAttrTokenMap = new SvXMLTokenMap(aRectShapeAttrTokenMap);
+ return *mpRectShapeAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aLineShapeAttrTokenMap[] =
+{
+ { XML_NAMESPACE_SVG, sXML_x1, XML_TOK_LINESHAPE_X1 },
+ { XML_NAMESPACE_SVG, sXML_y1, XML_TOK_LINESHAPE_Y1 },
+ { XML_NAMESPACE_SVG, sXML_x2, XML_TOK_LINESHAPE_X2 },
+ { XML_NAMESPACE_SVG, sXML_y2, XML_TOK_LINESHAPE_Y2 },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetLineShapeAttrTokenMap()
+{
+ if(!mpLineShapeAttrTokenMap)
+ mpLineShapeAttrTokenMap = new SvXMLTokenMap(aLineShapeAttrTokenMap);
+ return *mpLineShapeAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aEllipseShapeAttrTokenMap[] =
+{
+ { XML_NAMESPACE_SVG, sXML_rx, XML_TOK_ELLIPSESHAPE_RX },
+ { XML_NAMESPACE_SVG, sXML_ry, XML_TOK_ELLIPSESHAPE_RY },
+ { XML_NAMESPACE_SVG, sXML_cx, XML_TOK_ELLIPSESHAPE_CX },
+ { XML_NAMESPACE_SVG, sXML_cy, XML_TOK_ELLIPSESHAPE_CY },
+ { XML_NAMESPACE_SVG, sXML_r, XML_TOK_ELLIPSESHAPE_R },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetEllipseShapeAttrTokenMap()
+{
+ if(!mpEllipseShapeAttrTokenMap)
+ mpEllipseShapeAttrTokenMap = new SvXMLTokenMap(aEllipseShapeAttrTokenMap);
+ return *mpEllipseShapeAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aPolygonShapeAttrTokenMap[] =
+{
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_POLYGONSHAPE_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_POLYGONSHAPE_Y },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_POLYGONSHAPE_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_POLYGONSHAPE_HEIGHT },
+ { XML_NAMESPACE_SVG, sXML_viewBox, XML_TOK_POLYGONSHAPE_VIEWBOX },
+ { XML_NAMESPACE_SVG, sXML_points, XML_TOK_POLYGONSHAPE_POINTS },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetPolygonShapeAttrTokenMap()
+{
+ if(!mpPolygonShapeAttrTokenMap)
+ mpPolygonShapeAttrTokenMap = new SvXMLTokenMap(aPolygonShapeAttrTokenMap);
+ return *mpPolygonShapeAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aPathShapeAttrTokenMap[] =
+{
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_PATHSHAPE_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_PATHSHAPE_Y },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_PATHSHAPE_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_PATHSHAPE_HEIGHT },
+ { XML_NAMESPACE_SVG, sXML_viewBox, XML_TOK_PATHSHAPE_VIEWBOX },
+ { XML_NAMESPACE_SVG, sXML_d, XML_TOK_PATHSHAPE_D },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetPathShapeAttrTokenMap()
+{
+ if(!mpPathShapeAttrTokenMap)
+ mpPathShapeAttrTokenMap = new SvXMLTokenMap(aPathShapeAttrTokenMap);
+ return *mpPathShapeAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aTextBoxShapeAttrTokenMap[] =
+{
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_TEXTBOXSHAPE_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_TEXTBOXSHAPE_Y },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_TEXTBOXSHAPE_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_TEXTBOXSHAPE_HEIGHT },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetTextBoxShapeAttrTokenMap()
+{
+ if(!mpTextBoxShapeAttrTokenMap)
+ mpTextBoxShapeAttrTokenMap = new SvXMLTokenMap(aTextBoxShapeAttrTokenMap);
+ return *mpTextBoxShapeAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aControlShapeAttrTokenMap[] =
+{
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_CONTROLSHAPE_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_CONTROLSHAPE_Y },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_CONTROLSHAPE_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_CONTROLSHAPE_HEIGHT },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetControlShapeAttrTokenMap()
+{
+ if(!mpControlShapeAttrTokenMap)
+ mpControlShapeAttrTokenMap = new SvXMLTokenMap(aControlShapeAttrTokenMap);
+ return *mpControlShapeAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aPageShapeAttrTokenMap[] =
+{
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_PAGESHAPE_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_PAGESHAPE_Y },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_PAGESHAPE_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_PAGESHAPE_HEIGHT },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetPageShapeAttrTokenMap()
+{
+ if(!mpPageShapeAttrTokenMap)
+ mpPageShapeAttrTokenMap = new SvXMLTokenMap(aPageShapeAttrTokenMap);
+ return *mpPageShapeAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+static __FAR_DATA SvXMLTokenMapEntry aGraphicObjectShapeAttrTokenMap[] =
+{
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_GOSHAPE_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_GOSHAPE_Y },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_GOSHAPE_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_GOSHAPE_HEIGHT },
+ { XML_NAMESPACE_XLINK, sXML_href, XML_TOK_GOSHAPE_URL },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLShapeImportHelper::GetGraphicObjectShapeAttrTokenMap()
+{
+ if(!mpGraphicObjectShapeAttrTokenMap)
+ mpGraphicObjectShapeAttrTokenMap = new SvXMLTokenMap(aGraphicObjectShapeAttrTokenMap);
+ return *mpGraphicObjectShapeAttrTokenMap;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void XMLShapeImportHelper::SetStylesContext(SvXMLStylesContext* pNew)
+{
+ mpStylesContext = pNew;
+ mpStylesContext->AddRef();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void XMLShapeImportHelper::SetAutoStylesContext(SvXMLStylesContext* pNew)
+{
+ mpAutoStylesContext = pNew;
+ mpAutoStylesContext->AddRef();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext* XMLShapeImportHelper::CreateGroupChildContext(
+ SvXMLImport& rImport,
+ USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+{
+ SvXMLImportContext *pContext = 0L;
+
+ if(rShapes.is())
+ {
+ const SvXMLTokenMap& rTokenMap = GetGroupShapeElemTokenMap();
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ sal_Bool bIsPlaceholder(FALSE);
+ OUString aPresentationObjectClass;
+
+ for(sal_Int16 a(0); a < nAttrCount; a++)
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex(a);
+ OUString aLocalName;
+ sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(rAttrName, &aLocalName);
+
+ if(XML_NAMESPACE_PRESENTATION == nPrefix)
+ {
+ if(aLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_placeholder))))
+ {
+ bIsPlaceholder = TRUE;
+ }
+ else if(aLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_class))))
+ {
+ aPresentationObjectClass = xAttrList->getValueByIndex(a);
+ }
+ }
+ }
+
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ case XML_TOK_GROUP_GROUP:
+ {
+ // draw:g inside group context (RECURSIVE)
+ // create new group shape and add it to rShapes, use it
+ // as base for the new group import
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(mxModel, uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape(
+ xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GroupShape"))),
+ uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ rShapes->add( xShape );
+
+ uno::Reference< drawing::XShapes > xNewShapes(xShape, uno::UNO_QUERY);
+ if(xNewShapes.is())
+ {
+ pContext = new SdXMLGroupShapeContext( rImport, nPrefix, rLocalName, xNewShapes);
+ }
+ }
+ }
+ break;
+ }
+ case XML_TOK_GROUP_RECT:
+ {
+ // draw:rect inside group context
+ pContext = new SdXMLRectShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+ case XML_TOK_GROUP_LINE:
+ {
+ // draw:line inside group context
+ pContext = new SdXMLLineShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+ case XML_TOK_GROUP_CIRCLE:
+ case XML_TOK_GROUP_ELLIPSE:
+ {
+ // draw:circle or draw:ellipse inside group context
+ pContext = new SdXMLEllipseShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+ case XML_TOK_GROUP_POLYGON:
+ case XML_TOK_GROUP_POLYLINE:
+ {
+ // draw:polygon or draw:polyline inside group context
+ pContext = new SdXMLPolygonShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes,
+ rTokenMap.Get(nPrefix, rLocalName) == XML_TOK_GROUP_POLYGON ? TRUE : FALSE );
+ break;
+ }
+ case XML_TOK_GROUP_PATH:
+ {
+ // draw:path inside group context
+ pContext = new SdXMLPathShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes);
+ break;
+ }
+ case XML_TOK_GROUP_TEXT_BOX:
+ {
+ // text:text-box inside group context
+ pContext = new SdXMLTextBoxShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+ case XML_TOK_GROUP_CONTROL:
+ {
+ // draw:control inside group context
+ pContext = new SdXMLControlShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+ case XML_TOK_GROUP_CONNECTOR:
+ {
+ // draw:connector inside group context
+ pContext = new SdXMLConnectorShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+ case XML_TOK_GROUP_MEASURE:
+ {
+ // draw:measure inside group context
+ pContext = new SdXMLMeasureShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+ case XML_TOK_GROUP_PAGE:
+ {
+ // draw:page inside group context
+ pContext = new SdXMLPageShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+ case XML_TOK_GROUP_CAPTION:
+ {
+ // draw:caption inside group context
+ pContext = new SdXMLCaptionShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+ case XML_TOK_GROUP_CHART:
+ {
+ // chart:chart inside group context
+ pContext = new SdXMLChartShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+ case XML_TOK_GROUP_IMAGE:
+ {
+ // office:image inside group context
+ pContext = new SdXMLGraphicObjectShapeContext( rImport, nPrefix, rLocalName, xAttrList, rShapes );
+ break;
+ }
+
+ // add other shapes here...
+ }
+ }
+
+ return pContext;
+}
+
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
new file mode 100644
index 0000000000..ec3352fdd3
--- /dev/null
+++ b/xmloff/source/draw/xexptran.cxx
@@ -0,0 +1,1661 @@
+/*************************************************************************
+ *
+ * $RCSfile: xexptran.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _XEXPTRANSFORM_HXX
+#include "xexptran.hxx"
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+// possible object types
+
+#define IMP_SDXMLEXP_OBJ_ROTATE 0x0000
+#define IMP_SDXMLEXP_OBJ_SCALE 0x0001
+#define IMP_SDXMLEXP_OBJ_TRANSLATE 0x0002
+#define IMP_SDXMLEXP_OBJ_SKEWX 0x0003
+#define IMP_SDXMLEXP_OBJ_SKEWY 0x0004
+#define IMP_SDXMLEXP_OBJ_MATRIX 0x0005
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// parsing help functions, no class
+void Imp_SkipSpaces(const UniString& rStr, xub_StrLen& rPos, const xub_StrLen nLen)
+{
+ while(rPos < nLen
+ && sal_Unicode(' ') == rStr.GetChar(rPos))
+ rPos++;
+}
+
+void Imp_SkipSpacesAndOpeningBraces(const UniString& rStr, xub_StrLen& rPos, const xub_StrLen nLen)
+{
+ while(rPos < nLen
+ && (sal_Unicode(' ') == rStr.GetChar(rPos) || sal_Unicode('(') == rStr.GetChar(rPos)))
+ rPos++;
+}
+
+void Imp_SkipSpacesAndCommas(const UniString& rStr, xub_StrLen& rPos, const xub_StrLen nLen)
+{
+ while(rPos < nLen
+ && (sal_Unicode(' ') == rStr.GetChar(rPos) || sal_Unicode(',') == rStr.GetChar(rPos)))
+ rPos++;
+}
+
+void Imp_SkipSpacesAndClosingBraces(const UniString& rStr, xub_StrLen& rPos, const xub_StrLen nLen)
+{
+ while(rPos < nLen
+ && (sal_Unicode(' ') == rStr.GetChar(rPos) || sal_Unicode(')') == rStr.GetChar(rPos)))
+ rPos++;
+}
+
+sal_Bool Imp_IsOnNumberChar(const UniString& rStr, const xub_StrLen nPos,
+ BOOL bSignIsNumber = TRUE, BOOL bPointIsNumber = FALSE)
+{
+ sal_Unicode aChar(rStr.GetChar(nPos));
+
+ if((sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar)
+ || (bSignIsNumber && (sal_Unicode('-') == aChar || sal_Unicode('+') == aChar))
+ || (bPointIsNumber && sal_Unicode('.') == aChar)
+ )
+ return TRUE;
+ return FALSE;
+}
+
+void Imp_SkipNumber(const UniString& rStr, xub_StrLen& rPos, const xub_StrLen nLen,
+ BOOL bSignIsNumber = TRUE, BOOL bPointIsNumber = FALSE)
+{
+ sal_Bool bFirstSign(TRUE);
+
+ while(rPos < nLen && Imp_IsOnNumberChar(rStr, rPos, bSignIsNumber && bFirstSign, bPointIsNumber))
+ {
+ rPos++;
+ bFirstSign = FALSE;
+ }
+}
+
+double Imp_GetNumberChar(const UniString& rStr, xub_StrLen& rPos, const xub_StrLen nLen,
+ const SvXMLUnitConverter& rConv, double fRetval,
+ BOOL bSignIsNumber = TRUE, BOOL bPointIsNumber = FALSE)
+{
+ UniString aNumberStr;
+ sal_Int32 nNum(0L);
+ sal_Bool bFirstSign(TRUE);
+
+ while(rPos < nLen && Imp_IsOnNumberChar(rStr, rPos, bSignIsNumber && bFirstSign, !bPointIsNumber))
+ {
+ aNumberStr.Append(rStr.GetChar(rPos++));
+ bFirstSign = FALSE;
+ }
+
+ if(aNumberStr.Len())
+ {
+ rConv.convertNumber(nNum, OUString(aNumberStr));
+ fRetval = (double)nNum;
+ }
+
+ if(rPos < nLen && bPointIsNumber && sal_Unicode('.') == rStr.GetChar(rPos))
+ {
+ UniString aPostStr;
+ rPos++;
+
+ while(rPos < nLen && Imp_IsOnNumberChar(rStr, rPos, FALSE, bPointIsNumber))
+ aPostStr.Append(rStr.GetChar(rPos++));
+
+ aPostStr.EraseTrailingChars(sal_Unicode('0'));
+
+ xub_StrLen nStrLen(aPostStr.Len());
+ if(nStrLen)
+ {
+ nNum = 0L;
+ rConv.convertNumber(nNum, OUString(aPostStr));
+ fRetval += (double)nNum / pow(10.0, (double)nStrLen);
+ }
+ }
+
+ return fRetval;
+}
+
+sal_Int32 Imp_GetNumberChar(const UniString& rStr, xub_StrLen& rPos, const xub_StrLen nLen,
+ const SvXMLUnitConverter& rConv, sal_Int32 nRetval,
+ BOOL bSignIsNumber = TRUE, BOOL bPointIsNumber = FALSE)
+{
+ return (sal_Int32)Imp_GetNumberChar(rStr,rPos, nLen, rConv,
+ (double)nRetval, bSignIsNumber, bPointIsNumber);
+}
+
+void Imp_PutNumberChar(UniString& rStr, const SvXMLUnitConverter& rConv, double fValue)
+{
+ double fNum;
+ double fFrac = modf(fValue, &fNum);
+ sal_Int32 nNum(fNum);
+ OUStringBuffer sStringBuffer;
+
+ rConv.convertNumber(sStringBuffer, nNum);
+ rStr += UniString(sStringBuffer.makeStringAndClear());
+
+ if(fFrac != 0.0)
+ {
+ rStr += sal_Unicode('.');
+ nNum = sal_Int32(fFrac * 1000000001.0);
+ rConv.convertNumber(sStringBuffer, nNum);
+ rStr += UniString(sStringBuffer.makeStringAndClear());
+ rStr.EraseTrailingChars(sal_Unicode('0'));
+ }
+}
+
+void Imp_PutNumberChar(UniString& rStr, const SvXMLUnitConverter& rConv, sal_Int32 nValue)
+{
+ OUStringBuffer sStringBuffer;
+ rConv.convertNumber(sStringBuffer, nValue);
+ rStr += UniString(sStringBuffer.makeStringAndClear());
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// base class of all objects
+
+struct ImpSdXMLExpTransObjBase
+{
+ sal_uInt16 mnType;
+ ImpSdXMLExpTransObjBase(sal_uInt16 nType)
+ : mnType(nType) {}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// classes of objects, different sizes
+
+struct ImpSdXMLExpTransObjRotate : public ImpSdXMLExpTransObjBase
+{
+ double mfRotate;
+ ImpSdXMLExpTransObjRotate(double fVal)
+ : ImpSdXMLExpTransObjBase(IMP_SDXMLEXP_OBJ_ROTATE), mfRotate(fVal) {}
+};
+struct ImpSdXMLExpTransObjScale : public ImpSdXMLExpTransObjBase
+{
+ Vector2D maScale;
+ ImpSdXMLExpTransObjScale(const Vector2D& rNew)
+ : ImpSdXMLExpTransObjBase(IMP_SDXMLEXP_OBJ_SCALE), maScale(rNew) {}
+};
+struct ImpSdXMLExpTransObjTranslate : public ImpSdXMLExpTransObjBase
+{
+ Vector2D maTranslate;
+ ImpSdXMLExpTransObjTranslate(const Vector2D& rNew)
+ : ImpSdXMLExpTransObjBase(IMP_SDXMLEXP_OBJ_TRANSLATE), maTranslate(rNew) {}
+};
+struct ImpSdXMLExpTransObjSkewX : public ImpSdXMLExpTransObjBase
+{
+ double mfSkewX;
+ ImpSdXMLExpTransObjSkewX(double fVal)
+ : ImpSdXMLExpTransObjBase(IMP_SDXMLEXP_OBJ_SKEWX), mfSkewX(fVal) {}
+};
+struct ImpSdXMLExpTransObjSkewY : public ImpSdXMLExpTransObjBase
+{
+ double mfSkewY;
+ ImpSdXMLExpTransObjSkewY(double fVal)
+ : ImpSdXMLExpTransObjBase(IMP_SDXMLEXP_OBJ_SKEWY), mfSkewY(fVal) {}
+};
+struct ImpSdXMLExpTransObjMatrix : public ImpSdXMLExpTransObjBase
+{
+ Matrix3D maMatrix;
+ ImpSdXMLExpTransObjMatrix(const Matrix3D& rNew)
+ : ImpSdXMLExpTransObjBase(IMP_SDXMLEXP_OBJ_MATRIX), maMatrix(rNew) {}
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+// delete alle entries in list
+
+void SdXMLImExTransform::EmptyList()
+{
+ while(maList.Count())
+ {
+ ImpSdXMLExpTransObjBase* pObj = maList.Remove(maList.Count() - 1);
+ switch(pObj->mnType)
+ {
+ case IMP_SDXMLEXP_OBJ_ROTATE : delete (ImpSdXMLExpTransObjRotate*)pObj; break;
+ case IMP_SDXMLEXP_OBJ_SCALE : delete (ImpSdXMLExpTransObjScale*)pObj; break;
+ case IMP_SDXMLEXP_OBJ_TRANSLATE : delete (ImpSdXMLExpTransObjTranslate*)pObj; break;
+ case IMP_SDXMLEXP_OBJ_SKEWX : delete (ImpSdXMLExpTransObjSkewX*)pObj; break;
+ case IMP_SDXMLEXP_OBJ_SKEWY : delete (ImpSdXMLExpTransObjSkewY*)pObj; break;
+ case IMP_SDXMLEXP_OBJ_MATRIX : delete (ImpSdXMLExpTransObjMatrix*)pObj; break;
+ default : DBG_ERROR("SdXMLImExTransform: impossible entry!"); break;
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// add members
+
+void SdXMLImExTransform::AddRotate(double fNew)
+{
+ if(fNew != 0.0)
+ maList.Insert(new ImpSdXMLExpTransObjRotate(fNew), LIST_APPEND);
+}
+
+void SdXMLImExTransform::AddScale(const Vector2D& rNew)
+{
+ if(rNew.X() != 0.0 || rNew.Y() != 0.0)
+ maList.Insert(new ImpSdXMLExpTransObjScale(rNew), LIST_APPEND);
+}
+
+void SdXMLImExTransform::AddTranslate(const Vector2D& rNew)
+{
+ if(rNew.X() != 0.0 || rNew.Y() != 0.0)
+ maList.Insert(new ImpSdXMLExpTransObjTranslate(rNew), LIST_APPEND);
+}
+
+void SdXMLImExTransform::AddSkewX(double fNew)
+{
+ if(fNew != 0.0)
+ maList.Insert(new ImpSdXMLExpTransObjSkewX(fNew), LIST_APPEND);
+}
+
+void SdXMLImExTransform::AddSkewY(double fNew)
+{
+ if(fNew != 0.0)
+ maList.Insert(new ImpSdXMLExpTransObjSkewY(fNew), LIST_APPEND);
+}
+
+void SdXMLImExTransform::AddMatrix(const Matrix3D& rNew)
+{
+ maList.Insert(new ImpSdXMLExpTransObjMatrix(rNew), LIST_APPEND);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// gen string for export
+const OUString& SdXMLImExTransform::GetExportString(const SvXMLUnitConverter& rConv)
+{
+ UniString aNewString;
+
+ for(sal_uInt32 a(0L); a < maList.Count(); a++)
+ {
+ ImpSdXMLExpTransObjBase* pObj = maList.GetObject(a);
+ switch(pObj->mnType)
+ {
+ case IMP_SDXMLEXP_OBJ_ROTATE :
+ {
+ aNewString += UniString::CreateFromAscii("rotate (");
+ Imp_PutNumberChar(aNewString, rConv, ((ImpSdXMLExpTransObjRotate*)pObj)->mfRotate);
+ aNewString += sal_Unicode(')');
+ break;
+ }
+ case IMP_SDXMLEXP_OBJ_SCALE :
+ {
+ aNewString += UniString::CreateFromAscii("scale ()");
+ break;
+ }
+ case IMP_SDXMLEXP_OBJ_TRANSLATE :
+ {
+ aNewString += UniString::CreateFromAscii("translate ()");
+ break;
+ }
+ case IMP_SDXMLEXP_OBJ_SKEWX :
+ {
+ aNewString += UniString::CreateFromAscii("skewX ()");
+ break;
+ }
+ case IMP_SDXMLEXP_OBJ_SKEWY :
+ {
+ aNewString += UniString::CreateFromAscii("skewY ()");
+ break;
+ }
+ case IMP_SDXMLEXP_OBJ_MATRIX :
+ {
+ aNewString += UniString::CreateFromAscii("matrix ()");
+ break;
+ }
+ default : DBG_ERROR("SdXMLImExTransform: impossible entry!"); break;
+ }
+
+ // if not the last entry, add one space to next tag
+ if(a+1 != maList.Count())
+ aNewString += sal_Unicode(' ');
+ }
+
+ // fill string form UniString
+ msString = OUString(aNewString);
+
+ return msString;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// for Import: constructor with string, parses it and generates entries
+SdXMLImExTransform::SdXMLImExTransform(const OUString& rNew, const SvXMLUnitConverter& rConv)
+: msString(rNew)
+{
+ if(msString.getLength())
+ {
+ const UniString aStr(msString.getStr(), msString.getLength());
+ const xub_StrLen nLen(aStr.Len());
+ xub_StrLen nPos(0), nPos2;
+
+ while(nPos < nLen)
+ {
+ // skip spaces
+ Imp_SkipSpaces(aStr, nPos, nLen);
+
+ // look for tag
+ if(nPos < nLen)
+ {
+ if((nPos2 = aStr.SearchAscii("rotate", nPos)) != STRING_NOTFOUND)
+ {
+ UniString aNumberStr;
+ double fValue(0.0);
+
+ nPos = nPos2 + 6;
+ Imp_SkipSpacesAndOpeningBraces(aStr, nPos, nLen);
+ fValue = Imp_GetNumberChar(aStr, nPos, nLen, rConv, fValue, TRUE, TRUE);
+ if(fValue != 0.0)
+ maList.Insert(new ImpSdXMLExpTransObjRotate(fValue), LIST_APPEND);
+
+ Imp_SkipSpacesAndClosingBraces(aStr, nPos, nLen);
+ }
+ else if((nPos2 = aStr.SearchAscii("scale", nPos)) != STRING_NOTFOUND)
+ {
+ nPos = nPos2 + 5;
+ }
+ else if((nPos2 = aStr.SearchAscii("translate", nPos)) != STRING_NOTFOUND)
+ {
+ nPos = nPos2 + 9;
+ }
+ else if((nPos2 = aStr.SearchAscii("skewX", nPos)) != STRING_NOTFOUND)
+ {
+ nPos = nPos2 + 5;
+ }
+ else if((nPos2 = aStr.SearchAscii("skewY", nPos)) != STRING_NOTFOUND)
+ {
+ nPos = nPos2 + 5;
+ }
+ else if((nPos2 = aStr.SearchAscii("matrix", nPos)) != STRING_NOTFOUND)
+ {
+ nPos = nPos2 + 6;
+ }
+ else
+ nPos++;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// access from outside
+ImpSdXMLExpTransObjBase* SdXMLImExTransform::FindObject(sal_uInt16 nType, sal_uInt32 nInd)
+{
+ while(nInd < maList.Count() && maList.GetObject(nInd)->mnType != nType)
+ nInd++;
+ if(nInd < maList.Count())
+ return maList.GetObject(nInd);
+ return 0L;
+}
+
+sal_Bool SdXMLImExTransform::FindRotate(double& rNew, sal_uInt32 nInd)
+{
+ ImpSdXMLExpTransObjBase* pObj = FindObject(IMP_SDXMLEXP_OBJ_ROTATE, nInd);
+ if(pObj)
+ rNew = ((ImpSdXMLExpTransObjRotate*)pObj)->mfRotate;
+ return (pObj != 0L);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLImExViewBox::SdXMLImExViewBox(sal_Int32 nX, sal_Int32 nY, sal_Int32 nW, sal_Int32 nH)
+: mnX( nX ),
+ mnY( nY ),
+ mnW( nW ),
+ mnH( nH )
+{
+}
+
+SdXMLImExViewBox::SdXMLImExViewBox(const OUString& rNew, const SvXMLUnitConverter& rConv)
+: mnX( 0L ),
+ mnY( 0L ),
+ mnW( 1000L ),
+ mnH( 1000L ),
+ msString(rNew)
+{
+ if(msString.getLength())
+ {
+ const UniString aStr(msString.getStr(), msString.getLength());
+ const xub_StrLen nLen(aStr.Len());
+ xub_StrLen nPos(0);
+
+ // skip starting spaces
+ Imp_SkipSpaces(aStr, nPos, nLen);
+
+ // get mX
+ mnX = Imp_GetNumberChar(aStr, nPos, nLen, rConv, mnX, TRUE, TRUE);
+
+ // skip spaces and commas
+ Imp_SkipSpacesAndCommas(aStr, nPos, nLen);
+
+ // get mY
+ mnY = Imp_GetNumberChar(aStr, nPos, nLen, rConv, mnY, TRUE, TRUE);
+
+ // skip spaces and commas
+ Imp_SkipSpacesAndCommas(aStr, nPos, nLen);
+
+ // get mW
+ mnW = Imp_GetNumberChar(aStr, nPos, nLen, rConv, mnW, TRUE, TRUE);
+
+ // skip spaces and commas
+ Imp_SkipSpacesAndCommas(aStr, nPos, nLen);
+
+ // get mH
+ mnH = Imp_GetNumberChar(aStr, nPos, nLen, rConv, mnH, TRUE, TRUE);
+ }
+}
+
+const OUString& SdXMLImExViewBox::GetExportString(const SvXMLUnitConverter& rConv)
+{
+ UniString aNewString;
+
+ Imp_PutNumberChar(aNewString, rConv, mnX);
+ aNewString += sal_Unicode(' ');
+
+ Imp_PutNumberChar(aNewString, rConv, mnY);
+ aNewString += sal_Unicode(' ');
+
+ Imp_PutNumberChar(aNewString, rConv, mnW);
+ aNewString += sal_Unicode(' ');
+
+ Imp_PutNumberChar(aNewString, rConv, mnH);
+
+ // set new string
+ msString = OUString(aNewString);
+
+ return msString;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLImExPointsElement::SdXMLImExPointsElement(drawing::PointSequence* pPoints,
+ const SdXMLImExViewBox& rViewBox,
+ const awt::Point& rObjectPos,
+ const awt::Size& rObjectSize,
+ const SvXMLUnitConverter& rConv)
+: maPoly( 0L )
+{
+ // add polygon to string
+ UniString aNewString;
+ sal_Int32 nCnt(pPoints->getLength());
+ awt::Point* pArray = pPoints->getArray();
+
+ // last point same? Ignore it.
+ if((pArray->X == (pArray + (nCnt - 1))->X)
+ && (pArray->Y == (pArray + (nCnt - 1))->Y))
+ nCnt--;
+
+ // object size and ViewBox size different?
+ sal_Bool bScale(rObjectSize.Width != rViewBox.GetWidth()
+ || rObjectSize.Height != rViewBox.GetHeight());
+ sal_Bool bTranslate(rViewBox.GetX() != 0L || rViewBox.GetY() != 0L);
+
+ for(sal_Int32 a(0L); a < nCnt; a++)
+ {
+ // prepare coordinates
+ sal_Int32 nX( pArray->X - rObjectPos.X );
+ sal_Int32 nY( pArray->Y - rObjectPos.Y );
+
+ if(bScale)
+ {
+ nX = (nX * rViewBox.GetWidth()) / rObjectSize.Width;
+ nY = (nY * rViewBox.GetHeight()) / rObjectSize.Height;
+ }
+
+ if(bTranslate)
+ {
+ nX += rViewBox.GetX();
+ nY += rViewBox.GetY();
+ }
+
+ // X and comma
+ Imp_PutNumberChar(aNewString, rConv, nX);
+ aNewString += sal_Unicode(',');
+
+ // Y and space (not for last)
+ Imp_PutNumberChar(aNewString, rConv, nY);
+ if(a + 1 != nCnt)
+ aNewString += sal_Unicode(' ');
+
+ // next point
+ pArray++;
+ }
+
+ // set new string
+ msString = OUString(aNewString);
+}
+
+SdXMLImExPointsElement::SdXMLImExPointsElement(const OUString& rNew,
+ const SdXMLImExViewBox& rViewBox,
+ const awt::Point& rObjectPos,
+ const awt::Size& rObjectSize,
+ const SvXMLUnitConverter& rConv)
+: msString( rNew ),
+ maPoly( 0L )
+{
+ // convert string to polygon
+ const UniString aStr(msString.getStr(), msString.getLength());
+ const xub_StrLen nLen(aStr.Len());
+ xub_StrLen nPos(0);
+ sal_Int32 nNumPoints(0L);
+
+ // skip starting spaces
+ Imp_SkipSpaces(aStr, nPos, nLen);
+
+ // count points in first loop
+ while(nPos < nLen)
+ {
+ // skip number
+ Imp_SkipNumber(aStr, nPos, nLen, TRUE, TRUE);
+
+ // skip spaces and commas
+ Imp_SkipSpacesAndCommas(aStr, nPos, nLen);
+
+ // get mY
+ Imp_SkipNumber(aStr, nPos, nLen, TRUE, TRUE);
+
+ // skip spaces and commas
+ Imp_SkipSpacesAndCommas(aStr, nPos, nLen);
+
+ // one more point
+ nNumPoints++;
+ }
+
+ // second loop
+ if(nNumPoints)
+ {
+ nPos = 0L;
+ maPoly.realloc(1L);
+ drawing::PointSequence* pOuterSequence = maPoly.getArray();
+ pOuterSequence->realloc(nNumPoints);
+ awt::Point* pInnerSequence = pOuterSequence->getArray();
+
+ // object size and ViewBox size different?
+ sal_Bool bScale(rObjectSize.Width != rViewBox.GetWidth()
+ || rObjectSize.Height != rViewBox.GetHeight());
+ sal_Bool bTranslate(rViewBox.GetX() != 0L || rViewBox.GetY() != 0L);
+
+ // skip starting spaces
+ Imp_SkipSpaces(aStr, nPos, nLen);
+
+ while(nPos < nLen)
+ {
+ // prepare new parameter pair
+ sal_Int32 nX(0L);
+ sal_Int32 nY(0L);
+
+ // get mX
+ nX = Imp_GetNumberChar(aStr, nPos, nLen, rConv, nX, TRUE, TRUE);
+
+ // skip spaces and commas
+ Imp_SkipSpacesAndCommas(aStr, nPos, nLen);
+
+ // get mY
+ nY = Imp_GetNumberChar(aStr, nPos, nLen, rConv, nY, TRUE, TRUE);
+
+ // skip spaces and commas
+ Imp_SkipSpacesAndCommas(aStr, nPos, nLen);
+
+ // prepare parameters
+ if(bTranslate)
+ {
+ nX -= rViewBox.GetX();
+ nY -= rViewBox.GetY();
+ }
+
+ if(bScale)
+ {
+ nX = (nX * rObjectSize.Width) / rViewBox.GetWidth();
+ nY = (nY * rObjectSize.Height) / rViewBox.GetHeight();
+ }
+
+ nX += rObjectPos.X;
+ nY += rObjectPos.Y;
+
+ // add new point
+ *pInnerSequence = awt::Point( nX, nY );
+ pInnerSequence++;
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLImExSvgDElement::SdXMLImExSvgDElement(const SdXMLImExViewBox& rViewBox)
+: mrViewBox( rViewBox ),
+ mbIsClosed( FALSE ),
+ mbIsCurve( FALSE ),
+ mnLastX( 0L ),
+ mnLastY( 0L ),
+ maPoly( 0L ),
+ maFlag( 0L )
+{
+}
+
+void Imp_GetPrevPos(awt::Point*& pPrevPos1,
+ drawing::PolygonFlags& aPrevFlag1,
+ const BOOL bClosed, awt::Point* pPoints,
+ drawing::PolygonFlags* pFlags, const sal_Int32 nPos,
+ const sal_Int32 nCnt, const sal_Int32 nAdd)
+{
+ if(bClosed)
+ {
+ pPrevPos1 = pPoints + ((nPos + nCnt - nAdd) % nCnt);
+ aPrevFlag1 = *(pFlags + ((nPos + nCnt - nAdd) % nCnt));
+ }
+ else if(nPos > (nAdd - 1))
+ {
+ pPrevPos1 = pPoints + (nPos - nAdd);
+ aPrevFlag1 = *(pFlags + (nPos - nAdd));
+ }
+ else
+ pPrevPos1 = 0L;
+}
+
+void Imp_PrepareCoorExport(sal_Int32& nX, sal_Int32& nY,
+ const awt::Point* pPointArray, const awt::Point& rObjectPos,
+ const awt::Size& rObjectSize, const SdXMLImExViewBox& mrViewBox,
+ const BOOL bScale, const BOOL bTranslate)
+{
+ nX = pPointArray->X - rObjectPos.X;
+ nY = pPointArray->Y - rObjectPos.Y;
+
+ if(bScale)
+ {
+ nX = (nX * mrViewBox.GetWidth()) / rObjectSize.Width;
+ nY = (nY * mrViewBox.GetHeight()) / rObjectSize.Height;
+ }
+
+ if(bTranslate)
+ {
+ nX += mrViewBox.GetX();
+ nY += mrViewBox.GetY();
+ }
+}
+
+void Imp_PutNumberCharWithSpace(UniString& rStr, const SvXMLUnitConverter& rConv, double fValue)
+{
+ const xub_StrLen aLen(rStr.Len());
+ if(aLen)
+ if(Imp_IsOnNumberChar(rStr, aLen - 1, FALSE, TRUE) && fValue >= 0.0)
+ rStr += sal_Unicode(' ');
+ Imp_PutNumberChar(rStr, rConv, fValue);
+}
+
+void Imp_PutNumberCharWithSpace(UniString& rStr, const SvXMLUnitConverter& rConv, sal_Int32 nValue)
+{
+ const xub_StrLen aLen(rStr.Len());
+ if(aLen)
+ if(Imp_IsOnNumberChar(rStr, aLen - 1, FALSE, TRUE) && nValue >= 0)
+ rStr += sal_Unicode(' ');
+ Imp_PutNumberChar(rStr, rConv, nValue);
+}
+
+void SdXMLImExSvgDElement::AddPolygon(
+ drawing::PointSequence* pPoints,
+ drawing::FlagSequence* pFlags,
+ const awt::Point& rObjectPos,
+ const awt::Size& rObjectSize,
+ const SvXMLUnitConverter& rConv,
+ sal_Bool bClosed, sal_Bool bRelative)
+{
+ // add polygon to string
+ UniString aNewString(msString);
+ sal_Int32 nCnt(pPoints->getLength());
+ sal_Unicode aLastCommand;
+ awt::Point* pPointArray = pPoints->getArray();
+ drawing::PolygonFlags* pFlagArray = (pFlags) ? pFlags->getArray() : 0L;
+
+ // object size and ViewBox size different?
+ sal_Bool bScale(rObjectSize.Width != mrViewBox.GetWidth()
+ || rObjectSize.Height != mrViewBox.GetHeight());
+ sal_Bool bTranslate(mrViewBox.GetX() != 0L || mrViewBox.GetY() != 0L);
+
+ // last point same? Ignore it, but ONLY when there are NO control
+ // points. In that case the last point might be double, but this
+ // is necessary. nCnt might NOT be changed to guarantee ring access
+ // to single points!
+ if(!pFlags
+ && (pPointArray->X == (pPointArray + (nCnt - 1))->X)
+ && (pPointArray->Y == (pPointArray + (nCnt - 1))->Y))
+ nCnt--;
+
+ // bezier poly, handle curves
+ BOOL bDidWriteStart(FALSE);
+
+ for(sal_Int32 a(0L); a < nCnt; a++)
+ {
+ if(!pFlags || drawing::PolygonFlags_CONTROL != *pFlagArray)
+ {
+ BOOL bDidWriteAsCurve(FALSE);
+
+ if(bDidWriteStart)
+ {
+ if(pFlags)
+ {
+ // real curve point, get previous to see if it's a control point
+ awt::Point* pPrevPos1;
+ drawing::PolygonFlags aPrevFlag1;
+
+ Imp_GetPrevPos(pPrevPos1, aPrevFlag1, bClosed, pPoints->getArray(),
+ pFlags->getArray(), a, nCnt, 1);
+
+ if(pPrevPos1 && drawing::PolygonFlags_CONTROL == aPrevFlag1)
+ {
+ // get previous2 to see if it's a control point, too
+ awt::Point* pPrevPos2;
+ drawing::PolygonFlags aPrevFlag2;
+
+ Imp_GetPrevPos(pPrevPos2, aPrevFlag2, bClosed, pPoints->getArray(),
+ pFlags->getArray(), a, nCnt, 2);
+
+ if(pPrevPos2 && drawing::PolygonFlags_CONTROL == aPrevFlag2)
+ {
+ // get previous3 to see if it's a curve point and if,
+ // if it is fully symmetric or not
+ awt::Point* pPrevPos3;
+ drawing::PolygonFlags aPrevFlag3;
+
+ Imp_GetPrevPos(pPrevPos3, aPrevFlag3, bClosed, pPoints->getArray(),
+ pFlags->getArray(), a, nCnt, 3);
+
+ if(pPrevPos3)
+ {
+ sal_Bool bUseSWord(FALSE);
+
+ if(drawing::PolygonFlags_SYMMETRIC == aPrevFlag3)
+ {
+ // get previous4 to see if it's a control point
+ awt::Point* pPrevPos4;
+ drawing::PolygonFlags aPrevFlag4;
+
+ Imp_GetPrevPos(pPrevPos4, aPrevFlag4, bClosed, pPoints->getArray(),
+ pFlags->getArray(), a, nCnt, 4);
+
+ if(drawing::PolygonFlags_CONTROL == aPrevFlag4)
+ {
+ // okay, prevPos3 is symmetric (c2) and prevPos4
+ // is existing control point, the 's' statement can be used
+ bUseSWord = TRUE;
+ }
+ }
+
+ // prepare coordinates
+ sal_Int32 nX, nY, nX2, nY2;
+
+ Imp_PrepareCoorExport(nX, nY, pPointArray, rObjectPos, rObjectSize,
+ mrViewBox, bScale, bTranslate);
+ Imp_PrepareCoorExport(nX2, nY2, pPrevPos1, rObjectPos, rObjectSize,
+ mrViewBox, bScale, bTranslate);
+
+ if(bUseSWord)
+ {
+ // write a shorthand/smooth curveto entry (S)
+ if(bRelative)
+ {
+ if(aLastCommand != sal_Unicode('s'))
+ aNewString += sal_Unicode('s');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX2 - mnLastX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY2 - mnLastY);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX - mnLastX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY - mnLastY);
+
+ aLastCommand = sal_Unicode('s');
+ }
+ else
+ {
+ if(aLastCommand != sal_Unicode('S'))
+ aNewString += sal_Unicode('S');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX2);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY2);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY);
+
+ aLastCommand = sal_Unicode('S');
+ }
+ }
+ else
+ {
+ // prepare coordinates
+ sal_Int32 nX1, nY1;
+
+ Imp_PrepareCoorExport(nX1, nY1, pPrevPos2, rObjectPos, rObjectSize,
+ mrViewBox, bScale, bTranslate);
+
+ // write a curveto entry (C)
+ if(bRelative)
+ {
+ if(aLastCommand != sal_Unicode('c'))
+ aNewString += sal_Unicode('c');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX1 - mnLastX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY1 - mnLastY);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX2 - mnLastX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY2 - mnLastY);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX - mnLastX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY - mnLastY);
+
+ aLastCommand = sal_Unicode('c');
+ }
+ else
+ {
+ if(aLastCommand != sal_Unicode('C'))
+ aNewString += sal_Unicode('C');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX1);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY1);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX2);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY2);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY);
+
+ aLastCommand = sal_Unicode('C');
+ }
+ }
+
+ // remember that current point IS written
+ bDidWriteAsCurve = TRUE;
+
+ // remember new last position
+ mnLastX = nX;
+ mnLastY = nY;
+ }
+ }
+ }
+ }
+ }
+
+ if(!bDidWriteAsCurve)
+ {
+ // current point not yet written, prepare coordinates
+ sal_Int32 nX, nY;
+
+ Imp_PrepareCoorExport(nX, nY, pPointArray, rObjectPos, rObjectSize,
+ mrViewBox, bScale, bTranslate);
+
+ if(bDidWriteStart)
+ {
+ // write as normal point
+ if(mnLastX == nX)
+ {
+ if(bRelative)
+ {
+ if(aLastCommand != sal_Unicode('v'))
+ aNewString += sal_Unicode('v');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY - mnLastY);
+
+ aLastCommand = sal_Unicode('v');
+ }
+ else
+ {
+ if(aLastCommand != sal_Unicode('V'))
+ aNewString += sal_Unicode('V');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY);
+
+ aLastCommand = sal_Unicode('V');
+ }
+ }
+ else if(mnLastY == nY)
+ {
+ if(bRelative)
+ {
+ if(aLastCommand != sal_Unicode('h'))
+ aNewString += sal_Unicode('h');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX - mnLastX);
+
+ aLastCommand = sal_Unicode('h');
+ }
+ else
+ {
+ if(aLastCommand != sal_Unicode('H'))
+ aNewString += sal_Unicode('H');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX);
+
+ aLastCommand = sal_Unicode('H');
+ }
+ }
+ else
+ {
+ if(bRelative)
+ {
+ if(aLastCommand != sal_Unicode('l'))
+ aNewString += sal_Unicode('l');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX - mnLastX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY - mnLastY);
+
+ aLastCommand = sal_Unicode('l');
+ }
+ else
+ {
+ if(aLastCommand != sal_Unicode('L'))
+ aNewString += sal_Unicode('L');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY);
+
+ aLastCommand = sal_Unicode('L');
+ }
+ }
+ }
+ else
+ {
+ // write as start point
+ if(bRelative)
+ {
+ aNewString += sal_Unicode('m');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX - mnLastX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY - mnLastY);
+
+ aLastCommand = sal_Unicode('l');
+ }
+ else
+ {
+ aNewString += sal_Unicode('M');
+
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nX);
+ Imp_PutNumberCharWithSpace(aNewString, rConv, nY);
+
+ aLastCommand = sal_Unicode('L');
+ }
+
+ // remember start written
+ bDidWriteStart = TRUE;
+ }
+
+ // remember new last position
+ mnLastX = nX;
+ mnLastY = nY;
+ }
+ }
+
+ // next point
+ pPointArray++;
+ pFlagArray++;
+ }
+
+ // close path if closed poly
+ if(bClosed)
+ {
+ if(bRelative)
+ aNewString += sal_Unicode('z');
+ else
+ aNewString += sal_Unicode('Z');
+ }
+
+ // set new string
+ msString = OUString(aNewString);
+}
+
+void Imp_SkipNumberAndSpacesAndCommas(const UniString& rStr, xub_StrLen& rPos,
+ const xub_StrLen nLen, BOOL bSignIsNumber = TRUE, BOOL bPointIsNumber = FALSE)
+{
+ Imp_SkipNumber(rStr, rPos, nLen, bSignIsNumber, bPointIsNumber);
+ Imp_SkipSpacesAndCommas(rStr, rPos, nLen);
+}
+
+sal_Int32 Imp_ImportNumberAndSpaces(
+ sal_Int32 nRetval, const UniString& rStr, xub_StrLen& rPos,
+ const xub_StrLen nLen, const SvXMLUnitConverter& rConv,
+ BOOL bSignIsNumber = TRUE, BOOL bPointIsNumber = FALSE)
+{
+ nRetval = Imp_GetNumberChar(rStr, rPos, nLen, rConv, nRetval, bSignIsNumber, bPointIsNumber);
+ Imp_SkipSpacesAndCommas(rStr, rPos, nLen);
+ return nRetval;
+}
+
+void Imp_PrepareCoorImport(sal_Int32& nX, sal_Int32& nY,
+ const awt::Point& rObjectPos, const awt::Size& rObjectSize,
+ const SdXMLImExViewBox& rViewBox, const BOOL bScale, const BOOL bTranslate)
+{
+ if(bTranslate)
+ {
+ nX -= rViewBox.GetX();
+ nY -= rViewBox.GetY();
+ }
+
+ if(bScale)
+ {
+ nX = (nX * rObjectSize.Width) / rViewBox.GetWidth();
+ nY = (nY * rObjectSize.Height) / rViewBox.GetHeight();
+ }
+
+ nX += rObjectPos.X;
+ nY += rObjectPos.Y;
+}
+
+void Imp_AddExportPoints(sal_Int32 nX, sal_Int32 nY,
+ awt::Point* pPoints, drawing::PolygonFlags* pFlags,
+ const sal_Int32 nInnerIndex,
+ drawing::PolygonFlags eFlag)
+{
+ if(pPoints)
+ pPoints[nInnerIndex] = awt::Point( nX, nY );
+
+ if(pFlags)
+ pFlags[nInnerIndex] = eFlag;
+}
+
+void Imp_CalcVectorValues(Vector2D& aVec1, Vector2D& aVec2, sal_Bool& bSameLength, sal_Bool& bSameDirection)
+{
+ sal_Int32 nLen1 = (sal_Int32)(aVec1.GetLength() + 0.5);
+ sal_Int32 nLen2 = (sal_Int32)(aVec2.GetLength() + 0.5);
+ aVec1.Normalize();
+ aVec2.Normalize();
+ aVec1 += aVec2;
+ sal_Int32 nLen3 = (sal_Int32)((aVec1.GetLength() * ((nLen1 + nLen2) / 2.0))+ 0.5);
+
+ bSameLength = (abs(nLen1 - nLen2) < 3);
+ bSameDirection = (nLen3 < 3);
+}
+
+SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
+ const SdXMLImExViewBox& rViewBox,
+ const awt::Point& rObjectPos,
+ const awt::Size& rObjectSize,
+ const SvXMLUnitConverter& rConv)
+: msString( rNew ),
+ mrViewBox( rViewBox ),
+ mbIsClosed( FALSE ),
+ mbIsCurve( FALSE ),
+ mnLastX( 0L ),
+ mnLastY( 0L ),
+ maPoly( 0L ),
+ maFlag( 0L )
+{
+ // convert string to polygon
+ const UniString aStr(msString.getStr(), msString.getLength());
+ const xub_StrLen nLen(aStr.Len());
+ xub_StrLen nPos(0);
+ sal_Int32 nNumPolys(0L);
+ sal_Bool bQuadraticBeziers(FALSE);
+ sal_Bool bEllipticalArc(FALSE);
+
+ // object size and ViewBox size different?
+ sal_Bool bScale(rObjectSize.Width != mrViewBox.GetWidth()
+ || rObjectSize.Height != mrViewBox.GetHeight());
+ sal_Bool bTranslate(mrViewBox.GetX() != 0L || mrViewBox.GetY() != 0L);
+
+ // first loop: count polys and get flags
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ while(nPos < nLen)
+ {
+ switch(aStr.GetChar(nPos++))
+ {
+ case 'Z' :
+ case 'z' :
+ {
+ mbIsClosed = TRUE;
+ break;
+ }
+ case 'M' :
+ case 'm' :
+ {
+ nNumPolys++;
+ break;
+ }
+ case 'S' :
+ case 's' :
+ case 'C' :
+ case 'c' :
+ {
+ mbIsCurve = TRUE;
+ break;
+ }
+ case 'L' :
+ case 'l' :
+ case 'H' :
+ case 'h' :
+ case 'V' :
+ case 'v' :
+ {
+ // normal, interpreted values. All okay.
+ break;
+ }
+ case 'Q' :
+ case 'q' :
+ case 'T' :
+ case 't' :
+ {
+ bQuadraticBeziers = TRUE;
+ break;
+ }
+ case 'A' :
+ case 'a' :
+ {
+ bEllipticalArc = TRUE;
+ break;
+ }
+ }
+ }
+
+ if(bQuadraticBeziers || bEllipticalArc)
+ DBG_ERROR("XMLIMP: non-interpreted tags in svg:d element!");
+
+ if(nNumPolys)
+ {
+ // alloc arrays
+ maPoly.realloc(nNumPolys);
+ if(IsCurve())
+ maFlag.realloc(nNumPolys);
+
+ // get outer sequences
+ drawing::PointSequence* pOuterSequence = maPoly.getArray();
+ drawing::FlagSequence* pOuterFlags = (IsCurve()) ? maFlag.getArray() : 0L;
+
+ // prepare new loop, count
+ sal_uInt32 nPointCount(0L);
+ nPos = 0;
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ while(nPos < nLen)
+ {
+ switch(aStr.GetChar(nPos))
+ {
+ case 'z' :
+ case 'Z' :
+ {
+ nPos++;
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ break;
+ }
+ case 'm' :
+ case 'M' :
+ {
+ // new poly starts, alloc current poly (if points are used)
+ if(nPointCount)
+ {
+ pOuterSequence->realloc(nPointCount);
+ pOuterSequence++;
+ if(pOuterFlags)
+ {
+ pOuterFlags->realloc(nPointCount);
+ pOuterFlags++;
+ }
+ nPointCount = 0L;
+ }
+ // NO break, continue in next case
+ }
+ case 'L' :
+ case 'l' :
+ {
+ nPos++;
+ while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos, TRUE, TRUE))
+ {
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ nPointCount++;
+ }
+ break;
+ }
+ case 'H' :
+ case 'h' :
+ case 'V' :
+ case 'v' :
+ {
+ nPos++;
+ while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos, TRUE, TRUE))
+ {
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ nPointCount++;
+ }
+ break;
+ }
+ case 'S' :
+ case 's' :
+ {
+ nPos++;
+ while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos, TRUE, TRUE))
+ {
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ nPointCount += 3;
+ }
+ break;
+ }
+ case 'C' :
+ case 'c' :
+ {
+ nPos++;
+ while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos, TRUE, TRUE))
+ {
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ Imp_SkipNumberAndSpacesAndCommas(aStr, nPos, nLen, TRUE, TRUE);
+ nPointCount += 3;
+ }
+ break;
+ }
+ // more cases...
+ }
+ }
+
+ // alloc last poly (when points used)
+ if(nPointCount)
+ {
+ pOuterSequence->realloc(nPointCount);
+ pOuterSequence++;
+ if(pOuterFlags)
+ {
+ pOuterFlags->realloc(nPointCount);
+ pOuterFlags++;
+ }
+ }
+
+ // set pointers back
+ pOuterSequence = maPoly.getArray();
+ pOuterFlags = (IsCurve()) ? maFlag.getArray() : 0L;
+ awt::Point* pInnerSequence = 0L;
+ drawing::PolygonFlags* pInnerFlags = 0L;
+ sal_uInt32 nInnerIndex(0L);
+
+ // prepare new loop, read points
+ nPos = 0;
+ Imp_SkipSpaces(aStr, nPos, nLen);
+
+ while(nPos < nLen)
+ {
+ BOOL bRelative(FALSE);
+
+ switch(aStr.GetChar(nPos))
+ {
+ case 'z' :
+ case 'Z' :
+ {
+ nPos++;
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ break;
+ }
+
+ case 'm' :
+ {
+ bRelative = TRUE;
+ }
+ case 'M' :
+ {
+ // next poly
+ pInnerSequence = pOuterSequence->getArray();
+ pOuterSequence++;
+
+ if(pOuterFlags)
+ {
+ pInnerFlags = pOuterFlags->getArray();
+ pOuterFlags++;
+ }
+
+ nInnerIndex = 0L;
+
+ nPos++;
+ while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos, TRUE, TRUE))
+ {
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+
+ if(bRelative)
+ {
+ nX += mnLastX;
+ nY += mnLastY;
+ }
+
+ // set last position
+ mnLastX = nX;
+ mnLastY = nY;
+
+ // calc transform and add point and flag
+ Imp_PrepareCoorImport(nX, nY, rObjectPos, rObjectSize, mrViewBox, bScale, bTranslate);
+ Imp_AddExportPoints(nX, nY, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_NORMAL);
+ }
+ break;
+ }
+
+ case 'l' :
+ {
+ bRelative = TRUE;
+ }
+ case 'L' :
+ {
+ nPos++;
+ while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos, TRUE, TRUE))
+ {
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+
+ if(bRelative)
+ {
+ nX += mnLastX;
+ nY += mnLastY;
+ }
+
+ // set last position
+ mnLastX = nX;
+ mnLastY = nY;
+
+ // calc transform and add point and flag
+ Imp_PrepareCoorImport(nX, nY, rObjectPos, rObjectSize, mrViewBox, bScale, bTranslate);
+ Imp_AddExportPoints(nX, nY, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_NORMAL);
+ }
+ break;
+ }
+
+ case 'h' :
+ {
+ bRelative = TRUE;
+ }
+ case 'H' :
+ {
+ nPos++;
+ while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos, TRUE, TRUE))
+ {
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nY(mnLastY);
+
+ if(bRelative)
+ nX += mnLastX;
+
+ // set last position
+ mnLastX = nX;
+
+ // calc transform and add point and flag
+ Imp_PrepareCoorImport(nX, nY, rObjectPos, rObjectSize, mrViewBox, bScale, bTranslate);
+ Imp_AddExportPoints(nX, nY, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_NORMAL);
+ }
+ break;
+ }
+
+ case 'v' :
+ {
+ bRelative = TRUE;
+ }
+ case 'V' :
+ {
+ nPos++;
+ while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos, TRUE, TRUE))
+ {
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ sal_Int32 nX(mnLastX);
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+
+ if(bRelative)
+ nY += mnLastY;
+
+ // set last position
+ mnLastY = nY;
+
+ // calc transform and add point and flag
+ Imp_PrepareCoorImport(nX, nY, rObjectPos, rObjectSize, mrViewBox, bScale, bTranslate);
+ Imp_AddExportPoints(nX, nY, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_NORMAL);
+ }
+ break;
+ }
+
+ case 's' :
+ {
+ bRelative = TRUE;
+ }
+ case 'S' :
+ {
+ nPos++;
+ while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos, TRUE, TRUE))
+ {
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ sal_Int32 nX1;
+ sal_Int32 nY1;
+ sal_Int32 nX2(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nY2(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+
+ if(bRelative)
+ {
+ nX2 += mnLastX;
+ nY2 += mnLastY;
+ nX += mnLastX;
+ nY += mnLastY;
+ }
+
+ // set last position
+ mnLastX = nX;
+ mnLastY = nY;
+
+ // calc transform for new points
+ Imp_PrepareCoorImport(nX2, nY2, rObjectPos, rObjectSize, mrViewBox, bScale, bTranslate);
+ Imp_PrepareCoorImport(nX, nY, rObjectPos, rObjectSize, mrViewBox, bScale, bTranslate);
+
+ // one more thing is known: the previous real point is PolygonFlags_SYMMETRIC
+ // and the Point X1,Y1 can be constructed by mirroring the point before it.
+ nX1 = nX2;
+ nY1 = nY2;
+ if(nInnerIndex)
+ {
+ awt::Point aPPrev1 = pInnerSequence[nInnerIndex - 1];
+ drawing::PolygonFlags aFPrev1 = pInnerFlags[nInnerIndex - 1];
+
+ if(nInnerIndex > 1)
+ {
+ awt::Point aPPrev2 = pInnerSequence[nInnerIndex - 2];
+ nX1 = aPPrev1.X -(aPPrev2.X - aPPrev1.X);
+ nY1 = aPPrev1.Y -(aPPrev2.Y - aPPrev1.Y);
+ }
+
+ // set curve point to symmetric
+ if(drawing::PolygonFlags_SYMMETRIC != aFPrev1)
+ pInnerFlags[nInnerIndex - 1] = drawing::PolygonFlags_SYMMETRIC;
+ }
+
+ // add calculated control point
+ Imp_AddExportPoints(nX1, nY1, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_CONTROL);
+
+ // add new points and set flags
+ Imp_AddExportPoints(nX2, nY2, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_CONTROL);
+ Imp_AddExportPoints(nX, nY, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_SMOOTH);
+ }
+ break;
+ }
+
+ case 'c' :
+ {
+ bRelative = TRUE;
+ }
+ case 'C' :
+ {
+ nPos++;
+ while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos, TRUE, TRUE))
+ {
+ Imp_SkipSpaces(aStr, nPos, nLen);
+ sal_Int32 nX1(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nY1(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nX2(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nY2(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv, TRUE, TRUE));
+
+ if(bRelative)
+ {
+ nX1 += mnLastX;
+ nY1 += mnLastY;
+ nX2 += mnLastX;
+ nY2 += mnLastY;
+ nX += mnLastX;
+ nY += mnLastY;
+ }
+
+ // set last position
+ mnLastX = nX;
+ mnLastY = nY;
+
+ // calc transform for new points
+ Imp_PrepareCoorImport(nX1, nY1, rObjectPos, rObjectSize, mrViewBox, bScale, bTranslate);
+ Imp_PrepareCoorImport(nX2, nY2, rObjectPos, rObjectSize, mrViewBox, bScale, bTranslate);
+ Imp_PrepareCoorImport(nX, nY, rObjectPos, rObjectSize, mrViewBox, bScale, bTranslate);
+
+ // calc information
+ if(nInnerIndex)
+ {
+ awt::Point aPPrev1 = pInnerSequence[nInnerIndex - 1];
+ drawing::PolygonFlags aFPrev1 = pInnerFlags[nInnerIndex - 1];
+
+ if(nInnerIndex > 1)
+ {
+ awt::Point aPPrev2 = pInnerSequence[nInnerIndex - 2];
+ drawing::PolygonFlags aFPrev2 = pInnerFlags[nInnerIndex - 2];
+ Vector2D aVec1(aPPrev2.X - aPPrev1.X, aPPrev2.Y - aPPrev1.Y);
+ Vector2D aVec2(nX1 - aPPrev1.X, nY1 - aPPrev1.Y);
+ sal_Bool bSameLength(FALSE);
+ sal_Bool bSameDirection(FALSE);
+
+ // get vector values
+ Imp_CalcVectorValues(aVec1, aVec2, bSameLength, bSameDirection);
+
+ if(drawing::PolygonFlags_CONTROL == aFPrev2)
+ {
+ // point before is a control point
+
+ if(bSameDirection)
+ {
+ if(bSameLength)
+ {
+ // set to PolygonFlags_SYMMETRIC
+ pInnerFlags[nInnerIndex - 1] = drawing::PolygonFlags_SYMMETRIC;
+ }
+ else
+ {
+ // set to PolygonFlags_SMOOTH
+ pInnerFlags[nInnerIndex - 1] = drawing::PolygonFlags_SMOOTH;
+ }
+ }
+ else
+ {
+ // set to PolygonFlags_NORMAL
+ pInnerFlags[nInnerIndex - 1] = drawing::PolygonFlags_NORMAL;
+ }
+ }
+ else
+ {
+ // point before is a simple curve point
+ if(bSameDirection)
+ {
+ // set to PolygonFlags_SMOOTH
+ pInnerFlags[nInnerIndex - 1] = drawing::PolygonFlags_SMOOTH;
+ }
+ else
+ {
+ // set to PolygonFlags_NORMAL
+ pInnerFlags[nInnerIndex - 1] = drawing::PolygonFlags_NORMAL;
+ }
+ }
+ }
+ else
+ {
+ // no point before starpoint, set type to PolygonFlags_NORMAL
+ pInnerFlags[nInnerIndex - 1] = drawing::PolygonFlags_NORMAL;
+ }
+ }
+
+ // add new points and set flags
+ Imp_AddExportPoints(nX1, nY1, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_CONTROL);
+ Imp_AddExportPoints(nX2, nY2, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_CONTROL);
+ Imp_AddExportPoints(nX, nY, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_SMOOTH);
+ }
+ break;
+ }
+ // more cases...
+ }
+ }
+ }
+}
+
+
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx
new file mode 100644
index 0000000000..3f9837bea7
--- /dev/null
+++ b/xmloff/source/draw/ximpbody.cxx
@@ -0,0 +1,369 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximpbody.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _XIMPBODY_HXX
+#include "ximpbody.hxx"
+#endif
+
+#ifndef _XMLOFF_PRSTYLEI_HXX_
+#include "prstylei.hxx"
+#endif
+
+#ifndef _XIMPNOTES_HXX
+#include "ximpnote.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGE_HPP_
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGES_HPP_
+#include <com/sun/star/drawing/XDrawPages.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
+#include <com/sun/star/container/XNamed.hpp>
+#endif
+
+#ifndef _XIMPSTYLE_HXX
+#include "ximpstyl.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XMASTERPAGETARGET_HPP_
+#include <com/sun/star/drawing/XMasterPageTarget.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
+#include "xmlprmap.hxx"
+#endif
+
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
+ USHORT nPrfx, const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLGroupShapeContext( rImport, nPrfx, rLocalName, rShapes )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ USHORT nPrefix = GetSdImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetSdImport().GetDrawPageAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_DRAWPAGE_NAME:
+ {
+ maName = sValue;
+ break;
+ }
+ case XML_TOK_DRAWPAGE_STYLE_NAME:
+ {
+ maStyleName = sValue;
+ break;
+ }
+ case XML_TOK_DRAWPAGE_MASTER_PAGE_NAME:
+ {
+ maMasterPageName = sValue;
+ break;
+ }
+ case XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME:
+ {
+ maPageLayoutName = sValue;
+ break;
+ }
+ }
+ }
+
+ // set PageName?
+ if(maName.getLength())
+ {
+ uno::Reference< drawing::XDrawPage > xDrawPage(rShapes, uno::UNO_QUERY);
+ if(xDrawPage.is())
+ {
+ uno::Reference < container::XNamed > xNamed(xDrawPage, uno::UNO_QUERY);
+ if(xNamed.is())
+ xNamed->setName(maName);
+ }
+ }
+
+ // set PageProperties?
+ if(maStyleName.getLength())
+ {
+ const SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetStylesContext();
+
+ if( pContext && pContext->ISA( SvXMLStyleContext ) )
+ {
+ const SdXMLStylesContext* pStyles = (SdXMLStylesContext*)pContext;
+ if(pStyles)
+ {
+ const SvXMLStyleContext* pStyle = pStyles->FindStyleChildContext(
+ XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID, maStyleName);
+
+ if(pStyle && pStyle->ISA(XMLPropStyleContext))
+ {
+ XMLPropStyleContext* pPropStyle = (XMLPropStyleContext*)pStyle;
+ uno::Reference <beans::XPropertySet> xPropSet(rShapes, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ pPropStyle->FillPropertySet(xPropSet);
+ }
+ }
+ }
+ }
+ }
+
+ // set MasterPage?
+ if(maMasterPageName.getLength())
+ {
+ const SdXMLMasterStylesContext* pStyles = GetSdImport().GetMasterStylesContext();
+ if(pStyles)
+ {
+ sal_Bool bDone(FALSE);
+
+ for(sal_uInt32 a(0L); !bDone && a < pStyles->GetMasterPageList().Count(); a++)
+ {
+ const SdXMLMasterPageContext* pMaster = pStyles->GetMasterPageList().GetObject(a);
+
+ if(pMaster && pMaster->GetName().getLength() && pMaster->GetName().equals(maMasterPageName))
+ {
+ uno::Reference < drawing::XMasterPageTarget > xDrawPage(rShapes, uno::UNO_QUERY);
+ if(xDrawPage.is())
+ {
+ uno::Reference< drawing::XDrawPage > xMasterPage(
+ pMaster->GetLocalShapesContext(), uno::UNO_QUERY);
+
+ if(xMasterPage.is())
+ {
+ xDrawPage->setMasterPage(xMasterPage);
+ bDone = TRUE;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // set PresentationPageLayout?
+ if(maPageLayoutName.getLength())
+ {
+ const SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetStylesContext();
+
+ if( pContext && pContext->ISA( SvXMLStyleContext ) )
+ {
+ const SdXMLStylesContext* pStyles = (SdXMLStylesContext*)pContext;
+ if(pStyles)
+ {
+ const SvXMLStyleContext* pStyle = pStyles->FindStyleChildContext(
+ XML_STYLE_FAMILY_SD_PRESENTATIONPAGELAYOUT_ID, maPageLayoutName);
+
+ if(pStyle && pStyle->ISA(SdXMLPresentationPageLayoutContext))
+ {
+ SdXMLPresentationPageLayoutContext* pLayout = (SdXMLPresentationPageLayoutContext*)pStyle;
+ uno::Reference <beans::XPropertySet> xPropSet(rShapes, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Any aAny;
+ aAny <<= pLayout->GetTypeId();
+ xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Layout")), aAny);
+ }
+ }
+ }
+ }
+ }
+
+ // now delete all up-to-now contained shapes; they have been created
+ // when setting the presentation page layout.
+ while(rShapes->getCount())
+ {
+ uno::Reference< drawing::XShape > xShape;
+ uno::Any aAny(rShapes->getByIndex(0L));
+
+ aAny >>= xShape;
+
+ if(xShape.is())
+ {
+ rShapes->remove(xShape);
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLDrawPageContext::~SdXMLDrawPageContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext *SdXMLDrawPageContext::CreateChildContext( USHORT nPrefix,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList )
+{
+ SvXMLImportContext *pContext = 0L;
+ const SvXMLTokenMap& rTokenMap = GetSdImport().GetDrawPageElemTokenMap();
+
+ // some special objects inside draw:page context
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ case XML_TOK_DRAWPAGE_NOTES:
+ {
+ // presentation:notes inside draw:page context
+ pContext = new SdXMLNotesContext( GetSdImport(), nPrefix, rLocalName,
+ GetLocalShapesContext());
+ break;
+ }
+ }
+
+ // call parent when no own context was created
+ if(!pContext)
+ pContext = SdXMLGroupShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList);
+
+ return pContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLBodyContext::SdXMLBodyContext( SdXMLImport& rImport,
+ USHORT nPrfx, const OUString& rLocalName )
+: SvXMLImportContext( rImport, nPrfx, rLocalName )
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLBodyContext::~SdXMLBodyContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext *SdXMLBodyContext::CreateChildContext(
+ USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList>& xAttrList )
+{
+ SvXMLImportContext *pContext = 0L;
+ const SvXMLTokenMap& rTokenMap = GetSdImport().GetBodyElemTokenMap();
+
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ case XML_TOK_BODY_PAGE:
+ {
+ uno::Reference< drawing::XDrawPage > xNewDrawPage;
+ uno::Reference< drawing::XDrawPages > xDrawPages(GetSdImport().GetLocalDrawPages(), uno::UNO_QUERY);
+
+ if(GetSdImport().GetNewPageCount() + 1 > xDrawPages->getCount())
+ {
+ // new page, create and insert
+ xNewDrawPage = xDrawPages->insertNewByIndex(xDrawPages->getCount());
+ }
+ else
+ {
+ // existing page, use it
+ uno::Any aAny(xDrawPages->getByIndex(GetSdImport().GetNewPageCount()));
+ aAny >>= xNewDrawPage;
+ }
+
+ // increment global import page counter
+ GetSdImport().IncrementNewPageCount();
+
+ if(xNewDrawPage.is())
+ {
+ uno::Reference< drawing::XShapes > xNewShapes(xNewDrawPage, uno::UNO_QUERY);
+ if(xNewShapes.is())
+ {
+ // draw:page inside office:body context
+ pContext = new SdXMLDrawPageContext(GetSdImport(), nPrefix, rLocalName, xAttrList,
+ xNewShapes);
+ }
+ }
+ break;
+ }
+ }
+
+ // call parent when no own context was created
+ if(!pContext)
+ pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList);
+
+ return pContext;
+}
+
+
diff --git a/xmloff/source/draw/ximpbody.hxx b/xmloff/source/draw/ximpbody.hxx
new file mode 100644
index 0000000000..c19aac345d
--- /dev/null
+++ b/xmloff/source/draw/ximpbody.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximpbody.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XIMPBODY_HXX
+#define _XIMPBODY_HXX
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+#ifndef _SDXMLIMP_HXX
+#include "sdxmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XIMPGROUP_HXX
+#include "ximpgrp.hxx"
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:page context
+
+class SdXMLDrawPageContext : public SdXMLGroupShapeContext
+{
+ rtl::OUString maName;
+ rtl::OUString maStyleName;
+ rtl::OUString maMasterPageName;
+ rtl::OUString maPageLayoutName;
+
+ const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+
+public:
+ SdXMLDrawPageContext( SdXMLImport& rImport, USHORT nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLDrawPageContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// office:body context
+
+class SdXMLBodyContext : public SvXMLImportContext
+{
+ const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+
+public:
+ SdXMLBodyContext( SdXMLImport& rImport, USHORT nPrfx, const rtl::OUString& rLocalName );
+ virtual ~SdXMLBodyContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
+};
+
+
+#endif // _XIMPBODY_HXX
diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx
new file mode 100644
index 0000000000..26568f26d6
--- /dev/null
+++ b/xmloff/source/draw/ximpgrp.cxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximpgrp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _XIMPGROUP_HXX
+#include "ximpgrp.hxx"
+#endif
+
+#ifndef _XIMPSHAPE_HXX
+#include "ximpshap.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLGroupShapeContext, SvXMLImportContext );
+
+SdXMLGroupShapeContext::SdXMLGroupShapeContext(
+ SvXMLImport& rImport,
+ USHORT nPrfx, const OUString& rLocalName,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SvXMLImportContext( rImport, nPrfx, rLocalName ),
+ mxShapes(rShapes)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLGroupShapeContext::~SdXMLGroupShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext* SdXMLGroupShapeContext::CreateChildContext( USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList>& xAttrList )
+{
+ SvXMLImportContext* pContext = 0L;
+
+ // call GroupChilödContext function at common ShapeImport
+ pContext = GetImport().GetShapeImport()->CreateGroupChildContext(
+ GetImport(), nPrefix, rLocalName, xAttrList, mxShapes);
+
+ // call parent when no own context was created
+ if(!pContext)
+ pContext = SvXMLImportContext::CreateChildContext(
+ nPrefix, rLocalName, xAttrList);
+
+ return pContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLGroupShapeContext::EndElement()
+{
+}
+
+
diff --git a/xmloff/source/draw/ximpgrp.hxx b/xmloff/source/draw/ximpgrp.hxx
new file mode 100644
index 0000000000..114022b140
--- /dev/null
+++ b/xmloff/source/draw/ximpgrp.hxx
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximpgrp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XIMPGROUP_HXX
+#define _XIMPGROUP_HXX
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+#ifndef _SDXMLIMP_HXX
+#include "sdxmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XSHAPES_HPP_
+#include <com/sun/star/drawing/XShapes.hpp>
+#endif
+
+#ifndef _RTTI_HXX
+#include <tools/rtti.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:g context (RECURSIVE)
+
+class SdXMLGroupShapeContext : public SvXMLImportContext
+{
+ // the shape group this group is working on
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxShapes;
+
+protected:
+ void SetLocalShapesContext(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rNew)
+ { mxShapes = rNew; }
+
+public:
+ TYPEINFO();
+
+ SdXMLGroupShapeContext( SvXMLImport& rImport, USHORT nPrfx, const rtl::OUString& rLocalName,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLGroupShapeContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual void EndElement();
+
+ const com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext() const
+ { return mxShapes; }
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& GetLocalShapesContext()
+ { return mxShapes; }
+};
+
+
+#endif // _XIMPGROUP_HXX
diff --git a/xmloff/source/draw/ximpnote.cxx b/xmloff/source/draw/ximpnote.cxx
new file mode 100644
index 0000000000..4c7365abeb
--- /dev/null
+++ b/xmloff/source/draw/ximpnote.cxx
@@ -0,0 +1,163 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximpnote.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _XIMPNOTES_HXX
+#include "ximpnote.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_PRESENTATION_XPRESENTATIONPAGE_HPP_
+#include <com/sun/star/presentation/XPresentationPage.hpp>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLNotesContext::SdXMLNotesContext( SdXMLImport& rImport,
+ USHORT nPrfx, const OUString& rLocalName,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLGroupShapeContext( rImport, nPrfx, rLocalName, rShapes ),
+ mbNotesMode(FALSE)
+{
+ if(GetSdImport().IsImpress())
+ {
+ // get notes page
+ uno::Reference< presentation::XPresentationPage > xPresPage(rShapes, uno::UNO_QUERY);
+ if(xPresPage.is())
+ {
+ uno::Reference< drawing::XDrawPage > xNotesDrawPage(xPresPage->getNotesPage(), uno::UNO_QUERY);
+ if(xNotesDrawPage.is())
+ {
+ uno::Reference< drawing::XShapes > xNewShapes(xNotesDrawPage, uno::UNO_QUERY);
+ if(xNewShapes.is())
+ {
+ // now delete all up-to-now contained shapes from this notes page
+ while(xNewShapes->getCount())
+ {
+ uno::Reference< drawing::XShape > xShape;
+ uno::Any aAny(xNewShapes->getByIndex(0L));
+
+ aAny >>= xShape;
+
+ if(xShape.is())
+ {
+ xNewShapes->remove(xShape);
+ }
+ }
+
+ // set new local shapes context to notes page
+ SetLocalShapesContext(xNewShapes);
+ mbNotesMode = TRUE;
+ }
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLNotesContext::~SdXMLNotesContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext *SdXMLNotesContext::CreateChildContext( USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList>& xAttrList )
+{
+ if(mbNotesMode)
+ {
+ // OK, notes page is set on base class, objects can be imported on notes page
+ SvXMLImportContext *pContext = 0L;
+
+ // some special objects inside presentation:notes context
+ // ...
+
+
+
+
+
+
+
+ // call parent when no own context was created
+ if(!pContext)
+ pContext = SdXMLGroupShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList);
+
+ return pContext;
+ }
+ else
+ {
+ // do not import this content, the notes page could not be accessed
+ return new SvXMLImportContext(GetImport(), nPrefix, rLocalName);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLNotesContext::EndElement()
+{
+}
+
+
diff --git a/xmloff/source/draw/ximpnote.hxx b/xmloff/source/draw/ximpnote.hxx
new file mode 100644
index 0000000000..f406711fa2
--- /dev/null
+++ b/xmloff/source/draw/ximpnote.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximpnote.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XIMPNOTES_HXX
+#define _XIMPNOTES_HXX
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+#ifndef _SDXMLIMP_HXX
+#include "sdxmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XIMPGROUP_HXX
+#include "ximpgrp.hxx"
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// presentation:notes context
+
+class SdXMLNotesContext : public SdXMLGroupShapeContext
+{
+ BOOL mbNotesMode;
+
+ const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+
+public:
+ SdXMLNotesContext( SdXMLImport& rImport, USHORT nPrfx,
+ const rtl::OUString& rLocalName,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLNotesContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual void EndElement();
+};
+
+
+#endif // _XIMPNOTES_HXX
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
new file mode 100644
index 0000000000..eb2ed23c53
--- /dev/null
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -0,0 +1,1544 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximpshap.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+
+#ifndef _XIMPSHAPE_HXX
+#include "ximpshap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLSHAPESTYLECONTEXT_HXX
+#include "XMLShapeStyleContext.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCESEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequence.hpp>
+#endif
+
+#ifndef _XEXPTRANSFORM_HXX
+#include "xexptran.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_POLYPOLYGONBEZIERCOORDS_HPP_
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+#endif
+
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+
+#ifndef _XIMPSTYLE_HXX
+#include "ximpstyl.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLShapeContext, SvXMLImportContext );
+
+SdXMLShapeContext::SdXMLShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SvXMLImportContext( rImport, nPrfx, rLocalName ),
+ mxShapes( rShapes ),
+ mnRotate( 0L ),
+ mnStyleFamily(XML_STYLE_FAMILY_SD_GRAPHICS_ID),
+ mbIsPlaceholder(FALSE),
+ mbIsUserTransformed(FALSE)
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_SHAPE_IS_USER_TRANSFORMED:
+ {
+ if(sValue.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true))))
+ mbIsUserTransformed = TRUE;
+ break;
+ }
+ case XML_TOK_SHAPE_IS_PLACEHOLDER:
+ {
+ if(sValue.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true))))
+ mbIsPlaceholder = TRUE;
+ break;
+ }
+ case XML_TOK_SHAPE_DRAWSTYLE_NAME_GRAPHICS:
+ {
+ maDrawStyleName = sValue;
+ break;
+ }
+ case XML_TOK_SHAPE_PRESENTATION_CLASS:
+ {
+ maPresentationClass = sValue;
+ break;
+ }
+ case XML_TOK_SHAPE_DRAWSTYLE_NAME_PRESENTATION:
+ {
+ maDrawStyleName = sValue;
+ mnStyleFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID;
+ break;
+ }
+ case XML_TOK_SHAPE_TRANSFORM:
+ {
+ SdXMLImExTransform aTransform(sValue, GetImport().GetMM100UnitConverter());
+ if(aTransform.NeedsAction())
+ {
+ double fVal(0.0);
+ if(aTransform.FindRotate(fVal) && fVal != 0.0)
+ mnRotate = (sal_Int32)(fVal * 100.0);
+ }
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLShapeContext::~SdXMLShapeContext()
+{
+ if(mxCursor.is())
+ GetImport().GetTextImport()->ResetCursor();
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext *SdXMLShapeContext::CreateChildContext( USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList>& xAttrList )
+{
+ // create text cursor on demand
+ if( !mxCursor.is() )
+ {
+ uno::Reference< text::XText > xText( mxShape, uno::UNO_QUERY );
+ if( xText.is() )
+ {
+ mxCursor = xText->createTextCursor();
+ if( mxCursor.is() )
+ {
+ GetImport().GetTextImport()->SetCursor( mxCursor );
+ }
+ }
+ }
+
+ SvXMLImportContext * pContext = NULL;
+
+ // if we have a text cursor, lets try to import some text
+ if( mxCursor.is() )
+ {
+ pContext = GetImport().GetTextImport()->CreateTextChildContext(
+ GetImport(), nPrefix, rLocalName, xAttrList );
+ }
+
+ // call parent for content
+ if(!pContext)
+ pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList );
+
+ return pContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // set parameters on shape
+ if(mnRotate != 0L)
+ {
+ uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Any aAny;
+ aAny <<= mnRotate;
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("RotateAngle")), aAny);
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape)
+{
+ if(xShape.is() && mxShapes.is())
+ {
+ // set shape local
+ mxShape = xShape;
+
+ // add new shape to parent
+ mxShapes->add( xShape );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLShapeContext::SetStyle()
+{
+ // set style on shape
+ if(maDrawStyleName.getLength() && mxShape.is())
+ {
+ const SvXMLStyleContext* pStyle = 0L;
+ sal_Bool bAutoStyle(FALSE);
+
+ if(GetImport().GetShapeImport()->GetAutoStylesContext())
+ pStyle = GetImport().GetShapeImport()->GetAutoStylesContext()->FindStyleChildContext(
+ mnStyleFamily, maDrawStyleName);
+
+ if(pStyle)
+ bAutoStyle = TRUE;
+
+ if(!pStyle && GetImport().GetShapeImport()->GetStylesContext())
+ pStyle = GetImport().GetShapeImport()->GetStylesContext()->
+ FindStyleChildContext(mnStyleFamily, maDrawStyleName);
+
+ if(pStyle && pStyle->ISA(XMLShapeStyleContext))
+ {
+ uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ XMLShapeStyleContext* pDocStyle = (XMLShapeStyleContext*)pStyle;
+
+ if(pDocStyle->GetStyle().is())
+ {
+ // set style on object
+ uno::Any aAny;
+ aAny <<= pDocStyle->GetStyle();
+ xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Style")), aAny);
+ }
+
+ if(bAutoStyle)
+ {
+ // set PropertySet on object
+ pDocStyle->FillPropertySet(xPropSet);
+ }
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLRectShapeContext, SdXMLShapeContext );
+
+SdXMLRectShapeContext::SdXMLRectShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
+ mnX( 0L ),
+ mnY( 0L ),
+ mnWidth( 1L ),
+ mnHeight( 1L ),
+ mnRadius( 0L )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetRectShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_RECTSHAPE_X:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnX, sValue);
+ break;
+ }
+ case XML_TOK_RECTSHAPE_Y:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnY, sValue);
+ break;
+ }
+ case XML_TOK_RECTSHAPE_WIDTH:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnWidth, sValue);
+ break;
+ }
+ case XML_TOK_RECTSHAPE_HEIGHT:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnHeight, sValue);
+ break;
+ }
+ case XML_TOK_RECTSHAPE_CORNER_RADIUS:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnRadius, sValue);
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLRectShapeContext::~SdXMLRectShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLRectShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create rectangle shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape(xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.RectangleShape"))),
+ uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ // Add, set Style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+
+ // set local parameters on shape
+ awt::Point aPoint(mnX, mnY);
+ awt::Size aSize(mnWidth, mnHeight);
+ xShape->setPosition(aPoint);
+ xShape->setSize(aSize);
+
+ if(mnRadius)
+ {
+ uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Any aAny;
+ aAny <<= mnRadius;
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("CornerRadius")), aAny);
+ }
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLLineShapeContext, SdXMLShapeContext );
+
+SdXMLLineShapeContext::SdXMLLineShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
+ mnX1( 0L ),
+ mnY1( 0L ),
+ mnX2( 1L ),
+ mnY2( 1L )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetLineShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_LINESHAPE_X1:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnX1, sValue);
+ break;
+ }
+ case XML_TOK_LINESHAPE_Y1:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnY1, sValue);
+ break;
+ }
+ case XML_TOK_LINESHAPE_X2:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnX2, sValue);
+ break;
+ }
+ case XML_TOK_LINESHAPE_Y2:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnY2, sValue);
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLLineShapeContext::~SdXMLLineShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create rectangle shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape(xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.LineShape"))), uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ // Add, set Style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+
+ // set local parameters on shape
+ uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ drawing::PointSequenceSequence aPolyPoly(1L);
+ drawing::PointSequence* pOuterSequence = aPolyPoly.getArray();
+ pOuterSequence->realloc(2L);
+ awt::Point* pInnerSequence = pOuterSequence->getArray();
+ uno::Any aAny;
+
+ *pInnerSequence = awt::Point( mnX1, mnY1 );
+ pInnerSequence++;
+ *pInnerSequence = awt::Point( mnX2, mnY2 );
+
+ aAny <<= aPolyPoly;
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygon")), aAny);
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLEllipseShapeContext, SdXMLShapeContext );
+
+SdXMLEllipseShapeContext::SdXMLEllipseShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
+ mnCX( 0L ),
+ mnCY( 0L ),
+ mnRX( 1L ),
+ mnRY( 1L )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetEllipseShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_ELLIPSESHAPE_CX:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnCX, sValue);
+ break;
+ }
+ case XML_TOK_ELLIPSESHAPE_CY:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnCY, sValue);
+ break;
+ }
+ case XML_TOK_ELLIPSESHAPE_RX:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnRX, sValue);
+ break;
+ }
+ case XML_TOK_ELLIPSESHAPE_RY:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnRY, sValue);
+ break;
+ }
+ case XML_TOK_ELLIPSESHAPE_R:
+ {
+ // single radius, it's a circle and both radii are the same
+ GetImport().GetMM100UnitConverter().convertMeasure(mnRX, sValue);
+ mnRY = mnRX;
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLEllipseShapeContext::~SdXMLEllipseShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLEllipseShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create rectangle shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape(xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.EllipseShape"))),
+ uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ // Add, set Style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+
+ // set local parameters on shape
+ awt::Point aPoint(mnCX - mnRX, mnCY - mnRY);
+ awt::Size aSize(mnRX + mnRX, mnRY + mnRY);
+ xShape->setPosition(aPoint);
+ xShape->setSize(aSize);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLPolygonShapeContext, SdXMLShapeContext );
+
+SdXMLPolygonShapeContext::SdXMLPolygonShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes, sal_Bool bClosed)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
+ mnX( 0L ),
+ mnY( 0L ),
+ mnWidth( 1L ),
+ mnHeight( 1L ),
+ mbClosed( bClosed )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetPolygonShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_POLYGONSHAPE_VIEWBOX:
+ {
+ maViewBox = sValue;
+ break;
+ }
+ case XML_TOK_POLYGONSHAPE_POINTS:
+ {
+ maPoints = sValue;
+ break;
+ }
+ case XML_TOK_POLYGONSHAPE_X:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnX, sValue);
+ break;
+ }
+ case XML_TOK_POLYGONSHAPE_Y:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnY, sValue);
+ break;
+ }
+ case XML_TOK_POLYGONSHAPE_WIDTH:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnWidth, sValue);
+ break;
+ }
+ case XML_TOK_POLYGONSHAPE_HEIGHT:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnHeight, sValue);
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLPolygonShapeContext::~SdXMLPolygonShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLPolygonShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create rectangle shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape(xServiceFact->createInstance(
+ mbClosed ? OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PolyPolygonShape"))
+ : OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PolyLineShape"))),
+ uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ // Add, set Style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+
+ // set local parameters on shape
+ uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ // set parameters on shape
+ awt::Point aPoint(mnX, mnY);
+ awt::Size aSize(mnWidth, mnHeight);
+ uno::Any aAny;
+
+ xShape->setPosition(aPoint);
+ xShape->setSize(aSize);
+
+ // set polygon
+ if(maPoints.getLength())
+ {
+ SdXMLImExViewBox aViewBox(maViewBox, GetImport().GetMM100UnitConverter());
+ SdXMLImExPointsElement aPoints(maPoints, aViewBox, aPoint, aSize, GetImport().GetMM100UnitConverter());
+
+ aAny <<= aPoints.GetPointSequenceSequence();
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygon")), aAny);
+ }
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLPathShapeContext, SdXMLShapeContext );
+
+SdXMLPathShapeContext::SdXMLPathShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
+ mnX( 0L ),
+ mnY( 0L ),
+ mnWidth( 1L ),
+ mnHeight( 1L ),
+ mbClosed( TRUE )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetPathShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_PATHSHAPE_VIEWBOX:
+ {
+ maViewBox = sValue;
+ break;
+ }
+ case XML_TOK_PATHSHAPE_D:
+ {
+ maD = sValue;
+ break;
+ }
+ case XML_TOK_PATHSHAPE_X:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnX, sValue);
+ break;
+ }
+ case XML_TOK_PATHSHAPE_Y:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnY, sValue);
+ break;
+ }
+ case XML_TOK_PATHSHAPE_WIDTH:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnWidth, sValue);
+ break;
+ }
+ case XML_TOK_PATHSHAPE_HEIGHT:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnHeight, sValue);
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLPathShapeContext::~SdXMLPathShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLPathShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create polygon shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ if(maD.getLength())
+ {
+ // prepare some of the parameters
+ uno::Reference< drawing::XShape > xShape;
+ awt::Point aPoint(mnX, mnY);
+ awt::Size aSize(mnWidth, mnHeight);
+ SdXMLImExViewBox aViewBox(maViewBox, GetImport().GetMM100UnitConverter());
+ SdXMLImExSvgDElement aPoints(maD, aViewBox, aPoint, aSize, GetImport().GetMM100UnitConverter());
+
+ // now create shape
+ if(aPoints.IsCurve())
+ {
+ if(aPoints.IsClosed())
+ {
+ xShape = uno::Reference< drawing::XShape > (
+ xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ClosedBezierShape"))),
+ uno::UNO_QUERY);
+ }
+ else
+ {
+ xShape = uno::Reference< drawing::XShape > (
+ xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OpenBezierShape"))),
+ uno::UNO_QUERY);
+ }
+ }
+ else
+ {
+ if(aPoints.IsClosed())
+ {
+ xShape = uno::Reference< drawing::XShape > (
+ xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PolyPolygonShape"))),
+ uno::UNO_QUERY);
+ }
+ else
+ {
+ xShape = uno::Reference< drawing::XShape > (
+ xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PolyLineShape"))),
+ uno::UNO_QUERY);
+ }
+ }
+
+ if(xShape.is())
+ {
+ // Add, set Style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+
+ // set local parameters on shape
+ uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Any aAny;
+
+ xShape->setPosition(aPoint);
+ xShape->setSize(aSize);
+
+ // set svg:d
+ if(maD.getLength())
+ {
+ if(aPoints.IsCurve())
+ {
+ drawing::PolyPolygonBezierCoords aSourcePolyPolygon(
+ aPoints.GetPointSequenceSequence(),
+ aPoints.GetFlagSequenceSequence());
+
+ aAny <<= aSourcePolyPolygon;
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier")), aAny);
+ }
+ else
+ {
+ aAny <<= aPoints.GetPointSequenceSequence();
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygon")), aAny);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLTextBoxShapeContext, SdXMLShapeContext );
+
+SdXMLTextBoxShapeContext::SdXMLTextBoxShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
+ mnX( 0L ),
+ mnY( 0L ),
+ mnWidth( 1L ),
+ mnHeight( 1L )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetTextBoxShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_TEXTBOXSHAPE_X:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnX, sValue);
+ break;
+ }
+ case XML_TOK_TEXTBOXSHAPE_Y:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnY, sValue);
+ break;
+ }
+ case XML_TOK_TEXTBOXSHAPE_WIDTH:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnWidth, sValue);
+ break;
+ }
+ case XML_TOK_TEXTBOXSHAPE_HEIGHT:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnHeight, sValue);
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLTextBoxShapeContext::~SdXMLTextBoxShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create textbox shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape;
+ sal_Bool bIsPresShape(FALSE);
+
+ if(maPresentationClass.getLength())
+ {
+ if(maPresentationClass.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_subtitle))))
+ {
+ // XmlShapeTypePresSubtitleShape
+ xShape = uno::Reference< drawing::XShape > (xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.SubtitleShape"))), uno::UNO_QUERY);
+ bIsPresShape = TRUE;
+ }
+ else if(maPresentationClass.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_title))))
+ {
+ // XmlShapeTypePresTitleTextShape
+ xShape = uno::Reference< drawing::XShape > (xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.TitleTextShape"))), uno::UNO_QUERY);
+ bIsPresShape = TRUE;
+ }
+ else if(maPresentationClass.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_outline))))
+ {
+ // XmlShapeTypePresOutlinerShape
+ xShape = uno::Reference< drawing::XShape > (xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.OutlinerShape"))), uno::UNO_QUERY);
+ bIsPresShape = TRUE;
+ }
+ else if(maPresentationClass.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_presentation_notes))))
+ {
+ // XmlShapeTypePresNotesShape
+ xShape = uno::Reference< drawing::XShape > (xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.NotesShape"))), uno::UNO_QUERY);
+ bIsPresShape = TRUE;
+ }
+ }
+ else
+ {
+ // normal text shape
+ xShape = uno::Reference< drawing::XShape > (xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TextShape"))), uno::UNO_QUERY);
+ }
+
+ if(xShape.is())
+ {
+ // Add, set Style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+
+ if(bIsPresShape && mbIsPlaceholder)
+ {
+ // Do something special if this is a placeholder (?)
+
+
+
+ }
+
+ if(!bIsPresShape || mbIsUserTransformed)
+ {
+ // set pos and size on shape, this should remove binding
+ // to pres object on masterpage
+ awt::Point aPoint(mnX, mnY);
+ awt::Size aSize(mnWidth, mnHeight);
+ xShape->setPosition(aPoint);
+ xShape->setSize(aSize);
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLControlShapeContext, SdXMLShapeContext );
+
+SdXMLControlShapeContext::SdXMLControlShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
+ mnX( 0L ),
+ mnY( 0L ),
+ mnWidth( 1L ),
+ mnHeight( 1L )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetControlShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_CONTROLSHAPE_X:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnX, sValue);
+ break;
+ }
+ case XML_TOK_CONTROLSHAPE_Y:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnY, sValue);
+ break;
+ }
+ case XML_TOK_CONTROLSHAPE_WIDTH:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnWidth, sValue);
+ break;
+ }
+ case XML_TOK_CONTROLSHAPE_HEIGHT:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnHeight, sValue);
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLControlShapeContext::~SdXMLControlShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLControlShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create Control shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape(xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"))), uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ // add, set style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+
+ // set local parameters on shape
+ awt::Point aPoint(mnX, mnY);
+ awt::Size aSize(mnWidth, mnHeight);
+ xShape->setPosition(aPoint);
+ xShape->setSize(aSize);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLConnectorShapeContext, SdXMLShapeContext );
+
+SdXMLConnectorShapeContext::SdXMLConnectorShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes )
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLConnectorShapeContext::~SdXMLConnectorShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create Connector shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape(xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ConnectorShape"))), uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ // add, set style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLMeasureShapeContext, SdXMLShapeContext );
+
+SdXMLMeasureShapeContext::SdXMLMeasureShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes )
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLMeasureShapeContext::~SdXMLMeasureShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLMeasureShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create Measure shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape(xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.MeasureShape"))), uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ // add, set style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLPageShapeContext, SdXMLShapeContext );
+
+SdXMLPageShapeContext::SdXMLPageShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
+ mnX( 0L ),
+ mnY( 0L ),
+ mnWidth( 1L ),
+ mnHeight( 1L )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetPageShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_PAGESHAPE_X:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnX, sValue);
+ break;
+ }
+ case XML_TOK_PAGESHAPE_Y:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnY, sValue);
+ break;
+ }
+ case XML_TOK_PAGESHAPE_WIDTH:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnWidth, sValue);
+ break;
+ }
+ case XML_TOK_PAGESHAPE_HEIGHT:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnHeight, sValue);
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLPageShapeContext::~SdXMLPageShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLPageShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create Page shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape(xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PageShape"))), uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ // add, set style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+
+ // set local parameters on shape
+ awt::Point aPoint(mnX, mnY);
+ awt::Size aSize(mnWidth, mnHeight);
+ xShape->setPosition(aPoint);
+ xShape->setSize(aSize);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLCaptionShapeContext, SdXMLShapeContext );
+
+SdXMLCaptionShapeContext::SdXMLCaptionShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes )
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLCaptionShapeContext::~SdXMLCaptionShapeContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLCaptionShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ // create Caption shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< drawing::XShape > xShape(xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape"))), uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ // add, set style and properties from base shape
+ AddShape(xShape);
+ SetStyle();
+ SdXMLShapeContext::StartElement(xAttrList);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLGraphicObjectShapeContext, SdXMLShapeContext );
+
+SdXMLGraphicObjectShapeContext::SdXMLGraphicObjectShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
+ mnX( 0L ),
+ mnY( 0L ),
+ mnWidth( 1L ),
+ mnHeight( 1L )
+{
+ OUString aURL;
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetGraphicObjectShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_GOSHAPE_X:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnX, sValue);
+ break;
+ }
+ case XML_TOK_GOSHAPE_Y:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnY, sValue);
+ break;
+ }
+ case XML_TOK_GOSHAPE_WIDTH:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnWidth, sValue);
+ break;
+ }
+ case XML_TOK_GOSHAPE_HEIGHT:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnHeight, sValue);
+ break;
+ }
+ case XML_TOK_GOSHAPE_URL:
+ {
+ aURL = sValue;
+ }
+ }
+ }
+
+ // create graphic object shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ OUString aType(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape"));
+ if( maPresentationClass.getLength() )
+ aType = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.GraphicObjectShape"));
+
+ uno::Reference< drawing::XShape > xShape( xServiceFact->createInstance( aType ), uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ rShapes->add( xShape );
+
+ if( !mbIsPlaceholder )
+ {
+ uno::Reference< beans::XPropertySet > xProps(xShape, uno::UNO_QUERY);
+ if(xProps.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
+ if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") )))
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ), ::cppu::bool2any( sal_False ) );
+
+ if( aURL.getLength() )
+ {
+ uno::Any aAny;
+ aAny <<= aURL;
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicURL") ), aAny );
+ }
+ }
+ }
+ }
+
+ SetStyle();
+
+ // set local parameters on shape
+ awt::Point aPoint(mnX, mnY);
+ awt::Size aSize(mnWidth, mnHeight);
+ xShape->setPosition(aPoint);
+ xShape->setSize(aSize);
+
+ SdXMLShapeContext::StartElement(xAttrList);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLGraphicObjectShapeContext::~SdXMLGraphicObjectShapeContext()
+{
+
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLChartShapeContext, SdXMLShapeContext );
+
+SdXMLChartShapeContext::SdXMLChartShapeContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
+ mnX( 0L ),
+ mnY( 0L ),
+ mnWidth( 1L ),
+ mnHeight( 1L ),
+ mpChartContext( NULL )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetImport().GetShapeImport()->GetRectShapeAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_RECTSHAPE_X:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnX, sValue);
+ break;
+ }
+ case XML_TOK_RECTSHAPE_Y:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnY, sValue);
+ break;
+ }
+ case XML_TOK_RECTSHAPE_WIDTH:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnWidth, sValue);
+ break;
+ }
+ case XML_TOK_RECTSHAPE_HEIGHT:
+ {
+ GetImport().GetMM100UnitConverter().convertMeasure(mnHeight, sValue);
+ break;
+ }
+ }
+ }
+
+ // create rectangle shape
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ OUString aType(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape"));
+ if( maPresentationClass.getLength() )
+ aType = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.ChartShape"));
+
+ uno::Reference< drawing::XShape > xShape( xServiceFact->createInstance( aType ), uno::UNO_QUERY);
+ if(xShape.is())
+ {
+ rShapes->add( xShape );
+
+ if( !mbIsPlaceholder )
+ {
+ uno::Reference< beans::XPropertySet > xProps(xShape, uno::UNO_QUERY);
+ if(xProps.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() );
+ if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") )))
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ), ::cppu::bool2any( sal_False ) );
+
+ uno::Any aAny;
+
+ const OUString aCLSID( RTL_CONSTASCII_USTRINGPARAM("BF884321-85DD-11D1-89d0-008029e4b0b1"));
+ aAny <<= aCLSID;
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID") ), aAny );
+
+ aAny = xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ) );
+ uno::Reference< frame::XModel > xChartModel;
+ if( aAny >>= xChartModel )
+ {
+ mpChartContext = rImport.GetChartImport()->CreateChartContext( rImport, nPrfx, rLocalName, xChartModel, xAttrList );
+ }
+ }
+ }
+ }
+
+ SetStyle();
+
+ // set local parameters on shape
+ awt::Point aPoint(mnX, mnY);
+ awt::Size aSize(mnWidth, mnHeight);
+ xShape->setPosition(aPoint);
+ xShape->setSize(aSize);
+
+ SdXMLChartShapeContext::StartElement(xAttrList);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLChartShapeContext::~SdXMLChartShapeContext()
+{
+ if( mpChartContext )
+ delete mpChartContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+{
+ if( mpChartContext )
+ mpChartContext->StartElement( xAttrList );
+}
+
+void SdXMLChartShapeContext::EndElement()
+{
+ if( mpChartContext )
+ mpChartContext->EndElement();
+}
+
+void SdXMLChartShapeContext::Characters( const ::rtl::OUString& rChars )
+{
+ if( mpChartContext )
+ mpChartContext->EndElement();
+}
+
+
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
new file mode 100644
index 0000000000..5b28c0aa1b
--- /dev/null
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -0,0 +1,395 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximpshap.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XIMPSHAPE_HXX
+#define _XIMPSHAPE_HXX
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+#ifndef _SDXMLIMP_HXX
+#include "sdxmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XSHAPES_HPP_
+#include <com/sun/star/drawing/XShapes.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTCURSOR_HPP_
+#include <com/sun/star/text/XTextCursor.hpp>
+#endif
+
+#ifndef _RTTI_HXX
+#include <tools/rtti.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// common shape context
+
+class SdXMLShapeContext : public SvXMLImportContext
+{
+protected:
+ // the shape group this object should be created inside
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxShapes;
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mxShape;
+ com::sun::star::uno::Reference< com::sun::star::text::XTextCursor > mxCursor;
+ rtl::OUString maDrawStyleName;
+ rtl::OUString maPresentationClass;
+ sal_Int32 mnRotate;
+ sal_uInt16 mnStyleFamily;
+ sal_uInt16 mnClass;
+ sal_Bool mbIsPlaceholder;
+ sal_Bool mbIsUserTransformed;
+
+ void SetStyle();
+ void AddShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape);
+
+public:
+ TYPEINFO();
+
+ SdXMLShapeContext( SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLShapeContext();
+
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+
+ virtual SvXMLImportContext * CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:rect context
+
+class SdXMLRectShapeContext : public SdXMLShapeContext
+{
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+ sal_Int32 mnRadius;
+
+public:
+ TYPEINFO();
+
+ SdXMLRectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLRectShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:line context
+
+class SdXMLLineShapeContext : public SdXMLShapeContext
+{
+ sal_Int32 mnX1;
+ sal_Int32 mnY1;
+ sal_Int32 mnX2;
+ sal_Int32 mnY2;
+
+public:
+ TYPEINFO();
+
+ SdXMLLineShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLLineShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:ellipse and draw:circle context
+
+class SdXMLEllipseShapeContext : public SdXMLShapeContext
+{
+ sal_Int32 mnCX;
+ sal_Int32 mnCY;
+ sal_Int32 mnRX;
+ sal_Int32 mnRY;
+
+public:
+ TYPEINFO();
+
+ SdXMLEllipseShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLEllipseShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:polyline and draw:polygon context
+
+class SdXMLPolygonShapeContext : public SdXMLShapeContext
+{
+ rtl::OUString maPoints;
+ rtl::OUString maViewBox;
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+ sal_Bool mbClosed;
+
+public:
+ TYPEINFO();
+
+ SdXMLPolygonShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, sal_Bool bClosed);
+ virtual ~SdXMLPolygonShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:path context
+
+class SdXMLPathShapeContext : public SdXMLShapeContext
+{
+ rtl::OUString maD;
+ rtl::OUString maViewBox;
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+ sal_Bool mbClosed;
+
+public:
+ TYPEINFO();
+
+ SdXMLPathShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLPathShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:text-box context
+
+class SdXMLTextBoxShapeContext : public SdXMLShapeContext
+{
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+
+public:
+ TYPEINFO();
+
+ SdXMLTextBoxShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLTextBoxShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:control context
+
+class SdXMLControlShapeContext : public SdXMLShapeContext
+{
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+
+public:
+ TYPEINFO();
+
+ SdXMLControlShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLControlShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:connector context
+
+class SdXMLConnectorShapeContext : public SdXMLShapeContext
+{
+public:
+ TYPEINFO();
+
+ SdXMLConnectorShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLConnectorShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:measure context
+
+class SdXMLMeasureShapeContext : public SdXMLShapeContext
+{
+public:
+ TYPEINFO();
+
+ SdXMLMeasureShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLMeasureShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:page context
+
+class SdXMLPageShapeContext : public SdXMLShapeContext
+{
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+
+public:
+ TYPEINFO();
+
+ SdXMLPageShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLPageShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:caption context
+
+class SdXMLCaptionShapeContext : public SdXMLShapeContext
+{
+public:
+ TYPEINFO();
+
+ SdXMLCaptionShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLCaptionShapeContext();
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// office:image context
+
+class SdXMLGraphicObjectShapeContext : public SdXMLShapeContext
+{
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+
+public:
+ TYPEINFO();
+
+ SdXMLGraphicObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLGraphicObjectShapeContext();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// chart:chart context
+
+class SdXMLChartShapeContext : public SdXMLShapeContext
+{
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+ SvXMLImportContext* mpChartContext;
+
+public:
+ TYPEINFO();
+
+ SdXMLChartShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLChartShapeContext();
+
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void EndElement();
+ virtual void Characters( const ::rtl::OUString& rChars );
+
+};
+
+#endif // _XIMPSHAPE_HXX
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
new file mode 100644
index 0000000000..5a29080304
--- /dev/null
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -0,0 +1,1086 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximpstyl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _XIMPSTYLE_HXX
+#include "ximpstyl.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLSHAPESTYLECONTEXT_HXX
+#include "XMLShapeStyleContext.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XIMPNOTES_HXX
+#include "ximpnote.hxx"
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGES_HPP_
+#include <com/sun/star/drawing/XDrawPages.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
+#include <com/sun/star/container/XNamed.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLPROPERTYSETCONTEXT_HXX
+#include "xmlprcon.hxx"
+#endif
+
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLPageMasterContext, SvXMLStyleContext );
+
+SdXMLPageMasterContext::SdXMLPageMasterContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList),
+ mnBorderBottom( 0L ),
+ mnBorderLeft( 0L ),
+ mnBorderRight( 0L ),
+ mnBorderTop( 0L ),
+ mnWidth( 0L ),
+ mnHeight( 0L ),
+ meOrientation(GetSdImport().IsDraw() ? view::PaperOrientation_PORTRAIT : view::PaperOrientation_LANDSCAPE)
+{
+ // set family to somethiong special at SvXMLStyleContext
+ // for differences in search-methods
+ SetFamily(XML_STYLE_FAMILY_SD_PAGEMASTERCONEXT_ID);
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex(i);
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetSdImport().GetNamespaceMap().GetKeyByAttrName(sAttrName, &aLocalName);
+ OUString sValue = xAttrList->getValueByIndex(i);
+ const SvXMLTokenMap& rAttrTokenMap = GetSdImport().GetPageMasterAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_PAGEMASTER_NAME:
+ {
+ msName = sValue;
+ break;
+ }
+ case XML_TOK_PAGEMASTER_MARGIN_TOP:
+ {
+ GetSdImport().GetMM100UnitConverter().convertMeasure(mnBorderTop, sValue);
+ break;
+ }
+ case XML_TOK_PAGEMASTER_MARGIN_BOTTOM:
+ {
+ GetSdImport().GetMM100UnitConverter().convertMeasure(mnBorderBottom, sValue);
+ break;
+ }
+ case XML_TOK_PAGEMASTER_MARGIN_LEFT:
+ {
+ GetSdImport().GetMM100UnitConverter().convertMeasure(mnBorderLeft, sValue);
+ break;
+ }
+ case XML_TOK_PAGEMASTER_MARGIN_RIGHT:
+ {
+ GetSdImport().GetMM100UnitConverter().convertMeasure(mnBorderRight, sValue);
+ break;
+ }
+ case XML_TOK_PAGEMASTER_PAGE_WIDTH:
+ {
+ GetSdImport().GetMM100UnitConverter().convertMeasure(mnWidth, sValue);
+ break;
+ }
+ case XML_TOK_PAGEMASTER_PAGE_HEIGHT:
+ {
+ GetSdImport().GetMM100UnitConverter().convertMeasure(mnHeight, sValue);
+ break;
+ }
+ case XML_TOK_PAGEMASTER_PAGE_ORIENTATION:
+ {
+ if(sValue.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_orientation_portrait))))
+ meOrientation = view::PaperOrientation_PORTRAIT;
+ else
+ meOrientation = view::PaperOrientation_LANDSCAPE;
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLPageMasterContext::~SdXMLPageMasterContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLPresentationPageLayoutContext, SvXMLStyleContext );
+
+SdXMLPresentationPageLayoutContext::SdXMLPresentationPageLayoutContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList)
+: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList),
+ mnTypeId( 20 ) // AUTOLAYOUT_NONE
+{
+ // set family to somethiong special at SvXMLStyleContext
+ // for differences in search-methods
+ SetFamily(XML_STYLE_FAMILY_SD_PRESENTATIONPAGELAYOUT_ID);
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName );
+
+ if(nPrefix == XML_NAMESPACE_STYLE && aLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_name))))
+ {
+ msName = xAttrList->getValueByIndex( i );
+ }
+ }
+}
+
+SdXMLPresentationPageLayoutContext::~SdXMLPresentationPageLayoutContext()
+{
+}
+
+SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+
+ if(nPrefix == XML_NAMESPACE_PRESENTATION && rLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_placeholder))))
+ {
+ // presentation:placeholder inside style:presentation-page-layout context
+ pContext = new SdXMLPresentationPlaceholderContext(
+ GetSdImport(), nPrefix, rLocalName, xAttrList);
+
+ // remember SdXMLPresentationPlaceholderContext for later evaluation
+ if(pContext)
+ {
+ pContext->AddRef();
+ maList.Insert((SdXMLPresentationPlaceholderContext*)pContext, LIST_APPEND);
+ }
+ }
+
+ // call base class
+ if(!pContext)
+ pContext = SvXMLStyleContext::CreateChildContext(nPrefix, rLocalName, xAttrList);
+
+ return pContext;
+}
+
+void SdXMLPresentationPageLayoutContext::EndElement()
+{
+ // build presentation page layout type here
+ // calc mnTpeId due to content of maList
+ // at the moment only use number of types used there
+ if(maList.Count())
+ {
+ SdXMLPresentationPlaceholderContext* pObj0 = maList.GetObject(0);
+ if(pObj0->GetName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("handout"))))
+ {
+ if(maList.Count() == 1)
+ mnTypeId = 22; // AUTOLAYOUT_HANDOUT1
+ if(maList.Count() == 2)
+ mnTypeId = 23; // AUTOLAYOUT_HANDOUT2
+ if(maList.Count() == 3)
+ mnTypeId = 24; // AUTOLAYOUT_HANDOUT3
+ if(maList.Count() == 4)
+ mnTypeId = 25; // AUTOLAYOUT_HANDOUT4
+ else
+ mnTypeId = 26; // AUTOLAYOUT_HANDOUT6
+ }
+ else
+ {
+ switch(maList.Count())
+ {
+ case 1:
+ {
+ mnTypeId = 19; // AUTOLAYOUT_ONLY_TITLE
+ break;
+ }
+ case 2:
+ {
+ SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1);
+
+ if(pObj1->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("subtitle"))))
+ {
+ mnTypeId = 0; // AUTOLAYOUT_TITLE
+ }
+ else if(pObj1->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("outline"))))
+ {
+ mnTypeId = 1; // AUTOLAYOUT_ENUM
+ }
+ else if(pObj1->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("chart"))))
+ {
+ mnTypeId = 2; // AUTOLAYOUT_CHART
+ }
+ else if(pObj1->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("table"))))
+ {
+ mnTypeId = 8; // AUTOLAYOUT_TAB
+ }
+ else if(pObj1->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("object"))))
+ {
+ mnTypeId = 11; // AUTOLAYOUT_OBJ
+ }
+ else
+ {
+ mnTypeId = 21; // AUTOLAYOUT_NOTES
+ }
+ break;
+ }
+ case 3:
+ {
+ SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1);
+ SdXMLPresentationPlaceholderContext* pObj2 = maList.GetObject(2);
+
+ if(pObj1->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("outline"))))
+ {
+ if(pObj2->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("outline"))))
+ {
+ mnTypeId = 3; // AUTOLAYOUT_2TEXT
+ }
+ else if(pObj2->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("chart"))))
+ {
+ mnTypeId = 4; // AUTOLAYOUT_TEXTCHART
+ }
+ else if(pObj2->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("chart"))))
+ {
+ mnTypeId = 6; // AUTOLAYOUT_TEXTCLIP
+ }
+ else
+ {
+ if(pObj1->GetX() < pObj2->GetX())
+ {
+ mnTypeId = 10; // AUTOLAYOUT_TEXTOBJ -> outline left, object right
+ }
+ else
+ {
+ mnTypeId = 17; // AUTOLAYOUT_TEXTOVEROBJ -> outline top, object right
+ }
+ }
+ }
+ else if(pObj1->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("chart"))))
+ {
+ mnTypeId = 7; // AUTOLAYOUT_CHARTTEXT
+ }
+ else if(pObj1->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("graphic"))))
+ {
+ mnTypeId = 9; // AUTOLAYOUT_CLIPTEXT
+ }
+ else
+ {
+ if(pObj1->GetX() < pObj2->GetX())
+ {
+ mnTypeId = 13; // AUTOLAYOUT_OBJTEXT -> left, right
+ }
+ else
+ {
+ mnTypeId = 14; // AUTOLAYOUT_OBJOVERTEXT -> top, bottom
+ }
+ }
+ break;
+ }
+ case 4:
+ {
+ SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1);
+ SdXMLPresentationPlaceholderContext* pObj2 = maList.GetObject(2);
+
+ if(pObj1->GetName().equals(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("object"))))
+ {
+ if(pObj1->GetX() < pObj2->GetX())
+ {
+ mnTypeId = 16; // AUTOLAYOUT_2OBJOVERTEXT
+ }
+ else
+ {
+ mnTypeId = 15; // AUTOLAYOUT_2OBJTEXT
+ }
+ }
+ else
+ {
+ mnTypeId = 12; // AUTOLAYOUT_TEXT2OBJ
+ }
+ break;
+ }
+ default: // 5 items
+ {
+ mnTypeId = 18; // AUTOLAYOUT_4OBJ
+ break;
+ }
+ }
+ }
+
+ // release remembered contexts, they are no longer needed
+ while(maList.Count())
+ maList.Remove(maList.Count() - 1)->ReleaseRef();
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLPresentationPlaceholderContext::SdXMLPresentationPlaceholderContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx, const
+ OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList>& xAttrList)
+: SvXMLImportContext( rImport, nPrfx, rLName),
+ mnX(0L),
+ mnY(0L),
+ mnWidth(1L),
+ mnHeight(1L)
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex(i);
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetSdImport().GetNamespaceMap().GetKeyByAttrName(sAttrName, &aLocalName);
+ OUString sValue = xAttrList->getValueByIndex(i);
+ const SvXMLTokenMap& rAttrTokenMap = GetSdImport().GetPresentationPlaceholderAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_PRESENTATIONPLACEHOLDER_OBJECTNAME:
+ {
+ msName = sValue;
+ break;
+ }
+ case XML_TOK_PRESENTATIONPLACEHOLDER_X:
+ {
+ GetSdImport().GetMM100UnitConverter().convertMeasure(mnX, sValue);
+ break;
+ }
+ case XML_TOK_PRESENTATIONPLACEHOLDER_Y:
+ {
+ GetSdImport().GetMM100UnitConverter().convertMeasure(mnY, sValue);
+ break;
+ }
+ case XML_TOK_PRESENTATIONPLACEHOLDER_WIDTH:
+ {
+ GetSdImport().GetMM100UnitConverter().convertMeasure(mnWidth, sValue);
+ break;
+ }
+ case XML_TOK_PRESENTATIONPLACEHOLDER_HEIGHT:
+ {
+ GetSdImport().GetMM100UnitConverter().convertMeasure(mnHeight, sValue);
+ break;
+ }
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLPresentationPlaceholderContext::~SdXMLPresentationPlaceholderContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLMasterPageContext, SdXMLGroupShapeContext );
+
+SdXMLMasterPageContext::SdXMLMasterPageContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList>& xAttrList,
+ uno::Reference< drawing::XShapes >& rShapes)
+: SdXMLGroupShapeContext( rImport, nPrfx, rLName, rShapes )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for(sal_Int16 i=0; i < nAttrCount; i++)
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetSdImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ const SvXMLTokenMap& rAttrTokenMap = GetSdImport().GetMasterPageAttrTokenMap();
+
+ switch(rAttrTokenMap.Get(nPrefix, aLocalName))
+ {
+ case XML_TOK_MASTERPAGE_NAME:
+ {
+ msName = sValue;
+ break;
+ }
+ case XML_TOK_MASTERPAGE_PAGE_MASTER_NAME:
+ {
+ msPageMasterName = sValue;
+ break;
+ }
+ }
+ }
+
+ // set page name?
+ if(msName.getLength() && GetLocalShapesContext().is())
+ {
+ uno::Reference < container::XNamed > xNamed(GetLocalShapesContext(), uno::UNO_QUERY);
+ if(xNamed.is())
+ xNamed->setName(msName);
+ }
+
+ // set page-master?
+ if(msPageMasterName.getLength() && GetSdImport().GetShapeImport()->GetStylesContext())
+ {
+ // look for PageMaster with this name
+ const SvXMLStyleContext* pStyle =
+ GetSdImport().GetShapeImport()->GetStylesContext()->FindStyleChildContext(
+ XML_STYLE_FAMILY_SD_PAGEMASTERCONEXT_ID, msPageMasterName);
+
+ if(pStyle && pStyle->ISA(SdXMLPageMasterContext))
+ {
+ const SdXMLPageMasterContext* pPageMaster = (SdXMLPageMasterContext*)pStyle;
+
+ uno::Reference< drawing::XDrawPage > xMasterPage(
+ GetLocalShapesContext(), uno::UNO_QUERY);
+ if(xMasterPage.is())
+ {
+ // set sizes for this masterpage
+ uno::Reference <beans::XPropertySet> xPropSet(xMasterPage, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Any aAny;
+
+ aAny <<= pPageMaster->GetBorderBottom();
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("BorderBottom")), aAny);
+
+ aAny <<= pPageMaster->GetBorderLeft();
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("BorderLeft")), aAny);
+
+ aAny <<= pPageMaster->GetBorderRight();
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("BorderRight")), aAny);
+
+ aAny <<= pPageMaster->GetBorderTop();
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("BorderTop")), aAny);
+
+ aAny <<= pPageMaster->GetWidth();
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Width")), aAny);
+
+ aAny <<= pPageMaster->GetHeight();
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Height")), aAny);
+
+ aAny <<= pPageMaster->GetOrientation();
+ xPropSet->setPropertyValue(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Orientation")), aAny);
+ }
+ }
+ }
+ }
+
+ // now delete all up-to-now contained shapes.
+ while(rShapes->getCount())
+ {
+ uno::Reference< drawing::XShape > xShape;
+ uno::Any aAny(rShapes->getByIndex(0L));
+
+ aAny >>= xShape;
+
+ if(xShape.is())
+ {
+ rShapes->remove(xShape);
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLMasterPageContext::~SdXMLMasterPageContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SdXMLMasterPageContext::EndElement()
+{
+ // set styles on master-page
+ if(msName.getLength() && GetSdImport().GetShapeImport()->GetStylesContext())
+ {
+ SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetStylesContext();
+ if( pContext && pContext->ISA( SvXMLStyleContext ) )
+ ((SdXMLStylesContext*)pContext)->SetMasterPageStyles(*this);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLImportContext* SdXMLMasterPageContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList>& xAttrList )
+{
+ SvXMLImportContext* pContext = 0;
+ const SvXMLTokenMap& rTokenMap = GetSdImport().GetMasterPageElemTokenMap();
+
+ // some special objects inside style:masterpage context
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ case XML_TOK_MASTERPAGE_STYLE:
+ {
+ if(GetSdImport().GetShapeImport()->GetStylesContext())
+ {
+ // style:style inside master-page context -> presentation style
+ XMLShapeStyleContext* pNew = new XMLShapeStyleContext(
+ GetSdImport(), nPrefix, rLocalName, xAttrList,
+ *GetSdImport().GetShapeImport()->GetStylesContext(),
+ XML_STYLE_FAMILY_SD_PRESENTATION_ID);
+
+ // add this style to the outer StylesContext class for later processing
+ if(pNew)
+ {
+ pContext = pNew;
+ GetSdImport().GetShapeImport()->GetStylesContext()->AddStyle(*pNew);
+ }
+ }
+ break;
+ }
+ case XML_TOK_MASTERPAGE_NOTES:
+ {
+ // presentation:notes inside master-page context
+ pContext = new SdXMLNotesContext( GetSdImport(), nPrefix, rLocalName,
+ GetLocalShapesContext());
+ break;
+ }
+ }
+
+ // call base class
+ if(!pContext)
+ pContext = SdXMLGroupShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList);
+
+ return pContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( SdXMLStylesContext, SvXMLStyleContext );
+
+SdXMLStylesContext::SdXMLStylesContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ sal_Bool bIsAutoStyle)
+: SvXMLStylesContext(rImport, nPrfx, rLName, xAttrList),
+ mbIsAutoStyle(bIsAutoStyle)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SdXMLStylesContext::~SdXMLStylesContext()
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList)
+{
+ SvXMLStyleContext* pContext = 0;
+ const SvXMLTokenMap& rTokenMap = GetSdImport().GetStylesElemTokenMap();
+
+ switch(rTokenMap.Get(nPrefix, rLocalName))
+ {
+ case XML_TOK_STYLES_PAGE_MASTER:
+ {
+ // style:page-master inside office:styles context
+ pContext = new SdXMLPageMasterContext(GetSdImport(), nPrefix, rLocalName, xAttrList);
+ break;
+ }
+ case XML_TOK_STYLES_PRESENTATION_PAGE_LAYOUT:
+ {
+ // style:presentation-page-layout inside office:styles context
+ pContext = new SdXMLPresentationPageLayoutContext(GetSdImport(), nPrefix, rLocalName, xAttrList);
+ break;
+ }
+ }
+
+ // call base class
+ if(!pContext)
+ pContext = SvXMLStylesContext::CreateStyleChildContext(nPrefix, rLocalName, xAttrList);
+
+ return pContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+SvXMLStyleContext* SdXMLStylesContext::CreateStyleStyleChildContext(
+ sal_uInt16 nFamily,
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList)
+{
+ SvXMLStyleContext* pContext = 0;
+
+// if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily
+// || XML_STYLE_FAMILY_SD_PRESENTATION_ID == nFamily
+// || XML_STYLE_FAMILY_SD_POOL_ID == nFamily
+// || XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID == nFamily)
+// {
+// // style:style inside office:automatic-styles context
+// pContext = new XMLShapeStyleContext(
+// GetSdImport(), nPrefix, rLocalName, xAttrList, *this, nFamily);
+// }
+
+ // call base class
+ if(!pContext)
+ pContext = SvXMLStylesContext::CreateStyleStyleChildContext(nFamily, nPrefix, rLocalName, xAttrList);
+
+ return pContext;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+sal_uInt16 SdXMLStylesContext::GetFamily( const OUString& rFamily ) const
+{
+// if(rFamily.getLength())
+// {
+// if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME))))
+// return XML_STYLE_FAMILY_SD_GRAPHICS_ID;
+//
+// if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_NAME))))
+// return XML_STYLE_FAMILY_SD_PRESENTATION_ID;
+//
+// if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_POOL_NAME))))
+// return XML_STYLE_FAMILY_SD_POOL_ID;
+//
+// if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME))))
+// return XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID;
+// }
+
+ // call base class
+ return SvXMLStylesContext::GetFamily(rFamily);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+UniReference< SvXMLImportPropertyMapper > SdXMLStylesContext::GetImportPropertyMapper(
+ sal_uInt16 nFamily) const
+{
+ UniReference < SvXMLImportPropertyMapper > xMapper;
+
+// if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily
+// || XML_STYLE_FAMILY_SD_PRESENTATION_ID == nFamily
+// || XML_STYLE_FAMILY_SD_POOL_ID == nFamily)
+// {
+// if(!xPropImpPropMapper.is())
+// {
+// UniReference< XMLShapeImportHelper > aImpHelper = ((SvXMLImport&)GetImport()).GetShapeImport();
+// ((SdXMLStylesContext*)this)->xPropImpPropMapper =
+// new SvXMLImportPropertyMapper(aImpHelper->GetPropertySetMapper());
+// }
+// xMapper = xPropImpPropMapper;
+// return xMapper;
+// }
+
+ if(XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID == nFamily)
+ {
+ if(!xPresImpPropMapper.is())
+ {
+ UniReference< XMLShapeImportHelper > aImpHelper = ((SvXMLImport&)GetImport()).GetShapeImport();
+ ((SdXMLStylesContext*)this)->xPresImpPropMapper =
+ new SvXMLImportPropertyMapper(aImpHelper->GetPresPagePropsMapper());
+ }
+ xMapper = xPresImpPropMapper;
+ return xMapper;
+ }
+
+ // call base class
+ return SvXMLStylesContext::GetImportPropertyMapper(nFamily);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Process all style and object info
+//
+void SdXMLStylesContext::EndElement()
+{
+ if(mbIsAutoStyle)
+ {
+ // associate AutoStyles with styles in preparation to setting Styles on shapes
+ for(sal_uInt32 a(0L); a < GetStyleCount(); a++)
+ {
+ const SvXMLStyleContext* pStyle = GetStyle(a);
+ if(pStyle && pStyle->ISA(XMLShapeStyleContext))
+ {
+ XMLShapeStyleContext* pDocStyle = (XMLShapeStyleContext*)pStyle;
+ pStyle = GetSdImport().GetShapeImport()->GetStylesContext()->FindStyleChildContext(
+ pStyle->GetFamily(), pStyle->GetParent());
+
+ if(pStyle && pStyle->ISA(XMLShapeStyleContext))
+ {
+ XMLShapeStyleContext* pParentStyle = (XMLShapeStyleContext*)pStyle;
+ if(pParentStyle->GetStyle().is())
+ {
+ pDocStyle->SetStyle(pParentStyle->GetStyle());
+ }
+ }
+ }
+ }
+
+ // AutoStyles for text import
+ GetImport().GetTextImport()->SetAutoStyles( this );
+
+ // AutoStyles for chart
+ GetImport().GetChartImport()->SetAutoStylesContext( this );
+ }
+ else
+ {
+ // find pool defaults and set on model
+ const SvXMLStyleContext* pStyle = FindStyleChildContext(XML_STYLE_FAMILY_SD_POOL_ID,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_drawpool)));
+ if(pStyle)
+ GetSdImport().ImportPoolDefaults((const XMLPropStyleContext*)pStyle);
+
+ // Process styles list
+ ImpSetGraphicStyles();
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// set master-page styles (all with family="presentation" and a special
+// prefix) on given master-page.
+//
+void SdXMLStylesContext::SetMasterPageStyles(SdXMLMasterPageContext& rMaster) const
+{
+ UniString sPrefix(rMaster.GetName(), rMaster.GetName().getLength());
+ sPrefix += sal_Unicode('-');
+
+ if(GetSdImport().GetLocalDocStyleFamilies()->hasByName(rMaster.GetName()))
+ {
+ uno::Any aAny(GetSdImport().GetLocalDocStyleFamilies()->getByName(rMaster.GetName()));
+ uno::Reference< container::XNameAccess > xMasterPageStyles;
+ aAny >>= xMasterPageStyles;
+
+ if(xMasterPageStyles.is())
+ {
+ ImpSetGraphicStyles(xMasterPageStyles, XML_STYLE_FAMILY_SD_PRESENTATION_ID, sPrefix);
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Process styles list:
+// set graphic styles (all with family="graphics"). Remember xStyle at list element.
+//
+void SdXMLStylesContext::ImpSetGraphicStyles() const
+{
+ if(GetSdImport().GetLocalDocStyleFamilies().is())
+ {
+ const OUString sGraphicStyleName(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)));
+ uno::Any aAny(GetSdImport().GetLocalDocStyleFamilies()->getByName(sGraphicStyleName));
+ uno::Reference< container::XNameAccess > xGraphicPageStyles;
+ aAny >>= xGraphicPageStyles;
+
+ if(xGraphicPageStyles.is())
+ {
+ UniString aPrefix;
+ ImpSetGraphicStyles(xGraphicPageStyles, XML_STYLE_FAMILY_SD_GRAPHICS_ID, aPrefix);
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// help function used by ImpSetGraphicStyles() and ImpSetMasterPageStyles()
+//
+void SdXMLStylesContext::ImpSetGraphicStyles(
+ uno::Reference< container::XNameAccess >& xPageStyles,
+ sal_uInt16 nFamily,
+ const UniString& rPrefix) const
+{
+ xub_StrLen nPrefLen(rPrefix.Len());
+ uno::Any aAny;
+
+ // create all styles and set properties
+ for(sal_uInt32 a(0L); a < GetStyleCount(); a++)
+ {
+ const SvXMLStyleContext* pStyle = GetStyle(a);
+
+ if(nFamily == pStyle->GetFamily())
+ {
+ const UniString aStyleName(pStyle->GetName(), pStyle->GetName().getLength());
+ if(!nPrefLen || aStyleName.Equals(rPrefix, 0, nPrefLen))
+ {
+ uno::Reference< style::XStyle > xStyle;
+ const OUString aPureStyleName = nPrefLen ?
+ pStyle->GetName().copy((sal_Int32)nPrefLen) : pStyle->GetName();
+
+ if(xPageStyles->hasByName(aPureStyleName))
+ {
+ aAny = xPageStyles->getByName(aPureStyleName);
+ aAny >>= xStyle;
+ }
+ else
+ {
+ // graphics style does not exist, create and add it
+ uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetSdImport().GetModel(), uno::UNO_QUERY);
+ if(xServiceFact.is())
+ {
+ uno::Reference< style::XStyle > xNewStyle(
+ xServiceFact->createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.Style"))),
+ uno::UNO_QUERY);
+
+ if(xNewStyle.is())
+ {
+ // remember style
+ xStyle = xNewStyle;
+
+ // add new style to graphics style pool
+ uno::Reference< container::XNameContainer > xInsertContainer(xPageStyles, uno::UNO_QUERY);
+ if(xInsertContainer.is())
+ {
+ aAny <<= xStyle;
+ xInsertContainer->insertByName(aPureStyleName, aAny);
+ }
+ }
+ }
+ }
+
+ if(xStyle.is())
+ {
+ // set properties at style
+ XMLShapeStyleContext* pPropStyle =
+ (pStyle->ISA(XMLShapeStyleContext)) ? (XMLShapeStyleContext*)pStyle : 0L;
+ uno::Reference< beans::XPropertySet > xPropSet(xStyle, uno::UNO_QUERY);
+
+ if(xPropSet.is() && pPropStyle)
+ {
+ pPropStyle->FillPropertySet(xPropSet);
+ pPropStyle->SetStyle(xStyle);
+ }
+ }
+ }
+ }
+ }
+
+ // now set parents for all styles (when necessary)
+ for(a = 0L; a < GetStyleCount(); a++)
+ {
+ const SvXMLStyleContext* pStyle = GetStyle(a);
+
+ if(pStyle && nFamily == pStyle->GetFamily())
+ {
+ const UniString aStyleName(pStyle->GetName(), pStyle->GetName().getLength());
+ if(!nPrefLen || aStyleName.Equals(rPrefix, 0, nPrefLen))
+ {
+ OUString aPureParentName;
+
+ if(pStyle->GetParent().getLength())
+ {
+ // no "drawpool" parents (!)
+ if(!pStyle->GetParent().equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_drawpool))))
+ {
+ aPureParentName = nPrefLen ?
+ pStyle->GetParent().copy((sal_Int32)nPrefLen) : pStyle->GetParent();
+ }
+ }
+
+ const OUString aPureStyleName = nPrefLen ?
+ pStyle->GetName().copy((sal_Int32)nPrefLen) : pStyle->GetName();
+ uno::Reference< style::XStyle > xStyle;
+ aAny = xPageStyles->getByName(aPureStyleName);
+ aAny >>= xStyle;
+
+ if(xStyle.is())
+ {
+ // set parent style name
+ xStyle->setParentStyle(aPureParentName);
+ }
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+//
+TYPEINIT1( SdXMLMasterStylesContext, SvXMLImportContext );
+
+SdXMLMasterStylesContext::SdXMLMasterStylesContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLName)
+: SvXMLImportContext( rImport, nPrfx, rLName)
+{
+}
+
+SdXMLMasterStylesContext::~SdXMLMasterStylesContext()
+{
+ while(maMasterPageList.Count())
+ maMasterPageList.Remove(maMasterPageList.Count() - 1)->ReleaseRef();
+}
+
+SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList)
+{
+ SvXMLImportContext* pContext = 0;
+
+ if(nPrefix == XML_NAMESPACE_STYLE
+ && rLocalName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_master_page))))
+ {
+ // style:masterpage inside office:styles context
+ uno::Reference< drawing::XDrawPage > xNewMasterPage;
+ uno::Reference< drawing::XDrawPages > xMasterPages(GetSdImport().GetLocalMasterPages(), uno::UNO_QUERY);
+
+ if(GetSdImport().GetNewMasterPageCount() + 1 > xMasterPages->getCount())
+ {
+ // new page, create and insert
+ xNewMasterPage = xMasterPages->insertNewByIndex(xMasterPages->getCount());
+ }
+ else
+ {
+ // existing page, use it
+ uno::Any aAny(xMasterPages->getByIndex(GetSdImport().GetNewMasterPageCount()));
+ aAny >>= xNewMasterPage;
+ }
+
+ // increment global import page counter
+ GetSdImport().IncrementNewMasterPageCount();
+
+ if(xNewMasterPage.is())
+ {
+ uno::Reference< drawing::XShapes > xNewShapes(xNewMasterPage, uno::UNO_QUERY);
+ if(xNewShapes.is() && GetSdImport().GetShapeImport()->GetStylesContext())
+ {
+ pContext = new SdXMLMasterPageContext(GetSdImport(),
+ nPrefix, rLocalName, xAttrList, xNewShapes);
+
+ if(pContext)
+ {
+ pContext->AddRef();
+ maMasterPageList.Insert((SdXMLMasterPageContext*)pContext, LIST_APPEND);
+ }
+ }
+ }
+ }
+
+ // call base class
+ if(!pContext)
+ pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList);
+
+ return pContext;
+}
+
+
diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx
new file mode 100644
index 0000000000..1277cfe28a
--- /dev/null
+++ b/xmloff/source/draw/ximpstyl.hxx
@@ -0,0 +1,288 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximpstyl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XIMPSTYLE_HXX
+#define _XIMPSTYLE_HXX
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+#ifndef _SDXMLIMP_HXX
+#include "sdxmlimp.hxx"
+#endif
+
+#ifndef _XIMPGROUP_HXX
+#include "ximpgrp.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLSTYLE_HXX
+#include "xmlstyle.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_VIEW_PAPERORIENTATION_HPP_
+#include <com/sun/star/view/PaperOrientation.hpp>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// style:page-master context
+
+class SdXMLPageMasterContext: public SvXMLStyleContext
+{
+ sal_Int32 mnBorderBottom;
+ sal_Int32 mnBorderLeft;
+ sal_Int32 mnBorderRight;
+ sal_Int32 mnBorderTop;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+ com::sun::star::view::PaperOrientation meOrientation;
+ rtl::OUString msName;
+
+ const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+
+public:
+ TYPEINFO();
+
+ SdXMLPageMasterContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList);
+ virtual ~SdXMLPageMasterContext();
+
+ const rtl::OUString& GetName() const { return msName; }
+ sal_Int32 GetBorderBottom() const { return mnBorderBottom; }
+ sal_Int32 GetBorderLeft() const { return mnBorderLeft; }
+ sal_Int32 GetBorderRight() const { return mnBorderRight; }
+ sal_Int32 GetBorderTop() const { return mnBorderTop; }
+ sal_Int32 GetWidth() const { return mnWidth; }
+ sal_Int32 GetHeight() const { return mnHeight; }
+ com::sun::star::view::PaperOrientation GetOrientation() const { return meOrientation; }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// style:masterpage context
+
+class SdXMLMasterPageContext: public SdXMLGroupShapeContext
+{
+ rtl::OUString msPageMasterName;
+ rtl::OUString msName;
+
+ const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+
+public:
+ TYPEINFO();
+
+ SdXMLMasterPageContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXMLMasterPageContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual void EndElement();
+
+ const rtl::OUString& GetPageMasterName() const { return msPageMasterName; }
+ const rtl::OUString& GetName() const { return msName; }
+};
+DECLARE_LIST(ImpMasterPageList, SdXMLMasterPageContext*);
+
+//////////////////////////////////////////////////////////////////////////////
+// presentation:placeholder context
+
+class SdXMLPresentationPlaceholderContext: public SvXMLImportContext
+{
+ rtl::OUString msName;
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnWidth;
+ sal_Int32 mnHeight;
+
+ const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+
+public:
+ SdXMLPresentationPlaceholderContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList);
+ virtual ~SdXMLPresentationPlaceholderContext();
+
+ const rtl::OUString& GetName() const { return msName; }
+ sal_Int32 GetX() const { return mnX; }
+ sal_Int32 GetY() const { return mnY; }
+ sal_Int32 GetWidth() const { return mnWidth; }
+ sal_Int32 GetHeight() const { return mnHeight; }
+};
+DECLARE_LIST(ImpPlaceholderList, SdXMLPresentationPlaceholderContext*);
+
+//////////////////////////////////////////////////////////////////////////////
+// style:presentation-page-layout context
+
+class SdXMLPresentationPageLayoutContext: public SvXMLStyleContext
+{
+ rtl::OUString msName;
+ ImpPlaceholderList maList;
+ sal_uInt16 mnTypeId;
+
+ const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+
+public:
+ TYPEINFO();
+
+ SdXMLPresentationPageLayoutContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList);
+ virtual ~SdXMLPresentationPageLayoutContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual void EndElement();
+ sal_uInt16 GetTypeId() const { return mnTypeId; }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// office:styles context
+
+class SdXMLStylesContext : public SvXMLStylesContext
+{
+ UniReference< SvXMLImportPropertyMapper > xPresImpPropMapper;
+ sal_Bool mbIsAutoStyle;
+
+ const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+
+ void ImpSetGraphicStyles() const;
+ void ImpSetGraphicStyles( com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xPageStyles,
+ sal_uInt16 nFamily, const UniString& rPrefix) const;
+
+protected:
+ virtual SvXMLStyleContext* CreateStyleChildContext(
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList);
+
+ virtual SvXMLStyleContext *CreateStyleStyleChildContext(
+ sal_uInt16 nFamily,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList);
+
+public:
+ TYPEINFO();
+
+ SdXMLStylesContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ sal_Bool bIsAutoStyle);
+ virtual ~SdXMLStylesContext();
+
+ virtual sal_uInt16 GetFamily( const rtl::OUString& rFamily ) const;
+ virtual void EndElement();
+ virtual UniReference< SvXMLImportPropertyMapper > GetImportPropertyMapper(sal_uInt16 nFamily) const;
+
+ void SetMasterPageStyles(SdXMLMasterPageContext& rMaster) const;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// office:master-styles context
+//
+class SdXMLMasterStylesContext : public SvXMLImportContext
+{
+ ImpMasterPageList maMasterPageList;
+
+ const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+
+public:
+ TYPEINFO();
+
+ SdXMLMasterStylesContext(
+ SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLName);
+ virtual ~SdXMLMasterStylesContext();
+
+ virtual SvXMLImportContext* CreateChildContext(
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ const ImpMasterPageList& GetMasterPageList() const { return maMasterPageList; }
+};
+
+
+#endif // _XIMPSTYLE_HXX
diff --git a/xmloff/source/meta/makefile.mk b/xmloff/source/meta/makefile.mk
new file mode 100644
index 0000000000..6531cedf1b
--- /dev/null
+++ b/xmloff/source/meta/makefile.mk
@@ -0,0 +1,94 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:07: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=xmloff
+TARGET=meta
+AUTOSEG=true
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+ALL: $(INCCOM)$/rscrev.hxx ALLTAR
+
+SLOFILES = \
+ $(SLO)$/xmlmetae.obj \
+ $(SLO)$/xmlmetai.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
+$(INCCOM)$/rscrev.hxx: makefile.mk
+.IF "$(GUI)"=="UNX"
+ echo #define RSCUPDVER \""$(RSCREVISION)"\" > $@
+.ELSE
+ echo #define RSCUPDVER "$(RSCREVISION)" > $@
+.ENDIF
diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx
new file mode 100644
index 0000000000..82810d071e
--- /dev/null
+++ b/xmloff/source/meta/xmlmetae.cxx
@@ -0,0 +1,583 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlmetae.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <tools/debug.hxx>
+#include <tools/inetdef.hxx>
+#include <tools/isolang.hxx>
+
+#include "xmlmetae.hxx"
+#include "xmlkywd.hxx"
+#include "attrlist.hxx"
+#include "nmspmap.hxx"
+#include "rscrev.hxx"
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _TOOLS_TIME_HXX
+#include <tools/time.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFOSUPPLIER_HPP_
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#endif
+
+using namespace com::sun::star;
+
+//-------------------------------------------------------------------------
+
+#define PROP_TITLE "Title"
+#define PROP_DESCRIPTION "Description"
+#define PROP_THEME "Theme"
+#define PROP_KEYWORDS "Keywords"
+#define PROP_AUTHOR "Author"
+#define PROP_CREATIONDATE "CreationDate"
+#define PROP_MODIFIEDBY "ModifiedBy"
+#define PROP_MODIFYDATE "ModifyDate"
+#define PROP_PRINTEDBY "PrintedBy"
+#define PROP_PRINTDATE "PrintDate"
+#define PROP_TEMPLATEURL "TemplateFileName"
+#define PROP_TEMPLATENAME "Template"
+#define PROP_TEMPLATEDATE "TemplateDate"
+#define PROP_RELOADENABLED "AutoloadEnabled"
+#define PROP_RELOADURL "AutoloadURL"
+#define PROP_RELOADSECS "AutoloadSecs"
+#define PROP_DEFAULTTARGET "DefaultTarget"
+#define PROP_EDITINGCYCLES "EditingCycles"
+#define PROP_EDITINGDURATION "EditingDuration"
+
+#define PROP_CHARLOCALE "CharLocale"
+
+
+//-------------------------------------------------------------------------
+
+void lcl_AddTwoDigits( rtl::OUStringBuffer& rStr, sal_Int32 nVal )
+{
+ if ( nVal < 10 )
+ rStr.append( sal_Unicode('0') );
+ rStr.append( nVal );
+}
+
+// static
+rtl::OUString SfxXMLMetaExport::GetISODateTimeString( const util::DateTime& rDateTime )
+{
+ // return ISO date string "YYYY-MM-DDThh:mm:ss"
+
+ rtl::OUStringBuffer sTmp;
+ sTmp.append( (sal_Int32) rDateTime.Year );
+ sTmp.append( sal_Unicode('-') );
+ lcl_AddTwoDigits( sTmp, rDateTime.Month );
+ sTmp.append( sal_Unicode('-') );
+ lcl_AddTwoDigits( sTmp, rDateTime.Day );
+ sTmp.append( sal_Unicode('T') );
+ lcl_AddTwoDigits( sTmp, rDateTime.Hours );
+ sTmp.append( sal_Unicode(':') );
+ lcl_AddTwoDigits( sTmp, rDateTime.Minutes );
+ sTmp.append( sal_Unicode(':') );
+ lcl_AddTwoDigits( sTmp, rDateTime.Seconds );
+
+ return sTmp.makeStringAndClear();
+}
+
+// static
+rtl::OUString SfxXMLMetaExport::GetISODurationString( const Time& rTime )
+{
+ // return ISO time period string
+
+ rtl::OUStringBuffer sTmp;
+ sTmp.append( sal_Unicode('P') ); // "period"
+
+ sal_uInt16 nHours = rTime.GetHour();
+ sal_Bool bHasHours = ( nHours > 0 );
+ if ( nHours >= 24 )
+ {
+ // add days
+
+ sal_uInt16 nDays = nHours / 24;
+ sTmp.append( (sal_Int32) nDays );
+ sTmp.append( sal_Unicode('D') ); // "days"
+
+ nHours -= nDays * 24;
+ }
+ sTmp.append( sal_Unicode('T') ); // "time"
+
+ if ( bHasHours )
+ {
+ sTmp.append( (sal_Int32) nHours );
+ sTmp.append( sal_Unicode('H') ); // "hours"
+ }
+ sal_uInt16 nMinutes = rTime.GetMin();
+ if ( bHasHours || nMinutes > 0 )
+ {
+ sTmp.append( (sal_Int32) nMinutes );
+ sTmp.append( sal_Unicode('M') ); // "minutes"
+ }
+ sal_uInt16 nSeconds = rTime.GetSec();
+ sTmp.append( (sal_Int32) nSeconds );
+ sTmp.append( sal_Unicode('S') ); // "seconds"
+
+ return sTmp.makeStringAndClear();
+}
+
+//-------------------------------------------------------------------------
+
+SfxXMLMetaExport::SfxXMLMetaExport(
+ const uno::Reference<xml::sax::XDocumentHandler>& rHdl,
+ const uno::Reference<frame::XModel>& rDocModel ) :
+ xHandler( rHdl ),
+ pNamespaceMap( NULL ),
+ sCDATA( ::rtl::OUString::createFromAscii(sXML_CDATA) ),
+ sWS( ::rtl::OUString::createFromAscii(sXML_WS) )
+{
+ uno::Reference<document::XDocumentInfoSupplier> xSupp( rDocModel, uno::UNO_QUERY );
+ if ( xSupp.is() )
+ {
+ xDocInfo = xSupp->getDocumentInfo();
+ xInfoProp = uno::Reference<beans::XPropertySet>( xDocInfo, uno::UNO_QUERY );
+ }
+
+ uno::Reference<beans::XPropertySet> xDocProp( rDocModel, uno::UNO_QUERY );
+ if ( xDocProp.is() )
+ {
+ // get document language from document properties
+ // (not available for all document types)
+
+ try
+ {
+ uno::Any aLocAny = xDocProp->getPropertyValue(
+ rtl::OUString::createFromAscii( PROP_CHARLOCALE ) );
+ aLocAny >>= aLocale;
+ }
+ catch (beans::UnknownPropertyException&)
+ {
+ // no error
+ }
+ }
+
+ // for Image etc. there is no XModel and no document info
+// DBG_ASSERT( xInfoProp.is(), "no document info properties" );
+
+ pAttrList = new SvXMLAttributeList;
+ xAttrList = pAttrList;
+}
+
+SfxXMLMetaExport::~SfxXMLMetaExport()
+{
+}
+
+void SfxXMLMetaExport::SimpleStringElement( const rtl::OUString& rPropertyName,
+ sal_uInt16 nNamespace,
+ const sal_Char* pElementName )
+{
+ uno::Any aAny = xInfoProp->getPropertyValue( rPropertyName );
+ rtl::OUString sValue;
+ if ( aAny >>= sValue )
+ {
+ if ( sValue.getLength() )
+ {
+ rtl::OUString sElem = pNamespaceMap->GetQNameByKey( nNamespace,
+ ::rtl::OUString::createFromAscii(pElementName) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->characters( sValue );
+ xHandler->endElement( sElem );
+ }
+ }
+}
+
+void SfxXMLMetaExport::SimpleDateTimeElement(
+ const rtl::OUString& rPropertyName, sal_uInt16 nNamespace,
+ const sal_Char* pElementName )
+{
+ uno::Any aAny = xInfoProp->getPropertyValue( rPropertyName );
+ util::DateTime aDateTime;
+ if ( aAny >>= aDateTime )
+ {
+ rtl::OUString sValue = GetISODateTimeString( aDateTime );
+
+ rtl::OUString sElem = pNamespaceMap->GetQNameByKey( nNamespace,
+ ::rtl::OUString::createFromAscii(pElementName) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->characters( sValue );
+ xHandler->endElement( sElem );
+ }
+}
+
+void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
+{
+ pNamespaceMap = &rNamespaceMap;
+ if ( !xInfoProp.is() ) return;
+
+ rtl::OUString sElem, sSubElem, sAttrName, sValue;
+ uno::Any aPropVal;
+
+ // generator (exported only)
+ sValue = ::rtl::OUString::createFromAscii(INET_PRODUCTNAME);
+ sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_generator) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->characters( sValue );
+ xHandler->endElement( sElem );
+
+ // build-id as comment
+ uno::Reference<xml::sax::XExtendedDocumentHandler> xExt( xHandler,
+ uno::UNO_QUERY ); //! pass in ctor?
+ if (xExt.is())
+ {
+ sValue = String::CreateFromAscii( RSCUPDVER );
+ xExt->comment( sValue );
+ }
+
+ // document title
+ SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_TITLE),
+ XML_NAMESPACE_DC, sXML_title );
+
+ // description
+ SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_DESCRIPTION),
+ XML_NAMESPACE_DC, sXML_description );
+
+ // subject
+ SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_THEME),
+ XML_NAMESPACE_DC, sXML_subject );
+
+ // created...
+ SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_AUTHOR),
+ XML_NAMESPACE_META, sXML_initial_creator );
+ SimpleDateTimeElement( ::rtl::OUString::createFromAscii(PROP_CREATIONDATE),
+ XML_NAMESPACE_META, sXML_creation_date );
+
+ // modified...
+ SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_MODIFIEDBY),
+ XML_NAMESPACE_DC, sXML_creator );
+ SimpleDateTimeElement( ::rtl::OUString::createFromAscii(PROP_MODIFYDATE),
+ XML_NAMESPACE_DC, sXML_date );
+
+ // printed...
+ SimpleStringElement( ::rtl::OUString::createFromAscii(PROP_PRINTEDBY),
+ XML_NAMESPACE_META, sXML_printed_by );
+ SimpleDateTimeElement( ::rtl::OUString::createFromAscii(PROP_PRINTDATE),
+ XML_NAMESPACE_META, sXML_print_date );
+
+ // keywords
+ // service DocumentInfo contains keywords in a single string, comma separated.
+ aPropVal = xInfoProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_KEYWORDS) );
+ rtl::OUString sKeywords;
+ aPropVal >>= sKeywords;
+ sal_Int32 nKWCount = sKeywords.getTokenCount( ',' );
+ if ( sKeywords.getLength() && nKWCount )
+ {
+ sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_keywords) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ for (sal_Int32 nKW=0; nKW<nKWCount; nKW++)
+ {
+ rtl::OUString sKeyword = sKeywords.getToken( nKW, ',' ).trim();
+
+ sSubElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_keyword) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sSubElem, xAttrList );
+ xHandler->characters( sKeyword );
+ xHandler->endElement( sSubElem );
+ }
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->endElement( sElem );
+ }
+
+ // document language
+#if 0
+ if ( eLanguage != LANGUAGE_SYSTEM )
+ {
+ sValue = ConvertLanguageToIsoString( eLanguage, '-' );
+ if ( sValue.getLength() )
+ {
+ sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_DC,
+ ::rtl::OUString::createFromAscii(sXML_language) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->characters( sValue );
+ xHandler->endElement( sElem );
+ }
+ }
+#endif
+ if ( aLocale.Language.getLength() )
+ {
+ sValue = aLocale.Language;
+ if ( aLocale.Country.getLength() )
+ {
+ sValue += rtl::OUString::valueOf((sal_Unicode)'-');
+ sValue += aLocale.Country;
+ }
+ sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_DC,
+ ::rtl::OUString::createFromAscii(sXML_language) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->characters( sValue );
+ xHandler->endElement( sElem );
+ }
+
+ // editing cycles
+ aPropVal = xInfoProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_EDITINGCYCLES) );
+ sal_Int32 nCycles;
+ if ( aPropVal >>= nCycles )
+ {
+ sValue = rtl::OUString::valueOf( nCycles );
+
+ sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_editing_cycles) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->characters( sValue );
+ xHandler->endElement( sElem );
+ }
+
+ // editing duration
+ // property is a int32 with the Time::GetTime value
+ aPropVal = xInfoProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_EDITINGDURATION) );
+ sal_Int32 nDurVal;
+ if ( aPropVal >>= nDurVal )
+ {
+ Time aDurTime( nDurVal );
+ sValue = GetISODurationString( aDurTime );
+
+ sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_editing_duration) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->characters( sValue );
+ xHandler->endElement( sElem );
+ }
+
+ // default target
+ aPropVal = xInfoProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_DEFAULTTARGET) );
+ rtl::OUString sDefTarget;
+ aPropVal >>= sDefTarget;
+ if ( sDefTarget.len() )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_OFFICE,
+ ::rtl::OUString::createFromAscii(sXML_target_frame_name) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sDefTarget );
+
+ //! define strings for xlink:show values
+ rtl::OUString sShow = ::rtl::OUString::createFromAscii(
+ sDefTarget.compareToAscii( "_self" ) == 0 ? "replace" : "new" );
+
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
+ ::rtl::OUString::createFromAscii(sXML_show) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sShow );
+
+ sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_hyperlink_behaviour) );
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+ }
+
+ // auto-reload
+ aPropVal = xInfoProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_RELOADENABLED) );
+ BOOL bAutoReload = FALSE;
+ if ( aPropVal.getValueTypeClass() == uno::TypeClass_BOOLEAN )
+ bAutoReload = *(sal_Bool*)aPropVal.getValue();
+ if ( bAutoReload )
+ {
+ aPropVal = xInfoProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_RELOADURL) );
+ rtl::OUString sReloadURL;
+ aPropVal >>= sReloadURL;
+ if ( sReloadURL.len() )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
+ ::rtl::OUString::createFromAscii(sXML_href) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sReloadURL );
+ }
+
+ aPropVal = xInfoProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_RELOADSECS) );
+ sal_Int32 nSecs;
+ if ( aPropVal >>= nSecs )
+ {
+ Time aTime;
+ aTime.MakeTimeFromMS( nSecs * 1000 );
+ rtl::OUString sReloadTime = GetISODurationString( aTime );
+
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_delay) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sReloadTime );
+ }
+
+ sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_auto_reload) );
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+ }
+
+ // template
+ aPropVal = xInfoProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_TEMPLATEURL) );
+ rtl::OUString sTplPath;
+ aPropVal >>= sTplPath;
+ if ( sTplPath.len() )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
+ ::rtl::OUString::createFromAscii(sXML_type) );
+ pAttrList->AddAttribute( sAttrName, sCDATA,
+ ::rtl::OUString::createFromAscii(sXML_simple) );
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
+ ::rtl::OUString::createFromAscii(sXML_actuate) );
+ pAttrList->AddAttribute( sAttrName, sCDATA,
+ ::rtl::OUString::createFromAscii(sXML_onRequest) );
+
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
+ ::rtl::OUString::createFromAscii(sXML_role) );
+ pAttrList->AddAttribute( sAttrName, sCDATA,
+ pNamespaceMap->GetQNameByKey( XML_NAMESPACE_OFFICE,
+ ::rtl::OUString::createFromAscii(sXML_template) ) );
+
+ // template URL
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
+ ::rtl::OUString::createFromAscii(sXML_href) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sTplPath );
+
+ // template name
+ aPropVal = xInfoProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_TEMPLATENAME) );
+ rtl::OUString sTplName;
+ aPropVal >>= sTplName;
+ if ( sTplName.len() )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
+ ::rtl::OUString::createFromAscii(sXML_title) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sTplName );
+ }
+
+ // template date
+ aPropVal = xInfoProp->getPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_TEMPLATEDATE) );
+ util::DateTime aDateTime;
+ if ( aPropVal >>= aDateTime )
+ {
+ rtl::OUString sTplDate = GetISODateTimeString( aDateTime );
+
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_date) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sTplDate );
+ }
+
+ sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_template) );
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+ }
+
+ // user defined fields
+ sal_Int16 nUFCount = xDocInfo->getUserFieldCount();
+ if ( nUFCount )
+ {
+ sSubElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_user_defined) );
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_META,
+ ::rtl::OUString::createFromAscii(sXML_name) );
+
+ for (sal_Int16 nUF=0; nUF<nUFCount; nUF++)
+ {
+ rtl::OUString aUFName = xDocInfo->getUserFieldName( nUF );
+ rtl::OUString aUFValue = xDocInfo->getUserFieldValue( nUF );
+
+ pAttrList->AddAttribute( sAttrName, sCDATA, aUFName );
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sSubElem, xAttrList );
+ xHandler->characters( aUFValue );
+ xHandler->endElement( sSubElem );
+
+ pAttrList->Clear();
+ }
+ }
+
+ pNamespaceMap = NULL;
+}
+
+
+
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
new file mode 100644
index 0000000000..8a2f225764
--- /dev/null
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -0,0 +1,790 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlmetai.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <tools/debug.hxx>
+#include <tools/isolang.hxx>
+#include <tools/time.hxx>
+
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+
+#include "xmlmetai.hxx"
+#include "xmltkmap.hxx"
+#include "xmlnmspe.hxx"
+#include "xmlkywd.hxx"
+#include "xmlimp.hxx"
+#include "nmspmap.hxx"
+
+using namespace com::sun::star;
+
+//-------------------------------------------------------------------------
+
+#define PROP_TITLE "Title"
+#define PROP_DESCRIPTION "Description"
+#define PROP_THEME "Theme"
+#define PROP_KEYWORDS "Keywords"
+#define PROP_AUTHOR "Author"
+#define PROP_CREATIONDATE "CreationDate"
+#define PROP_MODIFIEDBY "ModifiedBy"
+#define PROP_MODIFYDATE "ModifyDate"
+#define PROP_PRINTEDBY "PrintedBy"
+#define PROP_PRINTDATE "PrintDate"
+#define PROP_TEMPLATEURL "TemplateFileName"
+#define PROP_TEMPLATENAME "Template"
+#define PROP_TEMPLATEDATE "TemplateDate"
+#define PROP_RELOADENABLED "AutoloadEnabled"
+#define PROP_RELOADURL "AutoloadURL"
+#define PROP_RELOADSECS "AutoloadSecs"
+#define PROP_DEFAULTTARGET "DefaultTarget"
+#define PROP_EDITINGCYCLES "EditingCycles"
+#define PROP_EDITINGDURATION "EditingDuration"
+
+#define PROP_CHARLOCALE "CharLocale"
+
+
+//-------------------------------------------------------------------------
+
+class SfxXMLMetaElementContext : public SvXMLImportContext
+{
+private:
+ SfxXMLMetaContext& rParent;
+ sal_uInt16 nElementType;
+ rtl::OUString sContent;
+ rtl::OUString sFieldName; // for <meta:user-defined>
+
+public:
+ SfxXMLMetaElementContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLName,
+ const uno::Reference<
+ xml::sax::XAttributeList>& xAttrList,
+ SfxXMLMetaContext& rParentContext,
+ sal_uInt16 nType );
+
+ virtual ~SfxXMLMetaElementContext();
+
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const rtl::OUString& rLName,
+ const uno::Reference<
+ xml::sax::XAttributeList>& xAttrList );
+ virtual void EndElement();
+ virtual void Characters( const rtl::OUString& rChars );
+
+ static BOOL ParseISODateTimeString( const rtl::OUString& rString,
+ util::DateTime& rDateTime );
+ static BOOL ParseISODurationString( const rtl::OUString& rString,
+ Time& rTime );
+};
+
+//-------------------------------------------------------------------------
+
+enum SfxXMLMetaElemTokens
+{
+ XML_TOK_META_TITLE,
+ XML_TOK_META_DESCRIPTION,
+ XML_TOK_META_SUBJECT,
+ XML_TOK_META_KEYWORDS,
+ XML_TOK_META_KEYWORD,
+ XML_TOK_META_INITIALCREATOR,
+ XML_TOK_META_CREATIONDATE,
+ XML_TOK_META_CREATOR,
+ XML_TOK_META_DATE,
+ XML_TOK_META_PRINTEDBY,
+ XML_TOK_META_PRINTDATE,
+ XML_TOK_META_TEMPLATE,
+ XML_TOK_META_AUTORELOAD,
+ XML_TOK_META_HYPERLINKBEHAVIOUR,
+ XML_TOK_META_LANGUAGE,
+ XML_TOK_META_EDITINGCYCLES,
+ XML_TOK_META_EDITINGDURATION,
+ XML_TOK_META_USERDEFINED,
+ XML_TOK_META_ELEM_END = XML_TOK_UNKNOWN
+};
+
+// XML_TOK_META_KEYWORD is not in map,
+// handled in SfxXMLMetaElementContext::CreateChildContext
+
+static __FAR_DATA SvXMLTokenMapEntry aMetaElemTokenMap[] =
+{
+ { XML_NAMESPACE_DC, sXML_title, XML_TOK_META_TITLE },
+ { XML_NAMESPACE_DC, sXML_description, XML_TOK_META_DESCRIPTION },
+ { XML_NAMESPACE_DC, sXML_subject, XML_TOK_META_SUBJECT },
+ { XML_NAMESPACE_META, sXML_keywords, XML_TOK_META_KEYWORDS },
+ { XML_NAMESPACE_META, sXML_initial_creator, XML_TOK_META_INITIALCREATOR },
+ { XML_NAMESPACE_META, sXML_creation_date, XML_TOK_META_CREATIONDATE },
+ { XML_NAMESPACE_DC, sXML_creator, XML_TOK_META_CREATOR },
+ { XML_NAMESPACE_DC, sXML_date, XML_TOK_META_DATE },
+ { XML_NAMESPACE_META, sXML_printed_by, XML_TOK_META_PRINTEDBY },
+ { XML_NAMESPACE_META, sXML_print_date, XML_TOK_META_PRINTDATE },
+ { XML_NAMESPACE_META, sXML_template, XML_TOK_META_TEMPLATE },
+ { XML_NAMESPACE_META, sXML_auto_reload, XML_TOK_META_AUTORELOAD },
+ { XML_NAMESPACE_META, sXML_hyperlink_behaviour,XML_TOK_META_HYPERLINKBEHAVIOUR },
+ { XML_NAMESPACE_DC, sXML_language, XML_TOK_META_LANGUAGE },
+ { XML_NAMESPACE_META, sXML_editing_cycles, XML_TOK_META_EDITINGCYCLES },
+ { XML_NAMESPACE_META, sXML_editing_duration, XML_TOK_META_EDITINGDURATION },
+ { XML_NAMESPACE_META, sXML_user_defined, XML_TOK_META_USERDEFINED },
+ XML_TOKEN_MAP_END
+};
+
+enum SfxXMLMetaTemplateTokens
+{
+ XML_TOK_META_TEMPLATE_HREF,
+ XML_TOK_META_TEMPLATE_TITLE,
+ XML_TOK_META_TEMPLATE_DATE,
+ XML_TOK_META_TEMPLATE_END = XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aMetaTemplateTokenMap[] =
+{
+ { XML_NAMESPACE_XLINK, sXML_href, XML_TOK_META_TEMPLATE_HREF },
+ { XML_NAMESPACE_XLINK, sXML_title, XML_TOK_META_TEMPLATE_TITLE },
+ { XML_NAMESPACE_META, sXML_date, XML_TOK_META_TEMPLATE_DATE },
+ XML_TOKEN_MAP_END
+};
+
+enum SfxXMLMetaReloadTokens
+{
+ XML_TOK_META_RELOAD_HREF,
+ XML_TOK_META_RELOAD_DELAY,
+ XML_TOK_META_RELOAD_END = XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aMetaReloadTokenMap[] =
+{
+ { XML_NAMESPACE_XLINK, sXML_href, XML_TOK_META_RELOAD_HREF },
+ { XML_NAMESPACE_META, sXML_delay, XML_TOK_META_RELOAD_DELAY },
+ XML_TOKEN_MAP_END
+};
+
+//-------------------------------------------------------------------------
+
+sal_Bool lcl_GetNumber( const rtl::OUString& rString, sal_Int32& rValue,
+ sal_Int32 nMax )
+{
+ sal_Int32 nTemp = 0;
+
+ rtl::OUString aTrimmed = rString.trim();
+ sal_Int32 nLen = aTrimmed.getLength();
+ sal_Int32 nPos = 0;
+ sal_Unicode c;
+ while( nPos < nLen && sal_Unicode('0') <= (c = aTrimmed[nPos]) &&
+ sal_Unicode('9') >= c )
+ {
+ nTemp *= 10;
+ nTemp += (c - sal_Unicode('0'));
+ if ( nTemp > nMax )
+ return sal_False;
+
+ nPos++;
+ }
+
+// if ( *pStr )
+// return FALSE; // invalid characters
+
+ rValue = nTemp;
+ return sal_True;
+}
+
+// static
+sal_Bool SfxXMLMetaElementContext::ParseISODateTimeString(
+ const rtl::OUString& rString,
+ util::DateTime& rDateTime )
+{
+ sal_Bool bSuccess = sal_True;
+
+ rtl::OUString aDateStr, aTimeStr;
+ sal_Int32 nPos = rString.indexOf( (sal_Unicode) 'T' );
+ if ( nPos >= 0 )
+ {
+ aDateStr = rString.copy( 0, nPos );
+ aTimeStr = rString.copy( nPos + 1 );
+ }
+ else
+ aDateStr = rString; // no separator: only date part
+
+ sal_Int32 nYear = 0;
+ sal_Int32 nMonth = 1;
+ sal_Int32 nDay = 1;
+ sal_Int32 nHour = 0;
+ sal_Int32 nMin = 0;
+ sal_Int32 nSec = 0;
+
+ sal_Int32 nDateTokens = aDateStr.getTokenCount('-');
+ if ( nDateTokens > 3 || aDateStr.getLength() == 0 )
+ bSuccess = sal_False;
+ else
+ {
+ if ( !lcl_GetNumber( aDateStr.getToken( 0, '-' ), nYear, 9999 ) )
+ bSuccess = sal_False;
+ if ( nDateTokens >= 2 )
+ if ( !lcl_GetNumber( aDateStr.getToken( 1, '-' ), nMonth, 12 ) )
+ bSuccess = sal_False;
+ if ( nDateTokens >= 3 )
+ if ( !lcl_GetNumber( aDateStr.getToken( 2, '-' ), nDay, 31 ) )
+ bSuccess = sal_False;
+ }
+
+ if ( aTimeStr.getLength() > 0 ) // time is optional
+ {
+ sal_Int32 nTimeTokens = aTimeStr.getTokenCount(':');
+ if ( nTimeTokens > 3 )
+ bSuccess = sal_False;
+ else
+ {
+ if ( !lcl_GetNumber( aTimeStr.getToken( 0, ':' ), nHour, 23 ) )
+ bSuccess = sal_False;
+ if ( nTimeTokens >= 2 )
+ if ( !lcl_GetNumber( aTimeStr.getToken( 1, ':' ), nMin, 59 ) )
+ bSuccess = sal_False;
+ if ( nTimeTokens >= 3 )
+ if ( !lcl_GetNumber( aTimeStr.getToken( 2, ':' ), nSec, 59 ) )
+ bSuccess = sal_False;
+ }
+ }
+
+ if (bSuccess)
+ rDateTime = util::DateTime( 0, nSec, nMin, nHour, nDay, nMonth, nYear );
+ return bSuccess;
+}
+
+// static
+sal_Bool SfxXMLMetaElementContext::ParseISODurationString(
+ const rtl::OUString& rString, Time& rTime )
+{
+ rtl::OUString aTrimmed = rString.trim().toUpperCase();
+ const sal_Unicode* pStr = aTrimmed.getStr();
+
+ if ( *(pStr++) != sal_Unicode('P') ) // duration must start with "P"
+ return sal_False;
+
+ sal_Bool bSuccess = TRUE;
+ sal_Bool bDone = sal_False;
+ sal_Bool bTimePart = sal_False;
+ sal_Int32 nDays = 0;
+ sal_Int32 nHours = 0;
+ sal_Int32 nMins = 0;
+ sal_Int32 nSecs = 0;
+ sal_Int32 nTemp = 0;
+
+ while ( bSuccess && !bDone )
+ {
+ sal_Unicode c = *(pStr++);
+ if ( !c ) // end
+ bDone = sal_True;
+ else if ( sal_Unicode('0') <= c && sal_Unicode('9') >= c )
+ {
+ if ( nTemp >= LONG_MAX / 10 )
+ bSuccess = sal_False;
+ else
+ {
+ nTemp *= 10;
+ nTemp += (c - sal_Unicode('0'));
+ }
+ }
+ else if ( bTimePart )
+ {
+ if ( c == sal_Unicode('H') )
+ {
+ nHours = nTemp;
+ nTemp = 0;
+ }
+ else if ( c == sal_Unicode('M') )
+ {
+ nMins = nTemp;
+ nTemp = 0;
+ }
+ else if ( c == sal_Unicode('S') )
+ {
+ nSecs = nTemp;
+ nTemp = 0;
+ }
+ else
+ bSuccess = sal_False; // invalid characted
+ }
+ else
+ {
+ if ( c == sal_Unicode('T') ) // "T" starts time part
+ bTimePart = TRUE;
+ else if ( c == sal_Unicode('D') )
+ {
+ nDays = nTemp;
+ nTemp = 0;
+ }
+ else if ( c == sal_Unicode('Y') || c == sal_Unicode('M') )
+ {
+ //! how many days is a year or month?
+
+ DBG_ERROR("years or months in duration: not implemented");
+ bSuccess = sal_False;
+ }
+ else
+ bSuccess = sal_False; // invalid characted
+ }
+ }
+
+ if ( bSuccess )
+ {
+ if ( nDays )
+ nHours += nDays * 24; // add the days to the hours part
+ rTime = Time( nHours, nMins, nSecs );
+ }
+ return bSuccess;
+}
+
+//-------------------------------------------------------------------------
+
+SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList,
+ SfxXMLMetaContext& rParentContext, sal_uInt16 nType ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ rParent( rParentContext ),
+ nElementType( nType )
+{
+ rParent.AddRef();
+ uno::Any aPropAny;
+
+ if ( nElementType == XML_TOK_META_TEMPLATE )
+ {
+ // <meta:template>: everything is in the attributes
+
+ uno::Reference<beans::XPropertySet> xInfoProp = rParent.GetInfoProp();
+ if ( xInfoProp.is() )
+ {
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(
+ sAttrName, &aLocalName );
+ rtl::OUString sValue = xAttrList->getValueByIndex( i );
+
+ SvXMLTokenMap aTokenMap( aMetaTemplateTokenMap );
+ switch( aTokenMap.Get( nPrefix, aLocalName ) )
+ {
+ case XML_TOK_META_TEMPLATE_HREF:
+ aPropAny <<= sValue;
+ xInfoProp->setPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_TEMPLATEURL),
+ aPropAny );
+ break;
+ case XML_TOK_META_TEMPLATE_TITLE:
+ aPropAny <<= sValue;
+ xInfoProp->setPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_TEMPLATENAME),
+ aPropAny );
+ break;
+ case XML_TOK_META_TEMPLATE_DATE:
+ {
+ util::DateTime aDateTime;
+ if ( ParseISODateTimeString( sValue, aDateTime ) )
+ {
+ aPropAny <<= aDateTime;
+ xInfoProp->setPropertyValue(
+ ::rtl::OUString::createFromAscii(
+ PROP_TEMPLATEDATE), aPropAny );
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ else if ( nElementType == XML_TOK_META_AUTORELOAD )
+ {
+ // <meta:auto-reload>: everything is in the attributes
+
+ uno::Reference<beans::XPropertySet> xInfoProp = rParent.GetInfoProp();
+ if ( xInfoProp.is() )
+ {
+ // AutoloadEnabled is implicit
+ sal_Bool bReload = sal_True;
+ aPropAny.setValue( &bReload, getBooleanCppuType() );
+ xInfoProp->setPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_RELOADENABLED),
+ aPropAny );
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(
+ sAttrName, &aLocalName );
+ rtl::OUString sValue = xAttrList->getValueByIndex( i );
+
+ SvXMLTokenMap aTokenMap( aMetaReloadTokenMap );
+ uno::Any aAny;
+ switch( aTokenMap.Get( nPrefix, aLocalName ) )
+ {
+ case XML_TOK_META_RELOAD_HREF:
+ aPropAny <<= sValue;
+ xInfoProp->setPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_RELOADURL),
+ aPropAny );
+ break;
+ case XML_TOK_META_RELOAD_DELAY:
+ {
+ Time aTime;
+ if ( ParseISODurationString( sValue, aTime ) )
+ {
+ sal_Int32 nSecs = aTime.GetMSFromTime() / 1000;
+ aPropAny <<= nSecs;
+ xInfoProp->setPropertyValue(
+ ::rtl::OUString::createFromAscii(
+ PROP_RELOADSECS), aPropAny );
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ else if ( nElementType == XML_TOK_META_HYPERLINKBEHAVIOUR )
+ {
+ // <meta:hyperlink-behaviour>: everything is in the attributes
+
+ uno::Reference<beans::XPropertySet> xInfoProp = rParent.GetInfoProp();
+ if ( xInfoProp.is() )
+ {
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(
+ sAttrName, &aLocalName );
+ if ( nPrefix == XML_NAMESPACE_OFFICE &&
+ aLocalName.compareToAscii(sXML_target_frame_name) == 0 )
+ {
+ rtl::OUString sValue = xAttrList->getValueByIndex( i );
+ aPropAny <<= sValue;
+ xInfoProp->setPropertyValue(
+ ::rtl::OUString::createFromAscii(PROP_DEFAULTTARGET),
+ aPropAny );
+ }
+ }
+ }
+ }
+ else if ( nElementType == XML_TOK_META_USERDEFINED )
+ {
+ // <meta:user-defined>: get field name from attributes
+
+ INT16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( INT16 i=0; i < nAttrCount; i++ )
+ {
+ rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
+ rtl::OUString aLocalName;
+ sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(
+ sAttrName, &aLocalName );
+ if ( nPrefix == XML_NAMESPACE_META &&
+ aLocalName.compareToAscii(sXML_name) == 0 )
+ {
+ sFieldName = xAttrList->getValueByIndex( i );
+ }
+ }
+ }
+}
+
+SfxXMLMetaElementContext::~SfxXMLMetaElementContext()
+{
+ rParent.ReleaseRef();
+}
+
+SvXMLImportContext* SfxXMLMetaElementContext::CreateChildContext( sal_uInt16 nPrefix,
+ const rtl::OUString& rLName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList )
+{
+ SvXMLImportContext* pContext = NULL;
+
+ if ( nElementType == XML_TOK_META_KEYWORDS &&
+ nPrefix == XML_NAMESPACE_META &&
+ rLName.compareToAscii(sXML_keyword) == 0 )
+ {
+ // <office:keyword> inside of <office:keywords>
+ pContext = new SfxXMLMetaElementContext( GetImport(), nPrefix, rLName,
+ xAttrList, rParent, XML_TOK_META_KEYWORD );
+ }
+
+ if ( !pContext )
+ {
+ // default context to ignore unknown elements
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
+ }
+ return pContext;
+}
+
+void SfxXMLMetaElementContext::EndElement()
+{
+ uno::Reference<beans::XPropertySet> xInfoProp = rParent.GetInfoProp();
+ if ( !xInfoProp.is() )
+ return;
+
+ uno::Any aPropAny;
+ util::DateTime aDateTime;
+ Time aTime;
+ sal_Int32 nValue;
+ switch ( nElementType )
+ {
+ // simple strings
+ case XML_TOK_META_TITLE:
+ aPropAny <<= sContent;
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_TITLE), aPropAny );
+ break;
+ case XML_TOK_META_DESCRIPTION:
+ aPropAny <<= sContent;
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_DESCRIPTION), aPropAny );
+ break;
+ case XML_TOK_META_SUBJECT:
+ aPropAny <<= sContent;
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_THEME), aPropAny );
+ break;
+ case XML_TOK_META_INITIALCREATOR:
+ aPropAny <<= sContent;
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_AUTHOR), aPropAny );
+ break;
+ case XML_TOK_META_CREATOR:
+ aPropAny <<= sContent;
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_MODIFIEDBY), aPropAny );
+ break;
+ case XML_TOK_META_PRINTEDBY:
+ aPropAny <<= sContent;
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_PRINTEDBY), aPropAny );
+ break;
+ // date/time
+ case XML_TOK_META_CREATIONDATE:
+ if ( ParseISODateTimeString( sContent, aDateTime ) )
+ {
+ aPropAny <<= aDateTime;
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_CREATIONDATE), aPropAny );
+ }
+ break;
+ case XML_TOK_META_DATE:
+ if ( ParseISODateTimeString( sContent, aDateTime ) )
+ {
+ aPropAny <<= aDateTime;
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_MODIFYDATE), aPropAny );
+ }
+ break;
+ case XML_TOK_META_PRINTDATE:
+ if ( ParseISODateTimeString( sContent, aDateTime ) )
+ {
+ aPropAny <<= aDateTime;
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_PRINTDATE), aPropAny );
+ }
+ break;
+ // others
+ case XML_TOK_META_LANGUAGE:
+ {
+ uno::Reference<beans::XPropertySet> xDocProp = rParent.GetDocProp();
+ if ( xDocProp.is() )
+ {
+ // set document language in document properties
+ // (not available for all document types)
+
+ lang::Locale aLocale;
+ String aString( sContent );
+ xub_StrLen nSepPos = aString.Search( (sal_Unicode)'-' );
+ if ( nSepPos != STRING_NOTFOUND )
+ {
+ aLocale.Language = aString.Copy( 0, nSepPos );
+ aLocale.Country = aString.Copy( nSepPos+1 );
+ }
+ else
+ aLocale.Language = aString;
+
+ aPropAny <<= aLocale;
+ try
+ {
+ xDocProp->setPropertyValue(
+ ::rtl::OUString::createFromAscii( PROP_CHARLOCALE ),
+ aPropAny );
+ }
+ catch (beans::UnknownPropertyException&)
+ {
+ // no error
+ }
+ }
+ }
+ break;
+ case XML_TOK_META_EDITINGCYCLES:
+ if ( lcl_GetNumber( sContent, nValue, USHRT_MAX ) )
+ {
+ aPropAny <<= (sal_Int16) nValue;
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_EDITINGCYCLES), aPropAny );
+ }
+ break;
+ case XML_TOK_META_EDITINGDURATION:
+ // property is a int32 with the Time::GetTime value
+ if ( ParseISODurationString( sContent, aTime ) )
+ {
+ aPropAny <<= (sal_Int32) aTime.GetTime();
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_EDITINGDURATION), aPropAny );
+ }
+ break;
+ case XML_TOK_META_KEYWORDS:
+ // nothing to do, keywords are handled in XML_TOK_META_KEYWORD
+ break;
+ case XML_TOK_META_TEMPLATE:
+ case XML_TOK_META_AUTORELOAD:
+ case XML_TOK_META_HYPERLINKBEHAVIOUR:
+ // nothing to do, everything is handled in attributes
+ break;
+ case XML_TOK_META_KEYWORD:
+ rParent.AddKeyword( sContent );
+ break;
+ case XML_TOK_META_USERDEFINED:
+ rParent.AddUserField( sFieldName, sContent );
+ break;
+ default:
+ DBG_ERROR("wrong element");
+ }
+}
+
+void SfxXMLMetaElementContext::Characters( const rtl::OUString& rChars )
+{
+ sContent += rChars;
+}
+
+//-------------------------------------------------------------------------
+//
+// context for <office:meta> element
+//
+
+SfxXMLMetaContext::SfxXMLMetaContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLName,
+ const uno::Reference<frame::XModel>& rDocModel ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ xDocProp( rDocModel, uno::UNO_QUERY ),
+ pTokenMap( NULL ),
+ nUserKeys( 0 )
+{
+ uno::Reference<document::XDocumentInfoSupplier> xSupp( rDocModel, uno::UNO_QUERY );
+ if ( xSupp.is() )
+ {
+ xDocInfo = xSupp->getDocumentInfo();
+ xInfoProp = uno::Reference<beans::XPropertySet>( xDocInfo, uno::UNO_QUERY );
+ }
+ DBG_ASSERT( xInfoProp.is(), "no document info properties" );
+}
+
+SfxXMLMetaContext::~SfxXMLMetaContext()
+{
+ delete pTokenMap;
+}
+
+SvXMLImportContext* SfxXMLMetaContext::CreateChildContext( sal_uInt16 nPrefix,
+ const rtl::OUString& rLName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList )
+{
+ SvXMLImportContext* pContext = NULL;
+
+ if (!pTokenMap)
+ pTokenMap = new SvXMLTokenMap( aMetaElemTokenMap );
+
+ sal_uInt16 nToken = pTokenMap->Get( nPrefix, rLName );
+ if ( nToken != XML_TOK_UNKNOWN )
+ pContext = new SfxXMLMetaElementContext( GetImport(),
+ nPrefix, rLName, xAttrList, *this, nToken );
+
+ if ( !pContext )
+ {
+ // default context to ignore unknown elements
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
+ }
+ return pContext;
+}
+
+void SfxXMLMetaContext::EndElement()
+{
+ if ( sKeywords.getLength() && xInfoProp.is() )
+ {
+ uno::Any aAny;
+ aAny <<= rtl::OUString(sKeywords);
+ xInfoProp->setPropertyValue( ::rtl::OUString::createFromAscii(PROP_KEYWORDS), aAny );
+ }
+}
+
+void SfxXMLMetaContext::AddKeyword( const rtl::OUString& rKW )
+{
+ if ( sKeywords.getLength() )
+ {
+ // comma separated
+ sKeywords.append(sal_Unicode(','));
+ sKeywords.append(sal_Unicode(' '));
+ }
+ sKeywords.append( rKW );
+}
+
+void SfxXMLMetaContext::AddUserField( const rtl::OUString& rName, const rtl::OUString& rContent )
+{
+ if ( xDocInfo.is() && nUserKeys < xDocInfo->getUserFieldCount() )
+ {
+ // keep default name if none is there
+ if ( rName.len() )
+ xDocInfo->setUserFieldName( nUserKeys, rName );
+ xDocInfo->setUserFieldValue( nUserKeys, rContent );
+ ++nUserKeys;
+ }
+}
+
+
diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx
new file mode 100644
index 0000000000..477cb64dcb
--- /dev/null
+++ b/xmloff/source/style/DashStyle.cxx
@@ -0,0 +1,367 @@
+/*************************************************************************
+ *
+ * $RCSfile: DashStyle.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_DASHSTYLE_HXX
+#include "DashStyle.hxx"
+#endif
+
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include"attrlist.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include"xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include"xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include<rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include<rtl/ustring>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+/*
+enum SvXMLTokenMapAttrs
+{
+ XML_TOK_GRADIENT_NAME,
+ XML_TOK_GRADIENT_STYLE,
+ XML_TOK_GRADIENT_CX,
+ XML_TOK_GRADIENT_CY,
+ XML_TOK_GRADIENT_STARTCOLOR,
+ XML_TOK_GRADIENT_ENDCOLOR,
+ XML_TOK_GRADIENT_STARTINT,
+ XML_TOK_GRADIENT_ENDINT,
+ XML_TOK_GRADIENT_ANGEL,
+ XML_TOK_GRADIENT_BORDER,
+ XML_TOK_TABSTOP_END=XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aGradientAttrTokenMap[] =
+{
+ { XML_NAMESPACE_DRAW, sXML_name, XML_TOK_GRADIENT_NAME },
+ { XML_NAMESPACE_DRAW, sXML_style, XML_TOK_GRADIENT_STYLE },
+ { XML_NAMESPACE_DRAW, sXML_cx, XML_TOK_GRADIENT_CX },
+ { XML_NAMESPACE_DRAW, sXML_cy, XML_TOK_GRADIENT_CY },
+ { XML_NAMESPACE_DRAW, sXML_start_color, XML_TOK_GRADIENT_STARTCOLOR },
+ { XML_NAMESPACE_DRAW, sXML_end_color, XML_TOK_GRADIENT_ENDCOLOR },
+ { XML_NAMESPACE_DRAW, sXML_start_intensity, XML_TOK_GRADIENT_STARTINT },
+ { XML_NAMESPACE_DRAW, sXML_end_intensity, XML_TOK_GRADIENT_ENDINT },
+ { XML_NAMESPACE_DRAW, sXML_gradient_angel, XML_TOK_GRADIENT_ANGEL },
+ { XML_NAMESPACE_DRAW, sXML_gradient_border, XML_TOK_GRADIENT_BORDER },
+ XML_TOKEN_MAP_END
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_GradientStyle_Enum[] =
+{
+ { sXML_gradientstyle_linear, awt::GradientStyle_LINEAR },
+ { sXML_gradientstyle_axial, awt::GradientStyle_AXIAL },
+ { sXML_gradientstyle_radial, awt::GradientStyle_RADIAL },
+ { sXML_gradientstyle_ellipsoid, awt::GradientStyle_ELLIPTICAL },
+ { sXML_gradientstyle_square, awt::GradientStyle_SQUARE },
+ { sXML_gradientstyle_rectangular, awt::GradientStyle_RECT },
+ { 0, 0 }
+};
+*/
+XMLDashStyle::XMLDashStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > * _pHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter )
+: mpHandler ( _pHandler ),
+ mrNamespaceMap ( _rNamespaceMap ),
+ mrUnitConverter( _rUnitConverter ),
+ mpAttrList ( NULL )
+{
+}
+
+XMLDashStyle::~XMLDashStyle()
+{
+}
+
+void XMLDashStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const OUString& rStrValue )
+{
+ const OUString aStrName( OUString::createFromAscii( pName ) );
+ const OUString aStrCDATA( OUString::createFromAscii( sXML_CDATA ) );
+
+ mpAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, rStrValue );
+}
+
+sal_Bool XMLDashStyle::exportXML( const OUString& rStrName, const ::com::sun::star::uno::Any& rValue )
+{
+ return ImpExportXML( *mpHandler, mrNamespaceMap, mrUnitConverter, rStrName, rValue );
+}
+
+sal_Bool XMLDashStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName )
+{
+ return ImpImportXML( mrUnitConverter, xAttrList, rValue, rStrName );
+}
+
+sal_Bool XMLDashStyle::ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const OUString& rStrName, const uno::Any& rValue )
+{
+ sal_Bool bRet = sal_False;
+/*
+ awt::Gradient aGradient;
+
+ if( rStrName.getLength() )
+ {
+ if( rValue >>= aGradient )
+ {
+ mpAttrList = new SvXMLAttributeList(); // Do NOT delete me !!
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > xAttrList( mpAttrList );
+
+ OUString aStrValue;
+ OUStringBuffer aOut;
+
+ // Name
+ OUString aStrName( rStrName );
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_name, aStrName );
+
+ // Style
+ if( !rUnitConverter.convertEnum( aOut, aGradient.Style, pXML_GradientStyle_Enum ) )
+ return sal_False;
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_style, aStrValue );
+
+ // Center x/y
+ if( aGradient.Style != awt::GradientStyle_LINEAR &&
+ aGradient.Style != awt::GradientStyle_AXIAL )
+ {
+ rUnitConverter.convertPercent( aOut, aGradient.XOffset );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_cx, aStrValue );
+
+ rUnitConverter.convertPercent( aOut, aGradient.YOffset );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_cy, aStrValue );
+ }
+
+ Color aColor;
+
+ // Color start
+ aColor.SetColor( aGradient.StartColor );
+ rUnitConverter.convertColor( aOut, aColor );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_start_color, aStrValue );
+
+ // Color end
+ aColor.SetColor( aGradient.EndColor );
+ rUnitConverter.convertColor( aOut, aColor );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_end_color, aStrValue );
+
+ // Intensity start
+ rUnitConverter.convertPercent( aOut, aGradient.StartIntensity );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_start_intensity, aStrValue );
+
+ // Intensity end
+ rUnitConverter.convertPercent( aOut, aGradient.EndIntensity );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_end_intensity, aStrValue );
+
+ // Angle
+ if( aGradient.Style != awt::GradientStyle_RADIAL )
+ {
+ rUnitConverter.convertNumber( aOut, sal_Int32( aGradient.Angle ) );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_gradient_angel, aStrValue );
+ }
+
+ // Border
+ rUnitConverter.convertPercent( aOut, aGradient.Border );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_gradient_border, aStrValue );
+
+ // Do Write
+ OUString aStrTmp( RTL_CONSTASCII_USTRINGPARAM( sXML_stroke_dasharray ) );
+ rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_SVG, aStrTmp ),
+ xAttrList );
+ rHandler->endElement( OUString::createFromAscii( sXML_gradient ) );
+ }
+ }
+*/
+ return bRet;
+}
+
+sal_Bool XMLDashStyle::ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ uno::Any& rValue, OUString& rStrName )
+{
+ sal_Bool bRet = sal_False;
+/*
+ sal_Bool bHasName = sal_False;
+ sal_Bool bHasStyle = sal_False;
+ sal_Bool bHasStartColor = sal_False;
+ sal_Bool bHasEndColor = sal_False;
+
+ awt::Gradient aGradient;
+ aGradient.XOffset = 0;
+ aGradient.YOffset = 0;
+ aGradient.StartIntensity = 100;
+ aGradient.EndIntensity = 100;
+ aGradient.Angle = 0;
+ aGradient.Border = 0;
+
+ SvXMLTokenMap aTokenMap( aGradientAttrTokenMap );
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rFullAttrName = xAttrList->getNameByIndex( i );
+ OUString aStrAttrName;
+ sal_uInt16 nPrefix = mrNamespaceMap.GetKeyByAttrName( rFullAttrName, &aStrAttrName );
+ const OUString& rStrValue = xAttrList->getValueByIndex( i );
+
+ sal_Int32 nTmpValue;
+
+ switch( aTokenMap.Get( nPrefix, aStrAttrName ) )
+ {
+ case XML_TOK_GRADIENT_NAME:
+ {
+ rStrName = rStrValue;
+ bHasName = sal_True;
+ }
+ break;
+ case XML_TOK_GRADIENT_STYLE:
+ {
+ sal_uInt16 eValue;
+ if( rUnitConverter.convertEnum( eValue, rStrValue, pXML_GradientStyle_Enum ) )
+ {
+ aGradient.Style = (awt::GradientStyle) eValue;
+ bHasStyle = sal_True;
+ }
+ }
+ break;
+ case XML_TOK_GRADIENT_CX:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.XOffset = nTmpValue;
+ break;
+ case XML_TOK_GRADIENT_CY:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.YOffset = nTmpValue;
+ break;
+ case XML_TOK_GRADIENT_STARTCOLOR:
+ {
+ Color aColor;
+ if( bHasStartColor = rUnitConverter.convertColor( aColor, rStrValue ) )
+ aGradient.StartColor = (sal_Int32)( aColor.GetColor() );
+ }
+ break;
+ case XML_TOK_GRADIENT_ENDCOLOR:
+ {
+ Color aColor;
+ if( bHasStartColor = rUnitConverter.convertColor( aColor, rStrValue ) )
+ aGradient.EndColor = (sal_Int32)( aColor.GetColor() );
+ }
+ break;
+ case XML_TOK_GRADIENT_STARTINT:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.StartIntensity = nTmpValue;
+ break;
+ case XML_TOK_GRADIENT_ENDINT:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.EndIntensity = nTmpValue;
+ break;
+ case XML_TOK_GRADIENT_ANGEL:
+ {
+ sal_Int32 nValue;
+ rUnitConverter.convertNumber( nValue, rStrValue, 0, 360 );
+ aGradient.Angle = sal_Int16( nValue );
+ }
+ break;
+ case XML_TOK_GRADIENT_BORDER:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.Border = nTmpValue;
+ break;
+
+ default:
+ DBG_WARNING( "Unknown token at import gradient style" )
+ }
+ }
+
+ rValue <<= aGradient;
+
+ bRet = bHasName && bHasStyle && bHasStartColor && bHasEndColor;
+*/
+ return bRet;
+}
diff --git a/xmloff/source/style/EnumPropertyHdl.cxx b/xmloff/source/style/EnumPropertyHdl.cxx
new file mode 100644
index 0000000000..549e19bab9
--- /dev/null
+++ b/xmloff/source/style/EnumPropertyHdl.cxx
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * $RCSfile: EnumPropertyHdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_ENUMPROPERTYHANDLER_HXX
+#include <EnumPropertyHdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include <rtl/ustring>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+/*
+#ifndef _VCL_VCLENUM_HXX
+#include <vcl/vclenum.hxx>
+#endif
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+#ifndef _INC_LIMITS
+#include <limits.h>
+#endif
+
+
+#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
+#include <toolkit/unohlp.hxx>
+#endif
+*/
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLEnumPropertyHdl
+//
+
+XMLEnumPropertyHdl::~XMLEnumPropertyHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLEnumPropertyHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ USHORT nValue = 0;
+
+ if( SvXMLUnitConverter::convertEnum( nValue, rStrImpValue, mpEnumMap ) )
+ {
+ rValue = ::cppu::int2enum( nValue, mrType );
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+sal_Bool XMLEnumPropertyHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Int32 nValue;
+ if(!(rValue >>= nValue ))
+ if(!::cppu::enum2int(nValue, rValue) )
+ return sal_False;
+
+ OUStringBuffer aOut;
+
+ if(!SvXMLUnitConverter::convertEnum( aOut, nValue, mpEnumMap ))
+ return sal_False;
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return sal_True;
+}
+
diff --git a/xmloff/source/style/FillStyleContext.cxx b/xmloff/source/style/FillStyleContext.cxx
new file mode 100644
index 0000000000..00e6a6fba7
--- /dev/null
+++ b/xmloff/source/style/FillStyleContext.cxx
@@ -0,0 +1,305 @@
+/*************************************************************************
+ *
+ * $RCSfile: FillStyleContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+
+#ifndef _XMLOFF_FILLSTYLECONTEXTS_HXX_
+#include "FillStyleContext.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_GRADIENTSTYLE_HXX
+#include "GradientStyle.hxx"
+#endif
+#ifndef _XMLOFF_HATCHSTYLE_HXX
+#include "HatchStyle.hxx"
+#endif
+#ifndef _XMLOFF_IMAGESTYLE_HXX
+#include "ImageStyle.hxx"
+#endif
+#ifndef _XMLOFF_TRANSGRADIENTSTYLE_HXX
+#include "TransGradientStyle.hxx"
+#endif
+#ifndef _XMLOFF_MARKERSTYLE_HXX
+#include "MarkerStyle.hxx"
+#endif
+#ifndef _XMLOFF_DASHSTYLE_HXX
+#include "DashStyle.hxx"
+#endif
+
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( XMLGradientStyleContext, SvXMLStyleContext );
+
+XMLGradientStyleContext::XMLGradientStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList)
+: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList)
+{
+ // set Family
+// SetFamily( XML_STYLE_FAMILY_FILLSTYLE_GRADIENT_ID );
+
+ // start import
+ XMLGradientStyle aGradientStyle( NULL, GetImport().GetNamespaceMap(), GetImport().GetMM100UnitConverter() );
+ aGradientStyle.importXML( xAttrList, maAny, maStrName );
+}
+
+XMLGradientStyleContext::~XMLGradientStyleContext()
+{
+}
+
+void XMLGradientStyleContext::EndElement()
+{
+ uno::Reference< container::XNameContainer > xGradient( GetImport().GetGradientHelper() );
+
+ try
+ {
+ if(xGradient.is())
+ xGradient->insertByName( maStrName, maAny );
+ }
+ catch( container::ElementExistException& )
+ {}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( XMLHatchStyleContext, SvXMLStyleContext );
+
+XMLHatchStyleContext::XMLHatchStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList)
+: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList)
+{
+ // start import
+ XMLHatchStyle aHatchStyle( NULL, GetImport().GetNamespaceMap(), GetImport().GetMM100UnitConverter() );
+ aHatchStyle.importXML( xAttrList, maAny, maStrName );
+}
+
+XMLHatchStyleContext::~XMLHatchStyleContext()
+{
+}
+
+void XMLHatchStyleContext::EndElement()
+{
+ uno::Reference< container::XNameContainer > xHatch( GetImport().GetHatchHelper() );
+
+ try
+ {
+ if(xHatch.is())
+ xHatch->insertByName( maStrName, maAny );
+ }
+ catch( container::ElementExistException& )
+ {}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( XMLBitmapStyleContext, SvXMLStyleContext );
+
+XMLBitmapStyleContext::XMLBitmapStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList)
+: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList)
+{
+ // start import
+ XMLImageStyle aBitmapStyle( NULL, GetImport().GetNamespaceMap(), GetImport().GetMM100UnitConverter() );
+ aBitmapStyle.importXML( xAttrList, maAny, maStrName );
+}
+
+XMLBitmapStyleContext::~XMLBitmapStyleContext()
+{
+}
+
+void XMLBitmapStyleContext::EndElement()
+{
+ uno::Reference< container::XNameContainer > xBitmap( GetImport().GetBitmapHelper() );
+
+ try
+ {
+ if(xBitmap.is())
+ xBitmap->insertByName( maStrName, maAny );
+ }
+ catch( container::ElementExistException& )
+ {}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( XMLTransGradientStyleContext, SvXMLStyleContext );
+
+XMLTransGradientStyleContext::XMLTransGradientStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList)
+: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList)
+{
+ // start import
+ XMLTransGradientStyle aTransGradientStyle( NULL, GetImport().GetNamespaceMap(), GetImport().GetMM100UnitConverter() );
+ aTransGradientStyle.importXML( xAttrList, maAny, maStrName );
+}
+
+XMLTransGradientStyleContext::~XMLTransGradientStyleContext()
+{
+}
+
+void XMLTransGradientStyleContext::EndElement()
+{
+ uno::Reference< container::XNameContainer > xTransGradient( GetImport().GetTransGradientHelper() );
+
+ try
+ {
+ if(xTransGradient.is())
+ xTransGradient->insertByName( maStrName, maAny );
+ }
+ catch( container::ElementExistException& )
+ {}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( XMLMarkerStyleContext, SvXMLStyleContext );
+
+XMLMarkerStyleContext::XMLMarkerStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList)
+: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList)
+{
+ // start import
+ XMLMarkerStyle aMarkerStyle( NULL, GetImport().GetNamespaceMap(), GetImport().GetMM100UnitConverter() );
+ aMarkerStyle.importXML( xAttrList, maAny, maStrName );
+}
+
+XMLMarkerStyleContext::~XMLMarkerStyleContext()
+{
+}
+
+void XMLMarkerStyleContext::EndElement()
+{
+ uno::Reference< container::XNameContainer > xMarker( GetImport().GetMarkerHelper() );
+
+ try
+ {
+ if(xMarker.is())
+ xMarker->insertByName( maStrName, maAny );
+ }
+ catch( container::ElementExistException& )
+ {}
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+TYPEINIT1( XMLDashStyleContext, SvXMLStyleContext );
+
+XMLDashStyleContext::XMLDashStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList)
+: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList)
+{
+ // start import
+ XMLDashStyle aDashStyle( NULL, GetImport().GetNamespaceMap(), GetImport().GetMM100UnitConverter() );
+ aDashStyle.importXML( xAttrList, maAny, maStrName );
+}
+
+XMLDashStyleContext::~XMLDashStyleContext()
+{
+}
+
+void XMLDashStyleContext::EndElement()
+{
+ uno::Reference< container::XNameContainer > xDashes( GetImport().GetDashHelper() );
+
+ try
+ {
+ if(xDashes.is())
+ xDashes->insertByName( maStrName, maAny );
+ }
+ catch( container::ElementExistException& )
+ {}
+}
diff --git a/xmloff/source/style/FillStyleContext.hxx b/xmloff/source/style/FillStyleContext.hxx
new file mode 100644
index 0000000000..e1021cf9f4
--- /dev/null
+++ b/xmloff/source/style/FillStyleContext.hxx
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * $RCSfile: FillStyleContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_FILLSTYLECONTEXTS_HXX_
+#define _XMLOFF_FILLSTYLECONTEXTS_HXX_
+
+#ifndef _XMLOFF_XMLSTYLE_HXX //autogen
+#include <xmlstyle.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include<rtl/ustring>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:gardient context
+
+class XMLGradientStyleContext: public SvXMLStyleContext
+{
+private:
+ ::com::sun::star::uno::Any maAny;
+ rtl::OUString maStrName;
+
+public:
+ TYPEINFO();
+
+ XMLGradientStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual ~XMLGradientStyleContext();
+
+ virtual void EndElement();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:hatch context
+
+class XMLHatchStyleContext: public SvXMLStyleContext
+{
+private:
+ ::com::sun::star::uno::Any maAny;
+ rtl::OUString maStrName;
+
+public:
+ TYPEINFO();
+
+ XMLHatchStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual ~XMLHatchStyleContext();
+
+ virtual void EndElement();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:fill-image context
+
+class XMLBitmapStyleContext: public SvXMLStyleContext
+{
+private:
+ ::com::sun::star::uno::Any maAny;
+ rtl::OUString maStrName;
+
+public:
+ TYPEINFO();
+
+ XMLBitmapStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual ~XMLBitmapStyleContext();
+
+ virtual void EndElement();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:transparency context
+
+class XMLTransGradientStyleContext: public SvXMLStyleContext
+{
+private:
+ ::com::sun::star::uno::Any maAny;
+ rtl::OUString maStrName;
+
+public:
+ TYPEINFO();
+
+ XMLTransGradientStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual ~XMLTransGradientStyleContext();
+
+ virtual void EndElement();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:marker context
+
+class XMLMarkerStyleContext: public SvXMLStyleContext
+{
+private:
+ ::com::sun::star::uno::Any maAny;
+ rtl::OUString maStrName;
+
+public:
+ TYPEINFO();
+
+ XMLMarkerStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual ~XMLMarkerStyleContext();
+
+ virtual void EndElement();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// draw:marker context
+
+class XMLDashStyleContext: public SvXMLStyleContext
+{
+private:
+ ::com::sun::star::uno::Any maAny;
+ rtl::OUString maStrName;
+
+public:
+ TYPEINFO();
+
+ XMLDashStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual ~XMLDashStyleContext();
+
+ virtual void EndElement();
+};
+
+#endif // _XMLOFF_FILLSTYLECONTEXTS_HXX_
diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx
new file mode 100644
index 0000000000..7f8654696d
--- /dev/null
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -0,0 +1,370 @@
+/*************************************************************************
+ *
+ * $RCSfile: GradientStyle.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_GRADIENTSTYLE_HXX
+#include "GradientStyle.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_
+#include<com/sun/star/awt/Gradient.hpp>
+#endif
+
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include"attrlist.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include"xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include"xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include<rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include<rtl/ustring>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+
+enum SvXMLTokenMapAttrs
+{
+ XML_TOK_GRADIENT_NAME,
+ XML_TOK_GRADIENT_STYLE,
+ XML_TOK_GRADIENT_CX,
+ XML_TOK_GRADIENT_CY,
+ XML_TOK_GRADIENT_STARTCOLOR,
+ XML_TOK_GRADIENT_ENDCOLOR,
+ XML_TOK_GRADIENT_STARTINT,
+ XML_TOK_GRADIENT_ENDINT,
+ XML_TOK_GRADIENT_ANGEL,
+ XML_TOK_GRADIENT_BORDER,
+ XML_TOK_TABSTOP_END=XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aGradientAttrTokenMap[] =
+{
+ { XML_NAMESPACE_DRAW, sXML_name, XML_TOK_GRADIENT_NAME },
+ { XML_NAMESPACE_DRAW, sXML_style, XML_TOK_GRADIENT_STYLE },
+ { XML_NAMESPACE_DRAW, sXML_cx, XML_TOK_GRADIENT_CX },
+ { XML_NAMESPACE_DRAW, sXML_cy, XML_TOK_GRADIENT_CY },
+ { XML_NAMESPACE_DRAW, sXML_start_color, XML_TOK_GRADIENT_STARTCOLOR },
+ { XML_NAMESPACE_DRAW, sXML_end_color, XML_TOK_GRADIENT_ENDCOLOR },
+ { XML_NAMESPACE_DRAW, sXML_start_intensity, XML_TOK_GRADIENT_STARTINT },
+ { XML_NAMESPACE_DRAW, sXML_end_intensity, XML_TOK_GRADIENT_ENDINT },
+ { XML_NAMESPACE_DRAW, sXML_gradient_angel, XML_TOK_GRADIENT_ANGEL },
+ { XML_NAMESPACE_DRAW, sXML_gradient_border, XML_TOK_GRADIENT_BORDER },
+ XML_TOKEN_MAP_END
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_GradientStyle_Enum[] =
+{
+ { sXML_gradientstyle_linear, awt::GradientStyle_LINEAR },
+ { sXML_gradientstyle_axial, awt::GradientStyle_AXIAL },
+ { sXML_gradientstyle_radial, awt::GradientStyle_RADIAL },
+ { sXML_gradientstyle_ellipsoid, awt::GradientStyle_ELLIPTICAL },
+ { sXML_gradientstyle_square, awt::GradientStyle_SQUARE },
+ { sXML_gradientstyle_rectangular, awt::GradientStyle_RECT },
+ { 0, 0 }
+};
+
+XMLGradientStyle::XMLGradientStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > * _pHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter )
+: mpHandler ( _pHandler ),
+ mrNamespaceMap ( _rNamespaceMap ),
+ mrUnitConverter( _rUnitConverter ),
+ mpAttrList ( NULL )
+{
+}
+
+XMLGradientStyle::~XMLGradientStyle()
+{
+}
+
+void XMLGradientStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const OUString& rStrValue )
+{
+ const OUString aStrName( OUString::createFromAscii( pName ) );
+ const OUString aStrCDATA( OUString::createFromAscii( sXML_CDATA ) );
+
+ mpAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, rStrValue );
+}
+
+sal_Bool XMLGradientStyle::exportXML( const OUString& rStrName, const ::com::sun::star::uno::Any& rValue )
+{
+ return ImpExportXML( *mpHandler, mrNamespaceMap, mrUnitConverter, rStrName, rValue );
+}
+
+sal_Bool XMLGradientStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName )
+{
+ return ImpImportXML( mrUnitConverter, xAttrList, rValue, rStrName );
+}
+
+sal_Bool XMLGradientStyle::ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const OUString& rStrName, const uno::Any& rValue )
+{
+ sal_Bool bRet = sal_False;
+ awt::Gradient aGradient;
+
+ if( rStrName.getLength() )
+ {
+ if( rValue >>= aGradient )
+ {
+ mpAttrList = new SvXMLAttributeList(); // Do NOT delete me !!
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > xAttrList( mpAttrList );
+
+ OUString aStrValue;
+ OUStringBuffer aOut;
+
+ // Name
+ OUString aStrName( rStrName );
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_name, aStrName );
+
+ // Style
+ if( !rUnitConverter.convertEnum( aOut, aGradient.Style, pXML_GradientStyle_Enum ) )
+ return sal_False;
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_style, aStrValue );
+
+ // Center x/y
+ if( aGradient.Style != awt::GradientStyle_LINEAR &&
+ aGradient.Style != awt::GradientStyle_AXIAL )
+ {
+ rUnitConverter.convertPercent( aOut, aGradient.XOffset );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_cx, aStrValue );
+
+ rUnitConverter.convertPercent( aOut, aGradient.YOffset );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_cy, aStrValue );
+ }
+
+ Color aColor;
+
+ // Color start
+ aColor.SetColor( aGradient.StartColor );
+ rUnitConverter.convertColor( aOut, aColor );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_start_color, aStrValue );
+
+ // Color end
+ aColor.SetColor( aGradient.EndColor );
+ rUnitConverter.convertColor( aOut, aColor );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_end_color, aStrValue );
+
+ // Intensity start
+ rUnitConverter.convertPercent( aOut, aGradient.StartIntensity );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_start_intensity, aStrValue );
+
+ // Intensity end
+ rUnitConverter.convertPercent( aOut, aGradient.EndIntensity );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_end_intensity, aStrValue );
+
+ // Angle
+ if( aGradient.Style != awt::GradientStyle_RADIAL )
+ {
+ rUnitConverter.convertNumber( aOut, sal_Int32( aGradient.Angle ) );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_gradient_angel, aStrValue );
+ }
+
+ // Border
+ rUnitConverter.convertPercent( aOut, aGradient.Border );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_gradient_border, aStrValue );
+
+ // Do Write
+ OUString aStrTmp( RTL_CONSTASCII_USTRINGPARAM( sXML_gradient ) );
+ rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, aStrTmp ),
+ xAttrList );
+ rHandler->endElement( OUString::createFromAscii( sXML_gradient ) );
+ }
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLGradientStyle::ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ uno::Any& rValue, OUString& rStrName )
+{
+ sal_Bool bRet = sal_False;
+ sal_Bool bHasName = sal_False;
+ sal_Bool bHasStyle = sal_False;
+ sal_Bool bHasStartColor = sal_False;
+ sal_Bool bHasEndColor = sal_False;
+
+ awt::Gradient aGradient;
+ aGradient.XOffset = 0;
+ aGradient.YOffset = 0;
+ aGradient.StartIntensity = 100;
+ aGradient.EndIntensity = 100;
+ aGradient.Angle = 0;
+ aGradient.Border = 0;
+
+ SvXMLTokenMap aTokenMap( aGradientAttrTokenMap );
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rFullAttrName = xAttrList->getNameByIndex( i );
+ OUString aStrAttrName;
+ sal_uInt16 nPrefix = mrNamespaceMap.GetKeyByAttrName( rFullAttrName, &aStrAttrName );
+ const OUString& rStrValue = xAttrList->getValueByIndex( i );
+
+ sal_Int32 nTmpValue;
+
+ switch( aTokenMap.Get( nPrefix, aStrAttrName ) )
+ {
+ case XML_TOK_GRADIENT_NAME:
+ {
+ rStrName = rStrValue;
+ bHasName = sal_True;
+ }
+ break;
+ case XML_TOK_GRADIENT_STYLE:
+ {
+ sal_uInt16 eValue;
+ if( rUnitConverter.convertEnum( eValue, rStrValue, pXML_GradientStyle_Enum ) )
+ {
+ aGradient.Style = (awt::GradientStyle) eValue;
+ bHasStyle = sal_True;
+ }
+ }
+ break;
+ case XML_TOK_GRADIENT_CX:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.XOffset = nTmpValue;
+ break;
+ case XML_TOK_GRADIENT_CY:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.YOffset = nTmpValue;
+ break;
+ case XML_TOK_GRADIENT_STARTCOLOR:
+ {
+ Color aColor;
+ if( bHasStartColor = rUnitConverter.convertColor( aColor, rStrValue ) )
+ aGradient.StartColor = (sal_Int32)( aColor.GetColor() );
+ }
+ break;
+ case XML_TOK_GRADIENT_ENDCOLOR:
+ {
+ Color aColor;
+ if( bHasStartColor = rUnitConverter.convertColor( aColor, rStrValue ) )
+ aGradient.EndColor = (sal_Int32)( aColor.GetColor() );
+ }
+ break;
+ case XML_TOK_GRADIENT_STARTINT:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.StartIntensity = nTmpValue;
+ break;
+ case XML_TOK_GRADIENT_ENDINT:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.EndIntensity = nTmpValue;
+ break;
+ case XML_TOK_GRADIENT_ANGEL:
+ {
+ sal_Int32 nValue;
+ rUnitConverter.convertNumber( nValue, rStrValue, 0, 360 );
+ aGradient.Angle = sal_Int16( nValue );
+ }
+ break;
+ case XML_TOK_GRADIENT_BORDER:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.Border = nTmpValue;
+ break;
+
+ default:
+ DBG_WARNING( "Unknown token at import gradient style" )
+ ;
+ }
+ }
+
+ rValue <<= aGradient;
+
+ bRet = bHasName && bHasStyle && bHasStartColor && bHasEndColor;
+
+ return bRet;
+}
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx
new file mode 100644
index 0000000000..f719f5db73
--- /dev/null
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -0,0 +1,291 @@
+/*************************************************************************
+ *
+ * $RCSfile: HatchStyle.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_HATCHSTYLE_HXX
+#include "HatchStyle.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_HATCH_HPP_
+#include <com/sun/star/drawing/Hatch.hpp>
+#endif
+
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include"attrlist.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include"xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include"xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include<rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include<rtl/ustring>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+
+enum SvXMLTokenMapAttrs
+{
+ XML_TOK_HATCH_NAME,
+ XML_TOK_HATCH_STYLE,
+ XML_TOK_HATCH_COLOR,
+ XML_TOK_HATCH_DISTANCE,
+ XML_TOK_HATCH_ROTATION,
+ XML_TOK_TABSTOP_END=XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aHatchAttrTokenMap[] =
+{
+ { XML_NAMESPACE_DRAW, sXML_name, XML_TOK_HATCH_NAME },
+ { XML_NAMESPACE_DRAW, sXML_style, XML_TOK_HATCH_STYLE },
+ { XML_NAMESPACE_DRAW, sXML_color, XML_TOK_HATCH_COLOR },
+ { XML_NAMESPACE_DRAW, sXML_hatch_distance, XML_TOK_HATCH_DISTANCE },
+ { XML_NAMESPACE_DRAW, sXML_rotation, XML_TOK_HATCH_ROTATION },
+ XML_TOKEN_MAP_END
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_HatchStyle_Enum[] =
+{
+ { sXML_hatchstyle_single, drawing::HatchStyle_SINGLE },
+ { sXML_hatchstyle_double, drawing::HatchStyle_DOUBLE },
+ { sXML_hatchstyle_triple, drawing::HatchStyle_TRIPLE },
+ { 0, 0 }
+};
+
+XMLHatchStyle::XMLHatchStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & _rHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter )
+: rHandler ( _rHandler ),
+ mrNamespaceMap ( _rNamespaceMap ),
+ rUnitConverter( _rUnitConverter ),
+ pAttrList ( NULL )
+{
+}
+
+XMLHatchStyle::~XMLHatchStyle()
+{
+}
+
+void XMLHatchStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const ::rtl::OUString& rStrValue )
+{
+ const ::rtl::OUString aStrName( ::rtl::OUString::createFromAscii( pName ) );
+ const ::rtl::OUString aStrCDATA( ::rtl::OUString::createFromAscii( sXML_CDATA ) );
+
+ pAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, rStrValue );
+}
+
+sal_Bool XMLHatchStyle::exportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue )
+{
+ return ImpExportXML( rHandler, mrNamespaceMap, rUnitConverter, rStrName, rValue );
+}
+
+sal_Bool XMLHatchStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName )
+{
+ return ImpImportXML( rUnitConverter, xAttrList, rValue, rStrName );
+}
+
+
+sal_Bool XMLHatchStyle::ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const ::rtl::OUString& rStrName, const uno::Any& rValue )
+{
+ sal_Bool bRet = sal_False;
+ drawing::Hatch aHatch;
+
+ if( rStrName.getLength() )
+ {
+ if( rValue >>= aHatch )
+ {
+ pAttrList = new SvXMLAttributeList(); // Do NOT delete me !!
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > xAttrList( pAttrList );
+
+ ::rtl::OUString aStrValue;
+ ::rtl::OUStringBuffer aOut;
+
+ // Name
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_name, rStrName );
+
+ // Style
+ if( !rUnitConverter.convertEnum( aOut, aHatch.Style, pXML_HatchStyle_Enum ) )
+ return sal_False;
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_style, aStrValue );
+
+ // Color
+ rUnitConverter.convertColor( aOut, Color( aHatch.Color ) );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_color, aStrValue );
+
+ // Distance
+ rUnitConverter.convertMeasure( aOut, aHatch.Distance );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_hatch_distance, aStrValue );
+
+ // Angle
+ rUnitConverter.convertNumber( aOut, sal_Int32( aHatch.Angle ) );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_rotation, aStrValue );
+
+ // Do Write
+ rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, ::rtl::OUString::createFromAscii(sXML_hatch) ),
+ xAttrList );
+ rHandler->endElement( ::rtl::OUString::createFromAscii( sXML_gradient ) );
+ }
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLHatchStyle::ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ uno::Any& rValue, OUString& rStrName )
+{
+ sal_Bool bRet = sal_False;
+
+ sal_Bool bHasName = sal_False;
+ sal_Bool bHasStyle = sal_False;
+ sal_Bool bHasColor = sal_False;
+ sal_Bool bHasDist = sal_False;
+
+ drawing::Hatch aHatch;
+ aHatch.Style = drawing::HatchStyle_SINGLE;
+ aHatch.Color = 0;
+ aHatch.Distance = 0;
+ aHatch.Angle = 0;
+
+ SvXMLTokenMap aTokenMap( aHatchAttrTokenMap );
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rFullAttrName = xAttrList->getNameByIndex( i );
+ OUString aStrAttrName;
+ sal_uInt16 nPrefix = mrNamespaceMap.GetKeyByAttrName( rFullAttrName, &aStrAttrName );
+ const OUString& rStrValue = xAttrList->getValueByIndex( i );
+
+ switch( aTokenMap.Get( nPrefix, aStrAttrName ) )
+ {
+ case XML_TOK_HATCH_NAME:
+ {
+ rStrName = rStrValue;
+ bHasName = sal_True;
+ }
+ break;
+ case XML_TOK_HATCH_STYLE:
+ {
+ sal_uInt16 eValue;
+ if( bHasStyle = rUnitConverter.convertEnum( eValue, rStrValue, pXML_HatchStyle_Enum ) )
+ aHatch.Style = (drawing::HatchStyle) eValue;
+ }
+ break;
+ case XML_TOK_HATCH_COLOR:
+ {
+ Color aColor;
+ if( bHasColor = rUnitConverter.convertColor( aColor, rStrValue ) )
+ aHatch.Color = (sal_Int32)( aColor.GetColor() );
+ }
+ break;
+ case XML_TOK_HATCH_DISTANCE:
+ bHasDist = rUnitConverter.convertMeasure( (sal_Int32&)aHatch.Distance, rStrValue );
+ break;
+ case XML_TOK_HATCH_ROTATION:
+ {
+ sal_Int32 nValue;
+ rUnitConverter.convertNumber( nValue, rStrValue, 0, 360 );
+ aHatch.Angle = sal_Int16( nValue );
+ }
+ break;
+
+ default:
+ DBG_WARNING( "Unknown token at import hatch style" )
+ ;
+ }
+ }
+
+ rValue <<= aHatch;
+
+ bRet = bHasName && bHasStyle && bHasColor && bHasDist;
+
+ return bRet;
+}
diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx
new file mode 100644
index 0000000000..c8ca565454
--- /dev/null
+++ b/xmloff/source/style/ImageStyle.cxx
@@ -0,0 +1,269 @@
+/*************************************************************************
+ *
+ * $RCSfile: ImageStyle.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_IMAGESTYLE_HXX
+#include "ImageStyle.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_XBITMAP_HPP_
+#include <com/sun/star/awt/XBitmap.hpp>
+#endif
+
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include"attrlist.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include"xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include"xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include<rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include<rtl/ustring>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+
+enum SvXMLTokenMapAttrs
+{
+ XML_TOK_IMAGE_NAME,
+ XML_TOK_IMAGE_URL,
+ XML_TOK_IMAGE_TYPE,
+ XML_TOK_IMAGE_SHOW,
+ XML_TOK_IMAGE_ACTUATE,
+ /* XML_TOK_IMAGE_SIZEW,
+ XML_TOK_IMAGE_SIZEH,*/
+ XML_TOK_TABSTOP_END=XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aHatchAttrTokenMap[] =
+{
+ { XML_NAMESPACE_DRAW, sXML_name, XML_TOK_IMAGE_NAME },
+ { XML_NAMESPACE_XLINK, sXML_href, XML_TOK_IMAGE_URL },
+ { XML_NAMESPACE_XLINK, sXML_type, XML_TOK_IMAGE_TYPE },
+ { XML_NAMESPACE_XLINK, sXML_show, XML_TOK_IMAGE_SHOW },
+ { XML_NAMESPACE_XLINK, sXML_actuate, XML_TOK_IMAGE_ACTUATE },
+ /*{ XML_NAMESPACE_XLINK, sXML_href, XML_TOK_IMAGE_URL },
+ { XML_NAMESPACE_XLINK, sXML_href, XML_TOK_IMAGE_URL },*/
+ XML_TOKEN_MAP_END
+};
+
+XMLImageStyle::XMLImageStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & _rHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter )
+: rHandler ( _rHandler ),
+ mrNamespaceMap ( _rNamespaceMap ),
+ rUnitConverter( _rUnitConverter ),
+ pAttrList ( NULL )
+{
+}
+
+XMLImageStyle::~XMLImageStyle()
+{
+}
+
+void XMLImageStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const OUString& aStrValue )
+{
+ const OUString aStrName( OUString::createFromAscii( pName ) );
+ const OUString aStrCDATA( OUString::createFromAscii( sXML_CDATA ) );
+
+ pAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, aStrValue );
+}
+
+sal_Bool XMLImageStyle::exportXML( const OUString& rStrName, const ::com::sun::star::uno::Any& rValue )
+{
+ return ImpExportXML( rHandler, mrNamespaceMap, rUnitConverter, rStrName, rValue );
+}
+
+sal_Bool XMLImageStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName )
+{
+ return ImpImportXML( rUnitConverter, xAttrList, rValue, rStrName );
+}
+
+sal_Bool XMLImageStyle::ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const OUString& rStrName, const uno::Any& rValue )
+{
+ sal_Bool bRet = sal_False;
+
+ OUString aURL;
+
+ if( rStrName.getLength() )
+ {
+ if( rValue >>= aURL )
+ {
+ pAttrList = new SvXMLAttributeList(); // Do NOT delete me !!
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > xAttrList( pAttrList );
+
+ OUString aStrValue;
+ OUStringBuffer aOut;
+
+ // Name
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_name, rStrName );
+
+ // uri
+ AddAttribute( XML_NAMESPACE_XLINK, sXML_href, aURL );
+ AddAttribute( XML_NAMESPACE_XLINK, sXML_type, OUString::createFromAscii(sXML_simple) );
+ AddAttribute( XML_NAMESPACE_XLINK, sXML_show, OUString::createFromAscii(sXML_parsed) );
+ AddAttribute( XML_NAMESPACE_XLINK, sXML_actuate, OUString::createFromAscii(sXML_auto) );
+
+/*
+ // size
+ awt::Size aSize = xBitmap->getSize();
+
+ rUnitConverter.convertNumber( aOut, aSize.Width );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_SVG, sXML_width, aStrValue );
+
+ rUnitConverter.convertNumber( aOut, aSize.Height );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_SVG, sXML_height, aStrValue );
+*/
+
+ // Do Write
+ rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, OUString::createFromAscii(sXML_fill_image) ),
+ xAttrList );
+ rHandler->endElement( OUString::createFromAscii( sXML_fill_image ) );
+ }
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLImageStyle::ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ uno::Any& rValue, OUString& rStrName )
+{
+ sal_Bool bRet = sal_False;
+
+ sal_Bool bHasHRef = sal_False;
+ sal_Bool bHasName = sal_False;
+
+ OUString aStrURL;
+
+ SvXMLTokenMap aTokenMap( aHatchAttrTokenMap );
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rFullAttrName = xAttrList->getNameByIndex( i );
+ OUString aStrAttrName;
+ sal_uInt16 nPrefix = mrNamespaceMap.GetKeyByAttrName( rFullAttrName, &aStrAttrName );
+ const OUString& rStrValue = xAttrList->getValueByIndex( i );
+
+ switch( aTokenMap.Get( nPrefix, aStrAttrName ) )
+ {
+ case XML_TOK_IMAGE_NAME:
+ {
+ rStrName = rStrValue;
+ bHasName = sal_True;
+ }
+ break;
+ case XML_TOK_IMAGE_URL:
+ {
+ aStrURL = rStrValue;
+ bHasHRef = sal_True;
+ }
+ break;
+ case XML_TOK_IMAGE_TYPE:
+ // ignore
+ break;
+ case XML_TOK_IMAGE_SHOW:
+ // ignore
+ break;
+ case XML_TOK_IMAGE_ACTUATE:
+ // ignore
+ break;
+ default:
+ DBG_WARNING( "Unknown token at import fill bitmap style" )
+ ;
+ }
+ }
+
+ rValue <<= aStrURL;
+
+ bRet = bHasName && bHasHRef;
+
+ return bRet;
+}
diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx
new file mode 100644
index 0000000000..4f8e356b0c
--- /dev/null
+++ b/xmloff/source/style/MarkerStyle.cxx
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * $RCSfile: MarkerStyle.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_MARKERSTYLE_HXX
+#include "MarkerStyle.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCE_HPP_
+#include <com/sun/star/drawing/PointSequence.hpp>
+#endif
+
+#ifndef _XEXPTRANSFORM_HXX
+#include "xexptran.hxx"
+#endif
+
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include"attrlist.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include"xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include"xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include<rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include<rtl/ustring>
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+
+XMLMarkerStyle::XMLMarkerStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & _rHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter )
+: rHandler ( _rHandler ),
+ mrNamespaceMap ( _rNamespaceMap ),
+ rUnitConverter( _rUnitConverter ),
+ pAttrList ( NULL )
+{
+}
+
+XMLMarkerStyle::~XMLMarkerStyle()
+{
+}
+
+void XMLMarkerStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const OUString& rStrValue )
+{
+ const OUString aStrName( OUString::createFromAscii( pName ) );
+ const OUString aStrCDATA( OUString::createFromAscii( sXML_CDATA ) );
+
+ pAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, rStrValue );
+}
+
+sal_Bool XMLMarkerStyle::exportXML( const OUString& rStrName, const ::com::sun::star::uno::Any& rValue )
+{
+ return ImpExportXML( rHandler, mrNamespaceMap, rUnitConverter, rStrName, rValue );
+}
+
+sal_Bool XMLMarkerStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName )
+{
+ return ImpImportXML( rUnitConverter, xAttrList, rValue, rStrName );
+}
+
+sal_Bool XMLMarkerStyle::ImpExportXML( const uno::Reference< xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const OUString& rStrName, const uno::Any& rValue )
+{
+ sal_Bool bRet = sal_False;
+ drawing::PointSequence aPointSequence;
+
+ if( rStrName.getLength() )
+ {
+ if( rValue >>= aPointSequence )
+ {
+ pAttrList = new SvXMLAttributeList(); // Do NOT delete me !!
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > xAttrList( pAttrList );
+
+ OUString aStrValue;
+ OUStringBuffer aOut;
+
+ /////////////////
+ // Name
+ OUString aStrName( rStrName );
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_name, aStrName );
+
+ /////////////////
+ // Viewbox (viewBox="0 0 1500 1000")
+ const awt::Point *pPoints = aPointSequence.getConstArray();
+ sal_Int32 nPointCount = aPointSequence.getLength();
+ sal_Int32 nMinX = 0, nMaxX = 0, nMinY = 0, nMaxY = 0;
+
+ for( sal_Int32 i = 0; i<nPointCount; i++ )
+ {
+ const awt::Point aPoint = pPoints[i];
+
+ if( aPoint.X < nMinX )
+ nMinX = aPoint.X;
+ if( aPoint.X > nMaxX )
+ nMaxX = aPoint.X;
+ if( aPoint.Y < nMinY )
+ nMinY = aPoint.Y;
+ if( aPoint.Y > nMaxY )
+ nMaxY = aPoint.Y;
+ }
+
+ sal_Int32 nDifX = nMaxX - nMinX;
+ sal_Int32 nDifY = nMaxY - nMinY;
+ nDifX = nDifX >= 0 ? nDifX : -nDifX;
+ nDifY = nDifY >= 0 ? nDifY : -nDifY;
+
+ SdXMLImExViewBox aViewBox( 0, 0, nDifX, nDifY );
+ AddAttribute( XML_NAMESPACE_SVG, sXML_viewBox, aViewBox.GetExportString( rUnitConverter ) );
+
+ /////////////////
+ // Pathdata
+ SdXMLImExPointsElement aPoints( &aPointSequence, aViewBox, awt::Point( 0, 0 ),
+ awt::Size( aViewBox.GetWidth(), aViewBox.GetHeight() ),
+ rUnitConverter );
+
+ AddAttribute( XML_NAMESPACE_SVG, sXML_d, aPoints.GetExportString() );
+
+ /////////////////
+ // Do Write
+ OUString aStrTmp( RTL_CONSTASCII_USTRINGPARAM( sXML_marker ) );
+ rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, aStrTmp ),
+ xAttrList );
+ rHandler->endElement( OUString::createFromAscii( sXML_marker ) );
+ }
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLMarkerStyle::ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ uno::Any& rValue, OUString& rStrName )
+{
+ sal_Bool bRet = sal_False;
+ sal_Bool bHasViewBox = sal_False;
+ sal_Bool bHasPathData = sal_False;
+
+ SdXMLImExViewBox* pViewBox = NULL;
+
+ drawing::PointSequence aPointSequence;
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ {
+ OUString aStrFullAttrName = xAttrList->getNameByIndex( i );
+ OUString aStrAttrName;
+ mrNamespaceMap.GetKeyByAttrName( aStrFullAttrName, &aStrAttrName );
+ OUString aStrValue = xAttrList->getValueByIndex( i );
+
+ if( aStrAttrName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( sXML_name ) ) == 0 )
+ {
+ rStrName = aStrValue;
+
+ } else if( aStrAttrName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( sXML_viewBox ) ) == 0 )
+ {
+ pViewBox = new SdXMLImExViewBox( aStrValue, rUnitConverter );
+ bHasViewBox = sal_True;
+
+ } else if( bHasViewBox && aStrAttrName.compareToAscii( RTL_CONSTASCII_STRINGPARAM( sXML_d ) ) == 0 )
+ {
+ SdXMLImExPointsElement aPoints( aStrValue, *pViewBox, awt::Point( 0, 0 ),
+ awt::Size( pViewBox->GetWidth(), pViewBox->GetHeight() ),
+ rUnitConverter );
+ const drawing::PointSequenceSequence& rSequence = aPoints.GetPointSequenceSequence();
+ const drawing::PointSequence *pSequences = rSequence.getConstArray();
+
+ aPointSequence = drawing::PointSequence( pSequences[0] );
+ }
+ }
+
+ if( pViewBox )
+ delete pViewBox;
+
+ rValue <<= aPointSequence;
+
+ bRet = bHasViewBox && bHasPathData;
+
+ return bRet;
+}
diff --git a/xmloff/source/style/NamedBoolPropertyHdl.cxx b/xmloff/source/style/NamedBoolPropertyHdl.cxx
new file mode 100644
index 0000000000..987f04d048
--- /dev/null
+++ b/xmloff/source/style/NamedBoolPropertyHdl.cxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * $RCSfile: NamedBoolPropertyHdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_NAMEDBOOLPROPERTYHANDLER_HXX
+#include <NamedBoolPropertyHdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _CPPUHELPER_EXTRACT_HXX_
+#include <cppuhelper/extract.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include <rtl/ustring>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLNamedBoolPropertyHdl
+//
+
+XMLNamedBoolPropertyHdl::~XMLNamedBoolPropertyHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLNamedBoolPropertyHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ if( rStrImpValue == maTrueStr )
+ {
+ rValue = ::cppu::bool2any( sal_True );
+ return sal_True;
+ }
+
+ if( rStrImpValue == maFalseStr )
+ {
+ rValue = ::cppu::bool2any( sal_False );
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+sal_Bool XMLNamedBoolPropertyHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ if( ::cppu::any2bool( rValue ) )
+ {
+ rStrExpValue = maTrueStr;
+ }
+ else
+ {
+ rStrExpValue = maFalseStr;
+ }
+
+ return sal_True;
+}
+
diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx
new file mode 100644
index 0000000000..9a2e4850c5
--- /dev/null
+++ b/xmloff/source/style/TransGradientStyle.cxx
@@ -0,0 +1,355 @@
+/*************************************************************************
+ *
+ * $RCSfile: TransGradientStyle.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_TRANSGRADIENTSTYLE_HXX
+#include "TransGradientStyle.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_GRADIENT_HPP_
+#include<com/sun/star/awt/Gradient.hpp>
+#endif
+
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include"attrlist.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include"xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include"xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include<rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include<rtl/ustring>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+
+enum SvXMLTokenMapAttrs
+{
+ XML_TOK_GRADIENT_NAME,
+ XML_TOK_GRADIENT_STYLE,
+ XML_TOK_GRADIENT_CX,
+ XML_TOK_GRADIENT_CY,
+ XML_TOK_GRADIENT_START,
+ XML_TOK_GRADIENT_END,
+ XML_TOK_GRADIENT_ANGEL,
+ XML_TOK_GRADIENT_BORDER,
+ XML_TOK_TABSTOP_END=XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aTrGradientAttrTokenMap[] =
+{
+ { XML_NAMESPACE_DRAW, sXML_name, XML_TOK_GRADIENT_NAME },
+ { XML_NAMESPACE_DRAW, sXML_style, XML_TOK_GRADIENT_STYLE },
+ { XML_NAMESPACE_DRAW, sXML_cx, XML_TOK_GRADIENT_CX },
+ { XML_NAMESPACE_DRAW, sXML_cy, XML_TOK_GRADIENT_CY },
+ { XML_NAMESPACE_DRAW, sXML_start_transparency, XML_TOK_GRADIENT_START },
+ { XML_NAMESPACE_DRAW, sXML_end_transparency, XML_TOK_GRADIENT_END },
+ { XML_NAMESPACE_DRAW, sXML_gradient_angel, XML_TOK_GRADIENT_ANGEL },
+ { XML_NAMESPACE_DRAW, sXML_gradient_border, XML_TOK_GRADIENT_BORDER },
+ XML_TOKEN_MAP_END
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_GradientStyle_Enum[] =
+{
+ { sXML_gradientstyle_linear, awt::GradientStyle_LINEAR },
+ { sXML_gradientstyle_axial, awt::GradientStyle_AXIAL },
+ { sXML_gradientstyle_radial, awt::GradientStyle_RADIAL },
+ { sXML_gradientstyle_ellipsoid, awt::GradientStyle_ELLIPTICAL },
+ { sXML_gradientstyle_square, awt::GradientStyle_SQUARE },
+ { sXML_gradientstyle_rectangular, awt::GradientStyle_RECT },
+ { 0, 0 }
+};
+
+XMLTransGradientStyle::XMLTransGradientStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & _rHandler,
+ const SvXMLNamespaceMap& _rNamespaceMap, const SvXMLUnitConverter& _rUnitConverter )
+: rHandler ( _rHandler ),
+ mrNamespaceMap ( _rNamespaceMap ),
+ rUnitConverter( _rUnitConverter ),
+ pAttrList ( NULL )
+{
+}
+
+XMLTransGradientStyle::~XMLTransGradientStyle()
+{
+}
+
+void XMLTransGradientStyle::AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName, const OUString& rStrValue )
+{
+ const OUString aStrName( OUString::createFromAscii( pName ) );
+ const OUString aStrCDATA( OUString::createFromAscii( sXML_CDATA ) );
+
+ pAttrList->AddAttribute( mrNamespaceMap.GetQNameByKey( nPrefix, aStrName ), aStrCDATA, rStrValue );
+}
+
+sal_Bool XMLTransGradientStyle::exportXML( const OUString& rStrName, const ::com::sun::star::uno::Any& rValue )
+{
+ return ImpExportXML( rHandler, mrNamespaceMap, rUnitConverter, rStrName, rValue );
+}
+
+sal_Bool XMLTransGradientStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName )
+{
+ return ImpImportXML( rUnitConverter, xAttrList, rValue, rStrName );
+}
+
+sal_Bool XMLTransGradientStyle::ImpExportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLNamespaceMap& rNamespaceMap, const SvXMLUnitConverter& rUnitConverter,
+ const OUString& rStrName, const uno::Any& rValue )
+{
+ sal_Bool bRet = sal_False;
+ awt::Gradient aGradient;
+
+ if( rStrName.getLength() )
+ {
+ if( rValue >>= aGradient )
+ {
+ pAttrList = new SvXMLAttributeList();
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > xAttrList( pAttrList );
+
+ OUString aStrValue;
+ OUStringBuffer aOut;
+
+ // Name
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_name, rStrName );
+
+ // Style
+ if( !rUnitConverter.convertEnum( aOut, aGradient.Style, pXML_GradientStyle_Enum ) )
+ return sal_False;
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_style, aStrValue );
+
+ // Center x/y
+ if( aGradient.Style != awt::GradientStyle_LINEAR &&
+ aGradient.Style != awt::GradientStyle_AXIAL )
+ {
+ rUnitConverter.convertPercent( aOut, aGradient.XOffset );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_cx, aStrValue );
+
+ rUnitConverter.convertPercent( aOut, aGradient.YOffset );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_cy, aStrValue );
+ }
+
+
+ Color aColor;
+
+ // Transparency start
+ aColor.SetColor( aGradient.StartColor );
+ sal_Int32 aStartValue = (sal_Int32)(((aColor.GetRed() + 1) * 100) / 255);
+ rUnitConverter.convertPercent( aOut, aStartValue );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_start_transparency, aStrValue );
+
+ // Transparency end
+ aColor.SetColor( aGradient.EndColor );
+ sal_Int32 aEndValue = (sal_Int32)(((aColor.GetRed() + 1) * 100) / 255);
+ rUnitConverter.convertPercent( aOut, aEndValue );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_end_transparency, aStrValue );
+
+ // Angle
+ if( aGradient.Style != awt::GradientStyle_RADIAL )
+ {
+ rUnitConverter.convertNumber( aOut, sal_Int32( aGradient.Angle ) );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_gradient_angel, aStrValue );
+ }
+
+ // Border
+ rUnitConverter.convertPercent( aOut, aGradient.Border );
+ aStrValue = aOut.makeStringAndClear();
+ AddAttribute( XML_NAMESPACE_DRAW, sXML_gradient_border, aStrValue );
+
+ // Do Write
+ rHandler->startElement( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_DRAW, OUString::createFromAscii(sXML_transparency) ),
+ xAttrList );
+ rHandler->endElement( OUString::createFromAscii( sXML_gradient ) );
+ }
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLTransGradientStyle::ImpImportXML( const SvXMLUnitConverter& rUnitConverter,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ uno::Any& rValue, OUString& rStrName )
+{
+ sal_Bool bRet = sal_False;
+ sal_Bool bHasName = sal_False;
+ sal_Bool bHasStyle = sal_False;
+
+ awt::Gradient aGradient;
+ aGradient.XOffset = 0;
+ aGradient.YOffset = 0;
+ aGradient.StartIntensity = 100;
+ aGradient.EndIntensity = 100;
+ aGradient.Angle = 0;
+ aGradient.Border = 0;
+
+ SvXMLTokenMap aTokenMap( aTrGradientAttrTokenMap );
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rFullAttrName = xAttrList->getNameByIndex( i );
+ OUString aStrAttrName;
+ sal_uInt16 nPrefix = mrNamespaceMap.GetKeyByAttrName( rFullAttrName, &aStrAttrName );
+ const OUString& rStrValue = xAttrList->getValueByIndex( i );
+
+ sal_Int32 nTmpValue;
+
+ switch( aTokenMap.Get( nPrefix, aStrAttrName ) )
+ {
+ case XML_TOK_GRADIENT_NAME:
+ {
+ rStrName = rStrValue;
+ bHasName = sal_True;
+ }
+ break;
+ case XML_TOK_GRADIENT_STYLE:
+ {
+ sal_uInt16 eValue;
+ if( rUnitConverter.convertEnum( eValue, rStrValue, pXML_GradientStyle_Enum ) )
+ {
+ aGradient.Style = (awt::GradientStyle) eValue;
+ bHasStyle = sal_True;
+ }
+ }
+ break;
+ case XML_TOK_GRADIENT_CX:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.XOffset = nTmpValue;
+ break;
+ case XML_TOK_GRADIENT_CY:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.YOffset = nTmpValue;
+ break;
+ case XML_TOK_GRADIENT_START:
+ {
+ sal_Int32 aStartTransparency;
+ rUnitConverter.convertPercent( aStartTransparency, rStrValue );
+
+ aStartTransparency = ( aStartTransparency * 255 ) / 100;
+
+ Color aColor(aStartTransparency, aStartTransparency, aStartTransparency );
+ aGradient.StartColor = (sal_Int32)( aColor.GetColor() );
+ }
+ break;
+ case XML_TOK_GRADIENT_END:
+ {
+ sal_Int32 aEndTransparency;
+ rUnitConverter.convertPercent( aEndTransparency, rStrValue );
+
+ aEndTransparency = ( aEndTransparency * 255 ) / 100;
+
+ Color aColor( aEndTransparency, aEndTransparency, aEndTransparency );
+ aGradient.EndColor = (sal_Int32)( aColor.GetColor() );
+ }
+ break;
+ case XML_TOK_GRADIENT_ANGEL:
+ {
+ sal_Int32 nValue;
+ rUnitConverter.convertNumber( nValue, rStrValue, 0, 360 );
+ aGradient.Angle = sal_Int16( nValue );
+ }
+ break;
+ case XML_TOK_GRADIENT_BORDER:
+ rUnitConverter.convertPercent( nTmpValue, rStrValue );
+ aGradient.Border = nTmpValue;
+ break;
+
+ default:
+ DBG_WARNING( "Unknown token at import transparency gradient style" )
+ ;
+ }
+ }
+
+ rValue <<= aGradient;
+
+ bRet = bHasName && bHasStyle;
+
+ return bRet;
+}
diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx
new file mode 100644
index 0000000000..c8b3203d47
--- /dev/null
+++ b/xmloff/source/style/XMLClipPropertyHandler.cxx
@@ -0,0 +1,179 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLClipPropertyHandler.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLCLIPPROPERTYHANDLER_HXX
+#include "XMLClipPropertyHandler.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_GRAPHICCROP_HPP_
+#include <com/sun/star/text/GraphicCrop.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include <xmlkywd.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLMeasurePropHdl
+//
+
+XMLClipPropertyHandler::~XMLClipPropertyHandler()
+{
+ // nothing to do
+}
+
+sal_Bool XMLClipPropertyHandler::equals(
+ const Any& r1,
+ const Any& r2 ) const
+{
+ GraphicCrop aCrop1, aCrop2;
+ r1 >>= aCrop1;
+ r2 >>= aCrop2;
+
+ return aCrop1.Top == aCrop2.Top &&
+ aCrop1.Bottom == aCrop2.Bottom &&
+ aCrop1.Left == aCrop2.Left &&
+ aCrop1.Right == aCrop2.Right;
+}
+
+sal_Bool XMLClipPropertyHandler::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int32 nLen = rStrImpValue.getLength();
+ if( nLen > 6 &&
+ 0 == rStrImpValue.compareToAscii( sXML_rect, 4 ) &&
+ rStrImpValue[4] == '(' &&
+ rStrImpValue[nLen-1] == ')' )
+ {
+ GraphicCrop aCrop;
+ OUString sTmp( rStrImpValue.copy( 5, nLen-6 ) );
+ SvXMLTokenEnumerator aTokenEnum( sTmp );
+
+ sal_uInt16 nPos = 0;
+ OUString aToken;
+ while( aTokenEnum.getNextToken( aToken ) )
+ {
+ sal_Int32 nVal = 0;
+ if( aToken.compareToAscii( sXML_auto ) != 0 &&
+ !rUnitConverter.convertMeasure( nVal, aToken ) )
+ break;
+
+ switch( nPos )
+ {
+ case 0: aCrop.Top = nVal; break;
+ case 1: aCrop.Right = nVal; break;
+ case 2: aCrop.Bottom = nVal; break;
+ case 3: aCrop.Left = nVal; break;
+ }
+ nPos++;
+ }
+
+ bRet = (4 == nPos );
+ if( bRet )
+ rValue <<= aCrop;
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLClipPropertyHandler::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ OUStringBuffer aOut(30);
+ GraphicCrop aCrop;
+
+ if( rValue >>= aCrop )
+ {
+ aOut.appendAscii( sXML_rect );
+ aOut.append( (sal_Unicode)'(' );
+ rUnitConverter.convertMeasure( aOut, aCrop.Top );
+ aOut.append( (sal_Unicode)' ' );
+ rUnitConverter.convertMeasure( aOut, aCrop.Right );
+ aOut.append( (sal_Unicode)' ' );
+ rUnitConverter.convertMeasure( aOut, aCrop.Bottom );
+ aOut.append( (sal_Unicode)' ' );
+ rUnitConverter.convertMeasure( aOut, aCrop.Left );
+ aOut.append( (sal_Unicode)')' );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
diff --git a/xmloff/source/style/XMLElementPropertyContext.cxx b/xmloff/source/style/XMLElementPropertyContext.cxx
new file mode 100644
index 0000000000..5ec0060b32
--- /dev/null
+++ b/xmloff/source/style/XMLElementPropertyContext.cxx
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLElementPropertyContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLELEMENTPROPERTYCONTEXT_HXX
+#include "XMLElementPropertyContext.hxx"
+#endif
+
+using namespace ::rtl;
+
+
+TYPEINIT1( XMLElementPropertyContext , SvXMLImportContext );
+
+XMLElementPropertyContext::XMLElementPropertyContext (
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const XMLPropertyState& rProp,
+ ::std::vector< XMLPropertyState > &rProps ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ aProp( rProp ),
+ rProperties( rProps ),
+ bInsert( sal_False )
+{
+}
+
+XMLElementPropertyContext::~XMLElementPropertyContext()
+{
+}
+
+void XMLElementPropertyContext::EndElement( )
+{
+ if( bInsert )
+ rProperties.push_back( aProp );
+}
+
+
diff --git a/xmloff/source/style/adjushdl.cxx b/xmloff/source/style/adjushdl.cxx
new file mode 100644
index 0000000000..e82eca367f
--- /dev/null
+++ b/xmloff/source/style/adjushdl.cxx
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * $RCSfile: adjushdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_ADJUSTTYPES_HXX
+#include <adjushdl.hxx>
+#endif
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_TEXTADJUST_HPP_
+#include <com/sun/star/drawing/TextAdjust.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_Para_Adjust_Enum[] =
+{
+ { sXML_start, drawing::TextAdjust_LEFT },
+ { sXML_end, drawing::TextAdjust_RIGHT },
+ { sXML_center, drawing::TextAdjust_CENTER },
+ { sXML_justify, drawing::TextAdjust_BLOCK },
+ { sXML_justified, drawing::TextAdjust_BLOCK }, // obsolete
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_Para_Align_Last_Enum[] =
+{
+ { sXML_start, drawing::TextAdjust_LEFT },
+ { sXML_center, drawing::TextAdjust_CENTER },
+ { sXML_justify, drawing::TextAdjust_BLOCK },
+ { sXML_justified, drawing::TextAdjust_BLOCK }, // obsolete
+ { 0, 0 }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLParaAdjustPropHdl
+//
+
+XMLParaAdjustPropHdl::~XMLParaAdjustPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLParaAdjustPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt16 eAdjust;
+
+ if( ( bRet = rUnitConverter.convertEnum( eAdjust, rStrImpValue, pXML_Para_Adjust_Enum ) ) )
+ rValue <<= (sal_Int16)eAdjust;
+
+ return bRet;
+}
+
+sal_Bool XMLParaAdjustPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut;
+ sal_Int16 nVal;
+
+ rValue >>= nVal;
+
+ sal_Bool bRet = rUnitConverter.convertEnum( aOut, nVal, pXML_Para_Adjust_Enum, sXML_start );
+
+ rStrExpValue = aOut.makeStringAndClear();
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLLastLineAdjustPropHdl
+//
+
+XMLLastLineAdjustPropHdl::~XMLLastLineAdjustPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLLastLineAdjustPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt16 eAdjust;
+
+ if( ( bRet = rUnitConverter.convertEnum( eAdjust, rStrImpValue, pXML_Para_Align_Last_Enum ) ) )
+ rValue <<= (sal_Int16)eAdjust;
+
+ return bRet;
+}
+
+sal_Bool XMLLastLineAdjustPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut;
+ sal_Int16 nVal;
+ sal_Bool bRet = sal_False;
+
+ rValue >>= nVal;
+
+ if( nVal != drawing::TextAdjust_LEFT )
+ bRet = rUnitConverter.convertEnum( aOut, nVal, pXML_Para_Align_Last_Enum, sXML_start );
+
+ rStrExpValue = aOut.makeStringAndClear();
+
+ return bRet;
+}
+
diff --git a/xmloff/source/style/adjushdl.hxx b/xmloff/source/style/adjushdl.hxx
new file mode 100644
index 0000000000..47cad5735d
--- /dev/null
+++ b/xmloff/source/style/adjushdl.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * $RCSfile: adjushdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_ADJUSTTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_ADJUSTTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLParaAdjustPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLParaAdjustPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLLastLineAdjustPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLLastLineAdjustPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_ADJUSTTYPES_HXX
diff --git a/xmloff/source/style/backhdl.cxx b/xmloff/source/style/backhdl.cxx
new file mode 100644
index 0000000000..00872f16f4
--- /dev/null
+++ b/xmloff/source/style/backhdl.cxx
@@ -0,0 +1,340 @@
+/*************************************************************************
+ *
+ * $RCSfile: backhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_PROPERTYHANDLER_BRUSHTYPES_HXX
+#include <backhdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+SvXMLEnumMapEntry psXML_BrushHorizontalPos[] =
+{
+ { sXML_left, style::GraphicLocation_LEFT_MIDDLE },
+ { sXML_right, style::GraphicLocation_RIGHT_MIDDLE },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry psXML_BrushVerticalPos[] =
+{
+ { sXML_top, style::GraphicLocation_MIDDLE_TOP },
+ { sXML_bottom, style::GraphicLocation_MIDDLE_BOTTOM },
+ { 0, 0 }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLBackGraphicPositionPropHdl
+//
+
+XMLBackGraphicPositionPropHdl::~XMLBackGraphicPositionPropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLBackGraphicPositionPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter )
+{
+ sal_Bool bRet = sal_True;
+ style::GraphicLocation ePos = style::GraphicLocation_NONE, eTmp;
+ sal_uInt16 nTmp;
+ SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
+ OUString aToken;
+ sal_Bool bHori = sal_False, bVert = sal_False;
+
+ while( bRet && aTokenEnum.getNextToken( aToken ) )
+ {
+ if( bHori && bVert )
+ {
+ bRet = sal_False;
+ }
+ else if( -1 != aToken.indexOf( sal_Unicode('%') ) )
+ {
+ long nPrc = 50;
+ if( rUnitConverter.convertPercent( nPrc, aToken ) )
+ {
+ if( !bHori )
+ {
+ ePos = nPrc < 25 ? style::GraphicLocation_LEFT_TOP :
+ (nPrc < 75 ? style::GraphicLocation_MIDDLE_MIDDLE :
+ style::GraphicLocation_RIGHT_BOTTOM);
+ bHori = sal_True;
+ }
+ else
+ {
+ eTmp = nPrc < 25 ? style::GraphicLocation_LEFT_TOP:
+ (nPrc < 75 ? style::GraphicLocation_LEFT_MIDDLE :
+ style::GraphicLocation_LEFT_BOTTOM);
+ MergeXMLVertPos( ePos, eTmp );
+ bVert = sal_True;
+ }
+ }
+ else
+ {
+ // wrong percentage
+ bRet = sal_False;
+ }
+ }
+ else if( aToken.compareToAscii( sXML_center ) )
+ {
+ if( bHori )
+ MergeXMLVertPos( ePos, style::GraphicLocation_MIDDLE_MIDDLE );
+ else if ( bVert )
+ MergeXMLHoriPos( ePos, style::GraphicLocation_MIDDLE_MIDDLE );
+ else
+ ePos = style::GraphicLocation_MIDDLE_MIDDLE;
+ }
+ else if( rUnitConverter.convertEnum( nTmp, aToken, psXML_BrushHorizontalPos ) )
+ {
+ if( bVert )
+ MergeXMLHoriPos( ePos, (style::GraphicLocation)nTmp );
+ else if( !bHori )
+ ePos = (style::GraphicLocation)nTmp;
+ else
+ bRet = sal_False;
+
+ bHori = sal_True;
+ }
+ else if( rUnitConverter.convertEnum( nTmp, aToken, psXML_BrushVerticalPos ) )
+ {
+ if( bHori )
+ MergeXMLVertPos( ePos, (style::GraphicLocation)nTmp );
+ else if( !bVert )
+ ePos = (style::GraphicLocation)nTmp;
+ else
+ bRet = sal_False;
+ bVert = sal_True;
+ }
+ else
+ {
+ bRet = sal_False;
+ }
+ }
+
+ bRet &= style::GraphicLocation_NONE != ePos;
+ if( bRet )
+ rValue <<= (style::GraphicLocation)(sal_uInt16)ePos;
+
+ return bRet;
+}
+
+sal_Bool XMLBackGraphicPositionPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_True;
+ OUStringBuffer aOut;
+
+ style::GraphicLocation eLocation;
+ if( !( rValue >>= eLocation ) )
+ {
+ sal_Int32 nValue;
+ if( rValue >>= nValue )
+ eLocation = (style::GraphicLocation)nValue;
+ else
+ bRet = sal_False;
+ }
+
+ if( bRet )
+ {
+ bRet = sal_False;
+
+ switch( eLocation )
+ {
+ case style::GraphicLocation_LEFT_TOP:
+ case style::GraphicLocation_MIDDLE_TOP:
+ case style::GraphicLocation_RIGHT_TOP:
+ aOut.appendAscii( sXML_top );
+ bRet = sal_True;
+ break;
+ case style::GraphicLocation_LEFT_MIDDLE:
+ case style::GraphicLocation_MIDDLE_MIDDLE:
+ case style::GraphicLocation_RIGHT_MIDDLE:
+ aOut.appendAscii( sXML_center );
+ bRet = sal_True;
+ break;
+ case style::GraphicLocation_LEFT_BOTTOM:
+ case style::GraphicLocation_MIDDLE_BOTTOM:
+ case style::GraphicLocation_RIGHT_BOTTOM:
+ aOut.appendAscii( sXML_bottom );
+ bRet = sal_True;
+ break;
+ }
+
+ if( bRet )
+ {
+ aOut.append( sal_Unicode( ' ' ) );
+
+ switch( eLocation )
+ {
+ case style::GraphicLocation_LEFT_TOP:
+ case style::GraphicLocation_LEFT_BOTTOM:
+ case style::GraphicLocation_LEFT_MIDDLE:
+ aOut.appendAscii( sXML_left );
+ break;
+ case style::GraphicLocation_MIDDLE_TOP:
+ case style::GraphicLocation_MIDDLE_MIDDLE:
+ case style::GraphicLocation_MIDDLE_BOTTOM:
+ aOut.appendAscii( sXML_center );
+ break;
+ case style::GraphicLocation_RIGHT_MIDDLE:
+ case style::GraphicLocation_RIGHT_TOP:
+ case style::GraphicLocation_RIGHT_BOTTOM:
+ aOut.appendAscii( sXML_right );
+ break;
+ }
+ }
+ }
+
+ rStrExpValue = aOut.makeStringAndClear();
+
+ return bRet;
+}
+
+void XMLBackGraphicPositionPropHdl::MergeXMLVertPos( style::GraphicLocation& ePos, style::GraphicLocation eVert )
+{
+ switch( ePos )
+ {
+ case style::GraphicLocation_LEFT_TOP:
+ case style::GraphicLocation_LEFT_MIDDLE:
+ case style::GraphicLocation_LEFT_BOTTOM:
+ ePos = style::GraphicLocation_MIDDLE_TOP==eVert ?
+ style::GraphicLocation_LEFT_TOP :
+ (style::GraphicLocation_MIDDLE_MIDDLE==eVert ?
+ style::GraphicLocation_LEFT_MIDDLE :
+ style::GraphicLocation_LEFT_BOTTOM);
+ ePos = eVert;
+ break;
+
+ case style::GraphicLocation_MIDDLE_TOP:
+ case style::GraphicLocation_MIDDLE_MIDDLE:
+ case style::GraphicLocation_MIDDLE_BOTTOM:
+ ePos = eVert;
+ break;
+
+ case style::GraphicLocation_RIGHT_TOP:
+ case style::GraphicLocation_RIGHT_MIDDLE:
+ case style::GraphicLocation_RIGHT_BOTTOM:
+ ePos = style::GraphicLocation_MIDDLE_TOP==eVert ?
+ style::GraphicLocation_RIGHT_TOP :
+ (style::GraphicLocation_MIDDLE_MIDDLE==eVert ?
+ style::GraphicLocation_RIGHT_MIDDLE :
+ style::GraphicLocation_RIGHT_BOTTOM);
+ break;
+ }
+}
+
+void XMLBackGraphicPositionPropHdl::MergeXMLHoriPos( style::GraphicLocation& ePos, style::GraphicLocation eHori )
+{
+ DBG_ASSERT( style::GraphicLocation_LEFT_MIDDLE==eHori || style::GraphicLocation_MIDDLE_MIDDLE==eHori || style::GraphicLocation_RIGHT_MIDDLE==eHori,
+ "lcl_frmitems_MergeXMLHoriPos: vertical pos must be middle" );
+
+ switch( ePos )
+ {
+ case style::GraphicLocation_LEFT_TOP:
+ case style::GraphicLocation_MIDDLE_TOP:
+ case style::GraphicLocation_RIGHT_TOP:
+ ePos = style::GraphicLocation_LEFT_MIDDLE==eHori ?
+ style::GraphicLocation_LEFT_TOP :
+ (style::GraphicLocation_MIDDLE_MIDDLE==eHori ?
+ style::GraphicLocation_MIDDLE_TOP :
+ style::GraphicLocation_RIGHT_TOP);
+ break;
+
+ case style::GraphicLocation_LEFT_MIDDLE:
+ case style::GraphicLocation_MIDDLE_MIDDLE:
+ case style::GraphicLocation_RIGHT_MIDDLE:
+ ePos = eHori;
+ break;
+
+ case style::GraphicLocation_LEFT_BOTTOM:
+ case style::GraphicLocation_MIDDLE_BOTTOM:
+ case style::GraphicLocation_RIGHT_BOTTOM:
+ ePos = style::GraphicLocation_LEFT_MIDDLE==eHori ?
+ style::GraphicLocation_LEFT_BOTTOM :
+ (style::GraphicLocation_MIDDLE_MIDDLE==eHori ?
+ style::GraphicLocation_MIDDLE_BOTTOM :
+ style::GraphicLocation_RIGHT_BOTTOM);
+ break;
+ }
+}
+
diff --git a/xmloff/source/style/backhdl.hxx b/xmloff/source/style/backhdl.hxx
new file mode 100644
index 0000000000..8496b6e0f5
--- /dev/null
+++ b/xmloff/source/style/backhdl.hxx
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * $RCSfile: backhdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_BRUSHTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_BRUSHTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_GRAPHICLOCATION_HPP_
+#include <com/sun/star/style/GraphicLocation.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_GRAPHICLOCATION_HPP_
+#include <com/sun/star/style/GraphicLocation.hpp>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLBackGraphicPositionPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLBackGraphicPositionPropHdl();
+
+ /// TabStops will be imported/exported as XML-Elements. So the Import/Export-work must be done at another place.
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter );
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+
+private:
+ void MergeXMLHoriPos( ::com::sun::star::style::GraphicLocation& ePos, ::com::sun::star::style::GraphicLocation eHori );
+ void MergeXMLVertPos( ::com::sun::star::style::GraphicLocation& ePos, ::com::sun::star::style::GraphicLocation eVert );
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_BRUSHTYPES_HXX
diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx
new file mode 100644
index 0000000000..07b054de73
--- /dev/null
+++ b/xmloff/source/style/bordrhdl.cxx
@@ -0,0 +1,499 @@
+/*************************************************************************
+ *
+ * $RCSfile: bordrhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_BORDERTYPES_HXX
+#include <bordrhdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
+#include <com/sun/star/table/BorderLine.hpp>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// copied from svx/boxitem.hxx
+#define DEF_LINE_WIDTH_0 1
+#define DEF_LINE_WIDTH_1 35
+#define DEF_LINE_WIDTH_2 88
+#define DEF_LINE_WIDTH_3 141
+#define DEF_LINE_WIDTH_4 176
+
+#define DEF_MAX_LINE_WIDHT DEF_LINE_WIDTH_4
+#define DEF_MAX_LINE_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE0_OUT DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE0_IN DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE0_DIST DEF_LINE_WIDTH_1
+
+#define DEF_DOUBLE_LINE1_OUT DEF_LINE_WIDTH_1
+#define DEF_DOUBLE_LINE1_IN DEF_LINE_WIDTH_1
+#define DEF_DOUBLE_LINE1_DIST DEF_LINE_WIDTH_1
+
+#define DEF_DOUBLE_LINE2_OUT DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE2_IN DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE2_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE3_OUT DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE3_IN DEF_LINE_WIDTH_1
+#define DEF_DOUBLE_LINE3_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE4_OUT DEF_LINE_WIDTH_1
+#define DEF_DOUBLE_LINE4_IN DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE4_DIST DEF_LINE_WIDTH_1
+
+#define DEF_DOUBLE_LINE5_OUT DEF_LINE_WIDTH_3
+#define DEF_DOUBLE_LINE5_IN DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE5_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE6_OUT DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE6_IN DEF_LINE_WIDTH_3
+#define DEF_DOUBLE_LINE6_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE7_OUT DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE7_IN DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE7_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE8_OUT DEF_LINE_WIDTH_1
+#define DEF_DOUBLE_LINE8_IN DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE8_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE9_OUT DEF_LINE_WIDTH_2
+#define DEF_DOUBLE_LINE9_IN DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE9_DIST DEF_LINE_WIDTH_2
+
+#define DEF_DOUBLE_LINE10_OUT DEF_LINE_WIDTH_3
+#define DEF_DOUBLE_LINE10_IN DEF_LINE_WIDTH_0
+#define DEF_DOUBLE_LINE10_DIST DEF_LINE_WIDTH_2
+
+// finished copy
+
+#define SVX_XML_BORDER_STYLE_NONE 0
+#define SVX_XML_BORDER_STYLE_SOLID 1
+#define SVX_XML_BORDER_STYLE_DOUBLE 2
+
+#define SVX_XML_BORDER_WIDTH_THIN 0
+#define SVX_XML_BORDER_WIDTH_MIDDLE 1
+#define SVX_XML_BORDER_WIDTH_THICK 2
+
+SvXMLEnumMapEntry psXML_BorderStyles[] =
+{
+ { sXML_none, SVX_XML_BORDER_STYLE_NONE },
+ { sXML_hidden, SVX_XML_BORDER_STYLE_NONE },
+ { sXML_solid, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_double, SVX_XML_BORDER_STYLE_DOUBLE },
+ { sXML_dotted, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_dashed, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_groove, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_ridge, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_inset, SVX_XML_BORDER_STYLE_SOLID },
+ { sXML_outset, SVX_XML_BORDER_STYLE_SOLID },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry psXML_NamedBorderWidths[] =
+{
+ { sXML_thin, SVX_XML_BORDER_WIDTH_THIN },
+ { sXML_middle, SVX_XML_BORDER_WIDTH_MIDDLE },
+ { sXML_thick, SVX_XML_BORDER_WIDTH_THICK },
+ { 0, 0 }
+};
+// mapping tables to map external xml input to intarnal box line widths
+
+// Ein Eintrag besteht aus vier USHORTs. Der erste ist die Gesamtbreite,
+// die anderen sind die 3 Einzelbreiten
+
+#define SBORDER_ENTRY( n ) \
+ DEF_LINE_WIDTH_##n, DEF_LINE_WIDTH_##n, 0, 0
+
+#define DBORDER_ENTRY( n ) \
+ DEF_DOUBLE_LINE##n##_OUT + DEF_DOUBLE_LINE##n##_IN + \
+ DEF_DOUBLE_LINE##n##_DIST, \
+ DEF_DOUBLE_LINE##n##_OUT, \
+ DEF_DOUBLE_LINE##n##_IN, \
+ DEF_DOUBLE_LINE##n##_DIST
+
+#define TDBORDER_ENTRY( n ) \
+ DEF_DOUBLE_LINE##n##_OUT, \
+ DEF_DOUBLE_LINE##n##_OUT, \
+ DEF_DOUBLE_LINE##n##_IN, \
+ DEF_DOUBLE_LINE##n##_DIST
+
+
+static sal_uInt16 __READONLY_DATA aSBorderWidths[] =
+{
+ SBORDER_ENTRY( 0 ), SBORDER_ENTRY( 1 ), SBORDER_ENTRY( 2 ),
+ SBORDER_ENTRY( 3 ), SBORDER_ENTRY( 4 )
+};
+
+static sal_uInt16 __READONLY_DATA aDBorderWidths[] =
+{
+ DBORDER_ENTRY( 0 ),
+ DBORDER_ENTRY( 7 ),
+ DBORDER_ENTRY( 1 ),
+ DBORDER_ENTRY( 8 ),
+ DBORDER_ENTRY( 4 ),
+ DBORDER_ENTRY( 9 ),
+ DBORDER_ENTRY( 3 ),
+ DBORDER_ENTRY( 10 ),
+ DBORDER_ENTRY( 2 ),
+ DBORDER_ENTRY( 6 ),
+ DBORDER_ENTRY( 5 )
+};
+
+void lcl_frmitems_setXMLBorderWidth( table::BorderLine &rBorderLine,
+ sal_uInt16 nWidth, sal_Bool bDouble )
+{
+#ifdef XML_CHECK_UI_CONTSTRAINS
+ const sal_uInt16 *aWidths;
+ sal_uInt16 nSize;
+ if( !bDouble )
+ {
+ aWidths = aSBorderWidths;
+ nSize = sizeof( aSBorderWidths );
+ }
+ else
+ {
+ aWidths = aDBorderWidths;
+ nSize = sizeof( aDBorderWidths );
+ }
+
+ sal_uInt16 i = (nSize / sizeof(sal_uInt16)) - 4;
+ while( i>0 &&
+ nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) )
+ {
+ i -= 4;
+ }
+
+ rBorderLine.OuterLineWidth = aWidths[i+1];
+ rBorderLine.InnerLineWidth = aWidths[i+2];
+ rBorderLine.LineDistance = aWidths[i+3];
+#else
+ if( bDouble )
+ {
+ const sal_uInt16 *aWidths = aDBorderWidths;
+ sal_uInt16 nSize = sizeof( aDBorderWidths );
+ sal_uInt16 i = (nSize / sizeof(sal_uInt16)) - 4;
+ while( i>0 &&
+ nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) )
+ {
+ i -= 4;
+ }
+
+ rBorderLine.OuterLineWidth = aWidths[i+1];
+ rBorderLine.InnerLineWidth = aWidths[i+2];
+ rBorderLine.LineDistance = aWidths[i+3];
+ }
+ else
+ {
+ rBorderLine.OuterLineWidth = 0 == nWidth ? DEF_LINE_WIDTH_0 : nWidth;
+ rBorderLine.InnerLineWidth = 0;
+ rBorderLine.LineDistance = 0;
+
+ }
+#endif
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLEscapementPropHdl
+//
+
+XMLBorderWidthHdl::~XMLBorderWidthHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLBorderWidthHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
+
+ sal_Int32 nInWidth, nDistance, nOutWidth;
+
+ OUString aToken;
+ if( !aTokenEnum.getNextToken( aToken ) )
+ return sal_False;
+
+ if( !rUnitConverter.convertMeasure( nInWidth, aToken, 0, 500 ) )
+ return sal_False;
+
+ if( !aTokenEnum.getNextToken( aToken ) )
+ return sal_False;
+
+ if( !rUnitConverter.convertMeasure( nDistance, aToken, 0, 500 ) )
+ return sal_False;
+
+ if( !aTokenEnum.getNextToken( aToken ) )
+ return sal_False;
+
+ if( !rUnitConverter.convertMeasure( nOutWidth, aToken, 0, 500 ) )
+ return sal_False;
+
+#ifdef XML_CHECK_UI_CONSTRAINS
+ sal_uInt16 nSize = sizeof( aDBorderWidths );
+ for( sal_uInt16 i=0; i < nSize; i += 4 )
+ {
+ if( aDBorderWidths[i+1] == nOutWidth &&
+ aDBorderWidths[i+2] == nInWidth &&
+ aDBorderWidths[i+3] == nDistance )
+ break;
+ }
+
+ sal_uInt16 nWidth = i < nSize ? 0 : nOutWidth + nInWidth + nDistance;
+#endif
+
+ table::BorderLine aBorderLine;
+ if(!(rValue >>= aBorderLine))
+ aBorderLine.Color = 0;
+
+ aBorderLine.InnerLineWidth = nInWidth;
+ aBorderLine.OuterLineWidth = nOutWidth;
+ aBorderLine.LineDistance = nDistance;
+
+ rValue <<= aBorderLine;
+ return sal_True;
+}
+
+sal_Bool XMLBorderWidthHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut;
+
+ table::BorderLine aBorderLine;
+ if(!(rValue >>= aBorderLine))
+ return sal_False;
+
+ if( aBorderLine.LineDistance == 0 && aBorderLine.InnerLineWidth == 0)
+ return sal_False;
+
+ rUnitConverter.convertMeasure( aOut, aBorderLine.InnerLineWidth );
+ aOut.append( sal_Unicode( ' ' ) );
+ rUnitConverter.convertMeasure( aOut, aBorderLine.LineDistance );
+ aOut.append( sal_Unicode( ' ' ) );
+ rUnitConverter.convertMeasure( aOut, aBorderLine.OuterLineWidth );
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return sal_True;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLEscapementHeightPropHdl
+//
+
+XMLBorderHdl::~XMLBorderHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLBorderHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUString aToken;
+ SvXMLTokenEnumerator aTokens( rStrImpValue );
+
+ sal_Bool bHasStyle = sal_False;
+ sal_Bool bHasWidth = sal_False;
+ sal_Bool bHasColor = sal_False;
+
+ sal_uInt16 nStyle = USHRT_MAX;
+ sal_uInt16 nWidth = 0;
+ sal_uInt16 nNamedWidth = USHRT_MAX;
+ Color aColor;
+
+ long nTemp;
+ while( aTokens.getNextToken( aToken ) && aToken.getLength() != 0 )
+ {
+ if( !bHasWidth &&
+ rUnitConverter.convertEnum( nNamedWidth, aToken,
+ psXML_NamedBorderWidths ) )
+ {
+ bHasWidth = sal_True;
+ }
+ else if( !bHasStyle &&
+ rUnitConverter.convertEnum( nStyle, aToken,
+ psXML_BorderStyles ) )
+ {
+ bHasStyle = sal_True;
+ }
+ else if( !bHasColor && rUnitConverter.convertColor( aColor, aToken ) )
+ {
+ bHasColor = sal_True;
+ }
+ else if( !bHasWidth &&
+ rUnitConverter.convertMeasure( nTemp, aToken, 0,
+ USHRT_MAX ) )
+ {
+ nWidth = (sal_uInt16)nTemp;
+ bHasWidth = sal_True;
+ }
+ else
+ {
+ // missformed
+ return sal_False;
+ }
+ }
+
+ // if there is no line and no style and no with, there will never be a line
+ if( !(bHasStyle && bHasWidth) )
+ return sal_False;
+
+ table::BorderLine aBorderLine;
+ if(!(rValue >>= aBorderLine))
+ {
+ aBorderLine.Color = 0;
+ aBorderLine.InnerLineWidth = 0;
+ aBorderLine.OuterLineWidth = 0;
+ aBorderLine.LineDistance = 0;
+ }
+
+ // first of all, delete an empty line
+ sal_Bool bDouble = SVX_XML_BORDER_STYLE_DOUBLE == nStyle;
+ if( (bHasStyle && SVX_XML_BORDER_STYLE_NONE == nStyle) ||
+ (bHasWidth && USHRT_MAX == nNamedWidth && 0 == nWidth) )
+ {
+ aBorderLine.InnerLineWidth = 0;
+ aBorderLine.OuterLineWidth = 0;
+ aBorderLine.LineDistance = 0;
+ }
+ else if( bHasWidth )
+ {
+ if( USHRT_MAX != nNamedWidth )
+ {
+ const sal_uInt16 *aWidths = bDouble ? aDBorderWidths
+ : aSBorderWidths;
+ sal_uInt16 nNWidth = nNamedWidth * 4;
+ aBorderLine.OuterLineWidth = aWidths[nNWidth+1];
+ aBorderLine.InnerLineWidth = aWidths[nNWidth+2];
+ aBorderLine.LineDistance = aWidths[nNWidth+3];
+ }
+ else
+ {
+ lcl_frmitems_setXMLBorderWidth( aBorderLine, nWidth, bDouble );
+ }
+ }
+ else
+ {
+ lcl_frmitems_setXMLBorderWidth( aBorderLine, 0, bDouble );
+ }
+
+ // set color
+ if( bHasColor )
+ aBorderLine.Color = (sal_Int32)aColor.GetRGBColor();
+
+ rValue <<= aBorderLine;
+ return sal_True;
+}
+
+sal_Bool XMLBorderHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut;
+
+ table::BorderLine aBorderLine;
+ if(!(rValue >>= aBorderLine))
+ return sal_False;
+
+ sal_Int32 nWidth = aBorderLine.OuterLineWidth;
+ const sal_uInt16 nDistance = aBorderLine.LineDistance;
+ if( 0 != nDistance )
+ {
+ nWidth += nDistance;
+ nWidth += aBorderLine.InnerLineWidth;
+ }
+
+ if( nWidth == 0 )
+ return sal_False;
+
+ char *pStyle = (0 == nDistance) ? sXML_solid : sXML_double;
+
+ rUnitConverter.convertMeasure( aOut, nWidth );
+
+ aOut.append( sal_Unicode( ' ' ) );
+
+ aOut.appendAscii( pStyle );
+
+ aOut.append( sal_Unicode( ' ' ) );
+
+ rUnitConverter.convertColor( aOut, aBorderLine.Color );
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return sal_True;
+}
diff --git a/xmloff/source/style/bordrhdl.hxx b/xmloff/source/style/bordrhdl.hxx
new file mode 100644
index 0000000000..cf29245f5d
--- /dev/null
+++ b/xmloff/source/style/bordrhdl.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * $RCSfile: bordrhdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_BORDERTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_BORDERTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLBorderWidthHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLBorderWidthHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+class XMLBorderHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLBorderHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_CHARLOCALETYPES_HXX
+
diff --git a/xmloff/source/style/breakhdl.cxx b/xmloff/source/style/breakhdl.cxx
new file mode 100644
index 0000000000..bb3d80fab6
--- /dev/null
+++ b/xmloff/source/style/breakhdl.cxx
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * $RCSfile: breakhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_BREAKTYPES_HXX
+#include <breakhdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_BREAKTYPE_HPP_
+#include <com/sun/star/style/BreakType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+SvXMLEnumMapEntry psXML_BreakTypes[] =
+{
+ { sXML_auto, 0 },
+ { sXML_column, 1 },
+ { sXML_page, 2 },
+ { sXML_even_page, 2 },
+ { sXML_odd_page, 2 },
+ { 0, 0}
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLFmtBreakBeforePropHdl
+//
+
+XMLFmtBreakBeforePropHdl::~XMLFmtBreakBeforePropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLFmtBreakBeforePropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ style::BreakType eBreak = style::BreakType_NONE;
+ sal_uInt16 nEnum;
+
+ if( ( bRet = rUnitConverter.convertEnum( nEnum, rStrImpValue, psXML_BreakTypes ) ) )
+ {
+ if( nEnum != 0 )
+ eBreak = ( nEnum == 1 ) ? style::BreakType_COLUMN_BEFORE : style::BreakType_PAGE_BEFORE;
+
+ rValue <<= eBreak;
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLFmtBreakBeforePropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ style::BreakType eBreak;
+
+ if( !( rValue >>= eBreak ) )
+ {
+ sal_Int32 nValue;
+ if( !( rValue >>= nValue ) )
+ return sal_False;
+
+ eBreak = (style::BreakType) nValue;
+ }
+
+ sal_uInt16 nEnum = 0;
+ switch( eBreak )
+ {
+ case style::BreakType_COLUMN_BEFORE:
+ nEnum = 1;
+ break;
+ case style::BreakType_PAGE_BEFORE:
+ nEnum = 2;
+ break;
+ case style::BreakType_NONE:
+ nEnum = 0;
+ break;
+ default:
+ return sal_False;
+ }
+
+ OUStringBuffer aOut;
+ sal_Bool bOk = rUnitConverter.convertEnum( aOut, nEnum, psXML_BreakTypes );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLFmtBreakBeforePropHdl
+//
+
+XMLFmtBreakAfterPropHdl::~XMLFmtBreakAfterPropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLFmtBreakAfterPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ style::BreakType eBreak = style::BreakType_NONE;
+ sal_uInt16 nEnum;
+
+ if( ( bRet = rUnitConverter.convertEnum( nEnum, rStrImpValue, psXML_BreakTypes ) ) )
+ {
+ if( nEnum != 0 )
+ eBreak = ( nEnum == 1 ) ? style::BreakType_COLUMN_AFTER : style::BreakType_PAGE_AFTER;
+
+ rValue <<= eBreak;
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLFmtBreakAfterPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ style::BreakType eBreak;
+
+ if( !( rValue >>= eBreak ) )
+ {
+ sal_Int32 nValue;
+ if( !( rValue >>= nValue ) )
+ return sal_False;
+
+ eBreak = (style::BreakType) nValue;
+ }
+
+ sal_uInt16 nEnum = 0;
+ switch( eBreak )
+ {
+ case style::BreakType_COLUMN_AFTER:
+ nEnum = 1;
+ break;
+ case style::BreakType_PAGE_AFTER:
+ nEnum = 2;
+ break;
+ case style::BreakType_NONE:
+ nEnum = 0;
+ break;
+ default:
+ return sal_False;
+ }
+
+ OUStringBuffer aOut;
+ sal_Bool bOk = rUnitConverter.convertEnum( aOut, nEnum, psXML_BreakTypes );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ return bRet;
+}
diff --git a/xmloff/source/style/breakhdl.hxx b/xmloff/source/style/breakhdl.hxx
new file mode 100644
index 0000000000..f3694b401a
--- /dev/null
+++ b/xmloff/source/style/breakhdl.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * $RCSfile: breakhdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_BREAKTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_BREAKTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLFmtBreakBeforePropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLFmtBreakBeforePropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLFmtBreakAfterPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLFmtBreakAfterPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_BREAKTYPES_HXX
diff --git a/xmloff/source/style/cdouthdl.cxx b/xmloff/source/style/cdouthdl.cxx
new file mode 100644
index 0000000000..ae2fc81786
--- /dev/null
+++ b/xmloff/source/style/cdouthdl.cxx
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * $RCSfile: cdouthdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_CROSSEDOUTTYPES_HXX
+#include <cdouthdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _VCL_VCLENUM_HXX
+#include <vcl/vclenum.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+SvXMLEnumMapEntry pXML_Crossedout_Enum[] =
+{
+ { sXML_crossedout_none, STRIKEOUT_NONE },
+ { sXML_crossedout_single, STRIKEOUT_SINGLE },
+ { sXML_crossedout_double, STRIKEOUT_DOUBLE },
+ { sXML_crossedout_thick, STRIKEOUT_BOLD },
+ { sXML_crossedout_slash, STRIKEOUT_SLASH },
+ { sXML_crossedout_cross, STRIKEOUT_X }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLPosturePropHdl
+//
+
+XMLCrossedOutPropHdl::~XMLCrossedOutPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLCrossedOutPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt16 eCross;
+
+ if( ( bRet = rUnitConverter.convertEnum( eCross, rStrImpValue, pXML_Crossedout_Enum ) ) )
+ rValue <<= (sal_Int16)eCross;
+
+ return bRet;
+}
+
+sal_Bool XMLCrossedOutPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int16 nValue;
+ OUStringBuffer aOut;
+
+ if( rValue >>= nValue )
+ {
+ if( ( bRet = rUnitConverter.convertEnum( aOut, (sal_uInt16)nValue, pXML_Crossedout_Enum ) ) )
+ rStrExpValue = aOut.makeStringAndClear();
+ }
+
+ return bRet;
+}
+
diff --git a/xmloff/source/style/cdouthdl.hxx b/xmloff/source/style/cdouthdl.hxx
new file mode 100644
index 0000000000..cd6e1ce4d7
--- /dev/null
+++ b/xmloff/source/style/cdouthdl.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: cdouthdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_CROSSEDOUTTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_CROSSEDOUTTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLCrossedOutPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLCrossedOutPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_CROSSEDOUTTYPES_HXX
diff --git a/xmloff/source/style/chrhghdl.cxx b/xmloff/source/style/chrhghdl.cxx
new file mode 100644
index 0000000000..c7cd8d6140
--- /dev/null
+++ b/xmloff/source/style/chrhghdl.cxx
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * $RCSfile: chrhghdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_CHARHEIGHTTYPES_HXX
+#include <chrhghdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// this is a copy of defines in svx/inc/escpitem.hxx
+#define DFLT_ESC_PROP 58
+#define DFLT_ESC_AUTO_SUPER 101
+#define DFLT_ESC_AUTO_SUB -101
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLEscapementPropHdl
+//
+
+XMLCharHeightHdl::~XMLCharHeightHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLCharHeightHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Int32 nAbs = 0;
+
+ if( rStrImpValue.indexOf( sal_Unicode('%') ) == -1 )
+ {
+ if( SvXMLUnitConverter::convertMeasure( nAbs, rStrImpValue, MAP_POINT ) )
+ {
+ rValue <<= (float)nAbs;
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+sal_Bool XMLCharHeightHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut;
+
+ float nAbs = 0;
+ if( rValue >>= nAbs )
+ {
+ SvXMLUnitConverter::convertMeasure( aOut, nAbs, MAP_POINT, MAP_POINT );
+ }
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return rStrExpValue.getLength() != 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLEscapementHeightPropHdl
+//
+
+XMLCharHeightPropHdl::~XMLCharHeightPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLCharHeightPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Int32 nPrc = 100;
+
+ if( rStrImpValue.indexOf( sal_Unicode('%') ) != -1 )
+ {
+ if( rUnitConverter.convertPercent( nPrc, rStrImpValue ) )
+ {
+ rValue <<= nPrc;
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+sal_Bool XMLCharHeightPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut( rStrExpValue );
+
+ sal_Int32 nValue;
+ if( rValue >>= nValue )
+ {
+ rUnitConverter.convertPercent( aOut, nValue );
+ }
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return rStrExpValue.getLength() != 0;
+}
diff --git a/xmloff/source/style/chrhghdl.hxx b/xmloff/source/style/chrhghdl.hxx
new file mode 100644
index 0000000000..09a6632508
--- /dev/null
+++ b/xmloff/source/style/chrhghdl.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * $RCSfile: chrhghdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_CHARHEIGHTTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_CHARHEIGHTTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLCharHeightHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLCharHeightHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+class XMLCharHeightPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLCharHeightPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_CHARHEIGHTTYPES_HXX
+
diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx
new file mode 100644
index 0000000000..3b2045ed0e
--- /dev/null
+++ b/xmloff/source/style/chrlohdl.cxx
@@ -0,0 +1,193 @@
+/*************************************************************************
+ *
+ * $RCSfile: chrlohdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_CHARLOCALETYPES_HXX
+#include <chrlohdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
+#include <com/sun/star/lang/Locale.hpp>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// this is a copy of defines in svx/inc/escpitem.hxx
+#define DFLT_ESC_PROP 58
+#define DFLT_ESC_AUTO_SUPER 101
+#define DFLT_ESC_AUTO_SUB -101
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLEscapementPropHdl
+//
+
+XMLCharLanguageHdl::~XMLCharLanguageHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLCharLanguageHdl::equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const
+{
+ sal_Bool bRet = sal_False;
+ lang::Locale aLocale1, aLocale2;
+
+ if( ( r1 >>= aLocale1 ) && ( r2 >>= aLocale2 ) )
+ bRet = ( aLocale1.Language == aLocale2.Language );
+
+ return bRet;
+}
+
+sal_Bool XMLCharLanguageHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ lang::Locale aLocale;
+
+ rValue >>= aLocale;
+
+ if( rStrImpValue.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_none ) ) != 0 )
+ aLocale.Language = rStrImpValue;
+
+ rValue <<= aLocale;
+ return sal_True;
+}
+
+sal_Bool XMLCharLanguageHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ lang::Locale aLocale;
+ if(!(rValue >>= aLocale))
+ return sal_False;
+
+ rStrExpValue = aLocale.Language;
+
+ if( !rStrExpValue.getLength() )
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) );
+
+ return sal_True;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLEscapementHeightPropHdl
+//
+
+XMLCharCountryHdl::~XMLCharCountryHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLCharCountryHdl::equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const
+{
+ sal_Bool bRet = sal_False;
+ lang::Locale aLocale1, aLocale2;
+
+ if( ( r1 >>= aLocale1 ) && ( r2 >>= aLocale2 ) )
+ bRet = ( aLocale1.Country == aLocale2.Country );
+
+ return bRet;
+}
+
+sal_Bool XMLCharCountryHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ lang::Locale aLocale;
+
+ rValue >>= aLocale;
+
+ if( rStrImpValue.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_none ) ) != 0 )
+ aLocale.Country = rStrImpValue;
+
+ rValue <<= aLocale;
+ return sal_True;
+}
+
+sal_Bool XMLCharCountryHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ lang::Locale aLocale;
+ if(!(rValue >>= aLocale))
+ return sal_False;
+
+ rStrExpValue = aLocale.Country;
+
+ if( !rStrExpValue.getLength() )
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) );
+
+ return sal_True;
+}
diff --git a/xmloff/source/style/chrlohdl.hxx b/xmloff/source/style/chrlohdl.hxx
new file mode 100644
index 0000000000..5dd6cf892f
--- /dev/null
+++ b/xmloff/source/style/chrlohdl.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * $RCSfile: chrlohdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_CHARLOCALETYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_CHARLOCALETYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLCharLanguageHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLCharLanguageHdl();
+
+ virtual sal_Bool equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const;
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+class XMLCharCountryHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLCharCountryHdl();
+
+ virtual sal_Bool equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const;
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_CHARLOCALETYPES_HXX
+
diff --git a/xmloff/source/style/csmaphdl.cxx b/xmloff/source/style/csmaphdl.cxx
new file mode 100644
index 0000000000..1194ef5a1a
--- /dev/null
+++ b/xmloff/source/style/csmaphdl.cxx
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * $RCSfile: csmaphdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_CASEMAPTYPES_HXX
+#include <csmaphdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_CASEMAP_HPP_
+#include <com/sun/star/style/CaseMap.hpp>
+#endif
+
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+static SvXMLEnumMapEntry pXML_Casemap_Enum[] =
+{
+ { sXML_none, style::CaseMap::NONE },
+ { sXML_casemap_lowercase, style::CaseMap::LOWERCASE },
+ { sXML_casemap_uppercase, style::CaseMap::UPPERCASE },
+ { sXML_casemap_capitalize, style::CaseMap::TITLE },
+ { 0,0 }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLPosturePropHdl
+//
+
+XMLCaseMapPropHdl::~XMLCaseMapPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLCaseMapPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nVal;
+
+ if( ( bRet = rUnitConverter.convertEnum( nVal, rStrImpValue, pXML_Casemap_Enum ) ) )
+ rValue <<= nVal;
+
+ return bRet;
+}
+
+sal_Bool XMLCaseMapPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nValue;
+ OUStringBuffer aOut;
+
+ if( rValue >>= nValue )
+ {
+ if( ( bRet = rUnitConverter.convertEnum( aOut, nValue, pXML_Casemap_Enum ) ) )
+ rStrExpValue = aOut.makeStringAndClear();
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLCaseMapVariantHdl
+//
+
+XMLCaseMapVariantHdl::~XMLCaseMapVariantHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLCaseMapVariantHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ if( !rStrImpValue.compareToAscii( sXML_casemap_small_caps ) )
+ return sal_False;
+
+ rValue <<= (sal_Int16)style::CaseMap::SMALLCAPS;
+ return sal_True;
+}
+
+sal_Bool XMLCaseMapVariantHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_uInt16 nValue;
+ OUStringBuffer aOut;
+
+ if( rValue >>= nValue )
+ {
+ switch( nValue )
+ {
+ case style::CaseMap::NONE:
+ aOut.appendAscii( sXML_casemap_normal );
+ break;
+ case style::CaseMap::SMALLCAPS:
+ aOut.appendAscii( sXML_casemap_small_caps );
+ break;
+ }
+ }
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return rStrExpValue.getLength();
+}
diff --git a/xmloff/source/style/csmaphdl.hxx b/xmloff/source/style/csmaphdl.hxx
new file mode 100644
index 0000000000..96f32c4bbd
--- /dev/null
+++ b/xmloff/source/style/csmaphdl.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: csmaphdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_CASEMAPTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_CASEMAPTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLCaseMapPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLCaseMapPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+class XMLCaseMapVariantHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLCaseMapVariantHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_CASEMAPTYPES_HXX
diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx
new file mode 100644
index 0000000000..338c082ad0
--- /dev/null
+++ b/xmloff/source/style/escphdl.cxx
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * $RCSfile: escphdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_ESCAPETYPES_HXX
+#include <escphdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// this is a copy of defines in svx/inc/escpitem.hxx
+#define DFLT_ESC_PROP 58
+#define DFLT_ESC_AUTO_SUPER 101
+#define DFLT_ESC_AUTO_SUB -101
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLEscapementPropHdl
+//
+
+XMLEscapementPropHdl::~XMLEscapementPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLEscapementPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int16 nVal;
+
+ SvXMLTokenEnumerator aTokens( rStrImpValue );
+
+ OUString aToken;
+ if( ! aTokens.getNextToken( aToken ) )
+ return sal_False;
+
+ if( aToken.compareToAscii( sXML_escapement_sub ) )
+ {
+ nVal = DFLT_ESC_AUTO_SUB;
+ }
+ else if( aToken.compareToAscii( sXML_escapement_super ) )
+ {
+ nVal = DFLT_ESC_AUTO_SUPER;
+ }
+ else
+ {
+ sal_Int32 nNewEsc;
+ if( !rUnitConverter.convertPercent( nNewEsc, aToken ) )
+ return sal_False;
+
+ nVal = (sal_Int16) nNewEsc;
+ }
+
+ rValue <<= nVal;
+ return sal_True;
+}
+
+sal_Bool XMLEscapementPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int32 nValue;
+ OUStringBuffer aOut;
+
+ if( rValue >>= nValue )
+ {
+ if( nValue == DFLT_ESC_AUTO_SUPER )
+ {
+ aOut.appendAscii( sXML_escapement_super );
+ }
+ else if( nValue == DFLT_ESC_AUTO_SUB )
+ {
+ aOut.appendAscii( sXML_escapement_sub );
+ }
+ else
+ {
+ rUnitConverter.convertPercent( aOut, nValue );
+ }
+ }
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return sal_True;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLEscapementHeightPropHdl
+//
+
+XMLEscapementHeightPropHdl::~XMLEscapementHeightPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLEscapementHeightPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ if( !rStrImpValue.compareToAscii( sXML_casemap_small_caps ) )
+ return sal_False;
+
+ SvXMLTokenEnumerator aTokens( rStrImpValue );
+
+ OUString aToken;
+ if( ! aTokens.getNextToken( aToken ) )
+ return sal_False;
+
+ sal_Int8 nProp;
+ if( aTokens.getNextToken( aToken ) )
+ {
+ sal_Int32 nNewProp;
+ if( !rUnitConverter.convertPercent( nNewProp, aToken ) )
+ return sal_False;
+ nProp = (sal_Int8)nNewProp;
+ }
+ else
+ {
+ nProp = (sal_Int8) DFLT_ESC_PROP;
+ }
+
+ rValue <<= nProp;
+ return sal_True;
+}
+
+sal_Bool XMLEscapementHeightPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut( rStrExpValue );
+
+ sal_Int32 nValue;
+ if( rValue >>= nValue )
+ {
+ if( rStrExpValue.getLength() )
+ aOut.append( sal_Unicode(' '));
+
+ rUnitConverter.convertPercent( aOut, nValue );
+ }
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return rStrExpValue.getLength();
+}
diff --git a/xmloff/source/style/escphdl.hxx b/xmloff/source/style/escphdl.hxx
new file mode 100644
index 0000000000..7c153d2c7f
--- /dev/null
+++ b/xmloff/source/style/escphdl.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * $RCSfile: escphdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_ESCAPETYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_ESCAPETYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLEscapementPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLEscapementPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+class XMLEscapementHeightPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLEscapementHeightPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_ESCAPETYPES_HXX
+
diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx
new file mode 100644
index 0000000000..79ea53a59e
--- /dev/null
+++ b/xmloff/source/style/fonthdl.cxx
@@ -0,0 +1,354 @@
+/*************************************************************************
+ *
+ * $RCSfile: fonthdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX
+#include <fonthdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _VCL_VCLENUM_HXX
+#include <vcl/vclenum.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+static SvXMLEnumMapEntry __READONLY_DATA aFontFamilyGenericMapping[] =
+{
+ { sXML_decorative, FAMILY_DECORATIVE },
+
+ { sXML_modern, FAMILY_MODERN },
+ { sXML_roman, FAMILY_ROMAN },
+ { sXML_script, FAMILY_SCRIPT },
+ { sXML_swiss, FAMILY_SWISS },
+ { sXML_system, FAMILY_SYSTEM },
+ { 0, 0 }
+};
+
+static SvXMLEnumMapEntry __READONLY_DATA aFontPitchMapping[] =
+{
+ { sXML_fixed, PITCH_FIXED },
+ { sXML_variable, PITCH_VARIABLE },
+ { 0, 0 }
+};
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLFontFamilyNamePropHdl
+//
+
+XMLFontFamilyNamePropHdl::~XMLFontFamilyNamePropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLFontFamilyNamePropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ String sValue;
+ sal_Int32 nPos = 0;
+
+ do
+ {
+ sal_Int32 nFirst = nPos;
+ nPos = SvXMLUnitConverter::indexOfComma( rStrImpValue, nPos );
+ sal_Int32 nLast = (-1 == nPos ? rStrImpValue.getLength() : nPos);
+ if( nLast > 0 )
+ nLast--;
+
+ // skip trailing blanks
+ while( sal_Unicode(' ') == rStrImpValue[nLast] && nLast > nFirst )
+ nLast--;
+
+ // skip leading blanks
+ while( sal_Unicode(' ') == rStrImpValue[nFirst] && nFirst <= nLast )
+ nFirst++;
+
+ // remove quotes
+ sal_Unicode c = rStrImpValue[nFirst];
+ if( nFirst < nLast && (sal_Unicode('\'') == c || sal_Unicode('\"') == c) && rStrImpValue[nLast] == c )
+ {
+ nFirst++;
+ nLast--;
+ }
+
+ if( nFirst <= nLast )
+ {
+ if( sValue.Len() != 0 )
+ sValue += sal_Unicode(';');
+
+ OUString sTemp = rStrImpValue.copy( nFirst, nLast-nFirst+1 );
+ sValue += sTemp.getStr();
+ }
+
+ if( -1 != nPos )
+ nPos++;
+ }
+ while( -1 != nPos );
+
+ if( sValue.Len() )
+ {
+ rValue <<= OUString(sValue.GetBuffer());
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLFontFamilyNamePropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ OUString aStrFamilyName;
+
+ if( rValue >>= aStrFamilyName )
+ {
+ OUStringBuffer sValue( aStrFamilyName.getLength() + 2L );
+ sal_Int32 nPos = 0L;
+ do
+ {
+ sal_Int32 nFirst = nPos;
+ nPos = aStrFamilyName.indexOf( sal_Unicode(';'), nPos );
+ sal_Int32 nLast = (-1L == nPos ? aStrFamilyName.getLength() : nPos);
+ if( nLast > 0L )
+ nLast--;
+
+ // skip trailing blanks
+ while( sal_Unicode(' ') == aStrFamilyName[nLast] && nLast > nFirst )
+ nLast--;
+
+ // skip leading blanks
+ while( sal_Unicode(' ') == aStrFamilyName[nFirst] && nFirst <= nLast )
+ nFirst++;
+
+ if( nFirst <= nLast )
+ {
+ if( sValue.getLength() != 0L )
+ {
+ sValue.append( sal_Unicode( ',' ) );
+ sValue.append( sal_Unicode( ' ' ));
+ }
+ sal_Int32 nLen = nLast-nFirst+1L;
+ OUString sFamily( aStrFamilyName.copy( nFirst, nLen ) );
+ sal_Bool bQuote = sal_False;
+ for( sal_Int32 i=0; i < nLen; i++ )
+ {
+ sal_Unicode c = sFamily[i];
+ if( sal_Unicode(' ') == c || sal_Unicode(',') == c )
+ {
+ bQuote = sal_True;
+ break;
+ }
+ }
+ if( bQuote )
+ sValue.append( sal_Unicode('\'') );
+ sValue.append( sFamily );
+ if( bQuote )
+ sValue.append( sal_Unicode('\'') );
+ }
+
+ if( -1L != nPos )
+ nPos++;
+ }
+ while( -1L != nPos );
+
+ rStrExpValue = sValue.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLFontFamilyPropHdl
+//
+
+XMLFontFamilyPropHdl::~XMLFontFamilyPropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLFontFamilyPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt16 eNewFamily;
+
+ if( ( bRet = rUnitConverter.convertEnum( eNewFamily, rStrImpValue, aFontFamilyGenericMapping ) ) )
+ rValue <<= eNewFamily;
+
+ return bRet;
+}
+
+sal_Bool XMLFontFamilyPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ OUStringBuffer aOut;
+
+ sal_Int16 nFamily;
+ if( rValue >>= nFamily )
+ {
+ FontFamily eFamily = (FontFamily)nFamily;
+ if( eFamily != FAMILY_DONTKNOW )
+ bRet = rUnitConverter.convertEnum( aOut, eFamily, aFontFamilyGenericMapping );
+ }
+
+ rStrExpValue = aOut.makeStringAndClear();
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLFontEncodingPropHdl
+//
+
+XMLFontEncodingPropHdl::~XMLFontEncodingPropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLFontEncodingPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_True;
+
+ if( rStrImpValue.compareToAscii( sXML_x_symbol ) )
+ rValue <<= (sal_Int16) RTL_TEXTENCODING_SYMBOL;
+
+ return bRet;
+}
+
+sal_Bool XMLFontEncodingPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ OUStringBuffer aOut;
+ sal_Int16 nSet;
+
+ if( rValue >>= nSet )
+ {
+ if( (rtl_TextEncoding)nSet == RTL_TEXTENCODING_SYMBOL )
+ {
+ aOut.appendAscii( sXML_x_symbol );
+ rStrExpValue = aOut.makeStringAndClear();
+ bRet = sal_True;
+ }
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLFontPitchPropHdl
+//
+
+XMLFontPitchPropHdl::~XMLFontPitchPropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLFontPitchPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ USHORT eNewPitch;
+
+ if( ( bRet = rUnitConverter.convertEnum( eNewPitch, rStrImpValue, aFontPitchMapping ) ) )
+ rValue <<= (sal_Int16)eNewPitch;
+
+ return bRet;
+}
+
+sal_Bool XMLFontPitchPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int16 nPitch;
+ OUStringBuffer aOut;
+
+ FontPitch ePitch;
+ if( rValue >>= nPitch )
+ ePitch = (FontPitch)nPitch;
+
+ if( PITCH_DONTKNOW != ePitch )
+ {
+ bRet = rUnitConverter.convertEnum( aOut, ePitch, aFontPitchMapping, sXML_fixed );
+ rStrExpValue = aOut.makeStringAndClear();
+ }
+
+ return bRet;
+}
diff --git a/xmloff/source/style/fonthdl.hxx b/xmloff/source/style/fonthdl.hxx
new file mode 100644
index 0000000000..7958205a08
--- /dev/null
+++ b/xmloff/source/style/fonthdl.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * $RCSfile: fonthdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_FONTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLFontFamilyNamePropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLFontFamilyNamePropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLFontFamilyPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLFontFamilyPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLFontEncodingPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLFontEncodingPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLFontPitchPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLFontPitchPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+
+#endif // _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX
diff --git a/xmloff/source/style/impastp1.cxx b/xmloff/source/style/impastp1.cxx
new file mode 100644
index 0000000000..f1c6aa2ea6
--- /dev/null
+++ b/xmloff/source/style/impastp1.cxx
@@ -0,0 +1,149 @@
+/*************************************************************************
+ *
+ * $RCSfile: impastp1.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLASTPL_IMPL_HXX
+#include "impastpl.hxx"
+#endif
+
+using namespace rtl;
+
+//#############################################################################
+//
+// Class XMLFamilyData_Impl
+//
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// ctor/dtor class XMLFamilyData_Impl
+//
+
+XMLFamilyData_Impl::XMLFamilyData_Impl(
+ sal_Int32 nFamily,
+ const ::rtl::OUString& rStrName,
+ const UniReference < XMLPropertySetMapper > &rMapper,
+ const OUString& rStrPrefix )
+ : mnFamily( nFamily ), maStrFamilyName( rStrName), mxMapper( rMapper ), maStrPrefix( rStrPrefix ),
+ mnCount( 0 ), mnName( 0 )
+{
+ mpParentList = new SvXMLAutoStylePoolParentsP_Impl( 5, 5 );
+ mpNameList = new SvXMLAutoStylePoolNamesP_Impl( 5, 5 );
+}
+
+XMLFamilyData_Impl::~XMLFamilyData_Impl()
+{
+ if( mpParentList ) delete mpParentList;
+ if( mpNameList ) delete mpNameList;
+}
+
+void XMLFamilyData_Impl::ClearEntries()
+{
+ if( mpParentList )
+ delete mpParentList;
+ mpParentList = new SvXMLAutoStylePoolParentsP_Impl( 5, 5 );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// friendfunction of class XMLFamilyData_Impl for sorting listelements
+//
+
+int XMLFamilyDataSort_Impl( const XMLFamilyData_Impl& r1, const XMLFamilyData_Impl& r2 )
+{
+ int nRet = 0;
+
+ if( r1.mnFamily != r2.mnFamily )
+ nRet = ( r1.mnFamily > r2.mnFamily ? 1 : -1 );
+
+ return nRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Implementation of sorted list of XMLFamilyData_Impl - elements
+//
+
+IMPL_CONTAINER_SORT( XMLFamilyDataList_Impl, XMLFamilyData_Impl, XMLFamilyDataSort_Impl )
+
+//#############################################################################
+//
+// Sorted list of OUString - elements
+//
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Sort-function for OUString-list
+//
+
+int SvXMLAutoStylePoolNamesPCmp_Impl( const OUString& r1,
+ const OUString& r2 )
+{
+ return (int)r1.compareTo( r2 );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Implementation of sorted OUString-list
+//
+
+IMPL_CONTAINER_SORT( SvXMLAutoStylePoolNamesP_Impl,
+ OUString,
+ SvXMLAutoStylePoolNamesPCmp_Impl )
+
diff --git a/xmloff/source/style/impastp2.cxx b/xmloff/source/style/impastp2.cxx
new file mode 100644
index 0000000000..5dd7af33a0
--- /dev/null
+++ b/xmloff/source/style/impastp2.cxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * $RCSfile: impastp2.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLASTPL_IMPL_HXX
+#include "impastpl.hxx"
+#endif
+
+using namespace std;
+using namespace rtl;
+
+//#############################################################################
+//
+// Class SvXMLAutoStylePoolProperties_Impl
+//
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// ctor class SvXMLAutoStylePoolProperties_Impl
+//
+
+SvXMLAutoStylePoolPropertiesP_Impl::SvXMLAutoStylePoolPropertiesP_Impl( XMLFamilyData_Impl* pFamilyData, const vector< XMLPropertyState >& rProperties )
+: maProperties( rProperties ),
+ mnPos ( pFamilyData->mnCount )
+{
+ // create a name that hasn't been used before. The created name has not
+ // to be added to the array, because it will never tried again
+ OUStringBuffer sBuffer( 7 );
+ do
+ {
+ pFamilyData->mnName++;
+ sBuffer.append( pFamilyData->maStrPrefix );
+ sBuffer.append( OUString::valueOf( (sal_Int32)pFamilyData->mnName ) );
+ msName = sBuffer.makeStringAndClear();
+ }
+ while( pFamilyData->mpNameList->Seek_Entry( &msName, 0 ) );
+}
diff --git a/xmloff/source/style/impastp3.cxx b/xmloff/source/style/impastp3.cxx
new file mode 100644
index 0000000000..282529f00c
--- /dev/null
+++ b/xmloff/source/style/impastp3.cxx
@@ -0,0 +1,180 @@
+/*************************************************************************
+ *
+ * $RCSfile: impastp3.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLASTPL_IMPL_HXX
+#include "impastpl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
+#include "xmlprmap.hxx"
+#endif
+
+using namespace std;
+using namespace rtl;
+
+//#############################################################################
+//
+// Class SvXMLAutoStylePoolParent_Impl
+//
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// dtor class SvXMLAutoStylePoolParent_Impl
+//
+
+SvXMLAutoStylePoolParentP_Impl::~SvXMLAutoStylePoolParentP_Impl()
+{
+ while( maPropertiesList.Count() )
+ delete maPropertiesList.Remove( maPropertiesList.Count() -1 );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Adds a array of XMLPropertyState ( vector< XMLPropertyState > ) to list
+// if not added, yet.
+//
+
+sal_Bool SvXMLAutoStylePoolParentP_Impl::Add( XMLFamilyData_Impl* pFamilyData, const vector< XMLPropertyState >& rProperties, OUString& rName )
+{
+ sal_Bool bAdded = sal_False;
+
+ sal_Int32 nProperties = rProperties.size();
+ sal_uInt32 nCount = maPropertiesList.Count();
+ SvXMLAutoStylePoolPropertiesP_Impl *pProperties = 0;
+ for( sal_uInt32 i=0; i < nCount; i++ )
+ {
+ SvXMLAutoStylePoolPropertiesP_Impl *pIS = maPropertiesList.GetObject( i );
+ if( nProperties > pIS->GetProperties().size() )
+ {
+ continue;
+ }
+ else if( nProperties < pIS->GetProperties().size() )
+ {
+ break;
+ }
+ else if( pFamilyData->mxMapper->Equals( pIS->GetProperties(), rProperties ) )
+ {
+ pProperties = pIS;
+ break;
+ }
+ }
+
+ if( !pProperties )
+ {
+ pProperties = new SvXMLAutoStylePoolPropertiesP_Impl( pFamilyData, rProperties );
+ maPropertiesList.Insert( pProperties, i );
+ bAdded = sal_True;
+ }
+
+ rName = pProperties->GetName();
+
+ return bAdded;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Search for a array of XMLPropertyState ( vector< XMLPropertyState > ) in list
+//
+
+OUString SvXMLAutoStylePoolParentP_Impl::Find( const XMLFamilyData_Impl* pFamilyData, const vector< XMLPropertyState >& rProperties ) const
+{
+ OUString sName;
+ sal_uInt16 nItems = rProperties.size();
+ sal_uInt32 nCount = maPropertiesList.Count();
+ for( sal_uInt32 i=0; i < nCount; i++ )
+ {
+ SvXMLAutoStylePoolPropertiesP_Impl *pIS = maPropertiesList.GetObject( i );
+ if( nItems > pIS->GetProperties().size() )
+ {
+ continue;
+ }
+ else if( nItems < pIS->GetProperties().size() )
+ {
+ break;
+ }
+ else if( pFamilyData->mxMapper->Equals( pIS->GetProperties(), rProperties ) )
+ {
+ sName = pIS->GetName();
+ break;
+ }
+ }
+
+ return sName;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Sort-function for sorted list of SvXMLAutoStylePoolParent_Impl-elements
+//
+
+int SvXMLAutoStylePoolParentPCmp_Impl( const SvXMLAutoStylePoolParentP_Impl& r1,
+ const SvXMLAutoStylePoolParentP_Impl& r2)
+{
+ return (int)r1.GetParent().compareTo( r2.GetParent() );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Implementation of sorted list of SvXMLAutoStylePoolParent_Impl-elements
+//
+
+IMPL_CONTAINER_SORT( SvXMLAutoStylePoolParentsP_Impl,
+ SvXMLAutoStylePoolParentP_Impl,
+ SvXMLAutoStylePoolParentPCmp_Impl )
diff --git a/xmloff/source/style/impastp4.cxx b/xmloff/source/style/impastp4.cxx
new file mode 100644
index 0000000000..9e32a64ee5
--- /dev/null
+++ b/xmloff/source/style/impastp4.cxx
@@ -0,0 +1,360 @@
+/*************************************************************************
+ *
+ * $RCSfile: impastp4.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLASTPLP_HXX
+#include "xmlaustp.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include "attrlist.hxx"
+#endif
+#ifndef _XMLOFF_XMLASTPL_IMPL_HXX
+#include "impastpl.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXPPR_HXX
+#include "xmlexppr.hxx"
+#endif
+
+using namespace ::std;
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//#############################################################################
+//
+// Class SvXMLAutoStylePool_Impl
+//
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// ctor/dtor class SvXMLAutoStylePool_Impl
+//
+
+SvXMLAutoStylePoolP_Impl::SvXMLAutoStylePoolP_Impl()
+: msCDATA( OUString::createFromAscii( sXML_CDATA ) ),
+ msWS( OUString::createFromAscii( sXML_WS ) ),
+ maFamilyList( 5, 5 )
+{
+ mpAttrList = new SvXMLAttributeList();
+ mxAttrList = mpAttrList;
+}
+
+SvXMLAutoStylePoolP_Impl::~SvXMLAutoStylePoolP_Impl()
+{
+ XMLFamilyData_Impl* pData = NULL;
+ while( ( pData = maFamilyList.Remove( ULONG(0) ) ) )
+ delete pData;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Adds stylefamily-informations to sorted list
+//
+
+void SvXMLAutoStylePoolP_Impl::AddFamily(
+ sal_Int32 nFamily,
+ const OUString& rStrName,
+ const UniReference < XMLPropertySetMapper > & rMapper,
+ const OUString& rStrPrefix )
+{
+ // store family in a list if not already stored
+ sal_uInt32 nPos;
+ XMLFamilyData_Impl *pFamily = new XMLFamilyData_Impl( nFamily, rStrName, rMapper, rStrPrefix );
+ if( !maFamilyList.Seek_Entry( pFamily, &nPos ) )
+ maFamilyList.Insert( pFamily );
+ else
+ delete pFamily;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Adds a name to list
+//
+
+void SvXMLAutoStylePoolP_Impl::RegisterName( sal_Int32 nFamily, const OUString& rName )
+{
+ SvXMLAutoStylePoolNamesP_Impl *pNames = 0;
+
+ sal_uInt32 nPos;
+ XMLFamilyData_Impl aTmp( nFamily );
+ if( maFamilyList.Seek_Entry( &aTmp, &nPos ) )
+ pNames = maFamilyList.GetObject( nPos )->mpNameList;
+
+ DBG_ASSERT( pNames,
+ "SvXMLAutoStylePool_Impl::RegisterName: unknown family" );
+ if( pNames )
+ {
+ OUString *pName = new OUString( rName );
+ if( !pNames->Insert( pName ) )
+ delete pName;
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Adds a array of XMLPropertyState ( vector< XMLPropertyState > ) to list
+// if not added, yet.
+//
+
+OUString SvXMLAutoStylePoolP_Impl::Add( sal_Int32 nFamily,
+ const OUString& rParent,
+ const vector< XMLPropertyState >& rProperties )
+{
+ OUString sName;
+ sal_uInt32 nPos;
+
+ XMLFamilyData_Impl *pFamily = 0;
+ XMLFamilyData_Impl aTmp( nFamily );
+ if( maFamilyList.Seek_Entry( &aTmp, &nPos ) )
+ {
+ pFamily = maFamilyList.GetObject( nPos );
+ }
+
+ DBG_ASSERT( pFamily, "SvXMLAutoStylePool_Impl::Add: unknown family" );
+ if( pFamily )
+ {
+ SvXMLAutoStylePoolParentP_Impl aTmp( rParent );
+ SvXMLAutoStylePoolParentP_Impl *pParent = 0;
+
+ SvXMLAutoStylePoolParentsP_Impl *pParents = pFamily->mpParentList;
+ if( pParents->Seek_Entry( &aTmp, &nPos ) )
+ {
+ pParent = pParents->GetObject( nPos );
+ }
+ else
+ {
+ pParent = new SvXMLAutoStylePoolParentP_Impl( rParent );
+ pParents->Insert( pParent );
+ }
+
+ if( pParent->Add( pFamily, rProperties, sName ) )
+ pFamily->mnCount++;
+ }
+
+ return sName;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Search for a array of XMLPropertyState ( vector< XMLPropertyState > ) in list
+//
+
+OUString SvXMLAutoStylePoolP_Impl::Find( sal_Int32 nFamily,
+ const OUString& rParent,
+ const vector< XMLPropertyState >& rProperties ) const
+{
+ OUString sName;
+
+ sal_uInt32 nPos;
+ XMLFamilyData_Impl aTmp( nFamily );
+ XMLFamilyData_Impl *pFamily = 0;
+ if( maFamilyList.Seek_Entry( &aTmp, &nPos ) )
+ {
+ pFamily = maFamilyList.GetObject( nPos );
+ }
+
+ DBG_ASSERT( pFamily, "SvXMLAutoStylePool_Impl::Find: unknown family" );
+
+ if( pFamily )
+ {
+ SvXMLAutoStylePoolParentP_Impl aTmp( rParent );
+
+ const SvXMLAutoStylePoolParentsP_Impl* pParents =
+ pFamily->mpParentList;
+ if( pParents->Seek_Entry( &aTmp, &nPos ) )
+ sName = pParents->GetObject( nPos )->Find( pFamily, rProperties );
+ }
+
+ return sName;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// export
+//
+
+void SvXMLAutoStylePoolP_Impl::exportXML(
+ sal_Int32 nFamily,
+ const SvXMLExportPropertyMapper& rPropExp,
+ const uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ const SvXMLAutoStylePoolP *pAntiImpl) const
+{
+ sal_uInt32 nCount = 0;
+
+ // Get list of parents for current family (nFamily)
+ sal_uInt32 nPos;
+ XMLFamilyData_Impl aTmp( nFamily );
+ XMLFamilyData_Impl *pFamily = 0;
+ if( maFamilyList.Seek_Entry( &aTmp, &nPos ) )
+ {
+ pFamily = maFamilyList.GetObject( nPos );
+ nCount = pFamily->mnCount;
+ }
+
+ DBG_ASSERT( pFamily,
+ "SvXMLAutoStylePool_Impl::exportXML: unknown family" );
+ if( pFamily && nCount > 0 )
+ {
+ /////////////////////////////////////////////////////////////////////////////////////
+ // create, initialize and fill helper-structure (SvXMLAutoStylePoolProperties_Impl)
+ // wich contains a parent-name and a SvXMLAutoStylePoolProperties_Impl
+ //
+ const SvXMLAutoStylePoolParentsP_Impl *pParents =
+ pFamily->mpParentList;
+
+ SvXMLAutoStylePoolPExport_Impl* aExpStyles =
+ new SvXMLAutoStylePoolPExport_Impl[nCount];
+
+ sal_uInt32 i;
+ for( i=0; i < nCount; i++ )
+ {
+ aExpStyles[i].mpParent = 0;
+ aExpStyles[i].mpProperties = 0;
+ }
+
+ sal_uInt32 nParents = pParents->Count();
+ for( i=0; i < nParents; i++ )
+ {
+ const SvXMLAutoStylePoolParentP_Impl* pParent =
+ pParents->GetObject( i );
+ sal_uInt32 nProperties = pParent->GetPropertiesList().Count();
+ for( sal_uInt32 j=0; j < nProperties; j++ )
+ {
+ const SvXMLAutoStylePoolPropertiesP_Impl *pProperties =
+ pParent->GetPropertiesList().GetObject( j );
+ sal_uInt32 nPos = pProperties->GetPos();
+ DBG_ASSERT( nPos < nCount,
+ "SvXMLAutoStylePool_Impl::exportXML: wrong position" );
+ if( nPos < nCount )
+ {
+ DBG_ASSERT( !aExpStyles[nPos].mpProperties,
+ "SvXMLAutoStylePool_Impl::exportXML: double position" );
+ aExpStyles[nPos].mpProperties = pProperties;
+ aExpStyles[nPos].mpParent = &pParent->GetParent();
+ }
+ }
+ }
+
+ /////////////////////////////////////////////////////////////////////////////////////
+ //
+ // create string to export for each XML-style. That means for each property-list
+ //
+ OUString aStrFamilyName = pFamily->maStrFamilyName;
+
+ for( i=0; i<nCount; i++ )
+ {
+ DBG_ASSERT( aExpStyles[i].mpProperties,
+ "SvXMLAutoStylePool_Impl::exportXML: empty position" );
+
+ if( aExpStyles[i].mpProperties )
+ {
+ OUString sName( rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_name) ) );
+ mpAttrList->AddAttribute( sName, msCDATA, aExpStyles[i].mpProperties->GetName() );
+
+ sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_family) );
+ mpAttrList->AddAttribute( sName, msCDATA, aStrFamilyName );
+
+ if( aExpStyles[i].mpParent->getLength() )
+ {
+ sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_parent_style_name) );
+ mpAttrList->AddAttribute( sName, msCDATA, *aExpStyles[i].mpParent );
+ }
+ sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_style) );
+
+ pAntiImpl->exportStyleAttributes( *mpAttrList, nFamily,
+ aExpStyles[i].mpProperties->GetProperties(),
+ rPropExp,
+ rUnitConverter, rNamespaceMap );
+
+ rHandler->ignorableWhitespace( msWS );
+ rHandler->startElement( sName, mxAttrList );
+ mpAttrList->Clear();
+
+ rPropExp.exportXML( rHandler, aExpStyles[i].mpProperties->GetProperties(), rUnitConverter,
+ rNamespaceMap, XML_EXPORT_FLAG_IGN_WS );
+
+ rHandler->ignorableWhitespace( msWS );
+ rHandler->endElement( sName );
+ }
+ }
+
+ delete aExpStyles;
+ }
+}
+
+void SvXMLAutoStylePoolP_Impl::ClearEntries()
+{
+ for(sal_uInt32 a = 0L; a < maFamilyList.Count(); a++)
+ maFamilyList[a]->ClearEntries();
+}
diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx
new file mode 100644
index 0000000000..9cbef72cad
--- /dev/null
+++ b/xmloff/source/style/impastpl.hxx
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * $RCSfile: impastpl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLASTPL_IMPL_HXX
+#define _XMLOFF_XMLASTPL_IMPL_HXX
+
+#ifndef _SAL_TYPES_H_
+#include <sal/types.h>
+#endif
+#ifndef _LIST_HXX
+#include <tools/list.hxx>
+#endif
+#ifndef _CNTRSRT_HXX
+#include <svtools/cntnrsrt.hxx>
+#endif
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
+#ifndef __SGI_STL_VECTOR
+#include <stl/vector>
+#endif
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+
+#ifndef _XMLOFF_PROPMAPPINGTYPES_HXX
+#include <maptype.hxx>
+#endif
+#ifndef _XMLOFF_XMLEXPPR_HXX
+#include <xmlexppr.hxx>
+#endif
+
+class XMLPropertySetMapper;
+class SvXMLAutoStylePoolP;
+class SvXMLAutoStylePoolParentsP_Impl;
+class SvXMLAutoStylePoolNamesP_Impl;
+class SvXMLAttributeList;
+class SvXMLExportPropertyMapper;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Implementationclass for stylefamily-information
+//
+
+class XMLFamilyData_Impl
+{
+public:
+ sal_uInt32 mnFamily;
+ ::rtl::OUString maStrFamilyName;
+ UniReference < XMLPropertySetMapper > mxMapper;
+
+ SvXMLAutoStylePoolParentsP_Impl* mpParentList;
+ SvXMLAutoStylePoolNamesP_Impl* mpNameList;
+ sal_uInt32 mnCount;
+ sal_uInt32 mnName;
+ ::rtl::OUString maStrPrefix;
+
+public:
+ XMLFamilyData_Impl( sal_Int32 nFamily, const ::rtl::OUString& rStrName,
+ const UniReference < XMLPropertySetMapper > & rMapper,
+ const ::rtl::OUString& rStrPrefix );
+ XMLFamilyData_Impl( sal_Int32 nFamily )
+ : mnFamily( nFamily ), mpParentList( NULL ),
+ mpNameList( NULL ), mnCount( 0 ), mnName( 0 )
+ {}
+ ~XMLFamilyData_Impl();
+
+ friend int XMLFamilyDataSort_Impl( const XMLFamilyData_Impl& r1, const XMLFamilyData_Impl& r2 );
+
+ void ClearEntries();
+};
+
+DECLARE_CONTAINER_SORT( XMLFamilyDataList_Impl, XMLFamilyData_Impl )
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//
+//
+
+DECLARE_CONTAINER_SORT_DEL( SvXMLAutoStylePoolNamesP_Impl,
+ ::rtl::OUString )
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Properties of a pool
+//
+
+class SvXMLAutoStylePoolPropertiesP_Impl
+{
+ ::rtl::OUString msName;
+ ::std::vector< XMLPropertyState > maProperties;
+ sal_uInt32 mnPos;
+
+public:
+
+ SvXMLAutoStylePoolPropertiesP_Impl( XMLFamilyData_Impl* pFamilyData, const ::std::vector< XMLPropertyState >& rProperties );
+
+ ~SvXMLAutoStylePoolPropertiesP_Impl()
+ {
+ }
+
+ const ::rtl::OUString& GetName() const { return msName; }
+ const ::std::vector< XMLPropertyState >& GetProperties() const { return maProperties; }
+ sal_uInt32 GetPos() const { return mnPos; }
+};
+
+typedef SvXMLAutoStylePoolPropertiesP_Impl *SvXMLAutoStylePoolPropertiesPPtr;
+DECLARE_LIST( SvXMLAutoStylePoolPropertiesPList_Impl, SvXMLAutoStylePoolPropertiesPPtr )
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Parents of AutoStylePool's
+//
+
+class SvXMLAutoStylePoolParentP_Impl
+{
+ ::rtl::OUString msParent;
+ SvXMLAutoStylePoolPropertiesPList_Impl maPropertiesList;
+
+public:
+
+ SvXMLAutoStylePoolParentP_Impl( const ::rtl::OUString & rParent ) :
+ msParent( rParent )
+ {
+ }
+
+ ~SvXMLAutoStylePoolParentP_Impl();
+
+ sal_Bool Add( XMLFamilyData_Impl* pFamilyData, const ::std::vector< XMLPropertyState >& rProperties, ::rtl::OUString& rName );
+
+ ::rtl::OUString Find( const XMLFamilyData_Impl* pFamilyData, const ::std::vector< XMLPropertyState >& rProperties ) const;
+
+ const ::rtl::OUString& GetParent() const { return msParent; }
+
+ const SvXMLAutoStylePoolPropertiesPList_Impl& GetPropertiesList() const
+ {
+ return maPropertiesList;
+ }
+};
+
+DECLARE_CONTAINER_SORT_DEL( SvXMLAutoStylePoolParentsP_Impl,
+ SvXMLAutoStylePoolParentP_Impl )
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Implementationclass of SvXMLAutoStylePool
+//
+
+class SvXMLAutoStylePoolP_Impl
+{
+ const ::rtl::OUString msCDATA;
+ const ::rtl::OUString msWS;
+ SvXMLAttributeList* mpAttrList;
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > mxAttrList;
+
+ XMLFamilyDataList_Impl maFamilyList;
+
+public:
+
+ SvXMLAutoStylePoolP_Impl();
+ ~SvXMLAutoStylePoolP_Impl();
+
+ void AddFamily( sal_Int32 nFamily, const ::rtl::OUString& rStrName,
+ const UniReference < XMLPropertySetMapper > & rMapper,
+ const ::rtl::OUString& rStrPrefix );
+
+ void RegisterName( sal_Int32 nFamily, const ::rtl::OUString& rName );
+
+ ::rtl::OUString Add( sal_Int32 nFamily, const ::rtl::OUString& rParent,
+ const ::std::vector< XMLPropertyState >& rProperties );
+ ::rtl::OUString Find( sal_Int32 nFamily, const ::rtl::OUString& rParent,
+ const ::std::vector< XMLPropertyState >& rProperties ) const;
+
+ void exportXML( sal_Int32 nFamily,
+ const SvXMLExportPropertyMapper& rPropExp,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ const SvXMLAutoStylePoolP *pAntiImpl) const;
+
+ void ClearEntries();
+};
+
+struct SvXMLAutoStylePoolPExport_Impl
+{
+ const ::rtl::OUString *mpParent;
+ const SvXMLAutoStylePoolPropertiesP_Impl *mpProperties;
+};
+
+#endif
diff --git a/xmloff/source/style/kernihdl.cxx b/xmloff/source/style/kernihdl.cxx
new file mode 100644
index 0000000000..109deb20f1
--- /dev/null
+++ b/xmloff/source/style/kernihdl.cxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * $RCSfile: kernihdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_KERNINGTYPES_HXX
+#include "kernihdl.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+// --
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include <xmlkywd.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLKerningPropHdl
+//
+
+XMLKerningPropHdl::~XMLKerningPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLKerningPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_True;
+ sal_Int32 nKerning = 0;
+
+ if( !rStrImpValue.compareToAscii( sXML_kerning_normal ) )
+ {
+ bRet = rUnitConverter.convertMeasure( nKerning, rStrImpValue );
+ }
+
+ rValue <<= nKerning;
+
+ return bRet;
+}
+
+sal_Bool XMLKerningPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int16 nValue;
+
+ if( rValue >>= nValue )
+ {
+ OUStringBuffer aOut;
+
+ if( nValue == 0 )
+ aOut.appendAscii( sXML_kerning_normal );
+ else
+ rUnitConverter.convertMeasure( aOut, nValue );
+
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
diff --git a/xmloff/source/style/kernihdl.hxx b/xmloff/source/style/kernihdl.hxx
new file mode 100644
index 0000000000..e8e580b220
--- /dev/null
+++ b/xmloff/source/style/kernihdl.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: kernihdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_KERNINGTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_KERNINGTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLKerningPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLKerningPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_KERNINGTYPES_HXX
diff --git a/xmloff/source/style/lspachdl.cxx b/xmloff/source/style/lspachdl.cxx
new file mode 100644
index 0000000000..879ad96f5d
--- /dev/null
+++ b/xmloff/source/style/lspachdl.cxx
@@ -0,0 +1,245 @@
+/*************************************************************************
+ *
+ * $RCSfile: lspachdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_LINESPACETYPES_HXX
+#include <lspachdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_LINESPACING_HPP_
+#include <com/sun/star/style/LineSpacing.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_LINESPACINGMODE_HPP_
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// this is a copy of defines in svx/inc/escpitem.hxx
+#define DFLT_ESC_PROP 58
+#define DFLT_ESC_AUTO_SUPER 101
+#define DFLT_ESC_AUTO_SUB -101
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLEscapementPropHdl
+//
+
+XMLLineHeightHdl::~XMLLineHeightHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLLineHeightHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ style::LineSpacing aLSp;
+ sal_Int32 nTemp = 0;
+
+ if( -1 != rStrImpValue.indexOf( sal_Unicode( '%' ) ) )
+ {
+ aLSp.Mode = style::LineSpacingMode::PROP;
+ if(!rUnitConverter.convertPercent( nTemp, rStrImpValue ))
+ return sal_False;
+ aLSp.Height = nTemp;
+ }
+ else if( rStrImpValue.compareToAscii( sXML_casemap_normal ) )
+ {
+ aLSp.Mode = style::LineSpacingMode::PROP;
+ aLSp.Height = 100;
+ }
+ else
+ {
+ aLSp.Mode = style::LineSpacingMode::FIX;
+ if(!rUnitConverter.convertMeasure( nTemp, rStrImpValue, 0x0000, 0xffff ))
+ return sal_False;
+ aLSp.Height = nTemp;
+ }
+
+ rValue <<= aLSp;
+ return sal_True;
+}
+
+sal_Bool XMLLineHeightHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut;
+
+ style::LineSpacing aLSp;
+ if(!(rValue >>= aLSp))
+ return sal_False;
+
+ if( style::LineSpacingMode::PROP != aLSp.Mode && style::LineSpacingMode::FIX != aLSp.Mode )
+ return sal_False;
+
+ if( style::LineSpacingMode::PROP == aLSp.Mode )
+ {
+ rUnitConverter.convertPercent( aOut, aLSp.Height );
+ }
+ else
+ {
+ rUnitConverter.convertMeasure( aOut, aLSp.Height );
+ }
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return rStrExpValue.getLength() != 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLLineHeightAtLeastHdl
+//
+
+XMLLineHeightAtLeastHdl::~XMLLineHeightAtLeastHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLLineHeightAtLeastHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ style::LineSpacing aLSp;
+
+ sal_Int32 nTemp;
+ aLSp.Mode = style::LineSpacingMode::MINIMUM;
+ if(!rUnitConverter.convertMeasure( nTemp, rStrImpValue, 0x0000, 0xffff ))
+ return sal_False;
+ aLSp.Height = nTemp;
+
+ rValue <<= aLSp;
+ return sal_True;
+}
+
+sal_Bool XMLLineHeightAtLeastHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut;
+
+ style::LineSpacing aLSp;
+ if(!(rValue >>= aLSp))
+ return sal_False;
+
+ if( style::LineSpacingMode::MINIMUM != aLSp.Mode )
+ return sal_False;
+
+ rUnitConverter.convertMeasure( aOut, aLSp.Height );
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return rStrExpValue.getLength() != 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLLineSpacingHdl
+//
+
+XMLLineSpacingHdl::~XMLLineSpacingHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLLineSpacingHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ style::LineSpacing aLSp;
+ sal_Int32 nTemp;
+
+ aLSp.Mode = style::LineSpacingMode::LEADING;
+ if(!rUnitConverter.convertMeasure( nTemp, rStrImpValue, 0x0000, 0xffff ))
+ return sal_False;
+ aLSp.Height = nTemp;
+
+ rValue <<= aLSp;
+ return sal_True;
+}
+
+sal_Bool XMLLineSpacingHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut;
+
+ style::LineSpacing aLSp;
+ if(!(rValue >>= aLSp))
+ return sal_False;
+
+ if( style::LineSpacingMode::LEADING != aLSp.Mode )
+ return sal_False;
+
+ rUnitConverter.convertMeasure( aOut, aLSp.Height );
+
+ rStrExpValue = aOut.makeStringAndClear();
+ return rStrExpValue.getLength() != 0;
+}
diff --git a/xmloff/source/style/lspachdl.hxx b/xmloff/source/style/lspachdl.hxx
new file mode 100644
index 0000000000..e37fcca69d
--- /dev/null
+++ b/xmloff/source/style/lspachdl.hxx
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * $RCSfile: lspachdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_LINESPACETYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_LINESPACETYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLLineHeightHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLLineHeightHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+class XMLLineHeightAtLeastHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLLineHeightAtLeastHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+class XMLLineSpacingHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLLineSpacingHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_CHARHEIGHTTYPES_HXX
+
diff --git a/xmloff/source/style/makefile.mk b/xmloff/source/style/makefile.mk
new file mode 100644
index 0000000000..f7e10f4fee
--- /dev/null
+++ b/xmloff/source/style/makefile.mk
@@ -0,0 +1,207 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=xmloff
+TARGET=style
+AUTOSEG=true
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+CXXFILES = \
+ xmlastpl.cxx \
+ xmlexpit.cxx \
+ xmlimpit.cxx \
+ xmlitem.cxx \
+ xmlitmpr.cxx \
+ xmlnumfe.cxx \
+ xmlnumfi.cxx \
+ xmlstyle.cxx \
+ xmltabi.cxx \
+ xmlnumi.cxx \
+ xmlnume.cxx \
+ xmltabe.cxx \
+ xmlaustp.cxx \
+ impastp1.cxx \
+ impastp2.cxx \
+ impastp3.cxx \
+ impastp4.cxx \
+ xmlprmap.cxx \
+ xmlexppr.cxx \
+ xmlimppr.cxx \
+ xmlprcon.cxx \
+ prhdlfac.cxx \
+ xmlprhdl.cxx \
+ xmlbahdl.cxx \
+ uniref.cxx \
+ shadwhdl.cxx \
+ splithdl.cxx \
+ shdwdhdl.cxx \
+ kernihdl.cxx \
+ opaquhdl.cxx \
+ adjushdl.cxx \
+ backhdl.cxx \
+ breakhdl.cxx \
+ cdouthdl.cxx \
+ csmaphdl.cxx \
+ fonthdl.cxx \
+ postuhdl.cxx \
+ tabsthdl.cxx \
+ undlihdl.cxx \
+ weighhdl.cxx \
+ prstylei.cxx \
+ styleexp.cxx \
+ escphdl.cxx \
+ chrhghdl.cxx \
+ chrlohdl.cxx \
+ lspachdl.cxx \
+ bordrhdl.cxx \
+ EnumPropertyHdl.cxx \
+ NamedBoolPropertyHdl.cxx \
+ bordrhdl.cxx \
+ numehelp.cxx \
+ FillStyleContext.cxx \
+ GradientStyle.cxx \
+ HatchStyle.cxx \
+ ImageStyle.cxx \
+ TransGradientStyle.cxx \
+ MarkerStyle.cxx \
+ DashStyle.cxx \
+ XMLElementPropertyContext.cxx \
+ XMLEnumPropertyHandler.cxx \
+ XMLClipPropertyHandler.cxx
+
+
+SLOFILES = \
+ $(SLO)$/xmlastpl.obj \
+ $(SLO)$/xmlexpit.obj \
+ $(SLO)$/xmlimpit.obj \
+ $(SLO)$/xmlitem.obj \
+ $(SLO)$/xmlitmpr.obj \
+ $(SLO)$/xmlnumfe.obj \
+ $(SLO)$/xmlnumfi.obj \
+ $(SLO)$/xmlstyle.obj \
+ $(SLO)$/xmltabi.obj \
+ $(SLO)$/xmlnumi.obj \
+ $(SLO)$/xmlnume.obj \
+ $(SLO)$/xmltabe.obj \
+ $(SLO)$/xmlaustp.obj \
+ $(SLO)$/impastp1.obj \
+ $(SLO)$/impastp2.obj \
+ $(SLO)$/impastp3.obj \
+ $(SLO)$/impastp4.obj \
+ $(SLO)$/xmlprmap.obj \
+ $(SLO)$/xmlexppr.obj \
+ $(SLO)$/xmlimppr.obj \
+ $(SLO)$/xmlprcon.obj \
+ $(SLO)$/prhdlfac.obj \
+ $(SLO)$/xmlprhdl.obj \
+ $(SLO)$/xmlbahdl.obj \
+ $(SLO)$/uniref.obj \
+ $(SLO)$/shadwhdl.obj \
+ $(SLO)$/splithdl.obj \
+ $(SLO)$/shdwdhdl.obj \
+ $(SLO)$/kernihdl.obj \
+ $(SLO)$/opaquhdl.obj \
+ $(SLO)$/adjushdl.obj \
+ $(SLO)$/backhdl.obj \
+ $(SLO)$/breakhdl.obj \
+ $(SLO)$/cdouthdl.obj \
+ $(SLO)$/csmaphdl.obj \
+ $(SLO)$/fonthdl.obj \
+ $(SLO)$/postuhdl.obj \
+ $(SLO)$/tabsthdl.obj \
+ $(SLO)$/undlihdl.obj \
+ $(SLO)$/weighhdl.obj \
+ $(SLO)$/prstylei.obj \
+ $(SLO)$/styleexp.obj \
+ $(SLO)$/escphdl.obj \
+ $(SLO)$/chrhghdl.obj \
+ $(SLO)$/chrlohdl.obj \
+ $(SLO)$/lspachdl.obj \
+ $(SLO)$/bordrhdl.obj \
+ $(SLO)$/EnumPropertyHdl.obj \
+ $(SLO)$/NamedBoolPropertyHdl.obj \
+ $(SLO)$/numehelp.obj \
+ $(SLO)$/FillStyleContext.obj \
+ $(SLO)$/GradientStyle.obj \
+ $(SLO)$/HatchStyle.obj \
+ $(SLO)$/ImageStyle.obj \
+ $(SLO)$/TransGradientStyle.obj \
+ $(SLO)$/MarkerStyle.obj \
+ $(SLO)$/DashStyle.obj \
+ $(SLO)$/XMLElementPropertyContext.obj \
+ $(SLO)$/XMLEnumPropertyHandler.obj \
+ $(SLO)$/XMLClipPropertyHandler.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
new file mode 100644
index 0000000000..71f4c4acf2
--- /dev/null
+++ b/xmloff/source/style/numehelp.cxx
@@ -0,0 +1,306 @@
+/*************************************************************************
+ *
+ * $RCSfile: numehelp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "numehelp.hxx"
+
+#include "nmspmap.hxx"
+#include "xmlnmspe.hxx"
+#include "xmlkywd.hxx"
+#include "xmluconv.hxx"
+
+#ifndef _XMLOFF_XMLEXP_HXX
+#include "xmlexp.hxx"
+#endif
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
+#ifndef _TOOLS_INTN_HXX
+#include <tools/intn.hxx>
+#endif
+#ifndef _ZFORLIST_HXX
+#include <svtools/zforlist.hxx>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_NUMBERFORMAT_HPP_
+#include <com/sun/star/util/NumberFormat.hpp>
+#endif
+#ifndef _TOOLS_SOLMATH_HXX
+#include <tools/solmath.hxx>
+#endif
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+using namespace com::sun::star;
+
+#define XML_TYPE "Type"
+#define XML_CURRENCYSYMBOL "CurrencySymbol"
+#define XML_CURRENCYEXTENSION "CurrencyExtension"
+#define XML_STANDARDFORMAT "StandardFormat"
+
+sal_Bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int32 nNumberFormat, rtl::OUString& sCurrencySymbol,
+ uno::Reference <util::XNumberFormatsSupplier>& xNumberFormatsSupplier)
+{
+ if (xNumberFormatsSupplier.is())
+ {
+ uno::Reference <util::XNumberFormats> xNumberFormats = xNumberFormatsSupplier->getNumberFormats();
+ if (xNumberFormats.is())
+ {
+ uno::Reference <beans::XPropertySet> xNumberPropertySet = xNumberFormats->getByKey(nNumberFormat);
+ uno::Any aCurrencySymbol = xNumberPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_CURRENCYSYMBOL)));
+ uno::Any aCurrencyExtension = xNumberPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_CURRENCYEXTENSION)));
+ if ( aCurrencySymbol >>= sCurrencySymbol)
+ {
+ rtl::OUString sCurrencyExtension;
+ if ( aCurrencyExtension >>= sCurrencyExtension)
+ {
+ if ( sCurrencyExtension.getLength() != 0 )
+ {
+ International IntTest((sCurrencyExtension.toInt32(16) * -1));
+ sCurrencySymbol = rtl::OUString(IntTest.GetCurrBankSymbol());
+ return sal_True;
+ }
+ else
+ {
+ if ( sCurrencySymbol.getLength() == 1 && sCurrencySymbol.toChar() == NfCurrencyEntry::GetEuroSymbol() )
+ sCurrencySymbol = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EUR"));
+ return sal_True;
+ }
+ }
+ else
+ return sal_True;
+ }
+ }
+ }
+ return sal_False;
+}
+
+
+sal_Int16 XMLNumberFormatAttributesExportHelper::GetCellType(const sal_Int32 nNumberFormat, sal_Bool& bIsStandard,
+ uno::Reference <util::XNumberFormatsSupplier>& xNumberFormatsSupplier)
+{
+ if (xNumberFormatsSupplier.is())
+ {
+ uno::Reference <util::XNumberFormats> xNumberFormats = xNumberFormatsSupplier->getNumberFormats();
+ if (xNumberFormats.is())
+ {
+ uno::Reference <beans::XPropertySet> xNumberPropertySet = xNumberFormats->getByKey(nNumberFormat);
+ uno::Any aIsStandardFormat = xNumberPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STANDARDFORMAT)));
+ aIsStandardFormat >>= bIsStandard;
+ uno::Any aNumberFormat = xNumberPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_TYPE)));
+ sal_Int16 nNumberFormat;
+ if ( aNumberFormat >>= nNumberFormat )
+ {
+ return nNumberFormat;
+ }
+ }
+ }
+ return 0;
+}
+
+void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(SvXMLExport& rXMLExport,
+ const sal_Int32 nNumberFormat, const double& fValue, sal_uInt16 nNamespace, sal_Bool bExportValue)
+{
+ sal_Bool bIsStandard;
+ sal_Int16 nTypeKey = GetCellType(nNumberFormat, bIsStandard, rXMLExport.GetNumberFormatsSupplier());
+ sal_Bool bWasSetTypeAttribute = sal_False;
+ switch(nTypeKey & ~util::NumberFormat::DEFINED)
+ {
+ case util::NumberFormat::NUMBER:
+ case util::NumberFormat::SCIENTIFIC:
+ case util::NumberFormat::FRACTION:
+ {
+ if (!bWasSetTypeAttribute)
+ {
+ rXMLExport.AddAttributeASCII(nNamespace, sXML_value_type, sXML_float);
+ bWasSetTypeAttribute = sal_True;
+ }
+ } // No Break
+ case util::NumberFormat::PERCENT:
+ {
+ if (!bWasSetTypeAttribute)
+ {
+ rXMLExport.AddAttributeASCII(nNamespace, sXML_value_type, sXML_percentage);
+ bWasSetTypeAttribute = sal_True;
+ }
+ } // No Break
+ case util::NumberFormat::CURRENCY:
+ {
+ if (!bWasSetTypeAttribute)
+ {
+ rXMLExport.AddAttributeASCII(nNamespace, sXML_value_type, sXML_currency);
+ rtl::OUString sCurrencySymbol;
+ if ( GetCurrencySymbol(nNumberFormat, sCurrencySymbol, rXMLExport.GetNumberFormatsSupplier()))
+ {
+ if (sCurrencySymbol.getLength() > 0)
+ rXMLExport.AddAttribute(nNamespace, sXML_currency, sCurrencySymbol);
+ }
+ bWasSetTypeAttribute = sal_True;
+ }
+
+ if (bExportValue)
+ {
+ String sValue;
+ SolarMath::DoubleToString(sValue, fValue, 'A', INT_MAX, '.', sal_True);
+ rXMLExport.AddAttribute(nNamespace, sXML_value, sValue);
+ }
+ }
+ break;
+ case util::NumberFormat::DATE:
+ case util::NumberFormat::DATETIME:
+ {
+ if (!bWasSetTypeAttribute)
+ {
+ rXMLExport.AddAttributeASCII(nNamespace, sXML_value_type, sXML_date);
+ bWasSetTypeAttribute = sal_True;
+ }
+ if (bExportValue)
+ {
+ if ( rXMLExport.GetMM100UnitConverter().setNullDate(rXMLExport.GetModel()) )
+ {
+ rtl::OUStringBuffer sBuffer;
+ rXMLExport.GetMM100UnitConverter().convertDateTime(sBuffer, fValue);
+ rtl::OUString sOUValue = sBuffer.makeStringAndClear();
+ rXMLExport.AddAttribute(nNamespace, sXML_date_value, sOUValue);
+ }
+ }
+ }
+ break;
+ case util::NumberFormat::TIME:
+ {
+ if (!bWasSetTypeAttribute)
+ {
+ rXMLExport.AddAttributeASCII(nNamespace, sXML_value_type, sXML_time);
+ bWasSetTypeAttribute = sal_True;
+ }
+ if (bExportValue)
+ {
+ rtl::OUStringBuffer sBuffer;
+ rXMLExport.GetMM100UnitConverter().convertTime(sBuffer, fValue);
+ rtl::OUString sOUValue = sBuffer.makeStringAndClear();
+ rXMLExport.AddAttribute(nNamespace, sXML_time_value, sOUValue);
+ }
+ }
+ break;
+ case util::NumberFormat::LOGICAL:
+ {
+ if (!bWasSetTypeAttribute)
+ {
+ rXMLExport.AddAttributeASCII(nNamespace, sXML_value_type, sXML_boolean);
+ bWasSetTypeAttribute = sal_True;
+ }
+ if (bExportValue)
+ {
+ rtl::OUString sOUValue;
+ double fTempValue = fValue;
+ if (SolarMath::ApproxEqual( fTempValue, 1.0 ))
+ {
+ sOUValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_true));
+ }
+ else
+ {
+ if (SolarMath::ApproxEqual( fValue, 0.0 ))
+ {
+ sOUValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_false));
+ }
+ else
+ {
+ String sValue;
+ SolarMath::DoubleToString(sValue, fTempValue, 'A', INT_MAX, '.', sal_True);
+ sOUValue = sValue;
+ }
+ }
+ rXMLExport.AddAttribute(nNamespace, sXML_boolean_value, sOUValue);
+ }
+ }
+ break;
+ case util::NumberFormat::TEXT:
+ {
+ if (!bWasSetTypeAttribute)
+ {
+ rXMLExport.AddAttributeASCII(nNamespace, sXML_value_type, sXML_float);
+ bWasSetTypeAttribute = sal_True;
+ if (bExportValue)
+ {
+ String sValue;
+ SolarMath::DoubleToString(sValue, fValue, 'A', INT_MAX, '.', sal_True);
+ rXMLExport.AddAttribute(nNamespace, sXML_value, sValue);
+ }
+ }
+ }
+ break;
+ }
+
+}
+
+void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(SvXMLExport& rXMLExport,
+ const rtl::OUString& sValue, const rtl::OUString& sCharacters, sal_uInt16 nNamespace, sal_Bool bExportValue)
+{
+ rXMLExport.AddAttributeASCII(nNamespace, sXML_value_type, sXML_string);
+ if (bExportValue)
+ {
+ if (sValue != sCharacters)
+ rXMLExport.AddAttribute(nNamespace, sXML_string_value, sValue);
+ }
+}
+
diff --git a/xmloff/source/style/opaquhdl.cxx b/xmloff/source/style/opaquhdl.cxx
new file mode 100644
index 0000000000..b4173f638b
--- /dev/null
+++ b/xmloff/source/style/opaquhdl.cxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: opaquhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_OPAQUETYPES_HXX
+#include "opaquhdl.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+// --
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include <xmlkywd.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLOpaquePropHdl
+//
+
+XMLOpaquePropHdl::~XMLOpaquePropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLOpaquePropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_True;
+
+ sal_Bool bValue = rStrImpValue.compareToAscii( sXML_opaque_foreground );
+ rValue <<= sal_Bool(bValue);
+ bRet = sal_True;
+
+ return bRet;
+}
+
+sal_Bool XMLOpaquePropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Bool bValue;
+
+ if (rValue >>= bValue)
+ {
+ if( bValue )
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_opaque_foreground ) );
+ else
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_opaque_background ) );
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
diff --git a/xmloff/source/style/opaquhdl.hxx b/xmloff/source/style/opaquhdl.hxx
new file mode 100644
index 0000000000..a16a936787
--- /dev/null
+++ b/xmloff/source/style/opaquhdl.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: opaquhdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_OPAQUETYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_OPAQUETYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLOpaquePropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLOpaquePropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_OPAQUETYPES_HXX
diff --git a/xmloff/source/style/postuhdl.cxx b/xmloff/source/style/postuhdl.cxx
new file mode 100644
index 0000000000..a7f537cc6e
--- /dev/null
+++ b/xmloff/source/style/postuhdl.cxx
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * $RCSfile: postuhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_POSTURETYPES_HXX
+#include <postuhdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_FONTSLANT_HPP_
+#include <com/sun/star/awt/FontSlant.hpp>
+#endif
+
+#ifndef _VCL_VCLENUM_HXX
+#include <vcl/vclenum.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+SvXMLEnumMapEntry __READONLY_DATA aPostureGenericMapping[] =
+{
+ { sXML_posture_normal, ITALIC_NONE },
+ { sXML_posture_italic, ITALIC_NORMAL },
+ { sXML_posture_oblique, ITALIC_OBLIQUE },
+ { 0, 0 }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLPosturePropHdl
+//
+
+XMLPosturePropHdl::~XMLPosturePropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLPosturePropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt16 ePosture;
+
+ if( ( bRet = rUnitConverter.convertEnum( ePosture, rStrImpValue, aPostureGenericMapping ) ) )
+ rValue <<= (awt::FontSlant)ePosture;
+
+ return bRet;
+}
+
+sal_Bool XMLPosturePropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ OUStringBuffer aOut;
+ awt::FontSlant eSlant;
+
+ if( !( rValue >>= eSlant ) )
+ {
+ sal_Int32 nValue;
+
+ if( !( rValue >>= nValue ) )
+ return sal_False;
+
+ eSlant = (awt::FontSlant)nValue;
+ }
+
+ if( ( bRet = rUnitConverter.convertEnum( aOut, (sal_Int32)eSlant, aPostureGenericMapping ) ) )
+ rStrExpValue = aOut.makeStringAndClear();
+
+ return bRet;
+}
+
diff --git a/xmloff/source/style/postuhdl.hxx b/xmloff/source/style/postuhdl.hxx
new file mode 100644
index 0000000000..3dafca98fe
--- /dev/null
+++ b/xmloff/source/style/postuhdl.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: postuhdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_POSTURETYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_POSTURETYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLPosturePropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLPosturePropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_POSTURETYPES_HXX
diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx
new file mode 100644
index 0000000000..cdb6c2fc65
--- /dev/null
+++ b/xmloff/source/style/prhdlfac.cxx
@@ -0,0 +1,341 @@
+/*************************************************************************
+ *
+ * $RCSfile: prhdlfac.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLERFACTORY_HXX
+#include <prhdlfac.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLTYPES_HXX
+#include "xmltypes.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
+#include "xmlbahdl.hxx"
+#endif
+
+#ifndef _XMLOFF_NAMEDBOOLPROPERTYHANDLER_HXX
+#include "NamedBoolPropertyHdl.hxx"
+#endif
+
+#ifndef _XMLOFF_PROPERTYHANDLER_CROSSEDOUTTYPES_HXX
+#include "cdouthdl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_CASEMAPTYPES_HXX
+#include "csmaphdl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX
+#include "fonthdl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_KERNINGTYPES_HXX
+#include "kernihdl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_POSTURETYPES_HXX
+#include <postuhdl.hxx>
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_SHADOWTYPES_HXX
+#include "shadwhdl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_SHADOWEDTYPES_HXX
+#include "shdwdhdl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_UNDERLINETYPES_HXX
+#include "undlihdl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_FONTWEIGHTTYPES_HXX
+#include "weighhdl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_FMTSPLITTYPES_HXX
+#include "splithdl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_BREAKTYPES_HXX
+#include "breakhdl.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_ADJUSTTYPES_HXX
+#include <adjushdl.hxx>
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_ESCAPETYPES_HXX
+#include <escphdl.hxx>
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_CHARHEIGHTTYPES_HXX
+#include <chrhghdl.hxx>
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_CHARLOCALETYPES_HXX
+#include <chrlohdl.hxx>
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_LINESPACETYPES_HXX
+#include <lspachdl.hxx>
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_BORDERTYPES_HXX
+#include <bordrhdl.hxx>
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_TABSTOPTYPES_HXX
+#include <tabsthdl.hxx>
+#endif
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Dtor
+//
+XMLPropertyHandlerFactory::~XMLPropertyHandlerFactory()
+{
+ for( CacheMap::iterator pPos = maHandlerCache.begin(); pPos != maHandlerCache.end(); pPos++ )
+ delete pPos->second;
+}
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Interface
+//
+const XMLPropertyHandler* XMLPropertyHandlerFactory::GetPropertyHandler( sal_Int32 nType ) const
+{
+ DBG_ASSERT( (nType & ~((sal_uInt32)MID_FLAG_MASK)) == 0,
+ "GetPropertyHandler called with flags in type" );
+ return GetBasicHandler( nType );
+}
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Helper-methods to create and cache PropertyHandler
+//
+XMLPropertyHandler* XMLPropertyHandlerFactory::GetHdlCache( sal_Int32 nType ) const
+{
+ XMLPropertyHandler* pRet = NULL;
+
+ if( maHandlerCache.find( nType ) != maHandlerCache.end() )
+ pRet = maHandlerCache.find( nType )->second;
+
+ return pRet;
+}
+
+void XMLPropertyHandlerFactory::PutHdlCache( sal_Int32 nType, const XMLPropertyHandler* pHdl ) const
+{
+ // Don't be wondered about the following construct. The sense is to be able to provide a const-
+ // method as class-interface.
+ ((XMLPropertyHandlerFactory*)this)->maHandlerCache[ nType ] = (XMLPropertyHandler*)pHdl;
+}
+
+const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32 nType ) const
+{
+ XMLPropertyHandler* pPropHdl = GetHdlCache( nType );
+
+ if( !pPropHdl )
+ {
+ switch( nType )
+ {
+ case XML_TYPE_BOOL :
+ pPropHdl = new XMLBoolPropHdl;
+ break;
+ case XML_TYPE_MEASURE :
+ pPropHdl = new XMLMeasurePropHdl( 4 );
+ break;
+ case XML_TYPE_MEASURE8 :
+ pPropHdl = new XMLMeasurePropHdl( 1 );
+ break;
+ case XML_TYPE_MEASURE16:
+ pPropHdl = new XMLMeasurePropHdl( 2 );
+ break;
+ case XML_TYPE_PERCENT :
+ pPropHdl = new XMLPercentPropHdl( 4 );
+ break;
+ case XML_TYPE_PERCENT8 :
+ pPropHdl = new XMLPercentPropHdl( 1 );
+ break;
+ case XML_TYPE_PERCENT16 :
+ pPropHdl = new XMLPercentPropHdl( 2 );
+ break;
+ case XML_TYPE_STRING :
+ pPropHdl = new XMLStringPropHdl;
+ break;
+ case XML_TYPE_COLOR :
+ pPropHdl = new XMLColorPropHdl;
+ break;
+ case XML_TYPE_NUMBER :
+ pPropHdl = new XMLNumberPropHdl( 4 );
+ break;
+ case XML_TYPE_NUMBER8 :
+ pPropHdl = new XMLNumberPropHdl( 1 );
+ break;
+ case XML_TYPE_NUMBER16:
+ pPropHdl = new XMLNumberPropHdl( 2 );
+ break;
+ case XML_TYPE_NUMBER_NONE :
+ pPropHdl = new XMLNumberNonePropHdl;
+ break;
+ case XML_TYPE_DOUBLE :
+ pPropHdl = new XMLDoublePropHdl;
+ break;
+ case XML_TYPE_NBOOL :
+ pPropHdl = new XMLNBoolPropHdl;
+ break;
+
+ case XML_TYPE_TEXT_CROSSEDOUT:
+ pPropHdl = new XMLCrossedOutPropHdl ;
+ break;
+ case XML_TYPE_TEXT_BOOLCROSSEDOUT:
+ {
+ ::rtl::OUString aStrTrueString( RTL_CONSTASCII_USTRINGPARAM( sXML_crossedout_single ) );
+ ::rtl::OUString aStrFalseString( RTL_CONSTASCII_USTRINGPARAM( sXML_crossedout_none ) );
+ pPropHdl = new XMLNamedBoolPropertyHdl( aStrTrueString, aStrFalseString );
+ }
+ break;
+ case XML_TYPE_TEXT_ESCAPEMENT:
+ pPropHdl = new XMLEscapementPropHdl;
+ break;
+ case XML_TYPE_TEXT_ESCAPEMENT_HEIGHT:
+ pPropHdl = new XMLEscapementHeightPropHdl;
+ break;
+ case XML_TYPE_TEXT_CASEMAP:
+ pPropHdl = new XMLCaseMapPropHdl;
+ break;
+ case XML_TYPE_TEXT_CASEMAP_VAR:
+ pPropHdl = new XMLCaseMapVariantHdl;
+ break;
+ case XML_TYPE_TEXT_FONTFAMILYNAME:
+ pPropHdl = new XMLFontFamilyNamePropHdl;
+ break;
+ case XML_TYPE_TEXT_FONTFAMILY:
+ pPropHdl = new XMLFontFamilyPropHdl;
+ break;
+ case XML_TYPE_TEXT_FONTENCODING:
+ pPropHdl = new XMLFontEncodingPropHdl;
+ break;
+ case XML_TYPE_TEXT_FONTPITCH:
+ pPropHdl = new XMLFontPitchPropHdl;
+ break;
+ case XML_TYPE_TEXT_KERNING:
+ pPropHdl = new XMLKerningPropHdl;
+ break;
+ case XML_TYPE_TEXT_POSTURE:
+ pPropHdl = new XMLPosturePropHdl;
+ break;
+ case XML_TYPE_TEXT_SHADOWED:
+ pPropHdl = new XMLShadowedPropHdl;
+ break;
+ case XML_TYPE_TEXT_UNDERLINE:
+ pPropHdl = new XMLUnderlinePropHdl;
+ break;
+ case XML_TYPE_TEXT_WEIGHT:
+ pPropHdl = new XMLFontWeightPropHdl;
+ break;
+ case XML_TYPE_TEXT_SPLIT:
+ pPropHdl = new XMLFmtSplitPropHdl;
+ break;
+ case XML_TYPE_TEXT_BREAKBEFORE:
+ pPropHdl = new XMLFmtBreakBeforePropHdl;
+ break;
+ case XML_TYPE_TEXT_BREAKAFTER:
+ pPropHdl = new XMLFmtBreakAfterPropHdl;
+ break;
+ case XML_TYPE_TEXT_SHADOW:
+ pPropHdl = new XMLShadowPropHdl;
+ break;
+ case XML_TYPE_TEXT_ADJUST:
+ pPropHdl = new XMLParaAdjustPropHdl;
+ break;
+ case XML_TYPE_TEXT_ADJUSTLAST:
+ pPropHdl = new XMLLastLineAdjustPropHdl;
+ break;
+ case XML_TYPE_CHAR_HEIGHT:
+ pPropHdl = new XMLCharHeightHdl;
+ break;
+ case XML_TYPE_CHAR_HEIGHT_PROP:
+ pPropHdl = new XMLCharHeightPropHdl;
+ break;
+ case XML_TYPE_CHAR_LANGUAGE:
+ pPropHdl = new XMLCharLanguageHdl;
+ break;
+ case XML_TYPE_CHAR_COUNTRY:
+ pPropHdl = new XMLCharCountryHdl;
+ break;
+ case XML_TYPE_LINE_SPACE_FIXED:
+ pPropHdl = new XMLLineHeightHdl;
+ break;
+ case XML_TYPE_LINE_SPACE_MINIMUM:
+ pPropHdl = new XMLLineHeightAtLeastHdl;
+ break;
+ case XML_TYPE_LINE_SPACE_DISTANCE:
+ pPropHdl = new XMLLineSpacingHdl;
+ break;
+ case XML_TYPE_BORDER_WIDTH:
+ pPropHdl = new XMLBorderWidthHdl;
+ break;
+ case XML_TYPE_BORDER:
+ pPropHdl = new XMLBorderHdl;
+ break;
+ case XML_TYPE_TEXT_TABSTOP:
+ pPropHdl = new XMLTabStopPropHdl;
+ break;
+ }
+
+ if( pPropHdl )
+ PutHdlCache( nType, pPropHdl );
+ }
+
+ return pPropHdl;
+}
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
new file mode 100644
index 0000000000..102aebaa13
--- /dev/null
+++ b/xmloff/source/style/prstylei.cxx
@@ -0,0 +1,317 @@
+/*************************************************************************
+ *
+ * $RCSfile: prstylei.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLPROPERTYSETCONTEXT_HXX
+#include "xmlprcon.hxx"
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_
+#include <com/sun/star/style/XStyle.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
+#include <com/sun/star/beans/XPropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_PRSTYLEI_HXX
+#include "prstylei.hxx"
+#endif
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include "attrlist.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::lang;
+
+
+void XMLPropStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
+ const OUString& rLocalName,
+ const OUString& rValue )
+{
+ if( XML_NAMESPACE_STYLE == nPrefixKey &&
+ rLocalName.compareToAscii( sXML_family ) == 0 )
+ {
+ SetFamily( ((SvXMLStylesContext *)&xStyles)->GetFamily( rValue ) );
+ }
+ else
+ {
+ SvXMLStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
+ }
+}
+
+TYPEINIT1( XMLPropStyleContext, SvXMLStyleContext );
+
+XMLPropStyleContext::XMLPropStyleContext( SvXMLImport& rImport,
+ sal_uInt16 nPrfx, const OUString& rLName,
+ const Reference< XAttributeList > & xAttrList,
+ SvXMLStylesContext& rStyles ) :
+ SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList ),
+ xStyles( &rStyles ),
+ sIsPhysical( RTL_CONSTASCII_USTRINGPARAM( "IsPhysical" ) ),
+ sFollowStyle( RTL_CONSTASCII_USTRINGPARAM( "FollowStyle" ) )
+{
+}
+
+XMLPropStyleContext::~XMLPropStyleContext()
+{
+}
+
+SvXMLImportContext *XMLPropStyleContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const Reference< XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ if( XML_NAMESPACE_STYLE == nPrefix &&
+ rLocalName.compareToAscii( sXML_properties ) == 0 )
+ {
+ UniReference < SvXMLImportPropertyMapper > xImpPrMap =
+ ((SvXMLStylesContext *)&xStyles)->GetImportPropertyMapper(
+ GetFamily() );
+ if( xImpPrMap.is() )
+ pContext = new SvXMLPropertySetContext( GetImport(), nPrefix,
+ rLocalName, xAttrList,
+ aProperties,
+ xImpPrMap );
+ }
+
+ if( !pContext )
+ pContext = SvXMLStyleContext::CreateChildContext( nPrefix, rLocalName,
+ xAttrList );
+
+ return pContext;
+}
+
+void XMLPropStyleContext::FillPropertySet(
+ const Reference< XPropertySet > & rPropSet )
+{
+ UniReference < SvXMLImportPropertyMapper > xImpPrMap =
+ ((SvXMLStylesContext *)&xStyles)->GetImportPropertyMapper(
+ GetFamily() );
+ DBG_ASSERT( xImpPrMap.is(), "There is the import prop mapper" );
+ if( xImpPrMap.is() )
+ xImpPrMap->getPropertySetMapper()->FillPropertySet( aProperties,
+ rPropSet );
+}
+
+Reference < XStyle > XMLPropStyleContext::Create()
+{
+ Reference < XStyle > xNewStyle;
+
+ OUString sServiceName(
+ ((SvXMLStylesContext *)&xStyles)->GetServiceName( GetFamily() ) );
+ if( sServiceName.getLength() )
+ {
+ Reference< XMultiServiceFactory > xFactory( GetImport().GetModel(),
+ UNO_QUERY );
+ if( xFactory.is() )
+ {
+ Reference < XInterface > xIfc =
+ xFactory->createInstance( sServiceName );
+ if( xIfc.is() )
+ xNewStyle = Reference < XStyle >( xIfc, UNO_QUERY );
+ }
+ }
+
+ return xNewStyle;
+}
+
+void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite )
+{
+ const OUString& rName = GetName();
+ if( 0 == rName.getLength() )
+ return;
+
+ Reference < XNameContainer > xFamilies =
+ ((SvXMLStylesContext *)&xStyles)->GetStylesContainer( GetFamily() );
+ if( !xFamilies.is() )
+ return;
+
+ sal_Bool bNew = sal_False;
+ if( xFamilies->hasByName( rName ) )
+ {
+ Any aAny = xFamilies->getByName( rName );
+ aAny >>= xStyle;
+ }
+ else
+ {
+ xStyle = Create();
+ if( !xStyle.is() )
+ return;
+
+ Any aAny;
+ aAny <<= xStyle;
+ xFamilies->insertByName( rName, aAny );
+ bNew = sal_True;
+ }
+
+ Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+ if( !bNew && xPropSetInfo->hasPropertyByName( sIsPhysical ) )
+ {
+ Any aAny = xPropSet->getPropertyValue( sIsPhysical );
+ bNew = !*(sal_Bool *)aAny.getValue();
+ }
+
+ if( bOverwrite || bNew )
+ {
+ Reference< XPropertyState > xPropState( xPropSet, uno::UNO_QUERY );
+
+ UniReference < XMLPropertySetMapper > xPrMap;
+ UniReference < SvXMLImportPropertyMapper > xImpPrMap =
+ ((SvXMLStylesContext *)&xStyles)->GetImportPropertyMapper(
+ GetFamily() );
+ DBG_ASSERT( xImpPrMap.is(), "There is the import prop mapper" );
+ if( xImpPrMap.is() )
+ xPrMap = xImpPrMap->getPropertySetMapper();
+ if( xPrMap.is() )
+ {
+ sal_Int32 nCount = xPrMap->GetEntryCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ const OUString& rName = xPrMap->GetEntryAPIName( i );
+ if( xPropSetInfo->hasPropertyByName( rName ) &&
+ PropertyState_DIRECT_VALUE ==
+ xPropState->getPropertyState( rName ) )
+ {
+ xPropState->setPropertyToDefault( rName );
+ }
+ }
+ }
+
+ FillPropertySet( xPropSet );
+ }
+ else
+ {
+ SetValid( sal_False );
+ }
+}
+
+void XMLPropStyleContext::Finish( sal_Bool bOverwrite )
+{
+ if( xStyle.is() )
+ {
+ // The families cintaner must exist
+ Reference < XNameContainer > xFamilies =
+ ((SvXMLStylesContext *)&xStyles)->GetStylesContainer( GetFamily() );
+ DBG_ASSERT( xFamilies.is(), "Families lost" );
+ if( !xFamilies.is() )
+ return;
+
+ // connect parent
+ OUString sParent( GetParent() );
+ if( sParent.getLength() && !xFamilies->hasByName( sParent ) )
+ sParent = OUString();
+
+ if( sParent != xStyle->getParentStyle() )
+ xStyle->setParentStyle( sParent );
+
+ // connect follow
+ OUString sFollow( GetFollow() );
+ if( !sFollow.getLength() || !xFamilies->hasByName( sFollow ) )
+ sFollow = xStyle->getName();
+
+ Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+ if( xPropSetInfo->hasPropertyByName( sFollowStyle ) )
+ {
+ Any aAny = xPropSet->getPropertyValue( sFollowStyle );
+ OUString sCurrFollow;
+ aAny >>= sCurrFollow;
+ if( sCurrFollow != sFollow )
+ {
+ aAny <<= sFollow;
+ xPropSet->setPropertyValue( sFollowStyle, aAny );
+ }
+ }
+ }
+}
+
+
diff --git a/xmloff/source/style/shadwhdl.cxx b/xmloff/source/style/shadwhdl.cxx
new file mode 100644
index 0000000000..26232bc303
--- /dev/null
+++ b/xmloff/source/style/shadwhdl.cxx
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * $RCSfile: shadwhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_SHADOWTYPES_HXX
+#include "shadwhdl.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+// --
+
+#ifndef _COM_SUN_STAR_TABLE_SHADOWFORMAT_HPP_
+#include <com/sun/star/table/ShadowFormat.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include <xmlkywd.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLMeasurePropHdl
+//
+
+XMLShadowPropHdl::~XMLShadowPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLShadowPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ table::ShadowFormat aShadow;
+ aShadow.Location = table::ShadowLocation_BOTTOM_RIGHT;
+
+ sal_Bool bColorFound = sal_False;
+ sal_Bool bOffsetFound = sal_False;
+ SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
+ Color aColor( 128,128, 128 );
+ OUString aToken;
+
+ while( aTokenEnum.getNextToken( aToken ) )
+ {
+ if( aToken.compareToAscii( sXML_none ) == 0 )
+ {
+ aShadow.Location = table::ShadowLocation_NONE;
+ bRet = sal_True;
+ break;
+ }
+ else if( !bColorFound && aToken.compareToAscii( "#", 1 ) == 0 )
+ {
+ bRet = rUnitConverter.convertColor( aColor, aToken );
+ if( !bRet )
+ return sal_False;
+
+ bColorFound = sal_True;
+ }
+ else if( !bOffsetFound )
+ {
+ sal_Int32 nX = 0, nY = 0;
+
+ bRet = rUnitConverter.convertMeasure( nX, aToken );
+ if( bRet && aTokenEnum.getNextToken( aToken ) )
+ bRet = rUnitConverter.convertMeasure( nY, aToken );
+
+ if( bRet )
+ {
+ if( nX < 0 )
+ {
+ if( nY < 0 )
+ aShadow.Location = table::ShadowLocation_TOP_LEFT;
+ else
+ aShadow.Location = table::ShadowLocation_BOTTOM_LEFT;
+ }
+ else
+ {
+ if( nY < 0 )
+ aShadow.Location = table::ShadowLocation_TOP_RIGHT;
+ else
+ aShadow.Location = table::ShadowLocation_BOTTOM_RIGHT;
+ }
+
+ if( nX < 0 ) nX *= -1;
+ if( nY < 0 ) nY *= -1;
+
+ aShadow.ShadowWidth = (nX + nY) >> 1;
+ }
+ }
+ }
+
+ if( bRet && ( bColorFound || bOffsetFound ) )
+ {
+ aShadow.IsTransparent = aColor.GetTransparency() > 0;
+ aShadow.Color = aColor.GetColor();
+ bRet = sal_True;
+ }
+
+ rValue <<= aShadow;
+
+ return bRet;
+}
+
+sal_Bool XMLShadowPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ OUStringBuffer aOut;
+ table::ShadowFormat aShadow;
+
+ if( rValue >>= aShadow )
+ {
+ sal_Int32 nX = 1, nY = 1;
+
+ switch( aShadow.Location )
+ {
+ case table::ShadowLocation_TOP_LEFT:
+ nX = -1;
+ nY = -1;
+ break;
+ case table::ShadowLocation_TOP_RIGHT:
+ nY = -1;
+ break;
+ case table::ShadowLocation_BOTTOM_LEFT:
+ nX = -1;
+ break;
+ case table::ShadowLocation_BOTTOM_RIGHT:
+ break;
+ case table::ShadowLocation_NONE:
+ default:
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) );
+ return sal_True;
+ }
+
+ nX *= aShadow.ShadowWidth;
+ nY *= aShadow.ShadowWidth;
+
+ rUnitConverter.convertColor( aOut, aShadow.Color );
+
+ aOut.append( sal_Unicode(' ') );
+ rUnitConverter.convertMeasure( aOut, nX );
+ aOut.append( sal_Unicode(' ') );
+ rUnitConverter.convertMeasure( aOut, nY );
+
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
diff --git a/xmloff/source/style/shadwhdl.hxx b/xmloff/source/style/shadwhdl.hxx
new file mode 100644
index 0000000000..4b955ea628
--- /dev/null
+++ b/xmloff/source/style/shadwhdl.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: shadwhdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_SHADOWTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_SHADOWTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLShadowPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLShadowPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
diff --git a/xmloff/source/style/shdwdhdl.cxx b/xmloff/source/style/shdwdhdl.cxx
new file mode 100644
index 0000000000..fe0acf4895
--- /dev/null
+++ b/xmloff/source/style/shdwdhdl.cxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: shdwdhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_SHADOWEDTYPES_HXX
+#include "shdwdhdl.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+// --
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include <xmlkywd.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLFmtSplitPropHdl
+//
+
+XMLShadowedPropHdl::~XMLShadowedPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLShadowedPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ sal_Bool bValue = rStrImpValue.compareToAscii( sXML_none ) != 0;
+ rValue <<= sal_Bool(bValue);
+ bRet = sal_True;
+
+ return bRet;
+}
+
+sal_Bool XMLShadowedPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Bool bValue;
+
+ if (rValue >>= bValue)
+ {
+ if( bValue )
+ {
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( "1pt 1pt" ) );
+ }
+ else
+ {
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_none ) );
+ }
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
diff --git a/xmloff/source/style/shdwdhdl.hxx b/xmloff/source/style/shdwdhdl.hxx
new file mode 100644
index 0000000000..ddd256c476
--- /dev/null
+++ b/xmloff/source/style/shdwdhdl.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: shdwdhdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_SHADOWEDTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_SHADOWEDTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLShadowedPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLShadowedPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_SHADOWEDTYPES_HXX
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
new file mode 100644
index 0000000000..c72b04bb77
--- /dev/null
+++ b/xmloff/source/style/styleexp.cxx
@@ -0,0 +1,440 @@
+/*************************************************************************
+ *
+ * $RCSfile: styleexp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SVSTDARR_STRINGSSORTDTOR_DECL
+#define _SVSTDARR_STRINGSSORTDTOR
+#include <svtools/svstdarr.hxx>
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLITMAP_HXX
+//#include "xmlitmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include "attrlist.hxx"
+#endif
+
+#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
+#include "xmlprmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXPPR_HXX
+#include "xmlexppr.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_XML_SAX_XEXTENDEDDOCUMENTHANDLER_HPP_
+#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLEFAMILIESSUPPLIER_HPP_
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_
+#include <com/sun/star/style/XStyle.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
+#include <com/sun/star/beans/XPropertyState.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLASTPLP_HXX
+#include "xmlaustp.hxx"
+#endif
+#ifndef _XMLOFF_STYLEEXP_HXX
+#include "styleexp.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXP_HXX
+#include "xmlexp.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+//using namespace ::com::sun::star::text;
+
+XMLStyleExport::XMLStyleExport(
+ SvXMLExport& rExp,
+ const ::rtl::OUString& rPoolStyleName,
+ SvXMLAutoStylePoolP *pAutoStyleP ) :
+ rExport( rExp ),
+ sIsPhysical( RTL_CONSTASCII_USTRINGPARAM( "IsPhysical" ) ),
+ sFollowStyle( RTL_CONSTASCII_USTRINGPARAM( "FollowStyle" ) ),
+ sNumberingStyleName( RTL_CONSTASCII_USTRINGPARAM( "NumberingStyleName" ) ),
+ sIsAutoUpdate( RTL_CONSTASCII_USTRINGPARAM( "IsAutoUpdate" ) ),
+ sPoolStyleName( rPoolStyleName ),
+ pAutoStylePool( pAutoStyleP )
+{
+}
+
+XMLStyleExport::~XMLStyleExport()
+{
+}
+
+void XMLStyleExport::exportStyleAttributes( const Reference< XStyle >& rStyle )
+{
+}
+
+void XMLStyleExport::exportStyleContent( const Reference< XStyle >& rStyle )
+{
+}
+
+sal_Bool XMLStyleExport::exportStyle(
+ const Reference< XStyle >& rStyle,
+ const sal_Char *pXMLFamily,
+ const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
+ const OUString* pPrefix)
+{
+ Reference< XPropertySet > xPropSet( rStyle, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+
+ Any aAny;
+
+ // Don't export styles that aren't existing really. This may be the
+ // case for StarOffice Writer's pool styles.
+ if( xPropSetInfo->hasPropertyByName( sIsPhysical ) )
+ {
+ aAny = xPropSet->getPropertyValue( sIsPhysical );
+ if( !*(sal_Bool *)aAny.getValue() )
+ return sal_False;
+ }
+
+ // <style:style ...>
+ GetExport().CheckAttrList();
+
+ // style:name="..."
+ OUString sName;
+
+ if(pPrefix)
+ sName = *pPrefix;
+ sName += rStyle->getName();
+
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_name, sName );
+
+ // style:family="..."
+ if( pXMLFamily )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_family,
+ pXMLFamily );
+
+ // style:parent-style-name="..."
+ OUString sParentString(rStyle->getParentStyle());
+ OUString sParent;
+
+ if(sParentString.getLength())
+ {
+ if(pPrefix)
+ sParent = *pPrefix;
+ sParent += sParentString;
+ }
+ else
+ sParent = sPoolStyleName;
+
+ if( sParent.getLength() )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_parent_style_name,
+ sParent );
+
+ // style:next-style-name="..." (paragraph styles only)
+ if( xPropSetInfo->hasPropertyByName( sFollowStyle ) )
+ {
+ aAny = xPropSet->getPropertyValue( sFollowStyle );
+ OUString sNextName;
+ aAny >>= sNextName;
+ if( sName != sNextName )
+ {
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_next_style_name,
+ sNextName );
+ }
+ }
+
+ // style:auto-update="..." (SW only)
+ if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) )
+ {
+ aAny = xPropSet->getPropertyValue( sIsAutoUpdate );
+ if( *(sal_Bool *)aAny.getValue() )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_auto_update,
+ sXML_true );
+ }
+
+ // style:list-style-name="..." (SW paragarph styles only)
+ if( xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
+ {
+ Reference< XPropertyState > xPropState( xPropSet, uno::UNO_QUERY );
+ if( PropertyState_DIRECT_VALUE ==
+ xPropState->getPropertyState( sNumberingStyleName ) )
+ {
+ aAny = xPropSet->getPropertyValue( sNumberingStyleName );
+ if( aAny.hasValue() )
+ {
+ OUString sListName;
+ aAny >>= sListName;
+ if( sListName.getLength() )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_list_style_name,
+ sListName );
+ }
+ }
+ }
+
+ // style:pool-id="..." is not required any longer since we use
+ // english style names only
+ exportStyleAttributes( rStyle );
+
+ // TODO: style:help-file-name="..." and style:help-id="..." can neither
+ // be modified by UI nor by API and that for, have not to be exported
+ // currently.
+
+ {
+ // <style:style>
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, sXML_style,
+ sal_True, sal_True );
+ // <style:properties>
+ ::std::vector< XMLPropertyState > xPropStates =
+ rPropMapper->getPropertySetMapper()->Filter( xPropSet );
+ rPropMapper->exportXML( GetExport().GetDocHandler(), xPropStates,
+ GetExport().GetMM100UnitConverter(),
+ GetExport().GetNamespaceMap(),
+ XML_EXPORT_FLAG_IGN_WS );
+ exportStyleContent( rStyle );
+ }
+ return sal_True;
+}
+
+void XMLStyleExport::exportStyleFamily(
+ const sal_Char *pFamily,
+ const sal_Char *pXMLFamily,
+ const UniReference < XMLPropertySetMapper >& rPropMapper,
+ sal_Bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix)
+{
+ const OUString sFamily(OUString::createFromAscii(pFamily ));
+ UniReference < SvXMLExportPropertyMapper > xExpPropMapper =
+ new SvXMLExportPropertyMapper( rPropMapper );
+ exportStyleFamily( sFamily, pXMLFamily, xExpPropMapper, bUsed, nFamily,
+ pPrefix);
+}
+
+void XMLStyleExport::exportStyleFamily(
+ const OUString& rFamily, const sal_Char *pXMLFamily,
+ const UniReference < XMLPropertySetMapper >& rPropMapper,
+ sal_Bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix)
+{
+ UniReference < SvXMLExportPropertyMapper > xExpPropMapper =
+ new SvXMLExportPropertyMapper( rPropMapper );
+ exportStyleFamily( rFamily, pXMLFamily, xExpPropMapper, bUsed, nFamily,
+ pPrefix);
+}
+
+void XMLStyleExport::exportStyleFamily(
+ const sal_Char *pFamily,
+ const sal_Char *pXMLFamily,
+ const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
+ sal_Bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix)
+{
+ const OUString sFamily(OUString::createFromAscii(pFamily ));
+ exportStyleFamily( sFamily, pXMLFamily, rPropMapper, bUsed, nFamily,
+ pPrefix);
+}
+
+void XMLStyleExport::exportStyleFamily(
+ const OUString& rFamily, const sal_Char *pXMLFamily,
+ const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
+ sal_Bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix)
+{
+ DBG_ASSERT( GetExport().GetModel().is(), "There is the model?" );
+ Reference< XStyleFamiliesSupplier > xFamiliesSupp( GetExport().GetModel(),
+ UNO_QUERY );
+ Reference< XNameContainer > xStyleCont;
+
+ Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() );
+ if( xFamilies->hasByName( rFamily ) )
+ xFamilies->getByName( rFamily ) >>= xStyleCont;
+
+ if( !xStyleCont.is() )
+ return;
+
+ Reference< XIndexAccess > xStyles( xStyleCont, UNO_QUERY );
+ const sal_Int32 nStyles = xStyles->getCount();
+
+ // If next styles are supported and used styles should be exported only,
+ // the next style may be unused but has to be exported, too. In this case
+ // the names of all exported styles are remembered.
+ SvStringsSortDtor *pExportedStyles = 0;
+ sal_Bool bFirstStyle = sal_True;
+
+ for( sal_Int32 i=0; i < nStyles; i++ )
+ {
+ Reference< XStyle > xStyle;
+ xStyles->getByIndex( i ) >>= xStyle;
+
+ DBG_ASSERT( xStyle.is(), "Style not found for export!" );
+ if( xStyle.is() )
+ {
+ if( !bUsed || xStyle->isInUse() )
+ {
+ BOOL bExported = exportStyle( xStyle, pXMLFamily, rPropMapper, pPrefix );
+ if( bUsed && bFirstStyle && bExported )
+ {
+ // If this is the first style, find out wether next styles
+ // are supported.
+ Reference< XPropertySet > xPropSet( xStyle, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+
+ if( xPropSetInfo->hasPropertyByName( sFollowStyle ) )
+ pExportedStyles = new SvStringsSortDtor;
+ bFirstStyle = sal_False;
+ }
+
+ if( pExportedStyles && bExported )
+ {
+ // If next styles are supported, remember this style's name.
+ String *pTmp = new String( xStyle->getName() );
+ if( !pExportedStyles->Insert( pTmp ) )
+ delete pTmp;
+ }
+ }
+
+ // if an auto style pool is given, remember this style's name as a
+ // style name that must not be used by automatic styles.
+ if( pAutoStylePool )
+ pAutoStylePool->RegisterName( nFamily, xStyle->getName() );
+ }
+ }
+
+ if( pExportedStyles )
+ {
+ // if next styles are supported, export all next styles that are
+ // unused and that for, haven't been exported in the first loop.
+ for( i=0; i < nStyles; i++ )
+ {
+ Reference< XStyle > xStyle;
+ xStyles->getByIndex( i ) >>= xStyle;
+
+ DBG_ASSERT( xStyle.is(), "Style not found for export!" );
+ if( xStyle.is() )
+ {
+ Reference< XPropertySet > xPropSet( xStyle, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
+
+ // styles that aren't existing realy are ignored.
+ if( xPropSetInfo->hasPropertyByName( sIsPhysical ) )
+ {
+ Any aAny( xPropSet->getPropertyValue( sIsPhysical ) );
+ if( !*(sal_Bool *)aAny.getValue() )
+ continue;
+ }
+
+ if( !xStyle->isInUse() )
+ continue;
+
+ if( !xPropSetInfo->hasPropertyByName( sFollowStyle ) )
+ {
+ DBG_ASSERT( 0==sFollowStyle.getLength(),
+ "no follow style???" );
+ continue;
+ }
+
+ OUString sNextName;
+ xPropSet->getPropertyValue( sFollowStyle ) >>= sNextName;
+ String sTmp( sNextName );
+ // if the next style hasn't been exported by now, export it now
+ // and remember its name.
+ if( xStyle->getName() != sNextName &&
+ !pExportedStyles->Seek_Entry( &sTmp ) )
+ {
+ xStyleCont->getByName( sNextName ) >>= xStyle;
+ DBG_ASSERT( xStyle.is(), "Style not found for export!" );
+
+ if( xStyle.is() && exportStyle( xStyle, pXMLFamily, rPropMapper, pPrefix ) )
+ pExportedStyles->Insert( new String( sTmp ) );
+ }
+ }
+ }
+ }
+
+ delete pExportedStyles;
+}
+
+
diff --git a/xmloff/source/style/tabsthdl.cxx b/xmloff/source/style/tabsthdl.cxx
new file mode 100644
index 0000000000..6c0f58cefd
--- /dev/null
+++ b/xmloff/source/style/tabsthdl.cxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabsthdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_TABSTOPTYPES_HXX
+#include <tabsthdl.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
+#include <com/sun/star/uno/Sequence.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_TABSTOP_HPP_
+#include <com/sun/star/style/TabStop.hpp>
+#endif
+
+using namespace ::com::sun::star;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLFontFamilyNamePropHdl
+//
+
+XMLTabStopPropHdl::~XMLTabStopPropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLTabStopPropHdl::equals( const uno::Any& r1, const uno::Any& r2 ) const
+{
+ sal_Bool bEqual = sal_False;
+
+ uno::Sequence< style::TabStop> aSeq1;
+ if( r1 >>= aSeq1 )
+ {
+ uno::Sequence< style::TabStop> aSeq2;
+ if( r2 >>= aSeq2 )
+ {
+ if( aSeq1.getLength() == aSeq2.getLength() )
+ {
+ const style::TabStop* pTabs1 = aSeq1.getConstArray();
+ const style::TabStop* pTabs2 = aSeq2.getConstArray();
+
+ int i=0;
+ bEqual = sal_True;
+
+ do
+ {
+ bEqual = ( pTabs1[i].Position == pTabs2[i].Position &&
+ pTabs1[i].Alignment == pTabs2[i].Alignment &&
+ pTabs1[i].DecimalChar == pTabs2[i].DecimalChar &&
+ pTabs1[i].FillChar == pTabs2[i].FillChar );
+ i++;
+
+ } while( bEqual && i < aSeq1.getLength() );
+ }
+ }
+ }
+
+ return bEqual;
+}
+
+sal_Bool XMLTabStopPropHdl::importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ return sal_False;
+}
+
+sal_Bool XMLTabStopPropHdl::exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ return sal_False;
+}
+
diff --git a/xmloff/source/style/tabsthdl.hxx b/xmloff/source/style/tabsthdl.hxx
new file mode 100644
index 0000000000..dbf0ddc1ed
--- /dev/null
+++ b/xmloff/source/style/tabsthdl.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabsthdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_TABSTOPTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_TABSTOPTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLTabStopPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLTabStopPropHdl();
+
+ virtual sal_Bool equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const;
+
+ /// TabStops will be imported/exported as XML-Elements. So the Import/Export-work must be done at another place.
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_TABSTOPTYPES_HXX
diff --git a/xmloff/source/style/undlihdl.cxx b/xmloff/source/style/undlihdl.cxx
new file mode 100644
index 0000000000..529817ab69
--- /dev/null
+++ b/xmloff/source/style/undlihdl.cxx
@@ -0,0 +1,151 @@
+/*************************************************************************
+ *
+ * $RCSfile: undlihdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_UNDERLINETYPES_HXX
+#include <undlihdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _VCL_VCLENUM_HXX
+#include <vcl/vclenum.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlelement.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_Underline_Enum[] =
+{
+ { sXML_underline_none, UNDERLINE_NONE },
+ { sXML_underline_single, UNDERLINE_SINGLE },
+ { sXML_underline_double, UNDERLINE_DOUBLE },
+ { sXML_underline_dotted, UNDERLINE_DOTTED },
+ { sXML_underline_dash, UNDERLINE_DASH },
+ { sXML_underline_long_dash, UNDERLINE_LONGDASH },
+ { sXML_underline_dot_dash, UNDERLINE_DASHDOT },
+ { sXML_underline_dot_dot_dash, UNDERLINE_DASHDOTDOT },
+ { sXML_underline_wave, UNDERLINE_WAVE },
+ { sXML_underline_bold, UNDERLINE_BOLD },
+ { sXML_underline_bold_dotted, UNDERLINE_BOLDDOTTED },
+ { sXML_underline_bold_dash, UNDERLINE_BOLDDASH },
+ { sXML_underline_bold_long_dash, UNDERLINE_BOLDLONGDASH },
+ { sXML_underline_bold_dot_dash, UNDERLINE_BOLDDASHDOT },
+ { sXML_underline_bold_dot_dot_dash, UNDERLINE_BOLDDASHDOTDOT },
+ { sXML_underline_bold_wave, UNDERLINE_BOLDWAVE },
+ { sXML_underline_double_wave, UNDERLINE_DOUBLEWAVE },
+ { sXML_underline_small_wave, UNDERLINE_SMALLWAVE },
+ { 0, 0 }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLPosturePropHdl
+//
+
+XMLUnderlinePropHdl::~XMLUnderlinePropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLUnderlinePropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt16 eUnderline;
+
+ if( ( bRet = rUnitConverter.convertEnum( eUnderline, rStrImpValue, pXML_Underline_Enum ) ) )
+ rValue <<= eUnderline;
+
+ return bRet;
+}
+
+sal_Bool XMLUnderlinePropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int32 nValue;
+ OUStringBuffer aOut;
+
+ if( rValue >>= nValue )
+ {
+ if( ( bRet = rUnitConverter.convertEnum( aOut, nValue, pXML_Underline_Enum ) ) )
+ rStrExpValue = aOut.makeStringAndClear();
+ }
+
+ return bRet;
+}
+
diff --git a/xmloff/source/style/undlihdl.hxx b/xmloff/source/style/undlihdl.hxx
new file mode 100644
index 0000000000..20172db48d
--- /dev/null
+++ b/xmloff/source/style/undlihdl.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: undlihdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_UNDERLINETYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_UNDERLINETYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLUnderlinePropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLUnderlinePropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_UNDERLINETYPES_HXX
diff --git a/xmloff/source/style/uniref.cxx b/xmloff/source/style/uniref.cxx
new file mode 100644
index 0000000000..80b69dbf02
--- /dev/null
+++ b/xmloff/source/style/uniref.cxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: uniref.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _UNIVERSALL_REFERENCE_HXX
+#include "uniref.hxx"
+#endif
+
+UniRefBase::~UniRefBase()
+{
+}
+
+void UniRefBase::release()
+{
+ if( !osl_decrementInterlockedCount( &m_refCount ) )
+ delete this;
+}
diff --git a/xmloff/source/style/weighhdl.cxx b/xmloff/source/style/weighhdl.cxx
new file mode 100644
index 0000000000..93cefdd5d1
--- /dev/null
+++ b/xmloff/source/style/weighhdl.cxx
@@ -0,0 +1,231 @@
+/*************************************************************************
+ *
+ * $RCSfile: weighhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_FONTWEIGHTTYPES_HXX
+#include <weighhdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _VCL_VCLENUM_HXX
+#include <vcl/vclenum.hxx>
+#endif
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+#ifndef _INC_LIMITS
+#include <limits.h>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _RTL_USTRING_
+#include <rtl/ustring>
+#endif
+
+#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
+#include <toolkit/unohlp.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+struct FontWeightMapper
+{
+ FontWeight eWeight;
+ USHORT nValue;
+};
+
+FontWeightMapper const aFontWeightMap[] =
+{
+ { WEIGHT_DONTKNOW, 0 },
+ { WEIGHT_THIN, 100 },
+ { WEIGHT_ULTRALIGHT, 150 },
+ { WEIGHT_LIGHT, 250 },
+ { WEIGHT_SEMILIGHT, 350 },
+ { WEIGHT_NORMAL, 400 },
+ { WEIGHT_MEDIUM, 450 },
+ { WEIGHT_SEMIBOLD, 600 },
+ { WEIGHT_BOLD, 700 },
+ { WEIGHT_ULTRABOLD, 800 },
+ { WEIGHT_BLACK, 900 },
+ { (FontWeight)USHRT_MAX, 1000 }
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLFmtBreakBeforePropHdl
+//
+
+XMLFontWeightPropHdl::~XMLFontWeightPropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLFontWeightPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nWeight = 0;
+
+ if( rStrImpValue.compareToAscii( sXML_weight_normal ) == 0 )
+ {
+ nWeight = 400;
+ bRet = sal_True;
+ }
+ else if( rStrImpValue.compareToAscii( sXML_weight_bold ) == 0 )
+ {
+ nWeight = 700;
+ bRet = sal_True;
+ }
+ else
+ {
+ sal_Int32 nTemp;
+ if( ( bRet = rUnitConverter.convertNumber( nTemp, rStrImpValue, 100, 900 ) ) )
+ nWeight = nTemp;
+ }
+
+ if( bRet )
+ {
+ bRet = sal_False;
+
+ for( int i = 0; aFontWeightMap[i].eWeight != USHRT_MAX; i++ )
+ {
+ if( (nWeight >= aFontWeightMap[i].nValue) && (nWeight <= aFontWeightMap[i+1].nValue) )
+ {
+ sal_uInt16 nDiff1 = nWeight - aFontWeightMap[i].nValue;
+ sal_uInt16 nDiff2 = aFontWeightMap[i+1].nValue - nWeight;
+
+ if( nDiff1 < nDiff2 )
+ rValue <<= (float)( VCLUnoHelper::ConvertFontWeight( aFontWeightMap[i].eWeight ) );
+ else
+ rValue <<= (float)( VCLUnoHelper::ConvertFontWeight( aFontWeightMap[i+1].eWeight ) );
+
+ bRet = sal_True;
+ break;
+ }
+ }
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLFontWeightPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ FontWeight eWeight;
+
+ float fValue;
+ if( !( rValue >>= fValue ) )
+ {
+ sal_Int32 nValue;
+ if( rValue >>= nValue )
+ {
+ fValue = (float)nValue;
+ bRet = sal_True;
+ }
+ }
+ else
+ bRet = sal_True;
+
+ eWeight = VCLUnoHelper::ConvertFontWeight( fValue );
+
+ if( bRet )
+ {
+ sal_uInt16 nWeight = 0;
+
+ for( int i = 0; aFontWeightMap[i].eWeight != -1; i++ )
+ {
+ if( aFontWeightMap[i].eWeight == eWeight )
+ {
+ nWeight = aFontWeightMap[i].nValue;
+ break;
+ }
+ }
+
+ OUStringBuffer aOut;
+
+ if( 400 == nWeight )
+ aOut.appendAscii( sXML_weight_normal );
+ else if( 700 == nWeight )
+ aOut.appendAscii( sXML_weight_bold );
+ else
+ rUnitConverter.convertNumber( aOut, (sal_Int32)nWeight );
+
+ rStrExpValue = aOut.makeStringAndClear();
+ }
+
+ return bRet;
+}
+
diff --git a/xmloff/source/style/weighhdl.hxx b/xmloff/source/style/weighhdl.hxx
new file mode 100644
index 0000000000..50c5b8f4ac
--- /dev/null
+++ b/xmloff/source/style/weighhdl.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * $RCSfile: weighhdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_FONTWEIGHTTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_FONTWEIGHTTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLFontWeightPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLFontWeightPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+
+#endif // _XMLOFF_PROPERTYHANDLER_FONTWEIGHTTYPES_HXX
diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx
new file mode 100644
index 0000000000..9e363cd9b2
--- /dev/null
+++ b/xmloff/source/style/xmlaustp.cxx
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlaustp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _XMLOFF_XMLASTPL_IMPL_HXX
+#include "impastpl.hxx"
+#endif
+#ifndef _XMLOFF_XMLASTPLP_HXX
+#include "xmlaustp.hxx"
+#endif
+
+using namespace ::std;
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+void SvXMLAutoStylePoolP::exportStyleAttributes(
+ SvXMLAttributeList& rAttrList,
+ sal_Int32 nFamily,
+ const vector< XMLPropertyState >& rProperties,
+ const SvXMLExportPropertyMapper& rPropExp,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const
+{
+}
+
+SvXMLAutoStylePoolP::SvXMLAutoStylePoolP()
+{
+ pImpl = new SvXMLAutoStylePoolP_Impl;
+}
+
+SvXMLAutoStylePoolP::~SvXMLAutoStylePoolP()
+{
+ delete pImpl;
+}
+
+// TODO: romove this
+void SvXMLAutoStylePoolP::AddFamily(
+ sal_Int32 nFamily,
+ const OUString& rStrName,
+ XMLPropertySetMapper* pMapper,
+ OUString aStrPrefix )
+{
+ UniReference <XMLPropertySetMapper> xTmp = pMapper;
+ AddFamily( nFamily, rStrName, xTmp, aStrPrefix );
+}
+
+void SvXMLAutoStylePoolP::AddFamily(
+ sal_Int32 nFamily,
+ const OUString& rStrName,
+ const UniReference < XMLPropertySetMapper > & rMapper,
+ const OUString& rStrPrefix )
+{
+ pImpl->AddFamily( nFamily, rStrName, rMapper, rStrPrefix );
+}
+
+void SvXMLAutoStylePoolP::RegisterName( sal_Int32 nFamily,
+ const OUString& rName )
+{
+ pImpl->RegisterName( nFamily, rName );
+}
+
+OUString SvXMLAutoStylePoolP::Add( sal_Int32 nFamily,
+ const vector< XMLPropertyState >& rProperties )
+{
+ OUString sEmpty;
+ return pImpl->Add( nFamily, sEmpty, rProperties );
+}
+
+OUString SvXMLAutoStylePoolP::Add( sal_Int32 nFamily,
+ const OUString& rParent,
+ const vector< XMLPropertyState >& rProperties )
+{
+ return pImpl->Add( nFamily, rParent, rProperties );
+}
+
+OUString SvXMLAutoStylePoolP::Find( sal_Int32 nFamily,
+ const vector< XMLPropertyState >& rProperties ) const
+{
+ OUString sEmpty;
+ return pImpl->Find( nFamily, sEmpty, rProperties );
+}
+
+OUString SvXMLAutoStylePoolP::Find( sal_Int32 nFamily,
+ const OUString& rParent,
+ const vector< XMLPropertyState >& rProperties ) const
+{
+ return pImpl->Find( nFamily, rParent, rProperties );
+}
+
+void SvXMLAutoStylePoolP::exportXML( sal_Int32 nFamily,
+ const SvXMLExportPropertyMapper& rPropExp,
+ const uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap) const
+{
+ pImpl->exportXML( nFamily, rPropExp, rHandler, rUnitConverter,
+ rNamespaceMap, this);
+}
+
+void SvXMLAutoStylePoolP::ClearEntries()
+{
+ pImpl->ClearEntries();
+}
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
new file mode 100644
index 0000000000..b9b8958b4c
--- /dev/null
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -0,0 +1,486 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlbahdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
+#include <xmlbahdl.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#include "xmlkywd.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+
+void lcl_xmloff_setAny( Any& rValue, sal_Int32 nValue, sal_Int8 nBytes )
+{
+ switch( nBytes )
+ {
+ case 1:
+ if( nValue < SCHAR_MIN )
+ nValue = SCHAR_MIN;
+ else if( nValue > SCHAR_MAX )
+ nValue = SCHAR_MAX;
+ rValue <<= (sal_Int8)nValue;
+ break;
+ case 2:
+ if( nValue < SHRT_MIN )
+ nValue = SHRT_MIN;
+ else if( nValue > SHRT_MAX )
+ nValue = SHRT_MAX;
+ rValue <<= (sal_Int16)nValue;
+ break;
+ case 4:
+ rValue <<= nValue;
+ break;
+ }
+}
+
+sal_Bool lcl_xmloff_getAny( const Any& rValue, sal_Int32& nValue,
+ sal_Int8 nBytes )
+{
+ sal_Bool bRet = sal_False;
+
+ switch( nBytes )
+ {
+ case 1:
+ {
+ sal_Int8 nValue8;
+ bRet = rValue >>= nValue8;
+ nValue = nValue8;
+ }
+ break;
+ case 2:
+ {
+ sal_Int16 nValue16;
+ bRet = rValue >>= nValue16;
+ nValue = nValue16;
+ }
+ break;
+ case 4:
+ bRet = rValue >>= nValue;
+ break;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLNumberPropHdl
+//
+
+XMLNumberPropHdl::~XMLNumberPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLNumberPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ sal_Int32 nValue;
+ bRet = rUnitConverter.convertNumber( nValue, rStrImpValue );
+ lcl_xmloff_setAny( rValue, nValue, nBytes );
+
+ return bRet;
+}
+
+sal_Bool XMLNumberPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int32 nValue;
+ OUStringBuffer aOut;
+
+ if( lcl_xmloff_getAny( rValue, nValue, nBytes ) )
+ {
+ rUnitConverter.convertNumber( aOut, nValue );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// class XMLNumberNonePropHdl
+//
+
+XMLNumberNonePropHdl::~XMLNumberNonePropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLNumberNonePropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ sal_Int32 nValue;
+ if( rStrImpValue.compareToAscii( sXML_no_limit ) == 0 )
+ {
+ nValue = 0;
+ bRet = sal_True;
+ }
+ else
+ {
+ bRet = rUnitConverter.convertNumber( nValue, rStrImpValue );
+ }
+ rValue <<= nValue;
+
+ return bRet;
+}
+
+sal_Bool XMLNumberNonePropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int32 nValue;
+
+ if( rValue >>= nValue )
+ {
+ OUStringBuffer aOut;
+
+ if( nValue == 0 )
+ {
+ aOut.appendAscii( sXML_no_limit );
+ }
+ else
+ {
+ rUnitConverter.convertNumber( aOut, nValue );
+ }
+
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLMeasurePropHdl
+//
+
+XMLMeasurePropHdl::~XMLMeasurePropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLMeasurePropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ sal_Int32 nValue;
+ bRet = rUnitConverter.convertMeasure( nValue, rStrImpValue );
+ lcl_xmloff_setAny( rValue, nValue, nBytes );
+
+ return bRet;
+}
+
+sal_Bool XMLMeasurePropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int32 nValue;
+ OUStringBuffer aOut;
+
+ if( lcl_xmloff_getAny( rValue, nValue, nBytes ) )
+ {
+ rUnitConverter.convertMeasure( aOut, nValue );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLBoolPropHdl
+//
+
+XMLBoolPropHdl::~XMLBoolPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLBoolPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ sal_Bool bValue;
+ bRet = rUnitConverter.convertBool( bValue, rStrImpValue );
+ rValue <<= sal_Bool(bValue);
+
+ return bRet;
+}
+
+sal_Bool XMLBoolPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ OUStringBuffer aOut;
+ sal_Bool bValue;
+
+ if (rValue >>= bValue)
+ {
+ rUnitConverter.convertBool( aOut, bValue );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLNBoolPropHdl
+//
+
+XMLNBoolPropHdl::~XMLNBoolPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLNBoolPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ sal_Bool bValue;
+ bRet = rUnitConverter.convertBool( bValue, rStrImpValue );
+ rValue <<= sal_Bool(!bValue);
+
+ return bRet;
+}
+
+sal_Bool XMLNBoolPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ OUStringBuffer aOut;
+ sal_Bool bValue;
+
+ if (rValue >>= bValue)
+ {
+ rUnitConverter.convertBool( aOut, !bValue );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLPercentPropHdl
+//
+
+XMLPercentPropHdl::~XMLPercentPropHdl()
+{
+ // nothing to do
+}
+
+sal_Bool XMLPercentPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ sal_Int32 nValue;
+ bRet = rUnitConverter.convertPercent( nValue, rStrImpValue );
+ lcl_xmloff_setAny( rValue, nValue, nBytes );
+
+ return bRet;
+}
+
+sal_Bool XMLPercentPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ sal_Int32 nValue;
+ OUStringBuffer aOut;
+
+ if( lcl_xmloff_getAny( rValue, nValue, nBytes ) )
+ {
+ rUnitConverter.convertPercent( aOut, nValue );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLColorPropHdl
+//
+
+XMLColorPropHdl::~XMLColorPropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLColorPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ Color aColor;
+
+ bRet = rUnitConverter.convertColor( aColor, rStrImpValue );
+ rValue <<= (sal_Int32)( aColor.GetColor() );
+
+ return bRet;
+}
+
+sal_Bool XMLColorPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+ Color aColor;
+ sal_Int32 nColor;
+
+ if( rValue >>= nColor )
+ {
+ aColor.SetColor( nColor );
+
+ OUStringBuffer aOut;
+ rUnitConverter.convertColor( aOut, aColor );
+ rStrExpValue = aOut.makeStringAndClear();
+
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLStringPropHdl
+//
+
+XMLStringPropHdl::~XMLStringPropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLStringPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ rValue <<= rStrImpValue;
+ bRet = sal_True;
+
+ return bRet;
+}
+
+sal_Bool XMLStringPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ if( rValue >>= rStrExpValue )
+ bRet = sal_True;
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// class XMLDoublePropHdl
+//
+
+XMLDoublePropHdl::~XMLDoublePropHdl()
+{
+ // Nothing to do
+}
+
+sal_Bool XMLDoublePropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ double fDblValue;
+ sal_Bool bRet = rUnitConverter.convertNumber( fDblValue, rStrImpValue );
+ rValue <<= fDblValue;
+ return bRet;
+}
+
+sal_Bool XMLDoublePropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ double fValue;
+
+ if( rValue >>= fValue )
+ {
+ OUStringBuffer aOut;
+ rUnitConverter.convertNumber( aOut, fValue );
+ rStrExpValue = aOut.makeStringAndClear();
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
diff --git a/xmloff/source/style/xmlbahdl.hxx b/xmloff/source/style/xmlbahdl.hxx
new file mode 100644
index 0000000000..952a0ab203
--- /dev/null
+++ b/xmloff/source/style/xmlbahdl.hxx
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlbahdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
+#define _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+/**
+ PropertyHandler for the XML-data-type: XML_TYPE_NUMBER
+*/
+class XMLNumberPropHdl : public XMLPropertyHandler
+{
+ sal_Int8 nBytes;
+
+public:
+ XMLNumberPropHdl( sal_Int8 nB=4 ) : nBytes( nB ) {}
+ virtual ~XMLNumberPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type: XML_TYPE_NUMBER_NONE
+*/
+class XMLNumberNonePropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLNumberNonePropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type: XML_TYPE_MEASURE
+*/
+class XMLMeasurePropHdl : public XMLPropertyHandler
+{
+ sal_Int8 nBytes;
+public:
+ XMLMeasurePropHdl( sal_Int8 nB=4 ) : nBytes( nB ) {}
+ virtual ~XMLMeasurePropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type: XML_TYPE_PERCENT
+*/
+class XMLPercentPropHdl : public XMLPropertyHandler
+{
+ sal_Int8 nBytes;
+public:
+ XMLPercentPropHdl( sal_Int8 nB=4 ) : nBytes( nB ) {}
+ virtual ~XMLPercentPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type: XML_TYPE_BOOL
+*/
+class XMLBoolPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLBoolPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type: XML_TYPE_COLOR
+*/
+class XMLColorPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLColorPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type: XML_TYPE_STRING
+*/
+class XMLStringPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLStringPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type: XML_TYPE_DOUBLE
+*/
+class XMLDoublePropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLDoublePropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+/**
+ PropertyHandler for the XML-data-type: XML_TYPE_NBOOL
+*/
+class XMLNBoolPropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLNBoolPropHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+#endif // _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
new file mode 100644
index 0000000000..8c9ef36895
--- /dev/null
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -0,0 +1,356 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlexppr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "xmlexppr.hxx"
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include "attrlist.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLCNITM_HXX
+#include "xmlcnitm.hxx"
+#endif
+
+#ifndef _SVSTDARR_USHORTS
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// ctor/dtor , class SvXMLExportPropertyMapper
+//
+
+SvXMLExportPropertyMapper::SvXMLExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper )
+: maPropMapper( rMapper )
+{
+}
+
+SvXMLExportPropertyMapper::~SvXMLExportPropertyMapper()
+{
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// public methods
+//
+
+/** fills the given attribute list with the items in the given set */
+void SvXMLExportPropertyMapper::exportXML( SvXMLAttributeList& rAttrList,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags /* = 0 */ ) const
+{
+ _exportXML( rAttrList, rProperties, rUnitConverter, rNamespaceMap, nFlags, 0 );
+}
+
+
+void SvXMLExportPropertyMapper::exportXML( SvXMLAttributeList& rAttrList,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags ) const
+{
+ if( ( maPropMapper->GetEntryFlags( rProperty.mnIndex ) & MID_FLAG_ELEMENT_ITEM_EXPORT ) == 0 )
+ _exportXML( rAttrList, rProperty, rUnitConverter, rNamespaceMap, nFlags); //, 0 );
+}
+
+void SvXMLExportPropertyMapper::exportXML( const uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags ) const
+{
+ SvXMLAttributeList *pAttrList = new SvXMLAttributeList();
+ uno::Reference< ::com::sun::star::xml::sax::XAttributeList > xAttrList( pAttrList );
+
+ SvUShorts aIndexArray;
+
+ _exportXML( *pAttrList, rProperties, rUnitConverter, rNamespaceMap, nFlags, &aIndexArray );
+
+ if( pAttrList->getLength() > 0L || (nFlags & XML_EXPORT_FLAG_EMPTY) != 0 || aIndexArray.Count() != 0 )
+ {
+ if( (nFlags & XML_EXPORT_FLAG_IGN_WS) != 0 )
+ {
+ OUString sWS( OUString::createFromAscii(sXML_WS) );
+ rHandler->ignorableWhitespace( sWS );
+ }
+
+ OUString sLName( OUString::createFromAscii(sXML_properties) );
+ OUString sName = rNamespaceMap.GetQNameByKey( XML_NAMESPACE_STYLE, sLName );
+ rHandler->startElement( sName, xAttrList );
+
+ exportElementItems( rHandler, rUnitConverter, rNamespaceMap, rProperties, nFlags, aIndexArray );
+
+ rHandler->endElement( sName );
+ }
+}
+
+/** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set */
+void SvXMLExportPropertyMapper::handleSpecialItem( SvXMLAttributeList& rAttrList,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const
+ // const SfxItemSet* pSet /* = NULL */ ) const Do we need this any more ?
+{
+ DBG_ERROR( "special item not handled in xml export" );
+}
+
+/** this method is called for every item that has the MID_FLAG_NO_ITEM_EXPORT flag set */
+void SvXMLExportPropertyMapper::handleNoItem( SvXMLAttributeList& rAttrList,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const
+ // const SfxItemSet& rSet ) const Do we need this any more ?
+{
+ DBG_ERROR( "no item not handled in xml export" );
+}
+
+/** this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set */
+void SvXMLExportPropertyMapper::handleElementItem( const uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ // const SfxItemSet& rSet, Do we need this any more ?
+ sal_uInt16 nFlags ) const
+{
+ DBG_ERROR( "element item not handled in xml export" );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// protected methods
+//
+
+/** fills the given attribute list with the items in the given set */
+void SvXMLExportPropertyMapper::_exportXML( SvXMLAttributeList& rAttrList,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags,
+ SvUShorts* pIndexArray ) const
+{
+ const sal_uInt16 nCount = rProperties.size();
+ sal_uInt16 nIndex = 0;
+
+ while( nIndex < nCount )
+ {
+ if( rProperties[nIndex].mnIndex >= 0 ) // valid entry?
+ {
+ // we have a valid map entry here, so lets use it...
+ if( ( maPropMapper->GetEntryFlags( rProperties[nIndex].mnIndex ) & MID_FLAG_NO_ITEM_EXPORT ) == 0 )
+ {
+ if( ( maPropMapper->GetEntryFlags( rProperties[nIndex].mnIndex ) & MID_FLAG_ELEMENT_ITEM_EXPORT ) != 0 )
+ {
+ // element items do not add any properties,
+ // we export it later
+ if( pIndexArray )
+ pIndexArray->Insert( nIndex, pIndexArray->Count() );
+ }
+ else
+ {
+ exportXML( rAttrList, rProperties[nIndex], rUnitConverter, rNamespaceMap, nFlags );// , &rSet ); I think we do not need the total vector of XMLPropertyState in the called method
+ }
+ }
+ else
+ {
+ handleNoItem( rAttrList, rProperties[nIndex], rUnitConverter, rNamespaceMap ); //, rSet ); Must we transfer the total set any more ?
+ }
+ }
+
+ nIndex++;
+ }
+}
+
+void SvXMLExportPropertyMapper::_exportXML( SvXMLAttributeList& rAttrList,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags ) const
+{
+ OUString sCDATA( OUString::createFromAscii( sXML_CDATA ) );
+
+ if ( ( maPropMapper->GetEntryFlags( rProperty.mnIndex ) & MID_FLAG_SPECIAL_ITEM_EXPORT ) != 0 )
+ {
+ /* Currently, we have nothing like a SvXMLAttrContainerItem, since we use properties instead of poolitems
+
+ if( rItem.ISA( SvXMLAttrContainerItem ) )
+ {
+ SvXMLNamespaceMap *pNewNamespaceMap = 0;
+ const SvXMLNamespaceMap *pNamespaceMap = &rNamespaceMap;
+
+ const SvXMLAttrContainerItem *pUnknown = PTR_CAST( SvXMLAttrContainerItem, &rItem );
+
+ sal_uInt16 nCount = pUnknown->GetAttrCount();
+ OUStringBuffer sName;
+ for( sal_uInt16 i=0; i < nCount; i++ )
+ {
+ OUString sPrefix( pUnknown->GetAttrPrefix( i ) );
+ if( sPrefix.getLength() )
+ {
+ OUString sNamespace( pUnknown->GetAttrNamespace( i ) );
+
+ // if the prefix isn't defined yet or has another meaning,
+ // we have to redefine it now.
+ sal_uInt16 nIdx = pNamespaceMap->GetIndexByPrefix( sPrefix );
+ if( USHRT_MAX == nIdx ||
+ pNamespaceMap->GetNameByIndex( nIdx ) != sNamespace )
+ {
+ if( !pNewNamespaceMap )
+ {
+ pNewNamespaceMap =
+ new SvXMLNamespaceMap( rNamespaceMap );
+ pNamespaceMap = pNewNamespaceMap;
+ }
+ pNewNamespaceMap->Add( sPrefix, sNamespace );
+
+ sName.appendAscii( sXML_xmlns );
+ sName.append( sal_Unicode(':') );
+ sName.append( sPrefix );
+ rAttrList.AddAttribute( sName.makeStringAndClear(), sCDATA,
+ sNamespace );
+ }
+
+ sName.append( sPrefix );
+ sName.append( sal_Unicode(':') );
+ }
+
+ sName.append( pUnknown->GetAttrLName( i ) );
+ rAttrList.AddAttribute( sName.makeStringAndClear(), sCDATA,
+ pUnknown->GetAttrValue(i) );
+ }
+
+ delete pNewNamespaceMap;
+ }
+ else
+ */
+ {
+ handleSpecialItem( rAttrList, rProperty /*rEntry, rItem*/, rUnitConverter, rNamespaceMap ); //, pSet ); Must we transfer the total set any more ?
+ }
+ }
+ else if ( ( maPropMapper->GetEntryFlags( rProperty.mnIndex ) & MID_FLAG_ELEMENT_ITEM_EXPORT ) == 0 )
+ {
+ OUString aValue;
+ const OUString sName( rNamespaceMap.GetQNameByKey( maPropMapper->GetEntryNameSpace( rProperty.mnIndex ),
+ maPropMapper->GetEntryXMLName( rProperty.mnIndex ) ) );
+
+ sal_Bool bRemove = sal_False;
+ if( ( maPropMapper->GetEntryFlags( rProperty.mnIndex ) & MID_FLAG_MERGE_ATTRIBUTE ) != 0 )
+ {
+ aValue = rAttrList.getValueByName( sName );
+ bRemove = aValue.getLength() != 0;
+ }
+
+ if( maPropMapper->exportXML( aValue, rProperty, rUnitConverter ) ) //rEntry.nMemberId & MID_FLAG_MASK, rUnitConverter ) )
+ {
+ if( bRemove )
+ rAttrList.RemoveAttribute( sName );
+ rAttrList.AddAttribute( sName, sCDATA, aValue );
+ }
+ }
+}
+
+void SvXMLExportPropertyMapper::exportElementItems( const uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ sal_uInt16 nFlags,
+ const SvUShorts& rIndexArray ) const
+{
+ const sal_uInt16 nCount = rIndexArray.Count();
+
+ sal_Bool bItemsExported = sal_False;
+ OUString sWS( OUString::createFromAscii(sXML_WS) );
+ for( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ const sal_uInt16 nElement = rIndexArray.GetObject( nIndex );
+
+ DBG_ASSERT( 0 != ( maPropMapper->GetEntryFlags( rProperties[nElement].mnIndex ) & MID_FLAG_ELEMENT_ITEM_EXPORT), "wrong mid flag!" );
+
+ rHandler->ignorableWhitespace( sWS );
+ handleElementItem( rHandler, rProperties[nElement] /**pEntry, *pItem*/, rUnitConverter, rNamespaceMap /*, rSet*/, nFlags);
+ bItemsExported = sal_True;
+ }
+
+ if( bItemsExported )
+ rHandler->ignorableWhitespace( sWS );
+}
+
+/** returns the item with the givin WhichId from the given ItemSet if its
+ set or its default item if its not set and the XML_EXPORT_FLAG_DEEP
+ is set in the flags
+*/
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
new file mode 100644
index 0000000000..20a6c46a2d
--- /dev/null
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -0,0 +1,259 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlimppr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYSETMAPPER_HXX
+#include "xmlprmap.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLCNITM_HXX
+#include "xmlcnitm.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLIMPPR_HXX
+#include "xmlimppr.hxx"
+#endif
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::rtl;
+using namespace ::std;
+
+SvXMLImportPropertyMapper::SvXMLImportPropertyMapper(
+ const UniReference< XMLPropertySetMapper >& rMapper ) :
+ maPropMapper ( rMapper )
+{
+}
+
+SvXMLImportPropertyMapper::~SvXMLImportPropertyMapper()
+{
+}
+
+/** fills the given itemset with the attributes in the given list */
+void SvXMLImportPropertyMapper::importXML(
+ vector< XMLPropertyState >& rProperties,
+ Reference< XAttributeList > xAttrList,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const
+{
+ INT16 nAttr = xAttrList->getLength();
+
+// SvXMLAttrContainerItem *pUnknownItem = 0;
+
+ for( INT16 i=0; i < nAttr; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName, aPrefix, aNamespace;
+ USHORT nPrefix = rNamespaceMap.GetKeyByAttrName( rAttrName, &aPrefix,
+ &aLocalName, &aNamespace );
+
+ if( XML_NAMESPACE_XMLNS == nPrefix )
+ continue;
+
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+
+ sal_Int32 nIndex = -1; // index of actual property map entry
+ sal_uInt32 nFlags = 0; // flags of actual property map entry
+ do
+ {
+ // find an entry for this attribute
+ nIndex = maPropMapper->GetEntryIndex( nPrefix, aLocalName, nIndex );
+
+ if( nIndex > -1 )
+ {
+ // create a XMLPropertyState with an empty value
+
+ nFlags = maPropMapper->GetEntryFlags( nIndex );
+ if( ( nFlags & (MID_FLAG_NO_ITEM_IMPORT |
+ MID_FLAG_ELEMENT_ITEM_IMPORT) ) == 0 )
+ {
+ XMLPropertyState aNewProperty( nIndex );
+ sal_Int32 nReference = -1;
+
+ // if this is a multi attribute check if another attribute already set
+ // this any. If so use this as a initial value
+ if( ( nFlags & MID_FLAG_MERGE_PROPERTY ) != 0 )
+ {
+ const OUString aAPIName( maPropMapper->GetEntryAPIName( nIndex ) );
+ const sal_Int32 nSize = rProperties.size();
+ for( nReference = 0; nReference < nSize; nReference++ )
+ {
+ if( (nIndex != nReference) && (maPropMapper->GetEntryAPIName( rProperties[nReference].mnIndex ) == aAPIName ))
+ {
+ aNewProperty = rProperties[nReference];
+ aNewProperty.mnIndex = nIndex;
+ break;
+ }
+ }
+
+ if( nReference == nSize )
+ nReference = -1;
+ }
+
+ sal_Bool bSet = sal_False;
+ if( ( nFlags & MID_FLAG_SPECIAL_ITEM_IMPORT ) == 0 )
+ {
+ // let the XMLPropertySetMapper decide how to import the value
+ bSet = maPropMapper->importXML( rValue, aNewProperty,
+ rUnitConverter );
+ }
+ else
+ {
+ bSet = handleSpecialItem( aNewProperty, rProperties,
+ rValue, rUnitConverter,
+ rNamespaceMap );
+ }
+ // store the property in the given vector
+ if( bSet )
+ {
+ if( nReference == -1 )
+ rProperties.push_back( aNewProperty );
+ else
+ rProperties[nReference] = aNewProperty;
+ }
+ }
+ else
+ handleNoItem( nIndex, rProperties, rValue, rUnitConverter,
+ rNamespaceMap );
+ }
+ else
+ {
+ /*
+ if( USHRT_MAX != mnUnknownWhich &&
+ // TODO: PI
+ (XML_NAMESPACE_NONE == nPrefix ||
+ XML_NAMESPACE_UNKNOWN == nPrefix) )
+ {
+ if( !pUnknownItem )
+ {
+ const SfxPoolItem* pItem = 0;
+ if( SFX_ITEM_SET == rSet.GetItemState( mnUnknownWhich, TRUE,
+ &pItem ) )
+ {
+ SfxPoolItem *pNew = pItem->Clone();
+ pUnknownItem = PTR_CAST( SvXMLAttrContainerItem, pNew );
+ DBG_ASSERT( pUnknownItem,
+ "SvXMLAttrContainerItem expected" );
+ if( !pUnknownItem )
+ delete pNew;
+ }
+ else
+ {
+ pUnknownItem = new SvXMLAttrContainerItem( mnUnknownWhich );
+ }
+ }
+ if( pUnknownItem )
+ {
+ if( XML_NAMESPACE_NONE == nPrefix )
+ pUnknownItem->AddAttr( aLocalName, rValue );
+ else
+ pUnknownItem->AddAttr( aPrefix, aNamespace, aLocalName,
+ rValue );
+ }
+ }
+ */
+ }
+ }
+ while( ( nIndex >= 0 ) && (( nFlags & MID_FLAG_MULTI_PROPERTY ) != 0 ) );
+ }
+
+/*
+ if( pUnknownItem )
+ {
+ rSet.Put( *pUnknownItem );
+ delete pUnknownItem;
+ }
+*/
+
+ finished( rProperties );
+}
+
+/** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set */
+BOOL SvXMLImportPropertyMapper::handleSpecialItem(
+ XMLPropertyState& rProperty,
+ vector< XMLPropertyState >& rProperties,
+ const OUString& rValue,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const
+{
+ DBG_ERROR( "unsuported special item in xml import" );
+ return FALSE;
+}
+
+/** this method is called for every item that has the MID_FLAG_NO_ITEM_IMPORT flag set */
+BOOL SvXMLImportPropertyMapper::handleNoItem(
+ sal_Int32 nIndex,
+ vector< XMLPropertyState >& rProperties,
+ const OUString& rValue,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap) const
+{
+ DBG_ERROR( "unsuported no item in xml import" );
+ return FALSE;
+}
+
+void SvXMLImportPropertyMapper::finished(
+ vector< XMLPropertyState >& rProperties ) const
+{
+ // nothing to do here
+}
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
new file mode 100644
index 0000000000..201826a370
--- /dev/null
+++ b/xmloff/source/style/xmlnume.cxx
@@ -0,0 +1,794 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlnume.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX
+#include "fonthdl.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_XSTYLEFAMILIESSUPPLIER_HPP_
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_NUMBERINGTYPE_HPP_
+#include <com/sun/star/style/NumberingType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_
+#include <com/sun/star/style/XStyle.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_
+#include <com/sun/star/container/XIndexReplace.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_XBITMAP_HPP_
+#include <com/sun/star/awt/XBitmap.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
+#include <com/sun/star/awt/FontDescriptor.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_HORIORIENTATION_HPP_
+#include <com/sun/star/text/HoriOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_VERTORIENTATION_HPP_
+#include <com/sun/star/text/VertOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XCHAPTERNUMBERINGSUPPLIER_HPP_
+#include <com/sun/star/text/XChapterNumberingSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX
+#include "XMLTextListAutoStylePool.hxx"
+#endif
+#ifndef _XMLOFF_XMLNUME_HXX
+#include "xmlnume.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXP_HXX
+#include "xmlexp.hxx"
+#endif
+
+#ifndef _VCL_VCLENUM_HXX
+#include <vcl/vclenum.hxx>
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] = "SymbolTextDistance";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PARENT_NUMBERING[] = "ParentNumbering";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_CHAR_STYLE_NAME[] = "CharStyleName";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_CHAR[] = "BulletChar";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHIC_BITMAP[] = "GraphicBitmap";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHIC_SIZE[] = "GraphicSize";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_VERT_ORIENT[] = "VertOrient";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = "NumberingType";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PREFIX[] = "Prefix";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SUFFIX[] = "Suffix";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_ADJUST[] = "Adjust";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LEFT_MARGIN[] = "LeftMargin";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET[] =
+ "FirstLineOffset";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_FONT[] = "BulletFont";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHICURL[] = "GraphicURL";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_START_WITH[] = "StartWith";
+
+void SvxXMLNumRuleExport::exportLevelStyles( const uno::Reference< ::com::sun::star::container::XIndexReplace > & xNumRule,
+ sal_Bool bOutline )
+{
+ sal_Int32 nCount = xNumRule ->getCount();
+ for( sal_Int32 i=0; i<nCount; i++ )
+ {
+ uno::Any aEntry( xNumRule->getByIndex( i ) );
+ uno::Sequence<beans::PropertyValue> aSeq;
+ if( aEntry >>= aSeq )
+ {
+ exportLevelStyle( i, aSeq, bOutline );
+ }
+ }
+}
+
+void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel,
+ const uno::Sequence<beans::PropertyValue>& rProps,
+ BOOL bOutline )
+{
+ sal_Int16 eType = NumberingType::CHAR_SPECIAL;
+
+ sal_Int16 eAdjust = HoriOrientation::LEFT;
+ OUString sPrefix, sSuffix;
+ OUString sTextStyleName;
+ sal_Int32 nSpaceBefore = 0, nMinLabelWidth = 0, nMinLabelDist = 0;
+
+ sal_Int16 nStartValue = 1, nDisplayLevels = 1;
+
+ sal_Unicode cBullet = 0xf095;
+ OUString sBulletFontName, sBulletFontStyleName ;
+ sal_Int16 eBulletFontFamily = FAMILY_DONTKNOW;
+ sal_Int16 eBulletFontPitch = PITCH_DONTKNOW;
+ rtl_TextEncoding eBulletFontEncoding = RTL_TEXTENCODING_DONTKNOW;
+
+ OUString sImageURL;
+ uno::Reference< ::com::sun::star::awt::XBitmap > xBitmap;
+ sal_Int32 nImageWidth = 0, nImageHeight = 0;
+ sal_Int16 eImageVertOrient = VertOrientation::LINE_CENTER;
+
+ sal_Int32 nCount = rProps.getLength();
+ const beans::PropertyValue* pPropArray = rProps.getConstArray();
+ for( sal_Int32 i=0; i<nCount; i++ )
+ {
+ const beans::PropertyValue& rProp = pPropArray[i];
+
+ if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_NUMBERINGTYPE, sizeof(XML_UNO_NAME_NRULE_NUMBERINGTYPE) ) )
+ {
+ sal_Int16 nType;
+ rProp.Value >>= nType;
+ if( nType >= NumberingType::CHARS_UPPER_LETTER &&
+ nType <= NumberingType::CHARS_LOWER_LETTER_N )
+ {
+ eType = nType;
+ }
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_PREFIX, sizeof(XML_UNO_NAME_NRULE_PREFIX) ) )
+ {
+ rProp.Value >>= sPrefix;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_SUFFIX, sizeof(XML_UNO_NAME_NRULE_SUFFIX) ) )
+ {
+ rProp.Value >>= sSuffix;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_BULLET_CHAR, sizeof(XML_UNO_NAME_NRULE_BULLET_CHAR) ) )
+ {
+ OUString sValue;
+ rProp.Value >>= sValue;
+ if( sValue.getLength() > 0 )
+ cBullet = (sal_Unicode)sValue[0];
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_ADJUST, sizeof(XML_UNO_NAME_NRULE_ADJUST) ) )
+ {
+ sal_Int16 nValue;
+ rProp.Value >>= nValue;
+ eAdjust = nValue;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_BULLET_FONT, sizeof(XML_UNO_NAME_NRULE_BULLET_FONT) ) )
+ {
+ awt::FontDescriptor rFDesc;
+ if( rProp.Value >>= rFDesc )
+ {
+ sBulletFontName = rFDesc.Name;
+ sBulletFontStyleName = rFDesc.StyleName;
+ eBulletFontFamily = (sal_Int16)rFDesc.Family;
+ eBulletFontPitch = (sal_Int16)rFDesc.Pitch;
+ eBulletFontEncoding = (rtl_TextEncoding)rFDesc.CharSet;
+ }
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_GRAPHICURL, sizeof(XML_UNO_NAME_NRULE_GRAPHICURL) ) )
+ {
+ rProp.Value >>= sImageURL;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_GRAPHIC_BITMAP, sizeof(XML_UNO_NAME_NRULE_GRAPHIC_BITMAP) ) )
+ {
+ rProp.Value >>= xBitmap;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_START_WITH, sizeof(XML_UNO_NAME_NRULE_START_WITH) ) )
+ {
+ rProp.Value >>= nStartValue;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_LEFT_MARGIN, sizeof(XML_UNO_NAME_NRULE_LEFT_MARGIN) ) )
+ {
+ rProp.Value >>= nSpaceBefore;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET, sizeof(XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET) ) )
+ {
+ rProp.Value >>= nMinLabelWidth;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE, sizeof(XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE) ) )
+ {
+ rProp.Value >>= nMinLabelDist;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_PARENT_NUMBERING, sizeof(XML_UNO_NAME_NRULE_PARENT_NUMBERING) ) )
+ {
+ rProp.Value >>= nDisplayLevels;
+ if( nDisplayLevels > nLevel+1 )
+ nDisplayLevels = nLevel+1;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_CHAR_STYLE_NAME, sizeof(XML_UNO_NAME_NRULE_CHAR_STYLE_NAME) ) )
+ {
+ rProp.Value >>= sTextStyleName;
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_GRAPHIC_SIZE, sizeof(XML_UNO_NAME_NRULE_GRAPHIC_SIZE) ) )
+ {
+ awt::Size aSize;
+ if( rProp.Value >>= aSize )
+ {
+ nImageWidth = aSize.Width;
+ nImageHeight = aSize.Height;
+ }
+ }
+ else if( 0 == rProp.Name.compareToAscii( XML_UNO_NAME_NRULE_VERT_ORIENT, sizeof(XML_UNO_NAME_NRULE_VERT_ORIENT) ) )
+ {
+ sal_Int16 nValue;
+ rProp.Value >>= nValue;
+ eImageVertOrient = nValue;
+ }
+ }
+
+ if( bOutline && (NumberingType::CHAR_SPECIAL == eType ||
+ NumberingType::BITMAP == eType) )
+ {
+ DBG_ASSERT( !bOutline,
+ "SvxXMLNumRuleExport::exportLevelStyle: invalid style for outline" );
+ return;
+ }
+
+ GetExport().CheckAttrList();
+
+ // text:level
+ OUStringBuffer sTmp;
+ sTmp.append( nLevel+1L );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_level, sTmp.makeStringAndClear() );
+ if( sTextStyleName.getLength() > 0 )
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name, sTextStyleName );
+ if( sPrefix.getLength() > 0 )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_num_prefix, sPrefix );
+ if( sSuffix.getLength() > 0 )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_num_suffix, sSuffix );
+
+ const sal_Char *pElem = sXML_list_level_style_number;
+ if( NumberingType::CHAR_SPECIAL == eType )
+ {
+ // <text:list-level-style-bullet>
+ pElem = sXML_list_level_style_bullet;
+
+ // text:bullet-char="..."
+ sTmp.append( cBullet );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_bullet_char,
+ sTmp.makeStringAndClear() );
+ }
+ else if( NumberingType::BITMAP == eType )
+ {
+ // <text:list-level-style-image>
+
+ pElem = sXML_list_level_style_image;
+
+
+ if( sImageURL.getLength() )
+ {
+ String sURL( sImageURL );
+ INetURLObject::AbsToRel( sURL );
+ sImageURL = sURL;
+ GetExport().AddAttribute( XML_NAMESPACE_XLINK, sXML_href, sImageURL );
+
+ GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type, sXML_simple );
+ GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_show, sXML_embed );
+ GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onLoad );
+ }
+ else
+ {
+ DBG_ASSERT( !xBitmap.is(),
+ "embedded images are not supported by now" );
+ }
+ }
+ else
+ {
+ // <text:list-level-style-number> or <text:outline-level-style>
+ if( bOutline )
+ pElem = sXML_outline_level_style;
+ else
+ pElem = sXML_list_level_style_number;
+
+ const char *pNumFormat = GetNumFormatValue( eType );
+ if( pNumFormat )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_num_format,
+ pNumFormat );
+ const char *pNumLetterSync = GetNumLetterSync( eType );
+ if( pNumLetterSync )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_num_letter_sync,
+ pNumLetterSync );
+
+ if( nStartValue > 1 )
+ {
+ sTmp.append( (sal_Int32)nStartValue );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_start_value,
+ sTmp.makeStringAndClear() );
+ }
+ if( nDisplayLevels > 1 && NumberingType::NUMBER_NONE != eType )
+ {
+ sTmp.append( (sal_Int32)nDisplayLevels );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_display_levels,
+ sTmp.makeStringAndClear() );
+ }
+ }
+
+ {
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, pElem,
+ sal_True, sal_True );
+
+ nSpaceBefore += nMinLabelWidth;
+ nMinLabelWidth = -nMinLabelWidth;
+ OUStringBuffer sBuffer;
+ if( nSpaceBefore > 0 )
+ {
+ GetExport().GetMM100UnitConverter().convertMeasure( sBuffer, nSpaceBefore );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_space_before,
+ sBuffer.makeStringAndClear() );
+ }
+ if( nMinLabelWidth != 0 )
+ {
+ GetExport().GetMM100UnitConverter().convertMeasure( sBuffer, nMinLabelWidth );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_min_label_width,
+ sBuffer.makeStringAndClear() );
+ }
+ if( nMinLabelDist > 0 )
+ {
+ GetExport().GetMM100UnitConverter().convertMeasure( sBuffer, nMinLabelDist );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_min_label_distance,
+ sBuffer.makeStringAndClear() );
+ }
+ if( HoriOrientation::LEFT != eAdjust )
+ {
+ const char *pValue = 0;
+ switch( eAdjust )
+ {
+ case HoriOrientation::RIGHT: pValue = sXML_end; break;
+ case HoriOrientation::CENTER: pValue = sXML_center; break;
+ }
+ if( pValue )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_FO, sXML_text_align, pValue );
+ }
+
+ if( NumberingType::CHAR_SPECIAL == eType )
+ {
+ if( sBulletFontName.getLength() )
+ {
+ Any aAny;
+ OUString sTmp;
+
+ const SvXMLUnitConverter& rUnitConv =
+ GetExport().GetMM100UnitConverter();
+ XMLFontFamilyNamePropHdl aFamilyNameHdl;
+ aAny <<= sBulletFontName;
+ if( aFamilyNameHdl.exportXML( sTmp, aAny, rUnitConv ) )
+ GetExport().AddAttribute( XML_NAMESPACE_FO,
+ sXML_font_family, sTmp );
+
+ if( sBulletFontStyleName.getLength() )
+ GetExport().AddAttribute( XML_NAMESPACE_FO,
+ sXML_font_style_name,
+ sBulletFontStyleName );
+
+ XMLFontFamilyPropHdl aFamilyHdl;
+ aAny <<= (sal_Int16)eBulletFontFamily;
+ if( aFamilyHdl.exportXML( sTmp, aAny, rUnitConv ) )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE,
+ sXML_font_family_generic, sTmp );
+
+ XMLFontPitchPropHdl aPitchHdl;
+ aAny <<= (sal_Int16)eBulletFontPitch;
+ if( aPitchHdl.exportXML( sTmp, aAny, rUnitConv ) )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE,
+ sXML_font_pitch, sTmp );
+
+ XMLFontEncodingPropHdl aEncHdl;
+ aAny <<= (sal_Int16)eBulletFontEncoding;
+ if( aEncHdl.exportXML( sTmp, aAny, rUnitConv ) )
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE,
+ sXML_font_charset, sTmp );
+ }
+ }
+ else if( NumberingType::BITMAP == eType )
+ {
+ const char *pValue = 0;
+ switch( eImageVertOrient )
+ {
+ case VertOrientation::BOTTOM: // yes, its OK: BOTTOM means that the baseline
+ // hits the frame at its topmost position
+ case VertOrientation::LINE_TOP:
+ case VertOrientation::CHAR_TOP:
+ pValue = sXML_top;
+ break;
+ case VertOrientation::CENTER:
+ case VertOrientation::LINE_CENTER:
+ case VertOrientation::CHAR_CENTER:
+ pValue = sXML_middle;
+ break;
+ case VertOrientation::TOP: // yes, its OK: TOP means that the baseline
+ // hits the frame at its bottommost position
+ case VertOrientation::LINE_BOTTOM:
+ case VertOrientation::CHAR_BOTTOM:
+ pValue = sXML_bottom;
+ break;
+ }
+ if( pValue )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_vertical_pos, pValue );
+
+ pValue = 0;
+ switch( eImageVertOrient )
+ {
+ case VertOrientation::TOP:
+ case VertOrientation::CENTER:
+ case VertOrientation::BOTTOM:
+ pValue = sXML_baseline;
+ break;
+ case VertOrientation::LINE_TOP:
+ case VertOrientation::LINE_CENTER:
+ case VertOrientation::LINE_BOTTOM:
+ pValue = sXML_line;
+ break;
+ case VertOrientation::CHAR_TOP:
+ case VertOrientation::CHAR_CENTER:
+ case VertOrientation::CHAR_BOTTOM:
+ pValue = sXML_char;
+ break;
+ }
+ if( pValue )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_vertical_rel, pValue );
+
+ if( nImageWidth > 0 )
+ {
+ GetExport().GetMM100UnitConverter().convertMeasure( sBuffer, nImageWidth );
+ GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_width,
+ sBuffer.makeStringAndClear() );
+ }
+
+ if( nImageHeight > 0 )
+ {
+ GetExport().GetMM100UnitConverter().convertMeasure( sBuffer, nImageHeight );
+ GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_height,
+ sBuffer.makeStringAndClear() );
+ }
+ }
+
+ if( GetExport().GetAttrList().getLength() > 0 )
+ {
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
+ sXML_properties, sal_True, sal_True );
+ }
+ }
+}
+
+
+uno::Reference< ::com::sun::star::container::XIndexReplace > SvxXMLNumRuleExport::GetUNONumRule() const
+{
+ return uno::Reference< ::com::sun::star::container::XIndexReplace > ();
+}
+
+void SvxXMLNumRuleExport::AddListStyleAttributes()
+{
+}
+
+
+SvxXMLNumRuleExport::SvxXMLNumRuleExport( SvXMLExport& rExp ) :
+ rExport( rExp ),
+ sNumberingRules( RTL_CONSTASCII_USTRINGPARAM( "NumberingRules" ) ),
+ sIsPhysical( RTL_CONSTASCII_USTRINGPARAM( "IsPhysical" ) ),
+ sIsContinuousNumbering( RTL_CONSTASCII_USTRINGPARAM( "IsContinuousNumbering" ) )
+{
+}
+
+SvxXMLNumRuleExport::~SvxXMLNumRuleExport()
+{
+}
+
+void SvxXMLNumRuleExport::Export( const OUString& rName,
+ sal_Bool bContNumbering )
+{
+ GetExport().CheckAttrList();
+
+ // style:name="..."
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_name, rName );
+
+ // text:consecutive-numbering="..."
+ if( bContNumbering )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_TEXT, sXML_consecutive_numbering,
+ sXML_true );
+
+ // other application specific attributes
+ AddListStyleAttributes();
+
+ OUString sElem = GetExport().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TEXT,
+ OUString::createFromAscii(sXML_list_style) );
+ GetExport().GetDocHandler()->ignorableWhitespace( sWS );
+ GetExport().GetDocHandler()->startElement( sElem, GetExport().GetXAttrList() );
+ GetExport().ClearAttrList();
+
+ uno::Reference< ::com::sun::star::container::XIndexReplace > xNumRule = GetUNONumRule();
+ if( xNumRule.is() )
+ exportLevelStyles( xNumRule );
+
+ GetExport().GetDocHandler()->ignorableWhitespace( sWS );
+ GetExport().GetDocHandler()->endElement( sElem );
+}
+
+void SvxXMLNumRuleExport::ExportOutline()
+{
+ GetExport().CheckAttrList();
+
+ OUString sElem = GetExport().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TEXT,
+ OUString::createFromAscii(sXML_outline_style) );
+ GetExport().GetDocHandler()->ignorableWhitespace( sWS );
+ GetExport().GetDocHandler()->startElement( sElem, GetExport().GetXAttrList() );
+
+ uno::Reference< ::com::sun::star::container::XIndexReplace > xNumRule = GetUNONumRule();
+ if( xNumRule.is() )
+ exportLevelStyles( xNumRule, sal_True );
+
+ GetExport().GetDocHandler()->ignorableWhitespace( sWS );
+ GetExport().GetDocHandler()->endElement( sElem );
+}
+
+void SvxXMLNumRuleExport::exportNumberingRule(
+ const OUString& rName,
+ const Reference< XIndexReplace >& rNumRule )
+{
+ Reference< XPropertySet > xPropSet( rNumRule, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo;
+ if( xPropSet.is() )
+ xPropSetInfo = xPropSet->getPropertySetInfo();
+
+ GetExport().CheckAttrList();
+
+ // style:name="..."
+ GetExport().AddAttribute( XML_NAMESPACE_STYLE, sXML_name, rName );
+
+ // text:consecutive-numbering="..."
+ sal_Bool bContNumbering = sal_False;
+ if( xPropSetInfo.is() &&
+ xPropSetInfo->hasPropertyByName( sIsContinuousNumbering ) )
+ {
+ Any aAny( xPropSet->getPropertyValue( sIsContinuousNumbering ) );
+ bContNumbering = *(sal_Bool *)aAny.getValue();
+ }
+ if( bContNumbering )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_TEXT,
+ sXML_consecutive_numbering, sXML_true );
+
+ // other application specific attributes
+ AddListStyleAttributes();
+
+ {
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, sXML_list_style ,
+ sal_True, sal_True );
+ exportLevelStyles( rNumRule );
+ }
+}
+
+sal_Bool SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
+{
+ Reference< XPropertySet > xPropSet( rStyle, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
+
+ Any aAny;
+
+ // Don't export styles that aren't existing really. This may be the
+ // case for StarOffice Writer's pool styles.
+ if( xPropSetInfo->hasPropertyByName( sIsPhysical ) )
+ {
+ aAny = xPropSet->getPropertyValue( sIsPhysical );
+ if( !*(sal_Bool *)aAny.getValue() )
+ return sal_False;
+ }
+
+ aAny = xPropSet->getPropertyValue( sNumberingRules );
+ Reference<XIndexReplace> xNumRule;
+ aAny >>= xNumRule;
+
+ OUString sName = rStyle->getName();
+
+ exportNumberingRule( sName, xNumRule );
+
+ return sal_True;
+}
+
+void SvxXMLNumRuleExport::exportOutline()
+{
+ Reference< XChapterNumberingSupplier > xCNSupplier( GetExport().GetModel(),
+ UNO_QUERY );
+ DBG_ASSERT( xCNSupplier.is(), "no chapter numbering supplier" );
+
+ if( xCNSupplier.is() )
+ {
+ Reference< XIndexReplace > xNumRule( xCNSupplier->getChapterNumberingRules() );
+ DBG_ASSERT( xNumRule.is(), "no chapter numbering rules" );
+
+ if( xNumRule.is() )
+ {
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ sXML_outline_style, sal_True, sal_True );
+ exportLevelStyles( xNumRule, sal_True );
+ }
+ }
+}
+
+void SvxXMLNumRuleExport::exportStyles( sal_Bool bUsed,
+ XMLTextListAutoStylePool *pPool )
+{
+ exportOutline();
+
+ Reference< XStyleFamiliesSupplier > xFamiliesSupp( GetExport().GetModel(), UNO_QUERY );
+ DBG_ASSERT( xFamiliesSupp.is(), "No XStyleFamiliesSupplier from XModel for export!" );
+ if( xFamiliesSupp.is() )
+ {
+ Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() );
+ DBG_ASSERT( xFamiliesSupp.is(), "getStyleFamilies() from XModel failed for export!" );
+
+ if( xFamilies.is() )
+ {
+ const OUString aNumberStyleName( RTL_CONSTASCII_USTRINGPARAM( "NumberingStyles" ));
+
+ Reference< XIndexAccess > xStyles;
+ if( xFamilies->hasByName( aNumberStyleName ) )
+ {
+ xFamilies->getByName( aNumberStyleName ) >>= xStyles;
+
+ DBG_ASSERT( xStyles.is(), "Style not found for export!" );
+
+ if( xStyles.is() )
+ {
+ const sal_Int32 nStyles = xStyles->getCount();
+
+ for( sal_Int32 i=0; i < nStyles; i++ )
+ {
+ Reference< XStyle > xStyle;
+ xStyles->getByIndex( i ) >>= xStyle;
+
+ if( !bUsed || xStyle->isInUse() )
+ {
+ exportStyle( xStyle );
+ if( pPool )
+ pPool->RegisterName( xStyle->getName() );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+const sal_Char *SvxXMLNumRuleExport::GetNumFormatValue( sal_Int16 eNumType )
+{
+ const sal_Char *pFormat = 0;
+ switch( eNumType )
+ {
+ case NumberingType::CHARS_UPPER_LETTER: pFormat = sXML_A; break;
+ case NumberingType::CHARS_LOWER_LETTER: pFormat = sXML_a; break;
+ case NumberingType::ROMAN_UPPER: pFormat = sXML_I; break;
+ case NumberingType::ROMAN_LOWER: pFormat = sXML_i; break;
+ case NumberingType::ARABIC: pFormat = sXML_1; break;
+ case NumberingType::CHARS_UPPER_LETTER_N: pFormat = sXML_A; break;
+ case NumberingType::CHARS_LOWER_LETTER_N: pFormat = sXML_a; break;
+ case NumberingType::NUMBER_NONE: pFormat = sXML__empty; break;
+
+ case NumberingType::CHAR_SPECIAL:
+ case NumberingType::PAGE_DESCRIPTOR:
+ case NumberingType::BITMAP:
+ DBG_ASSERT( pFormat, "invalid number format" );
+ break;
+ }
+
+ return pFormat;
+}
+
+const sal_Char *SvxXMLNumRuleExport::GetNumLetterSync( sal_Int16 eNumType )
+{
+ const sal_Char *pSync = 0;
+ switch( eNumType )
+ {
+ case NumberingType::CHARS_UPPER_LETTER:
+ case NumberingType::CHARS_LOWER_LETTER:
+ case NumberingType::ROMAN_UPPER:
+ case NumberingType::ROMAN_LOWER:
+ case NumberingType::ARABIC:
+ case NumberingType::NUMBER_NONE:
+ // default
+ // pSync = sXML_false;
+ break;
+
+ case NumberingType::CHARS_UPPER_LETTER_N:
+ case NumberingType::CHARS_LOWER_LETTER_N:
+ pSync = sXML_true;
+ break;
+
+ case NumberingType::CHAR_SPECIAL:
+ case NumberingType::PAGE_DESCRIPTOR:
+ case NumberingType::BITMAP:
+ DBG_ASSERT( pSync, "invalid number format" );
+ break;
+ }
+
+ return pSync;
+}
+
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
new file mode 100644
index 0000000000..c758965798
--- /dev/null
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -0,0 +1,1218 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlnumfe.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _SVSTDARR_ULONGS
+#define _ZFORLIST_DECLARE_TABLE
+
+#include <svtools/svstdarr.hxx>
+#include <svtools/zforlist.hxx>
+#include <svtools/zformat.hxx>
+#include <svtools/numuno.hxx>
+#include <tools/isolang.hxx>
+#include <tools/debug.hxx>
+#include <tools/solmath.hxx>
+#include <rtl/ustrbuf.hxx>
+
+#include "xmlnumfe.hxx"
+#include "xmlnmspe.hxx"
+#include "xmlkywd.hxx"
+#include "xmluconv.hxx"
+#include "attrlist.hxx"
+#include "nmspmap.hxx"
+#include "families.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//-------------------------------------------------------------------------
+
+//! enum Sc_SymbolType is in source/numbers/zforscan.hxx
+
+#define XMLNUM_SYMBOLTYPE_STRING (-1)
+#define XMLNUM_SYMBOLTYPE_DEL (-2)
+#define XMLNUM_SYMBOLTYPE_BLANK (-3)
+#define XMLNUM_SYMBOLTYPE_STAR (-4)
+#define XMLNUM_SYMBOLTYPE_DIGIT (-5)
+#define XMLNUM_SYMBOLTYPE_DECSEP (-6)
+#define XMLNUM_SYMBOLTYPE_THSEP (-7)
+#define XMLNUM_SYMBOLTYPE_EXP (-8)
+#define XMLNUM_SYMBOLTYPE_FRAC (-9)
+#define XMLNUM_SYMBOLTYPE_EMPTY (-10)
+#define XMLNUM_SYMBOLTYPE_FRACBLANK (-11)
+#define XMLNUM_SYMBOLTYPE_COMMENT (-12)
+#define XMLNUM_SYMBOLTYPE_CURRENCY (-13)
+#define XMLNUM_SYMBOLTYPE_CURRDEL (-14)
+#define XMLNUM_SYMBOLTYPE_CURREXT (-15)
+
+//-------------------------------------------------------------------------
+
+// 4th condition for text formats doesn't work
+//#define XMLNUM_MAX_PARTS 4
+#define XMLNUM_MAX_PARTS 3
+
+//-------------------------------------------------------------------------
+
+class SvXMLNumUsedList_Impl
+{
+ SvULongs aUsed;
+ SvULongs aWasUsed;
+
+public:
+ SvXMLNumUsedList_Impl();
+ ~SvXMLNumUsedList_Impl();
+
+ void SetUsed( sal_uInt32 nKey );
+ sal_Bool IsUsed( sal_uInt32 nKey ) const;
+ sal_Bool IsWasUsed( sal_uInt32 nKey ) const;
+ void Export();
+};
+
+//-------------------------------------------------------------------------
+
+//
+//! SvXMLNumUsedList_Impl should be optimized!
+//
+
+SvXMLNumUsedList_Impl::SvXMLNumUsedList_Impl()
+{
+}
+
+SvXMLNumUsedList_Impl::~SvXMLNumUsedList_Impl()
+{
+}
+
+void SvXMLNumUsedList_Impl::SetUsed( sal_uInt32 nKey )
+{
+ if ( !IsUsed( nKey ) && !IsWasUsed(nKey) )
+ aUsed.Insert( nKey, aUsed.Count() );
+}
+
+sal_Bool SvXMLNumUsedList_Impl::IsUsed( sal_uInt32 nKey ) const
+{
+ sal_uInt16 nCount = aUsed.Count();
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
+ if ( aUsed[i] == nKey )
+ return sal_True;
+
+ return sal_False;
+}
+
+sal_Bool SvXMLNumUsedList_Impl::IsWasUsed( sal_uInt32 nKey ) const
+{
+ sal_uInt16 nCount = aWasUsed.Count();
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
+ if ( aWasUsed[i] == nKey )
+ return sal_True;
+
+ return sal_False;
+}
+
+void SvXMLNumUsedList_Impl::Export()
+{
+ sal_uInt16 nCount = aUsed.Count();
+ for (sal_uInt16 i = 0; i < nCount; i++)
+ aWasUsed.Insert( aUsed[i], aWasUsed.Count());
+ aUsed.Remove(0, nCount);
+}
+
+//-------------------------------------------------------------------------
+
+SvXMLNumFmtExport::SvXMLNumFmtExport(
+ const uno::Reference< xml::sax::XDocumentHandler >& rHdl,
+ const uno::Reference< util::XNumberFormatsSupplier >& rSupp ) :
+ xHandler( rHdl ),
+ pFormatter( NULL ),
+ pNamespaceMap( NULL ),
+ sCDATA( OUString::createFromAscii( sXML_CDATA ) ),
+ sWS( OUString::createFromAscii( sXML_WS ) )
+{
+ // supplier must be SvNumberFormatsSupplierObj
+ SvNumberFormatsSupplierObj* pObj =
+ SvNumberFormatsSupplierObj::getImplementation( rSupp );
+ if (pObj)
+ pFormatter = pObj->GetNumberFormatter();
+
+ pAttrList = new SvXMLAttributeList;
+ xAttrList = pAttrList;
+
+ pUsedList = new SvXMLNumUsedList_Impl;
+}
+
+SvXMLNumFmtExport::~SvXMLNumFmtExport()
+{
+ delete pUsedList;
+}
+
+//-------------------------------------------------------------------------
+
+//
+// helper methods
+//
+
+OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, sal_Bool bDefPart )
+{
+ OUStringBuffer aFmtName( 10L );
+ aFmtName.append( (sal_Unicode)'N' );
+ aFmtName.append( nKey );
+ if (!bDefPart)
+ {
+ aFmtName.append( (sal_Unicode)'P' );
+ aFmtName.append( nPart );
+ }
+ return aFmtName.makeStringAndClear();
+}
+
+void SvXMLNumFmtExport::AddTextualAttr_Impl( sal_Bool bText )
+{
+ if ( bText ) // non-textual
+ {
+ OUString sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_textual ) );
+ OUString sAttrValue = OUString::createFromAscii( sXML_true );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+}
+
+void SvXMLNumFmtExport::AddStyleAttr_Impl( sal_Bool bLong )
+{
+ if ( bLong ) // short is default
+ {
+ OUString sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_style ) );
+ OUString sAttrValue = OUString::createFromAscii( sXML_long );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+}
+
+void SvXMLNumFmtExport::AddLanguageAttr_Impl( sal_Int32 nLang )
+{
+ if ( nLang != LANGUAGE_SYSTEM )
+ {
+ String aLangStr, aCountryStr;
+ ConvertLanguageToIsoNames( nLang, aLangStr, aCountryStr );
+
+ OUString sAttrName, sAttrValue;
+ if (aLangStr.Len())
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, OUString::createFromAscii(sXML_language) );
+ sAttrValue = aLangStr;
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+ if (aCountryStr.Len())
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, OUString::createFromAscii(sXML_country) );
+ sAttrValue = aCountryStr;
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+//
+// methods to write individual elements within a format
+//
+
+void SvXMLNumFmtExport::WriteColorElement_Impl( const Color& rColor )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE,
+ OUString::createFromAscii( sXML_properties ) );
+
+ OUString sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_FO,
+ OUString::createFromAscii(sXML_color) );
+ OUStringBuffer aColStr( 7 );
+ SvXMLUnitConverter::convertColor( aColStr, rColor );
+ OUString sAttrValue = aColStr.makeStringAndClear();
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteTextElement_Impl( const OUString& rString )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_text ) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->characters( rString );
+ xHandler->endElement( sElem );
+}
+
+void SvXMLNumFmtExport::WriteCurrencyElement_Impl( const OUString& rString,
+ const OUString& rExt )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_currency_symbol ) );
+
+ if ( rExt.getLength() )
+ {
+ sal_Int32 nLang = rExt.toInt32(16); // hex
+ if ( nLang < 0 ) // extension string may contain "-" separator
+ nLang = -nLang;
+ AddLanguageAttr_Impl( nLang ); // adds to pAttrList
+ }
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->characters( rString );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteBooleanElement_Impl()
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_boolean ) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+}
+
+void SvXMLNumFmtExport::WriteTextContentElement_Impl()
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_text_content ) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+}
+
+// date elements
+
+void SvXMLNumFmtExport::WriteDayElement_Impl( sal_Bool bLong )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_day ) );
+
+ AddStyleAttr_Impl( bLong ); // adds to pAttrList
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteMonthElement_Impl( sal_Bool bLong, sal_Bool bText )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_month ) );
+
+ AddStyleAttr_Impl( bLong ); // adds to pAttrList
+ AddTextualAttr_Impl( bText ); // adds to pAttrList
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteYearElement_Impl( sal_Bool bLong )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_year ) );
+
+ AddStyleAttr_Impl( bLong ); // adds to pAttrList
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteDayOfWeekElement_Impl( sal_Bool bLong )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_day_of_week ) );
+
+ AddStyleAttr_Impl( bLong ); // adds to pAttrList
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteWeekElement_Impl()
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_week_of_year ) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+}
+
+void SvXMLNumFmtExport::WriteQuarterElement_Impl( sal_Bool bLong )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_quarter ) );
+
+ AddStyleAttr_Impl( bLong ); // adds to pAttrList
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+}
+
+// time elements
+
+void SvXMLNumFmtExport::WriteHoursElement_Impl( sal_Bool bLong )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_hours ) );
+
+ AddStyleAttr_Impl( bLong ); // adds to pAttrList
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteMinutesElement_Impl( sal_Bool bLong )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_minutes ) );
+
+ AddStyleAttr_Impl( bLong ); // adds to pAttrList
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteSecondsElement_Impl( sal_Bool bLong, sal_uInt16 nDecimals )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_seconds ) );
+
+ AddStyleAttr_Impl( bLong ); // adds to pAttrList
+ if ( nDecimals > 0 )
+ {
+ OUString sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_decimal_places ) );
+ OUString sAttrValue = OUString::valueOf( (sal_Int32) nDecimals );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteAMPMElement_Impl()
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_am_pm ) );
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+}
+
+// numbers
+
+void SvXMLNumFmtExport::WriteNumberElement_Impl(
+ sal_Int32 nDecimals, sal_Int32 nInteger,
+ const OUString& rDashStr, sal_Bool bGrouping )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_number ) );
+ OUString sAttrName, sAttrValue;
+
+ // decimals
+ if ( nDecimals >= 0 ) // negative = automatic
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_decimal_places ) );
+ sAttrValue = OUString::valueOf( nDecimals );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // integer digits
+ if ( nInteger >= 0 ) // negative = automatic
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_min_integer_digits ) );
+ sAttrValue = OUString::valueOf( nInteger );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // decimal replacement (dashes)
+ if ( rDashStr.getLength() )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_decimal_replacement ) );
+ sAttrValue = rDashStr;
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // (automatic) grouping separator
+ if ( bGrouping )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_grouping ) );
+ sAttrValue = OUString::createFromAscii(sXML_true);
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteScientificElement_Impl(
+ sal_Int32 nDecimals, sal_Int32 nInteger,
+ sal_Bool bGrouping, sal_Int32 nExp )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_scientific_number ) );
+ OUString sAttrName, sAttrValue;
+
+ // decimals
+ if ( nDecimals >= 0 ) // negative = automatic
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_decimal_places ) );
+ sAttrValue = OUString::valueOf( nDecimals );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // integer digits
+ if ( nInteger >= 0 ) // negative = automatic
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_min_integer_digits ) );
+ sAttrValue = OUString::valueOf( nInteger );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // (automatic) grouping separator
+ if ( bGrouping )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_grouping ) );
+ sAttrValue = OUString::createFromAscii(sXML_true);
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // exponent digits
+ if ( nExp >= 0 )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_min_exponent_digits ) );
+ sAttrValue = OUString::valueOf( nExp );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+ pAttrList->Clear();
+}
+
+void SvXMLNumFmtExport::WriteFractionElement_Impl(
+ sal_Int32 nInteger, sal_Bool bGrouping,
+ sal_Int32 nNumerator, sal_Int32 nDenominator )
+{
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_fraction ) );
+ OUString sAttrName, sAttrValue;
+
+ // integer digits
+ if ( nInteger >= 0 ) // negative = default (no integer part)
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_min_integer_digits ) );
+ sAttrValue = OUString::valueOf( nInteger );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // (automatic) grouping separator
+ if ( bGrouping )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_grouping ) );
+ sAttrValue = OUString::createFromAscii(sXML_true);
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // numerator digits
+ if ( nNumerator >= 0 )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_min_numerator_digits ) );
+ sAttrValue = OUString::valueOf( nNumerator );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // denominator digits
+ if ( nDenominator >= 0 )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_min_denominator_digits ) );
+ sAttrValue = OUString::valueOf( nDenominator );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+ pAttrList->Clear();
+}
+
+// mapping (condition)
+
+void SvXMLNumFmtExport::WriteMapElement_Impl( sal_Int32 nOp, double fLimit,
+ sal_Int32 nKey, sal_Int32 nPart )
+{
+ if ( nOp != NUMBERFORMAT_OP_NO )
+ {
+ // style namespace
+
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE,
+ OUString::createFromAscii( sXML_map ) );
+ OUString sAttrName, sAttrValue;
+
+ OUStringBuffer aCondStr( 20L );
+ aCondStr.appendAscii( "value()" ); //! define constant
+ switch ( nOp )
+ {
+ case NUMBERFORMAT_OP_EQ: aCondStr.append( (sal_Unicode) '=' ); break;
+ case NUMBERFORMAT_OP_NE: aCondStr.appendAscii( "<>" ); break;
+ case NUMBERFORMAT_OP_LT: aCondStr.append( (sal_Unicode) '<' ); break;
+ case NUMBERFORMAT_OP_LE: aCondStr.appendAscii( "<=" ); break;
+ case NUMBERFORMAT_OP_GT: aCondStr.append( (sal_Unicode) '>' ); break;
+ case NUMBERFORMAT_OP_GE: aCondStr.appendAscii( ">=" ); break;
+ default:
+ DBG_ERROR("unknown operator");
+ }
+ String aValStr;
+ SolarMath::DoubleToString( aValStr, fLimit, 'A', INT_MAX, '.', TRUE );
+ aCondStr.append( aValStr );
+
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE,
+ OUString::createFromAscii( sXML_condition ) );
+ sAttrValue = aCondStr.makeStringAndClear();
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE,
+ OUString::createFromAscii( sXML_apply_style_name ) );
+ sAttrValue = lcl_CreateStyleName( nKey, nPart, sal_False );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ xHandler->endElement( sElem );
+ pAttrList->Clear();
+ }
+}
+
+//-------------------------------------------------------------------------
+// for old (automatic) currency formats: parse currency symbol from text
+
+xub_StrLen lcl_FindSymbol( const String& sUpperStr, const String& sCurString )
+{
+ // search for currency symbol
+ // Quoting as in ImpSvNumberformatScan::Symbol_Division
+
+ xub_StrLen nCPos = 0;
+ while (nCPos != STRING_NOTFOUND)
+ {
+ nCPos = sUpperStr.Search( sCurString, nCPos );
+ if (nCPos != STRING_NOTFOUND)
+ {
+ // in Quotes?
+ xub_StrLen nQ = SvNumberformat::GetQuoteEnd( sUpperStr, nCPos );
+ if ( nQ == STRING_NOTFOUND )
+ {
+ // dm can be escaped as "dm or \d
+ sal_Unicode c;
+ if ( nCPos == 0 ||
+ ((c = sUpperStr.GetChar(xub_StrLen(nCPos-1))) != '"'
+ && c != '\\') )
+ {
+ return nCPos; // found
+ }
+ else
+ nCPos++; // continue
+ }
+ else
+ nCPos = nQ + 1; // continue after quote end
+ }
+ }
+ return STRING_NOTFOUND; // not found
+}
+
+void SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString,
+ const International& rIntl )
+{
+ String sCurString = rIntl.GetCurrSymbol();
+ String sUpperStr = rIntl.Upper(rString);
+ xub_StrLen nPos = lcl_FindSymbol( sUpperStr, sCurString );
+ if ( nPos != STRING_NOTFOUND )
+ {
+ sal_Int32 nLength = rString.getLength();
+ sal_Int32 nCurLen = sCurString.Len();
+ sal_Int32 nCont = nPos + nCurLen;
+
+ // text before currency symbol
+ if ( nPos > 0 )
+ WriteTextElement_Impl( rString.copy( 0, nPos ) );
+
+ // currency symbol (empty string -> default)
+ OUString sEmpty;
+ WriteCurrencyElement_Impl( sEmpty, sEmpty );
+
+ // text after currency symbol
+ if ( nCont < nLength )
+ WriteTextElement_Impl( rString.copy( nCont, nLength-nCont ) );
+ }
+ else
+ WriteTextElement_Impl( rString ); // simple text
+}
+
+//-------------------------------------------------------------------------
+
+//
+// export one part (condition)
+//
+
+void SvXMLNumFmtExport::ExportPart_Impl( SvNumberformat& rFormat, sal_uInt32 nKey,
+ sal_uInt16 nPart, sal_Bool bDefPart )
+{
+ //! for the default part, pass the coditions from the other parts!
+
+ //
+ // element name
+ //
+
+ NfIndexTableOffset eBuiltIn = pFormatter->GetIndexTableOffset( nKey );
+ short nFmtType = rFormat.GetType() & ~NUMBERFORMAT_DEFINED;
+ OUString sType;
+ switch ( nFmtType )
+ {
+//! case 0: // may occur in imported documents (?)
+ case NUMBERFORMAT_NUMBER:
+ case NUMBERFORMAT_SCIENTIFIC:
+ case NUMBERFORMAT_FRACTION:
+ sType = OUString::createFromAscii(sXML_number_style);
+ break;
+ case NUMBERFORMAT_PERCENT:
+ sType = OUString::createFromAscii(sXML_percentage_style);
+ break;
+ case NUMBERFORMAT_CURRENCY:
+ sType = OUString::createFromAscii(sXML_currency_style);
+ break;
+ case NUMBERFORMAT_DATE:
+ case NUMBERFORMAT_DATETIME:
+ sType = OUString::createFromAscii(sXML_date_style);
+ break;
+ case NUMBERFORMAT_TIME:
+ sType = OUString::createFromAscii(sXML_time_style);
+ break;
+ case NUMBERFORMAT_TEXT:
+ sType = OUString::createFromAscii(sXML_text_style);
+ break;
+ case NUMBERFORMAT_LOGICAL:
+ sType = OUString::createFromAscii(sXML_boolean_style);
+ break;
+ }
+ if (!sType.getLength())
+ {
+ DBG_ERROR("unknown format type");
+ return;
+ }
+ OUString sElem = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, sType );
+ OUString sAttrName, sAttrValue;
+ sal_Bool bUserDef = ( ( rFormat.GetType() & NUMBERFORMAT_DEFINED ) != 0 );
+
+ //! get FormatInfo from each part separately
+
+ sal_Bool bThousand = sal_False;
+ sal_Bool bRed = sal_False;
+ sal_uInt16 nPrecision = 0;
+ sal_uInt16 nLeading = 0;
+ rFormat.GetFormatSpecialInfo( bThousand, bRed, nPrecision, nLeading);
+
+ //
+ // common attributes for format
+ //
+
+ // format name (generated from key) - style namespace
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_name) );
+ sAttrValue = lcl_CreateStyleName( nKey, nPart, bDefPart );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_STYLE, OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_family)));
+ sAttrValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_DATA_STYLE_NAME));
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+
+ // language / country
+ LanguageType nLang = rFormat.GetLanguage();
+ AddLanguageAttr_Impl( nLang ); // adds to pAttrList
+
+ // title (comment)
+ // titles for builtin formats are not written
+ sAttrValue = rFormat.GetComment();
+ if ( sAttrValue.getLength() && bUserDef && bDefPart )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, OUString::createFromAscii(sXML_title) );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // automatic ordering for currency and date formats
+ // only used for some built-in formats
+ BOOL bAutoOrder = ( eBuiltIn == NF_CURRENCY_1000INT || eBuiltIn == NF_CURRENCY_1000DEC2 ||
+ eBuiltIn == NF_CURRENCY_1000INT_RED || eBuiltIn == NF_CURRENCY_1000DEC2_RED ||
+ eBuiltIn == NF_CURRENCY_1000DEC2_DASHED ||
+ eBuiltIn == NF_DATE_SYSTEM_SHORT || eBuiltIn == NF_DATE_SYSTEM_LONG ||
+ eBuiltIn == NF_DATE_SYS_MMYY || eBuiltIn == NF_DATE_SYS_DDMMM ||
+ eBuiltIn == NF_DATE_SYS_DDMMYYYY || eBuiltIn == NF_DATE_SYS_DDMMYY ||
+ eBuiltIn == NF_DATE_SYS_DMMMYY || eBuiltIn == NF_DATE_SYS_DMMMYYYY ||
+ eBuiltIn == NF_DATE_SYS_DMMMMYYYY || eBuiltIn == NF_DATE_SYS_NNDMMMYY ||
+ eBuiltIn == NF_DATE_SYS_NNDMMMMYYYY || eBuiltIn == NF_DATE_SYS_NNNNDMMMMYYYY );
+ if ( bAutoOrder )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_automatic_order ) );
+ sAttrValue = OUString::createFromAscii( sXML_true );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // format source (for date and time formats)
+ // only used for some built-in formats
+ BOOL bSystemDate = ( eBuiltIn == NF_DATE_SYSTEM_SHORT ||
+ eBuiltIn == NF_DATE_SYSTEM_LONG ||
+ eBuiltIn == NF_DATETIME_SYSTEM_SHORT_HHMM );
+ BOOL bLongSysDate = ( eBuiltIn == NF_DATE_SYSTEM_LONG );
+ if ( bSystemDate )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_format_source ) );
+ sAttrValue = OUString::createFromAscii( sXML_language );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ // overflow for time formats as in [hh]:mm
+ // controlled by bThousand from number format info
+ // default for truncate-on-overflow is true
+ if ( nFmtType == NUMBERFORMAT_TIME && bThousand )
+ {
+ sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER,
+ OUString::createFromAscii( sXML_truncate_on_overflow ) );
+ sAttrValue = OUString::createFromAscii( sXML_false );
+ pAttrList->AddAttribute( sAttrName, sCDATA, sAttrValue );
+ }
+
+ xHandler->ignorableWhitespace( sWS );
+ xHandler->startElement( sElem, xAttrList );
+ pAttrList->Clear();
+
+ //
+ // color (properties element)
+ //
+
+ const Color* pCol = rFormat.GetColor( nPart );
+ if (pCol)
+ WriteColorElement_Impl(*pCol);
+
+ //
+ // format elements
+ //
+
+ if ( eBuiltIn == NF_NUMBER_STANDARD )
+ {
+ // default number format contains just one number element
+ WriteNumberElement_Impl( -1, 1, OUString(), sal_False );
+ }
+ else if ( eBuiltIn == NF_BOOLEAN )
+ {
+ // boolean format contains just one boolean element
+ WriteBooleanElement_Impl();
+ }
+ else
+ {
+ // first loop to collect attributes
+
+ sal_Bool bDecDashes = sal_False;
+ sal_Bool bExpFound = sal_False;
+ sal_Bool bCurrFound = sal_False;
+ sal_Int32 nExpDigits = 0;
+ OUString sCurrExt;
+ sal_uInt16 nPos = 0;
+ sal_Bool bEnd = sal_False;
+ while (!bEnd)
+ {
+ short nElemType = rFormat.GetNumForType( nPart, nPos, sal_False );
+ const XubString* pElemStr = rFormat.GetNumForString( nPart, nPos, sal_False );
+
+ switch ( nElemType )
+ {
+ case 0:
+ bEnd = sal_True; // end of format reached
+ break;
+ case XMLNUM_SYMBOLTYPE_DIGIT:
+ if ( bExpFound && pElemStr )
+ nExpDigits += pElemStr->Len();
+ else if ( !bDecDashes && pElemStr && pElemStr->GetChar(0) == '-' )
+ bDecDashes = TRUE;
+ break;
+ case XMLNUM_SYMBOLTYPE_EXP:
+ bExpFound = TRUE; // following digits are exponent digits
+ break;
+ case XMLNUM_SYMBOLTYPE_CURRENCY:
+ bCurrFound = TRUE;
+ break;
+ case XMLNUM_SYMBOLTYPE_CURREXT:
+ if (pElemStr)
+ sCurrExt = *pElemStr;
+ break;
+ }
+ ++nPos;
+ }
+
+ // second loop to write elements
+
+ sal_Bool bNumWritten = sal_False;
+ short nPrevType = 0;
+ nPos = 0;
+ bEnd = sal_False;
+ while (!bEnd)
+ {
+ short nElemType = rFormat.GetNumForType( nPart, nPos, sal_False );
+ const XubString* pElemStr = rFormat.GetNumForString( nPart, nPos, sal_False );
+
+ switch ( nElemType )
+ {
+ case 0:
+ bEnd = sal_True; // end of format reached
+ break;
+ case XMLNUM_SYMBOLTYPE_STRING:
+ if (pElemStr)
+ {
+ if ( ( nPrevType == NF_KEY_S || nPrevType == NF_KEY_SS ) &&
+ ( pElemStr->EqualsAscii( "," ) || pElemStr->EqualsAscii( "." ) ) &&
+ nPrecision > 0 )
+ {
+ // decimal separator after seconds is implied by
+ // "decimal-places" attribute and must not be written
+ // as text element
+ //! difference between '.' and ',' is lost here
+ }
+ else if ( nFmtType == NUMBERFORMAT_CURRENCY && !bCurrFound )
+ {
+ // automatic currency symbol is implemented as part of
+ // normal text -> search for the symbol
+ International aIntl( nLang );
+ WriteTextWithCurrency_Impl( *pElemStr, aIntl );
+ }
+ else
+ WriteTextElement_Impl( *pElemStr );
+ }
+ break;
+ case NF_KEY_CCC:
+ //! must be different from short automatic format
+ //! but should still be empty (meaning automatic)
+ // pElemStr is "CCC"
+ if (pElemStr)
+ WriteCurrencyElement_Impl( *pElemStr, OUString() );
+ break;
+ case XMLNUM_SYMBOLTYPE_CURRENCY:
+ if (pElemStr)
+ WriteCurrencyElement_Impl( *pElemStr, sCurrExt );
+ break;
+ case XMLNUM_SYMBOLTYPE_DIGIT:
+ if (!bNumWritten) // write number part
+ {
+ switch ( nFmtType )
+ {
+ case NUMBERFORMAT_NUMBER:
+ case NUMBERFORMAT_CURRENCY:
+ case NUMBERFORMAT_PERCENT:
+ {
+ // decimals
+ // only some built-in formats have automatic decimals
+ sal_Int32 nDecimals = nPrecision; // from GetFormatSpecialInfo
+ if ( eBuiltIn == NF_NUMBER_STANDARD ||
+ eBuiltIn == NF_CURRENCY_1000DEC2 ||
+ eBuiltIn == NF_CURRENCY_1000DEC2_RED ||
+ eBuiltIn == NF_CURRENCY_1000DEC2_CCC ||
+ eBuiltIn == NF_CURRENCY_1000DEC2_DASHED )
+ nDecimals = -1;
+
+ // integer digits
+ // only one built-in format has automatic integer digits
+ sal_Int32 nInteger = nLeading;
+ if ( eBuiltIn == NF_NUMBER_SYSTEM )
+ nInteger = -1;
+
+ // string for decimal replacement
+ // has to be taken from nPrecision
+ // (positive number even for automatic decimals)
+ String sDashStr;
+ if ( bDecDashes && nPrecision > 0 )
+ sDashStr.Fill( nPrecision, '-' );
+
+ WriteNumberElement_Impl( nDecimals, nInteger, sDashStr, bThousand );
+ }
+ break;
+ case NUMBERFORMAT_SCIENTIFIC:
+ WriteScientificElement_Impl( nPrecision, nLeading, bThousand, nExpDigits );
+ break;
+ case NUMBERFORMAT_FRACTION:
+ WriteFractionElement_Impl( nLeading, bThousand, nPrecision, nPrecision );
+ break;
+ }
+
+ bNumWritten = sal_True;
+ }
+ break;
+ case XMLNUM_SYMBOLTYPE_DEL:
+ if ( pElemStr && *pElemStr == XubString('@') )
+ WriteTextContentElement_Impl();
+ break;
+
+ // date elements:
+
+ case NF_KEY_T:
+ case NF_KEY_TT:
+ {
+ sal_Bool bLong = ( nElemType == NF_KEY_TT );
+ WriteDayElement_Impl( bSystemDate ? bLongSysDate : bLong );
+ }
+ break;
+ case NF_KEY_TTT:
+ case NF_KEY_TTTT:
+ case NF_KEY_NN:
+ case NF_KEY_NNN:
+ case NF_KEY_NNNN:
+ {
+ sal_Bool bLong = ( nElemType == NF_KEY_NNN || nElemType == NF_KEY_NNNN ||
+ nElemType == NF_KEY_TTTT );
+ WriteDayOfWeekElement_Impl( bSystemDate ? bLongSysDate : bLong );
+ if ( nElemType == NF_KEY_NNNN )
+ {
+ // write additional text element for separator
+ International aIntl( nLang );
+ WriteTextElement_Impl( aIntl.GetLongDateDayOfWeekSep() );
+ }
+ }
+ break;
+ case NF_KEY_M:
+ case NF_KEY_MM:
+ case NF_KEY_MMM:
+ case NF_KEY_MMMM:
+ {
+ sal_Bool bLong = ( nElemType == NF_KEY_MM || nElemType == NF_KEY_MMMM );
+ sal_Bool bText = ( nElemType == NF_KEY_MMM || nElemType == NF_KEY_MMMM );
+ WriteMonthElement_Impl( ( bSystemDate ? bLongSysDate : bLong ), bText );
+ }
+ break;
+ case NF_KEY_JJ:
+ case NF_KEY_JJJJ:
+ {
+ sal_Bool bLong = ( nElemType == NF_KEY_JJJJ );
+ WriteYearElement_Impl( bSystemDate ? bLongSysDate : bLong );
+ }
+ break;
+ case NF_KEY_Q:
+ case NF_KEY_QQ:
+ {
+ sal_Bool bLong = ( nElemType == NF_KEY_QQ );
+ WriteQuarterElement_Impl( bSystemDate ? bLongSysDate : bLong );
+ }
+ break;
+ case NF_KEY_WW:
+ WriteWeekElement_Impl();
+ break;
+
+ // time elements (bSystemDate is not used):
+
+ case NF_KEY_H:
+ case NF_KEY_HH:
+ WriteHoursElement_Impl( nElemType == NF_KEY_HH );
+ break;
+ case NF_KEY_MI:
+ case NF_KEY_MMI:
+ WriteMinutesElement_Impl( nElemType == NF_KEY_MMI );
+ break;
+ case NF_KEY_S:
+ case NF_KEY_SS:
+ WriteSecondsElement_Impl( ( nElemType == NF_KEY_SS ), nPrecision );
+ break;
+ case NF_KEY_AMPM:
+ case NF_KEY_AP:
+ WriteAMPMElement_Impl(); // short/long?
+ break;
+ }
+ nPrevType = nElemType;
+ ++nPos;
+ }
+ }
+
+ //
+ // mapping (conditions) must be last elements
+ //
+
+ SvNumberformatLimitOps eOp1, eOp2;
+ double fLimit1, fLimit2;
+ rFormat.GetConditions( eOp1, fLimit1, eOp2, fLimit2 );
+ if (bDefPart)
+ {
+ WriteMapElement_Impl( eOp1, fLimit1, nKey, 0 );
+ WriteMapElement_Impl( eOp2, fLimit2, nKey, 1 );
+ }
+
+ xHandler->endElement( sElem );
+}
+
+//-------------------------------------------------------------------------
+
+//
+// export one format
+//
+
+void SvXMLNumFmtExport::ExportFormat_Impl( SvNumberformat& rFormat, sal_uInt32 nKey )
+{
+ sal_uInt16 nUsedParts = 0;
+ sal_uInt16 nPart;
+ for (nPart=0; nPart<XMLNUM_MAX_PARTS; nPart++)
+ if (rFormat.GetNumForType( nPart, 0, sal_False ) != 0)
+ nUsedParts = nPart+1;
+
+ for (nPart=0; nPart<nUsedParts; nPart++)
+ {
+ sal_Bool bDefault = ( nPart+1 == nUsedParts ); // last = default
+ ExportPart_Impl( rFormat, nKey, nPart, bDefault );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+//
+// export method called by application
+//
+
+void SvXMLNumFmtExport::Export( const SvXMLNamespaceMap& rNamespaceMap, sal_Bool bIsAutoStyle )
+{
+ if ( !pFormatter )
+ return; // no formatter -> no entries
+
+ pNamespaceMap = &rNamespaceMap;
+
+ SvUShorts aLanguages;
+ pFormatter->GetUsedLanguages( aLanguages );
+ sal_uInt16 nLangCount = aLanguages.Count();
+ for (sal_uInt16 nLangPos=0; nLangPos<nLangCount; nLangPos++)
+ {
+ LanguageType nLang = aLanguages[nLangPos];
+
+ sal_uInt32 nStandard;
+ SvNumberFormatTable& rTable = pFormatter->GetEntryTable(
+ NUMBERFORMAT_ALL, nStandard, nLang );
+ SvNumberformat* pFormat = rTable.First();
+ while (pFormat)
+ {
+ sal_uInt32 nKey = rTable.GetCurKey();
+ if ( (!bIsAutoStyle &&( pFormat->GetType() & NUMBERFORMAT_DEFINED )) ||
+ pUsedList->IsUsed( nKey ) )
+ {
+ // user-defined and used formats are exported
+ ExportFormat_Impl( *pFormat, nKey );
+ // if it is a user-defined Format it will be added else nothing will hapen
+ pUsedList->SetUsed(nKey);
+ }
+
+ pFormat = rTable.Next();
+ }
+ }
+ pUsedList->Export();
+
+ pNamespaceMap = NULL;
+}
+
+OUString SvXMLNumFmtExport::GetStyleName( sal_uInt32 nKey )
+{
+ DBG_ASSERT(pUsedList->IsUsed(nKey) || pUsedList->IsWasUsed(nKey), "There is no written Data-Style");
+ return lcl_CreateStyleName( nKey, 0, sal_True );
+}
+
+void SvXMLNumFmtExport::SetUsed( sal_uInt32 nKey )
+{
+ pUsedList->SetUsed( nKey );
+}
+
+
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
new file mode 100644
index 0000000000..6a17d9c1a4
--- /dev/null
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -0,0 +1,1365 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlnumfi.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _ZFORLIST_DECLARE_TABLE
+
+#include <svtools/zforlist.hxx>
+#include <svtools/zformat.hxx>
+#include <svtools/numuno.hxx>
+#include <tools/isolang.hxx>
+#include <tools/debug.hxx>
+#include <rtl/ustrbuf.hxx>
+
+#include "xmlnumfi.hxx"
+#include "xmltkmap.hxx"
+#include "xmlkywd.hxx"
+#include "xmlnmspe.hxx"
+#include "xmlictxt.hxx"
+#include "xmlimp.hxx"
+#include "xmluconv.hxx"
+#include "nmspmap.hxx"
+#include "families.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+//-------------------------------------------------------------------------
+
+struct SvXMLNumFmtEntry
+{
+ rtl::OUString aName;
+ sal_uInt32 nKey;
+ sal_Bool bVolatile;
+
+ SvXMLNumFmtEntry( const rtl::OUString& rN, sal_uInt32 nK, sal_Bool bV ) :
+ aName(rN), nKey(nK), bVolatile(bV) {}
+};
+
+typedef SvXMLNumFmtEntry* SvXMLNumFmtEntryPtr;
+SV_DECL_PTRARR_DEL( SvXMLNumFmtEntryArr, SvXMLNumFmtEntryPtr, 4, 4 );
+
+//-------------------------------------------------------------------------
+
+class SvXMLNumImpData
+{
+ SvNumberFormatter* pFormatter;
+ SvXMLTokenMap* pStylesElemTokenMap;
+ SvXMLTokenMap* pStyleElemTokenMap;
+ SvXMLTokenMap* pStyleAttrTokenMap;
+ SvXMLTokenMap* pStyleElemAttrTokenMap;
+ International* pInternational;
+ SvXMLNumFmtEntryArr aNameEntries;
+
+public:
+ SvXMLNumImpData( SvNumberFormatter* pFmt );
+ ~SvXMLNumImpData();
+
+ SvNumberFormatter* GetNumberFormatter() const { return pFormatter; }
+ const SvXMLTokenMap& GetStylesElemTokenMap();
+ const SvXMLTokenMap& GetStyleElemTokenMap();
+ const SvXMLTokenMap& GetStyleAttrTokenMap();
+ const SvXMLTokenMap& GetStyleElemAttrTokenMap();
+ const International& GetInternational( LanguageType nLang );
+ sal_uInt32 GetKeyForName( const rtl::OUString& rName );
+ void AddKey( sal_uInt32 nKey, const rtl::OUString& rName );
+};
+
+
+struct SvXMLNumberInfo
+{
+ sal_Int32 nDecimals;
+ sal_Int32 nInteger;
+ sal_Int32 nExpDigits;
+ sal_Int32 nNumerDigits;
+ sal_Int32 nDenomDigits;
+ sal_Bool bGrouping;
+ sal_Bool bDecReplace;
+
+ SvXMLNumberInfo()
+ {
+ nDecimals = nInteger = nExpDigits = nNumerDigits = nDenomDigits = -1;
+ bGrouping = bDecReplace = sal_False;
+ }
+};
+
+class SvXMLNumFmtElementContext : public SvXMLImportContext
+{
+ SvXMLNumFormatContext& rParent;
+ sal_uInt16 nType;
+ rtl::OUStringBuffer aContent;
+ SvXMLNumberInfo aNumInfo;
+ LanguageType nElementLang;
+ sal_Bool bLong;
+ sal_Bool bTextual;
+
+public:
+ SvXMLNumFmtElementContext( SvXMLImport& rImport, USHORT nPrfx,
+ const rtl::OUString& rLName,
+ SvXMLNumFormatContext& rParentContext, sal_uInt16 nNewType,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual ~SvXMLNumFmtElementContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual void Characters( const rtl::OUString& rChars );
+ virtual void EndElement();
+};
+
+
+class SvXMLNumFmtMapContext : public SvXMLImportContext
+{
+ SvXMLNumFormatContext& rParent;
+ rtl::OUString sCondition;
+ rtl::OUString sName;
+
+public:
+ SvXMLNumFmtMapContext( SvXMLImport& rImport, USHORT nPrfx,
+ const rtl::OUString& rLName,
+ SvXMLNumFormatContext& rParentContext,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual ~SvXMLNumFmtMapContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual void Characters( const rtl::OUString& rChars );
+ virtual void EndElement();
+};
+
+
+class SvXMLNumFmtPropContext : public SvXMLImportContext
+{
+ SvXMLNumFormatContext& rParent;
+ Color aColor;
+ sal_Bool bColSet;
+
+public:
+ SvXMLNumFmtPropContext( SvXMLImport& rImport, USHORT nPrfx,
+ const rtl::OUString& rLName,
+ SvXMLNumFormatContext& rParentContext,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual ~SvXMLNumFmtPropContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual void Characters( const rtl::OUString& rChars );
+ virtual void EndElement();
+};
+
+
+//-------------------------------------------------------------------------
+
+enum SvXMLStylesTokens
+{
+ XML_TOK_STYLES_NUMBER_STYLE,
+ XML_TOK_STYLES_CURRENCY_STYLE,
+ XML_TOK_STYLES_PERCENTAGE_STYLE,
+ XML_TOK_STYLES_DATE_STYLE,
+ XML_TOK_STYLES_TIME_STYLE,
+ XML_TOK_STYLES_BOOLEAN_STYLE,
+ XML_TOK_STYLES_TEXT_STYLE
+};
+
+enum SvXMLStyleTokens
+{
+ XML_TOK_STYLE_TEXT,
+ XML_TOK_STYLE_NUMBER,
+ XML_TOK_STYLE_SCIENTIFIC_NUMBER,
+ XML_TOK_STYLE_FRACTION,
+ XML_TOK_STYLE_CURRENCY_SYMBOL,
+ XML_TOK_STYLE_DAY,
+ XML_TOK_STYLE_MONTH,
+ XML_TOK_STYLE_YEAR,
+ XML_TOK_STYLE_DAY_OF_WEEK,
+ XML_TOK_STYLE_WEEK_OF_YEAR,
+ XML_TOK_STYLE_QUARTER,
+ XML_TOK_STYLE_HOURS,
+ XML_TOK_STYLE_AM_PM,
+ XML_TOK_STYLE_MINUTES,
+ XML_TOK_STYLE_SECONDS,
+ XML_TOK_STYLE_BOOLEAN,
+ XML_TOK_STYLE_TEXT_CONTENT,
+ XML_TOK_STYLE_PROPERTIES,
+ XML_TOK_STYLE_MAP
+};
+
+enum SvXMLStyleAttrTokens
+{
+ XML_TOK_STYLE_ATTR_NAME,
+ XML_TOK_STYLE_ATTR_LANGUAGE,
+ XML_TOK_STYLE_ATTR_COUNTRY,
+ XML_TOK_STYLE_ATTR_TITLE,
+ XML_TOK_STYLE_ATTR_AUTOMATIC_ORDER,
+ XML_TOK_STYLE_ATTR_FORMAT_SOURCE,
+ XML_TOK_STYLE_ATTR_TRUNCATE_ON_OVERFLOW,
+ XML_TOK_STYLE_ATTR_VOLATILE
+};
+
+enum SvXMLStyleElemAttrTokens
+{
+ XML_TOK_ELEM_ATTR_DECIMAL_PLACES,
+ XML_TOK_ELEM_ATTR_MIN_INTEGER_DIGITS,
+ XML_TOK_ELEM_ATTR_GROUPING,
+ XML_TOK_ELEM_ATTR_DECIMAL_REPLACEMENT,
+ XML_TOK_ELEM_ATTR_MIN_EXPONENT_DIGITS,
+ XML_TOK_ELEM_ATTR_MIN_NUMERATOR_DIGITS,
+ XML_TOK_ELEM_ATTR_MIN_DENOMINATOR_DIGITS,
+ XML_TOK_ELEM_ATTR_LANGUAGE,
+ XML_TOK_ELEM_ATTR_COUNTRY,
+ XML_TOK_ELEM_ATTR_STYLE,
+ XML_TOK_ELEM_ATTR_TEXTUAL
+};
+
+//-------------------------------------------------------------------------
+
+//
+// standard colors
+//
+
+#define XML_NUMF_COLORCOUNT 10
+
+static ColorData aNumFmtStdColors[XML_NUMF_COLORCOUNT] =
+{
+ COL_BLACK,
+ COL_LIGHTBLUE,
+ COL_LIGHTGREEN,
+ COL_LIGHTCYAN,
+ COL_LIGHTRED,
+ COL_LIGHTMAGENTA,
+ COL_BROWN,
+ COL_GRAY,
+ COL_YELLOW,
+ COL_WHITE
+};
+
+//
+// token maps
+//
+
+static __FAR_DATA SvXMLTokenMapEntry aStylesElemMap[] =
+{
+ // style elements
+ { XML_NAMESPACE_NUMBER, sXML_number_style, XML_TOK_STYLES_NUMBER_STYLE },
+ { XML_NAMESPACE_NUMBER, sXML_currency_style, XML_TOK_STYLES_CURRENCY_STYLE },
+ { XML_NAMESPACE_NUMBER, sXML_percentage_style, XML_TOK_STYLES_PERCENTAGE_STYLE },
+ { XML_NAMESPACE_NUMBER, sXML_date_style, XML_TOK_STYLES_DATE_STYLE },
+ { XML_NAMESPACE_NUMBER, sXML_time_style, XML_TOK_STYLES_TIME_STYLE },
+ { XML_NAMESPACE_NUMBER, sXML_boolean_style, XML_TOK_STYLES_BOOLEAN_STYLE },
+ { XML_NAMESPACE_NUMBER, sXML_text_style, XML_TOK_STYLES_TEXT_STYLE },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aStyleElemMap[] =
+{
+ // elements in a style
+ { XML_NAMESPACE_NUMBER, sXML_text, XML_TOK_STYLE_TEXT },
+ { XML_NAMESPACE_NUMBER, sXML_number, XML_TOK_STYLE_NUMBER },
+ { XML_NAMESPACE_NUMBER, sXML_scientific_number, XML_TOK_STYLE_SCIENTIFIC_NUMBER },
+ { XML_NAMESPACE_NUMBER, sXML_fraction, XML_TOK_STYLE_FRACTION },
+ { XML_NAMESPACE_NUMBER, sXML_currency_symbol, XML_TOK_STYLE_CURRENCY_SYMBOL },
+ { XML_NAMESPACE_NUMBER, sXML_day, XML_TOK_STYLE_DAY },
+ { XML_NAMESPACE_NUMBER, sXML_month, XML_TOK_STYLE_MONTH },
+ { XML_NAMESPACE_NUMBER, sXML_year, XML_TOK_STYLE_YEAR },
+ { XML_NAMESPACE_NUMBER, sXML_day_of_week, XML_TOK_STYLE_DAY_OF_WEEK },
+ { XML_NAMESPACE_NUMBER, sXML_week_of_year, XML_TOK_STYLE_WEEK_OF_YEAR },
+ { XML_NAMESPACE_NUMBER, sXML_quarter, XML_TOK_STYLE_QUARTER },
+ { XML_NAMESPACE_NUMBER, sXML_hours, XML_TOK_STYLE_HOURS },
+ { XML_NAMESPACE_NUMBER, sXML_am_pm, XML_TOK_STYLE_AM_PM },
+ { XML_NAMESPACE_NUMBER, sXML_minutes, XML_TOK_STYLE_MINUTES },
+ { XML_NAMESPACE_NUMBER, sXML_seconds, XML_TOK_STYLE_SECONDS },
+ { XML_NAMESPACE_NUMBER, sXML_boolean, XML_TOK_STYLE_BOOLEAN },
+ { XML_NAMESPACE_NUMBER, sXML_text_content, XML_TOK_STYLE_TEXT_CONTENT },
+ { XML_NAMESPACE_STYLE, sXML_properties, XML_TOK_STYLE_PROPERTIES },
+ { XML_NAMESPACE_STYLE, sXML_map, XML_TOK_STYLE_MAP },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aStyleAttrMap[] =
+{
+ // attributes for a style
+ { XML_NAMESPACE_STYLE, sXML_name, XML_TOK_STYLE_ATTR_NAME },
+ { XML_NAMESPACE_NUMBER, sXML_language, XML_TOK_STYLE_ATTR_LANGUAGE },
+ { XML_NAMESPACE_NUMBER, sXML_country, XML_TOK_STYLE_ATTR_COUNTRY },
+ { XML_NAMESPACE_NUMBER, sXML_title, XML_TOK_STYLE_ATTR_TITLE },
+ { XML_NAMESPACE_NUMBER, sXML_automatic_order, XML_TOK_STYLE_ATTR_AUTOMATIC_ORDER },
+ { XML_NAMESPACE_NUMBER, sXML_format_source, XML_TOK_STYLE_ATTR_FORMAT_SOURCE },
+ { XML_NAMESPACE_NUMBER, sXML_truncate_on_overflow, XML_TOK_STYLE_ATTR_TRUNCATE_ON_OVERFLOW },
+ { XML_NAMESPACE_STYLE, sXML_volatile, XML_TOK_STYLE_ATTR_VOLATILE },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aStyleElemAttrMap[] =
+{
+ // attributes for an element within a style
+ { XML_NAMESPACE_NUMBER, sXML_decimal_places, XML_TOK_ELEM_ATTR_DECIMAL_PLACES },
+ { XML_NAMESPACE_NUMBER, sXML_min_integer_digits, XML_TOK_ELEM_ATTR_MIN_INTEGER_DIGITS },
+ { XML_NAMESPACE_NUMBER, sXML_grouping, XML_TOK_ELEM_ATTR_GROUPING },
+ { XML_NAMESPACE_NUMBER, sXML_decimal_replacement, XML_TOK_ELEM_ATTR_DECIMAL_REPLACEMENT },
+ { XML_NAMESPACE_NUMBER, sXML_min_exponent_digits, XML_TOK_ELEM_ATTR_MIN_EXPONENT_DIGITS },
+ { XML_NAMESPACE_NUMBER, sXML_min_numerator_digits, XML_TOK_ELEM_ATTR_MIN_NUMERATOR_DIGITS },
+ { XML_NAMESPACE_NUMBER, sXML_min_denominator_digits, XML_TOK_ELEM_ATTR_MIN_DENOMINATOR_DIGITS },
+ { XML_NAMESPACE_NUMBER, sXML_language, XML_TOK_ELEM_ATTR_LANGUAGE },
+ { XML_NAMESPACE_NUMBER, sXML_country, XML_TOK_ELEM_ATTR_COUNTRY },
+ { XML_NAMESPACE_NUMBER, sXML_style, XML_TOK_ELEM_ATTR_STYLE },
+ { XML_NAMESPACE_NUMBER, sXML_textual, XML_TOK_ELEM_ATTR_TEXTUAL },
+ XML_TOKEN_MAP_END
+};
+
+// maps for SvXMLUnitConverter::convertEnum
+
+static __FAR_DATA SvXMLEnumMapEntry aStyleValueMap[] =
+{
+ { sXML_short, sal_False },
+ { sXML_long, sal_True },
+ { 0, 0 }
+};
+
+static __FAR_DATA SvXMLEnumMapEntry aFormatSourceMap[] =
+{
+ { sXML_fixed, sal_False },
+ { sXML_language, sal_True },
+ { 0, 0 }
+};
+
+//-------------------------------------------------------------------------
+
+SV_IMPL_PTRARR( SvXMLNumFmtEntryArr, SvXMLNumFmtEntryPtr );
+
+//-------------------------------------------------------------------------
+
+//
+// SvXMLNumImpData
+//
+
+SvXMLNumImpData::SvXMLNumImpData( SvNumberFormatter* pFmt ) :
+ pFormatter(pFmt),
+ pStylesElemTokenMap(NULL),
+ pStyleElemTokenMap(NULL),
+ pStyleAttrTokenMap(NULL),
+ pStyleElemAttrTokenMap(NULL),
+ pInternational(NULL)
+{
+}
+
+SvXMLNumImpData::~SvXMLNumImpData()
+{
+ delete pStylesElemTokenMap;
+ delete pStyleElemTokenMap;
+ delete pStyleAttrTokenMap;
+ delete pStyleElemAttrTokenMap;
+ delete pInternational;
+}
+
+sal_uInt32 SvXMLNumImpData::GetKeyForName( const rtl::OUString& rName )
+{
+ USHORT nCount = aNameEntries.Count();
+ for (USHORT i=0; i<nCount; i++)
+ {
+ const SvXMLNumFmtEntry* pObj = aNameEntries[i];
+ if ( pObj->aName == rName )
+ return pObj->nKey; // found
+ }
+ return NUMBERFORMAT_ENTRY_NOT_FOUND;
+}
+
+void SvXMLNumImpData::AddKey( sal_uInt32 nKey, const rtl::OUString& rName )
+{
+ sal_Bool bVolatile = sal_False;
+ SvXMLNumFmtEntry* pObj = new SvXMLNumFmtEntry( rName, nKey, bVolatile );
+ aNameEntries.Insert( pObj, aNameEntries.Count() );
+}
+
+const SvXMLTokenMap& SvXMLNumImpData::GetStylesElemTokenMap()
+{
+ if( !pStylesElemTokenMap )
+ pStylesElemTokenMap = new SvXMLTokenMap( aStylesElemMap );
+ return *pStylesElemTokenMap;
+}
+
+const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemTokenMap()
+{
+ if( !pStyleElemTokenMap )
+ pStyleElemTokenMap = new SvXMLTokenMap( aStyleElemMap );
+ return *pStyleElemTokenMap;
+}
+
+const SvXMLTokenMap& SvXMLNumImpData::GetStyleAttrTokenMap()
+{
+ if( !pStyleAttrTokenMap )
+ pStyleAttrTokenMap = new SvXMLTokenMap( aStyleAttrMap );
+ return *pStyleAttrTokenMap;
+}
+
+const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemAttrTokenMap()
+{
+ if( !pStyleElemAttrTokenMap )
+ pStyleElemAttrTokenMap = new SvXMLTokenMap( aStyleElemAttrMap );
+ return *pStyleElemAttrTokenMap;
+}
+
+const International& SvXMLNumImpData::GetInternational( LanguageType nLang )
+{
+ if ( !pInternational || pInternational->GetLanguage() != nLang )
+ {
+ delete pInternational;
+ pInternational = new International( nLang );
+ }
+ return *pInternational;
+}
+
+//-------------------------------------------------------------------------
+
+//
+// SvXMLNumFmtMapContext
+//
+
+SvXMLNumFmtMapContext::SvXMLNumFmtMapContext( SvXMLImport& rImport,
+ USHORT nPrfx, const rtl::OUString& rLName,
+ SvXMLNumFormatContext& rParentContext,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ rParent( rParentContext )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ if ( nPrefix == XML_NAMESPACE_STYLE )
+ {
+ if ( aLocalName.compareToAscii(sXML_condition) == 0 )
+ sCondition = sValue;
+ else if ( aLocalName.compareToAscii(sXML_apply_style_name) == 0 )
+ sName = sValue;
+ }
+ }
+}
+
+SvXMLNumFmtMapContext::~SvXMLNumFmtMapContext()
+{
+}
+
+SvXMLImportContext* SvXMLNumFmtMapContext::CreateChildContext(
+ USHORT nPrfx, const rtl::OUString& rLName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList )
+{
+ // no elements supported - use default context
+ return new SvXMLImportContext( GetImport(), nPrfx, rLName );
+}
+
+void SvXMLNumFmtMapContext::Characters( const rtl::OUString& rChars )
+{
+}
+
+void SvXMLNumFmtMapContext::EndElement()
+{
+ rParent.AddCondition( sCondition, sName );
+}
+
+//-------------------------------------------------------------------------
+
+//
+// SvXMLNumFmtPropContext
+//
+
+SvXMLNumFmtPropContext::SvXMLNumFmtPropContext( SvXMLImport& rImport,
+ USHORT nPrfx, const rtl::OUString& rLName,
+ SvXMLNumFormatContext& rParentContext,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ rParent( rParentContext ),
+ bColSet( sal_False )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+ if ( nPrefix == XML_NAMESPACE_FO && aLocalName.compareToAscii(sXML_color) == 0 )
+ bColSet = SvXMLUnitConverter::convertColor( aColor, sValue );
+ }
+}
+
+SvXMLNumFmtPropContext::~SvXMLNumFmtPropContext()
+{
+}
+
+SvXMLImportContext* SvXMLNumFmtPropContext::CreateChildContext(
+ USHORT nPrfx, const rtl::OUString& rLName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList )
+{
+ // no elements supported - use default context
+ return new SvXMLImportContext( GetImport(), nPrfx, rLName );
+}
+
+void SvXMLNumFmtPropContext::Characters( const rtl::OUString& rChars )
+{
+}
+
+void SvXMLNumFmtPropContext::EndElement()
+{
+ if (bColSet)
+ rParent.AddColor( aColor );
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool lcl_ValidChar( sal_Unicode cChar, sal_uInt16 nFormatType )
+{
+ // see ImpSvNumberformatScan::Next_Symbol
+ if ( cChar == ' ' ||
+ cChar == '-' ||
+ cChar == '/' ||
+ cChar == '.' ||
+ cChar == ',' ||
+ cChar == ':' ||
+ cChar == '\'' )
+ return sal_True; // for all format types
+
+ // percent sign must be used without quotes for percentage styles only
+ if ( nFormatType == XML_TOK_STYLES_PERCENTAGE_STYLE && cChar == '%' )
+ return sal_True;
+
+ return sal_False;
+}
+
+//
+// SvXMLNumFmtElementContext
+//
+
+SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport,
+ USHORT nPrfx, const rtl::OUString& rLName,
+ SvXMLNumFormatContext& rParentContext, sal_uInt16 nNewType,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ rParent( rParentContext ),
+ nType( nNewType ),
+ nElementLang( LANGUAGE_SYSTEM ),
+ bLong( FALSE ),
+ bTextual( FALSE )
+{
+ OUString sLanguage, sCountry;
+ sal_Int32 nAttrVal;
+ sal_Bool bAttrBool;
+ sal_uInt16 nAttrEnum;
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ const SvXMLTokenMap& rTokenMap = rParent.GetData()->GetStyleElemAttrTokenMap();
+ sal_uInt16 nToken = rTokenMap.Get( nPrefix, aLocalName );
+
+ switch (nToken)
+ {
+ case XML_TOK_ELEM_ATTR_DECIMAL_PLACES:
+ if ( SvXMLUnitConverter::convertNumber( nAttrVal, sValue, 0 ) )
+ aNumInfo.nDecimals = nAttrVal;
+ break;
+ case XML_TOK_ELEM_ATTR_MIN_INTEGER_DIGITS:
+ if ( SvXMLUnitConverter::convertNumber( nAttrVal, sValue, 0 ) )
+ aNumInfo.nInteger = nAttrVal;
+ break;
+ case XML_TOK_ELEM_ATTR_GROUPING:
+ if ( SvXMLUnitConverter::convertBool( bAttrBool, sValue ) )
+ aNumInfo.bGrouping = bAttrBool;
+ break;
+ case XML_TOK_ELEM_ATTR_DECIMAL_REPLACEMENT:
+ if ( sValue.getLength() > 0 )
+ aNumInfo.bDecReplace = sal_True; // only a default string is supported
+ break;
+ case XML_TOK_ELEM_ATTR_MIN_EXPONENT_DIGITS:
+ if ( SvXMLUnitConverter::convertNumber( nAttrVal, sValue, 0 ) )
+ aNumInfo.nExpDigits = nAttrVal;
+ break;
+ case XML_TOK_ELEM_ATTR_MIN_NUMERATOR_DIGITS:
+ if ( SvXMLUnitConverter::convertNumber( nAttrVal, sValue, 0 ) )
+ aNumInfo.nNumerDigits = nAttrVal;
+ break;
+ case XML_TOK_ELEM_ATTR_MIN_DENOMINATOR_DIGITS:
+ if ( SvXMLUnitConverter::convertNumber( nAttrVal, sValue, 0 ) )
+ aNumInfo.nDenomDigits = nAttrVal;
+ break;
+ case XML_TOK_ELEM_ATTR_LANGUAGE:
+ sLanguage = sValue;
+ break;
+ case XML_TOK_ELEM_ATTR_COUNTRY:
+ sCountry = sValue;
+ break;
+ case XML_TOK_ELEM_ATTR_STYLE:
+ if ( SvXMLUnitConverter::convertEnum( nAttrEnum, sValue, aStyleValueMap ) )
+ bLong = (sal_Bool) nAttrEnum;
+ break;
+ case XML_TOK_ELEM_ATTR_TEXTUAL:
+ if ( SvXMLUnitConverter::convertBool( bAttrBool, sValue ) )
+ bTextual = bAttrBool;
+ break;
+ }
+ }
+
+ if ( sLanguage.getLength() || sCountry.getLength() )
+ {
+ nElementLang = ConvertIsoNamesToLanguage( sLanguage, sCountry );
+ if ( nElementLang == LANGUAGE_DONTKNOW )
+ nElementLang = LANGUAGE_SYSTEM; //! error handling for invalid locales?
+ }
+}
+
+SvXMLNumFmtElementContext::~SvXMLNumFmtElementContext()
+{
+}
+
+SvXMLImportContext* SvXMLNumFmtElementContext::CreateChildContext(
+ USHORT nPrfx, const rtl::OUString& rLName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList )
+{
+ // no elements supported - use default context
+ return new SvXMLImportContext( GetImport(), nPrfx, rLName );
+}
+
+void SvXMLNumFmtElementContext::Characters( const rtl::OUString& rChars )
+{
+ aContent.append( rChars );
+}
+
+void SvXMLNumFmtElementContext::EndElement()
+{
+ sal_Bool bEffLong = bLong;
+ switch (nType)
+ {
+ case XML_TOK_STYLE_TEXT:
+ if ( rParent.HasLongDoW() &&
+ rParent.GetInternational().GetLongDateDayOfWeekSep() ==
+ String( aContent.getStr() ) )
+ {
+ // skip separator constant after long day of week
+ // (NF_KEY_NNNN contains the separator)
+
+ //!aContent.setLength(0); //! doesn't work, #76293#
+ aContent = OUStringBuffer();
+
+ rParent.SetHasLongDoW( sal_False ); // only once
+ }
+ if ( aContent.getLength() )
+ {
+ if ( ( aContent.getLength() == 1 &&
+ lcl_ValidChar( aContent.charAt(0), rParent.GetType() ) ) ||
+ ( aContent.getLength() == 2 &&
+ lcl_ValidChar( aContent.charAt(0), rParent.GetType() ) &&
+ aContent.charAt(1) == ' ' ) )
+ {
+ // don't quote single separator characters like space or percent,
+ // or separator characters followed by space (used in date formats)
+ }
+ else
+ {
+ // quote string literals
+ //! escape quotes in string
+ aContent.insert( 0, (sal_Unicode) '"' );
+ aContent.append( (sal_Unicode) '"' );
+ }
+ rParent.AddToCode( aContent.makeStringAndClear() );
+ }
+ break;
+
+ case XML_TOK_STYLE_NUMBER:
+ rParent.AddNumber( aNumInfo );
+ break;
+
+ case XML_TOK_STYLE_CURRENCY_SYMBOL:
+ rParent.AddCurrency( aContent.makeStringAndClear(), nElementLang );
+ break;
+
+ case XML_TOK_STYLE_TEXT_CONTENT:
+ rParent.AddToCode( OUString::valueOf((sal_Unicode)'@') );
+ break;
+ case XML_TOK_STYLE_BOOLEAN:
+ // ignored - only default boolean format is supported
+ break;
+
+ case XML_TOK_STYLE_DAY:
+ if ( rParent.IsFromSystem() )
+ bEffLong = bLong ? rParent.GetInternational().IsLongDateDayLeadingZero() :
+ rParent.GetInternational().IsDateDayLeadingZero();
+ rParent.AddNfKeyword( bEffLong ? NF_KEY_TT : NF_KEY_T );
+ break;
+ case XML_TOK_STYLE_MONTH:
+ if ( rParent.IsFromSystem() )
+ {
+ if (bLong)
+ {
+ MonthFormat eMonth = rParent.GetInternational().GetLongDateMonthFormat();
+ bEffLong = ( eMonth == MONTH_ZERO || eMonth == MONTH_LONG );
+ bTextual = ( eMonth == MONTH_SHORT || eMonth == MONTH_LONG );
+ }
+ else
+ bEffLong = rParent.GetInternational().IsDateMonthLeadingZero();
+ }
+ rParent.AddNfKeyword( bTextual ? ( bEffLong ? NF_KEY_MMMM : NF_KEY_MMM ) :
+ ( bEffLong ? NF_KEY_MM : NF_KEY_M ) );
+ break;
+ case XML_TOK_STYLE_YEAR:
+ if ( rParent.IsFromSystem() )
+ bEffLong = bLong ? rParent.GetInternational().IsLongDateCentury() :
+ rParent.GetInternational().IsDateCentury();
+ rParent.AddNfKeyword( bEffLong ? NF_KEY_JJJJ : NF_KEY_JJ );
+ break;
+ case XML_TOK_STYLE_DAY_OF_WEEK:
+ if ( rParent.IsFromSystem() && bLong )
+ bEffLong = ( rParent.GetInternational().GetLongDateDayOfWeekFormat() == DAYOFWEEK_LONG );
+ rParent.AddNfKeyword( bEffLong ? NF_KEY_NNNN : NF_KEY_NN );
+ break;
+ case XML_TOK_STYLE_WEEK_OF_YEAR:
+ rParent.AddNfKeyword( NF_KEY_WW );
+ break;
+ case XML_TOK_STYLE_QUARTER:
+ rParent.AddNfKeyword( bEffLong ? NF_KEY_QQ : NF_KEY_Q );
+ break;
+ case XML_TOK_STYLE_HOURS:
+ rParent.AddNfKeyword( bEffLong ? NF_KEY_HH : NF_KEY_H );
+ break;
+ case XML_TOK_STYLE_AM_PM:
+ //! short/long?
+ rParent.AddNfKeyword( NF_KEY_AMPM );
+ break;
+ case XML_TOK_STYLE_MINUTES:
+ rParent.AddNfKeyword( bEffLong ? NF_KEY_MMI : NF_KEY_MI );
+ break;
+ case XML_TOK_STYLE_SECONDS:
+ rParent.AddNfKeyword( bEffLong ? NF_KEY_SS : NF_KEY_S );
+ if ( aNumInfo.nDecimals > 0 )
+ {
+ // manually add the decimal places
+ rParent.AddToCode( OUString::valueOf(
+ rParent.GetInternational().GetNumDecimalSep() ) );
+ for (sal_Int32 i=0; i<aNumInfo.nDecimals; i++)
+ rParent.AddToCode( OUString::valueOf((sal_Unicode)'0') );
+ }
+ break;
+
+ case XML_TOK_STYLE_FRACTION:
+ {
+ aNumInfo.nDecimals = 0;
+ rParent.AddNumber( aNumInfo ); // number without decimals
+
+ //! build string and add at once
+
+ sal_Int32 i;
+ rParent.AddToCode( OUString::valueOf((sal_Unicode)' ') );
+ for (i=0; i<aNumInfo.nNumerDigits; i++)
+ rParent.AddToCode( OUString::valueOf((sal_Unicode)'?') );
+ rParent.AddToCode( OUString::valueOf((sal_Unicode)'/') );
+ for (i=0; i<aNumInfo.nDenomDigits; i++)
+ rParent.AddToCode( OUString::valueOf((sal_Unicode)'?') );
+ }
+ break;
+
+ case XML_TOK_STYLE_SCIENTIFIC_NUMBER:
+ {
+ rParent.AddNumber( aNumInfo ); // simple number
+
+ rParent.AddToCode( OUString::createFromAscii( "E+" ) );
+ for (sal_Int32 i=0; i<aNumInfo.nExpDigits; i++)
+ rParent.AddToCode( OUString::valueOf((sal_Unicode)'0') );
+ }
+ break;
+
+ default:
+ DBG_ERROR("invalid element ID");
+ }
+}
+
+//-------------------------------------------------------------------------
+
+//
+// SvXMLNumFormatContext
+//
+
+SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
+ USHORT nPrfx, const rtl::OUString& rLName,
+ SvXMLNumImpData* pNewData, sal_uInt16 nNewType,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList,
+ SvXMLStylesContext& rStyles ) :
+ SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList ),
+ pData( pNewData ),
+ nType( nNewType ),
+ nFormatLang( LANGUAGE_SYSTEM ),
+ bAutoOrder( FALSE ),
+ bFromSystem( FALSE ),
+ bTruncate( TRUE ),
+ bAutoDec( FALSE ),
+ bAutoInt( FALSE ),
+ bHasExtraText( FALSE ),
+ bHasLongDoW( FALSE ),
+ bHasDateTime( FALSE ),
+ bHasMap( sal_False ),
+ pStyles( &rStyles ),
+ nKey(-1)
+{
+ OUString sLanguage, sCountry;
+ sal_Bool bAttrBool;
+ sal_uInt16 nAttrEnum;
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ OUString sAttrName = xAttrList->getNameByIndex( i );
+ OUString sValue = xAttrList->getValueByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
+
+ const SvXMLTokenMap& rTokenMap = pData->GetStyleAttrTokenMap();
+ sal_uInt16 nToken = rTokenMap.Get( nPrefix, aLocalName );
+ switch (nToken)
+ {
+ case XML_TOK_STYLE_ATTR_NAME:
+// aName = sValue;
+ break;
+ case XML_TOK_STYLE_ATTR_LANGUAGE:
+ sLanguage = sValue;
+ break;
+ case XML_TOK_STYLE_ATTR_COUNTRY:
+ sCountry = sValue;
+ break;
+ case XML_TOK_STYLE_ATTR_TITLE:
+ sFormatTitle = sValue;
+ break;
+ case XML_TOK_STYLE_ATTR_AUTOMATIC_ORDER:
+ if ( SvXMLUnitConverter::convertBool( bAttrBool, sValue ) )
+ bAutoOrder = bAttrBool;
+ break;
+ case XML_TOK_STYLE_ATTR_FORMAT_SOURCE:
+ if ( SvXMLUnitConverter::convertEnum( nAttrEnum, sValue, aFormatSourceMap ) )
+ bFromSystem = (sal_Bool) nAttrEnum;
+ break;
+ case XML_TOK_STYLE_ATTR_TRUNCATE_ON_OVERFLOW:
+ if ( SvXMLUnitConverter::convertBool( bAttrBool, sValue ) )
+ bTruncate = bAttrBool;
+ break;
+ case XML_TOK_STYLE_ATTR_VOLATILE:
+ //! ...
+ break;
+ }
+ }
+
+ if ( sLanguage.getLength() || sCountry.getLength() )
+ {
+ nFormatLang = ConvertIsoNamesToLanguage( sLanguage, sCountry );
+ if ( nFormatLang == LANGUAGE_DONTKNOW )
+ nFormatLang = LANGUAGE_SYSTEM; //! error handling for invalid locales?
+ }
+}
+
+SvXMLNumFormatContext::~SvXMLNumFormatContext()
+{
+}
+
+SvXMLImportContext* SvXMLNumFormatContext::CreateChildContext(
+ USHORT nPrfx, const rtl::OUString& rLName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList )
+{
+ SvXMLImportContext* pContext = NULL;
+
+ const SvXMLTokenMap& rTokenMap = pData->GetStyleElemTokenMap();
+ sal_uInt16 nToken = rTokenMap.Get( nPrfx, rLName );
+ switch (nToken)
+ {
+ case XML_TOK_STYLE_TEXT:
+ case XML_TOK_STYLE_NUMBER:
+ case XML_TOK_STYLE_SCIENTIFIC_NUMBER:
+ case XML_TOK_STYLE_FRACTION:
+ case XML_TOK_STYLE_CURRENCY_SYMBOL:
+ case XML_TOK_STYLE_DAY:
+ case XML_TOK_STYLE_MONTH:
+ case XML_TOK_STYLE_YEAR:
+ case XML_TOK_STYLE_DAY_OF_WEEK:
+ case XML_TOK_STYLE_WEEK_OF_YEAR:
+ case XML_TOK_STYLE_QUARTER:
+ case XML_TOK_STYLE_HOURS:
+ case XML_TOK_STYLE_AM_PM:
+ case XML_TOK_STYLE_MINUTES:
+ case XML_TOK_STYLE_SECONDS:
+ case XML_TOK_STYLE_BOOLEAN:
+ case XML_TOK_STYLE_TEXT_CONTENT:
+ pContext = new SvXMLNumFmtElementContext( GetImport(), nPrfx, rLName,
+ *this, nToken, xAttrList );
+ break;
+
+ case XML_TOK_STYLE_PROPERTIES:
+ pContext = new SvXMLNumFmtPropContext( GetImport(), nPrfx, rLName,
+ *this, xAttrList );
+ break;
+ case XML_TOK_STYLE_MAP:
+ {
+ bHasMap = sal_True;
+ pContext = new SvXMLNumFmtMapContext( GetImport(), nPrfx, rLName,
+ *this, xAttrList );
+ }
+ break;
+ }
+
+ if( !pContext )
+ pContext = new SvXMLImportContext( GetImport(), nPrfx, rLName );
+ return pContext;
+}
+
+sal_Int32 SvXMLNumFormatContext::GetKey()
+{
+ if (nKey > -1)
+ return nKey;
+ else
+ {
+ CreateAndInsert(sal_True);
+ return nKey;
+ }
+}
+
+void SvXMLNumFormatContext::CreateAndInsert(sal_Bool bOverwrite)
+{
+ if (!(nKey > -1))
+ {
+ SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
+ if (!pFormatter)
+ {
+ DBG_ERROR("no number formatter");
+ return;
+ }
+
+ sal_uInt32 nIndex = NUMBERFORMAT_ENTRY_NOT_FOUND;
+
+ if (bHasMap)
+ {
+ SvXMLNumFormatContext* pStyle = (SvXMLNumFormatContext *)pStyles->FindStyleChildContext(
+ XML_STYLE_FAMILY_DATA_STYLE, sMapName, sal_False);
+ if (pStyle)
+ {
+ if ((pStyle->GetKey() > -1))
+ AddCondition();
+ }
+ }
+ aFormatCode.insert( 0, aConditions.makeStringAndClear() );
+ OUString sFormat = aFormatCode.makeStringAndClear();
+
+ // test special cases
+
+ if ( bAutoDec ) // automatic decimal places
+ {
+ if ( nType == XML_TOK_STYLES_NUMBER_STYLE && !bHasExtraText )
+ nIndex = pFormatter->GetStandardIndex( nFormatLang );
+ }
+ if ( bAutoInt ) // automatic integer digits
+ {
+ //! only if two decimal places was set?
+
+ if ( nType == XML_TOK_STYLES_NUMBER_STYLE && !bHasExtraText )
+ nIndex = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, nFormatLang );
+ }
+
+ // boolean is always the builtin boolean format
+ // (no other boolean formats are implemented)
+ if ( nType == XML_TOK_STYLES_BOOLEAN_STYLE )
+ nIndex = pFormatter->GetFormatIndex( NF_BOOLEAN, nFormatLang );
+
+ if ( nIndex == NUMBERFORMAT_ENTRY_NOT_FOUND && sFormat.getLength() )
+ {
+ // insert by format string
+
+ String aFormatStr( sFormat );
+ nIndex = pFormatter->GetEntryKey( aFormatStr, nFormatLang );
+ if ( nIndex == NUMBERFORMAT_ENTRY_NOT_FOUND )
+ {
+ xub_StrLen nErrPos = 0;
+ short nType = 0;
+ sal_Bool bOk = pFormatter->PutEntry( aFormatStr, nErrPos, nType, nIndex, nFormatLang );
+ if (!bOk)
+ nIndex = NUMBERFORMAT_ENTRY_NOT_FOUND;
+ }
+ }
+
+ if ( nIndex != NUMBERFORMAT_ENTRY_NOT_FOUND && !bFromSystem )
+ {
+ // instead of automatic date format, use fixed formats if bFromSystem is not set
+ //! prevent use of automatic formats in other cases, force user-defined format?
+
+ NfIndexTableOffset eOffset = pFormatter->GetIndexTableOffset( nIndex );
+ if ( eOffset == NF_DATE_SYSTEM_SHORT )
+ {
+ const International& rInt = pData->GetInternational( nFormatLang );
+ if ( rInt.IsDateDayLeadingZero() && rInt.IsDateMonthLeadingZero() )
+ {
+ if ( rInt.IsDateCentury() )
+ nIndex = pFormatter->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, nFormatLang );
+ else
+ nIndex = pFormatter->GetFormatIndex( NF_DATE_SYS_DDMMYY, nFormatLang );
+ }
+ }
+ else if ( eOffset == NF_DATE_SYSTEM_LONG )
+ {
+ const International& rInt = pData->GetInternational( nFormatLang );
+ if ( !rInt.IsLongDateDayLeadingZero() )
+ {
+ sal_Bool bCentury = rInt.IsLongDateCentury();
+ MonthFormat eMonth = rInt.GetLongDateMonthFormat();
+ if ( eMonth == MONTH_LONG && bCentury )
+ {
+ if ( rInt.GetLongDateDayOfWeekFormat() == DAYOFWEEK_LONG )
+ nIndex = pFormatter->GetFormatIndex( NF_DATE_SYS_NNNNDMMMMYYYY, nFormatLang );
+ else
+ nIndex = pFormatter->GetFormatIndex( NF_DATE_SYS_NNDMMMMYYYY, nFormatLang );
+ }
+ else if ( eMonth == MONTH_SHORT && !bCentury )
+ nIndex = pFormatter->GetFormatIndex( NF_DATE_SYS_NNDMMMYY, nFormatLang );
+ }
+ }
+ }
+
+ if ( nIndex != NUMBERFORMAT_ENTRY_NOT_FOUND && !bAutoOrder )
+ {
+ // use fixed-order formats instead of SYS... if bAutoOrder is false
+
+ NfIndexTableOffset eOffset = pFormatter->GetIndexTableOffset( nIndex );
+ if ( eOffset == NF_DATE_SYS_DMMMYYYY )
+ nIndex = pFormatter->GetFormatIndex( NF_DATE_DIN_DMMMYYYY, nFormatLang );
+ else if ( eOffset == NF_DATE_SYS_DMMMMYYYY )
+ nIndex = pFormatter->GetFormatIndex( NF_DATE_DIN_DMMMMYYYY, nFormatLang );
+ }
+
+ pData->AddKey( nIndex, GetName() );
+ nKey = nIndex;
+
+ #if 0
+ ByteString aByte( String(sFormatName), gsl_getSystemTextEncoding() );
+ aByte.Append( " | " );
+ aByte.Append(ByteString( String(sFormat), gsl_getSystemTextEncoding() ));
+ aByte.Append( " | " );
+ aByte.Append(ByteString::CreateFromInt32( nIndex ));
+
+ // DBG_ERROR(aByte.GetBuffer());
+ int xxx=42;
+ #endif
+ }
+}
+
+void SvXMLNumFormatContext::Finish( sal_Bool bOverwrite )
+{
+ SvXMLStyleContext::Finish( bOverwrite );
+// AddCondition();
+}
+
+const International& SvXMLNumFormatContext::GetInternational() const
+{
+ return pData->GetInternational( nFormatLang );
+}
+
+void SvXMLNumFormatContext::AddToCode( const rtl::OUString& rString )
+{
+ aFormatCode.append( rString );
+ bHasExtraText = sal_True;
+}
+
+void SvXMLNumFormatContext::AddNumber( const SvXMLNumberInfo& rInfo )
+{
+ SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
+ if (!pFormatter)
+ return;
+
+ // store special conditions
+ bAutoDec = ( rInfo.nDecimals < 0 );
+ bAutoInt = ( rInfo.nInteger < 0 );
+
+ sal_uInt16 nPrec = 0;
+ sal_uInt16 nLeading = 0;
+ if ( rInfo.nDecimals >= 0 ) // < 0 : Default
+ nPrec = (sal_uInt16) rInfo.nDecimals;
+ if ( rInfo.nInteger >= 0 ) // < 0 : Default
+ nLeading = (sal_uInt16) rInfo.nInteger;
+
+ if ( bAutoDec )
+ {
+ // use language defaults for other than builtin formats
+
+ const International& rInt = pData->GetInternational( nFormatLang );
+
+ if ( nType == XML_TOK_STYLES_CURRENCY_STYLE )
+ nPrec = rInt.GetCurrDigits();
+ else
+ nPrec = rInt.GetNumDigits();
+ }
+ if ( bAutoInt )
+ {
+ //!...
+ }
+
+ sal_uInt16 nGenPrec = nPrec;
+ if ( rInfo.bDecReplace )
+ nGenPrec = 0; // generate format without decimals...
+
+ String aNumStr;
+ sal_uInt32 nStdIndex = pFormatter->GetStandardIndex( nFormatLang );
+ pFormatter->GenerateFormat( aNumStr, nStdIndex, nFormatLang,
+ rInfo.bGrouping, sal_False, nGenPrec, nLeading );
+
+ aFormatCode.append( aNumStr );
+
+ if ( rInfo.bDecReplace && nPrec ) // add decimal replacement (dashes)
+ {
+ aFormatCode.append( pData->GetInternational( nFormatLang ).GetNumDecimalSep() );
+ for ( sal_uInt16 i=0; i<nPrec; i++)
+ aFormatCode.append( (sal_Unicode)'-' );
+ }
+}
+
+void SvXMLNumFormatContext::AddCurrency( const rtl::OUString& rContent, LanguageType nLang )
+{
+ sal_Bool bAutomatic = sal_False;
+ OUString aSymbol = rContent;
+ if ( aSymbol.getLength() == 0 )
+ {
+ // get currency symbol for language
+ aSymbol = pData->GetInternational( nFormatLang ).GetCurrSymbol();
+ bAutomatic = sal_True;
+ }
+ else if ( nLang == LANGUAGE_SYSTEM && aSymbol.compareToAscii("CCC") == 0 )
+ {
+ // "CCC" is used for automatic long symbol
+ bAutomatic = sal_True;
+ }
+
+ if (!bAutomatic)
+ aFormatCode.appendAscii( "[$" ); // intro for "new" currency symbols
+
+ aFormatCode.append( aSymbol );
+
+ if (!bAutomatic)
+ {
+ if ( nLang != LANGUAGE_SYSTEM )
+ {
+ // '-' sign and language code in hex:
+ aFormatCode.append( (sal_Unicode) '-' );
+ //aFormatCode.append( OUString::valueOf( (sal_Int32)nLang, 16 ) );
+ aFormatCode.append( (sal_Int32)nLang, 16 );
+ }
+
+ aFormatCode.append( (sal_Unicode) ']' ); // end of "new" currency symbol
+ }
+}
+
+void SvXMLNumFormatContext::AddNfKeyword( sal_uInt16 nIndex )
+{
+ SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
+ if (!pFormatter)
+ return;
+
+ if ( nIndex == NF_KEY_NNNN )
+ bHasLongDoW = sal_True; // to remove string constant with separator
+
+ String sKeyword = pFormatter->GetKeyword( nFormatLang, nIndex );
+
+ if ( nIndex == NF_KEY_H || nIndex == NF_KEY_HH ||
+ nIndex == NF_KEY_MI || nIndex == NF_KEY_MMI ||
+ nIndex == NF_KEY_S || nIndex == NF_KEY_SS )
+ {
+ if ( !bTruncate && !bHasDateTime )
+ {
+ // with truncate-on-overflow = false, add "[]" to first time part
+
+ sKeyword.Insert( (sal_Unicode) '[', 0 );
+ sKeyword.Append( (sal_Unicode) ']' );
+ }
+ bHasDateTime = sal_True;
+ }
+
+ aFormatCode.append( sKeyword );
+}
+
+void SvXMLNumFormatContext::AddCondition( )
+{
+ rtl::OUString rApplyName = sMapName;
+ rtl::OUString rCondition = sCondition;
+ SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
+ sal_uInt32 nKey = pData->GetKeyForName( rApplyName );
+ OUString sValue = OUString::createFromAscii( "value()" ); //! define constant
+ sal_Int32 nValLen = sValue.getLength();
+
+ if ( pFormatter && nKey != NUMBERFORMAT_ENTRY_NOT_FOUND &&
+ rCondition.copy( 0, nValLen ) == sValue )
+ {
+ //! test for valid conditions
+ //! test for default conditions
+
+ OUString sRealCond = rCondition.copy( nValLen, rCondition.getLength() - nValLen );
+ sal_Bool bDefaultCond = sal_False;
+
+ //! collect all conditions first and adjust default to >=0, >0 or <0 depending on count
+ //! allow blanks in conditions
+ sal_Bool bFirstCond = ( aConditions.getLength() == 0 );
+ if ( bFirstCond && sRealCond.compareToAscii( ">=0" ) == 0 )
+ bDefaultCond = sal_True;
+
+ if (!bDefaultCond)
+ {
+ aConditions.append( (sal_Unicode) '[' );
+ aConditions.append( sRealCond );
+ aConditions.append( (sal_Unicode) ']' );
+ }
+
+ const SvNumberformat* pFormat = pFormatter->GetEntry(nKey);
+ if ( pFormat )
+ aConditions.append( OUString( pFormat->GetFormatstring() ) );
+
+ aConditions.append( (sal_Unicode) ';' );
+ }
+}
+
+void SvXMLNumFormatContext::AddColor( const Color& rColor )
+{
+ SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
+ if (!pFormatter)
+ return;
+
+ OUStringBuffer aColName;
+ for ( sal_uInt16 i=0; i<XML_NUMF_COLORCOUNT; i++ )
+ if ( rColor == aNumFmtStdColors[i] )
+ {
+ aColName = OUString( pFormatter->GetKeyword( nFormatLang, NF_KEY_FIRSTCOLOR + i ) );
+ break;
+ }
+
+ if ( aColName.getLength() )
+ {
+ aColName.insert( 0, (sal_Unicode) '[' );
+ aColName.append( (sal_Unicode) ']' );
+ aFormatCode.insert( 0, aColName.makeStringAndClear() );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+//
+// SvXMLNumFmtHelper
+//
+
+SvXMLNumFmtHelper::SvXMLNumFmtHelper(
+ const uno::Reference<util::XNumberFormatsSupplier>& rSupp )
+{
+ SvNumberFormatter* pFormatter = NULL;
+ SvNumberFormatsSupplierObj* pObj =
+ SvNumberFormatsSupplierObj::getImplementation( rSupp );
+ if (pObj)
+ pFormatter = pObj->GetNumberFormatter();
+
+ pData = new SvXMLNumImpData( pFormatter );
+}
+
+SvXMLNumFmtHelper::~SvXMLNumFmtHelper()
+{
+ delete pData;
+}
+
+SvXMLStyleContext* SvXMLNumFmtHelper::CreateChildContext( SvXMLImport& rImport,
+ USHORT nPrefix, const OUString& rLocalName,
+ const uno::Reference<xml::sax::XAttributeList>& xAttrList,
+ SvXMLStylesContext& rStyles )
+{
+ SvXMLStyleContext* pContext = NULL;
+
+ const SvXMLTokenMap& rTokenMap = pData->GetStylesElemTokenMap();
+ sal_uInt16 nToken = rTokenMap.Get( nPrefix, rLocalName );
+ switch (nToken)
+ {
+ case XML_TOK_STYLES_NUMBER_STYLE:
+ case XML_TOK_STYLES_CURRENCY_STYLE:
+ case XML_TOK_STYLES_PERCENTAGE_STYLE:
+ case XML_TOK_STYLES_DATE_STYLE:
+ case XML_TOK_STYLES_TIME_STYLE:
+ case XML_TOK_STYLES_BOOLEAN_STYLE:
+ case XML_TOK_STYLES_TEXT_STYLE:
+ pContext = new SvXMLNumFormatContext( rImport, nPrefix, rLocalName,
+ pData, nToken, xAttrList, rStyles );
+ break;
+ }
+
+ // return NULL if not a data style, caller must handle other elements
+ return pContext;
+}
+
+/*sal_uInt32 SvXMLNumFmtHelper::GetKeyForName( const rtl::OUString& rName )
+{
+ return pData->GetKeyForName( rName );
+}*/
+
+
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
new file mode 100644
index 0000000000..360d795f3c
--- /dev/null
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -0,0 +1,1126 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlnumi.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _VCL_VCLENUM_HXX
+#include <vcl/vclenum.hxx>
+#endif
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#include "xmltkmap.hxx"
+#include "nmspmap.hxx"
+#include "xmlnmspe.hxx"
+#include "xmlimp.hxx"
+
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_SIZE_HPP_
+#include <com/sun/star/awt/Size.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
+#include <com/sun/star/awt/FontDescriptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_HORIORIENTATION_HPP_
+#include <com/sun/star/text/HoriOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_VERTORIENTATION_HPP_
+#include <com/sun/star/text/VertOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_
+#include <com/sun/star/style/XStyle.hpp>
+#endif
+
+#include "xmlkywd.hxx"
+#include "i18nmap.hxx"
+#include "xmluconv.hxx"
+#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX
+#include "fonthdl.hxx"
+#endif
+#ifndef _XMLOFF_FAMILIES_HXX
+#include "families.hxx"
+#endif
+
+
+#include "xmlnumi.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::frame;
+
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE[] =
+ "SymbolTextDistance";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PARENT_NUMBERING[] =
+ "ParentNumbering";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_CHAR_STYLE_NAME[] =
+ "CharStyleName";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_CHAR[] ="BulletChar";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHIC_SIZE[] =
+ "GraphicSize";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_VERT_ORIENT[] ="VertOrient";
+
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = "NumberingType";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_PREFIX[] = "Prefix";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_SUFFIX[] = "Suffix";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_ADJUST[] = "Adjust";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_LEFT_MARGIN[] = "LeftMargin";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET[] =
+ "FirstLineOffset";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_BULLET_FONT[] = "BulletFont";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_GRAPHICURL[] = "GraphicURL";
+static sal_Char __READONLY_DATA XML_UNO_NAME_NRULE_START_WITH[] = "StartWith";
+
+// ---------------------------------------------------------------------
+
+class SvxXMLListLevelStyleContext_Impl;
+
+class SvxXMLListLevelStyleAttrContext_Impl : public SvXMLImportContext
+{
+ SvxXMLListLevelStyleContext_Impl& rListLevel;
+
+public:
+
+ SvxXMLListLevelStyleAttrContext_Impl(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList >& xAttrList,
+ SvxXMLListLevelStyleContext_Impl& rLLevel );
+ virtual ~SvxXMLListLevelStyleAttrContext_Impl();
+};
+
+// ---------------------------------------------------------------------
+
+enum SvxXMLTextListLevelStyleAttrTokens
+{
+ XML_TOK_TEXT_LEVEL_ATTR_LEVEL,
+ XML_TOK_TEXT_LEVEL_ATTR_STYLE_NAME,
+ XML_TOK_TEXT_LEVEL_ATTR_BULLET_CHAR,
+ XML_TOK_TEXT_LEVEL_ATTR_HREF,
+ XML_TOK_TEXT_LEVEL_ATTR_TYPE,
+ XML_TOK_TEXT_LEVEL_ATTR_SHOW,
+ XML_TOK_TEXT_LEVEL_ATTR_ACTUATE,
+ XML_TOK_TEXT_LEVEL_ATTR_NUM_FORMAT,
+ XML_TOK_TEXT_LEVEL_ATTR_NUM_PREFIX,
+ XML_TOK_TEXT_LEVEL_ATTR_NUM_SUFFIX,
+ XML_TOK_TEXT_LEVEL_ATTR_NUM_LETTER_SYNC,
+ XML_TOK_TEXT_LEVEL_ATTR_START_VALUE,
+ XML_TOK_TEXT_LEVEL_ATTR_DISPLAY_LEVELS,
+
+ XML_TOK_TEXT_LEVEL_ATTR_END=XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aLevelAttrTokenMap[] =
+{
+ { XML_NAMESPACE_TEXT, sXML_level, XML_TOK_TEXT_LEVEL_ATTR_LEVEL },
+ { XML_NAMESPACE_TEXT, sXML_style_name, XML_TOK_TEXT_LEVEL_ATTR_STYLE_NAME },
+ { XML_NAMESPACE_TEXT, sXML_bullet_char, XML_TOK_TEXT_LEVEL_ATTR_BULLET_CHAR },
+ { XML_NAMESPACE_XLINK, sXML_href, XML_TOK_TEXT_LEVEL_ATTR_HREF },
+ { XML_NAMESPACE_XLINK, sXML_type, XML_TOK_TEXT_LEVEL_ATTR_TYPE },
+ { XML_NAMESPACE_XLINK, sXML_show, XML_TOK_TEXT_LEVEL_ATTR_SHOW },
+ { XML_NAMESPACE_XLINK, sXML_actuate, XML_TOK_TEXT_LEVEL_ATTR_ACTUATE },
+
+ { XML_NAMESPACE_STYLE, sXML_num_format, XML_TOK_TEXT_LEVEL_ATTR_NUM_FORMAT },
+ { XML_NAMESPACE_STYLE, sXML_num_prefix, XML_TOK_TEXT_LEVEL_ATTR_NUM_PREFIX },
+ { XML_NAMESPACE_STYLE, sXML_num_suffix, XML_TOK_TEXT_LEVEL_ATTR_NUM_SUFFIX },
+ { XML_NAMESPACE_STYLE, sXML_num_letter_sync, XML_TOK_TEXT_LEVEL_ATTR_NUM_LETTER_SYNC },
+ { XML_NAMESPACE_TEXT, sXML_start_value, XML_TOK_TEXT_LEVEL_ATTR_START_VALUE },
+ { XML_NAMESPACE_TEXT, sXML_display_levels, XML_TOK_TEXT_LEVEL_ATTR_DISPLAY_LEVELS },
+
+ XML_TOKEN_MAP_END
+};
+
+class SvxXMLListLevelStyleContext_Impl : public SvXMLImportContext
+{
+ friend class SvxXMLListLevelStyleAttrContext_Impl;
+
+ OUString sPrefix;
+ OUString sSuffix;
+ OUString sTextStyleName;
+ OUString sNumFormat;
+ OUString sNumLetterSync;
+ OUString sBulletFontName;
+ OUString sBulletFontStyleName;
+ OUString sImageURL;
+
+ sal_Int32 nLevel;
+ sal_Int32 nSpaceBefore;
+ sal_Int32 nMinLabelWidth;
+ sal_Int32 nMinLabelDist;
+ sal_Int32 nImageWidth;
+ sal_Int32 nImageHeight;
+ sal_Int16 nNumStartValue;
+ sal_Int16 nNumDisplayLevels;
+
+ sal_Int16 eAdjust;
+ sal_Int16 eBulletFontFamily;
+ sal_Int16 eBulletFontPitch;
+ rtl_TextEncoding eBulletFontEncoding;
+ sal_Int16 eImageVertOrient;
+
+ sal_Unicode cBullet;
+
+ sal_Bool bBullet : 1;
+ sal_Bool bImage : 1;
+ sal_Bool bNum : 1;
+
+ void SetSpaceBefore( sal_Int32 nSet ) { nSpaceBefore = nSet; }
+ void SetMinLabelWidth( sal_Int32 nSet ) { nMinLabelWidth = nSet; }
+ void SetMinLabelDist( sal_Int32 nSet ) { nMinLabelDist = nSet; }
+ void SetAdjust( sal_Int16 eSet ) { eAdjust = eSet; }
+
+ void SetBulletFontName( const OUString& rSet ) { sBulletFontName = rSet; }
+ void SetBulletFontStyleName( const OUString& rSet )
+ { sBulletFontStyleName = rSet; }
+ void SetBulletFontFamily( sal_Int16 eSet ) { eBulletFontFamily = eSet; }
+ void SetBulletFontPitch( sal_Int16 eSet ) { eBulletFontPitch = eSet; }
+ void SetBulletFontEncoding( rtl_TextEncoding eSet )
+ { eBulletFontEncoding = eSet; }
+
+ void SetImageWidth( sal_Int32 nSet ) { nImageWidth = nSet; }
+ void SetImageHeight( sal_Int32 nSet ) { nImageHeight = nSet; }
+ void SetImageVertOrient( sal_Int16 eSet )
+ { eImageVertOrient = eSet; }
+
+public:
+
+ SvxXMLListLevelStyleContext_Impl(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList );
+ virtual ~SvxXMLListLevelStyleContext_Impl();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix, const OUString& rLocalName,
+ const Reference< xml::sax::XAttributeList > & xAttrList );
+
+ sal_Int32 GetLevel() const { return nLevel; }
+ Sequence<beans::PropertyValue> GetProperties(
+ const SvI18NMap *pI18NMap=0 ) const;
+};
+
+SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList ) :
+
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ sNumFormat( OUString::createFromAscii( "1" ) ),
+ nLevel( -1L ),
+ nSpaceBefore( 0L ),
+ nMinLabelWidth( 0L ),
+ nMinLabelDist( 0L ),
+ nImageWidth( 0L ),
+ nImageHeight( 0L ),
+ nNumStartValue( 1 ),
+ nNumDisplayLevels( 1 ),
+ eAdjust( HoriOrientation::LEFT ),
+ eBulletFontFamily( FAMILY_DONTKNOW ),
+ eBulletFontPitch( PITCH_DONTKNOW ),
+ eBulletFontEncoding( RTL_TEXTENCODING_DONTKNOW ),
+ cBullet( 0 ),
+ bNum( sal_False ),
+ bBullet( sal_False ),
+ bImage( sal_False )
+{
+ if( rLName.compareToAscii( sXML_list_level_style_number ) == 0 ||
+ rLName.compareToAscii( sXML_outline_level_style ) == 0 )
+ bNum = sal_True;
+ else if( rLName.compareToAscii( sXML_list_level_style_bullet ) == 0 )
+ bBullet = sal_True;
+ else if( rLName.compareToAscii( sXML_list_level_style_image ) == 0 )
+ bImage = sal_True;
+
+ SvXMLTokenMap aTokenMap( aLevelAttrTokenMap );
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+
+ switch( aTokenMap.Get( nPrefix, aLocalName ) )
+ {
+ case XML_TOK_TEXT_LEVEL_ATTR_LEVEL:
+ nLevel = rValue.toInt32();
+ if( nLevel >= 1L )
+ nLevel--;
+ else
+ nLevel = 0L;
+ break;
+ case XML_TOK_TEXT_LEVEL_ATTR_STYLE_NAME:
+ sTextStyleName = rValue;
+ break;
+ case XML_TOK_TEXT_LEVEL_ATTR_BULLET_CHAR:
+ if( rValue.getLength() > 0 )
+ cBullet = rValue[0];
+ break;
+ case XML_TOK_TEXT_LEVEL_ATTR_HREF:
+ if( bImage )
+ sImageURL = rValue;
+ break;
+ case XML_TOK_TEXT_LEVEL_ATTR_TYPE:
+ case XML_TOK_TEXT_LEVEL_ATTR_SHOW:
+ case XML_TOK_TEXT_LEVEL_ATTR_ACTUATE:
+ // This properties will be ignored
+ break;
+ case XML_TOK_TEXT_LEVEL_ATTR_NUM_FORMAT:
+ if( bNum )
+ sNumFormat = rValue;
+ break;
+ case XML_TOK_TEXT_LEVEL_ATTR_NUM_PREFIX:
+ sPrefix = rValue;
+ break;
+ case XML_TOK_TEXT_LEVEL_ATTR_NUM_SUFFIX:
+ sSuffix = rValue;
+ break;
+ case XML_TOK_TEXT_LEVEL_ATTR_NUM_LETTER_SYNC:
+ if( bNum )
+ sNumLetterSync = rValue;
+ break;
+ case XML_TOK_TEXT_LEVEL_ATTR_START_VALUE:
+ if( bNum )
+ {
+ sal_Int32 nTmp = rValue.toInt32();
+ nNumStartValue =
+ (nTmp < 1L) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX
+ : (sal_Int16)nTmp );
+ }
+ break;
+ case XML_TOK_TEXT_LEVEL_ATTR_DISPLAY_LEVELS:
+ if( bNum )
+ {
+ sal_Int32 nTmp = rValue.toInt32();
+ nNumDisplayLevels =
+ (nTmp < 1L) ? 1 : ( (nTmp>SHRT_MAX) ? SHRT_MAX
+ : (sal_Int16)nTmp );
+ }
+ break;
+ }
+ }
+}
+
+SvxXMLListLevelStyleContext_Impl::~SvxXMLListLevelStyleContext_Impl()
+{
+}
+
+SvXMLImportContext *SvxXMLListLevelStyleContext_Impl::CreateChildContext(
+ sal_uInt16 nPrefix, const OUString& rLocalName,
+ const Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext;
+ if( XML_NAMESPACE_STYLE == nPrefix &&
+ rLocalName.compareToAscii( sXML_properties ) == 0 )
+ {
+ pContext = new SvxXMLListLevelStyleAttrContext_Impl( GetImport(),
+ nPrefix,
+ rLocalName,
+ xAttrList,
+ *this );
+ }
+ else
+ {
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
+Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
+ const SvI18NMap *pI18NMap ) const
+{
+ sal_Int16 eType;
+
+ sal_Int32 nCount = 0L;
+ if( bBullet && 0 != cBullet )
+ {
+ eType = NumberingType::CHAR_SPECIAL;
+ nCount = 10L;
+ }
+ if( bImage && sImageURL.getLength() > 0L &&
+ nImageWidth > 0L && nImageHeight > 0L )
+ {
+ eType = NumberingType::BITMAP;
+ nCount = 11L;
+ }
+ if( bNum )
+ {
+ eType = SvxXMLListStyleContext::GetNumType( sNumFormat, sNumLetterSync,
+ NumberingType::ARABIC, sal_True );
+ nCount = 10L;
+ }
+
+ Sequence<beans::PropertyValue> aPropSeq( nCount );
+ if( nCount > 0 )
+ {
+ beans::PropertyValue *pProps = aPropSeq.getArray();
+ sal_Int32 nPos = 0L;
+ pProps[nPos].Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_NUMBERINGTYPE );
+ pProps[nPos++].Value <<= (sal_Int16)eType ;
+
+ pProps[nPos].Name = OUString::createFromAscii( XML_UNO_NAME_NRULE_PREFIX );
+ pProps[nPos++].Value <<= sPrefix;
+
+ pProps[nPos].Name = OUString::createFromAscii( XML_UNO_NAME_NRULE_SUFFIX );
+ pProps[nPos++].Value <<= sSuffix;
+
+ pProps[nPos].Name = OUString::createFromAscii( XML_UNO_NAME_NRULE_ADJUST );
+ pProps[nPos++].Value <<= eAdjust;
+
+ sal_Int32 nLeftMargin = nSpaceBefore + nMinLabelWidth;
+ if( nLeftMargin < 0 )
+ nLeftMargin = 0;
+ pProps[nPos].Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_LEFT_MARGIN );
+ pProps[nPos++].Value <<= (sal_Int32)nLeftMargin;
+
+ sal_Int32 nFirstLineOffset =
+ nMinLabelWidth <= nLeftMargin ? -nMinLabelWidth : -nLeftMargin;
+
+ pProps[nPos].Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_FIRST_LINE_OFFSET );
+ pProps[nPos++].Value <<= (sal_Int32)nFirstLineOffset;
+
+ pProps[nPos].Name =
+ OUString::createFromAscii(XML_UNO_NAME_NRULE_SYMBOL_TEXT_DISTANCE);
+ pProps[nPos++].Value <<= (sal_Int16)nMinLabelDist;
+
+ OUString sStyleName = sTextStyleName;
+ if( sStyleName.getLength() && pI18NMap )
+ sStyleName = pI18NMap->Get( SFX_STYLE_FAMILY_CHAR, sStyleName );
+ pProps[nPos].Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_CHAR_STYLE_NAME );
+ pProps[nPos++].Value <<= sTextStyleName;
+
+ if( bBullet )
+ {
+ OUStringBuffer sTmp(1);
+ sTmp.append( cBullet );
+ pProps[nPos].Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_CHAR );
+ pProps[nPos++].Value <<= sTmp.makeStringAndClear();
+
+ awt::FontDescriptor aFDesc;
+ aFDesc.Name = sBulletFontName;
+ if( sBulletFontName.getLength() )
+ {
+ aFDesc.StyleName = sBulletFontStyleName;
+ aFDesc.Family = eBulletFontFamily;
+ aFDesc.Pitch = eBulletFontPitch;
+ aFDesc.CharSet = eBulletFontEncoding;
+ aFDesc.Weight = WEIGHT_DONTKNOW;
+ //aFDesc.Transparant = sal_True;
+ }
+
+ pProps[nPos].Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_FONT );
+ pProps[nPos++].Value <<= aFDesc;
+ }
+
+ if( bImage )
+ {
+ String sURL( sImageURL );
+ INetURLObject::RelToAbs( sURL );
+ pProps[nPos].Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_GRAPHICURL );
+ pProps[nPos++].Value <<= OUString(sURL);
+
+ awt::Size aSize( nImageWidth, nImageHeight );
+ pProps[nPos].Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_GRAPHIC_SIZE );
+ pProps[nPos++].Value <<= aSize;
+
+ pProps[nPos].Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_VERT_ORIENT );
+ pProps[nPos++].Value <<= (sal_Int16)eImageVertOrient;
+ }
+
+ if( bNum )
+ {
+ pProps[nPos].Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_START_WITH );
+ pProps[nPos++].Value <<= (sal_Int16)nNumStartValue;
+
+ pProps[nPos].Name =
+ OUString::createFromAscii(XML_UNO_NAME_NRULE_PARENT_NUMBERING);
+ pProps[nPos++].Value <<= (sal_Int16)nNumDisplayLevels;
+ }
+ DBG_ASSERT( nPos == nCount, "array under/overflow" );
+ }
+
+ return aPropSeq;
+}
+
+// ---------------------------------------------------------------------
+
+enum SvxXMLStyleAttributesAttrTokens
+{
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_SPACE_BEFORE,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_MIN_LABEL_WIDTH,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_MIN_LABEL_DIST,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_TEXT_ALIGN,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_FAMILY,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_FAMILY_GENERIC,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_STYLENAME,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_PITCH,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_CHARSET,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_VERTICAL_POS,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_VERTICAL_REL,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_WIDTH,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_HEIGHT,
+
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_END=XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aStyleAttributesAttrTokenMap[] =
+{
+ { XML_NAMESPACE_TEXT, sXML_space_before,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_SPACE_BEFORE },
+ { XML_NAMESPACE_TEXT, sXML_min_label_width,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_MIN_LABEL_WIDTH },
+ { XML_NAMESPACE_TEXT, sXML_min_label_distance,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_MIN_LABEL_DIST },
+ { XML_NAMESPACE_FO, sXML_text_align,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_TEXT_ALIGN },
+ { XML_NAMESPACE_FO, sXML_font_family,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_FAMILY },
+ { XML_NAMESPACE_STYLE, sXML_font_family_generic,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_FAMILY_GENERIC },
+ { XML_NAMESPACE_STYLE, sXML_font_style_name,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_STYLENAME },
+ { XML_NAMESPACE_STYLE, sXML_font_pitch,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_PITCH },
+ { XML_NAMESPACE_STYLE, sXML_font_charset,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_CHARSET },
+ { XML_NAMESPACE_STYLE, sXML_vertical_pos,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_VERTICAL_POS },
+ { XML_NAMESPACE_STYLE, sXML_vertical_rel,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_VERTICAL_REL },
+ { XML_NAMESPACE_FO, sXML_width,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_WIDTH },
+ { XML_NAMESPACE_FO, sXML_height,
+ XML_TOK_STYLE_ATTRIBUTES_ATTR_HEIGHT },
+
+ XML_TOKEN_MAP_END
+};
+SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ SvxXMLListLevelStyleContext_Impl& rLLevel ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ rListLevel( rLLevel )
+{
+ SvXMLTokenMap aTokenMap( aStyleAttributesAttrTokenMap );
+ SvXMLUnitConverter aUnitConv( MAP_100TH_MM, MAP_100TH_MM);
+
+ OUString sFontFamily, sFontStyleName, sFontFamilyGeneric,
+ sFontPitch, sFontCharset;
+ OUString sVerticalPos, sVerticalRel;
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+
+ sal_Int32 nVal;
+ switch( aTokenMap.Get( nPrefix, aLocalName ) )
+ {
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_SPACE_BEFORE:
+ if( aUnitConv.convertMeasure( nVal, rValue, 0, USHRT_MAX ) )
+ rListLevel.SetSpaceBefore( nVal );
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_MIN_LABEL_WIDTH:
+ if( aUnitConv.convertMeasure( nVal, rValue, 0, SHRT_MAX ) )
+ rListLevel.SetMinLabelWidth( nVal );
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_MIN_LABEL_DIST:
+ if( aUnitConv.convertMeasure( nVal, rValue, 0, USHRT_MAX ) )
+ rListLevel.SetMinLabelDist( nVal );
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_TEXT_ALIGN:
+ if( rValue.getLength() )
+ {
+ sal_Int16 eAdjust = HoriOrientation::LEFT;
+ if( rValue.compareToAscii( sXML_center ) == 0 )
+ eAdjust = HoriOrientation::CENTER;
+ else if( rValue.compareToAscii( sXML_end ) == 0 )
+ eAdjust = HoriOrientation::RIGHT;
+ rListLevel.SetAdjust( eAdjust );
+ }
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_FAMILY:
+ sFontFamily = rValue;
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_FAMILY_GENERIC:
+ sFontFamilyGeneric = rValue;
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_STYLENAME:
+ sFontStyleName = rValue;
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_PITCH:
+ sFontPitch = rValue;
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_FONT_CHARSET:
+ sFontCharset = rValue;
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_VERTICAL_POS:
+ sVerticalPos = rValue;
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_VERTICAL_REL:
+ sVerticalRel = rValue;
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_WIDTH:
+ if( aUnitConv.convertMeasure( nVal, rValue, 0, LONG_MAX ) )
+ rListLevel.SetImageWidth( nVal );
+ break;
+ case XML_TOK_STYLE_ATTRIBUTES_ATTR_HEIGHT:
+ if( aUnitConv.convertMeasure( nVal, rValue, 0, LONG_MAX ) )
+ rListLevel.SetImageHeight( nVal );
+ break;
+ }
+ }
+
+ if( sFontFamily.getLength() )
+ {
+ String sEmpty;
+ Any aAny;
+
+ XMLFontFamilyNamePropHdl aFamilyNameHdl;
+ if( aFamilyNameHdl.importXML( sFontFamily, aAny, aUnitConv ) )
+ {
+ OUString sTmp;
+ aAny >>= sTmp;
+ rListLevel.SetBulletFontName( sTmp);
+ }
+
+ XMLFontFamilyPropHdl aFamilyHdl;
+ if( sFontFamilyGeneric.getLength() &&
+ aFamilyHdl.importXML( sFontFamilyGeneric, aAny, aUnitConv ) )
+ {
+ sal_Int16 nTmp;
+ aAny >>= nTmp;
+ rListLevel.SetBulletFontFamily( nTmp );
+ }
+
+ if( sFontStyleName.getLength() )
+ rListLevel.SetBulletFontStyleName( sFontStyleName );
+
+ XMLFontPitchPropHdl aPitchHdl;
+ if( sFontPitch.getLength() &&
+ aPitchHdl.importXML( sFontPitch, aAny, aUnitConv ) )
+ {
+ sal_Int16 nTmp;
+ aAny >>= nTmp;
+ rListLevel.SetBulletFontPitch( nTmp );
+ }
+
+ XMLFontEncodingPropHdl aEncHdl;
+ if( sFontCharset.getLength() &&
+ aEncHdl.importXML( sFontCharset, aAny, aUnitConv ) )
+ {
+ sal_Int16 nTmp;
+ aAny >>= nTmp;
+ rListLevel.SetBulletFontEncoding( nTmp );
+ }
+ }
+
+ sal_Int16 eVertOrient = VertOrientation::LINE_CENTER;
+ if( sVerticalPos.getLength() )
+ {
+ if( sVerticalPos.compareToAscii( sXML_top ) == 0 )
+ eVertOrient = VertOrientation::LINE_TOP;
+ else if( sVerticalPos.compareToAscii( sXML_bottom ) == 0 )
+ eVertOrient = VertOrientation::LINE_BOTTOM;
+ }
+ if( sVerticalRel.getLength() )
+ {
+ if( sVerticalRel.compareToAscii( sXML_baseline ) == 0 )
+ {
+ // TOP and BOTTOM are exchanged for a baseline relation
+ switch( eVertOrient )
+ {
+ case VertOrientation::LINE_TOP:
+ eVertOrient = VertOrientation::BOTTOM;
+ break;
+ case VertOrientation::LINE_CENTER:
+ eVertOrient = VertOrientation::CENTER;
+ break;
+ case VertOrientation::LINE_BOTTOM:
+ eVertOrient = VertOrientation::TOP;
+ break;
+ }
+ }
+ else if( sVerticalRel.compareToAscii( sXML_char ) == 0 )
+ {
+ switch( eVertOrient )
+ {
+ case VertOrientation::LINE_TOP:
+ eVertOrient = VertOrientation::CHAR_TOP;
+ break;
+ case VertOrientation::LINE_CENTER:
+ eVertOrient = VertOrientation::CHAR_CENTER;
+ break;
+ case VertOrientation::LINE_BOTTOM:
+ eVertOrient = VertOrientation::CHAR_BOTTOM;
+ break;
+ }
+ }
+ }
+ rListLevel.SetImageVertOrient( eVertOrient );
+}
+
+SvxXMLListLevelStyleAttrContext_Impl::~SvxXMLListLevelStyleAttrContext_Impl()
+{
+}
+
+// ---------------------------------------------------------------------
+
+typedef SvxXMLListLevelStyleContext_Impl *SvxXMLListLevelStyleContext_ImplPtr;
+SV_DECL_PTRARR( SvxXMLListStyle_Impl, SvxXMLListLevelStyleContext_ImplPtr,
+ 10, 5 )
+
+void SvxXMLListStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
+ const OUString& rLocalName,
+ const OUString& rValue )
+{
+ if( XML_NAMESPACE_TEXT == nPrefixKey &&
+ rLocalName.compareToAscii( sXML_consecutive_numbering ) == 0 )
+ {
+ bConsecutive = rValue.compareToAscii( sXML_true ) == 0;
+ }
+ else
+ {
+ SvXMLStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
+ }
+}
+
+
+SvxXMLListStyleContext::SvxXMLListStyleContext( SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ sal_Bool bOutl ) :
+ SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList ),
+ pLevelStyles( 0 ),
+ nLevels( 0 ),
+ bConsecutive( sal_False ),
+ bOutline( bOutl ),
+ sIsPhysical( RTL_CONSTASCII_USTRINGPARAM( "IsPhysical" ) ),
+ sNumberingRules( RTL_CONSTASCII_USTRINGPARAM( "NumberingRules" ) ),
+ sName( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ),
+ sIsContinuousNumbering( RTL_CONSTASCII_USTRINGPARAM( "IsContinuousNumbering" ) )
+{
+ SetFamily( bOutline ? XML_STYLE_FAMILY_TEXT_OUTLINE :
+ XML_STYLE_FAMILY_TEXT_LIST );
+}
+
+SvxXMLListStyleContext::~SvxXMLListStyleContext()
+{
+ if( pLevelStyles )
+ {
+ while( pLevelStyles->Count() )
+ {
+ sal_uInt16 n = pLevelStyles->Count() - 1;
+ SvxXMLListLevelStyleContext_Impl *pStyle = (*pLevelStyles)[n];
+ pLevelStyles->Remove( n, 1 );
+ pStyle->ReleaseRef();
+ }
+ }
+
+ delete pLevelStyles;
+}
+
+TYPEINIT1( SvxXMLListStyleContext, SvXMLStyleContext );
+
+SvXMLImportContext *SvxXMLListStyleContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ if( XML_NAMESPACE_TEXT == nPrefix &&
+ ( bOutline
+ ? rLocalName.compareToAscii( sXML_outline_level_style ) == 0
+ : ( rLocalName.compareToAscii(sXML_list_level_style_number) == 0 ||
+ rLocalName.compareToAscii(sXML_list_level_style_bullet) == 0 ||
+ rLocalName.compareToAscii(sXML_list_level_style_image) == 0) ) )
+ {
+ SvxXMLListLevelStyleContext_Impl *pLevelStyle =
+ new SvxXMLListLevelStyleContext_Impl( GetImport(), nPrefix,
+ rLocalName, xAttrList );
+ if( !pLevelStyles )
+ pLevelStyles = new SvxXMLListStyle_Impl;
+ pLevelStyles->Insert( pLevelStyle, pLevelStyles->Count() );
+ pLevelStyle->AddRef();
+
+ pContext = pLevelStyle;
+ }
+ else
+ {
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
+void SvxXMLListStyleContext::FillUnoNumRule(
+ const Reference< container::XIndexReplace > & rNumRule,
+ const SvI18NMap *pI18NMap ) const
+{
+ if( pLevelStyles )
+ {
+ sal_uInt16 nCount = pLevelStyles->Count();
+ sal_Int32 nLevels = rNumRule->getCount();
+ for( sal_uInt16 i=0; i < nCount; i++ )
+ {
+ const SvxXMLListLevelStyleContext_Impl *pLevelStyle =
+ (*pLevelStyles)[i];
+ sal_Int32 nLevel = pLevelStyle->GetLevel();
+ if( nLevel >= 0 && nLevel < nLevels )
+ {
+ Sequence<beans::PropertyValue> aProps =
+ pLevelStyle->GetProperties( pI18NMap );
+ Any aAny;
+ aAny <<= aProps;
+ rNumRule->replaceByIndex( nLevel, aAny );
+ }
+ }
+ }
+
+ Reference < XPropertySet > xPropSet( rNumRule, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo;
+ if (xPropSet.is())
+ xPropSetInfo = xPropSet->getPropertySetInfo();
+ if( xPropSetInfo.is() &&
+ xPropSetInfo->hasPropertyByName( sIsContinuousNumbering ) )
+ {
+ Any aAny;
+ sal_Bool bTmp = bConsecutive;
+ aAny.setValue( &bTmp, ::getBooleanCppuType() );
+ xPropSet->setPropertyValue( sIsContinuousNumbering, aAny );
+ }
+}
+
+void SvxXMLListStyleContext::CreateAndInsertLate( sal_Bool bOverwrite )
+{
+ if( bOutline )
+ {
+ if( bOverwrite )
+ {
+ const Reference< XIndexReplace >& rNumRule =
+ GetImport().GetTextImport()->GetChapterNumbering();
+ if( rNumRule.is() )
+ FillUnoNumRule( rNumRule, 0 );
+ }
+ }
+ else
+ {
+ Reference < XStyle > xStyle;
+ const OUString& rName = GetName();
+ if( 0 == rName.getLength() )
+ {
+ SetValid( sal_False );
+ return;
+ }
+
+ const Reference < XNameContainer >& rNumStyles =
+ GetImport().GetTextImport()->GetNumberingStyles();
+ if( !rNumStyles.is() )
+ {
+ SetValid( sal_False );
+ return;
+ }
+
+ sal_Bool bNew = sal_False;
+ if( rNumStyles->hasByName( rName ) )
+ {
+ Any aAny = rNumStyles->getByName( rName );
+ aAny >>= xStyle;
+ }
+ else
+ {
+ Reference< XMultiServiceFactory > xFactory( GetImport().GetModel(),
+ UNO_QUERY );
+ DBG_ASSERT( xFactory.is(), "no factory" );
+ if( !xFactory.is() )
+ return;
+
+ Reference < XInterface > xIfc = xFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.NumberingStyle")) );
+ if( !xIfc.is() )
+ return;
+ Reference < XStyle > xTmp( xIfc, UNO_QUERY );
+ xStyle = xTmp;
+ if( !xStyle.is() )
+ return;
+
+ Any aAny;
+ aAny <<= xStyle;
+ rNumStyles->insertByName( rName, aAny );
+ bNew = sal_True;
+ }
+
+ Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+ if( !bNew && xPropSetInfo->hasPropertyByName( sIsPhysical ) )
+ {
+ Any aAny = xPropSet->getPropertyValue( sIsPhysical );
+ bNew = !*(sal_Bool *)aAny.getValue();
+ }
+
+ // for styles the real name is the style name
+ sRealName = rName;
+
+ Any aAny = xPropSet->getPropertyValue( sNumberingRules );
+ Reference<XIndexReplace> xNumRule;
+ aAny >>= xNumRule;
+ nLevels = xNumRule->getCount();
+ if( bOverwrite || bNew )
+ {
+ FillUnoNumRule( xNumRule, 0 );
+ aAny <<= xNumRule;
+ xPropSet->setPropertyValue( sNumberingRules, aAny );
+ }
+ else
+ {
+ SetValid( sal_False );
+ }
+
+ SetNew( bNew );
+ }
+}
+
+void SvxXMLListStyleContext::CreateAndInsertAuto() const
+{
+ DBG_ASSERT( !bOutline, "Outlines cannot be inserted here" );
+ DBG_ASSERT( !bUsed, "Numbering Rule is existing already" );
+
+ const OUString& rName = GetName();
+ if( bOutline || bUsed || 0 == rName.getLength() )
+ {
+ ((SvxXMLListStyleContext *)this)->SetValid( sal_False );
+ return;
+ }
+
+ Reference<XIndexReplace> xNumRule = CreateNumRule(
+ ((SvxXMLListStyleContext *)this)->sRealName, GetImport().GetModel() );
+ DBG_ASSERT( sRealName.getLength(), "no internal name" );
+ ((SvxXMLListStyleContext *)this)->nLevels = xNumRule->getCount();
+
+ FillUnoNumRule( xNumRule, 0 );
+}
+
+Reference < XIndexReplace > SvxXMLListStyleContext::CreateNumRule(
+ OUString& rRealName,
+ const Reference < XModel > & rModel )
+{
+ Reference<XIndexReplace> xNumRule;
+
+ Reference< XMultiServiceFactory > xFactory( rModel, UNO_QUERY );
+ DBG_ASSERT( xFactory.is(), "no factory" );
+ if( !xFactory.is() )
+ return xNumRule;
+
+ Reference < XInterface > xIfc = xFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.NumberingRule")) );
+ if( !xIfc.is() )
+ return xNumRule;
+
+ xNumRule = Reference<XIndexReplace>( xIfc, UNO_QUERY );
+ DBG_ASSERT( xNumRule.is(), "go no numbering rule" );
+ if( !xNumRule.is() )
+ return xNumRule;
+
+ Reference < XPropertySet > xPropSet( xNumRule, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo;
+ if (xPropSet.is())
+ xPropSetInfo = xPropSet->getPropertySetInfo();
+ const OUString sName( RTL_CONSTASCII_USTRINGPARAM( "Name" ) );
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName( sName ) )
+ {
+ Any aAny = xPropSet->getPropertyValue( sName );
+ aAny >>= rRealName;
+ }
+
+ return xNumRule;
+}
+
+void SvxXMLListStyleContext::SetDefaultStyle(
+ const Reference < XIndexReplace > & rNumRule,
+ sal_Int16 nLevel,
+ sal_Bool bOrdered )
+{
+ Sequence<beans::PropertyValue> aPropSeq( bOrdered ? 1 : 4 );
+ beans::PropertyValue *pProps = aPropSeq.getArray();
+
+ pProps->Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_NUMBERINGTYPE );
+ (pProps++)->Value <<= (sal_Int16)(bOrdered ? NumberingType::ARABIC
+ : NumberingType::CHAR_SPECIAL );
+ if( !bOrdered )
+ {
+ // TODO: Bullet-Font
+ //aNumFmt.SetBulletFont( &SwNumRule::GetDefBulletFont() );
+ awt::FontDescriptor aFDesc;
+ aFDesc.Name = OUString(
+#if defined UNX
+ RTL_CONSTASCII_USTRINGPARAM( "starbats" )
+#else
+ RTL_CONSTASCII_USTRINGPARAM( "StarBats" )
+#endif
+ );
+ aFDesc.Family = FAMILY_DONTKNOW ;
+ aFDesc.Pitch = PITCH_DONTKNOW ;
+ aFDesc.CharSet = RTL_TEXTENCODING_SYMBOL ;
+ aFDesc.Weight = WEIGHT_DONTKNOW;
+ //aFDesc.Transparant = sal_True;
+ pProps->Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_FONT );
+ (pProps++)->Value <<= aFDesc;
+
+ OUStringBuffer sTmp(1);
+ sTmp.append( (sal_Unicode)(0xF000 + 149) );
+ pProps->Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_BULLET_CHAR );
+ (pProps++)->Value <<= sTmp.makeStringAndClear();
+ pProps->Name =
+ OUString::createFromAscii( XML_UNO_NAME_NRULE_CHAR_STYLE_NAME );
+ (pProps++)->Value <<=
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "Numbering Symbols" ) );
+ }
+
+ Any aAny;
+ aAny <<= aPropSeq;
+ rNumRule->replaceByIndex( nLevel, aAny );
+}
+
+sal_Int16 SvxXMLListStyleContext::GetNumType( const OUString& rNumFmt,
+ const OUString& rLetterSync,
+ sal_Int16 eDflt,
+ sal_Bool bNumberNone )
+{
+ sal_Int16 eValue = eDflt;
+ sal_Int32 nLen = rNumFmt.getLength();
+
+ if( 1 == nLen )
+ {
+ switch( rNumFmt[0] )
+ {
+ case sal_Unicode('1'): eValue = NumberingType::ARABIC; break;
+ case sal_Unicode('a'): eValue = NumberingType::CHARS_LOWER_LETTER; break;
+ case sal_Unicode('A'): eValue = NumberingType::CHARS_UPPER_LETTER; break;
+ case sal_Unicode('i'): eValue = NumberingType::ROMAN_LOWER; break;
+ case sal_Unicode('I'): eValue = NumberingType::ROMAN_UPPER; break;
+ }
+ if( rLetterSync.compareToAscii( sXML_true ) == 0 )
+ {
+ switch(eValue )
+ {
+ case NumberingType::CHARS_LOWER_LETTER:
+ eValue = NumberingType::CHARS_LOWER_LETTER_N;
+ break;
+ case NumberingType::CHARS_UPPER_LETTER:
+ eValue = NumberingType::CHARS_UPPER_LETTER_N;
+ break;
+ }
+ }
+ }
+ else if( 0 == nLen )
+ {
+ if( bNumberNone )
+ eValue = NumberingType::NUMBER_NONE;
+ }
+
+ return eValue;
+}
+
+
diff --git a/xmloff/source/style/xmlprcon.cxx b/xmloff/source/style/xmlprcon.cxx
new file mode 100644
index 0000000000..a470d1d0ab
--- /dev/null
+++ b/xmloff/source/style/xmlprcon.cxx
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlprcon.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+
+
+#ifndef _XMLOFF_XMLPROPERTYSETCONTEXT_HXX
+#include "xmlprcon.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::std;
+
+SvXMLPropertySetContext::SvXMLPropertySetContext( SvXMLImport& rImp, USHORT nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ vector< XMLPropertyState > &rProps,
+ const UniReference < SvXMLImportPropertyMapper > &rMap ):
+ SvXMLImportContext( rImp, nPrfx, rLName ),
+ rProperties( rProps ),
+ xMapper ( rMap )
+
+{
+ xMapper->importXML( rProperties, xAttrList,
+ GetImport().GetMM100UnitConverter(),
+ GetImport().GetNamespaceMap() );
+}
+
+SvXMLPropertySetContext::~SvXMLPropertySetContext()
+{
+}
+
+SvXMLImportContext *SvXMLPropertySetContext::CreateChildContext( USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ UniReference< XMLPropertySetMapper > aSetMapper( xMapper->getPropertySetMapper() );
+ sal_Int32 nEntryIndex = aSetMapper->GetEntryIndex( nPrefix, rLocalName );
+
+ if( ( nEntryIndex != -1 ) &&
+ ( 0 != ( aSetMapper->GetEntryFlags( nEntryIndex ) & MID_FLAG_ELEMENT_ITEM_IMPORT ) ) )
+ {
+ XMLPropertyState aProp( nEntryIndex ); // See comment in the body of CreateChildContext
+ return CreateChildContext( nPrefix, rLocalName, xAttrList,
+ rProperties, aProp /*rItemSet, *pEntry*/ );
+ }
+ else
+ {
+ return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+}
+
+/** This method is called from this instance implementation of
+ CreateChildContext if the element matches an entry in the
+ SvXMLImportItemMapper with the mid flag MID_FLAG_ELEMENT
+*/
+SvXMLImportContext *SvXMLPropertySetContext::CreateChildContext( USHORT nPrefix,
+ const NAMESPACE_RTL(OUString)& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& xAttrList,
+ ::std::vector< XMLPropertyState > &rProperties,
+ const XMLPropertyState& rProp ) // instead of a SvXMLItemMapEntry I use now a XMLPropertyState. Is that reasonable, I'm not sure ????
+ //const SvXMLItemMapEntry& rEntry,
+{
+ return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+}
+
+
diff --git a/xmloff/source/style/xmlprhdl.cxx b/xmloff/source/style/xmlprhdl.cxx
new file mode 100644
index 0000000000..7d4fbe4afe
--- /dev/null
+++ b/xmloff/source/style/xmlprhdl.cxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlprhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include <xmlprhdl.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+XMLPropertyHandler::~XMLPropertyHandler()
+{
+ // does nothing
+}
+
+sal_Bool XMLPropertyHandler::equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const
+{
+ return (r1 == r2);
+}
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
new file mode 100644
index 0000000000..9860fda079
--- /dev/null
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -0,0 +1,444 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlprmap.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include "xmlprhdl.hxx"
+#endif
+
+#ifndef _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
+#include "xmlbahdl.hxx"
+#endif
+
+#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
+#include "xmlprmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLTYPES_HXX
+#include "xmltypes.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
+#include <com/sun/star/beans/XPropertyState.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+
+using namespace ::std;
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Ctor
+//
+XMLPropertySetMapper::XMLPropertySetMapper(
+ const XMLPropertyMapEntry* pEntries,
+ const UniReference< XMLPropertyHandlerFactory >& rFactory )
+: mpEntries ( pEntries ),
+ mnEntryCount ( 0 ),
+ maHdlFactory ( rFactory )
+{
+ if( mpEntries )
+ {
+ const XMLPropertyMapEntry* pIter = mpEntries;
+
+ // count entries
+ while( pIter->msApiName ) // the last element of the array contains { NULL, ??, ?? }
+ {
+ mnEntryCount++;
+ pIter++;
+ }
+
+ // fill Sequence of XML-names and PropertyHandler
+ maXMLNames.realloc( mnEntryCount );
+ maApiNames.realloc( mnEntryCount );
+ pIter = mpEntries;
+ for( sal_Int32 i=0; i < mnEntryCount; i++ )
+ {
+ // create XML-name
+ maXMLNames[ i ] = OUString::createFromAscii( pIter->msXMLName );
+ maApiNames[ i ] = OUString::createFromAscii( pIter->msApiName );
+
+ // create PropertyHandler for property
+ const XMLPropertyHandler* pHdl =
+ maHdlFactory->GetPropertyHandler(
+ pIter->mnType & MID_FLAG_MASK );
+
+ DBG_ASSERT( pHdl, "Unknown XML property type handler!" );
+ maPropertyHandler.push_back( pHdl );
+
+ pIter++;
+ }
+ }
+}
+
+XMLPropertySetMapper::~XMLPropertySetMapper()
+{
+}
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Take all properties of the XPropertySet which are also found in the
+// XMLPropertyMapEntry-array and which are not set to their default-value,
+// if a state is available.
+//
+// After that I call the method 'ContextFilter'.
+//
+vector< XMLPropertyState > XMLPropertySetMapper::Filter(
+ const Reference< XPropertySet > xPropSet ) const
+{
+ vector< XMLPropertyState > aPropStateArray;
+
+ // Retrieve XPropertySetInfo and XPropertyState
+ Reference< XPropertySetInfo > xInfo( xPropSet->getPropertySetInfo() );
+ Reference< XPropertyState > xPropState( xPropSet, UNO_QUERY );
+
+ if( mpEntries && xInfo.is() )
+ {
+ const XMLPropertyMapEntry* pIter = mpEntries;
+ sal_Int32 nIndex=0;
+
+ sal_Int32 nCount = 0;
+ while( (pIter++)->msApiName )
+ nCount++;
+ pIter = mpEntries;
+
+
+ if( xPropState.is() )
+ {
+ Sequence<OUString> aApiNames( nCount );
+ Sequence<sal_uInt32> aIndexes( nCount );
+ OUString *pNames = aApiNames.getArray();
+ sal_uInt32 *pIndexes = aIndexes.getArray();
+ nCount = 0;
+ while( pIter->msApiName ) // the last element of the array contains { NULL, ??, ?? }
+ {
+ // Does the PropertySet contain name of mpEntries-array ?
+ if( xInfo->hasPropertyByName( maApiNames[ nIndex ] ) )
+ {
+ pNames[nCount] = maApiNames[ nIndex ];
+ pIndexes[nCount] = nIndex;
+ nCount++;
+ }
+
+ nIndex++;
+ pIter++;
+ }
+
+ aApiNames.realloc( nCount );
+ aIndexes.realloc( nCount );
+
+ Sequence < PropertyState > aStates = xPropState->getPropertyStates( aApiNames );
+
+ const PropertyState *pStates = aStates.getArray();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ if( pStates[i] == PropertyState_DIRECT_VALUE )
+ {
+ // The value is stored in the PropertySet itself, add to list.
+ XMLPropertyState aNewProperty( pIndexes[i],
+ xPropSet->getPropertyValue(
+ aApiNames[i] ) );
+ aPropStateArray.push_back( aNewProperty );
+ }
+ }
+ }
+ else
+ {
+ while( pIter->msApiName ) // the last element of the array contains { NULL, ??, ?? }
+ {
+ // Does the PropertySet contain name of mpEntries-array ?
+ if( xInfo->hasPropertyByName( maApiNames[ nIndex ] ) )
+ {
+ // If there isn't a XPropertyState we can't filter by its state
+ if( !xPropState.is() || xPropState->getPropertyState( maApiNames[ nIndex ] ) == PropertyState_DIRECT_VALUE )
+ {
+ // The value is stored in the PropertySet itself, add to list.
+ XMLPropertyState aNewProperty( nIndex,
+ xPropSet->getPropertyValue(
+ maApiNames[ nIndex ] ) );
+ aPropStateArray.push_back( aNewProperty );
+ }
+ }
+
+ nIndex++;
+ pIter++;
+ }
+ }
+
+ // Call centext-filter
+ ContextFilter( aPropStateArray, xPropSet );
+ }
+
+ return aPropStateArray;
+}
+
+void XMLPropertySetMapper::ContextFilter(
+ vector< XMLPropertyState >& rProperties,
+ Reference< XPropertySet > rPropSet ) const
+{
+ // Derived class could implement this.
+}
+
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Compares two Sequences of XMLPropertyState:
+// 1.Number of elements equal ?
+// 2.Index of each element equal ? (So I know whether the propertynames are the same)
+// 3.Value of each element equal ?
+//
+sal_Bool XMLPropertySetMapper::Equals(
+ const vector< XMLPropertyState >& aProperties1,
+ const vector< XMLPropertyState >& aProperties2 ) const
+{
+ sal_Bool bRet = sal_True;
+ sal_Int32 nCount = aProperties1.size();
+
+ if( nCount == aProperties2.size() )
+ {
+ sal_Int32 nIndex = 0;
+ while( bRet && nIndex < nCount )
+ {
+ const XMLPropertyState& rProp1 = aProperties1[ nIndex ];
+ const XMLPropertyState& rProp2 = aProperties2[ nIndex ];
+
+ // Compare index. If equal, compare value
+ if( rProp1.mnIndex == rProp2.mnIndex )
+ {
+ if( rProp1.mnIndex != -1 )
+ {
+ // Now compare values
+ if( ( mpEntries[rProp1.mnIndex].mnType &
+ XML_TYPE_BUILDIN_CMP ) != 0 )
+ // simple type ( binary compare )
+ bRet = ( rProp1.maValue == rProp2.maValue );
+ else
+ // complex type ( ask for compare-function )
+ bRet = maPropertyHandler[ rProp1.mnIndex ]->equals(
+ rProp1.maValue, rProp2.maValue );
+ }
+ }
+ else
+ bRet = sal_False;
+
+ nIndex++;
+ }
+ }
+ else
+ bRet = sal_False;
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Retrieves a PropertyHandler for that property wich placed at nIndex in
+// the XMLPropertyMapEntry-array
+//
+const XMLPropertyHandler* XMLPropertySetMapper::GetPropertyHandler(
+ sal_Int32 nIndex ) const
+{
+ nIndex &= MID_FLAG_MASK;
+
+ const XMLPropertyHandler* pRet = NULL;
+
+ if( maPropertyHandler.size() > nIndex )
+ pRet = (const XMLPropertyHandler*)maPropertyHandler[ nIndex ];
+
+ return pRet;
+}
+
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Export a Property
+//
+sal_Bool XMLPropertySetMapper::exportXML(
+ OUString& rStrExpValue,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ const XMLPropertyHandler* pHdl = GetPropertyHandler( rProperty.mnIndex );
+
+ DBG_ASSERT( pHdl, "Unknown XML Type!" );
+ if( pHdl )
+ bRet = pHdl->exportXML( rStrExpValue, rProperty.maValue,
+ rUnitConverter );
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Import a Property
+//
+sal_Bool XMLPropertySetMapper::importXML(
+ const OUString& rStrImpValue,
+ XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_False;
+
+ const XMLPropertyHandler* pHdl = GetPropertyHandler( rProperty.mnIndex );
+
+ if( pHdl )
+ bRet = pHdl->importXML( rStrImpValue, rProperty.maValue,
+ rUnitConverter );
+
+ return bRet;
+}
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Search for the given name and the namespace in the list and return
+// the index of the entry
+// If there is no matching entry the method returns -1
+//
+const sal_Int32 XMLPropertySetMapper::GetEntryIndex(
+ sal_uInt16 nNamespace,
+ const OUString& rStrName,
+ sal_Int32 nStartAt /* = -1 */ ) const
+{
+ sal_Int32 nEntries = maXMLNames.getLength();
+ sal_Int32 nIndex= nStartAt == - 1? 0 : nStartAt+1;
+ BOOL bFound = FALSE;
+
+ do
+ {
+ if( mpEntries[nIndex].mnNameSpace == nNamespace &&
+ rStrName.equals( maXMLNames[nIndex] ))
+ bFound = TRUE;
+ else
+ nIndex++;
+
+ } while( nIndex<nEntries && !bFound );
+
+ if( !bFound )
+ nIndex = -1;
+
+ return nIndex;
+}
+
+sal_Bool XMLPropertySetMapper::FillPropertySet(
+ const vector< XMLPropertyState >& aProperties,
+ const Reference<
+ XPropertySet > rPropSet ) const
+{
+ sal_Bool bSet = sal_False;
+ Reference< XPropertySetInfo > xInfo = rPropSet->getPropertySetInfo();
+
+ sal_Int32 nCount = aProperties.size();
+ for( sal_Int32 i=0; i < nCount; i++ )
+ {
+ const XMLPropertyState& rProp = aProperties[i];
+ sal_Int32 nIdx = rProp.mnIndex;
+ if( -1 == nIdx )
+ continue;
+ const OUString& rPropName = maApiNames[nIdx];
+ if( xInfo->hasPropertyByName( rPropName ) )
+ {
+ try
+ {
+ rPropSet->setPropertyValue( rPropName, rProp.maValue );
+ bSet = sal_True;
+ }
+ catch(...)
+ {
+ }
+ }
+ }
+
+ return bSet;
+}
+
+/** searches for an entry that matches the given api name, namespace and local name or -1 if nothing found */
+sal_Int32 XMLPropertySetMapper::FindEntryIndex( sal_Char* sApiName, sal_uInt16 nNameSpace, sal_Char* sXMLName ) const
+{
+ const XMLPropertyMapEntry* pEntries = mpEntries;
+ sal_Int32 nIndex = 0;
+
+ while( pEntries && pEntries->msApiName )
+ {
+ if( pEntries->mnNameSpace == nNameSpace &&
+ (strcmp( pEntries->msApiName, sApiName ) == 0) &&
+ (strcmp( pEntries->msXMLName, sXMLName ) == 0))
+ return nIndex;
+
+ nIndex++;
+ pEntries++;
+ }
+
+ return -1;
+}
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
new file mode 100644
index 0000000000..c0f99d88f3
--- /dev/null
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -0,0 +1,963 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmlstyle.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _COM_SUN_STAR_XML_SAX_SAXPARSEEXCEPTION_HPP_
+#include <com/sun/star/xml/sax/SAXParseException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XEXTENDEDDOCUMENTHANDLER_HPP_
+#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_SAXEXCEPTION_HPP_
+#include <com/sun/star/xml/sax/SAXException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+#ifndef _COM_SUN_STAR_XML_SAX_XLOCATOR_HPP_
+#include <com/sun/star/xml/sax/XLocator.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLEFAMILIESSUPPLIER_HPP_
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX //autogen wg. DBG_ASSERT
+#include <tools/debug.hxx>
+#endif
+#ifndef _LIST_HXX
+#include <tools/list.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+
+#ifndef _CNTRSRT_HXX
+#include <svtools/cntnrsrt.hxx>
+#endif
+#ifndef _SFXITEMSET_HXX //autogen wg. SfxItemSet
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLITEM_HXX
+#include "xmlitem.hxx"
+#endif
+#ifndef _XMLOFF_FAMILIES_HXX
+#include "families.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLITMAP_HXX
+#include "xmlitmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+#ifndef _XMLOFF_XMLNUMI_HXX
+#include "xmlnumi.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLIMPPR_HXX
+#include "xmlimppr.hxx"
+#endif
+#ifndef _XMLOFF_XMLSTYLE_HXX
+#include "xmlstyle.hxx"
+#endif
+#ifndef _XMLOFF_TXTSTYLI_HXX
+#include "txtstyli.hxx"
+#endif
+#ifndef _XMLOFF_TXTPRMAP_HXX
+#include "txtprmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNUMFI_HXX
+#include "xmlnumfi.hxx"
+#endif
+#ifndef _XMLOFF_XMLCHARTSTYLECONTEXT_HXX_
+#include "XMLChartStyleContext.hxx"
+#endif
+#ifndef _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
+#include "XMLChartPropertySetMapper.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLSHAPESTYLECONTEXT_HXX
+#include "XMLShapeStyleContext.hxx"
+#endif
+
+#ifndef _XMLOFF_FILLSTYLECONTEXTS_HXX_
+#include "FillStyleContext.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLFOOTNOTECONFIGURATIONIMPORTCONTEXT_HXX
+#include "XMLFootnoteConfigurationImportContext.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::style;
+
+// ---------------------------------------------------------------------
+
+static __FAR_DATA SvXMLTokenMapEntry aStyleStylesElemTokenMap[] =
+{
+ { XML_NAMESPACE_STYLE, sXML_style, XML_TOK_STYLE_STYLE },
+ { XML_NAMESPACE_TEXT, sXML_list_style, XML_TOK_TEXT_LIST_STYLE },
+ { XML_NAMESPACE_TEXT, sXML_outline_style, XML_TOK_TEXT_OUTLINE },
+ { XML_NAMESPACE_DRAW, sXML_gradient, XML_TOK_STYLES_GRADIENTSTYLES },
+ { XML_NAMESPACE_DRAW, sXML_hatch, XML_TOK_STYLES_HATCHSTYLES },
+ { XML_NAMESPACE_DRAW, sXML_fill_image, XML_TOK_STYLES_BITMAPSTYLES },
+ { XML_NAMESPACE_DRAW, sXML_transparency, XML_TOK_STYLES_TRANSGRADIENTSTYLES },
+ { XML_NAMESPACE_DRAW, sXML_marker, XML_TOK_STYLES_MARKERSTYLES },
+ { XML_NAMESPACE_TEXT, sXML_footnotes_configuration,
+ XML_TOK_TEXT_FOOTNOTE_CONFIG },
+ { XML_NAMESPACE_TEXT, sXML_endnotes_configuration,
+ XML_TOK_TEXT_ENDNOTE_CONFIG },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& SvXMLStylesContext::GetStyleStylesElemTokenMap()
+{
+ if( !pStyleStylesElemTokenMap )
+ pStyleStylesElemTokenMap =
+ new SvXMLTokenMap( aStyleStylesElemTokenMap );
+
+ return *pStyleStylesElemTokenMap;
+}
+
+// ---------------------------------------------------------------------
+
+void SvXMLStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
+ const OUString& rLocalName,
+ const OUString& rValue )
+{
+ // TODO: use a map here
+ if( XML_NAMESPACE_STYLE == nPrefixKey )
+ {
+ if( rLocalName.compareToAscii( sXML_family ) == 0L )
+ {
+ if( rValue.compareToAscii( sXML_paragraph ) == 0L )
+ nFamily = (sal_uInt16)SFX_STYLE_FAMILY_PARA;
+ else if( rValue.compareToAscii( sXML_text ) == 0L )
+ nFamily = (sal_uInt16)SFX_STYLE_FAMILY_CHAR;
+ }
+ else if( rLocalName.compareToAscii( sXML_name ) == 0L )
+ {
+ aName = rValue;
+ }
+ else if( rLocalName.compareToAscii( sXML_parent_style_name ) == 0L )
+ {
+ aParent = rValue;
+ }
+ else if( rLocalName.compareToAscii( sXML_next_style_name ) == 0L )
+ {
+ aFollow = rValue;
+ }
+ else if( rLocalName.compareToAscii( sXML_help_file_name ) == 0L )
+ {
+ aHelpFile = rValue;
+ }
+ else if( rLocalName.compareToAscii( sXML_help_id ) == 0L )
+ {
+ sal_Int32 nTmp = rValue.toInt32();
+ nHelpId =
+ (nTmp < 0L) ? 0U : ( (nTmp > USHRT_MAX) ? USHRT_MAX
+ : (sal_uInt16)nTmp );
+ }
+ }
+}
+
+TYPEINIT1( SvXMLStyleContext, SvXMLImportContext );
+
+SvXMLStyleContext::SvXMLStyleContext( SvXMLImport& rImp, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList >& ) :
+ SvXMLImportContext( rImp, nPrfx, rLName ),
+ nHelpId( UCHAR_MAX ),
+ nFamily( 0 ),
+ nSubFamily( 0U ),
+ bValid( sal_True ),
+ bNew( sal_True )
+{
+}
+
+SvXMLStyleContext::~SvXMLStyleContext()
+{
+}
+
+SvXMLImportContext *SvXMLStyleContext::CreateChildContext( sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );;
+}
+
+void SvXMLStyleContext::StartElement( const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName );
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+
+ SetAttribute( nPrefix, aLocalName, rValue );
+ }
+}
+
+void SvXMLStyleContext::CreateAndInsert( sal_Bool bOverwrite )
+{
+}
+
+void SvXMLStyleContext::CreateAndInsertLate( sal_Bool bOverwrite )
+{
+}
+
+void SvXMLStyleContext::Finish( sal_Bool bOverwrite )
+{
+}
+
+// ---------------------------------------------------------------------
+
+class SvXMLStyleIndex_Impl
+{
+ OUString sName;
+ sal_uInt16 nFamily;
+ sal_uInt16 nSubFamily;
+ const SvXMLStyleContext *pStyle;
+
+public:
+
+ SvXMLStyleIndex_Impl( sal_uInt16 nFam, sal_uInt16 nSubFam,
+ const OUString& rName ) :
+ sName( rName ),
+ nFamily( nFam ),
+ nSubFamily( nSubFam ),
+ pStyle ( 0 )
+ {
+ }
+
+ SvXMLStyleIndex_Impl( const SvXMLStyleContext *pStl ) :
+ sName( pStl->GetName() ),
+ nFamily( pStl->GetFamily() ),
+ nSubFamily( pStl->GetSubFamily() ),
+ pStyle ( pStl )
+ {
+ }
+
+ const OUString& GetName() const { return sName; }
+ sal_uInt16 GetFamily() const { return nFamily; }
+ sal_uInt16 GetSubFamily() const { return nSubFamily; }
+ const SvXMLStyleContext *GetStyle() const { return pStyle; }
+};
+
+int SvXMLStyleIndexCmp_Impl( const SvXMLStyleIndex_Impl& r1,
+ const SvXMLStyleIndex_Impl& r2 )
+{
+ int nRet;
+ if( (sal_uInt16)r1.GetFamily() < (sal_uInt16)r2.GetFamily() )
+ nRet = -1;
+ else if( (sal_uInt16)r1.GetFamily() > (sal_uInt16)r2.GetFamily() )
+ nRet = 1;
+ else if( r1.GetSubFamily() < r2.GetSubFamily() )
+ nRet = -1;
+ else if( r1.GetSubFamily() > r2.GetSubFamily() )
+ nRet = 1;
+ else
+ nRet = (int)r1.GetName().compareTo( r2.GetName() );
+
+ return nRet;
+}
+
+// ---------------------------------------------------------------------
+
+typedef SvXMLStyleContext *SvXMLStyleContextPtr;
+DECLARE_LIST( SvXMLStyleContexts_Impl, SvXMLStyleContextPtr )
+
+DECLARE_CONTAINER_SORT( SvXMLStyleIndices_Impl, SvXMLStyleIndex_Impl )
+IMPL_CONTAINER_SORT( SvXMLStyleIndices_Impl, SvXMLStyleIndex_Impl,
+ SvXMLStyleIndexCmp_Impl )
+
+
+class SvXMLStylesContext_Impl
+{
+ SvXMLStyleContexts_Impl aStyles;
+ SvXMLStyleIndices_Impl *pIndices;
+
+ OUString sId;
+ OUString sParentHRef;
+
+#ifndef PRODUCT
+ sal_uInt32 nIndexCreated;
+#endif
+
+ void FlushIndex() { delete pIndices; pIndices = 0; }
+
+public:
+ SvXMLStylesContext_Impl();
+ ~SvXMLStylesContext_Impl();
+
+ sal_uInt32 GetStyleCount() const { return aStyles.Count(); }
+
+ const SvXMLStyleContext *GetStyle( sal_uInt32 i ) const
+ {
+ return i < aStyles.Count() ? aStyles.GetObject(i) : 0;
+ }
+
+ SvXMLStyleContext *GetStyle( sal_uInt32 i )
+ {
+ FlushIndex();
+ return i < aStyles.Count() ? aStyles.GetObject(i) : 0;
+ }
+
+ inline void AddStyle( SvXMLStyleContext *pStyle );
+
+ const SvXMLStyleContext *FindStyleChildContext( sal_uInt16 nFamily,
+ sal_uInt16 nSubFamily,
+ const OUString& rName,
+ sal_Bool bCreateIndex ) const;
+
+ void SetId( const OUString& rId ) { sId = rId; }
+ const OUString& GetId() { return sId; }
+
+ void SetParentHRef( const OUString& rHRef ) { sParentHRef = rHRef; }
+ const OUString& GetParentHRef() { return sParentHRef; }
+};
+
+SvXMLStylesContext_Impl::SvXMLStylesContext_Impl() :
+#ifndef PRODUCT
+ nIndexCreated( 0 ),
+#endif
+ aStyles( 20, 5 ),
+ pIndices( 0 )
+{}
+
+SvXMLStylesContext_Impl::~SvXMLStylesContext_Impl()
+{
+ delete pIndices;
+
+ while( aStyles.Count() )
+ {
+ SvXMLStyleContext *pStyle = aStyles.GetObject(0);
+ aStyles.Remove( 0UL );
+ pStyle->ReleaseRef();
+ }
+}
+
+inline void SvXMLStylesContext_Impl::AddStyle( SvXMLStyleContext *pStyle )
+{
+ aStyles.Insert( pStyle, aStyles.Count() );
+ pStyle->AddRef();
+
+ FlushIndex();
+}
+
+const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext(
+ sal_uInt16 nFamily,
+ sal_uInt16 nSubFamily,
+ const OUString& rName,
+ sal_Bool bCreateIndex ) const
+{
+ const SvXMLStyleContext *pStyle = 0;
+
+ if( !pIndices && bCreateIndex && aStyles.Count() > 0 )
+ {
+#ifndef PRODUCT
+ DBG_ASSERT( 0==nIndexCreated,
+ "Performance warning: sdbcx::Index created multiple times" );
+#endif
+ ((SvXMLStylesContext_Impl *)this)->pIndices =
+ new SvXMLStyleIndices_Impl( aStyles.Count(), 5 );
+ for( sal_uInt32 i=0; i < aStyles.Count(); i++ )
+ pIndices->Insert( new SvXMLStyleIndex_Impl( aStyles.GetObject(i)) );
+#ifndef PRODUCT
+ ((SvXMLStylesContext_Impl *)this)->nIndexCreated++;
+#endif
+ }
+
+ if( pIndices )
+ {
+ SvXMLStyleIndex_Impl aIndex( nFamily, nSubFamily, rName );
+ sal_uInt32 nPos = 0;
+ if( pIndices->Seek_Entry( &aIndex, &nPos ) )
+ pStyle = pIndices->GetObject( nPos )->GetStyle();
+ }
+ else
+ {
+ for( sal_uInt32 i=0; !pStyle && i < aStyles.Count(); i++ )
+ {
+ const SvXMLStyleContext *pS = aStyles.GetObject( i );
+ if( pS->GetFamily() == nFamily &&
+ pS->GetSubFamily() == nSubFamily &&
+ pS->GetName() == rName )
+ pStyle = pS;
+ }
+ }
+
+ return pStyle;
+}
+
+// ---------------------------------------------------------------------
+
+TYPEINIT1( SvXMLStylesContext, SvXMLImportContext );
+
+sal_uInt32 SvXMLStylesContext::GetStyleCount() const
+{
+ return pImpl->GetStyleCount();
+}
+
+SvXMLStyleContext *SvXMLStylesContext::GetStyle( sal_uInt32 i )
+{
+ return pImpl->GetStyle( i );
+}
+
+const SvXMLStyleContext *SvXMLStylesContext::GetStyle( sal_uInt32 i ) const
+{
+ return pImpl->GetStyle( i );
+}
+
+SvXMLStyleContext *SvXMLStylesContext::CreateStyleChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLStyleContext *pStyle = NULL;
+
+ if(GetImport().GetDataStylesImport())
+ {
+ pStyle = GetImport().GetDataStylesImport()->CreateChildContext(GetImport(), nPrefix,
+ rLocalName, xAttrList, *this);
+ }
+
+ if (!pStyle)
+ {
+ const SvXMLTokenMap& rTokenMap = GetStyleStylesElemTokenMap();
+ switch( rTokenMap.Get( nPrefix, rLocalName ) )
+ {
+ case XML_TOK_STYLE_STYLE:
+ {
+ sal_uInt16 nFamily = 0;
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ if( XML_NAMESPACE_STYLE == nPrefix &&
+ aLocalName.compareToAscii( sXML_family ) == 0L )
+ {
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+ nFamily = GetFamily( rValue );
+ break;
+ }
+ }
+ pStyle = CreateStyleStyleChildContext( nFamily, nPrefix,
+ rLocalName, xAttrList );
+ }
+ break;
+ case XML_TOK_TEXT_LIST_STYLE:
+ pStyle = new SvxXMLListStyleContext( GetImport(), nPrefix,
+ rLocalName, xAttrList );
+ break;
+ case XML_TOK_TEXT_OUTLINE:
+ pStyle = new SvxXMLListStyleContext( GetImport(), nPrefix,
+ rLocalName, xAttrList, sal_True );
+ break;
+ case XML_TOK_TEXT_FOOTNOTE_CONFIG:
+ pStyle = new XMLFootnoteConfigurationImportContext(GetImport(),
+ nPrefix,
+ rLocalName,
+ xAttrList,
+ sal_False);
+ break;
+ case XML_TOK_TEXT_ENDNOTE_CONFIG:
+ pStyle = new XMLFootnoteConfigurationImportContext(GetImport(),
+ nPrefix,
+ rLocalName,
+ xAttrList,
+ sal_True);
+ break;
+ //
+ // FillStyles
+ //
+ case XML_TOK_STYLES_GRADIENTSTYLES:
+ {
+ pStyle = new XMLGradientStyleContext( GetImport(), nPrefix, rLocalName, xAttrList );
+ break;
+ }
+ case XML_TOK_STYLES_HATCHSTYLES:
+ {
+ pStyle = new XMLHatchStyleContext( GetImport(), nPrefix, rLocalName, xAttrList );
+ break;
+ }
+ case XML_TOK_STYLES_BITMAPSTYLES:
+ {
+ pStyle = new XMLBitmapStyleContext( GetImport(), nPrefix, rLocalName, xAttrList );
+ break;
+ }
+ case XML_TOK_STYLES_TRANSGRADIENTSTYLES:
+ {
+ pStyle = new XMLTransGradientStyleContext( GetImport(), nPrefix, rLocalName, xAttrList );
+ break;
+ }
+ case XML_TOK_STYLES_MARKERSTYLES:
+ {
+ pStyle = new XMLMarkerStyleContext( GetImport(), nPrefix, rLocalName, xAttrList );
+ break;
+ }
+ }
+ }
+
+ return pStyle;
+}
+
+SvXMLStyleContext *SvXMLStylesContext::CreateStyleStyleChildContext(
+ sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLStyleContext *pStyle = 0;
+
+ switch( nFamily )
+ {
+ case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
+ case XML_STYLE_FAMILY_TEXT_TEXT:
+ pStyle = new XMLTextStyleContext( GetImport(), nPrefix, rLocalName,
+ xAttrList, *this );
+ break;
+ case XML_STYLE_FAMILY_SCH_CHART_ID:
+ pStyle = new XMLChartStyleContext( GetImport(), nPrefix, rLocalName,
+ xAttrList, *this );
+ break;
+ case XML_STYLE_FAMILY_SD_GRAPHICS_ID:
+ case XML_STYLE_FAMILY_SD_PRESENTATION_ID:
+ case XML_STYLE_FAMILY_SD_POOL_ID:
+ case XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID:
+ pStyle = new XMLShapeStyleContext( GetImport(), nPrefix, rLocalName,
+ xAttrList, *this, nFamily );
+ break;
+ }
+
+ return pStyle;
+}
+
+sal_Bool SvXMLStylesContext::InsertStyleFamily( sal_uInt16 ) const
+{
+ return sal_True;
+}
+
+sal_uInt16 SvXMLStylesContext::GetFamily(
+ const ::rtl::OUString& rValue ) const
+{
+ sal_uInt16 nFamily = 0U;
+ if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_paragraph )))
+ {
+ nFamily = XML_STYLE_FAMILY_TEXT_PARAGRAPH;
+ }
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_text )))
+ {
+ nFamily = XML_STYLE_FAMILY_TEXT_TEXT;
+ }
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(sXML_data_style)))
+ {
+ nFamily = XML_STYLE_FAMILY_DATA_STYLE;
+ }
+ else if( 0 == rValue.compareToAscii( RTL_CONSTASCII_STRINGPARAM( sXML_table )))
+ {
+ if( RTL_CONSTASCII_LENGTH( sXML_table ) == rValue.getLength() )
+ nFamily = XML_STYLE_FAMILY_TABLE_TABLE;
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_column )))
+ nFamily = XML_STYLE_FAMILY_TABLE_COLUMN;
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_row )))
+ nFamily = XML_STYLE_FAMILY_TABLE_ROW;
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_cell )))
+ nFamily = XML_STYLE_FAMILY_TABLE_CELL;
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sXML_table_page )))
+ nFamily = XML_STYLE_FAMILY_TABLE_PAGE_STYLES;
+ }
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)))
+ {
+ nFamily = XML_STYLE_FAMILY_SD_GRAPHICS_ID;
+ }
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_NAME)))
+ {
+ nFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID;
+ }
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(XML_STYLE_FAMILY_SD_POOL_NAME)))
+ {
+ nFamily = XML_STYLE_FAMILY_SD_POOL_ID;
+ }
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME)))
+ {
+ nFamily = XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID;
+ }
+ else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( XML_STYLE_FAMILY_SCH_CHART_NAME )))
+ {
+ nFamily = XML_STYLE_FAMILY_SCH_CHART_ID;
+ }
+
+ return nFamily;
+}
+
+UniReference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportPropertyMapper(
+ sal_uInt16 nFamily ) const
+{
+ UniReference < SvXMLImportPropertyMapper > xMapper;
+
+ switch( nFamily )
+ {
+ case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
+ if( !xParaImpPropMapper.is() )
+ {
+ SvXMLStylesContext * pThis = (SvXMLStylesContext *)this;
+ pThis->xParaImpPropMapper =
+ pThis->GetImport().GetTextImport()
+ ->GetParaImportPropertySetMapper();
+ }
+ xMapper = xParaImpPropMapper;
+ break;
+ case XML_STYLE_FAMILY_TEXT_TEXT:
+ if( !xTextImpPropMapper.is() )
+ {
+ SvXMLStylesContext * pThis = (SvXMLStylesContext *)this;
+ pThis->xTextImpPropMapper =
+ pThis->GetImport().GetTextImport()
+ ->GetTextImportPropertySetMapper();
+ }
+ xMapper = xTextImpPropMapper;
+ break;
+
+ case XML_STYLE_FAMILY_SD_GRAPHICS_ID:
+ case XML_STYLE_FAMILY_SD_PRESENTATION_ID:
+ case XML_STYLE_FAMILY_SD_POOL_ID:
+ if(!xShapeImpPropMapper.is())
+ {
+ UniReference< XMLShapeImportHelper > aImpHelper = ((SvXMLImport&)GetImport()).GetShapeImport();
+ ((SvXMLStylesContext*)this)->xShapeImpPropMapper =
+ new SvXMLImportPropertyMapper(aImpHelper->GetPropertySetMapper());
+ }
+ xMapper = xShapeImpPropMapper;
+ break;
+ case XML_STYLE_FAMILY_SCH_CHART_ID:
+ if( ! xChartImpPropMapper.is() )
+ {
+ XMLPropertySetMapper *pPropMapper = new XMLChartPropertySetMapper();
+ xChartImpPropMapper = new XMLChartImportPropertyMapper( pPropMapper );
+ }
+ xMapper = xChartImpPropMapper;
+ break;
+ }
+
+ return xMapper;
+}
+
+Reference < XNameContainer > SvXMLStylesContext::GetStylesContainer(
+ sal_uInt16 nFamily ) const
+{
+ Reference < XNameContainer > xStyles;
+ OUString sName;
+ switch( nFamily )
+ {
+ case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
+ if( xParaStyles.is() )
+ xStyles = xParaStyles;
+ else
+ sName =
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "ParagraphStyles" ) );
+ break;
+
+ case XML_STYLE_FAMILY_TEXT_TEXT:
+ if( xTextStyles.is() )
+ xStyles = xTextStyles;
+ else
+ sName =
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "CharacterStyles" ) );
+ break;
+ }
+ if( !xStyles.is() && sName.getLength() )
+ {
+ Reference< XStyleFamiliesSupplier > xFamiliesSupp(
+ GetImport().GetModel(), UNO_QUERY );
+ Reference< XNameAccess > xFamilies = xFamiliesSupp->getStyleFamilies();
+ Any aAny = xFamilies->getByName( sName );
+
+ xStyles = *(Reference<XNameContainer>*)aAny.getValue();
+ switch( nFamily )
+ {
+ case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
+ ((SvXMLStylesContext *)this)->xParaStyles = xStyles;
+ break;
+
+ case XML_STYLE_FAMILY_TEXT_TEXT:
+ ((SvXMLStylesContext *)this)->xTextStyles = xStyles;
+ break;
+ }
+ }
+
+ return xStyles;
+}
+
+OUString SvXMLStylesContext::GetServiceName( sal_uInt16 nFamily ) const
+{
+ String sServiceName;
+ switch( nFamily )
+ {
+ case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
+ sServiceName = sParaStyleServiceName;
+ break;
+ case XML_STYLE_FAMILY_TEXT_TEXT:
+ sServiceName = sTextStyleServiceName;
+ break;
+ }
+
+ return sServiceName;
+}
+
+
+SvXMLStylesContext::SvXMLStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ pImpl( new SvXMLStylesContext_Impl ),
+ pStyleStylesElemTokenMap( 0 ),
+ sParaStyleServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.ParagraphStyle" ) ),
+ sTextStyleServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.CharacterStyle" ) )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ if( XML_NAMESPACE_NONE == nPrefix &&
+ aLocalName.compareToAscii( sXML_id ) == 0L )
+ {
+ pImpl->SetId( xAttrList->getValueByIndex( i ) );
+ }
+ }
+}
+
+
+SvXMLStylesContext::~SvXMLStylesContext()
+{
+ delete pStyleStylesElemTokenMap;
+ delete pImpl;
+}
+
+SvXMLImportContext *SvXMLStylesContext::CreateChildContext( sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ if( XML_NAMESPACE_OFFICE == nPrefix &&
+ rLocalName.compareToAscii( sXML_use_styles ) == 0L )
+ {
+ OUString sHRef;
+ pContext = new SvXMLUseStylesContext( GetImport(), nPrefix, rLocalName,
+ xAttrList, sHRef );
+ pImpl->SetParentHRef( sHRef );
+ }
+ else
+ {
+ SvXMLStyleContext *pStyle =
+ CreateStyleChildContext( nPrefix, rLocalName, xAttrList );
+// DBG_ASSERT( pStyle->GetFamily(), "Style without a family" );
+ if( pStyle )
+ {
+ pImpl->AddStyle( pStyle );
+ pContext = pStyle;
+ }
+ else
+ {
+ pContext = new SvXMLImportContext( GetImport(), nPrefix,
+ rLocalName );
+ }
+ }
+
+ return pContext;
+}
+
+void SvXMLStylesContext::EndElement()
+{
+}
+
+void SvXMLStylesContext::AddStyle(SvXMLStyleContext& rNew)
+{
+ pImpl->AddStyle( &rNew );
+}
+
+void SvXMLStylesContext::CopyStylesToDoc( sal_Bool bOverwrite )
+{
+ // pass 1: create text, paragraph and frame styles
+ sal_uInt16 nCount = GetStyleCount();
+ for( sal_uInt16 i=0; i<nCount; i++ )
+ {
+ SvXMLStyleContext *pStyle = GetStyle( i );
+ if( !pStyle )
+ continue;
+
+ if( InsertStyleFamily( pStyle->GetFamily() ) )
+ pStyle->CreateAndInsert( bOverwrite );
+ }
+
+ // pass 2: create list styles (they require char styles)
+ for( i=0; i<nCount; i++ )
+ {
+ SvXMLStyleContext *pStyle = GetStyle( i );
+ if( !pStyle )
+ continue;
+
+ if( InsertStyleFamily( pStyle->GetFamily() ) )
+ pStyle->CreateAndInsertLate( bOverwrite );
+ }
+
+ // pass3: finish creation of styles
+ for( i=0; i<nCount; i++ )
+ {
+ SvXMLStyleContext *pStyle = GetStyle( i );
+ if( !pStyle || !pStyle->IsValid() )
+ continue;
+
+ if( InsertStyleFamily( pStyle->GetFamily() ) )
+ pStyle->Finish( bOverwrite );
+ }
+}
+
+
+const OUString& SvXMLStylesContext::GetId() const
+{
+ return pImpl->GetId();
+}
+
+const OUString& SvXMLStylesContext::GetParentHRef() const
+{
+ return pImpl->GetParentHRef();
+}
+
+const SvXMLStyleContext *SvXMLStylesContext::FindStyleChildContext(
+ sal_uInt16 nFamily,
+ sal_uInt16 nSubFamily,
+ const OUString& rName,
+ sal_Bool bCreateIndex ) const
+{
+ return pImpl->FindStyleChildContext( nFamily, nSubFamily,rName,
+ bCreateIndex );
+}
+
+// ---------------------------------------------------------------------
+
+SvXMLUseStylesContext::SvXMLUseStylesContext(
+ SvXMLImport& rImp, sal_uInt16 nPrfx, const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList,
+ OUString& rHRef ) :
+ SvXMLImportContext( rImp, nPrfx, rLName )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ if( XML_NAMESPACE_XLINK == nPrefix &&
+ aLocalName.compareToAscii( sXML_href ) == 0L )
+ {
+ rHRef = xAttrList->getValueByIndex( i );
+ // TODO: Hack!
+ if( rImp.GetLocator().is() )
+ {
+ // RelToAbs leaves "#foo" util::URL's untouched
+ INetURLObject aBaseURL( rImp.GetLocator()->getSystemId() );
+ INetURLObject aURL;
+ if( aBaseURL.GetNewAbsURL( rHRef, &aURL ) )
+ rHRef = aURL.GetMainURL();
+ }
+ }
+ }
+}
+
+SvXMLUseStylesContext::~SvXMLUseStylesContext()
+{
+}
+
+
diff --git a/xmloff/source/style/xmltabe.cxx b/xmloff/source/style/xmltabe.cxx
new file mode 100644
index 0000000000..736c359ad9
--- /dev/null
+++ b/xmloff/source/style/xmltabe.cxx
@@ -0,0 +1,250 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmltabe.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 <tools/debug.hxx>
+
+#ifndef _COM_SUN_STAR_STYLE_TABSTOP_HPP_
+#include <com/sun/star/style/TabStop.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_TABALIGN_HPP_
+#include <com/sun/star/style/TabAlign.hpp>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLITMAP_HXX
+#include "xmlitmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXPIT_HXX
+#include "xmlexpit.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLTABE_HXX
+#include "xmltabe.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+SvXMLEnumMapEntry psXML_tabstop_style[] =
+{
+ { "left", style::TabAlign_LEFT },
+ { "center", style::TabAlign_CENTER },
+ { "right", style::TabAlign_RIGHT },
+ { "char", style::TabAlign_DECIMAL },
+ { "????", style::TabAlign_DEFAULT }, // ?????????????????????????????????????
+ { 0, 0 }
+};
+
+void SvxXMLTabStopExport::exportTabStop( const ::com::sun::star::style::TabStop* pTabStop )
+{
+ CheckAttrList();
+
+ // text:level
+ OUStringBuffer sBuffer;
+
+ // position attribute
+ mrUnitConv.convertMeasure( sBuffer, pTabStop->Position );
+ AddAttribute( XML_NAMESPACE_STYLE, sXML_tabstop_position,
+ sBuffer.makeStringAndClear() );
+
+ // type attribute
+ if( style::TabAlign_LEFT != pTabStop->Alignment )
+ {
+ mrUnitConv.convertEnum( sBuffer, pTabStop->Alignment,
+ psXML_tabstop_style );
+ AddAttribute( XML_NAMESPACE_STYLE, sXML_tabstop_type,
+ sBuffer.makeStringAndClear() );
+ }
+
+ // char
+ if( style::TabAlign_DECIMAL == pTabStop->Alignment )
+ {
+ sBuffer.append( pTabStop->DecimalChar );
+ AddAttribute( XML_NAMESPACE_STYLE, sXML_tabstop_char,
+ sBuffer.makeStringAndClear() );
+ }
+
+ // leader-char
+ if( ' ' != pTabStop->FillChar )
+ {
+ sBuffer.append( pTabStop->FillChar );
+ AddAttribute( XML_NAMESPACE_STYLE, sXML_tabstop_leader,
+ sBuffer.makeStringAndClear() );
+ }
+
+ OUString sElem = GetQNameByKey( XML_NAMESPACE_STYLE, OUString::createFromAscii(sXML_tabstop_tab_stop) );
+ mxHandler->ignorableWhitespace( msWS );
+ mxHandler->startElement( sElem, mxAttrList );
+ ClearAttrList();
+ mxHandler->ignorableWhitespace( msWS );
+ mxHandler->endElement( sElem );
+}
+
+OUString SvxXMLTabStopExport::GetQNameByKey( sal_uInt16 nKey,
+ const OUString& rLocalName ) const
+{
+ DBG_ASSERT( mpNamespaceMap,
+ "SvxXMLTabStopExport::GetQNameByKey: namespace map is missing" );
+ if( mpNamespaceMap )
+ return mpNamespaceMap->GetQNameByKey( nKey, rLocalName );
+ else
+ return rLocalName;
+}
+
+void SvxXMLTabStopExport::ClearAttrList()
+{
+ mpAttrList->Clear();
+}
+
+#ifndef PRODUCT
+void SvxXMLTabStopExport::CheckAttrList()
+{
+ DBG_ASSERT( !mpAttrList->getLength(),
+ "SvxXMLTabStopExport::CheckAttrList: list is not empty" );
+}
+#endif
+
+void SvxXMLTabStopExport::AddAttribute( sal_uInt16 nPrefixKey, const char *pName,
+ const OUString& rValue )
+{
+ OUString sName( OUString::createFromAscii( pName ) );
+
+ mpAttrList->AddAttribute( GetQNameByKey( nPrefixKey, sName ),
+ msCDATA, rValue );
+}
+
+SvxXMLTabStopExport::SvxXMLTabStopExport( const uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLUnitConverter& rUnitConverter )
+: msCDATA( OUString::createFromAscii( sXML_CDATA ) ),
+ msWS( OUString::createFromAscii( sXML_WS ) ),
+ mpNamespaceMap( 0 ),
+ mrUnitConv( rUnitConverter ),
+ mpAttrList( new SvXMLAttributeList )
+{
+ mxHandler = rHandler;
+ mxAttrList = mpAttrList;
+}
+
+SvxXMLTabStopExport::~SvxXMLTabStopExport()
+{
+}
+
+void SvxXMLTabStopExport::Export( const uno::Any& rAny,
+ const SvXMLNamespaceMap& rNamespaceMap )
+{
+ mpNamespaceMap = &rNamespaceMap;
+
+ CheckAttrList();
+
+
+ uno::Sequence< ::com::sun::star::style::TabStop> aSeq;
+ if(!(rAny >>= aSeq))
+ {
+ DBG_ERROR( "SvxXMLTabStopExport needs a Sequence ::com::sun::star::style::TabStop>" );
+ }
+ else
+ {
+ const ::com::sun::star::style::TabStop* pTabs = aSeq.getConstArray();
+ const sal_uInt16 nTabs = aSeq.getLength();
+
+ // ignore default tab stop here
+ if( 1 == nTabs && style::TabAlign_DEFAULT == pTabs[0].Alignment )
+ return;
+
+ OUString sElem = GetQNameByKey( XML_NAMESPACE_STYLE,
+ OUString::createFromAscii(sXML_tabstop_tab_stops) );
+ mxHandler->ignorableWhitespace( msWS );
+ mxHandler->startElement( sElem, mxAttrList );
+ ClearAttrList();
+
+ for( sal_uInt16 nIndex = 0; nIndex < nTabs; nIndex++ )
+ {
+ DBG_ASSERT( style::TabAlign_DEFAULT == pTabs[nIndex].Alignment ||
+ nIndex == 0 ||
+ style::TabAlign_DEFAULT != pTabs[nIndex-1].Alignment,
+ "tab default distance unexpected" );
+ if( style::TabAlign_DEFAULT != pTabs[nIndex].Alignment )
+ exportTabStop( &(pTabs[nIndex]) );
+ }
+
+ mxHandler->ignorableWhitespace( msWS );
+ mxHandler->endElement( sElem );
+ }
+
+ mpNamespaceMap = 0;
+}
+
+
diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx
new file mode 100644
index 0000000000..9deb2fa25e
--- /dev/null
+++ b/xmloff/source/style/xmltabi.cxx
@@ -0,0 +1,319 @@
+/*************************************************************************
+ *
+ * $RCSfile: xmltabi.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _COM_SUN_STAR_STYLE_TABALIGN_HPP_
+#include <com/sun/star/style/TabAlign.hpp>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_TABSTOP_HPP_
+#include <com/sun/star/style/TabStop.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_I18NMAP_HXX
+#include "i18nmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#include "xmltabi.hxx"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+// ---
+
+enum SvXMLTokenMapAttrs
+{
+ XML_TOK_TABSTOP_POSITION,
+ XML_TOK_TABSTOP_TYPE,
+ XML_TOK_TABSTOP_CHAR,
+ XML_TOK_TABSTOP_LEADER,
+ XML_TOK_TABSTOP_END=XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aTabsAttributesAttrTokenMap[] =
+{
+ { XML_NAMESPACE_STYLE, sXML_tabstop_position, XML_TOK_TABSTOP_POSITION },
+ { XML_NAMESPACE_STYLE, sXML_tabstop_type, XML_TOK_TABSTOP_TYPE },
+ { XML_NAMESPACE_STYLE, sXML_tabstop_char, XML_TOK_TABSTOP_CHAR },
+ { XML_NAMESPACE_STYLE, sXML_tabstop_leader, XML_TOK_TABSTOP_LEADER },
+ XML_TOKEN_MAP_END
+};
+
+// ---
+
+class SvxXMLTabStopContext_Impl : public SvXMLImportContext
+{
+private:
+ style::TabStop aTabStop;
+
+public:
+ TYPEINFO();
+
+ SvxXMLTabStopContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList );
+
+ virtual ~SvxXMLTabStopContext_Impl();
+
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList );
+
+ const style::TabStop& getTabStop() const { return aTabStop; }
+};
+
+TYPEINIT1( SvxXMLTabStopContext_Impl, SvXMLImportContext );
+
+SvxXMLTabStopContext_Impl::SvxXMLTabStopContext_Impl(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+: SvXMLImportContext( rImport, nPrfx, rLName )
+{
+ aTabStop.Position = 0;
+ aTabStop.Alignment = style::TabAlign_LEFT;
+ aTabStop.DecimalChar = sal_Unicode( ',' );
+ aTabStop.FillChar = sal_Unicode( ' ' );
+
+ SvXMLTokenMap aTokenMap( aTabsAttributesAttrTokenMap );
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+
+ sal_Int32 nVal;
+ switch( aTokenMap.Get( nPrefix, aLocalName ) )
+ {
+ case XML_TOK_TABSTOP_POSITION:
+ if( GetImport().GetMM100UnitConverter().convertMeasure( nVal,
+ rValue ) )
+ aTabStop.Position = nVal;
+ break;
+ case XML_TOK_TABSTOP_TYPE:
+ if( 0 == rValue.compareToAscii( sXML_left, sizeof( sXML_left ) ) )
+ {
+ aTabStop.Alignment = style::TabAlign_LEFT;
+ }
+ else if( 0 == rValue.compareToAscii( sXML_right, sizeof( sXML_right ) ) )
+ {
+ aTabStop.Alignment = style::TabAlign_RIGHT;
+ }
+ else if( 0 == rValue.compareToAscii( sXML_center, sizeof( sXML_center ) ) )
+ {
+ aTabStop.Alignment = style::TabAlign_CENTER;
+ }
+ else if( 0 == rValue.compareToAscii( sXML_char, sizeof( sXML_char ) ) )
+ {
+ aTabStop.Alignment = style::TabAlign_DECIMAL;
+ }
+ break;
+ case XML_TOK_TABSTOP_CHAR:
+ if( 0 != rValue.getLength() )
+ aTabStop.DecimalChar = rValue[0];
+ break;
+ case XML_TOK_TABSTOP_LEADER:
+ if( 0 != rValue.getLength() )
+ aTabStop.FillChar = rValue[0];
+ break;
+ }
+ }
+}
+
+SvxXMLTabStopContext_Impl::~SvxXMLTabStopContext_Impl()
+{
+}
+
+SvXMLImportContext *SvxXMLTabStopContext_Impl::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+}
+
+
+
+
+typedef SvxXMLTabStopContext_Impl *SvxXMLTabStopContext_Impl_ImplPtr;
+SV_DECL_PTRARR( SvxXMLTabStopArray_Impl, SvxXMLTabStopContext_Impl_ImplPtr, 20, 5 )
+
+
+// ---
+
+TYPEINIT1( SvxXMLTabStopImportContext, XMLElementPropertyContext );
+
+SvxXMLTabStopImportContext::SvxXMLTabStopImportContext(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const XMLPropertyState& rProp,
+ ::std::vector< XMLPropertyState > &rProps )
+: XMLElementPropertyContext( rImport, nPrfx, rLName, rProp, rProps ),
+ mpTabStops( NULL )
+{
+}
+
+SvxXMLTabStopImportContext::~SvxXMLTabStopImportContext()
+{
+ if( mpTabStops )
+ {
+ sal_uInt16 nCount = mpTabStops->Count();
+ while( nCount )
+ {
+ nCount--;
+ SvxXMLTabStopContext_Impl *pTabStop = (*mpTabStops)[nCount];
+ mpTabStops->Remove( nCount, 1 );
+ pTabStop->ReleaseRef();
+ }
+ }
+
+ delete mpTabStops;
+}
+
+SvXMLImportContext *SvxXMLTabStopImportContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ if( XML_NAMESPACE_STYLE == nPrefix &&
+ 0 == rLocalName.compareToAscii( sXML_tabstop_tab_stop , sizeof( sXML_tabstop_tab_stop ) ) )
+ {
+ // create new tabstop import context
+ SvxXMLTabStopContext_Impl *pTabStopContext =
+ new SvxXMLTabStopContext_Impl( GetImport(), nPrefix, rLocalName,
+ xAttrList );
+
+ // add new tabstop to array of tabstops
+ if( !mpTabStops )
+ mpTabStops = new SvxXMLTabStopArray_Impl;
+
+ mpTabStops->Insert( pTabStopContext, mpTabStops->Count() );
+ pTabStopContext->AddRef();
+
+ pContext = pTabStopContext;
+ }
+ else
+ {
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
+void SvxXMLTabStopImportContext::EndElement( )
+{
+ if( mpTabStops )
+ {
+ sal_uInt16 nCount = mpTabStops->Count();
+
+ uno::Sequence< style::TabStop> aSeq( nCount );
+ style::TabStop* pTabStops = aSeq.getArray();
+ for( sal_uInt16 i=0; i < nCount; i++ )
+ {
+ SvxXMLTabStopContext_Impl *pTabStopContext = (*mpTabStops)[i];
+ *pTabStops++ = pTabStopContext->getTabStop();
+ }
+
+ aProp.maValue <<= aSeq;
+ }
+ else
+ {
+ aProp.maValue.clear();
+ }
+
+ SetInsert( sal_True );
+ XMLElementPropertyContext::EndElement();
+
+
+}
+
+
+
+
diff --git a/xmloff/source/text/XMLAnchorTypePropHdl.hxx b/xmloff/source/text/XMLAnchorTypePropHdl.hxx
new file mode 100644
index 0000000000..1b8d8489fe
--- /dev/null
+++ b/xmloff/source/text/XMLAnchorTypePropHdl.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLAnchorTypePropHdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLANCHORTYPEPROPHDL_HXX
+#define _XMLOFF_XMLANCHORTYPEPROPHDL_HXX
+
+#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#endif
+
+#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
+#include "xmlprhdl.hxx"
+#endif
+
+
+class XMLAnchorTypePropHdl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLAnchorTypePropHdl ();
+
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ static sal_Bool convert( const ::rtl::OUString& rStrImpValue,
+ const SvXMLUnitConverter& rUnitConverter,
+ ::com::sun::star::text::TextContentAnchorType& rType );
+};
+
+#endif // _XMLOFF_XMLANCHORTYPEPROPHDL_HXX
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
new file mode 100644
index 0000000000..b9a358c33f
--- /dev/null
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -0,0 +1,502 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLFootnoteConfigurationImportContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLFOOTNOTECONFIGURATIONIMPORTCONTEXT_HXX
+#include "XMLFootnoteConfigurationImportContext.hxx"
+#endif
+
+#ifndef _RTL_USTRING
+#include <rtl/ustring>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_FAMILIES_HXX
+#include "families.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNUMI_HXX
+#include "xmlnumi.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XFOOTNOTE_HPP_
+#include <com/sun/star/text/XFootnote.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XFOOTNOTESSUPPLIER_HPP_
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XENDNOTESSUPPLIER_HPP_
+#include <com/sun/star/text/XEndnotesSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_FOOTNOTENUMBERING_HPP_
+#include <com/sun/star/text/FootnoteNumbering.hpp>
+#endif
+
+
+
+
+using namespace ::rtl;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+
+
+//
+// XMLFootnoteConfigHelper
+//
+
+/// local helper class for import of quo-vadis and ergo-sum elements
+class XMLFootnoteConfigHelper : public SvXMLImportContext
+{
+ OUStringBuffer sBuffer;
+ XMLFootnoteConfigurationImportContext& rConfig;
+ sal_Bool bIsBegin;
+
+public:
+ TYPEINFO();
+
+ XMLFootnoteConfigHelper(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ XMLFootnoteConfigurationImportContext& rConfigImport,
+ sal_Bool bBegin);
+
+ virtual void EndElement();
+
+ virtual void Characters( const OUString& rChars );
+};
+
+TYPEINIT1( XMLFootnoteConfigHelper, SvXMLImportContext );
+
+XMLFootnoteConfigHelper::XMLFootnoteConfigHelper(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ XMLFootnoteConfigurationImportContext& rConfigImport,
+ sal_Bool bBegin) :
+ SvXMLImportContext(rImport, nPrfx, rLName),
+ rConfig(rConfigImport),
+ sBuffer(),
+ bIsBegin(bBegin)
+{
+}
+
+void XMLFootnoteConfigHelper::EndElement()
+{
+ if (bIsBegin)
+ {
+ rConfig.SetBeginNotice(sBuffer.makeStringAndClear());
+ }
+ else
+ {
+ rConfig.SetEndNotice(sBuffer.makeStringAndClear());
+ }
+// rConfig = NULL; // import contexts are ref-counted
+}
+
+void XMLFootnoteConfigHelper::Characters( const OUString& rChars )
+{
+ sBuffer.append(rChars);
+}
+
+
+//
+// XMLFootnoteConfigurationImportContext
+//
+
+
+TYPEINIT1( XMLFootnoteConfigurationImportContext, SvXMLStyleContext );
+
+XMLFootnoteConfigurationImportContext::XMLFootnoteConfigurationImportContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ const Reference<XAttributeList> & xAttrList,
+ sal_Bool bEnd) :
+ SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList),
+ bIsEndnote(bEnd),
+ pAttrTokenMap(NULL),
+ sCitationStyle(),
+ sAnchorStyle(),
+ sDefaultStyle(),
+ sPageStyle(),
+ sPrefix(),
+ sSuffix(),
+ sBeginNotice(),
+ sEndNotice(),
+ sNumFormat(RTL_CONSTASCII_USTRINGPARAM("1")),
+ sNumSync(RTL_CONSTASCII_USTRINGPARAM("false")),
+ nOffset(0),
+ nNumbering(FootnoteNumbering::PER_PAGE),
+ bPosition(sal_False),
+ sPropertyCharStyleName(RTL_CONSTASCII_USTRINGPARAM("CharStyleName")),
+ sPropertyNumberingType(RTL_CONSTASCII_USTRINGPARAM("NumberingType")),
+ sPropertyPageStyleName(RTL_CONSTASCII_USTRINGPARAM("PageStyleName")),
+ sPropertyParagraphStyleName(
+ RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")),
+ sPropertyPrefix(RTL_CONSTASCII_USTRINGPARAM("Prefix")),
+ sPropertyStartAt(RTL_CONSTASCII_USTRINGPARAM("StartAt")),
+ sPropertySuffix(RTL_CONSTASCII_USTRINGPARAM("Suffix")),
+ sPropertyPositionEndOfDoc(
+ RTL_CONSTASCII_USTRINGPARAM("PositionEndOfDoc")),
+ sPropertyFootnoteCounting(
+ RTL_CONSTASCII_USTRINGPARAM("FootnoteCounting")),
+ sPropertyEndNotice(RTL_CONSTASCII_USTRINGPARAM("EndNotice")),
+ sPropertyBeginNotice(RTL_CONSTASCII_USTRINGPARAM("BeginNotice"))
+{
+ SetFamily( bEnd ?
+ XML_STYLE_FAMILY_TEXT_ENDNOTECONFIG :
+ XML_STYLE_FAMILY_TEXT_FOOTNOTECONFIG );
+}
+
+enum XMLFtnConfigToken
+{
+ XML_TOK_FTNCONFIG_CITATION_STYLENAME,
+ XML_TOK_FTNCONFIG_ANCHOR_STYLENAME,
+ XML_TOK_FTNCONFIG_DEFAULT_STYLENAME,
+ XML_TOK_FTNCONFIG_PAGE_STYLENAME,
+ XML_TOK_FTNCONFIG_OFFSET,
+ XML_TOK_FTNCONFIG_NUM_PREFIX,
+ XML_TOK_FTNCONFIG_NUM_SUFFIX,
+ XML_TOK_FTNCONFIG_NUM_FORMAT,
+ XML_TOK_FTNCONFIG_NUM_SYNC,
+ XML_TOK_FTNCONFIG_START_AT,
+ XML_TOK_FTNCONFIG_POSITION
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aTextFieldAttrTokenMap[] =
+{
+ { XML_NAMESPACE_TEXT, sXML_citation_style_name,
+ XML_TOK_FTNCONFIG_CITATION_STYLENAME },
+// { XML_NAMESPACE_TEXT, sXML_anchor_style_name,
+// XML_TOK_FTNCONFIG_ANCHOR_STYLENAME },
+ { XML_NAMESPACE_TEXT, sXML_default_style_name,
+ XML_TOK_FTNCONFIG_DEFAULT_STYLENAME },
+ { XML_NAMESPACE_TEXT, sXML_page_master_name,
+ XML_TOK_FTNCONFIG_PAGE_STYLENAME },
+ { XML_NAMESPACE_TEXT, sXML_offset, XML_TOK_FTNCONFIG_OFFSET },
+ { XML_NAMESPACE_TEXT, sXML_num_prefix, XML_TOK_FTNCONFIG_NUM_PREFIX },
+ { XML_NAMESPACE_TEXT, sXML_num_suffix, XML_TOK_FTNCONFIG_NUM_SUFFIX },
+ { XML_NAMESPACE_STYLE, sXML_num_format, XML_TOK_FTNCONFIG_NUM_FORMAT },
+ { XML_NAMESPACE_STYLE, sXML_num_letter_sync, XML_TOK_FTNCONFIG_NUM_SYNC },
+ { XML_NAMESPACE_TEXT, sXML_start_numbering_at, XML_TOK_FTNCONFIG_START_AT},
+ { XML_NAMESPACE_TEXT, sXML_footnotes_position, XML_TOK_FTNCONFIG_POSITION},
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap&
+ XMLFootnoteConfigurationImportContext::GetFtnConfigAttrTokenMap()
+{
+ if (NULL == pAttrTokenMap)
+ {
+ pAttrTokenMap = new SvXMLTokenMap(aTextFieldAttrTokenMap);
+ }
+
+ return *pAttrTokenMap;
+}
+
+static SvXMLEnumMapEntry __READONLY_DATA aFootnoteNumberingMap[] =
+{
+ { sXML_page, FootnoteNumbering::PER_PAGE },
+ { sXML_chapter, FootnoteNumbering::PER_CHAPTER },
+ { sXML_document, FootnoteNumbering::PER_DOCUMENT },
+ { 0, 0 },
+};
+
+void XMLFootnoteConfigurationImportContext::StartElement(
+ const Reference<XAttributeList> & xAttrList )
+{
+ sal_Int32 nLength = xAttrList->getLength();
+ for(sal_Int32 nAttr = 0; nAttr < nLength; nAttr++)
+ {
+ OUString sLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
+ GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
+ &sLocalName );
+ OUString sValue = xAttrList->getValueByIndex(nAttr);
+ switch (GetFtnConfigAttrTokenMap().Get(nPrefix, sLocalName))
+ {
+ case XML_TOK_FTNCONFIG_CITATION_STYLENAME:
+ sCitationStyle = sValue;
+ break;
+ case XML_TOK_FTNCONFIG_ANCHOR_STYLENAME:
+ sAnchorStyle = sValue;
+ break;
+ case XML_TOK_FTNCONFIG_DEFAULT_STYLENAME:
+ sDefaultStyle = sValue;
+ break;
+ case XML_TOK_FTNCONFIG_PAGE_STYLENAME:
+ sPageStyle = sValue;
+ break;
+ case XML_TOK_FTNCONFIG_OFFSET:
+ {
+ sal_Int32 nTmp;
+ if (SvXMLUnitConverter::convertNumber(nTmp, sValue))
+ {
+ nOffset = (sal_uInt16)nTmp;
+ }
+ break;
+ }
+ case XML_TOK_FTNCONFIG_NUM_PREFIX:
+ sPrefix = sValue;
+ break;
+ case XML_TOK_FTNCONFIG_NUM_SUFFIX:
+ sSuffix = sValue;
+ break;
+ case XML_TOK_FTNCONFIG_NUM_FORMAT:
+ sNumFormat = sValue;
+ break;
+ case XML_TOK_FTNCONFIG_NUM_SYNC:
+ sNumSync = sValue;
+ break;
+ case XML_TOK_FTNCONFIG_START_AT:
+ {
+ sal_uInt16 nTmp;
+ if (SvXMLUnitConverter::convertEnum(nTmp, sValue,
+ aFootnoteNumberingMap))
+ {
+ nNumbering = nTmp;
+ }
+ break;
+ }
+ case XML_TOK_FTNCONFIG_POSITION:
+ bPosition = (0 == sValue.compareToAscii(sXML_document));
+ break;
+ default:
+ ; // ignore
+ }
+ }
+}
+
+SvXMLImportContext *XMLFootnoteConfigurationImportContext::CreateChildContext(
+ USHORT nPrefix,
+ const OUString& rLocalName,
+ const Reference<XAttributeList> & xAttrList )
+{
+ SvXMLImportContext* pContext = NULL;
+
+ if (!bIsEndnote)
+ {
+ if (XML_NAMESPACE_TEXT == nPrefix)
+ {
+ if (rLocalName.equalsAsciiL(sXML_quo_vadis,
+ sizeof(sXML_quo_vadis)-1))
+ {
+ pContext = new XMLFootnoteConfigHelper(GetImport(),
+ nPrefix, rLocalName,
+ *this, sal_False);
+ }
+ else if (rLocalName.equalsAsciiL(sXML_ergo_sum,
+ sizeof(sXML_ergo_sum)-1))
+ {
+ pContext = new XMLFootnoteConfigHelper(GetImport(),
+ nPrefix, rLocalName,
+ *this, sal_True);
+ }
+ // else: default context
+ }
+ // else: unknown namespace -> default context
+ }
+ // else: endnote -> default context
+
+ if (pContext == NULL)
+ {
+ // default: delegate to super class
+ pContext = SvXMLStyleContext::CreateChildContext(nPrefix,
+ rLocalName,
+ xAttrList);
+ }
+
+ return pContext;
+}
+
+
+void XMLFootnoteConfigurationImportContext::CreateAndInsertLate(
+ sal_Bool bOverwrite )
+{
+
+ if (bOverwrite)
+ {
+ if (bIsEndnote)
+ {
+ Reference<XEndnotesSupplier> xSupplier(
+ GetImport().GetModel(), UNO_QUERY);
+ if (xSupplier.is())
+ {
+ ProcessSettings(xSupplier->getEndnoteSettings());
+ }
+ }
+ else
+ {
+ Reference<XFootnotesSupplier> xSupplier(
+ GetImport().GetModel(), UNO_QUERY);
+ if (xSupplier.is())
+ {
+ ProcessSettings(xSupplier->getFootnoteSettings());
+ }
+ }
+ }
+ // else: ignore (there's only one configuration, so we can only overwrite)
+}
+
+void XMLFootnoteConfigurationImportContext::ProcessSettings(
+ const Reference<XPropertySet> & rConfig)
+{
+ Any aAny;
+
+ if (sCitationStyle.getLength() > 0)
+ {
+ aAny <<= sCitationStyle;
+ rConfig->setPropertyValue(sPropertyCharStyleName, aAny);
+ }
+
+ if (sPageStyle.getLength() > 0)
+ {
+ aAny <<= sPageStyle;
+ rConfig->setPropertyValue(sPropertyPageStyleName, aAny);
+ }
+
+ if (sDefaultStyle.getLength() > 0)
+ {
+ aAny <<= sDefaultStyle;
+ rConfig->setPropertyValue(sPropertyParagraphStyleName, aAny);
+ }
+
+ aAny <<= sPrefix;
+ rConfig->setPropertyValue(sPropertyPrefix, aAny);
+
+ aAny <<= sSuffix;
+ rConfig->setPropertyValue(sPropertySuffix, aAny);
+
+ aAny <<= SvxXMLListStyleContext::GetNumType( sNumFormat, sNumSync );
+ rConfig->setPropertyValue(sPropertyNumberingType, aAny);
+
+ aAny <<= nOffset;
+ rConfig->setPropertyValue(sPropertyStartAt, aAny);
+
+ if (!bIsEndnote)
+ {
+ aAny.setValue(&bPosition, ::getBooleanCppuType());
+ rConfig->setPropertyValue(sPropertyPositionEndOfDoc, aAny);
+
+ aAny <<= nNumbering;
+ rConfig->setPropertyValue(sPropertyFootnoteCounting, aAny);
+
+ aAny <<= sEndNotice;
+ rConfig->setPropertyValue(sPropertyEndNotice, aAny);
+
+ aAny <<= sBeginNotice;
+ rConfig->setPropertyValue(sPropertyBeginNotice, aAny);
+ }
+}
+
+void XMLFootnoteConfigurationImportContext::SetBeginNotice(
+ OUString sText)
+{
+ sBeginNotice = sText;
+}
+
+void XMLFootnoteConfigurationImportContext::SetEndNotice(
+ OUString sText)
+{
+ sEndNotice = sText;
+}
+
+
diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx
new file mode 100644
index 0000000000..7623cd78ab
--- /dev/null
+++ b/xmloff/source/text/XMLFootnoteImportContext.cxx
@@ -0,0 +1,253 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLFootnoteImportContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 "XMLFootnoteImportContext.hxx"
+
+
+#ifndef _RTL_USTRING
+#include <rtl/ustring>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_TEXTIMP_HXX_
+#include "txtimp.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTCONTENT_HPP_
+#include <com/sun/star/text/XTextContent.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XFOOTNOTE_HPP_
+#include <com/sun/star/text/XFootnote.hpp>
+#endif
+
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::xml::sax;
+
+TYPEINIT1(XMLFootnoteImportContext, SvXMLImportContext);
+
+const sal_Char sAPI_service_footnote[] = "com.sun.star.text.Footnote";
+const sal_Char sAPI_service_endnote[] = "com.sun.star.text.Endnote";
+
+
+XMLFootnoteImportContext::XMLFootnoteImportContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const OUString& rLocalName ) :
+ SvXMLImportContext(rImport, nPrfx, rLocalName),
+ rHelper(rHlp),
+ xFootnote(),
+ sPropertyReferenceId(RTL_CONSTASCII_USTRINGPARAM("ReferenceId"))
+{
+}
+
+void XMLFootnoteImportContext::StartElement(
+ const Reference<XAttributeList> & xAttrList)
+{
+ // create footnote
+ Reference<XMultiServiceFactory> xFactory(GetImport().GetModel(),UNO_QUERY);
+ if( xFactory.is() )
+ {
+ // create endnote or footnote
+ sal_Bool bIsEndnote = (0 == GetLocalName().compareToAscii(sXML_endnote));
+ Reference<XInterface> xIfc = xFactory->createInstance(
+ bIsEndnote ?
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sAPI_service_endnote)) :
+ OUString(RTL_CONSTASCII_USTRINGPARAM(sAPI_service_footnote)) );
+
+ // attach footnote to document
+ Reference<XTextContent> xTextContent(xIfc, UNO_QUERY);
+ rHelper.InsertTextContent(xTextContent);
+
+ // process id attribute
+ sal_Int32 nLength = xAttrList->getLength();
+ for(sal_Int32 nAttr = 0; nAttr < nLength; nAttr++)
+ {
+ OUString sLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
+ GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
+ &sLocalName );
+
+ if ( (XML_NAMESPACE_TEXT == nPrefix) &&
+ (0 == sLocalName.compareToAscii(sXML_id)) )
+ {
+ // get ID ...
+ Reference<XPropertySet> xPropertySet(xTextContent, UNO_QUERY);
+ Any aAny =xPropertySet->getPropertyValue(sPropertyReferenceId);
+ sal_Int16 nID;
+ aAny >>= nID;
+
+ // ... and insert into map
+ rHelper.InsertFootnoteID(
+ xAttrList->getValueByIndex(nAttr),
+ nID);
+ }
+ }
+
+ // save old cursor and install new one
+ xOldCursor = rHelper.GetCursor();
+ Reference<XText> xText(xTextContent, UNO_QUERY);
+ rHelper.SetCursor(xText->createTextCursor());
+
+ // remember footnote (for CreateChildContext)
+ Reference<XFootnote> xNote(xTextContent, UNO_QUERY);
+ xFootnote = xNote;
+ }
+ // else: ignore footnote! Content will be merged into document.
+}
+
+void XMLFootnoteImportContext::Characters(
+ const OUString& rString)
+{
+ // ignore characters! Text must be contained in paragraphs!
+ // rHelper.InsertString(rString);
+}
+
+void XMLFootnoteImportContext::EndElement()
+{
+ // get rid of last dummy paragraph
+ if( rHelper.GetCursor()->goLeft( 1, sal_True ))
+ {
+ OUString sEmpty;
+ rHelper.GetText()->insertString( rHelper.GetCursorAsRange(),
+ sEmpty, sal_True );
+ }
+
+ // reinstall old cursor
+ rHelper.SetCursor(xOldCursor);
+}
+
+SvXMLImportContext *XMLFootnoteImportContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const Reference<XAttributeList> & xAttrList )
+{
+ if ( (nPrefix == XML_NAMESPACE_TEXT) &&
+ (0 == rLocalName.compareToAscii(sXML_citation)) )
+ {
+ // little hack: we only care for one attribute of the citation
+ // element. We handle that here, and then return a default
+ // context.
+ sal_Int32 nLength = xAttrList->getLength();
+ for(sal_Int32 nAttr = 0; nAttr < nLength; nAttr++)
+ {
+
+ OUString sLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
+ GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
+ &sLocalName );
+
+ if ( (nPrefix == XML_NAMESPACE_TEXT) &&
+ (0 == sLocalName.compareToAscii(sXML_label)) )
+ {
+ xFootnote->setLabel(xAttrList->getValueByIndex(nAttr));
+ }
+ }
+
+ // ignore content: return default context
+ return new SvXMLImportContext(GetImport(), nPrefix, rLocalName);
+ }
+ else
+ {
+ // return text context
+ return rHelper.CreateTextChildContext(GetImport(),
+ nPrefix, rLocalName,
+ xAttrList);
+ }
+}
diff --git a/xmloff/source/text/XMLFootnoteImportContext.hxx b/xmloff/source/text/XMLFootnoteImportContext.hxx
new file mode 100644
index 0000000000..b39b99081f
--- /dev/null
+++ b/xmloff/source/text/XMLFootnoteImportContext.hxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLFootnoteImportContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLFOOTNOTEIMPORTCONTEXT_HXX_
+#define _XMLOFF_XMLFOOTNOTEIMPORTCONTEXT_HXX_
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+
+
+namespace com { namespace sun { namespace star {
+ namespace text {
+ class XTextCursor;
+ class XFootnote;
+ }
+ namespace xml { namespace sax {
+ class XAttributeList;
+ } }
+} } }
+namespace rtl {
+ class OUString;
+}
+class XMLTextImportHelper;
+
+
+/// import footnote elements (<text:footnote>)
+class XMLFootnoteImportContext : public SvXMLImportContext
+{
+ const ::rtl::OUString sPropertyReferenceId;
+
+ /// old document cursor
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor> xOldCursor;
+
+ /// text import helper; holds current XTextCursor (and XText)
+ XMLTextImportHelper& rHelper;
+
+ /// the footnote
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XFootnote> xFootnote;
+
+public:
+
+ TYPEINFO();
+
+ XMLFootnoteImportContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLocalName );
+
+protected:
+
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ virtual void Characters(
+ const ::rtl::OUString& rChars);
+
+ virtual void EndElement();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+
+};
+
+#endif
diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx
new file mode 100644
index 0000000000..96ee143be3
--- /dev/null
+++ b/xmloff/source/text/XMLTextColumnsExport.cxx
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextColumnsExport.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTCOLUMNS_HPP_
+#include <com/sun/star/text/XTextColumns.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_TEXTCOLUMN_HPP_
+#include <com/sun/star/text/TextColumn.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXP_HXX
+#include "xmlexp.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLTEXTCOLUMNSEXPORT_HXX
+#include "XMLTextColumnsExport.hxx"
+#endif
+
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::uno;
+using namespace ::rtl;
+
+
+XMLTextColumnsExport::XMLTextColumnsExport( SvXMLExport& rExp ) :
+ rExport( rExp )
+{
+}
+
+void XMLTextColumnsExport::exportXML( const Any& rAny )
+{
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, sXML_columns,
+ sal_True, sal_True );
+ Reference < XTextColumns > xColumns;
+ rAny >>= xColumns;
+
+ Sequence < TextColumn > aColumns = xColumns->getColumns();
+ const TextColumn *pColumns = aColumns.getArray();
+ sal_Int32 nCount = aColumns.getLength();
+
+ OUStringBuffer sValue;
+ while( nCount-- )
+ {
+ // style:rel-width
+ GetExport().GetMM100UnitConverter().convertNumber( sValue,
+ pColumns->Width );
+ sValue.append( (sal_Unicode)'*' );
+ GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_rel_width,
+ sValue.makeStringAndClear() );
+
+ // fo:margin-left
+ GetExport().GetMM100UnitConverter().convertMeasure( sValue,
+ pColumns->LeftMargin );
+ GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_margin_left,
+ sValue.makeStringAndClear() );
+
+ // fo:margin-right
+ GetExport().GetMM100UnitConverter().convertMeasure( sValue,
+ pColumns->RightMargin );
+ GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_margin_right,
+ sValue.makeStringAndClear() );
+
+ // style:column
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, sXML_column,
+ sal_True, sal_True );
+ pColumns++;
+ }
+}
+
+
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
new file mode 100644
index 0000000000..68c5f50cc6
--- /dev/null
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -0,0 +1,528 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextFrameContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFRAME_HPP_
+#include <com/sun/star/text/XTextFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
+#include <com/sun/star/container/XNamed.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_SIZETYPE_HPP_
+#include <com/sun/star/text/SizeType.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_XMLANCHORTYPEPROPHDL_HXX
+#include "XMLAnchorTypePropHdl.hxx"
+#endif
+#ifndef _XMLOFF_PRSTYLEI_HXX_
+#include "prstylei.hxx"
+#endif
+#ifndef _XMLOFF_I18NMAP_HXX
+#include "i18nmap.hxx"
+#endif
+
+#ifndef _XMLTEXTLISTBLOCKCONTEXT_HXX
+#include "XMLTextFrameContext.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+
+class XMLTextFrameDescContext_Impl : public SvXMLImportContext
+{
+ OUString& rDesc;
+
+public:
+
+ TYPEINFO();
+
+ XMLTextFrameDescContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ OUString& rD );
+ virtual ~XMLTextFrameDescContext_Impl();
+
+ virtual void Characters( const OUString& rText );
+};
+
+TYPEINIT1( XMLTextFrameDescContext_Impl, SvXMLImportContext );
+
+XMLTextFrameDescContext_Impl::XMLTextFrameDescContext_Impl(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx, const OUString& rLName,
+ const Reference< XAttributeList > & xAttrList,
+ OUString& rD ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ rDesc( rD )
+{
+}
+
+XMLTextFrameDescContext_Impl::~XMLTextFrameDescContext_Impl()
+{
+}
+
+void XMLTextFrameDescContext_Impl::Characters( const OUString& rText )
+{
+ rDesc += rText;
+}
+
+// ------------------------------------------------------------------------
+
+TYPEINIT1( XMLTextFrameContext, SvXMLImportContext );
+
+XMLTextFrameContext::XMLTextFrameContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx, const OUString& rLName,
+ const Reference< XAttributeList > & xAttrList,
+ TextContentAnchorType eATyp,
+ sal_uInt16 nType ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ sWidth(RTL_CONSTASCII_USTRINGPARAM("Width")),
+ sRelativeWidth(RTL_CONSTASCII_USTRINGPARAM("RelativeWidth")),
+ sHeight(RTL_CONSTASCII_USTRINGPARAM("Height")),
+ sRelativeHeight(RTL_CONSTASCII_USTRINGPARAM("RelativeHeight")),
+ sSizeType(RTL_CONSTASCII_USTRINGPARAM("SizeType")),
+ sSizeRelative(RTL_CONSTASCII_USTRINGPARAM("SizeRelative")),
+ sHoriOrientPosition(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")),
+ sVertOrientPosition(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")),
+ sChainNextName(RTL_CONSTASCII_USTRINGPARAM("ChainNextName")),
+ sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType")),
+ sAnchorPageNo(RTL_CONSTASCII_USTRINGPARAM("AnchorPageNo")),
+ sGraphicURL(RTL_CONSTASCII_USTRINGPARAM("GraphicURL")),
+ sGraphicFilter(RTL_CONSTASCII_USTRINGPARAM("GraphicFilter")),
+ sAlternativeText(RTL_CONSTASCII_USTRINGPARAM("AlternativeText")),
+ sFrameStyleName(RTL_CONSTASCII_USTRINGPARAM("FrameStyle")),
+ sTextBoxServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")),
+ sGraphicServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Graphic"))
+{
+ OUString sName;
+ OUString sStyleName;
+ OUString sChainNextName;
+ OUString sHRef;
+ OUString sFilterName;
+
+ sal_Int32 nX = 0;
+ sal_Int32 nY = 0;
+ sal_Int32 nWidth = 0;
+ sal_Int32 nMinWidth = 0;
+ sal_Int32 nHeight = 0;
+ sal_Int32 nMinHeight;
+ sal_Int16 nPage = 0;
+
+ TextContentAnchorType eAnchorType = eATyp;
+
+ sal_Bool bRelWidth = sal_False;
+ sal_Bool bRelMinWidth = sal_False;
+ sal_Bool bRelHeight = sal_False;
+ sal_Bool bRelMinHeight = sal_False;
+ UniReference < XMLTextImportHelper > xTxtImport =
+ GetImport().GetTextImport();
+ const SvXMLTokenMap& rTokenMap =
+ xTxtImport->GetTextFrameAttrTokenMap();
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ switch( rTokenMap.Get( nPrefix, aLocalName ) )
+ {
+ case XML_TOK_TEXT_FRAME_STYLE_NAME:
+ sStyleName = rValue;
+ break;
+ case XML_TOK_TEXT_FRAME_NAME:
+ sName = rValue;
+ break;
+ case XML_TOK_TEXT_FRAME_ANCHOR_TYPE:
+ if( TextContentAnchorType_AT_PARAGRAPH == eAnchorType ||
+ TextContentAnchorType_AT_CHARACTER == eAnchorType ||
+ TextContentAnchorType_AS_CHARACTER == eAnchorType )
+ {
+ TextContentAnchorType eNew;
+ if( XMLAnchorTypePropHdl::convert( rValue,
+ GetImport().GetMM100UnitConverter(), eNew ) &&
+ ( TextContentAnchorType_AT_PARAGRAPH == eNew ||
+ TextContentAnchorType_AT_CHARACTER == eNew ||
+ TextContentAnchorType_AS_CHARACTER == eNew ) )
+ eAnchorType = eNew;
+ }
+ break;
+ case XML_TOK_TEXT_FRAME_ANCHOR_PAGE_NUMBER:
+ {
+ sal_Int32 nTmp;
+ if( GetImport().GetMM100UnitConverter().
+ convertNumber( nTmp, rValue, 1, SHRT_MAX ) )
+ nPage = (sal_Int16)nTmp;
+ }
+ break;
+ case XML_TOK_TEXT_FRAME_X:
+ GetImport().GetMM100UnitConverter().convertMeasure( nX, rValue );
+ break;
+ case XML_TOK_TEXT_FRAME_Y:
+ GetImport().GetMM100UnitConverter().convertMeasure( nY, rValue );
+ break;
+ case XML_TOK_TEXT_FRAME_WIDTH:
+ bRelWidth = rValue.indexOf( '%' ) != -1;
+ if( bRelWidth )
+ GetImport().GetMM100UnitConverter().convertPercent( nWidth, rValue );
+ else
+ GetImport().GetMM100UnitConverter().convertMeasure( nWidth, rValue, 0 );
+ break;
+ case XML_TOK_TEXT_FRAME_MIN_WIDTH:
+ bRelMinWidth = rValue.indexOf( '%' ) != -1;
+ if( bRelMinWidth )
+ GetImport().GetMM100UnitConverter().convertPercent( nMinWidth, rValue );
+ else
+ GetImport().GetMM100UnitConverter().convertMeasure( nMinWidth, rValue, 0 );
+ break;
+ case XML_TOK_TEXT_FRAME_HEIGHT:
+ bRelHeight = rValue.indexOf( '%' ) != -1;
+ if( bRelHeight )
+ GetImport().GetMM100UnitConverter().convertPercent( nHeight, rValue );
+ else
+ GetImport().GetMM100UnitConverter().convertMeasure( nHeight, rValue, 0 );
+ break;
+ case XML_TOK_TEXT_FRAME_MIN_HEIGHT:
+ bRelMinHeight = rValue.indexOf( '%' ) != -1;
+ if( bRelMinHeight )
+ GetImport().GetMM100UnitConverter().convertPercent( nMinHeight, rValue );
+ else
+ GetImport().GetMM100UnitConverter().convertMeasure( nMinHeight, rValue, 0 );
+ break;
+ case XML_TOK_TEXT_FRAME_NEXT_CHAIN_NAME:
+ sChainNextName = rValue;
+ break;
+ case XML_TOK_TEXT_FRAME_HREF:
+ sHRef = rValue;
+ break;
+ case XML_TOK_TEXT_FRAME_FILTER_NAME:
+ sFilterName = rValue;
+ break;
+ }
+ }
+
+ Reference<XMultiServiceFactory> xFactory( GetImport().GetModel(),
+ UNO_QUERY );
+ if( xFactory.is() )
+ {
+ OUString sServiceName;
+ switch( nType )
+ {
+ case XML_TEXT_FRAME_TEXTBOX: sServiceName = sTextBoxServiceName; break;
+ case XML_TEXT_FRAME_GRAPHIC: sServiceName = sGraphicServiceName; break;
+ }
+ Reference<XInterface> xIfc = xFactory->createInstance( sServiceName );
+ DBG_ASSERT( xIfc.is(), "couldn't create frame" );
+ if( xIfc.is() )
+ xPropSet = Reference < XPropertySet >( xIfc, UNO_QUERY );
+ }
+
+ if( !xPropSet.is() )
+ return;
+
+ Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
+
+ // set name
+ if( sName.getLength() )
+ {
+ Reference < XNamed > xNamed( xPropSet, UNO_QUERY );
+ if( xNamed.is() )
+ {
+ OUString sOldName( sName );
+ sal_Int32 i = 0;
+ while( xTxtImport->HasFrameByName( sName ) )
+ {
+ sName = sOldName;
+ sName += OUString::valueOf( ++i );
+ }
+ xNamed->setName( sName );
+ if( sName != sOldName )
+ xTxtImport->GetRenameMap().Add( XML_TEXT_RENAME_TYPE_FRAME,
+ sOldName, sName );
+ }
+ }
+
+ // frame style
+ XMLPropStyleContext *pStyle = 0;
+ if( sStyleName.getLength() )
+ {
+ pStyle = xTxtImport->FindAutoFrameStyle( sStyleName );
+ if( pStyle )
+ sStyleName = pStyle->GetParent();
+ }
+
+ Any aAny;
+ if( sStyleName.getLength() )
+ {
+ const Reference < XNameContainer > & rStyles =
+ xTxtImport->GetFrameStyles();
+ if( rStyles.is() &&
+ rStyles->hasByName( sStyleName ) )
+ {
+ aAny <<= sStyleName;
+ xPropSet->setPropertyValue( sFrameStyleName, aAny );
+ }
+ }
+
+ // hard properties
+ if( pStyle )
+ pStyle->FillPropertySet( xPropSet );
+
+ // anchor type
+ aAny <<= eAnchorType;
+ xPropSet->setPropertyValue( sAnchorType, aAny );
+
+
+ // x and y
+ aAny <<= nX;
+ xPropSet->setPropertyValue( sHoriOrientPosition, aAny );
+ aAny <<= nY;
+ xPropSet->setPropertyValue( sVertOrientPosition, aAny );
+
+ // width
+ if( !nWidth )
+ {
+ nWidth = nMinWidth;
+ bRelWidth = bRelMinWidth;
+ }
+ sal_Bool bMinHeight = sal_False;
+ if( !nHeight )
+ {
+ nHeight = nMinHeight;
+ bRelHeight = bRelMinHeight;
+ bMinHeight = sal_True;
+ }
+ if( nWidth )
+ {
+ if( bRelWidth > 0 )
+ {
+ aAny <<= (sal_Int16)nWidth;
+ xPropSet->setPropertyValue( sRelativeWidth, aAny );
+ }
+ else
+ {
+ aAny <<= nWidth;
+ xPropSet->setPropertyValue( sWidth, aAny );
+ }
+ }
+ else if( XML_TEXT_FRAME_GRAPHIC == nType && nHeight > 0 )
+ {
+ // TODO: synchronize width to height
+ }
+
+ if( nHeight > 0 )
+ {
+ if( xPropSetInfo->hasPropertyByName( sSizeType ) )
+ {
+ sal_Int16 nSizeType =
+ (bMinHeight && XML_TEXT_FRAME_TEXTBOX == nType) ? SizeType::MIN
+ : SizeType::FIX;
+ aAny <<= nSizeType;
+ xPropSet->setPropertyValue( sSizeType, aAny );
+ }
+ if( bRelHeight > 0 )
+ {
+ aAny <<= (sal_Int16)nHeight;
+ xPropSet->setPropertyValue( sRelativeHeight, aAny );
+ }
+ else
+ {
+ aAny <<= nHeight;
+ xPropSet->setPropertyValue( sHeight, aAny );
+ }
+ }
+ else if( XML_TEXT_FRAME_GRAPHIC == nType && nWidth > 0 )
+ {
+ // synchroize height to width
+ sal_Bool bTmp = sal_True;
+ aAny.setValue( &bTmp, ::getBooleanCppuType() );
+ xPropSet->setPropertyValue( sSizeRelative, aAny );
+ }
+
+ if( XML_TEXT_FRAME_GRAPHIC == nType )
+ {
+ // URL
+ aAny <<=sHRef;
+ xPropSet->setPropertyValue( sGraphicURL, aAny );
+
+ // filter name
+ aAny <<=sFilterName;
+ xPropSet->setPropertyValue( sGraphicFilter, aAny );
+ }
+
+ Reference < XTextContent > xTxtCntnt( xPropSet, UNO_QUERY );
+ xTxtImport->InsertTextContent( xTxtCntnt );
+
+ // page number (must be set after the frame is inserted, because it
+ // will be overwritten then inserting the frame.
+ if( TextContentAnchorType_AT_PAGE == eAnchorType )
+ {
+ aAny <<= nPage;
+ xPropSet->setPropertyValue( sAnchorPageNo, aAny );
+ }
+
+ if( XML_TEXT_FRAME_TEXTBOX == nType )
+ {
+ xTxtImport->ConnectFrameChains( sName, sChainNextName, xPropSet );
+ Reference < XTextFrame > xTxtFrame( xPropSet, UNO_QUERY );
+ Reference < XText > xTxt = xTxtFrame->getText();
+ xOldTextCursor = xTxtImport->GetCursor();
+ xTxtImport->SetCursor( xTxt->createTextCursor() );
+ }
+
+}
+
+XMLTextFrameContext::~XMLTextFrameContext()
+{
+}
+
+void XMLTextFrameContext::EndElement()
+{
+ // alternative text
+ if( sDesc.getLength() && xPropSet.is() )
+ {
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+ if( xPropSetInfo->hasPropertyByName( sAlternativeText ) )
+ {
+ Any aAny;
+ aAny <<= sDesc;
+ xPropSet->setPropertyValue( sAlternativeText, aAny );
+ }
+ }
+
+ if( xOldTextCursor.is() )
+ {
+ if( GetImport().GetTextImport()->GetCursor()->goLeft( 1, sal_True ) )
+ {
+ OUString sEmpty;
+ GetImport().GetTextImport()->GetText()->insertString(
+ GetImport().GetTextImport()->GetCursorAsRange(), sEmpty,
+ sal_True );
+ }
+ GetImport().GetTextImport()->SetCursor( xOldTextCursor );
+ }
+}
+
+SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const Reference< XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ if( XML_NAMESPACE_OFFICE == nPrefix &&
+ rLocalName.equalsAsciiL( sXML_desc, sizeof(sXML_desc)-1 ) )
+ pContext = new XMLTextFrameDescContext_Impl( GetImport(),
+ nPrefix, rLocalName,
+ xAttrList, sDesc );
+ else if( xOldTextCursor.is() ) // text-box
+ pContext = GetImport().GetTextImport()->CreateTextChildContext(
+ GetImport(), nPrefix, rLocalName, xAttrList,
+ XML_TEXT_TYPE_TEXTBOX );
+
+ if( !pContext )
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+
+ return pContext;
+}
+
+
+
diff --git a/xmloff/source/text/XMLTextFrameContext.hxx b/xmloff/source/text/XMLTextFrameContext.hxx
new file mode 100644
index 0000000000..d189f787ca
--- /dev/null
+++ b/xmloff/source/text/XMLTextFrameContext.hxx
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextFrameContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLTEXTFRAMECONTEXT_HXX
+#define _XMLTEXTFRAMECONTEXT_HXX
+
+#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+namespace com { namespace sun { namespace star {
+ namespace text { class XTextCursor; }
+ namespace beans { class XPropertySet; }
+} } }
+
+#define XML_TEXT_FRAME_TEXTBOX 1
+#define XML_TEXT_FRAME_GRAPHIC 2
+
+class XMLTextFrameContext : public SvXMLImportContext
+{
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextCursor > xOldTextCursor;
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > xPropSet;
+
+ const ::rtl::OUString sWidth;
+ const ::rtl::OUString sRelativeWidth;
+ const ::rtl::OUString sHeight;
+ const ::rtl::OUString sRelativeHeight;
+ const ::rtl::OUString sSizeType;
+ const ::rtl::OUString sSizeRelative;
+ const ::rtl::OUString sHoriOrientPosition;
+ const ::rtl::OUString sVertOrientPosition;
+ const ::rtl::OUString sChainNextName;
+ const ::rtl::OUString sAnchorType;
+ const ::rtl::OUString sAnchorPageNo;
+ const ::rtl::OUString sGraphicURL;
+ const ::rtl::OUString sGraphicFilter;
+ const ::rtl::OUString sAlternativeText;
+ const ::rtl::OUString sFrameStyleName;
+ const ::rtl::OUString sTextBoxServiceName;
+ const ::rtl::OUString sGraphicServiceName;
+
+ ::rtl::OUString sDesc;
+
+public:
+
+ TYPEINFO();
+
+ XMLTextFrameContext( SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ ::com::sun::star::text::TextContentAnchorType eAnchorType,
+ sal_uInt16 nType );
+ virtual ~XMLTextFrameContext();
+
+ virtual void EndElement();
+
+ SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+};
+
+
+#endif
diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx
new file mode 100644
index 0000000000..fe9961923d
--- /dev/null
+++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx
@@ -0,0 +1,265 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextListAutoStylePool.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _CNTRSRT_HXX
+#include <svtools/cntnrsrt.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLNUME_HXX
+#include "xmlnume.hxx"
+#endif
+#ifndef _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX
+#include "XMLTextListAutoStylePool.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::container;
+using namespace ::com::sun::star::style;
+
+
+int XMLTextListAutoStylePoolNameCmp_Impl( const OUString& r1,
+ const OUString& r2 )
+{
+ return (int)r1.compareTo( r2 );
+}
+
+DECLARE_CONTAINER_SORT_DEL( XMLTextListAutoStylePoolNames_Impl,
+ OUString )
+IMPL_CONTAINER_SORT( XMLTextListAutoStylePoolNames_Impl,
+ OUString,
+ XMLTextListAutoStylePoolNameCmp_Impl )
+
+class XMLTextListAutoStylePoolEntry_Impl
+{
+ OUString sName;
+ OUString sInternalName;
+ Reference < XIndexReplace > xNumRule;
+ sal_uInt32 nPos;
+
+
+public:
+
+ XMLTextListAutoStylePoolEntry_Impl(
+ sal_uInt32 nPos,
+ const OUString& rIntName,
+ const Reference < XIndexReplace > & rNumRule,
+ XMLTextListAutoStylePoolNames_Impl& rNames,
+ const OUString& rPrefix,
+ sal_uInt32& rName );
+
+ XMLTextListAutoStylePoolEntry_Impl( const OUString& rIntName ) :
+ sInternalName( rIntName ),
+ nPos( 0 )
+ {}
+
+
+ const OUString& GetName() const { return sName; }
+ const OUString& GetInternalName() const { return sInternalName; }
+ const Reference < XIndexReplace > & GetNumRule() const { return xNumRule; }
+ sal_uInt32 GetPos() const { return nPos; }
+};
+
+XMLTextListAutoStylePoolEntry_Impl::XMLTextListAutoStylePoolEntry_Impl(
+ sal_uInt32 nP,
+ const OUString& rIntName,
+ const Reference < XIndexReplace > & rNumRule,
+ XMLTextListAutoStylePoolNames_Impl& rNames,
+ const OUString& rPrefix,
+ sal_uInt32& rName ) :
+ nPos( nP ),
+ sInternalName( rIntName ),
+ xNumRule( rNumRule )
+{
+ // create a name that hasn't been used before. The created name has not
+ // to be added to the array, because it will never tried again
+ OUStringBuffer sBuffer( 7 );
+ do
+ {
+ rName++;
+ sBuffer.append( rPrefix );
+ sBuffer.append( (sal_Int32)rName );
+ sName = sBuffer.makeStringAndClear();
+ }
+ while( rNames.Seek_Entry( &sName, 0 ) );
+}
+
+int XMLTextListAutoStylePoolEntryCmp_Impl(
+ const XMLTextListAutoStylePoolEntry_Impl& r1,
+ const XMLTextListAutoStylePoolEntry_Impl& r2 )
+{
+ return (int)r1.GetInternalName().compareTo( r2.GetInternalName() );
+}
+
+typedef XMLTextListAutoStylePoolEntry_Impl *XMLTextListAutoStylePoolEntryPtr;
+DECLARE_CONTAINER_SORT( XMLTextListAutoStylePool_Impl,
+ XMLTextListAutoStylePoolEntry_Impl )
+IMPL_CONTAINER_SORT( XMLTextListAutoStylePool_Impl,
+ XMLTextListAutoStylePoolEntry_Impl,
+ XMLTextListAutoStylePoolEntryCmp_Impl )
+
+XMLTextListAutoStylePool::XMLTextListAutoStylePool( SvXMLExport& rExp ) :
+ rExport( rExp ),
+ pPool( new XMLTextListAutoStylePool_Impl( 5, 5 ) ),
+ pNames( new XMLTextListAutoStylePoolNames_Impl( 5, 5 ) ),
+ nName( 0 ),
+ sPrefix( RTL_CONSTASCII_USTRINGPARAM("L") )
+{
+}
+
+XMLTextListAutoStylePool::~XMLTextListAutoStylePool()
+{
+ delete pPool;
+ delete pNames;
+}
+
+void XMLTextListAutoStylePool::RegisterName( const OUString& rName )
+{
+ OUString *pName = new OUString( rName );
+ if( !pNames->Insert( pName ) )
+ delete pName;
+}
+
+sal_Bool XMLTextListAutoStylePool::HasName( const OUString& rName ) const
+{
+ return pNames->Seek_Entry( &rName, 0 );
+}
+
+OUString XMLTextListAutoStylePool::Add(
+ const OUString& rInternalName,
+ const Reference < XIndexReplace > & rNumRule )
+{
+ OUString sName;
+ XMLTextListAutoStylePoolEntry_Impl aTmp( rInternalName );
+ sal_uInt32 nPos;
+ if( pPool->Seek_Entry( &aTmp, &nPos ) )
+ {
+ sName = pPool->GetObject( nPos )->GetName();
+ }
+ else
+ {
+ XMLTextListAutoStylePoolEntry_Impl *pEntry =
+ new XMLTextListAutoStylePoolEntry_Impl( pPool->Count(),
+ rInternalName,
+ rNumRule, *pNames, sPrefix,
+ nName );
+ pPool->Insert( pEntry );
+ sName = pEntry->GetName();
+ }
+
+ return sName;
+}
+
+::rtl::OUString XMLTextListAutoStylePool::Find(
+ const ::rtl::OUString& rInternalName ) const
+{
+ OUString sName;
+ XMLTextListAutoStylePoolEntry_Impl aTmp( rInternalName );
+ sal_uInt32 nPos;
+ if( pPool->Seek_Entry( &aTmp, &nPos ) )
+ sName = pPool->GetObject( nPos )->GetName();
+
+ return sName;
+}
+
+
+void XMLTextListAutoStylePool::exportXML() const
+{
+ sal_uInt32 nCount = pPool->Count();
+ if( !nCount )
+ return;
+
+ XMLTextListAutoStylePoolEntry_Impl **aExpEntries =
+ new XMLTextListAutoStylePoolEntryPtr[nCount];
+
+ sal_uInt32 i;
+ for( i=0; i < nCount; i++ )
+ {
+ aExpEntries[i] = 0;
+ }
+ for( i=0; i < nCount; i++ )
+ {
+ XMLTextListAutoStylePoolEntry_Impl *pEntry = pPool->GetObject(i);
+ DBG_ASSERT( pEntry->GetPos() < nCount, "Illegal pos" );
+ aExpEntries[pEntry->GetPos()] = pEntry;
+ }
+
+ SvxXMLNumRuleExport aNumRuleExp( rExport );
+
+ for( i=0; i < nCount; i++ )
+ {
+ XMLTextListAutoStylePoolEntry_Impl *pEntry = aExpEntries[i];
+ aNumRuleExp.exportNumberingRule( pEntry->GetName(),
+ pEntry->GetNumRule() );
+ }
+ delete aExpEntries;
+}
+
+
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
new file mode 100644
index 0000000000..5fbfdd518e
--- /dev/null
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -0,0 +1,295 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextListBlockContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_
+#include <com/sun/star/container/XIndexReplace.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_
+#include <com/sun/star/style/XStyle.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+#ifndef _XMLOFF_XMLNUMI_HXX
+#include "xmlnumi.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLTEXTLISTITEMCONTEXT_HXX
+#include "XMLTextListItemContext.hxx"
+#endif
+#ifndef _XMLTEXTLISTBLOCKCONTEXT_HXX
+#include "XMLTextListBlockContext.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::beans;
+
+TYPEINIT1( XMLTextListBlockContext, SvXMLImportContext );
+
+XMLTextListBlockContext::XMLTextListBlockContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImp,
+ sal_uInt16 nPrfx, const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ sal_Bool bOrd ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ rTxtImport( rTxtImp ),
+ xParentListBlock( rTxtImp.GetListBlock() ),
+ nLevel( 0 ),
+ nLevels( 0 ),
+ bOrdered( bOrd ),
+ bRestartNumbering( sal_True ),
+ sNumberingRules( RTL_CONSTASCII_USTRINGPARAM( "NumberingRules" ) )
+{
+ // Inherit style name from parent list, as well as the flags whether
+ // numbering must be restarted and formats have to be created.
+ OUString sParentStyleName;
+ if( xParentListBlock.Is() )
+ {
+ XMLTextListBlockContext *pParent =
+ (XMLTextListBlockContext *)&xParentListBlock;
+ sStyleName = pParent->GetStyleName();
+ sRealName = pParent->GetRealName();
+ sParentStyleName = sStyleName;
+ nLevels = pParent->nLevels;
+ nLevel = pParent->GetLevel() + 1;
+ bRestartNumbering = pParent->IsRestartNumbering();
+ xGenNumRule = pParent->xGenNumRule;
+ }
+
+ const SvXMLTokenMap& rTokenMap =
+ rTxtImport.GetTextListBlockAttrTokenMap();
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ switch( rTokenMap.Get( nPrefix, aLocalName ) )
+ {
+ case XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING:
+ bRestartNumbering = rValue.compareToAscii( sXML_true ) != 0;
+ break;
+ case XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME:
+ sStyleName = rValue;
+ break;
+ }
+ }
+
+ if( sStyleName.getLength() && sStyleName != sParentStyleName )
+ {
+ const Reference < XNameContainer >& rNumStyles =
+ rTxtImport.GetNumberingStyles();
+ if( rNumStyles.is() && rNumStyles->hasByName( sStyleName ) )
+ {
+ Reference < XStyle > xStyle;
+ Any aAny = rNumStyles->getByName( sStyleName );
+ aAny >>= xStyle;
+
+ // If the style has not been used, the restart numbering has
+ // to be set never.
+ if( bRestartNumbering && !xStyle->isInUse() )
+ bRestartNumbering = sal_False;
+
+ Reference<XIndexReplace> xNumRule;
+ Reference< XPropertySet > xPropSet( xStyle, UNO_QUERY );
+ aAny = xPropSet->getPropertyValue( sNumberingRules );
+ aAny >>= xNumRule;
+ nLevels = xNumRule->getCount();
+ sRealName = sStyleName;
+ }
+ else
+ {
+ const SvxXMLListStyleContext *pListStyle =
+ rTxtImport.FindAutoListStyle( sStyleName );
+ if( pListStyle )
+ {
+ sal_Bool bUsed = pListStyle->IsUsed();
+ if( !bUsed )
+ pListStyle->CreateAndInsertAuto();
+ if( bRestartNumbering && !bUsed )
+ bRestartNumbering = sal_False;
+ sRealName = pListStyle->GetRealName();
+ nLevels = pListStyle->GetLevels();
+ }
+ }
+
+ }
+
+ if( !sRealName.getLength() )
+ {
+ // If no style name has been specified for this style and for any
+ // parent or if no num rule this the specified name is existing,
+ // create a new one.
+
+ xGenNumRule =
+ SvxXMLListStyleContext::CreateNumRule( sRealName,
+ GetImport().GetModel() );
+ DBG_ASSERT( xGenNumRule.is(), "go no numbering rule" );
+ DBG_ASSERT( sRealName.getLength(), "go no numbering rule name" );
+ if( !xGenNumRule.is() && !sRealName.getLength() )
+ return;
+
+ nLevels = xGenNumRule->getCount();
+
+ // Because its a new num rule, numbering mist be restarted never.
+ bRestartNumbering = sal_False;
+ }
+
+ if( nLevel >= nLevels )
+ nLevel = nLevels-1;
+
+ if( xGenNumRule.is() )
+ {
+ // Because there is no list style sheet for this style, a default
+ // format must be set for any level of this num rule.
+ SvxXMLListStyleContext::SetDefaultStyle( xGenNumRule, nLevel,
+ bOrdered );
+ }
+
+ // Remember this list block.
+ rTxtImport.SetListBlock( this );
+
+ // There is no list item by now.
+ rTxtImport.SetListItem( 0 );
+}
+
+XMLTextListBlockContext::~XMLTextListBlockContext()
+{
+}
+
+void XMLTextListBlockContext::EndElement()
+{
+ // Numbering has not to be restarted if it has been restarted within
+ // a child list.
+ XMLTextListBlockContext *pParent =
+ (XMLTextListBlockContext *)&xParentListBlock;
+ if( pParent )
+ {
+ pParent->bRestartNumbering = bRestartNumbering;
+ }
+
+ // Restore current list block.
+ rTxtImport.SetListBlock( pParent );
+
+ // Any paragraph following the list within the same list item mist not
+ // be numbered.
+ rTxtImport.SetListItem( 0 );
+}
+
+SvXMLImportContext *XMLTextListBlockContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ const SvXMLTokenMap& rTokenMap =
+ rTxtImport.GetTextListBlockElemTokenMap();
+ sal_Bool bHeader = sal_False;
+ switch( rTokenMap.Get( nPrefix, rLocalName ) )
+ {
+ case XML_TOK_TEXT_LIST_HEADER:
+ bHeader = sal_True;
+ case XML_TOK_TEXT_LIST_ITEM:
+ pContext = new XMLTextListItemContext( GetImport(), rTxtImport,
+ nPrefix, rLocalName,
+ xAttrList, bHeader );
+ break;
+ }
+
+ if( !pContext )
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+
+ return pContext;
+}
+
+
+
diff --git a/xmloff/source/text/XMLTextListBlockContext.hxx b/xmloff/source/text/XMLTextListBlockContext.hxx
new file mode 100644
index 0000000000..7be99f356c
--- /dev/null
+++ b/xmloff/source/text/XMLTextListBlockContext.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextListBlockContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLTEXTLISTBLOCKCONTEXT_HXX
+#define _XMLTEXTLISTBLOCKCONTEXT_HXX
+
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_
+#include <com/sun/star/container/XIndexReplace.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+class XMLTextImportHelper;
+
+class XMLTextListBlockContext : public SvXMLImportContext
+{
+ XMLTextImportHelper& rTxtImport;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexReplace > xGenNumRule;
+
+ const ::rtl::OUString sNumberingRules;
+ ::rtl::OUString sStyleName;
+ ::rtl::OUString sRealName;
+ SvXMLImportContextRef xParentListBlock;
+ sal_Int16 nLevel;
+ sal_Int16 nLevels;
+ sal_Bool bOrdered : 1;
+ sal_Bool bRestartNumbering : 1;
+
+
+public:
+
+ TYPEINFO();
+
+ XMLTextListBlockContext( SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImp, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ sal_Bool bOrdered );
+ virtual ~XMLTextListBlockContext();
+
+ virtual void EndElement();
+
+ SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ const ::rtl::OUString& GetStyleName() const { return sStyleName; }
+ const ::rtl::OUString& GetRealName() const { return sRealName; }
+ sal_Int16 GetLevel() const { return nLevel; }
+ sal_Bool IsRestartNumbering() const { return bRestartNumbering; }
+ void ResetRestartNumbering() { bRestartNumbering = sal_False; }
+
+ sal_Bool HasGeneratedStyle() const { return xGenNumRule.is(); }
+};
+
+
+#endif
diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx
new file mode 100644
index 0000000000..ac89e6789b
--- /dev/null
+++ b/xmloff/source/text/XMLTextListItemContext.cxx
@@ -0,0 +1,181 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextListItemContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_TXTPARAI_HXX
+#include "txtparai.hxx"
+#endif
+#ifndef _XMLTEXTLISTBLOCKCONTEXT_HXX
+#include "XMLTextListBlockContext.hxx"
+#endif
+#ifndef _XMLOFF_TXTIMP_HXX
+#include "txtimp.hxx"
+#endif
+
+
+#ifndef _XMLTEXTLISTITEMCONTEXT_HXX
+#include "XMLTextListItemContext.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+TYPEINIT1( XMLTextListItemContext, SvXMLImportContext );
+
+XMLTextListItemContext::XMLTextListItemContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImp, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ sal_Bool bIsHeader ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ rTxtImport( rTxtImp ),
+ nStartValue( -1 )
+{
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ if( !bIsHeader && XML_NAMESPACE_TEXT == nPrefix &&
+ aLocalName.compareToAscii( sXML_start_value ) == 0 )
+ {
+ sal_Int32 nTmp = rValue.toInt32();
+ if( nTmp >= 0 && nTmp <= SHRT_MAX )
+ nStartValue = (sal_Int16)nTmp;
+ }
+ }
+
+ DBG_ASSERT( !rTxtImport.GetListItem(),
+ "SwXMLListItemContext::SwXMLListItemContext: list item is existing" );
+
+ // If this is a <text:list-item> element, then remember it as a sign
+ // that a bullet has to be generated.
+ if( !bIsHeader )
+ rTxtImport.SetListItem( this );
+}
+
+XMLTextListItemContext::~XMLTextListItemContext()
+{
+}
+
+void XMLTextListItemContext::EndElement()
+{
+ // finish current list item
+ rTxtImport.SetListItem( 0 );
+}
+
+SvXMLImportContext *XMLTextListItemContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ const SvXMLTokenMap& rTokenMap = rTxtImport.GetTextElemTokenMap();
+ sal_Bool bOrdered = sal_False;
+ sal_Bool bHeading = sal_False;
+ switch( rTokenMap.Get( nPrefix, rLocalName ) )
+ {
+ case XML_TOK_TEXT_H:
+ bHeading = sal_True;
+ case XML_TOK_TEXT_P:
+ pContext = new XMLParaContext( GetImport(), rTxtImport,
+ nPrefix, rLocalName,
+ xAttrList, bHeading );
+ break;
+ case XML_TOK_TEXT_ORDERED_LIST:
+ bOrdered = sal_True;
+ case XML_TOK_TEXT_UNORDERED_LIST:
+ pContext = new XMLTextListBlockContext( GetImport(), rTxtImport,
+ nPrefix, rLocalName,
+ xAttrList, bOrdered );
+ break;
+ }
+
+ if( !pContext )
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+
+ return pContext;
+}
+
+
diff --git a/xmloff/source/text/XMLTextListItemContext.hxx b/xmloff/source/text/XMLTextListItemContext.hxx
new file mode 100644
index 0000000000..40f56c20b7
--- /dev/null
+++ b/xmloff/source/text/XMLTextListItemContext.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextListItemContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLTEXTLISTITEMCONTEXT_HXX
+#define _XMLTEXTLISTITEMCONTEXT_HXX
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+class XMLTextImportHelper;
+
+class XMLTextListItemContext : public SvXMLImportContext
+{
+ XMLTextImportHelper& rTxtImport;
+
+ sal_Int16 nStartValue;
+
+// SwXMLImport& GetSwImport() { return (SwXMLImport&)GetImport(); }
+
+public:
+
+ TYPEINFO();
+
+ XMLTextListItemContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImp, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ sal_Bool bIsHeader = sal_False );
+ virtual ~XMLTextListItemContext();
+
+ virtual void EndElement();
+
+ SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ sal_Bool HasStartValue() const { return -1 != nStartValue; }
+ sal_Int16 GetStartValue() const { return nStartValue; }
+};
+
+
+#endif
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
new file mode 100644
index 0000000000..a7ac3c4816
--- /dev/null
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -0,0 +1,300 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextMarkImportContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 "XMLTextMarkImportContext.hxx"
+
+
+#ifndef _RTL_USTRING
+#include <rtl/ustring>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTCONTENT_HPP_
+#include <com/sun/star/text/XTextContent.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
+#include <com/sun/star/container/XNamed.hpp>
+#endif
+
+
+using namespace ::rtl;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::xml::sax;
+
+TYPEINIT1( XMLTextMarkImportContext, SvXMLImportContext);
+
+XMLTextMarkImportContext::XMLTextMarkImportContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName ) :
+ SvXMLImportContext(rImport, nPrefix, rLocalName),
+ rHelper(rHlp)
+{
+}
+
+enum lcl_MarkType { TypeReference, TypeReferenceStart, TypeReferenceEnd,
+ TypeBookmark, TypeBookmarkStart, TypeBookmarkEnd };
+
+static SvXMLEnumMapEntry __READONLY_DATA lcl_aMarkTypeMap[] =
+{
+ { sXML_reference, TypeReference },
+ { sXML_reference_start, TypeReferenceStart },
+ { sXML_reference_end, TypeReferenceEnd },
+ { sXML_bookmark, TypeBookmark },
+ { sXML_bookmark_start, TypeBookmarkStart },
+ { sXML_bookmark_end, TypeBookmarkEnd },
+ { 0, 0 },
+};
+
+void XMLTextMarkImportContext::StartElement(
+ const Reference<XAttributeList> & xAttrList)
+{
+ const OUString sAPI_reference_mark(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.ReferenceMark"));
+ const OUString sAPI_bookmark(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmark"));
+
+
+ OUString sName;
+
+ if (FindName(GetImport(), xAttrList, sName))
+ {
+ sal_uInt16 nTmp;
+ if (SvXMLUnitConverter::convertEnum(nTmp, GetLocalName(),
+ lcl_aMarkTypeMap))
+ {
+ switch ((lcl_MarkType)nTmp)
+ {
+ case TypeReference:
+ // export point reference mark
+ CreateAndInsertMark(GetImport(),
+ sAPI_reference_mark,
+ sName,
+ rHelper.GetCursorAsRange()->getStart());
+ break;
+
+ case TypeBookmark:
+ // export point bookmark
+ CreateAndInsertMark(GetImport(),
+ sAPI_bookmark,
+ sName,
+ rHelper.GetCursorAsRange()->getStart());
+ break;
+
+ case TypeBookmarkStart:
+ // save XTextRange for later construction of bookmark
+ rHelper.InsertBookmarkStartRange(
+ sName, rHelper.GetCursorAsRange()->getStart());
+ break;
+
+ case TypeBookmarkEnd:
+ {
+ // get old range, and construct
+ Reference<XTextRange> xStartRange;
+ if (rHelper.FindAndRemoveBookmarkStartRange(xStartRange,
+ sName))
+ {
+ Reference<XTextRange> xEndRange(
+ rHelper.GetCursorAsRange()->getEnd());
+
+ // check if beginning and end are in same XText
+ if (xStartRange->getText() == xEndRange->getText())
+ {
+ // create range for insertion
+ Reference<XTextCursor> xInsertionCursor =
+ rHelper.GetText()->createTextCursorByRange(
+ xEndRange);
+ xInsertionCursor->gotoRange(xStartRange, sal_True);
+
+ //DBG_ASSERT(! xInsertionCursor->isCollapsed(),
+ // "we want no point mark");
+ // can't assert, because someone could
+ // create a file with subsequence
+ // start/end elements
+
+ Reference<XTextRange> xInsertionRange(
+ xInsertionCursor, UNO_QUERY);
+
+ // insert reference
+ CreateAndInsertMark(GetImport(),
+ sAPI_bookmark,
+ sName,
+ xInsertionRange);
+ }
+ // else: beginning/end in different XText -> ignore!
+ }
+ // else: no start found -> ignore!
+ break;
+ }
+
+ case TypeReferenceStart:
+ case TypeReferenceEnd:
+ DBG_ERROR("reference start/end are handled in txtparai !");
+ break;
+
+ default:
+ DBG_ERROR("unknown mark type");
+ break;
+ }
+ }
+ }
+}
+
+
+void XMLTextMarkImportContext::CreateAndInsertMark(
+ SvXMLImport& rImport,
+ const OUString& sServiceName,
+ const OUString& sMarkName,
+ const Reference<XTextRange> & rRange)
+{
+ // create mark
+ Reference<XMultiServiceFactory> xFactory(rImport.GetModel(),UNO_QUERY);
+ if( xFactory.is() )
+ {
+ Reference<XInterface> xIfc = xFactory->createInstance(sServiceName);
+
+ // set name
+ Reference<XNamed> xNamed(xIfc, UNO_QUERY);
+ if (xNamed.is())
+ {
+ xNamed->setName(sMarkName);
+
+ // cast to XTextContent and attach to document
+ Reference<XTextContent> xTextContent(xIfc, UNO_QUERY);
+ if (xTextContent.is())
+ {
+ // if inserting marks, bAbsorb==sal_False will cause
+ // collapsing of the given XTextRange.
+ rImport.GetTextImport()->GetText()->insertTextContent(rRange,
+ xTextContent, sal_True);
+ }
+ }
+ }
+}
+
+sal_Bool XMLTextMarkImportContext::FindName(
+ SvXMLImport& rImport,
+ const Reference<XAttributeList> & xAttrList,
+ OUString& sName)
+{
+ sal_Bool bNameOK;
+
+ // find name attribute first
+ sal_Int32 nLength = xAttrList->getLength();
+ for(sal_Int32 nAttr = 0; nAttr < nLength; nAttr++)
+ {
+ OUString sLocalName;
+ sal_uInt16 nPrefix = rImport.GetNamespaceMap().
+ GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
+ &sLocalName );
+
+ if ( (XML_NAMESPACE_TEXT == nPrefix) &&
+ (0 == sLocalName.compareToAscii(sXML_name)) )
+ {
+ sName = xAttrList->getValueByIndex(nAttr);
+ bNameOK = sal_True;
+ }
+ }
+
+ return bNameOK;
+}
diff --git a/xmloff/source/text/XMLTextMarkImportContext.hxx b/xmloff/source/text/XMLTextMarkImportContext.hxx
new file mode 100644
index 0000000000..ccf72dd573
--- /dev/null
+++ b/xmloff/source/text/XMLTextMarkImportContext.hxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextMarkImportContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLTEXTMARKIMPORTCONTEXT_HXX
+#define _XMLOFF_XMLTEXTMARKIMPORTCONTEXT_HXX
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include <xmloff/xmlictxt.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+
+
+namespace com { namespace sun { namespace star {
+ namespace text {
+ class XTextRange;
+ }
+ namespace xml { namespace sax {
+ class XAttributeList;
+ } }
+} } }
+namespace rtl {
+ class OUString;
+}
+class XMLTextImportHelper;
+
+
+/**
+ * import bookmarks and reference marks
+ * ( <bookmark>, <bookmark-start>, <bookmark-end>,
+ * <reference>, <reference-start>, <reference-end> )
+ *
+ * All elements are handled by the same class due to their similarities.
+ */
+class XMLTextMarkImportContext : public SvXMLImportContext
+{
+
+ XMLTextImportHelper& rHelper;
+
+public:
+
+ TYPEINFO();
+
+ XMLTextMarkImportContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLocalName );
+
+protected:
+
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+public:
+ static void CreateAndInsertMark(
+ SvXMLImport& rImport,
+ const ::rtl::OUString& sServiceName,
+ const ::rtl::OUString& sMarkName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange> & rRange);
+
+ static sal_Bool FindName(
+ SvXMLImport& rImport,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList,
+ ::rtl::OUString& sName);
+};
+
+#endif
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx
new file mode 100644
index 0000000000..9990ecf96e
--- /dev/null
+++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx
@@ -0,0 +1,185 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextNumRuleInfo.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#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_CONTAINER_XINDEXREPLACE_HPP_
+#include <com/sun/star/container/XIndexReplace.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_NUMBERINGTYPE_HPP_
+#include <com/sun/star/style/NumberingType.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLTEXTNUMRULEINFO_HXX
+#include "XMLTextNumRuleInfo.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::container;
+using namespace ::com::sun::star::style;
+
+XMLTextNumRuleInfo::XMLTextNumRuleInfo() :
+ sNumberingRules(RTL_CONSTASCII_USTRINGPARAM("NumberingRules")),
+ sNumberingLevel(RTL_CONSTASCII_USTRINGPARAM("NumberingLevel")),
+ sNumberingStartValue(RTL_CONSTASCII_USTRINGPARAM("NumberingStartValue")),
+ sNumberingStyleName(RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName")),
+ sNumberingType(RTL_CONSTASCII_USTRINGPARAM("NumberingType")),
+ sIsNumbering(RTL_CONSTASCII_USTRINGPARAM("IsNumbering")),
+ sNumberingIsNumber(RTL_CONSTASCII_USTRINGPARAM("NumberingIsNumber"))
+{
+ Reset();
+}
+
+void XMLTextNumRuleInfo::Set(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & xTextContent )
+{
+ Reset();
+
+ Reference< XPropertySet > xPropSet( xTextContent, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
+
+ Reference < XIndexReplace > xNumRule;
+ Any aAny;
+
+ // check if numbering is enabled in edit engine
+ if( xPropSetInfo->hasPropertyByName( sIsNumbering ) )
+ {
+ aAny = xPropSet->getPropertyValue( sIsNumbering );
+ if( !(*(sal_Bool *)aAny.getValue()) )
+ return;
+ }
+
+ if( xPropSetInfo->hasPropertyByName( sNumberingRules ) )
+ {
+ aAny = xPropSet->getPropertyValue( sNumberingRules );
+ aAny >>= xNumRule;
+ }
+
+ if( xNumRule.is() )
+ {
+ if( xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
+ {
+ aAny = xPropSet->getPropertyValue( sNumberingStyleName );
+ aAny >>= sName;
+ }
+ DBG_ASSERT( sName.getLength(), "num rule name is missing!" );
+
+ aAny = xPropSet->getPropertyValue( sNumberingLevel );
+ aAny >>= nLevel;
+
+ bIsNumbered = sal_True;
+ if( xPropSetInfo->hasPropertyByName( sNumberingIsNumber ) )
+ {
+ aAny = xPropSet->getPropertyValue( sNumberingIsNumber );
+ bIsNumbered = *(sal_Bool *)aAny.getValue();
+ }
+
+ if( bIsNumbered )
+ {
+ bIsRestart = sal_False; // TODO: UNO prop missingrNum.IsStart();
+ if( xPropSetInfo->hasPropertyByName( sNumberingStartValue ) )
+ {
+ aAny = xPropSet->getPropertyValue( sNumberingStartValue );
+ aAny >>= nStartValue;
+ }
+ }
+
+ DBG_ASSERT( nLevel < xNumRule->getCount(), "wrong num rule level" );
+
+ aAny = xNumRule->getByIndex( nLevel );
+ Sequence<PropertyValue> aProps;
+ aAny >>= aProps;
+ const PropertyValue* pPropArray = aProps.getConstArray();
+ sal_Int32 nCount = aProps.getLength();
+ for( sal_Int32 i=0; i<nCount; i++ )
+ {
+ const beans::PropertyValue& rProp = pPropArray[i];
+
+ if( rProp.Name == sNumberingType )
+ {
+ sal_Int16 nType;
+ rProp.Value >>= nType;
+ if( NumberingType::CHAR_SPECIAL != nType &&
+ NumberingType::BITMAP != nType )
+ {
+ bIsOrdered = sal_True;
+ }
+ break;
+ }
+ }
+ nLevel++;
+ }
+}
+
+
+
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.hxx b/xmloff/source/text/XMLTextNumRuleInfo.hxx
new file mode 100644
index 0000000000..1e335431cf
--- /dev/null
+++ b/xmloff/source/text/XMLTextNumRuleInfo.hxx
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextNumRuleInfo.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLTEXTNUMRULEINFO_HXX
+#define _XMLOFF_XMLTEXTNUMRULEINFO_HXX
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
+#include <com/sun/star/uno/Reference.hxx>
+#endif
+
+namespace com { namespace sun { namespace star { namespace text {
+ class XTextContent; } } } }
+
+#ifndef _SAL_TYPES_H_
+#include <sal/types.h>
+#endif
+
+class XMLTextNumRuleInfo
+{
+ const ::rtl::OUString sNumberingRules;
+ const ::rtl::OUString sNumberingLevel;
+ const ::rtl::OUString sNumberingStartValue;
+ const ::rtl::OUString sNumberingStyleName;
+ const ::rtl::OUString sNumberingType;
+ const ::rtl::OUString sIsNumbering;
+ const ::rtl::OUString sNumberingIsNumber;
+
+ ::rtl::OUString sName;
+ sal_Int16 nStartValue;
+ sal_Int16 nLevel;
+
+ sal_Bool bIsNumbered : 1;
+ sal_Bool bIsOrdered : 1;
+ sal_Bool bIsRestart : 1;
+
+public:
+
+ XMLTextNumRuleInfo();
+
+ inline XMLTextNumRuleInfo& operator=( const XMLTextNumRuleInfo& rInfo );
+
+ void Set(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContnt );
+ inline void Reset();
+
+ const ::rtl::OUString& GetName() const { return sName; }
+ sal_Int16 GetLevel() const { return nLevel; }
+
+ sal_Bool HasStartValue() const { return nStartValue != -1; }
+ sal_uInt32 GetStartValue() const { return nStartValue; }
+
+ sal_Bool IsNumbered() const { return bIsNumbered; }
+ sal_Bool IsOrdered() const { return bIsOrdered; }
+ sal_Bool IsRestart() const { return bIsRestart; }
+};
+
+inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=(
+ const XMLTextNumRuleInfo& rInfo )
+{
+ sName = rInfo.sName;
+ nStartValue = rInfo.nStartValue;
+ nLevel = rInfo.nLevel;
+ bIsNumbered = rInfo.bIsNumbered;
+ bIsOrdered = rInfo.bIsOrdered;
+ bIsRestart = rInfo.bIsRestart;
+
+ return *this;
+}
+
+inline void XMLTextNumRuleInfo::Reset()
+{
+ sName = ::rtl::OUString();
+ nStartValue = -1;
+ nLevel = 0;
+ bIsNumbered = bIsOrdered = bIsRestart = sal_False;
+}
+
+
+#endif // _XMLOFF_XMLTEXTNUMRULEINFO_HXX
diff --git a/xmloff/source/text/XMLTextPropertySetContext.cxx b/xmloff/source/text/XMLTextPropertySetContext.cxx
new file mode 100644
index 0000000000..002b163427
--- /dev/null
+++ b/xmloff/source/text/XMLTextPropertySetContext.cxx
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextPropertySetContext.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_XMLTEXTPROPERTYSETCONTEXT_HXX
+#include "XMLTextPropertySetContext.hxx"
+#endif
+
+#ifndef _XMLOFF_TXTPRMAP_HXX
+#include "txtprmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLTABI_HXX
+#include "xmltabi.hxx"
+#endif
+#ifndef _XMLOFF_TXTDROPI_HXX
+#include "txtdropi.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star;
+
+XMLTextPropertySetContext::XMLTextPropertySetContext(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ ::std::vector< XMLPropertyState > &rProps,
+ const UniReference < SvXMLImportPropertyMapper > &rMap,
+ OUString& rDCTextStyleName ) :
+ SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, rProps, rMap ),
+ rDropCapTextStyleName( rDCTextStyleName )
+{
+}
+
+XMLTextPropertySetContext::~XMLTextPropertySetContext()
+{
+}
+
+SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ ::std::vector< XMLPropertyState > &rProperties,
+ const XMLPropertyState& rProp )
+{
+ SvXMLImportContext *pContext = 0;
+
+ switch( xMapper->getPropertySetMapper()
+ ->GetEntryContextId( rProp.mnIndex ) )
+ {
+ case CTF_TABSTOP:
+ pContext = new SvxXMLTabStopImportContext( GetImport(), nPrefix,
+ rLocalName, rProp,
+ rProperties );
+ break;
+ case CTF_DROPCAPFORMAT:
+ DBG_ASSERT( rProp.mnIndex >= 2 &&
+ CTF_DROPCAPWHOLEWORD == xMapper->getPropertySetMapper()
+ ->GetEntryContextId( rProp.mnIndex-2 ),
+ "invalid property map!");
+ XMLTextDropCapImportContext *pDCContext =
+ new XMLTextDropCapImportContext( GetImport(), nPrefix,
+ rLocalName, xAttrList,
+ rProp,
+ rProp.mnIndex-2,
+ rProperties );
+ rDropCapTextStyleName = pDCContext->GetStyleName();
+ pContext = pDCContext;
+ break;
+ }
+
+ if( !pContext )
+ pContext = SvXMLPropertySetContext::CreateChildContext( nPrefix, rLocalName,
+ xAttrList,
+ rProperties, rProp );
+
+ return pContext;
+}
+
+
diff --git a/xmloff/source/text/XMLTextPropertySetContext.hxx b/xmloff/source/text/XMLTextPropertySetContext.hxx
new file mode 100644
index 0000000000..2ec74a89c1
--- /dev/null
+++ b/xmloff/source/text/XMLTextPropertySetContext.hxx
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * $RCSfile: XMLTextPropertySetContext.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_XMLTEXTPROPERTYSETCONTEXT_HXX
+#define _XMLOFF_XMLTEXTPROPERTYSETCONTEXT_HXX
+
+#ifndef _XMLOFF_XMLPROPERTYSETCONTEXT_HXX
+#include "xmlprcon.hxx"
+#endif
+
+
+class XMLTextPropertySetContext : public SvXMLPropertySetContext
+{
+// SvXMLImportContextRef xTabStop;
+// SvXMLImportContextRef xBackground;
+// SvXMLImportContextRef xDropCap;
+ ::rtl::OUString& rDropCapTextStyleName;
+
+public:
+ XMLTextPropertySetContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::std::vector< XMLPropertyState > &rProps,
+ const UniReference < SvXMLImportPropertyMapper > &rMap,
+ ::rtl::OUString& rDopCapTextStyleName );
+
+ virtual ~XMLTextPropertySetContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::std::vector< XMLPropertyState > &rProperties,
+ const XMLPropertyState& rProp);
+};
+
+
+#endif // _XMLOFF_XMLTEXTPROPERTYSETCONTEXT_HXX
diff --git a/xmloff/source/text/makefile.mk b/xmloff/source/text/makefile.mk
new file mode 100644
index 0000000000..cf8adef951
--- /dev/null
+++ b/xmloff/source/text/makefile.mk
@@ -0,0 +1,141 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:07: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=xmloff
+TARGET=text
+AUTOSEG=true
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+CXXFILES = \
+ txtdrope.cxx \
+ txtdropi.cxx \
+ txtexppr.cxx \
+ txtflde.cxx \
+ txtfldi.cxx \
+ txtimp.cxx \
+ txtimppr.cxx \
+ txtparae.cxx \
+ txtparai.cxx \
+ txtprhdl.cxx \
+ txtprmap.cxx \
+ txtstyle.cxx \
+ txtstyli.cxx \
+ txtvfldi.cxx \
+ txtflde.cxx \
+ txtftne.cxx \
+ XMLTextNumRuleInfo.cxx \
+ XMLTextColumnsExport.cxx \
+ XMLTextFrameContext.cxx \
+ XMLTextListAutoStylePool.cxx \
+ XMLTextListBlockContext.cxx \
+ XMLTextPropertySetContext.cxx \
+ XMLFootnoteImportContext.cxx \
+ XMLFootnoteConfigurationImportContext.cxx \
+ XMLTextMarkImportContext.cxx \
+ XMLTextColumnsExport.cxx \
+ XMLTextListItemContext.cxx \
+ XMLTextPropertySetContext.cxx
+
+SLOFILES = \
+ $(SLO)$/txtdrope.obj \
+ $(SLO)$/txtdropi.obj \
+ $(SLO)$/txtexppr.obj \
+ $(SLO)$/txtfldi.obj \
+ $(SLO)$/txtflde.obj \
+ $(SLO)$/txtimp.obj \
+ $(SLO)$/txtimppr.obj \
+ $(SLO)$/txtparae.obj \
+ $(SLO)$/txtparai.obj \
+ $(SLO)$/txtprhdl.obj \
+ $(SLO)$/txtprmap.obj \
+ $(SLO)$/txtstyle.obj \
+ $(SLO)$/txtstyli.obj \
+ $(SLO)$/txtvfldi.obj \
+ $(SLO)$/txtflde.obj \
+ $(SLO)$/txtftne.obj \
+ $(SLO)$/XMLTextColumnsExport.obj \
+ $(SLO)$/XMLTextFrameContext.obj \
+ $(SLO)$/XMLTextListAutoStylePool.obj \
+ $(SLO)$/XMLTextListBlockContext.obj \
+ $(SLO)$/XMLFootnoteImportContext.obj \
+ $(SLO)$/XMLFootnoteConfigurationImportContext.obj \
+ $(SLO)$/XMLTextMarkImportContext.obj \
+ $(SLO)$/XMLTextPropertySetContext.obj \
+ $(SLO)$/XMLTextColumnsExport.obj \
+ $(SLO)$/XMLTextListItemContext.obj \
+ $(SLO)$/XMLTextNumRuleInfo.obj \
+ $(SLO)$/XMLTextPropertySetContext.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/xmloff/source/text/txtdrope.cxx b/xmloff/source/text/txtdrope.cxx
new file mode 100644
index 0000000000..6b584cc065
--- /dev/null
+++ b/xmloff/source/text/txtdrope.cxx
@@ -0,0 +1,201 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtdrope.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_DROPCAPFORMAT_HPP_
+#include <com/sun/star/style/DropCapFormat.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_TXTDROPE_HXX
+#include "txtdrope.hxx"
+#endif
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::uno;
+using namespace ::rtl;
+
+OUString XMLTextDropCapExport::GetQNameByKey( sal_uInt16 nKey,
+ const OUString& rLocalName ) const
+{
+ if( pNamespaceMap )
+ return pNamespaceMap->GetQNameByKey( nKey, rLocalName );
+ else
+ return rLocalName;
+}
+
+void XMLTextDropCapExport::ClearAttrList()
+{
+ pAttrList->Clear();
+}
+
+#ifndef PRODUCT
+void XMLTextDropCapExport::CheckAttrList()
+{
+ DBG_ASSERT( !pAttrList->getLength(),
+ "XMLTextDropCapExport::CheckAttrList: list is not empty" );
+}
+#endif
+
+void XMLTextDropCapExport::AddAttribute( sal_uInt16 nPrefixKey,
+ const sal_Char *pName,
+ const OUString& rValue )
+{
+ OUString sName( OUString::createFromAscii( pName ) );
+
+ pAttrList->AddAttribute( GetQNameByKey( nPrefixKey, sName ),
+ sCDATA, rValue );
+}
+
+XMLTextDropCapExport::XMLTextDropCapExport(
+ const Reference< xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLUnitConverter& rUnitConverter ) :
+ sCDATA( OUString::createFromAscii( sXML_CDATA ) ),
+ pNamespaceMap( 0 ),
+ rUnitConv( rUnitConverter ),
+ pAttrList( new SvXMLAttributeList )
+{
+ xHandler = rHandler;
+ xAttrList = pAttrList;
+}
+
+XMLTextDropCapExport::~XMLTextDropCapExport()
+{
+}
+
+void XMLTextDropCapExport::exportXML( const Any& rAny,
+ sal_Bool bWholeWord,
+ const OUString& rStyleName,
+ const SvXMLNamespaceMap& rNamespaceMap )
+{
+ pNamespaceMap = &rNamespaceMap;
+
+ CheckAttrList();
+
+ DropCapFormat aFormat;
+ rAny >>= aFormat;
+ OUString sValue;
+ OUStringBuffer sBuffer;
+ if( aFormat.Lines > 1 )
+ {
+ // style:lines
+ rUnitConv.convertNumber( sBuffer, (sal_Int32)aFormat.Lines );
+ AddAttribute( XML_NAMESPACE_STYLE, sXML_lines,
+ sBuffer.makeStringAndClear() );
+
+ // style:length
+ if( bWholeWord )
+ {
+ sValue = OUString::createFromAscii(sXML_word);
+ }
+ else if( aFormat.Count > 1 )
+ {
+ rUnitConv.convertNumber( sBuffer, (sal_Int32)aFormat.Count );
+ sValue = sBuffer.makeStringAndClear();
+ }
+ if( sValue.getLength() )
+ AddAttribute( XML_NAMESPACE_STYLE, sXML_length, sValue );
+
+ // style:distance
+ if( aFormat.Distance > 0 )
+ {
+ rUnitConv.convertMeasure( sBuffer, aFormat.Distance );
+ AddAttribute( XML_NAMESPACE_STYLE, sXML_distance,
+ sBuffer.makeStringAndClear() );
+ }
+
+ // style:style-name
+ if( rStyleName.getLength() )
+ AddAttribute( XML_NAMESPACE_STYLE, sXML_style_name,
+ rStyleName );
+ }
+
+ OUString sElem = GetQNameByKey( XML_NAMESPACE_STYLE,
+ OUString::createFromAscii(sXML_drop_cap) );
+ xHandler->startElement( sElem, xAttrList );
+ ClearAttrList();
+ xHandler->endElement( sElem );
+
+ pNamespaceMap = 0;
+}
+
+
+
diff --git a/xmloff/source/text/txtdrope.hxx b/xmloff/source/text/txtdrope.hxx
new file mode 100644
index 0000000000..cef42f95f5
--- /dev/null
+++ b/xmloff/source/text/txtdrope.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtdrope.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_TXTDROPE_HXX
+#define _XMLOFF_TXTDROPE_HXX
+
+
+#ifndef _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
+
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include "attrlist.hxx"
+#endif
+
+class SvXMLNamespaceMap;
+class SvXMLUnitConverter;
+namespace com { namespace sun { namespace star { namespace uno {
+ class Any; } } } }
+namespace rtl { class OUString; }
+
+class XMLTextDropCapExport
+{
+ const ::rtl::OUString sCDATA;
+
+ // the handlers
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XDocumentHandler > xHandler;
+
+ // a common attribute list
+ SvXMLAttributeList *pAttrList;
+
+ // and an interface of it
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > xAttrList;
+
+ // the namepspace map
+ const SvXMLNamespaceMap *pNamespaceMap;
+ const SvXMLUnitConverter& rUnitConv;
+
+protected:
+
+ // Check if common attribute list is empty.
+#ifdef PRODUCT
+ void CheckAttrList() {}
+#else
+ void CheckAttrList();
+#endif
+ void ClearAttrList();
+ void AddAttribute( sal_uInt16 nPrefixKey, const sal_Char *pName,
+ const ::rtl::OUString& rValue );
+ ::rtl::OUString GetQNameByKey( sal_uInt16 nKey,
+ const ::rtl::OUString& rLocalName ) const;
+public:
+
+ XMLTextDropCapExport(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLUnitConverter& rUnitConverter );
+ ~XMLTextDropCapExport();
+
+ void exportXML( const ::com::sun::star::uno::Any& rAny,
+ sal_Bool bWholeWord, const ::rtl::OUString& rStyleName,
+ const SvXMLNamespaceMap& rNamespMap );
+};
+
+
+#endif
diff --git a/xmloff/source/text/txtdropi.cxx b/xmloff/source/text/txtdropi.cxx
new file mode 100644
index 0000000000..94e4673150
--- /dev/null
+++ b/xmloff/source/text/txtdropi.cxx
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtdropi.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _COM_SUN_STAR_STYLE_DROPCAPFORMAT_HPP_
+#include <com/sun/star/style/DropCapFormat.hpp>
+#endif
+#ifndef _TXTDROPI_HXX
+#include "txtdropi.hxx"
+#endif
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::style;
+
+enum SvXMLTokenMapDropAttrs
+{
+ XML_TOK_DROP_LINES,
+ XML_TOK_DROP_LENGTH,
+ XML_TOK_DROP_DISTANCE,
+ XML_TOK_DROP_STYLE,
+ XML_TOK_DROP_END=XML_TOK_UNKNOWN
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aDropAttrTokenMap[] =
+{
+ { XML_NAMESPACE_STYLE, sXML_lines, XML_TOK_DROP_LINES },
+ { XML_NAMESPACE_STYLE, sXML_length, XML_TOK_DROP_LENGTH },
+ { XML_NAMESPACE_STYLE, sXML_distance, XML_TOK_DROP_DISTANCE },
+ { XML_NAMESPACE_STYLE, sXML_style_name, XML_TOK_DROP_STYLE },
+ XML_TOKEN_MAP_END
+};
+
+TYPEINIT1( XMLTextDropCapImportContext, XMLElementPropertyContext );
+void XMLTextDropCapImportContext::ProcessAttrs(
+ const Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLTokenMap aTokenMap( aDropAttrTokenMap );
+
+ DropCapFormat aFormat;
+ sal_Bool bWholeWord = sal_False;
+
+ sal_Int32 nTmp;
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+
+ switch( aTokenMap.Get( nPrefix, aLocalName ) )
+ {
+ case XML_TOK_DROP_LINES:
+ if( GetImport().GetMM100UnitConverter().convertNumber( nTmp, rValue, 0, 255 ) )
+ {
+ aFormat.Lines = nTmp < 2 ? 0 : (sal_Int8)nTmp;
+ }
+ break;
+
+ case XML_TOK_DROP_LENGTH:
+ if( rValue.compareToAscii( sXML_word ) == 0 )
+ {
+ bWholeWord = sal_True;
+ }
+ else if( GetImport().GetMM100UnitConverter().convertNumber( nTmp, rValue, 1, 255 ) )
+ {
+ bWholeWord = sal_False;
+ aFormat.Count = (sal_Int8)nTmp;
+ }
+ break;
+
+ case XML_TOK_DROP_DISTANCE:
+ if( GetImport().GetMM100UnitConverter().convertMeasure( nTmp, rValue, 0 ) )
+ {
+ aFormat.Distance = (sal_uInt16)nTmp;
+ }
+ break;
+
+ case XML_TOK_DROP_STYLE:
+ sStyleName = rValue;
+ break;
+ }
+ }
+
+ if( aFormat.Lines > 1 && aFormat.Count < 1 )
+ aFormat.Count = 1;
+
+ aProp.maValue <<= aFormat;
+
+ aWholeWordProp.maValue.setValue( &bWholeWord, ::getBooleanCppuType() );
+}
+
+XMLTextDropCapImportContext::XMLTextDropCapImportContext(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ const XMLPropertyState& rProp,
+ sal_Int32 nWholeWordIdx,
+ ::std::vector< XMLPropertyState > &rProps ) :
+ XMLElementPropertyContext( rImport, nPrfx, rLName, rProp, rProps ),
+ aWholeWordProp( nWholeWordIdx )
+{
+ ProcessAttrs( xAttrList );
+}
+
+XMLTextDropCapImportContext::~XMLTextDropCapImportContext()
+{
+}
+
+void XMLTextDropCapImportContext::EndElement()
+{
+ SetInsert( sal_True );
+ XMLElementPropertyContext::EndElement();
+
+ if( -1 != aWholeWordProp.mnIndex )
+ rProperties.push_back( aWholeWordProp );
+}
+
+
diff --git a/xmloff/source/text/txtdropi.hxx b/xmloff/source/text/txtdropi.hxx
new file mode 100644
index 0000000000..ed3b0a8120
--- /dev/null
+++ b/xmloff/source/text/txtdropi.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtdropi.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TXTDROPI_HXX
+#define _TXTDROPI_HXX
+
+#ifndef _XMLOFF_XMLELEMENTPROPERTYCONTEXT_HXX
+#include "XMLElementPropertyContext.hxx"
+#endif
+
+
+namespace rtl { class OUString; }
+
+class XMLTextDropCapImportContext :public XMLElementPropertyContext
+{
+ XMLPropertyState aWholeWordProp;
+ ::rtl::OUString sStyleName;
+
+private:
+ void ProcessAttrs(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+public:
+ TYPEINFO();
+
+ XMLTextDropCapImportContext(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ const XMLPropertyState& rProp,
+ sal_Int32 nWholeWOrdIdx,
+ ::std::vector< XMLPropertyState > &rProps );
+
+ virtual ~XMLTextDropCapImportContext();
+
+ virtual void EndElement();
+
+ const ::rtl::OUString& GetStyleName() const { return sStyleName; }
+};
+
+
+#endif
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
new file mode 100644
index 0000000000..a6c06ca72d
--- /dev/null
+++ b/xmloff/source/text/txtexppr.cxx
@@ -0,0 +1,162 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtexppr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _XMLOFF_TEXTPRMAP_HXX_
+#include "txtprmap.hxx"
+#endif
+
+#ifndef _XMLOFF_TXTEXPPR_HXX
+#include "txtexppr.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXP_HXX
+#include "xmlexp.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::style;
+
+void XMLTextExportPropertySetMapper::handleElementItem(
+ const Reference< xml::sax::XDocumentHandler > & rHandler,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags ) const
+{
+ XMLTextExportPropertySetMapper *pThis =
+ ((XMLTextExportPropertySetMapper *)this);
+
+ switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
+ {
+ case CTF_DROPCAPFORMAT:
+ pThis->maDropCapExport.exportXML( rProperty.maValue, bDropWholeWord,
+ sDropCharStyle, rNamespaceMap );
+ pThis->bDropWholeWord = sal_False;
+ pThis->sDropCharStyle = OUString();
+ break;
+
+ case CTF_TABSTOP:
+ pThis->maTabStopExport.Export( rProperty.maValue, rNamespaceMap );
+ break;
+
+ case CTF_TEXTCOLUMNS:
+ pThis->maTextColumnsExport.exportXML( rProperty.maValue );
+ break;
+
+ default:
+ DBG_ASSERT( !this, "unknown element property" );
+ break;
+ }
+}
+
+void XMLTextExportPropertySetMapper::handleSpecialItem(
+ SvXMLAttributeList& rAttrList,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const
+{
+ XMLTextExportPropertySetMapper *pThis =
+ ((XMLTextExportPropertySetMapper *)this);
+
+ switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
+ {
+ case CTF_DROPCAPWHOLEWORD:
+ DBG_ASSERT( !bDropWholeWord, "drop whole word is set already!" );
+ pThis->bDropWholeWord = *(sal_Bool *)rProperty.maValue.getValue();
+ break;
+ case CTF_DROPCAPCHARSTYLE:
+ DBG_ASSERT( !sDropCharStyle.getLength(),
+ "drop char style is set already!" );
+ rProperty.maValue >>= pThis->sDropCharStyle;
+ break;
+ case CTF_NUMBERINGSTYLENAME:
+ case CTF_OLDTEXTBACKGROUND:
+ // There's nothing to do here!
+ break;
+ default:
+ DBG_ASSERT( !this, "unknown special property" );
+ break;
+ }
+}
+
+XMLTextExportPropertySetMapper::XMLTextExportPropertySetMapper(
+ const UniReference< XMLPropertySetMapper >& rMapper,
+ SvXMLExport& rExport ) :
+ SvXMLExportPropertyMapper( rMapper ),
+ bDropWholeWord( sal_False ),
+ maTabStopExport( rExport.GetDocHandler(), rExport.GetMM100UnitConverter() ),
+ maDropCapExport( rExport.GetDocHandler(), rExport.GetMM100UnitConverter() ),
+ maTextColumnsExport( rExport )
+{
+}
+
+XMLTextExportPropertySetMapper::~XMLTextExportPropertySetMapper()
+{
+}
+
+
+
+
diff --git a/xmloff/source/text/txtexppr.hxx b/xmloff/source/text/txtexppr.hxx
new file mode 100644
index 0000000000..2b5c8b9845
--- /dev/null
+++ b/xmloff/source/text/txtexppr.hxx
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtexppr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_TXTEXPPR_HXX
+#define _XMLOFF_TXTEXPPR_HXX
+
+
+#ifndef _XMLOFF_XMLEXPPR_HXX
+#include "xmlexppr.hxx"
+#endif
+#ifndef _XMLOFF_TXTDROPE_HXX
+#include "txtdrope.hxx"
+#endif
+#ifndef _XMLOFF_XMLTABE_HXX
+#include "xmltabe.hxx"
+#endif
+#ifndef _XMLOFF_XMLTEXTCOLUMNSEXPORT_HXX
+#include "XMLTextColumnsExport.hxx"
+#endif
+
+class SvXMLExport;
+class XMLTextExportPropertySetMapper: public SvXMLExportPropertyMapper
+{
+ ::rtl::OUString sDropCharStyle;
+ sal_Bool bDropWholeWord;
+
+protected:
+// SvXMLUnitConverter& mrUnitConverter;
+// const Reference< xml::sax::XDocumentHandler > & mrHandler;
+ XMLTextDropCapExport maDropCapExport;
+ SvxXMLTabStopExport maTabStopExport;
+ XMLTextColumnsExport maTextColumnsExport;
+
+public:
+
+ XMLTextExportPropertySetMapper(
+ const UniReference< XMLPropertySetMapper >& rMapper,
+ SvXMLExport& rExport );
+ virtual ~XMLTextExportPropertySetMapper();
+
+ virtual void handleElementItem(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags ) const;
+
+ virtual void handleSpecialItem(
+ SvXMLAttributeList& rAttrList,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const;
+};
+
+
+#endif
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
new file mode 100644
index 0000000000..337870218d
--- /dev/null
+++ b/xmloff/source/text/txtflde.cxx
@@ -0,0 +1,2518 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtflde.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+/** @#file
+ *
+ * export of all text fields
+ */
+
+#ifndef _XMLOFF_TXTFLDE_HXX
+#include "txtflde.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLEXP_HXX
+#include "xmlexp.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNUMFE_HXX
+#include "xmlnumfe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlement.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNUME_HXX
+#include "xmlnume.hxx"
+#endif
+
+#ifndef XMLOFF_NUMEHELP_HXX
+#include "numehelp.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_USERDATAPART_HPP_
+#include <com/sun/star/text/UserDataPart.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_PAGENUMBERTYPE_HPP_
+#include <com/sun/star/text/PageNumberType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_NUMBERINGTYPE_HPP_
+#include <com/sun/star/style/NumberingType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_REFERENCEFIELDPART_HPP_
+#include <com/sun/star/text/ReferenceFieldPart.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_REFERENCEFIELDSOURCE_HPP_
+#include <com/sun/star/text/ReferenceFieldSource.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELD_HPP_
+#include <com/sun/star/text/XTextField.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XDEPENDENTTEXTFIELD_HPP_
+#include <com/sun/star/text/XDependentTextField.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELDSSUPPLIER_HPP_
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_SETVARIABLETYPE_HPP
+#include <com/sun/star/text/SetVariableType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_PLACEHOLDERTYPE_HPP_
+#include <com/sun/star/text/PlaceholderType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFOSUPPLIER_HPP_
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFO_HPP_
+#include <com/sun/star/document/XDocumentInfo.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_FILENAMEDISPLAYFORMAT_HPP_
+#include <com/sun/star/text/FilenameDisplayFormat.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_CHAPTERFORMAT_HPP_
+#include <com/sun/star/text/ChapterFormat.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_TEMPLATEDISPLAYFORMAT_HPP_
+#include <com/sun/star/text/TemplateDisplayFormat.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
+#include <com/sun/star/uno/Sequence.h>
+#endif
+
+#ifndef _COM_SUN_STAR_UTIL_NUMBERFORMAT_HPP_
+#include <com/sun/star/util/NumberFormat.hpp>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _TOOLS_SOLMATH_HXX
+#include <tools/solmath.hxx>
+#endif
+
+#include <stl/vector>
+
+using namespace ::rtl;
+using namespace ::std;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::document;
+
+
+static sal_Char __READONLY_DATA FIELD_SERVICE_SENDER[] = "ExtendedUser";
+static sal_Char __READONLY_DATA FIELD_SERVICE_AUTHOR[] = "Author";
+static sal_Char __READONLY_DATA FIELD_SERVICE_JUMPEDIT[] = "JumpEdit";
+static sal_Char __READONLY_DATA FIELD_SERVICE_GETEXP[] = "GetExpression";
+static sal_Char __READONLY_DATA FIELD_SERVICE_SETEXP[] = "SetExpression";
+static sal_Char __READONLY_DATA FIELD_SERVICE_USER[] = "User";
+static sal_Char __READONLY_DATA FIELD_SERVICE_INPUT[] = "Input";
+static sal_Char __READONLY_DATA FIELD_SERVICE_USERINPUT[] = "InputUser";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DATETIME[] = "DateTime";
+static sal_Char __READONLY_DATA FIELD_SERVICE_PAGENUMBER[] = "PageNumber";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DB_NEXT[] = "DatabaseNextSet";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DB_SELECT[] = "DatabaseNumberOfSet";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DB_NUMBER[] = "DatabaseSetNumber";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DB_DISPLAY[] = "Database";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DB_NAME[] = "DatabaseName";
+static sal_Char __READONLY_DATA FIELD_SERVICE_CONDITIONAL_TEXT[] = "ConditionalText";
+static sal_Char __READONLY_DATA FIELD_SERVICE_HIDDEN_TEXT[] = "HiddenText";
+static sal_Char __READONLY_DATA FIELD_SERVICE_HIDDEN_PARAGRAPH[] = "HiddenParagraph";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CHANGE_AUTHOR[] = "DocInfo.ChangeAuthor";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CHANGE_DATE_TIME[] = "DocInfo.ChangeDateTime";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_EDIT_TIME[] = "DocInfo.EditTime";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_DESCRIPTION[] = "DocInfo.Description";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CREATE_AUTHOR[] = "DocInfo.CreateAuthor";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_CREATE_DATE_TIME[] = "DocInfo.CreateDateTime";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_INFO0[] = "DocInfo.Info0";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_INFO1[] = "DocInfo.Info1";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_INFO2[] = "DocInfo.Info2";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_INFO3[] = "DocInfo.Info3";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_PRINT_AUTHOR[] = "DocInfo.PrintAuthor";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_PRINT_DATE_TIME[] = "DocInfo.PrintDateTime";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_KEY_WORDS[] = "DocInfo.KeyWords";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_SUBJECT[] = "DocInfo.Subject";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_TITLE[] = "DocInfo.Title";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DOC_INFO_REVISION[] = "DocInfo.Revision";
+static sal_Char __READONLY_DATA FIELD_SERVICE_FILE_NAME[] = "FileName";
+static sal_Char __READONLY_DATA FIELD_SERVICE_CHAPTER[] = "Chapter";
+static sal_Char __READONLY_DATA FIELD_SERVICE_TEMPLATE_NAME[] = "TemplateName";
+static sal_Char __READONLY_DATA FIELD_SERVICE_PAGE_COUNT[] = "PageCount";
+static sal_Char __READONLY_DATA FIELD_SERVICE_PARAGRAPH_COUNT[] = "ParagraphCount";
+static sal_Char __READONLY_DATA FIELD_SERVICE_WORD_COUNT[] = "WordCount";
+static sal_Char __READONLY_DATA FIELD_SERVICE_CHARACTER_COUNT[] = "CharacterCount";
+static sal_Char __READONLY_DATA FIELD_SERVICE_TABLE_COUNT[] = "TableCount";
+static sal_Char __READONLY_DATA FIELD_SERVICE_GRAPHIC_COUNT[] = "GraphicObjectCount";
+static sal_Char __READONLY_DATA FIELD_SERVICE_OBJECT_COUNT[] = "EmbeddedObjectCount";
+static sal_Char __READONLY_DATA FIELD_SERVICE_REFERENCE_PAGE_SET[] = "ReferencePageSet";
+static sal_Char __READONLY_DATA FIELD_SERVICE_REFERENCE_PAGE_GET[] = "ReferencePageGet";
+static sal_Char __READONLY_DATA FIELD_SERVICE_MACRO[] = "Macro";
+static sal_Char __READONLY_DATA FIELD_SERVICE_GET_REFERENCE[] = "GetReference";
+static sal_Char __READONLY_DATA FIELD_SERVICE_DDE[] = "DDE";
+
+
+SvXMLEnumMapEntry __READONLY_DATA aFieldServiceNameMapping[] =
+{
+ { FIELD_SERVICE_SENDER, FIELD_ID_SENDER },
+ { FIELD_SERVICE_AUTHOR, FIELD_ID_AUTHOR },
+ { FIELD_SERVICE_JUMPEDIT, FIELD_ID_PLACEHOLDER },
+ { FIELD_SERVICE_GETEXP, FIELD_ID_VARIABLE_GET },
+ { FIELD_SERVICE_SETEXP, FIELD_ID_VARIABLE_SET },
+ { FIELD_SERVICE_USER, FIELD_ID_USER_GET },
+ { FIELD_SERVICE_INPUT, FIELD_ID_TEXT_INPUT },
+ { FIELD_SERVICE_USERINPUT, FIELD_ID_USER_INPUT },
+ { FIELD_SERVICE_DATETIME, FIELD_ID_TIME },
+ { FIELD_SERVICE_PAGENUMBER, FIELD_ID_PAGENUMBER },
+ { FIELD_SERVICE_REFERENCE_PAGE_SET, FIELD_ID_REFPAGE_SET },
+ { FIELD_SERVICE_REFERENCE_PAGE_GET, FIELD_ID_REFPAGE_GET },
+
+ { FIELD_SERVICE_DB_NEXT, FIELD_ID_DATABASE_NEXT },
+ { FIELD_SERVICE_DB_SELECT, FIELD_ID_DATABASE_SELECT },
+ { FIELD_SERVICE_DB_NUMBER, FIELD_ID_DATABASE_NUMBER },
+ { FIELD_SERVICE_DB_DISPLAY, FIELD_ID_DATABASE_DISPLAY },
+ // workaround for #no-bug#: Database/DataBase
+ { "DataBase", FIELD_ID_DATABASE_DISPLAY },
+ { FIELD_SERVICE_DB_NAME, FIELD_ID_DATABASE_NAME },
+
+ { FIELD_SERVICE_DOC_INFO_CREATE_AUTHOR, FIELD_ID_DOCINFO_CREATION_AUTHOR },
+ { FIELD_SERVICE_DOC_INFO_CREATE_DATE_TIME, FIELD_ID_DOCINFO_CREATION_TIME},
+ { FIELD_SERVICE_DOC_INFO_CHANGE_AUTHOR, FIELD_ID_DOCINFO_SAVE_AUTHOR },
+ { FIELD_SERVICE_DOC_INFO_CHANGE_DATE_TIME, FIELD_ID_DOCINFO_SAVE_TIME },
+ { FIELD_SERVICE_DOC_INFO_EDIT_TIME, FIELD_ID_DOCINFO_EDIT_DURATION },
+ { FIELD_SERVICE_DOC_INFO_DESCRIPTION, FIELD_ID_DOCINFO_DESCRIPTION },
+ { FIELD_SERVICE_DOC_INFO_INFO0, FIELD_ID_DOCINFO_INFORMATION0 },
+ { FIELD_SERVICE_DOC_INFO_INFO1, FIELD_ID_DOCINFO_INFORMATION1 },
+ { FIELD_SERVICE_DOC_INFO_INFO2, FIELD_ID_DOCINFO_INFORMATION2 },
+ { FIELD_SERVICE_DOC_INFO_INFO3, FIELD_ID_DOCINFO_INFORMATION3 },
+ { FIELD_SERVICE_DOC_INFO_PRINT_AUTHOR, FIELD_ID_DOCINFO_PRINT_AUTHOR },
+ { FIELD_SERVICE_DOC_INFO_PRINT_DATE_TIME, FIELD_ID_DOCINFO_PRINT_TIME },
+ { FIELD_SERVICE_DOC_INFO_KEY_WORDS, FIELD_ID_DOCINFO_KEYWORDS },
+ { FIELD_SERVICE_DOC_INFO_SUBJECT, FIELD_ID_DOCINFO_SUBJECT },
+ { FIELD_SERVICE_DOC_INFO_TITLE, FIELD_ID_DOCINFO_TITLE },
+ { FIELD_SERVICE_DOC_INFO_REVISION, FIELD_ID_DOCINFO_REVISION },
+
+ { FIELD_SERVICE_CONDITIONAL_TEXT, FIELD_ID_CONDITIONAL_TEXT },
+ { FIELD_SERVICE_HIDDEN_TEXT, FIELD_ID_HIDDEN_TEXT },
+ { FIELD_SERVICE_HIDDEN_PARAGRAPH, FIELD_ID_HIDDEN_PARAGRAPH },
+
+ { FIELD_SERVICE_FILE_NAME, FIELD_ID_FILE_NAME },
+ { FIELD_SERVICE_CHAPTER, FIELD_ID_CHAPTER },
+ { FIELD_SERVICE_TEMPLATE_NAME, FIELD_ID_TEMPLATE_NAME },
+
+ { FIELD_SERVICE_PAGE_COUNT, FIELD_ID_COUNT_PAGES },
+ { FIELD_SERVICE_PARAGRAPH_COUNT, FIELD_ID_COUNT_PARAGRAPHS },
+ { FIELD_SERVICE_WORD_COUNT, FIELD_ID_COUNT_WORDS },
+ { FIELD_SERVICE_CHARACTER_COUNT, FIELD_ID_COUNT_CHARACTERS },
+ { FIELD_SERVICE_TABLE_COUNT, FIELD_ID_COUNT_TABLES },
+ { FIELD_SERVICE_GRAPHIC_COUNT, FIELD_ID_COUNT_GRAPHICS },
+ { FIELD_SERVICE_OBJECT_COUNT, FIELD_ID_COUNT_OBJECTS },
+
+ { FIELD_SERVICE_MACRO, FIELD_ID_MACRO },
+ { FIELD_SERVICE_GET_REFERENCE, FIELD_ID_REF_REFERENCE },
+ { FIELD_SERVICE_DDE, FIELD_ID_DDE },
+
+ { 0, 0 }
+};
+
+
+// TODO: enable asserts (#77364#) when all fields are implemented
+
+
+// property accessor helper functions
+inline sal_Bool const GetBoolProperty(const OUString&,
+ const Reference<XPropertySet> &);
+inline Double const GetDoubleProperty(const OUString&,
+ const Reference<XPropertySet> &);
+inline OUString const GetStringProperty(const OUString&,
+ const Reference<XPropertySet> &);
+inline sal_Int32 const GetIntProperty(const OUString&,
+ const Reference<XPropertySet> &);
+inline sal_Int16 const GetInt16Property(const OUString&,
+ const Reference<XPropertySet> &);
+inline sal_Int8 const GetInt8Property(const OUString&,
+ const Reference<XPropertySet> &);
+
+
+
+XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp )
+ : rExport(rExp),
+ sServicePrefix(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.")),
+ sFieldMasterPrefix(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.FieldMaster.")),
+ sPropertyContent(RTL_CONSTASCII_USTRINGPARAM("Content")),
+ sPropertyIsFixed(RTL_CONSTASCII_USTRINGPARAM("IsFixed")),
+ sPropertyAuthorFullname(RTL_CONSTASCII_USTRINGPARAM("FullName")),
+ sPropertyFieldSubType(RTL_CONSTASCII_USTRINGPARAM("UserDataType")),
+ sPropertyHint(RTL_CONSTASCII_USTRINGPARAM("Hint")),
+ sPropertyPlaceholder(RTL_CONSTASCII_USTRINGPARAM("PlaceHolder")),
+ sPropertyPlaceholderType(RTL_CONSTASCII_USTRINGPARAM("PlaceHolderType")),
+ sPropertyIsVisible(RTL_CONSTASCII_USTRINGPARAM("IsVisible")),
+ sPropertyIsShowFormula(RTL_CONSTASCII_USTRINGPARAM("IsShowFormula")),
+ sPropertyIsInput(RTL_CONSTASCII_USTRINGPARAM("Input")),
+ sPropertyIsExpression(RTL_CONSTASCII_USTRINGPARAM("IsExpression")),
+ sPropertyNumberFormat(RTL_CONSTASCII_USTRINGPARAM("NumberFormat")),
+ sPropertyVariableName(RTL_CONSTASCII_USTRINGPARAM("VariableName")),
+ sPropertySubType(RTL_CONSTASCII_USTRINGPARAM("SubType")),
+ sPropertyName(RTL_CONSTASCII_USTRINGPARAM("Name")),
+ sPropertyVariableSubType(RTL_CONSTASCII_USTRINGPARAM("VariableSubtype")),
+ sPropertyValue(RTL_CONSTASCII_USTRINGPARAM("Value")),
+ sPropertyChapterNumberingLevel(
+ RTL_CONSTASCII_USTRINGPARAM("ChapterNumberingLevel")),
+ sPropertyNumberingSeparator(
+ RTL_CONSTASCII_USTRINGPARAM("NumberingSeparator")),
+ sPropertyNumberingType(
+ RTL_CONSTASCII_USTRINGPARAM("NumberingType")),
+ sPropertyDateTimeValue(RTL_CONSTASCII_USTRINGPARAM("DateTimeValue")),
+ sPropertyUserText(RTL_CONSTASCII_USTRINGPARAM("UserText")),
+ sPropertyOffset(RTL_CONSTASCII_USTRINGPARAM("Offset")),
+ sPropertyDataBaseName(RTL_CONSTASCII_USTRINGPARAM("DataBaseName")),
+ sPropertyDataTableName(RTL_CONSTASCII_USTRINGPARAM("DataTableName")),
+ sPropertyCondition(RTL_CONSTASCII_USTRINGPARAM("Condition")),
+ sPropertySetNumber(RTL_CONSTASCII_USTRINGPARAM("SetNumber")),
+ sPropertyIsDataBaseFormat(RTL_CONSTASCII_USTRINGPARAM("DataBaseFormat")),
+ sPropertyDataColumnName(RTL_CONSTASCII_USTRINGPARAM("DataColumnName")),
+ sPropertyDateTime(RTL_CONSTASCII_USTRINGPARAM("DateTimeValue")),
+ sPropertyTrueContent(RTL_CONSTASCII_USTRINGPARAM("TrueContent")),
+ sPropertyFalseContent(RTL_CONSTASCII_USTRINGPARAM("FalseContent")),
+ sPropertyRevision(RTL_CONSTASCII_USTRINGPARAM("Revision")),
+ sPropertyFileFormat(RTL_CONSTASCII_USTRINGPARAM("FileFormat")),
+ sPropertyChapterFormat(RTL_CONSTASCII_USTRINGPARAM("ChapterFormat")),
+ sPropertyLevel(RTL_CONSTASCII_USTRINGPARAM("Level")),
+ sPropertyIsDate(RTL_CONSTASCII_USTRINGPARAM("IsDate")),
+ sPropertyAdjust(RTL_CONSTASCII_USTRINGPARAM("Adjust")),
+ sPropertyOn(RTL_CONSTASCII_USTRINGPARAM("On")),
+ sPropertyMacro(RTL_CONSTASCII_USTRINGPARAM("Macro")),
+ sPropertyReferenceFieldPart(
+ RTL_CONSTASCII_USTRINGPARAM("ReferenceFieldPart")),
+ sPropertyReferenceFieldType(
+ RTL_CONSTASCII_USTRINGPARAM("ReferenceFieldType")),
+ sPropertyReferenceFieldSource(
+ RTL_CONSTASCII_USTRINGPARAM("ReferenceFieldSource")),
+ sPropertySequenceNumber(
+ RTL_CONSTASCII_USTRINGPARAM("SequenceNumber")),
+ sPropertySourceName(RTL_CONSTASCII_USTRINGPARAM("SourceName")),
+ sPropertyDDECommandType(RTL_CONSTASCII_USTRINGPARAM("DDECommandType")),
+ sPropertyDDECommandFile(RTL_CONSTASCII_USTRINGPARAM("DDECommandFile")),
+ sPropertyDDECommandElement(
+ RTL_CONSTASCII_USTRINGPARAM("DDECommandElement")),
+ sPropertyIsAutomaticUpdate(
+ RTL_CONSTASCII_USTRINGPARAM("IsAutomaticUpdate")),
+ sPropertyDependentTextFields(
+ RTL_CONSTASCII_USTRINGPARAM("DependentTextFields"))
+{
+}
+
+XMLTextFieldExport::~XMLTextFieldExport()
+{
+}
+
+/// get the field ID (as in FieldIDEnum) from XTextField
+enum FieldIdEnum XMLTextFieldExport::GetFieldID(
+ const Reference<XTextField> & rTextField,
+ const Reference<XPropertySet> & xPropSet)
+{
+ // get service names for rTextField (via XServiceInfo service)
+ Reference<XServiceInfo> xService(rTextField, UNO_QUERY);
+ const Sequence<OUString> aServices = xService->getSupportedServiceNames();
+ const OUString* pNames = aServices.getConstArray();
+ sal_Int32 nCount = aServices.getLength();
+
+ OUString sFieldName; // service name postfix of current field
+
+ // search for TextField service name
+ while( nCount-- )
+ {
+ if( 0 == pNames->compareTo(sServicePrefix, sServicePrefix.getLength()))
+ {
+ // TextField found => postfix is field type!
+ sFieldName = pNames->copy(sServicePrefix.getLength());
+ break;
+ }
+
+ ++pNames;
+ }
+
+
+ // map postfix of service name to field ID
+ DBG_ASSERT(sFieldName.getLength()>0, "no TextField service found!");
+ return MapFieldName(sFieldName, xPropSet);
+}
+
+enum FieldIdEnum XMLTextFieldExport::MapFieldName(
+ const OUString& sFieldName, // field (master) name
+ const Reference<XPropertySet> & xPropSet) // for subtype
+{
+ // we'll proceed in 2 steps:
+ // a) map service name to preliminary FIELD_ID
+ // b) map those prelim. FIELD_IDs that correspond to several field types
+ // (in our (XML) world) to final FIELD IDs
+
+
+ // a) find prelim. FIELD_ID via aFieldServiceMapping
+
+ // check for non-empty service name
+ DBG_ASSERT(sFieldName.getLength()>0, "no valid service name!");
+ enum FieldIdEnum nToken = FIELD_ID_UNKNOWN;
+ if (sFieldName.getLength() > 0)
+ {
+ // map name to prelim. ID
+ sal_uInt16 nTmp;
+ sal_Bool bRet = GetExport().GetMM100UnitConverter().convertEnum(
+ nTmp, sFieldName, aFieldServiceNameMapping);
+
+ // check return
+ // #77364#: no assert, unless all fields are implemented
+ // DBG_ASSERT(bRet, "Unknown field service name encountered!");
+ if (! bRet)
+ {
+ nToken = FIELD_ID_UNKNOWN;
+ }
+ else
+ {
+ nToken = (enum FieldIdEnum)nTmp;
+ }
+ } else {
+ // invalid service name
+ nToken = FIELD_ID_UNKNOWN;
+ }
+
+ // b) map prelim. to final FIELD_IDs
+ switch (nToken) {
+ case FIELD_ID_VARIABLE_SET:
+ if (GetBoolProperty(sPropertyIsInput, xPropSet))
+ {
+ nToken = FIELD_ID_VARIABLE_INPUT;
+ }
+ else
+ {
+ switch (GetIntProperty(sPropertySubType, xPropSet))
+ {
+ case SetVariableType::STRING: // text field
+ case SetVariableType::VAR: // num field
+ nToken = FIELD_ID_VARIABLE_SET;
+ break;
+ case SetVariableType::SEQUENCE:
+ nToken = FIELD_ID_SEQUENCE;
+ break;
+ case SetVariableType::FORMULA:
+ default:
+ nToken = FIELD_ID_UNKNOWN;
+ break;
+ }
+ }
+ break;
+
+ case FIELD_ID_VARIABLE_GET:
+ switch (GetIntProperty(sPropertySubType, xPropSet))
+ {
+ case SetVariableType::STRING: // text field
+ case SetVariableType::VAR: // num field
+ nToken = FIELD_ID_VARIABLE_GET;
+ break;
+ case SetVariableType::FORMULA:
+ nToken = FIELD_ID_EXPRESSION;
+ break;
+ case SetVariableType::SEQUENCE:
+ default:
+ nToken = FIELD_ID_UNKNOWN;
+ break;
+ }
+ break;
+
+ case FIELD_ID_TIME:
+ if (GetBoolProperty(sPropertyIsDate, xPropSet))
+ {
+ nToken = FIELD_ID_DATE;
+ }
+ break;
+
+ case FIELD_ID_PAGENUMBER:
+ if (NumberingType::CHAR_SPECIAL == GetIntProperty(
+ sPropertyNumberingType, xPropSet))
+ {
+ nToken = FIELD_ID_PAGESTRING;
+ }
+ break;
+
+ case FIELD_ID_DOCINFO_CREATION_TIME:
+ if (GetBoolProperty(sPropertyIsDate, xPropSet))
+ {
+ nToken = FIELD_ID_DOCINFO_CREATION_DATE;
+ }
+ break;
+
+ case FIELD_ID_DOCINFO_PRINT_TIME:
+ if (GetBoolProperty(sPropertyIsDate, xPropSet))
+ {
+ nToken = FIELD_ID_DOCINFO_PRINT_DATE;
+ }
+ break;
+
+ case FIELD_ID_DOCINFO_SAVE_TIME:
+ if (GetBoolProperty(sPropertyIsDate, xPropSet))
+ {
+ nToken = FIELD_ID_DOCINFO_SAVE_DATE;
+ }
+ break;
+
+ case FIELD_ID_REF_REFERENCE:
+ switch (GetInt16Property(sPropertyReferenceFieldSource, xPropSet))
+ {
+ case ReferenceFieldSource::REFERENCE_MARK:
+ nToken = FIELD_ID_REF_REFERENCE;
+ break;
+ case ReferenceFieldSource::SEQUENCE_FIELD:
+ nToken = FIELD_ID_REF_SEQUENCE;
+ break;
+ case ReferenceFieldSource::BOOKMARK:
+ nToken = FIELD_ID_REF_BOOKMARK;
+ break;
+ case ReferenceFieldSource::FOOTNOTE:
+ nToken = FIELD_ID_REF_FOOTNOTE;
+ break;
+ case ReferenceFieldSource::ENDNOTE:
+ nToken = FIELD_ID_REF_ENDNOTE;
+ break;
+ default:
+ nToken = FIELD_ID_UNKNOWN;
+ break;
+ }
+ break;
+
+ case FIELD_ID_DDE:
+ case FIELD_ID_MACRO:
+ case FIELD_ID_REFPAGE_SET:
+ case FIELD_ID_REFPAGE_GET:
+ case FIELD_ID_COUNT_PAGES:
+ case FIELD_ID_COUNT_PARAGRAPHS:
+ case FIELD_ID_COUNT_WORDS:
+ case FIELD_ID_COUNT_CHARACTERS:
+ case FIELD_ID_COUNT_TABLES:
+ case FIELD_ID_COUNT_GRAPHICS:
+ case FIELD_ID_COUNT_OBJECTS:
+ case FIELD_ID_CONDITIONAL_TEXT:
+ case FIELD_ID_HIDDEN_TEXT:
+ case FIELD_ID_HIDDEN_PARAGRAPH:
+ case FIELD_ID_DOCINFO_CREATION_AUTHOR:
+ case FIELD_ID_DOCINFO_DESCRIPTION:
+ case FIELD_ID_DOCINFO_INFORMATION0:
+ case FIELD_ID_DOCINFO_INFORMATION1:
+ case FIELD_ID_DOCINFO_INFORMATION2:
+ case FIELD_ID_DOCINFO_INFORMATION3:
+ case FIELD_ID_DOCINFO_PRINT_AUTHOR:
+ case FIELD_ID_DOCINFO_TITLE:
+ case FIELD_ID_DOCINFO_SUBJECT:
+ case FIELD_ID_DOCINFO_KEYWORDS:
+ case FIELD_ID_DOCINFO_REVISION:
+ case FIELD_ID_DOCINFO_EDIT_DURATION:
+ case FIELD_ID_DOCINFO_SAVE_AUTHOR:
+ case FIELD_ID_TEXT_INPUT:
+ case FIELD_ID_USER_INPUT:
+ case FIELD_ID_AUTHOR:
+ case FIELD_ID_SENDER:
+ case FIELD_ID_PLACEHOLDER:
+ case FIELD_ID_USER_GET:
+ case FIELD_ID_DATABASE_NEXT:
+ case FIELD_ID_DATABASE_SELECT:
+ case FIELD_ID_DATABASE_DISPLAY:
+ case FIELD_ID_DATABASE_NAME:
+ case FIELD_ID_DATABASE_NUMBER:
+ case FIELD_ID_TEMPLATE_NAME:
+ case FIELD_ID_CHAPTER:
+ case FIELD_ID_FILE_NAME:
+ ; // these field IDs are final
+ break;
+
+ default:
+ nToken = FIELD_ID_UNKNOWN;
+ }
+
+ // ... and return final FIELD_ID
+ return nToken;
+}
+
+// is string or numeric field?
+sal_Bool XMLTextFieldExport::IsStringField(
+ sal_uInt16 nFieldType,
+ const Reference<XPropertySet> & xPropSet)
+{
+ switch (nFieldType) {
+
+ case FIELD_ID_VARIABLE_GET:
+ case FIELD_ID_VARIABLE_SET:
+ case FIELD_ID_VARIABLE_INPUT:
+ {
+ // depends on field sub type
+ return ( GetIntProperty(sPropertySubType, xPropSet) ==
+ SetVariableType::STRING );
+ }
+
+ case FIELD_ID_USER_GET:
+ case FIELD_ID_USER_INPUT:
+ {
+ Reference<XTextField> xTextField(xPropSet, UNO_QUERY);
+ DBG_ASSERT(xTextField.is(), "field is no XTextField!");
+ sal_Bool bRet = GetBoolProperty(sPropertyIsExpression,
+ GetMasterPropertySet(xTextField));
+ return !bRet;
+ }
+
+ case FIELD_ID_DATABASE_DISPLAY:
+ // TODO: depends on... ???
+ // workaround #no-bug#: no data type
+ return 5100 == GetIntProperty(sPropertyNumberFormat, xPropSet);
+ break;
+
+ case FIELD_ID_COUNT_PAGES:
+ case FIELD_ID_COUNT_PARAGRAPHS:
+ case FIELD_ID_COUNT_WORDS:
+ case FIELD_ID_COUNT_CHARACTERS:
+ case FIELD_ID_COUNT_TABLES:
+ case FIELD_ID_COUNT_GRAPHICS:
+ case FIELD_ID_COUNT_OBJECTS:
+ case FIELD_ID_DOCINFO_SAVE_TIME:
+ case FIELD_ID_DOCINFO_SAVE_DATE:
+ case FIELD_ID_DOCINFO_CREATION_DATE:
+ case FIELD_ID_DOCINFO_CREATION_TIME:
+ case FIELD_ID_DOCINFO_PRINT_TIME:
+ case FIELD_ID_DOCINFO_PRINT_DATE:
+ case FIELD_ID_DOCINFO_EDIT_DURATION:
+ case FIELD_ID_DOCINFO_REVISION:
+ case FIELD_ID_DATABASE_NUMBER:
+ case FIELD_ID_EXPRESSION:
+ case FIELD_ID_SEQUENCE:
+ case FIELD_ID_DATE:
+ case FIELD_ID_TIME:
+ case FIELD_ID_PAGENUMBER:
+ case FIELD_ID_REFPAGE_SET:
+ case FIELD_ID_REFPAGE_GET:
+ // always number
+ return sal_False;
+
+ case FIELD_ID_DDE:
+ case FIELD_ID_REF_REFERENCE:
+ case FIELD_ID_REF_SEQUENCE:
+ case FIELD_ID_REF_BOOKMARK:
+ case FIELD_ID_REF_FOOTNOTE:
+ case FIELD_ID_REF_ENDNOTE:
+ case FIELD_ID_MACRO:
+ case FIELD_ID_TEMPLATE_NAME:
+ case FIELD_ID_CHAPTER:
+ case FIELD_ID_FILE_NAME:
+ case FIELD_ID_CONDITIONAL_TEXT:
+ case FIELD_ID_HIDDEN_TEXT:
+ case FIELD_ID_HIDDEN_PARAGRAPH:
+ case FIELD_ID_DOCINFO_CREATION_AUTHOR:
+ case FIELD_ID_DOCINFO_DESCRIPTION:
+ case FIELD_ID_DOCINFO_INFORMATION0:
+ case FIELD_ID_DOCINFO_INFORMATION1:
+ case FIELD_ID_DOCINFO_INFORMATION2:
+ case FIELD_ID_DOCINFO_INFORMATION3:
+ case FIELD_ID_DOCINFO_PRINT_AUTHOR:
+ case FIELD_ID_DOCINFO_TITLE:
+ case FIELD_ID_DOCINFO_SUBJECT:
+ case FIELD_ID_DOCINFO_KEYWORDS:
+ case FIELD_ID_DOCINFO_SAVE_AUTHOR:
+ case FIELD_ID_DATABASE_NAME:
+ case FIELD_ID_TEXT_INPUT:
+ case FIELD_ID_SENDER:
+ case FIELD_ID_AUTHOR:
+ case FIELD_ID_PAGESTRING:
+ // always string:
+ return sal_True;
+
+ case FIELD_ID_DATABASE_NEXT:
+ case FIELD_ID_DATABASE_SELECT:
+ case FIELD_ID_VARIABLE_DECL:
+ case FIELD_ID_USER_DECL:
+ case FIELD_ID_SEQUENCE_DECL:
+ case FIELD_ID_PLACEHOLDER:
+ case FIELD_ID_UNKNOWN:
+ default:
+ DBG_ERROR("unkown field type/field has no content");
+ return sal_True; // invalid info; string in case of doubt
+ }
+}
+
+/// export the styles needed by the given field. Called on first pass
+/// through document
+void XMLTextFieldExport::ExportFieldAutoStyle(
+ const Reference<XTextField> & rTextField)
+{
+ // get property set
+ Reference<XPropertySet> xPropSet(rTextField, UNO_QUERY);
+
+ // get Field ID
+ sal_uInt16 nToken = GetFieldID(rTextField, xPropSet);
+
+ // process each field
+ switch (nToken) {
+
+ case FIELD_ID_DATABASE_DISPLAY:
+ {
+ sal_Int32 nFormat = GetIntProperty(sPropertyNumberFormat, xPropSet);
+ // workaround: #no-bug#; see IsStringField(...)
+ if ( (5100 != nFormat) &&
+ !GetBoolProperty(sPropertyIsDataBaseFormat, xPropSet) )
+ {
+ GetExport().addDataStyle(nFormat);
+ }
+ break;
+ }
+
+ case FIELD_ID_DOCINFO_PRINT_TIME:
+ case FIELD_ID_DOCINFO_PRINT_DATE:
+ case FIELD_ID_DOCINFO_CREATION_DATE:
+ case FIELD_ID_DOCINFO_CREATION_TIME:
+ case FIELD_ID_DOCINFO_SAVE_TIME:
+ case FIELD_ID_DOCINFO_SAVE_DATE:
+ case FIELD_ID_DOCINFO_EDIT_DURATION:
+ case FIELD_ID_VARIABLE_SET:
+ case FIELD_ID_VARIABLE_GET:
+ case FIELD_ID_VARIABLE_INPUT:
+ case FIELD_ID_USER_GET:
+ case FIELD_ID_EXPRESSION:
+ case FIELD_ID_DATE:
+ case FIELD_ID_TIME:
+ // register number format, if this is a numeric field
+ if (! IsStringField(nToken, xPropSet)) {
+
+ sal_Int32 nFormat =
+ GetIntProperty(sPropertyNumberFormat, xPropSet);
+
+ // nFormat may be -1 for numeric fields that display their
+ // variable name. (Maybe this should be a field type, then?)
+ if (nFormat != -1) {
+ GetExport().addDataStyle(nFormat);
+ }
+ }
+ break;
+
+ case FIELD_ID_DDE:
+ case FIELD_ID_REF_REFERENCE:
+ case FIELD_ID_REF_SEQUENCE:
+ case FIELD_ID_REF_BOOKMARK:
+ case FIELD_ID_REF_FOOTNOTE:
+ case FIELD_ID_REF_ENDNOTE:
+ case FIELD_ID_MACRO:
+ case FIELD_ID_REFPAGE_SET:
+ case FIELD_ID_REFPAGE_GET:
+ case FIELD_ID_COUNT_PAGES:
+ case FIELD_ID_COUNT_PARAGRAPHS:
+ case FIELD_ID_COUNT_WORDS:
+ case FIELD_ID_COUNT_CHARACTERS:
+ case FIELD_ID_COUNT_TABLES:
+ case FIELD_ID_COUNT_GRAPHICS:
+ case FIELD_ID_COUNT_OBJECTS:
+ case FIELD_ID_CONDITIONAL_TEXT:
+ case FIELD_ID_HIDDEN_TEXT:
+ case FIELD_ID_HIDDEN_PARAGRAPH:
+ case FIELD_ID_DOCINFO_CREATION_AUTHOR:
+ case FIELD_ID_DOCINFO_DESCRIPTION:
+ case FIELD_ID_DOCINFO_INFORMATION0:
+ case FIELD_ID_DOCINFO_INFORMATION1:
+ case FIELD_ID_DOCINFO_INFORMATION2:
+ case FIELD_ID_DOCINFO_INFORMATION3:
+ case FIELD_ID_DOCINFO_PRINT_AUTHOR:
+ case FIELD_ID_DOCINFO_TITLE:
+ case FIELD_ID_DOCINFO_SUBJECT:
+ case FIELD_ID_DOCINFO_KEYWORDS:
+ case FIELD_ID_DOCINFO_REVISION:
+ case FIELD_ID_DOCINFO_SAVE_AUTHOR:
+ case FIELD_ID_SEQUENCE:
+ case FIELD_ID_PAGENUMBER:
+ case FIELD_ID_PAGESTRING:
+ case FIELD_ID_AUTHOR:
+ case FIELD_ID_SENDER:
+ case FIELD_ID_PLACEHOLDER:
+ case FIELD_ID_USER_INPUT:
+ case FIELD_ID_TEXT_INPUT:
+ case FIELD_ID_DATABASE_NEXT:
+ case FIELD_ID_DATABASE_SELECT:
+ case FIELD_ID_DATABASE_NAME:
+ case FIELD_ID_DATABASE_NUMBER:
+ case FIELD_ID_TEMPLATE_NAME:
+ case FIELD_ID_CHAPTER:
+ case FIELD_ID_FILE_NAME:
+ ; // no formats for these fields!
+ break;
+
+ case FIELD_ID_UNKNOWN:
+ default:
+ // #77364#: no assert, unless all fields are implemented
+ // DBG_ERROR("unkown field type!");
+ // ignore -> no format for unkowns
+ break;
+ }
+}
+
+/// export the given field to XML. Called on second pass through document
+void XMLTextFieldExport::ExportField(const Reference<XTextField> & rTextField )
+{
+ // get property set
+ Reference<XPropertySet> xPropSet(rTextField, UNO_QUERY);
+
+ // get Field ID
+ enum FieldIdEnum nToken = GetFieldID(rTextField, xPropSet);
+
+ OUString sPresentation = rTextField->getPresentation(sal_False);
+
+ // process each field type
+ switch (nToken) {
+ case FIELD_ID_AUTHOR:
+ // author field: fixed, field (sub-)type
+ ProcessBoolean(sXML_fixed,
+ GetBoolProperty(sPropertyIsFixed, xPropSet), sal_True);
+ ExportElement(MapAuthorFieldName(xPropSet), sPresentation);
+ break;
+
+ case FIELD_ID_SENDER:
+ // sender field: fixed, field (sub-)type
+ ProcessBoolean(sXML_fixed,
+ GetBoolProperty(sPropertyIsFixed, xPropSet), sal_True);
+ ExportElement(MapSenderFieldName(xPropSet), sPresentation);
+ break;
+
+ case FIELD_ID_PLACEHOLDER:
+ // placeholder field: type, name, description
+ ProcessString(sXML_placeholder_type,
+ MapPlaceholderType(
+ GetInt16Property(sPropertyPlaceholderType, xPropSet)));
+ ProcessString(sXML_description,
+ GetStringProperty(sPropertyHint,xPropSet), sal_True);
+ ExportElement(sXML_placeholder, sPresentation);
+ break;
+
+ case FIELD_ID_VARIABLE_SET:
+ {
+ // variable set field: name, visible, format&value
+ ProcessString(sXML_name,
+ GetStringProperty(sPropertyVariableName, xPropSet));
+ ProcessDisplay(GetBoolProperty(sPropertyIsVisible, xPropSet),
+ sal_False);
+ ProcessString(sXML_formula,
+ GetStringProperty(sPropertyContent, xPropSet),
+ sPresentation);
+ ProcessValueAndType(IsStringField(nToken, xPropSet),
+ GetIntProperty(sPropertyNumberFormat, xPropSet),
+ GetStringProperty(sPropertyContent, xPropSet),
+ sPresentation,
+ GetDoubleProperty(sPropertyValue, xPropSet),
+ sal_True, sal_True, sal_True);
+ ExportElement(sXML_variable_set, sPresentation);
+ break;
+ }
+ case FIELD_ID_VARIABLE_GET:
+ {
+ // variable get field: name, format&value
+ ProcessString(sXML_name,
+ GetStringProperty(sPropertyContent, xPropSet));
+ sal_Bool bCmd = GetBoolProperty(sPropertyIsShowFormula, xPropSet);
+ ProcessDisplay(sal_True, bCmd);
+ // show style, unless name will be shown
+ ProcessValueAndType(IsStringField(nToken, xPropSet),
+ GetIntProperty(sPropertyNumberFormat, xPropSet),
+ sEmpty, sEmpty, 0.0, // values not used
+ sal_False, !bCmd, !bCmd);
+ ExportElement(sXML_variable_get, sPresentation);
+ break;
+ }
+ case FIELD_ID_VARIABLE_INPUT:
+ // variable input field: name, description, format&value
+ ProcessString(sXML_name,
+ GetStringProperty(sPropertyVariableName, xPropSet));
+ ProcessString(sXML_description,
+ GetStringProperty(sPropertyHint , xPropSet));
+ ProcessDisplay(GetBoolProperty(sPropertyIsVisible, xPropSet),
+ sal_False);
+ ProcessString(sXML_formula,
+ GetStringProperty(sPropertyContent, xPropSet),
+ sPresentation);
+ ProcessValueAndType(IsStringField(nToken, xPropSet),
+ GetIntProperty(sPropertyNumberFormat, xPropSet),
+ GetStringProperty(sPropertyContent, xPropSet),
+ sPresentation,
+ GetDoubleProperty(sPropertyValue, xPropSet),
+ sal_True, sal_True, sal_True);
+ ExportElement(sXML_variable_input, sPresentation);
+ break;
+
+ case FIELD_ID_USER_GET:
+ // user field: name, hidden, style
+ {
+ sal_Bool bCmd = GetBoolProperty(sPropertyIsShowFormula, xPropSet);
+ ProcessDisplay(GetBoolProperty(sPropertyIsVisible, xPropSet),
+ bCmd);
+ ProcessValueAndType(IsStringField(nToken, xPropSet),
+ GetIntProperty(sPropertyNumberFormat, xPropSet),
+ sEmpty, sEmpty, 0.0, // values not used
+ sal_False, sal_False, !bCmd);
+
+ // name from FieldMaster
+ ProcessString(sXML_name,
+ GetStringProperty(sPropertyName,
+ GetMasterPropertySet(rTextField)));
+ ExportElement(sXML_user_field_get, sPresentation);
+ break;
+ }
+
+ case FIELD_ID_USER_INPUT:
+ // user input field: name (from FieldMaster), description
+// ProcessString(sXML_name,
+// GetStringProperty(sPropertyName,
+// GetMasterPropertySet(rTextField)));
+ ProcessString(sXML_name,
+ GetStringProperty(sPropertyContent, xPropSet));
+ ProcessString(sXML_description,
+ GetStringProperty(sPropertyHint, xPropSet));
+ ExportElement(sXML_user_field_input, sPresentation);
+ break;
+
+ case FIELD_ID_SEQUENCE:
+ // sequence field: name, formula, seq-format
+ ProcessString(sXML_name,
+ GetStringProperty(sPropertyVariableName, xPropSet));
+ ProcessString(sXML_formula,
+ GetStringProperty(sPropertyContent, xPropSet),
+ sPresentation);
+ ProcessNumberingType(GetInt16Property(
+ sPropertyNumberingType, xPropSet));
+ ExportElement(sXML_sequence, sPresentation);
+ break;
+
+ case FIELD_ID_EXPRESSION:
+ {
+ // formula field: formula, format&value
+ sal_Bool bCmd = GetBoolProperty(sPropertyIsShowFormula, xPropSet);
+ ProcessString(sXML_formula,
+ GetStringProperty(sPropertyContent, xPropSet),
+ sPresentation);
+ ProcessDisplay(sal_True, bCmd);
+ ProcessValueAndType(IsStringField(nToken, xPropSet),
+ GetIntProperty(sPropertyNumberFormat, xPropSet),
+ GetStringProperty(sPropertyContent, xPropSet),
+ sPresentation,
+ GetDoubleProperty(sPropertyValue, xPropSet),
+ !bCmd, !bCmd, !bCmd);
+ ExportElement(sXML_expression, sPresentation);
+ break;
+ }
+
+ case FIELD_ID_TEXT_INPUT:
+ // text input field: description and string-value
+ ProcessString(sXML_description,
+ GetStringProperty(sPropertyHint, xPropSet));
+ ExportElement(sXML_text_input, sPresentation);
+ break;
+
+ case FIELD_ID_TIME:
+ ProcessDateTime(sXML_time_value,
+ GetDoubleProperty(sPropertyDateTimeValue, xPropSet),
+ sal_False, sal_False);
+ ProcessBoolean(sXML_fixed,
+ GetBoolProperty(sPropertyIsFixed, xPropSet), sal_False);
+ ProcessValueAndType(sal_False,
+ GetIntProperty(sPropertyNumberFormat, xPropSet),
+ sEmpty, sEmpty, 0.0, // not used
+ sal_False, sal_False, sal_True);
+ // adjust value given as integer in minutes
+ ProcessDateTime(sXML_time_adjust,
+ GetIntProperty(sPropertyAdjust, xPropSet),
+ sal_False, sal_True, sal_True);
+ ExportElement(sXML_time, sPresentation);
+ break;
+
+ case FIELD_ID_DATE:
+ ProcessDateTime(sXML_date_value,
+ GetDoubleProperty(sPropertyDateTimeValue, xPropSet),
+ sal_True, sal_False);
+ ProcessBoolean(sXML_fixed,
+ GetBoolProperty(sPropertyIsFixed, xPropSet), sal_False);
+ ProcessValueAndType(sal_False,
+ GetIntProperty(sPropertyNumberFormat, xPropSet),
+ sEmpty, sEmpty, 0.0, // not used
+ sal_False, sal_False, sal_True);
+ // adjust value given as number of days
+ ProcessDateTime(sXML_date_adjust,
+ GetIntProperty(sPropertyAdjust, xPropSet),
+ sal_True, sal_True, sal_True);
+ ExportElement(sXML_date, sPresentation);
+ break;
+
+ case FIELD_ID_PAGENUMBER:
+ {
+ ProcessNumberingType(GetInt16Property(sPropertyNumberingType,
+ xPropSet));
+ sal_Int32 nAdjust = GetIntProperty(sPropertyOffset, xPropSet);
+ ProcessString(sXML_select_page, MapPageNumberName(xPropSet, nAdjust));
+ ProcessInteger(sXML_page_adjust, nAdjust, 0);
+ ExportElement(sXML_page_number, sPresentation);
+ break;
+ }
+
+ case FIELD_ID_PAGESTRING:
+ {
+ ProcessString(sXML_string_value,
+ GetStringProperty(sPropertyUserText, xPropSet),
+ sPresentation);
+ sal_Int32 nDummy = 0; // MapPageNumberName need int
+ ProcessString(sXML_select_page, MapPageNumberName(xPropSet, nDummy));
+ ExportElement(sXML_page_continuation_string, sPresentation);
+ break;
+ }
+
+ case FIELD_ID_DATABASE_NAME:
+ ProcessString(sXML_database_name,
+ GetStringProperty(sPropertyDataBaseName, xPropSet));
+ ProcessString(sXML_table_name,
+ GetStringProperty(sPropertyDataTableName, xPropSet));
+ ExportElement(sXML_database_name, sPresentation);
+ break;
+
+ case FIELD_ID_DATABASE_NUMBER:
+ ProcessString(sXML_database_name,
+ GetStringProperty(sPropertyDataBaseName, xPropSet));
+ ProcessString(sXML_table_name,
+ GetStringProperty(sPropertyDataTableName, xPropSet));
+ ProcessNumberingType(
+ GetInt16Property(sPropertyNumberingType,xPropSet));
+ ProcessInteger(sXML_value,
+ GetIntProperty(sPropertySetNumber, xPropSet));
+ ExportElement(sXML_database_row_number, sPresentation);
+ break;
+
+ case FIELD_ID_DATABASE_NEXT:
+ ProcessString(sXML_database_name,
+ GetStringProperty(sPropertyDataBaseName, xPropSet));
+ ProcessString(sXML_table_name,
+ GetStringProperty(sPropertyDataTableName, xPropSet));
+ ProcessString(sXML_condition,
+ GetStringProperty(sPropertyCondition, xPropSet));
+ ExportElement(sXML_database_next);
+ break;
+
+ case FIELD_ID_DATABASE_SELECT:
+ ProcessString(sXML_database_name,
+ GetStringProperty(sPropertyDataBaseName, xPropSet));
+ ProcessString(sXML_table_name,
+ GetStringProperty(sPropertyDataTableName, xPropSet));
+ ProcessString(sXML_condition,
+ GetStringProperty(sPropertyCondition, xPropSet));
+ ProcessInteger(sXML_row_number,
+ GetIntProperty(sPropertySetNumber, xPropSet));
+ ExportElement(sXML_database_select);
+ break;
+
+ case FIELD_ID_DATABASE_DISPLAY:
+ {
+ // get database, table and column name from field master
+ Reference<XPropertySet> & xMaster = GetMasterPropertySet(rTextField);
+ ProcessString(sXML_database_name,
+ GetStringProperty(sPropertyDataBaseName, xMaster));
+ ProcessString(sXML_table_name,
+ GetStringProperty(sPropertyDataTableName, xMaster));
+ ProcessString(sXML_column_name,
+ GetStringProperty(sPropertyDataColumnName, xMaster));
+ // export number format if available (happens only for numbers!)
+ if (!GetBoolProperty(sPropertyIsDataBaseFormat, xPropSet))
+ {
+ ProcessValueAndType(sal_False, // doesn't happen for text
+ GetIntProperty(sPropertyNumberFormat,xPropSet),
+ sEmpty, sEmpty, 0.0, // not used
+ sal_False, sal_False, sal_True);
+ }
+ ExportElement(sXML_database_display, sPresentation);
+ break;
+ }
+
+ case FIELD_ID_DOCINFO_REVISION:
+ ProcessBoolean(sXML_fixed,
+ GetBoolProperty(sPropertyIsFixed, xPropSet), sal_False);
+ ExportElement(MapDocInfoFieldName(nToken), sPresentation);
+ break;
+
+ case FIELD_ID_DOCINFO_EDIT_DURATION:
+ case FIELD_ID_DOCINFO_SAVE_TIME:
+ case FIELD_ID_DOCINFO_CREATION_TIME:
+ case FIELD_ID_DOCINFO_PRINT_TIME:
+ case FIELD_ID_DOCINFO_SAVE_DATE:
+ case FIELD_ID_DOCINFO_CREATION_DATE:
+ case FIELD_ID_DOCINFO_PRINT_DATE:
+ ProcessValueAndType(sal_False,
+ GetIntProperty(sPropertyNumberFormat, xPropSet),
+ sEmpty, sEmpty, 0.0,
+ sal_False, sal_False, sal_True);
+ // todo: export date/time value, but values not available -> core bug
+ ProcessBoolean(sXML_fixed,
+ GetBoolProperty(sPropertyIsFixed, xPropSet), sal_False);
+ ExportElement(MapDocInfoFieldName(nToken), sPresentation);
+ break;
+
+ case FIELD_ID_DOCINFO_CREATION_AUTHOR:
+ case FIELD_ID_DOCINFO_DESCRIPTION:
+ case FIELD_ID_DOCINFO_PRINT_AUTHOR:
+ case FIELD_ID_DOCINFO_TITLE:
+ case FIELD_ID_DOCINFO_SUBJECT:
+ case FIELD_ID_DOCINFO_KEYWORDS:
+ case FIELD_ID_DOCINFO_SAVE_AUTHOR:
+ ProcessBoolean(sXML_fixed,
+ GetBoolProperty(sPropertyIsFixed, xPropSet), sal_False);
+ ExportElement(MapDocInfoFieldName(nToken), sPresentation);
+ break;
+
+ case FIELD_ID_DOCINFO_INFORMATION0:
+ case FIELD_ID_DOCINFO_INFORMATION1:
+ case FIELD_ID_DOCINFO_INFORMATION2:
+ case FIELD_ID_DOCINFO_INFORMATION3:
+ {
+ Reference<XDocumentInfoSupplier> xDocInfoSupplier(
+ GetExport().GetModel(), UNO_QUERY);
+ Reference<XDocumentInfo> xDocInfo =xDocInfoSupplier->getDocumentInfo();
+ Any aAny;
+ ProcessString(sXML_name,
+ xDocInfo->getUserFieldName(nToken -
+ FIELD_ID_DOCINFO_INFORMATION0));
+ ProcessBoolean(sXML_fixed,
+ GetBoolProperty(sPropertyIsFixed, xPropSet), sal_False);
+ ExportElement(sXML_user_defined, sPresentation);
+ break;
+ }
+
+ case FIELD_ID_COUNT_PAGES:
+ case FIELD_ID_COUNT_PARAGRAPHS:
+ case FIELD_ID_COUNT_WORDS:
+ case FIELD_ID_COUNT_CHARACTERS:
+ case FIELD_ID_COUNT_TABLES:
+ case FIELD_ID_COUNT_GRAPHICS:
+ case FIELD_ID_COUNT_OBJECTS:
+ ProcessNumberingType(GetInt16Property(sPropertyNumberingType,
+ xPropSet));
+ ExportElement(MapCountFieldName(nToken), sPresentation);
+ break;
+
+ case FIELD_ID_CONDITIONAL_TEXT:
+ ProcessString(sXML_condition,
+ GetStringProperty(sPropertyCondition, xPropSet));
+ ProcessString(sXML_string_value_if_true,
+ GetStringProperty(sPropertyTrueContent, xPropSet));
+ ProcessString(sXML_string_value_if_false,
+ GetStringProperty(sPropertyFalseContent, xPropSet));
+ ExportElement(sXML_conditional_text, sPresentation);
+ break;
+
+ case FIELD_ID_HIDDEN_TEXT:
+ ProcessString(sXML_condition,
+ GetStringProperty(sPropertyCondition, xPropSet));
+ ProcessString(sXML_string_value,
+ GetStringProperty(sPropertyTrueContent, xPropSet));
+ ExportElement(sXML_hidden_text, sPresentation);
+ break;
+
+ case FIELD_ID_HIDDEN_PARAGRAPH:
+ ProcessString(sXML_condition,
+ GetStringProperty(sPropertyCondition, xPropSet));
+ ExportElement(sXML_hidden_paragraph);
+ break;
+
+ case FIELD_ID_TEMPLATE_NAME:
+ ProcessString(sXML_display,
+ MapTemplateDisplayFormat(
+ GetInt16Property(sPropertyFileFormat, xPropSet)));
+ ExportElement(sXML_template_name, sPresentation);
+ break;
+
+ case FIELD_ID_CHAPTER:
+ ProcessString(sXML_display,
+ MapChapterDisplayFormat(
+ GetInt16Property(sPropertyChapterFormat, xPropSet)));
+ // API numbers 0..9, we number 1..10
+ ProcessInteger(sXML_outline_level,
+ GetInt8Property(sPropertyLevel, xPropSet) + 1);
+ ExportElement(sXML_chapter, sPresentation);
+ break;
+
+ case FIELD_ID_FILE_NAME:
+ ProcessString(sXML_display,
+ MapFilenameDisplayFormat(
+ GetInt16Property(sPropertyFileFormat, xPropSet)));
+ ProcessBoolean(sXML_fixed,
+ GetBoolProperty(sPropertyIsFixed, xPropSet), sal_False);
+ ExportElement(sXML_file_name, sPresentation);
+ break;
+
+ case FIELD_ID_REFPAGE_SET:
+ ProcessBoolean(sXML_active,
+ GetBoolProperty(sPropertyOn, xPropSet), sal_True);
+ ProcessInteger(sXML_page_adjust,
+ GetInt16Property(sPropertyOffset, xPropSet), 0);
+ ExportElement(sXML_page_variable_set);
+ break;
+
+ case FIELD_ID_REFPAGE_GET:
+ ProcessNumberingType(
+ GetInt16Property(sPropertyNumberingType, xPropSet));
+ ExportElement(sXML_page_variable_get, sPresentation);
+ break;
+
+ case FIELD_ID_MACRO:
+ ProcessString(sXML_name, GetStringProperty(sPropertyMacro, xPropSet));
+ ProcessString(sXML_description,
+ GetStringProperty(sPropertyHint, xPropSet),
+ sPresentation);
+ ExportElement(sXML_execute_macro, sPresentation);
+ break;
+
+ case FIELD_ID_REF_REFERENCE:
+ case FIELD_ID_REF_SEQUENCE:
+ case FIELD_ID_REF_BOOKMARK:
+ case FIELD_ID_REF_FOOTNOTE:
+ case FIELD_ID_REF_ENDNOTE:
+ ProcessString(sXML_reference_type,
+ MapReferenceType(GetInt16Property(
+ sPropertyReferenceFieldPart, xPropSet)),
+ sXML_template);
+ if ( (FIELD_ID_REF_FOOTNOTE == nToken) ||
+ (FIELD_ID_REF_ENDNOTE == nToken) )
+ {
+ OUStringBuffer aBuf;
+ aBuf.appendAscii("ftn");
+ aBuf.append(GetIntProperty(sPropertySequenceNumber, xPropSet));
+ ProcessString(sXML_name,
+ aBuf.makeStringAndClear());
+ }
+ else
+ {
+ // bookmark, reference, sequence: get name
+ ProcessString(sXML_name,
+ GetStringProperty(sPropertySourceName, xPropSet));
+ }
+ ExportElement(
+ MapReferenceSource(GetInt16Property(
+ sPropertyReferenceFieldSource, xPropSet)),
+ sPresentation);
+ break;
+
+ case FIELD_ID_DDE:
+ // name from parent
+ ProcessString(sXML_name,
+ GetStringProperty(sPropertyName,
+ GetMasterPropertySet(rTextField)));
+ ExportElement(sXML_dde_connection, sPresentation);
+ break;
+
+ case FIELD_ID_UNKNOWN:
+ default:
+ // #77364#: no assert, unless all fields are implemented
+ // DBG_ERROR("unkown field type encountered!");
+ // always export content
+ GetExport().GetDocHandler()->characters(sPresentation);
+ }
+}
+
+/// export field declarations / field masters
+void XMLTextFieldExport::ExportFieldDeclarations()
+{
+ // store lists for decl elements
+ vector<OUString> aVarName;
+ vector<OUString> aUserName;
+ vector<OUString> aSeqName;
+ vector<OUString> aDdeName;
+
+ // get text fields supplier
+ Reference<XTextFieldsSupplier> xTextFieldsSupp(GetExport().GetModel(),
+ UNO_QUERY);
+
+ // iterate over field masters
+ Reference<container::XNameAccess> xFieldMasterNameAccess(
+ xTextFieldsSupp->getTextFieldMasters(), UNO_QUERY);
+ Sequence<OUString> fieldMasters =
+ xFieldMasterNameAccess->getElementNames();
+ for(sal_Int32 i=0; i<fieldMasters.getLength(); i++) {
+
+ // get field master name
+ OUString sFieldMaster = fieldMasters[i];
+
+ // workaround for #no-bug#
+ static const sal_Char sDB[] =
+ "com.sun.star.text.FieldMaster.DataBase.";
+ if (0 == sFieldMaster.compareTo( OUString::createFromAscii(sDB),
+ sizeof(sDB)-1))
+ {
+ break;
+ }
+
+
+ OUString sFieldMasterType;
+ OUString sVarName;
+ ExplodeFieldMasterName(sFieldMaster, sFieldMasterType, sVarName);
+
+ // get XPropertySet of this field master
+ Reference<XPropertySet> xPropSet;
+ Any aAny = xFieldMasterNameAccess->getByName(sFieldMaster);
+ aAny >>= xPropSet;
+
+ // save interesting field masters
+ if (0 == sFieldMasterType.compareToAscii(FIELD_SERVICE_SETEXP))
+ {
+ sal_Int32 nType = GetIntProperty(sPropertySubType, xPropSet);
+
+ // sequence or variable?
+ if ( SetVariableType::SEQUENCE == nType )
+ {
+ aSeqName.push_back( sFieldMaster );
+ }
+ else
+ {
+ aVarName.push_back( sFieldMaster );
+ }
+ }
+ else if (0 == sFieldMasterType.compareToAscii(FIELD_SERVICE_USER))
+ {
+ aUserName.push_back( sFieldMaster );
+ }
+ else if (0 == sFieldMasterType.compareToAscii(FIELD_SERVICE_DDE))
+ {
+ aDdeName.push_back( sFieldMaster );
+ }
+ else
+ {
+ ; // ignore
+ }
+ }
+
+ // now process fields:
+
+ // variable field masters:
+ if (aVarName.size() > 0)
+ {
+ SvXMLElementExport aElem( GetExport(),
+ XML_NAMESPACE_TEXT,
+ sXML_variable_decls,
+ sal_True, sal_True );
+
+ for (vector<OUString>::iterator aVarIter = aVarName.begin();
+ aVarIter != aVarName.end();
+ aVarIter++) {
+
+ OUString sName = *aVarIter;
+
+ // get field master property set
+ Reference<XPropertySet> xPropSet;
+ Any aAny = xFieldMasterNameAccess->getByName(sName);
+ aAny >>= xPropSet;
+
+ // field name and type
+ OUString sFieldMasterType;
+ OUString sVarName;
+ ExplodeFieldMasterName(sName, sFieldMasterType, sVarName);
+
+ // determine string/numeric field
+ sal_Bool bIsString = ( GetIntProperty(sPropertySubType, xPropSet)
+ == SetVariableType::STRING );
+
+ // get dependent field property set
+ Reference<XPropertySet> xFieldPropSet;
+ if (GetDependentFieldPropertySet(xPropSet, xFieldPropSet))
+ {
+ // process value and type.
+ ProcessValueAndType(
+ bIsString,
+ GetIntProperty(sPropertyNumberFormat, xFieldPropSet),
+ sEmpty, sEmpty, 0.0,
+ sal_False, sal_True, sal_False);
+ }
+ else
+ {
+ // If no dependent field is found, only string and
+ // float types can be supported
+
+ // number format: 0 is default number format for 1st
+ // language. should be: getDefaultNumberFormat(Locale)
+ // from NumberFormats
+ ProcessValueAndType(
+ bIsString,
+ 0, sEmpty, sEmpty, 0.0,
+ sal_False, sal_True, sal_False);
+ }
+
+ ProcessString(sXML_name, sVarName);
+ ExportElement(sXML_variable_decl, sal_True);
+ }
+ }
+ // else: no declarations element
+
+ // sequence field masters:
+ if (aSeqName.size() > 0)
+ {
+ SvXMLElementExport aElem( GetExport(),
+ XML_NAMESPACE_TEXT,
+ sXML_sequence_decls,
+ sal_True, sal_True );
+
+ for (vector<OUString>::iterator aSeqIter = aSeqName.begin();
+ aSeqIter != aSeqName.end();
+ aSeqIter++) {
+
+ OUString sName = *aSeqIter;
+
+ // get field master property set
+ Reference<XPropertySet> xPropSet;
+ Any aAny = xFieldMasterNameAccess->getByName(sName);
+ aAny >>= xPropSet;
+
+ // field name and type
+ OUString sFieldMasterType;
+ OUString sVarName;
+ ExplodeFieldMasterName(sName, sFieldMasterType, sVarName);
+
+ // outline level
+ sal_Int32 nLevel = 1 + GetIntProperty(
+ sPropertyChapterNumberingLevel, xPropSet);
+ DBG_ASSERT(nLevel >= 0, "illegal outline level");
+ DBG_ASSERT(nLevel < 127, "possible illegal outline level");
+ ProcessInteger(sXML_display_outline_level, nLevel);
+
+ // separation character
+ if (nLevel > 0) {
+ ProcessString(sXML_separation_character, GetStringProperty(
+ sPropertyNumberingSeparator, xPropSet));
+ }
+ ProcessString(sXML_name, sVarName);
+ ExportElement(sXML_sequence_decl, sal_True);
+ }
+ }
+ // else: no declarations element
+
+ // user field field masters:
+ if (aUserName.size() > 0)
+ {
+ SvXMLElementExport aElem( GetExport(),
+ XML_NAMESPACE_TEXT,
+ sXML_user_field_decls,
+ sal_True, sal_True );
+
+ for (vector<OUString>::iterator aUserIter = aUserName.begin();
+ aUserIter != aUserName.end();
+ aUserIter++) {
+
+ OUString sName = *aUserIter;
+
+ // get field master property set
+ Reference<XPropertySet> xPropSet;
+ Any aAny = xFieldMasterNameAccess->getByName(sName);
+ aAny >>= xPropSet;
+
+ // field name and type
+ OUString sFieldMasterType;
+ OUString sVarName;
+ ExplodeFieldMasterName(sName, sFieldMasterType, sVarName);
+
+ if (GetBoolProperty(sPropertyIsExpression, xPropSet))
+ {
+ // expression:
+ ProcessValueAndType(
+ sal_False,
+ 0, sEmpty, sEmpty,
+ GetDoubleProperty(sPropertyValue, xPropSet),
+ sal_True,
+ sal_True,
+ sal_False);
+ }
+ else
+ {
+ // string: write regardless of default
+ ProcessString(sXML_value_type, sXML_string);
+ ProcessString(sXML_string_value,
+ GetStringProperty(sPropertyContent, xPropSet));
+ }
+ ProcessString(sXML_name, sVarName);
+ ExportElement(sXML_user_field_decl, sal_True);
+ }
+ }
+ // else: no declarations element
+
+ // DDE field field masters:
+ if (aDdeName.size() > 0)
+ {
+ SvXMLElementExport aElem( GetExport(),
+ XML_NAMESPACE_TEXT,
+ sXML_dde_connection_decls,
+ sal_True, sal_True );
+
+ for (vector<OUString>::iterator aDdeIter = aDdeName.begin();
+ aDdeIter != aDdeName.end();
+ aDdeIter++)
+ {
+ OUString sName = *aDdeIter;
+
+ // get field master property set
+ Reference<XPropertySet> xPropSet;
+ Any aAny = xFieldMasterNameAccess->getByName(sName);
+ aAny >>= xPropSet;
+
+ // export element
+ ProcessString(sXML_name,
+ GetStringProperty(sPropertyName, xPropSet));
+ ProcessString(sXML_dde_target,
+ GetStringProperty(sPropertyDDECommandType, xPropSet));
+ ProcessString(sXML_dde_file,
+ GetStringProperty(sPropertyDDECommandFile, xPropSet));
+ ProcessString(sXML_dde_command,
+ GetStringProperty(sPropertyDDECommandElement, xPropSet));
+ ProcessBoolean(sXML_automatic_update,
+ GetBoolProperty(sPropertyIsAutomaticUpdate, xPropSet),
+ sal_False);
+
+ ExportElement(sXML_dde_connection_decl, sal_True);
+ }
+ }
+ // else: no declarations element
+}
+
+void XMLTextFieldExport::ExportElement(const sal_Char* pElementName,
+ sal_Bool bAddSpace)
+{
+ // can't call ExportElement(sal_Char*, const OUString&) with empty
+ // string because xmlprinter only uses empty tags if no content
+ // (not even empty content) was written.
+
+ DBG_ASSERT(NULL != pElementName, "invalid element name!");
+ if (NULL != pElementName)
+ {
+ // Element
+ SvXMLElementExport aElem( GetExport(),
+ XML_NAMESPACE_TEXT,
+ pElementName,
+ bAddSpace, bAddSpace );
+ } // else: ignore
+}
+
+void XMLTextFieldExport::ExportElement(const sal_Char* pElementName,
+ const OUString& sContent,
+ sal_Bool bAddSpace)
+{
+ DBG_ASSERT(NULL != pElementName, "invalid element name!");
+ if (NULL != pElementName)
+ {
+ // Element
+ SvXMLElementExport aElem( GetExport(),
+ XML_NAMESPACE_TEXT,
+ pElementName,
+ bAddSpace, bAddSpace );
+ // export content
+ GetExport().GetDocHandler()->characters(sContent);
+ } else {
+ // always export content
+ GetExport().GetDocHandler()->characters(sContent);
+ }
+}
+
+/// export all data-style related attributes
+void XMLTextFieldExport::ProcessValueAndType(
+ sal_Bool bIsString, /// do we process a string or a number?
+ sal_Int32 nFormatKey, /// format key for NumberFormatter; inv. if string
+ const OUString& sContent, /// string content; possibly invalid
+ const OUString& sDefault, /// default string
+ double fValue, /// float content; possibly invalid
+ sal_Bool bExportValue, /// export value attribute?
+ sal_Bool bExportValueType, /// export value-type attribute?
+ sal_Bool bExportStyle) /// export style-sttribute?
+{
+ // String or number?
+ if (bIsString)
+ {
+
+ // string: attributes value-type=string, string-value=...
+
+ if (bExportValue || bExportValueType)
+ {
+ XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(
+ GetExport(), sContent, sDefault, XML_NAMESPACE_TEXT,
+ bExportValue);
+ }
+
+ }
+ else
+ {
+
+ // number: value-type=..., value...=..., data-style-name=...
+
+ DBG_ASSERT(bExportValueType || ~bExportValue,
+ "value w/o value type not supported!");
+
+ // take care of illegal formats
+ // (shouldn't happen, but does if document is corrupted)
+ if (-1 != nFormatKey)
+ {
+ if (bExportValue || bExportValueType)
+ {
+ XMLNumberFormatAttributesExportHelper::
+ SetNumberFormatAttributes(
+ GetExport(), nFormatKey, fValue, XML_NAMESPACE_TEXT,
+ bExportValue);
+ }
+
+ if (bExportStyle)
+ {
+ GetExport().AddAttribute(XML_NAMESPACE_STYLE,
+ sXML_data_style_name,
+ GetExport().getDataStyleName(
+ nFormatKey));
+ } // else: ignore (no number format)
+ }
+ }
+}
+
+
+
+/// process display related properties
+void XMLTextFieldExport::ProcessDisplay(sal_Bool bIsVisible,
+ sal_Bool bIsCommand,
+ sal_Bool bValueDefault)
+{
+ sal_Char* pValue;
+
+ if (bIsVisible)
+ {
+ pValue = bIsCommand ? sXML_formula : sXML_value;
+ }
+ else
+ {
+ pValue = sXML_none;
+ }
+
+ // omit attribute if default
+ if (!bValueDefault || (pValue != sXML_value))
+ {
+ GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT,
+ sXML_display,
+ pValue);
+ }
+}
+
+
+
+/// export boolean property
+void XMLTextFieldExport::ProcessBoolean(const sal_Char* pXmlName,
+ sal_Bool bBool, sal_Bool bDefault)
+{
+ DBG_ASSERT(NULL!=pXmlName, "invalid element name");
+ if (NULL == pXmlName) {
+ return;
+ }
+
+ // write attribute (if different than default)
+ if (bBool != bDefault) {
+ GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT,
+ pXmlName,
+ (bBool ? sXML_true : sXML_false) );
+ }
+}
+
+
+
+
+/// export string attribute
+void XMLTextFieldExport::ProcessString(const sal_Char* pXmlName,
+ const OUString& sValue,
+ sal_Bool bOmitEmpty)
+{
+ DBG_ASSERT(NULL!=pXmlName, "invalid element name");
+ if (NULL == pXmlName) {
+ return;
+ }
+
+ // check for empty string, if applicable
+ if (bOmitEmpty && (sValue.getLength()==0)) {
+ return;
+ }
+
+ // write attribute
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, pXmlName, sValue);
+}
+
+/// export a string attribute
+void XMLTextFieldExport::ProcessString(const sal_Char* pXmlName,
+ const ::rtl::OUString& sValue,
+ const ::rtl::OUString& sDefault)
+{
+ if (sValue != sDefault)
+ {
+ ProcessString(pXmlName, sValue);
+ }
+}
+
+
+/// export string attribute
+void XMLTextFieldExport::ProcessString(
+ const sal_Char* pXmlName,
+ const sal_Char* pValue,
+ sal_Bool bOmitEmpty)
+{
+ DBG_ASSERT(NULL != pXmlName, "invalid element name");
+ DBG_ASSERT(NULL != pValue, "invalid value name");
+ if ((NULL == pXmlName) || (NULL == pValue)) {
+ return;
+ }
+
+ // check for empty string, if applicable
+ if (bOmitEmpty && (0 == pValue[0])) {
+ return;
+ }
+
+ GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT, pXmlName, pValue);
+}
+
+/// export a string attribute
+void XMLTextFieldExport::ProcessString(
+ const sal_Char* pXmlName,
+ const sal_Char* pValue,
+ const sal_Char* pDefault)
+{
+ // save comparisons if pointers are equals. This will happen
+ // frequently, as almost every code in here uses sXML_* constants.
+ if ((pValue != pDefault) && (0 != strcmp(pValue, pDefault)))
+ {
+ ProcessString(pXmlName, pValue);
+ }
+}
+
+
+// export an integer attribute
+void XMLTextFieldExport::ProcessInteger(const sal_Char* pXmlName,
+ sal_Int32 nNum)
+{
+ DBG_ASSERT(NULL != pXmlName, "invalid element name");
+
+ if (NULL == pXmlName) {
+ return;
+ }
+
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, pXmlName,
+ OUString::valueOf(nNum));
+}
+
+/// export an integer attribute, omit if default
+void XMLTextFieldExport::ProcessInteger(const sal_Char* pXmlName,
+ sal_Int32 nNum, sal_Int32 nDefault)
+{
+ if (nNum != nDefault)
+ {
+ ProcessInteger(pXmlName, nNum);
+ }
+}
+
+
+
+/// export a numbering type
+void XMLTextFieldExport::ProcessNumberingType(sal_Int16 nNumberingType)
+{
+ // process only if real format (not: like page descriptor)
+ if (NumberingType::PAGE_DESCRIPTOR != nNumberingType)
+ {
+ // number type: num format
+ GetExport().AddAttributeASCII(XML_NAMESPACE_STYLE,
+ sXML_num_format,
+ SvxXMLNumRuleExport::GetNumFormatValue(
+ nNumberingType));
+ // and letter sync, if applicable
+ const sal_Char* pLetterSync =
+ SvxXMLNumRuleExport::GetNumLetterSync(nNumberingType);
+
+ if (NULL != pLetterSync)
+ {
+ GetExport().AddAttributeASCII(XML_NAMESPACE_STYLE,
+ sXML_num_letter_sync,
+ pLetterSync);
+ }
+ }
+ // else: like page descriptor => ignore
+}
+
+
+/// export a date, time, or duration
+void XMLTextFieldExport::ProcessDateTime(const sal_Char* sXMLName,
+ double dValue,
+ sal_Bool bIsDate,
+ sal_Bool bIsDuration,
+ sal_Bool bOmitDurationIfZero)
+{
+ // truncate for date granularity
+ if (bIsDate)
+ {
+ dValue = SolarMath::ApproxFloor(dValue);
+ }
+
+ OUStringBuffer aBuffer;
+ if (bIsDuration)
+ {
+ // date/time durationM handle bOmitDurationIfZero
+ if (!bOmitDurationIfZero || !SolarMath::ApproxEqual(dValue, 0.0))
+ {
+ rExport.GetMM100UnitConverter().convertTime(aBuffer, dValue);
+ }
+ }
+ else
+ {
+ // date/time value
+ rExport.GetMM100UnitConverter().convertDateTime(aBuffer, dValue);
+ }
+
+ // output attribute
+ ProcessString(sXMLName, aBuffer.makeStringAndClear());
+}
+
+
+/// export a date, time, or duration
+void XMLTextFieldExport::ProcessDateTime(const sal_Char* sXMLName,
+ sal_Int32 nMinutes,
+ sal_Bool bIsDate,
+ sal_Bool bIsDuration,
+ sal_Bool bOmitDurationIfZero)
+{
+ // handle bOmitDurationIfZero here, because we can precisely compare ints
+ if (!(bIsDuration && bOmitDurationIfZero && (nMinutes==0)))
+ {
+ ProcessDateTime(sXMLName, (double)nMinutes / (double)(24*60),
+ bIsDate, bIsDuration, bOmitDurationIfZero);
+ }
+}
+
+
+// explode a field master name into field type and field name
+sal_Bool XMLTextFieldExport::ExplodeFieldMasterName(
+ const OUString& sMasterName, OUString& sFieldType, OUString& sVarName)
+{
+ sal_Int32 nLength = sFieldMasterPrefix.getLength();
+ sal_Int32 nSeparator = sMasterName.indexOf('.', nLength);
+ sal_Bool bReturn = sal_True;
+
+#ifndef PRODUCT
+ // check for service name
+ bReturn &= (0 == sFieldMasterPrefix.compareTo(sMasterName, nLength));
+#endif
+
+ // '.' found?
+ if (nSeparator <= nLength) {
+ nSeparator = sMasterName.getLength();
+ DBG_WARNING("no field var name!");
+ bReturn = sal_False;
+ }
+
+ sFieldType = sMasterName.copy(nLength, nSeparator-nLength);
+ sVarName = sMasterName.copy(nSeparator+1);
+
+ return bReturn;
+}
+
+
+// for XDependentTextFields, get PropertySet of FieldMaster
+Reference<XPropertySet> XMLTextFieldExport::GetMasterPropertySet(
+ const Reference<XTextField> & rTextField)
+{
+ // name, value => get Property set of TextFieldMaster
+ Reference<XDependentTextField> xDep(rTextField, UNO_QUERY);
+ return xDep->getTextFieldMaster();
+}
+
+// get PropertySet of (any; the first) dependent field
+sal_Bool XMLTextFieldExport::GetDependentFieldPropertySet(
+ const Reference<XPropertySet> & xMaster,
+ Reference<XPropertySet> & xField)
+{
+ Any aAny;
+ Sequence<Reference<XDependentTextField> > aFields;
+ aAny = xMaster->getPropertyValue(sPropertyDependentTextFields);
+ aAny >>= aFields;
+
+ // any fields?
+ if (aFields.getLength() > 0)
+ {
+ // get first one and return
+ Reference<XDependentTextField> xTField = aFields[0];
+ xField = Reference<XPropertySet>(xTField, UNO_QUERY);
+ DBG_ASSERT(xField.is(),
+ "Surprisinlgy, this TextField refuses to be a PropertySet!");
+ return sal_True;
+ }
+ else
+ {
+ return sal_False;
+ }
+}
+
+// // get PropertySet of (any) DependentTextField for this FieldMaster
+// Reference<XPropertySet> XMLTextFieldExport::GetDependentFieldPropertySet(
+// const OUString& sFieldMasterName,
+// const Reference<frame::XModel> & rModel)
+// {
+// // property (or method) for field master is missing
+// // according to OS, there will be an XEnumerationAccess
+// // workaround: get XEnum for all fields, and loop until proper field found
+// // TODO: all this junk is to be deleted, when proper solution is around!
+
+// // get text fields supplier
+// Reference<XTextFieldsSupplier> xTextFieldsSupp(rModel, UNO_QUERY);
+
+// // iterate over field masters
+// Reference<container::XEnumeration> xFieldEnum(
+// xTextFieldsSupp->getTextFields()->createEnumeration(), UNO_QUERY);
+
+// Any aAny;
+// Reference<XTextField> xTextField;
+// for( ; xFieldEnum->hasMoreElements();) {
+// aAny = xFieldEnum->nextElement();
+// aAny >>= xTextField;
+
+// // check, whether Textfield is dependent textfield.
+// // If so, check master!
+// Reference<XDependentTextField> xDepTextField(xTextField, UNO_QUERY);
+// if (xDepTextField.is()) {
+
+// // compare name
+// // a) get field service name
+// // b) get fieldmaster name (= var name)
+// // c) compare <a>.<b> to end of field master name
+
+// // a) (copied from GetFieldID)
+
+// // get service names for rTextField (via XServiceInfo service)
+// Reference<XServiceInfo> xService(xTextField, UNO_QUERY);
+// const Sequence<OUString> aServices =
+// xService->getSupportedServiceNames();
+// const OUString* pNames = aServices.getConstArray();
+// sal_Int32 nCount = aServices.getLength();
+
+// OUString sFieldService; // service name postfix of current field
+
+// // search for TextField service name
+// while( nCount-- ) {
+// if( 0 == pNames->compareTo(
+// sServicePrefix, sServicePrefix.getLength()))
+// {
+// // TextField found => postfix is field type!
+// sFieldService =
+// pNames->copy(sServicePrefix.getLength());
+// break;
+// }
+// ++pNames;
+// }
+
+// // b)
+// Reference<XPropertySet> xMasterPropSet(
+// xDepTextField->getTextFieldMaster(), UNO_QUERY);
+// if (! xMasterPropSet.is()) {
+// break;
+// }
+// OUString sVarName = GetStringProperty(sPropertyName,
+// xMasterPropSet);
+
+// // c)
+// OUString sName = sFieldMasterPrefix;
+// OUString sDot = OUString(RTL_CONSTASCII_USTRINGPARAM("."));
+// sName += sFieldService;
+// sName += sDot;
+// sName += sVarName;
+
+// if (0 == sFieldMasterName.compareTo(sName)) {
+// Reference<XPropertySet> xPropSet(xTextField, UNO_QUERY);
+// return xPropSet;
+// }
+// }
+// }
+
+// Reference<XPropertySet> xPropSet;
+// return xPropSet;
+// }
+
+
+
+/// map placeholder type
+const sal_Char* XMLTextFieldExport::MapPlaceholderType(sal_uInt16 nType)
+{
+ sal_Char* pTypeString = sXML_text;
+
+ switch (nType) {
+ case PlaceholderType::TEXT:
+ pTypeString = sXML_text;
+ break;
+
+ case PlaceholderType::TABLE:
+ pTypeString = sXML_table;
+ break;
+
+ case PlaceholderType::TEXTFRAME:
+ pTypeString = sXML_text_box;
+ break;
+
+ case PlaceholderType::GRAPHIC:
+ pTypeString = sXML_image;
+ break;
+
+ case PlaceholderType::OBJECT:
+ pTypeString = sXML_object;
+ break;
+
+ default:
+ // unkown placeholder: sXML_text
+ DBG_ERROR("unkown placeholder type");
+ }
+
+ return pTypeString;
+}
+
+
+/// element name for author fields
+const sal_Char* XMLTextFieldExport::MapAuthorFieldName(
+ const Reference<XPropertySet> & xPropSet)
+{
+ // Initalen oder voller Name?
+ return GetBoolProperty(sPropertyAuthorFullname, xPropSet)
+ ? sXML_author_name : sXML_author_initials;
+}
+
+const sal_Char* XMLTextFieldExport::MapPageNumberName(
+ const Reference<XPropertySet> & xPropSet,
+ sal_Int32& nOffset)
+{
+ sal_Char* pName = NULL;
+ PageNumberType ePage;
+ Any aAny = xPropSet->getPropertyValue(sPropertySubType);
+ ePage = *(PageNumberType*)aAny.getValue();
+
+ switch (ePage)
+ {
+ case PageNumberType_PREV:
+ pName = sXML_previous;
+ nOffset += 1;
+ break;
+ case PageNumberType_CURRENT:
+ pName = sXML_current;
+ break;
+ case PageNumberType_NEXT:
+ pName = sXML_next;
+ nOffset -= 1;
+ break;
+ default:
+ DBG_ERROR("unknown page number type");
+ pName = NULL;
+ break;
+ }
+
+ return pName;
+}
+
+/// map TemplateDisplayFormat to XML
+const sal_Char* XMLTextFieldExport::MapTemplateDisplayFormat(sal_Int16 nFormat)
+{
+ sal_Char* pName = NULL;
+
+ switch (nFormat)
+ {
+ case TemplateDisplayFormat::FULL:
+ pName = sXML_full;
+ break;
+ case TemplateDisplayFormat::PATH:
+ pName = sXML_path;
+ break;
+ case TemplateDisplayFormat::NAME:
+ pName = sXML_name;
+ break;
+ case TemplateDisplayFormat::NAME_AND_EXT:
+ pName = sXML_name_and_extension;
+ break;
+ case TemplateDisplayFormat::AREA:
+ pName = sXML_area;
+ break;
+ case TemplateDisplayFormat::TITLE:
+ pName = sXML_title;
+ break;
+ default:
+ DBG_ERROR("unknown template display format");
+ pName = NULL;
+ break;
+ }
+
+ return pName;
+}
+
+/// map count/statistics field token to XML name
+const sal_Char* XMLTextFieldExport::MapCountFieldName(sal_Int16 nToken)
+{
+ const sal_Char* pElementName = NULL;
+
+ switch (nToken)
+ {
+ case FIELD_ID_COUNT_PAGES:
+ pElementName = sXML_page_count;
+ break;
+ case FIELD_ID_COUNT_PARAGRAPHS:
+ pElementName = sXML_paragraph_count;
+ break;
+ case FIELD_ID_COUNT_WORDS:
+ pElementName = sXML_word_count;
+ break;
+ case FIELD_ID_COUNT_CHARACTERS:
+ pElementName = sXML_character_count;
+ break;
+ case FIELD_ID_COUNT_TABLES:
+ pElementName = sXML_table_count;
+ break;
+ case FIELD_ID_COUNT_GRAPHICS:
+ pElementName = sXML_image_count;
+ break;
+ case FIELD_ID_COUNT_OBJECTS:
+ pElementName = sXML_object_count;
+ break;
+ default:
+ DBG_ERROR("no count field token");
+ pElementName = NULL;
+ break;
+ }
+
+ return pElementName;
+}
+
+/// map ChapterDisplayFormat to XML string
+const sal_Char* XMLTextFieldExport::MapChapterDisplayFormat(sal_Int16 nFormat)
+{
+ const sal_Char* pName = NULL;
+
+ switch (nFormat)
+ {
+ case ChapterFormat::NAME:
+ pName = sXML_name;
+ break;
+ case ChapterFormat::NUMBER:
+ pName = sXML_number;
+ break;
+ case ChapterFormat::NAME_NUMBER:
+ pName = sXML_number_and_name;
+ break;
+ case ChapterFormat::NO_PREFIX_SUFFIX:
+ pName = sXML_plain_number_and_name;
+ break;
+ case ChapterFormat::DIGIT:
+ pName = sXML_plain_number;
+ break;
+ default:
+ DBG_ERROR("unkown chapter display format");
+ pName = NULL;
+ break;
+ }
+
+ return pName;
+}
+
+
+/// map FilenameDisplayFormat to XML attribute names
+const sal_Char* XMLTextFieldExport::MapFilenameDisplayFormat(sal_Int16 nFormat)
+{
+ sal_Char* pName = NULL;
+
+ switch (nFormat)
+ {
+ case FilenameDisplayFormat::FULL:
+ pName = sXML_full;
+ break;
+ case FilenameDisplayFormat::PATH:
+ pName = sXML_path;
+ break;
+ case FilenameDisplayFormat::NAME:
+ pName = sXML_name;
+ break;
+ case FilenameDisplayFormat::NAME_AND_EXT:
+ pName = sXML_name_and_extension;
+ break;
+ default:
+ DBG_ERROR("unknown filename display format");
+ }
+
+ return pName;
+}
+
+
+/// map ReferenceFieldPart to XML string
+const sal_Char* XMLTextFieldExport::MapReferenceType(sal_Int16 nType)
+{
+ sal_Char* pElementName = NULL;
+
+ switch (nType)
+ {
+ case ReferenceFieldPart::PAGE:
+ pElementName = sXML_page;
+ break;
+ case ReferenceFieldPart::CHAPTER:
+ pElementName = sXML_chapter;
+ break;
+ case ReferenceFieldPart::TEXT:
+ pElementName = sXML_text;
+ break;
+ case ReferenceFieldPart::UP_DOWN:
+ pElementName = sXML_direction;
+ break;
+ case ReferenceFieldPart::CATEGORY_AND_NUMBER:
+ pElementName = sXML_category_and_value;
+ break;
+ case ReferenceFieldPart::ONLY_CAPTION:
+ pElementName = sXML_caption;
+ break;
+ case ReferenceFieldPart::ONLY_SEQUENCE_NUMBER:
+ pElementName = sXML_value;
+ break;
+ case ReferenceFieldPart::PAGE_DESC:
+ // small hack: this value never gets written, because
+ // sXML_template is default
+ pElementName = sXML_template;
+ break;
+ default:
+ DBG_ERROR("unknown reference type");
+ pElementName = sXML_template;
+ break;
+ }
+
+ return pElementName;
+}
+
+/// map ReferenceFieldPart to XML string
+const sal_Char* XMLTextFieldExport::MapReferenceSource(sal_Int16 nType)
+{
+ sal_Char* pElementName = NULL;
+
+ switch (nType)
+ {
+ case ReferenceFieldSource::REFERENCE_MARK:
+ pElementName = sXML_reference_get;
+ break;
+ case ReferenceFieldSource::SEQUENCE_FIELD:
+ pElementName = sXML_sequence_ref;
+ break;
+ case ReferenceFieldSource::BOOKMARK:
+ pElementName = sXML_bookmark_ref;
+ break;
+ case ReferenceFieldSource::FOOTNOTE:
+ pElementName = sXML_footnote_ref;
+ break;
+ case ReferenceFieldSource::ENDNOTE:
+ pElementName = sXML_endnote_ref;
+ break;
+ default:
+ DBG_ERROR("unkown reference source");
+ break;
+ }
+
+ return pElementName;
+}
+
+
+/// element name for sender fields
+const sal_Char* XMLTextFieldExport::MapSenderFieldName(
+ const Reference<XPropertySet> & xPropSet)
+{
+ sal_Char* pElementName = NULL;
+
+ // sub-field type
+ switch (GetInt16Property(sPropertyFieldSubType, xPropSet))
+ {
+ case UserDataPart::COMPANY :
+ pElementName = sXML_sender_company;
+ break;
+ case UserDataPart::FIRSTNAME :
+ pElementName = sXML_sender_firstname;
+ break;
+ case UserDataPart::NAME :
+ pElementName = sXML_sender_lastname;
+ break;
+ case UserDataPart::SHORTCUT :
+ pElementName = sXML_sender_initials;
+ break;
+ case UserDataPart::STREET :
+ pElementName = sXML_sender_street;
+ break;
+ case UserDataPart::COUNTRY :
+ pElementName = sXML_sender_country;
+ break;
+ case UserDataPart::ZIP :
+ pElementName = sXML_sender_postal_code;
+ break;
+ case UserDataPart::CITY :
+ pElementName = sXML_sender_city;
+ break;
+ case UserDataPart::TITLE :
+ pElementName = sXML_sender_title;
+ break;
+ case UserDataPart::POSITION :
+ pElementName = sXML_sender_position;
+ break;
+ case UserDataPart::PHONE_PRIVATE :
+ pElementName = sXML_sender_phone_private;
+ break;
+ case UserDataPart::PHONE_COMPANY :
+ pElementName = sXML_sender_phone_work;
+ break;
+ case UserDataPart::FAX :
+ pElementName = sXML_sender_fax;
+ break;
+ case UserDataPart::EMAIL :
+ pElementName = sXML_sender_email;
+ break;
+ case UserDataPart::STATE :
+ pElementName = sXML_sender_state_or_province;
+ break;
+ default:
+ DBG_WARNING("unknown sender type");
+ pElementName = NULL;
+ break;
+ }
+
+ return pElementName;
+}
+
+const sal_Char* XMLTextFieldExport::MapDocInfoFieldName(
+ enum FieldIdEnum nToken)
+{
+ sal_Char* pElementName = NULL;
+
+ switch (nToken)
+ {
+ case FIELD_ID_DOCINFO_CREATION_AUTHOR:
+ pElementName = sXML_initial_creator;
+ break;
+ case FIELD_ID_DOCINFO_CREATION_DATE:
+ pElementName = sXML_creation_date;
+ break;
+ case FIELD_ID_DOCINFO_CREATION_TIME:
+ pElementName = sXML_creation_time;
+ break;
+ case FIELD_ID_DOCINFO_DESCRIPTION:
+ pElementName = sXML_description;
+ break;
+ case FIELD_ID_DOCINFO_INFORMATION0:
+ pElementName = sXML_user_info_0;
+ break;
+ case FIELD_ID_DOCINFO_INFORMATION1:
+ pElementName = sXML_user_info_1;
+ break;
+ case FIELD_ID_DOCINFO_INFORMATION2:
+ pElementName = sXML_user_info_2;
+ break;
+ case FIELD_ID_DOCINFO_INFORMATION3:
+ pElementName = sXML_user_info_3;
+ break;
+ case FIELD_ID_DOCINFO_PRINT_TIME:
+ pElementName = sXML_print_time;
+ break;
+ case FIELD_ID_DOCINFO_PRINT_DATE:
+ pElementName = sXML_print_date;
+ break;
+ case FIELD_ID_DOCINFO_PRINT_AUTHOR:
+ pElementName = sXML_printed_by;
+ break;
+ case FIELD_ID_DOCINFO_TITLE:
+ pElementName = sXML_title;
+ break;
+ case FIELD_ID_DOCINFO_SUBJECT:
+ pElementName = sXML_subject;
+ break;
+ case FIELD_ID_DOCINFO_KEYWORDS:
+ pElementName = sXML_keywords;
+ break;
+ case FIELD_ID_DOCINFO_REVISION:
+ pElementName = sXML_editing_cycles;
+ break;
+ case FIELD_ID_DOCINFO_EDIT_DURATION:
+ pElementName = sXML_editing_duration;
+ break;
+ case FIELD_ID_DOCINFO_SAVE_TIME:
+ pElementName = sXML_modification_time;
+ break;
+ case FIELD_ID_DOCINFO_SAVE_DATE:
+ pElementName = sXML_modification_date;
+ break;
+ case FIELD_ID_DOCINFO_SAVE_AUTHOR:
+ pElementName = sXML_creator;
+ break;
+ default:
+ DBG_WARNING("unknown docinfo field type!");
+ pElementName = NULL;
+ break;
+ }
+
+ return pElementName;
+}
+
+
+
+//
+// Property accessor helper functions
+//
+
+// to be relegated (does that word exist?) to a more appropriate place
+//
+
+
+inline sal_Bool const GetBoolProperty(
+ const OUString& sPropName,
+ const Reference<XPropertySet> & xPropSet)
+{
+ Any aAny = xPropSet->getPropertyValue(sPropName);
+ sal_Bool bBool = *(sal_Bool *)aAny.getValue();
+ return bBool;
+}
+
+inline Double const GetDoubleProperty(
+ const OUString& sPropName,
+ const Reference<XPropertySet> & xPropSet)
+{
+ Any aAny = xPropSet->getPropertyValue(sPropName);
+ Double fDouble;
+ aAny >>= fDouble;
+ return fDouble;
+}
+
+inline OUString const GetStringProperty(
+ const OUString& sPropName,
+ const Reference<XPropertySet> & xPropSet)
+{
+ Any aAny = xPropSet->getPropertyValue(sPropName);
+ OUString sString;
+ aAny >>= sString;
+ return sString;
+}
+
+inline sal_Int32 const GetIntProperty(
+ const OUString& sPropName,
+ const Reference<XPropertySet> & xPropSet)
+{
+ Any aAny = xPropSet->getPropertyValue(sPropName);
+ sal_Int32 nInt;
+ aAny >>= nInt;
+ return nInt;
+}
+
+inline sal_Int16 const GetInt16Property(
+ const OUString& sPropName,
+ const Reference<XPropertySet> & xPropSet)
+{
+ Any aAny = xPropSet->getPropertyValue(sPropName);
+ sal_Int16 nInt;
+ aAny >>= nInt;
+ return nInt;
+}
+
+inline sal_Int8 const GetInt8Property(
+ const OUString& sPropName,
+ const Reference<XPropertySet> & xPropSet)
+{
+ Any aAny = xPropSet->getPropertyValue(sPropName);
+ sal_Int8 nInt;
+ aAny >>= nInt;
+ return nInt;
+}
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
new file mode 100644
index 0000000000..db726502c7
--- /dev/null
+++ b/xmloff/source/text/txtfldi.cxx
@@ -0,0 +1,2844 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtfldi.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+/** @#file
+ *
+ * Import of all text fields except those from txtvfldi.cxx
+ * (variable related text fields and database display fields)
+ */
+
+#ifndef _XMLOFF_TXTFLDI_HXX
+#include "txtfldi.hxx"
+#endif
+
+#ifndef _XMLOFF_TXTVFLDI_HXX
+#include "txtvfldi.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNUMI_HXX
+#include "xmlnumi.hxx"
+#endif
+
+#ifndef _XMLOFF_TEXTIMP_HXX_
+#include "txtimp.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlement.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNUMI_HXX
+#include "xmlnumi.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_USERDATAPART_HPP_
+#include <com/sun/star/text/UserDataPart.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_NUMBERINGTYPE_HPP_
+#include <com/sun/star/style/NumberingType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_PLACEHOLDERTYPE_HPP_
+#include <com/sun/star/text/PlaceholderType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_REFERENCEFIELDPART_HPP_
+#include <com/sun/star/text/ReferenceFieldPart.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_REFERENCEFIELDSOURCE_HPP_
+#include <com/sun/star/text/ReferenceFieldSource.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELD_HPP_
+#include <com/sun/star/text/XTextField.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTCONTENT_HPP_
+#include <com/sun/star/text/XTextContent.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELDSSUPPLIER_HPP_
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XDEPENDENTTEXTFIELD_HPP_
+#include <com/sun/star/text/XDependentTextField.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_SETVARIABLETYPE_HPP_
+#include <com/sun/star/text/SetVariableType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_FILENAMEDISPLAYFORMAT_HPP_
+#include <com/sun/star/text/FilenameDisplayFormat.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_CHAPTERFORMAT_HPP_
+#include <com/sun/star/text/ChapterFormat.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_TEMPLATEDISPLAYFORMAT_HPP_
+#include <com/sun/star/text/TemplateDisplayFormat.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFOSUPPLIER_HPP_
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFO_HPP_
+#include <com/sun/star/document/XDocumentInfo.hpp>
+#endif
+
+#ifndef _RTL_USTRING
+#include <rtl/ustring>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _TOOLS_SOLMATH_HXX
+#include <tools/solmath.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::document;
+using namespace ::com::sun::star::xml::sax;
+
+
+
+//
+// SO API string constants
+//
+
+// service prefix and service anems
+const sal_Char sAPI_textfield_prefix[] = "com.sun.star.text.TextField.";
+const sal_Char sAPI_fieldmaster_prefix[] = "com.sun.star.text.FieldMaster.";
+
+const sal_Char sAPI_extended_user[] = "ExtendedUser";
+const sal_Char sAPI_user_data_type[] = "UserDataType";
+const sal_Char sAPI_jump_edit[] = "JumpEdit";
+const sal_Char sAPI_get_expression[] = "GetExpression";
+const sal_Char sAPI_set_expression[] = "SetExpression";
+const sal_Char sAPI_user[] = "User";
+const sal_Char sAPI_date_time[] = "DateTime";
+const sal_Char sAPI_page_number[] = "PageNumber";
+const sal_Char sAPI_database_next[] = "DatabaseNextSet";
+const sal_Char sAPI_database_select[] = "DatabaseNumberOfSet";
+const sal_Char sAPI_database_number[] = "DatabaseSetNumber";
+const sal_Char sAPI_database[] = "Database";
+const sal_Char sAPI_database_name[] = "DatabaseName";
+const sal_Char sAPI_docinfo_change_author[] = "DocInfo.ChangeAuthor";
+const sal_Char sAPI_docinfo_change_date_time[] = "DocInfo.ChangeDateTime";
+const sal_Char sAPI_docinfo_edit_time[] = "DocInfo.EditTime";
+const sal_Char sAPI_docinfo_description[] = "DocInfo.Description";
+const sal_Char sAPI_docinfo_create_author[] = "DocInfo.CreateAuthor";
+const sal_Char sAPI_docinfo_create_date_time[] = "DocInfo.CreateDateTime";
+const sal_Char sAPI_docinfo_info0[] = "DocInfo.Info0";
+const sal_Char sAPI_docinfo_info1[] = "DocInfo.Info1";
+const sal_Char sAPI_docinfo_info2[] = "DocInfo.Info2";
+const sal_Char sAPI_docinfo_info3[] = "DocInfo.Info3";
+const sal_Char sAPI_docinfo_print_author[] = "DocInfo.PrintAuthor";
+const sal_Char sAPI_docinfo_print_date_time[] = "DocInfo.PrintDateTime";
+const sal_Char sAPI_docinfo_keywords[] = "DocInfo.KeyWords";
+const sal_Char sAPI_docinfo_subject[] = "DocInfo.Subject";
+const sal_Char sAPI_docinfo_title[] = "DocInfo.Title";
+const sal_Char sAPI_docinfo_revision[] = "DocInfo.Revision";
+const sal_Char sAPI_hidden_paragraph[] = "HiddenParagraph";
+const sal_Char sAPI_hidden_text[] = "HiddenText";
+const sal_Char sAPI_conditional_text[] = "ConditionalText";
+const sal_Char sAPI_file_name[] = "FileName";
+const sal_Char sAPI_chapter[] = "Chapter";
+const sal_Char sAPI_template_name[] = "TemplateName";
+const sal_Char sAPI_page_count[] = "PageCount";
+const sal_Char sAPI_paragraph_count[] = "ParagraphCount";
+const sal_Char sAPI_word_count[] = "WordCount";
+const sal_Char sAPI_character_count[] = "CharacterCount";
+const sal_Char sAPI_table_count[] = "TableCount";
+const sal_Char sAPI_graphic_object_count[] = "GraphicObjectCount";
+const sal_Char sAPI_embedded_object_count[] = "EmbeddedObjectCount";
+const sal_Char sAPI_reference_page_set[] = "ReferencePageSet";
+const sal_Char sAPI_reference_page_get[] = "ReferencePageGet";
+const sal_Char sAPI_macro[] = "Macro";
+const sal_Char sAPI_dde[] = "DDE";
+const sal_Char sAPI_get_reference[] = "GetReference";
+
+// property names
+const sal_Char sAPI_is_fixed[] = "IsFixed";
+const sal_Char sAPI_content[] = "Content";
+const sal_Char sAPI_value[] = "Value";
+const sal_Char sAPI_author[] = "Author";
+const sal_Char sAPI_full_name[] = "FullName";
+const sal_Char sAPI_place_holder_type[] = "PlaceHolderType";
+const sal_Char sAPI_place_holder[] = "PlaceHolder";
+const sal_Char sAPI_hint[] = "Hint";
+const sal_Char sAPI_variable_name[] = "VariableName";
+const sal_Char sAPI_name[] = "Name";
+const sal_Char sAPI_sub_type[] = "SubType";
+const sal_Char sAPI_numbering_separator[] = "NumberingSeparator";
+const sal_Char sAPI_chapter_numbering_level[] = "ChapterNumberingLevel";
+const sal_Char sAPI_variable_subtype[] = "VariableSubtype";
+const sal_Char sAPI_formula[] = "Formula";
+const sal_Char sAPI_date_time_value[] = "DateTimeValue";
+const sal_Char sAPI_number_format[] = "NumberFormat";
+const sal_Char sAPI_user_text[] = "UserText";
+const sal_Char sAPI_numbering_type[] = "NumberingType";
+const sal_Char sAPI_offset[] = "Offset";
+const sal_Char sAPI_data_base_name[] = "DataBaseName";
+const sal_Char sAPI_data_table_name[] = "DataTableName";
+const sal_Char sAPI_condition[] = "Condition";
+const sal_Char sAPI_set_number[] = "SetNumber";
+const sal_Char sAPI_is_data_base_format[] = "DataBaseFormat";
+const sal_Char sAPI_true_content[] = "TrueContent";
+const sal_Char sAPI_false_content[] = "FalseContent";
+const sal_Char sAPI_revision[] = "Revision";
+const sal_Char sAPI_file_format[] = "FileFormat";
+const sal_Char sAPI_chapter_format[] = "ChapterFormat";
+const sal_Char sAPI_level[] = "Level";
+const sal_Char sAPI_is_date[] = "IsDate";
+const sal_Char sAPI_adjust[] = "Adjust";
+const sal_Char sAPI_on[] = "On";
+const sal_Char sAPI_dde_command[] = "DDECommand";
+const sal_Char sAPI_is_automatic_update[] = "IsAutomaticUpdate";
+const sal_Char sAPI_source_name[] = "SourceName";
+const sal_Char sAPI_current_presentation[] = "CurrentPresentation";
+const sal_Char sAPI_reference_field_part[] = "ReferenceFieldPart";
+const sal_Char sAPI_reference_field_source[] = "ReferenceFieldSource";
+
+const sal_Char sAPI_true[] = "TRUE";
+
+
+static __FAR_DATA SvXMLTokenMapEntry aTextFieldAttrTokenMap[] =
+{
+ { XML_NAMESPACE_TEXT, sXML_fixed, XML_TOK_TEXTFIELD_FIXED },
+ { XML_NAMESPACE_TEXT, sXML_description, XML_TOK_TEXTFIELD_DESCRIPTION },
+ { XML_NAMESPACE_TEXT, sXML_placeholder_type,
+ XML_TOK_TEXTFIELD_PLACEHOLDER_TYPE },
+ { XML_NAMESPACE_TEXT, sXML_name, XML_TOK_TEXTFIELD_NAME },
+ { XML_NAMESPACE_TEXT, sXML_formula, XML_TOK_TEXTFIELD_FORMULA },
+ { XML_NAMESPACE_STYLE, sXML_num_format, XML_TOK_TEXTFIELD_NUM_FORMAT },
+ { XML_NAMESPACE_STYLE, sXML_num_letter_sync,
+ XML_TOK_TEXTFIELD_NUM_LETTER_SYNC },
+ { XML_NAMESPACE_TEXT, sXML_display_formula,
+ XML_TOK_TEXTFIELD_DISPLAY_FORMULA },
+ { XML_NAMESPACE_TEXT, sXML_value_type, XML_TOK_TEXTFIELD_VALUE_TYPE },
+ { XML_NAMESPACE_TEXT, sXML_value, XML_TOK_TEXTFIELD_VALUE },
+ { XML_NAMESPACE_TEXT, sXML_string_value, XML_TOK_TEXTFIELD_STRING_VALUE },
+ { XML_NAMESPACE_TEXT, sXML_date_value, XML_TOK_TEXTFIELD_DATE_VALUE },
+ { XML_NAMESPACE_TEXT, sXML_time_value, XML_TOK_TEXTFIELD_TIME_VALUE },
+ { XML_NAMESPACE_TEXT, sXML_boolean_value, XML_TOK_TEXTFIELD_BOOL_VALUE},
+ { XML_NAMESPACE_TEXT, sXML_currency, XML_TOK_TEXTFIELD_CURRENCY},
+ { XML_NAMESPACE_STYLE, sXML_data_style_name,
+ XML_TOK_TEXTFIELD_DATA_STYLE_NAME },
+ { XML_NAMESPACE_TEXT, sXML_display_outline_level,
+ XML_TOK_TEXTFIELD_NUMBERING_LEVEL },
+ { XML_NAMESPACE_TEXT, sXML_separation_character,
+ XML_TOK_TEXTFIELD_NUMBERING_SEPARATOR },
+ { XML_NAMESPACE_TEXT, sXML_display, XML_TOK_TEXTFIELD_DISPLAY },
+ { XML_NAMESPACE_TEXT, sXML_time_adjust, XML_TOK_TEXTFIELD_TIME_ADJUST },
+ { XML_NAMESPACE_TEXT, sXML_date_adjust, XML_TOK_TEXTFIELD_DATE_ADJUST },
+ { XML_NAMESPACE_TEXT, sXML_page_adjust, XML_TOK_TEXTFIELD_PAGE_ADJUST },
+ { XML_NAMESPACE_TEXT, sXML_select_page, XML_TOK_TEXTFIELD_SELECT_PAGE },
+ { XML_NAMESPACE_TEXT, sXML_database_name, XML_TOK_TEXTFIELD_DATABASE_NAME},
+ { XML_NAMESPACE_TEXT, sXML_table_name, XML_TOK_TEXTFIELD_TABLE_NAME },
+ { XML_NAMESPACE_TEXT, sXML_column_name, XML_TOK_TEXTFIELD_COLUMN_NAME },
+ { XML_NAMESPACE_TEXT, sXML_row_number, XML_TOK_TEXTFIELD_ROW_NUMBER },
+ { XML_NAMESPACE_TEXT, sXML_condition, XML_TOK_TEXTFIELD_CONDITION },
+ { XML_NAMESPACE_TEXT, sXML_string_value_if_true,
+ XML_TOK_TEXTFIELD_STRING_VALUE_IF_TRUE },
+ { XML_NAMESPACE_TEXT, sXML_string_value_if_false,
+ XML_TOK_TEXTFIELD_STRING_VALUE_IF_FALSE },
+ { XML_NAMESPACE_TEXT, sXML_editing_cycles, XML_TOK_TEXTFIELD_REVISION },
+ { XML_NAMESPACE_TEXT, sXML_outline_level, XML_TOK_TEXTFIELD_OUTLINE_LEVEL},
+ { XML_NAMESPACE_TEXT, sXML_active, XML_TOK_TEXTFIELD_ACTIVE },
+ { XML_NAMESPACE_TEXT, sXML_reference_type,
+ XML_TOK_TEXTFIELD_REFERENCE_TYPE },
+ XML_TOKEN_MAP_END
+};
+
+const SvXMLTokenMap& XMLTextImportHelper::GetTextFieldAttrTokenMap()
+{
+ if (NULL == pTextFieldAttrTokenMap) {
+ pTextFieldAttrTokenMap = new SvXMLTokenMap(aTextFieldAttrTokenMap);
+ }
+
+ return *pTextFieldAttrTokenMap;
+
+}
+
+TYPEINIT1( XMLTextFieldImportContext, SvXMLImportContext);
+
+XMLTextFieldImportContext::XMLTextFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ const sal_Char* pService,
+ sal_uInt16 nPrefix, const OUString& rElementName)
+ : SvXMLImportContext( rImport, nPrefix, rElementName ),
+ sContentBuffer(),
+ rTextImportHelper(rHlp),
+ bValid(sal_False),
+ sServicePrefix(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_textfield_prefix))
+{
+ DBG_ASSERT(NULL != pService, "Need service name!");
+ sServiceName = OUString::createFromAscii(pService);
+}
+
+void XMLTextFieldImportContext::StartElement(
+ const Reference<XAttributeList> & xAttrList)
+{
+ // process attributes
+ sal_Int32 nLength = xAttrList->getLength();
+ for(sal_Int32 i=0; i<nLength; i++) {
+
+ OUString sLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
+ GetKeyByAttrName( xAttrList->getNameByIndex(i), &sLocalName );
+
+ ProcessAttribute(rTextImportHelper.GetTextFieldAttrTokenMap().
+ Get(nPrefix, sLocalName),
+ xAttrList->getValueByIndex(i) );
+ }
+}
+
+XMLTextFieldImportContext::~XMLTextFieldImportContext() {
+}
+
+OUString XMLTextFieldImportContext::GetContent()
+{
+ if (sContent.getLength()==0)
+ {
+ sContent = sContentBuffer.makeStringAndClear();
+ }
+
+ return sContent;
+}
+
+void XMLTextFieldImportContext::EndElement()
+{
+ DBG_ASSERT(GetServiceName().getLength()>0, "no service name for element!");
+ if (bValid)
+ {
+
+ // create field/Service
+ Reference<XPropertySet> xPropSet;
+ if (CreateField(xPropSet, sServicePrefix + GetServiceName()))
+ {
+ // attach field to document
+ Reference<XTextContent> xTextContent(xPropSet, UNO_QUERY);
+ rTextImportHelper.InsertTextContent(xTextContent);
+
+ // set field properties
+ PrepareField(xPropSet);
+
+ return;
+ }
+ }
+
+
+ // in case of error: write element content
+ rTextImportHelper.InsertString(GetContent());
+}
+
+void XMLTextFieldImportContext::Characters(const OUString& sContent)
+{
+ sContentBuffer.append(sContent);
+}
+
+sal_Bool XMLTextFieldImportContext::CreateField(
+ Reference<XPropertySet> & xField,
+ const OUString& sServiceName)
+{
+ // instantiate new XTextField:
+ // ask import for model, model is factory, ask factory to create service
+
+ Reference<XMultiServiceFactory> xFactory(GetImport().GetModel(),UNO_QUERY);
+ if( xFactory.is() )
+ {
+ Reference<XInterface> xIfc = xFactory->createInstance(sServiceName);
+ if( xIfc.is() )
+ {
+ Reference<XPropertySet> xTmp( xIfc, UNO_QUERY );
+
+ xField = xTmp;
+ } else {
+ return sal_False; // can't create instance
+ }
+ } else {
+ return sal_False; // can't get MultiServiceFactory
+ }
+
+ return sal_True;
+}
+
+/// create the appropriate field context from
+XMLTextFieldImportContext*
+XMLTextFieldImportContext::CreateTextFieldImportContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrefix,
+ const OUString& rName,
+ sal_uInt16 nToken)
+{
+ XMLTextFieldImportContext* pContext = NULL;
+
+ switch (nToken)
+ {
+ case XML_TOK_TEXT_SENDER_FIRSTNAME:
+ case XML_TOK_TEXT_SENDER_LASTNAME:
+ case XML_TOK_TEXT_SENDER_INITIALS:
+ case XML_TOK_TEXT_SENDER_TITLE:
+ case XML_TOK_TEXT_SENDER_POSITION:
+ case XML_TOK_TEXT_SENDER_EMAIL:
+ case XML_TOK_TEXT_SENDER_PHONE_PRIVATE:
+ case XML_TOK_TEXT_SENDER_FAX:
+ case XML_TOK_TEXT_SENDER_COMPANY:
+ case XML_TOK_TEXT_SENDER_PHONE_WORK:
+ case XML_TOK_TEXT_SENDER_STREET:
+ case XML_TOK_TEXT_SENDER_CITY:
+ case XML_TOK_TEXT_SENDER_POSTAL_CODE:
+ case XML_TOK_TEXT_SENDER_COUNTRY:
+ case XML_TOK_TEXT_SENDER_STATE_OR_PROVINCE:
+ pContext =
+ new XMLSenderFieldImportContext( rImport, rHlp,
+ nPrefix, rName, nToken );
+ break;
+
+ case XML_TOK_TEXT_AUTHOR_NAME:
+ case XML_TOK_TEXT_AUTHOR_INITIALS:
+ pContext =
+ new XMLAuthorFieldImportContext( rImport, rHlp,
+ nPrefix, rName, nToken );
+ break;
+
+ case XML_TOK_TEXT_PLACEHOLDER:
+ pContext =
+ new XMLPlaceholderFieldImportContext( rImport, rHlp,
+ nPrefix, rName);
+ break;
+ case XML_TOK_TEXT_SEQUENCE:
+ pContext =
+ new XMLSequenceFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_TEXT_INPUT:
+ pContext =
+ new XMLTextInputFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_EXPRESSION:
+ pContext =
+ new XMLExpressionFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_VARIABLE_SET:
+ pContext =
+ new XMLVariableSetFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_VARIABLE_INPUT:
+ pContext =
+ new XMLVariableInputFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_VARIABLE_GET:
+ pContext =
+ new XMLVariableGetFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_USER_FIELD_GET:
+ pContext = new XMLUserFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_USER_FIELD_INPUT:
+ pContext = new XMLUserFieldInputImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_TIME:
+ pContext = new XMLTimeFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_PAGE_CONTINUATION_STRING:
+ pContext = new XMLPageContinuationImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_PAGE_NUMBER:
+ pContext = new XMLPageNumberImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_DATE:
+ pContext = new XMLDateFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_DATABASE_NAME:
+ pContext = new XMLDatabaseNameImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_DATABASE_NEXT:
+ pContext = new XMLDatabaseNextImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_DATABASE_SELECT:
+ pContext = new XMLDatabaseSelectImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_DATABASE_ROW_NUMBER:
+ pContext = new XMLDatabaseNumberImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_DATABASE_DISPLAY:
+ pContext = new XMLDatabaseDisplayImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_CONDITIONAL_TEXT:
+ pContext = new XMLConditionalTextImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_HIDDEN_TEXT:
+ pContext = new XMLHiddenTextImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+ case XML_TOK_TEXT_HIDDEN_PARAGRAPH:
+ pContext = new XMLHiddenParagraphImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_DOCUMENT_INFORMATION_0: // info fields only for
+ case XML_TOK_TEXT_DOCUMENT_INFORMATION_1: // compatibilty with older
+ case XML_TOK_TEXT_DOCUMENT_INFORMATION_2: // versions
+ case XML_TOK_TEXT_DOCUMENT_INFORMATION_3:
+ case XML_TOK_TEXT_DOCUMENT_CREATION_AUTHOR:
+ case XML_TOK_TEXT_DOCUMENT_DESCRIPTION:
+ case XML_TOK_TEXT_DOCUMENT_PRINT_AUTHOR:
+ case XML_TOK_TEXT_DOCUMENT_TITLE:
+ case XML_TOK_TEXT_DOCUMENT_SUBJECT:
+ case XML_TOK_TEXT_DOCUMENT_KEYWORDS:
+ case XML_TOK_TEXT_DOCUMENT_SAVE_AUTHOR:
+ pContext = new XMLSimpleDocInfoImportContext( rImport, rHlp,
+ nPrefix, rName,
+ nToken );
+ break;
+
+ case XML_TOK_TEXT_DOCUMENT_CREATION_DATE:
+ case XML_TOK_TEXT_DOCUMENT_CREATION_TIME:
+ case XML_TOK_TEXT_DOCUMENT_PRINT_DATE:
+ case XML_TOK_TEXT_DOCUMENT_PRINT_TIME:
+ case XML_TOK_TEXT_DOCUMENT_SAVE_DATE:
+ case XML_TOK_TEXT_DOCUMENT_SAVE_TIME:
+ case XML_TOK_TEXT_DOCUMENT_EDIT_DURATION:
+ pContext = new XMLDateTimeDocInfoImportContext( rImport, rHlp,
+ nPrefix, rName,
+ nToken );
+ break;
+
+ case XML_TOK_TEXT_DOCUMENT_REVISION:
+ pContext = new XMLRevisionDocInfoImportContext( rImport, rHlp,
+ nPrefix, rName,
+ nToken );
+ break;
+
+ case XML_TOK_TEXT_DOCUMENT_USER_DEFINED:
+ pContext = new XMLUserDocInfoImportContext( rImport, rHlp,
+ nPrefix, rName,
+ nToken );
+ break;
+
+ case XML_TOK_TEXT_FILENAME:
+ pContext = new XMLFileNameImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_CHAPTER:
+ pContext = new XMLChapterImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_TEMPLATENAME:
+ pContext = new XMLTemplateNameImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_WORD_COUNT:
+ case XML_TOK_TEXT_PARAGRAPH_COUNT:
+ case XML_TOK_TEXT_TABLE_COUNT:
+ case XML_TOK_TEXT_CHARACTER_COUNT:
+ case XML_TOK_TEXT_IMAGE_COUNT:
+ case XML_TOK_TEXT_OBJECT_COUNT:
+ case XML_TOK_TEXT_PAGE_COUNT:
+ pContext = new XMLCountFieldImportContext( rImport, rHlp,
+ nPrefix, rName, nToken);
+ break;
+
+ case XML_TOK_TEXT_GET_PAGE_VAR:
+ pContext = new XMLPageVarGetFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_SET_PAGE_VAR:
+ pContext = new XMLPageVarSetFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_MACRO:
+ pContext = new XMLMacroFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_DDE:
+ pContext = new XMLDdeFieldImportContext( rImport, rHlp,
+ nPrefix, rName );
+ break;
+
+ case XML_TOK_TEXT_REFERENCE_REF:
+ case XML_TOK_TEXT_BOOKMARK_REF:
+ case XML_TOK_TEXT_FOOTNOTE_REF:
+ case XML_TOK_TEXT_ENDNOTE_REF:
+ case XML_TOK_TEXT_SEQUENCE_REF:
+ pContext = new XMLReferenceFieldImportContext( rImport, rHlp,
+ nToken,
+ nPrefix, rName );
+ break;
+
+ default:
+ // ignore! May not even be a textfield.
+ // (Reminder: This method is called inside default:-branch)
+ pContext = NULL;
+ break;
+ }
+
+ return pContext;
+}
+
+
+
+//
+// XMLSenderFieldImportContext
+//
+
+TYPEINIT1( XMLSenderFieldImportContext, XMLTextFieldImportContext);
+
+XMLSenderFieldImportContext::XMLSenderFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName,
+ sal_uInt16 nToken) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_extended_user,
+ nPrfx, sLocalName),
+ bFixed(sal_True),
+ nElementToken(nToken),
+ sEmpty(),
+ sPropertyFieldSubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_user_data_type)),
+ sPropertyFixed(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed)),
+ sPropertyContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_content))
+{
+}
+
+void XMLSenderFieldImportContext::StartElement(
+ const Reference<XAttributeList> & xAttrList)
+{
+ bValid = sal_True;
+ switch (nElementToken) {
+ case XML_TOK_TEXT_SENDER_FIRSTNAME:
+ nSubType = UserDataPart::FIRSTNAME;
+ break;
+ case XML_TOK_TEXT_SENDER_LASTNAME:
+ nSubType = UserDataPart::NAME;
+ break;
+ case XML_TOK_TEXT_SENDER_INITIALS:
+ nSubType = UserDataPart::SHORTCUT;
+ break;
+ case XML_TOK_TEXT_SENDER_TITLE:
+ nSubType = UserDataPart::TITLE;
+ break;
+ case XML_TOK_TEXT_SENDER_POSITION:
+ nSubType = UserDataPart::POSITION;
+ break;
+ case XML_TOK_TEXT_SENDER_EMAIL:
+ nSubType = UserDataPart::EMAIL;
+ break;
+ case XML_TOK_TEXT_SENDER_PHONE_PRIVATE:
+ nSubType = UserDataPart::PHONE_PRIVATE;
+ break;
+ case XML_TOK_TEXT_SENDER_FAX:
+ nSubType = UserDataPart::FAX;
+ break;
+ case XML_TOK_TEXT_SENDER_COMPANY:
+ nSubType = UserDataPart::COMPANY;
+ break;
+ case XML_TOK_TEXT_SENDER_PHONE_WORK:
+ nSubType = UserDataPart::PHONE_COMPANY;
+ break;
+ case XML_TOK_TEXT_SENDER_STREET:
+ nSubType = UserDataPart::STREET;
+ break;
+ case XML_TOK_TEXT_SENDER_CITY:
+ nSubType = UserDataPart::CITY;
+ break;
+ case XML_TOK_TEXT_SENDER_POSTAL_CODE:
+ nSubType = UserDataPart::ZIP;
+ break;
+ case XML_TOK_TEXT_SENDER_COUNTRY:
+ nSubType = UserDataPart::COUNTRY;
+ break;
+ case XML_TOK_TEXT_SENDER_STATE_OR_PROVINCE:
+ nSubType = UserDataPart::STATE;
+ break;
+ default:
+ bValid = sal_False;
+ break;
+ }
+
+ // process Attributes
+ XMLTextFieldImportContext::StartElement(xAttrList);
+}
+
+void XMLSenderFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue)
+{
+ if (XML_TOK_TEXTFIELD_FIXED == nAttrToken) {
+
+ // set bVal
+ sal_Bool bVal;
+ sal_Bool bRet = GetImport().GetMM100UnitConverter().
+ convertBool(bVal, sAttrValue);
+
+ // set bFixed if successfull
+ if (bRet) {
+ bFixed = bVal;
+ }
+ }
+}
+
+void XMLSenderFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropSet)
+{
+ // set members
+ Any aAny;
+ aAny <<= nSubType;
+ xPropSet->setPropertyValue(sPropertyFieldSubType, aAny);
+
+ aAny.setValue( &bFixed, ::getBooleanCppuType() );
+ xPropSet->setPropertyValue(sPropertyFixed, aAny);
+
+ if (bFixed)
+ {
+ aAny <<= GetContent();
+ xPropSet->setPropertyValue(sPropertyContent, aAny);
+ }
+}
+
+
+
+//
+// XMLAuthorFieldImportContext
+//
+
+TYPEINIT1( XMLAuthorFieldImportContext, XMLSenderFieldImportContext);
+
+XMLAuthorFieldImportContext::XMLAuthorFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName,
+ sal_uInt16 nToken) :
+ XMLSenderFieldImportContext(rImport, rHlp, nPrfx, sLocalName, nToken),
+ bAuthorFullName(sal_True),
+ sPropertyAuthorFullName(RTL_CONSTASCII_USTRINGPARAM(sAPI_full_name)),
+ sPropertyContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_content)),
+ sPropertyFixed(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed)),
+ sServiceAuthor(RTL_CONSTASCII_USTRINGPARAM(sAPI_author))
+{
+ // overwrite service name from XMLSenderFieldImportContext
+ SetServiceName(sServiceAuthor);
+}
+
+void XMLAuthorFieldImportContext::StartElement(
+ const Reference<XAttributeList> & xAttrList) {
+
+ bAuthorFullName = (XML_TOK_TEXT_AUTHOR_INITIALS != nElementToken);
+ bValid = sal_True;
+
+ // process Attributes
+ XMLTextFieldImportContext::StartElement(xAttrList);
+}
+
+void XMLAuthorFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropSet)
+{
+ // set members
+ Any aAny;
+ aAny.setValue( &bAuthorFullName, ::getBooleanCppuType() );
+ xPropSet->setPropertyValue(sPropertyAuthorFullName, aAny);
+
+ aAny.setValue( &bFixed, ::getBooleanCppuType() );
+ xPropSet->setPropertyValue(sPropertyFixed, aAny);
+
+ if (bFixed)
+ {
+ aAny <<= GetContent();
+ xPropSet->setPropertyValue(sPropertyContent, aAny);
+ }
+}
+
+
+//
+// page continuation string
+//
+
+TYPEINIT1( XMLPageContinuationImportContext, XMLTextFieldImportContext );
+
+static SvXMLEnumMapEntry __READONLY_DATA lcl_aSelectPageAttrMap[] =
+{
+ { sXML_previous, PageNumberType_PREV },
+ { sXML_current, PageNumberType_CURRENT },
+ { sXML_next, PageNumberType_NEXT },
+ { 0, 0 },
+};
+
+XMLPageContinuationImportContext::XMLPageContinuationImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_page_number,
+ nPrfx, sLocalName),
+ sString(),
+ sStringOK(sal_False),
+ eSelectPage(PageNumberType_CURRENT),
+ sPropertySubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_sub_type)),
+ sPropertyUserText(RTL_CONSTASCII_USTRINGPARAM(sAPI_user_text)),
+ sPropertyNumberingType(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_numbering_type))
+{
+ bValid = sal_True;
+}
+
+void XMLPageContinuationImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken, const OUString& sAttrValue )
+{
+ switch(nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_SELECT_PAGE:
+ {
+ sal_uInt16 nTmp;
+ if (SvXMLUnitConverter::convertEnum(nTmp, sAttrValue,
+ lcl_aSelectPageAttrMap)
+ && (PageNumberType_CURRENT != nTmp) )
+ {
+ eSelectPage = (PageNumberType)nTmp;
+ }
+ break;
+ }
+ case XML_TOK_TEXTFIELD_STRING_VALUE:
+ sString = sAttrValue;
+ sStringOK = sal_True;
+ break;
+ }
+}
+
+void XMLPageContinuationImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= eSelectPage;
+ xPropertySet->setPropertyValue(sPropertySubType, aAny);
+
+ aAny <<= (sStringOK ? sString : GetContent());
+ xPropertySet->setPropertyValue(sPropertyUserText, aAny);
+
+ aAny <<= style::NumberingType::CHAR_SPECIAL;
+ xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+}
+
+
+
+//
+// page number field
+//
+
+TYPEINIT1( XMLPageNumberImportContext, XMLTextFieldImportContext );
+
+XMLPageNumberImportContext::XMLPageNumberImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_page_number,
+ nPrfx, sLocalName),
+ sPropertySubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_sub_type)),
+ sPropertyNumberingType(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_numbering_type)),
+ sPropertyOffset(RTL_CONSTASCII_USTRINGPARAM(sAPI_offset)),
+ sNumberFormat(),
+ sNumberSync(RTL_CONSTASCII_USTRINGPARAM(sXML_false)),
+ nPageAdjust(0),
+ eSelectPage(PageNumberType_CURRENT),
+ sNumberFormatOK(sal_False)
+{
+ bValid = sal_True;
+}
+
+void XMLPageNumberImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_NUM_FORMAT:
+ sNumberFormat = sAttrValue;
+ sNumberFormatOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_NUM_LETTER_SYNC:
+ sNumberSync = sAttrValue;
+ break;
+ case XML_TOK_TEXTFIELD_SELECT_PAGE:
+ {
+ sal_uInt16 nTmp;
+ if (SvXMLUnitConverter::convertEnum(nTmp, sAttrValue,
+ lcl_aSelectPageAttrMap))
+ {
+ eSelectPage = (PageNumberType)nTmp;
+ }
+ break;
+ }
+ case XML_TOK_TEXTFIELD_PAGE_ADJUST:
+ {
+ sal_Int32 nTmp;
+ if (SvXMLUnitConverter::convertNumber(nTmp, sAttrValue))
+ {
+ nPageAdjust = nTmp;
+ }
+ break;
+ }
+ }
+}
+
+void XMLPageNumberImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= sNumberFormatOK ?
+ SvxXMLListStyleContext::GetNumType(sNumberFormat, sNumberSync) :
+ style::NumberingType::PAGE_DESCRIPTOR;
+ xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+
+ // adjust offset
+ switch (eSelectPage)
+ {
+ case PageNumberType_PREV:
+ nPageAdjust--;
+ break;
+ case PageNumberType_CURRENT:
+ break;
+ case PageNumberType_NEXT:
+ nPageAdjust++;
+ break;
+ default:
+ DBG_WARNING("unknown page number type");
+ }
+ aAny <<= nPageAdjust;
+ xPropertySet->setPropertyValue(sPropertyOffset, aAny);
+
+ aAny <<= eSelectPage;
+ xPropertySet->setPropertyValue(sPropertySubType, aAny);
+}
+
+
+
+//
+// Placeholder
+//
+
+TYPEINIT1( XMLPlaceholderFieldImportContext, XMLTextFieldImportContext);
+
+XMLPlaceholderFieldImportContext::XMLPlaceholderFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_jump_edit,
+ nPrfx, sLocalName),
+ sPropertyPlaceholderType(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_place_holder_type)),
+ sPropertyPlaceholder(RTL_CONSTASCII_USTRINGPARAM(sAPI_place_holder)),
+ sPropertyHint(RTL_CONSTASCII_USTRINGPARAM(sAPI_hint)),
+ sDescription()
+{
+}
+
+/// process attribute values
+void XMLPlaceholderFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken, const OUString& sAttrValue )
+{
+ switch (nAttrToken) {
+ case XML_TOK_TEXTFIELD_DESCRIPTION:
+ sDescription = sAttrValue;
+ break;
+
+ case XML_TOK_TEXTFIELD_PLACEHOLDER_TYPE:
+ bValid = sal_True;
+ if (0 == sAttrValue.compareToAscii(sXML_table)) {
+ nPlaceholderType = PlaceholderType::TABLE;
+ } else if (0 == sAttrValue.compareToAscii(sXML_text)) {
+ nPlaceholderType = PlaceholderType::TEXT;
+ } else if (0 == sAttrValue.compareToAscii(sXML_text_box)) {
+ nPlaceholderType = PlaceholderType::TEXTFRAME;
+ } else if (0 == sAttrValue.compareToAscii(sXML_image)) {
+ nPlaceholderType = PlaceholderType::GRAPHIC;
+ } else if (0 == sAttrValue.compareToAscii(sXML_object)) {
+ nPlaceholderType = PlaceholderType::OBJECT;
+ } else {
+ bValid = sal_False;
+ }
+ break;
+
+ default:
+ ; // ignore
+ }
+}
+
+void XMLPlaceholderFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet) {
+
+ Any aAny;
+ aAny <<= sDescription;
+ xPropertySet->setPropertyValue(sPropertyHint, aAny);
+
+ // remove <...> around content (if present)
+ OUString sContent = GetContent();
+ sal_Int32 nStart = 0;
+ sal_Int32 nLength = sContent.getLength();
+ if ((nLength > 0) && (sContent.getStr()[0] == '<'))
+ {
+ --nLength;
+ ++nStart;
+ }
+ if ((nLength > 0) && (sContent.getStr()[sContent.getLength()-1] == '>'))
+ {
+ --nLength;
+ }
+ aAny <<= sContent.copy(nStart, nLength);
+ xPropertySet->setPropertyValue(sPropertyPlaceholder, aAny);
+
+ aAny <<= nPlaceholderType;
+ xPropertySet->setPropertyValue(sPropertyPlaceholderType, aAny);
+}
+
+
+//
+// time field
+//
+
+TYPEINIT1( XMLTimeFieldImportContext, XMLTextFieldImportContext);
+
+XMLTimeFieldImportContext::XMLTimeFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_date_time,
+ nPrfx, sLocalName),
+ fTimeValue(0.0),
+ nAdjust(0),
+ bTimeOK(sal_False),
+ bFixed(sal_False),
+ nFormatKey(0),
+ bFormatOK(sal_False),
+ bIsDate(sal_False),
+ sPropertyNumberFormat(RTL_CONSTASCII_USTRINGPARAM(sAPI_number_format)),
+ sPropertyFixed(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed)),
+ sPropertyDateTimeValue(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_date_time_value)),
+ sPropertyAdjust(RTL_CONSTASCII_USTRINGPARAM(sAPI_adjust)),
+ sPropertyIsDate(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_date))
+{
+ bValid = sal_True; // always valid!
+}
+
+void XMLTimeFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken, const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_TIME_VALUE:
+ {
+ double fTmp;
+ if (GetImport().GetMM100UnitConverter().
+ convertDateTime(fTmp, sAttrValue))
+ {
+ fTimeValue = fTmp;
+ bTimeOK = sal_True;
+ }
+ break;
+ }
+ case XML_TOK_TEXTFIELD_FIXED:
+ {
+ sal_Bool bTmp;
+ if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue))
+ {
+ bFixed = bTmp;
+ }
+ break;
+ }
+ case XML_TOK_TEXTFIELD_DATA_STYLE_NAME:
+ {
+ sal_Int32 nKey = GetImportHelper().GetDataStyleKey(sAttrValue);
+ if (-1 != nKey)
+ {
+ nFormatKey = nKey;
+ bFormatOK = sal_True;
+ }
+ break;
+ }
+ case XML_TOK_TEXTFIELD_TIME_ADJUST:
+ {
+ double fTmp;
+
+ if (SvXMLUnitConverter::convertTime(fTmp, sAttrValue))
+ {
+ // convert to minutes
+ nAdjust = SolarMath::ApproxFloor(fTmp * 60 * 24);
+ }
+ break;
+ }
+ }
+}
+
+void XMLTimeFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny.setValue( &bFixed, ::getBooleanCppuType() );
+ xPropertySet->setPropertyValue(sPropertyFixed, aAny);
+
+ aAny.setValue( &bIsDate, ::getBooleanCppuType() );
+ xPropertySet->setPropertyValue(sPropertyIsDate, aAny);
+
+ aAny <<= nAdjust;
+ xPropertySet->setPropertyValue(sPropertyAdjust, aAny);
+
+ if (bFixed && bTimeOK)
+ {
+ aAny <<= fTimeValue;
+ xPropertySet->setPropertyValue(sPropertyDateTimeValue, aAny);
+ }
+
+ if (bFormatOK)
+ {
+ aAny <<= nFormatKey;
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ }
+}
+
+
+
+//
+// date field
+//
+
+TYPEINIT1( XMLDateFieldImportContext, XMLTimeFieldImportContext );
+
+XMLDateFieldImportContext::XMLDateFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLTimeFieldImportContext(rImport, rHlp, nPrfx, sLocalName)
+{
+ bIsDate = sal_True; // always a date!
+}
+
+void XMLDateFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_DATE_VALUE:
+ {
+ double fTmp;
+
+ if (GetImport().GetMM100UnitConverter().
+ convertDateTime(fTmp, sAttrValue))
+ {
+ fTimeValue = SolarMath::ApproxFloor(fTmp);
+ bTimeOK = sal_True;
+ }
+ break;
+ }
+ case XML_TOK_TEXTFIELD_DATE_ADJUST:
+ // delegate to superclass, pretending it was a time-adjust attr.
+ XMLTimeFieldImportContext::ProcessAttribute(
+ XML_TOK_TEXTFIELD_TIME_ADJUST,
+ sAttrValue);
+ break;
+ case XML_TOK_TEXTFIELD_TIME_VALUE:
+ case XML_TOK_TEXTFIELD_TIME_ADJUST:
+ ; // ignore time-adjust and time-value attributes
+ break;
+ default:
+ // all others: delegate to super-class
+ XMLTimeFieldImportContext::ProcessAttribute(nAttrToken,
+ sAttrValue);
+ break;
+ }
+}
+
+
+
+
+//
+// database field superclass
+//
+
+TYPEINIT1( XMLDatabaseFieldImportContext, XMLTextFieldImportContext );
+
+XMLDatabaseFieldImportContext::XMLDatabaseFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ const sal_Char* pServiceName, sal_uInt16 nPrfx,
+ const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, pServiceName,
+ nPrfx, sLocalName),
+ sPropertyDatabaseName(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_data_base_name)),
+ sPropertyTableName(RTL_CONSTASCII_USTRINGPARAM(sAPI_data_table_name)),
+ sDatabaseName(),
+ sTableName(),
+ bDatabaseOK(sal_False),
+ bTableOK(sal_False)
+{
+}
+
+void XMLDatabaseFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken, const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_DATABASE_NAME:
+ sDatabaseName = sAttrValue;
+ bDatabaseOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_TABLE_NAME:
+ sTableName = sAttrValue;
+ bTableOK = sal_True;
+ break;
+ }
+}
+
+void XMLDatabaseFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= sDatabaseName;
+ xPropertySet->setPropertyValue(sPropertyDatabaseName, aAny);
+
+ aAny <<= sTableName;
+ xPropertySet->setPropertyValue(sPropertyTableName, aAny);
+}
+
+
+
+//
+// database name field
+//
+
+TYPEINIT1( XMLDatabaseNameImportContext, XMLDatabaseFieldImportContext );
+
+XMLDatabaseNameImportContext::XMLDatabaseNameImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database_name,
+ nPrfx, sLocalName)
+{
+}
+
+void XMLDatabaseNameImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken, const OUString& sAttrValue )
+{
+ // delegate to superclass and check for success
+ XMLDatabaseFieldImportContext::ProcessAttribute(nAttrToken, sAttrValue);
+ bValid = bDatabaseOK && bTableOK;
+}
+
+
+
+//
+// database next field
+//
+
+TYPEINIT1( XMLDatabaseNextImportContext, XMLDatabaseFieldImportContext );
+
+XMLDatabaseNextImportContext::XMLDatabaseNextImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ const sal_Char* pServiceName, sal_uInt16 nPrfx,
+ const OUString& sLocalName) :
+ XMLDatabaseFieldImportContext(rImport, rHlp, pServiceName,
+ nPrfx, sLocalName),
+ sPropertyCondition(RTL_CONSTASCII_USTRINGPARAM(sAPI_condition)),
+ sTrue(RTL_CONSTASCII_USTRINGPARAM(sAPI_true)),
+ sCondition(),
+ bConditionOK(sal_False)
+{
+}
+
+XMLDatabaseNextImportContext::XMLDatabaseNextImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database_next,
+ nPrfx, sLocalName),
+ sPropertyCondition(RTL_CONSTASCII_USTRINGPARAM(sAPI_condition)),
+ sTrue(RTL_CONSTASCII_USTRINGPARAM(sAPI_true)),
+ sCondition(),
+ bConditionOK(sal_False)
+{
+}
+
+void XMLDatabaseNextImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken, const OUString& sAttrValue )
+{
+ if (XML_TOK_TEXTFIELD_CONDITION == nAttrToken)
+ {
+ sCondition = sAttrValue;
+ bConditionOK = sal_True;
+ }
+ else
+ {
+ XMLDatabaseFieldImportContext::ProcessAttribute(nAttrToken,
+ sAttrValue);
+ }
+
+ bValid = bDatabaseOK && bTableOK;
+}
+
+void XMLDatabaseNextImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= bConditionOK ? sCondition : sTrue;
+ xPropertySet->setPropertyValue(sPropertyCondition, aAny);
+
+ XMLDatabaseFieldImportContext::PrepareField(xPropertySet);
+}
+
+
+
+//
+// database select field
+//
+
+TYPEINIT1( XMLDatabaseSelectImportContext, XMLDatabaseNextImportContext );
+
+XMLDatabaseSelectImportContext::XMLDatabaseSelectImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const ::rtl::OUString& sLocalName) :
+ XMLDatabaseNextImportContext(rImport, rHlp, sAPI_database_select,
+ nPrfx, sLocalName),
+ sPropertySetNumber(RTL_CONSTASCII_USTRINGPARAM(sAPI_set_number)),
+ nNumber(0),
+ bNumberOK(sal_False)
+{
+}
+
+void XMLDatabaseSelectImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue )
+{
+ if (XML_TOK_TEXTFIELD_ROW_NUMBER == nAttrToken)
+ {
+ sal_Int32 nTmp;
+ if (SvXMLUnitConverter::convertNumber( nTmp, sAttrValue
+ /* , nMin, nMax ??? */ ))
+ {
+ nNumber = nTmp;
+ bNumberOK = sal_True;
+ }
+ }
+ else
+ {
+ XMLDatabaseNextImportContext::ProcessAttribute(nAttrToken, sAttrValue);
+ }
+
+ bValid = bTableOK && bDatabaseOK && bNumberOK;
+}
+
+void XMLDatabaseSelectImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= nNumber;
+ xPropertySet->setPropertyValue(sPropertySetNumber, aAny);
+
+ XMLDatabaseNextImportContext::PrepareField(xPropertySet);
+}
+
+
+
+//
+// database display row number field
+//
+
+TYPEINIT1( XMLDatabaseNumberImportContext, XMLDatabaseFieldImportContext );
+
+XMLDatabaseNumberImportContext::XMLDatabaseNumberImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database_number,
+ nPrfx, sLocalName),
+ sPropertyNumberingType(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_numbering_type)),
+ sPropertySetNumber(RTL_CONSTASCII_USTRINGPARAM(sAPI_set_number)),
+ sNumberFormat('1'),
+ sNumberSync(RTL_CONSTASCII_USTRINGPARAM(sXML_false)),
+ nValue(0),
+ bValueOK(sal_False)
+{
+}
+
+void XMLDatabaseNumberImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_NUM_FORMAT:
+ sNumberFormat = sAttrValue;
+ break;
+ case XML_TOK_TEXTFIELD_NUM_LETTER_SYNC:
+ sNumberSync = sAttrValue;
+ break;
+ case XML_TOK_TEXTFIELD_VALUE:
+ {
+ sal_Int32 nTmp;
+ if (SvXMLUnitConverter::convertNumber( nTmp, sAttrValue ))
+ {
+ nValue = nTmp;
+ bValueOK = sal_True;
+ }
+ break;
+ }
+ default:
+ XMLDatabaseFieldImportContext::ProcessAttribute(nAttrToken,
+ sAttrValue);
+ break;
+ }
+
+ bValid = bTableOK && bDatabaseOK;
+}
+
+void XMLDatabaseNumberImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= SvxXMLListStyleContext::GetNumType(sNumberFormat, sNumberSync);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+
+ if (bValueOK)
+ {
+ aAny <<= nValue;
+ xPropertySet->setPropertyValue(sPropertySetNumber, aAny);
+ }
+
+ XMLDatabaseFieldImportContext::PrepareField(xPropertySet);
+}
+
+
+
+//
+// Simple doc info fields
+//
+
+TYPEINIT1( XMLSimpleDocInfoImportContext, XMLTextFieldImportContext );
+
+XMLSimpleDocInfoImportContext::XMLSimpleDocInfoImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName, sal_uInt16 nToken) :
+ XMLTextFieldImportContext(rImport, rHlp, MapTokenToServiceName(nToken),
+ nPrfx, sLocalName),
+ bFixed(sal_False),
+ sPropertyFixed(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed)),
+ sPropertyContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_content)),
+ sPropertyCurrentPresentation(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_current_presentation))
+{
+ bValid = sal_True;
+}
+
+void XMLSimpleDocInfoImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ if (XML_TOK_TEXTFIELD_FIXED == nAttrToken)
+ {
+ sal_Bool bTmp;
+ if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue))
+ {
+ bFixed = bTmp;
+ }
+ }
+}
+
+void XMLSimpleDocInfoImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+ aAny.setValue(&bFixed, ::getBooleanCppuType() );
+ xPropertySet->setPropertyValue(sPropertyFixed, aAny);
+
+ // set Content (if not fixed) AND CurrentPresentation
+ aAny <<= GetContent();
+ if (bFixed)
+ {
+ xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ }
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+}
+
+const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
+ sal_uInt16 nToken)
+{
+ const sal_Char* pServiceName = NULL;
+
+ switch(nToken)
+ {
+ case XML_TOK_TEXT_DOCUMENT_CREATION_AUTHOR:
+ pServiceName = sAPI_docinfo_create_author;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_CREATION_DATE:
+ pServiceName = sAPI_docinfo_create_date_time;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_CREATION_TIME:
+ pServiceName = sAPI_docinfo_create_date_time;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_DESCRIPTION:
+ pServiceName = sAPI_docinfo_description;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_EDIT_DURATION:
+ pServiceName = sAPI_docinfo_edit_time;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_INFORMATION_0:
+ pServiceName = sAPI_docinfo_info0;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_INFORMATION_1:
+ pServiceName = sAPI_docinfo_info1;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_INFORMATION_2:
+ pServiceName = sAPI_docinfo_info2;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_INFORMATION_3:
+ pServiceName = sAPI_docinfo_info3;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_PRINT_AUTHOR:
+ pServiceName = sAPI_docinfo_print_author;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_PRINT_DATE:
+ pServiceName = sAPI_docinfo_print_date_time;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_PRINT_TIME:
+ pServiceName = sAPI_docinfo_print_date_time;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_KEYWORDS:
+ pServiceName = sAPI_docinfo_keywords;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_SUBJECT:
+ pServiceName = sAPI_docinfo_subject;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_REVISION:
+ pServiceName = sAPI_docinfo_revision;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_SAVE_AUTHOR:
+ pServiceName = sAPI_docinfo_change_author;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_SAVE_DATE:
+ pServiceName = sAPI_docinfo_change_date_time;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_SAVE_TIME:
+ pServiceName = sAPI_docinfo_change_date_time;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_TITLE:
+ pServiceName = sAPI_docinfo_title;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_USER_DEFINED:
+ // hack: service name not used in XMLUserDocInfoImportContext
+ pServiceName = sAPI_docinfo_info0;
+ break;
+
+ default:
+ DBG_ERROR("no docinfo field token");
+ pServiceName = NULL;
+ break;
+ }
+
+ return pServiceName;
+}
+
+
+//
+// revision field
+//
+
+TYPEINIT1( XMLRevisionDocInfoImportContext, XMLSimpleDocInfoImportContext );
+
+XMLRevisionDocInfoImportContext::XMLRevisionDocInfoImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& sLocalName, sal_uInt16 nToken) :
+ XMLSimpleDocInfoImportContext(rImport, rHlp, nPrfx,
+ sLocalName, nToken),
+ sPropertyRevision(RTL_CONSTASCII_USTRINGPARAM(sAPI_revision))
+{
+ bValid = sal_True;
+}
+
+void XMLRevisionDocInfoImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ XMLSimpleDocInfoImportContext::PrepareField(xPropertySet);
+
+ // set revision number if fixed
+ if (bFixed)
+ {
+ sal_Int32 nTmp;
+
+ if (SvXMLUnitConverter::convertNumber(nTmp, GetContent()))
+ {
+ Any aAny;
+ aAny <<= nTmp;
+ xPropertySet->setPropertyValue(sPropertyRevision, aAny);
+ }
+ }
+}
+
+
+
+//
+// DocInfo fields with date/time attributes
+//
+
+TYPEINIT1( XMLDateTimeDocInfoImportContext, XMLSimpleDocInfoImportContext );
+
+XMLDateTimeDocInfoImportContext::XMLDateTimeDocInfoImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& sLocalName, sal_uInt16 nToken) :
+ XMLSimpleDocInfoImportContext(rImport, rHlp,
+ nPrfx, sLocalName, nToken),
+ sPropertyNumberFormat(RTL_CONSTASCII_USTRINGPARAM(sAPI_number_format)),
+ sPropertyIsDate(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_date)),
+ nFormat(0),
+ bFormatOK(sal_False)
+{
+ // we allow processing of EDIT_DURATION here, because import of actual
+ // is not supported anyway. If it was, we'd need an extra import class
+ // because times and time durations are presented differently!
+
+ bValid = sal_True;
+ switch (nToken)
+ {
+ case XML_TOK_TEXT_DOCUMENT_CREATION_DATE:
+ case XML_TOK_TEXT_DOCUMENT_PRINT_DATE:
+ case XML_TOK_TEXT_DOCUMENT_SAVE_DATE:
+ bIsDate = sal_True;
+ break;
+ case XML_TOK_TEXT_DOCUMENT_EDIT_DURATION:
+ case XML_TOK_TEXT_DOCUMENT_CREATION_TIME:
+ case XML_TOK_TEXT_DOCUMENT_PRINT_TIME:
+ case XML_TOK_TEXT_DOCUMENT_SAVE_TIME:
+ bIsDate = sal_False;
+ break;
+ default:
+ DBG_ERROR(
+ "XMLDateTimeDocInfoImportContext needs date/time doc. fields");
+ bValid = sal_False;
+ break;
+ }
+}
+
+void XMLDateTimeDocInfoImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_DATA_STYLE_NAME:
+ {
+ sal_Int32 nKey = GetImportHelper().GetDataStyleKey(sAttrValue);
+ if (-1 != nKey)
+ {
+ nFormat = nKey;
+ bFormatOK = sal_True;
+ }
+ break;
+ }
+ case XML_TOK_TEXTFIELD_FIXED:
+ XMLSimpleDocInfoImportContext::ProcessAttribute(nAttrToken,
+ sAttrValue);
+ break;
+ default:
+ // ignore -> we can't set date/time value anyway!
+ break;
+ }
+}
+
+void XMLDateTimeDocInfoImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ // process fixed and presentation
+ XMLSimpleDocInfoImportContext::PrepareField(xPropertySet);
+
+ Any aAny;
+ aAny.setValue( &bIsDate, ::getBooleanCppuType());
+ xPropertySet->setPropertyValue(sPropertyIsDate, aAny);
+
+ if (bFormatOK)
+ {
+ aAny <<= nFormat;
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ }
+
+ // can't set date/time/duration value! Sorry.
+}
+
+
+//
+// user defined docinfo fields
+//
+
+TYPEINIT1( XMLUserDocInfoImportContext, XMLSimpleDocInfoImportContext );
+
+XMLUserDocInfoImportContext::XMLUserDocInfoImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName, sal_uInt16 nToken) :
+ XMLSimpleDocInfoImportContext(rImport, rHlp, nPrfx,
+ sLocalName, nToken)
+{
+}
+
+void XMLUserDocInfoImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ static const sal_Char* aUserDocInfoServiceNames[] =
+ {
+ sAPI_docinfo_info0,
+ sAPI_docinfo_info1,
+ sAPI_docinfo_info2,
+ sAPI_docinfo_info3
+ };
+
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_NAME:
+ {
+ // iterate over user field names, until match is found
+ Reference<XDocumentInfoSupplier> xDocInfoSupp(
+ GetImport().GetModel(), UNO_QUERY);
+ Reference<XDocumentInfo> xDocInfo =
+ xDocInfoSupp->getDocumentInfo();
+ sal_Int16 nCount = xDocInfo->getUserFieldCount();
+ DBG_ASSERT((nCount*sizeof(sal_Char*) <=
+ sizeof(aUserDocInfoServiceNames)), "unknown service");
+ for(sal_Int16 i = 0; i<nCount; i++)
+ {
+ if (0 == sAttrValue.compareTo(xDocInfo->getUserFieldName(i)))
+ {
+ SetServiceName(OUString::createFromAscii(
+ aUserDocInfoServiceNames[i]));
+ bValid = sal_True;
+ break; // for loop; no need to check remainder
+ }
+ }
+ break;
+ }
+
+ default:
+ XMLSimpleDocInfoImportContext::ProcessAttribute(nAttrToken,
+ sAttrValue);
+ break;
+ }
+}
+
+
+
+//
+// import hidden paragraph fields
+//
+
+TYPEINIT1( XMLHiddenParagraphImportContext, XMLTextFieldImportContext );
+
+XMLHiddenParagraphImportContext::XMLHiddenParagraphImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_hidden_paragraph,
+ nPrfx, sLocalName),
+ sPropertyCondition(RTL_CONSTASCII_USTRINGPARAM(sAPI_condition)),
+ sCondition()
+{
+}
+
+void XMLHiddenParagraphImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ if (XML_TOK_TEXTFIELD_CONDITION == nAttrToken)
+ {
+ sCondition = sAttrValue;
+ bValid = sal_True;
+ }
+}
+
+void XMLHiddenParagraphImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+ aAny <<= sCondition;
+ xPropertySet->setPropertyValue(sPropertyCondition, aAny);
+}
+
+
+
+//
+// import conditional text (<text:conditional-text>)
+//
+
+TYPEINIT1( XMLConditionalTextImportContext, XMLTextFieldImportContext );
+
+XMLConditionalTextImportContext::XMLConditionalTextImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_conditional_text,
+ nPrfx, sLocalName),
+ sPropertyCondition(RTL_CONSTASCII_USTRINGPARAM(sAPI_condition)),
+ sPropertyTrueContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_true_content)),
+ sPropertyFalseContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_false_content)),
+ sCondition(),
+ sTrueContent(),
+ sFalseContent(),
+ bConditionOK(sal_False),
+ bTrueOK(sal_False),
+ bFalseOK(sal_False)
+{
+}
+
+void XMLConditionalTextImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_CONDITION:
+ sCondition = sAttrValue;
+ bConditionOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_STRING_VALUE_IF_FALSE:
+ sFalseContent = sAttrValue;
+ bFalseOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_STRING_VALUE_IF_TRUE:
+ sTrueContent = sAttrValue;
+ bTrueOK = sal_True;
+ break;
+ }
+
+ bValid = bConditionOK && bFalseOK && bTrueOK;
+}
+
+void XMLConditionalTextImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= sCondition;
+ xPropertySet->setPropertyValue(sPropertyCondition, aAny);
+
+ aAny <<= sFalseContent;
+ xPropertySet->setPropertyValue(sPropertyFalseContent, aAny);
+
+ aAny <<= sTrueContent;
+ xPropertySet->setPropertyValue(sPropertyTrueContent, aAny);
+}
+
+
+
+//
+// hidden text
+//
+
+TYPEINIT1( XMLHiddenTextImportContext, XMLTextFieldImportContext);
+
+XMLHiddenTextImportContext::XMLHiddenTextImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_hidden_text,
+ nPrfx, sLocalName),
+ sPropertyCondition(RTL_CONSTASCII_USTRINGPARAM(sAPI_condition)),
+ sPropertyTrueContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_true_content)),
+ sCondition(),
+ sString(),
+ bConditionOK(sal_False),
+ bStringOK(sal_False)
+{
+}
+
+void XMLHiddenTextImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_CONDITION:
+ sCondition = sAttrValue;
+ bConditionOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_STRING_VALUE:
+ sString = sAttrValue;
+ bStringOK = sal_True;
+ break;
+ }
+
+ bValid = bConditionOK && bStringOK;
+}
+
+void XMLHiddenTextImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= sCondition;
+ xPropertySet->setPropertyValue(sPropertyCondition, aAny);
+
+ aAny <<= sString;
+ xPropertySet->setPropertyValue(sPropertyTrueContent, aAny);
+}
+
+
+
+//
+// file name fields
+//
+
+TYPEINIT1( XMLFileNameImportContext, XMLTextFieldImportContext );
+
+static const SvXMLEnumMapEntry aFilenameDisplayMap[] =
+{
+ { sXML_path, FilenameDisplayFormat::PATH },
+ { sXML_name, FilenameDisplayFormat::NAME },
+ { sXML_name_and_extension, FilenameDisplayFormat::NAME_AND_EXT },
+ { sXML_full, FilenameDisplayFormat::FULL },
+ { 0, 0 }
+};
+
+XMLFileNameImportContext::XMLFileNameImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_file_name,
+ nPrfx, sLocalName),
+ sPropertyFixed(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_fixed)),
+ sPropertyFileFormat(RTL_CONSTASCII_USTRINGPARAM(sAPI_file_format)),
+ sPropertyCurrentPresentation(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_current_presentation)),
+ nFormat(FilenameDisplayFormat::FULL),
+ bFixed(sal_False)
+{
+ bValid = sal_True;
+}
+
+void XMLFileNameImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_FIXED:
+ {
+ sal_Bool bTmp;
+ if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue))
+ {
+ bFixed = bTmp;
+ }
+ break;
+ }
+ case XML_TOK_TEXTFIELD_DISPLAY:
+ {
+ sal_uInt16 nTmp;
+ if (SvXMLUnitConverter::convertEnum(nTmp, sAttrValue,
+ aFilenameDisplayMap))
+ {
+ nFormat = (sal_uInt16)nTmp;
+ }
+ break;
+ }
+ default:
+ ; // unkown attribute: ignore
+ break;
+ }
+}
+
+void XMLFileNameImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= bFixed;
+// xPropertySet->setPropertyValue(sPropertyFixed, aAny);
+
+ aAny <<= nFormat;
+ xPropertySet->setPropertyValue(sPropertyFileFormat, aAny);
+
+ aAny <<= GetContent();
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+}
+
+
+//
+// template name field
+//
+
+static const SvXMLEnumMapEntry aTemplateDisplayMap[] =
+{
+ { sXML_full, TemplateDisplayFormat::FULL },
+ { sXML_path, TemplateDisplayFormat::PATH },
+ { sXML_name, TemplateDisplayFormat::NAME },
+ { sXML_name_and_extension, TemplateDisplayFormat::NAME_AND_EXT },
+ { sXML_area, TemplateDisplayFormat::AREA },
+ { sXML_title, TemplateDisplayFormat::TITLE },
+ { 0, 0 }
+};
+
+TYPEINIT1( XMLTemplateNameImportContext, XMLTextFieldImportContext );
+
+XMLTemplateNameImportContext::XMLTemplateNameImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_template_name,
+ nPrfx, sLocalName),
+ sPropertyFileFormat(RTL_CONSTASCII_USTRINGPARAM(sAPI_file_format)),
+ nFormat(TemplateDisplayFormat::FULL)
+{
+ bValid = sal_True;
+}
+
+void XMLTemplateNameImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_DISPLAY:
+ {
+ sal_uInt16 nTmp;
+ if (SvXMLUnitConverter::convertEnum(nTmp, sAttrValue,
+ aTemplateDisplayMap))
+ {
+ nFormat = (sal_uInt16)nTmp;
+ }
+ break;
+ }
+ default:
+ ; // unknown attribute: ignore
+ break;
+ }
+}
+
+void XMLTemplateNameImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= nFormat;
+ xPropertySet->setPropertyValue(sPropertyFileFormat, aAny);
+}
+
+
+//
+// import chapter fields
+//
+
+TYPEINIT1( XMLChapterImportContext, XMLTextFieldImportContext );
+
+static const SvXMLEnumMapEntry aChapterDisplayMap[] =
+{
+ { sXML_name, ChapterFormat::NAME },
+ { sXML_number, ChapterFormat::NUMBER },
+ { sXML_number_and_name, ChapterFormat::NAME_NUMBER },
+ { sXML_plain_number_and_name, ChapterFormat::NO_PREFIX_SUFFIX },
+ { sXML_plain_number, ChapterFormat::DIGIT },
+ { 0, 0 }
+};
+
+XMLChapterImportContext::XMLChapterImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_chapter,
+ nPrfx, sLocalName),
+ sPropertyChapterFormat(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_chapter_format)),
+ sPropertyLevel(RTL_CONSTASCII_USTRINGPARAM(sAPI_level)),
+ nFormat(ChapterFormat::NAME_NUMBER),
+ nLevel(0)
+{
+ bValid = sal_True;
+}
+
+void XMLChapterImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_DISPLAY:
+ {
+ sal_uInt16 nTmp;
+ if (SvXMLUnitConverter::convertEnum(nTmp, sAttrValue,
+ aChapterDisplayMap))
+ {
+ nFormat = (sal_Int16)nTmp;
+ }
+ break;
+ }
+ case XML_TOK_TEXTFIELD_OUTLINE_LEVEL:
+ {
+ sal_Int32 nTmp;
+ if (SvXMLUnitConverter::convertNumber(
+ nTmp, sAttrValue, 1,
+ GetImport().GetTextImport()->GetChapterNumbering()->getCount()
+ ))
+ {
+ // API numbers 0..9, we number 1..10
+ nLevel = (sal_Int8)nTmp;
+ nLevel--;
+ }
+ break;
+ }
+ default:
+ ; // unknown attribute: ignore
+ break;
+ }
+}
+
+void XMLChapterImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= nFormat;
+ xPropertySet->setPropertyValue(sPropertyChapterFormat, aAny);
+
+ aAny <<= nLevel;
+ xPropertySet->setPropertyValue(sPropertyLevel, aAny);
+}
+
+
+//
+// counting fields
+//
+
+TYPEINIT1( XMLCountFieldImportContext, XMLTextFieldImportContext );
+
+XMLCountFieldImportContext::XMLCountFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName, sal_uInt16 nToken) :
+ XMLTextFieldImportContext(rImport, rHlp, MapTokenToServiceName(nToken),
+ nPrfx, sLocalName),
+ sPropertyNumberingType(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_numbering_type)),
+ sNumberFormat(),
+ sLetterSync(),
+ bNumberFormatOK(sal_False)
+{
+ bValid = sal_True;
+}
+
+void XMLCountFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_NUM_FORMAT:
+ sNumberFormat = sAttrValue;
+ bNumberFormatOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_NUM_LETTER_SYNC:
+ sLetterSync = sAttrValue;
+ break;
+ }
+}
+
+void XMLCountFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= bNumberFormatOK ?
+ SvxXMLListStyleContext::GetNumType(sNumberFormat, sLetterSync) :
+ style::NumberingType::PAGE_DESCRIPTOR;
+ xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+}
+
+const sal_Char* XMLCountFieldImportContext::MapTokenToServiceName(
+ sal_uInt16 nToken)
+{
+ const sal_Char* pServiceName = NULL;
+
+ switch (nToken)
+ {
+ case XML_TOK_TEXT_WORD_COUNT:
+ pServiceName = sAPI_word_count;
+ break;
+ case XML_TOK_TEXT_PARAGRAPH_COUNT:
+ pServiceName = sAPI_paragraph_count;
+ break;
+ case XML_TOK_TEXT_TABLE_COUNT:
+ pServiceName = sAPI_table_count;
+ break;
+ case XML_TOK_TEXT_CHARACTER_COUNT:
+ pServiceName = sAPI_character_count;
+ break;
+ case XML_TOK_TEXT_IMAGE_COUNT:
+ pServiceName = sAPI_graphic_object_count;
+ break;
+ case XML_TOK_TEXT_OBJECT_COUNT:
+ pServiceName = sAPI_embedded_object_count;
+ break;
+ case XML_TOK_TEXT_PAGE_COUNT:
+ pServiceName = sAPI_page_count;
+ break;
+ default:
+ pServiceName = NULL;
+ DBG_ERROR("unknown count field!");
+ break;
+ }
+
+ return pServiceName;
+}
+
+
+
+//
+// page variable import
+//
+
+TYPEINIT1( XMLPageVarGetFieldImportContext, XMLTextFieldImportContext );
+
+XMLPageVarGetFieldImportContext::XMLPageVarGetFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_reference_page_get,
+ nPrfx, sLocalName),
+ sPropertyNumberingType(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_numbering_type)),
+ sNumberFormat(),
+ sLetterSync(),
+ bNumberFormatOK(sal_False)
+{
+ bValid = sal_True;
+}
+
+void XMLPageVarGetFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_NUM_FORMAT:
+ sNumberFormat = sAttrValue;
+ bNumberFormatOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_NUM_LETTER_SYNC:
+ sLetterSync = sAttrValue;
+ break;
+ }
+}
+
+void XMLPageVarGetFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= bNumberFormatOK ?
+ SvxXMLListStyleContext::GetNumType(sNumberFormat, sLetterSync) :
+ style::NumberingType::PAGE_DESCRIPTOR;
+ xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+}
+
+
+
+//
+// page variable set fields
+//
+
+TYPEINIT1(XMLPageVarSetFieldImportContext, XMLTextFieldImportContext);
+
+XMLPageVarSetFieldImportContext::XMLPageVarSetFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_reference_page_set,
+ nPrfx, sLocalName),
+ sPropertyOn(RTL_CONSTASCII_USTRINGPARAM(sAPI_on)),
+ sPropertyOffset(RTL_CONSTASCII_USTRINGPARAM(sAPI_offset)),
+ nAdjust(0),
+ bActive(sal_True)
+{
+ bValid = sal_True;
+}
+
+void XMLPageVarSetFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_ACTIVE:
+ {
+ sal_Bool bTmp;
+ if (SvXMLUnitConverter::convertBool(bTmp, sAttrValue))
+ {
+ bActive = bTmp;
+ }
+ }
+ case XML_TOK_TEXTFIELD_PAGE_ADJUST:
+ {
+ sal_Int32 nTmp;
+ if (SvXMLUnitConverter::convertNumber(nTmp, sAttrValue))
+ {
+ nAdjust = (sal_Int16)nTmp;
+ }
+ }
+ }
+}
+
+void XMLPageVarSetFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny.setValue(&bActive, ::getBooleanCppuType());
+ xPropertySet->setPropertyValue(sPropertyOn, aAny);
+
+ aAny <<= nAdjust;
+ xPropertySet->setPropertyValue(sPropertyOffset, aAny);
+}
+
+
+
+//
+// macro fields
+//
+
+TYPEINIT1( XMLMacroFieldImportContext, XMLTextFieldImportContext );
+
+XMLMacroFieldImportContext::XMLMacroFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_macro,
+ nPrfx, sLocalName),
+ sPropertyHint(RTL_CONSTASCII_USTRINGPARAM(sAPI_hint)),
+ sPropertyMacro(RTL_CONSTASCII_USTRINGPARAM(sAPI_macro)),
+ sMacro(),
+ sDescription(),
+ bDescriptionOK(sal_False)
+{
+}
+
+void XMLMacroFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_DESCRIPTION:
+ sDescription = sAttrValue;
+ bDescriptionOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_NAME:
+ sMacro = sAttrValue;
+ bValid = sal_True;
+ break;
+ }
+}
+
+void XMLMacroFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= sMacro;
+ xPropertySet->setPropertyValue(sPropertyMacro, aAny);
+
+ aAny <<= (bDescriptionOK ? sDescription : GetContent());
+ xPropertySet->setPropertyValue(sPropertyHint, aAny);
+}
+
+
+
+//
+// reference field import
+//
+
+TYPEINIT1( XMLReferenceFieldImportContext, XMLTextFieldImportContext );
+
+XMLReferenceFieldImportContext::XMLReferenceFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nToken, sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_get_reference,
+ nPrfx, sLocalName),
+ nType(ReferenceFieldPart::PAGE_DESC),
+ sName(),
+ bNameOK(sal_False),
+ bTypeOK(sal_False),
+ nElementToken(nToken),
+ sPropertyReferenceFieldPart(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_reference_field_part)),
+ sPropertyReferenceFieldSource(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_reference_field_source)),
+ sPropertySourceName(RTL_CONSTASCII_USTRINGPARAM(sAPI_source_name)),
+ sPropertyCurrentPresentation(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_current_presentation))
+{
+}
+
+static SvXMLEnumMapEntry __READONLY_DATA lcl_aReferenceTypeTokenMap[] =
+{
+ { sXML_page, ReferenceFieldPart::PAGE},
+ { sXML_chapter, ReferenceFieldPart::CHAPTER },
+ { sXML_text, ReferenceFieldPart::TEXT },
+ { sXML_direction, ReferenceFieldPart::UP_DOWN },
+ { sXML_category_and_value, ReferenceFieldPart::CATEGORY_AND_NUMBER },
+ { sXML_caption, ReferenceFieldPart::ONLY_CAPTION },
+ { sXML_value, ReferenceFieldPart::ONLY_SEQUENCE_NUMBER },
+ { 0, 0 }
+};
+
+void XMLReferenceFieldImportContext::StartElement(
+ const Reference<XAttributeList> & xAttrList)
+{
+ bTypeOK = sal_True;
+ switch (nElementToken)
+ {
+ case XML_TOK_TEXT_REFERENCE_REF:
+ nSource = ReferenceFieldSource::REFERENCE_MARK;
+ break;
+ case XML_TOK_TEXT_BOOKMARK_REF:
+ nSource = ReferenceFieldSource::BOOKMARK;
+ break;
+ case XML_TOK_TEXT_FOOTNOTE_REF:
+ nSource = ReferenceFieldSource::FOOTNOTE;
+ break;
+ case XML_TOK_TEXT_ENDNOTE_REF:
+ nSource = ReferenceFieldSource::ENDNOTE;
+ break;
+ case XML_TOK_TEXT_SEQUENCE_REF:
+ nSource = ReferenceFieldSource::SEQUENCE_FIELD;
+ break;
+ default:
+ bTypeOK = sal_False;
+ DBG_ERROR("unknown reference field");
+ break;
+ }
+
+ XMLTextFieldImportContext::StartElement(xAttrList);
+}
+
+
+void XMLReferenceFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_NAME:
+ sName = sAttrValue;
+ bNameOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_REFERENCE_TYPE:
+ {
+ sal_uInt16 nToken;
+ if (SvXMLUnitConverter::convertEnum(nToken, sAttrValue,
+ lcl_aReferenceTypeTokenMap))
+ {
+ nType = nToken;
+ }
+
+ // check for sequence-only-attributes
+ if ( (XML_TOK_TEXT_SEQUENCE_REF != nElementToken) &&
+ ( (nType == ReferenceFieldPart::CATEGORY_AND_NUMBER) ||
+ (nType == ReferenceFieldPart::ONLY_CAPTION) ||
+ (nType == ReferenceFieldPart::ONLY_SEQUENCE_NUMBER) ) )
+ {
+ nType = ReferenceFieldPart::PAGE_DESC;
+ }
+
+ break;
+ }
+ }
+
+ bValid = bTypeOK && bNameOK;
+}
+
+void XMLReferenceFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+
+ aAny <<= nType;
+ xPropertySet->setPropertyValue(sPropertyReferenceFieldPart, aAny);
+
+ aAny <<= nSource;
+ xPropertySet->setPropertyValue(sPropertyReferenceFieldSource, aAny);
+
+ switch (nElementToken)
+ {
+ case XML_TOK_TEXT_REFERENCE_REF:
+ case XML_TOK_TEXT_BOOKMARK_REF:
+ case XML_TOK_TEXT_SEQUENCE_REF:
+ aAny <<= sName;
+ xPropertySet->setPropertyValue(sPropertySourceName, aAny);
+ break;
+
+ case XML_TOK_TEXT_FOOTNOTE_REF:
+ case XML_TOK_TEXT_ENDNOTE_REF:
+ GetImportHelper().ProcessFootnoteReference(sName, xPropertySet);
+ break;
+ }
+
+ aAny <<= GetContent();
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+}
+
+
+
+//
+// field declarations container
+//
+
+enum DdeFieldDeclAttrs
+{
+ XML_TOK_DDEFIELD_NAME,
+ XML_TOK_DDEFIELD_COMMAND,
+ XML_TOK_DDEFIELD_UPDATE
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aDdeDeclAttrTokenMap[] =
+{
+ { XML_NAMESPACE_TEXT, sXML_name, XML_TOK_DDEFIELD_NAME },
+ { XML_NAMESPACE_TEXT, sXML_command, XML_TOK_DDEFIELD_COMMAND },
+ { XML_NAMESPACE_TEXT, sXML_automatic_update, XML_TOK_DDEFIELD_UPDATE },
+ XML_TOKEN_MAP_END
+};
+
+TYPEINIT1( XMLDdeFieldDeclsImportContext, SvXMLImportContext );
+
+XMLDdeFieldDeclsImportContext::XMLDdeFieldDeclsImportContext(
+ SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& sLocalName) :
+ SvXMLImportContext(rImport, nPrfx, sLocalName),
+ aTokenMap(aDdeDeclAttrTokenMap)
+{
+}
+
+SvXMLImportContext * XMLDdeFieldDeclsImportContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const Reference<XAttributeList> & xAttrList )
+{
+ if ( (XML_NAMESPACE_TEXT == nPrefix) &&
+ (0 == rLocalName.compareToAscii(sXML_dde_connection_decl)) )
+ {
+ return new XMLDdeFieldDeclImportContext(GetImport(), nPrefix,
+ rLocalName, aTokenMap);
+ }
+ else
+ {
+ return SvXMLImportContext::CreateChildContext(nPrefix,
+ rLocalName,
+ xAttrList);
+ }
+}
+
+
+
+//
+// import dde field declaration
+//
+
+TYPEINIT1( XMLDdeFieldDeclImportContext, SvXMLImportContext );
+
+XMLDdeFieldDeclImportContext::XMLDdeFieldDeclImportContext(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const OUString& sLocalName, const SvXMLTokenMap& rMap) :
+ SvXMLImportContext(rImport, nPrfx, sLocalName),
+ rTokenMap(rMap),
+ sPropertyDDECommand(RTL_CONSTASCII_USTRINGPARAM(sAPI_dde_command)),
+ sPropertyName(RTL_CONSTASCII_USTRINGPARAM(sAPI_name)),
+ sPropertyIsAutomaticUpdate(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_is_automatic_update))
+{
+ DBG_ASSERT(XML_NAMESPACE_TEXT == nPrfx, "wrong prefix");
+ DBG_ASSERT(0 == sLocalName.compareToAscii(sXML_dde_connection_decl),
+ "wrong name");
+}
+
+void XMLDdeFieldDeclImportContext::StartElement(
+ const Reference<XAttributeList> & xAttrList)
+{
+ OUString sName;
+ OUString sCommand;
+ sal_Bool bUpdate = sal_False;
+ sal_Bool bNameOK = sal_False;
+ sal_Bool bCommandOK = sal_False;
+
+ // process attributes
+ sal_Int32 nLength = xAttrList->getLength();
+ for(sal_Int32 i=0; i<nLength; i++)
+ {
+
+ OUString sLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
+ GetKeyByAttrName( xAttrList->getNameByIndex(i), &sLocalName );
+
+ switch (rTokenMap.Get(nPrefix, sLocalName))
+ {
+ case XML_TOK_DDEFIELD_NAME:
+ sName = xAttrList->getValueByIndex(i);
+ bNameOK = sal_True;
+ break;
+ case XML_TOK_DDEFIELD_COMMAND:
+ sCommand = xAttrList->getValueByIndex(i);
+ bCommandOK = sal_True;
+ break;
+ case XML_TOK_DDEFIELD_UPDATE:
+ {
+ sal_Bool bTmp;
+ if ( SvXMLUnitConverter::convertBool(
+ bTmp, xAttrList->getValueByIndex(i)) )
+ {
+ bUpdate = bTmp;
+ }
+ break;
+ }
+ }
+ }
+
+ // valid data?
+ if (bNameOK && bCommandOK)
+ {
+ // make service name
+ OUStringBuffer sBuf;
+ sBuf.appendAscii(sAPI_fieldmaster_prefix);
+ sBuf.appendAscii(sAPI_dde);
+
+ // create DDE TextFieldMaster
+ Reference<XMultiServiceFactory> xFactory(GetImport().GetModel(),
+ UNO_QUERY);
+ if( xFactory.is() )
+ {
+ Reference<XInterface> xIfc =
+ xFactory->createInstance(sBuf.makeStringAndClear());
+ if( xIfc.is() )
+ {
+ Reference<XPropertySet> xPropSet( xIfc, UNO_QUERY );
+ if (xPropSet.is())
+ {
+ Any aAny;
+
+ aAny <<= sName;
+ xPropSet->setPropertyValue(sPropertyName, aAny);
+
+ aAny <<= sCommand;
+ xPropSet->setPropertyValue(sPropertyDDECommand, aAny);
+
+ aAny.setValue(&bUpdate, ::getBooleanCppuType());
+ xPropSet->setPropertyValue(sPropertyIsAutomaticUpdate,
+ aAny);
+ }
+ // else: ignore
+ }
+ // else: ignore
+ }
+ // else: ignore
+ }
+ // else: ignore
+}
+
+
+
+//
+// DDE field import
+//
+
+TYPEINIT1( XMLDdeFieldImportContext, XMLTextFieldImportContext );
+
+XMLDdeFieldImportContext::XMLDdeFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLTextFieldImportContext(rImport, rHlp, sAPI_dde,
+ nPrfx, sLocalName),
+ sName()
+{
+}
+
+void XMLDdeFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue )
+{
+ if (XML_TOK_TEXTFIELD_NAME == nAttrToken)
+ {
+ sName = sAttrValue;
+ bValid = sal_True;
+ }
+}
+
+void XMLDdeFieldImportContext::EndElement()
+{
+ if (bValid)
+ {
+ // find master
+ OUStringBuffer sBuf;
+ sBuf.appendAscii(sAPI_fieldmaster_prefix);
+ sBuf.appendAscii(sAPI_dde);
+ sBuf.append(sal_Unicode('.'));
+ sBuf.append(sName);
+ OUString sMasterName = sBuf.makeStringAndClear();
+
+ Reference<XTextFieldsSupplier> xTextFieldsSupp(GetImport().GetModel(),
+ UNO_QUERY);
+ Reference<container::XNameAccess> xFieldMasterNameAccess(
+ xTextFieldsSupp->getTextFieldMasters(), UNO_QUERY);
+
+ if (xFieldMasterNameAccess->hasByName(sMasterName))
+ {
+ Reference<XPropertySet> xMaster;
+ Any aAny = xFieldMasterNameAccess->getByName(sMasterName);
+ aAny >>= xMaster;
+
+ // master exists: create text field and attach
+ Reference<XPropertySet> xField;
+ sBuf.appendAscii(sAPI_textfield_prefix);
+ sBuf.appendAscii(sAPI_dde);
+ if (CreateField(xField, sBuf.makeStringAndClear()))
+ {
+ Reference<XDependentTextField> xDepTextField(xField,UNO_QUERY);
+ xDepTextField->attachTextFieldMaster(xMaster);
+
+ // attach field to document
+ Reference<XTextContent> xTextContent(xField, UNO_QUERY);
+ if (xTextContent.is())
+ {
+ GetImportHelper().InsertTextContent(xTextContent);
+
+ // we're lucky. nothing else to prepare.
+ }
+ // else: fail, because text content could not be created
+ }
+ // else: fail, because field could not be created
+ }
+ // else: fail, because no master was found (faulty document?!)
+ }
+ // not valid: ignore
+}
+
+void XMLDdeFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ // empty, since not needed.
+}
diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx
new file mode 100644
index 0000000000..0993865597
--- /dev/null
+++ b/xmloff/source/text/txtftne.cxx
@@ -0,0 +1,389 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtftne.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+/** @#file
+ *
+ * This file implements XMLTextParagraphExport methods to export
+ * - footnotes
+ * - endnotes
+ * - footnote configuration elements
+ * - endnote configuration elements
+ */
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTDOCUMENT_HPP_
+#include <com/sun/star/text/XTextDocument.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_
+#include <com/sun/star/text/XText.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTCONTENT_HPP_
+#include <com/sun/star/text/XTextContent.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XFOOTNOTE_HPP_
+#include <com/sun/star/text/XFootnote.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XFOOTNOTESSUPPLIER_HPP_
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XENDNOTESSUPPLIER_HPP_
+#include <com/sun/star/text/XEndnotesSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_FOOTNOTENUMBERING_HPP_
+#include <com/sun/star/text/FootnoteNumbering.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLNUMFE_HXX
+#include "xmlnumfe.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXP_HXX
+#include "xmlexp.hxx"
+#endif
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+#ifndef _XMLOFF_XMLNUME_HXX
+#include "xmlnume.hxx"
+#endif
+#ifndef _XMLOFF_TXTPARAE_HXX
+#include "txtparae.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::text;
+
+
+void XMLTextParagraphExport::exportTextFootnote(
+ const Reference<XPropertySet> & rPropSet,
+ const OUString& sText,
+ sal_Bool bAutoStyles)
+{
+ // get footnote and associated text
+ Any aAny;
+ aAny = rPropSet->getPropertyValue(sPropertyFootnote);
+ Reference<XFootnote> xFootnote;
+ aAny >>= xFootnote;
+ Reference<XText> xText(xFootnote, UNO_QUERY);
+
+ // are we an endnote?
+ Reference<XServiceInfo> xServiceInfo( xFootnote, UNO_QUERY );
+ sal_Bool bIsEndnote = xServiceInfo->supportsService(sTextEndnoteService);
+
+ if (bAutoStyles)
+ {
+ // handle formatting of citation mark
+ Add( XML_STYLE_FAMILY_TEXT_TEXT, rPropSet );
+
+ // handle formatting within footnote
+ exportTextFootnoteHelper(xFootnote, xText, sText,
+ bAutoStyles, bIsEndnote);
+ }
+ else
+ {
+ // create span (for citation mark) if necessary; footnote content
+ // wil be handled via exportTextFootnoteHelper, exportText
+ OUString sStyle = FindTextStyle( rPropSet );
+ if( sStyle.getLength() )
+ {
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name,
+ sStyle );
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ sXML_span, sal_False, sal_False );
+ exportTextFootnoteHelper(xFootnote, xText, sText,
+ bAutoStyles, bIsEndnote);
+ }
+ else
+ {
+ exportTextFootnoteHelper(xFootnote, xText, sText,
+ bAutoStyles, bIsEndnote);
+ }
+ }
+}
+
+
+void XMLTextParagraphExport::exportTextFootnoteHelper(
+ const Reference<XFootnote> & rFootnote,
+ const Reference<XText> & rText,
+ const OUString& sText,
+ sal_Bool bAutoStyles,
+ sal_Bool bIsEndnote)
+{
+ if (bAutoStyles)
+ {
+ exportText(rText, bAutoStyles);
+ }
+ else
+ {
+ // export reference Id (for reference fields)
+ Reference<XPropertySet> xPropSet(rFootnote, UNO_QUERY);
+ Any aAny = xPropSet->getPropertyValue(sPropertyReferenceId);
+ sal_Int32 nNumber;
+ aAny >>= nNumber;
+ OUStringBuffer aBuf;
+ aBuf.appendAscii("ftn");
+ aBuf.append(nNumber);
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_id,
+ aBuf.makeStringAndClear());
+
+ SvXMLElementExport aNote(GetExport(), XML_NAMESPACE_TEXT,
+ (bIsEndnote ? sXML_endnote : sXML_footnote),
+ sal_False, sal_False);
+ {
+ // handle label vs. automatic numbering
+ OUString sLabel = rFootnote->getLabel();
+ if (sLabel.getLength()>0)
+ {
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_label,
+ sLabel);
+ }
+ SvXMLElementExport aCite(GetExport(), XML_NAMESPACE_TEXT,
+ sXML_citation, sal_False, sal_False);
+ GetExport().GetDocHandler()->characters(sText);
+ }
+
+ exportText(rText, bAutoStyles);
+ }
+}
+
+
+void XMLTextParagraphExport::exportTextFootnoteConfiguration()
+{
+ // footnote settings
+ Reference<XFootnotesSupplier> aFootnotesSupplier(GetExport().GetModel(),
+ UNO_QUERY);
+ Reference<XPropertySet> aFootnoteConfiguration(
+ aFootnotesSupplier->getFootnoteSettings());
+ exportTextFootnoteConfigurationHelper(aFootnoteConfiguration, sal_False);
+
+ // endnote settings
+ Reference<XEndnotesSupplier> aEndnotesSupplier(GetExport().GetModel(),
+ UNO_QUERY);
+ Reference<XPropertySet> aEndnoteConfiguration(
+ aEndnotesSupplier->getEndnoteSettings());
+ exportTextFootnoteConfigurationHelper(aEndnoteConfiguration, sal_True);
+}
+
+
+void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
+ const Reference<XPropertySet> & rFootnoteConfig,
+ sal_Bool bIsEndnote)
+{
+ Any aAny;
+ OUString sTmp;
+
+ // prefix
+ aAny = rFootnoteConfig->getPropertyValue(sPropertyPrefix);
+ aAny >>= sTmp;
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_num_prefix, sTmp);
+
+ // suffix
+ aAny = rFootnoteConfig->getPropertyValue(sPropertySuffix);
+ aAny >>= sTmp;
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_num_suffix, sTmp);
+
+ // citation style ???
+ aAny = rFootnoteConfig->getPropertyValue(sPropertyCharStyleName);
+ aAny >>= sTmp;
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_citation_style_name,
+ sTmp);
+
+ // default/paragraph style
+ aAny = rFootnoteConfig->getPropertyValue(sPropertyParagraphStyleName);
+ aAny >>= sTmp;
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_default_style_name,
+ sTmp);
+
+ // page style
+ aAny = rFootnoteConfig->getPropertyValue(sPropertyPageStyleName);
+ aAny >>= sTmp;
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_page_master_name,
+ sTmp);
+
+ // numbering style
+ aAny = rFootnoteConfig->getPropertyValue(sPropertyNumberingType);
+ sal_Int16 nNumbering;
+ aAny >>= nNumbering;
+ GetExport().AddAttributeASCII(XML_NAMESPACE_STYLE, sXML_num_format,
+ SvxXMLNumRuleExport::GetNumFormatValue(
+ nNumbering));
+ const sal_Char* pLetterSync =
+ SvxXMLNumRuleExport::GetNumLetterSync(nNumbering);
+ if (NULL != pLetterSync)
+ {
+ GetExport().AddAttributeASCII(XML_NAMESPACE_STYLE,
+ sXML_num_letter_sync, pLetterSync);
+ }
+
+ // StartAt / offset
+ aAny = rFootnoteConfig->getPropertyValue(sPropertyStartAt);
+ sal_Int16 nOffset;
+ aAny >>= nOffset;
+ OUStringBuffer sBuffer;
+ SvXMLUnitConverter::convertNumber(sBuffer, (sal_Int32)nOffset);
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_offset,
+ sBuffer.makeStringAndClear());
+
+ // some properties are for footnotes only
+ if (!bIsEndnote)
+ {
+ // footnotes position
+ aAny = rFootnoteConfig->getPropertyValue(
+ sPropertyPositionEndOfDoc);
+ GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT,
+ sXML_footnotes_position,
+ ( (*(sal_Bool *)aAny.getValue()) ?
+ sXML_document : sXML_page ) );
+
+ aAny = rFootnoteConfig->getPropertyValue(sPropertyFootnoteCounting);
+ sal_Int16 nTmp;
+ aAny >>= nTmp;
+ sal_Char* pElement;
+ switch (nTmp)
+ {
+ case FootnoteNumbering::PER_PAGE:
+ pElement = sXML_page;
+ break;
+ case FootnoteNumbering::PER_CHAPTER:
+ pElement = sXML_chapter;
+ break;
+ case FootnoteNumbering::PER_DOCUMENT:
+ default:
+ pElement = sXML_document;
+ break;
+ }
+ GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT,
+ sXML_start_numbering_at,
+ pElement);
+ }
+
+ // element
+ SvXMLElementExport aFootnoteConfigElement(GetExport(),
+ XML_NAMESPACE_TEXT,
+ ( bIsEndnote ?
+ sXML_endnotes_configuration :
+ sXML_footnotes_configuration ),
+ sal_True, sal_True);
+
+ // two element for footnote content
+ if (!bIsEndnote)
+ {
+ {
+ // end notice / quo vadis
+ aAny = rFootnoteConfig->getPropertyValue(
+ sPropertyEndNotice);
+ aAny >>= sTmp;
+ SvXMLElementExport aElem(GetExport(),
+ XML_NAMESPACE_TEXT, sXML_quo_vadis,
+ sal_True, sal_False);
+ GetExport().GetDocHandler()->characters(sTmp);
+ }
+
+ {
+ // begin notice / ergo sum
+ aAny = rFootnoteConfig->getPropertyValue(
+ sPropertyBeginNotice);
+ aAny >>= sTmp;
+ SvXMLElementExport aElem(GetExport(),
+ XML_NAMESPACE_TEXT, sXML_ergo_sum,
+ sal_True, sal_False);
+ GetExport().GetDocHandler()->characters(sTmp);
+ }
+ }
+}
+
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
new file mode 100644
index 0000000000..fef93af483
--- /dev/null
+++ b/xmloff/source/text/txtimp.cxx
@@ -0,0 +1,1012 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtimp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _SOLAR_H
+#include <tools/solar.h>
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SVSTDARR_STRINGSDTOR_DECL
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+#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_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLEFAMILIESSUPPLIER_HPP_
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTCURSOR_HPP_
+#include <com/sun/star/text/XTextCursor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XCHAPTERNUMBERINGSUPPLIER_HPP_
+#include <com/sun/star/text/XChapterNumberingSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFRAMESSUPPLIER_HPP_
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTGRAPHICOBJECTSSUPPLIER_HPP_
+#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTEMBEDDEDOBJECTSSUPPLIER_HPP_
+#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_PRSTYLEI_HXX_
+#include "prstylei.hxx"
+#endif
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNUMFI_HXX
+#include "xmlnumfi.hxx"
+#endif
+#ifndef _XMLOFF_XMLNUMI_HXX
+#include "xmlnumi.hxx"
+#endif
+
+#ifndef _XMLOFF_TXTPARAI_HXX
+#include "txtparai.hxx"
+#endif
+#ifndef _XMLOFF_TXTIMP_HXX
+#include "txtimp.hxx"
+#endif
+#ifndef _XMLOFF_TXTPRMAP_HXX
+#include "txtprmap.hxx"
+#endif
+#ifndef _XMLOFF_TXTIMPPR_HXX
+#include "txtimppr.hxx"
+#endif
+#ifndef _XMLOFF_TXTVFLDI_HXX
+#include "txtvfldi.hxx"
+#endif
+#ifndef _XMLOFF_I18NMAP_HXX
+#include "i18nmap.hxx"
+#endif
+#ifndef _XMLTEXTLISTITEMCONTEXT_HXX
+#include "XMLTextListItemContext.hxx"
+#endif
+#ifndef _XMLTEXTLISTBLOCKCONTEXT_HXX
+#include "XMLTextListBlockContext.hxx"
+#endif
+#ifndef _XMLTEXTFRAMECONTEXT_HXX
+#include "XMLTextFrameContext.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::std;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::xml::sax;
+
+static __FAR_DATA SvXMLTokenMapEntry aTextElemTokenMap[] =
+{
+ { XML_NAMESPACE_TEXT, sXML_p, XML_TOK_TEXT_P },
+ { XML_NAMESPACE_TEXT, sXML_h, XML_TOK_TEXT_H },
+ { XML_NAMESPACE_TEXT, sXML_ordered_list, XML_TOK_TEXT_ORDERED_LIST },
+ { XML_NAMESPACE_TEXT, sXML_unordered_list, XML_TOK_TEXT_UNORDERED_LIST },
+ { XML_NAMESPACE_TEXT, sXML_text_box, XML_TOK_TEXT_TEXTBOX_PAGE },
+ { XML_NAMESPACE_OFFICE, sXML_image, XML_TOK_TEXT_IMAGE_PAGE },
+ { XML_NAMESPACE_TABLE,sXML_table, XML_TOK_TABLE_TABLE },
+// { XML_NAMESPACE_TABLE,sXML_sub_table, XML_TOK_TABLE_SUBTABLE },
+ { XML_NAMESPACE_TEXT, sXML_variable_decls, XML_TOK_TEXT_VARFIELD_DECLS },
+ { XML_NAMESPACE_TEXT, sXML_user_field_decls,XML_TOK_TEXT_USERFIELD_DECLS },
+ { XML_NAMESPACE_TEXT, sXML_sequence_decls, XML_TOK_TEXT_SEQUENCE_DECLS },
+ { XML_NAMESPACE_TEXT, sXML_dde_connection_decls, XML_TOK_TEXT_DDE_DECLS },
+
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aTextPElemTokenMap[] =
+{
+ { XML_NAMESPACE_TEXT, sXML_span, XML_TOK_TEXT_SPAN },
+ { XML_NAMESPACE_TEXT, sXML_tab_stop, XML_TOK_TEXT_TAB_STOP },
+ { XML_NAMESPACE_TEXT, sXML_line_break, XML_TOK_TEXT_LINE_BREAK },
+ { XML_NAMESPACE_TEXT, sXML_s, XML_TOK_TEXT_S },
+
+ { XML_NAMESPACE_TEXT, sXML_footnote, XML_TOK_TEXT_FOOTNOTE },
+ { XML_NAMESPACE_TEXT, sXML_endnote, XML_TOK_TEXT_ENDNOTE },
+ { XML_NAMESPACE_TEXT, sXML_bookmark, XML_TOK_TEXT_BOOKMARK },
+ { XML_NAMESPACE_TEXT, sXML_bookmark_start, XML_TOK_TEXT_BOOKMARK_START },
+ { XML_NAMESPACE_TEXT, sXML_bookmark_end, XML_TOK_TEXT_BOOKMARK_END },
+ { XML_NAMESPACE_TEXT, sXML_reference, XML_TOK_TEXT_REFERENCE },
+ { XML_NAMESPACE_TEXT, sXML_reference_start, XML_TOK_TEXT_REFERENCE_START },
+ { XML_NAMESPACE_TEXT, sXML_reference_end, XML_TOK_TEXT_REFERENCE_END },
+
+ { XML_NAMESPACE_TEXT, sXML_text_box, XML_TOK_TEXT_TEXTBOX },
+ { XML_NAMESPACE_OFFICE, sXML_image, XML_TOK_TEXT_IMAGE },
+
+ // sender fields
+ { XML_NAMESPACE_TEXT, sXML_sender_firstname,XML_TOK_TEXT_SENDER_FIRSTNAME},
+ { XML_NAMESPACE_TEXT, sXML_sender_lastname, XML_TOK_TEXT_SENDER_LASTNAME },
+ { XML_NAMESPACE_TEXT, sXML_sender_initials, XML_TOK_TEXT_SENDER_INITIALS },
+ { XML_NAMESPACE_TEXT, sXML_sender_title, XML_TOK_TEXT_SENDER_TITLE },
+ { XML_NAMESPACE_TEXT, sXML_sender_position, XML_TOK_TEXT_SENDER_POSITION },
+ { XML_NAMESPACE_TEXT, sXML_sender_email, XML_TOK_TEXT_SENDER_EMAIL },
+ { XML_NAMESPACE_TEXT, sXML_sender_phone_private,
+ XML_TOK_TEXT_SENDER_PHONE_PRIVATE },
+ { XML_NAMESPACE_TEXT, sXML_sender_fax, XML_TOK_TEXT_SENDER_FAX },
+ { XML_NAMESPACE_TEXT, sXML_sender_company, XML_TOK_TEXT_SENDER_COMPANY },
+ { XML_NAMESPACE_TEXT, sXML_sender_phone_work,
+ XML_TOK_TEXT_SENDER_PHONE_WORK },
+ { XML_NAMESPACE_TEXT, sXML_sender_street, XML_TOK_TEXT_SENDER_STREET },
+ { XML_NAMESPACE_TEXT, sXML_sender_city, XML_TOK_TEXT_SENDER_CITY },
+ { XML_NAMESPACE_TEXT, sXML_sender_postal_code,
+ XML_TOK_TEXT_SENDER_POSTAL_CODE },
+ { XML_NAMESPACE_TEXT, sXML_sender_country, XML_TOK_TEXT_SENDER_COUNTRY },
+ { XML_NAMESPACE_TEXT, sXML_sender_state_or_province,
+ XML_TOK_TEXT_SENDER_STATE_OR_PROVINCE },
+
+ // misc. document fields
+ { XML_NAMESPACE_TEXT, sXML_author_name, XML_TOK_TEXT_AUTHOR_NAME },
+ { XML_NAMESPACE_TEXT, sXML_author_initials, XML_TOK_TEXT_AUTHOR_INITIALS },
+ { XML_NAMESPACE_TEXT, sXML_date, XML_TOK_TEXT_DATE },
+ { XML_NAMESPACE_TEXT, sXML_time, XML_TOK_TEXT_TIME },
+ { XML_NAMESPACE_TEXT, sXML_page_number, XML_TOK_TEXT_PAGE_NUMBER },
+ { XML_NAMESPACE_TEXT, sXML_page_continuation_string,
+ XML_TOK_TEXT_PAGE_CONTINUATION_STRING },
+
+ // variable fields
+ { XML_NAMESPACE_TEXT, sXML_variable_set, XML_TOK_TEXT_VARIABLE_SET },
+ { XML_NAMESPACE_TEXT, sXML_variable_get, XML_TOK_TEXT_VARIABLE_GET },
+ { XML_NAMESPACE_TEXT, sXML_variable_input, XML_TOK_TEXT_VARIABLE_INPUT },
+ { XML_NAMESPACE_TEXT, sXML_user_field_get, XML_TOK_TEXT_USER_FIELD_GET },
+ { XML_NAMESPACE_TEXT, sXML_user_field_input,XML_TOK_TEXT_USER_FIELD_INPUT},
+ { XML_NAMESPACE_TEXT, sXML_sequence, XML_TOK_TEXT_SEQUENCE },
+ { XML_NAMESPACE_TEXT, sXML_expression, XML_TOK_TEXT_EXPRESSION },
+ { XML_NAMESPACE_TEXT, sXML_text_input, XML_TOK_TEXT_TEXT_INPUT },
+
+ // database fields
+ { XML_NAMESPACE_TEXT, sXML_database_display,
+ XML_TOK_TEXT_DATABASE_DISPLAY },
+ { XML_NAMESPACE_TEXT, sXML_database_next,
+ XML_TOK_TEXT_DATABASE_NEXT },
+ { XML_NAMESPACE_TEXT, sXML_database_select,
+ XML_TOK_TEXT_DATABASE_SELECT },
+ { XML_NAMESPACE_TEXT, sXML_database_row_number,
+ XML_TOK_TEXT_DATABASE_ROW_NUMBER },
+ { XML_NAMESPACE_TEXT, sXML_database_name, XML_TOK_TEXT_DATABASE_NAME },
+
+ // docinfo fields
+ { XML_NAMESPACE_TEXT, sXML_initial_creator,
+ XML_TOK_TEXT_DOCUMENT_CREATION_AUTHOR },
+ { XML_NAMESPACE_TEXT, sXML_description, XML_TOK_TEXT_DOCUMENT_DESCRIPTION},
+ { XML_NAMESPACE_TEXT, sXML_user_info_0,
+ XML_TOK_TEXT_DOCUMENT_INFORMATION_0 },
+ { XML_NAMESPACE_TEXT, sXML_user_info_1,
+ XML_TOK_TEXT_DOCUMENT_INFORMATION_1 },
+ { XML_NAMESPACE_TEXT, sXML_user_info_2,
+ XML_TOK_TEXT_DOCUMENT_INFORMATION_2 },
+ { XML_NAMESPACE_TEXT, sXML_user_info_3,
+ XML_TOK_TEXT_DOCUMENT_INFORMATION_3 },
+ { XML_NAMESPACE_TEXT, sXML_printed_by, XML_TOK_TEXT_DOCUMENT_PRINT_AUTHOR},
+ { XML_NAMESPACE_TEXT, sXML_title, XML_TOK_TEXT_DOCUMENT_TITLE },
+ { XML_NAMESPACE_TEXT, sXML_subject, XML_TOK_TEXT_DOCUMENT_SUBJECT },
+ { XML_NAMESPACE_TEXT, sXML_keywords, XML_TOK_TEXT_DOCUMENT_KEYWORDS },
+ { XML_NAMESPACE_TEXT, sXML_creator, XML_TOK_TEXT_DOCUMENT_SAVE_AUTHOR },
+ { XML_NAMESPACE_TEXT, sXML_editing_cycles,
+ XML_TOK_TEXT_DOCUMENT_REVISION },
+ { XML_NAMESPACE_TEXT, sXML_creation_date,
+ XML_TOK_TEXT_DOCUMENT_CREATION_DATE },
+ { XML_NAMESPACE_TEXT, sXML_creation_time,
+ XML_TOK_TEXT_DOCUMENT_CREATION_TIME },
+ { XML_NAMESPACE_TEXT, sXML_print_date, XML_TOK_TEXT_DOCUMENT_PRINT_DATE },
+ { XML_NAMESPACE_TEXT, sXML_print_time, XML_TOK_TEXT_DOCUMENT_PRINT_TIME },
+ { XML_NAMESPACE_TEXT, sXML_modification_date,
+ XML_TOK_TEXT_DOCUMENT_SAVE_DATE },
+ { XML_NAMESPACE_TEXT, sXML_modification_time,
+ XML_TOK_TEXT_DOCUMENT_SAVE_TIME },
+ { XML_NAMESPACE_TEXT, sXML_editing_duration,
+ XML_TOK_TEXT_DOCUMENT_EDIT_DURATION },
+ { XML_NAMESPACE_TEXT, sXML_user_defined,
+ XML_TOK_TEXT_DOCUMENT_USER_DEFINED },
+
+ // misc fields
+ { XML_NAMESPACE_TEXT, sXML_placeholder, XML_TOK_TEXT_PLACEHOLDER },
+ { XML_NAMESPACE_TEXT, sXML_hidden_text, XML_TOK_TEXT_HIDDEN_TEXT },
+ { XML_NAMESPACE_TEXT, sXML_hidden_paragraph,
+ XML_TOK_TEXT_HIDDEN_PARAGRAPH },
+ { XML_NAMESPACE_TEXT, sXML_conditional_text,
+ XML_TOK_TEXT_CONDITIONAL_TEXT },
+ { XML_NAMESPACE_TEXT, sXML_file_name, XML_TOK_TEXT_FILENAME },
+ { XML_NAMESPACE_TEXT, sXML_chapter, XML_TOK_TEXT_CHAPTER },
+ { XML_NAMESPACE_TEXT, sXML_template_name, XML_TOK_TEXT_TEMPLATENAME },
+ { XML_NAMESPACE_TEXT, sXML_paragraph_count, XML_TOK_TEXT_PARAGRAPH_COUNT },
+ { XML_NAMESPACE_TEXT, sXML_word_count, XML_TOK_TEXT_WORD_COUNT },
+ { XML_NAMESPACE_TEXT, sXML_table_count, XML_TOK_TEXT_TABLE_COUNT },
+ { XML_NAMESPACE_TEXT, sXML_character_count, XML_TOK_TEXT_CHARACTER_COUNT },
+ { XML_NAMESPACE_TEXT, sXML_image_count, XML_TOK_TEXT_IMAGE_COUNT },
+ { XML_NAMESPACE_TEXT, sXML_object_count, XML_TOK_TEXT_OBJECT_COUNT },
+ { XML_NAMESPACE_TEXT, sXML_page_count, XML_TOK_TEXT_PAGE_COUNT },
+ { XML_NAMESPACE_TEXT, sXML_page_variable_get, XML_TOK_TEXT_GET_PAGE_VAR },
+ { XML_NAMESPACE_TEXT, sXML_page_variable_set, XML_TOK_TEXT_SET_PAGE_VAR },
+ { XML_NAMESPACE_TEXT, sXML_execute_macro, XML_TOK_TEXT_MACRO },
+ { XML_NAMESPACE_TEXT, sXML_dde_connection, XML_TOK_TEXT_DDE },
+ { XML_NAMESPACE_TEXT, sXML_reference_get, XML_TOK_TEXT_REFERENCE_REF },
+ { XML_NAMESPACE_TEXT, sXML_bookmark_ref, XML_TOK_TEXT_BOOKMARK_REF },
+ { XML_NAMESPACE_TEXT, sXML_sequence_ref, XML_TOK_TEXT_SEQUENCE_REF },
+ { XML_NAMESPACE_TEXT, sXML_footnote_ref, XML_TOK_TEXT_FOOTNOTE_REF },
+ { XML_NAMESPACE_TEXT, sXML_endnote_ref, XML_TOK_TEXT_ENDNOTE_REF },
+
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aTextPAttrTokenMap[] =
+{
+ { XML_NAMESPACE_TEXT, sXML_style_name, XML_TOK_TEXT_P_STYLE_NAME },
+ { XML_NAMESPACE_TEXT, sXML_cond_style_name,
+ XML_TOK_TEXT_P_COND_STYLE_NAME },
+ { XML_NAMESPACE_TEXT, sXML_level, XML_TOK_TEXT_P_LEVEL },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aTextListBlockAttrTokenMap[] =
+{
+ { XML_NAMESPACE_TEXT, sXML_style_name,
+ XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME },
+ { XML_NAMESPACE_TEXT, sXML_continue_numbering,
+ XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aTextListBlockElemTokenMap[] =
+{
+ { XML_NAMESPACE_TEXT, sXML_list_header, XML_TOK_TEXT_LIST_HEADER },
+ { XML_NAMESPACE_TEXT, sXML_list_item, XML_TOK_TEXT_LIST_ITEM },
+ XML_TOKEN_MAP_END
+};
+
+static __FAR_DATA SvXMLTokenMapEntry aTextFrameAttrTokenMap[] =
+{
+ { XML_NAMESPACE_DRAW, sXML_style_name, XML_TOK_TEXT_FRAME_STYLE_NAME },
+ { XML_NAMESPACE_TEXT, sXML_name, XML_TOK_TEXT_FRAME_NAME },
+ { XML_NAMESPACE_TEXT, sXML_anchor_type, XML_TOK_TEXT_FRAME_ANCHOR_TYPE },
+ { XML_NAMESPACE_TEXT, sXML_anchor_page_number, XML_TOK_TEXT_FRAME_ANCHOR_PAGE_NUMBER },
+ { XML_NAMESPACE_SVG, sXML_x, XML_TOK_TEXT_FRAME_X },
+ { XML_NAMESPACE_SVG, sXML_y, XML_TOK_TEXT_FRAME_Y },
+ { XML_NAMESPACE_SVG, sXML_width, XML_TOK_TEXT_FRAME_WIDTH },
+// { XML_NAMESPACE_FO, sXML_min_width, XML_TOK_TEXT_FRAME_MIN_WIDTH },
+ { XML_NAMESPACE_SVG, sXML_height, XML_TOK_TEXT_FRAME_HEIGHT },
+ { XML_NAMESPACE_FO, sXML_min_height, XML_TOK_TEXT_FRAME_MIN_HEIGHT },
+ { XML_NAMESPACE_TEXT, sXML_chain_next_name, XML_TOK_TEXT_FRAME_NEXT_CHAIN_NAME },
+ { XML_NAMESPACE_XLINK, sXML_href, XML_TOK_TEXT_FRAME_HREF },
+ { XML_NAMESPACE_TEXT, sXML_name, XML_TOK_TEXT_FRAME_FILTER_NAME },
+ XML_TOKEN_MAP_END
+};
+XMLTextImportHelper::XMLTextImportHelper(
+ const Reference < XModel >& rModel,
+ sal_Bool bInsertM, sal_Bool bStylesOnlyM ) :
+ pTextElemTokenMap( 0 ),
+ pTextPElemTokenMap( 0 ),
+ pTextPAttrTokenMap( 0 ),
+ pTextListBlockAttrTokenMap( 0 ),
+ pTextListBlockElemTokenMap( 0 ),
+ pTextFieldAttrTokenMap( NULL ),
+ pTextFrameAttrTokenMap( NULL ),
+ pPrevFrmNames( 0 ),
+ pNextFrmNames( 0 ),
+ pRenameMap( NULL ),
+ bInsertMode( bInsertM ),
+ bStylesOnlyMode( bStylesOnlyM ),
+ sParaStyleName(RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")),
+ sCharStyleName(RTL_CONSTASCII_USTRINGPARAM("CharStyleName")),
+ sHeadingStyleName(RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")),
+ sNumberingLevel(RTL_CONSTASCII_USTRINGPARAM("NumberingLevel")),
+ sNumberingStartValue(RTL_CONSTASCII_USTRINGPARAM("NumberingStartValue")),
+ sNumberingStyleName(RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName")),
+ sNumberingRules(RTL_CONSTASCII_USTRINGPARAM("NumberingRules")),
+ sPropertySequenceNumber(RTL_CONSTASCII_USTRINGPARAM("SequenceNumber")),
+ sNumberingIsNumber(RTL_CONSTASCII_USTRINGPARAM("NumberingIsNumber")),
+ sChainNextName(RTL_CONSTASCII_USTRINGPARAM("ChainNextName")),
+ sChainPrevName(RTL_CONSTASCII_USTRINGPARAM("ChainPrevName"))
+{
+ Reference< XChapterNumberingSupplier > xCNSupplier( rModel, UNO_QUERY );
+
+ if( xCNSupplier.is() )
+ xChapterNumbering = xCNSupplier->getChapterNumberingRules();
+
+ Reference< XStyleFamiliesSupplier > xFamiliesSupp( rModel, UNO_QUERY );
+ DBG_ASSERT( xFamiliesSupp.is(), "no chapter numbering supplier" );
+
+ if( xFamiliesSupp.is() )
+ {
+ Reference< XNameAccess > xFamilies = xFamiliesSupp->getStyleFamilies();
+
+ const OUString aParaStyles(RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles"));
+ if( xFamilies->hasByName( aParaStyles ) )
+ {
+ Any aAny( xFamilies->getByName( aParaStyles ) );
+ aAny >>= xParaStyles;
+ }
+
+ const OUString aCharStyles(RTL_CONSTASCII_USTRINGPARAM("CharacterStyles"));
+ if( xFamilies->hasByName( aCharStyles ) )
+ {
+ Any aAny( xFamilies->getByName( aCharStyles ) );
+ aAny >>= xTextStyles;
+ }
+
+ const OUString aNumStyles(RTL_CONSTASCII_USTRINGPARAM("NumberingStyles"));
+ if( xFamilies->hasByName( aNumStyles ) )
+ {
+ Any aAny( xFamilies->getByName( aNumStyles ) );
+ aAny >>= xNumStyles;
+ }
+
+ const OUString aFrameStyles(RTL_CONSTASCII_USTRINGPARAM("FrameStyles"));
+ if( xFamilies->hasByName( aFrameStyles ) )
+ {
+ Any aAny( xFamilies->getByName( aFrameStyles ) );
+ aAny >>= xFrameStyles;
+ }
+ }
+
+ Reference < XTextFramesSupplier > xTFS( rModel, UNO_QUERY );
+ if( xTFS.is() )
+ xTextFrames = xTFS->getTextFrames();
+
+ Reference < XTextGraphicObjectsSupplier > xTGOS( rModel, UNO_QUERY );
+ if( xTGOS.is() )
+ xGraphics = xTGOS->getGraphicObjects();
+
+ Reference < XTextEmbeddedObjectsSupplier > xTEOS( rModel, UNO_QUERY );
+ if( xTEOS.is() )
+ xObjects = xTEOS->getEmbeddedObjects();
+
+ XMLPropertySetMapper *pPropMapper =
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA );
+ xParaImpPrMap = new XMLTextImportPropertyMapper( pPropMapper );
+
+ pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT );
+ xTextImpPrMap = new XMLTextImportPropertyMapper( pPropMapper );
+
+ pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_FRAME );
+ xFrameImpPrMap = new XMLTextImportPropertyMapper( pPropMapper );
+}
+
+XMLTextImportHelper::~XMLTextImportHelper()
+{
+ delete pTextElemTokenMap;
+ delete pTextPElemTokenMap;
+ delete pTextPAttrTokenMap;
+ delete pTextListBlockAttrTokenMap;
+ delete pTextListBlockElemTokenMap;
+ delete pTextFieldAttrTokenMap;
+ delete pTextFrameAttrTokenMap;
+
+ delete pRenameMap;
+
+ delete pPrevFrmNames;
+ delete pNextFrmNames;
+}
+
+void XMLTextImportHelper::SetCursor( const Reference < XTextCursor > & rCursor )
+{
+ xCursor = rCursor;
+ xText = rCursor->getText();
+ xCursorAsRange = Reference < XTextRange >( rCursor, UNO_QUERY );
+}
+
+void XMLTextImportHelper::ResetCursor()
+{
+ xCursor = 0;
+ xText = 0;
+ xCursorAsRange = 0;
+}
+
+const SvXMLTokenMap& XMLTextImportHelper::GetTextElemTokenMap()
+{
+ if( !pTextElemTokenMap )
+ pTextElemTokenMap = new SvXMLTokenMap( aTextElemTokenMap );
+
+ return *pTextElemTokenMap;
+}
+
+const SvXMLTokenMap& XMLTextImportHelper::GetTextPElemTokenMap()
+{
+ if( !pTextPElemTokenMap )
+ pTextPElemTokenMap = new SvXMLTokenMap( aTextPElemTokenMap );
+
+ return *pTextPElemTokenMap;
+}
+
+const SvXMLTokenMap& XMLTextImportHelper::GetTextPAttrTokenMap()
+{
+ if( !pTextPAttrTokenMap )
+ pTextPAttrTokenMap = new SvXMLTokenMap( aTextPAttrTokenMap );
+
+ return *pTextPAttrTokenMap;
+}
+
+const SvXMLTokenMap& XMLTextImportHelper::GetTextFrameAttrTokenMap()
+{
+ if( !pTextFrameAttrTokenMap )
+ pTextFrameAttrTokenMap = new SvXMLTokenMap( aTextFrameAttrTokenMap );
+
+ return *pTextFrameAttrTokenMap;
+}
+
+sal_Bool XMLTextImportHelper::HasFrameByName( const OUString& rName ) const
+{
+ return ( xTextFrames.is() && xTextFrames->hasByName( rName ) ) ||
+ ( xGraphics.is() && xGraphics->hasByName( rName ) ) ||
+ ( xObjects.is() && xObjects->hasByName( rName ) );
+}
+
+void XMLTextImportHelper::InsertString( const OUString& rChars )
+{
+ DBG_ASSERT( xText.is(), "no text" );
+ DBG_ASSERT( xCursorAsRange.is(), "no range" );
+ if( xText.is() )
+ xText->insertString( xCursorAsRange, rChars, sal_False );
+}
+
+void XMLTextImportHelper::InsertControlCharacter( sal_Int16 nControl )
+{
+ DBG_ASSERT( xText.is(), "no text" );
+ DBG_ASSERT( xCursorAsRange.is(), "no range" );
+ if( xText.is() )
+ xText->insertControlCharacter( xCursorAsRange, nControl, sal_False );
+}
+
+void XMLTextImportHelper::InsertTextContent(
+ Reference < XTextContent > & xContent )
+{
+ DBG_ASSERT( xText.is(), "no text" );
+ DBG_ASSERT( xCursorAsRange.is(), "no range" );
+ if( xText.is() )
+ xText->insertTextContent( xCursorAsRange, xContent, sal_False );
+}
+
+OUString XMLTextImportHelper::SetStyleAndAttrs(
+ const Reference < XTextCursor >& rCursor,
+ const OUString& rStyleName,
+ sal_Bool bPara )
+{
+ XMLPropStyleContext *pStyle = 0;
+ OUString sStyleName( rStyleName );
+ if( sStyleName.getLength() && xAutoStyles.Is() )
+ {
+ sal_uInt32 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH
+ : XML_STYLE_FAMILY_TEXT_TEXT;
+ pStyle = PTR_CAST( XMLPropStyleContext,
+ ((SvXMLStylesContext *)&xAutoStyles)->
+ FindStyleChildContext( nFamily, sStyleName, sal_True ) );
+ }
+ if( pStyle )
+ sStyleName = pStyle->GetParent();
+
+ Reference < XPropertySet > xPropSet( rCursor, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+
+ // style
+ if( sStyleName.getLength() )
+ {
+ const String& rPropName = bPara ? sParaStyleName : sCharStyleName;
+ const Reference < XNameContainer > & rStyles = bPara ? xParaStyles
+ : xTextStyles;
+ if( rStyles.is() &&
+ xPropSetInfo->hasPropertyByName( rPropName ) &&
+ rStyles->hasByName( sStyleName ) )
+ {
+ Any aAny;
+ aAny <<= sStyleName;
+ xPropSet->setPropertyValue( rPropName, aAny );
+ }
+ else
+ sStyleName = OUString();
+ }
+
+ // hard paragraph properties
+ if( pStyle )
+ pStyle->FillPropertySet( xPropSet );
+
+ if( bPara && xPropSetInfo->hasPropertyByName( sNumberingRules ) )
+ {
+ // Set numbering rules
+ Reference < XIndexReplace > xNumRule;
+ Any aAny = xPropSet->getPropertyValue( sNumberingRules );
+ aAny >>= xNumRule;
+
+ if( IsInList() )
+ {
+ OUString sNumRuleName;
+ if( xNumRule.is() &&
+ xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
+ {
+ aAny = xPropSet->getPropertyValue( sNumberingStyleName );
+ aAny >>= sNumRuleName;
+ }
+
+ DBG_ASSERT( !xNumRule.is() || sNumRuleName.getLength(),
+ "num rule name is missing!" );
+ XMLTextListBlockContext *pListBlock = GetListBlock();
+ const OUString& rStyleName = pListBlock->GetRealName();
+ if( !xNumRule.is() ||
+ ( !pListBlock->HasGeneratedStyle() &&
+ sNumRuleName != rStyleName ) )
+ {
+ aAny <<= rStyleName;
+ xPropSet->setPropertyValue( sNumberingStyleName, aAny );
+ }
+
+ XMLTextListItemContext *pListItem = GetListItem();
+
+ sal_Int8 nLevel = pListBlock->GetLevel();
+ if( !pListItem &&
+ xPropSetInfo->hasPropertyByName( sNumberingIsNumber ) )
+ {
+ sal_Bool bTmp = sal_False;
+ aAny.setValue( &bTmp, ::getBooleanCppuType() );
+ xPropSet->setPropertyValue( sNumberingIsNumber, aAny );
+ }
+
+ aAny <<= nLevel;
+ xPropSet->setPropertyValue( sNumberingLevel, aAny );
+
+ if( pListBlock->IsRestartNumbering() )
+ {
+ // TODO: property missing
+ // aNodeNum.SetStart();
+ pListBlock->ResetRestartNumbering();
+ }
+ if( pListItem && pListItem->HasStartValue() &&
+ xPropSetInfo->hasPropertyByName( sNumberingStartValue ) )
+ {
+ aAny <<= pListItem->GetStartValue();
+ xPropSet->setPropertyValue( sNumberingStartValue, aAny );
+ }
+ SetListItem( 0 );
+ }
+ else
+ {
+ // If the paragraph is not in a list but its style, remove it from
+ // the list.
+ if( xNumRule.is() && xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
+ {
+ OUString sTmp;
+ aAny <<= sTmp;
+ xPropSet->setPropertyValue( sNumberingStyleName, aAny );
+ }
+ }
+ }
+
+ return sStyleName;
+}
+
+void XMLTextImportHelper::SetOutlineStyle(
+ sal_Int8 nLevel,
+ const OUString& rStyleName )
+{
+ if( rStyleName.getLength() &&
+ xChapterNumbering.is() &&
+ nLevel > 0 && nLevel <= xChapterNumbering->getCount() )
+ {
+ Sequence < PropertyValue > aProps( 1 );
+ PropertyValue *pProps = aProps.getArray();
+ pProps->Name = sHeadingStyleName;
+ pProps->Value <<= rStyleName;
+
+ Any aAny;
+ aAny <<= aProps;
+ xChapterNumbering->replaceByIndex( (sal_Int32)nLevel-1, aAny );
+ }
+}
+
+void XMLTextImportHelper::SetAutoStyles( SvXMLStylesContext *pStyles )
+{
+ xAutoStyles = pStyles;
+}
+
+SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix, const OUString& rLocalName,
+ const Reference< XAttributeList > & xAttrList,
+ XMLTextType eType )
+{
+ SvXMLImportContext *pContext = 0;
+
+ const SvXMLTokenMap& rTokenMap = GetTextElemTokenMap();
+ sal_Bool bOrdered = sal_False;
+ sal_Bool bHeading = sal_False;
+ switch( rTokenMap.Get( nPrefix, rLocalName ) )
+ {
+ case XML_TOK_TEXT_H:
+ bHeading = sal_True;
+ case XML_TOK_TEXT_P:
+ pContext = new XMLParaContext( rImport, *this,
+ nPrefix, rLocalName,
+ xAttrList, bHeading );
+ break;
+ case XML_TOK_TEXT_ORDERED_LIST:
+ bOrdered = sal_True;
+ case XML_TOK_TEXT_UNORDERED_LIST:
+ pContext = new XMLTextListBlockContext( rImport, *this,
+ nPrefix, rLocalName,
+ xAttrList, bOrdered );
+ break;
+ case XML_TOK_TABLE_TABLE:
+ if( XML_TEXT_TYPE_BODY == eType || XML_TEXT_TYPE_TEXTBOX == eType )
+ pContext = CreateTableChildContext( rImport, nPrefix, rLocalName,
+ xAttrList );
+ break;
+ case XML_TOK_TEXT_SEQUENCE_DECLS:
+ if( XML_TEXT_TYPE_BODY == eType )
+ pContext = new XMLVariableDeclsImportContext(
+ rImport, *this, nPrefix, rLocalName, VarTypeSequence);
+ break;
+
+ case XML_TOK_TEXT_VARFIELD_DECLS:
+ if( XML_TEXT_TYPE_BODY == eType )
+ pContext = new XMLVariableDeclsImportContext(
+ rImport, *this, nPrefix, rLocalName, VarTypeSimple);
+ break;
+
+ case XML_TOK_TEXT_USERFIELD_DECLS:
+ if( XML_TEXT_TYPE_BODY == eType )
+ pContext = new XMLVariableDeclsImportContext(
+ rImport, *this, nPrefix, rLocalName, VarTypeUserField);
+ break;
+
+ case XML_TOK_TEXT_DDE_DECLS:
+ if( XML_TEXT_TYPE_BODY == eType )
+ pContext = new XMLDdeFieldDeclsImportContext(
+ rImport, nPrefix, rLocalName);
+ break;
+
+ case XML_TOK_TEXT_TEXTBOX_PAGE:
+ if( XML_TEXT_TYPE_BODY == eType || XML_TEXT_TYPE_TEXTBOX == eType )
+ {
+ TextContentAnchorType eAnchorType =
+ XML_TEXT_TYPE_TEXTBOX == eType ? TextContentAnchorType_AT_FRAME
+ : TextContentAnchorType_AT_PAGE;
+ pContext = new XMLTextFrameContext( rImport, nPrefix,
+ rLocalName, xAttrList,
+ eAnchorType,
+ XML_TEXT_FRAME_TEXTBOX );
+ }
+ break;
+
+ case XML_TOK_TEXT_IMAGE_PAGE:
+ if( XML_TEXT_TYPE_BODY == eType || XML_TEXT_TYPE_TEXTBOX == eType )
+ {
+ TextContentAnchorType eAnchorType =
+ XML_TEXT_TYPE_TEXTBOX == eType ? TextContentAnchorType_AT_FRAME
+ : TextContentAnchorType_AT_PAGE;
+ pContext = new XMLTextFrameContext( rImport, nPrefix,
+ rLocalName, xAttrList,
+ eAnchorType,
+ XML_TEXT_FRAME_GRAPHIC );
+ }
+ break;
+
+
+ }
+
+// if( !pContext )
+// pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+
+ return pContext;
+}
+
+SvXMLImportContext *XMLTextImportHelper::CreateTableChildContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix, const OUString& rLocalName,
+ const Reference< XAttributeList > & xAttrList )
+{
+ return 0;
+}
+
+/// get data style key for use with NumberFormat property
+sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName)
+{
+ // get appropriate context
+ SvXMLNumFormatContext* pStyle =
+ PTR_CAST( SvXMLNumFormatContext,
+ ((SvXMLStylesContext *)&xAutoStyles)->
+ FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE,
+ sStyleName, sal_True ) );
+
+ // return key or default (-1)
+ return (NULL != pStyle) ? pStyle->GetKey() : -1;
+}
+
+const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUString& rName ) const
+{
+ const SvxXMLListStyleContext *pStyle = 0;
+ if( xAutoStyles.Is() )
+ {
+ pStyle = PTR_CAST( SvxXMLListStyleContext ,
+ ((SvXMLStylesContext *)&xAutoStyles)->
+ FindStyleChildContext( XML_STYLE_FAMILY_TEXT_LIST, rName,
+ sal_True ) );
+ }
+
+ return pStyle;
+}
+
+XMLPropStyleContext *XMLTextImportHelper::FindAutoFrameStyle( const OUString& rName ) const
+{
+ XMLPropStyleContext *pStyle = 0;
+ if( xAutoStyles.Is() )
+ {
+ pStyle = PTR_CAST( XMLPropStyleContext ,
+ ((SvXMLStylesContext *)&xAutoStyles)->
+ FindStyleChildContext( XML_STYLE_FAMILY_SD_GRAPHICS_ID, rName,
+ sal_True ) );
+ }
+
+ return pStyle;
+}
+XMLTextListItemContext *XMLTextImportHelper::GetListItem()
+{
+ return (XMLTextListItemContext *)&xListItem;
+}
+
+void XMLTextImportHelper::SetListItem( XMLTextListItemContext *pListItem )
+{
+ xListItem = pListItem;
+}
+
+XMLTextListBlockContext *XMLTextImportHelper::GetListBlock()
+{
+ return (XMLTextListBlockContext *)&xListBlock;
+}
+
+void XMLTextImportHelper::SetListBlock( XMLTextListBlockContext *pListBlock )
+{
+ xListBlock = pListBlock;
+}
+
+const SvXMLTokenMap& XMLTextImportHelper::GetTextListBlockAttrTokenMap()
+{
+ if( !pTextListBlockAttrTokenMap )
+ pTextListBlockAttrTokenMap =
+ new SvXMLTokenMap( aTextListBlockAttrTokenMap );
+
+ return *pTextListBlockAttrTokenMap;
+}
+
+const SvXMLTokenMap& XMLTextImportHelper::GetTextListBlockElemTokenMap()
+{
+ if( !pTextListBlockElemTokenMap )
+ pTextListBlockElemTokenMap =
+ new SvXMLTokenMap( aTextListBlockElemTokenMap );
+
+ return *pTextListBlockElemTokenMap;
+}
+
+SvI18NMap& XMLTextImportHelper::GetRenameMap()
+{
+ if (NULL == pRenameMap) pRenameMap = new SvI18NMap();
+ return *pRenameMap;
+}
+
+void XMLTextImportHelper::InsertBookmarkStartRange(
+ const OUString sName,
+ const Reference<XTextRange> & rRange)
+{
+ aBookmarkStartRanges[sName] = rRange;
+}
+
+sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange(
+ Reference<XTextRange> & rRange,
+ const OUString sName)
+{
+ if (aBookmarkStartRanges.count(sName))
+ {
+ rRange = aBookmarkStartRanges[sName];
+ aBookmarkStartRanges.erase(sName);
+ return sal_True;
+ }
+ else
+ {
+ return sal_False;
+ }
+}
+
+
+void XMLTextImportHelper::InsertFootnoteID(
+ const OUString sXMLId,
+ sal_Int32 nAPIId)
+{
+/* // insert ID into ID list
+ aFootnoteIDMap[sXMLId] = nAPIId;
+
+ // backpatch old references, if backpatch list exists
+ if (aFootnoteBackpatchList.count(sXMLId))
+ {
+ // aah, we have a backpatch list for this footnote.
+ BackpatchListType & aBackpatchList = aFootnoteBackpatchList[sXMLId];
+
+ // a) remove list from global list
+ aFootnoteBackpatchList.erase(sXMLId);
+
+ // b) for every item, set SequenceNumber
+ Any aAny;
+ aAny <<= nAPIId;
+ for(BackpatchListType::iterator aIter = aBackpatchList.begin();
+ aIter != aBackpatchList.end();
+ aIter++)
+ {
+ (*aIter)->setPropertyValue(sPropertySequenceNumber, aAny);
+ }
+
+ // c) delete list
+ // delete pBackpatchList;
+ }
+*/ // else: no backpatch list -> do nothing
+}
+
+void XMLTextImportHelper::ProcessFootnoteReference(
+ const OUString sXMLId,
+ const Reference<XPropertySet> & xPropSet)
+{
+ if (aFootnoteIDMap.count(sXMLId))
+ {
+ // we know this ID -> set SequenceNumber
+ Any aAny;
+ aAny <<= aFootnoteIDMap[sXMLId];
+ xPropSet->setPropertyValue(sPropertySequenceNumber, aAny);
+ }
+ else
+ {
+/* // ID unknown -> into backpatch list for later fixup
+ if (aFootnoteBackpatchList.count(sXMLId))
+ {
+ // create backpatch list for this footnote if necessary
+ BackpatchListType* pTmp = new BackpatchListType() ;
+ aFootnoteBackpatchList[sXMLId] = *pTmp;
+ }
+
+ // insert footnote
+ Reference<XPropertySet> xNonConstPropSet(xPropSet);
+ aFootnoteBackpatchList[sXMLId].push_back(xNonConstPropSet);
+*/ }
+}
+
+void XMLTextImportHelper::ProcessDanglingFootnoteReferences()
+{
+ // not implemented yet
+}
+
+
+void XMLTextImportHelper::ConnectFrameChains(
+ const OUString& rFrmName,
+ const OUString& rNextFrmName,
+ const Reference < XPropertySet >& rFrmPropSet )
+{
+ if( !rFrmName.getLength() )
+ return;
+
+ if( rNextFrmName.getLength() )
+ {
+ OUString sNextFrmName = GetRenameMap().Get( XML_TEXT_RENAME_TYPE_FRAME,
+ rNextFrmName );
+ if( xTextFrames.is() && xTextFrames->hasByName( sNextFrmName ) )
+ {
+ Any aAny;
+ aAny <<= sNextFrmName;
+ rFrmPropSet->setPropertyValue( sChainNextName, aAny );
+ }
+ else
+ {
+ if( !pPrevFrmNames )
+ {
+ pPrevFrmNames = new SvStringsDtor;
+ pNextFrmNames = new SvStringsDtor;
+ }
+ pPrevFrmNames->Insert( new String( rFrmName ),
+ pPrevFrmNames->Count() );
+ pNextFrmNames->Insert( new String( sNextFrmName ),
+ pNextFrmNames->Count() );
+ }
+ }
+ if( pPrevFrmNames && pPrevFrmNames->Count() )
+ {
+ sal_uInt16 nCount = pPrevFrmNames->Count();
+ for( sal_uInt16 i=0; i<nCount; i++ )
+ {
+ String *pNext = (*pNextFrmNames)[i];
+ if( OUString(*pNext) == rFrmName )
+ {
+ // The previuous frame must exist, because it existing than
+ // inserting the entry
+ String *pPrev = (*pPrevFrmNames)[i];
+
+ Any aAny;
+ aAny <<= OUString( *pPrev );
+ rFrmPropSet->setPropertyValue( sChainPrevName, aAny );
+
+ pPrevFrmNames->Remove( i, 1 );
+ pNextFrmNames->Remove( i, 1 );
+ delete pPrev;
+ delete pNext;
+
+ // There cannot be more than one previous frames
+ break;
+ }
+ }
+ }
+}
diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
new file mode 100644
index 0000000000..f6f8d9ea3e
--- /dev/null
+++ b/xmloff/source/text/txtimppr.cxx
@@ -0,0 +1,355 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtimppr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
+#include <com/sun/star/table/BorderLine.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_VERTORIENTATION_HPP_
+#include <com/sun/star/text/VertOrientation.hpp>
+#endif
+
+#ifndef _XMLOFF_TEXTPRMAP_HXX_
+#include "txtprmap.hxx"
+#endif
+
+#ifndef _XMLOFF_TXTIMPPR_HXX
+#include "txtimppr.hxx"
+#endif
+
+#define XML_LINE_LEFT 0
+#define XML_LINE_RIGHT 0
+#define XML_LINE_TOP 0
+#define XML_LINE_BOTTOM 0
+#define MIN_BORDER_DIST 49
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::table;
+using namespace ::com::sun::star::text;
+
+XMLTextImportPropertyMapper::XMLTextImportPropertyMapper(
+ const UniReference< XMLPropertySetMapper >& rMapper ) :
+ SvXMLImportPropertyMapper( rMapper )
+{
+}
+
+XMLTextImportPropertyMapper::~XMLTextImportPropertyMapper()
+{
+}
+
+void XMLTextImportPropertyMapper::finished(
+ ::std::vector< XMLPropertyState >& rProperties ) const
+{
+ XMLPropertyState* pFontName = 0;
+ XMLPropertyState* pFontStyleName = 0;
+ XMLPropertyState* pFontFamily = 0;
+ XMLPropertyState* pFontPitch = 0;
+ XMLPropertyState* pFontCharSet = 0;
+ XMLPropertyState* pAllBorderDistance = 0;
+ XMLPropertyState* pBorderDistances[4] = { 0, 0, 0, 0 };
+ XMLPropertyState* pNewBorderDistances[4] = { 0, 0, 0, 0 };
+ XMLPropertyState* pAllBorder = 0;
+ XMLPropertyState* pBorders[4] = { 0, 0, 0, 0 };
+ XMLPropertyState* pNewBorders[4] = { 0, 0, 0, 0 };
+ XMLPropertyState* pAllBorderWidth = 0;
+ XMLPropertyState* pBorderWidths[4] = { 0, 0, 0, 0 };
+ XMLPropertyState* pAnchorType = 0;
+ XMLPropertyState* pVertOrient = 0;
+ XMLPropertyState* pVertOrientRelAsChar = 0;
+
+ for( ::std::vector< XMLPropertyState >::iterator property = rProperties.begin();
+ property != rProperties.end();
+ property++ )
+ {
+ switch( getPropertySetMapper()->GetEntryContextId( property->mnIndex ) )
+ {
+ case CTF_FONTNAME: pFontName = property; break;
+ case CTF_FONTSTYLENAME: pFontStyleName = property; break;
+ case CTF_FONTFAMILY: pFontFamily = property; break;
+ case CTF_FONTPITCH: pFontPitch = property; break;
+ case CTF_FONTCHARSET: pFontCharSet = property; break;
+
+ case CTF_ALLBORDERDISTANCE: pAllBorderDistance = property; break;
+ case CTF_LEFTBORDERDISTANCE: pBorderDistances[XML_LINE_LEFT] = property; break;
+ case CTF_RIGHTBORDERDISTANCE: pBorderDistances[XML_LINE_RIGHT] = property; break;
+ case CTF_TOPBORDERDISTANCE: pBorderDistances[XML_LINE_TOP] = property; break;
+ case CTF_BOTTOMBORDERDISTANCE: pBorderDistances[XML_LINE_BOTTOM] = property; break;
+ case CTF_ALLBORDER: pAllBorder = property; break;
+ case CTF_LEFTBORDER: pBorders[XML_LINE_LEFT] = property; break;
+ case CTF_RIGHTBORDER: pBorders[XML_LINE_RIGHT] = property; break;
+ case CTF_TOPBORDER: pBorders[XML_LINE_TOP] = property; break;
+ case CTF_BOTTOMBORDER: pBorders[XML_LINE_BOTTOM] = property; break;
+
+ case CTF_ALLBORDERWIDTH: pAllBorderWidth = property; break;
+ case CTF_LEFTBORDERWIDTH: pBorderWidths[XML_LINE_LEFT] = property; break;
+ case CTF_RIGHTBORDERWIDTH: pBorderWidths[XML_LINE_RIGHT] = property; break;
+ case CTF_TOPBORDERWIDTH: pBorderWidths[XML_LINE_TOP] = property; break;
+ case CTF_BOTTOMBORDERWIDTH: pBorderWidths[XML_LINE_BOTTOM] = property; break;
+ case CTF_ANCHORTYPE: pAnchorType = property; break;
+ case CTF_VERTICALPOS: pVertOrient = property; break;
+ case CTF_VERTICALREL_ASCHAR: pVertOrientRelAsChar = property; break;
+ }
+ }
+
+ if( pFontName )
+ {
+ OUString sName;
+ pFontName->maValue >>= sName;
+ if( !sName.getLength() )
+ {
+ pFontName->mnIndex = -1;
+ pFontName = 0;
+ }
+ }
+ if( !pFontName )
+ {
+ if( pFontStyleName )
+ pFontStyleName->mnIndex = -1;
+ if( pFontFamily )
+ pFontFamily->mnIndex = -1;
+ if( pFontPitch )
+ pFontPitch->mnIndex = -1;
+ if( pFontCharSet )
+ pFontCharSet->mnIndex = -1;
+ }
+
+ for( sal_uInt16 i=0; i<4; i++ )
+ {
+ if( pAllBorderDistance && !pBorderDistances[i] )
+ {
+#ifndef PRODUCT
+ sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
+ pAllBorderDistance->mnIndex + i + 1 );
+ DBG_ASSERT( nTmp >= CTF_LEFTBORDERDISTANCE &&
+ nTmp <= CTF_BOTTOMBORDERDISTANCE,
+ "wrong property context id" );
+#endif
+ pNewBorderDistances[i] =
+ new XMLPropertyState( pAllBorderDistance->mnIndex + i + 1,
+ pAllBorderDistance->maValue );
+ pBorderDistances[i] = pNewBorderDistances[i];
+ }
+ if( pAllBorder && !pBorders[i] )
+ {
+#ifndef PRODUCT
+ sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
+ pAllBorder->mnIndex + i + 1 );
+ DBG_ASSERT( nTmp >= CTF_LEFTBORDER && nTmp <= CTF_BOTTOMBORDER,
+ "wrong property context id" );
+#endif
+ pNewBorders[i] = new XMLPropertyState( pAllBorder->mnIndex + i + 1,
+ pAllBorder->maValue );
+ pBorders[i] = pNewBorders[i];
+ }
+ if( !pBorderWidths[i] )
+ pBorderWidths[i] = pAllBorderWidth;
+ else
+ pBorderWidths[i]->mnIndex = -1;
+
+#ifdef XML_CHECK_UI_CONSTRAINS
+ sal_Bool bHasBorder = sal_False;
+ if( pBorders[i] )
+ {
+ table::BorderLine aBorderLine;
+ pBorders[i]->maValue >>= aBorderLine;
+
+ if( pBorderWidths[i] )
+ {
+ table::BorderLine aBorderLineWidth;
+ pBorderWidths[i]->maValue >>= aBorderLineWidth;
+ aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth;
+ aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth;
+ aBorderLine.LineDistance = aBorderLineWidth.LineDistance;
+
+ pBorders[i]->maValue <<= aBorderLine;
+ }
+ bHasBorder = (aBorderLine.OuterLineWidth +
+ aBorderLine.InnerLineWidth) > 0;
+ }
+ if( bHasBorder )
+ {
+ if( !pBorderDistances[i] )
+ {
+#ifndef PRODUCT
+ sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
+ pBorders[i]->mnIndex + 5 );
+ DBG_ASSERT( nTmp >= CTF_LEFTBORDERDISTANCE &&
+ nTmp <= CTF_BOTTOMBORDERDISTANCE,
+ "wrong property context id" );
+#endif
+
+ pNewBorderDistances[i] =
+ new XMLPropertyState( pBorders[i]->mnIndex + 5 );
+ pNewBorderDistances[i]->maValue <<= (sal_Int32)MIN_BORDER_DIST;
+ pBorderDistances[i] = pNewBorderDistances[i];
+ }
+ else
+ {
+ sal_Int32 nDist;
+ pBorderDistances[i]->maValue >>= nDist;
+ if( nDist < MIN_BORDER_DIST )
+ pBorderDistances[i]->maValue <<= (sal_Int32)MIN_BORDER_DIST;
+ }
+ }
+ else
+ {
+ if( pBorderDistances[i] )
+ {
+ sal_Int32 nDist;
+ pBorderDistances[i]->maValue >>= nDist;
+ if( nDist > 0 )
+ pBorderDistances[i]->maValue <<= (sal_Int32)0;
+ }
+ }
+#else
+ if( pBorders[i] && pBorderWidths[i] )
+ {
+ table::BorderLine aBorderLine;
+ pBorders[i]->maValue >>= aBorderLine;
+
+ table::BorderLine aBorderLineWidth;
+ pBorderWidths[i]->maValue >>= aBorderLineWidth;
+
+ aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth;
+ aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth;
+ aBorderLine.LineDistance = aBorderLineWidth.LineDistance;
+
+ pBorders[i]->maValue <<= aBorderLine;
+ }
+#endif
+ }
+ if( pAllBorderDistance )
+ pAllBorderDistance->mnIndex = -1;
+
+ if( pAllBorder )
+ pAllBorder->mnIndex = -1;
+
+ if( pAllBorderWidth )
+ pAllBorderWidth->mnIndex = -1;
+
+ // insert newly created properties. This inavlidates all iterators!
+ for( i=0; i<4; i++ )
+ {
+ if( pNewBorderDistances[i] )
+ {
+ rProperties.push_back( *pNewBorderDistances[i] );
+ delete pNewBorderDistances[i];
+ }
+ if( pNewBorders[i] )
+ {
+ rProperties.push_back( *pNewBorders[i] );
+ delete pNewBorders[i];
+ }
+ }
+
+ if( pVertOrient && pVertOrientRelAsChar )
+ {
+ TextContentAnchorType eAnchorType;
+ if( pAnchorType && (pAnchorType->maValue >>= eAnchorType) &&
+ TextContentAnchorType_AS_CHARACTER == eAnchorType )
+ {
+ sal_Int16 nVertOrient;
+ pVertOrient->maValue >>= nVertOrient;
+ sal_Int16 nVertOrientRel;
+ pVertOrientRelAsChar->maValue >>= nVertOrientRel;
+ switch( nVertOrient )
+ {
+ case VertOrientation::TOP:
+ nVertOrient = nVertOrientRel;
+ break;
+ case VertOrientation::CENTER:
+ switch( nVertOrientRel )
+ {
+ case VertOrientation::CHAR_TOP:
+ nVertOrient = VertOrientation::CHAR_CENTER;
+ break;
+ case VertOrientation::LINE_TOP:
+ nVertOrient = VertOrientation::LINE_CENTER;
+ break;
+ }
+ break;
+ case VertOrientation::BOTTOM:
+ switch( nVertOrientRel )
+ {
+ case VertOrientation::CHAR_TOP:
+ nVertOrient = VertOrientation::CHAR_BOTTOM;
+ break;
+ case VertOrientation::LINE_TOP:
+ nVertOrient = VertOrientation::LINE_BOTTOM;
+ break;
+ }
+ break;
+ }
+ pVertOrient->maValue <<= nVertOrientRel;
+ }
+ pVertOrientRelAsChar->mnIndex = -1;
+ }
+}
+
+
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
new file mode 100644
index 0000000000..e9fd872d41
--- /dev/null
+++ b/xmloff/source/text/txtparae.cxx
@@ -0,0 +1,1480 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtparae.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SVSTDARR_LONGS_DECL
+#define _SVSTDARR_LONGS
+#include <svtools/svstdarr.hxx>
+#endif
+#ifndef _SVARRAY_HXX
+#include <svtools/svarray.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATION_HPP_
+#include <com/sun/star/container/XEnumeration.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_
+#include <com/sun/star/container/XIndexReplace.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTDOCUMENT_HPP_
+#include <com/sun/star/text/XTextDocument.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_
+#include <com/sun/star/text/XText.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTCONTENT_HPP_
+#include <com/sun/star/text/XTextContent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTRANGE_HPP_
+#include <com/sun/star/text/XTextRange.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELD_HPP_
+#include <com/sun/star/text/XTextField.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XFOOTNOTE_HPP_
+#include <com/sun/star/text/XFootnote.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
+#include <com/sun/star/container/XNamed.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTENTENUMERATIONACCESS_HPP_
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFRAME_HPP_
+#include <com/sun/star/text/XTextFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
+#include <com/sun/star/container/XNamed.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_SIZETYPE_HPP_
+#include <com/sun/star/text/SizeType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_HORIORIENTATION_HPP_
+#include <com/sun/star/text/HoriOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_VERTORIENTATION_HPP_
+#include <com/sun/star/text/VertOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFRAMESSUPPLIER_HPP_
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTGRAPHICOBJECTSSUPPLIER_HPP_
+#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLASTPLP_HXX
+#include "xmlaustp.hxx"
+#endif
+#ifndef _XMLOFF_FAMILIES_HXX_
+#include "families.hxx"
+#endif
+#ifndef _XMLOFF_TXTEXPPR_HXX
+#include "txtexppr.hxx"
+#endif
+#ifndef _XMLOFF_XMLNUMFE_HXX
+#include "xmlnumfe.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_XMLANCHORTYPEPROPHDL_HXX
+#include "XMLAnchorTypePropHdl.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXP_HXX
+#include "xmlexp.hxx"
+#endif
+#ifndef _XMLOFF_TXTFLDE_HXX
+#include "txtflde.hxx"
+#endif
+#ifndef _XMLOFF_TXTPRMAP_HXX
+#include "txtprmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLTEXTNUMRULEINFO_HXX
+#include "XMLTextNumRuleInfo.hxx"
+#endif
+#ifndef _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX
+#include "XMLTextListAutoStylePool.hxx"
+#endif
+#ifndef _XMLOFF_TXTPARAE_HXX
+#include "txtparae.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::std;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::util;
+
+typedef OUString *OUStringPtr;
+SV_DECL_PTRARR_DEL( OUStrings_Impl, OUStringPtr, 20, 10 )
+SV_IMPL_PTRARR( OUStrings_Impl, OUStringPtr )
+
+SV_DECL_PTRARR_SORT_DEL( OUStringsSort_Impl, OUStringPtr, 20, 10 )
+SV_IMPL_OP_PTRARR_SORT( OUStringsSort_Impl, OUStringPtr )
+
+void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
+ const Reference < XPropertySet > & rPropSet )
+{
+ UniReference < XMLPropertySetMapper > xPropMapper;
+ switch( nFamily )
+ {
+ case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
+ xPropMapper = GetParaPropMapper()->getPropertySetMapper();
+ break;
+ case XML_STYLE_FAMILY_TEXT_TEXT:
+ xPropMapper = GetTextPropMapper()->getPropertySetMapper();
+ break;
+ case XML_STYLE_FAMILY_SD_GRAPHICS_ID:
+ xPropMapper = GetAutoFramePropMapper()->getPropertySetMapper();
+ break;
+ }
+ DBG_ASSERT( xPropMapper.is(), "There is the property mapper?" );
+
+ vector< XMLPropertyState > xPropStates =
+ xPropMapper->Filter( rPropSet );
+
+ if( xPropStates.size() > 0L )
+ {
+ Reference< XPropertySetInfo > xPropSetInfo =
+ rPropSet->getPropertySetInfo();
+ OUString sParent, sCondParent;
+ Any aAny;
+ switch( nFamily )
+ {
+ case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
+ if( xPropSetInfo->hasPropertyByName( sParaStyleName ) )
+ {
+ aAny = rPropSet->getPropertyValue( sParaStyleName );
+ aAny >>= sParent;
+ }
+ if( xPropSetInfo->hasPropertyByName( sParaConditionalStyleName ) )
+ {
+ aAny = rPropSet->getPropertyValue( sParaConditionalStyleName );
+ aAny >>= sCondParent;
+ }
+ if( xPropSetInfo->hasPropertyByName( sNumberingRules ) )
+ {
+ aAny = rPropSet->getPropertyValue( sNumberingRules );
+ Reference < XIndexReplace > xNumRule;
+ aAny >>= xNumRule;
+ if( xNumRule.is() )
+ {
+ OUString sName;
+ if( xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
+ {
+ aAny =rPropSet->getPropertyValue( sNumberingStyleName );
+ aAny >>= sName;
+ }
+ DBG_ASSERT( sName.getLength(),"num rule name is missing!" );
+ if( sName.getLength() )
+ {
+ // HasName returns false if the num rule is a style,
+ // because all style names have been registered while
+ // all automatic rules not.
+ if( !pListAutoPool->HasName( sName ) )
+ pListAutoPool->Add( sName, xNumRule );
+ }
+ }
+ }
+ break;
+ case XML_STYLE_FAMILY_TEXT_TEXT:
+ if( xPropSetInfo->hasPropertyByName( sCharStyleName ) )
+ {
+ aAny = rPropSet->getPropertyValue( sCharStyleName );
+ aAny >>= sParent;
+ }
+ break;
+ case XML_STYLE_FAMILY_SD_GRAPHICS_ID:
+ if( xPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ {
+ aAny = rPropSet->getPropertyValue( sFrameStyleName );
+ aAny >>= sParent;
+ }
+ break;
+ }
+
+ GetAutoStylePool().Add( nFamily, sParent, xPropStates );
+ if( sCondParent.getLength() && sParent != sCondParent )
+ GetAutoStylePool().Add( nFamily, sCondParent, xPropStates );
+ }
+}
+
+OUString XMLTextParagraphExport::Find(
+ sal_uInt16 nFamily,
+ const Reference < XPropertySet > & rPropSet,
+ const OUString& rParent ) const
+{
+ OUString sName( rParent );
+ UniReference < XMLPropertySetMapper > xPropMapper;
+ switch( nFamily )
+ {
+ case XML_STYLE_FAMILY_TEXT_PARAGRAPH:
+ xPropMapper = GetParaPropMapper()->getPropertySetMapper();
+ break;
+ case XML_STYLE_FAMILY_TEXT_TEXT:
+ xPropMapper = GetTextPropMapper()->getPropertySetMapper();
+ break;
+ case XML_STYLE_FAMILY_SD_GRAPHICS_ID:
+ xPropMapper = GetAutoFramePropMapper()->getPropertySetMapper();
+ break;
+ }
+ DBG_ASSERT( xPropMapper.is(), "There is the property mapper?" );
+ vector< XMLPropertyState > xPropStates =
+ xPropMapper->Filter( rPropSet );
+
+ if( xPropStates.size() > 0L )
+ sName = GetAutoStylePool().Find( nFamily, sName, xPropStates );
+
+ return sName;
+}
+
+OUString XMLTextParagraphExport::FindTextStyle(
+ const Reference < XPropertySet > & rPropSet ) const
+{
+ Reference< XPropertySetInfo > xPropSetInfo =
+ rPropSet->getPropertySetInfo();
+
+ OUString sStyle;
+ if( xPropSetInfo->hasPropertyByName( sCharStyleName ) )
+ {
+ Any aAny = rPropSet->getPropertyValue( sCharStyleName );
+ aAny >>= sStyle;
+ }
+
+ return Find( XML_STYLE_FAMILY_TEXT_TEXT, rPropSet, sStyle );
+}
+
+
+void XMLTextParagraphExport::exportListChange(
+ const XMLTextNumRuleInfo& rPrevInfo,
+ const XMLTextNumRuleInfo& rNextInfo )
+{
+ // end a list
+ if( rPrevInfo.GetLevel() > 0 &&
+ ( rNextInfo.GetName() != rPrevInfo.GetName() ||
+ rNextInfo.GetLevel() < rPrevInfo.GetLevel() ||
+ rNextInfo.IsRestart() ) )
+ {
+ sal_Int16 nPrevLevel = rPrevInfo.GetLevel();
+ sal_Int16 nNextLevel =
+ ( rNextInfo.GetName() != rPrevInfo.GetName() ||
+ rNextInfo.IsRestart() ) ? 0 : rNextInfo.GetLevel();
+
+ DBG_ASSERT( pListElements &&
+ pListElements->Count() >= 2*(nNextLevel-nPrevLevel),
+ "SwXMLExport::ExportListChange: list elements missing" );
+
+ for( sal_Int16 i=nPrevLevel; i > nNextLevel; i-- )
+ {
+ for( sal_uInt16 j=0; j<2; j++ )
+ {
+ OUString *pElem = (*pListElements)[pListElements->Count()-1];
+ pListElements->Remove( pListElements->Count()-1 );
+
+ GetExport().GetDocHandler()->ignorableWhitespace(
+ GetExport().sWS );
+ GetExport().GetDocHandler()->endElement( *pElem );
+
+ delete pElem;
+ }
+ }
+ }
+
+ // start a new list
+ if( rNextInfo.GetLevel() > 0 &&
+ ( rPrevInfo.GetName() != rNextInfo.GetName() ||
+ rPrevInfo.GetLevel() < rNextInfo.GetLevel() ||
+ rNextInfo.IsRestart() ) )
+ {
+ sal_Int16 nPrevLevel =
+ ( rNextInfo.GetName() != rPrevInfo.GetName() ||
+ rNextInfo.IsRestart() ) ? 0 : rPrevInfo.GetLevel();
+ sal_Int16 nNextLevel = rNextInfo.GetLevel();
+
+ const OUString& rListName = rNextInfo.GetName();
+ sal_Bool bListExported = pExportedLists &&
+ pExportedLists->Seek_Entry( (OUString *)&rListName );
+ sal_Bool bContinue = !rNextInfo.IsRestart() && bListExported &&
+ rPrevInfo.GetName() != rNextInfo.GetName();
+ if( !bListExported )
+ {
+ if( !pExportedLists )
+ pExportedLists = new OUStringsSort_Impl;
+ pExportedLists->Insert( new OUString(rListName) );
+ }
+
+ for( sal_Int16 i=nPrevLevel; i < nNextLevel; i++)
+ {
+ // <text:ordered-list> or <text:unordered-list>
+ GetExport().CheckAttrList();
+ if( 0 == i )
+ {
+ OUString sName( rListName );
+ OUString sTmp( pListAutoPool->Find( sName ) );
+ if( sTmp.getLength() )
+ sName = sTmp;
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name,
+ sName );
+ }
+ if( bContinue && rNextInfo.IsOrdered() )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_TEXT,
+ sXML_continue_numbering,
+ sXML_true );
+
+ const sal_Char *pLName =
+ rNextInfo.IsOrdered() ? sXML_ordered_list
+ : sXML_unordered_list;
+
+ OUString *pElem = new OUString(
+ GetExport().GetNamespaceMap().GetQNameByKey(
+ XML_NAMESPACE_TEXT,
+ OUString::createFromAscii(pLName) ) );
+ GetExport().GetDocHandler()->ignorableWhitespace(
+ GetExport().sWS );
+ GetExport().GetDocHandler()->startElement(
+ *pElem, GetExport().GetXAttrList() );
+ GetExport().ClearAttrList();
+
+ if( !pListElements )
+ pListElements = new OUStrings_Impl;
+ pListElements->Insert( pElem, pListElements->Count() );
+
+ // <text:list-header> or <text:list-item>
+ GetExport().CheckAttrList();
+ if( rNextInfo.HasStartValue() )
+ {
+ OUStringBuffer aBuffer;
+ aBuffer.append( (sal_Int32)rNextInfo.GetStartValue() );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_start_value,
+ aBuffer.makeStringAndClear() );
+ }
+ pLName = (rNextInfo.IsNumbered() || i+1 < nNextLevel)
+ ? sXML_list_item
+ : sXML_list_header;
+ pElem = new OUString( GetExport().GetNamespaceMap().GetQNameByKey(
+ XML_NAMESPACE_TEXT,
+ OUString::createFromAscii(pLName) ) );
+ GetExport().GetDocHandler()->ignorableWhitespace( GetExport().sWS );
+ GetExport().GetDocHandler()->startElement(
+ *pElem, GetExport().GetXAttrList() );
+ GetExport().ClearAttrList();
+
+ pListElements->Insert( pElem, pListElements->Count() );
+ }
+ }
+
+ if( rNextInfo.GetLevel() > 0 && rNextInfo.IsNumbered() &&
+ rPrevInfo.GetName() == rNextInfo.GetName() &&
+ rPrevInfo.GetLevel() >= rNextInfo.GetLevel() &&
+ !rNextInfo.IsRestart() )
+ {
+ // </text:list-item> or </text:list-header>
+ DBG_ASSERT( pListElements && pListElements->Count() >= 2,
+ "SwXMLExport::ExportListChange: list elements missing" );
+
+ OUString *pElem = (*pListElements)[pListElements->Count()-1];
+ GetExport().GetDocHandler()->ignorableWhitespace( GetExport().sWS );
+ GetExport().GetDocHandler()->endElement( *pElem );
+
+ pListElements->Remove( pListElements->Count()-1 );
+ delete pElem;
+
+ // <text:list-item>
+ GetExport().CheckAttrList();
+ pElem = new OUString( GetExport().GetNamespaceMap().GetQNameByKey(
+ XML_NAMESPACE_TEXT,
+ OUString::createFromAscii(sXML_list_item) ) );
+ GetExport().GetDocHandler()->ignorableWhitespace( GetExport().sWS );
+ GetExport().GetDocHandler()->startElement( *pElem,
+ GetExport().GetXAttrList() );
+ GetExport().ClearAttrList();
+
+ pListElements->Insert( pElem, pListElements->Count() );
+ }
+}
+
+XMLTextParagraphExport::XMLTextParagraphExport(
+ SvXMLExport& rExp,
+ SvXMLAutoStylePoolP & rASP ) :
+ XMLStyleExport( rExp, OUString(), &rASP ),
+// rExport( rExp ),
+ rAutoStylePool( rASP ),
+ pListElements( 0 ),
+ pExportedLists( 0 ),
+ pListAutoPool( new XMLTextListAutoStylePool( this->GetExport() ) ),
+ pFieldExport( 0 ),
+ pPageTextFrameIdxs( 0 ),
+ pPageGraphicIdxs( 0 ),
+ pFrameTextFrameIdxs( 0 ),
+ pFrameGraphicIdxs( 0 ),
+ sParagraphService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Paragraph")),
+ sTableService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable")),
+ sTextFieldService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField")),
+ sTextFrameService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")),
+ sTextGraphicService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextGraphicObject")),
+ sTextEmbeddedService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextEmbeddedObject")),
+ sTextEndnoteService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Endnote")),
+ sTextContentService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextContent")),
+ sParaStyleName(RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")),
+ sParaConditionalStyleName(RTL_CONSTASCII_USTRINGPARAM("ParaConditionalStyleName")),
+ sParaChapterNumberingLevel(RTL_CONSTASCII_USTRINGPARAM("ParaChapterNumberingLevel")),
+ sCharStyleName(RTL_CONSTASCII_USTRINGPARAM("CharStyleName")),
+ sFrameStyleName(RTL_CONSTASCII_USTRINGPARAM("FrameStyle")),
+ sTextField(RTL_CONSTASCII_USTRINGPARAM("TextField")),
+ sCategory(RTL_CONSTASCII_USTRINGPARAM("Category")),
+ sNumberingRules(RTL_CONSTASCII_USTRINGPARAM("NumberingRules")),
+ sNumberingStyleName(RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName")),
+ sPropertyTextPortionType(RTL_CONSTASCII_USTRINGPARAM("TextPortionType")),
+ sPropertyFootnote(RTL_CONSTASCII_USTRINGPARAM("Footnote")),
+ sPropertyBookmark(RTL_CONSTASCII_USTRINGPARAM("Bookmark")),
+ sPropertyReferenceMark(RTL_CONSTASCII_USTRINGPARAM("ReferenceMark")),
+ sPropertyIsCollapsed(RTL_CONSTASCII_USTRINGPARAM("IsCollapsed")),
+ sPropertyIsStart(RTL_CONSTASCII_USTRINGPARAM("IsStart")),
+ sPropertyReferenceId(RTL_CONSTASCII_USTRINGPARAM("ReferenceId")),
+ sPropertyCharStyleName(RTL_CONSTASCII_USTRINGPARAM("CharStyleName")),
+ sPropertyNumberingType(RTL_CONSTASCII_USTRINGPARAM("NumberingType")),
+ sPropertyPageStyleName(RTL_CONSTASCII_USTRINGPARAM("PageStyleName")),
+ sPropertyParagraphStyleName(RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")),
+ sPropertyPrefix(RTL_CONSTASCII_USTRINGPARAM("Prefix")),
+ sPropertyStartAt(RTL_CONSTASCII_USTRINGPARAM("StartAt")),
+ sPropertySuffix(RTL_CONSTASCII_USTRINGPARAM("Suffix")),
+ sPropertyPositionEndOfDoc(RTL_CONSTASCII_USTRINGPARAM("PositionEndOfDoc")),
+ sPropertyFootnoteCounting(RTL_CONSTASCII_USTRINGPARAM("FootnoteCounting")),
+ sPropertyEndNotice(RTL_CONSTASCII_USTRINGPARAM("EndNotice")),
+ sPropertyBeginNotice(RTL_CONSTASCII_USTRINGPARAM("BeginNotice")),
+ sFrameWidthAbsolute(RTL_CONSTASCII_USTRINGPARAM("FrameWidthAbsolute")),
+ sFrameWidthPercent(RTL_CONSTASCII_USTRINGPARAM("FrameWidthPercent")),
+ sFrameHeightAbsolute(RTL_CONSTASCII_USTRINGPARAM("FrameHeightAbsolute")),
+ sFrameHeightPercent(RTL_CONSTASCII_USTRINGPARAM("FrameHeightPercent")),
+ sWidth(RTL_CONSTASCII_USTRINGPARAM("Width")),
+ sRelativeWidth(RTL_CONSTASCII_USTRINGPARAM("RelativeWidth")),
+ sHeight(RTL_CONSTASCII_USTRINGPARAM("Height")),
+ sRelativeHeight(RTL_CONSTASCII_USTRINGPARAM("RelativeHeight")),
+ sSizeType(RTL_CONSTASCII_USTRINGPARAM("SizeType")),
+ sSizeRelative(RTL_CONSTASCII_USTRINGPARAM("SizeRelative")),
+ sHoriOrient(RTL_CONSTASCII_USTRINGPARAM("HoriOrient")),
+ sHoriOrientPosition(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")),
+ sVertOrient(RTL_CONSTASCII_USTRINGPARAM("VertOrient")),
+ sVertOrientPosition(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")),
+ sChainNextName(RTL_CONSTASCII_USTRINGPARAM("ChainNextName")),
+ sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType")),
+ sAnchorPageNo(RTL_CONSTASCII_USTRINGPARAM("AnchorPageNo")),
+ sGraphicURL(RTL_CONSTASCII_USTRINGPARAM("GraphicURL")),
+ sGraphicFilter(RTL_CONSTASCII_USTRINGPARAM("GraphicFilter")),
+ sAlternativeText(RTL_CONSTASCII_USTRINGPARAM("AlternativeText"))
+{
+ UniReference < XMLPropertySetMapper > xPropMapper =
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA );
+ xParaPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
+ GetExport() );
+
+ OUString sFamily( RTL_CONSTASCII_USTRINGPARAM(sXML_paragraph) );
+ OUString sPrefix( 'P' );
+ rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_PARAGRAPH, sFamily,
+ xPropMapper, sPrefix );
+
+ xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT );
+ xTextPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
+ GetExport() );
+ sFamily = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_text) );
+ sPrefix = OUString( 'T' );
+ rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_TEXT, sFamily,
+ xPropMapper, sPrefix );
+
+ xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_AUTO_FRAME );
+ xAutoFramePropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
+ GetExport() );
+ sFamily = OUString( RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME) );
+ sPrefix = OUString( 'G' );
+ rAutoStylePool.AddFamily( XML_STYLE_FAMILY_SD_GRAPHICS_ID, sFamily,
+ xPropMapper, sPrefix );
+
+ xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_FRAME );
+ xFramePropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
+ GetExport() );
+
+ pFieldExport = new XMLTextFieldExport( rExp );
+}
+
+XMLTextParagraphExport::~XMLTextParagraphExport()
+{
+ delete pFieldExport;
+ delete pListElements;
+ delete pExportedLists;
+ delete pListAutoPool;
+ delete pPageTextFrameIdxs;
+ delete pPageGraphicIdxs;
+ delete pFrameTextFrameIdxs;
+ delete pFrameGraphicIdxs;
+}
+
+void XMLTextParagraphExport::collectFrames()
+{
+ Reference < XTextFramesSupplier > xTFS( GetExport().GetModel(), UNO_QUERY );
+ if( xTFS.is() )
+ {
+ xTextFrames = Reference < XIndexAccess >( xTFS->getTextFrames(),
+ UNO_QUERY );
+ sal_Int32 nCount = xTextFrames->getCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ Any aAny = xTextFrames->getByIndex( i );
+ Reference < XTextFrame > xTxtFrame;
+ aAny >>= xTxtFrame;
+ Reference < XPropertySet > xPropSet( xTxtFrame, UNO_QUERY );
+
+ aAny = xPropSet->getPropertyValue( sAnchorType );
+ TextContentAnchorType eAnchor;
+ aAny >>= eAnchor;
+
+ switch( eAnchor )
+ {
+ case TextContentAnchorType_AT_PAGE:
+ if( !pPageTextFrameIdxs )
+ pPageTextFrameIdxs = new SvLongs;
+ pPageTextFrameIdxs->Insert( i, pPageTextFrameIdxs->Count() );
+ break;
+ case TextContentAnchorType_AT_FRAME:
+ if( !pFrameTextFrameIdxs )
+ pFrameTextFrameIdxs = new SvLongs;
+ pFrameTextFrameIdxs->Insert( i, pFrameTextFrameIdxs->Count() );
+ break;
+ }
+ }
+ }
+
+ Reference < XTextGraphicObjectsSupplier > xTGOS( GetExport().GetModel(),
+ UNO_QUERY );
+ if( xTGOS.is() )
+ {
+ xGraphics = Reference < XIndexAccess >( xTGOS->getGraphicObjects(),
+ UNO_QUERY );
+ sal_Int32 nCount = xGraphics->getCount();
+ for( sal_Int32 i = 0; i < nCount; i++ )
+ {
+ Any aAny = xGraphics->getByIndex( i );
+ Reference < XTextContent > xTxtCntnt;
+ aAny >>= xTxtCntnt;
+ Reference < XPropertySet > xPropSet( xTxtCntnt, UNO_QUERY );
+
+ aAny = xPropSet->getPropertyValue( sAnchorType );
+ TextContentAnchorType eAnchor;
+ aAny >>= eAnchor;
+
+ switch( eAnchor )
+ {
+ case TextContentAnchorType_AT_PAGE:
+ if( !pPageGraphicIdxs )
+ pPageGraphicIdxs = new SvLongs;
+ pPageGraphicIdxs->Insert( i, pPageGraphicIdxs->Count() );
+ break;
+ case TextContentAnchorType_AT_FRAME:
+ if( !pFrameGraphicIdxs )
+ pFrameGraphicIdxs = new SvLongs;
+ pFrameGraphicIdxs->Insert( i, pFrameGraphicIdxs->Count() );
+ break;
+ }
+ }
+ }
+}
+
+void XMLTextParagraphExport::exportPageFrames( sal_Bool bAutoStyles )
+{
+ if( pPageTextFrameIdxs )
+ {
+ for( sal_Int32 i = 0; i < pPageTextFrameIdxs->Count(); i++ )
+ {
+ Any aAny = xTextFrames->getByIndex( (*pPageTextFrameIdxs)[i] );
+ Reference < XTextFrame > xTxtFrame;
+ aAny >>= xTxtFrame;
+ Reference < XTextContent > xTxtCntnt( xTxtFrame, UNO_QUERY );
+ exportTextFrame( xTxtCntnt, bAutoStyles );
+ }
+ }
+ if( pPageGraphicIdxs )
+ {
+ for( sal_Int32 i = 0; i < pPageGraphicIdxs->Count(); i++ )
+ {
+ Any aAny = xGraphics->getByIndex( (*pPageGraphicIdxs)[i] );
+ Reference < XTextContent > xTxtCntnt;
+ aAny >>= xTxtCntnt;
+ exportTextGraphic( xTxtCntnt, bAutoStyles );
+ }
+ }
+}
+
+void XMLTextParagraphExport::exportText(
+ const Reference < XText > & rText,
+ sal_Bool bAutoStyles )
+{
+ Reference < XEnumerationAccess > xEA( rText, UNO_QUERY );
+ Reference < XEnumeration > xParaEnum = xEA->createEnumeration();
+
+ exportTextContentEnumeration( xParaEnum, bAutoStyles );
+}
+
+void XMLTextParagraphExport::exportTextContentEnumeration(
+ const Reference < XEnumeration > & rContEnum,
+ sal_Bool bAutoStyles )
+{
+ XMLTextNumRuleInfo aPrevNumInfo;
+ XMLTextNumRuleInfo aNextNumInfo;
+
+ while( rContEnum->hasMoreElements() )
+ {
+ Any aAny = rContEnum->nextElement();
+ Reference < XTextContent > xTxtCntnt;
+ aAny >>= xTxtCntnt;
+
+ Reference<XServiceInfo> xServiceInfo( xTxtCntnt, UNO_QUERY );
+ if( xServiceInfo->supportsService( sParagraphService ) )
+ {
+ if( !bAutoStyles )
+ {
+ aNextNumInfo.Set( xTxtCntnt );
+ exportListChange( aPrevNumInfo, aNextNumInfo );
+ }
+ exportParagraph( xTxtCntnt, bAutoStyles );
+ }
+ else if( xServiceInfo->supportsService( sTableService ) )
+ {
+ if( !bAutoStyles )
+ {
+ aNextNumInfo.Reset();
+ exportListChange( aPrevNumInfo, aNextNumInfo );
+ }
+ exportTable( xTxtCntnt, bAutoStyles );
+ }
+ else if( xServiceInfo->supportsService( sTextFrameService ) )
+ {
+ exportTextFrame( xTxtCntnt, bAutoStyles );
+ }
+ else if( xServiceInfo->supportsService( sTextGraphicService ) )
+ {
+ exportTextGraphic( xTxtCntnt, bAutoStyles );
+ }
+ else if( xServiceInfo->supportsService( sTextEmbeddedService ) )
+ {
+ exportTextEmbedded( xTxtCntnt, bAutoStyles );
+ }
+ else
+ {
+ DBG_ASSERT( !xTxtCntnt.is(), "unknown text content" );
+ }
+
+ if( !bAutoStyles )
+ aPrevNumInfo = aNextNumInfo;
+ }
+
+ if( !bAutoStyles )
+ {
+ aNextNumInfo.Reset();
+ exportListChange( aPrevNumInfo, aNextNumInfo );
+ }
+}
+
+void XMLTextParagraphExport::exportParagraph(
+ const Reference < XTextContent > & rTextContent,
+ sal_Bool bAutoStyles )
+{
+ sal_Int8 nOutlineLevel = -1;
+
+ Reference < XPropertySet > xPropSet( rTextContent, UNO_QUERY );
+
+ if( bAutoStyles )
+ {
+ Add( XML_STYLE_FAMILY_TEXT_PARAGRAPH, xPropSet );
+ }
+ else
+ {
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+ OUString sStyle;
+ Any aAny;
+ if( xPropSetInfo->hasPropertyByName( sParaStyleName ) )
+ {
+ aAny = xPropSet->getPropertyValue( sParaStyleName );
+ aAny >>= sStyle;
+ }
+
+ OUString sAutoStyle( sStyle );
+ sAutoStyle = Find( XML_STYLE_FAMILY_TEXT_PARAGRAPH, xPropSet, sStyle );
+ if( sAutoStyle.getLength() )
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name,
+ sAutoStyle );
+
+ if( xPropSetInfo->hasPropertyByName( sParaConditionalStyleName ) )
+ {
+ OUString sCondStyle;
+ aAny = xPropSet->getPropertyValue( sParaConditionalStyleName );
+ aAny >>= sCondStyle;
+ if( sCondStyle != sStyle )
+ {
+ sCondStyle = Find( XML_STYLE_FAMILY_TEXT_PARAGRAPH, xPropSet,
+ sCondStyle );
+ if( sCondStyle.getLength() )
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT,
+ sXML_cond_style_name,
+ sCondStyle );
+ }
+ }
+
+ if( xPropSetInfo->hasPropertyByName( sParaChapterNumberingLevel ) )
+ {
+ aAny = xPropSet->getPropertyValue( sParaChapterNumberingLevel );
+ aAny >>= nOutlineLevel;
+ if( -1 != nOutlineLevel )
+ {
+ OUStringBuffer sTmp;
+ sTmp.append( (sal_Int32)nOutlineLevel+1L );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_level,
+ sTmp.makeStringAndClear() );
+ }
+ }
+ }
+
+ Reference < XEnumerationAccess > xEA( rTextContent, UNO_QUERY );
+ Reference < XEnumeration > xTextEnum = xEA->createEnumeration();
+
+ Reference < XEnumeration> xContentEnum;
+ Reference < XContentEnumerationAccess > xCEA( rTextContent, UNO_QUERY );
+ if( xCEA.is() )
+ xContentEnum = xCEA->createContentEnumeration( sTextContentService );
+
+ if( bAutoStyles )
+ {
+ if( xContentEnum.is() )
+ exportTextContentEnumeration( xContentEnum, bAutoStyles );
+ exportTextRangeEnumeration( xTextEnum, bAutoStyles );
+ }
+ else
+ {
+ const sal_Char *pElem =
+ -1 == nOutlineLevel ? sXML_p : sXML_h;
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, pElem,
+ sal_True, sal_False );
+ if( xContentEnum.is() )
+ exportTextContentEnumeration( xContentEnum, bAutoStyles );
+ exportTextRangeEnumeration( xTextEnum, bAutoStyles );
+ }
+}
+
+// bookmarks, reference marks (and TOC marks) are the same except for the
+// element names. We use the same method for export and it an array with
+// the proper element names
+static const sal_Char* lcl_XmlReferenceElements[] = {
+ sXML_reference, sXML_reference_start, sXML_reference_end };
+static const sal_Char* lcl_XmlBookmarkElements[] = {
+ sXML_bookmark, sXML_bookmark_start, sXML_bookmark_end };
+
+
+void XMLTextParagraphExport::exportTextRangeEnumeration(
+ const Reference < XEnumeration > & rTextEnum,
+ sal_Bool bAutoStyles )
+{
+ sal_Bool bPrevCharIsSpace = sal_False;
+
+ while( rTextEnum->hasMoreElements() )
+ {
+ Any aAny = rTextEnum->nextElement();
+ Reference < XTextRange > xTxtRange;
+ aAny >>= xTxtRange;
+
+ Reference<XServiceInfo> xServiceInfo( xTxtRange, UNO_QUERY );
+ if( xServiceInfo->supportsService( sTextFieldService ) )
+ {
+ exportTextField( xTxtRange, bAutoStyles );
+ bPrevCharIsSpace = sal_False;
+ }
+ else if( xServiceInfo->supportsService( sTextFrameService ) )
+ {
+ Reference < XTextContent > xTxtCntnt( xTxtRange, UNO_QUERY );
+ exportTextFrame( xTxtCntnt, bAutoStyles );
+ bPrevCharIsSpace = sal_False;
+ }
+ else if( xServiceInfo->supportsService( sTextGraphicService ) )
+ {
+ Reference < XTextContent > xTxtCntnt( xTxtRange, UNO_QUERY );
+ exportTextGraphic( xTxtCntnt, bAutoStyles );
+ bPrevCharIsSpace = sal_False;
+ }
+ else if( xServiceInfo->supportsService( sTextEmbeddedService ) )
+ {
+ Reference < XTextContent > xTxtCntnt( xTxtRange, UNO_QUERY );
+ exportTextEmbedded( xTxtCntnt, bAutoStyles );
+ bPrevCharIsSpace = sal_False;
+ }
+ else
+ {
+ Reference<XPropertySet> xPropSet(xTxtRange, UNO_QUERY);
+ Reference<XPropertySetInfo> xPropInfo =
+ xPropSet->getPropertySetInfo();
+
+ if (xPropInfo->hasPropertyByName(sPropertyTextPortionType))
+ {
+ Any aAny;
+ aAny = xPropSet->getPropertyValue(sPropertyTextPortionType);
+ OUString sType;
+ aAny >>= sType;
+
+ if (sType.equals(sPropertyFootnote))
+ {
+ exportTextFootnote(xPropSet,
+ xTxtRange->getString(),
+ bAutoStyles);
+ bPrevCharIsSpace = sal_False;
+ }
+ else if (sType.equals(sPropertyBookmark))
+ {
+ exportTextMark(xPropSet,
+ sPropertyBookmark,
+ lcl_XmlBookmarkElements,
+ bAutoStyles);
+ bPrevCharIsSpace = sal_False;
+ }
+ else if (sType.equals(sPropertyReferenceMark))
+ {
+ exportTextMark(xPropSet,
+ sPropertyReferenceMark,
+ lcl_XmlReferenceElements,
+ bAutoStyles);
+ bPrevCharIsSpace = sal_False;
+ }
+ else if (0 == sType.compareToAscii("Text"))
+ {
+ exportTextRange( xTxtRange, bAutoStyles,
+ bPrevCharIsSpace );
+ }
+ else
+ DBG_ERROR("unknown text portion type");
+ }
+ else
+ {
+ // no TextPortionType property -> non-Writer app -> text
+ exportTextRange( xTxtRange, bAutoStyles, bPrevCharIsSpace );
+ }
+ }
+ }
+}
+
+void XMLTextParagraphExport::exportTable(
+ const Reference < XTextContent > & rTextContent,
+ sal_Bool bAutoStyles )
+{
+}
+
+void XMLTextParagraphExport::exportTextField(
+ const Reference < XTextRange > & rTextRange,
+ sal_Bool bAutoStyles )
+{
+ Reference < XPropertySet > xPropSet( rTextRange, UNO_QUERY );
+ Any aAny = xPropSet->getPropertyValue( sTextField );
+
+ Reference < XTextField > xTxtFld;
+ aAny >>= xTxtFld;
+ DBG_ASSERT( xTxtFld.is(), "text field missing" );
+ if( xTxtFld.is() )
+ {
+ if( bAutoStyles )
+ {
+ Add( XML_STYLE_FAMILY_TEXT_TEXT, xPropSet );
+ pFieldExport->ExportFieldAutoStyle( xTxtFld );
+ }
+ else
+ {
+ OUString sStyle = FindTextStyle( xPropSet );
+ OUString sText = rTextRange->getString();
+ if( sStyle.getLength() )
+ {
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name,
+ sStyle );
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ sXML_span, sal_False, sal_False );
+ pFieldExport->ExportField( xTxtFld );
+ }
+ else
+ {
+ pFieldExport->ExportField( xTxtFld );
+ }
+ }
+ }
+}
+
+void XMLTextParagraphExport::exportTextMark(
+ const Reference<XPropertySet> & rPropSet,
+ const OUString sProperty,
+ const sal_Char* pElements[],
+ sal_Bool bAutoStyles)
+{
+ // mib said: "Hau wech!"
+ //
+ // (Originally, I'd export a span element in case the (book|reference)mark
+ // was formatted. This actually makes a difference in case some pervert
+ // sets a point reference mark in the document and, say, formats it bold.
+ // This basically meaningless formatting will now been thrown away
+ // (aka cleaned up), since mib said: ... dvo
+
+ if (!bAutoStyles)
+ {
+ // get reference (as text content)
+ Any aAny;
+ aAny = rPropSet->getPropertyValue(sProperty);
+ Reference<XTextContent> xRefMark;
+ aAny >>= xRefMark;
+
+ // name element
+ Reference<XNamed> xName(xRefMark, UNO_QUERY);
+ GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_name,
+ xName->getName());
+
+ // start, end, or point-reference?
+ sal_Int8 nElement;
+ aAny = rPropSet->getPropertyValue(sPropertyIsCollapsed);
+ if( *(sal_Bool *)aAny.getValue() )
+ {
+ nElement = 0;
+ }
+ else
+ {
+ aAny = rPropSet->getPropertyValue(sPropertyIsStart);
+ nElement = *(sal_Bool *)aAny.getValue() ? 1 : 2;
+ }
+
+ // export element
+ DBG_ASSERT(pElements != NULL, "illegal element array");
+ DBG_ASSERT(nElement >= 0, "illegal element number");
+ DBG_ASSERT(nElement <= 2, "illegal element number");
+ SvXMLElementExport(GetExport(),
+ XML_NAMESPACE_TEXT, pElements[nElement],
+ sal_False, sal_False);
+ }
+ // else: no styles. (see above)
+}
+
+void XMLTextParagraphExport::addTextFrameAttributes(
+ const Reference < XPropertySet >& rPropSet )
+{
+ // text:name
+ Reference < XNamed > xNamed( rPropSet, UNO_QUERY );
+ if( xNamed.is() )
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_name,
+ xNamed->getName() );
+
+ Any aAny;
+ OUStringBuffer sValue;
+
+ // text:anchor-type
+ aAny = rPropSet->getPropertyValue( sAnchorType );
+ TextContentAnchorType eAnchor = TextContentAnchorType_AT_PARAGRAPH;
+ aAny >>= eAnchor;
+ {
+ XMLAnchorTypePropHdl aAnchorTypeHdl;
+ OUString sTmp;
+ aAnchorTypeHdl.exportXML( sTmp, aAny,
+ GetExport().GetMM100UnitConverter() );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_anchor_type, sTmp );
+ }
+
+ // text:anchor-page-number
+ if( TextContentAnchorType_AT_PAGE == eAnchor )
+ {
+ aAny = rPropSet->getPropertyValue( sAnchorPageNo );
+ sal_Int16 nPage;
+ aAny >>= nPage;
+ GetExport().GetMM100UnitConverter().convertNumber( sValue,
+ (sal_Int32)nPage );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_anchor_page_number,
+ sValue.makeStringAndClear() );
+ }
+
+ // svg:x
+ sal_Int16 nHoriOrient = HoriOrientation::NONE;
+ aAny = rPropSet->getPropertyValue( sHoriOrient );
+ aAny >>= nHoriOrient;
+ if( HoriOrientation::NONE == nHoriOrient )
+ {
+ sal_Int32 nPos = 0;
+ Any aAny = rPropSet->getPropertyValue( sHoriOrientPosition );
+ aAny >>= nPos;
+ GetExport().GetMM100UnitConverter().convertMeasure( sValue, nPos );
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_x,
+ sValue.makeStringAndClear() );
+ }
+
+ // svg:y
+ sal_Int16 nVertOrient = VertOrientation::NONE;
+ aAny = rPropSet->getPropertyValue( sVertOrient );
+ aAny >>= nVertOrient;
+ if( VertOrientation::NONE == nVertOrient )
+ {
+ sal_Int32 nPos = 0;
+ Any aAny = rPropSet->getPropertyValue( sVertOrientPosition );
+ aAny >>= nPos;
+ GetExport().GetMM100UnitConverter().convertMeasure( sValue, nPos );
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_y,
+ sValue.makeStringAndClear() );
+ }
+
+
+ // svg:width
+ sal_Int16 nRelWidth = 0;
+ aAny = rPropSet->getPropertyValue( sRelativeWidth );
+ aAny >>= nRelWidth;
+ DBG_ASSERT( nRelWidth >= 0 && nRelWidth <= 100,
+ "Got illegal relative width from API" );
+ if( nRelWidth > 0 )
+ {
+ // TODO: instead of checking this value for 255 a new property
+ // must be introduced like for heights.
+ if( nRelWidth != 255 )
+ GetExport().GetMM100UnitConverter().convertPercent( sValue,
+ nRelWidth );
+ }
+ else
+ {
+ sal_Int32 nWidth = 0;
+ aAny = rPropSet->getPropertyValue( sWidth );
+ aAny >>= nWidth;
+ GetExport().GetMM100UnitConverter().convertMeasure( sValue, nWidth );
+ }
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_width,
+ sValue.makeStringAndClear() );
+
+ // svg:height or fo:min-height
+ aAny = rPropSet->getPropertyValue( sSizeRelative );
+ sal_Bool bSyncHeight = *(sal_Bool *)aAny.getValue();
+
+ Reference< XPropertySetInfo > xPropSetInfo = rPropSet->getPropertySetInfo();
+ sal_Int16 nSizeType = SizeType::FIX;
+ if( xPropSetInfo->hasPropertyByName( sSizeType ) )
+ {
+ aAny = rPropSet->getPropertyValue( sSizeType );
+ aAny >>= nSizeType;
+ }
+
+ DBG_ASSERT( !bSyncHeight || SizeType::VARIABLE != nSizeType,
+ "sync height and variable size unexpected" );
+
+ if( !bSyncHeight && SizeType::VARIABLE != nSizeType )
+ {
+ sal_Int16 nRelHeight = 0;
+ aAny = rPropSet->getPropertyValue( sRelativeHeight );
+ aAny >>= nRelHeight;
+ if( nRelHeight > 0 )
+ {
+ GetExport().GetMM100UnitConverter().convertPercent( sValue,
+ nRelHeight );
+ }
+ else
+ {
+ sal_Int32 nHeight = 0;
+ aAny = rPropSet->getPropertyValue( sHeight );
+ aAny >>= nHeight;
+ GetExport().GetMM100UnitConverter().convertMeasure( sValue,
+ nHeight );
+ }
+ if( SizeType::MIN == nSizeType )
+ GetExport().AddAttribute( XML_NAMESPACE_FO, sXML_min_height,
+ sValue.makeStringAndClear() );
+ else
+ GetExport().AddAttribute( XML_NAMESPACE_SVG, sXML_height,
+ sValue.makeStringAndClear() );
+ }
+}
+
+void XMLTextParagraphExport::exportTextFrame(
+ const Reference < XTextContent > & rTxtCntnt,
+ sal_Bool bAutoStyles )
+{
+ Reference < XPropertySet > xPropSet( rTxtCntnt, UNO_QUERY );
+ Reference < XTextFrame > xTxtFrame( rTxtCntnt, UNO_QUERY );
+ Reference < XText > xTxt = xTxtFrame->getText();
+
+ if( bAutoStyles )
+ {
+ Add( XML_STYLE_FAMILY_SD_GRAPHICS_ID, xPropSet );
+ exportText( xTxt, bAutoStyles );
+ }
+ else
+ {
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+ OUString sStyle;
+ Any aAny;
+ if( xPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ {
+ aAny = xPropSet->getPropertyValue( sFrameStyleName );
+ aAny >>= sStyle;
+ }
+
+ OUString sAutoStyle( sStyle );
+ sAutoStyle = Find( XML_STYLE_FAMILY_SD_GRAPHICS_ID, xPropSet, sStyle );
+ if( sAutoStyle.getLength() )
+ GetExport().AddAttribute( XML_NAMESPACE_DRAW, sXML_style_name,
+ sAutoStyle );
+ addTextFrameAttributes( xPropSet );
+
+ // text:chain-next-name
+ if( xPropSetInfo->hasPropertyByName( sChainNextName ) )
+ {
+ OUString sNext;
+ aAny = xPropSet->getPropertyValue( sChainNextName );
+ if( (aAny >>= sNext) && sNext.getLength() > 0 )
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT,
+ sXML_chain_next_name,
+ sNext );
+ }
+
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ sXML_text_box, sal_False, sal_True );
+ exportText( xTxt, sal_False );
+ }
+}
+
+void XMLTextParagraphExport::exportTextGraphic(
+ const Reference < XTextContent > & rTextContent,
+ sal_Bool bAutoStyles )
+{
+ Reference < XPropertySet > xPropSet( rTextContent, UNO_QUERY );
+
+ if( bAutoStyles )
+ {
+ Add( XML_STYLE_FAMILY_SD_GRAPHICS_ID, xPropSet );
+ }
+ else
+ {
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+ OUString sStyle;
+ Any aAny;
+ if( xPropSetInfo->hasPropertyByName( sFrameStyleName ) )
+ {
+ aAny = xPropSet->getPropertyValue( sFrameStyleName );
+ aAny >>= sStyle;
+ }
+
+ OUString sAutoStyle( sStyle );
+ sAutoStyle = Find( XML_STYLE_FAMILY_SD_GRAPHICS_ID, xPropSet, sStyle );
+ if( sAutoStyle.getLength() )
+ GetExport().AddAttribute( XML_NAMESPACE_DRAW, sXML_style_name,
+ sAutoStyle );
+ addTextFrameAttributes( xPropSet );
+
+ // xlink:href
+ OUString sURL;
+ aAny = xPropSet->getPropertyValue( sGraphicURL );
+ aAny >>= sURL;
+ GetExport().AddAttribute(XML_NAMESPACE_XLINK, sXML_href, sURL );
+ GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type,
+ sXML_simple );
+ GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_show,
+ sXML_embed );
+ GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate,
+ sXML_onRequest );
+
+ // office:filter-name
+ OUString sGrfFilter;
+ aAny = xPropSet->getPropertyValue( sGraphicFilter );
+ aAny >>= sGrfFilter;
+ if( sGrfFilter.getLength() )
+ GetExport().AddAttribute( XML_NAMESPACE_OFFICE, sXML_filter_name,
+ sGrfFilter );
+
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_OFFICE,
+ sXML_image, sal_False, sal_True );
+
+ // svg:desc
+ OUString sAltText;
+ aAny = xPropSet->getPropertyValue( sAlternativeText );
+ aAny >>= sAltText;
+ if( sAltText.getLength() )
+ {
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_OFFICE,
+ sXML_desc, sal_True, sal_False );
+ GetExport().GetDocHandler()->characters( sAltText );
+ }
+ }
+}
+
+void XMLTextParagraphExport::exportTextEmbedded(
+ const Reference < XTextContent > & rTxtCntnt,
+ sal_Bool bAutoStyles )
+{
+}
+
+void XMLTextParagraphExport::exportTextRange(
+ const Reference < XTextRange > & rTextRange,
+ sal_Bool bAutoStyles,
+ sal_Bool& rPrevCharIsSpace )
+{
+ Reference < XPropertySet > xPropSet( rTextRange, UNO_QUERY );
+ if( bAutoStyles )
+ {
+ Add( XML_STYLE_FAMILY_TEXT_TEXT, xPropSet );
+ }
+ else
+ {
+ OUString sStyle = FindTextStyle( xPropSet );
+ OUString sText = rTextRange->getString();
+ if( sStyle.getLength() )
+ {
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_style_name,
+ sStyle );
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ sXML_span, sal_False, sal_False );
+ exportText( sText, rPrevCharIsSpace );
+ }
+ else
+ {
+ exportText( sText, rPrevCharIsSpace );
+ }
+ }
+}
+
+void XMLTextParagraphExport::exportText( const OUString& rText,
+ sal_Bool& rPrevCharIsSpace )
+{
+ sal_Int32 nExpStartPos = 0L;
+ sal_Int32 nEndPos = rText.getLength();
+ sal_Int32 nSpaceChars = 0;
+ for( sal_Int32 nPos = 0; nPos < nEndPos; nPos++ )
+ {
+ sal_Unicode cChar = rText[nPos];
+ sal_Bool bExpCharAsText = sal_True;
+ sal_Bool bExpCharAsElement = sal_False;
+ sal_Bool bCurrCharIsSpace = sal_False;
+ switch( cChar )
+ {
+ case 0x0009: // Tab
+ case 0x000A: // LF
+ // These characters are exported as text.
+ bExpCharAsElement = sal_True;
+ bExpCharAsText = sal_False;
+ break;
+ case 0x0020: // Blank
+ if( rPrevCharIsSpace )
+ {
+ // If the previous character is a space character,
+ // too, export a special space element.
+ bExpCharAsText = sal_False;
+ }
+ bCurrCharIsSpace = sal_True;
+ break;
+ }
+
+ // If the current character is not exported as text
+ // the text that has not been exported by now has to be exported now.
+ if( nPos > nExpStartPos && !bExpCharAsText )
+ {
+ DBG_ASSERT( 0==nSpaceChars, "pending spaces" );
+ OUString sExp( rText.copy( nExpStartPos, nPos - nExpStartPos ) );
+ GetExport().GetDocHandler()->characters( sExp );
+ nExpStartPos = nPos;
+ }
+
+ // If there are spaces left that have not been exported and the
+ // current chracter is not a space , the pending spaces have to be
+ // exported now.
+ if( nSpaceChars > 0 && !bCurrCharIsSpace )
+ {
+ DBG_ASSERT( nExpStartPos == nPos, " pending characters" );
+
+ if( nSpaceChars > 1 )
+ {
+ OUStringBuffer sTmp;
+ sTmp.append( (sal_Int32)nSpaceChars );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_c,
+ sTmp.makeStringAndClear() );
+ }
+
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ sXML_s, sal_False, sal_False );
+
+ nSpaceChars = 0;
+ }
+
+ // If the current character has to be exported as a special
+ // element, the elemnt will be exported now.
+ if( bExpCharAsElement )
+ {
+ switch( cChar )
+ {
+ case 0x0009: // Tab
+ {
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ sXML_tab_stop, sal_False,
+ sal_False );
+ }
+ break;
+ case 0x000A: // LF
+ {
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ sXML_line_break, sal_False,
+ sal_False );
+ }
+ break;
+ }
+ }
+
+ // If the current character is a space, and the previous one
+ // is a space, too, the number of pending spaces is incremented
+ // only.
+ if( bCurrCharIsSpace && rPrevCharIsSpace )
+ nSpaceChars++;
+ rPrevCharIsSpace = bCurrCharIsSpace;
+
+ // If the currect character is not exported as text, the start
+ // position for text is the position behind the current position.
+ if( !bExpCharAsText )
+ {
+ DBG_ASSERT( nExpStartPos == nPos, "wrong export start pos" );
+ nExpStartPos = nPos+1;
+ }
+ }
+
+ if( nExpStartPos < nEndPos )
+ {
+ DBG_ASSERT( 0==nSpaceChars, " pending spaces " );
+ OUString sExp( rText.copy( nExpStartPos, nEndPos - nExpStartPos ) );
+ GetExport().GetDocHandler()->characters( sExp );
+ }
+
+ // If there are some spaces left, they have to be exported now.
+ if( nSpaceChars > 0 )
+ {
+ if( nSpaceChars > 1 )
+ {
+ OUStringBuffer sTmp;
+ sTmp.append( (sal_Int32)nSpaceChars );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, sXML_c,
+ sTmp.makeStringAndClear() );
+ }
+
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT, sXML_s,
+ sal_False, sal_False );
+ }
+}
+
+void XMLTextParagraphExport::exportTextDeclarations()
+{
+ pFieldExport->ExportFieldDeclarations();
+}
+
+void XMLTextParagraphExport::exportTextAutoStyles()
+{
+ GetAutoStylePool().exportXML( XML_STYLE_FAMILY_TEXT_PARAGRAPH,
+ *GetParaPropMapper().get(),
+ GetExport().GetDocHandler(),
+ GetExport().GetMM100UnitConverter(),
+ GetExport().GetNamespaceMap() );
+
+ GetAutoStylePool().exportXML( XML_STYLE_FAMILY_TEXT_TEXT,
+ *GetTextPropMapper().get(),
+ GetExport().GetDocHandler(),
+ GetExport().GetMM100UnitConverter(),
+ GetExport().GetNamespaceMap() );
+
+ GetAutoStylePool().exportXML( XML_STYLE_FAMILY_SD_GRAPHICS_ID,
+ *GetAutoFramePropMapper().get(),
+ GetExport().GetDocHandler(),
+ GetExport().GetMM100UnitConverter(),
+ GetExport().GetNamespaceMap() );
+
+ pListAutoPool->exportXML();
+}
+
+
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
new file mode 100644
index 0000000000..7f91db561b
--- /dev/null
+++ b/xmloff/source/text/txtparai.cxx
@@ -0,0 +1,821 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtparai.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _RTL_USTRING_HXX_
+#include <rtl/ustring.hxx>
+#endif
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _SVARRAY_HXX
+#include <svtools/svarray.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_
+//#include <com/sun/star/text/XText.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTCURSOR_HPP_
+#include <com/sun/star/text/XTextCursor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_CONTROLCHARACTER_HPP_
+#include <com/sun/star/text/ControlCharacter.hpp>
+#endif
+
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_TXTIMP_HXX
+#include "txtimp.hxx"
+#endif
+#ifndef _XMLOFF_TXTPARAI_HXX
+#include "txtparai.hxx"
+#endif
+#ifndef _XMLOFF_TXTFLDI_HXX
+#include "txtfldi.hxx"
+#endif
+#ifndef _XMLOFF_XMLFOOTNOTEIMPORTCONTEXT_HXX
+#include "XMLFootnoteImportContext.hxx"
+#endif
+#ifndef _XMLOFF_XMLTEXTMARKIMPORTCONTEXT_HXX
+#include "XMLTextMarkImportContext.hxx"
+#endif
+#ifndef _XMLTEXTFRAMECONTEXT_HXX
+#include "XMLTextFrameContext.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::text;
+
+
+// ---------------------------------------------------------------------
+
+class XMLHint_Impl
+{
+ OUString sStyleName; // SfxItemSet aItemSet;
+ Reference < XTextRange > xStart; // xub_StrLen nStart;
+ Reference < XTextRange > xEnd; // xub_StrLen nEnd;
+
+ sal_Bool bReference;
+
+public:
+
+ XMLHint_Impl( const OUString& rStyleName,
+ const Reference < XTextRange > & rPos,
+ sal_Bool bRef = sal_False ) :
+ sStyleName( rStyleName ),
+ xStart( rPos ),
+ bReference( bRef )
+ {
+ if( !bReference )
+ xEnd = rPos;
+ }
+
+ const OUString& GetStyleName() const { return sStyleName; }
+ const Reference < XTextRange > & GetStart() const { return xStart; }
+ const Reference < XTextRange > & GetEnd() const { return xEnd; }
+ void SetEnd( const Reference < XTextRange > & rPos ) { xEnd = rPos; }
+ sal_Bool IsReference() { return bReference; }
+};
+
+typedef XMLHint_Impl *XMLHint_ImplPtr;
+SV_DECL_PTRARR_DEL( XMLHints_Impl, XMLHint_ImplPtr, 5, 5 )
+SV_IMPL_PTRARR( XMLHints_Impl, XMLHint_ImplPtr )
+
+// ---------------------------------------------------------------------
+
+class XMLImpCharContext_Impl : public SvXMLImportContext
+{
+public:
+
+ TYPEINFO();
+
+ XMLImpCharContext_Impl(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ sal_Unicode c,
+ sal_Bool bCount );
+ XMLImpCharContext_Impl(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImport, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ sal_Int16 nControl );
+
+ virtual ~XMLImpCharContext_Impl();
+};
+
+TYPEINIT1( XMLImpCharContext_Impl, SvXMLImportContext );
+
+XMLImpCharContext_Impl::XMLImpCharContext_Impl(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ sal_Unicode c,
+ sal_Bool bCount ) :
+ SvXMLImportContext( rImport, nPrfx, rLName )
+{
+ sal_uInt16 nCount = 1;
+
+ if( bCount )
+ {
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ if( XML_NAMESPACE_TEXT == nPrefix &&
+ aLocalName.compareToAscii( sXML_c ) == 0 )
+ {
+ sal_Int32 nTmp = xAttrList->getValueByIndex(i).toInt32();
+ if( nTmp > 0L )
+ {
+ if( nTmp > USHRT_MAX )
+ nCount = USHRT_MAX;
+ else
+ nCount = (sal_uInt16)nTmp;
+ }
+ }
+ }
+ }
+
+ if( 1U == nCount )
+ {
+ OUString sBuff( c );
+ rTxtImport.InsertString( sBuff );
+ }
+ else
+ {
+ OUStringBuffer sBuff( nCount );
+ while( nCount-- )
+ sBuff.append( c );
+
+ rTxtImport.InsertString( sBuff.makeStringAndClear() );
+ }
+}
+
+XMLImpCharContext_Impl::XMLImpCharContext_Impl(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImport,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ sal_Int16 nControl ) :
+ SvXMLImportContext( rImport, nPrfx, rLName )
+{
+ rTxtImport.InsertControlCharacter( nControl );
+}
+
+XMLImpCharContext_Impl::~XMLImpCharContext_Impl()
+{
+}
+
+// ---------------------------------------------------------------------
+
+/** import start of reference (<text:reference-start>) */
+class XMLStartReferenceContext_Impl : public SvXMLImportContext
+{
+public:
+ TYPEINFO();
+
+ // Do everything in constructor. Well ...
+ XMLStartReferenceContext_Impl (
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const String& rLocalName,
+ XMLHints_Impl& rHnts,
+ const Reference<xml::sax::XAttributeList> & xAttrList);
+};
+
+TYPEINIT1( XMLStartReferenceContext_Impl, SvXMLImportContext );
+
+XMLStartReferenceContext_Impl::XMLStartReferenceContext_Impl(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const String& rLocalName,
+ XMLHints_Impl& rHints,
+ const Reference<xml::sax::XAttributeList> & xAttrList) :
+ SvXMLImportContext(rImport, nPrefix, rLocalName)
+{
+ OUString sName;
+
+ // borrow FindName from XMLTextMarkImportContext, where bookmarks
+ // and point references are handled.
+ if (XMLTextMarkImportContext::FindName(GetImport(), xAttrList, sName))
+ {
+ XMLHint_Impl* pHint = new XMLHint_Impl(
+ sName, rImport.GetTextImport()->GetCursor()->getStart(), sal_True);
+ rHints.Insert(pHint, rHints.Count());
+ }
+}
+
+// ---------------------------------------------------------------------
+
+/** import end of reference (<text:reference-end>) */
+class XMLEndReferenceContext_Impl : public SvXMLImportContext
+{
+public:
+ TYPEINFO();
+
+ // Do everything in constructor. Well ...
+ XMLEndReferenceContext_Impl(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const String& rLocalName,
+ XMLHints_Impl& rHnts,
+ const Reference<xml::sax::XAttributeList> & xAttrList);
+};
+
+TYPEINIT1( XMLEndReferenceContext_Impl, SvXMLImportContext );
+
+XMLEndReferenceContext_Impl::XMLEndReferenceContext_Impl(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const String& rLocalName,
+ XMLHints_Impl& rHints,
+ const Reference<xml::sax::XAttributeList> & xAttrList) :
+ SvXMLImportContext(rImport, nPrefix, rLocalName)
+{
+ OUString sName;
+
+ // borrow from XMLTextMarkImportContext
+ if (XMLTextMarkImportContext::FindName(GetImport(), xAttrList, sName))
+ {
+ // search for reference start
+ sal_uInt16 nCount = rHints.Count();
+ for(sal_uInt16 nPos = 0; nPos < nCount; nPos++)
+ {
+ if ( rHints[nPos]->IsReference() &&
+ sName.equals(rHints[nPos]->GetStyleName()) )
+ {
+ // set end and stop searching
+ rHints[nPos]->SetEnd(GetImport().GetTextImport()->
+ GetCursor()->getStart() );
+ break;
+ }
+ }
+ // else: no start (in this paragraph) -> ignore
+ }
+}
+
+// ---------------------------------------------------------------------
+
+class XMLImpSpanContext_Impl : public SvXMLImportContext
+{
+ XMLTextImportHelper& rTxtImport;
+ XMLHints_Impl& rHints;
+ XMLHint_Impl *pHint;
+
+ sal_Bool& rIgnoreLeadingSpace;
+
+public:
+
+ TYPEINFO();
+
+ XMLImpSpanContext_Impl(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImp, sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ XMLHints_Impl& rHnts,
+ sal_Bool& rIgnLeadSpace );
+
+ virtual ~XMLImpSpanContext_Impl();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix, const OUString& rLocalName,
+ const Reference< xml::sax::XAttributeList > & xAttrList );
+
+ virtual void Characters( const OUString& rChars );
+};
+
+TYPEINIT1( XMLImpSpanContext_Impl, SvXMLImportContext );
+
+XMLImpSpanContext_Impl::XMLImpSpanContext_Impl(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImp,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ XMLHints_Impl& rHnts,
+ sal_Bool& rIgnLeadSpace ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ rTxtImport( rTxtImp ),
+ rHints( rHnts ),
+ rIgnoreLeadingSpace( rIgnLeadSpace ),
+ pHint( 0 )
+{
+ OUString aStyleName;
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ if( XML_NAMESPACE_TEXT == nPrefix &&
+ aLocalName.compareToAscii( sXML_style_name ) == 0 )
+ aStyleName = xAttrList->getValueByIndex( i );
+ }
+
+ if( aStyleName.getLength() )
+ {
+ pHint = new XMLHint_Impl( aStyleName,
+ rTxtImport.GetCursorAsRange()->getStart() );
+ rHints.Insert( pHint, rHints.Count() );
+ }
+}
+
+XMLImpSpanContext_Impl::~XMLImpSpanContext_Impl()
+{
+ if( pHint )
+ pHint->SetEnd( rTxtImport.GetCursorAsRange()->getStart() );
+}
+
+SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
+ sal_uInt16 nPrefix, const OUString& rLocalName,
+ const Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ const SvXMLTokenMap& rTokenMap = rTxtImport.GetTextPElemTokenMap();
+ sal_uInt16 nToken = rTokenMap.Get( nPrefix, rLocalName );
+ switch( nToken )
+ {
+ case XML_TOK_TEXT_SPAN:
+ pContext = new XMLImpSpanContext_Impl( GetImport(), rTxtImport, nPrefix,
+ rLocalName, xAttrList,
+ rHints,
+ rIgnoreLeadingSpace );
+ break;
+
+ case XML_TOK_TEXT_TAB_STOP:
+ pContext = new XMLImpCharContext_Impl( GetImport(), rTxtImport, nPrefix,
+ rLocalName, xAttrList,
+ 0x0009, sal_False );
+ rIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_LINE_BREAK:
+ pContext = new XMLImpCharContext_Impl( GetImport(), rTxtImport, nPrefix,
+ rLocalName, xAttrList,
+ ControlCharacter::LINE_BREAK );
+ rIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_S:
+ pContext = new XMLImpCharContext_Impl( GetImport(), rTxtImport, nPrefix,
+ rLocalName, xAttrList,
+ 0x0020, sal_True );
+ break;
+
+ case XML_TOK_TEXT_ENDNOTE:
+ case XML_TOK_TEXT_FOOTNOTE:
+ pContext = new XMLFootnoteImportContext( GetImport(), rTxtImport,
+ nPrefix, rLocalName );
+ rIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_BOOKMARK:
+ case XML_TOK_TEXT_BOOKMARK_START:
+ case XML_TOK_TEXT_BOOKMARK_END:
+ case XML_TOK_TEXT_REFERENCE:
+ pContext = new XMLTextMarkImportContext( GetImport(), rTxtImport,
+ nPrefix, rLocalName );
+ rIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_REFERENCE_START:
+ pContext = new XMLStartReferenceContext_Impl( GetImport(),
+ nPrefix, rLocalName,
+ rHints, xAttrList );
+ rIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_REFERENCE_END:
+ pContext = new XMLEndReferenceContext_Impl( GetImport(),
+ nPrefix, rLocalName,
+ rHints, xAttrList );
+ rIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_TEXTBOX:
+ pContext = new XMLTextFrameContext( GetImport(), nPrefix,
+ rLocalName, xAttrList,
+ TextContentAnchorType_AS_CHARACTER,
+ XML_TEXT_FRAME_TEXTBOX );
+ break;
+
+ case XML_TOK_TEXT_IMAGE:
+ pContext = new XMLTextFrameContext( GetImport(), nPrefix,
+ rLocalName, xAttrList,
+ TextContentAnchorType_AS_CHARACTER,
+ XML_TEXT_FRAME_GRAPHIC );
+ break;
+
+ default:
+ // none of the above? then it's probably a text field!
+ pContext =
+ XMLTextFieldImportContext::CreateTextFieldImportContext(
+ GetImport(), rTxtImport, nPrefix, rLocalName, nToken);
+
+ // ignore unknown content
+ if (pContext == NULL)
+ {
+ pContext =
+ new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+ else
+ {
+ // text field found: white space!
+ rIgnoreLeadingSpace = sal_False;
+ }
+ break;
+ }
+
+ return pContext;
+}
+
+void XMLImpSpanContext_Impl::Characters( const OUString& rChars )
+{
+ sal_Int32 nLen = rChars.getLength();
+ OUStringBuffer sChars( nLen );
+
+ for( sal_Int32 i=0; i < nLen; i++ )
+ {
+ sal_Unicode c = rChars[i];
+ switch( c )
+ {
+ case 0x20:
+ case 0x09:
+ case 0x0a:
+ case 0x0d:
+ if( !rIgnoreLeadingSpace )
+ sChars.append( (sal_Unicode)0x20 );
+ rIgnoreLeadingSpace = sal_True;
+ break;
+ default:
+ rIgnoreLeadingSpace = sal_False;
+ sChars.append( c );
+ break;
+ }
+ }
+
+ rTxtImport.InsertString( sChars.makeStringAndClear() );
+}
+
+// ---------------------------------------------------------------------
+
+TYPEINIT1( XMLParaContext, SvXMLImportContext );
+
+XMLParaContext::XMLParaContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImp,
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
+ sal_Bool bHead ) :
+ SvXMLImportContext( rImport, nPrfx, rLName ),
+ rTxtImport( rTxtImp ),
+ xStart( rTxtImp.GetCursorAsRange()->getStart() ),
+ nOutlineLevel( 1 ),
+ pHints( 0 ),
+ bIgnoreLeadingSpace( sal_True ),
+ bHeading( bHead )
+{
+ const SvXMLTokenMap& rTokenMap = rTxtImport.GetTextPAttrTokenMap();
+
+ OUString aCondStyleName;
+
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ for( sal_Int16 i=0; i < nAttrCount; i++ )
+ {
+ const OUString& rAttrName = xAttrList->getNameByIndex( i );
+ const OUString& rValue = xAttrList->getValueByIndex( i );
+
+ OUString aLocalName;
+ sal_uInt16 nPrefix =
+ GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
+ &aLocalName );
+ switch( rTokenMap.Get( nPrefix, aLocalName ) )
+ {
+ case XML_TOK_TEXT_P_STYLE_NAME:
+ sStyleName = rValue;
+ break;
+ case XML_TOK_TEXT_P_COND_STYLE_NAME:
+ aCondStyleName = rValue;
+ break;
+ case XML_TOK_TEXT_P_LEVEL:
+ {
+ sal_Int32 nTmp = rValue.toInt32();
+ if( nTmp > 0L )
+ {
+ if( nTmp > 127 )
+ nTmp = 127;
+ nOutlineLevel = (sal_Int8)nTmp;
+ }
+ }
+
+ }
+ }
+
+ if( aCondStyleName.getLength() )
+ sStyleName = aCondStyleName;
+}
+
+XMLParaContext::~XMLParaContext()
+{
+ Reference < XTextRange > xEnd = rTxtImport.GetCursorAsRange()->getStart();
+
+ // insert a paragraph break
+ rTxtImport.InsertControlCharacter( ControlCharacter::PARAGRAPH_BREAK );
+
+ // create a cursor that select the whole last paragraph
+ Reference < XTextCursor > xAttrCursor=
+ rTxtImport.GetText()->createTextCursorByRange( xStart );
+ xAttrCursor->gotoRange( xEnd, sal_True );
+
+ // set style and hard attributes at the previous paragraph
+ if( sStyleName.getLength() )
+ sStyleName = rTxtImport.SetStyleAndAttrs( xAttrCursor,
+ sStyleName, sal_True );
+ if( bHeading && !( rTxtImport.IsInsertMode() ||
+ rTxtImport.IsStylesOnlyMode() ))
+ rTxtImport.SetOutlineStyle( nOutlineLevel, sStyleName );
+
+ if( pHints && pHints->Count() )
+ {
+ for( sal_uInt16 i=0; i<pHints->Count(); i++ )
+ {
+ XMLHint_Impl *pHint = (*pHints)[i];
+ const OUString& rStyleName = pHint->GetStyleName();
+ if( rStyleName.getLength() )
+ {
+ // handle open references: truncate to paragraph end
+ if (pHint->IsReference() && !pHint->GetEnd().is())
+ {
+ pHint->SetEnd(xEnd);
+ }
+
+ xAttrCursor->gotoRange( pHint->GetStart(), sal_False );
+ xAttrCursor->gotoRange( pHint->GetEnd(), sal_True );
+
+ // handle styles and references
+ if (pHint->IsReference())
+ {
+ // convert XCursor to XTextRange
+ Reference<XTextRange> xRange(xAttrCursor, UNO_QUERY);
+
+ // reference name uses rStyleName member
+ // borrow from XMLTextMarkImportContext
+ XMLTextMarkImportContext::CreateAndInsertMark(
+ GetImport(),
+ OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.text.ReferenceMark")),
+ rStyleName,
+ xRange);
+ }
+ else
+ {
+ rTxtImport.SetStyleAndAttrs( xAttrCursor, rStyleName,
+ sal_False );
+ }
+ }
+ }
+ }
+ delete pHints;
+}
+
+SvXMLImportContext *XMLParaContext::CreateChildContext(
+ sal_uInt16 nPrefix, const OUString& rLocalName,
+ const Reference< xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ const SvXMLTokenMap& rTokenMap = rTxtImport.GetTextPElemTokenMap();
+ sal_uInt16 nToken = rTokenMap.Get( nPrefix, rLocalName );
+ switch( nToken )
+ {
+ case XML_TOK_TEXT_SPAN:
+ if( !pHints )
+ pHints = new XMLHints_Impl;
+ pContext = new XMLImpSpanContext_Impl( GetImport(), rTxtImport,
+ nPrefix,
+ rLocalName, xAttrList,
+ *pHints, bIgnoreLeadingSpace );
+ break;
+
+ case XML_TOK_TEXT_TAB_STOP:
+ pContext = new XMLImpCharContext_Impl( GetImport(), rTxtImport,
+ nPrefix,
+ rLocalName, xAttrList,
+ 0x0009, sal_False );
+ bIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_LINE_BREAK:
+ pContext = new XMLImpCharContext_Impl( GetImport(), rTxtImport,
+ nPrefix,
+ rLocalName, xAttrList,
+ ControlCharacter::LINE_BREAK );
+ bIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_S:
+ pContext = new XMLImpCharContext_Impl( GetImport(), rTxtImport,
+ nPrefix,
+ rLocalName, xAttrList,
+ 0x0020, sal_True );
+ break;
+
+ case XML_TOK_TEXT_ENDNOTE:
+ case XML_TOK_TEXT_FOOTNOTE:
+ pContext = new XMLFootnoteImportContext( GetImport(), rTxtImport,
+ nPrefix, rLocalName );
+ bIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_BOOKMARK:
+ case XML_TOK_TEXT_BOOKMARK_START:
+ case XML_TOK_TEXT_BOOKMARK_END:
+ case XML_TOK_TEXT_REFERENCE:
+ pContext = new XMLTextMarkImportContext( GetImport(), rTxtImport,
+ nPrefix, rLocalName );
+ bIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_REFERENCE_START:
+ if( NULL == pHints ) // lazily create hints array
+ pHints = new XMLHints_Impl;
+ pContext = new XMLStartReferenceContext_Impl( GetImport(),
+ nPrefix, rLocalName,
+ *pHints, xAttrList );
+ bIgnoreLeadingSpace = sal_False;
+ break;
+
+ case XML_TOK_TEXT_REFERENCE_END:
+ if ( NULL != pHints ) // no hints, no start reference
+ {
+ pContext = new XMLEndReferenceContext_Impl( GetImport(),
+ nPrefix, rLocalName,
+ *pHints, xAttrList );
+ bIgnoreLeadingSpace = sal_False;
+ }
+ break;
+
+ case XML_TOK_TEXT_TEXTBOX:
+ pContext = new XMLTextFrameContext( GetImport(), nPrefix,
+ rLocalName, xAttrList,
+ TextContentAnchorType_AS_CHARACTER,
+ XML_TEXT_FRAME_TEXTBOX );
+ break;
+
+ case XML_TOK_TEXT_IMAGE:
+ pContext = new XMLTextFrameContext( GetImport(), nPrefix,
+ rLocalName, xAttrList,
+ TextContentAnchorType_AS_CHARACTER,
+ XML_TEXT_FRAME_GRAPHIC );
+ break;
+
+
+ default:
+ // none of the above? then it's probably a text field!
+ pContext =
+ XMLTextFieldImportContext::CreateTextFieldImportContext(
+ GetImport(), rTxtImport, nPrefix, rLocalName, nToken);
+
+ // ignore unknown content
+ if (pContext == NULL)
+ {
+ pContext =
+ new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+ else
+ {
+ // text field found: white space!
+ bIgnoreLeadingSpace = sal_False;
+ }
+ break;
+ }
+
+ return pContext;
+}
+
+void XMLParaContext::Characters( const OUString& rChars )
+{
+ sal_Int32 nLen = rChars.getLength();
+ OUStringBuffer sChars( nLen );
+
+ for( sal_Int32 i=0; i < nLen; i++ )
+ {
+ sal_Unicode c = rChars[ i ];
+ switch( c )
+ {
+ case 0x20:
+ case 0x09:
+ case 0x0a:
+ case 0x0d:
+ if( !bIgnoreLeadingSpace )
+ sChars.append( (sal_Unicode)0x20 );
+ bIgnoreLeadingSpace = sal_True;
+ break;
+ default:
+ bIgnoreLeadingSpace = sal_False;
+ sChars.append( c );
+ break;
+ }
+ }
+
+ rTxtImport.InsertString( sChars.makeStringAndClear() );
+}
+
+
diff --git a/xmloff/source/text/txtparai.hxx b/xmloff/source/text/txtparai.hxx
new file mode 100644
index 0000000000..8490559cdb
--- /dev/null
+++ b/xmloff/source/text/txtparai.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtparai.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_TEXTPARAI_HXX_
+#define _XMLOFF_TEXTPARAI_HXX_
+
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+class XMLHints_Impl;
+class XMLTextImportHelper;
+namespace com { namespace sun { namespace star {
+namespace text { class XTextRange; }
+namespace xml { namespace sax { class XAttributeList; } }
+} } }
+
+class XMLParaContext : public SvXMLImportContext
+{
+ XMLTextImportHelper& rTxtImport;
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextRange > xStart; // xub_StrLen nStart;
+ ::rtl::OUString sStyleName;
+ sal_Int8 nOutlineLevel;
+ XMLHints_Impl *pHints;
+ sal_Bool bIgnoreLeadingSpace;
+ sal_Bool bHeading;
+
+public:
+
+ TYPEINFO();
+
+ XMLParaContext( SvXMLImport& rImport,
+ XMLTextImportHelper& rTxtImp, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ sal_Bool bHeading );
+
+ virtual ~XMLParaContext();
+
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void Characters( const ::rtl::OUString& rChars );
+
+};
+
+
+#endif
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
new file mode 100644
index 0000000000..2803b0fcc7
--- /dev/null
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -0,0 +1,1035 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtprhdl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
+#include <com/sun/star/uno/Any.hxx>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_DROPCAPFORMAT_HPP_
+#include <com/sun/star/style/DropCapFormat.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_WRAPTEXTMODE_HPP_
+#include <com/sun/star/text/WrapTextMode.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_XTEXTCOLUMNS_HPP_
+#include <com/sun/star/text/XTextColumns.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_TEXTCOLUMN_HPP_
+#include <com/sun/star/text/TextColumn.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_RELORIENTATION_HPP_
+#include <com/sun/star/text/RelOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_HORIORIENTATION_HPP_
+#include <com/sun/star/text/HoriOrientation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_VERTORIENTATION_HPP_
+#include <com/sun/star/text/VertOrientation.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLTYPES_HXX
+#include "xmltypes.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_XMLANCHORTYPEPROPHDL_HXX
+#include "XMLAnchorTypePropHdl.hxx"
+#endif
+#ifndef _XMLOFF_XMLENUMPROPERTYHANDLER_HXX
+#include "XMLEnumPropertyHandler.hxx"
+#endif
+#ifndef _XMLOFF_XMLCLIPPROPERTYHANDLER_HXX
+#include "XMLClipPropertyHandler.hxx"
+#endif
+#ifndef _XMLOFF_TXTPRHDL_HXX
+#include "txtprhdl.hxx"
+#endif
+
+using namespace ::rtl;
+//using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::style;
+//using namespace ::com::sun::star::container;
+//using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::text;
+
+#define CONSTASCII_USTRINGPARAM_CMP(s) s, sizeof(s)-1
+
+// ---------------------------------------------------------------------------
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_HoriPos_Enum[] =
+{
+ { sXML_from_left, HoriOrientation::NONE },
+ { sXML_from_inside, HoriOrientation::NONE }, // import only
+ { sXML_left, HoriOrientation::LEFT },
+ { sXML_inside, HoriOrientation::LEFT }, // import only
+ { sXML_center, HoriOrientation::CENTER },
+ { sXML_right, HoriOrientation::RIGHT },
+ { sXML_outside, HoriOrientation::RIGHT }, // import only
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_HoriPosMirrored_Enum[] =
+{
+ { sXML_from_inside, HoriOrientation::NONE },
+ { sXML_inside, HoriOrientation::LEFT },
+ { sXML_center, HoriOrientation::CENTER },
+ { sXML_outside, HoriOrientation::RIGHT },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_HoriRel_Enum[] =
+{
+ { sXML_paragraph, RelOrientation::FRAME },
+ { sXML_paragraph_content, RelOrientation::PRINT_AREA },
+ { sXML_page, RelOrientation::PAGE_FRAME },
+ { sXML_page_content, RelOrientation::PAGE_PRINT_AREA },
+ { sXML_paragraph_start_margin, RelOrientation::FRAME_LEFT },
+ { sXML_paragraph_end_margin, RelOrientation::FRAME_RIGHT },
+ { sXML_page_start_margin, RelOrientation::PAGE_LEFT },
+ { sXML_page_end_margin, RelOrientation::PAGE_RIGHT },
+ { sXML_char, RelOrientation::CHAR },
+ { sXML_frame, RelOrientation::FRAME }, // import only
+ { sXML_frame_content, RelOrientation::PRINT_AREA }, // import only
+ { sXML_frame_start_margin, RelOrientation::FRAME_LEFT }, // import only
+ { sXML_frame_end_margin, RelOrientation::FRAME_RIGHT }, // import only
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_HoriRelFrame_Enum[] =
+{
+ { sXML_frame, RelOrientation::FRAME },
+ { sXML_frame_content, RelOrientation::PRINT_AREA },
+ { sXML_page, RelOrientation::PAGE_FRAME },
+ { sXML_page_content, RelOrientation::PAGE_PRINT_AREA },
+ { sXML_frame_start_margin, RelOrientation::FRAME_LEFT },
+ { sXML_frame_end_margin, RelOrientation::FRAME_RIGHT },
+ { sXML_page_start_margin, RelOrientation::PAGE_LEFT },
+ { sXML_page_end_margin, RelOrientation::PAGE_RIGHT },
+ { sXML_char, RelOrientation::CHAR },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_HoriMirror_Enum[] =
+{
+ { sXML_from_left, sal_False },
+ { sXML_from_inside, sal_True },
+ { sXML_left, sal_False },
+ { sXML_inside, sal_True },
+ { sXML_center, sal_False },
+ { sXML_right, sal_False },
+ { sXML_outside, sal_True },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_VertPos_Enum[] =
+{
+ { sXML_from_top, VertOrientation::NONE },
+ { sXML_top, VertOrientation::TOP },
+ { sXML_top, VertOrientation::CHAR_TOP }, // export only
+ { sXML_top, VertOrientation::LINE_TOP }, // export only
+ { sXML_middle, VertOrientation::CENTER },
+ { sXML_middle, VertOrientation::CHAR_CENTER }, // export only
+ { sXML_middle, VertOrientation::LINE_CENTER }, // export only
+ { sXML_bottom, VertOrientation::BOTTOM },
+ { sXML_bottom, VertOrientation::CHAR_BOTTOM }, // export only
+ { sXML_bottom, VertOrientation::LINE_BOTTOM }, // export only
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_VertRel_Enum[] =
+{
+ { sXML_paragraph, RelOrientation::FRAME },
+ { sXML_paragraph_content, RelOrientation::PRINT_AREA },
+ { sXML_char, RelOrientation::CHAR },
+ { sXML_page, RelOrientation::FRAME }, // import only
+ { sXML_page_content, RelOrientation::PRINT_AREA }, // import only
+ { sXML_frame, RelOrientation::FRAME }, // import only
+ { sXML_frame_content, RelOrientation::PRINT_AREA }, // import only
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_VertRelPage_Enum[] =
+{
+ { sXML_page, RelOrientation::FRAME },
+ { sXML_page_content, RelOrientation::PRINT_AREA },
+ { sXML_page, RelOrientation::PAGE_FRAME },
+ { sXML_page_content, RelOrientation::PAGE_PRINT_AREA },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_VertRelFrame_Enum[] =
+{
+ { sXML_frame, RelOrientation::FRAME },
+ { sXML_frame_content, RelOrientation::PRINT_AREA },
+ { 0, 0 }
+};
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_VertRelAsChar_Enum[] =
+{
+ { sXML_baseline, VertOrientation::TOP },
+ { sXML_baseline, VertOrientation::CENTER }, // export only
+ { sXML_baseline, VertOrientation::BOTTOM }, // export only
+ { sXML_char, VertOrientation::CHAR_TOP },
+ { sXML_char, VertOrientation::CHAR_CENTER }, // export only
+ { sXML_char, VertOrientation::CHAR_BOTTOM }, // export only
+ { sXML_line, VertOrientation::LINE_TOP },
+ { sXML_line, VertOrientation::LINE_CENTER }, // export only
+ { sXML_line, VertOrientation::LINE_BOTTOM }, // export only
+ { 0, 0 }
+};
+// ---------------------------------------------------------------------------
+
+class XMLDropCapPropHdl_Impl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLDropCapPropHdl_Impl ();
+
+ virtual sal_Bool equals(
+ const ::com::sun::star::uno::Any& r1,
+ const ::com::sun::star::uno::Any& r2 ) const;
+
+ /// TabStops will be imported/exported as XML-Elements. So the Import/Export-work must be done at another place.
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+XMLDropCapPropHdl_Impl::~XMLDropCapPropHdl_Impl ()
+{
+}
+
+sal_Bool XMLDropCapPropHdl_Impl::equals(
+ const Any& r1,
+ const Any& r2 ) const
+{
+ DropCapFormat aFormat1, aFormat2;
+ r1 >>= aFormat1;
+ r2 >>= aFormat2;
+
+ return (aFormat1.Lines <=1 && aFormat2.Lines <=1) ||
+ (aFormat1.Lines == aFormat2.Lines &&
+ aFormat1.Count == aFormat2.Count &&
+ aFormat1.Distance == aFormat2.Distance);
+}
+
+sal_Bool XMLDropCapPropHdl_Impl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ DBG_ASSERT( !this, "drop caps are an element import property" );
+ return sal_False;
+}
+
+sal_Bool XMLDropCapPropHdl_Impl::exportXML(
+ OUString& rStrExpValue,
+ const Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ DBG_ASSERT( !this, "drop caps are an element export property" );
+ return sal_False;
+}
+
+// ---------------------------------------------------------------------------
+
+class XMLOpaquePropHdl_Impl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLOpaquePropHdl_Impl ();
+
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+sal_Bool XMLOpaquePropHdl_Impl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_True;
+ sal_Bool bVal = sal_False;
+ if( rStrImpValue.equalsAsciiL(
+ CONSTASCII_USTRINGPARAM_CMP( sXML_foreground ) ) )
+ bVal = sal_True;
+ else if( !rStrImpValue.equalsAsciiL(
+ CONSTASCII_USTRINGPARAM_CMP( sXML_background ) ) )
+ bRet = sal_False;
+
+ if( bRet )
+ rValue.setValue( &bVal, ::getBooleanCppuType() );
+
+ return bRet;
+}
+
+sal_Bool XMLOpaquePropHdl_Impl::exportXML(
+ OUString& rStrExpValue,
+ const Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ if( *(sal_Bool *)rValue.getValue() )
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_foreground) );
+ else
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_background) );
+
+ return sal_True;
+}
+
+XMLOpaquePropHdl_Impl::~XMLOpaquePropHdl_Impl ()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+class XMLContourModePropHdl_Impl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLContourModePropHdl_Impl ();
+
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+sal_Bool XMLContourModePropHdl_Impl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_True;
+ sal_Bool bVal = sal_False;
+ if( rStrImpValue.equalsAsciiL(
+ CONSTASCII_USTRINGPARAM_CMP( sXML_outside ) ) )
+ bVal = sal_True;
+ else if( !rStrImpValue.equalsAsciiL(
+ CONSTASCII_USTRINGPARAM_CMP( sXML_full ) ) )
+ bRet = sal_False;
+
+ if( bRet )
+ rValue.setValue( &bVal, ::getBooleanCppuType() );
+
+ return bRet;
+}
+
+sal_Bool XMLContourModePropHdl_Impl::exportXML(
+ OUString& rStrExpValue,
+ const Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ if( *(sal_Bool *)rValue.getValue() )
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_outside) );
+ else
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_full) );
+
+ return sal_True;
+}
+
+XMLContourModePropHdl_Impl::~XMLContourModePropHdl_Impl()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+class XMLParagraphOnlyPropHdl_Impl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLParagraphOnlyPropHdl_Impl ();
+
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+sal_Bool XMLParagraphOnlyPropHdl_Impl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_True;
+ sal_Bool bVal = sal_False;
+
+ if( !rStrImpValue.compareToAscii( sXML_no_limit ) == 0 )
+ {
+ sal_Int32 nValue = 0;
+ bRet = rUnitConverter.convertNumber( nValue, rStrImpValue );
+ bVal = 1 == nValue;
+ }
+
+ if( bRet )
+ rValue.setValue( &bVal, ::getBooleanCppuType() );
+
+ return bRet;
+}
+
+sal_Bool XMLParagraphOnlyPropHdl_Impl::exportXML(
+ OUString& rStrExpValue,
+ const Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ if( *(sal_Bool *)rValue.getValue() )
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM("1") );
+ else
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_no_limit) );
+
+ return sal_True;
+}
+
+XMLParagraphOnlyPropHdl_Impl::~XMLParagraphOnlyPropHdl_Impl()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_Wrap_Enum[] =
+{
+ { sXML_none, WrapTextMode_NONE },
+ { sXML_run_through, WrapTextMode_THROUGHT },
+ { sXML_parallel, WrapTextMode_PARALLEL },
+ { sXML_dynamic, WrapTextMode_DYNAMIC },
+ { sXML_left, WrapTextMode_LEFT },
+ { sXML_right, WrapTextMode_RIGHT },
+ { 0, 0 }
+};
+
+class XMLWrapPropHdl_Impl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLWrapPropHdl_Impl ();
+
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+sal_Bool XMLWrapPropHdl_Impl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_uInt16 nWrap;
+ sal_Bool bRet = rUnitConverter.convertEnum( nWrap, rStrImpValue,
+ pXML_Wrap_Enum );
+
+ if( bRet )
+ rValue <<= (WrapTextMode)nWrap;
+
+ return bRet;
+}
+
+sal_Bool XMLWrapPropHdl_Impl::exportXML(
+ OUString& rStrExpValue,
+ const Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut;
+ WrapTextMode eVal;
+
+ rValue >>= eVal;
+
+ sal_Bool bRet = rUnitConverter.convertEnum( aOut, eVal, pXML_Wrap_Enum, sXML_none );
+
+ rStrExpValue = aOut.makeStringAndClear();
+
+ return bRet;
+}
+
+XMLWrapPropHdl_Impl::~XMLWrapPropHdl_Impl ()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+class XMLFrameProtectPropHdl_Impl : public XMLPropertyHandler
+{
+ const OUString sVal;
+public:
+ XMLFrameProtectPropHdl_Impl( const sal_Char *pVal ) :
+ sVal( OUString::createFromAscii(pVal) ) {}
+ virtual ~XMLFrameProtectPropHdl_Impl ();
+
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+sal_Bool XMLFrameProtectPropHdl_Impl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_True;
+ sal_Bool bVal = sal_False;
+ if( !rStrImpValue.equalsAsciiL( CONSTASCII_USTRINGPARAM_CMP( sXML_none ) ) )
+ {
+ bRet = sal_False;
+ SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
+ OUString aToken;
+ while( aTokenEnum.getNextToken( aToken ) )
+ {
+ bRet = sal_True;
+ if( aToken == sVal )
+ {
+ bVal = sal_True;
+ break;
+ }
+ }
+ }
+
+ if( bRet )
+ rValue.setValue( &bVal, ::getBooleanCppuType() );
+
+ return bRet;
+}
+
+sal_Bool XMLFrameProtectPropHdl_Impl::exportXML(
+ OUString& rStrExpValue,
+ const Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ if( *(sal_Bool *)rValue.getValue() )
+ {
+ if( !rStrExpValue.getLength() ||
+ rStrExpValue.equalsAsciiL(CONSTASCII_USTRINGPARAM_CMP(sXML_none)) )
+ {
+ rStrExpValue = sVal;
+ }
+ else
+ {
+ OUStringBuffer aOut( rStrExpValue.getLength() + 1 +
+ sVal.getLength() );
+ aOut.append( rStrExpValue );
+ aOut.append( (sal_Unicode)' ' );
+ aOut.append( sVal );
+ rStrExpValue = aOut.makeStringAndClear();
+ }
+ }
+ else if( !rStrExpValue.getLength() )
+ {
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_none) );
+ }
+
+ return sal_True;
+}
+
+XMLFrameProtectPropHdl_Impl::~XMLFrameProtectPropHdl_Impl()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+SvXMLEnumMapEntry __READONLY_DATA pXML_Anchor_Enum[] =
+{
+ { sXML_char, TextContentAnchorType_AT_CHARACTER },
+ { sXML_page, TextContentAnchorType_AT_PAGE },
+ { sXML_frame, TextContentAnchorType_AT_FRAME },
+ { sXML_paragraph, TextContentAnchorType_AT_PARAGRAPH },
+ { sXML_as_char, TextContentAnchorType_AS_CHARACTER },
+ { 0, 0 }
+};
+
+
+sal_Bool XMLAnchorTypePropHdl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_uInt16 nAnchor;
+ sal_Bool bRet = rUnitConverter.convertEnum( nAnchor, rStrImpValue,
+ pXML_Anchor_Enum );
+
+ if( bRet )
+ rValue <<= (TextContentAnchorType)nAnchor;
+
+ return bRet;
+}
+
+sal_Bool XMLAnchorTypePropHdl::exportXML(
+ OUString& rStrExpValue,
+ const Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ OUStringBuffer aOut;
+ TextContentAnchorType eVal;
+
+ rValue >>= eVal;
+
+ sal_Bool bRet = rUnitConverter.convertEnum( aOut, eVal, pXML_Anchor_Enum, sXML_paragraph );
+
+ rStrExpValue = aOut.makeStringAndClear();
+
+ return bRet;
+}
+
+XMLAnchorTypePropHdl::~XMLAnchorTypePropHdl()
+{
+}
+
+sal_Bool XMLAnchorTypePropHdl::convert( const OUString& rStrImpValue,
+ const SvXMLUnitConverter& rUnitConverter,
+ TextContentAnchorType& rType )
+{
+ sal_uInt16 nAnchor;
+ sal_Bool bRet = rUnitConverter.convertEnum( nAnchor, rStrImpValue,
+ pXML_Anchor_Enum );
+ if( bRet )
+ rType = (TextContentAnchorType)nAnchor;
+ return bRet;
+}
+
+// ---------------------------------------------------------------------------
+
+class XMLTextColumnsPropHdl_Impl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLTextColumnsPropHdl_Impl ();
+
+ virtual sal_Bool equals(
+ const ::com::sun::star::uno::Any& r1,
+ const ::com::sun::star::uno::Any& r2 ) const;
+
+ /// TabStops will be imported/exported as XML-Elements. So the Import/Export-work must be done at another place.
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+XMLTextColumnsPropHdl_Impl::~XMLTextColumnsPropHdl_Impl ()
+{
+}
+
+sal_Bool XMLTextColumnsPropHdl_Impl::equals(
+ const Any& r1,
+ const Any& r2 ) const
+{
+ Reference < XTextColumns > xColumns1;
+ r1 >>= xColumns1;
+
+ Reference < XTextColumns > xColumns2;
+ r2 >>= xColumns2;
+
+ if( xColumns1->getColumnCount() != xColumns2->getColumnCount() ||
+ xColumns1->getReferenceValue() != xColumns2->getReferenceValue() )
+ return sal_False;
+
+ Sequence < TextColumn > aColumns1 = xColumns1->getColumns();
+ Sequence < TextColumn > aColumns2 = xColumns2->getColumns();
+ sal_Int32 nCount = aColumns1.getLength();
+ if( aColumns2.getLength() != nCount )
+ return sal_False;
+
+ const TextColumn *pColumns1 = aColumns1.getArray();
+ const TextColumn *pColumns2 = aColumns2.getArray();
+
+ while( nCount-- )
+ {
+ if( pColumns1->Width != pColumns2->Width ||
+ pColumns1->LeftMargin != pColumns2->LeftMargin ||
+ pColumns1->RightMargin != pColumns2->RightMargin )
+ return sal_False;
+
+ pColumns1++;
+ pColumns2++;
+ }
+
+ return sal_True;
+}
+
+sal_Bool XMLTextColumnsPropHdl_Impl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ DBG_ASSERT( !this, "columns are an element import property" );
+ return sal_False;
+}
+
+sal_Bool XMLTextColumnsPropHdl_Impl::exportXML(
+ OUString& rStrExpValue,
+ const Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ DBG_ASSERT( !this, "columns are an element export property" );
+ return sal_False;
+}
+
+// ---------------------------------------------------------------------------
+
+class XMLHoriMirrorPropHdl_Impl : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLHoriMirrorPropHdl_Impl ();
+
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+sal_Bool XMLHoriMirrorPropHdl_Impl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_uInt16 nHoriMirror;
+ sal_Bool bRet = rUnitConverter.convertEnum( nHoriMirror, rStrImpValue,
+ pXML_HoriMirror_Enum );
+
+ if( bRet )
+ {
+ sal_Bool bTmp = nHoriMirror != 0;
+ rValue.setValue( &bTmp, ::getBooleanCppuType() );
+ }
+
+ return bRet;
+}
+
+sal_Bool XMLHoriMirrorPropHdl_Impl::exportXML(
+ OUString& rStrExpValue,
+ const Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ DBG_ASSERT( !this, "HorMirror properyt shouldn't be exported" );
+
+ return sal_False;
+}
+
+XMLHoriMirrorPropHdl_Impl::~XMLHoriMirrorPropHdl_Impl ()
+{
+}
+
+// ---------------------------------------------------------------------------
+
+class XMLGrfMirrorPropHdl_Impl : public XMLPropertyHandler
+{
+ const OUString sVal;
+ sal_Bool bHori;
+
+public:
+ XMLGrfMirrorPropHdl_Impl( const sal_Char *pVal, sal_Bool bHori ) :
+ sVal( OUString::createFromAscii(pVal) ) {}
+ virtual ~XMLGrfMirrorPropHdl_Impl ();
+
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+sal_Bool XMLGrfMirrorPropHdl_Impl::importXML(
+ const OUString& rStrImpValue,
+ Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ sal_Bool bRet = sal_True;
+ sal_Bool bVal = sal_False;
+ if( !rStrImpValue.equalsAsciiL( CONSTASCII_USTRINGPARAM_CMP( sXML_none ) ) )
+ {
+ bRet = sal_False;
+ SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
+ OUString aToken;
+ while( aTokenEnum.getNextToken( aToken ) )
+ {
+ bRet = sal_True;
+ if( aToken == sVal ||
+ (bHori && aToken.equalsAsciiL(
+ CONSTASCII_USTRINGPARAM_CMP( sXML_horizontal ) ) ) )
+ {
+ bVal = sal_True;
+ break;
+ }
+ }
+ }
+
+ if( bRet )
+ rValue.setValue( &bVal, ::getBooleanCppuType() );
+
+ return bRet;
+}
+
+sal_Bool XMLGrfMirrorPropHdl_Impl::exportXML(
+ OUString& rStrExpValue,
+ const Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const
+{
+ if( *(sal_Bool *)rValue.getValue() )
+ {
+ if( !rStrExpValue.getLength() ||
+ rStrExpValue.equalsAsciiL(CONSTASCII_USTRINGPARAM_CMP(sXML_none)) )
+ {
+ rStrExpValue = sVal;
+ }
+ else if( bHori &&
+ ( rStrExpValue.equalsAsciiL( CONSTASCII_USTRINGPARAM_CMP(sXML_horizontal_on_left_pages)) ||
+ rStrExpValue.equalsAsciiL( CONSTASCII_USTRINGPARAM_CMP(sXML_horizontal_on_right_pages)) ) )
+ {
+ rStrExpValue = OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_horizontal) );
+ }
+ else
+ {
+ OUStringBuffer aOut( rStrExpValue.getLength() + 1 +
+ sVal.getLength() );
+ aOut.append( rStrExpValue );
+ aOut.append( (sal_Unicode)' ' );
+ aOut.append( sVal );
+ rStrExpValue = aOut.makeStringAndClear();
+ }
+ }
+ else if( !rStrExpValue.getLength() )
+ {
+ rStrExpValue = OUString( RTL_CONSTASCII_USTRINGPARAM(sXML_none) );
+ }
+
+ return sal_True;
+}
+
+XMLGrfMirrorPropHdl_Impl::~XMLGrfMirrorPropHdl_Impl()
+{
+}
+
+
+// ---------------------------------------------------------------------------
+class XMLTextPropertyHandlerFactory_Impl
+{
+public:
+ const XMLPropertyHandler *GetPropertyHandler( sal_Int32 nType ) const;
+
+ XMLTextPropertyHandlerFactory_Impl();
+ ~XMLTextPropertyHandlerFactory_Impl();
+};
+
+const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
+ ( sal_Int32 nType ) const
+{
+ const XMLPropertyHandler* pHdl = 0;
+ switch( nType )
+ {
+ case XML_TYPE_TEXT_DROPCAP:
+ pHdl = new XMLDropCapPropHdl_Impl;
+ break;
+ case XML_TYPE_TEXT_WRAP:
+ pHdl = new XMLWrapPropHdl_Impl;
+ break;
+ case XML_TYPE_TEXT_PARAGRAPH_ONLY:
+ pHdl = new XMLParagraphOnlyPropHdl_Impl;
+ break;
+ case XML_TYPE_TEXT_WRAP_OUTSIDE:
+ pHdl = new XMLContourModePropHdl_Impl;
+ break;
+ case XML_TYPE_TEXT_OPAQUE:
+ pHdl = new XMLOpaquePropHdl_Impl;
+ break;
+ case XML_TYPE_TEXT_PROTECT_CONTENT:
+ pHdl = new XMLFrameProtectPropHdl_Impl( sXML_content );
+ break;
+ case XML_TYPE_TEXT_PROTECT_SIZE:
+ pHdl = new XMLFrameProtectPropHdl_Impl( sXML_size );
+ break;
+ case XML_TYPE_TEXT_PROTECT_POSITION:
+ pHdl = new XMLFrameProtectPropHdl_Impl( sXML_position );
+ break;
+ case XML_TYPE_TEXT_ANCHOR_TYPE:
+ pHdl = new XMLAnchorTypePropHdl;
+ break;
+ case XML_TYPE_TEXT_COLUMNS:
+ pHdl = new XMLTextColumnsPropHdl_Impl;
+ break;
+ case XML_TYPE_TEXT_HORIZONTAL_POS:
+ pHdl = new XMLEnumPropertyHandler( pXML_HoriPos_Enum, 0 );
+ break;
+ case XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED:
+ pHdl = new XMLEnumPropertyHandler( pXML_HoriPosMirrored_Enum, 0 );
+ break;
+ case XML_TYPE_TEXT_HORIZONTAL_REL:
+ pHdl = new XMLEnumPropertyHandler( pXML_HoriRel_Enum, 0 );
+ break;
+ case XML_TYPE_TEXT_HORIZONTAL_REL_FRAME:
+ pHdl = new XMLEnumPropertyHandler( pXML_HoriRelFrame_Enum, 0 );
+ break;
+ case XML_TYPE_TEXT_HORIZONTAL_MIRROR:
+ pHdl = new XMLHoriMirrorPropHdl_Impl;
+ break;
+ case XML_TYPE_TEXT_VERTICAL_POS:
+ pHdl = new XMLEnumPropertyHandler( pXML_VertPos_Enum, 0 );
+ break;
+ case XML_TYPE_TEXT_VERTICAL_REL:
+ pHdl = new XMLEnumPropertyHandler( pXML_VertRel_Enum, 0 );
+ break;
+ case XML_TYPE_TEXT_VERTICAL_REL_PAGE:
+ pHdl = new XMLEnumPropertyHandler( pXML_VertRelPage_Enum, 0 );
+ break;
+ case XML_TYPE_TEXT_VERTICAL_REL_FRAME:
+ pHdl = new XMLEnumPropertyHandler( pXML_VertRelFrame_Enum, 0 );
+ break;
+ case XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR:
+ pHdl = new XMLEnumPropertyHandler( pXML_VertRelAsChar_Enum, 0 );
+ break;
+ case XML_TYPE_TEXT_MIRROR_VERTICAL:
+ pHdl = new XMLGrfMirrorPropHdl_Impl( sXML_vertical, sal_False );
+ break;
+ case XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT:
+ pHdl = new XMLGrfMirrorPropHdl_Impl( sXML_horizontal_on_left_pages, sal_True );
+ break;
+ case XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT:
+ pHdl = new XMLGrfMirrorPropHdl_Impl( sXML_horizontal_on_right_pages, sal_True );
+ break;
+ case XML_TYPE_TEXT_CLIP:
+ pHdl = new XMLClipPropertyHandler;
+ break;
+ }
+
+ return pHdl;
+}
+
+XMLTextPropertyHandlerFactory_Impl::XMLTextPropertyHandlerFactory_Impl()
+{
+}
+
+XMLTextPropertyHandlerFactory_Impl::~XMLTextPropertyHandlerFactory_Impl()
+{
+}
+
+// ----------------------------------------------------------------------------
+
+XMLTextPropertyHandlerFactory::XMLTextPropertyHandlerFactory() :
+ XMLPropertyHandlerFactory(),
+ pImpl( new XMLTextPropertyHandlerFactory_Impl )
+{
+}
+
+XMLTextPropertyHandlerFactory::~XMLTextPropertyHandlerFactory()
+{
+ delete pImpl;
+}
+
+const XMLPropertyHandler *XMLTextPropertyHandlerFactory::GetPropertyHandler(
+ sal_Int32 nType ) const
+{
+ const XMLPropertyHandler *pHdl =
+ XMLPropertyHandlerFactory::GetPropertyHandler( nType );
+
+ if( !pHdl )
+ {
+ const XMLPropertyHandler *pNewHdl = pImpl->GetPropertyHandler( nType );
+
+ if( pNewHdl )
+ PutHdlCache( nType, pNewHdl );
+
+ pHdl = pNewHdl;
+ }
+
+ return pHdl;
+}
+
+
diff --git a/xmloff/source/text/txtprhdl.hxx b/xmloff/source/text/txtprhdl.hxx
new file mode 100644
index 0000000000..b28e01f817
--- /dev/null
+++ b/xmloff/source/text/txtprhdl.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtprhdl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _XMLOFF_TEXTPRHDL_HXX_
+#define _XMLOFF_TEXTPRHDL_HXX_
+
+
+#ifndef _XMLOFF_PROPERTYHANDLERFACTORY_HXX
+#include "prhdlfac.hxx"
+#endif
+
+class XMLTextPropertyHandlerFactory_Impl;
+
+class XMLTextPropertyHandlerFactory : public XMLPropertyHandlerFactory
+{
+ XMLTextPropertyHandlerFactory_Impl *pImpl;
+
+public:
+
+ XMLTextPropertyHandlerFactory();
+ virtual ~XMLTextPropertyHandlerFactory();
+
+ virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const ;
+};
+
+
+#endif
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
new file mode 100644
index 0000000000..bcfffc3c1b
--- /dev/null
+++ b/xmloff/source/text/txtprmap.cxx
@@ -0,0 +1,998 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtprmap.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _COM_SUN_STAR_TABLE_BORDERLINE_HPP_
+#include <com/sun/star/table/BorderLine.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_SIZETYPE_HPP_
+#include <com/sun/star/text/SizeType.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_WRAPTEXTMODE_HPP_
+#include <com/sun/star/text/WrapTextMode.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_TEXTCONTENTANCHORTYPE_HPP
+#include <com/sun/star/text/TextContentAnchorType.hpp>
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_TXTPRHDL_HXX
+#include "txtprhdl.hxx"
+#endif
+#ifndef _XMLOFF_TXTPRMAP_HXX
+#include "txtprmap.hxx"
+#endif
+
+//using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+//using namespace ::com::sun::star::style;
+//using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::text;
+
+#define M_E( a, p, l, t, c ) \
+ { a, XML_NAMESPACE_##p, sXML_##l, t, c }
+
+
+XMLPropertyMapEntry aXMLParaPropMap[] =
+{
+ // RES_CHRATR_CASEMAP
+ M_E( "CharCaseMap", FO, font_variant, XML_TYPE_TEXT_CASEMAP_VAR, 0 ),
+ M_E( "CharCaseMap", FO, text_transform, XML_TYPE_TEXT_CASEMAP, 0 ),
+ // RES_CHRATR_COLOR
+ M_E( "CharColor", FO, color, XML_TYPE_COLOR, 0 ),
+ // RES_CHRATR_CONTOUR
+ M_E( "CharContoured", STYLE, text_outline, XML_TYPE_BOOL, 0 ),
+ // RES_CHRATR_CROSSEDOUT
+ M_E( "CharStrikeout", STYLE, text_crossing_out, XML_TYPE_TEXT_CROSSEDOUT, 0),
+ // RES_CHRATR_ESCAPEMENT
+ M_E( "CharEscapement", STYLE, text_position, XML_TYPE_TEXT_ESCAPEMENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ), // BugID #76842#
+ M_E( "CharEscapementHeight", STYLE, text_position, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
+ // RES_CHRATR_FONT
+ M_E( "CharFontName", FO, font_family, XML_TYPE_TEXT_FONTFAMILYNAME, 0 ),
+ M_E( "CharFontStyleName",STYLE, font_style_name, XML_TYPE_STRING, 0 ),
+ M_E( "CharFontFamily", STYLE, font_family_generic,XML_TYPE_TEXT_FONTFAMILY, 0 ),
+ M_E( "CharFontPitch", STYLE, font_pitch, XML_TYPE_TEXT_FONTPITCH, 0 ),
+ M_E( "CharFontCharSet", STYLE, font_charset, XML_TYPE_TEXT_FONTENCODING, 0 ),
+ // RES_CHRATR_FONTSIZE
+ M_E( "CharHeight", FO, font_size, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT ),
+ M_E( "CharPropFontHeight",FO, font_size, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL ),
+ // RES_CHRATR_KERNING
+ M_E( "CharKerning", FO, letter_spacing, XML_TYPE_TEXT_KERNING, 0 ),
+ // RES_CHRATR_LANGUAGE
+ M_E( "CharLocale", FO, language, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_E( "CharLocale", FO, country, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
+ // RES_CHRATR_POSTURE
+ M_E( "CharPosture", FO, font_style, XML_TYPE_TEXT_POSTURE, 0 ),
+ // RES_CHRATR_PROPORTIONALFONTSIZE
+ // TODO: not used?
+ // RES_CHRATR_SHADOWED
+ M_E( "CharShadowed", FO, text_shadow, XML_TYPE_TEXT_SHADOWED, 0 ),
+ // BIS HIER GEPRUEFT!
+ // RES_CHRATR_UNDERLINE
+ M_E( "CharUnderline", STYLE, text_underline, XML_TYPE_TEXT_UNDERLINE, 0 ),
+ // RES_CHRATR_WEIGHT
+ M_E( "CharWeight", FO, font_weight, XML_TYPE_TEXT_WEIGHT, 0 ),
+ // RES_CHRATR_WORDLINEMODE
+ M_E( "WordMode", FO, score_spaces, XML_TYPE_NBOOL, 0 ),
+ // RES_CHRATR_AUTOKERN
+ M_E( "CharAutoKerning", STYLE, letter_kerning, XML_TYPE_BOOL, 0 ),
+ // RES_CHRATR_BLINK
+ M_E( "CharFlash", STYLE, text_blinking, XML_TYPE_BOOL, 0 ),
+ // RES_CHRATR_NOHYPHEN
+ // TODO: not used?
+ // RES_CHRATR_NOLINEBREAK
+ // TODO: not used?
+ // RES_CHRATR_BACKGROUND
+ M_E( "CharBackColor", STYLE, text_background_color, XML_TYPE_COLOR, 0 ),
+ M_E( "CharBackColor", FO, text_background_color, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLDTEXTBACKGROUND ),
+ // RES_TXTATR_INETFMT
+ // TODO
+ // RES_TXTATR_REFMARK
+ // TODO
+ // RES_TXTATR_TOXMARK
+ // TODO
+ // RES_TXTATR_CHARFMT
+// M_E_SI( TEXT, style_name, RES_TXTATR_CHARFMT, 0 ),
+ // RES_TXTATR_FIELD
+ // TODO
+ // RES_TXTATR_FLYCNT
+ // TODO
+ // RES_TXTATR_FTN
+ // TODO
+ // RES_TXTATR_SOFTHYPH
+ // TODO
+ // RES_TXTATR_HARDBLANK
+ // TODO
+
+ // RES_PARATR_LINESPACING
+ M_E( "ParaLineSpacing", FO, line_height, XML_TYPE_LINE_SPACE_FIXED, 0 ),
+ M_E( "ParaLineSpacing", STYLE, line_height_at_least, XML_TYPE_LINE_SPACE_MINIMUM, 0 ),
+ M_E( "ParaLineSpacing", STYLE, line_spacing, XML_TYPE_LINE_SPACE_DISTANCE, 0 ),
+ // RES_PARATR_ADJUST
+ M_E( "ParaAdjust", FO, text_align, XML_TYPE_TEXT_ADJUST, 0 ),
+ M_E( "ParaLastLineAdjust", FO, text_align_last, XML_TYPE_TEXT_ADJUSTLAST, 0 ),
+ M_E( "ParaExpandSingleWord",STYLE, justify_single_word,XML_TYPE_BOOL, 0 ),
+ // RES_PARATR_SPLIT
+ M_E( "ParaSplit", STYLE, break_inside, XML_TYPE_TEXT_SPLIT, 0 ),
+ // RES_PARATR_ORPHANS
+ M_E( "ParaOrphans", FO, orphans, XML_TYPE_NUMBER8, 0 ),
+ // RES_PARATR_WIDOWS
+ M_E( "ParaWidows", FO, widows, XML_TYPE_NUMBER8, 0 ),
+ // RES_PARATR_TABSTOP
+ M_E( "ParaTabStops", STYLE, tabstop_tab_stops, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_TABSTOP, CTF_TABSTOP ), // this is not realy a string!
+ // RES_PARATR_HYPHENZONE
+ M_E( "ParaIsHyphenation", FO, hyphenate, XML_TYPE_BOOL, 0 ),
+ M_E( "ParaHyphenationMaxLeadingChars", FO, hyphenation_remain_char_count, XML_TYPE_NUMBER, 0 ),
+ M_E( "ParaHyphenationMaxTrailingChars",FO, hyphenation_push_char_count, XML_TYPE_NUMBER, 0 ),
+ M_E( "ParaHyphenationMaxHyphens", FO, hyphenation_ladder_count, XML_TYPE_NUMBER_NONE, 0 ),
+ // RES_PARATR_DROP
+ M_E( "DropCapWholeWord", STYLE, length, MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_DROPCAPWHOLEWORD ),
+ M_E( "DropCapCharStyleName", STYLE, style_name, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_DROPCAPCHARSTYLE ),
+ M_E( "DropCapFormat", STYLE, drop_cap, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_DROPCAP, CTF_DROPCAPFORMAT ),
+ // RES_PARATR_REGISTER
+ M_E( "ParaRegisterModeActive", STYLE, register_true, XML_TYPE_BOOL, 0 ),
+ // RES_PARATR_NUMRULE
+ M_E( "NumberingStyleName", STYLE, list_style_name, MID_FLAG_SPECIAL_ITEM|XML_TYPE_STRING, CTF_NUMBERINGSTYLENAME ),
+
+ // RES_FILL_ORDER
+ // not required
+ // RES_FRM_SIZE
+ // not required
+ // RES_PAPER_BIN
+ // not required
+ // RES_LR_SPACE
+
+ M_E( "ParaLeftMargin", FO, margin_left, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARALEFTMARGIN ),
+ M_E( "ParaLeftMarginRelative", FO, margin_left, XML_TYPE_PERCENT, CTF_PARALEFTMARGIN_REL ),
+ M_E( "ParaRightMargin", FO, margin_right, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARARIGHTMARGIN ),
+ M_E( "ParaRightMarginRelative", FO, margin_right, XML_TYPE_PERCENT, CTF_PARARIGHTMARGIN_REL ),
+ M_E( "ParaFirstLineIndent", FO, text_indent, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARAFIRSTLINE ),
+ M_E( "ParaFirstLineIndentRelative", FO, text_indent, XML_TYPE_PERCENT, CTF_PARAFIRSTLINE_REL ),
+ M_E( "ParaLastLineAdjust", STYLE, auto_text_indent, XML_TYPE_BOOL, 0 ),
+ // RES_UL_SPACE
+ M_E( "ParaTopMargin", FO, margin_top, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARATOPMARGIN ),
+ M_E( "ParaTopMarginRelative", FO, margin_top, XML_TYPE_PERCENT, CTF_PARATOPMARGIN_REL ),
+ M_E( "ParaBottomMargin", FO, margin_bottom, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARABOTTOMMARGIN ),
+ M_E( "ParaBottomMarginRelative",FO, margin_bottom, XML_TYPE_PERCENT, CTF_PARABOTTOMMARGIN_REL ),
+ // RES_PAGEDESC
+ // TODO
+ // RES_BREAK : TODO: does this work?
+ M_E( "BreakType", FO, break_before, XML_TYPE_TEXT_BREAKBEFORE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "BreakType", FO, break_after, XML_TYPE_TEXT_BREAKAFTER, 0 ),
+ // RES_CNTNT
+ // not required
+ // RES_HEADER
+ // not required
+ // RES_FOOTER
+ // not required
+ // RES_PRINT
+ // not required
+ // RES_OPAQUE
+ // not required
+ // RES_PROTECT
+ // not required
+ // RES_SURROUND
+ // not required
+ // RES_VERT_ORIENT
+ // not required
+ // RES_HORI_ORIENT
+ // not required
+ // RES_ANCHOR
+ // not required
+ // RES_BACKGROUND
+ M_E( "ParaBackColor", FO, background_color, XML_TYPE_COLOR, 0 ),
+// M_E( STYLE, background_image, RES_BACKGROUND, MID_FLAG_ELEMENT_ITEM ),
+ // RES_BOX
+ M_E( "LeftBorder", STYLE, border_line_width, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),
+ M_E( "LeftBorder", STYLE, border_line_width_left, XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH ),
+ M_E( "RightBorder", STYLE, border_line_width_right, XML_TYPE_BORDER_WIDTH, CTF_RIGHTBORDERWIDTH ),
+ M_E( "TopBorder", STYLE, border_line_width_top, XML_TYPE_BORDER_WIDTH, CTF_TOPBORDERWIDTH ),
+ M_E( "BottomBorder", STYLE, border_line_width_bottom, XML_TYPE_BORDER_WIDTH, CTF_BOTTOMBORDERWIDTH ),
+
+ M_E( "LeftBorderDistance", FO, padding, XML_TYPE_MEASURE, CTF_ALLBORDERDISTANCE ), // need special import filtering
+ M_E( "LeftBorderDistance", FO, padding_left, XML_TYPE_MEASURE, CTF_LEFTBORDERDISTANCE ),
+ M_E( "RightBorderDistance", FO, padding_right, XML_TYPE_MEASURE, CTF_RIGHTBORDERDISTANCE ),
+ M_E( "TopBorderDistance", FO, padding_top, XML_TYPE_MEASURE, CTF_TOPBORDERDISTANCE ),
+ M_E( "BottomBorderDistance",FO, padding_bottom, XML_TYPE_MEASURE, CTF_BOTTOMBORDERDISTANCE ),
+
+ M_E( "LeftBorder", FO, border, XML_TYPE_BORDER, CTF_ALLBORDER ),
+ M_E( "LeftBorder", FO, border_left, XML_TYPE_BORDER, CTF_LEFTBORDER ),
+ M_E( "RightBorder", FO, border_right, XML_TYPE_BORDER, CTF_RIGHTBORDER ),
+ M_E( "TopBorder", FO, border_top, XML_TYPE_BORDER, CTF_TOPBORDER ),
+ M_E( "BottomBorder", FO, border_bottom, XML_TYPE_BORDER, CTF_BOTTOMBORDER ),
+ // RES_SHADOW
+ M_E( "ShadowFormat", STYLE, shadow, XML_TYPE_TEXT_SHADOW, 0 ),
+ // RES_FRMMACRO
+ // not required
+ // RES_COL
+ // not required
+ // RES_KEEP
+ M_E( "KeepTogether", FO, keep_with_next, XML_TYPE_BOOL, 0 ),
+ // RES_URL
+ // not required
+ // RES_EDIT_IN_READONLY
+ // not required
+ // RES_LAYOUT_SPLIT
+ // not required
+ // RES_CHAIN
+ // not required
+ // RES_LINENUMBER
+ // TODO
+ // RES_FTN_AT_TXTEND
+ // not required
+ // RES_END_AT_TXTEND
+ // not required
+ // RES_UNKNOWNATR_CONTAINER
+// M_E_SE( TEXT, xmlns, RES_UNKNOWNATR_CONTAINER, 0 ),
+ { 0, 0, 0, 0 }
+};
+
+XMLPropertyMapEntry aXMLTextPropMap[] =
+{
+ // RES_CHRATR_CASEMAP
+ M_E( "CharCaseMap", FO, font_variant, XML_TYPE_TEXT_CASEMAP_VAR, 0 ),
+ M_E( "CharCaseMap", FO, text_transform, XML_TYPE_TEXT_CASEMAP, 0 ),
+ // RES_CHRATR_COLOR
+ M_E( "CharColor", FO, color, XML_TYPE_COLOR, 0 ),
+ // RES_CHRATR_CONTOUR
+ M_E( "CharContoured", STYLE, text_outline, XML_TYPE_BOOL, 0 ),
+ // RES_CHRATR_CROSSEDOUT
+ M_E( "CharStrikeout", STYLE, text_crossing_out, XML_TYPE_TEXT_CROSSEDOUT, 0),
+ // RES_CHRATR_ESCAPEMENT
+ M_E( "CharEscapement", STYLE, text_position, XML_TYPE_TEXT_ESCAPEMENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ), // BugID #76842#
+ M_E( "CharEscapementHeight", STYLE, text_position, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
+ // RES_CHRATR_FONT
+ M_E( "CharFontName", FO, font_family, XML_TYPE_TEXT_FONTFAMILYNAME, 0 ),
+ M_E( "CharFontStyleName",STYLE, font_style_name, XML_TYPE_STRING, 0 ),
+ M_E( "CharFontFamily", STYLE, font_family_generic,XML_TYPE_TEXT_FONTFAMILY, 0 ),
+ M_E( "CharFontPitch", STYLE, font_pitch, XML_TYPE_TEXT_FONTPITCH, 0 ),
+ M_E( "CharFontCharSet", STYLE, font_charset, XML_TYPE_TEXT_FONTENCODING, 0 ),
+ // RES_CHRATR_FONTSIZE
+ M_E( "CharHeight", FO, font_size, XML_TYPE_CHAR_HEIGHT|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT ),
+ M_E( "CharPropFontHeight",FO, font_size, XML_TYPE_CHAR_HEIGHT_PROP|MID_FLAG_MULTI_PROPERTY, CTF_CHARHEIGHT_REL ),
+ // RES_CHRATR_KERNING
+ M_E( "CharKerning", FO, letter_spacing, XML_TYPE_TEXT_KERNING, 0 ),
+ // RES_CHRATR_LANGUAGE
+ M_E( "CharLocale", FO, language, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ M_E( "CharLocale", FO, country, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 ),
+ // RES_CHRATR_POSTURE
+ M_E( "CharPosture", FO, font_style, XML_TYPE_TEXT_POSTURE, 0 ),
+ // RES_CHRATR_PROPORTIONALFONTSIZE
+ // TODO: not used?
+ // RES_CHRATR_SHADOWED
+ M_E( "CharShadowed", FO, text_shadow, XML_TYPE_TEXT_SHADOWED, 0 ),
+ // BIS HIER GEPRUEFT!
+ // RES_CHRATR_UNDERLINE
+ M_E( "CharUnderline", STYLE, text_underline, XML_TYPE_TEXT_UNDERLINE, 0 ),
+ // RES_CHRATR_WEIGHT
+ M_E( "CharWeight", FO, font_weight, XML_TYPE_TEXT_WEIGHT, 0 ),
+ // RES_CHRATR_WORDLINEMODE
+ M_E( "WordMode", FO, score_spaces, XML_TYPE_NBOOL, 0 ),
+ // RES_CHRATR_AUTOKERN
+ M_E( "CharAutoKerning", STYLE, letter_kerning, XML_TYPE_BOOL, 0 ),
+ // RES_CHRATR_BLINK
+ M_E( "CharFlash", STYLE, text_blinking, XML_TYPE_BOOL, 0 ),
+ // RES_CHRATR_NOHYPHEN
+ // TODO: not used?
+ // RES_CHRATR_NOLINEBREAK
+ // TODO: not used?
+ // RES_CHRATR_BACKGROUND
+ M_E( "CharBackColor", STYLE, text_background_color, XML_TYPE_COLOR, 0 ),
+ M_E( "CharBackColor", FO, text_background_color, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLDTEXTBACKGROUND ),
+ // RES_TXTATR_INETFMT
+ // TODO
+ // RES_TXTATR_REFMARK
+ // TODO
+ // RES_TXTATR_TOXMARK
+ // TODO
+ // RES_TXTATR_CHARFMT
+// M_E_SI( TEXT, style_name, RES_TXTATR_CHARFMT, 0 ),
+ // RES_TXTATR_FIELD
+ // TODO
+ // RES_TXTATR_FLYCNT
+ // TODO
+ // RES_TXTATR_FTN
+ // TODO
+ // RES_TXTATR_SOFTHYPH
+ // TODO
+ // RES_TXTATR_HARDBLANK
+ // TODO
+
+ // RES_UNKNOWNATR_CONTAINER
+// M_E_SE( TEXT, xmlns, RES_UNKNOWNATR_CONTAINER, 0 ),
+ { 0, 0, 0, 0 }
+};
+
+XMLPropertyMapEntry aXMLFramePropMap[] =
+{
+ // RES_FILL_ORDER
+ // TODO: not required???
+ // RES_FRM_SIZE
+ M_E( "Width", SVG, width, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_FRAMEWIDTH_ABS ),
+ M_E( "RelativeWidth", SVG, width, XML_TYPE_PERCENT16, CTF_FRAMEWIDTH_REL ),
+ M_E( "Height", SVG, height, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_FRAMEHEIGHT_ABS ),
+ M_E( "Height", FO, min_height, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_FRAMEHEIGHT_MIN_ABS ),
+ M_E( "RelativeHeight", SVG, height, XML_TYPE_PERCENT16, CTF_FRAMEHEIGHT_REL ),
+ M_E( "RelativeHeight", FO, min_height, XML_TYPE_PERCENT16, CTF_FRAMEHEIGHT_MIN_REL ),
+ M_E( "SizeType", FO, text_box, XML_TYPE_NUMBER16|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SIZETYPE ),
+ M_E( "SizeRelative", FO, text_box, XML_TYPE_BOOL|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SYNCHEIGHT ),
+ // RES_PAPER_BIN
+ // not required
+ // RES_ANCHOR
+ // moved to here because it is not used for automatic styles
+ M_E( "AnchorType", TEXT, anchor_type, XML_TYPE_TEXT_ANCHOR_TYPE, CTF_ANCHORTYPE ),
+ M_E( "AnchorPageNo", TEXT, anchor_page_number, XML_TYPE_NUMBER16, CTF_ANCHORPAGENUMBER ),
+ M_E( "HoriOrientPosition", SVG, x, XML_TYPE_MEASURE, 0 ),
+ M_E( "VertOrientPosition", SVG, y, XML_TYPE_MEASURE, 0 ),
+ // ***** The map for automatic styles starts here *****
+ // RES_LR_SPACE
+ M_E( "LeftMargin", FO, margin_left, XML_TYPE_MEASURE, 0),
+ M_E( "RightMargin", FO, margin_right, XML_TYPE_MEASURE, 0 ),
+ // RES_UL_SPACE
+ M_E( "TopMargin", FO, margin_top, XML_TYPE_MEASURE, 0 ),
+ M_E( "BottomMargin", FO, margin_bottom, XML_TYPE_MEASURE, 0 ),
+ // RES_PAGEDESC
+ // not required
+ // RES_BREAK
+ // not required
+ // RES_CNTNT
+ // not required (accessed using API)
+ // RES_HEADER
+ // not required
+ // RES_FOOTER
+ // not required
+ // RES_PRINT
+ M_E( "Print", STYLE, print_content, XML_TYPE_BOOL, 0 ),
+ // RES_OPAQUE
+ M_E( "Opaque", STYLE, run_through, XML_TYPE_TEXT_OPAQUE, 0 ),
+ // RES_PROTECT
+ M_E( "ContentProtected", STYLE, protect, XML_TYPE_TEXT_PROTECT_CONTENT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "SizeProtected", STYLE, protect, XML_TYPE_TEXT_PROTECT_SIZE|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "PositionProtected", STYLE, protect, XML_TYPE_TEXT_PROTECT_POSITION|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ // RES_SURROUND
+ M_E( "TextWrap", STYLE, wrap, XML_TYPE_TEXT_WRAP, CTF_WRAP ),
+ M_E( "SurroundAnchorOnly", STYLE, number_wrapped_paragraphs, XML_TYPE_TEXT_PARAGRAPH_ONLY, CTF_WRAP_PARAGRAPH_ONLY ),
+ M_E( "SurroundContour", STYLE, wrap_contour, XML_TYPE_BOOL, CTF_WRAP_CONTOUR ),
+ M_E( "ContourOutside", STYLE, wrap_contour_mode, XML_TYPE_TEXT_WRAP_OUTSIDE, CTF_WRAP_CONTOUR_MODE ),
+ // RES_VERT_ORIENT
+ M_E( "VertOrient", STYLE, vertical_pos, XML_TYPE_TEXT_VERTICAL_POS, CTF_VERTICALPOS ),
+ M_E( "VertOrient", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR|MID_FLAG_MULTI_PROPERTY, CTF_VERTICALREL_ASCHAR ),
+ M_E( "VertOrientRelation", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL, CTF_VERTICALREL ),
+ M_E( "VertOrientRelation", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_PAGE ),
+ M_E( "VertOrientRelation", STYLE, vertical_rel, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_FRAME ),
+ // RES_HORI_ORIENT
+ M_E( "HoriOrient", STYLE, horizontal_pos, XML_TYPE_TEXT_HORIZONTAL_POS|MID_FLAG_MULTI_PROPERTY, CTF_HORIZONTALPOS ),
+ M_E( "PageToggle", STYLE, horizontal_pos, XML_TYPE_TEXT_HORIZONTAL_MIRROR, CTF_HORIZONTALMIRROR ),
+ M_E( "HoriOrient", STYLE, horizontal_pos, XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALPOS_MIRRORED ),
+ M_E( "HoriOrientRelation", STYLE, horizontal_rel, XML_TYPE_TEXT_HORIZONTAL_REL, CTF_HORIZONTALREL ),
+ M_E( "HoriOrientRelation", STYLE, horizontal_rel, XML_TYPE_TEXT_HORIZONTAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_HORIZONTALREL_FRAME ),
+ // RES_ANCHOR
+ // see above
+ // RES_BACKGROUND
+ // TODO
+ // RES_BOX
+ M_E( "LeftBorder", STYLE, border_line_width, XML_TYPE_BORDER_WIDTH, CTF_ALLBORDERWIDTH ),
+ M_E( "LeftBorder", STYLE, border_line_width_left, XML_TYPE_BORDER_WIDTH, CTF_LEFTBORDERWIDTH ),
+ M_E( "RightBorder", STYLE, border_line_width_right, XML_TYPE_BORDER_WIDTH, CTF_RIGHTBORDERWIDTH ),
+ M_E( "TopBorder", STYLE, border_line_width_top, XML_TYPE_BORDER_WIDTH, CTF_TOPBORDERWIDTH ),
+ M_E( "BottomBorder", STYLE, border_line_width_bottom, XML_TYPE_BORDER_WIDTH, CTF_BOTTOMBORDERWIDTH ),
+
+ M_E( "LeftBorderDistance", FO, padding, XML_TYPE_MEASURE, CTF_ALLBORDERDISTANCE ), // need special import filtering
+ M_E( "LeftBorderDistance", FO, padding_left, XML_TYPE_MEASURE, CTF_LEFTBORDERDISTANCE ),
+ M_E( "RightBorderDistance", FO, padding_right, XML_TYPE_MEASURE, CTF_RIGHTBORDERDISTANCE ),
+ M_E( "TopBorderDistance", FO, padding_top, XML_TYPE_MEASURE, CTF_TOPBORDERDISTANCE ),
+ M_E( "BottomBorderDistance",FO, padding_bottom, XML_TYPE_MEASURE, CTF_BOTTOMBORDERDISTANCE ),
+
+ M_E( "LeftBorder", FO, border, XML_TYPE_BORDER, CTF_ALLBORDER ),
+ M_E( "LeftBorder", FO, border_left, XML_TYPE_BORDER, CTF_LEFTBORDER ),
+ M_E( "RightBorder", FO, border_right, XML_TYPE_BORDER, CTF_RIGHTBORDER ),
+ M_E( "TopBorder", FO, border_top, XML_TYPE_BORDER, CTF_TOPBORDER ),
+ M_E( "BottomBorder", FO, border_bottom, XML_TYPE_BORDER, CTF_BOTTOMBORDER ),
+ // RES_SHADOW
+ M_E( "ShadowFormat", STYLE, shadow, XML_TYPE_TEXT_SHADOW, 0 ),
+ // RES_FRMMACRO
+ // TODO
+ // RES_COL
+ M_E( "TextColumns", STYLE, columns, MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_COLUMNS, CTF_TEXTCOLUMNS ),
+ // TODO: Column delimiter line
+ // RES_KEEP
+ // not required
+ // RES_URL
+ // TODO
+ // RES_EDIT_IN_READONLY
+ M_E( "EditInReadonly", STYLE, editable, XML_TYPE_BOOL, 0 ),
+ // RES_LAYOUT_SPLIT
+ // not required
+ // RES_CHAIN
+ // not required (exported at text:text-box element)
+ // RES_LINENUMBER
+ // not required
+ // RES_FTN_AT_TXTEND
+ // not required
+ // RES_END_AT_TXTEND
+ // not required
+ // RES_UNKNOWNATR_CONTAINER
+// M_E_SE( TEXT, xmlns, RES_UNKNOWNATR_CONTAINER, 0 ),
+ // RES_GRFATR_MIRRORGRF (vertical MUST be processed after horizontal!)
+ M_E( "HoriMirroredLeft", STYLE, mirror, XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "HoriMirroredRight", STYLE, mirror, XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ M_E( "VertMirrored", STYLE, mirror, XML_TYPE_TEXT_MIRROR_VERTICAL|MID_FLAG_MERGE_ATTRIBUTE|MID_FLAG_MULTI_PROPERTY, 0 ),
+ // RES_GRFATR_CROPGRF
+ M_E( "GraphicCrop", FO, clip, XML_TYPE_TEXT_CLIP, 0 ),
+ { 0, 0, 0, 0 }
+};
+
+void XMLTextPropertySetMapper::ContextFilter(
+ ::std::vector< XMLPropertyState >& rProperties,
+ Reference< XPropertySet > rPropSet ) const
+{
+ // filter char height point/percent
+ XMLPropertyState* pCharHeightState = NULL;
+ XMLPropertyState* pCharPropHeightState = NULL;
+
+ // filter left margin measure/percent
+ XMLPropertyState* pParaLeftMarginState = NULL;
+ XMLPropertyState* pParaLeftMarginRelState = NULL;
+
+ // filter right margin measure/percent
+ XMLPropertyState* pParaRightMarginState = NULL;
+ XMLPropertyState* pParaRightMarginRelState = NULL;
+
+ // filter first line indent measure/percent
+ XMLPropertyState* pParaFirstLineState = NULL;
+ XMLPropertyState* pParaFirstLineRelState = NULL;
+
+ // filter ParaTopMargin/Relative
+ XMLPropertyState* pParaTopMarginState = NULL;
+ XMLPropertyState* pParaTopMarginRelState = NULL;
+
+ // filter ParaTopMargin/Relative
+ XMLPropertyState* pParaBottomMarginState = NULL;
+ XMLPropertyState* pParaBottomMarginRelState = NULL;
+
+ // filter (Left|Right|Top|Bottom|)BorderWidth
+ XMLPropertyState* pAllBorderWidthState = NULL;
+ XMLPropertyState* pLeftBorderWidthState = NULL;
+ XMLPropertyState* pRightBorderWidthState = NULL;
+ XMLPropertyState* pTopBorderWidthState = NULL;
+ XMLPropertyState* pBottomBorderWidthState = NULL;
+
+ // filter (Left|Right|Top|)BorderDistance
+ XMLPropertyState* pAllBorderDistanceState = NULL;
+ XMLPropertyState* pLeftBorderDistanceState = NULL;
+ XMLPropertyState* pRightBorderDistanceState = NULL;
+ XMLPropertyState* pTopBorderDistanceState = NULL;
+ XMLPropertyState* pBottomBorderDistanceState = NULL;
+
+ // filter (Left|Right|Top|Bottom|)Border
+ XMLPropertyState* pAllBorderState = NULL;
+ XMLPropertyState* pLeftBorderState = NULL;
+ XMLPropertyState* pRightBorderState = NULL;
+ XMLPropertyState* pTopBorderState = NULL;
+ XMLPropertyState* pBottomBorderState = NULL;
+
+ // filter width/height properties
+ XMLPropertyState* pWidthAbsState = NULL;
+ XMLPropertyState* pWidthMinAbsState = NULL;
+ XMLPropertyState* pWidthRelState = NULL;
+ XMLPropertyState* pWidthMinRelState = NULL;
+ XMLPropertyState* pHeightAbsState = NULL;
+ XMLPropertyState* pHeightMinAbsState = NULL;
+ XMLPropertyState* pHeightRelState = NULL;
+ XMLPropertyState* pHeightMinRelState = NULL;
+ XMLPropertyState* pSizeTypeState = NULL;
+ XMLPropertyState* pSyncHeightState = NULL;
+
+ // wrap
+ XMLPropertyState* pWrapState = NULL;
+ XMLPropertyState* pWrapContourState = NULL;
+ XMLPropertyState* pWrapContourModeState = NULL;
+ XMLPropertyState* pWrapParagraphOnlyState = NULL;
+
+ // anchor
+ XMLPropertyState* pAnchorTypeState = NULL;
+ XMLPropertyState* pAnchorPageNumberState = NULL;
+
+ // horizontal position and relation
+ XMLPropertyState* pHoriOrientState = NULL;
+ XMLPropertyState* pHoriOrientMirroredState = NULL;
+ XMLPropertyState* pHoriOrientRelState = NULL;
+ XMLPropertyState* pHoriOrientRelFrameState = NULL;
+ XMLPropertyState* pHoriOrientMirrorState = NULL;
+
+ // vertical position and relation
+ XMLPropertyState* pVertOrientState = NULL;
+ XMLPropertyState* pVertOrientRelState = NULL;
+ XMLPropertyState* pVertOrientRelPageState = NULL;
+ XMLPropertyState* pVertOrientRelFrameState = NULL;
+ XMLPropertyState* pVertOrientRelAsCharState = NULL;
+
+ sal_Bool bNeedsAnchor = sal_False;
+
+ for( ::std::vector< XMLPropertyState >::iterator propertie = rProperties.begin();
+ propertie != rProperties.end();
+ propertie++ )
+ {
+ switch( GetEntryContextId( propertie->mnIndex ) )
+ {
+ case CTF_CHARHEIGHT: pCharHeightState = propertie; break;
+ case CTF_CHARHEIGHT_REL: pCharPropHeightState = propertie; break;
+ case CTF_PARALEFTMARGIN: pParaLeftMarginState = propertie; break;
+ case CTF_PARALEFTMARGIN_REL: pParaLeftMarginRelState = propertie; break;
+ case CTF_PARARIGHTMARGIN: pParaRightMarginState = propertie; break;
+ case CTF_PARARIGHTMARGIN_REL: pParaRightMarginRelState = propertie; break;
+ case CTF_PARAFIRSTLINE: pParaFirstLineState = propertie; break;
+ case CTF_PARAFIRSTLINE_REL: pParaFirstLineRelState = propertie; break;
+ case CTF_PARATOPMARGIN: pParaTopMarginState = propertie; break;
+ case CTF_PARATOPMARGIN_REL: pParaTopMarginRelState = propertie; break;
+ case CTF_PARABOTTOMMARGIN: pParaBottomMarginState = propertie; break;
+ case CTF_PARABOTTOMMARGIN_REL: pParaBottomMarginRelState = propertie; break;
+ case CTF_ALLBORDERWIDTH: pAllBorderWidthState = propertie; break;
+ case CTF_LEFTBORDERWIDTH: pLeftBorderWidthState = propertie; break;
+ case CTF_RIGHTBORDERWIDTH: pRightBorderWidthState = propertie; break;
+ case CTF_TOPBORDERWIDTH: pTopBorderWidthState = propertie; break;
+ case CTF_BOTTOMBORDERWIDTH: pBottomBorderWidthState = propertie; break;
+ case CTF_ALLBORDERDISTANCE: pAllBorderDistanceState = propertie; break;
+ case CTF_LEFTBORDERDISTANCE: pLeftBorderDistanceState = propertie; break;
+ case CTF_RIGHTBORDERDISTANCE: pRightBorderDistanceState = propertie; break;
+ case CTF_TOPBORDERDISTANCE: pTopBorderDistanceState = propertie; break;
+ case CTF_BOTTOMBORDERDISTANCE: pBottomBorderDistanceState = propertie; break;
+ case CTF_ALLBORDER: pAllBorderState = propertie; break;
+ case CTF_LEFTBORDER: pLeftBorderState = propertie; break;
+ case CTF_RIGHTBORDER: pRightBorderState = propertie; break;
+ case CTF_TOPBORDER: pTopBorderState = propertie; break;
+ case CTF_BOTTOMBORDER: pBottomBorderState = propertie; break;
+
+ case CTF_FRAMEWIDTH_ABS: pWidthAbsState = propertie; break;
+ case CTF_FRAMEWIDTH_REL: pWidthRelState = propertie; break;
+ case CTF_FRAMEHEIGHT_ABS: pHeightAbsState = propertie; break;
+ case CTF_FRAMEHEIGHT_MIN_ABS: pHeightMinAbsState = propertie; break;
+ case CTF_FRAMEHEIGHT_REL: pHeightRelState = propertie; break;
+ case CTF_FRAMEHEIGHT_MIN_REL: pHeightMinRelState = propertie; break;
+ case CTF_SIZETYPE: pSizeTypeState = propertie; break;
+ case CTF_SYNCHEIGHT: pSyncHeightState = propertie; break;
+
+ case CTF_WRAP: pWrapState = propertie; break;
+ case CTF_WRAP_CONTOUR: pWrapContourState = propertie; break;
+ case CTF_WRAP_CONTOUR_MODE: pWrapContourModeState = propertie; break;
+ case CTF_WRAP_PARAGRAPH_ONLY: pWrapParagraphOnlyState = propertie; break;
+ case CTF_ANCHORTYPE: pAnchorTypeState = propertie; break;
+ case CTF_ANCHORPAGENUMBER: pAnchorPageNumberState = propertie; bNeedsAnchor = sal_True; break;
+
+ case CTF_HORIZONTALPOS: pHoriOrientState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_HORIZONTALPOS_MIRRORED: pHoriOrientMirroredState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_HORIZONTALREL: pHoriOrientRelState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_HORIZONTALREL_FRAME: pHoriOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_HORIZONTALMIRROR: pHoriOrientMirrorState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_VERTICALPOS: pVertOrientState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_VERTICALREL: pVertOrientRelState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_VERTICALREL_PAGE: pVertOrientRelPageState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_VERTICALREL_FRAME: pVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_VERTICALREL_ASCHAR: pVertOrientRelAsCharState = propertie; bNeedsAnchor = sal_True; break;
+ }
+ }
+
+ if( pCharHeightState && pCharPropHeightState )
+ {
+ sal_Int32 nTemp;
+ pCharPropHeightState->maValue >>= nTemp;
+ if( nTemp == 100 )
+ {
+ pCharPropHeightState->mnIndex = -1;
+ pCharPropHeightState->maValue.clear();
+ }
+ else
+ {
+ pCharHeightState->mnIndex = -1;
+ pCharHeightState->maValue.clear();
+ }
+ }
+
+ if( pParaLeftMarginState && pParaLeftMarginRelState )
+ {
+ sal_Int32 nTemp;
+ pParaLeftMarginRelState->maValue >>= nTemp;
+ if( nTemp == 100 )
+ {
+ pParaLeftMarginRelState->mnIndex = -1;
+ pParaLeftMarginRelState->maValue.clear();
+ }
+ else
+ {
+ pParaLeftMarginState->mnIndex = -1;
+ pParaLeftMarginState->maValue.clear();
+ }
+
+ }
+
+ if( pParaRightMarginState && pParaRightMarginRelState )
+ {
+ sal_Int32 nTemp;
+ pParaRightMarginRelState->maValue >>= nTemp;
+ if( nTemp == 100 )
+ {
+ pParaRightMarginRelState->mnIndex = -1;
+ pParaRightMarginRelState->maValue.clear();
+ }
+ else
+ {
+ pParaRightMarginState->mnIndex = -1;
+ pParaRightMarginState->maValue.clear();
+ }
+ }
+
+ if( pParaFirstLineState && pParaFirstLineRelState )
+ {
+ sal_Int32 nTemp;
+ pParaFirstLineRelState->maValue >>= nTemp;
+ if( nTemp == 100 )
+ {
+ pParaFirstLineRelState->mnIndex = -1;
+ pParaFirstLineRelState->maValue.clear();
+ }
+ else
+ {
+ pParaFirstLineState->mnIndex = -1;
+ pParaFirstLineState->maValue.clear();
+ }
+ }
+
+ if( pParaTopMarginState && pParaTopMarginRelState )
+ {
+ sal_Int32 nTemp;
+ pParaTopMarginRelState->maValue >>= nTemp;
+ if( nTemp == 100 )
+ {
+ pParaTopMarginRelState->mnIndex = -1;
+ pParaTopMarginRelState->maValue.clear();
+ }
+ else
+ {
+ pParaTopMarginState->mnIndex = -1;
+ pParaTopMarginState->maValue.clear();
+ }
+
+ }
+
+ if( pParaBottomMarginState && pParaBottomMarginRelState )
+ {
+ sal_Int32 nTemp;
+ pParaBottomMarginRelState->maValue >>= nTemp;
+ if( nTemp == 100 )
+ {
+ pParaBottomMarginRelState->mnIndex = -1;
+ pParaBottomMarginRelState->maValue.clear();
+ }
+ else
+ {
+ pParaBottomMarginState->mnIndex = -1;
+ pParaBottomMarginState->maValue.clear();
+ }
+
+ }
+
+ if( pAllBorderWidthState )
+ {
+ if( pLeftBorderWidthState && pRightBorderWidthState && pTopBorderWidthState && pBottomBorderWidthState )
+ {
+ table::BorderLine aLeft, aRight, aTop, aBottom;
+
+ pLeftBorderWidthState->maValue >>= aLeft;
+ pRightBorderWidthState->maValue >>= aRight;
+ pTopBorderWidthState->maValue >>= aTop;
+ pBottomBorderWidthState->maValue >>= aBottom;
+ if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
+ aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
+ aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
+ aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
+ aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
+ aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance )
+ {
+ pLeftBorderWidthState->mnIndex = -1;
+ pLeftBorderWidthState->maValue.clear();
+ pRightBorderWidthState->mnIndex = -1;
+ pRightBorderWidthState->maValue.clear();
+ pTopBorderWidthState->mnIndex = -1;
+ pTopBorderWidthState->maValue.clear();
+ pBottomBorderWidthState->mnIndex = -1;
+ pBottomBorderWidthState->maValue.clear();
+ }
+ else
+ {
+ pAllBorderWidthState->mnIndex = -1;
+ pAllBorderWidthState->maValue.clear();
+ }
+ }
+ else
+ {
+ pAllBorderWidthState->mnIndex = -1;
+ pAllBorderWidthState->maValue.clear();
+ }
+ }
+
+ if( pAllBorderDistanceState )
+ {
+ if( pLeftBorderDistanceState && pRightBorderDistanceState && pTopBorderDistanceState && pBottomBorderDistanceState )
+ {
+ sal_Int32 aLeft, aRight, aTop, aBottom;
+
+ pLeftBorderDistanceState->maValue >>= aLeft;
+ pRightBorderDistanceState->maValue >>= aRight;
+ pTopBorderDistanceState->maValue >>= aTop;
+ pBottomBorderDistanceState->maValue >>= aBottom;
+ if( aLeft == aRight && aLeft == aTop && aLeft == aBottom )
+ {
+ pLeftBorderDistanceState->mnIndex = -1;
+ pLeftBorderDistanceState->maValue.clear();
+ pRightBorderDistanceState->mnIndex = -1;
+ pRightBorderDistanceState->maValue.clear();
+ pTopBorderDistanceState->mnIndex = -1;
+ pTopBorderDistanceState->maValue.clear();
+ pBottomBorderDistanceState->mnIndex = -1;
+ pBottomBorderDistanceState->maValue.clear();
+ }
+ else
+ {
+ pAllBorderDistanceState->mnIndex = -1;
+ pAllBorderDistanceState->maValue.clear();
+ }
+ }
+ else
+ {
+ pAllBorderDistanceState->mnIndex = -1;
+ pAllBorderDistanceState->maValue.clear();
+ }
+ }
+
+ if( pAllBorderState )
+ {
+ if( pLeftBorderState && pRightBorderState && pTopBorderState && pBottomBorderState )
+ {
+ table::BorderLine aLeft, aRight, aTop, aBottom;
+
+ pLeftBorderState->maValue >>= aLeft;
+ pRightBorderState->maValue >>= aRight;
+ pTopBorderState->maValue >>= aTop;
+ pBottomBorderState->maValue >>= aBottom;
+ if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
+ aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
+ aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
+ aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
+ aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
+ aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance )
+ {
+ pLeftBorderState->mnIndex = -1;
+ pLeftBorderState->maValue.clear();
+ pRightBorderState->mnIndex = -1;
+ pRightBorderState->maValue.clear();
+ pTopBorderState->mnIndex = -1;
+ pTopBorderState->maValue.clear();
+ pBottomBorderState->mnIndex = -1;
+ pBottomBorderState->maValue.clear();
+ }
+ else
+ {
+ pAllBorderState->mnIndex = -1;
+ pAllBorderState->maValue.clear();
+ }
+ }
+ else
+ {
+ pAllBorderState->mnIndex = -1;
+ pAllBorderState->maValue.clear();
+ }
+ }
+
+ if( pWidthAbsState && pWidthRelState )
+ {
+ sal_Int16 nRelWidth = 0;
+ pWidthRelState->maValue >>= nRelWidth;
+ if( nRelWidth > 0 )
+ pWidthAbsState->mnIndex = -1;
+ // TODO: instead of checking this value for 255 a new property
+ // must be introduced like for heights.
+ if( nRelWidth == 255 )
+ pWidthRelState->mnIndex = -1;
+ }
+
+ if( pHeightAbsState && pHeightRelState )
+ {
+ DBG_ASSERT( pHeightMinAbsState, "no min abs state" );
+ DBG_ASSERT( pHeightMinRelState, "no min rel state" );
+ sal_Int32 nSizeType = SizeType::FIX;
+ if( pSizeTypeState )
+ pSizeTypeState->maValue >>= nSizeType;
+
+ if( SizeType::VARIABLE == nSizeType ||
+ ( pSyncHeightState &&
+ *(sal_Bool *)pSyncHeightState->maValue.getValue() ) )
+ {
+ pHeightAbsState->mnIndex = -1;
+ pHeightMinAbsState->mnIndex = -1;
+ pHeightRelState->mnIndex = -1;
+ pHeightMinRelState->mnIndex = -1;
+ }
+ else
+ {
+ sal_Int16 nRelHeight = 0;
+ pHeightRelState->maValue >>= nRelHeight;
+ sal_Bool bRel = (nRelHeight > 0);
+ sal_Bool bMin = (SizeType::MIN == nSizeType);
+ if( bRel || bMin )
+ pHeightAbsState->mnIndex = -1;
+ if( bRel || !bMin )
+ pHeightMinAbsState->mnIndex = -1;
+ if( !bRel || bMin )
+ pHeightRelState->mnIndex = -1;
+ if( !bRel || !bMin )
+ pHeightMinRelState->mnIndex = -1;
+ }
+ }
+ if( pSizeTypeState )
+ pSizeTypeState->mnIndex = -1;
+ if( pSyncHeightState )
+ pSyncHeightState->mnIndex = -1;
+
+ if( pWrapState )
+ {
+ WrapTextMode eVal;
+ pWrapState->maValue >>= eVal;
+ switch( eVal )
+ {
+ case WrapTextMode_NONE:
+ case WrapTextMode_THROUGHT:
+ if( pWrapContourState )
+ pWrapContourState->mnIndex = -1;
+ if( pWrapParagraphOnlyState )
+ pWrapParagraphOnlyState->mnIndex = -1;
+ break;
+ }
+ if( pWrapContourModeState &&
+ (!pWrapContourState ||
+ !*(sal_Bool *)pWrapContourState ->maValue.getValue() ) )
+ pWrapContourModeState->mnIndex = -1;
+ }
+
+ TextContentAnchorType eAnchor = TextContentAnchorType_AT_PARAGRAPH;
+ if( pAnchorTypeState )
+ pAnchorTypeState->maValue >>= eAnchor;
+ else if( bNeedsAnchor )
+ {
+ Any aAny = rPropSet->getPropertyValue(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AnchorType") ) );
+ aAny >>= eAnchor;
+ }
+
+ if( pAnchorPageNumberState && TextContentAnchorType_AT_PAGE != eAnchor )
+ pAnchorPageNumberState->mnIndex = -1;
+
+ if( pHoriOrientState && pHoriOrientMirroredState )
+ {
+ if( pHoriOrientMirrorState &&
+ *(sal_Bool *)pHoriOrientMirrorState->maValue.getValue() )
+ pHoriOrientState->mnIndex = -1;
+ else
+ pHoriOrientMirroredState->mnIndex = -1;
+ }
+ if( pHoriOrientMirrorState )
+ pHoriOrientMirrorState->mnIndex = -1;
+
+ if( pHoriOrientRelState && TextContentAnchorType_AT_FRAME == eAnchor )
+ pHoriOrientRelState->mnIndex = -1;
+ if( pHoriOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
+ pHoriOrientRelFrameState->mnIndex = -1;;
+
+ if( pVertOrientRelState && TextContentAnchorType_AT_PARAGRAPH != eAnchor &&
+ TextContentAnchorType_AT_CHARACTER != eAnchor )
+ pVertOrientRelState->mnIndex = -1;
+ if( pVertOrientRelPageState && TextContentAnchorType_AT_PAGE != eAnchor )
+ pVertOrientRelPageState->mnIndex = -1;
+ if( pVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
+ pVertOrientRelFrameState->mnIndex = -1;
+ if( pVertOrientRelAsCharState && TextContentAnchorType_AS_CHARACTER != eAnchor )
+ pVertOrientRelAsCharState->mnIndex = -1;
+}
+
+XMLPropertyMapEntry *lcl_txtprmap_getMap( sal_uInt16 nType )
+{
+ XMLPropertyMapEntry *pMap = 0;
+ switch( nType )
+ {
+ case TEXT_PROP_MAP_TEXT:
+ pMap = aXMLTextPropMap;
+ break;
+ case TEXT_PROP_MAP_PARA:
+ pMap = aXMLParaPropMap;
+ break;
+ case TEXT_PROP_MAP_FRAME:
+ pMap = aXMLFramePropMap;
+ break;
+ case TEXT_PROP_MAP_AUTO_FRAME:
+ pMap = &(aXMLFramePropMap[12]);
+ DBG_ASSERT( pMap->msXMLName == sXML_margin_left, "frame map changed" );
+ break;
+ }
+ DBG_ASSERT( pMap, "illegal map type" );
+ return pMap;
+}
+
+XMLTextPropertySetMapper::XMLTextPropertySetMapper( sal_uInt16 nType ) :
+ XMLPropertySetMapper( lcl_txtprmap_getMap( nType ),
+ new XMLTextPropertyHandlerFactory )
+{
+}
+
+XMLTextPropertySetMapper::~XMLTextPropertySetMapper()
+{
+}
+
+
+
+
diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx
new file mode 100644
index 0000000000..e2eb7ca6b5
--- /dev/null
+++ b/xmloff/source/text/txtstyle.cxx
@@ -0,0 +1,175 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtstyle.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _TOOLS_DEBUG_HXX
+//#include <tools/debug.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_STYLE_PARAGRAPHSTYLECATEGORY_HPP_
+#include <com/sun/star/style/ParagraphStyleCategory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#endif
+
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_PROPERTYSETMAPPER_HXX
+//#include "xmlprmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLSMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_FAMILIES_HXX
+#include "families.hxx"
+#endif
+#ifndef _XMLOFF_TXTPRMAP_HXX
+//#include "txtprmap.hxx"
+#endif
+#ifndef _XMLOFF_TXTPARAE_HXX
+#include "txtparae.hxx"
+#endif
+#ifndef _XMLOFF_XMLNUME_HXX
+#include "xmlnume.hxx"
+#endif
+#ifndef _XMLOFF_XMLEXP_HXX
+#include "xmlexp.hxx"
+#endif
+
+#ifndef _XMLOFF_STYLEEXP_HXX
+//#include "styleexp.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::beans;
+
+void XMLTextParagraphExport::exportStyleAttributes(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::style::XStyle > & rStyle )
+{
+ Reference< XPropertySet > xPropSet( rStyle, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+ if( xPropSetInfo->hasPropertyByName( sCategory ) )
+ {
+ Any aAny = xPropSet->getPropertyValue( sCategory );
+ sal_Int16 nCategory;
+ aAny >>= nCategory;
+ const sal_Char *pValue = 0;
+ if( -1 != nCategory )
+ {
+ switch( nCategory )
+ {
+ case ParagraphStyleCategory::TEXT:
+ pValue = sXML_text;
+ break;
+ case ParagraphStyleCategory::CHAPTER:
+ pValue = sXML_chapter;
+ break;
+ case ParagraphStyleCategory::LIST:
+ pValue = sXML_list;
+ break;
+ case ParagraphStyleCategory::INDEX:
+ pValue = sXML_index;
+ break;
+ case ParagraphStyleCategory::EXTRA:
+ pValue = sXML_extra;
+ break;
+ case ParagraphStyleCategory::HTML:
+ pValue = sXML_html;
+ break;
+ }
+ }
+ if( pValue )
+ GetExport().AddAttributeASCII( XML_NAMESPACE_STYLE, sXML_class,
+ pValue );
+ }
+}
+
+void XMLTextParagraphExport::exportNumStyles( sal_Bool bUsed )
+{
+ SvxXMLNumRuleExport aNumRuleExport( GetExport() );
+ aNumRuleExport.exportStyles( bUsed, pListAutoPool );
+}
+
+void XMLTextParagraphExport::exportTextStyles( sal_Bool bUsed )
+{
+ exportStyleFamily( "ParagraphStyles", sXML_paragraph, GetParaPropMapper(),
+ bUsed, XML_STYLE_FAMILY_TEXT_PARAGRAPH );
+ exportStyleFamily( "CharacterStyles", sXML_text, GetTextPropMapper(),
+ bUsed, XML_STYLE_FAMILY_TEXT_TEXT );
+ exportStyleFamily( "FrameStyles", XML_STYLE_FAMILY_SD_GRAPHICS_NAME, GetFramePropMapper(),
+ bUsed, XML_STYLE_FAMILY_SD_GRAPHICS_ID );
+ exportNumStyles( bUsed );
+ exportTextFootnoteConfiguration();
+}
+
+
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
new file mode 100644
index 0000000000..2fc5f0be24
--- /dev/null
+++ b/xmloff/source/text/txtstyli.cxx
@@ -0,0 +1,276 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtstyli.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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 _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_XSTYLE_HPP_
+#include <com/sun/star/style/XStyle.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_STYLE_PARAGRAPHSTYLECATEGORY_HPP_
+#include <com/sun/star/style/ParagraphStyleCategory.hpp>
+#endif
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+#ifndef _XMLOFF_FAMILIES_HXX
+#include "families.hxx"
+#endif
+#ifndef _XMLOFF_XMLTEXTPROPERTYSETCONTEXT_HXX
+#include "XMLTextPropertySetContext.hxx"
+#endif
+#ifndef _XMLOFF_XMLTKMAP_HXX
+#include "xmltkmap.hxx"
+#endif
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_TXTPRMAP_HXX
+#include "txtprmap.hxx"
+#endif
+#ifndef _XMLOFF_TXTSTYLI_HXX
+#include "txtstyli.hxx"
+#endif
+#ifndef _XMLOFF_ATTRLIST_HXX
+#include "attrlist.hxx"
+#endif
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::xml::sax;
+using namespace ::com::sun::star::style;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+//using namespace ::com::sun::star::text;
+
+static __FAR_DATA SvXMLEnumMapEntry aCategoryMap[] =
+{
+ { sXML_text, ParagraphStyleCategory::TEXT },
+ { sXML_chapter, ParagraphStyleCategory::CHAPTER },
+ { sXML_list, ParagraphStyleCategory::LIST },
+ { sXML_index, ParagraphStyleCategory::INDEX },
+ { sXML_extra, ParagraphStyleCategory::EXTRA },
+ { sXML_html, ParagraphStyleCategory::HTML },
+ { 0, 0 }
+};
+
+void XMLTextStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
+ const OUString& rLocalName,
+ const OUString& rValue )
+{
+ if( XML_NAMESPACE_STYLE == nPrefixKey )
+ {
+ // TODO: use a map here
+ if( rLocalName.compareToAscii( sXML_auto_update ) == 0 )
+ {
+ if( rValue.compareToAscii( sXML_true ) == 0 )
+ bAutoUpdate = sal_True;
+ }
+ else if( rLocalName.compareToAscii( sXML_list_style_name ) == 0 )
+ {
+ sListStyleName = rValue;
+ }
+ else if( rLocalName.compareToAscii( sXML_class ) == 0 )
+ {
+ sCategoryVal = rValue;
+ }
+ else
+ {
+ XMLPropStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
+ }
+ }
+ else
+ {
+ XMLPropStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
+ }
+}
+
+TYPEINIT1( XMLTextStyleContext, XMLPropStyleContext );
+
+XMLTextStyleContext::XMLTextStyleContext( SvXMLImport& rImport,
+ sal_uInt16 nPrfx, const OUString& rLName,
+ const Reference< XAttributeList > & xAttrList,
+ SvXMLStylesContext& rStyles ) :
+ XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles ),
+ bAutoUpdate( sal_False ),
+ sIsAutoUpdate( RTL_CONSTASCII_USTRINGPARAM( "IsAutoUpdate" ) ),
+ sCategory( RTL_CONSTASCII_USTRINGPARAM( "Category" ) ),
+ sNumberingStyleName( RTL_CONSTASCII_USTRINGPARAM( "NumberingStyleName" ) ),
+ sDropCapCharStyleName( RTL_CONSTASCII_USTRINGPARAM( "DropCapCharStyleName" ) )
+{
+}
+
+XMLTextStyleContext::~XMLTextStyleContext()
+{
+}
+
+SvXMLImportContext *XMLTextStyleContext::CreateChildContext(
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const Reference< XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext = 0;
+
+ if( XML_NAMESPACE_STYLE == nPrefix &&
+ rLocalName.compareToAscii( sXML_properties ) == 0 )
+ {
+ UniReference < SvXMLImportPropertyMapper > xImpPrMap =
+ GetStyles()->GetImportPropertyMapper( GetFamily() );
+ if( xImpPrMap.is() )
+ pContext = new XMLTextPropertySetContext( GetImport(), nPrefix,
+ rLocalName, xAttrList,
+ GetProperties(),
+ xImpPrMap,
+ sDropCapTextStyleName );
+ }
+
+ if( !pContext )
+ pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName,
+ xAttrList );
+
+ return pContext;
+}
+
+void XMLTextStyleContext::CreateAndInsert( sal_Bool bOverwrite )
+{
+ XMLPropStyleContext::CreateAndInsert( bOverwrite );
+ Reference < XStyle > xStyle = GetStyle();
+ if( !xStyle.is() || !(bOverwrite || IsNew()) )
+ return;
+
+ Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+ if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) )
+ {
+ Any aAny;
+ aAny.setValue( &bAutoUpdate, ::getBooleanCppuType() );
+ xPropSet->setPropertyValue( sIsAutoUpdate, aAny );
+ }
+
+ sal_uInt16 nCategory = ParagraphStyleCategory::TEXT;
+ if( XML_STYLE_FAMILY_TEXT_PARAGRAPH == GetFamily() &&
+ sCategoryVal.getLength() && xStyle->isUserDefined() &&
+ xPropSetInfo->hasPropertyByName( sCategory ) &&
+ SvXMLUnitConverter::convertEnum( nCategory, sCategoryVal, aCategoryMap ) )
+ {
+ Any aAny;
+ aAny <<= (sal_Int16)nCategory;
+ xPropSet->setPropertyValue( sCategory, aAny );
+ }
+}
+
+void XMLTextStyleContext::Finish( sal_Bool bOverwrite )
+{
+ XMLPropStyleContext::Finish( bOverwrite );
+
+ Reference < XStyle > xStyle = GetStyle();
+ if( !(sListStyleName.getLength() || sDropCapTextStyleName.getLength()) ||
+ !xStyle.is() || !(bOverwrite || IsNew()) )
+ return;
+
+ Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
+ Reference< XPropertySetInfo > xPropSetInfo =
+ xPropSet->getPropertySetInfo();
+
+ if( sListStyleName.getLength() )
+ {
+ // The families cointaner must exist
+ const Reference < XNameContainer >& rNumStyles =
+ GetImport().GetTextImport()->GetNumberingStyles();
+ if( rNumStyles.is() && rNumStyles->hasByName( sListStyleName ) &&
+ xPropSetInfo->hasPropertyByName( sNumberingStyleName ) )
+ {
+ Any aAny;
+ aAny <<= sListStyleName;
+ xPropSet->setPropertyValue( sNumberingStyleName, aAny );
+ }
+ }
+
+ if( sDropCapTextStyleName.getLength() )
+ {
+ // The families cointaner must exist
+ const Reference < XNameContainer >& rTextStyles =
+ GetImport().GetTextImport()->GetTextStyles();
+ if( rTextStyles.is() &&
+ rTextStyles->hasByName( sDropCapTextStyleName ) &&
+ xPropSetInfo->hasPropertyByName( sDropCapCharStyleName ) )
+ {
+ Any aAny;
+ aAny <<= sDropCapTextStyleName;
+ xPropSet->setPropertyValue( sDropCapCharStyleName, aAny );
+ }
+ }
+}
+
+
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
new file mode 100644
index 0000000000..3e6241acc4
--- /dev/null
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -0,0 +1,1365 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtvfldi.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+/** @#file
+ *
+ * export of all variable related text fields (and database display field)
+ */
+
+#ifndef _XMLOFF_TXTVFLDI_HXX
+#include "txtvfldi.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLKYWD_HXX
+#include "xmlkywd.hxx"
+#endif
+
+#ifndef _XMLOFF_TEXTIMP_HXX_
+#include "txtimp.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNUMI_HXX
+#include "xmlnumi.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLNMSPE_HXX
+#include "xmlnmspe.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _XMLOFF_I18NMAP_HXX
+#include "i18nmap.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLIMP_HXX
+#include "xmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLUCONV_HXX
+#include "xmluconv.hxx"
+#endif
+
+#ifndef _XMLOFF_XMLEMENT_HXX
+#include "xmlement.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_SETVARIABLETYPE_HPP_
+#include <com/sun/star/text/SetVariableType.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELD_HPP_
+#include <com/sun/star/text/XTextField.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XDEPENDENTTEXTFIELD_HPP_
+#include <com/sun/star/text/XDependentTextField.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELDSSUPPLIER_HPP_
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#endif
+
+#ifndef _RTL_USTRING
+#include <rtl/ustring>
+#endif
+
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
+
+// service names
+static const sal_Char sAPI_textfield_prefix[] = "com.sun.star.text.TextField.";
+static const sal_Char sAPI_fieldmaster_prefix[] = "com.sun.star.text.FieldMaster.";
+static const sal_Char sAPI_input[] = "Input";
+static const sal_Char sAPI_input_user[] = "InputUser";
+static const sal_Char sAPI_get_expression[] = "GetExpression";
+static const sal_Char sAPI_set_expression[] = "SetExpression";
+static const sal_Char sAPI_user[] = "User";
+static const sal_Char sAPI_database[] = "com.sun.star.text.TextField.Database";
+static const sal_Char sAPI_fieldmaster_database[] = "com.sun.star.text.FieldMaster.Database";
+
+// property names
+static const sal_Char sAPI_hint[] = "Hint";
+static const sal_Char sAPI_content[] = "Content";
+static const sal_Char sAPI_sub_type[] = "SubType";
+static const sal_Char sAPI_is_expression[] = "IsExpression";
+static const sal_Char sAPI_is_input[] = "Input";
+static const sal_Char sAPI_is_show_formula[] = "IsShowFormula";
+static const sal_Char sAPI_numbering_type[] = "NumberingType";
+static const sal_Char sAPI_number_format[] = "NumberFormat";
+static const sal_Char sAPI_name[] = "Name";
+static const sal_Char sAPI_numbering_separator[] = "NumberingSeparator";
+static const sal_Char sAPI_chapter_numbering_level[]= "ChapterNumberingLevel";
+static const sal_Char sAPI_value[] = "Value";
+static const sal_Char sAPI_is_visible[] = "IsVisible";
+static const sal_Char sAPI_variable_subtype[] = "VariableSubtype";
+static const sal_Char sAPI_data_column_name[] = "DataColumnName";
+static const sal_Char sAPI_is_data_base_format[] = "DataBaseFormat";
+static const sal_Char sAPI_current_presentation[] = "CurrentPresentation";
+
+
+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::text;
+
+
+
+//
+// XMLVarFieldImportContext: superclass for all variable related fields
+//
+
+TYPEINIT1( XMLVarFieldImportContext, XMLTextFieldImportContext );
+
+XMLVarFieldImportContext::XMLVarFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ const sal_Char* pServiceName, sal_uInt16 nPrfx,
+ const OUString& rLocalName,
+ sal_Bool bName, sal_Bool bFormula, sal_Bool bFormulaDefault,
+ sal_Bool bDescription, sal_Bool bVisible, sal_Bool bDisplayFormula,
+ sal_Bool bType, sal_Bool bStyle, sal_Bool bValue,
+ sal_Bool bPresentation) :
+ XMLTextFieldImportContext(rImport, rHlp, pServiceName,
+ nPrfx, rLocalName),
+ sName(),
+ sFormula(),
+ sDescription(),
+ aValueHelper(rImport, rHlp, bType, bStyle, bValue, sal_False),
+ bDisplayFormula(sal_False),
+ bDisplayNone(sal_False),
+ bNameOK(sal_False),
+ bFormulaOK(sal_False),
+ bDescriptionOK(sal_False),
+ bDisplayOK(sal_False),
+ bSetName(bName),
+ bSetFormula(bFormula),
+ bSetFormulaDefault(bFormulaDefault),
+ bSetDescription(bDescription),
+ bSetVisible(bVisible),
+ bSetDisplayFormula(bDisplayFormula),
+ bSetPresentation(bPresentation),
+ sPropertyContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_content)),
+ sPropertyHint(RTL_CONSTASCII_USTRINGPARAM(sAPI_hint)),
+ sPropertyIsVisible(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_visible)),
+ sPropertyIsDisplayFormula(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_is_show_formula)),
+ sPropertyCurrentPresentation(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_current_presentation))
+{
+}
+
+void XMLVarFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken,
+ const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_NAME:
+ sName = sAttrValue;
+ bNameOK = sal_True;
+ bValid = sal_True; // we assume: field with name is valid!
+ break;
+ case XML_TOK_TEXTFIELD_DESCRIPTION:
+ sDescription = sAttrValue;
+ bDescriptionOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_FORMULA:
+ sFormula = sAttrValue;
+ bFormulaOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_DISPLAY:
+ if (0 == sAttrValue.compareToAscii(sXML_formula))
+ {
+ bDisplayFormula = sal_True;
+ bDisplayNone = sal_False;
+ bDisplayOK = sal_True;
+ }
+ else if (0 == sAttrValue.compareToAscii(sXML_value))
+ {
+ bDisplayFormula = sal_False;
+ bDisplayNone = sal_False;
+ bDisplayOK = sal_True;
+ }
+ else if (0 == sAttrValue.compareToAscii(sXML_none))
+ {
+ bDisplayFormula = sal_False;
+ bDisplayNone = sal_True;
+ bDisplayOK = sal_True;
+ } // else: no change
+ DBG_ASSERT(!(bDisplayFormula && bDisplayNone),
+ "illegal display values");
+ break;
+ default:
+ // delegate all others to value helper
+ aValueHelper.ProcessAttribute(nAttrToken, sAttrValue);
+ break;
+ }
+}
+
+void XMLVarFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ // bSetName: not implemented
+
+ if (bSetFormula)
+ {
+ if (!bFormulaOK && bSetFormulaDefault)
+ {
+ sFormula = GetContent();
+ bFormulaOK = sal_True;
+ }
+
+ if (bFormulaOK)
+ {
+ Any aAny;
+ aAny <<= sFormula;
+ xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ }
+ }
+
+ if (bSetDescription && bDescriptionOK)
+ {
+ Any aAny;
+ aAny <<= sDescription;
+ xPropertySet->setPropertyValue(sPropertyHint, aAny);
+ }
+
+ if (bSetVisible && bDisplayOK)
+ {
+ Any aAny;
+ sal_Bool bTmp = ! (bDisplayNone && bDisplayOK);
+ aAny.setValue( &bTmp, ::getBooleanCppuType());
+ xPropertySet->setPropertyValue(sPropertyIsVisible, aAny);
+ }
+
+ // workaround for #no-bug#: display formula by default
+ if (xPropertySet->getPropertySetInfo()->
+ hasPropertyByName(sPropertyIsDisplayFormula) &&
+ !bSetDisplayFormula)
+ {
+ bDisplayFormula = sal_False;
+ bSetDisplayFormula = sal_True;
+ }
+
+
+ if (bSetDisplayFormula)
+ {
+ Any aAny;
+ sal_Bool bTmp = bDisplayFormula && bDisplayOK;
+ aAny.setValue( &bTmp, ::getBooleanCppuType());
+ xPropertySet->setPropertyValue(sPropertyIsDisplayFormula, aAny);
+ }
+
+ if (bSetPresentation)
+ {
+ Any aAny;
+ aAny <<= GetContent();
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ }
+
+ // delegate to value helper
+ aValueHelper.SetDefault(GetContent());
+ aValueHelper.PrepareField(xPropertySet);
+}
+
+
+
+
+
+//
+// variable set fields
+//
+
+TYPEINIT1( XMLSetVarFieldImportContext, XMLVarFieldImportContext );
+
+XMLSetVarFieldImportContext::XMLSetVarFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ const sal_Char* pServiceName, sal_uInt16 nPrfx,
+ const OUString& rLocalName, VarType eVarType,
+ sal_Bool bName, sal_Bool bFormula, sal_Bool bFormulaDefault,
+ sal_Bool bDescription, sal_Bool bVisible, sal_Bool bDisplayFormula,
+ sal_Bool bType, sal_Bool bStyle, sal_Bool bValue, sal_Bool bPresentation) :
+ XMLVarFieldImportContext(rImport, rHlp, pServiceName,
+ nPrfx, rLocalName,
+ bName, bFormula, bFormulaDefault,
+ bDescription, bVisible, bDisplayFormula,
+ bType, bStyle, bValue, bPresentation),
+ eFieldType(eVarType)
+{
+}
+
+void XMLSetVarFieldImportContext::EndElement()
+{
+ // should we call PrepareField on the field, or rather on it's master?
+ // currently: call on field (just like superclass)
+ // possible alternatives: call on master
+ // call field or master depending on variable
+ // PrepareMaster() in addition to PrepareField()
+
+ DBG_ASSERT(GetServiceName().getLength()>0, "no service name for element!");
+
+ if (bValid)
+ {
+ DBG_ASSERT(GetName().getLength()>0, "variable name needed!");
+
+ // find field master
+ Reference<XPropertySet> xMaster;
+ if (FindFieldMaster(xMaster))
+ {
+ // create field/Service
+ Reference<XPropertySet> xPropSet;
+ if (CreateField(xPropSet, OUString::createFromAscii(sAPI_textfield_prefix) + GetServiceName()))
+ {
+ Reference<XDependentTextField> xDepTextField(xPropSet, UNO_QUERY);
+ if (xDepTextField.is())
+ {
+ // attach field to field master
+ xDepTextField->attachTextFieldMaster(xMaster);
+
+ // attach field to document
+ Reference<XTextContent> xTextContent(xPropSet, UNO_QUERY);
+ if (xTextContent.is())
+ {
+ // insert, set field properties and exit!
+ GetImportHelper().InsertTextContent(xTextContent);
+ PrepareField(xPropSet);
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ // above: exit on success; so for all error cases we end up here!
+ // write element content
+ GetImportHelper().InsertString(GetContent());
+}
+
+sal_Bool XMLSetVarFieldImportContext::FindFieldMaster(
+ Reference<XPropertySet> & xMaster)
+{
+ // currently: delegate to XMLVariableDeclImportContext;
+ // shoud eventually go here
+ return XMLVariableDeclImportContext::FindFieldMaster(xMaster,
+ GetImport(),
+ GetImportHelper(),
+ GetName(),
+ eFieldType);
+}
+
+
+
+//
+// sequence field
+//
+
+TYPEINIT1( XMLSequenceFieldImportContext, XMLSetVarFieldImportContext );
+
+XMLSequenceFieldImportContext::XMLSequenceFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& rLocalName) :
+ XMLSetVarFieldImportContext(rImport, rHlp, sAPI_set_expression,
+ nPrfx, rLocalName, VarTypeSequence,
+ // name, formula
+ sal_True, sal_True, sal_True,
+ sal_False, sal_False, sal_False,
+ sal_False, sal_False, sal_False, sal_True),
+ sNumFormat(sal_Unicode('1')),
+ sNumFormatSync(RTL_CONSTASCII_USTRINGPARAM(sXML_false)),
+ sPropertyNumberFormat(RTL_CONSTASCII_USTRINGPARAM(sAPI_number_format))
+{
+}
+
+void XMLSequenceFieldImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken, const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_NUM_FORMAT:
+ sNumFormat = sAttrValue;
+ break;
+ case XML_TOK_TEXTFIELD_NUM_LETTER_SYNC:
+ sNumFormatSync = sAttrValue;
+ break;
+
+ default:
+ // delegate to super class (name, formula)
+ XMLSetVarFieldImportContext::ProcessAttribute(nAttrToken,
+ sAttrValue);
+ break;
+ } // switch
+}
+
+void XMLSequenceFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ // delegate to super class (formula)
+ XMLSetVarFieldImportContext::PrepareField(xPropertySet);
+
+ // set format
+ Any aAny;
+ aAny <<= SvxXMLListStyleContext::GetNumType(sNumFormat, sNumFormatSync);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+}
+
+
+
+//
+// variable set field
+//
+
+TYPEINIT1( XMLVariableSetFieldImportContext, XMLSetVarFieldImportContext );
+
+XMLVariableSetFieldImportContext::XMLVariableSetFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& rLocalName) :
+ XMLSetVarFieldImportContext(rImport, rHlp, sAPI_set_expression,
+ nPrfx, rLocalName, VarTypeSimple,
+ // name, formula, value&type, style,
+ // display none
+ sal_True, sal_True, sal_True,
+ sal_False, sal_True, sal_False,
+ sal_True, sal_True, sal_True,
+ sal_True),
+ sPropertySubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_sub_type))
+{
+}
+
+void XMLVariableSetFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ // set type
+ Any aAny;
+ aAny <<= (IsStringValue()? SetVariableType::STRING : SetVariableType::VAR);
+ xPropertySet->setPropertyValue(sPropertySubType, aAny);
+
+ // set presentation
+ aAny <<= GetContent();
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+
+ // the remainder is handled by super class
+ XMLSetVarFieldImportContext::PrepareField(xPropertySet);
+}
+
+
+
+//
+// variable input field
+//
+
+TYPEINIT1( XMLVariableInputFieldImportContext, XMLSetVarFieldImportContext );
+
+XMLVariableInputFieldImportContext::XMLVariableInputFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& rLocalName) :
+ XMLSetVarFieldImportContext(rImport, rHlp, sAPI_set_expression,
+ nPrfx, rLocalName, VarTypeSimple,
+ // name, description, display none/formula,
+ // value&type, style, formula
+ sal_True, sal_True, sal_True,
+ sal_True, sal_True, sal_False,
+ sal_True, sal_True, sal_True,
+ sal_True),
+ sPropertySubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_sub_type)),
+ sPropertyIsInput(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_input))
+{
+}
+
+void XMLVariableInputFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ // set type (input field)
+ Any aAny;
+ sal_Bool bTrue = sal_True;
+ aAny.setValue( &bTrue, ::getBooleanCppuType() );
+ xPropertySet->setPropertyValue(sPropertyIsInput, aAny);
+
+ // set type
+ aAny <<= (IsStringValue()? SetVariableType::STRING : SetVariableType::VAR);
+ xPropertySet->setPropertyValue(sPropertySubType, aAny);
+
+ // the remainder is handled by super class
+ XMLSetVarFieldImportContext::PrepareField(xPropertySet);
+}
+
+
+
+//
+// user field
+//
+
+TYPEINIT1( XMLUserFieldImportContext, XMLSetVarFieldImportContext );
+
+XMLUserFieldImportContext::XMLUserFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& rLocalName) :
+ XMLSetVarFieldImportContext(rImport, rHlp, sAPI_user, nPrfx,
+ rLocalName, VarTypeUserField,
+ // name, display none/formula, style
+ sal_True, sal_False, sal_False,
+ sal_False, sal_True, sal_True,
+ sal_False, sal_True, sal_False,
+ sal_False)
+{
+}
+
+
+
+//
+// user input field
+//
+
+TYPEINIT1( XMLUserFieldInputImportContext, XMLVarFieldImportContext );
+
+// bug: doesn't work (SO API lacking)
+XMLUserFieldInputImportContext::XMLUserFieldInputImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& rLocalName) :
+ XMLVarFieldImportContext(rImport, rHlp, sAPI_input_user,
+ nPrfx, rLocalName,
+ // name, description, style
+ sal_True, sal_False, sal_False,
+ sal_True, sal_False, sal_False,
+ sal_False /*???*/, sal_True, sal_False,
+ sal_False)
+{
+}
+
+void XMLUserFieldInputImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ Any aAny;
+ aAny <<= GetName();
+ xPropertySet->setPropertyValue(sPropertyContent, aAny);
+
+ // delegate to super class
+ XMLVarFieldImportContext::PrepareField(xPropertySet);
+}
+
+
+//
+// variable get field
+//
+
+TYPEINIT1( XMLVariableGetFieldImportContext, XMLVarFieldImportContext );
+
+XMLVariableGetFieldImportContext::XMLVariableGetFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& rLocalName) :
+ XMLVarFieldImportContext(rImport, rHlp, sAPI_get_expression,
+ nPrfx, rLocalName,
+ // name, style, display formula
+ sal_True, sal_False, sal_False,
+ sal_False, sal_False, sal_True,
+ sal_True, sal_True, sal_False,
+ sal_True),
+ sPropertySubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_sub_type))
+{
+}
+
+void XMLVariableGetFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ // set type; IsStringValue() defaults to false
+ Any aAny;
+ aAny <<= (IsStringValue() ? SetVariableType::STRING : SetVariableType::VAR);
+ xPropertySet->setPropertyValue(sPropertySubType, aAny);
+
+ // set name
+ aAny <<= GetName();
+ xPropertySet->setPropertyValue(sPropertyContent, aAny);
+
+ // the remainder is handled by super class
+ XMLVarFieldImportContext::PrepareField(xPropertySet);
+}
+
+
+
+//
+// expression field
+//
+
+TYPEINIT1( XMLExpressionFieldImportContext, XMLVarFieldImportContext );
+
+XMLExpressionFieldImportContext::XMLExpressionFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& rLocalName) :
+ XMLVarFieldImportContext(rImport, rHlp, sAPI_get_expression,
+ nPrfx, rLocalName,
+ // formula, value&type, style, display formula
+ sal_False, sal_True, sal_True,
+ sal_False, sal_False, sal_True,
+ sal_True, sal_False, sal_True,
+ sal_True),
+ sPropertySubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_sub_type))
+{
+ bValid = sal_True; // always valid
+}
+
+
+void XMLExpressionFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ sal_Int16 nSubType = SetVariableType::FORMULA;
+ Any aAny;
+ aAny <<= nSubType;
+ xPropertySet->setPropertyValue(sPropertySubType, aAny);
+
+ // delegate to super class
+ XMLVarFieldImportContext::PrepareField(xPropertySet);
+}
+
+
+
+//
+// text input field
+//
+
+TYPEINIT1( XMLTextInputFieldImportContext, XMLVarFieldImportContext );
+
+XMLTextInputFieldImportContext::XMLTextInputFieldImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& sLocalName) :
+ XMLVarFieldImportContext(rImport, rHlp, sAPI_input,
+ nPrfx, sLocalName,
+ // description
+ sal_False, sal_False, sal_False,
+ sal_True, sal_False, sal_False,
+ sal_False, sal_False, sal_False,
+ sal_False),
+ sPropertyContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_content))
+{
+ bValid = sal_True; // always valid
+}
+
+void XMLTextInputFieldImportContext::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ XMLVarFieldImportContext::PrepareField(xPropertySet);
+
+ Any aAny;
+ aAny <<= GetContent();
+ xPropertySet->setPropertyValue(sPropertyContent, aAny);
+}
+
+
+
+//
+// variable declarations
+//
+// Should be adapted to XMLVarField-/XMLSetVarFieldImportContext scheme!
+//
+
+
+
+//
+// declaration containter import (<variable/user-field/sequence-decls>)
+//
+
+TYPEINIT1( XMLVariableDeclsImportContext, SvXMLImportContext );
+
+XMLVariableDeclsImportContext::XMLVariableDeclsImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& rLocalName, enum VarType eVarType) :
+ SvXMLImportContext(rImport, nPrfx, rLocalName),
+ rImportHelper(rHlp),
+ eVarDeclsContextType(eVarType)
+{
+}
+
+SvXMLImportContext* XMLVariableDeclsImportContext::CreateChildContext(
+ sal_uInt16 nPrefix, const OUString& rLocalName,
+ const Reference<xml::sax::XAttributeList> & xAttrList )
+{
+ sal_Char* sElementName;
+ SvXMLImportContext* pImportContext = NULL;
+
+ if (XML_NAMESPACE_TEXT == nPrefix) {
+ switch (eVarDeclsContextType) {
+ case VarTypeSequence:
+ sElementName = sXML_sequence_decl;
+ break;
+ case VarTypeSimple:
+ sElementName = sXML_variable_decl;
+ break;
+ case VarTypeUserField:
+ sElementName = sXML_user_field_decl;
+ break;
+ default:
+ DBG_ERROR("unknown field type!");
+ }
+
+ if (0 == rLocalName.compareToAscii(sElementName)) {
+ pImportContext = new XMLVariableDeclImportContext(
+ GetImport(), rImportHelper, nPrefix, rLocalName, xAttrList,
+ eVarDeclsContextType);
+ }
+ }
+
+ // if no context was created, use default context
+ if (NULL == pImportContext) {
+ pImportContext = SvXMLImportContext::CreateChildContext(nPrefix,
+ rLocalName,
+ xAttrList);
+ }
+
+ return pImportContext;
+}
+
+
+
+//
+// declaration import (<variable/user-field/sequence-decl> elements)
+//
+
+TYPEINIT1( XMLVariableDeclImportContext, SvXMLImportContext );
+
+XMLVariableDeclImportContext::XMLVariableDeclImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx, const OUString& rLocalName,
+ const Reference<xml::sax::XAttributeList> & xAttrList,
+ enum VarType eVarType) :
+ SvXMLImportContext(rImport, nPrfx, rLocalName),
+ nNumLevel(-1), cSeparationChar('.'),
+ // bug?? which properties for userfield/userfieldmaster
+ aValueHelper(rImport, rHlp, sal_True, sal_False, sal_True, sal_False),
+ sPropertyName(RTL_CONSTASCII_USTRINGPARAM(sAPI_name)),
+ sPropertySubType(RTL_CONSTASCII_USTRINGPARAM(sAPI_sub_type)),
+ sPropertyNumberingLevel(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_chapter_numbering_level)),
+ sPropertyNumberingSeparator(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_numbering_separator)),
+ sPropertyIsExpression(RTL_CONSTASCII_USTRINGPARAM(sAPI_is_expression))
+{
+ if ( (XML_NAMESPACE_TEXT == nPrfx) &&
+ ( (0 == rLocalName.compareToAscii(sXML_sequence_decl)) ||
+ (0 == rLocalName.compareToAscii(sXML_variable_decl)) ||
+ (0 == rLocalName.compareToAscii(sXML_user_field_decl)) )) {
+
+ // TODO: check validity (need name!)
+
+ // parse attributes
+ sal_Int32 nLength = xAttrList->getLength();
+ for(sal_Int32 i=0; i<nLength; i++) {
+
+ OUString sLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
+ GetKeyByAttrName( xAttrList->getNameByIndex(i), &sLocalName );
+
+ sal_uInt16 nToken = rHlp.
+ GetTextFieldAttrTokenMap().Get(nPrefix, sLocalName);
+
+ switch (nToken)
+ {
+ case XML_TOK_TEXTFIELD_NAME:
+ sName = xAttrList->getValueByIndex(i);
+ break;
+ case XML_TOK_TEXTFIELD_NUMBERING_LEVEL:
+ {
+ sal_Int32 nLevel;
+ sal_Bool bRet = SvXMLUnitConverter::convertNumber(
+ nLevel, xAttrList->getValueByIndex(i), 0,
+ GetImport().GetTextImport()->GetChapterNumbering()->
+ getCount());
+ if (bRet)
+ {
+ nNumLevel = nLevel-1; // API numbers -1..9
+ }
+ break;
+ }
+ case XML_TOK_TEXTFIELD_NUMBERING_SEPARATOR:
+ cSeparationChar = xAttrList->getValueByIndex(i).toChar();
+ break;
+
+ default:
+ // delegate to value helper
+ aValueHelper.ProcessAttribute(nToken,
+ xAttrList->getValueByIndex(i));
+ break;
+ }
+ }
+
+ Reference<XPropertySet> xFieldMaster;
+ if (FindFieldMaster(xFieldMaster, GetImport(), rHlp,
+ sName, eVarType))
+ {
+ // now we have a field master: process attributes!
+ Any aAny;
+
+ switch (eVarType)
+ {
+ case VarTypeSequence:
+ aAny <<= nNumLevel;
+ xFieldMaster->setPropertyValue(sPropertyNumberingLevel, aAny);
+
+ if (nNumLevel >= 0)
+ {
+ OUString sStr(cSeparationChar);
+ aAny <<= sStr;
+ xFieldMaster->setPropertyValue(
+ sPropertyNumberingSeparator, aAny);
+ }
+ break;
+ case VarTypeSimple:
+ break; // nothing
+ case VarTypeUserField:
+ {
+ sal_Bool bTmp = !aValueHelper.IsStringValue();
+ aAny.setValue(&bTmp, ::getBooleanCppuType());
+ xFieldMaster->setPropertyValue(sPropertyIsExpression, aAny);
+ aValueHelper.PrepareField(xFieldMaster);
+ break;
+ }
+ default:
+ DBG_ERROR("unkown varfield type");
+ } // switch
+ } // else: no field master found/constructed
+ } // else: no sequence-decl
+}
+
+
+
+sal_Bool XMLVariableDeclImportContext::FindFieldMaster(
+ Reference<XPropertySet> & xMaster, SvXMLImport& rImport,
+ XMLTextImportHelper& rImportHelper,
+ const OUString& sVarName, enum VarType eVarType)
+{
+ static sal_Int32 nCollisionCount = 0;
+
+ // rename field
+ // currently: no family in use! Use 0.
+ OUString sName = rImportHelper.GetRenameMap().Get(eVarType, sVarName);
+
+ // get text fields supplier and field masters
+ Reference<XTextFieldsSupplier> xTextFieldsSupp(rImport.GetModel(),
+ UNO_QUERY);
+ Reference<container::XNameAccess> xFieldMasterNameAccess(
+ xTextFieldsSupp->getTextFieldMasters(), UNO_QUERY);
+
+ OUStringBuffer sBuffer;
+ sBuffer.appendAscii(sAPI_fieldmaster_prefix);
+ sBuffer.appendAscii(sAPI_set_expression);
+ sBuffer.appendAscii(".");
+ sBuffer.append(sName);
+ OUString sVarServiceName = sBuffer.makeStringAndClear();
+
+ sBuffer.appendAscii(sAPI_fieldmaster_prefix);
+ sBuffer.appendAscii(sAPI_user);
+ sBuffer.appendAscii(".");
+ sBuffer.append(sName);
+ OUString sUserServiceName = sBuffer.makeStringAndClear();
+
+ if (xFieldMasterNameAccess->hasByName(sVarServiceName)) {
+ // variable field master already in document
+
+ Any aAny = xFieldMasterNameAccess->getByName(sVarServiceName);
+ aAny >>= xMaster;
+
+ aAny = xMaster->getPropertyValue(
+ // sPropertySubType
+ OUString::createFromAscii(sAPI_sub_type)
+ );
+ sal_Int16 nType;
+ aAny >>= nType;
+
+ enum VarType eFMVarType =
+ (SetVariableType::SEQUENCE == nType) ?
+ VarTypeSequence : VarTypeSimple;
+
+ if (eFMVarType != eVarType)
+ {
+ OUString sNew;
+
+ // FIXME! cant find if name is taken already!!!!
+
+ nCollisionCount++;
+ OUStringBuffer aBuf;
+ aBuf.append(sName);
+ aBuf.appendAscii("_renamed_");
+ aBuf.append(nCollisionCount);
+ sNew = aBuf.makeStringAndClear();
+
+ rImportHelper.GetRenameMap().Add(eVarType, sName, sNew);
+
+ // call FindFieldMaster recursively to create new master
+ return FindFieldMaster(xMaster, rImport, rImportHelper,
+ sNew, eVarType);
+ }
+ } else if (xFieldMasterNameAccess->hasByName(sUserServiceName)) {
+ // user field: get field master
+ Any aAny = xFieldMasterNameAccess->getByName(sUserServiceName);
+ aAny >>= xMaster;
+
+ if (VarTypeUserField != eVarType) {
+ // find new name that is not taken
+ OUString sNew;
+
+ // FIXME! cant find if name is taken already!!!!
+
+ nCollisionCount++;
+ OUStringBuffer aBuf;
+ aBuf.append(sName);
+ aBuf.appendAscii("_renamed_");
+ aBuf.append(nCollisionCount);
+ sNew = aBuf.makeStringAndClear();
+
+ rImportHelper.GetRenameMap().Add(eVarType, sName, sNew);
+
+ // call FindFieldMaster recursively to create new master
+ return FindFieldMaster(xMaster, rImport, rImportHelper,
+ sNew, eVarType);
+ }
+ } else {
+ // field name not used: create field master
+
+ // import -> model is MultiServiceFactory -> createInstance
+ Reference<lang::XMultiServiceFactory>
+ xFactory(rImport.GetModel(),UNO_QUERY);
+ if( xFactory.is() ) {
+
+ OUStringBuffer sService;
+ sService.appendAscii(sAPI_fieldmaster_prefix);
+ sService.appendAscii((eVarType==VarTypeUserField) ?
+ sAPI_user : sAPI_set_expression);
+ Reference<XInterface> xIfc =
+ xFactory->createInstance( sService.makeStringAndClear() );
+ if (xIfc.is()) {
+ Reference<XPropertySet> xTmp( xIfc, UNO_QUERY );
+ xMaster = xTmp;
+
+ // set name
+ Any aAny;
+ aAny <<= sName;
+ xMaster->setPropertyValue(
+ // sPropertyName
+ OUString::createFromAscii(sAPI_name)
+ , aAny);
+
+ if (eVarType != VarTypeUserField) {
+ // set subtype for setexp field
+
+ aAny <<= ((eVarType == VarTypeSimple) ?
+ SetVariableType::VAR :
+ SetVariableType::SEQUENCE);
+ xMaster->setPropertyValue(
+ // sPropertySubType
+ OUString::createFromAscii(sAPI_sub_type)
+ , aAny);
+ } // else : user field: no subtype
+
+ } else {
+ return sal_False;
+ }
+ } else {
+ return sal_False;
+ }
+ }
+
+ DBG_ASSERT(xMaster.is(), "no field master found!?!");
+ return sal_True;
+}
+
+
+//
+// Database Display field import
+//
+
+
+TYPEINIT1( XMLDatabaseDisplayImportContext, XMLDatabaseFieldImportContext );
+
+XMLDatabaseDisplayImportContext::XMLDatabaseDisplayImportContext(
+ SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
+ const OUString& rLocalName) :
+ XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database,
+ nPrfx, rLocalName),
+ aValueHelper(rImport, rHlp, sal_False, sal_True, sal_False, sal_False),
+ sColumnName(),
+ bColumnOK(sal_False),
+ sPropertyColumnName(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_data_column_name)),
+ sPropertyDatabaseFormat(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_is_data_base_format)),
+ sPropertyCurrentPresentation(
+ RTL_CONSTASCII_USTRINGPARAM(sAPI_current_presentation))
+{
+}
+
+void XMLDatabaseDisplayImportContext::ProcessAttribute(
+ sal_uInt16 nAttrToken, const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_COLUMN_NAME:
+ sColumnName = sAttrValue;
+ bColumnOK = sal_True;
+ break;
+ case XML_TOK_TEXTFIELD_DATABASE_NAME:
+ case XML_TOK_TEXTFIELD_TABLE_NAME:
+ // handled by super class
+ XMLDatabaseFieldImportContext::ProcessAttribute(nAttrToken,
+ sAttrValue);
+ break;
+ default:
+ // remainder handled by value helper
+ aValueHelper.ProcessAttribute(nAttrToken, sAttrValue);
+ break;
+ }
+
+ bValid = bTableOK && bDatabaseOK && bColumnOK;
+}
+
+void XMLDatabaseDisplayImportContext::EndElement()
+{
+ // we have an EndElement of our own, because database fields need
+ // to be attached to a field master before they can be inserted into
+ // the document. Database stuff (database, table, column) all goes
+ // to the field master, value & style go to the field.
+
+ if (bValid)
+ {
+
+ // so here goes: we start with the master
+ Reference<XPropertySet> xMaster;
+
+ // create and prepare field master first
+ if (CreateField(xMaster,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_fieldmaster_database))))
+ {
+ // fieldmaster takes database, table and column name
+ XMLDatabaseFieldImportContext::PrepareField(xMaster);
+
+ Any aAny;
+ aAny <<= sColumnName;
+ xMaster->setPropertyValue(sPropertyColumnName, aAny);
+
+ // create field
+ Reference<XPropertySet> xField;
+ if (CreateField(xField,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ sAPI_database))))
+ {
+ // attach field master
+ Reference<XDependentTextField> xDepField(xField, UNO_QUERY);
+ if (xDepField.is())
+ {
+ // attach field to field master
+ xDepField->attachTextFieldMaster(xMaster);
+
+ // attach field to document
+ Reference<XTextContent> xTextContent(xField, UNO_QUERY);
+ if (xTextContent.is())
+ {
+ // insert, set field properties and exit!
+ GetImportHelper().InsertTextContent(xTextContent);
+
+ // prepare field: format from database?
+ Any aAny;
+ sal_Bool bTmp = !aValueHelper.IsFormatOK();
+ aAny.setValue( &bTmp, ::getBooleanCppuType() );
+ xField->setPropertyValue(sPropertyDatabaseFormat,aAny);
+
+ // value, value-type and format done by value helper
+ aValueHelper.PrepareField(xField);
+
+ // set presentation
+ aAny <<= GetContent();
+ xField->setPropertyValue(sPropertyCurrentPresentation,
+ aAny);
+
+ // success!
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ // above: exit on success; so for all error cases we end up here!
+ // write element content
+ GetImportHelper().InsertString(GetContent());
+}
+
+
+//
+// value import helper
+//
+
+enum ValueType
+{
+ XML_VALUE_TYPE_STRING,
+ XML_VALUE_TYPE_FLOAT,
+ XML_VALUE_TYPE_CURRENCY,
+ XML_VALUE_TYPE_PERCENTAGE,
+ XML_VALUE_TYPE_DATE,
+ XML_VALUE_TYPE_TIME,
+ XML_VALUE_TYPE_BOOLEAN
+};
+
+static SvXMLEnumMapEntry __READONLY_DATA aValueTypeMap[] =
+{
+ { sXML_float, XML_VALUE_TYPE_FLOAT },
+ { sXML_currency, XML_VALUE_TYPE_CURRENCY },
+ { sXML_percentage, XML_VALUE_TYPE_PERCENTAGE },
+ { sXML_date, XML_VALUE_TYPE_DATE },
+ { sXML_time, XML_VALUE_TYPE_TIME },
+ { sXML_boolean, XML_VALUE_TYPE_BOOLEAN },
+ { sXML_string, XML_VALUE_TYPE_STRING },
+ { 0, 0 },
+};
+
+XMLValueImportHelper::XMLValueImportHelper(
+ SvXMLImport& rImprt,
+ XMLTextImportHelper& rHlp,
+ sal_Bool bType, sal_Bool bStyle, sal_Bool bValue, sal_Bool bFormula) :
+ rImport(rImprt),
+ rHelper(rHlp),
+ bTypeOK(sal_False),
+ bStringValueOK(sal_False),
+ bFloatValueOK(sal_False),
+ bFormatOK(sal_False),
+ bFormulaOK(sal_False),
+ bSetType(bType),
+ bSetValue(bValue),
+ bSetStyle(bStyle),
+ bSetFormula(bFormula),
+ bStringType(sal_False),
+ bStringDefault(sal_True),
+ bFormulaDefault(sal_True),
+ sValue(),
+ fValue(0.0),
+ nFormatKey(0),
+ sDefault(),
+ sPropertyContent(RTL_CONSTASCII_USTRINGPARAM(sAPI_content)),
+ sPropertyValue(RTL_CONSTASCII_USTRINGPARAM(sAPI_value)),
+ sPropertyNumberFormat(RTL_CONSTASCII_USTRINGPARAM(sAPI_number_format))
+{
+}
+
+void XMLValueImportHelper::ProcessAttribute(
+ sal_uInt16 nAttrToken, const OUString& sAttrValue )
+{
+ switch (nAttrToken)
+ {
+ case XML_TOK_TEXTFIELD_VALUE_TYPE:
+ {
+ // convert enum
+ sal_uInt16 nTmp = 0;
+ sal_Bool bRet = SvXMLUnitConverter::convertEnum(
+ nTmp, sAttrValue, aValueTypeMap);
+
+ if (bRet) {
+ ValueType eValueType = (ValueType)nTmp;
+
+ bTypeOK = sal_True;
+
+ switch (eValueType)
+ {
+ case XML_VALUE_TYPE_STRING:
+ bStringType = sal_True;
+ break;
+ case XML_VALUE_TYPE_FLOAT:
+ case XML_VALUE_TYPE_CURRENCY:
+ case XML_VALUE_TYPE_PERCENTAGE:
+ case XML_VALUE_TYPE_DATE:
+ case XML_VALUE_TYPE_TIME:
+ case XML_VALUE_TYPE_BOOLEAN:
+ bStringType = sal_False;
+ break;
+
+ default:
+ DBG_ERROR("unknown value type");
+ bTypeOK = sal_False;
+ }
+ }
+ break;
+ }
+
+ case XML_TOK_TEXTFIELD_VALUE:
+ {
+ double fTmp;
+ sal_Bool bRet = SvXMLUnitConverter::convertNumber(fTmp,sAttrValue);
+ if (bRet) {
+ bFloatValueOK = sal_True;
+ fValue = fTmp;
+ }
+ break;
+ }
+
+ case XML_TOK_TEXTFIELD_TIME_VALUE:
+ {
+ double fTmp;
+ sal_Bool bRet = SvXMLUnitConverter::convertTime(fTmp,sAttrValue);
+ if (bRet) {
+ bFloatValueOK = sal_True;
+ fValue = fTmp;
+ }
+ break;
+ }
+
+ case XML_TOK_TEXTFIELD_DATE_VALUE:
+ {
+ double fTmp;
+ sal_Bool bRet = rImport.GetMM100UnitConverter().
+ convertDateTime(fTmp,sAttrValue);
+ if (bRet) {
+ bFloatValueOK = sal_True;
+ fValue = fTmp;
+ }
+ break;
+ }
+
+ case XML_TOK_TEXTFIELD_BOOL_VALUE:
+ {
+ sal_Bool bTmp;
+ sal_Bool bRet = SvXMLUnitConverter::convertBool(bTmp,sAttrValue);
+ if (bRet) {
+ bFloatValueOK = sal_True;
+ fValue = (bTmp ? 1.0 : 0.0);
+ }
+ break;
+ }
+
+ case XML_TOK_TEXTFIELD_STRING_VALUE:
+ sValue = sAttrValue;
+ bStringValueOK = sal_True;
+ break;
+
+ case XML_TOK_TEXTFIELD_FORMULA:
+ sFormula = sAttrValue;
+ bFormulaOK = sal_True;
+ break;
+
+ case XML_TOK_TEXTFIELD_DATA_STYLE_NAME:
+ {
+ sal_Int32 nKey = rHelper.GetDataStyleKey(sAttrValue);
+ if (-1 != nKey)
+ {
+ nFormatKey = nKey;
+ bFormatOK = sal_True;
+ }
+ break;
+ }
+ } // switch
+}
+
+void XMLValueImportHelper::PrepareField(
+ const Reference<XPropertySet> & xPropertySet)
+{
+ if (bSetType)
+ {
+ // ??? how to set type?
+ }
+
+ if (bSetFormula)
+ {
+ Any aAny;
+ aAny <<= (!bFormulaOK && bFormulaDefault) ? sDefault : sFormula;
+ xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ }
+
+ // value: string or float
+ if (bSetValue)
+ {
+ if (bStringType)
+ {
+ Any aAny;
+ aAny <<= (!bStringValueOK && bStringDefault) ? sDefault : sValue;
+ xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ }
+ else
+ {
+ Any aAny;
+ aAny <<= fValue;
+ xPropertySet->setPropertyValue(sPropertyValue, aAny);
+ }
+ }
+
+ // format/style
+ if (bSetStyle && bFormatOK)
+ {
+ Any aAny;
+ aAny <<= nFormatKey;
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ }
+}
+
diff --git a/xmloff/util/makefile.mk b/xmloff/util/makefile.mk
new file mode 100644
index 0000000000..5032670c59
--- /dev/null
+++ b/xmloff/util/makefile.mk
@@ -0,0 +1,137 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:07: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): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..
+
+PRJNAME=xmloff
+TARGET=xo
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Allgemein ----------------------------------------------------
+NO_BSYMBOLIC=TRUE
+ENABLE_EXCEPTIONS=TRUE
+
+LIB1TARGET= $(SLB)$/xo.lib
+LIB1FILES= \
+ $(SLB)$/core.lib \
+ $(SLB)$/meta.lib \
+ $(SLB)$/style.lib \
+ $(SLB)$/text.lib \
+ $(SLB)$/draw.lib \
+ $(SLB)$/chart.lib
+
+# --- Shared-Library -----------------------------------------------
+
+.IF "$(GUI)"!="UNX"
+LIB4TARGET= $(LB)$/ixo.lib
+LIB4FILES= $(LB)$/_ixo.lib
+LIB4OBJFILES=\
+ $(OBJ)$/xmlkywd.obj
+.ENDIF
+
+SHL1TARGET= xo$(UPD)$(DLLPOSTFIX)
+SHL1IMPLIB= _ixo
+
+SHL1STDLIBS= \
+ $(SVTOOLLIB) \
+ $(TOOLSLIB) \
+ $(VOSLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB)\
+ $(RTLLIB) \
+ $(SVLIB) \
+ $(TKLIB) \
+ $(SVLLIB) \
+ $(SALLIB) \
+ $(UNOTOOLSLIB) \
+# $(GOODIESLIB) \
+ $(ONELIB)
+
+
+SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+SHL1LIBS= $(LIB1TARGET)
+
+# --- Def-File ---------------------------------------------------------
+
+DEF1NAME =$(SHL1TARGET)
+DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt
+DEFLIB1NAME =xo
+DEF1DES =XML Office Lib
+
+# --- Targets ----------------------------------------------------------
+
+.INCLUDE : target.mk
+
+# --- Filter -----------------------------------------------------------
+
+$(MISC)$/$(SHL1TARGET).flt: makefile.mk
+.IF "$(GUI)"=="WNT"
+ +echo _CT? > $@
+.ENDIF
+ +echo _CTA >> $@
+ +echo sXML_ >> $@
+ +echo allocator >> $@
+ +echo std >> $@
+